hanc-webrtc-widgets 2.8.3 → 2.8.4
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.
|
@@ -7389,7 +7389,7 @@ function Cu() {
|
|
|
7389
7389
|
return typeof window.RTCRtpSender < "u" && // @ts-ignore
|
|
7390
7390
|
typeof window.RTCRtpSender.prototype.createEncodedStreams < "u";
|
|
7391
7391
|
}
|
|
7392
|
-
class
|
|
7392
|
+
class MS extends wi.EventEmitter {
|
|
7393
7393
|
constructor() {
|
|
7394
7394
|
let A = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
|
|
7395
7395
|
super(), this.onKeyRatcheted = (e, t, g) => {
|
|
@@ -16952,7 +16952,7 @@ class tD extends pg {
|
|
|
16952
16952
|
});
|
|
16953
16953
|
}
|
|
16954
16954
|
}
|
|
16955
|
-
class
|
|
16955
|
+
class FS extends wi.EventEmitter {
|
|
16956
16956
|
constructor(A, e) {
|
|
16957
16957
|
let t = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {};
|
|
16958
16958
|
super(), this.options = {}, this.checkResults = /* @__PURE__ */ new Map(), this.url = A, this.token = e, this.options = t;
|
|
@@ -39807,11 +39807,11 @@ const lt = {
|
|
|
39807
39807
|
// Warm neon orange
|
|
39808
39808
|
}
|
|
39809
39809
|
};
|
|
39810
|
-
function
|
|
39810
|
+
function US(i, A = "dark") {
|
|
39811
39811
|
const e = A === "dark" ? lt : xt;
|
|
39812
39812
|
return e[i] || e[Object.keys(e)[0]];
|
|
39813
39813
|
}
|
|
39814
|
-
function
|
|
39814
|
+
function LS(i = "dark") {
|
|
39815
39815
|
return Object.keys(i === "dark" ? lt : xt);
|
|
39816
39816
|
}
|
|
39817
39817
|
const SC = {
|
|
@@ -39959,18 +39959,18 @@ const SC = {
|
|
|
39959
39959
|
idleGlowMultiplier: 1.3
|
|
39960
39960
|
}
|
|
39961
39961
|
}
|
|
39962
|
-
},
|
|
39962
|
+
}, vS = Object.fromEntries(
|
|
39963
39963
|
Object.entries(SC).map(([i, A]) => [i, A.dark])
|
|
39964
|
-
),
|
|
39964
|
+
), KS = Object.fromEntries(
|
|
39965
39965
|
Object.entries(SC).map(([i, A]) => [i, A.light])
|
|
39966
39966
|
);
|
|
39967
39967
|
function jC(i) {
|
|
39968
39968
|
return (SC[i] || SC.default).dark;
|
|
39969
39969
|
}
|
|
39970
|
-
function
|
|
39970
|
+
function JS() {
|
|
39971
39971
|
return Object.keys(SC);
|
|
39972
39972
|
}
|
|
39973
|
-
function
|
|
39973
|
+
function YS(i, A) {
|
|
39974
39974
|
const e = jC(A);
|
|
39975
39975
|
i.orbColors = e.colors, i.glowIntensity = e.glowIntensity, i.idleGlowMultiplier = e.idleGlowMultiplier;
|
|
39976
39976
|
}
|
|
@@ -40052,7 +40052,7 @@ function Un(i) {
|
|
|
40052
40052
|
const A = window.location.hostname;
|
|
40053
40053
|
return ky.some((t) => A === t || A.endsWith(`.${t}`)) || i.allow_all_domains || !i.allowed_domains || i.allowed_domains.length === 0 ? !0 : i.allowed_domains.some((t) => A === t || A.endsWith(`.${t}`));
|
|
40054
40054
|
}
|
|
40055
|
-
function
|
|
40055
|
+
function TS(i) {
|
|
40056
40056
|
i ? an.delete(i) : an.clear();
|
|
40057
40057
|
}
|
|
40058
40058
|
var Ry = Object.defineProperty, Gy = Object.getOwnPropertyDescriptor, WC = (i, A, e, t) => {
|
|
@@ -46239,7 +46239,38 @@ var DS = Object.defineProperty, pS = Object.getOwnPropertyDescriptor, wt = (i, A
|
|
|
46239
46239
|
(C = i[I]) && (g = (t ? C(A, e, g) : C(g)) || g);
|
|
46240
46240
|
return t && g && DS(A, e, g), g;
|
|
46241
46241
|
};
|
|
46242
|
-
const mE = 5e3
|
|
46242
|
+
const mE = 5e3, _S = {
|
|
46243
|
+
AT: "664 123 4567",
|
|
46244
|
+
DE: "151 2345 6789",
|
|
46245
|
+
CH: "78 123 45 67",
|
|
46246
|
+
FR: "6 12 34 56 78",
|
|
46247
|
+
IT: "312 345 6789",
|
|
46248
|
+
ES: "612 34 56 78",
|
|
46249
|
+
PT: "912 345 678",
|
|
46250
|
+
NL: "6 12345678",
|
|
46251
|
+
BE: "470 12 34 56",
|
|
46252
|
+
PL: "512 345 678",
|
|
46253
|
+
CZ: "601 123 456",
|
|
46254
|
+
RO: "712 345 678",
|
|
46255
|
+
BG: "88 123 4567",
|
|
46256
|
+
GR: "691 234 5678",
|
|
46257
|
+
HR: "91 234 5678",
|
|
46258
|
+
SE: "70 123 45 67",
|
|
46259
|
+
DK: "20 12 34 56",
|
|
46260
|
+
FI: "41 234 5678",
|
|
46261
|
+
EE: "5123 4567",
|
|
46262
|
+
LV: "21 234 567",
|
|
46263
|
+
LT: "612 34567",
|
|
46264
|
+
IE: "85 012 3456",
|
|
46265
|
+
LU: "628 123 456",
|
|
46266
|
+
SK: "912 345 678",
|
|
46267
|
+
MT: "9696 1234",
|
|
46268
|
+
CY: "96 123456",
|
|
46269
|
+
HU: "20 123 4567",
|
|
46270
|
+
GB: "7400 123456",
|
|
46271
|
+
US: "212 555 0123",
|
|
46272
|
+
CA: "416 555 0123"
|
|
46273
|
+
};
|
|
46243
46274
|
let ot = class extends ti {
|
|
46244
46275
|
constructor() {
|
|
46245
46276
|
super(...arguments), this.agentId = "", this.apiBaseUrl = mi, this.skipFetch = !1, this.manifestOverride = null, this.theme = "", this.view = { kind: "loading" }, this.manifest = null, this.selectedCountry = null, this.phoneRaw = "", this.phoneError = "", this.apiError = null, this.pickerOpen = !1, this.pickerSearch = "", this.pollAbort = null, this.pollTimer = null, this.lastFocusedBeforeOpen = null, this.onDocumentKey = (i) => {
|
|
@@ -46283,9 +46314,16 @@ let ot = class extends ti {
|
|
|
46283
46314
|
}
|
|
46284
46315
|
}
|
|
46285
46316
|
adoptManifest(i) {
|
|
46286
|
-
|
|
46287
|
-
|
|
46288
|
-
|
|
46317
|
+
const A = {
|
|
46318
|
+
...i,
|
|
46319
|
+
allowed_countries: i.allowed_countries.map((I) => ({
|
|
46320
|
+
...I,
|
|
46321
|
+
example: I.example || _S[I.code] || ""
|
|
46322
|
+
}))
|
|
46323
|
+
};
|
|
46324
|
+
this.manifest = A;
|
|
46325
|
+
const e = A.allowed_countries.filter((I) => I.enabled), g = this.detectCountryFromLocale(e) ?? e.find((I) => I.code === "AT") ?? e[0];
|
|
46326
|
+
this.selectedCountry = (g == null ? void 0 : g.code) ?? null, this.view = { kind: "closed" };
|
|
46289
46327
|
}
|
|
46290
46328
|
detectCountryFromLocale(i) {
|
|
46291
46329
|
var g;
|
|
@@ -46524,7 +46562,7 @@ let ot = class extends ti {
|
|
|
46524
46562
|
type="tel"
|
|
46525
46563
|
autocomplete="tel"
|
|
46526
46564
|
inputmode="tel"
|
|
46527
|
-
placeholder=${(e == null ? void 0 : e.
|
|
46565
|
+
placeholder=${(e == null ? void 0 : e.example) ?? ""}
|
|
46528
46566
|
.value=${this.phoneRaw}
|
|
46529
46567
|
?disabled=${t}
|
|
46530
46568
|
@input=${(I) => this.onPhoneInput(I.target.value)}
|
|
@@ -46554,12 +46592,9 @@ let ot = class extends ti {
|
|
|
46554
46592
|
`;
|
|
46555
46593
|
}
|
|
46556
46594
|
renderCountryPicker(i, A) {
|
|
46557
|
-
const e = this.manifest.allowed_countries, t = this.pickerSearch ? e.filter((
|
|
46558
|
-
|
|
46559
|
-
|
|
46560
|
-
}) : e, g = [
|
|
46561
|
-
...t.filter((I) => I.enabled),
|
|
46562
|
-
...t.filter((I) => !I.enabled)
|
|
46595
|
+
const e = this.manifest.allowed_countries, t = this.pickerSearch.trim().toLowerCase(), g = t.replace(/\D/g, ""), I = t ? e.filter((o) => !!(o.name.toLowerCase().includes(t) || o.code.toLowerCase().includes(t) || g && o.dial_code.replace(/\D/g, "").startsWith(g))) : e, C = [
|
|
46596
|
+
...I.filter((o) => o.enabled),
|
|
46597
|
+
...I.filter((o) => !o.enabled)
|
|
46563
46598
|
];
|
|
46564
46599
|
return pA`
|
|
46565
46600
|
<div class="picker">
|
|
@@ -46568,12 +46603,12 @@ let ot = class extends ti {
|
|
|
46568
46603
|
type="button"
|
|
46569
46604
|
aria-haspopup="listbox"
|
|
46570
46605
|
aria-expanded=${this.pickerOpen}
|
|
46571
|
-
@click=${(
|
|
46572
|
-
|
|
46573
|
-
const
|
|
46606
|
+
@click=${(o) => {
|
|
46607
|
+
o.preventDefault(), this.pickerOpen = !this.pickerOpen, this.pickerOpen && setTimeout(() => {
|
|
46608
|
+
const n = this.renderRoot.querySelector(
|
|
46574
46609
|
".picker-search"
|
|
46575
46610
|
);
|
|
46576
|
-
|
|
46611
|
+
n == null || n.focus();
|
|
46577
46612
|
}, 30);
|
|
46578
46613
|
}}
|
|
46579
46614
|
>
|
|
@@ -46589,25 +46624,25 @@ let ot = class extends ti {
|
|
|
46589
46624
|
type="text"
|
|
46590
46625
|
placeholder="Search country or +code"
|
|
46591
46626
|
.value=${this.pickerSearch}
|
|
46592
|
-
@input=${(
|
|
46627
|
+
@input=${(o) => this.pickerSearch = o.target.value}
|
|
46593
46628
|
/>
|
|
46594
46629
|
<div class="picker-list">
|
|
46595
|
-
${
|
|
46596
|
-
(
|
|
46630
|
+
${C.map(
|
|
46631
|
+
(o) => pA`
|
|
46597
46632
|
<button
|
|
46598
46633
|
type="button"
|
|
46599
46634
|
role="option"
|
|
46600
|
-
aria-disabled=${!
|
|
46601
|
-
aria-selected=${this.selectedCountry ===
|
|
46602
|
-
class="picker-item ${
|
|
46635
|
+
aria-disabled=${!o.enabled}
|
|
46636
|
+
aria-selected=${this.selectedCountry === o.code}
|
|
46637
|
+
class="picker-item ${o.enabled ? "" : "disabled"}"
|
|
46603
46638
|
@click=${() => {
|
|
46604
|
-
|
|
46639
|
+
o.enabled && this.selectCountry(o.code);
|
|
46605
46640
|
}}
|
|
46606
46641
|
>
|
|
46607
|
-
<span class="flag">${
|
|
46608
|
-
<span class="name">${
|
|
46609
|
-
<span class="dial">${
|
|
46610
|
-
${
|
|
46642
|
+
<span class="flag">${o.flag}</span>
|
|
46643
|
+
<span class="name">${o.name}</span>
|
|
46644
|
+
<span class="dial">${o.dial_code}</span>
|
|
46645
|
+
${o.enabled ? Ee : pA`<span class="badge">coming soon</span>`}
|
|
46611
46646
|
</button>
|
|
46612
46647
|
`
|
|
46613
46648
|
)}
|
|
@@ -46852,12 +46887,15 @@ ot.styles = $g`
|
|
|
46852
46887
|
|
|
46853
46888
|
/* ---------- Card ---------- */
|
|
46854
46889
|
.card {
|
|
46855
|
-
width:
|
|
46856
|
-
max-height:
|
|
46890
|
+
width: 360px;
|
|
46891
|
+
max-height: 560px;
|
|
46857
46892
|
background: var(--cb-bg);
|
|
46858
46893
|
border-radius: var(--cb-radius);
|
|
46859
46894
|
box-shadow: var(--cb-shadow);
|
|
46860
|
-
|
|
46895
|
+
/* visible so the country-picker popover can extend upward beyond the
|
|
46896
|
+
* card's body without being clipped. The card itself still keeps its
|
|
46897
|
+
* rounded corners — they are just border-radius, not a clip mask. */
|
|
46898
|
+
overflow: visible;
|
|
46861
46899
|
display: flex;
|
|
46862
46900
|
flex-direction: column;
|
|
46863
46901
|
animation: card-in 180ms cubic-bezier(0.16, 1, 0.3, 1);
|
|
@@ -46896,7 +46934,8 @@ ot.styles = $g`
|
|
|
46896
46934
|
}
|
|
46897
46935
|
.card-body {
|
|
46898
46936
|
padding: 4px 20px 20px;
|
|
46899
|
-
|
|
46937
|
+
/* visible so the country-picker popover isn't clipped on top */
|
|
46938
|
+
overflow: visible;
|
|
46900
46939
|
}
|
|
46901
46940
|
|
|
46902
46941
|
/* ---------- Form ---------- */
|
|
@@ -46942,25 +46981,27 @@ ot.styles = $g`
|
|
|
46942
46981
|
}
|
|
46943
46982
|
.picker-panel {
|
|
46944
46983
|
position: absolute;
|
|
46945
|
-
|
|
46984
|
+
bottom: calc(100% + 6px);
|
|
46946
46985
|
left: 0;
|
|
46947
|
-
width:
|
|
46948
|
-
max-height:
|
|
46986
|
+
width: 320px;
|
|
46987
|
+
max-height: 380px;
|
|
46949
46988
|
background: var(--cb-bg);
|
|
46950
46989
|
border: 1px solid var(--cb-border);
|
|
46951
46990
|
border-radius: 10px;
|
|
46952
46991
|
box-shadow: var(--cb-shadow);
|
|
46953
|
-
z-index:
|
|
46992
|
+
z-index: 10;
|
|
46954
46993
|
display: flex;
|
|
46955
46994
|
flex-direction: column;
|
|
46995
|
+
overflow: hidden;
|
|
46956
46996
|
}
|
|
46957
46997
|
.picker-search {
|
|
46958
|
-
margin:
|
|
46959
|
-
padding:
|
|
46998
|
+
margin: 10px 10px 6px;
|
|
46999
|
+
padding: 8px 12px;
|
|
46960
47000
|
border: 1px solid var(--cb-border);
|
|
46961
|
-
border-radius:
|
|
46962
|
-
font-size:
|
|
47001
|
+
border-radius: 8px;
|
|
47002
|
+
font-size: 14px;
|
|
46963
47003
|
outline: none;
|
|
47004
|
+
flex: 0 0 auto;
|
|
46964
47005
|
}
|
|
46965
47006
|
.picker-search:focus {
|
|
46966
47007
|
border-color: var(--cb-primary);
|
|
@@ -46968,18 +47009,20 @@ ot.styles = $g`
|
|
|
46968
47009
|
.picker-list {
|
|
46969
47010
|
overflow-y: auto;
|
|
46970
47011
|
padding-bottom: 6px;
|
|
47012
|
+
flex: 1 1 auto;
|
|
47013
|
+
min-height: 0;
|
|
46971
47014
|
}
|
|
46972
47015
|
.picker-item {
|
|
46973
47016
|
display: grid;
|
|
46974
|
-
grid-template-columns:
|
|
46975
|
-
gap:
|
|
47017
|
+
grid-template-columns: 26px 1fr auto auto;
|
|
47018
|
+
gap: 10px;
|
|
46976
47019
|
align-items: center;
|
|
46977
47020
|
width: 100%;
|
|
46978
|
-
padding:
|
|
47021
|
+
padding: 10px 14px;
|
|
46979
47022
|
border: none;
|
|
46980
47023
|
background: transparent;
|
|
46981
47024
|
cursor: pointer;
|
|
46982
|
-
font-size:
|
|
47025
|
+
font-size: 14px;
|
|
46983
47026
|
color: var(--cb-fg);
|
|
46984
47027
|
text-align: left;
|
|
46985
47028
|
}
|
|
@@ -47150,17 +47193,17 @@ export {
|
|
|
47150
47193
|
$A as PillCall,
|
|
47151
47194
|
XA as PillFloatingCall,
|
|
47152
47195
|
kn as SoundManager,
|
|
47153
|
-
|
|
47154
|
-
|
|
47196
|
+
YS as applyTheme,
|
|
47197
|
+
TS as clearConfigCache,
|
|
47155
47198
|
lt as darkPresets,
|
|
47156
|
-
|
|
47199
|
+
vS as darkThemes,
|
|
47157
47200
|
Fn as fetchWidgetConfig,
|
|
47158
|
-
|
|
47159
|
-
|
|
47201
|
+
US as getColorPreset,
|
|
47202
|
+
LS as getPresetNames,
|
|
47160
47203
|
jC as getTheme,
|
|
47161
|
-
|
|
47204
|
+
JS as getThemeNames,
|
|
47162
47205
|
Un as isDomainAllowed,
|
|
47163
47206
|
xt as lightPresets,
|
|
47164
|
-
|
|
47207
|
+
KS as lightThemes,
|
|
47165
47208
|
SC as themes
|
|
47166
47209
|
};
|