padorixnpm 0.0.68 → 0.0.70
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/{chat-panel-D34UFlz_.js → chat-panel-BVGlOImf.js} +689 -554
- package/dist/chat-panel-BVGlOImf.js.map +1 -0
- package/dist/chats/chatScreen/chat-container.d.ts.map +1 -1
- package/dist/chats/chatScreen/styles.d.ts +2 -0
- package/dist/chats/chatScreen/styles.d.ts.map +1 -1
- package/dist/chats/chatform/chat-form.d.ts.map +1 -1
- package/dist/chats/chatform/emoji-picker.d.ts +9 -0
- package/dist/chats/chatform/emoji-picker.d.ts.map +1 -0
- package/dist/global.d.ts +1 -0
- package/dist/global.d.ts.map +1 -1
- package/dist/{notification-CbOXgUC2.js → notification-ChYfFRqp.js} +28 -27
- package/dist/notification-ChYfFRqp.js.map +1 -0
- package/dist/padorixnpm.css +1 -1
- package/dist/padorixnpm.js +2 -2
- package/dist/padorixnpm.umd.cjs +9 -9
- package/dist/padorixnpm.umd.cjs.map +1 -1
- package/dist/services/chat-api.d.ts.map +1 -1
- package/dist/services/socket.d.ts +1 -1
- package/dist/services/socket.d.ts.map +1 -1
- package/dist/{widget-api-B4P00FNn.js → widget-api-2bTO9wMA.js} +62 -43
- package/dist/widget-api-2bTO9wMA.js.map +1 -0
- package/package.json +1 -2
- package/dist/chat-panel-D34UFlz_.js.map +0 -1
- package/dist/notification-CbOXgUC2.js.map +0 -1
- package/dist/widget-api-B4P00FNn.js.map +0 -1
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import { A as e, C as t, D as n, E as r, M as i, N as a, O as o, S as s, T as c, _ as l, a as u, b as d, f, g as p, h as m, i as h, j as g, k as _, l as v, m as y, s as b, u as x, v as ee, w as S, x as C, y as w } from "./widget-api-
|
|
2
|
-
import T, { i as E, n as te, r as D, t as ne } from "./notification-
|
|
1
|
+
import { A as e, C as t, D as n, E as r, M as i, N as a, O as o, S as s, T as c, _ as l, a as u, b as d, f, g as p, h as m, i as h, j as g, k as _, l as v, m as y, s as b, u as x, v as ee, w as S, x as C, y as w } from "./widget-api-2bTO9wMA.js";
|
|
2
|
+
import T, { i as E, n as te, r as D, t as ne } from "./notification-ChYfFRqp.js";
|
|
3
3
|
import { useDispatch as O, useSelector as k } from "react-redux";
|
|
4
4
|
import A, { createElement as j, forwardRef as M, useState as N } from "react";
|
|
5
|
-
import { Add as P, ArrowDown2 as F, ArrowForward as
|
|
6
|
-
import { Fade as
|
|
7
|
-
import { Fragment as
|
|
8
|
-
import { MantineProvider as
|
|
9
|
-
import
|
|
10
|
-
import { useDisclosure as
|
|
11
|
-
import { useForm as
|
|
5
|
+
import { Add as P, ArrowDown2 as F, ArrowForward as I, ArrowLeft2 as re, Copy as ie, DocumentDownload as ae, EmojiHappy as oe, Global as L, Minus as se, Send as R, Star1 as ce, Trash as le } from "iconsax-reactjs";
|
|
6
|
+
import { Fade as z, JackInTheBox as ue, Slide as de } from "react-awesome-reveal";
|
|
7
|
+
import { Fragment as B, jsx as V, jsxs as H } from "react/jsx-runtime";
|
|
8
|
+
import { MantineProvider as U, Modal as W, Popover as G } from "@mantine/core";
|
|
9
|
+
import K from "dayjs";
|
|
10
|
+
import { useDisclosure as fe } from "@mantine/hooks";
|
|
11
|
+
import { useForm as pe } from "@mantine/form";
|
|
12
12
|
//#region lib/chats/chatform/chat-text-input.tsx
|
|
13
|
-
var q = 120,
|
|
13
|
+
var q = 120, J = 2500, me = 1500, he = M(({ setMessage: e, message: t, userType: n, onImagePasted: r, onSubmit: i, ...a }, o) => {
|
|
14
14
|
let { sender: s } = k((e) => e.data), c = A.useRef(null), l = A.useRef(0), u = A.useRef(!1);
|
|
15
15
|
A.useImperativeHandle(o, () => c.current), A.useLayoutEffect(() => {
|
|
16
16
|
let e = c.current;
|
|
@@ -43,8 +43,8 @@ var q = 120, me = 2500, he = 1500, ge = M(({ setMessage: e, message: t, userType
|
|
|
43
43
|
return;
|
|
44
44
|
}
|
|
45
45
|
let i = Date.now();
|
|
46
|
-
i - l.current >
|
|
47
|
-
let a = window.setTimeout(() => p(r),
|
|
46
|
+
i - l.current > J && (l.current = i, u.current = !0, E.emit(D.is_typing, r));
|
|
47
|
+
let a = window.setTimeout(() => p(r), me);
|
|
48
48
|
return () => {
|
|
49
49
|
window.clearTimeout(a);
|
|
50
50
|
};
|
|
@@ -78,9 +78,9 @@ var q = 120, me = 2500, he = 1500, ge = M(({ setMessage: e, message: t, userType
|
|
|
78
78
|
userType: n
|
|
79
79
|
});
|
|
80
80
|
};
|
|
81
|
-
return /* @__PURE__ */
|
|
81
|
+
return /* @__PURE__ */ V("div", {
|
|
82
82
|
className: "padorix:w-full padorix:bg-slate-100 padorix:rounded-lg",
|
|
83
|
-
children: /* @__PURE__ */
|
|
83
|
+
children: /* @__PURE__ */ V("textarea", {
|
|
84
84
|
ref: c,
|
|
85
85
|
...a,
|
|
86
86
|
spellCheck: !0,
|
|
@@ -97,27 +97,27 @@ var q = 120, me = 2500, he = 1500, ge = M(({ setMessage: e, message: t, userType
|
|
|
97
97
|
rows: 1
|
|
98
98
|
})
|
|
99
99
|
});
|
|
100
|
-
}),
|
|
100
|
+
}), ge = {
|
|
101
101
|
color: void 0,
|
|
102
102
|
size: void 0,
|
|
103
103
|
className: void 0,
|
|
104
104
|
style: void 0,
|
|
105
105
|
attr: void 0
|
|
106
|
-
},
|
|
106
|
+
}, _e = A.createContext && /*#__PURE__*/ A.createContext(ge), Y = [
|
|
107
107
|
"attr",
|
|
108
108
|
"size",
|
|
109
109
|
"title"
|
|
110
110
|
];
|
|
111
|
-
function
|
|
111
|
+
function ve(e, t) {
|
|
112
112
|
if (e == null) return {};
|
|
113
|
-
var n, r, i =
|
|
113
|
+
var n, r, i = ye(e, t);
|
|
114
114
|
if (Object.getOwnPropertySymbols) {
|
|
115
115
|
var a = Object.getOwnPropertySymbols(e);
|
|
116
116
|
for (r = 0; r < a.length; r++) n = a[r], t.indexOf(n) === -1 && {}.propertyIsEnumerable.call(e, n) && (i[n] = e[n]);
|
|
117
117
|
}
|
|
118
118
|
return i;
|
|
119
119
|
}
|
|
120
|
-
function
|
|
120
|
+
function ye(e, t) {
|
|
121
121
|
if (e == null) return {};
|
|
122
122
|
var n = {};
|
|
123
123
|
for (var r in e) if ({}.hasOwnProperty.call(e, r)) {
|
|
@@ -126,16 +126,16 @@ function be(e, t) {
|
|
|
126
126
|
}
|
|
127
127
|
return n;
|
|
128
128
|
}
|
|
129
|
-
function
|
|
130
|
-
return
|
|
129
|
+
function X() {
|
|
130
|
+
return X = Object.assign ? Object.assign.bind() : function(e) {
|
|
131
131
|
for (var t = 1; t < arguments.length; t++) {
|
|
132
132
|
var n = arguments[t];
|
|
133
133
|
for (var r in n) ({}).hasOwnProperty.call(n, r) && (e[r] = n[r]);
|
|
134
134
|
}
|
|
135
135
|
return e;
|
|
136
|
-
},
|
|
136
|
+
}, X.apply(null, arguments);
|
|
137
137
|
}
|
|
138
|
-
function
|
|
138
|
+
function be(e, t) {
|
|
139
139
|
var n = Object.keys(e);
|
|
140
140
|
if (Object.getOwnPropertySymbols) {
|
|
141
141
|
var r = Object.getOwnPropertySymbols(e);
|
|
@@ -145,12 +145,12 @@ function xe(e, t) {
|
|
|
145
145
|
}
|
|
146
146
|
return n;
|
|
147
147
|
}
|
|
148
|
-
function
|
|
148
|
+
function xe(e) {
|
|
149
149
|
for (var t = 1; t < arguments.length; t++) {
|
|
150
150
|
var n = arguments[t] == null ? {} : arguments[t];
|
|
151
|
-
t % 2 ?
|
|
151
|
+
t % 2 ? be(Object(n), !0).forEach(function(t) {
|
|
152
152
|
Se(e, t, n[t]);
|
|
153
|
-
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) :
|
|
153
|
+
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) : be(Object(n)).forEach(function(t) {
|
|
154
154
|
Object.defineProperty(e, t, Object.getOwnPropertyDescriptor(n, t));
|
|
155
155
|
});
|
|
156
156
|
}
|
|
@@ -179,27 +179,27 @@ function we(e, t) {
|
|
|
179
179
|
return (t === "string" ? String : Number)(e);
|
|
180
180
|
}
|
|
181
181
|
function Te(e) {
|
|
182
|
-
return e && e.map((e, t) => /*#__PURE__*/ A.createElement(e.tag,
|
|
182
|
+
return e && e.map((e, t) => /*#__PURE__*/ A.createElement(e.tag, xe({ key: t }, e.attr), Te(e.child)));
|
|
183
183
|
}
|
|
184
184
|
function Z(e) {
|
|
185
|
-
return (t) => /*#__PURE__*/ A.createElement(Ee,
|
|
185
|
+
return (t) => /*#__PURE__*/ A.createElement(Ee, X({ attr: xe({}, e.attr) }, t), Te(e.child));
|
|
186
186
|
}
|
|
187
187
|
function Ee(e) {
|
|
188
188
|
var t = (t) => {
|
|
189
|
-
var { attr: n, size: r, title: i } = e, a =
|
|
190
|
-
return t.className && (s = t.className), e.className && (s = (s ? s + " " : "") + e.className), /*#__PURE__*/ A.createElement("svg",
|
|
189
|
+
var { attr: n, size: r, title: i } = e, a = ve(e, Y), o = r || t.size || "1em", s;
|
|
190
|
+
return t.className && (s = t.className), e.className && (s = (s ? s + " " : "") + e.className), /*#__PURE__*/ A.createElement("svg", X({
|
|
191
191
|
stroke: "currentColor",
|
|
192
192
|
fill: "currentColor",
|
|
193
193
|
strokeWidth: "0"
|
|
194
194
|
}, t.attr, n, a, {
|
|
195
195
|
className: s,
|
|
196
|
-
style:
|
|
196
|
+
style: xe(xe({ color: e.color || t.color }, t.style), e.style),
|
|
197
197
|
height: o,
|
|
198
198
|
width: o,
|
|
199
199
|
xmlns: "http://www.w3.org/2000/svg"
|
|
200
200
|
}), i && /*#__PURE__*/ A.createElement("title", null, i), e.children);
|
|
201
201
|
};
|
|
202
|
-
return
|
|
202
|
+
return _e === void 0 ? t(ge) : /*#__PURE__*/ A.createElement(_e.Consumer, null, (e) => t(e));
|
|
203
203
|
}
|
|
204
204
|
//#endregion
|
|
205
205
|
//#region node_modules/react-icons/fi/index.mjs
|
|
@@ -336,39 +336,39 @@ function je(t) {
|
|
|
336
336
|
function a() {
|
|
337
337
|
n(r(void 0)), n(e(void 0));
|
|
338
338
|
}
|
|
339
|
-
if (t.data?.id) return /* @__PURE__ */
|
|
339
|
+
if (t.data?.id) return /* @__PURE__ */ V("div", {
|
|
340
340
|
className: t.styles.replyContainer,
|
|
341
|
-
children: /* @__PURE__ */
|
|
341
|
+
children: /* @__PURE__ */ V("div", {
|
|
342
342
|
className: "padorix-fade-in padorix:bg-white padorix:w-[96%] padorix:mx-auto padorix:py-0.5",
|
|
343
|
-
children: /* @__PURE__ */
|
|
343
|
+
children: /* @__PURE__ */ V("div", { children: /* @__PURE__ */ V("div", {
|
|
344
344
|
className: "padorix:px-2",
|
|
345
|
-
children: /* @__PURE__ */
|
|
345
|
+
children: /* @__PURE__ */ H("div", {
|
|
346
346
|
className: "padorix:bg-white padorix:rounded-tl-lg padorix:rounded-tr-lg padorix:border-t padorix:border-x padorix:border-gray-200 padorix:shadow-inner padorix:text-zinc-600 padorix:px-4 padorix:flex padorix:items-center padorix:justify-between",
|
|
347
|
-
children: [/* @__PURE__ */
|
|
347
|
+
children: [/* @__PURE__ */ H("div", {
|
|
348
348
|
className: "padorix:flex padorix:items-center padorix:py-2.5 padorix:text-sm",
|
|
349
|
-
children: [/* @__PURE__ */
|
|
350
|
-
}), /* @__PURE__ */
|
|
349
|
+
children: [/* @__PURE__ */ V(I, { className: "padorix:inline padorix:size-6 padorix:mr-3" }), i.length > 0 && /* @__PURE__ */ H("span", { children: [i.slice(0, 30), i.length > 30 ? "..." : ""] })]
|
|
350
|
+
}), /* @__PURE__ */ H("div", {
|
|
351
351
|
className: "padorix:flex padorix:items-center padorix:gap-3",
|
|
352
|
-
children: [Number(t.data?.images?.length) > 0 && /* @__PURE__ */
|
|
352
|
+
children: [Number(t.data?.images?.length) > 0 && /* @__PURE__ */ H("div", {
|
|
353
353
|
className: "padorix:flex padorix:gap-1 padorix:flex-row",
|
|
354
|
-
children: [Array.isArray(t?.data?.images) && t?.data?.images?.slice(0, 2)?.map((e, t) => /* @__PURE__ */
|
|
354
|
+
children: [Array.isArray(t?.data?.images) && t?.data?.images?.slice(0, 2)?.map((e, t) => /* @__PURE__ */ V("img", {
|
|
355
355
|
src: e,
|
|
356
356
|
alt: "Padorix",
|
|
357
357
|
className: "padorix:size-10 padorix:bg-slate-800 padorix:inline padorix:object-contain"
|
|
358
|
-
}, t)), Number(t.data?.images?.length) > 2 && /* @__PURE__ */
|
|
358
|
+
}, t)), Number(t.data?.images?.length) > 2 && /* @__PURE__ */ H("div", {
|
|
359
359
|
className: "padorix:flex padorix:items-center",
|
|
360
360
|
children: [
|
|
361
361
|
" ",
|
|
362
|
-
/* @__PURE__ */
|
|
362
|
+
/* @__PURE__ */ V(P, { className: "padorix:inline padorix:size-5" }),
|
|
363
363
|
" ",
|
|
364
364
|
Number(t.data?.images?.length) - 2,
|
|
365
365
|
" "
|
|
366
366
|
]
|
|
367
367
|
})]
|
|
368
|
-
}), /* @__PURE__ */
|
|
368
|
+
}), /* @__PURE__ */ V("div", {
|
|
369
369
|
onClick: a,
|
|
370
370
|
className: "padorix:cursor-pointer padorix:transition-all padorix:active:scale-95",
|
|
371
|
-
children: /* @__PURE__ */
|
|
371
|
+
children: /* @__PURE__ */ V(Q, { className: "padorix:inline padorix:size-6 padorix:mr-3" })
|
|
372
372
|
})]
|
|
373
373
|
})]
|
|
374
374
|
})
|
|
@@ -377,17 +377,136 @@ function je(t) {
|
|
|
377
377
|
});
|
|
378
378
|
}
|
|
379
379
|
//#endregion
|
|
380
|
+
//#region lib/chats/chatform/emoji-picker.tsx
|
|
381
|
+
var Me = [
|
|
382
|
+
{
|
|
383
|
+
name: "Smileys",
|
|
384
|
+
icon: "😀",
|
|
385
|
+
emojis: "😀 😃 😄 😁 😆 😅 🤣 😂 🙂 🙃 😉 😊 😇 🥰 😍 🤩 😘 😗 😚 😙 😋 😛 😜 🤪 😝 🤑 🤗 🤭 🤫 🤔 🤐 🤨 😐 😑 😶 😏 😒 🙄 😬 😌 😔 😪 🤤 😴 😷 🤒 🤕 🤢 🤧 🥵 🥶 😵 🤯 🤠 🥳 😎 🤓 🧐 😕 😟 🙁 😮 😯 😲 😳 🥺 😦 😧 😨 😰 😥 😢 😭 😱 😖 😣 😞 😓 😩 😫 🥱 😤 😡 😠 🤬"
|
|
386
|
+
},
|
|
387
|
+
{
|
|
388
|
+
name: "Gestures",
|
|
389
|
+
icon: "👍",
|
|
390
|
+
emojis: "👍 👎 👌 🤌 ✌️ 🤞 🤟 🤘 🤙 👈 👉 👆 👇 ☝️ ✋ 🤚 🖐️ 🖖 👋 🤝 🙏 👏 🙌 👐 🤲 💪 ✍️ 💅 🤳 👀 👂 🧠 🫶"
|
|
391
|
+
},
|
|
392
|
+
{
|
|
393
|
+
name: "Hearts",
|
|
394
|
+
icon: "❤️",
|
|
395
|
+
emojis: "❤️ 🧡 💛 💚 💙 💜 🖤 🤍 🤎 💔 ❣️ 💕 💞 💓 💗 💖 💘 💝 💟 ❤️🔥 💯 💢 💥 💫 💦 💨"
|
|
396
|
+
},
|
|
397
|
+
{
|
|
398
|
+
name: "People",
|
|
399
|
+
icon: "🧑",
|
|
400
|
+
emojis: "👶 🧒 👦 👧 🧑 👨 👩 🧓 👴 👵 👮 🕵️ 💂 👷 🤴 👸 👳 🧕 🤵 👰 🤰 🤱 👼 🎅 🦸 🦹 🧙 🧚 🧛 🧜 🧝 🙋 🙆 🙅 🤷 🤦 💁 🙇 💃 🕺 👯 🧘 🏃 🚶"
|
|
401
|
+
},
|
|
402
|
+
{
|
|
403
|
+
name: "Nature",
|
|
404
|
+
icon: "🐶",
|
|
405
|
+
emojis: "🐶 🐱 🐭 🐹 🐰 🦊 🐻 🐼 🐨 🐯 🦁 🐮 🐷 🐸 🐵 🐔 🐧 🐦 🐤 🦆 🦅 🦉 🐺 🐴 🦄 🐝 🦋 🐌 🐞 🐢 🐍 🐙 🐠 🐬 🐳 🦈 🌵 🌲 🌳 🌴 🌱 🌿 🍀 🍁 🍂 🌸 🌹 🌺 🌻 🌼 🌷 ⭐ 🌟 ✨ ⚡ 🔥 🌈 ☀️ 🌤️ ☁️ 🌧️ ❄️ 🌊"
|
|
406
|
+
},
|
|
407
|
+
{
|
|
408
|
+
name: "Food",
|
|
409
|
+
icon: "🍔",
|
|
410
|
+
emojis: "🍏 🍎 🍐 🍊 🍋 🍌 🍉 🍇 🍓 🍒 🍑 🥭 🍍 🥥 🥝 🍅 🥑 🍆 🥔 🥕 🌽 🌶️ 🥒 🥬 🥦 🍞 🧀 🥚 🍳 🥞 🥓 🍗 🍖 🌭 🍔 🍟 🍕 🥪 🌮 🌯 🥗 🍝 🍜 🍲 🍛 🍣 🍱 🍤 🍚 🍰 🎂 🍦 🍩 🍪 🍫 🍬 🍭 ☕ 🍵 🥤 🧃 🍺 🍷 🥂"
|
|
411
|
+
},
|
|
412
|
+
{
|
|
413
|
+
name: "Activities",
|
|
414
|
+
icon: "⚽",
|
|
415
|
+
emojis: "⚽ 🏀 🏈 ⚾ 🎾 🏐 🏉 🎱 🏓 🏸 🥊 🥋 ⛳ 🎣 🎿 🏂 🏋️ 🚴 🏆 🥇 🥈 🥉 🏅 🎖️ 🎗️ 🎫 🎟️ 🎪 🎭 🎨 🎬 🎤 🎧 🎼 🎹 🥁 🎷 🎺 🎸 🎻 🎲 🎯 🎳 🎮 🧩 🎉 🎊 🎈 🎁"
|
|
416
|
+
},
|
|
417
|
+
{
|
|
418
|
+
name: "Travel",
|
|
419
|
+
icon: "✈️",
|
|
420
|
+
emojis: "🚗 🚕 🚙 🚌 🏎️ 🚓 🚑 🚒 🚚 🚜 🛵 🏍️ 🚲 🛴 🚨 🚆 🚇 🚊 ✈️ 🛫 🛬 🚀 🛸 🚁 ⛵ 🚤 🚢 ⚓ ⛽ 🗺️ 🏠 🏡 🏢 🏬 🏦 🏥 🏨 🏪 🏫 ⛪ 🕌 🗽 🗼 🏰 🌍 🌎 🌏 🏝️ 🏖️ ⛰️ 🌋"
|
|
421
|
+
},
|
|
422
|
+
{
|
|
423
|
+
name: "Objects",
|
|
424
|
+
icon: "💡",
|
|
425
|
+
emojis: "⌚ 📱 💻 ⌨️ 🖥️ 🖨️ 🖱️ 💾 💿 📷 📸 📹 🎥 📞 ☎️ 📺 📻 ⏰ ⏳ 🔋 🔌 💡 🔦 🕯️ 💸 💵 💳 💰 💎 🔧 🔨 🛠️ 🔩 ⚙️ 🔫 💊 💉 🧪 🔬 🔭 📦 📫 📬 ✉️ 📧 📝 📁 📂 📅 📆 📈 📉 📊 📋 📌 📍 📎 🔍 🔒 🔓 🔑 🛒 🎒"
|
|
426
|
+
},
|
|
427
|
+
{
|
|
428
|
+
name: "Symbols",
|
|
429
|
+
icon: "✅",
|
|
430
|
+
emojis: "✅ ☑️ ✔️ ❌ ❎ ➕ ➖ ➗ ✖️ ❓ ❔ ❗ ❕ ‼️ ⁉️ ⚠️ 🚫 ⛔ 🔞 ♻️ 🆗 🆕 🆓 🆒 🆘 🔝 🔜 ⏩ ⏪ ▶️ ⏸️ ⏹️ 🔁 🔄 ⬆️ ⬇️ ⬅️ ➡️ ↩️ ℹ️ 🔴 🟠 🟡 🟢 🔵 🟣 ⚫ ⚪ 🟥 🟩 🟦 💲 ©️ ®️ ™️ 🔔 🔕 💬 💭 🗯️"
|
|
431
|
+
}
|
|
432
|
+
], Ne = "padorix-recent-emojis", Pe = 24;
|
|
433
|
+
function Fe() {
|
|
434
|
+
try {
|
|
435
|
+
let e = JSON.parse(localStorage.getItem(Ne) || "[]");
|
|
436
|
+
return Array.isArray(e) ? e.filter((e) => typeof e == "string").slice(0, Pe) : [];
|
|
437
|
+
} catch {
|
|
438
|
+
return [];
|
|
439
|
+
}
|
|
440
|
+
}
|
|
441
|
+
function Ie(e) {
|
|
442
|
+
let [t, n] = A.useState(Fe), [r, i] = A.useState(() => Fe().length > 0 ? "Recent" : Me[0].name), a = A.useRef(null);
|
|
443
|
+
A.useEffect(() => {
|
|
444
|
+
let t = (t) => {
|
|
445
|
+
let n = t.composedPath();
|
|
446
|
+
a.current && n.includes(a.current) || e.toggleRef?.current && n.includes(e.toggleRef.current) || e.onClose();
|
|
447
|
+
}, n = (t) => {
|
|
448
|
+
t.key === "Escape" && e.onClose();
|
|
449
|
+
};
|
|
450
|
+
return document.addEventListener("pointerdown", t), document.addEventListener("keydown", n), () => {
|
|
451
|
+
document.removeEventListener("pointerdown", t), document.removeEventListener("keydown", n);
|
|
452
|
+
};
|
|
453
|
+
}, [e.onClose, e.toggleRef]);
|
|
454
|
+
function o(r) {
|
|
455
|
+
e.onSelect(r);
|
|
456
|
+
let i = [r, ...t.filter((e) => e !== r)].slice(0, Pe);
|
|
457
|
+
n(i);
|
|
458
|
+
try {
|
|
459
|
+
localStorage.setItem(Ne, JSON.stringify(i));
|
|
460
|
+
} catch {}
|
|
461
|
+
}
|
|
462
|
+
let s = [...t.length > 0 ? [{
|
|
463
|
+
name: "Recent",
|
|
464
|
+
icon: "🕘"
|
|
465
|
+
}] : [], ...Me], c = r === "Recent" ? t : Me.find((e) => e.name === r)?.emojis.split(" ") ?? [];
|
|
466
|
+
return /* @__PURE__ */ H("div", {
|
|
467
|
+
ref: a,
|
|
468
|
+
role: "dialog",
|
|
469
|
+
"aria-label": "Emoji picker",
|
|
470
|
+
className: "padorix:w-[min(20rem,calc(100vw-2rem))] padorix:rounded-xl padorix:border padorix:border-gray-200 padorix:bg-white padorix:shadow-lg padorix:overflow-hidden",
|
|
471
|
+
children: [
|
|
472
|
+
/* @__PURE__ */ V("div", {
|
|
473
|
+
className: "padorix:flex padorix:gap-0.5 padorix:overflow-x-auto padorix-scrolls padorix:border-b padorix:border-gray-200 padorix:px-1 padorix:py-1",
|
|
474
|
+
children: s.map((e) => /* @__PURE__ */ V("button", {
|
|
475
|
+
type: "button",
|
|
476
|
+
title: e.name,
|
|
477
|
+
"aria-pressed": r === e.name,
|
|
478
|
+
onClick: () => i(e.name),
|
|
479
|
+
className: `padorix:shrink-0 padorix:size-8 padorix:rounded-md padorix:text-lg padorix:leading-none padorix:cursor-pointer ${r === e.name ? "padorix:bg-gray-100" : "padorix:opacity-60 padorix:hover:opacity-100"}`,
|
|
480
|
+
children: e.icon
|
|
481
|
+
}, e.name))
|
|
482
|
+
}),
|
|
483
|
+
/* @__PURE__ */ V("div", {
|
|
484
|
+
className: "padorix:px-2 padorix:pt-1.5 padorix:text-xs padorix:text-gray-500",
|
|
485
|
+
children: r
|
|
486
|
+
}),
|
|
487
|
+
/* @__PURE__ */ V("div", {
|
|
488
|
+
className: "padorix:grid padorix:grid-cols-8 padorix:gap-0.5 padorix:p-1.5 padorix:h-52 padorix:overflow-y-auto padorix-scrolls",
|
|
489
|
+
children: c.map((e, t) => /* @__PURE__ */ V("button", {
|
|
490
|
+
type: "button",
|
|
491
|
+
onClick: () => o(e),
|
|
492
|
+
className: "padorix:size-8 padorix:rounded-md padorix:text-xl padorix:leading-none padorix:cursor-pointer padorix:hover:bg-gray-100",
|
|
493
|
+
children: e
|
|
494
|
+
}, `${e}-${t}`))
|
|
495
|
+
})
|
|
496
|
+
]
|
|
497
|
+
});
|
|
498
|
+
}
|
|
499
|
+
//#endregion
|
|
380
500
|
//#region lib/chats/chatform/chat-form.tsx
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
let { sender: t, workspace: n, message: r } = k((e) => e.data), [i, a] = A.useState(!1), [o, s] = A.useState(!1);
|
|
384
|
-
i && !o && s(!0);
|
|
385
|
-
let [c, l] = A.useState(""), u = A.useRef(null), d = Number(e.previews?.length) < 1, f = Math.max(0, Number(n?.tier?.max_file_upload ?? 2)), p = (/* @__PURE__ */ new Date()).toISOString().slice(0, 10), m = n?.file_uploads_date === p ? Number(n?.file_uploads_used ?? 0) : 0, h = e.showFile && m + e.pendingFileCount < f;
|
|
501
|
+
function Le(e) {
|
|
502
|
+
let { sender: t, workspace: n, message: r } = k((e) => e.data), [i, a] = A.useState(!1), o = A.useRef(null), s = A.useCallback(() => a(!1), []), [c, l] = A.useState(""), u = A.useRef(null), d = Number(e.previews?.length) < 1, f = Math.max(0, Number(n?.tier?.max_file_upload ?? 2)), p = (/* @__PURE__ */ new Date()).toISOString().slice(0, 10), m = n?.file_uploads_date === p ? Number(n?.file_uploads_used ?? 0) : 0, h = e.showFile && m + e.pendingFileCount < f;
|
|
386
503
|
function g(e) {
|
|
387
|
-
let t = u.current;
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
504
|
+
let t = u.current, n = t?.value ?? c, r = t && !(t.selectionStart === 0 && t.selectionEnd === 0 && n.length > 0), i = r ? t.selectionStart : n.length, a = r ? t.selectionEnd : n.length;
|
|
505
|
+
l(n.substring(0, i) + e + n.substring(a)), requestAnimationFrame(() => {
|
|
506
|
+
if (!t) return;
|
|
507
|
+
let n = i + e.length;
|
|
508
|
+
t.focus(), t.setSelectionRange(n, n);
|
|
509
|
+
});
|
|
391
510
|
}
|
|
392
511
|
function _() {
|
|
393
512
|
if (d && !c || e.isSending) return;
|
|
@@ -405,29 +524,29 @@ function Ne(e) {
|
|
|
405
524
|
};
|
|
406
525
|
e.sendChat(r), l("");
|
|
407
526
|
}
|
|
408
|
-
return /* @__PURE__ */
|
|
409
|
-
className: "relative
|
|
410
|
-
children: [/* @__PURE__ */
|
|
411
|
-
style: { visibility: i ? "visible" : "hidden" },
|
|
527
|
+
return /* @__PURE__ */ H("div", {
|
|
528
|
+
className: "padorix:relative",
|
|
529
|
+
children: [i && /* @__PURE__ */ V("div", {
|
|
412
530
|
className: e.styles.emojiContainer,
|
|
413
|
-
children:
|
|
414
|
-
|
|
415
|
-
|
|
531
|
+
children: /* @__PURE__ */ V(Ie, {
|
|
532
|
+
onSelect: g,
|
|
533
|
+
onClose: s,
|
|
534
|
+
toggleRef: o
|
|
416
535
|
})
|
|
417
|
-
}), /* @__PURE__ */
|
|
536
|
+
}), /* @__PURE__ */ H("div", {
|
|
418
537
|
className: e.styles.formContainer,
|
|
419
|
-
children: [r?.id && /* @__PURE__ */
|
|
538
|
+
children: [r?.id && /* @__PURE__ */ V(je, {
|
|
420
539
|
styles: e.styles,
|
|
421
540
|
data: r
|
|
422
|
-
}), /* @__PURE__ */
|
|
541
|
+
}), /* @__PURE__ */ H("div", {
|
|
423
542
|
className: "padorix:flex padorix:items-center padorix:justify-center padorix:rounded-lg padorix:p-0.5 padorix:relative padorix:gap-1",
|
|
424
|
-
children: [/* @__PURE__ */
|
|
543
|
+
children: [/* @__PURE__ */ H("div", {
|
|
425
544
|
className: "padorix:flex padorix:items-center padorix:gap-1 padorix:bg-gray-100 padorix:w-full padorix:rounded-lg",
|
|
426
545
|
children: [
|
|
427
|
-
h && /* @__PURE__ */
|
|
546
|
+
h && /* @__PURE__ */ H("label", {
|
|
428
547
|
title: "Attach images",
|
|
429
548
|
className: "padorix:cursor-pointer padorix:px-1 padorix:text-[#99a1af]",
|
|
430
|
-
children: [/* @__PURE__ */
|
|
549
|
+
children: [/* @__PURE__ */ V(P, {}), /* @__PURE__ */ V("input", {
|
|
431
550
|
type: "file",
|
|
432
551
|
accept: ".png,.jpg,.jpeg,.webp",
|
|
433
552
|
hidden: !0,
|
|
@@ -435,18 +554,23 @@ function Ne(e) {
|
|
|
435
554
|
multiple: !0
|
|
436
555
|
})]
|
|
437
556
|
}),
|
|
438
|
-
/* @__PURE__ */
|
|
557
|
+
/* @__PURE__ */ H("div", {
|
|
558
|
+
ref: o,
|
|
559
|
+
role: "button",
|
|
560
|
+
"aria-label": "Insert emoji",
|
|
561
|
+
"aria-expanded": i,
|
|
439
562
|
onClick: () => a((e) => !e),
|
|
563
|
+
style: i ? { color: String(n?.widget?.colorScheme || "#6c63ff") } : void 0,
|
|
440
564
|
className: "padorix:text-[#99a1af] padorix:cursor-pointer padorix:px-1 padorix:transition-all",
|
|
441
565
|
children: [
|
|
442
566
|
" ",
|
|
443
|
-
/* @__PURE__ */
|
|
567
|
+
/* @__PURE__ */ V(oe, {}),
|
|
444
568
|
" "
|
|
445
569
|
]
|
|
446
570
|
}),
|
|
447
|
-
/* @__PURE__ */
|
|
571
|
+
/* @__PURE__ */ V("div", {
|
|
448
572
|
className: "padorix:w-full",
|
|
449
|
-
children: /* @__PURE__ */
|
|
573
|
+
children: /* @__PURE__ */ V(he, {
|
|
450
574
|
ref: u,
|
|
451
575
|
message: c,
|
|
452
576
|
setMessage: l,
|
|
@@ -455,14 +579,14 @@ function Ne(e) {
|
|
|
455
579
|
})
|
|
456
580
|
})
|
|
457
581
|
]
|
|
458
|
-
}), /* @__PURE__ */
|
|
582
|
+
}), /* @__PURE__ */ V("div", { children: /* @__PURE__ */ H("div", {
|
|
459
583
|
onClick: _,
|
|
460
584
|
style: {
|
|
461
585
|
background: d && !c || e.isSending ? "#9f9fa9" : String(n?.widget?.colorScheme),
|
|
462
586
|
cursor: d && !c || e.isSending ? "not-allowed" : "pointer"
|
|
463
587
|
},
|
|
464
588
|
className: "padorix:-mt-1 padorix:size-10 padorix:text-white padorix:rounded-lg padorix:flex padorix:last:items-center padorix:justify-center",
|
|
465
|
-
children: [" ", /* @__PURE__ */
|
|
589
|
+
children: [" ", /* @__PURE__ */ V(R, { className: "padorix:size-6" })]
|
|
466
590
|
}) })]
|
|
467
591
|
})]
|
|
468
592
|
})]
|
|
@@ -470,7 +594,7 @@ function Ne(e) {
|
|
|
470
594
|
}
|
|
471
595
|
//#endregion
|
|
472
596
|
//#region lib/chats/chatform/chat-image-upload.tsx
|
|
473
|
-
function
|
|
597
|
+
function Re(e) {
|
|
474
598
|
let { workspace: t } = k((e) => e.data), n = Math.max(0, Number(t?.tier?.max_file_upload ?? 2)), r = (/* @__PURE__ */ new Date()).toISOString().slice(0, 10), i = t?.file_uploads_date === r ? Number(t?.file_uploads_used ?? 0) : 0, [a, o] = A.useState({
|
|
475
599
|
index: 0,
|
|
476
600
|
image: e.previews?.[0]?.img
|
|
@@ -478,51 +602,51 @@ function Pe(e) {
|
|
|
478
602
|
function s(t) {
|
|
479
603
|
e.sendChat(t);
|
|
480
604
|
}
|
|
481
|
-
if (Number(e.previews?.length || 0) > 0) return /* @__PURE__ */
|
|
605
|
+
if (Number(e.previews?.length || 0) > 0) return /* @__PURE__ */ H("div", {
|
|
482
606
|
className: e.styles.imageUploadContainer,
|
|
483
607
|
children: [
|
|
484
|
-
/* @__PURE__ */
|
|
485
|
-
className: "padorix:h-[60dvh] padorix:border padorix:border-gray-300 padorix:py-3 padorix:md:h-[50dvh] padorix:
|
|
486
|
-
children: [/* @__PURE__ */
|
|
608
|
+
/* @__PURE__ */ H("div", {
|
|
609
|
+
className: "padorix:relative padorix:h-[60dvh] padorix:border padorix:border-gray-300 padorix:py-3 padorix:md:h-[50dvh] padorix:bg-white",
|
|
610
|
+
children: [/* @__PURE__ */ V("div", {
|
|
487
611
|
className: "padorix:py-0 padorix:px-2 padorix:pt-1.5 padorix:absolute padorix:top-0 padorix:right-0 padorix:w-full padorix:bg-white",
|
|
488
|
-
children: /* @__PURE__ */
|
|
612
|
+
children: /* @__PURE__ */ H("div", {
|
|
489
613
|
onClick: e.DiscardAllImages,
|
|
490
614
|
className: "padorix:size-fit padorix:ml-auto padorix:text-red-600 padorix:cursor-pointer padorix:text-xl",
|
|
491
615
|
children: [
|
|
492
616
|
" ",
|
|
493
|
-
/* @__PURE__ */
|
|
617
|
+
/* @__PURE__ */ V(Q, {}),
|
|
494
618
|
" "
|
|
495
619
|
]
|
|
496
620
|
})
|
|
497
|
-
}), /* @__PURE__ */
|
|
621
|
+
}), /* @__PURE__ */ V("img", {
|
|
498
622
|
src: a.image,
|
|
499
623
|
loading: "lazy",
|
|
500
624
|
className: "padorix:size-full padorix:mx-auto padorix:object-contain"
|
|
501
625
|
})]
|
|
502
626
|
}),
|
|
503
|
-
/* @__PURE__ */
|
|
627
|
+
/* @__PURE__ */ H("div", {
|
|
504
628
|
className: "padorix:flex padorix:items-center padorix:justify-center padorix:gap-1 padorix:max-w-[98%] padorix:mx-auto",
|
|
505
|
-
children: [/* @__PURE__ */
|
|
629
|
+
children: [/* @__PURE__ */ V("div", {
|
|
506
630
|
className: "padorix:overflow-y-hidden padorix:overflow-x-auto",
|
|
507
|
-
children: /* @__PURE__ */
|
|
631
|
+
children: /* @__PURE__ */ V("div", {
|
|
508
632
|
className: "padorix:w-fit",
|
|
509
|
-
children: /* @__PURE__ */
|
|
633
|
+
children: /* @__PURE__ */ V("div", {
|
|
510
634
|
className: "padorix:flex padorix:items-center padorix:justify-center padorix:gap-1",
|
|
511
|
-
children: e.previews?.map((n, r) => /* @__PURE__ */
|
|
635
|
+
children: e.previews?.map((n, r) => /* @__PURE__ */ H("div", {
|
|
512
636
|
style: { border: `3.5px solid ${a.index === r ? String(t?.widget?.colorScheme) : "transparent"}` },
|
|
513
637
|
className: "padorix:relative padorix:size-14 padorix:border-2 padorix:rounded-lg",
|
|
514
|
-
children: [/* @__PURE__ */
|
|
638
|
+
children: [/* @__PURE__ */ V("div", {
|
|
515
639
|
onClick: () => e.DiscardSingleImage(r),
|
|
516
640
|
className: "padorix:absolute padorix:top-0 padorix:left-0 padorix:w-full padorix:bg-slate-700 padorix:rounded-t-sm",
|
|
517
|
-
children: /* @__PURE__ */
|
|
641
|
+
children: /* @__PURE__ */ H("div", {
|
|
518
642
|
className: "padorix:size-fit padorix:ml-auto padorix:cursor-pointer padorix:text-[#ef4444] padorix:text-sm",
|
|
519
643
|
children: [
|
|
520
644
|
" ",
|
|
521
|
-
/* @__PURE__ */
|
|
645
|
+
/* @__PURE__ */ V(Q, {}),
|
|
522
646
|
" "
|
|
523
647
|
]
|
|
524
648
|
})
|
|
525
|
-
}), /* @__PURE__ */
|
|
649
|
+
}), /* @__PURE__ */ V("img", {
|
|
526
650
|
onClick: () => o({
|
|
527
651
|
index: r,
|
|
528
652
|
image: n?.img
|
|
@@ -534,17 +658,17 @@ function Pe(e) {
|
|
|
534
658
|
}, r))
|
|
535
659
|
})
|
|
536
660
|
})
|
|
537
|
-
}), i + e.pendingFileCount < n && /* @__PURE__ */
|
|
661
|
+
}), i + e.pendingFileCount < n && /* @__PURE__ */ V("div", {
|
|
538
662
|
className: "",
|
|
539
|
-
children: /* @__PURE__ */
|
|
663
|
+
children: /* @__PURE__ */ V("div", {
|
|
540
664
|
style: {
|
|
541
665
|
borderColor: `${t?.widget?.colorScheme}`,
|
|
542
666
|
color: String(t?.widget?.colorScheme)
|
|
543
667
|
},
|
|
544
668
|
className: "padorix:size-12 padorix:border padorix:sticky padorix:left-0 padorix:cursor-pointer padorix:rounded-md padorix:flex padorix:items-center padorix:justify-center",
|
|
545
|
-
children: /* @__PURE__ */
|
|
669
|
+
children: /* @__PURE__ */ H("label", {
|
|
546
670
|
className: "padorix:cursor-pointer",
|
|
547
|
-
children: [/* @__PURE__ */
|
|
671
|
+
children: [/* @__PURE__ */ V(P, {}), /* @__PURE__ */ V("input", {
|
|
548
672
|
type: "file",
|
|
549
673
|
accept: ".png,.jpg,.jpeg,.webp",
|
|
550
674
|
hidden: !0,
|
|
@@ -555,7 +679,7 @@ function Pe(e) {
|
|
|
555
679
|
})
|
|
556
680
|
})]
|
|
557
681
|
}),
|
|
558
|
-
/* @__PURE__ */
|
|
682
|
+
/* @__PURE__ */ V(Le, {
|
|
559
683
|
showFile: !1,
|
|
560
684
|
pendingFileCount: e.pendingFileCount,
|
|
561
685
|
sendChat: s,
|
|
@@ -569,7 +693,7 @@ function Pe(e) {
|
|
|
569
693
|
}
|
|
570
694
|
//#endregion
|
|
571
695
|
//#region lib/utils/use-chat-identity.ts
|
|
572
|
-
function
|
|
696
|
+
function ze(e) {
|
|
573
697
|
let { sender: t, workspace: n, conversation: r } = k((e) => e.data), i = t?.workspaceId || n?.id || r?.workspaceId, a = t?.conversationId, o = t?.senderId, s = t?.userType || e, c = t?.fullName;
|
|
574
698
|
return A.useMemo(() => !i || !a || !o ? null : {
|
|
575
699
|
workspaceId: String(i),
|
|
@@ -587,8 +711,8 @@ function Fe(e) {
|
|
|
587
711
|
}
|
|
588
712
|
//#endregion
|
|
589
713
|
//#region lib/chats/chatform/chat-form-component.tsx
|
|
590
|
-
function
|
|
591
|
-
let [n, r] = A.useState([]), [i, o] = A.useState([]), [c, l] = A.useState(0), u = A.useRef(0), { sender: p, workspace: m } = k((e) => e.data), h = O(), g =
|
|
714
|
+
function Be(e) {
|
|
715
|
+
let [n, r] = A.useState([]), [i, o] = A.useState([]), [c, l] = A.useState(0), u = A.useRef(0), { sender: p, workspace: m } = k((e) => e.data), h = O(), g = ze(e.userType), _ = Math.max(0, Number(m?.tier?.max_file_upload ?? 2)), v = (/* @__PURE__ */ new Date()).toISOString().slice(0, 10), y = m?.file_uploads_date === v ? Number(m?.file_uploads_used ?? 0) : 0;
|
|
592
716
|
function b(t) {
|
|
593
717
|
let i = {
|
|
594
718
|
...t,
|
|
@@ -630,9 +754,9 @@ function Ie(e) {
|
|
|
630
754
|
function C() {
|
|
631
755
|
o([]), r([]), ee(n);
|
|
632
756
|
}
|
|
633
|
-
return /* @__PURE__ */
|
|
634
|
-
className:
|
|
635
|
-
children: [i.length > 0 && /* @__PURE__ */
|
|
757
|
+
return /* @__PURE__ */ H("div", {
|
|
758
|
+
className: e.styles.formRoot,
|
|
759
|
+
children: [i.length > 0 && /* @__PURE__ */ V(Re, {
|
|
636
760
|
previews: i,
|
|
637
761
|
DiscardSingleImage: S,
|
|
638
762
|
DiscardAllImages: C,
|
|
@@ -643,7 +767,7 @@ function Ie(e) {
|
|
|
643
767
|
handleFile: x,
|
|
644
768
|
isSending: e.isSending,
|
|
645
769
|
pendingFileCount: c
|
|
646
|
-
}), /* @__PURE__ */
|
|
770
|
+
}), /* @__PURE__ */ V(Le, {
|
|
647
771
|
sendChat: b,
|
|
648
772
|
previews: i,
|
|
649
773
|
showFile: !0,
|
|
@@ -657,10 +781,10 @@ function Ie(e) {
|
|
|
657
781
|
}
|
|
658
782
|
//#endregion
|
|
659
783
|
//#region lib/assets/images/wd__user.png
|
|
660
|
-
var
|
|
784
|
+
var Ve = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAIAAAACACAMAAAD04JH5AAADAFBMVEVMa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5KHYHFr94oBCHSPJsM7a6MeFRnzM23/7lkbf1ZweGN0LBrbyBCULkrdw86ysVlxYzBr0sYNpyav7K40wU4Htd6MQQCC3iYLTvSVCUeJQkmDaIDs1X36Ob0kAt2R+PiIURkIQkfRpIjDxS+eeltAUvrfrNrnT8Av6dzEVi4UIYMOtEnQSsGHBIsjC7vlaPHvWJuqAgs4JFORBjpxBXC7vX9EVhYLP1nKuprXUaRNjgLWfbcTKQmj/U+W3o+KfRJv93kMEZhg7CgaioSGOvl9qM5E3p1IEb6MAiqpsLnkER4tPo5HgFrPfHo5uug0hdcCIYf7Z6LJJDh8jmlHRq2dbk46ZMgHLlRR1m09gnPwcbr5eip9fbUW0RLnwRh1epUZ+6z0A8MlGj3iv+u9YqXfmQIFc/8b/7TSCLiE4+PTnunG2Nm0wOndor65Ap/4/TxJ92G6ti4rzZ0f/KxyE++1JvQ5/u60tNi4T8tvWvfPJQg8msrdQLa+NnikCFxqO4Tp4cWH9go2j+2hGT03t6u9CEqwZDetfc9lJAQzcdmmIQNO1/uqR7COqQl9ry8c0M0r99HQgKad+j77rQoIaSlddf9fl6Ur38eAXppf6g70RAF+Yn/Of3Cw2hI/nshJDy4//uegLiYrDYEeupeOJgwVPfnILx0aEtXXSI0JPAP67q2HHo4Ju65OmkT1tC8nW+FejqrDWkCIBKx9/au0FsfzcMqvl+NYmTcm2x88P0/dXaFvByIxMF9pxmqvaFTdZ++f3AjitHbX/gAlHvchocP7Bt2+lR3uzfRYOBwJPY6xp4NhupAe/ep0LB9Bx7c0LuLxNrU93MYEr786rO//s3Q3nWq53RdvddrNHq99XWne051tRv+8a8DX33J/yh23A/MEJv4fzZ+fvDv33y9f++nXwxLS1v3xV/27v/6m38enLeBL3cTNony/n9GHU2UlcLeHAAAAABJRU5ErkJggg==";
|
|
661
785
|
//#endregion
|
|
662
786
|
//#region node_modules/react-icons/io5/index.mjs
|
|
663
|
-
function
|
|
787
|
+
function He(e) {
|
|
664
788
|
return Z({
|
|
665
789
|
tag: "svg",
|
|
666
790
|
attr: { viewBox: "0 0 512 512" },
|
|
@@ -697,7 +821,7 @@ function Re(e) {
|
|
|
697
821
|
}
|
|
698
822
|
//#endregion
|
|
699
823
|
//#region node_modules/react-icons/vsc/index.mjs
|
|
700
|
-
function
|
|
824
|
+
function Ue(e) {
|
|
701
825
|
return Z({
|
|
702
826
|
tag: "svg",
|
|
703
827
|
attr: {
|
|
@@ -721,8 +845,8 @@ function ze(e) {
|
|
|
721
845
|
}
|
|
722
846
|
//#endregion
|
|
723
847
|
//#region lib/chats/chatheader/chat-header.tsx
|
|
724
|
-
function
|
|
725
|
-
let [t, { open: r, close: i }] =
|
|
848
|
+
function We(e) {
|
|
849
|
+
let [t, { open: r, close: i }] = fe(!1), { workspace: a, conversation: s, sender: c } = k((e) => e.data), u = v(a?.widget?.darkMode, !1), [p, m] = A.useState(!1), h = O(), g = ze(e.userType), _ = e.userType === w.VISITOR, y = a?.widget?.notifications?.customerEndsConversation === l.true, x = A.useMemo(() => _ ? a?.widget?.department : s?.fullName, [a, s]), ee = A.useMemo(() => _ ? a?.logo : Ve, [a]), S = A.useMemo(() => _ ? a?.name : K(s?.createdAt).format("DD dddd MMMM YYYY"), [
|
|
726
850
|
_,
|
|
727
851
|
a?.name,
|
|
728
852
|
s?.createdAt
|
|
@@ -731,12 +855,12 @@ function Be(e) {
|
|
|
731
855
|
m(!1);
|
|
732
856
|
}
|
|
733
857
|
function T() {
|
|
734
|
-
let t =
|
|
858
|
+
let t = K(), n = [
|
|
735
859
|
x || "Chat transcript",
|
|
736
860
|
`Exported: ${t.format("YYYY-MM-DD HH:mm")}`,
|
|
737
861
|
"",
|
|
738
862
|
...e.messages.length > 0 ? e.messages.map((e) => {
|
|
739
|
-
let t =
|
|
863
|
+
let t = K(e.createdAt), n = e.senderName || e.senderType || "Unknown", r = e.deleted === l.true ? "[This message was deleted]" : Array.isArray(e.message) ? e.message.join("\n") : "", i = e.deleted === l.true ? [] : Array.isArray(e.images) ? e.images : [];
|
|
740
864
|
return [
|
|
741
865
|
`[${t.isValid() ? t.format("YYYY-MM-DD HH:mm") : e.createdAt}] ${n} (${e.senderType})`,
|
|
742
866
|
r,
|
|
@@ -762,30 +886,30 @@ function Be(e) {
|
|
|
762
886
|
function D() {
|
|
763
887
|
i(), g && f.requestFeedback(g).then((e) => h(o(e))).catch((e) => d(e.message, "error")), e.toBottom();
|
|
764
888
|
}
|
|
765
|
-
return /* @__PURE__ */
|
|
889
|
+
return /* @__PURE__ */ V("div", {
|
|
766
890
|
className: e.styles.header,
|
|
767
|
-
children: /* @__PURE__ */
|
|
891
|
+
children: /* @__PURE__ */ H("div", {
|
|
768
892
|
className: "padorix:rounded-2xl",
|
|
769
|
-
children: [/* @__PURE__ */
|
|
893
|
+
children: [/* @__PURE__ */ V(W, {
|
|
770
894
|
withCloseButton: !1,
|
|
771
895
|
opened: t,
|
|
772
896
|
onClose: i,
|
|
773
897
|
centered: !0,
|
|
774
898
|
styles: { body: { padding: 0 } },
|
|
775
|
-
children: /* @__PURE__ */
|
|
899
|
+
children: /* @__PURE__ */ V("div", {
|
|
776
900
|
className: u ? "padorix-dark" : void 0,
|
|
777
|
-
children: /* @__PURE__ */
|
|
901
|
+
children: /* @__PURE__ */ H("div", {
|
|
778
902
|
className: "padorix:dark:bg-[#2a3549] padorix:p-4 padorix:dark:text-white",
|
|
779
|
-
children: [/* @__PURE__ */
|
|
903
|
+
children: [/* @__PURE__ */ V("div", {
|
|
780
904
|
className: "",
|
|
781
905
|
children: "Confirm your action to stop chat session by requesting for feedback"
|
|
782
|
-
}), /* @__PURE__ */
|
|
906
|
+
}), /* @__PURE__ */ H("div", {
|
|
783
907
|
className: "padorix:border-t padorix:border-gray-200 padorix:dark:border-gray-600 padorix:pt-3 padorix:mt-3 padorix:flex padorix:items-center padorix:justify-end padorix:gap-3",
|
|
784
|
-
children: [/* @__PURE__ */
|
|
908
|
+
children: [/* @__PURE__ */ V("button", {
|
|
785
909
|
onClick: i,
|
|
786
910
|
className: "padorix:py-1 padorix:cursor-pointer padorix:px-3 padorix:border padorix:border-slate-300 padorix:bg-slate-200/70 padorix:rounded-md",
|
|
787
911
|
children: "Cancel"
|
|
788
|
-
}), /* @__PURE__ */
|
|
912
|
+
}), /* @__PURE__ */ V("button", {
|
|
789
913
|
onClick: D,
|
|
790
914
|
className: "padorix:px-3 padorix:cursor-pointer padorix:py-1 padorix:rounded-md padorix:text-white",
|
|
791
915
|
style: { background: String(a?.widget?.colorScheme) },
|
|
@@ -794,49 +918,49 @@ function Be(e) {
|
|
|
794
918
|
})]
|
|
795
919
|
})
|
|
796
920
|
})
|
|
797
|
-
}), /* @__PURE__ */
|
|
921
|
+
}), /* @__PURE__ */ H("div", {
|
|
798
922
|
style: { color: a?.widget?.textColor || void 0 },
|
|
799
923
|
className: "padorix:px-2 padorix:py-2.5 padorix:transition-all.5 padorix:text-xs padorix:border-b padorix:border-[#d1d5dc] padorix:dark:border-gray-600 padorix:flex padorix:items-center padorix:justify-between",
|
|
800
|
-
children: [/* @__PURE__ */
|
|
924
|
+
children: [/* @__PURE__ */ H("div", {
|
|
801
925
|
className: "padorix:flex padorix:items-center padorix:gap-1",
|
|
802
926
|
children: [
|
|
803
|
-
_ ? null : /* @__PURE__ */
|
|
927
|
+
_ ? null : /* @__PURE__ */ V("div", {
|
|
804
928
|
onClick: e.goBack,
|
|
805
929
|
className: "padorix:cursor-pointer padorix:size-7 padorix:flex padorix:items-center padorix:justify-center padorix:rounded-full padorix:hover:bg-slate-100 padorix:hover:dark:bg-slate-600 padorix:transition-all padorix:active:scale-95 padorix:md:hidden",
|
|
806
|
-
children: /* @__PURE__ */
|
|
930
|
+
children: /* @__PURE__ */ V(re, { className: "padorix:size-5" })
|
|
807
931
|
}),
|
|
808
|
-
/* @__PURE__ */
|
|
932
|
+
/* @__PURE__ */ V(z, { children: /* @__PURE__ */ V("img", {
|
|
809
933
|
src: ee,
|
|
810
934
|
loading: "lazy",
|
|
811
935
|
className: "padorix:size-8 padorix:rounded-full"
|
|
812
936
|
}) }),
|
|
813
|
-
/* @__PURE__ */
|
|
937
|
+
/* @__PURE__ */ H("div", {
|
|
814
938
|
className: "padorix:text-gray-600",
|
|
815
|
-
children: [/* @__PURE__ */
|
|
939
|
+
children: [/* @__PURE__ */ V(z, { children: /* @__PURE__ */ V("div", {
|
|
816
940
|
className: "padorix:font-semibold",
|
|
817
941
|
children: x
|
|
818
|
-
}) }), /* @__PURE__ */
|
|
942
|
+
}) }), /* @__PURE__ */ V(z, { children: /* @__PURE__ */ V("div", {
|
|
819
943
|
className: "",
|
|
820
944
|
children: S
|
|
821
945
|
}) })]
|
|
822
946
|
})
|
|
823
947
|
]
|
|
824
|
-
}), /* @__PURE__ */
|
|
948
|
+
}), /* @__PURE__ */ H("div", {
|
|
825
949
|
className: "padorix:flex padorix:items-center padorix:gap-3",
|
|
826
|
-
children: [/* @__PURE__ */
|
|
950
|
+
children: [/* @__PURE__ */ V("div", {
|
|
827
951
|
className: "padorix:flex padorix:items-center padorix:gap-1",
|
|
828
|
-
children: /* @__PURE__ */
|
|
952
|
+
children: /* @__PURE__ */ H(G, {
|
|
829
953
|
position: _ ? "bottom-end" : "bottom",
|
|
830
954
|
opened: p,
|
|
831
955
|
onChange: m,
|
|
832
956
|
withinPortal: !0,
|
|
833
957
|
portalProps: { target: b() },
|
|
834
958
|
zIndex: 2147483647,
|
|
835
|
-
children: [/* @__PURE__ */
|
|
959
|
+
children: [/* @__PURE__ */ V(G.Target, { children: /* @__PURE__ */ V("div", {
|
|
836
960
|
onClick: () => m((e) => !e),
|
|
837
961
|
className: "padorix:cursor-pointer padorix:transition-all padorix:size-fit padorix:text-xl",
|
|
838
|
-
children: /* @__PURE__ */
|
|
839
|
-
}) }), /* @__PURE__ */
|
|
962
|
+
children: /* @__PURE__ */ V(He, {})
|
|
963
|
+
}) }), /* @__PURE__ */ V(G.Dropdown, {
|
|
840
964
|
className: u ? "padorix-dark" : void 0,
|
|
841
965
|
styles: { dropdown: {
|
|
842
966
|
padding: 0,
|
|
@@ -845,43 +969,43 @@ function Be(e) {
|
|
|
845
969
|
border: 0,
|
|
846
970
|
backgroundColor: u ? "#2a3549" : "#fff"
|
|
847
971
|
} },
|
|
848
|
-
children: /* @__PURE__ */
|
|
972
|
+
children: /* @__PURE__ */ H("div", {
|
|
849
973
|
className: "padorix:text-xs padori:flex padorix:flex-col padorix:dark:bg-[#2a3549] padorix:dark:text-white",
|
|
850
974
|
children: [
|
|
851
|
-
!_ && /* @__PURE__ */
|
|
975
|
+
!_ && /* @__PURE__ */ H("div", {
|
|
852
976
|
onClick: T,
|
|
853
977
|
className: "padorix:px-2 padorix:py-2.5 padorix:hover:bg-slate-100 padorix:hover:dark:bg-slate-600 padorix:transition-all padorix:cursor-pointer padorix:rounded-1 padorix:flex padorix:items-center",
|
|
854
|
-
children: [/* @__PURE__ */
|
|
978
|
+
children: [/* @__PURE__ */ V(ae, { className: "padorix:inline padorix:size-5 padorix:text-gray-700 padorix:mr-1" }), "Download Chat transcript"]
|
|
855
979
|
}),
|
|
856
|
-
/* @__PURE__ */
|
|
980
|
+
/* @__PURE__ */ H("a", {
|
|
857
981
|
target: "_blank",
|
|
858
982
|
href: "https://app.farmsac.com/signup",
|
|
859
983
|
className: "padorix:px-2 padorix:py-2.5 padorix:hover:bg-slate-100 padorix:hover:dark:bg-slate-600 padorix:transition-all padorix:cursor-pointer padorix:rounded-1 padorix:hidden padorix:items-center",
|
|
860
|
-
children: [/* @__PURE__ */
|
|
984
|
+
children: [/* @__PURE__ */ V(L, { className: "padorix:inline padorix:size-5 padorix:text-gray-700 padorix:dark:text-white padorix:mr-1" }), "Add to your website"]
|
|
861
985
|
}),
|
|
862
|
-
!_ && s?.status === l.true && /* @__PURE__ */
|
|
986
|
+
!_ && s?.status === l.true && /* @__PURE__ */ H("div", {
|
|
863
987
|
onClick: te,
|
|
864
988
|
className: "padorix:px-2 padorix:py-2.5 padorix:hover:bg-slate-100 padorix:hover:dark:bg-slate-600 padorix:transition-all padorix:cursor-pointer padorix:rounded-1 padorix:flex padorix:items-center",
|
|
865
|
-
children: [/* @__PURE__ */
|
|
989
|
+
children: [/* @__PURE__ */ V(Ue, { className: "padorix:inline padorix:size-5 padorix:text-gray-700 padorix:dark:text-white padorix:mr-1" }), "Request for Feedback"]
|
|
866
990
|
}),
|
|
867
|
-
s?.closed_at === null && (!_ || y) && /* @__PURE__ */
|
|
991
|
+
s?.closed_at === null && (!_ || y) && /* @__PURE__ */ V("div", {
|
|
868
992
|
className: "padorix:border-t padorix:border-[#d1d5dc] padorix:dark:border-gray-600 padorix:mt-1",
|
|
869
|
-
children: /* @__PURE__ */
|
|
993
|
+
children: /* @__PURE__ */ H("div", {
|
|
870
994
|
onClick: E,
|
|
871
995
|
className: "padorix:px-2 padorix:py-2.5 padorix:hover:bg-slate-100 padorix:hover:dark:bg-slate-600 padorix:transition-all padorix:cursor-pointer padorix:rounded-1 padorix:flex padorix:items-center",
|
|
872
|
-
children: [/* @__PURE__ */
|
|
996
|
+
children: [/* @__PURE__ */ V(Q, { className: "padorix:inline padorix:size-5 padorix:text-gray-700 padorix:dark:text-white padorix:mr-1" }), "End Chat Session"]
|
|
873
997
|
})
|
|
874
998
|
})
|
|
875
999
|
]
|
|
876
1000
|
})
|
|
877
1001
|
})]
|
|
878
1002
|
})
|
|
879
|
-
}), _ && /* @__PURE__ */
|
|
1003
|
+
}), _ && /* @__PURE__ */ V("div", {
|
|
880
1004
|
className: "padorix:size-8 padorix:ml-auto",
|
|
881
|
-
children: /* @__PURE__ */
|
|
1005
|
+
children: /* @__PURE__ */ V("div", {
|
|
882
1006
|
className: "padorix:bg-slate-100 padorix:size-8 padorix:self-center padorix:flex padorix:items-center padorix:justify-center padorix:rounded-md padorix:cursor-pointer padorix:active:scale-95 padorix:transition-all",
|
|
883
1007
|
onClick: e.close,
|
|
884
|
-
children: /* @__PURE__ */
|
|
1008
|
+
children: /* @__PURE__ */ V(F, {})
|
|
885
1009
|
})
|
|
886
1010
|
})]
|
|
887
1011
|
})]
|
|
@@ -891,7 +1015,7 @@ function Be(e) {
|
|
|
891
1015
|
}
|
|
892
1016
|
//#endregion
|
|
893
1017
|
//#region node_modules/react-icons/bs/index.mjs
|
|
894
|
-
function
|
|
1018
|
+
function Ge(e) {
|
|
895
1019
|
return Z({
|
|
896
1020
|
tag: "svg",
|
|
897
1021
|
attr: {
|
|
@@ -905,7 +1029,7 @@ function Ve(e) {
|
|
|
905
1029
|
}]
|
|
906
1030
|
})(e);
|
|
907
1031
|
}
|
|
908
|
-
function
|
|
1032
|
+
function Ke(e) {
|
|
909
1033
|
return Z({
|
|
910
1034
|
tag: "svg",
|
|
911
1035
|
attr: {
|
|
@@ -919,7 +1043,7 @@ function He(e) {
|
|
|
919
1043
|
}]
|
|
920
1044
|
})(e);
|
|
921
1045
|
}
|
|
922
|
-
function
|
|
1046
|
+
function qe(e) {
|
|
923
1047
|
return Z({
|
|
924
1048
|
tag: "svg",
|
|
925
1049
|
attr: {
|
|
@@ -933,7 +1057,7 @@ function Ue(e) {
|
|
|
933
1057
|
}]
|
|
934
1058
|
})(e);
|
|
935
1059
|
}
|
|
936
|
-
function
|
|
1060
|
+
function Je(e) {
|
|
937
1061
|
return Z({
|
|
938
1062
|
tag: "svg",
|
|
939
1063
|
attr: {
|
|
@@ -951,7 +1075,7 @@ function We(e) {
|
|
|
951
1075
|
}]
|
|
952
1076
|
})(e);
|
|
953
1077
|
}
|
|
954
|
-
function
|
|
1078
|
+
function Ye(e) {
|
|
955
1079
|
return Z({
|
|
956
1080
|
tag: "svg",
|
|
957
1081
|
attr: {
|
|
@@ -967,11 +1091,11 @@ function Ge(e) {
|
|
|
967
1091
|
}
|
|
968
1092
|
//#endregion
|
|
969
1093
|
//#region lib/chats/chatform/render-text.tsx
|
|
970
|
-
function
|
|
1094
|
+
function Xe(e) {
|
|
971
1095
|
if (!e) return "";
|
|
972
1096
|
let t = /(https?:\/\/[^\s]+)/g, n = /\*(.*?)\*/g;
|
|
973
1097
|
return e.split(t).map((e, r) => {
|
|
974
|
-
if (t.test(e)) return /* @__PURE__ */
|
|
1098
|
+
if (t.test(e)) return /* @__PURE__ */ V("a", {
|
|
975
1099
|
href: e,
|
|
976
1100
|
target: "_blank",
|
|
977
1101
|
rel: "noopener noreferrer",
|
|
@@ -979,7 +1103,7 @@ function Ke(e) {
|
|
|
979
1103
|
children: e
|
|
980
1104
|
}, r);
|
|
981
1105
|
let i = e.split(n);
|
|
982
|
-
return e.match(n) ? i.map((e, t) => t % 2 == 1 ? /* @__PURE__ */
|
|
1106
|
+
return e.match(n) ? i.map((e, t) => t % 2 == 1 ? /* @__PURE__ */ V("strong", {
|
|
983
1107
|
className: "padorix:font-bold",
|
|
984
1108
|
children: e
|
|
985
1109
|
}, `b-${t}`) : e) : e;
|
|
@@ -987,9 +1111,9 @@ function Ke(e) {
|
|
|
987
1111
|
}
|
|
988
1112
|
//#endregion
|
|
989
1113
|
//#region lib/chats/chatmessages/chat-message-cover.tsx
|
|
990
|
-
function
|
|
1114
|
+
function Ze(e) {
|
|
991
1115
|
let { workspace: t } = k((e) => e.data), n = "padorix:w-fit padorix:h-fit padorix:max-w-[91%] padorix:relative padorix:bottom-3 padorix:md:max-w-[80%]";
|
|
992
|
-
if (e.isSender) return /* @__PURE__ */
|
|
1116
|
+
if (e.isSender) return /* @__PURE__ */ V(z, {
|
|
993
1117
|
style: { background: e.data?.deleted === l.true ? "" : e.data?.message ? String(t?.widget?.colorScheme) : "" },
|
|
994
1118
|
className: `
|
|
995
1119
|
${n} padorix:ml-auto
|
|
@@ -997,7 +1121,7 @@ function qe(e) {
|
|
|
997
1121
|
${e.data?.deleted === l.true ? "" : e.data?.message ? "padorix:text-white" : "padorix:text-black!"}`,
|
|
998
1122
|
children: e.children
|
|
999
1123
|
});
|
|
1000
|
-
if (!e.isSender) return /* @__PURE__ */
|
|
1124
|
+
if (!e.isSender) return /* @__PURE__ */ V(z, {
|
|
1001
1125
|
className: `${n} padorix:mr-auto
|
|
1002
1126
|
${e.isLastInGroup ? "padorix:rounded-t-xl padorix:rounded-br-xl" : "padorix:rounded-xl"}
|
|
1003
1127
|
${e.data?.deleted === l.true ? "" : e.data?.message ? "padorix:bg-[#f6f6f6] padorix:text-black" : "padorix:text-black!"}`,
|
|
@@ -1006,39 +1130,39 @@ function qe(e) {
|
|
|
1006
1130
|
}
|
|
1007
1131
|
//#endregion
|
|
1008
1132
|
//#region lib/chats/chatmessages/chat-avatar.tsx
|
|
1009
|
-
function
|
|
1010
|
-
return /* @__PURE__ */
|
|
1133
|
+
function Qe(e) {
|
|
1134
|
+
return /* @__PURE__ */ V(de, {
|
|
1011
1135
|
direction: "up",
|
|
1012
|
-
children: /* @__PURE__ */
|
|
1136
|
+
children: /* @__PURE__ */ V("div", {
|
|
1013
1137
|
className: "padorix:self-end padorix:mb-3 padorix:w-10",
|
|
1014
|
-
children: e.isLastInGroup ? /* @__PURE__ */
|
|
1138
|
+
children: e.isLastInGroup ? /* @__PURE__ */ V("div", {
|
|
1015
1139
|
className: "padorix:size-8",
|
|
1016
|
-
children: /* @__PURE__ */
|
|
1140
|
+
children: /* @__PURE__ */ V("img", {
|
|
1017
1141
|
src: e.img,
|
|
1018
1142
|
alt: "Padorix",
|
|
1019
1143
|
className: "padorix:size-8 padorix:border-2 padorix:rounded-full padorix:shadow-md padorix:border-white"
|
|
1020
1144
|
})
|
|
1021
|
-
}) : /* @__PURE__ */
|
|
1145
|
+
}) : /* @__PURE__ */ V("div", { className: "padorix:size-10" })
|
|
1022
1146
|
})
|
|
1023
1147
|
});
|
|
1024
1148
|
}
|
|
1025
1149
|
//#endregion
|
|
1026
1150
|
//#region lib/chats/chatmessages/chat-delete-selector.tsx
|
|
1027
|
-
function
|
|
1151
|
+
function $e(e) {
|
|
1028
1152
|
let { workspace: t } = k((e) => e.data), n = e.messagesToDelete?.find((t) => t === e.data?.id);
|
|
1029
|
-
return /* @__PURE__ */
|
|
1153
|
+
return /* @__PURE__ */ V("div", {
|
|
1030
1154
|
style: { background: n ? String(t?.widget?.colorScheme) : "#e4e4e7" },
|
|
1031
1155
|
onClick: () => e.handleDeleteAction(e.data?.id),
|
|
1032
1156
|
className: "padorix:size-6 padorix:rounded-md padorix:border padorix:border-gray-300 padorix:text-base padorix:cursor-pointer padorix:transition-all padorix:mb-3 padorix:absolute padorix:top-0 padorix:z-10 padorix:active:scale-150",
|
|
1033
|
-
children: /* @__PURE__ */
|
|
1157
|
+
children: /* @__PURE__ */ V("div", {
|
|
1034
1158
|
className: "padorix:size-6 padorix:flex padorix:items-center padorix:justify-center",
|
|
1035
|
-
children:
|
|
1159
|
+
children: V(n ? Ae : De, { className: "padorix:text-white" })
|
|
1036
1160
|
})
|
|
1037
1161
|
});
|
|
1038
1162
|
}
|
|
1039
1163
|
//#endregion
|
|
1040
1164
|
//#region lib/chats/chatmessages/chat-image-viewer.tsx
|
|
1041
|
-
function
|
|
1165
|
+
function et(e) {
|
|
1042
1166
|
let t = e.data?.images, n = [];
|
|
1043
1167
|
if (Array.isArray(t)) n = t.filter((e) => typeof e == "string" && e.length > 0);
|
|
1044
1168
|
else if (typeof t == "string") try {
|
|
@@ -1047,11 +1171,11 @@ function Xe(e) {
|
|
|
1047
1171
|
} catch {
|
|
1048
1172
|
n = t.length > 0 ? [t] : [];
|
|
1049
1173
|
}
|
|
1050
|
-
return /* @__PURE__ */
|
|
1174
|
+
return /* @__PURE__ */ V("div", {
|
|
1051
1175
|
className: "padorix:min-w-0 padorix:max-w-full",
|
|
1052
|
-
children: n.length > 0 && /* @__PURE__ */
|
|
1176
|
+
children: n.length > 0 && /* @__PURE__ */ V("div", {
|
|
1053
1177
|
className: "padorix:flex padorix:min-w-0 padorix:max-w-full padorix:flex-col padorix:items-end padorix:gap-1",
|
|
1054
|
-
children: n.map((e, t) => /* @__PURE__ */
|
|
1178
|
+
children: n.map((e, t) => /* @__PURE__ */ V("img", {
|
|
1055
1179
|
src: e,
|
|
1056
1180
|
alt: "Attachment",
|
|
1057
1181
|
loading: "lazy",
|
|
@@ -1063,7 +1187,7 @@ function Xe(e) {
|
|
|
1063
1187
|
}
|
|
1064
1188
|
//#endregion
|
|
1065
1189
|
//#region lib/chats/chatmessages/chat-reply.tsx
|
|
1066
|
-
function
|
|
1190
|
+
function tt(e) {
|
|
1067
1191
|
if (Array.isArray(e)) return e.filter((e) => typeof e == "string" && e.length > 0);
|
|
1068
1192
|
if (typeof e == "string" && e.length > 0) try {
|
|
1069
1193
|
let t = JSON.parse(e);
|
|
@@ -1073,17 +1197,17 @@ function Ze(e) {
|
|
|
1073
1197
|
}
|
|
1074
1198
|
return [];
|
|
1075
1199
|
}
|
|
1076
|
-
function
|
|
1077
|
-
let t = e.data?.replies?.[0], n = t?.id ?
|
|
1078
|
-
if (t?.id) return /* @__PURE__ */
|
|
1200
|
+
function nt(e) {
|
|
1201
|
+
let t = e.data?.replies?.[0], n = t?.id ? tt(t?.repliedTo?.images) : [], r = tt(t?.repliedTo?.message).join(" ");
|
|
1202
|
+
if (t?.id) return /* @__PURE__ */ V("div", {
|
|
1079
1203
|
className: "padorix:px-0.5 padorix:pt-0.5",
|
|
1080
|
-
children: /* @__PURE__ */
|
|
1204
|
+
children: /* @__PURE__ */ H("div", {
|
|
1081
1205
|
onClick: () => e.handleScrollToTargetMessage(String(t?.replyId)),
|
|
1082
1206
|
className: `padorix:flex padorix:flex-row padorix:items-center padorix:gap-1 padorix:p-2 padorix:mb-1 padorix:text-xs padorix:rounded padorix:border-l-4 padorix:border-white padorix:cursor-pointer padorix:hover:brightness-95 padorix:transition-all ${e.isSender ? "padorix:bg-black/20 padorix:text-gray-200" : "padorix:bg-gray-200 padorix:text-gray-700"}`,
|
|
1083
|
-
children: [/* @__PURE__ */
|
|
1207
|
+
children: [/* @__PURE__ */ H("div", {
|
|
1084
1208
|
className: "padorix:w-full",
|
|
1085
1209
|
children: [r.slice(0, 40), r.length > 40 ? "..." : ""]
|
|
1086
|
-
}), n?.length > 0 && /* @__PURE__ */
|
|
1210
|
+
}), n?.length > 0 && /* @__PURE__ */ V("div", { children: /* @__PURE__ */ V("img", {
|
|
1087
1211
|
src: n[0],
|
|
1088
1212
|
alt: "Padorix",
|
|
1089
1213
|
className: "padorix:size-6"
|
|
@@ -1093,7 +1217,7 @@ function Qe(e) {
|
|
|
1093
1217
|
}
|
|
1094
1218
|
//#endregion
|
|
1095
1219
|
//#region lib/chats/chatmessages/single-message-pop.tsx
|
|
1096
|
-
function
|
|
1220
|
+
function rt(t) {
|
|
1097
1221
|
let n = O(), { reply: i, conversation: a, workspace: o } = k((e) => e.data), s = v(o?.widget?.darkMode, !1);
|
|
1098
1222
|
function c(e) {
|
|
1099
1223
|
e.stopPropagation(), t.setOpens((e) => !e);
|
|
@@ -1134,7 +1258,7 @@ function $e(t) {
|
|
|
1134
1258
|
t.handleClick();
|
|
1135
1259
|
}
|
|
1136
1260
|
let h = Array.isArray(t.data.images) && t.data.images.length > 0;
|
|
1137
|
-
return /* @__PURE__ */
|
|
1261
|
+
return /* @__PURE__ */ H(G, {
|
|
1138
1262
|
opened: t.opens,
|
|
1139
1263
|
onChange: t.setOpens,
|
|
1140
1264
|
position: "top",
|
|
@@ -1142,11 +1266,11 @@ function $e(t) {
|
|
|
1142
1266
|
withinPortal: !0,
|
|
1143
1267
|
portalProps: { target: b() },
|
|
1144
1268
|
zIndex: 2147483647,
|
|
1145
|
-
children: [/* @__PURE__ */
|
|
1269
|
+
children: [/* @__PURE__ */ V(G.Target, { children: /* @__PURE__ */ V("div", {
|
|
1146
1270
|
onClick: c,
|
|
1147
1271
|
className: `padorix:absolute padorix:top-0 padorix:cursor-pointer padorix:size-fit padorix:text-lg padorix:transition-all padorix:hover:scale-110 ${t.isSender, "padorix:-right-5"}`,
|
|
1148
|
-
children: /* @__PURE__ */
|
|
1149
|
-
}) }), /* @__PURE__ */
|
|
1272
|
+
children: /* @__PURE__ */ V(He, { style: { color: String(o?.widget?.colorScheme) } })
|
|
1273
|
+
}) }), /* @__PURE__ */ V(G.Dropdown, {
|
|
1150
1274
|
className: s ? "padorix-dark" : void 0,
|
|
1151
1275
|
styles: { dropdown: {
|
|
1152
1276
|
padding: 0,
|
|
@@ -1155,45 +1279,45 @@ function $e(t) {
|
|
|
1155
1279
|
border: 0,
|
|
1156
1280
|
backgroundColor: s ? "#2a3549" : "#fff"
|
|
1157
1281
|
} },
|
|
1158
|
-
children: /* @__PURE__ */
|
|
1282
|
+
children: /* @__PURE__ */ H("div", {
|
|
1159
1283
|
className: "padorix:text-xs padorix:text-gray-800 padorix:dark:bg-[#2a3549] padorix:dark:text-white padorix:rounded-lg",
|
|
1160
1284
|
children: [
|
|
1161
|
-
a?.status === l.true && /* @__PURE__ */
|
|
1285
|
+
a?.status === l.true && /* @__PURE__ */ H("div", {
|
|
1162
1286
|
onClick: u,
|
|
1163
1287
|
className: "padorix:p-2 padorix:cursor-pointer padorix:flex padorix:items-center padorix:rounded-tr-lg padorix:rounded-tl-lg padorix:hover:bg-gray-100 padorix:hover:dark:bg-gray-600 padorix:transition-all",
|
|
1164
|
-
children: [/* @__PURE__ */
|
|
1288
|
+
children: [/* @__PURE__ */ V(I, { className: "padorix:inline padorix:size-4 padorix:mr-3" }), " Reply"]
|
|
1165
1289
|
}),
|
|
1166
|
-
t.isMessage && /* @__PURE__ */
|
|
1290
|
+
t.isMessage && /* @__PURE__ */ H("div", {
|
|
1167
1291
|
onClick: f,
|
|
1168
1292
|
className: "padorix:p-2 padorix:cursor-pointer padorix:flex padorix:items-center padorix:hover:bg-gray-100 padorix:hover:dark:bg-gray-600 padorix:transition-all",
|
|
1169
|
-
children: [/* @__PURE__ */
|
|
1293
|
+
children: [/* @__PURE__ */ V(ie, { className: "padorix:inline padorix:size-4 padorix:mr-3" }), " Copy"]
|
|
1170
1294
|
}),
|
|
1171
|
-
h && /* @__PURE__ */
|
|
1295
|
+
h && /* @__PURE__ */ H("div", {
|
|
1172
1296
|
onClick: p,
|
|
1173
1297
|
className: "padorix:p-2 padorix:cursor-pointer padorix:flex padorix:items-center padorix:hover:bg-gray-100 padorix:hover:dark:bg-gray-600 padorix:transition-all",
|
|
1174
1298
|
children: [
|
|
1175
|
-
/* @__PURE__ */
|
|
1299
|
+
/* @__PURE__ */ V(Oe, { className: "padorix:inline padorix:size-4 padorix:mr-3" }),
|
|
1176
1300
|
" Download image",
|
|
1177
1301
|
t.data.images.length > 1 ? "s" : ""
|
|
1178
1302
|
]
|
|
1179
1303
|
}),
|
|
1180
|
-
a?.status === l.true && /* @__PURE__ */
|
|
1304
|
+
a?.status === l.true && /* @__PURE__ */ H("div", {
|
|
1181
1305
|
onClick: () => d(t.data?.starred === l.true ? l.false : l.true),
|
|
1182
1306
|
className: "padorix:p-2 padorix:cursor-pointer padorix:flex padorix:items-center padorix:hover:bg-gray-100 padorix:hover:dark:bg-gray-600 padorix:transition-all",
|
|
1183
1307
|
children: [
|
|
1184
|
-
/* @__PURE__ */
|
|
1308
|
+
/* @__PURE__ */ V(ce, { className: "padorix:inline padorix:size-4 padorix:mr-3" }),
|
|
1185
1309
|
" ",
|
|
1186
1310
|
t.data?.starred === l.true ? "Unstar" : "Star",
|
|
1187
|
-
t.data?.starred === l.true && /* @__PURE__ */
|
|
1311
|
+
t.data?.starred === l.true && /* @__PURE__ */ V(Ge, { className: "padorix:size-2 padorix:inline padorix:text-amber-400 padorix:ml-1" })
|
|
1188
1312
|
]
|
|
1189
1313
|
}),
|
|
1190
1314
|
t.moreActions,
|
|
1191
|
-
a?.status === l.true && t.isSender && t.canDeleteMessage && /* @__PURE__ */
|
|
1315
|
+
a?.status === l.true && t.isSender && t.canDeleteMessage && /* @__PURE__ */ V("div", {
|
|
1192
1316
|
className: "padorix:border-t padorix:border-gray-200 padorix:dark:border-gray-500",
|
|
1193
|
-
children: /* @__PURE__ */
|
|
1317
|
+
children: /* @__PURE__ */ H("div", {
|
|
1194
1318
|
onClick: () => t.handleDeleteAction(t.data?.id),
|
|
1195
1319
|
className: "padorix:p-2 padorix:cursor-pointer padorix:flex padorix:items-center padorix:rounded-br-lg padorix:rounded-bl-lg padorix:text-red-500 padorix:dark:text-red-400 padorix:hover:bg-red-50 padorix:hover:dark:bg-gray-600 padorix:transition-all",
|
|
1196
|
-
children: [/* @__PURE__ */
|
|
1320
|
+
children: [/* @__PURE__ */ V(le, { className: "padorix:inline padorix:size-4 padorix:mr-3" }), " Delete"]
|
|
1197
1321
|
})
|
|
1198
1322
|
})
|
|
1199
1323
|
]
|
|
@@ -1203,7 +1327,7 @@ function $e(t) {
|
|
|
1203
1327
|
}
|
|
1204
1328
|
//#endregion
|
|
1205
1329
|
//#region lib/chats/chatmessages/chat-single-message.tsx
|
|
1206
|
-
function
|
|
1330
|
+
function it({ data: e, messagesToDelete: t, deleteAction: n, handleStarMessage: r, messages: i, userType: a, moreActions: o }) {
|
|
1207
1331
|
let [s, c] = A.useState(!1), [u, d] = A.useState(!1), { workspace: f } = k((e) => e.data), p = String(e?.message ?? "").trim().length > 0, m = a === "VISITOR", h = f?.widget?.notifications?.customerDeletesMessage === l.true, g = !m || h, _ = m ? e?.senderType === "VISITOR" : e?.senderType !== "VISITOR", v = A.useMemo(() => {
|
|
1208
1332
|
if (!i?.length || !e?.id) return !1;
|
|
1209
1333
|
let t = i.findIndex((t) => t.id === e.id);
|
|
@@ -1249,7 +1373,7 @@ function et({ data: e, messagesToDelete: t, deleteAction: n, handleStarMessage:
|
|
|
1249
1373
|
return () => {
|
|
1250
1374
|
window.clearTimeout(e);
|
|
1251
1375
|
};
|
|
1252
|
-
}, [u]), /* @__PURE__ */ B
|
|
1376
|
+
}, [u]), /* @__PURE__ */ V(B, { children: /* @__PURE__ */ H("div", {
|
|
1253
1377
|
id: `padorix-msg-${e.id}`,
|
|
1254
1378
|
className: `
|
|
1255
1379
|
padorix:flex
|
|
@@ -1264,22 +1388,22 @@ function et({ data: e, messagesToDelete: t, deleteAction: n, handleStarMessage:
|
|
|
1264
1388
|
${u ? "padorix:bg-gray-100/80 padorix:scale-[1.01]" : "padorix:bg-transparent"}
|
|
1265
1389
|
`,
|
|
1266
1390
|
children: [
|
|
1267
|
-
!_ && /* @__PURE__ */
|
|
1391
|
+
!_ && /* @__PURE__ */ V(Qe, {
|
|
1268
1392
|
isLastInGroup: v,
|
|
1269
1393
|
img: String(f?.logo ?? "")
|
|
1270
1394
|
}),
|
|
1271
|
-
g && t?.length > 0 && e?.deleted === l.false && /* @__PURE__ */
|
|
1395
|
+
g && t?.length > 0 && e?.deleted === l.false && /* @__PURE__ */ V($e, {
|
|
1272
1396
|
data: e,
|
|
1273
1397
|
handleDeleteAction: b,
|
|
1274
1398
|
messagesToDelete: t
|
|
1275
1399
|
}),
|
|
1276
|
-
/* @__PURE__ */
|
|
1400
|
+
/* @__PURE__ */ V(Ze, {
|
|
1277
1401
|
isLastInGroup: v,
|
|
1278
1402
|
isSender: _,
|
|
1279
1403
|
data: e,
|
|
1280
|
-
children: /* @__PURE__ */
|
|
1404
|
+
children: /* @__PURE__ */ H("div", {
|
|
1281
1405
|
className: "padorix:w-full padorix:px-1",
|
|
1282
|
-
children: [e?.deleted === l.false && /* @__PURE__ */
|
|
1406
|
+
children: [e?.deleted === l.false && /* @__PURE__ */ V(rt, {
|
|
1283
1407
|
data: e,
|
|
1284
1408
|
deleteAction: n,
|
|
1285
1409
|
handleStarMessage: r,
|
|
@@ -1291,84 +1415,84 @@ function et({ data: e, messagesToDelete: t, deleteAction: n, handleStarMessage:
|
|
|
1291
1415
|
opens: s,
|
|
1292
1416
|
moreActions: o,
|
|
1293
1417
|
canDeleteMessage: g
|
|
1294
|
-
}), /* @__PURE__ */
|
|
1418
|
+
}), /* @__PURE__ */ V("div", {
|
|
1295
1419
|
className: "padorix:p-1 padorix:whitespace-pre-wrap",
|
|
1296
|
-
children: e?.deleted === l.true ? /* @__PURE__ */
|
|
1420
|
+
children: e?.deleted === l.true ? /* @__PURE__ */ H("div", {
|
|
1297
1421
|
className: "padorix:italic padorix:px-3 padorix:py-2 padorix:rounded-lg padorix:bg-gray-200/60 padorix:text-gray-500 padorix:text-sm padorix:flex padorix:items-center padorix:gap-2",
|
|
1298
|
-
children: [/* @__PURE__ */
|
|
1299
|
-
}) : /* @__PURE__ */
|
|
1300
|
-
/* @__PURE__ */
|
|
1422
|
+
children: [/* @__PURE__ */ V(Ye, {}), /* @__PURE__ */ V("span", { children: "This message was deleted" })]
|
|
1423
|
+
}) : /* @__PURE__ */ H(B, { children: [
|
|
1424
|
+
/* @__PURE__ */ V(nt, {
|
|
1301
1425
|
data: e,
|
|
1302
1426
|
isSender: _,
|
|
1303
1427
|
handleScrollToTargetMessage: x
|
|
1304
1428
|
}),
|
|
1305
|
-
/* @__PURE__ */
|
|
1306
|
-
p && /* @__PURE__ */
|
|
1429
|
+
/* @__PURE__ */ V(et, { data: e }),
|
|
1430
|
+
p && /* @__PURE__ */ V("div", {
|
|
1307
1431
|
className: "padorix:text-[0.8rem] padorix:whitespace-pre-wrap padorix:mt-2",
|
|
1308
|
-
children:
|
|
1432
|
+
children: Xe(String(e.message))
|
|
1309
1433
|
}),
|
|
1310
|
-
/* @__PURE__ */
|
|
1434
|
+
/* @__PURE__ */ H("div", {
|
|
1311
1435
|
className: "padorix:text-right padorix:text-[12px] padorix:mt-1 padorix:flex padorix:items-center padorix:justify-end padorix:gap-1 padorix:pl-2",
|
|
1312
1436
|
children: [
|
|
1313
|
-
!m && /* @__PURE__ */
|
|
1437
|
+
!m && /* @__PURE__ */ H(B, { children: [/* @__PURE__ */ V("span", {
|
|
1314
1438
|
className: "padorix:text-[0.65rem]",
|
|
1315
1439
|
children: e?.senderType
|
|
1316
|
-
}), /* @__PURE__ */
|
|
1317
|
-
/* @__PURE__ */
|
|
1440
|
+
}), /* @__PURE__ */ V(se, {})] }),
|
|
1441
|
+
/* @__PURE__ */ V("span", {
|
|
1318
1442
|
className: "padorix:text-[0.55rem]",
|
|
1319
|
-
children:
|
|
1443
|
+
children: K(e?.createdAt).format("hh:mm A")
|
|
1320
1444
|
}),
|
|
1321
|
-
e?.starred === l.true && /* @__PURE__ */
|
|
1322
|
-
_ && /* @__PURE__ */
|
|
1445
|
+
e?.starred === l.true && /* @__PURE__ */ V(ue, { children: /* @__PURE__ */ V(Ge, { className: "padorix:size-3 padorix:text-amber-400" }) }),
|
|
1446
|
+
_ && /* @__PURE__ */ V(Je, { className: "padorix:inline padorix:text-base padorix:size-3" })
|
|
1323
1447
|
]
|
|
1324
1448
|
})
|
|
1325
1449
|
] })
|
|
1326
1450
|
})]
|
|
1327
1451
|
})
|
|
1328
1452
|
}),
|
|
1329
|
-
m ? e?.deleted === l.false && _ && /* @__PURE__ */
|
|
1453
|
+
m ? e?.deleted === l.false && _ && /* @__PURE__ */ V(Qe, {
|
|
1330
1454
|
isLastInGroup: v,
|
|
1331
1455
|
img: "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAIAAAACACAMAAAD04JH5AAADAFBMVEVMaXFUVFRVYH8AAABTU6lVYID///9UX4B7e39VYH+qt/9VYIBVX4BMV3nm6+xVYIDn6+xKXH9OWnu0u8dtrq5JVXfm6+xVYIBJVHZNWXrm6+zq7+9VYIChqbhXY4JUX4ChqrlVX4Hd4uVRYICvt8NVYYFXYoJWYIFzfJZVYYFVYIFVYIFVYIDs8fHK0Njt8vFVYIBTXn5KVnfn7e1UYIBVYIHIztZWYIHx9fRWYoKkrLtWYIFWYoNXYYJXX4FWYYFWYYJWYoJdZ4ZXYoJrdpHl6utVYIBVYH9rdZBWYYFVYIBWXX1UXnzn7OxUX4BVYIBbZoRWYYDh5ulVYYJWYYHu8/N+h57CydJ7hZ1VYYFeaYdWYYG/xtCpsL9aZIRaZYOLk6jw9PPl6etWYYLv8/fr9fC/zL+yusagqLjp7e6zucbX3eJPW3tRXH1gaoja4OSutMPGzNTk6Oqmrr1XV4dVX4Dn7O3n7O3n7O3m7Ozm6utVYH/o7O1WYYBUXn5WYYHm6+tVYH93gZq////a3+Tn6uywt8SOl6zl7O3T2N5oc49GUnbM0tllb4ypsL5dZ39ra4zV299RXH1VW35UYYDm6uuEjaNbZoXo6+/O1Nrq7/C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w2hI/nshJDy4//uegLiYrDYEeupeOJgwVPfnILx0aEtXXSI0JPAP67q2HHo4Ju65OmkT1tC8nW+FejqrDWkCIBKx9/au0FsfzcMqvl+NYmTcm2x88P0/dXaFvByIxMF9pxmqvaFTdZ++f3AjitHbX/gAlHvchocP7Bt2+lR3uzfRYOBwJPY6xp4NhupAe/ep0LB9Bx7c0LuLxNrU93MYEr786rO//s3Q3nWq53RdvddrNHq99XWne051tRv+8a8DX33J/yh23A/MEJv4fzZ+fvDv33y9f++nXwxLS1v3xV/27v/6m38enLeBL3cTNony/n9GHU2UlcLeHAAAAABJRU5ErkJggg=="
|
|
1332
|
-
}) : /* @__PURE__ */
|
|
1456
|
+
}) : /* @__PURE__ */ V("div", { className: "padorix:size-7" })
|
|
1333
1457
|
]
|
|
1334
1458
|
}) });
|
|
1335
1459
|
}
|
|
1336
1460
|
//#endregion
|
|
1337
1461
|
//#region lib/chats/newchat/chat-input.tsx
|
|
1338
|
-
var $ = M(({ type: e = "text", formtype: t = "input", ...n }, r) => /* @__PURE__ */
|
|
1462
|
+
var $ = M(({ type: e = "text", formtype: t = "input", ...n }, r) => /* @__PURE__ */ V(z, { children: /* @__PURE__ */ H("div", {
|
|
1339
1463
|
className: "padorix:mb-4",
|
|
1340
1464
|
children: [
|
|
1341
|
-
/* @__PURE__ */
|
|
1465
|
+
/* @__PURE__ */ H("div", {
|
|
1342
1466
|
className: "padorix:mb-1 padorix:ml-2 padorix:text-[0.8rem] padorix:font-medium",
|
|
1343
1467
|
children: [
|
|
1344
1468
|
n.content,
|
|
1345
1469
|
" ",
|
|
1346
|
-
/* @__PURE__ */
|
|
1470
|
+
/* @__PURE__ */ V("span", {
|
|
1347
1471
|
className: "padorix:text-red-600",
|
|
1348
1472
|
children: "*"
|
|
1349
1473
|
}),
|
|
1350
1474
|
" "
|
|
1351
1475
|
]
|
|
1352
1476
|
}),
|
|
1353
|
-
t === "input" && /* @__PURE__ */
|
|
1477
|
+
t === "input" && /* @__PURE__ */ V("input", {
|
|
1354
1478
|
type: e,
|
|
1355
1479
|
...n,
|
|
1356
1480
|
ref: r,
|
|
1357
1481
|
placeholder: n.placeholder,
|
|
1358
1482
|
className: `padorix:w-full padorix:bg-slate-100 padorix:rounded-md padorix:p-3 padorix:outline-none padorix:text-sm! padorix:max-md:text-base! padorix:border ${n.error ? "padorix:border-red-400" : "padorix:border-transparent"}`
|
|
1359
1483
|
}),
|
|
1360
|
-
t === "textarea" && /* @__PURE__ */
|
|
1484
|
+
t === "textarea" && /* @__PURE__ */ V("textarea", {
|
|
1361
1485
|
...n,
|
|
1362
1486
|
ref: r,
|
|
1363
1487
|
placeholder: "Leave a message",
|
|
1364
1488
|
className: `padorix:w-full padorix:bg-slate-100 padorix-scrolls padorix:rounded-md padorix:p-3 padorix:outline-none padorix:resize-none padorix:text-sm! padorix:max-md:text-base! padorix:h-24 padorix:border ${n.error ? "padorix:border-red-400" : "padorix:border-transparent"}`
|
|
1365
1489
|
}),
|
|
1366
|
-
n.error && /* @__PURE__ */
|
|
1490
|
+
n.error && /* @__PURE__ */ V("div", {
|
|
1367
1491
|
className: "padorix:text-red-400 padorix:text-xs",
|
|
1368
1492
|
children: n.error
|
|
1369
1493
|
})
|
|
1370
1494
|
]
|
|
1371
|
-
}) })),
|
|
1495
|
+
}) })), at = [
|
|
1372
1496
|
{
|
|
1373
1497
|
index: 1,
|
|
1374
1498
|
color: "padorix:text-red-600"
|
|
@@ -1390,31 +1514,31 @@ var $ = M(({ type: e = "text", formtype: t = "input", ...n }, r) => /* @__PURE__
|
|
|
1390
1514
|
color: "padorix:text-green-400"
|
|
1391
1515
|
}
|
|
1392
1516
|
];
|
|
1393
|
-
function
|
|
1517
|
+
function ot(e) {
|
|
1394
1518
|
function t(t) {
|
|
1395
1519
|
let n = t?.split("-")[1];
|
|
1396
1520
|
if (e.value !== t) return e.setFieldValue?.(e.valueName || "", t), e.setFieldValue2?.(e.valueName2 || "", n);
|
|
1397
1521
|
e.setFieldValue?.(e.valueName || "", ""), e.setFieldValue2?.(e.valueName2 || "", "");
|
|
1398
1522
|
}
|
|
1399
|
-
return /* @__PURE__ */
|
|
1523
|
+
return /* @__PURE__ */ H("div", {
|
|
1400
1524
|
className: "padorix:mb-5",
|
|
1401
1525
|
children: [
|
|
1402
|
-
/* @__PURE__ */
|
|
1526
|
+
/* @__PURE__ */ V("div", {
|
|
1403
1527
|
className: "",
|
|
1404
1528
|
children: e.content
|
|
1405
1529
|
}),
|
|
1406
|
-
/* @__PURE__ */
|
|
1530
|
+
/* @__PURE__ */ V("div", {
|
|
1407
1531
|
className: "padorix:flex padorix:items-center padorix:gap-3",
|
|
1408
1532
|
children: Object.values(y).map((n, r) => {
|
|
1409
|
-
let i = Object.values(y).findIndex((t) => t?.split("-")[1] === e.value2) + 1, a = r + 1 <= i, o =
|
|
1410
|
-
return /* @__PURE__ */
|
|
1533
|
+
let i = Object.values(y).findIndex((t) => t?.split("-")[1] === e.value2) + 1, a = r + 1 <= i, o = at.find((e) => e.index === i);
|
|
1534
|
+
return /* @__PURE__ */ V("div", {
|
|
1411
1535
|
onClick: () => e.tag === "write" ? t(n) : {},
|
|
1412
1536
|
className: `${e.tag === "write" ? "padorix:cursor-pointer padorix:active:scale-125 padorix:transition-all padorix:hover:scale-110" : ""} padorix:text-3xl`,
|
|
1413
|
-
children: /* @__PURE__ */
|
|
1537
|
+
children: /* @__PURE__ */ V(Ge, { className: a ? o?.color : "padorix:text-gray-400" })
|
|
1414
1538
|
}, r);
|
|
1415
1539
|
})
|
|
1416
1540
|
}),
|
|
1417
|
-
/* @__PURE__ */
|
|
1541
|
+
/* @__PURE__ */ V("div", {
|
|
1418
1542
|
className: "padorix:mt-2 padorix:text-sm padorix:italic padorix:text-gray-600",
|
|
1419
1543
|
children: e.value?.split("-")[0]?.replace("_", " ")
|
|
1420
1544
|
})
|
|
@@ -1423,8 +1547,8 @@ function nt(e) {
|
|
|
1423
1547
|
}
|
|
1424
1548
|
//#endregion
|
|
1425
1549
|
//#region lib/chats/chatmessages/chat-feedback-form.tsx
|
|
1426
|
-
function
|
|
1427
|
-
let { sender: e, conversation: t, workspace: n } = k((e) => e.data), [r, i] = N(!1), a = O(), s =
|
|
1550
|
+
function st() {
|
|
1551
|
+
let { sender: e, conversation: t, workspace: n } = k((e) => e.data), [r, i] = N(!1), a = O(), s = ze(w.VISITOR), c = pe({
|
|
1428
1552
|
mode: "uncontrolled",
|
|
1429
1553
|
initialValues: {
|
|
1430
1554
|
workspaceId: t?.workspaceId,
|
|
@@ -1457,11 +1581,11 @@ function rt() {
|
|
|
1457
1581
|
}
|
|
1458
1582
|
}
|
|
1459
1583
|
}
|
|
1460
|
-
return r ? null : /* @__PURE__ */
|
|
1584
|
+
return r ? null : /* @__PURE__ */ H("form", {
|
|
1461
1585
|
onSubmit: c.onSubmit(l),
|
|
1462
1586
|
className: "padorix:w-[97%] padorix:mx-auto padorix:border padorix:border-gray-200 padorix:rounded-xl padorix:p-3",
|
|
1463
1587
|
children: [
|
|
1464
|
-
/* @__PURE__ */
|
|
1588
|
+
/* @__PURE__ */ V(ot, {
|
|
1465
1589
|
content: "",
|
|
1466
1590
|
value: c.values.satisfactory,
|
|
1467
1591
|
value2: c.values.rating,
|
|
@@ -1478,9 +1602,9 @@ function rt() {
|
|
|
1478
1602
|
...c.getInputProps("comment"),
|
|
1479
1603
|
key: c.key("comment")
|
|
1480
1604
|
}),
|
|
1481
|
-
/* @__PURE__ */
|
|
1605
|
+
/* @__PURE__ */ V("div", {
|
|
1482
1606
|
className: "padorix:mt-5",
|
|
1483
|
-
children: /* @__PURE__ */
|
|
1607
|
+
children: /* @__PURE__ */ V(z, { children: /* @__PURE__ */ V("button", {
|
|
1484
1608
|
style: { background: c.submitting ? "" : String(n?.widget?.colorScheme) },
|
|
1485
1609
|
className: `padorix:cursor-pointer ${c.submitting ? "padorix:bg-slate-500" : ""} padorix:text-white padorix:py-2 padorix:px-5 padorix:rounded-md padorix:text-shadow-lg padorix:hover:-translate-y-2 padorix:transition-all padorix:hover:shadow-md`,
|
|
1486
1610
|
children: "Submit your feedback"
|
|
@@ -1491,7 +1615,7 @@ function rt() {
|
|
|
1491
1615
|
}
|
|
1492
1616
|
//#endregion
|
|
1493
1617
|
//#region lib/chats/chatmessages/end-chat-confirmation.tsx
|
|
1494
|
-
function
|
|
1618
|
+
function ct() {
|
|
1495
1619
|
let { chatToEnd: e, workspace: t } = k((e) => e.data), r = O(), [i, a] = A.useState(!1);
|
|
1496
1620
|
function s() {
|
|
1497
1621
|
r(n(void 0));
|
|
@@ -1514,20 +1638,20 @@ function it() {
|
|
|
1514
1638
|
}
|
|
1515
1639
|
}
|
|
1516
1640
|
}
|
|
1517
|
-
return /* @__PURE__ */
|
|
1641
|
+
return /* @__PURE__ */ H("div", {
|
|
1518
1642
|
className: "padorix:w-[97%] padorix:mx-auto padorix:border padorix:border-gray-200 padorix:rounded-xl padorix:p-3",
|
|
1519
|
-
children: [/* @__PURE__ */
|
|
1643
|
+
children: [/* @__PURE__ */ V("div", {
|
|
1520
1644
|
className: "padorix:text-center padorix:text-slate-500",
|
|
1521
1645
|
children: "Kindly confirm your request to end this chat session"
|
|
1522
|
-
}), /* @__PURE__ */
|
|
1646
|
+
}), /* @__PURE__ */ V("div", {
|
|
1523
1647
|
className: "padorix:border-t padorix:border-gray-200 padorix:mt-5",
|
|
1524
|
-
children: /* @__PURE__ */
|
|
1648
|
+
children: /* @__PURE__ */ H("div", {
|
|
1525
1649
|
className: "padorix:mt-2 padorix:size-fit padorix:ml-auto padorix:flex padorix:items-center padorix:gap-5",
|
|
1526
|
-
children: [/* @__PURE__ */
|
|
1650
|
+
children: [/* @__PURE__ */ V(z, { children: /* @__PURE__ */ V("button", {
|
|
1527
1651
|
onClick: s,
|
|
1528
1652
|
className: `${i ? "padorix:cursor-progress" : "padorix:cursor-pointer"} padorix:border padorix:border-gray-200 padorix:py-2 padorix:px-5 padorix:rounded-md padorix:text-shadow-lg padorix:hover:-translate-y-2 padorix:transition-all padorix:hover:shadow-md`,
|
|
1529
1653
|
children: "Cancel"
|
|
1530
|
-
}) }), /* @__PURE__ */
|
|
1654
|
+
}) }), /* @__PURE__ */ V(z, { children: /* @__PURE__ */ V("button", {
|
|
1531
1655
|
onClick: c,
|
|
1532
1656
|
disabled: i,
|
|
1533
1657
|
style: { background: String(t?.widget?.colorScheme) },
|
|
@@ -1540,15 +1664,15 @@ function it() {
|
|
|
1540
1664
|
}
|
|
1541
1665
|
//#endregion
|
|
1542
1666
|
//#region lib/chats/chatmessages/chat-messages.tsx
|
|
1543
|
-
function
|
|
1667
|
+
function lt({ messagesToDelete: e, setMessagesToDelete: t, ...n }) {
|
|
1544
1668
|
let { conversation: r, chatToEnd: i, workspace: a } = k((e) => e.data), o = n.userType === "VISITOR";
|
|
1545
1669
|
function s(n) {
|
|
1546
1670
|
e.find((e) => e === n) ? t((e) => e.filter((e) => e !== n)) : t((e) => [...e, n]);
|
|
1547
1671
|
}
|
|
1548
|
-
return /* @__PURE__ */
|
|
1672
|
+
return /* @__PURE__ */ H("div", {
|
|
1549
1673
|
className: "padorix:relative",
|
|
1550
1674
|
children: [
|
|
1551
|
-
n.messages.map((t) => /* @__PURE__ */
|
|
1675
|
+
n.messages.map((t) => /* @__PURE__ */ V(it, {
|
|
1552
1676
|
messagesToDelete: e,
|
|
1553
1677
|
handleStarMessage: n.handleStarMessage,
|
|
1554
1678
|
deleteAction: s,
|
|
@@ -1557,8 +1681,8 @@ function at({ messagesToDelete: e, setMessagesToDelete: t, ...n }) {
|
|
|
1557
1681
|
messages: n.messages,
|
|
1558
1682
|
userType: n.userType,
|
|
1559
1683
|
moreActions: n.moreActions
|
|
1560
|
-
}, t.id)),
|
|
1561
|
-
n.isTyping && /* @__PURE__ */
|
|
1684
|
+
}, t.clientMessageId || t.id)),
|
|
1685
|
+
n.isTyping && /* @__PURE__ */ V("div", {
|
|
1562
1686
|
role: "status",
|
|
1563
1687
|
"aria-label": "Typing",
|
|
1564
1688
|
style: n.isOwnTyping ? { backgroundColor: a?.widget?.colorScheme || "#6c63ff" } : void 0,
|
|
@@ -1567,19 +1691,19 @@ function at({ messagesToDelete: e, setMessagesToDelete: t, ...n }) {
|
|
|
1567
1691
|
0,
|
|
1568
1692
|
1,
|
|
1569
1693
|
2
|
|
1570
|
-
].map((e) => /* @__PURE__ */
|
|
1694
|
+
].map((e) => /* @__PURE__ */ V("span", {
|
|
1571
1695
|
className: n.isOwnTyping ? "padorix:size-2 padorix:animate-bounce padorix:rounded-full padorix:bg-white" : "padorix:size-2 padorix:animate-bounce padorix:rounded-full padorix:bg-gray-500 padorix:dark:bg-gray-200",
|
|
1572
1696
|
style: { animationDelay: `${e * 120}ms` }
|
|
1573
1697
|
}, e))
|
|
1574
1698
|
}),
|
|
1575
|
-
o && r?.status === l.false && /* @__PURE__ */
|
|
1576
|
-
i?.isEndChat === l.true && /* @__PURE__ */
|
|
1699
|
+
o && r?.status === l.false && /* @__PURE__ */ V(st, {}),
|
|
1700
|
+
i?.isEndChat === l.true && /* @__PURE__ */ V(ct, {})
|
|
1577
1701
|
]
|
|
1578
1702
|
});
|
|
1579
1703
|
}
|
|
1580
1704
|
//#endregion
|
|
1581
1705
|
//#region node_modules/react-icons/rx/index.mjs
|
|
1582
|
-
function
|
|
1706
|
+
function ut(e) {
|
|
1583
1707
|
return Z({
|
|
1584
1708
|
tag: "svg",
|
|
1585
1709
|
attr: {
|
|
@@ -1598,37 +1722,37 @@ function ot(e) {
|
|
|
1598
1722
|
}
|
|
1599
1723
|
//#endregion
|
|
1600
1724
|
//#region lib/chats/chatmessages/chat-message-skeleton.tsx
|
|
1601
|
-
function
|
|
1602
|
-
return /* @__PURE__ */
|
|
1725
|
+
function dt(e) {
|
|
1726
|
+
return /* @__PURE__ */ V(z, {
|
|
1603
1727
|
style: { width: `${Math.floor(Math.random() * 100 + (e.index + 15))}%` },
|
|
1604
1728
|
className: "padorix:w-fit padorix:h-fit padorix:max-w-[91%] padorix:relative padorix:bottom-3 padorix:md:max-w-[80%] padorix:mb-1.5 padorix:ml-auto padorix:rounded-t-xl padorix:rounded-bl-xl padorix:bg-gray-100 padorix:animate-pulse padorix:text-white",
|
|
1605
|
-
children: /* @__PURE__ */
|
|
1729
|
+
children: /* @__PURE__ */ V("div", { className: "padorix:px-1 padorix:h-12" })
|
|
1606
1730
|
});
|
|
1607
1731
|
}
|
|
1608
1732
|
//#endregion
|
|
1609
1733
|
//#region lib/chats/chatScreen/chat-container.tsx
|
|
1610
|
-
var
|
|
1611
|
-
function
|
|
1734
|
+
var ft = 3500;
|
|
1735
|
+
function pt(e) {
|
|
1612
1736
|
return e ? Array.isArray(e) ? e.join("\n") : String(e) : "";
|
|
1613
1737
|
}
|
|
1614
|
-
function
|
|
1615
|
-
let s = O(), c = A.useRef(null), u = A.useRef(null), [m, h] = A.useState(!1), [g, _] = A.useState([]), [v, y] = A.useState(!1), [b, x] = A.useState(!1), [S, C] = A.useState(null), T = A.useRef(null), j = A.useRef(null), [M, N] = A.useState([]), P = A.useRef(/* @__PURE__ */ new Set()), { sender: F, workspace:
|
|
1738
|
+
function mt({ styles: t, userType: i, ...a }) {
|
|
1739
|
+
let s = O(), c = A.useRef(null), u = A.useRef(null), [m, h] = A.useState(!1), [g, _] = A.useState([]), [v, y] = A.useState(!1), [b, x] = A.useState(!1), [S, C] = A.useState(null), T = A.useRef(null), j = A.useRef(null), [M, N] = A.useState([]), P = A.useRef(/* @__PURE__ */ new Set()), { sender: F, workspace: I, reply: re, conversation: ie } = k((e) => e.data), ae = S !== null, oe = !!(S?.senderId && S.senderId === F?.senderId), L = A.useMemo(() => i === w.VISITOR ? {
|
|
1616
1740
|
...F,
|
|
1617
|
-
workspaceId:
|
|
1741
|
+
workspaceId: I?.id,
|
|
1618
1742
|
userType: i
|
|
1619
1743
|
} : a.sender, [
|
|
1620
1744
|
i,
|
|
1621
1745
|
F,
|
|
1622
|
-
|
|
1746
|
+
I?.id,
|
|
1623
1747
|
a.sender
|
|
1624
|
-
]),
|
|
1625
|
-
|
|
1626
|
-
|
|
1627
|
-
|
|
1628
|
-
|
|
1629
|
-
|
|
1630
|
-
]),
|
|
1631
|
-
let [e, t, n, r, i] = JSON.parse(
|
|
1748
|
+
]), se = JSON.stringify([
|
|
1749
|
+
L?.workspaceId,
|
|
1750
|
+
L?.conversationId,
|
|
1751
|
+
L?.senderId,
|
|
1752
|
+
L?.userType ?? i,
|
|
1753
|
+
L?.fullName
|
|
1754
|
+
]), R = A.useMemo(() => {
|
|
1755
|
+
let [e, t, n, r, i] = JSON.parse(se);
|
|
1632
1756
|
return !e || !t || !n ? null : {
|
|
1633
1757
|
workspaceId: String(e),
|
|
1634
1758
|
conversationId: String(t),
|
|
@@ -1636,47 +1760,50 @@ function ut({ styles: t, userType: i, ...a }) {
|
|
|
1636
1760
|
userType: String(r),
|
|
1637
1761
|
senderName: i ? String(i) : void 0
|
|
1638
1762
|
};
|
|
1639
|
-
}, [
|
|
1640
|
-
|
|
1641
|
-
let
|
|
1642
|
-
function
|
|
1763
|
+
}, [se]), ce = String(L?.conversationId ?? ""), ue = A.useRef(ce);
|
|
1764
|
+
ue.current = ce;
|
|
1765
|
+
let B = A.useCallback((e) => e == null || e === "" ? !0 : String(e) === ue.current, []);
|
|
1766
|
+
function U() {
|
|
1643
1767
|
ee(c), u.current?.scrollIntoView({ behavior: "smooth" });
|
|
1644
1768
|
}
|
|
1645
|
-
let
|
|
1769
|
+
let W = (e, t) => e.clientMessageId || !t.clientMessageId ? e : {
|
|
1770
|
+
...e,
|
|
1771
|
+
clientMessageId: t.clientMessageId
|
|
1772
|
+
}, G = A.useCallback((e) => {
|
|
1646
1773
|
let t = e.message;
|
|
1647
|
-
if (!t || !
|
|
1774
|
+
if (!t || !B(t.conversationId)) return;
|
|
1648
1775
|
let n = t.clientMessageId;
|
|
1649
1776
|
n && P.current.delete(n), N((e) => {
|
|
1650
1777
|
let r = e.findIndex((e) => e.id === t.id);
|
|
1651
|
-
if (r !== -1) return e.map((e, n) => n === r ? t : e);
|
|
1778
|
+
if (r !== -1) return e.map((e, n) => n === r ? W(t, e) : e);
|
|
1652
1779
|
if (n) {
|
|
1653
1780
|
let r = e.findIndex((e) => e.clientMessageId === n || e.id === n);
|
|
1654
|
-
if (r !== -1) return e.map((e, n) => n === r ? t : e);
|
|
1781
|
+
if (r !== -1) return e.map((e, n) => n === r ? W(t, e) : e);
|
|
1655
1782
|
}
|
|
1656
|
-
let i =
|
|
1657
|
-
let n = !!(e.id && e.id.length >= 32), r = String(e.senderId) === String(t.senderId), a =
|
|
1783
|
+
let i = pt(t.message), a = e.findIndex((e) => {
|
|
1784
|
+
let n = !!(e.id && e.id.length >= 32), r = String(e.senderId) === String(t.senderId), a = pt(e.message) === i;
|
|
1658
1785
|
return n && r && a;
|
|
1659
1786
|
});
|
|
1660
|
-
return a === -1 ? [...e, t] : e.map((e, n) => n === a ? t : e);
|
|
1787
|
+
return a === -1 ? [...e, t] : e.map((e, n) => n === a ? W(t, e) : e);
|
|
1661
1788
|
}), x(!1), setTimeout(() => {
|
|
1662
|
-
|
|
1789
|
+
U();
|
|
1663
1790
|
}, 300);
|
|
1664
|
-
}, [
|
|
1665
|
-
|
|
1666
|
-
}, [
|
|
1791
|
+
}, [B]), K = A.useCallback((e) => {
|
|
1792
|
+
G(e);
|
|
1793
|
+
}, [G]), fe = A.useCallback((e) => {
|
|
1667
1794
|
if (!P.current.has(e)) return;
|
|
1668
1795
|
P.current.delete(e);
|
|
1669
1796
|
let t = [e];
|
|
1670
1797
|
N((e) => e.filter((e) => !t.includes(e.id) && (!e.clientMessageId || !t.includes(e.clientMessageId)))), x(!1);
|
|
1671
1798
|
}, []);
|
|
1672
1799
|
function pe(t) {
|
|
1673
|
-
let n = !!
|
|
1800
|
+
let n = !!re?.messageId, a = crypto.randomUUID(), o = {
|
|
1674
1801
|
...t,
|
|
1675
1802
|
clientMessageId: a,
|
|
1676
|
-
merchantId:
|
|
1803
|
+
merchantId: I?.userId,
|
|
1677
1804
|
...n ? {
|
|
1678
1805
|
isReply: !0,
|
|
1679
|
-
messageId:
|
|
1806
|
+
messageId: re?.messageId
|
|
1680
1807
|
} : {},
|
|
1681
1808
|
message: t.message.trim()
|
|
1682
1809
|
}, c = (/* @__PURE__ */ new Date()).toISOString(), u = {
|
|
@@ -1694,44 +1821,50 @@ function ut({ styles: t, userType: i, ...a }) {
|
|
|
1694
1821
|
createdAt: c,
|
|
1695
1822
|
updatedAt: c
|
|
1696
1823
|
};
|
|
1697
|
-
P.current.add(a), N((e) => e.some((e) => e.id === a || e.clientMessageId && e.clientMessageId === a) ? e : [...e, u]), x(!0),
|
|
1698
|
-
|
|
1824
|
+
P.current.add(a), N((e) => e.some((e) => e.id === a || e.clientMessageId && e.clientMessageId === a) ? e : [...e, u]), x(!0), R && f.sendMessage(R, o).then((e) => G({ message: e })).catch((e) => {
|
|
1825
|
+
fe(a), d(e.message || "Message not sent", "error");
|
|
1699
1826
|
}), s(r(void 0)), s(e(void 0)), setTimeout(() => {
|
|
1700
|
-
|
|
1827
|
+
U();
|
|
1701
1828
|
}, 50);
|
|
1702
1829
|
}
|
|
1703
|
-
let
|
|
1830
|
+
let q = A.useCallback((e) => {
|
|
1704
1831
|
N((t) => t.some((t) => t.id === e.messageId) ? t.map((t) => t.id === e.messageId ? {
|
|
1705
1832
|
...t,
|
|
1706
1833
|
starred: e.status
|
|
1707
1834
|
} : t) : t);
|
|
1708
|
-
}, []),
|
|
1709
|
-
|
|
1710
|
-
|
|
1835
|
+
}, []), J = A.useCallback((e) => {
|
|
1836
|
+
B(e?.id) && (s(o(e)), setTimeout(() => {
|
|
1837
|
+
U();
|
|
1711
1838
|
}, 1e3));
|
|
1712
|
-
}, [s,
|
|
1713
|
-
|
|
1839
|
+
}, [s, B]), me = A.useCallback((e) => {
|
|
1840
|
+
B(e?.id) && (s(o(e)), s(n(void 0)), localStorage.removeItem(p), i === w.VISITOR && te(), a.closeModal());
|
|
1714
1841
|
}, [
|
|
1715
1842
|
s,
|
|
1716
1843
|
a,
|
|
1717
|
-
|
|
1844
|
+
B,
|
|
1718
1845
|
i
|
|
1719
1846
|
]), he = A.useCallback((e) => {
|
|
1720
|
-
|
|
1721
|
-
|
|
1847
|
+
B(e?.conversation?.id) && (N((t) => {
|
|
1848
|
+
let n = new Map(t.map((e) => [e.id, e]));
|
|
1849
|
+
return (e.messages ?? []).map((e) => {
|
|
1850
|
+
let t = n.get(e.id);
|
|
1851
|
+
return t ? W(e, t) : e;
|
|
1852
|
+
});
|
|
1853
|
+
}), new Set((e.messages ?? []).map((e) => e.clientMessageId).filter(Boolean)).forEach((e) => P.current.delete(e)), s(o(e.conversation)), setTimeout(() => {
|
|
1854
|
+
U();
|
|
1722
1855
|
}, 1e3));
|
|
1723
|
-
}, [s,
|
|
1856
|
+
}, [s, B]);
|
|
1724
1857
|
function ge(e, t) {
|
|
1725
|
-
|
|
1858
|
+
R && f.starMessage(R, e, t).then(q).catch((e) => d(e.message, "error"));
|
|
1726
1859
|
}
|
|
1727
1860
|
function _e(e) {
|
|
1728
1861
|
let t = [];
|
|
1729
1862
|
e.forEach((e) => {
|
|
1730
1863
|
let n = M.find((t) => t.id === e);
|
|
1731
1864
|
n && t.push(n.id);
|
|
1732
|
-
}), !(!
|
|
1865
|
+
}), !(!R || t.length === 0) && f.deleteMessages(R, t).then(Y).catch((e) => d(e.message, "error"));
|
|
1733
1866
|
}
|
|
1734
|
-
let
|
|
1867
|
+
let Y = A.useCallback((e) => {
|
|
1735
1868
|
if (!e || e.length === 0) return;
|
|
1736
1869
|
let t = new Set(e);
|
|
1737
1870
|
N((e) => e.some((e) => t.has(e.id)) ? e.map((e) => t.has(e.id) ? {
|
|
@@ -1740,20 +1873,20 @@ function ut({ styles: t, userType: i, ...a }) {
|
|
|
1740
1873
|
} : e) : e);
|
|
1741
1874
|
}, []), ve = A.useCallback((e) => {
|
|
1742
1875
|
let t = typeof e == "object" && e ? e : {};
|
|
1743
|
-
|
|
1876
|
+
B(t.conversationId) && (T.current = t, C(t), j.current !== null && window.clearTimeout(j.current), j.current = window.setTimeout(() => {
|
|
1744
1877
|
T.current = null, C(null), j.current = null;
|
|
1745
|
-
},
|
|
1746
|
-
}, [
|
|
1878
|
+
}, ft));
|
|
1879
|
+
}, [B]), ye = A.useCallback((e) => {
|
|
1747
1880
|
let t = typeof e == "object" && e ? e : {};
|
|
1748
|
-
|
|
1749
|
-
}, [
|
|
1881
|
+
B(t.conversationId) && (t.senderId && T.current?.senderId && t.senderId !== T.current.senderId || (j.current !== null && (window.clearTimeout(j.current), j.current = null), T.current = null, C(null)));
|
|
1882
|
+
}, [B]);
|
|
1750
1883
|
A.useEffect(() => {
|
|
1751
1884
|
j.current !== null && (window.clearTimeout(j.current), j.current = null), T.current = null, C(null);
|
|
1752
|
-
}, [
|
|
1885
|
+
}, [ce]), A.useEffect(() => (E.on(D.is_typing, ve), E.on(D.not_typing, ye), () => {
|
|
1753
1886
|
E.off(D.is_typing, ve), E.off(D.not_typing, ye), j.current !== null && window.clearTimeout(j.current);
|
|
1754
1887
|
}), [ye, ve]), A.useEffect(() => {
|
|
1755
|
-
|
|
1756
|
-
}, [m,
|
|
1888
|
+
ae && !m && u.current?.scrollIntoView({ behavior: "smooth" });
|
|
1889
|
+
}, [m, ae]), A.useEffect(() => {
|
|
1757
1890
|
let e = c.current;
|
|
1758
1891
|
if (!e) return;
|
|
1759
1892
|
let t = () => {
|
|
@@ -1764,10 +1897,10 @@ function ut({ styles: t, userType: i, ...a }) {
|
|
|
1764
1897
|
e.removeEventListener("scroll", t);
|
|
1765
1898
|
};
|
|
1766
1899
|
}, []);
|
|
1767
|
-
function
|
|
1768
|
-
|
|
1900
|
+
function X() {
|
|
1901
|
+
U(), setTimeout(() => U(), 100);
|
|
1769
1902
|
}
|
|
1770
|
-
function
|
|
1903
|
+
function be() {
|
|
1771
1904
|
_([]);
|
|
1772
1905
|
}
|
|
1773
1906
|
function xe() {
|
|
@@ -1775,57 +1908,57 @@ function ut({ styles: t, userType: i, ...a }) {
|
|
|
1775
1908
|
_([]);
|
|
1776
1909
|
}, 100);
|
|
1777
1910
|
}
|
|
1778
|
-
A.useEffect(() => (E.on(D.delete_message,
|
|
1779
|
-
E.off(D.delete_message,
|
|
1911
|
+
A.useEffect(() => (E.on(D.delete_message, Y), E.on(D.star_message, q), E.on(D.request_feedback, J), E.on(D.submit_feedback, J), E.on(D.end_chat_session, me), () => {
|
|
1912
|
+
E.off(D.delete_message, Y), E.off(D.star_message, q), E.off(D.request_feedback, J), E.off(D.submit_feedback, J), E.off(D.end_chat_session, me);
|
|
1780
1913
|
}), [
|
|
1781
|
-
|
|
1782
|
-
K,
|
|
1914
|
+
Y,
|
|
1783
1915
|
q,
|
|
1916
|
+
J,
|
|
1784
1917
|
me
|
|
1785
|
-
]), A.useEffect(() => (E.on(D.send_message,
|
|
1786
|
-
E.off(D.update_send_message,
|
|
1787
|
-
}), [
|
|
1788
|
-
if (!
|
|
1918
|
+
]), A.useEffect(() => (E.on(D.send_message, G), E.on(D.update_send_message, K), () => {
|
|
1919
|
+
E.off(D.update_send_message, K), E.off(D.send_message, G);
|
|
1920
|
+
}), [G, K]), A.useEffect(() => {
|
|
1921
|
+
if (!R) return;
|
|
1789
1922
|
let e = !1, t = () => {
|
|
1790
|
-
f.history(
|
|
1923
|
+
f.history(R).then((t) => !e && he(t)).catch((e) => console.log(e.message));
|
|
1791
1924
|
}, n = () => {
|
|
1792
|
-
E.emit(D.subscribe_conversation,
|
|
1925
|
+
E.emit(D.subscribe_conversation, R), t();
|
|
1793
1926
|
};
|
|
1794
|
-
return E.on(D.connected, n), E.connected ? n() : (t(), ne()), () => {
|
|
1927
|
+
return E.on(D.connected, n), E.connected ? n() : (t(), ne(R.userType !== w.VISITOR)), () => {
|
|
1795
1928
|
e = !0, E.off(D.connected, n);
|
|
1796
1929
|
};
|
|
1797
|
-
}, [
|
|
1798
|
-
let
|
|
1799
|
-
return /* @__PURE__ */
|
|
1930
|
+
}, [R, he]);
|
|
1931
|
+
let Se = `calc(var(--padorix-vvh, 100dvh) * ${g.length > 0 || ie?.status === l.false ? .915 : .81})`;
|
|
1932
|
+
return /* @__PURE__ */ H("div", {
|
|
1800
1933
|
className: t.container,
|
|
1801
1934
|
children: [
|
|
1802
|
-
/* @__PURE__ */
|
|
1935
|
+
/* @__PURE__ */ V(We, {
|
|
1803
1936
|
styles: t,
|
|
1804
1937
|
userType: i,
|
|
1805
1938
|
goBack: a.goBack,
|
|
1806
1939
|
close: a.closeModal,
|
|
1807
|
-
toBottom:
|
|
1940
|
+
toBottom: X,
|
|
1808
1941
|
messages: M
|
|
1809
1942
|
}),
|
|
1810
|
-
/* @__PURE__ */
|
|
1943
|
+
/* @__PURE__ */ H("div", {
|
|
1811
1944
|
ref: c,
|
|
1812
|
-
style: { height:
|
|
1945
|
+
style: { height: Se },
|
|
1813
1946
|
className: `${t.chatContainerPadding}`,
|
|
1814
1947
|
children: [
|
|
1815
|
-
m && /* @__PURE__ */
|
|
1948
|
+
m && /* @__PURE__ */ V(de, {
|
|
1816
1949
|
direction: "up",
|
|
1817
1950
|
className: "\r\n padorix:fixed\r\n padorix:right-2\r\n padorix:bottom-36\r\n padorix:z-10\r\n padorix:cursor-pointer\r\n padorix:transition-all\r\n padorix:active:scale-125\r\n ",
|
|
1818
|
-
children: /* @__PURE__ */
|
|
1951
|
+
children: /* @__PURE__ */ V("div", {
|
|
1819
1952
|
className: "\r\n padorix:transition-all\r\n padorix:rounded-full\r\n padorix:size-8\r\n padorix:text-slate-500\r\n padorix:border\r\n padorix:border-gray-200\r\n padorix:flex\r\n padorix:items-center\r\n padorix:justify-center\r\n padorix:bg-white\r\n padorix:shadow-lg\r\n ",
|
|
1820
|
-
onClick:
|
|
1821
|
-
children: /* @__PURE__ */
|
|
1953
|
+
onClick: U,
|
|
1954
|
+
children: /* @__PURE__ */ V(ut, {})
|
|
1822
1955
|
})
|
|
1823
1956
|
}),
|
|
1824
|
-
Number(M?.length) < 1 && /* @__PURE__ */
|
|
1957
|
+
Number(M?.length) < 1 && /* @__PURE__ */ V("div", {
|
|
1825
1958
|
className: "padorix:relative padorix:p-4",
|
|
1826
|
-
children: Array(8).fill(0).map((e, t) => /* @__PURE__ */
|
|
1959
|
+
children: Array(8).fill(0).map((e, t) => /* @__PURE__ */ V(dt, { index: t }, t))
|
|
1827
1960
|
}),
|
|
1828
|
-
/* @__PURE__ */
|
|
1961
|
+
/* @__PURE__ */ V(lt, {
|
|
1829
1962
|
messages: M,
|
|
1830
1963
|
deleteMessagesAction: _e,
|
|
1831
1964
|
handleStarMessage: ge,
|
|
@@ -1834,10 +1967,10 @@ function ut({ styles: t, userType: i, ...a }) {
|
|
|
1834
1967
|
messagesToDelete: g,
|
|
1835
1968
|
setMessagesToDelete: _,
|
|
1836
1969
|
moreActions: a.moreActions,
|
|
1837
|
-
isTyping:
|
|
1838
|
-
isOwnTyping:
|
|
1970
|
+
isTyping: ae,
|
|
1971
|
+
isOwnTyping: oe
|
|
1839
1972
|
}),
|
|
1840
|
-
/* @__PURE__ */
|
|
1973
|
+
/* @__PURE__ */ V("div", {
|
|
1841
1974
|
ref: u,
|
|
1842
1975
|
style: {
|
|
1843
1976
|
float: "left",
|
|
@@ -1846,20 +1979,20 @@ function ut({ styles: t, userType: i, ...a }) {
|
|
|
1846
1979
|
})
|
|
1847
1980
|
]
|
|
1848
1981
|
}),
|
|
1849
|
-
v && g.length > 0 && /* @__PURE__ */
|
|
1982
|
+
v && g.length > 0 && /* @__PURE__ */ H("div", {
|
|
1850
1983
|
className: t.messagesContainer,
|
|
1851
|
-
children: [/* @__PURE__ */
|
|
1984
|
+
children: [/* @__PURE__ */ H("div", {
|
|
1852
1985
|
className: "padorix:flex padorix:items-center padorix:text-sm padorix:italic padorix:text-gray-600",
|
|
1853
|
-
children: [/* @__PURE__ */
|
|
1854
|
-
onClick:
|
|
1986
|
+
children: [/* @__PURE__ */ V("div", {
|
|
1987
|
+
onClick: be,
|
|
1855
1988
|
className: "padorix:p-2 padorix:text-xl padorix:cursor-pointer padorix:transition-all",
|
|
1856
|
-
children: /* @__PURE__ */
|
|
1857
|
-
}), /* @__PURE__ */
|
|
1989
|
+
children: /* @__PURE__ */ V(Q, {})
|
|
1990
|
+
}), /* @__PURE__ */ H("div", {
|
|
1858
1991
|
className: "padorix:space-x-0.5",
|
|
1859
1992
|
children: [
|
|
1860
|
-
/* @__PURE__ */
|
|
1993
|
+
/* @__PURE__ */ V("span", { children: "Confirm to delete" }),
|
|
1861
1994
|
" ",
|
|
1862
|
-
/* @__PURE__ */
|
|
1995
|
+
/* @__PURE__ */ H("span", {
|
|
1863
1996
|
className: "padorix:text-red-500",
|
|
1864
1997
|
children: [
|
|
1865
1998
|
g.length,
|
|
@@ -1869,32 +2002,32 @@ function ut({ styles: t, userType: i, ...a }) {
|
|
|
1869
2002
|
})
|
|
1870
2003
|
]
|
|
1871
2004
|
})]
|
|
1872
|
-
}), /* @__PURE__ */
|
|
2005
|
+
}), /* @__PURE__ */ V(z, { children: /* @__PURE__ */ V("div", {
|
|
1873
2006
|
onClick: xe,
|
|
1874
2007
|
className: "padorix:cursor-pointer padorix:transition-all padorix:active:scale-125 padorix:text-red-500",
|
|
1875
|
-
children: /* @__PURE__ */
|
|
2008
|
+
children: /* @__PURE__ */ V(le, {})
|
|
1876
2009
|
}) })]
|
|
1877
2010
|
}),
|
|
1878
|
-
!v && g.length > 0 && /* @__PURE__ */
|
|
2011
|
+
!v && g.length > 0 && /* @__PURE__ */ H("div", {
|
|
1879
2012
|
className: t.messagesContainer,
|
|
1880
|
-
children: [/* @__PURE__ */
|
|
2013
|
+
children: [/* @__PURE__ */ H("div", {
|
|
1881
2014
|
className: "padorix:flex padorix:items-center padorix:text-sm padorix:italic padorix:text-gray-600",
|
|
1882
2015
|
children: [
|
|
1883
|
-
/* @__PURE__ */
|
|
1884
|
-
onClick:
|
|
2016
|
+
/* @__PURE__ */ V("div", {
|
|
2017
|
+
onClick: be,
|
|
1885
2018
|
className: "padorix:p-2 padorix:text-xl padorix:cursor-pointer padorix:transition-all",
|
|
1886
|
-
children: /* @__PURE__ */
|
|
2019
|
+
children: /* @__PURE__ */ V(Q, {})
|
|
1887
2020
|
}),
|
|
1888
2021
|
g.length,
|
|
1889
2022
|
" Selected"
|
|
1890
2023
|
]
|
|
1891
|
-
}), /* @__PURE__ */
|
|
2024
|
+
}), /* @__PURE__ */ V(z, { children: /* @__PURE__ */ V("div", {
|
|
1892
2025
|
onClick: () => y(!0),
|
|
1893
2026
|
className: "padorix:cursor-pointer padorix:transition-all padorix:active:scale-125",
|
|
1894
|
-
children: /* @__PURE__ */
|
|
2027
|
+
children: /* @__PURE__ */ V(le, {})
|
|
1895
2028
|
}) })]
|
|
1896
2029
|
}),
|
|
1897
|
-
g.length < 1 &&
|
|
2030
|
+
g.length < 1 && ie?.status === l.true && /* @__PURE__ */ V(Be, {
|
|
1898
2031
|
sendChat: pe,
|
|
1899
2032
|
styles: t,
|
|
1900
2033
|
userType: i,
|
|
@@ -1905,9 +2038,9 @@ function ut({ styles: t, userType: i, ...a }) {
|
|
|
1905
2038
|
}
|
|
1906
2039
|
//#endregion
|
|
1907
2040
|
//#region lib/assets/images/wave.png
|
|
1908
|
-
var
|
|
1909
|
-
function
|
|
1910
|
-
let { workspace: t, tags: n } = k((e) => e.data), r = O(), [i, a] = A.useState(!1), s = A.useMemo(() => C(e.workspaceId), [e.workspaceId]), [c, l] = A.useState(e.openOptions ? 2 : n.length > 0 ? 1 : 2), m = A.useRef(0), _ =
|
|
2041
|
+
var ht = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAMAAACdt4HsAAAA7VBMVEUAAADro1Lro1Lro1Lro1L/3Wfvr1bvrlbro1Lro1Lro1JCreJCreJCreJCreL/3Wf70mP91mT4x1/uqlX/3Wf/3Wf+2WbzuVrro1JCreJCreJCreJCreJCreJCreL/3Wfro1L/3WdCreJCreLro1L/3Wfsp1P6zmH/3WfwsldCreJCreL1wF3vsFfurVbvrlbuq1X/3Wf6z2L/3Wf70WP2xF7uq1VCreL/3WfxtVnro1JCreL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wANbRu0eH6XOpkkDMw/jnByB7CtneetfkWr/wA7dfK3+1s2PPTuc4KiIAeJL8BmnjUvM+dLSroZndCAPZVySae4iWUI0qiRgRHvBCe7EcW5Vf2whdZEwEffpDA6DxG6tneetfkWrqGWa/u1jQselc7v3Vq13DHLDHZkur5LEHKnGKt7Ke4KkIwQkgtjcMUba4EYlMLaDxxRsZwu+Ng+oAJjgQTVjG8d7ZFlI1OpGeIqSSBJdqrLnvSjAU4O5jR2hFIQJIX0q6smlsHugLv/AOUdoxlxL0La0L6MNuw5J3j2zQv4xmTom6RkVG73dwuPAf1S3qB5GaNjm46UYOPDOBUNwLraVpKVwxdQ2/dkfarvYks1xLLFMoDtnDZ3E12fufWi512fufWi512fufWi512fufWi51Z7EkguI5pJlIQ5AXia/9k=", _t = (e) => /^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(e);
|
|
2042
|
+
function vt(e) {
|
|
2043
|
+
let { workspace: t, tags: n } = k((e) => e.data), r = O(), [i, a] = A.useState(!1), s = A.useMemo(() => C(e.workspaceId), [e.workspaceId]), [c, l] = A.useState(e.openOptions ? 2 : n.length > 0 ? 1 : 2), m = A.useRef(0), _ = pe({
|
|
1911
2044
|
mode: "uncontrolled",
|
|
1912
2045
|
initialValues: {
|
|
1913
2046
|
tagId: n.find((t) => t.tag.trim().toLowerCase() === e.openOptions?.tag?.trim().toLowerCase())?.id ?? "",
|
|
@@ -1917,7 +2050,7 @@ function mt(e) {
|
|
|
1917
2050
|
},
|
|
1918
2051
|
validate: {
|
|
1919
2052
|
fullName: (e) => c === 2 && !e ? "Full name is required" : c === 2 && e.length <= 2 ? "Your name is expected to be more than 2 characters" : null,
|
|
1920
|
-
email: (e) => c === 2 && !e ? "Email address is required" : c === 2 && !
|
|
2053
|
+
email: (e) => c === 2 && !e ? "Email address is required" : c === 2 && !_t(e) ? "Please enter a valid email address" : null,
|
|
1921
2054
|
message: (e) => c === 4 && !e ? "Enquiry content is required" : null
|
|
1922
2055
|
}
|
|
1923
2056
|
});
|
|
@@ -1942,7 +2075,7 @@ function mt(e) {
|
|
|
1942
2075
|
senderId: t.senderId,
|
|
1943
2076
|
fullName: t.fullName,
|
|
1944
2077
|
tagId: e.tagId,
|
|
1945
|
-
expiresAt:
|
|
2078
|
+
expiresAt: K().add(1, "day").endOf("day").toDate().toString()
|
|
1946
2079
|
};
|
|
1947
2080
|
localStorage.setItem(p, JSON.stringify(n)), r(o(t.conversation)), r(g(n));
|
|
1948
2081
|
} catch (e) {
|
|
@@ -1984,37 +2117,37 @@ function mt(e) {
|
|
|
1984
2117
|
tagId: r || void 0,
|
|
1985
2118
|
tag: t.tag
|
|
1986
2119
|
}));
|
|
1987
|
-
}, [e.openRequestId]), /* @__PURE__ */
|
|
2120
|
+
}, [e.openRequestId]), /* @__PURE__ */ H("div", {
|
|
1988
2121
|
className: e.styles.container,
|
|
1989
|
-
children: [/* @__PURE__ */
|
|
2122
|
+
children: [/* @__PURE__ */ H("div", {
|
|
1990
2123
|
style: {
|
|
1991
2124
|
background: String(t?.widget?.colorScheme),
|
|
1992
2125
|
color: t?.widget?.textColor || "#ffffff"
|
|
1993
2126
|
},
|
|
1994
2127
|
className: "padorix:px-3 padorix:py-5 padorix:md:rounded-t-xl padorix:text-sm padorix:flex padorix:gap-2",
|
|
1995
|
-
children: [/* @__PURE__ */
|
|
2128
|
+
children: [/* @__PURE__ */ V(z, {
|
|
1996
2129
|
className: "",
|
|
1997
2130
|
children: "Kindly drop your enquiry and we will get back to you immediately"
|
|
1998
|
-
}), /* @__PURE__ */
|
|
2131
|
+
}), /* @__PURE__ */ V("div", {
|
|
1999
2132
|
className: "padorix:size-8 padorix:ml-auto",
|
|
2000
|
-
children: /* @__PURE__ */
|
|
2133
|
+
children: /* @__PURE__ */ V("div", {
|
|
2001
2134
|
className: "padorix:bg-black/10 padorix:size-8 padorix:self-center padorix:flex padorix:items-center padorix:justify-center padorix:rounded-md padorix:cursor-pointer padorix:active:scale-95 padorix:transition-all",
|
|
2002
2135
|
onClick: e.close,
|
|
2003
|
-
children: /* @__PURE__ */
|
|
2136
|
+
children: /* @__PURE__ */ V(F, {})
|
|
2004
2137
|
})
|
|
2005
2138
|
})]
|
|
2006
|
-
}), /* @__PURE__ */
|
|
2139
|
+
}), /* @__PURE__ */ H("div", {
|
|
2007
2140
|
className: "padorix:p-4",
|
|
2008
2141
|
children: [
|
|
2009
|
-
/* @__PURE__ */
|
|
2142
|
+
/* @__PURE__ */ H("div", {
|
|
2010
2143
|
className: "padorix:flex padorix:items-center padorix:gap-2",
|
|
2011
|
-
children: [/* @__PURE__ */
|
|
2144
|
+
children: [/* @__PURE__ */ V(z, {
|
|
2012
2145
|
className: "padorix:size-10",
|
|
2013
|
-
children: /* @__PURE__ */
|
|
2146
|
+
children: /* @__PURE__ */ H("div", {
|
|
2014
2147
|
className: "",
|
|
2015
2148
|
children: [
|
|
2016
2149
|
" ",
|
|
2017
|
-
/* @__PURE__ */
|
|
2150
|
+
/* @__PURE__ */ V("img", {
|
|
2018
2151
|
src: t?.logo,
|
|
2019
2152
|
alt: t?.name,
|
|
2020
2153
|
loading: "lazy",
|
|
@@ -2023,74 +2156,74 @@ function mt(e) {
|
|
|
2023
2156
|
" "
|
|
2024
2157
|
]
|
|
2025
2158
|
})
|
|
2026
|
-
}), /* @__PURE__ */
|
|
2159
|
+
}), /* @__PURE__ */ V(z, {
|
|
2027
2160
|
className: "padorix:text-right padorix:w-full",
|
|
2028
|
-
children: /* @__PURE__ */
|
|
2161
|
+
children: /* @__PURE__ */ H("div", { children: [/* @__PURE__ */ V("div", {
|
|
2029
2162
|
className: "padorix:font-medium padorix:text-right",
|
|
2030
2163
|
children: t?.name
|
|
2031
|
-
}), /* @__PURE__ */
|
|
2164
|
+
}), /* @__PURE__ */ V("div", {
|
|
2032
2165
|
className: "padorix:text-sm padorix:text-right padorix:text-slate-500",
|
|
2033
2166
|
children: t?.widget?.department
|
|
2034
2167
|
})] })
|
|
2035
2168
|
})]
|
|
2036
2169
|
}),
|
|
2037
|
-
/* @__PURE__ */
|
|
2170
|
+
/* @__PURE__ */ H("form", {
|
|
2038
2171
|
onSubmit: _.onSubmit(x),
|
|
2039
|
-
children: [/* @__PURE__ */
|
|
2172
|
+
children: [/* @__PURE__ */ V("div", {
|
|
2040
2173
|
className: "padorix:h-[35dvh] padorix:flex padorix:items-center padorix:justify-center",
|
|
2041
|
-
children: /* @__PURE__ */
|
|
2174
|
+
children: /* @__PURE__ */ H("div", {
|
|
2042
2175
|
className: "padorix:w-full",
|
|
2043
2176
|
children: [
|
|
2044
|
-
c === 1 && /* @__PURE__ */
|
|
2045
|
-
/* @__PURE__ */
|
|
2046
|
-
/* @__PURE__ */
|
|
2177
|
+
c === 1 && /* @__PURE__ */ H(B, { children: [
|
|
2178
|
+
/* @__PURE__ */ V(yt, { current: 1 }),
|
|
2179
|
+
/* @__PURE__ */ V("div", {
|
|
2047
2180
|
className: "padorix:font-bold padorix:mb-2",
|
|
2048
2181
|
children: "What is your enquiry about?"
|
|
2049
2182
|
}),
|
|
2050
|
-
/* @__PURE__ */
|
|
2183
|
+
/* @__PURE__ */ V("div", {
|
|
2051
2184
|
className: "padorix:flex padorix:flex-wrap padorix:items-center padorix:gap-2",
|
|
2052
|
-
children: n?.map((e, n) => /* @__PURE__ */
|
|
2185
|
+
children: n?.map((e, n) => /* @__PURE__ */ V("div", {
|
|
2053
2186
|
onClick: () => y(e.id),
|
|
2054
2187
|
style: { background: _.values.tagId === e.id ? String(t?.widget?.colorScheme) : "#f1f5f9" },
|
|
2055
2188
|
className: `padorix:text-xs padorix:py-1.5 padorix:px-2 padorix:rounded-md ${_.values.tagId === e.id ? "padorix:text-white" : "padorix:bg-slate-100 padorix:border padorix:border-gray-200"} padorix:cursor-pointer padorix:active:scale-95 padorix:transition-all`,
|
|
2056
2189
|
children: e.tag
|
|
2057
2190
|
}, n))
|
|
2058
2191
|
}),
|
|
2059
|
-
_.errors.tagId ? /* @__PURE__ */
|
|
2192
|
+
_.errors.tagId ? /* @__PURE__ */ V("div", {
|
|
2060
2193
|
className: "padorix:text-red-400 padorix:text-sm padorix:mt-2",
|
|
2061
2194
|
children: _.errors.tagId?.toString()
|
|
2062
2195
|
}) : ""
|
|
2063
2196
|
] }),
|
|
2064
|
-
c === 2 && /* @__PURE__ */
|
|
2065
|
-
/* @__PURE__ */
|
|
2066
|
-
/* @__PURE__ */
|
|
2197
|
+
c === 2 && /* @__PURE__ */ H(B, { children: [
|
|
2198
|
+
/* @__PURE__ */ V(yt, { current: 2 }),
|
|
2199
|
+
/* @__PURE__ */ V(bt, {
|
|
2067
2200
|
screen: c,
|
|
2068
2201
|
tagId: _.values.tagId,
|
|
2069
2202
|
tags: n
|
|
2070
2203
|
}),
|
|
2071
|
-
/* @__PURE__ */
|
|
2204
|
+
/* @__PURE__ */ V($, {
|
|
2072
2205
|
content: "Full name",
|
|
2073
2206
|
placeholder: "Enter your full name",
|
|
2074
2207
|
error: _.errors.fullName?.toString() || "",
|
|
2075
2208
|
..._.getInputProps("fullName")
|
|
2076
2209
|
}, _.key("fullName")),
|
|
2077
|
-
/* @__PURE__ */
|
|
2210
|
+
/* @__PURE__ */ V($, {
|
|
2078
2211
|
content: "Email address",
|
|
2079
2212
|
placeholder: "name@example.com",
|
|
2080
2213
|
error: _.errors.email?.toString() || "",
|
|
2081
2214
|
..._.getInputProps("email")
|
|
2082
2215
|
}, _.key("email"))
|
|
2083
2216
|
] }),
|
|
2084
|
-
c === 3 && /* @__PURE__ */
|
|
2085
|
-
/* @__PURE__ */
|
|
2086
|
-
/* @__PURE__ */
|
|
2217
|
+
c === 3 && /* @__PURE__ */ H(B, { children: [
|
|
2218
|
+
/* @__PURE__ */ V(yt, { current: 3 }),
|
|
2219
|
+
/* @__PURE__ */ V(bt, {
|
|
2087
2220
|
screen: c,
|
|
2088
2221
|
tagId: _.values.tagId,
|
|
2089
2222
|
tags: n,
|
|
2090
2223
|
name: _.values.fullName,
|
|
2091
2224
|
email: _.values.email
|
|
2092
2225
|
}),
|
|
2093
|
-
/* @__PURE__ */
|
|
2226
|
+
/* @__PURE__ */ V($, {
|
|
2094
2227
|
content: "Message",
|
|
2095
2228
|
formtype: "textarea",
|
|
2096
2229
|
error: _.errors.message?.toString() || "",
|
|
@@ -2099,14 +2232,14 @@ function mt(e) {
|
|
|
2099
2232
|
] })
|
|
2100
2233
|
]
|
|
2101
2234
|
})
|
|
2102
|
-
}), /* @__PURE__ */
|
|
2235
|
+
}), /* @__PURE__ */ H("div", {
|
|
2103
2236
|
className: "padorix:mt-6 padorix:flex padorix:items-center padorix:gap-2",
|
|
2104
|
-
children: [/* @__PURE__ */
|
|
2237
|
+
children: [/* @__PURE__ */ V(z, { children: /* @__PURE__ */ V("button", {
|
|
2105
2238
|
type: "button",
|
|
2106
2239
|
onClick: v,
|
|
2107
2240
|
className: "padorix:cursor-pointer padorix:border padorix:border-gray-300 padorix:bg-slate-100 padorix:py-2 padorix:px-5 padorix:rounded-md padorix:text-shadow-lg padorix:hover:-translate-y-2 padorix:transition-all padorix:hover:shadow-md",
|
|
2108
2241
|
children: "Back"
|
|
2109
|
-
}) }), /* @__PURE__ */
|
|
2242
|
+
}) }), /* @__PURE__ */ V(z, { children: /* @__PURE__ */ V("button", {
|
|
2110
2243
|
disabled: i,
|
|
2111
2244
|
style: { background: i ? "#62748e" : String(t?.widget?.colorScheme) },
|
|
2112
2245
|
className: `${i ? "padorix:cursor-progress" : "padorix:cursor-pointer"} padorix:text-white padorix:py-2 padorix:px-5 padorix:rounded-md padorix:text-shadow-lg padorix:hover:-translate-y-2 padorix:transition-all padorix:hover:shadow-md`,
|
|
@@ -2114,12 +2247,12 @@ function mt(e) {
|
|
|
2114
2247
|
}) })]
|
|
2115
2248
|
})]
|
|
2116
2249
|
}),
|
|
2117
|
-
/* @__PURE__ */
|
|
2250
|
+
/* @__PURE__ */ V(z, { children: /* @__PURE__ */ H("div", {
|
|
2118
2251
|
className: "padorix:mt-20 padorix:grayscale-100 padorix:text-sm padorix:flex padorix:items-center padorix:justify-center padorix:text-zinc-500 padorix:gap-2",
|
|
2119
2252
|
children: [
|
|
2120
2253
|
" ",
|
|
2121
|
-
/* @__PURE__ */
|
|
2122
|
-
src:
|
|
2254
|
+
/* @__PURE__ */ V("img", {
|
|
2255
|
+
src: gt,
|
|
2123
2256
|
alt: "padorix",
|
|
2124
2257
|
loading: "lazy",
|
|
2125
2258
|
className: "padorix:size-6 padorix:inline"
|
|
@@ -2131,13 +2264,13 @@ function mt(e) {
|
|
|
2131
2264
|
})]
|
|
2132
2265
|
});
|
|
2133
2266
|
}
|
|
2134
|
-
function
|
|
2267
|
+
function yt(e) {
|
|
2135
2268
|
let { tags: t, workspace: n } = k((e) => e.data), r = t.length > 0 ? 3 : 2, i = t.length > 0 ? e.current : e.current - 1;
|
|
2136
|
-
return /* @__PURE__ */
|
|
2269
|
+
return /* @__PURE__ */ H("div", {
|
|
2137
2270
|
className: "padorix:text-right padorix:text-sm padorix:text-gray-500 padorix:italic padorix:font-semibold",
|
|
2138
2271
|
children: [
|
|
2139
2272
|
"Step ",
|
|
2140
|
-
/* @__PURE__ */
|
|
2273
|
+
/* @__PURE__ */ V("span", {
|
|
2141
2274
|
style: { color: String(n?.widget?.colorScheme) },
|
|
2142
2275
|
children: i
|
|
2143
2276
|
}),
|
|
@@ -2146,36 +2279,36 @@ function ht(e) {
|
|
|
2146
2279
|
]
|
|
2147
2280
|
});
|
|
2148
2281
|
}
|
|
2149
|
-
function
|
|
2150
|
-
return /* @__PURE__ */
|
|
2282
|
+
function bt(e) {
|
|
2283
|
+
return /* @__PURE__ */ H("div", {
|
|
2151
2284
|
className: "padorix:my-2",
|
|
2152
|
-
children: [e.tagId && e.screen > 1 && /* @__PURE__ */
|
|
2285
|
+
children: [e.tagId && e.screen > 1 && /* @__PURE__ */ H("div", {
|
|
2153
2286
|
className: "padorix:text-xs",
|
|
2154
2287
|
children: [
|
|
2155
2288
|
" ",
|
|
2156
|
-
/* @__PURE__ */
|
|
2289
|
+
/* @__PURE__ */ V("span", {
|
|
2157
2290
|
className: "padorix:text-slate-500 padorix:mr-1",
|
|
2158
2291
|
children: "Enquiry: "
|
|
2159
2292
|
}),
|
|
2160
2293
|
" ",
|
|
2161
2294
|
e.tags?.find((t) => t.id === e.tagId)?.tag
|
|
2162
2295
|
]
|
|
2163
|
-
}), e.screen > 2 && /* @__PURE__ */
|
|
2296
|
+
}), e.screen > 2 && /* @__PURE__ */ H(B, { children: [/* @__PURE__ */ H("div", {
|
|
2164
2297
|
className: "padorix:text-xs",
|
|
2165
2298
|
children: [
|
|
2166
2299
|
" ",
|
|
2167
|
-
/* @__PURE__ */
|
|
2300
|
+
/* @__PURE__ */ V("span", {
|
|
2168
2301
|
className: "padorix:text-slate-500 padorix:mr-3",
|
|
2169
2302
|
children: "Name: "
|
|
2170
2303
|
}),
|
|
2171
2304
|
" ",
|
|
2172
2305
|
e.name
|
|
2173
2306
|
]
|
|
2174
|
-
}), /* @__PURE__ */
|
|
2307
|
+
}), /* @__PURE__ */ H("div", {
|
|
2175
2308
|
className: "padorix:text-xs",
|
|
2176
2309
|
children: [
|
|
2177
2310
|
" ",
|
|
2178
|
-
/* @__PURE__ */
|
|
2311
|
+
/* @__PURE__ */ V("span", {
|
|
2179
2312
|
className: "padorix:text-slate-500 padorix:mr-4",
|
|
2180
2313
|
children: "Email: "
|
|
2181
2314
|
}),
|
|
@@ -2187,129 +2320,129 @@ function gt(e) {
|
|
|
2187
2320
|
}
|
|
2188
2321
|
//#endregion
|
|
2189
2322
|
//#region lib/chats/chatScreen/not-available-banner.tsx
|
|
2190
|
-
function
|
|
2191
|
-
return /* @__PURE__ */
|
|
2323
|
+
function xt() {
|
|
2324
|
+
return /* @__PURE__ */ V("div", {
|
|
2192
2325
|
className: "padorix:p-2 padorix:text-yellow-800 padorix:bg-yellow-100/50 padorix:border padorix:border-yellow-200 padorix:rounded-md padorix:text-center padorix:text-[0.75rem] padorix:whitespace-pre-line",
|
|
2193
2326
|
children: "We're currently unavailable. Leave us a message \n and we'll get back to you via email."
|
|
2194
2327
|
});
|
|
2195
2328
|
}
|
|
2196
2329
|
//#endregion
|
|
2197
2330
|
//#region lib/chats/chatScreen/chat-faqs.tsx
|
|
2198
|
-
function
|
|
2331
|
+
function St(e) {
|
|
2199
2332
|
let { faqs: t, workspace: n } = k((e) => e.data), [r, i] = A.useState(), a = e.isOpen ? "Talk to an agent" : "Send us a message";
|
|
2200
2333
|
function o(e) {
|
|
2201
2334
|
i(e);
|
|
2202
2335
|
}
|
|
2203
|
-
return r?.question ? /* @__PURE__ */
|
|
2204
|
-
/* @__PURE__ */
|
|
2336
|
+
return r?.question ? /* @__PURE__ */ H(B, { children: [
|
|
2337
|
+
/* @__PURE__ */ H("div", {
|
|
2205
2338
|
style: { background: String(n?.widget?.colorScheme) },
|
|
2206
2339
|
className: "padorix:px-3 padorix:py-5 padorix:md:rounded-t-xl padorix:text-white padorix:text-sm padorix:flex padorix:items-center padorix:gap-2",
|
|
2207
2340
|
children: [
|
|
2208
|
-
/* @__PURE__ */
|
|
2341
|
+
/* @__PURE__ */ V(z, { children: /* @__PURE__ */ V("div", {
|
|
2209
2342
|
className: "padorix:size-8",
|
|
2210
|
-
children: /* @__PURE__ */
|
|
2343
|
+
children: /* @__PURE__ */ H("div", {
|
|
2211
2344
|
style: { color: String(n?.widget?.colorScheme) },
|
|
2212
2345
|
className: "padorix:size-8 padorix:rounded-full padorix:bg-white padorix:flex padorix:items-center padorix:justify-center",
|
|
2213
2346
|
children: [
|
|
2214
2347
|
" ",
|
|
2215
|
-
/* @__PURE__ */
|
|
2348
|
+
/* @__PURE__ */ V(Ke, { className: "padorix:size-7" }),
|
|
2216
2349
|
" "
|
|
2217
2350
|
]
|
|
2218
2351
|
})
|
|
2219
2352
|
}) }),
|
|
2220
|
-
/* @__PURE__ */
|
|
2353
|
+
/* @__PURE__ */ V(z, { children: /* @__PURE__ */ V("div", {
|
|
2221
2354
|
className: "",
|
|
2222
2355
|
children: "Our Frequently asked questions"
|
|
2223
2356
|
}) }),
|
|
2224
|
-
/* @__PURE__ */
|
|
2357
|
+
/* @__PURE__ */ V("div", {
|
|
2225
2358
|
className: "padorix:size-8 padorix:ml-auto",
|
|
2226
|
-
children: /* @__PURE__ */
|
|
2359
|
+
children: /* @__PURE__ */ V("div", {
|
|
2227
2360
|
className: "padorix:bg-black/10 padorix:size-8 padorix:self-center padorix:flex padorix:items-center padorix:justify-center padorix:rounded-md padorix:cursor-pointer padorix:active:scale-95 padorix:transition-all",
|
|
2228
2361
|
onClick: e.close,
|
|
2229
|
-
children: /* @__PURE__ */
|
|
2362
|
+
children: /* @__PURE__ */ V(F, {})
|
|
2230
2363
|
})
|
|
2231
2364
|
})
|
|
2232
2365
|
]
|
|
2233
2366
|
}),
|
|
2234
|
-
/* @__PURE__ */
|
|
2367
|
+
/* @__PURE__ */ H("div", {
|
|
2235
2368
|
className: "padorix:p-1.5 padorix:h-[70dvh] padorix-scrolls padorix:overflow-y-auto",
|
|
2236
2369
|
children: [
|
|
2237
|
-
!e.isOpen && /* @__PURE__ */
|
|
2238
|
-
/* @__PURE__ */
|
|
2370
|
+
!e.isOpen && /* @__PURE__ */ V(xt, {}),
|
|
2371
|
+
/* @__PURE__ */ V("div", {
|
|
2239
2372
|
className: "padorix:font-bold padorix:text-xl padorix:mb-3",
|
|
2240
2373
|
children: r.question
|
|
2241
2374
|
}),
|
|
2242
|
-
/* @__PURE__ */
|
|
2375
|
+
/* @__PURE__ */ V("div", {
|
|
2243
2376
|
className: "padorix:whitespace-pre-line padorix:pl-2 padorix:text-gray-600 padorix:text-sm",
|
|
2244
2377
|
children: r.answer
|
|
2245
2378
|
})
|
|
2246
2379
|
]
|
|
2247
2380
|
}),
|
|
2248
|
-
/* @__PURE__ */
|
|
2381
|
+
/* @__PURE__ */ H("div", {
|
|
2249
2382
|
className: "padorix:flex padorix:items-center padorix:justify-end padorix:p-2 padorix:gap-5",
|
|
2250
|
-
children: [/* @__PURE__ */
|
|
2383
|
+
children: [/* @__PURE__ */ V(z, { children: /* @__PURE__ */ V("button", {
|
|
2251
2384
|
type: "button",
|
|
2252
2385
|
onClick: () => o(void 0),
|
|
2253
2386
|
className: "padorix:cursor-pointer padorix:border padorix:border-gray-300 padorix:bg-slate-100 padorix:py-2 padorix:px-5 padorix:rounded-md padorix:text-shadow-lg padorix:hover:-translate-y-2 padorix:transition-all padorix:hover:shadow-md",
|
|
2254
2387
|
children: "Back"
|
|
2255
|
-
}) }), /* @__PURE__ */
|
|
2388
|
+
}) }), /* @__PURE__ */ V(z, { children: /* @__PURE__ */ V("button", {
|
|
2256
2389
|
onClick: () => e.talkToTeam(!1),
|
|
2257
2390
|
style: { background: String(n?.widget?.colorScheme) },
|
|
2258
2391
|
className: "padorix:cursor-pointer padorix:text-white padorix:py-2 padorix:px-5 padorix:rounded-md padorix:text-shadow-lg padorix:hover:-translate-y-2 padorix:transition-all padorix:hover:shadow-md",
|
|
2259
2392
|
children: a
|
|
2260
2393
|
}) })]
|
|
2261
2394
|
})
|
|
2262
|
-
] }) : /* @__PURE__ */
|
|
2263
|
-
/* @__PURE__ */
|
|
2395
|
+
] }) : /* @__PURE__ */ H(B, { children: [
|
|
2396
|
+
/* @__PURE__ */ H("div", {
|
|
2264
2397
|
style: { background: String(n?.widget?.colorScheme) },
|
|
2265
2398
|
className: "padorix:px-3 padorix:py-5 padorix:md:rounded-t-xl padorix:text-white padorix:text-sm padorix:flex padorix:items-center padorix:gap-2",
|
|
2266
2399
|
children: [
|
|
2267
|
-
/* @__PURE__ */
|
|
2400
|
+
/* @__PURE__ */ V(z, { children: /* @__PURE__ */ V("div", {
|
|
2268
2401
|
className: "padorix:size-8",
|
|
2269
|
-
children: /* @__PURE__ */
|
|
2402
|
+
children: /* @__PURE__ */ H("div", {
|
|
2270
2403
|
style: { color: String(n?.widget?.colorScheme) },
|
|
2271
2404
|
className: "padorix:size-8 padorix:rounded-full padorix:bg-white padorix:flex padorix:items-center padorix:justify-center",
|
|
2272
2405
|
children: [
|
|
2273
2406
|
" ",
|
|
2274
|
-
/* @__PURE__ */
|
|
2407
|
+
/* @__PURE__ */ V(Ke, { className: "padorix:size-7" }),
|
|
2275
2408
|
" "
|
|
2276
2409
|
]
|
|
2277
2410
|
})
|
|
2278
2411
|
}) }),
|
|
2279
|
-
/* @__PURE__ */
|
|
2412
|
+
/* @__PURE__ */ V(z, { children: /* @__PURE__ */ V("div", {
|
|
2280
2413
|
className: "",
|
|
2281
2414
|
children: "Our Frequently asked questions"
|
|
2282
2415
|
}) }),
|
|
2283
|
-
/* @__PURE__ */
|
|
2416
|
+
/* @__PURE__ */ V("div", {
|
|
2284
2417
|
className: "padorix:size-8 padorix:ml-auto",
|
|
2285
|
-
children: /* @__PURE__ */
|
|
2418
|
+
children: /* @__PURE__ */ V("div", {
|
|
2286
2419
|
className: "padorix:bg-black/10 padorix:size-8 padorix:self-center padorix:flex padorix:items-center padorix:justify-center padorix:rounded-md padorix:cursor-pointer padorix:active:scale-95 padorix:transition-all",
|
|
2287
2420
|
onClick: e.close,
|
|
2288
|
-
children: /* @__PURE__ */
|
|
2421
|
+
children: /* @__PURE__ */ V(F, {})
|
|
2289
2422
|
})
|
|
2290
2423
|
})
|
|
2291
2424
|
]
|
|
2292
2425
|
}),
|
|
2293
|
-
/* @__PURE__ */
|
|
2426
|
+
/* @__PURE__ */ H("div", {
|
|
2294
2427
|
className: "padorix:p-1.5 padorix:h-[70dvh] padorix-scrolls padorix:overflow-y-auto",
|
|
2295
|
-
children: [!e.isOpen && /* @__PURE__ */
|
|
2428
|
+
children: [!e.isOpen && /* @__PURE__ */ V(xt, {}), t.map((e, t) => /* @__PURE__ */ H("div", {
|
|
2296
2429
|
onClick: () => o(e),
|
|
2297
2430
|
className: "padorix:p-2.5 padorix:flex padorix:items-center padorix:gap-2 padorix:transition-all padorix:cursor-pointer padorix:active:scale-95 padorix:border-b padorix:border-gray-200 padorix:last:border-0",
|
|
2298
|
-
children: [/* @__PURE__ */
|
|
2431
|
+
children: [/* @__PURE__ */ H("div", {
|
|
2299
2432
|
className: "padorix:w-full",
|
|
2300
|
-
children: [/* @__PURE__ */
|
|
2433
|
+
children: [/* @__PURE__ */ V("div", {
|
|
2301
2434
|
className: "padorix:font-semibold",
|
|
2302
2435
|
children: e.question
|
|
2303
|
-
}), /* @__PURE__ */
|
|
2436
|
+
}), /* @__PURE__ */ H("div", {
|
|
2304
2437
|
className: "padorix:text-sm padorix:text-gray-500",
|
|
2305
2438
|
children: [e.answer?.slice(0, 50), "..."]
|
|
2306
2439
|
})]
|
|
2307
|
-
}), /* @__PURE__ */
|
|
2440
|
+
}), /* @__PURE__ */ V(ke, {})]
|
|
2308
2441
|
}, t))]
|
|
2309
2442
|
}),
|
|
2310
|
-
/* @__PURE__ */
|
|
2443
|
+
/* @__PURE__ */ V("div", {
|
|
2311
2444
|
className: "padorix:size-fit padorix:ml-auto padorix:p-2",
|
|
2312
|
-
children: /* @__PURE__ */
|
|
2445
|
+
children: /* @__PURE__ */ V("button", {
|
|
2313
2446
|
onClick: () => e.talkToTeam(!1),
|
|
2314
2447
|
style: { background: String(n?.widget?.colorScheme) },
|
|
2315
2448
|
className: "padorix:cursor-pointer padorix:text-white padorix:py-2 padorix:px-5 padorix:rounded-md padorix:text-shadow-lg padorix:hover:-translate-y-2 padorix:transition-all padorix:hover:shadow-md",
|
|
@@ -2320,11 +2453,11 @@ function vt(e) {
|
|
|
2320
2453
|
}
|
|
2321
2454
|
//#endregion
|
|
2322
2455
|
//#region lib/chats/chatScreen/unavailable-form.tsx
|
|
2323
|
-
function
|
|
2456
|
+
function Ct(e) {
|
|
2324
2457
|
let { workspace: t } = k((e) => e.data), [n, r] = A.useState(!1), [i, a] = A.useState({
|
|
2325
2458
|
status: "success",
|
|
2326
2459
|
message: ""
|
|
2327
|
-
}), o =
|
|
2460
|
+
}), o = pe({
|
|
2328
2461
|
mode: "uncontrolled",
|
|
2329
2462
|
initialValues: {
|
|
2330
2463
|
workspaceId: t?.id ?? "",
|
|
@@ -2334,7 +2467,7 @@ function yt(e) {
|
|
|
2334
2467
|
},
|
|
2335
2468
|
validate: {
|
|
2336
2469
|
name: (e) => e ? e.length <= 2 ? "Your name is expected to be more than 2 characters" : null : "Full name is required",
|
|
2337
|
-
email: (e) => e ?
|
|
2470
|
+
email: (e) => e ? _t(e) ? null : "Please enter a valid email address" : "Email address is required",
|
|
2338
2471
|
message: (e) => e ? null : "Enquiry content is required"
|
|
2339
2472
|
}
|
|
2340
2473
|
});
|
|
@@ -2360,78 +2493,78 @@ function yt(e) {
|
|
|
2360
2493
|
}), 3e3);
|
|
2361
2494
|
}
|
|
2362
2495
|
}
|
|
2363
|
-
return /* @__PURE__ */
|
|
2496
|
+
return /* @__PURE__ */ H(B, { children: [/* @__PURE__ */ H("div", {
|
|
2364
2497
|
style: { background: String(t?.widget?.colorScheme) },
|
|
2365
2498
|
className: "padorix:px-3 padorix:py-5 padorix:md:rounded-t-xl padorix:text-white padorix:text-sm padorix:flex padorix:items-center padorix:gap-2",
|
|
2366
2499
|
children: [
|
|
2367
|
-
/* @__PURE__ */
|
|
2500
|
+
/* @__PURE__ */ V(z, { children: /* @__PURE__ */ V("div", {
|
|
2368
2501
|
className: "padorix:size-8",
|
|
2369
|
-
children: /* @__PURE__ */
|
|
2502
|
+
children: /* @__PURE__ */ H("div", {
|
|
2370
2503
|
style: { color: String(t?.widget?.colorScheme) },
|
|
2371
2504
|
className: "padorix:size-8 padorix:rounded-full padorix:bg-white padorix:flex padorix:items-center padorix:justify-center",
|
|
2372
2505
|
children: [
|
|
2373
2506
|
" ",
|
|
2374
|
-
/* @__PURE__ */
|
|
2507
|
+
/* @__PURE__ */ V(qe, { className: "padorix:size-5" }),
|
|
2375
2508
|
" "
|
|
2376
2509
|
]
|
|
2377
2510
|
})
|
|
2378
2511
|
}) }),
|
|
2379
|
-
/* @__PURE__ */
|
|
2512
|
+
/* @__PURE__ */ H("div", {
|
|
2380
2513
|
className: "",
|
|
2381
|
-
children: [/* @__PURE__ */
|
|
2514
|
+
children: [/* @__PURE__ */ V(z, { children: /* @__PURE__ */ V("div", {
|
|
2382
2515
|
className: "",
|
|
2383
2516
|
children: "Send us a message"
|
|
2384
|
-
}) }), /* @__PURE__ */
|
|
2517
|
+
}) }), /* @__PURE__ */ V(z, { children: /* @__PURE__ */ V("div", {
|
|
2385
2518
|
className: "padorix:text-xs",
|
|
2386
2519
|
children: "Leave us a message and we'll reply via email."
|
|
2387
2520
|
}) })]
|
|
2388
2521
|
}),
|
|
2389
|
-
/* @__PURE__ */
|
|
2522
|
+
/* @__PURE__ */ V("div", {
|
|
2390
2523
|
className: "padorix:size-8 padorix:ml-auto",
|
|
2391
|
-
children: /* @__PURE__ */
|
|
2524
|
+
children: /* @__PURE__ */ V("div", {
|
|
2392
2525
|
className: "padorix:bg-black/10 padorix:size-8 padorix:self-center padorix:flex padorix:items-center padorix:justify-center padorix:rounded-md padorix:cursor-pointer padorix:active:scale-95 padorix:transition-all",
|
|
2393
2526
|
onClick: e.close,
|
|
2394
|
-
children: /* @__PURE__ */
|
|
2527
|
+
children: /* @__PURE__ */ V(F, {})
|
|
2395
2528
|
})
|
|
2396
2529
|
})
|
|
2397
2530
|
]
|
|
2398
|
-
}), /* @__PURE__ */
|
|
2531
|
+
}), /* @__PURE__ */ V("div", {
|
|
2399
2532
|
className: "padorix:p-1.5 padorix:h-[70dvh] padorix-scrolls padorix:overflow-y-auto",
|
|
2400
|
-
children: /* @__PURE__ */
|
|
2533
|
+
children: /* @__PURE__ */ H("form", {
|
|
2401
2534
|
onSubmit: o.onSubmit(s),
|
|
2402
2535
|
children: [
|
|
2403
|
-
/* @__PURE__ */
|
|
2536
|
+
/* @__PURE__ */ V($, {
|
|
2404
2537
|
content: "Full name",
|
|
2405
2538
|
placeholder: "Enter your full name",
|
|
2406
2539
|
error: o.errors.name?.toString() || "",
|
|
2407
2540
|
...o.getInputProps("name")
|
|
2408
2541
|
}, o.key("name")),
|
|
2409
|
-
/* @__PURE__ */
|
|
2542
|
+
/* @__PURE__ */ V($, {
|
|
2410
2543
|
content: "Email address",
|
|
2411
2544
|
placeholder: "name@example.com",
|
|
2412
2545
|
error: o.errors.email?.toString() || "",
|
|
2413
2546
|
...o.getInputProps("email")
|
|
2414
2547
|
}, o.key("email")),
|
|
2415
|
-
/* @__PURE__ */
|
|
2548
|
+
/* @__PURE__ */ V($, {
|
|
2416
2549
|
content: "Message",
|
|
2417
2550
|
formtype: "textarea",
|
|
2418
2551
|
error: o.errors.message?.toString() || "",
|
|
2419
2552
|
...o.getInputProps("message")
|
|
2420
2553
|
}, o.key("message")),
|
|
2421
|
-
i.message && /* @__PURE__ */
|
|
2554
|
+
i.message && /* @__PURE__ */ V("div", {
|
|
2422
2555
|
className: `padorix:mt-4 padorix:text-sm padorix:p-2 padorix:rounded-md ${i.status === "success" ? "padorix:bg-green-100 padorix:text-green-800" : "padorix:bg-red-100 padorix:text-red-800"}`,
|
|
2423
2556
|
children: i.message
|
|
2424
2557
|
}),
|
|
2425
|
-
/* @__PURE__ */
|
|
2558
|
+
/* @__PURE__ */ H("div", {
|
|
2426
2559
|
className: "padorix:mt-6 padorix:flex padorix:items-center padorix:gap-2",
|
|
2427
|
-
children: [/* @__PURE__ */
|
|
2560
|
+
children: [/* @__PURE__ */ V(z, { children: /* @__PURE__ */ V("button", {
|
|
2428
2561
|
type: "button",
|
|
2429
2562
|
onClick: e.backAction,
|
|
2430
2563
|
className: "padorix:cursor-pointer padorix:border padorix:border-gray-300 padorix:bg-slate-100 padorix:py-2 padorix:px-5 padorix:rounded-md padorix:text-shadow-lg padorix:hover:-translate-y-2 padorix:transition-all padorix:hover:shadow-md",
|
|
2431
2564
|
children: "Back"
|
|
2432
|
-
}) }), /* @__PURE__ */
|
|
2565
|
+
}) }), /* @__PURE__ */ V(z, {
|
|
2433
2566
|
className: "padorix:w-full",
|
|
2434
|
-
children: /* @__PURE__ */
|
|
2567
|
+
children: /* @__PURE__ */ V("button", {
|
|
2435
2568
|
disabled: n,
|
|
2436
2569
|
style: { background: n ? "#62748e" : String(t?.widget?.colorScheme) },
|
|
2437
2570
|
className: `${n ? "padorix:cursor-progress" : "padorix:cursor-pointer"} padorix:text-white padorix:w-full padorix:py-2 padorix:px-5 padorix:rounded-md padorix:text-shadow-lg padorix:hover:-translate-y-2 padorix:transition-all padorix:hover:shadow-md`,
|
|
@@ -2445,7 +2578,7 @@ function yt(e) {
|
|
|
2445
2578
|
}
|
|
2446
2579
|
//#endregion
|
|
2447
2580
|
//#region lib/chats/chatScreen/chat-lobby.tsx
|
|
2448
|
-
function
|
|
2581
|
+
function wt(e) {
|
|
2449
2582
|
let { sender: t, faqs: n, faqsLoaded: r, workspace: i } = k((e) => e.data), a = JSON.parse(localStorage.getItem("pdx-sess") || "null"), [o, s] = A.useState(!0), [c, l] = A.useState(!1), u = v(i?.widget?.notifications?.showFaqBeforeConversation), d = x(i?.widget), f = !!(e.openOptions && Object.values(e.openOptions).some(Boolean));
|
|
2450
2583
|
function p(e) {
|
|
2451
2584
|
s(e), l(!d);
|
|
@@ -2456,30 +2589,30 @@ function bt(e) {
|
|
|
2456
2589
|
function h() {
|
|
2457
2590
|
s(!0);
|
|
2458
2591
|
}
|
|
2459
|
-
if (t?.conversationId && a?.conversationId) return /* @__PURE__ */
|
|
2460
|
-
if (!f && o && u && !r) return /* @__PURE__ */
|
|
2461
|
-
if (!f && o && u && n.length > 0) return /* @__PURE__ */
|
|
2592
|
+
if (t?.conversationId && a?.conversationId) return /* @__PURE__ */ V(mt, { ...e });
|
|
2593
|
+
if (!f && o && u && !r) return /* @__PURE__ */ V("div", { className: e.styles.container });
|
|
2594
|
+
if (!f && o && u && n.length > 0) return /* @__PURE__ */ V("div", {
|
|
2462
2595
|
className: e.styles.container,
|
|
2463
|
-
children: /* @__PURE__ */
|
|
2596
|
+
children: /* @__PURE__ */ V(St, {
|
|
2464
2597
|
talkToTeam: p,
|
|
2465
2598
|
isOpen: d,
|
|
2466
2599
|
...e
|
|
2467
2600
|
})
|
|
2468
2601
|
});
|
|
2469
|
-
if (c) return /* @__PURE__ */
|
|
2602
|
+
if (c) return /* @__PURE__ */ V("div", {
|
|
2470
2603
|
className: e.styles.container,
|
|
2471
|
-
children: /* @__PURE__ */
|
|
2604
|
+
children: /* @__PURE__ */ V(Ct, {
|
|
2472
2605
|
close: e.close,
|
|
2473
2606
|
isOpen: d,
|
|
2474
2607
|
backAction: m
|
|
2475
2608
|
})
|
|
2476
2609
|
});
|
|
2477
|
-
if (!c) return /* @__PURE__ */
|
|
2610
|
+
if (!c) return /* @__PURE__ */ V(Tt, {
|
|
2478
2611
|
openFaq: h,
|
|
2479
2612
|
...e
|
|
2480
2613
|
});
|
|
2481
2614
|
}
|
|
2482
|
-
function
|
|
2615
|
+
function Tt({ openFaq: e, ...t }) {
|
|
2483
2616
|
let { workspace: n, faqs: r } = k((e) => e.data), [i, a] = A.useState(t.openOptions ? 2 : 1), o = x(n?.widget), s = v(n?.widget?.notifications?.showFaqBeforeConversation) && r.length > 0, c = A.useMemo(() => n?.logo, [n]);
|
|
2484
2617
|
A.useEffect(() => {
|
|
2485
2618
|
a(t.openOptions ? 2 : 1);
|
|
@@ -2487,7 +2620,7 @@ function xt({ openFaq: e, ...t }) {
|
|
|
2487
2620
|
function l(e) {
|
|
2488
2621
|
a(e);
|
|
2489
2622
|
}
|
|
2490
|
-
if (i === 2) return /* @__PURE__ */
|
|
2623
|
+
if (i === 2) return /* @__PURE__ */ V(vt, {
|
|
2491
2624
|
close: t.close,
|
|
2492
2625
|
styles: t.styles,
|
|
2493
2626
|
changeScreen: l,
|
|
@@ -2496,23 +2629,23 @@ function xt({ openFaq: e, ...t }) {
|
|
|
2496
2629
|
openRequestId: t.openRequestId,
|
|
2497
2630
|
autoSubmitRequestId: t.autoSubmitRequestId
|
|
2498
2631
|
});
|
|
2499
|
-
if (i === 1) return /* @__PURE__ */
|
|
2632
|
+
if (i === 1) return /* @__PURE__ */ H("div", {
|
|
2500
2633
|
className: t.styles.container,
|
|
2501
|
-
children: [/* @__PURE__ */
|
|
2634
|
+
children: [/* @__PURE__ */ H("div", {
|
|
2502
2635
|
style: {
|
|
2503
2636
|
background: String(n?.widget?.colorScheme),
|
|
2504
2637
|
color: n?.widget?.textColor || "#ffffff"
|
|
2505
2638
|
},
|
|
2506
2639
|
className: "padorix:px-3 padorix:py-5 padorix:md:rounded-t-xl padorix:text-sm padorix:flex padorix:items-center padorix:gap-2",
|
|
2507
2640
|
children: [
|
|
2508
|
-
/* @__PURE__ */
|
|
2641
|
+
/* @__PURE__ */ V(z, { children: /* @__PURE__ */ V("div", {
|
|
2509
2642
|
className: "padorix:size-8",
|
|
2510
|
-
children: /* @__PURE__ */
|
|
2643
|
+
children: /* @__PURE__ */ H("div", {
|
|
2511
2644
|
className: "padorix:size-8 padorix:rounded-full padorix:bg-white padorix:flex padorix:items-center padorix:justify-center",
|
|
2512
2645
|
children: [
|
|
2513
2646
|
" ",
|
|
2514
|
-
/* @__PURE__ */
|
|
2515
|
-
src:
|
|
2647
|
+
/* @__PURE__ */ V("img", {
|
|
2648
|
+
src: ht,
|
|
2516
2649
|
alt: n?.name,
|
|
2517
2650
|
loading: "lazy",
|
|
2518
2651
|
className: "padorix:size-6"
|
|
@@ -2521,29 +2654,29 @@ function xt({ openFaq: e, ...t }) {
|
|
|
2521
2654
|
]
|
|
2522
2655
|
})
|
|
2523
2656
|
}) }),
|
|
2524
|
-
/* @__PURE__ */
|
|
2657
|
+
/* @__PURE__ */ V(z, { children: /* @__PURE__ */ V("div", {
|
|
2525
2658
|
className: "",
|
|
2526
2659
|
children: n?.widget?.widgetMessage
|
|
2527
2660
|
}) }),
|
|
2528
|
-
/* @__PURE__ */
|
|
2661
|
+
/* @__PURE__ */ V("div", {
|
|
2529
2662
|
className: "padorix:size-8 padorix:ml-auto",
|
|
2530
|
-
children: /* @__PURE__ */
|
|
2663
|
+
children: /* @__PURE__ */ V("div", {
|
|
2531
2664
|
className: "padorix:bg-black/10 padorix:size-8 padorix:self-center padorix:flex padorix:items-center padorix:justify-center padorix:rounded-md padorix:cursor-pointer padorix:active:scale-95 padorix:transition-all",
|
|
2532
2665
|
onClick: t.close,
|
|
2533
|
-
children: /* @__PURE__ */
|
|
2666
|
+
children: /* @__PURE__ */ V(F, {})
|
|
2534
2667
|
})
|
|
2535
2668
|
})
|
|
2536
2669
|
]
|
|
2537
|
-
}), /* @__PURE__ */
|
|
2670
|
+
}), /* @__PURE__ */ V("div", {
|
|
2538
2671
|
className: "padorix:p-4 padorix:mt-5",
|
|
2539
|
-
children: /* @__PURE__ */
|
|
2672
|
+
children: /* @__PURE__ */ H("div", {
|
|
2540
2673
|
className: "padorix:flex padorix:flex-col padorix:items-center padorix:text-center padorix:h-full padorix:justify-center",
|
|
2541
2674
|
children: [
|
|
2542
|
-
/* @__PURE__ */
|
|
2675
|
+
/* @__PURE__ */ V(z, { children: /* @__PURE__ */ H("div", {
|
|
2543
2676
|
className: "padorix:mb-3",
|
|
2544
2677
|
children: [
|
|
2545
2678
|
" ",
|
|
2546
|
-
/* @__PURE__ */
|
|
2679
|
+
/* @__PURE__ */ V("img", {
|
|
2547
2680
|
src: c,
|
|
2548
2681
|
alt: n?.name,
|
|
2549
2682
|
loading: "lazy",
|
|
@@ -2552,33 +2685,33 @@ function xt({ openFaq: e, ...t }) {
|
|
|
2552
2685
|
" "
|
|
2553
2686
|
]
|
|
2554
2687
|
}) }),
|
|
2555
|
-
/* @__PURE__ */
|
|
2688
|
+
/* @__PURE__ */ V(z, { children: /* @__PURE__ */ V("div", {
|
|
2556
2689
|
className: "padorix:font-semibold",
|
|
2557
2690
|
children: n?.widget?.department
|
|
2558
2691
|
}) }),
|
|
2559
|
-
/* @__PURE__ */
|
|
2692
|
+
/* @__PURE__ */ H(z, { children: [/* @__PURE__ */ V("div", {
|
|
2560
2693
|
className: "padorix:mt-5",
|
|
2561
2694
|
children: n?.widget?.welcomeMessage || "Ask us anything - we will get back to you here or by email."
|
|
2562
|
-
}), !o && /* @__PURE__ */
|
|
2563
|
-
/* @__PURE__ */
|
|
2695
|
+
}), !o && /* @__PURE__ */ V(xt, {})] }),
|
|
2696
|
+
/* @__PURE__ */ H("div", {
|
|
2564
2697
|
className: "padorix:mt-10",
|
|
2565
|
-
children: [/* @__PURE__ */
|
|
2698
|
+
children: [/* @__PURE__ */ V(z, { children: /* @__PURE__ */ V("button", {
|
|
2566
2699
|
onClick: () => o && l(2),
|
|
2567
2700
|
style: { background: String(n?.widget?.colorScheme) },
|
|
2568
2701
|
disabled: !o,
|
|
2569
2702
|
className: `padorix:text-white padorix:py-3 padorix:px-5 padorix:rounded-md padorix:text-shadow-lg padorix:transition-all ${o ? "padorix:cursor-pointer padorix:hover:-translate-y-2 padorix:hover:shadow-md" : "padorix:cursor-not-allowed padorix:opacity-50"}`,
|
|
2570
2703
|
children: "Start new conversation"
|
|
2571
|
-
}) }), s && /* @__PURE__ */
|
|
2704
|
+
}) }), s && /* @__PURE__ */ V(z, { children: /* @__PURE__ */ V("div", {
|
|
2572
2705
|
onClick: () => e?.(),
|
|
2573
2706
|
className: "padorix:underline padorix:mt-5 padorix:cursor-pointer padorix:active:scale-95 padorix:transition-all",
|
|
2574
2707
|
children: "Frequently asked questions?"
|
|
2575
2708
|
}) })]
|
|
2576
2709
|
}),
|
|
2577
|
-
v(n?.widget?.notifications?.displaySourceLogoOnWidget) && /* @__PURE__ */
|
|
2710
|
+
v(n?.widget?.notifications?.displaySourceLogoOnWidget) && /* @__PURE__ */ V(z, { children: /* @__PURE__ */ H("div", {
|
|
2578
2711
|
className: "padorix:mt-10 padorix:grayscale-100 padorix:text-sm padorix:flex padorix:items-center padorix:justify-center padorix:text-zinc-500 padorix:gap-2",
|
|
2579
2712
|
children: [
|
|
2580
2713
|
" ",
|
|
2581
|
-
/* @__PURE__ */
|
|
2714
|
+
/* @__PURE__ */ V("img", {
|
|
2582
2715
|
src: "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGAAAABPCAMAAAAjvDDpAAADAFBMVEVMaXEAQf8AVvsAVv8CVaoAV/0AVvwAVf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tCF10Mc/gCtD7of+Z0X0RRTanSbbXGWj8eGpt4N3m1Sb5F2EAwfxsdL0NhiiiwMhqDfDDPS6iDFJ7y6lyHvQ/oBdwb3yxHAse4poiQqd61IMJvvJL4J8LWyAb/Zi5Ivl1Oz1YNDCqLzgRgitXSSnpr+XDVoN7UKhy7ag2295kXTF4SgTajkI+6prkB2Ewt7ausfrA4Bth4Jdo1p4ZhlKE0NIRDxu5uBLd2kyeDuYUHdFmP7MwZhgrx/R9q8LLxy4cOHCK6NGHcpt5Lrzt6HXkhiCKDwEh/9u/wHzq1jxN2ehBgz8P+K/qzfIpxuSbGgAAAAASUVORK5CYII=",
|
|
2583
2716
|
alt: "padorix",
|
|
2584
2717
|
loading: "lazy",
|
|
@@ -2594,35 +2727,37 @@ function xt({ openFaq: e, ...t }) {
|
|
|
2594
2727
|
}
|
|
2595
2728
|
//#endregion
|
|
2596
2729
|
//#region lib/chats/chatScreen/styles.ts
|
|
2597
|
-
var
|
|
2730
|
+
var Et = "", Dt = {
|
|
2598
2731
|
visitor: {
|
|
2599
2732
|
container: "padorix:z-50 padorix:fixed padorix:bottom-0 padorix:left-0 padorix:right-0 padorix:top-0 padorix:bg-[#fff] padorix:w-screen padorix:h-screen padorix:max-w-full padorix:pb-16 padorix:max-md:h-(--padorix-vvh,100dvh) padorix:max-md:translate-y-(--padorix-vvt,0px) padorix:md:top-auto padorix:md:left-auto padorix:md:bottom-5 padorix:md:right-2 padorix:md:h-[93dvh] padorix:md:w-[400px] padorix:md:max-w-[640px] padorix:md:rounded-xl padorix:md:border padorix:border-gray-200 padorix:md:shadow-lg padorix:overflow-y-hidden padorix:flex padorix:flex-col",
|
|
2600
2733
|
backdrop: "padorix:hidden padorix:max-md:block padorix:fixed padorix:top-0 padorix:left-0 padorix:right-0 padorix:-bottom-[100lvh] padorix:z-49 padorix:bg-white padorix:touch-none",
|
|
2601
2734
|
height: "80dvh",
|
|
2602
2735
|
chatContainerPadding: "padorix:pt-3 padorix:flex-1 padorix:min-h-0 padorix:pb-10 padorix:overflow-y-auto padorix:overflow-x-hidden padorix-scrolls padorix:relative",
|
|
2603
2736
|
header: "padorix:relative padorix:shrink-0 padorix:w-full padorix:bg-white padorix:z-10 padorix:border-x padorix:border-t padorix:border-gray-200 padorix:md:rounded-t-lg",
|
|
2604
|
-
emojiContainer: "padorix:fixed padorix:bottom-
|
|
2737
|
+
emojiContainer: "padorix:fixed padorix:bottom-20 padorix:left-4 padorix:z-30 padorix:md:left-auto padorix:md:right-6",
|
|
2605
2738
|
formContainer: "padorix:border-t padorix:border-gray-200 padorix:fixed padorix:bg-white padorix:z-10 padorix:right-0 padorix:bottom-5 padorix:w-dvw padorix:max-w-full padorix:text-sm padorix:px-4 padorix:py-2 padorix:md:max-w-160 padorix:md:w-100 padorix:md:right-2 padorix:md:rounded-b-xl",
|
|
2606
2739
|
imageUploadContainer: "padorix:fixed padorix:top-12 padorix:left-0 padorix:right-0 padorix:w-dvw padorix:h-full padorix:bg-white padorix:z-20 padorix:p-0 padorix:ml-auto padorix:space-y-3 padorix:md:top-21 padorix:md:right-2 padorix:md:w-100 padorix:md:max-w-160 padorix:md:h-[90dvh]",
|
|
2607
2740
|
messagesContainer: "padorix:fixed padorix:bottom-5 padorix:right-0 padorix:w-full padorix:z-30 padorix:bg-white padorix:flex padorix:items-center padorix:justify-between padorix:px-3 padorix:py-4 padorix:md:right-2 padorix:md:w-100 padorix:md:max-w-160 padorix:border padorix:border-gray-200 padorix:rounded-b-xl",
|
|
2608
|
-
replyContainer: "padorix:relative padorix:w-full padorix:mb-1"
|
|
2741
|
+
replyContainer: "padorix:relative padorix:w-full padorix:mb-1",
|
|
2742
|
+
formRoot: "padorix:relative padorix:z-50"
|
|
2609
2743
|
},
|
|
2610
2744
|
nonVisitor: {
|
|
2611
2745
|
container: "padorix:bg-[#fff] padorix:relative!",
|
|
2612
2746
|
height: "",
|
|
2613
2747
|
chatContainerPadding: "padorix:pt-5 padorix:pb-20 padorix:overflow-y-auto padorix:overflow-x-hidden padorix-scrolls padorix:relative",
|
|
2614
2748
|
header: "padorix:sticky padorix:top-0 padorix:left-0 padorix:w-full padorix:bg-white padorix:z-10 padorix:border-x padorix:border-t padorix:border-gray-200",
|
|
2615
|
-
emojiContainer: "padorix:absolute padorix:bottom-
|
|
2616
|
-
formContainer: `padorix:border-t padorix:bg-white padorix:z-10 padorix:relative padorix:border-gray-200 padorix:bottom-0 padorix:left-0 padorix:w-full ${
|
|
2617
|
-
imageUploadContainer: `padorix:absolute padorix:
|
|
2749
|
+
emojiContainer: "padorix:absolute padorix:bottom-full padorix:left-1 padorix:mb-1 padorix:z-40",
|
|
2750
|
+
formContainer: `padorix:border-t padorix:bg-white padorix:z-10 padorix:relative padorix:border-gray-200 padorix:bottom-0 padorix:left-0 padorix:w-full ${Et} padorix:ml-auto padorix:right-0 padorix:md:text-sm padorix:px-1.5 padorix:pt-1.5 padorix:pb-4`,
|
|
2751
|
+
imageUploadContainer: `padorix:absolute padorix:inset-0 padorix:bg-white padorix:z-30 padorix:space-y-3 padorix:overflow-y-auto padorix-scrolls ${Et}`,
|
|
2618
2752
|
messagesContainer: "padorix:absolute padorix:border padorix:border-gray-200 padorix:bottom-0 padorix:right-0 padorix:w-full padorix:z-30 padorix:bg-white padorix:flex padorix:items-center padorix:justify-between padorix:px-3 padorix:py-4 padorix:md:right-2",
|
|
2619
|
-
replyContainer: `padorix:relative padorix:w-full padorix:mb-1 ${
|
|
2753
|
+
replyContainer: `padorix:relative padorix:w-full padorix:mb-1 ${Et}`,
|
|
2754
|
+
formRoot: ""
|
|
2620
2755
|
}
|
|
2621
|
-
},
|
|
2756
|
+
}, Ot = "data:image/svg+xml,%3csvg%20width='122'%20height='123'%20viewBox='0%200%20122%20123'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20opacity='0.3'%3e%3cpath%20d='M56.6201%2019.9004H65.3779C85.9345%2019.9004%20102.6%2036.5645%20102.6%2057.1211V65.8789C102.6%2086.4355%2085.9346%20103.101%2065.3779%20103.101H56.6201C36.0636%20103.101%2019.3994%2086.4355%2019.3994%2065.8789V57.1211C19.3995%2036.5646%2036.0636%2019.9005%2056.6201%2019.9004Z'%20stroke='%23667085'%20stroke-width='6.4'/%3e%3c/g%3e%3cg%20opacity='0.1'%3e%3cpath%20d='M40.6201%203.90039H81.3779C101.934%203.90039%20118.6%2020.5645%20118.6%2041.1211V81.8789C118.6%20102.436%20101.935%20119.101%2081.3779%20119.101H40.6201C20.0636%20119.101%203.39941%20102.435%203.39941%2081.8789V41.1211C3.39948%2020.5646%2020.0636%203.90048%2040.6201%203.90039Z'%20stroke='%23667085'%20stroke-width='6.4'/%3e%3c/g%3e%3cpath%20d='M51.6693%2070.8339L70.3359%2052.1673M53.0026%2040.1673V34.834M69.0026%2082.834V88.1673M39.6693%2053.5007H34.3359M82.3359%2069.5007H87.6693M42.1072%2042.6052L38.3359%2038.834M79.8981%2080.3958L83.6694%2084.1671M61.0027%2076.5854L55.3458%2082.2422C51.1803%2086.4078%2044.4265%2086.4078%2040.2609%2082.2422C36.0953%2078.0766%2036.0953%2071.3229%2040.2609%2067.1573L45.9178%2061.5004M76.0876%2061.5004L81.7445%2055.8436C85.9101%2051.678%2085.9101%2044.9242%2081.7445%2040.7586C77.5789%2036.593%2070.8251%2036.593%2066.6596%2040.7586L61.0027%2046.4155'%20stroke='%23667085'%20stroke-width='6.4'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3c/svg%3e", kt = "data:image/svg+xml,%3csvg%20width='122'%20height='122'%20viewBox='0%200%20122%20122'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20opacity='0.3'%3e%3cpath%20d='M56.6209%2019.4002H65.3787C85.9353%2019.4002%20102.6%2036.0643%20102.6%2056.6209V65.3787C102.6%2085.9353%2085.9353%20102.6%2065.3787%20102.6H56.6209C36.0643%20102.6%2019.4002%2085.9353%2019.4002%2065.3787V56.6209C19.4003%2036.0644%2036.0644%2019.4003%2056.6209%2019.4002Z'%20stroke='%23D12C2C'%20stroke-width='6.4'/%3e%3c/g%3e%3cg%20opacity='0.1'%3e%3cpath%20d='M40.6209%203.40019H81.3787C101.935%203.40019%20118.6%2020.0643%20118.6%2040.6209V81.3787C118.6%20101.935%20101.935%20118.6%2081.3787%20118.6H40.6209C20.0643%20118.6%203.40019%20101.935%203.40019%2081.3787V40.6209C3.40026%2020.0644%2020.0644%203.40028%2040.6209%203.40019Z'%20stroke='%23FF7E7E'%20stroke-width='6.4'/%3e%3c/g%3e%3cpath%20d='M69%2053L53%2069M53%2053L69%2069M87.6667%2061C87.6667%2075.7276%2075.7276%2087.6667%2061%2087.6667C46.2724%2087.6667%2034.3333%2075.7276%2034.3333%2061C34.3333%2046.2724%2046.2724%2034.3333%2061%2034.3333C75.7276%2034.3333%2087.6667%2046.2724%2087.6667%2061Z'%20stroke='%23D12C2C'%20stroke-width='6.4'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3c/svg%3e";
|
|
2622
2757
|
//#endregion
|
|
2623
2758
|
//#region lib/chats/online-check/online-check.tsx
|
|
2624
|
-
function
|
|
2625
|
-
let t = e.userType === w.VISITOR ?
|
|
2759
|
+
function At(e) {
|
|
2760
|
+
let t = e.userType === w.VISITOR ? Dt.visitor : Dt.nonVisitor, n = e.userType === w.VISITOR, [r, i] = A.useState(navigator.onLine);
|
|
2626
2761
|
return A.useEffect(() => {
|
|
2627
2762
|
let e = () => {
|
|
2628
2763
|
i(!0);
|
|
@@ -2632,19 +2767,19 @@ function Et(e) {
|
|
|
2632
2767
|
return window.addEventListener("online", e), window.addEventListener("offline", t), () => {
|
|
2633
2768
|
window.removeEventListener("online", e), window.removeEventListener("offline", t);
|
|
2634
2769
|
};
|
|
2635
|
-
}, []), r ? e.children : /* @__PURE__ */
|
|
2770
|
+
}, []), r ? e.children : /* @__PURE__ */ H("div", {
|
|
2636
2771
|
className: t.container,
|
|
2637
|
-
children: [/* @__PURE__ */
|
|
2772
|
+
children: [/* @__PURE__ */ H("div", {
|
|
2638
2773
|
className: "padorix:px-3 padorix:py-5 padorix:bg-[#6c63ff] padorix:md:rounded-t-xl padorix:text-white padorix:text-sm padorix:flex padorix:items-center padorix:gap-2",
|
|
2639
2774
|
children: [
|
|
2640
|
-
/* @__PURE__ */
|
|
2775
|
+
/* @__PURE__ */ V(z, { children: /* @__PURE__ */ V("div", {
|
|
2641
2776
|
className: "padorix:size-8",
|
|
2642
|
-
children: /* @__PURE__ */
|
|
2777
|
+
children: /* @__PURE__ */ H("div", {
|
|
2643
2778
|
className: "padorix:size-8 padorix:rounded-full padorix:bg-white padorix:flex padorix:items-center padorix:justify-center",
|
|
2644
2779
|
children: [
|
|
2645
2780
|
" ",
|
|
2646
|
-
/* @__PURE__ */
|
|
2647
|
-
src:
|
|
2781
|
+
/* @__PURE__ */ V("img", {
|
|
2782
|
+
src: kt,
|
|
2648
2783
|
alt: "Padorix",
|
|
2649
2784
|
loading: "lazy",
|
|
2650
2785
|
className: "padorix:size-6"
|
|
@@ -2653,39 +2788,39 @@ function Et(e) {
|
|
|
2653
2788
|
]
|
|
2654
2789
|
})
|
|
2655
2790
|
}) }),
|
|
2656
|
-
/* @__PURE__ */
|
|
2791
|
+
/* @__PURE__ */ V(z, { children: /* @__PURE__ */ V("div", {
|
|
2657
2792
|
className: "",
|
|
2658
2793
|
children: "Internet connected lost, try reconnecting your device network to proceed"
|
|
2659
2794
|
}) }),
|
|
2660
|
-
n && /* @__PURE__ */
|
|
2795
|
+
n && /* @__PURE__ */ V("div", {
|
|
2661
2796
|
className: "padorix:size-8 padorix:ml-auto",
|
|
2662
|
-
children: /* @__PURE__ */
|
|
2797
|
+
children: /* @__PURE__ */ V("div", {
|
|
2663
2798
|
className: "padorix:bg-black/10 padorix:size-8 padorix:self-center padorix:flex padorix:items-center padorix:justify-center padorix:rounded-md padorix:cursor-pointer padorix:active:scale-95 padorix:transition-all",
|
|
2664
2799
|
onClick: e.close,
|
|
2665
|
-
children: /* @__PURE__ */
|
|
2800
|
+
children: /* @__PURE__ */ V(F, {})
|
|
2666
2801
|
})
|
|
2667
2802
|
})
|
|
2668
2803
|
]
|
|
2669
|
-
}), /* @__PURE__ */
|
|
2804
|
+
}), /* @__PURE__ */ H("div", {
|
|
2670
2805
|
className: "padorix:flex padorix:flex-col padorix:items-center padorix:justify-center padorix:h-full padorix:text-center",
|
|
2671
|
-
children: [/* @__PURE__ */
|
|
2672
|
-
src:
|
|
2806
|
+
children: [/* @__PURE__ */ V(z, { children: /* @__PURE__ */ V("img", {
|
|
2807
|
+
src: Ot,
|
|
2673
2808
|
alt: "",
|
|
2674
2809
|
className: ""
|
|
2675
|
-
}) }), /* @__PURE__ */
|
|
2676
|
-
/* @__PURE__ */
|
|
2810
|
+
}) }), /* @__PURE__ */ H(z, { children: [
|
|
2811
|
+
/* @__PURE__ */ V("div", {
|
|
2677
2812
|
className: "padorix:text-2xl padorix:font-bold padorix:mt-10 padorix:mb-3",
|
|
2678
2813
|
children: "Oops!"
|
|
2679
2814
|
}),
|
|
2680
|
-
/* @__PURE__ */
|
|
2815
|
+
/* @__PURE__ */ V("div", {
|
|
2681
2816
|
className: "padorix:text-base padorix:text-zinc-500",
|
|
2682
2817
|
children: "Your internet is disconnected"
|
|
2683
2818
|
}),
|
|
2684
|
-
/* @__PURE__ */
|
|
2819
|
+
/* @__PURE__ */ H("div", {
|
|
2685
2820
|
className: "padorix:text-zinc-500 padorix:text-sm",
|
|
2686
2821
|
children: [
|
|
2687
2822
|
"Do not worry your chat sessions are saved ",
|
|
2688
|
-
/* @__PURE__ */
|
|
2823
|
+
/* @__PURE__ */ V("br", {}),
|
|
2689
2824
|
" till you are back online"
|
|
2690
2825
|
]
|
|
2691
2826
|
})
|
|
@@ -2695,7 +2830,7 @@ function Et(e) {
|
|
|
2695
2830
|
}
|
|
2696
2831
|
//#endregion
|
|
2697
2832
|
//#region lib/chats/chatScreen/chat-conversation.tsx
|
|
2698
|
-
function
|
|
2833
|
+
function jt(e) {
|
|
2699
2834
|
let t = e.userType === w.VISITOR, n = O(), { workspace: r } = k((e) => e.data);
|
|
2700
2835
|
if (A.useEffect(() => {
|
|
2701
2836
|
if (!t) {
|
|
@@ -2703,7 +2838,7 @@ function Dt(e) {
|
|
|
2703
2838
|
return;
|
|
2704
2839
|
}
|
|
2705
2840
|
try {
|
|
2706
|
-
let e = JSON.parse(localStorage.getItem("pdx-sess") ?? "null"), t = e?.expiresAt ?
|
|
2841
|
+
let e = JSON.parse(localStorage.getItem("pdx-sess") ?? "null"), t = e?.expiresAt ? K().isAfter(e?.expiresAt) : !0;
|
|
2707
2842
|
t && localStorage.removeItem(p), !t && e?.conversationId && n(g(e));
|
|
2708
2843
|
} catch (e) {
|
|
2709
2844
|
console.log(e);
|
|
@@ -2727,25 +2862,25 @@ function Dt(e) {
|
|
|
2727
2862
|
]), A.useEffect(() => {
|
|
2728
2863
|
if (t || !e.workspaceId) return;
|
|
2729
2864
|
let n = () => E.emit(D.subscribe_workspace, { workspaceId: e.workspaceId });
|
|
2730
|
-
return E.on(D.connected, n), ne(), n(), () => {
|
|
2865
|
+
return E.on(D.connected, n), ne(!0), n(), () => {
|
|
2731
2866
|
E.off(D.connected, n);
|
|
2732
2867
|
};
|
|
2733
2868
|
}, [t, e.workspaceId]), r?.id) return e.children;
|
|
2734
2869
|
}
|
|
2735
2870
|
//#endregion
|
|
2736
2871
|
//#region lib/chats/chatScreen/chat-panel.tsx
|
|
2737
|
-
function
|
|
2738
|
-
return /* @__PURE__ */
|
|
2872
|
+
function Mt(e) {
|
|
2873
|
+
return /* @__PURE__ */ H(U, { children: [/* @__PURE__ */ V("div", {
|
|
2739
2874
|
"aria-hidden": !0,
|
|
2740
|
-
className:
|
|
2741
|
-
}), /* @__PURE__ */
|
|
2875
|
+
className: Dt.visitor.backdrop
|
|
2876
|
+
}), /* @__PURE__ */ V(At, {
|
|
2742
2877
|
...e,
|
|
2743
2878
|
close: e.close,
|
|
2744
|
-
children: /* @__PURE__ */
|
|
2879
|
+
children: /* @__PURE__ */ V(jt, {
|
|
2745
2880
|
...e,
|
|
2746
|
-
children: /* @__PURE__ */
|
|
2881
|
+
children: /* @__PURE__ */ V(wt, {
|
|
2747
2882
|
close: e.close,
|
|
2748
|
-
styles:
|
|
2883
|
+
styles: Dt.visitor,
|
|
2749
2884
|
workspaceId: e.workspaceId,
|
|
2750
2885
|
moreActions: e.moreActions,
|
|
2751
2886
|
userType: e.userType,
|
|
@@ -2759,13 +2894,13 @@ function Ot(e) {
|
|
|
2759
2894
|
})
|
|
2760
2895
|
})] });
|
|
2761
2896
|
}
|
|
2762
|
-
function
|
|
2763
|
-
return /* @__PURE__ */
|
|
2897
|
+
function Nt(e) {
|
|
2898
|
+
return /* @__PURE__ */ H(U, { children: [/* @__PURE__ */ V(T, {}), /* @__PURE__ */ V(At, {
|
|
2764
2899
|
...e,
|
|
2765
|
-
children: /* @__PURE__ */
|
|
2900
|
+
children: /* @__PURE__ */ V(jt, {
|
|
2766
2901
|
...e,
|
|
2767
|
-
children: /* @__PURE__ */
|
|
2768
|
-
styles:
|
|
2902
|
+
children: /* @__PURE__ */ V(mt, {
|
|
2903
|
+
styles: Dt.nonVisitor,
|
|
2769
2904
|
moreActions: e.moreActions,
|
|
2770
2905
|
userType: e.userType,
|
|
2771
2906
|
sender: e.sender,
|
|
@@ -2776,6 +2911,6 @@ function kt(e) {
|
|
|
2776
2911
|
})] });
|
|
2777
2912
|
}
|
|
2778
2913
|
//#endregion
|
|
2779
|
-
export {
|
|
2914
|
+
export { Nt as AgentChatPanel, Mt as VisitorChatPanel };
|
|
2780
2915
|
|
|
2781
|
-
//# sourceMappingURL=chat-panel-
|
|
2916
|
+
//# sourceMappingURL=chat-panel-BVGlOImf.js.map
|