ghost 5.92.0 → 5.94.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/components/tryghost-adapter-cache-memory-ttl-5.94.0.tgz +0 -0
- package/components/tryghost-adapter-cache-redis-5.94.0.tgz +0 -0
- package/components/{tryghost-adapter-manager-5.92.0.tgz → tryghost-adapter-manager-5.94.0.tgz} +0 -0
- package/components/{tryghost-announcement-bar-settings-5.92.0.tgz → tryghost-announcement-bar-settings-5.94.0.tgz} +0 -0
- package/components/{tryghost-api-framework-5.92.0.tgz → tryghost-api-framework-5.94.0.tgz} +0 -0
- package/components/{tryghost-api-version-compatibility-service-5.92.0.tgz → tryghost-api-version-compatibility-service-5.94.0.tgz} +0 -0
- package/components/tryghost-audience-feedback-5.94.0.tgz +0 -0
- package/components/tryghost-bookshelf-repository-5.94.0.tgz +0 -0
- package/components/{tryghost-bootstrap-socket-5.92.0.tgz → tryghost-bootstrap-socket-5.94.0.tgz} +0 -0
- package/components/{tryghost-collections-5.92.0.tgz → tryghost-collections-5.94.0.tgz} +0 -0
- package/components/{tryghost-constants-5.92.0.tgz → tryghost-constants-5.94.0.tgz} +0 -0
- package/components/{tryghost-custom-theme-settings-service-5.92.0.tgz → tryghost-custom-theme-settings-service-5.94.0.tgz} +0 -0
- package/components/{tryghost-data-generator-5.92.0.tgz → tryghost-data-generator-5.94.0.tgz} +0 -0
- package/components/{tryghost-domain-events-5.92.0.tgz → tryghost-domain-events-5.94.0.tgz} +0 -0
- package/components/tryghost-donations-5.94.0.tgz +0 -0
- package/components/tryghost-dynamic-routing-events-5.94.0.tgz +0 -0
- package/components/tryghost-email-addresses-5.94.0.tgz +0 -0
- package/components/tryghost-email-analytics-provider-mailgun-5.94.0.tgz +0 -0
- package/components/tryghost-email-analytics-service-5.94.0.tgz +0 -0
- package/components/{tryghost-email-content-generator-5.92.0.tgz → tryghost-email-content-generator-5.94.0.tgz} +0 -0
- package/components/{tryghost-email-events-5.92.0.tgz → tryghost-email-events-5.94.0.tgz} +0 -0
- package/components/tryghost-email-service-5.94.0.tgz +0 -0
- package/components/tryghost-email-suppression-list-5.94.0.tgz +0 -0
- package/components/tryghost-express-dynamic-redirects-5.94.0.tgz +0 -0
- package/components/{tryghost-external-media-inliner-5.92.0.tgz → tryghost-external-media-inliner-5.94.0.tgz} +0 -0
- package/components/tryghost-extract-api-key-5.94.0.tgz +0 -0
- package/components/tryghost-ghost-5.94.0.tgz +0 -0
- package/components/tryghost-html-to-plaintext-5.94.0.tgz +0 -0
- package/components/{tryghost-i18n-5.92.0.tgz → tryghost-i18n-5.94.0.tgz} +0 -0
- package/components/{tryghost-importer-handler-content-files-5.92.0.tgz → tryghost-importer-handler-content-files-5.94.0.tgz} +0 -0
- package/components/{tryghost-importer-revue-5.92.0.tgz → tryghost-importer-revue-5.94.0.tgz} +0 -0
- package/components/tryghost-in-memory-repository-5.94.0.tgz +0 -0
- package/components/{tryghost-job-manager-5.92.0.tgz → tryghost-job-manager-5.94.0.tgz} +0 -0
- package/components/{tryghost-link-redirects-5.92.0.tgz → tryghost-link-redirects-5.94.0.tgz} +0 -0
- package/components/tryghost-link-replacer-5.94.0.tgz +0 -0
- package/components/{tryghost-link-tracking-5.92.0.tgz → tryghost-link-tracking-5.94.0.tgz} +0 -0
- package/components/{tryghost-magic-link-5.92.0.tgz → tryghost-magic-link-5.94.0.tgz} +0 -0
- package/components/{tryghost-mail-events-5.92.0.tgz → tryghost-mail-events-5.94.0.tgz} +0 -0
- package/components/tryghost-mailgun-client-5.94.0.tgz +0 -0
- package/components/{tryghost-member-attribution-5.92.0.tgz → tryghost-member-attribution-5.94.0.tgz} +0 -0
- package/components/{tryghost-member-events-5.92.0.tgz → tryghost-member-events-5.94.0.tgz} +0 -0
- package/components/{tryghost-members-api-5.92.0.tgz → tryghost-members-api-5.94.0.tgz} +0 -0
- package/components/{tryghost-members-csv-5.92.0.tgz → tryghost-members-csv-5.94.0.tgz} +0 -0
- package/components/{tryghost-members-events-service-5.92.0.tgz → tryghost-members-events-service-5.94.0.tgz} +0 -0
- package/components/{tryghost-members-importer-5.92.0.tgz → tryghost-members-importer-5.94.0.tgz} +0 -0
- package/components/tryghost-members-offers-5.94.0.tgz +0 -0
- package/components/tryghost-members-payments-5.94.0.tgz +0 -0
- package/components/{tryghost-members-ssr-5.92.0.tgz → tryghost-members-ssr-5.94.0.tgz} +0 -0
- package/components/{tryghost-members-stripe-service-5.92.0.tgz → tryghost-members-stripe-service-5.94.0.tgz} +0 -0
- package/components/{tryghost-mentions-email-report-5.92.0.tgz → tryghost-mentions-email-report-5.94.0.tgz} +0 -0
- package/components/tryghost-milestones-5.94.0.tgz +0 -0
- package/components/tryghost-minifier-5.94.0.tgz +0 -0
- package/components/tryghost-model-to-domain-event-interceptor-5.94.0.tgz +0 -0
- package/components/tryghost-mw-api-version-mismatch-5.94.0.tgz +0 -0
- package/components/{tryghost-mw-cache-control-5.92.0.tgz → tryghost-mw-cache-control-5.94.0.tgz} +0 -0
- package/components/tryghost-mw-error-handler-5.94.0.tgz +0 -0
- package/components/tryghost-mw-session-from-token-5.94.0.tgz +0 -0
- package/components/tryghost-mw-update-user-last-seen-5.94.0.tgz +0 -0
- package/components/tryghost-mw-version-match-5.94.0.tgz +0 -0
- package/components/{tryghost-mw-vhost-5.92.0.tgz → tryghost-mw-vhost-5.94.0.tgz} +0 -0
- package/components/tryghost-nql-filter-expansions-5.94.0.tgz +0 -0
- package/components/tryghost-oembed-service-5.94.0.tgz +0 -0
- package/components/{tryghost-package-json-5.92.0.tgz → tryghost-package-json-5.94.0.tgz} +0 -0
- package/components/tryghost-post-events-5.94.0.tgz +0 -0
- package/components/tryghost-post-revisions-5.94.0.tgz +0 -0
- package/components/{tryghost-posts-service-5.92.0.tgz → tryghost-posts-service-5.94.0.tgz} +0 -0
- package/components/{tryghost-recommendations-5.92.0.tgz → tryghost-recommendations-5.94.0.tgz} +0 -0
- package/components/tryghost-referrers-5.94.0.tgz +0 -0
- package/components/{tryghost-security-5.92.0.tgz → tryghost-security-5.94.0.tgz} +0 -0
- package/components/{tryghost-session-service-5.92.0.tgz → tryghost-session-service-5.94.0.tgz} +0 -0
- package/components/{tryghost-settings-path-manager-5.92.0.tgz → tryghost-settings-path-manager-5.94.0.tgz} +0 -0
- package/components/{tryghost-slack-notifications-5.92.0.tgz → tryghost-slack-notifications-5.94.0.tgz} +0 -0
- package/components/{tryghost-staff-service-5.92.0.tgz → tryghost-staff-service-5.94.0.tgz} +0 -0
- package/components/tryghost-stats-service-5.94.0.tgz +0 -0
- package/components/tryghost-tiers-5.94.0.tgz +0 -0
- package/components/{tryghost-update-check-service-5.92.0.tgz → tryghost-update-check-service-5.94.0.tgz} +0 -0
- package/components/{tryghost-verification-trigger-5.92.0.tgz → tryghost-verification-trigger-5.94.0.tgz} +0 -0
- package/components/{tryghost-version-notifications-data-service-5.92.0.tgz → tryghost-version-notifications-data-service-5.94.0.tgz} +0 -0
- package/components/tryghost-webmentions-5.94.0.tgz +0 -0
- package/core/app.js +22 -0
- package/core/built/admin/assets/admin-x-activitypub/admin-x-activitypub.js +2 -2
- package/core/built/admin/assets/admin-x-activitypub/{index-5eac6af1.mjs → index-51277f76.mjs} +3000 -2661
- package/core/built/admin/assets/admin-x-activitypub/modals-c85985ad.mjs +815 -0
- package/core/built/admin/assets/{chunk.524.1bc6b183876a00383f90.js → chunk.524.b9da8e9c62fc112baf2b.js} +5 -5
- package/core/built/admin/assets/{chunk.582.9682daf3be0962298c43.js → chunk.582.27ddbcbd7a6e7a439db8.js} +6 -6
- package/core/built/admin/assets/{chunk.217.2bd17b550359ea58831b.js → chunk.785.78610bd253a9e2419ec9.js} +27 -20
- package/core/built/admin/assets/{ghost-acdb9966c24d49e97ac26215cb4933e1.js → ghost-535088daf62c8cbea78a012bb6bbafc6.js} +866 -827
- package/core/built/admin/assets/ghost-d1c51d3a2d840dda5aa7b4ffe6057756.css +1 -0
- package/core/built/admin/assets/ghost-dark-98b3a7e593292a7cb410609e17727a3c.css +1 -0
- package/core/built/admin/assets/koenig-lexical/koenig-lexical.js +207 -197
- package/core/built/admin/assets/koenig-lexical/koenig-lexical.umd.js +26 -26
- package/core/built/admin/assets/{vendor-bff75d127fcf4a75c8a83b473bdb308f.js → vendor-649dc64bfd9ecc1bd7361b53680dfdc2.js} +19 -17
- package/core/built/admin/index.html +6 -6
- package/core/server/data/migrations/versions/5.93/2024-09-03-18-51-01-update-stripe-prices-nickname-length.js +19 -0
- package/core/server/data/migrations/versions/5.94/2024-09-03-20-09-40-null-analytics-jobs-timings.js +20 -0
- package/core/server/data/schema/schema.js +1 -1
- package/core/server/services/email-analytics/EmailAnalyticsServiceWrapper.js +49 -11
- package/core/server/services/email-analytics/lib/queries.js +154 -30
- package/core/server/services/oembed/service.js +2 -1
- package/package.json +150 -150
- package/yarn.lock +48 -58
- package/components/tryghost-adapter-cache-memory-ttl-5.92.0.tgz +0 -0
- package/components/tryghost-adapter-cache-redis-5.92.0.tgz +0 -0
- package/components/tryghost-audience-feedback-5.92.0.tgz +0 -0
- package/components/tryghost-bookshelf-repository-5.92.0.tgz +0 -0
- package/components/tryghost-donations-5.92.0.tgz +0 -0
- package/components/tryghost-dynamic-routing-events-5.92.0.tgz +0 -0
- package/components/tryghost-email-addresses-5.92.0.tgz +0 -0
- package/components/tryghost-email-analytics-provider-mailgun-5.92.0.tgz +0 -0
- package/components/tryghost-email-analytics-service-5.92.0.tgz +0 -0
- package/components/tryghost-email-service-5.92.0.tgz +0 -0
- package/components/tryghost-email-suppression-list-5.92.0.tgz +0 -0
- package/components/tryghost-express-dynamic-redirects-5.92.0.tgz +0 -0
- package/components/tryghost-extract-api-key-5.92.0.tgz +0 -0
- package/components/tryghost-ghost-5.92.0.tgz +0 -0
- package/components/tryghost-html-to-plaintext-5.92.0.tgz +0 -0
- package/components/tryghost-in-memory-repository-5.92.0.tgz +0 -0
- package/components/tryghost-link-replacer-5.92.0.tgz +0 -0
- package/components/tryghost-mailgun-client-5.92.0.tgz +0 -0
- package/components/tryghost-members-offers-5.92.0.tgz +0 -0
- package/components/tryghost-members-payments-5.92.0.tgz +0 -0
- package/components/tryghost-milestones-5.92.0.tgz +0 -0
- package/components/tryghost-minifier-5.92.0.tgz +0 -0
- package/components/tryghost-model-to-domain-event-interceptor-5.92.0.tgz +0 -0
- package/components/tryghost-mw-api-version-mismatch-5.92.0.tgz +0 -0
- package/components/tryghost-mw-error-handler-5.92.0.tgz +0 -0
- package/components/tryghost-mw-session-from-token-5.92.0.tgz +0 -0
- package/components/tryghost-mw-update-user-last-seen-5.92.0.tgz +0 -0
- package/components/tryghost-mw-version-match-5.92.0.tgz +0 -0
- package/components/tryghost-nql-filter-expansions-5.92.0.tgz +0 -0
- package/components/tryghost-oembed-service-5.92.0.tgz +0 -0
- package/components/tryghost-post-events-5.92.0.tgz +0 -0
- package/components/tryghost-post-revisions-5.92.0.tgz +0 -0
- package/components/tryghost-referrers-5.92.0.tgz +0 -0
- package/components/tryghost-stats-service-5.92.0.tgz +0 -0
- package/components/tryghost-tiers-5.92.0.tgz +0 -0
- package/components/tryghost-webmentions-5.92.0.tgz +0 -0
- package/core/built/admin/assets/admin-x-activitypub/modals-62a088d9.mjs +0 -965
- package/core/built/admin/assets/ghost-8c20f019d522f17d318e799568924958.css +0 -1
- package/core/built/admin/assets/ghost-dark-b27530aaada81101d641ff1ca5f5df6b.css +0 -1
- /package/core/built/admin/assets/{chunk.217.2bd17b550359ea58831b.js.LICENSE.txt → chunk.785.78610bd253a9e2419ec9.js.LICENSE.txt} +0 -0
|
@@ -0,0 +1,815 @@
|
|
|
1
|
+
import { u as y, c as oe, a as O, b as j, d as ke, e as Re, f as S, R as Ve, g as _, C as U, i as B, h as ae, F as Pe, j as N, k as Q, l as Ne, m as Te, n as V, o as l, H as Ue, p as De, q as Oe, P as Z, r as ie, S as Be, N as z, s as J, M as W, t as X, A as Y, v as ze, w as qe, L as le, B as ce, x as K, y as de } from "./index-51277f76.mjs";
|
|
2
|
+
function k() {
|
|
3
|
+
return k = Object.assign ? Object.assign.bind() : function(e) {
|
|
4
|
+
for (var r = 1; r < arguments.length; r++) {
|
|
5
|
+
var t = arguments[r];
|
|
6
|
+
for (var o in t)
|
|
7
|
+
Object.prototype.hasOwnProperty.call(t, o) && (e[o] = t[o]);
|
|
8
|
+
}
|
|
9
|
+
return e;
|
|
10
|
+
}, k.apply(this, arguments);
|
|
11
|
+
}
|
|
12
|
+
function D(e, r, { checkForDefaultPrevented: t = !0 } = {}) {
|
|
13
|
+
return function(n) {
|
|
14
|
+
if (e == null || e(n), t === !1 || !n.defaultPrevented)
|
|
15
|
+
return r == null ? void 0 : r(n);
|
|
16
|
+
};
|
|
17
|
+
}
|
|
18
|
+
function He(e, r) {
|
|
19
|
+
typeof e == "function" ? e(r) : e != null && (e.current = r);
|
|
20
|
+
}
|
|
21
|
+
function ue(...e) {
|
|
22
|
+
return (r) => e.forEach(
|
|
23
|
+
(t) => He(t, r)
|
|
24
|
+
);
|
|
25
|
+
}
|
|
26
|
+
function fe(...e) {
|
|
27
|
+
return y(ue(...e), e);
|
|
28
|
+
}
|
|
29
|
+
function Ke(e, r = []) {
|
|
30
|
+
let t = [];
|
|
31
|
+
function o(s, i) {
|
|
32
|
+
const a = /* @__PURE__ */ oe(i), u = t.length;
|
|
33
|
+
t = [
|
|
34
|
+
...t,
|
|
35
|
+
i
|
|
36
|
+
];
|
|
37
|
+
function v($) {
|
|
38
|
+
const { scope: p, children: x, ...b } = $, C = (p == null ? void 0 : p[e][u]) || a, w = O(
|
|
39
|
+
() => b,
|
|
40
|
+
Object.values(b)
|
|
41
|
+
);
|
|
42
|
+
return /* @__PURE__ */ j(C.Provider, {
|
|
43
|
+
value: w
|
|
44
|
+
}, x);
|
|
45
|
+
}
|
|
46
|
+
function E($, p) {
|
|
47
|
+
const x = (p == null ? void 0 : p[e][u]) || a, b = ke(x);
|
|
48
|
+
if (b)
|
|
49
|
+
return b;
|
|
50
|
+
if (i !== void 0)
|
|
51
|
+
return i;
|
|
52
|
+
throw new Error(`\`${$}\` must be used within \`${s}\``);
|
|
53
|
+
}
|
|
54
|
+
return v.displayName = s + "Provider", [
|
|
55
|
+
v,
|
|
56
|
+
E
|
|
57
|
+
];
|
|
58
|
+
}
|
|
59
|
+
const n = () => {
|
|
60
|
+
const s = t.map((i) => /* @__PURE__ */ oe(i));
|
|
61
|
+
return function(a) {
|
|
62
|
+
const u = (a == null ? void 0 : a[e]) || s;
|
|
63
|
+
return O(
|
|
64
|
+
() => ({
|
|
65
|
+
[`__scope${e}`]: {
|
|
66
|
+
...a,
|
|
67
|
+
[e]: u
|
|
68
|
+
}
|
|
69
|
+
}),
|
|
70
|
+
[
|
|
71
|
+
a,
|
|
72
|
+
u
|
|
73
|
+
]
|
|
74
|
+
);
|
|
75
|
+
};
|
|
76
|
+
};
|
|
77
|
+
return n.scopeName = e, [
|
|
78
|
+
o,
|
|
79
|
+
Ge(n, ...r)
|
|
80
|
+
];
|
|
81
|
+
}
|
|
82
|
+
function Ge(...e) {
|
|
83
|
+
const r = e[0];
|
|
84
|
+
if (e.length === 1)
|
|
85
|
+
return r;
|
|
86
|
+
const t = () => {
|
|
87
|
+
const o = e.map(
|
|
88
|
+
(n) => ({
|
|
89
|
+
useScope: n(),
|
|
90
|
+
scopeName: n.scopeName
|
|
91
|
+
})
|
|
92
|
+
);
|
|
93
|
+
return function(s) {
|
|
94
|
+
const i = o.reduce((a, { useScope: u, scopeName: v }) => {
|
|
95
|
+
const $ = u(s)[`__scope${v}`];
|
|
96
|
+
return {
|
|
97
|
+
...a,
|
|
98
|
+
...$
|
|
99
|
+
};
|
|
100
|
+
}, {});
|
|
101
|
+
return O(
|
|
102
|
+
() => ({
|
|
103
|
+
[`__scope${r.scopeName}`]: i
|
|
104
|
+
}),
|
|
105
|
+
[
|
|
106
|
+
i
|
|
107
|
+
]
|
|
108
|
+
);
|
|
109
|
+
};
|
|
110
|
+
};
|
|
111
|
+
return t.scopeName = r.scopeName, t;
|
|
112
|
+
}
|
|
113
|
+
const Qe = globalThis != null && globalThis.document ? Re : () => {
|
|
114
|
+
}, Ze = Ve["useId".toString()] || (() => {
|
|
115
|
+
});
|
|
116
|
+
let Je = 0;
|
|
117
|
+
function We(e) {
|
|
118
|
+
const [r, t] = S(Ze());
|
|
119
|
+
return Qe(() => {
|
|
120
|
+
e || t(
|
|
121
|
+
(o) => o ?? String(Je++)
|
|
122
|
+
);
|
|
123
|
+
}, [
|
|
124
|
+
e
|
|
125
|
+
]), e || (r ? `radix-${r}` : "");
|
|
126
|
+
}
|
|
127
|
+
const me = /* @__PURE__ */ _((e, r) => {
|
|
128
|
+
const { children: t, ...o } = e, n = U.toArray(t), s = n.find(Ye);
|
|
129
|
+
if (s) {
|
|
130
|
+
const i = s.props.children, a = n.map((u) => u === s ? U.count(i) > 1 ? U.only(null) : /* @__PURE__ */ B(i) ? i.props.children : null : u);
|
|
131
|
+
return /* @__PURE__ */ j(G, k({}, o, {
|
|
132
|
+
ref: r
|
|
133
|
+
}), /* @__PURE__ */ B(i) ? /* @__PURE__ */ ae(i, void 0, a) : null);
|
|
134
|
+
}
|
|
135
|
+
return /* @__PURE__ */ j(G, k({}, o, {
|
|
136
|
+
ref: r
|
|
137
|
+
}), t);
|
|
138
|
+
});
|
|
139
|
+
me.displayName = "Slot";
|
|
140
|
+
const G = /* @__PURE__ */ _((e, r) => {
|
|
141
|
+
const { children: t, ...o } = e;
|
|
142
|
+
return /* @__PURE__ */ B(t) ? /* @__PURE__ */ ae(t, {
|
|
143
|
+
...et(o, t.props),
|
|
144
|
+
ref: r ? ue(r, t.ref) : t.ref
|
|
145
|
+
}) : U.count(t) > 1 ? U.only(null) : null;
|
|
146
|
+
});
|
|
147
|
+
G.displayName = "SlotClone";
|
|
148
|
+
const Xe = ({ children: e }) => /* @__PURE__ */ j(Pe, null, e);
|
|
149
|
+
function Ye(e) {
|
|
150
|
+
return /* @__PURE__ */ B(e) && e.type === Xe;
|
|
151
|
+
}
|
|
152
|
+
function et(e, r) {
|
|
153
|
+
const t = {
|
|
154
|
+
...r
|
|
155
|
+
};
|
|
156
|
+
for (const o in r) {
|
|
157
|
+
const n = e[o], s = r[o];
|
|
158
|
+
/^on[A-Z]/.test(o) ? n && s ? t[o] = (...a) => {
|
|
159
|
+
s(...a), n(...a);
|
|
160
|
+
} : n && (t[o] = n) : o === "style" ? t[o] = {
|
|
161
|
+
...n,
|
|
162
|
+
...s
|
|
163
|
+
} : o === "className" && (t[o] = [
|
|
164
|
+
n,
|
|
165
|
+
s
|
|
166
|
+
].filter(Boolean).join(" "));
|
|
167
|
+
}
|
|
168
|
+
return {
|
|
169
|
+
...e,
|
|
170
|
+
...t
|
|
171
|
+
};
|
|
172
|
+
}
|
|
173
|
+
const tt = [
|
|
174
|
+
"a",
|
|
175
|
+
"button",
|
|
176
|
+
"div",
|
|
177
|
+
"form",
|
|
178
|
+
"h2",
|
|
179
|
+
"h3",
|
|
180
|
+
"img",
|
|
181
|
+
"input",
|
|
182
|
+
"label",
|
|
183
|
+
"li",
|
|
184
|
+
"nav",
|
|
185
|
+
"ol",
|
|
186
|
+
"p",
|
|
187
|
+
"span",
|
|
188
|
+
"svg",
|
|
189
|
+
"ul"
|
|
190
|
+
], ee = tt.reduce((e, r) => {
|
|
191
|
+
const t = /* @__PURE__ */ _((o, n) => {
|
|
192
|
+
const { asChild: s, ...i } = o, a = s ? me : r;
|
|
193
|
+
return N(() => {
|
|
194
|
+
window[Symbol.for("radix-ui")] = !0;
|
|
195
|
+
}, []), /* @__PURE__ */ j(a, k({}, i, {
|
|
196
|
+
ref: n
|
|
197
|
+
}));
|
|
198
|
+
});
|
|
199
|
+
return t.displayName = `Primitive.${r}`, {
|
|
200
|
+
...e,
|
|
201
|
+
[r]: t
|
|
202
|
+
};
|
|
203
|
+
}, {}), [te, Nt] = Ke("Form"), ve = "Form", [rt, ge] = te(ve), [ot, nt] = te(ve), st = /* @__PURE__ */ _((e, r) => {
|
|
204
|
+
const { __scopeForm: t, onClearServerErrors: o = () => {
|
|
205
|
+
}, ...n } = e, s = Q(null), i = fe(r, s), [a, u] = S({}), v = y(
|
|
206
|
+
(d) => a[d],
|
|
207
|
+
[
|
|
208
|
+
a
|
|
209
|
+
]
|
|
210
|
+
), E = y(
|
|
211
|
+
(d, f) => u((m) => {
|
|
212
|
+
var g;
|
|
213
|
+
return {
|
|
214
|
+
...m,
|
|
215
|
+
[d]: {
|
|
216
|
+
...(g = m[d]) !== null && g !== void 0 ? g : {},
|
|
217
|
+
...f
|
|
218
|
+
}
|
|
219
|
+
};
|
|
220
|
+
}),
|
|
221
|
+
[]
|
|
222
|
+
), $ = y((d) => {
|
|
223
|
+
u(
|
|
224
|
+
(f) => ({
|
|
225
|
+
...f,
|
|
226
|
+
[d]: void 0
|
|
227
|
+
})
|
|
228
|
+
), c(
|
|
229
|
+
(f) => ({
|
|
230
|
+
...f,
|
|
231
|
+
[d]: {}
|
|
232
|
+
})
|
|
233
|
+
);
|
|
234
|
+
}, []), [p, x] = S({}), b = y((d) => {
|
|
235
|
+
var f;
|
|
236
|
+
return (f = p[d]) !== null && f !== void 0 ? f : [];
|
|
237
|
+
}, [
|
|
238
|
+
p
|
|
239
|
+
]), C = y((d, f) => {
|
|
240
|
+
x((m) => {
|
|
241
|
+
var g;
|
|
242
|
+
return {
|
|
243
|
+
...m,
|
|
244
|
+
[d]: [
|
|
245
|
+
...(g = m[d]) !== null && g !== void 0 ? g : [],
|
|
246
|
+
f
|
|
247
|
+
]
|
|
248
|
+
};
|
|
249
|
+
});
|
|
250
|
+
}, []), w = y((d, f) => {
|
|
251
|
+
x((m) => {
|
|
252
|
+
var g;
|
|
253
|
+
return {
|
|
254
|
+
...m,
|
|
255
|
+
[d]: ((g = m[d]) !== null && g !== void 0 ? g : []).filter(
|
|
256
|
+
(L) => L.id !== f
|
|
257
|
+
)
|
|
258
|
+
};
|
|
259
|
+
});
|
|
260
|
+
}, []), [A, c] = S({}), h = y((d) => {
|
|
261
|
+
var f;
|
|
262
|
+
return (f = A[d]) !== null && f !== void 0 ? f : {};
|
|
263
|
+
}, [
|
|
264
|
+
A
|
|
265
|
+
]), F = y((d, f) => {
|
|
266
|
+
c((m) => {
|
|
267
|
+
var g;
|
|
268
|
+
return {
|
|
269
|
+
...m,
|
|
270
|
+
[d]: {
|
|
271
|
+
...(g = m[d]) !== null && g !== void 0 ? g : {},
|
|
272
|
+
...f
|
|
273
|
+
}
|
|
274
|
+
};
|
|
275
|
+
});
|
|
276
|
+
}, []), [I, M] = S({}), T = y((d, f) => {
|
|
277
|
+
M((m) => {
|
|
278
|
+
const g = new Set(m[d]).add(f);
|
|
279
|
+
return {
|
|
280
|
+
...m,
|
|
281
|
+
[d]: g
|
|
282
|
+
};
|
|
283
|
+
});
|
|
284
|
+
}, []), P = y((d, f) => {
|
|
285
|
+
M((m) => {
|
|
286
|
+
const g = new Set(m[d]);
|
|
287
|
+
return g.delete(f), {
|
|
288
|
+
...m,
|
|
289
|
+
[d]: g
|
|
290
|
+
};
|
|
291
|
+
});
|
|
292
|
+
}, []), R = y((d) => {
|
|
293
|
+
var f;
|
|
294
|
+
return Array.from((f = I[d]) !== null && f !== void 0 ? f : []).join(" ") || void 0;
|
|
295
|
+
}, [
|
|
296
|
+
I
|
|
297
|
+
]);
|
|
298
|
+
return /* @__PURE__ */ j(rt, {
|
|
299
|
+
scope: t,
|
|
300
|
+
getFieldValidity: v,
|
|
301
|
+
onFieldValidityChange: E,
|
|
302
|
+
getFieldCustomMatcherEntries: b,
|
|
303
|
+
onFieldCustomMatcherEntryAdd: C,
|
|
304
|
+
onFieldCustomMatcherEntryRemove: w,
|
|
305
|
+
getFieldCustomErrors: h,
|
|
306
|
+
onFieldCustomErrorsChange: F,
|
|
307
|
+
onFieldValiditionClear: $
|
|
308
|
+
}, /* @__PURE__ */ j(ot, {
|
|
309
|
+
scope: t,
|
|
310
|
+
onFieldMessageIdAdd: T,
|
|
311
|
+
onFieldMessageIdRemove: P,
|
|
312
|
+
getFieldDescription: R
|
|
313
|
+
}, /* @__PURE__ */ j(ee.form, k({}, n, {
|
|
314
|
+
ref: i,
|
|
315
|
+
onInvalid: D(e.onInvalid, (d) => {
|
|
316
|
+
const f = $e(d.currentTarget);
|
|
317
|
+
f === d.target && f.focus(), d.preventDefault();
|
|
318
|
+
}),
|
|
319
|
+
onSubmit: D(e.onSubmit, o, {
|
|
320
|
+
checkForDefaultPrevented: !1
|
|
321
|
+
}),
|
|
322
|
+
onReset: D(e.onReset, o)
|
|
323
|
+
}))));
|
|
324
|
+
}), pe = "FormField", [at, it] = te(pe), lt = /* @__PURE__ */ _((e, r) => {
|
|
325
|
+
const { __scopeForm: t, name: o, serverInvalid: n = !1, ...s } = e, a = ge(pe, t).getFieldValidity(o), u = We();
|
|
326
|
+
return /* @__PURE__ */ j(at, {
|
|
327
|
+
scope: t,
|
|
328
|
+
id: u,
|
|
329
|
+
name: o,
|
|
330
|
+
serverInvalid: n
|
|
331
|
+
}, /* @__PURE__ */ j(ee.div, k({
|
|
332
|
+
"data-valid": he(a, n),
|
|
333
|
+
"data-invalid": xe(a, n)
|
|
334
|
+
}, s, {
|
|
335
|
+
ref: r
|
|
336
|
+
})));
|
|
337
|
+
}), q = "FormControl", ct = /* @__PURE__ */ _((e, r) => {
|
|
338
|
+
const { __scopeForm: t, ...o } = e, n = ge(q, t), s = it(q, t), i = nt(q, t), a = Q(null), u = fe(r, a), v = o.name || s.name, E = o.id || s.id, $ = n.getFieldCustomMatcherEntries(v), { onFieldValidityChange: p, onFieldCustomErrorsChange: x, onFieldValiditionClear: b } = n, C = y(async (c) => {
|
|
339
|
+
if (pt(c.validity)) {
|
|
340
|
+
const m = H(c.validity);
|
|
341
|
+
p(v, m);
|
|
342
|
+
return;
|
|
343
|
+
}
|
|
344
|
+
const h = c.form ? new FormData(c.form) : new FormData(), F = [
|
|
345
|
+
c.value,
|
|
346
|
+
h
|
|
347
|
+
], I = [], M = [];
|
|
348
|
+
$.forEach((m) => {
|
|
349
|
+
mt(m, F) ? M.push(m) : vt(m) && I.push(m);
|
|
350
|
+
});
|
|
351
|
+
const T = I.map(({ id: m, match: g }) => [
|
|
352
|
+
m,
|
|
353
|
+
g(...F)
|
|
354
|
+
]), P = Object.fromEntries(T), R = Object.values(P).some(Boolean), d = R;
|
|
355
|
+
c.setCustomValidity(d ? ne : "");
|
|
356
|
+
const f = H(c.validity);
|
|
357
|
+
if (p(v, f), x(v, P), !R && M.length > 0) {
|
|
358
|
+
const m = M.map(
|
|
359
|
+
({ id: Ie, match: Me }) => Me(...F).then(
|
|
360
|
+
(Le) => [
|
|
361
|
+
Ie,
|
|
362
|
+
Le
|
|
363
|
+
]
|
|
364
|
+
)
|
|
365
|
+
), g = await Promise.all(m), L = Object.fromEntries(g), Se = Object.values(L).some(Boolean);
|
|
366
|
+
c.setCustomValidity(Se ? ne : "");
|
|
367
|
+
const _e = H(c.validity);
|
|
368
|
+
p(v, _e), x(v, L);
|
|
369
|
+
}
|
|
370
|
+
}, [
|
|
371
|
+
$,
|
|
372
|
+
v,
|
|
373
|
+
x,
|
|
374
|
+
p
|
|
375
|
+
]);
|
|
376
|
+
N(() => {
|
|
377
|
+
const c = a.current;
|
|
378
|
+
if (c) {
|
|
379
|
+
const h = () => C(c);
|
|
380
|
+
return c.addEventListener("change", h), () => c.removeEventListener("change", h);
|
|
381
|
+
}
|
|
382
|
+
}, [
|
|
383
|
+
C
|
|
384
|
+
]);
|
|
385
|
+
const w = y(() => {
|
|
386
|
+
const c = a.current;
|
|
387
|
+
c && (c.setCustomValidity(""), b(v));
|
|
388
|
+
}, [
|
|
389
|
+
v,
|
|
390
|
+
b
|
|
391
|
+
]);
|
|
392
|
+
N(() => {
|
|
393
|
+
var c;
|
|
394
|
+
const h = (c = a.current) === null || c === void 0 ? void 0 : c.form;
|
|
395
|
+
if (h)
|
|
396
|
+
return h.addEventListener("reset", w), () => h.removeEventListener("reset", w);
|
|
397
|
+
}, [
|
|
398
|
+
w
|
|
399
|
+
]), N(() => {
|
|
400
|
+
const c = a.current, h = c == null ? void 0 : c.closest("form");
|
|
401
|
+
if (h && s.serverInvalid) {
|
|
402
|
+
const F = $e(h);
|
|
403
|
+
F === c && F.focus();
|
|
404
|
+
}
|
|
405
|
+
}, [
|
|
406
|
+
s.serverInvalid
|
|
407
|
+
]);
|
|
408
|
+
const A = n.getFieldValidity(v);
|
|
409
|
+
return /* @__PURE__ */ j(ee.input, k({
|
|
410
|
+
"data-valid": he(A, s.serverInvalid),
|
|
411
|
+
"data-invalid": xe(A, s.serverInvalid),
|
|
412
|
+
"aria-invalid": s.serverInvalid ? !0 : void 0,
|
|
413
|
+
"aria-describedby": i.getFieldDescription(v),
|
|
414
|
+
title: ""
|
|
415
|
+
}, o, {
|
|
416
|
+
ref: u,
|
|
417
|
+
id: E,
|
|
418
|
+
name: v,
|
|
419
|
+
onInvalid: D(e.onInvalid, (c) => {
|
|
420
|
+
const h = c.currentTarget;
|
|
421
|
+
C(h);
|
|
422
|
+
}),
|
|
423
|
+
onChange: D(e.onChange, (c) => {
|
|
424
|
+
w();
|
|
425
|
+
})
|
|
426
|
+
}));
|
|
427
|
+
}), ne = "This value is not valid";
|
|
428
|
+
function H(e) {
|
|
429
|
+
const r = {};
|
|
430
|
+
for (const t in e)
|
|
431
|
+
r[t] = e[t];
|
|
432
|
+
return r;
|
|
433
|
+
}
|
|
434
|
+
function dt(e) {
|
|
435
|
+
return e instanceof HTMLElement;
|
|
436
|
+
}
|
|
437
|
+
function ut(e) {
|
|
438
|
+
return "validity" in e;
|
|
439
|
+
}
|
|
440
|
+
function ft(e) {
|
|
441
|
+
return ut(e) && (e.validity.valid === !1 || e.getAttribute("aria-invalid") === "true");
|
|
442
|
+
}
|
|
443
|
+
function $e(e) {
|
|
444
|
+
const r = e.elements, [t] = Array.from(r).filter(dt).filter(ft);
|
|
445
|
+
return t;
|
|
446
|
+
}
|
|
447
|
+
function mt(e, r) {
|
|
448
|
+
return e.match.constructor.name === "AsyncFunction" || gt(e.match, r);
|
|
449
|
+
}
|
|
450
|
+
function vt(e) {
|
|
451
|
+
return e.match.constructor.name === "Function";
|
|
452
|
+
}
|
|
453
|
+
function gt(e, r) {
|
|
454
|
+
return e(...r) instanceof Promise;
|
|
455
|
+
}
|
|
456
|
+
function pt(e) {
|
|
457
|
+
let r = !1;
|
|
458
|
+
for (const t in e) {
|
|
459
|
+
const o = t;
|
|
460
|
+
if (o !== "valid" && o !== "customError" && e[o]) {
|
|
461
|
+
r = !0;
|
|
462
|
+
break;
|
|
463
|
+
}
|
|
464
|
+
}
|
|
465
|
+
return r;
|
|
466
|
+
}
|
|
467
|
+
function he(e, r) {
|
|
468
|
+
if ((e == null ? void 0 : e.valid) === !0 && !r)
|
|
469
|
+
return !0;
|
|
470
|
+
}
|
|
471
|
+
function xe(e, r) {
|
|
472
|
+
if ((e == null ? void 0 : e.valid) === !1 || r)
|
|
473
|
+
return !0;
|
|
474
|
+
}
|
|
475
|
+
const se = st, $t = lt, ht = ct, xt = ({
|
|
476
|
+
type: e = "text",
|
|
477
|
+
inputRef: r,
|
|
478
|
+
title: t,
|
|
479
|
+
hideTitle: o,
|
|
480
|
+
value: n,
|
|
481
|
+
error: s,
|
|
482
|
+
placeholder: i,
|
|
483
|
+
rightPlaceholder: a,
|
|
484
|
+
hint: u,
|
|
485
|
+
onChange: v,
|
|
486
|
+
onFocus: E,
|
|
487
|
+
onBlur: $,
|
|
488
|
+
clearBg: p = !1,
|
|
489
|
+
className: x = "",
|
|
490
|
+
maxLength: b,
|
|
491
|
+
containerClassName: C = "",
|
|
492
|
+
hintClassName: w = "",
|
|
493
|
+
unstyled: A = !1,
|
|
494
|
+
disabled: c,
|
|
495
|
+
...h
|
|
496
|
+
}) => {
|
|
497
|
+
const F = Ne(), { setFocusState: I } = Te(), M = (L) => {
|
|
498
|
+
E == null || E(L), I(!0);
|
|
499
|
+
}, T = (L) => {
|
|
500
|
+
$ == null || $(L), I(!1);
|
|
501
|
+
}, P = V(
|
|
502
|
+
"relative order-2 flex w-full items-center",
|
|
503
|
+
t && !o && "mt-1.5"
|
|
504
|
+
), R = !A && V(
|
|
505
|
+
"absolute inset-0 rounded-lg border text-grey-300 transition-colors peer-hover:bg-grey-100 peer-focus:border-green peer-focus:bg-white peer-focus:shadow-[0_0_0_2px_rgba(48,207,67,.25)] dark:peer-hover:bg-grey-925 dark:peer-focus:bg-grey-950",
|
|
506
|
+
s ? "border-red bg-white dark:bg-grey-925" : "border-transparent bg-grey-150 dark:bg-grey-900",
|
|
507
|
+
c && "bg-grey-50 peer-hover:bg-grey-50 dark:bg-grey-950 dark:peer-hover:bg-grey-950"
|
|
508
|
+
), d = !A && V(
|
|
509
|
+
"peer z-[1] order-2 h-9 w-full bg-transparent px-3 py-1.5 text-sm placeholder:text-grey-500 dark:placeholder:text-grey-700 md:h-[38px] md:py-2 md:text-md",
|
|
510
|
+
c ? "cursor-not-allowed text-grey-600 opacity-60 dark:text-grey-800" : "dark:text-white",
|
|
511
|
+
a ? "w-0 grow rounded-l-lg" : "rounded-lg",
|
|
512
|
+
x
|
|
513
|
+
), f = !A && V(
|
|
514
|
+
"z-[1] order-3 rounded-r-lg",
|
|
515
|
+
a ? typeof a == "string" ? "flex h-8 items-center py-1 pr-3 text-right text-sm text-grey-500 md:h-9 md:text-base" : "h-9 pr-1" : "pr-2"
|
|
516
|
+
);
|
|
517
|
+
let m = /* @__PURE__ */ l.jsx(l.Fragment, {});
|
|
518
|
+
const g = /* @__PURE__ */ l.jsx(
|
|
519
|
+
"input",
|
|
520
|
+
{
|
|
521
|
+
ref: r,
|
|
522
|
+
className: d || x,
|
|
523
|
+
disabled: c,
|
|
524
|
+
id: F,
|
|
525
|
+
maxLength: b,
|
|
526
|
+
placeholder: i,
|
|
527
|
+
type: e,
|
|
528
|
+
value: n,
|
|
529
|
+
onBlur: T,
|
|
530
|
+
onChange: v,
|
|
531
|
+
onFocus: M,
|
|
532
|
+
...h
|
|
533
|
+
}
|
|
534
|
+
);
|
|
535
|
+
return m = /* @__PURE__ */ l.jsx($t, { name: F, asChild: !0, children: /* @__PURE__ */ l.jsxs("div", { className: P, children: [
|
|
536
|
+
/* @__PURE__ */ l.jsx(ht, { asChild: !0, children: g }),
|
|
537
|
+
!A && !p && /* @__PURE__ */ l.jsx("div", { className: R || "" }),
|
|
538
|
+
a && /* @__PURE__ */ l.jsx("span", { className: f || "", children: a })
|
|
539
|
+
] }) }), w = V(
|
|
540
|
+
"order-3",
|
|
541
|
+
w
|
|
542
|
+
), C = V(
|
|
543
|
+
"flex flex-col",
|
|
544
|
+
C
|
|
545
|
+
), t || u ? /* @__PURE__ */ l.jsx(se, { asChild: !0, children: /* @__PURE__ */ l.jsxs("div", { className: C, children: [
|
|
546
|
+
m,
|
|
547
|
+
t && /* @__PURE__ */ l.jsx(Ue, { className: o ? "sr-only" : "order-1", htmlFor: F, useLabelTag: !0, children: t }),
|
|
548
|
+
u && /* @__PURE__ */ l.jsx(De, { className: w, color: s ? "red" : "default", children: u })
|
|
549
|
+
] }) }) : /* @__PURE__ */ l.jsx(se, { asChild: !0, children: m });
|
|
550
|
+
};
|
|
551
|
+
function bt(e) {
|
|
552
|
+
const r = Q(e);
|
|
553
|
+
return N(() => {
|
|
554
|
+
r.current = e;
|
|
555
|
+
}), O(() => (...t) => {
|
|
556
|
+
var o;
|
|
557
|
+
return (o = r.current) == null ? void 0 : o.call(r, ...t);
|
|
558
|
+
}, []);
|
|
559
|
+
}
|
|
560
|
+
var re = "Avatar", [yt, Tt] = Oe(re), [Ct, be] = yt(re), ye = _(
|
|
561
|
+
(e, r) => {
|
|
562
|
+
const { __scopeAvatar: t, ...o } = e, [n, s] = S("idle");
|
|
563
|
+
return /* @__PURE__ */ l.jsx(
|
|
564
|
+
Ct,
|
|
565
|
+
{
|
|
566
|
+
scope: t,
|
|
567
|
+
imageLoadingStatus: n,
|
|
568
|
+
onImageLoadingStatusChange: s,
|
|
569
|
+
children: /* @__PURE__ */ l.jsx(Z.span, { ...o, ref: r })
|
|
570
|
+
}
|
|
571
|
+
);
|
|
572
|
+
}
|
|
573
|
+
);
|
|
574
|
+
ye.displayName = re;
|
|
575
|
+
var Ce = "AvatarImage", we = _(
|
|
576
|
+
(e, r) => {
|
|
577
|
+
const { __scopeAvatar: t, src: o, onLoadingStatusChange: n = () => {
|
|
578
|
+
}, ...s } = e, i = be(Ce, t), a = wt(o), u = bt((v) => {
|
|
579
|
+
n(v), i.onImageLoadingStatusChange(v);
|
|
580
|
+
});
|
|
581
|
+
return ie(() => {
|
|
582
|
+
a !== "idle" && u(a);
|
|
583
|
+
}, [a, u]), a === "loaded" ? /* @__PURE__ */ l.jsx(Z.img, { ...s, ref: r, src: o }) : null;
|
|
584
|
+
}
|
|
585
|
+
);
|
|
586
|
+
we.displayName = Ce;
|
|
587
|
+
var Fe = "AvatarFallback", Ee = _(
|
|
588
|
+
(e, r) => {
|
|
589
|
+
const { __scopeAvatar: t, delayMs: o, ...n } = e, s = be(Fe, t), [i, a] = S(o === void 0);
|
|
590
|
+
return N(() => {
|
|
591
|
+
if (o !== void 0) {
|
|
592
|
+
const u = window.setTimeout(() => a(!0), o);
|
|
593
|
+
return () => window.clearTimeout(u);
|
|
594
|
+
}
|
|
595
|
+
}, [o]), i && s.imageLoadingStatus !== "loaded" ? /* @__PURE__ */ l.jsx(Z.span, { ...n, ref: r }) : null;
|
|
596
|
+
}
|
|
597
|
+
);
|
|
598
|
+
Ee.displayName = Fe;
|
|
599
|
+
function wt(e) {
|
|
600
|
+
const [r, t] = S("idle");
|
|
601
|
+
return ie(() => {
|
|
602
|
+
if (!e) {
|
|
603
|
+
t("error");
|
|
604
|
+
return;
|
|
605
|
+
}
|
|
606
|
+
let o = !0;
|
|
607
|
+
const n = new window.Image(), s = (i) => () => {
|
|
608
|
+
o && t(i);
|
|
609
|
+
};
|
|
610
|
+
return t("loading"), n.onload = s("loaded"), n.onerror = s("error"), n.src = e, () => {
|
|
611
|
+
o = !1;
|
|
612
|
+
};
|
|
613
|
+
}, [e]), r;
|
|
614
|
+
}
|
|
615
|
+
var Ft = ye, Et = we, jt = Ee;
|
|
616
|
+
const je = ({ image: e, label: r, labelColor: t, bgColor: o, size: n, className: s }) => {
|
|
617
|
+
let i = "", a = " -mb-2 ";
|
|
618
|
+
switch (n) {
|
|
619
|
+
case "sm":
|
|
620
|
+
i = " w-7 h-7 text-sm ";
|
|
621
|
+
break;
|
|
622
|
+
case "lg":
|
|
623
|
+
i = " w-12 h-12 text-xl ";
|
|
624
|
+
break;
|
|
625
|
+
case "xl":
|
|
626
|
+
i = " w-16 h-16 text-2xl ", a = " -mb-3 ";
|
|
627
|
+
break;
|
|
628
|
+
case "2xl":
|
|
629
|
+
i = " w-20 h-20 text-2xl ", a = " -mb-3 ";
|
|
630
|
+
break;
|
|
631
|
+
default:
|
|
632
|
+
i = " w-10 h-10 text-md ";
|
|
633
|
+
break;
|
|
634
|
+
}
|
|
635
|
+
return /* @__PURE__ */ l.jsxs(Ft, { className: `relative inline-flex select-none items-center justify-center overflow-hidden rounded-full align-middle ${i}`, children: [
|
|
636
|
+
e ? /* @__PURE__ */ l.jsx(Et, { className: `absolute z-20 h-full w-full object-cover ${s && s}`, src: e }) : /* @__PURE__ */ l.jsx("span", { className: `${t && `text-${t}`} relative z-10 inline-flex h-full w-full items-center justify-center p-2 font-semibold ${s && s}`, style: o ? { backgroundColor: o } : {}, children: r }),
|
|
637
|
+
/* @__PURE__ */ l.jsx(jt, { asChild: !0, children: /* @__PURE__ */ l.jsx(Be, { className: `${a} absolute z-0 h-full w-full text-grey-300` }) })
|
|
638
|
+
] });
|
|
639
|
+
}, Ae = ({
|
|
640
|
+
id: e,
|
|
641
|
+
title: r,
|
|
642
|
+
detail: t,
|
|
643
|
+
action: o,
|
|
644
|
+
hideActions: n,
|
|
645
|
+
avatar: s,
|
|
646
|
+
className: i,
|
|
647
|
+
testId: a,
|
|
648
|
+
separator: u = !0,
|
|
649
|
+
bgOnHover: v = !0,
|
|
650
|
+
paddingRight: E = !0,
|
|
651
|
+
onClick: $,
|
|
652
|
+
children: p
|
|
653
|
+
}) => {
|
|
654
|
+
const x = (C) => {
|
|
655
|
+
$ == null || $(C);
|
|
656
|
+
}, b = V(
|
|
657
|
+
"group/list-item flex items-center justify-between",
|
|
658
|
+
v && "hover:bg-gradient-to-r hover:from-white hover:to-grey-50 dark:hover:from-black dark:hover:to-grey-950",
|
|
659
|
+
u ? "border-b border-grey-100 last-of-type:border-b-transparent hover:border-grey-200 dark:border-grey-900 dark:hover:border-grey-800" : "border-y border-transparent hover:border-grey-200 first-of-type:hover:border-t-transparent dark:hover:border-grey-800",
|
|
660
|
+
i
|
|
661
|
+
);
|
|
662
|
+
return /* @__PURE__ */ l.jsxs("div", { className: b, "data-testid": a, children: [
|
|
663
|
+
p || /* @__PURE__ */ l.jsxs("div", { className: `flex grow items-center gap-3 ${$ && "cursor-pointer"}`, onClick: x, children: [
|
|
664
|
+
s && s,
|
|
665
|
+
/* @__PURE__ */ l.jsxs("div", { className: "flex grow flex-col py-3 pr-6", id: e, children: [
|
|
666
|
+
/* @__PURE__ */ l.jsx("span", { children: r }),
|
|
667
|
+
t && /* @__PURE__ */ l.jsx("span", { className: "text-xs text-grey-700", children: t })
|
|
668
|
+
] })
|
|
669
|
+
] }),
|
|
670
|
+
o && /* @__PURE__ */ l.jsx("div", { className: `visible py-3 md:pl-6 ${E && "md:pr-6"} ${n ? "group-hover/list-item:visible md:invisible" : ""}`, children: o })
|
|
671
|
+
] });
|
|
672
|
+
};
|
|
673
|
+
function At(e, r, t) {
|
|
674
|
+
var a;
|
|
675
|
+
const n = (a = X().data) == null ? void 0 : a.site, s = (n == null ? void 0 : n.url) ?? window.location.origin, i = new Y(
|
|
676
|
+
new URL(s),
|
|
677
|
+
new URL("/ghost/api/admin/identities/", window.location.origin),
|
|
678
|
+
e
|
|
679
|
+
);
|
|
680
|
+
return ze({
|
|
681
|
+
async mutationFn(u) {
|
|
682
|
+
return i.follow(u);
|
|
683
|
+
},
|
|
684
|
+
onSuccess: r,
|
|
685
|
+
onError: t
|
|
686
|
+
});
|
|
687
|
+
}
|
|
688
|
+
const St = z.create(() => {
|
|
689
|
+
const { updateRoute: e } = J(), r = z.useModal(), [t, o] = S(""), [n, s] = S(null);
|
|
690
|
+
async function i() {
|
|
691
|
+
qe({
|
|
692
|
+
message: "Site followed",
|
|
693
|
+
type: "success"
|
|
694
|
+
}), r.remove(), e("");
|
|
695
|
+
}
|
|
696
|
+
async function a() {
|
|
697
|
+
s(n);
|
|
698
|
+
}
|
|
699
|
+
const u = At("index", i, a);
|
|
700
|
+
return /* @__PURE__ */ l.jsx(
|
|
701
|
+
W,
|
|
702
|
+
{
|
|
703
|
+
afterClose: () => {
|
|
704
|
+
u.reset(), e("");
|
|
705
|
+
},
|
|
706
|
+
cancelLabel: "Cancel",
|
|
707
|
+
okLabel: "Follow",
|
|
708
|
+
size: "sm",
|
|
709
|
+
title: "Follow a Ghost site",
|
|
710
|
+
onOk: () => u.mutate(t),
|
|
711
|
+
children: /* @__PURE__ */ l.jsx("div", { className: "mt-3 flex flex-col gap-4", children: /* @__PURE__ */ l.jsx(
|
|
712
|
+
xt,
|
|
713
|
+
{
|
|
714
|
+
autoFocus: !0,
|
|
715
|
+
error: !!n,
|
|
716
|
+
hint: n,
|
|
717
|
+
placeholder: "@username@hostname",
|
|
718
|
+
title: "Profile name",
|
|
719
|
+
value: t,
|
|
720
|
+
"data-test-new-follower": !0,
|
|
721
|
+
onChange: (v) => o(v.target.value)
|
|
722
|
+
}
|
|
723
|
+
) })
|
|
724
|
+
}
|
|
725
|
+
);
|
|
726
|
+
});
|
|
727
|
+
function _t(e) {
|
|
728
|
+
var s;
|
|
729
|
+
const t = (s = X().data) == null ? void 0 : s.site, o = (t == null ? void 0 : t.url) ?? window.location.origin, n = new Y(
|
|
730
|
+
new URL(o),
|
|
731
|
+
new URL("/ghost/api/admin/identities/", window.location.origin),
|
|
732
|
+
e
|
|
733
|
+
);
|
|
734
|
+
return de({
|
|
735
|
+
queryKey: [`followers:${e}`],
|
|
736
|
+
async queryFn() {
|
|
737
|
+
const i = await n.getFollowers();
|
|
738
|
+
return await Promise.all(i.map((u) => n.getActor(u)));
|
|
739
|
+
}
|
|
740
|
+
});
|
|
741
|
+
}
|
|
742
|
+
const It = ({}) => {
|
|
743
|
+
const { updateRoute: e } = J(), { data: r = [], isLoading: t } = _t("index");
|
|
744
|
+
return /* @__PURE__ */ l.jsx(
|
|
745
|
+
W,
|
|
746
|
+
{
|
|
747
|
+
afterClose: () => {
|
|
748
|
+
e("profile");
|
|
749
|
+
},
|
|
750
|
+
cancelLabel: "",
|
|
751
|
+
footer: !1,
|
|
752
|
+
okLabel: "",
|
|
753
|
+
size: "md",
|
|
754
|
+
title: "Followers",
|
|
755
|
+
topRightContent: "close",
|
|
756
|
+
children: /* @__PURE__ */ l.jsx("div", { className: "mt-3 flex flex-col gap-4 pb-12", children: t ? /* @__PURE__ */ l.jsx("p", { children: "Loading followers..." }) : /* @__PURE__ */ l.jsx(le, { children: r.map((o) => /* @__PURE__ */ l.jsx(
|
|
757
|
+
Ae,
|
|
758
|
+
{
|
|
759
|
+
action: /* @__PURE__ */ l.jsx(ce, { color: "grey", label: "Remove", link: !0 }),
|
|
760
|
+
avatar: /* @__PURE__ */ l.jsx(je, { image: o.icon, size: "sm" }),
|
|
761
|
+
detail: K(o),
|
|
762
|
+
id: "list-item",
|
|
763
|
+
title: o.name || K(o)
|
|
764
|
+
},
|
|
765
|
+
o.id
|
|
766
|
+
)) }) })
|
|
767
|
+
}
|
|
768
|
+
);
|
|
769
|
+
}, Mt = z.create(It);
|
|
770
|
+
function Lt(e) {
|
|
771
|
+
var s;
|
|
772
|
+
const t = (s = X().data) == null ? void 0 : s.site, o = (t == null ? void 0 : t.url) ?? window.location.origin, n = new Y(
|
|
773
|
+
new URL(o),
|
|
774
|
+
new URL("/ghost/api/admin/identities/", window.location.origin),
|
|
775
|
+
e
|
|
776
|
+
);
|
|
777
|
+
return de({
|
|
778
|
+
queryKey: [`following:${e}`],
|
|
779
|
+
async queryFn() {
|
|
780
|
+
return n.getFollowing();
|
|
781
|
+
}
|
|
782
|
+
});
|
|
783
|
+
}
|
|
784
|
+
const kt = ({}) => {
|
|
785
|
+
const { updateRoute: e } = J(), { data: r = [] } = Lt("index");
|
|
786
|
+
return /* @__PURE__ */ l.jsx(
|
|
787
|
+
W,
|
|
788
|
+
{
|
|
789
|
+
afterClose: () => {
|
|
790
|
+
e("profile");
|
|
791
|
+
},
|
|
792
|
+
cancelLabel: "",
|
|
793
|
+
footer: !1,
|
|
794
|
+
okLabel: "",
|
|
795
|
+
size: "md",
|
|
796
|
+
title: "Following",
|
|
797
|
+
topRightContent: "close",
|
|
798
|
+
children: /* @__PURE__ */ l.jsx("div", { className: "mt-3 flex flex-col gap-4 pb-12", children: /* @__PURE__ */ l.jsx(le, { children: r.map((t) => /* @__PURE__ */ l.jsx(
|
|
799
|
+
Ae,
|
|
800
|
+
{
|
|
801
|
+
action: /* @__PURE__ */ l.jsx(ce, { color: "grey", label: "Unfollow", link: !0 }),
|
|
802
|
+
avatar: /* @__PURE__ */ l.jsx(je, { image: t.icon, size: "sm" }),
|
|
803
|
+
detail: K(t),
|
|
804
|
+
id: "list-item",
|
|
805
|
+
title: t.name
|
|
806
|
+
},
|
|
807
|
+
t.id
|
|
808
|
+
)) }) })
|
|
809
|
+
}
|
|
810
|
+
);
|
|
811
|
+
}, Rt = z.create(kt), Ut = { FollowSite: St, ViewFollowing: Rt, ViewFollowers: Mt };
|
|
812
|
+
export {
|
|
813
|
+
Ut as default
|
|
814
|
+
};
|
|
815
|
+
//# sourceMappingURL=modals-c85985ad.mjs.map
|