opensips-js-vue 0.1.37 → 0.1.38
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/library/super.mjs +789 -777
- package/library/super.mjs.map +1 -1
- package/library/super.umd.js +145 -145
- package/library/super.umd.js.map +1 -1
- package/package.json +2 -2
package/library/super.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { ref as Yt, computed as wl, watch as
|
|
2
|
-
function
|
|
1
|
+
import { ref as Yt, computed as wl, watch as y0, provide as T0, inject as b0 } from "vue";
|
|
2
|
+
function w0(o, n) {
|
|
3
3
|
for (var r = 0; r < n.length; r++) {
|
|
4
4
|
const a = n[r];
|
|
5
5
|
if (typeof a != "string" && !Array.isArray(a)) {
|
|
@@ -15,32 +15,32 @@ function b0(o, n) {
|
|
|
15
15
|
}
|
|
16
16
|
return Object.freeze(Object.defineProperty(o, Symbol.toStringTag, { value: "Module" }));
|
|
17
17
|
}
|
|
18
|
-
var
|
|
18
|
+
var S0 = Object.defineProperty, E0 = (o, n, r) => n in o ? S0(o, n, { enumerable: !0, configurable: !0, writable: !0, value: r }) : o[n] = r, ws = (o, n, r) => (E0(o, typeof n != "symbol" ? n + "" : n, r), r), C0 = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
|
|
19
19
|
function tn(o) {
|
|
20
20
|
return o && o.__esModule && Object.prototype.hasOwnProperty.call(o, "default") ? o.default : o;
|
|
21
21
|
}
|
|
22
|
-
const
|
|
22
|
+
const A0 = "jssip", I0 = "JsSIP", R0 = "the Javascript SIP library", x0 = "3.10.0", $0 = "https://jssip.net", O0 = [
|
|
23
23
|
"José Luis Millán <jmillan@aliax.net> (https://github.com/jmillan)",
|
|
24
24
|
"Iñaki Baz Castillo <ibc@aliax.net> (https://inakibaz.me)"
|
|
25
|
-
],
|
|
25
|
+
], k0 = "lib/JsSIP.d.ts", D0 = "lib-es5/JsSIP.js", N0 = [
|
|
26
26
|
"sip",
|
|
27
27
|
"websocket",
|
|
28
28
|
"webrtc",
|
|
29
29
|
"node",
|
|
30
30
|
"browser",
|
|
31
31
|
"library"
|
|
32
|
-
],
|
|
32
|
+
], M0 = "MIT", U0 = {
|
|
33
33
|
type: "git",
|
|
34
34
|
url: "https://github.com/versatica/JsSIP.git"
|
|
35
|
-
}, U0 = {
|
|
36
|
-
url: "https://github.com/versatica/JsSIP/issues"
|
|
37
35
|
}, P0 = {
|
|
36
|
+
url: "https://github.com/versatica/JsSIP/issues"
|
|
37
|
+
}, L0 = {
|
|
38
38
|
"@types/events": "^3.0.0",
|
|
39
39
|
"@types/debug": "^4.1.7",
|
|
40
40
|
debug: "^4.3.1",
|
|
41
41
|
events: "^3.3.0",
|
|
42
42
|
"sdp-transform": "^2.14.1"
|
|
43
|
-
},
|
|
43
|
+
}, q0 = {
|
|
44
44
|
"@babel/core": "^7.19.6",
|
|
45
45
|
"@babel/preset-env": "^7.19.4",
|
|
46
46
|
"ansi-colors": "^3.2.4",
|
|
@@ -59,27 +59,27 @@ const C0 = "jssip", A0 = "JsSIP", I0 = "the Javascript SIP library", R0 = "3.10.
|
|
|
59
59
|
pegjs: "^0.7.0",
|
|
60
60
|
"vinyl-buffer": "^1.0.1",
|
|
61
61
|
"vinyl-source-stream": "^2.0.0"
|
|
62
|
-
},
|
|
62
|
+
}, H0 = {
|
|
63
63
|
lint: "node npm-scripts.js lint",
|
|
64
64
|
test: "node npm-scripts.js test",
|
|
65
65
|
prepublish: "node npm-scripts.js prepublish",
|
|
66
66
|
release: "node npm-scripts.js release"
|
|
67
67
|
}, Zu = {
|
|
68
|
-
name:
|
|
69
|
-
title:
|
|
70
|
-
description:
|
|
71
|
-
version:
|
|
72
|
-
homepage:
|
|
73
|
-
contributors:
|
|
74
|
-
types:
|
|
75
|
-
main:
|
|
76
|
-
keywords:
|
|
77
|
-
license:
|
|
78
|
-
repository:
|
|
79
|
-
bugs:
|
|
80
|
-
dependencies:
|
|
81
|
-
devDependencies:
|
|
82
|
-
scripts:
|
|
68
|
+
name: A0,
|
|
69
|
+
title: I0,
|
|
70
|
+
description: R0,
|
|
71
|
+
version: x0,
|
|
72
|
+
homepage: $0,
|
|
73
|
+
contributors: O0,
|
|
74
|
+
types: k0,
|
|
75
|
+
main: D0,
|
|
76
|
+
keywords: N0,
|
|
77
|
+
license: M0,
|
|
78
|
+
repository: U0,
|
|
79
|
+
bugs: P0,
|
|
80
|
+
dependencies: L0,
|
|
81
|
+
devDependencies: q0,
|
|
82
|
+
scripts: H0
|
|
83
83
|
};
|
|
84
84
|
var Gg = Zu, fn = {
|
|
85
85
|
USER_AGENT: "".concat(Gg.title, " ").concat(Gg.version),
|
|
@@ -269,7 +269,7 @@ function tc(o, n) {
|
|
|
269
269
|
o.prototype = Object.create(n && n.prototype, { constructor: { value: o, writable: !0, configurable: !0 } }), n && fl(o, n);
|
|
270
270
|
}
|
|
271
271
|
function nc(o) {
|
|
272
|
-
var n =
|
|
272
|
+
var n = mT();
|
|
273
273
|
return function() {
|
|
274
274
|
var r = ml(o), a;
|
|
275
275
|
if (n) {
|
|
@@ -277,13 +277,13 @@ function nc(o) {
|
|
|
277
277
|
a = Reflect.construct(r, arguments, c);
|
|
278
278
|
} else
|
|
279
279
|
a = r.apply(this, arguments);
|
|
280
|
-
return
|
|
280
|
+
return z0(this, a);
|
|
281
281
|
};
|
|
282
282
|
}
|
|
283
|
-
function
|
|
284
|
-
return n && (Au(n) === "object" || typeof n == "function") ? n :
|
|
283
|
+
function z0(o, n) {
|
|
284
|
+
return n && (Au(n) === "object" || typeof n == "function") ? n : F0(o);
|
|
285
285
|
}
|
|
286
|
-
function
|
|
286
|
+
function F0(o) {
|
|
287
287
|
if (o === void 0)
|
|
288
288
|
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
289
289
|
return o;
|
|
@@ -291,7 +291,7 @@ function z0(o) {
|
|
|
291
291
|
function Ao(o) {
|
|
292
292
|
var n = typeof Map == "function" ? /* @__PURE__ */ new Map() : void 0;
|
|
293
293
|
return Ao = function(r) {
|
|
294
|
-
if (r === null || !
|
|
294
|
+
if (r === null || !B0(r))
|
|
295
295
|
return r;
|
|
296
296
|
if (typeof r != "function")
|
|
297
297
|
throw new TypeError("Super expression must either be null or a function");
|
|
@@ -307,14 +307,14 @@ function Ao(o) {
|
|
|
307
307
|
}, Ao(o);
|
|
308
308
|
}
|
|
309
309
|
function Iu(o, n, r) {
|
|
310
|
-
return
|
|
310
|
+
return mT() ? Iu = Reflect.construct : Iu = function(a, c, e) {
|
|
311
311
|
var _ = [null];
|
|
312
312
|
_.push.apply(_, c);
|
|
313
313
|
var g = Function.bind.apply(a, _), d = new g();
|
|
314
314
|
return e && fl(d, e.prototype), d;
|
|
315
315
|
}, Iu.apply(null, arguments);
|
|
316
316
|
}
|
|
317
|
-
function
|
|
317
|
+
function mT() {
|
|
318
318
|
if (typeof Reflect > "u" || !Reflect.construct || Reflect.construct.sham)
|
|
319
319
|
return !1;
|
|
320
320
|
if (typeof Proxy == "function")
|
|
@@ -326,7 +326,7 @@ function fT() {
|
|
|
326
326
|
return !1;
|
|
327
327
|
}
|
|
328
328
|
}
|
|
329
|
-
function
|
|
329
|
+
function B0(o) {
|
|
330
330
|
return Function.toString.call(o).indexOf("[native code]") !== -1;
|
|
331
331
|
}
|
|
332
332
|
function fl(o, n) {
|
|
@@ -339,7 +339,7 @@ function ml(o) {
|
|
|
339
339
|
return n.__proto__ || Object.getPrototypeOf(n);
|
|
340
340
|
}, ml(o);
|
|
341
341
|
}
|
|
342
|
-
var
|
|
342
|
+
var V0 = /* @__PURE__ */ function(o) {
|
|
343
343
|
tc(r, o);
|
|
344
344
|
var n = nc(r);
|
|
345
345
|
function r(a, c) {
|
|
@@ -347,7 +347,7 @@ var B0 = /* @__PURE__ */ function(o) {
|
|
|
347
347
|
return ec(this, r), e = n.call(this), e.code = 1, e.name = "CONFIGURATION_ERROR", e.parameter = a, e.value = c, e.message = e.value ? "Invalid value ".concat(JSON.stringify(e.value), ' for parameter "').concat(e.parameter, '"') : "Missing parameter: ".concat(e.parameter), e;
|
|
348
348
|
}
|
|
349
349
|
return r;
|
|
350
|
-
}(/* @__PURE__ */ Ao(Error)),
|
|
350
|
+
}(/* @__PURE__ */ Ao(Error)), j0 = /* @__PURE__ */ function(o) {
|
|
351
351
|
tc(r, o);
|
|
352
352
|
var n = nc(r);
|
|
353
353
|
function r(a) {
|
|
@@ -355,7 +355,7 @@ var B0 = /* @__PURE__ */ function(o) {
|
|
|
355
355
|
return ec(this, r), c = n.call(this), c.code = 2, c.name = "INVALID_STATE_ERROR", c.status = a, c.message = "Invalid status: ".concat(a), c;
|
|
356
356
|
}
|
|
357
357
|
return r;
|
|
358
|
-
}(/* @__PURE__ */ Ao(Error)),
|
|
358
|
+
}(/* @__PURE__ */ Ao(Error)), G0 = /* @__PURE__ */ function(o) {
|
|
359
359
|
tc(r, o);
|
|
360
360
|
var n = nc(r);
|
|
361
361
|
function r(a) {
|
|
@@ -363,7 +363,7 @@ var B0 = /* @__PURE__ */ function(o) {
|
|
|
363
363
|
return ec(this, r), c = n.call(this), c.code = 3, c.name = "NOT_SUPPORTED_ERROR", c.message = a, c;
|
|
364
364
|
}
|
|
365
365
|
return r;
|
|
366
|
-
}(/* @__PURE__ */ Ao(Error)),
|
|
366
|
+
}(/* @__PURE__ */ Ao(Error)), W0 = /* @__PURE__ */ function(o) {
|
|
367
367
|
tc(r, o);
|
|
368
368
|
var n = nc(r);
|
|
369
369
|
function r(a) {
|
|
@@ -372,10 +372,10 @@ var B0 = /* @__PURE__ */ function(o) {
|
|
|
372
372
|
}
|
|
373
373
|
return r;
|
|
374
374
|
}(/* @__PURE__ */ Ao(Error)), ua = {
|
|
375
|
-
ConfigurationError:
|
|
376
|
-
InvalidStateError:
|
|
377
|
-
NotSupportedError:
|
|
378
|
-
NotReadyError:
|
|
375
|
+
ConfigurationError: V0,
|
|
376
|
+
InvalidStateError: j0,
|
|
377
|
+
NotSupportedError: G0,
|
|
378
|
+
NotReadyError: W0
|
|
379
379
|
}, ln = {}, od, Wg;
|
|
380
380
|
function Ah() {
|
|
381
381
|
if (Wg)
|
|
@@ -2901,17 +2901,17 @@ Eo && typeof Eo.ownKeys == "function" ? Ru = Eo.ownKeys : Object.getOwnPropertyS
|
|
|
2901
2901
|
} : Ru = function(o) {
|
|
2902
2902
|
return Object.getOwnPropertyNames(o);
|
|
2903
2903
|
};
|
|
2904
|
-
function
|
|
2904
|
+
function K0(o) {
|
|
2905
2905
|
console && console.warn && console.warn(o);
|
|
2906
2906
|
}
|
|
2907
|
-
var
|
|
2907
|
+
var gT = Number.isNaN || function(o) {
|
|
2908
2908
|
return o !== o;
|
|
2909
2909
|
};
|
|
2910
2910
|
function qt() {
|
|
2911
2911
|
qt.init.call(this);
|
|
2912
2912
|
}
|
|
2913
2913
|
Ih.exports = qt;
|
|
2914
|
-
Ih.exports.once =
|
|
2914
|
+
Ih.exports.once = Q0;
|
|
2915
2915
|
qt.EventEmitter = qt;
|
|
2916
2916
|
qt.prototype._events = void 0;
|
|
2917
2917
|
qt.prototype._eventsCount = 0;
|
|
@@ -2927,7 +2927,7 @@ Object.defineProperty(qt, "defaultMaxListeners", {
|
|
|
2927
2927
|
return Zg;
|
|
2928
2928
|
},
|
|
2929
2929
|
set: function(o) {
|
|
2930
|
-
if (typeof o != "number" || o < 0 ||
|
|
2930
|
+
if (typeof o != "number" || o < 0 || gT(o))
|
|
2931
2931
|
throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received ' + o + ".");
|
|
2932
2932
|
Zg = o;
|
|
2933
2933
|
}
|
|
@@ -2936,15 +2936,15 @@ qt.init = function() {
|
|
|
2936
2936
|
(this._events === void 0 || this._events === Object.getPrototypeOf(this)._events) && (this._events = /* @__PURE__ */ Object.create(null), this._eventsCount = 0), this._maxListeners = this._maxListeners || void 0;
|
|
2937
2937
|
};
|
|
2938
2938
|
qt.prototype.setMaxListeners = function(o) {
|
|
2939
|
-
if (typeof o != "number" || o < 0 ||
|
|
2939
|
+
if (typeof o != "number" || o < 0 || gT(o))
|
|
2940
2940
|
throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received ' + o + ".");
|
|
2941
2941
|
return this._maxListeners = o, this;
|
|
2942
2942
|
};
|
|
2943
|
-
function
|
|
2943
|
+
function vT(o) {
|
|
2944
2944
|
return o._maxListeners === void 0 ? qt.defaultMaxListeners : o._maxListeners;
|
|
2945
2945
|
}
|
|
2946
2946
|
qt.prototype.getMaxListeners = function() {
|
|
2947
|
-
return
|
|
2947
|
+
return vT(this);
|
|
2948
2948
|
};
|
|
2949
2949
|
qt.prototype.emit = function(o) {
|
|
2950
2950
|
for (var n = [], r = 1; r < arguments.length; r++)
|
|
@@ -2967,11 +2967,11 @@ qt.prototype.emit = function(o) {
|
|
|
2967
2967
|
if (typeof g == "function")
|
|
2968
2968
|
Qg(g, this, n);
|
|
2969
2969
|
else
|
|
2970
|
-
for (var d = g.length, C =
|
|
2970
|
+
for (var d = g.length, C = ST(g, d), r = 0; r < d; ++r)
|
|
2971
2971
|
Qg(C[r], this, n);
|
|
2972
2972
|
return !0;
|
|
2973
2973
|
};
|
|
2974
|
-
function
|
|
2974
|
+
function yT(o, n, r, a) {
|
|
2975
2975
|
var c, e, _;
|
|
2976
2976
|
if (rc(r), e = o._events, e === void 0 ? (e = o._events = /* @__PURE__ */ Object.create(null), o._eventsCount = 0) : (e.newListener !== void 0 && (o.emit(
|
|
2977
2977
|
"newListener",
|
|
@@ -2979,33 +2979,33 @@ function vT(o, n, r, a) {
|
|
|
2979
2979
|
r.listener ? r.listener : r
|
|
2980
2980
|
), e = o._events), _ = e[n]), _ === void 0)
|
|
2981
2981
|
_ = e[n] = r, ++o._eventsCount;
|
|
2982
|
-
else if (typeof _ == "function" ? _ = e[n] = a ? [r, _] : [_, r] : a ? _.unshift(r) : _.push(r), c =
|
|
2982
|
+
else if (typeof _ == "function" ? _ = e[n] = a ? [r, _] : [_, r] : a ? _.unshift(r) : _.push(r), c = vT(o), c > 0 && _.length > c && !_.warned) {
|
|
2983
2983
|
_.warned = !0;
|
|
2984
2984
|
var g = new Error("Possible EventEmitter memory leak detected. " + _.length + " " + String(n) + " listeners added. Use emitter.setMaxListeners() to increase limit");
|
|
2985
|
-
g.name = "MaxListenersExceededWarning", g.emitter = o, g.type = n, g.count = _.length,
|
|
2985
|
+
g.name = "MaxListenersExceededWarning", g.emitter = o, g.type = n, g.count = _.length, K0(g);
|
|
2986
2986
|
}
|
|
2987
2987
|
return o;
|
|
2988
2988
|
}
|
|
2989
2989
|
qt.prototype.addListener = function(o, n) {
|
|
2990
|
-
return
|
|
2990
|
+
return yT(this, o, n, !1);
|
|
2991
2991
|
};
|
|
2992
2992
|
qt.prototype.on = qt.prototype.addListener;
|
|
2993
2993
|
qt.prototype.prependListener = function(o, n) {
|
|
2994
|
-
return
|
|
2994
|
+
return yT(this, o, n, !0);
|
|
2995
2995
|
};
|
|
2996
|
-
function
|
|
2996
|
+
function Y0() {
|
|
2997
2997
|
if (!this.fired)
|
|
2998
2998
|
return this.target.removeListener(this.type, this.wrapFn), this.fired = !0, arguments.length === 0 ? this.listener.call(this.target) : this.listener.apply(this.target, arguments);
|
|
2999
2999
|
}
|
|
3000
|
-
function
|
|
3001
|
-
var a = { fired: !1, wrapFn: void 0, target: o, type: n, listener: r }, c =
|
|
3000
|
+
function TT(o, n, r) {
|
|
3001
|
+
var a = { fired: !1, wrapFn: void 0, target: o, type: n, listener: r }, c = Y0.bind(a);
|
|
3002
3002
|
return c.listener = r, a.wrapFn = c, c;
|
|
3003
3003
|
}
|
|
3004
3004
|
qt.prototype.once = function(o, n) {
|
|
3005
|
-
return rc(n), this.on(o,
|
|
3005
|
+
return rc(n), this.on(o, TT(this, o, n)), this;
|
|
3006
3006
|
};
|
|
3007
3007
|
qt.prototype.prependOnceListener = function(o, n) {
|
|
3008
|
-
return rc(n), this.prependListener(o,
|
|
3008
|
+
return rc(n), this.prependListener(o, TT(this, o, n)), this;
|
|
3009
3009
|
};
|
|
3010
3010
|
qt.prototype.removeListener = function(o, n) {
|
|
3011
3011
|
var r, a, c, e, _;
|
|
@@ -3023,7 +3023,7 @@ qt.prototype.removeListener = function(o, n) {
|
|
|
3023
3023
|
}
|
|
3024
3024
|
if (c < 0)
|
|
3025
3025
|
return this;
|
|
3026
|
-
c === 0 ? r.shift() :
|
|
3026
|
+
c === 0 ? r.shift() : X0(r, c), r.length === 1 && (a[o] = r[0]), a.removeListener !== void 0 && this.emit("removeListener", o, _ || n);
|
|
3027
3027
|
}
|
|
3028
3028
|
return this;
|
|
3029
3029
|
};
|
|
@@ -3047,24 +3047,24 @@ qt.prototype.removeAllListeners = function(o) {
|
|
|
3047
3047
|
this.removeListener(o, n[a]);
|
|
3048
3048
|
return this;
|
|
3049
3049
|
};
|
|
3050
|
-
function
|
|
3050
|
+
function bT(o, n, r) {
|
|
3051
3051
|
var a = o._events;
|
|
3052
3052
|
if (a === void 0)
|
|
3053
3053
|
return [];
|
|
3054
3054
|
var c = a[n];
|
|
3055
|
-
return c === void 0 ? [] : typeof c == "function" ? r ? [c.listener || c] : [c] : r ?
|
|
3055
|
+
return c === void 0 ? [] : typeof c == "function" ? r ? [c.listener || c] : [c] : r ? J0(c) : ST(c, c.length);
|
|
3056
3056
|
}
|
|
3057
3057
|
qt.prototype.listeners = function(o) {
|
|
3058
|
-
return
|
|
3058
|
+
return bT(this, o, !0);
|
|
3059
3059
|
};
|
|
3060
3060
|
qt.prototype.rawListeners = function(o) {
|
|
3061
|
-
return
|
|
3061
|
+
return bT(this, o, !1);
|
|
3062
3062
|
};
|
|
3063
3063
|
qt.listenerCount = function(o, n) {
|
|
3064
|
-
return typeof o.listenerCount == "function" ? o.listenerCount(n) :
|
|
3064
|
+
return typeof o.listenerCount == "function" ? o.listenerCount(n) : wT.call(o, n);
|
|
3065
3065
|
};
|
|
3066
|
-
qt.prototype.listenerCount =
|
|
3067
|
-
function
|
|
3066
|
+
qt.prototype.listenerCount = wT;
|
|
3067
|
+
function wT(o) {
|
|
3068
3068
|
var n = this._events;
|
|
3069
3069
|
if (n !== void 0) {
|
|
3070
3070
|
var r = n[o];
|
|
@@ -3078,22 +3078,22 @@ function bT(o) {
|
|
|
3078
3078
|
qt.prototype.eventNames = function() {
|
|
3079
3079
|
return this._eventsCount > 0 ? Ru(this._events) : [];
|
|
3080
3080
|
};
|
|
3081
|
-
function
|
|
3081
|
+
function ST(o, n) {
|
|
3082
3082
|
for (var r = new Array(n), a = 0; a < n; ++a)
|
|
3083
3083
|
r[a] = o[a];
|
|
3084
3084
|
return r;
|
|
3085
3085
|
}
|
|
3086
|
-
function
|
|
3086
|
+
function X0(o, n) {
|
|
3087
3087
|
for (; n + 1 < o.length; n++)
|
|
3088
3088
|
o[n] = o[n + 1];
|
|
3089
3089
|
o.pop();
|
|
3090
3090
|
}
|
|
3091
|
-
function
|
|
3091
|
+
function J0(o) {
|
|
3092
3092
|
for (var n = new Array(o.length), r = 0; r < n.length; ++r)
|
|
3093
3093
|
n[r] = o[r].listener || o[r];
|
|
3094
3094
|
return n;
|
|
3095
3095
|
}
|
|
3096
|
-
function
|
|
3096
|
+
function Q0(o, n) {
|
|
3097
3097
|
return new Promise(function(r, a) {
|
|
3098
3098
|
function c(_) {
|
|
3099
3099
|
o.removeListener(n, e), a(_);
|
|
@@ -3101,13 +3101,13 @@ function J0(o, n) {
|
|
|
3101
3101
|
function e() {
|
|
3102
3102
|
typeof o.removeListener == "function" && o.removeListener("error", c), r([].slice.call(arguments));
|
|
3103
3103
|
}
|
|
3104
|
-
|
|
3104
|
+
ET(o, n, e, { once: !0 }), n !== "error" && Z0(o, c, { once: !0 });
|
|
3105
3105
|
});
|
|
3106
3106
|
}
|
|
3107
|
-
function
|
|
3108
|
-
typeof o.on == "function" &&
|
|
3107
|
+
function Z0(o, n, r) {
|
|
3108
|
+
typeof o.on == "function" && ET(o, "error", n, r);
|
|
3109
3109
|
}
|
|
3110
|
-
function
|
|
3110
|
+
function ET(o, n, r, a) {
|
|
3111
3111
|
if (typeof o.on == "function")
|
|
3112
3112
|
a.once ? o.once(n, r) : o.on(n, r);
|
|
3113
3113
|
else if (typeof o.addEventListener == "function")
|
|
@@ -3118,7 +3118,7 @@ function ST(o, n, r, a) {
|
|
|
3118
3118
|
throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type ' + typeof o);
|
|
3119
3119
|
}
|
|
3120
3120
|
var En = Ih.exports, ih = { exports: {} }, ud, ev;
|
|
3121
|
-
function
|
|
3121
|
+
function ew() {
|
|
3122
3122
|
if (ev)
|
|
3123
3123
|
return ud;
|
|
3124
3124
|
ev = 1;
|
|
@@ -3200,8 +3200,8 @@ function Z0() {
|
|
|
3200
3200
|
}
|
|
3201
3201
|
return ud;
|
|
3202
3202
|
}
|
|
3203
|
-
function
|
|
3204
|
-
r.debug = r, r.default = r, r.coerce = d, r.disable = e, r.enable = c, r.enabled = _, r.humanize =
|
|
3203
|
+
function tw(o) {
|
|
3204
|
+
r.debug = r, r.default = r, r.coerce = d, r.disable = e, r.enable = c, r.enabled = _, r.humanize = ew(), r.destroy = C, Object.keys(o).forEach((S) => {
|
|
3205
3205
|
r[S] = o[S];
|
|
3206
3206
|
}), r.names = [], r.skips = [], r.formatters = {};
|
|
3207
3207
|
function n(S) {
|
|
@@ -3281,7 +3281,7 @@ function ew(o) {
|
|
|
3281
3281
|
}
|
|
3282
3282
|
return r.enable(r.load()), r;
|
|
3283
3283
|
}
|
|
3284
|
-
var
|
|
3284
|
+
var nw = tw;
|
|
3285
3285
|
(function(o, n) {
|
|
3286
3286
|
n.formatArgs = a, n.save = c, n.load = e, n.useColors = r, n.storage = _(), n.destroy = /* @__PURE__ */ (() => {
|
|
3287
3287
|
let d = !1;
|
|
@@ -3405,7 +3405,7 @@ var tw = ew;
|
|
|
3405
3405
|
} catch {
|
|
3406
3406
|
}
|
|
3407
3407
|
}
|
|
3408
|
-
o.exports =
|
|
3408
|
+
o.exports = nw(n);
|
|
3409
3409
|
const { formatters: g } = o.exports;
|
|
3410
3410
|
g.j = function(d) {
|
|
3411
3411
|
try {
|
|
@@ -3416,7 +3416,7 @@ var tw = ew;
|
|
|
3416
3416
|
};
|
|
3417
3417
|
})(ih, ih.exports);
|
|
3418
3418
|
var Io = ih.exports;
|
|
3419
|
-
function
|
|
3419
|
+
function rw(o, n) {
|
|
3420
3420
|
if (!(o instanceof n))
|
|
3421
3421
|
throw new TypeError("Cannot call a class as a function");
|
|
3422
3422
|
}
|
|
@@ -3426,14 +3426,14 @@ function tv(o, n) {
|
|
|
3426
3426
|
a.enumerable = a.enumerable || !1, a.configurable = !0, "value" in a && (a.writable = !0), Object.defineProperty(o, a.key, a);
|
|
3427
3427
|
}
|
|
3428
3428
|
}
|
|
3429
|
-
function
|
|
3429
|
+
function sw(o, n, r) {
|
|
3430
3430
|
return n && tv(o.prototype, n), r && tv(o, r), o;
|
|
3431
3431
|
}
|
|
3432
3432
|
var fo = Io, mo = "JsSIP", Cn = /* @__PURE__ */ function() {
|
|
3433
3433
|
function o(n) {
|
|
3434
|
-
|
|
3434
|
+
rw(this, o), n ? (this._debug = fo.default("".concat(mo, ":").concat(n)), this._warn = fo.default("".concat(mo, ":WARN:").concat(n)), this._error = fo.default("".concat(mo, ":ERROR:").concat(n))) : (this._debug = fo.default(mo), this._warn = fo.default("".concat(mo, ":WARN")), this._error = fo.default("".concat(mo, ":ERROR"))), this._debug.log = console.info.bind(console), this._warn.log = console.warn.bind(console), this._error.log = console.error.bind(console);
|
|
3435
3435
|
}
|
|
3436
|
-
return
|
|
3436
|
+
return sw(o, [{
|
|
3437
3437
|
key: "debug",
|
|
3438
3438
|
get: function() {
|
|
3439
3439
|
return this._debug;
|
|
@@ -3449,7 +3449,7 @@ var fo = Io, mo = "JsSIP", Cn = /* @__PURE__ */ function() {
|
|
|
3449
3449
|
return this._error;
|
|
3450
3450
|
}
|
|
3451
3451
|
}]), o;
|
|
3452
|
-
}(), pr = {},
|
|
3452
|
+
}(), pr = {}, CT = {}, AT = { exports: {} }, nv = AT.exports = {
|
|
3453
3453
|
v: [{
|
|
3454
3454
|
name: "version",
|
|
3455
3455
|
reg: /^(\d*)$/
|
|
@@ -3889,7 +3889,7 @@ Object.keys(nv).forEach(function(o) {
|
|
|
3889
3889
|
r.reg || (r.reg = /(.*)/), r.format || (r.format = "%s");
|
|
3890
3890
|
});
|
|
3891
3891
|
});
|
|
3892
|
-
var
|
|
3892
|
+
var IT = AT.exports;
|
|
3893
3893
|
(function(o) {
|
|
3894
3894
|
var n = function(g) {
|
|
3895
3895
|
return String(Number(g)) === g ? Number(g) : g;
|
|
@@ -3907,7 +3907,7 @@ var AT = CT.exports;
|
|
|
3907
3907
|
S ? d[g.name] : d
|
|
3908
3908
|
);
|
|
3909
3909
|
r(C.match(g.reg), R, g.names, g.name), g.push && d[g.push].push(R);
|
|
3910
|
-
}, c =
|
|
3910
|
+
}, c = IT, e = RegExp.prototype.test.bind(/^([a-z])=(.*)/);
|
|
3911
3911
|
o.parse = function(g) {
|
|
3912
3912
|
var d = {}, C = [], S = d;
|
|
3913
3913
|
return g.split(/(\r\n|\r|\n)/).filter(e).forEach(function(R) {
|
|
@@ -3951,10 +3951,10 @@ var AT = CT.exports;
|
|
|
3951
3951
|
});
|
|
3952
3952
|
});
|
|
3953
3953
|
};
|
|
3954
|
-
})(
|
|
3955
|
-
var cd =
|
|
3954
|
+
})(CT);
|
|
3955
|
+
var cd = IT, iw = /%[sdv%]/g, aw = function(o) {
|
|
3956
3956
|
var n = 1, r = arguments, a = r.length;
|
|
3957
|
-
return o.replace(
|
|
3957
|
+
return o.replace(iw, function(c) {
|
|
3958
3958
|
if (n >= a)
|
|
3959
3959
|
return c;
|
|
3960
3960
|
var e = r[n];
|
|
@@ -3978,8 +3978,8 @@ var cd = AT, sw = /%[sdv%]/g, iw = function(o) {
|
|
|
3978
3978
|
}
|
|
3979
3979
|
else
|
|
3980
3980
|
c.push(r[n.name]);
|
|
3981
|
-
return
|
|
3982
|
-
},
|
|
3981
|
+
return aw.apply(null, c);
|
|
3982
|
+
}, ow = [
|
|
3983
3983
|
"v",
|
|
3984
3984
|
"o",
|
|
3985
3985
|
"s",
|
|
@@ -3993,11 +3993,11 @@ var cd = AT, sw = /%[sdv%]/g, iw = function(o) {
|
|
|
3993
3993
|
"r",
|
|
3994
3994
|
"z",
|
|
3995
3995
|
"a"
|
|
3996
|
-
],
|
|
3996
|
+
], lw = ["i", "c", "b", "a"], uw = function(o, n) {
|
|
3997
3997
|
n = n || {}, o.version == null && (o.version = 0), o.name == null && (o.name = " "), o.media.forEach(function(e) {
|
|
3998
3998
|
e.payloads == null && (e.payloads = "");
|
|
3999
3999
|
});
|
|
4000
|
-
var r = n.outerOrder ||
|
|
4000
|
+
var r = n.outerOrder || ow, a = n.innerOrder || lw, c = [];
|
|
4001
4001
|
return r.forEach(function(e) {
|
|
4002
4002
|
cd[e].forEach(function(_) {
|
|
4003
4003
|
_.name in o && o[_.name] != null ? c.push(Vo(e, _, o)) : _.push in o && o[_.push] != null && o[_.push].forEach(function(g) {
|
|
@@ -4015,8 +4015,8 @@ var cd = AT, sw = /%[sdv%]/g, iw = function(o) {
|
|
|
4015
4015
|
}), c.join(`\r
|
|
4016
4016
|
`) + `\r
|
|
4017
4017
|
`;
|
|
4018
|
-
}, Fa =
|
|
4019
|
-
pr.write =
|
|
4018
|
+
}, Fa = CT, cw = uw;
|
|
4019
|
+
pr.write = cw;
|
|
4020
4020
|
pr.parse = Fa.parse;
|
|
4021
4021
|
pr.parseParams = Fa.parseParams;
|
|
4022
4022
|
pr.parseFmtpConfig = Fa.parseFmtpConfig;
|
|
@@ -4043,7 +4043,7 @@ function ah(o, n) {
|
|
|
4043
4043
|
}, ah(o, n);
|
|
4044
4044
|
}
|
|
4045
4045
|
function xh(o) {
|
|
4046
|
-
var n =
|
|
4046
|
+
var n = pw();
|
|
4047
4047
|
return function() {
|
|
4048
4048
|
var r = Fu(o), a;
|
|
4049
4049
|
if (n) {
|
|
@@ -4051,18 +4051,18 @@ function xh(o) {
|
|
|
4051
4051
|
a = Reflect.construct(r, arguments, c);
|
|
4052
4052
|
} else
|
|
4053
4053
|
a = r.apply(this, arguments);
|
|
4054
|
-
return
|
|
4054
|
+
return dw(this, a);
|
|
4055
4055
|
};
|
|
4056
4056
|
}
|
|
4057
|
-
function
|
|
4058
|
-
return n && (xu(n) === "object" || typeof n == "function") ? n :
|
|
4057
|
+
function dw(o, n) {
|
|
4058
|
+
return n && (xu(n) === "object" || typeof n == "function") ? n : hw(o);
|
|
4059
4059
|
}
|
|
4060
|
-
function
|
|
4060
|
+
function hw(o) {
|
|
4061
4061
|
if (o === void 0)
|
|
4062
4062
|
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
4063
4063
|
return o;
|
|
4064
4064
|
}
|
|
4065
|
-
function
|
|
4065
|
+
function pw() {
|
|
4066
4066
|
if (typeof Reflect > "u" || !Reflect.construct || Reflect.construct.sham)
|
|
4067
4067
|
return !1;
|
|
4068
4068
|
if (typeof Proxy == "function")
|
|
@@ -4082,7 +4082,7 @@ function Fu(o) {
|
|
|
4082
4082
|
function Pr(o, n) {
|
|
4083
4083
|
var r;
|
|
4084
4084
|
if (typeof Symbol > "u" || o[Symbol.iterator] == null) {
|
|
4085
|
-
if (Array.isArray(o) || (r =
|
|
4085
|
+
if (Array.isArray(o) || (r = _w(o)) || n && o && typeof o.length == "number") {
|
|
4086
4086
|
r && (o = r);
|
|
4087
4087
|
var a = 0, c = function() {
|
|
4088
4088
|
};
|
|
@@ -4112,7 +4112,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
4112
4112
|
}
|
|
4113
4113
|
} };
|
|
4114
4114
|
}
|
|
4115
|
-
function
|
|
4115
|
+
function _w(o, n) {
|
|
4116
4116
|
if (o) {
|
|
4117
4117
|
if (typeof o == "string")
|
|
4118
4118
|
return rv(o, n);
|
|
@@ -4142,7 +4142,7 @@ function sv(o, n) {
|
|
|
4142
4142
|
function sc(o, n, r) {
|
|
4143
4143
|
return n && sv(o.prototype, n), r && sv(o, r), o;
|
|
4144
4144
|
}
|
|
4145
|
-
var
|
|
4145
|
+
var RT = pr, fw = Cn, Ln = fn, pn = Yn(), iv = Ah(), mw = xs(), dd = new fw("SIPMessage"), xT = /* @__PURE__ */ function() {
|
|
4146
4146
|
function o(n, r, a, c, e, _) {
|
|
4147
4147
|
if (Sl(this, o), !n || !r || !a)
|
|
4148
4148
|
return null;
|
|
@@ -4265,7 +4265,7 @@ var IT = pr, _w = Cn, Ln = fn, pn = Yn(), iv = Ah(), fw = xs(), dd = new _w("SIP
|
|
|
4265
4265
|
}, {
|
|
4266
4266
|
key: "parseSDP",
|
|
4267
4267
|
value: function(n) {
|
|
4268
|
-
return !n && this.sdp ? this.sdp : (this.sdp =
|
|
4268
|
+
return !n && this.sdp ? this.sdp : (this.sdp = RT.parse(this.body || ""), this.sdp);
|
|
4269
4269
|
}
|
|
4270
4270
|
}, {
|
|
4271
4271
|
key: "toString",
|
|
@@ -4336,7 +4336,7 @@ var IT = pr, _w = Cn, Ln = fn, pn = Yn(), iv = Ah(), fw = xs(), dd = new _w("SIP
|
|
|
4336
4336
|
}, this), n.body = this.body, n.extraHeaders = pn.cloneArray(this.extraHeaders), n.to = this.to, n.from = this.from, n.call_id = this.call_id, n.cseq = this.cseq, n;
|
|
4337
4337
|
}
|
|
4338
4338
|
}]), o;
|
|
4339
|
-
}(),
|
|
4339
|
+
}(), gw = /* @__PURE__ */ function(o) {
|
|
4340
4340
|
Rh(r, o);
|
|
4341
4341
|
var n = xh(r);
|
|
4342
4342
|
function r(a, c, e, _, g) {
|
|
@@ -4357,7 +4357,7 @@ var IT = pr, _w = Cn, Ln = fn, pn = Yn(), iv = Ah(), fw = xs(), dd = new _w("SIP
|
|
|
4357
4357
|
}, this), a.body = this.body, a.extraHeaders = pn.cloneArray(this.extraHeaders), a.to = this.to, a.from = this.from, a.call_id = this.call_id, a.cseq = this.cseq, a.transaction = this.transaction, a;
|
|
4358
4358
|
}
|
|
4359
4359
|
}]), r;
|
|
4360
|
-
}(
|
|
4360
|
+
}(xT), $T = /* @__PURE__ */ function() {
|
|
4361
4361
|
function o() {
|
|
4362
4362
|
Sl(this, o), this.data = null, this.headers = null, this.method = null, this.via = null, this.via_branch = null, this.call_id = null, this.cseq = null, this.from = null, this.from_tag = null, this.to = null, this.to_tag = null, this.body = null, this.sdp = null;
|
|
4363
4363
|
}
|
|
@@ -4435,7 +4435,7 @@ var IT = pr, _w = Cn, Ln = fn, pn = Yn(), iv = Ah(), fw = xs(), dd = new _w("SIP
|
|
|
4435
4435
|
var a = this.headers[n][r], c = a.raw;
|
|
4436
4436
|
if (a.parsed)
|
|
4437
4437
|
return a.parsed;
|
|
4438
|
-
var e =
|
|
4438
|
+
var e = mw.parse(c, n.replace(/-/g, "_"));
|
|
4439
4439
|
if (e === -1) {
|
|
4440
4440
|
this.headers[n].splice(r, 1), dd.debug('error parsing "'.concat(n, '" header field with value "').concat(c, '"'));
|
|
4441
4441
|
return;
|
|
@@ -4480,7 +4480,7 @@ var IT = pr, _w = Cn, Ln = fn, pn = Yn(), iv = Ah(), fw = xs(), dd = new _w("SIP
|
|
|
4480
4480
|
}, {
|
|
4481
4481
|
key: "parseSDP",
|
|
4482
4482
|
value: function(n) {
|
|
4483
|
-
return !n && this.sdp ? this.sdp : (this.sdp =
|
|
4483
|
+
return !n && this.sdp ? this.sdp : (this.sdp = RT.parse(this.body || ""), this.sdp);
|
|
4484
4484
|
}
|
|
4485
4485
|
}, {
|
|
4486
4486
|
key: "toString",
|
|
@@ -4488,7 +4488,7 @@ var IT = pr, _w = Cn, Ln = fn, pn = Yn(), iv = Ah(), fw = xs(), dd = new _w("SIP
|
|
|
4488
4488
|
return this.data;
|
|
4489
4489
|
}
|
|
4490
4490
|
}]), o;
|
|
4491
|
-
}(),
|
|
4491
|
+
}(), vw = /* @__PURE__ */ function(o) {
|
|
4492
4492
|
Rh(r, o);
|
|
4493
4493
|
var n = xh(r);
|
|
4494
4494
|
function r(a) {
|
|
@@ -4624,7 +4624,7 @@ var IT = pr, _w = Cn, Ln = fn, pn = Yn(), iv = Ah(), fw = xs(), dd = new _w("SIP
|
|
|
4624
4624
|
`), this.transport.send(_);
|
|
4625
4625
|
}
|
|
4626
4626
|
}]), r;
|
|
4627
|
-
}(
|
|
4627
|
+
}($T), yw = /* @__PURE__ */ function(o) {
|
|
4628
4628
|
Rh(r, o);
|
|
4629
4629
|
var n = xh(r);
|
|
4630
4630
|
function r() {
|
|
@@ -4632,13 +4632,13 @@ var IT = pr, _w = Cn, Ln = fn, pn = Yn(), iv = Ah(), fw = xs(), dd = new _w("SIP
|
|
|
4632
4632
|
return Sl(this, r), a = n.call(this), a.headers = {}, a.status_code = null, a.reason_phrase = null, a;
|
|
4633
4633
|
}
|
|
4634
4634
|
return r;
|
|
4635
|
-
}(
|
|
4636
|
-
OutgoingRequest:
|
|
4637
|
-
InitialOutgoingInviteRequest:
|
|
4638
|
-
IncomingRequest:
|
|
4639
|
-
IncomingResponse:
|
|
4635
|
+
}($T), ni = {
|
|
4636
|
+
OutgoingRequest: xT,
|
|
4637
|
+
InitialOutgoingInviteRequest: gw,
|
|
4638
|
+
IncomingRequest: vw,
|
|
4639
|
+
IncomingResponse: yw
|
|
4640
4640
|
};
|
|
4641
|
-
function
|
|
4641
|
+
function Tw(o, n) {
|
|
4642
4642
|
if (!(o instanceof n))
|
|
4643
4643
|
throw new TypeError("Cannot call a class as a function");
|
|
4644
4644
|
}
|
|
@@ -4648,14 +4648,14 @@ function av(o, n) {
|
|
|
4648
4648
|
a.enumerable = a.enumerable || !1, a.configurable = !0, "value" in a && (a.writable = !0), Object.defineProperty(o, a.key, a);
|
|
4649
4649
|
}
|
|
4650
4650
|
}
|
|
4651
|
-
function
|
|
4651
|
+
function bw(o, n, r) {
|
|
4652
4652
|
return n && av(o.prototype, n), r && av(o, r), o;
|
|
4653
4653
|
}
|
|
4654
|
-
var
|
|
4654
|
+
var ww = Cn, Ws = Yn(), Jr = new ww("DigestAuthentication"), Sw = /* @__PURE__ */ function() {
|
|
4655
4655
|
function o(n) {
|
|
4656
|
-
|
|
4656
|
+
Tw(this, o), this._credentials = n, this._cnonce = null, this._nc = 0, this._ncHex = "00000000", this._algorithm = null, this._realm = null, this._nonce = null, this._opaque = null, this._stale = null, this._qop = null, this._method = null, this._uri = null, this._ha1 = null, this._response = null;
|
|
4657
4657
|
}
|
|
4658
|
-
return
|
|
4658
|
+
return bw(o, [{
|
|
4659
4659
|
key: "get",
|
|
4660
4660
|
value: function(n) {
|
|
4661
4661
|
switch (n) {
|
|
@@ -4719,9 +4719,9 @@ var bw = Cn, Ws = Yn(), Jr = new bw("DigestAuthentication"), ww = /* @__PURE__ *
|
|
|
4719
4719
|
return n.push("algorithm=".concat(this._algorithm)), n.push('username="'.concat(this._credentials.username, '"')), n.push('realm="'.concat(this._realm, '"')), n.push('nonce="'.concat(this._nonce, '"')), n.push('uri="'.concat(this._uri, '"')), n.push('response="'.concat(this._response, '"')), this._opaque && n.push('opaque="'.concat(this._opaque, '"')), this._qop && (n.push("qop=".concat(this._qop)), n.push('cnonce="'.concat(this._cnonce, '"')), n.push("nc=".concat(this._ncHex))), "Digest ".concat(n.join(", "));
|
|
4720
4720
|
}
|
|
4721
4721
|
}]), o;
|
|
4722
|
-
}(), Ks = 500,
|
|
4722
|
+
}(), Ks = 500, Ew = 4e3, ov = 5e3, OT = {
|
|
4723
4723
|
T1: Ks,
|
|
4724
|
-
T2:
|
|
4724
|
+
T2: Ew,
|
|
4725
4725
|
T4: ov,
|
|
4726
4726
|
TIMER_B: 64 * Ks,
|
|
4727
4727
|
TIMER_D: 0 * Ks,
|
|
@@ -4767,7 +4767,7 @@ function oh(o, n) {
|
|
|
4767
4767
|
}, oh(o, n);
|
|
4768
4768
|
}
|
|
4769
4769
|
function Il(o) {
|
|
4770
|
-
var n =
|
|
4770
|
+
var n = Aw();
|
|
4771
4771
|
return function() {
|
|
4772
4772
|
var r = Bu(o), a;
|
|
4773
4773
|
if (n) {
|
|
@@ -4775,10 +4775,10 @@ function Il(o) {
|
|
|
4775
4775
|
a = Reflect.construct(r, arguments, c);
|
|
4776
4776
|
} else
|
|
4777
4777
|
a = r.apply(this, arguments);
|
|
4778
|
-
return
|
|
4778
|
+
return Cw(this, a);
|
|
4779
4779
|
};
|
|
4780
4780
|
}
|
|
4781
|
-
function
|
|
4781
|
+
function Cw(o, n) {
|
|
4782
4782
|
return n && ($u(n) === "object" || typeof n == "function") ? n : oa(o);
|
|
4783
4783
|
}
|
|
4784
4784
|
function oa(o) {
|
|
@@ -4786,7 +4786,7 @@ function oa(o) {
|
|
|
4786
4786
|
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
4787
4787
|
return o;
|
|
4788
4788
|
}
|
|
4789
|
-
function
|
|
4789
|
+
function Aw() {
|
|
4790
4790
|
if (typeof Reflect > "u" || !Reflect.construct || Reflect.construct.sham)
|
|
4791
4791
|
return !1;
|
|
4792
4792
|
if (typeof Proxy == "function")
|
|
@@ -4803,7 +4803,7 @@ function Bu(o) {
|
|
|
4803
4803
|
return n.__proto__ || Object.getPrototypeOf(n);
|
|
4804
4804
|
}, Bu(o);
|
|
4805
4805
|
}
|
|
4806
|
-
var Rl = En.EventEmitter, xl = Cn, hl = fn, uv = ni, As =
|
|
4806
|
+
var Rl = En.EventEmitter, xl = Cn, hl = fn, uv = ni, As = OT, cv = new xl("NonInviteClientTransaction"), Wl = new xl("InviteClientTransaction"), Iw = new xl("AckClientTransaction"), dv = new xl("NonInviteServerTransaction"), Kl = new xl("InviteServerTransaction"), Ve = {
|
|
4807
4807
|
// Transaction states.
|
|
4808
4808
|
STATUS_TRYING: 1,
|
|
4809
4809
|
STATUS_PROCEEDING: 2,
|
|
@@ -4817,7 +4817,7 @@ var Rl = En.EventEmitter, xl = Cn, hl = fn, uv = ni, As = $T, cv = new xl("NonIn
|
|
|
4817
4817
|
NON_INVITE_SERVER: "nist",
|
|
4818
4818
|
INVITE_CLIENT: "ict",
|
|
4819
4819
|
INVITE_SERVER: "ist"
|
|
4820
|
-
},
|
|
4820
|
+
}, Rw = /* @__PURE__ */ function(o) {
|
|
4821
4821
|
Al(r, o);
|
|
4822
4822
|
var n = Il(r);
|
|
4823
4823
|
function r(a, c, e, _) {
|
|
@@ -4883,7 +4883,7 @@ var Rl = En.EventEmitter, xl = Cn, hl = fn, uv = ni, As = $T, cv = new xl("NonIn
|
|
|
4883
4883
|
return Ve;
|
|
4884
4884
|
}
|
|
4885
4885
|
}]), r;
|
|
4886
|
-
}(Rl),
|
|
4886
|
+
}(Rl), xw = /* @__PURE__ */ function(o) {
|
|
4887
4887
|
Al(r, o);
|
|
4888
4888
|
var n = Il(r);
|
|
4889
4889
|
function r(a, c, e, _) {
|
|
@@ -4993,7 +4993,7 @@ var Rl = En.EventEmitter, xl = Cn, hl = fn, uv = ni, As = $T, cv = new xl("NonIn
|
|
|
4993
4993
|
return Ve;
|
|
4994
4994
|
}
|
|
4995
4995
|
}]), r;
|
|
4996
|
-
}(Rl),
|
|
4996
|
+
}(Rl), $w = /* @__PURE__ */ function(o) {
|
|
4997
4997
|
Al(r, o);
|
|
4998
4998
|
var n = Il(r);
|
|
4999
4999
|
function r(a, c, e, _) {
|
|
@@ -5010,7 +5010,7 @@ var Rl = En.EventEmitter, xl = Cn, hl = fn, uv = ni, As = $T, cv = new xl("NonIn
|
|
|
5010
5010
|
}, {
|
|
5011
5011
|
key: "onTransportError",
|
|
5012
5012
|
value: function() {
|
|
5013
|
-
|
|
5013
|
+
Iw.debug("transport error occurred for transaction ".concat(this.id)), this.eventHandlers.onTransportError();
|
|
5014
5014
|
}
|
|
5015
5015
|
}, {
|
|
5016
5016
|
key: "C",
|
|
@@ -5018,7 +5018,7 @@ var Rl = En.EventEmitter, xl = Cn, hl = fn, uv = ni, As = $T, cv = new xl("NonIn
|
|
|
5018
5018
|
return Ve;
|
|
5019
5019
|
}
|
|
5020
5020
|
}]), r;
|
|
5021
|
-
}(Rl),
|
|
5021
|
+
}(Rl), Ow = /* @__PURE__ */ function(o) {
|
|
5022
5022
|
Al(r, o);
|
|
5023
5023
|
var n = Il(r);
|
|
5024
5024
|
function r(a, c, e) {
|
|
@@ -5071,7 +5071,7 @@ var Rl = En.EventEmitter, xl = Cn, hl = fn, uv = ni, As = $T, cv = new xl("NonIn
|
|
|
5071
5071
|
return Ve;
|
|
5072
5072
|
}
|
|
5073
5073
|
}]), r;
|
|
5074
|
-
}(Rl),
|
|
5074
|
+
}(Rl), kw = /* @__PURE__ */ function(o) {
|
|
5075
5075
|
Al(r, o);
|
|
5076
5076
|
var n = Il(r);
|
|
5077
5077
|
function r(a, c, e) {
|
|
@@ -5150,7 +5150,7 @@ var Rl = En.EventEmitter, xl = Cn, hl = fn, uv = ni, As = $T, cv = new xl("NonIn
|
|
|
5150
5150
|
}
|
|
5151
5151
|
}]), r;
|
|
5152
5152
|
}(Rl);
|
|
5153
|
-
function
|
|
5153
|
+
function Dw(o, n) {
|
|
5154
5154
|
var r = o._transactions, a;
|
|
5155
5155
|
switch (n.method) {
|
|
5156
5156
|
case hl.INVITE:
|
|
@@ -5195,14 +5195,14 @@ function kw(o, n) {
|
|
|
5195
5195
|
}
|
|
5196
5196
|
var $l = {
|
|
5197
5197
|
C: Ve,
|
|
5198
|
-
NonInviteClientTransaction:
|
|
5199
|
-
InviteClientTransaction:
|
|
5200
|
-
AckClientTransaction:
|
|
5201
|
-
NonInviteServerTransaction:
|
|
5202
|
-
InviteServerTransaction:
|
|
5203
|
-
checkTransaction:
|
|
5198
|
+
NonInviteClientTransaction: Rw,
|
|
5199
|
+
InviteClientTransaction: xw,
|
|
5200
|
+
AckClientTransaction: $w,
|
|
5201
|
+
NonInviteServerTransaction: Ow,
|
|
5202
|
+
InviteServerTransaction: kw,
|
|
5203
|
+
checkTransaction: Dw
|
|
5204
5204
|
};
|
|
5205
|
-
function
|
|
5205
|
+
function Nw(o, n) {
|
|
5206
5206
|
if (!(o instanceof n))
|
|
5207
5207
|
throw new TypeError("Cannot call a class as a function");
|
|
5208
5208
|
}
|
|
@@ -5212,10 +5212,10 @@ function hv(o, n) {
|
|
|
5212
5212
|
a.enumerable = a.enumerable || !1, a.configurable = !0, "value" in a && (a.writable = !0), Object.defineProperty(o, a.key, a);
|
|
5213
5213
|
}
|
|
5214
5214
|
}
|
|
5215
|
-
function
|
|
5215
|
+
function Mw(o, n, r) {
|
|
5216
5216
|
return n && hv(o.prototype, n), r && hv(o, r), o;
|
|
5217
5217
|
}
|
|
5218
|
-
var
|
|
5218
|
+
var Uw = Cn, pv = fn, Pw = Sw, hd = $l, Lw = new Uw("RequestSender"), pd = {
|
|
5219
5219
|
onRequestTimeout: function() {
|
|
5220
5220
|
},
|
|
5221
5221
|
onTransportError: function() {
|
|
@@ -5226,12 +5226,12 @@ var Mw = Cn, pv = fn, Uw = ww, hd = $l, Pw = new Mw("RequestSender"), pd = {
|
|
|
5226
5226
|
}
|
|
5227
5227
|
}, Ol = /* @__PURE__ */ function() {
|
|
5228
5228
|
function o(n, r, a) {
|
|
5229
|
-
|
|
5229
|
+
Nw(this, o), this._ua = n, this._eventHandlers = a, this._method = r.method, this._request = r, this._auth = null, this._challenged = !1, this._staled = !1;
|
|
5230
5230
|
for (var c in pd)
|
|
5231
5231
|
Object.prototype.hasOwnProperty.call(pd, c) && (this._eventHandlers[c] || (this._eventHandlers[c] = pd[c]));
|
|
5232
5232
|
n.status === n.C.STATUS_USER_CLOSED && (this._method !== pv.BYE || this._method !== pv.ACK) && this._eventHandlers.onTransportError();
|
|
5233
5233
|
}
|
|
5234
|
-
return
|
|
5234
|
+
return Mw(o, [{
|
|
5235
5235
|
key: "send",
|
|
5236
5236
|
value: function() {
|
|
5237
5237
|
var n = this, r = {
|
|
@@ -5267,11 +5267,11 @@ var Mw = Cn, pv = fn, Uw = ww, hd = $l, Pw = new Mw("RequestSender"), pd = {
|
|
|
5267
5267
|
var r, a, c = n.status_code;
|
|
5268
5268
|
if ((c === 401 || c === 407) && (this._ua.configuration.password !== null || this._ua.configuration.ha1 !== null)) {
|
|
5269
5269
|
if (n.status_code === 401 ? (r = n.parseHeader("www-authenticate"), a = "authorization") : (r = n.parseHeader("proxy-authenticate"), a = "proxy-authorization"), !r) {
|
|
5270
|
-
|
|
5270
|
+
Lw.debug("".concat(n.status_code, " with wrong or missing challenge, cannot authenticate")), this._eventHandlers.onReceiveResponse(n);
|
|
5271
5271
|
return;
|
|
5272
5272
|
}
|
|
5273
5273
|
if (!this._challenged || !this._staled && r.stale === !0) {
|
|
5274
|
-
if (this._auth || (this._auth = new
|
|
5274
|
+
if (this._auth || (this._auth = new Pw({
|
|
5275
5275
|
username: this._ua.configuration.authorization_user,
|
|
5276
5276
|
password: this._ua.configuration.password,
|
|
5277
5277
|
realm: this._ua.configuration.realm,
|
|
@@ -5288,7 +5288,7 @@ var Mw = Cn, pv = fn, Uw = ww, hd = $l, Pw = new Mw("RequestSender"), pd = {
|
|
|
5288
5288
|
}
|
|
5289
5289
|
}]), o;
|
|
5290
5290
|
}();
|
|
5291
|
-
function
|
|
5291
|
+
function qw(o, n) {
|
|
5292
5292
|
if (!(o instanceof n))
|
|
5293
5293
|
throw new TypeError("Cannot call a class as a function");
|
|
5294
5294
|
}
|
|
@@ -5298,14 +5298,14 @@ function _v(o, n) {
|
|
|
5298
5298
|
a.enumerable = a.enumerable || !1, a.configurable = !0, "value" in a && (a.writable = !0), Object.defineProperty(o, a.key, a);
|
|
5299
5299
|
}
|
|
5300
5300
|
}
|
|
5301
|
-
function
|
|
5301
|
+
function Hw(o, n, r) {
|
|
5302
5302
|
return n && _v(o.prototype, n), r && _v(o, r), o;
|
|
5303
5303
|
}
|
|
5304
|
-
var
|
|
5304
|
+
var zw = Cn, _d = Yn(), $a = fn, fv = ni, mv = Ol, jo = new zw("Registrator"), Yl = 10, Fw = /* @__PURE__ */ function() {
|
|
5305
5305
|
function o(n, r) {
|
|
5306
|
-
|
|
5306
|
+
qw(this, o), this._reg_id = 1, this._ua = n, this._transport = r, this._registrar = n.configuration.registrar_server, this._expires = n.configuration.register_expires, this._call_id = _d.createRandomToken(22), this._cseq = 0, this._to_uri = n.configuration.uri, this._registrationTimer = null, this._registering = !1, this._registered = !1, this._contact = this._ua.contact.toString(), this._contact += ";+sip.ice", this._extraHeaders = [], this._extraContactParams = "", this._sipInstance = '"<urn:uuid:'.concat(this._ua.configuration.instance_id, '>"'), this._contact += ";reg-id=".concat(this._reg_id), this._contact += ";+sip.instance=".concat(this._sipInstance);
|
|
5307
5307
|
}
|
|
5308
|
-
return
|
|
5308
|
+
return Hw(o, [{
|
|
5309
5309
|
key: "setExtraHeaders",
|
|
5310
5310
|
value: function(n) {
|
|
5311
5311
|
Array.isArray(n) || (n = []), this._extraHeaders = n.slice();
|
|
@@ -5467,7 +5467,7 @@ var Hw = Cn, _d = Yn(), $a = fn, fv = ni, mv = Ol, jo = new Hw("Registrator"), Y
|
|
|
5467
5467
|
}
|
|
5468
5468
|
}]), o;
|
|
5469
5469
|
}();
|
|
5470
|
-
function
|
|
5470
|
+
function Bw(o, n) {
|
|
5471
5471
|
if (!(o instanceof n))
|
|
5472
5472
|
throw new TypeError("Cannot call a class as a function");
|
|
5473
5473
|
}
|
|
@@ -5477,10 +5477,10 @@ function gv(o, n) {
|
|
|
5477
5477
|
a.enumerable = a.enumerable || !1, a.configurable = !0, "value" in a && (a.writable = !0), Object.defineProperty(o, a.key, a);
|
|
5478
5478
|
}
|
|
5479
5479
|
}
|
|
5480
|
-
function
|
|
5480
|
+
function Vw(o, n, r) {
|
|
5481
5481
|
return n && gv(o.prototype, n), r && gv(o, r), o;
|
|
5482
5482
|
}
|
|
5483
|
-
var fd = fn, Xl = $l,
|
|
5483
|
+
var fd = fn, Xl = $l, jw = Ol, md = {
|
|
5484
5484
|
onRequestTimeout: function() {
|
|
5485
5485
|
},
|
|
5486
5486
|
onTransportError: function() {
|
|
@@ -5493,16 +5493,16 @@ var fd = fn, Xl = $l, Vw = Ol, md = {
|
|
|
5493
5493
|
},
|
|
5494
5494
|
onDialogError: function() {
|
|
5495
5495
|
}
|
|
5496
|
-
},
|
|
5496
|
+
}, Gw = /* @__PURE__ */ function() {
|
|
5497
5497
|
function o(n, r, a) {
|
|
5498
|
-
|
|
5498
|
+
Bw(this, o), this._dialog = n, this._ua = n._ua, this._request = r, this._eventHandlers = a, this._reattempt = !1, this._reattemptTimer = null;
|
|
5499
5499
|
for (var c in md)
|
|
5500
5500
|
Object.prototype.hasOwnProperty.call(md, c) && (this._eventHandlers[c] || (this._eventHandlers[c] = md[c]));
|
|
5501
5501
|
}
|
|
5502
|
-
return
|
|
5502
|
+
return Vw(o, [{
|
|
5503
5503
|
key: "send",
|
|
5504
5504
|
value: function() {
|
|
5505
|
-
var n = this, r = new
|
|
5505
|
+
var n = this, r = new jw(this._ua, this._request, {
|
|
5506
5506
|
onRequestTimeout: function() {
|
|
5507
5507
|
n._eventHandlers.onRequestTimeout();
|
|
5508
5508
|
},
|
|
@@ -5539,7 +5539,7 @@ var fd = fn, Xl = $l, Vw = Ol, md = {
|
|
|
5539
5539
|
}
|
|
5540
5540
|
}]), o;
|
|
5541
5541
|
}();
|
|
5542
|
-
function
|
|
5542
|
+
function Ww(o, n) {
|
|
5543
5543
|
if (!(o instanceof n))
|
|
5544
5544
|
throw new TypeError("Cannot call a class as a function");
|
|
5545
5545
|
}
|
|
@@ -5552,12 +5552,12 @@ function vv(o, n) {
|
|
|
5552
5552
|
function yv(o, n, r) {
|
|
5553
5553
|
return n && vv(o.prototype, n), r && vv(o, r), o;
|
|
5554
5554
|
}
|
|
5555
|
-
var
|
|
5555
|
+
var Kw = Cn, Tv = ni, Zi = fn, Go = $l, Yw = Gw, gd = Yn(), vd = new Kw("Dialog"), ea = {
|
|
5556
5556
|
// Dialog states.
|
|
5557
5557
|
STATUS_EARLY: 1,
|
|
5558
5558
|
STATUS_CONFIRMED: 2,
|
|
5559
5559
|
STATUS_TERMINATED: 3
|
|
5560
|
-
},
|
|
5560
|
+
}, Xw = /* @__PURE__ */ function() {
|
|
5561
5561
|
yv(o, null, [{
|
|
5562
5562
|
key: "C",
|
|
5563
5563
|
// Expose C object.
|
|
@@ -5567,7 +5567,7 @@ var Ww = Cn, Tv = ni, Zi = fn, Go = $l, Kw = jw, gd = Yn(), vd = new Ww("Dialog"
|
|
|
5567
5567
|
}]);
|
|
5568
5568
|
function o(n, r, a) {
|
|
5569
5569
|
var c = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : ea.STATUS_CONFIRMED;
|
|
5570
|
-
if (
|
|
5570
|
+
if (Ww(this, o), this._owner = n, this._ua = n._ua, this._uac_pending_reply = !1, this._uas_pending_reply = !1, !r.hasHeader("contact"))
|
|
5571
5571
|
return {
|
|
5572
5572
|
error: "unable to create a Dialog without Contact header field"
|
|
5573
5573
|
};
|
|
@@ -5611,7 +5611,7 @@ var Ww = Cn, Tv = ni, Zi = fn, Go = $l, Kw = jw, gd = Yn(), vd = new Ww("Dialog"
|
|
|
5611
5611
|
e.onAuthenticated = function() {
|
|
5612
5612
|
r._local_seqnum += 1;
|
|
5613
5613
|
};
|
|
5614
|
-
var d = new
|
|
5614
|
+
var d = new Yw(this, g, e);
|
|
5615
5615
|
return d.send(), g;
|
|
5616
5616
|
}
|
|
5617
5617
|
}, {
|
|
@@ -5713,7 +5713,7 @@ function Ou(o) {
|
|
|
5713
5713
|
return n && typeof Symbol == "function" && n.constructor === Symbol && n !== Symbol.prototype ? "symbol" : typeof n;
|
|
5714
5714
|
}, Ou(o);
|
|
5715
5715
|
}
|
|
5716
|
-
function
|
|
5716
|
+
function Jw(o, n) {
|
|
5717
5717
|
if (!(o instanceof n))
|
|
5718
5718
|
throw new TypeError("Cannot call a class as a function");
|
|
5719
5719
|
}
|
|
@@ -5723,10 +5723,10 @@ function bv(o, n) {
|
|
|
5723
5723
|
a.enumerable = a.enumerable || !1, a.configurable = !0, "value" in a && (a.writable = !0), Object.defineProperty(o, a.key, a);
|
|
5724
5724
|
}
|
|
5725
5725
|
}
|
|
5726
|
-
function
|
|
5726
|
+
function Qw(o, n, r) {
|
|
5727
5727
|
return n && bv(o.prototype, n), r && bv(o, r), o;
|
|
5728
5728
|
}
|
|
5729
|
-
function
|
|
5729
|
+
function Zw(o, n) {
|
|
5730
5730
|
if (typeof n != "function" && n !== null)
|
|
5731
5731
|
throw new TypeError("Super expression must either be null or a function");
|
|
5732
5732
|
o.prototype = Object.create(n && n.prototype, { constructor: { value: o, writable: !0, configurable: !0 } }), n && lh(o, n);
|
|
@@ -5736,8 +5736,8 @@ function lh(o, n) {
|
|
|
5736
5736
|
return r.__proto__ = a, r;
|
|
5737
5737
|
}, lh(o, n);
|
|
5738
5738
|
}
|
|
5739
|
-
function
|
|
5740
|
-
var n =
|
|
5739
|
+
function eS(o) {
|
|
5740
|
+
var n = rS();
|
|
5741
5741
|
return function() {
|
|
5742
5742
|
var r = Vu(o), a;
|
|
5743
5743
|
if (n) {
|
|
@@ -5745,18 +5745,18 @@ function Zw(o) {
|
|
|
5745
5745
|
a = Reflect.construct(r, arguments, c);
|
|
5746
5746
|
} else
|
|
5747
5747
|
a = r.apply(this, arguments);
|
|
5748
|
-
return
|
|
5748
|
+
return tS(this, a);
|
|
5749
5749
|
};
|
|
5750
5750
|
}
|
|
5751
|
-
function
|
|
5752
|
-
return n && (Ou(n) === "object" || typeof n == "function") ? n :
|
|
5751
|
+
function tS(o, n) {
|
|
5752
|
+
return n && (Ou(n) === "object" || typeof n == "function") ? n : nS(o);
|
|
5753
5753
|
}
|
|
5754
|
-
function
|
|
5754
|
+
function nS(o) {
|
|
5755
5755
|
if (o === void 0)
|
|
5756
5756
|
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
5757
5757
|
return o;
|
|
5758
5758
|
}
|
|
5759
|
-
function
|
|
5759
|
+
function rS() {
|
|
5760
5760
|
if (typeof Reflect > "u" || !Reflect.construct || Reflect.construct.sham)
|
|
5761
5761
|
return !1;
|
|
5762
5762
|
if (typeof Proxy == "function")
|
|
@@ -5773,7 +5773,7 @@ function Vu(o) {
|
|
|
5773
5773
|
return n.__proto__ || Object.getPrototypeOf(n);
|
|
5774
5774
|
}, Vu(o);
|
|
5775
5775
|
}
|
|
5776
|
-
var
|
|
5776
|
+
var sS = En.EventEmitter, iS = Cn, aS = fn, oS = ua, wv = Yn(), lS = new iS("RTCSession:DTMF"), kT = {
|
|
5777
5777
|
MIN_DURATION: 70,
|
|
5778
5778
|
MAX_DURATION: 6e3,
|
|
5779
5779
|
DEFAULT_DURATION: 100,
|
|
@@ -5781,20 +5781,20 @@ var rS = En.EventEmitter, sS = Cn, iS = fn, aS = ua, wv = Yn(), oS = new sS("RTC
|
|
|
5781
5781
|
DEFAULT_INTER_TONE_GAP: 500
|
|
5782
5782
|
};
|
|
5783
5783
|
$h.exports = /* @__PURE__ */ function(o) {
|
|
5784
|
-
|
|
5785
|
-
var n =
|
|
5784
|
+
Zw(r, o);
|
|
5785
|
+
var n = eS(r);
|
|
5786
5786
|
function r(a) {
|
|
5787
5787
|
var c;
|
|
5788
|
-
return
|
|
5788
|
+
return Jw(this, r), c = n.call(this), c._session = a, c._direction = null, c._tone = null, c._duration = null, c._request = null, c;
|
|
5789
5789
|
}
|
|
5790
|
-
return
|
|
5790
|
+
return Qw(r, [{
|
|
5791
5791
|
key: "send",
|
|
5792
5792
|
value: function(a) {
|
|
5793
5793
|
var c = this, e = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
|
|
5794
5794
|
if (a === void 0)
|
|
5795
5795
|
throw new TypeError("Not enough arguments");
|
|
5796
5796
|
if (this._direction = "outgoing", this._session.status !== this._session.C.STATUS_CONFIRMED && this._session.status !== this._session.C.STATUS_WAITING_FOR_ACK)
|
|
5797
|
-
throw new
|
|
5797
|
+
throw new oS.InvalidStateError(this._session.status);
|
|
5798
5798
|
var _ = wv.cloneArray(e.extraHeaders);
|
|
5799
5799
|
if (this.eventHandlers = wv.cloneObject(e.eventHandlers), typeof a == "string")
|
|
5800
5800
|
a = a.toUpperCase();
|
|
@@ -5813,7 +5813,7 @@ $h.exports = /* @__PURE__ */ function(o) {
|
|
|
5813
5813
|
originator: "local",
|
|
5814
5814
|
dtmf: this,
|
|
5815
5815
|
request: this._request
|
|
5816
|
-
}), this._session.sendRequest(
|
|
5816
|
+
}), this._session.sendRequest(aS.INFO, {
|
|
5817
5817
|
extraHeaders: _,
|
|
5818
5818
|
eventHandlers: {
|
|
5819
5819
|
onSuccessResponse: function(d) {
|
|
@@ -5850,11 +5850,11 @@ $h.exports = /* @__PURE__ */ function(o) {
|
|
|
5850
5850
|
`);
|
|
5851
5851
|
_.length >= 1 && c.test(_[0]) && (this._tone = _[0].replace(c, "$2")), _.length >= 2 && e.test(_[1]) && (this._duration = parseInt(_[1].replace(e, "$2"), 10));
|
|
5852
5852
|
}
|
|
5853
|
-
this._duration || (this._duration =
|
|
5853
|
+
this._duration || (this._duration = kT.DEFAULT_DURATION), this._tone ? this._session.newDTMF({
|
|
5854
5854
|
originator: "remote",
|
|
5855
5855
|
dtmf: this,
|
|
5856
5856
|
request: a
|
|
5857
|
-
}) :
|
|
5857
|
+
}) : lS.debug("invalid INFO DTMF received, discarded");
|
|
5858
5858
|
}
|
|
5859
5859
|
}, {
|
|
5860
5860
|
key: "tone",
|
|
@@ -5867,9 +5867,9 @@ $h.exports = /* @__PURE__ */ function(o) {
|
|
|
5867
5867
|
return this._duration;
|
|
5868
5868
|
}
|
|
5869
5869
|
}]), r;
|
|
5870
|
-
}(
|
|
5871
|
-
$h.exports.C =
|
|
5872
|
-
var
|
|
5870
|
+
}(sS);
|
|
5871
|
+
$h.exports.C = kT;
|
|
5872
|
+
var uS = $h.exports;
|
|
5873
5873
|
function ku(o) {
|
|
5874
5874
|
"@babel/helpers - typeof";
|
|
5875
5875
|
return typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? ku = function(n) {
|
|
@@ -5878,7 +5878,7 @@ function ku(o) {
|
|
|
5878
5878
|
return n && typeof Symbol == "function" && n.constructor === Symbol && n !== Symbol.prototype ? "symbol" : typeof n;
|
|
5879
5879
|
}, ku(o);
|
|
5880
5880
|
}
|
|
5881
|
-
function
|
|
5881
|
+
function cS(o, n) {
|
|
5882
5882
|
if (!(o instanceof n))
|
|
5883
5883
|
throw new TypeError("Cannot call a class as a function");
|
|
5884
5884
|
}
|
|
@@ -5888,10 +5888,10 @@ function Sv(o, n) {
|
|
|
5888
5888
|
a.enumerable = a.enumerable || !1, a.configurable = !0, "value" in a && (a.writable = !0), Object.defineProperty(o, a.key, a);
|
|
5889
5889
|
}
|
|
5890
5890
|
}
|
|
5891
|
-
function
|
|
5891
|
+
function dS(o, n, r) {
|
|
5892
5892
|
return n && Sv(o.prototype, n), r && Sv(o, r), o;
|
|
5893
5893
|
}
|
|
5894
|
-
function
|
|
5894
|
+
function hS(o, n) {
|
|
5895
5895
|
if (typeof n != "function" && n !== null)
|
|
5896
5896
|
throw new TypeError("Super expression must either be null or a function");
|
|
5897
5897
|
o.prototype = Object.create(n && n.prototype, { constructor: { value: o, writable: !0, configurable: !0 } }), n && uh(o, n);
|
|
@@ -5901,8 +5901,8 @@ function uh(o, n) {
|
|
|
5901
5901
|
return r.__proto__ = a, r;
|
|
5902
5902
|
}, uh(o, n);
|
|
5903
5903
|
}
|
|
5904
|
-
function
|
|
5905
|
-
var n =
|
|
5904
|
+
function pS(o) {
|
|
5905
|
+
var n = mS();
|
|
5906
5906
|
return function() {
|
|
5907
5907
|
var r = ju(o), a;
|
|
5908
5908
|
if (n) {
|
|
@@ -5910,18 +5910,18 @@ function hS(o) {
|
|
|
5910
5910
|
a = Reflect.construct(r, arguments, c);
|
|
5911
5911
|
} else
|
|
5912
5912
|
a = r.apply(this, arguments);
|
|
5913
|
-
return
|
|
5913
|
+
return _S(this, a);
|
|
5914
5914
|
};
|
|
5915
5915
|
}
|
|
5916
|
-
function
|
|
5917
|
-
return n && (ku(n) === "object" || typeof n == "function") ? n :
|
|
5916
|
+
function _S(o, n) {
|
|
5917
|
+
return n && (ku(n) === "object" || typeof n == "function") ? n : fS(o);
|
|
5918
5918
|
}
|
|
5919
|
-
function
|
|
5919
|
+
function fS(o) {
|
|
5920
5920
|
if (o === void 0)
|
|
5921
5921
|
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
5922
5922
|
return o;
|
|
5923
5923
|
}
|
|
5924
|
-
function
|
|
5924
|
+
function mS() {
|
|
5925
5925
|
if (typeof Reflect > "u" || !Reflect.construct || Reflect.construct.sham)
|
|
5926
5926
|
return !1;
|
|
5927
5927
|
if (typeof Proxy == "function")
|
|
@@ -5938,28 +5938,28 @@ function ju(o) {
|
|
|
5938
5938
|
return n.__proto__ || Object.getPrototypeOf(n);
|
|
5939
5939
|
}, ju(o);
|
|
5940
5940
|
}
|
|
5941
|
-
var
|
|
5942
|
-
|
|
5943
|
-
var n =
|
|
5941
|
+
var gS = En.EventEmitter, vS = fn, yS = ua, TS = Yn(), bS = /* @__PURE__ */ function(o) {
|
|
5942
|
+
hS(r, o);
|
|
5943
|
+
var n = pS(r);
|
|
5944
5944
|
function r(a) {
|
|
5945
5945
|
var c;
|
|
5946
|
-
return
|
|
5946
|
+
return cS(this, r), c = n.call(this), c._session = a, c._direction = null, c._contentType = null, c._body = null, c;
|
|
5947
5947
|
}
|
|
5948
|
-
return
|
|
5948
|
+
return dS(r, [{
|
|
5949
5949
|
key: "send",
|
|
5950
5950
|
value: function(a, c) {
|
|
5951
5951
|
var e = this, _ = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {};
|
|
5952
5952
|
if (this._direction = "outgoing", a === void 0)
|
|
5953
5953
|
throw new TypeError("Not enough arguments");
|
|
5954
5954
|
if (this._session.status !== this._session.C.STATUS_CONFIRMED && this._session.status !== this._session.C.STATUS_WAITING_FOR_ACK)
|
|
5955
|
-
throw new
|
|
5955
|
+
throw new yS.InvalidStateError(this._session.status);
|
|
5956
5956
|
this._contentType = a, this._body = c;
|
|
5957
|
-
var g =
|
|
5957
|
+
var g = TS.cloneArray(_.extraHeaders);
|
|
5958
5958
|
g.push("Content-Type: ".concat(a)), this._session.newInfo({
|
|
5959
5959
|
originator: "local",
|
|
5960
5960
|
info: this,
|
|
5961
5961
|
request: this.request
|
|
5962
|
-
}), this._session.sendRequest(
|
|
5962
|
+
}), this._session.sendRequest(vS.INFO, {
|
|
5963
5963
|
extraHeaders: g,
|
|
5964
5964
|
eventHandlers: {
|
|
5965
5965
|
onSuccessResponse: function(d) {
|
|
@@ -6007,8 +6007,8 @@ var mS = En.EventEmitter, gS = fn, vS = ua, yS = Yn(), TS = /* @__PURE__ */ func
|
|
|
6007
6007
|
return this._body;
|
|
6008
6008
|
}
|
|
6009
6009
|
}]), r;
|
|
6010
|
-
}(
|
|
6011
|
-
function
|
|
6010
|
+
}(gS);
|
|
6011
|
+
function wS(o, n) {
|
|
6012
6012
|
if (!(o instanceof n))
|
|
6013
6013
|
throw new TypeError("Cannot call a class as a function");
|
|
6014
6014
|
}
|
|
@@ -6018,21 +6018,21 @@ function Ev(o, n) {
|
|
|
6018
6018
|
a.enumerable = a.enumerable || !1, a.configurable = !0, "value" in a && (a.writable = !0), Object.defineProperty(o, a.key, a);
|
|
6019
6019
|
}
|
|
6020
6020
|
}
|
|
6021
|
-
function
|
|
6021
|
+
function SS(o, n, r) {
|
|
6022
6022
|
return n && Ev(o.prototype, n), r && Ev(o, r), o;
|
|
6023
6023
|
}
|
|
6024
|
-
var
|
|
6024
|
+
var ES = Cn, Cv = fn, CS = new ES("RTCSession:ReferNotifier"), yd = {
|
|
6025
6025
|
event_type: "refer",
|
|
6026
6026
|
body_type: "message/sipfrag;version=2.0",
|
|
6027
6027
|
expires: 300
|
|
6028
|
-
},
|
|
6028
|
+
}, AS = /* @__PURE__ */ function() {
|
|
6029
6029
|
function o(n, r, a) {
|
|
6030
|
-
|
|
6030
|
+
wS(this, o), this._session = n, this._id = r, this._expires = a || yd.expires, this._active = !0, this.notify(100);
|
|
6031
6031
|
}
|
|
6032
|
-
return
|
|
6032
|
+
return SS(o, [{
|
|
6033
6033
|
key: "notify",
|
|
6034
6034
|
value: function(n, r) {
|
|
6035
|
-
if (
|
|
6035
|
+
if (CS.debug("notify()"), this._active !== !1) {
|
|
6036
6036
|
r = r || Cv.REASON_PHRASE[n] || "";
|
|
6037
6037
|
var a;
|
|
6038
6038
|
n >= 200 ? a = "terminated;reason=noresource" : a = "active;expires=".concat(this._expires), this._session.sendRequest(Cv.NOTIFY, {
|
|
@@ -6057,7 +6057,7 @@ function Du(o) {
|
|
|
6057
6057
|
return n && typeof Symbol == "function" && n.constructor === Symbol && n !== Symbol.prototype ? "symbol" : typeof n;
|
|
6058
6058
|
}, Du(o);
|
|
6059
6059
|
}
|
|
6060
|
-
function
|
|
6060
|
+
function IS(o, n) {
|
|
6061
6061
|
if (!(o instanceof n))
|
|
6062
6062
|
throw new TypeError("Cannot call a class as a function");
|
|
6063
6063
|
}
|
|
@@ -6067,10 +6067,10 @@ function Av(o, n) {
|
|
|
6067
6067
|
a.enumerable = a.enumerable || !1, a.configurable = !0, "value" in a && (a.writable = !0), Object.defineProperty(o, a.key, a);
|
|
6068
6068
|
}
|
|
6069
6069
|
}
|
|
6070
|
-
function
|
|
6070
|
+
function RS(o, n, r) {
|
|
6071
6071
|
return n && Av(o.prototype, n), r && Av(o, r), o;
|
|
6072
6072
|
}
|
|
6073
|
-
function
|
|
6073
|
+
function xS(o, n) {
|
|
6074
6074
|
if (typeof n != "function" && n !== null)
|
|
6075
6075
|
throw new TypeError("Super expression must either be null or a function");
|
|
6076
6076
|
o.prototype = Object.create(n && n.prototype, { constructor: { value: o, writable: !0, configurable: !0 } }), n && ch(o, n);
|
|
@@ -6080,8 +6080,8 @@ function ch(o, n) {
|
|
|
6080
6080
|
return r.__proto__ = a, r;
|
|
6081
6081
|
}, ch(o, n);
|
|
6082
6082
|
}
|
|
6083
|
-
function
|
|
6084
|
-
var n =
|
|
6083
|
+
function $S(o) {
|
|
6084
|
+
var n = DS();
|
|
6085
6085
|
return function() {
|
|
6086
6086
|
var r = Gu(o), a;
|
|
6087
6087
|
if (n) {
|
|
@@ -6089,18 +6089,18 @@ function xS(o) {
|
|
|
6089
6089
|
a = Reflect.construct(r, arguments, c);
|
|
6090
6090
|
} else
|
|
6091
6091
|
a = r.apply(this, arguments);
|
|
6092
|
-
return
|
|
6092
|
+
return OS(this, a);
|
|
6093
6093
|
};
|
|
6094
6094
|
}
|
|
6095
|
-
function
|
|
6096
|
-
return n && (Du(n) === "object" || typeof n == "function") ? n :
|
|
6095
|
+
function OS(o, n) {
|
|
6096
|
+
return n && (Du(n) === "object" || typeof n == "function") ? n : kS(o);
|
|
6097
6097
|
}
|
|
6098
|
-
function
|
|
6098
|
+
function kS(o) {
|
|
6099
6099
|
if (o === void 0)
|
|
6100
6100
|
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
6101
6101
|
return o;
|
|
6102
6102
|
}
|
|
6103
|
-
function
|
|
6103
|
+
function DS() {
|
|
6104
6104
|
if (typeof Reflect > "u" || !Reflect.construct || Reflect.construct.sham)
|
|
6105
6105
|
return !1;
|
|
6106
6106
|
if (typeof Proxy == "function")
|
|
@@ -6117,14 +6117,14 @@ function Gu(o) {
|
|
|
6117
6117
|
return n.__proto__ || Object.getPrototypeOf(n);
|
|
6118
6118
|
}, Gu(o);
|
|
6119
6119
|
}
|
|
6120
|
-
var
|
|
6121
|
-
|
|
6122
|
-
var n =
|
|
6120
|
+
var NS = En.EventEmitter, MS = Cn, Wo = fn, US = xs(), Iv = Yn(), Oa = new MS("RTCSession:ReferSubscriber"), PS = /* @__PURE__ */ function(o) {
|
|
6121
|
+
xS(r, o);
|
|
6122
|
+
var n = $S(r);
|
|
6123
6123
|
function r(a) {
|
|
6124
6124
|
var c;
|
|
6125
|
-
return
|
|
6125
|
+
return IS(this, r), c = n.call(this), c._id = null, c._session = a, c;
|
|
6126
6126
|
}
|
|
6127
|
-
return
|
|
6127
|
+
return RS(r, [{
|
|
6128
6128
|
key: "sendRefer",
|
|
6129
6129
|
value: function(a) {
|
|
6130
6130
|
var c = this, e = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
|
|
@@ -6168,7 +6168,7 @@ var DS = En.EventEmitter, NS = Cn, Wo = fn, MS = xs(), Iv = Yn(), Oa = new NS("R
|
|
|
6168
6168
|
key: "receiveNotify",
|
|
6169
6169
|
value: function(a) {
|
|
6170
6170
|
if (Oa.debug("receiveNotify()"), !!a.body) {
|
|
6171
|
-
var c =
|
|
6171
|
+
var c = US.parse(a.body.trim().split(`\r
|
|
6172
6172
|
`, 1)[0], "Status_Line");
|
|
6173
6173
|
if (c === -1) {
|
|
6174
6174
|
Oa.debug('receiveNotify() | error parsing NOTIFY body: "'.concat(a.body, '"'));
|
|
@@ -6223,7 +6223,7 @@ var DS = En.EventEmitter, NS = Cn, Wo = fn, MS = xs(), Iv = Yn(), Oa = new NS("R
|
|
|
6223
6223
|
return this._id;
|
|
6224
6224
|
}
|
|
6225
6225
|
}]), r;
|
|
6226
|
-
}(
|
|
6226
|
+
}(NS);
|
|
6227
6227
|
function Nu(o) {
|
|
6228
6228
|
"@babel/helpers - typeof";
|
|
6229
6229
|
return typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? Nu = function(n) {
|
|
@@ -6235,7 +6235,7 @@ function Nu(o) {
|
|
|
6235
6235
|
function Ys(o, n) {
|
|
6236
6236
|
var r;
|
|
6237
6237
|
if (typeof Symbol > "u" || o[Symbol.iterator] == null) {
|
|
6238
|
-
if (Array.isArray(o) || (r =
|
|
6238
|
+
if (Array.isArray(o) || (r = LS(o)) || n && o && typeof o.length == "number") {
|
|
6239
6239
|
r && (o = r);
|
|
6240
6240
|
var a = 0, c = function() {
|
|
6241
6241
|
};
|
|
@@ -6265,7 +6265,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
6265
6265
|
}
|
|
6266
6266
|
} };
|
|
6267
6267
|
}
|
|
6268
|
-
function
|
|
6268
|
+
function LS(o, n) {
|
|
6269
6269
|
if (o) {
|
|
6270
6270
|
if (typeof o == "string")
|
|
6271
6271
|
return Rv(o, n);
|
|
@@ -6282,7 +6282,7 @@ function Rv(o, n) {
|
|
|
6282
6282
|
a[r] = o[r];
|
|
6283
6283
|
return a;
|
|
6284
6284
|
}
|
|
6285
|
-
function
|
|
6285
|
+
function qS(o, n) {
|
|
6286
6286
|
if (!(o instanceof n))
|
|
6287
6287
|
throw new TypeError("Cannot call a class as a function");
|
|
6288
6288
|
}
|
|
@@ -6295,7 +6295,7 @@ function xv(o, n) {
|
|
|
6295
6295
|
function $v(o, n, r) {
|
|
6296
6296
|
return n && xv(o.prototype, n), r && xv(o, r), o;
|
|
6297
6297
|
}
|
|
6298
|
-
function
|
|
6298
|
+
function HS(o, n) {
|
|
6299
6299
|
if (typeof n != "function" && n !== null)
|
|
6300
6300
|
throw new TypeError("Super expression must either be null or a function");
|
|
6301
6301
|
o.prototype = Object.create(n && n.prototype, { constructor: { value: o, writable: !0, configurable: !0 } }), n && dh(o, n);
|
|
@@ -6305,8 +6305,8 @@ function dh(o, n) {
|
|
|
6305
6305
|
return r.__proto__ = a, r;
|
|
6306
6306
|
}, dh(o, n);
|
|
6307
6307
|
}
|
|
6308
|
-
function
|
|
6309
|
-
var n =
|
|
6308
|
+
function zS(o) {
|
|
6309
|
+
var n = VS();
|
|
6310
6310
|
return function() {
|
|
6311
6311
|
var r = Wu(o), a;
|
|
6312
6312
|
if (n) {
|
|
@@ -6314,18 +6314,18 @@ function HS(o) {
|
|
|
6314
6314
|
a = Reflect.construct(r, arguments, c);
|
|
6315
6315
|
} else
|
|
6316
6316
|
a = r.apply(this, arguments);
|
|
6317
|
-
return
|
|
6317
|
+
return FS(this, a);
|
|
6318
6318
|
};
|
|
6319
6319
|
}
|
|
6320
|
-
function
|
|
6321
|
-
return n && (Nu(n) === "object" || typeof n == "function") ? n :
|
|
6320
|
+
function FS(o, n) {
|
|
6321
|
+
return n && (Nu(n) === "object" || typeof n == "function") ? n : BS(o);
|
|
6322
6322
|
}
|
|
6323
|
-
function
|
|
6323
|
+
function BS(o) {
|
|
6324
6324
|
if (o === void 0)
|
|
6325
6325
|
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
6326
6326
|
return o;
|
|
6327
6327
|
}
|
|
6328
|
-
function
|
|
6328
|
+
function VS() {
|
|
6329
6329
|
if (typeof Reflect > "u" || !Reflect.construct || Reflect.construct.sham)
|
|
6330
6330
|
return !1;
|
|
6331
6331
|
if (typeof Proxy == "function")
|
|
@@ -6342,7 +6342,7 @@ function Wu(o) {
|
|
|
6342
6342
|
return n.__proto__ || Object.getPrototypeOf(n);
|
|
6343
6343
|
}, Wu(o);
|
|
6344
6344
|
}
|
|
6345
|
-
var
|
|
6345
|
+
var jS = En.EventEmitter, Ov = pr, GS = Cn, Fe = fn, ka = ua, kv = $l, Xt = Yn(), Ko = OT, WS = ni, Jl = Xw, KS = Ol, Sr = uS, Dv = bS, YS = AS, XS = PS, Nv = ca(), be = new GS("RTCSession"), Re = {
|
|
6346
6346
|
// RTCSession states.
|
|
6347
6347
|
STATUS_NULL: 0,
|
|
6348
6348
|
STATUS_INVITE_SENT: 1,
|
|
@@ -6354,9 +6354,9 @@ var VS = En.EventEmitter, Ov = pr, jS = Cn, Fe = fn, ka = ua, kv = $l, Xt = Yn()
|
|
|
6354
6354
|
STATUS_CANCELED: 7,
|
|
6355
6355
|
STATUS_TERMINATED: 8,
|
|
6356
6356
|
STATUS_CONFIRMED: 9
|
|
6357
|
-
}, Ql = ["audio", "video"],
|
|
6358
|
-
|
|
6359
|
-
var n =
|
|
6357
|
+
}, Ql = ["audio", "video"], JS = /* @__PURE__ */ function(o) {
|
|
6358
|
+
HS(r, o);
|
|
6359
|
+
var n = zS(r);
|
|
6360
6360
|
$v(r, null, [{
|
|
6361
6361
|
key: "C",
|
|
6362
6362
|
/**
|
|
@@ -6368,7 +6368,7 @@ var VS = En.EventEmitter, Ov = pr, jS = Cn, Fe = fn, ka = ua, kv = $l, Xt = Yn()
|
|
|
6368
6368
|
}]);
|
|
6369
6369
|
function r(a) {
|
|
6370
6370
|
var c;
|
|
6371
|
-
return
|
|
6371
|
+
return qS(this, r), be.debug("new"), c = n.call(this), c._id = null, c._ua = a, c._status = Re.STATUS_NULL, c._dialog = null, c._earlyDialogs = {}, c._contact = null, c._from_tag = null, c._to_tag = null, c._connection = null, c._connectionPromiseQueue = Promise.resolve(), c._request = null, c._is_canceled = !1, c._cancel_reason = "", c._is_confirmed = !1, c._late_sdp = !1, c._rtcOfferConstraints = null, c._rtcAnswerConstraints = null, c._localMediaStream = null, c._localMediaStreamLocallyGenerated = !1, c._rtcReady = !0, c._iceReady = !1, c._timers = {
|
|
6372
6372
|
ackTimer: null,
|
|
6373
6373
|
expiresTimer: null,
|
|
6374
6374
|
invite2xxTimer: null,
|
|
@@ -6466,7 +6466,7 @@ var VS = En.EventEmitter, Ov = pr, jS = Cn, Fe = fn, ka = ua, kv = $l, Xt = Yn()
|
|
|
6466
6466
|
this._contact = this._ua.contact.toString({
|
|
6467
6467
|
anonymous: G,
|
|
6468
6468
|
outbound: !0
|
|
6469
|
-
}), G ? (K.from_display_name = "Anonymous", K.from_uri = new Nv("sip", "anonymous", "anonymous.invalid"), d.push("P-Preferred-Identity: ".concat(this._ua.configuration.uri.toString())), d.push("Privacy: id")) : c.fromUserName && (K.from_uri = new Nv("sip", c.fromUserName, this._ua.configuration.uri.host), d.push("P-Preferred-Identity: ".concat(this._ua.configuration.uri.toString()))), c.fromDisplayName && (K.from_display_name = c.fromDisplayName), d.push("Contact: ".concat(this._contact)), d.push("Content-Type: application/sdp"), this._sessionTimers.enabled && d.push("Session-Expires: ".concat(this._sessionTimers.defaultExpires).concat(this._ua.configuration.session_timers_force_refresher ? ";refresher=uac" : "")), this._request = new
|
|
6469
|
+
}), G ? (K.from_display_name = "Anonymous", K.from_uri = new Nv("sip", "anonymous", "anonymous.invalid"), d.push("P-Preferred-Identity: ".concat(this._ua.configuration.uri.toString())), d.push("Privacy: id")) : c.fromUserName && (K.from_uri = new Nv("sip", c.fromUserName, this._ua.configuration.uri.host), d.push("P-Preferred-Identity: ".concat(this._ua.configuration.uri.toString()))), c.fromDisplayName && (K.from_display_name = c.fromDisplayName), d.push("Contact: ".concat(this._contact)), d.push("Content-Type: application/sdp"), this._sessionTimers.enabled && d.push("Session-Expires: ".concat(this._sessionTimers.defaultExpires).concat(this._ua.configuration.session_timers_force_refresher ? ";refresher=uac" : "")), this._request = new WS.InitialOutgoingInviteRequest(a, this._ua, K, d), this._id = this._request.call_id + this._from_tag, this._createRTCConnection(R, k), this._direction = "outgoing", this._local_identity = this._request.from, this._remote_identity = this._request.to, e && e(this), this._newRTCSession("local", this._request), this._sendInitialRequest(C, L, S);
|
|
6470
6470
|
}
|
|
6471
6471
|
}, {
|
|
6472
6472
|
key: "init_incoming",
|
|
@@ -6844,7 +6844,7 @@ var VS = En.EventEmitter, Ov = pr, jS = Cn, Fe = fn, ka = ua, kv = $l, Xt = Yn()
|
|
|
6844
6844
|
return !1;
|
|
6845
6845
|
if (a = this._ua.normalizeTarget(a), !a)
|
|
6846
6846
|
throw new TypeError("Invalid target: ".concat(_));
|
|
6847
|
-
var g = new
|
|
6847
|
+
var g = new XS(this);
|
|
6848
6848
|
g.sendRefer(a, c);
|
|
6849
6849
|
var d = g.id;
|
|
6850
6850
|
return this._referSubscribers[d] = g, g.on("requestFailed", function() {
|
|
@@ -7279,7 +7279,7 @@ var VS = En.EventEmitter, Ov = pr, jS = Cn, Fe = fn, ka = ua, kv = $l, Xt = Yn()
|
|
|
7279
7279
|
return;
|
|
7280
7280
|
}
|
|
7281
7281
|
a.reply(202);
|
|
7282
|
-
var e = new
|
|
7282
|
+
var e = new YS(this, a.cseq);
|
|
7283
7283
|
be.debug('emit "refer"'), this.emit("refer", {
|
|
7284
7284
|
request: a,
|
|
7285
7285
|
accept: function(d, C) {
|
|
@@ -7377,7 +7377,7 @@ var VS = En.EventEmitter, Ov = pr, jS = Cn, Fe = fn, ka = ua, kv = $l, Xt = Yn()
|
|
|
7377
7377
|
}, {
|
|
7378
7378
|
key: "_sendInitialRequest",
|
|
7379
7379
|
value: function(a, c, e) {
|
|
7380
|
-
var _ = this, g = new
|
|
7380
|
+
var _ = this, g = new KS(this._ua, this._request, {
|
|
7381
7381
|
onRequestTimeout: function() {
|
|
7382
7382
|
_.onRequestTimeout();
|
|
7383
7383
|
},
|
|
@@ -8002,7 +8002,7 @@ var VS = En.EventEmitter, Ov = pr, jS = Cn, Fe = fn, ka = ua, kv = $l, Xt = Yn()
|
|
|
8002
8002
|
return this._status;
|
|
8003
8003
|
}
|
|
8004
8004
|
}]), r;
|
|
8005
|
-
}(
|
|
8005
|
+
}(jS);
|
|
8006
8006
|
function Mu(o) {
|
|
8007
8007
|
"@babel/helpers - typeof";
|
|
8008
8008
|
return typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? Mu = function(n) {
|
|
@@ -8011,7 +8011,7 @@ function Mu(o) {
|
|
|
8011
8011
|
return n && typeof Symbol == "function" && n.constructor === Symbol && n !== Symbol.prototype ? "symbol" : typeof n;
|
|
8012
8012
|
}, Mu(o);
|
|
8013
8013
|
}
|
|
8014
|
-
function
|
|
8014
|
+
function QS(o, n) {
|
|
8015
8015
|
if (!(o instanceof n))
|
|
8016
8016
|
throw new TypeError("Cannot call a class as a function");
|
|
8017
8017
|
}
|
|
@@ -8021,10 +8021,10 @@ function Mv(o, n) {
|
|
|
8021
8021
|
a.enumerable = a.enumerable || !1, a.configurable = !0, "value" in a && (a.writable = !0), Object.defineProperty(o, a.key, a);
|
|
8022
8022
|
}
|
|
8023
8023
|
}
|
|
8024
|
-
function
|
|
8024
|
+
function ZS(o, n, r) {
|
|
8025
8025
|
return n && Mv(o.prototype, n), r && Mv(o, r), o;
|
|
8026
8026
|
}
|
|
8027
|
-
function
|
|
8027
|
+
function eE(o, n) {
|
|
8028
8028
|
if (typeof n != "function" && n !== null)
|
|
8029
8029
|
throw new TypeError("Super expression must either be null or a function");
|
|
8030
8030
|
o.prototype = Object.create(n && n.prototype, { constructor: { value: o, writable: !0, configurable: !0 } }), n && hh(o, n);
|
|
@@ -8034,8 +8034,8 @@ function hh(o, n) {
|
|
|
8034
8034
|
return r.__proto__ = a, r;
|
|
8035
8035
|
}, hh(o, n);
|
|
8036
8036
|
}
|
|
8037
|
-
function
|
|
8038
|
-
var n =
|
|
8037
|
+
function tE(o) {
|
|
8038
|
+
var n = sE();
|
|
8039
8039
|
return function() {
|
|
8040
8040
|
var r = Ku(o), a;
|
|
8041
8041
|
if (n) {
|
|
@@ -8043,18 +8043,18 @@ function eE(o) {
|
|
|
8043
8043
|
a = Reflect.construct(r, arguments, c);
|
|
8044
8044
|
} else
|
|
8045
8045
|
a = r.apply(this, arguments);
|
|
8046
|
-
return
|
|
8046
|
+
return nE(this, a);
|
|
8047
8047
|
};
|
|
8048
8048
|
}
|
|
8049
|
-
function
|
|
8050
|
-
return n && (Mu(n) === "object" || typeof n == "function") ? n :
|
|
8049
|
+
function nE(o, n) {
|
|
8050
|
+
return n && (Mu(n) === "object" || typeof n == "function") ? n : rE(o);
|
|
8051
8051
|
}
|
|
8052
|
-
function
|
|
8052
|
+
function rE(o) {
|
|
8053
8053
|
if (o === void 0)
|
|
8054
8054
|
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
8055
8055
|
return o;
|
|
8056
8056
|
}
|
|
8057
|
-
function
|
|
8057
|
+
function sE() {
|
|
8058
8058
|
if (typeof Reflect > "u" || !Reflect.construct || Reflect.construct.sham)
|
|
8059
8059
|
return !1;
|
|
8060
8060
|
if (typeof Proxy == "function")
|
|
@@ -8071,14 +8071,14 @@ function Ku(o) {
|
|
|
8071
8071
|
return n.__proto__ || Object.getPrototypeOf(n);
|
|
8072
8072
|
}, Ku(o);
|
|
8073
8073
|
}
|
|
8074
|
-
var
|
|
8075
|
-
|
|
8076
|
-
var n =
|
|
8074
|
+
var iE = En.EventEmitter, aE = Cn, Td = fn, oE = ni, Yo = Yn(), lE = Ol, Uv = ua, uE = ca(), Zl = new aE("Message"), cE = /* @__PURE__ */ function(o) {
|
|
8075
|
+
eE(r, o);
|
|
8076
|
+
var n = tE(r);
|
|
8077
8077
|
function r(a) {
|
|
8078
8078
|
var c;
|
|
8079
|
-
return
|
|
8079
|
+
return QS(this, r), c = n.call(this), c._ua = a, c._request = null, c._closed = !1, c._direction = null, c._local_identity = null, c._remote_identity = null, c._is_replied = !1, c._data = {}, c;
|
|
8080
8080
|
}
|
|
8081
|
-
return
|
|
8081
|
+
return ZS(r, [{
|
|
8082
8082
|
key: "send",
|
|
8083
8083
|
value: function(a, c) {
|
|
8084
8084
|
var e = this, _ = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}, g = a;
|
|
@@ -8087,11 +8087,11 @@ var sE = En.EventEmitter, iE = Cn, Td = fn, aE = ni, Yo = Yn(), oE = Ol, Uv = ua
|
|
|
8087
8087
|
if (a = this._ua.normalizeTarget(a), !a)
|
|
8088
8088
|
throw new TypeError("Invalid target: ".concat(g));
|
|
8089
8089
|
var d = Yo.cloneArray(_.extraHeaders), C = Yo.cloneObject(_.eventHandlers), S = _.contentType || "text/plain", R = {};
|
|
8090
|
-
_.fromUserName && (R.from_uri = new
|
|
8090
|
+
_.fromUserName && (R.from_uri = new uE("sip", _.fromUserName, this._ua.configuration.uri.host), d.push("P-Preferred-Identity: ".concat(this._ua.configuration.uri.toString()))), _.fromDisplayName && (R.from_display_name = _.fromDisplayName);
|
|
8091
8091
|
for (var k in C)
|
|
8092
8092
|
Object.prototype.hasOwnProperty.call(C, k) && this.on(k, C[k]);
|
|
8093
|
-
d.push("Content-Type: ".concat(S)), this._request = new
|
|
8094
|
-
var L = new
|
|
8093
|
+
d.push("Content-Type: ".concat(S)), this._request = new oE.OutgoingRequest(Td.MESSAGE, a, this._ua, R, d), c && (this._request.body = c);
|
|
8094
|
+
var L = new lE(this._ua, this._request, {
|
|
8095
8095
|
onRequestTimeout: function() {
|
|
8096
8096
|
e._onRequestTimeout();
|
|
8097
8097
|
},
|
|
@@ -8216,7 +8216,7 @@ var sE = En.EventEmitter, iE = Cn, Td = fn, aE = ni, Yo = Yn(), oE = Ol, Uv = ua
|
|
|
8216
8216
|
return this._remote_identity;
|
|
8217
8217
|
}
|
|
8218
8218
|
}]), r;
|
|
8219
|
-
}(
|
|
8219
|
+
}(iE);
|
|
8220
8220
|
function Uu(o) {
|
|
8221
8221
|
"@babel/helpers - typeof";
|
|
8222
8222
|
return typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? Uu = function(n) {
|
|
@@ -8225,7 +8225,7 @@ function Uu(o) {
|
|
|
8225
8225
|
return n && typeof Symbol == "function" && n.constructor === Symbol && n !== Symbol.prototype ? "symbol" : typeof n;
|
|
8226
8226
|
}, Uu(o);
|
|
8227
8227
|
}
|
|
8228
|
-
function
|
|
8228
|
+
function dE(o, n) {
|
|
8229
8229
|
if (!(o instanceof n))
|
|
8230
8230
|
throw new TypeError("Cannot call a class as a function");
|
|
8231
8231
|
}
|
|
@@ -8235,10 +8235,10 @@ function Pv(o, n) {
|
|
|
8235
8235
|
a.enumerable = a.enumerable || !1, a.configurable = !0, "value" in a && (a.writable = !0), Object.defineProperty(o, a.key, a);
|
|
8236
8236
|
}
|
|
8237
8237
|
}
|
|
8238
|
-
function
|
|
8238
|
+
function hE(o, n, r) {
|
|
8239
8239
|
return n && Pv(o.prototype, n), r && Pv(o, r), o;
|
|
8240
8240
|
}
|
|
8241
|
-
function
|
|
8241
|
+
function pE(o, n) {
|
|
8242
8242
|
if (typeof n != "function" && n !== null)
|
|
8243
8243
|
throw new TypeError("Super expression must either be null or a function");
|
|
8244
8244
|
o.prototype = Object.create(n && n.prototype, { constructor: { value: o, writable: !0, configurable: !0 } }), n && ph(o, n);
|
|
@@ -8248,8 +8248,8 @@ function ph(o, n) {
|
|
|
8248
8248
|
return r.__proto__ = a, r;
|
|
8249
8249
|
}, ph(o, n);
|
|
8250
8250
|
}
|
|
8251
|
-
function
|
|
8252
|
-
var n =
|
|
8251
|
+
function _E(o) {
|
|
8252
|
+
var n = gE();
|
|
8253
8253
|
return function() {
|
|
8254
8254
|
var r = Yu(o), a;
|
|
8255
8255
|
if (n) {
|
|
@@ -8257,18 +8257,18 @@ function pE(o) {
|
|
|
8257
8257
|
a = Reflect.construct(r, arguments, c);
|
|
8258
8258
|
} else
|
|
8259
8259
|
a = r.apply(this, arguments);
|
|
8260
|
-
return
|
|
8260
|
+
return fE(this, a);
|
|
8261
8261
|
};
|
|
8262
8262
|
}
|
|
8263
|
-
function
|
|
8264
|
-
return n && (Uu(n) === "object" || typeof n == "function") ? n :
|
|
8263
|
+
function fE(o, n) {
|
|
8264
|
+
return n && (Uu(n) === "object" || typeof n == "function") ? n : mE(o);
|
|
8265
8265
|
}
|
|
8266
|
-
function
|
|
8266
|
+
function mE(o) {
|
|
8267
8267
|
if (o === void 0)
|
|
8268
8268
|
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
8269
8269
|
return o;
|
|
8270
8270
|
}
|
|
8271
|
-
function
|
|
8271
|
+
function gE() {
|
|
8272
8272
|
if (typeof Reflect > "u" || !Reflect.construct || Reflect.construct.sham)
|
|
8273
8273
|
return !1;
|
|
8274
8274
|
if (typeof Proxy == "function")
|
|
@@ -8285,14 +8285,14 @@ function Yu(o) {
|
|
|
8285
8285
|
return n.__proto__ || Object.getPrototypeOf(n);
|
|
8286
8286
|
}, Yu(o);
|
|
8287
8287
|
}
|
|
8288
|
-
var
|
|
8289
|
-
|
|
8290
|
-
var n =
|
|
8288
|
+
var vE = En.EventEmitter, yE = Cn, bd = fn, TE = ni, Xo = Yn(), bE = Ol, Lv = ua, eu = new yE("Options"), wE = /* @__PURE__ */ function(o) {
|
|
8289
|
+
pE(r, o);
|
|
8290
|
+
var n = _E(r);
|
|
8291
8291
|
function r(a) {
|
|
8292
8292
|
var c;
|
|
8293
|
-
return
|
|
8293
|
+
return dE(this, r), c = n.call(this), c._ua = a, c._request = null, c._closed = !1, c._direction = null, c._local_identity = null, c._remote_identity = null, c._is_replied = !1, c._data = {}, c;
|
|
8294
8294
|
}
|
|
8295
|
-
return
|
|
8295
|
+
return hE(r, [{
|
|
8296
8296
|
key: "send",
|
|
8297
8297
|
value: function(a, c) {
|
|
8298
8298
|
var e = this, _ = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}, g = a;
|
|
@@ -8303,8 +8303,8 @@ var gE = En.EventEmitter, vE = Cn, bd = fn, yE = ni, Xo = Yn(), TE = Ol, Lv = ua
|
|
|
8303
8303
|
var d = Xo.cloneArray(_.extraHeaders), C = Xo.cloneObject(_.eventHandlers), S = _.contentType || "application/sdp";
|
|
8304
8304
|
for (var R in C)
|
|
8305
8305
|
Object.prototype.hasOwnProperty.call(C, R) && this.on(R, C[R]);
|
|
8306
|
-
d.push("Content-Type: ".concat(S)), this._request = new
|
|
8307
|
-
var k = new
|
|
8306
|
+
d.push("Content-Type: ".concat(S)), this._request = new TE.OutgoingRequest(bd.OPTIONS, a, this._ua, null, d), c && (this._request.body = c);
|
|
8307
|
+
var k = new bE(this._ua, this._request, {
|
|
8308
8308
|
onRequestTimeout: function() {
|
|
8309
8309
|
e._onRequestTimeout();
|
|
8310
8310
|
},
|
|
@@ -8429,7 +8429,7 @@ var gE = En.EventEmitter, vE = Cn, bd = fn, yE = ni, Xo = Yn(), TE = Ol, Lv = ua
|
|
|
8429
8429
|
return this._remote_identity;
|
|
8430
8430
|
}
|
|
8431
8431
|
}]), r;
|
|
8432
|
-
}(
|
|
8432
|
+
}(vE), Oh = {}, SE = Cn, wd = Yn(), EE = xs(), Jo = new SE("Socket");
|
|
8433
8433
|
Oh.isSocket = function(o) {
|
|
8434
8434
|
if (Array.isArray(o))
|
|
8435
8435
|
return !1;
|
|
@@ -8440,7 +8440,7 @@ Oh.isSocket = function(o) {
|
|
|
8440
8440
|
throw Jo.warn("missing or invalid JsSIP.Socket url property"), new Error("Missing or invalid JsSIP.Socket url property");
|
|
8441
8441
|
if (!wd.isString(o.via_transport))
|
|
8442
8442
|
throw Jo.warn("missing or invalid JsSIP.Socket via_transport property"), new Error("Missing or invalid JsSIP.Socket via_transport property");
|
|
8443
|
-
if (
|
|
8443
|
+
if (EE.parse(o.sip_uri, "SIP_URI") === -1)
|
|
8444
8444
|
throw Jo.warn("missing or invalid JsSIP.Socket sip_uri property"), new Error("missing or invalid JsSIP.Socket sip_uri property");
|
|
8445
8445
|
} catch {
|
|
8446
8446
|
return !1;
|
|
@@ -8455,7 +8455,7 @@ Oh.isSocket = function(o) {
|
|
|
8455
8455
|
}
|
|
8456
8456
|
return !0;
|
|
8457
8457
|
};
|
|
8458
|
-
function
|
|
8458
|
+
function CE(o, n) {
|
|
8459
8459
|
if (!(o instanceof n))
|
|
8460
8460
|
throw new TypeError("Cannot call a class as a function");
|
|
8461
8461
|
}
|
|
@@ -8465,10 +8465,10 @@ function qv(o, n) {
|
|
|
8465
8465
|
a.enumerable = a.enumerable || !1, a.configurable = !0, "value" in a && (a.writable = !0), Object.defineProperty(o, a.key, a);
|
|
8466
8466
|
}
|
|
8467
8467
|
}
|
|
8468
|
-
function
|
|
8468
|
+
function AE(o, n, r) {
|
|
8469
8469
|
return n && qv(o.prototype, n), r && qv(o, r), o;
|
|
8470
8470
|
}
|
|
8471
|
-
var
|
|
8471
|
+
var IE = Cn, RE = Oh, Hv = fn, cr = new IE("Transport"), Mr = {
|
|
8472
8472
|
// Transport status.
|
|
8473
8473
|
STATUS_CONNECTED: 0,
|
|
8474
8474
|
STATUS_CONNECTING: 1,
|
|
@@ -8483,10 +8483,10 @@ var AE = Cn, IE = Oh, Hv = fn, cr = new AE("Transport"), Mr = {
|
|
|
8483
8483
|
// maximum interval in seconds between recover attempts.
|
|
8484
8484
|
max_interval: Hv.CONNECTION_RECOVERY_MAX_INTERVAL
|
|
8485
8485
|
}
|
|
8486
|
-
},
|
|
8486
|
+
}, xE = /* @__PURE__ */ function() {
|
|
8487
8487
|
function o(n) {
|
|
8488
8488
|
var r = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : Mr.recovery_options;
|
|
8489
|
-
|
|
8489
|
+
CE(this, o), cr.debug("new()"), this.status = Mr.STATUS_DISCONNECTED, this.socket = null, this.sockets = [], this.recovery_options = r, this.recover_attempts = 0, this.recovery_timer = null, this.close_requested = !1;
|
|
8490
8490
|
try {
|
|
8491
8491
|
this.textDecoder = new TextDecoder("utf8");
|
|
8492
8492
|
} catch (a) {
|
|
@@ -8495,7 +8495,7 @@ var AE = Cn, IE = Oh, Hv = fn, cr = new AE("Transport"), Mr = {
|
|
|
8495
8495
|
if (typeof n > "u")
|
|
8496
8496
|
throw new TypeError("Invalid argument. undefined 'sockets' argument");
|
|
8497
8497
|
n instanceof Array || (n = [n]), n.forEach(function(a) {
|
|
8498
|
-
if (!
|
|
8498
|
+
if (!RE.isSocket(a.socket))
|
|
8499
8499
|
throw new TypeError("Invalid argument. invalid 'JsSIP.Socket' instance");
|
|
8500
8500
|
if (a.weight && !Number(a.weight))
|
|
8501
8501
|
throw new TypeError("Invalid argument. 'weight' attribute is not a number");
|
|
@@ -8506,7 +8506,7 @@ var AE = Cn, IE = Oh, Hv = fn, cr = new AE("Transport"), Mr = {
|
|
|
8506
8506
|
});
|
|
8507
8507
|
}, this), this._getSocket();
|
|
8508
8508
|
}
|
|
8509
|
-
return
|
|
8509
|
+
return AE(o, [{
|
|
8510
8510
|
key: "connect",
|
|
8511
8511
|
value: function() {
|
|
8512
8512
|
if (cr.debug("connect()"), this.isConnected()) {
|
|
@@ -8650,11 +8650,11 @@ var AE = Cn, IE = Oh, Hv = fn, cr = new AE("Transport"), Mr = {
|
|
|
8650
8650
|
return this.socket.sip_uri;
|
|
8651
8651
|
}
|
|
8652
8652
|
}]), o;
|
|
8653
|
-
}(),
|
|
8653
|
+
}(), DT = {};
|
|
8654
8654
|
function zv(o, n) {
|
|
8655
8655
|
var r;
|
|
8656
8656
|
if (typeof Symbol > "u" || o[Symbol.iterator] == null) {
|
|
8657
|
-
if (Array.isArray(o) || (r =
|
|
8657
|
+
if (Array.isArray(o) || (r = $E(o)) || n && o && typeof o.length == "number") {
|
|
8658
8658
|
r && (o = r);
|
|
8659
8659
|
var a = 0, c = function() {
|
|
8660
8660
|
};
|
|
@@ -8684,7 +8684,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
8684
8684
|
}
|
|
8685
8685
|
} };
|
|
8686
8686
|
}
|
|
8687
|
-
function
|
|
8687
|
+
function $E(o, n) {
|
|
8688
8688
|
if (o) {
|
|
8689
8689
|
if (typeof o == "string")
|
|
8690
8690
|
return Fv(o, n);
|
|
@@ -8701,8 +8701,8 @@ function Fv(o, n) {
|
|
|
8701
8701
|
a[r] = o[r];
|
|
8702
8702
|
return a;
|
|
8703
8703
|
}
|
|
8704
|
-
var
|
|
8705
|
-
|
|
8704
|
+
var OE = Cn, _h = xs(), fh = ni, tu = new OE("Parser");
|
|
8705
|
+
DT.parseMessage = function(o, n) {
|
|
8706
8706
|
var r, a, c = o.indexOf(`\r
|
|
8707
8707
|
`);
|
|
8708
8708
|
if (c === -1) {
|
|
@@ -8717,14 +8717,14 @@ kT.parseMessage = function(o, n) {
|
|
|
8717
8717
|
_.status_code ? (r = new fh.IncomingResponse(), r.status_code = _.status_code, r.reason_phrase = _.reason_phrase) : (r = new fh.IncomingRequest(n), r.method = _.method, r.ruri = _.uri);
|
|
8718
8718
|
r.data = o;
|
|
8719
8719
|
for (var g = c + 2; ; ) {
|
|
8720
|
-
if (c =
|
|
8720
|
+
if (c = kE(o, g), c === -2) {
|
|
8721
8721
|
a = g + 2;
|
|
8722
8722
|
break;
|
|
8723
8723
|
} else if (c === -1) {
|
|
8724
8724
|
tu.warn("parseMessage() | malformed message");
|
|
8725
8725
|
return;
|
|
8726
8726
|
}
|
|
8727
|
-
if (_ =
|
|
8727
|
+
if (_ = DE(r, o, g, c), _ !== !0) {
|
|
8728
8728
|
tu.warn("parseMessage() |", _.error);
|
|
8729
8729
|
return;
|
|
8730
8730
|
}
|
|
@@ -8737,7 +8737,7 @@ kT.parseMessage = function(o, n) {
|
|
|
8737
8737
|
r.body = o.substring(a);
|
|
8738
8738
|
return r;
|
|
8739
8739
|
};
|
|
8740
|
-
function
|
|
8740
|
+
function kE(o, n) {
|
|
8741
8741
|
var r = n, a = 0, c = 0;
|
|
8742
8742
|
if (o.substring(r, r + 2).match(/(^\r\n)/))
|
|
8743
8743
|
return -2;
|
|
@@ -8749,7 +8749,7 @@ function OE(o, n) {
|
|
|
8749
8749
|
}
|
|
8750
8750
|
return a;
|
|
8751
8751
|
}
|
|
8752
|
-
function
|
|
8752
|
+
function DE(o, n, r, a) {
|
|
8753
8753
|
var c, e = n.indexOf(":", r), _ = n.substring(r, e).trim(), g = n.substring(e + 1, a).trim();
|
|
8754
8754
|
switch (_.toLowerCase()) {
|
|
8755
8755
|
case "via":
|
|
@@ -8848,7 +8848,7 @@ function kE(o, n, r, a) {
|
|
|
8848
8848
|
function Pu(o, n) {
|
|
8849
8849
|
var r;
|
|
8850
8850
|
if (typeof Symbol > "u" || o[Symbol.iterator] == null) {
|
|
8851
|
-
if (Array.isArray(o) || (r =
|
|
8851
|
+
if (Array.isArray(o) || (r = NE(o)) || n && o && typeof o.length == "number") {
|
|
8852
8852
|
r && (o = r);
|
|
8853
8853
|
var a = 0, c = function() {
|
|
8854
8854
|
};
|
|
@@ -8878,7 +8878,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
8878
8878
|
}
|
|
8879
8879
|
} };
|
|
8880
8880
|
}
|
|
8881
|
-
function
|
|
8881
|
+
function NE(o, n) {
|
|
8882
8882
|
if (o) {
|
|
8883
8883
|
if (typeof o == "string")
|
|
8884
8884
|
return Bv(o, n);
|
|
@@ -8895,9 +8895,9 @@ function Bv(o, n) {
|
|
|
8895
8895
|
a[r] = o[r];
|
|
8896
8896
|
return a;
|
|
8897
8897
|
}
|
|
8898
|
-
var
|
|
8899
|
-
Vt = o, Ss = n,
|
|
8900
|
-
var a = Pu(
|
|
8898
|
+
var ME = Cn, NT = fn, Vv = ni, kh = Yn(), Dh = new ME("sanityCheck"), UE = [GE], PE = [HE, zE, FE, BE], LE = [VE, jE], Vt, Ss, MT, qE = function(o, n, r) {
|
|
8899
|
+
Vt = o, Ss = n, MT = r;
|
|
8900
|
+
var a = Pu(UE), c;
|
|
8901
8901
|
try {
|
|
8902
8902
|
for (a.s(); !(c = a.n()).done; ) {
|
|
8903
8903
|
var e = c.value;
|
|
@@ -8910,7 +8910,7 @@ var NE = Cn, DT = fn, Vv = ni, kh = Yn(), Dh = new NE("sanityCheck"), ME = [jE],
|
|
|
8910
8910
|
a.f();
|
|
8911
8911
|
}
|
|
8912
8912
|
if (Vt instanceof Vv.IncomingRequest) {
|
|
8913
|
-
var _ = Pu(
|
|
8913
|
+
var _ = Pu(PE), g;
|
|
8914
8914
|
try {
|
|
8915
8915
|
for (_.s(); !(g = _.n()).done; ) {
|
|
8916
8916
|
var d = g.value;
|
|
@@ -8923,7 +8923,7 @@ var NE = Cn, DT = fn, Vv = ni, kh = Yn(), Dh = new NE("sanityCheck"), ME = [jE],
|
|
|
8923
8923
|
_.f();
|
|
8924
8924
|
}
|
|
8925
8925
|
} else if (Vt instanceof Vv.IncomingResponse) {
|
|
8926
|
-
var C = Pu(
|
|
8926
|
+
var C = Pu(LE), S;
|
|
8927
8927
|
try {
|
|
8928
8928
|
for (C.s(); !(S = C.n()).done; ) {
|
|
8929
8929
|
var R = S.value;
|
|
@@ -8938,23 +8938,23 @@ var NE = Cn, DT = fn, Vv = ni, kh = Yn(), Dh = new NE("sanityCheck"), ME = [jE],
|
|
|
8938
8938
|
}
|
|
8939
8939
|
return !0;
|
|
8940
8940
|
};
|
|
8941
|
-
function
|
|
8941
|
+
function HE() {
|
|
8942
8942
|
if (Vt.s("to").uri.scheme !== "sip")
|
|
8943
8943
|
return gl(416), !1;
|
|
8944
8944
|
}
|
|
8945
|
-
function
|
|
8945
|
+
function zE() {
|
|
8946
8946
|
if (!Vt.to_tag && Vt.call_id.substr(0, 5) === Ss.configuration.jssip_id)
|
|
8947
8947
|
return gl(482), !1;
|
|
8948
8948
|
}
|
|
8949
|
-
function
|
|
8949
|
+
function FE() {
|
|
8950
8950
|
var o = kh.str_utf8_length(Vt.body), n = Vt.getHeader("content-length");
|
|
8951
8951
|
if (o < n)
|
|
8952
8952
|
return gl(400), !1;
|
|
8953
8953
|
}
|
|
8954
|
-
function
|
|
8954
|
+
function BE() {
|
|
8955
8955
|
var o = Vt.from_tag, n = Vt.call_id, r = Vt.cseq, a;
|
|
8956
8956
|
if (!Vt.to_tag)
|
|
8957
|
-
if (Vt.method ===
|
|
8957
|
+
if (Vt.method === NT.INVITE) {
|
|
8958
8958
|
if (Ss._transactions.ist[Vt.via_branch])
|
|
8959
8959
|
return !1;
|
|
8960
8960
|
for (var c in Ss._transactions.ist)
|
|
@@ -8968,16 +8968,16 @@ function FE() {
|
|
|
8968
8968
|
return gl(482), !1;
|
|
8969
8969
|
}
|
|
8970
8970
|
}
|
|
8971
|
-
function
|
|
8971
|
+
function VE() {
|
|
8972
8972
|
if (Vt.getHeaders("via").length > 1)
|
|
8973
8973
|
return Dh.debug("more than one Via header field present in the response, dropping the response"), !1;
|
|
8974
8974
|
}
|
|
8975
|
-
function
|
|
8975
|
+
function jE() {
|
|
8976
8976
|
var o = kh.str_utf8_length(Vt.body), n = Vt.getHeader("content-length");
|
|
8977
8977
|
if (o < n)
|
|
8978
8978
|
return Dh.debug("message body length is lower than the value in Content-Length header field, dropping the response"), !1;
|
|
8979
8979
|
}
|
|
8980
|
-
function
|
|
8980
|
+
function GE() {
|
|
8981
8981
|
for (var o = ["from", "to", "call_id", "cseq", "via"], n = 0, r = o; n < r.length; n++) {
|
|
8982
8982
|
var a = r[n];
|
|
8983
8983
|
if (!Vt.hasHeader(a))
|
|
@@ -8985,7 +8985,7 @@ function jE() {
|
|
|
8985
8985
|
}
|
|
8986
8986
|
}
|
|
8987
8987
|
function gl(o) {
|
|
8988
|
-
var n = Vt.getHeaders("via"), r, a = "SIP/2.0 ".concat(o, " ").concat(
|
|
8988
|
+
var n = Vt.getHeaders("via"), r, a = "SIP/2.0 ".concat(o, " ").concat(NT.REASON_PHRASE[o], `\r
|
|
8989
8989
|
`), c = Pu(n), e;
|
|
8990
8990
|
try {
|
|
8991
8991
|
for (c.s(); !(e = c.n()).done; ) {
|
|
@@ -9003,13 +9003,13 @@ function gl(o) {
|
|
|
9003
9003
|
`), a += "Call-ID: ".concat(Vt.call_id, `\r
|
|
9004
9004
|
`), a += "CSeq: ".concat(Vt.cseq, " ").concat(Vt.method, `\r
|
|
9005
9005
|
`), a += `\r
|
|
9006
|
-
`,
|
|
9006
|
+
`, MT.send(a);
|
|
9007
9007
|
}
|
|
9008
9008
|
var Nh = {};
|
|
9009
9009
|
function jv(o, n) {
|
|
9010
9010
|
var r;
|
|
9011
9011
|
if (typeof Symbol > "u" || o[Symbol.iterator] == null) {
|
|
9012
|
-
if (Array.isArray(o) || (r =
|
|
9012
|
+
if (Array.isArray(o) || (r = WE(o)) || n && o && typeof o.length == "number") {
|
|
9013
9013
|
r && (o = r);
|
|
9014
9014
|
var a = 0, c = function() {
|
|
9015
9015
|
};
|
|
@@ -9039,7 +9039,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
9039
9039
|
}
|
|
9040
9040
|
} };
|
|
9041
9041
|
}
|
|
9042
|
-
function
|
|
9042
|
+
function WE(o, n) {
|
|
9043
9043
|
if (o) {
|
|
9044
9044
|
if (typeof o == "string")
|
|
9045
9045
|
return Gv(o, n);
|
|
@@ -9266,7 +9266,7 @@ function Lu(o) {
|
|
|
9266
9266
|
return n && typeof Symbol == "function" && n.constructor === Symbol && n !== Symbol.prototype ? "symbol" : typeof n;
|
|
9267
9267
|
}, Lu(o);
|
|
9268
9268
|
}
|
|
9269
|
-
function
|
|
9269
|
+
function KE(o, n) {
|
|
9270
9270
|
if (!(o instanceof n))
|
|
9271
9271
|
throw new TypeError("Cannot call a class as a function");
|
|
9272
9272
|
}
|
|
@@ -9279,7 +9279,7 @@ function Kv(o, n) {
|
|
|
9279
9279
|
function Yv(o, n, r) {
|
|
9280
9280
|
return n && Kv(o.prototype, n), r && Kv(o, r), o;
|
|
9281
9281
|
}
|
|
9282
|
-
function
|
|
9282
|
+
function YE(o, n) {
|
|
9283
9283
|
if (typeof n != "function" && n !== null)
|
|
9284
9284
|
throw new TypeError("Super expression must either be null or a function");
|
|
9285
9285
|
o.prototype = Object.create(n && n.prototype, { constructor: { value: o, writable: !0, configurable: !0 } }), n && mh(o, n);
|
|
@@ -9289,8 +9289,8 @@ function mh(o, n) {
|
|
|
9289
9289
|
return r.__proto__ = a, r;
|
|
9290
9290
|
}, mh(o, n);
|
|
9291
9291
|
}
|
|
9292
|
-
function
|
|
9293
|
-
var n =
|
|
9292
|
+
function XE(o) {
|
|
9293
|
+
var n = QE();
|
|
9294
9294
|
return function() {
|
|
9295
9295
|
var r = Xu(o), a;
|
|
9296
9296
|
if (n) {
|
|
@@ -9298,18 +9298,18 @@ function YE(o) {
|
|
|
9298
9298
|
a = Reflect.construct(r, arguments, c);
|
|
9299
9299
|
} else
|
|
9300
9300
|
a = r.apply(this, arguments);
|
|
9301
|
-
return
|
|
9301
|
+
return JE(this, a);
|
|
9302
9302
|
};
|
|
9303
9303
|
}
|
|
9304
|
-
function
|
|
9305
|
-
return n && (Lu(n) === "object" || typeof n == "function") ? n :
|
|
9304
|
+
function JE(o, n) {
|
|
9305
|
+
return n && (Lu(n) === "object" || typeof n == "function") ? n : UT(o);
|
|
9306
9306
|
}
|
|
9307
|
-
function
|
|
9307
|
+
function UT(o) {
|
|
9308
9308
|
if (o === void 0)
|
|
9309
9309
|
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
9310
9310
|
return o;
|
|
9311
9311
|
}
|
|
9312
|
-
function
|
|
9312
|
+
function QE() {
|
|
9313
9313
|
if (typeof Reflect > "u" || !Reflect.construct || Reflect.construct.sham)
|
|
9314
9314
|
return !1;
|
|
9315
9315
|
if (typeof Proxy == "function")
|
|
@@ -9326,7 +9326,7 @@ function Xu(o) {
|
|
|
9326
9326
|
return n.__proto__ || Object.getPrototypeOf(n);
|
|
9327
9327
|
}, Xu(o);
|
|
9328
9328
|
}
|
|
9329
|
-
var
|
|
9329
|
+
var ZE = En.EventEmitter, eC = Cn, Dn = fn, tC = Fw, Xv = JS, Jv = cE, Qv = wE, Ad = $l, nC = xE, ru = Yn(), rC = ua, sC = ca(), iC = DT, Id = ni, aC = qE, Rd = Nh, Wt = new eC("UA"), Un = {
|
|
9330
9330
|
// UA status codes.
|
|
9331
9331
|
STATUS_INIT: 0,
|
|
9332
9332
|
STATUS_READY: 1,
|
|
@@ -9335,9 +9335,9 @@ var QE = En.EventEmitter, ZE = Cn, Dn = fn, eC = zw, Xv = XS, Jv = uE, Qv = bE,
|
|
|
9335
9335
|
// UA error codes.
|
|
9336
9336
|
CONFIGURATION_ERROR: 1,
|
|
9337
9337
|
NETWORK_ERROR: 2
|
|
9338
|
-
},
|
|
9339
|
-
|
|
9340
|
-
var n =
|
|
9338
|
+
}, oC = /* @__PURE__ */ function(o) {
|
|
9339
|
+
YE(r, o);
|
|
9340
|
+
var n = XE(r);
|
|
9341
9341
|
Yv(r, null, [{
|
|
9342
9342
|
key: "C",
|
|
9343
9343
|
// Expose C object.
|
|
@@ -9347,7 +9347,7 @@ var QE = En.EventEmitter, ZE = Cn, Dn = fn, eC = zw, Xv = XS, Jv = uE, Qv = bE,
|
|
|
9347
9347
|
}]);
|
|
9348
9348
|
function r(a) {
|
|
9349
9349
|
var c;
|
|
9350
|
-
if (
|
|
9350
|
+
if (KE(this, r), Wt.debug("new() [configuration:%o]", a), c = n.call(this), c._cache = {
|
|
9351
9351
|
credentials: {}
|
|
9352
9352
|
}, c._configuration = Object.assign({}, Rd.settings), c._dynConfiguration = {}, c._dialogs = {}, c._applicants = {}, c._sessions = {}, c._transport = null, c._contact = null, c._status = Un.STATUS_INIT, c._error = null, c._transactions = {
|
|
9353
9353
|
nist: {},
|
|
@@ -9361,7 +9361,7 @@ var QE = En.EventEmitter, ZE = Cn, Dn = fn, eC = zw, Xv = XS, Jv = uE, Qv = bE,
|
|
|
9361
9361
|
} catch (e) {
|
|
9362
9362
|
throw c._status = Un.STATUS_NOT_READY, c._error = Un.CONFIGURATION_ERROR, e;
|
|
9363
9363
|
}
|
|
9364
|
-
return c._registrator = new
|
|
9364
|
+
return c._registrator = new tC(UT(c)), c;
|
|
9365
9365
|
}
|
|
9366
9366
|
return Yv(r, [{
|
|
9367
9367
|
key: "start",
|
|
@@ -9784,19 +9784,19 @@ var QE = En.EventEmitter, ZE = Cn, Dn = fn, eC = zw, Xv = XS, Jv = uE, Qv = bE,
|
|
|
9784
9784
|
var c = this._configuration.uri.clone();
|
|
9785
9785
|
c.user = null, this._configuration.hostport_params = c.toString().replace(/^sip:/i, "");
|
|
9786
9786
|
try {
|
|
9787
|
-
this._transport = new
|
|
9787
|
+
this._transport = new nC(this._configuration.sockets, {
|
|
9788
9788
|
// Recovery options.
|
|
9789
9789
|
max_interval: this._configuration.connection_recovery_max_interval,
|
|
9790
9790
|
min_interval: this._configuration.connection_recovery_min_interval
|
|
9791
|
-
}), this._transport.onconnecting =
|
|
9791
|
+
}), this._transport.onconnecting = lC.bind(this), this._transport.onconnect = uC.bind(this), this._transport.ondisconnect = cC.bind(this), this._transport.ondata = dC.bind(this);
|
|
9792
9792
|
} catch (C) {
|
|
9793
|
-
throw Wt.warn(C), new
|
|
9793
|
+
throw Wt.warn(C), new rC.ConfigurationError("sockets", this._configuration.sockets);
|
|
9794
9794
|
}
|
|
9795
9795
|
if (delete this._configuration.sockets, this._configuration.authorization_user || (this._configuration.authorization_user = this._configuration.uri.user), !this._configuration.registrar_server) {
|
|
9796
9796
|
var e = this._configuration.uri.clone();
|
|
9797
9797
|
e.user = null, e.clearParams(), e.clearHeaders(), this._configuration.registrar_server = e;
|
|
9798
9798
|
}
|
|
9799
|
-
this._configuration.no_answer_timeout *= 1e3, this._configuration.contact_uri ? this._configuration.via_host = this._configuration.contact_uri.host : this._configuration.contact_uri = new
|
|
9799
|
+
this._configuration.no_answer_timeout *= 1e3, this._configuration.contact_uri ? this._configuration.via_host = this._configuration.contact_uri.host : this._configuration.contact_uri = new sC("sip", ru.createRandomToken(8), this._configuration.via_host, null, {
|
|
9800
9800
|
transport: "ws"
|
|
9801
9801
|
}), this._contact = {
|
|
9802
9802
|
pub_gruu: null,
|
|
@@ -9859,14 +9859,14 @@ var QE = En.EventEmitter, ZE = Cn, Dn = fn, eC = zw, Xv = XS, Jv = uE, Qv = bE,
|
|
|
9859
9859
|
return this._transport;
|
|
9860
9860
|
}
|
|
9861
9861
|
}]), r;
|
|
9862
|
-
}(
|
|
9863
|
-
function
|
|
9862
|
+
}(ZE);
|
|
9863
|
+
function lC(o) {
|
|
9864
9864
|
this.emit("connecting", o);
|
|
9865
9865
|
}
|
|
9866
|
-
function
|
|
9866
|
+
function uC(o) {
|
|
9867
9867
|
this._status !== Un.STATUS_USER_CLOSED && (this._status = Un.STATUS_READY, this._error = null, this.emit("connected", o), this._dynConfiguration.register && this._registrator.register());
|
|
9868
9868
|
}
|
|
9869
|
-
function
|
|
9869
|
+
function cC(o) {
|
|
9870
9870
|
for (var n = ["nict", "ict", "nist", "ist"], r = 0, a = n; r < a.length; r++) {
|
|
9871
9871
|
var c = a[r];
|
|
9872
9872
|
for (var e in this._transactions[c])
|
|
@@ -9874,9 +9874,9 @@ function uC(o) {
|
|
|
9874
9874
|
}
|
|
9875
9875
|
this.emit("disconnected", o), this._registrator.onTransportClosed(), this._status !== Un.STATUS_USER_CLOSED && (this._status = Un.STATUS_NOT_READY, this._error = Un.NETWORK_ERROR);
|
|
9876
9876
|
}
|
|
9877
|
-
function
|
|
9877
|
+
function dC(o) {
|
|
9878
9878
|
var n = o.transport, r = o.message;
|
|
9879
|
-
if (r =
|
|
9879
|
+
if (r = iC.parseMessage(r, this), !!r && !(this._status === Un.STATUS_USER_CLOSED && r instanceof Id.IncomingRequest) && aC(r, this, n)) {
|
|
9880
9880
|
if (r instanceof Id.IncomingRequest)
|
|
9881
9881
|
r.transport = n, this.receiveRequest(r);
|
|
9882
9882
|
else if (r instanceof Id.IncomingResponse) {
|
|
@@ -9894,7 +9894,7 @@ function cC(o) {
|
|
|
9894
9894
|
}
|
|
9895
9895
|
}
|
|
9896
9896
|
}
|
|
9897
|
-
function
|
|
9897
|
+
function hC(o, n) {
|
|
9898
9898
|
if (!(o instanceof n))
|
|
9899
9899
|
throw new TypeError("Cannot call a class as a function");
|
|
9900
9900
|
}
|
|
@@ -9904,20 +9904,20 @@ function Zv(o, n) {
|
|
|
9904
9904
|
a.enumerable = a.enumerable || !1, a.configurable = !0, "value" in a && (a.writable = !0), Object.defineProperty(o, a.key, a);
|
|
9905
9905
|
}
|
|
9906
9906
|
}
|
|
9907
|
-
function
|
|
9907
|
+
function pC(o, n, r) {
|
|
9908
9908
|
return n && Zv(o.prototype, n), r && Zv(o, r), o;
|
|
9909
9909
|
}
|
|
9910
|
-
var
|
|
9910
|
+
var _C = Cn, fC = xs(), er = new _C("WebSocketInterface"), mC = /* @__PURE__ */ function() {
|
|
9911
9911
|
function o(n) {
|
|
9912
|
-
|
|
9913
|
-
var r =
|
|
9912
|
+
hC(this, o), er.debug('new() [url:"%s"]', n), this._url = n, this._sip_uri = null, this._via_transport = null, this._ws = null;
|
|
9913
|
+
var r = fC.parse(n, "absoluteURI");
|
|
9914
9914
|
if (r === -1)
|
|
9915
9915
|
throw er.warn("invalid WebSocket URI: ".concat(n)), new TypeError("Invalid argument: ".concat(n));
|
|
9916
9916
|
if (r.scheme !== "wss" && r.scheme !== "ws")
|
|
9917
9917
|
throw er.warn("invalid WebSocket URI scheme: ".concat(r.scheme)), new TypeError("Invalid argument: ".concat(n));
|
|
9918
9918
|
this._sip_uri = "sip:".concat(r.host).concat(r.port ? ":".concat(r.port) : "", ";transport=ws"), this._via_transport = r.scheme.toUpperCase();
|
|
9919
9919
|
}
|
|
9920
|
-
return
|
|
9920
|
+
return pC(o, [{
|
|
9921
9921
|
key: "connect",
|
|
9922
9922
|
value: function() {
|
|
9923
9923
|
if (er.debug("connect()"), this.isConnected()) {
|
|
@@ -10002,17 +10002,17 @@ var pC = Cn, _C = xs(), er = new pC("WebSocketInterface"), fC = /* @__PURE__ */
|
|
|
10002
10002
|
return this._url;
|
|
10003
10003
|
}
|
|
10004
10004
|
}]), o;
|
|
10005
|
-
}(), gh = Zu,
|
|
10006
|
-
|
|
10005
|
+
}(), gh = Zu, gC = fn, vC = ua, yC = Yn(), TC = oC, bC = ca(), wC = Ah(), SC = xs(), EC = mC, CC = Io("JsSIP");
|
|
10006
|
+
CC("version %s", gh.version);
|
|
10007
10007
|
var ey = {
|
|
10008
|
-
C:
|
|
10009
|
-
Exceptions:
|
|
10010
|
-
Utils:
|
|
10011
|
-
UA:
|
|
10012
|
-
URI:
|
|
10013
|
-
NameAddrHeader:
|
|
10014
|
-
WebSocketInterface:
|
|
10015
|
-
Grammar:
|
|
10008
|
+
C: gC,
|
|
10009
|
+
Exceptions: vC,
|
|
10010
|
+
Utils: yC,
|
|
10011
|
+
UA: TC,
|
|
10012
|
+
URI: bC,
|
|
10013
|
+
NameAddrHeader: wC,
|
|
10014
|
+
WebSocketInterface: EC,
|
|
10015
|
+
Grammar: SC,
|
|
10016
10016
|
// Expose the debug module.
|
|
10017
10017
|
debug: Io,
|
|
10018
10018
|
get name() {
|
|
@@ -10215,7 +10215,7 @@ function Mh() {
|
|
|
10215
10215
|
return xd;
|
|
10216
10216
|
ny = 1;
|
|
10217
10217
|
const o = ri(), n = ns();
|
|
10218
|
-
return xd = class
|
|
10218
|
+
return xd = class PT {
|
|
10219
10219
|
/**
|
|
10220
10220
|
* Parse the given string and returns a NameAddrHeader instance or undefined if
|
|
10221
10221
|
* it is an invalid NameAddrHeader.
|
|
@@ -10261,7 +10261,7 @@ function Mh() {
|
|
|
10261
10261
|
this._parameters = {};
|
|
10262
10262
|
}
|
|
10263
10263
|
clone() {
|
|
10264
|
-
return new
|
|
10264
|
+
return new PT(
|
|
10265
10265
|
this._uri.clone(),
|
|
10266
10266
|
this._display_name,
|
|
10267
10267
|
JSON.parse(JSON.stringify(this._parameters))
|
|
@@ -12220,7 +12220,7 @@ function ri() {
|
|
|
12220
12220
|
return $d;
|
|
12221
12221
|
iy = 1;
|
|
12222
12222
|
const o = bt, n = zn(), r = ns();
|
|
12223
|
-
return $d = class
|
|
12223
|
+
return $d = class LT {
|
|
12224
12224
|
/**
|
|
12225
12225
|
* Parse the given string and returns a JsSIP.URI instance or undefined if
|
|
12226
12226
|
* it is an invalid URI.
|
|
@@ -12303,7 +12303,7 @@ function ri() {
|
|
|
12303
12303
|
this._headers = {};
|
|
12304
12304
|
}
|
|
12305
12305
|
clone() {
|
|
12306
|
-
return new
|
|
12306
|
+
return new LT(
|
|
12307
12307
|
this._scheme,
|
|
12308
12308
|
this._user,
|
|
12309
12309
|
this._host,
|
|
@@ -12489,7 +12489,7 @@ function zn() {
|
|
|
12489
12489
|
}
|
|
12490
12490
|
}, un.cloneArray = (_) => _ && _.slice() || [], un.cloneObject = (_, g = {}) => _ && Object.assign({}, _) || g, un;
|
|
12491
12491
|
}
|
|
12492
|
-
const
|
|
12492
|
+
const qT = pr, AC = yn, qn = bt, _n = zn(), oy = Mh(), IC = ns(), Od = new AC("SIPMessage");
|
|
12493
12493
|
class ac {
|
|
12494
12494
|
constructor(n, r, a, c, e, _) {
|
|
12495
12495
|
if (!n || !r || !a)
|
|
@@ -12575,7 +12575,7 @@ class ac {
|
|
|
12575
12575
|
* Returns this.sdp.
|
|
12576
12576
|
*/
|
|
12577
12577
|
parseSDP(n) {
|
|
12578
|
-
return !n && this.sdp ? this.sdp : (this.sdp =
|
|
12578
|
+
return !n && this.sdp ? this.sdp : (this.sdp = qT.parse(this.body || ""), this.sdp);
|
|
12579
12579
|
}
|
|
12580
12580
|
toString() {
|
|
12581
12581
|
let n = `${this.method} ${this.ruri} SIP/2.0\r
|
|
@@ -12637,7 +12637,7 @@ class Uh extends ac {
|
|
|
12637
12637
|
}, this), n.body = this.body, n.extraHeaders = _n.cloneArray(this.extraHeaders), n.to = this.to, n.from = this.from, n.call_id = this.call_id, n.cseq = this.cseq, n.transaction = this.transaction, n;
|
|
12638
12638
|
}
|
|
12639
12639
|
}
|
|
12640
|
-
class
|
|
12640
|
+
class HT {
|
|
12641
12641
|
constructor() {
|
|
12642
12642
|
this.data = null, this.headers = null, this.method = null, this.via = null, this.via_branch = null, this.call_id = null, this.cseq = null, this.from = null, this.from_tag = null, this.to = null, this.to_tag = null, this.body = null, this.sdp = null;
|
|
12643
12643
|
}
|
|
@@ -12697,7 +12697,7 @@ class qT {
|
|
|
12697
12697
|
const a = this.headers[n][r], c = a.raw;
|
|
12698
12698
|
if (a.parsed)
|
|
12699
12699
|
return a.parsed;
|
|
12700
|
-
const e =
|
|
12700
|
+
const e = IC.parse(c, n.replace(/-/g, "_"));
|
|
12701
12701
|
if (e === -1) {
|
|
12702
12702
|
this.headers[n].splice(r, 1), Od.debug(`error parsing "${n}" header field with value "${c}"`);
|
|
12703
12703
|
return;
|
|
@@ -12734,13 +12734,13 @@ class qT {
|
|
|
12734
12734
|
* Returns this.sdp.
|
|
12735
12735
|
*/
|
|
12736
12736
|
parseSDP(n) {
|
|
12737
|
-
return !n && this.sdp ? this.sdp : (this.sdp =
|
|
12737
|
+
return !n && this.sdp ? this.sdp : (this.sdp = qT.parse(this.body || ""), this.sdp);
|
|
12738
12738
|
}
|
|
12739
12739
|
toString() {
|
|
12740
12740
|
return this.data;
|
|
12741
12741
|
}
|
|
12742
12742
|
}
|
|
12743
|
-
class
|
|
12743
|
+
class RC extends HT {
|
|
12744
12744
|
constructor(n) {
|
|
12745
12745
|
super(), this.ua = n, this.headers = {}, this.ruri = null, this.transport = null, this.server_transaction = null;
|
|
12746
12746
|
}
|
|
@@ -12836,7 +12836,7 @@ class IC extends qT {
|
|
|
12836
12836
|
`, this.transport.send(c);
|
|
12837
12837
|
}
|
|
12838
12838
|
}
|
|
12839
|
-
class
|
|
12839
|
+
class xC extends HT {
|
|
12840
12840
|
constructor() {
|
|
12841
12841
|
super(), this.headers = {}, this.status_code = null, this.reason_phrase = null;
|
|
12842
12842
|
}
|
|
@@ -12844,11 +12844,11 @@ class RC extends qT {
|
|
|
12844
12844
|
var Hn = {
|
|
12845
12845
|
OutgoingRequest: ac,
|
|
12846
12846
|
InitialOutgoingInviteRequest: Uh,
|
|
12847
|
-
IncomingRequest:
|
|
12848
|
-
IncomingResponse:
|
|
12847
|
+
IncomingRequest: RC,
|
|
12848
|
+
IncomingResponse: xC
|
|
12849
12849
|
};
|
|
12850
|
-
const Co = /* @__PURE__ */ tn(Hn),
|
|
12851
|
-
var
|
|
12850
|
+
const Co = /* @__PURE__ */ tn(Hn), $C = yn, Xs = zn(), Qr = new $C("DigestAuthentication");
|
|
12851
|
+
var zT = class {
|
|
12852
12852
|
constructor(o) {
|
|
12853
12853
|
this._credentials = o, this._cnonce = null, this._nc = 0, this._ncHex = "00000000", this._algorithm = null, this._realm = null, this._nonce = null, this._opaque = null, this._stale = null, this._qop = null, this._method = null, this._uri = null, this._ha1 = null, this._response = null;
|
|
12854
12854
|
}
|
|
@@ -12909,10 +12909,10 @@ var HT = class {
|
|
|
12909
12909
|
return o.push(`algorithm=${this._algorithm}`), o.push(`username="${this._credentials.username}"`), o.push(`realm="${this._realm}"`), o.push(`nonce="${this._nonce}"`), o.push(`uri="${this._uri}"`), o.push(`response="${this._response}"`), this._opaque && o.push(`opaque="${this._opaque}"`), this._qop && (o.push(`qop=${this._qop}`), o.push(`cnonce="${this._cnonce}"`), o.push(`nc=${this._ncHex}`)), `Digest ${o.join(", ")}`;
|
|
12910
12910
|
}
|
|
12911
12911
|
};
|
|
12912
|
-
const
|
|
12912
|
+
const OC = /* @__PURE__ */ tn(zT), Js = 500, kC = 4e3, ly = 5e3;
|
|
12913
12913
|
var Ph = {
|
|
12914
12914
|
T1: Js,
|
|
12915
|
-
T2:
|
|
12915
|
+
T2: kC,
|
|
12916
12916
|
T4: ly,
|
|
12917
12917
|
TIMER_B: 64 * Js,
|
|
12918
12918
|
TIMER_D: 0 * Js,
|
|
@@ -12926,7 +12926,7 @@ var Ph = {
|
|
|
12926
12926
|
PROVISIONAL_RESPONSE_INTERVAL: 6e4
|
|
12927
12927
|
// See RFC 3261 Section 13.3.1.1
|
|
12928
12928
|
};
|
|
12929
|
-
const Qo = /* @__PURE__ */ tn(Ph), kl = En.EventEmitter, Dl = yn, pl = bt, uy = Hn, Is = Ph, cy = new Dl("NonInviteClientTransaction"), su = new Dl("InviteClientTransaction"),
|
|
12929
|
+
const Qo = /* @__PURE__ */ tn(Ph), kl = En.EventEmitter, Dl = yn, pl = bt, uy = Hn, Is = Ph, cy = new Dl("NonInviteClientTransaction"), su = new Dl("InviteClientTransaction"), DC = new Dl("AckClientTransaction"), dy = new Dl("NonInviteServerTransaction"), iu = new Dl("InviteServerTransaction"), je = {
|
|
12930
12930
|
// Transaction states.
|
|
12931
12931
|
STATUS_TRYING: 1,
|
|
12932
12932
|
STATUS_PROCEEDING: 2,
|
|
@@ -12941,7 +12941,7 @@ const Qo = /* @__PURE__ */ tn(Ph), kl = En.EventEmitter, Dl = yn, pl = bt, uy =
|
|
|
12941
12941
|
INVITE_CLIENT: "ict",
|
|
12942
12942
|
INVITE_SERVER: "ist"
|
|
12943
12943
|
};
|
|
12944
|
-
class
|
|
12944
|
+
class NC extends kl {
|
|
12945
12945
|
constructor(n, r, a, c) {
|
|
12946
12946
|
super(), this.type = je.NON_INVITE_CLIENT, this.id = `z9hG4bK${Math.floor(Math.random() * 1e7)}`, this.ua = n, this.transport = r, this.request = a, this.eventHandlers = c;
|
|
12947
12947
|
let e = `SIP/2.0/${r.via_transport}`;
|
|
@@ -12989,7 +12989,7 @@ class DC extends kl {
|
|
|
12989
12989
|
}
|
|
12990
12990
|
}
|
|
12991
12991
|
}
|
|
12992
|
-
class
|
|
12992
|
+
class MC extends kl {
|
|
12993
12993
|
constructor(n, r, a, c) {
|
|
12994
12994
|
super(), this.type = je.INVITE_CLIENT, this.id = `z9hG4bK${Math.floor(Math.random() * 1e7)}`, this.ua = n, this.transport = r, this.request = a, this.eventHandlers = c, a.transaction = this;
|
|
12995
12995
|
let e = `SIP/2.0/${r.via_transport}`;
|
|
@@ -13085,7 +13085,7 @@ class NC extends kl {
|
|
|
13085
13085
|
}
|
|
13086
13086
|
}
|
|
13087
13087
|
}
|
|
13088
|
-
class
|
|
13088
|
+
class UC extends kl {
|
|
13089
13089
|
constructor(n, r, a, c) {
|
|
13090
13090
|
super(), this.id = `z9hG4bK${Math.floor(Math.random() * 1e7)}`, this.transport = r, this.request = a, this.eventHandlers = c;
|
|
13091
13091
|
let e = `SIP/2.0/${r.via_transport}`;
|
|
@@ -13098,10 +13098,10 @@ class MC extends kl {
|
|
|
13098
13098
|
this.transport.send(this.request) || this.onTransportError();
|
|
13099
13099
|
}
|
|
13100
13100
|
onTransportError() {
|
|
13101
|
-
|
|
13101
|
+
DC.debug(`transport error occurred for transaction ${this.id}`), this.eventHandlers.onTransportError();
|
|
13102
13102
|
}
|
|
13103
13103
|
}
|
|
13104
|
-
class
|
|
13104
|
+
class PC extends kl {
|
|
13105
13105
|
constructor(n, r, a) {
|
|
13106
13106
|
super(), this.type = je.NON_INVITE_SERVER, this.id = a.via_branch, this.ua = n, this.transport = r, this.request = a, this.last_response = "", a.server_transaction = this, this.state = je.STATUS_TRYING, n.newTransaction(this);
|
|
13107
13107
|
}
|
|
@@ -13140,7 +13140,7 @@ class UC extends kl {
|
|
|
13140
13140
|
}
|
|
13141
13141
|
}
|
|
13142
13142
|
}
|
|
13143
|
-
class
|
|
13143
|
+
class LC extends kl {
|
|
13144
13144
|
constructor(n, r, a) {
|
|
13145
13145
|
super(), this.type = je.INVITE_SERVER, this.id = a.via_branch, this.ua = n, this.transport = r, this.request = a, this.last_response = "", a.server_transaction = this, this.state = je.STATUS_PROCEEDING, n.newTransaction(this), this.resendProvisionalTimer = null, a.reply(100);
|
|
13146
13146
|
}
|
|
@@ -13198,7 +13198,7 @@ class PC extends kl {
|
|
|
13198
13198
|
}
|
|
13199
13199
|
}
|
|
13200
13200
|
}
|
|
13201
|
-
function
|
|
13201
|
+
function qC({ _transactions: o }, n) {
|
|
13202
13202
|
let r;
|
|
13203
13203
|
switch (n.method) {
|
|
13204
13204
|
case pl.INVITE:
|
|
@@ -13243,14 +13243,14 @@ function LC({ _transactions: o }, n) {
|
|
|
13243
13243
|
}
|
|
13244
13244
|
var Ro = {
|
|
13245
13245
|
C: je,
|
|
13246
|
-
NonInviteClientTransaction:
|
|
13247
|
-
InviteClientTransaction:
|
|
13248
|
-
AckClientTransaction:
|
|
13249
|
-
NonInviteServerTransaction:
|
|
13250
|
-
InviteServerTransaction:
|
|
13251
|
-
checkTransaction:
|
|
13246
|
+
NonInviteClientTransaction: NC,
|
|
13247
|
+
InviteClientTransaction: MC,
|
|
13248
|
+
AckClientTransaction: UC,
|
|
13249
|
+
NonInviteServerTransaction: PC,
|
|
13250
|
+
InviteServerTransaction: LC,
|
|
13251
|
+
checkTransaction: qC
|
|
13252
13252
|
};
|
|
13253
|
-
const Lr = /* @__PURE__ */ tn(Ro),
|
|
13253
|
+
const Lr = /* @__PURE__ */ tn(Ro), HC = yn, hy = bt, zC = zT, kd = Ro, FC = new HC("RequestSender"), Dd = {
|
|
13254
13254
|
onRequestTimeout: () => {
|
|
13255
13255
|
},
|
|
13256
13256
|
onTransportError: () => {
|
|
@@ -13318,11 +13318,11 @@ var xo = class {
|
|
|
13318
13318
|
const a = o.status_code;
|
|
13319
13319
|
if ((a === 401 || a === 407) && (this._ua.configuration.password !== null || this._ua.configuration.ha1 !== null)) {
|
|
13320
13320
|
if (o.status_code === 401 ? (n = o.parseHeader("www-authenticate"), r = "authorization") : (n = o.parseHeader("proxy-authenticate"), r = "proxy-authorization"), !n) {
|
|
13321
|
-
|
|
13321
|
+
FC.debug(`${o.status_code} with wrong or missing challenge, cannot authenticate`), this._eventHandlers.onReceiveResponse(o);
|
|
13322
13322
|
return;
|
|
13323
13323
|
}
|
|
13324
13324
|
if (!this._challenged || !this._staled && n.stale === !0) {
|
|
13325
|
-
if (this._auth || (this._auth = new
|
|
13325
|
+
if (this._auth || (this._auth = new zC({
|
|
13326
13326
|
username: this._ua.configuration.authorization_user,
|
|
13327
13327
|
password: this._ua.configuration.password,
|
|
13328
13328
|
realm: this._ua.configuration.realm,
|
|
@@ -13338,8 +13338,8 @@ var xo = class {
|
|
|
13338
13338
|
this._eventHandlers.onReceiveResponse(o);
|
|
13339
13339
|
}
|
|
13340
13340
|
};
|
|
13341
|
-
const vl = /* @__PURE__ */ tn(xo),
|
|
13342
|
-
var
|
|
13341
|
+
const vl = /* @__PURE__ */ tn(xo), BC = yn, Nd = zn(), Da = bt, py = Hn, _y = xo, Zo = new BC("Registrator"), au = 10;
|
|
13342
|
+
var VC = class {
|
|
13343
13343
|
constructor(o, n) {
|
|
13344
13344
|
this._reg_id = 1, this._ua = o, this._transport = n, this._registrar = o.configuration.registrar_server, this._expires = o.configuration.register_expires, this._call_id = Nd.createRandomToken(22), this._cseq = 0, this._to_uri = o.configuration.uri, this._registrationTimer = null, this._registering = !1, this._registered = !1, this._contact = this._ua.contact.toString(), this._contact += ";+sip.ice", this._extraHeaders = [], this._extraContactParams = "", this._sipInstance = `"<urn:uuid:${this._ua.configuration.instance_id}>"`, this._contact += `;reg-id=${this._reg_id}`, this._contact += `;+sip.instance=${this._sipInstance}`;
|
|
13345
13345
|
}
|
|
@@ -13489,33 +13489,33 @@ var BC = class {
|
|
|
13489
13489
|
});
|
|
13490
13490
|
}
|
|
13491
13491
|
};
|
|
13492
|
-
class
|
|
13492
|
+
class jC extends Error {
|
|
13493
13493
|
constructor(n, r) {
|
|
13494
13494
|
super(), this.code = 1, this.name = "CONFIGURATION_ERROR", this.parameter = n, this.value = r, this.message = this.value ? `Invalid value ${JSON.stringify(this.value)} for parameter "${this.parameter}"` : `Missing parameter: ${this.parameter}`;
|
|
13495
13495
|
}
|
|
13496
13496
|
}
|
|
13497
|
-
class
|
|
13497
|
+
class GC extends Error {
|
|
13498
13498
|
constructor(n) {
|
|
13499
13499
|
super(), this.code = 2, this.name = "INVALID_STATE_ERROR", this.status = n, this.message = `Invalid status: ${n}`;
|
|
13500
13500
|
}
|
|
13501
13501
|
}
|
|
13502
|
-
class
|
|
13502
|
+
class WC extends Error {
|
|
13503
13503
|
constructor(n) {
|
|
13504
13504
|
super(), this.code = 3, this.name = "NOT_SUPPORTED_ERROR", this.message = n;
|
|
13505
13505
|
}
|
|
13506
13506
|
}
|
|
13507
|
-
class
|
|
13507
|
+
class KC extends Error {
|
|
13508
13508
|
constructor(n) {
|
|
13509
13509
|
super(), this.code = 4, this.name = "NOT_READY_ERROR", this.message = n;
|
|
13510
13510
|
}
|
|
13511
13511
|
}
|
|
13512
13512
|
var si = {
|
|
13513
|
-
ConfigurationError:
|
|
13514
|
-
InvalidStateError:
|
|
13515
|
-
NotSupportedError:
|
|
13516
|
-
NotReadyError:
|
|
13513
|
+
ConfigurationError: jC,
|
|
13514
|
+
InvalidStateError: GC,
|
|
13515
|
+
NotSupportedError: WC,
|
|
13516
|
+
NotReadyError: KC
|
|
13517
13517
|
};
|
|
13518
|
-
const ia = /* @__PURE__ */ tn(si), Md = bt, ou = Ro,
|
|
13518
|
+
const ia = /* @__PURE__ */ tn(si), Md = bt, ou = Ro, YC = xo, Ud = {
|
|
13519
13519
|
onRequestTimeout: () => {
|
|
13520
13520
|
},
|
|
13521
13521
|
onTransportError: () => {
|
|
@@ -13529,7 +13529,7 @@ const ia = /* @__PURE__ */ tn(si), Md = bt, ou = Ro, KC = xo, Ud = {
|
|
|
13529
13529
|
onDialogError: () => {
|
|
13530
13530
|
}
|
|
13531
13531
|
};
|
|
13532
|
-
var
|
|
13532
|
+
var FT = class {
|
|
13533
13533
|
constructor(o, n, r) {
|
|
13534
13534
|
this._dialog = o, this._ua = o._ua, this._request = n, this._eventHandlers = r, this._reattempt = !1, this._reattemptTimer = null;
|
|
13535
13535
|
for (const a in Ud)
|
|
@@ -13539,7 +13539,7 @@ var zT = class {
|
|
|
13539
13539
|
return this._request;
|
|
13540
13540
|
}
|
|
13541
13541
|
send() {
|
|
13542
|
-
const o = new
|
|
13542
|
+
const o = new YC(this._ua, this._request, {
|
|
13543
13543
|
onRequestTimeout: () => {
|
|
13544
13544
|
this._eventHandlers.onRequestTimeout();
|
|
13545
13545
|
},
|
|
@@ -13567,13 +13567,13 @@ var zT = class {
|
|
|
13567
13567
|
}, 1e3)) : o.status_code >= 200 && o.status_code < 300 ? this._eventHandlers.onSuccessResponse(o) : o.status_code >= 300 && this._eventHandlers.onErrorResponse(o);
|
|
13568
13568
|
}
|
|
13569
13569
|
};
|
|
13570
|
-
const
|
|
13570
|
+
const XC = /* @__PURE__ */ tn(FT), JC = yn, fy = Hn, ta = bt, el = Ro, QC = FT, Pd = zn(), Ld = new JC("Dialog"), na = {
|
|
13571
13571
|
// Dialog states.
|
|
13572
13572
|
STATUS_EARLY: 1,
|
|
13573
13573
|
STATUS_CONFIRMED: 2,
|
|
13574
13574
|
STATUS_TERMINATED: 3
|
|
13575
13575
|
};
|
|
13576
|
-
var
|
|
13576
|
+
var BT = class {
|
|
13577
13577
|
// Expose C object.
|
|
13578
13578
|
static get C() {
|
|
13579
13579
|
return na;
|
|
@@ -13635,7 +13635,7 @@ var FT = class {
|
|
|
13635
13635
|
const r = Pd.cloneArray(n.extraHeaders), a = Pd.cloneObject(n.eventHandlers), c = n.body || null, e = this._createRequest(o, r, c);
|
|
13636
13636
|
return a.onAuthenticated = () => {
|
|
13637
13637
|
this._local_seqnum += 1;
|
|
13638
|
-
}, new
|
|
13638
|
+
}, new QC(this, e, a).send(), e;
|
|
13639
13639
|
}
|
|
13640
13640
|
receiveRequest(o) {
|
|
13641
13641
|
this._checkInDialogRequest(o) && (o.method === ta.ACK && this._ack_seqnum !== null ? this._ack_seqnum = null : o.method === ta.INVITE && (this._ack_seqnum = o.cseq), this._owner.receiveRequest(o));
|
|
@@ -13696,16 +13696,16 @@ var FT = class {
|
|
|
13696
13696
|
return !0;
|
|
13697
13697
|
}
|
|
13698
13698
|
};
|
|
13699
|
-
const lu = /* @__PURE__ */ tn(
|
|
13699
|
+
const lu = /* @__PURE__ */ tn(BT);
|
|
13700
13700
|
var Lh = { exports: {} };
|
|
13701
|
-
const
|
|
13701
|
+
const ZC = En.EventEmitter, eA = yn, tA = bt, nA = si, my = zn(), rA = new eA("RTCSession:DTMF"), VT = {
|
|
13702
13702
|
MIN_DURATION: 70,
|
|
13703
13703
|
MAX_DURATION: 6e3,
|
|
13704
13704
|
DEFAULT_DURATION: 100,
|
|
13705
13705
|
MIN_INTER_TONE_GAP: 50,
|
|
13706
13706
|
DEFAULT_INTER_TONE_GAP: 500
|
|
13707
13707
|
};
|
|
13708
|
-
Lh.exports = class extends
|
|
13708
|
+
Lh.exports = class extends ZC {
|
|
13709
13709
|
constructor(o) {
|
|
13710
13710
|
super(), this._session = o, this._direction = null, this._tone = null, this._duration = null, this._request = null;
|
|
13711
13711
|
}
|
|
@@ -13719,7 +13719,7 @@ Lh.exports = class extends QC {
|
|
|
13719
13719
|
if (o === void 0)
|
|
13720
13720
|
throw new TypeError("Not enough arguments");
|
|
13721
13721
|
if (this._direction = "outgoing", this._session.status !== this._session.C.STATUS_CONFIRMED && this._session.status !== this._session.C.STATUS_WAITING_FOR_ACK)
|
|
13722
|
-
throw new
|
|
13722
|
+
throw new nA.InvalidStateError(this._session.status);
|
|
13723
13723
|
const r = my.cloneArray(n.extraHeaders);
|
|
13724
13724
|
if (this.eventHandlers = my.cloneObject(n.eventHandlers), typeof o == "string")
|
|
13725
13725
|
o = o.toUpperCase();
|
|
@@ -13738,7 +13738,7 @@ Lh.exports = class extends QC {
|
|
|
13738
13738
|
originator: "local",
|
|
13739
13739
|
dtmf: this,
|
|
13740
13740
|
request: this._request
|
|
13741
|
-
}), this._session.sendRequest(
|
|
13741
|
+
}), this._session.sendRequest(tA.INFO, {
|
|
13742
13742
|
extraHeaders: r,
|
|
13743
13743
|
eventHandlers: {
|
|
13744
13744
|
onSuccessResponse: (c) => {
|
|
@@ -13773,17 +13773,17 @@ Lh.exports = class extends QC {
|
|
|
13773
13773
|
`);
|
|
13774
13774
|
a.length >= 1 && n.test(a[0]) && (this._tone = a[0].replace(n, "$2")), a.length >= 2 && r.test(a[1]) && (this._duration = parseInt(a[1].replace(r, "$2"), 10));
|
|
13775
13775
|
}
|
|
13776
|
-
this._duration || (this._duration =
|
|
13776
|
+
this._duration || (this._duration = VT.DEFAULT_DURATION), this._tone ? this._session.newDTMF({
|
|
13777
13777
|
originator: "remote",
|
|
13778
13778
|
dtmf: this,
|
|
13779
13779
|
request: o
|
|
13780
|
-
}) :
|
|
13780
|
+
}) : rA.debug("invalid INFO DTMF received, discarded");
|
|
13781
13781
|
}
|
|
13782
13782
|
};
|
|
13783
|
-
Lh.exports.C =
|
|
13784
|
-
var
|
|
13785
|
-
const
|
|
13786
|
-
var
|
|
13783
|
+
Lh.exports.C = VT;
|
|
13784
|
+
var jT = Lh.exports;
|
|
13785
|
+
const sA = /* @__PURE__ */ tn(jT), iA = En.EventEmitter, aA = bt, oA = si, lA = zn();
|
|
13786
|
+
var GT = class extends iA {
|
|
13787
13787
|
constructor(o) {
|
|
13788
13788
|
super(), this._session = o, this._direction = null, this._contentType = null, this._body = null;
|
|
13789
13789
|
}
|
|
@@ -13797,14 +13797,14 @@ var jT = class extends sA {
|
|
|
13797
13797
|
if (this._direction = "outgoing", o === void 0)
|
|
13798
13798
|
throw new TypeError("Not enough arguments");
|
|
13799
13799
|
if (this._session.status !== this._session.C.STATUS_CONFIRMED && this._session.status !== this._session.C.STATUS_WAITING_FOR_ACK)
|
|
13800
|
-
throw new
|
|
13800
|
+
throw new oA.InvalidStateError(this._session.status);
|
|
13801
13801
|
this._contentType = o, this._body = n;
|
|
13802
|
-
const a =
|
|
13802
|
+
const a = lA.cloneArray(r.extraHeaders);
|
|
13803
13803
|
a.push(`Content-Type: ${o}`), this._session.newInfo({
|
|
13804
13804
|
originator: "local",
|
|
13805
13805
|
info: this,
|
|
13806
13806
|
request: this.request
|
|
13807
|
-
}), this._session.sendRequest(
|
|
13807
|
+
}), this._session.sendRequest(aA.INFO, {
|
|
13808
13808
|
extraHeaders: a,
|
|
13809
13809
|
eventHandlers: {
|
|
13810
13810
|
onSuccessResponse: (c) => {
|
|
@@ -13840,17 +13840,17 @@ var jT = class extends sA {
|
|
|
13840
13840
|
});
|
|
13841
13841
|
}
|
|
13842
13842
|
};
|
|
13843
|
-
const vh = /* @__PURE__ */ tn(
|
|
13843
|
+
const vh = /* @__PURE__ */ tn(GT), uA = yn, gy = bt, cA = new uA("RTCSession:ReferNotifier"), qd = {
|
|
13844
13844
|
event_type: "refer",
|
|
13845
13845
|
body_type: "message/sipfrag;version=2.0",
|
|
13846
13846
|
expires: 300
|
|
13847
13847
|
};
|
|
13848
|
-
var
|
|
13848
|
+
var WT = class {
|
|
13849
13849
|
constructor(o, n, r) {
|
|
13850
13850
|
this._session = o, this._id = n, this._expires = r || qd.expires, this._active = !0, this.notify(100);
|
|
13851
13851
|
}
|
|
13852
13852
|
notify(o, n) {
|
|
13853
|
-
if (
|
|
13853
|
+
if (cA.debug("notify()"), this._active === !1)
|
|
13854
13854
|
return;
|
|
13855
13855
|
n = n || gy.REASON_PHRASE[o] || "";
|
|
13856
13856
|
let r;
|
|
@@ -13870,8 +13870,8 @@ var GT = class {
|
|
|
13870
13870
|
});
|
|
13871
13871
|
}
|
|
13872
13872
|
};
|
|
13873
|
-
const
|
|
13874
|
-
var
|
|
13873
|
+
const dA = /* @__PURE__ */ tn(WT), hA = En.EventEmitter, pA = yn, tl = bt, _A = ns(), vy = zn(), Na = new pA("RTCSession:ReferSubscriber");
|
|
13874
|
+
var KT = class extends hA {
|
|
13875
13875
|
constructor(o) {
|
|
13876
13876
|
super(), this._id = null, this._session = o;
|
|
13877
13877
|
}
|
|
@@ -13916,7 +13916,7 @@ var WT = class extends dA {
|
|
|
13916
13916
|
receiveNotify(o) {
|
|
13917
13917
|
if (Na.debug("receiveNotify()"), !o.body)
|
|
13918
13918
|
return;
|
|
13919
|
-
const n =
|
|
13919
|
+
const n = _A.parse(o.body.trim().split(`\r
|
|
13920
13920
|
`, 1)[0], "Status_Line");
|
|
13921
13921
|
if (n === -1) {
|
|
13922
13922
|
Na.debug(`receiveNotify() | error parsing NOTIFY body: "${o.body}"`);
|
|
@@ -13961,7 +13961,7 @@ var WT = class extends dA {
|
|
|
13961
13961
|
});
|
|
13962
13962
|
}
|
|
13963
13963
|
};
|
|
13964
|
-
const
|
|
13964
|
+
const fA = /* @__PURE__ */ tn(KT), mA = En.EventEmitter, yy = pr, gA = yn, Be = bt, Ma = si, Ty = Ro, Jt = zn(), nl = Ph, vA = Hn, uu = BT, yA = xo, Er = jT, by = GT, TA = WT, bA = KT, wy = ri(), we = new gA("RTCSession"), xe = {
|
|
13965
13965
|
// RTCSession states.
|
|
13966
13966
|
STATUS_NULL: 0,
|
|
13967
13967
|
STATUS_INVITE_SENT: 1,
|
|
@@ -13974,7 +13974,7 @@ const _A = /* @__PURE__ */ tn(WT), fA = En.EventEmitter, yy = pr, mA = yn, Be =
|
|
|
13974
13974
|
STATUS_TERMINATED: 8,
|
|
13975
13975
|
STATUS_CONFIRMED: 9
|
|
13976
13976
|
}, cu = ["audio", "video"];
|
|
13977
|
-
var
|
|
13977
|
+
var YT = class yh extends mA {
|
|
13978
13978
|
/**
|
|
13979
13979
|
* Expose C object.
|
|
13980
13980
|
*/
|
|
@@ -14107,7 +14107,7 @@ var KT = class yh extends fA {
|
|
|
14107
14107
|
this._contact = this._ua.contact.toString({
|
|
14108
14108
|
anonymous: k,
|
|
14109
14109
|
outbound: !0
|
|
14110
|
-
}), k ? (L.from_display_name = "Anonymous", L.from_uri = new wy("sip", "anonymous", "anonymous.invalid"), _.push(`P-Preferred-Identity: ${this._ua.configuration.uri.toString()}`), _.push("Privacy: id")) : r.fromUserName && (L.from_uri = new wy("sip", r.fromUserName, this._ua.configuration.uri.host), _.push(`P-Preferred-Identity: ${this._ua.configuration.uri.toString()}`)), r.fromDisplayName && (L.from_display_name = r.fromDisplayName), _.push(`Contact: ${this._contact}`), _.push("Content-Type: application/sdp"), this._sessionTimers.enabled && _.push(`Session-Expires: ${this._sessionTimers.defaultExpires}${this._ua.configuration.session_timers_force_refresher ? ";refresher=uac" : ""}`), this._request = new
|
|
14110
|
+
}), k ? (L.from_display_name = "Anonymous", L.from_uri = new wy("sip", "anonymous", "anonymous.invalid"), _.push(`P-Preferred-Identity: ${this._ua.configuration.uri.toString()}`), _.push("Privacy: id")) : r.fromUserName && (L.from_uri = new wy("sip", r.fromUserName, this._ua.configuration.uri.host), _.push(`P-Preferred-Identity: ${this._ua.configuration.uri.toString()}`)), r.fromDisplayName && (L.from_display_name = r.fromDisplayName), _.push(`Contact: ${this._contact}`), _.push("Content-Type: application/sdp"), this._sessionTimers.enabled && _.push(`Session-Expires: ${this._sessionTimers.defaultExpires}${this._ua.configuration.session_timers_force_refresher ? ";refresher=uac" : ""}`), this._request = new vA.InitialOutgoingInviteRequest(
|
|
14111
14111
|
n,
|
|
14112
14112
|
this._ua,
|
|
14113
14113
|
L,
|
|
@@ -14428,7 +14428,7 @@ var KT = class yh extends fA {
|
|
|
14428
14428
|
return !1;
|
|
14429
14429
|
if (n = this._ua.normalizeTarget(n), !n)
|
|
14430
14430
|
throw new TypeError(`Invalid target: ${a}`);
|
|
14431
|
-
const c = new
|
|
14431
|
+
const c = new bA(this);
|
|
14432
14432
|
c.sendRefer(n, r);
|
|
14433
14433
|
const e = c.id;
|
|
14434
14434
|
return this._referSubscribers[e] = c, c.on("requestFailed", () => {
|
|
@@ -14791,7 +14791,7 @@ var KT = class yh extends fA {
|
|
|
14791
14791
|
return;
|
|
14792
14792
|
}
|
|
14793
14793
|
n.reply(202);
|
|
14794
|
-
const r = new
|
|
14794
|
+
const r = new TA(this, n.cseq);
|
|
14795
14795
|
we.debug('emit "refer"'), this.emit("refer", {
|
|
14796
14796
|
request: n,
|
|
14797
14797
|
accept: (e, _) => {
|
|
@@ -14877,7 +14877,7 @@ var KT = class yh extends fA {
|
|
|
14877
14877
|
* Initial Request Sender
|
|
14878
14878
|
*/
|
|
14879
14879
|
_sendInitialRequest(n, r, a) {
|
|
14880
|
-
const c = new
|
|
14880
|
+
const c = new yA(this._ua, this._request, {
|
|
14881
14881
|
onRequestTimeout: () => {
|
|
14882
14882
|
this.onRequestTimeout();
|
|
14883
14883
|
},
|
|
@@ -15288,8 +15288,8 @@ var KT = class yh extends fA {
|
|
|
15288
15288
|
});
|
|
15289
15289
|
}
|
|
15290
15290
|
};
|
|
15291
|
-
const
|
|
15292
|
-
var
|
|
15291
|
+
const wA = /* @__PURE__ */ tn(YT), SA = En.EventEmitter, EA = yn, Hd = bt, CA = Hn, rl = zn(), AA = xo, Sy = si, IA = ri(), du = new EA("Message");
|
|
15292
|
+
var RA = class extends SA {
|
|
15293
15293
|
constructor(o) {
|
|
15294
15294
|
super(), this._ua = o, this._request = null, this._closed = !1, this._direction = null, this._local_identity = null, this._remote_identity = null, this._is_replied = !1, this._data = {};
|
|
15295
15295
|
}
|
|
@@ -15309,17 +15309,17 @@ var IA = class extends wA {
|
|
|
15309
15309
|
if (o = this._ua.normalizeTarget(o), !o)
|
|
15310
15310
|
throw new TypeError(`Invalid target: ${a}`);
|
|
15311
15311
|
const c = rl.cloneArray(r.extraHeaders), e = rl.cloneObject(r.eventHandlers), _ = r.contentType || "text/plain", g = {};
|
|
15312
|
-
r.fromUserName && (g.from_uri = new
|
|
15312
|
+
r.fromUserName && (g.from_uri = new IA("sip", r.fromUserName, this._ua.configuration.uri.host), c.push(`P-Preferred-Identity: ${this._ua.configuration.uri.toString()}`)), r.fromDisplayName && (g.from_display_name = r.fromDisplayName);
|
|
15313
15313
|
for (const C in e)
|
|
15314
15314
|
Object.prototype.hasOwnProperty.call(e, C) && this.on(C, e[C]);
|
|
15315
|
-
c.push(`Content-Type: ${_}`), this._request = new
|
|
15315
|
+
c.push(`Content-Type: ${_}`), this._request = new CA.OutgoingRequest(
|
|
15316
15316
|
Hd.MESSAGE,
|
|
15317
15317
|
o,
|
|
15318
15318
|
this._ua,
|
|
15319
15319
|
g,
|
|
15320
15320
|
c
|
|
15321
15321
|
), n && (this._request.body = n);
|
|
15322
|
-
const d = new
|
|
15322
|
+
const d = new AA(this._ua, this._request, {
|
|
15323
15323
|
onRequestTimeout: () => {
|
|
15324
15324
|
this._onRequestTimeout();
|
|
15325
15325
|
},
|
|
@@ -15409,8 +15409,8 @@ var IA = class extends wA {
|
|
|
15409
15409
|
});
|
|
15410
15410
|
}
|
|
15411
15411
|
};
|
|
15412
|
-
const
|
|
15413
|
-
var
|
|
15412
|
+
const xA = En.EventEmitter, $A = yn, zd = bt, OA = Hn, sl = zn(), kA = xo, Ey = si, hu = new $A("Options");
|
|
15413
|
+
var DA = class extends xA {
|
|
15414
15414
|
constructor(o) {
|
|
15415
15415
|
super(), this._ua = o, this._request = null, this._closed = !1, this._direction = null, this._local_identity = null, this._remote_identity = null, this._is_replied = !1, this._data = {};
|
|
15416
15416
|
}
|
|
@@ -15432,14 +15432,14 @@ var kA = class extends RA {
|
|
|
15432
15432
|
const c = sl.cloneArray(r.extraHeaders), e = sl.cloneObject(r.eventHandlers), _ = r.contentType || "application/sdp";
|
|
15433
15433
|
for (const d in e)
|
|
15434
15434
|
Object.prototype.hasOwnProperty.call(e, d) && this.on(d, e[d]);
|
|
15435
|
-
c.push(`Content-Type: ${_}`), this._request = new
|
|
15435
|
+
c.push(`Content-Type: ${_}`), this._request = new OA.OutgoingRequest(
|
|
15436
15436
|
zd.OPTIONS,
|
|
15437
15437
|
o,
|
|
15438
15438
|
this._ua,
|
|
15439
15439
|
null,
|
|
15440
15440
|
c
|
|
15441
15441
|
), n && (this._request.body = n);
|
|
15442
|
-
const g = new
|
|
15442
|
+
const g = new kA(this._ua, this._request, {
|
|
15443
15443
|
onRequestTimeout: () => {
|
|
15444
15444
|
this._onRequestTimeout();
|
|
15445
15445
|
},
|
|
@@ -15529,7 +15529,7 @@ var kA = class extends RA {
|
|
|
15529
15529
|
});
|
|
15530
15530
|
}
|
|
15531
15531
|
}, qh = {};
|
|
15532
|
-
const
|
|
15532
|
+
const NA = yn, Fd = zn(), MA = ns(), il = new NA("Socket");
|
|
15533
15533
|
qh.isSocket = (o) => {
|
|
15534
15534
|
if (Array.isArray(o))
|
|
15535
15535
|
return !1;
|
|
@@ -15540,7 +15540,7 @@ qh.isSocket = (o) => {
|
|
|
15540
15540
|
throw il.warn("missing or invalid JsSIP.Socket url property"), new Error("Missing or invalid JsSIP.Socket url property");
|
|
15541
15541
|
if (!Fd.isString(o.via_transport))
|
|
15542
15542
|
throw il.warn("missing or invalid JsSIP.Socket via_transport property"), new Error("Missing or invalid JsSIP.Socket via_transport property");
|
|
15543
|
-
if (
|
|
15543
|
+
if (MA.parse(o.sip_uri, "SIP_URI") === -1)
|
|
15544
15544
|
throw il.warn("missing or invalid JsSIP.Socket sip_uri property"), new Error("missing or invalid JsSIP.Socket sip_uri property");
|
|
15545
15545
|
} catch {
|
|
15546
15546
|
return !1;
|
|
@@ -15555,7 +15555,7 @@ qh.isSocket = (o) => {
|
|
|
15555
15555
|
}
|
|
15556
15556
|
return !0;
|
|
15557
15557
|
};
|
|
15558
|
-
const
|
|
15558
|
+
const UA = yn, PA = qh, Cy = bt, dr = new UA("Transport"), Ur = {
|
|
15559
15559
|
// Transport status.
|
|
15560
15560
|
STATUS_CONNECTED: 0,
|
|
15561
15561
|
STATUS_CONNECTING: 1,
|
|
@@ -15571,7 +15571,7 @@ const MA = yn, UA = qh, Cy = bt, dr = new MA("Transport"), Ur = {
|
|
|
15571
15571
|
max_interval: Cy.CONNECTION_RECOVERY_MAX_INTERVAL
|
|
15572
15572
|
}
|
|
15573
15573
|
};
|
|
15574
|
-
var
|
|
15574
|
+
var XT = class {
|
|
15575
15575
|
constructor(o, n = Ur.recovery_options) {
|
|
15576
15576
|
dr.debug("new()"), this.status = Ur.STATUS_DISCONNECTED, this.socket = null, this.sockets = [], this.recovery_options = n, this.recover_attempts = 0, this.recovery_timer = null, this.close_requested = !1;
|
|
15577
15577
|
try {
|
|
@@ -15582,7 +15582,7 @@ var YT = class {
|
|
|
15582
15582
|
if (typeof o > "u")
|
|
15583
15583
|
throw new TypeError("Invalid argument. undefined 'sockets' argument");
|
|
15584
15584
|
o instanceof Array || (o = [o]), o.forEach(function(r) {
|
|
15585
|
-
if (!
|
|
15585
|
+
if (!PA.isSocket(r.socket))
|
|
15586
15586
|
throw new TypeError("Invalid argument. invalid 'JsSIP.Socket' instance");
|
|
15587
15587
|
if (r.weight && !Number(r.weight))
|
|
15588
15588
|
throw new TypeError("Invalid argument. 'weight' attribute is not a number");
|
|
@@ -15705,10 +15705,10 @@ ${o}
|
|
|
15705
15705
|
this.ondata({ transport: this, message: o });
|
|
15706
15706
|
}
|
|
15707
15707
|
};
|
|
15708
|
-
const
|
|
15709
|
-
var
|
|
15710
|
-
const
|
|
15711
|
-
|
|
15708
|
+
const LA = /* @__PURE__ */ tn(XT);
|
|
15709
|
+
var JT = {};
|
|
15710
|
+
const qA = yn, Th = ns(), bh = Hn, pu = new qA("Parser");
|
|
15711
|
+
JT.parseMessage = (o, n) => {
|
|
15712
15712
|
let r, a, c = o.indexOf(`\r
|
|
15713
15713
|
`);
|
|
15714
15714
|
if (c === -1) {
|
|
@@ -15725,14 +15725,14 @@ XT.parseMessage = (o, n) => {
|
|
|
15725
15725
|
r.data = o;
|
|
15726
15726
|
let g = c + 2;
|
|
15727
15727
|
for (; ; ) {
|
|
15728
|
-
if (c =
|
|
15728
|
+
if (c = HA(o, g), c === -2) {
|
|
15729
15729
|
a = g + 2;
|
|
15730
15730
|
break;
|
|
15731
15731
|
} else if (c === -1) {
|
|
15732
15732
|
pu.warn("parseMessage() | malformed message");
|
|
15733
15733
|
return;
|
|
15734
15734
|
}
|
|
15735
|
-
if (_ =
|
|
15735
|
+
if (_ = zA(r, o, g, c), _ !== !0) {
|
|
15736
15736
|
pu.warn("parseMessage() |", _.error);
|
|
15737
15737
|
return;
|
|
15738
15738
|
}
|
|
@@ -15745,7 +15745,7 @@ XT.parseMessage = (o, n) => {
|
|
|
15745
15745
|
r.body = o.substring(a);
|
|
15746
15746
|
return r;
|
|
15747
15747
|
};
|
|
15748
|
-
function
|
|
15748
|
+
function HA(o, n) {
|
|
15749
15749
|
let r = n, a = 0, c = 0;
|
|
15750
15750
|
if (o.substring(r, r + 2).match(/(^\r\n)/))
|
|
15751
15751
|
return -2;
|
|
@@ -15757,7 +15757,7 @@ function qA(o, n) {
|
|
|
15757
15757
|
}
|
|
15758
15758
|
return a;
|
|
15759
15759
|
}
|
|
15760
|
-
function
|
|
15760
|
+
function zA(o, n, r, a) {
|
|
15761
15761
|
let c;
|
|
15762
15762
|
const e = n.indexOf(":", r), _ = n.substring(r, e).trim(), g = n.substring(e + 1, a).trim();
|
|
15763
15763
|
switch (_.toLowerCase()) {
|
|
@@ -15834,50 +15834,50 @@ function HA(o, n, r, a) {
|
|
|
15834
15834
|
error: `error parsing header "${_}"`
|
|
15835
15835
|
} : !0;
|
|
15836
15836
|
}
|
|
15837
|
-
const
|
|
15838
|
-
jA,
|
|
15837
|
+
const FA = yn, QT = bt, Ay = Hn, Hh = zn(), zh = new FA("sanityCheck"), BA = [QA], VA = [
|
|
15839
15838
|
GA,
|
|
15840
15839
|
WA,
|
|
15841
|
-
KA
|
|
15842
|
-
|
|
15843
|
-
|
|
15844
|
-
XA
|
|
15840
|
+
KA,
|
|
15841
|
+
YA
|
|
15842
|
+
], jA = [
|
|
15843
|
+
XA,
|
|
15844
|
+
JA
|
|
15845
15845
|
];
|
|
15846
|
-
let jt, Es,
|
|
15847
|
-
var
|
|
15848
|
-
jt = o, Es = n,
|
|
15849
|
-
for (const a of
|
|
15846
|
+
let jt, Es, ZT;
|
|
15847
|
+
var eb = (o, n, r) => {
|
|
15848
|
+
jt = o, Es = n, ZT = r;
|
|
15849
|
+
for (const a of BA)
|
|
15850
15850
|
if (a() === !1)
|
|
15851
15851
|
return !1;
|
|
15852
15852
|
if (jt instanceof Ay.IncomingRequest) {
|
|
15853
|
-
for (const a of
|
|
15853
|
+
for (const a of VA)
|
|
15854
15854
|
if (a() === !1)
|
|
15855
15855
|
return !1;
|
|
15856
15856
|
} else if (jt instanceof Ay.IncomingResponse) {
|
|
15857
|
-
for (const a of
|
|
15857
|
+
for (const a of jA)
|
|
15858
15858
|
if (a() === !1)
|
|
15859
15859
|
return !1;
|
|
15860
15860
|
}
|
|
15861
15861
|
return !0;
|
|
15862
15862
|
};
|
|
15863
|
-
function
|
|
15863
|
+
function GA() {
|
|
15864
15864
|
if (jt.s("to").uri.scheme !== "sip")
|
|
15865
15865
|
return yl(416), !1;
|
|
15866
15866
|
}
|
|
15867
|
-
function
|
|
15867
|
+
function WA() {
|
|
15868
15868
|
if (!jt.to_tag && jt.call_id.substr(0, 5) === Es.configuration.jssip_id)
|
|
15869
15869
|
return yl(482), !1;
|
|
15870
15870
|
}
|
|
15871
|
-
function
|
|
15871
|
+
function KA() {
|
|
15872
15872
|
const o = Hh.str_utf8_length(jt.body), n = jt.getHeader("content-length");
|
|
15873
15873
|
if (o < n)
|
|
15874
15874
|
return yl(400), !1;
|
|
15875
15875
|
}
|
|
15876
|
-
function
|
|
15876
|
+
function YA() {
|
|
15877
15877
|
const o = jt.from_tag, n = jt.call_id, r = jt.cseq;
|
|
15878
15878
|
let a;
|
|
15879
15879
|
if (!jt.to_tag)
|
|
15880
|
-
if (jt.method ===
|
|
15880
|
+
if (jt.method === QT.INVITE) {
|
|
15881
15881
|
if (Es._transactions.ist[jt.via_branch])
|
|
15882
15882
|
return !1;
|
|
15883
15883
|
for (const c in Es._transactions.ist)
|
|
@@ -15891,16 +15891,16 @@ function KA() {
|
|
|
15891
15891
|
return yl(482), !1;
|
|
15892
15892
|
}
|
|
15893
15893
|
}
|
|
15894
|
-
function
|
|
15894
|
+
function XA() {
|
|
15895
15895
|
if (jt.getHeaders("via").length > 1)
|
|
15896
15896
|
return zh.debug("more than one Via header field present in the response, dropping the response"), !1;
|
|
15897
15897
|
}
|
|
15898
|
-
function
|
|
15898
|
+
function JA() {
|
|
15899
15899
|
const o = Hh.str_utf8_length(jt.body), n = jt.getHeader("content-length");
|
|
15900
15900
|
if (o < n)
|
|
15901
15901
|
return zh.debug("message body length is lower than the value in Content-Length header field, dropping the response"), !1;
|
|
15902
15902
|
}
|
|
15903
|
-
function
|
|
15903
|
+
function QA() {
|
|
15904
15904
|
const o = ["from", "to", "call_id", "cseq", "via"];
|
|
15905
15905
|
for (const n of o)
|
|
15906
15906
|
if (!jt.hasHeader(n))
|
|
@@ -15908,7 +15908,7 @@ function JA() {
|
|
|
15908
15908
|
}
|
|
15909
15909
|
function yl(o) {
|
|
15910
15910
|
const n = jt.getHeaders("via");
|
|
15911
|
-
let r, a = `SIP/2.0 ${o} ${
|
|
15911
|
+
let r, a = `SIP/2.0 ${o} ${QT.REASON_PHRASE[o]}\r
|
|
15912
15912
|
`;
|
|
15913
15913
|
for (const c of n)
|
|
15914
15914
|
a += `Via: ${c}\r
|
|
@@ -15918,9 +15918,9 @@ function yl(o) {
|
|
|
15918
15918
|
`, a += `Call-ID: ${jt.call_id}\r
|
|
15919
15919
|
`, a += `CSeq: ${jt.cseq} ${jt.method}\r
|
|
15920
15920
|
`, a += `\r
|
|
15921
|
-
`,
|
|
15921
|
+
`, ZT.send(a);
|
|
15922
15922
|
}
|
|
15923
|
-
const
|
|
15923
|
+
const ZA = /* @__PURE__ */ tn(eb);
|
|
15924
15924
|
var Tl = {};
|
|
15925
15925
|
const wo = zn(), qa = bt, Bd = ns(), Iy = ri(), Vd = qh, jd = si;
|
|
15926
15926
|
Tl.settings = {
|
|
@@ -16102,7 +16102,7 @@ Tl.load = (o, n) => {
|
|
|
16102
16102
|
throw new jd.ConfigurationError(r, a);
|
|
16103
16103
|
}
|
|
16104
16104
|
};
|
|
16105
|
-
const
|
|
16105
|
+
const e1 = En.EventEmitter, t1 = yn, Nn = bt, n1 = VC, Ry = YT, xy = RA, $y = DA, Gd = Ro, r1 = XT, fu = zn(), s1 = si, i1 = ri(), a1 = JT, Wd = Hn, o1 = eb, Kd = Tl, Kt = new t1("UA"), Pn = {
|
|
16106
16106
|
// UA status codes.
|
|
16107
16107
|
STATUS_INIT: 0,
|
|
16108
16108
|
STATUS_READY: 1,
|
|
@@ -16112,7 +16112,7 @@ const ZA = En.EventEmitter, e1 = yn, Nn = bt, t1 = BC, Ry = KT, xy = IA, $y = kA
|
|
|
16112
16112
|
CONFIGURATION_ERROR: 1,
|
|
16113
16113
|
NETWORK_ERROR: 2
|
|
16114
16114
|
};
|
|
16115
|
-
var
|
|
16115
|
+
var tb = class extends e1 {
|
|
16116
16116
|
// Expose C object.
|
|
16117
16117
|
static get C() {
|
|
16118
16118
|
return Pn;
|
|
@@ -16132,7 +16132,7 @@ var eb = class extends ZA {
|
|
|
16132
16132
|
} catch (n) {
|
|
16133
16133
|
throw this._status = Pn.STATUS_NOT_READY, this._error = Pn.CONFIGURATION_ERROR, n;
|
|
16134
16134
|
}
|
|
16135
|
-
this._registrator = new
|
|
16135
|
+
this._registrator = new n1(this);
|
|
16136
16136
|
}
|
|
16137
16137
|
get C() {
|
|
16138
16138
|
return Pn;
|
|
@@ -16509,19 +16509,19 @@ var eb = class extends ZA {
|
|
|
16509
16509
|
const n = this._configuration.uri.clone();
|
|
16510
16510
|
n.user = null, this._configuration.hostport_params = n.toString().replace(/^sip:/i, "");
|
|
16511
16511
|
try {
|
|
16512
|
-
this._transport = new
|
|
16512
|
+
this._transport = new r1(this._configuration.sockets, {
|
|
16513
16513
|
// Recovery options.
|
|
16514
16514
|
max_interval: this._configuration.connection_recovery_max_interval,
|
|
16515
16515
|
min_interval: this._configuration.connection_recovery_min_interval
|
|
16516
|
-
}), this._transport.onconnecting =
|
|
16516
|
+
}), this._transport.onconnecting = l1.bind(this), this._transport.onconnect = u1.bind(this), this._transport.ondisconnect = c1.bind(this), this._transport.ondata = d1.bind(this);
|
|
16517
16517
|
} catch (a) {
|
|
16518
|
-
throw Kt.warn(a), new
|
|
16518
|
+
throw Kt.warn(a), new s1.ConfigurationError("sockets", this._configuration.sockets);
|
|
16519
16519
|
}
|
|
16520
16520
|
if (delete this._configuration.sockets, this._configuration.authorization_user || (this._configuration.authorization_user = this._configuration.uri.user), !this._configuration.registrar_server) {
|
|
16521
16521
|
const a = this._configuration.uri.clone();
|
|
16522
16522
|
a.user = null, a.clearParams(), a.clearHeaders(), this._configuration.registrar_server = a;
|
|
16523
16523
|
}
|
|
16524
|
-
this._configuration.no_answer_timeout *= 1e3, this._configuration.contact_uri ? this._configuration.via_host = this._configuration.contact_uri.host : this._configuration.contact_uri = new
|
|
16524
|
+
this._configuration.no_answer_timeout *= 1e3, this._configuration.contact_uri ? this._configuration.via_host = this._configuration.contact_uri.host : this._configuration.contact_uri = new i1("sip", fu.createRandomToken(8), this._configuration.via_host, null, { transport: "ws" }), this._contact = {
|
|
16525
16525
|
pub_gruu: null,
|
|
16526
16526
|
temp_gruu: null,
|
|
16527
16527
|
uri: this._configuration.contact_uri,
|
|
@@ -16566,23 +16566,23 @@ var eb = class extends ZA {
|
|
|
16566
16566
|
}
|
|
16567
16567
|
}
|
|
16568
16568
|
};
|
|
16569
|
-
function
|
|
16569
|
+
function l1(o) {
|
|
16570
16570
|
this.emit("connecting", o);
|
|
16571
16571
|
}
|
|
16572
|
-
function
|
|
16572
|
+
function u1(o) {
|
|
16573
16573
|
this._status !== Pn.STATUS_USER_CLOSED && (this._status = Pn.STATUS_READY, this._error = null, this.emit("connected", o), this._dynConfiguration.register && this._registrator.register());
|
|
16574
16574
|
}
|
|
16575
|
-
function
|
|
16575
|
+
function c1(o) {
|
|
16576
16576
|
const n = ["nict", "ict", "nist", "ist"];
|
|
16577
16577
|
for (const r of n)
|
|
16578
16578
|
for (const a in this._transactions[r])
|
|
16579
16579
|
Object.prototype.hasOwnProperty.call(this._transactions[r], a) && this._transactions[r][a].onTransportError();
|
|
16580
16580
|
this.emit("disconnected", o), this._registrator.onTransportClosed(), this._status !== Pn.STATUS_USER_CLOSED && (this._status = Pn.STATUS_NOT_READY, this._error = Pn.NETWORK_ERROR);
|
|
16581
16581
|
}
|
|
16582
|
-
function
|
|
16582
|
+
function d1(o) {
|
|
16583
16583
|
const n = o.transport;
|
|
16584
16584
|
let r = o.message;
|
|
16585
|
-
if (r =
|
|
16585
|
+
if (r = a1.parseMessage(r, this), !!r && !(this._status === Pn.STATUS_USER_CLOSED && r instanceof Wd.IncomingRequest) && o1(r, this, n)) {
|
|
16586
16586
|
if (r instanceof Wd.IncomingRequest)
|
|
16587
16587
|
r.transport = n, this.receiveRequest(r);
|
|
16588
16588
|
else if (r instanceof Wd.IncomingResponse) {
|
|
@@ -16600,35 +16600,35 @@ function c1(o) {
|
|
|
16600
16600
|
}
|
|
16601
16601
|
}
|
|
16602
16602
|
}
|
|
16603
|
-
const
|
|
16603
|
+
const h1 = /* @__PURE__ */ tn(tb);
|
|
16604
16604
|
var kn = [];
|
|
16605
16605
|
for (var Yd = 0; Yd < 256; ++Yd)
|
|
16606
16606
|
kn.push((Yd + 256).toString(16).slice(1));
|
|
16607
|
-
function
|
|
16607
|
+
function p1(o, n = 0) {
|
|
16608
16608
|
return (kn[o[n + 0]] + kn[o[n + 1]] + kn[o[n + 2]] + kn[o[n + 3]] + "-" + kn[o[n + 4]] + kn[o[n + 5]] + "-" + kn[o[n + 6]] + kn[o[n + 7]] + "-" + kn[o[n + 8]] + kn[o[n + 9]] + "-" + kn[o[n + 10]] + kn[o[n + 11]] + kn[o[n + 12]] + kn[o[n + 13]] + kn[o[n + 14]] + kn[o[n + 15]]).toLowerCase();
|
|
16609
16609
|
}
|
|
16610
|
-
var mu,
|
|
16611
|
-
function
|
|
16610
|
+
var mu, _1 = new Uint8Array(16);
|
|
16611
|
+
function f1() {
|
|
16612
16612
|
if (!mu && (mu = typeof crypto < "u" && crypto.getRandomValues && crypto.getRandomValues.bind(crypto), !mu))
|
|
16613
16613
|
throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");
|
|
16614
|
-
return mu(
|
|
16614
|
+
return mu(_1);
|
|
16615
16615
|
}
|
|
16616
|
-
var
|
|
16616
|
+
var m1 = typeof crypto < "u" && crypto.randomUUID && crypto.randomUUID.bind(crypto);
|
|
16617
16617
|
const Oy = {
|
|
16618
|
-
randomUUID:
|
|
16618
|
+
randomUUID: m1
|
|
16619
16619
|
};
|
|
16620
16620
|
function ky(o, n, r) {
|
|
16621
16621
|
if (Oy.randomUUID && !n && !o)
|
|
16622
16622
|
return Oy.randomUUID();
|
|
16623
16623
|
o = o || {};
|
|
16624
|
-
var a = o.random || (o.rng ||
|
|
16624
|
+
var a = o.random || (o.rng || f1)();
|
|
16625
16625
|
if (a[6] = a[6] & 15 | 64, a[8] = a[8] & 63 | 128, n) {
|
|
16626
16626
|
r = r || 0;
|
|
16627
16627
|
for (var c = 0; c < 16; ++c)
|
|
16628
16628
|
n[r + c] = a[c];
|
|
16629
16629
|
return n;
|
|
16630
16630
|
}
|
|
16631
|
-
return
|
|
16631
|
+
return p1(a);
|
|
16632
16632
|
}
|
|
16633
16633
|
var kt = zn();
|
|
16634
16634
|
const Zs = /* @__PURE__ */ tn(kt), Xd = new ic("Dialog"), ra = {
|
|
@@ -16702,7 +16702,7 @@ class gu {
|
|
|
16702
16702
|
const a = Zs.cloneArray(r.extraHeaders), c = Zs.cloneObject(r.eventHandlers), e = r.body || null, _ = this._createRequest(n, a, e);
|
|
16703
16703
|
return c.onAuthenticated = () => {
|
|
16704
16704
|
this._local_seqnum += 1;
|
|
16705
|
-
}, new
|
|
16705
|
+
}, new XC(this, _, c).send(), _;
|
|
16706
16706
|
}
|
|
16707
16707
|
receiveRequest(n) {
|
|
16708
16708
|
this._checkInDialogRequest(n) && (n.method === ue.ACK && this._ack_seqnum !== null ? this._ack_seqnum = null : n.method === ue.INVITE && (this._ack_seqnum = n.cseq), this._owner.receiveRequest(n));
|
|
@@ -16763,7 +16763,7 @@ class gu {
|
|
|
16763
16763
|
return !0;
|
|
16764
16764
|
}
|
|
16765
16765
|
}
|
|
16766
|
-
class
|
|
16766
|
+
class g1 {
|
|
16767
16767
|
constructor(n, r) {
|
|
16768
16768
|
ws(this, "plugin", null), ws(this, "rtcpPeer", null), ws(this, "handleId", 0), ws(this, "info", null), ws(this, "joinResult", null), ws(this, "state", {}), ws(this, "stream", null), ws(this, "loaded", !1), ws(this, "aTracks", []), ws(this, "vTracks", []), this.info = n, this.plugin = r, this.rtcpPeer = new RTCPeerConnection({
|
|
16769
16769
|
iceServers: []
|
|
@@ -16906,8 +16906,8 @@ class ts {
|
|
|
16906
16906
|
}
|
|
16907
16907
|
}
|
|
16908
16908
|
}
|
|
16909
|
-
var
|
|
16910
|
-
const za = /* @__PURE__ */ tn(
|
|
16909
|
+
var v1 = ri();
|
|
16910
|
+
const za = /* @__PURE__ */ tn(v1), hr = {
|
|
16911
16911
|
LEAVE: "Leave",
|
|
16912
16912
|
DETACH: "Detach",
|
|
16913
16913
|
AUDIO_CHANGE: "AudioChange",
|
|
@@ -16918,7 +16918,7 @@ const za = /* @__PURE__ */ tn(g1), hr = {
|
|
|
16918
16918
|
TRICKLE: "Trickle",
|
|
16919
16919
|
SUBSCRIBER: "Subscriber",
|
|
16920
16920
|
PUBLISHER: "Publisher"
|
|
16921
|
-
}, Ae = new ic("JanusSession"),
|
|
16921
|
+
}, Ae = new ic("JanusSession"), y1 = "/opt/recordings/", Oe = {
|
|
16922
16922
|
// JanusSession states.
|
|
16923
16923
|
STATUS_NULL: 0,
|
|
16924
16924
|
STATUS_INVITE_SENT: 1,
|
|
@@ -17630,7 +17630,7 @@ class Ju extends En.EventEmitter {
|
|
|
17630
17630
|
return !1;
|
|
17631
17631
|
if (n = this._ua.normalizeTarget(n), !n)
|
|
17632
17632
|
throw new TypeError(`Invalid target: ${a}`);
|
|
17633
|
-
const c = new
|
|
17633
|
+
const c = new fA(this);
|
|
17634
17634
|
c.sendRefer(n, r);
|
|
17635
17635
|
const e = c.id;
|
|
17636
17636
|
return this._referSubscribers[e] = c, c.on("requestFailed", () => {
|
|
@@ -17699,7 +17699,7 @@ class Ju extends En.EventEmitter {
|
|
|
17699
17699
|
case ue.INFO:
|
|
17700
17700
|
if (this._status === Oe.STATUS_1XX_RECEIVED || this._status === Oe.STATUS_WAITING_FOR_ANSWER || this._status === Oe.STATUS_ANSWERED || this._status === Oe.STATUS_WAITING_FOR_ACK || this._status === Oe.STATUS_CONFIRMED) {
|
|
17701
17701
|
const r = n.hasHeader("Content-Type") ? n.getHeader("Content-Type").toLowerCase() : void 0;
|
|
17702
|
-
r && r.match(/^application\/dtmf-relay/i) ? new
|
|
17702
|
+
r && r.match(/^application\/dtmf-relay/i) ? new sA(this).init_incoming(n) : r !== void 0 ? new vh(this).init_incoming(n) : n.reply(415);
|
|
17703
17703
|
} else
|
|
17704
17704
|
n.reply(403, "Wrong Status");
|
|
17705
17705
|
break;
|
|
@@ -18032,7 +18032,7 @@ class Ju extends En.EventEmitter {
|
|
|
18032
18032
|
return;
|
|
18033
18033
|
}
|
|
18034
18034
|
n.reply(202);
|
|
18035
|
-
const r = new
|
|
18035
|
+
const r = new dA(this, n.cseq);
|
|
18036
18036
|
Ae.debug('emit "refer"'), this.emit("refer", {
|
|
18037
18037
|
request: n,
|
|
18038
18038
|
accept: (e, _) => {
|
|
@@ -18218,7 +18218,7 @@ class Ju extends En.EventEmitter {
|
|
|
18218
18218
|
});
|
|
18219
18219
|
}
|
|
18220
18220
|
getRecordFileName() {
|
|
18221
|
-
return
|
|
18221
|
+
return y1 + this.room_id + btoa(unescape(encodeURIComponent(this.displayName))) + Date.now();
|
|
18222
18222
|
}
|
|
18223
18223
|
async processIceCandidates() {
|
|
18224
18224
|
for (let n = 0; n < this.iceCandidates.length; n++)
|
|
@@ -18393,7 +18393,7 @@ class Ju extends En.EventEmitter {
|
|
|
18393
18393
|
var r, a, c, e, _, g, d, C;
|
|
18394
18394
|
const S = { ...this.memberList };
|
|
18395
18395
|
(a = (r = n?.plugindata) == null ? void 0 : r.data) == null || a.publishers.forEach((R) => {
|
|
18396
|
-
delete S[R.id], !this.memberList[R.id] && !this.myFeedList.includes(R.id) && R.clientID !== this.client_id && (this.memberList[R.id] = new
|
|
18396
|
+
delete S[R.id], !this.memberList[R.id] && !this.myFeedList.includes(R.id) && R.clientID !== this.client_id && (this.memberList[R.id] = new g1(R, this), this._attachMember(this.memberList[R.id]));
|
|
18397
18397
|
}), ((e = (c = n?.plugindata) == null ? void 0 : c.data) == null ? void 0 : e.videoroom) === "synced" && Object.keys(S).forEach((R) => {
|
|
18398
18398
|
S[R].hangup(), delete this.memberList[R];
|
|
18399
18399
|
}), this.publishers = (g = (_ = n?.plugindata) == null ? void 0 : _.data) == null ? void 0 : g.publishers, this.private_id = (C = (d = n?.plugindata) == null ? void 0 : d.data) == null ? void 0 : C.private_id;
|
|
@@ -19094,7 +19094,7 @@ a=path:${n.getHeader("Use-Path")} msrp://${this._ua._configuration.authorization
|
|
|
19094
19094
|
onmessage(n) {
|
|
19095
19095
|
const r = new yo(n.data);
|
|
19096
19096
|
if (this.status === "auth" && r.code === 401) {
|
|
19097
|
-
const a = this.parseAuth(r.getHeader("WWW-Authenticate")), c = new
|
|
19097
|
+
const a = this.parseAuth(r.getHeader("WWW-Authenticate")), c = new OC(this.credentials);
|
|
19098
19098
|
c.authenticate({
|
|
19099
19099
|
method: "AUTH",
|
|
19100
19100
|
ruri: `msrp://${this._ua._configuration.realm}:2856;ws`,
|
|
@@ -19448,8 +19448,8 @@ a=path:${n.getHeader("Use-Path")} msrp://${this._ua._configuration.authorization
|
|
|
19448
19448
|
});
|
|
19449
19449
|
}
|
|
19450
19450
|
}
|
|
19451
|
-
var
|
|
19452
|
-
const wh = /* @__PURE__ */ tn(
|
|
19451
|
+
var T1 = ns();
|
|
19452
|
+
const wh = /* @__PURE__ */ tn(T1), yu = new ic("Parser"), b1 = (o, n) => {
|
|
19453
19453
|
let r, a, c = o.indexOf(`\r
|
|
19454
19454
|
`);
|
|
19455
19455
|
if (c === -1) {
|
|
@@ -19466,14 +19466,14 @@ const wh = /* @__PURE__ */ tn(y1), yu = new ic("Parser"), T1 = (o, n) => {
|
|
|
19466
19466
|
r.data = o;
|
|
19467
19467
|
let g = c + 2;
|
|
19468
19468
|
for (; ; ) {
|
|
19469
|
-
if (c =
|
|
19469
|
+
if (c = w1(o, g), c === -2) {
|
|
19470
19470
|
a = g + 2;
|
|
19471
19471
|
break;
|
|
19472
19472
|
} else if (c === -1) {
|
|
19473
19473
|
yu.warn("parseMessage() | malformed message");
|
|
19474
19474
|
return;
|
|
19475
19475
|
}
|
|
19476
|
-
if (_ =
|
|
19476
|
+
if (_ = S1(r, o, g, c), _ !== !0) {
|
|
19477
19477
|
yu.warn("parseMessage() |", _.error);
|
|
19478
19478
|
return;
|
|
19479
19479
|
}
|
|
@@ -19486,7 +19486,7 @@ const wh = /* @__PURE__ */ tn(y1), yu = new ic("Parser"), T1 = (o, n) => {
|
|
|
19486
19486
|
r.body = o.substring(a);
|
|
19487
19487
|
return r;
|
|
19488
19488
|
};
|
|
19489
|
-
function
|
|
19489
|
+
function w1(o, n) {
|
|
19490
19490
|
let r = n, a = 0, c = 0;
|
|
19491
19491
|
if (o.substring(r, r + 2).match(/(^\r\n)/))
|
|
19492
19492
|
return -2;
|
|
@@ -19498,7 +19498,7 @@ function b1(o, n) {
|
|
|
19498
19498
|
}
|
|
19499
19499
|
return a;
|
|
19500
19500
|
}
|
|
19501
|
-
function
|
|
19501
|
+
function S1(o, n, r, a) {
|
|
19502
19502
|
let c;
|
|
19503
19503
|
const e = n.indexOf(":", r), _ = n.substring(r, e).trim(), g = n.substring(e + 1, a).trim();
|
|
19504
19504
|
switch (_.toLowerCase()) {
|
|
@@ -19575,10 +19575,10 @@ function w1(o, n, r, a) {
|
|
|
19575
19575
|
error: `error parsing header "${_}"`
|
|
19576
19576
|
} : !0;
|
|
19577
19577
|
}
|
|
19578
|
-
const
|
|
19579
|
-
parseMessage:
|
|
19578
|
+
const E1 = {
|
|
19579
|
+
parseMessage: b1
|
|
19580
19580
|
}, al = new ic("Registrator"), Tu = 10;
|
|
19581
|
-
class
|
|
19581
|
+
class C1 {
|
|
19582
19582
|
constructor(n, r) {
|
|
19583
19583
|
this._reg_id = 1, this._ua = n, this._transport = r, this._registrar = n.configuration.registrar_server, this._expires = n.configuration.register_expires, this._call_id = Zs.createRandomToken(22), this._cseq = 0, this._to_uri = n.configuration.uri, this._registrationTimer = null, this._registering = !1, this._registered = !1, this._contact = this._ua.contact.toString();
|
|
19584
19584
|
const a = this._contact.indexOf(">");
|
|
@@ -19752,8 +19752,8 @@ const cn = console, aa = {
|
|
|
19752
19752
|
// UA error codes.
|
|
19753
19753
|
CONFIGURATION_ERROR: 1,
|
|
19754
19754
|
NETWORK_ERROR: 2
|
|
19755
|
-
},
|
|
19756
|
-
class
|
|
19755
|
+
}, A1 = h1;
|
|
19756
|
+
class I1 extends A1 {
|
|
19757
19757
|
//_janus_session: any = null
|
|
19758
19758
|
constructor(n) {
|
|
19759
19759
|
super(n), this._msrp_sessions = [], this._transactions = {
|
|
@@ -19761,7 +19761,7 @@ class A1 extends C1 {
|
|
|
19761
19761
|
nict: {},
|
|
19762
19762
|
ist: {},
|
|
19763
19763
|
ict: {}
|
|
19764
|
-
}, this._janus_sessions = [], this.newStreamPlugins = [], this.processStreamPlugins = [], this.optionsInterval = null, this.lastOptionsTimestamp = null, this.lastRegisterTimestamp = null, this._registrator = new
|
|
19764
|
+
}, this._janus_sessions = [], this.newStreamPlugins = [], this.processStreamPlugins = [], this.optionsInterval = null, this.lastOptionsTimestamp = null, this.lastRegisterTimestamp = null, this._registrator = new C1(this);
|
|
19765
19765
|
}
|
|
19766
19766
|
setLastRegisterTimestamp() {
|
|
19767
19767
|
this.lastRegisterTimestamp = Date.now();
|
|
@@ -19806,11 +19806,11 @@ class A1 extends C1 {
|
|
|
19806
19806
|
const a = this._configuration.uri.clone();
|
|
19807
19807
|
a.user = null, this._configuration.hostport_params = a.toString().replace(/^sip:/i, "");
|
|
19808
19808
|
try {
|
|
19809
|
-
this._transport = new
|
|
19809
|
+
this._transport = new LA(this._configuration.sockets, {
|
|
19810
19810
|
// Recovery options.
|
|
19811
19811
|
max_interval: this._configuration.connection_recovery_max_interval,
|
|
19812
19812
|
min_interval: this._configuration.connection_recovery_min_interval
|
|
19813
|
-
}), this._transport.onconnecting =
|
|
19813
|
+
}), this._transport.onconnecting = R1.bind(this), this._transport.onconnect = x1.bind(this), this._transport.ondisconnect = $1.bind(this), this._transport.ondata = O1.bind(this);
|
|
19814
19814
|
} catch (e) {
|
|
19815
19815
|
throw cn.warn(e), new ia.ConfigurationError("sockets", this._configuration.sockets);
|
|
19816
19816
|
}
|
|
@@ -19963,7 +19963,7 @@ class A1 extends C1 {
|
|
|
19963
19963
|
C.to_tag
|
|
19964
19964
|
), g ? (d = g.owner, d.isEnded() ? n.reply(603) : d.receiveRequest(n)) : n.reply(481);
|
|
19965
19965
|
} else
|
|
19966
|
-
n.body.search(/MSRP/ig) > -1 ? (d = new Jd(this), d.init_incoming(n)) : n.body.search(/JANUS/ig) > -1 || (d = new
|
|
19966
|
+
n.body.search(/MSRP/ig) > -1 ? (d = new Jd(this), d.init_incoming(n)) : n.body.search(/JANUS/ig) > -1 || (d = new wA(this), d.init_incoming(n));
|
|
19967
19967
|
else
|
|
19968
19968
|
cn.warn("INVITE received but WebRTC is not supported"), n.reply(488);
|
|
19969
19969
|
break;
|
|
@@ -20075,24 +20075,24 @@ class A1 extends C1 {
|
|
|
20075
20075
|
// return session
|
|
20076
20076
|
// }
|
|
20077
20077
|
}
|
|
20078
|
-
function
|
|
20078
|
+
function R1(o) {
|
|
20079
20079
|
this.emit("connecting", o);
|
|
20080
20080
|
}
|
|
20081
|
-
function
|
|
20081
|
+
function x1(o) {
|
|
20082
20082
|
this._status !== aa.STATUS_USER_CLOSED && (this._status = aa.STATUS_READY, this._error = null, this.emit("connected", o), this._dynConfiguration.register && this._registrator.register());
|
|
20083
20083
|
}
|
|
20084
|
-
function
|
|
20084
|
+
function $1(o) {
|
|
20085
20085
|
const n = ["nict", "ict", "nist", "ist"];
|
|
20086
20086
|
for (const r of n)
|
|
20087
20087
|
for (const a in this._transactions[r])
|
|
20088
20088
|
Object.prototype.hasOwnProperty.call(this._transactions[r], a) && this._transactions[r][a].onTransportError();
|
|
20089
20089
|
this.emit("disconnected", o), this._registrator.onTransportClosed(), this._status !== aa.STATUS_USER_CLOSED && (this._status = aa.STATUS_NOT_READY, this._error = aa.NETWORK_ERROR);
|
|
20090
20090
|
}
|
|
20091
|
-
function
|
|
20091
|
+
function O1(o) {
|
|
20092
20092
|
const n = o.transport;
|
|
20093
20093
|
let r = o.message;
|
|
20094
20094
|
const a = r;
|
|
20095
|
-
if (r =
|
|
20095
|
+
if (r = E1.parseMessage(r, this), this.onTransportCallback && typeof this.onTransportCallback == "function" && this.onTransportCallback(r, a), !!r && !(this._status === aa.STATUS_USER_CLOSED && r instanceof Co.IncomingRequest) && ZA(r, this, n)) {
|
|
20096
20096
|
if (r instanceof Co.IncomingRequest)
|
|
20097
20097
|
r.transport = n, this.receiveRequest(r);
|
|
20098
20098
|
else if (r instanceof Co.IncomingResponse) {
|
|
@@ -20124,7 +20124,7 @@ function $1(o) {
|
|
|
20124
20124
|
}
|
|
20125
20125
|
}
|
|
20126
20126
|
}
|
|
20127
|
-
const
|
|
20127
|
+
const k1 = [
|
|
20128
20128
|
"roomId",
|
|
20129
20129
|
"_audioMuted",
|
|
20130
20130
|
"_cancel_reason",
|
|
@@ -20150,7 +20150,7 @@ const O1 = [
|
|
|
20150
20150
|
"autoAnswer",
|
|
20151
20151
|
"putOnHoldTimestamp",
|
|
20152
20152
|
"_remote_party_display_name"
|
|
20153
|
-
],
|
|
20153
|
+
], D1 = [
|
|
20154
20154
|
//'roomId',
|
|
20155
20155
|
"_cancel_reason",
|
|
20156
20156
|
"_contact",
|
|
@@ -20169,13 +20169,13 @@ const O1 = [
|
|
|
20169
20169
|
];
|
|
20170
20170
|
function Dy(o) {
|
|
20171
20171
|
const n = {};
|
|
20172
|
-
return
|
|
20172
|
+
return k1.forEach((r) => {
|
|
20173
20173
|
o[r] !== void 0 && (n[r] = o[r]);
|
|
20174
20174
|
}), n.localHold = o._localHold, n;
|
|
20175
20175
|
}
|
|
20176
20176
|
function Ny(o) {
|
|
20177
20177
|
const n = {};
|
|
20178
|
-
return
|
|
20178
|
+
return D1.forEach((r) => {
|
|
20179
20179
|
o[r] !== void 0 && (n[r] = o[r]);
|
|
20180
20180
|
}), n;
|
|
20181
20181
|
}
|
|
@@ -20183,13 +20183,13 @@ async function Qd(o, n, r) {
|
|
|
20183
20183
|
const a = o.createMediaStreamSource(n), c = o.createMediaStreamDestination(), e = o.createGain();
|
|
20184
20184
|
return a.connect(e), e.connect(c), e.gain.value = r, c.stream;
|
|
20185
20185
|
}
|
|
20186
|
-
function
|
|
20187
|
-
if (
|
|
20186
|
+
function N1(o, n, r, a) {
|
|
20187
|
+
if (nb())
|
|
20188
20188
|
return;
|
|
20189
20189
|
const c = document.createElement("audio");
|
|
20190
20190
|
c.id = n._id, c.className = "audioTag", c.srcObject = o, c.setSinkId(r), c.volume = a, c.play(), n.audioTag = c;
|
|
20191
20191
|
}
|
|
20192
|
-
function
|
|
20192
|
+
function My(o) {
|
|
20193
20193
|
if (!o)
|
|
20194
20194
|
return null;
|
|
20195
20195
|
const n = o.match(/^\s*"((?:[^"\\]|\\.)*)"/);
|
|
@@ -20199,7 +20199,7 @@ function M1(o) {
|
|
|
20199
20199
|
if (o && typeof o.log == "function" && typeof o.warn == "function" && typeof o.error == "function")
|
|
20200
20200
|
return !0;
|
|
20201
20201
|
}
|
|
20202
|
-
function
|
|
20202
|
+
function nb() {
|
|
20203
20203
|
return /Mobi|react-native|Android|iPhone/i.test(navigator.userAgent);
|
|
20204
20204
|
}
|
|
20205
20205
|
const U1 = yn, P1 = ns(), tr = new U1("WebSocketInterface");
|
|
@@ -20272,7 +20272,7 @@ var L1 = class {
|
|
|
20272
20272
|
tr.warn(`WebSocket ${this._url} error: `, o);
|
|
20273
20273
|
}
|
|
20274
20274
|
};
|
|
20275
|
-
const Sh = Zu, q1 = bt, H1 = si, z1 = zn(), F1 =
|
|
20275
|
+
const Sh = Zu, q1 = bt, H1 = si, z1 = zn(), F1 = tb, B1 = ri(), V1 = Mh(), j1 = ns(), G1 = L1, W1 = Io("JsSIP");
|
|
20276
20276
|
W1("version %s", Sh.version);
|
|
20277
20277
|
var K1 = {
|
|
20278
20278
|
C: q1,
|
|
@@ -20449,7 +20449,7 @@ Fn.reduce = async (o, n, r) => {
|
|
|
20449
20449
|
a in o && (c = await n(await c, await o[a], a, o));
|
|
20450
20450
|
return c;
|
|
20451
20451
|
};
|
|
20452
|
-
var
|
|
20452
|
+
var rb = {};
|
|
20453
20453
|
(function(o) {
|
|
20454
20454
|
const n = Fn;
|
|
20455
20455
|
Object.keys(n).forEach((r) => {
|
|
@@ -20458,8 +20458,8 @@ var nb = {};
|
|
|
20458
20458
|
return n[r](this, ...c);
|
|
20459
20459
|
};
|
|
20460
20460
|
});
|
|
20461
|
-
})(
|
|
20462
|
-
const Z1 = Fn, eI =
|
|
20461
|
+
})(rb);
|
|
20462
|
+
const Z1 = Fn, eI = rb;
|
|
20463
20463
|
var tI = Object.assign(Z1, { instanceMethods: eI });
|
|
20464
20464
|
const es = {
|
|
20465
20465
|
NEW_CALL: "new_call",
|
|
@@ -20836,11 +20836,11 @@ var nI = { exports: {} };
|
|
|
20836
20836
|
typeof globalThis == "object" ? globalThis.regeneratorRuntime = n : Function("r", "regeneratorRuntime = r")(n);
|
|
20837
20837
|
}
|
|
20838
20838
|
})(nI);
|
|
20839
|
-
var
|
|
20839
|
+
var sb = { exports: {} };
|
|
20840
20840
|
(function(o) {
|
|
20841
20841
|
(function(n, r) {
|
|
20842
20842
|
o.exports ? o.exports = r() : n.log = r();
|
|
20843
|
-
})(
|
|
20843
|
+
})(C0, function() {
|
|
20844
20844
|
var n = function() {
|
|
20845
20845
|
}, r = "undefined", a = typeof window !== r && typeof window.navigator !== r && /Trident\/|MSIE /.test(window.navigator.userAgent), c = [
|
|
20846
20846
|
"trace",
|
|
@@ -20977,8 +20977,8 @@ var rb = { exports: {} };
|
|
|
20977
20977
|
return L;
|
|
20978
20978
|
}, k.default = k, k;
|
|
20979
20979
|
});
|
|
20980
|
-
})(
|
|
20981
|
-
var Kn =
|
|
20980
|
+
})(sb);
|
|
20981
|
+
var Kn = sb.exports;
|
|
20982
20982
|
const ei = () => `${(/* @__PURE__ */ new Date()).toISOString()} | metrics`, ti = (o, n, r) => `${o} | ${n} | ${r}`;
|
|
20983
20983
|
Kn.setDefaultLevel(Kn.levels.TRACE);
|
|
20984
20984
|
const rI = (o) => {
|
|
@@ -21000,7 +21000,7 @@ const rI = (o) => {
|
|
|
21000
21000
|
function iI(o) {
|
|
21001
21001
|
return Math.floor(Math.random() * o).toString();
|
|
21002
21002
|
}
|
|
21003
|
-
function
|
|
21003
|
+
function Uy(o, n) {
|
|
21004
21004
|
let r = n;
|
|
21005
21005
|
return o.forEach((a) => {
|
|
21006
21006
|
r = r.replace(a, "");
|
|
@@ -21020,7 +21020,7 @@ function oI({
|
|
|
21020
21020
|
excludeSymbols: c = []
|
|
21021
21021
|
} = {}) {
|
|
21022
21022
|
let e = "abcdefghijklmnopqrstuvwxyz", _ = "0123456789", g = [], d = [], C = [];
|
|
21023
|
-
return n && (c.length && (e =
|
|
21023
|
+
return n && (c.length && (e = Uy(c, e)), d = e.split("")), r && (c.length && (_ = Uy(c, _)), C = _.split("")), g = [...d, ...C, ...a], aI(g, o);
|
|
21024
21024
|
}
|
|
21025
21025
|
var lI = oI;
|
|
21026
21026
|
const _l = /* @__PURE__ */ tn(lI), uI = () => "WebRTCMetrics", cI = () => "5.0.3", Ft = {
|
|
@@ -21050,7 +21050,7 @@ const _l = /* @__PURE__ */ tn(lI), uI = () => "WebRTCMetrics", cI = () => "5.0.3
|
|
|
21050
21050
|
total_time_decoded_in: 0,
|
|
21051
21051
|
total_time_encoded_out: 0,
|
|
21052
21052
|
probes: []
|
|
21053
|
-
}),
|
|
21053
|
+
}), ib = {
|
|
21054
21054
|
level_in: 0,
|
|
21055
21055
|
codec_id_in: "",
|
|
21056
21056
|
codec_in: { mime_type: null, clock_rate: null, sdp_fmtp_line: null },
|
|
@@ -21067,7 +21067,7 @@ const _l = /* @__PURE__ */ tn(lI), uI = () => "WebRTCMetrics", cI = () => "5.0.3
|
|
|
21067
21067
|
mos_emodel_in: 0,
|
|
21068
21068
|
ssrc: "",
|
|
21069
21069
|
direction: Ft.INBOUND
|
|
21070
|
-
},
|
|
21070
|
+
}, ab = {
|
|
21071
21071
|
level_out: 0,
|
|
21072
21072
|
codec_id_out: "",
|
|
21073
21073
|
codec_out: { mime_type: null, clock_rate: null, sdp_fmtp_line: null },
|
|
@@ -21088,7 +21088,7 @@ const _l = /* @__PURE__ */ tn(lI), uI = () => "WebRTCMetrics", cI = () => "5.0.3
|
|
|
21088
21088
|
mos_emodel_out: 0,
|
|
21089
21089
|
ssrc: "",
|
|
21090
21090
|
direction: Ft.OUTBOUND
|
|
21091
|
-
},
|
|
21091
|
+
}, ob = {
|
|
21092
21092
|
codec_id_in: "",
|
|
21093
21093
|
size_in: { width: null, height: null, framerate: null },
|
|
21094
21094
|
codec_in: { mime_type: null, clock_rate: null },
|
|
@@ -21111,7 +21111,7 @@ const _l = /* @__PURE__ */ tn(lI), uI = () => "WebRTCMetrics", cI = () => "5.0.3
|
|
|
21111
21111
|
total_pli_sent_in: 0,
|
|
21112
21112
|
ssrc: "",
|
|
21113
21113
|
direction: Ft.INBOUND
|
|
21114
|
-
},
|
|
21114
|
+
}, lb = {
|
|
21115
21115
|
codec_id_out: "",
|
|
21116
21116
|
size_out: { width: null, height: null, framerate: null },
|
|
21117
21117
|
codec_out: { mime_type: null, clock_rate: null },
|
|
@@ -21317,7 +21317,7 @@ const _l = /* @__PURE__ */ tn(lI), uI = () => "WebRTCMetrics", cI = () => "5.0.3
|
|
|
21317
21317
|
return g ? g[r] : null;
|
|
21318
21318
|
});
|
|
21319
21319
|
return e = e.filter((_) => a ? Number.isFinite(_) && _ > 0 : Number.isFinite(_)), e.length === 0 ? [] : e;
|
|
21320
|
-
}, la = (o) => o.reduce((n, r) => n + r, 0) / o.length, mI = () => `probe-${_l()}`, gI = () => `coltr-${_l()}`,
|
|
21320
|
+
}, la = (o) => o.reduce((n, r) => n + r, 0) / o.length, mI = () => `probe-${_l()}`, gI = () => `coltr-${_l()}`, Py = (o) => new Promise((n) => setTimeout(n, o)), Eh = (o, n, r) => {
|
|
21321
21321
|
n ? o.call(n, r) : o(r);
|
|
21322
21322
|
}, Qt = (o, n, r, a) => {
|
|
21323
21323
|
const c = Nl(o, n, r, !0, a);
|
|
@@ -21349,10 +21349,10 @@ const _l = /* @__PURE__ */ tn(lI), uI = () => "WebRTCMetrics", cI = () => "5.0.3
|
|
|
21349
21349
|
return null;
|
|
21350
21350
|
const a = {};
|
|
21351
21351
|
let c = n[ae.AUDIO][o];
|
|
21352
|
-
c || (c = r === Ft.INBOUND ? { ...
|
|
21352
|
+
c || (c = r === Ft.INBOUND ? { ...ib } : { ...ab }), a[ae.AUDIO] = c;
|
|
21353
21353
|
let e = n[ae.VIDEO][o];
|
|
21354
|
-
return e || (e = r === Ft.INBOUND ? { ...
|
|
21355
|
-
}, ul = "exporter ", yI = "2.0",
|
|
21354
|
+
return e || (e = r === Ft.INBOUND ? { ...ob } : { ...lb }), a[ae.VIDEO] = e, a;
|
|
21355
|
+
}, ul = "exporter ", yI = "2.0", Ly = (o, n, r) => {
|
|
21356
21356
|
if (!o || o.length === 0)
|
|
21357
21357
|
return 0;
|
|
21358
21358
|
const a = o[o.length - 1];
|
|
@@ -21702,7 +21702,7 @@ class SI {
|
|
|
21702
21702
|
volatility: "percent"
|
|
21703
21703
|
}
|
|
21704
21704
|
}, k = {
|
|
21705
|
-
avg:
|
|
21705
|
+
avg: Ly(this._reports, ae.AUDIO, g),
|
|
21706
21706
|
min: Zt(this._reports, ae.AUDIO, "delta_rtt_ms_out", g),
|
|
21707
21707
|
max: en(this._reports, ae.AUDIO, "delta_rtt_ms_out", g),
|
|
21708
21708
|
volatility: Qt(
|
|
@@ -21989,7 +21989,7 @@ class SI {
|
|
|
21989
21989
|
volatility: "percent"
|
|
21990
21990
|
}
|
|
21991
21991
|
}, k = {
|
|
21992
|
-
avg:
|
|
21992
|
+
avg: Ly(this._reports, ae.VIDEO, g),
|
|
21993
21993
|
min: Zt(this._reports, ae.VIDEO, "delta_rtt_ms_out", g),
|
|
21994
21994
|
max: en(this._reports, ae.VIDEO, "delta_rtt_ms_out", g),
|
|
21995
21995
|
volatility: Qt(
|
|
@@ -22173,7 +22173,7 @@ class SI {
|
|
|
22173
22173
|
return this._reports.length;
|
|
22174
22174
|
}
|
|
22175
22175
|
}
|
|
22176
|
-
const sa = "extractor ",
|
|
22176
|
+
const sa = "extractor ", qy = (o, n, r, a) => {
|
|
22177
22177
|
let c = !1;
|
|
22178
22178
|
const e = a[n].total_rtt_ms_out, _ = a[n].total_rtt_measure_out, g = r ? r[n].total_rtt_ms_out : 0, d = r ? r[n].total_rtt_measure_out : 0, C = {
|
|
22179
22179
|
rtt: null,
|
|
@@ -22235,7 +22235,7 @@ const sa = "extractor ", Ly = (o, n, r, a) => {
|
|
|
22235
22235
|
frames_encoded: r,
|
|
22236
22236
|
total_encode_time: a
|
|
22237
22237
|
};
|
|
22238
|
-
},
|
|
22238
|
+
}, Hy = (o, n, r, a) => {
|
|
22239
22239
|
if (!Object.prototype.hasOwnProperty.call(o, ve.PACKETS_SENT) || !Object.prototype.hasOwnProperty.call(o, ve.BYTES_SENT))
|
|
22240
22240
|
return {
|
|
22241
22241
|
packetsSent: r[n].total_packets_out,
|
|
@@ -22253,14 +22253,14 @@ const sa = "extractor ", Ly = (o, n, r, a) => {
|
|
|
22253
22253
|
deltaKBytesSent: g,
|
|
22254
22254
|
kbsSent: k
|
|
22255
22255
|
};
|
|
22256
|
-
},
|
|
22256
|
+
}, zy = (o, n, r, a) => {
|
|
22257
22257
|
let c = r[n].total_packets_lost_out, e = 0, _ = 0;
|
|
22258
22258
|
return Object.prototype.hasOwnProperty.call(o, ve.PACKETS_LOST) && (c = Number(o[ve.PACKETS_LOST]) || 0 - (a ? a[n].total_packets_lost_out : 0), e = c - r[n].total_packets_lost_out), Object.prototype.hasOwnProperty.call(o, ve.FRACTION_LOST) && (_ = Number(100 * o[ve.FRACTION_LOST])), {
|
|
22259
22259
|
packetsLost: c,
|
|
22260
22260
|
deltaPacketsLost: e,
|
|
22261
22261
|
fractionLost: _
|
|
22262
22262
|
};
|
|
22263
|
-
},
|
|
22263
|
+
}, Fy = (o, n, r, a) => {
|
|
22264
22264
|
if (!Object.prototype.hasOwnProperty.call(o, ve.PACKETS_RECEIVED) || !Object.prototype.hasOwnProperty.call(o, ve.PACKETS_LOST) || !Object.prototype.hasOwnProperty.call(o, ve.BYTES_RECEIVED))
|
|
22265
22265
|
return {
|
|
22266
22266
|
percent_packets_lost: r[n].percent_packets_lost_in,
|
|
@@ -22295,7 +22295,7 @@ const sa = "extractor ", Ly = (o, n, r, a) => {
|
|
|
22295
22295
|
default:
|
|
22296
22296
|
return ll.CELLULAR;
|
|
22297
22297
|
}
|
|
22298
|
-
},
|
|
22298
|
+
}, By = (o) => !Object.prototype.hasOwnProperty.call(o, ve.FRAME_HEIGHT) || !Object.prototype.hasOwnProperty.call(o, ve.FRAME_WIDTH) ? { width: null, height: null, framerate: null } : {
|
|
22299
22299
|
width: o[ve.FRAME_WIDTH] || null,
|
|
22300
22300
|
height: o[ve.FRAME_HEIGHT] || null,
|
|
22301
22301
|
framerate: o[ve.FRAMES_PER_SECOND]
|
|
@@ -22503,7 +22503,7 @@ const sa = "extractor ", Ly = (o, n, r, a) => {
|
|
|
22503
22503
|
g && (g.timestamp = n.timestamp);
|
|
22504
22504
|
const d = Sn(_, a, Ft.INBOUND);
|
|
22505
22505
|
if (d && (d.timestamp = a.timestamp), o[ve.MEDIA_TYPE] === ae.AUDIO) {
|
|
22506
|
-
const C =
|
|
22506
|
+
const C = Fy(
|
|
22507
22507
|
o,
|
|
22508
22508
|
ae.AUDIO,
|
|
22509
22509
|
g,
|
|
@@ -22563,12 +22563,12 @@ const sa = "extractor ", Ly = (o, n, r, a) => {
|
|
|
22563
22563
|
];
|
|
22564
22564
|
}
|
|
22565
22565
|
if (o[ve.MEDIA_TYPE] === ae.VIDEO) {
|
|
22566
|
-
const C = CI(o, g), S =
|
|
22566
|
+
const C = CI(o, g), S = Fy(
|
|
22567
22567
|
o,
|
|
22568
22568
|
ae.VIDEO,
|
|
22569
22569
|
g,
|
|
22570
22570
|
d
|
|
22571
|
-
), R = wu(o, ae.VIDEO, g), k = o[ve.DECODER_IMPLEMENTATION] || null, L = o[ve.CODEC_ID] || null, V =
|
|
22571
|
+
), R = wu(o, ae.VIDEO, g), k = o[ve.DECODER_IMPLEMENTATION] || null, L = o[ve.CODEC_ID] || null, V = By(o), G = $I(
|
|
22572
22572
|
o,
|
|
22573
22573
|
g,
|
|
22574
22574
|
d
|
|
@@ -22683,7 +22683,7 @@ const sa = "extractor ", Ly = (o, n, r, a) => {
|
|
|
22683
22683
|
g && (g.timestamp = n.timestamp);
|
|
22684
22684
|
const d = Sn(_, a, Ft.OUTBOUND);
|
|
22685
22685
|
if (d && (d.timestamp = a.timestamp), o[ve.MEDIA_TYPE] === ae.AUDIO) {
|
|
22686
|
-
const C = o[ve.CODEC_ID] || null, S =
|
|
22686
|
+
const C = o[ve.CODEC_ID] || null, S = Hy(o, ae.AUDIO, g, d);
|
|
22687
22687
|
return [
|
|
22688
22688
|
{
|
|
22689
22689
|
ssrc: _,
|
|
@@ -22718,11 +22718,11 @@ const sa = "extractor ", Ly = (o, n, r, a) => {
|
|
|
22718
22718
|
];
|
|
22719
22719
|
}
|
|
22720
22720
|
if (o[ve.MEDIA_TYPE] === ae.VIDEO) {
|
|
22721
|
-
const C = o[ve.ENCODER_IMPLEMENTATION] || null, S = o[ve.CODEC_ID] || null, R = AI(o, g), k =
|
|
22721
|
+
const C = o[ve.ENCODER_IMPLEMENTATION] || null, S = o[ve.CODEC_ID] || null, R = AI(o, g), k = By(o), L = xI(o), V = OI(
|
|
22722
22722
|
o,
|
|
22723
22723
|
g,
|
|
22724
22724
|
d
|
|
22725
|
-
), G =
|
|
22725
|
+
), G = Hy(o, ae.VIDEO, g, d);
|
|
22726
22726
|
return [
|
|
22727
22727
|
{
|
|
22728
22728
|
ssrc: _,
|
|
@@ -22857,12 +22857,12 @@ const sa = "extractor ", Ly = (o, n, r, a) => {
|
|
|
22857
22857
|
);
|
|
22858
22858
|
const _ = o[ve.SSRC], g = Sn(_, n, Ft.OUTBOUND), d = Sn(_, a, Ft.OUTBOUND);
|
|
22859
22859
|
if (o[ve.KIND] === ae.AUDIO) {
|
|
22860
|
-
const C =
|
|
22860
|
+
const C = qy(
|
|
22861
22861
|
o,
|
|
22862
22862
|
ae.AUDIO,
|
|
22863
22863
|
d,
|
|
22864
22864
|
g
|
|
22865
|
-
), S = wu(o, ae.AUDIO, g), R =
|
|
22865
|
+
), S = wu(o, ae.AUDIO, g), R = zy(o, ae.AUDIO, g, d);
|
|
22866
22866
|
return [
|
|
22867
22867
|
{
|
|
22868
22868
|
ssrc: _,
|
|
@@ -22907,12 +22907,12 @@ const sa = "extractor ", Ly = (o, n, r, a) => {
|
|
|
22907
22907
|
];
|
|
22908
22908
|
}
|
|
22909
22909
|
if (o[ve.KIND] === ae.VIDEO) {
|
|
22910
|
-
const C =
|
|
22910
|
+
const C = qy(
|
|
22911
22911
|
o,
|
|
22912
22912
|
ae.VIDEO,
|
|
22913
22913
|
d,
|
|
22914
22914
|
g
|
|
22915
|
-
), S = wu(o, ae.VIDEO, g), R =
|
|
22915
|
+
), S = wu(o, ae.VIDEO, g), R = zy(o, ae.VIDEO, g, d);
|
|
22916
22916
|
return [
|
|
22917
22917
|
{
|
|
22918
22918
|
ssrc: _,
|
|
@@ -22989,7 +22989,7 @@ class zI {
|
|
|
22989
22989
|
}, this._id = gI(), this._moduleName = this._id, this._probeId = r, this._config = n, this._exporter = new SI(n), this._state = Qs.IDLE, this.registerToPCEvents(), Ha(this._moduleName, `new collector created for probe ${this._probeId}`);
|
|
22990
22990
|
}
|
|
22991
22991
|
analyze(n, r, a, c) {
|
|
22992
|
-
const e = (d, C) => d === ae.AUDIO ? C === Zr.INBOUND_RTP ? { ...
|
|
22992
|
+
const e = (d, C) => d === ae.AUDIO ? C === Zr.INBOUND_RTP ? { ...ib } : { ...ab } : C === Zr.INBOUND_RTP ? { ...ob } : { ...lb }, _ = hI(r);
|
|
22993
22993
|
_.pname = this._config.pname, _.call_id = this._config.cid, _.user_id = this._config.uid, _.count = r ? r.count + 1 : 1;
|
|
22994
22994
|
let g = null;
|
|
22995
22995
|
return n.forEach((d) => {
|
|
@@ -23352,12 +23352,12 @@ class BI {
|
|
|
23352
23352
|
const e = dI(), _ = this._probes.filter((g) => g.isRunning);
|
|
23353
23353
|
for (const g of _) {
|
|
23354
23354
|
const d = await g.collectStats();
|
|
23355
|
-
d && e.probes.push(d), $t(Gn, `got probe ${g.id}`), await
|
|
23355
|
+
d && e.probes.push(d), $t(Gn, `got probe ${g.id}`), await Py(0);
|
|
23356
23356
|
}
|
|
23357
23357
|
return e.delta_time_to_measure_probes_ms = Ua(e.probes, "experimental", "time_to_measure_ms"), e.delta_KBytes_in = Ua(e.probes, "data", "delta_KBytes_in"), e.delta_KBytes_out = Ua(e.probes, "data", "delta_KBytes_out"), e.delta_kbs_in = Ua(e.probes, "data", "delta_kbs_in"), e.delta_kbs_out = Ua(e.probes, "data", "delta_kbs_out"), e.total_time_decoded_in = Ua(e.probes, "video", "total_time_decoded_in"), e.total_time_encoded_out = Ua(e.probes, "video", "total_time_encoded_out"), e;
|
|
23358
23358
|
};
|
|
23359
23359
|
for ($t(Gn, "starting to collect"), n(), $t(Gn, "generating reference reports..."), await r(), $t(Gn, "reference reports generated"), this._startedTime = Date.now(); a(); )
|
|
23360
|
-
if ($t(Gn, `wait ${this._config.refreshEvery}ms before collecting`), await
|
|
23360
|
+
if ($t(Gn, `wait ${this._config.refreshEvery}ms before collecting`), await Py(this._config.refreshEvery), a()) {
|
|
23361
23361
|
$t(Gn, "collecting...");
|
|
23362
23362
|
const e = Date.now(), _ = await c(), g = Date.now();
|
|
23363
23363
|
_.delta_time_consumed_to_measure_ms = g - e, this.fireOnReports(_), $t(Gn, "collected");
|
|
@@ -23725,7 +23725,7 @@ class QI {
|
|
|
23725
23725
|
return this.availableMediaDevices.filter((n) => n.kind === "audiooutput");
|
|
23726
23726
|
}
|
|
23727
23727
|
get getUserMediaConstraints() {
|
|
23728
|
-
return
|
|
23728
|
+
return nb() ? {
|
|
23729
23729
|
video: !1,
|
|
23730
23730
|
audio: !0
|
|
23731
23731
|
} : {
|
|
@@ -23950,6 +23950,14 @@ class QI {
|
|
|
23950
23950
|
const r = /answer-after=0/, a = n.request.getHeader("Call-Info");
|
|
23951
23951
|
return a && r.test(a);
|
|
23952
23952
|
}
|
|
23953
|
+
// Re-parses Remote-Party-ID header from re-INVITE / UPDATE request
|
|
23954
|
+
refreshRemotePartyDisplayName(n, r) {
|
|
23955
|
+
const a = r.getHeader("Remote-Party-ID");
|
|
23956
|
+
if (!a)
|
|
23957
|
+
return !1;
|
|
23958
|
+
const c = My(a);
|
|
23959
|
+
return c === null || n._remote_party_display_name === c ? !1 : (n._remote_party_display_name = c, !0);
|
|
23960
|
+
}
|
|
23953
23961
|
addCall(n, r = !0) {
|
|
23954
23962
|
this.activeCalls = {
|
|
23955
23963
|
...this.activeCalls,
|
|
@@ -24677,7 +24685,7 @@ class QI {
|
|
|
24677
24685
|
}
|
|
24678
24686
|
async newRTCSessionCallback(n) {
|
|
24679
24687
|
const r = n.session;
|
|
24680
|
-
if (r._remote_party_display_name = r.direction === "incoming" ?
|
|
24688
|
+
if (r._remote_party_display_name = r.direction === "incoming" ? My(n.request.getHeader("Remote-Party-ID")) : null, this.shouldTerminateNewSession(n)) {
|
|
24681
24689
|
r.terminate({
|
|
24682
24690
|
status_code: 486,
|
|
24683
24691
|
reason_phrase: "Do Not Disturb"
|
|
@@ -24688,66 +24696,70 @@ class QI {
|
|
|
24688
24696
|
listenerType: es.NEW_CALL,
|
|
24689
24697
|
session: r,
|
|
24690
24698
|
event: n
|
|
24691
|
-
}), r.on("ended", (
|
|
24692
|
-
var
|
|
24693
|
-
if (this.stopVUMeter(r.id), this.context.logger.log("Session ended for", (
|
|
24699
|
+
}), r.on("ended", (e) => {
|
|
24700
|
+
var _, g, d;
|
|
24701
|
+
if (this.stopVUMeter(r.id), this.context.logger.log("Session ended for", (g = (_ = r._remote_identity) == null ? void 0 : _._uri) == null ? void 0 : g._user), this.context.triggerListener({
|
|
24694
24702
|
listenerType: es.CALL_ENDED,
|
|
24695
24703
|
session: r,
|
|
24696
|
-
event:
|
|
24704
|
+
event: e
|
|
24697
24705
|
}), r._is_confirmed && this.playHangupBeep(), r.connection) {
|
|
24698
|
-
const
|
|
24699
|
-
(
|
|
24706
|
+
const S = r.connection.connectionState;
|
|
24707
|
+
(S === "closed" || S === "disconnected") && this.context.emit("connectionStateChange", {
|
|
24700
24708
|
session: r,
|
|
24701
|
-
connectionState:
|
|
24709
|
+
connectionState: S
|
|
24702
24710
|
});
|
|
24703
24711
|
}
|
|
24704
24712
|
["enabled", "dynamic"].includes(this.noiseReduction.mode) && this.stopSessionVad(), this.cleanupRingbackTone(r.id);
|
|
24705
|
-
const
|
|
24706
|
-
|
|
24707
|
-
}), r.on("progress", (
|
|
24708
|
-
var
|
|
24709
|
-
this.context.logger.log("Session in progress for", (
|
|
24713
|
+
const C = this.getActiveCalls[r.id];
|
|
24714
|
+
C && this.activeCallListRemove(C), this.stopCallTimer(r.id), this.removeCallStatus(r.id), this.removeCallMetrics(r.id), Object.keys(this.extendedCalls).length || (this.setIsMuted(!1), (d = this.initialStreamValue) == null || d.getTracks().forEach((S) => S.stop()), this.initialStreamValue = null), this.context.isWaitingForSessionHangup() && !this.hasActiveAnsweredCalls && this.context.stopSessionAfterWaiting();
|
|
24715
|
+
}), r.on("progress", (e) => {
|
|
24716
|
+
var _, g;
|
|
24717
|
+
this.context.logger.log("Session in progress for", (g = (_ = r._remote_identity) == null ? void 0 : _._uri) == null ? void 0 : g._user), this.context.triggerListener({
|
|
24710
24718
|
listenerType: es.CALL_PROGRESS,
|
|
24711
24719
|
session: r,
|
|
24712
|
-
event:
|
|
24720
|
+
event: e
|
|
24713
24721
|
});
|
|
24714
|
-
}), r.on("failed", (
|
|
24715
|
-
var
|
|
24716
|
-
if (this.stopVUMeter(r.id), this.context.logger.log("Session failed for", (
|
|
24722
|
+
}), r.on("failed", (e) => {
|
|
24723
|
+
var _, g, d;
|
|
24724
|
+
if (this.stopVUMeter(r.id), this.context.logger.log("Session failed for", (g = (_ = r._remote_identity) == null ? void 0 : _._uri) == null ? void 0 : g._user), this.context.triggerListener({
|
|
24717
24725
|
listenerType: es.CALL_FAILED,
|
|
24718
24726
|
session: r,
|
|
24719
|
-
event:
|
|
24727
|
+
event: e
|
|
24720
24728
|
}), r.connection) {
|
|
24721
|
-
const
|
|
24722
|
-
(
|
|
24729
|
+
const S = r.connection.connectionState;
|
|
24730
|
+
(S === "closed" || S === "disconnected") && this.context.emit("connectionStateChange", {
|
|
24723
24731
|
session: r,
|
|
24724
|
-
connectionState:
|
|
24732
|
+
connectionState: S
|
|
24725
24733
|
});
|
|
24726
24734
|
}
|
|
24727
24735
|
["enabled", "dynamic"].includes(this.noiseReduction.mode) && this.stopSessionVad(), this.cleanupRingbackTone(r.id), r.id === this.callAddingInProgress && (this.callAddingInProgress = void 0);
|
|
24728
|
-
const
|
|
24729
|
-
|
|
24730
|
-
}), r.on("confirmed", (
|
|
24731
|
-
var
|
|
24732
|
-
this.context.logger.log("Session confirmed for", (
|
|
24736
|
+
const C = this.getActiveCalls[r.id];
|
|
24737
|
+
C && this.activeCallListRemove(C), this.stopCallTimer(r.id), this.removeCallStatus(r.id), this.removeCallMetrics(r.id), Object.keys(this.extendedCalls).length || (this.setIsMuted(!1), (d = this.initialStreamValue) == null || d.getTracks().forEach((S) => S.stop()), this.initialStreamValue = null), this.context.isWaitingForSessionHangup() && !this.hasActiveAnsweredCalls && this.context.stopSessionAfterWaiting();
|
|
24738
|
+
}), r.on("confirmed", (e) => {
|
|
24739
|
+
var _, g;
|
|
24740
|
+
this.context.logger.log("Session confirmed for", (g = (_ = r._remote_identity) == null ? void 0 : _._uri) == null ? void 0 : g._user), this.context.triggerListener({
|
|
24733
24741
|
listenerType: es.CALL_CONFIRMED,
|
|
24734
24742
|
session: r,
|
|
24735
|
-
event:
|
|
24743
|
+
event: e
|
|
24736
24744
|
}), this.updateCall(r), this.cleanupRingbackTone(r.id), r.id === this.callAddingInProgress && (this.callAddingInProgress = void 0);
|
|
24737
24745
|
});
|
|
24738
|
-
const a = (
|
|
24739
|
-
|
|
24746
|
+
const a = (e) => {
|
|
24747
|
+
this.refreshRemotePartyDisplayName(r, e.request) && this.updateCall(r);
|
|
24748
|
+
};
|
|
24749
|
+
r.on("reinvite", a), r.on("update", a);
|
|
24750
|
+
const c = (e) => {
|
|
24751
|
+
e && e.addEventListener("connectionstatechange", (_) => {
|
|
24740
24752
|
this.context.emit("connectionStateChange", {
|
|
24741
24753
|
session: r,
|
|
24742
|
-
connectionState:
|
|
24754
|
+
connectionState: e.connectionState
|
|
24743
24755
|
});
|
|
24744
24756
|
});
|
|
24745
24757
|
};
|
|
24746
|
-
if (r.connection &&
|
|
24747
|
-
|
|
24758
|
+
if (r.connection && c(r.connection), r.on("peerconnection", ({ peerconnection: e }) => {
|
|
24759
|
+
c(e);
|
|
24748
24760
|
}), await this.setupCall(n), r.direction === "outgoing") {
|
|
24749
|
-
const
|
|
24750
|
-
await this.setActiveRoom(
|
|
24761
|
+
const e = this.getActiveCalls[r.id].roomId;
|
|
24762
|
+
await this.setActiveRoom(e);
|
|
24751
24763
|
}
|
|
24752
24764
|
}
|
|
24753
24765
|
setMuteWhenJoin(n) {
|
|
@@ -24829,7 +24841,7 @@ class QI {
|
|
|
24829
24841
|
R.enabled = !d;
|
|
24830
24842
|
}), await this.setActiveStream(g), await r.connection.getSenders()[0].replaceTrack(g.getTracks()[0]);
|
|
24831
24843
|
const C = new MediaStream([n.track]);
|
|
24832
|
-
!Object.values(this.extendedCalls).find((R) => R.audioTag && R.audioTag.id === r._id) &&
|
|
24844
|
+
!Object.values(this.extendedCalls).find((R) => R.audioTag && R.audioTag.id === r._id) && N1(C, r, this.selectedOutputDevice, this.speakerVolume);
|
|
24833
24845
|
const S = r.roomId === this.currentActiveRoomId;
|
|
24834
24846
|
r.audioTag && (r.audioTag.muted = !S), await this.setupVUMeter(C, r._id), this.getCallQuality(r), this.updateCall(r), r.roomId !== void 0 && Object.values(this.extendedCalls).filter((R) => R.roomId === r.roomId).length > 1 && (console.log(`[triggerAddStream] Re-configuring conference for room ${r.roomId} - track received for call ${r._id}`), (c = this.context.logger) == null || c.log(`[triggerAddStream] Re-configuring conference for room ${r.roomId} - track received for call ${r._id}`), setTimeout(() => {
|
|
24835
24847
|
this.roomReconfigure(r.roomId);
|
|
@@ -25083,7 +25095,7 @@ const Eu = {
|
|
|
25083
25095
|
VIDEO: "video",
|
|
25084
25096
|
MSRP: "msrp"
|
|
25085
25097
|
};
|
|
25086
|
-
class
|
|
25098
|
+
class ub {
|
|
25087
25099
|
constructor(n) {
|
|
25088
25100
|
this.opensips = null, this.session = null, this.name = null, this.name = n;
|
|
25089
25101
|
}
|
|
@@ -25097,7 +25109,7 @@ class lb {
|
|
|
25097
25109
|
this.opensips.kill(this.name);
|
|
25098
25110
|
}
|
|
25099
25111
|
}
|
|
25100
|
-
class tR extends
|
|
25112
|
+
class tR extends ub {
|
|
25101
25113
|
constructor(n, r) {
|
|
25102
25114
|
super(n), this._candidates = [], this._subscribeSent = !1, this._configureSent = !1, this._lastTrickleReceived = !1, this.type = r;
|
|
25103
25115
|
}
|
|
@@ -25280,7 +25292,7 @@ class tR extends lb {
|
|
|
25280
25292
|
throw new Error("generateStream method is not implemented");
|
|
25281
25293
|
}
|
|
25282
25294
|
}
|
|
25283
|
-
class nR extends
|
|
25295
|
+
class nR extends ub {
|
|
25284
25296
|
constructor(n, r, a = {}) {
|
|
25285
25297
|
super(n), this.stream = null, this.running = !1, this.immediate = !1, this.type = "video", this.immediate = a.immediate || !1, this.type = r;
|
|
25286
25298
|
}
|
|
@@ -25307,7 +25319,7 @@ class nR extends lb {
|
|
|
25307
25319
|
this.stop(), this.running = !1, await this.session.resyncPlugins(this.type);
|
|
25308
25320
|
}
|
|
25309
25321
|
}
|
|
25310
|
-
class rR extends
|
|
25322
|
+
class rR extends I1 {
|
|
25311
25323
|
constructor(n, r) {
|
|
25312
25324
|
if (!n.modules.length)
|
|
25313
25325
|
throw new Error("options.modules should include at least 1 module");
|
|
@@ -26557,10 +26569,10 @@ function sR(o) {
|
|
|
26557
26569
|
var Fh = {}, Ml = {};
|
|
26558
26570
|
Object.defineProperty(Ml, "__esModule", { value: !0 });
|
|
26559
26571
|
Ml.baseAssetPath = void 0;
|
|
26560
|
-
const iR = typeof window < "u" && typeof window.document < "u",
|
|
26561
|
-
let
|
|
26562
|
-
|
|
26563
|
-
Ml.baseAssetPath =
|
|
26572
|
+
const iR = typeof window < "u" && typeof window.document < "u", Vy = iR ? window.document.currentScript : null;
|
|
26573
|
+
let cb = "/";
|
|
26574
|
+
Vy && (cb = Vy.src.replace(/#.*$/, "").replace(/\?.*$/, "").replace(/\/[^\/]+$/, "/"));
|
|
26575
|
+
Ml.baseAssetPath = cb;
|
|
26564
26576
|
var $o = {};
|
|
26565
26577
|
Object.defineProperty($o, "__esModule", { value: !0 });
|
|
26566
26578
|
$o.defaultModelFetcher = void 0;
|
|
@@ -26581,10 +26593,10 @@ var Rs = {}, Oo = {};
|
|
|
26581
26593
|
var Ba = {};
|
|
26582
26594
|
Object.defineProperty(Ba, "__esModule", { value: !0 });
|
|
26583
26595
|
Ba.Message = void 0;
|
|
26584
|
-
var
|
|
26596
|
+
var jy;
|
|
26585
26597
|
(function(o) {
|
|
26586
26598
|
o.AudioFrame = "AUDIO_FRAME", o.SpeechStart = "SPEECH_START", o.VADMisfire = "VAD_MISFIRE", o.SpeechEnd = "SPEECH_END", o.SpeechStop = "SPEECH_STOP", o.SpeechRealStart = "SPEECH_REAL_START", o.FrameProcessed = "FRAME_PROCESSED";
|
|
26587
|
-
})(
|
|
26599
|
+
})(jy || (Ba.Message = jy = {}));
|
|
26588
26600
|
Object.defineProperty(Rs, "__esModule", { value: !0 });
|
|
26589
26601
|
Rs.FrameProcessor = Rs.validateOptions = Rs.defaultFrameProcessorOptions = void 0;
|
|
26590
26602
|
const cl = Oo, Pa = Ba;
|
|
@@ -26600,7 +26612,7 @@ function oR(o) {
|
|
|
26600
26612
|
(o.positiveSpeechThreshold < 0 || o.positiveSpeechThreshold > 1) && cl.log.error("positiveSpeechThreshold should be a number between 0 and 1"), (o.negativeSpeechThreshold < 0 || o.negativeSpeechThreshold > o.positiveSpeechThreshold) && cl.log.error("negativeSpeechThreshold should be between 0 and positiveSpeechThreshold"), o.preSpeechPadMs < 0 && cl.log.error("preSpeechPadMs should be positive"), o.redemptionMs < 0 && cl.log.error("redemptionMs should be positive"), o.minSpeechMs < 0 && cl.log.error("minSpeechMs should be positive");
|
|
26601
26613
|
}
|
|
26602
26614
|
Rs.validateOptions = oR;
|
|
26603
|
-
const
|
|
26615
|
+
const Gy = (o) => {
|
|
26604
26616
|
const n = o.reduce((a, c) => (a.push(a.at(-1) + c.length), a), [0]), r = new Float32Array(n.at(-1));
|
|
26605
26617
|
return o.forEach((a, c) => {
|
|
26606
26618
|
const e = n[c];
|
|
@@ -26621,7 +26633,7 @@ class lR {
|
|
|
26621
26633
|
const g = this.speaking;
|
|
26622
26634
|
if (this.reset(), g)
|
|
26623
26635
|
if (_.reduce((C, S) => S.isSpeech ? C + 1 : C, 0) >= this.minSpeechFrames) {
|
|
26624
|
-
const C =
|
|
26636
|
+
const C = Gy(_.map((S) => S.frame));
|
|
26625
26637
|
e({ msg: Pa.Message.SpeechEnd, audio: C });
|
|
26626
26638
|
} else
|
|
26627
26639
|
e({ msg: Pa.Message.VADMisfire });
|
|
@@ -26637,7 +26649,7 @@ class lR {
|
|
|
26637
26649
|
this.redemptionCounter = 0, this.speechFrameCount = 0, this.speaking = !1, this.speechRealStartFired = !1;
|
|
26638
26650
|
const C = this.audioBuffer;
|
|
26639
26651
|
if (this.audioBuffer = [], C.reduce((R, k) => k.isSpeech ? R + 1 : R, 0) >= this.minSpeechFrames) {
|
|
26640
|
-
const R =
|
|
26652
|
+
const R = Gy(C.map((k) => k.frame));
|
|
26641
26653
|
_({ msg: Pa.Message.SpeechEnd, audio: R });
|
|
26642
26654
|
} else
|
|
26643
26655
|
_({ msg: Pa.Message.VADMisfire });
|
|
@@ -26651,11 +26663,11 @@ class lR {
|
|
|
26651
26663
|
}
|
|
26652
26664
|
}
|
|
26653
26665
|
Rs.FrameProcessor = lR;
|
|
26654
|
-
var
|
|
26666
|
+
var db = {};
|
|
26655
26667
|
function To(o) {
|
|
26656
26668
|
throw new Error('Could not dynamically require "' + o + '". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.');
|
|
26657
26669
|
}
|
|
26658
|
-
var
|
|
26670
|
+
var hb = { exports: {} };
|
|
26659
26671
|
/*!
|
|
26660
26672
|
* ONNX Runtime Web v1.23.2
|
|
26661
26673
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -27113,7 +27125,7 @@ var db = { exports: {} };
|
|
|
27113
27125
|
(typeof ye.trace > "u" ? !ye.wasm.trace : !ye.trace) || console.timeEnd(`ORT::${s}`);
|
|
27114
27126
|
};
|
|
27115
27127
|
}), Lt, nn = d(() => {
|
|
27116
|
-
Q(), Je(), Tt(), Lt = class
|
|
27128
|
+
Q(), Je(), Tt(), Lt = class pb {
|
|
27117
27129
|
constructor(u) {
|
|
27118
27130
|
this.handler = u;
|
|
27119
27131
|
}
|
|
@@ -27216,7 +27228,7 @@ var db = { exports: {} };
|
|
|
27216
27228
|
} else
|
|
27217
27229
|
throw new TypeError("Unexpected argument[0]: must be 'path' or 'buffer'.");
|
|
27218
27230
|
let [w, E] = await K(b), A = await w.createInferenceSessionHandler(T, E);
|
|
27219
|
-
return Ze("InferenceSession.create"), Le(), new
|
|
27231
|
+
return Ze("InferenceSession.create"), Le(), new pb(A);
|
|
27220
27232
|
}
|
|
27221
27233
|
startProfiling() {
|
|
27222
27234
|
this.handler.startProfiling();
|
|
@@ -29516,7 +29528,7 @@ var best_index : i32 = 0;`, `if (${m.getByIndices("input_indices")} ${u.selectLa
|
|
|
29516
29528
|
let p = y(s.inputs, u), [m, v, T] = sn(s, p);
|
|
29517
29529
|
return it(s, m, v, T, s.inputs[4], void 0, void 0, void 0, s.inputs[5], p);
|
|
29518
29530
|
};
|
|
29519
|
-
}), z, he, po, Wh,
|
|
29531
|
+
}), z, he, po, Wh, Eb = d(() => {
|
|
29520
29532
|
dn(), st(), ct(), Ht(), at(), z = (s, u) => {
|
|
29521
29533
|
if (!s || s.length !== 5)
|
|
29522
29534
|
throw new Error("BatchNormalization requires 5 inputs");
|
|
@@ -29573,7 +29585,7 @@ var best_index : i32 = 0;`, `if (${m.getByIndices("input_indices")} ${u.selectLa
|
|
|
29573
29585
|
throw new Error("BatchNormalization trainingMode is not supported yet.");
|
|
29574
29586
|
s.compute(he(p, v));
|
|
29575
29587
|
};
|
|
29576
|
-
}), Kh, Yh, Xh,
|
|
29588
|
+
}), Kh, Yh, Xh, Cb = d(() => {
|
|
29577
29589
|
ct(), at(), Kh = (s) => {
|
|
29578
29590
|
if (s[0].dims.length !== 3)
|
|
29579
29591
|
throw new Error("input should have 3 dimensions");
|
|
@@ -29773,7 +29785,7 @@ fn quick_gelu_impl(x: vec4<${s}>) -> vec4<${s}> {
|
|
|
29773
29785
|
let p = Bt(s.inputs[0].dataType);
|
|
29774
29786
|
s.compute(Rt(s.inputs[0], "QuickGelu", Np, Dp(p, u.alpha), u.cacheKey, s.inputs[0].dataType));
|
|
29775
29787
|
};
|
|
29776
|
-
}), Up, Pp, Lp,
|
|
29788
|
+
}), Up, Pp, Lp, Ab = d(() => {
|
|
29777
29789
|
ct(), at(), pc(), Up = (s) => {
|
|
29778
29790
|
if (s[0].dims.length !== 3)
|
|
29779
29791
|
throw new Error("input should have 3 dimensions");
|
|
@@ -29809,7 +29821,7 @@ fn quick_gelu_impl(x: vec4<${s}>) -> vec4<${s}> {
|
|
|
29809
29821
|
}, Lp = (s) => {
|
|
29810
29822
|
Up(s.inputs), s.compute(Pp(s.inputs));
|
|
29811
29823
|
};
|
|
29812
|
-
}), qp, Hp, Xr, zp, Fp, Bp, Vp, jp, Gp, Wp, Kp, Yp, Xp,
|
|
29824
|
+
}), qp, Hp, Xr, zp, Fp, Bp, Vp, jp, Gp, Wp, Kp, Yp, Xp, Ib = d(() => {
|
|
29813
29825
|
st(), ct(), at(), qp = (s, u, p, m, v, T, b, w, E, A, x, $) => {
|
|
29814
29826
|
let O, D;
|
|
29815
29827
|
typeof w == "string" ? O = D = (U, j) => `${w}((${U}),(${j}))` : typeof w == "function" ? O = D = w : (O = w.scalar, D = w.vector);
|
|
@@ -29921,7 +29933,7 @@ fn quick_gelu_impl(x: vec4<${s}>) -> vec4<${s}> {
|
|
|
29921
29933
|
}, Xp = (s) => {
|
|
29922
29934
|
Xr(s, "LessOrEqual", { scalar: (u, p) => `u32(${u}<=${p})`, vector: (u, p) => `vec4<u32>(${u}<=${p})` }, void 0, void 0, 9);
|
|
29923
29935
|
};
|
|
29924
|
-
}), Jp, Qp, Zp, e_, t_, n_,
|
|
29936
|
+
}), Jp, Qp, Zp, e_, t_, n_, Rb = d(() => {
|
|
29925
29937
|
st(), ct(), Ht(), at(), Jp = (s, u) => {
|
|
29926
29938
|
if (!s || s.length < 1)
|
|
29927
29939
|
throw new Error("too few inputs");
|
|
@@ -30052,7 +30064,7 @@ fn quick_gelu_impl(x: vec4<${s}>) -> vec4<${s}> {
|
|
|
30052
30064
|
}, r_ = (s) => `
|
|
30053
30065
|
${s ? "value = value + getBiasByOutputCoords(coords);" : ""}
|
|
30054
30066
|
`;
|
|
30055
|
-
}), s_,
|
|
30067
|
+
}), s_, xb = d(() => {
|
|
30056
30068
|
s_ = (s) => `
|
|
30057
30069
|
fn getIndexFromCoords4D(coords : vec4<i32>, shape : vec4<i32>) -> i32 {
|
|
30058
30070
|
return dot(coords, vec4<i32>(
|
|
@@ -30439,8 +30451,8 @@ fn main(@builtin(local_invocation_id) localId : vec3<u32>,
|
|
|
30439
30451
|
};
|
|
30440
30452
|
return { name: "MatMul", shaderCache: { hint: `${F};${u.activation};${P};${v}`, inputDependencies: ze }, getRunData: () => ({ outputs: [{ dims: T ? T(p) : p, dataType: s[0].dataType }], dispatchGroup: { x: U[0], y: U[1], z: U[2] }, programUniforms: ke }), getShaderSource: tt };
|
|
30441
30453
|
};
|
|
30442
|
-
}), u_, c_,
|
|
30443
|
-
st(), br(), at(), Ca(), fc(),
|
|
30454
|
+
}), u_, c_, $b = d(() => {
|
|
30455
|
+
st(), br(), at(), Ca(), fc(), xb(), bc(), u_ = (s, u, p, m, v = !1, T, b = 4, w = 4, E = 4, A = "f32") => {
|
|
30444
30456
|
let x = (ke) => {
|
|
30445
30457
|
switch (ke) {
|
|
30446
30458
|
case 1:
|
|
@@ -30579,7 +30591,7 @@ fn main(@builtin(local_invocation_id) localId : vec3<u32>,
|
|
|
30579
30591
|
};
|
|
30580
30592
|
return { name: "Conv2DMatMul", shaderCache: { hint: `${u.cacheKey};${Y};${P};${ke};${ze};${lt};${ne};${te};${me}`, inputDependencies: Ye }, getRunData: () => ({ outputs: [{ dims: E ? E(p) : p, dataType: s[0].dataType }], dispatchGroup: { x: B[0], y: B[1], z: B[2] }, programUniforms: pt }), getShaderSource: vt };
|
|
30581
30593
|
};
|
|
30582
|
-
}), d_, wc, Uo, h_, Sc, p_, __, f_,
|
|
30594
|
+
}), d_, wc, Uo, h_, Sc, p_, __, f_, Ob = d(() => {
|
|
30583
30595
|
st(), br(), ct(), at(), Ca(), fc(), d_ = (s) => {
|
|
30584
30596
|
let u = 1;
|
|
30585
30597
|
for (let p = 0; p < s.length; p++)
|
|
@@ -30753,7 +30765,7 @@ fn main(@builtin(local_invocation_id) localId : vec3<u32>,
|
|
|
30753
30765
|
};
|
|
30754
30766
|
return { name: "Conv3DNaive", shaderCache: { hint: `${u.cacheKey};${b};${x};${N}`, inputDependencies: D }, getRunData: () => ({ outputs: [{ dims: p, dataType: s[0].dataType }], dispatchGroup: { x: A[0], y: A[1], z: A[2] }, programUniforms: O }), getShaderSource: P };
|
|
30755
30767
|
};
|
|
30756
|
-
}), m_, g_,
|
|
30768
|
+
}), m_, g_, kb = d(() => {
|
|
30757
30769
|
st(), ct(), at(), Ca(), m_ = (s, u, p, m) => {
|
|
30758
30770
|
let v = s.length > 2, T = v ? "value += b[output_channel];" : "", b = s[0].dims, w = s[1].dims, E = u.format === "NHWC", A = E ? p[3] : p[1], x = A / u.group, $ = E && x >= 4 ? Ut(A) : 1, O = se.size(p) / $, D = [{ type: 12, data: O }, { type: 12, data: u.dilations }, { type: 12, data: [u.strides[0], u.strides[1]] }, { type: 12, data: [u.pads[0], u.pads[1]] }, { type: 12, data: x }];
|
|
30759
30771
|
Sa(u, D), D.push(...Qe(b, [w[0], w[1], w[2], w[3] / $]));
|
|
@@ -30886,8 +30898,8 @@ fn main(@builtin(local_invocation_id) localId : vec3<u32>,
|
|
|
30886
30898
|
};
|
|
30887
30899
|
return { name: "GroupedConv-Vectorize", shaderCache: { hint: `${u.cacheKey};${T};${b};${O};${A[0]};${A[1]}`, inputDependencies: v ? ["rank", "rank", "type"] : ["rank", "rank"] }, getRunData: () => ({ outputs: [{ dims: m ? m(p) : p, dataType: s[0].dataType }], dispatchGroup: { x: Math.ceil(w / 64) }, programUniforms: $ }), getShaderSource: D };
|
|
30888
30900
|
};
|
|
30889
|
-
}), v_, ql, y_, Hl, Ec, Cc, T_, b_, Ac,
|
|
30890
|
-
ct(),
|
|
30901
|
+
}), v_, ql, y_, Hl, Ec, Cc, T_, b_, Ac, Db = d(() => {
|
|
30902
|
+
ct(), $b(), Ob(), bc(), kb(), Ca(), gc(), ur(), v_ = (s, u, p, m, v, T) => {
|
|
30891
30903
|
let b = s[0], w = s.slice(T ? 1 : 2, T ? 3 : 4), E = w.length, A = u[0], x = u.slice(2).map((O, D) => O + (O - 1) * (p[D] - 1)), $ = w.map((O, D) => O + m[D] + m[D + E]).map((O, D) => Math.floor((O - x[D] + v[D]) / v[D]));
|
|
30892
30904
|
return $.splice(0, 0, b), $.splice(T ? 3 : 1, 0, A), $;
|
|
30893
30905
|
}, ql = [2, 3, 1, 0], y_ = (s, u) => {
|
|
@@ -30977,7 +30989,7 @@ fn main(@builtin(local_invocation_id) localId : vec3<u32>,
|
|
|
30977
30989
|
Cc(s, s.inputs, p);
|
|
30978
30990
|
}
|
|
30979
30991
|
};
|
|
30980
|
-
}), w_,
|
|
30992
|
+
}), w_, Nb = d(() => {
|
|
30981
30993
|
st(), br(), ct(), at(), w_ = (s, u, p) => {
|
|
30982
30994
|
let m = s.length > 2, v = u.outputShape, T = u.format === "NHWC", b = u.group, w = s[1].dims, E = w[2] / b, A = w[3], x = T ? Ut(E) : 1, $ = T && A === 1 && E >= 4, O = $ ? Math.floor(E / 4) * 4 : Math.floor(E / x) * x, D = E - O, N = T ? Ut(A) : 1, P = T ? A === 1 ? x : N : 1, F = se.size(v) / N, q = [Math.ceil(F / 64), 1, 1];
|
|
30983
30995
|
yt("verbose", () => `[conv2d_backprop_webgpu] dispatch = ${q}`);
|
|
@@ -31106,8 +31118,8 @@ fn main(@builtin(local_invocation_id) localId : vec3<u32>,
|
|
|
31106
31118
|
};
|
|
31107
31119
|
return { name: "ConvTranspose2D", shaderCache: { hint: `${u.cacheKey};${x}${P}${N}${$}${D}`, inputDependencies: U }, getRunData: () => ({ dispatchGroup: { x: q[0], y: q[1], z: q[2] }, outputs: [{ dims: p ? p(v) : v, dataType: s[0].dataType }], programUniforms: me }), getShaderSource: ke };
|
|
31108
31120
|
};
|
|
31109
|
-
}), S_, E_, C_, Ic, A_, I_, Rc, R_, x_,
|
|
31110
|
-
|
|
31121
|
+
}), S_, E_, C_, Ic, A_, I_, Rc, R_, x_, Mb = d(() => {
|
|
31122
|
+
Nb(), Ca(), ur(), S_ = (s, u, p, m, v, T) => (s - 1) * u + p + (m - 1) * v + 1 - T, E_ = (s, u, p, m, v) => {
|
|
31111
31123
|
let T = Math.floor(s / 2);
|
|
31112
31124
|
u === "SAME_UPPER" ? (p[m] = T, p[v] = s - T) : u === "SAME_LOWER" && (p[m] = s - T, p[v] = T);
|
|
31113
31125
|
}, C_ = (s, u, p, m, v, T, b, w, E, A) => {
|
|
@@ -31198,7 +31210,7 @@ fn main(@builtin(local_invocation_id) localId : vec3<u32>,
|
|
|
31198
31210
|
Rc(s, s.inputs, p);
|
|
31199
31211
|
}
|
|
31200
31212
|
};
|
|
31201
|
-
}), $_, O_, k_,
|
|
31213
|
+
}), $_, O_, k_, Ub = d(() => {
|
|
31202
31214
|
st(), ct(), Ht(), at(), $_ = (s, u, p, m) => {
|
|
31203
31215
|
let v = se.size(u), T = u.length, b = ce("input", s, T), w = Ge("output", s, T), E = p.dataType === 6 ? p.getInt32Array()[0] : Number(p.getBigInt64Array()[0]), A = se.normalizeAxis(E, T), x = ($) => {
|
|
31204
31216
|
let O = ` i32(${b.indicesGet("inputIndices", "uniforms.axis")}) `, D = Ke("uniforms.input_shape", "uniforms.axis", T), N = m.reverse ? O + (m.exclusive ? " + 1" : "") : "0", P = m.reverse ? D : O + (m.exclusive ? "" : " + 1");
|
|
@@ -31225,7 +31237,7 @@ fn main(@builtin(local_invocation_id) localId : vec3<u32>,
|
|
|
31225
31237
|
let u = s.exclusive === 1, p = s.reverse === 1;
|
|
31226
31238
|
return Et({ exclusive: u, reverse: p });
|
|
31227
31239
|
};
|
|
31228
|
-
}), D_, N_, M_, U_, P_,
|
|
31240
|
+
}), D_, N_, M_, U_, P_, Pb = d(() => {
|
|
31229
31241
|
st(), ct(), Ht(), at(), D_ = (s) => {
|
|
31230
31242
|
if (!s || s.length !== 1)
|
|
31231
31243
|
throw new Error("DepthToSpace requires 1 input.");
|
|
@@ -31262,7 +31274,7 @@ fn main(@builtin(local_invocation_id) localId : vec3<u32>,
|
|
|
31262
31274
|
}, U_ = (s, u) => {
|
|
31263
31275
|
D_(s.inputs), s.compute(M_(s.inputs[0], u));
|
|
31264
31276
|
}, P_ = (s) => Et({ blocksize: s.blocksize, mode: s.mode, format: s.format });
|
|
31265
|
-
}), zl, Po, xc, L_, q_, H_, z_, $c, F_, B_, V_,
|
|
31277
|
+
}), zl, Po, xc, L_, q_, H_, z_, $c, F_, B_, V_, Lb = d(() => {
|
|
31266
31278
|
st(), ct(), Ht(), at(), zl = "[a-zA-Z]|\\.\\.\\.", Po = "(" + zl + ")+", xc = "^" + Po + "$", L_ = "(" + Po + ",)*" + Po, q_ = "^" + L_ + "$", H_ = class {
|
|
31267
31279
|
constructor(s = -1) {
|
|
31268
31280
|
this.symbolToIndices = /* @__PURE__ */ new Map(), this.inputIndex = s;
|
|
@@ -31391,7 +31403,7 @@ fn main(@builtin(local_invocation_id) localId : vec3<u32>,
|
|
|
31391
31403
|
let u = s.equation.replace(/\s+/g, "");
|
|
31392
31404
|
return Et({ equation: u });
|
|
31393
31405
|
};
|
|
31394
|
-
}), j_, Oc, G_, W_, K_,
|
|
31406
|
+
}), j_, Oc, G_, W_, K_, qb = d(() => {
|
|
31395
31407
|
st(), ct(), at(), j_ = (s) => {
|
|
31396
31408
|
if (!s || s.length !== 2)
|
|
31397
31409
|
throw new Error("Expand requires 2 input.");
|
|
@@ -31443,7 +31455,7 @@ fn main(@builtin(local_invocation_id) localId : vec3<u32>,
|
|
|
31443
31455
|
}, K_ = (s) => {
|
|
31444
31456
|
j_(s.inputs), s.compute(W_(s.inputs), { inputs: [0] });
|
|
31445
31457
|
};
|
|
31446
|
-
}), Y_, X_,
|
|
31458
|
+
}), Y_, X_, Hb = d(() => {
|
|
31447
31459
|
st(), ct(), at(), pc(), Y_ = (s) => {
|
|
31448
31460
|
let u = s[0].dataType, p = se.size(s[0].dims), m = se.size(s[1].dims), v = m % 4 === 0, T = (b) => {
|
|
31449
31461
|
let w = ce("x", u, [1], 4), E = ce("bias", u, [1], 4), A = Ge("y", u, [1], 4), x = [{ name: "output_vec_size", type: "u32" }, { name: "bias_size", type: "u32" }], $ = (D) => `
|
|
@@ -31468,7 +31480,7 @@ fn main(@builtin(local_invocation_id) localId : vec3<u32>,
|
|
|
31468
31480
|
}, X_ = (s) => {
|
|
31469
31481
|
s.inputs.length < 2 || se.size(s.inputs[1].dims) === 0 ? $p(s) : s.compute(Y_(s.inputs));
|
|
31470
31482
|
};
|
|
31471
|
-
}), J_, Q_, Z_, ef,
|
|
31483
|
+
}), J_, Q_, Z_, ef, zb = d(() => {
|
|
31472
31484
|
st(), ct(), Ht(), at(), J_ = (s) => {
|
|
31473
31485
|
if (!s || s.length !== 2)
|
|
31474
31486
|
throw new Error("Gather requires 2 inputs.");
|
|
@@ -31528,7 +31540,7 @@ fn main(@builtin(local_invocation_id) localId : vec3<u32>,
|
|
|
31528
31540
|
let p = s.inputs;
|
|
31529
31541
|
J_(p), s.compute(Q_(s.inputs, u));
|
|
31530
31542
|
};
|
|
31531
|
-
}), tf, nf, rf,
|
|
31543
|
+
}), tf, nf, rf, Fb = d(() => {
|
|
31532
31544
|
st(), ct(), at(), tf = (s, u, p, m, v, T, b, w, E) => {
|
|
31533
31545
|
let A = [{ type: 12, data: T }, { type: 12, data: m }, { type: 12, data: v }, { type: 12, data: p }, { type: 12, data: b }, { type: 12, data: w }, { type: 12, data: E }], x = [T];
|
|
31534
31546
|
A.push(...Qe(u.dims, x));
|
|
@@ -31575,7 +31587,7 @@ fn main(@builtin(local_invocation_id) localId : vec3<u32>,
|
|
|
31575
31587
|
};
|
|
31576
31588
|
s.compute({ name: "GatherND", shaderCache: { hint: u.cacheKey, inputDependencies: ["rank", "rank"] }, getRunData: () => ({ outputs: [{ dims: F, dataType: v }], dispatchGroup: { x: Math.ceil(q / 64) }, programUniforms: U }), getShaderSource: j }, { inputs: [p[0], N] });
|
|
31577
31589
|
}, rf = (s) => ({ batchDims: s.batch_dims, cacheKey: "" });
|
|
31578
|
-
}), sf, af, of, lf,
|
|
31590
|
+
}), sf, af, of, lf, Bb = d(() => {
|
|
31579
31591
|
st(), ct(), Ht(), at(), sf = (s, u) => {
|
|
31580
31592
|
if (s.length < 3 || s.length > 4)
|
|
31581
31593
|
throw new Error("GatherBlockQuantized requires 3 or 4 inputs.");
|
|
@@ -31647,7 +31659,7 @@ fn main(@builtin(local_invocation_id) localId : vec3<u32>,
|
|
|
31647
31659
|
let p = s.inputs;
|
|
31648
31660
|
sf(p, u), s.compute(af(s.inputs, u));
|
|
31649
31661
|
}, lf = (s) => Et({ blockSize: s.blockSize, gatherAxis: s.gatherAxis, quantizeAxis: s.quantizeAxis });
|
|
31650
|
-
}), uf, cf, df, hf,
|
|
31662
|
+
}), uf, cf, df, hf, Vb = d(() => {
|
|
31651
31663
|
st(), ct(), Ht(), at(), uf = (s) => {
|
|
31652
31664
|
if (!s || s.length !== 2)
|
|
31653
31665
|
throw new Error("GatherElements requires 2 inputs.");
|
|
@@ -31679,7 +31691,7 @@ fn main(@builtin(local_invocation_id) localId : vec3<u32>,
|
|
|
31679
31691
|
let p = s.inputs;
|
|
31680
31692
|
uf(p), s.compute(cf(s.inputs, u));
|
|
31681
31693
|
};
|
|
31682
|
-
}), pf, _f, ff, mf,
|
|
31694
|
+
}), pf, _f, ff, mf, jb = d(() => {
|
|
31683
31695
|
st(), ct(), at(), pf = (s) => {
|
|
31684
31696
|
if (!s)
|
|
31685
31697
|
throw new Error("Input is missing");
|
|
@@ -31830,7 +31842,7 @@ fn main(@builtin(local_invocation_id) localId : vec3<u32>,
|
|
|
31830
31842
|
}, mf = (s, u) => {
|
|
31831
31843
|
pf(s.inputs), s.compute(_f(s.inputs, u));
|
|
31832
31844
|
};
|
|
31833
|
-
}), Ts, js, Aa, Ia, gf, vf, yf, Tf, bf, wf, Sf, Ef, Cf, Af,
|
|
31845
|
+
}), Ts, js, Aa, Ia, gf, vf, yf, Tf, bf, wf, Sf, Ef, Cf, Af, Gb = d(() => {
|
|
31834
31846
|
st(), ct(), Ht(), at(), [Ts, js, Aa, Ia] = [0, 1, 2, 3], gf = (s) => {
|
|
31835
31847
|
if (s[0].dims.length !== 4)
|
|
31836
31848
|
throw new Error("only 4-D tensor is supported.");
|
|
@@ -32265,7 +32277,7 @@ fn calculateOutputIndex(index: u32) -> u32 {
|
|
|
32265
32277
|
}, Hf = (s, u) => {
|
|
32266
32278
|
qf(s.inputs, u), s.compute(Fl(s.inputs, u));
|
|
32267
32279
|
};
|
|
32268
|
-
}), Ff, Bf, Nc, Vf, jf,
|
|
32280
|
+
}), Ff, Bf, Nc, Vf, jf, Wb = d(() => {
|
|
32269
32281
|
Ht(), st(), Yr(), Of(), Lf(), ur(), zf(), at(), Ff = (s, u) => {
|
|
32270
32282
|
if (u.doRotary && s.length <= 7)
|
|
32271
32283
|
throw new Error("cos_cache and sin_cache inputs are required if do_rotary is specified");
|
|
@@ -32401,7 +32413,7 @@ fn calculateOutputIndex(index: u32) -> u32 {
|
|
|
32401
32413
|
let q = Lo(s, p.batchSize, p.numHeads, p.sequenceLength, p.headSize, u.doRotary ? P : O, void 0, 0), U = Nc(s, u.doRotary ? F : D, p), j = Nc(s, N, p);
|
|
32402
32414
|
it(s, q, U, j, void 0, void 0, b, w, void 0, p, E, A);
|
|
32403
32415
|
};
|
|
32404
|
-
}), Mc, Gf, Wf, Kf,
|
|
32416
|
+
}), Mc, Gf, Wf, Kf, Kb = d(() => {
|
|
32405
32417
|
st(), ct(), ur(), at(), Mc = (s, u, p, m, v, T, b, w) => {
|
|
32406
32418
|
let E = Ut(T), A = E === 1 ? "f32" : `vec${E}f`, x = E === 1 ? "vec2f" : `mat2x${E}f`, $ = v * b, O = 64;
|
|
32407
32419
|
$ === 1 && (O = 256);
|
|
@@ -32501,7 +32513,7 @@ fn calculateOutputIndex(index: u32) -> u32 {
|
|
|
32501
32513
|
}, Kf = (s, u) => {
|
|
32502
32514
|
u.format === "NHWC" ? Wf(s, s.inputs, u) : Gf(s, s.inputs, u);
|
|
32503
32515
|
};
|
|
32504
|
-
}), Yf, Xf, Jf,
|
|
32516
|
+
}), Yf, Xf, Jf, Yb = d(() => {
|
|
32505
32517
|
st(), ct(), at(), Yf = (s) => {
|
|
32506
32518
|
if (!s || s.length < 2)
|
|
32507
32519
|
throw new Error("layerNorm requires at least 2 inputs.");
|
|
@@ -32552,7 +32564,7 @@ fn calculateOutputIndex(index: u32) -> u32 {
|
|
|
32552
32564
|
}, Jf = (s, u) => {
|
|
32553
32565
|
Yf(s.inputs), s.compute(Xf(s.inputs, u, s.outputCount));
|
|
32554
32566
|
};
|
|
32555
|
-
}), Qf, Zf,
|
|
32567
|
+
}), Qf, Zf, Xb = d(() => {
|
|
32556
32568
|
ct(), gc(), bc(), Qf = (s) => {
|
|
32557
32569
|
if (!s || s.length !== 2)
|
|
32558
32570
|
throw new Error("MatMul requires 2 inputs.");
|
|
@@ -32575,7 +32587,7 @@ fn calculateOutputIndex(index: u32) -> u32 {
|
|
|
32575
32587
|
s.compute(Ll(s.inputs, { activation: "" }, u));
|
|
32576
32588
|
}
|
|
32577
32589
|
};
|
|
32578
|
-
}), em, tm, nm, rm, sm,
|
|
32590
|
+
}), em, tm, nm, rm, sm, Jb = d(() => {
|
|
32579
32591
|
st(), ct(), Ht(), at(), em = (s, u) => {
|
|
32580
32592
|
if (s.length < 3 || s.length > 4)
|
|
32581
32593
|
throw new Error("MatMulNBits requires 3 or 4 inputs");
|
|
@@ -32808,7 +32820,7 @@ fn calculateOutputIndex(index: u32) -> u32 {
|
|
|
32808
32820
|
}, rm = (s, u) => {
|
|
32809
32821
|
em(s.inputs, u), u.blockSize === 32 && s.adapterInfo.isVendor("intel") && s.adapterInfo.isArchitecture("gen-12lp") ? s.compute(nm(s.inputs, u)) : s.compute(tm(s.inputs, u));
|
|
32810
32822
|
}, sm = (s) => Et(s);
|
|
32811
|
-
}), im, am, om, lm, um, cm, dm, hm, pm,
|
|
32823
|
+
}), im, am, om, lm, um, cm, dm, hm, pm, Qb = d(() => {
|
|
32812
32824
|
st(), ct(), at(), im = (s) => {
|
|
32813
32825
|
if (!s || s.length < 1)
|
|
32814
32826
|
throw new Error("Too few inputs");
|
|
@@ -32951,7 +32963,7 @@ fn calculateOutputIndex(index: u32) -> u32 {
|
|
|
32951
32963
|
let p = hm(s.inputs, u);
|
|
32952
32964
|
s.compute(dm(s.inputs, p), { inputs: [0] });
|
|
32953
32965
|
};
|
|
32954
|
-
}), qo, Uc, Pc, Lc, qc, _m, fm, Hc, zc, mm, gm, Fc, vm, ym, Bc, Tm, bm, wm, Sm,
|
|
32966
|
+
}), qo, Uc, Pc, Lc, qc, _m, fm, Hc, zc, mm, gm, Fc, vm, ym, Bc, Tm, bm, wm, Sm, Zb = d(() => {
|
|
32955
32967
|
dn(), st(), ct(), at(), qo = (s) => {
|
|
32956
32968
|
if (Z.webgpu.validateInputContent && (!s || s.length !== 1))
|
|
32957
32969
|
throw new Error("Pool ops requires 1 input.");
|
|
@@ -33128,7 +33140,7 @@ fn calculateOutputIndex(index: u32) -> u32 {
|
|
|
33128
33140
|
}, Sm = (s, u) => {
|
|
33129
33141
|
qo(s.inputs), s.compute(Bc("GlobalMaxPool", s.inputs[0], !0, u));
|
|
33130
33142
|
};
|
|
33131
|
-
}), Em, Cm, Am, Im,
|
|
33143
|
+
}), Em, Cm, Am, Im, e0 = d(() => {
|
|
33132
33144
|
st(), ct(), Ht(), at(), Em = (s, u) => {
|
|
33133
33145
|
if (s.length < 2 || s.length > 3)
|
|
33134
33146
|
throw new Error("DequantizeLinear requires 2 or 3 inputs.");
|
|
@@ -33210,7 +33222,7 @@ fn calculateOutputIndex(index: u32) -> u32 {
|
|
|
33210
33222
|
}, Am = (s, u) => {
|
|
33211
33223
|
Em(s.inputs, u), s.compute(Cm(s.inputs, u));
|
|
33212
33224
|
}, Im = (s) => Et({ axis: s.axis, blockSize: s.blockSize });
|
|
33213
|
-
}), Rm, xm, $m,
|
|
33225
|
+
}), Rm, xm, $m, t0 = d(() => {
|
|
33214
33226
|
dn(), st(), at(), Rm = (s, u, p) => {
|
|
33215
33227
|
let m = s === u, v = s < u && p < 0, T = s > u && p > 0;
|
|
33216
33228
|
if (m || v || T)
|
|
@@ -33230,7 +33242,7 @@ fn calculateOutputIndex(index: u32) -> u32 {
|
|
|
33230
33242
|
let u = 0, p = 0, m = 0;
|
|
33231
33243
|
s.inputs[0].dataType === 6 ? (u = s.inputs[0].getInt32Array()[0], p = s.inputs[1].getInt32Array()[0], m = s.inputs[2].getInt32Array()[0]) : s.inputs[0].dataType === 1 && (u = s.inputs[0].getFloat32Array()[0], p = s.inputs[1].getFloat32Array()[0], m = s.inputs[2].getFloat32Array()[0]), Z.webgpu.validateInputContent && Rm(u, p, m), s.compute(xm(u, p, m, s.inputs[0].dataType), { inputs: [] });
|
|
33232
33244
|
};
|
|
33233
|
-
}), Om, km, Dm, Nm,
|
|
33245
|
+
}), Om, km, Dm, Nm, n0 = d(() => {
|
|
33234
33246
|
st(), ct(), Ht(), at(), Om = (s, u, p, m) => {
|
|
33235
33247
|
if (s !== "none" && m !== "i32" && m !== "u32" && m !== "f32")
|
|
33236
33248
|
throw new Error(`Input ${m} is not supported with reduction ${s}.`);
|
|
@@ -33304,7 +33316,7 @@ fn calculateOutputIndex(index: u32) -> u32 {
|
|
|
33304
33316
|
}, Dm = (s) => Et({ reduction: s.reduction }), Nm = (s, u) => {
|
|
33305
33317
|
s.compute(km(s.inputs, u), { inputs: [s.inputs[1], s.inputs[2]], outputs: [] });
|
|
33306
33318
|
};
|
|
33307
|
-
}), Mm, Um, Pm, Vc, Lm, qm, Hm, zm, Fm, Bm, Vm, jm, jc, Gm, Wm, Km, Ym, Xm, Jm, Qm,
|
|
33319
|
+
}), Mm, Um, Pm, Vc, Lm, qm, Hm, zm, Fm, Bm, Vm, jm, jc, Gm, Wm, Km, Ym, Xm, Jm, Qm, r0 = d(() => {
|
|
33308
33320
|
st(), ct(), Ht(), at(), Mm = (s, u) => {
|
|
33309
33321
|
if (s.every((p) => p > 0 || (() => {
|
|
33310
33322
|
throw new Error("Resize requires scales input values to be positive");
|
|
@@ -33742,7 +33754,7 @@ fn calculateOutputIndex(index: u32) -> u32 {
|
|
|
33742
33754
|
let u = s.antialias, p = s.axes, m = s.coordinateTransformMode, v = s.cubicCoeffA, T = s.excludeOutside !== 0, b = s.extrapolationValue, w = s.keepAspectRatioPolicy, E = s.mode, A = s.nearestMode === "" ? "simple" : s.nearestMode;
|
|
33743
33755
|
return Et({ antialias: u, axes: p, coordinateTransformMode: m, cubicCoeffA: v, excludeOutside: T, extrapolationValue: b, keepAspectRatioPolicy: w, mode: E, nearestMode: A });
|
|
33744
33756
|
};
|
|
33745
|
-
}), Zm, eg, tg,
|
|
33757
|
+
}), Zm, eg, tg, s0 = d(() => {
|
|
33746
33758
|
st(), ct(), at(), Zm = (s) => {
|
|
33747
33759
|
if (!s || s.length < 3)
|
|
33748
33760
|
throw new Error("layerNorm requires at least 3 inputs.");
|
|
@@ -33841,7 +33853,7 @@ fn calculateOutputIndex(index: u32) -> u32 {
|
|
|
33841
33853
|
let p = [0];
|
|
33842
33854
|
s.outputCount > 1 && p.push(-3), s.outputCount > 2 && p.push(-3), s.outputCount > 3 && p.push(3), s.compute(eg(s.inputs, u, s.outputCount, !1), { outputs: p });
|
|
33843
33855
|
};
|
|
33844
|
-
}), ng, Ho, rg, Gc, sg, ig, ag, og,
|
|
33856
|
+
}), ng, Ho, rg, Gc, sg, ig, ag, og, i0 = d(() => {
|
|
33845
33857
|
st(), ct(), Ht(), at(), ng = (s, u) => {
|
|
33846
33858
|
if (!s || s.length < 1)
|
|
33847
33859
|
throw new Error("too few inputs");
|
|
@@ -33931,7 +33943,7 @@ fn calculateOutputIndex(index: u32) -> u32 {
|
|
|
33931
33943
|
let u = s.starts, p = s.ends, m = s.axes;
|
|
33932
33944
|
return Et({ starts: u, ends: p, axes: m });
|
|
33933
33945
|
};
|
|
33934
|
-
}), lg, ug, cg, dg,
|
|
33946
|
+
}), lg, ug, cg, dg, a0 = d(() => {
|
|
33935
33947
|
st(), ct(), Ht(), ur(), at(), lg = (s) => {
|
|
33936
33948
|
if (!s || s.length !== 1)
|
|
33937
33949
|
throw new Error("Softmax op requires 1 input.");
|
|
@@ -34019,7 +34031,7 @@ fn calculateOutputIndex(index: u32) -> u32 {
|
|
|
34019
34031
|
}, cg = (s, u) => {
|
|
34020
34032
|
lg(s.inputs), ug(s, u);
|
|
34021
34033
|
}, dg = (s) => Et({ axis: s.axis });
|
|
34022
|
-
}), Wc, hg, pg, _g, fg,
|
|
34034
|
+
}), Wc, hg, pg, _g, fg, o0 = d(() => {
|
|
34023
34035
|
st(), ct(), at(), Wc = (s) => Array.from(s.getBigInt64Array(), Number), hg = (s) => {
|
|
34024
34036
|
if (!s || s.length !== 2)
|
|
34025
34037
|
throw new Error("Tile requires 2 inputs.");
|
|
@@ -34056,7 +34068,7 @@ fn calculateOutputIndex(index: u32) -> u32 {
|
|
|
34056
34068
|
}, fg = (s) => {
|
|
34057
34069
|
hg(s.inputs), s.compute(_g(s.inputs), { inputs: [0] });
|
|
34058
34070
|
};
|
|
34059
|
-
}), mg, gg, vg,
|
|
34071
|
+
}), mg, gg, vg, l0 = d(() => {
|
|
34060
34072
|
st(), ct(), at(), mg = (s, u, p, m, v) => {
|
|
34061
34073
|
let T = Ge("output_data", v, p.length, 4), b = ce("a_data", u[1].dataType, u[1].dims.length, 4), w = ce("b_data", u[2].dataType, u[2].dims.length, 4), E = ce("c_data", u[0].dataType, u[0].dims.length, 4), A, x = ($, O, D) => `select(${O}, ${$}, ${D})`;
|
|
34062
34074
|
if (!m)
|
|
@@ -34110,9 +34122,9 @@ fn calculateOutputIndex(index: u32) -> u32 {
|
|
|
34110
34122
|
}, vg = (s) => {
|
|
34111
34123
|
s.compute(gg(s.inputs));
|
|
34112
34124
|
};
|
|
34113
|
-
}), yg,
|
|
34114
|
-
f(), Yr(),
|
|
34115
|
-
}), Tg,
|
|
34125
|
+
}), yg, u0 = d(() => {
|
|
34126
|
+
f(), Yr(), Eb(), Cb(), Ab(), Ib(), Rb(), Db(), Mb(), Ub(), Pb(), Lb(), qb(), Hb(), zb(), Fb(), Bb(), Vb(), jb(), Gb(), Wb(), Kb(), Yb(), Xb(), Jb(), Of(), Qb(), Zb(), e0(), t0(), n0(), Vs(), r0(), zf(), s0(), i0(), a0(), Lf(), o0(), ur(), pc(), l0(), yg = /* @__PURE__ */ new Map([["Abs", [Qh]], ["Acos", [Zh]], ["Acosh", [ep]], ["Add", [zp]], ["ArgMax", [l, h]], ["ArgMin", [i, h]], ["Asin", [tp]], ["Asinh", [np]], ["Atan", [rp]], ["Atanh", [sp]], ["Attention", [Dr]], ["AveragePool", [gm, mm]], ["BatchNormalization", [Wh]], ["BiasAdd", [Xh]], ["BiasSplitGelu", [Lp]], ["Cast", [ap, ip]], ["Ceil", [up]], ["Clip", [lp]], ["Concat", [t_, n_]], ["Conv", [Ac, Ec]], ["ConvTranspose", [x_, A_]], ["Cos", [cp]], ["Cosh", [dp]], ["CumSum", [O_, k_]], ["DepthToSpace", [U_, P_]], ["DequantizeLinear", [Am, Im]], ["Div", [Fp]], ["Einsum", [B_, V_]], ["Elu", [hp, No]], ["Equal", [Bp]], ["Erf", [pp]], ["Exp", [_p]], ["Expand", [K_]], ["FastGelu", [X_]], ["Floor", [fp]], ["FusedConv", [Ac, Ec]], ["Gather", [ef, Z_]], ["GatherElements", [hf, df]], ["GatherBlockQuantized", [of, lf]], ["GatherND", [nf, rf]], ["Gelu", [mp]], ["Gemm", [mf, ff]], ["GlobalAveragePool", [ym, vm]], ["GlobalMaxPool", [Sm, wm]], ["Greater", [Wp]], ["GreaterOrEqual", [Yp]], ["GridSample", [Cf, Af]], ["GroupQueryAttention", [jf]], ["HardSigmoid", [Ep, Sp]], ["InstanceNormalization", [Kf]], ["LayerNormalization", [Jf]], ["LeakyRelu", [gp, No]], ["Less", [Kp]], ["LessOrEqual", [Xp]], ["Log", [kp]], ["MatMul", [Zf]], ["MatMulNBits", [rm, sm]], ["MaxPool", [Tm, bm]], ["Mul", [Vp]], ["MultiHeadAttention", [$f, Rf]], ["Neg", [yp]], ["Not", [vp]], ["Pad", [pm]], ["Pow", [jp]], ["QuickGelu", [Mp, No]], ["Range", [$m]], ["Reciprocal", [Tp]], ["ReduceMin", [jn]], ["ReduceMean", [Ki]], ["ReduceMax", [Xi]], ["ReduceSum", [co]], ["ReduceProd", [M]], ["ReduceL1", [Yi]], ["ReduceL2", [lo]], ["ReduceLogSum", [ho]], ["ReduceLogSumExp", [uo]], ["ReduceSumSquare", [ys]], ["Relu", [bp]], ["Resize", [Jm, Qm]], ["RotaryEmbedding", [Hf]], ["ScatterND", [Nm, Dm]], ["Sigmoid", [wp]], ["Sin", [Cp]], ["Sinh", [Ap]], ["Slice", [ag, og]], ["SkipLayerNormalization", [tg]], ["Split", [Uf, Pf]], ["Sqrt", [Ip]], ["Softmax", [cg, dg]], ["Sub", [Gp]], ["Tan", [Rp]], ["Tanh", [xp]], ["ThresholdedRelu", [Op, No]], ["Tile", [fg]], ["Transpose", [ki, hs]], ["Where", [vg]]]);
|
|
34127
|
+
}), Tg, c0 = d(() => {
|
|
34116
34128
|
dn(), br(), at(), Tg = class {
|
|
34117
34129
|
constructor(s) {
|
|
34118
34130
|
this.backend = s, this.repo = /* @__PURE__ */ new Map(), this.attributesBound = !1;
|
|
@@ -34171,8 +34183,8 @@ ${T}`, w = p.createShaderModule({ code: b, label: s.name });
|
|
|
34171
34183
|
};
|
|
34172
34184
|
}), bg = {};
|
|
34173
34185
|
C(bg, { WebGpuBackend: () => Cg });
|
|
34174
|
-
var wg, Sg, Eg, Cg,
|
|
34175
|
-
dn(), st(), br(), Si(), ko(),
|
|
34186
|
+
var wg, Sg, Eg, Cg, d0 = d(() => {
|
|
34187
|
+
dn(), st(), br(), Si(), ko(), u0(), c0(), wg = (s, u) => {
|
|
34176
34188
|
if (u.length !== s.length)
|
|
34177
34189
|
throw new Error(`inputDependencies length ${u.length} is not equal to inputTensors length ${s.length}.`);
|
|
34178
34190
|
let p = [];
|
|
@@ -34471,8 +34483,8 @@ ${T}`, w = p.createShaderModule({ code: b, label: s.name });
|
|
|
34471
34483
|
};
|
|
34472
34484
|
}), Ag = {};
|
|
34473
34485
|
C(Ag, { init: () => Rg });
|
|
34474
|
-
var Bl, Ig, Rg,
|
|
34475
|
-
st(), br(), ct(), ya(), Bl = class
|
|
34486
|
+
var Bl, Ig, Rg, h0 = d(() => {
|
|
34487
|
+
st(), br(), ct(), ya(), Bl = class _b {
|
|
34476
34488
|
constructor(u, p, m, v) {
|
|
34477
34489
|
this.module = u, this.dataType = p, this.data = m, this.dims = v;
|
|
34478
34490
|
}
|
|
@@ -34503,7 +34515,7 @@ ${T}`, w = p.createShaderModule({ code: b, label: s.name });
|
|
|
34503
34515
|
reshape(u) {
|
|
34504
34516
|
if (se.size(u) !== se.size(this.dims))
|
|
34505
34517
|
throw new Error("Invalid new shape");
|
|
34506
|
-
return new
|
|
34518
|
+
return new _b(this.module, this.dataType, this.data, u);
|
|
34507
34519
|
}
|
|
34508
34520
|
}, Ig = class {
|
|
34509
34521
|
constructor(s, u, p) {
|
|
@@ -34556,7 +34568,7 @@ ${T}`, w = p.createShaderModule({ code: b, label: s.name });
|
|
|
34556
34568
|
if (!v)
|
|
34557
34569
|
throw new Error("Failed to initialize JSEP. The WebAssembly module is not built with JSEP support.");
|
|
34558
34570
|
if (s === "webgpu") {
|
|
34559
|
-
let T = (
|
|
34571
|
+
let T = (d0(), R(bg)).WebGpuBackend, b = new T();
|
|
34560
34572
|
await b.initialize(p, m), v("webgpu", [b, (w) => b.alloc(Number(w)), (w) => b.free(w), (w, E, A, x = !1) => {
|
|
34561
34573
|
if (x)
|
|
34562
34574
|
yt("verbose", () => `[WebGPU] jsepCopyGpuToGpu: src=${Number(w)}, dst=${Number(E)}, size=${Number(A)}`), b.memcpy(Number(w), Number(E));
|
|
@@ -34607,7 +34619,7 @@ ${T}`, w = p.createShaderModule({ code: b, label: s.name });
|
|
|
34607
34619
|
if (u === "webnn" && (typeof navigator > "u" || !navigator.ml))
|
|
34608
34620
|
throw new Error("WebNN is not supported in current environment");
|
|
34609
34621
|
{
|
|
34610
|
-
let m = (
|
|
34622
|
+
let m = (h0(), R(Ag)).init;
|
|
34611
34623
|
u === "webgpu" && await m("webgpu", It(), s, p), u === "webnn" && await m("webnn", It(), s);
|
|
34612
34624
|
}
|
|
34613
34625
|
}, Ji = /* @__PURE__ */ new Map(), $g = (s) => {
|
|
@@ -34831,8 +34843,8 @@ ${T}`, w = p.createShaderModule({ code: b, label: s.name });
|
|
|
34831
34843
|
throw new Error("String tensor is not supported on GPU.");
|
|
34832
34844
|
let wn = [];
|
|
34833
34845
|
for (let on = 0; on < bs; on++) {
|
|
34834
|
-
let Gs = b.getValue(zt + on * w, "*"),
|
|
34835
|
-
wn.push(b.UTF8ToString(Gs,
|
|
34846
|
+
let Gs = b.getValue(zt + on * w, "*"), g0 = b.getValue(zt + (on + 1) * w, "*"), v0 = on === bs - 1 ? void 0 : g0 - Gs;
|
|
34847
|
+
wn.push(b.UTF8ToString(Gs, v0));
|
|
34836
34848
|
}
|
|
34837
34849
|
tt.push([nt, bn, wn, "cpu"]);
|
|
34838
34850
|
} else if (Bo === "gpu-buffer" && bs > 0) {
|
|
@@ -34998,7 +35010,7 @@ ${T}`, w = p.createShaderModule({ code: b, label: s.name });
|
|
|
34998
35010
|
});
|
|
34999
35011
|
td(s);
|
|
35000
35012
|
};
|
|
35001
|
-
}), sd, zg, Fg,
|
|
35013
|
+
}), sd, zg, Fg, p0 = d(() => {
|
|
35002
35014
|
dn(), Hg(), st(), Hr(), gi(), sd = (s, u) => {
|
|
35003
35015
|
switch (s.location) {
|
|
35004
35016
|
case "cpu":
|
|
@@ -35072,8 +35084,8 @@ ${T}`, w = p.createShaderModule({ code: b, label: s.name });
|
|
|
35072
35084
|
};
|
|
35073
35085
|
}), Bg = {};
|
|
35074
35086
|
C(Bg, { OnnxruntimeWebAssemblyBackend: () => ad, initializeFlags: () => id, wasmBackend: () => Vg });
|
|
35075
|
-
var id, ad, Vg,
|
|
35076
|
-
dn(), Hg(),
|
|
35087
|
+
var id, ad, Vg, _0 = d(() => {
|
|
35088
|
+
dn(), Hg(), p0(), id = () => {
|
|
35077
35089
|
(typeof Z.wasm.initTimeout != "number" || Z.wasm.initTimeout < 0) && (Z.wasm.initTimeout = 0);
|
|
35078
35090
|
let s = Z.wasm.simd;
|
|
35079
35091
|
if (typeof s != "boolean" && s !== void 0 && s !== "fixed" && s !== "relaxed" && (console.warn(`Property "env.wasm.simd" is set to unknown value "${s}". Reset it to \`false\` and ignore SIMD feature checking.`), Z.wasm.simd = !1), typeof Z.wasm.proxy != "boolean" && (Z.wasm.proxy = !1), typeof Z.wasm.trace != "boolean" && (Z.wasm.trace = !1), typeof Z.wasm.numThreads != "number" || !Number.isInteger(Z.wasm.numThreads) || Z.wasm.numThreads <= 0)
|
|
@@ -35093,13 +35105,13 @@ ${T}`, w = p.createShaderModule({ code: b, label: s.name });
|
|
|
35093
35105
|
}
|
|
35094
35106
|
}, Vg = new ad();
|
|
35095
35107
|
}), jg = {};
|
|
35096
|
-
C(jg, { InferenceSession: () => Dt, TRACE: () => ut, TRACE_EVENT_BEGIN: () => Pe, TRACE_EVENT_END: () => Ze, TRACE_FUNC_BEGIN: () => mt, TRACE_FUNC_END: () => Le, Tensor: () => Xe, default: () =>
|
|
35097
|
-
var
|
|
35108
|
+
C(jg, { InferenceSession: () => Dt, TRACE: () => ut, TRACE_EVENT_BEGIN: () => Pe, TRACE_EVENT_END: () => Ze, TRACE_FUNC_BEGIN: () => mt, TRACE_FUNC_END: () => Le, Tensor: () => Xe, default: () => m0, env: () => Z, registerBackend: () => V }), dn(), dn(), dn();
|
|
35109
|
+
var f0 = "1.23.2", m0 = nr;
|
|
35098
35110
|
{
|
|
35099
|
-
let s = (
|
|
35111
|
+
let s = (_0(), R(Bg)).wasmBackend;
|
|
35100
35112
|
V("webgpu", s, 5), V("webnn", s, 5), V("cpu", s, 10), V("wasm", s, 10);
|
|
35101
35113
|
}
|
|
35102
|
-
return Object.defineProperty(Z.versions, "web", { value:
|
|
35114
|
+
return Object.defineProperty(Z.versions, "web", { value: f0, enumerable: !0 }), R(jg);
|
|
35103
35115
|
})();
|
|
35104
35116
|
/**
|
|
35105
35117
|
* @license
|
|
@@ -35150,13 +35162,13 @@ ${T}`, w = p.createShaderModule({ code: b, label: s.name });
|
|
|
35150
35162
|
* =============================================================================
|
|
35151
35163
|
*/
|
|
35152
35164
|
o.exports = r;
|
|
35153
|
-
})(
|
|
35154
|
-
var
|
|
35155
|
-
Object.defineProperty(
|
|
35156
|
-
var lc = {},
|
|
35165
|
+
})(hb);
|
|
35166
|
+
var fb = hb.exports, Bh = {}, mb = {};
|
|
35167
|
+
Object.defineProperty(mb, "__esModule", { value: !0 });
|
|
35168
|
+
var lc = {}, gb;
|
|
35157
35169
|
Object.defineProperty(lc, "__esModule", { value: !0 });
|
|
35158
35170
|
lc.SileroLegacy = void 0;
|
|
35159
|
-
const
|
|
35171
|
+
const Wy = Oo;
|
|
35160
35172
|
class Vh {
|
|
35161
35173
|
constructor(n, r, a, c, e) {
|
|
35162
35174
|
this.ortInstance = n, this._session = r, this._h = a, this._c = c, this._sr = e, this.reset_state = () => {
|
|
@@ -35179,24 +35191,24 @@ class Vh {
|
|
|
35179
35191
|
}
|
|
35180
35192
|
}
|
|
35181
35193
|
lc.SileroLegacy = Vh;
|
|
35182
|
-
|
|
35194
|
+
gb = Vh;
|
|
35183
35195
|
Vh.new = async (o, n) => {
|
|
35184
|
-
|
|
35196
|
+
Wy.log.debug("initializing vad");
|
|
35185
35197
|
const r = await n(), a = await o.InferenceSession.create(r), c = new o.Tensor("int64", [16000n]), e = Array(2 * 64).fill(0), _ = new o.Tensor("float32", e, [2, 1, 64]), g = new o.Tensor("float32", e, [2, 1, 64]);
|
|
35186
|
-
return
|
|
35198
|
+
return Wy.log.debug("vad is initialized"), new gb(o, a, _, g, c);
|
|
35187
35199
|
};
|
|
35188
|
-
var uc = {},
|
|
35200
|
+
var uc = {}, vb;
|
|
35189
35201
|
Object.defineProperty(uc, "__esModule", { value: !0 });
|
|
35190
35202
|
uc.SileroV5 = void 0;
|
|
35191
|
-
const
|
|
35192
|
-
function
|
|
35203
|
+
const Ky = Oo;
|
|
35204
|
+
function yb(o) {
|
|
35193
35205
|
const n = Array(256).fill(0);
|
|
35194
35206
|
return new o.Tensor("float32", n, [2, 1, 128]);
|
|
35195
35207
|
}
|
|
35196
35208
|
class jh {
|
|
35197
35209
|
constructor(n, r, a, c) {
|
|
35198
35210
|
this._session = n, this._state = r, this._sr = a, this.ortInstance = c, this.reset_state = () => {
|
|
35199
|
-
this._state =
|
|
35211
|
+
this._state = yb(this.ortInstance);
|
|
35200
35212
|
}, this.process = async (e) => {
|
|
35201
35213
|
const g = {
|
|
35202
35214
|
input: new this.ortInstance.Tensor("float32", e, [
|
|
@@ -35213,11 +35225,11 @@ class jh {
|
|
|
35213
35225
|
}
|
|
35214
35226
|
}
|
|
35215
35227
|
uc.SileroV5 = jh;
|
|
35216
|
-
|
|
35228
|
+
vb = jh;
|
|
35217
35229
|
jh.new = async (o, n) => {
|
|
35218
|
-
|
|
35219
|
-
const r = await n(), a = await o.InferenceSession.create(r), c = new o.Tensor("int64", [16000n]), e =
|
|
35220
|
-
return
|
|
35230
|
+
Ky.log.debug("Loading VAD...");
|
|
35231
|
+
const r = await n(), a = await o.InferenceSession.create(r), c = new o.Tensor("int64", [16000n]), e = yb(o);
|
|
35232
|
+
return Ky.log.debug("...finished loading VAD"), new vb(a, e, c, o);
|
|
35221
35233
|
};
|
|
35222
35234
|
(function(o) {
|
|
35223
35235
|
var n = Wn && Wn.__createBinding || (Object.create ? function(e, _, g, d) {
|
|
@@ -35232,7 +35244,7 @@ jh.new = async (o, n) => {
|
|
|
35232
35244
|
for (var g in e)
|
|
35233
35245
|
g !== "default" && !Object.prototype.hasOwnProperty.call(_, g) && n(_, e, g);
|
|
35234
35246
|
};
|
|
35235
|
-
Object.defineProperty(o, "__esModule", { value: !0 }), o.SileroV5 = o.SileroLegacy = void 0, r(
|
|
35247
|
+
Object.defineProperty(o, "__esModule", { value: !0 }), o.SileroV5 = o.SileroLegacy = void 0, r(mb, o);
|
|
35236
35248
|
var a = lc;
|
|
35237
35249
|
Object.defineProperty(o, "SileroLegacy", { enumerable: !0, get: function() {
|
|
35238
35250
|
return a.SileroLegacy;
|
|
@@ -35304,7 +35316,7 @@ Ul.Resampler = cR;
|
|
|
35304
35316
|
return r(L, k), L;
|
|
35305
35317
|
};
|
|
35306
35318
|
Object.defineProperty(o, "__esModule", { value: !0 }), o.NonRealTimeVAD = o.defaultNonRealTimeVADOptions = void 0;
|
|
35307
|
-
const c = a(
|
|
35319
|
+
const c = a(fb), e = Ml, _ = $o, g = Rs, d = Ba, C = Bh, S = Ul;
|
|
35308
35320
|
o.defaultNonRealTimeVADOptions = {
|
|
35309
35321
|
...g.defaultFrameProcessorOptions,
|
|
35310
35322
|
modelURL: e.baseAssetPath + "silero_vad_legacy.onnx",
|
|
@@ -35369,7 +35381,7 @@ Ul.Resampler = cR;
|
|
|
35369
35381
|
}
|
|
35370
35382
|
}
|
|
35371
35383
|
o.NonRealTimeVAD = R;
|
|
35372
|
-
})(
|
|
35384
|
+
})(db);
|
|
35373
35385
|
var Cs = {};
|
|
35374
35386
|
Object.defineProperty(Cs, "__esModule", { value: !0 });
|
|
35375
35387
|
Cs.audioFileToArray = Cs.encodeWAV = Cs.arrayBufferToBase64 = Cs.minFramesForTargetMS = void 0;
|
|
@@ -35432,7 +35444,7 @@ async function mR(o) {
|
|
|
35432
35444
|
return { audio: e, sampleRate: c.sampleRate };
|
|
35433
35445
|
}
|
|
35434
35446
|
Cs.audioFileToArray = mR;
|
|
35435
|
-
var
|
|
35447
|
+
var Tb = {};
|
|
35436
35448
|
(function(o) {
|
|
35437
35449
|
var n = Wn && Wn.__createBinding || (Object.create ? function(Q, ee, $e, X) {
|
|
35438
35450
|
X === void 0 && (X = $e);
|
|
@@ -35456,7 +35468,7 @@ var yb = {};
|
|
|
35456
35468
|
return r(ee, Q), ee;
|
|
35457
35469
|
};
|
|
35458
35470
|
Object.defineProperty(o, "__esModule", { value: !0 }), o.AudioNodeVAD = o.MicVAD = o.getDefaultRealTimeVADOptions = o.ort = o.DEFAULT_MODEL = void 0;
|
|
35459
|
-
const c = a(
|
|
35471
|
+
const c = a(fb), e = $o, _ = Rs, g = Oo, d = Ba, C = Bh, S = Ul;
|
|
35460
35472
|
o.DEFAULT_MODEL = "legacy", o.ort = c;
|
|
35461
35473
|
const R = "vad.worklet.bundle.min.js", k = "silero_vad_v5.onnx", L = "silero_vad_legacy.onnx", V = (Q) => ({
|
|
35462
35474
|
..._.defaultFrameProcessorOptions,
|
|
@@ -35657,7 +35669,7 @@ var yb = {};
|
|
|
35657
35669
|
}
|
|
35658
35670
|
}
|
|
35659
35671
|
o.AudioNodeVAD = K;
|
|
35660
|
-
})(
|
|
35672
|
+
})(Tb);
|
|
35661
35673
|
(function(o) {
|
|
35662
35674
|
Object.defineProperty(o, "__esModule", { value: !0 }), o.getDefaultRealTimeVADOptions = o.MicVAD = o.DEFAULT_MODEL = o.AudioNodeVAD = o.utils = o.NonRealTimeVAD = o.Message = o.FrameProcessor = o.defaultModelFetcher = o.baseAssetPath = void 0;
|
|
35663
35675
|
var n = Ml;
|
|
@@ -35676,7 +35688,7 @@ var yb = {};
|
|
|
35676
35688
|
Object.defineProperty(o, "Message", { enumerable: !0, get: function() {
|
|
35677
35689
|
return c.Message;
|
|
35678
35690
|
} });
|
|
35679
|
-
var e =
|
|
35691
|
+
var e = db;
|
|
35680
35692
|
Object.defineProperty(o, "NonRealTimeVAD", { enumerable: !0, get: function() {
|
|
35681
35693
|
return e.NonRealTimeVAD;
|
|
35682
35694
|
} });
|
|
@@ -35687,7 +35699,7 @@ var yb = {};
|
|
|
35687
35699
|
arrayBufferToBase64: _.arrayBufferToBase64,
|
|
35688
35700
|
encodeWAV: _.encodeWAV
|
|
35689
35701
|
};
|
|
35690
|
-
var g =
|
|
35702
|
+
var g = Tb;
|
|
35691
35703
|
Object.defineProperty(o, "AudioNodeVAD", { enumerable: !0, get: function() {
|
|
35692
35704
|
return g.AudioNodeVAD;
|
|
35693
35705
|
} }), Object.defineProperty(o, "DEFAULT_MODEL", { enumerable: !0, get: function() {
|
|
@@ -35698,14 +35710,14 @@ var yb = {};
|
|
|
35698
35710
|
return g.getDefaultRealTimeVADOptions;
|
|
35699
35711
|
} });
|
|
35700
35712
|
})(Fh);
|
|
35701
|
-
const gR = /* @__PURE__ */ sR(Fh),
|
|
35713
|
+
const gR = /* @__PURE__ */ sR(Fh), Yy = /* @__PURE__ */ w0({
|
|
35702
35714
|
__proto__: null,
|
|
35703
35715
|
default: gR
|
|
35704
35716
|
}, [Fh]);
|
|
35705
35717
|
let Ct;
|
|
35706
|
-
const
|
|
35718
|
+
const Xy = Yt(!1), Jy = Yt(!1), Qy = Yt(!1), bb = Yt({}), Zy = Yt({}), eT = Yt(!1), tT = Yt(void 0), zu = Yt({}), sh = Yt({}), Qu = Yt([]), nT = Yt("default"), rT = Yt("default"), sT = Yt(!1), iT = Yt(!1), aT = Yt(!0), oT = Yt(!1), lT = Yt(null), bl = Yt(void 0), uT = Yt(!1), cT = Yt(2), dT = Yt(1), Ch = Yt({}), hT = Yt({}), pT = Yt({}), _T = Yt(!1), Gh = wl(() => {
|
|
35707
35719
|
const o = {};
|
|
35708
|
-
return Object.entries(
|
|
35720
|
+
return Object.entries(bb.value).forEach(([n, r]) => {
|
|
35709
35721
|
Ch.value[n]?.isTransferred || (o[n] = r);
|
|
35710
35722
|
}), o;
|
|
35711
35723
|
}), vR = wl(() => {
|
|
@@ -35723,40 +35735,40 @@ const Yy = Yt(!1), Xy = Yt(!1), Jy = Yt(!1), Tb = Yt({}), Qy = Yt({}), Zy = Yt(!
|
|
|
35723
35735
|
kind: o.kind,
|
|
35724
35736
|
groupId: o.groupId,
|
|
35725
35737
|
label: o.label
|
|
35726
|
-
}))),
|
|
35727
|
-
|
|
35738
|
+
}))), wb = wl(() => Object.values(Gh.value).filter((o) => o.roomId === bl.value));
|
|
35739
|
+
y0(wb, (o) => {
|
|
35728
35740
|
!o.length && bl.value && (bl.value = void 0);
|
|
35729
35741
|
});
|
|
35730
|
-
const
|
|
35742
|
+
const fT = {
|
|
35731
35743
|
state: {
|
|
35732
|
-
isInitialized:
|
|
35733
|
-
isOpenSIPSReady:
|
|
35734
|
-
isOpenSIPSReconnecting:
|
|
35744
|
+
isInitialized: Xy,
|
|
35745
|
+
isOpenSIPSReady: Jy,
|
|
35746
|
+
isOpenSIPSReconnecting: Qy,
|
|
35735
35747
|
activeCalls: Gh,
|
|
35736
|
-
callsInActiveRoom:
|
|
35737
|
-
activeMessages:
|
|
35738
|
-
addCallToCurrentRoom:
|
|
35739
|
-
callAddingInProgress:
|
|
35748
|
+
callsInActiveRoom: wb,
|
|
35749
|
+
activeMessages: Zy,
|
|
35750
|
+
addCallToCurrentRoom: eT,
|
|
35751
|
+
callAddingInProgress: tT,
|
|
35740
35752
|
activeRooms: vR,
|
|
35741
35753
|
msrpHistory: sh,
|
|
35742
35754
|
availableMediaDevices: Qu,
|
|
35743
35755
|
inputMediaDeviceList: yR,
|
|
35744
35756
|
outputMediaDeviceList: TR,
|
|
35745
|
-
selectedOutputDevice:
|
|
35746
|
-
selectedInputDevice:
|
|
35747
|
-
muteWhenJoin:
|
|
35748
|
-
isDND:
|
|
35749
|
-
isCallWaitingEnabled:
|
|
35750
|
-
isMuted:
|
|
35751
|
-
originalStream:
|
|
35757
|
+
selectedOutputDevice: nT,
|
|
35758
|
+
selectedInputDevice: rT,
|
|
35759
|
+
muteWhenJoin: sT,
|
|
35760
|
+
isDND: iT,
|
|
35761
|
+
isCallWaitingEnabled: aT,
|
|
35762
|
+
isMuted: oT,
|
|
35763
|
+
originalStream: lT,
|
|
35752
35764
|
currentActiveRoomId: bl,
|
|
35753
35765
|
callStatus: Ch,
|
|
35754
|
-
callTime:
|
|
35755
|
-
callMetrics:
|
|
35756
|
-
noiseReductionState:
|
|
35757
|
-
autoAnswer:
|
|
35758
|
-
microphoneInputLevel:
|
|
35759
|
-
speakerVolume:
|
|
35766
|
+
callTime: hT,
|
|
35767
|
+
callMetrics: pT,
|
|
35768
|
+
noiseReductionState: _T,
|
|
35769
|
+
autoAnswer: uT,
|
|
35770
|
+
microphoneInputLevel: cT,
|
|
35771
|
+
speakerVolume: dT
|
|
35760
35772
|
},
|
|
35761
35773
|
actions: {
|
|
35762
35774
|
init(o, n, r = {}, a) {
|
|
@@ -35771,10 +35783,10 @@ const _T = {
|
|
|
35771
35783
|
};
|
|
35772
35784
|
r.noiseReductionOptions ? _.noiseReductionOptions = {
|
|
35773
35785
|
...r.noiseReductionOptions,
|
|
35774
|
-
vadModule:
|
|
35786
|
+
vadModule: Yy
|
|
35775
35787
|
} : _.noiseReductionOptions = {
|
|
35776
35788
|
mode: "disabled",
|
|
35777
|
-
vadModule:
|
|
35789
|
+
vadModule: Yy
|
|
35778
35790
|
}, o.authorization_jwt && (_.authorization_jwt = o.authorization_jwt);
|
|
35779
35791
|
const g = {};
|
|
35780
35792
|
o.msrpDomain && (g.msrpDomain = o.msrpDomain), o.msrpWs && (g.msrpWs = o.msrpWs), Ct = new rR({
|
|
@@ -35790,34 +35802,34 @@ const _T = {
|
|
|
35790
35802
|
pnExtraHeaders: n,
|
|
35791
35803
|
...g
|
|
35792
35804
|
}, a), Ct.on("connection", (d) => {
|
|
35793
|
-
|
|
35805
|
+
eT.value = !1, Xy.value = !0, Jy.value = d, c(Ct);
|
|
35794
35806
|
}).on("reconnecting", (d) => {
|
|
35795
|
-
|
|
35807
|
+
Qy.value = d;
|
|
35796
35808
|
}).on("changeActiveCalls", (d) => {
|
|
35797
|
-
|
|
35809
|
+
bb.value = { ...d };
|
|
35798
35810
|
}).on("changeActiveMessages", (d) => {
|
|
35799
|
-
|
|
35811
|
+
Zy.value = { ...d };
|
|
35800
35812
|
}).on("newMSRPMessage", (d) => {
|
|
35801
35813
|
const C = d.session._id, S = sh.value[C] || [];
|
|
35802
35814
|
S.push(d.message), sh.value[C] = [...S];
|
|
35803
35815
|
}).on("callAddingInProgressChanged", (d) => {
|
|
35804
|
-
|
|
35816
|
+
tT.value = d;
|
|
35805
35817
|
}).on("changeAvailableDeviceList", (d) => {
|
|
35806
35818
|
Qu.value = [...d];
|
|
35807
35819
|
}).on("changeActiveInputMediaDevice", (d) => {
|
|
35808
|
-
|
|
35820
|
+
rT.value = d;
|
|
35809
35821
|
}).on("changeActiveOutputMediaDevice", (d) => {
|
|
35810
|
-
|
|
35822
|
+
nT.value = d;
|
|
35811
35823
|
}).on("changeMuteWhenJoin", (d) => {
|
|
35812
|
-
|
|
35824
|
+
sT.value = d;
|
|
35813
35825
|
}).on("changeIsCallWaiting", (d) => {
|
|
35814
|
-
|
|
35826
|
+
aT.value = d;
|
|
35815
35827
|
}).on("changeIsDND", (d) => {
|
|
35816
|
-
|
|
35828
|
+
iT.value = d;
|
|
35817
35829
|
}).on("changeIsMuted", (d) => {
|
|
35818
|
-
aT.value = d;
|
|
35819
|
-
}).on("changeActiveStream", (d) => {
|
|
35820
35830
|
oT.value = d;
|
|
35831
|
+
}).on("changeActiveStream", (d) => {
|
|
35832
|
+
lT.value = d;
|
|
35821
35833
|
}).on("currentActiveRoomChanged", (d) => {
|
|
35822
35834
|
bl.value = d;
|
|
35823
35835
|
}).on("addRoom", ({ roomList: d }) => {
|
|
@@ -35829,11 +35841,11 @@ const _T = {
|
|
|
35829
35841
|
}).on("changeCallStatus", (d) => {
|
|
35830
35842
|
Ch.value = { ...d };
|
|
35831
35843
|
}).on("changeCallTime", (d) => {
|
|
35832
|
-
dT.value = { ...d };
|
|
35833
|
-
}).on("changeCallMetrics", (d) => {
|
|
35834
35844
|
hT.value = { ...d };
|
|
35845
|
+
}).on("changeCallMetrics", (d) => {
|
|
35846
|
+
pT.value = { ...d };
|
|
35835
35847
|
}).on("changeNoiseReductionState", (d) => {
|
|
35836
|
-
|
|
35848
|
+
_T.value = d;
|
|
35837
35849
|
}).begin(), c(Ct);
|
|
35838
35850
|
} catch (_) {
|
|
35839
35851
|
console.error(_), e();
|
|
@@ -35911,13 +35923,13 @@ const _T = {
|
|
|
35911
35923
|
await Ct?.audio.setActiveRoom(o);
|
|
35912
35924
|
},
|
|
35913
35925
|
setMicrophoneSensitivity(o) {
|
|
35914
|
-
|
|
35926
|
+
cT.value = o, Ct?.audio.setMicrophoneSensitivity(o);
|
|
35915
35927
|
},
|
|
35916
35928
|
setSpeakerVolume(o) {
|
|
35917
|
-
|
|
35929
|
+
dT.value = o, Ct?.audio.setSpeakerVolume(o);
|
|
35918
35930
|
},
|
|
35919
35931
|
setAutoAnswer(o) {
|
|
35920
|
-
|
|
35932
|
+
uT.value = o, Ct?.audio.setAutoAnswer(o);
|
|
35921
35933
|
},
|
|
35922
35934
|
setMetricsConfig(o) {
|
|
35923
35935
|
Ct?.audio.setMetricsConfig(o);
|
|
@@ -35941,15 +35953,15 @@ const _T = {
|
|
|
35941
35953
|
Ct?.msrp.initMSRP(o, n, r);
|
|
35942
35954
|
}
|
|
35943
35955
|
}
|
|
35944
|
-
},
|
|
35956
|
+
}, Sb = Symbol();
|
|
35945
35957
|
function wR() {
|
|
35946
|
-
return
|
|
35947
|
-
|
|
35948
|
-
|
|
35949
|
-
),
|
|
35958
|
+
return T0(
|
|
35959
|
+
Sb,
|
|
35960
|
+
fT
|
|
35961
|
+
), fT;
|
|
35950
35962
|
}
|
|
35951
35963
|
function SR() {
|
|
35952
|
-
const o =
|
|
35964
|
+
const o = b0(Sb);
|
|
35953
35965
|
if (!o)
|
|
35954
35966
|
throw new Error("useVsipInject() is called without provider, please call useVsipProvide() first");
|
|
35955
35967
|
return o;
|
|
@@ -35957,6 +35969,6 @@ function SR() {
|
|
|
35957
35969
|
export {
|
|
35958
35970
|
SR as useVsipInject,
|
|
35959
35971
|
wR as useVsipProvide,
|
|
35960
|
-
|
|
35972
|
+
fT as vsipAPI
|
|
35961
35973
|
};
|
|
35962
35974
|
//# sourceMappingURL=super.mjs.map
|