more-desk-one 0.0.7 → 0.0.9

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/index.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import "./index.css";
2
- import { jsx as n, jsxs as b, Fragment as K } from "react/jsx-runtime";
3
- import * as l from "react";
4
- import _e, { createContext as ke, useState as w, useEffect as P, useContext as ve, forwardRef as Ne, useRef as I, useLayoutEffect as fe, useMemo as ge } from "react";
2
+ import { jsx as n, jsxs as p, Fragment as K } from "react/jsx-runtime";
3
+ import * as o from "react";
4
+ import _e, { createContext as ke, useState as _, useEffect as P, useContext as ve, forwardRef as Ne, useRef as I, useLayoutEffect as fe, useMemo as ge } from "react";
5
5
  import { SSOAuthorization as G, Avatar as ce } from "more-sso-sdk";
6
6
  import * as Z from "@radix-ui/react-popover";
7
7
  let ye = null;
@@ -17,21 +17,21 @@ const Ce = ke(void 0), He = ({
17
17
  apiKey: r,
18
18
  token: a
19
19
  }) => {
20
- const [o, c] = w(!!a), [d, p] = w(a), [i, u] = w(!0), [_, k] = w(null);
20
+ const [l, c] = _(!!a), [b, u] = _(a), [h, i] = _(!0), [w, k] = _(null);
21
21
  return P(() => {
22
- Se(p);
22
+ Se(u);
23
23
  }, []), /* @__PURE__ */ n(
24
24
  Ce.Provider,
25
25
  {
26
26
  value: {
27
27
  appName: t,
28
28
  apiKey: r,
29
- accessToken: d,
30
- authorized: o,
29
+ accessToken: b,
30
+ authorized: l,
31
31
  setAuthorized: c,
32
- isChatScreen: i,
33
- setIsChatScreen: u,
34
- profileInfo: _,
32
+ isChatScreen: h,
33
+ setIsChatScreen: i,
34
+ profileInfo: w,
35
35
  setProfileInfo: k
36
36
  },
37
37
  children: e
@@ -42,16 +42,16 @@ const Ce = ke(void 0), He = ({
42
42
  if (!e)
43
43
  throw new Error("useSdkContext must be used inside SDKProvider");
44
44
  return e;
45
- }, Ee = (e) => /* @__PURE__ */ l.createElement("svg", { width: 36, height: 36, viewBox: "0 0 36 36", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...e }, /* @__PURE__ */ l.createElement("path", { d: "M15.8261 8.67349C12.4046 8.67349 9.63062 11.447 9.63062 14.8685C9.63062 18.29 12.4046 21.064 15.8261 21.064C16.1656 21.064 16.4991 21.0365 16.8241 20.984C15.0221 20.4765 13.7006 18.8205 13.7006 16.856C13.7006 14.4875 15.6206 12.568 17.9886 12.568C19.8251 12.568 21.3921 13.722 22.0031 15.345C22.0151 15.188 22.0211 15.029 22.0211 14.8685C22.0211 11.447 19.2476 8.67349 15.8261 8.67349Z", fill: "#B72402" }), /* @__PURE__ */ l.createElement("path", { d: "M17.9984 7.621C13.0309 7.621 9.00342 11.6485 9.00342 16.616C9.00342 20.526 11.4949 23.8495 14.9744 25.0915V27.785C14.9744 28.228 15.4404 28.515 15.8349 28.3125C17.5759 27.4215 21.5219 25.332 23.5549 23.696C23.6114 23.65 23.6674 23.6065 23.7214 23.5605C23.7624 23.527 23.8009 23.494 23.8394 23.4605C25.7724 21.8115 26.9964 19.356 26.9964 16.616C26.9964 11.6485 22.9689 7.621 17.9989 7.621H17.9984ZM15.8274 21.064C15.5379 21.064 15.2539 21.0435 14.9749 21.005C11.9559 20.59 9.63092 18.0015 9.63092 14.8675C9.63092 11.4465 12.4039 8.6735 15.8274 8.6735C19.2509 8.6735 22.0214 11.4465 22.0214 14.8675C22.0214 15.0265 22.0164 15.185 22.0034 15.341C21.8319 17.6225 20.4259 19.5555 18.4544 20.48C17.9424 20.7205 17.3919 20.892 16.8154 20.9845C16.4929 21.036 16.1624 21.064 15.8269 21.064H15.8274Z", fill: "#FA4B16" })), Me = (e) => /* @__PURE__ */ l.createElement("svg", { width: 16, height: 16, viewBox: "0 0 16 16", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...e }, /* @__PURE__ */ l.createElement("path", { d: "M14.4167 3.58334L14.4167 5.13334L5.58341 5.13333L5.58341 3.58333L14.4167 3.58334ZM2.66675 4.5L6.06675 8.01667L2.68341 11.5167L1.56675 10.4L3.86675 8.01667L1.55008 5.61667L2.66675 4.5ZM14.4167 7.25L14.4167 8.81667L7.48341 8.81667L7.48341 7.25L14.4167 7.25ZM14.4167 10.8667L14.4167 12.4333L5.58341 12.4333L5.58341 10.8667L14.4167 10.8667Z", fill: "#172128" })), Le = (e) => /* @__PURE__ */ l.createElement("svg", { width: 16, height: 16, viewBox: "0 0 16 16", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...e }, /* @__PURE__ */ l.createElement("path", { d: "M13.25 14.45L8.7667 9.98335C8.44448 10.238 8.06414 10.4378 7.6257 10.5827C7.18725 10.7276 6.71203 10.8 6.20003 10.8C4.92048 10.8 3.8367 10.3556 2.9487 9.46668C2.0607 8.57779 1.6167 7.50557 1.6167 6.25001C1.6167 4.99446 2.06114 3.92223 2.95003 3.03335C3.83892 2.14446 4.91392 1.70001 6.17503 1.70001C7.43614 1.70001 8.50837 2.14446 9.3917 3.03335C10.275 3.92223 10.7167 4.99529 10.7167 6.25251C10.7167 6.75085 10.6473 7.2139 10.5084 7.64168C10.3695 8.06946 10.1611 8.47223 9.88337 8.85001L14.3834 13.3167L13.25 14.45ZM6.1892 9.23335C7.02142 9.23335 7.72298 8.94307 8.29387 8.36251C8.86464 7.78196 9.15003 7.07779 9.15003 6.25001C9.15003 5.42223 8.86381 4.71807 8.29137 4.13751C7.71892 3.55696 7.0182 3.26668 6.1892 3.26668C5.35109 3.26668 4.64059 3.55696 4.0577 4.13751C3.47481 4.71807 3.18337 5.42223 3.18337 6.25001C3.18337 7.07779 3.47398 7.78196 4.0552 8.36251C4.63642 8.94307 5.34775 9.23335 6.1892 9.23335Z", fill: "#172128" })), Ie = (e) => /* @__PURE__ */ l.createElement("svg", { width: 20, height: 20, viewBox: "0 0 20 20", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...e }, /* @__PURE__ */ l.createElement("path", { d: "M10.0417 19.3958V17.7292H16.0625V16.6042H12.7292V9.70833H16.0625V8.77083C16.0625 7.10417 15.4757 5.67014 14.3021 4.46875C13.1285 3.26736 11.7049 2.66667 10.0312 2.66667C8.38542 2.66667 6.95833 3.26736 5.75 4.46875C4.54167 5.67014 3.9375 7.10417 3.9375 8.77083V9.70833H7.27083V16.6042H1.97917V8.775C1.97917 7.66722 2.19229 6.62306 2.61854 5.6425C3.04479 4.66195 3.62132 3.80319 4.34812 3.06625C5.07493 2.32931 5.92903 1.74861 6.91042 1.32417C7.89167 0.899722 8.93667 0.6875 10.0454 0.6875C11.154 0.6875 12.1944 0.899306 13.1667 1.32292C14.1389 1.74653 14.9868 2.32424 15.7104 3.05604C16.4342 3.78785 17.0036 4.64278 17.4187 5.62083C17.834 6.59889 18.0417 7.64889 18.0417 8.77083V19.3958H10.0417ZM3.9375 14.625H5.3125V11.6875H3.9375V14.625ZM14.7083 14.625H16.0625V11.6875H14.7083V14.625Z", fill: "#172128" })), Ae = (e) => /* @__PURE__ */ l.createElement("svg", { width: 16, height: 16, viewBox: "0 0 16 16", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...e }, /* @__PURE__ */ l.createElement("path", { d: "M1.58334 12.6167V11.0333H14.4333V12.6167H1.58334ZM1.58334 8.78333V7.21666H14.4333V8.78333H1.58334ZM1.58334 4.96666V3.38333H14.4333V4.96666H1.58334Z", fill: "#172128" })), Ve = (e) => /* @__PURE__ */ l.createElement("svg", { width: 16, height: 16, viewBox: "0 0 16 16", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...e }, /* @__PURE__ */ l.createElement("path", { d: "M12.7833 10.679C12.7833 11.9375 12.3239 12.9861 11.4053 13.825C10.4867 14.6639 9.39228 15.0834 8.12194 15.0834C6.85172 15.0834 5.76105 14.6639 4.84994 13.825C3.93883 12.9861 3.48328 11.9389 3.48328 10.6834V4.08336C3.48328 3.17869 3.81383 2.42197 4.47494 1.81319C5.13605 1.20441 5.92083 0.900024 6.82928 0.900024C7.73783 0.900024 8.52117 1.20441 9.17928 1.81319C9.8375 2.42197 10.1666 3.17869 10.1666 4.08336V10.35C10.1666 10.8935 9.96383 11.3543 9.55828 11.7325C9.15272 12.1109 8.673 12.3 8.11911 12.3C7.56533 12.3 7.09033 12.1127 6.69411 11.738C6.298 11.3634 6.09994 10.9007 6.09994 10.35V4.18336H7.54994V10.35C7.54994 10.4945 7.60711 10.6139 7.72144 10.7084C7.83578 10.8028 7.97267 10.85 8.13211 10.85C8.29155 10.85 8.42883 10.8036 8.54394 10.7109C8.65905 10.6181 8.71661 10.4978 8.71661 10.35V4.10002C8.72772 3.59714 8.54439 3.17975 8.16661 2.84786C7.78883 2.51597 7.34322 2.35002 6.82978 2.35002C6.31633 2.35002 5.87189 2.51352 5.49644 2.84052C5.121 3.16752 4.93328 3.5818 4.93328 4.08336V10.6834C4.94439 11.5417 5.26367 12.2507 5.89111 12.8105C6.51855 13.3702 7.2715 13.65 8.14994 13.65C9.01294 13.65 9.762 13.3695 10.3971 12.8084C11.0323 12.2472 11.3444 11.5389 11.3333 10.6834V3.70002H12.7833V10.679Z", fill: "white" })), $e = (e) => /* @__PURE__ */ l.createElement("svg", { width: 41, height: 12, viewBox: "0 0 41 12", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...e }, /* @__PURE__ */ l.createElement("g", { clipPath: "url(#clip0_100_2379)" }, /* @__PURE__ */ l.createElement("path", { d: "M21.1825 7.56627H22.1696V5.46029C21.9697 5.38454 21.6628 5.35825 21.4373 5.35825C20.6381 5.35825 19.9407 5.89477 19.9261 6.85195H19.8885L19.4834 5.40815H17.7463V11.7965H20.0681V8.80642C20.0681 8.10324 20.2821 7.56672 21.1825 7.56672V7.56627Z", fill: "#172128" }), /* @__PURE__ */ l.createElement("path", { d: "M2.31875 8.00074C2.31875 7.40005 2.55889 7.11976 3.04271 7.11976C3.48584 7.11976 3.69989 7.3996 3.69989 8.00074V11.7956H6.0217V8.00074C6.0217 7.40005 6.26184 7.11976 6.74256 7.11976C7.18835 7.11976 7.4024 7.3996 7.4024 8.00074V11.7956H9.72111V7.32385C9.72111 6.14831 9.12761 5.21786 7.68013 5.21786C6.74212 5.21786 6.14862 5.53603 5.78111 6.25036H5.75502C5.4627 5.62605 4.8661 5.21786 3.98028 5.21786C3.04227 5.21786 2.45761 5.53603 2.10426 6.25036H2.07817L1.80043 5.40725H3.8147e-05V11.7956H2.31875V8.00074Z", fill: "#172128" }), /* @__PURE__ */ l.createElement("path", { d: "M10.1851 8.7301C10.1851 10.8129 11.8701 12 13.7227 12C15.5753 12 17.2837 10.8129 17.2837 8.7301V8.47342C17.2837 6.37903 15.5726 5.20349 13.7227 5.20349C11.8728 5.20349 10.1851 6.38215 10.1851 8.47342V8.7301ZM13.7346 7.02071C14.5975 7.02071 14.9765 7.70919 14.9765 8.59017C14.9765 9.47116 14.597 10.1743 13.7346 10.1743C12.8722 10.1743 12.4928 9.47116 12.4928 8.59017C12.4928 7.70919 12.8749 7.02071 13.7346 7.02071Z", fill: "#172128" }), /* @__PURE__ */ l.createElement("path", { d: "M25.7969 5.20346C23.9324 5.20346 22.3867 6.43158 22.3867 8.47339V8.73007C22.3867 10.8623 24.0602 12 25.8982 12C27.3545 12 28.7874 11.2589 29.0797 9.70151H26.975C26.8101 10.1333 26.3669 10.2764 25.9618 10.2764C25.2264 10.2764 24.7837 9.76301 24.7315 9.08611H29.0912C29.1173 8.87044 29.1173 8.60173 29.1173 8.38293C29.1173 6.08444 27.3686 5.20346 25.7969 5.20346ZM24.7576 7.75862C24.8067 7.19848 25.137 6.71143 25.846 6.71143H25.8491C26.4948 6.71143 26.8623 7.19581 26.8623 7.75862H24.7576Z", fill: "#172128" }), /* @__PURE__ */ l.createElement("path", { d: "M34.376 3.1975C33.6653 3.44883 32.9979 3.86058 32.4292 4.43319C31.8605 5.00581 31.4523 5.67824 31.2028 6.39435C30.9538 5.67824 30.5448 5.00581 29.9765 4.43275C29.4082 3.86013 28.7408 3.44838 28.0301 3.19705C28.7408 2.94572 29.4082 2.53398 29.9769 1.96136C30.5452 1.38874 30.9538 0.716307 31.2033 -0.000244141C31.4527 0.716307 31.8613 1.3883 32.4301 1.96136C32.9984 2.53398 33.6657 2.94572 34.3764 3.19705L34.376 3.1975Z", fill: "url(#paint0_linear_100_2379)" }), /* @__PURE__ */ l.createElement("path", { d: "M35.4872 12.0001C34.8667 12.0001 34.2696 11.7715 33.9119 11.3869C33.5895 11.0621 33.4108 10.6655 33.4108 10.1722V10.1C33.4108 8.82507 34.4611 8.12769 35.9051 8.12769C36.4061 8.12769 36.9077 8.17581 37.3729 8.34426V7.94721C37.3729 6.92497 37.0027 6.27571 35.8812 6.27571C35.1413 6.27571 34.4492 6.5404 34.4134 7.38217H33.6854V7.30998C33.8287 6.0471 34.7835 5.61441 35.8578 5.61441C37.1708 5.61441 38.0898 6.17945 38.0898 7.93563V11.808H37.5768C37.4932 11.5915 37.4335 11.3508 37.3499 11.1347H37.326C36.932 11.6516 36.1682 12.0005 35.488 12.0005L35.4872 12.0001ZM37.3729 9.54697V9.01803C36.8718 8.84958 36.3823 8.76536 35.8812 8.76536C35.01 8.76536 34.1507 9.13834 34.1507 10.0643C34.1507 10.9061 34.7831 11.3152 35.6066 11.3152C36.43 11.3152 37.3729 10.5937 37.3729 9.54742V9.54697Z", fill: "#172128" }), /* @__PURE__ */ l.createElement("path", { d: "M40.9998 3.77446C40.9998 4.09931 40.7371 4.3395 40.4152 4.3395C40.0932 4.3395 39.8305 4.09887 39.8305 3.77446V3.7504C39.8305 3.40148 40.0932 3.19739 40.4152 3.19739C40.7371 3.19739 40.9998 3.40193 40.9998 3.7504V3.77446ZM40.0569 11.8076V5.79444H40.7729V11.8076H40.0569Z", fill: "#172128" })), /* @__PURE__ */ l.createElement("defs", null, /* @__PURE__ */ l.createElement("linearGradient", { id: "paint0_linear_100_2379", x1: 31.3237, y1: 301678e-10, x2: 34.1742, y2: 2.06507, gradientUnits: "userSpaceOnUse" }, /* @__PURE__ */ l.createElement("stop", { stopColor: "#FA4B16" }), /* @__PURE__ */ l.createElement("stop", { offset: 1, stopColor: "#8E64EF" })), /* @__PURE__ */ l.createElement("clipPath", { id: "clip0_100_2379" }, /* @__PURE__ */ l.createElement("rect", { width: 41, height: 12, fill: "white" })))), De = (e) => /* @__PURE__ */ l.createElement("svg", { width: 16, height: 16, viewBox: "0 0 16 16", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...e }, /* @__PURE__ */ l.createElement("path", { d: "M14.4241 8.00167C12.9851 8.50672 11.6338 9.33413 10.4822 10.4848C9.33067 11.6355 8.50415 12.9868 7.9991 14.4258C7.49495 12.9868 6.66664 11.6355 5.51596 10.4839C4.36528 9.33324 3.01402 8.50582 1.575 8.00078C3.01402 7.49573 4.36528 6.66832 5.51686 5.51764C6.66754 4.36696 7.49495 3.01569 8 1.57578C8.50504 3.01569 9.33246 4.36606 10.484 5.51764C11.6347 6.66832 12.986 7.49573 14.425 8.00078L14.4241 8.00167Z", fill: "url(#paint0_linear_100_2352)" }), /* @__PURE__ */ l.createElement("defs", null, /* @__PURE__ */ l.createElement("linearGradient", { id: "paint0_linear_100_2352", x1: 8.24377, y1: 1.57633, x2: 13.9855, y2: 5.76743, gradientUnits: "userSpaceOnUse" }, /* @__PURE__ */ l.createElement("stop", { stopColor: "#FA4B16" }), /* @__PURE__ */ l.createElement("stop", { offset: 1, stopColor: "#8E64EF" }))));
45
+ }, Ee = (e) => /* @__PURE__ */ o.createElement("svg", { width: 36, height: 36, viewBox: "0 0 36 36", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...e }, /* @__PURE__ */ o.createElement("path", { d: "M15.8261 8.67349C12.4046 8.67349 9.63062 11.447 9.63062 14.8685C9.63062 18.29 12.4046 21.064 15.8261 21.064C16.1656 21.064 16.4991 21.0365 16.8241 20.984C15.0221 20.4765 13.7006 18.8205 13.7006 16.856C13.7006 14.4875 15.6206 12.568 17.9886 12.568C19.8251 12.568 21.3921 13.722 22.0031 15.345C22.0151 15.188 22.0211 15.029 22.0211 14.8685C22.0211 11.447 19.2476 8.67349 15.8261 8.67349Z", fill: "#B72402" }), /* @__PURE__ */ o.createElement("path", { d: "M17.9984 7.621C13.0309 7.621 9.00342 11.6485 9.00342 16.616C9.00342 20.526 11.4949 23.8495 14.9744 25.0915V27.785C14.9744 28.228 15.4404 28.515 15.8349 28.3125C17.5759 27.4215 21.5219 25.332 23.5549 23.696C23.6114 23.65 23.6674 23.6065 23.7214 23.5605C23.7624 23.527 23.8009 23.494 23.8394 23.4605C25.7724 21.8115 26.9964 19.356 26.9964 16.616C26.9964 11.6485 22.9689 7.621 17.9989 7.621H17.9984ZM15.8274 21.064C15.5379 21.064 15.2539 21.0435 14.9749 21.005C11.9559 20.59 9.63092 18.0015 9.63092 14.8675C9.63092 11.4465 12.4039 8.6735 15.8274 8.6735C19.2509 8.6735 22.0214 11.4465 22.0214 14.8675C22.0214 15.0265 22.0164 15.185 22.0034 15.341C21.8319 17.6225 20.4259 19.5555 18.4544 20.48C17.9424 20.7205 17.3919 20.892 16.8154 20.9845C16.4929 21.036 16.1624 21.064 15.8269 21.064H15.8274Z", fill: "#FA4B16" })), Me = (e) => /* @__PURE__ */ o.createElement("svg", { width: 16, height: 16, viewBox: "0 0 16 16", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...e }, /* @__PURE__ */ o.createElement("path", { d: "M14.4167 3.58334L14.4167 5.13334L5.58341 5.13333L5.58341 3.58333L14.4167 3.58334ZM2.66675 4.5L6.06675 8.01667L2.68341 11.5167L1.56675 10.4L3.86675 8.01667L1.55008 5.61667L2.66675 4.5ZM14.4167 7.25L14.4167 8.81667L7.48341 8.81667L7.48341 7.25L14.4167 7.25ZM14.4167 10.8667L14.4167 12.4333L5.58341 12.4333L5.58341 10.8667L14.4167 10.8667Z", fill: "#172128" })), Le = (e) => /* @__PURE__ */ o.createElement("svg", { width: 16, height: 16, viewBox: "0 0 16 16", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...e }, /* @__PURE__ */ o.createElement("path", { d: "M13.25 14.45L8.7667 9.98335C8.44448 10.238 8.06414 10.4378 7.6257 10.5827C7.18725 10.7276 6.71203 10.8 6.20003 10.8C4.92048 10.8 3.8367 10.3556 2.9487 9.46668C2.0607 8.57779 1.6167 7.50557 1.6167 6.25001C1.6167 4.99446 2.06114 3.92223 2.95003 3.03335C3.83892 2.14446 4.91392 1.70001 6.17503 1.70001C7.43614 1.70001 8.50837 2.14446 9.3917 3.03335C10.275 3.92223 10.7167 4.99529 10.7167 6.25251C10.7167 6.75085 10.6473 7.2139 10.5084 7.64168C10.3695 8.06946 10.1611 8.47223 9.88337 8.85001L14.3834 13.3167L13.25 14.45ZM6.1892 9.23335C7.02142 9.23335 7.72298 8.94307 8.29387 8.36251C8.86464 7.78196 9.15003 7.07779 9.15003 6.25001C9.15003 5.42223 8.86381 4.71807 8.29137 4.13751C7.71892 3.55696 7.0182 3.26668 6.1892 3.26668C5.35109 3.26668 4.64059 3.55696 4.0577 4.13751C3.47481 4.71807 3.18337 5.42223 3.18337 6.25001C3.18337 7.07779 3.47398 7.78196 4.0552 8.36251C4.63642 8.94307 5.34775 9.23335 6.1892 9.23335Z", fill: "#172128" })), Ie = (e) => /* @__PURE__ */ o.createElement("svg", { width: 20, height: 20, viewBox: "0 0 20 20", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...e }, /* @__PURE__ */ o.createElement("path", { d: "M10.0417 19.3958V17.7292H16.0625V16.6042H12.7292V9.70833H16.0625V8.77083C16.0625 7.10417 15.4757 5.67014 14.3021 4.46875C13.1285 3.26736 11.7049 2.66667 10.0312 2.66667C8.38542 2.66667 6.95833 3.26736 5.75 4.46875C4.54167 5.67014 3.9375 7.10417 3.9375 8.77083V9.70833H7.27083V16.6042H1.97917V8.775C1.97917 7.66722 2.19229 6.62306 2.61854 5.6425C3.04479 4.66195 3.62132 3.80319 4.34812 3.06625C5.07493 2.32931 5.92903 1.74861 6.91042 1.32417C7.89167 0.899722 8.93667 0.6875 10.0454 0.6875C11.154 0.6875 12.1944 0.899306 13.1667 1.32292C14.1389 1.74653 14.9868 2.32424 15.7104 3.05604C16.4342 3.78785 17.0036 4.64278 17.4187 5.62083C17.834 6.59889 18.0417 7.64889 18.0417 8.77083V19.3958H10.0417ZM3.9375 14.625H5.3125V11.6875H3.9375V14.625ZM14.7083 14.625H16.0625V11.6875H14.7083V14.625Z", fill: "#172128" })), Ae = (e) => /* @__PURE__ */ o.createElement("svg", { width: 16, height: 16, viewBox: "0 0 16 16", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...e }, /* @__PURE__ */ o.createElement("path", { d: "M1.58334 12.6167V11.0333H14.4333V12.6167H1.58334ZM1.58334 8.78333V7.21666H14.4333V8.78333H1.58334ZM1.58334 4.96666V3.38333H14.4333V4.96666H1.58334Z", fill: "#172128" })), Ve = (e) => /* @__PURE__ */ o.createElement("svg", { width: 16, height: 16, viewBox: "0 0 16 16", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...e }, /* @__PURE__ */ o.createElement("path", { d: "M12.7833 10.679C12.7833 11.9375 12.3239 12.9861 11.4053 13.825C10.4867 14.6639 9.39228 15.0834 8.12194 15.0834C6.85172 15.0834 5.76105 14.6639 4.84994 13.825C3.93883 12.9861 3.48328 11.9389 3.48328 10.6834V4.08336C3.48328 3.17869 3.81383 2.42197 4.47494 1.81319C5.13605 1.20441 5.92083 0.900024 6.82928 0.900024C7.73783 0.900024 8.52117 1.20441 9.17928 1.81319C9.8375 2.42197 10.1666 3.17869 10.1666 4.08336V10.35C10.1666 10.8935 9.96383 11.3543 9.55828 11.7325C9.15272 12.1109 8.673 12.3 8.11911 12.3C7.56533 12.3 7.09033 12.1127 6.69411 11.738C6.298 11.3634 6.09994 10.9007 6.09994 10.35V4.18336H7.54994V10.35C7.54994 10.4945 7.60711 10.6139 7.72144 10.7084C7.83578 10.8028 7.97267 10.85 8.13211 10.85C8.29155 10.85 8.42883 10.8036 8.54394 10.7109C8.65905 10.6181 8.71661 10.4978 8.71661 10.35V4.10002C8.72772 3.59714 8.54439 3.17975 8.16661 2.84786C7.78883 2.51597 7.34322 2.35002 6.82978 2.35002C6.31633 2.35002 5.87189 2.51352 5.49644 2.84052C5.121 3.16752 4.93328 3.5818 4.93328 4.08336V10.6834C4.94439 11.5417 5.26367 12.2507 5.89111 12.8105C6.51855 13.3702 7.2715 13.65 8.14994 13.65C9.01294 13.65 9.762 13.3695 10.3971 12.8084C11.0323 12.2472 11.3444 11.5389 11.3333 10.6834V3.70002H12.7833V10.679Z", fill: "white" })), $e = (e) => /* @__PURE__ */ o.createElement("svg", { width: 41, height: 12, viewBox: "0 0 41 12", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...e }, /* @__PURE__ */ o.createElement("g", { clipPath: "url(#clip0_100_2379)" }, /* @__PURE__ */ o.createElement("path", { d: "M21.1825 7.56627H22.1696V5.46029C21.9697 5.38454 21.6628 5.35825 21.4373 5.35825C20.6381 5.35825 19.9407 5.89477 19.9261 6.85195H19.8885L19.4834 5.40815H17.7463V11.7965H20.0681V8.80642C20.0681 8.10324 20.2821 7.56672 21.1825 7.56672V7.56627Z", fill: "#172128" }), /* @__PURE__ */ o.createElement("path", { d: "M2.31875 8.00074C2.31875 7.40005 2.55889 7.11976 3.04271 7.11976C3.48584 7.11976 3.69989 7.3996 3.69989 8.00074V11.7956H6.0217V8.00074C6.0217 7.40005 6.26184 7.11976 6.74256 7.11976C7.18835 7.11976 7.4024 7.3996 7.4024 8.00074V11.7956H9.72111V7.32385C9.72111 6.14831 9.12761 5.21786 7.68013 5.21786C6.74212 5.21786 6.14862 5.53603 5.78111 6.25036H5.75502C5.4627 5.62605 4.8661 5.21786 3.98028 5.21786C3.04227 5.21786 2.45761 5.53603 2.10426 6.25036H2.07817L1.80043 5.40725H3.8147e-05V11.7956H2.31875V8.00074Z", fill: "#172128" }), /* @__PURE__ */ o.createElement("path", { d: "M10.1851 8.7301C10.1851 10.8129 11.8701 12 13.7227 12C15.5753 12 17.2837 10.8129 17.2837 8.7301V8.47342C17.2837 6.37903 15.5726 5.20349 13.7227 5.20349C11.8728 5.20349 10.1851 6.38215 10.1851 8.47342V8.7301ZM13.7346 7.02071C14.5975 7.02071 14.9765 7.70919 14.9765 8.59017C14.9765 9.47116 14.597 10.1743 13.7346 10.1743C12.8722 10.1743 12.4928 9.47116 12.4928 8.59017C12.4928 7.70919 12.8749 7.02071 13.7346 7.02071Z", fill: "#172128" }), /* @__PURE__ */ o.createElement("path", { d: "M25.7969 5.20346C23.9324 5.20346 22.3867 6.43158 22.3867 8.47339V8.73007C22.3867 10.8623 24.0602 12 25.8982 12C27.3545 12 28.7874 11.2589 29.0797 9.70151H26.975C26.8101 10.1333 26.3669 10.2764 25.9618 10.2764C25.2264 10.2764 24.7837 9.76301 24.7315 9.08611H29.0912C29.1173 8.87044 29.1173 8.60173 29.1173 8.38293C29.1173 6.08444 27.3686 5.20346 25.7969 5.20346ZM24.7576 7.75862C24.8067 7.19848 25.137 6.71143 25.846 6.71143H25.8491C26.4948 6.71143 26.8623 7.19581 26.8623 7.75862H24.7576Z", fill: "#172128" }), /* @__PURE__ */ o.createElement("path", { d: "M34.376 3.1975C33.6653 3.44883 32.9979 3.86058 32.4292 4.43319C31.8605 5.00581 31.4523 5.67824 31.2028 6.39435C30.9538 5.67824 30.5448 5.00581 29.9765 4.43275C29.4082 3.86013 28.7408 3.44838 28.0301 3.19705C28.7408 2.94572 29.4082 2.53398 29.9769 1.96136C30.5452 1.38874 30.9538 0.716307 31.2033 -0.000244141C31.4527 0.716307 31.8613 1.3883 32.4301 1.96136C32.9984 2.53398 33.6657 2.94572 34.3764 3.19705L34.376 3.1975Z", fill: "url(#paint0_linear_100_2379)" }), /* @__PURE__ */ o.createElement("path", { d: "M35.4872 12.0001C34.8667 12.0001 34.2696 11.7715 33.9119 11.3869C33.5895 11.0621 33.4108 10.6655 33.4108 10.1722V10.1C33.4108 8.82507 34.4611 8.12769 35.9051 8.12769C36.4061 8.12769 36.9077 8.17581 37.3729 8.34426V7.94721C37.3729 6.92497 37.0027 6.27571 35.8812 6.27571C35.1413 6.27571 34.4492 6.5404 34.4134 7.38217H33.6854V7.30998C33.8287 6.0471 34.7835 5.61441 35.8578 5.61441C37.1708 5.61441 38.0898 6.17945 38.0898 7.93563V11.808H37.5768C37.4932 11.5915 37.4335 11.3508 37.3499 11.1347H37.326C36.932 11.6516 36.1682 12.0005 35.488 12.0005L35.4872 12.0001ZM37.3729 9.54697V9.01803C36.8718 8.84958 36.3823 8.76536 35.8812 8.76536C35.01 8.76536 34.1507 9.13834 34.1507 10.0643C34.1507 10.9061 34.7831 11.3152 35.6066 11.3152C36.43 11.3152 37.3729 10.5937 37.3729 9.54742V9.54697Z", fill: "#172128" }), /* @__PURE__ */ o.createElement("path", { d: "M40.9998 3.77446C40.9998 4.09931 40.7371 4.3395 40.4152 4.3395C40.0932 4.3395 39.8305 4.09887 39.8305 3.77446V3.7504C39.8305 3.40148 40.0932 3.19739 40.4152 3.19739C40.7371 3.19739 40.9998 3.40193 40.9998 3.7504V3.77446ZM40.0569 11.8076V5.79444H40.7729V11.8076H40.0569Z", fill: "#172128" })), /* @__PURE__ */ o.createElement("defs", null, /* @__PURE__ */ o.createElement("linearGradient", { id: "paint0_linear_100_2379", x1: 31.3237, y1: 301678e-10, x2: 34.1742, y2: 2.06507, gradientUnits: "userSpaceOnUse" }, /* @__PURE__ */ o.createElement("stop", { stopColor: "#FA4B16" }), /* @__PURE__ */ o.createElement("stop", { offset: 1, stopColor: "#8E64EF" })), /* @__PURE__ */ o.createElement("clipPath", { id: "clip0_100_2379" }, /* @__PURE__ */ o.createElement("rect", { width: 41, height: 12, fill: "white" })))), De = (e) => /* @__PURE__ */ o.createElement("svg", { width: 16, height: 16, viewBox: "0 0 16 16", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...e }, /* @__PURE__ */ o.createElement("path", { d: "M14.4241 8.00167C12.9851 8.50672 11.6338 9.33413 10.4822 10.4848C9.33067 11.6355 8.50415 12.9868 7.9991 14.4258C7.49495 12.9868 6.66664 11.6355 5.51596 10.4839C4.36528 9.33324 3.01402 8.50582 1.575 8.00078C3.01402 7.49573 4.36528 6.66832 5.51686 5.51764C6.66754 4.36696 7.49495 3.01569 8 1.57578C8.50504 3.01569 9.33246 4.36606 10.484 5.51764C11.6347 6.66832 12.986 7.49573 14.425 8.00078L14.4241 8.00167Z", fill: "url(#paint0_linear_100_2352)" }), /* @__PURE__ */ o.createElement("defs", null, /* @__PURE__ */ o.createElement("linearGradient", { id: "paint0_linear_100_2352", x1: 8.24377, y1: 1.57633, x2: 13.9855, y2: 5.76743, gradientUnits: "userSpaceOnUse" }, /* @__PURE__ */ o.createElement("stop", { stopColor: "#FA4B16" }), /* @__PURE__ */ o.createElement("stop", { offset: 1, stopColor: "#8E64EF" }))));
46
46
  function Pe({
47
47
  children: e,
48
48
  side: t = "top",
49
49
  align: r = "end"
50
50
  }) {
51
- const { setIsChatScreen: a, isChatScreen: o } = O(), c = () => {
52
- o || a(!0);
51
+ const { setIsChatScreen: a, isChatScreen: l } = O(), c = () => {
52
+ l || a(!0);
53
53
  };
54
- return /* @__PURE__ */ b(Z.Root, { children: [
54
+ return /* @__PURE__ */ p(Z.Root, { children: [
55
55
  /* @__PURE__ */ n(
56
56
  Z.Trigger,
57
57
  {
@@ -88,7 +88,7 @@ function Pe({
88
88
  ) })
89
89
  ] });
90
90
  }
91
- const Re = ({ forwardedRef: e, onChangeHandler: t }) => /* @__PURE__ */ b("div", { className: "mhb-h-[48px] mhb-flex mhb-rounded-[9999px] mhb-bg-neutral-10 mhb-items-center mhb-gap-3 mhb-px-3", children: [
91
+ const Re = ({ forwardedRef: e, onChangeHandler: t }) => /* @__PURE__ */ p("div", { className: "mhb-h-[48px] mhb-flex mhb-rounded-[9999px] mhb-bg-neutral-10 mhb-items-center mhb-gap-3 mhb-px-3", children: [
92
92
  /* @__PURE__ */ n(Le, { className: "mhb-h-4 mhb-w-4" }),
93
93
  /* @__PURE__ */ n(
94
94
  "input",
@@ -143,7 +143,7 @@ function je() {
143
143
  const t = {
144
144
  host: new URL(F).hostname,
145
145
  "x-api-key": U
146
- }, r = {}, a = btoa(JSON.stringify(t)), o = btoa(JSON.stringify(r)), c = `${xe}?header=${a}&payload=${o}`;
146
+ }, r = {}, a = btoa(JSON.stringify(t)), l = btoa(JSON.stringify(r)), c = `${xe}?header=${a}&payload=${l}`;
147
147
  return new WebSocket(c, ["graphql-ws"]);
148
148
  }
149
149
  const we = () => {
@@ -182,21 +182,23 @@ function Fe() {
182
182
  }
183
183
  const Ue = (e) => {
184
184
  F = e.apiURL, U = e.apiKey, xe = e.apiURL.replace("https://", "wss://").replace("appsync-api", "appsync-realtime-api"), we();
185
- const t = async (r, a = {}, o) => {
186
- const d = await (await fetch(F, {
185
+ const t = async (r, a = {}, l) => {
186
+ const b = await (await fetch(F, {
187
187
  method: "POST",
188
188
  headers: {
189
189
  "Content-Type": "application/json",
190
190
  "x-api-key": U,
191
- ...o ? { Authorization: `Bearer ${o}` } : {}
191
+ ...l ? { Authorization: `Bearer ${l}` } : {}
192
192
  },
193
193
  body: JSON.stringify({ query: r, variables: a })
194
- })).json();
195
- if (Array.isArray(d.errors) && d.errors.some((i) => {
196
- const u = i.message?.toLowerCase() ?? "";
197
- return u.includes("unauthorized") || u.includes("jwt") || u.includes("expired");
198
- })) {
199
- if (W) {
194
+ })).json(), u = Array.isArray(b.errors) ? b.errors : [];
195
+ console.log(u, "check errors");
196
+ const h = u.some((i) => {
197
+ const w = i.message?.toLowerCase() ?? "";
198
+ return w.includes("unauthorized") || w.includes("jwt") || w.includes("expired");
199
+ });
200
+ if (console.log(h, "check shouldRefresh"), h) {
201
+ if (console.log(h, "inside shouldRefresh"), W) {
200
202
  const i = await Fe();
201
203
  return t(r, a, i);
202
204
  }
@@ -206,29 +208,29 @@ const Ue = (e) => {
206
208
  if (process.env.NODE_ENV === "development")
207
209
  i = await G.getDevToken("432896");
208
210
  else {
209
- const u = window.location.href, _ = encodeURIComponent(u);
210
- i = G.getToken(_);
211
+ const w = window.location.href, k = encodeURIComponent(w);
212
+ i = G.getToken(k), console.log(i, "refreshResult check");
211
213
  }
212
214
  if (!i?.token)
213
215
  throw new Error("Refresh did not return an access token");
214
216
  return Te(i.token), he(null, i.token), t(r, a, i.token);
215
217
  } catch (i) {
216
- throw he(i, null), i;
218
+ throw console.log(i, "check updating refresh"), he(i, null), i;
217
219
  } finally {
218
220
  W = !1;
219
221
  }
220
222
  }
221
- if (d.errors)
222
- throw new Error(d.errors.map((i) => i.message).join(", "));
223
- return d.data;
223
+ if (u.length > 0)
224
+ throw new Error(u.map((i) => i.message).join(", "));
225
+ return b.data;
224
226
  };
225
227
  return {
226
228
  executeGraphql: t,
227
- subscribe: (r, a = {}, o) => {
229
+ subscribe: (r, a = {}, l) => {
228
230
  if (!r.trim().startsWith("subscription"))
229
231
  return () => {
230
232
  };
231
- const c = `${++Ze}`, d = {
233
+ const c = `${++Ze}`, b = {
232
234
  id: c,
233
235
  type: "start",
234
236
  payload: {
@@ -241,7 +243,7 @@ const Ue = (e) => {
241
243
  }
242
244
  }
243
245
  };
244
- return A[c] = { message: d, callback: o }, j && T?.readyState === WebSocket.OPEN && T.send(JSON.stringify(d)), () => {
246
+ return A[c] = { message: b, callback: l }, j && T?.readyState === WebSocket.OPEN && T.send(JSON.stringify(b)), () => {
245
247
  T?.readyState === WebSocket.OPEN && T.send(JSON.stringify({ id: c, type: "stop" })), delete A[c];
246
248
  };
247
249
  },
@@ -311,10 +313,10 @@ const Be = (e) => {
311
313
  is_new
312
314
  }
313
315
  }`, ue = 10, Ge = () => {
314
- const [e, t] = w([]), [r, a] = w(!0), [o, c] = w(null), [d, p] = w(!1), [i, u] = w(""), _ = I(!0), { accessToken: k } = O(), v = () => {
316
+ const [e, t] = _([]), [r, a] = _(!0), [l, c] = _(null), [b, u] = _(!1), [h, i] = _(""), w = I(!0), { accessToken: k } = O(), v = () => {
315
317
  z(
316
318
  de,
317
- { limit: ue, search_key: i },
319
+ { limit: ue, search_key: h },
318
320
  k
319
321
  ).then(async (g) => {
320
322
  t(g?.EmployeeAssistTickets ?? []);
@@ -325,30 +327,30 @@ const Be = (e) => {
325
327
  });
326
328
  };
327
329
  return P(() => {
328
- if (_.current) {
329
- _.current = !1, v();
330
+ if (w.current) {
331
+ w.current = !1, v();
330
332
  return;
331
333
  }
332
334
  const g = setTimeout(() => {
333
335
  v();
334
336
  }, 400);
335
337
  return () => clearTimeout(g);
336
- }, [i]), {
338
+ }, [h]), {
337
339
  ticketData: e,
338
340
  loading: r,
339
- error: o,
341
+ error: l,
340
342
  getNextPageTicketData: (g) => {
341
- k && (d || (p(!0), z(de, { limit: ue, offset: g }, k).then(async (S) => {
343
+ k && (b || (u(!0), z(de, { limit: ue, offset: g }, k).then(async (S) => {
342
344
  const { EmployeeAssistTickets: E } = S;
343
345
  t((M) => [...M, ...E]);
344
346
  }).catch((S) => {
345
347
  c(S);
346
348
  }).finally(() => {
347
- p(!1);
349
+ u(!1);
348
350
  })));
349
351
  },
350
- isLoadingMore: d,
351
- setSearchText: u
352
+ isLoadingMore: b,
353
+ setSearchText: i
352
354
  };
353
355
  };
354
356
  function Q(e) {
@@ -361,18 +363,18 @@ function Q(e) {
361
363
  function ze(e, t = "Asia/Kolkata", r = "en-GB") {
362
364
  const a = new Date(e);
363
365
  if (Number.isNaN(a.getTime())) return "";
364
- const o = new Intl.DateTimeFormat(r, {
366
+ const l = new Intl.DateTimeFormat(r, {
365
367
  day: "2-digit",
366
368
  month: "short",
367
369
  year: "2-digit",
368
370
  timeZone: t
369
- }).formatToParts(a), c = o.find((u) => u.type === "day")?.value ?? "", d = o.find((u) => u.type === "month")?.value ?? "", p = o.find((u) => u.type === "year")?.value ?? "", i = new Intl.DateTimeFormat(r, {
371
+ }).formatToParts(a), c = l.find((i) => i.type === "day")?.value ?? "", b = l.find((i) => i.type === "month")?.value ?? "", u = l.find((i) => i.type === "year")?.value ?? "", h = new Intl.DateTimeFormat(r, {
370
372
  hour: "2-digit",
371
373
  minute: "2-digit",
372
374
  hour12: !1,
373
375
  timeZone: t
374
376
  }).format(a);
375
- return `${c} ${d} ‘${p}, ${i}`;
377
+ return `${c} ${b} ‘${u}, ${h}`;
376
378
  }
377
379
  const se = (e, t) => {
378
380
  sessionStorage.setItem(e, JSON.stringify(t));
@@ -382,65 +384,65 @@ const se = (e, t) => {
382
384
  }, qe = () => {
383
385
  const e = I(null), t = I(null), r = I(null), {
384
386
  ticketData: a,
385
- loading: o,
387
+ loading: l,
386
388
  getNextPageTicketData: c,
387
- isLoadingMore: d,
388
- setSearchText: p
389
- } = Ge(), { setIsChatScreen: i, profileInfo: u } = O();
389
+ isLoadingMore: b,
390
+ setSearchText: u
391
+ } = Ge(), { setIsChatScreen: h, profileInfo: i } = O();
390
392
  fe(() => {
391
393
  e.current;
392
394
  }, [a.length]);
393
- const _ = (h) => {
394
- const g = h.currentTarget;
395
+ const w = (m) => {
396
+ const g = m.currentTarget;
395
397
  if (r.current?.blur(), g.scrollHeight <= g.clientHeight) return;
396
398
  const S = g.scrollHeight - g.scrollTop - g.clientHeight, E = a.length;
397
- t.current !== E && S <= 20 && !o && (t.current = E, c(E));
398
- }, k = (h) => {
399
+ t.current !== E && S <= 20 && !l && (t.current = E, c(E));
400
+ }, k = (m) => {
399
401
  se("userAndTicket", {
400
- ticket_id: h,
401
- employee_id: u?.employee_id
402
- }), i((g) => !g);
402
+ ticket_id: m,
403
+ employee_id: i?.employee_id
404
+ }), h((g) => !g);
403
405
  };
404
- return /* @__PURE__ */ b("div", { className: "mhb-flex mhb-flex-col mhb-h-full mhb-min-h-0", children: [
405
- /* @__PURE__ */ n("div", { className: "mhb-searchbarContainer mhb-flex mhb-flex-col mhb-border-b mhb-border-neutral-20", children: /* @__PURE__ */ n(Oe, { ref: r, onChangeHandler: (h) => {
406
- h.preventDefault();
406
+ return /* @__PURE__ */ p("div", { className: "mhb-flex mhb-flex-col mhb-h-full mhb-min-h-0", children: [
407
+ /* @__PURE__ */ n("div", { className: "mhb-searchbarContainer mhb-flex mhb-flex-col mhb-border-b mhb-border-neutral-20", children: /* @__PURE__ */ n(Oe, { ref: r, onChangeHandler: (m) => {
408
+ m.preventDefault();
407
409
  const g = r.current?.value?.trim();
408
- p(g ?? null);
410
+ u(g ?? null);
409
411
  } }) }),
410
412
  /* @__PURE__ */ n(
411
413
  "div",
412
414
  {
413
415
  ref: e,
414
- onScroll: _,
416
+ onScroll: w,
415
417
  className: "mhb-history-main-container mhb-no-scrollbar mhb-py-3 mhb-flex mhb-flex-col mhb-gap-1 mhb-overflow-y-auto mhb-flex-1 mhb-min-h-0",
416
- children: o ? /* @__PURE__ */ n(ee, {}) : /* @__PURE__ */ b(K, { children: [
417
- a.map((h) => /* @__PURE__ */ b(
418
+ children: l ? /* @__PURE__ */ n(ee, {}) : /* @__PURE__ */ p(K, { children: [
419
+ a.map((m) => /* @__PURE__ */ p(
418
420
  "button",
419
421
  {
420
422
  type: "button",
421
423
  className: "mhb-btn-reset mhb-history-container mhb-p-3 mhb-flex mhb-flex-col mhb-rounded-[12px] mhb-bg-neutral-10 mhb-gap-2 mhb-items-start",
422
- onClick: () => k(h.ticket_id),
424
+ onClick: () => k(m.ticket_id),
423
425
  children: [
424
- /* @__PURE__ */ n("div", { className: "mhb-flex mhb-items-start", children: /* @__PURE__ */ n("p", { className: "mhb-typography-para-thick-30 mhb-text-neutral-110 mhb-m-0 mhb-min-w-0 mhb-break-words mhb-whitespace-normal mhb-text-left", children: h.title }) }),
425
- /* @__PURE__ */ n("p", { className: "mhb-typography-para-30 mhb-text-neutral-60 mhb-m-0", children: ze(h.created_at) })
426
+ /* @__PURE__ */ n("div", { className: "mhb-flex mhb-items-start", children: /* @__PURE__ */ n("p", { className: "mhb-typography-para-thick-30 mhb-text-neutral-110 mhb-m-0 mhb-min-w-0 mhb-break-words mhb-whitespace-normal mhb-text-left", children: m.title }) }),
427
+ /* @__PURE__ */ n("p", { className: "mhb-typography-para-30 mhb-text-neutral-60 mhb-m-0", children: ze(m.created_at) })
426
428
  ]
427
429
  },
428
- h.ticket_id
430
+ m.ticket_id
429
431
  )),
430
- d && /* @__PURE__ */ n(ee, {})
432
+ b && /* @__PURE__ */ n(ee, {})
431
433
  ] })
432
434
  }
433
435
  )
434
436
  ] });
435
- }, Je = ({ isChatScreen: e, setIsChatScreen: t }) => /* @__PURE__ */ b("div", { className: "mhb-header mhb-border-b mhb-border-neutral-20 mhb-flex mhb-items-center mhb-justify-between", children: [
437
+ }, Je = ({ isChatScreen: e, setIsChatScreen: t }) => /* @__PURE__ */ p("div", { className: "mhb-header mhb-border-b mhb-border-neutral-20 mhb-flex mhb-items-center mhb-justify-between", children: [
436
438
  /* @__PURE__ */ n(Ee, { className: "h-[36px] w-[36px] fill-current" }),
437
- /* @__PURE__ */ b("div", { className: "mhb-flex mhb-gap-2 mhb-items-center", children: [
439
+ /* @__PURE__ */ p("div", { className: "mhb-flex mhb-gap-2 mhb-items-center", children: [
438
440
  e ? /* @__PURE__ */ n("div", { className: "mhb-btn-reset mhb-p-3 mhb-invisible mhb-typography-para-thick-30", children: "new chat" }) : /* @__PURE__ */ n(
439
441
  "button",
440
442
  {
441
443
  type: "button",
442
444
  onClick: () => {
443
- sessionStorage.removeItem("userAndTicket"), t((o) => !o);
445
+ sessionStorage.removeItem("userAndTicket"), t((l) => !l);
444
446
  },
445
447
  className: "mhb-btn-reset mhb-p-3 mhb-bg-neutral-10 mhb-typography-para-thick-30 mhb-rounded-[9999px]",
446
448
  children: "new chat"
@@ -452,7 +454,7 @@ const se = (e, t) => {
452
454
  type: "button",
453
455
  className: "mhb-btn-reset mhb-h-[36px] mhb-w-[36px] mhb-flex mhb-items-center mhb-justify-center mhb-rounded-full mhb-bg-neutral-10",
454
456
  onClick: () => {
455
- t((o) => !o);
457
+ t((l) => !l);
456
458
  },
457
459
  children: e ? /* @__PURE__ */ n(Ae, { className: "mhb-h-[16px] mhb-w-[16px] fill-current" }) : /* @__PURE__ */ n(Me, { className: "mhb-h-[16px] mhb-w-[16px]" })
458
460
  }
@@ -516,11 +518,11 @@ mutation AssistChat(
516
518
  }
517
519
  }
518
520
  }`, X = 10, Qe = () => {
519
- const [e, t] = w([]), [r, a] = w(!0), [o, c] = w(null), [d, p] = w(!1), [i, u] = w(!1), [_, k] = w(!0), { accessToken: v, profileInfo: h } = O(), g = R("userAndTicket")?.ticket_id, S = R("userAndTicket")?.employee_id, E = ge(() => e.find((f) => f.ticket_id != null)?.ticket_id ?? null, [e]);
521
+ const [e, t] = _([]), [r, a] = _(!0), [l, c] = _(null), [b, u] = _(!1), [h, i] = _(!1), [w, k] = _(!0), { accessToken: v, profileInfo: m } = O(), g = R("userAndTicket")?.ticket_id, S = R("userAndTicket")?.employee_id, E = ge(() => e.find((f) => f.ticket_id != null)?.ticket_id ?? null, [e]);
520
522
  let M = g ?? E ?? null;
521
523
  return P(() => {
522
- if (!M || !h) return;
523
- if (S && h?.employee_id != S) {
524
+ if (!M || !m) return;
525
+ if (S && m?.employee_id != S) {
524
526
  sessionStorage.removeItem("userAndTicket");
525
527
  return;
526
528
  }
@@ -528,14 +530,14 @@ mutation AssistChat(
528
530
  Ye,
529
531
  { ticket_id: M },
530
532
  (s) => {
531
- const m = s;
532
- m?.onAssistChat?.user?.user_type === "agent" && t((y) => [...y, m.onAssistChat]);
533
+ const d = s;
534
+ d?.onAssistChat?.user?.user_type === "agent" && t((y) => [...y, d.onAssistChat]);
533
535
  }
534
536
  );
535
537
  return () => f();
536
- }, [M, h]), P(() => {
537
- if (!v || !h) return;
538
- S && h?.employee_id !== S && (sessionStorage.removeItem("userAndTicket"), M = null);
538
+ }, [M, m]), P(() => {
539
+ if (!v || !m) return;
540
+ S && m?.employee_id !== S && (sessionStorage.removeItem("userAndTicket"), M = null);
539
541
  const f = {
540
542
  ...M && { ticket_id: M },
541
543
  limit: X
@@ -547,66 +549,66 @@ mutation AssistChat(
547
549
  }).finally(() => {
548
550
  a(!1);
549
551
  });
550
- }, [h]), {
552
+ }, [m]), {
551
553
  historyData: e,
552
554
  msgLoading: r,
553
- msgError: o,
554
- isSending: i,
555
+ msgError: l,
556
+ isSending: h,
555
557
  sendMessage: (f) => {
556
- const s = e.find((C) => C.ticket_id != null)?.ticket_id ?? null, m = e.find((C) => C.handover == !0)?.handover ?? !1, y = {
558
+ const s = e.find((C) => C.ticket_id != null)?.ticket_id ?? null, d = e.find((C) => C.handover == !0)?.handover ?? !1, y = {
557
559
  ...s && { ticket_id: s },
558
560
  message: f,
559
- handover: m,
561
+ handover: d,
560
562
  attachments: [],
561
563
  text: f,
562
564
  message_id: Math.random(),
563
565
  created_at: (/* @__PURE__ */ new Date()).toISOString(),
564
566
  user: {
565
- user_name: h?.full_name,
567
+ user_name: m?.full_name,
566
568
  user_type: "employee"
567
569
  }
568
570
  };
569
- u(!0), t((C) => [...C, y]), Y(be, y, v).then(async (C) => {
571
+ i(!0), t((C) => [...C, y]), Y(be, y, v).then(async (C) => {
570
572
  const x = C;
571
- x.assistChat.user.user_type !== "employee" && t((H) => [...H, x.assistChat]), !R("userAndTicket") && x.assistChat?.ticket_id && h && se("userAndTicket", {
573
+ x.assistChat.user.user_type !== "employee" && t((H) => [...H, x.assistChat]), !R("userAndTicket") && x.assistChat?.ticket_id && m && se("userAndTicket", {
572
574
  ticket_id: x.assistChat?.ticket_id,
573
- employee_id: h.employee_id
575
+ employee_id: m.employee_id
574
576
  });
575
- }).catch(() => t((C) => C.slice(0, -1))).finally(() => u(!1));
577
+ }).catch(() => t((C) => C.slice(0, -1))).finally(() => i(!1));
576
578
  },
577
579
  getNextPageData: (f) => {
578
- if (!v || d) return;
579
- const s = R("userAndTicket")?.ticket_id, m = {
580
+ if (!v || b) return;
581
+ const s = R("userAndTicket")?.ticket_id, d = {
580
582
  ...s && { ticket_id: s },
581
583
  limit: X,
582
584
  offset: f
583
585
  };
584
- p(!0), z(me, m, v).then(async (y) => {
586
+ u(!0), z(me, d, v).then(async (y) => {
585
587
  const x = y?.assistHistory ?? [];
586
588
  t((H) => [...x, ...H]), x.length < X && k(!1);
587
589
  }).catch((y) => {
588
590
  c(y);
589
591
  }).finally(() => {
590
- p(!1);
592
+ u(!1);
591
593
  });
592
594
  },
593
- isLoadingMore: d,
595
+ isLoadingMore: b,
594
596
  upload: async (f) => {
595
- u(!0);
597
+ i(!0);
596
598
  const s = {
597
599
  files: f.files.map(
598
- (m) => `${f.ticketId}/${m.name}`
600
+ (d) => `${f.ticketId}/${d.name}`
599
601
  ),
600
602
  signature_type: f.signature_type
601
603
  };
602
604
  try {
603
- const m = await Y(
605
+ const d = await Y(
604
606
  We,
605
607
  s,
606
608
  v
607
609
  );
608
610
  for (const [N, $] of f.files.entries()) {
609
- const D = m.GetPresignedLink[N]?.url;
611
+ const D = d.GetPresignedLink[N]?.url;
610
612
  D && await fetch(D, {
611
613
  method: "PUT",
612
614
  body: $,
@@ -623,7 +625,7 @@ mutation AssistChat(
623
625
  text: "",
624
626
  message_id: Math.random(),
625
627
  created_at: (/* @__PURE__ */ new Date()).toISOString(),
626
- user: { user_name: h?.full_name, user_type: "employee" }
628
+ user: { user_name: m?.full_name, user_type: "employee" }
627
629
  };
628
630
  t((N) => [...N, x]);
629
631
  const H = {
@@ -636,21 +638,21 @@ mutation AssistChat(
636
638
  text: "",
637
639
  message_id: Math.random(),
638
640
  created_at: (/* @__PURE__ */ new Date()).toISOString(),
639
- user: { user_name: h?.full_name, user_type: "employee" }
641
+ user: { user_name: m?.full_name, user_type: "employee" }
640
642
  }, L = await Y(be, H, v);
641
- L.assistChat.user.user_type !== "employee" && t((N) => [...N, L.assistChat]), !R("userAndTicket") && L.assistChat?.ticket_id && h && se("userAndTicket", {
643
+ L.assistChat.user.user_type !== "employee" && t((N) => [...N, L.assistChat]), !R("userAndTicket") && L.assistChat?.ticket_id && m && se("userAndTicket", {
642
644
  ticket_id: L.assistChat.ticket_id,
643
- employee_id: h.employee_id
645
+ employee_id: m.employee_id
644
646
  });
645
647
  } catch {
646
648
  t((y) => y.slice(0, -1));
647
649
  } finally {
648
- u(!1);
650
+ i(!1);
649
651
  }
650
652
  },
651
- hasMore: _
653
+ hasMore: w
652
654
  };
653
- }, Xe = ({ toastMsg: e }) => /* @__PURE__ */ b(
655
+ }, Xe = ({ toastMsg: e }) => /* @__PURE__ */ p(
654
656
  "div",
655
657
  {
656
658
  id: "toast-simple",
@@ -673,11 +675,11 @@ mutation AssistChat(
673
675
  }
674
676
  ), et = _e.memo(
675
677
  ({ url: e, msg: t, isFirstInGroup: r, fileType: a }) => {
676
- const [o, c] = w(!1), d = async () => {
677
- const p = t.attachments[0], u = await (await fetch(p.url)).blob(), _ = URL.createObjectURL(u), k = document.createElement("a");
678
- k.href = _, k.download = p.filename || "download.pdf", k.click(), URL.revokeObjectURL(_);
678
+ const [l, c] = _(!1), b = async () => {
679
+ const u = t.attachments[0], i = await (await fetch(u.url)).blob(), w = URL.createObjectURL(i), k = document.createElement("a");
680
+ k.href = w, k.download = u.filename || "download.pdf", k.click(), URL.revokeObjectURL(w);
679
681
  };
680
- return /* @__PURE__ */ b(K, { children: [
682
+ return /* @__PURE__ */ p(K, { children: [
681
683
  (a === "jpg" || a === "jpeg" || a === "png") && /* @__PURE__ */ n("div", { className: "mhb-flex", children: /* @__PURE__ */ n(
682
684
  "div",
683
685
  {
@@ -693,11 +695,11 @@ mutation AssistChat(
693
695
  ) }) }) })
694
696
  }
695
697
  ) }),
696
- a === "pdf" && /* @__PURE__ */ b(
698
+ a === "pdf" && /* @__PURE__ */ p(
697
699
  "button",
698
700
  {
699
701
  className: "mhb-flex mhb-w-full mhb-items-center mhb-justify-between mhb-gap-3 mhb-rounded-[20px] mhb-mhb-border mhb-border-neutral-10 mhb-bg-white p-3 focus:mhb-outline-none",
700
- onClick: () => d(),
702
+ onClick: () => b(),
701
703
  children: [
702
704
  /* @__PURE__ */ n("div", { className: "mhb-relative mhb-flex mhb-h-[36px] mhb-w-[36px] mhb-items-center mhb-justify-center mhb-rounded-[8px] mhb-bg-neutral-20", children: /* @__PURE__ */ n("p", { className: "mhb-absolute mhb-text-white mhb-typography-para-40", children: "pdf" }) }),
703
705
  /* @__PURE__ */ n("p", { className: "mhb-max-w-[50px] mhb-overflow-hidden mhb-text-ellipsis mhb-whitespace-nowrap mhb-text-neutral-110 mhb-typography-para-thick-30", children: t.attachments[0].filename.split(/[/_]/).pop() })
@@ -713,41 +715,41 @@ mutation AssistChat(
713
715
  "image/png",
714
716
  "application/pdf"
715
717
  ], tt = () => {
716
- const [e, t] = w(""), r = I(null), a = I(null), o = I(null), c = I(0), d = I(0), p = I(!1), {
717
- historyData: i,
718
- sendMessage: u,
719
- getNextPageData: _,
718
+ const [e, t] = _(""), r = I(null), a = I(null), l = I(null), c = I(0), b = I(0), u = I(!1), {
719
+ historyData: h,
720
+ sendMessage: i,
721
+ getNextPageData: w,
720
722
  isLoadingMore: k,
721
723
  isSending: v,
722
- upload: h,
724
+ upload: m,
723
725
  msgLoading: g,
724
726
  hasMore: S
725
727
  } = Qe();
726
728
  fe(() => {
727
729
  const s = r.current;
728
730
  if (s)
729
- if (p.current) {
730
- const m = c.current, y = d.current, x = s.scrollHeight - m;
731
- s.scrollTop = y + x, p.current = !1;
731
+ if (u.current) {
732
+ const d = c.current, y = b.current, x = s.scrollHeight - d;
733
+ s.scrollTop = y + x, u.current = !1;
732
734
  } else
733
735
  s.scrollTop = s.scrollHeight;
734
- }, [i?.length]);
736
+ }, [h?.length]);
735
737
  const E = () => {
736
738
  const s = a.current?.value?.trim();
737
- S || (p.current = !1), s && (u(s), a.current && (a.current.value = ""));
739
+ S || (u.current = !1), s && (i(s), a.current && (a.current.value = ""));
738
740
  }, M = (s) => {
739
741
  v || s.key === "Enter" && (s.preventDefault(), E());
740
742
  }, ae = (s) => {
741
- const m = s.currentTarget;
742
- if (m.scrollHeight > m.clientHeight && m.scrollTop <= 20 && !k) {
743
- const C = i.length;
744
- c.current = m.scrollHeight, d.current = m.scrollTop, p.current = !0, _(C);
743
+ const d = s.currentTarget;
744
+ if (d.scrollHeight > d.clientHeight && d.scrollTop <= 20 && !k) {
745
+ const C = h.length;
746
+ c.current = d.scrollHeight, b.current = d.scrollTop, u.current = !0, w(C);
745
747
  }
746
748
  }, ie = (s) => {
747
- const m = Array.from(s.target.files || []), y = m.filter(
749
+ const d = Array.from(s.target.files || []), y = d.filter(
748
750
  (H) => pe.includes(H.type)
749
751
  );
750
- if (m.filter(
752
+ if (d.filter(
751
753
  (H) => !pe.includes(H.type)
752
754
  ).length > 0) {
753
755
  t(
@@ -755,25 +757,25 @@ mutation AssistChat(
755
757
  ), setTimeout(() => t(null), 3e3), s.target.value = "";
756
758
  return;
757
759
  }
758
- const x = i[i?.length - 1]?.ticket_id;
759
- y.length > 0 && x && h({
760
+ const x = h[h?.length - 1]?.ticket_id;
761
+ y.length > 0 && x && m({
760
762
  files: y,
761
763
  signature_type: "upload",
762
764
  ticketId: x
763
765
  });
764
- }, le = () => {
765
- o.current?.click();
766
- }, f = ge(() => i?.some((s) => s.handover == !0), [i]);
767
- return console.log(i, "historyData"), /* @__PURE__ */ b("div", { className: "mhb-flex mhb-h-full mhb-flex-col mhb-overflow-hidden mhb-bg-white", children: [
768
- /* @__PURE__ */ n(K, { children: g ? /* @__PURE__ */ n("div", { className: "mhb-py-3", children: /* @__PURE__ */ n(ee, {}) }) : /* @__PURE__ */ b(K, { children: [
766
+ }, oe = () => {
767
+ l.current?.click();
768
+ }, f = ge(() => h?.some((s) => s.handover == !0), [h]);
769
+ return console.log(h, "historyData"), /* @__PURE__ */ p("div", { className: "mhb-flex mhb-h-full mhb-flex-col mhb-overflow-hidden mhb-bg-white", children: [
770
+ /* @__PURE__ */ n(K, { children: g ? /* @__PURE__ */ n("div", { className: "mhb-py-3", children: /* @__PURE__ */ n(ee, {}) }) : /* @__PURE__ */ p(K, { children: [
769
771
  /* @__PURE__ */ n(
770
772
  "div",
771
773
  {
772
774
  ref: r,
773
775
  className: "mhb-flex-grow mhb-overflow-y-auto mhb-py-3 [&>*]:[mhb-overflow-anchor:none]",
774
776
  onScroll: ae,
775
- children: /* @__PURE__ */ n("div", { className: "mhb-flex mhb-min-h-full mhb-flex-col mhb-justify-end mhb-gap-1", children: i?.map((s, m) => {
776
- const y = "user" in s && m === 0 || i[m - 1]?.user?.user_type !== s?.user?.user_type, C = new Date(s.created_at ?? ""), x = m > 0 ? new Date(i[m - 1].created_at ?? "") : null, H = !x || C.getDate() !== x.getDate() || C.getMonth() !== x.getMonth() || C.getFullYear() !== x.getFullYear(), oe = x && C.getTime() - x.getTime() > 120 * 1e3, L = s.hasOwnProperty("user") && (y || H || oe), N = s?.attachments?.some(($) => {
777
+ children: /* @__PURE__ */ n("div", { className: "mhb-flex mhb-min-h-full mhb-flex-col mhb-justify-end mhb-gap-1", children: h?.map((s, d) => {
778
+ const y = "user" in s && d === 0 || h[d - 1]?.user?.user_type !== s?.user?.user_type, C = new Date(s.created_at ?? ""), x = d > 0 ? new Date(h[d - 1].created_at ?? "") : null, H = !x || C.getDate() !== x.getDate() || C.getMonth() !== x.getMonth() || C.getFullYear() !== x.getFullYear(), le = x && C.getTime() - x.getTime() > 120 * 1e3, L = s.hasOwnProperty("user") && (y || H || le), N = s?.attachments?.some(($) => {
777
779
  const D = $.filename.match(/\.([a-zA-Z0-9]+)(?:\?|$)/)?.[1]?.toLowerCase();
778
780
  return ["jpg", "jpeg", "png"].includes(D || "");
779
781
  });
@@ -781,22 +783,22 @@ mutation AssistChat(
781
783
  "div",
782
784
  {
783
785
  className: `mhb-flex ${s.user.user_type === "bot" || s.user.user_type === "agent" ? "mhb-justify-start" : "mhb-justify-end"}`,
784
- children: /* @__PURE__ */ b("div", { className: "mhb-max-w-[75%", children: [
786
+ children: /* @__PURE__ */ p("div", { className: "mhb-max-w-[75%", children: [
785
787
  L && /* @__PURE__ */ n(
786
788
  "div",
787
789
  {
788
790
  className: `mhb-mb-1 mhb-flex mhb-items-center ${s.user.user_type === "bot" || s.user.user_type === "agent" ? "mhb-justify-start" : "mhb-justify-end"}`,
789
- children: s.user.user_type === "bot" ? /* @__PURE__ */ b("div", { className: "mhb-flex mhb-gap-2 mhb-items-center", children: [
790
- /* @__PURE__ */ b("div", { className: "mhb-flex mhb-items-center mhb-gap-1", children: [
791
+ children: s.user.user_type === "bot" ? /* @__PURE__ */ p("div", { className: "mhb-flex mhb-gap-2 mhb-items-center", children: [
792
+ /* @__PURE__ */ p("div", { className: "mhb-flex mhb-items-center mhb-gap-1", children: [
791
793
  /* @__PURE__ */ n(De, {}),
792
794
  /* @__PURE__ */ n("div", { className: "mhb-mb-1", children: /* @__PURE__ */ n($e, {}) })
793
795
  ] }),
794
- /* @__PURE__ */ b("div", { className: "mhb-flex mhb-gap-1 mhb-mt-[2px] mhb-items-center", children: [
796
+ /* @__PURE__ */ p("div", { className: "mhb-flex mhb-gap-1 mhb-mt-[2px] mhb-items-center", children: [
795
797
  /* @__PURE__ */ n("div", { className: "mhb-h-[2px] mhb-w-[2px] mhb-rounded-full mhb-bg-neutral-60" }),
796
798
  /* @__PURE__ */ n("p", { className: "mhb-typography-para-40 mhb-text-neutral-60", children: Q(s.created_at) })
797
799
  ] })
798
- ] }) : s.user.user_type === "employee" ? /* @__PURE__ */ b("div", { className: "mhb-flex mhb-gap-2 mhb-items-center", children: [
799
- /* @__PURE__ */ b("div", { className: "mhb-flex mhb-gap-1", children: [
800
+ ] }) : s.user.user_type === "employee" ? /* @__PURE__ */ p("div", { className: "mhb-flex mhb-gap-2 mhb-items-center", children: [
801
+ /* @__PURE__ */ p("div", { className: "mhb-flex mhb-gap-1", children: [
800
802
  /* @__PURE__ */ n("p", { className: "mhb-typography-para-40 mhb-text-neutral-60", children: Q(s.created_at) }),
801
803
  /* @__PURE__ */ n("div", { className: "mhb-h-[2px] mhb-w-[2px] mhb-rounded-full mhb-bg-neutral-60 mhb-flex mhb-self-center" })
802
804
  ] }),
@@ -808,7 +810,7 @@ mutation AssistChat(
808
810
  className: "mhb-size-4 mhb-shrink-0 mhb-rounded-full mhb-select-none"
809
811
  }
810
812
  )
811
- ] }) : s.user.user_type === "agent" ? /* @__PURE__ */ b("div", { className: "mhb-flex mhb-gap-2 mhb-items-center", children: [
813
+ ] }) : s.user.user_type === "agent" ? /* @__PURE__ */ p("div", { className: "mhb-flex mhb-gap-2 mhb-items-center", children: [
812
814
  /* @__PURE__ */ n(
813
815
  ce,
814
816
  {
@@ -817,7 +819,7 @@ mutation AssistChat(
817
819
  className: "mhb-size-4 mhb-shrink-0 mhb-rounded-full mhb-select-none"
818
820
  }
819
821
  ),
820
- /* @__PURE__ */ b("div", { className: "mhb-flex mhb-gap-1 mhb-mt-1 mhb-items-center", children: [
822
+ /* @__PURE__ */ p("div", { className: "mhb-flex mhb-gap-1 mhb-mt-1 mhb-items-center", children: [
821
823
  /* @__PURE__ */ n("div", { className: "mhb-h-[2px] mhb-w-[2px] mhb-rounded-full mhb-bg-neutral-60" }),
822
824
  /* @__PURE__ */ n("p", { className: "mhb-typography-para-40 mhb-text-neutral-60", children: Q(s.created_at) })
823
825
  ] })
@@ -854,7 +856,7 @@ mutation AssistChat(
854
856
  }) })
855
857
  }
856
858
  ),
857
- /* @__PURE__ */ n("div", { className: "mhb-chat-input-container mhb-sticky mhb-bottom-0 mhb-bg-white mhb-py-3 mhb-flex mhb-items-center mhb-gap-2", children: /* @__PURE__ */ b("div", { className: "mhb-bg-neutral-10 mhb-flex mhb-h-[80px] mhb-flex-1 mhb-rounded-xl mhb-p-3", children: [
859
+ /* @__PURE__ */ n("div", { className: "mhb-chat-input-container mhb-sticky mhb-bottom-0 mhb-bg-white mhb-py-3 mhb-flex mhb-items-center mhb-gap-2", children: /* @__PURE__ */ p("div", { className: "mhb-bg-neutral-10 mhb-flex mhb-h-[80px] mhb-flex-1 mhb-rounded-xl mhb-p-3", children: [
858
860
  /* @__PURE__ */ n("div", { className: "mhb-flex mhb-flex-1", children: /* @__PURE__ */ n(
859
861
  "textarea",
860
862
  {
@@ -864,23 +866,22 @@ mutation AssistChat(
864
866
  onKeyDown: M
865
867
  }
866
868
  ) }),
867
- /* @__PURE__ */ b("div", { className: "mhb-flex mhb-gap-1 mhb-justify-end mhb-items-end", children: [
868
- f && /* @__PURE__ */ b(
869
+ /* @__PURE__ */ p("div", { className: "mhb-flex mhb-gap-1 mhb-justify-end mhb-items-end", children: [
870
+ f && /* @__PURE__ */ p(
869
871
  "button",
870
872
  {
871
873
  type: "button",
872
874
  className: "mhb-btn-reset mhb-h-[36px] mhb-w-[36px] mhb-rounded-full mhb-bg-neutral-100 mhb-flex mhb-items-center mhb-justify-center mhb-outline-none",
873
875
  disabled: v,
874
- onClick: le,
876
+ onClick: oe,
875
877
  children: [
876
878
  /* @__PURE__ */ n(Ve, { className: "h-[16px] w-[16px] mhb-fill-current" }),
877
879
  /* @__PURE__ */ n(
878
880
  "input",
879
881
  {
880
882
  type: "file",
881
- multiple: !0,
882
883
  accept: ".jpg,.jpeg,.png,.pdf",
883
- ref: o,
884
+ ref: l,
884
885
  onChange: ie,
885
886
  className: "hidden"
886
887
  }
@@ -911,21 +912,21 @@ function nt({
911
912
  const {
912
913
  authorized: r,
913
914
  isChatScreen: a,
914
- setIsChatScreen: o,
915
+ setIsChatScreen: l,
915
916
  accessToken: c,
916
- setProfileInfo: d
917
- } = O(), p = async () => {
918
- const i = await G.getProfileDetails();
919
- d(i);
917
+ setProfileInfo: b
918
+ } = O(), u = async () => {
919
+ const h = await G.getProfileDetails();
920
+ b(h);
920
921
  };
921
922
  return P(() => {
922
- c && p();
923
- }, []), /* @__PURE__ */ n("div", { className: "mhb-root", children: /* @__PURE__ */ n(Pe, { side: e, align: t, children: /* @__PURE__ */ b("div", { className: "mhb-h-full mhb-w-full mhb-flex mhb-flex-col mhb-min-h-0", children: [
923
+ c && u();
924
+ }, []), /* @__PURE__ */ n("div", { className: "mhb-root", children: /* @__PURE__ */ n(Pe, { side: e, align: t, children: /* @__PURE__ */ p("div", { className: "mhb-h-full mhb-w-full mhb-flex mhb-flex-col mhb-min-h-0", children: [
924
925
  /* @__PURE__ */ n(
925
926
  Je,
926
927
  {
927
928
  isChatScreen: a,
928
- setIsChatScreen: o
929
+ setIsChatScreen: l
929
930
  }
930
931
  ),
931
932
  a ? /* @__PURE__ */ n(tt, {}) : /* @__PURE__ */ n(qe, {})
@@ -940,7 +941,7 @@ let re = null, q = !1, B = [];
940
941
  function rt() {
941
942
  for (const e of B) e();
942
943
  }
943
- function ot(e) {
944
+ function lt(e) {
944
945
  q || (st(e), G.init({
945
946
  env: e.env,
946
947
  redirectUrl: e.redirectUrl,
@@ -949,7 +950,7 @@ function ot(e) {
949
950
  }), re = e, q = !0, rt(), Be({ apiKey: e.apiKey, apiURL: e.apiURL }));
950
951
  }
951
952
  function ct(e) {
952
- const [t, r] = w({
953
+ const [t, r] = _({
953
954
  initialized: q,
954
955
  sdkOptions: re
955
956
  });
@@ -958,7 +959,7 @@ function ct(e) {
958
959
  r({ initialized: q, sdkOptions: re });
959
960
  };
960
961
  return B.push(a), () => {
961
- B = B.filter((o) => o !== a);
962
+ B = B.filter((l) => l !== a);
962
963
  };
963
964
  }, []), !t.initialized || !t.sdkOptions ? null : /* @__PURE__ */ n(
964
965
  He,
@@ -972,6 +973,6 @@ function ct(e) {
972
973
  }
973
974
  export {
974
975
  ct as ChatButton,
975
- ot as init
976
+ lt as init
976
977
  };
977
978
  //# sourceMappingURL=index.js.map