@hadoku/jobplatform 3.42.66 → 3.42.68

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 (38) hide show
  1. package/dist/App.d.ts.map +1 -1
  2. package/dist/{ApplicationTracking-BhpParbe.js → ApplicationTracking-CoME_aIo.js} +2 -2
  3. package/dist/{ApplicationsList-DDjncd7P.js → ApplicationsList-UHSm2cP2.js} +1 -1
  4. package/dist/ClipboardPalette-COZkKuN-.js +59 -0
  5. package/dist/InsightsPage-DSJBQopJ.js +181 -0
  6. package/dist/{PacketDetail-KOXrbMqc.js → PacketDetail-DUzfgMQa.js} +1 -1
  7. package/dist/{PacketsList-llRBP10u.js → PacketsList-Dv7np_9D.js} +1 -1
  8. package/dist/PipelineBoard-BeQEH8-g.js +306 -0
  9. package/dist/ProfilePage-DFG6yzMx.js +370 -0
  10. package/dist/api/http.d.ts +11 -0
  11. package/dist/api/http.d.ts.map +1 -0
  12. package/dist/api/jobs.d.ts +5 -0
  13. package/dist/api/jobs.d.ts.map +1 -1
  14. package/dist/api/me.d.ts +88 -0
  15. package/dist/api/me.d.ts.map +1 -0
  16. package/dist/api/pipeline.d.ts +22 -2
  17. package/dist/api/pipeline.d.ts.map +1 -1
  18. package/dist/components/ClipboardPalette.d.ts +10 -0
  19. package/dist/components/ClipboardPalette.d.ts.map +1 -0
  20. package/dist/components/ImportPosting.d.ts +13 -0
  21. package/dist/components/ImportPosting.d.ts.map +1 -0
  22. package/dist/components/InsightsPage.d.ts +9 -0
  23. package/dist/components/InsightsPage.d.ts.map +1 -0
  24. package/dist/components/JobDrawer.d.ts +3 -1
  25. package/dist/components/JobDrawer.d.ts.map +1 -1
  26. package/dist/components/JobsList.d.ts.map +1 -1
  27. package/dist/components/NearFilter.d.ts +20 -0
  28. package/dist/components/NearFilter.d.ts.map +1 -0
  29. package/dist/components/PipelineBoard.d.ts.map +1 -1
  30. package/dist/components/ProfilePage.d.ts +9 -0
  31. package/dist/components/ProfilePage.d.ts.map +1 -0
  32. package/dist/{entry-CFBqMGn5.js → entry-D7QDbdxu.js} +1535 -1317
  33. package/dist/index.js +1 -1
  34. package/dist/pipeline-Es-b-u_8.js +40 -0
  35. package/dist/style.css +1 -1
  36. package/package.json +2 -2
  37. package/dist/PipelineBoard-BLmNwNaq.js +0 -208
  38. package/dist/pipeline-C2hWQq1c.js +0 -47
package/dist/App.d.ts.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"App.d.ts","sourceRoot":"","sources":["../src/App.tsx"],"names":[],"mappings":"AAiCA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAA;AAkC/C;;;;;GAKG;AACH,MAAM,CAAC,OAAO,UAAU,GAAG,CAAC,KAAK,GAAE,gBAAqB,2CAOvD"}
1
+ {"version":3,"file":"App.d.ts","sourceRoot":"","sources":["../src/App.tsx"],"names":[],"mappings":"AAiCA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAA;AA2C/C;;;;;GAKG;AACH,MAAM,CAAC,OAAO,UAAU,GAAG,CAAC,KAAK,GAAE,gBAAqB,2CAOvD"}
@@ -1,7 +1,7 @@
1
1
  import { jsxs as i, Fragment as G, jsx as a } from "react/jsx-runtime";
2
2
  import { useRef as K, useState as l, useEffect as Q } from "react";
3
- import { u as V, i as h, J as X } from "./entry-CFBqMGn5.js";
4
- import { l as I, s as ee, a as te, d as ae } from "./pipeline-C2hWQq1c.js";
3
+ import { u as V, i as h, J as X } from "./entry-D7QDbdxu.js";
4
+ import { l as I, s as ee, a as te, d as ae } from "./pipeline-Es-b-u_8.js";
5
5
  const ne = {
6
6
  notes: null,
7
7
  priority: null,
@@ -1,6 +1,6 @@
1
1
  import { jsxs as i, jsx as e, Fragment as K } from "react/jsx-runtime";
2
2
  import { useState as _, useMemo as W, useCallback as Q, useEffect as V } from "react";
3
- import { l as M, a as J, J as S, s as U, f as X, b as Z, u as ee, c as ne, d as te } from "./entry-CFBqMGn5.js";
3
+ import { l as M, a as J, J as S, s as U, f as X, b as Z, u as ee, c as ne, d as te } from "./entry-D7QDbdxu.js";
4
4
  function F(r) {
5
5
  return r.replace(/\*/g, " ").toLowerCase().replace(/n't\b/g, " not ").replace(/[^a-z0-9]+/g, " ").trim();
6
6
  }
@@ -0,0 +1,59 @@
1
+ import { jsx as a, jsxs as d } from "react/jsx-runtime";
2
+ import { useState as s, useRef as f, useEffect as h } from "react";
3
+ import { u as _, k as j } from "./entry-D7QDbdxu.js";
4
+ function y(e) {
5
+ const t = e.work_experience?.find((i) => i.current) ?? e.work_experience?.[0];
6
+ return [
7
+ ["Name", e.name],
8
+ ["Email", e.email],
9
+ ["Phone", e.phone],
10
+ ["Location", e.location],
11
+ ["LinkedIn", e.linkedin],
12
+ ["GitHub", e.github],
13
+ ["Portfolio", e.portfolio],
14
+ ["Current role", t ? [t.title, t.company].filter(Boolean).join(" at ") : ""],
15
+ ["Headline", e.headline],
16
+ ["Summary", e.summary]
17
+ ].flatMap(([i, o]) => o?.trim() ? [{ label: i, value: o.trim() }] : []);
18
+ }
19
+ function x({ auth: e }) {
20
+ const { data: t, error: p } = _("applicant-profile", () => j(e)), [i, o] = s(null), [u, c] = s(!1), n = f(null);
21
+ if (h(
22
+ () => () => {
23
+ n.current && clearTimeout(n.current);
24
+ },
25
+ []
26
+ ), p || t === void 0) return null;
27
+ if (t === null)
28
+ return /* @__PURE__ */ a("p", { className: "jp-muted jp-palette__empty", children: "Fill in the Profile tab and your contact details appear here as one-click copies." });
29
+ const m = (r, l) => {
30
+ if (!navigator.clipboard) {
31
+ c(!0);
32
+ return;
33
+ }
34
+ navigator.clipboard.writeText(l).then(
35
+ () => {
36
+ c(!1), o(r), n.current && clearTimeout(n.current), n.current = setTimeout(() => o(null), 1500);
37
+ },
38
+ () => c(!0)
39
+ );
40
+ };
41
+ return /* @__PURE__ */ d("div", { className: "jp-palette", "data-testid": "clipboard-palette", children: [
42
+ /* @__PURE__ */ a("span", { className: "jp-palette__label", children: "Quick copy" }),
43
+ /* @__PURE__ */ a("div", { className: "jp-palette__chips", children: y(t).map(({ label: r, value: l }) => /* @__PURE__ */ a(
44
+ "button",
45
+ {
46
+ type: "button",
47
+ className: `jp-palette__chip${i === r ? " jp-palette__chip--copied" : ""}`,
48
+ title: l,
49
+ onClick: () => m(r, l),
50
+ children: i === r ? "Copied ✓" : r
51
+ },
52
+ r
53
+ )) }),
54
+ u && /* @__PURE__ */ a("p", { className: "jp-error", children: "The browser refused the clipboard — copy from the Profile tab." })
55
+ ] });
56
+ }
57
+ export {
58
+ x as ClipboardPalette
59
+ };
@@ -0,0 +1,181 @@
1
+ import { jsx as e, jsxs as n } from "react/jsx-runtime";
2
+ import { u as _, J as j, j as g } from "./entry-D7QDbdxu.js";
3
+ const o = (s) => s === null ? "—" : `${Math.round(s * 100)}%`;
4
+ function h(s) {
5
+ return (/* @__PURE__ */ new Date(`${s}T00:00:00Z`)).toLocaleDateString(void 0, { month: "short", day: "numeric", timeZone: "UTC" });
6
+ }
7
+ function d({ label: s, value: i, detail: c }) {
8
+ return /* @__PURE__ */ n("div", { className: "jp-ins__stat", children: [
9
+ /* @__PURE__ */ e("span", { className: "jp-ins__stat-label", children: s }),
10
+ /* @__PURE__ */ e("span", { className: "jp-ins__stat-value", children: i }),
11
+ /* @__PURE__ */ e("span", { className: "jp-ins__stat-detail", children: c })
12
+ ] });
13
+ }
14
+ function m({
15
+ rows: s,
16
+ label: i
17
+ }) {
18
+ const c = Math.max(1, ...s.map((l) => l.value));
19
+ return /* @__PURE__ */ e("ul", { className: "jp-ins__bars", "aria-label": i, children: s.map((l) => /* @__PURE__ */ n("li", { className: "jp-ins__bar-row", title: `${l.name}: ${l.value}`, children: [
20
+ /* @__PURE__ */ n("span", { className: "jp-ins__bar-name", children: [
21
+ l.name,
22
+ l.note && /* @__PURE__ */ n("span", { className: "jp-ins__bar-note", children: [
23
+ " ",
24
+ l.note
25
+ ] })
26
+ ] }),
27
+ /* @__PURE__ */ e("span", { className: "jp-ins__bar-track", children: /* @__PURE__ */ e(
28
+ "span",
29
+ {
30
+ className: `jp-ins__bar${l.marked ? " jp-ins__bar--marked" : ""}`,
31
+ style: { width: `${l.value / c * 100}%` }
32
+ }
33
+ ) }),
34
+ /* @__PURE__ */ e("span", { className: "jp-ins__bar-value", children: l.value })
35
+ ] }, l.name)) });
36
+ }
37
+ function k({ weeks: s }) {
38
+ const i = Math.max(1, ...s.map((a) => a.count)), c = s.reduce((a, t, p) => t.count > s[a].count ? p : a, 0), l = s.reduce((a, t) => a + t.count, 0);
39
+ return /* @__PURE__ */ n("figure", { className: "jp-ins__weekly", children: [
40
+ /* @__PURE__ */ e("div", { className: "jp-ins__cols", role: "list", "aria-label": "Applications per week", children: s.map((a, t) => {
41
+ const p = a.count > 0 && (t === c || t === s.length - 1);
42
+ return /* @__PURE__ */ n(
43
+ "div",
44
+ {
45
+ className: "jp-ins__col",
46
+ role: "listitem",
47
+ "aria-label": `Week of ${h(a.week)}: ${a.count}`,
48
+ tabIndex: 0,
49
+ children: [
50
+ /* @__PURE__ */ n("span", { className: "jp-ins__col-tip", children: [
51
+ "Week of ",
52
+ h(a.week),
53
+ ": ",
54
+ /* @__PURE__ */ e("strong", { children: a.count })
55
+ ] }),
56
+ p && /* @__PURE__ */ e("span", { className: "jp-ins__col-value", children: a.count }),
57
+ /* @__PURE__ */ e("span", { className: "jp-ins__col-bar", style: { height: `${a.count / i * 100}%` } })
58
+ ]
59
+ },
60
+ a.week
61
+ );
62
+ }) }),
63
+ /* @__PURE__ */ e("div", { className: "jp-ins__axis", "aria-hidden": "true", children: s.map((a, t) => /* @__PURE__ */ e("span", { children: t % 3 === 0 || t === s.length - 1 ? h(a.week) : "" }, a.week)) }),
64
+ /* @__PURE__ */ n("figcaption", { className: "jp-muted", children: [
65
+ l,
66
+ " in the last ",
67
+ s.length,
68
+ " weeks"
69
+ ] })
70
+ ] });
71
+ }
72
+ const N = {
73
+ remote: "Remote",
74
+ hybrid: "Hybrid",
75
+ onsite: "On-site",
76
+ unknown: "Not stated"
77
+ };
78
+ function b({ auth: s }) {
79
+ const { data: i, loading: c, error: l } = _("insights", () => g(s));
80
+ if (!s.signedIn) return /* @__PURE__ */ e("p", { className: "jp-muted", children: "Insights are per-account — sign in." });
81
+ if (c) return /* @__PURE__ */ e("p", { className: "jp-muted", children: "Loading insights…" });
82
+ if (l || !i)
83
+ return /* @__PURE__ */ e("p", { className: "jp-error", children: l instanceof j ? l.message : "Failed to load insights" });
84
+ const { reached: a, rates: t } = i;
85
+ return Object.values(i.states).reduce((r, u) => r + u, 0) === 0 && a.applied === 0 ? /* @__PURE__ */ e("p", { className: "jp-muted", "data-testid": "insights-empty", children: "Nothing to summarise yet. Save, apply to and track postings, and this page fills in." }) : /* @__PURE__ */ n("div", { className: "jp-ins", "data-testid": "insights", children: [
86
+ /* @__PURE__ */ n("div", { className: "jp-ins__stats", children: [
87
+ /* @__PURE__ */ e(d, { label: "Applied", value: String(a.applied), detail: "postings, ever" }),
88
+ /* @__PURE__ */ e(
89
+ d,
90
+ {
91
+ label: "Response rate",
92
+ value: o(t.response),
93
+ detail: `${a.responded} heard back`
94
+ }
95
+ ),
96
+ /* @__PURE__ */ e(
97
+ d,
98
+ {
99
+ label: "Interview rate",
100
+ value: o(t.interview),
101
+ detail: `${a.interviewed} interviewed`
102
+ }
103
+ ),
104
+ /* @__PURE__ */ e(
105
+ d,
106
+ {
107
+ label: "Offer rate",
108
+ value: o(t.offer),
109
+ detail: `${a.offered} offer${a.offered === 1 ? "" : "s"}`
110
+ }
111
+ )
112
+ ] }),
113
+ /* @__PURE__ */ n("section", { className: "jp-ins__panel", children: [
114
+ /* @__PURE__ */ e("h3", { children: "Funnel" }),
115
+ /* @__PURE__ */ e(
116
+ m,
117
+ {
118
+ label: "Postings that reached each stage",
119
+ rows: [
120
+ { name: "Applied", value: a.applied },
121
+ { name: "Heard back", value: a.responded },
122
+ { name: "Interviewed", value: a.interviewed },
123
+ { name: "Offered", value: a.offered }
124
+ ]
125
+ }
126
+ )
127
+ ] }),
128
+ /* @__PURE__ */ n("section", { className: "jp-ins__panel", children: [
129
+ /* @__PURE__ */ e("h3", { children: "Weekly pace" }),
130
+ /* @__PURE__ */ e(k, { weeks: i.weekly_applied })
131
+ ] }),
132
+ i.workplace.length > 0 && /* @__PURE__ */ n("section", { className: "jp-ins__panel", children: [
133
+ /* @__PURE__ */ e("h3", { children: "Where you applied" }),
134
+ /* @__PURE__ */ e(
135
+ m,
136
+ {
137
+ label: "Applications by workplace type",
138
+ rows: i.workplace.map((r) => ({
139
+ name: N[r.workplace_type] ?? r.workplace_type,
140
+ value: r.count
141
+ }))
142
+ }
143
+ )
144
+ ] }),
145
+ i.skills.length > 0 && /* @__PURE__ */ n("section", { className: "jp-ins__panel jp-ins__panel--wide", children: [
146
+ /* @__PURE__ */ e("h3", { children: "What your pipeline asks for" }),
147
+ /* @__PURE__ */ n("p", { className: "jp-muted", children: [
148
+ "Across ",
149
+ i.skill_postings,
150
+ " posting",
151
+ i.skill_postings === 1 ? "" : "s",
152
+ " you are tracking."
153
+ ] }),
154
+ /* @__PURE__ */ n("div", { className: "jp-ins__legend", "aria-hidden": "true", children: [
155
+ /* @__PURE__ */ n("span", { children: [
156
+ /* @__PURE__ */ e("span", { className: "jp-ins__swatch jp-ins__swatch--marked" }),
157
+ " In your stack"
158
+ ] }),
159
+ /* @__PURE__ */ n("span", { children: [
160
+ /* @__PURE__ */ e("span", { className: "jp-ins__swatch" }),
161
+ " Not in any profile's stack"
162
+ ] })
163
+ ] }),
164
+ /* @__PURE__ */ e(
165
+ m,
166
+ {
167
+ label: "Skills by how many tracked postings name them",
168
+ rows: i.skills.map((r) => ({
169
+ name: r.skill,
170
+ value: r.postings,
171
+ marked: r.in_stack,
172
+ note: r.in_stack ? "✓" : void 0
173
+ }))
174
+ }
175
+ )
176
+ ] })
177
+ ] });
178
+ }
179
+ export {
180
+ b as InsightsPage
181
+ };
@@ -1,6 +1,6 @@
1
1
  import { jsxs as t, jsx as a, Fragment as d } from "react/jsx-runtime";
2
2
  import { useState as i, useEffect as _ } from "react";
3
- import { g as y, J as b, D as v } from "./entry-CFBqMGn5.js";
3
+ import { g as y, J as b, D as v } from "./entry-D7QDbdxu.js";
4
4
  import { g, p as E, a as P } from "./packets-BfqJIYHB.js";
5
5
  function L({ auth: f, jobId: m, slug: n, onClose: s }) {
6
6
  const [e, h] = i(null), [o, k] = i(null), [r, j] = i(null), [p, u] = i(null);
@@ -1,5 +1,5 @@
1
1
  import { jsx as e, jsxs as n } from "react/jsx-runtime";
2
- import { u, e as k, J as p } from "./entry-CFBqMGn5.js";
2
+ import { u, e as k, J as p } from "./entry-D7QDbdxu.js";
3
3
  import { p as j } from "./packets-BfqJIYHB.js";
4
4
  function h(c) {
5
5
  const t = new Date(c);
@@ -0,0 +1,306 @@
1
+ import { jsxs as s, jsx as t, Fragment as U } from "react/jsx-runtime";
2
+ import { useState as m, useEffect as R, useMemo as I } from "react";
3
+ import { J as k, u as q, i as v, h as B } from "./entry-D7QDbdxu.js";
4
+ import { i as J, g as O } from "./pipeline-Es-b-u_8.js";
5
+ const Y = [
6
+ { value: "saved", label: "Saved" },
7
+ { value: "interested", label: "Interested" },
8
+ { value: "applied", label: "Applied" },
9
+ { value: "interviewing", label: "Interviewing" }
10
+ ];
11
+ function G({
12
+ auth: e,
13
+ onImported: n,
14
+ onOpen: p
15
+ }) {
16
+ const [o, h] = m(""), [c, f] = m("saved"), [r, g] = m(!1), [u, b] = m(null), [y, N] = m(null), w = async () => {
17
+ if (!(!o.trim() || r)) {
18
+ g(!0), N(null), b(null);
19
+ try {
20
+ const d = await J(o.trim(), c, e);
21
+ b(d), h(""), n();
22
+ } catch (d) {
23
+ N(d instanceof k ? d.message : "Import failed");
24
+ } finally {
25
+ g(!1);
26
+ }
27
+ }
28
+ };
29
+ return /* @__PURE__ */ s("div", { className: "jp-import", "data-testid": "import-posting", children: [
30
+ /* @__PURE__ */ s(
31
+ "form",
32
+ {
33
+ className: "jp-import__form",
34
+ onSubmit: (d) => {
35
+ d.preventDefault(), w();
36
+ },
37
+ children: [
38
+ /* @__PURE__ */ t(
39
+ "input",
40
+ {
41
+ type: "url",
42
+ className: "jp-jobs__search",
43
+ placeholder: "Add a posting by URL — Greenhouse, Lever, Ashby or a company careers page",
44
+ value: o,
45
+ onChange: (d) => h(d.target.value),
46
+ "aria-label": "Posting URL",
47
+ required: !0
48
+ }
49
+ ),
50
+ /* @__PURE__ */ t(
51
+ "select",
52
+ {
53
+ className: "jp-import__state",
54
+ value: c,
55
+ onChange: (d) => f(d.target.value),
56
+ "aria-label": "Add it as",
57
+ children: Y.map((d) => /* @__PURE__ */ t("option", { value: d.value, children: d.label }, d.value))
58
+ }
59
+ ),
60
+ /* @__PURE__ */ t(
61
+ "button",
62
+ {
63
+ type: "submit",
64
+ className: "jp-drawer__cta jp-drawer__cta--primary",
65
+ disabled: r || !o.trim(),
66
+ children: r ? "Reading the posting…" : "Add"
67
+ }
68
+ )
69
+ ]
70
+ }
71
+ ),
72
+ y && /* @__PURE__ */ t("p", { className: "jp-error", children: y }),
73
+ u && /* @__PURE__ */ s("p", { className: "jp-import__done", "data-testid": "import-result", children: [
74
+ u.already_tracked ? `Already in your pipeline as ${u.state}: ` : `Added as ${u.state}: `,
75
+ /* @__PURE__ */ s("button", { type: "button", className: "jp-drawer__link", onClick: () => p(u.job.id), children: [
76
+ u.job.company,
77
+ " — ",
78
+ u.job.title
79
+ ] }),
80
+ !u.created && !u.already_tracked && /* @__PURE__ */ t("span", { className: "jp-muted", children: " (it was already in the feed)" })
81
+ ] })
82
+ ] });
83
+ }
84
+ const F = [
85
+ { state: "interested", label: "Interested" },
86
+ { state: "saved", label: "Saved" },
87
+ { state: "applied", label: "Applied" },
88
+ { state: "interviewing", label: "Interviewing" },
89
+ { state: "offered", label: "Offered" },
90
+ { state: "rejected", label: "Rejected" }
91
+ ], H = { 1: "High", 3: "Low" };
92
+ function Q() {
93
+ const e = /* @__PURE__ */ new Date(), n = (p) => String(p).padStart(2, "0");
94
+ return `${e.getFullYear()}-${n(e.getMonth() + 1)}-${n(e.getDate())}`;
95
+ }
96
+ function D(e) {
97
+ const n = /^\d{4}-\d{2}-\d{2}$/.test(e) ? /* @__PURE__ */ new Date(`${e}T00:00:00`) : new Date(e);
98
+ return Number.isNaN(n.getTime()) ? e : n.toLocaleDateString(void 0, { month: "short", day: "numeric" });
99
+ }
100
+ function z(e, n) {
101
+ const p = e.tracking.priority ?? 2, o = n.tracking.priority ?? 2;
102
+ if (p !== o) return p - o;
103
+ const h = e.tracking.follow_up_at ?? "9999", c = n.tracking.follow_up_at ?? "9999";
104
+ return h !== c ? h < c ? -1 : 1 : e.updated_at < n.updated_at ? 1 : -1;
105
+ }
106
+ function K({ date: e, today: n }) {
107
+ const p = e < n ? "overdue" : e === n ? "today" : "upcoming", o = p === "overdue" ? `Follow up — was ${D(e)}` : p === "today" ? "Follow up today" : `Follow up ${D(e)}`;
108
+ return /* @__PURE__ */ t("span", { className: `jp-pipe-chip jp-pipe-chip--${p}`, "data-testid": "pipe-follow-up", children: o });
109
+ }
110
+ function V({
111
+ item: e,
112
+ today: n,
113
+ onSelect: p,
114
+ onMove: o,
115
+ moving: h
116
+ }) {
117
+ const c = e.tracking.priority, f = c === 1 || c === 3 ? H[c] : null;
118
+ return /* @__PURE__ */ s(
119
+ "li",
120
+ {
121
+ className: `jp-pipe-card${h ? " jp-pipe-card--moving" : ""}`,
122
+ draggable: !h,
123
+ onDragStart: (r) => {
124
+ r.dataTransfer.setData("text/plain", e.job_id), r.dataTransfer.effectAllowed = "move";
125
+ },
126
+ "data-testid": "pipe-card",
127
+ "data-job-id": e.job_id,
128
+ children: [
129
+ /* @__PURE__ */ s(
130
+ "div",
131
+ {
132
+ role: "button",
133
+ tabIndex: 0,
134
+ className: "jp-pipe-card__open",
135
+ onClick: () => p(e.job_id),
136
+ onKeyDown: (r) => {
137
+ r.target === r.currentTarget && (r.key === "Enter" || r.key === " ") && (r.preventDefault(), p(e.job_id));
138
+ },
139
+ children: [
140
+ /* @__PURE__ */ s("div", { className: "jp-pipe-card__head", children: [
141
+ /* @__PURE__ */ t("span", { className: "jp-pipe-card__company", children: e.company }),
142
+ f && /* @__PURE__ */ t("span", { className: `jp-pipe-chip jp-pipe-chip--priority-${c}`, children: f })
143
+ ] }),
144
+ /* @__PURE__ */ t("span", { className: "jp-pipe-card__title", children: e.title }),
145
+ /* @__PURE__ */ s("span", { className: "jp-pipe-card__meta", children: [
146
+ e.applied_at ? `Applied ${D(e.applied_at)}` : `Updated ${D(e.updated_at)}`,
147
+ e.location && ` · ${e.location}`
148
+ ] }),
149
+ (e.tracking.follow_up_at ?? e.application_status ?? e.tracking.contact_name) && /* @__PURE__ */ s("div", { className: "jp-pipe-card__chips", children: [
150
+ e.tracking.follow_up_at && /* @__PURE__ */ t(K, { date: e.tracking.follow_up_at, today: n }),
151
+ e.application_status && /* @__PURE__ */ s("span", { className: "jp-pipe-chip jp-pipe-chip--neutral", title: "Apply queue status", children: [
152
+ "Runner: ",
153
+ e.application_status.replace("_", " ")
154
+ ] }),
155
+ e.tracking.contact_name && /* @__PURE__ */ t("span", { className: "jp-pipe-chip jp-pipe-chip--neutral", children: e.tracking.contact_name })
156
+ ] })
157
+ ]
158
+ }
159
+ ),
160
+ /* @__PURE__ */ s(
161
+ "select",
162
+ {
163
+ className: "jp-pipe-card__move",
164
+ "aria-label": `Move ${e.company} — ${e.title}`,
165
+ value: e.state,
166
+ disabled: h,
167
+ onChange: (r) => o(e.job_id, r.target.value),
168
+ children: [
169
+ F.map((r) => /* @__PURE__ */ t("option", { value: r.state, children: r.label }, r.state)),
170
+ /* @__PURE__ */ t("option", { value: "dismissed", children: "Dismiss" })
171
+ ]
172
+ }
173
+ )
174
+ ]
175
+ }
176
+ );
177
+ }
178
+ function ae({ auth: e, onSelect: n, reloadKey: p }) {
179
+ const {
180
+ data: o,
181
+ loading: h,
182
+ error: c,
183
+ reload: f
184
+ } = q("pipeline", () => O(e)), [r, g] = m({}), [u, b] = m(/* @__PURE__ */ new Set()), [y, N] = m(null), [w, d] = m(""), [A, L] = m(null), S = Q();
185
+ R(() => {
186
+ p !== 0 && (v("pipeline"), f());
187
+ }, [p]), R(() => g({}), [o]);
188
+ const $ = I(() => {
189
+ const a = w.trim().toLowerCase();
190
+ return (o ?? []).map((i) => r[i.job_id] ? { ...i, state: r[i.job_id] } : i).filter((i) => i.state !== "dismissed").filter((i) => !a || i.company.toLowerCase().includes(a) || i.title.toLowerCase().includes(a));
191
+ }, [o, r, w]), T = $.filter((a) => a.tracking.follow_up_at && a.tracking.follow_up_at <= S), C = async (a, i) => {
192
+ const l = $.find((_) => _.job_id === a);
193
+ if (!(!l || l.state === i || u.has(a))) {
194
+ N(null), g((_) => ({ ..._, [a]: i })), b((_) => new Set(_).add(a));
195
+ try {
196
+ await B(a, i, e), v(`job:${a}:`), v("jobs:"), v("pipeline"), f();
197
+ } catch (_) {
198
+ g((j) => {
199
+ const x = { ...j };
200
+ return delete x[a], x;
201
+ }), N(
202
+ `Could not move ${l.company}: ${_ instanceof k ? _.message : "request failed"}`
203
+ );
204
+ } finally {
205
+ b((_) => {
206
+ const j = new Set(_);
207
+ return j.delete(a), j;
208
+ });
209
+ }
210
+ }
211
+ }, M = (a) => (i) => {
212
+ i.preventDefault(), L(null);
213
+ const l = i.dataTransfer.getData("text/plain");
214
+ l && C(l, a);
215
+ }, P = c instanceof k && c.status === 403;
216
+ if (h) return /* @__PURE__ */ t("p", { className: "jp-muted", children: "Loading your pipeline…" });
217
+ if (P)
218
+ return /* @__PURE__ */ t("p", { className: "jp-muted", children: "The pipeline is per-account — sign in to see yours." });
219
+ if (c)
220
+ return /* @__PURE__ */ t("p", { className: "jp-error", children: c instanceof k ? c.message : "Failed to load the pipeline" });
221
+ const E = /* @__PURE__ */ t(
222
+ G,
223
+ {
224
+ auth: e,
225
+ onOpen: n,
226
+ onImported: () => {
227
+ v("pipeline"), v("jobs:"), f();
228
+ }
229
+ }
230
+ );
231
+ return (o ?? []).length === 0 ? /* @__PURE__ */ s("div", { className: "jp-pipe", children: [
232
+ E,
233
+ /* @__PURE__ */ t("p", { className: "jp-muted", children: "Nothing in your pipeline yet. Mark a posting interested, save it or apply from the feed, or add one by URL above, and it lands here." })
234
+ ] }) : /* @__PURE__ */ s("div", { className: "jp-pipe", children: [
235
+ E,
236
+ /* @__PURE__ */ s("div", { className: "jp-pipe__toolbar", children: [
237
+ /* @__PURE__ */ t(
238
+ "input",
239
+ {
240
+ type: "search",
241
+ className: "jp-jobs__search",
242
+ placeholder: "Filter by company or title",
243
+ value: w,
244
+ onChange: (a) => d(a.target.value),
245
+ "aria-label": "Filter the pipeline"
246
+ }
247
+ ),
248
+ /* @__PURE__ */ s("span", { className: "jp-pipe__summary", "data-testid": "pipe-summary", children: [
249
+ $.length,
250
+ " in play",
251
+ T.length > 0 && /* @__PURE__ */ s(U, { children: [
252
+ " · ",
253
+ /* @__PURE__ */ s("strong", { children: [
254
+ T.length,
255
+ " follow-up",
256
+ T.length === 1 ? "" : "s",
257
+ " due"
258
+ ] })
259
+ ] })
260
+ ] })
261
+ ] }),
262
+ y && /* @__PURE__ */ t("p", { className: "jp-error", children: y }),
263
+ /* @__PURE__ */ t("div", { className: "jp-pipe__board", children: F.map((a) => {
264
+ const i = $.filter((l) => l.state === a.state).sort(z);
265
+ return /* @__PURE__ */ s(
266
+ "section",
267
+ {
268
+ className: `jp-pipe__col jp-pipe__col--${a.state}${A === a.state ? " jp-pipe__col--drop" : ""}`,
269
+ "aria-label": a.label,
270
+ "data-testid": `pipe-col-${a.state}`,
271
+ onDragOver: (l) => {
272
+ l.preventDefault(), l.dataTransfer.dropEffect = "move", A !== a.state && L(a.state);
273
+ },
274
+ onDragLeave: (l) => {
275
+ l.currentTarget.contains(l.relatedTarget) || L(null);
276
+ },
277
+ onDrop: M(a.state),
278
+ children: [
279
+ /* @__PURE__ */ s("h3", { className: "jp-pipe__col-head", children: [
280
+ /* @__PURE__ */ t("span", { className: `jp-jobcard__state jp-jobcard__state--${a.state}`, children: a.label }),
281
+ /* @__PURE__ */ t("span", { className: "jp-pipe__count", children: i.length })
282
+ ] }),
283
+ /* @__PURE__ */ t("ul", { className: "jp-pipe__cards", children: i.map((l) => /* @__PURE__ */ t(
284
+ V,
285
+ {
286
+ item: l,
287
+ today: S,
288
+ onSelect: n,
289
+ onMove: (_, j) => {
290
+ C(_, j);
291
+ },
292
+ moving: u.has(l.job_id)
293
+ },
294
+ l.job_id
295
+ )) })
296
+ ]
297
+ },
298
+ a.state
299
+ );
300
+ }) })
301
+ ] });
302
+ }
303
+ export {
304
+ F as PIPELINE_COLUMNS,
305
+ ae as PipelineBoard
306
+ };