@burdenoff/microfe-support 2026.818.1 → 2026.819.1

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.
Files changed (124) hide show
  1. package/dist/generated/global-operations.d.ts +110 -0
  2. package/dist/generated/global-operations.js +259 -225
  3. package/dist/generated/global-operations.js.map +1 -1
  4. package/dist/generated/global-types.d.ts +42 -16
  5. package/dist/generated/global-types.js.map +1 -1
  6. package/dist/node_modules/clsx/dist/clsx.js +7 -5
  7. package/dist/node_modules/clsx/dist/clsx.js.map +1 -1
  8. package/dist/node_modules/dompurify/dist/purify.es.js +399 -304
  9. package/dist/node_modules/dompurify/dist/purify.es.js.map +1 -1
  10. package/dist/node_modules/marked/lib/marked.esm.js +23 -17
  11. package/dist/node_modules/marked/lib/marked.esm.js.map +1 -1
  12. package/dist/node_modules/tailwind-merge/dist/bundle-mjs.js +130 -130
  13. package/dist/node_modules/tailwind-merge/dist/bundle-mjs.js.map +1 -1
  14. package/dist/support/SupportAdminRoot.js +4 -2
  15. package/dist/support/SupportAdminRoot.js.map +1 -1
  16. package/dist/support/SupportAdminRoutes.js +2 -2
  17. package/dist/support/SupportAdminRoutes.js.map +1 -1
  18. package/dist/support/SupportUserRoot.js +4 -2
  19. package/dist/support/SupportUserRoot.js.map +1 -1
  20. package/dist/support/SupportUserRoutes.js +2 -2
  21. package/dist/support/SupportUserRoutes.js.map +1 -1
  22. package/dist/support/components/NotificationToast.js.map +1 -1
  23. package/dist/support/components/PageLayout.js.map +1 -1
  24. package/dist/support/components/RouteHelpers.js.map +1 -1
  25. package/dist/support/components/analytics/CategoryBreakdown.js.map +1 -1
  26. package/dist/support/components/analytics/MetricCard.js.map +1 -1
  27. package/dist/support/components/analytics/PriorityBreakdown.js.map +1 -1
  28. package/dist/support/components/analytics/SLAReport.js.map +1 -1
  29. package/dist/support/components/analytics/SatisfactionDistribution.js.map +1 -1
  30. package/dist/support/components/analytics/TopAgents.js.map +1 -1
  31. package/dist/support/components/analytics/TrendChart.js +5 -5
  32. package/dist/support/components/analytics/TrendChart.js.map +1 -1
  33. package/dist/support/components/careers/BulkCandidateActionGuidance.d.ts +6 -0
  34. package/dist/support/components/careers/BulkCandidateActionGuidance.js +28 -0
  35. package/dist/support/components/careers/BulkCandidateActionGuidance.js.map +1 -0
  36. package/dist/support/components/careers/BulkCandidateDialogs.d.ts +18 -0
  37. package/dist/support/components/careers/BulkCandidateDialogs.js +441 -0
  38. package/dist/support/components/careers/BulkCandidateDialogs.js.map +1 -0
  39. package/dist/support/components/careers/BulkOperationFeedback.d.ts +21 -0
  40. package/dist/support/components/careers/BulkOperationFeedback.js +194 -0
  41. package/dist/support/components/careers/BulkOperationFeedback.js.map +1 -0
  42. package/dist/support/components/careers/BulkSelectionSummary.d.ts +6 -0
  43. package/dist/support/components/careers/BulkSelectionSummary.js +15 -0
  44. package/dist/support/components/careers/BulkSelectionSummary.js.map +1 -0
  45. package/dist/support/components/kb/ArticleForm.js.map +1 -1
  46. package/dist/support/components/settings/CannedResponsesSettings.js.map +1 -1
  47. package/dist/support/components/settings/SLAPoliciesSettings.js.map +1 -1
  48. package/dist/support/components/settings/TicketCategoriesSettings.js.map +1 -1
  49. package/dist/support/components/tickets/AttachmentList.js.map +1 -1
  50. package/dist/support/components/tickets/MarkdownContent.js.map +1 -1
  51. package/dist/support/components/tickets/MessageComposer.js +2 -2
  52. package/dist/support/components/tickets/MessageComposer.js.map +1 -1
  53. package/dist/support/components/tickets/MessageThread.js +1 -1
  54. package/dist/support/components/tickets/MessageThread.js.map +1 -1
  55. package/dist/support/components/tickets/TicketDetailHeader.js.map +1 -1
  56. package/dist/support/components/tickets/TicketHeader.js.map +1 -1
  57. package/dist/support/components/tickets/TicketSidebar.js.map +1 -1
  58. package/dist/support/constants/pipeline.js.map +1 -1
  59. package/dist/support/events/rybbit.js.map +1 -1
  60. package/dist/support/hooks/index.js +6 -5
  61. package/dist/support/hooks/useAnalyticsOperations.js +1 -1
  62. package/dist/support/hooks/useAnalyticsOperations.js.map +1 -1
  63. package/dist/support/hooks/useAttachmentsFailedToast.js.map +1 -1
  64. package/dist/support/hooks/useChatOperations.js +7 -7
  65. package/dist/support/hooks/useChatOperations.js.map +1 -1
  66. package/dist/support/hooks/useKnowledgeBaseOperations.js.map +1 -1
  67. package/dist/support/hooks/useNotification.js.map +1 -1
  68. package/dist/support/hooks/useRegisterFooter.js.map +1 -1
  69. package/dist/support/hooks/useSettingsOperations.js.map +1 -1
  70. package/dist/support/hooks/useSupportAttachments.js.map +1 -1
  71. package/dist/support/hooks/useTicketListOperations.js.map +1 -1
  72. package/dist/support/hooks/useTicketOperations.js +76 -75
  73. package/dist/support/hooks/useTicketOperations.js.map +1 -1
  74. package/dist/support/index.js +11 -10
  75. package/dist/support/pages/AnalyticsPage.js.map +1 -1
  76. package/dist/support/pages/ArticleDetailAdminPage.js +1 -1
  77. package/dist/support/pages/ArticleDetailAdminPage.js.map +1 -1
  78. package/dist/support/pages/ArticleDetailUserPage.js +1 -1
  79. package/dist/support/pages/ArticleDetailUserPage.js.map +1 -1
  80. package/dist/support/pages/ContactInquiriesPage.js.map +1 -1
  81. package/dist/support/pages/ContactInquiryDetailPage.js +4 -1
  82. package/dist/support/pages/ContactInquiryDetailPage.js.map +1 -1
  83. package/dist/support/pages/CreateArticlePage.js.map +1 -1
  84. package/dist/support/pages/CreateTicketPage.js +4 -3
  85. package/dist/support/pages/CreateTicketPage.js.map +1 -1
  86. package/dist/support/pages/EditArticlePage.js.map +1 -1
  87. package/dist/support/pages/InterviewersPage.js +127 -127
  88. package/dist/support/pages/InterviewersPage.js.map +1 -1
  89. package/dist/support/pages/JobApplicationDetailPage.js +1 -1
  90. package/dist/support/pages/JobApplicationDetailPage.js.map +1 -1
  91. package/dist/support/pages/JobApplicationsPage.js +532 -631
  92. package/dist/support/pages/JobApplicationsPage.js.map +1 -1
  93. package/dist/support/pages/JobPostingDetailPage.js.map +1 -1
  94. package/dist/support/pages/JobPostingsPage.js.map +1 -1
  95. package/dist/support/pages/KnowledgeBaseAdminPage.js.map +1 -1
  96. package/dist/support/pages/KnowledgeBaseUserPage.js.map +1 -1
  97. package/dist/support/pages/SettingsPage.js.map +1 -1
  98. package/dist/support/pages/TicketDetailAdminPage.js +4 -1
  99. package/dist/support/pages/TicketDetailAdminPage.js.map +1 -1
  100. package/dist/support/pages/TicketDetailUserPage.js +4 -1
  101. package/dist/support/pages/TicketDetailUserPage.js.map +1 -1
  102. package/dist/support/pages/TicketListPage.js.map +1 -1
  103. package/dist/support/providers/SupportProvider.js.map +1 -1
  104. package/dist/support/store/supportStore.js.map +1 -1
  105. package/dist/support/utils/attachments.js +3 -3
  106. package/dist/support/utils/attachments.js.map +1 -1
  107. package/dist/support/utils/breadcrumbRegistry.js.map +1 -1
  108. package/dist/support/utils/bulkCandidateOperations.d.ts +174 -0
  109. package/dist/support/utils/bulkCandidateOperations.js +265 -0
  110. package/dist/support/utils/bulkCandidateOperations.js.map +1 -0
  111. package/dist/support/utils/categoryColors.js.map +1 -1
  112. package/dist/support/utils/cn.js +1 -1
  113. package/dist/support/utils/cn.js.map +1 -1
  114. package/dist/support/utils/context.js.map +1 -1
  115. package/dist/support/utils/errors.js.map +1 -1
  116. package/dist/support/utils/i18n.js.map +1 -1
  117. package/dist/support/utils/index.js +1 -1
  118. package/dist/support/utils/index.js.map +1 -1
  119. package/dist/support/utils/markdown.js +2 -2
  120. package/dist/support/utils/markdown.js.map +1 -1
  121. package/dist/support/utils/supportFiles.js.map +1 -1
  122. package/dist/support/utils/ticketFilters.js.map +1 -1
  123. package/dist/support/utils/uiTokens.js.map +1 -1
  124. package/package.json +22 -12
@@ -1,21 +1,45 @@
1
1
  import { Badge as e, Button as t, Checkbox as n, Dialog as r, DialogContent as i, DialogDescription as a, DialogFooter as ee, DialogHeader as te, DialogTitle as ne, Input as o, Label as s, Select as re, SelectContent as ie, SelectItem as ae, SelectTrigger as oe, SelectValue as se, Textarea as ce } from "../components/ui.js";
2
- import { useBulkRandomizeAndSendAssignmentMutation as le, useBulkSendRoundMessageMutation as ue, useCreateJobApplicationMutation as c, useGetJobApplicationsQuery as l, useGetJobPostingQuery as u, useGetJobPostingsQuery as de } from "../../generated/global-operations.js";
3
- import { JobPostingStatus as d } from "../../generated/global-types.js";
4
- import { nativeNotify as f } from "../../utils/nativeBridge.js";
5
- import { roundStatusConfig as fe, roundStatusOrder as p, statusColors as m, statusLabels as h, statusOrder as g } from "../constants/pipeline.js";
6
- import { useEffect as _, useRef as v, useState as y } from "react";
7
- import { AlertCircle as pe, Briefcase as b, CheckCircle2 as me, ChevronDown as he, Filter as x, Grid as ge, List as _e, Loader2 as S, Paperclip as C, Plus as ve, Search as ye, Send as be, Shuffle as w, SkipForward as T, UserPlus as E, XCircle as xe } from "lucide-react";
8
- import { useLocation as Se, useNavigate as D } from "react-router";
9
- import { graphqlFetch as Ce } from "@burdenoff/fe-libs/shared/graphql/fetch";
10
- import { Fragment as O, jsx as k, jsxs as A } from "react/jsx-runtime";
11
- import { IllustratedEmptyState as we, PagePurpose as Te } from "@burdenoff/fe-libs/ui";
2
+ import { useCreateJobApplicationMutation as le, useGetBulkCandidateTargetsLazyQuery as ue, useGetJobApplicationsQuery as de, useGetJobPostingsQuery as fe } from "../../generated/global-operations.js";
3
+ import { JobPostingStatus as pe } from "../../generated/global-types.js";
4
+ import { nativeNotify as c } from "../../utils/nativeBridge.js";
5
+ import { roundStatusConfig as me, roundStatusOrder as he, statusColors as l, statusLabels as ge, statusOrder as _e } from "../constants/pipeline.js";
6
+ import { CandidateMaterializationError as ve, createEmptyCandidateSelection as u, getCandidateSelectionCount as ye, getSelectedCandidateIds as be, materializeCandidateTargets as xe, materializeCandidateTargetsByIds as Se, selectAllMaterializedCandidates as Ce, setVisibleCandidateSelection as we, toggleCandidateSelection as Te } from "../utils/bulkCandidateOperations.js";
7
+ import { AddSelectedToRoundDialog as Ee, BulkCandidateSendDialog as De } from "../components/careers/BulkCandidateDialogs.js";
8
+ import { BulkSelectionSummary as Oe } from "../components/careers/BulkSelectionSummary.js";
9
+ import { useEffect as ke, useRef as d, useState as f } from "react";
10
+ import { AlertCircle as Ae, Briefcase as je, ChevronDown as Me, Filter as Ne, Grid as Pe, List as Fe, Loader2 as p, Paperclip as Ie, Plus as Le, Search as Re, Send as ze, Shuffle as Be, UserPlus as Ve } from "lucide-react";
11
+ import { useLocation as He, useNavigate as Ue } from "react-router";
12
+ import { graphqlFetch as We } from "@burdenoff/fe-libs/shared/graphql/fetch";
13
+ import { Fragment as m, jsx as h, jsxs as g } from "react/jsx-runtime";
14
+ import { IllustratedEmptyState as Ge, PagePurpose as Ke } from "@burdenoff/fe-libs/ui";
12
15
  //#region src/support/pages/JobApplicationsPage.tsx
13
- var j = 50, M = 100;
14
- function N(e, t) {
16
+ var _ = 50;
17
+ function qe(e) {
18
+ return {
19
+ id: e.id,
20
+ jobPostingId: e.jobPostingId ?? null,
21
+ interviewRounds: e.interviewRounds.map((e) => ({
22
+ id: e.id,
23
+ roundConfigId: e.roundConfigId ?? null,
24
+ name: e.name,
25
+ roundType: e.roundType,
26
+ emailLogs: e.emailLogs.map((e) => ({ emailType: e.emailType }))
27
+ }))
28
+ };
29
+ }
30
+ function Je(e) {
31
+ return {
32
+ ...e,
33
+ ...e.ids ? { ids: [...e.ids] } : {},
34
+ ...e.statuses ? { statuses: [...e.statuses] } : {},
35
+ ...e.roundStatuses ? { roundStatuses: [...e.roundStatuses] } : {}
36
+ };
37
+ }
38
+ function Ye(e, t) {
15
39
  let n = new Set(e);
16
40
  return n.has(t) ? n.delete(t) : n.add(t), n;
17
41
  }
18
- function P(e) {
42
+ function Xe(e) {
19
43
  return new Date(e).toLocaleDateString("en-US", {
20
44
  month: "short",
21
45
  day: "numeric",
@@ -24,38 +48,38 @@ function P(e) {
24
48
  minute: "2-digit"
25
49
  });
26
50
  }
27
- function Ee(e) {
51
+ function Ze(e) {
28
52
  let t = Date.now() - new Date(e).getTime(), n = Math.floor(t / 6e4);
29
53
  if (n < 2) return "just now";
30
54
  if (n < 60) return `${n}m ago`;
31
55
  let r = Math.floor(n / 60);
32
56
  if (r < 24) return `${r}h ago`;
33
57
  let i = Math.floor(r / 24);
34
- return i < 30 ? `${i}d ago` : P(e);
58
+ return i < 30 ? `${i}d ago` : Xe(e);
35
59
  }
36
- var F = "__none__", De = [
60
+ var v = "__none__", Qe = [
37
61
  "LinkedIn",
38
62
  "Referral",
39
63
  "Indeed",
40
64
  "Email",
41
65
  "Walk-in",
42
66
  "Other"
43
- ], Oe = 10 * 1024 * 1024, ke = ".pdf,.doc,.docx", Ae = new Set([
67
+ ], $e = 10485760, et = ".pdf,.doc,.docx", tt = /* @__PURE__ */ new Set([
44
68
  "application/pdf",
45
69
  "application/msword",
46
70
  "application/vnd.openxmlformats-officedocument.wordprocessingml.document"
47
- ]), je = {
71
+ ]), nt = {
48
72
  name: "",
49
73
  email: "",
50
74
  phone: "",
51
- jobPostingId: F,
75
+ jobPostingId: v,
52
76
  position: "",
53
77
  source: "",
54
78
  linkedin: "",
55
79
  portfolio: "",
56
80
  coverLetter: ""
57
81
  };
58
- function Me(e) {
82
+ function rt(e) {
59
83
  return new Promise((t, n) => {
60
84
  let r = new FileReader();
61
85
  r.onload = () => {
@@ -69,313 +93,152 @@ function Me(e) {
69
93
  }, r.onerror = () => n(r.error ?? /* @__PURE__ */ Error("Failed to read file")), r.readAsDataURL(e);
70
94
  });
71
95
  }
72
- var Ne = {
73
- message: "ROUND_MESSAGE",
74
- assignment: "ASSIGNMENT"
75
- };
76
- function Pe({ mode: e, open: o, onClose: c, applications: l, jobPostingId: de }) {
77
- let [d, fe] = y(""), [p, m] = y(""), [h, g] = y(!1), [v, b] = y(null), { data: he, loading: x, error: ge } = u({
78
- variables: { id: de },
79
- skip: !o || !de
80
- }), [_e, { loading: C }] = le({ refetchQueries: ["GetJobApplications", "GetJobApplicationInterviewRounds"] }), [ve, { loading: ye }] = ue({ refetchQueries: ["GetJobApplications", "GetJobApplicationInterviewRounds"] }), w = C || ye, E = he?.jobPosting?.rounds ?? [], Se = E.filter((t) => e === "assignment" ? t.isAssignmentRound : !0), D = E.find((e) => e.id === d), Ce = (D ? E.filter((e) => e.name.trim().toLowerCase() === D.name.trim().toLowerCase() && e.roundType === D.roundType) : []).length === 1, we = Ne[e], Te = !!d && x, j = null;
81
- l.length > M ? j = `Select no more than ${M} candidates for one bulk send.` : d && ge ? j = "Could not load the posting rounds. Nothing will be sent. Try again." : d && !x && !D && (j = "The selected round is no longer available. Choose another round.");
82
- let N = D ? l.map((e) => {
83
- let t = e.interviewRounds.find((e) => e.roundConfigId === D.id), n = Ce ? e.interviewRounds.find((e) => !e.roundConfigId && e.name.trim().toLowerCase() === D.name.trim().toLowerCase() && e.roundType === D.roundType) : void 0, r = t ?? n;
84
- return {
85
- applicationId: e.id,
86
- name: `${e.firstName} ${e.lastName}`.trim(),
87
- round: r ? {
88
- id: r.id,
89
- alreadySent: r.emailLogs.some((e) => e.emailType === we)
90
- } : null
91
- };
92
- }) : [];
93
- _(() => {
94
- o || (fe(""), m(""), g(!1), b(null));
95
- }, [o]);
96
- let P = N.filter((e) => e.round ? h || !e.round.alreadySent : !1), Ee = N.filter((e) => e.round?.alreadySent).length, F = N.filter((e) => !e.round).length, De = new Set(l.map((e) => e.id)).size, Oe = !Te && !j && De > 0 && N.length === De;
97
- return /* @__PURE__ */ k(r, {
98
- open: o,
99
- onOpenChange: (e) => !e && c(),
100
- children: /* @__PURE__ */ A(i, {
101
- className: "sm:max-w-lg max-h-[90vh] overflow-y-auto",
102
- children: [/* @__PURE__ */ A(te, { children: [/* @__PURE__ */ k(ne, { children: e === "assignment" ? "Randomize & Send Assignment" : "Send Message" }), /* @__PURE__ */ A(a, { children: [
103
- e === "assignment" ? "Pick a random active assignment for the posting and email it to every selected candidate at once." : "Send the same message to every selected candidate at once.",
104
- " ",
105
- l.length,
106
- " candidate",
107
- l.length === 1 ? "" : "s",
108
- " selected."
109
- ] })] }), v ? /* @__PURE__ */ A("div", {
110
- className: "space-y-4",
111
- children: [/* @__PURE__ */ A("div", {
112
- className: "space-y-2",
113
- children: [
114
- /* @__PURE__ */ A("div", {
115
- className: "flex items-center gap-2 text-sm text-status-success-text",
116
- children: [
117
- /* @__PURE__ */ k(me, { size: 16 }),
118
- "Sent to ",
119
- v.succeeded,
120
- " candidate",
121
- v.succeeded === 1 ? "" : "s"
122
- ]
123
- }),
124
- v.skipped > 0 && /* @__PURE__ */ A("div", {
125
- className: "flex items-center gap-2 text-sm text-status-warning-text",
126
- children: [
127
- /* @__PURE__ */ k(T, { size: 16 }),
128
- "Skipped ",
129
- v.skipped,
130
- " — already sent (use force to resend)"
131
- ]
132
- }),
133
- v.failed > 0 && /* @__PURE__ */ A("div", {
134
- className: "flex items-center gap-2 text-sm text-status-error-text",
135
- children: [
136
- /* @__PURE__ */ k(xe, { size: 16 }),
137
- "Failed for ",
138
- v.failed,
139
- " candidate",
140
- v.failed === 1 ? "" : "s"
141
- ]
142
- })
143
- ]
144
- }), /* @__PURE__ */ k(ee, { children: /* @__PURE__ */ k(t, {
145
- onClick: c,
146
- children: "Done"
147
- }) })]
148
- }) : /* @__PURE__ */ A("div", {
149
- className: "space-y-4",
150
- children: [
151
- /* @__PURE__ */ A("div", {
152
- className: "space-y-1.5",
153
- children: [
154
- /* @__PURE__ */ k(s, {
155
- htmlFor: "bulk-round-config",
156
- children: "Target round"
157
- }),
158
- /* @__PURE__ */ A(re, {
159
- value: d,
160
- onValueChange: fe,
161
- disabled: x,
162
- children: [/* @__PURE__ */ k(oe, {
163
- id: "bulk-round-config",
164
- children: /* @__PURE__ */ k(se, { placeholder: "Select a round" })
165
- }), /* @__PURE__ */ k(ie, { children: Se.map((e) => /* @__PURE__ */ A(ae, {
166
- value: e.id,
167
- children: [
168
- "Round ",
169
- e.roundNumber,
170
- " — ",
171
- e.name
172
- ]
173
- }, e.id)) })]
174
- }),
175
- Se.length === 0 && !x && /* @__PURE__ */ k("p", {
176
- className: "text-xs text-status-warning-text",
177
- children: e === "assignment" ? "This posting has no round configured as an assignment round yet." : "This posting has no interview rounds configured yet."
178
- })
179
- ]
180
- }),
181
- e === "message" && /* @__PURE__ */ A("div", {
182
- className: "space-y-1.5",
183
- children: [/* @__PURE__ */ k(s, {
184
- htmlFor: "bulk-message",
185
- children: "Message"
186
- }), /* @__PURE__ */ k(ce, {
187
- id: "bulk-message",
188
- value: p,
189
- onChange: (e) => m(e.target.value),
190
- placeholder: "e.g. Hey, this is a quick task for you — complete it and submit here: https://…",
191
- rows: 5
192
- })]
193
- }),
194
- d && /* @__PURE__ */ A("div", {
195
- className: "space-y-1.5",
196
- children: [
197
- /* @__PURE__ */ k("p", {
198
- className: "text-xs font-medium text-text-secondary",
199
- children: "Preview"
200
- }),
201
- Te ? /* @__PURE__ */ A("div", {
202
- className: "flex items-center gap-2 text-sm text-text-secondary",
203
- children: [/* @__PURE__ */ k(S, {
204
- size: 14,
205
- className: "animate-spin"
206
- }), "Checking candidates…"]
207
- }) : j ? /* @__PURE__ */ A("div", {
208
- className: "flex items-start gap-2 text-sm text-status-error-text",
209
- children: [/* @__PURE__ */ k(pe, {
210
- size: 14,
211
- className: "mt-0.5 shrink-0"
212
- }), /* @__PURE__ */ k("span", { children: j })]
213
- }) : /* @__PURE__ */ A("div", {
214
- className: "text-xs text-text-secondary space-y-1",
215
- children: [
216
- /* @__PURE__ */ A("p", { children: [
217
- "Will send to",
218
- " ",
219
- /* @__PURE__ */ k("span", {
220
- className: "font-medium text-text-primary",
221
- children: P.length
222
- }),
223
- " ",
224
- "candidate",
225
- P.length === 1 ? "" : "s"
226
- ] }),
227
- Ee > 0 && /* @__PURE__ */ A("p", { children: [
228
- Ee,
229
- " already sent",
230
- " ",
231
- h ? "(will resend — force is on)" : "(will be skipped)"
232
- ] }),
233
- F > 0 && /* @__PURE__ */ A("p", { children: [F, " have no round for this stage yet (skipped)"] })
234
- ]
235
- }),
236
- /* @__PURE__ */ A("label", {
237
- className: "flex items-center gap-2 pt-1 cursor-pointer",
238
- children: [/* @__PURE__ */ k(n, {
239
- checked: h,
240
- onCheckedChange: (e) => g(e === !0)
241
- }), /* @__PURE__ */ k("span", {
242
- className: "text-xs text-text-primary",
243
- children: "Resend to already-sent candidates"
244
- })]
245
- })
246
- ]
247
- }),
248
- /* @__PURE__ */ A(ee, { children: [/* @__PURE__ */ k(t, {
249
- variant: "outline",
250
- onClick: c,
251
- disabled: w,
252
- children: "Cancel"
253
- }), /* @__PURE__ */ k(t, {
254
- onClick: async () => {
255
- if (!Oe) return;
256
- let t = [], n = /* @__PURE__ */ new Set();
257
- for (let e of N) {
258
- if (!e.round) continue;
259
- let r = `${e.applicationId}:${e.round.id}`;
260
- n.has(r) || (n.add(r), t.push({
261
- applicationId: e.applicationId,
262
- roundId: e.round.id
263
- }));
264
- }
265
- if (!(t.length === 0 || t.length > M)) try {
266
- if (e === "assignment") {
267
- let e = (await _e({ variables: { input: {
268
- items: t,
269
- force: h
270
- } } })).data?.bulkRandomizeAndSendAssignment;
271
- if (!e) throw Error("Assignment send returned no result");
272
- b({
273
- succeeded: e.succeeded.length,
274
- skipped: e.skipped.length,
275
- failed: e.failed.length
276
- });
277
- } else {
278
- let e = (await ve({ variables: { input: {
279
- items: t,
280
- message: p.trim(),
281
- force: h
282
- } } })).data?.bulkSendRoundMessage;
283
- if (!e) throw Error("Message send returned no result");
284
- b({
285
- succeeded: e.succeeded.length,
286
- skipped: e.skipped.length,
287
- failed: e.failed.length
288
- });
289
- }
290
- f("success");
291
- } catch (e) {
292
- console.error("Bulk send failed:", e), f("error");
293
- }
294
- },
295
- disabled: w || !d || !Oe || e === "message" && !p.trim() || P.length === 0,
296
- children: w ? /* @__PURE__ */ A(O, { children: [/* @__PURE__ */ k(S, {
297
- size: 16,
298
- className: "animate-spin mr-2"
299
- }), "Sending…"] }) : /* @__PURE__ */ A(O, { children: [/* @__PURE__ */ k(be, {
300
- size: 16,
301
- className: "mr-2"
302
- }), "Send"] })
303
- })] })
304
- ]
305
- })]
306
- })
307
- });
308
- }
309
- function I() {
310
- let le = D(), ue = Se().search, [u, me] = y(""), [T, xe] = y(""), [P, Ne] = y(/* @__PURE__ */ new Set()), [I, Fe] = y(/* @__PURE__ */ new Set()), [L, Ie] = y(""), [R, Le] = y(""), [z, Re] = y(!1), [ze, Be] = y("list"), [Ve, B] = y(/* @__PURE__ */ new Set()), [He, V] = y(null), [Ue, H] = y(!1), [U, W] = y(je), [G, We] = y({}), [K, q] = y(null), [Ge, J] = y(""), [Ke, qe] = y(!1), [Je, Ye] = y(!1), [Y, Xe] = y({}), X = v(j), Ze = v(Y);
311
- Ze.current = Y, _(() => {
312
- let e = setTimeout(() => xe(u), 300);
96
+ function it() {
97
+ let Xe = Ue(), it = He().search, [y, at] = f(""), [b, ot] = f(""), [x, st] = f(/* @__PURE__ */ new Set()), [S, ct] = f(/* @__PURE__ */ new Set()), [C, lt] = f(""), [w, ut] = f(""), [T, dt] = f(!1), [ft, pt] = f("list"), [E, D] = f(u), [mt, ht] = f([]), [O, gt] = f(!1), [_t, k] = f(null), [A, vt] = f(null), [yt, j] = f([]), [bt, xt] = f(u), [M, N] = f(!1), [St, P] = f(null), [Ct, F] = f(!1), [I, L] = f(nt), [R, wt] = f({}), [z, B] = f(null), [Tt, V] = f(""), [Et, Dt] = f(!1), [Ot, kt] = f(!1), [H, At] = f({}), jt = d(_), U = d(0), Mt = d(H);
98
+ Mt.current = H, ke(() => {
99
+ let e = setTimeout(() => ot(y), 300);
313
100
  return () => clearTimeout(e);
314
- }, [u]);
315
- let Qe = {
316
- ...T ? { search: T } : {},
317
- ...P.size > 0 ? { statuses: Array.from(P) } : {},
318
- ...I.size > 0 ? { roundStatuses: Array.from(I) } : {},
319
- ...L ? { productId: L } : {},
320
- ...R ? { jobPostingId: R } : {}
321
- }, Z = JSON.stringify({
322
- search: T,
323
- statuses: Array.from(P).sort(),
324
- roundStatuses: Array.from(I).sort(),
325
- productId: L,
326
- jobPostingId: R
327
- }), $e = v(Z);
328
- $e.current = Z, _(() => {
329
- B(/* @__PURE__ */ new Set()), V(null), Ye(!1), X.current = j;
330
- }, [Z]);
331
- let { data: et, loading: tt, error: nt, fetchMore: rt } = l({
101
+ }, [y]);
102
+ let W = y !== b, Nt = {
103
+ ...b ? { search: b } : {},
104
+ ...x.size > 0 ? { statuses: Array.from(x) } : {},
105
+ ...S.size > 0 ? { roundStatuses: Array.from(S) } : {},
106
+ ...C ? { productId: C } : {},
107
+ ...w ? { jobPostingId: w } : {}
108
+ }, G = JSON.stringify({
109
+ searchInput: y,
110
+ search: b,
111
+ statuses: Array.from(x).sort(),
112
+ roundStatuses: Array.from(S).sort(),
113
+ productId: C,
114
+ jobPostingId: w
115
+ }), K = d({
116
+ key: G,
117
+ generation: 0
118
+ });
119
+ K.current.key !== G && (K.current = {
120
+ key: G,
121
+ generation: K.current.generation + 1
122
+ });
123
+ let q = `${K.current.generation}:${G}`, J = d(q);
124
+ J.current = q, ke(() => {
125
+ U.current += 1, D(u()), ht([]), gt(!1), k(null), vt(null), j([]), xt(u()), N(!1), P(null), kt(!1), jt.current = _;
126
+ }, [q]);
127
+ let { data: Pt, loading: Ft, error: It, fetchMore: Lt } = de({
332
128
  variables: {
333
- filter: Qe,
334
- limit: j,
129
+ filter: Nt,
130
+ limit: _,
335
131
  offset: 0
336
132
  },
337
133
  fetchPolicy: "cache-and-network"
338
- }), { data: it, loading: at } = de({
134
+ }), [Rt] = ue({ fetchPolicy: "network-only" }), { data: zt, loading: Bt } = fe({
339
135
  variables: {
340
136
  limit: 200,
341
137
  offset: 0
342
138
  },
343
139
  fetchPolicy: "cache-and-network"
344
- }), [ot] = c(), st = (it?.jobPostings?.items ?? []).filter((e) => e.status === d.Open), ct = et?.jobApplications?.items ?? [], lt = /* @__PURE__ */ new Map();
345
- for (let e of ct) lt.set(e.id, e);
346
- let Q = Array.from(lt.values()), ut = et?.jobApplications?.total ?? 0, dt = et?.jobApplications?.hasMore ?? !1, ft = Q.map((e) => e.id).join(",");
347
- _(() => {
348
- let e = new Set(ft ? ft.split(",") : []);
349
- B((t) => {
350
- let n = new Set(Array.from(t).filter((t) => e.has(t)));
351
- return n.size === t.size && Array.from(n).every((e) => t.has(e)) ? t : n;
140
+ }), [Vt] = le(), Ht = (zt?.jobPostings?.items ?? []).filter((e) => e.status === pe.Open), Ut = Pt?.jobApplications?.items ?? [], Wt = /* @__PURE__ */ new Map();
141
+ for (let e of Ut) Wt.set(e.id, e);
142
+ let Y = Array.from(Wt.values()), X = Pt?.jobApplications?.total ?? 0, Gt = Pt?.jobApplications?.hasMore ?? !1, Z = Y.map((e) => e.id), Kt = be(E), Q = ye(E), qt = (E.mode === "all" ? mt : Y.map(qe)).filter((e) => Kt.has(e.id)), Jt = qt.length === Q, Yt = !!w && Jt && qt.every((e) => e.jobPostingId === w), Xt = Z.filter((e) => Kt.has(e)).length, Zt = Z.length > 0 && Xt === Z.length, Qt = Yt && Q > 0 && !W && !O && !M, $t = (zt?.jobPostings?.items ?? []).reduce((e, t) => (e[t.id] = t, e), {}), en = async (e) => {
143
+ let t = Je(Nt);
144
+ return xe({
145
+ scopeKey: e,
146
+ expectedTotal: X,
147
+ getCurrentScopeKey: () => J.current,
148
+ fetchPage: async (e, n) => {
149
+ let r = (await Rt({ variables: {
150
+ filter: t,
151
+ limit: e,
152
+ offset: n
153
+ } })).data?.jobApplications;
154
+ if (!r) throw Error("The candidate target query returned no data.");
155
+ return {
156
+ items: r.items.map(qe),
157
+ total: r.total,
158
+ hasMore: r.hasMore
159
+ };
160
+ }
352
161
  });
353
- }, [ft]);
354
- let pt = (it?.jobPostings?.items ?? []).reduce((e, t) => (e[t.id] = t, e), {}), $ = Q.filter((e) => Ve.has(e.id)), mt = R ? $.filter((e) => e.jobPostingId === R) : [], ht = mt.length !== $.length, gt = $.length > M, _t = !!R && $.length > 0 && !ht && !gt, vt = `Select all ${Q.length} visible`;
355
- Q.length > M && (vt = `Select candidates individually (maximum ${M})`), $.length > 0 && (vt = `${$.length} selected`);
356
- let yt = Array.from(new Set(Q.flatMap((e) => e.productId ? [e.productId] : []))).sort(), bt = yt.join(",");
357
- _(() => {
358
- let e = bt ? bt.split(",").filter((e) => !Ze.current[e]) : [];
162
+ }, tn = async (e, t) => {
163
+ let n = Je(Nt);
164
+ return Se({
165
+ scopeKey: e,
166
+ applicationIds: t,
167
+ getCurrentScopeKey: () => J.current,
168
+ fetchChunkPage: async (e, t, r) => {
169
+ let i = (await Rt({ variables: {
170
+ filter: {
171
+ ...n,
172
+ ids: [...e]
173
+ },
174
+ limit: t,
175
+ offset: r
176
+ } })).data?.jobApplications;
177
+ if (!i) throw Error("The candidate target query returned no data.");
178
+ return {
179
+ items: i.items.map(qe),
180
+ total: i.total,
181
+ hasMore: i.hasMore
182
+ };
183
+ }
184
+ });
185
+ }, nn = async () => {
186
+ if (O || W || X === 0) return;
187
+ let e = q;
188
+ gt(!0), k(null);
189
+ try {
190
+ let t = await en(e);
191
+ if (J.current !== e) return;
192
+ ht(t), D(Ce(t.map((e) => e.id)));
193
+ } catch (t) {
194
+ if (t instanceof ve && t.code === "STALE_SCOPE" || J.current !== e) return;
195
+ k(t instanceof Error ? t.message : "Could not load all matching applications."), c("error");
196
+ } finally {
197
+ J.current === e && gt(!1);
198
+ }
199
+ }, $ = async (e) => {
200
+ if (!w || Q === 0 || W || M) return;
201
+ let t = q, n = U.current + 1;
202
+ U.current = n;
203
+ let r = be(E);
204
+ vt(e), j([]), xt(E), P(null), N(!0);
205
+ try {
206
+ let e = await tn(t, [...r]);
207
+ if (J.current !== t || U.current !== n) return;
208
+ let i = new Map(e.map((e) => [e.id, e])), a = [...r].map((e) => i.get(e)).filter((e) => !!e);
209
+ if (a.length !== r.size) throw Error("Some selected applications no longer match the frozen filter. Clear and select again.");
210
+ j(a);
211
+ } catch (e) {
212
+ if (e instanceof ve && e.code === "STALE_SCOPE" || J.current !== t || U.current !== n) return;
213
+ P(e instanceof Error ? e.message : "Could not refresh the selected applications."), c("error");
214
+ } finally {
215
+ J.current === t && U.current === n && N(!1);
216
+ }
217
+ }, rn = () => {
218
+ U.current += 1, vt(null), j([]), xt(u()), P(null), N(!1);
219
+ }, an = Array.from(new Set(Y.flatMap((e) => e.productId ? [e.productId] : []))).sort(), on = an.join(",");
220
+ ke(() => {
221
+ let e = on ? on.split(",").filter((e) => !Mt.current[e]) : [];
359
222
  e.length !== 0 && e.forEach((e) => {
360
- Ce({
223
+ We({
361
224
  gateway: "global",
362
225
  query: "query($id: ID!) { platformProduct(id: $id) { name } }",
363
226
  variables: { id: e }
364
227
  }).then((t) => {
365
228
  let n = t.data?.platformProduct?.name;
366
- n && Xe((t) => ({
229
+ n && At((t) => ({
367
230
  ...t,
368
231
  [e]: n
369
232
  }));
370
233
  }).catch(() => {});
371
234
  });
372
- }, [bt]);
373
- let xt = async () => {
374
- if (!dt || Je) return;
375
- let e = X.current, t = Z;
376
- Ye(!0);
235
+ }, [on]);
236
+ let sn = async () => {
237
+ if (!Gt || Ot) return;
238
+ let e = jt.current, t = q;
239
+ kt(!0);
377
240
  try {
378
- let n = await rt({
241
+ let n = await Lt({
379
242
  variables: { offset: e },
380
243
  updateQuery: (e, { fetchMoreResult: t }) => {
381
244
  if (!t) return e;
@@ -388,91 +251,92 @@ function I() {
388
251
  } };
389
252
  }
390
253
  });
391
- $e.current === t && (X.current = e + (n.data.jobApplications?.items.length ?? j));
254
+ J.current === t && (jt.current = e + (n.data.jobApplications?.items.length ?? _));
392
255
  } catch (e) {
393
- console.error("Failed to load more applications:", e), f("error");
256
+ console.error("Failed to load more applications:", e), c("error");
394
257
  } finally {
395
- $e.current === t && Ye(!1);
258
+ J.current === t && kt(!1);
396
259
  }
397
- }, St = () => {
398
- W(je), We({}), q(null), J("");
399
- }, Ct = (e) => {
260
+ }, cn = () => {
261
+ L(nt), wt({}), B(null), V("");
262
+ }, ln = (e) => {
400
263
  let t = e.target.files?.[0] ?? null;
401
- if (J(""), !t) {
402
- q(null);
264
+ if (V(""), !t) {
265
+ B(null);
403
266
  return;
404
267
  }
405
- if (t.size > Oe) {
406
- J("Resume must be 10 MB or smaller."), q(null), e.target.value = "";
268
+ if (t.size > $e) {
269
+ V("Resume must be 10 MB or smaller."), B(null), e.target.value = "";
407
270
  return;
408
271
  }
409
272
  let n = t.name.toLowerCase().split(".").pop() ?? "";
410
- if (!Ae.has(t.type) && ![
273
+ if (!tt.has(t.type) && ![
411
274
  "pdf",
412
275
  "doc",
413
276
  "docx"
414
277
  ].includes(n)) {
415
- J("Resume must be a PDF, DOC, or DOCX file."), q(null), e.target.value = "";
278
+ V("Resume must be a PDF, DOC, or DOCX file."), B(null), e.target.value = "";
416
279
  return;
417
280
  }
418
- q(t);
419
- }, wt = () => {
281
+ B(t);
282
+ }, un = () => {
420
283
  let e = {};
421
- return U.name.trim() || (e.name = "Name is required"), U.email.trim() ? /^\S+@\S+\.\S+$/.test(U.email.trim()) || (e.email = "Enter a valid email") : e.email = "Email is required", U.source.trim() || (e.source = "Source is required"), U.jobPostingId === F && !U.position.trim() && (e.position = "Position is required when no job posting is selected"), We(e), Object.keys(e).length === 0;
422
- }, Tt = async (e) => {
423
- if (e.preventDefault(), wt()) {
424
- qe(!0);
284
+ return I.name.trim() || (e.name = "Name is required"), I.email.trim() ? /^\S+@\S+\.\S+$/.test(I.email.trim()) || (e.email = "Enter a valid email") : e.email = "Email is required", I.source.trim() || (e.source = "Source is required"), I.jobPostingId === v && !I.position.trim() && (e.position = "Position is required when no job posting is selected"), wt(e), Object.keys(e).length === 0;
285
+ }, dn = async (e) => {
286
+ if (e.preventDefault(), un()) {
287
+ Dt(!0);
425
288
  try {
426
289
  let e, t, n;
427
- K && (t = await Me(K), e = K.name, n = K.type || void 0);
428
- let r = U.jobPostingId !== F, i = (await ot({
290
+ z && (t = await rt(z), e = z.name, n = z.type || void 0);
291
+ let r = I.jobPostingId !== v, i = (await Vt({
429
292
  variables: { input: {
430
- name: U.name.trim(),
431
- email: U.email.trim(),
432
- phone: U.phone.trim() || void 0,
433
- jobPostingId: r ? U.jobPostingId : void 0,
434
- position: r ? void 0 : U.position.trim() || void 0,
435
- source: U.source.trim(),
436
- linkedin: U.linkedin.trim() || void 0,
437
- portfolio: U.portfolio.trim() || void 0,
438
- coverLetter: U.coverLetter.trim() || void 0,
293
+ name: I.name.trim(),
294
+ email: I.email.trim(),
295
+ phone: I.phone.trim() || void 0,
296
+ jobPostingId: r ? I.jobPostingId : void 0,
297
+ position: r ? void 0 : I.position.trim() || void 0,
298
+ source: I.source.trim(),
299
+ linkedin: I.linkedin.trim() || void 0,
300
+ portfolio: I.portfolio.trim() || void 0,
301
+ coverLetter: I.coverLetter.trim() || void 0,
439
302
  resumeFileName: e,
440
303
  resumeBase64: t,
441
304
  resumeMimeType: n
442
305
  } },
443
306
  refetchQueries: ["GetJobApplications"]
444
307
  })).data?.createJobApplication?.id;
445
- f("success"), H(!1), St(), i && le(`/support/applications/${i}${ue}`);
308
+ c("success"), F(!1), cn(), i && Xe(`/support/applications/${i}${it}`);
446
309
  } catch (e) {
447
- console.error("Failed to create candidate:", e), f("error");
310
+ console.error("Failed to create candidate:", e), c("error");
448
311
  } finally {
449
- qe(!1);
312
+ Dt(!1);
450
313
  }
451
314
  }
452
- }, Et = g.reduce((e, t) => (e[t] = Q.filter((e) => e.status === t), e), {}), Dt = (t, r = !1) => {
453
- let i = t.jobPostingId ? pt[t.jobPostingId]?.title : void 0, a = Ve.has(t.id);
454
- return /* @__PURE__ */ A("div", {
315
+ }, fn = _e.reduce((e, t) => (e[t] = Y.filter((e) => e.status === t), e), {}), pn = (t, r = !1) => {
316
+ let i = t.jobPostingId ? $t[t.jobPostingId]?.title : void 0, a = Kt.has(t.id);
317
+ return /* @__PURE__ */ g("div", {
455
318
  className: `w-full bg-bg-surface border rounded-lg shadow-[var(--shadow-pop)] hover:border-border-strong hover:shadow-[var(--shadow-pop-hover)] transition-[box-shadow,border-color] duration-200 group flex items-start gap-2 ${r ? "p-3" : "p-4"} ${a ? "border-primary" : "border-border-seam"}`,
456
- children: [/* @__PURE__ */ k("div", {
319
+ children: [/* @__PURE__ */ h("div", {
457
320
  className: "pt-0.5",
458
- children: /* @__PURE__ */ k(n, {
321
+ children: /* @__PURE__ */ h(n, {
459
322
  checked: a,
460
- onCheckedChange: () => B((e) => N(e, t.id)),
323
+ disabled: O || W,
324
+ onCheckedChange: () => D((e) => Te(e, t.id)),
461
325
  "aria-label": `Select ${t.firstName} ${t.lastName}`
462
326
  })
463
- }), /* @__PURE__ */ k("button", {
327
+ }), /* @__PURE__ */ h("button", {
464
328
  type: "button",
465
- onClick: () => le(`/support/applications/${t.id}${ue}`),
329
+ onClick: () => Xe(`/support/applications/${t.id}${it}`),
466
330
  className: "flex-1 min-w-0 text-left",
467
- children: /* @__PURE__ */ A("div", {
331
+ children: /* @__PURE__ */ g("div", {
468
332
  className: `flex ${r ? "flex-col" : "items-start"} justify-between gap-3`,
469
- children: [/* @__PURE__ */ A("div", {
333
+ children: [/* @__PURE__ */ g("div", {
470
334
  className: "flex-1 min-w-0",
471
335
  children: [
472
- /* @__PURE__ */ A("div", {
336
+ /* @__PURE__ */ g("div", {
473
337
  className: "flex items-center gap-2 mb-1 flex-wrap",
474
338
  children: [
475
- /* @__PURE__ */ A("h3", {
339
+ /* @__PURE__ */ g("h3", {
476
340
  className: "font-semibold text-text-primary truncate group-hover:text-primary transition-colors text-sm",
477
341
  children: [
478
342
  t.firstName,
@@ -480,339 +344,361 @@ function I() {
480
344
  t.lastName
481
345
  ]
482
346
  }),
483
- /* @__PURE__ */ k(e, {
347
+ /* @__PURE__ */ h(e, {
484
348
  variant: "secondary",
485
- className: `${m[t.status] || m.NEW} ${t.status === "NEW" ? "motion-safe:animate-vc-glow-pulse" : ""}`,
486
- children: h[t.status] || t.status
349
+ className: `${l[t.status] || l.NEW} ${t.status === "NEW" ? "motion-safe:animate-vc-glow-pulse" : ""}`,
350
+ children: ge[t.status] || t.status
487
351
  }),
488
- i && /* @__PURE__ */ k(e, {
352
+ i && /* @__PURE__ */ h(e, {
489
353
  variant: "outline",
490
354
  title: `Job posting: ${i}`,
491
355
  children: i
492
356
  }),
493
- t.productId && Y[t.productId] && /* @__PURE__ */ k(e, {
357
+ t.productId && H[t.productId] && /* @__PURE__ */ h(e, {
494
358
  variant: "secondary",
495
359
  className: "bg-accent-purple-subtle text-accent-purple",
496
- title: `Product: ${Y[t.productId]}`,
497
- children: Y[t.productId]
360
+ title: `Product: ${H[t.productId]}`,
361
+ children: H[t.productId]
498
362
  }),
499
- t.resumeFileName && /* @__PURE__ */ A(e, {
363
+ t.resumeFileName && /* @__PURE__ */ g(e, {
500
364
  variant: "secondary",
501
365
  className: "bg-accent-blue-subtle text-accent-blue gap-1",
502
- children: [/* @__PURE__ */ k(C, { size: r ? 10 : 11 }), "Resume"]
366
+ children: [/* @__PURE__ */ h(Ie, { size: r ? 10 : 11 }), "Resume"]
503
367
  })
504
368
  ]
505
369
  }),
506
- /* @__PURE__ */ A("p", {
370
+ /* @__PURE__ */ g("p", {
507
371
  className: `text-text-secondary mb-1 ${r ? "text-xs" : "text-sm"}`,
508
- children: [/* @__PURE__ */ k("span", {
372
+ children: [/* @__PURE__ */ h("span", {
509
373
  className: "font-medium",
510
374
  children: t.position
511
- }), t.department && /* @__PURE__ */ A(O, { children: [/* @__PURE__ */ k("span", {
375
+ }), t.department && /* @__PURE__ */ g(m, { children: [/* @__PURE__ */ h("span", {
512
376
  className: "mx-1.5 text-text-secondary/50",
513
377
  children: "·"
514
- }), /* @__PURE__ */ k("span", { children: t.department })] })]
378
+ }), /* @__PURE__ */ h("span", { children: t.department })] })]
515
379
  }),
516
- /* @__PURE__ */ k("p", {
380
+ /* @__PURE__ */ h("p", {
517
381
  className: `text-text-secondary truncate ${r ? "text-[11px]" : "text-xs"}`,
518
382
  children: t.email
519
383
  })
520
384
  ]
521
- }), /* @__PURE__ */ k("div", {
385
+ }), /* @__PURE__ */ h("div", {
522
386
  className: `text-text-secondary whitespace-nowrap ${r ? "text-[11px]" : "text-xs"}`,
523
- children: Ee(t.createdAt)
387
+ children: Ze(t.createdAt)
524
388
  })]
525
389
  })
526
390
  })]
527
391
  }, t.id);
528
392
  };
529
- return tt && Q.length === 0 ? /* @__PURE__ */ A("div", {
393
+ return Ft && Y.length === 0 ? /* @__PURE__ */ g("div", {
530
394
  className: "p-6",
531
- children: [/* @__PURE__ */ A("div", {
395
+ children: [/* @__PURE__ */ g("div", {
532
396
  className: "flex items-center gap-3 mb-6",
533
- children: [/* @__PURE__ */ k(b, {
397
+ children: [/* @__PURE__ */ h(je, {
534
398
  size: 24,
535
399
  className: "text-text-primary"
536
- }), /* @__PURE__ */ k("h1", {
400
+ }), /* @__PURE__ */ h("h1", {
537
401
  className: "text-2xl font-bold text-text-primary",
538
402
  children: "Job Applications"
539
403
  })]
540
- }), /* @__PURE__ */ A("div", {
404
+ }), /* @__PURE__ */ g("div", {
541
405
  className: "flex flex-col items-center justify-center py-16",
542
- children: [/* @__PURE__ */ k(S, {
406
+ children: [/* @__PURE__ */ h(p, {
543
407
  size: 32,
544
408
  className: "animate-spin text-text-secondary mb-4"
545
- }), /* @__PURE__ */ k("p", {
409
+ }), /* @__PURE__ */ h("p", {
546
410
  className: "text-sm text-text-secondary",
547
411
  children: "Loading applications…"
548
412
  })]
549
413
  })]
550
- }) : nt ? /* @__PURE__ */ A("div", {
414
+ }) : It ? /* @__PURE__ */ g("div", {
551
415
  className: "p-6",
552
- children: [/* @__PURE__ */ A("div", {
416
+ children: [/* @__PURE__ */ g("div", {
553
417
  className: "flex items-center gap-3 mb-6",
554
- children: [/* @__PURE__ */ k(b, {
418
+ children: [/* @__PURE__ */ h(je, {
555
419
  size: 24,
556
420
  className: "text-text-primary"
557
- }), /* @__PURE__ */ k("h1", {
421
+ }), /* @__PURE__ */ h("h1", {
558
422
  className: "text-2xl font-bold text-text-primary",
559
423
  children: "Job Applications"
560
424
  })]
561
- }), /* @__PURE__ */ A("div", {
425
+ }), /* @__PURE__ */ g("div", {
562
426
  className: "flex flex-col items-center justify-center py-16 text-center",
563
427
  children: [
564
- /* @__PURE__ */ k("div", {
428
+ /* @__PURE__ */ h("div", {
565
429
  className: "p-4 rounded-2xl bg-status-error-bg-subtle text-status-error-text mb-4",
566
- children: /* @__PURE__ */ k(pe, { size: 48 })
430
+ children: /* @__PURE__ */ h(Ae, { size: 48 })
567
431
  }),
568
- /* @__PURE__ */ k("h3", {
432
+ /* @__PURE__ */ h("h3", {
569
433
  className: "text-lg font-semibold text-text-primary mb-2",
570
434
  children: "Failed to load applications"
571
435
  }),
572
- /* @__PURE__ */ k("p", {
436
+ /* @__PURE__ */ h("p", {
573
437
  className: "text-sm text-text-secondary",
574
- children: nt.message
438
+ children: It.message
575
439
  })
576
440
  ]
577
441
  })]
578
- }) : /* @__PURE__ */ A("div", {
442
+ }) : /* @__PURE__ */ g("div", {
579
443
  className: "p-6",
580
444
  children: [
581
- /* @__PURE__ */ A("div", {
445
+ /* @__PURE__ */ g("div", {
582
446
  className: "flex items-center justify-between mb-6",
583
- children: [/* @__PURE__ */ A("div", {
447
+ children: [/* @__PURE__ */ g("div", {
584
448
  className: "flex items-center gap-3",
585
449
  children: [
586
- /* @__PURE__ */ k(b, {
450
+ /* @__PURE__ */ h(je, {
587
451
  size: 24,
588
452
  className: "text-text-primary"
589
453
  }),
590
- /* @__PURE__ */ A("div", { children: [/* @__PURE__ */ k("h1", {
454
+ /* @__PURE__ */ g("div", { children: [/* @__PURE__ */ h("h1", {
591
455
  className: "text-2xl font-bold text-text-primary",
592
456
  children: "Job Applications"
593
- }), /* @__PURE__ */ k("p", {
457
+ }), /* @__PURE__ */ h("p", {
594
458
  className: "text-sm text-text-secondary",
595
459
  children: "Careers form submissions"
596
460
  })] }),
597
- /* @__PURE__ */ k(e, {
461
+ /* @__PURE__ */ h(e, {
598
462
  variant: "secondary",
599
463
  className: "ml-2",
600
- children: ut
464
+ children: X
601
465
  })
602
466
  ]
603
- }), /* @__PURE__ */ A(t, {
604
- onClick: () => H(!0),
605
- children: [/* @__PURE__ */ k(ve, { size: 18 }), "Add Candidate"]
467
+ }), /* @__PURE__ */ g(t, {
468
+ onClick: () => F(!0),
469
+ children: [/* @__PURE__ */ h(Le, { size: 18 }), "Add Candidate"]
606
470
  })]
607
471
  }),
608
- Q.length > 0 && /* @__PURE__ */ A("div", {
609
- className: "flex items-center gap-2 mb-4 -mt-2",
610
- children: [
611
- /* @__PURE__ */ k(n, {
612
- checked: Q.length > 0 && Q.every((e) => Ve.has(e.id)),
613
- disabled: Q.length > M,
614
- onCheckedChange: (e) => B(e ? new Set(Q.map((e) => e.id)) : /* @__PURE__ */ new Set()),
615
- "aria-label": "Select all visible applications"
616
- }),
617
- /* @__PURE__ */ k("span", {
618
- className: "text-xs text-text-secondary",
619
- children: vt
620
- }),
621
- $.length > 0 && /* @__PURE__ */ k("button", {
622
- type: "button",
623
- onClick: () => B(/* @__PURE__ */ new Set()),
624
- className: "text-xs text-text-secondary hover:text-text-primary underline",
625
- children: "Clear"
626
- })
627
- ]
628
- }),
629
- $.length > 0 && /* @__PURE__ */ A("div", {
630
- className: "flex flex-col sm:flex-row sm:items-center justify-between gap-3 mb-4 p-3 rounded-lg border border-primary/30 bg-primary/5",
631
- children: [/* @__PURE__ */ A("p", {
632
- className: "text-sm text-text-primary font-medium",
472
+ Y.length > 0 && /* @__PURE__ */ g("div", {
473
+ className: "mb-4 -mt-2 space-y-2",
474
+ children: [/* @__PURE__ */ g("div", {
475
+ className: "flex flex-wrap items-center gap-2",
633
476
  children: [
634
- $.length,
635
- " candidate",
636
- $.length === 1 ? "" : "s",
637
- " ",
638
- "selected"
639
- ]
640
- }), /* @__PURE__ */ A("div", {
641
- className: "flex items-center gap-2",
642
- children: [
643
- !R && /* @__PURE__ */ k("p", {
644
- className: "text-xs text-text-secondary",
645
- children: "Filter to one job posting to enable bulk send"
477
+ /* @__PURE__ */ h(n, {
478
+ checked: Zt ? !0 : Xt > 0 && "indeterminate",
479
+ disabled: O || W,
480
+ onCheckedChange: (e) => D((t) => we(t, Z, e === !0)),
481
+ "aria-label": "Select all visible applications"
646
482
  }),
647
- ht && /* @__PURE__ */ k("p", {
648
- className: "text-xs text-status-error-text",
649
- children: "Some selected candidates do not belong to this posting"
483
+ Q > 0 ? /* @__PURE__ */ h(Oe, { selection: E }) : /* @__PURE__ */ g("span", {
484
+ className: "text-xs text-text-secondary",
485
+ children: [
486
+ "Select all ",
487
+ Y.length,
488
+ " visible applications"
489
+ ]
650
490
  }),
651
- gt && /* @__PURE__ */ A("p", {
652
- className: "text-xs text-status-error-text",
491
+ X > 0 && (E.mode !== "all" || E.excludedIds.size > 0) ? /* @__PURE__ */ g(t, {
492
+ type: "button",
493
+ variant: "ghost",
494
+ size: "sm",
495
+ onClick: () => void nn(),
496
+ disabled: O || W,
653
497
  children: [
654
- "Select no more than ",
655
- M,
656
- " candidates"
498
+ O ? /* @__PURE__ */ h(p, {
499
+ size: 14,
500
+ className: "animate-spin"
501
+ }) : null,
502
+ "Select all ",
503
+ X,
504
+ " matching applications"
657
505
  ]
506
+ }) : null,
507
+ Q > 0 ? /* @__PURE__ */ h("button", {
508
+ type: "button",
509
+ onClick: () => {
510
+ D(u()), ht([]), k(null);
511
+ },
512
+ disabled: O,
513
+ className: "text-xs text-text-secondary underline hover:text-text-primary disabled:cursor-not-allowed disabled:opacity-50",
514
+ children: "Clear"
515
+ }) : null
516
+ ]
517
+ }), _t ? /* @__PURE__ */ h("p", {
518
+ className: "text-sm text-status-error-text",
519
+ role: "alert",
520
+ children: _t
521
+ }) : null]
522
+ }),
523
+ Q > 0 && /* @__PURE__ */ g("div", {
524
+ className: "mb-4 flex flex-col justify-between gap-3 rounded-lg border border-primary/30 bg-primary/5 p-3 sm:flex-row sm:items-center",
525
+ children: [/* @__PURE__ */ h("div", { children: w ? Yt ? /* @__PURE__ */ h("p", {
526
+ className: "text-xs text-text-secondary",
527
+ children: "Bulk actions run sequential requests of no more than 100 candidates each."
528
+ }) : /* @__PURE__ */ h("p", {
529
+ className: "text-xs text-status-error-text",
530
+ children: "Some selected applications are no longer available in this posting. Clear and select again."
531
+ }) : /* @__PURE__ */ h("p", {
532
+ className: "text-xs text-text-secondary",
533
+ children: "Filter to one job posting to enable bulk candidate actions."
534
+ }) }), /* @__PURE__ */ g("div", {
535
+ className: "flex flex-wrap items-center gap-2",
536
+ children: [
537
+ /* @__PURE__ */ g(t, {
538
+ variant: "outline",
539
+ size: "sm",
540
+ disabled: !Qt,
541
+ onClick: () => void $("addRound"),
542
+ className: "gap-2",
543
+ children: [/* @__PURE__ */ h(Ve, { size: 14 }), "Add Selected to Round"]
658
544
  }),
659
- /* @__PURE__ */ A(t, {
545
+ /* @__PURE__ */ g(t, {
660
546
  variant: "outline",
661
547
  size: "sm",
662
- disabled: !_t,
663
- onClick: () => V("message"),
548
+ disabled: !Qt,
549
+ onClick: () => void $("message"),
664
550
  className: "gap-2",
665
- children: [/* @__PURE__ */ k(be, { size: 14 }), "Send Message"]
551
+ children: [/* @__PURE__ */ h(ze, { size: 14 }), "Send Message"]
666
552
  }),
667
- /* @__PURE__ */ A(t, {
553
+ /* @__PURE__ */ g(t, {
668
554
  variant: "outline",
669
555
  size: "sm",
670
- disabled: !_t,
671
- onClick: () => V("assignment"),
556
+ disabled: !Qt,
557
+ onClick: () => void $("assignment"),
672
558
  className: "gap-2",
673
- children: [/* @__PURE__ */ k(w, { size: 14 }), "Randomize & Send Assignment"]
559
+ children: [/* @__PURE__ */ h(Be, { size: 14 }), "Assign & Email Random Take-Home"]
674
560
  })
675
561
  ]
676
562
  })]
677
563
  }),
678
- /* @__PURE__ */ k(Te, {
564
+ /* @__PURE__ */ h(Ke, {
679
565
  className: "mb-6",
680
566
  children: "Candidates who apply through your careers pages show up here. Review resumes and move applicants through your hiring pipeline — from new submission to screening, interview and hire — so promising people get a timely response. Open an application to see the full profile and resume."
681
567
  }),
682
- /* @__PURE__ */ A("div", {
568
+ /* @__PURE__ */ g("div", {
683
569
  className: "flex flex-col sm:flex-row items-stretch sm:items-center gap-4 p-4 rounded-xl border border-border-seam bg-bg-surface mb-6",
684
570
  children: [
685
- /* @__PURE__ */ A("div", {
571
+ /* @__PURE__ */ g("div", {
686
572
  className: "relative flex-1",
687
- children: [/* @__PURE__ */ k(ye, {
573
+ children: [/* @__PURE__ */ h(Re, {
688
574
  size: 18,
689
575
  className: "absolute left-3 top-1/2 -translate-y-1/2 text-text-secondary"
690
- }), /* @__PURE__ */ k(o, {
576
+ }), /* @__PURE__ */ h(o, {
691
577
  type: "text",
692
578
  "aria-label": "Search applications",
693
579
  placeholder: "Search by name, email, or position...",
694
- value: u,
695
- onChange: (e) => me(e.target.value),
580
+ value: y,
581
+ onChange: (e) => at(e.target.value),
696
582
  className: "pl-10"
697
583
  })]
698
584
  }),
699
- /* @__PURE__ */ A("div", {
585
+ /* @__PURE__ */ g("div", {
700
586
  className: "flex items-center gap-1 p-1 rounded-lg border bg-bg-sunken/50",
701
- children: [/* @__PURE__ */ k(t, {
702
- variant: ze === "list" ? "secondary" : "ghost",
587
+ children: [/* @__PURE__ */ h(t, {
588
+ variant: ft === "list" ? "secondary" : "ghost",
703
589
  size: "sm",
704
- onClick: () => Be("list"),
590
+ onClick: () => pt("list"),
705
591
  className: "px-3",
706
592
  "aria-label": "Show applications as a list",
707
- children: /* @__PURE__ */ k(_e, { size: 18 })
708
- }), /* @__PURE__ */ k(t, {
709
- variant: ze === "kanban" ? "secondary" : "ghost",
593
+ children: /* @__PURE__ */ h(Fe, { size: 18 })
594
+ }), /* @__PURE__ */ h(t, {
595
+ variant: ft === "kanban" ? "secondary" : "ghost",
710
596
  size: "sm",
711
- onClick: () => Be("kanban"),
597
+ onClick: () => pt("kanban"),
712
598
  className: "px-3",
713
599
  "aria-label": "Show applications as a kanban board",
714
- children: /* @__PURE__ */ k(ge, { size: 18 })
600
+ children: /* @__PURE__ */ h(Pe, { size: 18 })
715
601
  })]
716
602
  }),
717
- /* @__PURE__ */ A(t, {
718
- variant: z ? "secondary" : "outline",
603
+ /* @__PURE__ */ g(t, {
604
+ variant: T ? "secondary" : "outline",
719
605
  size: "sm",
720
- onClick: () => Re(!z),
606
+ onClick: () => dt(!T),
721
607
  className: "gap-2",
722
608
  children: [
723
- /* @__PURE__ */ k(x, { size: 16 }),
609
+ /* @__PURE__ */ h(Ne, { size: 16 }),
724
610
  "Filters",
725
- /* @__PURE__ */ k(he, {
611
+ /* @__PURE__ */ h(Me, {
726
612
  size: 14,
727
- className: z ? "rotate-180 transition-transform" : "transition-transform"
613
+ className: T ? "rotate-180 transition-transform" : "transition-transform"
728
614
  })
729
615
  ]
730
616
  })
731
617
  ]
732
618
  }),
733
- z && /* @__PURE__ */ A("div", {
619
+ T && /* @__PURE__ */ g("div", {
734
620
  className: "mb-6 p-4 bg-bg-surface border border-border-seam rounded-lg space-y-4",
735
621
  children: [
736
- /* @__PURE__ */ A("div", { children: [/* @__PURE__ */ A("p", {
622
+ /* @__PURE__ */ g("div", { children: [/* @__PURE__ */ g("p", {
737
623
  className: "block text-xs font-medium text-text-secondary mb-1.5",
738
- children: ["Status ", /* @__PURE__ */ k("span", {
624
+ children: ["Status ", /* @__PURE__ */ h("span", {
739
625
  className: "font-normal",
740
626
  children: "(select any number)"
741
627
  })]
742
- }), /* @__PURE__ */ A("div", {
628
+ }), /* @__PURE__ */ g("div", {
743
629
  className: "flex flex-wrap gap-1.5",
744
- children: [g.map((e) => {
745
- let t = P.has(e);
746
- return /* @__PURE__ */ k("button", {
630
+ children: [_e.map((e) => {
631
+ let t = x.has(e);
632
+ return /* @__PURE__ */ h("button", {
747
633
  type: "button",
748
- onClick: () => Ne((t) => N(t, e)),
634
+ onClick: () => st((t) => Ye(t, e)),
749
635
  "aria-pressed": t,
750
- className: `px-2.5 py-1 rounded-full text-xs font-medium border transition-colors ${t ? `${m[e]} border-transparent` : "bg-bg-surface text-text-secondary border-border-seam hover:border-border-strong"}`,
751
- children: h[e]
636
+ className: `px-2.5 py-1 rounded-full text-xs font-medium border transition-colors ${t ? `${l[e]} border-transparent` : "bg-bg-surface text-text-secondary border-border-seam hover:border-border-strong"}`,
637
+ children: ge[e]
752
638
  }, e);
753
- }), P.size > 0 && /* @__PURE__ */ k("button", {
639
+ }), x.size > 0 && /* @__PURE__ */ h("button", {
754
640
  type: "button",
755
- onClick: () => Ne(/* @__PURE__ */ new Set()),
641
+ onClick: () => st(/* @__PURE__ */ new Set()),
756
642
  className: "px-2.5 py-1 rounded-full text-xs font-medium text-text-secondary hover:text-text-primary underline",
757
643
  children: "Clear"
758
644
  })]
759
645
  })] }),
760
- /* @__PURE__ */ A("div", { children: [/* @__PURE__ */ A("p", {
646
+ /* @__PURE__ */ g("div", { children: [/* @__PURE__ */ g("p", {
761
647
  className: "block text-xs font-medium text-text-secondary mb-1.5",
762
- children: ["Interview round stage ", /* @__PURE__ */ k("span", {
648
+ children: ["Interview round stage ", /* @__PURE__ */ h("span", {
763
649
  className: "font-normal",
764
650
  children: "(select any number)"
765
651
  })]
766
- }), /* @__PURE__ */ A("div", {
652
+ }), /* @__PURE__ */ g("div", {
767
653
  className: "flex flex-wrap gap-1.5",
768
- children: [p.map((e) => {
769
- let t = I.has(e), n = fe[e];
770
- return /* @__PURE__ */ k("button", {
654
+ children: [he.map((e) => {
655
+ let t = S.has(e), n = me[e];
656
+ return /* @__PURE__ */ h("button", {
771
657
  type: "button",
772
- onClick: () => Fe((t) => N(t, e)),
658
+ onClick: () => ct((t) => Ye(t, e)),
773
659
  "aria-pressed": t,
774
660
  className: `px-2.5 py-1 rounded-full text-xs font-medium border transition-colors ${t ? `${n.className} border-transparent` : "bg-bg-surface text-text-secondary border-border-seam hover:border-border-strong"}`,
775
661
  children: n.label
776
662
  }, e);
777
- }), I.size > 0 && /* @__PURE__ */ k("button", {
663
+ }), S.size > 0 && /* @__PURE__ */ h("button", {
778
664
  type: "button",
779
- onClick: () => Fe(/* @__PURE__ */ new Set()),
665
+ onClick: () => ct(/* @__PURE__ */ new Set()),
780
666
  className: "px-2.5 py-1 rounded-full text-xs font-medium text-text-secondary hover:text-text-primary underline",
781
667
  children: "Clear"
782
668
  })]
783
669
  })] }),
784
- /* @__PURE__ */ A("div", {
670
+ /* @__PURE__ */ g("div", {
785
671
  className: "grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-4",
786
- children: [/* @__PURE__ */ A("div", { children: [/* @__PURE__ */ k("label", {
672
+ children: [/* @__PURE__ */ g("div", { children: [/* @__PURE__ */ h("label", {
787
673
  htmlFor: "job-app-product-filter",
788
674
  className: "block text-xs font-medium text-text-secondary mb-1",
789
675
  children: "Product"
790
- }), /* @__PURE__ */ A("select", {
676
+ }), /* @__PURE__ */ g("select", {
791
677
  id: "job-app-product-filter",
792
- value: L,
793
- onChange: (e) => Ie(e.target.value),
678
+ value: C,
679
+ onChange: (e) => lt(e.target.value),
794
680
  className: "w-full px-3 py-2 bg-surface border border-default rounded-lg text-sm text-text-primary focus:outline-none focus:ring-2 focus:ring-accent/50",
795
- children: [/* @__PURE__ */ k("option", {
681
+ children: [/* @__PURE__ */ h("option", {
796
682
  value: "",
797
683
  children: "All products"
798
- }), yt.map((e) => /* @__PURE__ */ k("option", {
684
+ }), an.map((e) => /* @__PURE__ */ h("option", {
799
685
  value: e,
800
- children: Y[e] || e
686
+ children: H[e] || e
801
687
  }, e))]
802
- })] }), /* @__PURE__ */ A("div", { children: [/* @__PURE__ */ k("label", {
688
+ })] }), /* @__PURE__ */ g("div", { children: [/* @__PURE__ */ h("label", {
803
689
  htmlFor: "job-app-posting-filter",
804
690
  className: "block text-xs font-medium text-text-secondary mb-1",
805
691
  children: "Job Posting"
806
- }), /* @__PURE__ */ A("select", {
692
+ }), /* @__PURE__ */ g("select", {
807
693
  id: "job-app-posting-filter",
808
- value: R,
809
- onChange: (e) => Le(e.target.value),
810
- disabled: at,
694
+ value: w,
695
+ onChange: (e) => ut(e.target.value),
696
+ disabled: Bt,
811
697
  className: "w-full px-3 py-2 bg-surface border border-default rounded-lg text-sm text-text-primary focus:outline-none focus:ring-2 focus:ring-accent/50 disabled:opacity-50",
812
- children: [/* @__PURE__ */ k("option", {
698
+ children: [/* @__PURE__ */ h("option", {
813
699
  value: "",
814
700
  children: "All postings"
815
- }), (it?.jobPostings?.items ?? []).map((e) => /* @__PURE__ */ k("option", {
701
+ }), (zt?.jobPostings?.items ?? []).map((e) => /* @__PURE__ */ h("option", {
816
702
  value: e.id,
817
703
  children: e.title
818
704
  }, e.id))]
@@ -820,261 +706,261 @@ function I() {
820
706
  })
821
707
  ]
822
708
  }),
823
- Q.length === 0 ? /* @__PURE__ */ k(we, {
709
+ Y.length === 0 ? /* @__PURE__ */ h(Ge, {
824
710
  illustration: "empty-people",
825
711
  title: "No applications yet",
826
712
  description: "Job applications from your careers pages will appear here."
827
- }) : /* @__PURE__ */ A(O, { children: [ze === "list" ? /* @__PURE__ */ k("div", {
713
+ }) : /* @__PURE__ */ g(m, { children: [ft === "list" ? /* @__PURE__ */ h("div", {
828
714
  className: "space-y-3",
829
- children: Q.map((e) => Dt(e))
830
- }) : /* @__PURE__ */ k("div", {
715
+ children: Y.map((e) => pn(e))
716
+ }) : /* @__PURE__ */ h("div", {
831
717
  className: "flex gap-4 overflow-x-auto pb-4",
832
- children: g.map((t) => {
833
- let n = Et[t] ?? [];
834
- return /* @__PURE__ */ A("div", {
718
+ children: _e.map((t) => {
719
+ let n = fn[t] ?? [];
720
+ return /* @__PURE__ */ g("div", {
835
721
  className: "flex flex-col gap-3 w-[280px] flex-shrink-0 max-h-[calc(100vh-280px)]",
836
- children: [/* @__PURE__ */ A("div", {
722
+ children: [/* @__PURE__ */ g("div", {
837
723
  className: "flex items-center justify-between px-1",
838
- children: [/* @__PURE__ */ k("h3", {
724
+ children: [/* @__PURE__ */ h("h3", {
839
725
  className: "text-sm font-semibold text-text-primary",
840
- children: h[t]
841
- }), /* @__PURE__ */ k(e, {
726
+ children: ge[t]
727
+ }), /* @__PURE__ */ h(e, {
842
728
  variant: "secondary",
843
- className: m[t],
729
+ className: l[t],
844
730
  children: n.length
845
731
  })]
846
- }), /* @__PURE__ */ A("div", {
732
+ }), /* @__PURE__ */ g("div", {
847
733
  className: "flex flex-col gap-3 overflow-y-auto pr-1",
848
- children: [n.length === 0 && /* @__PURE__ */ k("div", {
734
+ children: [n.length === 0 && /* @__PURE__ */ h("div", {
849
735
  className: "text-center py-6 px-3 rounded-lg border border-dashed border-border-seam bg-bg-sunken/30",
850
- children: /* @__PURE__ */ k("p", {
736
+ children: /* @__PURE__ */ h("p", {
851
737
  className: "text-xs text-text-secondary",
852
738
  children: "No applications"
853
739
  })
854
- }), n.map((e) => Dt(e, !0))]
740
+ }), n.map((e) => pn(e, !0))]
855
741
  })]
856
742
  }, t);
857
743
  })
858
- }), dt && /* @__PURE__ */ k("div", {
744
+ }), Gt && /* @__PURE__ */ h("div", {
859
745
  className: "flex justify-center mt-6",
860
- children: /* @__PURE__ */ A(t, {
746
+ children: /* @__PURE__ */ g(t, {
861
747
  variant: "outline",
862
748
  size: "sm",
863
- onClick: () => void xt(),
864
- disabled: Je,
749
+ onClick: () => void sn(),
750
+ disabled: Ot,
865
751
  className: "gap-2",
866
- children: [Je ? /* @__PURE__ */ k(S, {
752
+ children: [Ot ? /* @__PURE__ */ h(p, {
867
753
  size: 14,
868
754
  className: "animate-spin"
869
755
  }) : null, "Load more"]
870
756
  })
871
757
  })] }),
872
- /* @__PURE__ */ k(r, {
873
- open: Ue,
758
+ /* @__PURE__ */ h(r, {
759
+ open: Ct,
874
760
  onOpenChange: (e) => {
875
- H(e), e || St();
761
+ F(e), e || cn();
876
762
  },
877
- children: /* @__PURE__ */ A(i, {
763
+ children: /* @__PURE__ */ g(i, {
878
764
  className: "sm:max-w-2xl max-h-[90vh] overflow-y-auto",
879
765
  children: [
880
- /* @__PURE__ */ A(te, { children: [/* @__PURE__ */ k(ne, { children: "Add Candidate" }), /* @__PURE__ */ k(a, { children: "Manually add a candidate to the hiring pipeline. Resumes are optional and can be attached as PDF, DOC, or DOCX (max 10 MB)." })] }),
881
- /* @__PURE__ */ A("form", {
766
+ /* @__PURE__ */ g(te, { children: [/* @__PURE__ */ h(ne, { children: "Add Candidate" }), /* @__PURE__ */ h(a, { children: "Manually add a candidate to the hiring pipeline. Resumes are optional and can be attached as PDF, DOC, or DOCX (max 10 MB)." })] }),
767
+ /* @__PURE__ */ g("form", {
882
768
  id: "add-candidate-form",
883
- onSubmit: Tt,
769
+ onSubmit: dn,
884
770
  className: "space-y-4",
885
771
  children: [
886
- /* @__PURE__ */ A("div", {
772
+ /* @__PURE__ */ g("div", {
887
773
  className: "grid grid-cols-1 sm:grid-cols-2 gap-4",
888
- children: [/* @__PURE__ */ A("div", {
774
+ children: [/* @__PURE__ */ g("div", {
889
775
  className: "space-y-1.5",
890
776
  children: [
891
- /* @__PURE__ */ A(s, {
777
+ /* @__PURE__ */ g(s, {
892
778
  htmlFor: "candidate-name",
893
- children: ["Name ", /* @__PURE__ */ k("span", {
779
+ children: ["Name ", /* @__PURE__ */ h("span", {
894
780
  className: "text-status-error-text",
895
781
  children: "*"
896
782
  })]
897
783
  }),
898
- /* @__PURE__ */ k(o, {
784
+ /* @__PURE__ */ h(o, {
899
785
  id: "candidate-name",
900
- value: U.name,
901
- onChange: (e) => W((t) => ({
786
+ value: I.name,
787
+ onChange: (e) => L((t) => ({
902
788
  ...t,
903
789
  name: e.target.value
904
790
  })),
905
791
  placeholder: "Full name",
906
- "aria-invalid": !!G.name
792
+ "aria-invalid": !!R.name
907
793
  }),
908
- G.name && /* @__PURE__ */ k("p", {
794
+ R.name && /* @__PURE__ */ h("p", {
909
795
  className: "text-xs text-status-error-text",
910
- children: G.name
796
+ children: R.name
911
797
  })
912
798
  ]
913
- }), /* @__PURE__ */ A("div", {
799
+ }), /* @__PURE__ */ g("div", {
914
800
  className: "space-y-1.5",
915
801
  children: [
916
- /* @__PURE__ */ A(s, {
802
+ /* @__PURE__ */ g(s, {
917
803
  htmlFor: "candidate-email",
918
- children: ["Email ", /* @__PURE__ */ k("span", {
804
+ children: ["Email ", /* @__PURE__ */ h("span", {
919
805
  className: "text-status-error-text",
920
806
  children: "*"
921
807
  })]
922
808
  }),
923
- /* @__PURE__ */ k(o, {
809
+ /* @__PURE__ */ h(o, {
924
810
  id: "candidate-email",
925
811
  type: "email",
926
- value: U.email,
927
- onChange: (e) => W((t) => ({
812
+ value: I.email,
813
+ onChange: (e) => L((t) => ({
928
814
  ...t,
929
815
  email: e.target.value
930
816
  })),
931
817
  placeholder: "email@example.com",
932
- "aria-invalid": !!G.email
818
+ "aria-invalid": !!R.email
933
819
  }),
934
- G.email && /* @__PURE__ */ k("p", {
820
+ R.email && /* @__PURE__ */ h("p", {
935
821
  className: "text-xs text-status-error-text",
936
- children: G.email
822
+ children: R.email
937
823
  })
938
824
  ]
939
825
  })]
940
826
  }),
941
- /* @__PURE__ */ A("div", {
827
+ /* @__PURE__ */ g("div", {
942
828
  className: "grid grid-cols-1 sm:grid-cols-2 gap-4",
943
- children: [/* @__PURE__ */ A("div", {
829
+ children: [/* @__PURE__ */ g("div", {
944
830
  className: "space-y-1.5",
945
- children: [/* @__PURE__ */ k(s, {
831
+ children: [/* @__PURE__ */ h(s, {
946
832
  htmlFor: "candidate-phone",
947
833
  children: "Phone"
948
- }), /* @__PURE__ */ k(o, {
834
+ }), /* @__PURE__ */ h(o, {
949
835
  id: "candidate-phone",
950
- value: U.phone,
951
- onChange: (e) => W((t) => ({
836
+ value: I.phone,
837
+ onChange: (e) => L((t) => ({
952
838
  ...t,
953
839
  phone: e.target.value
954
840
  })),
955
841
  placeholder: "+91 98765 43210"
956
842
  })]
957
- }), /* @__PURE__ */ A("div", {
843
+ }), /* @__PURE__ */ g("div", {
958
844
  className: "space-y-1.5",
959
845
  children: [
960
- /* @__PURE__ */ A(s, {
846
+ /* @__PURE__ */ g(s, {
961
847
  htmlFor: "candidate-source",
962
- children: ["Source ", /* @__PURE__ */ k("span", {
848
+ children: ["Source ", /* @__PURE__ */ h("span", {
963
849
  className: "text-status-error-text",
964
850
  children: "*"
965
851
  })]
966
852
  }),
967
- /* @__PURE__ */ k(o, {
853
+ /* @__PURE__ */ h(o, {
968
854
  id: "candidate-source",
969
855
  list: "candidate-source-suggestions",
970
- value: U.source,
971
- onChange: (e) => W((t) => ({
856
+ value: I.source,
857
+ onChange: (e) => L((t) => ({
972
858
  ...t,
973
859
  source: e.target.value
974
860
  })),
975
861
  placeholder: "e.g. LinkedIn",
976
- "aria-invalid": !!G.source
862
+ "aria-invalid": !!R.source
977
863
  }),
978
- /* @__PURE__ */ k("datalist", {
864
+ /* @__PURE__ */ h("datalist", {
979
865
  id: "candidate-source-suggestions",
980
- children: De.map((e) => /* @__PURE__ */ k("option", { value: e }, e))
866
+ children: Qe.map((e) => /* @__PURE__ */ h("option", { value: e }, e))
981
867
  }),
982
- G.source && /* @__PURE__ */ k("p", {
868
+ R.source && /* @__PURE__ */ h("p", {
983
869
  className: "text-xs text-status-error-text",
984
- children: G.source
870
+ children: R.source
985
871
  })
986
872
  ]
987
873
  })]
988
874
  }),
989
- /* @__PURE__ */ A("div", {
875
+ /* @__PURE__ */ g("div", {
990
876
  className: "grid grid-cols-1 sm:grid-cols-2 gap-4",
991
- children: [/* @__PURE__ */ A("div", {
877
+ children: [/* @__PURE__ */ g("div", {
992
878
  className: "space-y-1.5",
993
879
  children: [
994
- /* @__PURE__ */ k(s, {
880
+ /* @__PURE__ */ h(s, {
995
881
  htmlFor: "candidate-job-posting",
996
882
  children: "Job Posting"
997
883
  }),
998
- /* @__PURE__ */ A(re, {
999
- value: U.jobPostingId,
1000
- onValueChange: (e) => W((t) => ({
884
+ /* @__PURE__ */ g(re, {
885
+ value: I.jobPostingId,
886
+ onValueChange: (e) => L((t) => ({
1001
887
  ...t,
1002
888
  jobPostingId: e
1003
889
  })),
1004
- disabled: at,
1005
- children: [/* @__PURE__ */ k(oe, {
890
+ disabled: Bt,
891
+ children: [/* @__PURE__ */ h(oe, {
1006
892
  id: "candidate-job-posting",
1007
- children: /* @__PURE__ */ k(se, { placeholder: "Select an open posting" })
1008
- }), /* @__PURE__ */ A(ie, { children: [/* @__PURE__ */ k(ae, {
1009
- value: F,
893
+ children: /* @__PURE__ */ h(se, { placeholder: "Select an open posting" })
894
+ }), /* @__PURE__ */ g(ie, { children: [/* @__PURE__ */ h(ae, {
895
+ value: v,
1010
896
  children: "No posting (manual entry)"
1011
- }), st.map((e) => /* @__PURE__ */ k(ae, {
897
+ }), Ht.map((e) => /* @__PURE__ */ h(ae, {
1012
898
  value: e.id,
1013
899
  children: e.title
1014
900
  }, e.id))] })]
1015
901
  }),
1016
- /* @__PURE__ */ k("p", {
902
+ /* @__PURE__ */ h("p", {
1017
903
  className: "text-xs text-text-secondary",
1018
904
  children: "Position and department are derived from the selected posting."
1019
905
  })
1020
906
  ]
1021
- }), /* @__PURE__ */ A("div", {
907
+ }), /* @__PURE__ */ g("div", {
1022
908
  className: "space-y-1.5",
1023
909
  children: [
1024
- /* @__PURE__ */ A(s, {
910
+ /* @__PURE__ */ g(s, {
1025
911
  htmlFor: "candidate-position",
1026
912
  children: [
1027
913
  "Position",
1028
914
  " ",
1029
- U.jobPostingId === F && /* @__PURE__ */ k("span", {
915
+ I.jobPostingId === v && /* @__PURE__ */ h("span", {
1030
916
  className: "text-status-error-text",
1031
917
  children: "*"
1032
918
  })
1033
919
  ]
1034
920
  }),
1035
- /* @__PURE__ */ k(o, {
921
+ /* @__PURE__ */ h(o, {
1036
922
  id: "candidate-position",
1037
- value: U.position,
1038
- onChange: (e) => W((t) => ({
923
+ value: I.position,
924
+ onChange: (e) => L((t) => ({
1039
925
  ...t,
1040
926
  position: e.target.value
1041
927
  })),
1042
928
  placeholder: "e.g. Product Engineer",
1043
- disabled: U.jobPostingId !== F,
1044
- "aria-invalid": !!G.position
929
+ disabled: I.jobPostingId !== v,
930
+ "aria-invalid": !!R.position
1045
931
  }),
1046
- G.position && /* @__PURE__ */ k("p", {
932
+ R.position && /* @__PURE__ */ h("p", {
1047
933
  className: "text-xs text-status-error-text",
1048
- children: G.position
934
+ children: R.position
1049
935
  })
1050
936
  ]
1051
937
  })]
1052
938
  }),
1053
- /* @__PURE__ */ A("div", {
939
+ /* @__PURE__ */ g("div", {
1054
940
  className: "grid grid-cols-1 sm:grid-cols-2 gap-4",
1055
- children: [/* @__PURE__ */ A("div", {
941
+ children: [/* @__PURE__ */ g("div", {
1056
942
  className: "space-y-1.5",
1057
- children: [/* @__PURE__ */ k(s, {
943
+ children: [/* @__PURE__ */ h(s, {
1058
944
  htmlFor: "candidate-linkedin",
1059
945
  children: "LinkedIn"
1060
- }), /* @__PURE__ */ k(o, {
946
+ }), /* @__PURE__ */ h(o, {
1061
947
  id: "candidate-linkedin",
1062
- value: U.linkedin,
1063
- onChange: (e) => W((t) => ({
948
+ value: I.linkedin,
949
+ onChange: (e) => L((t) => ({
1064
950
  ...t,
1065
951
  linkedin: e.target.value
1066
952
  })),
1067
953
  placeholder: "https://linkedin.com/in/…"
1068
954
  })]
1069
- }), /* @__PURE__ */ A("div", {
955
+ }), /* @__PURE__ */ g("div", {
1070
956
  className: "space-y-1.5",
1071
- children: [/* @__PURE__ */ k(s, {
957
+ children: [/* @__PURE__ */ h(s, {
1072
958
  htmlFor: "candidate-portfolio",
1073
959
  children: "Portfolio"
1074
- }), /* @__PURE__ */ k(o, {
960
+ }), /* @__PURE__ */ h(o, {
1075
961
  id: "candidate-portfolio",
1076
- value: U.portfolio,
1077
- onChange: (e) => W((t) => ({
962
+ value: I.portfolio,
963
+ onChange: (e) => L((t) => ({
1078
964
  ...t,
1079
965
  portfolio: e.target.value
1080
966
  })),
@@ -1082,15 +968,15 @@ function I() {
1082
968
  })]
1083
969
  })]
1084
970
  }),
1085
- /* @__PURE__ */ A("div", {
971
+ /* @__PURE__ */ g("div", {
1086
972
  className: "space-y-1.5",
1087
- children: [/* @__PURE__ */ k(s, {
973
+ children: [/* @__PURE__ */ h(s, {
1088
974
  htmlFor: "candidate-cover-letter",
1089
975
  children: "Cover Letter"
1090
- }), /* @__PURE__ */ k(ce, {
976
+ }), /* @__PURE__ */ h(ce, {
1091
977
  id: "candidate-cover-letter",
1092
- value: U.coverLetter,
1093
- onChange: (e) => W((t) => ({
978
+ value: I.coverLetter,
979
+ onChange: (e) => L((t) => ({
1094
980
  ...t,
1095
981
  coverLetter: e.target.value
1096
982
  })),
@@ -1098,51 +984,51 @@ function I() {
1098
984
  rows: 4
1099
985
  })]
1100
986
  }),
1101
- /* @__PURE__ */ A("div", {
987
+ /* @__PURE__ */ g("div", {
1102
988
  className: "space-y-1.5",
1103
989
  children: [
1104
- /* @__PURE__ */ k(s, {
990
+ /* @__PURE__ */ h(s, {
1105
991
  htmlFor: "candidate-resume",
1106
992
  children: "Resume (optional)"
1107
993
  }),
1108
- /* @__PURE__ */ k(o, {
994
+ /* @__PURE__ */ h(o, {
1109
995
  id: "candidate-resume",
1110
996
  type: "file",
1111
- accept: ke,
1112
- onChange: Ct
997
+ accept: et,
998
+ onChange: ln
1113
999
  }),
1114
- /* @__PURE__ */ A("p", {
1000
+ /* @__PURE__ */ g("p", {
1115
1001
  className: "text-xs text-text-secondary flex items-center gap-1",
1116
1002
  children: [
1117
- /* @__PURE__ */ k(C, { size: 11 }),
1003
+ /* @__PURE__ */ h(Ie, { size: 11 }),
1118
1004
  "PDF, DOC, or DOCX up to 10 MB.",
1119
- K ? ` Selected: ${K.name}` : ""
1005
+ z ? ` Selected: ${z.name}` : ""
1120
1006
  ]
1121
1007
  }),
1122
- Ge && /* @__PURE__ */ k("p", {
1008
+ Tt && /* @__PURE__ */ h("p", {
1123
1009
  className: "text-xs text-status-error-text",
1124
- children: Ge
1010
+ children: Tt
1125
1011
  })
1126
1012
  ]
1127
1013
  })
1128
1014
  ]
1129
1015
  }),
1130
- /* @__PURE__ */ A(ee, { children: [/* @__PURE__ */ k(t, {
1016
+ /* @__PURE__ */ g(ee, { children: [/* @__PURE__ */ h(t, {
1131
1017
  type: "button",
1132
1018
  variant: "outline",
1133
1019
  onClick: () => {
1134
- H(!1), St();
1020
+ F(!1), cn();
1135
1021
  },
1136
- disabled: Ke,
1022
+ disabled: Et,
1137
1023
  children: "Cancel"
1138
- }), /* @__PURE__ */ k(t, {
1024
+ }), /* @__PURE__ */ h(t, {
1139
1025
  type: "submit",
1140
1026
  form: "add-candidate-form",
1141
- disabled: Ke,
1142
- children: Ke ? /* @__PURE__ */ A(O, { children: [/* @__PURE__ */ k(S, {
1027
+ disabled: Et,
1028
+ children: Et ? /* @__PURE__ */ g(m, { children: [/* @__PURE__ */ h(p, {
1143
1029
  size: 16,
1144
1030
  className: "animate-spin mr-2"
1145
- }), "Adding…"] }) : /* @__PURE__ */ A(O, { children: [/* @__PURE__ */ k(E, {
1031
+ }), "Adding…"] }) : /* @__PURE__ */ g(m, { children: [/* @__PURE__ */ h(Ve, {
1146
1032
  size: 16,
1147
1033
  className: "mr-2"
1148
1034
  }), "Add Candidate"] })
@@ -1150,17 +1036,32 @@ function I() {
1150
1036
  ]
1151
1037
  })
1152
1038
  }),
1153
- He && /* @__PURE__ */ k(Pe, {
1154
- mode: He,
1155
- open: !!He,
1156
- onClose: () => V(null),
1157
- applications: mt,
1158
- jobPostingId: R
1159
- })
1039
+ A === "message" || A === "assignment" ? /* @__PURE__ */ h(De, {
1040
+ mode: A,
1041
+ open: !0,
1042
+ onClose: rn,
1043
+ onOpenAddRound: () => void $("addRound"),
1044
+ targets: yt,
1045
+ selection: bt,
1046
+ jobPostingId: w,
1047
+ previewLoading: M,
1048
+ previewError: St,
1049
+ refreshTargets: (e) => tn(q, e)
1050
+ }) : null,
1051
+ A === "addRound" ? /* @__PURE__ */ h(Ee, {
1052
+ open: !0,
1053
+ onClose: rn,
1054
+ targets: yt,
1055
+ selection: bt,
1056
+ jobPostingId: w,
1057
+ previewLoading: M,
1058
+ previewError: St,
1059
+ refreshTargets: (e) => tn(q, e)
1060
+ }) : null
1160
1061
  ]
1161
1062
  });
1162
1063
  }
1163
1064
  //#endregion
1164
- export { I as JobApplicationsPage };
1065
+ export { it as JobApplicationsPage };
1165
1066
 
1166
1067
  //# sourceMappingURL=JobApplicationsPage.js.map