@tmsoft/webphone 3.0.18 → 3.0.20
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/README.md +58 -0
- package/dist/lib/types.d.ts +11 -0
- package/dist/webphone.component.js +23 -23
- package/dist/webphone.es.js +370 -350
- package/dist/webphone.umd.js +20 -20
- package/package.json +1 -1
package/dist/webphone.es.js
CHANGED
|
@@ -7020,7 +7020,7 @@ var concatArrays = (e, t) => {
|
|
|
7020
7020
|
"max",
|
|
7021
7021
|
"fit",
|
|
7022
7022
|
...O()
|
|
7023
|
-
],
|
|
7023
|
+
], Up = () => [
|
|
7024
7024
|
isFraction,
|
|
7025
7025
|
"screen",
|
|
7026
7026
|
"full",
|
|
@@ -7031,7 +7031,7 @@ var concatArrays = (e, t) => {
|
|
|
7031
7031
|
"max",
|
|
7032
7032
|
"fit",
|
|
7033
7033
|
...O()
|
|
7034
|
-
],
|
|
7034
|
+
], R = () => [
|
|
7035
7035
|
isFraction,
|
|
7036
7036
|
"screen",
|
|
7037
7037
|
"full",
|
|
@@ -7043,50 +7043,50 @@ var concatArrays = (e, t) => {
|
|
|
7043
7043
|
"max",
|
|
7044
7044
|
"fit",
|
|
7045
7045
|
...O()
|
|
7046
|
-
],
|
|
7046
|
+
], z = () => [
|
|
7047
7047
|
e,
|
|
7048
7048
|
isArbitraryVariable,
|
|
7049
7049
|
isArbitraryValue
|
|
7050
|
-
],
|
|
7050
|
+
], Wp = () => [
|
|
7051
7051
|
...w(),
|
|
7052
7052
|
isArbitraryVariablePosition,
|
|
7053
7053
|
isArbitraryPosition,
|
|
7054
7054
|
{ position: [isArbitraryVariable, isArbitraryValue] }
|
|
7055
|
-
],
|
|
7055
|
+
], B = () => ["no-repeat", { repeat: [
|
|
7056
7056
|
"",
|
|
7057
7057
|
"x",
|
|
7058
7058
|
"y",
|
|
7059
7059
|
"space",
|
|
7060
7060
|
"round"
|
|
7061
|
-
] }],
|
|
7061
|
+
] }], Gp = () => [
|
|
7062
7062
|
"auto",
|
|
7063
7063
|
"cover",
|
|
7064
7064
|
"contain",
|
|
7065
7065
|
isArbitraryVariableSize,
|
|
7066
7066
|
isArbitrarySize,
|
|
7067
7067
|
{ size: [isArbitraryVariable, isArbitraryValue] }
|
|
7068
|
-
],
|
|
7068
|
+
], V = () => [
|
|
7069
7069
|
isPercent,
|
|
7070
7070
|
isArbitraryVariableLength,
|
|
7071
7071
|
isArbitraryLength
|
|
7072
|
-
],
|
|
7072
|
+
], H = () => [
|
|
7073
7073
|
"",
|
|
7074
7074
|
"none",
|
|
7075
7075
|
"full",
|
|
7076
7076
|
d,
|
|
7077
7077
|
isArbitraryVariable,
|
|
7078
7078
|
isArbitraryValue
|
|
7079
|
-
],
|
|
7079
|
+
], U = () => [
|
|
7080
7080
|
"",
|
|
7081
7081
|
isNumber,
|
|
7082
7082
|
isArbitraryVariableLength,
|
|
7083
7083
|
isArbitraryLength
|
|
7084
|
-
],
|
|
7084
|
+
], Kp = () => [
|
|
7085
7085
|
"solid",
|
|
7086
7086
|
"dashed",
|
|
7087
7087
|
"dotted",
|
|
7088
7088
|
"double"
|
|
7089
|
-
],
|
|
7089
|
+
], qp = () => [
|
|
7090
7090
|
"normal",
|
|
7091
7091
|
"multiply",
|
|
7092
7092
|
"screen",
|
|
@@ -7103,32 +7103,32 @@ var concatArrays = (e, t) => {
|
|
|
7103
7103
|
"saturation",
|
|
7104
7104
|
"color",
|
|
7105
7105
|
"luminosity"
|
|
7106
|
-
],
|
|
7106
|
+
], W = () => [
|
|
7107
7107
|
isNumber,
|
|
7108
7108
|
isPercent,
|
|
7109
7109
|
isArbitraryVariablePosition,
|
|
7110
7110
|
isArbitraryPosition
|
|
7111
|
-
],
|
|
7111
|
+
], Jp = () => [
|
|
7112
7112
|
"",
|
|
7113
7113
|
"none",
|
|
7114
7114
|
_,
|
|
7115
7115
|
isArbitraryVariable,
|
|
7116
7116
|
isArbitraryValue
|
|
7117
|
-
],
|
|
7117
|
+
], G = () => [
|
|
7118
7118
|
"none",
|
|
7119
7119
|
isNumber,
|
|
7120
7120
|
isArbitraryVariable,
|
|
7121
7121
|
isArbitraryValue
|
|
7122
|
-
],
|
|
7122
|
+
], K = () => [
|
|
7123
7123
|
"none",
|
|
7124
7124
|
isNumber,
|
|
7125
7125
|
isArbitraryVariable,
|
|
7126
7126
|
isArbitraryValue
|
|
7127
|
-
],
|
|
7127
|
+
], q = () => [
|
|
7128
7128
|
isNumber,
|
|
7129
7129
|
isArbitraryVariable,
|
|
7130
7130
|
isArbitraryValue
|
|
7131
|
-
],
|
|
7131
|
+
], J = () => [
|
|
7132
7132
|
isFraction,
|
|
7133
7133
|
"full",
|
|
7134
7134
|
...O()
|
|
@@ -7417,12 +7417,12 @@ var concatArrays = (e, t) => {
|
|
|
7417
7417
|
"space-y": [{ "space-y": O() }],
|
|
7418
7418
|
"space-y-reverse": ["space-y-reverse"],
|
|
7419
7419
|
size: [{ size: L() }],
|
|
7420
|
-
"inline-size": [{ inline: ["auto", ...
|
|
7421
|
-
"min-inline-size": [{ "min-inline": ["auto", ...
|
|
7422
|
-
"max-inline-size": [{ "max-inline": ["none", ...
|
|
7423
|
-
"block-size": [{ block: ["auto", ...
|
|
7424
|
-
"min-block-size": [{ "min-block": ["auto", ...
|
|
7425
|
-
"max-block-size": [{ "max-block": ["none", ...
|
|
7420
|
+
"inline-size": [{ inline: ["auto", ...Up()] }],
|
|
7421
|
+
"min-inline-size": [{ "min-inline": ["auto", ...Up()] }],
|
|
7422
|
+
"max-inline-size": [{ "max-inline": ["none", ...Up()] }],
|
|
7423
|
+
"block-size": [{ block: ["auto", ...R()] }],
|
|
7424
|
+
"min-block-size": [{ "min-block": ["auto", ...R()] }],
|
|
7425
|
+
"max-block-size": [{ "max-block": ["none", ...R()] }],
|
|
7426
7426
|
w: [{ w: [
|
|
7427
7427
|
l,
|
|
7428
7428
|
"screen",
|
|
@@ -7529,15 +7529,15 @@ var concatArrays = (e, t) => {
|
|
|
7529
7529
|
"start",
|
|
7530
7530
|
"end"
|
|
7531
7531
|
] }],
|
|
7532
|
-
"placeholder-color": [{ placeholder:
|
|
7533
|
-
"text-color": [{ text:
|
|
7532
|
+
"placeholder-color": [{ placeholder: z() }],
|
|
7533
|
+
"text-color": [{ text: z() }],
|
|
7534
7534
|
"text-decoration": [
|
|
7535
7535
|
"underline",
|
|
7536
7536
|
"overline",
|
|
7537
7537
|
"line-through",
|
|
7538
7538
|
"no-underline"
|
|
7539
7539
|
],
|
|
7540
|
-
"text-decoration-style": [{ decoration: [...
|
|
7540
|
+
"text-decoration-style": [{ decoration: [...Kp(), "wavy"] }],
|
|
7541
7541
|
"text-decoration-thickness": [{ decoration: [
|
|
7542
7542
|
isNumber,
|
|
7543
7543
|
"from-font",
|
|
@@ -7545,7 +7545,7 @@ var concatArrays = (e, t) => {
|
|
|
7545
7545
|
isArbitraryVariable,
|
|
7546
7546
|
isArbitraryLength
|
|
7547
7547
|
] }],
|
|
7548
|
-
"text-decoration-color": [{ decoration:
|
|
7548
|
+
"text-decoration-color": [{ decoration: z() }],
|
|
7549
7549
|
"underline-offset": [{ "underline-offset": [
|
|
7550
7550
|
isNumber,
|
|
7551
7551
|
"auto",
|
|
@@ -7627,9 +7627,9 @@ var concatArrays = (e, t) => {
|
|
|
7627
7627
|
"padding",
|
|
7628
7628
|
"content"
|
|
7629
7629
|
] }],
|
|
7630
|
-
"bg-position": [{ bg:
|
|
7631
|
-
"bg-repeat": [{ bg:
|
|
7632
|
-
"bg-size": [{ bg:
|
|
7630
|
+
"bg-position": [{ bg: Wp() }],
|
|
7631
|
+
"bg-repeat": [{ bg: B() }],
|
|
7632
|
+
"bg-size": [{ bg: Gp() }],
|
|
7633
7633
|
"bg-image": [{ bg: [
|
|
7634
7634
|
"none",
|
|
7635
7635
|
{
|
|
@@ -7662,67 +7662,67 @@ var concatArrays = (e, t) => {
|
|
|
7662
7662
|
isArbitraryVariableImage,
|
|
7663
7663
|
isArbitraryImage
|
|
7664
7664
|
] }],
|
|
7665
|
-
"bg-color": [{ bg:
|
|
7666
|
-
"gradient-from-pos": [{ from:
|
|
7667
|
-
"gradient-via-pos": [{ via:
|
|
7668
|
-
"gradient-to-pos": [{ to:
|
|
7669
|
-
"gradient-from": [{ from:
|
|
7670
|
-
"gradient-via": [{ via:
|
|
7671
|
-
"gradient-to": [{ to:
|
|
7672
|
-
rounded: [{ rounded:
|
|
7673
|
-
"rounded-s": [{ "rounded-s":
|
|
7674
|
-
"rounded-e": [{ "rounded-e":
|
|
7675
|
-
"rounded-t": [{ "rounded-t":
|
|
7676
|
-
"rounded-r": [{ "rounded-r":
|
|
7677
|
-
"rounded-b": [{ "rounded-b":
|
|
7678
|
-
"rounded-l": [{ "rounded-l":
|
|
7679
|
-
"rounded-ss": [{ "rounded-ss":
|
|
7680
|
-
"rounded-se": [{ "rounded-se":
|
|
7681
|
-
"rounded-ee": [{ "rounded-ee":
|
|
7682
|
-
"rounded-es": [{ "rounded-es":
|
|
7683
|
-
"rounded-tl": [{ "rounded-tl":
|
|
7684
|
-
"rounded-tr": [{ "rounded-tr":
|
|
7685
|
-
"rounded-br": [{ "rounded-br":
|
|
7686
|
-
"rounded-bl": [{ "rounded-bl":
|
|
7687
|
-
"border-w": [{ border:
|
|
7688
|
-
"border-w-x": [{ "border-x":
|
|
7689
|
-
"border-w-y": [{ "border-y":
|
|
7690
|
-
"border-w-s": [{ "border-s":
|
|
7691
|
-
"border-w-e": [{ "border-e":
|
|
7692
|
-
"border-w-bs": [{ "border-bs":
|
|
7693
|
-
"border-w-be": [{ "border-be":
|
|
7694
|
-
"border-w-t": [{ "border-t":
|
|
7695
|
-
"border-w-r": [{ "border-r":
|
|
7696
|
-
"border-w-b": [{ "border-b":
|
|
7697
|
-
"border-w-l": [{ "border-l":
|
|
7698
|
-
"divide-x": [{ "divide-x":
|
|
7665
|
+
"bg-color": [{ bg: z() }],
|
|
7666
|
+
"gradient-from-pos": [{ from: V() }],
|
|
7667
|
+
"gradient-via-pos": [{ via: V() }],
|
|
7668
|
+
"gradient-to-pos": [{ to: V() }],
|
|
7669
|
+
"gradient-from": [{ from: z() }],
|
|
7670
|
+
"gradient-via": [{ via: z() }],
|
|
7671
|
+
"gradient-to": [{ to: z() }],
|
|
7672
|
+
rounded: [{ rounded: H() }],
|
|
7673
|
+
"rounded-s": [{ "rounded-s": H() }],
|
|
7674
|
+
"rounded-e": [{ "rounded-e": H() }],
|
|
7675
|
+
"rounded-t": [{ "rounded-t": H() }],
|
|
7676
|
+
"rounded-r": [{ "rounded-r": H() }],
|
|
7677
|
+
"rounded-b": [{ "rounded-b": H() }],
|
|
7678
|
+
"rounded-l": [{ "rounded-l": H() }],
|
|
7679
|
+
"rounded-ss": [{ "rounded-ss": H() }],
|
|
7680
|
+
"rounded-se": [{ "rounded-se": H() }],
|
|
7681
|
+
"rounded-ee": [{ "rounded-ee": H() }],
|
|
7682
|
+
"rounded-es": [{ "rounded-es": H() }],
|
|
7683
|
+
"rounded-tl": [{ "rounded-tl": H() }],
|
|
7684
|
+
"rounded-tr": [{ "rounded-tr": H() }],
|
|
7685
|
+
"rounded-br": [{ "rounded-br": H() }],
|
|
7686
|
+
"rounded-bl": [{ "rounded-bl": H() }],
|
|
7687
|
+
"border-w": [{ border: U() }],
|
|
7688
|
+
"border-w-x": [{ "border-x": U() }],
|
|
7689
|
+
"border-w-y": [{ "border-y": U() }],
|
|
7690
|
+
"border-w-s": [{ "border-s": U() }],
|
|
7691
|
+
"border-w-e": [{ "border-e": U() }],
|
|
7692
|
+
"border-w-bs": [{ "border-bs": U() }],
|
|
7693
|
+
"border-w-be": [{ "border-be": U() }],
|
|
7694
|
+
"border-w-t": [{ "border-t": U() }],
|
|
7695
|
+
"border-w-r": [{ "border-r": U() }],
|
|
7696
|
+
"border-w-b": [{ "border-b": U() }],
|
|
7697
|
+
"border-w-l": [{ "border-l": U() }],
|
|
7698
|
+
"divide-x": [{ "divide-x": U() }],
|
|
7699
7699
|
"divide-x-reverse": ["divide-x-reverse"],
|
|
7700
|
-
"divide-y": [{ "divide-y":
|
|
7700
|
+
"divide-y": [{ "divide-y": U() }],
|
|
7701
7701
|
"divide-y-reverse": ["divide-y-reverse"],
|
|
7702
7702
|
"border-style": [{ border: [
|
|
7703
|
-
...
|
|
7703
|
+
...Kp(),
|
|
7704
7704
|
"hidden",
|
|
7705
7705
|
"none"
|
|
7706
7706
|
] }],
|
|
7707
7707
|
"divide-style": [{ divide: [
|
|
7708
|
-
...
|
|
7708
|
+
...Kp(),
|
|
7709
7709
|
"hidden",
|
|
7710
7710
|
"none"
|
|
7711
7711
|
] }],
|
|
7712
|
-
"border-color": [{ border:
|
|
7713
|
-
"border-color-x": [{ "border-x":
|
|
7714
|
-
"border-color-y": [{ "border-y":
|
|
7715
|
-
"border-color-s": [{ "border-s":
|
|
7716
|
-
"border-color-e": [{ "border-e":
|
|
7717
|
-
"border-color-bs": [{ "border-bs":
|
|
7718
|
-
"border-color-be": [{ "border-be":
|
|
7719
|
-
"border-color-t": [{ "border-t":
|
|
7720
|
-
"border-color-r": [{ "border-r":
|
|
7721
|
-
"border-color-b": [{ "border-b":
|
|
7722
|
-
"border-color-l": [{ "border-l":
|
|
7723
|
-
"divide-color": [{ divide:
|
|
7712
|
+
"border-color": [{ border: z() }],
|
|
7713
|
+
"border-color-x": [{ "border-x": z() }],
|
|
7714
|
+
"border-color-y": [{ "border-y": z() }],
|
|
7715
|
+
"border-color-s": [{ "border-s": z() }],
|
|
7716
|
+
"border-color-e": [{ "border-e": z() }],
|
|
7717
|
+
"border-color-bs": [{ "border-bs": z() }],
|
|
7718
|
+
"border-color-be": [{ "border-be": z() }],
|
|
7719
|
+
"border-color-t": [{ "border-t": z() }],
|
|
7720
|
+
"border-color-r": [{ "border-r": z() }],
|
|
7721
|
+
"border-color-b": [{ "border-b": z() }],
|
|
7722
|
+
"border-color-l": [{ "border-l": z() }],
|
|
7723
|
+
"divide-color": [{ divide: z() }],
|
|
7724
7724
|
"outline-style": [{ outline: [
|
|
7725
|
-
...
|
|
7725
|
+
...Kp(),
|
|
7726
7726
|
"none",
|
|
7727
7727
|
"hidden"
|
|
7728
7728
|
] }],
|
|
@@ -7737,7 +7737,7 @@ var concatArrays = (e, t) => {
|
|
|
7737
7737
|
isArbitraryVariableLength,
|
|
7738
7738
|
isArbitraryLength
|
|
7739
7739
|
] }],
|
|
7740
|
-
"outline-color": [{ outline:
|
|
7740
|
+
"outline-color": [{ outline: z() }],
|
|
7741
7741
|
shadow: [{ shadow: [
|
|
7742
7742
|
"",
|
|
7743
7743
|
"none",
|
|
@@ -7745,39 +7745,39 @@ var concatArrays = (e, t) => {
|
|
|
7745
7745
|
isArbitraryVariableShadow,
|
|
7746
7746
|
isArbitraryShadow
|
|
7747
7747
|
] }],
|
|
7748
|
-
"shadow-color": [{ shadow:
|
|
7748
|
+
"shadow-color": [{ shadow: z() }],
|
|
7749
7749
|
"inset-shadow": [{ "inset-shadow": [
|
|
7750
7750
|
"none",
|
|
7751
7751
|
p,
|
|
7752
7752
|
isArbitraryVariableShadow,
|
|
7753
7753
|
isArbitraryShadow
|
|
7754
7754
|
] }],
|
|
7755
|
-
"inset-shadow-color": [{ "inset-shadow":
|
|
7756
|
-
"ring-w": [{ ring:
|
|
7755
|
+
"inset-shadow-color": [{ "inset-shadow": z() }],
|
|
7756
|
+
"ring-w": [{ ring: U() }],
|
|
7757
7757
|
"ring-w-inset": ["ring-inset"],
|
|
7758
|
-
"ring-color": [{ ring:
|
|
7758
|
+
"ring-color": [{ ring: z() }],
|
|
7759
7759
|
"ring-offset-w": [{ "ring-offset": [isNumber, isArbitraryLength] }],
|
|
7760
|
-
"ring-offset-color": [{ "ring-offset":
|
|
7761
|
-
"inset-ring-w": [{ "inset-ring":
|
|
7762
|
-
"inset-ring-color": [{ "inset-ring":
|
|
7760
|
+
"ring-offset-color": [{ "ring-offset": z() }],
|
|
7761
|
+
"inset-ring-w": [{ "inset-ring": U() }],
|
|
7762
|
+
"inset-ring-color": [{ "inset-ring": z() }],
|
|
7763
7763
|
"text-shadow": [{ "text-shadow": [
|
|
7764
7764
|
"none",
|
|
7765
7765
|
m,
|
|
7766
7766
|
isArbitraryVariableShadow,
|
|
7767
7767
|
isArbitraryShadow
|
|
7768
7768
|
] }],
|
|
7769
|
-
"text-shadow-color": [{ "text-shadow":
|
|
7769
|
+
"text-shadow-color": [{ "text-shadow": z() }],
|
|
7770
7770
|
opacity: [{ opacity: [
|
|
7771
7771
|
isNumber,
|
|
7772
7772
|
isArbitraryVariable,
|
|
7773
7773
|
isArbitraryValue
|
|
7774
7774
|
] }],
|
|
7775
7775
|
"mix-blend": [{ "mix-blend": [
|
|
7776
|
-
...
|
|
7776
|
+
...qp(),
|
|
7777
7777
|
"plus-darker",
|
|
7778
7778
|
"plus-lighter"
|
|
7779
7779
|
] }],
|
|
7780
|
-
"bg-blend": [{ "bg-blend":
|
|
7780
|
+
"bg-blend": [{ "bg-blend": qp() }],
|
|
7781
7781
|
"mask-clip": [{ "mask-clip": [
|
|
7782
7782
|
"border",
|
|
7783
7783
|
"padding",
|
|
@@ -7793,39 +7793,39 @@ var concatArrays = (e, t) => {
|
|
|
7793
7793
|
"exclude"
|
|
7794
7794
|
] }],
|
|
7795
7795
|
"mask-image-linear-pos": [{ "mask-linear": [isNumber] }],
|
|
7796
|
-
"mask-image-linear-from-pos": [{ "mask-linear-from":
|
|
7797
|
-
"mask-image-linear-to-pos": [{ "mask-linear-to":
|
|
7798
|
-
"mask-image-linear-from-color": [{ "mask-linear-from":
|
|
7799
|
-
"mask-image-linear-to-color": [{ "mask-linear-to":
|
|
7800
|
-
"mask-image-t-from-pos": [{ "mask-t-from":
|
|
7801
|
-
"mask-image-t-to-pos": [{ "mask-t-to":
|
|
7802
|
-
"mask-image-t-from-color": [{ "mask-t-from":
|
|
7803
|
-
"mask-image-t-to-color": [{ "mask-t-to":
|
|
7804
|
-
"mask-image-r-from-pos": [{ "mask-r-from":
|
|
7805
|
-
"mask-image-r-to-pos": [{ "mask-r-to":
|
|
7806
|
-
"mask-image-r-from-color": [{ "mask-r-from":
|
|
7807
|
-
"mask-image-r-to-color": [{ "mask-r-to":
|
|
7808
|
-
"mask-image-b-from-pos": [{ "mask-b-from":
|
|
7809
|
-
"mask-image-b-to-pos": [{ "mask-b-to":
|
|
7810
|
-
"mask-image-b-from-color": [{ "mask-b-from":
|
|
7811
|
-
"mask-image-b-to-color": [{ "mask-b-to":
|
|
7812
|
-
"mask-image-l-from-pos": [{ "mask-l-from":
|
|
7813
|
-
"mask-image-l-to-pos": [{ "mask-l-to":
|
|
7814
|
-
"mask-image-l-from-color": [{ "mask-l-from":
|
|
7815
|
-
"mask-image-l-to-color": [{ "mask-l-to":
|
|
7816
|
-
"mask-image-x-from-pos": [{ "mask-x-from":
|
|
7817
|
-
"mask-image-x-to-pos": [{ "mask-x-to":
|
|
7818
|
-
"mask-image-x-from-color": [{ "mask-x-from":
|
|
7819
|
-
"mask-image-x-to-color": [{ "mask-x-to":
|
|
7820
|
-
"mask-image-y-from-pos": [{ "mask-y-from":
|
|
7821
|
-
"mask-image-y-to-pos": [{ "mask-y-to":
|
|
7822
|
-
"mask-image-y-from-color": [{ "mask-y-from":
|
|
7823
|
-
"mask-image-y-to-color": [{ "mask-y-to":
|
|
7796
|
+
"mask-image-linear-from-pos": [{ "mask-linear-from": W() }],
|
|
7797
|
+
"mask-image-linear-to-pos": [{ "mask-linear-to": W() }],
|
|
7798
|
+
"mask-image-linear-from-color": [{ "mask-linear-from": z() }],
|
|
7799
|
+
"mask-image-linear-to-color": [{ "mask-linear-to": z() }],
|
|
7800
|
+
"mask-image-t-from-pos": [{ "mask-t-from": W() }],
|
|
7801
|
+
"mask-image-t-to-pos": [{ "mask-t-to": W() }],
|
|
7802
|
+
"mask-image-t-from-color": [{ "mask-t-from": z() }],
|
|
7803
|
+
"mask-image-t-to-color": [{ "mask-t-to": z() }],
|
|
7804
|
+
"mask-image-r-from-pos": [{ "mask-r-from": W() }],
|
|
7805
|
+
"mask-image-r-to-pos": [{ "mask-r-to": W() }],
|
|
7806
|
+
"mask-image-r-from-color": [{ "mask-r-from": z() }],
|
|
7807
|
+
"mask-image-r-to-color": [{ "mask-r-to": z() }],
|
|
7808
|
+
"mask-image-b-from-pos": [{ "mask-b-from": W() }],
|
|
7809
|
+
"mask-image-b-to-pos": [{ "mask-b-to": W() }],
|
|
7810
|
+
"mask-image-b-from-color": [{ "mask-b-from": z() }],
|
|
7811
|
+
"mask-image-b-to-color": [{ "mask-b-to": z() }],
|
|
7812
|
+
"mask-image-l-from-pos": [{ "mask-l-from": W() }],
|
|
7813
|
+
"mask-image-l-to-pos": [{ "mask-l-to": W() }],
|
|
7814
|
+
"mask-image-l-from-color": [{ "mask-l-from": z() }],
|
|
7815
|
+
"mask-image-l-to-color": [{ "mask-l-to": z() }],
|
|
7816
|
+
"mask-image-x-from-pos": [{ "mask-x-from": W() }],
|
|
7817
|
+
"mask-image-x-to-pos": [{ "mask-x-to": W() }],
|
|
7818
|
+
"mask-image-x-from-color": [{ "mask-x-from": z() }],
|
|
7819
|
+
"mask-image-x-to-color": [{ "mask-x-to": z() }],
|
|
7820
|
+
"mask-image-y-from-pos": [{ "mask-y-from": W() }],
|
|
7821
|
+
"mask-image-y-to-pos": [{ "mask-y-to": W() }],
|
|
7822
|
+
"mask-image-y-from-color": [{ "mask-y-from": z() }],
|
|
7823
|
+
"mask-image-y-to-color": [{ "mask-y-to": z() }],
|
|
7824
7824
|
"mask-image-radial": [{ "mask-radial": [isArbitraryVariable, isArbitraryValue] }],
|
|
7825
|
-
"mask-image-radial-from-pos": [{ "mask-radial-from":
|
|
7826
|
-
"mask-image-radial-to-pos": [{ "mask-radial-to":
|
|
7827
|
-
"mask-image-radial-from-color": [{ "mask-radial-from":
|
|
7828
|
-
"mask-image-radial-to-color": [{ "mask-radial-to":
|
|
7825
|
+
"mask-image-radial-from-pos": [{ "mask-radial-from": W() }],
|
|
7826
|
+
"mask-image-radial-to-pos": [{ "mask-radial-to": W() }],
|
|
7827
|
+
"mask-image-radial-from-color": [{ "mask-radial-from": z() }],
|
|
7828
|
+
"mask-image-radial-to-color": [{ "mask-radial-to": z() }],
|
|
7829
7829
|
"mask-image-radial-shape": [{ "mask-radial": ["circle", "ellipse"] }],
|
|
7830
7830
|
"mask-image-radial-size": [{ "mask-radial": [{
|
|
7831
7831
|
closest: ["side", "corner"],
|
|
@@ -7833,10 +7833,10 @@ var concatArrays = (e, t) => {
|
|
|
7833
7833
|
}] }],
|
|
7834
7834
|
"mask-image-radial-pos": [{ "mask-radial-at": w() }],
|
|
7835
7835
|
"mask-image-conic-pos": [{ "mask-conic": [isNumber] }],
|
|
7836
|
-
"mask-image-conic-from-pos": [{ "mask-conic-from":
|
|
7837
|
-
"mask-image-conic-to-pos": [{ "mask-conic-to":
|
|
7838
|
-
"mask-image-conic-from-color": [{ "mask-conic-from":
|
|
7839
|
-
"mask-image-conic-to-color": [{ "mask-conic-to":
|
|
7836
|
+
"mask-image-conic-from-pos": [{ "mask-conic-from": W() }],
|
|
7837
|
+
"mask-image-conic-to-pos": [{ "mask-conic-to": W() }],
|
|
7838
|
+
"mask-image-conic-from-color": [{ "mask-conic-from": z() }],
|
|
7839
|
+
"mask-image-conic-to-color": [{ "mask-conic-to": z() }],
|
|
7840
7840
|
"mask-mode": [{ mask: [
|
|
7841
7841
|
"alpha",
|
|
7842
7842
|
"luminance",
|
|
@@ -7850,9 +7850,9 @@ var concatArrays = (e, t) => {
|
|
|
7850
7850
|
"stroke",
|
|
7851
7851
|
"view"
|
|
7852
7852
|
] }],
|
|
7853
|
-
"mask-position": [{ mask:
|
|
7854
|
-
"mask-repeat": [{ mask:
|
|
7855
|
-
"mask-size": [{ mask:
|
|
7853
|
+
"mask-position": [{ mask: Wp() }],
|
|
7854
|
+
"mask-repeat": [{ mask: B() }],
|
|
7855
|
+
"mask-size": [{ mask: Gp() }],
|
|
7856
7856
|
"mask-type": [{ "mask-type": ["alpha", "luminance"] }],
|
|
7857
7857
|
"mask-image": [{ mask: [
|
|
7858
7858
|
"none",
|
|
@@ -7865,7 +7865,7 @@ var concatArrays = (e, t) => {
|
|
|
7865
7865
|
isArbitraryVariable,
|
|
7866
7866
|
isArbitraryValue
|
|
7867
7867
|
] }],
|
|
7868
|
-
blur: [{ blur:
|
|
7868
|
+
blur: [{ blur: Jp() }],
|
|
7869
7869
|
brightness: [{ brightness: [
|
|
7870
7870
|
isNumber,
|
|
7871
7871
|
isArbitraryVariable,
|
|
@@ -7883,7 +7883,7 @@ var concatArrays = (e, t) => {
|
|
|
7883
7883
|
isArbitraryVariableShadow,
|
|
7884
7884
|
isArbitraryShadow
|
|
7885
7885
|
] }],
|
|
7886
|
-
"drop-shadow-color": [{ "drop-shadow":
|
|
7886
|
+
"drop-shadow-color": [{ "drop-shadow": z() }],
|
|
7887
7887
|
grayscale: [{ grayscale: [
|
|
7888
7888
|
"",
|
|
7889
7889
|
isNumber,
|
|
@@ -7918,7 +7918,7 @@ var concatArrays = (e, t) => {
|
|
|
7918
7918
|
isArbitraryVariable,
|
|
7919
7919
|
isArbitraryValue
|
|
7920
7920
|
] }],
|
|
7921
|
-
"backdrop-blur": [{ "backdrop-blur":
|
|
7921
|
+
"backdrop-blur": [{ "backdrop-blur": Jp() }],
|
|
7922
7922
|
"backdrop-brightness": [{ "backdrop-brightness": [
|
|
7923
7923
|
isNumber,
|
|
7924
7924
|
isArbitraryVariable,
|
|
@@ -8011,18 +8011,18 @@ var concatArrays = (e, t) => {
|
|
|
8011
8011
|
isArbitraryValue
|
|
8012
8012
|
] }],
|
|
8013
8013
|
"perspective-origin": [{ "perspective-origin": T() }],
|
|
8014
|
-
rotate: [{ rotate:
|
|
8015
|
-
"rotate-x": [{ "rotate-x":
|
|
8016
|
-
"rotate-y": [{ "rotate-y":
|
|
8017
|
-
"rotate-z": [{ "rotate-z":
|
|
8018
|
-
scale: [{ scale:
|
|
8019
|
-
"scale-x": [{ "scale-x":
|
|
8020
|
-
"scale-y": [{ "scale-y":
|
|
8021
|
-
"scale-z": [{ "scale-z":
|
|
8014
|
+
rotate: [{ rotate: G() }],
|
|
8015
|
+
"rotate-x": [{ "rotate-x": G() }],
|
|
8016
|
+
"rotate-y": [{ "rotate-y": G() }],
|
|
8017
|
+
"rotate-z": [{ "rotate-z": G() }],
|
|
8018
|
+
scale: [{ scale: K() }],
|
|
8019
|
+
"scale-x": [{ "scale-x": K() }],
|
|
8020
|
+
"scale-y": [{ "scale-y": K() }],
|
|
8021
|
+
"scale-z": [{ "scale-z": K() }],
|
|
8022
8022
|
"scale-3d": ["scale-3d"],
|
|
8023
|
-
skew: [{ skew:
|
|
8024
|
-
"skew-x": [{ "skew-x":
|
|
8025
|
-
"skew-y": [{ "skew-y":
|
|
8023
|
+
skew: [{ skew: q() }],
|
|
8024
|
+
"skew-x": [{ "skew-x": q() }],
|
|
8025
|
+
"skew-y": [{ "skew-y": q() }],
|
|
8026
8026
|
transform: [{ transform: [
|
|
8027
8027
|
isArbitraryVariable,
|
|
8028
8028
|
isArbitraryValue,
|
|
@@ -8033,14 +8033,14 @@ var concatArrays = (e, t) => {
|
|
|
8033
8033
|
] }],
|
|
8034
8034
|
"transform-origin": [{ origin: T() }],
|
|
8035
8035
|
"transform-style": [{ transform: ["3d", "flat"] }],
|
|
8036
|
-
translate: [{ translate:
|
|
8037
|
-
"translate-x": [{ "translate-x":
|
|
8038
|
-
"translate-y": [{ "translate-y":
|
|
8039
|
-
"translate-z": [{ "translate-z":
|
|
8036
|
+
translate: [{ translate: J() }],
|
|
8037
|
+
"translate-x": [{ "translate-x": J() }],
|
|
8038
|
+
"translate-y": [{ "translate-y": J() }],
|
|
8039
|
+
"translate-z": [{ "translate-z": J() }],
|
|
8040
8040
|
"translate-none": ["translate-none"],
|
|
8041
|
-
accent: [{ accent:
|
|
8041
|
+
accent: [{ accent: z() }],
|
|
8042
8042
|
appearance: [{ appearance: ["none", "auto"] }],
|
|
8043
|
-
"caret-color": [{ caret:
|
|
8043
|
+
"caret-color": [{ caret: z() }],
|
|
8044
8044
|
"color-scheme": [{ scheme: [
|
|
8045
8045
|
"normal",
|
|
8046
8046
|
"dark",
|
|
@@ -8164,14 +8164,14 @@ var concatArrays = (e, t) => {
|
|
|
8164
8164
|
isArbitraryVariable,
|
|
8165
8165
|
isArbitraryValue
|
|
8166
8166
|
] }],
|
|
8167
|
-
fill: [{ fill: ["none", ...
|
|
8167
|
+
fill: [{ fill: ["none", ...z()] }],
|
|
8168
8168
|
"stroke-w": [{ stroke: [
|
|
8169
8169
|
isNumber,
|
|
8170
8170
|
isArbitraryVariableLength,
|
|
8171
8171
|
isArbitraryLength,
|
|
8172
8172
|
isArbitraryNumber
|
|
8173
8173
|
] }],
|
|
8174
|
-
stroke: [{ stroke: ["none", ...
|
|
8174
|
+
stroke: [{ stroke: ["none", ...z()] }],
|
|
8175
8175
|
"forced-color-adjust": [{ "forced-color-adjust": ["auto", "none"] }]
|
|
8176
8176
|
},
|
|
8177
8177
|
conflictingClassGroups: {
|
|
@@ -8374,26 +8374,36 @@ const cn = (...e) => twMerge(clsx(e)), extractCallerNumber = (e, t) => {
|
|
|
8374
8374
|
var cleanPhoneNumber = (e) => e.replace(/[^\d+*#]/g, ""), isValidPhoneOrExtension = (e) => /^\+?[\d*#]{2,}$/.test(e), extractNumberFromDisplayName = (e) => {
|
|
8375
8375
|
let t = e.match(/^([+]?[\d*#]{2,})\s*[-:]/);
|
|
8376
8376
|
return t && t[1] || (t = e.match(/\(([+]?[\d*#]{2,})\)/), t && t[1]) || (t = e.match(/(?:ext\.?|extension)\s*([+]?[\d*#]{2,})/i), t && t[1]) ? t[1] : (t = e.match(/([+]?\d{1,3}[-.\s]?\(?\d{1,4}\)?[-.\s]?\d{1,4}[-.\s]?\d{1,9})/), t && t[1] ? cleanPhoneNumber(t[1]) : null);
|
|
8377
|
-
};
|
|
8377
|
+
}, QUEUE_NAME_HEADER = "X-Nebula-Queue", QUEUE_ID_HEADER = "X-Nebula-Queue-Id";
|
|
8378
8378
|
const createSipService = (e, t = {}) => {
|
|
8379
8379
|
let n = shallowRef(null), i = shallowRef(null), a = shallowRef(/* @__PURE__ */ new Map()), o = new Audio();
|
|
8380
8380
|
o.autoplay = !0;
|
|
8381
|
-
let l = shallowRef(void 0), u = shallowRef(null), d = shallowRef(null), f = /* @__PURE__ */ new Map(), p = /* @__PURE__ */ new Map(), m = /* @__PURE__ */ new Set(), g = null, _ = null, v = null, y = null, b = null, x = computed(() => n.value?.configuration.uri?.user || ""), { startRingtone: S, stopRingtone: w, startRingback: T, stopRingback: E, setNotificationVolume: D } = useAudioSounds(), O = (e) => e instanceof Inviter || e instanceof Invitation ? e.request?.callId || e.dialog?.callId || e.id || crypto.randomUUID() : e.dialog?.callId || e.id || crypto.randomUUID(), k = (e
|
|
8382
|
-
|
|
8381
|
+
let l = shallowRef(void 0), u = shallowRef(null), d = shallowRef(null), f = /* @__PURE__ */ new Map(), p = /* @__PURE__ */ new Map(), m = /* @__PURE__ */ new Set(), g = null, _ = null, v = null, y = null, b = null, x = computed(() => n.value?.configuration.uri?.user || ""), { startRingtone: S, stopRingtone: w, startRingback: T, stopRingback: E, setNotificationVolume: D } = useAudioSounds(), O = (e) => e instanceof Inviter || e instanceof Invitation ? e.request?.callId || e.dialog?.callId || e.id || crypto.randomUUID() : e.dialog?.callId || e.id || crypto.randomUUID(), k = (e) => {
|
|
8382
|
+
if (!(e instanceof Invitation)) return;
|
|
8383
|
+
let t = e.request;
|
|
8384
|
+
if (!t) return;
|
|
8385
|
+
let n = t.getHeader(QUEUE_NAME_HEADER)?.trim(), i = t.getHeader(QUEUE_ID_HEADER)?.trim();
|
|
8386
|
+
if (!(!n && !i)) return {
|
|
8387
|
+
...i ? { id: i } : {},
|
|
8388
|
+
...n ? { name: n } : {}
|
|
8389
|
+
};
|
|
8390
|
+
}, A = (e, n, i, a) => {
|
|
8391
|
+
let o = k(e), s = {
|
|
8383
8392
|
channelId: n,
|
|
8384
8393
|
sipCallId: O(e),
|
|
8385
8394
|
direction: i,
|
|
8386
|
-
remoteNumber: a
|
|
8395
|
+
remoteNumber: a,
|
|
8396
|
+
...o ? { queue: o } : {}
|
|
8387
8397
|
};
|
|
8388
|
-
return f.set(n,
|
|
8389
|
-
},
|
|
8398
|
+
return f.set(n, s), t.onCallContext?.(s), s;
|
|
8399
|
+
}, j = (e, n) => {
|
|
8390
8400
|
let i = f.get(e);
|
|
8391
8401
|
i && t.onCallState?.({
|
|
8392
8402
|
...i,
|
|
8393
8403
|
state: n,
|
|
8394
8404
|
timestamp: Date.now()
|
|
8395
8405
|
});
|
|
8396
|
-
},
|
|
8406
|
+
}, M = (e, n) => {
|
|
8397
8407
|
if (e.state !== SessionState.Established) return;
|
|
8398
8408
|
let i = f.get(n), a = e.sessionDescriptionHandler, o = a?.localMediaStream ?? d.value, s = a?.remoteMediaStream ?? u.value, l = o?.getAudioTracks() ?? [], m = s?.getAudioTracks() ?? [];
|
|
8399
8409
|
if (!i || !o || !s || l.length === 0 || m.length === 0) return;
|
|
@@ -8407,17 +8417,17 @@ const createSipService = (e, t = {}) => {
|
|
|
8407
8417
|
localStream: o,
|
|
8408
8418
|
remoteStream: s
|
|
8409
8419
|
}));
|
|
8410
|
-
},
|
|
8420
|
+
}, N = (e) => {
|
|
8411
8421
|
f.delete(e), p.delete(e), m.delete(e);
|
|
8412
|
-
},
|
|
8422
|
+
}, P = () => {
|
|
8413
8423
|
e.channels.value.some((e) => e.status === "incoming") ? S() : w(), e.activeChannel.value?.status === "calling" ? T() : E();
|
|
8414
|
-
},
|
|
8424
|
+
}, F = (e) => {
|
|
8415
8425
|
o.volume = e / 100;
|
|
8416
|
-
},
|
|
8426
|
+
}, I = async (e) => {
|
|
8417
8427
|
typeof o.setSinkId == "function" && await o.setSinkId(e);
|
|
8418
|
-
},
|
|
8428
|
+
}, L = (e) => {
|
|
8419
8429
|
l.value = e;
|
|
8420
|
-
},
|
|
8430
|
+
}, Up = (e, t) => {
|
|
8421
8431
|
let n = !1, i = e.sessionDescriptionHandler;
|
|
8422
8432
|
return i?.peerConnection && i.peerConnection.getSenders().forEach((e) => {
|
|
8423
8433
|
e.track && e.track.kind === "audio" && (e.track.enabled = t, n = !0);
|
|
@@ -8428,31 +8438,31 @@ const createSipService = (e, t = {}) => {
|
|
|
8428
8438
|
n.enabled = e, t = !0;
|
|
8429
8439
|
}), t;
|
|
8430
8440
|
}, z = (e, t) => {
|
|
8431
|
-
let n = !(t?.isHeld || t?.isMuted), i =
|
|
8441
|
+
let n = !(t?.isHeld || t?.isMuted), i = Up(e, n), a = R(n);
|
|
8432
8442
|
!i && !a && console.warn("[SipJs] No audio tracks found to apply channel audio state");
|
|
8433
|
-
},
|
|
8443
|
+
}, Wp = (t) => {
|
|
8434
8444
|
for (let [n, i] of a.value.entries()) if (i === t) return e.channels.value.find((e) => e.id === n) || null;
|
|
8435
8445
|
return e.activeChannel.value || null;
|
|
8436
|
-
},
|
|
8446
|
+
}, B = async (e) => {
|
|
8437
8447
|
let t = e.sessionDescriptionHandler?.peerConnection;
|
|
8438
8448
|
if (!t) return;
|
|
8439
|
-
let n =
|
|
8449
|
+
let n = Wp(e), i = !(n?.isHeld || n?.isMuted), a = t.getSenders().find((e) => e.track?.kind === "audio");
|
|
8440
8450
|
if (a?.track) {
|
|
8441
|
-
a.track.enabled = i, n &&
|
|
8451
|
+
a.track.enabled = i, n && M(e, n.id);
|
|
8442
8452
|
return;
|
|
8443
8453
|
}
|
|
8444
8454
|
try {
|
|
8445
|
-
let [a] = (await navigator.mediaDevices.getUserMedia(
|
|
8455
|
+
let [a] = (await navigator.mediaDevices.getUserMedia(Gp(!1))).getAudioTracks();
|
|
8446
8456
|
if (!a) return;
|
|
8447
8457
|
a.enabled = i;
|
|
8448
8458
|
let o = new MediaStream([a]);
|
|
8449
8459
|
d.value = o;
|
|
8450
8460
|
let s = t.getSenders().find((e) => e.track === null);
|
|
8451
|
-
s ? await s.replaceTrack(a) : t.addTrack(a, o), z(e, n), n &&
|
|
8461
|
+
s ? await s.replaceTrack(a) : t.addTrack(a, o), z(e, n), n && M(e, n.id);
|
|
8452
8462
|
} catch (e) {
|
|
8453
8463
|
console.warn("[SipJs] Failed to recover outbound audio track:", e);
|
|
8454
8464
|
}
|
|
8455
|
-
},
|
|
8465
|
+
}, Gp = (e = !1) => {
|
|
8456
8466
|
let t = {
|
|
8457
8467
|
echoCancellation: { ideal: !0 },
|
|
8458
8468
|
noiseSuppression: { ideal: !1 },
|
|
@@ -8463,7 +8473,17 @@ const createSipService = (e, t = {}) => {
|
|
|
8463
8473
|
audio: t,
|
|
8464
8474
|
video: e
|
|
8465
8475
|
};
|
|
8466
|
-
},
|
|
8476
|
+
}, V = async () => {
|
|
8477
|
+
let t = i.value;
|
|
8478
|
+
t && await t.register({ requestDelegate: {
|
|
8479
|
+
onAccept: () => {
|
|
8480
|
+
e.setConnected(!0);
|
|
8481
|
+
},
|
|
8482
|
+
onReject: () => {
|
|
8483
|
+
e.setConnected(!1);
|
|
8484
|
+
}
|
|
8485
|
+
} });
|
|
8486
|
+
}, H = async (t) => {
|
|
8467
8487
|
if (!n.value) {
|
|
8468
8488
|
try {
|
|
8469
8489
|
(await navigator.mediaDevices.getUserMedia({ audio: !0 })).getTracks().forEach((e) => e.stop());
|
|
@@ -8483,18 +8503,18 @@ const createSipService = (e, t = {}) => {
|
|
|
8483
8503
|
reconnectionDelay: 5,
|
|
8484
8504
|
reconnectionAttempts: 3,
|
|
8485
8505
|
delegate: {
|
|
8486
|
-
onConnect: () =>
|
|
8506
|
+
onConnect: () => {},
|
|
8487
8507
|
onDisconnect: () => e.setConnected(!1),
|
|
8488
|
-
onInvite: (e) =>
|
|
8508
|
+
onInvite: (e) => Jp(e)
|
|
8489
8509
|
}
|
|
8490
|
-
}), await n.value.start(), i.value = new Registerer(n.value), await
|
|
8510
|
+
}), await n.value.start(), i.value = new Registerer(n.value), await V(), Kp();
|
|
8491
8511
|
} catch {}
|
|
8492
8512
|
}
|
|
8493
|
-
},
|
|
8513
|
+
}, Kp = () => {
|
|
8494
8514
|
v = new AbortController();
|
|
8495
8515
|
let { signal: t } = v, n = Date.now(), i = (e = 1e3) => {
|
|
8496
8516
|
y && clearTimeout(y), y = setTimeout(async () => {
|
|
8497
|
-
y = null, await
|
|
8517
|
+
y = null, await qp();
|
|
8498
8518
|
}, e);
|
|
8499
8519
|
}, a = () => {
|
|
8500
8520
|
if (document.visibilityState === "visible") {
|
|
@@ -8517,7 +8537,7 @@ const createSipService = (e, t = {}) => {
|
|
|
8517
8537
|
}, { signal: t }), document.addEventListener("resume", () => {
|
|
8518
8538
|
console.log("[SipJs] Page resumed"), n = Date.now(), l(), i(1e3);
|
|
8519
8539
|
}, { signal: t }), l();
|
|
8520
|
-
},
|
|
8540
|
+
}, qp = async () => {
|
|
8521
8541
|
if (n.value) {
|
|
8522
8542
|
if (!navigator.onLine) {
|
|
8523
8543
|
console.log("[SipJs] Skipping reconnect, device is offline");
|
|
@@ -8529,13 +8549,13 @@ const createSipService = (e, t = {}) => {
|
|
|
8529
8549
|
}
|
|
8530
8550
|
try {
|
|
8531
8551
|
if (n.value.isConnected() || (console.log("[SipJs] Reconnecting..."), await n.value.reconnect()), i.value && n.value.isConnected()) try {
|
|
8532
|
-
await
|
|
8552
|
+
await V();
|
|
8533
8553
|
} catch {}
|
|
8534
8554
|
} catch (e) {
|
|
8535
8555
|
console.error("[SipJs] Reconnection failed:", e);
|
|
8536
8556
|
}
|
|
8537
8557
|
}
|
|
8538
|
-
},
|
|
8558
|
+
}, W = async () => {
|
|
8539
8559
|
v?.abort(), v = null, y &&= (clearTimeout(y), null), b &&= (clearInterval(b), null);
|
|
8540
8560
|
let e = i.value, t = n.value;
|
|
8541
8561
|
if (i.value = null, n.value = null, e) try {
|
|
@@ -8548,7 +8568,7 @@ const createSipService = (e, t = {}) => {
|
|
|
8548
8568
|
} catch (e) {
|
|
8549
8569
|
console.warn("[SipJs] UserAgent stop failed:", e);
|
|
8550
8570
|
}
|
|
8551
|
-
},
|
|
8571
|
+
}, Jp = (t) => {
|
|
8552
8572
|
console.log("[SipJs] 📞 Llamada entrante recibida"), console.log("[SipJs] Remote Identity URI:", t.remoteIdentity.uri.toString()), console.log("[SipJs] Remote Identity URI user:", t.remoteIdentity.uri.user), console.log("[SipJs] Remote Identity displayName:", t.remoteIdentity.displayName);
|
|
8553
8573
|
let n = e.channels.value.find((e) => e.status === "idle");
|
|
8554
8574
|
if (!n) {
|
|
@@ -8563,7 +8583,7 @@ const createSipService = (e, t = {}) => {
|
|
|
8563
8583
|
remoteNumber: s,
|
|
8564
8584
|
remoteDisplayName: t.remoteIdentity.displayName || void 0,
|
|
8565
8585
|
hasVideo: o
|
|
8566
|
-
}),
|
|
8586
|
+
}), A(t, i, "incoming", s), j(i, "ringing"), P(), e.setActiveChannelId(i), t.stateChange.addListener((n) => {
|
|
8567
8587
|
switch (n) {
|
|
8568
8588
|
case SessionState.Terminated: {
|
|
8569
8589
|
let n = e.channels.value.find((e) => e.id === i), o = extractCallerNumber(t.remoteIdentity.uri.user, t.remoteIdentity.displayName);
|
|
@@ -8583,21 +8603,21 @@ const createSipService = (e, t = {}) => {
|
|
|
8583
8603
|
startTime: Date.now(),
|
|
8584
8604
|
duration: 0
|
|
8585
8605
|
});
|
|
8586
|
-
|
|
8606
|
+
j(i, m.has(i) ? "ended" : "failed"), N(i), e.updateChannelState(i, {
|
|
8587
8607
|
status: "idle",
|
|
8588
8608
|
remoteNumber: "",
|
|
8589
8609
|
isMuted: !1,
|
|
8590
8610
|
isHeld: !1,
|
|
8591
8611
|
hasVideo: !1,
|
|
8592
8612
|
hasEarlyMedia: !1
|
|
8593
|
-
}), a.value.delete(i), e.activeChannelId.value === i &&
|
|
8613
|
+
}), a.value.delete(i), e.activeChannelId.value === i && nm(), P();
|
|
8594
8614
|
break;
|
|
8595
8615
|
}
|
|
8596
8616
|
case SessionState.Established:
|
|
8597
8617
|
m.add(i), e.updateChannelState(i, {
|
|
8598
8618
|
status: "connected",
|
|
8599
8619
|
startTime: Date.now()
|
|
8600
|
-
}),
|
|
8620
|
+
}), j(i, "connected"), e.activeChannelId.value === i && (Q(t), B(t).then(() => M(t, i))), P();
|
|
8601
8621
|
break;
|
|
8602
8622
|
}
|
|
8603
8623
|
});
|
|
@@ -8612,17 +8632,17 @@ const createSipService = (e, t = {}) => {
|
|
|
8612
8632
|
}
|
|
8613
8633
|
if (!s) return;
|
|
8614
8634
|
let l = new Inviter(n.value, s);
|
|
8615
|
-
a.value.set(o, l),
|
|
8635
|
+
a.value.set(o, l), A(l, o, "outgoing", t), j(o, "dialing"), e.updateChannelState(o, {
|
|
8616
8636
|
status: "calling",
|
|
8617
8637
|
remoteNumber: t,
|
|
8618
8638
|
hasVideo: i
|
|
8619
|
-
}), e.setLastDialedNumber(t),
|
|
8639
|
+
}), e.setLastDialedNumber(t), P(), l.stateChange.addListener((n) => {
|
|
8620
8640
|
switch (n) {
|
|
8621
8641
|
case SessionState.Established:
|
|
8622
8642
|
m.add(o), e.channels.value.find((e) => e.id === o)?.status !== "connected" && (e.updateChannelState(o, {
|
|
8623
8643
|
status: "connected",
|
|
8624
8644
|
startTime: Date.now()
|
|
8625
|
-
}),
|
|
8645
|
+
}), j(o, "connected"), Q(l), B(l).then(() => M(l, o)), P());
|
|
8626
8646
|
break;
|
|
8627
8647
|
case SessionState.Terminated: {
|
|
8628
8648
|
let n = e.channels.value.find((e) => e.id === o);
|
|
@@ -8642,7 +8662,7 @@ const createSipService = (e, t = {}) => {
|
|
|
8642
8662
|
startTime: Date.now(),
|
|
8643
8663
|
duration: 0
|
|
8644
8664
|
});
|
|
8645
|
-
|
|
8665
|
+
j(o, m.has(o) ? "ended" : "failed"), N(o), e.updateChannelState(o, {
|
|
8646
8666
|
status: "idle",
|
|
8647
8667
|
remoteNumber: "",
|
|
8648
8668
|
isMuted: !1,
|
|
@@ -8650,41 +8670,41 @@ const createSipService = (e, t = {}) => {
|
|
|
8650
8670
|
startTime: void 0,
|
|
8651
8671
|
keypadValue: "",
|
|
8652
8672
|
hasVideo: !1
|
|
8653
|
-
}), a.value.delete(o), e.activeChannelId.value === o &&
|
|
8673
|
+
}), a.value.delete(o), e.activeChannelId.value === o && nm(), P();
|
|
8654
8674
|
break;
|
|
8655
8675
|
}
|
|
8656
8676
|
}
|
|
8657
8677
|
});
|
|
8658
8678
|
let u = {
|
|
8659
|
-
sessionDescriptionHandlerOptions: { constraints:
|
|
8679
|
+
sessionDescriptionHandlerOptions: { constraints: Gp(i) },
|
|
8660
8680
|
requestDelegate: {
|
|
8661
8681
|
onProgress: (t) => {
|
|
8662
|
-
(t.message.statusCode === 180 || t.message.statusCode === 183) && (t.message.body && (e.updateChannelState(o, { hasEarlyMedia: !0 }),
|
|
8682
|
+
(t.message.statusCode === 180 || t.message.statusCode === 183) && (t.message.body && (e.updateChannelState(o, { hasEarlyMedia: !0 }), Q(l)), P());
|
|
8663
8683
|
},
|
|
8664
8684
|
onAccept: (t) => {
|
|
8665
8685
|
e.channels.value.find((e) => e.id === o)?.status !== "connected" && (m.add(o), e.updateChannelState(o, {
|
|
8666
8686
|
status: "connected",
|
|
8667
8687
|
startTime: Date.now()
|
|
8668
|
-
}),
|
|
8688
|
+
}), j(o, "connected"), Q(l), B(l).then(() => M(l, o)), P());
|
|
8669
8689
|
}
|
|
8670
8690
|
}
|
|
8671
8691
|
};
|
|
8672
8692
|
await l.invite(u);
|
|
8673
|
-
},
|
|
8693
|
+
}, K = async (t = !1) => {
|
|
8674
8694
|
let n = e.activeChannelId.value, i = a.value.get(n);
|
|
8675
8695
|
if (i instanceof Invitation && i.state === SessionState.Initial) {
|
|
8676
8696
|
for (let [t, n] of a.value.entries()) if (t !== e.activeChannelId.value && n.state === SessionState.Established && !e.channels.value.find((e) => e.id === t)?.isHeld) try {
|
|
8677
|
-
await
|
|
8697
|
+
await Y(n, !0), e.updateChannelState(t, { isHeld: !0 });
|
|
8678
8698
|
} catch (e) {
|
|
8679
8699
|
console.error(`[SipJs] Failed to hold channel ${t}:`, e);
|
|
8680
8700
|
}
|
|
8681
|
-
let o = { sessionDescriptionHandlerOptions: { constraints:
|
|
8701
|
+
let o = { sessionDescriptionHandlerOptions: { constraints: Gp(t) } };
|
|
8682
8702
|
e.updateChannelState(n, {
|
|
8683
8703
|
status: "connected",
|
|
8684
8704
|
startTime: Date.now()
|
|
8685
8705
|
});
|
|
8686
8706
|
try {
|
|
8687
|
-
await i.accept(o), await
|
|
8707
|
+
await i.accept(o), await B(i), P();
|
|
8688
8708
|
} catch (t) {
|
|
8689
8709
|
let i = a.value.get(n);
|
|
8690
8710
|
throw i instanceof Invitation && i.state === SessionState.Initial && e.updateChannelState(n, {
|
|
@@ -8693,7 +8713,7 @@ const createSipService = (e, t = {}) => {
|
|
|
8693
8713
|
}), t;
|
|
8694
8714
|
}
|
|
8695
8715
|
}
|
|
8696
|
-
},
|
|
8716
|
+
}, q = async () => {
|
|
8697
8717
|
let t = a.value.get(e.activeChannelId.value);
|
|
8698
8718
|
if (t) switch (t.state) {
|
|
8699
8719
|
case SessionState.Initial:
|
|
@@ -8704,35 +8724,35 @@ const createSipService = (e, t = {}) => {
|
|
|
8704
8724
|
await t.bye();
|
|
8705
8725
|
break;
|
|
8706
8726
|
}
|
|
8707
|
-
},
|
|
8727
|
+
}, J = () => {
|
|
8708
8728
|
let t = a.value.get(e.activeChannelId.value);
|
|
8709
8729
|
if (!t) return;
|
|
8710
8730
|
let n = !e.isMuted.value;
|
|
8711
8731
|
e.setMuted(n), z(t, e.channels.value.find((t) => t.id === e.activeChannelId.value));
|
|
8712
|
-
},
|
|
8732
|
+
}, Y = async (e, t) => {
|
|
8713
8733
|
let n = { sessionDescriptionHandlerOptions: { hold: t } };
|
|
8714
8734
|
await e.invite(n);
|
|
8715
|
-
},
|
|
8735
|
+
}, Z = async () => {
|
|
8716
8736
|
let t = a.value.get(e.activeChannelId.value);
|
|
8717
8737
|
if (t?.state !== SessionState.Established) return;
|
|
8718
8738
|
let n = !e.isHeld.value;
|
|
8719
8739
|
try {
|
|
8720
|
-
await
|
|
8740
|
+
await Y(t, n), e.setHeld(n), z(t, e.channels.value.find((t) => t.id === e.activeChannelId.value));
|
|
8721
8741
|
} catch {}
|
|
8722
|
-
},
|
|
8742
|
+
}, Yp = async (t) => {
|
|
8723
8743
|
let n = e.activeChannelId.value;
|
|
8724
8744
|
if (n === t) return;
|
|
8725
8745
|
let i = a.value.get(n), o = a.value.get(t), s = e.channels.value.find((e) => e.id === n), l = e.channels.value.find((e) => e.id === t);
|
|
8726
8746
|
if (i && i.state === SessionState.Established && !s?.isHeld) try {
|
|
8727
|
-
await
|
|
8747
|
+
await Y(i, !0), e.updateChannelState(n, { isHeld: !0 }), z(i, e.channels.value.find((e) => e.id === n));
|
|
8728
8748
|
} catch {}
|
|
8729
|
-
if (e.setActiveChannelId(t),
|
|
8749
|
+
if (e.setActiveChannelId(t), P(), o && o.state === SessionState.Established) {
|
|
8730
8750
|
if (l?.isHeld) try {
|
|
8731
|
-
await
|
|
8751
|
+
await Y(o, !1), e.updateChannelState(t, { isHeld: !1 });
|
|
8732
8752
|
} catch {}
|
|
8733
|
-
z(o, e.channels.value.find((e) => e.id === t)),
|
|
8734
|
-
} else
|
|
8735
|
-
},
|
|
8753
|
+
z(o, e.channels.value.find((e) => e.id === t)), Q(o);
|
|
8754
|
+
} else nm();
|
|
8755
|
+
}, Xp = (t) => {
|
|
8736
8756
|
let n = a.value.get(e.activeChannelId.value);
|
|
8737
8757
|
if (n?.state !== SessionState.Established) return;
|
|
8738
8758
|
let i = { requestOptions: { body: {
|
|
@@ -8741,10 +8761,10 @@ const createSipService = (e, t = {}) => {
|
|
|
8741
8761
|
contentDisposition: "signal"
|
|
8742
8762
|
} } };
|
|
8743
8763
|
n.info(i);
|
|
8744
|
-
},
|
|
8764
|
+
}, Zp = (t, n) => {
|
|
8745
8765
|
let i = e.channels.value.find((e) => e.id === t);
|
|
8746
|
-
!i || i.status !== "connected" || (
|
|
8747
|
-
},
|
|
8766
|
+
!i || i.status !== "connected" || (Q(n), z(n, i), B(n), o.play().catch(() => {}));
|
|
8767
|
+
}, Qp = async (t) => {
|
|
8748
8768
|
console.log("[SipJs] 🔄 transferCall iniciado"), console.log("[SipJs] Target:", t);
|
|
8749
8769
|
let i = e.activeChannelId.value, o = a.value.get(i);
|
|
8750
8770
|
if (!o) throw console.error("[SipJs] ❌ No hay sesión activa en el canal", i), Error("No active session to transfer");
|
|
@@ -8764,7 +8784,7 @@ const createSipService = (e, t = {}) => {
|
|
|
8764
8784
|
},
|
|
8765
8785
|
onReject: (e) => {
|
|
8766
8786
|
let t = e.message.statusCode;
|
|
8767
|
-
console.error("[SipJs] ❌ Transfer REFER rechazado:", t), console.error("[SipJs] Response completo:", e.message),
|
|
8787
|
+
console.error("[SipJs] ❌ Transfer REFER rechazado:", t), console.error("[SipJs] Response completo:", e.message), Zp(i, o);
|
|
8768
8788
|
}
|
|
8769
8789
|
},
|
|
8770
8790
|
onNotify: (e) => {
|
|
@@ -8787,7 +8807,7 @@ const createSipService = (e, t = {}) => {
|
|
|
8787
8807
|
487: "Transferencia cancelada",
|
|
8788
8808
|
503: "Servicio no disponible - el destino puede estar fuera de línea"
|
|
8789
8809
|
}[t] || `Error en transferencia (código ${t})`;
|
|
8790
|
-
console.warn("[SipJs] 💬", e),
|
|
8810
|
+
console.warn("[SipJs] 💬", e), Zp(i, o);
|
|
8791
8811
|
} else t >= 100 && t < 200 && console.log("[SipJs] 📞 Transferencia en progreso:", t, n);
|
|
8792
8812
|
} else console.warn("[SipJs] ⚠️ No se pudo extraer el código de estado del NOTIFY body");
|
|
8793
8813
|
} else console.warn("[SipJs] ⚠️ NOTIFY sin body");
|
|
@@ -8796,14 +8816,14 @@ const createSipService = (e, t = {}) => {
|
|
|
8796
8816
|
} catch (e) {
|
|
8797
8817
|
throw console.error("[SipJs] ❌ Error en transferCall:", e), console.error("[SipJs] Error type:", e?.constructor?.name), console.error("[SipJs] Error message:", e instanceof Error ? e.message : String(e)), console.error("[SipJs] Error stack:", e instanceof Error ? e.stack : "N/A"), e;
|
|
8798
8818
|
}
|
|
8799
|
-
},
|
|
8819
|
+
}, $p = async (t) => {
|
|
8800
8820
|
console.log("[SipJs] 🔄 startAttendedTransfer iniciado"), console.log("[SipJs] Target:", t);
|
|
8801
8821
|
let n = e.activeChannelId.value, i = a.value.get(n);
|
|
8802
8822
|
if (console.log("[SipJs] Canal original:", n), console.log("[SipJs] Sesión original:", i?.state), !i || i.state !== SessionState.Established) throw console.error("[SipJs] ❌ No hay llamada establecida para transferir"), Error("No established call to transfer");
|
|
8803
8823
|
let o = e.channels.value.find((e) => e.status === "idle");
|
|
8804
8824
|
if (console.log("[SipJs] Canal de consulta encontrado:", o?.id), !o) throw console.error("[SipJs] ❌ No hay canales disponibles para llamada de consulta"), Error("No available channel for consultation call");
|
|
8805
8825
|
try {
|
|
8806
|
-
console.log("[SipJs] 🔇 Poniendo llamada original en hold..."), await
|
|
8826
|
+
console.log("[SipJs] 🔇 Poniendo llamada original en hold..."), await Y(i, !0), e.updateChannelState(n, { isHeld: !0 }), console.log("[SipJs] ✅ Llamada original en hold");
|
|
8807
8827
|
} catch (e) {
|
|
8808
8828
|
throw console.error("[SipJs] ❌ Failed to hold original call:", e), Error("Failed to put call on hold");
|
|
8809
8829
|
}
|
|
@@ -8815,9 +8835,9 @@ const createSipService = (e, t = {}) => {
|
|
|
8815
8835
|
targetNumber: t
|
|
8816
8836
|
}), console.log("[SipJs] 📋 Transferencia en progreso registrada");
|
|
8817
8837
|
} catch (t) {
|
|
8818
|
-
throw console.error("[SipJs] ❌ Failed to start consultation call:", t), console.log("[SipJs] 🔄 Volviendo al canal original y quitando hold..."), e.setActiveChannelId(n), await
|
|
8838
|
+
throw console.error("[SipJs] ❌ Failed to start consultation call:", t), console.log("[SipJs] 🔄 Volviendo al canal original y quitando hold..."), e.setActiveChannelId(n), await Y(i, !1).catch(() => {}), e.updateChannelState(n, { isHeld: !1 }), Error("Failed to initiate consultation call");
|
|
8819
8839
|
}
|
|
8820
|
-
},
|
|
8840
|
+
}, em = async () => {
|
|
8821
8841
|
console.log("[SipJs] 🔄 completeAttendedTransfer iniciado");
|
|
8822
8842
|
let t = e.transferInProgress.value;
|
|
8823
8843
|
if (!t) throw console.error("[SipJs] ❌ No hay transferencia en progreso"), Error("No transfer in progress");
|
|
@@ -8860,7 +8880,7 @@ const createSipService = (e, t = {}) => {
|
|
|
8860
8880
|
} catch (e) {
|
|
8861
8881
|
throw console.error("[SipJs] Attended transfer failed:", e), e;
|
|
8862
8882
|
}
|
|
8863
|
-
},
|
|
8883
|
+
}, tm = async () => {
|
|
8864
8884
|
let t = e.transferInProgress.value;
|
|
8865
8885
|
if (!t) throw Error("No transfer in progress");
|
|
8866
8886
|
console.log("[SipJs] Canceling attended transfer...");
|
|
@@ -8871,12 +8891,12 @@ const createSipService = (e, t = {}) => {
|
|
|
8871
8891
|
console.warn("[SipJs] Error ending consultation:", e);
|
|
8872
8892
|
}
|
|
8873
8893
|
if (n) try {
|
|
8874
|
-
e.setActiveChannelId(t.originalChannelId), await
|
|
8894
|
+
e.setActiveChannelId(t.originalChannelId), await Y(n, !1), e.updateChannelState(t.originalChannelId, { isHeld: !1 }), console.log("[SipJs] Returned to original call");
|
|
8875
8895
|
} catch (e) {
|
|
8876
8896
|
console.warn("[SipJs] Error resuming original call:", e);
|
|
8877
8897
|
}
|
|
8878
8898
|
e.setTransferInProgress(null);
|
|
8879
|
-
},
|
|
8899
|
+
}, Q = (e) => {
|
|
8880
8900
|
let t = e.sessionDescriptionHandler;
|
|
8881
8901
|
if (!t) {
|
|
8882
8902
|
console.error("[SipJs] setupRemoteMedia: no sessionDescriptionHandler");
|
|
@@ -8889,8 +8909,8 @@ const createSipService = (e, t = {}) => {
|
|
|
8889
8909
|
}
|
|
8890
8910
|
if (u.value === n) return;
|
|
8891
8911
|
o.pause(), o.srcObject = null, g?.abort(), g = new AbortController(), u.value = n, d.value = t.localMediaStream ?? null;
|
|
8892
|
-
let i =
|
|
8893
|
-
z(e, i), i &&
|
|
8912
|
+
let i = Wp(e);
|
|
8913
|
+
z(e, i), i && M(e, i.id);
|
|
8894
8914
|
let a = (e) => {
|
|
8895
8915
|
_?.abort(), _ = new AbortController();
|
|
8896
8916
|
let { signal: t } = _, n = () => {
|
|
@@ -8903,32 +8923,32 @@ const createSipService = (e, t = {}) => {
|
|
|
8903
8923
|
}, { signal: t }), n();
|
|
8904
8924
|
};
|
|
8905
8925
|
n.addEventListener("addtrack", (t) => {
|
|
8906
|
-
t.track.kind === "audio" && (o.srcObject = null, o.srcObject = n, a(t.track), i &&
|
|
8926
|
+
t.track.kind === "audio" && (o.srcObject = null, o.srcObject = n, a(t.track), i && M(e, i.id));
|
|
8907
8927
|
}, { signal: g.signal });
|
|
8908
8928
|
let [s] = n.getTracks();
|
|
8909
|
-
s && (o.srcObject = n, a(s), i &&
|
|
8910
|
-
},
|
|
8929
|
+
s && (o.srcObject = n, a(s), i && M(e, i.id));
|
|
8930
|
+
}, nm = () => {
|
|
8911
8931
|
_?.abort(), _ = null, g?.abort(), g = null, o.pause(), o.srcObject = null, u.value = null, d.value = null;
|
|
8912
8932
|
};
|
|
8913
8933
|
return {
|
|
8914
|
-
initUserAgent:
|
|
8915
|
-
stop:
|
|
8934
|
+
initUserAgent: H,
|
|
8935
|
+
stop: W,
|
|
8916
8936
|
makeCall: G,
|
|
8917
|
-
answerCall:
|
|
8918
|
-
hangupCall:
|
|
8919
|
-
toggleMute:
|
|
8920
|
-
toggleHold:
|
|
8921
|
-
sendDTMF:
|
|
8922
|
-
transferCall:
|
|
8923
|
-
startAttendedTransfer:
|
|
8924
|
-
completeAttendedTransfer:
|
|
8925
|
-
cancelAttendedTransfer:
|
|
8926
|
-
switchChannel:
|
|
8937
|
+
answerCall: K,
|
|
8938
|
+
hangupCall: q,
|
|
8939
|
+
toggleMute: J,
|
|
8940
|
+
toggleHold: Z,
|
|
8941
|
+
sendDTMF: Xp,
|
|
8942
|
+
transferCall: Qp,
|
|
8943
|
+
startAttendedTransfer: $p,
|
|
8944
|
+
completeAttendedTransfer: em,
|
|
8945
|
+
cancelAttendedTransfer: tm,
|
|
8946
|
+
switchChannel: Yp,
|
|
8927
8947
|
extension: x,
|
|
8928
|
-
setVolume:
|
|
8948
|
+
setVolume: F,
|
|
8929
8949
|
setNotificationVolume: D,
|
|
8930
|
-
setOutputDevice:
|
|
8931
|
-
setInputDevice:
|
|
8950
|
+
setOutputDevice: I,
|
|
8951
|
+
setInputDevice: L,
|
|
8932
8952
|
remoteStream: u,
|
|
8933
8953
|
localStream: d
|
|
8934
8954
|
};
|
|
@@ -16308,7 +16328,7 @@ var icon_phone_default = { render }, Tooltip_default = /* @__PURE__ */ defineCom
|
|
|
16308
16328
|
if (!t) return "Unknown";
|
|
16309
16329
|
let i = I(t), a = o.contacts?.find((e) => I(e.number) === i);
|
|
16310
16330
|
return a ? a.name : n || t;
|
|
16311
|
-
}),
|
|
16331
|
+
}), R = computed(() => {
|
|
16312
16332
|
let e = p.value;
|
|
16313
16333
|
return e?.remoteNumber || e?.keypadValue || "";
|
|
16314
16334
|
});
|
|
@@ -16397,7 +16417,7 @@ var icon_phone_default = { render }, Tooltip_default = /* @__PURE__ */ defineCom
|
|
|
16397
16417
|
})) : (openBlock(), createBlock(unref(CircleUser), {
|
|
16398
16418
|
key: 4,
|
|
16399
16419
|
class: "wp:w-3 wp:h-3"
|
|
16400
|
-
}))], 2), createElementVNode("div", _hoisted_9$4, [createElementVNode("span", _hoisted_10$3, toDisplayString(e.name), 1), createElementVNode("span", _hoisted_11$3, toDisplayString(e.number), 1)])], 40, _hoisted_8$4))), 128))], 512), [[vShow, v.value && x.value && (T.value.length > 0 || S.value)]])], 512)])) : (p.value?.status || "idle") === "connected" ? (openBlock(), createElementBlock("div", _hoisted_12$3, [createElementVNode("div", _hoisted_13$1, [createElementVNode("div", _hoisted_14$1, " En llamada con " + toDisplayString(L.value), 1), L.value ===
|
|
16420
|
+
}))], 2), createElementVNode("div", _hoisted_9$4, [createElementVNode("span", _hoisted_10$3, toDisplayString(e.name), 1), createElementVNode("span", _hoisted_11$3, toDisplayString(e.number), 1)])], 40, _hoisted_8$4))), 128))], 512), [[vShow, v.value && x.value && (T.value.length > 0 || S.value)]])], 512)])) : (p.value?.status || "idle") === "connected" ? (openBlock(), createElementBlock("div", _hoisted_12$3, [createElementVNode("div", _hoisted_13$1, [createElementVNode("div", _hoisted_14$1, " En llamada con " + toDisplayString(L.value), 1), L.value === R.value ? createCommentVNode("", !0) : (openBlock(), createElementBlock("div", _hoisted_15$1, toDisplayString(R.value), 1))])])) : (p.value?.status || "idle") === "idle" ? createCommentVNode("", !0) : (openBlock(), createElementBlock("div", _hoisted_16$1, [createElementVNode("div", _hoisted_17$1, [createElementVNode("div", _hoisted_18, [createElementVNode("div", _hoisted_19, toDisplayString(L.value), 1), L.value === R.value ? createCommentVNode("", !0) : (openBlock(), createElementBlock("div", _hoisted_20, toDisplayString(R.value), 1))]), createVNode(unref(TooltipProvider_default), null, {
|
|
16401
16421
|
default: withCtx(() => [createVNode(unref(Tooltip_default), null, {
|
|
16402
16422
|
default: withCtx(() => [createVNode(unref(TooltipTrigger_default), { "as-child": "" }), createVNode(unref(TooltipContent_default), { class: "wp:flex wp:items-center wp:gap-2" }, {
|
|
16403
16423
|
default: withCtx(() => [createElementVNode("span", null, toDisplayString(unref(t).isKeypadVisible ? "Ocultar" : "Mostrar") + " teclado", 1), createVNode(unref(Kbd_default), null, {
|
|
@@ -17309,14 +17329,14 @@ var icon_phone_default = { render }, Tooltip_default = /* @__PURE__ */ defineCom
|
|
|
17309
17329
|
onMounted(() => {
|
|
17310
17330
|
o.value = "documentPictureInPicture" in window, document.addEventListener("visibilitychange", y), window.addEventListener("blur", b);
|
|
17311
17331
|
}), onUnmounted(() => {
|
|
17312
|
-
document.removeEventListener("visibilitychange", y), window.removeEventListener("blur", b), g &&= (clearTimeout(g), null), S(),
|
|
17332
|
+
document.removeEventListener("visibilitychange", y), window.removeEventListener("blur", b), g &&= (clearTimeout(g), null), S(), R();
|
|
17313
17333
|
});
|
|
17314
17334
|
let _ = () => {
|
|
17315
17335
|
let e = i.callStatus !== "idle", t = document.hidden || !document.hasFocus();
|
|
17316
17336
|
return i.autoOpenOnBlur !== !1 && e && o.value && t && !l.value && !u.value;
|
|
17317
17337
|
}, v = () => {
|
|
17318
17338
|
_() && (g && clearTimeout(g), g = setTimeout(() => {
|
|
17319
|
-
_() &&
|
|
17339
|
+
_() && Up();
|
|
17320
17340
|
}, 120));
|
|
17321
17341
|
}, y = () => {
|
|
17322
17342
|
v();
|
|
@@ -17333,9 +17353,9 @@ var icon_phone_default = { render }, Tooltip_default = /* @__PURE__ */ defineCom
|
|
|
17333
17353
|
return `${t.toString().padStart(2, "0")}:${n.toString().padStart(2, "0")}`;
|
|
17334
17354
|
};
|
|
17335
17355
|
watch(() => i.callStatus, (e, t) => {
|
|
17336
|
-
e === "connected" && t !== "connected" ? x() : e === "idle" && t !== "idle" && (S(), l.value &&
|
|
17356
|
+
e === "connected" && t !== "connected" ? x() : e === "idle" && t !== "idle" && (S(), l.value && R());
|
|
17337
17357
|
}, { immediate: !0 }), watch(() => i.isConnected, (e) => {
|
|
17338
|
-
!e && l.value && (S(),
|
|
17358
|
+
!e && l.value && (S(), R());
|
|
17339
17359
|
}), watch(() => [
|
|
17340
17360
|
i.callStatus,
|
|
17341
17361
|
i.isMuted,
|
|
@@ -17409,7 +17429,7 @@ var icon_phone_default = { render }, Tooltip_default = /* @__PURE__ */ defineCom
|
|
|
17409
17429
|
n.className = "pip-btn pip-btn-answer", n.title = "Contestar", n.innerHTML = E.phone, n.onclick = () => a("answer", !1), t.appendChild(n);
|
|
17410
17430
|
let o = e.createElement("button");
|
|
17411
17431
|
o.className = "pip-btn pip-btn-hangup", o.title = "Rechazar", o.innerHTML = E.phoneOff, o.onclick = () => {
|
|
17412
|
-
a("hangup"),
|
|
17432
|
+
a("hangup"), R();
|
|
17413
17433
|
}, t.appendChild(o);
|
|
17414
17434
|
} else if (i.callStatus === "connected") {
|
|
17415
17435
|
let n = e.createElement("button");
|
|
@@ -17420,12 +17440,12 @@ var icon_phone_default = { render }, Tooltip_default = /* @__PURE__ */ defineCom
|
|
|
17420
17440
|
s.className = "pip-btn pip-btn-transfer", s.title = "Transferir", s.innerHTML = E.transfer, s.onclick = () => a("transfer"), t.appendChild(s);
|
|
17421
17441
|
let l = e.createElement("button");
|
|
17422
17442
|
l.className = "pip-btn pip-btn-hangup", l.title = "Colgar", l.innerHTML = E.phoneOff, l.onclick = () => {
|
|
17423
|
-
a("hangup"),
|
|
17443
|
+
a("hangup"), R();
|
|
17424
17444
|
}, t.appendChild(l);
|
|
17425
17445
|
} else if (i.callStatus === "calling") {
|
|
17426
17446
|
let n = e.createElement("button");
|
|
17427
17447
|
n.className = "pip-btn pip-btn-hangup", n.title = "Cancelar", n.innerHTML = E.phoneOff, n.onclick = () => {
|
|
17428
|
-
a("hangup"),
|
|
17448
|
+
a("hangup"), R();
|
|
17429
17449
|
}, t.appendChild(n);
|
|
17430
17450
|
}
|
|
17431
17451
|
}
|
|
@@ -17441,7 +17461,7 @@ var icon_phone_default = { render }, Tooltip_default = /* @__PURE__ */ defineCom
|
|
|
17441
17461
|
}, 1e3));
|
|
17442
17462
|
}, L = () => {
|
|
17443
17463
|
m &&= (clearInterval(m), null);
|
|
17444
|
-
},
|
|
17464
|
+
}, Up = async () => {
|
|
17445
17465
|
if (!(!o.value || l.value || u.value)) {
|
|
17446
17466
|
u.value = !0;
|
|
17447
17467
|
try {
|
|
@@ -17461,14 +17481,14 @@ var icon_phone_default = { render }, Tooltip_default = /* @__PURE__ */ defineCom
|
|
|
17461
17481
|
u.value = !1;
|
|
17462
17482
|
}
|
|
17463
17483
|
}
|
|
17464
|
-
},
|
|
17484
|
+
}, R = () => {
|
|
17465
17485
|
L(), d.value && (d.value.close(), d.value = null, l.value = !1, a("update:active", !1));
|
|
17466
17486
|
};
|
|
17467
17487
|
return t({
|
|
17468
|
-
open:
|
|
17469
|
-
close:
|
|
17488
|
+
open: Up,
|
|
17489
|
+
close: R,
|
|
17470
17490
|
toggle: () => {
|
|
17471
|
-
l.value ?
|
|
17491
|
+
l.value ? R() : Up();
|
|
17472
17492
|
},
|
|
17473
17493
|
isActive: l,
|
|
17474
17494
|
isSupported: o,
|
|
@@ -17554,7 +17574,7 @@ var icon_phone_default = { render }, Tooltip_default = /* @__PURE__ */ defineCom
|
|
|
17554
17574
|
provide("webphone", x), provide("sip", S), t({ stop: S.stop }), watchEffect(() => {
|
|
17555
17575
|
o.mode === "webcall" && (o.to || console.error("WebPhone: \"to\" prop is required when mode is \"webcall\""), o.logo || console.error("WebPhone: \"logo\" prop is required when mode is \"webcall\""));
|
|
17556
17576
|
});
|
|
17557
|
-
let O = ref(!1), k = ref(!1), j = ref(!1), N = ref(null), F = ref(null), L = ref(null),
|
|
17577
|
+
let O = ref(!1), k = ref(!1), j = ref(!1), N = ref(null), F = ref(null), L = ref(null), Gp = navigator.platform.toUpperCase().indexOf("MAC") >= 0 ? "⌘" : "Ctrl+", V = computed(() => o.mode === "webcall"), H = ref(0), U = (e) => !!e && e.getVideoTracks().length > 0;
|
|
17558
17578
|
watch(() => x.callStatus, (e) => {
|
|
17559
17579
|
if (e === "idle" && !x.isKeypadVisible) {
|
|
17560
17580
|
x.toggleKeypad();
|
|
@@ -17562,82 +17582,82 @@ var icon_phone_default = { render }, Tooltip_default = /* @__PURE__ */ defineCom
|
|
|
17562
17582
|
}
|
|
17563
17583
|
e !== "idle" && x.isKeypadVisible && x.toggleKeypad();
|
|
17564
17584
|
});
|
|
17565
|
-
let
|
|
17585
|
+
let qp = computed(() => x.channels.find((e) => e.id === x.activeChannelId) ?? null), W = (e) => {
|
|
17566
17586
|
if (!e) return "";
|
|
17567
17587
|
let t = e.trim(), n = t.startsWith("+"), i = t.replace(/[^\d]/g, "");
|
|
17568
17588
|
return n ? `+${i}` : i;
|
|
17569
|
-
},
|
|
17570
|
-
let e =
|
|
17571
|
-
return o.contacts.find((e) =>
|
|
17572
|
-
}),
|
|
17573
|
-
|
|
17574
|
-
},
|
|
17589
|
+
}, Jp = computed(() => {
|
|
17590
|
+
let e = qp.value?.remoteNumber || x.remoteNumber, t = W(e);
|
|
17591
|
+
return o.contacts.find((e) => W(e.number) === t)?.name || e || "Llamada";
|
|
17592
|
+
}), G = computed(() => (H.value, !!qp.value?.hasVideo || U(E.value) || U(D.value))), { isOnline: K } = useNetwork(), q = computed(() => !K.value), J = ref(null), Z = ref(!1), Qp = computed(() => o.enablePictureInPicture), tm = () => {
|
|
17593
|
+
Qp.value && J.value?.toggle();
|
|
17594
|
+
}, Q = async (e, t) => {
|
|
17575
17595
|
try {
|
|
17576
17596
|
t === "blind" ? await S.transferCall(e) : await S.startAttendedTransfer(e);
|
|
17577
17597
|
} catch (e) {
|
|
17578
17598
|
console.error("[WebPhone] Transfer error:", e), alert(e instanceof Error ? e.message : "Transfer failed. Please try again.");
|
|
17579
17599
|
}
|
|
17580
|
-
},
|
|
17600
|
+
}, nm = async () => {
|
|
17581
17601
|
try {
|
|
17582
17602
|
await S.completeAttendedTransfer();
|
|
17583
17603
|
} catch (e) {
|
|
17584
17604
|
console.error("[WebPhone] Complete transfer error:", e), alert(e instanceof Error ? e.message : "Failed to complete transfer.");
|
|
17585
17605
|
}
|
|
17586
|
-
},
|
|
17606
|
+
}, rm = async () => {
|
|
17587
17607
|
try {
|
|
17588
17608
|
await S.cancelAttendedTransfer();
|
|
17589
17609
|
} catch (e) {
|
|
17590
17610
|
console.error("[WebPhone] Cancel transfer error:", e), alert(e instanceof Error ? e.message : "Failed to cancel transfer.");
|
|
17591
17611
|
}
|
|
17592
|
-
}, rm = (e) => {
|
|
17593
|
-
x.keypadValue = e, S.makeCall(e);
|
|
17594
17612
|
}, im = (e) => {
|
|
17613
|
+
x.keypadValue = e, S.makeCall(e);
|
|
17614
|
+
}, am = (e) => {
|
|
17595
17615
|
if (o.onAnswer) {
|
|
17596
17616
|
o.onAnswer(e);
|
|
17597
17617
|
return;
|
|
17598
17618
|
}
|
|
17599
17619
|
S.answerCall(e);
|
|
17600
|
-
},
|
|
17620
|
+
}, om = () => {
|
|
17601
17621
|
if (o.onHangup) {
|
|
17602
17622
|
o.onHangup();
|
|
17603
17623
|
return;
|
|
17604
17624
|
}
|
|
17605
17625
|
S.hangupCall();
|
|
17606
|
-
},
|
|
17626
|
+
}, sm = () => {
|
|
17607
17627
|
if (o.onReject) {
|
|
17608
17628
|
o.onReject();
|
|
17609
17629
|
return;
|
|
17610
17630
|
}
|
|
17611
17631
|
S.hangupCall();
|
|
17612
|
-
}, sm = () => {
|
|
17613
|
-
j.value = !0, Y.value?.close(), window.focus();
|
|
17614
17632
|
}, cm = () => {
|
|
17615
|
-
|
|
17633
|
+
j.value = !0, J.value?.close(), window.focus();
|
|
17634
|
+
}, lm = () => {
|
|
17635
|
+
if (!Qp.value) return !1;
|
|
17616
17636
|
let e = x.callStatus !== "idle", t = document.hidden || !document.hasFocus();
|
|
17617
17637
|
return e && t && !Z.value;
|
|
17618
|
-
},
|
|
17638
|
+
}, $ = () => {
|
|
17619
17639
|
window.setTimeout(() => {
|
|
17620
|
-
|
|
17640
|
+
lm() && J.value?.open();
|
|
17621
17641
|
}, 150);
|
|
17622
17642
|
};
|
|
17623
17643
|
watchEffect(() => {
|
|
17624
17644
|
F.value && (Z.value || !E.value ? F.value.srcObject = null : F.value.srcObject = E.value), L.value && (Z.value || !D.value ? L.value.srcObject = null : L.value.srcObject = D.value);
|
|
17625
17645
|
});
|
|
17626
|
-
let
|
|
17646
|
+
let um = (e) => {
|
|
17627
17647
|
if (!e || typeof e.addEventListener != "function" || typeof e.removeEventListener != "function") return () => {};
|
|
17628
17648
|
let t = () => {
|
|
17629
|
-
|
|
17649
|
+
H.value += 1;
|
|
17630
17650
|
};
|
|
17631
17651
|
return e.addEventListener("addtrack", t), e.addEventListener("removetrack", t), () => {
|
|
17632
17652
|
e.removeEventListener("addtrack", t), e.removeEventListener("removetrack", t);
|
|
17633
17653
|
};
|
|
17634
17654
|
};
|
|
17635
17655
|
watch(E, (e, t, n) => {
|
|
17636
|
-
|
|
17656
|
+
H.value += 1, n(um(e));
|
|
17637
17657
|
}, { immediate: !0 }), watch(D, (e, t, n) => {
|
|
17638
|
-
|
|
17658
|
+
H.value += 1, n(um(e));
|
|
17639
17659
|
}, { immediate: !0 });
|
|
17640
|
-
let
|
|
17660
|
+
let dm = [
|
|
17641
17661
|
"button",
|
|
17642
17662
|
"a",
|
|
17643
17663
|
"input",
|
|
@@ -17648,15 +17668,15 @@ var icon_phone_default = { render }, Tooltip_default = /* @__PURE__ */ defineCom
|
|
|
17648
17668
|
"[role=\"button\"]",
|
|
17649
17669
|
"[role=\"radio\"]",
|
|
17650
17670
|
"[data-no-drag]"
|
|
17651
|
-
].join(", "),
|
|
17671
|
+
].join(", "), fm = () => {
|
|
17652
17672
|
let e = window.innerWidth < 640, t = window.innerWidth < 1024, n = 360;
|
|
17653
17673
|
return e ? n = window.innerWidth * .9 : t && (n = 340), {
|
|
17654
17674
|
x: Math.max(0, (window.innerWidth - n) / 2),
|
|
17655
17675
|
y: e ? 30 : 80
|
|
17656
17676
|
};
|
|
17657
|
-
}, { x:
|
|
17677
|
+
}, { x: pm, y: mm, style: hm } = useDraggable(N, {
|
|
17658
17678
|
initialValue: computed(() => {
|
|
17659
|
-
let e =
|
|
17679
|
+
let e = fm();
|
|
17660
17680
|
return {
|
|
17661
17681
|
x: o.position.x ?? e.x,
|
|
17662
17682
|
y: o.position.y ?? e.y
|
|
@@ -17665,14 +17685,14 @@ var icon_phone_default = { render }, Tooltip_default = /* @__PURE__ */ defineCom
|
|
|
17665
17685
|
preventDefault: !0,
|
|
17666
17686
|
onStart: (e, t) => {
|
|
17667
17687
|
let n = t.target;
|
|
17668
|
-
if (n instanceof HTMLElement && n.closest(
|
|
17688
|
+
if (n instanceof HTMLElement && n.closest(dm)) return !1;
|
|
17669
17689
|
}
|
|
17670
17690
|
});
|
|
17671
17691
|
watch(() => o.position, (e) => {
|
|
17672
|
-
let t =
|
|
17673
|
-
|
|
17692
|
+
let t = fm();
|
|
17693
|
+
pm.value = e.x ?? t.x, mm.value = e.y ?? t.y;
|
|
17674
17694
|
}, { deep: !0 });
|
|
17675
|
-
let
|
|
17695
|
+
let gm = [
|
|
17676
17696
|
{
|
|
17677
17697
|
label: "Canal 1",
|
|
17678
17698
|
value: 0
|
|
@@ -17685,77 +17705,77 @@ var icon_phone_default = { render }, Tooltip_default = /* @__PURE__ */ defineCom
|
|
|
17685
17705
|
label: "Canal 3",
|
|
17686
17706
|
value: 2
|
|
17687
17707
|
}
|
|
17688
|
-
],
|
|
17708
|
+
], _m = ref(!1), vm = computed({
|
|
17689
17709
|
get: () => x.activeChannelId.toString(),
|
|
17690
17710
|
set: async (e) => {
|
|
17691
|
-
if (!
|
|
17692
|
-
|
|
17711
|
+
if (!q.value && e && !_m.value) {
|
|
17712
|
+
_m.value = !0;
|
|
17693
17713
|
try {
|
|
17694
17714
|
await T(parseInt(e));
|
|
17695
17715
|
} finally {
|
|
17696
|
-
|
|
17716
|
+
_m.value = !1;
|
|
17697
17717
|
}
|
|
17698
17718
|
}
|
|
17699
17719
|
}
|
|
17700
|
-
}),
|
|
17720
|
+
}), ym = (e) => {
|
|
17701
17721
|
let t = x.channels.find((t) => t.id === e);
|
|
17702
17722
|
return t ? t.status === "connected" || t.status === "calling" || t.status === "incoming" : !1;
|
|
17703
|
-
},
|
|
17723
|
+
}, bm = (e) => {
|
|
17704
17724
|
let t = x.channels.find((t) => t.id === e);
|
|
17705
17725
|
return t ? t.isHeld || t.status === "held" : !1;
|
|
17706
|
-
},
|
|
17707
|
-
|
|
17708
|
-
},
|
|
17709
|
-
if (!
|
|
17726
|
+
}, xm = (e) => {
|
|
17727
|
+
q.value || (vm.value = e.toString());
|
|
17728
|
+
}, Sm = (e) => {
|
|
17729
|
+
if (!q.value && ((e.metaKey || e.ctrlKey) && e.key.toLowerCase() === "h" && (e.preventDefault(), k.value = !0), (e.metaKey || e.ctrlKey) && e.key === "," && (e.preventDefault(), O.value = !0), (e.metaKey || e.ctrlKey) && e.key.toLowerCase() === "k" && (e.preventDefault(), x.toggleKeypad()), (e.metaKey || e.ctrlKey) && [
|
|
17710
17730
|
"1",
|
|
17711
17731
|
"2",
|
|
17712
17732
|
"3"
|
|
17713
17733
|
].includes(e.key))) {
|
|
17714
17734
|
e.preventDefault();
|
|
17715
17735
|
let t = parseInt(e.key) - 1;
|
|
17716
|
-
|
|
17717
|
-
|
|
17736
|
+
_m.value || (_m.value = !0, T(t).finally(() => {
|
|
17737
|
+
_m.value = !1;
|
|
17718
17738
|
}));
|
|
17719
17739
|
}
|
|
17720
17740
|
};
|
|
17721
17741
|
watch(() => x.callStatus, () => {
|
|
17722
|
-
|
|
17742
|
+
lm() && $();
|
|
17723
17743
|
}), watch(() => x.isConnected, (e) => {
|
|
17724
17744
|
v.value && a.set(v.value, e);
|
|
17725
|
-
}, { immediate: !0 }), watch(
|
|
17726
|
-
!e && Z.value &&
|
|
17745
|
+
}, { immediate: !0 }), watch(Qp, (e) => {
|
|
17746
|
+
!e && Z.value && J.value?.close();
|
|
17727
17747
|
});
|
|
17728
|
-
let
|
|
17729
|
-
|
|
17748
|
+
let Cm = ref(!1), wm = async () => {
|
|
17749
|
+
Cm.value || q.value || !o.host || !o.extension || !o.password || (await w({
|
|
17730
17750
|
uri: `sip:${o.extension}@${o.host}`,
|
|
17731
17751
|
transportOptions: { server: _.value },
|
|
17732
17752
|
authorizationUsername: o.extension,
|
|
17733
17753
|
authorizationPassword: o.password
|
|
17734
|
-
}), S.extension.value && (
|
|
17754
|
+
}), S.extension.value && (Cm.value = !0, o.mode === "webcall" && o.to && S.makeCall(o.to)));
|
|
17735
17755
|
};
|
|
17736
17756
|
return provide("webphoneRegistration", {
|
|
17737
17757
|
isConnected: computed(() => x.isConnected),
|
|
17738
|
-
register: () =>
|
|
17758
|
+
register: () => wm(),
|
|
17739
17759
|
unregister: async () => {
|
|
17740
|
-
await S.stop(),
|
|
17760
|
+
await S.stop(), Cm.value = !1;
|
|
17741
17761
|
}
|
|
17742
17762
|
}), onMounted(async () => {
|
|
17743
|
-
window.addEventListener("keydown",
|
|
17744
|
-
}), watch(() =>
|
|
17745
|
-
e && await
|
|
17763
|
+
window.addEventListener("keydown", Sm), document.addEventListener("visibilitychange", $), window.addEventListener("blur", $), window.addEventListener("pagehide", $), !(o.mode === "webcall" && (!o.to || !o.logo)) && await wm();
|
|
17764
|
+
}), watch(() => K.value, async (e) => {
|
|
17765
|
+
e && await wm();
|
|
17746
17766
|
}), onUnmounted(() => {
|
|
17747
|
-
S.stop(), window.removeEventListener("keydown",
|
|
17767
|
+
S.stop(), window.removeEventListener("keydown", Sm), document.removeEventListener("visibilitychange", $), window.removeEventListener("blur", $), window.removeEventListener("pagehide", $);
|
|
17748
17768
|
}), (e, t) => (openBlock(), createElementBlock(Fragment, null, [
|
|
17749
17769
|
createElementVNode("div", {
|
|
17750
17770
|
ref_key: "phoneRef",
|
|
17751
17771
|
ref: N,
|
|
17752
|
-
style: normalizeStyle(unref(
|
|
17753
|
-
class: normalizeClass(["webphone webphone-container wp:bg-white wp:dark:bg-neutral-800 wp:rounded-lg wp:shadow-sm wp:inset-shadow-2xs wp:w-[min(92vw,330px)] wp:fixed wp:z-50 wp:select-none wp:[&_button]:cursor-pointer wp:**:[[role=button]]:cursor-pointer",
|
|
17772
|
+
style: normalizeStyle(unref(hm)),
|
|
17773
|
+
class: normalizeClass(["webphone webphone-container wp:bg-white wp:dark:bg-neutral-800 wp:rounded-lg wp:shadow-sm wp:inset-shadow-2xs wp:w-[min(92vw,330px)] wp:fixed wp:z-50 wp:select-none wp:[&_button]:cursor-pointer wp:**:[[role=button]]:cursor-pointer", q.value ? "wp:opacity-70" : ""]),
|
|
17754
17774
|
"data-mode": o.mode,
|
|
17755
17775
|
"data-call-status": x.callStatus,
|
|
17756
|
-
"data-network-status":
|
|
17776
|
+
"data-network-status": q.value ? "offline" : "online"
|
|
17757
17777
|
}, [
|
|
17758
|
-
|
|
17778
|
+
G.value && !Z.value ? (openBlock(), createElementBlock("div", _hoisted_2, [createElementVNode("video", {
|
|
17759
17779
|
ref_key: "remoteVideoRef",
|
|
17760
17780
|
ref: F,
|
|
17761
17781
|
autoplay: "",
|
|
@@ -17770,23 +17790,23 @@ var icon_phone_default = { render }, Tooltip_default = /* @__PURE__ */ defineCom
|
|
|
17770
17790
|
class: "webphone__video-local wp:w-full wp:h-full wp:object-cover"
|
|
17771
17791
|
}, null, 512)])])) : createCommentVNode("", !0),
|
|
17772
17792
|
createElementVNode("div", _hoisted_4, [
|
|
17773
|
-
|
|
17774
|
-
createElementVNode("div", _hoisted_7, [(openBlock(), createElementBlock(Fragment, null, renderList(
|
|
17793
|
+
V.value ? createCommentVNode("", !0) : (openBlock(), createElementBlock("div", _hoisted_5, [createElementVNode("div", _hoisted_6, [
|
|
17794
|
+
createElementVNode("div", _hoisted_7, [(openBlock(), createElementBlock(Fragment, null, renderList(gm, (e) => createElementVNode("button", {
|
|
17775
17795
|
key: e.value,
|
|
17776
17796
|
type: "button",
|
|
17777
17797
|
role: "radio",
|
|
17778
|
-
"aria-checked":
|
|
17779
|
-
disabled:
|
|
17780
|
-
title: `${e.label} (${unref(
|
|
17781
|
-
class: normalizeClass(["webphone__channel-button wp:flex wp:items-center wp:gap-1 wp:px-2 wp:py-2 wp:rounded-lg wp:transition-colors wp:duration-200 wp:outline-none wp:focus-visible:ring-2 wp:focus-visible:ring-[var(--p-primary-color)] wp:focus-visible:ring-offset-2 wp:focus-visible:ring-offset-white wp:dark:focus-visible:ring-offset-neutral-900",
|
|
17798
|
+
"aria-checked": vm.value === e.value.toString(),
|
|
17799
|
+
disabled: q.value,
|
|
17800
|
+
title: `${e.label} (${unref(Gp)}${e.value + 1})`,
|
|
17801
|
+
class: normalizeClass(["webphone__channel-button wp:flex wp:items-center wp:gap-1 wp:px-2 wp:py-2 wp:rounded-lg wp:transition-colors wp:duration-200 wp:outline-none wp:focus-visible:ring-2 wp:focus-visible:ring-[var(--p-primary-color)] wp:focus-visible:ring-offset-2 wp:focus-visible:ring-offset-white wp:dark:focus-visible:ring-offset-neutral-900", bm(e.value) ? "wp:bg-status-hold/12 hover:wp:bg-status-hold/18" : ym(e.value) ? "wp:bg-[var(--color-red)]/12 hover:wp:bg-[var(--color-red)]/18" : vm.value === e.value.toString() ? "wp:bg-[var(--p-primary-color)]/12" : "wp:hover:bg-neutral-100 wp:dark:hover:bg-neutral-800/80"]),
|
|
17782
17802
|
"data-channel-id": e.value,
|
|
17783
|
-
"data-state":
|
|
17784
|
-
"data-call-state":
|
|
17785
|
-
onClick: (t) =>
|
|
17803
|
+
"data-state": vm.value === e.value.toString() ? "active" : "idle",
|
|
17804
|
+
"data-call-state": bm(e.value) ? "held" : ym(e.value) ? "busy" : "available",
|
|
17805
|
+
onClick: (t) => xm(e.value)
|
|
17786
17806
|
}, [createVNode(unref(icon_phone_default), {
|
|
17787
|
-
class: normalizeClass(["webphone__channel-icon wp:size-3 wp:shrink-0",
|
|
17807
|
+
class: normalizeClass(["webphone__channel-icon wp:size-3 wp:shrink-0", bm(e.value) ? "wp:text-status-hold" : ym(e.value) ? "wp:text-[var(--color-red)]" : vm.value === e.value.toString() ? "wp:text-[var(--p-primary-color)]" : "wp:text-neutral-400"]),
|
|
17788
17808
|
"stroke-width": 1.8
|
|
17789
|
-
}, null, 8, ["class"]), createElementVNode("span", { class: normalizeClass(["webphone__channel-label wp:text-[11px] wp:leading-none manrope wp:font-bold",
|
|
17809
|
+
}, null, 8, ["class"]), createElementVNode("span", { class: normalizeClass(["webphone__channel-label wp:text-[11px] wp:leading-none manrope wp:font-bold", bm(e.value) ? "wp:text-status-hold" : ym(e.value) ? "wp:text-[var(--color-red)]" : vm.value === e.value.toString() ? "wp:text-[var(--p-primary-color)]" : "wp:text-neutral-500 wp:dark:text-neutral-400"]) }, toDisplayString(e.label), 3)], 10, _hoisted_8)), 64))]),
|
|
17790
17810
|
createVNode(unref(TooltipProvider_default), null, {
|
|
17791
17811
|
default: withCtx(() => [createVNode(unref(Tooltip_default), null, {
|
|
17792
17812
|
default: withCtx(() => [createVNode(unref(TooltipTrigger_default), { "as-child": "" }, {
|
|
@@ -17795,7 +17815,7 @@ var icon_phone_default = { render }, Tooltip_default = /* @__PURE__ */ defineCom
|
|
|
17795
17815
|
size: "icon",
|
|
17796
17816
|
class: normalizeClass(["wp:h-8 wp:w-8 wp:rounded-full", Z.value ? "wp:text-primary" : ""]),
|
|
17797
17817
|
title: "Picture-in-Picture",
|
|
17798
|
-
onClick:
|
|
17818
|
+
onClick: tm
|
|
17799
17819
|
}, {
|
|
17800
17820
|
default: withCtx(() => [createVNode(unref(PictureInPicture2), { class: "wp:w-4 wp:h-4 wp:text-[var(--color-settings)]" })]),
|
|
17801
17821
|
_: 1
|
|
@@ -17824,7 +17844,7 @@ var icon_phone_default = { render }, Tooltip_default = /* @__PURE__ */ defineCom
|
|
|
17824
17844
|
_: 1
|
|
17825
17845
|
}), createVNode(unref(TooltipContent_default), { class: "wp:flex wp:items-center wp:gap-2" }, {
|
|
17826
17846
|
default: withCtx(() => [t[9] ||= createElementVNode("span", null, "Configuración", -1), createVNode(unref(Kbd_default), null, {
|
|
17827
|
-
default: withCtx(() => [createTextVNode(toDisplayString(unref(
|
|
17847
|
+
default: withCtx(() => [createTextVNode(toDisplayString(unref(Gp)) + ",", 1)]),
|
|
17828
17848
|
_: 1
|
|
17829
17849
|
})]),
|
|
17830
17850
|
_: 1
|
|
@@ -17837,9 +17857,9 @@ var icon_phone_default = { render }, Tooltip_default = /* @__PURE__ */ defineCom
|
|
|
17837
17857
|
createElementVNode("div", _hoisted_9, [(openBlock(!0), createElementBlock(Fragment, null, renderList(x.channels, (e) => withDirectives((openBlock(), createBlock(CallDisplay_default, {
|
|
17838
17858
|
key: e.id,
|
|
17839
17859
|
"channel-id": e.id,
|
|
17840
|
-
"allow-input": !
|
|
17841
|
-
"is-web-call":
|
|
17842
|
-
"is-online": unref(
|
|
17860
|
+
"allow-input": !V.value,
|
|
17861
|
+
"is-web-call": V.value,
|
|
17862
|
+
"is-online": unref(K),
|
|
17843
17863
|
contacts: o.contacts,
|
|
17844
17864
|
user: o.extension
|
|
17845
17865
|
}, null, 8, [
|
|
@@ -17856,15 +17876,15 @@ var icon_phone_default = { render }, Tooltip_default = /* @__PURE__ */ defineCom
|
|
|
17856
17876
|
}, [createVNode(KeyPad_default)], 10, _hoisted_10),
|
|
17857
17877
|
createVNode(CallActions_default, {
|
|
17858
17878
|
class: "webphone__actions",
|
|
17859
|
-
style: normalizeStyle(
|
|
17860
|
-
destination:
|
|
17879
|
+
style: normalizeStyle(q.value ? "pointer-events: none;" : void 0),
|
|
17880
|
+
destination: V.value ? o.to : void 0,
|
|
17861
17881
|
"is-video": o.mode === "video",
|
|
17862
17882
|
"on-answer": o.onAnswer,
|
|
17863
17883
|
"on-hangup": o.onHangup,
|
|
17864
17884
|
"on-reject": o.onReject,
|
|
17865
17885
|
onTransfer: t[1] ||= (e) => j.value = !0,
|
|
17866
|
-
onCompleteTransfer:
|
|
17867
|
-
onCancelTransfer:
|
|
17886
|
+
onCompleteTransfer: nm,
|
|
17887
|
+
onCancelTransfer: rm
|
|
17868
17888
|
}, null, 8, [
|
|
17869
17889
|
"style",
|
|
17870
17890
|
"destination",
|
|
@@ -17874,8 +17894,8 @@ var icon_phone_default = { render }, Tooltip_default = /* @__PURE__ */ defineCom
|
|
|
17874
17894
|
"on-reject"
|
|
17875
17895
|
])
|
|
17876
17896
|
]),
|
|
17877
|
-
|
|
17878
|
-
|
|
17897
|
+
q.value ? (openBlock(), createElementBlock("div", _hoisted_11, [...t[10] ||= [createElementVNode("span", { class: "wp:text-sm wp:font-semibold wp:text-status-disconnected" }, "Sin internet", -1)]])) : createCommentVNode("", !0),
|
|
17898
|
+
V.value ? (openBlock(), createElementBlock("div", _hoisted_12, [...t[11] ||= [createElementVNode("div", { class: "webphone__footer-label wp:text-[10px] wp:text-primary" }, "Powered By", -1), createElementVNode("div", { class: "webphone__footer-content wp:flex wp:items-center wp:gap-2" }, [createElementVNode("a", {
|
|
17879
17899
|
href: "https://www.nebula123.com",
|
|
17880
17900
|
target: "_blank",
|
|
17881
17901
|
class: "webphone__footer-link wp:text-[10px] wp:text-primary wp:hover:underline"
|
|
@@ -17889,36 +17909,36 @@ var icon_phone_default = { render }, Tooltip_default = /* @__PURE__ */ defineCom
|
|
|
17889
17909
|
visible: k.value,
|
|
17890
17910
|
"onUpdate:visible": t[3] ||= (e) => k.value = e,
|
|
17891
17911
|
contacts: o.contacts,
|
|
17892
|
-
onCall:
|
|
17912
|
+
onCall: im
|
|
17893
17913
|
}, null, 8, ["visible", "contacts"]),
|
|
17894
17914
|
createVNode(TransferDialog_default, {
|
|
17895
17915
|
visible: j.value,
|
|
17896
17916
|
"onUpdate:visible": t[4] ||= (e) => j.value = e,
|
|
17897
17917
|
contacts: o.contacts,
|
|
17898
|
-
onTransfer:
|
|
17918
|
+
onTransfer: Q
|
|
17899
17919
|
}, null, 8, ["visible", "contacts"]),
|
|
17900
17920
|
createVNode(DocumentPip_default, {
|
|
17901
17921
|
ref_key: "documentPipRef",
|
|
17902
|
-
ref:
|
|
17922
|
+
ref: J,
|
|
17903
17923
|
active: Z.value,
|
|
17904
17924
|
"onUpdate:active": t[5] ||= (e) => Z.value = e,
|
|
17905
|
-
"auto-open-on-blur":
|
|
17925
|
+
"auto-open-on-blur": Qp.value,
|
|
17906
17926
|
"is-connected": x.isConnected,
|
|
17907
17927
|
"remote-number": x.remoteNumber,
|
|
17908
|
-
"caller-name":
|
|
17909
|
-
"has-video":
|
|
17928
|
+
"caller-name": Jp.value,
|
|
17929
|
+
"has-video": G.value ?? !1,
|
|
17910
17930
|
"remote-stream": unref(E),
|
|
17911
17931
|
"local-stream": unref(D),
|
|
17912
|
-
destination:
|
|
17932
|
+
destination: V.value ? o.to : void 0,
|
|
17913
17933
|
"is-video": o.mode === "video",
|
|
17914
17934
|
"call-status": x.callStatus,
|
|
17915
17935
|
"is-muted": x.isMuted,
|
|
17916
17936
|
"is-held": x.isHeld,
|
|
17917
|
-
onTransfer:
|
|
17918
|
-
onTransferRequest:
|
|
17919
|
-
onHangup:
|
|
17920
|
-
onReject:
|
|
17921
|
-
onAnswer:
|
|
17937
|
+
onTransfer: cm,
|
|
17938
|
+
onTransferRequest: Q,
|
|
17939
|
+
onHangup: om,
|
|
17940
|
+
onReject: sm,
|
|
17941
|
+
onAnswer: am,
|
|
17922
17942
|
onToggleMute: t[6] ||= (e) => unref(S).toggleMute(),
|
|
17923
17943
|
onToggleHold: t[7] ||= (e) => unref(S).toggleHold()
|
|
17924
17944
|
}, null, 8, [
|