callix-dialer-widget 1.3.14 → 1.3.15
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.
|
@@ -52834,19 +52834,20 @@ if (!globalTwind.__twindInitialized) {
|
|
|
52834
52834
|
const API_BASE_URL$1 = typeof window !== "undefined" ? window.__CALLIX_API_BASE_URL__ || (window.location.origin.includes("localhost") ? window.location.origin : "https://callix-zeta.vercel.app") : "";
|
|
52835
52835
|
function getSessionToken$1() {
|
|
52836
52836
|
if (typeof window === "undefined") return null;
|
|
52837
|
-
const
|
|
52838
|
-
|
|
52839
|
-
|
|
52840
|
-
|
|
52841
|
-
|
|
52842
|
-
|
|
52843
|
-
|
|
52844
|
-
|
|
52845
|
-
|
|
52846
|
-
|
|
52847
|
-
|
|
52848
|
-
|
|
52849
|
-
|
|
52837
|
+
const lastUsername = localStorage.getItem("callix_dialer_last_username");
|
|
52838
|
+
if (lastUsername) {
|
|
52839
|
+
const sessionKey = `callix_dialer_${lastUsername}_session_token`;
|
|
52840
|
+
const token = localStorage.getItem(sessionKey);
|
|
52841
|
+
if (token) {
|
|
52842
|
+
return token;
|
|
52843
|
+
}
|
|
52844
|
+
}
|
|
52845
|
+
for (let i2 = 0; i2 < localStorage.length; i2++) {
|
|
52846
|
+
const key = localStorage.key(i2);
|
|
52847
|
+
if (key && key.match(/^callix_dialer_.*_session_token$/)) {
|
|
52848
|
+
const token = localStorage.getItem(key);
|
|
52849
|
+
if (token) {
|
|
52850
|
+
return token;
|
|
52850
52851
|
}
|
|
52851
52852
|
}
|
|
52852
52853
|
}
|
|
@@ -55440,28 +55441,31 @@ const API_BASE_URL = typeof window !== "undefined" ? window.__CALLIX_API_BASE_UR
|
|
|
55440
55441
|
function getSessionToken() {
|
|
55441
55442
|
if (typeof window === "undefined") return null;
|
|
55442
55443
|
console.log("[DraggableClientInfoModal] 🔍 Buscando token de sessão no localStorage...");
|
|
55443
|
-
const
|
|
55444
|
-
|
|
55445
|
-
|
|
55446
|
-
|
|
55447
|
-
|
|
55448
|
-
|
|
55449
|
-
|
|
55450
|
-
|
|
55451
|
-
|
|
55452
|
-
|
|
55453
|
-
|
|
55454
|
-
|
|
55455
|
-
|
|
55456
|
-
|
|
55444
|
+
const lastUsername = localStorage.getItem("callix_dialer_last_username");
|
|
55445
|
+
if (lastUsername) {
|
|
55446
|
+
const sessionKey = `callix_dialer_${lastUsername}_session_token`;
|
|
55447
|
+
const token = localStorage.getItem(sessionKey);
|
|
55448
|
+
if (token) {
|
|
55449
|
+
console.log(`[DraggableClientInfoModal] ✅ Token encontrado para usuário "${lastUsername}":`, token.substring(0, 20) + "...");
|
|
55450
|
+
return token;
|
|
55451
|
+
} else {
|
|
55452
|
+
console.log(`[DraggableClientInfoModal] ⚠️ Chave de sessão "${sessionKey}" não encontrada`);
|
|
55453
|
+
}
|
|
55454
|
+
} else {
|
|
55455
|
+
console.log("[DraggableClientInfoModal] ⚠️ callix_dialer_last_username não encontrado");
|
|
55456
|
+
}
|
|
55457
|
+
console.log("[DraggableClientInfoModal] 🔍 Procurando qualquer chave de sessão...");
|
|
55458
|
+
for (let i2 = 0; i2 < localStorage.length; i2++) {
|
|
55459
|
+
const key = localStorage.key(i2);
|
|
55460
|
+
if (key && key.match(/^callix_dialer_.*_session_token$/)) {
|
|
55461
|
+
const token = localStorage.getItem(key);
|
|
55462
|
+
if (token) {
|
|
55463
|
+
console.log(`[DraggableClientInfoModal] ✅ Token encontrado na chave "${key}":`, token.substring(0, 20) + "...");
|
|
55457
55464
|
return token;
|
|
55458
|
-
} catch {
|
|
55459
|
-
console.log("[DraggableClientInfoModal] ✅ Token (string direto):", (value == null ? void 0 : value.substring(0, 20)) + "...");
|
|
55460
|
-
return value;
|
|
55461
55465
|
}
|
|
55462
55466
|
}
|
|
55463
55467
|
}
|
|
55464
|
-
console.log("[DraggableClientInfoModal] ⚠️
|
|
55468
|
+
console.log("[DraggableClientInfoModal] ⚠️ Nenhum token encontrado. Chaves disponíveis no localStorage:");
|
|
55465
55469
|
for (let i2 = 0; i2 < localStorage.length; i2++) {
|
|
55466
55470
|
const key = localStorage.key(i2);
|
|
55467
55471
|
if (key) {
|