randmarcomps 1.367.0 → 1.369.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -78,8 +78,8 @@ var jt = React.createContext({}), Lt = React.forwardRef((t, e) => {
78
78
  }
79
79
  let Mt = Qe.selectionStart, Ye = Qe.selectionEnd, nt = Qe.selectionDirection, ot = Qe.maxLength, lt = Qe.value, ft = Fe.current.prev, pt = -1, yt = -1, zt;
80
80
  if (lt.length !== 0 && Mt !== null && Ye !== null) {
81
- let qt = Mt === Ye, wr = Mt === lt.length && lt.length < ot;
82
- if (qt && !wr) {
81
+ let qt = Mt === Ye, Tr = Mt === lt.length && lt.length < ot;
82
+ if (qt && !Tr) {
83
83
  let vr = Mt;
84
84
  if (vr === 0) pt = 0, yt = 1, zt = "forward";
85
85
  else if (vr === ot) pt = vr - 1, yt = vr, zt = "backward";
@@ -58690,9 +58690,9 @@ function createDOMPurify() {
58690
58690
  let Yt = null;
58691
58691
  const or = addToSet({}, ["audio", "video", "img", "source", "image", "track"]);
58692
58692
  let dr = null;
58693
- const qt = addToSet({}, ["alt", "class", "for", "id", "label", "name", "pattern", "placeholder", "role", "summary", "title", "value", "style", "xmlns"]), wr = "http://www.w3.org/1998/Math/MathML", vr = "http://www.w3.org/2000/svg", gr = "http://www.w3.org/1999/xhtml";
58694
- let Sr = gr, Tr = !1, Dr = null;
58695
- const Xt = addToSet({}, [wr, vr, gr], stringToString);
58693
+ const qt = addToSet({}, ["alt", "class", "for", "id", "label", "name", "pattern", "placeholder", "role", "summary", "title", "value", "style", "xmlns"]), Tr = "http://www.w3.org/1998/Math/MathML", vr = "http://www.w3.org/2000/svg", gr = "http://www.w3.org/1999/xhtml";
58694
+ let Sr = gr, wr = !1, Dr = null;
58695
+ const Xt = addToSet({}, [Tr, vr, gr], stringToString);
58696
58696
  let Ir = addToSet({}, ["mi", "mo", "mn", "ms", "mtext"]), yr = addToSet({}, ["annotation-xml"]);
58697
58697
  const Pr = addToSet({}, ["title", "style", "font", "a", "script"]);
58698
58698
  let nr = null;
@@ -58721,7 +58721,7 @@ function createDOMPurify() {
58721
58721
  tagName: "template"
58722
58722
  });
58723
58723
  const Wt = stringToLowerCase(rt.tagName), lr = stringToLowerCase(Rt.tagName);
58724
- return Dr[rt.namespaceURI] ? rt.namespaceURI === vr ? Rt.namespaceURI === gr ? Wt === "svg" : Rt.namespaceURI === wr ? Wt === "svg" && (lr === "annotation-xml" || Ir[lr]) : !!$r[Wt] : rt.namespaceURI === wr ? Rt.namespaceURI === gr ? Wt === "math" : Rt.namespaceURI === vr ? Wt === "math" && yr[lr] : !!pr[Wt] : rt.namespaceURI === gr ? Rt.namespaceURI === vr && !yr[lr] || Rt.namespaceURI === wr && !Ir[lr] ? !1 : !pr[Wt] && (Pr[Wt] || !$r[Wt]) : !!(nr === "application/xhtml+xml" && Dr[rt.namespaceURI]) : !1;
58724
+ return Dr[rt.namespaceURI] ? rt.namespaceURI === vr ? Rt.namespaceURI === gr ? Wt === "svg" : Rt.namespaceURI === Tr ? Wt === "svg" && (lr === "annotation-xml" || Ir[lr]) : !!$r[Wt] : rt.namespaceURI === Tr ? Rt.namespaceURI === gr ? Wt === "math" : Rt.namespaceURI === vr ? Wt === "math" && yr[lr] : !!pr[Wt] : rt.namespaceURI === gr ? Rt.namespaceURI === vr && !yr[lr] || Rt.namespaceURI === Tr && !Ir[lr] ? !1 : !pr[Wt] && (Pr[Wt] || !$r[Wt]) : !!(nr === "application/xhtml+xml" && Dr[rt.namespaceURI]) : !1;
58725
58725
  }, ur = function(rt) {
58726
58726
  arrayPush(e.removed, {
58727
58727
  element: rt
@@ -58772,7 +58772,7 @@ function createDOMPurify() {
58772
58772
  if (!Rt || !Rt.documentElement) {
58773
58773
  Rt = F.createDocument(Sr, "template", null);
58774
58774
  try {
58775
- Rt.documentElement.innerHTML = Tr ? j : lr;
58775
+ Rt.documentElement.innerHTML = wr ? j : lr;
58776
58776
  } catch {
58777
58777
  }
58778
58778
  }
@@ -58927,7 +58927,7 @@ function createDOMPurify() {
58927
58927
  };
58928
58928
  return e.sanitize = function(Kt) {
58929
58929
  let rt = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, Rt = null, Wt = null, lr = null, _r = null;
58930
- if (Tr = !Kt, Tr && (Kt = "<!-->"), typeof Kt != "string" && !Qr(Kt))
58930
+ if (wr = !Kt, wr && (Kt = "<!-->"), typeof Kt != "string" && !Qr(Kt))
58931
58931
  if (typeof Kt.toString == "function") {
58932
58932
  if (Kt = Kt.toString(), typeof Kt != "string")
58933
58933
  throw typeErrorCreate("dirty is not a string, aborting");
@@ -59544,7 +59544,7 @@ const fetchGeminiResponse = async (t, e, n, o, l = 3) => {
59544
59544
  !Xt || !Ge.trim() || !Le || o !== !0 && !et || (Xt.unread > 0 && (ft(), tt((ut) => ut.map((Ut) => Ut.partner1 === Le[0] && Ut.partner2 === Le[1] ? { ...Ut, unread: 0 } : Ut))), zt(Xt, Ge));
59545
59545
  }, qt = (ut) => {
59546
59546
  ut.target.files && ut.target.files[0] ? Qe(ut.target.files[0]) : Qe(null);
59547
- }, wr = () => {
59547
+ }, Tr = () => {
59548
59548
  var ut;
59549
59549
  (ut = Ye.current) == null || ut.click();
59550
59550
  }, vr = () => {
@@ -59621,7 +59621,7 @@ const fetchGeminiResponse = async (t, e, n, o, l = 3) => {
59621
59621
  } finally {
59622
59622
  V.current && (V.current.disabled = !1), F(!1);
59623
59623
  }
59624
- }, Tr = () => {
59624
+ }, wr = () => {
59625
59625
  tt((ut) => ut.map((Jt) => Jt.partner1 !== ASSISTANT_ID && Jt.partner2 !== ASSISTANT_ID ? Jt : { ...Jt, messages: [] })), $t([]), Fe();
59626
59626
  }, Dr = () => {
59627
59627
  Le && R({ routeApplicationId: t, partnerId: Le[0] == t ? Le[1] : Le[0] }).then(() => {
@@ -59631,7 +59631,7 @@ const fetchGeminiResponse = async (t, e, n, o, l = 3) => {
59631
59631
  I((Jt) => ({
59632
59632
  ...Jt,
59633
59633
  [ut]: Ut
59634
- })), Tr();
59634
+ })), wr();
59635
59635
  }, Pr = useRef(null);
59636
59636
  useEffect(() => {
59637
59637
  var ut;
@@ -59736,7 +59736,7 @@ const fetchGeminiResponse = async (t, e, n, o, l = 3) => {
59736
59736
  }
59737
59737
  ),
59738
59738
  /* @__PURE__ */ jsx(TooltipProvider, { children: /* @__PURE__ */ jsxs(Tooltip$1, { children: [
59739
- /* @__PURE__ */ jsx(TooltipTrigger, { asChild: !0, children: /* @__PURE__ */ jsx(Button, { variant: "ghost", size: "icon", className: "ml-1", onClick: () => Tr(), children: /* @__PURE__ */ jsx(MessageCircleX, { className: "h-5 w-5" }) }) }),
59739
+ /* @__PURE__ */ jsx(TooltipTrigger, { asChild: !0, children: /* @__PURE__ */ jsx(Button, { variant: "ghost", size: "icon", className: "ml-1", onClick: () => wr(), children: /* @__PURE__ */ jsx(MessageCircleX, { className: "h-5 w-5" }) }) }),
59740
59740
  /* @__PURE__ */ jsx(TooltipContent, { children: /* @__PURE__ */ jsx("p", { children: "Reset Chat" }) })
59741
59741
  ] }) })
59742
59742
  ] }) : /* @__PURE__ */ jsxs(Fragment$1, { children: [
@@ -59817,7 +59817,7 @@ const fetchGeminiResponse = async (t, e, n, o, l = 3) => {
59817
59817
  {
59818
59818
  size: "icon",
59819
59819
  variant: "default",
59820
- onClick: wr,
59820
+ onClick: Tr,
59821
59821
  className: Xt != null && Xt.pending ? "collapse" : "ml-2 h-8 w-8",
59822
59822
  disabled: !Ve || $e !== "" || (Xt == null ? void 0 : Xt.pending) || !!mt,
59823
59823
  children: /* @__PURE__ */ jsx(Paperclip, { className: "h-5 w-5" })
@@ -59839,7 +59839,7 @@ const fetchGeminiResponse = async (t, e, n, o, l = 3) => {
59839
59839
  ] })
59840
59840
  ] })
59841
59841
  ] }) : /* @__PURE__ */ jsx("div", { className: "flex-1 flex items-center justify-center text-muted-foreground", children: Ve ? "Select a chat to start messaging" : Vr }) }),
59842
- /* @__PURE__ */ jsx("div", { "data-thin": lt(), className: "w-[480px] flex flex-col border-l flex-5 data-[thin=true]:flex-3", children: lt() ? /* @__PURE__ */ jsxs("div", { className: "flex h-full flex-col border-r bg-slate-50 text-slate-800", children: [
59842
+ /* @__PURE__ */ jsx("div", { "data-thin": lt(), className: "w-[480px] flex flex-col border-l flex-5 data-[thin=true]:flex-3", children: lt() ? /* @__PURE__ */ jsxs("div", { className: "flex h-full flex-col border-r bg-slate-50 text-slate-800 rounded-r-lg", children: [
59843
59843
  /* @__PURE__ */ jsxs("div", { className: "p-4 space-y-4 border-b border-slate-200/80", children: [
59844
59844
  /* @__PURE__ */ jsxs("h4", { className: "flex items-center text-xs font-semibold tracking-wider text-slate-500 uppercase", children: [
59845
59845
  /* @__PURE__ */ jsx(Settings, { className: "w-4 h-4 mr-2" }),
@@ -60554,20 +60554,20 @@ function createFormControl(t = {}) {
60554
60554
  }, yt = getValidationModes(e.mode), zt = getValidationModes(e.reValidateMode);
60555
60555
  if (ft) {
60556
60556
  let Yt, or;
60557
- const dr = nt.type ? getFieldValue(ft._f) : getEventValue(Ye), qt = Ye.type === EVENTS.BLUR || Ye.type === EVENTS.FOCUS_OUT, wr = !hasValidation(ft._f) && !e.resolver && !get(n.errors, ot) && !ft._f.deps || skipValidation(qt, get(n.touchedFields, ot), n.isSubmitted, zt, yt), vr = isWatched(ot, g, qt);
60557
+ const dr = nt.type ? getFieldValue(ft._f) : getEventValue(Ye), qt = Ye.type === EVENTS.BLUR || Ye.type === EVENTS.FOCUS_OUT, Tr = !hasValidation(ft._f) && !e.resolver && !get(n.errors, ot) && !ft._f.deps || skipValidation(qt, get(n.touchedFields, ot), n.isSubmitted, zt, yt), vr = isWatched(ot, g, qt);
60558
60558
  set(d, ot, dr), qt ? (ft._f.onBlur && ft._f.onBlur(Ye), b && b(0)) : ft._f.onChange && ft._f.onChange(Ye);
60559
60559
  const gr = j(ot, dr, qt), Sr = !isEmptyObject$1(gr) || vr;
60560
60560
  if (!qt && E.state.next({
60561
60561
  name: ot,
60562
60562
  type: Ye.type,
60563
60563
  values: cloneObject(d)
60564
- }), wr)
60564
+ }), Tr)
60565
60565
  return (_.isValid || C.isValid) && (e.mode === "onBlur" ? qt && M() : qt || M()), Sr && E.state.next({ name: ot, ...vr ? {} : gr });
60566
60566
  if (!qt && vr && E.state.next({ ...n }), e.resolver) {
60567
- const { errors: Tr } = await te([ot]);
60567
+ const { errors: wr } = await te([ot]);
60568
60568
  if (pt(dr), lt) {
60569
- const Dr = schemaErrorLookup(n.errors, o, ot), Xt = schemaErrorLookup(Tr, o, Dr.name || ot);
60570
- Yt = Xt.error, ot = Xt.name, or = isEmptyObject$1(Tr);
60569
+ const Dr = schemaErrorLookup(n.errors, o, ot), Xt = schemaErrorLookup(wr, o, Dr.name || ot);
60570
+ Yt = Xt.error, ot = Xt.name, or = isEmptyObject$1(wr);
60571
60571
  }
60572
60572
  } else
60573
60573
  I([ot], !0), Yt = (await validateField(ft, g.disabled, d, R, e.shouldUseNativeValidation))[ot], I([ot]), pt(dr), lt && (Yt ? or = !1 : (_.isValid || C.isValid) && (or = await ae(o, !0)));
@@ -65003,6 +65003,50 @@ function SalesChart({
65003
65003
  ] })
65004
65004
  ] });
65005
65005
  }
65006
+ function PartnerCardHeader({
65007
+ type: t,
65008
+ applicationId: e,
65009
+ publicName: n,
65010
+ name: o,
65011
+ location: l,
65012
+ link: d,
65013
+ linkNewTab: f = !0,
65014
+ children: g
65015
+ }) {
65016
+ const [b, S] = useState(!1), _ = (E) => {
65017
+ E.preventDefault(), E.stopPropagation(), navigator.clipboard.writeText(e), S(!0), setTimeout(() => S(!1), 2e3);
65018
+ }, C = /* @__PURE__ */ jsxs(CardHeader, { className: "flex flex-row items-start justify-between space-y-0 pb-2 pt-4", children: [
65019
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-3", children: [
65020
+ /* @__PURE__ */ jsx("div", { className: "h-12 w-12 overflow-hidden rounded-md", children: /* @__PURE__ */ jsx(
65021
+ PartnerLogo,
65022
+ {
65023
+ id: e,
65024
+ width: 48,
65025
+ height: 48
65026
+ },
65027
+ `partner_logo_${e}`
65028
+ ) }),
65029
+ /* @__PURE__ */ jsxs("div", { children: [
65030
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
65031
+ /* @__PURE__ */ jsx("span", { className: "text-xs text-primary", children: t }),
65032
+ /* @__PURE__ */ jsx("span", { className: "text-xs text-muted-foreground", children: "|" }),
65033
+ /* @__PURE__ */ jsx(TooltipProvider, { children: /* @__PURE__ */ jsxs(Tooltip$1, { delayDuration: 300, children: [
65034
+ /* @__PURE__ */ jsx(TooltipTrigger, { asChild: !0, children: /* @__PURE__ */ jsxs("div", { className: "flex cursor-pointer items-center gap-1", onClick: _, children: [
65035
+ /* @__PURE__ */ jsx("span", { className: "text-xs text-muted-foreground", children: e }),
65036
+ b ? /* @__PURE__ */ jsx(Check, { className: "h-3 w-3 text-green-500" }) : /* @__PURE__ */ jsx(Copy, { className: "h-3 w-3 text-muted-foreground" })
65037
+ ] }) }),
65038
+ /* @__PURE__ */ jsx(TooltipContent, { children: /* @__PURE__ */ jsx("p", { children: b ? "Copied!" : "Copy ID" }) })
65039
+ ] }) })
65040
+ ] }),
65041
+ /* @__PURE__ */ jsx("h3", { className: "font-semibold", children: n || "N/A" }),
65042
+ o && /* @__PURE__ */ jsx("p", { className: "text-sm text-muted-foreground", children: o }),
65043
+ l && /* @__PURE__ */ jsx("p", { className: "text-sm text-muted-foreground", children: l })
65044
+ ] })
65045
+ ] }),
65046
+ g && /* @__PURE__ */ jsx("div", { className: "flex flex-col items-end gap-2", children: g })
65047
+ ] });
65048
+ return d ? /* @__PURE__ */ jsx(Link, { to: d, target: f ? "_blank" : "_self", children: C }) : C;
65049
+ }
65006
65050
  function ManufacturerCard({
65007
65051
  manufacturer: t,
65008
65052
  link: e,
@@ -65011,7 +65055,7 @@ function ManufacturerCard({
65011
65055
  mainAction: l,
65012
65056
  loading: d = !1
65013
65057
  }) {
65014
- var _, C, E;
65058
+ var S, _, C;
65015
65059
  if (d || !t)
65016
65060
  return /* @__PURE__ */ jsxs(Card, { className: "flex flex-col h-full", children: [
65017
65061
  /* @__PURE__ */ jsxs(CardHeader, { className: "flex flex-row items-start justify-between space-y-0 pb-2 pt-4", children: [
@@ -65052,48 +65096,37 @@ function ManufacturerCard({
65052
65096
  /* @__PURE__ */ jsx(Skeleton, { className: "h-9 w-40" })
65053
65097
  ] })
65054
65098
  ] });
65055
- const f = t.ManufacturerId || "N/A", g = [t.City, t.Province, t.Country].filter(Boolean), b = g.length > 0 ? g.join(", ") : "", S = ((_ = t.Tags) == null ? void 0 : _.split(",").map((R) => R.trim()).filter(Boolean)) || [];
65099
+ const f = [t.City, t.Province, t.Country].filter(Boolean), g = f.length > 0 ? f.join(", ") : "", b = ((S = t.Tags) == null ? void 0 : S.split(",").map((E) => E.trim()).filter(Boolean)) || [];
65056
65100
  return /* @__PURE__ */ jsxs(Card, { className: "manufacturer-theme flex flex-col h-full", children: [
65057
- /* @__PURE__ */ jsx(Link, { to: e ?? "#", target: e && n ? "_blank" : "_self", children: /* @__PURE__ */ jsxs(CardHeader, { className: "flex flex-row items-start justify-between space-y-0 pb-2 pt-4", children: [
65058
- /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-3", children: [
65059
- /* @__PURE__ */ jsx("div", { className: "h-12 w-12 overflow-hidden rounded-md", children: /* @__PURE__ */ jsx(
65060
- PartnerLogo,
65101
+ /* @__PURE__ */ jsx(
65102
+ PartnerCardHeader,
65103
+ {
65104
+ type: "Manufacturer",
65105
+ applicationId: t.ManufacturerId,
65106
+ publicName: t.PublicName,
65107
+ name: t.Name,
65108
+ location: g,
65109
+ link: e,
65110
+ linkNewTab: n,
65111
+ children: /* @__PURE__ */ jsx("div", { className: "flex flex-col items-end gap-2", children: t.SalesStatistics && t.SalesStatistics.length > 0 && /* @__PURE__ */ jsx("div", { className: "h-16 w-24", children: /* @__PURE__ */ jsx(
65112
+ SalesChart,
65061
65113
  {
65062
- id: t.ManufacturerId,
65063
- width: 48,
65064
- height: 48
65065
- },
65066
- `partner_logo_${t.ManufacturerId}`
65067
- ) }),
65068
- /* @__PURE__ */ jsxs("div", { children: [
65069
- /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
65070
- /* @__PURE__ */ jsx("span", { className: "text-xs text-primary", children: "Manufacturer" }),
65071
- /* @__PURE__ */ jsx("span", { className: "text-xs text-muted-foreground", children: "|" }),
65072
- /* @__PURE__ */ jsx("span", { className: "text-xs text-muted-foreground", children: f })
65073
- ] }),
65074
- /* @__PURE__ */ jsx("h3", { className: "font-semibold", children: t.PublicName || "N/A" }),
65075
- t.Name && /* @__PURE__ */ jsx("p", { className: "text-sm text-muted-foreground", children: t.Name }),
65076
- b && /* @__PURE__ */ jsx("p", { className: "text-sm text-muted-foreground", children: b })
65077
- ] })
65078
- ] }),
65079
- /* @__PURE__ */ jsx("div", { className: "flex flex-col items-end gap-2", children: t.SalesStatistics && t.SalesStatistics.length > 0 && /* @__PURE__ */ jsx("div", { className: "h-16 w-24", children: /* @__PURE__ */ jsx(
65080
- SalesChart,
65081
- {
65082
- statistics: t.SalesStatistics,
65083
- size: "mini"
65084
- }
65085
- ) }) })
65086
- ] }) }),
65114
+ statistics: t.SalesStatistics,
65115
+ size: "mini"
65116
+ }
65117
+ ) }) })
65118
+ }
65119
+ ),
65087
65120
  /* @__PURE__ */ jsx(CardContent, { className: "pb-2 flex-grow", children: /* @__PURE__ */ jsxs("div", { className: "flex", children: [
65088
65121
  /* @__PURE__ */ jsxs("div", { className: "flex flex-col flex-1 space-y-2", children: [
65089
- (!!((C = t.Qualification) != null && C.QualificationId) && ((E = t.Qualification) == null ? void 0 : E.QualificationId) !== "Suspended" || !!t.OpenToWork || !!t.OnHold && t.OnHold !== 0 || S.length > 0) && /* @__PURE__ */ jsxs("div", { className: "flex flex-wrap gap-2", children: [
65122
+ (!!((_ = t.Qualification) != null && _.QualificationId) && ((C = t.Qualification) == null ? void 0 : C.QualificationId) !== "Suspended" || !!t.OpenToWork || !!t.OnHold && t.OnHold !== 0 || b.length > 0) && /* @__PURE__ */ jsxs("div", { className: "flex flex-wrap gap-2", children: [
65090
65123
  /* @__PURE__ */ jsx(QualificationBadge, { qualification: t.Qualification ?? {} }),
65091
65124
  !!t.OpenToWork && /* @__PURE__ */ jsxs(Badge, { variant: "success", children: [
65092
65125
  /* @__PURE__ */ jsx(HardHat, { className: "h-3 w-3 mr-1" }),
65093
65126
  "Open To Work"
65094
65127
  ] }),
65095
65128
  !!t.OnHold && t.OnHold !== 0 && /* @__PURE__ */ jsx(Badge, { variant: "warning", children: "On Hold" }),
65096
- S.map((R, A) => /* @__PURE__ */ jsx(Badge, { variant: "outline", children: R }, A))
65129
+ b.map((E, R) => /* @__PURE__ */ jsx(Badge, { variant: "outline", children: E }, R))
65097
65130
  ] }),
65098
65131
  /* @__PURE__ */ jsxs("div", { className: "space-y-1 pt-2", children: [
65099
65132
  t.Phone && /* @__PURE__ */ jsxs(
@@ -67659,25 +67692,14 @@ function PartnerCard({
67659
67692
  /* @__PURE__ */ jsx(Skeleton, { className: "h-9 w-48" })
67660
67693
  ] })
67661
67694
  ] }) : /* @__PURE__ */ jsxs(Card, { className: `flex flex-col h-full ${o}`, children: [
67662
- /* @__PURE__ */ jsx(CardHeader, { className: "flex flex-row items-start justify-between space-y-0 pb-2 pt-4", children: /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-3", children: [
67663
- /* @__PURE__ */ jsx("div", { className: "h-12 w-12 overflow-hidden rounded-md", children: /* @__PURE__ */ jsx(
67664
- PartnerLogo,
67665
- {
67666
- id: t.ApplicationId,
67667
- width: 64,
67668
- height: 64
67669
- },
67670
- `partner_logo_${t.ApplicationId}`
67671
- ) }),
67672
- /* @__PURE__ */ jsxs("div", { children: [
67673
- /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
67674
- /* @__PURE__ */ jsx("span", { className: "text-xs text-primary", children: "Partner" }),
67675
- /* @__PURE__ */ jsx("span", { className: "text-xs text-muted-foreground", children: "|" }),
67676
- /* @__PURE__ */ jsx("span", { className: "text-xs text-muted-foreground", children: t.ApplicationId })
67677
- ] }),
67678
- /* @__PURE__ */ jsx("h3", { className: "font-semibold", children: t.PublicName || "N/A" })
67679
- ] })
67680
- ] }) }),
67695
+ /* @__PURE__ */ jsx(
67696
+ PartnerCardHeader,
67697
+ {
67698
+ type: "Partner",
67699
+ applicationId: t.ApplicationId,
67700
+ publicName: t.PublicName
67701
+ }
67702
+ ),
67681
67703
  /* @__PURE__ */ jsxs(CardContent, { className: "pb-2 flex-grow", children: [
67682
67704
  _ && /* @__PURE__ */ jsx("div", { className: "text-red-500 mb-4 text-sm", role: "alert", children: _ }),
67683
67705
  /* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-4", children: [
@@ -67758,7 +67780,7 @@ function ResellerCard({
67758
67780
  mainAction: l,
67759
67781
  loading: d = !1
67760
67782
  }) {
67761
- var S, _;
67783
+ var b, S;
67762
67784
  if (d || !t)
67763
67785
  return /* @__PURE__ */ jsxs(Card, { className: "flex flex-col h-full", children: [
67764
67786
  /* @__PURE__ */ jsx(CardHeader, { className: "flex flex-row items-start justify-between space-y-0 pb-2 pt-4", children: /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-3", children: [
@@ -67796,41 +67818,30 @@ function ResellerCard({
67796
67818
  /* @__PURE__ */ jsx(Skeleton, { className: "h-9 w-40" })
67797
67819
  ] })
67798
67820
  ] });
67799
- const f = t.ResellerId || "N/A", g = [t.City, t.Province, t.Country].filter(Boolean), b = g.length > 0 ? g.join(", ") : "Location not provided";
67821
+ const f = [t.City, t.Province, t.Country].filter(Boolean), g = f.length > 0 ? f.join(", ") : "Location not provided";
67800
67822
  return /* @__PURE__ */ jsxs(Card, { className: "reseller-theme flex flex-col h-full", children: [
67801
- /* @__PURE__ */ jsx(Link, { to: e ?? "#", target: e && n ? "_blank" : "_self", children: /* @__PURE__ */ jsxs(CardHeader, { className: "flex flex-row items-start justify-between space-y-0 pb-2 pt-4", children: [
67802
- /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-3", children: [
67803
- /* @__PURE__ */ jsx("div", { className: "h-12 w-12 overflow-hidden rounded-md", children: /* @__PURE__ */ jsx(
67804
- PartnerLogo,
67823
+ /* @__PURE__ */ jsx(
67824
+ PartnerCardHeader,
67825
+ {
67826
+ type: "Reseller",
67827
+ applicationId: t.ResellerId,
67828
+ publicName: t.PublicName,
67829
+ name: t.Name,
67830
+ location: g,
67831
+ link: e,
67832
+ linkNewTab: n,
67833
+ children: /* @__PURE__ */ jsx("div", { className: "flex flex-col items-end gap-2", children: t.SalesStatistics && t.SalesStatistics.length > 0 && /* @__PURE__ */ jsx("div", { className: "h-16 w-24", children: /* @__PURE__ */ jsx(
67834
+ SalesChart,
67805
67835
  {
67806
- id: t.ResellerId,
67807
- width: 48,
67808
- height: 48
67809
- },
67810
- `partner_logo_${t.ResellerId}`
67811
- ) }),
67812
- /* @__PURE__ */ jsxs("div", { children: [
67813
- /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
67814
- /* @__PURE__ */ jsx("span", { className: "text-xs text-primary", children: "Reseller" }),
67815
- /* @__PURE__ */ jsx("span", { className: "text-xs text-muted-foreground", children: "|" }),
67816
- /* @__PURE__ */ jsx("span", { className: "text-xs text-muted-foreground", children: f })
67817
- ] }),
67818
- /* @__PURE__ */ jsx("h3", { className: "font-semibold", children: t.PublicName || "N/A" }),
67819
- t.Name && /* @__PURE__ */ jsx("p", { className: "text-sm text-muted-foreground", children: t.Name }),
67820
- /* @__PURE__ */ jsx("p", { className: "text-sm text-muted-foreground", children: b })
67821
- ] })
67822
- ] }),
67823
- /* @__PURE__ */ jsx("div", { className: "flex flex-col items-end gap-2", children: t.SalesStatistics && t.SalesStatistics.length > 0 && /* @__PURE__ */ jsx("div", { className: "h-16 w-24", children: /* @__PURE__ */ jsx(
67824
- SalesChart,
67825
- {
67826
- statistics: t.SalesStatistics,
67827
- size: "mini"
67828
- }
67829
- ) }) })
67830
- ] }) }),
67836
+ statistics: t.SalesStatistics,
67837
+ size: "mini"
67838
+ }
67839
+ ) }) })
67840
+ }
67841
+ ),
67831
67842
  /* @__PURE__ */ jsx(CardContent, { className: "pb-2 flex-grow", children: /* @__PURE__ */ jsxs("div", { className: "flex", children: [
67832
67843
  /* @__PURE__ */ jsxs("div", { className: "flex flex-col flex-1 space-y-2", children: [
67833
- (!!((S = t.Qualification) != null && S.QualificationId) && ((_ = t.Qualification) == null ? void 0 : _.QualificationId) !== "Suspended" || !!t.OnHold && t.OnHold !== 0) && /* @__PURE__ */ jsxs("div", { className: "flex flex-wrap gap-2", children: [
67844
+ (!!((b = t.Qualification) != null && b.QualificationId) && ((S = t.Qualification) == null ? void 0 : S.QualificationId) !== "Suspended" || !!t.OnHold && t.OnHold !== 0) && /* @__PURE__ */ jsxs("div", { className: "flex flex-wrap gap-2", children: [
67834
67845
  /* @__PURE__ */ jsx(QualificationBadge, { qualification: t.Qualification ?? {} }),
67835
67846
  !!t.OnHold && t.OnHold !== 0 && /* @__PURE__ */ jsx(Badge, { variant: "warning", children: "On Hold" })
67836
67847
  ] }),
@@ -68721,7 +68732,7 @@ Defaulting to 2020, but this will stop working in the future.`)), oe.ecmaVersion
68721
68732
  }
68722
68733
  return this.adaptDirectivePrologue(O.body), this.next(), O.sourceType = this.options.sourceType, this.finishNode(O, "Program");
68723
68734
  };
68724
- var wr = { kind: "loop" }, vr = { kind: "switch" };
68735
+ var Tr = { kind: "loop" }, vr = { kind: "switch" };
68725
68736
  qt.isLet = function(O) {
68726
68737
  if (this.options.ecmaVersion < 6 || !this.isContextual("let"))
68727
68738
  return !1;
@@ -68813,11 +68824,11 @@ Defaulting to 2020, but this will stop working in the future.`)), oe.ecmaVersion
68813
68824
  }, qt.parseDebuggerStatement = function(O) {
68814
68825
  return this.next(), this.semicolon(), this.finishNode(O, "DebuggerStatement");
68815
68826
  }, qt.parseDoStatement = function(O) {
68816
- return this.next(), this.labels.push(wr), O.body = this.parseStatement("do"), this.labels.pop(), this.expect(F._while), O.test = this.parseParenExpression(), this.options.ecmaVersion >= 6 ? this.eat(F.semi) : this.semicolon(), this.finishNode(O, "DoWhileStatement");
68827
+ return this.next(), this.labels.push(Tr), O.body = this.parseStatement("do"), this.labels.pop(), this.expect(F._while), O.test = this.parseParenExpression(), this.options.ecmaVersion >= 6 ? this.eat(F.semi) : this.semicolon(), this.finishNode(O, "DoWhileStatement");
68817
68828
  }, qt.parseForStatement = function(O) {
68818
68829
  this.next();
68819
68830
  var oe = this.options.ecmaVersion >= 9 && this.canAwait && this.eatContextual("await") ? this.lastTokStart : -1;
68820
- if (this.labels.push(wr), this.enterScope(0), this.expect(F.parenL), this.type === F.semi)
68831
+ if (this.labels.push(Tr), this.enterScope(0), this.expect(F.parenL), this.type === F.semi)
68821
68832
  return oe > -1 && this.unexpected(oe), this.parseFor(O, null);
68822
68833
  var Oe = this.isLet();
68823
68834
  if (this.type === F._var || this.type === F._const || Oe) {
@@ -68827,7 +68838,7 @@ Defaulting to 2020, but this will stop working in the future.`)), oe.ecmaVersion
68827
68838
  var ct = this.isContextual("let"), dt = !1, It = this.containsEsc, Dt = new dr(), er = this.start, Qt = oe > -1 ? this.parseExprSubscripts(Dt, "await") : this.parseExpression(!0, Dt);
68828
68839
  return this.type === F._in || (dt = this.options.ecmaVersion >= 6 && this.isContextual("of")) ? (oe > -1 ? (this.type === F._in && this.unexpected(oe), O.await = !0) : dt && this.options.ecmaVersion >= 8 && (Qt.start === er && !It && Qt.type === "Identifier" && Qt.name === "async" ? this.unexpected() : this.options.ecmaVersion >= 9 && (O.await = !1)), ct && dt && this.raise(Qt.start, "The left-hand side of a for-of loop may not start with 'let'."), this.toAssignable(Qt, !1, Dt), this.checkLValPattern(Qt), this.parseForIn(O, Qt)) : (this.checkExpressionErrors(Dt, !0), oe > -1 && this.unexpected(oe), this.parseFor(O, Qt));
68829
68840
  }, qt.parseFunctionStatement = function(O, oe, Oe) {
68830
- return this.next(), this.parseFunction(O, Sr | (Oe ? 0 : Tr), !1, oe);
68841
+ return this.next(), this.parseFunction(O, Sr | (Oe ? 0 : wr), !1, oe);
68831
68842
  }, qt.parseIfStatement = function(O) {
68832
68843
  return this.next(), O.test = this.parseParenExpression(), O.consequent = this.parseStatement("if"), O.alternate = this.eat(F._else) ? this.parseStatement("if") : null, this.finishNode(O, "IfStatement");
68833
68844
  }, qt.parseReturnStatement = function(O) {
@@ -68857,7 +68868,7 @@ Defaulting to 2020, but this will stop working in the future.`)), oe.ecmaVersion
68857
68868
  }, qt.parseVarStatement = function(O, oe, Oe) {
68858
68869
  return this.next(), this.parseVar(O, !1, oe, Oe), this.semicolon(), this.finishNode(O, "VariableDeclaration");
68859
68870
  }, qt.parseWhileStatement = function(O) {
68860
- return this.next(), O.test = this.parseParenExpression(), this.labels.push(wr), O.body = this.parseStatement("while"), this.labels.pop(), this.finishNode(O, "WhileStatement");
68871
+ return this.next(), O.test = this.parseParenExpression(), this.labels.push(Tr), O.body = this.parseStatement("while"), this.labels.pop(), this.finishNode(O, "WhileStatement");
68861
68872
  }, qt.parseWithStatement = function(O) {
68862
68873
  return this.strict && this.raise(this.start, "'with' in strict mode"), this.next(), O.object = this.parseParenExpression(), O.body = this.parseStatement("with"), this.finishNode(O, "WithStatement");
68863
68874
  }, qt.parseEmptyStatement = function(O) {
@@ -68898,9 +68909,9 @@ Defaulting to 2020, but this will stop working in the future.`)), oe.ecmaVersion
68898
68909
  }, qt.parseVarId = function(O, oe) {
68899
68910
  O.id = this.parseBindingAtom(), this.checkLValPattern(O.id, oe === "var" ? nt : ot, !1);
68900
68911
  };
68901
- var Sr = 1, Tr = 2, Dr = 4;
68912
+ var Sr = 1, wr = 2, Dr = 4;
68902
68913
  qt.parseFunction = function(O, oe, Oe, je, Ke) {
68903
- this.initFunction(O), (this.options.ecmaVersion >= 9 || this.options.ecmaVersion >= 6 && !je) && (this.type === F.star && oe & Tr && this.unexpected(), O.generator = this.eat(F.star)), this.options.ecmaVersion >= 8 && (O.async = !!je), oe & Sr && (O.id = oe & Dr && this.type !== F.name ? null : this.parseIdent(), O.id && !(oe & Tr) && this.checkLValSimple(O.id, this.strict || O.generator || O.async ? this.treatFunctionsAsVar ? nt : ot : lt));
68914
+ this.initFunction(O), (this.options.ecmaVersion >= 9 || this.options.ecmaVersion >= 6 && !je) && (this.type === F.star && oe & wr && this.unexpected(), O.generator = this.eat(F.star)), this.options.ecmaVersion >= 8 && (O.async = !!je), oe & Sr && (O.id = oe & Dr && this.type !== F.name ? null : this.parseIdent(), O.id && !(oe & wr) && this.checkLValSimple(O.id, this.strict || O.generator || O.async ? this.treatFunctionsAsVar ? nt : ot : lt));
68904
68915
  var ct = this.yieldPos, dt = this.awaitPos, It = this.awaitIdentPos;
68905
68916
  return this.yieldPos = 0, this.awaitPos = 0, this.awaitIdentPos = 0, this.enterScope(Mt(O.async, O.generator)), oe & Sr || (O.id = this.type === F.name ? this.parseIdent() : null), this.parseFunctionParams(O), this.parseFunctionBody(O, Oe, !1, Ke), this.yieldPos = ct, this.awaitPos = dt, this.awaitIdentPos = It, this.finishNode(O, oe & Sr ? "FunctionDeclaration" : "FunctionExpression");
68906
68917
  }, qt.parseFunctionParams = function(O) {
@@ -70108,7 +70119,7 @@ Defaulting to 2020, but this will stop working in the future.`)), oe.ecmaVersion
70108
70119
  }
70109
70120
  return !1;
70110
70121
  };
70111
- var wn = 0, Fr = 1, Nr = 2;
70122
+ var Tn = 0, Fr = 1, Nr = 2;
70112
70123
  Vt.regexp_eatCharacterClassEscape = function(O) {
70113
70124
  var oe = O.current();
70114
70125
  if (Fn(oe))
@@ -70121,7 +70132,7 @@ Defaulting to 2020, but this will stop working in the future.`)), oe.ecmaVersion
70121
70132
  return Oe && je === Nr && O.raise("Invalid property name"), je;
70122
70133
  O.raise("Invalid property name");
70123
70134
  }
70124
- return wn;
70135
+ return Tn;
70125
70136
  };
70126
70137
  function Fn(O) {
70127
70138
  return O === 100 || O === 68 || O === 115 || O === 83 || O === 119 || O === 87;
@@ -70139,7 +70150,7 @@ Defaulting to 2020, but this will stop working in the future.`)), oe.ecmaVersion
70139
70150
  var Ke = O.lastStringValue;
70140
70151
  return this.regexp_validateUnicodePropertyNameOrValue(O, Ke);
70141
70152
  }
70142
- return wn;
70153
+ return Tn;
70143
70154
  }, Vt.regexp_validateUnicodePropertyNameAndValue = function(O, oe, Oe) {
70144
70155
  Fe(O.unicodeProperties.nonBinary, oe) || O.raise("Invalid property name"), O.unicodeProperties.nonBinary[oe].test(Oe) || O.raise("Invalid property value");
70145
70156
  }, Vt.regexp_validateUnicodePropertyNameOrValue = function(O, oe) {
@@ -70150,11 +70161,11 @@ Defaulting to 2020, but this will stop working in the future.`)), oe.ecmaVersion
70150
70161
  O.raise("Invalid property name");
70151
70162
  }, Vt.regexp_eatUnicodePropertyName = function(O) {
70152
70163
  var oe = 0;
70153
- for (O.lastStringValue = ""; Tn(oe = O.current()); )
70164
+ for (O.lastStringValue = ""; wn(oe = O.current()); )
70154
70165
  O.lastStringValue += qe(oe), O.advance();
70155
70166
  return O.lastStringValue !== "";
70156
70167
  };
70157
- function Tn(O) {
70168
+ function wn(O) {
70158
70169
  return Cn(O) || O === 95;
70159
70170
  }
70160
70171
  Vt.regexp_eatUnicodePropertyValue = function(O) {
@@ -70164,7 +70175,7 @@ Defaulting to 2020, but this will stop working in the future.`)), oe.ecmaVersion
70164
70175
  return O.lastStringValue !== "";
70165
70176
  };
70166
70177
  function jn(O) {
70167
- return Tn(O) || un(O);
70178
+ return wn(O) || un(O);
70168
70179
  }
70169
70180
  Vt.regexp_eatLoneUnicodePropertyNameOrValue = function(O) {
70170
70181
  return this.regexp_eatUnicodePropertyValue(O);