@coventia/softphone 0.3.0 → 0.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{call-CaPDWVk3.d.cts → call-C6YpT6uR.d.cts} +64 -1
- package/dist/{call-CaPDWVk3.d.ts → call-C6YpT6uR.d.ts} +64 -1
- package/dist/chunk-5E5OEXS2.js +14 -0
- package/dist/chunk-5E5OEXS2.js.map +1 -0
- package/dist/element/index.d.ts +56 -0
- package/dist/element/index.js +1064 -488
- package/dist/element/index.js.map +1 -1
- package/dist/{engine-CU2rEo3g.d.cts → engine-CDdaSojx.d.cts} +1 -1
- package/dist/{engine-BgBsIcEa.d.ts → engine-DPft99Wj.d.ts} +1 -1
- package/dist/index.cjs +97 -7
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +16 -6
- package/dist/index.d.ts +16 -6
- package/dist/index.js +8 -2
- package/dist/index.js.map +1 -1
- package/dist/react/index.d.cts +2 -2
- package/dist/react/index.d.ts +2 -2
- package/dist/{softphone-dZMkW8V1.d.cts → softphone-CY5d2WWY.d.cts} +3 -1
- package/dist/{softphone-DEt0TtQw.d.ts → softphone-DXgmTyrX.d.ts} +3 -1
- package/dist/softphone.css +254 -23
- package/dist/{sources-M3GYMS6V.js → sources-ONYQW733.js} +76 -8
- package/dist/sources-ONYQW733.js.map +1 -0
- package/dist/testing/index.d.cts +2 -2
- package/dist/testing/index.d.ts +2 -2
- package/dist/ui/index.cjs +578 -18
- package/dist/ui/index.cjs.map +1 -1
- package/dist/ui/index.d.cts +2 -2
- package/dist/ui/index.d.ts +2 -2
- package/dist/ui/index.js +573 -18
- package/dist/ui/index.js.map +1 -1
- package/dist/zadarma/index.d.cts +2 -2
- package/dist/zadarma/index.d.ts +2 -2
- package/package.json +1 -1
- package/dist/sources-M3GYMS6V.js.map +0 -1
package/dist/element/index.js
CHANGED
|
@@ -6931,7 +6931,7 @@ var require_jsx_runtime = __commonJS({
|
|
|
6931
6931
|
});
|
|
6932
6932
|
|
|
6933
6933
|
// src/element/index.ts
|
|
6934
|
-
var
|
|
6934
|
+
var import_react46 = __toESM(require_react(), 1);
|
|
6935
6935
|
var import_client = __toESM(require_client(), 1);
|
|
6936
6936
|
|
|
6937
6937
|
// src/react/context.tsx
|
|
@@ -6950,7 +6950,7 @@ function useSoftphone() {
|
|
|
6950
6950
|
}
|
|
6951
6951
|
|
|
6952
6952
|
// src/ui/SoftphoneWidget.tsx
|
|
6953
|
-
var
|
|
6953
|
+
var import_react44 = __toESM(require_react(), 1);
|
|
6954
6954
|
|
|
6955
6955
|
// ../../node_modules/lucide-react/dist/esm/createLucideIcon.js
|
|
6956
6956
|
var import_react3 = __toESM(require_react());
|
|
@@ -7446,7 +7446,7 @@ function useDevices() {
|
|
|
7446
7446
|
}
|
|
7447
7447
|
|
|
7448
7448
|
// src/ui/views/Dialpad.tsx
|
|
7449
|
-
var
|
|
7449
|
+
var import_react11 = __toESM(require_react(), 1);
|
|
7450
7450
|
|
|
7451
7451
|
// src/ui/dialing/CountryPicker.tsx
|
|
7452
7452
|
var import_react5 = __toESM(require_react(), 1);
|
|
@@ -7456,6 +7456,36 @@ var PACKED = "AC247 AD376 AE971 AF93 AG1 AI1 AL355 AM374 AO244 AR54 AS1 AT43 AU6
|
|
|
7456
7456
|
var DIAL_CODES = new Map(
|
|
7457
7457
|
PACKED.split(" ").map((token) => [token.slice(0, 2), Number(token.slice(2))])
|
|
7458
7458
|
);
|
|
7459
|
+
var REGIONS_BY_CODE = (() => {
|
|
7460
|
+
const map = /* @__PURE__ */ new Map();
|
|
7461
|
+
for (const [region, code] of DIAL_CODES) map.set(code, [...map.get(code) ?? [], region]);
|
|
7462
|
+
return map;
|
|
7463
|
+
})();
|
|
7464
|
+
var MAIN_REGION = {
|
|
7465
|
+
1: "US",
|
|
7466
|
+
7: "RU",
|
|
7467
|
+
39: "IT",
|
|
7468
|
+
44: "GB",
|
|
7469
|
+
47: "NO",
|
|
7470
|
+
61: "AU",
|
|
7471
|
+
212: "MA",
|
|
7472
|
+
262: "RE",
|
|
7473
|
+
290: "SH",
|
|
7474
|
+
358: "FI",
|
|
7475
|
+
590: "GP",
|
|
7476
|
+
599: "CW"
|
|
7477
|
+
};
|
|
7478
|
+
function regionOfInternational(typed) {
|
|
7479
|
+
const text = String(typed ?? "").trim();
|
|
7480
|
+
if (!text.startsWith("+")) return null;
|
|
7481
|
+
const digits = text.slice(1).replace(/\D/g, "");
|
|
7482
|
+
for (let length = 1; length <= Math.min(3, digits.length); length++) {
|
|
7483
|
+
const code = Number(digits.slice(0, length));
|
|
7484
|
+
const regions = REGIONS_BY_CODE.get(code);
|
|
7485
|
+
if (regions) return MAIN_REGION[code] ?? regions[0] ?? null;
|
|
7486
|
+
}
|
|
7487
|
+
return null;
|
|
7488
|
+
}
|
|
7459
7489
|
var DEFAULT_COUNTRY = "ES";
|
|
7460
7490
|
var REGION_NAMES = (() => {
|
|
7461
7491
|
try {
|
|
@@ -7510,12 +7540,16 @@ function CountryMark({ code }) {
|
|
|
7510
7540
|
}
|
|
7511
7541
|
function CountryPicker({
|
|
7512
7542
|
value,
|
|
7513
|
-
onChange
|
|
7543
|
+
onChange,
|
|
7544
|
+
fromNumber = false
|
|
7514
7545
|
}) {
|
|
7515
7546
|
const [open, setOpen] = (0, import_react5.useState)(false);
|
|
7516
7547
|
const [query, setQuery] = (0, import_react5.useState)("");
|
|
7517
7548
|
const rootRef = (0, import_react5.useRef)(null);
|
|
7518
7549
|
const inputRef = (0, import_react5.useRef)(null);
|
|
7550
|
+
(0, import_react5.useEffect)(() => {
|
|
7551
|
+
if (fromNumber) setOpen(false);
|
|
7552
|
+
}, [fromNumber]);
|
|
7519
7553
|
const results = (0, import_react5.useMemo)(() => {
|
|
7520
7554
|
const q = query.trim().toLowerCase().replace(/^\+/, "");
|
|
7521
7555
|
if (!q) return COUNTRIES;
|
|
@@ -7544,6 +7578,12 @@ function CountryPicker({
|
|
|
7544
7578
|
else setQuery("");
|
|
7545
7579
|
}, [open]);
|
|
7546
7580
|
const dial = DIAL_CODES.get(value);
|
|
7581
|
+
if (fromNumber) {
|
|
7582
|
+
return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("div", { className: "cv-cp", ref: rootRef, children: /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("span", { className: "cv-cp-chip", "data-from-number": true, title: "El prefijo viene del n\xFAmero marcado", part: "country-chip", children: [
|
|
7583
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)(CountryMark, { code: value || "+" }),
|
|
7584
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("span", { className: "cv-sr-only", children: dial ? `Prefijo del n\xFAmero marcado: ${countryName(value)} (+${dial})` : "Prefijo del n\xFAmero marcado" })
|
|
7585
|
+
] }) });
|
|
7586
|
+
}
|
|
7547
7587
|
return /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("div", { className: "cv-cp", ref: rootRef, children: [
|
|
7548
7588
|
/* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(
|
|
7549
7589
|
"button",
|
|
@@ -8114,27 +8154,413 @@ function playRingback() {
|
|
|
8114
8154
|
};
|
|
8115
8155
|
}
|
|
8116
8156
|
|
|
8117
|
-
// src/ui/
|
|
8157
|
+
// src/ui/outbound/OutboundNumberPicker.tsx
|
|
8158
|
+
var import_react9 = __toESM(require_react(), 1);
|
|
8159
|
+
|
|
8160
|
+
// src/ui/outbound/outbound-change.ts
|
|
8161
|
+
var import_react8 = __toESM(require_react(), 1);
|
|
8162
|
+
|
|
8163
|
+
// src/core/outbound-numbers.ts
|
|
8164
|
+
function isOutboundNumberRefused(value) {
|
|
8165
|
+
const refusal = value?.refusal;
|
|
8166
|
+
return value instanceof Error && !!refusal && (refusal.reason === "platform" || refusal.reason === "user") && typeof refusal.retryAfterSeconds === "number";
|
|
8167
|
+
}
|
|
8168
|
+
|
|
8169
|
+
// src/ui/outbound/outbound-number-store.ts
|
|
8170
|
+
var import_react7 = __toESM(require_react(), 1);
|
|
8171
|
+
var stores = /* @__PURE__ */ new WeakMap();
|
|
8172
|
+
function outboundNumberStore(softphone) {
|
|
8173
|
+
const source = softphone.sources?.outboundNumbers;
|
|
8174
|
+
if (!source) return null;
|
|
8175
|
+
let store = stores.get(softphone);
|
|
8176
|
+
if (!store) {
|
|
8177
|
+
store = createOutboundNumberStore(source);
|
|
8178
|
+
stores.set(softphone, store);
|
|
8179
|
+
}
|
|
8180
|
+
return store;
|
|
8181
|
+
}
|
|
8182
|
+
function createOutboundNumberStore(source) {
|
|
8183
|
+
let settings = null;
|
|
8184
|
+
let inFlight = null;
|
|
8185
|
+
const listeners = /* @__PURE__ */ new Set();
|
|
8186
|
+
const apply = (next) => {
|
|
8187
|
+
settings = next;
|
|
8188
|
+
for (const l of listeners) l();
|
|
8189
|
+
};
|
|
8190
|
+
return {
|
|
8191
|
+
getSettings: () => settings,
|
|
8192
|
+
refresh() {
|
|
8193
|
+
inFlight ??= (async () => {
|
|
8194
|
+
if (!settings && source.cached) {
|
|
8195
|
+
const early = await source.cached().catch(() => null);
|
|
8196
|
+
if (early && !settings) apply(early);
|
|
8197
|
+
}
|
|
8198
|
+
try {
|
|
8199
|
+
apply(await source.get());
|
|
8200
|
+
} catch (error) {
|
|
8201
|
+
console.warn("[softphone] outbound numbers could not be loaded; keeping the previous ones", error);
|
|
8202
|
+
} finally {
|
|
8203
|
+
inFlight = null;
|
|
8204
|
+
}
|
|
8205
|
+
})();
|
|
8206
|
+
return inFlight;
|
|
8207
|
+
},
|
|
8208
|
+
async setMine(id) {
|
|
8209
|
+
apply(await source.setMine(id));
|
|
8210
|
+
},
|
|
8211
|
+
subscribe(listener) {
|
|
8212
|
+
listeners.add(listener);
|
|
8213
|
+
return () => listeners.delete(listener);
|
|
8214
|
+
}
|
|
8215
|
+
};
|
|
8216
|
+
}
|
|
8217
|
+
var noSubscribe = () => () => {
|
|
8218
|
+
};
|
|
8219
|
+
var noSettings = () => null;
|
|
8220
|
+
function useOutboundNumbers(store) {
|
|
8221
|
+
const settings = (0, import_react7.useSyncExternalStore)(store?.subscribe ?? noSubscribe, store?.getSettings ?? noSettings);
|
|
8222
|
+
const [failed, setFailed] = (0, import_react7.useState)(false);
|
|
8223
|
+
const load = (0, import_react7.useCallback)(() => {
|
|
8224
|
+
if (!store) return () => {
|
|
8225
|
+
};
|
|
8226
|
+
let live = true;
|
|
8227
|
+
setFailed(false);
|
|
8228
|
+
void store.refresh().then(() => {
|
|
8229
|
+
if (live) setFailed(store.getSettings() === null);
|
|
8230
|
+
});
|
|
8231
|
+
return () => {
|
|
8232
|
+
live = false;
|
|
8233
|
+
};
|
|
8234
|
+
}, [store]);
|
|
8235
|
+
(0, import_react7.useEffect)(load, [load]);
|
|
8236
|
+
return { settings, failed, retry: load };
|
|
8237
|
+
}
|
|
8238
|
+
function useKnownOutboundNumbers(store) {
|
|
8239
|
+
return (0, import_react7.useSyncExternalStore)(store?.subscribe ?? noSubscribe, store?.getSettings ?? noSettings);
|
|
8240
|
+
}
|
|
8241
|
+
function useCountdown(until) {
|
|
8242
|
+
const [, setTick] = (0, import_react7.useState)(0);
|
|
8243
|
+
(0, import_react7.useEffect)(() => {
|
|
8244
|
+
if (!until) return void 0;
|
|
8245
|
+
const timer = setInterval(() => {
|
|
8246
|
+
setTick((n) => n + 1);
|
|
8247
|
+
if (secondsLeft(until) === 0) clearInterval(timer);
|
|
8248
|
+
}, 1e3);
|
|
8249
|
+
return () => clearInterval(timer);
|
|
8250
|
+
}, [until]);
|
|
8251
|
+
return secondsLeft(until);
|
|
8252
|
+
}
|
|
8253
|
+
function secondsLeft(until) {
|
|
8254
|
+
return until ? Math.max(0, Math.ceil((until - Date.now()) / 1e3)) : 0;
|
|
8255
|
+
}
|
|
8256
|
+
function numberName(n, format = formatIntl) {
|
|
8257
|
+
if (!n) return "N\xFAmero de la organizaci\xF3n";
|
|
8258
|
+
return n.label || format(`+${n.number}`);
|
|
8259
|
+
}
|
|
8260
|
+
function effectiveNumber(settings) {
|
|
8261
|
+
return settings?.numbers.find((n) => n.id === settings.effective);
|
|
8262
|
+
}
|
|
8263
|
+
|
|
8264
|
+
// src/ui/outbound/outbound-change.ts
|
|
8265
|
+
var KIND_TAG = {
|
|
8266
|
+
mobile: { tag: "M\xF3vil", hint: "No usar para atenci\xF3n al cliente ni para llamadas comerciales no solicitadas." },
|
|
8267
|
+
commercial: { tag: "Comercial (400)", hint: "Solo para llamadas comerciales. No recibe llamadas." }
|
|
8268
|
+
};
|
|
8269
|
+
function noticeText(situation, seconds, current) {
|
|
8270
|
+
switch (situation) {
|
|
8271
|
+
case "platform":
|
|
8272
|
+
return `El cambio de n\xFAmero de salida no est\xE1 disponible temporalmente. Vuelve a intentarlo en ${seconds} s. Hasta entonces, tus llamadas seguir\xE1n saliendo desde ${current}.`;
|
|
8273
|
+
case "user":
|
|
8274
|
+
return `Acabas de cambiar el n\xFAmero de salida. Podr\xE1s cambiarlo de nuevo en ${seconds} s. Hasta entonces, tus llamadas saldr\xE1n desde ${current}.`;
|
|
8275
|
+
case "wait":
|
|
8276
|
+
return `Podr\xE1s cambiar el n\xFAmero de salida en ${seconds} s.`;
|
|
8277
|
+
case "pending":
|
|
8278
|
+
return seconds > 0 ? `Tu n\xFAmero de salida todav\xEDa no se ha aplicado. Podr\xE1s volver a elegirlo en ${seconds} s.` : "Tu n\xFAmero de salida todav\xEDa no se ha aplicado. Vuelve a elegirlo para aplicarlo.";
|
|
8279
|
+
}
|
|
8280
|
+
}
|
|
8281
|
+
function useOutboundNumberChange(store, settings, current) {
|
|
8282
|
+
const [busy, setBusy] = (0, import_react8.useState)(false);
|
|
8283
|
+
const [notice, setNotice] = (0, import_react8.useState)(null);
|
|
8284
|
+
const [waitUntil, setWaitUntil] = (0, import_react8.useState)(null);
|
|
8285
|
+
(0, import_react8.useEffect)(() => {
|
|
8286
|
+
const s = settings?.changeAvailableInSeconds ?? 0;
|
|
8287
|
+
setWaitUntil(s > 0 ? Date.now() + s * 1e3 : null);
|
|
8288
|
+
}, [settings]);
|
|
8289
|
+
const refusedUntil = notice?.kind === "refused" ? notice.until : null;
|
|
8290
|
+
const blockedFor = useCountdown(refusedUntil ?? waitUntil);
|
|
8291
|
+
(0, import_react8.useEffect)(() => {
|
|
8292
|
+
if (notice?.kind === "refused" && blockedFor === 0) setNotice(null);
|
|
8293
|
+
}, [notice, blockedFor]);
|
|
8294
|
+
const locked = busy || blockedFor > 0;
|
|
8295
|
+
const choose = async (id) => {
|
|
8296
|
+
if (!store || !settings || locked) return false;
|
|
8297
|
+
if (id === settings.mine) return true;
|
|
8298
|
+
setBusy(true);
|
|
8299
|
+
setNotice(null);
|
|
8300
|
+
try {
|
|
8301
|
+
await store.setMine(id);
|
|
8302
|
+
return true;
|
|
8303
|
+
} catch (error) {
|
|
8304
|
+
setNotice(
|
|
8305
|
+
isOutboundNumberRefused(error) ? { kind: "refused", reason: error.refusal.reason, until: Date.now() + error.refusal.retryAfterSeconds * 1e3 } : { kind: "error", text: errorText(error) }
|
|
8306
|
+
);
|
|
8307
|
+
return false;
|
|
8308
|
+
} finally {
|
|
8309
|
+
setBusy(false);
|
|
8310
|
+
}
|
|
8311
|
+
};
|
|
8312
|
+
return {
|
|
8313
|
+
busy,
|
|
8314
|
+
locked,
|
|
8315
|
+
choose,
|
|
8316
|
+
/** What to say about the choice right now, if anything. */
|
|
8317
|
+
message: settings ? currentMessage(notice, settings.state, blockedFor, current) : null,
|
|
8318
|
+
/** The message is an error (the change failed), not information (wait, pending). */
|
|
8319
|
+
isError: notice?.kind === "error"
|
|
8320
|
+
};
|
|
8321
|
+
}
|
|
8322
|
+
function currentMessage(notice, state, blockedFor, current) {
|
|
8323
|
+
if (notice?.kind === "refused") return blockedFor > 0 ? noticeText(notice.reason, blockedFor, current) : null;
|
|
8324
|
+
if (notice?.kind === "error") return notice.text;
|
|
8325
|
+
if (state === "pending" || state === "failed") return noticeText("pending", blockedFor, current);
|
|
8326
|
+
return blockedFor > 0 ? noticeText("wait", blockedFor, current) : null;
|
|
8327
|
+
}
|
|
8328
|
+
function errorText(error) {
|
|
8329
|
+
const message = error instanceof Error ? error.message : "";
|
|
8330
|
+
return message && !/HTTP \d+/.test(message) ? message : "No se ha podido cambiar el n\xFAmero de salida. Int\xE9ntalo de nuevo.";
|
|
8331
|
+
}
|
|
8332
|
+
|
|
8333
|
+
// src/ui/outbound/OutboundNumberPicker.tsx
|
|
8118
8334
|
var import_jsx_runtime3 = __toESM(require_jsx_runtime(), 1);
|
|
8335
|
+
var CALLOUT_MS = 6e3;
|
|
8336
|
+
function OutboundNumberPicker({ onBusyChange }) {
|
|
8337
|
+
const softphone = useSoftphone();
|
|
8338
|
+
const store = outboundNumberStore(softphone);
|
|
8339
|
+
const { settings } = useOutboundNumbers(store);
|
|
8340
|
+
const formatIntl2 = useIntlFormatter();
|
|
8341
|
+
const current = settings ? numberName(effectiveNumber(settings), formatIntl2) : "";
|
|
8342
|
+
const { busy, locked, choose: apply, message, isError } = useOutboundNumberChange(store, settings, current);
|
|
8343
|
+
const [open, setOpen] = (0, import_react9.useState)(false);
|
|
8344
|
+
const [applying, setApplying] = (0, import_react9.useState)(void 0);
|
|
8345
|
+
const [callout, setCallout] = (0, import_react9.useState)(false);
|
|
8346
|
+
const rootRef = (0, import_react9.useRef)(null);
|
|
8347
|
+
const chipRef = (0, import_react9.useRef)(null);
|
|
8348
|
+
const keys = useListKeyboard(open);
|
|
8349
|
+
(0, import_react9.useEffect)(() => onBusyChange?.(busy), [busy, onBusyChange]);
|
|
8350
|
+
(0, import_react9.useEffect)(() => {
|
|
8351
|
+
if (!message) setCallout(false);
|
|
8352
|
+
}, [message]);
|
|
8353
|
+
(0, import_react9.useEffect)(() => {
|
|
8354
|
+
if (!callout) return void 0;
|
|
8355
|
+
const timer = setTimeout(() => setCallout(false), CALLOUT_MS);
|
|
8356
|
+
return () => clearTimeout(timer);
|
|
8357
|
+
}, [callout]);
|
|
8358
|
+
const floating = open || callout;
|
|
8359
|
+
(0, import_react9.useEffect)(() => {
|
|
8360
|
+
if (!floating) return;
|
|
8361
|
+
const close = () => {
|
|
8362
|
+
setOpen(false);
|
|
8363
|
+
setCallout(false);
|
|
8364
|
+
};
|
|
8365
|
+
const root = rootRef.current?.getRootNode() ?? document;
|
|
8366
|
+
const onDown = (e) => {
|
|
8367
|
+
if (!rootRef.current?.contains(e.target)) close();
|
|
8368
|
+
};
|
|
8369
|
+
const onKey = (e) => {
|
|
8370
|
+
if (e.key !== "Escape") return;
|
|
8371
|
+
if (rootRef.current?.contains(e.target)) chipRef.current?.focus();
|
|
8372
|
+
close();
|
|
8373
|
+
};
|
|
8374
|
+
root.addEventListener("pointerdown", onDown);
|
|
8375
|
+
document.addEventListener("keydown", onKey);
|
|
8376
|
+
return () => {
|
|
8377
|
+
root.removeEventListener("pointerdown", onDown);
|
|
8378
|
+
document.removeEventListener("keydown", onKey);
|
|
8379
|
+
};
|
|
8380
|
+
}, [floating]);
|
|
8381
|
+
if (!store || !settings || settings.numbers.length < 2) return null;
|
|
8382
|
+
const orgDefault = settings.numbers.find((n) => n.id === settings.orgDefault);
|
|
8383
|
+
const applyingNumber = applying === null ? orgDefault : settings.numbers.find((n) => n.id === applying);
|
|
8384
|
+
const shown = applying === void 0 ? current : numberName(applyingNumber, formatIntl2);
|
|
8385
|
+
const choose = async (id) => {
|
|
8386
|
+
if (locked) return;
|
|
8387
|
+
setOpen(false);
|
|
8388
|
+
chipRef.current?.focus();
|
|
8389
|
+
if (id === settings.mine) return;
|
|
8390
|
+
setCallout(false);
|
|
8391
|
+
setApplying(id);
|
|
8392
|
+
const applied = await apply(id);
|
|
8393
|
+
setApplying(void 0);
|
|
8394
|
+
if (!applied) setCallout(true);
|
|
8395
|
+
};
|
|
8396
|
+
return /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { className: "cv-on", ref: rootRef, children: [
|
|
8397
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(
|
|
8398
|
+
"button",
|
|
8399
|
+
{
|
|
8400
|
+
ref: chipRef,
|
|
8401
|
+
type: "button",
|
|
8402
|
+
className: "cv-on-chip",
|
|
8403
|
+
onClick: () => {
|
|
8404
|
+
setCallout(false);
|
|
8405
|
+
setOpen((o) => !o);
|
|
8406
|
+
},
|
|
8407
|
+
"aria-haspopup": "listbox",
|
|
8408
|
+
"aria-expanded": open,
|
|
8409
|
+
"aria-label": `Llamar desde: ${shown}${busy ? " (aplicando)" : ""}. Cambiar n\xFAmero de salida`,
|
|
8410
|
+
"aria-busy": busy,
|
|
8411
|
+
part: "outbound-number-chip",
|
|
8412
|
+
children: [
|
|
8413
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: "cv-on-label", children: "Llamar desde:" }),
|
|
8414
|
+
busy ? /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(LoaderCircle, { size: 13, className: "cv-on-icon cv-on-spin", "aria-hidden": true }) : null,
|
|
8415
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: "cv-on-current", children: shown }),
|
|
8416
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(ChevronDown, { size: 13, className: "cv-cp-caret", "data-open": open, "aria-hidden": true })
|
|
8417
|
+
]
|
|
8418
|
+
}
|
|
8419
|
+
),
|
|
8420
|
+
open ? /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(
|
|
8421
|
+
"div",
|
|
8422
|
+
{
|
|
8423
|
+
className: "cv-cp-pop cv-on-pop",
|
|
8424
|
+
role: "dialog",
|
|
8425
|
+
"aria-label": "Llamar desde",
|
|
8426
|
+
part: "outbound-number-list",
|
|
8427
|
+
onBlur: (e) => {
|
|
8428
|
+
if (!e.currentTarget.contains(e.relatedTarget)) setOpen(false);
|
|
8429
|
+
},
|
|
8430
|
+
children: [
|
|
8431
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("p", { className: "cv-on-title", children: "Llamar desde" }),
|
|
8432
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { className: "cv-cp-list", role: "listbox", "aria-disabled": locked, ref: keys.listRef, onKeyDown: keys.onKeyDown, children: [
|
|
8433
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
8434
|
+
OptionRow,
|
|
8435
|
+
{
|
|
8436
|
+
selected: settings.mine === null,
|
|
8437
|
+
disabled: locked,
|
|
8438
|
+
title: "Por defecto de la organizaci\xF3n",
|
|
8439
|
+
sub: orgDefault ? numberName(orgDefault, formatIntl2) : "Sin n\xFAmero por defecto",
|
|
8440
|
+
onSelect: () => void choose(null)
|
|
8441
|
+
}
|
|
8442
|
+
),
|
|
8443
|
+
settings.numbers.map((n) => /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
8444
|
+
OptionRow,
|
|
8445
|
+
{
|
|
8446
|
+
selected: settings.mine === n.id,
|
|
8447
|
+
disabled: locked,
|
|
8448
|
+
title: numberName(n, formatIntl2),
|
|
8449
|
+
sub: n.label ? formatIntl2(`+${n.number}`) : null,
|
|
8450
|
+
tag: KIND_TAG[n.kind],
|
|
8451
|
+
onSelect: () => void choose(n.id)
|
|
8452
|
+
},
|
|
8453
|
+
n.id
|
|
8454
|
+
))
|
|
8455
|
+
] }),
|
|
8456
|
+
message ? /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("p", { className: "cv-on-notice", role: "status", "data-kind": isError ? "error" : "info", children: message }) : null
|
|
8457
|
+
]
|
|
8458
|
+
}
|
|
8459
|
+
) : null,
|
|
8460
|
+
callout && !open && message ? /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("p", { className: "cv-on-callout", role: "status", "data-kind": isError ? "error" : "info", part: "outbound-number-notice", children: message }) : null
|
|
8461
|
+
] });
|
|
8462
|
+
}
|
|
8463
|
+
function OptionRow({
|
|
8464
|
+
selected,
|
|
8465
|
+
disabled,
|
|
8466
|
+
title,
|
|
8467
|
+
sub,
|
|
8468
|
+
tag,
|
|
8469
|
+
onSelect
|
|
8470
|
+
}) {
|
|
8471
|
+
return /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(
|
|
8472
|
+
"button",
|
|
8473
|
+
{
|
|
8474
|
+
type: "button",
|
|
8475
|
+
role: "option",
|
|
8476
|
+
"aria-selected": selected,
|
|
8477
|
+
"aria-disabled": disabled,
|
|
8478
|
+
className: "cv-cp-item cv-on-item",
|
|
8479
|
+
tabIndex: -1,
|
|
8480
|
+
onClick: onSelect,
|
|
8481
|
+
children: [
|
|
8482
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("span", { className: "cv-on-text", children: [
|
|
8483
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("span", { className: "cv-on-line", children: [
|
|
8484
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: "cv-cp-name", children: title }),
|
|
8485
|
+
tag ? /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: "cv-on-tag", children: tag.tag }) : null
|
|
8486
|
+
] }),
|
|
8487
|
+
sub ? /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: "cv-on-sub", children: sub }) : null,
|
|
8488
|
+
tag ? /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: "cv-on-hint", children: tag.hint }) : null
|
|
8489
|
+
] }),
|
|
8490
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(Check, { size: 14, className: "cv-cp-check", "data-on": selected, "aria-hidden": true })
|
|
8491
|
+
]
|
|
8492
|
+
}
|
|
8493
|
+
);
|
|
8494
|
+
}
|
|
8495
|
+
var optionsOf = (list) => list ? [...list.querySelectorAll('[role="option"]')] : [];
|
|
8496
|
+
var fold = (text) => text.normalize("NFD").replace(/\p{Diacritic}/gu, "").toLowerCase();
|
|
8497
|
+
var TYPEAHEAD_MS = 700;
|
|
8498
|
+
function useListKeyboard(open) {
|
|
8499
|
+
const listRef = (0, import_react9.useRef)(null);
|
|
8500
|
+
const typed = (0, import_react9.useRef)({ text: "", at: 0 });
|
|
8501
|
+
(0, import_react9.useEffect)(() => {
|
|
8502
|
+
if (!open) return;
|
|
8503
|
+
const options = optionsOf(listRef.current);
|
|
8504
|
+
(options.find((o) => o.getAttribute("aria-selected") === "true") ?? options[0])?.focus();
|
|
8505
|
+
}, [open]);
|
|
8506
|
+
const onKeyDown = (e) => {
|
|
8507
|
+
const options = optionsOf(listRef.current);
|
|
8508
|
+
const at = options.indexOf(e.target);
|
|
8509
|
+
const move = {
|
|
8510
|
+
ArrowDown: Math.min(at + 1, options.length - 1),
|
|
8511
|
+
ArrowUp: Math.max(at - 1, 0),
|
|
8512
|
+
Home: 0,
|
|
8513
|
+
End: options.length - 1
|
|
8514
|
+
};
|
|
8515
|
+
let next = move[e.key];
|
|
8516
|
+
if (next === void 0 && e.key.length === 1 && !e.ctrlKey && !e.metaKey && !e.altKey) {
|
|
8517
|
+
const now = Date.now();
|
|
8518
|
+
const text = now - typed.current.at < TYPEAHEAD_MS ? typed.current.text + e.key : e.key;
|
|
8519
|
+
typed.current = { text, at: now };
|
|
8520
|
+
const wanted = fold(text);
|
|
8521
|
+
const match = options.findIndex((o) => fold(o.querySelector(".cv-cp-name")?.textContent ?? "").startsWith(wanted));
|
|
8522
|
+
next = match >= 0 ? match : void 0;
|
|
8523
|
+
}
|
|
8524
|
+
if (next === void 0) return;
|
|
8525
|
+
e.preventDefault();
|
|
8526
|
+
options[next]?.focus();
|
|
8527
|
+
};
|
|
8528
|
+
return { listRef, onKeyDown };
|
|
8529
|
+
}
|
|
8530
|
+
|
|
8531
|
+
// src/ui/views/Dialpad.tsx
|
|
8532
|
+
var import_jsx_runtime4 = __toESM(require_jsx_runtime(), 1);
|
|
8119
8533
|
var NOT_DIALABLE = /* @__PURE__ */ new Set(["*", "#"]);
|
|
8534
|
+
var DISPLAY_SIZES = ["1.375rem", "1.25rem", "1.125rem", "1rem"];
|
|
8120
8535
|
function Dialpad({ outcome = null, onIntent, keyTones = true } = {}) {
|
|
8121
8536
|
const softphone = useSoftphone();
|
|
8122
8537
|
const state = useSoftphoneState();
|
|
8123
|
-
const [value, setValue] = (0,
|
|
8124
|
-
const [country, setCountry] = (0,
|
|
8538
|
+
const [value, setValue] = (0, import_react11.useState)("");
|
|
8539
|
+
const [country, setCountry] = (0, import_react11.useState)(DEFAULT_COUNTRY);
|
|
8540
|
+
const [changingNumber, setChangingNumber] = (0, import_react11.useState)(false);
|
|
8125
8541
|
const format = useNumberFormatter();
|
|
8126
|
-
const inputRef = (0,
|
|
8127
|
-
const caretRef = (0,
|
|
8542
|
+
const inputRef = (0, import_react11.useRef)(null);
|
|
8543
|
+
const caretRef = (0, import_react11.useRef)(null);
|
|
8128
8544
|
const display = format(country, value);
|
|
8129
8545
|
const target = toE164(country, value);
|
|
8130
|
-
const canCall = state === "online" && target.length > 1;
|
|
8131
|
-
|
|
8546
|
+
const canCall = state === "online" && target.length > 1 && !changingNumber;
|
|
8547
|
+
const typedInternational = value.trim().startsWith("+");
|
|
8548
|
+
const numberRegion = regionOfInternational(value);
|
|
8549
|
+
(0, import_react11.useLayoutEffect)(() => {
|
|
8132
8550
|
const caret = caretRef.current;
|
|
8133
8551
|
if (caret === null || !inputRef.current) return;
|
|
8134
8552
|
caretRef.current = null;
|
|
8135
8553
|
const pos = caretAfterDigits(display, caret);
|
|
8136
8554
|
inputRef.current.setSelectionRange(pos, pos);
|
|
8137
8555
|
}, [display]);
|
|
8556
|
+
(0, import_react11.useLayoutEffect)(() => {
|
|
8557
|
+
const input = inputRef.current;
|
|
8558
|
+
if (!input) return;
|
|
8559
|
+
for (const size of DISPLAY_SIZES) {
|
|
8560
|
+
input.style.fontSize = size;
|
|
8561
|
+
if (input.scrollWidth <= input.clientWidth) break;
|
|
8562
|
+
}
|
|
8563
|
+
}, [display]);
|
|
8138
8564
|
const append = (key) => {
|
|
8139
8565
|
onIntent?.();
|
|
8140
8566
|
setValue((v) => v + key);
|
|
@@ -8149,11 +8575,18 @@ function Dialpad({ outcome = null, onIntent, keyTones = true } = {}) {
|
|
|
8149
8575
|
onIntent?.();
|
|
8150
8576
|
void softphone.call(target);
|
|
8151
8577
|
};
|
|
8152
|
-
return /* @__PURE__ */ (0,
|
|
8153
|
-
/* @__PURE__ */ (0,
|
|
8154
|
-
/* @__PURE__ */ (0,
|
|
8155
|
-
/* @__PURE__ */ (0,
|
|
8156
|
-
|
|
8578
|
+
return /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("div", { className: "cv-view", children: [
|
|
8579
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)(OutboundNumberPicker, { onBusyChange: setChangingNumber }),
|
|
8580
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("div", { className: "cv-dial-head", children: [
|
|
8581
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
8582
|
+
CountryPicker,
|
|
8583
|
+
{
|
|
8584
|
+
value: numberRegion ?? country,
|
|
8585
|
+
onChange: setCountry,
|
|
8586
|
+
fromNumber: typedInternational
|
|
8587
|
+
}
|
|
8588
|
+
),
|
|
8589
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
8157
8590
|
"input",
|
|
8158
8591
|
{
|
|
8159
8592
|
ref: inputRef,
|
|
@@ -8170,22 +8603,24 @@ function Dialpad({ outcome = null, onIntent, keyTones = true } = {}) {
|
|
|
8170
8603
|
inputMode: "tel"
|
|
8171
8604
|
}
|
|
8172
8605
|
),
|
|
8173
|
-
/* @__PURE__ */ (0,
|
|
8606
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
8174
8607
|
"button",
|
|
8175
8608
|
{
|
|
8176
8609
|
type: "button",
|
|
8177
8610
|
className: "cv-dial-side",
|
|
8178
8611
|
"data-hidden": value.length === 0,
|
|
8612
|
+
tabIndex: value.length === 0 ? -1 : void 0,
|
|
8613
|
+
"aria-hidden": value.length === 0 || void 0,
|
|
8179
8614
|
onClick: backspace,
|
|
8180
8615
|
"aria-label": "Borrar",
|
|
8181
|
-
children: /* @__PURE__ */ (0,
|
|
8616
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(Delete, { size: 19 })
|
|
8182
8617
|
}
|
|
8183
8618
|
)
|
|
8184
8619
|
] }),
|
|
8185
|
-
/* @__PURE__ */ (0,
|
|
8186
|
-
/* @__PURE__ */ (0,
|
|
8620
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)("p", { className: "cv-dial-outcome", role: "status", part: "error", "data-shown": outcome !== null, children: outcome?.text ?? "" }),
|
|
8621
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)("div", { className: "cv-keypad", children: KEYPAD_KEYS.map(([key, letters]) => {
|
|
8187
8622
|
const dialable = !NOT_DIALABLE.has(key);
|
|
8188
|
-
return /* @__PURE__ */ (0,
|
|
8623
|
+
return /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(
|
|
8189
8624
|
"button",
|
|
8190
8625
|
{
|
|
8191
8626
|
type: "button",
|
|
@@ -8195,14 +8630,14 @@ function Dialpad({ outcome = null, onIntent, keyTones = true } = {}) {
|
|
|
8195
8630
|
"aria-disabled": !dialable,
|
|
8196
8631
|
title: dialable ? void 0 : "Solo disponible durante una llamada",
|
|
8197
8632
|
children: [
|
|
8198
|
-
/* @__PURE__ */ (0,
|
|
8199
|
-
letters ? /* @__PURE__ */ (0,
|
|
8633
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)("b", { children: key }),
|
|
8634
|
+
letters ? /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("small", { children: letters }) : null
|
|
8200
8635
|
]
|
|
8201
8636
|
},
|
|
8202
8637
|
key
|
|
8203
8638
|
);
|
|
8204
8639
|
}) }),
|
|
8205
|
-
/* @__PURE__ */ (0,
|
|
8640
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)("div", { className: "cv-dial-foot", children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
8206
8641
|
"button",
|
|
8207
8642
|
{
|
|
8208
8643
|
type: "button",
|
|
@@ -8211,14 +8646,14 @@ function Dialpad({ outcome = null, onIntent, keyTones = true } = {}) {
|
|
|
8211
8646
|
disabled: !canCall,
|
|
8212
8647
|
"aria-label": "Llamar",
|
|
8213
8648
|
part: "call-button",
|
|
8214
|
-
children: /* @__PURE__ */ (0,
|
|
8649
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(Phone, { size: 26 })
|
|
8215
8650
|
}
|
|
8216
8651
|
) })
|
|
8217
8652
|
] });
|
|
8218
8653
|
}
|
|
8219
8654
|
|
|
8220
8655
|
// src/ui/views/CallScreen.tsx
|
|
8221
|
-
var
|
|
8656
|
+
var import_react16 = __toESM(require_react(), 1);
|
|
8222
8657
|
|
|
8223
8658
|
// src/ui/lib/format.ts
|
|
8224
8659
|
function formatDuration(totalSeconds) {
|
|
@@ -8360,10 +8795,10 @@ var ERROR_TEXT = {
|
|
|
8360
8795
|
};
|
|
8361
8796
|
|
|
8362
8797
|
// src/ui/lib/useTicker.ts
|
|
8363
|
-
var
|
|
8798
|
+
var import_react13 = __toESM(require_react(), 1);
|
|
8364
8799
|
function useTicker(enabled, intervalMs = 1e3) {
|
|
8365
|
-
const [now, setNow] = (0,
|
|
8366
|
-
(0,
|
|
8800
|
+
const [now, setNow] = (0, import_react13.useState)(() => Date.now());
|
|
8801
|
+
(0, import_react13.useEffect)(() => {
|
|
8367
8802
|
if (!enabled) return;
|
|
8368
8803
|
setNow(Date.now());
|
|
8369
8804
|
const id = setInterval(() => setNow(Date.now()), intervalMs);
|
|
@@ -8373,8 +8808,8 @@ function useTicker(enabled, intervalMs = 1e3) {
|
|
|
8373
8808
|
}
|
|
8374
8809
|
|
|
8375
8810
|
// src/ui/views/DevicePicker.tsx
|
|
8376
|
-
var
|
|
8377
|
-
var
|
|
8811
|
+
var import_react14 = __toESM(require_react(), 1);
|
|
8812
|
+
var import_jsx_runtime5 = __toESM(require_jsx_runtime(), 1);
|
|
8378
8813
|
function deviceLabel(device, index, kind) {
|
|
8379
8814
|
if (device.label) return device.label;
|
|
8380
8815
|
return kind === "input" ? `Micr\xF3fono ${index + 1}` : `Altavoz ${index + 1}`;
|
|
@@ -8389,11 +8824,11 @@ function DevicePicker({
|
|
|
8389
8824
|
onChange,
|
|
8390
8825
|
emptyText
|
|
8391
8826
|
}) {
|
|
8392
|
-
return /* @__PURE__ */ (0,
|
|
8393
|
-
/* @__PURE__ */ (0,
|
|
8394
|
-
/* @__PURE__ */ (0,
|
|
8395
|
-
/* @__PURE__ */ (0,
|
|
8396
|
-
options.length > 0 ? /* @__PURE__ */ (0,
|
|
8827
|
+
return /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { className: "cv-settings-row", children: [
|
|
8828
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)("span", { className: "cv-settings-row-icon", "aria-hidden": true, children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(Icon3, { size: 16 }) }),
|
|
8829
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("span", { className: "cv-settings-row-text", children: [
|
|
8830
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)("span", { className: "cv-settings-row-label", id: `cv-settings-label-${kind}`, children: label }),
|
|
8831
|
+
options.length > 0 ? /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(
|
|
8397
8832
|
"select",
|
|
8398
8833
|
{
|
|
8399
8834
|
className: "cv-settings-select",
|
|
@@ -8401,22 +8836,22 @@ function DevicePicker({
|
|
|
8401
8836
|
value: value ?? DEFAULT_OPTION,
|
|
8402
8837
|
onChange: (e) => onChange(e.target.value === DEFAULT_OPTION ? null : e.target.value),
|
|
8403
8838
|
children: [
|
|
8404
|
-
/* @__PURE__ */ (0,
|
|
8405
|
-
options.map((d, i) => /* @__PURE__ */ (0,
|
|
8839
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)("option", { value: DEFAULT_OPTION, children: "Predeterminado del sistema" }),
|
|
8840
|
+
options.map((d, i) => /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("option", { value: d.deviceId, children: deviceLabel(d, i, kind) }, d.deviceId))
|
|
8406
8841
|
]
|
|
8407
8842
|
}
|
|
8408
|
-
) : /* @__PURE__ */ (0,
|
|
8843
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("span", { className: "cv-settings-empty", children: emptyText })
|
|
8409
8844
|
] })
|
|
8410
8845
|
] });
|
|
8411
8846
|
}
|
|
8412
8847
|
function DevicePickers() {
|
|
8413
8848
|
const softphone = useSoftphone();
|
|
8414
8849
|
const devices = useDevices();
|
|
8415
|
-
(0,
|
|
8850
|
+
(0, import_react14.useEffect)(() => {
|
|
8416
8851
|
void softphone.audio.refresh();
|
|
8417
8852
|
}, [softphone]);
|
|
8418
|
-
return /* @__PURE__ */ (0,
|
|
8419
|
-
/* @__PURE__ */ (0,
|
|
8853
|
+
return /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(import_jsx_runtime5.Fragment, { children: [
|
|
8854
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
|
|
8420
8855
|
DevicePicker,
|
|
8421
8856
|
{
|
|
8422
8857
|
icon: Mic,
|
|
@@ -8428,7 +8863,7 @@ function DevicePickers() {
|
|
|
8428
8863
|
emptyText: "No se encontr\xF3 ning\xFAn micr\xF3fono"
|
|
8429
8864
|
}
|
|
8430
8865
|
),
|
|
8431
|
-
devices.canSelectOutput ? /* @__PURE__ */ (0,
|
|
8866
|
+
devices.canSelectOutput ? /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
|
|
8432
8867
|
DevicePicker,
|
|
8433
8868
|
{
|
|
8434
8869
|
icon: Headphones,
|
|
@@ -8442,13 +8877,13 @@ function DevicePickers() {
|
|
|
8442
8877
|
) : (
|
|
8443
8878
|
// Safari and most of Firefox have no `setSinkId` at all — nothing here would do anything,
|
|
8444
8879
|
// and offering a picker that silently fails is worse than not offering one.
|
|
8445
|
-
/* @__PURE__ */ (0,
|
|
8880
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)("p", { className: "cv-settings-note", children: "Tu navegador no permite elegir el altavoz desde aqu\xED \u2014 c\xE1mbialo en los ajustes del sistema." })
|
|
8446
8881
|
)
|
|
8447
8882
|
] });
|
|
8448
8883
|
}
|
|
8449
8884
|
|
|
8450
8885
|
// src/ui/views/CallScreen.tsx
|
|
8451
|
-
var
|
|
8886
|
+
var import_jsx_runtime6 = __toESM(require_jsx_runtime(), 1);
|
|
8452
8887
|
function Control({
|
|
8453
8888
|
icon: Icon3,
|
|
8454
8889
|
label,
|
|
@@ -8458,8 +8893,8 @@ function Control({
|
|
|
8458
8893
|
disabled = false,
|
|
8459
8894
|
title
|
|
8460
8895
|
}) {
|
|
8461
|
-
return /* @__PURE__ */ (0,
|
|
8462
|
-
/* @__PURE__ */ (0,
|
|
8896
|
+
return /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { className: "cv-ctrl-item", children: [
|
|
8897
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
8463
8898
|
"button",
|
|
8464
8899
|
{
|
|
8465
8900
|
type: "button",
|
|
@@ -8470,10 +8905,10 @@ function Control({
|
|
|
8470
8905
|
onClick,
|
|
8471
8906
|
disabled,
|
|
8472
8907
|
title,
|
|
8473
|
-
children: /* @__PURE__ */ (0,
|
|
8908
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(Icon3, { size: 19 })
|
|
8474
8909
|
}
|
|
8475
8910
|
),
|
|
8476
|
-
/* @__PURE__ */ (0,
|
|
8911
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("span", { className: "cv-ctrl-label", "aria-hidden": true, children: label })
|
|
8477
8912
|
] });
|
|
8478
8913
|
}
|
|
8479
8914
|
var STATUS_LABEL = {
|
|
@@ -8511,42 +8946,42 @@ function ConsultScreen({
|
|
|
8511
8946
|
const [rawM = "0", ss = "00"] = formatDuration(heldSeconds).split(":");
|
|
8512
8947
|
const mm = rawM.padStart(2, "0");
|
|
8513
8948
|
const canComplete = heldSeconds >= MIN_CONSULT_HOLD_SECONDS;
|
|
8514
|
-
return /* @__PURE__ */ (0,
|
|
8515
|
-
/* @__PURE__ */ (0,
|
|
8516
|
-
/* @__PURE__ */ (0,
|
|
8517
|
-
/* @__PURE__ */ (0,
|
|
8949
|
+
return /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { className: "cv-view", children: [
|
|
8950
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { className: "cv-call", children: [
|
|
8951
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("button", { type: "button", className: "cv-consult-hold-banner", onClick: onReturn, children: [
|
|
8952
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)(Pause, { size: 13, "aria-hidden": true }),
|
|
8518
8953
|
mainName,
|
|
8519
8954
|
" en espera \xB7 Volver"
|
|
8520
8955
|
] }),
|
|
8521
|
-
/* @__PURE__ */ (0,
|
|
8522
|
-
/* @__PURE__ */ (0,
|
|
8523
|
-
answered ? /* @__PURE__ */ (0,
|
|
8956
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { className: "cv-avatar-wrap", children: [
|
|
8957
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("div", { className: "cv-avatar", "aria-hidden": true, children: initials(name) }),
|
|
8958
|
+
answered ? /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("span", { className: "cv-avatar-dot", "aria-hidden": true }) : null
|
|
8524
8959
|
] }),
|
|
8525
|
-
/* @__PURE__ */ (0,
|
|
8526
|
-
showNumber ? /* @__PURE__ */ (0,
|
|
8527
|
-
answered ? /* @__PURE__ */ (0,
|
|
8528
|
-
/* @__PURE__ */ (0,
|
|
8529
|
-
/* @__PURE__ */ (0,
|
|
8530
|
-
/* @__PURE__ */ (0,
|
|
8531
|
-
] }) : /* @__PURE__ */ (0,
|
|
8960
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("div", { className: "cv-call-name", children: name }),
|
|
8961
|
+
showNumber ? /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("div", { className: "cv-call-number", children: number }) : null,
|
|
8962
|
+
answered ? /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { className: "cv-timer", "aria-label": "Duraci\xF3n de la llamada", children: [
|
|
8963
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("b", { children: mm }),
|
|
8964
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("i", { children: ":" }),
|
|
8965
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("b", { children: ss })
|
|
8966
|
+
] }) : /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("div", { className: "cv-call-status", children: STATUS_LABEL[s] ?? "" })
|
|
8532
8967
|
] }),
|
|
8533
|
-
/* @__PURE__ */ (0,
|
|
8534
|
-
/* @__PURE__ */ (0,
|
|
8535
|
-
answered ? /* @__PURE__ */ (0,
|
|
8536
|
-
/* @__PURE__ */ (0,
|
|
8968
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { className: "cv-controls", children: [
|
|
8969
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { className: "cv-transfer-actions", children: [
|
|
8970
|
+
answered ? /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("button", { className: "cv-btn cv-btn--accent", onClick: onComplete, disabled: !canComplete, children: "Completar" }) : null,
|
|
8971
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("button", { className: "cv-btn", onClick: onReturn, children: "Cancelar" })
|
|
8537
8972
|
] }),
|
|
8538
|
-
/* @__PURE__ */ (0,
|
|
8539
|
-
/* @__PURE__ */ (0,
|
|
8973
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("div", { className: "cv-controls-primary", children: /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { className: "cv-ctrl-item", children: [
|
|
8974
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
8540
8975
|
"button",
|
|
8541
8976
|
{
|
|
8542
8977
|
type: "button",
|
|
8543
8978
|
className: "cv-round cv-round--hangup",
|
|
8544
8979
|
onClick: onHangupAll,
|
|
8545
8980
|
"aria-label": "Colgar todo",
|
|
8546
|
-
children: /* @__PURE__ */ (0,
|
|
8981
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(PhoneOff, { size: 26 })
|
|
8547
8982
|
}
|
|
8548
8983
|
),
|
|
8549
|
-
/* @__PURE__ */ (0,
|
|
8984
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("span", { className: "cv-ctrl-label", "aria-hidden": true, children: "Colgar todo" })
|
|
8550
8985
|
] }) })
|
|
8551
8986
|
] })
|
|
8552
8987
|
] });
|
|
@@ -8579,10 +9014,10 @@ function TransferPicker({
|
|
|
8579
9014
|
const others = agents.filter((a) => a.userId !== myUserId);
|
|
8580
9015
|
if (others.length === 0) return null;
|
|
8581
9016
|
const filtered = filterAgents(others, query);
|
|
8582
|
-
return /* @__PURE__ */ (0,
|
|
8583
|
-
/* @__PURE__ */ (0,
|
|
9017
|
+
return /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { className: "cv-presence", children: [
|
|
9018
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("div", { className: "cv-presence-list", role: "listbox", "aria-label": "Compa\xF1eros", children: filtered.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("p", { className: "cv-presence-empty", children: "Sin coincidencias" }) : filtered.map((agent) => {
|
|
8584
9019
|
const isBusy = agent.state === "en_llamada";
|
|
8585
|
-
return /* @__PURE__ */ (0,
|
|
9020
|
+
return /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(
|
|
8586
9021
|
"button",
|
|
8587
9022
|
{
|
|
8588
9023
|
type: "button",
|
|
@@ -8591,9 +9026,9 @@ function TransferPicker({
|
|
|
8591
9026
|
disabled: isBusy,
|
|
8592
9027
|
onClick: () => onSelect(agent.extension),
|
|
8593
9028
|
children: [
|
|
8594
|
-
/* @__PURE__ */ (0,
|
|
8595
|
-
/* @__PURE__ */ (0,
|
|
8596
|
-
/* @__PURE__ */ (0,
|
|
9029
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("span", { className: "cv-presence-dot", "data-state": agent.state, "aria-hidden": true }),
|
|
9030
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("span", { className: "cv-presence-name", children: agent.name ?? agent.extension }),
|
|
9031
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("span", { className: "cv-presence-meta", children: [
|
|
8597
9032
|
agent.extension,
|
|
8598
9033
|
" \xB7 ",
|
|
8599
9034
|
PRESENCE_LABEL[agent.state]
|
|
@@ -8603,7 +9038,7 @@ function TransferPicker({
|
|
|
8603
9038
|
agent.userId
|
|
8604
9039
|
);
|
|
8605
9040
|
}) }),
|
|
8606
|
-
/* @__PURE__ */ (0,
|
|
9041
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("p", { className: "cv-presence-legend", children: "Desconectado: sin conexi\xF3n en el softphone web. Puede atender desde otro dispositivo." })
|
|
8607
9042
|
] });
|
|
8608
9043
|
}
|
|
8609
9044
|
function CallScreen({
|
|
@@ -8613,24 +9048,27 @@ function CallScreen({
|
|
|
8613
9048
|
}) {
|
|
8614
9049
|
const view = useCall(call);
|
|
8615
9050
|
const softphone = useSoftphone();
|
|
8616
|
-
const
|
|
9051
|
+
const outbound = useOutboundNumbers(call.direction === "outbound" ? outboundNumberStore(softphone) : null).settings;
|
|
9052
|
+
const formatIntl2 = useIntlFormatter();
|
|
9053
|
+
const fromName = outbound && outbound.numbers.length > 1 ? numberName(effectiveNumber(outbound), formatIntl2) : null;
|
|
9054
|
+
const [panel, setPanel] = (0, import_react16.useState)(null);
|
|
8617
9055
|
const showTransfer = panel === "transfer";
|
|
8618
9056
|
const showKeypad = panel === "keypad";
|
|
8619
9057
|
const showDevices = panel === "devices";
|
|
8620
9058
|
const togglePanel = (p) => setPanel((cur) => cur === p ? null : p);
|
|
8621
|
-
const [transferTo, setTransferTo] = (0,
|
|
8622
|
-
const [consultCall, setConsultCall] = (0,
|
|
8623
|
-
const [consultOutcome, setConsultOutcome] = (0,
|
|
8624
|
-
const [myUserId, setMyUserId] = (0,
|
|
9059
|
+
const [transferTo, setTransferTo] = (0, import_react16.useState)("");
|
|
9060
|
+
const [consultCall, setConsultCall] = (0, import_react16.useState)(null);
|
|
9061
|
+
const [consultOutcome, setConsultOutcome] = (0, import_react16.useState)(null);
|
|
9062
|
+
const [myUserId, setMyUserId] = (0, import_react16.useState)(null);
|
|
8625
9063
|
const consultView = useCall(consultCall);
|
|
8626
|
-
const consultIntentRef = (0,
|
|
8627
|
-
const controlsRef = (0,
|
|
9064
|
+
const consultIntentRef = (0, import_react16.useRef)(null);
|
|
9065
|
+
const controlsRef = (0, import_react16.useRef)(null);
|
|
8628
9066
|
const now = useTicker(view?.state === "active");
|
|
8629
9067
|
const consultNow = useTicker(consultView?.state === "active");
|
|
8630
9068
|
const isConnected = view ? view.state === "active" || view.state === "held" || view.state === "reconnecting" : false;
|
|
8631
9069
|
const transferPickerActive = isConnected && showTransfer && !consultCall;
|
|
8632
9070
|
const presence = usePresence(transferPickerActive);
|
|
8633
|
-
(0,
|
|
9071
|
+
(0, import_react16.useEffect)(() => {
|
|
8634
9072
|
const listAgents = softphone.sources?.listAgents;
|
|
8635
9073
|
if (!listAgents) return;
|
|
8636
9074
|
let cancelled = false;
|
|
@@ -8640,7 +9078,7 @@ function CallScreen({
|
|
|
8640
9078
|
cancelled = true;
|
|
8641
9079
|
};
|
|
8642
9080
|
}, [softphone]);
|
|
8643
|
-
(0,
|
|
9081
|
+
(0, import_react16.useEffect)(() => {
|
|
8644
9082
|
if (!consultCall) return;
|
|
8645
9083
|
return consultCall.on("ended" /* Ended */, ({ reason }) => {
|
|
8646
9084
|
const intent = consultIntentRef.current;
|
|
@@ -8662,7 +9100,7 @@ function CallScreen({
|
|
|
8662
9100
|
setTransferTo(extension);
|
|
8663
9101
|
void startConsult(extension);
|
|
8664
9102
|
};
|
|
8665
|
-
const [quickTransfer, setQuickTransfer] = (0,
|
|
9103
|
+
const [quickTransfer, setQuickTransfer] = (0, import_react16.useState)(false);
|
|
8666
9104
|
const selectPresenceAgentAuto = (extension) => {
|
|
8667
9105
|
void call.transfer(extension);
|
|
8668
9106
|
};
|
|
@@ -8677,7 +9115,7 @@ function CallScreen({
|
|
|
8677
9115
|
consultIntentRef.current = "cancel";
|
|
8678
9116
|
await call.cancelConsult();
|
|
8679
9117
|
};
|
|
8680
|
-
(0,
|
|
9118
|
+
(0, import_react16.useEffect)(() => {
|
|
8681
9119
|
if (!showDevices) return;
|
|
8682
9120
|
const onKey = (e) => {
|
|
8683
9121
|
if (e.key === "Escape") setPanel(null);
|
|
@@ -8685,7 +9123,7 @@ function CallScreen({
|
|
|
8685
9123
|
document.addEventListener("keydown", onKey);
|
|
8686
9124
|
return () => document.removeEventListener("keydown", onKey);
|
|
8687
9125
|
}, [showDevices]);
|
|
8688
|
-
(0,
|
|
9126
|
+
(0, import_react16.useEffect)(() => {
|
|
8689
9127
|
if (!showKeypad) return;
|
|
8690
9128
|
const onKey = (e) => {
|
|
8691
9129
|
if (e.key === "Escape") setPanel(null);
|
|
@@ -8702,7 +9140,7 @@ function CallScreen({
|
|
|
8702
9140
|
root.removeEventListener("pointerdown", onDown);
|
|
8703
9141
|
};
|
|
8704
9142
|
}, [showKeypad, isConnected]);
|
|
8705
|
-
(0,
|
|
9143
|
+
(0, import_react16.useEffect)(() => {
|
|
8706
9144
|
if (view && view.state !== "active") setPanel((cur) => cur === "keypad" ? null : cur);
|
|
8707
9145
|
}, [view?.state]);
|
|
8708
9146
|
if (!view || view.state === "ended") return null;
|
|
@@ -8713,7 +9151,7 @@ function CallScreen({
|
|
|
8713
9151
|
const number = view.remote.number;
|
|
8714
9152
|
const showNumber = number !== name;
|
|
8715
9153
|
if (consultCall && consultView) {
|
|
8716
|
-
return /* @__PURE__ */ (0,
|
|
9154
|
+
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
8717
9155
|
ConsultScreen,
|
|
8718
9156
|
{
|
|
8719
9157
|
mainName: name,
|
|
@@ -8729,20 +9167,20 @@ function CallScreen({
|
|
|
8729
9167
|
const IncomingActionIcon = incomingAction?.icon ?? ExternalLink;
|
|
8730
9168
|
const [rawM = "0", ss = "00"] = formatDuration(elapsedSeconds(view.answeredAt, now)).split(":");
|
|
8731
9169
|
const mm = rawM.padStart(2, "0");
|
|
8732
|
-
return /* @__PURE__ */ (0,
|
|
8733
|
-
/* @__PURE__ */ (0,
|
|
8734
|
-
/* @__PURE__ */ (0,
|
|
8735
|
-
/* @__PURE__ */ (0,
|
|
8736
|
-
/* @__PURE__ */ (0,
|
|
9170
|
+
return /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { className: "cv-view", children: [
|
|
9171
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("div", { className: "cv-call", children: showDevices ? /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { className: "cv-call-devices-inline", children: [
|
|
9172
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { className: "cv-call-devices-header", children: [
|
|
9173
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("button", { type: "button", className: "cv-call-devices-chip", onClick: () => setPanel(null), children: [
|
|
9174
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)(ArrowLeft, { size: 13, "aria-hidden": true }),
|
|
8737
9175
|
"Volver"
|
|
8738
9176
|
] }),
|
|
8739
|
-
/* @__PURE__ */ (0,
|
|
9177
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("span", { className: "cv-call-devices-title", children: "Dispositivos" })
|
|
8740
9178
|
] }),
|
|
8741
|
-
/* @__PURE__ */ (0,
|
|
9179
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("p", { className: "cv-call-devices-context", children: [
|
|
8742
9180
|
showNumber ? `${number} \xB7 ` : "",
|
|
8743
9181
|
s === "active" ? `${mm}:${ss}` : STATUS_LABEL[s] ?? ""
|
|
8744
9182
|
] }),
|
|
8745
|
-
/* @__PURE__ */ (0,
|
|
9183
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("div", { className: "cv-settings-section-body", children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(DevicePickers, {}) })
|
|
8746
9184
|
] }) : transferPickerActive ? (
|
|
8747
9185
|
/*
|
|
8748
9186
|
Found live (2026-09-29): the agent list a moment ago picked between showing ONE agent row
|
|
@@ -8759,17 +9197,17 @@ function CallScreen({
|
|
|
8759
9197
|
calling doesn't disappear" compact context line (below) instead of the full block gives
|
|
8760
9198
|
that ~150px back to the one thing this screen is actually for right now: the list.
|
|
8761
9199
|
*/
|
|
8762
|
-
/* @__PURE__ */ (0,
|
|
8763
|
-
/* @__PURE__ */ (0,
|
|
8764
|
-
/* @__PURE__ */ (0,
|
|
8765
|
-
/* @__PURE__ */ (0,
|
|
9200
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { className: "cv-transfer", children: [
|
|
9201
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { className: "cv-transfer-context", children: [
|
|
9202
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("span", { className: "cv-call-devices-title", children: name }),
|
|
9203
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("p", { className: "cv-call-devices-context", children: [
|
|
8766
9204
|
showNumber ? `${number} \xB7 ` : "",
|
|
8767
9205
|
s === "active" ? `${mm}:${ss}` : STATUS_LABEL[s] ?? ""
|
|
8768
9206
|
] })
|
|
8769
9207
|
] }),
|
|
8770
|
-
consultOutcome ? /* @__PURE__ */ (0,
|
|
8771
|
-
/* @__PURE__ */ (0,
|
|
8772
|
-
/* @__PURE__ */ (0,
|
|
9208
|
+
consultOutcome ? /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("p", { className: "cv-dial-outcome", role: "status", "data-shown": "true", children: consultFailText(consultOutcome) }) : null,
|
|
9209
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { className: "cv-transfer-row", children: [
|
|
9210
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
8773
9211
|
"input",
|
|
8774
9212
|
{
|
|
8775
9213
|
className: "cv-search",
|
|
@@ -8780,7 +9218,7 @@ function CallScreen({
|
|
|
8780
9218
|
autoFocus: true
|
|
8781
9219
|
}
|
|
8782
9220
|
),
|
|
8783
|
-
/* @__PURE__ */ (0,
|
|
9221
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
8784
9222
|
"button",
|
|
8785
9223
|
{
|
|
8786
9224
|
className: "cv-btn cv-btn--accent",
|
|
@@ -8790,10 +9228,10 @@ function CallScreen({
|
|
|
8790
9228
|
}
|
|
8791
9229
|
)
|
|
8792
9230
|
] }),
|
|
8793
|
-
/* @__PURE__ */ (0,
|
|
9231
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("div", { className: "cv-segmented", role: "tablist", "aria-label": "Modo de transferencia", children: [
|
|
8794
9232
|
{ key: "consult", label: "Hablar primero" },
|
|
8795
9233
|
{ key: "auto", label: "Transferir directo" }
|
|
8796
|
-
].map(({ key, label }) => /* @__PURE__ */ (0,
|
|
9234
|
+
].map(({ key, label }) => /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
8797
9235
|
"button",
|
|
8798
9236
|
{
|
|
8799
9237
|
type: "button",
|
|
@@ -8805,7 +9243,7 @@ function CallScreen({
|
|
|
8805
9243
|
},
|
|
8806
9244
|
key
|
|
8807
9245
|
)) }),
|
|
8808
|
-
/* @__PURE__ */ (0,
|
|
9246
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
8809
9247
|
TransferPicker,
|
|
8810
9248
|
{
|
|
8811
9249
|
agents: presence,
|
|
@@ -8815,54 +9253,61 @@ function CallScreen({
|
|
|
8815
9253
|
}
|
|
8816
9254
|
)
|
|
8817
9255
|
] })
|
|
8818
|
-
) : /* @__PURE__ */ (0,
|
|
8819
|
-
/* @__PURE__ */ (0,
|
|
8820
|
-
isRinging ? /* @__PURE__ */ (0,
|
|
8821
|
-
/* @__PURE__ */ (0,
|
|
8822
|
-
s === "active" ? /* @__PURE__ */ (0,
|
|
9256
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(import_jsx_runtime6.Fragment, { children: [
|
|
9257
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { className: "cv-avatar-wrap", children: [
|
|
9258
|
+
isRinging ? /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("span", { className: "cv-avatar-ping", "aria-hidden": true }) : null,
|
|
9259
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("div", { className: "cv-avatar", "aria-hidden": true, children: initials(name) }),
|
|
9260
|
+
s === "active" ? /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("span", { className: "cv-avatar-dot", "aria-hidden": true }) : null
|
|
8823
9261
|
] }),
|
|
8824
|
-
/* @__PURE__ */ (0,
|
|
8825
|
-
showNumber ? /* @__PURE__ */ (0,
|
|
8826
|
-
|
|
8827
|
-
/* @__PURE__ */ (0,
|
|
8828
|
-
/* @__PURE__ */ (0,
|
|
8829
|
-
|
|
8830
|
-
|
|
8831
|
-
|
|
8832
|
-
|
|
9262
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("div", { className: "cv-call-name", children: name }),
|
|
9263
|
+
showNumber ? /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("div", { className: "cv-call-number", children: number }) : null,
|
|
9264
|
+
fromName ? /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { className: "cv-call-from", children: [
|
|
9265
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)(PhoneOutgoing, { size: 11, "aria-hidden": true }),
|
|
9266
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("span", { children: [
|
|
9267
|
+
"Desde ",
|
|
9268
|
+
fromName
|
|
9269
|
+
] })
|
|
9270
|
+
] }) : null,
|
|
9271
|
+
s === "active" ? /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { className: "cv-timer", "aria-label": "Duraci\xF3n de la llamada", children: [
|
|
9272
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("b", { children: mm }),
|
|
9273
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("i", { children: ":" }),
|
|
9274
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("b", { children: ss })
|
|
9275
|
+
] }) : /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("div", { className: "cv-call-status", children: s === "held" ? /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("span", { className: "cv-badge-hold", children: STATUS_LABEL[s] }) : STATUS_LABEL[s] ?? "" }),
|
|
9276
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { className: "cv-call-chips", children: [
|
|
9277
|
+
incomingAction ? /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(
|
|
8833
9278
|
"button",
|
|
8834
9279
|
{
|
|
8835
9280
|
type: "button",
|
|
8836
9281
|
className: "cv-call-devices-chip",
|
|
8837
9282
|
onClick: () => incomingAction.onClick(view.remote.contact),
|
|
8838
9283
|
children: [
|
|
8839
|
-
/* @__PURE__ */ (0,
|
|
9284
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)(IncomingActionIcon, { size: 13, "aria-hidden": true }),
|
|
8840
9285
|
incomingAction.label
|
|
8841
9286
|
]
|
|
8842
9287
|
}
|
|
8843
9288
|
) : null,
|
|
8844
|
-
/* @__PURE__ */ (0,
|
|
8845
|
-
/* @__PURE__ */ (0,
|
|
9289
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("button", { type: "button", className: "cv-call-devices-chip", onClick: () => setPanel("devices"), children: [
|
|
9290
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)(Headphones, { size: 13, "aria-hidden": true }),
|
|
8846
9291
|
"Dispositivos"
|
|
8847
9292
|
] })
|
|
8848
9293
|
] })
|
|
8849
9294
|
] }) }),
|
|
8850
|
-
/* @__PURE__ */ (0,
|
|
8851
|
-
/* @__PURE__ */ (0,
|
|
8852
|
-
/* @__PURE__ */ (0,
|
|
9295
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("div", { className: "cv-controls", ref: controlsRef, children: isRinging ? /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { className: "cv-controls-primary", children: [
|
|
9296
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { className: "cv-ctrl-item", children: [
|
|
9297
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
8853
9298
|
"button",
|
|
8854
9299
|
{
|
|
8855
9300
|
type: "button",
|
|
8856
9301
|
className: "cv-round cv-round--hangup",
|
|
8857
9302
|
onClick: () => void call.reject(),
|
|
8858
9303
|
"aria-label": "Rechazar",
|
|
8859
|
-
children: /* @__PURE__ */ (0,
|
|
9304
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(PhoneOff, { size: 26 })
|
|
8860
9305
|
}
|
|
8861
9306
|
),
|
|
8862
|
-
/* @__PURE__ */ (0,
|
|
9307
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("span", { className: "cv-ctrl-label", "aria-hidden": true, children: "Rechazar" })
|
|
8863
9308
|
] }),
|
|
8864
|
-
/* @__PURE__ */ (0,
|
|
8865
|
-
/* @__PURE__ */ (0,
|
|
9309
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { className: "cv-ctrl-item", children: [
|
|
9310
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
8866
9311
|
"button",
|
|
8867
9312
|
{
|
|
8868
9313
|
type: "button",
|
|
@@ -8870,14 +9315,14 @@ function CallScreen({
|
|
|
8870
9315
|
onClick: () => void call.answer(),
|
|
8871
9316
|
"aria-label": "Contestar",
|
|
8872
9317
|
part: "answer-button",
|
|
8873
|
-
children: /* @__PURE__ */ (0,
|
|
9318
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(Phone, { size: 26 })
|
|
8874
9319
|
}
|
|
8875
9320
|
),
|
|
8876
|
-
/* @__PURE__ */ (0,
|
|
9321
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("span", { className: "cv-ctrl-label", "aria-hidden": true, children: "Contestar" })
|
|
8877
9322
|
] })
|
|
8878
|
-
] }) : /* @__PURE__ */ (0,
|
|
8879
|
-
inCall ? /* @__PURE__ */ (0,
|
|
8880
|
-
/* @__PURE__ */ (0,
|
|
9323
|
+
] }) : /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(import_jsx_runtime6.Fragment, { children: [
|
|
9324
|
+
inCall ? /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { className: "cv-controls-row", children: [
|
|
9325
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
8881
9326
|
Control,
|
|
8882
9327
|
{
|
|
8883
9328
|
icon: view.isMuted ? MicOff : Mic,
|
|
@@ -8887,7 +9332,7 @@ function CallScreen({
|
|
|
8887
9332
|
onClick: () => call.mute(!view.isMuted)
|
|
8888
9333
|
}
|
|
8889
9334
|
),
|
|
8890
|
-
/* @__PURE__ */ (0,
|
|
9335
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
8891
9336
|
Control,
|
|
8892
9337
|
{
|
|
8893
9338
|
icon: view.isOnHold ? Play : Pause,
|
|
@@ -8897,7 +9342,7 @@ function CallScreen({
|
|
|
8897
9342
|
onClick: () => view.isOnHold ? void call.unhold() : void call.hold()
|
|
8898
9343
|
}
|
|
8899
9344
|
),
|
|
8900
|
-
/* @__PURE__ */ (0,
|
|
9345
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
8901
9346
|
Control,
|
|
8902
9347
|
{
|
|
8903
9348
|
icon: ArrowLeftRight,
|
|
@@ -8907,7 +9352,7 @@ function CallScreen({
|
|
|
8907
9352
|
onClick: () => togglePanel("transfer")
|
|
8908
9353
|
}
|
|
8909
9354
|
),
|
|
8910
|
-
/* @__PURE__ */ (0,
|
|
9355
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
8911
9356
|
Control,
|
|
8912
9357
|
{
|
|
8913
9358
|
icon: Grid3x3,
|
|
@@ -8920,8 +9365,8 @@ function CallScreen({
|
|
|
8920
9365
|
}
|
|
8921
9366
|
)
|
|
8922
9367
|
] }) : null,
|
|
8923
|
-
/* @__PURE__ */ (0,
|
|
8924
|
-
/* @__PURE__ */ (0,
|
|
9368
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("div", { className: "cv-controls-primary", children: /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { className: "cv-ctrl-item", children: [
|
|
9369
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
8925
9370
|
"button",
|
|
8926
9371
|
{
|
|
8927
9372
|
type: "button",
|
|
@@ -8929,12 +9374,12 @@ function CallScreen({
|
|
|
8929
9374
|
onClick: () => void call.hangup(),
|
|
8930
9375
|
"aria-label": "Colgar",
|
|
8931
9376
|
part: "hangup-button",
|
|
8932
|
-
children: /* @__PURE__ */ (0,
|
|
9377
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(PhoneOff, { size: 26 })
|
|
8933
9378
|
}
|
|
8934
9379
|
),
|
|
8935
|
-
/* @__PURE__ */ (0,
|
|
9380
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("span", { className: "cv-ctrl-label", "aria-hidden": true, children: "Colgar" })
|
|
8936
9381
|
] }) }),
|
|
8937
|
-
inCall && showKeypad ? /* @__PURE__ */ (0,
|
|
9382
|
+
inCall && showKeypad ? /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("div", { className: "cv-keypad-popover cv-keypad-popover--above", role: "dialog", "aria-label": "Teclado", children: KEYPAD_KEYS.map(([key, letters]) => /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(
|
|
8938
9383
|
"button",
|
|
8939
9384
|
{
|
|
8940
9385
|
type: "button",
|
|
@@ -8944,8 +9389,8 @@ function CallScreen({
|
|
|
8944
9389
|
if (keyTones) playKeyTone(key);
|
|
8945
9390
|
},
|
|
8946
9391
|
children: [
|
|
8947
|
-
/* @__PURE__ */ (0,
|
|
8948
|
-
letters ? /* @__PURE__ */ (0,
|
|
9392
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("b", { children: key }),
|
|
9393
|
+
letters ? /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("small", { children: letters }) : null
|
|
8949
9394
|
]
|
|
8950
9395
|
},
|
|
8951
9396
|
key
|
|
@@ -8955,29 +9400,29 @@ function CallScreen({
|
|
|
8955
9400
|
}
|
|
8956
9401
|
|
|
8957
9402
|
// src/ui/views/ContactsTab.tsx
|
|
8958
|
-
var
|
|
9403
|
+
var import_react20 = __toESM(require_react(), 1);
|
|
8959
9404
|
|
|
8960
9405
|
// src/ui/views/DetailRow.tsx
|
|
8961
|
-
var
|
|
9406
|
+
var import_jsx_runtime7 = __toESM(require_jsx_runtime(), 1);
|
|
8962
9407
|
function DetailRow({
|
|
8963
9408
|
icon: Icon3,
|
|
8964
9409
|
eyebrow,
|
|
8965
9410
|
text,
|
|
8966
9411
|
onClick
|
|
8967
9412
|
}) {
|
|
8968
|
-
const inner = /* @__PURE__ */ (0,
|
|
8969
|
-
/* @__PURE__ */ (0,
|
|
8970
|
-
/* @__PURE__ */ (0,
|
|
8971
|
-
eyebrow ? /* @__PURE__ */ (0,
|
|
8972
|
-
/* @__PURE__ */ (0,
|
|
9413
|
+
const inner = /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(import_jsx_runtime7.Fragment, { children: [
|
|
9414
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)("span", { className: "cv-detail-row-icon", "aria-hidden": true, children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(Icon3, { size: 16 }) }),
|
|
9415
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("span", { className: "cv-detail-row-text", children: [
|
|
9416
|
+
eyebrow ? /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("span", { className: "cv-detail-row-eyebrow", children: eyebrow }) : null,
|
|
9417
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)("span", { className: "cv-detail-row-value", children: text })
|
|
8973
9418
|
] }),
|
|
8974
|
-
onClick ? /* @__PURE__ */ (0,
|
|
9419
|
+
onClick ? /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(ChevronRight, { size: 16, className: "cv-detail-row-chevron", "aria-hidden": true }) : null
|
|
8975
9420
|
] });
|
|
8976
|
-
return onClick ? /* @__PURE__ */ (0,
|
|
9421
|
+
return onClick ? /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("button", { type: "button", className: "cv-detail-row cv-detail-row--action", onClick, children: inner }) : /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("div", { className: "cv-detail-row", children: inner });
|
|
8977
9422
|
}
|
|
8978
9423
|
|
|
8979
9424
|
// src/ui/views/ContactDetail.tsx
|
|
8980
|
-
var
|
|
9425
|
+
var import_jsx_runtime8 = __toESM(require_jsx_runtime(), 1);
|
|
8981
9426
|
function ContactDetail({
|
|
8982
9427
|
contact,
|
|
8983
9428
|
onBack,
|
|
@@ -8987,19 +9432,19 @@ function ContactDetail({
|
|
|
8987
9432
|
const formatIntl2 = useIntlFormatter();
|
|
8988
9433
|
const formatted = formatIntl2(contact.phone);
|
|
8989
9434
|
const name = contact.name ?? formatted;
|
|
8990
|
-
return /* @__PURE__ */ (0,
|
|
8991
|
-
/* @__PURE__ */ (0,
|
|
8992
|
-
/* @__PURE__ */ (0,
|
|
9435
|
+
return /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "cv-detail", role: "region", "aria-label": name, children: [
|
|
9436
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { className: "cv-detail-head", children: /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("button", { type: "button", className: "cv-detail-back", onClick: onBack, children: [
|
|
9437
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)(ArrowLeft, { size: 16, "aria-hidden": true }),
|
|
8993
9438
|
"Contactos"
|
|
8994
9439
|
] }) }),
|
|
8995
|
-
/* @__PURE__ */ (0,
|
|
8996
|
-
/* @__PURE__ */ (0,
|
|
8997
|
-
/* @__PURE__ */ (0,
|
|
8998
|
-
/* @__PURE__ */ (0,
|
|
9440
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "cv-detail-body", children: [
|
|
9441
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "cv-detail-identity", children: [
|
|
9442
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)("span", { className: "cv-detail-avatar", "aria-hidden": true, children: initials(contact.name) }),
|
|
9443
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)("h2", { className: "cv-detail-name", children: name })
|
|
8999
9444
|
] }),
|
|
9000
|
-
/* @__PURE__ */ (0,
|
|
9001
|
-
/* @__PURE__ */ (0,
|
|
9002
|
-
contactAction ? /* @__PURE__ */ (0,
|
|
9445
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "cv-detail-rows", children: [
|
|
9446
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)(DetailRow, { icon: Phone, eyebrow: "Tel\xE9fono", text: formatted }),
|
|
9447
|
+
contactAction ? /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
9003
9448
|
DetailRow,
|
|
9004
9449
|
{
|
|
9005
9450
|
icon: contactAction.icon ?? ExternalLink,
|
|
@@ -9009,14 +9454,14 @@ function ContactDetail({
|
|
|
9009
9454
|
) : null
|
|
9010
9455
|
] })
|
|
9011
9456
|
] }),
|
|
9012
|
-
/* @__PURE__ */ (0,
|
|
9457
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { className: "cv-detail-foot", children: /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(
|
|
9013
9458
|
"button",
|
|
9014
9459
|
{
|
|
9015
9460
|
type: "button",
|
|
9016
9461
|
className: "cv-btn cv-btn--accent cv-detail-call",
|
|
9017
9462
|
onClick: () => void softphone.call(contact.phone),
|
|
9018
9463
|
children: [
|
|
9019
|
-
/* @__PURE__ */ (0,
|
|
9464
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)(Phone, { size: 16, "aria-hidden": true }),
|
|
9020
9465
|
"Llamar"
|
|
9021
9466
|
]
|
|
9022
9467
|
}
|
|
@@ -9025,19 +9470,19 @@ function ContactDetail({
|
|
|
9025
9470
|
}
|
|
9026
9471
|
|
|
9027
9472
|
// src/ui/lib/useInfiniteList.ts
|
|
9028
|
-
var
|
|
9473
|
+
var import_react19 = __toESM(require_react(), 1);
|
|
9029
9474
|
function useInfiniteList(loadPage) {
|
|
9030
|
-
const [items, setItems] = (0,
|
|
9031
|
-
const [loading2, setLoading] = (0,
|
|
9032
|
-
const [loadingMore, setLoadingMore] = (0,
|
|
9033
|
-
const [hasMore, setHasMore] = (0,
|
|
9034
|
-
const [error, setError] = (0,
|
|
9035
|
-
const seqRef = (0,
|
|
9036
|
-
const itemsRef = (0,
|
|
9475
|
+
const [items, setItems] = (0, import_react19.useState)([]);
|
|
9476
|
+
const [loading2, setLoading] = (0, import_react19.useState)(true);
|
|
9477
|
+
const [loadingMore, setLoadingMore] = (0, import_react19.useState)(false);
|
|
9478
|
+
const [hasMore, setHasMore] = (0, import_react19.useState)(true);
|
|
9479
|
+
const [error, setError] = (0, import_react19.useState)(false);
|
|
9480
|
+
const seqRef = (0, import_react19.useRef)(0);
|
|
9481
|
+
const itemsRef = (0, import_react19.useRef)(items);
|
|
9037
9482
|
itemsRef.current = items;
|
|
9038
|
-
const loadingMoreRef = (0,
|
|
9039
|
-
const hasMoreRef = (0,
|
|
9040
|
-
(0,
|
|
9483
|
+
const loadingMoreRef = (0, import_react19.useRef)(false);
|
|
9484
|
+
const hasMoreRef = (0, import_react19.useRef)(true);
|
|
9485
|
+
(0, import_react19.useEffect)(() => {
|
|
9041
9486
|
const seq = ++seqRef.current;
|
|
9042
9487
|
loadingMoreRef.current = false;
|
|
9043
9488
|
hasMoreRef.current = true;
|
|
@@ -9060,7 +9505,7 @@ function useInfiniteList(loadPage) {
|
|
|
9060
9505
|
if (seq === seqRef.current) setLoading(false);
|
|
9061
9506
|
});
|
|
9062
9507
|
}, [loadPage]);
|
|
9063
|
-
const loadMore = (0,
|
|
9508
|
+
const loadMore = (0, import_react19.useCallback)(() => {
|
|
9064
9509
|
if (loadingMoreRef.current || !hasMoreRef.current) return;
|
|
9065
9510
|
const seq = seqRef.current;
|
|
9066
9511
|
loadingMoreRef.current = true;
|
|
@@ -9076,11 +9521,11 @@ function useInfiniteList(loadPage) {
|
|
|
9076
9521
|
if (seq === seqRef.current) setLoadingMore(false);
|
|
9077
9522
|
});
|
|
9078
9523
|
}, [loadPage]);
|
|
9079
|
-
const [containerEl, setContainerEl] = (0,
|
|
9080
|
-
const [sentinelEl, setSentinelEl] = (0,
|
|
9081
|
-
const loadMoreRef = (0,
|
|
9524
|
+
const [containerEl, setContainerEl] = (0, import_react19.useState)(null);
|
|
9525
|
+
const [sentinelEl, setSentinelEl] = (0, import_react19.useState)(null);
|
|
9526
|
+
const loadMoreRef = (0, import_react19.useRef)(loadMore);
|
|
9082
9527
|
loadMoreRef.current = loadMore;
|
|
9083
|
-
(0,
|
|
9528
|
+
(0, import_react19.useEffect)(() => {
|
|
9084
9529
|
if (!containerEl || !sentinelEl) return;
|
|
9085
9530
|
const observer = new IntersectionObserver(
|
|
9086
9531
|
([entry]) => {
|
|
@@ -9103,21 +9548,21 @@ function useInfiniteList(loadPage) {
|
|
|
9103
9548
|
}
|
|
9104
9549
|
|
|
9105
9550
|
// src/ui/views/ContactsTab.tsx
|
|
9106
|
-
var
|
|
9551
|
+
var import_jsx_runtime9 = __toESM(require_jsx_runtime(), 1);
|
|
9107
9552
|
var PAGE = 50;
|
|
9108
9553
|
function ContactsTab({
|
|
9109
9554
|
source,
|
|
9110
9555
|
contactAction
|
|
9111
9556
|
}) {
|
|
9112
9557
|
const softphone = useSoftphone();
|
|
9113
|
-
const [search, setSearch] = (0,
|
|
9114
|
-
const [debouncedSearch, setDebouncedSearch] = (0,
|
|
9115
|
-
const [selected, setSelected] = (0,
|
|
9116
|
-
(0,
|
|
9558
|
+
const [search, setSearch] = (0, import_react20.useState)("");
|
|
9559
|
+
const [debouncedSearch, setDebouncedSearch] = (0, import_react20.useState)("");
|
|
9560
|
+
const [selected, setSelected] = (0, import_react20.useState)(null);
|
|
9561
|
+
(0, import_react20.useEffect)(() => {
|
|
9117
9562
|
const t = setTimeout(() => setDebouncedSearch(search), 200);
|
|
9118
9563
|
return () => clearTimeout(t);
|
|
9119
9564
|
}, [search]);
|
|
9120
|
-
const loadPage = (0,
|
|
9565
|
+
const loadPage = (0, import_react20.useCallback)(
|
|
9121
9566
|
(skip) => source({ search: debouncedSearch, skip, limit: PAGE }).then((page) => ({
|
|
9122
9567
|
items: page.items,
|
|
9123
9568
|
hasMore: skip + page.items.length < page.total
|
|
@@ -9133,10 +9578,10 @@ function ContactsTab({
|
|
|
9133
9578
|
sentinelRef
|
|
9134
9579
|
} = useInfiniteList(loadPage);
|
|
9135
9580
|
const loading2 = loadingPage || search !== debouncedSearch;
|
|
9136
|
-
return /* @__PURE__ */ (0,
|
|
9137
|
-
/* @__PURE__ */ (0,
|
|
9138
|
-
/* @__PURE__ */ (0,
|
|
9139
|
-
/* @__PURE__ */ (0,
|
|
9581
|
+
return /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { className: "cv-view", children: [
|
|
9582
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)("div", { className: "cv-list-head", children: /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { className: "cv-search-field", children: [
|
|
9583
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)(Search, { className: "cv-search-icon", size: 15, "aria-hidden": true }),
|
|
9584
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
9140
9585
|
"input",
|
|
9141
9586
|
{
|
|
9142
9587
|
className: "cv-search cv-search--icon",
|
|
@@ -9146,41 +9591,41 @@ function ContactsTab({
|
|
|
9146
9591
|
"aria-label": "Buscar contactos"
|
|
9147
9592
|
}
|
|
9148
9593
|
),
|
|
9149
|
-
search ? /* @__PURE__ */ (0,
|
|
9594
|
+
search ? /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
9150
9595
|
"button",
|
|
9151
9596
|
{
|
|
9152
9597
|
type: "button",
|
|
9153
9598
|
className: "cv-search-clear",
|
|
9154
9599
|
onClick: () => setSearch(""),
|
|
9155
9600
|
"aria-label": "Limpiar b\xFAsqueda",
|
|
9156
|
-
children: /* @__PURE__ */ (0,
|
|
9601
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(X, { size: 14 })
|
|
9157
9602
|
}
|
|
9158
9603
|
) : null
|
|
9159
9604
|
] }) }),
|
|
9160
|
-
/* @__PURE__ */ (0,
|
|
9605
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)("div", { className: "cv-list", ref: containerRef, children: loading2 ? (
|
|
9161
9606
|
// The spinner alone was silent to a screen reader — nothing else on this state carries
|
|
9162
9607
|
// the word "loading" for it to announce. `role="status"` + real text fixes both the
|
|
9163
9608
|
// accessibility gap and, incidentally, gives the icon something to be decorative NEXT TO
|
|
9164
9609
|
// rather than being the sole carrier of the information itself.
|
|
9165
|
-
/* @__PURE__ */ (0,
|
|
9166
|
-
/* @__PURE__ */ (0,
|
|
9167
|
-
/* @__PURE__ */ (0,
|
|
9610
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { className: "cv-empty", role: "status", children: [
|
|
9611
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)(LoaderCircle, { className: "cv-empty-spinner", size: 18, "aria-hidden": true }),
|
|
9612
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)("span", { className: "cv-empty-title", children: "Cargando\u2026" })
|
|
9168
9613
|
] })
|
|
9169
|
-
) : items.length === 0 ? /* @__PURE__ */ (0,
|
|
9170
|
-
/* @__PURE__ */ (0,
|
|
9171
|
-
/* @__PURE__ */ (0,
|
|
9172
|
-
/* @__PURE__ */ (0,
|
|
9173
|
-
] }) : /* @__PURE__ */ (0,
|
|
9614
|
+
) : items.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { className: "cv-empty", children: [
|
|
9615
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)("span", { className: "cv-empty-icon", "aria-hidden": true, children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(Users, { size: 20 }) }),
|
|
9616
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)("p", { className: "cv-empty-title", children: search ? "Sin resultados" : "No tienes contactos" }),
|
|
9617
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)("p", { className: "cv-empty-sub", children: search ? `Nada coincide con \xAB${search}\xBB.` : "Tus contactos con tel\xE9fono aparecer\xE1n aqu\xED." })
|
|
9618
|
+
] }) : /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(import_jsx_runtime9.Fragment, { children: [
|
|
9174
9619
|
items.map((c) => (
|
|
9175
9620
|
// A row, not a button: the name area and the call action are separate controls, so
|
|
9176
9621
|
// neither is nested inside the other (nested interactives are invalid + inaccessible).
|
|
9177
|
-
/* @__PURE__ */ (0,
|
|
9178
|
-
/* @__PURE__ */ (0,
|
|
9179
|
-
/* @__PURE__ */ (0,
|
|
9180
|
-
/* @__PURE__ */ (0,
|
|
9181
|
-
/* @__PURE__ */ (0,
|
|
9622
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { className: "cv-item", children: [
|
|
9623
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)("span", { className: "cv-item-avatar", "aria-hidden": true, children: initials(c.name) === "#" ? /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(User, { size: 17 }) : initials(c.name) }),
|
|
9624
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("button", { type: "button", className: "cv-item-main", onClick: () => setSelected(c), children: [
|
|
9625
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)("span", { className: "cv-item-name", children: c.name ?? c.phone }),
|
|
9626
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)("span", { className: "cv-item-sub", children: c.phone })
|
|
9182
9627
|
] }),
|
|
9183
|
-
/* @__PURE__ */ (0,
|
|
9628
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
9184
9629
|
"button",
|
|
9185
9630
|
{
|
|
9186
9631
|
type: "button",
|
|
@@ -9188,15 +9633,15 @@ function ContactsTab({
|
|
|
9188
9633
|
"data-tone": "accent",
|
|
9189
9634
|
"aria-label": `Llamar a ${c.name ?? c.phone}`,
|
|
9190
9635
|
onClick: () => void softphone.call(c.phone),
|
|
9191
|
-
children: /* @__PURE__ */ (0,
|
|
9636
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(Phone, { size: 16 })
|
|
9192
9637
|
}
|
|
9193
9638
|
)
|
|
9194
9639
|
] }, c.id)
|
|
9195
9640
|
)),
|
|
9196
|
-
hasMore ? /* @__PURE__ */ (0,
|
|
9197
|
-
loadingMore ? /* @__PURE__ */ (0,
|
|
9641
|
+
hasMore ? /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("div", { ref: sentinelRef, className: "cv-list-sentinel", "aria-hidden": true }) : null,
|
|
9642
|
+
loadingMore ? /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("div", { className: "cv-list-loading-more", role: "status", "aria-label": "Cargando m\xE1s contactos", children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(LoaderCircle, { className: "cv-list-loading-more-spinner", size: 14, "aria-hidden": true }) }) : null
|
|
9198
9643
|
] }) }),
|
|
9199
|
-
selected ? /* @__PURE__ */ (0,
|
|
9644
|
+
selected ? /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
9200
9645
|
ContactDetail,
|
|
9201
9646
|
{
|
|
9202
9647
|
contact: selected,
|
|
@@ -9208,13 +9653,13 @@ function ContactsTab({
|
|
|
9208
9653
|
}
|
|
9209
9654
|
|
|
9210
9655
|
// src/ui/views/HistoryTab.tsx
|
|
9211
|
-
var
|
|
9656
|
+
var import_react24 = __toESM(require_react(), 1);
|
|
9212
9657
|
|
|
9213
9658
|
// src/ui/views/HistoryDetail.tsx
|
|
9214
|
-
var
|
|
9659
|
+
var import_react22 = __toESM(require_react(), 1);
|
|
9215
9660
|
|
|
9216
9661
|
// src/ui/views/history-format.tsx
|
|
9217
|
-
var
|
|
9662
|
+
var import_jsx_runtime10 = __toESM(require_jsx_runtime(), 1);
|
|
9218
9663
|
var OUTCOME_LABELS = {
|
|
9219
9664
|
"no-answer": "No contestada",
|
|
9220
9665
|
busy: "Ocupada",
|
|
@@ -9235,8 +9680,8 @@ function fullDateLabel(at) {
|
|
|
9235
9680
|
});
|
|
9236
9681
|
}
|
|
9237
9682
|
function Icon2({ entry }) {
|
|
9238
|
-
if (entry.missed) return /* @__PURE__ */ (0,
|
|
9239
|
-
return entry.direction === "inbound" ? /* @__PURE__ */ (0,
|
|
9683
|
+
if (entry.missed) return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(PhoneMissed, { size: 16 });
|
|
9684
|
+
return entry.direction === "inbound" ? /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(PhoneIncoming, { size: 16 }) : /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(PhoneOutgoing, { size: 16 });
|
|
9240
9685
|
}
|
|
9241
9686
|
function statusIcon(entry) {
|
|
9242
9687
|
if (entry.missed) return PhoneMissed;
|
|
@@ -9248,16 +9693,16 @@ function statusTone(entry) {
|
|
|
9248
9693
|
}
|
|
9249
9694
|
|
|
9250
9695
|
// src/ui/views/HistoryDetail.tsx
|
|
9251
|
-
var
|
|
9696
|
+
var import_jsx_runtime11 = __toESM(require_jsx_runtime(), 1);
|
|
9252
9697
|
function HandlerChain({ handlers }) {
|
|
9253
|
-
return /* @__PURE__ */ (0,
|
|
9698
|
+
return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("span", { className: "cv-detail-handlers", children: handlers.map((h, i) => {
|
|
9254
9699
|
const isLast = i === handlers.length - 1;
|
|
9255
9700
|
const label = h.name ?? `Ext. ${h.extension}`;
|
|
9256
|
-
return /* @__PURE__ */ (0,
|
|
9257
|
-
i > 0 ? /* @__PURE__ */ (0,
|
|
9258
|
-
/* @__PURE__ */ (0,
|
|
9701
|
+
return /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("span", { className: "cv-detail-handler-hop", children: [
|
|
9702
|
+
i > 0 ? /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(ArrowRight, { size: 12, className: "cv-detail-handler-arrow", "aria-hidden": true }) : null,
|
|
9703
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("span", { className: "cv-detail-handler-chip", "data-tone": isLast ? "accent" : void 0, children: [
|
|
9259
9704
|
label,
|
|
9260
|
-
h.name ? /* @__PURE__ */ (0,
|
|
9705
|
+
h.name ? /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("span", { className: "cv-detail-handler-ext", children: [
|
|
9261
9706
|
"\xB7 ",
|
|
9262
9707
|
h.extension
|
|
9263
9708
|
] }) : null
|
|
@@ -9265,15 +9710,26 @@ function HandlerChain({ handlers }) {
|
|
|
9265
9710
|
] }, `${h.extension}-${i}`);
|
|
9266
9711
|
}) });
|
|
9267
9712
|
}
|
|
9713
|
+
function outboundFrom(entry, known, formatIntl2) {
|
|
9714
|
+
if (entry.direction !== "outbound" || !entry.from) return null;
|
|
9715
|
+
const number = formatIntl2(`+${entry.from}`);
|
|
9716
|
+
const label = known?.numbers.find((n) => n.number === entry.from)?.label;
|
|
9717
|
+
if (!label) return number;
|
|
9718
|
+
return /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(import_jsx_runtime11.Fragment, { children: [
|
|
9719
|
+
label,
|
|
9720
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)("span", { className: "cv-detail-row-sub", children: number })
|
|
9721
|
+
] });
|
|
9722
|
+
}
|
|
9268
9723
|
function HistoryDetail({
|
|
9269
9724
|
entry,
|
|
9270
9725
|
onBack
|
|
9271
9726
|
}) {
|
|
9272
9727
|
const softphone = useSoftphone();
|
|
9273
9728
|
const formatIntl2 = useIntlFormatter();
|
|
9274
|
-
const
|
|
9275
|
-
const [
|
|
9276
|
-
(0,
|
|
9729
|
+
const knownNumbers = useKnownOutboundNumbers(outboundNumberStore(softphone));
|
|
9730
|
+
const [detail, setDetail] = (0, import_react22.useState)(null);
|
|
9731
|
+
const [loadingDetail, setLoadingDetail] = (0, import_react22.useState)(false);
|
|
9732
|
+
(0, import_react22.useEffect)(() => {
|
|
9277
9733
|
const load = entry.loadDetail;
|
|
9278
9734
|
if (!load) return;
|
|
9279
9735
|
let cancelled = false;
|
|
@@ -9286,53 +9742,55 @@ function HistoryDetail({
|
|
|
9286
9742
|
}, [entry]);
|
|
9287
9743
|
const formatted = formatIntl2(entry.number);
|
|
9288
9744
|
const name = entry.name ?? formatted;
|
|
9745
|
+
const from = outboundFrom(entry, knownNumbers, formatIntl2);
|
|
9289
9746
|
const handledBy = detail?.handledBy ?? entry.handledBy;
|
|
9290
9747
|
const recordingUrls = detail?.recordingUrls ?? [];
|
|
9291
9748
|
const loadingRecording = entry.recorded && loadingDetail && recordingUrls.length === 0;
|
|
9292
9749
|
const statusText = entry.missed ? entry.outcome ? OUTCOME_LABELS[entry.outcome] : "Perdida" : "Contestada";
|
|
9293
9750
|
const handlerLabel = handledBy.length > 1 ? "Ruta de la llamada" : entry.direction === "outbound" ? "Realizada por" : "Atendida por";
|
|
9294
|
-
return /* @__PURE__ */ (0,
|
|
9295
|
-
/* @__PURE__ */ (0,
|
|
9296
|
-
/* @__PURE__ */ (0,
|
|
9751
|
+
return /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { className: "cv-detail", role: "region", "aria-label": name, children: [
|
|
9752
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)("div", { className: "cv-detail-head", children: /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("button", { type: "button", className: "cv-detail-back", onClick: onBack, children: [
|
|
9753
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(ArrowLeft, { size: 16, "aria-hidden": true }),
|
|
9297
9754
|
"Historial"
|
|
9298
9755
|
] }) }),
|
|
9299
|
-
/* @__PURE__ */ (0,
|
|
9300
|
-
/* @__PURE__ */ (0,
|
|
9301
|
-
/* @__PURE__ */ (0,
|
|
9302
|
-
/* @__PURE__ */ (0,
|
|
9303
|
-
/* @__PURE__ */ (0,
|
|
9756
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { className: "cv-detail-body", children: [
|
|
9757
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { className: "cv-detail-identity", children: [
|
|
9758
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)("span", { className: "cv-detail-avatar", "data-tone": statusTone(entry), "aria-hidden": true, children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(Icon2, { entry }) }),
|
|
9759
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)("h2", { className: "cv-detail-name", "data-tone": entry.missed ? "danger" : void 0, children: name }),
|
|
9760
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("p", { className: "cv-detail-meta", children: [
|
|
9304
9761
|
statusText,
|
|
9305
9762
|
" \xB7 ",
|
|
9306
9763
|
timeLabel(entry.at)
|
|
9307
9764
|
] })
|
|
9308
9765
|
] }),
|
|
9309
|
-
entry.recorded ? /* @__PURE__ */ (0,
|
|
9310
|
-
/* @__PURE__ */ (0,
|
|
9766
|
+
entry.recorded ? /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("div", { className: "cv-detail-recording", children: loadingRecording ? /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { className: "cv-detail-recording-status", children: [
|
|
9767
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(LoaderCircle, { size: 14, className: "cv-detail-recording-spinner", "aria-hidden": true }),
|
|
9311
9768
|
"Cargando grabaci\xF3n\u2026"
|
|
9312
|
-
] }) : recordingUrls.length > 0 ? /* @__PURE__ */ (0,
|
|
9313
|
-
/* @__PURE__ */ (0,
|
|
9314
|
-
recordingUrls.map((url) => /* @__PURE__ */ (0,
|
|
9315
|
-
] }) : /* @__PURE__ */ (0,
|
|
9316
|
-
/* @__PURE__ */ (0,
|
|
9769
|
+
] }) : recordingUrls.length > 0 ? /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(import_jsx_runtime11.Fragment, { children: [
|
|
9770
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)("p", { className: "cv-detail-recording-label", children: recordingUrls.length === 1 ? "Grabaci\xF3n" : "Grabaciones" }),
|
|
9771
|
+
recordingUrls.map((url) => /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("audio", { controls: true, src: url, className: "cv-detail-audio", preload: "metadata" }, url))
|
|
9772
|
+
] }) : /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("p", { className: "cv-detail-recording-status cv-detail-recording-status--warn", children: "No se pudo cargar la grabaci\xF3n ahora. Int\xE9ntalo de nuevo m\xE1s tarde." }) }) : /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("p", { className: "cv-detail-recording-status", children: [
|
|
9773
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(Mic, { size: 14, "aria-hidden": true }),
|
|
9317
9774
|
"Esta llamada no se grab\xF3."
|
|
9318
9775
|
] }),
|
|
9319
|
-
/* @__PURE__ */ (0,
|
|
9320
|
-
/* @__PURE__ */ (0,
|
|
9321
|
-
/* @__PURE__ */ (0,
|
|
9322
|
-
entry.durationSec > 0 ? /* @__PURE__ */ (0,
|
|
9323
|
-
/* @__PURE__ */ (0,
|
|
9324
|
-
handledBy.length > 0 ? /* @__PURE__ */ (0,
|
|
9325
|
-
entry.direction === "inbound" && entry.did ? /* @__PURE__ */ (0,
|
|
9776
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { className: "cv-detail-rows", children: [
|
|
9777
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(DetailRow, { icon: statusIcon(entry), eyebrow: "Estado", text: statusText }),
|
|
9778
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(DetailRow, { icon: CalendarClock, eyebrow: "Fecha y hora", text: fullDateLabel(entry.at) }),
|
|
9779
|
+
entry.durationSec > 0 ? /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(DetailRow, { icon: Timer, eyebrow: "Duraci\xF3n", text: formatDuration(entry.durationSec) }) : null,
|
|
9780
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(DetailRow, { icon: Phone, eyebrow: "N\xFAmero", text: formatted }),
|
|
9781
|
+
handledBy.length > 0 ? /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(DetailRow, { icon: User, eyebrow: handlerLabel, text: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(HandlerChain, { handlers: handledBy }) }) : null,
|
|
9782
|
+
entry.direction === "inbound" && entry.did ? /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(DetailRow, { icon: Hash, eyebrow: "N\xFAmero marcado (DID)", text: formatIntl2(entry.did) }) : null,
|
|
9783
|
+
from ? /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(DetailRow, { icon: PhoneOutgoing, eyebrow: "Llamada desde", text: from }) : null
|
|
9326
9784
|
] })
|
|
9327
9785
|
] }),
|
|
9328
|
-
/* @__PURE__ */ (0,
|
|
9786
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)("div", { className: "cv-detail-foot", children: /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(
|
|
9329
9787
|
"button",
|
|
9330
9788
|
{
|
|
9331
9789
|
type: "button",
|
|
9332
9790
|
className: "cv-btn cv-btn--accent cv-detail-call",
|
|
9333
9791
|
onClick: () => void softphone.call(entry.number),
|
|
9334
9792
|
children: [
|
|
9335
|
-
/* @__PURE__ */ (0,
|
|
9793
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(Phone, { size: 16, "aria-hidden": true }),
|
|
9336
9794
|
"Llamar"
|
|
9337
9795
|
]
|
|
9338
9796
|
}
|
|
@@ -9341,7 +9799,7 @@ function HistoryDetail({
|
|
|
9341
9799
|
}
|
|
9342
9800
|
|
|
9343
9801
|
// src/ui/views/HistoryTab.tsx
|
|
9344
|
-
var
|
|
9802
|
+
var import_jsx_runtime12 = __toESM(require_jsx_runtime(), 1);
|
|
9345
9803
|
var PAGE2 = 30;
|
|
9346
9804
|
function startOfDay(at) {
|
|
9347
9805
|
return new Date(at.getFullYear(), at.getMonth(), at.getDate()).getTime();
|
|
@@ -9367,9 +9825,9 @@ function PersonFilter({
|
|
|
9367
9825
|
directory,
|
|
9368
9826
|
onChange
|
|
9369
9827
|
}) {
|
|
9370
|
-
const [open, setOpen] = (0,
|
|
9371
|
-
const rootRef = (0,
|
|
9372
|
-
(0,
|
|
9828
|
+
const [open, setOpen] = (0, import_react24.useState)(false);
|
|
9829
|
+
const rootRef = (0, import_react24.useRef)(null);
|
|
9830
|
+
(0, import_react24.useEffect)(() => {
|
|
9373
9831
|
if (!open) return;
|
|
9374
9832
|
const root = rootRef.current?.getRootNode() ?? document;
|
|
9375
9833
|
const onDown = (e) => {
|
|
@@ -9391,8 +9849,8 @@ function PersonFilter({
|
|
|
9391
9849
|
...directory.people.filter((p) => !directory.me || p.userId !== directory.me.userId).map((p) => ({ v: p.userId, label: p.name ?? "Sin nombre" }))
|
|
9392
9850
|
];
|
|
9393
9851
|
const label = options.find((o) => o.v === value)?.label ?? "Todas las personas";
|
|
9394
|
-
return /* @__PURE__ */ (0,
|
|
9395
|
-
/* @__PURE__ */ (0,
|
|
9852
|
+
return /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { className: "cv-person-filter", ref: rootRef, children: [
|
|
9853
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(
|
|
9396
9854
|
"button",
|
|
9397
9855
|
{
|
|
9398
9856
|
type: "button",
|
|
@@ -9401,13 +9859,13 @@ function PersonFilter({
|
|
|
9401
9859
|
"aria-haspopup": "listbox",
|
|
9402
9860
|
"aria-expanded": open,
|
|
9403
9861
|
children: [
|
|
9404
|
-
/* @__PURE__ */ (0,
|
|
9405
|
-
/* @__PURE__ */ (0,
|
|
9406
|
-
/* @__PURE__ */ (0,
|
|
9862
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(Users, { size: 13, "aria-hidden": true }),
|
|
9863
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)("span", { className: "cv-person-filter-label", children: label }),
|
|
9864
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(ChevronDown, { size: 13, className: "cv-person-filter-caret", "data-open": open, "aria-hidden": true })
|
|
9407
9865
|
]
|
|
9408
9866
|
}
|
|
9409
9867
|
),
|
|
9410
|
-
open ? /* @__PURE__ */ (0,
|
|
9868
|
+
open ? /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("div", { className: "cv-person-filter-pop", role: "listbox", children: options.map((opt) => /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(
|
|
9411
9869
|
"button",
|
|
9412
9870
|
{
|
|
9413
9871
|
type: "button",
|
|
@@ -9419,8 +9877,8 @@ function PersonFilter({
|
|
|
9419
9877
|
setOpen(false);
|
|
9420
9878
|
},
|
|
9421
9879
|
children: [
|
|
9422
|
-
/* @__PURE__ */ (0,
|
|
9423
|
-
/* @__PURE__ */ (0,
|
|
9880
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)("span", { className: "cv-person-filter-name", children: opt.label }),
|
|
9881
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(Check, { size: 14, className: "cv-person-filter-check", "data-on": opt.v === value, "aria-hidden": true })
|
|
9424
9882
|
]
|
|
9425
9883
|
},
|
|
9426
9884
|
opt.v || "all"
|
|
@@ -9431,11 +9889,11 @@ function HistoryTab({ source }) {
|
|
|
9431
9889
|
const softphone = useSoftphone();
|
|
9432
9890
|
const formatIntl2 = useIntlFormatter();
|
|
9433
9891
|
const now = Date.now();
|
|
9434
|
-
const [status, setStatus] = (0,
|
|
9435
|
-
const [agentId, setAgentId] = (0,
|
|
9436
|
-
const [directory, setDirectory] = (0,
|
|
9437
|
-
const [selected, setSelected] = (0,
|
|
9438
|
-
(0,
|
|
9892
|
+
const [status, setStatus] = (0, import_react24.useState)("all");
|
|
9893
|
+
const [agentId, setAgentId] = (0, import_react24.useState)("");
|
|
9894
|
+
const [directory, setDirectory] = (0, import_react24.useState)(null);
|
|
9895
|
+
const [selected, setSelected] = (0, import_react24.useState)(null);
|
|
9896
|
+
(0, import_react24.useEffect)(() => {
|
|
9439
9897
|
const listAgents = softphone.sources?.listAgents;
|
|
9440
9898
|
if (!listAgents) return;
|
|
9441
9899
|
let cancelled = false;
|
|
@@ -9445,7 +9903,7 @@ function HistoryTab({ source }) {
|
|
|
9445
9903
|
cancelled = true;
|
|
9446
9904
|
};
|
|
9447
9905
|
}, [softphone]);
|
|
9448
|
-
const loadPage = (0,
|
|
9906
|
+
const loadPage = (0, import_react24.useCallback)(
|
|
9449
9907
|
(skip) => source({
|
|
9450
9908
|
skip,
|
|
9451
9909
|
limit: PAGE2,
|
|
@@ -9456,9 +9914,9 @@ function HistoryTab({ source }) {
|
|
|
9456
9914
|
);
|
|
9457
9915
|
const { items: entries, loading: loading2, loadingMore, hasMore, containerRef, sentinelRef } = useInfiniteList(loadPage);
|
|
9458
9916
|
const groups = groupByDay(entries, now);
|
|
9459
|
-
return /* @__PURE__ */ (0,
|
|
9460
|
-
/* @__PURE__ */ (0,
|
|
9461
|
-
/* @__PURE__ */ (0,
|
|
9917
|
+
return /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { className: "cv-view", children: [
|
|
9918
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { className: "cv-list-head", children: [
|
|
9919
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)("div", { className: "cv-segmented", role: "tablist", "aria-label": "Filtrar por estado", children: ["all", "missed"].map((key) => /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
9462
9920
|
"button",
|
|
9463
9921
|
{
|
|
9464
9922
|
type: "button",
|
|
@@ -9470,36 +9928,36 @@ function HistoryTab({ source }) {
|
|
|
9470
9928
|
},
|
|
9471
9929
|
key
|
|
9472
9930
|
)) }),
|
|
9473
|
-
directory ? /* @__PURE__ */ (0,
|
|
9931
|
+
directory ? /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(PersonFilter, { value: agentId, directory, onChange: setAgentId }) : null
|
|
9474
9932
|
] }),
|
|
9475
|
-
/* @__PURE__ */ (0,
|
|
9476
|
-
loading2 && /* @__PURE__ */ (0,
|
|
9477
|
-
!loading2 && entries.length === 0 && /* @__PURE__ */ (0,
|
|
9478
|
-
!loading2 && groups.map((group) => /* @__PURE__ */ (0,
|
|
9479
|
-
/* @__PURE__ */ (0,
|
|
9480
|
-
group.rows.map((e) => /* @__PURE__ */ (0,
|
|
9481
|
-
/* @__PURE__ */ (0,
|
|
9482
|
-
/* @__PURE__ */ (0,
|
|
9933
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { className: "cv-list", ref: containerRef, children: [
|
|
9934
|
+
loading2 && /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("div", { className: "cv-empty", children: "Cargando\u2026" }),
|
|
9935
|
+
!loading2 && entries.length === 0 && /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("div", { className: "cv-empty", children: status === "missed" ? "Sin llamadas perdidas" : "Sin llamadas recientes" }),
|
|
9936
|
+
!loading2 && groups.map((group) => /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { children: [
|
|
9937
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)("div", { className: "cv-history-day", children: group.label }),
|
|
9938
|
+
group.rows.map((e) => /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { className: "cv-item", children: [
|
|
9939
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)("span", { className: "cv-item-avatar", "data-tone": statusTone(e), "aria-hidden": true, children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(Icon2, { entry: e }) }),
|
|
9940
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(
|
|
9483
9941
|
"button",
|
|
9484
9942
|
{
|
|
9485
9943
|
type: "button",
|
|
9486
9944
|
className: "cv-item-main",
|
|
9487
9945
|
onClick: () => setSelected(e),
|
|
9488
9946
|
children: [
|
|
9489
|
-
/* @__PURE__ */ (0,
|
|
9490
|
-
/* @__PURE__ */ (0,
|
|
9491
|
-
/* @__PURE__ */ (0,
|
|
9492
|
-
e.missed ? /* @__PURE__ */ (0,
|
|
9947
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)("span", { className: "cv-item-name", "data-tone": e.missed ? "danger" : void 0, children: e.name ?? formatIntl2(e.number) }),
|
|
9948
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("span", { className: "cv-item-sub", children: [
|
|
9949
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)("span", { className: "tabular-nums", children: timeLabel(e.at) }),
|
|
9950
|
+
e.missed ? /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("span", { className: "cv-item-sub-outcome", children: [
|
|
9493
9951
|
" ",
|
|
9494
9952
|
"\xB7 ",
|
|
9495
9953
|
e.outcome ? OUTCOME_LABELS[e.outcome] : "Perdida"
|
|
9496
9954
|
] }) : e.durationSec > 0 && ` \xB7 ${formatDuration(e.durationSec)}`,
|
|
9497
|
-
e.recorded ? /* @__PURE__ */ (0,
|
|
9955
|
+
e.recorded ? /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(Mic, { size: 11, className: "cv-item-sub-rec", "aria-label": "Grabada" }) : null
|
|
9498
9956
|
] })
|
|
9499
9957
|
]
|
|
9500
9958
|
}
|
|
9501
9959
|
),
|
|
9502
|
-
/* @__PURE__ */ (0,
|
|
9960
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
9503
9961
|
"button",
|
|
9504
9962
|
{
|
|
9505
9963
|
type: "button",
|
|
@@ -9507,30 +9965,30 @@ function HistoryTab({ source }) {
|
|
|
9507
9965
|
"data-tone": "accent",
|
|
9508
9966
|
"aria-label": `Llamar a ${e.name ?? e.number}`,
|
|
9509
9967
|
onClick: () => void softphone.call(e.number),
|
|
9510
|
-
children: /* @__PURE__ */ (0,
|
|
9968
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(Phone, { size: 16 })
|
|
9511
9969
|
}
|
|
9512
9970
|
)
|
|
9513
9971
|
] }, e.id))
|
|
9514
9972
|
] }, group.label)),
|
|
9515
|
-
!loading2 && hasMore ? /* @__PURE__ */ (0,
|
|
9516
|
-
loadingMore ? /* @__PURE__ */ (0,
|
|
9973
|
+
!loading2 && hasMore ? /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("div", { ref: sentinelRef, className: "cv-list-sentinel", "aria-hidden": true }) : null,
|
|
9974
|
+
loadingMore ? /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("div", { className: "cv-list-loading-more", role: "status", "aria-label": "Cargando m\xE1s llamadas", children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(LoaderCircle, { className: "cv-list-loading-more-spinner", size: 14, "aria-hidden": true }) }) : null
|
|
9517
9975
|
] }),
|
|
9518
|
-
selected ? /* @__PURE__ */ (0,
|
|
9976
|
+
selected ? /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(HistoryDetail, { entry: selected, onBack: () => setSelected(null) }) : null
|
|
9519
9977
|
] });
|
|
9520
9978
|
}
|
|
9521
9979
|
|
|
9522
9980
|
// src/ui/views/SettingsTab.tsx
|
|
9523
|
-
var
|
|
9981
|
+
var import_react34 = __toESM(require_react(), 1);
|
|
9524
9982
|
|
|
9525
9983
|
// src/ui/audio/ringtone-store.ts
|
|
9526
|
-
var
|
|
9984
|
+
var stores2 = /* @__PURE__ */ new WeakMap();
|
|
9527
9985
|
function ringtoneStore(softphone) {
|
|
9528
9986
|
const source = softphone.sources?.ringtones;
|
|
9529
9987
|
if (!source) return null;
|
|
9530
|
-
let store =
|
|
9988
|
+
let store = stores2.get(softphone);
|
|
9531
9989
|
if (!store) {
|
|
9532
9990
|
store = createRingtoneStore(source);
|
|
9533
|
-
|
|
9991
|
+
stores2.set(softphone, store);
|
|
9534
9992
|
}
|
|
9535
9993
|
return store;
|
|
9536
9994
|
}
|
|
@@ -9627,19 +10085,19 @@ async function decodeRingtone(url) {
|
|
|
9627
10085
|
}
|
|
9628
10086
|
|
|
9629
10087
|
// src/ui/views/SettingsSection.tsx
|
|
9630
|
-
var
|
|
10088
|
+
var import_jsx_runtime13 = __toESM(require_jsx_runtime(), 1);
|
|
9631
10089
|
function SettingsSection({
|
|
9632
10090
|
title,
|
|
9633
10091
|
children
|
|
9634
10092
|
}) {
|
|
9635
|
-
return /* @__PURE__ */ (0,
|
|
9636
|
-
/* @__PURE__ */ (0,
|
|
9637
|
-
/* @__PURE__ */ (0,
|
|
10093
|
+
return /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("section", { className: "cv-settings-section", children: [
|
|
10094
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)("h3", { className: "cv-settings-section-title", children: title }),
|
|
10095
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)("div", { className: "cv-settings-section-body", children })
|
|
9638
10096
|
] });
|
|
9639
10097
|
}
|
|
9640
10098
|
|
|
9641
10099
|
// src/ui/views/settings/SettingsNavRow.tsx
|
|
9642
|
-
var
|
|
10100
|
+
var import_jsx_runtime14 = __toESM(require_jsx_runtime(), 1);
|
|
9643
10101
|
function SettingsNavRow({
|
|
9644
10102
|
icon: Icon3,
|
|
9645
10103
|
title,
|
|
@@ -9647,44 +10105,46 @@ function SettingsNavRow({
|
|
|
9647
10105
|
onOpen,
|
|
9648
10106
|
rowRef
|
|
9649
10107
|
}) {
|
|
9650
|
-
const inner = /* @__PURE__ */ (0,
|
|
9651
|
-
/* @__PURE__ */ (0,
|
|
9652
|
-
/* @__PURE__ */ (0,
|
|
9653
|
-
/* @__PURE__ */ (0,
|
|
9654
|
-
/* @__PURE__ */ (0,
|
|
10108
|
+
const inner = /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(import_jsx_runtime14.Fragment, { children: [
|
|
10109
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)("span", { className: "cv-settings-row-icon", "aria-hidden": true, children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(Icon3, { size: 16 }) }),
|
|
10110
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("span", { className: "cv-settings-nav-text", children: [
|
|
10111
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)("span", { className: "cv-settings-nav-title", children: title }),
|
|
10112
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)("span", { className: "cv-settings-nav-value", children: value })
|
|
9655
10113
|
] }),
|
|
9656
|
-
onOpen ? /* @__PURE__ */ (0,
|
|
10114
|
+
onOpen ? /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(ChevronRight, { size: 16, className: "cv-settings-nav-chevron", "aria-hidden": true }) : null
|
|
9657
10115
|
] });
|
|
9658
|
-
return onOpen ? /* @__PURE__ */ (0,
|
|
10116
|
+
return onOpen ? /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("button", { type: "button", className: "cv-settings-nav", onClick: onOpen, ref: rowRef, children: inner }) : /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("div", { className: "cv-settings-nav cv-settings-nav--static", children: inner });
|
|
9659
10117
|
}
|
|
9660
10118
|
|
|
9661
10119
|
// src/ui/views/settings/DevicePage.tsx
|
|
9662
|
-
var
|
|
10120
|
+
var import_react28 = __toESM(require_react(), 1);
|
|
9663
10121
|
|
|
9664
10122
|
// src/ui/views/settings/ChoiceList.tsx
|
|
9665
|
-
var
|
|
9666
|
-
var
|
|
10123
|
+
var import_react26 = __toESM(require_react(), 1);
|
|
10124
|
+
var import_jsx_runtime15 = __toESM(require_jsx_runtime(), 1);
|
|
9667
10125
|
function ChoiceList({
|
|
9668
10126
|
label,
|
|
9669
10127
|
choices,
|
|
9670
10128
|
value,
|
|
9671
10129
|
onSelect,
|
|
9672
|
-
onReselect
|
|
10130
|
+
onReselect,
|
|
10131
|
+
disabled = false
|
|
9673
10132
|
}) {
|
|
9674
|
-
const name = (0,
|
|
9675
|
-
const pointer = (0,
|
|
9676
|
-
return /* @__PURE__ */ (0,
|
|
10133
|
+
const name = (0, import_react26.useId)();
|
|
10134
|
+
const pointer = (0, import_react26.useRef)(false);
|
|
10135
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("div", { className: "cv-choices", role: "radiogroup", "aria-label": label, "aria-disabled": disabled || void 0, children: choices.map((c) => {
|
|
9677
10136
|
const checked = c.value === value;
|
|
9678
|
-
return /* @__PURE__ */ (0,
|
|
10137
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(
|
|
9679
10138
|
"label",
|
|
9680
10139
|
{
|
|
9681
10140
|
className: "cv-choice",
|
|
9682
10141
|
"data-checked": checked || void 0,
|
|
10142
|
+
"data-disabled": disabled || void 0,
|
|
9683
10143
|
onPointerDown: () => {
|
|
9684
10144
|
pointer.current = true;
|
|
9685
10145
|
},
|
|
9686
10146
|
children: [
|
|
9687
|
-
/* @__PURE__ */ (0,
|
|
10147
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
9688
10148
|
"input",
|
|
9689
10149
|
{
|
|
9690
10150
|
type: "radio",
|
|
@@ -9695,22 +10155,26 @@ function ChoiceList({
|
|
|
9695
10155
|
onChange: () => {
|
|
9696
10156
|
const via = pointer.current ? "pointer" : "keyboard";
|
|
9697
10157
|
pointer.current = false;
|
|
9698
|
-
onSelect(c.value, via);
|
|
10158
|
+
if (!disabled) onSelect(c.value, via);
|
|
9699
10159
|
},
|
|
9700
10160
|
onClick: () => {
|
|
9701
10161
|
if (c.value === value) {
|
|
9702
10162
|
pointer.current = false;
|
|
9703
|
-
onReselect?.(c.value);
|
|
10163
|
+
if (!disabled) onReselect?.(c.value);
|
|
9704
10164
|
}
|
|
9705
10165
|
}
|
|
9706
10166
|
}
|
|
9707
10167
|
),
|
|
9708
|
-
/* @__PURE__ */ (0,
|
|
9709
|
-
/* @__PURE__ */ (0,
|
|
9710
|
-
|
|
10168
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("span", { className: "cv-choice-text", children: [
|
|
10169
|
+
c.tag ? /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("span", { className: "cv-choice-line", children: [
|
|
10170
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("span", { className: "cv-choice-label", children: c.label }),
|
|
10171
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("span", { className: "cv-choice-tag", children: c.tag })
|
|
10172
|
+
] }) : /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("span", { className: "cv-choice-label", children: c.label }),
|
|
10173
|
+
c.sub ? /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("span", { className: "cv-choice-sub", children: c.sub }) : null,
|
|
10174
|
+
c.hint ? /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("span", { className: "cv-choice-hint", children: c.hint }) : null
|
|
9711
10175
|
] }),
|
|
9712
10176
|
c.trailing,
|
|
9713
|
-
/* @__PURE__ */ (0,
|
|
10177
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(Check, { size: 16, className: "cv-choice-check", "aria-hidden": true })
|
|
9714
10178
|
]
|
|
9715
10179
|
},
|
|
9716
10180
|
c.value
|
|
@@ -9719,18 +10183,18 @@ function ChoiceList({
|
|
|
9719
10183
|
}
|
|
9720
10184
|
|
|
9721
10185
|
// src/ui/views/settings/SettingsPage.tsx
|
|
9722
|
-
var
|
|
9723
|
-
var
|
|
10186
|
+
var import_react27 = __toESM(require_react(), 1);
|
|
10187
|
+
var import_jsx_runtime16 = __toESM(require_jsx_runtime(), 1);
|
|
9724
10188
|
function SettingsPage({
|
|
9725
10189
|
title,
|
|
9726
10190
|
intro,
|
|
9727
10191
|
onBack,
|
|
9728
10192
|
children
|
|
9729
10193
|
}) {
|
|
9730
|
-
const titleId = (0,
|
|
9731
|
-
const heading = (0,
|
|
9732
|
-
(0,
|
|
9733
|
-
return /* @__PURE__ */ (0,
|
|
10194
|
+
const titleId = (0, import_react27.useId)();
|
|
10195
|
+
const heading = (0, import_react27.useRef)(null);
|
|
10196
|
+
(0, import_react27.useEffect)(() => heading.current?.focus(), []);
|
|
10197
|
+
return /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(
|
|
9734
10198
|
"div",
|
|
9735
10199
|
{
|
|
9736
10200
|
className: "cv-detail cv-settings-page",
|
|
@@ -9743,13 +10207,13 @@ function SettingsPage({
|
|
|
9743
10207
|
}
|
|
9744
10208
|
},
|
|
9745
10209
|
children: [
|
|
9746
|
-
/* @__PURE__ */ (0,
|
|
9747
|
-
/* @__PURE__ */ (0,
|
|
10210
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)("div", { className: "cv-detail-head", children: /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("button", { type: "button", className: "cv-detail-back", onClick: onBack, children: [
|
|
10211
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)(ArrowLeft, { size: 16, "aria-hidden": true }),
|
|
9748
10212
|
"Ajustes"
|
|
9749
10213
|
] }) }),
|
|
9750
|
-
/* @__PURE__ */ (0,
|
|
9751
|
-
/* @__PURE__ */ (0,
|
|
9752
|
-
intro ? /* @__PURE__ */ (0,
|
|
10214
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { className: "cv-settings-page-body", children: [
|
|
10215
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)("h2", { className: "cv-settings-page-title", id: titleId, tabIndex: -1, ref: heading, children: title }),
|
|
10216
|
+
intro ? /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("p", { className: "cv-settings-page-intro", children: intro }) : null,
|
|
9753
10217
|
children
|
|
9754
10218
|
] })
|
|
9755
10219
|
]
|
|
@@ -9758,7 +10222,7 @@ function SettingsPage({
|
|
|
9758
10222
|
}
|
|
9759
10223
|
|
|
9760
10224
|
// src/ui/views/settings/DevicePage.tsx
|
|
9761
|
-
var
|
|
10225
|
+
var import_jsx_runtime17 = __toESM(require_jsx_runtime(), 1);
|
|
9762
10226
|
var SYSTEM_DEFAULT = "";
|
|
9763
10227
|
var PAGES = {
|
|
9764
10228
|
input: {
|
|
@@ -9791,8 +10255,8 @@ function DevicePage({ kind, onBack }) {
|
|
|
9791
10255
|
{ value: SYSTEM_DEFAULT, label: "Predeterminado del sistema" },
|
|
9792
10256
|
...list.map((d, i) => ({ value: d.deviceId, label: deviceLabel(d, i, kind) }))
|
|
9793
10257
|
];
|
|
9794
|
-
return /* @__PURE__ */ (0,
|
|
9795
|
-
list.length > 0 ? /* @__PURE__ */ (0,
|
|
10258
|
+
return /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(SettingsPage, { title: page.title, intro: page.intro, onBack, children: [
|
|
10259
|
+
list.length > 0 ? /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
9796
10260
|
ChoiceList,
|
|
9797
10261
|
{
|
|
9798
10262
|
label: page.title,
|
|
@@ -9800,15 +10264,15 @@ function DevicePage({ kind, onBack }) {
|
|
|
9800
10264
|
value: current ?? SYSTEM_DEFAULT,
|
|
9801
10265
|
onSelect: (v) => void apply(v === SYSTEM_DEFAULT ? null : v)
|
|
9802
10266
|
}
|
|
9803
|
-
) : /* @__PURE__ */ (0,
|
|
9804
|
-
kind === "output" ? /* @__PURE__ */ (0,
|
|
10267
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("p", { className: "cv-settings-page-empty", children: page.empty }),
|
|
10268
|
+
kind === "output" ? /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(SpeakerTest, { sinkId: devices.currentOutputId }) : null
|
|
9805
10269
|
] });
|
|
9806
10270
|
}
|
|
9807
10271
|
function SpeakerTest({ sinkId }) {
|
|
9808
|
-
const [testing, setTesting] = (0,
|
|
9809
|
-
const tone = (0,
|
|
9810
|
-
const timer = (0,
|
|
9811
|
-
(0,
|
|
10272
|
+
const [testing, setTesting] = (0, import_react28.useState)(false);
|
|
10273
|
+
const tone = (0, import_react28.useRef)(null);
|
|
10274
|
+
const timer = (0, import_react28.useRef)(null);
|
|
10275
|
+
(0, import_react28.useEffect)(
|
|
9812
10276
|
() => () => {
|
|
9813
10277
|
tone.current?.stop();
|
|
9814
10278
|
if (timer.current) clearTimeout(timer.current);
|
|
@@ -9823,17 +10287,17 @@ function SpeakerTest({ sinkId }) {
|
|
|
9823
10287
|
if (timer.current) clearTimeout(timer.current);
|
|
9824
10288
|
timer.current = setTimeout(() => setTesting(false), TEST_TONE_MS);
|
|
9825
10289
|
};
|
|
9826
|
-
return /* @__PURE__ */ (0,
|
|
9827
|
-
/* @__PURE__ */ (0,
|
|
10290
|
+
return /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("button", { type: "button", className: "cv-btn cv-settings-test", onClick: test, disabled: testing, children: [
|
|
10291
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(Volume2, { size: 16, "aria-hidden": true }),
|
|
9828
10292
|
testing ? "Sonando\u2026" : "Probar altavoz"
|
|
9829
10293
|
] });
|
|
9830
10294
|
}
|
|
9831
10295
|
|
|
9832
10296
|
// src/ui/views/settings/RingtonePage.tsx
|
|
9833
|
-
var
|
|
10297
|
+
var import_react31 = __toESM(require_react(), 1);
|
|
9834
10298
|
|
|
9835
10299
|
// src/ui/views/settings/ringtone-state.ts
|
|
9836
|
-
var
|
|
10300
|
+
var import_react30 = __toESM(require_react(), 1);
|
|
9837
10301
|
|
|
9838
10302
|
// src/ui/audio/preview.ts
|
|
9839
10303
|
var PREVIEW_MAX_MS = 1e4;
|
|
@@ -9845,13 +10309,13 @@ function previewDurationMs(buffer, loop) {
|
|
|
9845
10309
|
}
|
|
9846
10310
|
|
|
9847
10311
|
// src/ui/views/settings/ringtone-state.ts
|
|
9848
|
-
var
|
|
10312
|
+
var noSubscribe2 = () => () => {
|
|
9849
10313
|
};
|
|
9850
|
-
var
|
|
10314
|
+
var noSettings2 = () => null;
|
|
9851
10315
|
function useRingtoneSettings(store) {
|
|
9852
|
-
const settings = (0,
|
|
9853
|
-
const [failed, setFailed] = (0,
|
|
9854
|
-
const load = (0,
|
|
10316
|
+
const settings = (0, import_react30.useSyncExternalStore)(store?.subscribe ?? noSubscribe2, store?.getSettings ?? noSettings2);
|
|
10317
|
+
const [failed, setFailed] = (0, import_react30.useState)(false);
|
|
10318
|
+
const load = (0, import_react30.useCallback)(() => {
|
|
9855
10319
|
if (!store) return () => {
|
|
9856
10320
|
};
|
|
9857
10321
|
let live = true;
|
|
@@ -9863,7 +10327,7 @@ function useRingtoneSettings(store) {
|
|
|
9863
10327
|
live = false;
|
|
9864
10328
|
};
|
|
9865
10329
|
}, [store]);
|
|
9866
|
-
(0,
|
|
10330
|
+
(0, import_react30.useEffect)(load, [load]);
|
|
9867
10331
|
return { settings, failed, retry: load };
|
|
9868
10332
|
}
|
|
9869
10333
|
function ringtoneSummary(settings, failed) {
|
|
@@ -9876,11 +10340,11 @@ function ringtoneSummary(settings, failed) {
|
|
|
9876
10340
|
return settings.catalogue.find((r) => r.url === null)?.name ?? "Predeterminado";
|
|
9877
10341
|
}
|
|
9878
10342
|
function useRingtonePreview(store, sinkId) {
|
|
9879
|
-
const [playing, setPlaying] = (0,
|
|
9880
|
-
const [error, setError] = (0,
|
|
9881
|
-
const current = (0,
|
|
9882
|
-
const generation = (0,
|
|
9883
|
-
const stop = (0,
|
|
10343
|
+
const [playing, setPlaying] = (0, import_react30.useState)(null);
|
|
10344
|
+
const [error, setError] = (0, import_react30.useState)(null);
|
|
10345
|
+
const current = (0, import_react30.useRef)(null);
|
|
10346
|
+
const generation = (0, import_react30.useRef)(0);
|
|
10347
|
+
const stop = (0, import_react30.useCallback)(() => {
|
|
9884
10348
|
generation.current += 1;
|
|
9885
10349
|
const c = current.current;
|
|
9886
10350
|
current.current = null;
|
|
@@ -9888,7 +10352,7 @@ function useRingtonePreview(store, sinkId) {
|
|
|
9888
10352
|
c?.tone?.stop();
|
|
9889
10353
|
setPlaying(null);
|
|
9890
10354
|
}, []);
|
|
9891
|
-
(0,
|
|
10355
|
+
(0, import_react30.useEffect)(() => stop, [stop]);
|
|
9892
10356
|
const start = (settings, choice) => {
|
|
9893
10357
|
stop();
|
|
9894
10358
|
primeAudio();
|
|
@@ -9919,7 +10383,7 @@ function useRingtonePreview(store, sinkId) {
|
|
|
9919
10383
|
}
|
|
9920
10384
|
|
|
9921
10385
|
// src/ui/views/settings/RingtonePage.tsx
|
|
9922
|
-
var
|
|
10386
|
+
var import_jsx_runtime18 = __toESM(require_jsx_runtime(), 1);
|
|
9923
10387
|
var ORG_DEFAULT = "";
|
|
9924
10388
|
var KEYBOARD_SETTLE_MS = 300;
|
|
9925
10389
|
function RingtonePage({
|
|
@@ -9932,8 +10396,8 @@ function RingtonePage({
|
|
|
9932
10396
|
const softphone = useSoftphone();
|
|
9933
10397
|
const devices = useDevices();
|
|
9934
10398
|
const preview = useRingtonePreview(store, devices.canSelectRingtoneOutput ? devices.currentRingtoneOutputId : null);
|
|
9935
|
-
const [pending, setPending] = (0,
|
|
9936
|
-
const [error, setError] = (0,
|
|
10399
|
+
const [pending, setPending] = (0, import_react31.useState)(void 0);
|
|
10400
|
+
const [error, setError] = (0, import_react31.useState)(null);
|
|
9937
10401
|
const save = useSerialSave(store, {
|
|
9938
10402
|
onSettled: () => setPending(void 0),
|
|
9939
10403
|
onFailed: () => {
|
|
@@ -9941,12 +10405,12 @@ function RingtonePage({
|
|
|
9941
10405
|
setError("No se pudo guardar el tono. Int\xE9ntalo de nuevo.");
|
|
9942
10406
|
}
|
|
9943
10407
|
});
|
|
9944
|
-
const latest = (0,
|
|
10408
|
+
const latest = (0, import_react31.useRef)(settings);
|
|
9945
10409
|
latest.current = settings;
|
|
9946
|
-
const settle = (0,
|
|
10410
|
+
const settle = (0, import_react31.useRef)(null);
|
|
9947
10411
|
const { stop: stopPreview } = preview;
|
|
9948
|
-
(0,
|
|
9949
|
-
(0,
|
|
10412
|
+
(0, import_react31.useEffect)(() => softphone.on("incomingCall" /* IncomingCall */, stopPreview), [softphone, stopPreview]);
|
|
10413
|
+
(0, import_react31.useEffect)(
|
|
9950
10414
|
() => () => {
|
|
9951
10415
|
if (settle.current) {
|
|
9952
10416
|
clearTimeout(settle.current.timer);
|
|
@@ -9982,14 +10446,14 @@ function RingtonePage({
|
|
|
9982
10446
|
if (preview.playing === value) preview.stop();
|
|
9983
10447
|
else preview.start(settings, value);
|
|
9984
10448
|
};
|
|
9985
|
-
return /* @__PURE__ */ (0,
|
|
10449
|
+
return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
9986
10450
|
SettingsPage,
|
|
9987
10451
|
{
|
|
9988
10452
|
title: "Tono de llamada",
|
|
9989
10453
|
intro: "Lo que suena cuando entra una llamada. Se guarda en tu cuenta, as\xED que es el mismo en todos tus dispositivos.",
|
|
9990
10454
|
onBack,
|
|
9991
|
-
children: settings ? /* @__PURE__ */ (0,
|
|
9992
|
-
/* @__PURE__ */ (0,
|
|
10455
|
+
children: settings ? /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(import_jsx_runtime18.Fragment, { children: [
|
|
10456
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
9993
10457
|
ChoiceList,
|
|
9994
10458
|
{
|
|
9995
10459
|
label: "Tono de llamada",
|
|
@@ -9999,13 +10463,13 @@ function RingtonePage({
|
|
|
9999
10463
|
onReselect
|
|
10000
10464
|
}
|
|
10001
10465
|
),
|
|
10002
|
-
error ?? preview.error ? /* @__PURE__ */ (0,
|
|
10003
|
-
] }) : failed ? /* @__PURE__ */ (0,
|
|
10004
|
-
/* @__PURE__ */ (0,
|
|
10005
|
-
/* @__PURE__ */ (0,
|
|
10006
|
-
] }) : /* @__PURE__ */ (0,
|
|
10007
|
-
/* @__PURE__ */ (0,
|
|
10008
|
-
/* @__PURE__ */ (0,
|
|
10466
|
+
error ?? preview.error ? /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("p", { className: "cv-settings-error", role: "alert", children: error ?? preview.error }) : null
|
|
10467
|
+
] }) : failed ? /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: "cv-empty", children: [
|
|
10468
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)("p", { className: "cv-empty-title", children: "No se pudieron cargar los tonos." }),
|
|
10469
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)("button", { type: "button", className: "cv-btn cv-settings-retry", onClick: onRetry, children: "Reintentar" })
|
|
10470
|
+
] }) : /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: "cv-empty", role: "status", children: [
|
|
10471
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(LoaderCircle, { className: "cv-empty-spinner", size: 18, "aria-hidden": true }),
|
|
10472
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)("span", { className: "cv-empty-title", children: "Cargando\u2026" })
|
|
10009
10473
|
] })
|
|
10010
10474
|
}
|
|
10011
10475
|
);
|
|
@@ -10016,9 +10480,9 @@ function currentValue(settings) {
|
|
|
10016
10480
|
function choicesFor(settings, playing) {
|
|
10017
10481
|
const org = settings.orgDefault ? settings.catalogue.find((r) => r.id === settings.orgDefault) : void 0;
|
|
10018
10482
|
const builtIn = settings.catalogue.find((r) => r.url === null);
|
|
10019
|
-
const mark = (value) => playing === value ? /* @__PURE__ */ (0,
|
|
10020
|
-
/* @__PURE__ */ (0,
|
|
10021
|
-
/* @__PURE__ */ (0,
|
|
10483
|
+
const mark = (value) => playing === value ? /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("span", { className: "cv-choice-playing", children: [
|
|
10484
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(Volume2, { size: 15, "aria-hidden": true }),
|
|
10485
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)("span", { className: "cv-sr-only", children: "Sonando" })
|
|
10022
10486
|
] }) : void 0;
|
|
10023
10487
|
const orgChoice = {
|
|
10024
10488
|
value: ORG_DEFAULT,
|
|
@@ -10029,11 +10493,11 @@ function choicesFor(settings, playing) {
|
|
|
10029
10493
|
return [orgChoice, ...settings.catalogue.map((r) => ({ value: r.id, label: r.name, trailing: mark(r.id) }))];
|
|
10030
10494
|
}
|
|
10031
10495
|
function useSerialSave(store, handlers) {
|
|
10032
|
-
const wanted = (0,
|
|
10033
|
-
const busy = (0,
|
|
10034
|
-
const on = (0,
|
|
10496
|
+
const wanted = (0, import_react31.useRef)(null);
|
|
10497
|
+
const busy = (0, import_react31.useRef)(false);
|
|
10498
|
+
const on = (0, import_react31.useRef)(handlers);
|
|
10035
10499
|
on.current = handlers;
|
|
10036
|
-
const [save] = (0,
|
|
10500
|
+
const [save] = (0, import_react31.useState)(() => (id) => {
|
|
10037
10501
|
wanted.current = { id };
|
|
10038
10502
|
if (busy.current) return;
|
|
10039
10503
|
busy.current = true;
|
|
@@ -10054,21 +10518,123 @@ function useSerialSave(store, handlers) {
|
|
|
10054
10518
|
return save;
|
|
10055
10519
|
}
|
|
10056
10520
|
|
|
10521
|
+
// src/ui/views/settings/OutboundNumberPage.tsx
|
|
10522
|
+
var import_react33 = __toESM(require_react(), 1);
|
|
10523
|
+
var import_jsx_runtime19 = __toESM(require_jsx_runtime(), 1);
|
|
10524
|
+
var ORG_DEFAULT2 = "";
|
|
10525
|
+
var KEYBOARD_SETTLE_MS2 = 800;
|
|
10526
|
+
function OutboundNumberPage({
|
|
10527
|
+
store,
|
|
10528
|
+
settings,
|
|
10529
|
+
onBack
|
|
10530
|
+
}) {
|
|
10531
|
+
const formatIntl2 = useIntlFormatter();
|
|
10532
|
+
const current = numberName(effectiveNumber(settings), formatIntl2);
|
|
10533
|
+
const change = useOutboundNumberChange(store, settings, current);
|
|
10534
|
+
const [pending, setPending] = (0, import_react33.useState)(void 0);
|
|
10535
|
+
const settle = (0, import_react33.useRef)(null);
|
|
10536
|
+
const choose = (0, import_react33.useRef)(change.choose);
|
|
10537
|
+
choose.current = change.choose;
|
|
10538
|
+
(0, import_react33.useEffect)(
|
|
10539
|
+
() => () => {
|
|
10540
|
+
if (settle.current) clearTimeout(settle.current);
|
|
10541
|
+
},
|
|
10542
|
+
[]
|
|
10543
|
+
);
|
|
10544
|
+
const notice = (0, import_react33.useRef)(null);
|
|
10545
|
+
const apply = async (value) => {
|
|
10546
|
+
setPending(value);
|
|
10547
|
+
const applied = await choose.current(value || null);
|
|
10548
|
+
setPending(void 0);
|
|
10549
|
+
if (!applied) requestAnimationFrame(() => notice.current?.scrollIntoView?.({ block: "nearest" }));
|
|
10550
|
+
};
|
|
10551
|
+
const onSelect = (value, via) => {
|
|
10552
|
+
if (settle.current) clearTimeout(settle.current);
|
|
10553
|
+
settle.current = null;
|
|
10554
|
+
if (via === "pointer") {
|
|
10555
|
+
void apply(value);
|
|
10556
|
+
return;
|
|
10557
|
+
}
|
|
10558
|
+
setPending(value);
|
|
10559
|
+
settle.current = setTimeout(() => {
|
|
10560
|
+
settle.current = null;
|
|
10561
|
+
void apply(value);
|
|
10562
|
+
}, KEYBOARD_SETTLE_MS2);
|
|
10563
|
+
};
|
|
10564
|
+
return /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(
|
|
10565
|
+
SettingsPage,
|
|
10566
|
+
{
|
|
10567
|
+
title: "N\xFAmero de salida",
|
|
10568
|
+
intro: "El n\xFAmero que ve la persona a la que llamas. Es el mismo en todos tus dispositivos y tambi\xE9n puedes cambiarlo desde el teclado.",
|
|
10569
|
+
onBack,
|
|
10570
|
+
children: [
|
|
10571
|
+
change.message ? /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("p", { className: "cv-settings-notice", role: "status", "data-kind": change.isError ? "error" : "info", ref: notice, children: change.message }) : null,
|
|
10572
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
10573
|
+
ChoiceList,
|
|
10574
|
+
{
|
|
10575
|
+
label: "N\xFAmero de salida",
|
|
10576
|
+
choices: choicesFor2(settings, formatIntl2, change.busy ? pending : void 0),
|
|
10577
|
+
value: pending ?? currentValue2(settings),
|
|
10578
|
+
onSelect,
|
|
10579
|
+
disabled: change.locked
|
|
10580
|
+
}
|
|
10581
|
+
)
|
|
10582
|
+
]
|
|
10583
|
+
}
|
|
10584
|
+
);
|
|
10585
|
+
}
|
|
10586
|
+
function currentValue2(settings) {
|
|
10587
|
+
return settings.mine && settings.numbers.some((n) => n.id === settings.mine) ? settings.mine : ORG_DEFAULT2;
|
|
10588
|
+
}
|
|
10589
|
+
function choicesFor2(settings, formatIntl2, applying) {
|
|
10590
|
+
const orgDefault = settings.numbers.find((n) => n.id === settings.orgDefault);
|
|
10591
|
+
const spinner = (value) => applying === value ? /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("span", { className: "cv-choice-applying", children: [
|
|
10592
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(LoaderCircle, { size: 15, className: "cv-choice-applying-icon", "aria-hidden": true }),
|
|
10593
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)("span", { className: "cv-sr-only", children: "Aplicando" })
|
|
10594
|
+
] }) : void 0;
|
|
10595
|
+
return [
|
|
10596
|
+
{
|
|
10597
|
+
value: ORG_DEFAULT2,
|
|
10598
|
+
label: "Por defecto de la organizaci\xF3n",
|
|
10599
|
+
sub: orgDefault ? numberName(orgDefault, formatIntl2) : "Sin n\xFAmero por defecto",
|
|
10600
|
+
trailing: spinner(ORG_DEFAULT2)
|
|
10601
|
+
},
|
|
10602
|
+
...settings.numbers.map((n) => {
|
|
10603
|
+
const kind = KIND_TAG[n.kind];
|
|
10604
|
+
return {
|
|
10605
|
+
value: n.id,
|
|
10606
|
+
label: numberName(n, formatIntl2),
|
|
10607
|
+
...n.label ? { sub: formatIntl2(`+${n.number}`) } : {},
|
|
10608
|
+
...kind ? { tag: kind.tag, hint: kind.hint } : {},
|
|
10609
|
+
trailing: spinner(n.id)
|
|
10610
|
+
};
|
|
10611
|
+
})
|
|
10612
|
+
];
|
|
10613
|
+
}
|
|
10614
|
+
function outboundSummary(settings, formatIntl2) {
|
|
10615
|
+
const effective = effectiveNumber(settings);
|
|
10616
|
+
const name = numberName(effective, formatIntl2);
|
|
10617
|
+
return settings.mine || !effective ? name : `${name} \xB7 organizaci\xF3n`;
|
|
10618
|
+
}
|
|
10619
|
+
|
|
10057
10620
|
// src/ui/views/SettingsTab.tsx
|
|
10058
|
-
var
|
|
10621
|
+
var import_jsx_runtime20 = __toESM(require_jsx_runtime(), 1);
|
|
10059
10622
|
function SettingsTab() {
|
|
10060
10623
|
const softphone = useSoftphone();
|
|
10061
10624
|
const devices = useDevices();
|
|
10062
10625
|
const store = ringtoneStore(softphone);
|
|
10063
10626
|
const ringtone = useRingtoneSettings(store);
|
|
10064
|
-
const
|
|
10065
|
-
const
|
|
10066
|
-
const
|
|
10067
|
-
const
|
|
10068
|
-
(0,
|
|
10627
|
+
const outStore = outboundNumberStore(softphone);
|
|
10628
|
+
const outbound = useOutboundNumbers(outStore).settings;
|
|
10629
|
+
const formatIntl2 = useIntlFormatter();
|
|
10630
|
+
const [page, setPage] = (0, import_react34.useState)(null);
|
|
10631
|
+
const list = (0, import_react34.useRef)(null);
|
|
10632
|
+
const rows = (0, import_react34.useRef)({});
|
|
10633
|
+
const returnTo = (0, import_react34.useRef)(null);
|
|
10634
|
+
(0, import_react34.useEffect)(() => {
|
|
10069
10635
|
void softphone.audio.refresh();
|
|
10070
10636
|
}, [softphone]);
|
|
10071
|
-
(0,
|
|
10637
|
+
(0, import_react34.useEffect)(() => {
|
|
10072
10638
|
list.current?.toggleAttribute("inert", page !== null);
|
|
10073
10639
|
if (page === null && returnTo.current) {
|
|
10074
10640
|
rows.current[returnTo.current]?.focus();
|
|
@@ -10083,9 +10649,9 @@ function SettingsTab() {
|
|
|
10083
10649
|
const rowRef = (p) => (el) => {
|
|
10084
10650
|
rows.current[p] = el;
|
|
10085
10651
|
};
|
|
10086
|
-
return /* @__PURE__ */ (0,
|
|
10087
|
-
/* @__PURE__ */ (0,
|
|
10088
|
-
store ? /* @__PURE__ */ (0,
|
|
10652
|
+
return /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("div", { className: "cv-view cv-settings", children: [
|
|
10653
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("div", { className: "cv-settings-body", ref: list, children: [
|
|
10654
|
+
store ? /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(SettingsSection, { title: "Llamadas entrantes", children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
10089
10655
|
SettingsNavRow,
|
|
10090
10656
|
{
|
|
10091
10657
|
icon: Music,
|
|
@@ -10095,8 +10661,18 @@ function SettingsTab() {
|
|
|
10095
10661
|
rowRef: rowRef("tone")
|
|
10096
10662
|
}
|
|
10097
10663
|
) }) : null,
|
|
10098
|
-
/* @__PURE__ */ (0,
|
|
10099
|
-
|
|
10664
|
+
outStore && outbound && outbound.numbers.length > 1 ? /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(SettingsSection, { title: "Llamadas salientes", children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
10665
|
+
SettingsNavRow,
|
|
10666
|
+
{
|
|
10667
|
+
icon: PhoneOutgoing,
|
|
10668
|
+
title: "N\xFAmero de salida",
|
|
10669
|
+
value: outboundSummary(outbound, formatIntl2),
|
|
10670
|
+
onOpen: open("outbound"),
|
|
10671
|
+
rowRef: rowRef("outbound")
|
|
10672
|
+
}
|
|
10673
|
+
) }) : null,
|
|
10674
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(SettingsSection, { title: "Dispositivos", children: [
|
|
10675
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
10100
10676
|
SettingsNavRow,
|
|
10101
10677
|
{
|
|
10102
10678
|
icon: Mic,
|
|
@@ -10106,7 +10682,7 @@ function SettingsTab() {
|
|
|
10106
10682
|
rowRef: rowRef("input")
|
|
10107
10683
|
}
|
|
10108
10684
|
),
|
|
10109
|
-
devices.canSelectOutput ? /* @__PURE__ */ (0,
|
|
10685
|
+
devices.canSelectOutput ? /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
10110
10686
|
SettingsNavRow,
|
|
10111
10687
|
{
|
|
10112
10688
|
icon: Headphones,
|
|
@@ -10118,7 +10694,7 @@ function SettingsTab() {
|
|
|
10118
10694
|
) : (
|
|
10119
10695
|
// Safari and most of Firefox have no `setSinkId`: offering a page whose choice silently does
|
|
10120
10696
|
// nothing is worse than saying where the choice really lives.
|
|
10121
|
-
/* @__PURE__ */ (0,
|
|
10697
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
10122
10698
|
SettingsNavRow,
|
|
10123
10699
|
{
|
|
10124
10700
|
icon: Headphones,
|
|
@@ -10127,7 +10703,7 @@ function SettingsTab() {
|
|
|
10127
10703
|
}
|
|
10128
10704
|
)
|
|
10129
10705
|
),
|
|
10130
|
-
devices.canSelectRingtoneOutput ? /* @__PURE__ */ (0,
|
|
10706
|
+
devices.canSelectRingtoneOutput ? /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
10131
10707
|
SettingsNavRow,
|
|
10132
10708
|
{
|
|
10133
10709
|
icon: BellRing,
|
|
@@ -10139,7 +10715,7 @@ function SettingsTab() {
|
|
|
10139
10715
|
) : null
|
|
10140
10716
|
] })
|
|
10141
10717
|
] }),
|
|
10142
|
-
page === "tone" && store ? /* @__PURE__ */ (0,
|
|
10718
|
+
page === "tone" && store ? /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
10143
10719
|
RingtonePage,
|
|
10144
10720
|
{
|
|
10145
10721
|
store,
|
|
@@ -10148,12 +10724,12 @@ function SettingsTab() {
|
|
|
10148
10724
|
onRetry: ringtone.retry,
|
|
10149
10725
|
onBack: back
|
|
10150
10726
|
}
|
|
10151
|
-
) : page !== null && page !== "tone" ? /* @__PURE__ */ (0,
|
|
10727
|
+
) : page === "outbound" && outStore && outbound ? /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(OutboundNumberPage, { store: outStore, settings: outbound, onBack: back }) : page !== null && page !== "tone" && page !== "outbound" ? /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(DevicePage, { kind: page, onBack: back }) : null
|
|
10152
10728
|
] });
|
|
10153
10729
|
}
|
|
10154
10730
|
|
|
10155
10731
|
// src/ui/permission/useMicPermission.ts
|
|
10156
|
-
var
|
|
10732
|
+
var import_react36 = __toESM(require_react(), 1);
|
|
10157
10733
|
|
|
10158
10734
|
// src/core/env.ts
|
|
10159
10735
|
function isBrowser() {
|
|
@@ -10165,8 +10741,8 @@ function isWebRtcSupported() {
|
|
|
10165
10741
|
|
|
10166
10742
|
// src/ui/permission/useMicPermission.ts
|
|
10167
10743
|
function useMicPermission() {
|
|
10168
|
-
const [state, setState] = (0,
|
|
10169
|
-
const warm = (0,
|
|
10744
|
+
const [state, setState] = (0, import_react36.useState)("checking");
|
|
10745
|
+
const warm = (0, import_react36.useCallback)(async () => {
|
|
10170
10746
|
try {
|
|
10171
10747
|
const stream = await navigator.mediaDevices.getUserMedia({ audio: true });
|
|
10172
10748
|
for (const track of stream.getTracks()) track.stop();
|
|
@@ -10175,7 +10751,7 @@ function useMicPermission() {
|
|
|
10175
10751
|
setState("denied");
|
|
10176
10752
|
}
|
|
10177
10753
|
}, []);
|
|
10178
|
-
(0,
|
|
10754
|
+
(0, import_react36.useEffect)(() => {
|
|
10179
10755
|
if (!isWebRtcSupported()) {
|
|
10180
10756
|
setState("unsupported");
|
|
10181
10757
|
return;
|
|
@@ -10266,60 +10842,60 @@ function unblockGuide() {
|
|
|
10266
10842
|
}
|
|
10267
10843
|
|
|
10268
10844
|
// src/ui/permission/MicPermissionGate.tsx
|
|
10269
|
-
var
|
|
10845
|
+
var import_jsx_runtime21 = __toESM(require_jsx_runtime(), 1);
|
|
10270
10846
|
function MicPrompt({
|
|
10271
10847
|
state,
|
|
10272
10848
|
onRequest
|
|
10273
10849
|
}) {
|
|
10274
10850
|
if (state === "unsupported") {
|
|
10275
|
-
return /* @__PURE__ */ (0,
|
|
10276
|
-
/* @__PURE__ */ (0,
|
|
10277
|
-
/* @__PURE__ */ (0,
|
|
10278
|
-
/* @__PURE__ */ (0,
|
|
10851
|
+
return /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("div", { className: "cv-gate", "data-state": state, "data-tone": "danger", children: [
|
|
10852
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)("span", { className: "cv-gate-mark", children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(MicOff, { size: 22 }) }),
|
|
10853
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)("h3", { className: "cv-gate-title", children: "Llamadas no disponibles" }),
|
|
10854
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)("p", { children: "Este navegador no admite llamadas. Prueba con Chrome, Edge o Firefox." })
|
|
10279
10855
|
] });
|
|
10280
10856
|
}
|
|
10281
10857
|
if (state === "denied") {
|
|
10282
10858
|
const guide = unblockGuide();
|
|
10283
|
-
return /* @__PURE__ */ (0,
|
|
10284
|
-
/* @__PURE__ */ (0,
|
|
10285
|
-
/* @__PURE__ */ (0,
|
|
10286
|
-
/* @__PURE__ */ (0,
|
|
10287
|
-
/* @__PURE__ */ (0,
|
|
10288
|
-
/* @__PURE__ */ (0,
|
|
10289
|
-
/* @__PURE__ */ (0,
|
|
10859
|
+
return /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("div", { className: "cv-gate", "data-state": state, "data-tone": "danger", children: [
|
|
10860
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)("span", { className: "cv-gate-mark", children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(MicOff, { size: 22 }) }),
|
|
10861
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)("h3", { className: "cv-gate-title", children: "Micr\xF3fono bloqueado" }),
|
|
10862
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)("p", { children: "Perm\xEDtelo en tu navegador para poder llamar." }),
|
|
10863
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("details", { className: "cv-help", children: [
|
|
10864
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("summary", { children: [
|
|
10865
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(CircleHelp, { size: 13, "aria-hidden": true }),
|
|
10290
10866
|
"C\xF3mo permitirlo"
|
|
10291
10867
|
] }),
|
|
10292
|
-
/* @__PURE__ */ (0,
|
|
10293
|
-
guide.url ? /* @__PURE__ */ (0,
|
|
10868
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)("ol", { children: guide.steps.map((step) => /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("li", { children: step }, step)) }),
|
|
10869
|
+
guide.url ? /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("a", { href: guide.url, target: "_blank", rel: "noreferrer noopener", children: [
|
|
10294
10870
|
"Gu\xEDa del navegador",
|
|
10295
|
-
/* @__PURE__ */ (0,
|
|
10871
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(ExternalLink, { size: 11, "aria-hidden": true })
|
|
10296
10872
|
] }) : null
|
|
10297
10873
|
] })
|
|
10298
10874
|
] });
|
|
10299
10875
|
}
|
|
10300
10876
|
if (state === "warming") {
|
|
10301
|
-
return /* @__PURE__ */ (0,
|
|
10302
|
-
/* @__PURE__ */ (0,
|
|
10303
|
-
/* @__PURE__ */ (0,
|
|
10304
|
-
/* @__PURE__ */ (0,
|
|
10877
|
+
return /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("div", { className: "cv-gate", "data-state": state, children: [
|
|
10878
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)("span", { className: "cv-gate-mark", children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(Mic, { size: 22 }) }),
|
|
10879
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)("h3", { className: "cv-gate-title", children: "Permite el micr\xF3fono" }),
|
|
10880
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)("p", { children: "Acepta el aviso que muestra el navegador para continuar." })
|
|
10305
10881
|
] });
|
|
10306
10882
|
}
|
|
10307
10883
|
if (state === "checking") {
|
|
10308
|
-
return /* @__PURE__ */ (0,
|
|
10309
|
-
/* @__PURE__ */ (0,
|
|
10310
|
-
/* @__PURE__ */ (0,
|
|
10884
|
+
return /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("div", { className: "cv-gate", "data-state": state, children: [
|
|
10885
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)("span", { className: "cv-gate-mark", children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(Mic, { size: 22 }) }),
|
|
10886
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)("p", { children: "Preparando el micr\xF3fono\u2026" })
|
|
10311
10887
|
] });
|
|
10312
10888
|
}
|
|
10313
|
-
return /* @__PURE__ */ (0,
|
|
10314
|
-
/* @__PURE__ */ (0,
|
|
10315
|
-
/* @__PURE__ */ (0,
|
|
10316
|
-
/* @__PURE__ */ (0,
|
|
10317
|
-
/* @__PURE__ */ (0,
|
|
10889
|
+
return /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("div", { className: "cv-gate", "data-state": state, children: [
|
|
10890
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)("span", { className: "cv-gate-mark", children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(Mic, { size: 22 }) }),
|
|
10891
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)("h3", { className: "cv-gate-title", children: "Permite el micr\xF3fono" }),
|
|
10892
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)("p", { children: "Lo necesitamos para que puedas hablar durante las llamadas." }),
|
|
10893
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)("button", { className: "cv-btn cv-btn--accent", onClick: onRequest, children: "Permitir micr\xF3fono" })
|
|
10318
10894
|
] });
|
|
10319
10895
|
}
|
|
10320
10896
|
|
|
10321
10897
|
// src/ui/permission/ErrorGate.tsx
|
|
10322
|
-
var
|
|
10898
|
+
var import_jsx_runtime22 = (
|
|
10323
10899
|
/*
|
|
10324
10900
|
`part` on all four, because this is the most intrusive thing the SDK draws — it replaces the
|
|
10325
10901
|
whole dialpad — and inside `<coventia-softphone>` a shadow root makes it otherwise unreachable
|
|
@@ -10335,36 +10911,36 @@ function ErrorGate({
|
|
|
10335
10911
|
onRetry
|
|
10336
10912
|
}) {
|
|
10337
10913
|
const text = ERROR_TEXT[error.code];
|
|
10338
|
-
return /* @__PURE__ */ (0,
|
|
10339
|
-
/* @__PURE__ */ (0,
|
|
10340
|
-
/* @__PURE__ */ (0,
|
|
10341
|
-
text.body === void 0 ? null : /* @__PURE__ */ (0,
|
|
10342
|
-
/* @__PURE__ */ (0,
|
|
10914
|
+
return /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("div", { className: "cv-gate", "data-tone": "danger", "data-code": error.code, part: "error-gate", children: [
|
|
10915
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)("span", { className: "cv-gate-mark", children: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(TriangleAlert, { size: 22 }) }),
|
|
10916
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)("h3", { className: "cv-gate-title", part: "error-title", children: text.title }),
|
|
10917
|
+
text.body === void 0 ? null : /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("p", { part: "error-body", children: text.body }),
|
|
10918
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)("button", { className: "cv-btn cv-btn--accent", onClick: onRetry, part: "error-retry", children: "Reintentar" })
|
|
10343
10919
|
] });
|
|
10344
10920
|
}
|
|
10345
10921
|
|
|
10346
10922
|
// src/ui/permission/LeaderGate.tsx
|
|
10347
|
-
var
|
|
10923
|
+
var import_jsx_runtime23 = __toESM(require_jsx_runtime(), 1);
|
|
10348
10924
|
function LeaderGate() {
|
|
10349
|
-
return /* @__PURE__ */ (0,
|
|
10350
|
-
/* @__PURE__ */ (0,
|
|
10351
|
-
/* @__PURE__ */ (0,
|
|
10352
|
-
/* @__PURE__ */ (0,
|
|
10925
|
+
return /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("div", { className: "cv-gate", part: "leader-gate", children: [
|
|
10926
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)("span", { className: "cv-gate-mark", children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(MonitorSmartphone, { size: 22 }) }),
|
|
10927
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)("h3", { className: "cv-gate-title", part: "leader-title", children: "Tel\xE9fono activo en otra pesta\xF1a" }),
|
|
10928
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)("p", { part: "leader-body", children: "Solo una pesta\xF1a puede usar el tel\xE9fono a la vez. Cierra la otra para activar esta." })
|
|
10353
10929
|
] });
|
|
10354
10930
|
}
|
|
10355
10931
|
|
|
10356
10932
|
// src/ui/lib/useCallOutcome.ts
|
|
10357
|
-
var
|
|
10933
|
+
var import_react37 = __toESM(require_react(), 1);
|
|
10358
10934
|
var BACKSTOP_MS = 6e3;
|
|
10359
10935
|
function useCallOutcome() {
|
|
10360
10936
|
const softphone = useSoftphone();
|
|
10361
|
-
const [code, setCode] = (0,
|
|
10362
|
-
const timer = (0,
|
|
10363
|
-
const clear = (0,
|
|
10937
|
+
const [code, setCode] = (0, import_react37.useState)(null);
|
|
10938
|
+
const timer = (0, import_react37.useRef)(void 0);
|
|
10939
|
+
const clear = (0, import_react37.useCallback)(() => {
|
|
10364
10940
|
clearTimeout(timer.current);
|
|
10365
10941
|
setCode(null);
|
|
10366
10942
|
}, []);
|
|
10367
|
-
(0,
|
|
10943
|
+
(0, import_react37.useEffect)(() => {
|
|
10368
10944
|
const off = softphone.on("error" /* Error */, (error) => {
|
|
10369
10945
|
if (error.fatal) return;
|
|
10370
10946
|
clearTimeout(timer.current);
|
|
@@ -10376,7 +10952,7 @@ function useCallOutcome() {
|
|
|
10376
10952
|
clearTimeout(timer.current);
|
|
10377
10953
|
};
|
|
10378
10954
|
}, [softphone]);
|
|
10379
|
-
(0,
|
|
10955
|
+
(0, import_react37.useEffect)(() => softphone.on("incomingCall" /* IncomingCall */, () => clear()), [softphone, clear]);
|
|
10380
10956
|
return {
|
|
10381
10957
|
outcome: code === null ? null : { code, text: ERROR_TEXT[code].title },
|
|
10382
10958
|
clear
|
|
@@ -10384,12 +10960,12 @@ function useCallOutcome() {
|
|
|
10384
10960
|
}
|
|
10385
10961
|
|
|
10386
10962
|
// src/ui/audio/useCallAudio.ts
|
|
10387
|
-
var
|
|
10963
|
+
var import_react39 = __toESM(require_react(), 1);
|
|
10388
10964
|
function useCallAudio(enabled) {
|
|
10389
10965
|
const softphone = useSoftphone();
|
|
10390
|
-
const remote = (0,
|
|
10391
|
-
const tone = (0,
|
|
10392
|
-
(0,
|
|
10966
|
+
const remote = (0, import_react39.useRef)(null);
|
|
10967
|
+
const tone = (0, import_react39.useRef)(null);
|
|
10968
|
+
(0, import_react39.useEffect)(() => {
|
|
10393
10969
|
if (!enabled || typeof document === "undefined") return;
|
|
10394
10970
|
const prime = () => primeAudio();
|
|
10395
10971
|
const gestures = ["pointerdown", "keydown"];
|
|
@@ -10483,7 +11059,7 @@ function useCallAudio(enabled) {
|
|
|
10483
11059
|
}
|
|
10484
11060
|
|
|
10485
11061
|
// src/ui/notices/TransferNotices.tsx
|
|
10486
|
-
var
|
|
11062
|
+
var import_jsx_runtime24 = __toESM(require_jsx_runtime(), 1);
|
|
10487
11063
|
function TransferNotices({
|
|
10488
11064
|
notices,
|
|
10489
11065
|
dismiss
|
|
@@ -10495,7 +11071,7 @@ function TransferNotices({
|
|
|
10495
11071
|
if (notice.caller) void softphone.call(notice.caller).catch(() => {
|
|
10496
11072
|
});
|
|
10497
11073
|
};
|
|
10498
|
-
return /* @__PURE__ */ (0,
|
|
11074
|
+
return /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(
|
|
10499
11075
|
"div",
|
|
10500
11076
|
{
|
|
10501
11077
|
className: "cv-transfer-notices",
|
|
@@ -10503,20 +11079,20 @@ function TransferNotices({
|
|
|
10503
11079
|
part: "transfer-notices",
|
|
10504
11080
|
"data-has-notices": notices.length > 0,
|
|
10505
11081
|
children: [
|
|
10506
|
-
notices.length > 1 ? /* @__PURE__ */ (0,
|
|
11082
|
+
notices.length > 1 ? /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)("p", { className: "cv-transfer-notices-count", children: [
|
|
10507
11083
|
notices.length,
|
|
10508
11084
|
" traspasos sin conectar"
|
|
10509
11085
|
] }) : null,
|
|
10510
|
-
notices.map((notice) => /* @__PURE__ */ (0,
|
|
10511
|
-
/* @__PURE__ */ (0,
|
|
10512
|
-
/* @__PURE__ */ (0,
|
|
10513
|
-
/* @__PURE__ */ (0,
|
|
10514
|
-
/* @__PURE__ */ (0,
|
|
11086
|
+
notices.map((notice) => /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)("div", { className: "cv-transfer-notice", part: "transfer-notice", children: [
|
|
11087
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)("span", { className: "cv-transfer-notice-mark", "aria-hidden": true, children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(PhoneMissed, { size: 16 }) }),
|
|
11088
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsxs)("div", { className: "cv-transfer-notice-body", children: [
|
|
11089
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsxs)("div", { className: "cv-transfer-notice-header", children: [
|
|
11090
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsxs)("p", { className: "cv-transfer-notice-title", children: [
|
|
10515
11091
|
"El traspaso a ",
|
|
10516
11092
|
notice.target,
|
|
10517
11093
|
" no se conect\xF3"
|
|
10518
11094
|
] }),
|
|
10519
|
-
/* @__PURE__ */ (0,
|
|
11095
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
10520
11096
|
"button",
|
|
10521
11097
|
{
|
|
10522
11098
|
type: "button",
|
|
@@ -10524,17 +11100,17 @@ function TransferNotices({
|
|
|
10524
11100
|
onClick: () => dismiss(notice.id),
|
|
10525
11101
|
"aria-label": "Descartar aviso",
|
|
10526
11102
|
part: "transfer-notice-dismiss",
|
|
10527
|
-
children: /* @__PURE__ */ (0,
|
|
11103
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(X, { size: 14 })
|
|
10528
11104
|
}
|
|
10529
11105
|
)
|
|
10530
11106
|
] }),
|
|
10531
|
-
notice.caller ? /* @__PURE__ */ (0,
|
|
11107
|
+
notice.caller ? /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)("p", { className: "cv-transfer-notice-subtitle", children: [
|
|
10532
11108
|
notice.caller,
|
|
10533
11109
|
" se ha desconectado."
|
|
10534
11110
|
] }) : null,
|
|
10535
|
-
/* @__PURE__ */ (0,
|
|
10536
|
-
/* @__PURE__ */ (0,
|
|
10537
|
-
notice.caller ? /* @__PURE__ */ (0,
|
|
11111
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsxs)("div", { className: "cv-transfer-notice-footer", children: [
|
|
11112
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)("p", { className: "cv-transfer-notice-age", children: formatAge(elapsedSeconds(notice.at, now)) }),
|
|
11113
|
+
notice.caller ? /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(
|
|
10538
11114
|
"button",
|
|
10539
11115
|
{
|
|
10540
11116
|
type: "button",
|
|
@@ -10542,7 +11118,7 @@ function TransferNotices({
|
|
|
10542
11118
|
onClick: () => callBack(notice),
|
|
10543
11119
|
part: "transfer-notice-callback",
|
|
10544
11120
|
children: [
|
|
10545
|
-
/* @__PURE__ */ (0,
|
|
11121
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)(Phone, { size: 14, "aria-hidden": true }),
|
|
10546
11122
|
"Llamar de vuelta"
|
|
10547
11123
|
]
|
|
10548
11124
|
}
|
|
@@ -10556,15 +11132,15 @@ function TransferNotices({
|
|
|
10556
11132
|
}
|
|
10557
11133
|
|
|
10558
11134
|
// src/ui/notices/useTransferNotices.ts
|
|
10559
|
-
var
|
|
11135
|
+
var import_react42 = __toESM(require_react(), 1);
|
|
10560
11136
|
function useTransferNotices() {
|
|
10561
11137
|
const softphone = useSoftphone();
|
|
10562
|
-
const [notices, setNotices] = (0,
|
|
10563
|
-
const nextId = (0,
|
|
10564
|
-
const dismiss = (0,
|
|
11138
|
+
const [notices, setNotices] = (0, import_react42.useState)([]);
|
|
11139
|
+
const nextId = (0, import_react42.useRef)(0);
|
|
11140
|
+
const dismiss = (0, import_react42.useCallback)((id) => {
|
|
10565
11141
|
setNotices((prev) => prev.filter((n) => n.id !== id));
|
|
10566
11142
|
}, []);
|
|
10567
|
-
(0,
|
|
11143
|
+
(0, import_react42.useEffect)(
|
|
10568
11144
|
() => softphone.on("transferOutcome" /* TransferOutcome */, (payload) => {
|
|
10569
11145
|
if (payload.status === "not-connected") {
|
|
10570
11146
|
const id = nextId.current++;
|
|
@@ -10577,7 +11153,7 @@ function useTransferNotices() {
|
|
|
10577
11153
|
}
|
|
10578
11154
|
|
|
10579
11155
|
// src/ui/SoftphoneWidget.tsx
|
|
10580
|
-
var
|
|
11156
|
+
var import_jsx_runtime25 = __toESM(require_jsx_runtime(), 1);
|
|
10581
11157
|
function SoftphoneWidget(props) {
|
|
10582
11158
|
const {
|
|
10583
11159
|
contacts,
|
|
@@ -10593,7 +11169,7 @@ function SoftphoneWidget(props) {
|
|
|
10593
11169
|
const fallback = softphone.sources;
|
|
10594
11170
|
const contactsSource = contacts ?? fallback?.contacts;
|
|
10595
11171
|
const historySource = history ?? fallback?.history;
|
|
10596
|
-
const [tab, setTab] = (0,
|
|
11172
|
+
const [tab, setTab] = (0, import_react44.useState)("dialer");
|
|
10597
11173
|
const call = useActiveCall();
|
|
10598
11174
|
const isLeader = useIsLeader();
|
|
10599
11175
|
const softphoneState = useSoftphoneState();
|
|
@@ -10622,15 +11198,15 @@ function SoftphoneWidget(props) {
|
|
|
10622
11198
|
// optional parts of a phone, so this is never conditionally hidden.
|
|
10623
11199
|
{ id: "settings", icon: Settings, label: "Ajustes", show: true }
|
|
10624
11200
|
].filter((t) => t.show);
|
|
10625
|
-
return /* @__PURE__ */ (0,
|
|
11201
|
+
return /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(
|
|
10626
11202
|
"div",
|
|
10627
11203
|
{
|
|
10628
11204
|
className: className ? `cv-softphone ${className}` : "cv-softphone",
|
|
10629
11205
|
...theme === "system" ? {} : { "data-cv-theme": theme },
|
|
10630
11206
|
children: [
|
|
10631
|
-
screenIsFree ? /* @__PURE__ */ (0,
|
|
10632
|
-
/* @__PURE__ */ (0,
|
|
10633
|
-
screenIsFree ? /* @__PURE__ */ (0,
|
|
11207
|
+
screenIsFree ? /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(TransferNotices, { notices: transferNotices, dismiss: dismissTransferNotice }) : null,
|
|
11208
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)("div", { className: "cv-body", children: isFollower ? /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(LeaderGate, {}) : blocked ? /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(MicPrompt, { state: mic.state, onRequest: () => void mic.request() }) : call ? /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(CallScreen, { call, keyTones: sounds, ...incomingCallAction ? { incomingCallAction } : {} }) : fatal ? /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(ErrorGate, { error: fatal, onRetry: retry }) : tab === "contacts" && contactsSource ? /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(ContactsTab, { source: contactsSource, ...contactAction ? { contactAction } : {} }) : tab === "history" && historySource ? /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(HistoryTab, { source: historySource }) : tab === "settings" ? /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(SettingsTab, {}) : /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(Dialpad, { outcome, onIntent: clearOutcome, keyTones: sounds }) }),
|
|
11209
|
+
screenIsFree ? /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("div", { className: "cv-tabs", role: "tablist", children: tabs.map(({ id, icon: Icon3, label }) => /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(
|
|
10634
11210
|
"button",
|
|
10635
11211
|
{
|
|
10636
11212
|
role: "tab",
|
|
@@ -10638,8 +11214,8 @@ function SoftphoneWidget(props) {
|
|
|
10638
11214
|
className: "cv-tab",
|
|
10639
11215
|
onClick: () => setTab(id),
|
|
10640
11216
|
children: [
|
|
10641
|
-
/* @__PURE__ */ (0,
|
|
10642
|
-
/* @__PURE__ */ (0,
|
|
11217
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)(Icon3, { size: 20 }),
|
|
11218
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)("span", { children: label })
|
|
10643
11219
|
]
|
|
10644
11220
|
},
|
|
10645
11221
|
id
|
|
@@ -10650,7 +11226,7 @@ function SoftphoneWidget(props) {
|
|
|
10650
11226
|
}
|
|
10651
11227
|
|
|
10652
11228
|
// src/styles/softphone.css
|
|
10653
|
-
var softphone_default = "/**\r\n * @coventia/softphone/styles.css\r\n *\r\n * The theming contract (SPEC \xA72.6) + all component styles. A host restyles the softphone by\r\n * overriding the `--cv-*` custom properties \u2014 which are INHERITED, so they cross the shadow boundary\r\n * of `<coventia-softphone>` by design (the host's own CSS *selectors* do not, which is what stops a\r\n * stray `button { width:100% }` from destroying the dialpad).\r\n *\r\n * Defaults match the Coventia product: light surface, emerald accent, soft rounded key cards.\r\n *\r\n * Reseller: coventia-softphone { --cv-accent:#7c3aed; --cv-bg:#0b0b0f; }\r\n * CRM (shadcn bridge, ~15 lines, dark mode included):\r\n * .cv-softphone { --cv-bg:hsl(var(--background)); --cv-text:hsl(var(--foreground)); \u2026 }\r\n *\r\n * TYPOGRAPHY NOTE: `--cv-font` is a system stack on purpose. An embedded widget should inherit its\r\n * host's type, not force a webfont into someone else's app; hosts override the token if they want.\r\n *\r\n * Strings are Spanish-only (SPEC \xA72.4). No i18n.\r\n */\r\n\r\n/*\r\n * The custom element's own box.\r\n *\r\n * A custom element is `display: inline` by default and has NO size \u2014 and the widget inside now fills\r\n * its host rather than asserting 340\xD7520, so without this the element would render to ZERO. The\r\n * drop-in promise is \"one tag and it works\", which means the TAG must carry a box.\r\n *\r\n * These are defaults, not decisions: they sit on `:host`, so any host stylesheet outranks them \u2014\r\n *\r\n * coventia-softphone { width: 100%; height: 100%; } \u2190 a sidebar\r\n * coventia-softphone { height: 600px; } \u2190 taller\r\n *\r\n * React consumers never see this: they import `/ui` and their own wrapper states the box (the CRM's\r\n * PhoneDialer does exactly that).\r\n */\r\n:host {\r\n display: block;\r\n width: 340px;\r\n height: 520px;\r\n}\r\n\r\n/* React's container inside the shadow root \u2014 element path only; inert everywhere else.\r\n *\r\n * It must pass the host's height straight through. `.cv-softphone` below is `height: 100%`, and a\r\n * percentage height resolves against the PARENT: leave this div at its default `auto` and that 100%\r\n * silently becomes `auto` too, so the widget collapses to its content height and the host's `height`\r\n * is ignored. What you see is a short card stranded in a taller box \u2014 which reads as a broken widget,\r\n * not as a broken wrapper. */\r\n.cv-mount {\r\n height: 100%;\r\n}\r\n\r\n:host,\r\n.cv-softphone {\r\n /* Surface */\r\n --cv-bg: #ffffff;\r\n --cv-surface: #f9fafb;\r\n --cv-surface-2: #f3f4f6;\r\n --cv-border: #f3f4f6;\r\n --cv-border-strong: #e5e7eb;\r\n\r\n /* Text \u2014 three tiers, split by CONTRAST DUTY, not by taste:\r\n `text` informational primary 17.7:1\r\n `muted` informational secondary 4.8:1 (AA \u2014 phone numbers, timestamps, tab labels)\r\n `faint` DECORATIVE only 2.5:1 (keypad letters, placeholder \u2014 never information)\r\n The legacy used gray-400 for all secondary text, which fails AA at 2.54:1. Splitting the tier\r\n keeps the look while making the informational text legible. */\r\n --cv-text: #111827;\r\n --cv-muted: #6b7280;\r\n --cv-faint: #9ca3af;\r\n\r\n /* Intent \u2014 emerald. Split by CONTRAST DUTY, because one \"brand green\" cannot do all three jobs:\r\n `accent` FILL that carries a white glyph \u2192 emerald-600, white 3.77:1 \u2713\r\n (emerald-500 is the prettier brand green but white on it is 2.54:1 \u2014 the\r\n call button's phone icon would fail WCAG non-text contrast. Measured, not guessed.)\r\n `accent-strong` emerald AS TEXT on a surface \u2192 emerald-700, 5.48:1 \u2713 for the 10px tab label\r\n `accent-light` DECORATIVE only (the ring halo) \u2014 never carries text, so it stays vivid */\r\n --cv-accent: #059669;\r\n --cv-accent-strong: #047857;\r\n --cv-accent-light: #10b981;\r\n --cv-accent-soft: #a7f3d0;\r\n --cv-accent-contrast: #ffffff;\r\n --cv-danger: #ef4444;\r\n /* `--cv-danger` ITSELF fails 3:1 non-text contrast against `--cv-danger-soft` (2.6:1, measured) \u2014\r\n the same AS-TEXT/on-a-tinted-surface split `accent` already has, `danger` was just missing until\r\n the Historial tab's status badges needed it. Darker on light (mirrors `accent-strong`), LIGHTER on\r\n dark (red-400) \u2014 same inversion `accent-strong` documents above, same reason: emphasis on a dark\r\n surface means more light, not less.\r\n red-700 (#b91c1c) was the first pick here and overshot both minimums (6.47:1 text, 4.47:1 badge)\r\n enough to read as a dark, brownish red rather than red \u2014 red-600 clears both with real margin\r\n still (4.83:1 / 3.34:1, measured) and looks like red. */\r\n --cv-danger-strong: #dc2626;\r\n --cv-danger-soft: #fecaca;\r\n /* A third status hue, sky \u2014 for the Historial row status chip specifically: an outgoing call that\r\n WAS answered gets its own colour rather than sharing `accent`, matching the legacy CRM's own\r\n three-way split (emerald/sky/rose) that this file's earlier restrained accent-only-for-\"fine\"\r\n version had collapsed away. Same strong/soft split, same inversion, as `accent`/`danger` above \u2014\r\n 4.47:1 light / 4.42:1 dark against `-soft`, measured. */\r\n --cv-info: #0284c7;\r\n --cv-info-strong: #0369a1;\r\n --cv-info-soft: #bae6fd;\r\n --cv-hold: #6366f1;\r\n\r\n /* Shape & type */\r\n --cv-radius: 16px;\r\n /* Strong ease-out. The built-in CSS easings are too weak to read as intentional. */\r\n --cv-ease-out: cubic-bezier(0.23, 1, 0.32, 1);\r\n --cv-radius-key: 16px;\r\n --cv-font: system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;\r\n --cv-font-size: 14px;\r\n --cv-shadow: 0 1px 2px rgb(0 0 0 / 0.04), 0 1px 3px rgb(0 0 0 / 0.06);\r\n\r\n color: var(--cv-text);\r\n font-family: var(--cv-font);\r\n font-size: var(--cv-font-size);\r\n}\r\n\r\n/**\r\n * Dark theme \u2014 matched to the Coventia product's own dark tokens, not invented.\r\n *\r\n * The CRM defines `--background: 240 10% 10%` (#17171c) with surfaces at 15.9% (#27272a) and borders\r\n * at 25.9% (#404044) \u2014 the zinc/240-hue family. An earlier draft here used a near-black\r\n * (#0f0f13, ~half the luminance of the product's background) with 2%-luminance borders that were\r\n * effectively invisible. That is the \"black tonality\" that read wrong: right hue, wrong lightness.\r\n *\r\n * Note the accent INVERTS: on light, `accent-strong` is darker than `accent` (emerald-700); on dark\r\n * it must be LIGHTER (emerald-400), because emphasis on a dark surface means more light, not less.\r\n * Same token, opposite direction \u2014 miss this and the timer/active tab sink into the background.\r\n *\r\n * \u2500\u2500 HOW THE THEME IS CHOSEN \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\r\n * By default it follows the OS (`prefers-color-scheme`). But a host must be able to PIN it: the\r\n * Coventia CRM toggles dark with a class (next-themes), not the OS setting \u2014 so a user with a dark\r\n * OS but the CRM in light mode would otherwise get a dark widget inside a light app.\r\n *\r\n * <SoftphoneWidget theme=\"light\" /> \u2192 data-cv-theme=\"light\" \u2014 always light\r\n * <SoftphoneWidget theme=\"dark\" /> \u2192 data-cv-theme=\"dark\" \u2014 always dark\r\n * <SoftphoneWidget /> \u2192 follows the OS\r\n *\r\n * To follow the HOST's theme rather than the OS, pass the host's current theme through, e.g.\r\n * next-themes: `const { resolvedTheme } = useTheme(); <SoftphoneWidget theme={resolvedTheme} />`.\r\n *\r\n * The dark block is duplicated below (OS-driven vs. pinned) on purpose: plain CSS has no way to\r\n * share a declaration block across a media query and a selector, and the honest duplication beats a\r\n * clever custom-property toggle nobody can debug.\r\n */\r\n@media (prefers-color-scheme: dark) {\r\n :host(:not([data-cv-theme='light'])),\r\n .cv-softphone:not([data-cv-theme='light']) {\r\n --cv-bg: #17171c; /* CRM --background 240 10% 10% */\r\n --cv-surface: #202027; /* between bg and secondary */\r\n --cv-surface-2: #27272a; /* CRM --secondary/--muted 240 3.7% 15.9% */\r\n --cv-border: #2e2e33;\r\n --cv-border-strong: #404044; /* CRM --border 240 3.7% 25.9% */\r\n --cv-text: #fafafa; /* CRM --foreground 0 0% 98% */\r\n --cv-muted: #a1a1aa; /* CRM --muted-foreground 240 5% 64.9% \u2192 6.97:1 AA */\r\n --cv-faint: #71717a; /* decorative only */\r\n --cv-accent-strong: #34d399; /* emerald-400 \u2014 9.29:1 on #17171c */\r\n --cv-accent-light: #34d399; /* the halo reads brighter on dark */\r\n --cv-accent-soft: #065f46; /* glows must darken on dark, not glare */\r\n --cv-danger-strong: #f87171; /* red-400 \u2014 LIGHTER than --cv-danger, same inversion as accent-strong */\r\n --cv-danger-soft: #7f1d1d;\r\n --cv-info-strong: #38bdf8; /* sky-400 \u2014 same inversion, same reason */\r\n --cv-info-soft: #0c4a6e;\r\n --cv-shadow: 0 1px 2px rgb(0 0 0 / 0.4);\r\n }\r\n}\r\n\r\n/* Pinned dark \u2014 wins regardless of the OS setting. */\r\n:host([data-cv-theme='dark']),\r\n.cv-softphone[data-cv-theme='dark'] {\r\n --cv-bg: #17171c;\r\n --cv-surface: #202027;\r\n --cv-surface-2: #27272a;\r\n --cv-border: #2e2e33;\r\n --cv-border-strong: #404044;\r\n --cv-text: #fafafa;\r\n --cv-muted: #a1a1aa;\r\n --cv-faint: #71717a;\r\n --cv-accent-strong: #34d399;\r\n --cv-accent-light: #34d399;\r\n --cv-accent-soft: #065f46;\r\n --cv-danger-strong: #f87171;\r\n --cv-danger-soft: #7f1d1d;\r\n --cv-info-strong: #38bdf8;\r\n --cv-info-soft: #0c4a6e;\r\n --cv-shadow: 0 1px 2px rgb(0 0 0 / 0.4);\r\n}\r\n\r\n.cv-softphone,\r\n.cv-softphone *,\r\n.cv-softphone *::before,\r\n.cv-softphone *::after {\r\n box-sizing: border-box;\r\n}\r\n\r\n/* \u2500\u2500 Shell \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */\r\n.cv-softphone {\r\n display: flex;\r\n flex-direction: column;\r\n\r\n /* FILL the box the host gives us; do not assert one.\r\n This was `width: 340px; height: 520px`, which is a component telling its host how big its\r\n layout is. The CRM's panel is 310 wide, so the third keypad column was simply cut off \u2014 and no\r\n amount of theming could have fixed it, because the widget was not asking. A component in\r\n someone else's layout accepts a size. */\r\n width: 100%;\r\n height: 100%;\r\n\r\n /* \u2026but a dialpad is not a spreadsheet. Given 900px it should not become a 900px dialpad with\r\n 300px keys; it should be itself, centred. Cap and centre rather than stretch. */\r\n max-width: var(--cv-max-width, 420px);\r\n margin-inline: auto;\r\n\r\n /* Adapt to THIS box, not to the viewport. The widget can be 310px wide inside a 1920px screen \u2014\r\n a media query would ask the wrong question and get a confident wrong answer. Container queries\r\n are the only ones that know the truth, and a shadow root is the ideal place for them. */\r\n container-type: inline-size;\r\n container-name: cv;\r\n\r\n background: var(--cv-bg);\r\n overflow: hidden;\r\n /* The containing block for `.cv-transfer-notices` \u2014 it overlays this whole shell, top edge to top\r\n edge, not just `.cv-body`, so it reads as one seamless panel rather than a strip that starts a few\r\n pixels short of the shell's own rounded corner. */\r\n position: relative;\r\n\r\n /* The frame is the HOST's call. The CRM's panel already draws `border rounded-xl shadow-2xl`, so\r\n drawing our own put a card inside a card \u2014 nested chrome, which is always wrong. Defaulting to\r\n a frame still suits a bare drop-in on a blank page; a host that has its own sets these to\r\n `none` / `0` and the double edge disappears. */\r\n border: var(--cv-shell-border, 1px solid var(--cv-border-strong));\r\n border-radius: var(--cv-shell-radius, var(--cv-radius));\r\n box-shadow: var(--cv-shell-shadow, 0 4px 24px rgb(0 0 0 / 0.06));\r\n}\r\n\r\n/* Narrow hosts \u2014 a sidebar, a phone-width column. Reclaim the horizontal padding first: at 260px\r\n the gutters cost more than they give, and a cramped keypad is worse than a tight one. */\r\n@container cv (max-width: 300px) {\r\n .cv-keypad { padding: 0 0.6rem; gap: 6px; }\r\n .cv-dial-prefix { padding: 0.7rem 0.6rem 0; }\r\n .cv-dial-head { padding: 0.3rem 0.6rem 0.6rem; }\r\n .cv-display { font-size: 1.5rem; }\r\n}\r\n\r\n/* Short hosts. The flex chain already lets the keypad absorb what is left, but below this the keys\r\n stop being tappable \u2014 so buy the height back from the chrome instead of from the keys. */\r\n@container cv (max-height: 440px) {\r\n .cv-dial-prefix { padding-top: 0.5rem; }\r\n .cv-dial-head { padding-top: 0.2rem; padding-bottom: 0.4rem; }\r\n .cv-dial-foot { padding-bottom: 0.5rem; }\r\n .cv-controls { gap: 0.4rem; padding-bottom: 0.6rem; }\r\n}\r\n\r\n/* The flex chain that makes the layout work: body flexes, views fill it, only the\r\n keypad/list grows. Without `min-height:0` a grid child refuses to shrink and overflows. */\r\n.cv-body {\r\n flex: 1;\r\n min-height: 0;\r\n display: flex;\r\n flex-direction: column;\r\n}\r\n.cv-view {\r\n flex: 1;\r\n min-height: 0;\r\n display: flex;\r\n flex-direction: column;\r\n /* Containing block for `.cv-detail` below \u2014 an absolute overlay must cover exactly THIS tab's\r\n content, not escape to whatever the next positioned ancestor up the tree happens to be. */\r\n position: relative;\r\n}\r\n\r\n/* \u2500\u2500 Tab bar \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */\r\n.cv-tabs {\r\n display: flex;\r\n border-top: 1px solid var(--cv-border);\r\n background: var(--cv-bg);\r\n flex-shrink: 0;\r\n}\r\n.cv-tab {\r\n flex: 1;\r\n display: flex;\r\n flex-direction: column;\r\n align-items: center;\r\n gap: 3px;\r\n padding: 9px 0 8px;\r\n background: none;\r\n border: none;\r\n color: var(--cv-muted);\r\n cursor: pointer;\r\n font: inherit;\r\n transition: color 0.15s ease, background 0.15s ease;\r\n}\r\n.cv-tab:hover:not(:disabled) { background: var(--cv-surface); }\r\n.cv-tab[aria-selected='true'] { color: var(--cv-accent-strong); }\r\n.cv-tab:disabled { opacity: 0.35; cursor: not-allowed; }\r\n.cv-tab span { font-size: 10px; font-weight: 600; line-height: 1; letter-spacing: 0.01em; }\r\n\r\n/* \u2500\u2500 Transfer outcome notices (Phase A \u2014 transfer-outcome-relay.md \xA75.5) \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */\r\n/*\r\n A persistent, dismissable banner OVER `.cv-body`, never a toast and never auto-dismissed \u2014 it carries\r\n an action, and WCAG 2.2.1 requires a time limit to be removable, adjustable or extended.\r\n\r\n Overlaps rather than reserving its own height, the same reasoning `.cv-dial-outcome`'s own comment\r\n already gives for why the widget never lets a line of text resize the keypad under a moving finger \u2014\r\n here that principle cuts the other way: appearing costs nothing but a repaint, not a reflow, so the\r\n widget's overall height stays identical whether a notice is showing or not, exactly like `.cv-detail`\r\n overlaying `.cv-body`'s own list rather than pushing it down. It sits over whatever the current tab\r\n happens to be showing (most often the dialer's country picker and number field \u2014 an acceptable loss:\r\n the agent is not expected to start a fresh manual dial before dealing with a transfer that just failed\r\n to connect), which is also why it outranks `.cv-detail` in `z-index`.\r\n\r\n `[data-has-notices='false']` collapses to zero footprint: the element stays mounted (so its\r\n `role=\"status\"` region exists before the FIRST notice ever arrives \u2014 an aria-live region inserted at\r\n the same moment as its own content is not reliably announced), but an idle widget, the common case,\r\n covers nothing and costs no paint either.\r\n*/\r\n.cv-transfer-notices {\r\n position: absolute;\r\n inset: 0 0 auto 0;\r\n z-index: 3; /* above `.cv-detail`'s 2 \u2014 this is the higher-priority thing on screen */\r\n}\r\n.cv-transfer-notices[data-has-notices='true'] {\r\n display: flex;\r\n flex-direction: column;\r\n gap: 0.5rem;\r\n padding: 0.6rem 0.75rem;\r\n background: var(--cv-bg);\r\n box-shadow: var(--cv-shadow);\r\n animation: cv-transfer-notices-in 200ms var(--cv-ease-out) both;\r\n}\r\n@keyframes cv-transfer-notices-in {\r\n from { opacity: 0; transform: translateY(-6px); }\r\n to { opacity: 1; transform: none; }\r\n}\r\n@media (prefers-reduced-motion: reduce) {\r\n .cv-transfer-notices[data-has-notices='true'] { animation: none; }\r\n}\r\n.cv-transfer-notices-count {\r\n margin: 0;\r\n font: 600 0.72rem var(--cv-font);\r\n color: var(--cv-muted);\r\n text-transform: uppercase;\r\n letter-spacing: 0.04em;\r\n}\r\n.cv-transfer-notice {\r\n display: flex;\r\n align-items: flex-start;\r\n gap: 0.6rem;\r\n padding: 0.65rem 0.7rem;\r\n border-radius: var(--cv-radius-key);\r\n border: 1px solid var(--cv-danger-soft);\r\n background: var(--cv-surface);\r\n}\r\n/* Same shape as `.cv-gate-mark`, smaller \u2014 one visual language for \"here is a status\", not two. */\r\n.cv-transfer-notice-mark {\r\n flex-shrink: 0;\r\n display: grid;\r\n place-items: center;\r\n width: 30px;\r\n height: 30px;\r\n border-radius: 999px;\r\n background: var(--cv-danger-soft);\r\n color: var(--cv-danger);\r\n}\r\n.cv-transfer-notice-body { flex: 1; min-width: 0; }\r\n/*\r\n Title shares its row with only the dismiss button (24px) \u2014 not the whole card's width, and not the\r\n \"Llamar de vuelta\" button, which gets its own row below (`.cv-transfer-notice-footer`). The original\r\n layout put mark + title + subtitle + a full button all in one flex row, leaving the title as little as\r\n ~80px to wrap into at the real ~340px embed width \u2014 nearly every word landed on its own line.\r\n `align-items: flex-start` keeps the dismiss pinned to the first line even when the title wraps to two.\r\n*/\r\n.cv-transfer-notice-header { display: flex; align-items: flex-start; gap: 0.4rem; }\r\n.cv-transfer-notice-title {\r\n flex: 1;\r\n min-width: 0;\r\n margin: 0;\r\n font: 600 0.82rem var(--cv-font);\r\n color: var(--cv-text);\r\n line-height: 1.35;\r\n}\r\n.cv-transfer-notice-subtitle {\r\n margin: 0.15rem 0 0;\r\n font-size: 0.78rem;\r\n color: var(--cv-muted);\r\n line-height: 1.35;\r\n}\r\n/* Age and the callback button share a row too, same reasoning as the header \u2014 a short fixed-width\r\n timestamp beside a content-sized button, neither one fighting the title for space above. */\r\n.cv-transfer-notice-footer {\r\n display: flex;\r\n align-items: center;\r\n justify-content: space-between;\r\n gap: 0.5rem;\r\n margin-top: 0.35rem;\r\n}\r\n.cv-transfer-notice-age { margin: 0; font-size: 0.7rem; color: var(--cv-faint); flex-shrink: 0; }\r\n/*\r\n `.cv-btn.cv-transfer-notice-callback` \u2014 TWO classes, not one. Equal-specificity selectors resolve by\r\n source order, and this rule used to lose its `padding`/`font-size` to the shared `.cv-btn` rule below\r\n simply because that one appears later in the file; the button rendered at full default CTA size\r\n instead of this smaller, secondary one, which is what actually forced the title into that ~80px\r\n column above. The extra class is what makes this override win regardless of source order.\r\n*/\r\n.cv-btn.cv-transfer-notice-callback {\r\n flex-shrink: 0;\r\n padding: 0.35rem 0.6rem;\r\n font-size: 0.75rem;\r\n display: inline-flex;\r\n align-items: center;\r\n gap: 0.3rem;\r\n white-space: nowrap;\r\n}\r\n/* Same round icon-only shape as `.cv-search-clear` \u2014 one dismiss affordance, not a new one. */\r\n.cv-transfer-notice-dismiss {\r\n flex-shrink: 0;\r\n width: 24px;\r\n height: 24px;\r\n display: inline-flex;\r\n align-items: center;\r\n justify-content: center;\r\n border: none;\r\n border-radius: 999px;\r\n background: none;\r\n color: var(--cv-muted);\r\n cursor: pointer;\r\n transition: color 0.12s ease, background 0.12s ease, transform 0.1s var(--cv-ease-out);\r\n}\r\n.cv-transfer-notice-dismiss:hover { color: var(--cv-text); background: var(--cv-surface-2); }\r\n.cv-transfer-notice-dismiss:active { transform: scale(0.88); }\r\n\r\n/* \u2500\u2500 Buttons \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */\r\n.cv-btn {\r\n font: 600 0.875rem var(--cv-font);\r\n cursor: pointer;\r\n padding: 0.5rem 0.9rem;\r\n border-radius: 10px;\r\n border: 1px solid var(--cv-border-strong);\r\n background: var(--cv-bg);\r\n color: var(--cv-text);\r\n transition: background 0.15s ease, transform 0.06s ease;\r\n}\r\n.cv-btn:hover:not(:disabled) { background: var(--cv-surface); }\r\n.cv-btn:active:not(:disabled) { transform: scale(0.97); }\r\n.cv-btn:disabled { opacity: 0.45; cursor: not-allowed; }\r\n.cv-btn--accent {\r\n background: var(--cv-accent);\r\n border-color: var(--cv-accent);\r\n color: var(--cv-accent-contrast);\r\n}\r\n.cv-btn--accent:hover:not(:disabled) { background: var(--cv-accent-strong); }\r\n\r\n/* Round action buttons (answer / hangup / call) */\r\n.cv-round {\r\n width: 64px;\r\n height: 64px;\r\n border-radius: 999px;\r\n border: none;\r\n cursor: pointer;\r\n display: inline-flex;\r\n align-items: center;\r\n justify-content: center;\r\n color: #fff;\r\n transition: background 0.15s ease, transform 0.08s ease, box-shadow 0.15s ease;\r\n}\r\n.cv-round:active:not(:disabled) { transform: scale(0.94); }\r\n.cv-round--answer {\r\n background: var(--cv-accent);\r\n box-shadow: 0 8px 20px -4px var(--cv-accent-soft);\r\n}\r\n.cv-round--answer:hover:not(:disabled) { background: var(--cv-accent-strong); }\r\n.cv-round--answer:disabled {\r\n background: var(--cv-surface-2);\r\n color: var(--cv-faint);\r\n box-shadow: none;\r\n cursor: not-allowed;\r\n}\r\n.cv-round--hangup {\r\n background: var(--cv-danger);\r\n box-shadow: 0 8px 20px -4px var(--cv-danger-soft);\r\n}\r\n.cv-round--hangup:hover:not(:disabled) { filter: brightness(0.94); }\r\n\r\n/* \u2500\u2500 Dialpad \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */\r\n/* The prefix chip, on its own row above the number.\r\n Sharing a line with the number starves it: chip + erase button eat the middle, and a formatted\r\n international number needs every pixel. The number is the content; the prefix is a setting. */\r\n.cv-dial-prefix {\r\n flex-shrink: 0;\r\n display: flex;\r\n justify-content: center;\r\n padding: 1rem 1rem 0;\r\n}\r\n.cv-dial-head {\r\n flex-shrink: 0;\r\n display: flex;\r\n align-items: center;\r\n padding: 0.35rem 1rem 0.75rem;\r\n gap: 0.25rem;\r\n}\r\n/*\r\n * The outcome of the last attempt, under the number.\r\n *\r\n * ALWAYS in the layout, visible or not. The keypad is `flex: 1` and absorbs whatever height is left,\r\n * so a line that appears and disappears would resize every key and shift the whole grid under the\r\n * user's finger \u2014 mid-dial, which is exactly when this text arrives. Reserving the row costs one line\r\n * of height and buys a keypad that never moves.\r\n */\r\n.cv-dial-outcome {\r\n flex-shrink: 0;\r\n margin: 0;\r\n min-height: 1.15rem;\r\n padding: 0 1rem;\r\n text-align: center;\r\n font-size: 0.78rem;\r\n line-height: 1.15rem;\r\n color: var(--cv-muted);\r\n /*\r\n One line, always. `error-text.test.ts` caps every outcome at 48 characters so nothing should ever\r\n reach this \u2014 but a cap depends on whoever writes the next string remembering it, and the failure\r\n it prevents is not cosmetic: the keypad below is `flex: 1`, so a second line resizes all twelve\r\n keys and shifts the grid under a finger that is already moving. Truncating is visibly wrong and\r\n harmless; reflowing the dialpad mid-dial is invisibly wrong and makes the user misdial.\r\n */\r\n white-space: nowrap;\r\n overflow: hidden;\r\n text-overflow: ellipsis;\r\n /* Muted, not danger: the phone still works. A red line here would read as a broken phone. */\r\n opacity: 0;\r\n transition: opacity 150ms ease-out;\r\n}\r\n.cv-dial-outcome[data-shown='true'] {\r\n opacity: 1;\r\n}\r\n@media (prefers-reduced-motion: reduce) {\r\n .cv-dial-outcome {\r\n transition: none;\r\n }\r\n}\r\n\r\n.cv-display {\r\n flex: 1;\r\n min-width: 0;\r\n font: 600 1.75rem var(--cv-font);\r\n font-variant-numeric: tabular-nums;\r\n letter-spacing: -0.02em;\r\n text-align: center;\r\n color: var(--cv-text);\r\n border: none;\r\n background: none;\r\n padding: 0;\r\n caret-color: var(--cv-accent);\r\n}\r\n.cv-display::placeholder { color: var(--cv-faint); font-weight: 400; }\r\n.cv-display:focus { outline: none; }\r\n\r\n/* The spacer/erase pair keeps the number optically centred. */\r\n.cv-dial-side {\r\n width: 36px;\r\n height: 36px;\r\n flex-shrink: 0;\r\n display: inline-flex;\r\n align-items: center;\r\n justify-content: center;\r\n border: none;\r\n background: none;\r\n color: var(--cv-muted);\r\n cursor: pointer;\r\n border-radius: 999px;\r\n transition: color 0.15s ease, opacity 0.15s ease, transform 0.06s ease;\r\n}\r\n.cv-dial-side:hover { color: var(--cv-text); }\r\n.cv-dial-side:active { transform: scale(0.9); }\r\n.cv-dial-side[data-hidden='true'] { opacity: 0; pointer-events: none; }\r\n\r\n/* THE layout fix: the keypad flexes to fill, and its rows share the space equally.\r\n Keys must NOT use aspect-ratio \u2014 that overflows the shell and shoves the call button\r\n under the tab bar. */\r\n.cv-keypad {\r\n flex: 1;\r\n min-height: 0;\r\n display: grid;\r\n grid-template-columns: repeat(3, 1fr);\r\n grid-template-rows: repeat(4, 1fr);\r\n gap: 8px;\r\n padding: 0 1rem;\r\n}\r\n.cv-key {\r\n display: flex;\r\n flex-direction: column;\r\n align-items: center;\r\n justify-content: center;\r\n gap: 1px;\r\n border-radius: var(--cv-radius-key);\r\n border: 1px solid var(--cv-border);\r\n background: var(--cv-bg);\r\n box-shadow: var(--cv-shadow);\r\n color: var(--cv-text);\r\n cursor: pointer;\r\n user-select: none;\r\n transition: background 0.12s ease, transform 0.06s ease;\r\n}\r\n.cv-key:hover { background: var(--cv-surface); }\r\n.cv-key:active { transform: scale(0.95); background: var(--cv-surface-2); }\r\n.cv-key b { font: 500 1.25rem/1 var(--cv-font); }\r\n.cv-key small {\r\n font-size: 9px;\r\n font-weight: 600;\r\n letter-spacing: 0.14em;\r\n /* Decorative: the letters carry no information the digit doesn't. `faint`, not `muted`. */\r\n color: var(--cv-faint);\r\n line-height: 1;\r\n}\r\n\r\n.cv-dial-foot {\r\n flex-shrink: 0;\r\n display: flex;\r\n justify-content: center;\r\n padding: 0.75rem 0 1rem;\r\n}\r\n\r\n/* \u2500\u2500 Active call \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */\r\n.cv-call {\r\n flex: 1;\r\n min-height: 0;\r\n display: flex;\r\n flex-direction: column;\r\n align-items: center;\r\n justify-content: center;\r\n gap: 0.15rem;\r\n text-align: center;\r\n padding: 1rem;\r\n /*\r\n A REAL bug, found live (plan T7): the transfer picker's agent list can make this box's content\r\n taller than the space `flex: 1` actually allocates it \u2014 the avatar/name/timer/status ABOVE the\r\n picker are still shown while transferring, unlike `.cv-call-devices-inline`'s own \"swap the\r\n content\" fix for the pre-connect devices screen. Without this, the overflow painted straight past\r\n `.cv-call`'s own shrunk box and onto `.cv-controls` below it \u2014 not scroll, actual overlap, controls\r\n rendered ON TOP of list rows. `overflow-y: auto` keeps any excess inside THIS box, scrollable,\r\n exactly like `.cv-presence-list`'s own internal scroll already does for the list itself.\r\n */\r\n overflow-y: auto;\r\n}\r\n\r\n.cv-avatar-wrap { position: relative; margin-bottom: 0.85rem; }\r\n.cv-avatar {\r\n position: relative;\r\n width: 68px;\r\n height: 68px;\r\n border-radius: 999px;\r\n /* accent \u2192 accent-strong (emerald 600\u2192700): white initials clear 3.77:1 at EVERY stop. Starting\r\n the ramp at emerald-500 would look punchier but drop the light end to 2.54:1. */\r\n background: linear-gradient(135deg, var(--cv-accent) 0%, var(--cv-accent-strong) 100%);\r\n display: flex;\r\n align-items: center;\r\n justify-content: center;\r\n color: #fff;\r\n font: 700 1.3rem var(--cv-font);\r\n letter-spacing: -0.01em;\r\n box-shadow: 0 8px 20px -6px var(--cv-accent-soft);\r\n}\r\n/* A soft halo while ringing \u2014 the one moment worth animating. */\r\n.cv-avatar-ping {\r\n position: absolute;\r\n inset: 0;\r\n border-radius: 999px;\r\n /* Decorative \u2014 nothing sits on it, so it uses the vivid emerald. */\r\n background: var(--cv-accent-light);\r\n opacity: 0.16;\r\n animation: cv-ping 1.6s cubic-bezier(0, 0, 0.2, 1) infinite;\r\n pointer-events: none;\r\n}\r\n@keyframes cv-ping {\r\n 0% { transform: scale(1); opacity: 0.22; }\r\n 80%, 100% { transform: scale(1.7); opacity: 0; }\r\n}\r\n.cv-avatar-dot {\r\n position: absolute;\r\n bottom: 1px;\r\n right: 1px;\r\n width: 14px;\r\n height: 14px;\r\n border-radius: 999px;\r\n background: var(--cv-accent);\r\n border: 2px solid var(--cv-bg);\r\n}\r\n\r\n.cv-call-name { font-size: 1rem; font-weight: 600; line-height: 1.2; }\r\n.cv-call-number { font-size: 0.75rem; color: var(--cv-muted); margin-top: 2px; }\r\n\r\n.cv-timer {\r\n display: flex;\r\n align-items: baseline;\r\n justify-content: center;\r\n gap: 1px;\r\n margin-top: 0.75rem;\r\n color: var(--cv-accent-strong);\r\n}\r\n.cv-timer b {\r\n font: 700 2.25rem/1 var(--cv-font);\r\n font-variant-numeric: tabular-nums;\r\n letter-spacing: -0.03em;\r\n}\r\n.cv-timer i {\r\n font: 300 1.75rem/1 var(--cv-font);\r\n font-style: normal;\r\n color: var(--cv-accent);\r\n animation: cv-blink 1.6s ease-in-out infinite;\r\n margin: 0 1px;\r\n}\r\n@keyframes cv-blink { 0%, 100% { opacity: 1; } 50% { opacity: 0.35; } }\r\n\r\n.cv-call-status {\r\n margin-top: 0.6rem;\r\n font-size: 0.78rem;\r\n color: var(--cv-muted);\r\n letter-spacing: 0.04em;\r\n}\r\n.cv-badge-hold { color: var(--cv-hold); font-weight: 600; }\r\n\r\n/* \u2500\u2500 Device check (ringing / dialing / in-call) \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\r\n Before a call connects there is only ONE other control on screen (Colgar, or\r\n Rechazar/Contestar) \u2014 putting Dispositivos in that same neighbourhood, even\r\n spaced out, keeps it a mis-tap away from hanging up or answering. The entry\r\n chip lives beside the call status instead, removing it from that neighbourhood\r\n rather than just adding distance within it \u2014 same resting-pill SHAPE as `.cv-cp`\r\n (CountryPicker), reused rather than invented fresh.\r\n\r\n Opening it does NOT pop a panel into that same tight space, though \u2014 this\r\n SDK's real production embed (a 310\xD7520 host panel with its own header eating\r\n further into that) leaves too little free room around a trigger sitting in\r\n vertically-centred content for a floating popover to open into without either\r\n overlapping Colgar/Rechazar/Contestar or clamping itself down to something\r\n cramped and scrolly for just two rows. `.cv-call-devices-inline` REPLACES the\r\n avatar/name/status block in `.cv-call` instead (see that JSX's own comment) \u2014\r\n an inline swap, not an overlay, so it gets the full box, not a leftover sliver.\r\n\r\n Once connected it is the SAME chip and the SAME swap. Dispositivos used to be a fifth control in\r\n the call row (with a floating popover), which is what forced that row down to 40px buttons and\r\n 9px labels in a 310px host. A set-once setting does not need a slot among the four things you do\r\n mid-call (mute, hold, transfer, keypad), and the control row stays live under the swap.\r\n \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */\r\n.cv-call-devices-chip {\r\n display: inline-flex;\r\n align-items: center;\r\n gap: 0.35rem;\r\n height: 26px;\r\n padding: 0 0.65rem;\r\n border: 1px solid var(--cv-border-strong);\r\n border-radius: 999px;\r\n background: var(--cv-bg);\r\n color: var(--cv-muted);\r\n font: 600 0.7rem var(--cv-font);\r\n cursor: pointer;\r\n transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;\r\n}\r\n.cv-call-devices-chip:hover { background: var(--cv-surface); }\r\n.cv-call-devices-chip:active { transform: scale(0.95); }\r\n\r\n/*\r\n The entry-point row \u2014 ONE chip today (Dispositivos), up to two once a host configures\r\n `incomingCallAction` (that one first: who is calling outranks a phone-utility setting). `width:\r\n 100%` + `flex-wrap` on purpose: a host's action label is arbitrary text this component cannot\r\n assume is short, so two chips sit side by side when they fit and wrap onto their own centred line\r\n when they do not, rather than overflowing `.cv-call`'s fixed width.\r\n*/\r\n.cv-call-chips {\r\n width: 100%;\r\n display: flex;\r\n flex-wrap: wrap;\r\n justify-content: center;\r\n gap: 0.5rem;\r\n margin-top: 0.65rem;\r\n}\r\n\r\n.cv-call-devices-inline {\r\n width: 100%;\r\n display: flex;\r\n flex-direction: column;\r\n gap: 0.9rem;\r\n /* `.cv-call` centres and centre-aligns its normal (avatar) content \u2014 rows read left-aligned\r\n everywhere else in the widget (Ajustes, the in-call popover), so this opts back out of both. */\r\n text-align: left;\r\n animation: cv-call-devices-in 0.18s cubic-bezier(0.2, 0, 0.2, 1);\r\n}\r\n@keyframes cv-call-devices-in {\r\n from { opacity: 0; transform: translateY(6px); }\r\n to { opacity: 1; transform: none; }\r\n}\r\n@media (prefers-reduced-motion: reduce) {\r\n .cv-call-devices-inline { animation: none; }\r\n}\r\n.cv-call-devices-header { display: flex; align-items: center; gap: 0.5rem; }\r\n.cv-call-devices-title { font-size: 0.95rem; font-weight: 600; color: var(--cv-text); }\r\n/* `--cv-muted` on `--cv-bg` \u2014 the same already-verified pairing `.cv-settings-note` uses\r\n (4.83:1 light / 6.97:1 dark), not a new one. */\r\n.cv-call-devices-context {\r\n margin: 0;\r\n font-size: 0.78rem;\r\n color: var(--cv-muted);\r\n}\r\n\r\n/* \u2500\u2500 Call controls \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\r\n TWO TIERS. Hang up is the one action that must never be hunted for, so it sits\r\n alone, centred, and largest \u2014 the anchor. The secondaries flank above it. They\r\n used to share a single row, where hang up was just the last button and carried\r\n the same weight as \"transfer\"; mid-call, that is the wrong hierarchy.\r\n \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */\r\n.cv-controls {\r\n flex-shrink: 0;\r\n display: flex;\r\n flex-direction: column;\r\n align-items: center;\r\n gap: 0.9rem;\r\n padding: 0.35rem 1rem 1.1rem;\r\n /* The containing block for `.cv-keypad-popover` \u2014 see that rule's own comment for why it is\r\n anchored here rather than to the trigger button. */\r\n position: relative;\r\n}\r\n/* FOUR controls, sized so they never need to shrink to fit. This row held five (Dispositivos too) and\r\n the only way to fit five in the CRM's 310px host was a 40px button with a 9px label and ~6px gaps \u2014\r\n below the 44/48px a thumb needs, and below legible for a word read mid-call. The default 48px size\r\n below was never actually seen: it only applied above a 360px host, which no real embed is.\r\n Dispositivos is the `.cv-call-chips` chip up by the call info instead (the same entry point the\r\n ringing and dialing screens already use). 4 \xD7 52 + 3 \xD7 20 = 268px, inside 310 - 2 \xD7 16 padding. */\r\n.cv-controls-row {\r\n display: flex;\r\n justify-content: center;\r\n gap: 1.25rem;\r\n}\r\n.cv-controls-primary {\r\n display: flex;\r\n justify-content: center;\r\n gap: 2.75rem;\r\n}\r\n/* Button + its word. The column keeps the label from widening the hit target. */\r\n.cv-ctrl-item {\r\n display: flex;\r\n flex-direction: column;\r\n align-items: center;\r\n gap: 0.3rem;\r\n}\r\n/* 10px, muted: present when you look for it, silent when you don't. An icon-only\r\n control is a quiz, and mid-call is the worst time to sit one. */\r\n.cv-ctrl-label {\r\n font-size: 0.625rem;\r\n line-height: 1;\r\n color: var(--cv-muted);\r\n white-space: nowrap;\r\n user-select: none;\r\n}\r\n/* The four secondaries' words get a notch more than Colgar / Rechazar / Contestar's 10px \u2014 they are\r\n the ones read mid-call, and the five-up row used to shrink them to 9px (8px in a sidebar). */\r\n.cv-controls-row .cv-ctrl-label { font-size: 0.6875rem; }\r\n.cv-ctrl {\r\n width: 52px;\r\n height: 52px;\r\n border-radius: 999px;\r\n border: 1px solid var(--cv-border-strong);\r\n background: var(--cv-bg);\r\n color: var(--cv-text);\r\n cursor: pointer;\r\n display: inline-flex;\r\n align-items: center;\r\n justify-content: center;\r\n transition: background 0.15s ease, color 0.15s ease, transform 0.06s ease;\r\n}\r\n.cv-ctrl:hover { background: var(--cv-surface); }\r\n.cv-ctrl:active { transform: scale(0.94); }\r\n.cv-ctrl:disabled {\r\n opacity: 0.4;\r\n cursor: not-allowed;\r\n pointer-events: none;\r\n}\r\n\r\n/* The ON states say what they MEAN, in the widget's own tokens: muted is danger,\r\n held is hold, transfer-open is accent. Colour is the state, not decoration. */\r\n.cv-ctrl[data-tone='danger'] {\r\n background: var(--cv-danger);\r\n border-color: var(--cv-danger);\r\n color: #fff;\r\n}\r\n.cv-ctrl[data-tone='hold'] {\r\n background: var(--cv-hold);\r\n border-color: var(--cv-hold);\r\n color: #fff;\r\n}\r\n.cv-ctrl[data-tone='accent'] {\r\n background: var(--cv-accent-soft);\r\n border-color: transparent;\r\n color: var(--cv-accent-strong);\r\n}\r\n.cv-ctrl[data-tone]:hover { filter: brightness(0.95); }\r\n\r\n/* Muted is the one state worth animating: it is invisible, it is easy to forget,\r\n and the cost of forgetting is talking to nobody. Same halo the avatar rings\r\n with \u2014 one language, not two. */\r\n.cv-ctrl[data-tone='danger'] {\r\n position: relative;\r\n}\r\n.cv-ctrl[data-tone='danger']::after {\r\n content: '';\r\n position: absolute;\r\n inset: 0;\r\n border-radius: 999px;\r\n background: var(--cv-danger);\r\n animation: cv-ping 1.6s cubic-bezier(0, 0, 0.2, 1) infinite;\r\n pointer-events: none;\r\n z-index: -1;\r\n}\r\n@media (prefers-reduced-motion: reduce) {\r\n .cv-ctrl[data-tone='danger']::after { animation: none; opacity: 0; }\r\n}\r\n.cv-ctrl[aria-pressed='true'] {\r\n background: var(--cv-text);\r\n color: var(--cv-bg);\r\n border-color: var(--cv-text);\r\n}\r\n\r\n/*\r\n Sidebar-narrow (this file's own \u2264300px tier, up in \"Narrow hosts\"). The four 52px controls with\r\n 20px gaps need 268px, which a 260px host cannot give \u2014 so this tier steps down to 44px with 12px\r\n gaps (4 \xD7 44 + 3 \xD7 12 = 212px) and reclaims `.cv-controls`'s own horizontal padding, the first\r\n lever that block's own comment names. 44px is still the Apple HIG minimum tap target; the five-up\r\n row this replaced went to 36px here.\r\n\r\n Placed AFTER `.cv-controls`/`.cv-controls-row` above rather than up with this file's other\r\n `@container` blocks near the top: `gap` and `padding-left`/`-right` here have the same specificity as\r\n those base rules' own shorthand, so \u2014 unlike a compound selector such as `.cv-controls-row .cv-ctrl`,\r\n which wins on specificity regardless of position \u2014 source order is what decides, and a narrower-width\r\n override declared BEFORE the base rule it means to narrow loses to it. Confirmed live: moved up into\r\n the \"Narrow hosts\" section, the `.cv-ctrl` width and label font-size reductions took effect (compound\r\n selectors) but `gap` and `.cv-controls`'s padding silently did not (plain selectors, later base rule won).\r\n*/\r\n@container cv (max-width: 300px) {\r\n .cv-controls { padding-left: 0.5rem; padding-right: 0.5rem; }\r\n .cv-controls-row { gap: 0.75rem; }\r\n .cv-controls-row .cv-ctrl { width: 44px; height: 44px; }\r\n .cv-controls-row .cv-ctrl-label { font-size: 0.625rem; }\r\n}\r\n\r\n/*\r\n The attended-transfer target-entry panel (`docs/specs/transfer-availability.md` \xA75): an optional\r\n outcome line, then a row of whatever's actionable (input+button today). Once a consult exists,\r\n `ConsultScreen` takes over the whole screen instead \u2014 this panel is ONLY ever the pre-consult /\r\n retry-after-failure state now; it used to also cover the consulting/answered phases, which is why\r\n its rule is a column container built for more than one child even though there's only ever one row\r\n here today. (History: was two near-duplicate rules \u2014 `.cv-transfer` as a bare ROW,\r\n `.cv-transfer-consult` as a column \u2014 until the row version turned out to be a real,\r\n reproduced-in-browser bug: the optional `.cv-dial-outcome` message rendered as a THIRD item in the\r\n same horizontal row as the input and button, squeezing the input to its content-minimum. Merged\r\n rather than patched.)\r\n*/\r\n.cv-transfer {\r\n display: flex;\r\n flex-direction: column;\r\n gap: 0.3rem;\r\n width: 100%;\r\n padding: 0.2rem 0.25rem 0;\r\n /* `.cv-call` centres and centre-aligns its normal (avatar) content \u2014 same reasoning\r\n `.cv-call-devices-inline` already opts out of for the OTHER inline swap in this box (its own\r\n comment): rows read left-aligned everywhere else in the widget, and a centred context line\r\n sitting directly above a left-aligned input/toggle/list read as two layouts stacked on top of\r\n each other, found live (2026-09-29). */\r\n text-align: left;\r\n /* Found live (2026-09-29): `.cv-call`'s avatar/name/timer block used to sit ABOVE this,\r\n unconditionally, so this panel only ever got whatever was left over \u2014 see the JSX call site's own\r\n comment. Now that this IS the whole of `.cv-call`'s content while a transfer is in progress\r\n (a swap, not an addition), it should CLAIM `.cv-call`'s available height, not just sit in it \u2014\r\n `flex: 1` does that; `min-height: 0` is what lets a flex child actually shrink to fit instead of\r\n forcing its parent to grow past it (the same reason `.cv-call`/`.cv-view`/`.cv-body` all set it,\r\n see their own comments). This is what lets `.cv-presence-list` below flex-grow into real room\r\n instead of needing its own hand-tuned `max-height` guess. */\r\n flex: 1;\r\n min-height: 0;\r\n /* Same entrance `.cv-call-devices-inline` already uses for the analogous inline swap (its own\r\n comment) \u2014 reused, not a second animation invented for this widget's second inline-swap view. */\r\n animation: cv-call-devices-in 0.18s cubic-bezier(0.2, 0, 0.2, 1);\r\n}\r\n@media (prefers-reduced-motion: reduce) {\r\n .cv-transfer { animation: none; }\r\n}\r\n/* The compact \"who am I still on the phone with\" line while the picker is open \u2014 reuses\r\n `.cv-call-devices-inline`'s own two classes verbatim (`.cv-call-devices-title` for the name,\r\n `.cv-call-devices-context` for the number/timer line) rather than inventing a second \"quiet header\"\r\n style for the same widget; only the tiny stacking gap between them is new.\r\n\r\n Found live (2026-09-29): `.cv-transfer`'s own `gap` alone gave every section \u2014 context, input row,\r\n mode toggle, results list \u2014 the exact same spacing, so nothing read as its own group; the eye had\r\n no cue for where \"who I'm on the phone with\" ends and \"pick a transfer target\" begins. This extra\r\n `margin-bottom`, on top of the base `gap`, is that cue \u2014 the toggle stays close to the list it\r\n controls (unchanged), only the boundary above the interactive controls opened up. */\r\n.cv-transfer-context {\r\n display: flex;\r\n flex-direction: column;\r\n gap: 2px;\r\n flex-shrink: 0;\r\n margin-bottom: 0.35rem;\r\n}\r\n/* Plan T3: the mode toggle reuses `.cv-segmented` (HistoryTab's own filter control) as-is, but its\r\n `margin-bottom` (needed THERE, where the surrounding layout has no gap of its own) is redundant\r\n here \u2014 `.cv-transfer`'s own `gap` above already spaces every child, so the two would stack. Scoped\r\n to this context only; HistoryTab's own copy is untouched. */\r\n.cv-transfer .cv-segmented { margin-bottom: 0; flex-shrink: 0; }\r\n.cv-transfer .cv-presence-legend { flex-shrink: 0; }\r\n/* Same treatment as `.cv-call-status` (the avatar's own \"Llamando\u2026\"/\"En espera\" line) \u2014 one muted\r\n status-line vocabulary for the whole call screen, not a second one invented for this panel. */\r\n.cv-transfer-status {\r\n margin: 0;\r\n font-size: 0.78rem;\r\n color: var(--cv-muted);\r\n letter-spacing: 0.04em;\r\n}\r\n/* The target-entry/retry row: an input plus one button. */\r\n.cv-transfer-row {\r\n display: flex;\r\n gap: 0.5rem;\r\n}\r\n/*\r\n Flex items default to `min-width: auto`, which floors them at their CONTENT size rather than letting\r\n them shrink or grow to fill the row \u2014 `.cv-search`'s own `width: 100%` never actually took effect\r\n here, because `.cv-btn`'s text (\"Llamar\") set an unshrinkable floor and the input, having no\r\n `flex-grow`, never reclaimed the space left over. `flex: 1` + `min-width: 0` is what actually makes\r\n an input-plus-button row behave like one; `flex: none` keeps the button at its natural size.\r\n*/\r\n.cv-transfer-row .cv-search {\r\n flex: 1;\r\n min-width: 0;\r\n}\r\n/* `max-width` + ellipsis: the label now includes whatever was typed (\"Llamar a {typed}\", spec \xA74.5)\r\n and `truncateForButton` already bounds that in JS \u2014 this is the CSS backstop, so a value that\r\n slips past it (a very wide character set, a future copy change) still can't push `.cv-search` down\r\n to an unusable sliver the way the pre-truncation button did before this was noticed. */\r\n.cv-transfer-row .cv-btn {\r\n flex: none;\r\n max-width: 60%;\r\n overflow: hidden;\r\n text-overflow: ellipsis;\r\n white-space: nowrap;\r\n}\r\n/* The consult-answered row: one or two buttons, no input. */\r\n.cv-transfer-actions {\r\n display: flex;\r\n gap: 0.5rem;\r\n}\r\n.cv-transfer-actions .cv-btn {\r\n flex: 1;\r\n}\r\n/* The ringing phase has only \"Cancelar\" \u2014 a secondary, low-stakes action. Letting the row's own\r\n `flex: 1` stretch a LONE button edge to edge reads as oversized for what it is, and nothing else in\r\n this widget sizes a single button to the full row; every other `.cv-btn` sizes to its content. */\r\n.cv-transfer-actions .cv-btn:only-child {\r\n flex: none;\r\n}\r\n\r\n/*\r\n The agent picker (spec \xA74.5, plan T7) \u2014 an inline, always-visible filtered list under the\r\n input+button row, not a click-to-open popover like `.cv-person-filter-pop`: the whole point is that\r\n typing already filters it, so hiding it behind a second interaction would undo that.\r\n\r\n Redesigned live (2026-09-29): T7 (72px) and T3 (30px) both hand-tuned a `max-height` in PIXELS\r\n against whatever else happened to be on screen at the time, and both were broken by the very next\r\n addition above the list (T3's own toggle broke T7's number the same way this would keep breaking on\r\n the next change) \u2014 down to \"barely proves the list is scrollable\" at 30px, which is what the user\r\n was actually seeing: \"users cannot almost see any of the listed users.\" The real fix wasn't a bigger\r\n magic number, it was `.cv-transfer`'s own move to `flex: 1` (see its comment) freeing real height\r\n from the block that used to sit above this whole panel \u2014 `.cv-presence` and this list now flex-grow\r\n into whatever's ACTUALLY left after the context line, input row, toggle and legend take their own\r\n natural size, on whatever real height the host panel gives `.cv-call` (this SDK's fixed ~310\xD7520\r\n embed today, but also whatever a different host gives it tomorrow \u2014 no more re-tuning a constant\r\n every time something above the list changes). `.cv-call`'s own `overflow-y: auto` (its own comment)\r\n is still the last-resort net if content ever genuinely doesn't fit; this just means that net should\r\n now rarely, if ever, have to catch anything for a normal agent list.\r\n*/\r\n.cv-presence {\r\n display: flex;\r\n flex-direction: column;\r\n gap: 0.35rem;\r\n flex: 1;\r\n min-height: 0;\r\n}\r\n.cv-presence-list {\r\n display: flex;\r\n flex-direction: column;\r\n gap: 2px;\r\n flex: 1;\r\n min-height: 0;\r\n overflow-y: auto;\r\n padding: 0.25rem;\r\n border: 1px solid var(--cv-border);\r\n border-radius: var(--cv-radius-key);\r\n background: var(--cv-surface);\r\n}\r\n.cv-presence-empty {\r\n margin: 0;\r\n padding: 0.5rem;\r\n text-align: center;\r\n font-size: 0.78rem;\r\n color: var(--cv-muted);\r\n}\r\n.cv-presence-item {\r\n width: 100%;\r\n display: flex;\r\n align-items: center;\r\n gap: 0.5rem;\r\n padding: 0.4rem 0.5rem;\r\n border: none;\r\n border-radius: calc(var(--cv-radius) - 4px);\r\n background: none;\r\n color: var(--cv-text);\r\n font: 400 0.8rem var(--cv-font);\r\n text-align: left;\r\n cursor: pointer;\r\n}\r\n.cv-presence-item:hover:not(:disabled) { background: var(--cv-surface-2); }\r\n/* En llamada rows are a hard block, not just a hint (CallScreen.tsx's own comment on the row has why)\r\n \u2014 same `:disabled` treatment `.cv-btn`/`.cv-tab` already use elsewhere in this file, not a new pattern. */\r\n.cv-presence-item:disabled { opacity: 0.45; cursor: not-allowed; }\r\n.cv-presence-dot {\r\n flex-shrink: 0;\r\n width: 8px;\r\n height: 8px;\r\n border-radius: 999px;\r\n}\r\n/* Reuses existing intent tokens rather than inventing new ones \u2014 `--cv-accent` already means\r\n \"good, reachable\" (the answer button), `--cv-hold` already means \"occupied elsewhere\" (the hold\r\n toggle), and `--cv-faint` is this file's own DECORATIVE-only tier (see the `--cv-*` legend near the\r\n top) \u2014 exactly what \"no signal for this person\" is, no signal being the whole point of that tier. */\r\n.cv-presence-dot[data-state='disponible'] { background: var(--cv-accent); }\r\n.cv-presence-dot[data-state='en_llamada'] { background: var(--cv-hold); }\r\n.cv-presence-dot[data-state='desconectado'] { background: var(--cv-faint); }\r\n.cv-presence-name {\r\n flex: 1;\r\n min-width: 0;\r\n overflow: hidden;\r\n text-overflow: ellipsis;\r\n white-space: nowrap;\r\n}\r\n.cv-presence-meta {\r\n flex-shrink: 0;\r\n font-size: 0.72rem;\r\n color: var(--cv-muted);\r\n}\r\n/* Spec \xA74.6: Desconectado is a HINT, never \"can't transfer\" \u2014 this is what tells the agent so, right\r\n under the list it describes. `--cv-muted`, NOT `--cv-faint`: this text is informational (the reader\r\n needs it to not misread the state), and `--cv-faint` is reserved for decorative-only content that\r\n fails AA on purpose \u2014 using it here would repeat the exact tier mistake this file's own `--cv-*`\r\n comment block warns against. */\r\n.cv-presence-legend {\r\n margin: 0;\r\n font-size: 0.7rem;\r\n color: var(--cv-muted);\r\n line-height: 1.35;\r\n}\r\n\r\n/*\r\n `ConsultScreen`'s \"someone is still waiting\" banner (`docs/specs/transfer-availability.md` \xA75, the\r\n cross-talk fix) \u2014 full-width and tappable, not a passive status line, because the entire reason this\r\n screen exists is to make \"go back to the caller\" impossible to miss. Neutral surface + the same\r\n `--cv-hold` colour `.cv-badge-hold` already uses for the same fact elsewhere, not a new soft-fill\r\n token: a text/icon tint on a plain surface is already proven legible here, and inventing an\r\n unmeasured background-tint pairing risks a real contrast regression this file takes seriously\r\n elsewhere (see the `-soft`/`-strong` split's own comments).\r\n*/\r\n.cv-consult-hold-banner {\r\n display: flex;\r\n align-items: center;\r\n justify-content: center;\r\n gap: 0.4rem;\r\n width: 100%;\r\n padding: 0.5rem 0.75rem;\r\n border-radius: 999px;\r\n border: 1px solid var(--cv-border);\r\n background: var(--cv-surface);\r\n color: var(--cv-hold);\r\n font: 600 0.78rem var(--cv-font);\r\n cursor: pointer;\r\n transition: background 0.15s ease, border-color 0.15s ease;\r\n}\r\n.cv-consult-hold-banner:hover {\r\n background: var(--cv-surface-2);\r\n border-color: var(--cv-hold);\r\n}\r\n.cv-consult-hold-banner:active {\r\n transform: scale(0.98);\r\n}\r\n\r\n@keyframes cv-pop-in-up {\r\n from { opacity: 0; transform: translateY(4px) scale(0.97); }\r\n to { opacity: 1; transform: none; }\r\n}\r\n\r\n/*\r\n The in-call DTMF keypad \u2014 the one floating popover left on the call screen. (Dispositivos was the\r\n other; it is inline content now, `.cv-call-devices-inline` above, in every call state.)\r\n\r\n Opens UPWARD (`bottom: 100%`): the trigger sits at the bottom of the call screen, and there is no\r\n room to open downward. Anchored to `.cv-controls`'s own horizontal padding \u2014 a container whose width\r\n is bounded by ITS parent, never the narrow trigger itself \u2014 the same fix CountryPicker's own popover\r\n needed (see its comment): anchoring to a narrow, off-centre trigger let the popover's edge reach\r\n `.cv-softphone`'s `overflow: hidden` and get clipped.\r\n*/\r\n.cv-keypad-popover {\r\n position: absolute;\r\n z-index: 20;\r\n display: grid;\r\n grid-template-columns: repeat(3, 1fr);\r\n gap: 8px;\r\n padding: 0.85rem 1rem;\r\n background: var(--cv-surface);\r\n border: 1px solid var(--cv-border);\r\n border-radius: var(--cv-radius);\r\n box-shadow: var(--cv-shadow);\r\n}\r\n.cv-keypad-popover--above {\r\n bottom: 100%;\r\n left: 1rem;\r\n right: 1rem;\r\n margin-bottom: 0.6rem;\r\n transform-origin: bottom center;\r\n animation: cv-pop-in-up 0.14s cubic-bezier(0.2, 0, 0.2, 1);\r\n}\r\n/* `.cv-key` already carries the full key look (border, hover, active-scale, digit/letter type) from\r\n the pre-call dialer \u2014 only the size needs setting here, since this grid has no flex ancestor to\r\n stretch the rows the way `.cv-keypad` gets to.\r\n\r\n A fixed HEIGHT, not an `aspect-ratio`. This popover opens upward from `.cv-controls`, so it has\r\n (host height - controls block - margin) to work with, and a ratio ties its height to the host's\r\n WIDTH, which says nothing about how much height there is. Found live: the CRM's real body is 310\xD7473\r\n (a 520px panel minus its 45px header), and a 1.3 ratio made this popover 285px \u2014 with the 184px\r\n controls block that is 479px, so its top ~7px were clipped by `.cv-softphone`'s `overflow: hidden`.\r\n 48px keys give a 243px popover at ANY width, fit that host with room to spare, and stay at the\r\n 44-48px minimum tap target (the old ratio gave 45px keys at a 260px host, 58px at 310). */\r\n.cv-keypad-popover .cv-key {\r\n height: 48px;\r\n}\r\n@media (prefers-reduced-motion: reduce) {\r\n .cv-keypad-popover--above { animation: none; }\r\n}\r\n\r\n/* \u2500\u2500 Lists (contacts / history) \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */\r\n.cv-list-head { flex-shrink: 0; padding: 0.85rem 1rem 0.5rem; }\r\n.cv-search {\r\n width: 100%;\r\n padding: 0.5rem 0.75rem;\r\n border-radius: 10px;\r\n border: 1px solid var(--cv-border-strong);\r\n background: var(--cv-surface);\r\n color: var(--cv-text);\r\n font: inherit;\r\n transition: border-color 0.15s ease, background 0.15s ease;\r\n /* Found live (2026-09-29): in the transfer row specifically, `.cv-btn`'s own `max-width: 60%`\r\n (needed for the dynamic \"Llamar a {typed}\" label) can leave the input narrower than its\r\n placeholder text \u2014 an `<input>` has no native ellipsis, so it hard-clipped mid-word\r\n (\"...o n\xFAm\") instead of trailing off cleanly. A real, if rare, risk for ANY `.cv-search` usage\r\n wherever it's squeezed, not just this one row \u2014 the fix belongs on the base rule. */\r\n overflow: hidden;\r\n text-overflow: ellipsis;\r\n}\r\n.cv-search::placeholder { color: var(--cv-muted); }\r\n.cv-search:focus { outline: none; border-color: var(--cv-accent); background: var(--cv-bg); }\r\n\r\n/*\r\n A wrapper around `.cv-search`, not a change to it \u2014 that class is also the transfer-target input\r\n in CallScreen, which wants neither an icon nor a clear button. `.cv-search--icon` is an ADDITIVE\r\n modifier on the input itself (padding only), so the base class is byte-for-byte what it was for\r\n every other consumer.\r\n*/\r\n.cv-search-field { position: relative; display: flex; align-items: center; }\r\n.cv-search--icon { padding-left: 2.15rem; padding-right: 1.85rem; }\r\n.cv-search-icon {\r\n position: absolute;\r\n left: 0.75rem;\r\n color: var(--cv-muted);\r\n pointer-events: none;\r\n}\r\n.cv-search-clear {\r\n position: absolute;\r\n right: 0.5rem;\r\n width: 22px;\r\n height: 22px;\r\n display: inline-flex;\r\n align-items: center;\r\n justify-content: center;\r\n border: none;\r\n border-radius: 999px;\r\n background: none;\r\n color: var(--cv-muted);\r\n cursor: pointer;\r\n transition: color 0.12s ease, transform 0.1s var(--cv-ease-out);\r\n}\r\n.cv-search-clear:hover { color: var(--cv-text); }\r\n.cv-search-clear:active { transform: scale(0.88); }\r\n\r\n/* \u2500\u2500 Historial filters: status (Todas/Perdidas) + person \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */\r\n.cv-segmented {\r\n display: flex;\r\n gap: 2px;\r\n padding: 2px;\r\n border-radius: 10px;\r\n background: var(--cv-surface-2);\r\n margin-bottom: 0.4rem;\r\n}\r\n.cv-segmented-btn {\r\n flex: 1;\r\n padding: 0.35rem 0;\r\n border: none;\r\n border-radius: 8px;\r\n background: none;\r\n color: var(--cv-muted);\r\n font: 600 0.75rem var(--cv-font);\r\n cursor: pointer;\r\n transition: background 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;\r\n}\r\n/* The active segment is stated by its own fill + shadow, not colour alone \u2014 the same reasoning\r\n `.cv-item-action[data-tone='accent']`'s own comment gives for resting-state colour: a state that\r\n only differs by hue must still read on a screen that renders neither. */\r\n.cv-segmented-btn[aria-selected='true'] {\r\n background: var(--cv-bg);\r\n color: var(--cv-text);\r\n box-shadow: var(--cv-shadow);\r\n}\r\n@media (prefers-reduced-motion: reduce) {\r\n .cv-segmented-btn { transition: none; }\r\n}\r\n\r\n/* The person filter \u2014 same combobox SHAPE as `.cv-cp-*` (CountryPicker): a chip opening a positioned\r\n popover list with a checkmark on the active row. Not the same CLASSES: the two pickers have nothing\r\n to do with each other and sharing a namespace would make a future change to one silently reach the\r\n other. */\r\n.cv-person-filter { position: relative; width: 100%; }\r\n.cv-person-filter-chip {\r\n display: flex;\r\n align-items: center;\r\n gap: 0.4rem;\r\n width: 100%;\r\n padding: 0.4rem 0.65rem;\r\n border: 1px solid var(--cv-border-strong);\r\n border-radius: 10px;\r\n background: var(--cv-surface);\r\n color: var(--cv-muted);\r\n font: 500 0.78rem var(--cv-font);\r\n cursor: pointer;\r\n transition: background 0.15s ease, border-color 0.15s ease;\r\n}\r\n.cv-person-filter-chip:hover { background: var(--cv-surface-2); }\r\n/*\r\n Border only, no fill \u2014 the popover opening and the caret rotating already say \"this is open\";\r\n painting the whole width of a wide text pill solid green on top of that was the same over-strong\r\n green the selected row had (see its own comment below). A coloured border is the same restrained\r\n signal `.cv-search:focus` already uses for \"active\" elsewhere in this file.\r\n*/\r\n.cv-person-filter-chip[aria-expanded='true'] {\r\n border-color: var(--cv-accent);\r\n}\r\n.cv-person-filter-label {\r\n flex: 1;\r\n min-width: 0;\r\n overflow: hidden;\r\n text-overflow: ellipsis;\r\n white-space: nowrap;\r\n text-align: left;\r\n color: var(--cv-text);\r\n}\r\n.cv-person-filter-caret {\r\n flex-shrink: 0;\r\n transition: transform 0.18s cubic-bezier(0.2, 0, 0.2, 1);\r\n}\r\n.cv-person-filter-caret[data-open='true'] { transform: rotate(180deg); }\r\n.cv-person-filter-pop {\r\n position: absolute;\r\n top: calc(100% + 6px);\r\n left: 0;\r\n right: 0;\r\n z-index: 20;\r\n max-height: 220px;\r\n overflow-y: auto;\r\n padding: 0.25rem;\r\n background: var(--cv-surface);\r\n border: 1px solid var(--cv-border);\r\n border-radius: var(--cv-radius);\r\n box-shadow: var(--cv-shadow);\r\n transform-origin: top center;\r\n animation: cv-cp-in 0.14s cubic-bezier(0.2, 0, 0.2, 1);\r\n}\r\n@media (prefers-reduced-motion: reduce) {\r\n .cv-person-filter-pop { animation: none; }\r\n .cv-person-filter-caret { transition: none; }\r\n}\r\n.cv-person-filter-item {\r\n width: 100%;\r\n display: flex;\r\n align-items: center;\r\n gap: 0.5rem;\r\n padding: 0.45rem 0.5rem;\r\n border: none;\r\n border-radius: calc(var(--cv-radius) - 4px);\r\n background: none;\r\n color: var(--cv-text);\r\n font: 400 0.8rem var(--cv-font);\r\n text-align: left;\r\n cursor: pointer;\r\n}\r\n.cv-person-filter-item:hover { background: var(--cv-surface-2); }\r\n/*\r\n NOT a solid `--cv-accent-soft` fill \u2014 that read as a wall of saturated green across a wide row,\r\n much louder than the legacy CRM's own treatment for this exact list (`bg-emerald-50` \u2014 a barely-\r\n there wash \u2014 plus coloured text, never a strong fill). Coloured, bold text + the checkmark carry\r\n \"selected\" instead; `--cv-accent-strong` is already verified elsewhere in this file as AA against\r\n `--cv-surface`, which is what this popover sits on.\r\n*/\r\n.cv-person-filter-item[aria-selected='true'] .cv-person-filter-name {\r\n font-weight: 600;\r\n color: var(--cv-accent-strong);\r\n}\r\n.cv-person-filter-name {\r\n flex: 1;\r\n min-width: 0;\r\n overflow: hidden;\r\n text-overflow: ellipsis;\r\n white-space: nowrap;\r\n}\r\n.cv-person-filter-check { color: var(--cv-accent-strong); flex-shrink: 0; }\r\n.cv-person-filter-check[data-on='false'] { opacity: 0; }\r\n\r\n.cv-list {\r\n flex: 1;\r\n min-height: 0;\r\n overflow-y: auto;\r\n padding: 0 0.5rem 0.5rem;\r\n}\r\n/*\r\n Historial's day group header. Sticky within `.cv-list` (its nearest scrolling ancestor \u2014 a plain\r\n wrapper div between the two does not break that), OPAQUE `--cv-bg` rather than a translucent\r\n `/85 + backdrop-blur` treatment: it still needs to fully occlude rows scrolling underneath it, and\r\n a flat match to the list's own background does that with no new CSS feature this file doesn't\r\n already use elsewhere.\r\n*/\r\n.cv-history-day {\r\n position: sticky;\r\n top: 0;\r\n z-index: 1;\r\n padding: 0.5rem 0.6rem 0.35rem;\r\n background: var(--cv-bg);\r\n color: var(--cv-muted);\r\n font-size: 0.68rem;\r\n font-weight: 600;\r\n text-transform: uppercase;\r\n letter-spacing: 0.04em;\r\n}\r\n.cv-item {\r\n display: flex;\r\n align-items: center;\r\n gap: 0.7rem;\r\n padding: 0.5rem;\r\n border-radius: 12px;\r\n /*\r\n NOT `cursor: pointer` \u2014 this div has no click handler of its own; only its children\r\n (`.cv-item-main`, `.cv-item-action`) do, and each already sets its own pointer cursor. Putting\r\n it here too used to make the WHOLE row's box promise a click \u2014 its own padding, and the flex\r\n `gap` between avatar/name/button \u2014 none of which does anything when clicked. Most noticeable\r\n right where one row's padding meets the next, which reads as \"there's something clickable\r\n between these two contacts\" when there is not.\r\n */\r\n transition: background 0.12s ease;\r\n text-align: left;\r\n width: 100%;\r\n border: none;\r\n background: none;\r\n font: inherit;\r\n color: inherit;\r\n}\r\n.cv-item:hover { background: var(--cv-surface); }\r\n.cv-item-avatar {\r\n width: 40px;\r\n height: 40px;\r\n border-radius: 999px;\r\n /*\r\n RADIAL, not diagonal \u2014 deliberately. The initials sit centered, so a radial gradient puts them\r\n at its lightest point (pure `--cv-surface`) no matter what, while the edges still darken toward\r\n `--cv-surface-2` for the same cheap depth a diagonal gradient gave. A diagonal version measured\r\n 4.39:1 for `--cv-muted` text at its far corner \u2014 under the 4.5:1 text needs \u2014 because centered\r\n text's exact position against a DIAGONAL gradient depends on glyph width, not just circle size.\r\n Centering the gradient on the centered text removes that dependency entirely, structurally,\r\n rather than nudging a token and hoping the margin holds. Both stops stay tokens, so this is\r\n still theme-correct for free \u2014 a hardcoded gray gradient would not adapt to dark mode.\r\n */\r\n background: radial-gradient(circle, var(--cv-surface), var(--cv-surface-2));\r\n /*\r\n Without this, the circle's own boundary can vanish: `.cv-item:hover` sets the ROW background to\r\n `--cv-surface` \u2014 the exact color the gradient above STARTS at (1.00 contrast ratio, i.e.\r\n identical) in both themes. `--cv-border-strong` is the same token `.cv-search`'s border already\r\n uses against this same surface a few rules up \u2014 a pairing already proven visible, not a new one.\r\n */\r\n border: 1px solid var(--cv-border-strong);\r\n display: flex;\r\n align-items: center;\r\n justify-content: center;\r\n color: var(--cv-muted);\r\n font-size: 0.78rem;\r\n font-weight: 700;\r\n flex-shrink: 0;\r\n}\r\n/*\r\n The Historial row's status chip \u2014 WHY a call needs colour at all: direction is already the icon's\r\n shape (an arrow in/out), but \"did this connect\" is not shape-able, and a flat grey circle made every\r\n row look identical at a glance. Small badge, not a row-wide fill (that mistake already got made once\r\n on the person filter \u2014 see its own comment): a 40px circle reads as a status glyph, the same way a\r\n colored icon-badge does anywhere else; a wide fill reads as decoration competing with the text next\r\n to it. `--danger-strong`/`--accent-strong` (not the plain base tokens) because the base tokens\r\n measure BELOW 3:1 non-text contrast against their own `-soft` fill \u2014 `--cv-danger` on\r\n `--cv-danger-soft` is 2.6:1; `--cv-danger-strong` is 4.47:1 light / 3.62:1 dark, measured.\r\n*/\r\n.cv-item-avatar[data-tone='accent'] { background: var(--cv-accent-soft); color: var(--cv-accent-strong); }\r\n.cv-item-avatar[data-tone='info'] { background: var(--cv-info-soft); color: var(--cv-info-strong); }\r\n.cv-item-avatar[data-tone='danger'] { background: var(--cv-danger-soft); color: var(--cv-danger-strong); }\r\n/* A button, reset to look like plain content \u2014 the row is a container, not a control. */\r\n.cv-item-main {\r\n flex: 1;\r\n min-width: 0;\r\n display: block;\r\n border: none;\r\n background: none;\r\n padding: 0;\r\n font: inherit;\r\n color: inherit;\r\n text-align: left;\r\n cursor: pointer;\r\n transition: transform 0.1s var(--cv-ease-out);\r\n}\r\n.cv-item-main:disabled { cursor: default; }\r\n.cv-item-main:not(:disabled):active { transform: scale(0.985); }\r\n.cv-item-name {\r\n display: block;\r\n font-weight: 600;\r\n font-size: 0.875rem;\r\n white-space: nowrap;\r\n overflow: hidden;\r\n text-overflow: ellipsis;\r\n}\r\n/*\r\n 14px bold does not clear WCAG's large-text bar (18.66px bold) \u2014 this text needs the full 4.5:1, not\r\n the 3:1 large-text minimum. `--cv-danger-strong`: 6.47:1 light / 6.46:1 dark against `--cv-bg`,\r\n measured; the plain `--cv-danger` this used to be was only 3.76:1 light \u2014 a real (if marginal) fail.\r\n*/\r\n.cv-item-name[data-tone='danger'] { color: var(--cv-danger-strong); }\r\n.cv-item-sub {\r\n display: block;\r\n font-size: 0.72rem;\r\n color: var(--cv-muted);\r\n margin-top: 1px;\r\n font-variant-numeric: tabular-nums;\r\n}\r\n.cv-item-sub-outcome { color: var(--cv-danger-strong); }\r\n/*\r\n Decorative reinforcement, not the sole carrier \u2014 the row's own play button is what says \"this call\r\n has a recording\" (it only renders when one exists); this is a small hint IN the metadata line that\r\n the button is worth pressing, so `--cv-faint` (2.5:1, documented above as decorative-only) is the\r\n right tier here, same reasoning `.cv-empty-icon`/`.cv-gate-mark` already use for icons next to real\r\n text rather than standing alone.\r\n\r\n `display: inline-flex` is load-bearing, not decoration \u2014 every OTHER inline icon in this file gets\r\n an explicit `display` for the same reason: `/react` + `/ui` render straight into the host's light\r\n DOM (no shadow root), so a host reset like Tailwind Preflight's `svg { display: block }` reaches\r\n this element directly. Without an explicit override here, that reset knocks the icon onto its own\r\n line instead of trailing the duration text it is meant to sit beside.\r\n*/\r\n.cv-item-sub-rec {\r\n display: inline-flex;\r\n color: var(--cv-faint);\r\n margin-left: 0.3rem;\r\n vertical-align: -1px;\r\n}\r\n.cv-item-action {\r\n width: 34px;\r\n height: 34px;\r\n border-radius: 999px;\r\n border: none;\r\n background: none;\r\n color: var(--cv-muted);\r\n cursor: pointer;\r\n display: inline-flex;\r\n align-items: center;\r\n justify-content: center;\r\n flex-shrink: 0;\r\n transition: background 0.12s ease, color 0.12s ease, transform 0.1s var(--cv-ease-out);\r\n}\r\n.cv-item-action:hover { background: var(--cv-accent); color: #fff; }\r\n.cv-item-action:active { transform: scale(0.9); }\r\n/*\r\n The call action specifically (ContactsTab) \u2014 NOT History's \"play recording\", which shares this\r\n same class and must stay neutral; a play button has no reason to be accent-colored. Scoped with\r\n `data-tone`, the same modifier convention `.cv-ctrl[data-tone]` already uses elsewhere in this file.\r\n\r\n Coloured at REST, not just on hover: a hover-only reveal never fires on a touchscreen, so the one\r\n affordance that most needs to read as \"you can tap this\" would be invisible on exactly the devices\r\n a phone widget is likeliest to run on. `accent-strong` is already verified elsewhere in this file\r\n as AA on a surface; `accent-soft` is the same hover tint `.cv-ctrl[data-tone='accent']` uses, just\r\n transparent at rest so fifty rows of solid fill never turns the list into a wall of green.\r\n*/\r\n.cv-item-action[data-tone='accent'] { color: var(--cv-accent-strong); }\r\n.cv-item-action[data-tone='accent']:hover { background: var(--cv-accent-soft); color: var(--cv-accent-strong); }\r\n\r\n@media (prefers-reduced-motion: reduce) {\r\n .cv-item-main, .cv-item-action, .cv-search-clear { transition: none; }\r\n}\r\n\r\n.cv-empty {\r\n display: flex;\r\n flex-direction: column;\r\n align-items: center;\r\n justify-content: center;\r\n height: 100%;\r\n color: var(--cv-muted);\r\n text-align: center;\r\n padding: 2.5rem 1.25rem;\r\n font-size: 0.82rem;\r\n}\r\n.cv-empty-icon {\r\n display: flex;\r\n align-items: center;\r\n justify-content: center;\r\n width: 48px;\r\n height: 48px;\r\n border-radius: 999px;\r\n background: var(--cv-surface);\r\n color: var(--cv-faint);\r\n margin-bottom: 0.75rem;\r\n}\r\n.cv-empty-title { margin: 0; font-size: 0.85rem; font-weight: 600; color: var(--cv-muted); }\r\n/*\r\n `--cv-muted`, NOT `--cv-faint` \u2014 this file documents faint as \"decorative only... never\r\n information\" (2.5:1, below AA), and this line IS information: it is the reason the list is\r\n empty, sometimes echoing the user's own search back to them. `--cv-faint` here measured 2.54:1\r\n light / 3.70:1 dark against a 4.5:1 bar \u2014 a real failure, not a rounding difference.\r\n*/\r\n.cv-empty-sub { margin: 0.2rem 0 0; font-size: 0.75rem; color: var(--cv-muted); }\r\n.cv-empty-spinner {\r\n margin-bottom: 0.75rem;\r\n animation: cv-spin 0.8s linear infinite;\r\n /* A loading spinner's rotation IS the information, with no static equivalent \u2014 unlike this\r\n file's other motion, it stays exempt from reduced-motion rather than freezing into a shape\r\n that would just look stuck. Colour comes from `.cv-empty`'s own `color: var(--cv-muted)` \u2014\r\n the spinner no longer sets its own, now that it sits next to real text instead of standing\r\n alone: the icon is decorative reinforcement, same as `.cv-empty-icon`, not the sole carrier. */\r\n}\r\n@keyframes cv-spin {\r\n to { transform: rotate(360deg); }\r\n}\r\n\r\n/* The scroll-triggered \"load more\" marker \u2014 see `useInfiniteList`. Never visible itself; a small\r\n height so it has a real box for the `IntersectionObserver` to track. */\r\n.cv-list-sentinel {\r\n height: 1px;\r\n}\r\n.cv-list-loading-more {\r\n display: flex;\r\n align-items: center;\r\n justify-content: center;\r\n padding: 0.75rem 0 0.25rem;\r\n color: var(--cv-muted);\r\n}\r\n/* Exempt from reduced-motion for the same reason `.cv-empty-spinner` is \u2014 see its own comment. */\r\n.cv-list-loading-more-spinner {\r\n animation: cv-spin 0.8s linear infinite;\r\n}\r\n\r\n/* \u2500\u2500 Contact detail (overlays the list) \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */\r\n.cv-detail {\r\n position: absolute;\r\n inset: 0;\r\n /* Above the list's own sticky day-group header (`.cv-history-day`, z-index: 1) \u2014 otherwise\r\n that header's z-index wins the stacking fight wherever its unscrolled flow position happens\r\n to land on top of this overlay, and it paints through despite both having an opaque bg. */\r\n z-index: 2;\r\n display: flex;\r\n flex-direction: column;\r\n background: var(--cv-bg);\r\n animation: cv-detail-in 220ms var(--cv-ease-out) both;\r\n}\r\n@keyframes cv-detail-in {\r\n from { opacity: 0; transform: translateX(10px); }\r\n to { opacity: 1; transform: none; }\r\n}\r\n@media (prefers-reduced-motion: reduce) {\r\n .cv-detail { animation: none; }\r\n}\r\n\r\n.cv-detail-head { flex-shrink: 0; padding: 0.6rem 0.5rem 0; }\r\n.cv-detail-back {\r\n display: inline-flex;\r\n align-items: center;\r\n gap: 0.3rem;\r\n padding: 0.4rem 0.5rem;\r\n border: none;\r\n border-radius: 8px;\r\n background: none;\r\n color: var(--cv-muted);\r\n font: 600 0.82rem var(--cv-font);\r\n cursor: pointer;\r\n transition: color 0.12s ease, transform 0.1s var(--cv-ease-out);\r\n}\r\n.cv-detail-back:hover { color: var(--cv-text); }\r\n.cv-detail-back:active { transform: scale(0.97); }\r\n\r\n.cv-detail-body { flex: 1; min-height: 0; overflow-y: auto; padding: 0 1.25rem; }\r\n.cv-detail-identity {\r\n display: flex;\r\n flex-direction: column;\r\n align-items: center;\r\n text-align: center;\r\n padding: 0.75rem 0 1.5rem;\r\n}\r\n.cv-detail-avatar {\r\n width: 72px;\r\n height: 72px;\r\n border-radius: 999px;\r\n /* Same radial + border treatment as `.cv-item-avatar` (see its own comment), just larger. Neutral\r\n by default \u2014 a contact has no \"status\" to colour. `HistoryDetail` overrides both with `[data-tone]`\r\n below: a call DOES have one, the same one the list row already shows, so the hero avatar staying\r\n grey there would be information the list already gave up on repeating here. */\r\n background: radial-gradient(circle, var(--cv-surface), var(--cv-surface-2));\r\n border: 1px solid var(--cv-border-strong);\r\n display: flex;\r\n align-items: center;\r\n justify-content: center;\r\n color: var(--cv-muted);\r\n font-size: 1.35rem;\r\n font-weight: 700;\r\n margin-bottom: 0.85rem;\r\n}\r\n/* Same token pairs already verified for `.cv-item-avatar[data-tone]` \u2014 size doesn't change a contrast\r\n ratio, so no new numbers to measure here. */\r\n.cv-detail-avatar[data-tone='accent'] { background: var(--cv-accent-soft); color: var(--cv-accent-strong); border-color: transparent; }\r\n.cv-detail-avatar[data-tone='info'] { background: var(--cv-info-soft); color: var(--cv-info-strong); border-color: transparent; }\r\n.cv-detail-avatar[data-tone='danger'] { background: var(--cv-danger-soft); color: var(--cv-danger-strong); border-color: transparent; }\r\n.cv-detail-name {\r\n margin: 0;\r\n font-size: 1.1rem;\r\n font-weight: 700;\r\n color: var(--cv-text);\r\n letter-spacing: -0.01em;\r\n}\r\n.cv-detail-name[data-tone='danger'] { color: var(--cv-danger-strong); }\r\n.cv-detail-meta {\r\n margin: 0.2rem 0 0;\r\n font-size: 0.78rem;\r\n color: var(--cv-muted);\r\n}\r\n\r\n/* \u2500\u2500 Call detail: recording \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */\r\n.cv-detail-recording { margin-bottom: 1rem; }\r\n.cv-detail-recording-label {\r\n margin: 0 0 0.4rem;\r\n padding: 0 0.15rem;\r\n font-size: 0.68rem;\r\n font-weight: 600;\r\n text-transform: uppercase;\r\n letter-spacing: 0.03em;\r\n color: var(--cv-muted);\r\n}\r\n.cv-detail-audio { width: 100%; display: block; }\r\n.cv-detail-audio + .cv-detail-audio { margin-top: 0.5rem; }\r\n.cv-detail-recording-status {\r\n display: flex;\r\n align-items: center;\r\n gap: 0.5rem;\r\n margin: 0 0 1rem;\r\n padding: 0.65rem 0.75rem;\r\n border-radius: 12px;\r\n background: var(--cv-surface);\r\n color: var(--cv-muted);\r\n font-size: 0.78rem;\r\n}\r\n/*\r\n Text colour only, same neutral `--cv-surface` background the other states use \u2014 NOT a\r\n `--cv-danger-soft` fill. Measured first, not assumed: `--cv-danger-strong` on `--cv-danger-soft`\r\n is 3.34:1 light / 3.62:1 dark, well under the 4.5:1 this 0.78rem text needs (it only ever cleared\r\n the SEPARATE 3:1 non-text bar this token was built for \u2014 an icon on that badge, not body text on\r\n it). Same lesson the person-filter fix already paid for: a badge-strength pairing that works for an\r\n icon is not automatically safe for text.\r\n*/\r\n.cv-detail-recording-status--warn { color: var(--cv-danger-strong); }\r\n.cv-detail-recording-spinner { animation: cv-spin 0.8s linear infinite; flex-shrink: 0; }\r\n\r\n/* \u2500\u2500 Call detail: who handled it \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */\r\n.cv-detail-handlers { display: flex; flex-wrap: wrap; align-items: center; gap: 0.3rem; }\r\n.cv-detail-handler-hop { display: inline-flex; align-items: center; gap: 0.3rem; }\r\n.cv-detail-handler-arrow { color: var(--cv-faint); flex-shrink: 0; }\r\n.cv-detail-handler-chip {\r\n display: inline-flex;\r\n align-items: center;\r\n gap: 0.3rem;\r\n padding: 0.15rem 0.5rem;\r\n border-radius: 999px;\r\n background: var(--cv-surface-2);\r\n color: var(--cv-text);\r\n font-size: 0.75rem;\r\n font-weight: 600;\r\n}\r\n/* The LAST hop \u2014 the one the call actually ended with \u2014 is the one worth a glance first. */\r\n.cv-detail-handler-chip[data-tone='accent'] { background: var(--cv-accent-soft); color: var(--cv-accent-strong); }\r\n.cv-detail-handler-ext {\r\n font-weight: 400;\r\n font-variant-numeric: tabular-nums;\r\n opacity: 0.75;\r\n}\r\n\r\n.cv-detail-rows {\r\n border: 1px solid var(--cv-border);\r\n border-radius: 14px;\r\n overflow: hidden;\r\n background: var(--cv-bg);\r\n}\r\n.cv-detail-row {\r\n display: flex;\r\n align-items: center;\r\n gap: 0.7rem;\r\n width: 100%;\r\n padding: 0.7rem 0.85rem;\r\n border: none;\r\n border-top: 1px solid var(--cv-border);\r\n background: none;\r\n font: inherit;\r\n color: inherit;\r\n text-align: left;\r\n}\r\n.cv-detail-row:first-child { border-top: none; }\r\n.cv-detail-row--action {\r\n cursor: pointer;\r\n transition: background 0.12s ease;\r\n}\r\n.cv-detail-row--action:hover { background: var(--cv-surface); }\r\n.cv-detail-row-icon {\r\n display: flex;\r\n align-items: center;\r\n justify-content: center;\r\n width: 32px;\r\n height: 32px;\r\n border-radius: 999px;\r\n background: var(--cv-surface-2);\r\n /*\r\n Without this the circle nearly vanishes into its own row: `--cv-surface-2` measures only ~1.1:1\r\n against the row's rest-state background and ~1.05:1 against `--cv-surface`, the color\r\n `.cv-detail-row--action:hover` sets the ROW to \u2014 both far below a readable boundary, and worse\r\n than `.cv-item-avatar`/`.cv-detail-avatar` above even manage WITH their border (1.18:1 light /\r\n 1.57:1 dark). Same token, same fix, same reason.\r\n */\r\n border: 1px solid var(--cv-border-strong);\r\n color: var(--cv-muted);\r\n flex-shrink: 0;\r\n}\r\n.cv-detail-row-text { flex: 1; min-width: 0; display: flex; flex-direction: column; }\r\n.cv-detail-row-eyebrow {\r\n font-size: 0.68rem;\r\n font-weight: 600;\r\n text-transform: uppercase;\r\n letter-spacing: 0.03em;\r\n color: var(--cv-muted);\r\n}\r\n.cv-detail-row-value {\r\n font-size: 0.85rem;\r\n font-weight: 500;\r\n color: var(--cv-text);\r\n white-space: nowrap;\r\n overflow: hidden;\r\n text-overflow: ellipsis;\r\n}\r\n.cv-detail-row-chevron { color: var(--cv-faint); flex-shrink: 0; }\r\n\r\n.cv-detail-foot { flex-shrink: 0; padding: 0.85rem 1.25rem 1.1rem; }\r\n.cv-detail-call { width: 100%; display: flex; align-items: center; justify-content: center; gap: 0.4rem; }\r\n\r\n/* \u2500\u2500 Settings tab (device selection, SPEC \xA77 Phase 2) \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */\r\n.cv-settings-body {\r\n flex: 1;\r\n min-height: 0;\r\n overflow-y: auto;\r\n padding: 1rem;\r\n display: flex;\r\n flex-direction: column;\r\n /* Generous separation BETWEEN sections, deliberately larger than any gap inside one \u2014 grouping\r\n only reads as grouping if the space between groups is clearly bigger than the space within one\r\n (see impeccable's layout guidance: \"tight grouping, generous separation\"). */\r\n gap: 1.5rem;\r\n}\r\n\r\n/*\r\n One labeled group (`SettingsSection`): a title, and a bordered body holding its rows. Ajustes\r\n started as a flat list of two rows with nothing to say they were related \u2014 fine for exactly two\r\n rows, unreadable the moment an unrelated third setting lands with nothing to tell it apart from\r\n the device rows above it.\r\n\r\n The body is ONE card, not a card per row: `.cv-settings-row`/`.cv-settings-note` below carry no\r\n border or background of their own, only a divider between siblings \u2014 the same shape\r\n `.cv-detail-rows`/`.cv-detail-row` already use elsewhere in this file, and deliberately not a\r\n stack of individually-bordered cards (nested-card territory).\r\n*/\r\n.cv-settings-section { display: flex; flex-direction: column; gap: 0.5rem; }\r\n.cv-settings-section-title {\r\n margin: 0;\r\n padding: 0 0.2rem;\r\n font-size: 0.7rem;\r\n font-weight: 700;\r\n text-transform: uppercase;\r\n letter-spacing: 0.04em;\r\n color: var(--cv-muted);\r\n}\r\n.cv-settings-section-body {\r\n border: 1px solid var(--cv-border);\r\n border-radius: 14px;\r\n background: var(--cv-bg);\r\n overflow: hidden;\r\n}\r\n.cv-settings-section-body > * { padding: 0.75rem 0.85rem; }\r\n.cv-settings-section-body > *:not(:first-child) { border-top: 1px solid var(--cv-border); }\r\n\r\n.cv-settings-row { display: flex; align-items: center; gap: 0.7rem; }\r\n/* Same treatment as `.cv-detail-row-icon`, same reason \u2014 see its own comment on why the border is\r\n load-bearing: `--cv-surface-2` alone nearly vanishes into the section's own background. */\r\n.cv-settings-row-icon {\r\n display: flex;\r\n align-items: center;\r\n justify-content: center;\r\n width: 32px;\r\n height: 32px;\r\n border-radius: 999px;\r\n background: var(--cv-surface-2);\r\n border: 1px solid var(--cv-border-strong);\r\n color: var(--cv-muted);\r\n flex-shrink: 0;\r\n}\r\n.cv-settings-row-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 0.35rem; }\r\n/* Same pairing as `.cv-detail-row-eyebrow` (`--cv-muted` on `--cv-bg`), verified there already. */\r\n.cv-settings-row-label {\r\n font-size: 0.68rem;\r\n font-weight: 600;\r\n text-transform: uppercase;\r\n letter-spacing: 0.03em;\r\n color: var(--cv-muted);\r\n}\r\n.cv-settings-select {\r\n width: 100%;\r\n padding: 0.45rem 0.6rem;\r\n border-radius: 8px;\r\n border: 1px solid var(--cv-border-strong);\r\n background: var(--cv-surface);\r\n color: var(--cv-text);\r\n font: inherit;\r\n font-size: 0.85rem;\r\n transition: border-color 0.15s ease, background 0.15s ease;\r\n}\r\n.cv-settings-select:focus { outline: none; border-color: var(--cv-accent); background: var(--cv-bg); }\r\n.cv-settings-empty { font-size: 0.85rem; color: var(--cv-muted); }\r\n\r\n/* `--cv-danger-strong` is the AS-TEXT danger token (see its definition): red-600 on the light `--cv-bg`,\r\n red-400 on the dark one. */\r\n.cv-settings-error { margin: 0.6rem 0.2rem 0; font-size: 0.78rem; line-height: 1.4; color: var(--cv-danger-strong); }\r\n\r\n/*\r\n Ajustes as a list (custom-ringtone.md \xA74.6, revised 2026-10-14): each row names a setting, shows its CURRENT\r\n value under the name, and opens a page. Same icon circle and dividers as the device rows above (they live in\r\n the same `.cv-settings-section-body`, which supplies the padding and the dividers), same chevron as\r\n `.cv-detail-row--action` \u2014 one row vocabulary across the widget.\r\n*/\r\n.cv-settings-nav {\r\n display: flex;\r\n align-items: center;\r\n gap: 0.7rem;\r\n width: 100%;\r\n border: none;\r\n background: none;\r\n font: inherit;\r\n color: inherit;\r\n text-align: left;\r\n}\r\nbutton.cv-settings-nav { cursor: pointer; transition: background 0.12s ease; }\r\nbutton.cv-settings-nav:hover { background: var(--cv-surface); }\r\nbutton.cv-settings-nav:focus-visible { outline: 2px solid var(--cv-accent); outline-offset: -2px; }\r\n.cv-settings-nav-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 0.1rem; }\r\n.cv-settings-nav-title { font-size: 0.88rem; font-weight: 600; color: var(--cv-text); }\r\n/* One line, cut with an ellipsis \u2014 the full device name is on its page. `--cv-muted` on `--cv-bg` is the\r\n pairing already verified for `.cv-settings-note`. The static row (a note, no page) may wrap instead. */\r\n.cv-settings-nav-value {\r\n font-size: 0.8rem;\r\n color: var(--cv-muted);\r\n overflow: hidden;\r\n text-overflow: ellipsis;\r\n white-space: nowrap;\r\n}\r\n.cv-settings-nav--static .cv-settings-nav-value { white-space: normal; line-height: 1.45; }\r\n.cv-settings-nav-chevron { flex-shrink: 0; color: var(--cv-muted); }\r\n\r\n/* A settings page: the `.cv-detail` overlay (entrance, back button, reduced motion all inherited) with a\r\n scrolling body of its own. */\r\n.cv-settings-page-body { flex: 1; min-height: 0; overflow-y: auto; padding: 0.25rem 1rem 1rem; }\r\n.cv-settings-page-title {\r\n margin: 0.15rem 0.2rem 0.35rem;\r\n font-size: 1.05rem;\r\n font-weight: 700;\r\n letter-spacing: -0.01em;\r\n color: var(--cv-text);\r\n}\r\n/* Focus lands here on open (for keyboard and screen-reader users); a ring on a heading would only look\r\n like a stray box to everyone else. */\r\n.cv-settings-page-title:focus { outline: none; }\r\n.cv-settings-page-intro { margin: 0 0.2rem 0.85rem; font-size: 0.8rem; line-height: 1.45; color: var(--cv-muted); }\r\n.cv-settings-page-empty { margin: 0; padding: 0 0.2rem; font-size: 0.85rem; color: var(--cv-muted); }\r\n\r\n/* The checkmark list: one card like `.cv-settings-section-body`, a row per choice. */\r\n.cv-choices {\r\n border: 1px solid var(--cv-border);\r\n border-radius: 14px;\r\n background: var(--cv-bg);\r\n overflow: hidden;\r\n}\r\n.cv-choice {\r\n position: relative;\r\n display: flex;\r\n align-items: center;\r\n gap: 0.6rem;\r\n min-height: 44px;\r\n padding: 0.6rem 0.85rem;\r\n cursor: pointer;\r\n transition: background 0.12s ease;\r\n}\r\n.cv-choice + .cv-choice { border-top: 1px solid var(--cv-border); }\r\n.cv-choice:hover { background: var(--cv-surface); }\r\n/* The real control: a native radio, kept in the accessibility tree and keyboard order, drawn by the row. */\r\n.cv-choice-input {\r\n position: absolute;\r\n opacity: 0;\r\n width: 1px;\r\n height: 1px;\r\n margin: 0;\r\n pointer-events: none;\r\n}\r\n.cv-choice:has(.cv-choice-input:focus-visible) { outline: 2px solid var(--cv-accent); outline-offset: -2px; }\r\n.cv-choice-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 0.1rem; }\r\n.cv-choice-label { font-size: 0.88rem; color: var(--cv-text); overflow-wrap: anywhere; }\r\n.cv-choice-sub { font-size: 0.78rem; color: var(--cv-muted); }\r\n.cv-choice[data-checked] .cv-choice-label { font-weight: 600; }\r\n.cv-choice-check { flex-shrink: 0; color: var(--cv-accent-strong); visibility: hidden; }\r\n.cv-choice[data-checked] .cv-choice-check { visibility: visible; }\r\n.cv-choice-playing { display: inline-flex; flex-shrink: 0; color: var(--cv-accent-strong); }\r\n\r\n.cv-settings-test,\r\n.cv-settings-retry {\r\n display: inline-flex;\r\n align-items: center;\r\n gap: 0.4rem;\r\n}\r\n.cv-settings-test { margin-top: 0.85rem; }\r\n.cv-settings-retry { margin-top: 0.6rem; }\r\n\r\n/* Visually hidden, still read aloud. */\r\n.cv-sr-only {\r\n position: absolute;\r\n width: 1px;\r\n height: 1px;\r\n overflow: hidden;\r\n clip-path: inset(50%);\r\n white-space: nowrap;\r\n}\r\n/* `--cv-muted` on `--cv-bg` \u2014 4.83:1 light / 6.97:1 dark, computed fresh for THIS pairing (the note\r\n used to sit on `--cv-surface` with its own card; now it sits directly on the section's `--cv-bg`,\r\n a different background that earns its own check rather than inheriting the old one's number). */\r\n.cv-settings-note {\r\n margin: 0;\r\n color: var(--cv-muted);\r\n font-size: 0.8rem;\r\n line-height: 1.5;\r\n}\r\n\r\n/* \u2500\u2500 Centred states (mic gate) \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */\r\n.cv-center {\r\n flex: 1;\r\n display: flex;\r\n flex-direction: column;\r\n align-items: center;\r\n justify-content: center;\r\n gap: 0.85rem;\r\n padding: 1.75rem;\r\n text-align: center;\r\n}\r\n.cv-center p { color: var(--cv-muted); margin: 0; font-size: 0.85rem; line-height: 1.5; }\r\n\r\n\r\n/* \"C\xF3mo permitirlo\" \u2014 a native <details> disclosure.\r\n Collapsed by default: the people who already know where the padlock is should not have to read\r\n past three steps to get there, and the people who don't get them without leaving the app. */\r\n.cv-help {\r\n width: 100%;\r\n margin-top: 0.15rem;\r\n text-align: left;\r\n}\r\n.cv-help summary {\r\n display: inline-flex;\r\n align-items: center;\r\n gap: 0.3rem;\r\n justify-content: center;\r\n width: 100%;\r\n padding: 0.3rem;\r\n border-radius: 8px;\r\n color: var(--cv-muted);\r\n font: 500 0.75rem var(--cv-font);\r\n cursor: pointer;\r\n list-style: none; /* hide the default triangle; the icon is the affordance */\r\n transition: color 0.15s ease, background 0.15s ease;\r\n}\r\n.cv-help summary::-webkit-details-marker { display: none; }\r\n.cv-help summary:hover { color: var(--cv-text); background: var(--cv-surface-2); }\r\n.cv-help[open] summary { color: var(--cv-text); margin-bottom: 0.35rem; }\r\n\r\n.cv-help ol {\r\n margin: 0;\r\n padding: 0.6rem 0.7rem 0.6rem 1.6rem;\r\n background: var(--cv-surface);\r\n border-radius: 10px;\r\n color: var(--cv-muted);\r\n font-size: 0.73rem;\r\n line-height: 1.55;\r\n}\r\n.cv-help li + li { margin-top: 0.3rem; }\r\n.cv-help li::marker { color: var(--cv-faint); font-variant-numeric: tabular-nums; }\r\n\r\n.cv-help a {\r\n display: inline-flex;\r\n align-items: center;\r\n gap: 0.25rem;\r\n margin-top: 0.45rem;\r\n padding-left: 0.1rem;\r\n color: var(--cv-accent-strong);\r\n font-size: 0.73rem;\r\n font-weight: 500;\r\n text-decoration: none;\r\n}\r\n.cv-help a:hover { text-decoration: underline; }\r\n\r\n/* The panel is the only thing that moves, and only when opened by hand \u2014 so it animates. */\r\n.cv-help[open] ol {\r\n animation: cv-gate-in 200ms var(--cv-ease-out) both;\r\n}\r\n@media (prefers-reduced-motion: reduce) {\r\n .cv-help[open] ol { animation: none; }\r\n}\r\n\r\n/* \u2500\u2500 The permission gate \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\r\n Four states, and only ONE of them deserves a designed screen.\r\n\r\n `checking` resolves in ~100\u2013400 ms. Rendering it immediately means the user\r\n sees text appear and vanish inside a blink \u2014 a flash reads as jank, not as\r\n information. So it is delayed 450 ms with `both` fill: invisible during the\r\n delay, and if the check finishes first (the usual case, and always the case\r\n when permission is already granted) it is never painted at all.\r\n\r\n `prompting` is the one the user actually reads and acts on. It gets the\r\n hierarchy: mark, title, reason, action.\r\n \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */\r\n.cv-gate {\r\n flex: 1;\r\n min-height: 0;\r\n display: flex;\r\n flex-direction: column;\r\n align-items: center;\r\n justify-content: center;\r\n gap: 0.6rem;\r\n padding: 1.5rem 1.75rem;\r\n text-align: center;\r\n}\r\n\r\n/* The disc echoes the call avatar \u2014 one visual language, not two. */\r\n.cv-gate-mark {\r\n display: grid;\r\n place-items: center;\r\n width: 52px;\r\n height: 52px;\r\n border-radius: 999px;\r\n background: var(--cv-accent-soft);\r\n color: var(--cv-accent-strong);\r\n margin-bottom: 0.15rem;\r\n}\r\n.cv-gate[data-tone='danger'] .cv-gate-mark {\r\n background: var(--cv-danger-soft);\r\n color: var(--cv-danger);\r\n}\r\n\r\n.cv-gate-title {\r\n margin: 0;\r\n font: 600 0.95rem var(--cv-font);\r\n color: var(--cv-text);\r\n letter-spacing: -0.01em;\r\n}\r\n.cv-gate p {\r\n margin: 0;\r\n color: var(--cv-muted);\r\n font-size: 0.8rem;\r\n line-height: 1.5;\r\n max-width: 24ch; /* two comfortable lines, not one long one */\r\n}\r\n.cv-gate .cv-btn { margin-top: 0.5rem; }\r\n\r\n/* Entrance. Staggered 45 ms apart: the eye follows mark \u2192 title \u2192 reason \u2192\r\n action, which is the order it needs to read them in anyway. */\r\n.cv-gate > * {\r\n animation: cv-gate-in 260ms var(--cv-ease-out) both;\r\n}\r\n.cv-gate > *:nth-child(2) { animation-delay: 45ms; }\r\n.cv-gate > *:nth-child(3) { animation-delay: 90ms; }\r\n.cv-gate > *:nth-child(4) { animation-delay: 135ms; }\r\n\r\n@keyframes cv-gate-in {\r\n from { opacity: 0; transform: translateY(6px); }\r\n to { opacity: 1; transform: none; }\r\n}\r\n\r\n/* The checking state: held back, then a quiet fade. No stagger, no movement \u2014\r\n it is a status, not a screen, and it should barely register. */\r\n.cv-gate[data-state='checking'] > *,\r\n.cv-gate[data-state='warming'] > * {\r\n animation: cv-gate-wait 200ms var(--cv-ease-out) 450ms both;\r\n}\r\n@keyframes cv-gate-wait {\r\n from { opacity: 0; }\r\n to { opacity: 1; }\r\n}\r\n/* A slow breath rather than a spinner: a spinner promises a long wait, and this\r\n is not one. */\r\n.cv-gate[data-state='checking'] .cv-gate-mark,\r\n.cv-gate[data-state='warming'] .cv-gate-mark {\r\n background: var(--cv-surface-2);\r\n color: var(--cv-muted);\r\n animation: cv-gate-wait 200ms var(--cv-ease-out) 450ms both,\r\n cv-breathe 1.8s ease-in-out 450ms infinite;\r\n}\r\n@keyframes cv-breathe {\r\n 0%, 100% { opacity: 1; }\r\n 50% { opacity: 0.45; }\r\n}\r\n\r\n/* Reduced motion: keep the fade and \u2014 critically \u2014 keep the DELAY, which is\r\n timing rather than motion and is the whole point. Drop the travel. */\r\n@media (prefers-reduced-motion: reduce) {\r\n .cv-gate > * {\r\n animation: cv-gate-wait 200ms var(--cv-ease-out) both;\r\n }\r\n .cv-gate[data-state='checking'] .cv-gate-mark,\r\n .cv-gate[data-state='warming'] .cv-gate-mark {\r\n animation: cv-gate-wait 200ms var(--cv-ease-out) 450ms both;\r\n }\r\n}\r\n\r\n@media (prefers-reduced-motion: reduce) {\r\n .cv-avatar-ping,\r\n .cv-timer i { animation: none; }\r\n .cv-softphone *,\r\n .cv-softphone *::before { transition-duration: 0.01ms !important; }\r\n}\r\n\r\n/* `*` and `#` stay in the grid \u2014 a keypad without them is not a keypad \u2014 but they are not part of a\r\n number (toE164 keeps digits only). Dimmed rather than `disabled` so the grid still reads as a\r\n keypad and the glyphs stay legible; they become live DTMF on the in-call screen. */\r\n.cv-key[data-dialable='false'] {\r\n cursor: default;\r\n}\r\n.cv-key[data-dialable='false'] b {\r\n color: var(--cv-faint);\r\n}\r\n.cv-key[data-dialable='false']:hover {\r\n background: none;\r\n}\r\n.cv-key[data-dialable='false']:active {\r\n transform: none;\r\n}\r\n\r\n/* \u2500\u2500 Country picker \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\r\n The prefix chip + its list. Sits where the old left spacer was, so the number\r\n stays optically centred against the 36px erase button on the right.\r\n\r\n The popover is absolutely positioned inside the widget rather than portalled:\r\n there is nowhere to portal TO inside a shadow root, and the widget already owns\r\n its stacking context. That also means it cannot be clipped by a host's\r\n `overflow:hidden` \u2014 the failure SPEC \xA72.6 lists for the CRM's Radix version.\r\n \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */\r\n/* The anchor spans the whole ROW, not just the chip.\r\n With the chip centred, anchoring to the chip put the popover's left edge at ~120px and its right\r\n edge past the widget \u2014 clipped by `.cv-softphone { overflow: hidden }`, which is the classic\r\n absolute-inside-overflow bug. Anchoring to the full row makes overflowing arithmetically\r\n impossible: `left:0; right:0` cannot be wider than the row that contains it. */\r\n.cv-cp {\r\n position: relative;\r\n display: flex;\r\n justify-content: center;\r\n width: 100%;\r\n}\r\n/* A PILL, with a resting surface and a border.\r\n This was `border: none; background: none` \u2014 invisible until hover, so it read as a label rather\r\n than a control. That was survivable when it sat inline beside the number; alone on its own row it\r\n is just floating text, and nothing says \"you can change this\". A control that changes state has to\r\n look like one at rest, not only under a cursor that may never arrive (touch has no hover at all). */\r\n.cv-cp-chip {\r\n display: inline-flex;\r\n align-items: center;\r\n gap: 0.3rem;\r\n height: 30px;\r\n padding: 0 0.5rem 0 0.4rem;\r\n border: 1px solid var(--cv-border-strong);\r\n border-radius: 999px;\r\n background: var(--cv-surface);\r\n color: var(--cv-text);\r\n font: 600 0.8rem var(--cv-font);\r\n cursor: pointer;\r\n transition: background 0.15s, border-color 0.15s;\r\n}\r\n.cv-cp-chip:hover { background: var(--cv-surface-2); }\r\n.cv-cp-chip:active { transform: scale(0.95); }\r\n/* Open: the chip is the thing the list belongs to, so it stays visibly engaged while the list is up. */\r\n.cv-cp-chip[aria-expanded='true'] {\r\n background: var(--cv-accent-soft);\r\n border-color: var(--cv-accent);\r\n}\r\n.cv-cp-dial {\r\n font-variant-numeric: tabular-nums;\r\n letter-spacing: -0.02em;\r\n}\r\n.cv-cp-caret {\r\n color: var(--cv-faint);\r\n flex-shrink: 0;\r\n transition: transform 0.18s cubic-bezier(0.2, 0, 0.2, 1);\r\n}\r\n.cv-cp-caret[data-open='true'] { transform: rotate(180deg); }\r\n\r\n/* The country mark. TWO designed states in ONE 20\xD714 box (a flag's own 3:2), so the chip and every\r\n row keep their rhythm whichever is showing \u2014 nothing reflows when the flags land. The plate is the\r\n LOADING state (flags are a lazy import) and the offline state, not a fallback: there is no flash of\r\n something broken, only a designed plate becoming a designed flag, once per session.\r\n `::part(country-mark)` lets a host restyle either. */\r\n.cv-mark {\r\n width: 20px;\r\n height: 14px;\r\n flex-shrink: 0;\r\n display: inline-flex;\r\n align-items: center;\r\n justify-content: center;\r\n font-size: 14px;\r\n line-height: 1;\r\n font-family: 'Apple Color Emoji', 'Segoe UI Emoji', 'Noto Color Emoji', var(--cv-font);\r\n}\r\n/* The SVG fills the slot exactly; 3x2 is the flag aspect, so nothing is letterboxed or cropped. */\r\n.cv-mark-svg {\r\n width: 100%;\r\n height: 100%;\r\n display: block;\r\n border-radius: 2px;\r\n object-fit: cover;\r\n}\r\n.cv-mark[data-plate='true'] {\r\n /* The ISO code set into the slot a flag will occupy. */\r\n font-family: var(--cv-font);\r\n font-size: 8.5px;\r\n font-weight: 700;\r\n letter-spacing: 0.04em;\r\n color: var(--cv-text);\r\n background: var(--cv-surface-2);\r\n border: 1px solid var(--cv-border);\r\n border-radius: 3px;\r\n /* Cap-height letters sit optically high in a 14px box; nudge them back to centre. */\r\n padding-top: 1px;\r\n}\r\n\r\n.cv-cp-pop {\r\n position: absolute;\r\n top: calc(100% + 6px);\r\n /* Pinned to BOTH row edges, so it is bounded by the container by construction \u2014 no width guess,\r\n no media query, nothing to clip. `max-width` keeps it from looking stretched on a wide host. */\r\n left: 0;\r\n right: 0;\r\n margin-inline: auto;\r\n max-width: 260px;\r\n z-index: 20;\r\n display: flex;\r\n flex-direction: column;\r\n background: var(--cv-surface);\r\n border: 1px solid var(--cv-border);\r\n border-radius: var(--cv-radius);\r\n box-shadow: var(--cv-shadow);\r\n overflow: hidden;\r\n /* Grows from the chip it belongs to, rather than appearing on top of it. */\r\n transform-origin: top center;\r\n animation: cv-cp-in 0.14s cubic-bezier(0.2, 0, 0.2, 1);\r\n}\r\n@keyframes cv-cp-in {\r\n from { opacity: 0; transform: translateY(-4px) scale(0.97); }\r\n to { opacity: 1; transform: none; }\r\n}\r\n@media (prefers-reduced-motion: reduce) {\r\n .cv-cp-pop { animation: none; }\r\n .cv-cp-caret { transition: none; }\r\n}\r\n.cv-cp-search {\r\n flex-shrink: 0;\r\n padding: 0.5rem 0.65rem;\r\n border: none;\r\n border-bottom: 1px solid var(--cv-border);\r\n background: none;\r\n color: var(--cv-text);\r\n font: 400 0.8rem var(--cv-font);\r\n outline: none;\r\n}\r\n.cv-cp-search::placeholder { color: var(--cv-faint); }\r\n/* Both states named explicitly. In the CRM the widget mounts via `/ui`, i.e. in the LIGHT DOM \u2014 none\r\n of the shadow-DOM isolation the web-component playground proves applies there, so a host's focus\r\n ring (or the browser's own) can land on our input. The accent underline IS the focus indicator. */\r\n.cv-cp-search:focus,\r\n.cv-cp-search:focus-visible {\r\n outline: none;\r\n border-bottom-color: var(--cv-accent);\r\n border-bottom-width: 2px;\r\n padding-bottom: calc(0.5rem - 1px);\r\n}\r\n.cv-cp-list {\r\n overflow-y: auto;\r\n max-height: 220px;\r\n padding: 0.25rem;\r\n}\r\n.cv-cp-item {\r\n width: 100%;\r\n display: flex;\r\n align-items: center;\r\n gap: 0.5rem;\r\n padding: 0.4rem 0.45rem;\r\n border: none;\r\n border-radius: calc(var(--cv-radius) - 4px);\r\n background: none;\r\n color: var(--cv-text);\r\n font: 400 0.8rem var(--cv-font);\r\n text-align: left;\r\n cursor: pointer;\r\n}\r\n.cv-cp-item:hover { background: var(--cv-surface-2); }\r\n/* The current country is stated by the row, not only by a tick at the far right. */\r\n.cv-cp-item[aria-selected='true'] { background: var(--cv-accent-soft); }\r\n.cv-cp-item[aria-selected='true'] .cv-cp-name { font-weight: 600; }\r\n.cv-cp-name {\r\n flex: 1;\r\n min-width: 0;\r\n overflow: hidden;\r\n text-overflow: ellipsis;\r\n white-space: nowrap;\r\n}\r\n.cv-cp-item .cv-cp-dial {\r\n color: var(--cv-muted);\r\n font-weight: 400;\r\n}\r\n.cv-cp-check { color: var(--cv-accent-strong); flex-shrink: 0; }\r\n.cv-cp-check[data-on='false'] { opacity: 0; }\r\n.cv-cp-empty {\r\n margin: 0;\r\n padding: 1rem 0.5rem;\r\n text-align: center;\r\n color: var(--cv-muted);\r\n font-size: 0.78rem;\r\n}\r\n";
|
|
11229
|
+
var softphone_default = "/**\r\n * @coventia/softphone/styles.css\r\n *\r\n * The theming contract (SPEC \xA72.6) + all component styles. A host restyles the softphone by\r\n * overriding the `--cv-*` custom properties \u2014 which are INHERITED, so they cross the shadow boundary\r\n * of `<coventia-softphone>` by design (the host's own CSS *selectors* do not, which is what stops a\r\n * stray `button { width:100% }` from destroying the dialpad).\r\n *\r\n * Defaults match the Coventia product: light surface, emerald accent, soft rounded key cards.\r\n *\r\n * Reseller: coventia-softphone { --cv-accent:#7c3aed; --cv-bg:#0b0b0f; }\r\n * CRM (shadcn bridge, ~15 lines, dark mode included):\r\n * .cv-softphone { --cv-bg:hsl(var(--background)); --cv-text:hsl(var(--foreground)); \u2026 }\r\n *\r\n * TYPOGRAPHY NOTE: `--cv-font` is a system stack on purpose. An embedded widget should inherit its\r\n * host's type, not force a webfont into someone else's app; hosts override the token if they want.\r\n *\r\n * Strings are Spanish-only (SPEC \xA72.4). No i18n.\r\n */\r\n\r\n/*\r\n * The custom element's own box.\r\n *\r\n * A custom element is `display: inline` by default and has NO size \u2014 and the widget inside now fills\r\n * its host rather than asserting 340\xD7520, so without this the element would render to ZERO. The\r\n * drop-in promise is \"one tag and it works\", which means the TAG must carry a box.\r\n *\r\n * These are defaults, not decisions: they sit on `:host`, so any host stylesheet outranks them \u2014\r\n *\r\n * coventia-softphone { width: 100%; height: 100%; } \u2190 a sidebar\r\n * coventia-softphone { height: 600px; } \u2190 taller\r\n *\r\n * React consumers never see this: they import `/ui` and their own wrapper states the box (the CRM's\r\n * PhoneDialer does exactly that).\r\n */\r\n:host {\r\n display: block;\r\n width: 340px;\r\n height: 520px;\r\n}\r\n\r\n/* React's container inside the shadow root \u2014 element path only; inert everywhere else.\r\n *\r\n * It must pass the host's height straight through. `.cv-softphone` below is `height: 100%`, and a\r\n * percentage height resolves against the PARENT: leave this div at its default `auto` and that 100%\r\n * silently becomes `auto` too, so the widget collapses to its content height and the host's `height`\r\n * is ignored. What you see is a short card stranded in a taller box \u2014 which reads as a broken widget,\r\n * not as a broken wrapper. */\r\n.cv-mount {\r\n height: 100%;\r\n}\r\n\r\n:host,\r\n.cv-softphone {\r\n /* Surface */\r\n --cv-bg: #ffffff;\r\n --cv-surface: #f9fafb;\r\n --cv-surface-2: #f3f4f6;\r\n --cv-border: #f3f4f6;\r\n --cv-border-strong: #e5e7eb;\r\n\r\n /* Text \u2014 three tiers, split by CONTRAST DUTY, not by taste:\r\n `text` informational primary 17.7:1\r\n `muted` informational secondary 4.8:1 (AA \u2014 phone numbers, timestamps, tab labels)\r\n `faint` DECORATIVE only 2.5:1 (keypad letters, placeholder \u2014 never information)\r\n The legacy used gray-400 for all secondary text, which fails AA at 2.54:1. Splitting the tier\r\n keeps the look while making the informational text legible. */\r\n --cv-text: #111827;\r\n --cv-muted: #6b7280;\r\n --cv-faint: #9ca3af;\r\n\r\n /* Intent \u2014 emerald. Split by CONTRAST DUTY, because one \"brand green\" cannot do all three jobs:\r\n `accent` FILL that carries a white glyph \u2192 emerald-600, white 3.77:1 \u2713\r\n (emerald-500 is the prettier brand green but white on it is 2.54:1 \u2014 the\r\n call button's phone icon would fail WCAG non-text contrast. Measured, not guessed.)\r\n `accent-strong` emerald AS TEXT on a surface \u2192 emerald-700, 5.48:1 \u2713 for the 10px tab label\r\n `accent-light` DECORATIVE only (the ring halo) \u2014 never carries text, so it stays vivid */\r\n --cv-accent: #059669;\r\n --cv-accent-strong: #047857;\r\n --cv-accent-light: #10b981;\r\n --cv-accent-soft: #a7f3d0;\r\n --cv-accent-contrast: #ffffff;\r\n --cv-danger: #ef4444;\r\n /* `--cv-danger` ITSELF fails 3:1 non-text contrast against `--cv-danger-soft` (2.6:1, measured) \u2014\r\n the same AS-TEXT/on-a-tinted-surface split `accent` already has, `danger` was just missing until\r\n the Historial tab's status badges needed it. Darker on light (mirrors `accent-strong`), LIGHTER on\r\n dark (red-400) \u2014 same inversion `accent-strong` documents above, same reason: emphasis on a dark\r\n surface means more light, not less.\r\n red-700 (#b91c1c) was the first pick here and overshot both minimums (6.47:1 text, 4.47:1 badge)\r\n enough to read as a dark, brownish red rather than red \u2014 red-600 clears both with real margin\r\n still (4.83:1 / 3.34:1, measured) and looks like red. */\r\n --cv-danger-strong: #dc2626;\r\n --cv-danger-soft: #fecaca;\r\n /* A third status hue, sky \u2014 for the Historial row status chip specifically: an outgoing call that\r\n WAS answered gets its own colour rather than sharing `accent`, matching the legacy CRM's own\r\n three-way split (emerald/sky/rose) that this file's earlier restrained accent-only-for-\"fine\"\r\n version had collapsed away. Same strong/soft split, same inversion, as `accent`/`danger` above \u2014\r\n 4.47:1 light / 4.42:1 dark against `-soft`, measured. */\r\n --cv-info: #0284c7;\r\n --cv-info-strong: #0369a1;\r\n --cv-info-soft: #bae6fd;\r\n --cv-hold: #6366f1;\r\n\r\n /* Shape & type */\r\n --cv-radius: 16px;\r\n /* Strong ease-out. The built-in CSS easings are too weak to read as intentional. */\r\n --cv-ease-out: cubic-bezier(0.23, 1, 0.32, 1);\r\n --cv-radius-key: 16px;\r\n --cv-font: system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;\r\n --cv-font-size: 14px;\r\n --cv-shadow: 0 1px 2px rgb(0 0 0 / 0.04), 0 1px 3px rgb(0 0 0 / 0.06);\r\n\r\n color: var(--cv-text);\r\n font-family: var(--cv-font);\r\n font-size: var(--cv-font-size);\r\n}\r\n\r\n/**\r\n * Dark theme \u2014 matched to the Coventia product's own dark tokens, not invented.\r\n *\r\n * The CRM defines `--background: 240 10% 10%` (#17171c) with surfaces at 15.9% (#27272a) and borders\r\n * at 25.9% (#404044) \u2014 the zinc/240-hue family. An earlier draft here used a near-black\r\n * (#0f0f13, ~half the luminance of the product's background) with 2%-luminance borders that were\r\n * effectively invisible. That is the \"black tonality\" that read wrong: right hue, wrong lightness.\r\n *\r\n * Note the accent INVERTS: on light, `accent-strong` is darker than `accent` (emerald-700); on dark\r\n * it must be LIGHTER (emerald-400), because emphasis on a dark surface means more light, not less.\r\n * Same token, opposite direction \u2014 miss this and the timer/active tab sink into the background.\r\n *\r\n * \u2500\u2500 HOW THE THEME IS CHOSEN \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\r\n * By default it follows the OS (`prefers-color-scheme`). But a host must be able to PIN it: the\r\n * Coventia CRM toggles dark with a class (next-themes), not the OS setting \u2014 so a user with a dark\r\n * OS but the CRM in light mode would otherwise get a dark widget inside a light app.\r\n *\r\n * <SoftphoneWidget theme=\"light\" /> \u2192 data-cv-theme=\"light\" \u2014 always light\r\n * <SoftphoneWidget theme=\"dark\" /> \u2192 data-cv-theme=\"dark\" \u2014 always dark\r\n * <SoftphoneWidget /> \u2192 follows the OS\r\n *\r\n * To follow the HOST's theme rather than the OS, pass the host's current theme through, e.g.\r\n * next-themes: `const { resolvedTheme } = useTheme(); <SoftphoneWidget theme={resolvedTheme} />`.\r\n *\r\n * The dark block is duplicated below (OS-driven vs. pinned) on purpose: plain CSS has no way to\r\n * share a declaration block across a media query and a selector, and the honest duplication beats a\r\n * clever custom-property toggle nobody can debug.\r\n */\r\n@media (prefers-color-scheme: dark) {\r\n :host(:not([data-cv-theme='light'])),\r\n .cv-softphone:not([data-cv-theme='light']) {\r\n --cv-bg: #17171c; /* CRM --background 240 10% 10% */\r\n --cv-surface: #202027; /* between bg and secondary */\r\n --cv-surface-2: #27272a; /* CRM --secondary/--muted 240 3.7% 15.9% */\r\n --cv-border: #2e2e33;\r\n --cv-border-strong: #404044; /* CRM --border 240 3.7% 25.9% */\r\n --cv-text: #fafafa; /* CRM --foreground 0 0% 98% */\r\n --cv-muted: #a1a1aa; /* CRM --muted-foreground 240 5% 64.9% \u2192 6.97:1 AA */\r\n --cv-faint: #71717a; /* decorative only */\r\n --cv-accent-strong: #34d399; /* emerald-400 \u2014 9.29:1 on #17171c */\r\n --cv-accent-light: #34d399; /* the halo reads brighter on dark */\r\n --cv-accent-soft: #065f46; /* glows must darken on dark, not glare */\r\n --cv-danger-strong: #f87171; /* red-400 \u2014 LIGHTER than --cv-danger, same inversion as accent-strong */\r\n --cv-danger-soft: #7f1d1d;\r\n --cv-info-strong: #38bdf8; /* sky-400 \u2014 same inversion, same reason */\r\n --cv-info-soft: #0c4a6e;\r\n --cv-shadow: 0 1px 2px rgb(0 0 0 / 0.4);\r\n }\r\n}\r\n\r\n/* Pinned dark \u2014 wins regardless of the OS setting. */\r\n:host([data-cv-theme='dark']),\r\n.cv-softphone[data-cv-theme='dark'] {\r\n --cv-bg: #17171c;\r\n --cv-surface: #202027;\r\n --cv-surface-2: #27272a;\r\n --cv-border: #2e2e33;\r\n --cv-border-strong: #404044;\r\n --cv-text: #fafafa;\r\n --cv-muted: #a1a1aa;\r\n --cv-faint: #71717a;\r\n --cv-accent-strong: #34d399;\r\n --cv-accent-light: #34d399;\r\n --cv-accent-soft: #065f46;\r\n --cv-danger-strong: #f87171;\r\n --cv-danger-soft: #7f1d1d;\r\n --cv-info-strong: #38bdf8;\r\n --cv-info-soft: #0c4a6e;\r\n --cv-shadow: 0 1px 2px rgb(0 0 0 / 0.4);\r\n}\r\n\r\n.cv-softphone,\r\n.cv-softphone *,\r\n.cv-softphone *::before,\r\n.cv-softphone *::after {\r\n box-sizing: border-box;\r\n}\r\n\r\n/* \u2500\u2500 Shell \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */\r\n.cv-softphone {\r\n display: flex;\r\n flex-direction: column;\r\n\r\n /* FILL the box the host gives us; do not assert one.\r\n This was `width: 340px; height: 520px`, which is a component telling its host how big its\r\n layout is. The CRM's panel is 310 wide, so the third keypad column was simply cut off \u2014 and no\r\n amount of theming could have fixed it, because the widget was not asking. A component in\r\n someone else's layout accepts a size. */\r\n width: 100%;\r\n height: 100%;\r\n\r\n /* \u2026but a dialpad is not a spreadsheet. Given 900px it should not become a 900px dialpad with\r\n 300px keys; it should be itself, centred. Cap and centre rather than stretch. */\r\n max-width: var(--cv-max-width, 420px);\r\n margin-inline: auto;\r\n\r\n /* Adapt to THIS box, not to the viewport. The widget can be 310px wide inside a 1920px screen \u2014\r\n a media query would ask the wrong question and get a confident wrong answer. Container queries\r\n are the only ones that know the truth, and a shadow root is the ideal place for them. */\r\n container-type: inline-size;\r\n container-name: cv;\r\n\r\n background: var(--cv-bg);\r\n overflow: hidden;\r\n /* The containing block for `.cv-transfer-notices` \u2014 it overlays this whole shell, top edge to top\r\n edge, not just `.cv-body`, so it reads as one seamless panel rather than a strip that starts a few\r\n pixels short of the shell's own rounded corner. */\r\n position: relative;\r\n\r\n /* The frame is the HOST's call. The CRM's panel already draws `border rounded-xl shadow-2xl`, so\r\n drawing our own put a card inside a card \u2014 nested chrome, which is always wrong. Defaulting to\r\n a frame still suits a bare drop-in on a blank page; a host that has its own sets these to\r\n `none` / `0` and the double edge disappears. */\r\n border: var(--cv-shell-border, 1px solid var(--cv-border-strong));\r\n border-radius: var(--cv-shell-radius, var(--cv-radius));\r\n box-shadow: var(--cv-shell-shadow, 0 4px 24px rgb(0 0 0 / 0.06));\r\n}\r\n\r\n/* Narrow hosts \u2014 a sidebar, a phone-width column. Reclaim the horizontal padding first: at 260px\r\n the gutters cost more than they give, and a cramped keypad is worse than a tight one. */\r\n@container cv (max-width: 300px) {\r\n .cv-keypad { padding: 0 0.6rem; gap: 6px; }\r\n .cv-dial-head { margin: 0 0.6rem 0.6rem; }\r\n}\r\n\r\n/* Short hosts. The flex chain already lets the keypad absorb what is left, but below this the keys\r\n stop being tappable \u2014 so buy the height back from the chrome instead of from the keys. */\r\n@container cv (max-height: 440px) {\r\n .cv-dial-head { margin-bottom: 0.4rem; }\r\n .cv-dial-foot { padding-bottom: 0.5rem; }\r\n .cv-controls { gap: 0.4rem; padding-bottom: 0.6rem; }\r\n}\r\n\r\n/* The flex chain that makes the layout work: body flexes, views fill it, only the\r\n keypad/list grows. Without `min-height:0` a grid child refuses to shrink and overflows. */\r\n.cv-body {\r\n flex: 1;\r\n min-height: 0;\r\n display: flex;\r\n flex-direction: column;\r\n}\r\n.cv-view {\r\n flex: 1;\r\n min-height: 0;\r\n display: flex;\r\n flex-direction: column;\r\n /* Containing block for `.cv-detail` below \u2014 an absolute overlay must cover exactly THIS tab's\r\n content, not escape to whatever the next positioned ancestor up the tree happens to be. */\r\n position: relative;\r\n}\r\n\r\n/* \u2500\u2500 Tab bar \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */\r\n.cv-tabs {\r\n display: flex;\r\n border-top: 1px solid var(--cv-border);\r\n background: var(--cv-bg);\r\n flex-shrink: 0;\r\n}\r\n.cv-tab {\r\n flex: 1;\r\n display: flex;\r\n flex-direction: column;\r\n align-items: center;\r\n gap: 3px;\r\n padding: 9px 0 8px;\r\n background: none;\r\n border: none;\r\n color: var(--cv-muted);\r\n cursor: pointer;\r\n font: inherit;\r\n transition: color 0.15s ease, background 0.15s ease;\r\n}\r\n.cv-tab:hover:not(:disabled) { background: var(--cv-surface); }\r\n.cv-tab[aria-selected='true'] { color: var(--cv-accent-strong); }\r\n.cv-tab:disabled { opacity: 0.35; cursor: not-allowed; }\r\n.cv-tab span { font-size: 10px; font-weight: 600; line-height: 1; letter-spacing: 0.01em; }\r\n\r\n/* \u2500\u2500 Transfer outcome notices (Phase A \u2014 transfer-outcome-relay.md \xA75.5) \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */\r\n/*\r\n A persistent, dismissable banner OVER `.cv-body`, never a toast and never auto-dismissed \u2014 it carries\r\n an action, and WCAG 2.2.1 requires a time limit to be removable, adjustable or extended.\r\n\r\n Overlaps rather than reserving its own height, the same reasoning `.cv-dial-outcome`'s own comment\r\n already gives for why the widget never lets a line of text resize the keypad under a moving finger \u2014\r\n here that principle cuts the other way: appearing costs nothing but a repaint, not a reflow, so the\r\n widget's overall height stays identical whether a notice is showing or not, exactly like `.cv-detail`\r\n overlaying `.cv-body`'s own list rather than pushing it down. It sits over whatever the current tab\r\n happens to be showing (most often the dialer's country picker and number field \u2014 an acceptable loss:\r\n the agent is not expected to start a fresh manual dial before dealing with a transfer that just failed\r\n to connect), which is also why it outranks `.cv-detail` in `z-index`.\r\n\r\n `[data-has-notices='false']` collapses to zero footprint: the element stays mounted (so its\r\n `role=\"status\"` region exists before the FIRST notice ever arrives \u2014 an aria-live region inserted at\r\n the same moment as its own content is not reliably announced), but an idle widget, the common case,\r\n covers nothing and costs no paint either.\r\n*/\r\n.cv-transfer-notices {\r\n position: absolute;\r\n inset: 0 0 auto 0;\r\n z-index: 3; /* above `.cv-detail`'s 2 \u2014 this is the higher-priority thing on screen */\r\n}\r\n.cv-transfer-notices[data-has-notices='true'] {\r\n display: flex;\r\n flex-direction: column;\r\n gap: 0.5rem;\r\n padding: 0.6rem 0.75rem;\r\n background: var(--cv-bg);\r\n box-shadow: var(--cv-shadow);\r\n animation: cv-transfer-notices-in 200ms var(--cv-ease-out) both;\r\n}\r\n@keyframes cv-transfer-notices-in {\r\n from { opacity: 0; transform: translateY(-6px); }\r\n to { opacity: 1; transform: none; }\r\n}\r\n@media (prefers-reduced-motion: reduce) {\r\n .cv-transfer-notices[data-has-notices='true'] { animation: none; }\r\n}\r\n.cv-transfer-notices-count {\r\n margin: 0;\r\n font: 600 0.72rem var(--cv-font);\r\n color: var(--cv-muted);\r\n text-transform: uppercase;\r\n letter-spacing: 0.04em;\r\n}\r\n.cv-transfer-notice {\r\n display: flex;\r\n align-items: flex-start;\r\n gap: 0.6rem;\r\n padding: 0.65rem 0.7rem;\r\n border-radius: var(--cv-radius-key);\r\n border: 1px solid var(--cv-danger-soft);\r\n background: var(--cv-surface);\r\n}\r\n/* Same shape as `.cv-gate-mark`, smaller \u2014 one visual language for \"here is a status\", not two. */\r\n.cv-transfer-notice-mark {\r\n flex-shrink: 0;\r\n display: grid;\r\n place-items: center;\r\n width: 30px;\r\n height: 30px;\r\n border-radius: 999px;\r\n background: var(--cv-danger-soft);\r\n color: var(--cv-danger);\r\n}\r\n.cv-transfer-notice-body { flex: 1; min-width: 0; }\r\n/*\r\n Title shares its row with only the dismiss button (24px) \u2014 not the whole card's width, and not the\r\n \"Llamar de vuelta\" button, which gets its own row below (`.cv-transfer-notice-footer`). The original\r\n layout put mark + title + subtitle + a full button all in one flex row, leaving the title as little as\r\n ~80px to wrap into at the real ~340px embed width \u2014 nearly every word landed on its own line.\r\n `align-items: flex-start` keeps the dismiss pinned to the first line even when the title wraps to two.\r\n*/\r\n.cv-transfer-notice-header { display: flex; align-items: flex-start; gap: 0.4rem; }\r\n.cv-transfer-notice-title {\r\n flex: 1;\r\n min-width: 0;\r\n margin: 0;\r\n font: 600 0.82rem var(--cv-font);\r\n color: var(--cv-text);\r\n line-height: 1.35;\r\n}\r\n.cv-transfer-notice-subtitle {\r\n margin: 0.15rem 0 0;\r\n font-size: 0.78rem;\r\n color: var(--cv-muted);\r\n line-height: 1.35;\r\n}\r\n/* Age and the callback button share a row too, same reasoning as the header \u2014 a short fixed-width\r\n timestamp beside a content-sized button, neither one fighting the title for space above. */\r\n.cv-transfer-notice-footer {\r\n display: flex;\r\n align-items: center;\r\n justify-content: space-between;\r\n gap: 0.5rem;\r\n margin-top: 0.35rem;\r\n}\r\n.cv-transfer-notice-age { margin: 0; font-size: 0.7rem; color: var(--cv-faint); flex-shrink: 0; }\r\n/*\r\n `.cv-btn.cv-transfer-notice-callback` \u2014 TWO classes, not one. Equal-specificity selectors resolve by\r\n source order, and this rule used to lose its `padding`/`font-size` to the shared `.cv-btn` rule below\r\n simply because that one appears later in the file; the button rendered at full default CTA size\r\n instead of this smaller, secondary one, which is what actually forced the title into that ~80px\r\n column above. The extra class is what makes this override win regardless of source order.\r\n*/\r\n.cv-btn.cv-transfer-notice-callback {\r\n flex-shrink: 0;\r\n padding: 0.35rem 0.6rem;\r\n font-size: 0.75rem;\r\n display: inline-flex;\r\n align-items: center;\r\n gap: 0.3rem;\r\n white-space: nowrap;\r\n}\r\n/* Same round icon-only shape as `.cv-search-clear` \u2014 one dismiss affordance, not a new one. */\r\n.cv-transfer-notice-dismiss {\r\n flex-shrink: 0;\r\n width: 24px;\r\n height: 24px;\r\n display: inline-flex;\r\n align-items: center;\r\n justify-content: center;\r\n border: none;\r\n border-radius: 999px;\r\n background: none;\r\n color: var(--cv-muted);\r\n cursor: pointer;\r\n transition: color 0.12s ease, background 0.12s ease, transform 0.1s var(--cv-ease-out);\r\n}\r\n.cv-transfer-notice-dismiss:hover { color: var(--cv-text); background: var(--cv-surface-2); }\r\n.cv-transfer-notice-dismiss:active { transform: scale(0.88); }\r\n\r\n/* \u2500\u2500 Buttons \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */\r\n.cv-btn {\r\n font: 600 0.875rem var(--cv-font);\r\n cursor: pointer;\r\n padding: 0.5rem 0.9rem;\r\n border-radius: 10px;\r\n border: 1px solid var(--cv-border-strong);\r\n background: var(--cv-bg);\r\n color: var(--cv-text);\r\n transition: background 0.15s ease, transform 0.06s ease;\r\n}\r\n.cv-btn:hover:not(:disabled) { background: var(--cv-surface); }\r\n.cv-btn:active:not(:disabled) { transform: scale(0.97); }\r\n.cv-btn:disabled { opacity: 0.45; cursor: not-allowed; }\r\n.cv-btn--accent {\r\n background: var(--cv-accent);\r\n border-color: var(--cv-accent);\r\n color: var(--cv-accent-contrast);\r\n}\r\n.cv-btn--accent:hover:not(:disabled) { background: var(--cv-accent-strong); }\r\n\r\n/* Round action buttons (answer / hangup / call) */\r\n.cv-round {\r\n width: 64px;\r\n height: 64px;\r\n border-radius: 999px;\r\n border: none;\r\n cursor: pointer;\r\n display: inline-flex;\r\n align-items: center;\r\n justify-content: center;\r\n color: #fff;\r\n transition: background 0.15s ease, transform 0.08s ease, box-shadow 0.15s ease;\r\n}\r\n.cv-round:active:not(:disabled) { transform: scale(0.94); }\r\n.cv-round--answer {\r\n background: var(--cv-accent);\r\n box-shadow: 0 8px 20px -4px var(--cv-accent-soft);\r\n}\r\n.cv-round--answer:hover:not(:disabled) { background: var(--cv-accent-strong); }\r\n.cv-round--answer:disabled {\r\n background: var(--cv-surface-2);\r\n color: var(--cv-faint);\r\n box-shadow: none;\r\n cursor: not-allowed;\r\n}\r\n.cv-round--hangup {\r\n background: var(--cv-danger);\r\n box-shadow: 0 8px 20px -4px var(--cv-danger-soft);\r\n}\r\n.cv-round--hangup:hover:not(:disabled) { filter: brightness(0.94); }\r\n\r\n/* \u2500\u2500 Dialpad \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */\r\n/* The number: ONE bordered field, the prefix inside it on the left and erase on the right \u2014 the pattern of the\r\n providers' dialers (Talkdesk \"[\u{1F1FA}\u{1F1F8} +1 \u25BE | Type or paste a number]\", Zendesk, Aircall; outbound-number-per-agent.md\r\n \xA75.5, 2026-10-26). The prefix is part of the number being dialled, so it sits inside the same box. The number\r\n shrinks to fit (`DISPLAY_SIZES` in Dialpad.tsx). The field is the positioned ancestor of the country list, so the\r\n list spans its width (`left: 0; right: 0`). */\r\n.cv-dial-head {\r\n flex-shrink: 0;\r\n position: relative;\r\n display: flex;\r\n align-items: center;\r\n height: 46px;\r\n margin: 0 1rem 0.75rem;\r\n padding: 0 0.2rem 0 0;\r\n border: 1px solid var(--cv-border-strong);\r\n border-radius: 10px;\r\n background: var(--cv-bg);\r\n transition: border-color 0.15s ease, box-shadow 0.15s ease;\r\n}\r\n/* With no \"Llamar desde\" line above it (an org with one number), the field opens the view. */\r\n.cv-view > .cv-dial-head:first-child { margin-top: 1rem; }\r\n/* Focus shows on the field, as on any input (WCAG 2.4.7): the accent border and a soft ring. */\r\n.cv-dial-head:focus-within {\r\n border-color: var(--cv-accent);\r\n box-shadow: 0 0 0 3px color-mix(in srgb, var(--cv-accent) 18%, transparent);\r\n}\r\n.cv-dial-head > .cv-cp {\r\n position: static;\r\n width: auto;\r\n flex-shrink: 0;\r\n align-self: stretch;\r\n}\r\n/* The prefix as the field's leading segment: the same chip, flush with the field, divided from the number. */\r\n.cv-dial-head .cv-cp-chip {\r\n height: 100%;\r\n padding: 0 0.45rem 0 0.65rem;\r\n border: 0;\r\n border-right: 1px solid var(--cv-border);\r\n border-radius: 9px 0 0 9px;\r\n background: var(--cv-surface);\r\n}\r\n.cv-dial-head .cv-cp-chip:focus-visible { outline: 2px solid var(--cv-accent); outline-offset: -2px; }\r\n/* Following a number typed in full (\"+44 \u2026\"): read-only \u2014 the flag alone, no caret, no hover. */\r\n.cv-cp-chip[data-from-number] {\r\n cursor: default;\r\n padding: 0 0.6rem;\r\n}\r\n/*\r\n * The outcome of the last attempt, under the number.\r\n *\r\n * ALWAYS in the layout, visible or not. The keypad is `flex: 1` and absorbs whatever height is left,\r\n * so a line that appears and disappears would resize every key and shift the whole grid under the\r\n * user's finger \u2014 mid-dial, which is exactly when this text arrives. Reserving the row costs one line\r\n * of height and buys a keypad that never moves.\r\n */\r\n.cv-dial-outcome {\r\n flex-shrink: 0;\r\n margin: 0;\r\n min-height: 1.15rem;\r\n padding: 0 1rem;\r\n text-align: center;\r\n font-size: 0.78rem;\r\n line-height: 1.15rem;\r\n color: var(--cv-muted);\r\n /*\r\n One line, always. `error-text.test.ts` caps every outcome at 48 characters so nothing should ever\r\n reach this \u2014 but a cap depends on whoever writes the next string remembering it, and the failure\r\n it prevents is not cosmetic: the keypad below is `flex: 1`, so a second line resizes all twelve\r\n keys and shifts the grid under a finger that is already moving. Truncating is visibly wrong and\r\n harmless; reflowing the dialpad mid-dial is invisibly wrong and makes the user misdial.\r\n */\r\n white-space: nowrap;\r\n overflow: hidden;\r\n text-overflow: ellipsis;\r\n /* Muted, not danger: the phone still works. A red line here would read as a broken phone. */\r\n opacity: 0;\r\n transition: opacity 150ms ease-out;\r\n}\r\n.cv-dial-outcome[data-shown='true'] {\r\n opacity: 1;\r\n}\r\n@media (prefers-reduced-motion: reduce) {\r\n .cv-dial-outcome {\r\n transition: none;\r\n }\r\n}\r\n\r\n/* Left-aligned after the prefix segment, as a phone field reads (\"+34 | 600 11 12 22\"). 1.375rem is the start of\r\n `DISPLAY_SIZES`, which steps it down until a long number fits the field. */\r\n.cv-display {\r\n flex: 1;\r\n min-width: 0;\r\n height: 100%;\r\n font: 500 1.375rem var(--cv-font);\r\n font-variant-numeric: tabular-nums;\r\n letter-spacing: -0.01em;\r\n text-align: left;\r\n color: var(--cv-text);\r\n border: none;\r\n background: none;\r\n padding: 0 0.6rem;\r\n caret-color: var(--cv-accent);\r\n}\r\n/* `--cv-muted`, not `--cv-faint`: a placeholder is read like any text (4.5:1). */\r\n.cv-display::placeholder { color: var(--cv-muted); font-weight: 400; }\r\n/* The field around it shows focus (`.cv-dial-head:focus-within`). */\r\n.cv-display:focus { outline: none; }\r\n\r\n/* The spacer/erase pair keeps the number optically centred. */\r\n.cv-dial-side {\r\n width: 36px;\r\n height: 36px;\r\n flex-shrink: 0;\r\n display: inline-flex;\r\n align-items: center;\r\n justify-content: center;\r\n border: none;\r\n background: none;\r\n color: var(--cv-muted);\r\n cursor: pointer;\r\n border-radius: 999px;\r\n transition: color 0.15s ease, opacity 0.15s ease, transform 0.06s ease;\r\n}\r\n.cv-dial-side:hover { color: var(--cv-text); }\r\n.cv-dial-side:active { transform: scale(0.9); }\r\n.cv-dial-side[data-hidden='true'] { opacity: 0; pointer-events: none; }\r\n\r\n/* THE layout fix: the keypad flexes to fill, and its rows share the space equally.\r\n Keys must NOT use aspect-ratio \u2014 that overflows the shell and shoves the call button\r\n under the tab bar. */\r\n.cv-keypad {\r\n flex: 1;\r\n min-height: 0;\r\n display: grid;\r\n grid-template-columns: repeat(3, 1fr);\r\n grid-template-rows: repeat(4, 1fr);\r\n gap: 8px;\r\n padding: 0 1rem;\r\n}\r\n.cv-key {\r\n display: flex;\r\n flex-direction: column;\r\n align-items: center;\r\n justify-content: center;\r\n gap: 1px;\r\n border-radius: var(--cv-radius-key);\r\n border: 1px solid var(--cv-border);\r\n background: var(--cv-bg);\r\n box-shadow: var(--cv-shadow);\r\n color: var(--cv-text);\r\n cursor: pointer;\r\n user-select: none;\r\n transition: background 0.12s ease, transform 0.06s ease;\r\n}\r\n.cv-key:hover { background: var(--cv-surface); }\r\n.cv-key:active { transform: scale(0.95); background: var(--cv-surface-2); }\r\n.cv-key b { font: 500 1.25rem/1 var(--cv-font); }\r\n.cv-key small {\r\n font-size: 9px;\r\n font-weight: 600;\r\n letter-spacing: 0.14em;\r\n /* `muted` (was `faint`, 2.5:1): the letters are read when dialling a number written in letters (900-FLORES),\r\n so they are text, held to 4.5:1 like any other (design critique, 2026-10-26). */\r\n color: var(--cv-muted);\r\n line-height: 1;\r\n}\r\n\r\n.cv-dial-foot {\r\n flex-shrink: 0;\r\n display: flex;\r\n justify-content: center;\r\n padding: 0.75rem 0 1rem;\r\n}\r\n\r\n/* \u2500\u2500 Active call \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */\r\n.cv-call {\r\n flex: 1;\r\n min-height: 0;\r\n display: flex;\r\n flex-direction: column;\r\n align-items: center;\r\n justify-content: center;\r\n gap: 0.15rem;\r\n text-align: center;\r\n padding: 1rem;\r\n /*\r\n A REAL bug, found live (plan T7): the transfer picker's agent list can make this box's content\r\n taller than the space `flex: 1` actually allocates it \u2014 the avatar/name/timer/status ABOVE the\r\n picker are still shown while transferring, unlike `.cv-call-devices-inline`'s own \"swap the\r\n content\" fix for the pre-connect devices screen. Without this, the overflow painted straight past\r\n `.cv-call`'s own shrunk box and onto `.cv-controls` below it \u2014 not scroll, actual overlap, controls\r\n rendered ON TOP of list rows. `overflow-y: auto` keeps any excess inside THIS box, scrollable,\r\n exactly like `.cv-presence-list`'s own internal scroll already does for the list itself.\r\n */\r\n overflow-y: auto;\r\n}\r\n\r\n.cv-avatar-wrap { position: relative; margin-bottom: 0.85rem; }\r\n.cv-avatar {\r\n position: relative;\r\n width: 68px;\r\n height: 68px;\r\n border-radius: 999px;\r\n /* accent \u2192 accent-strong (emerald 600\u2192700): white initials clear 3.77:1 at EVERY stop. Starting\r\n the ramp at emerald-500 would look punchier but drop the light end to 2.54:1. */\r\n background: linear-gradient(135deg, var(--cv-accent) 0%, var(--cv-accent-strong) 100%);\r\n display: flex;\r\n align-items: center;\r\n justify-content: center;\r\n color: #fff;\r\n font: 700 1.3rem var(--cv-font);\r\n letter-spacing: -0.01em;\r\n box-shadow: 0 8px 20px -6px var(--cv-accent-soft);\r\n}\r\n/* A soft halo while ringing \u2014 the one moment worth animating. */\r\n.cv-avatar-ping {\r\n position: absolute;\r\n inset: 0;\r\n border-radius: 999px;\r\n /* Decorative \u2014 nothing sits on it, so it uses the vivid emerald. */\r\n background: var(--cv-accent-light);\r\n opacity: 0.16;\r\n animation: cv-ping 1.6s cubic-bezier(0, 0, 0.2, 1) infinite;\r\n pointer-events: none;\r\n}\r\n@keyframes cv-ping {\r\n 0% { transform: scale(1); opacity: 0.22; }\r\n 80%, 100% { transform: scale(1.7); opacity: 0; }\r\n}\r\n.cv-avatar-dot {\r\n position: absolute;\r\n bottom: 1px;\r\n right: 1px;\r\n width: 14px;\r\n height: 14px;\r\n border-radius: 999px;\r\n background: var(--cv-accent);\r\n border: 2px solid var(--cv-bg);\r\n}\r\n\r\n.cv-call-name { font-size: 1rem; font-weight: 600; line-height: 1.2; }\r\n.cv-call-number { font-size: 0.75rem; color: var(--cv-muted); margin-top: 2px; }\r\n/* Which of the org's numbers this outbound call shows. Smaller than the callee: context, not identity \u2014 but muted,\r\n not faint: --cv-faint is under 4.5:1 at this size in both themes, and the agent may need to read it mid-call. */\r\n.cv-call-from {\r\n display: inline-flex;\r\n align-items: center;\r\n gap: 0.25rem;\r\n max-width: 100%;\r\n margin-top: 4px;\r\n font-size: 0.72rem;\r\n color: var(--cv-muted);\r\n}\r\n.cv-call-from span {\r\n min-width: 0;\r\n overflow: hidden;\r\n text-overflow: ellipsis;\r\n white-space: nowrap;\r\n}\r\n\r\n.cv-timer {\r\n display: flex;\r\n align-items: baseline;\r\n justify-content: center;\r\n gap: 1px;\r\n margin-top: 0.75rem;\r\n color: var(--cv-accent-strong);\r\n}\r\n.cv-timer b {\r\n font: 700 2.25rem/1 var(--cv-font);\r\n font-variant-numeric: tabular-nums;\r\n letter-spacing: -0.03em;\r\n}\r\n.cv-timer i {\r\n font: 300 1.75rem/1 var(--cv-font);\r\n font-style: normal;\r\n color: var(--cv-accent);\r\n animation: cv-blink 1.6s ease-in-out infinite;\r\n margin: 0 1px;\r\n}\r\n@keyframes cv-blink { 0%, 100% { opacity: 1; } 50% { opacity: 0.35; } }\r\n\r\n.cv-call-status {\r\n margin-top: 0.6rem;\r\n font-size: 0.78rem;\r\n color: var(--cv-muted);\r\n letter-spacing: 0.04em;\r\n}\r\n.cv-badge-hold { color: var(--cv-hold); font-weight: 600; }\r\n\r\n/* \u2500\u2500 Device check (ringing / dialing / in-call) \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\r\n Before a call connects there is only ONE other control on screen (Colgar, or\r\n Rechazar/Contestar) \u2014 putting Dispositivos in that same neighbourhood, even\r\n spaced out, keeps it a mis-tap away from hanging up or answering. The entry\r\n chip lives beside the call status instead, removing it from that neighbourhood\r\n rather than just adding distance within it \u2014 same resting-pill SHAPE as `.cv-cp`\r\n (CountryPicker), reused rather than invented fresh.\r\n\r\n Opening it does NOT pop a panel into that same tight space, though \u2014 this\r\n SDK's real production embed (a 310\xD7520 host panel with its own header eating\r\n further into that) leaves too little free room around a trigger sitting in\r\n vertically-centred content for a floating popover to open into without either\r\n overlapping Colgar/Rechazar/Contestar or clamping itself down to something\r\n cramped and scrolly for just two rows. `.cv-call-devices-inline` REPLACES the\r\n avatar/name/status block in `.cv-call` instead (see that JSX's own comment) \u2014\r\n an inline swap, not an overlay, so it gets the full box, not a leftover sliver.\r\n\r\n Once connected it is the SAME chip and the SAME swap. Dispositivos used to be a fifth control in\r\n the call row (with a floating popover), which is what forced that row down to 40px buttons and\r\n 9px labels in a 310px host. A set-once setting does not need a slot among the four things you do\r\n mid-call (mute, hold, transfer, keypad), and the control row stays live under the swap.\r\n \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */\r\n.cv-call-devices-chip {\r\n display: inline-flex;\r\n align-items: center;\r\n gap: 0.35rem;\r\n height: 26px;\r\n padding: 0 0.65rem;\r\n border: 1px solid var(--cv-border-strong);\r\n border-radius: 999px;\r\n background: var(--cv-bg);\r\n color: var(--cv-muted);\r\n font: 600 0.7rem var(--cv-font);\r\n cursor: pointer;\r\n transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;\r\n}\r\n.cv-call-devices-chip:hover { background: var(--cv-surface); }\r\n.cv-call-devices-chip:active { transform: scale(0.95); }\r\n\r\n/*\r\n The entry-point row \u2014 ONE chip today (Dispositivos), up to two once a host configures\r\n `incomingCallAction` (that one first: who is calling outranks a phone-utility setting). `width:\r\n 100%` + `flex-wrap` on purpose: a host's action label is arbitrary text this component cannot\r\n assume is short, so two chips sit side by side when they fit and wrap onto their own centred line\r\n when they do not, rather than overflowing `.cv-call`'s fixed width.\r\n*/\r\n.cv-call-chips {\r\n width: 100%;\r\n display: flex;\r\n flex-wrap: wrap;\r\n justify-content: center;\r\n gap: 0.5rem;\r\n margin-top: 0.65rem;\r\n}\r\n\r\n.cv-call-devices-inline {\r\n width: 100%;\r\n display: flex;\r\n flex-direction: column;\r\n gap: 0.9rem;\r\n /* `.cv-call` centres and centre-aligns its normal (avatar) content \u2014 rows read left-aligned\r\n everywhere else in the widget (Ajustes, the in-call popover), so this opts back out of both. */\r\n text-align: left;\r\n animation: cv-call-devices-in 0.18s cubic-bezier(0.2, 0, 0.2, 1);\r\n}\r\n@keyframes cv-call-devices-in {\r\n from { opacity: 0; transform: translateY(6px); }\r\n to { opacity: 1; transform: none; }\r\n}\r\n@media (prefers-reduced-motion: reduce) {\r\n .cv-call-devices-inline { animation: none; }\r\n}\r\n.cv-call-devices-header { display: flex; align-items: center; gap: 0.5rem; }\r\n.cv-call-devices-title { font-size: 0.95rem; font-weight: 600; color: var(--cv-text); }\r\n/* `--cv-muted` on `--cv-bg` \u2014 the same already-verified pairing `.cv-settings-note` uses\r\n (4.83:1 light / 6.97:1 dark), not a new one. */\r\n.cv-call-devices-context {\r\n margin: 0;\r\n font-size: 0.78rem;\r\n color: var(--cv-muted);\r\n}\r\n\r\n/* \u2500\u2500 Call controls \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\r\n TWO TIERS. Hang up is the one action that must never be hunted for, so it sits\r\n alone, centred, and largest \u2014 the anchor. The secondaries flank above it. They\r\n used to share a single row, where hang up was just the last button and carried\r\n the same weight as \"transfer\"; mid-call, that is the wrong hierarchy.\r\n \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */\r\n.cv-controls {\r\n flex-shrink: 0;\r\n display: flex;\r\n flex-direction: column;\r\n align-items: center;\r\n gap: 0.9rem;\r\n padding: 0.35rem 1rem 1.1rem;\r\n /* The containing block for `.cv-keypad-popover` \u2014 see that rule's own comment for why it is\r\n anchored here rather than to the trigger button. */\r\n position: relative;\r\n}\r\n/* FOUR controls, sized so they never need to shrink to fit. This row held five (Dispositivos too) and\r\n the only way to fit five in the CRM's 310px host was a 40px button with a 9px label and ~6px gaps \u2014\r\n below the 44/48px a thumb needs, and below legible for a word read mid-call. The default 48px size\r\n below was never actually seen: it only applied above a 360px host, which no real embed is.\r\n Dispositivos is the `.cv-call-chips` chip up by the call info instead (the same entry point the\r\n ringing and dialing screens already use). 4 \xD7 52 + 3 \xD7 20 = 268px, inside 310 - 2 \xD7 16 padding. */\r\n.cv-controls-row {\r\n display: flex;\r\n justify-content: center;\r\n gap: 1.25rem;\r\n}\r\n.cv-controls-primary {\r\n display: flex;\r\n justify-content: center;\r\n gap: 2.75rem;\r\n}\r\n/* Button + its word. The column keeps the label from widening the hit target. */\r\n.cv-ctrl-item {\r\n display: flex;\r\n flex-direction: column;\r\n align-items: center;\r\n gap: 0.3rem;\r\n}\r\n/* 10px, muted: present when you look for it, silent when you don't. An icon-only\r\n control is a quiz, and mid-call is the worst time to sit one. */\r\n.cv-ctrl-label {\r\n font-size: 0.625rem;\r\n line-height: 1;\r\n color: var(--cv-muted);\r\n white-space: nowrap;\r\n user-select: none;\r\n}\r\n/* The four secondaries' words get a notch more than Colgar / Rechazar / Contestar's 10px \u2014 they are\r\n the ones read mid-call, and the five-up row used to shrink them to 9px (8px in a sidebar). */\r\n.cv-controls-row .cv-ctrl-label { font-size: 0.6875rem; }\r\n.cv-ctrl {\r\n width: 52px;\r\n height: 52px;\r\n border-radius: 999px;\r\n border: 1px solid var(--cv-border-strong);\r\n background: var(--cv-bg);\r\n color: var(--cv-text);\r\n cursor: pointer;\r\n display: inline-flex;\r\n align-items: center;\r\n justify-content: center;\r\n transition: background 0.15s ease, color 0.15s ease, transform 0.06s ease;\r\n}\r\n.cv-ctrl:hover { background: var(--cv-surface); }\r\n.cv-ctrl:active { transform: scale(0.94); }\r\n.cv-ctrl:disabled {\r\n opacity: 0.4;\r\n cursor: not-allowed;\r\n pointer-events: none;\r\n}\r\n\r\n/* The ON states say what they MEAN, in the widget's own tokens: muted is danger,\r\n held is hold, transfer-open is accent. Colour is the state, not decoration. */\r\n.cv-ctrl[data-tone='danger'] {\r\n background: var(--cv-danger);\r\n border-color: var(--cv-danger);\r\n color: #fff;\r\n}\r\n.cv-ctrl[data-tone='hold'] {\r\n background: var(--cv-hold);\r\n border-color: var(--cv-hold);\r\n color: #fff;\r\n}\r\n.cv-ctrl[data-tone='accent'] {\r\n background: var(--cv-accent-soft);\r\n border-color: transparent;\r\n color: var(--cv-accent-strong);\r\n}\r\n.cv-ctrl[data-tone]:hover { filter: brightness(0.95); }\r\n\r\n/* Muted is the one state worth animating: it is invisible, it is easy to forget,\r\n and the cost of forgetting is talking to nobody. Same halo the avatar rings\r\n with \u2014 one language, not two. */\r\n.cv-ctrl[data-tone='danger'] {\r\n position: relative;\r\n}\r\n.cv-ctrl[data-tone='danger']::after {\r\n content: '';\r\n position: absolute;\r\n inset: 0;\r\n border-radius: 999px;\r\n background: var(--cv-danger);\r\n animation: cv-ping 1.6s cubic-bezier(0, 0, 0.2, 1) infinite;\r\n pointer-events: none;\r\n z-index: -1;\r\n}\r\n@media (prefers-reduced-motion: reduce) {\r\n .cv-ctrl[data-tone='danger']::after { animation: none; opacity: 0; }\r\n}\r\n.cv-ctrl[aria-pressed='true'] {\r\n background: var(--cv-text);\r\n color: var(--cv-bg);\r\n border-color: var(--cv-text);\r\n}\r\n\r\n/*\r\n Sidebar-narrow (this file's own \u2264300px tier, up in \"Narrow hosts\"). The four 52px controls with\r\n 20px gaps need 268px, which a 260px host cannot give \u2014 so this tier steps down to 44px with 12px\r\n gaps (4 \xD7 44 + 3 \xD7 12 = 212px) and reclaims `.cv-controls`'s own horizontal padding, the first\r\n lever that block's own comment names. 44px is still the Apple HIG minimum tap target; the five-up\r\n row this replaced went to 36px here.\r\n\r\n Placed AFTER `.cv-controls`/`.cv-controls-row` above rather than up with this file's other\r\n `@container` blocks near the top: `gap` and `padding-left`/`-right` here have the same specificity as\r\n those base rules' own shorthand, so \u2014 unlike a compound selector such as `.cv-controls-row .cv-ctrl`,\r\n which wins on specificity regardless of position \u2014 source order is what decides, and a narrower-width\r\n override declared BEFORE the base rule it means to narrow loses to it. Confirmed live: moved up into\r\n the \"Narrow hosts\" section, the `.cv-ctrl` width and label font-size reductions took effect (compound\r\n selectors) but `gap` and `.cv-controls`'s padding silently did not (plain selectors, later base rule won).\r\n*/\r\n@container cv (max-width: 300px) {\r\n .cv-controls { padding-left: 0.5rem; padding-right: 0.5rem; }\r\n .cv-controls-row { gap: 0.75rem; }\r\n .cv-controls-row .cv-ctrl { width: 44px; height: 44px; }\r\n .cv-controls-row .cv-ctrl-label { font-size: 0.625rem; }\r\n}\r\n\r\n/*\r\n The attended-transfer target-entry panel (`docs/specs/transfer-availability.md` \xA75): an optional\r\n outcome line, then a row of whatever's actionable (input+button today). Once a consult exists,\r\n `ConsultScreen` takes over the whole screen instead \u2014 this panel is ONLY ever the pre-consult /\r\n retry-after-failure state now; it used to also cover the consulting/answered phases, which is why\r\n its rule is a column container built for more than one child even though there's only ever one row\r\n here today. (History: was two near-duplicate rules \u2014 `.cv-transfer` as a bare ROW,\r\n `.cv-transfer-consult` as a column \u2014 until the row version turned out to be a real,\r\n reproduced-in-browser bug: the optional `.cv-dial-outcome` message rendered as a THIRD item in the\r\n same horizontal row as the input and button, squeezing the input to its content-minimum. Merged\r\n rather than patched.)\r\n*/\r\n.cv-transfer {\r\n display: flex;\r\n flex-direction: column;\r\n gap: 0.3rem;\r\n width: 100%;\r\n padding: 0.2rem 0.25rem 0;\r\n /* `.cv-call` centres and centre-aligns its normal (avatar) content \u2014 same reasoning\r\n `.cv-call-devices-inline` already opts out of for the OTHER inline swap in this box (its own\r\n comment): rows read left-aligned everywhere else in the widget, and a centred context line\r\n sitting directly above a left-aligned input/toggle/list read as two layouts stacked on top of\r\n each other, found live (2026-09-29). */\r\n text-align: left;\r\n /* Found live (2026-09-29): `.cv-call`'s avatar/name/timer block used to sit ABOVE this,\r\n unconditionally, so this panel only ever got whatever was left over \u2014 see the JSX call site's own\r\n comment. Now that this IS the whole of `.cv-call`'s content while a transfer is in progress\r\n (a swap, not an addition), it should CLAIM `.cv-call`'s available height, not just sit in it \u2014\r\n `flex: 1` does that; `min-height: 0` is what lets a flex child actually shrink to fit instead of\r\n forcing its parent to grow past it (the same reason `.cv-call`/`.cv-view`/`.cv-body` all set it,\r\n see their own comments). This is what lets `.cv-presence-list` below flex-grow into real room\r\n instead of needing its own hand-tuned `max-height` guess. */\r\n flex: 1;\r\n min-height: 0;\r\n /* Same entrance `.cv-call-devices-inline` already uses for the analogous inline swap (its own\r\n comment) \u2014 reused, not a second animation invented for this widget's second inline-swap view. */\r\n animation: cv-call-devices-in 0.18s cubic-bezier(0.2, 0, 0.2, 1);\r\n}\r\n@media (prefers-reduced-motion: reduce) {\r\n .cv-transfer { animation: none; }\r\n}\r\n/* The compact \"who am I still on the phone with\" line while the picker is open \u2014 reuses\r\n `.cv-call-devices-inline`'s own two classes verbatim (`.cv-call-devices-title` for the name,\r\n `.cv-call-devices-context` for the number/timer line) rather than inventing a second \"quiet header\"\r\n style for the same widget; only the tiny stacking gap between them is new.\r\n\r\n Found live (2026-09-29): `.cv-transfer`'s own `gap` alone gave every section \u2014 context, input row,\r\n mode toggle, results list \u2014 the exact same spacing, so nothing read as its own group; the eye had\r\n no cue for where \"who I'm on the phone with\" ends and \"pick a transfer target\" begins. This extra\r\n `margin-bottom`, on top of the base `gap`, is that cue \u2014 the toggle stays close to the list it\r\n controls (unchanged), only the boundary above the interactive controls opened up. */\r\n.cv-transfer-context {\r\n display: flex;\r\n flex-direction: column;\r\n gap: 2px;\r\n flex-shrink: 0;\r\n margin-bottom: 0.35rem;\r\n}\r\n/* Plan T3: the mode toggle reuses `.cv-segmented` (HistoryTab's own filter control) as-is, but its\r\n `margin-bottom` (needed THERE, where the surrounding layout has no gap of its own) is redundant\r\n here \u2014 `.cv-transfer`'s own `gap` above already spaces every child, so the two would stack. Scoped\r\n to this context only; HistoryTab's own copy is untouched. */\r\n.cv-transfer .cv-segmented { margin-bottom: 0; flex-shrink: 0; }\r\n.cv-transfer .cv-presence-legend { flex-shrink: 0; }\r\n/* Same treatment as `.cv-call-status` (the avatar's own \"Llamando\u2026\"/\"En espera\" line) \u2014 one muted\r\n status-line vocabulary for the whole call screen, not a second one invented for this panel. */\r\n.cv-transfer-status {\r\n margin: 0;\r\n font-size: 0.78rem;\r\n color: var(--cv-muted);\r\n letter-spacing: 0.04em;\r\n}\r\n/* The target-entry/retry row: an input plus one button. */\r\n.cv-transfer-row {\r\n display: flex;\r\n gap: 0.5rem;\r\n}\r\n/*\r\n Flex items default to `min-width: auto`, which floors them at their CONTENT size rather than letting\r\n them shrink or grow to fill the row \u2014 `.cv-search`'s own `width: 100%` never actually took effect\r\n here, because `.cv-btn`'s text (\"Llamar\") set an unshrinkable floor and the input, having no\r\n `flex-grow`, never reclaimed the space left over. `flex: 1` + `min-width: 0` is what actually makes\r\n an input-plus-button row behave like one; `flex: none` keeps the button at its natural size.\r\n*/\r\n.cv-transfer-row .cv-search {\r\n flex: 1;\r\n min-width: 0;\r\n}\r\n/* `max-width` + ellipsis: the label now includes whatever was typed (\"Llamar a {typed}\", spec \xA74.5)\r\n and `truncateForButton` already bounds that in JS \u2014 this is the CSS backstop, so a value that\r\n slips past it (a very wide character set, a future copy change) still can't push `.cv-search` down\r\n to an unusable sliver the way the pre-truncation button did before this was noticed. */\r\n.cv-transfer-row .cv-btn {\r\n flex: none;\r\n max-width: 60%;\r\n overflow: hidden;\r\n text-overflow: ellipsis;\r\n white-space: nowrap;\r\n}\r\n/* The consult-answered row: one or two buttons, no input. */\r\n.cv-transfer-actions {\r\n display: flex;\r\n gap: 0.5rem;\r\n}\r\n.cv-transfer-actions .cv-btn {\r\n flex: 1;\r\n}\r\n/* The ringing phase has only \"Cancelar\" \u2014 a secondary, low-stakes action. Letting the row's own\r\n `flex: 1` stretch a LONE button edge to edge reads as oversized for what it is, and nothing else in\r\n this widget sizes a single button to the full row; every other `.cv-btn` sizes to its content. */\r\n.cv-transfer-actions .cv-btn:only-child {\r\n flex: none;\r\n}\r\n\r\n/*\r\n The agent picker (spec \xA74.5, plan T7) \u2014 an inline, always-visible filtered list under the\r\n input+button row, not a click-to-open popover like `.cv-person-filter-pop`: the whole point is that\r\n typing already filters it, so hiding it behind a second interaction would undo that.\r\n\r\n Redesigned live (2026-09-29): T7 (72px) and T3 (30px) both hand-tuned a `max-height` in PIXELS\r\n against whatever else happened to be on screen at the time, and both were broken by the very next\r\n addition above the list (T3's own toggle broke T7's number the same way this would keep breaking on\r\n the next change) \u2014 down to \"barely proves the list is scrollable\" at 30px, which is what the user\r\n was actually seeing: \"users cannot almost see any of the listed users.\" The real fix wasn't a bigger\r\n magic number, it was `.cv-transfer`'s own move to `flex: 1` (see its comment) freeing real height\r\n from the block that used to sit above this whole panel \u2014 `.cv-presence` and this list now flex-grow\r\n into whatever's ACTUALLY left after the context line, input row, toggle and legend take their own\r\n natural size, on whatever real height the host panel gives `.cv-call` (this SDK's fixed ~310\xD7520\r\n embed today, but also whatever a different host gives it tomorrow \u2014 no more re-tuning a constant\r\n every time something above the list changes). `.cv-call`'s own `overflow-y: auto` (its own comment)\r\n is still the last-resort net if content ever genuinely doesn't fit; this just means that net should\r\n now rarely, if ever, have to catch anything for a normal agent list.\r\n*/\r\n.cv-presence {\r\n display: flex;\r\n flex-direction: column;\r\n gap: 0.35rem;\r\n flex: 1;\r\n min-height: 0;\r\n}\r\n.cv-presence-list {\r\n display: flex;\r\n flex-direction: column;\r\n gap: 2px;\r\n flex: 1;\r\n min-height: 0;\r\n overflow-y: auto;\r\n padding: 0.25rem;\r\n border: 1px solid var(--cv-border);\r\n border-radius: var(--cv-radius-key);\r\n background: var(--cv-surface);\r\n}\r\n.cv-presence-empty {\r\n margin: 0;\r\n padding: 0.5rem;\r\n text-align: center;\r\n font-size: 0.78rem;\r\n color: var(--cv-muted);\r\n}\r\n.cv-presence-item {\r\n width: 100%;\r\n display: flex;\r\n align-items: center;\r\n gap: 0.5rem;\r\n padding: 0.4rem 0.5rem;\r\n border: none;\r\n border-radius: calc(var(--cv-radius) - 4px);\r\n background: none;\r\n color: var(--cv-text);\r\n font: 400 0.8rem var(--cv-font);\r\n text-align: left;\r\n cursor: pointer;\r\n}\r\n.cv-presence-item:hover:not(:disabled) { background: var(--cv-surface-2); }\r\n/* En llamada rows are a hard block, not just a hint (CallScreen.tsx's own comment on the row has why)\r\n \u2014 same `:disabled` treatment `.cv-btn`/`.cv-tab` already use elsewhere in this file, not a new pattern. */\r\n.cv-presence-item:disabled { opacity: 0.45; cursor: not-allowed; }\r\n.cv-presence-dot {\r\n flex-shrink: 0;\r\n width: 8px;\r\n height: 8px;\r\n border-radius: 999px;\r\n}\r\n/* Reuses existing intent tokens rather than inventing new ones \u2014 `--cv-accent` already means\r\n \"good, reachable\" (the answer button), `--cv-hold` already means \"occupied elsewhere\" (the hold\r\n toggle), and `--cv-faint` is this file's own DECORATIVE-only tier (see the `--cv-*` legend near the\r\n top) \u2014 exactly what \"no signal for this person\" is, no signal being the whole point of that tier. */\r\n.cv-presence-dot[data-state='disponible'] { background: var(--cv-accent); }\r\n.cv-presence-dot[data-state='en_llamada'] { background: var(--cv-hold); }\r\n.cv-presence-dot[data-state='desconectado'] { background: var(--cv-faint); }\r\n.cv-presence-name {\r\n flex: 1;\r\n min-width: 0;\r\n overflow: hidden;\r\n text-overflow: ellipsis;\r\n white-space: nowrap;\r\n}\r\n.cv-presence-meta {\r\n flex-shrink: 0;\r\n font-size: 0.72rem;\r\n color: var(--cv-muted);\r\n}\r\n/* Spec \xA74.6: Desconectado is a HINT, never \"can't transfer\" \u2014 this is what tells the agent so, right\r\n under the list it describes. `--cv-muted`, NOT `--cv-faint`: this text is informational (the reader\r\n needs it to not misread the state), and `--cv-faint` is reserved for decorative-only content that\r\n fails AA on purpose \u2014 using it here would repeat the exact tier mistake this file's own `--cv-*`\r\n comment block warns against. */\r\n.cv-presence-legend {\r\n margin: 0;\r\n font-size: 0.7rem;\r\n color: var(--cv-muted);\r\n line-height: 1.35;\r\n}\r\n\r\n/*\r\n `ConsultScreen`'s \"someone is still waiting\" banner (`docs/specs/transfer-availability.md` \xA75, the\r\n cross-talk fix) \u2014 full-width and tappable, not a passive status line, because the entire reason this\r\n screen exists is to make \"go back to the caller\" impossible to miss. Neutral surface + the same\r\n `--cv-hold` colour `.cv-badge-hold` already uses for the same fact elsewhere, not a new soft-fill\r\n token: a text/icon tint on a plain surface is already proven legible here, and inventing an\r\n unmeasured background-tint pairing risks a real contrast regression this file takes seriously\r\n elsewhere (see the `-soft`/`-strong` split's own comments).\r\n*/\r\n.cv-consult-hold-banner {\r\n display: flex;\r\n align-items: center;\r\n justify-content: center;\r\n gap: 0.4rem;\r\n width: 100%;\r\n padding: 0.5rem 0.75rem;\r\n border-radius: 999px;\r\n border: 1px solid var(--cv-border);\r\n background: var(--cv-surface);\r\n color: var(--cv-hold);\r\n font: 600 0.78rem var(--cv-font);\r\n cursor: pointer;\r\n transition: background 0.15s ease, border-color 0.15s ease;\r\n}\r\n.cv-consult-hold-banner:hover {\r\n background: var(--cv-surface-2);\r\n border-color: var(--cv-hold);\r\n}\r\n.cv-consult-hold-banner:active {\r\n transform: scale(0.98);\r\n}\r\n\r\n@keyframes cv-pop-in-up {\r\n from { opacity: 0; transform: translateY(4px) scale(0.97); }\r\n to { opacity: 1; transform: none; }\r\n}\r\n\r\n/*\r\n The in-call DTMF keypad \u2014 the one floating popover left on the call screen. (Dispositivos was the\r\n other; it is inline content now, `.cv-call-devices-inline` above, in every call state.)\r\n\r\n Opens UPWARD (`bottom: 100%`): the trigger sits at the bottom of the call screen, and there is no\r\n room to open downward. Anchored to `.cv-controls`'s own horizontal padding \u2014 a container whose width\r\n is bounded by ITS parent, never the narrow trigger itself \u2014 the same fix CountryPicker's own popover\r\n needed (see its comment): anchoring to a narrow, off-centre trigger let the popover's edge reach\r\n `.cv-softphone`'s `overflow: hidden` and get clipped.\r\n*/\r\n.cv-keypad-popover {\r\n position: absolute;\r\n z-index: 20;\r\n display: grid;\r\n grid-template-columns: repeat(3, 1fr);\r\n gap: 8px;\r\n padding: 0.85rem 1rem;\r\n background: var(--cv-surface);\r\n border: 1px solid var(--cv-border);\r\n border-radius: var(--cv-radius);\r\n box-shadow: var(--cv-shadow);\r\n}\r\n.cv-keypad-popover--above {\r\n bottom: 100%;\r\n left: 1rem;\r\n right: 1rem;\r\n margin-bottom: 0.6rem;\r\n transform-origin: bottom center;\r\n animation: cv-pop-in-up 0.14s cubic-bezier(0.2, 0, 0.2, 1);\r\n}\r\n/* `.cv-key` already carries the full key look (border, hover, active-scale, digit/letter type) from\r\n the pre-call dialer \u2014 only the size needs setting here, since this grid has no flex ancestor to\r\n stretch the rows the way `.cv-keypad` gets to.\r\n\r\n A fixed HEIGHT, not an `aspect-ratio`. This popover opens upward from `.cv-controls`, so it has\r\n (host height - controls block - margin) to work with, and a ratio ties its height to the host's\r\n WIDTH, which says nothing about how much height there is. Found live: the CRM's real body is 310\xD7473\r\n (a 520px panel minus its 45px header), and a 1.3 ratio made this popover 285px \u2014 with the 184px\r\n controls block that is 479px, so its top ~7px were clipped by `.cv-softphone`'s `overflow: hidden`.\r\n 48px keys give a 243px popover at ANY width, fit that host with room to spare, and stay at the\r\n 44-48px minimum tap target (the old ratio gave 45px keys at a 260px host, 58px at 310). */\r\n.cv-keypad-popover .cv-key {\r\n height: 48px;\r\n}\r\n@media (prefers-reduced-motion: reduce) {\r\n .cv-keypad-popover--above { animation: none; }\r\n}\r\n\r\n/* \u2500\u2500 Lists (contacts / history) \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */\r\n.cv-list-head { flex-shrink: 0; padding: 0.85rem 1rem 0.5rem; }\r\n.cv-search {\r\n width: 100%;\r\n padding: 0.5rem 0.75rem;\r\n border-radius: 10px;\r\n border: 1px solid var(--cv-border-strong);\r\n background: var(--cv-surface);\r\n color: var(--cv-text);\r\n font: inherit;\r\n transition: border-color 0.15s ease, background 0.15s ease;\r\n /* Found live (2026-09-29): in the transfer row specifically, `.cv-btn`'s own `max-width: 60%`\r\n (needed for the dynamic \"Llamar a {typed}\" label) can leave the input narrower than its\r\n placeholder text \u2014 an `<input>` has no native ellipsis, so it hard-clipped mid-word\r\n (\"...o n\xFAm\") instead of trailing off cleanly. A real, if rare, risk for ANY `.cv-search` usage\r\n wherever it's squeezed, not just this one row \u2014 the fix belongs on the base rule. */\r\n overflow: hidden;\r\n text-overflow: ellipsis;\r\n}\r\n.cv-search::placeholder { color: var(--cv-muted); }\r\n.cv-search:focus { outline: none; border-color: var(--cv-accent); background: var(--cv-bg); }\r\n\r\n/*\r\n A wrapper around `.cv-search`, not a change to it \u2014 that class is also the transfer-target input\r\n in CallScreen, which wants neither an icon nor a clear button. `.cv-search--icon` is an ADDITIVE\r\n modifier on the input itself (padding only), so the base class is byte-for-byte what it was for\r\n every other consumer.\r\n*/\r\n.cv-search-field { position: relative; display: flex; align-items: center; }\r\n.cv-search--icon { padding-left: 2.15rem; padding-right: 1.85rem; }\r\n.cv-search-icon {\r\n position: absolute;\r\n left: 0.75rem;\r\n color: var(--cv-muted);\r\n pointer-events: none;\r\n}\r\n.cv-search-clear {\r\n position: absolute;\r\n right: 0.5rem;\r\n width: 22px;\r\n height: 22px;\r\n display: inline-flex;\r\n align-items: center;\r\n justify-content: center;\r\n border: none;\r\n border-radius: 999px;\r\n background: none;\r\n color: var(--cv-muted);\r\n cursor: pointer;\r\n transition: color 0.12s ease, transform 0.1s var(--cv-ease-out);\r\n}\r\n.cv-search-clear:hover { color: var(--cv-text); }\r\n.cv-search-clear:active { transform: scale(0.88); }\r\n\r\n/* \u2500\u2500 Historial filters: status (Todas/Perdidas) + person \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */\r\n.cv-segmented {\r\n display: flex;\r\n gap: 2px;\r\n padding: 2px;\r\n border-radius: 10px;\r\n background: var(--cv-surface-2);\r\n margin-bottom: 0.4rem;\r\n}\r\n.cv-segmented-btn {\r\n flex: 1;\r\n padding: 0.35rem 0;\r\n border: none;\r\n border-radius: 8px;\r\n background: none;\r\n color: var(--cv-muted);\r\n font: 600 0.75rem var(--cv-font);\r\n cursor: pointer;\r\n transition: background 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;\r\n}\r\n/* The active segment is stated by its own fill + shadow, not colour alone \u2014 the same reasoning\r\n `.cv-item-action[data-tone='accent']`'s own comment gives for resting-state colour: a state that\r\n only differs by hue must still read on a screen that renders neither. */\r\n.cv-segmented-btn[aria-selected='true'] {\r\n background: var(--cv-bg);\r\n color: var(--cv-text);\r\n box-shadow: var(--cv-shadow);\r\n}\r\n@media (prefers-reduced-motion: reduce) {\r\n .cv-segmented-btn { transition: none; }\r\n}\r\n\r\n/* The person filter \u2014 same combobox SHAPE as `.cv-cp-*` (CountryPicker): a chip opening a positioned\r\n popover list with a checkmark on the active row. Not the same CLASSES: the two pickers have nothing\r\n to do with each other and sharing a namespace would make a future change to one silently reach the\r\n other. */\r\n.cv-person-filter { position: relative; width: 100%; }\r\n.cv-person-filter-chip {\r\n display: flex;\r\n align-items: center;\r\n gap: 0.4rem;\r\n width: 100%;\r\n padding: 0.4rem 0.65rem;\r\n border: 1px solid var(--cv-border-strong);\r\n border-radius: 10px;\r\n background: var(--cv-surface);\r\n color: var(--cv-muted);\r\n font: 500 0.78rem var(--cv-font);\r\n cursor: pointer;\r\n transition: background 0.15s ease, border-color 0.15s ease;\r\n}\r\n.cv-person-filter-chip:hover { background: var(--cv-surface-2); }\r\n/*\r\n Border only, no fill \u2014 the popover opening and the caret rotating already say \"this is open\";\r\n painting the whole width of a wide text pill solid green on top of that was the same over-strong\r\n green the selected row had (see its own comment below). A coloured border is the same restrained\r\n signal `.cv-search:focus` already uses for \"active\" elsewhere in this file.\r\n*/\r\n.cv-person-filter-chip[aria-expanded='true'] {\r\n border-color: var(--cv-accent);\r\n}\r\n.cv-person-filter-label {\r\n flex: 1;\r\n min-width: 0;\r\n overflow: hidden;\r\n text-overflow: ellipsis;\r\n white-space: nowrap;\r\n text-align: left;\r\n color: var(--cv-text);\r\n}\r\n.cv-person-filter-caret {\r\n flex-shrink: 0;\r\n transition: transform 0.18s cubic-bezier(0.2, 0, 0.2, 1);\r\n}\r\n.cv-person-filter-caret[data-open='true'] { transform: rotate(180deg); }\r\n.cv-person-filter-pop {\r\n position: absolute;\r\n top: calc(100% + 6px);\r\n left: 0;\r\n right: 0;\r\n z-index: 20;\r\n max-height: 220px;\r\n overflow-y: auto;\r\n padding: 0.25rem;\r\n background: var(--cv-surface);\r\n border: 1px solid var(--cv-border);\r\n border-radius: var(--cv-radius);\r\n box-shadow: var(--cv-shadow);\r\n transform-origin: top center;\r\n animation: cv-cp-in 0.14s cubic-bezier(0.2, 0, 0.2, 1);\r\n}\r\n@media (prefers-reduced-motion: reduce) {\r\n .cv-person-filter-pop { animation: none; }\r\n .cv-person-filter-caret { transition: none; }\r\n}\r\n.cv-person-filter-item {\r\n width: 100%;\r\n display: flex;\r\n align-items: center;\r\n gap: 0.5rem;\r\n padding: 0.45rem 0.5rem;\r\n border: none;\r\n border-radius: calc(var(--cv-radius) - 4px);\r\n background: none;\r\n color: var(--cv-text);\r\n font: 400 0.8rem var(--cv-font);\r\n text-align: left;\r\n cursor: pointer;\r\n}\r\n.cv-person-filter-item:hover { background: var(--cv-surface-2); }\r\n/*\r\n NOT a solid `--cv-accent-soft` fill \u2014 that read as a wall of saturated green across a wide row,\r\n much louder than the legacy CRM's own treatment for this exact list (`bg-emerald-50` \u2014 a barely-\r\n there wash \u2014 plus coloured text, never a strong fill). Coloured, bold text + the checkmark carry\r\n \"selected\" instead; `--cv-accent-strong` is already verified elsewhere in this file as AA against\r\n `--cv-surface`, which is what this popover sits on.\r\n*/\r\n.cv-person-filter-item[aria-selected='true'] .cv-person-filter-name {\r\n font-weight: 600;\r\n color: var(--cv-accent-strong);\r\n}\r\n.cv-person-filter-name {\r\n flex: 1;\r\n min-width: 0;\r\n overflow: hidden;\r\n text-overflow: ellipsis;\r\n white-space: nowrap;\r\n}\r\n.cv-person-filter-check { color: var(--cv-accent-strong); flex-shrink: 0; }\r\n.cv-person-filter-check[data-on='false'] { opacity: 0; }\r\n\r\n.cv-list {\r\n flex: 1;\r\n min-height: 0;\r\n overflow-y: auto;\r\n padding: 0 0.5rem 0.5rem;\r\n}\r\n/*\r\n Historial's day group header. Sticky within `.cv-list` (its nearest scrolling ancestor \u2014 a plain\r\n wrapper div between the two does not break that), OPAQUE `--cv-bg` rather than a translucent\r\n `/85 + backdrop-blur` treatment: it still needs to fully occlude rows scrolling underneath it, and\r\n a flat match to the list's own background does that with no new CSS feature this file doesn't\r\n already use elsewhere.\r\n*/\r\n.cv-history-day {\r\n position: sticky;\r\n top: 0;\r\n z-index: 1;\r\n padding: 0.5rem 0.6rem 0.35rem;\r\n background: var(--cv-bg);\r\n color: var(--cv-muted);\r\n font-size: 0.68rem;\r\n font-weight: 600;\r\n text-transform: uppercase;\r\n letter-spacing: 0.04em;\r\n}\r\n.cv-item {\r\n display: flex;\r\n align-items: center;\r\n gap: 0.7rem;\r\n padding: 0.5rem;\r\n border-radius: 12px;\r\n /*\r\n NOT `cursor: pointer` \u2014 this div has no click handler of its own; only its children\r\n (`.cv-item-main`, `.cv-item-action`) do, and each already sets its own pointer cursor. Putting\r\n it here too used to make the WHOLE row's box promise a click \u2014 its own padding, and the flex\r\n `gap` between avatar/name/button \u2014 none of which does anything when clicked. Most noticeable\r\n right where one row's padding meets the next, which reads as \"there's something clickable\r\n between these two contacts\" when there is not.\r\n */\r\n transition: background 0.12s ease;\r\n text-align: left;\r\n width: 100%;\r\n border: none;\r\n background: none;\r\n font: inherit;\r\n color: inherit;\r\n}\r\n.cv-item:hover { background: var(--cv-surface); }\r\n.cv-item-avatar {\r\n width: 40px;\r\n height: 40px;\r\n border-radius: 999px;\r\n /*\r\n RADIAL, not diagonal \u2014 deliberately. The initials sit centered, so a radial gradient puts them\r\n at its lightest point (pure `--cv-surface`) no matter what, while the edges still darken toward\r\n `--cv-surface-2` for the same cheap depth a diagonal gradient gave. A diagonal version measured\r\n 4.39:1 for `--cv-muted` text at its far corner \u2014 under the 4.5:1 text needs \u2014 because centered\r\n text's exact position against a DIAGONAL gradient depends on glyph width, not just circle size.\r\n Centering the gradient on the centered text removes that dependency entirely, structurally,\r\n rather than nudging a token and hoping the margin holds. Both stops stay tokens, so this is\r\n still theme-correct for free \u2014 a hardcoded gray gradient would not adapt to dark mode.\r\n */\r\n background: radial-gradient(circle, var(--cv-surface), var(--cv-surface-2));\r\n /*\r\n Without this, the circle's own boundary can vanish: `.cv-item:hover` sets the ROW background to\r\n `--cv-surface` \u2014 the exact color the gradient above STARTS at (1.00 contrast ratio, i.e.\r\n identical) in both themes. `--cv-border-strong` is the same token `.cv-search`'s border already\r\n uses against this same surface a few rules up \u2014 a pairing already proven visible, not a new one.\r\n */\r\n border: 1px solid var(--cv-border-strong);\r\n display: flex;\r\n align-items: center;\r\n justify-content: center;\r\n color: var(--cv-muted);\r\n font-size: 0.78rem;\r\n font-weight: 700;\r\n flex-shrink: 0;\r\n}\r\n/*\r\n The Historial row's status chip \u2014 WHY a call needs colour at all: direction is already the icon's\r\n shape (an arrow in/out), but \"did this connect\" is not shape-able, and a flat grey circle made every\r\n row look identical at a glance. Small badge, not a row-wide fill (that mistake already got made once\r\n on the person filter \u2014 see its own comment): a 40px circle reads as a status glyph, the same way a\r\n colored icon-badge does anywhere else; a wide fill reads as decoration competing with the text next\r\n to it. `--danger-strong`/`--accent-strong` (not the plain base tokens) because the base tokens\r\n measure BELOW 3:1 non-text contrast against their own `-soft` fill \u2014 `--cv-danger` on\r\n `--cv-danger-soft` is 2.6:1; `--cv-danger-strong` is 4.47:1 light / 3.62:1 dark, measured.\r\n*/\r\n.cv-item-avatar[data-tone='accent'] { background: var(--cv-accent-soft); color: var(--cv-accent-strong); }\r\n.cv-item-avatar[data-tone='info'] { background: var(--cv-info-soft); color: var(--cv-info-strong); }\r\n.cv-item-avatar[data-tone='danger'] { background: var(--cv-danger-soft); color: var(--cv-danger-strong); }\r\n/* A button, reset to look like plain content \u2014 the row is a container, not a control. */\r\n.cv-item-main {\r\n flex: 1;\r\n min-width: 0;\r\n display: block;\r\n border: none;\r\n background: none;\r\n padding: 0;\r\n font: inherit;\r\n color: inherit;\r\n text-align: left;\r\n cursor: pointer;\r\n transition: transform 0.1s var(--cv-ease-out);\r\n}\r\n.cv-item-main:disabled { cursor: default; }\r\n.cv-item-main:not(:disabled):active { transform: scale(0.985); }\r\n.cv-item-name {\r\n display: block;\r\n font-weight: 600;\r\n font-size: 0.875rem;\r\n white-space: nowrap;\r\n overflow: hidden;\r\n text-overflow: ellipsis;\r\n}\r\n/*\r\n 14px bold does not clear WCAG's large-text bar (18.66px bold) \u2014 this text needs the full 4.5:1, not\r\n the 3:1 large-text minimum. `--cv-danger-strong`: 6.47:1 light / 6.46:1 dark against `--cv-bg`,\r\n measured; the plain `--cv-danger` this used to be was only 3.76:1 light \u2014 a real (if marginal) fail.\r\n*/\r\n.cv-item-name[data-tone='danger'] { color: var(--cv-danger-strong); }\r\n.cv-item-sub {\r\n display: block;\r\n font-size: 0.72rem;\r\n color: var(--cv-muted);\r\n margin-top: 1px;\r\n font-variant-numeric: tabular-nums;\r\n}\r\n.cv-item-sub-outcome { color: var(--cv-danger-strong); }\r\n/*\r\n Decorative reinforcement, not the sole carrier \u2014 the row's own play button is what says \"this call\r\n has a recording\" (it only renders when one exists); this is a small hint IN the metadata line that\r\n the button is worth pressing, so `--cv-faint` (2.5:1, documented above as decorative-only) is the\r\n right tier here, same reasoning `.cv-empty-icon`/`.cv-gate-mark` already use for icons next to real\r\n text rather than standing alone.\r\n\r\n `display: inline-flex` is load-bearing, not decoration \u2014 every OTHER inline icon in this file gets\r\n an explicit `display` for the same reason: `/react` + `/ui` render straight into the host's light\r\n DOM (no shadow root), so a host reset like Tailwind Preflight's `svg { display: block }` reaches\r\n this element directly. Without an explicit override here, that reset knocks the icon onto its own\r\n line instead of trailing the duration text it is meant to sit beside.\r\n*/\r\n.cv-item-sub-rec {\r\n display: inline-flex;\r\n color: var(--cv-faint);\r\n margin-left: 0.3rem;\r\n vertical-align: -1px;\r\n}\r\n.cv-item-action {\r\n width: 34px;\r\n height: 34px;\r\n border-radius: 999px;\r\n border: none;\r\n background: none;\r\n color: var(--cv-muted);\r\n cursor: pointer;\r\n display: inline-flex;\r\n align-items: center;\r\n justify-content: center;\r\n flex-shrink: 0;\r\n transition: background 0.12s ease, color 0.12s ease, transform 0.1s var(--cv-ease-out);\r\n}\r\n.cv-item-action:hover { background: var(--cv-accent); color: #fff; }\r\n.cv-item-action:active { transform: scale(0.9); }\r\n/*\r\n The call action specifically (ContactsTab) \u2014 NOT History's \"play recording\", which shares this\r\n same class and must stay neutral; a play button has no reason to be accent-colored. Scoped with\r\n `data-tone`, the same modifier convention `.cv-ctrl[data-tone]` already uses elsewhere in this file.\r\n\r\n Coloured at REST, not just on hover: a hover-only reveal never fires on a touchscreen, so the one\r\n affordance that most needs to read as \"you can tap this\" would be invisible on exactly the devices\r\n a phone widget is likeliest to run on. `accent-strong` is already verified elsewhere in this file\r\n as AA on a surface; `accent-soft` is the same hover tint `.cv-ctrl[data-tone='accent']` uses, just\r\n transparent at rest so fifty rows of solid fill never turns the list into a wall of green.\r\n*/\r\n.cv-item-action[data-tone='accent'] { color: var(--cv-accent-strong); }\r\n.cv-item-action[data-tone='accent']:hover { background: var(--cv-accent-soft); color: var(--cv-accent-strong); }\r\n\r\n@media (prefers-reduced-motion: reduce) {\r\n .cv-item-main, .cv-item-action, .cv-search-clear { transition: none; }\r\n}\r\n\r\n.cv-empty {\r\n display: flex;\r\n flex-direction: column;\r\n align-items: center;\r\n justify-content: center;\r\n height: 100%;\r\n color: var(--cv-muted);\r\n text-align: center;\r\n padding: 2.5rem 1.25rem;\r\n font-size: 0.82rem;\r\n}\r\n.cv-empty-icon {\r\n display: flex;\r\n align-items: center;\r\n justify-content: center;\r\n width: 48px;\r\n height: 48px;\r\n border-radius: 999px;\r\n background: var(--cv-surface);\r\n color: var(--cv-faint);\r\n margin-bottom: 0.75rem;\r\n}\r\n.cv-empty-title { margin: 0; font-size: 0.85rem; font-weight: 600; color: var(--cv-muted); }\r\n/*\r\n `--cv-muted`, NOT `--cv-faint` \u2014 this file documents faint as \"decorative only... never\r\n information\" (2.5:1, below AA), and this line IS information: it is the reason the list is\r\n empty, sometimes echoing the user's own search back to them. `--cv-faint` here measured 2.54:1\r\n light / 3.70:1 dark against a 4.5:1 bar \u2014 a real failure, not a rounding difference.\r\n*/\r\n.cv-empty-sub { margin: 0.2rem 0 0; font-size: 0.75rem; color: var(--cv-muted); }\r\n.cv-empty-spinner {\r\n margin-bottom: 0.75rem;\r\n animation: cv-spin 0.8s linear infinite;\r\n /* A loading spinner's rotation IS the information, with no static equivalent \u2014 unlike this\r\n file's other motion, it stays exempt from reduced-motion rather than freezing into a shape\r\n that would just look stuck. Colour comes from `.cv-empty`'s own `color: var(--cv-muted)` \u2014\r\n the spinner no longer sets its own, now that it sits next to real text instead of standing\r\n alone: the icon is decorative reinforcement, same as `.cv-empty-icon`, not the sole carrier. */\r\n}\r\n@keyframes cv-spin {\r\n to { transform: rotate(360deg); }\r\n}\r\n\r\n/* The scroll-triggered \"load more\" marker \u2014 see `useInfiniteList`. Never visible itself; a small\r\n height so it has a real box for the `IntersectionObserver` to track. */\r\n.cv-list-sentinel {\r\n height: 1px;\r\n}\r\n.cv-list-loading-more {\r\n display: flex;\r\n align-items: center;\r\n justify-content: center;\r\n padding: 0.75rem 0 0.25rem;\r\n color: var(--cv-muted);\r\n}\r\n/* Exempt from reduced-motion for the same reason `.cv-empty-spinner` is \u2014 see its own comment. */\r\n.cv-list-loading-more-spinner {\r\n animation: cv-spin 0.8s linear infinite;\r\n}\r\n\r\n/* \u2500\u2500 Contact detail (overlays the list) \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */\r\n.cv-detail {\r\n position: absolute;\r\n inset: 0;\r\n /* Above the list's own sticky day-group header (`.cv-history-day`, z-index: 1) \u2014 otherwise\r\n that header's z-index wins the stacking fight wherever its unscrolled flow position happens\r\n to land on top of this overlay, and it paints through despite both having an opaque bg. */\r\n z-index: 2;\r\n display: flex;\r\n flex-direction: column;\r\n background: var(--cv-bg);\r\n animation: cv-detail-in 220ms var(--cv-ease-out) both;\r\n}\r\n@keyframes cv-detail-in {\r\n from { opacity: 0; transform: translateX(10px); }\r\n to { opacity: 1; transform: none; }\r\n}\r\n@media (prefers-reduced-motion: reduce) {\r\n .cv-detail { animation: none; }\r\n}\r\n\r\n.cv-detail-head { flex-shrink: 0; padding: 0.6rem 0.5rem 0; }\r\n.cv-detail-back {\r\n display: inline-flex;\r\n align-items: center;\r\n gap: 0.3rem;\r\n padding: 0.4rem 0.5rem;\r\n border: none;\r\n border-radius: 8px;\r\n background: none;\r\n color: var(--cv-muted);\r\n font: 600 0.82rem var(--cv-font);\r\n cursor: pointer;\r\n transition: color 0.12s ease, transform 0.1s var(--cv-ease-out);\r\n}\r\n.cv-detail-back:hover { color: var(--cv-text); }\r\n.cv-detail-back:active { transform: scale(0.97); }\r\n\r\n.cv-detail-body { flex: 1; min-height: 0; overflow-y: auto; padding: 0 1.25rem; }\r\n.cv-detail-identity {\r\n display: flex;\r\n flex-direction: column;\r\n align-items: center;\r\n text-align: center;\r\n padding: 0.75rem 0 1.5rem;\r\n}\r\n.cv-detail-avatar {\r\n width: 72px;\r\n height: 72px;\r\n border-radius: 999px;\r\n /* Same radial + border treatment as `.cv-item-avatar` (see its own comment), just larger. Neutral\r\n by default \u2014 a contact has no \"status\" to colour. `HistoryDetail` overrides both with `[data-tone]`\r\n below: a call DOES have one, the same one the list row already shows, so the hero avatar staying\r\n grey there would be information the list already gave up on repeating here. */\r\n background: radial-gradient(circle, var(--cv-surface), var(--cv-surface-2));\r\n border: 1px solid var(--cv-border-strong);\r\n display: flex;\r\n align-items: center;\r\n justify-content: center;\r\n color: var(--cv-muted);\r\n font-size: 1.35rem;\r\n font-weight: 700;\r\n margin-bottom: 0.85rem;\r\n}\r\n/* Same token pairs already verified for `.cv-item-avatar[data-tone]` \u2014 size doesn't change a contrast\r\n ratio, so no new numbers to measure here. */\r\n.cv-detail-avatar[data-tone='accent'] { background: var(--cv-accent-soft); color: var(--cv-accent-strong); border-color: transparent; }\r\n.cv-detail-avatar[data-tone='info'] { background: var(--cv-info-soft); color: var(--cv-info-strong); border-color: transparent; }\r\n.cv-detail-avatar[data-tone='danger'] { background: var(--cv-danger-soft); color: var(--cv-danger-strong); border-color: transparent; }\r\n.cv-detail-name {\r\n margin: 0;\r\n font-size: 1.1rem;\r\n font-weight: 700;\r\n color: var(--cv-text);\r\n letter-spacing: -0.01em;\r\n}\r\n.cv-detail-name[data-tone='danger'] { color: var(--cv-danger-strong); }\r\n.cv-detail-meta {\r\n margin: 0.2rem 0 0;\r\n font-size: 0.78rem;\r\n color: var(--cv-muted);\r\n}\r\n\r\n/* \u2500\u2500 Call detail: recording \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */\r\n.cv-detail-recording { margin-bottom: 1rem; }\r\n.cv-detail-recording-label {\r\n margin: 0 0 0.4rem;\r\n padding: 0 0.15rem;\r\n font-size: 0.68rem;\r\n font-weight: 600;\r\n text-transform: uppercase;\r\n letter-spacing: 0.03em;\r\n color: var(--cv-muted);\r\n}\r\n.cv-detail-audio { width: 100%; display: block; }\r\n.cv-detail-audio + .cv-detail-audio { margin-top: 0.5rem; }\r\n.cv-detail-recording-status {\r\n display: flex;\r\n align-items: center;\r\n gap: 0.5rem;\r\n margin: 0 0 1rem;\r\n padding: 0.65rem 0.75rem;\r\n border-radius: 12px;\r\n background: var(--cv-surface);\r\n color: var(--cv-muted);\r\n font-size: 0.78rem;\r\n}\r\n/*\r\n Text colour only, same neutral `--cv-surface` background the other states use \u2014 NOT a\r\n `--cv-danger-soft` fill. Measured first, not assumed: `--cv-danger-strong` on `--cv-danger-soft`\r\n is 3.34:1 light / 3.62:1 dark, well under the 4.5:1 this 0.78rem text needs (it only ever cleared\r\n the SEPARATE 3:1 non-text bar this token was built for \u2014 an icon on that badge, not body text on\r\n it). Same lesson the person-filter fix already paid for: a badge-strength pairing that works for an\r\n icon is not automatically safe for text.\r\n*/\r\n.cv-detail-recording-status--warn { color: var(--cv-danger-strong); }\r\n.cv-detail-recording-spinner { animation: cv-spin 0.8s linear infinite; flex-shrink: 0; }\r\n\r\n/* \u2500\u2500 Call detail: who handled it \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */\r\n.cv-detail-handlers { display: flex; flex-wrap: wrap; align-items: center; gap: 0.3rem; }\r\n.cv-detail-handler-hop { display: inline-flex; align-items: center; gap: 0.3rem; }\r\n.cv-detail-handler-arrow { color: var(--cv-faint); flex-shrink: 0; }\r\n.cv-detail-handler-chip {\r\n display: inline-flex;\r\n align-items: center;\r\n gap: 0.3rem;\r\n padding: 0.15rem 0.5rem;\r\n border-radius: 999px;\r\n background: var(--cv-surface-2);\r\n color: var(--cv-text);\r\n font-size: 0.75rem;\r\n font-weight: 600;\r\n}\r\n/* The LAST hop \u2014 the one the call actually ended with \u2014 is the one worth a glance first. */\r\n.cv-detail-handler-chip[data-tone='accent'] { background: var(--cv-accent-soft); color: var(--cv-accent-strong); }\r\n.cv-detail-handler-ext {\r\n font-weight: 400;\r\n font-variant-numeric: tabular-nums;\r\n opacity: 0.75;\r\n}\r\n\r\n.cv-detail-rows {\r\n border: 1px solid var(--cv-border);\r\n border-radius: 14px;\r\n overflow: hidden;\r\n background: var(--cv-bg);\r\n}\r\n.cv-detail-row {\r\n display: flex;\r\n align-items: center;\r\n gap: 0.7rem;\r\n width: 100%;\r\n padding: 0.7rem 0.85rem;\r\n border: none;\r\n border-top: 1px solid var(--cv-border);\r\n background: none;\r\n font: inherit;\r\n color: inherit;\r\n text-align: left;\r\n}\r\n.cv-detail-row:first-child { border-top: none; }\r\n.cv-detail-row--action {\r\n cursor: pointer;\r\n transition: background 0.12s ease;\r\n}\r\n.cv-detail-row--action:hover { background: var(--cv-surface); }\r\n.cv-detail-row-icon {\r\n display: flex;\r\n align-items: center;\r\n justify-content: center;\r\n width: 32px;\r\n height: 32px;\r\n border-radius: 999px;\r\n background: var(--cv-surface-2);\r\n /*\r\n Without this the circle nearly vanishes into its own row: `--cv-surface-2` measures only ~1.1:1\r\n against the row's rest-state background and ~1.05:1 against `--cv-surface`, the color\r\n `.cv-detail-row--action:hover` sets the ROW to \u2014 both far below a readable boundary, and worse\r\n than `.cv-item-avatar`/`.cv-detail-avatar` above even manage WITH their border (1.18:1 light /\r\n 1.57:1 dark). Same token, same fix, same reason.\r\n */\r\n border: 1px solid var(--cv-border-strong);\r\n color: var(--cv-muted);\r\n flex-shrink: 0;\r\n}\r\n.cv-detail-row-text { flex: 1; min-width: 0; display: flex; flex-direction: column; }\r\n.cv-detail-row-eyebrow {\r\n font-size: 0.68rem;\r\n font-weight: 600;\r\n text-transform: uppercase;\r\n letter-spacing: 0.03em;\r\n color: var(--cv-muted);\r\n}\r\n.cv-detail-row-value {\r\n font-size: 0.85rem;\r\n font-weight: 500;\r\n color: var(--cv-text);\r\n white-space: nowrap;\r\n overflow: hidden;\r\n text-overflow: ellipsis;\r\n}\r\n.cv-detail-row-chevron { color: var(--cv-faint); flex-shrink: 0; }\r\n/* A second line under a row's value, for two facts that would each be cut off sharing one line (\"Llamada desde\":\r\n the name the org gave the number, then the number). */\r\n.cv-detail-row-sub {\r\n display: block;\r\n font-size: 0.75rem;\r\n font-weight: 400;\r\n color: var(--cv-muted);\r\n overflow: hidden;\r\n text-overflow: ellipsis;\r\n}\r\n\r\n.cv-detail-foot { flex-shrink: 0; padding: 0.85rem 1.25rem 1.1rem; }\r\n.cv-detail-call { width: 100%; display: flex; align-items: center; justify-content: center; gap: 0.4rem; }\r\n\r\n/* \u2500\u2500 Settings tab (device selection, SPEC \xA77 Phase 2) \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */\r\n.cv-settings-body {\r\n flex: 1;\r\n min-height: 0;\r\n overflow-y: auto;\r\n padding: 1rem;\r\n display: flex;\r\n flex-direction: column;\r\n /* Generous separation BETWEEN sections, deliberately larger than any gap inside one \u2014 grouping\r\n only reads as grouping if the space between groups is clearly bigger than the space within one\r\n (see impeccable's layout guidance: \"tight grouping, generous separation\"). */\r\n gap: 1.5rem;\r\n}\r\n\r\n/*\r\n One labeled group (`SettingsSection`): a title, and a bordered body holding its rows. Ajustes\r\n started as a flat list of two rows with nothing to say they were related \u2014 fine for exactly two\r\n rows, unreadable the moment an unrelated third setting lands with nothing to tell it apart from\r\n the device rows above it.\r\n\r\n The body is ONE card, not a card per row: `.cv-settings-row`/`.cv-settings-note` below carry no\r\n border or background of their own, only a divider between siblings \u2014 the same shape\r\n `.cv-detail-rows`/`.cv-detail-row` already use elsewhere in this file, and deliberately not a\r\n stack of individually-bordered cards (nested-card territory).\r\n*/\r\n.cv-settings-section { display: flex; flex-direction: column; gap: 0.5rem; }\r\n.cv-settings-section-title {\r\n margin: 0;\r\n padding: 0 0.2rem;\r\n font-size: 0.7rem;\r\n font-weight: 700;\r\n text-transform: uppercase;\r\n letter-spacing: 0.04em;\r\n color: var(--cv-muted);\r\n}\r\n.cv-settings-section-body {\r\n border: 1px solid var(--cv-border);\r\n border-radius: 14px;\r\n background: var(--cv-bg);\r\n overflow: hidden;\r\n}\r\n.cv-settings-section-body > * { padding: 0.75rem 0.85rem; }\r\n.cv-settings-section-body > *:not(:first-child) { border-top: 1px solid var(--cv-border); }\r\n\r\n.cv-settings-row { display: flex; align-items: center; gap: 0.7rem; }\r\n/* Same treatment as `.cv-detail-row-icon`, same reason \u2014 see its own comment on why the border is\r\n load-bearing: `--cv-surface-2` alone nearly vanishes into the section's own background. */\r\n.cv-settings-row-icon {\r\n display: flex;\r\n align-items: center;\r\n justify-content: center;\r\n width: 32px;\r\n height: 32px;\r\n border-radius: 999px;\r\n background: var(--cv-surface-2);\r\n border: 1px solid var(--cv-border-strong);\r\n color: var(--cv-muted);\r\n flex-shrink: 0;\r\n}\r\n.cv-settings-row-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 0.35rem; }\r\n/* Same pairing as `.cv-detail-row-eyebrow` (`--cv-muted` on `--cv-bg`), verified there already. */\r\n.cv-settings-row-label {\r\n font-size: 0.68rem;\r\n font-weight: 600;\r\n text-transform: uppercase;\r\n letter-spacing: 0.03em;\r\n color: var(--cv-muted);\r\n}\r\n.cv-settings-select {\r\n width: 100%;\r\n padding: 0.45rem 0.6rem;\r\n border-radius: 8px;\r\n border: 1px solid var(--cv-border-strong);\r\n background: var(--cv-surface);\r\n color: var(--cv-text);\r\n font: inherit;\r\n font-size: 0.85rem;\r\n transition: border-color 0.15s ease, background 0.15s ease;\r\n}\r\n.cv-settings-select:focus { outline: none; border-color: var(--cv-accent); background: var(--cv-bg); }\r\n.cv-settings-empty { font-size: 0.85rem; color: var(--cv-muted); }\r\n\r\n/* `--cv-danger-strong` is the AS-TEXT danger token (see its definition): red-600 on the light `--cv-bg`,\r\n red-400 on the dark one. */\r\n.cv-settings-error { margin: 0.6rem 0.2rem 0; font-size: 0.78rem; line-height: 1.4; color: var(--cv-danger-strong); }\r\n/* Why the choice cannot change right now, and until when (N\xFAmero de salida). Calm, like the dialpad's notice: the\r\n phone keeps working. Above the list, so it is in sight of the row just tapped. */\r\n.cv-settings-notice {\r\n margin: 0 0 0.75rem;\r\n padding: 0.6rem 0.75rem;\r\n border-radius: 10px;\r\n background: var(--cv-surface-2);\r\n color: var(--cv-text);\r\n font-size: 0.78rem;\r\n line-height: 1.4;\r\n}\r\n.cv-settings-notice[data-kind='error'] { color: var(--cv-danger-strong); }\r\n\r\n/*\r\n Ajustes as a list (custom-ringtone.md \xA74.6, revised 2026-10-14): each row names a setting, shows its CURRENT\r\n value under the name, and opens a page. Same icon circle and dividers as the device rows above (they live in\r\n the same `.cv-settings-section-body`, which supplies the padding and the dividers), same chevron as\r\n `.cv-detail-row--action` \u2014 one row vocabulary across the widget.\r\n*/\r\n.cv-settings-nav {\r\n display: flex;\r\n align-items: center;\r\n gap: 0.7rem;\r\n width: 100%;\r\n border: none;\r\n background: none;\r\n font: inherit;\r\n color: inherit;\r\n text-align: left;\r\n}\r\nbutton.cv-settings-nav { cursor: pointer; transition: background 0.12s ease; }\r\nbutton.cv-settings-nav:hover { background: var(--cv-surface); }\r\nbutton.cv-settings-nav:focus-visible { outline: 2px solid var(--cv-accent); outline-offset: -2px; }\r\n.cv-settings-nav-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 0.1rem; }\r\n.cv-settings-nav-title { font-size: 0.88rem; font-weight: 600; color: var(--cv-text); }\r\n/* One line, cut with an ellipsis \u2014 the full device name is on its page. `--cv-muted` on `--cv-bg` is the\r\n pairing already verified for `.cv-settings-note`. The static row (a note, no page) may wrap instead. */\r\n.cv-settings-nav-value {\r\n font-size: 0.8rem;\r\n color: var(--cv-muted);\r\n overflow: hidden;\r\n text-overflow: ellipsis;\r\n white-space: nowrap;\r\n}\r\n.cv-settings-nav--static .cv-settings-nav-value { white-space: normal; line-height: 1.45; }\r\n.cv-settings-nav-chevron { flex-shrink: 0; color: var(--cv-muted); }\r\n\r\n/* A settings page: the `.cv-detail` overlay (entrance, back button, reduced motion all inherited) with a\r\n scrolling body of its own. */\r\n.cv-settings-page-body { flex: 1; min-height: 0; overflow-y: auto; padding: 0.25rem 1rem 1rem; }\r\n.cv-settings-page-title {\r\n margin: 0.15rem 0.2rem 0.35rem;\r\n font-size: 1.05rem;\r\n font-weight: 700;\r\n letter-spacing: -0.01em;\r\n color: var(--cv-text);\r\n}\r\n/* Focus lands here on open (for keyboard and screen-reader users); a ring on a heading would only look\r\n like a stray box to everyone else. */\r\n.cv-settings-page-title:focus { outline: none; }\r\n.cv-settings-page-intro { margin: 0 0.2rem 0.85rem; font-size: 0.8rem; line-height: 1.45; color: var(--cv-muted); }\r\n.cv-settings-page-empty { margin: 0; padding: 0 0.2rem; font-size: 0.85rem; color: var(--cv-muted); }\r\n\r\n/* The checkmark list: one card like `.cv-settings-section-body`, a row per choice. */\r\n.cv-choices {\r\n border: 1px solid var(--cv-border);\r\n border-radius: 14px;\r\n background: var(--cv-bg);\r\n overflow: hidden;\r\n}\r\n.cv-choice {\r\n position: relative;\r\n display: flex;\r\n align-items: center;\r\n gap: 0.6rem;\r\n min-height: 44px;\r\n padding: 0.6rem 0.85rem;\r\n cursor: pointer;\r\n transition: background 0.12s ease;\r\n}\r\n.cv-choice + .cv-choice { border-top: 1px solid var(--cv-border); }\r\n.cv-choice:hover { background: var(--cv-surface); }\r\n/* The real control: a native radio, kept in the accessibility tree and keyboard order, drawn by the row. */\r\n.cv-choice-input {\r\n position: absolute;\r\n opacity: 0;\r\n width: 1px;\r\n height: 1px;\r\n margin: 0;\r\n pointer-events: none;\r\n}\r\n.cv-choice:has(.cv-choice-input:focus-visible) { outline: 2px solid var(--cv-accent); outline-offset: -2px; }\r\n.cv-choice-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 0.1rem; }\r\n.cv-choice-label { font-size: 0.88rem; color: var(--cv-text); overflow-wrap: anywhere; }\r\n.cv-choice-sub { font-size: 0.78rem; color: var(--cv-muted); }\r\n.cv-choice[data-checked] .cv-choice-label { font-weight: 600; }\r\n.cv-choice-check { flex-shrink: 0; color: var(--cv-accent-strong); visibility: hidden; }\r\n.cv-choice[data-checked] .cv-choice-check { visibility: visible; }\r\n.cv-choice-playing { display: inline-flex; flex-shrink: 0; color: var(--cv-accent-strong); }\r\n/* A tagged choice (N\xFAmero de salida): the label and its tag on one line, like the dialpad's list. */\r\n.cv-choice-line { display: flex; align-items: center; gap: 0.35rem; min-width: 0; }\r\n/* Locked while a change is in flight or must wait: the chosen row stays clear, the others step back. */\r\n.cv-choice[data-disabled] { cursor: default; }\r\n.cv-choice[data-disabled]:not([data-checked]) { opacity: 0.55; }\r\n.cv-choice[data-disabled]:hover { background: none; }\r\n.cv-choice-applying { display: inline-flex; flex-shrink: 0; color: var(--cv-muted); }\r\n/* Exempt from reduced-motion like `.cv-empty-spinner`: the rotation is the information. */\r\n.cv-choice-applying-icon { animation: cv-spin 0.8s linear infinite; }\r\n\r\n.cv-settings-test,\r\n.cv-settings-retry {\r\n display: inline-flex;\r\n align-items: center;\r\n gap: 0.4rem;\r\n}\r\n.cv-settings-test { margin-top: 0.85rem; }\r\n.cv-settings-retry { margin-top: 0.6rem; }\r\n\r\n/* Visually hidden, still read aloud. */\r\n.cv-sr-only {\r\n position: absolute;\r\n width: 1px;\r\n height: 1px;\r\n overflow: hidden;\r\n clip-path: inset(50%);\r\n white-space: nowrap;\r\n}\r\n/* `--cv-muted` on `--cv-bg` \u2014 4.83:1 light / 6.97:1 dark, computed fresh for THIS pairing (the note\r\n used to sit on `--cv-surface` with its own card; now it sits directly on the section's `--cv-bg`,\r\n a different background that earns its own check rather than inheriting the old one's number). */\r\n.cv-settings-note {\r\n margin: 0;\r\n color: var(--cv-muted);\r\n font-size: 0.8rem;\r\n line-height: 1.5;\r\n}\r\n\r\n/* \u2500\u2500 Centred states (mic gate) \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */\r\n.cv-center {\r\n flex: 1;\r\n display: flex;\r\n flex-direction: column;\r\n align-items: center;\r\n justify-content: center;\r\n gap: 0.85rem;\r\n padding: 1.75rem;\r\n text-align: center;\r\n}\r\n.cv-center p { color: var(--cv-muted); margin: 0; font-size: 0.85rem; line-height: 1.5; }\r\n\r\n\r\n/* \"C\xF3mo permitirlo\" \u2014 a native <details> disclosure.\r\n Collapsed by default: the people who already know where the padlock is should not have to read\r\n past three steps to get there, and the people who don't get them without leaving the app. */\r\n.cv-help {\r\n width: 100%;\r\n margin-top: 0.15rem;\r\n text-align: left;\r\n}\r\n.cv-help summary {\r\n display: inline-flex;\r\n align-items: center;\r\n gap: 0.3rem;\r\n justify-content: center;\r\n width: 100%;\r\n padding: 0.3rem;\r\n border-radius: 8px;\r\n color: var(--cv-muted);\r\n font: 500 0.75rem var(--cv-font);\r\n cursor: pointer;\r\n list-style: none; /* hide the default triangle; the icon is the affordance */\r\n transition: color 0.15s ease, background 0.15s ease;\r\n}\r\n.cv-help summary::-webkit-details-marker { display: none; }\r\n.cv-help summary:hover { color: var(--cv-text); background: var(--cv-surface-2); }\r\n.cv-help[open] summary { color: var(--cv-text); margin-bottom: 0.35rem; }\r\n\r\n.cv-help ol {\r\n margin: 0;\r\n padding: 0.6rem 0.7rem 0.6rem 1.6rem;\r\n background: var(--cv-surface);\r\n border-radius: 10px;\r\n color: var(--cv-muted);\r\n font-size: 0.73rem;\r\n line-height: 1.55;\r\n}\r\n.cv-help li + li { margin-top: 0.3rem; }\r\n.cv-help li::marker { color: var(--cv-faint); font-variant-numeric: tabular-nums; }\r\n\r\n.cv-help a {\r\n display: inline-flex;\r\n align-items: center;\r\n gap: 0.25rem;\r\n margin-top: 0.45rem;\r\n padding-left: 0.1rem;\r\n color: var(--cv-accent-strong);\r\n font-size: 0.73rem;\r\n font-weight: 500;\r\n text-decoration: none;\r\n}\r\n.cv-help a:hover { text-decoration: underline; }\r\n\r\n/* The panel is the only thing that moves, and only when opened by hand \u2014 so it animates. */\r\n.cv-help[open] ol {\r\n animation: cv-gate-in 200ms var(--cv-ease-out) both;\r\n}\r\n@media (prefers-reduced-motion: reduce) {\r\n .cv-help[open] ol { animation: none; }\r\n}\r\n\r\n/* \u2500\u2500 The permission gate \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\r\n Four states, and only ONE of them deserves a designed screen.\r\n\r\n `checking` resolves in ~100\u2013400 ms. Rendering it immediately means the user\r\n sees text appear and vanish inside a blink \u2014 a flash reads as jank, not as\r\n information. So it is delayed 450 ms with `both` fill: invisible during the\r\n delay, and if the check finishes first (the usual case, and always the case\r\n when permission is already granted) it is never painted at all.\r\n\r\n `prompting` is the one the user actually reads and acts on. It gets the\r\n hierarchy: mark, title, reason, action.\r\n \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */\r\n.cv-gate {\r\n flex: 1;\r\n min-height: 0;\r\n display: flex;\r\n flex-direction: column;\r\n align-items: center;\r\n justify-content: center;\r\n gap: 0.6rem;\r\n padding: 1.5rem 1.75rem;\r\n text-align: center;\r\n}\r\n\r\n/* The disc echoes the call avatar \u2014 one visual language, not two. */\r\n.cv-gate-mark {\r\n display: grid;\r\n place-items: center;\r\n width: 52px;\r\n height: 52px;\r\n border-radius: 999px;\r\n background: var(--cv-accent-soft);\r\n color: var(--cv-accent-strong);\r\n margin-bottom: 0.15rem;\r\n}\r\n.cv-gate[data-tone='danger'] .cv-gate-mark {\r\n background: var(--cv-danger-soft);\r\n color: var(--cv-danger);\r\n}\r\n\r\n.cv-gate-title {\r\n margin: 0;\r\n font: 600 0.95rem var(--cv-font);\r\n color: var(--cv-text);\r\n letter-spacing: -0.01em;\r\n}\r\n.cv-gate p {\r\n margin: 0;\r\n color: var(--cv-muted);\r\n font-size: 0.8rem;\r\n line-height: 1.5;\r\n max-width: 24ch; /* two comfortable lines, not one long one */\r\n}\r\n.cv-gate .cv-btn { margin-top: 0.5rem; }\r\n\r\n/* Entrance. Staggered 45 ms apart: the eye follows mark \u2192 title \u2192 reason \u2192\r\n action, which is the order it needs to read them in anyway. */\r\n.cv-gate > * {\r\n animation: cv-gate-in 260ms var(--cv-ease-out) both;\r\n}\r\n.cv-gate > *:nth-child(2) { animation-delay: 45ms; }\r\n.cv-gate > *:nth-child(3) { animation-delay: 90ms; }\r\n.cv-gate > *:nth-child(4) { animation-delay: 135ms; }\r\n\r\n@keyframes cv-gate-in {\r\n from { opacity: 0; transform: translateY(6px); }\r\n to { opacity: 1; transform: none; }\r\n}\r\n\r\n/* The checking state: held back, then a quiet fade. No stagger, no movement \u2014\r\n it is a status, not a screen, and it should barely register. */\r\n.cv-gate[data-state='checking'] > *,\r\n.cv-gate[data-state='warming'] > * {\r\n animation: cv-gate-wait 200ms var(--cv-ease-out) 450ms both;\r\n}\r\n@keyframes cv-gate-wait {\r\n from { opacity: 0; }\r\n to { opacity: 1; }\r\n}\r\n/* A slow breath rather than a spinner: a spinner promises a long wait, and this\r\n is not one. */\r\n.cv-gate[data-state='checking'] .cv-gate-mark,\r\n.cv-gate[data-state='warming'] .cv-gate-mark {\r\n background: var(--cv-surface-2);\r\n color: var(--cv-muted);\r\n animation: cv-gate-wait 200ms var(--cv-ease-out) 450ms both,\r\n cv-breathe 1.8s ease-in-out 450ms infinite;\r\n}\r\n@keyframes cv-breathe {\r\n 0%, 100% { opacity: 1; }\r\n 50% { opacity: 0.45; }\r\n}\r\n\r\n/* Reduced motion: keep the fade and \u2014 critically \u2014 keep the DELAY, which is\r\n timing rather than motion and is the whole point. Drop the travel. */\r\n@media (prefers-reduced-motion: reduce) {\r\n .cv-gate > * {\r\n animation: cv-gate-wait 200ms var(--cv-ease-out) both;\r\n }\r\n .cv-gate[data-state='checking'] .cv-gate-mark,\r\n .cv-gate[data-state='warming'] .cv-gate-mark {\r\n animation: cv-gate-wait 200ms var(--cv-ease-out) 450ms both;\r\n }\r\n}\r\n\r\n@media (prefers-reduced-motion: reduce) {\r\n .cv-avatar-ping,\r\n .cv-timer i { animation: none; }\r\n .cv-softphone *,\r\n .cv-softphone *::before { transition-duration: 0.01ms !important; }\r\n}\r\n\r\n/* `*` and `#` stay in the grid \u2014 a keypad without them is not a keypad \u2014 but they are not part of a\r\n number (toE164 keeps digits only). Dimmed rather than `disabled` so the grid still reads as a\r\n keypad and the glyphs stay legible; they become live DTMF on the in-call screen. */\r\n.cv-key[data-dialable='false'] {\r\n cursor: default;\r\n}\r\n.cv-key[data-dialable='false'] b {\r\n color: var(--cv-faint);\r\n}\r\n.cv-key[data-dialable='false']:hover {\r\n background: none;\r\n}\r\n.cv-key[data-dialable='false']:active {\r\n transform: none;\r\n}\r\n\r\n/* \u2500\u2500 Country picker \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\r\n The prefix chip + its list. Sits where the old left spacer was, so the number\r\n stays optically centred against the 36px erase button on the right.\r\n\r\n The popover is absolutely positioned inside the widget rather than portalled:\r\n there is nowhere to portal TO inside a shadow root, and the widget already owns\r\n its stacking context. That also means it cannot be clipped by a host's\r\n `overflow:hidden` \u2014 the failure SPEC \xA72.6 lists for the CRM's Radix version.\r\n \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */\r\n/* The anchor spans the whole ROW, not just the chip.\r\n With the chip centred, anchoring to the chip put the popover's left edge at ~120px and its right\r\n edge past the widget \u2014 clipped by `.cv-softphone { overflow: hidden }`, which is the classic\r\n absolute-inside-overflow bug. Anchoring to the full row makes overflowing arithmetically\r\n impossible: `left:0; right:0` cannot be wider than the row that contains it. */\r\n.cv-cp {\r\n position: relative;\r\n display: flex;\r\n justify-content: center;\r\n width: 100%;\r\n}\r\n/* A PILL, with a resting surface and a border.\r\n This was `border: none; background: none` \u2014 invisible until hover, so it read as a label rather\r\n than a control. That was survivable when it sat inline beside the number; alone on its own row it\r\n is just floating text, and nothing says \"you can change this\". A control that changes state has to\r\n look like one at rest, not only under a cursor that may never arrive (touch has no hover at all). */\r\n.cv-cp-chip {\r\n display: inline-flex;\r\n align-items: center;\r\n gap: 0.3rem;\r\n height: 30px;\r\n padding: 0 0.5rem 0 0.4rem;\r\n border: 1px solid var(--cv-border-strong);\r\n border-radius: 999px;\r\n background: var(--cv-surface);\r\n color: var(--cv-text);\r\n font: 600 0.8rem var(--cv-font);\r\n cursor: pointer;\r\n transition: background 0.15s, border-color 0.15s;\r\n}\r\n.cv-cp-chip:hover { background: var(--cv-surface-2); }\r\n.cv-cp-chip:active { transform: scale(0.95); }\r\n/* Open: the chip is the thing the list belongs to, so it stays visibly engaged while the list is up. */\r\n.cv-cp-chip[aria-expanded='true'] {\r\n background: var(--cv-accent-soft);\r\n border-color: var(--cv-accent);\r\n}\r\n.cv-cp-dial {\r\n font-variant-numeric: tabular-nums;\r\n letter-spacing: -0.02em;\r\n}\r\n.cv-cp-caret {\r\n color: var(--cv-faint);\r\n flex-shrink: 0;\r\n transition: transform 0.18s cubic-bezier(0.2, 0, 0.2, 1);\r\n}\r\n.cv-cp-caret[data-open='true'] { transform: rotate(180deg); }\r\n\r\n/* The country mark. TWO designed states in ONE 20\xD714 box (a flag's own 3:2), so the chip and every\r\n row keep their rhythm whichever is showing \u2014 nothing reflows when the flags land. The plate is the\r\n LOADING state (flags are a lazy import) and the offline state, not a fallback: there is no flash of\r\n something broken, only a designed plate becoming a designed flag, once per session.\r\n `::part(country-mark)` lets a host restyle either. */\r\n.cv-mark {\r\n width: 20px;\r\n height: 14px;\r\n flex-shrink: 0;\r\n display: inline-flex;\r\n align-items: center;\r\n justify-content: center;\r\n font-size: 14px;\r\n line-height: 1;\r\n font-family: 'Apple Color Emoji', 'Segoe UI Emoji', 'Noto Color Emoji', var(--cv-font);\r\n}\r\n/* The SVG fills the slot exactly; 3x2 is the flag aspect, so nothing is letterboxed or cropped. */\r\n.cv-mark-svg {\r\n width: 100%;\r\n height: 100%;\r\n display: block;\r\n border-radius: 2px;\r\n object-fit: cover;\r\n}\r\n.cv-mark[data-plate='true'] {\r\n /* The ISO code set into the slot a flag will occupy. */\r\n font-family: var(--cv-font);\r\n font-size: 8.5px;\r\n font-weight: 700;\r\n letter-spacing: 0.04em;\r\n color: var(--cv-text);\r\n background: var(--cv-surface-2);\r\n border: 1px solid var(--cv-border);\r\n border-radius: 3px;\r\n /* Cap-height letters sit optically high in a 14px box; nudge them back to centre. */\r\n padding-top: 1px;\r\n}\r\n\r\n.cv-cp-pop {\r\n position: absolute;\r\n top: calc(100% + 6px);\r\n /* Pinned to BOTH row edges, so it is bounded by the container by construction \u2014 no width guess,\r\n no media query, nothing to clip. `max-width` keeps it from looking stretched on a wide host. */\r\n left: 0;\r\n right: 0;\r\n margin-inline: auto;\r\n max-width: 260px;\r\n z-index: 20;\r\n display: flex;\r\n flex-direction: column;\r\n background: var(--cv-surface);\r\n border: 1px solid var(--cv-border);\r\n border-radius: var(--cv-radius);\r\n box-shadow: var(--cv-shadow);\r\n overflow: hidden;\r\n /* Grows from the chip it belongs to, rather than appearing on top of it. */\r\n transform-origin: top center;\r\n animation: cv-cp-in 0.14s cubic-bezier(0.2, 0, 0.2, 1);\r\n}\r\n@keyframes cv-cp-in {\r\n from { opacity: 0; transform: translateY(-4px) scale(0.97); }\r\n to { opacity: 1; transform: none; }\r\n}\r\n@media (prefers-reduced-motion: reduce) {\r\n .cv-cp-pop { animation: none; }\r\n .cv-cp-caret { transition: none; }\r\n}\r\n.cv-cp-search {\r\n flex-shrink: 0;\r\n padding: 0.5rem 0.65rem;\r\n border: none;\r\n border-bottom: 1px solid var(--cv-border);\r\n background: none;\r\n color: var(--cv-text);\r\n font: 400 0.8rem var(--cv-font);\r\n outline: none;\r\n}\r\n.cv-cp-search::placeholder { color: var(--cv-faint); }\r\n/* Both states named explicitly. In the CRM the widget mounts via `/ui`, i.e. in the LIGHT DOM \u2014 none\r\n of the shadow-DOM isolation the web-component playground proves applies there, so a host's focus\r\n ring (or the browser's own) can land on our input. The accent underline IS the focus indicator. */\r\n.cv-cp-search:focus,\r\n.cv-cp-search:focus-visible {\r\n outline: none;\r\n border-bottom-color: var(--cv-accent);\r\n border-bottom-width: 2px;\r\n padding-bottom: calc(0.5rem - 1px);\r\n}\r\n.cv-cp-list {\r\n overflow-y: auto;\r\n max-height: 220px;\r\n padding: 0.25rem;\r\n}\r\n.cv-cp-item {\r\n width: 100%;\r\n display: flex;\r\n align-items: center;\r\n gap: 0.5rem;\r\n padding: 0.4rem 0.45rem;\r\n border: none;\r\n border-radius: calc(var(--cv-radius) - 4px);\r\n background: none;\r\n color: var(--cv-text);\r\n font: 400 0.8rem var(--cv-font);\r\n text-align: left;\r\n cursor: pointer;\r\n}\r\n.cv-cp-item:hover { background: var(--cv-surface-2); }\r\n/* The current country is stated by the row, not only by a tick at the far right. */\r\n.cv-cp-item[aria-selected='true'] { background: var(--cv-accent-soft); }\r\n.cv-cp-item[aria-selected='true'] .cv-cp-name { font-weight: 600; }\r\n.cv-cp-name {\r\n flex: 1;\r\n min-width: 0;\r\n overflow: hidden;\r\n text-overflow: ellipsis;\r\n white-space: nowrap;\r\n}\r\n.cv-cp-item .cv-cp-dial {\r\n color: var(--cv-muted);\r\n font-weight: 400;\r\n}\r\n.cv-cp-check { color: var(--cv-accent-strong); flex-shrink: 0; }\r\n.cv-cp-check[data-on='false'] { opacity: 0; }\r\n.cv-cp-empty {\r\n margin: 0;\r\n padding: 1rem 0.5rem;\r\n text-align: center;\r\n color: var(--cv-muted);\r\n font-size: 0.78rem;\r\n}\r\n\r\n/* \u2500\u2500 \"Llamar desde\" (outbound-number-per-agent.md \xA75.5) \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */\r\n/* \"Llamar desde: Oficina \u25BE\" \u2014 a light line right above the number field, as the providers' dialers label their\r\n caller ID (\"Caller ID: \u2026 \u25BE\", \"Outbound on: \u2026 \u25BE\", \"From: \u2026 \u25BE\"; outbound-number-per-agent.md \xA75.5, 2026-10-26). Not a\r\n strip with a divider: under the host's own header that read as a second title bar. The line is the positioned\r\n ancestor, so its list and callout drop under it. */\r\n.cv-on {\r\n position: relative;\r\n flex-shrink: 0;\r\n display: flex;\r\n padding: 0.9rem 1rem 0.4rem;\r\n}\r\n.cv-on-chip {\r\n display: inline-flex;\r\n align-items: center;\r\n gap: 0.3rem;\r\n max-width: 100%;\r\n min-width: 0;\r\n height: 26px;\r\n margin-left: -0.3rem;\r\n padding: 0 0.3rem;\r\n border: 0;\r\n border-radius: 6px;\r\n background: none;\r\n color: var(--cv-text);\r\n font: 0.8rem var(--cv-font);\r\n text-align: left;\r\n cursor: pointer;\r\n transition: background 0.15s;\r\n}\r\n.cv-on-chip:hover { background: var(--cv-surface-2); }\r\n.cv-on-chip:focus-visible { outline: 2px solid var(--cv-accent); outline-offset: 0; }\r\n.cv-on-label { flex-shrink: 0; color: var(--cv-muted); }\r\n.cv-on-chip .cv-on-current { font-weight: 600; }\r\n.cv-on-icon { color: var(--cv-accent-strong); flex-shrink: 0; }\r\n.cv-on-spin { animation: cv-spin 0.9s linear infinite; }\r\n@media (prefers-reduced-motion: reduce) {\r\n .cv-on-spin { animation: none; }\r\n}\r\n.cv-on-current {\r\n min-width: 0;\r\n overflow: hidden;\r\n text-overflow: ellipsis;\r\n white-space: nowrap;\r\n}\r\n/* Drops under the strip, over the number and the keypad, inset to the strip's edges. Capped so that in the CRM's\r\n 473px panel it never reaches the tab bar: the LIST gives way (it scrolls), never the title or a refusal message. */\r\n.cv-on-pop {\r\n top: calc(100% + 4px);\r\n left: 0.5rem;\r\n right: 0.5rem;\r\n max-width: none;\r\n max-height: 330px;\r\n}\r\n.cv-on-pop .cv-cp-list {\r\n flex: 1 1 auto;\r\n min-height: 0;\r\n max-height: none;\r\n}\r\n.cv-on-title {\r\n flex-shrink: 0;\r\n margin: 0;\r\n padding: 0.5rem 0.75rem 0.4rem;\r\n border-bottom: 1px solid var(--cv-border);\r\n font: 600 0.7rem var(--cv-font);\r\n letter-spacing: 0.06em;\r\n text-transform: uppercase;\r\n color: var(--cv-muted);\r\n}\r\n.cv-on-item { align-items: flex-start; }\r\n/* Locked while a change is applying or the limit says wait: still legible (the choice is visible), not usable. */\r\n.cv-on-item[aria-disabled='true'] { cursor: default; }\r\n.cv-on-item[aria-disabled='true']:not([aria-selected='true']) { opacity: 0.55; }\r\n.cv-on-item[aria-disabled='true']:not([aria-selected='true']):hover { background: none; }\r\n.cv-on-text {\r\n flex: 1;\r\n min-width: 0;\r\n display: flex;\r\n flex-direction: column;\r\n gap: 1px;\r\n}\r\n.cv-on-line {\r\n display: flex;\r\n align-items: center;\r\n gap: 0.35rem;\r\n min-width: 0;\r\n}\r\n.cv-on-sub {\r\n color: var(--cv-muted);\r\n font-size: 0.74rem;\r\n font-variant-numeric: tabular-nums;\r\n}\r\n/* A quiet, neutral pill: it tells the agent what the number is for, it is not a warning. Shared with Ajustes. */\r\n.cv-on-tag,\r\n.cv-choice-tag {\r\n flex-shrink: 0;\r\n padding: 0 0.35rem;\r\n border: 1px solid var(--cv-border-strong);\r\n border-radius: 999px;\r\n color: var(--cv-muted);\r\n font-size: 0.66rem;\r\n font-weight: 600;\r\n line-height: 1.4;\r\n}\r\n/* The usage rule IS information (when not to call from this number): --cv-muted, not --cv-faint, which is under\r\n 4.5:1 at this size in both themes (see `.cv-empty-sub`). */\r\n.cv-on-hint,\r\n.cv-choice-hint {\r\n color: var(--cv-muted);\r\n font-size: 0.7rem;\r\n line-height: 1.3;\r\n}\r\n.cv-on-item .cv-cp-check { margin-top: 2px; }\r\n/* Why a change cannot happen right now, and until when. Calm, not alarming: the phone keeps working. */\r\n.cv-on-notice {\r\n flex-shrink: 0;\r\n margin: 0;\r\n padding: 0.55rem 0.75rem;\r\n border-top: 1px solid var(--cv-border);\r\n background: var(--cv-surface-2);\r\n color: var(--cv-text);\r\n font-size: 0.74rem;\r\n line-height: 1.4;\r\n}\r\n.cv-on-notice[data-kind='error'] { color: var(--cv-danger-strong); }\r\n/* A change that did not go through, after the (optimistic) list already closed: the same words, where the list\r\n was (under the strip). Same place and surface as the list; dismissed by a tap elsewhere, when the wait is over,\r\n or after a few seconds. */\r\n.cv-on-callout {\r\n position: absolute;\r\n top: calc(100% + 4px);\r\n left: 0.5rem;\r\n right: 0.5rem;\r\n margin: 0;\r\n z-index: 20;\r\n padding: 0.6rem 0.75rem;\r\n background: var(--cv-surface);\r\n border: 1px solid var(--cv-border);\r\n border-radius: var(--cv-radius);\r\n box-shadow: var(--cv-shadow);\r\n color: var(--cv-text);\r\n font-size: 0.74rem;\r\n line-height: 1.4;\r\n transform-origin: top center;\r\n animation: cv-cp-in 0.14s cubic-bezier(0.2, 0, 0.2, 1);\r\n}\r\n.cv-on-callout[data-kind='error'] { color: var(--cv-danger-strong); }\r\n@media (prefers-reduced-motion: reduce) {\r\n .cv-on-callout { animation: none; }\r\n}\r\n";
|
|
10654
11230
|
|
|
10655
11231
|
// src/element/index.ts
|
|
10656
11232
|
var EVENTS = {
|
|
@@ -10827,9 +11403,9 @@ var CoventiaSoftphoneElement = class extends HTMLElement {
|
|
|
10827
11403
|
...this.#config.incomingCallAction ? { incomingCallAction: this.#config.incomingCallAction } : {}
|
|
10828
11404
|
};
|
|
10829
11405
|
this.#root.render(
|
|
10830
|
-
(0,
|
|
11406
|
+
(0, import_react46.createElement)(
|
|
10831
11407
|
SoftphoneProvider,
|
|
10832
|
-
{ softphone: this.#softphone, children: (0,
|
|
11408
|
+
{ softphone: this.#softphone, children: (0, import_react46.createElement)(SoftphoneWidget, widgetProps) }
|
|
10833
11409
|
)
|
|
10834
11410
|
);
|
|
10835
11411
|
}
|