ghost 5.88.3 → 5.89.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.
- package/components/tryghost-adapter-cache-memory-ttl-5.89.1.tgz +0 -0
- package/components/tryghost-adapter-cache-redis-5.89.1.tgz +0 -0
- package/components/tryghost-adapter-manager-5.89.1.tgz +0 -0
- package/components/tryghost-announcement-bar-settings-5.89.1.tgz +0 -0
- package/components/tryghost-api-framework-5.89.1.tgz +0 -0
- package/components/tryghost-api-version-compatibility-service-5.89.1.tgz +0 -0
- package/components/tryghost-audience-feedback-5.89.1.tgz +0 -0
- package/components/tryghost-bookshelf-repository-5.89.1.tgz +0 -0
- package/components/tryghost-bootstrap-socket-5.89.1.tgz +0 -0
- package/components/tryghost-collections-5.89.1.tgz +0 -0
- package/components/tryghost-constants-5.89.1.tgz +0 -0
- package/components/tryghost-custom-theme-settings-service-5.89.1.tgz +0 -0
- package/components/{tryghost-data-generator-5.88.3.tgz → tryghost-data-generator-5.89.1.tgz} +0 -0
- package/components/tryghost-domain-events-5.89.1.tgz +0 -0
- package/components/tryghost-donations-5.89.1.tgz +0 -0
- package/components/tryghost-dynamic-routing-events-5.89.1.tgz +0 -0
- package/components/{tryghost-email-addresses-5.88.3.tgz → tryghost-email-addresses-5.89.1.tgz} +0 -0
- package/components/tryghost-email-analytics-provider-mailgun-5.89.1.tgz +0 -0
- package/components/tryghost-email-analytics-service-5.89.1.tgz +0 -0
- package/components/tryghost-email-content-generator-5.89.1.tgz +0 -0
- package/components/tryghost-email-events-5.89.1.tgz +0 -0
- package/components/{tryghost-email-service-5.88.3.tgz → tryghost-email-service-5.89.1.tgz} +0 -0
- package/components/tryghost-email-suppression-list-5.89.1.tgz +0 -0
- package/components/tryghost-express-dynamic-redirects-5.89.1.tgz +0 -0
- package/components/tryghost-external-media-inliner-5.89.1.tgz +0 -0
- package/components/tryghost-extract-api-key-5.89.1.tgz +0 -0
- package/components/tryghost-ghost-5.89.1.tgz +0 -0
- package/components/tryghost-html-to-plaintext-5.89.1.tgz +0 -0
- package/components/tryghost-i18n-5.89.1.tgz +0 -0
- package/components/tryghost-importer-handler-content-files-5.89.1.tgz +0 -0
- package/components/tryghost-importer-revue-5.89.1.tgz +0 -0
- package/components/tryghost-in-memory-repository-5.89.1.tgz +0 -0
- package/components/tryghost-job-manager-5.89.1.tgz +0 -0
- package/components/tryghost-link-redirects-5.89.1.tgz +0 -0
- package/components/tryghost-link-replacer-5.89.1.tgz +0 -0
- package/components/tryghost-link-tracking-5.89.1.tgz +0 -0
- package/components/tryghost-magic-link-5.89.1.tgz +0 -0
- package/components/tryghost-mail-events-5.89.1.tgz +0 -0
- package/components/tryghost-mailgun-client-5.89.1.tgz +0 -0
- package/components/tryghost-member-attribution-5.89.1.tgz +0 -0
- package/components/tryghost-member-events-5.89.1.tgz +0 -0
- package/components/tryghost-members-api-5.89.1.tgz +0 -0
- package/components/tryghost-members-csv-5.89.1.tgz +0 -0
- package/components/tryghost-members-events-service-5.89.1.tgz +0 -0
- package/components/{tryghost-members-importer-5.88.3.tgz → tryghost-members-importer-5.89.1.tgz} +0 -0
- package/components/tryghost-members-offers-5.89.1.tgz +0 -0
- package/components/tryghost-members-payments-5.89.1.tgz +0 -0
- package/components/tryghost-members-ssr-5.89.1.tgz +0 -0
- package/components/tryghost-members-stripe-service-5.89.1.tgz +0 -0
- package/components/tryghost-mentions-email-report-5.89.1.tgz +0 -0
- package/components/tryghost-milestones-5.89.1.tgz +0 -0
- package/components/tryghost-minifier-5.89.1.tgz +0 -0
- package/components/tryghost-model-to-domain-event-interceptor-5.89.1.tgz +0 -0
- package/components/tryghost-mw-api-version-mismatch-5.89.1.tgz +0 -0
- package/components/tryghost-mw-cache-control-5.89.1.tgz +0 -0
- package/components/tryghost-mw-error-handler-5.89.1.tgz +0 -0
- package/components/tryghost-mw-session-from-token-5.89.1.tgz +0 -0
- package/components/tryghost-mw-update-user-last-seen-5.89.1.tgz +0 -0
- package/components/tryghost-mw-version-match-5.89.1.tgz +0 -0
- package/components/tryghost-mw-vhost-5.89.1.tgz +0 -0
- package/components/tryghost-nql-filter-expansions-5.89.1.tgz +0 -0
- package/components/tryghost-oembed-service-5.89.1.tgz +0 -0
- package/components/tryghost-package-json-5.89.1.tgz +0 -0
- package/components/tryghost-post-events-5.89.1.tgz +0 -0
- package/components/{tryghost-post-revisions-5.88.3.tgz → tryghost-post-revisions-5.89.1.tgz} +0 -0
- package/components/tryghost-posts-service-5.89.1.tgz +0 -0
- package/components/tryghost-recommendations-5.89.1.tgz +0 -0
- package/components/tryghost-referrers-5.89.1.tgz +0 -0
- package/components/tryghost-security-5.89.1.tgz +0 -0
- package/components/tryghost-session-service-5.89.1.tgz +0 -0
- package/components/tryghost-settings-path-manager-5.89.1.tgz +0 -0
- package/components/tryghost-slack-notifications-5.89.1.tgz +0 -0
- package/components/tryghost-staff-service-5.89.1.tgz +0 -0
- package/components/tryghost-stats-service-5.89.1.tgz +0 -0
- package/components/tryghost-tiers-5.89.1.tgz +0 -0
- package/components/tryghost-update-check-service-5.89.1.tgz +0 -0
- package/components/tryghost-verification-trigger-5.89.1.tgz +0 -0
- package/components/tryghost-version-notifications-data-service-5.89.1.tgz +0 -0
- package/components/tryghost-webmentions-5.89.1.tgz +0 -0
- package/core/built/admin/assets/admin-x-activitypub/admin-x-activitypub.js +2 -2
- package/core/built/admin/assets/admin-x-activitypub/{index-d7494526.mjs → index-980aeac1.mjs} +3107 -3030
- package/core/built/admin/assets/admin-x-activitypub/{modals-8098b85c.mjs → modals-e013f67b.mjs} +182 -191
- package/core/built/admin/assets/admin-x-demo/admin-x-demo.js +2 -2
- package/core/built/admin/assets/admin-x-demo/{index-5e68f89b.mjs → index-71687654.mjs} +801 -796
- package/core/built/admin/assets/admin-x-demo/{modals-f789a6c4.mjs → modals-4b59bbd8.mjs} +2 -2
- package/core/built/admin/assets/admin-x-settings/{CodeEditorView-3601b44e.mjs → CodeEditorView-8dcd0ded.mjs} +2 -2
- package/core/built/admin/assets/admin-x-settings/admin-x-settings.js +2 -2
- package/core/built/admin/assets/admin-x-settings/{index-e7c4aa3c.mjs → index-01e25660.mjs} +2527 -2522
- package/core/built/admin/assets/admin-x-settings/{index-0b24e982.mjs → index-541636a3.mjs} +2365 -2272
- package/core/built/admin/assets/admin-x-settings/{modals-f8ab7cf2.mjs → modals-172c4d1c.mjs} +732 -726
- package/core/built/admin/assets/{chunk.42.0879e40a4de3db25b177.js → chunk.42.a0b3ca84230d788d0e11.js} +209 -196
- package/core/built/admin/assets/{chunk.524.4004209e970256976de7.js → chunk.524.e09e59707739cbab5488.js} +5 -5
- package/core/built/admin/assets/{chunk.582.eab996a9d6616a80727a.js → chunk.582.8aa2a0331d317e552bbe.js} +6 -6
- package/core/built/admin/assets/codemirror/{codemirror-98996fc475bb3df2b1b82dd701d32bc0.js → codemirror-91774021e5e17ea08db5cd2ed9f3e664.js} +5 -5
- package/core/built/admin/assets/{ghost-cb98187b163a0d8b42d752ab890e039a.css → ghost-87438e5801b7bb0f2e3497a68572a529.css} +1 -1
- package/core/built/admin/assets/{ghost-a9fa385e2a92cc3686349b2dea0249d2.js → ghost-b5e602d62644bd997ce54c647953f437.js} +154 -142
- package/core/built/admin/assets/{ghost-dark-0d78b0a11f5c2604992de20c1bfe396f.css → ghost-dark-f0b3a9ea961171ad4f736edbab905a0c.css} +1 -1
- package/core/built/admin/assets/{vendor-051d43ec47258b77ffd2fcc21a6d8c50.js → vendor-35f20b2f9b6201dcd4a00c8acac98aa6.js} +9 -9
- package/core/built/admin/index.html +6 -6
- package/core/frontend/meta/blog-logo.js +1 -1
- package/core/frontend/services/rss/renderer.js +1 -1
- package/core/server/data/migrations/versions/5.89/2024-07-30-19-51-06-backfill-offer-redemptions.js +64 -0
- package/core/server/lib/image/BlogIcon.js +13 -5
- package/core/server/services/members/middleware.js +1 -1
- package/core/server/services/slack.js +3 -3
- package/core/server/services/staff/index.js +2 -0
- package/core/shared/config/env/config.development.json +12 -0
- package/package.json +168 -168
- package/yarn.lock +963 -1076
- package/components/tryghost-adapter-cache-memory-ttl-5.88.3.tgz +0 -0
- package/components/tryghost-adapter-cache-redis-5.88.3.tgz +0 -0
- package/components/tryghost-adapter-manager-5.88.3.tgz +0 -0
- package/components/tryghost-announcement-bar-settings-5.88.3.tgz +0 -0
- package/components/tryghost-api-framework-5.88.3.tgz +0 -0
- package/components/tryghost-api-version-compatibility-service-5.88.3.tgz +0 -0
- package/components/tryghost-audience-feedback-5.88.3.tgz +0 -0
- package/components/tryghost-bookshelf-repository-5.88.3.tgz +0 -0
- package/components/tryghost-bootstrap-socket-5.88.3.tgz +0 -0
- package/components/tryghost-collections-5.88.3.tgz +0 -0
- package/components/tryghost-constants-5.88.3.tgz +0 -0
- package/components/tryghost-custom-theme-settings-service-5.88.3.tgz +0 -0
- package/components/tryghost-domain-events-5.88.3.tgz +0 -0
- package/components/tryghost-donations-5.88.3.tgz +0 -0
- package/components/tryghost-dynamic-routing-events-5.88.3.tgz +0 -0
- package/components/tryghost-email-analytics-provider-mailgun-5.88.3.tgz +0 -0
- package/components/tryghost-email-analytics-service-5.88.3.tgz +0 -0
- package/components/tryghost-email-content-generator-5.88.3.tgz +0 -0
- package/components/tryghost-email-events-5.88.3.tgz +0 -0
- package/components/tryghost-email-suppression-list-5.88.3.tgz +0 -0
- package/components/tryghost-express-dynamic-redirects-5.88.3.tgz +0 -0
- package/components/tryghost-external-media-inliner-5.88.3.tgz +0 -0
- package/components/tryghost-extract-api-key-5.88.3.tgz +0 -0
- package/components/tryghost-ghost-5.88.3.tgz +0 -0
- package/components/tryghost-html-to-plaintext-5.88.3.tgz +0 -0
- package/components/tryghost-i18n-5.88.3.tgz +0 -0
- package/components/tryghost-importer-handler-content-files-5.88.3.tgz +0 -0
- package/components/tryghost-importer-revue-5.88.3.tgz +0 -0
- package/components/tryghost-in-memory-repository-5.88.3.tgz +0 -0
- package/components/tryghost-job-manager-5.88.3.tgz +0 -0
- package/components/tryghost-link-redirects-5.88.3.tgz +0 -0
- package/components/tryghost-link-replacer-5.88.3.tgz +0 -0
- package/components/tryghost-link-tracking-5.88.3.tgz +0 -0
- package/components/tryghost-magic-link-5.88.3.tgz +0 -0
- package/components/tryghost-mail-events-5.88.3.tgz +0 -0
- package/components/tryghost-mailgun-client-5.88.3.tgz +0 -0
- package/components/tryghost-member-attribution-5.88.3.tgz +0 -0
- package/components/tryghost-member-events-5.88.3.tgz +0 -0
- package/components/tryghost-members-api-5.88.3.tgz +0 -0
- package/components/tryghost-members-csv-5.88.3.tgz +0 -0
- package/components/tryghost-members-events-service-5.88.3.tgz +0 -0
- package/components/tryghost-members-offers-5.88.3.tgz +0 -0
- package/components/tryghost-members-payments-5.88.3.tgz +0 -0
- package/components/tryghost-members-ssr-5.88.3.tgz +0 -0
- package/components/tryghost-members-stripe-service-5.88.3.tgz +0 -0
- package/components/tryghost-mentions-email-report-5.88.3.tgz +0 -0
- package/components/tryghost-milestones-5.88.3.tgz +0 -0
- package/components/tryghost-minifier-5.88.3.tgz +0 -0
- package/components/tryghost-model-to-domain-event-interceptor-5.88.3.tgz +0 -0
- package/components/tryghost-mw-api-version-mismatch-5.88.3.tgz +0 -0
- package/components/tryghost-mw-cache-control-5.88.3.tgz +0 -0
- package/components/tryghost-mw-error-handler-5.88.3.tgz +0 -0
- package/components/tryghost-mw-session-from-token-5.88.3.tgz +0 -0
- package/components/tryghost-mw-update-user-last-seen-5.88.3.tgz +0 -0
- package/components/tryghost-mw-version-match-5.88.3.tgz +0 -0
- package/components/tryghost-mw-vhost-5.88.3.tgz +0 -0
- package/components/tryghost-nql-filter-expansions-5.88.3.tgz +0 -0
- package/components/tryghost-oembed-service-5.88.3.tgz +0 -0
- package/components/tryghost-package-json-5.88.3.tgz +0 -0
- package/components/tryghost-post-events-5.88.3.tgz +0 -0
- package/components/tryghost-posts-service-5.88.3.tgz +0 -0
- package/components/tryghost-recommendations-5.88.3.tgz +0 -0
- package/components/tryghost-referrers-5.88.3.tgz +0 -0
- package/components/tryghost-security-5.88.3.tgz +0 -0
- package/components/tryghost-session-service-5.88.3.tgz +0 -0
- package/components/tryghost-settings-path-manager-5.88.3.tgz +0 -0
- package/components/tryghost-slack-notifications-5.88.3.tgz +0 -0
- package/components/tryghost-staff-service-5.88.3.tgz +0 -0
- package/components/tryghost-stats-service-5.88.3.tgz +0 -0
- package/components/tryghost-tiers-5.88.3.tgz +0 -0
- package/components/tryghost-update-check-service-5.88.3.tgz +0 -0
- package/components/tryghost-verification-trigger-5.88.3.tgz +0 -0
- package/components/tryghost-version-notifications-data-service-5.88.3.tgz +0 -0
- package/components/tryghost-webmentions-5.88.3.tgz +0 -0
- /package/core/built/admin/assets/{chunk.42.0879e40a4de3db25b177.js.LICENSE.txt → chunk.42.a0b3ca84230d788d0e11.js.LICENSE.txt} +0 -0
package/core/built/admin/assets/admin-x-settings/{modals-f8ab7cf2.mjs → modals-172c4d1c.mjs}
RENAMED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
var zd = Object.defineProperty;
|
|
2
2
|
var Pd = (e, t, r) => t in e ? zd(e, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : e[t] = r;
|
|
3
3
|
var Ua = (e, t, r) => (Pd(e, typeof t != "symbol" ? t + "" : t, r), r);
|
|
4
|
-
import { j as s, u as ps, a as G, b as ie, H as Ee, c as rr, S as hn, d as ge, F as Yd, e as Ye, R as Je, f as xt, g as it, h as Fd, i as Zd, B as pe, k as Gd, l as Kd, m as xn, n as Xd, E as Wd, o as qd, p as _i, q as Vd, N as ne, M as ze, r as vt, s as _d, t as pt, v as zn, w as $d, T as pr, I as Ge, P as $i, _ as eh, x as th, y as el, z as ye, A as Te, C as rh, D as nh, G as aa, J as gs, K as ws, L as ah, O as je, Q as He, U as ce, V as sh, W as St, X as vr, Y as De, Z as tl, $ as oh, a0 as Le, a1 as ih, a2 as lh, a3 as rl, a4 as Ah, a5 as ch, a6 as nl, a7 as ei, a8 as al, a9 as Ue, aa as ar, ab as uh, ac as kr, ad as sl, ae as Ft, af as It, ag as sa, ah as Ut, ai as dh, aj as ti, ak as ri, al as We, am as ol, an as hh, ao as Pr, ap as Zt, aq as Yt, ar as Ur, as as Gt, at as sr, au as il, av as gr, aw as fh, ax as mh, ay as Pn, az as vn, aA as ph, aB as gh, aC as Me, aD as wh, aE as ll, aF as kn, aG as xh, aH as Wt, aI as vh, aJ as Se, aK as Ie, aL as ve, aM as ee, aN as re, aO as ke, aP as kh, aQ as xs, aR as _r, aS as Al, aT as cl, aU as bh, aV as yh, aW as Eh, aX as Mh, aY as Sh, aZ as Ih, a_ as Jh, a$ as Va, b0 as Th, b1 as Ch, b2 as Dh, b3 as jh, b4 as ul, b5 as dl, b6 as bn, b7 as Rh, b8 as fn, b9 as vs, ba as hl, bb as ni, bc as fl, bd as Oh, be as yn, bf as ks, bg as Qh, bh as Nh, bi as mn, bj as ml, bk as Hh, bl as Uh, bm as Bh, bn as _a, bo as Lh, bp as kt, bq as on, br as bs, bs as zh, bt as Ph, bu as pl, bv as Yh, bw as Fh, bx as Zh, by as Gh, bz as Kh, bA as ai, bB as si, bC as Xh, bD as oi, bE as Wh, bF as qh, bG as Vh, bH as oa, bI as Yn, bJ as $a, bK as _h, bL as $h, bM as gl, bN as ef, bO as wl, bP as tf, bQ as rf, bR as nf, bS as af, bT as Tr, bU as ii, bV as li, bW as sf, bX as of, bY as lf, bZ as Af } from "./index-
|
|
4
|
+
import { j as s, u as ps, a as G, b as ie, H as Ee, c as rr, S as hn, d as ge, F as Yd, e as Ye, R as Je, f as xt, g as it, h as Fd, i as Zd, B as pe, k as Gd, l as Kd, m as xn, n as Xd, E as Wd, o as qd, p as _i, q as Vd, N as ne, M as ze, r as vt, s as _d, t as pt, v as zn, w as $d, T as pr, I as Ge, P as $i, _ as eh, x as th, y as el, z as ye, A as Te, C as rh, D as nh, G as aa, J as gs, K as ws, L as ah, O as je, Q as He, U as ce, V as sh, W as St, X as vr, Y as De, Z as tl, $ as oh, a0 as Le, a1 as ih, a2 as lh, a3 as rl, a4 as Ah, a5 as ch, a6 as nl, a7 as ei, a8 as al, a9 as Ue, aa as ar, ab as uh, ac as kr, ad as sl, ae as Ft, af as It, ag as sa, ah as Ut, ai as dh, aj as ti, ak as ri, al as We, am as ol, an as hh, ao as Pr, ap as Zt, aq as Yt, ar as Ur, as as Gt, at as sr, au as il, av as gr, aw as fh, ax as mh, ay as Pn, az as vn, aA as ph, aB as gh, aC as Me, aD as wh, aE as ll, aF as kn, aG as xh, aH as Wt, aI as vh, aJ as Se, aK as Ie, aL as ve, aM as ee, aN as re, aO as ke, aP as kh, aQ as xs, aR as _r, aS as Al, aT as cl, aU as bh, aV as yh, aW as Eh, aX as Mh, aY as Sh, aZ as Ih, a_ as Jh, a$ as Va, b0 as Th, b1 as Ch, b2 as Dh, b3 as jh, b4 as ul, b5 as dl, b6 as bn, b7 as Rh, b8 as fn, b9 as vs, ba as hl, bb as ni, bc as fl, bd as Oh, be as yn, bf as ks, bg as Qh, bh as Nh, bi as mn, bj as ml, bk as Hh, bl as Uh, bm as Bh, bn as _a, bo as Lh, bp as kt, bq as on, br as bs, bs as zh, bt as Ph, bu as pl, bv as Yh, bw as Fh, bx as Zh, by as Gh, bz as Kh, bA as ai, bB as si, bC as Xh, bD as oi, bE as Wh, bF as qh, bG as Vh, bH as oa, bI as Yn, bJ as $a, bK as _h, bL as $h, bM as gl, bN as ef, bO as wl, bP as tf, bQ as rf, bR as nf, bS as af, bT as Tr, bU as ii, bV as li, bW as sf, bX as of, bY as lf, bZ as Af } from "./index-01e25660.mjs";
|
|
5
5
|
const xl = ({ children: e, ...t }) => /* @__PURE__ */ s.jsx("div", { className: "flex h-full w-full flex-col px-5", ...t, children: /* @__PURE__ */ s.jsx("div", { className: "h-full w-full overflow-hidden rounded-t-[4px] shadow-sm", children: e }) }), vl = ({ children: e, ...t }) => /* @__PURE__ */ s.jsx("div", { className: "flex h-[775px] w-[380px] flex-col rounded-3xl bg-white p-2 shadow-xl dark:bg-grey-900", ...t, children: /* @__PURE__ */ s.jsx("div", { className: "w-100 h-100 grow overflow-auto rounded-2xl border border-grey-100 dark:border-grey-950", children: e }) }), cf = ({ title: e, label: t, value: r, onChange: n, disabled: a, error: o, hint: i, checked: c, separator: l }) => {
|
|
6
6
|
const A = ps(), [u, h] = G(c);
|
|
7
7
|
ie(() => {
|
|
8
8
|
h(c);
|
|
9
9
|
}, [c]);
|
|
10
|
-
const
|
|
11
|
-
const w =
|
|
10
|
+
const m = (p) => {
|
|
11
|
+
const w = p.target.checked;
|
|
12
12
|
h(w), n(w);
|
|
13
13
|
};
|
|
14
14
|
return /* @__PURE__ */ s.jsxs("div", { children: [
|
|
@@ -24,7 +24,7 @@ const xl = ({ children: e, ...t }) => /* @__PURE__ */ s.jsx("div", { className:
|
|
|
24
24
|
id: A,
|
|
25
25
|
type: "checkbox",
|
|
26
26
|
value: r,
|
|
27
|
-
onChange:
|
|
27
|
+
onChange: m
|
|
28
28
|
}
|
|
29
29
|
),
|
|
30
30
|
/* @__PURE__ */ s.jsxs("div", { className: `ml-2 flex flex-col ${i && "mb-2"}`, children: [
|
|
@@ -127,14 +127,14 @@ var gn = function(e, t, r) {
|
|
|
127
127
|
!ln(e) && e.preventDefault();
|
|
128
128
|
}, kl = Je.memo(function(e) {
|
|
129
129
|
var t = e.onMove, r = e.onKey, n = ia(e, ["onMove", "onKey"]), a = Ye(null), o = pn(t), i = pn(r), c = Ye(null), l = Ye(!1), A = xt(function() {
|
|
130
|
-
var
|
|
130
|
+
var p = function(k) {
|
|
131
131
|
ci(k), (ln(k) ? k.touches.length > 0 : k.buttons > 0) && a.current ? o(Ai(a.current, k, c.current)) : x(!1);
|
|
132
132
|
}, w = function() {
|
|
133
133
|
return x(!1);
|
|
134
134
|
};
|
|
135
135
|
function x(k) {
|
|
136
136
|
var y = l.current, I = ts(a.current), C = k ? I.addEventListener : I.removeEventListener;
|
|
137
|
-
C(y ? "touchmove" : "mousemove",
|
|
137
|
+
C(y ? "touchmove" : "mousemove", p), C(y ? "touchend" : "mouseup", w);
|
|
138
138
|
}
|
|
139
139
|
return [function(k) {
|
|
140
140
|
var y = k.nativeEvent, I = a.current;
|
|
@@ -152,10 +152,10 @@ var gn = function(e, t, r) {
|
|
|
152
152
|
var y = k.which || k.keyCode;
|
|
153
153
|
y < 37 || y > 40 || (k.preventDefault(), i({ left: y === 39 ? 0.05 : y === 37 ? -0.05 : 0, top: y === 40 ? 0.05 : y === 38 ? -0.05 : 0 }));
|
|
154
154
|
}, x];
|
|
155
|
-
}, [i, o]), u = A[0], h = A[1],
|
|
155
|
+
}, [i, o]), u = A[0], h = A[1], m = A[2];
|
|
156
156
|
return ie(function() {
|
|
157
|
-
return
|
|
158
|
-
}, [
|
|
157
|
+
return m;
|
|
158
|
+
}, [m]), Je.createElement("div", Yr({}, n, { onTouchStart: u, onMouseDown: u, className: "react-colorful__interactive", ref: a, onKeyDown: h, tabIndex: 0, role: "slider" }));
|
|
159
159
|
}), Es = function(e) {
|
|
160
160
|
return e.filter(Boolean).join(" ");
|
|
161
161
|
}, bl = function(e) {
|
|
@@ -257,14 +257,14 @@ var bf = typeof window < "u" ? Fd : ie, yf = function() {
|
|
|
257
257
|
}, Jf = /^#?([0-9A-F]{3,8})$/i, Tf = function(e) {
|
|
258
258
|
var t = e.color, r = t === void 0 ? "" : t, n = e.onChange, a = e.onBlur, o = e.escape, i = e.validate, c = e.format, l = e.process, A = ia(e, ["color", "onChange", "onBlur", "escape", "validate", "format", "process"]), u = G(function() {
|
|
259
259
|
return o(r);
|
|
260
|
-
}), h = u[0],
|
|
260
|
+
}), h = u[0], m = u[1], p = pn(n), w = pn(a), x = it(function(y) {
|
|
261
261
|
var I = o(y.target.value);
|
|
262
|
-
|
|
263
|
-
}, [o, l, i,
|
|
264
|
-
i(y.target.value) ||
|
|
262
|
+
m(I), i(I) && p(l ? l(I) : I);
|
|
263
|
+
}, [o, l, i, p]), k = it(function(y) {
|
|
264
|
+
i(y.target.value) || m(o(r)), w(y);
|
|
265
265
|
}, [r, o, i, w]);
|
|
266
266
|
return ie(function() {
|
|
267
|
-
|
|
267
|
+
m(o(r));
|
|
268
268
|
}, [r, o]), Je.createElement("input", Yr({}, A, { value: c ? c(h) : h, spellCheck: "false", onChange: x, onBlur: k }));
|
|
269
269
|
}, di = function(e) {
|
|
270
270
|
return "#" + e;
|
|
@@ -280,18 +280,18 @@ var bf = typeof window < "u" ? Fd : ie, yf = function() {
|
|
|
280
280
|
return Je.createElement(Tf, Yr({}, n, { escape: a, format: t ? di : void 0, process: di, validate: o }));
|
|
281
281
|
};
|
|
282
282
|
const El = ({ hexValue: e, eyedropper: t, clearButtonValue: r, containerClassName: n, onChange: a }) => {
|
|
283
|
-
const o = Ye(null), i = it((
|
|
284
|
-
var
|
|
285
|
-
|
|
286
|
-
const k = (
|
|
287
|
-
|
|
283
|
+
const o = Ye(null), i = it((m) => {
|
|
284
|
+
var p, w, x;
|
|
285
|
+
m.stopPropagation();
|
|
286
|
+
const k = (p = o.current) == null ? void 0 : p.querySelector("input");
|
|
287
|
+
m.target !== k && ((x = (w = o.current) == null ? void 0 : w.querySelector("input")) == null || x.focus(), m.preventDefault());
|
|
288
288
|
}, []), c = Ye(!1), l = it(() => {
|
|
289
|
-
var
|
|
290
|
-
c.current = !1, (
|
|
289
|
+
var m, p;
|
|
290
|
+
c.current = !1, (p = (m = o.current) == null ? void 0 : m.querySelector("input")) == null || p.focus(), document.removeEventListener("mouseup", l), document.removeEventListener("touchend", l);
|
|
291
291
|
}, []), A = it(() => {
|
|
292
292
|
c.current = !0, document.addEventListener("mouseup", l), document.addEventListener("touchend", l);
|
|
293
|
-
}, [l]), u = it((
|
|
294
|
-
if (
|
|
293
|
+
}, [l]), u = it((m) => {
|
|
294
|
+
if (m.preventDefault(), !window.EyeDropper)
|
|
295
295
|
return;
|
|
296
296
|
c.current = !0, document.body.style.setProperty("pointer-events", "none"), new window.EyeDropper().open().then((w) => a == null ? void 0 : a(w.sRGBHex)).finally(() => {
|
|
297
297
|
var w, x;
|
|
@@ -299,12 +299,12 @@ const El = ({ hexValue: e, eyedropper: t, clearButtonValue: r, containerClassNam
|
|
|
299
299
|
});
|
|
300
300
|
}, [a]);
|
|
301
301
|
ie(() => {
|
|
302
|
-
var
|
|
303
|
-
(
|
|
302
|
+
var m, p;
|
|
303
|
+
(p = (m = o.current) == null ? void 0 : m.querySelector("input")) == null || p.focus();
|
|
304
304
|
}, []);
|
|
305
305
|
const h = it(() => {
|
|
306
|
-
var
|
|
307
|
-
(
|
|
306
|
+
var m, p;
|
|
307
|
+
(p = (m = o.current) == null ? void 0 : m.querySelector("input")) == null || p.focus();
|
|
308
308
|
}, []);
|
|
309
309
|
return n = ge(
|
|
310
310
|
"mt-2",
|
|
@@ -331,40 +331,40 @@ const El = ({ hexValue: e, eyedropper: t, clearButtonValue: r, containerClassNam
|
|
|
331
331
|
}, Df = Gd({
|
|
332
332
|
colorPickers: []
|
|
333
333
|
}), hi = (e) => e.length === 4 ? e.replace(/#(.)(.)(.)/, "#$1$1$2$2$3$3") : e, An = ({ testId: e, title: t, direction: r, value: n, hint: a, error: o, eyedropper: i, clearButtonValue: c, onChange: l, swatches: A = [], alwaysOpen: u = !1, debounceMs: h }) => {
|
|
334
|
-
const [
|
|
334
|
+
const [m, p] = G(!1), [w, x] = G(n), k = Kd(Df), y = ps();
|
|
335
335
|
ie(() => {
|
|
336
336
|
x((O) => hi(O || "") === n ? O : n);
|
|
337
|
-
}, [n]), ie(() => (k.colorPickers.push({ id: y, setExpanded:
|
|
337
|
+
}, [n]), ie(() => (k.colorPickers.push({ id: y, setExpanded: p }), () => {
|
|
338
338
|
k.colorPickers = k.colorPickers.filter((O) => O.id !== y);
|
|
339
339
|
}), [k, y]), ie(() => {
|
|
340
|
-
if (
|
|
340
|
+
if (m) {
|
|
341
341
|
k.colorPickers.filter((F) => F.id !== y).forEach((F) => F.setExpanded(!1));
|
|
342
342
|
const O = () => {
|
|
343
|
-
|
|
343
|
+
p(!1);
|
|
344
344
|
};
|
|
345
345
|
return document.addEventListener("click", O), () => {
|
|
346
346
|
document.removeEventListener("click", O);
|
|
347
347
|
};
|
|
348
348
|
}
|
|
349
|
-
}, [k, y,
|
|
349
|
+
}, [k, y, m]);
|
|
350
350
|
const I = xt(() => l && h ? xn(l, h) : l, [h, l]), C = (O) => {
|
|
351
351
|
x(O), I == null || I(O ? hi(O) : null);
|
|
352
352
|
};
|
|
353
353
|
let R = /* @__PURE__ */ s.jsx(
|
|
354
354
|
ys,
|
|
355
355
|
{
|
|
356
|
-
isExpanded:
|
|
356
|
+
isExpanded: m,
|
|
357
357
|
swatches: A,
|
|
358
358
|
value: w,
|
|
359
359
|
onSwatchChange: (O) => {
|
|
360
|
-
C(O),
|
|
360
|
+
C(O), p(!1);
|
|
361
361
|
},
|
|
362
|
-
onTogglePicker: () => !u &&
|
|
362
|
+
onTogglePicker: () => !u && p(!m)
|
|
363
363
|
}
|
|
364
364
|
);
|
|
365
365
|
t && (R = /* @__PURE__ */ s.jsxs("div", { className: ge("flex w-full cursor-pointer items-start first:mt-0 dark:text-white", r === "rtl" && "flex-row-reverse"), children: [
|
|
366
366
|
/* @__PURE__ */ s.jsx("div", { className: "shrink-0", children: R }),
|
|
367
|
-
/* @__PURE__ */ s.jsxs("div", { className: ge("flex-1", r === "rtl" ? "pr-2" : "pl-2", a ? "mt-[-2px]" : "mt-[1px]"), onClick: () => !u &&
|
|
367
|
+
/* @__PURE__ */ s.jsxs("div", { className: ge("flex-1", r === "rtl" ? "pr-2" : "pl-2", a ? "mt-[-2px]" : "mt-[1px]"), onClick: () => !u && p(!m), children: [
|
|
368
368
|
t,
|
|
369
369
|
a && /* @__PURE__ */ s.jsx("div", { className: `text-xs ${o ? "text-red" : "text-grey-700"}`, children: a })
|
|
370
370
|
] })
|
|
@@ -372,7 +372,7 @@ const El = ({ hexValue: e, eyedropper: t, clearButtonValue: r, containerClassNam
|
|
|
372
372
|
const U = A.find((O) => O.value === w);
|
|
373
373
|
return /* @__PURE__ */ s.jsxs("div", { className: "mt-2 flex-col", "data-testid": e, onClick: (O) => O.stopPropagation(), children: [
|
|
374
374
|
R,
|
|
375
|
-
(u ||
|
|
375
|
+
(u || m) && /* @__PURE__ */ s.jsx(El, { clearButtonValue: c, eyedropper: i, hexValue: (U == null ? void 0 : U.hex) || w || void 0, onChange: C })
|
|
376
376
|
] });
|
|
377
377
|
};
|
|
378
378
|
function jf(e) {
|
|
@@ -405,60 +405,61 @@ const Rf = function(e) {
|
|
|
405
405
|
onBlur: n,
|
|
406
406
|
placeholder: a,
|
|
407
407
|
nodes: o,
|
|
408
|
-
emojiPicker: i = !0
|
|
408
|
+
emojiPicker: i = !0,
|
|
409
|
+
darkMode: c = !1
|
|
409
410
|
}) => {
|
|
410
|
-
const
|
|
411
|
-
var
|
|
411
|
+
const l = it((x) => {
|
|
412
|
+
var k;
|
|
412
413
|
try {
|
|
413
414
|
_i({
|
|
414
|
-
error:
|
|
415
|
+
error: x,
|
|
415
416
|
tags: { lexical: !0 },
|
|
416
417
|
contexts: {
|
|
417
418
|
koenig: {
|
|
418
|
-
version: (
|
|
419
|
+
version: (k = window["@tryghost/koenig-lexical"]) == null ? void 0 : k.version
|
|
419
420
|
}
|
|
420
421
|
}
|
|
421
422
|
});
|
|
422
|
-
} catch (
|
|
423
|
-
console.error(
|
|
424
|
-
}
|
|
425
|
-
console.error(
|
|
426
|
-
}, []), { setFocusState:
|
|
427
|
-
n && n(),
|
|
428
|
-
},
|
|
429
|
-
|
|
430
|
-
},
|
|
431
|
-
get: (
|
|
423
|
+
} catch (y) {
|
|
424
|
+
console.error(y);
|
|
425
|
+
}
|
|
426
|
+
console.error(x);
|
|
427
|
+
}, []), { setFocusState: A } = Vd(), u = () => {
|
|
428
|
+
n && n(), A(!1);
|
|
429
|
+
}, h = () => {
|
|
430
|
+
A(!0);
|
|
431
|
+
}, m = xt(() => new Proxy({}, {
|
|
432
|
+
get: (x, k) => e.read()[k]
|
|
432
433
|
}), [e]), p = {
|
|
433
|
-
DEFAULT_NODES:
|
|
434
|
-
BASIC_NODES:
|
|
435
|
-
MINIMAL_NODES:
|
|
436
|
-
},
|
|
437
|
-
const
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
}),
|
|
434
|
+
DEFAULT_NODES: m.DEFAULT_TRANSFORMERS,
|
|
435
|
+
BASIC_NODES: m.BASIC_TRANSFORMERS,
|
|
436
|
+
MINIMAL_NODES: m.MINIMAL_TRANSFORMERS
|
|
437
|
+
}, w = (x) => {
|
|
438
|
+
const y = new DOMParser().parseFromString(x, "text/html");
|
|
439
|
+
y.querySelectorAll("*").forEach((C) => {
|
|
440
|
+
C.style.removeProperty("white-space"), C.getAttribute("style") || C.removeAttribute("style");
|
|
441
|
+
}), y.body.innerHTML !== t && (r == null || r(y.body.innerHTML));
|
|
441
442
|
};
|
|
442
443
|
return /* @__PURE__ */ s.jsx(
|
|
443
|
-
|
|
444
|
+
m.KoenigComposer,
|
|
444
445
|
{
|
|
445
|
-
|
|
446
|
-
|
|
446
|
+
darkMode: c,
|
|
447
|
+
nodes: m[o || "DEFAULT_NODES"],
|
|
448
|
+
onError: l,
|
|
447
449
|
children: /* @__PURE__ */ s.jsxs(
|
|
448
|
-
|
|
450
|
+
m.KoenigComposableEditor,
|
|
449
451
|
{
|
|
450
452
|
className: "koenig-lexical koenig-lexical-editor-input",
|
|
451
|
-
darkMode: !1,
|
|
452
453
|
isSnippetsEnabled: !1,
|
|
453
454
|
markdownTransformers: p[o || "DEFAULT_NODES"],
|
|
454
455
|
placeholderClassName: "koenig-lexical-editor-input-placeholder line-clamp-1",
|
|
455
456
|
placeholderText: a,
|
|
456
457
|
singleParagraph: !0,
|
|
457
|
-
onBlur:
|
|
458
|
-
onFocus:
|
|
458
|
+
onBlur: u,
|
|
459
|
+
onFocus: h,
|
|
459
460
|
children: [
|
|
460
|
-
/* @__PURE__ */ s.jsx(
|
|
461
|
-
i ? /* @__PURE__ */ s.jsx(
|
|
461
|
+
/* @__PURE__ */ s.jsx(m.HtmlOutputPlugin, { html: t, setHtml: w }),
|
|
462
|
+
i ? /* @__PURE__ */ s.jsx(m.EmojiPickerPlugin, {}) : null
|
|
462
463
|
]
|
|
463
464
|
}
|
|
464
465
|
)
|
|
@@ -468,8 +469,8 @@ const Rf = function(e) {
|
|
|
468
469
|
className: e,
|
|
469
470
|
...t
|
|
470
471
|
}) => {
|
|
471
|
-
const { fetchKoenigLexical: r } = Xd(),
|
|
472
|
-
return /* @__PURE__ */ s.jsx("div", { className: e || "w-full", children: /* @__PURE__ */ s.jsx("div", { className: "koenig-react-editor w-full [&_*]:!font-inherit [&_*]:!text-inherit", children: /* @__PURE__ */ s.jsx(Wd, { name: "editor", children: /* @__PURE__ */ s.jsx(qd, { fallback: /* @__PURE__ */ s.jsx("p", { className: "koenig-react-editor-loading", children: "Loading editor..." }), children: /* @__PURE__ */ s.jsx(Of, { ...t,
|
|
472
|
+
const { fetchKoenigLexical: r, darkMode: n } = Xd(), a = xt(() => Rf(r), [r]);
|
|
473
|
+
return /* @__PURE__ */ s.jsx("div", { className: e || "w-full", children: /* @__PURE__ */ s.jsx("div", { className: "koenig-react-editor w-full [&_*]:!font-inherit [&_*]:!text-inherit", children: /* @__PURE__ */ s.jsx(Wd, { name: "editor", children: /* @__PURE__ */ s.jsx(qd, { fallback: /* @__PURE__ */ s.jsx("p", { className: "koenig-react-editor-loading", children: "Loading editor..." }), children: /* @__PURE__ */ s.jsx(Of, { ...t, darkMode: n, editor: a }) }) }) }) });
|
|
473
474
|
}, Ms = ({
|
|
474
475
|
title: e,
|
|
475
476
|
hideTitle: t,
|
|
@@ -620,8 +621,8 @@ const Rf = function(e) {
|
|
|
620
621
|
cancelLabel: A = "Cancel",
|
|
621
622
|
okLabel: u = "OK",
|
|
622
623
|
okColor: h = "black",
|
|
623
|
-
previewToolbar:
|
|
624
|
-
leftToolbar:
|
|
624
|
+
previewToolbar: m = !0,
|
|
625
|
+
leftToolbar: p = !0,
|
|
625
626
|
rightToolbar: w = !0,
|
|
626
627
|
deviceSelector: x = !0,
|
|
627
628
|
siteLink: k,
|
|
@@ -660,7 +661,7 @@ const Rf = function(e) {
|
|
|
660
661
|
}
|
|
661
662
|
});
|
|
662
663
|
const [se, ae] = G("desktop");
|
|
663
|
-
if (se === "mobile" && x ? c = /* @__PURE__ */ s.jsx(vl, { "data-testid": "preview-mobile", children: c }) : se === "desktop" && x && (c = /* @__PURE__ */ s.jsx(xl, { "data-testid": "preview-desktop", children: c })),
|
|
664
|
+
if (se === "mobile" && x ? c = /* @__PURE__ */ s.jsx(vl, { "data-testid": "preview-mobile", children: c }) : se === "desktop" && x && (c = /* @__PURE__ */ s.jsx(xl, { "data-testid": "preview-desktop", children: c })), m) {
|
|
664
665
|
let me = /* @__PURE__ */ s.jsx(s.Fragment, {});
|
|
665
666
|
y ? me = /* @__PURE__ */ s.jsx(
|
|
666
667
|
pt,
|
|
@@ -730,8 +731,8 @@ const Rf = function(e) {
|
|
|
730
731
|
"View site ",
|
|
731
732
|
/* @__PURE__ */ s.jsx(Ge, { name: "arrow-top-right", size: "xs" })
|
|
732
733
|
] }) })), c = /* @__PURE__ */ s.jsxs("div", { className: oe, children: [
|
|
733
|
-
|
|
734
|
-
|
|
734
|
+
m && /* @__PURE__ */ s.jsxs("header", { className: "relative flex h-[74px] shrink-0 items-center justify-center px-3 py-5", "data-testid": "design-toolbar", children: [
|
|
735
|
+
p && /* @__PURE__ */ s.jsx("div", { className: "absolute left-5 flex h-full items-center", children: me }),
|
|
735
736
|
w && /* @__PURE__ */ s.jsxs("div", { className: "absolute right-5 flex h-full items-center", children: [
|
|
736
737
|
we,
|
|
737
738
|
de
|
|
@@ -856,29 +857,29 @@ const Rf = function(e) {
|
|
|
856
857
|
r
|
|
857
858
|
] }) });
|
|
858
859
|
}, Il = ({ items: e, setItems: t, blank: r, canAddNewItem: n }) => {
|
|
859
|
-
const [a, o] = G(e.map((
|
|
860
|
+
const [a, o] = G(e.map((m, p) => ({ item: m, id: p.toString() }))), [i, c] = G(r);
|
|
860
861
|
return ie(() => {
|
|
861
|
-
const
|
|
862
|
-
n(i) &&
|
|
862
|
+
const m = a.map(({ item: p }) => p);
|
|
863
|
+
n(i) && m.push(i), eh.isEqual(JSON.parse(JSON.stringify(m)), JSON.parse(JSON.stringify(e))) || t(m);
|
|
863
864
|
}, [a, i, e, t, n]), {
|
|
864
865
|
items: a,
|
|
865
|
-
updateItem: (
|
|
866
|
-
const w = a.map((x) => x.id ===
|
|
866
|
+
updateItem: (m, p) => {
|
|
867
|
+
const w = a.map((x) => x.id === m ? { ...x, item: p } : x);
|
|
867
868
|
o(w), t(w.map((x) => x.item));
|
|
868
869
|
},
|
|
869
870
|
addItem: () => {
|
|
870
871
|
if (n(i)) {
|
|
871
|
-
const
|
|
872
|
-
o(
|
|
872
|
+
const m = a.reduce((w, x) => Math.max(w, parseInt(x.id)), 0), p = a.concat({ item: i, id: (m + 1).toString() });
|
|
873
|
+
o(p), t(p.map((w) => w.item)), c(r);
|
|
873
874
|
}
|
|
874
875
|
},
|
|
875
|
-
removeItem: (
|
|
876
|
-
const
|
|
877
|
-
o(
|
|
876
|
+
removeItem: (m) => {
|
|
877
|
+
const p = a.filter((w) => w.id !== m);
|
|
878
|
+
o(p), t(p.map((w) => w.item));
|
|
878
879
|
},
|
|
879
|
-
moveItem: (
|
|
880
|
-
if (
|
|
881
|
-
const w = a.findIndex((y) => y.id ===
|
|
880
|
+
moveItem: (m, p) => {
|
|
881
|
+
if (m !== p) {
|
|
882
|
+
const w = a.findIndex((y) => y.id === m), x = p ? a.findIndex((y) => y.id === p) : 0, k = th(a, w, x);
|
|
882
883
|
o(k), t(k.map((y) => y.item));
|
|
883
884
|
}
|
|
884
885
|
},
|
|
@@ -917,16 +918,16 @@ var Cl = {
|
|
|
917
918
|
t = e.exports = {};
|
|
918
919
|
const i = t.re = [], c = t.safeRe = [], l = t.src = [], A = t.t = {};
|
|
919
920
|
let u = 0;
|
|
920
|
-
const h = "[a-zA-Z0-9-]",
|
|
921
|
+
const h = "[a-zA-Z0-9-]", m = [
|
|
921
922
|
["\\s", 1],
|
|
922
923
|
["\\d", a],
|
|
923
924
|
[h, n]
|
|
924
|
-
],
|
|
925
|
-
for (const [k, y] of
|
|
925
|
+
], p = (x) => {
|
|
926
|
+
for (const [k, y] of m)
|
|
926
927
|
x = x.split(`${k}*`).join(`${k}{0,${y}}`).split(`${k}+`).join(`${k}{1,${y}}`);
|
|
927
928
|
return x;
|
|
928
929
|
}, w = (x, k, y) => {
|
|
929
|
-
const I =
|
|
930
|
+
const I = p(k), C = u++;
|
|
930
931
|
o(x, C, k), A[x] = C, l[C] = k, i[C] = new RegExp(k, y ? "g" : void 0), c[C] = new RegExp(I, y ? "g" : void 0);
|
|
931
932
|
};
|
|
932
933
|
w("NUMERICIDENTIFIER", "0|[1-9]\\d*"), w("NUMERICIDENTIFIERLOOSE", "\\d+"), w("NONNUMERICIDENTIFIER", `\\d*[a-zA-Z-]${h}*`), w("MAINVERSION", `(${l[A.NUMERICIDENTIFIER]})\\.(${l[A.NUMERICIDENTIFIER]})\\.(${l[A.NUMERICIDENTIFIER]})`), w("MAINVERSIONLOOSE", `(${l[A.NUMERICIDENTIFIERLOOSE]})\\.(${l[A.NUMERICIDENTIFIERLOOSE]})\\.(${l[A.NUMERICIDENTIFIERLOOSE]})`), w("PRERELEASEIDENTIFIER", `(?:${l[A.NUMERICIDENTIFIER]}|${l[A.NONNUMERICIDENTIFIER]})`), w("PRERELEASEIDENTIFIERLOOSE", `(?:${l[A.NUMERICIDENTIFIERLOOSE]}|${l[A.NONNUMERICIDENTIFIER]})`), w("PRERELEASE", `(?:-(${l[A.PRERELEASEIDENTIFIER]}(?:\\.${l[A.PRERELEASEIDENTIFIER]})*))`), w("PRERELEASELOOSE", `(?:-?(${l[A.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${l[A.PRERELEASEIDENTIFIERLOOSE]})*))`), w("BUILDIDENTIFIER", `${h}+`), w("BUILD", `(?:\\+(${l[A.BUILDIDENTIFIER]}(?:\\.${l[A.BUILDIDENTIFIER]})*))`), w("FULLPLAIN", `v?${l[A.MAINVERSION]}${l[A.PRERELEASE]}?${l[A.BUILD]}?`), w("FULL", `^${l[A.FULLPLAIN]}$`), w("LOOSEPLAIN", `[v=\\s]*${l[A.MAINVERSIONLOOSE]}${l[A.PRERELEASELOOSE]}?${l[A.BUILD]}?`), w("LOOSE", `^${l[A.LOOSEPLAIN]}$`), w("GTLT", "((?:<|>)?=?)"), w("XRANGEIDENTIFIERLOOSE", `${l[A.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`), w("XRANGEIDENTIFIER", `${l[A.NUMERICIDENTIFIER]}|x|X|\\*`), w("XRANGEPLAIN", `[v=\\s]*(${l[A.XRANGEIDENTIFIER]})(?:\\.(${l[A.XRANGEIDENTIFIER]})(?:\\.(${l[A.XRANGEIDENTIFIER]})(?:${l[A.PRERELEASE]})?${l[A.BUILD]}?)?)?`), w("XRANGEPLAINLOOSE", `[v=\\s]*(${l[A.XRANGEIDENTIFIERLOOSE]})(?:\\.(${l[A.XRANGEIDENTIFIERLOOSE]})(?:\\.(${l[A.XRANGEIDENTIFIERLOOSE]})(?:${l[A.PRERELEASELOOSE]})?${l[A.BUILD]}?)?)?`), w("XRANGE", `^${l[A.GTLT]}\\s*${l[A.XRANGEPLAIN]}$`), w("XRANGELOOSE", `^${l[A.GTLT]}\\s*${l[A.XRANGEPLAINLOOSE]}$`), w("COERCEPLAIN", `(^|[^\\d])(\\d{1,${r}})(?:\\.(\\d{1,${r}}))?(?:\\.(\\d{1,${r}}))?`), w("COERCE", `${l[A.COERCEPLAIN]}(?:$|[^\\d])`), w("COERCEFULL", l[A.COERCEPLAIN] + `(?:${l[A.PRERELEASE]})?(?:${l[A.BUILD]})?(?:$|[^\\d])`), w("COERCERTL", l[A.COERCE], !0), w("COERCERTLFULL", l[A.COERCEFULL], !0), w("LONETILDE", "(?:~>?)"), w("TILDETRIM", `(\\s*)${l[A.LONETILDE]}\\s+`, !0), t.tildeTrimReplace = "$1~", w("TILDE", `^${l[A.LONETILDE]}${l[A.XRANGEPLAIN]}$`), w("TILDELOOSE", `^${l[A.LONETILDE]}${l[A.XRANGEPLAINLOOSE]}$`), w("LONECARET", "(?:\\^)"), w("CARETTRIM", `(\\s*)${l[A.LONECARET]}\\s+`, !0), t.caretTrimReplace = "$1^", w("CARET", `^${l[A.LONECARET]}${l[A.XRANGEPLAIN]}$`), w("CARETLOOSE", `^${l[A.LONECARET]}${l[A.XRANGEPLAINLOOSE]}$`), w("COMPARATORLOOSE", `^${l[A.GTLT]}\\s*(${l[A.LOOSEPLAIN]})$|^$`), w("COMPARATOR", `^${l[A.GTLT]}\\s*(${l[A.FULLPLAIN]})$|^$`), w("COMPARATORTRIM", `(\\s*)${l[A.GTLT]}\\s*(${l[A.LOOSEPLAIN]}|${l[A.XRANGEPLAIN]})`, !0), t.comparatorTrimReplace = "$1$2$3", w("HYPHENRANGE", `^\\s*(${l[A.XRANGEPLAIN]})\\s+-\\s+(${l[A.XRANGEPLAIN]})\\s*$`), w("HYPHENRANGELOOSE", `^\\s*(${l[A.XRANGEPLAINLOOSE]})\\s+-\\s+(${l[A.XRANGEPLAINLOOSE]})\\s*$`), w("STAR", "(<|>)?=?\\s*\\*"), w("GTE0", "^\\s*>=\\s*0\\.0\\.0\\s*$"), w("GTE0PRE", "^\\s*>=\\s*0\\.0\\.0-0\\s*$");
|
|
@@ -1211,7 +1212,7 @@ const am = ne.create(({}) => {
|
|
|
1211
1212
|
}), sm = "MembersResponseType", Js = aa({
|
|
1212
1213
|
dataType: sm,
|
|
1213
1214
|
path: "/members/"
|
|
1214
|
-
}), om = import("./index-
|
|
1215
|
+
}), om = import("./index-541636a3.mjs").then((e) => e.i);
|
|
1215
1216
|
class jl extends Error {
|
|
1216
1217
|
constructor({ errorType: r, errorDetails: n, message: a }) {
|
|
1217
1218
|
super(a);
|
|
@@ -1234,7 +1235,7 @@ const Zr = () => {
|
|
|
1234
1235
|
var u, h;
|
|
1235
1236
|
const { config: e } = Te(), [t, r] = G(null);
|
|
1236
1237
|
ie(() => {
|
|
1237
|
-
om.then((
|
|
1238
|
+
om.then((m) => r(() => m.default));
|
|
1238
1239
|
}, []);
|
|
1239
1240
|
const { users: n, contributorUsers: a, invites: o, isLoading: i } = gs(), { refetch: c } = Js({
|
|
1240
1241
|
searchParams: { limit: "1" },
|
|
@@ -1243,37 +1244,37 @@ const Zr = () => {
|
|
|
1243
1244
|
searchParams: { filter: "status:active", limit: "1" },
|
|
1244
1245
|
enabled: !1
|
|
1245
1246
|
}), A = xt(() => {
|
|
1246
|
-
var
|
|
1247
|
-
return ((
|
|
1247
|
+
var m, p, w, x;
|
|
1248
|
+
return ((p = (m = e.hostSettings) == null ? void 0 : m.billing) == null ? void 0 : p.enabled) === !0 && ((x = (w = e.hostSettings) == null ? void 0 : w.billing) != null && x.url) ? e.hostSettings.billing.url : "https://ghost.org/help/";
|
|
1248
1249
|
}, [(u = e.hostSettings) == null ? void 0 : u.billing]);
|
|
1249
1250
|
return xt(() => {
|
|
1250
1251
|
var w;
|
|
1251
1252
|
if (!t || !((w = e.hostSettings) != null && w.limits) || i)
|
|
1252
1253
|
return;
|
|
1253
|
-
const
|
|
1254
|
-
return
|
|
1254
|
+
const m = { ...e.hostSettings.limits }, p = new t();
|
|
1255
|
+
return m.staff && (m.staff.currentCountQuery = async () => {
|
|
1255
1256
|
const x = n.filter((y) => y.status !== "inactive" && !a.includes(y)), k = o.filter((y) => y.role !== "Contributor");
|
|
1256
1257
|
return x.length + k.length;
|
|
1257
|
-
}),
|
|
1258
|
+
}), m.members && (m.members.currentCountQuery = async () => {
|
|
1258
1259
|
var k, y;
|
|
1259
1260
|
const { data: x } = await c();
|
|
1260
1261
|
return ((y = (k = x == null ? void 0 : x.meta) == null ? void 0 : k.pagination) == null ? void 0 : y.total) || 0;
|
|
1261
|
-
}),
|
|
1262
|
+
}), m.newsletters && (m.newsletters.currentCountQuery = async () => {
|
|
1262
1263
|
var k;
|
|
1263
1264
|
const { data: { pages: x } = { pages: [] } } = await l();
|
|
1264
1265
|
return ((k = x[0].meta) == null ? void 0 : k.pagination.total) || 0;
|
|
1265
|
-
}),
|
|
1266
|
-
limits:
|
|
1266
|
+
}), p.loadLimits({
|
|
1267
|
+
limits: m,
|
|
1267
1268
|
helpLink: A,
|
|
1268
1269
|
errors: {
|
|
1269
1270
|
HostLimitError: br,
|
|
1270
1271
|
IncorrectUsageError: im
|
|
1271
1272
|
}
|
|
1272
1273
|
}), {
|
|
1273
|
-
isLimited: (x) =>
|
|
1274
|
-
checkWouldGoOverLimit: (x) =>
|
|
1275
|
-
errorIfWouldGoOverLimit: (x, k = {}) =>
|
|
1276
|
-
errorIfIsOverLimit: (x) =>
|
|
1274
|
+
isLimited: (x) => p.isLimited(x),
|
|
1275
|
+
checkWouldGoOverLimit: (x) => p.checkWouldGoOverLimit(x),
|
|
1276
|
+
errorIfWouldGoOverLimit: (x, k = {}) => p.errorIfWouldGoOverLimit(x, k),
|
|
1277
|
+
errorIfIsOverLimit: (x) => p.errorIfIsOverLimit(x)
|
|
1277
1278
|
};
|
|
1278
1279
|
}, [t, (h = e.hostSettings) == null ? void 0 : h.limits, a, c, l, A, o, i, n]);
|
|
1279
1280
|
}, lm = () => {
|
|
@@ -1334,7 +1335,7 @@ const Zr = () => {
|
|
|
1334
1335
|
}
|
|
1335
1336
|
);
|
|
1336
1337
|
}, Am = ne.create(lm), cm = () => {
|
|
1337
|
-
var
|
|
1338
|
+
var p, w;
|
|
1338
1339
|
const e = vt(), { updateRoute: t } = ye(), r = je(), { data: n } = Js({
|
|
1339
1340
|
searchParams: { filter: "newsletters.status:active+email_disabled:0", limit: "1", page: "1", include: "newsletters,labels" }
|
|
1340
1341
|
}), { mutateAsync: a } = sh(), { formState: o, updateForm: i, saveState: c, handleSave: l, errors: A, clearError: u } = St({
|
|
@@ -1369,7 +1370,7 @@ const Zr = () => {
|
|
|
1369
1370
|
throw x;
|
|
1370
1371
|
});
|
|
1371
1372
|
}, [h, e, t]);
|
|
1372
|
-
const
|
|
1373
|
+
const m = (p = n == null ? void 0 : n.meta) == null ? void 0 : p.pagination.total;
|
|
1373
1374
|
return /* @__PURE__ */ s.jsx(
|
|
1374
1375
|
ze,
|
|
1375
1376
|
{
|
|
@@ -1420,7 +1421,7 @@ const Zr = () => {
|
|
|
1420
1421
|
{
|
|
1421
1422
|
checked: o.optInExistingSubscribers,
|
|
1422
1423
|
direction: "rtl",
|
|
1423
|
-
hint: o.optInExistingSubscribers ? `This newsletter will be available to all members. Your ${
|
|
1424
|
+
hint: o.optInExistingSubscribers ? `This newsletter will be available to all members. Your ${m === void 0 ? "" : tl(m)} existing subscriber${((w = n == null ? void 0 : n.meta) == null ? void 0 : w.pagination.total) === 1 ? "" : "s"} will also be opted-in to receive it.` : "The newsletter will be available to all new members. Existing members won’t be subscribed, but may visit their account area to opt-in to future emails.",
|
|
1424
1425
|
label: "Opt-in existing subscribers",
|
|
1425
1426
|
labelStyle: "heading",
|
|
1426
1427
|
onChange: (x) => i((k) => ({ ...k, optInExistingSubscribers: x.target.checked }))
|
|
@@ -1432,7 +1433,7 @@ const Zr = () => {
|
|
|
1432
1433
|
}
|
|
1433
1434
|
);
|
|
1434
1435
|
}, um = ne.create(cm), dm = ({ recommendation: e, animate: t }) => {
|
|
1435
|
-
const r = vt(), { updateRoute: n, route: a } = ye(), { mutateAsync: o } = oh(), i = je(), { formState: c, updateForm: l, handleSave: A, saveState: u, errors: h, clearError:
|
|
1436
|
+
const r = vt(), { updateRoute: n, route: a } = ye(), { mutateAsync: o } = oh(), i = je(), { formState: c, updateForm: l, handleSave: A, saveState: u, errors: h, clearError: m, setErrors: p } = St({
|
|
1436
1437
|
initialState: {
|
|
1437
1438
|
...e
|
|
1438
1439
|
},
|
|
@@ -1499,7 +1500,7 @@ const Zr = () => {
|
|
|
1499
1500
|
}
|
|
1500
1501
|
}
|
|
1501
1502
|
},
|
|
1502
|
-
children: /* @__PURE__ */ s.jsx(Ah, { clearError:
|
|
1503
|
+
children: /* @__PURE__ */ s.jsx(Ah, { clearError: m, errors: h, formState: c, setErrors: p, showURL: !1, updateForm: l })
|
|
1503
1504
|
}
|
|
1504
1505
|
);
|
|
1505
1506
|
}, hm = ne.create(dm), vi = (e) => nl(e).save || "", fm = function(e, t) {
|
|
@@ -1510,7 +1511,7 @@ const Zr = () => {
|
|
|
1510
1511
|
}
|
|
1511
1512
|
return e;
|
|
1512
1513
|
}, mm = ({ searchParams: e, recommendation: t, animate: r }) => {
|
|
1513
|
-
const [n, a] = G(!1), o = vt(), { updateRoute: i } = ye(), { mutateAsync: c } = ch(), l = t ? "" : (e == null ? void 0 : e.get("url")) ?? "", { save: A } = l ? nl(l) : { save: "" }, u = Je.useRef(!1), [h,
|
|
1514
|
+
const [n, a] = G(!1), o = vt(), { updateRoute: i } = ye(), { mutateAsync: c } = ch(), l = t ? "" : (e == null ? void 0 : e.get("url")) ?? "", { save: A } = l ? nl(l) : { save: "" }, u = Je.useRef(!1), [h, m] = Je.useState(!!A), { formState: p, updateForm: w, handleSave: x, errors: k, saveState: y, clearError: I } = St({
|
|
1514
1515
|
initialState: t ?? {
|
|
1515
1516
|
title: "",
|
|
1516
1517
|
url: A || "",
|
|
@@ -1522,9 +1523,9 @@ const Zr = () => {
|
|
|
1522
1523
|
},
|
|
1523
1524
|
onSave: async () => {
|
|
1524
1525
|
let R;
|
|
1525
|
-
R = new URL(
|
|
1526
|
+
R = new URL(p.url);
|
|
1526
1527
|
const U = R.hostname.replace("www.", ""), O = {
|
|
1527
|
-
...
|
|
1528
|
+
...p,
|
|
1528
1529
|
url: R.toString()
|
|
1529
1530
|
}, { recommendations: F = [] } = await c(R);
|
|
1530
1531
|
if (!F || F.length === 0)
|
|
@@ -1539,7 +1540,7 @@ const Zr = () => {
|
|
|
1539
1540
|
},
|
|
1540
1541
|
onValidate: () => {
|
|
1541
1542
|
const R = {};
|
|
1542
|
-
return fm(R,
|
|
1543
|
+
return fm(R, p.url), h && m(Object.keys(R).length === 0), R;
|
|
1543
1544
|
}
|
|
1544
1545
|
}), C = Je.useCallback(async () => {
|
|
1545
1546
|
if (y !== "saving") {
|
|
@@ -1554,14 +1555,14 @@ const Zr = () => {
|
|
|
1554
1555
|
title: U
|
|
1555
1556
|
});
|
|
1556
1557
|
}
|
|
1557
|
-
h &&
|
|
1558
|
+
h && m(!1);
|
|
1558
1559
|
}
|
|
1559
|
-
}, [x, y, h,
|
|
1560
|
+
}, [x, y, h, m]);
|
|
1560
1561
|
return Je.useEffect(() => {
|
|
1561
1562
|
h && !u.current && (u.current = !0, C());
|
|
1562
1563
|
}, [h, C]), ie(() => {
|
|
1563
1564
|
n && (C(), a(!1));
|
|
1564
|
-
}, [
|
|
1565
|
+
}, [p]), h ? /* @__PURE__ */ s.jsx(
|
|
1565
1566
|
ze,
|
|
1566
1567
|
{
|
|
1567
1568
|
afterClose: () => {
|
|
@@ -1613,16 +1614,16 @@ const Zr = () => {
|
|
|
1613
1614
|
maxLength: 2e3,
|
|
1614
1615
|
placeholder: "https://www.example.com",
|
|
1615
1616
|
title: "URL",
|
|
1616
|
-
value:
|
|
1617
|
+
value: p.url,
|
|
1617
1618
|
onBlur: () => {
|
|
1618
|
-
const R = vi(
|
|
1619
|
+
const R = vi(p.url);
|
|
1619
1620
|
w((U) => ({ ...U, url: R }));
|
|
1620
1621
|
},
|
|
1621
1622
|
onChange: (R) => {
|
|
1622
1623
|
I == null || I("url"), w((U) => ({ ...U, url: R.target.value }));
|
|
1623
1624
|
},
|
|
1624
1625
|
onKeyDown: (R) => {
|
|
1625
|
-
R.key === "Enter" && (R.preventDefault(), w((U) => ({ ...U, url: vi(
|
|
1626
|
+
R.key === "Enter" && (R.preventDefault(), w((U) => ({ ...U, url: vi(p.url) })), a(!0));
|
|
1626
1627
|
}
|
|
1627
1628
|
}
|
|
1628
1629
|
)
|
|
@@ -1648,7 +1649,7 @@ const Zr = () => {
|
|
|
1648
1649
|
ie(() => {
|
|
1649
1650
|
h(r || !1), o(n || null);
|
|
1650
1651
|
}, [r, n]);
|
|
1651
|
-
const
|
|
1652
|
+
const m = async () => {
|
|
1652
1653
|
const w = [
|
|
1653
1654
|
{ key: "amp", value: u },
|
|
1654
1655
|
{ key: "amp_gtag_id", value: a }
|
|
@@ -1665,7 +1666,7 @@ const Zr = () => {
|
|
|
1665
1666
|
} finally {
|
|
1666
1667
|
setTimeout(() => A("Save"), 1e3);
|
|
1667
1668
|
}
|
|
1668
|
-
},
|
|
1669
|
+
}, p = u !== r || a !== n;
|
|
1669
1670
|
return /* @__PURE__ */ s.jsxs(
|
|
1670
1671
|
ze,
|
|
1671
1672
|
{
|
|
@@ -1673,13 +1674,13 @@ const Zr = () => {
|
|
|
1673
1674
|
e("integrations");
|
|
1674
1675
|
},
|
|
1675
1676
|
cancelLabel: "Close",
|
|
1676
|
-
dirty:
|
|
1677
|
+
dirty: p,
|
|
1677
1678
|
okColor: l === "Saved" ? "green" : "black",
|
|
1678
1679
|
okLabel: l,
|
|
1679
1680
|
testId: "amp-modal",
|
|
1680
1681
|
title: "",
|
|
1681
1682
|
onOk: async () => {
|
|
1682
|
-
await
|
|
1683
|
+
await m();
|
|
1683
1684
|
},
|
|
1684
1685
|
children: [
|
|
1685
1686
|
/* @__PURE__ */ s.jsx(
|
|
@@ -1736,34 +1737,34 @@ function gm(e, t) {
|
|
|
1736
1737
|
const Ts = ({ generateContent: e, className: t, height: r, width: n, parentClassName: a, testId: o, addDelay: i = !1 }) => {
|
|
1737
1738
|
const [c, l] = G(0), A = [Ye(null), Ye(null)], [u, h] = G(0);
|
|
1738
1739
|
return ie(() => {
|
|
1739
|
-
const
|
|
1740
|
-
if (
|
|
1741
|
-
e(
|
|
1740
|
+
const m = c === 0 ? 1 : 0, p = A[m].current;
|
|
1741
|
+
if (p) {
|
|
1742
|
+
e(p);
|
|
1742
1743
|
const w = () => {
|
|
1743
1744
|
i ? setTimeout(() => {
|
|
1744
|
-
l(
|
|
1745
|
-
}, 500) : l(
|
|
1745
|
+
l(m);
|
|
1746
|
+
}, 500) : l(m);
|
|
1746
1747
|
};
|
|
1747
|
-
return
|
|
1748
|
-
|
|
1748
|
+
return p.addEventListener("load", w), () => {
|
|
1749
|
+
p.removeEventListener("load", w);
|
|
1749
1750
|
};
|
|
1750
1751
|
}
|
|
1751
1752
|
}, [e]), ie(() => {
|
|
1752
1753
|
var w;
|
|
1753
|
-
const
|
|
1754
|
+
const m = A[c].current, p = gm(() => {
|
|
1754
1755
|
var x;
|
|
1755
|
-
h(((x =
|
|
1756
|
+
h(((x = m == null ? void 0 : m.contentWindow) == null ? void 0 : x.scrollY) || 0);
|
|
1756
1757
|
}, 250);
|
|
1757
|
-
return (w =
|
|
1758
|
+
return (w = m == null ? void 0 : m.contentWindow) == null || w.addEventListener("scroll", p), () => {
|
|
1758
1759
|
var x;
|
|
1759
|
-
(x =
|
|
1760
|
+
(x = m == null ? void 0 : m.contentWindow) == null || x.removeEventListener("scroll", p);
|
|
1760
1761
|
};
|
|
1761
1762
|
}, [c, A]), ie(() => {
|
|
1762
|
-
var
|
|
1763
|
-
const
|
|
1764
|
-
if (
|
|
1763
|
+
var p;
|
|
1764
|
+
const m = A[c].current;
|
|
1765
|
+
if (m)
|
|
1765
1766
|
try {
|
|
1766
|
-
(
|
|
1767
|
+
(p = m.contentWindow) == null || p.scrollTo(0, u);
|
|
1767
1768
|
} catch (w) {
|
|
1768
1769
|
_i(w);
|
|
1769
1770
|
}
|
|
@@ -1813,8 +1814,8 @@ const Ts = ({ generateContent: e, className: t, height: r, width: n, parentClass
|
|
|
1813
1814
|
credentials: "include"
|
|
1814
1815
|
}).then((c) => c.text()).then((c) => {
|
|
1815
1816
|
var x, k, y;
|
|
1816
|
-
const l = "html { pointer-events: none; }", u = new DOMParser().parseFromString(c, "text/html"), h = u.querySelector("style"),
|
|
1817
|
-
h.innerHTML = `${
|
|
1817
|
+
const l = "html { pointer-events: none; }", u = new DOMParser().parseFromString(c, "text/html"), h = u.querySelector("style"), m = h.innerHTML;
|
|
1818
|
+
h.innerHTML = `${m}
|
|
1818
1819
|
|
|
1819
1820
|
${l}`;
|
|
1820
1821
|
let w = (u.doctype ? new XMLSerializer().serializeToString(u.doctype) : "") + u.documentElement.outerHTML;
|
|
@@ -1924,7 +1925,7 @@ ${l}`;
|
|
|
1924
1925
|
)
|
|
1925
1926
|
] });
|
|
1926
1927
|
}, km = () => {
|
|
1927
|
-
const { siteData: e } = Te(), { localSettings: t, updateSetting: r, handleSave: n, okProps: a } = kr({ savingDelay: 500 }), [o] = Ue(t, ["announcement_content"]), [i] = Ue(t, ["accent_color"]), [c] = Ue(t, ["announcement_background"]), [l] = Ue(t, ["announcement_visibility"]), [A] = Ue(t, ["paid_members_enabled"]), u = JSON.parse((l == null ? void 0 : l.toString()) || "[]"), { updateRoute: h } = ye(), [
|
|
1928
|
+
const { siteData: e } = Te(), { localSettings: t, updateSetting: r, handleSave: n, okProps: a } = kr({ savingDelay: 500 }), [o] = Ue(t, ["announcement_content"]), [i] = Ue(t, ["accent_color"]), [c] = Ue(t, ["announcement_background"]), [l] = Ue(t, ["announcement_visibility"]), [A] = Ue(t, ["paid_members_enabled"]), u = JSON.parse((l == null ? void 0 : l.toString()) || "[]"), { updateRoute: h } = ye(), [m, p] = G("homepage"), w = (F) => {
|
|
1928
1929
|
r("announcement_background", F);
|
|
1929
1930
|
}, x = (F, Y) => {
|
|
1930
1931
|
const X = u.indexOf(F);
|
|
@@ -1963,10 +1964,10 @@ ${l}`;
|
|
|
1963
1964
|
{ id: "post", title: "Post" }
|
|
1964
1965
|
]);
|
|
1965
1966
|
const R = (F) => {
|
|
1966
|
-
C.length &&
|
|
1967
|
+
C.length && p(F);
|
|
1967
1968
|
};
|
|
1968
1969
|
let U = Ft(e);
|
|
1969
|
-
switch (
|
|
1970
|
+
switch (m) {
|
|
1970
1971
|
case "homepage":
|
|
1971
1972
|
U = Ft(e);
|
|
1972
1973
|
break;
|
|
@@ -1998,7 +1999,7 @@ ${l}`;
|
|
|
1998
1999
|
preview: O,
|
|
1999
2000
|
previewBgColor: "greygradient",
|
|
2000
2001
|
previewToolbarTabs: C,
|
|
2001
|
-
selectedURL:
|
|
2002
|
+
selectedURL: m,
|
|
2002
2003
|
sidebar: y,
|
|
2003
2004
|
testId: "announcement-bar-modal",
|
|
2004
2005
|
title: "Announcement",
|
|
@@ -2170,7 +2171,7 @@ ${l}`;
|
|
|
2170
2171
|
placeholder: "Custom webhook",
|
|
2171
2172
|
title: "Name",
|
|
2172
2173
|
value: i.name,
|
|
2173
|
-
onChange: (h) => c((
|
|
2174
|
+
onChange: (h) => c((m) => ({ ...m, name: h.target.value })),
|
|
2174
2175
|
onKeyDown: () => u("name")
|
|
2175
2176
|
}
|
|
2176
2177
|
),
|
|
@@ -2186,7 +2187,7 @@ ${l}`;
|
|
|
2186
2187
|
title: "Event",
|
|
2187
2188
|
hideTitle: !0,
|
|
2188
2189
|
onSelect: (h) => {
|
|
2189
|
-
c((
|
|
2190
|
+
c((m) => ({ ...m, event: h == null ? void 0 : h.value })), u("event");
|
|
2190
2191
|
}
|
|
2191
2192
|
}
|
|
2192
2193
|
),
|
|
@@ -2200,7 +2201,7 @@ ${l}`;
|
|
|
2200
2201
|
title: "Target URL",
|
|
2201
2202
|
type: "url",
|
|
2202
2203
|
value: i.target_url,
|
|
2203
|
-
onChange: (h) => c((
|
|
2204
|
+
onChange: (h) => c((m) => ({ ...m, target_url: h.target.value })),
|
|
2204
2205
|
onKeyDown: () => u("target_url")
|
|
2205
2206
|
}
|
|
2206
2207
|
),
|
|
@@ -2211,7 +2212,7 @@ ${l}`;
|
|
|
2211
2212
|
placeholder: "https://example.com",
|
|
2212
2213
|
title: "Secret",
|
|
2213
2214
|
value: i.secret || void 0,
|
|
2214
|
-
onChange: (h) => c((
|
|
2215
|
+
onChange: (h) => c((m) => ({ ...m, secret: h.target.value }))
|
|
2215
2216
|
}
|
|
2216
2217
|
)
|
|
2217
2218
|
]
|
|
@@ -2317,7 +2318,7 @@ ${l}`;
|
|
|
2317
2318
|
}
|
|
2318
2319
|
}), Cm = ({ integration: e }) => {
|
|
2319
2320
|
var U, O;
|
|
2320
|
-
const t = vt(), { updateRoute: r } = ye(), { mutateAsync: n } = hh(), { mutateAsync: a } = Ol(), { mutateAsync: o } = Pr(), i = je(), { formState: c, updateForm: l, handleSave: A, saveState: u, errors: h, clearError:
|
|
2321
|
+
const t = vt(), { updateRoute: r } = ye(), { mutateAsync: n } = hh(), { mutateAsync: a } = Ol(), { mutateAsync: o } = Pr(), i = je(), { formState: c, updateForm: l, handleSave: A, saveState: u, errors: h, clearError: m, okProps: p } = St({
|
|
2321
2322
|
initialState: e,
|
|
2322
2323
|
savingDelay: 500,
|
|
2323
2324
|
savedDelay: 500,
|
|
@@ -2358,11 +2359,11 @@ ${l}`;
|
|
|
2358
2359
|
afterClose: () => {
|
|
2359
2360
|
r("integrations");
|
|
2360
2361
|
},
|
|
2361
|
-
buttonsDisabled:
|
|
2362
|
+
buttonsDisabled: p.disabled,
|
|
2362
2363
|
cancelLabel: "Close",
|
|
2363
2364
|
dirty: u === "unsaved",
|
|
2364
|
-
okColor:
|
|
2365
|
-
okLabel:
|
|
2365
|
+
okColor: p.color,
|
|
2366
|
+
okLabel: p.label || "Save",
|
|
2366
2367
|
size: "md",
|
|
2367
2368
|
testId: "custom-integration-modal",
|
|
2368
2369
|
title: c.name || "Custom integration",
|
|
@@ -2402,7 +2403,7 @@ ${l}`;
|
|
|
2402
2403
|
title: "Title",
|
|
2403
2404
|
value: c.name,
|
|
2404
2405
|
onChange: (F) => l((Y) => ({ ...Y, name: F.target.value })),
|
|
2405
|
-
onKeyDown: () =>
|
|
2406
|
+
onKeyDown: () => m("name")
|
|
2406
2407
|
}
|
|
2407
2408
|
),
|
|
2408
2409
|
/* @__PURE__ */ s.jsx(ce, { maxLength: 2e3, title: "Description", value: c.description || "", onChange: (F) => l((Y) => ({ ...Y, description: F.target.value })) }),
|
|
@@ -2604,14 +2605,14 @@ const Zm = ({
|
|
|
2604
2605
|
" is now your active theme"
|
|
2605
2606
|
] })
|
|
2606
2607
|
});
|
|
2607
|
-
} catch (
|
|
2608
|
-
let
|
|
2609
|
-
|
|
2608
|
+
} catch (m) {
|
|
2609
|
+
let p = null;
|
|
2610
|
+
m instanceof gr && ((u = m.response) == null ? void 0 : u.status) === 422 && ((h = m.data) != null && h.errors) ? p = m.data.errors : n(m);
|
|
2610
2611
|
let w = "Invalid Theme", x = /* @__PURE__ */ s.jsx(s.Fragment, { children: "This theme is invalid and cannot be activated. Fix the following errors and re-upload the theme" });
|
|
2611
|
-
|
|
2612
|
+
p && ne.show(Ql, {
|
|
2612
2613
|
title: w,
|
|
2613
2614
|
prompt: x,
|
|
2614
|
-
fatalErrors:
|
|
2615
|
+
fatalErrors: p,
|
|
2615
2616
|
onRetry: async (k) => {
|
|
2616
2617
|
k == null || k.remove(), a();
|
|
2617
2618
|
}
|
|
@@ -2736,20 +2737,20 @@ const Zm = ({
|
|
|
2736
2737
|
return /* @__PURE__ */ s.jsxs("button", { className: "flex cursor-pointer flex-col gap-3 text-left", type: "button", onClick: () => {
|
|
2737
2738
|
e == null || e(l);
|
|
2738
2739
|
}, children: [
|
|
2739
|
-
/* @__PURE__ */ s.jsx("div", { className: "relative w-full bg-grey-100 shadow-md transition-all duration-500 hover:scale-[1.05]", onMouseEnter: () => c(l), onMouseLeave: () => c(null), children: A ? /* @__PURE__ */ s.jsx(s.Fragment, { children: u.map((
|
|
2740
|
+
/* @__PURE__ */ s.jsx("div", { className: "relative w-full bg-grey-100 shadow-md transition-all duration-500 hover:scale-[1.05]", onMouseEnter: () => c(l), onMouseLeave: () => c(null), children: A ? /* @__PURE__ */ s.jsx(s.Fragment, { children: u.map((m, p) => /* @__PURE__ */ s.jsx(
|
|
2740
2741
|
"img",
|
|
2741
2742
|
{
|
|
2742
|
-
alt: `${l.name} Theme - ${
|
|
2743
|
+
alt: `${l.name} Theme - ${m.category}`,
|
|
2743
2744
|
className: ge("h-full w-full object-contain opacity-0 transition-opacity duration-500", {
|
|
2744
|
-
"opacity-100":
|
|
2745
|
-
relative:
|
|
2746
|
-
absolute:
|
|
2747
|
-
"left-0":
|
|
2748
|
-
"top-0":
|
|
2745
|
+
"opacity-100": p === o && h || !h && p === 0,
|
|
2746
|
+
relative: p === o,
|
|
2747
|
+
absolute: p !== o,
|
|
2748
|
+
"left-0": p !== o,
|
|
2749
|
+
"top-0": p !== o
|
|
2749
2750
|
}),
|
|
2750
|
-
src: Pn(
|
|
2751
|
+
src: Pn(m.image, t)
|
|
2751
2752
|
},
|
|
2752
|
-
`theme-variant-${
|
|
2753
|
+
`theme-variant-${m.category.toLowerCase()}`
|
|
2753
2754
|
)) }) : /* @__PURE__ */ s.jsx(
|
|
2754
2755
|
"img",
|
|
2755
2756
|
{
|
|
@@ -2760,9 +2761,9 @@ const Zm = ({
|
|
|
2760
2761
|
) }),
|
|
2761
2762
|
/* @__PURE__ */ s.jsxs("div", { className: "relative mt-3", children: [
|
|
2762
2763
|
/* @__PURE__ */ s.jsx(Ee, { level: 4, children: l.name }),
|
|
2763
|
-
A ? u.map((
|
|
2764
|
-
"opacity-100":
|
|
2765
|
-
}), children:
|
|
2764
|
+
A ? u.map((m, p) => /* @__PURE__ */ s.jsx("span", { className: ge("absolute left-0 translate-y-px text-sm text-grey-700 opacity-0", {
|
|
2765
|
+
"opacity-100": p === o && h || !h && p === 0
|
|
2766
|
+
}), children: m.category })) : /* @__PURE__ */ s.jsx("span", { className: "text-sm text-grey-700", children: l.category })
|
|
2766
2767
|
] })
|
|
2767
2768
|
] }, l.name);
|
|
2768
2769
|
}) }),
|
|
@@ -2805,9 +2806,9 @@ const Zm = ({
|
|
|
2805
2806
|
"Highly recommended to fix, functionality ",
|
|
2806
2807
|
/* @__PURE__ */ s.jsx("strong", { children: "could" }),
|
|
2807
2808
|
" be restricted"
|
|
2808
|
-
] }), title: "Errors", children: (A = r.gscan_errors) == null ? void 0 : A.map((
|
|
2809
|
+
] }), title: "Errors", children: (A = r.gscan_errors) == null ? void 0 : A.map((m) => /* @__PURE__ */ s.jsx(yi, { problem: m })) }) }));
|
|
2809
2810
|
let c = null;
|
|
2810
|
-
r && r.warnings && (c = /* @__PURE__ */ s.jsx("div", { className: "mt-10", children: /* @__PURE__ */ s.jsx(Gt, { title: "Warnings", children: (u = r.warnings) == null ? void 0 : u.map((
|
|
2811
|
+
r && r.warnings && (c = /* @__PURE__ */ s.jsx("div", { className: "mt-10", children: /* @__PURE__ */ s.jsx(Gt, { title: "Warnings", children: (u = r.warnings) == null ? void 0 : u.map((m) => /* @__PURE__ */ s.jsx(yi, { problem: m })) }) }));
|
|
2811
2812
|
let l = `Activate${(h = r.gscan_errors) != null && h.length ? " with errors" : ""}`;
|
|
2812
2813
|
return r.active && (l = "OK"), /* @__PURE__ */ s.jsx(
|
|
2813
2814
|
il,
|
|
@@ -2822,7 +2823,7 @@ const Zm = ({
|
|
|
2822
2823
|
c
|
|
2823
2824
|
] }),
|
|
2824
2825
|
title: e,
|
|
2825
|
-
onOk: async (
|
|
2826
|
+
onOk: async (m) => {
|
|
2826
2827
|
if (!r.active)
|
|
2827
2828
|
try {
|
|
2828
2829
|
const w = (await a(r.name)).themes[0];
|
|
@@ -2834,10 +2835,10 @@ const Zm = ({
|
|
|
2834
2835
|
" is now your active theme."
|
|
2835
2836
|
] })
|
|
2836
2837
|
});
|
|
2837
|
-
} catch (
|
|
2838
|
-
o(
|
|
2838
|
+
} catch (p) {
|
|
2839
|
+
o(p);
|
|
2839
2840
|
}
|
|
2840
|
-
n == null || n(),
|
|
2841
|
+
n == null || n(), m == null || m.remove();
|
|
2841
2842
|
}
|
|
2842
2843
|
}
|
|
2843
2844
|
);
|
|
@@ -2866,9 +2867,9 @@ const Zm = ({
|
|
|
2866
2867
|
value: Si(y)
|
|
2867
2868
|
}));
|
|
2868
2869
|
Ei(e) && (l === void 0 && A(h[0]), u = ((k = Mi(e).find((y) => Si(y) === (l == null ? void 0 : l.value))) == null ? void 0 : k.previewUrl) || u);
|
|
2869
|
-
let
|
|
2870
|
-
t ?
|
|
2871
|
-
const
|
|
2870
|
+
let m = `Install ${e.name}`;
|
|
2871
|
+
t ? m = "Installing..." : Fn(e) && !(r != null && r.active) ? m = `Activate ${e.name}` : r && (m = `Update ${e.name}`);
|
|
2872
|
+
const p = () => {
|
|
2872
2873
|
r && !Fn(e) ? ne.show(We, {
|
|
2873
2874
|
title: "Overwrite theme",
|
|
2874
2875
|
prompt: /* @__PURE__ */ s.jsxs(s.Fragment, { children: [
|
|
@@ -2951,8 +2952,8 @@ const Zm = ({
|
|
|
2951
2952
|
{
|
|
2952
2953
|
color: "green",
|
|
2953
2954
|
disabled: t,
|
|
2954
|
-
label: t ? "Installing..." :
|
|
2955
|
-
onClick:
|
|
2955
|
+
label: t ? "Installing..." : m,
|
|
2956
|
+
onClick: p
|
|
2956
2957
|
}
|
|
2957
2958
|
)
|
|
2958
2959
|
] });
|
|
@@ -2997,9 +2998,9 @@ const Zm = ({
|
|
|
2997
2998
|
I instanceof br && A({ enabled: !1, error: I.message });
|
|
2998
2999
|
}) : A({ enabled: !0 });
|
|
2999
3000
|
}, [o]);
|
|
3000
|
-
const
|
|
3001
|
+
const m = () => {
|
|
3001
3002
|
n(c ? `design/edit?ref=${c}` : "design/edit");
|
|
3002
|
-
},
|
|
3003
|
+
}, p = async (I) => {
|
|
3003
3004
|
const C = I == null ? void 0 : I.name.replace(/\.zip$/, ""), R = r.map((U) => U.name);
|
|
3004
3005
|
Fn({ name: C }) ? ne.show(We, {
|
|
3005
3006
|
title: "Upload failed",
|
|
@@ -3030,9 +3031,9 @@ const Zm = ({
|
|
|
3030
3031
|
onOk: async (U) => {
|
|
3031
3032
|
h(!0);
|
|
3032
3033
|
const O = R.indexOf(C);
|
|
3033
|
-
r.splice(O, 1), await w({ file: I, onActivate:
|
|
3034
|
+
r.splice(O, 1), await w({ file: I, onActivate: m }), h(!1), t("installed"), U == null || U.remove();
|
|
3034
3035
|
}
|
|
3035
|
-
}) : (t("installed"), w({ file: I, onActivate:
|
|
3036
|
+
}) : (t("installed"), w({ file: I, onActivate: m }));
|
|
3036
3037
|
}, w = async ({
|
|
3037
3038
|
file: I,
|
|
3038
3039
|
onActivate: C
|
|
@@ -3097,17 +3098,17 @@ const Zm = ({
|
|
|
3097
3098
|
activeItemClassName: "hidden md:!block md:!visible",
|
|
3098
3099
|
itemClassName: "hidden md:!block md:!visible",
|
|
3099
3100
|
items: [
|
|
3100
|
-
{ label: "Design", onClick:
|
|
3101
|
+
{ label: "Design", onClick: m },
|
|
3101
3102
|
{ label: "Change theme" }
|
|
3102
3103
|
],
|
|
3103
3104
|
separatorClassName: "hidden md:!block md:!visible",
|
|
3104
3105
|
backIcon: !0,
|
|
3105
|
-
onBack:
|
|
3106
|
+
onBack: m
|
|
3106
3107
|
}
|
|
3107
3108
|
), k = () => {
|
|
3108
3109
|
l != null && l.enabled ? ne.show(We, {
|
|
3109
3110
|
title: "Upload theme",
|
|
3110
|
-
prompt: /* @__PURE__ */ s.jsx($m, { onUpload:
|
|
3111
|
+
prompt: /* @__PURE__ */ s.jsx($m, { onUpload: p }),
|
|
3111
3112
|
okLabel: "",
|
|
3112
3113
|
formSheet: !1
|
|
3113
3114
|
}) : ne.show(En, {
|
|
@@ -3166,7 +3167,7 @@ const Zm = ({
|
|
|
3166
3167
|
}
|
|
3167
3168
|
return null;
|
|
3168
3169
|
}, Ii = ({ source: e, themeRef: t }) => {
|
|
3169
|
-
const [r, n] = G("official"), [a, o] = G(null), [i, c] = G("desktop"), [l, A] = G(!1), [u, h] = G(!1), { updateRoute:
|
|
3170
|
+
const [r, n] = G("official"), [a, o] = G(null), [i, c] = G("desktop"), [l, A] = G(!1), [u, h] = G(!1), { updateRoute: m } = ye(), p = vn().getParam("ref"), w = vt(), { data: { themes: x } = {} } = Nl(), { mutateAsync: k } = Lm(), { mutateAsync: y } = js(), I = je(), C = (O) => {
|
|
3170
3171
|
o(O);
|
|
3171
3172
|
};
|
|
3172
3173
|
if (ie(() => {
|
|
@@ -3207,14 +3208,14 @@ const Zm = ({
|
|
|
3207
3208
|
/* @__PURE__ */ s.jsx("span", { className: "capitalize", children: L.themes[0].name }),
|
|
3208
3209
|
" is now your active theme"
|
|
3209
3210
|
] })
|
|
3210
|
-
})), B == null || B.remove(), p
|
|
3211
|
+
})), B == null || B.remove(), m(p ? `design/edit?ref=${p}` : "design/edit");
|
|
3211
3212
|
} catch (Z) {
|
|
3212
3213
|
I(Z);
|
|
3213
3214
|
}
|
|
3214
3215
|
}
|
|
3215
3216
|
});
|
|
3216
3217
|
}
|
|
3217
|
-
}, [t, e, k, I, y,
|
|
3218
|
+
}, [t, e, k, I, y, m, x, u, p]), !x)
|
|
3218
3219
|
return;
|
|
3219
3220
|
let R, U;
|
|
3220
3221
|
return a && (R = x.find((O) => O.name.toLowerCase() === a.name.toLowerCase()), U = async () => {
|
|
@@ -3272,14 +3273,14 @@ const Zm = ({
|
|
|
3272
3273
|
prompt: F,
|
|
3273
3274
|
installedTheme: R,
|
|
3274
3275
|
onActivate: () => {
|
|
3275
|
-
p
|
|
3276
|
+
m(p ? `design/edit?ref=${p}` : "design/edit");
|
|
3276
3277
|
}
|
|
3277
3278
|
});
|
|
3278
3279
|
}), /* @__PURE__ */ s.jsx(
|
|
3279
3280
|
ze,
|
|
3280
3281
|
{
|
|
3281
3282
|
afterClose: () => {
|
|
3282
|
-
p
|
|
3283
|
+
m(p ? `design/edit?ref=${p}` : "design/edit");
|
|
3283
3284
|
},
|
|
3284
3285
|
animate: !1,
|
|
3285
3286
|
cancelLabel: "",
|
|
@@ -3290,7 +3291,7 @@ const Zm = ({
|
|
|
3290
3291
|
title: "",
|
|
3291
3292
|
scrolling: !0,
|
|
3292
3293
|
onCancel: () => {
|
|
3293
|
-
w.remove(),
|
|
3294
|
+
w.remove(), m("");
|
|
3294
3295
|
},
|
|
3295
3296
|
children: /* @__PURE__ */ s.jsx("div", { className: "flex h-full justify-between", children: /* @__PURE__ */ s.jsxs("div", { className: "grow", children: [
|
|
3296
3297
|
a && /* @__PURE__ */ s.jsx(
|
|
@@ -3303,7 +3304,7 @@ const Zm = ({
|
|
|
3303
3304
|
o(null);
|
|
3304
3305
|
},
|
|
3305
3306
|
onClose: () => {
|
|
3306
|
-
|
|
3307
|
+
m("design/edit");
|
|
3307
3308
|
},
|
|
3308
3309
|
onInstall: U
|
|
3309
3310
|
}
|
|
@@ -3362,14 +3363,14 @@ function sp() {
|
|
|
3362
3363
|
Ji = 1;
|
|
3363
3364
|
var e = Je, t = Symbol.for("react.element"), r = Symbol.for("react.fragment"), n = Object.prototype.hasOwnProperty, a = e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, o = { key: !0, ref: !0, __self: !0, __source: !0 };
|
|
3364
3365
|
function i(c, l, A) {
|
|
3365
|
-
var u, h = {},
|
|
3366
|
-
A !== void 0 && (
|
|
3366
|
+
var u, h = {}, m = null, p = null;
|
|
3367
|
+
A !== void 0 && (m = "" + A), l.key !== void 0 && (m = "" + l.key), l.ref !== void 0 && (p = l.ref);
|
|
3367
3368
|
for (u in l)
|
|
3368
3369
|
n.call(l, u) && !o.hasOwnProperty(u) && (h[u] = l[u]);
|
|
3369
3370
|
if (c && c.defaultProps)
|
|
3370
3371
|
for (u in l = c.defaultProps, l)
|
|
3371
3372
|
h[u] === void 0 && (h[u] = l[u]);
|
|
3372
|
-
return { $$typeof: t, type: c, key:
|
|
3373
|
+
return { $$typeof: t, type: c, key: m, ref: p, props: h, _owner: a.current };
|
|
3373
3374
|
}
|
|
3374
3375
|
return $r.Fragment = r, $r.jsx = i, $r.jsxs = i, $r;
|
|
3375
3376
|
}
|
|
@@ -3419,8 +3420,8 @@ const ip = (e) => /* @__PURE__ */ Me("svg", { xmlns: "http://www.w3.org/2000/svg
|
|
|
3419
3420
|
}
|
|
3420
3421
|
);
|
|
3421
3422
|
}, Bl = ({ payload: e, srcUrl: t, links: r, likes: n, user: a, alt: o, urls: i, height: c, width: l, zoomed: A, insertImage: u, selectImg: h }) => {
|
|
3422
|
-
const
|
|
3423
|
-
|
|
3423
|
+
const m = (p) => {
|
|
3424
|
+
p.stopPropagation(), h(A ? null : e);
|
|
3424
3425
|
};
|
|
3425
3426
|
return /* @__PURE__ */ he.jsxs(
|
|
3426
3427
|
"div",
|
|
@@ -3428,7 +3429,7 @@ const ip = (e) => /* @__PURE__ */ Me("svg", { xmlns: "http://www.w3.org/2000/svg
|
|
|
3428
3429
|
className: `relative mb-6 block ${A ? "h-full w-[max-content] cursor-zoom-out" : "w-full cursor-zoom-in"}`,
|
|
3429
3430
|
style: { backgroundColor: e.color || "transparent" },
|
|
3430
3431
|
"data-kg-unsplash-gallery-item": !0,
|
|
3431
|
-
onClick:
|
|
3432
|
+
onClick: m,
|
|
3432
3433
|
children: [
|
|
3433
3434
|
/* @__PURE__ */ he.jsx(
|
|
3434
3435
|
"img",
|
|
@@ -3469,8 +3470,8 @@ const ip = (e) => /* @__PURE__ */ Me("svg", { xmlns: "http://www.w3.org/2000/svg
|
|
|
3469
3470
|
/* @__PURE__ */ he.jsx("img", { alt: "author", className: "mr-2 size-8 rounded-full", src: a.profile_image.medium }),
|
|
3470
3471
|
/* @__PURE__ */ he.jsx("div", { className: "mr-2 truncate font-sans text-sm font-medium text-white", children: a.name })
|
|
3471
3472
|
] }),
|
|
3472
|
-
/* @__PURE__ */ he.jsx(za, { label: "Insert image", "data-kg-unsplash-insert-button": !0, onClick: (
|
|
3473
|
-
|
|
3473
|
+
/* @__PURE__ */ he.jsx(za, { label: "Insert image", "data-kg-unsplash-insert-button": !0, onClick: (p) => {
|
|
3474
|
+
p.stopPropagation(), u({
|
|
3474
3475
|
src: i.regular.replace(/&w=1080/, "&w=2000"),
|
|
3475
3476
|
caption: `<span>Photo by <a href="${a.links.html}">${a.name}</a> / <a href="https://unsplash.com/?utm_source=ghost&utm_medium=referral&utm_campaign=api-credit">Unsplash</a></span>`,
|
|
3476
3477
|
height: c,
|
|
@@ -6359,7 +6360,7 @@ class Ep {
|
|
|
6359
6360
|
}
|
|
6360
6361
|
}
|
|
6361
6362
|
const Mp = ({ onClose: e, onImageInsert: t, unsplashProviderConfig: r }) => {
|
|
6362
|
-
const n = xt(() => r ? new yp(r) : new kp(), [r]), a = xt(() => new bp(n), [n]), o = xt(() => new op(3), []), i = xt(() => new Ep(a, o), [a, o]), c = Ye(null), [l, A] = G(0), [u, h] = G(0), [
|
|
6363
|
+
const n = xt(() => r ? new yp(r) : new kp(), [r]), a = xt(() => new bp(n), [n]), o = xt(() => new op(3), []), i = xt(() => new Ep(a, o), [a, o]), c = Ye(null), [l, A] = G(0), [u, h] = G(0), [m, p] = G(i.searchIsRunning() || !0), w = Ye(!1), [x, k] = G(""), [y, I] = G(null), [C, R] = G([]);
|
|
6363
6364
|
Je.useEffect(() => {
|
|
6364
6365
|
c.current && y === null && u !== 0 && (c.current.scrollTop = u, h(0));
|
|
6365
6366
|
}, [y, l, u]), Je.useEffect(() => {
|
|
@@ -6384,16 +6385,16 @@ const Mp = ({ onClose: e, onImageInsert: t, unsplashProviderConfig: r }) => {
|
|
|
6384
6385
|
if (w.current === !1 || x.length === 0) {
|
|
6385
6386
|
R([]), i.clearPhotos(), await i.loadNew();
|
|
6386
6387
|
const j = i.getColumns();
|
|
6387
|
-
R(j || []), c.current && c.current.scrollTop !== 0 && (c.current.scrollTop = 0),
|
|
6388
|
+
R(j || []), c.current && c.current.scrollTop !== 0 && (c.current.scrollTop = 0), p(!1);
|
|
6388
6389
|
}
|
|
6389
6390
|
}, [i, x]), O = async (j) => {
|
|
6390
6391
|
const J = j.target.value;
|
|
6391
6392
|
J.length > 2 && (I(null), k(J)), J.length === 0 && (k(""), w.current = !1, await U());
|
|
6392
6393
|
}, F = Je.useCallback(async () => {
|
|
6393
6394
|
if (x) {
|
|
6394
|
-
|
|
6395
|
+
p(!0), R([]), i.clearPhotos(), await i.updateSearch(x);
|
|
6395
6396
|
const j = i.getColumns();
|
|
6396
|
-
j && R(j), c.current && c.current.scrollTop !== 0 && (c.current.scrollTop = 0),
|
|
6397
|
+
j && R(j), c.current && c.current.scrollTop !== 0 && (c.current.scrollTop = 0), p(!1);
|
|
6397
6398
|
}
|
|
6398
6399
|
}, [x, i]);
|
|
6399
6400
|
Je.useEffect(() => {
|
|
@@ -6405,9 +6406,9 @@ const Mp = ({ onClose: e, onImageInsert: t, unsplashProviderConfig: r }) => {
|
|
|
6405
6406
|
};
|
|
6406
6407
|
}, [x, F, U]);
|
|
6407
6408
|
const Y = Je.useCallback(async () => {
|
|
6408
|
-
|
|
6409
|
+
p(!0), await i.loadNextPage();
|
|
6409
6410
|
const j = i.getColumns();
|
|
6410
|
-
R(j || []),
|
|
6411
|
+
R(j || []), p(!1);
|
|
6411
6412
|
}, [i]);
|
|
6412
6413
|
Je.useEffect(() => {
|
|
6413
6414
|
const j = c.current;
|
|
@@ -6438,7 +6439,7 @@ const Mp = ({ onClose: e, onImageInsert: t, unsplashProviderConfig: r }) => {
|
|
|
6438
6439
|
error: null,
|
|
6439
6440
|
galleryRef: c,
|
|
6440
6441
|
insertImage: z,
|
|
6441
|
-
isLoading:
|
|
6442
|
+
isLoading: m,
|
|
6442
6443
|
selectImg: X,
|
|
6443
6444
|
zoomed: y
|
|
6444
6445
|
}
|
|
@@ -6454,10 +6455,10 @@ const Mp = ({ onClose: e, onImageInsert: t, unsplashProviderConfig: r }) => {
|
|
|
6454
6455
|
}
|
|
6455
6456
|
) }), Ip = ({ values: e, updateSetting: t }) => {
|
|
6456
6457
|
const { mutateAsync: r } = Pr(), [n, a] = G(e.description), { settings: o } = Te(), [i] = Ue(o, ["unsplash"]), [c, l] = G(!1), { unsplashConfig: A } = wh(), u = je(), h = Ye(
|
|
6457
|
-
xn((
|
|
6458
|
-
t("description",
|
|
6458
|
+
xn((p) => {
|
|
6459
|
+
t("description", p);
|
|
6459
6460
|
}, 500)
|
|
6460
|
-
),
|
|
6461
|
+
), m = ll();
|
|
6461
6462
|
return /* @__PURE__ */ s.jsx("div", { className: "mt-7", children: /* @__PURE__ */ s.jsxs(kn, { children: [
|
|
6462
6463
|
/* @__PURE__ */ s.jsx(
|
|
6463
6464
|
ce,
|
|
@@ -6466,8 +6467,8 @@ const Mp = ({ onClose: e, onImageInsert: t, unsplashProviderConfig: r }) => {
|
|
|
6466
6467
|
maxLength: 200,
|
|
6467
6468
|
title: "Site description",
|
|
6468
6469
|
value: n,
|
|
6469
|
-
onChange: (
|
|
6470
|
-
a(
|
|
6470
|
+
onChange: (p) => {
|
|
6471
|
+
a(p.target.value), h.current(p.target.value);
|
|
6471
6472
|
}
|
|
6472
6473
|
},
|
|
6473
6474
|
"site-description"
|
|
@@ -6480,7 +6481,7 @@ const Mp = ({ onClose: e, onImageInsert: t, unsplashProviderConfig: r }) => {
|
|
|
6480
6481
|
title: /* @__PURE__ */ s.jsx(Ee, { className: "mt-[3px]", grey: !0, level: 6, children: "Accent color" }),
|
|
6481
6482
|
value: e.accentColor,
|
|
6482
6483
|
alwaysOpen: !0,
|
|
6483
|
-
onChange: (
|
|
6484
|
+
onChange: (p) => t("accent_color", p)
|
|
6484
6485
|
}
|
|
6485
6486
|
),
|
|
6486
6487
|
/* @__PURE__ */ s.jsxs("div", { className: `flex justify-between ${e.icon ? "items-start " : "items-end"}`, children: [
|
|
@@ -6499,9 +6500,9 @@ const Mp = ({ onClose: e, onImageInsert: t, unsplashProviderConfig: r }) => {
|
|
|
6499
6500
|
imageURL: e.icon || "",
|
|
6500
6501
|
width: e.icon ? "66px" : "150px",
|
|
6501
6502
|
onDelete: () => t("icon", null),
|
|
6502
|
-
onUpload: async (
|
|
6503
|
+
onUpload: async (p) => {
|
|
6503
6504
|
try {
|
|
6504
|
-
t("icon", Yt(await r({ file:
|
|
6505
|
+
t("icon", Yt(await r({ file: p })));
|
|
6505
6506
|
} catch (w) {
|
|
6506
6507
|
const x = w;
|
|
6507
6508
|
x.response.status === 415 && (x.message = "Unsupported file type"), u(x);
|
|
@@ -6523,9 +6524,9 @@ const Mp = ({ onClose: e, onImageInsert: t, unsplashProviderConfig: r }) => {
|
|
|
6523
6524
|
imageFit: "contain",
|
|
6524
6525
|
imageURL: e.logo || "",
|
|
6525
6526
|
onDelete: () => t("logo", null),
|
|
6526
|
-
onUpload: async (
|
|
6527
|
+
onUpload: async (p) => {
|
|
6527
6528
|
try {
|
|
6528
|
-
t("logo", Yt(await r({ file:
|
|
6529
|
+
t("logo", Yt(await r({ file: p })));
|
|
6529
6530
|
} catch (w) {
|
|
6530
6531
|
const x = w;
|
|
6531
6532
|
x.response.status === 415 && (x.message = "Unsupported file type"), u(x);
|
|
@@ -6547,12 +6548,12 @@ const Mp = ({ onClose: e, onImageInsert: t, unsplashProviderConfig: r }) => {
|
|
|
6547
6548
|
imageURL: e.coverImage || "",
|
|
6548
6549
|
openUnsplash: () => l(!0),
|
|
6549
6550
|
pintura: {
|
|
6550
|
-
isEnabled:
|
|
6551
|
-
openEditor: async () =>
|
|
6551
|
+
isEnabled: m.isEnabled,
|
|
6552
|
+
openEditor: async () => m.openEditor({
|
|
6552
6553
|
image: e.coverImage || "",
|
|
6553
|
-
handleSave: async (
|
|
6554
|
+
handleSave: async (p) => {
|
|
6554
6555
|
try {
|
|
6555
|
-
t("cover_image", Yt(await r({ file:
|
|
6556
|
+
t("cover_image", Yt(await r({ file: p })));
|
|
6556
6557
|
} catch (w) {
|
|
6557
6558
|
u(w);
|
|
6558
6559
|
}
|
|
@@ -6562,9 +6563,9 @@ const Mp = ({ onClose: e, onImageInsert: t, unsplashProviderConfig: r }) => {
|
|
|
6562
6563
|
unsplashButtonClassName: "!top-1 !right-1 z-50",
|
|
6563
6564
|
unsplashEnabled: i,
|
|
6564
6565
|
onDelete: () => t("cover_image", null),
|
|
6565
|
-
onUpload: async (
|
|
6566
|
+
onUpload: async (p) => {
|
|
6566
6567
|
try {
|
|
6567
|
-
t("cover_image", Yt(await r({ file:
|
|
6568
|
+
t("cover_image", Yt(await r({ file: p })));
|
|
6568
6569
|
} catch (w) {
|
|
6569
6570
|
const x = w;
|
|
6570
6571
|
x.response.status === 415 && (x.message = "Unsupported file type"), u(x);
|
|
@@ -6580,8 +6581,8 @@ const Mp = ({ onClose: e, onImageInsert: t, unsplashProviderConfig: r }) => {
|
|
|
6580
6581
|
onClose: () => {
|
|
6581
6582
|
l(!1);
|
|
6582
6583
|
},
|
|
6583
|
-
onImageInsert: (
|
|
6584
|
-
|
|
6584
|
+
onImageInsert: (p) => {
|
|
6585
|
+
p.src && t("cover_image", p.src), l(!1);
|
|
6585
6586
|
}
|
|
6586
6587
|
}
|
|
6587
6588
|
)
|
|
@@ -6664,7 +6665,7 @@ var Ns = { exports: {} }, Ll = { exports: {} };
|
|
|
6664
6665
|
throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
6665
6666
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
|
|
6666
6667
|
}
|
|
6667
|
-
var
|
|
6668
|
+
var m = "null", p = "undefined", w = "bool", x = "boolean", k = "number", y = "string", I = "date", C = "regex", R = "regexp", U = "array", O = "object", F = "function", Y = [m, p, x, k, y, I, R], X = "expression", z = "group", j = "pipeline", J = "projection", B = "query", L = function() {
|
|
6668
6669
|
};
|
|
6669
6670
|
Array.prototype.includes || Object.defineProperty(Array.prototype, "includes", {
|
|
6670
6671
|
value: function(f, g) {
|
|
@@ -6891,8 +6892,8 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
6891
6892
|
return JSON.stringify(d);
|
|
6892
6893
|
case I:
|
|
6893
6894
|
return d.toISOString();
|
|
6894
|
-
case p:
|
|
6895
6895
|
case m:
|
|
6896
|
+
case p:
|
|
6896
6897
|
return f;
|
|
6897
6898
|
case U:
|
|
6898
6899
|
return "[" + d.map(Sr) + "]";
|
|
@@ -7965,7 +7966,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
7965
7966
|
case U:
|
|
7966
7967
|
return q(d);
|
|
7967
7968
|
case 6:
|
|
7968
|
-
case
|
|
7969
|
+
case p:
|
|
7969
7970
|
return P(d);
|
|
7970
7971
|
case 8:
|
|
7971
7972
|
case w:
|
|
@@ -7974,7 +7975,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
7974
7975
|
case I:
|
|
7975
7976
|
return ot(d);
|
|
7976
7977
|
case 10:
|
|
7977
|
-
case
|
|
7978
|
+
case m:
|
|
7978
7979
|
return oe(d);
|
|
7979
7980
|
case 11:
|
|
7980
7981
|
case C:
|
|
@@ -8893,7 +8894,7 @@ Zn.exports;
|
|
|
8893
8894
|
for (B = B || {}, L = j.length; L--; B[j[L]] = J)
|
|
8894
8895
|
;
|
|
8895
8896
|
return B;
|
|
8896
|
-
}, a = [1, 5], o = [1, 7], i = [1, 8], c = [1, 6, 10], l = [1, 9], A = [1, 6, 8, 10], u = [1, 24], h = [1, 25],
|
|
8897
|
+
}, a = [1, 5], o = [1, 7], i = [1, 8], c = [1, 6, 10], l = [1, 9], A = [1, 6, 8, 10], u = [1, 24], h = [1, 25], m = [1, 26], p = [1, 27], w = [1, 28], x = [1, 29], k = [1, 30], y = [1, 17], I = [1, 18], C = [1, 19], R = [21, 22, 23, 24, 25, 29, 30], U = [1, 6, 8, 10, 18], O = [1, 47], F = [6, 18], Y = {
|
|
8897
8898
|
trace: function() {
|
|
8898
8899
|
},
|
|
8899
8900
|
yy: {},
|
|
@@ -9003,7 +9004,7 @@ Zn.exports;
|
|
|
9003
9004
|
break;
|
|
9004
9005
|
}
|
|
9005
9006
|
},
|
|
9006
|
-
table: [{ 3: 1, 4: 2, 5: 3, 7: 4, 9: a, 11: 6, 13: o }, { 1: [3] }, { 1: [2, 1], 6: i }, n(c, [2, 2], { 8: l }), n(A, [2, 4]), { 4: 10, 5: 3, 7: 4, 9: a, 11: 6, 13: o }, { 12: 11, 14: [1, 12], 15: 13, 16: [1, 14], 19: 15, 20: 16, 21: u, 22: h, 23:
|
|
9007
|
+
table: [{ 3: 1, 4: 2, 5: 3, 7: 4, 9: a, 11: 6, 13: o }, { 1: [3] }, { 1: [2, 1], 6: i }, n(c, [2, 2], { 8: l }), n(A, [2, 4]), { 4: 10, 5: 3, 7: 4, 9: a, 11: 6, 13: o }, { 12: 11, 14: [1, 12], 15: 13, 16: [1, 14], 19: 15, 20: 16, 21: u, 22: h, 23: m, 24: p, 25: w, 29: x, 30: k, 33: y, 34: I, 35: C, 36: [1, 20], 37: [1, 21], 38: [1, 22], 39: [1, 23] }, n([14, 16, 21, 22, 23, 24, 25, 29, 30, 33, 34, 35, 36, 37, 38, 39], [2, 8]), { 5: 31, 7: 4, 9: a, 11: 6, 13: o }, { 7: 32, 9: a, 11: 6, 13: o }, { 6: i, 10: [1, 33] }, n(A, [2, 7]), n(R, [2, 29], { 15: 34, 16: [1, 35], 33: y, 34: I, 35: C }), n(A, [2, 10]), { 17: 36, 20: 37, 21: u, 22: h, 23: m, 24: p, 25: w, 29: x, 30: k }, { 20: 38, 21: u, 22: h, 23: m, 24: p, 25: w, 29: x, 30: k }, n(A, [2, 14]), { 30: [1, 39] }, { 30: [1, 40] }, { 30: [1, 41] }, n(R, [2, 30]), n(R, [2, 31]), n(R, [2, 32]), n(R, [2, 33]), n(U, [2, 17]), n(U, [2, 18]), n(U, [2, 19]), n(U, [2, 20]), { 26: 42, 31: [1, 43], 32: [1, 44] }, n(U, [2, 22]), n(U, [2, 23]), n(c, [2, 3], { 8: l }), n(A, [2, 5]), n(A, [2, 6]), n(A, [2, 9]), { 17: 45, 20: 37, 21: u, 22: h, 23: m, 24: p, 25: w, 29: x, 30: k }, { 6: O, 18: [1, 46] }, n(F, [2, 16]), n(A, [2, 13]), n(A, [2, 26]), n(A, [2, 27]), n(A, [2, 28]), { 27: [1, 48] }, { 27: [2, 24] }, { 27: [2, 25] }, { 6: O, 18: [1, 49] }, n(A, [2, 12]), { 20: 50, 21: u, 22: h, 23: m, 24: p, 25: w, 29: x, 30: k }, { 28: [1, 51] }, n(A, [2, 11]), n(F, [2, 15]), n(U, [2, 21])],
|
|
9007
9008
|
defaultActions: { 43: [2, 24], 44: [2, 25] },
|
|
9008
9009
|
parseError: function(J, B) {
|
|
9009
9010
|
if (B.recoverable)
|
|
@@ -9369,7 +9370,7 @@ function Sn(e, t) {
|
|
|
9369
9370
|
function Rr(e, t) {
|
|
9370
9371
|
if (M(2, arguments), !t || Wt(t) !== "object")
|
|
9371
9372
|
return /* @__PURE__ */ new Date(NaN);
|
|
9372
|
-
var r = t.years ? _(t.years) : 0, n = t.months ? _(t.months) : 0, a = t.weeks ? _(t.weeks) : 0, o = t.days ? _(t.days) : 0, i = t.hours ? _(t.hours) : 0, c = t.minutes ? _(t.minutes) : 0, l = t.seconds ? _(t.seconds) : 0, A = T(e), u = n || r ? Sn(A, n + r * 12) : A, h = o || a ? Lt(u, o + a * 7) : u,
|
|
9373
|
+
var r = t.years ? _(t.years) : 0, n = t.months ? _(t.months) : 0, a = t.weeks ? _(t.weeks) : 0, o = t.days ? _(t.days) : 0, i = t.hours ? _(t.hours) : 0, c = t.minutes ? _(t.minutes) : 0, l = t.seconds ? _(t.seconds) : 0, A = T(e), u = n || r ? Sn(A, n + r * 12) : A, h = o || a ? Lt(u, o + a * 7) : u, m = c + i * 60, p = l + m * 60, w = p * 1e3, x = new Date(h.getTime() + w);
|
|
9373
9374
|
return x;
|
|
9374
9375
|
}
|
|
9375
9376
|
function Qr(e) {
|
|
@@ -9418,8 +9419,8 @@ function Mt(e, t) {
|
|
|
9418
9419
|
var u = at(), h = _((r = (n = (a = (o = t == null ? void 0 : t.weekStartsOn) !== null && o !== void 0 ? o : t == null || (i = t.locale) === null || i === void 0 || (c = i.options) === null || c === void 0 ? void 0 : c.weekStartsOn) !== null && a !== void 0 ? a : u.weekStartsOn) !== null && n !== void 0 ? n : (l = u.locale) === null || l === void 0 || (A = l.options) === null || A === void 0 ? void 0 : A.weekStartsOn) !== null && r !== void 0 ? r : 0);
|
|
9419
9420
|
if (!(h >= 0 && h <= 6))
|
|
9420
9421
|
throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");
|
|
9421
|
-
var
|
|
9422
|
-
return
|
|
9422
|
+
var m = T(e), p = m.getDay(), w = (p < h ? 7 : 0) + p - h;
|
|
9423
|
+
return m.setDate(m.getDate() - w), m.setHours(0, 0, 0, 0), m;
|
|
9423
9424
|
}
|
|
9424
9425
|
function Kt(e) {
|
|
9425
9426
|
return M(1, arguments), Mt(e, {
|
|
@@ -9895,8 +9896,8 @@ function iA(e, t) {
|
|
|
9895
9896
|
var u = at(), h = _((r = (n = (a = (o = t == null ? void 0 : t.weekStartsOn) !== null && o !== void 0 ? o : t == null || (i = t.locale) === null || i === void 0 || (c = i.options) === null || c === void 0 ? void 0 : c.weekStartsOn) !== null && a !== void 0 ? a : u.weekStartsOn) !== null && n !== void 0 ? n : (l = u.locale) === null || l === void 0 || (A = l.options) === null || A === void 0 ? void 0 : A.weekStartsOn) !== null && r !== void 0 ? r : 0);
|
|
9896
9897
|
if (!(h >= 0 && h <= 6))
|
|
9897
9898
|
throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");
|
|
9898
|
-
var
|
|
9899
|
-
return
|
|
9899
|
+
var m = T(e), p = m.getDay(), w = (p < h ? -7 : 0) + 6 - (p - h);
|
|
9900
|
+
return m.setDate(m.getDate() + w), m.setHours(23, 59, 59, 999), m;
|
|
9900
9901
|
}
|
|
9901
9902
|
function sg(e) {
|
|
9902
9903
|
return M(1, arguments), iA(e, {
|
|
@@ -9982,28 +9983,28 @@ function xr(e, t) {
|
|
|
9982
9983
|
var u = at(), h = _((r = (n = (a = (o = t == null ? void 0 : t.weekStartsOn) !== null && o !== void 0 ? o : t == null || (i = t.locale) === null || i === void 0 || (c = i.options) === null || c === void 0 ? void 0 : c.weekStartsOn) !== null && a !== void 0 ? a : u.weekStartsOn) !== null && n !== void 0 ? n : (l = u.locale) === null || l === void 0 || (A = l.options) === null || A === void 0 ? void 0 : A.weekStartsOn) !== null && r !== void 0 ? r : 0);
|
|
9983
9984
|
if (!(h >= 0 && h <= 6))
|
|
9984
9985
|
throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");
|
|
9985
|
-
var
|
|
9986
|
-
return
|
|
9986
|
+
var m = T(e), p = m.getUTCDay(), w = (p < h ? 7 : 0) + p - h;
|
|
9987
|
+
return m.setUTCDate(m.getUTCDate() - w), m.setUTCHours(0, 0, 0, 0), m;
|
|
9987
9988
|
}
|
|
9988
9989
|
function eo(e, t) {
|
|
9989
9990
|
var r, n, a, o, i, c, l, A;
|
|
9990
9991
|
M(1, arguments);
|
|
9991
|
-
var u = T(e), h = u.getUTCFullYear(),
|
|
9992
|
-
if (!(
|
|
9992
|
+
var u = T(e), h = u.getUTCFullYear(), m = at(), p = _((r = (n = (a = (o = t == null ? void 0 : t.firstWeekContainsDate) !== null && o !== void 0 ? o : t == null || (i = t.locale) === null || i === void 0 || (c = i.options) === null || c === void 0 ? void 0 : c.firstWeekContainsDate) !== null && a !== void 0 ? a : m.firstWeekContainsDate) !== null && n !== void 0 ? n : (l = m.locale) === null || l === void 0 || (A = l.options) === null || A === void 0 ? void 0 : A.firstWeekContainsDate) !== null && r !== void 0 ? r : 1);
|
|
9993
|
+
if (!(p >= 1 && p <= 7))
|
|
9993
9994
|
throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");
|
|
9994
9995
|
var w = /* @__PURE__ */ new Date(0);
|
|
9995
|
-
w.setUTCFullYear(h + 1, 0,
|
|
9996
|
+
w.setUTCFullYear(h + 1, 0, p), w.setUTCHours(0, 0, 0, 0);
|
|
9996
9997
|
var x = xr(w, t), k = /* @__PURE__ */ new Date(0);
|
|
9997
|
-
k.setUTCFullYear(h, 0,
|
|
9998
|
+
k.setUTCFullYear(h, 0, p), k.setUTCHours(0, 0, 0, 0);
|
|
9998
9999
|
var y = xr(k, t);
|
|
9999
10000
|
return u.getTime() >= x.getTime() ? h + 1 : u.getTime() >= y.getTime() ? h : h - 1;
|
|
10000
10001
|
}
|
|
10001
10002
|
function gg(e, t) {
|
|
10002
10003
|
var r, n, a, o, i, c, l, A;
|
|
10003
10004
|
M(1, arguments);
|
|
10004
|
-
var u = at(), h = _((r = (n = (a = (o = t == null ? void 0 : t.firstWeekContainsDate) !== null && o !== void 0 ? o : t == null || (i = t.locale) === null || i === void 0 || (c = i.options) === null || c === void 0 ? void 0 : c.firstWeekContainsDate) !== null && a !== void 0 ? a : u.firstWeekContainsDate) !== null && n !== void 0 ? n : (l = u.locale) === null || l === void 0 || (A = l.options) === null || A === void 0 ? void 0 : A.firstWeekContainsDate) !== null && r !== void 0 ? r : 1),
|
|
10005
|
-
|
|
10006
|
-
var w = xr(
|
|
10005
|
+
var u = at(), h = _((r = (n = (a = (o = t == null ? void 0 : t.firstWeekContainsDate) !== null && o !== void 0 ? o : t == null || (i = t.locale) === null || i === void 0 || (c = i.options) === null || c === void 0 ? void 0 : c.firstWeekContainsDate) !== null && a !== void 0 ? a : u.firstWeekContainsDate) !== null && n !== void 0 ? n : (l = u.locale) === null || l === void 0 || (A = l.options) === null || A === void 0 ? void 0 : A.firstWeekContainsDate) !== null && r !== void 0 ? r : 1), m = eo(e, t), p = /* @__PURE__ */ new Date(0);
|
|
10006
|
+
p.setUTCFullYear(m, 0, h), p.setUTCHours(0, 0, 0, 0);
|
|
10007
|
+
var w = xr(p, t);
|
|
10007
10008
|
return w;
|
|
10008
10009
|
}
|
|
10009
10010
|
var wg = 6048e5;
|
|
@@ -11118,12 +11119,12 @@ var A0 = {
|
|
|
11118
11119
|
const Xr = A0;
|
|
11119
11120
|
var c0 = /[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g, u0 = /P+p+|P+|p+|''|'(''|[^'])+('|$)|./g, d0 = /^'([^]*?)'?$/, h0 = /''/g, f0 = /[a-zA-Z]/;
|
|
11120
11121
|
function fA(e, t, r) {
|
|
11121
|
-
var n, a, o, i, c, l, A, u, h,
|
|
11122
|
+
var n, a, o, i, c, l, A, u, h, m, p, w, x, k, y, I, C, R;
|
|
11122
11123
|
M(2, arguments);
|
|
11123
|
-
var U = String(t), O = at(), F = (n = (a = r == null ? void 0 : r.locale) !== null && a !== void 0 ? a : O.locale) !== null && n !== void 0 ? n : Xr, Y = _((o = (i = (c = (l = r == null ? void 0 : r.firstWeekContainsDate) !== null && l !== void 0 ? l : r == null || (A = r.locale) === null || A === void 0 || (u = A.options) === null || u === void 0 ? void 0 : u.firstWeekContainsDate) !== null && c !== void 0 ? c : O.firstWeekContainsDate) !== null && i !== void 0 ? i : (h = O.locale) === null || h === void 0 || (
|
|
11124
|
+
var U = String(t), O = at(), F = (n = (a = r == null ? void 0 : r.locale) !== null && a !== void 0 ? a : O.locale) !== null && n !== void 0 ? n : Xr, Y = _((o = (i = (c = (l = r == null ? void 0 : r.firstWeekContainsDate) !== null && l !== void 0 ? l : r == null || (A = r.locale) === null || A === void 0 || (u = A.options) === null || u === void 0 ? void 0 : u.firstWeekContainsDate) !== null && c !== void 0 ? c : O.firstWeekContainsDate) !== null && i !== void 0 ? i : (h = O.locale) === null || h === void 0 || (m = h.options) === null || m === void 0 ? void 0 : m.firstWeekContainsDate) !== null && o !== void 0 ? o : 1);
|
|
11124
11125
|
if (!(Y >= 1 && Y <= 7))
|
|
11125
11126
|
throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");
|
|
11126
|
-
var X = _((
|
|
11127
|
+
var X = _((p = (w = (x = (k = r == null ? void 0 : r.weekStartsOn) !== null && k !== void 0 ? k : r == null || (y = r.locale) === null || y === void 0 || (I = y.options) === null || I === void 0 ? void 0 : I.weekStartsOn) !== null && x !== void 0 ? x : O.weekStartsOn) !== null && w !== void 0 ? w : (C = O.locale) === null || C === void 0 || (R = C.options) === null || R === void 0 ? void 0 : R.weekStartsOn) !== null && p !== void 0 ? p : 0);
|
|
11127
11128
|
if (!(X >= 0 && X <= 6))
|
|
11128
11129
|
throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");
|
|
11129
11130
|
if (!F.localize)
|
|
@@ -11189,27 +11190,27 @@ function pA(e, t, r) {
|
|
|
11189
11190
|
comparison: c
|
|
11190
11191
|
}), A, u;
|
|
11191
11192
|
c > 0 ? (A = T(t), u = T(e)) : (A = T(e), u = T(t));
|
|
11192
|
-
var h = Nr(u, A),
|
|
11193
|
-
if (
|
|
11194
|
-
return r != null && r.includeSeconds ? h < 5 ? i.formatDistance("lessThanXSeconds", 5, l) : h < 10 ? i.formatDistance("lessThanXSeconds", 10, l) : h < 20 ? i.formatDistance("lessThanXSeconds", 20, l) : h < 40 ? i.formatDistance("halfAMinute", 0, l) : h < 60 ? i.formatDistance("lessThanXMinutes", 1, l) : i.formatDistance("xMinutes", 1, l) :
|
|
11195
|
-
if (
|
|
11196
|
-
return i.formatDistance("xMinutes",
|
|
11197
|
-
if (
|
|
11193
|
+
var h = Nr(u, A), m = (gt(u) - gt(A)) / 1e3, p = Math.round((h - m) / 60), w;
|
|
11194
|
+
if (p < 2)
|
|
11195
|
+
return r != null && r.includeSeconds ? h < 5 ? i.formatDistance("lessThanXSeconds", 5, l) : h < 10 ? i.formatDistance("lessThanXSeconds", 10, l) : h < 20 ? i.formatDistance("lessThanXSeconds", 20, l) : h < 40 ? i.formatDistance("halfAMinute", 0, l) : h < 60 ? i.formatDistance("lessThanXMinutes", 1, l) : i.formatDistance("xMinutes", 1, l) : p === 0 ? i.formatDistance("lessThanXMinutes", 1, l) : i.formatDistance("xMinutes", p, l);
|
|
11196
|
+
if (p < 45)
|
|
11197
|
+
return i.formatDistance("xMinutes", p, l);
|
|
11198
|
+
if (p < 90)
|
|
11198
11199
|
return i.formatDistance("aboutXHours", 1, l);
|
|
11199
|
-
if (
|
|
11200
|
-
var x = Math.round(
|
|
11200
|
+
if (p < Qi) {
|
|
11201
|
+
var x = Math.round(p / 60);
|
|
11201
11202
|
return i.formatDistance("aboutXHours", x, l);
|
|
11202
11203
|
} else {
|
|
11203
|
-
if (
|
|
11204
|
+
if (p < p0)
|
|
11204
11205
|
return i.formatDistance("xDays", 1, l);
|
|
11205
|
-
if (
|
|
11206
|
-
var k = Math.round(
|
|
11206
|
+
if (p < Fa) {
|
|
11207
|
+
var k = Math.round(p / Qi);
|
|
11207
11208
|
return i.formatDistance("xDays", k, l);
|
|
11208
|
-
} else if (
|
|
11209
|
-
return w = Math.round(
|
|
11209
|
+
} else if (p < g0)
|
|
11210
|
+
return w = Math.round(p / Fa), i.formatDistance("aboutXMonths", w, l);
|
|
11210
11211
|
}
|
|
11211
11212
|
if (w = fa(u, A), w < 12) {
|
|
11212
|
-
var y = Math.round(
|
|
11213
|
+
var y = Math.round(p / Fa);
|
|
11213
11214
|
return i.formatDistance("xMonths", y, l);
|
|
11214
11215
|
} else {
|
|
11215
11216
|
var I = w % 12, C = Math.floor(w / 12);
|
|
@@ -11231,33 +11232,33 @@ function gA(e, t, r) {
|
|
|
11231
11232
|
comparison: l
|
|
11232
11233
|
}), u, h;
|
|
11233
11234
|
l > 0 ? (u = T(t), h = T(e)) : (u = T(e), h = T(t));
|
|
11234
|
-
var
|
|
11235
|
-
if (
|
|
11236
|
-
|
|
11237
|
-
else if (
|
|
11238
|
-
|
|
11239
|
-
else if (
|
|
11240
|
-
|
|
11235
|
+
var m = String((o = r == null ? void 0 : r.roundingMethod) !== null && o !== void 0 ? o : "round"), p;
|
|
11236
|
+
if (m === "floor")
|
|
11237
|
+
p = Math.floor;
|
|
11238
|
+
else if (m === "ceil")
|
|
11239
|
+
p = Math.ceil;
|
|
11240
|
+
else if (m === "round")
|
|
11241
|
+
p = Math.round;
|
|
11241
11242
|
else
|
|
11242
11243
|
throw new RangeError("roundingMethod must be 'floor', 'ceil' or 'round'");
|
|
11243
11244
|
var w = h.getTime() - u.getTime(), x = w / Ni, k = gt(h) - gt(u), y = (w - k) / Ni, I = r == null ? void 0 : r.unit, C;
|
|
11244
11245
|
if (I ? C = String(I) : x < 1 ? C = "second" : x < 60 ? C = "minute" : x < _n ? C = "hour" : y < Hi ? C = "day" : y < Ui ? C = "month" : C = "year", C === "second") {
|
|
11245
|
-
var R =
|
|
11246
|
+
var R = p(w / 1e3);
|
|
11246
11247
|
return c.formatDistance("xSeconds", R, A);
|
|
11247
11248
|
} else if (C === "minute") {
|
|
11248
|
-
var U =
|
|
11249
|
+
var U = p(x);
|
|
11249
11250
|
return c.formatDistance("xMinutes", U, A);
|
|
11250
11251
|
} else if (C === "hour") {
|
|
11251
|
-
var O =
|
|
11252
|
+
var O = p(x / 60);
|
|
11252
11253
|
return c.formatDistance("xHours", O, A);
|
|
11253
11254
|
} else if (C === "day") {
|
|
11254
|
-
var F =
|
|
11255
|
+
var F = p(y / _n);
|
|
11255
11256
|
return c.formatDistance("xDays", F, A);
|
|
11256
11257
|
} else if (C === "month") {
|
|
11257
|
-
var Y =
|
|
11258
|
+
var Y = p(y / Hi);
|
|
11258
11259
|
return Y === 12 && I !== "month" ? c.formatDistance("xYears", 1, A) : c.formatDistance("xMonths", Y, A);
|
|
11259
11260
|
} else if (C === "year") {
|
|
11260
|
-
var X =
|
|
11261
|
+
var X = p(y / Ui);
|
|
11261
11262
|
return c.formatDistance("xYears", X, A);
|
|
11262
11263
|
}
|
|
11263
11264
|
throw new RangeError("unit must be 'second', 'minute', 'hour', 'day', 'month' or 'year'");
|
|
@@ -11276,13 +11277,13 @@ function k0(e, t) {
|
|
|
11276
11277
|
var c = at(), l = (r = (n = t == null ? void 0 : t.locale) !== null && n !== void 0 ? n : c.locale) !== null && r !== void 0 ? r : Xr, A = (a = t == null ? void 0 : t.format) !== null && a !== void 0 ? a : v0, u = (o = t == null ? void 0 : t.zero) !== null && o !== void 0 ? o : !1, h = (i = t == null ? void 0 : t.delimiter) !== null && i !== void 0 ? i : " ";
|
|
11277
11278
|
if (!l.formatDistance)
|
|
11278
11279
|
return "";
|
|
11279
|
-
var
|
|
11280
|
+
var m = A.reduce(function(p, w) {
|
|
11280
11281
|
var x = "x".concat(w.replace(/(^.)/, function(y) {
|
|
11281
11282
|
return y.toUpperCase();
|
|
11282
11283
|
})), k = e[w];
|
|
11283
|
-
return typeof k == "number" && (u || e[w]) ?
|
|
11284
|
+
return typeof k == "number" && (u || e[w]) ? p.concat(l.formatDistance(x, k)) : p;
|
|
11284
11285
|
}, []).join(h);
|
|
11285
|
-
return
|
|
11286
|
+
return m;
|
|
11286
11287
|
}
|
|
11287
11288
|
function b0(e, t) {
|
|
11288
11289
|
var r, n;
|
|
@@ -11297,8 +11298,8 @@ function b0(e, t) {
|
|
|
11297
11298
|
throw new RangeError("representation must be 'date', 'time', or 'complete'");
|
|
11298
11299
|
var c = "", l = "", A = o === "extended" ? "-" : "", u = o === "extended" ? ":" : "";
|
|
11299
11300
|
if (i !== "time") {
|
|
11300
|
-
var h = le(a.getDate(), 2),
|
|
11301
|
-
c = "".concat(
|
|
11301
|
+
var h = le(a.getDate(), 2), m = le(a.getMonth() + 1, 2), p = le(a.getFullYear(), 4);
|
|
11302
|
+
c = "".concat(p).concat(A).concat(m).concat(A).concat(h);
|
|
11302
11303
|
}
|
|
11303
11304
|
if (i !== "date") {
|
|
11304
11305
|
var w = a.getTimezoneOffset();
|
|
@@ -11326,20 +11327,20 @@ function y0(e, t) {
|
|
|
11326
11327
|
throw new RangeError("representation must be 'date', 'time', or 'complete'");
|
|
11327
11328
|
var c = "", l = o === "extended" ? "-" : "", A = o === "extended" ? ":" : "";
|
|
11328
11329
|
if (i !== "time") {
|
|
11329
|
-
var u = le(a.getDate(), 2), h = le(a.getMonth() + 1, 2),
|
|
11330
|
-
c = "".concat(
|
|
11330
|
+
var u = le(a.getDate(), 2), h = le(a.getMonth() + 1, 2), m = le(a.getFullYear(), 4);
|
|
11331
|
+
c = "".concat(m).concat(l).concat(h).concat(l).concat(u);
|
|
11331
11332
|
}
|
|
11332
11333
|
if (i !== "date") {
|
|
11333
|
-
var
|
|
11334
|
-
c = "".concat(c).concat(k).concat(
|
|
11334
|
+
var p = le(a.getHours(), 2), w = le(a.getMinutes(), 2), x = le(a.getSeconds(), 2), k = c === "" ? "" : " ";
|
|
11335
|
+
c = "".concat(c).concat(k).concat(p).concat(A).concat(w).concat(A).concat(x);
|
|
11335
11336
|
}
|
|
11336
11337
|
return c;
|
|
11337
11338
|
}
|
|
11338
11339
|
function E0(e) {
|
|
11339
11340
|
if (M(1, arguments), Wt(e) !== "object")
|
|
11340
11341
|
throw new Error("Duration must be an object");
|
|
11341
|
-
var t = e.years, r = t === void 0 ? 0 : t, n = e.months, a = n === void 0 ? 0 : n, o = e.days, i = o === void 0 ? 0 : o, c = e.hours, l = c === void 0 ? 0 : c, A = e.minutes, u = A === void 0 ? 0 : A, h = e.seconds,
|
|
11342
|
-
return "P".concat(r, "Y").concat(a, "M").concat(i, "DT").concat(l, "H").concat(u, "M").concat(
|
|
11342
|
+
var t = e.years, r = t === void 0 ? 0 : t, n = e.months, a = n === void 0 ? 0 : n, o = e.days, i = o === void 0 ? 0 : o, c = e.hours, l = c === void 0 ? 0 : c, A = e.minutes, u = A === void 0 ? 0 : A, h = e.seconds, m = h === void 0 ? 0 : h;
|
|
11343
|
+
return "P".concat(r, "Y").concat(a, "M").concat(i, "DT").concat(l, "H").concat(u, "M").concat(m, "S");
|
|
11343
11344
|
}
|
|
11344
11345
|
function M0(e, t) {
|
|
11345
11346
|
var r;
|
|
@@ -11353,8 +11354,8 @@ function M0(e, t) {
|
|
|
11353
11354
|
throw new RangeError("fractionDigits must be between 0 and 3 inclusively");
|
|
11354
11355
|
var o = le(n.getDate(), 2), i = le(n.getMonth() + 1, 2), c = n.getFullYear(), l = le(n.getHours(), 2), A = le(n.getMinutes(), 2), u = le(n.getSeconds(), 2), h = "";
|
|
11355
11356
|
if (a > 0) {
|
|
11356
|
-
var
|
|
11357
|
-
h = "." + le(
|
|
11357
|
+
var m = n.getMilliseconds(), p = Math.floor(m * Math.pow(10, a - 3));
|
|
11358
|
+
h = "." + le(p, a);
|
|
11358
11359
|
}
|
|
11359
11360
|
var w = "", x = n.getTimezoneOffset();
|
|
11360
11361
|
if (x !== 0) {
|
|
@@ -11375,25 +11376,25 @@ function J0(e) {
|
|
|
11375
11376
|
return "".concat(r, ", ").concat(n, " ").concat(a, " ").concat(o, " ").concat(i, ":").concat(c, ":").concat(l, " GMT");
|
|
11376
11377
|
}
|
|
11377
11378
|
function T0(e, t, r) {
|
|
11378
|
-
var n, a, o, i, c, l, A, u, h,
|
|
11379
|
+
var n, a, o, i, c, l, A, u, h, m;
|
|
11379
11380
|
M(2, arguments);
|
|
11380
|
-
var
|
|
11381
|
+
var p = T(e), w = T(t), x = at(), k = (n = (a = r == null ? void 0 : r.locale) !== null && a !== void 0 ? a : x.locale) !== null && n !== void 0 ? n : Xr, y = _((o = (i = (c = (l = r == null ? void 0 : r.weekStartsOn) !== null && l !== void 0 ? l : r == null || (A = r.locale) === null || A === void 0 || (u = A.options) === null || u === void 0 ? void 0 : u.weekStartsOn) !== null && c !== void 0 ? c : x.weekStartsOn) !== null && i !== void 0 ? i : (h = x.locale) === null || h === void 0 || (m = h.options) === null || m === void 0 ? void 0 : m.weekStartsOn) !== null && o !== void 0 ? o : 0);
|
|
11381
11382
|
if (!k.localize)
|
|
11382
11383
|
throw new RangeError("locale must contain localize property");
|
|
11383
11384
|
if (!k.formatLong)
|
|
11384
11385
|
throw new RangeError("locale must contain formatLong property");
|
|
11385
11386
|
if (!k.formatRelative)
|
|
11386
11387
|
throw new RangeError("locale must contain formatRelative property");
|
|
11387
|
-
var I = Bt(
|
|
11388
|
+
var I = Bt(p, w);
|
|
11388
11389
|
if (isNaN(I))
|
|
11389
11390
|
throw new RangeError("Invalid time value");
|
|
11390
11391
|
var C;
|
|
11391
11392
|
I < -6 ? C = "other" : I < -1 ? C = "lastWeek" : I < 0 ? C = "yesterday" : I < 1 ? C = "today" : I < 2 ? C = "tomorrow" : I < 7 ? C = "nextWeek" : C = "other";
|
|
11392
|
-
var R = Lr(
|
|
11393
|
+
var R = Lr(p, gt(p)), U = Lr(w, gt(w)), O = k.formatRelative(C, R, U, {
|
|
11393
11394
|
locale: k,
|
|
11394
11395
|
weekStartsOn: y
|
|
11395
11396
|
});
|
|
11396
|
-
return fA(
|
|
11397
|
+
return fA(p, O, {
|
|
11397
11398
|
locale: k,
|
|
11398
11399
|
weekStartsOn: y
|
|
11399
11400
|
});
|
|
@@ -11506,22 +11507,22 @@ function Z0(e) {
|
|
|
11506
11507
|
function EA(e, t) {
|
|
11507
11508
|
var r, n, a, o, i, c, l, A;
|
|
11508
11509
|
M(1, arguments);
|
|
11509
|
-
var u = T(e), h = u.getFullYear(),
|
|
11510
|
-
if (!(
|
|
11510
|
+
var u = T(e), h = u.getFullYear(), m = at(), p = _((r = (n = (a = (o = t == null ? void 0 : t.firstWeekContainsDate) !== null && o !== void 0 ? o : t == null || (i = t.locale) === null || i === void 0 || (c = i.options) === null || c === void 0 ? void 0 : c.firstWeekContainsDate) !== null && a !== void 0 ? a : m.firstWeekContainsDate) !== null && n !== void 0 ? n : (l = m.locale) === null || l === void 0 || (A = l.options) === null || A === void 0 ? void 0 : A.firstWeekContainsDate) !== null && r !== void 0 ? r : 1);
|
|
11511
|
+
if (!(p >= 1 && p <= 7))
|
|
11511
11512
|
throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");
|
|
11512
11513
|
var w = /* @__PURE__ */ new Date(0);
|
|
11513
|
-
w.setFullYear(h + 1, 0,
|
|
11514
|
+
w.setFullYear(h + 1, 0, p), w.setHours(0, 0, 0, 0);
|
|
11514
11515
|
var x = Mt(w, t), k = /* @__PURE__ */ new Date(0);
|
|
11515
|
-
k.setFullYear(h, 0,
|
|
11516
|
+
k.setFullYear(h, 0, p), k.setHours(0, 0, 0, 0);
|
|
11516
11517
|
var y = Mt(k, t);
|
|
11517
11518
|
return u.getTime() >= x.getTime() ? h + 1 : u.getTime() >= y.getTime() ? h : h - 1;
|
|
11518
11519
|
}
|
|
11519
11520
|
function $n(e, t) {
|
|
11520
11521
|
var r, n, a, o, i, c, l, A;
|
|
11521
11522
|
M(1, arguments);
|
|
11522
|
-
var u = at(), h = _((r = (n = (a = (o = t == null ? void 0 : t.firstWeekContainsDate) !== null && o !== void 0 ? o : t == null || (i = t.locale) === null || i === void 0 || (c = i.options) === null || c === void 0 ? void 0 : c.firstWeekContainsDate) !== null && a !== void 0 ? a : u.firstWeekContainsDate) !== null && n !== void 0 ? n : (l = u.locale) === null || l === void 0 || (A = l.options) === null || A === void 0 ? void 0 : A.firstWeekContainsDate) !== null && r !== void 0 ? r : 1),
|
|
11523
|
-
|
|
11524
|
-
var w = Mt(
|
|
11523
|
+
var u = at(), h = _((r = (n = (a = (o = t == null ? void 0 : t.firstWeekContainsDate) !== null && o !== void 0 ? o : t == null || (i = t.locale) === null || i === void 0 || (c = i.options) === null || c === void 0 ? void 0 : c.firstWeekContainsDate) !== null && a !== void 0 ? a : u.firstWeekContainsDate) !== null && n !== void 0 ? n : (l = u.locale) === null || l === void 0 || (A = l.options) === null || A === void 0 ? void 0 : A.firstWeekContainsDate) !== null && r !== void 0 ? r : 1), m = EA(e, t), p = /* @__PURE__ */ new Date(0);
|
|
11524
|
+
p.setFullYear(m, 0, h), p.setHours(0, 0, 0, 0);
|
|
11525
|
+
var w = Mt(p, t);
|
|
11525
11526
|
return w;
|
|
11526
11527
|
}
|
|
11527
11528
|
var G0 = 6048e5;
|
|
@@ -11536,12 +11537,12 @@ function K0(e, t) {
|
|
|
11536
11537
|
var u = at(), h = _((r = (n = (a = (o = t == null ? void 0 : t.weekStartsOn) !== null && o !== void 0 ? o : t == null || (i = t.locale) === null || i === void 0 || (c = i.options) === null || c === void 0 ? void 0 : c.weekStartsOn) !== null && a !== void 0 ? a : u.weekStartsOn) !== null && n !== void 0 ? n : (l = u.locale) === null || l === void 0 || (A = l.options) === null || A === void 0 ? void 0 : A.weekStartsOn) !== null && r !== void 0 ? r : 0);
|
|
11537
11538
|
if (!(h >= 0 && h <= 6))
|
|
11538
11539
|
throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");
|
|
11539
|
-
var
|
|
11540
|
-
if (isNaN(
|
|
11540
|
+
var m = wA(e);
|
|
11541
|
+
if (isNaN(m))
|
|
11541
11542
|
return NaN;
|
|
11542
|
-
var
|
|
11543
|
+
var p = pa(ma(e)), w = h - p;
|
|
11543
11544
|
w <= 0 && (w += 7);
|
|
11544
|
-
var x =
|
|
11545
|
+
var x = m - w;
|
|
11545
11546
|
return Math.ceil(x / 7) + 1;
|
|
11546
11547
|
}
|
|
11547
11548
|
function SA(e) {
|
|
@@ -12480,11 +12481,11 @@ var Mw = /* @__PURE__ */ function(e) {
|
|
|
12480
12481
|
function ro(e, t, r) {
|
|
12481
12482
|
var n, a, o, i, c, l, A, u;
|
|
12482
12483
|
M(2, arguments);
|
|
12483
|
-
var h = at(),
|
|
12484
|
-
if (!(
|
|
12484
|
+
var h = at(), m = _((n = (a = (o = (i = r == null ? void 0 : r.weekStartsOn) !== null && i !== void 0 ? i : r == null || (c = r.locale) === null || c === void 0 || (l = c.options) === null || l === void 0 ? void 0 : l.weekStartsOn) !== null && o !== void 0 ? o : h.weekStartsOn) !== null && a !== void 0 ? a : (A = h.locale) === null || A === void 0 || (u = A.options) === null || u === void 0 ? void 0 : u.weekStartsOn) !== null && n !== void 0 ? n : 0);
|
|
12485
|
+
if (!(m >= 0 && m <= 6))
|
|
12485
12486
|
throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");
|
|
12486
|
-
var
|
|
12487
|
-
return
|
|
12487
|
+
var p = T(e), w = _(t), x = p.getUTCDay(), k = w % 7, y = (k + 7) % 7, I = (y < m ? 7 : 0) + w - x;
|
|
12488
|
+
return p.setUTCDate(p.getUTCDate() + I), p;
|
|
12488
12489
|
}
|
|
12489
12490
|
var Cw = /* @__PURE__ */ function(e) {
|
|
12490
12491
|
Se(r, e);
|
|
@@ -13322,12 +13323,12 @@ var Ow = /* @__PURE__ */ function(e) {
|
|
|
13322
13323
|
T: new Xw()
|
|
13323
13324
|
}, qw = /[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g, Vw = /P+p+|P+|p+|''|'(''|[^'])+('|$)|./g, _w = /^'([^]*?)'?$/, $w = /''/g, ex = /\S/, tx = /[a-zA-Z]/;
|
|
13324
13325
|
function DA(e, t, r, n) {
|
|
13325
|
-
var a, o, i, c, l, A, u, h,
|
|
13326
|
+
var a, o, i, c, l, A, u, h, m, p, w, x, k, y, I, C, R, U;
|
|
13326
13327
|
M(3, arguments);
|
|
13327
13328
|
var O = String(e), F = String(t), Y = at(), X = (a = (o = n == null ? void 0 : n.locale) !== null && o !== void 0 ? o : Y.locale) !== null && a !== void 0 ? a : Xr;
|
|
13328
13329
|
if (!X.match)
|
|
13329
13330
|
throw new RangeError("locale must contain match property");
|
|
13330
|
-
var z = _((i = (c = (l = (A = n == null ? void 0 : n.firstWeekContainsDate) !== null && A !== void 0 ? A : n == null || (u = n.locale) === null || u === void 0 || (h = u.options) === null || h === void 0 ? void 0 : h.firstWeekContainsDate) !== null && l !== void 0 ? l : Y.firstWeekContainsDate) !== null && c !== void 0 ? c : (
|
|
13331
|
+
var z = _((i = (c = (l = (A = n == null ? void 0 : n.firstWeekContainsDate) !== null && A !== void 0 ? A : n == null || (u = n.locale) === null || u === void 0 || (h = u.options) === null || h === void 0 ? void 0 : h.firstWeekContainsDate) !== null && l !== void 0 ? l : Y.firstWeekContainsDate) !== null && c !== void 0 ? c : (m = Y.locale) === null || m === void 0 || (p = m.options) === null || p === void 0 ? void 0 : p.firstWeekContainsDate) !== null && i !== void 0 ? i : 1);
|
|
13331
13332
|
if (!(z >= 1 && z <= 7))
|
|
13332
13333
|
throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");
|
|
13333
13334
|
var j = _((w = (x = (k = (y = n == null ? void 0 : n.weekStartsOn) !== null && y !== void 0 ? y : n == null || (I = n.locale) === null || I === void 0 || (C = I.options) === null || C === void 0 ? void 0 : C.weekStartsOn) !== null && k !== void 0 ? k : Y.weekStartsOn) !== null && x !== void 0 ? x : (R = Y.locale) === null || R === void 0 || (U = R.options) === null || U === void 0 ? void 0 : U.weekStartsOn) !== null && w !== void 0 ? w : 0);
|
|
@@ -13560,8 +13561,8 @@ function BA(e, t) {
|
|
|
13560
13561
|
var u = at(), h = _((r = (n = (a = (o = t == null ? void 0 : t.weekStartsOn) !== null && o !== void 0 ? o : t == null || (i = t.locale) === null || i === void 0 || (c = i.options) === null || c === void 0 ? void 0 : c.weekStartsOn) !== null && a !== void 0 ? a : u.weekStartsOn) !== null && n !== void 0 ? n : (l = u.locale) === null || l === void 0 || (A = l.options) === null || A === void 0 ? void 0 : A.weekStartsOn) !== null && r !== void 0 ? r : 0);
|
|
13561
13562
|
if (!(h >= 0 && h <= 6))
|
|
13562
13563
|
throw new RangeError("weekStartsOn must be between 0 and 6");
|
|
13563
|
-
var
|
|
13564
|
-
return
|
|
13564
|
+
var m = T(e), p = m.getDay(), w = (p < h ? -7 : 0) + 6 - (p - h);
|
|
13565
|
+
return m.setHours(0, 0, 0, 0), m.setDate(m.getDate() + w), m;
|
|
13565
13566
|
}
|
|
13566
13567
|
function yx(e) {
|
|
13567
13568
|
return M(1, arguments), BA(e, {
|
|
@@ -13883,11 +13884,11 @@ function Sv(e, t) {
|
|
|
13883
13884
|
function Iv(e, t, r) {
|
|
13884
13885
|
var n, a, o, i, c, l, A, u;
|
|
13885
13886
|
M(2, arguments);
|
|
13886
|
-
var h = at(),
|
|
13887
|
-
if (!(
|
|
13887
|
+
var h = at(), m = _((n = (a = (o = (i = r == null ? void 0 : r.weekStartsOn) !== null && i !== void 0 ? i : r == null || (c = r.locale) === null || c === void 0 || (l = c.options) === null || l === void 0 ? void 0 : l.weekStartsOn) !== null && o !== void 0 ? o : h.weekStartsOn) !== null && a !== void 0 ? a : (A = h.locale) === null || A === void 0 || (u = A.options) === null || u === void 0 ? void 0 : u.weekStartsOn) !== null && n !== void 0 ? n : 0);
|
|
13888
|
+
if (!(m >= 0 && m <= 6))
|
|
13888
13889
|
throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");
|
|
13889
|
-
var
|
|
13890
|
-
return Lt(
|
|
13890
|
+
var p = T(e), w = _(t), x = p.getDay(), k = w % 7, y = (k + 7) % 7, I = 7 - m, C = w < 0 || w > 6 ? w - (x + I) % 7 : (y + I) % 7 - (x + I) % 7;
|
|
13891
|
+
return Lt(p, C);
|
|
13891
13892
|
}
|
|
13892
13893
|
function Jv(e, t) {
|
|
13893
13894
|
M(2, arguments);
|
|
@@ -13946,8 +13947,8 @@ function Hv(e, t, r) {
|
|
|
13946
13947
|
function Uv(e, t, r) {
|
|
13947
13948
|
var n, a, o, i, c, l, A, u;
|
|
13948
13949
|
M(2, arguments);
|
|
13949
|
-
var h = at(),
|
|
13950
|
-
return k.setFullYear(w, 0,
|
|
13950
|
+
var h = at(), m = _((n = (a = (o = (i = r == null ? void 0 : r.firstWeekContainsDate) !== null && i !== void 0 ? i : r == null || (c = r.locale) === null || c === void 0 || (l = c.options) === null || l === void 0 ? void 0 : l.firstWeekContainsDate) !== null && o !== void 0 ? o : h.firstWeekContainsDate) !== null && a !== void 0 ? a : (A = h.locale) === null || A === void 0 || (u = A.options) === null || u === void 0 ? void 0 : u.firstWeekContainsDate) !== null && n !== void 0 ? n : 1), p = T(e), w = _(t), x = Bt(p, $n(p, r)), k = /* @__PURE__ */ new Date(0);
|
|
13951
|
+
return k.setFullYear(w, 0, m), k.setHours(0, 0, 0, 0), p = $n(k, r), p.setDate(p.getDate() + x), p;
|
|
13951
13952
|
}
|
|
13952
13953
|
function Bv(e, t) {
|
|
13953
13954
|
M(2, arguments);
|
|
@@ -13978,7 +13979,7 @@ function zA(e, t) {
|
|
|
13978
13979
|
function Fv(e, t) {
|
|
13979
13980
|
if (M(2, arguments), !t || Wt(t) !== "object")
|
|
13980
13981
|
return /* @__PURE__ */ new Date(NaN);
|
|
13981
|
-
var r = t.years ? _(t.years) : 0, n = t.months ? _(t.months) : 0, a = t.weeks ? _(t.weeks) : 0, o = t.days ? _(t.days) : 0, i = t.hours ? _(t.hours) : 0, c = t.minutes ? _(t.minutes) : 0, l = t.seconds ? _(t.seconds) : 0, A = zA(e, n + r * 12), u = ga(A, o + a * 7), h = c + i * 60,
|
|
13982
|
+
var r = t.years ? _(t.years) : 0, n = t.months ? _(t.months) : 0, a = t.weeks ? _(t.weeks) : 0, o = t.days ? _(t.days) : 0, i = t.hours ? _(t.hours) : 0, c = t.minutes ? _(t.minutes) : 0, l = t.seconds ? _(t.seconds) : 0, A = zA(e, n + r * 12), u = ga(A, o + a * 7), h = c + i * 60, m = l + h * 60, p = m * 1e3, w = new Date(u.getTime() - p);
|
|
13982
13983
|
return w;
|
|
13983
13984
|
}
|
|
13984
13985
|
function Zv(e, t) {
|
|
@@ -14334,10 +14335,10 @@ function A1() {
|
|
|
14334
14335
|
var e = 1e3, t = e * 60, r = t * 60, n = r * 24, a = n * 7, o = n * 365.25;
|
|
14335
14336
|
Ga = function(u, h) {
|
|
14336
14337
|
h = h || {};
|
|
14337
|
-
var
|
|
14338
|
-
if (
|
|
14338
|
+
var m = typeof u;
|
|
14339
|
+
if (m === "string" && u.length > 0)
|
|
14339
14340
|
return i(u);
|
|
14340
|
-
if (
|
|
14341
|
+
if (m === "number" && isFinite(u))
|
|
14341
14342
|
return h.long ? l(u) : c(u);
|
|
14342
14343
|
throw new Error(
|
|
14343
14344
|
"val is not a non-empty string or a valid number. val=" + JSON.stringify(u)
|
|
@@ -14349,46 +14350,46 @@ function A1() {
|
|
|
14349
14350
|
u
|
|
14350
14351
|
);
|
|
14351
14352
|
if (h) {
|
|
14352
|
-
var
|
|
14353
|
-
switch (
|
|
14353
|
+
var m = parseFloat(h[1]), p = (h[2] || "ms").toLowerCase();
|
|
14354
|
+
switch (p) {
|
|
14354
14355
|
case "years":
|
|
14355
14356
|
case "year":
|
|
14356
14357
|
case "yrs":
|
|
14357
14358
|
case "yr":
|
|
14358
14359
|
case "y":
|
|
14359
|
-
return
|
|
14360
|
+
return m * o;
|
|
14360
14361
|
case "weeks":
|
|
14361
14362
|
case "week":
|
|
14362
14363
|
case "w":
|
|
14363
|
-
return
|
|
14364
|
+
return m * a;
|
|
14364
14365
|
case "days":
|
|
14365
14366
|
case "day":
|
|
14366
14367
|
case "d":
|
|
14367
|
-
return
|
|
14368
|
+
return m * n;
|
|
14368
14369
|
case "hours":
|
|
14369
14370
|
case "hour":
|
|
14370
14371
|
case "hrs":
|
|
14371
14372
|
case "hr":
|
|
14372
14373
|
case "h":
|
|
14373
|
-
return
|
|
14374
|
+
return m * r;
|
|
14374
14375
|
case "minutes":
|
|
14375
14376
|
case "minute":
|
|
14376
14377
|
case "mins":
|
|
14377
14378
|
case "min":
|
|
14378
14379
|
case "m":
|
|
14379
|
-
return
|
|
14380
|
+
return m * t;
|
|
14380
14381
|
case "seconds":
|
|
14381
14382
|
case "second":
|
|
14382
14383
|
case "secs":
|
|
14383
14384
|
case "sec":
|
|
14384
14385
|
case "s":
|
|
14385
|
-
return
|
|
14386
|
+
return m * e;
|
|
14386
14387
|
case "milliseconds":
|
|
14387
14388
|
case "millisecond":
|
|
14388
14389
|
case "msecs":
|
|
14389
14390
|
case "msec":
|
|
14390
14391
|
case "ms":
|
|
14391
|
-
return
|
|
14392
|
+
return m;
|
|
14392
14393
|
default:
|
|
14393
14394
|
return;
|
|
14394
14395
|
}
|
|
@@ -14403,9 +14404,9 @@ function A1() {
|
|
|
14403
14404
|
var h = Math.abs(u);
|
|
14404
14405
|
return h >= n ? A(u, h, n, "day") : h >= r ? A(u, h, r, "hour") : h >= t ? A(u, h, t, "minute") : h >= e ? A(u, h, e, "second") : u + " ms";
|
|
14405
14406
|
}
|
|
14406
|
-
function A(u, h,
|
|
14407
|
-
var w = h >=
|
|
14408
|
-
return Math.round(u /
|
|
14407
|
+
function A(u, h, m, p) {
|
|
14408
|
+
var w = h >= m * 1.5;
|
|
14409
|
+
return Math.round(u / m) + " " + p + (w ? "s" : "");
|
|
14409
14410
|
}
|
|
14410
14411
|
return Ga;
|
|
14411
14412
|
}
|
|
@@ -14415,13 +14416,13 @@ function c1(e) {
|
|
|
14415
14416
|
}), r.names = [], r.skips = [], r.formatters = {};
|
|
14416
14417
|
function t(u) {
|
|
14417
14418
|
let h = 0;
|
|
14418
|
-
for (let
|
|
14419
|
-
h = (h << 5) - h + u.charCodeAt(
|
|
14419
|
+
for (let m = 0; m < u.length; m++)
|
|
14420
|
+
h = (h << 5) - h + u.charCodeAt(m), h |= 0;
|
|
14420
14421
|
return r.colors[Math.abs(h) % r.colors.length];
|
|
14421
14422
|
}
|
|
14422
14423
|
r.selectColor = t;
|
|
14423
14424
|
function r(u) {
|
|
14424
|
-
let h,
|
|
14425
|
+
let h, m = null, p, w;
|
|
14425
14426
|
function x(...k) {
|
|
14426
14427
|
if (!x.enabled)
|
|
14427
14428
|
return;
|
|
@@ -14443,22 +14444,22 @@ function c1(e) {
|
|
|
14443
14444
|
return x.namespace = u, x.useColors = r.useColors(), x.color = r.selectColor(u), x.extend = n, x.destroy = r.destroy, Object.defineProperty(x, "enabled", {
|
|
14444
14445
|
enumerable: !0,
|
|
14445
14446
|
configurable: !1,
|
|
14446
|
-
get: () =>
|
|
14447
|
+
get: () => m !== null ? m : (p !== r.namespaces && (p = r.namespaces, w = r.enabled(u)), w),
|
|
14447
14448
|
set: (k) => {
|
|
14448
|
-
|
|
14449
|
+
m = k;
|
|
14449
14450
|
}
|
|
14450
14451
|
}), typeof r.init == "function" && r.init(x), x;
|
|
14451
14452
|
}
|
|
14452
14453
|
function n(u, h) {
|
|
14453
|
-
const
|
|
14454
|
-
return
|
|
14454
|
+
const m = r(this.namespace + (typeof h > "u" ? ":" : h) + u);
|
|
14455
|
+
return m.log = this.log, m;
|
|
14455
14456
|
}
|
|
14456
14457
|
function a(u) {
|
|
14457
14458
|
r.save(u), r.namespaces = u, r.names = [], r.skips = [];
|
|
14458
14459
|
let h;
|
|
14459
|
-
const
|
|
14460
|
-
for (h = 0; h <
|
|
14461
|
-
|
|
14460
|
+
const m = (typeof u == "string" ? u : "").split(/[\s,]+/), p = m.length;
|
|
14461
|
+
for (h = 0; h < p; h++)
|
|
14462
|
+
m[h] && (u = m[h].replace(/\*/g, ".*?"), u[0] === "-" ? r.skips.push(new RegExp("^" + u.slice(1) + "$")) : r.names.push(new RegExp("^" + u + "$")));
|
|
14462
14463
|
}
|
|
14463
14464
|
function o() {
|
|
14464
14465
|
const u = [
|
|
@@ -14470,11 +14471,11 @@ function c1(e) {
|
|
|
14470
14471
|
function i(u) {
|
|
14471
14472
|
if (u[u.length - 1] === "*")
|
|
14472
14473
|
return !0;
|
|
14473
|
-
let h,
|
|
14474
|
-
for (h = 0,
|
|
14474
|
+
let h, m;
|
|
14475
|
+
for (h = 0, m = r.skips.length; h < m; h++)
|
|
14475
14476
|
if (r.skips[h].test(u))
|
|
14476
14477
|
return !1;
|
|
14477
|
-
for (h = 0,
|
|
14478
|
+
for (h = 0, m = r.names.length; h < m; h++)
|
|
14478
14479
|
if (r.names[h].test(u))
|
|
14479
14480
|
return !0;
|
|
14480
14481
|
return !1;
|
|
@@ -14576,10 +14577,15 @@ var u1 = c1;
|
|
|
14576
14577
|
"#FFCC33"
|
|
14577
14578
|
];
|
|
14578
14579
|
function r() {
|
|
14579
|
-
|
|
14580
|
+
if (typeof window < "u" && window.process && (window.process.type === "renderer" || window.process.__nwjs))
|
|
14581
|
+
return !0;
|
|
14582
|
+
if (typeof navigator < "u" && navigator.userAgent && navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))
|
|
14583
|
+
return !1;
|
|
14584
|
+
let l;
|
|
14585
|
+
return typeof document < "u" && document.documentElement && document.documentElement.style && document.documentElement.style.WebkitAppearance || // Is firebug? http://stackoverflow.com/a/398120/376773
|
|
14580
14586
|
typeof window < "u" && window.console && (window.console.firebug || window.console.exception && window.console.table) || // Is firefox >= v31?
|
|
14581
14587
|
// https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages
|
|
14582
|
-
typeof navigator < "u" && navigator.userAgent && navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/) && parseInt(
|
|
14588
|
+
typeof navigator < "u" && navigator.userAgent && (l = navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)) && parseInt(l[1], 10) >= 31 || // Double check webkit in userAgent just in case we are in a worker
|
|
14583
14589
|
typeof navigator < "u" && navigator.userAgent && navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/);
|
|
14584
14590
|
}
|
|
14585
14591
|
function n(l) {
|
|
@@ -14588,8 +14594,8 @@ var u1 = c1;
|
|
|
14588
14594
|
const A = "color: " + this.color;
|
|
14589
14595
|
l.splice(1, 0, A, "color: inherit");
|
|
14590
14596
|
let u = 0, h = 0;
|
|
14591
|
-
l[0].replace(/%[a-zA-Z%]/g, (
|
|
14592
|
-
|
|
14597
|
+
l[0].replace(/%[a-zA-Z%]/g, (m) => {
|
|
14598
|
+
m !== "%%" && (u++, m === "%c" && (h = u));
|
|
14593
14599
|
}), l.splice(h, 0, A);
|
|
14594
14600
|
}
|
|
14595
14601
|
t.log = console.debug || console.log || (() => {
|
|
@@ -14749,10 +14755,10 @@ class m1 {
|
|
|
14749
14755
|
const l = Be.every(i.map((h) => h.operator), (h) => nn(h)), A = l ? dt.$nin : dt.$in, u = ["whereNull", "whereNotNull"].includes(c.whereType) ? "andWhere" : ["orWhereNull", "orWhereNotNull"].includes(c.whereType) ? "orWhere" : c.whereType;
|
|
14750
14756
|
t[u](`${this.tableName}.id`, A, function() {
|
|
14751
14757
|
const h = a[o].joinFilterStatements;
|
|
14752
|
-
let
|
|
14753
|
-
c.config.tableNameAs && (
|
|
14754
|
-
const w = c.config.joinType || "innerJoin", x = this.select(`${c.config.joinTable}.${c.config.joinFrom}`).from(`${c.config.joinTable}`)[w](
|
|
14755
|
-
this.on(
|
|
14758
|
+
let m = c.config.tableName, p = `${c.config.tableName}.${c.config.joinToForeign || "id"}`;
|
|
14759
|
+
c.config.tableNameAs && (m = `${c.config.tableName} as ${c.config.tableNameAs}`, p = `${c.config.tableNameAs}.${c.config.joinToForeign || "id"}`);
|
|
14760
|
+
const w = c.config.joinType || "innerJoin", x = this.select(`${c.config.joinTable}.${c.config.joinFrom}`).from(`${c.config.joinTable}`)[w](m, function() {
|
|
14761
|
+
this.on(p, "=", `${c.config.joinTable}.${c.config.joinTo}`), Be.each(h, (k) => {
|
|
14756
14762
|
this.andOn(`${k.joinTable}.${k.column}`, dt[k.operator], k.value);
|
|
14757
14763
|
});
|
|
14758
14764
|
});
|
|
@@ -14769,13 +14775,13 @@ class m1 {
|
|
|
14769
14775
|
nt(`one of ${o} group statements contains unknown operator`);
|
|
14770
14776
|
else if (c.config.type === "oneToOne")
|
|
14771
14777
|
if (Be.every(i.map((l) => l.operator), Ka)) {
|
|
14772
|
-
const l = Be.every(i.map((
|
|
14778
|
+
const l = Be.every(i.map((m) => m.operator), (m) => nn(m)), A = l ? dt.$nin : dt.$in, u = this.tableName, h = c.whereType === "orWhere" ? "orWhere" : "where";
|
|
14773
14779
|
t[h](`${this.tableName}.id`, A, function() {
|
|
14774
|
-
const
|
|
14775
|
-
let
|
|
14776
|
-
c.config.tableNameAs && (
|
|
14777
|
-
const x = this.select(`${u}.id`).from(`${u}`).leftJoin(
|
|
14778
|
-
this.on(w, "=", `${u}.id`), Be.each(
|
|
14780
|
+
const m = a[o].joinFilterStatements;
|
|
14781
|
+
let p = c.config.tableName, w = `${c.config.tableName}.${c.config.joinFrom}`;
|
|
14782
|
+
c.config.tableNameAs && (p = `${c.config.tableName} as ${c.config.tableNameAs}`, w = `${c.config.tableNameAs}.${c.config.joinFrom}`);
|
|
14783
|
+
const x = this.select(`${u}.id`).from(`${u}`).leftJoin(p, function() {
|
|
14784
|
+
this.on(w, "=", `${u}.id`), Be.each(m, (k) => {
|
|
14779
14785
|
this.andOn(`${k.joinTable}.${k.column}`, dt[k.operator], k.value);
|
|
14780
14786
|
});
|
|
14781
14787
|
});
|
|
@@ -14814,8 +14820,8 @@ class m1 {
|
|
|
14814
14820
|
}
|
|
14815
14821
|
const u = l.column;
|
|
14816
14822
|
if (a = l.operator, o = l.value, a === "$regex" || a === "$not") {
|
|
14817
|
-
const { source: h, ignoreCase:
|
|
14818
|
-
if (o = h,
|
|
14823
|
+
const { source: h, ignoreCase: m } = f1(o);
|
|
14824
|
+
if (o = h, m) {
|
|
14819
14825
|
A += "Raw", nt(`(buildComparison) whereType: ${A}, statement: ${n}, op: ${a}, comp: ${c}, value: ${o} (REGEX/i)`), t[A](`lower(??) ${c} ? ESCAPE ?`, [u, o, fr]);
|
|
14820
14826
|
return;
|
|
14821
14827
|
}
|
|
@@ -15101,13 +15107,13 @@ const H1 = ({ settings: e, url: t }) => {
|
|
|
15101
15107
|
mode: "cors",
|
|
15102
15108
|
credentials: "include"
|
|
15103
15109
|
}).then((o) => o.text()).then((o) => {
|
|
15104
|
-
var
|
|
15110
|
+
var p, w, x;
|
|
15105
15111
|
const i = "html { pointer-events: none; }", l = new DOMParser().parseFromString(o, "text/html"), A = l.querySelector("style"), u = A == null ? void 0 : A.innerHTML;
|
|
15106
15112
|
u ? A.innerHTML = `${u}
|
|
15107
15113
|
|
|
15108
15114
|
${i}` : l.head.innerHTML += `<style>${i}</style>`;
|
|
15109
|
-
let
|
|
15110
|
-
(
|
|
15115
|
+
let m = (l.doctype ? new XMLSerializer().serializeToString(l.doctype) : "") + l.documentElement.outerHTML;
|
|
15116
|
+
(p = a.contentDocument) == null || p.open(), (w = a.contentDocument) == null || w.write(m), (x = a.contentDocument) == null || x.close();
|
|
15111
15117
|
});
|
|
15112
15118
|
}, [r, t]);
|
|
15113
15119
|
return /* @__PURE__ */ s.jsx(
|
|
@@ -15215,7 +15221,7 @@ ${i}` : l.head.innerHTML += `<style>${i}</style>`;
|
|
|
15215
15221
|
onTabChange: a,
|
|
15216
15222
|
handleSave: o
|
|
15217
15223
|
}) => {
|
|
15218
|
-
const { updateRoute: i } = ye(), [c, l] = G("brand"), { data: { themes: A } = {} } = Nl(), u = vn().getParam("ref"), h = A == null ? void 0 : A.find((w) => w.active),
|
|
15224
|
+
const { updateRoute: i } = ye(), [c, l] = G("brand"), { data: { themes: A } = {} } = Nl(), u = vn().getParam("ref"), h = A == null ? void 0 : A.find((w) => w.active), m = [
|
|
15219
15225
|
{
|
|
15220
15226
|
id: "brand",
|
|
15221
15227
|
title: "Brand",
|
|
@@ -15226,11 +15232,11 @@ ${i}` : l.head.innerHTML += `<style>${i}</style>`;
|
|
|
15226
15232
|
title: x,
|
|
15227
15233
|
contents: /* @__PURE__ */ s.jsx(B1, { settings: k, updateSetting: n })
|
|
15228
15234
|
}))
|
|
15229
|
-
],
|
|
15235
|
+
], p = (w) => {
|
|
15230
15236
|
l(w), a(w);
|
|
15231
15237
|
};
|
|
15232
15238
|
return /* @__PURE__ */ s.jsxs("div", { className: "flex h-full flex-col justify-between", children: [
|
|
15233
|
-
/* @__PURE__ */ s.jsx("div", { className: "p-7", "data-testid": "design-setting-tabs", children: /* @__PURE__ */ s.jsx(pr, { selectedTab: c, tabs:
|
|
15239
|
+
/* @__PURE__ */ s.jsx("div", { className: "p-7", "data-testid": "design-setting-tabs", children: /* @__PURE__ */ s.jsx(pr, { selectedTab: c, tabs: m, onTabChange: p }) }),
|
|
15234
15240
|
/* @__PURE__ */ s.jsx(Al, { height: 74, children: /* @__PURE__ */ s.jsx("div", { className: "w-full px-7", children: /* @__PURE__ */ s.jsxs("button", { className: "group flex w-full items-center justify-between text-sm font-medium opacity-80 transition-all hover:opacity-100", "data-testid": "change-theme", type: "button", onClick: async () => {
|
|
15235
15241
|
await o(), i(u ? `design/change-theme?ref=${u}` : "design/change-theme");
|
|
15236
15242
|
}, children: [
|
|
@@ -15256,8 +15262,8 @@ ${i}` : l.head.innerHTML += `<style>${i}</style>`;
|
|
|
15256
15262
|
}
|
|
15257
15263
|
}), { data: a } = Hm(), { mutateAsync: o } = Um(), i = je(), [c, l] = G("homepage"), { updateRoute: A } = ye(), u = vn().getParam("ref"), {
|
|
15258
15264
|
formState: h,
|
|
15259
|
-
saveState:
|
|
15260
|
-
handleSave:
|
|
15265
|
+
saveState: m,
|
|
15266
|
+
handleSave: p,
|
|
15261
15267
|
updateForm: w,
|
|
15262
15268
|
setFormState: x,
|
|
15263
15269
|
okProps: k
|
|
@@ -15337,7 +15343,7 @@ ${i}` : l.head.innerHTML += `<style>${i}</style>`;
|
|
|
15337
15343
|
L1,
|
|
15338
15344
|
{
|
|
15339
15345
|
brandSettings: { description: C, accentColor: R, icon: U, logo: O, coverImage: F },
|
|
15340
|
-
handleSave:
|
|
15346
|
+
handleSave: p,
|
|
15341
15347
|
themeSettingSections: X,
|
|
15342
15348
|
updateBrandSetting: y,
|
|
15343
15349
|
updateThemeSetting: I,
|
|
@@ -15353,7 +15359,7 @@ ${i}` : l.head.innerHTML += `<style>${i}</style>`;
|
|
|
15353
15359
|
buttonsDisabled: k.disabled,
|
|
15354
15360
|
cancelLabel: "Close",
|
|
15355
15361
|
defaultTab: "homepage",
|
|
15356
|
-
dirty:
|
|
15362
|
+
dirty: m === "unsaved",
|
|
15357
15363
|
okColor: k.color,
|
|
15358
15364
|
okLabel: k.label || "Save",
|
|
15359
15365
|
preview: L,
|
|
@@ -15366,7 +15372,7 @@ ${i}` : l.head.innerHTML += `<style>${i}</style>`;
|
|
|
15366
15372
|
testId: "design-modal",
|
|
15367
15373
|
title: "Design",
|
|
15368
15374
|
onOk: async () => {
|
|
15369
|
-
await
|
|
15375
|
+
await p({ fakeWhenUnchanged: !0 });
|
|
15370
15376
|
},
|
|
15371
15377
|
onSelectURL: j
|
|
15372
15378
|
}
|
|
@@ -15423,8 +15429,8 @@ ${i}` : l.head.innerHTML += `<style>${i}</style>`;
|
|
|
15423
15429
|
setCustomColor: u,
|
|
15424
15430
|
isCopied: h
|
|
15425
15431
|
}) => {
|
|
15426
|
-
const { loadData:
|
|
15427
|
-
const k = await
|
|
15432
|
+
const { loadData: m } = cl({ path: "/labels/", filterKey: "name", responseKey: "labels" }), p = async (w, x) => {
|
|
15433
|
+
const k = await m(w);
|
|
15428
15434
|
x(k.map((y) => ({ label: y.name, value: y.name })));
|
|
15429
15435
|
};
|
|
15430
15436
|
return /* @__PURE__ */ s.jsxs("div", { className: "flex h-[calc(100vh-16vmin)] max-h-[645px] flex-col justify-between overflow-y-scroll border-l border-grey-200 p-6 pb-0 dark:border-grey-900", children: [
|
|
@@ -15496,7 +15502,7 @@ ${i}` : l.head.innerHTML += `<style>${i}</style>`;
|
|
|
15496
15502
|
bh,
|
|
15497
15503
|
{
|
|
15498
15504
|
hint: "Will be applied to all members signing up via this form",
|
|
15499
|
-
loadOptions: xn(
|
|
15505
|
+
loadOptions: xn(p, 500),
|
|
15500
15506
|
placeholder: "Pick one or more labels (optional)",
|
|
15501
15507
|
title: "Labels at signup",
|
|
15502
15508
|
values: a || [],
|
|
@@ -15718,37 +15724,37 @@ var an = {
|
|
|
15718
15724
|
}, a.get.rgb = function(c) {
|
|
15719
15725
|
if (!c)
|
|
15720
15726
|
return null;
|
|
15721
|
-
var l = /^#([a-f0-9]{3,4})$/i, A = /^#([a-f0-9]{6})([a-f0-9]{2})?$/i, u = /^rgba?\(\s*([+-]?\d+)(?=[\s,])\s*(?:,\s*)?([+-]?\d+)(?=[\s,])\s*(?:,\s*)?([+-]?\d+)\s*(?:[,|\/]\s*([+-]?[\d\.]+)(%?)\s*)?\)$/, h = /^rgba?\(\s*([+-]?[\d\.]+)\%\s*,?\s*([+-]?[\d\.]+)\%\s*,?\s*([+-]?[\d\.]+)\%\s*(?:[,|\/]\s*([+-]?[\d\.]+)(%?)\s*)?\)$/,
|
|
15727
|
+
var l = /^#([a-f0-9]{3,4})$/i, A = /^#([a-f0-9]{6})([a-f0-9]{2})?$/i, u = /^rgba?\(\s*([+-]?\d+)(?=[\s,])\s*(?:,\s*)?([+-]?\d+)(?=[\s,])\s*(?:,\s*)?([+-]?\d+)\s*(?:[,|\/]\s*([+-]?[\d\.]+)(%?)\s*)?\)$/, h = /^rgba?\(\s*([+-]?[\d\.]+)\%\s*,?\s*([+-]?[\d\.]+)\%\s*,?\s*([+-]?[\d\.]+)\%\s*(?:[,|\/]\s*([+-]?[\d\.]+)(%?)\s*)?\)$/, m = /^(\w+)$/, p = [0, 0, 0, 1], w, x, k;
|
|
15722
15728
|
if (w = c.match(A)) {
|
|
15723
15729
|
for (k = w[2], w = w[1], x = 0; x < 3; x++) {
|
|
15724
15730
|
var y = x * 2;
|
|
15725
|
-
|
|
15731
|
+
p[x] = parseInt(w.slice(y, y + 2), 16);
|
|
15726
15732
|
}
|
|
15727
|
-
k && (
|
|
15733
|
+
k && (p[3] = parseInt(k, 16) / 255);
|
|
15728
15734
|
} else if (w = c.match(l)) {
|
|
15729
15735
|
for (w = w[1], k = w[3], x = 0; x < 3; x++)
|
|
15730
|
-
|
|
15731
|
-
k && (
|
|
15736
|
+
p[x] = parseInt(w[x] + w[x], 16);
|
|
15737
|
+
k && (p[3] = parseInt(k + k, 16) / 255);
|
|
15732
15738
|
} else if (w = c.match(u)) {
|
|
15733
15739
|
for (x = 0; x < 3; x++)
|
|
15734
|
-
|
|
15735
|
-
w[4] && (w[5] ?
|
|
15740
|
+
p[x] = parseInt(w[x + 1], 0);
|
|
15741
|
+
w[4] && (w[5] ? p[3] = parseFloat(w[4]) * 0.01 : p[3] = parseFloat(w[4]));
|
|
15736
15742
|
} else if (w = c.match(h)) {
|
|
15737
15743
|
for (x = 0; x < 3; x++)
|
|
15738
|
-
|
|
15739
|
-
w[4] && (w[5] ?
|
|
15744
|
+
p[x] = Math.round(parseFloat(w[x + 1]) * 2.55);
|
|
15745
|
+
w[4] && (w[5] ? p[3] = parseFloat(w[4]) * 0.01 : p[3] = parseFloat(w[4]));
|
|
15740
15746
|
} else
|
|
15741
|
-
return (w = c.match(
|
|
15747
|
+
return (w = c.match(m)) ? w[1] === "transparent" ? [0, 0, 0, 0] : t.call(an, w[1]) ? (p = an[w[1]], p[3] = 1, p) : null : null;
|
|
15742
15748
|
for (x = 0; x < 3; x++)
|
|
15743
|
-
|
|
15744
|
-
return
|
|
15749
|
+
p[x] = o(p[x], 0, 255);
|
|
15750
|
+
return p[3] = o(p[3], 0, 1), p;
|
|
15745
15751
|
}, a.get.hsl = function(c) {
|
|
15746
15752
|
if (!c)
|
|
15747
15753
|
return null;
|
|
15748
15754
|
var l = /^hsla?\(\s*([+-]?(?:\d{0,3}\.)?\d+)(?:deg)?\s*,?\s*([+-]?[\d\.]+)%\s*,?\s*([+-]?[\d\.]+)%\s*(?:[,|\/]\s*([+-]?(?=\.\d|\d)(?:0|[1-9]\d*)?(?:\.\d*)?(?:[eE][+-]?\d+)?)\s*)?\)$/, A = c.match(l);
|
|
15749
15755
|
if (A) {
|
|
15750
|
-
var u = parseFloat(A[4]), h = (parseFloat(A[1]) % 360 + 360) % 360,
|
|
15751
|
-
return [h,
|
|
15756
|
+
var u = parseFloat(A[4]), h = (parseFloat(A[1]) % 360 + 360) % 360, m = o(parseFloat(A[2]), 0, 100), p = o(parseFloat(A[3]), 0, 100), w = o(isNaN(u) ? 1 : u, 0, 1);
|
|
15757
|
+
return [h, m, p, w];
|
|
15752
15758
|
}
|
|
15753
15759
|
return null;
|
|
15754
15760
|
}, a.get.hwb = function(c) {
|
|
@@ -15756,8 +15762,8 @@ var an = {
|
|
|
15756
15762
|
return null;
|
|
15757
15763
|
var l = /^hwb\(\s*([+-]?\d{0,3}(?:\.\d+)?)(?:deg)?\s*,\s*([+-]?[\d\.]+)%\s*,\s*([+-]?[\d\.]+)%\s*(?:,\s*([+-]?(?=\.\d|\d)(?:0|[1-9]\d*)?(?:\.\d*)?(?:[eE][+-]?\d+)?)\s*)?\)$/, A = c.match(l);
|
|
15758
15764
|
if (A) {
|
|
15759
|
-
var u = parseFloat(A[4]), h = (parseFloat(A[1]) % 360 + 360) % 360,
|
|
15760
|
-
return [h,
|
|
15765
|
+
var u = parseFloat(A[4]), h = (parseFloat(A[1]) % 360 + 360) % 360, m = o(parseFloat(A[2]), 0, 100), p = o(parseFloat(A[3]), 0, 100), w = o(isNaN(u) ? 1 : u, 0, 1);
|
|
15766
|
+
return [h, m, p, w];
|
|
15761
15767
|
}
|
|
15762
15768
|
return null;
|
|
15763
15769
|
}, a.to.hex = function() {
|
|
@@ -15970,23 +15976,23 @@ var ur = {
|
|
|
15970
15976
|
delete n[a].channels, delete n[a].labels, Object.defineProperty(n[a], "channels", { value: o }), Object.defineProperty(n[a], "labels", { value: i });
|
|
15971
15977
|
}
|
|
15972
15978
|
n.rgb.hsl = function(l) {
|
|
15973
|
-
var A = l[0] / 255, u = l[1] / 255, h = l[2] / 255,
|
|
15974
|
-
return
|
|
15979
|
+
var A = l[0] / 255, u = l[1] / 255, h = l[2] / 255, m = Math.min(A, u, h), p = Math.max(A, u, h), w = p - m, x, k, y;
|
|
15980
|
+
return p === m ? x = 0 : A === p ? x = (u - h) / w : u === p ? x = 2 + (h - A) / w : h === p && (x = 4 + (A - u) / w), x = Math.min(x * 60, 360), x < 0 && (x += 360), y = (m + p) / 2, p === m ? k = 0 : y <= 0.5 ? k = w / (p + m) : k = w / (2 - p - m), [x, k * 100, y * 100];
|
|
15975
15981
|
}, n.rgb.hsv = function(l) {
|
|
15976
|
-
var A, u, h,
|
|
15982
|
+
var A, u, h, m, p, w = l[0] / 255, x = l[1] / 255, k = l[2] / 255, y = Math.max(w, x, k), I = y - Math.min(w, x, k), C = function(R) {
|
|
15977
15983
|
return (y - R) / 6 / I + 1 / 2;
|
|
15978
15984
|
};
|
|
15979
|
-
return I === 0 ?
|
|
15980
|
-
|
|
15981
|
-
|
|
15985
|
+
return I === 0 ? m = p = 0 : (p = I / y, A = C(w), u = C(x), h = C(k), w === y ? m = h - u : x === y ? m = 1 / 3 + A - h : k === y && (m = 2 / 3 + u - A), m < 0 ? m += 1 : m > 1 && (m -= 1)), [
|
|
15986
|
+
m * 360,
|
|
15987
|
+
p * 100,
|
|
15982
15988
|
y * 100
|
|
15983
15989
|
];
|
|
15984
15990
|
}, n.rgb.hwb = function(l) {
|
|
15985
|
-
var A = l[0], u = l[1], h = l[2],
|
|
15986
|
-
return h = 1 - 1 / 255 * Math.max(A, Math.max(u, h)), [
|
|
15991
|
+
var A = l[0], u = l[1], h = l[2], m = n.rgb.hsl(l)[0], p = 1 / 255 * Math.min(A, Math.min(u, h));
|
|
15992
|
+
return h = 1 - 1 / 255 * Math.max(A, Math.max(u, h)), [m, p * 100, h * 100];
|
|
15987
15993
|
}, n.rgb.cmyk = function(l) {
|
|
15988
|
-
var A = l[0] / 255, u = l[1] / 255, h = l[2] / 255,
|
|
15989
|
-
return x = Math.min(1 - A, 1 - u, 1 - h),
|
|
15994
|
+
var A = l[0] / 255, u = l[1] / 255, h = l[2] / 255, m, p, w, x;
|
|
15995
|
+
return x = Math.min(1 - A, 1 - u, 1 - h), m = (1 - A - x) / (1 - x) || 0, p = (1 - u - x) / (1 - x) || 0, w = (1 - h - x) / (1 - x) || 0, [m * 100, p * 100, w * 100, x * 100];
|
|
15990
15996
|
};
|
|
15991
15997
|
function c(l, A) {
|
|
15992
15998
|
return Math.pow(l[0] - A[0], 2) + Math.pow(l[1] - A[1], 2) + Math.pow(l[2] - A[2], 2);
|
|
@@ -15996,10 +16002,10 @@ var ur = {
|
|
|
15996
16002
|
if (A)
|
|
15997
16003
|
return A;
|
|
15998
16004
|
var u = 1 / 0, h;
|
|
15999
|
-
for (var
|
|
16000
|
-
if (ur.hasOwnProperty(
|
|
16001
|
-
var
|
|
16002
|
-
w < u && (u = w, h =
|
|
16005
|
+
for (var m in ur)
|
|
16006
|
+
if (ur.hasOwnProperty(m)) {
|
|
16007
|
+
var p = ur[m], w = c(l, p);
|
|
16008
|
+
w < u && (u = w, h = m);
|
|
16003
16009
|
}
|
|
16004
16010
|
return h;
|
|
16005
16011
|
}, n.keyword.rgb = function(l) {
|
|
@@ -16007,25 +16013,25 @@ var ur = {
|
|
|
16007
16013
|
}, n.rgb.xyz = function(l) {
|
|
16008
16014
|
var A = l[0] / 255, u = l[1] / 255, h = l[2] / 255;
|
|
16009
16015
|
A = A > 0.04045 ? Math.pow((A + 0.055) / 1.055, 2.4) : A / 12.92, u = u > 0.04045 ? Math.pow((u + 0.055) / 1.055, 2.4) : u / 12.92, h = h > 0.04045 ? Math.pow((h + 0.055) / 1.055, 2.4) : h / 12.92;
|
|
16010
|
-
var
|
|
16011
|
-
return [
|
|
16016
|
+
var m = A * 0.4124 + u * 0.3576 + h * 0.1805, p = A * 0.2126 + u * 0.7152 + h * 0.0722, w = A * 0.0193 + u * 0.1192 + h * 0.9505;
|
|
16017
|
+
return [m * 100, p * 100, w * 100];
|
|
16012
16018
|
}, n.rgb.lab = function(l) {
|
|
16013
|
-
var A = n.rgb.xyz(l), u = A[0], h = A[1],
|
|
16014
|
-
return u /= 95.047, h /= 100,
|
|
16019
|
+
var A = n.rgb.xyz(l), u = A[0], h = A[1], m = A[2], p, w, x;
|
|
16020
|
+
return u /= 95.047, h /= 100, m /= 108.883, u = u > 8856e-6 ? Math.pow(u, 1 / 3) : 7.787 * u + 16 / 116, h = h > 8856e-6 ? Math.pow(h, 1 / 3) : 7.787 * h + 16 / 116, m = m > 8856e-6 ? Math.pow(m, 1 / 3) : 7.787 * m + 16 / 116, p = 116 * h - 16, w = 500 * (u - h), x = 200 * (h - m), [p, w, x];
|
|
16015
16021
|
}, n.hsl.rgb = function(l) {
|
|
16016
|
-
var A = l[0] / 360, u = l[1] / 100, h = l[2] / 100,
|
|
16022
|
+
var A = l[0] / 360, u = l[1] / 100, h = l[2] / 100, m, p, w, x, k;
|
|
16017
16023
|
if (u === 0)
|
|
16018
16024
|
return k = h * 255, [k, k, k];
|
|
16019
|
-
h < 0.5 ?
|
|
16025
|
+
h < 0.5 ? p = h * (1 + u) : p = h + u - h * u, m = 2 * h - p, x = [0, 0, 0];
|
|
16020
16026
|
for (var y = 0; y < 3; y++)
|
|
16021
|
-
w = A + 1 / 3 * -(y - 1), w < 0 && w++, w > 1 && w--, 6 * w < 1 ? k =
|
|
16027
|
+
w = A + 1 / 3 * -(y - 1), w < 0 && w++, w > 1 && w--, 6 * w < 1 ? k = m + (p - m) * 6 * w : 2 * w < 1 ? k = p : 3 * w < 2 ? k = m + (p - m) * (2 / 3 - w) * 6 : k = m, x[y] = k * 255;
|
|
16022
16028
|
return x;
|
|
16023
16029
|
}, n.hsl.hsv = function(l) {
|
|
16024
|
-
var A = l[0], u = l[1] / 100, h = l[2] / 100,
|
|
16025
|
-
return h *= 2, u *= h <= 1 ? h : 2 - h,
|
|
16030
|
+
var A = l[0], u = l[1] / 100, h = l[2] / 100, m = u, p = Math.max(h, 0.01), w, x;
|
|
16031
|
+
return h *= 2, u *= h <= 1 ? h : 2 - h, m *= p <= 1 ? p : 2 - p, x = (h + u) / 2, w = h === 0 ? 2 * m / (p + m) : 2 * u / (h + u), [A, w * 100, x * 100];
|
|
16026
16032
|
}, n.hsv.rgb = function(l) {
|
|
16027
|
-
var A = l[0] / 60, u = l[1] / 100, h = l[2] / 100,
|
|
16028
|
-
switch (h *= 255,
|
|
16033
|
+
var A = l[0] / 60, u = l[1] / 100, h = l[2] / 100, m = Math.floor(A) % 6, p = A - Math.floor(A), w = 255 * h * (1 - u), x = 255 * h * (1 - u * p), k = 255 * h * (1 - u * (1 - p));
|
|
16034
|
+
switch (h *= 255, m) {
|
|
16029
16035
|
case 0:
|
|
16030
16036
|
return [h, k, w];
|
|
16031
16037
|
case 1:
|
|
@@ -16040,13 +16046,13 @@ var ur = {
|
|
|
16040
16046
|
return [h, w, x];
|
|
16041
16047
|
}
|
|
16042
16048
|
}, n.hsv.hsl = function(l) {
|
|
16043
|
-
var A = l[0], u = l[1] / 100, h = l[2] / 100,
|
|
16044
|
-
return x = (2 - u) * h,
|
|
16049
|
+
var A = l[0], u = l[1] / 100, h = l[2] / 100, m = Math.max(h, 0.01), p, w, x;
|
|
16050
|
+
return x = (2 - u) * h, p = (2 - u) * m, w = u * m, w /= p <= 1 ? p : 2 - p, w = w || 0, x /= 2, [A, w * 100, x * 100];
|
|
16045
16051
|
}, n.hwb.rgb = function(l) {
|
|
16046
|
-
var A = l[0] / 360, u = l[1] / 100, h = l[2] / 100,
|
|
16047
|
-
|
|
16052
|
+
var A = l[0] / 360, u = l[1] / 100, h = l[2] / 100, m = u + h, p, w, x, k;
|
|
16053
|
+
m > 1 && (u /= m, h /= m), p = Math.floor(6 * A), w = 1 - h, x = 6 * A - p, p & 1 && (x = 1 - x), k = u + x * (w - u);
|
|
16048
16054
|
var y, I, C;
|
|
16049
|
-
switch (
|
|
16055
|
+
switch (p) {
|
|
16050
16056
|
default:
|
|
16051
16057
|
case 6:
|
|
16052
16058
|
case 0:
|
|
@@ -16070,53 +16076,53 @@ var ur = {
|
|
|
16070
16076
|
}
|
|
16071
16077
|
return [y * 255, I * 255, C * 255];
|
|
16072
16078
|
}, n.cmyk.rgb = function(l) {
|
|
16073
|
-
var A = l[0] / 100, u = l[1] / 100, h = l[2] / 100,
|
|
16074
|
-
return
|
|
16079
|
+
var A = l[0] / 100, u = l[1] / 100, h = l[2] / 100, m = l[3] / 100, p, w, x;
|
|
16080
|
+
return p = 1 - Math.min(1, A * (1 - m) + m), w = 1 - Math.min(1, u * (1 - m) + m), x = 1 - Math.min(1, h * (1 - m) + m), [p * 255, w * 255, x * 255];
|
|
16075
16081
|
}, n.xyz.rgb = function(l) {
|
|
16076
|
-
var A = l[0] / 100, u = l[1] / 100, h = l[2] / 100,
|
|
16077
|
-
return
|
|
16082
|
+
var A = l[0] / 100, u = l[1] / 100, h = l[2] / 100, m, p, w;
|
|
16083
|
+
return m = A * 3.2406 + u * -1.5372 + h * -0.4986, p = A * -0.9689 + u * 1.8758 + h * 0.0415, w = A * 0.0557 + u * -0.204 + h * 1.057, m = m > 31308e-7 ? 1.055 * Math.pow(m, 1 / 2.4) - 0.055 : m * 12.92, p = p > 31308e-7 ? 1.055 * Math.pow(p, 1 / 2.4) - 0.055 : p * 12.92, w = w > 31308e-7 ? 1.055 * Math.pow(w, 1 / 2.4) - 0.055 : w * 12.92, m = Math.min(Math.max(0, m), 1), p = Math.min(Math.max(0, p), 1), w = Math.min(Math.max(0, w), 1), [m * 255, p * 255, w * 255];
|
|
16078
16084
|
}, n.xyz.lab = function(l) {
|
|
16079
|
-
var A = l[0], u = l[1], h = l[2],
|
|
16080
|
-
return A /= 95.047, u /= 100, h /= 108.883, A = A > 8856e-6 ? Math.pow(A, 1 / 3) : 7.787 * A + 16 / 116, u = u > 8856e-6 ? Math.pow(u, 1 / 3) : 7.787 * u + 16 / 116, h = h > 8856e-6 ? Math.pow(h, 1 / 3) : 7.787 * h + 16 / 116,
|
|
16085
|
+
var A = l[0], u = l[1], h = l[2], m, p, w;
|
|
16086
|
+
return A /= 95.047, u /= 100, h /= 108.883, A = A > 8856e-6 ? Math.pow(A, 1 / 3) : 7.787 * A + 16 / 116, u = u > 8856e-6 ? Math.pow(u, 1 / 3) : 7.787 * u + 16 / 116, h = h > 8856e-6 ? Math.pow(h, 1 / 3) : 7.787 * h + 16 / 116, m = 116 * u - 16, p = 500 * (A - u), w = 200 * (u - h), [m, p, w];
|
|
16081
16087
|
}, n.lab.xyz = function(l) {
|
|
16082
|
-
var A = l[0], u = l[1], h = l[2],
|
|
16083
|
-
|
|
16084
|
-
var x = Math.pow(
|
|
16085
|
-
return
|
|
16088
|
+
var A = l[0], u = l[1], h = l[2], m, p, w;
|
|
16089
|
+
p = (A + 16) / 116, m = u / 500 + p, w = p - h / 200;
|
|
16090
|
+
var x = Math.pow(p, 3), k = Math.pow(m, 3), y = Math.pow(w, 3);
|
|
16091
|
+
return p = x > 8856e-6 ? x : (p - 16 / 116) / 7.787, m = k > 8856e-6 ? k : (m - 16 / 116) / 7.787, w = y > 8856e-6 ? y : (w - 16 / 116) / 7.787, m *= 95.047, p *= 100, w *= 108.883, [m, p, w];
|
|
16086
16092
|
}, n.lab.lch = function(l) {
|
|
16087
|
-
var A = l[0], u = l[1], h = l[2],
|
|
16088
|
-
return
|
|
16093
|
+
var A = l[0], u = l[1], h = l[2], m, p, w;
|
|
16094
|
+
return m = Math.atan2(h, u), p = m * 360 / 2 / Math.PI, p < 0 && (p += 360), w = Math.sqrt(u * u + h * h), [A, w, p];
|
|
16089
16095
|
}, n.lch.lab = function(l) {
|
|
16090
|
-
var A = l[0], u = l[1], h = l[2],
|
|
16091
|
-
return w = h / 360 * 2 * Math.PI,
|
|
16096
|
+
var A = l[0], u = l[1], h = l[2], m, p, w;
|
|
16097
|
+
return w = h / 360 * 2 * Math.PI, m = u * Math.cos(w), p = u * Math.sin(w), [A, m, p];
|
|
16092
16098
|
}, n.rgb.ansi16 = function(l) {
|
|
16093
|
-
var A = l[0], u = l[1], h = l[2],
|
|
16094
|
-
if (
|
|
16099
|
+
var A = l[0], u = l[1], h = l[2], m = 1 in arguments ? arguments[1] : n.rgb.hsv(l)[2];
|
|
16100
|
+
if (m = Math.round(m / 50), m === 0)
|
|
16095
16101
|
return 30;
|
|
16096
|
-
var
|
|
16097
|
-
return
|
|
16102
|
+
var p = 30 + (Math.round(h / 255) << 2 | Math.round(u / 255) << 1 | Math.round(A / 255));
|
|
16103
|
+
return m === 2 && (p += 60), p;
|
|
16098
16104
|
}, n.hsv.ansi16 = function(l) {
|
|
16099
16105
|
return n.rgb.ansi16(n.hsv.rgb(l), l[2]);
|
|
16100
16106
|
}, n.rgb.ansi256 = function(l) {
|
|
16101
16107
|
var A = l[0], u = l[1], h = l[2];
|
|
16102
16108
|
if (A === u && u === h)
|
|
16103
16109
|
return A < 8 ? 16 : A > 248 ? 231 : Math.round((A - 8) / 247 * 24) + 232;
|
|
16104
|
-
var
|
|
16105
|
-
return
|
|
16110
|
+
var m = 16 + 36 * Math.round(A / 255 * 5) + 6 * Math.round(u / 255 * 5) + Math.round(h / 255 * 5);
|
|
16111
|
+
return m;
|
|
16106
16112
|
}, n.ansi16.rgb = function(l) {
|
|
16107
16113
|
var A = l % 10;
|
|
16108
16114
|
if (A === 0 || A === 7)
|
|
16109
16115
|
return l > 50 && (A += 3.5), A = A / 10.5 * 255, [A, A, A];
|
|
16110
|
-
var u = (~~(l > 50) + 1) * 0.5, h = (A & 1) * u * 255,
|
|
16111
|
-
return [h,
|
|
16116
|
+
var u = (~~(l > 50) + 1) * 0.5, h = (A & 1) * u * 255, m = (A >> 1 & 1) * u * 255, p = (A >> 2 & 1) * u * 255;
|
|
16117
|
+
return [h, m, p];
|
|
16112
16118
|
}, n.ansi256.rgb = function(l) {
|
|
16113
16119
|
if (l >= 232) {
|
|
16114
16120
|
var A = (l - 232) * 10 + 8;
|
|
16115
16121
|
return [A, A, A];
|
|
16116
16122
|
}
|
|
16117
16123
|
l -= 16;
|
|
16118
|
-
var u, h = Math.floor(l / 36) / 5 * 255,
|
|
16119
|
-
return [h,
|
|
16124
|
+
var u, h = Math.floor(l / 36) / 5 * 255, m = Math.floor((u = l % 36) / 6) / 5 * 255, p = u % 6 / 5 * 255;
|
|
16125
|
+
return [h, m, p];
|
|
16120
16126
|
}, n.rgb.hex = function(l) {
|
|
16121
16127
|
var A = ((Math.round(l[0]) & 255) << 16) + ((Math.round(l[1]) & 255) << 8) + (Math.round(l[2]) & 255), u = A.toString(16).toUpperCase();
|
|
16122
16128
|
return "000000".substring(u.length) + u;
|
|
@@ -16128,58 +16134,58 @@ var ur = {
|
|
|
16128
16134
|
A[0].length === 3 && (u = u.split("").map(function(x) {
|
|
16129
16135
|
return x + x;
|
|
16130
16136
|
}).join(""));
|
|
16131
|
-
var h = parseInt(u, 16),
|
|
16132
|
-
return [
|
|
16137
|
+
var h = parseInt(u, 16), m = h >> 16 & 255, p = h >> 8 & 255, w = h & 255;
|
|
16138
|
+
return [m, p, w];
|
|
16133
16139
|
}, n.rgb.hcg = function(l) {
|
|
16134
|
-
var A = l[0] / 255, u = l[1] / 255, h = l[2] / 255,
|
|
16135
|
-
return w < 1 ? x =
|
|
16140
|
+
var A = l[0] / 255, u = l[1] / 255, h = l[2] / 255, m = Math.max(Math.max(A, u), h), p = Math.min(Math.min(A, u), h), w = m - p, x, k;
|
|
16141
|
+
return w < 1 ? x = p / (1 - w) : x = 0, w <= 0 ? k = 0 : m === A ? k = (u - h) / w % 6 : m === u ? k = 2 + (h - A) / w : k = 4 + (A - u) / w + 4, k /= 6, k %= 1, [k * 360, w * 100, x * 100];
|
|
16136
16142
|
}, n.hsl.hcg = function(l) {
|
|
16137
|
-
var A = l[1] / 100, u = l[2] / 100, h = 1,
|
|
16138
|
-
return u < 0.5 ? h = 2 * A * u : h = 2 * A * (1 - u), h < 1 && (
|
|
16143
|
+
var A = l[1] / 100, u = l[2] / 100, h = 1, m = 0;
|
|
16144
|
+
return u < 0.5 ? h = 2 * A * u : h = 2 * A * (1 - u), h < 1 && (m = (u - 0.5 * h) / (1 - h)), [l[0], h * 100, m * 100];
|
|
16139
16145
|
}, n.hsv.hcg = function(l) {
|
|
16140
|
-
var A = l[1] / 100, u = l[2] / 100, h = A * u,
|
|
16141
|
-
return h < 1 && (
|
|
16146
|
+
var A = l[1] / 100, u = l[2] / 100, h = A * u, m = 0;
|
|
16147
|
+
return h < 1 && (m = (u - h) / (1 - h)), [l[0], h * 100, m * 100];
|
|
16142
16148
|
}, n.hcg.rgb = function(l) {
|
|
16143
16149
|
var A = l[0] / 360, u = l[1] / 100, h = l[2] / 100;
|
|
16144
16150
|
if (u === 0)
|
|
16145
16151
|
return [h * 255, h * 255, h * 255];
|
|
16146
|
-
var
|
|
16147
|
-
switch (Math.floor(
|
|
16152
|
+
var m = [0, 0, 0], p = A % 1 * 6, w = p % 1, x = 1 - w, k = 0;
|
|
16153
|
+
switch (Math.floor(p)) {
|
|
16148
16154
|
case 0:
|
|
16149
|
-
|
|
16155
|
+
m[0] = 1, m[1] = w, m[2] = 0;
|
|
16150
16156
|
break;
|
|
16151
16157
|
case 1:
|
|
16152
|
-
|
|
16158
|
+
m[0] = x, m[1] = 1, m[2] = 0;
|
|
16153
16159
|
break;
|
|
16154
16160
|
case 2:
|
|
16155
|
-
|
|
16161
|
+
m[0] = 0, m[1] = 1, m[2] = w;
|
|
16156
16162
|
break;
|
|
16157
16163
|
case 3:
|
|
16158
|
-
|
|
16164
|
+
m[0] = 0, m[1] = x, m[2] = 1;
|
|
16159
16165
|
break;
|
|
16160
16166
|
case 4:
|
|
16161
|
-
|
|
16167
|
+
m[0] = w, m[1] = 0, m[2] = 1;
|
|
16162
16168
|
break;
|
|
16163
16169
|
default:
|
|
16164
|
-
|
|
16170
|
+
m[0] = 1, m[1] = 0, m[2] = x;
|
|
16165
16171
|
}
|
|
16166
16172
|
return k = (1 - u) * h, [
|
|
16167
|
-
(u *
|
|
16168
|
-
(u *
|
|
16169
|
-
(u *
|
|
16173
|
+
(u * m[0] + k) * 255,
|
|
16174
|
+
(u * m[1] + k) * 255,
|
|
16175
|
+
(u * m[2] + k) * 255
|
|
16170
16176
|
];
|
|
16171
16177
|
}, n.hcg.hsv = function(l) {
|
|
16172
|
-
var A = l[1] / 100, u = l[2] / 100, h = A + u * (1 - A),
|
|
16173
|
-
return h > 0 && (
|
|
16178
|
+
var A = l[1] / 100, u = l[2] / 100, h = A + u * (1 - A), m = 0;
|
|
16179
|
+
return h > 0 && (m = A / h), [l[0], m * 100, h * 100];
|
|
16174
16180
|
}, n.hcg.hsl = function(l) {
|
|
16175
|
-
var A = l[1] / 100, u = l[2] / 100, h = u * (1 - A) + 0.5 * A,
|
|
16176
|
-
return h > 0 && h < 0.5 ?
|
|
16181
|
+
var A = l[1] / 100, u = l[2] / 100, h = u * (1 - A) + 0.5 * A, m = 0;
|
|
16182
|
+
return h > 0 && h < 0.5 ? m = A / (2 * h) : h >= 0.5 && h < 1 && (m = A / (2 * (1 - h))), [l[0], m * 100, h * 100];
|
|
16177
16183
|
}, n.hcg.hwb = function(l) {
|
|
16178
16184
|
var A = l[1] / 100, u = l[2] / 100, h = A + u * (1 - A);
|
|
16179
16185
|
return [l[0], (h - A) * 100, (1 - h) * 100];
|
|
16180
16186
|
}, n.hwb.hcg = function(l) {
|
|
16181
|
-
var A = l[1] / 100, u = l[2] / 100, h = 1 - u,
|
|
16182
|
-
return
|
|
16187
|
+
var A = l[1] / 100, u = l[2] / 100, h = 1 - u, m = h - A, p = 0;
|
|
16188
|
+
return m < 1 && (p = (h - m) / (1 - m)), [l[0], m * 100, p * 100];
|
|
16183
16189
|
}, n.apple.rgb = function(l) {
|
|
16184
16190
|
return [l[0] / 65535 * 255, l[1] / 65535 * 255, l[2] / 65535 * 255];
|
|
16185
16191
|
}, n.rgb.apple = function(l) {
|
|
@@ -16559,7 +16565,7 @@ const ak = ({
|
|
|
16559
16565
|
let u = "min-height: 58px;max-width: 440px;margin: 0 auto;width: 100%";
|
|
16560
16566
|
o === "all-in-one" && (r.icon && r.icon !== "" && (A.icon = r.icon.replace(/\/content\/images\//, "/content/images/size/w192h192/")), A.title = r.title, A.description = r.description, A["background-color"] = a, A["text-color"] = Pt(a).hex(), u = "height: 40vmin;min-height: 360px"), e && (o === "minimal" ? u = "min-height: 58px; max-width: 440px;width: 100%;position: absolute; left: 50%; top:50%; transform: translate(-50%, -50%);" : u = "height: 100vh");
|
|
16561
16567
|
let h = "";
|
|
16562
|
-
const
|
|
16568
|
+
const m = [
|
|
16563
16569
|
"background-color",
|
|
16564
16570
|
"text-color",
|
|
16565
16571
|
"button-color",
|
|
@@ -16569,8 +16575,8 @@ const ak = ({
|
|
|
16569
16575
|
"icon",
|
|
16570
16576
|
"site",
|
|
16571
16577
|
"locale"
|
|
16572
|
-
],
|
|
16573
|
-
for (const x of
|
|
16578
|
+
], p = Object.keys(A).sort((x, k) => m.indexOf(x) - m.indexOf(k));
|
|
16579
|
+
for (const x of p) {
|
|
16574
16580
|
const k = A[x];
|
|
16575
16581
|
h += ` data-${x}="${Fi(k)}"`;
|
|
16576
16582
|
}
|
|
@@ -16578,7 +16584,7 @@ const ak = ({
|
|
|
16578
16584
|
return e && u === "minimal" ? `<div style="position: absolute; z-index: -1; top: 0; left: 0; width: 100%; height: 100%; background-image: linear-gradient(45deg, #eee 25%, transparent 25%, transparent 75%, #eee 75%), linear-gradient(45deg, #eee 25%, transparent 25%, transparent 75%, #eee 75%);background-size: 16px 16px;background-position: 0 0, 8px 8px;;"></div>${w}` : w;
|
|
16579
16585
|
}, sk = ne.create(() => {
|
|
16580
16586
|
let e = !1;
|
|
16581
|
-
const [t, r] = G("#08090c"), [n, a] = G([]), [o, i] = G("all-in-one"), [c, l] = G(""), [A, u] = G(!1), { updateRoute: h } = ye(), { config:
|
|
16587
|
+
const [t, r] = G("#08090c"), [n, a] = G([]), [o, i] = G("all-in-one"), [c, l] = G(""), [A, u] = G(!1), { updateRoute: h } = ye(), { config: m } = Te(), { localSettings: p, siteData: w } = kr(), [x, k, y, I, C, R] = Ue(p, ["accent_color", "title", "description", "locale", "labs", "icon"]), [U, O] = G({ active: !1 });
|
|
16582
16588
|
C && (e = JSON.parse(C).i18n), ie(() => {
|
|
16583
16589
|
var j, J;
|
|
16584
16590
|
if (!w)
|
|
@@ -16588,8 +16594,8 @@ const ak = ({
|
|
|
16588
16594
|
config: {
|
|
16589
16595
|
blogUrl: w.url,
|
|
16590
16596
|
signupForm: {
|
|
16591
|
-
url: (j =
|
|
16592
|
-
version: (J =
|
|
16597
|
+
url: (j = m == null ? void 0 : m.signupForm) == null ? void 0 : j.url,
|
|
16598
|
+
version: (J = m == null ? void 0 : m.signupForm) == null ? void 0 : J.version
|
|
16593
16599
|
}
|
|
16594
16600
|
},
|
|
16595
16601
|
settings: {
|
|
@@ -16605,7 +16611,7 @@ const ak = ({
|
|
|
16605
16611
|
i18nEnabled: e
|
|
16606
16612
|
});
|
|
16607
16613
|
l(z);
|
|
16608
|
-
}, [w, x, n,
|
|
16614
|
+
}, [w, x, n, m, k, t, o, I, e, R, y]);
|
|
16609
16615
|
const F = async () => {
|
|
16610
16616
|
try {
|
|
16611
16617
|
await navigator.clipboard.writeText(c), u(!0), setTimeout(() => u(!1), 2e3);
|
|
@@ -16668,8 +16674,8 @@ const ak = ({
|
|
|
16668
16674
|
ie(() => {
|
|
16669
16675
|
h(i || !1), o(c || null);
|
|
16670
16676
|
}, [i, c]);
|
|
16671
|
-
const
|
|
16672
|
-
const
|
|
16677
|
+
const m = async () => {
|
|
16678
|
+
const p = [
|
|
16673
16679
|
{
|
|
16674
16680
|
key: "firstpromoter",
|
|
16675
16681
|
value: u
|
|
@@ -16681,7 +16687,7 @@ const ak = ({
|
|
|
16681
16687
|
];
|
|
16682
16688
|
try {
|
|
16683
16689
|
A("Saving..."), await Promise.all([
|
|
16684
|
-
r(
|
|
16690
|
+
r(p),
|
|
16685
16691
|
new Promise((w) => {
|
|
16686
16692
|
setTimeout(w, 1e3);
|
|
16687
16693
|
})
|
|
@@ -16706,9 +16712,9 @@ const ak = ({
|
|
|
16706
16712
|
title: "",
|
|
16707
16713
|
onOk: async () => {
|
|
16708
16714
|
try {
|
|
16709
|
-
await
|
|
16710
|
-
} catch (
|
|
16711
|
-
n(
|
|
16715
|
+
await m();
|
|
16716
|
+
} catch (p) {
|
|
16717
|
+
n(p);
|
|
16712
16718
|
}
|
|
16713
16719
|
},
|
|
16714
16720
|
children: [
|
|
@@ -16732,8 +16738,8 @@ const ak = ({
|
|
|
16732
16738
|
" for tracking referrals"
|
|
16733
16739
|
] }),
|
|
16734
16740
|
label: "Enable FirstPromoter",
|
|
16735
|
-
onChange: (
|
|
16736
|
-
h(
|
|
16741
|
+
onChange: (p) => {
|
|
16742
|
+
h(p.target.checked);
|
|
16737
16743
|
}
|
|
16738
16744
|
}
|
|
16739
16745
|
),
|
|
@@ -16747,8 +16753,8 @@ const ak = ({
|
|
|
16747
16753
|
placeholder: "XXXXXXXX",
|
|
16748
16754
|
title: "FirstPromoter account ID",
|
|
16749
16755
|
value: a || "",
|
|
16750
|
-
onChange: (
|
|
16751
|
-
o(
|
|
16756
|
+
onChange: (p) => {
|
|
16757
|
+
o(p.target.value);
|
|
16752
16758
|
}
|
|
16753
16759
|
}
|
|
16754
16760
|
)
|
|
@@ -16861,8 +16867,8 @@ const ak = ({
|
|
|
16861
16867
|
}
|
|
16862
16868
|
), fk = ({ excludedEvents: e, excludedResources: t, toggleEventType: r, toggleResourceType: n }) => {
|
|
16863
16869
|
const { updateRoute: a } = ye(), o = cl({ path: "/users/", filterKey: "name", responseKey: "users" }), i = async (u, h) => {
|
|
16864
|
-
const
|
|
16865
|
-
h(
|
|
16870
|
+
const m = await o.loadData(u);
|
|
16871
|
+
h(m.map((p) => ({ label: p.name, value: p.id })));
|
|
16866
16872
|
}, [c, l] = G(), A = () => {
|
|
16867
16873
|
l(null);
|
|
16868
16874
|
};
|
|
@@ -16900,23 +16906,23 @@ const ak = ({
|
|
|
16900
16906
|
var n, a, o, i, c, l, A, u;
|
|
16901
16907
|
const { updateRoute: t } = ye(), r = uk(e);
|
|
16902
16908
|
if (r) {
|
|
16903
|
-
const { group: h, key:
|
|
16909
|
+
const { group: h, key: m } = r;
|
|
16904
16910
|
return /* @__PURE__ */ s.jsxs(s.Fragment, { children: [
|
|
16905
16911
|
h.slice(0, 1).toUpperCase(),
|
|
16906
16912
|
h.slice(1),
|
|
16907
|
-
h !==
|
|
16913
|
+
h !== m && /* @__PURE__ */ s.jsxs("span", { className: "text-xs", children: [
|
|
16908
16914
|
" ",
|
|
16909
16915
|
/* @__PURE__ */ s.jsxs("code", { className: "mb-1 bg-white text-grey-800 dark:bg-grey-900 dark:text-white", children: [
|
|
16910
16916
|
"(",
|
|
16911
|
-
|
|
16917
|
+
m,
|
|
16912
16918
|
")"
|
|
16913
16919
|
] })
|
|
16914
16920
|
] })
|
|
16915
16921
|
] });
|
|
16916
16922
|
} else if ((n = e.resource) != null && n.title || (a = e.resource) != null && a.name || (o = e.context) != null && o.primary_name) {
|
|
16917
16923
|
const h = Ak(e);
|
|
16918
|
-
return h ? /* @__PURE__ */ s.jsx("a", { className: "cursor-pointer font-bold", onClick: (
|
|
16919
|
-
|
|
16924
|
+
return h ? /* @__PURE__ */ s.jsx("a", { className: "cursor-pointer font-bold", onClick: (m) => {
|
|
16925
|
+
m.preventDefault(), t(h);
|
|
16920
16926
|
}, children: ((i = e.resource) == null ? void 0 : i.title) || ((c = e.resource) == null ? void 0 : c.name) }) : /* @__PURE__ */ s.jsx(s.Fragment, { children: ((l = e.resource) == null ? void 0 : l.title) || ((A = e.resource) == null ? void 0 : A.name) || ((u = e.context) == null ? void 0 : u.primary_name) });
|
|
16921
16927
|
} else
|
|
16922
16928
|
return /* @__PURE__ */ s.jsx("span", { className: "text-grey-500", children: "(unknown)" });
|
|
@@ -16941,15 +16947,15 @@ const ak = ({
|
|
|
16941
16947
|
(e == null ? void 0 : e.user) && `actor_id:'${e.user}'`
|
|
16942
16948
|
].filter(Boolean).join("+")
|
|
16943
16949
|
},
|
|
16944
|
-
getNextPageParams: (h,
|
|
16945
|
-
...
|
|
16946
|
-
filter: [
|
|
16950
|
+
getNextPageParams: (h, m) => ({
|
|
16951
|
+
...m,
|
|
16952
|
+
filter: [m.filter, h.actions.length && `created_at:<'${pk(new Date(h.actions[h.actions.length - 1].created_at))}'`].join("+")
|
|
16947
16953
|
}),
|
|
16948
16954
|
keepPreviousData: !0
|
|
16949
16955
|
}), A = it(() => {
|
|
16950
16956
|
c != null && c.isEnd || l();
|
|
16951
|
-
}, [c == null ? void 0 : c.isEnd, l]), u = (h,
|
|
16952
|
-
h((w) =>
|
|
16957
|
+
}, [c == null ? void 0 : c.isEnd, l]), u = (h, m, p) => {
|
|
16958
|
+
h((w) => p ? w.concat(m) : w.filter((x) => x !== m));
|
|
16953
16959
|
};
|
|
16954
16960
|
return /* @__PURE__ */ s.jsx(
|
|
16955
16961
|
ze,
|
|
@@ -16970,8 +16976,8 @@ const ak = ({
|
|
|
16970
16976
|
{
|
|
16971
16977
|
excludedEvents: n,
|
|
16972
16978
|
excludedResources: o,
|
|
16973
|
-
toggleEventType: (h,
|
|
16974
|
-
toggleResourceType: (h,
|
|
16979
|
+
toggleEventType: (h, m) => u(a, h, !m),
|
|
16980
|
+
toggleResourceType: (h, m) => u(i, h, !m),
|
|
16975
16981
|
userId: e == null ? void 0 : e.user
|
|
16976
16982
|
}
|
|
16977
16983
|
),
|
|
@@ -16981,7 +16987,7 @@ const ak = ({
|
|
|
16981
16987
|
children: /* @__PURE__ */ s.jsx("div", { className: "relative -mb-8 mt-6", children: /* @__PURE__ */ s.jsx(Gt, { hint: c != null && c.isEnd ? "End of history log" : void 0, children: c != null && c.actions ? /* @__PURE__ */ s.jsxs(s.Fragment, { children: [
|
|
16982
16988
|
/* @__PURE__ */ s.jsx(Hf, { offset: 250, onTrigger: A }),
|
|
16983
16989
|
c == null ? void 0 : c.actions.map((h) => {
|
|
16984
|
-
var
|
|
16990
|
+
var m, p;
|
|
16985
16991
|
return !h.skip && /* @__PURE__ */ s.jsx(
|
|
16986
16992
|
sr,
|
|
16987
16993
|
{
|
|
@@ -17001,7 +17007,7 @@ const ak = ({
|
|
|
17001
17007
|
] }) : null,
|
|
17002
17008
|
/* @__PURE__ */ s.jsxs("span", { children: [
|
|
17003
17009
|
" — by ",
|
|
17004
|
-
((
|
|
17010
|
+
((m = h.actor) == null ? void 0 : m.name) || ((p = h.actor) == null ? void 0 : p.slug)
|
|
17005
17011
|
] })
|
|
17006
17012
|
] }),
|
|
17007
17013
|
separator: !0
|
|
@@ -17015,7 +17021,7 @@ const ak = ({
|
|
|
17015
17021
|
var Y, X;
|
|
17016
17022
|
const e = ne.useModal(), t = Va(), r = Va({
|
|
17017
17023
|
searchParams: { limit: "all", permissions: "assign" }
|
|
17018
|
-
}), n = Zr(), { updateRoute: a } = ye(), o = Ye(null), [i, c] = G(""), [l, A] = G(""), [u, h] = G("contributor"), [
|
|
17024
|
+
}), n = Zr(), { updateRoute: a } = ye(), o = Ye(null), [i, c] = G(""), [l, A] = G(""), [u, h] = G("contributor"), [m, p] = G({}), { data: { users: w } = {} } = Th(), { data: { invites: x } = {} } = Ch(), { mutateAsync: k } = Dh(), y = je();
|
|
17019
17025
|
if (ie(() => {
|
|
17020
17026
|
o.current && o.current.focus();
|
|
17021
17027
|
}, []), ie(() => {
|
|
@@ -17024,14 +17030,14 @@ const ak = ({
|
|
|
17024
17030
|
}, 2e3);
|
|
17025
17031
|
}, [l]), ie(() => {
|
|
17026
17032
|
u !== "contributor" && (n != null && n.isLimited("staff")) ? n.errorIfWouldGoOverLimit("staff").then(() => {
|
|
17027
|
-
|
|
17033
|
+
p((z) => ({ ...z, role: void 0 }));
|
|
17028
17034
|
}).catch((z) => {
|
|
17029
17035
|
if (z instanceof br) {
|
|
17030
|
-
|
|
17036
|
+
p((j) => ({ ...j, role: z.message }));
|
|
17031
17037
|
return;
|
|
17032
17038
|
} else
|
|
17033
17039
|
throw z;
|
|
17034
|
-
}) :
|
|
17040
|
+
}) : p((z) => ({ ...z, role: void 0 }));
|
|
17035
17041
|
}, [n, u]), !((Y = t.data) != null && Y.roles) || !((X = r.data) != null && X.roles))
|
|
17036
17042
|
return null;
|
|
17037
17043
|
const I = t.data.roles, C = r.data.roles;
|
|
@@ -17041,24 +17047,24 @@ const ak = ({
|
|
|
17041
17047
|
var z, j;
|
|
17042
17048
|
if (l !== "saving") {
|
|
17043
17049
|
if (!Ut.isEmail(i)) {
|
|
17044
|
-
|
|
17050
|
+
p({
|
|
17045
17051
|
email: "Please enter a valid email address."
|
|
17046
17052
|
});
|
|
17047
17053
|
return;
|
|
17048
17054
|
}
|
|
17049
17055
|
if (w != null && w.some(({ email: J }) => J === i)) {
|
|
17050
|
-
|
|
17056
|
+
p({
|
|
17051
17057
|
email: "A user with that email address already exists."
|
|
17052
17058
|
});
|
|
17053
17059
|
return;
|
|
17054
17060
|
}
|
|
17055
17061
|
if (x != null && x.some(({ email: J }) => J === i)) {
|
|
17056
|
-
|
|
17062
|
+
p({
|
|
17057
17063
|
email: "A user with that email address was already invited."
|
|
17058
17064
|
});
|
|
17059
17065
|
return;
|
|
17060
17066
|
}
|
|
17061
|
-
if (!
|
|
17067
|
+
if (!m.role) {
|
|
17062
17068
|
A("saving");
|
|
17063
17069
|
try {
|
|
17064
17070
|
await k({
|
|
@@ -17114,14 +17120,14 @@ const ak = ({
|
|
|
17114
17120
|
value: "administrator"
|
|
17115
17121
|
}
|
|
17116
17122
|
].filter((z) => C.some((j) => j.name === z.label));
|
|
17117
|
-
return
|
|
17123
|
+
return m.email && (R = "Retry"), /* @__PURE__ */ s.jsx(
|
|
17118
17124
|
ze,
|
|
17119
17125
|
{
|
|
17120
17126
|
afterClose: () => {
|
|
17121
17127
|
a("staff");
|
|
17122
17128
|
},
|
|
17123
17129
|
cancelLabel: "",
|
|
17124
|
-
okColor: l === "error" ||
|
|
17130
|
+
okColor: l === "error" || m.email ? "red" : "black",
|
|
17125
17131
|
okLabel: R,
|
|
17126
17132
|
testId: "invite-user-modal",
|
|
17127
17133
|
title: "Invite a new staff user",
|
|
@@ -17132,8 +17138,8 @@ const ak = ({
|
|
|
17132
17138
|
/* @__PURE__ */ s.jsx(
|
|
17133
17139
|
ce,
|
|
17134
17140
|
{
|
|
17135
|
-
error: !!
|
|
17136
|
-
hint:
|
|
17141
|
+
error: !!m.email,
|
|
17142
|
+
hint: m.email,
|
|
17137
17143
|
inputRef: o,
|
|
17138
17144
|
placeholder: "jamie@example.com",
|
|
17139
17145
|
title: "Email address",
|
|
@@ -17141,14 +17147,14 @@ const ak = ({
|
|
|
17141
17147
|
onChange: (z) => {
|
|
17142
17148
|
c(z.target.value);
|
|
17143
17149
|
},
|
|
17144
|
-
onKeyDown: () =>
|
|
17150
|
+
onKeyDown: () => p((z) => ({ ...z, email: void 0 }))
|
|
17145
17151
|
}
|
|
17146
17152
|
),
|
|
17147
17153
|
/* @__PURE__ */ s.jsx("div", { children: /* @__PURE__ */ s.jsx(
|
|
17148
17154
|
Ss,
|
|
17149
17155
|
{
|
|
17150
|
-
error: !!
|
|
17151
|
-
hint:
|
|
17156
|
+
error: !!m.role,
|
|
17157
|
+
hint: m.role,
|
|
17152
17158
|
id: "role",
|
|
17153
17159
|
options: F,
|
|
17154
17160
|
selectedOption: u,
|
|
@@ -17232,51 +17238,51 @@ const ak = ({
|
|
|
17232
17238
|
)
|
|
17233
17239
|
] })
|
|
17234
17240
|
] }), Xi = ({ items: e, setItems: t }) => {
|
|
17235
|
-
const r = (
|
|
17236
|
-
items: e.map((
|
|
17237
|
-
setItems: (
|
|
17241
|
+
const r = (m) => !!(m.label && !m.label.match(/^\s*$/) || m.url !== "/"), n = Il({
|
|
17242
|
+
items: e.map((m) => ({ ...m, errors: {} })),
|
|
17243
|
+
setItems: (m) => t(m.map(({ url: p, label: w }) => ({ url: p, label: w }))),
|
|
17238
17244
|
blank: { url: "/", label: "", errors: {} },
|
|
17239
17245
|
canAddNewItem: r
|
|
17240
|
-
}), a = new RegExp(/^(\/|#|[a-zA-Z0-9-]+:)/), o = (
|
|
17241
|
-
const
|
|
17242
|
-
return (!
|
|
17243
|
-
}, i = (
|
|
17244
|
-
const w = n.items.find((x) => x.id ===
|
|
17245
|
-
n.updateItem(
|
|
17246
|
+
}), a = new RegExp(/^(\/|#|[a-zA-Z0-9-]+:)/), o = (m) => {
|
|
17247
|
+
const p = {};
|
|
17248
|
+
return (!m.label || m.label.match(/^\s*$/)) && (p.label = "You must specify a label"), (!m.url || m.url.match(/\s/) || !Ut.isURL(m.url, { require_protocol: !0 }) && !m.url.match(a)) && (p.url = "You must specify a valid URL or relative path"), p;
|
|
17249
|
+
}, i = (m, p) => {
|
|
17250
|
+
const w = n.items.find((x) => x.id === m);
|
|
17251
|
+
n.updateItem(m, { ...w.item, ...p });
|
|
17246
17252
|
}, c = () => {
|
|
17247
|
-
const
|
|
17248
|
-
Object.values(
|
|
17249
|
-
}, l = (
|
|
17250
|
-
n.removeItem(
|
|
17251
|
-
}, A = (
|
|
17252
|
-
n.moveItem(
|
|
17253
|
-
}, u = "new", h = (
|
|
17254
|
-
if (
|
|
17255
|
-
n.setNewItem({ ...n.newItem, errors: { ...n.newItem.errors, [
|
|
17253
|
+
const m = o(n.newItem);
|
|
17254
|
+
Object.values(m).some((p) => p) ? n.setNewItem({ ...n.newItem, errors: m }) : n.addItem();
|
|
17255
|
+
}, l = (m) => {
|
|
17256
|
+
n.removeItem(m);
|
|
17257
|
+
}, A = (m, p) => {
|
|
17258
|
+
n.moveItem(m, p);
|
|
17259
|
+
}, u = "new", h = (m, p) => {
|
|
17260
|
+
if (m === u)
|
|
17261
|
+
n.setNewItem({ ...n.newItem, errors: { ...n.newItem.errors, [p]: void 0 } });
|
|
17256
17262
|
else {
|
|
17257
|
-
const w = n.items.find((x) => x.id ===
|
|
17258
|
-
n.updateItem(
|
|
17263
|
+
const w = n.items.find((x) => x.id === m).item;
|
|
17264
|
+
n.updateItem(m, { ...w, errors: { ...w.errors, [p]: void 0 } });
|
|
17259
17265
|
}
|
|
17260
17266
|
};
|
|
17261
17267
|
return {
|
|
17262
|
-
items: n.items.map(({ item:
|
|
17268
|
+
items: n.items.map(({ item: m, id: p }) => ({ ...m, id: p })),
|
|
17263
17269
|
updateItem: i,
|
|
17264
17270
|
addItem: c,
|
|
17265
17271
|
removeItem: l,
|
|
17266
17272
|
moveItem: A,
|
|
17267
17273
|
newItem: { ...n.newItem, id: u },
|
|
17268
|
-
setNewItem: (
|
|
17274
|
+
setNewItem: (m) => n.setNewItem({ ...n.newItem, ...m }),
|
|
17269
17275
|
clearError: h,
|
|
17270
17276
|
validate: () => {
|
|
17271
|
-
let
|
|
17272
|
-
if (n.items.forEach(({ item:
|
|
17273
|
-
let x = o(
|
|
17274
|
-
Object.values(x).some((k) => k) && (
|
|
17277
|
+
let m = !0;
|
|
17278
|
+
if (n.items.forEach(({ item: p, id: w }) => {
|
|
17279
|
+
let x = o(p);
|
|
17280
|
+
Object.values(x).some((k) => k) && (m = !1, n.updateItem(w, { ...p, errors: x }));
|
|
17275
17281
|
}), r(n.newItem)) {
|
|
17276
|
-
const
|
|
17277
|
-
Object.values(
|
|
17282
|
+
const p = o(n.newItem);
|
|
17283
|
+
Object.values(p).some((w) => w) && (m = !1, n.setNewItem({ ...n.newItem, errors: p }));
|
|
17278
17284
|
}
|
|
17279
|
-
return
|
|
17285
|
+
return m;
|
|
17280
17286
|
}
|
|
17281
17287
|
};
|
|
17282
17288
|
}, vk = ne.create(() => {
|
|
@@ -17289,15 +17295,15 @@ const ak = ({
|
|
|
17289
17295
|
} = kr(), [c, l] = Ue(
|
|
17290
17296
|
r,
|
|
17291
17297
|
["navigation", "secondary_navigation"]
|
|
17292
|
-
).map((
|
|
17298
|
+
).map((p) => JSON.parse(p || "[]")), A = Xi({
|
|
17293
17299
|
items: c,
|
|
17294
|
-
setItems: (
|
|
17295
|
-
n("navigation", JSON.stringify(
|
|
17300
|
+
setItems: (p) => {
|
|
17301
|
+
n("navigation", JSON.stringify(p));
|
|
17296
17302
|
}
|
|
17297
17303
|
}), u = Xi({
|
|
17298
17304
|
items: l,
|
|
17299
|
-
setItems: (
|
|
17300
|
-
}), [h,
|
|
17305
|
+
setItems: (p) => n("secondary_navigation", JSON.stringify(p))
|
|
17306
|
+
}), [h, m] = G("primary-nav");
|
|
17301
17307
|
return /* @__PURE__ */ s.jsx(
|
|
17302
17308
|
ze,
|
|
17303
17309
|
{
|
|
@@ -17306,7 +17312,7 @@ const ak = ({
|
|
|
17306
17312
|
},
|
|
17307
17313
|
buttonsDisabled: a === "saving",
|
|
17308
17314
|
cancelLabel: "Close",
|
|
17309
|
-
dirty: r.some((
|
|
17315
|
+
dirty: r.some((p) => p.dirty),
|
|
17310
17316
|
okLabel: a === "saving" ? "Saving..." : "Save",
|
|
17311
17317
|
scrolling: !0,
|
|
17312
17318
|
size: "lg",
|
|
@@ -17332,7 +17338,7 @@ const ak = ({
|
|
|
17332
17338
|
contents: /* @__PURE__ */ s.jsx(Ki, { baseUrl: i.url, navigation: u })
|
|
17333
17339
|
}
|
|
17334
17340
|
],
|
|
17335
|
-
onTabChange:
|
|
17341
|
+
onTabChange: m
|
|
17336
17342
|
}
|
|
17337
17343
|
) })
|
|
17338
17344
|
}
|
|
@@ -17350,8 +17356,8 @@ const ak = ({
|
|
|
17350
17356
|
titleAlignment: A,
|
|
17351
17357
|
titleFontCategory: u,
|
|
17352
17358
|
bodyFontCategory: h,
|
|
17353
|
-
authorPlaceholder:
|
|
17354
|
-
showCommentCta:
|
|
17359
|
+
authorPlaceholder: m,
|
|
17360
|
+
showCommentCta: p,
|
|
17355
17361
|
showFeatureImage: w,
|
|
17356
17362
|
showFeedback: x,
|
|
17357
17363
|
showLatestPosts: k,
|
|
@@ -17417,7 +17423,7 @@ const ak = ({
|
|
|
17417
17423
|
), children: [
|
|
17418
17424
|
/* @__PURE__ */ s.jsxs("p", { className: "pb-1 text-[1.3rem]", style: { color: z }, children: [
|
|
17419
17425
|
"By ",
|
|
17420
|
-
|
|
17426
|
+
m,
|
|
17421
17427
|
/* @__PURE__ */ s.jsx("span", { className: "before:pl-0.5 before:pr-1 before:content-['•']", children: L })
|
|
17422
17428
|
] }),
|
|
17423
17429
|
/* @__PURE__ */ s.jsx("p", { className: "pb-1 text-[1.3rem] underline", style: { color: z }, children: /* @__PURE__ */ s.jsx("span", { children: "View in browser" }) })
|
|
@@ -17439,7 +17445,7 @@ const ak = ({
|
|
|
17439
17445
|
/* @__PURE__ */ s.jsx("p", { className: "mb-5", style: { color: X }, children: "Over there on the right you'll see some settings that allow you to customize the look and feel of this template to make it perfectly suited to your brand. Email templates are exceptionally finnicky to make, but we've spent a long time optimising this one to make it work beautifully across devices, email clients and content types." }),
|
|
17440
17446
|
/* @__PURE__ */ s.jsx("p", { className: "mb-5", style: { color: X }, children: "So, you can trust that every email you send with Ghost will look great and work well. Just like the rest of your site." })
|
|
17441
17447
|
] }),
|
|
17442
|
-
(x ||
|
|
17448
|
+
(x || p) && /* @__PURE__ */ s.jsx("div", { className: "grid gap-5 border-b border-grey-200 px-6 py-5", style: { borderColor: F }, children: /* @__PURE__ */ s.jsxs("div", { className: "flex justify-center gap-3", children: [
|
|
17443
17449
|
x && /* @__PURE__ */ s.jsxs(s.Fragment, { children: [
|
|
17444
17450
|
/* @__PURE__ */ s.jsx("button", { className: "pointer-events-none cursor-default whitespace-nowrap rounded-[2.2rem] bg-transparent font-semibold", type: "button", children: /* @__PURE__ */ s.jsxs("span", { className: "inline-flex items-center gap-2 px-[18px] py-[7px]", style: { color: X }, children: [
|
|
17445
17451
|
/* @__PURE__ */ s.jsx(Ge, { colorClass: "", name: "thumbs-up", size: "md" }),
|
|
@@ -17450,7 +17456,7 @@ const ak = ({
|
|
|
17450
17456
|
/* @__PURE__ */ s.jsx("span", { children: "Less like this" })
|
|
17451
17457
|
] }) })
|
|
17452
17458
|
] }),
|
|
17453
|
-
|
|
17459
|
+
p && /* @__PURE__ */ s.jsx("button", { className: "pointer-events-none cursor-default whitespace-nowrap rounded-[2.2rem] bg-transparent font-semibold", type: "button", children: /* @__PURE__ */ s.jsxs("span", { className: "inline-flex items-center gap-2 px-[18px] py-[7px]", style: { color: X }, children: [
|
|
17454
17460
|
/* @__PURE__ */ s.jsx(Ge, { colorClass: "", name: "comment" }),
|
|
17455
17461
|
/* @__PURE__ */ s.jsx("span", { children: "Comment" })
|
|
17456
17462
|
] }) })
|
|
@@ -17517,7 +17523,7 @@ const ak = ({
|
|
|
17517
17523
|
const t = bn("emailCustomization"), { currentUser: r, settings: n, siteData: a, config: o } = Te(), [i, c, l, A, u] = Ue(n, ["title", "icon", "comments_enabled", "support_email_address", "default_email_address"]);
|
|
17518
17524
|
let h = null;
|
|
17519
17525
|
e.show_header_title ? h = i || null : e.show_header_name && (h = e.name);
|
|
17520
|
-
const
|
|
17526
|
+
const m = e.show_header_title && e.show_header_name ? e.name : void 0, p = e.show_comment_cta && l !== "off", w = e.feedback_enabled && o.labs.audienceFeedback, x = () => {
|
|
17521
17527
|
const O = e.background_color;
|
|
17522
17528
|
return /#([0-9a-f]{3}){1,2}$/i.test(O) ? O : O === "dark" ? "#15212a" : "#ffffff";
|
|
17523
17529
|
}, k = () => {
|
|
@@ -17544,13 +17550,13 @@ const ak = ({
|
|
|
17544
17550
|
footerContent: e.footer_content,
|
|
17545
17551
|
headerIcon: e.show_header_icon ? c : void 0,
|
|
17546
17552
|
headerImage: e.header_image,
|
|
17547
|
-
headerSubtitle:
|
|
17553
|
+
headerSubtitle: m,
|
|
17548
17554
|
headerTitle: h,
|
|
17549
17555
|
senderEmail: wa(e, o, u),
|
|
17550
17556
|
senderName: e.sender_name || i,
|
|
17551
17557
|
senderReplyTo: fs(e, o, A, u),
|
|
17552
17558
|
showBadge: e.show_badge,
|
|
17553
|
-
showCommentCta:
|
|
17559
|
+
showCommentCta: p,
|
|
17554
17560
|
showExcerpt: e.show_excerpt,
|
|
17555
17561
|
showFeatureImage: e.show_feature_image,
|
|
17556
17562
|
showFeedback: w,
|
|
@@ -17566,22 +17572,22 @@ const ak = ({
|
|
|
17566
17572
|
}, Ik = ({ newsletter: e, updateNewsletter: t, errors: r, clearError: n }) => {
|
|
17567
17573
|
const { settings: a, config: o } = Te(), [i, c] = Ue(a, ["default_email_address", "support_email_address"]), l = bn("newEmailAddresses"), [A, u] = G(fs(e, o, c, i) || "");
|
|
17568
17574
|
let h = wa(e, o, i);
|
|
17569
|
-
const
|
|
17575
|
+
const m = xt(() => [
|
|
17570
17576
|
{ label: `Newsletter address (${h})`, value: "newsletter" },
|
|
17571
17577
|
{ label: `Support address (${c})`, value: "support" }
|
|
17572
17578
|
], [h, c]);
|
|
17573
17579
|
ie(() => {
|
|
17574
|
-
!fn(o) && !l && (
|
|
17575
|
-
}, [o,
|
|
17576
|
-
const
|
|
17580
|
+
!fn(o) && !l && (m.find((k) => k.value === e.sender_reply_to) || t({ sender_reply_to: "newsletter" }));
|
|
17581
|
+
}, [o, m, t, e.sender_reply_to, l]);
|
|
17582
|
+
const p = it((x) => {
|
|
17577
17583
|
u(x.target.value), t({ sender_reply_to: x.target.value || "newsletter" });
|
|
17578
17584
|
}, [t, u]);
|
|
17579
17585
|
if (!fn(o) && !l)
|
|
17580
17586
|
return /* @__PURE__ */ s.jsx(
|
|
17581
17587
|
pt,
|
|
17582
17588
|
{
|
|
17583
|
-
options:
|
|
17584
|
-
selectedOption:
|
|
17589
|
+
options: m,
|
|
17590
|
+
selectedOption: m.find((x) => x.value === e.sender_reply_to),
|
|
17585
17591
|
title: "Reply-to email",
|
|
17586
17592
|
onSelect: (x) => t({ sender_reply_to: x == null ? void 0 : x.value })
|
|
17587
17593
|
}
|
|
@@ -17600,13 +17606,13 @@ const ak = ({
|
|
|
17600
17606
|
title: "Reply-to email",
|
|
17601
17607
|
value: A,
|
|
17602
17608
|
onBlur: w,
|
|
17603
|
-
onChange:
|
|
17609
|
+
onChange: p,
|
|
17604
17610
|
onKeyDown: () => n("sender_reply_to")
|
|
17605
17611
|
}
|
|
17606
17612
|
);
|
|
17607
17613
|
}, Jk = ({ newsletter: e, onlyOne: t, updateNewsletter: r, validate: n, errors: a, clearError: o }) => {
|
|
17608
|
-
const { updateRoute: i } = ye(), { mutateAsync: c } = hl(), l = Zr(), { settings: A, siteData: u, config: h } = Te(), [
|
|
17609
|
-
let O = wa(e, h,
|
|
17614
|
+
const { updateRoute: i } = ye(), { mutateAsync: c } = hl(), l = Zr(), { settings: A, siteData: u, config: h } = Te(), [m, p] = Ue(A, ["icon", "default_email_address", "support_email_address"]), { mutateAsync: w } = Pr(), [x, k] = G("generalSettings"), y = bn("emailCustomization"), { localSettings: I } = kr(), [C] = Ue(I, ["title"]), R = je(), { data: { newsletters: U } = {} } = ws();
|
|
17615
|
+
let O = wa(e, h, p);
|
|
17610
17616
|
const [F, Y] = G(U || []), X = F.filter((E) => E.status === "active");
|
|
17611
17617
|
ie(() => {
|
|
17612
17618
|
Y(U || []);
|
|
@@ -17689,7 +17695,7 @@ const ak = ({
|
|
|
17689
17695
|
error: !!a.sender_email,
|
|
17690
17696
|
hint: a.sender_email,
|
|
17691
17697
|
maxLength: 191,
|
|
17692
|
-
placeholder:
|
|
17698
|
+
placeholder: p,
|
|
17693
17699
|
title: "Sender email address",
|
|
17694
17700
|
value: e.sender_email || "",
|
|
17695
17701
|
onChange: (E) => {
|
|
@@ -17770,7 +17776,7 @@ const ak = ({
|
|
|
17770
17776
|
] })
|
|
17771
17777
|
] }),
|
|
17772
17778
|
/* @__PURE__ */ s.jsxs(cn, { children: [
|
|
17773
|
-
|
|
17779
|
+
m && /* @__PURE__ */ s.jsx(
|
|
17774
17780
|
De,
|
|
17775
17781
|
{
|
|
17776
17782
|
checked: e.show_header_icon,
|
|
@@ -18027,7 +18033,7 @@ const ak = ({
|
|
|
18027
18033
|
};
|
|
18028
18034
|
return /* @__PURE__ */ s.jsx("div", { className: "flex flex-col", children: /* @__PURE__ */ s.jsx("div", { className: "px-7 pb-7 pt-5", children: /* @__PURE__ */ s.jsx(pr, { selectedTab: x, tabs: L, onTabChange: Z }) }) });
|
|
18029
18035
|
}, Tk = ({ newsletter: e, onlyOne: t }) => {
|
|
18030
|
-
const { config: r } = Te(), { mutateAsync: n } = hl(), { updateRoute: a } = ye(), o = je(), { formState: i, saveState: c, updateForm: l, setFormState: A, handleSave: u, validate: h, errors:
|
|
18036
|
+
const { config: r } = Te(), { mutateAsync: n } = hl(), { updateRoute: a } = ye(), o = je(), { formState: i, saveState: c, updateForm: l, setFormState: A, handleSave: u, validate: h, errors: m, clearError: p, okProps: w } = St({
|
|
18031
18037
|
initialState: e,
|
|
18032
18038
|
savingDelay: 500,
|
|
18033
18039
|
onSave: async () => {
|
|
@@ -18050,7 +18056,7 @@ const ak = ({
|
|
|
18050
18056
|
ie(() => {
|
|
18051
18057
|
A(() => e);
|
|
18052
18058
|
}, [A, e]);
|
|
18053
|
-
const k = /* @__PURE__ */ s.jsx(Sk, { newsletter: i }), y = /* @__PURE__ */ s.jsx(Jk, { clearError:
|
|
18059
|
+
const k = /* @__PURE__ */ s.jsx(Sk, { newsletter: i }), y = /* @__PURE__ */ s.jsx(Jk, { clearError: p, errors: m, newsletter: i, onlyOne: t, updateNewsletter: x, validate: h });
|
|
18054
18060
|
return /* @__PURE__ */ s.jsx(
|
|
18055
18061
|
Fr,
|
|
18056
18062
|
{
|
|
@@ -18102,9 +18108,9 @@ const ak = ({
|
|
|
18102
18108
|
return `${encodeURIComponent((n == null ? void 0 : n.name) || "")} — Check out ${encodeURIComponent(x)} on:`;
|
|
18103
18109
|
}, h = async () => {
|
|
18104
18110
|
await navigator.clipboard.writeText(o), A(!0), setTimeout(() => A(!1), 2e3);
|
|
18105
|
-
}, p = () => {
|
|
18106
|
-
window.open(`https://twitter.com/intent/tweet?url=${encodeURI(o)}&text=${u()}`, "_blank");
|
|
18107
18111
|
}, m = () => {
|
|
18112
|
+
window.open(`https://twitter.com/intent/tweet?url=${encodeURI(o)}&text=${u()}`, "_blank");
|
|
18113
|
+
}, p = () => {
|
|
18108
18114
|
window.open(`https://www.facebook.com/sharer/sharer.php?u=${encodeURI(o)}`, "_blank");
|
|
18109
18115
|
}, w = () => {
|
|
18110
18116
|
window.open(`http://www.linkedin.com/shareArticle?mini=true&url=${encodeURI(o)}&title=${u()}`, "_blank");
|
|
@@ -18150,8 +18156,8 @@ const ak = ({
|
|
|
18150
18156
|
] }),
|
|
18151
18157
|
/* @__PURE__ */ s.jsx("div", { className: 'flex items-center gap-4 text-xs font-medium before:h-px before:grow before:bg-grey-300 before:content-[""] after:h-px after:grow after:bg-grey-300 after:content-[""] dark:before:bg-grey-800 dark:after:bg-grey-800', children: "OR" }),
|
|
18152
18158
|
/* @__PURE__ */ s.jsxs("div", { className: "flex gap-2", children: [
|
|
18153
|
-
/* @__PURE__ */ s.jsx(pe, { className: "h-8 border border-grey-300 dark:border-grey-800", icon: "twitter-x", iconColorClass: "w-[14px] h-[14px]", size: "sm", fullWidth: !0, onClick:
|
|
18154
|
-
/* @__PURE__ */ s.jsx(pe, { className: "h-8 border border-grey-300 dark:border-grey-800", icon: "facebook", size: "sm", fullWidth: !0, onClick:
|
|
18159
|
+
/* @__PURE__ */ s.jsx(pe, { className: "h-8 border border-grey-300 dark:border-grey-800", icon: "twitter-x", iconColorClass: "w-[14px] h-[14px]", size: "sm", fullWidth: !0, onClick: m }),
|
|
18160
|
+
/* @__PURE__ */ s.jsx(pe, { className: "h-8 border border-grey-300 dark:border-grey-800", icon: "facebook", size: "sm", fullWidth: !0, onClick: p }),
|
|
18155
18161
|
/* @__PURE__ */ s.jsx(pe, { className: "h-8 border border-grey-300 dark:border-grey-800", icon: "linkedin", size: "sm", fullWidth: !0, onClick: w })
|
|
18156
18162
|
] })
|
|
18157
18163
|
] })
|
|
@@ -18166,14 +18172,14 @@ const ak = ({
|
|
|
18166
18172
|
}, 300);
|
|
18167
18173
|
}, [a]);
|
|
18168
18174
|
if (ie(() => {
|
|
18169
|
-
const
|
|
18175
|
+
const m = (p) => {
|
|
18170
18176
|
var x;
|
|
18171
18177
|
if (!e)
|
|
18172
18178
|
return;
|
|
18173
|
-
new URL(
|
|
18179
|
+
new URL(p.origin).origin === new URL(e).origin && ((x = p == null ? void 0 : p.data) == null ? void 0 : x.type) === "portal-preview-ready" && A();
|
|
18174
18180
|
};
|
|
18175
|
-
return window.addEventListener("message",
|
|
18176
|
-
window.removeEventListener("message",
|
|
18181
|
+
return window.addEventListener("message", m, !0), () => {
|
|
18182
|
+
window.removeEventListener("message", m, !0), t == null || t();
|
|
18177
18183
|
};
|
|
18178
18184
|
}, [e, t, A, o]), !e)
|
|
18179
18185
|
return null;
|
|
@@ -18208,13 +18214,13 @@ const ak = ({
|
|
|
18208
18214
|
amount: A = 0,
|
|
18209
18215
|
duration: u,
|
|
18210
18216
|
durationInMonths: h,
|
|
18211
|
-
currency:
|
|
18212
|
-
status:
|
|
18217
|
+
currency: m = "usd",
|
|
18218
|
+
status: p,
|
|
18213
18219
|
tierId: w
|
|
18214
18220
|
} = e;
|
|
18215
18221
|
t = t.replace(/\/$/, "");
|
|
18216
18222
|
const x = "/?v=modal-portal-offer#/portal/preview/offer", k = new URLSearchParams();
|
|
18217
|
-
return k.append("disableBackground", "false"), k.append("name", encodeURIComponent(n)), k.append("code", encodeURIComponent(a)), k.append("display_title", encodeURIComponent(o)), k.append("display_description", encodeURIComponent(i)), k.append("type", encodeURIComponent(c)), k.append("cadence", encodeURIComponent(l)), k.append("amount", encodeURIComponent(A)), k.append("duration", encodeURIComponent(u)), k.append("duration_in_months", encodeURIComponent(h)), k.append("currency", encodeURIComponent(
|
|
18223
|
+
return k.append("disableBackground", "false"), k.append("name", encodeURIComponent(n)), k.append("code", encodeURIComponent(a)), k.append("display_title", encodeURIComponent(o)), k.append("display_description", encodeURIComponent(i)), k.append("type", encodeURIComponent(c)), k.append("cadence", encodeURIComponent(l)), k.append("amount", encodeURIComponent(A)), k.append("duration", encodeURIComponent(u)), k.append("duration_in_months", encodeURIComponent(h)), k.append("currency", encodeURIComponent(m)), k.append("status", encodeURIComponent(p)), k.append("tier_id", encodeURIComponent(w)), r && k.append("disableBackground", "true"), `${t}${x}?${k.toString()}`;
|
|
18218
18224
|
}, jk = (e) => {
|
|
18219
18225
|
const t = [];
|
|
18220
18226
|
return e.forEach((r) => {
|
|
@@ -18265,8 +18271,8 @@ const Wi = ({ type: e, checked: t, onClick: r }) => {
|
|
|
18265
18271
|
handleNameInput: A,
|
|
18266
18272
|
handleTextAreaInput: u,
|
|
18267
18273
|
handleDisplayTitleInput: h,
|
|
18268
|
-
handleDurationInMonthsInput:
|
|
18269
|
-
handleAmountInput:
|
|
18274
|
+
handleDurationInMonthsInput: m,
|
|
18275
|
+
handleAmountInput: p,
|
|
18270
18276
|
handleCodeInput: w,
|
|
18271
18277
|
clearError: x,
|
|
18272
18278
|
errors: k,
|
|
@@ -18367,7 +18373,7 @@ const Wi = ({ type: e, checked: t, onClick: r }) => {
|
|
|
18367
18373
|
type: "number",
|
|
18368
18374
|
value: c.type === "fixed" ? c.fixedAmount === 0 ? "" : (Z = c.fixedAmount) == null ? void 0 : Z.toString() : c.percentAmount === 0 ? "" : (E = c.percentAmount) == null ? void 0 : E.toString(),
|
|
18369
18375
|
onChange: ($) => {
|
|
18370
|
-
|
|
18376
|
+
p($);
|
|
18371
18377
|
},
|
|
18372
18378
|
onKeyDown: () => x("amount")
|
|
18373
18379
|
}
|
|
@@ -18397,7 +18403,7 @@ const Wi = ({ type: e, checked: t, onClick: r }) => {
|
|
|
18397
18403
|
}
|
|
18398
18404
|
),
|
|
18399
18405
|
c.duration === "repeating" && /* @__PURE__ */ s.jsx(ce, { title: "Duration in months", type: "number", onChange: ($) => {
|
|
18400
|
-
|
|
18406
|
+
m($);
|
|
18401
18407
|
} })
|
|
18402
18408
|
] }),
|
|
18403
18409
|
c.type === "trial" && /* @__PURE__ */ s.jsx(
|
|
@@ -18459,7 +18465,7 @@ const Wi = ({ type: e, checked: t, onClick: r }) => {
|
|
|
18459
18465
|
period: (ae = l[0]) != null && ae.value ? dr((q = l[0]) == null ? void 0 : q.value).period : "",
|
|
18460
18466
|
currency: (me = l[0]) != null && me.value ? dr((_e = l[0]) == null ? void 0 : _e.value).currency : ""
|
|
18461
18467
|
}
|
|
18462
|
-
}), { data: { offers:
|
|
18468
|
+
}), { data: { offers: m = [] } = {} } = Nh(), { formState: p, updateForm: w, handleSave: x, saveState: k, okProps: y, validate: I, errors: C, clearError: R } = St({
|
|
18463
18469
|
initialState: {
|
|
18464
18470
|
disableBackground: !1,
|
|
18465
18471
|
name: "",
|
|
@@ -18486,20 +18492,20 @@ const Wi = ({ type: e, checked: t, onClick: r }) => {
|
|
|
18486
18492
|
},
|
|
18487
18493
|
onSave: async () => {
|
|
18488
18494
|
const P = {
|
|
18489
|
-
name:
|
|
18490
|
-
code:
|
|
18491
|
-
display_title:
|
|
18492
|
-
display_description:
|
|
18493
|
-
cadence:
|
|
18494
|
-
amount: qi(
|
|
18495
|
-
duration:
|
|
18496
|
-
duration_in_months: Number(
|
|
18497
|
-
currency:
|
|
18498
|
-
status:
|
|
18495
|
+
name: p.name,
|
|
18496
|
+
code: p.code.value,
|
|
18497
|
+
display_title: p.displayTitle.value,
|
|
18498
|
+
display_description: p.displayDescription,
|
|
18499
|
+
cadence: p.cadence,
|
|
18500
|
+
amount: qi(p) || 0,
|
|
18501
|
+
duration: p.type === "trial" ? "trial" : p.duration,
|
|
18502
|
+
duration_in_months: Number(p.durationInMonths),
|
|
18503
|
+
currency: p.currency,
|
|
18504
|
+
status: p.status,
|
|
18499
18505
|
tier: {
|
|
18500
|
-
id:
|
|
18506
|
+
id: p.tierId
|
|
18501
18507
|
},
|
|
18502
|
-
type:
|
|
18508
|
+
type: p.type,
|
|
18503
18509
|
currency_restriction: !1
|
|
18504
18510
|
}, oe = await A(P);
|
|
18505
18511
|
oe && oe.offers && oe.offers.length > 0 && o(`offers/success/${oe.offers[0].id}`);
|
|
@@ -18508,12 +18514,12 @@ const Wi = ({ type: e, checked: t, onClick: r }) => {
|
|
|
18508
18514
|
},
|
|
18509
18515
|
onValidate: () => {
|
|
18510
18516
|
const P = {};
|
|
18511
|
-
return !
|
|
18517
|
+
return !p.name && p.name.length === 0 && (P.name = "Name is required"), !p.code.value && p.code.value.length === 0 && (P.code = "Code is required"), !p.displayTitle.value && p.displayTitle.value.length === 0 && (P.displayTitle = "Display title is required"), p.type === "percent" && p.percentAmount === 0 && (P.amount = "Enter an amount greater than 0."), p.type === "percent" && (p.percentAmount < 0 || p.percentAmount > 100) && (P.amount = "Amount must be between 0 and 100%."), (p.type === "fixed" && p.fixedAmount === 0 || p.type === "fixed" && p.fixedAmount < 1) && (P.amount = "Enter an amount greater than 0."), p.type === "trial" && p.trialAmount === 0 && (P.amount = "Enter an amount greater than 0."), p.type === "trial" && p.trialAmount < 1 && (P.amount = "Free trial must be at least 1 day."), P;
|
|
18512
18518
|
},
|
|
18513
18519
|
savingDelay: 500
|
|
18514
18520
|
}), U = [
|
|
18515
18521
|
{ value: "percent", label: "%" },
|
|
18516
|
-
{ value: "fixed", label:
|
|
18522
|
+
{ value: "fixed", label: p.currency }
|
|
18517
18523
|
], O = (P) => {
|
|
18518
18524
|
h({
|
|
18519
18525
|
tier: P,
|
|
@@ -18536,10 +18542,10 @@ const Wi = ({ type: e, checked: t, onClick: r }) => {
|
|
|
18536
18542
|
}));
|
|
18537
18543
|
}, X = (P) => {
|
|
18538
18544
|
const oe = P.target;
|
|
18539
|
-
|
|
18545
|
+
p.type === "fixed" ? w((de) => ({
|
|
18540
18546
|
...de,
|
|
18541
18547
|
fixedAmount: Number(oe.value)
|
|
18542
|
-
})) :
|
|
18548
|
+
})) : p.type === "percent" ? w((de) => ({
|
|
18543
18549
|
...de,
|
|
18544
18550
|
percentAmount: Number(oe.value)
|
|
18545
18551
|
})) : w((de) => ({
|
|
@@ -18602,28 +18608,28 @@ const Wi = ({ type: e, checked: t, onClick: r }) => {
|
|
|
18602
18608
|
}
|
|
18603
18609
|
}));
|
|
18604
18610
|
}, Q = () => {
|
|
18605
|
-
|
|
18611
|
+
m.length > 0 ? o("offers/edit") : o("offers");
|
|
18606
18612
|
}, $ = xt(() => {
|
|
18607
18613
|
var P;
|
|
18608
18614
|
return {
|
|
18609
|
-
name:
|
|
18610
|
-
code:
|
|
18611
|
-
displayTitle:
|
|
18612
|
-
displayDescription:
|
|
18613
|
-
type:
|
|
18614
|
-
cadence:
|
|
18615
|
-
amount: qi(
|
|
18616
|
-
duration:
|
|
18617
|
-
durationInMonths:
|
|
18618
|
-
currency:
|
|
18619
|
-
status:
|
|
18620
|
-
tierId:
|
|
18615
|
+
name: p.name || "",
|
|
18616
|
+
code: p.code.value || "",
|
|
18617
|
+
displayTitle: p.displayTitle.value || "",
|
|
18618
|
+
displayDescription: p.displayDescription || "",
|
|
18619
|
+
type: p.type || "percent",
|
|
18620
|
+
cadence: p.cadence || "month",
|
|
18621
|
+
amount: qi(p) || 0,
|
|
18622
|
+
duration: p.type === "trial" ? "trial" : p.duration || "once",
|
|
18623
|
+
durationInMonths: p.durationInMonths || 0,
|
|
18624
|
+
currency: p.currency || "USD",
|
|
18625
|
+
status: p.status || "active",
|
|
18626
|
+
tierId: p.tierId || ((P = c[0]) == null ? void 0 : P.id)
|
|
18621
18627
|
};
|
|
18622
|
-
}, [
|
|
18628
|
+
}, [p, c]);
|
|
18623
18629
|
ie(() => {
|
|
18624
18630
|
const P = _A($, e.url);
|
|
18625
18631
|
a(P);
|
|
18626
|
-
}, [
|
|
18632
|
+
}, [p, e.url, p.type, $]);
|
|
18627
18633
|
const ue = /* @__PURE__ */ s.jsx(
|
|
18628
18634
|
Ok,
|
|
18629
18635
|
{
|
|
@@ -18642,7 +18648,7 @@ const Wi = ({ type: e, checked: t, onClick: r }) => {
|
|
|
18642
18648
|
handleTierChange: O,
|
|
18643
18649
|
handleTrialAmountInput: L,
|
|
18644
18650
|
handleTypeChange: F,
|
|
18645
|
-
overrides:
|
|
18651
|
+
overrides: p,
|
|
18646
18652
|
selectedTier: u.tier,
|
|
18647
18653
|
testId: "add-offer-sidebar",
|
|
18648
18654
|
tierOptions: l,
|
|
@@ -18709,11 +18715,11 @@ function Vi(e) {
|
|
|
18709
18715
|
});
|
|
18710
18716
|
}
|
|
18711
18717
|
const Nk = ({ clearError: e, errors: t, offer: r, updateOffer: n }) => {
|
|
18712
|
-
const { siteData: a } = Te(), [o, i] = G(!1), c = je(), { mutateAsync: l } = ml(), [A, u] = G((r == null ? void 0 : r.name.length) || 0), h = A > 40 ? "text-red" : "text-green", { updateRoute:
|
|
18718
|
+
const { siteData: a } = Te(), [o, i] = G(!1), c = je(), { mutateAsync: l } = ml(), [A, u] = G((r == null ? void 0 : r.name.length) || 0), h = A > 40 ? "text-red" : "text-green", { updateRoute: m } = ye();
|
|
18713
18719
|
ie(() => {
|
|
18714
18720
|
r != null && r.name && u(r == null ? void 0 : r.name.length);
|
|
18715
18721
|
}, [r == null ? void 0 : r.name]);
|
|
18716
|
-
const
|
|
18722
|
+
const p = Ft(a), w = `${p}${r == null ? void 0 : r.code}`, x = async () => {
|
|
18717
18723
|
await navigator.clipboard.writeText(w), i(!0), setTimeout(() => i(!1), 2e3);
|
|
18718
18724
|
}, k = async () => {
|
|
18719
18725
|
(r == null ? void 0 : r.status) === "active" ? ne.show(We, {
|
|
@@ -18733,7 +18739,7 @@ const Nk = ({ clearError: e, errors: t, offer: r, updateOffer: n }) => {
|
|
|
18733
18739
|
await l({ ...r, status: "archived" }), y == null || y.remove(), Le({
|
|
18734
18740
|
type: "success",
|
|
18735
18741
|
title: "Offer archived"
|
|
18736
|
-
}),
|
|
18742
|
+
}), m("offers/edit");
|
|
18737
18743
|
} catch (I) {
|
|
18738
18744
|
c(I);
|
|
18739
18745
|
}
|
|
@@ -18751,7 +18757,7 @@ const Nk = ({ clearError: e, errors: t, offer: r, updateOffer: n }) => {
|
|
|
18751
18757
|
await l({ ...r, status: "active" }), y == null || y.remove(), Le({
|
|
18752
18758
|
type: "success",
|
|
18753
18759
|
title: "Offer reactivated"
|
|
18754
|
-
}),
|
|
18760
|
+
}), m("offers/edit");
|
|
18755
18761
|
} catch (I) {
|
|
18756
18762
|
c(I);
|
|
18757
18763
|
}
|
|
@@ -18834,7 +18840,7 @@ const Nk = ({ clearError: e, errors: t, offer: r, updateOffer: n }) => {
|
|
|
18834
18840
|
error: !!t.code,
|
|
18835
18841
|
hint: t.code || ((r == null ? void 0 : r.code) !== "" ? /* @__PURE__ */ s.jsxs("div", { className: "flex items-center justify-between", children: [
|
|
18836
18842
|
/* @__PURE__ */ s.jsxs("div", { children: [
|
|
18837
|
-
|
|
18843
|
+
p,
|
|
18838
18844
|
/* @__PURE__ */ s.jsx("span", { className: "font-bold", children: r == null ? void 0 : r.code })
|
|
18839
18845
|
] }),
|
|
18840
18846
|
/* @__PURE__ */ s.jsx("span", {}),
|
|
@@ -18853,7 +18859,7 @@ const Nk = ({ clearError: e, errors: t, offer: r, updateOffer: n }) => {
|
|
|
18853
18859
|
/* @__PURE__ */ s.jsx("div", { className: "mb-2", children: (r == null ? void 0 : r.status) === "active" ? /* @__PURE__ */ s.jsx(pe, { color: "red", label: "Archive offer", link: !0, onClick: k }) : /* @__PURE__ */ s.jsx(pe, { color: "green", label: "Reactivate offer", link: !0, onClick: k }) })
|
|
18854
18860
|
] });
|
|
18855
18861
|
}, Hk = ({ id: e }) => {
|
|
18856
|
-
const { siteData: t } = Te(), { updateRoute: r } = ye(), n = je(), { mutateAsync: a } = ml(), [o, i] = G(""), { data: { offers: c = [] } = {} } = fl(e || ""), { formState: l, saveState: A, updateForm: u, setFormState: h, handleSave:
|
|
18862
|
+
const { siteData: t } = Te(), { updateRoute: r } = ye(), n = je(), { mutateAsync: a } = ml(), [o, i] = G(""), { data: { offers: c = [] } = {} } = fl(e || ""), { formState: l, saveState: A, updateForm: u, setFormState: h, handleSave: m, validate: p, errors: w, clearError: x, okProps: k } = St({
|
|
18857
18863
|
initialState: c[0],
|
|
18858
18864
|
savingDelay: 500,
|
|
18859
18865
|
onSave: async () => {
|
|
@@ -18877,7 +18883,7 @@ const Nk = ({ clearError: e, errors: t, offer: r, updateOffer: n }) => {
|
|
|
18877
18883
|
errors: w,
|
|
18878
18884
|
offer: l,
|
|
18879
18885
|
updateOffer: y,
|
|
18880
|
-
validate:
|
|
18886
|
+
validate: p
|
|
18881
18887
|
}
|
|
18882
18888
|
);
|
|
18883
18889
|
ie(() => {
|
|
@@ -18929,7 +18935,7 @@ const Nk = ({ clearError: e, errors: t, offer: r, updateOffer: n }) => {
|
|
|
18929
18935
|
},
|
|
18930
18936
|
onOk: async () => {
|
|
18931
18937
|
try {
|
|
18932
|
-
if (await
|
|
18938
|
+
if (await m({ force: !0 }))
|
|
18933
18939
|
return;
|
|
18934
18940
|
} catch (R) {
|
|
18935
18941
|
let U;
|
|
@@ -18969,9 +18975,9 @@ const Nk = ({ clearError: e, errors: t, offer: r, updateOffer: n }) => {
|
|
|
18969
18975
|
css: !1
|
|
18970
18976
|
}), { settings: n, config: a } = Te(), [o] = Ue(n, ["pintura"]), { mutateAsync: i } = ar(), { mutateAsync: c } = Pk(), l = je();
|
|
18971
18977
|
ie(() => {
|
|
18972
|
-
|
|
18978
|
+
m(o || !1);
|
|
18973
18979
|
}, [o]);
|
|
18974
|
-
const [A, u] = G("Save"), [h,
|
|
18980
|
+
const [A, u] = G("Save"), [h, m] = G(!!o), p = async () => {
|
|
18975
18981
|
const C = [
|
|
18976
18982
|
{ key: "pintura", value: h }
|
|
18977
18983
|
];
|
|
@@ -19020,7 +19026,7 @@ const Nk = ({ clearError: e, errors: t, offer: r, updateOffer: n }) => {
|
|
|
19020
19026
|
okLabel: A,
|
|
19021
19027
|
testId: "pintura-modal",
|
|
19022
19028
|
title: "",
|
|
19023
|
-
onOk:
|
|
19029
|
+
onOk: p,
|
|
19024
19030
|
children: [
|
|
19025
19031
|
/* @__PURE__ */ s.jsx(
|
|
19026
19032
|
Gr,
|
|
@@ -19055,7 +19061,7 @@ const Nk = ({ clearError: e, errors: t, offer: r, updateOffer: n }) => {
|
|
|
19055
19061
|
] }),
|
|
19056
19062
|
label: "Enable Pintura",
|
|
19057
19063
|
onChange: (C) => {
|
|
19058
|
-
|
|
19064
|
+
m(C.target.checked);
|
|
19059
19065
|
}
|
|
19060
19066
|
}
|
|
19061
19067
|
),
|
|
@@ -19099,8 +19105,8 @@ const Nk = ({ clearError: e, errors: t, offer: r, updateOffer: n }) => {
|
|
|
19099
19105
|
}
|
|
19100
19106
|
);
|
|
19101
19107
|
}), Fk = ({ updateSetting: e, errors: t, setError: r }) => {
|
|
19102
|
-
const { siteData: n, settings: a, config: o } = Te(), [i, c] = Ue(a, ["members_support_address", "support_email_address"]), l = (c == null ? void 0 : c.toString()) || _a((i == null ? void 0 : i.toString()) || "", n, o), A = Lh(n, o), [u, h] = G(l),
|
|
19103
|
-
let w =
|
|
19108
|
+
const { siteData: n, settings: a, config: o } = Te(), [i, c] = Ue(a, ["members_support_address", "support_email_address"]), l = (c == null ? void 0 : c.toString()) || _a((i == null ? void 0 : i.toString()) || "", n, o), A = Lh(n, o), [u, h] = G(l), m = (p) => {
|
|
19109
|
+
let w = p.target.value;
|
|
19104
19110
|
w ? Ut.isEmail(w) ? r("members_support_address", "") : r("members_support_address", "Enter a valid email address") : r("members_support_address", "Enter an email address");
|
|
19105
19111
|
let x = A && w === `noreply@${A}` ? "noreply" : w;
|
|
19106
19112
|
e("members_support_address", x), h(_a(x, n, o));
|
|
@@ -19114,8 +19120,8 @@ const Nk = ({ clearError: e, errors: t, offer: r, updateOffer: n }) => {
|
|
|
19114
19120
|
hint: t.members_support_address,
|
|
19115
19121
|
title: "Support email address",
|
|
19116
19122
|
value: u,
|
|
19117
|
-
onBlur:
|
|
19118
|
-
onChange: (
|
|
19123
|
+
onBlur: m,
|
|
19124
|
+
onChange: (p) => h(p.target.value)
|
|
19119
19125
|
}
|
|
19120
19126
|
) }) });
|
|
19121
19127
|
}, Zk = (e) => /* @__PURE__ */ Me("svg", { width: 21, height: 24, viewBox: "0 0 21 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...e }, /* @__PURE__ */ Me("title", null, "portal-icon-1"), /* @__PURE__ */ Me("path", { d: "M10.533 11.267a5.135 5.135 0 1 0-.001-10.27 5.135 5.135 0 0 0 .001 10.27zM1 23a9.531 9.531 0 0 1 16.274-6.741 9.532 9.532 0 0 1 2.793 6.74", stroke: "currentColor", strokeWidth: 1.5, strokeLinecap: "round", strokeLinejoin: "round" })), Gk = (e) => /* @__PURE__ */ Me("svg", { width: 24, height: 24, viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg", ...e }, /* @__PURE__ */ Me("title", null, "portal-icon-2"), /* @__PURE__ */ Me("path", { stroke: "currentColor", strokeWidth: 1.5, strokeLinecap: "round", d: "M12.5 2v20M2 12.5h20", fill: "none" })), Kk = (e) => /* @__PURE__ */ Me("svg", { width: 25, height: 24, viewBox: "0 0 25 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...e }, /* @__PURE__ */ Me("title", null, "portal-icon-3"), /* @__PURE__ */ Me("path", { d: "M23.5 6v14.25a2.25 2.25 0 1 1-4.5 0V3c0-.398-.158-.78-.44-1.06a1.494 1.494 0 0 0-1.06-.44h-15c-.398 0-.78.158-1.06.44C1.157 2.22 1 2.601 1 3v17.25a2.25 2.25 0 0 0 2.25 2.25h18M4.75 15h10.5m-10.5 3h6", stroke: "currentColor", strokeWidth: 1.5, strokeLinecap: "round", strokeLinejoin: "round" }), /* @__PURE__ */ Me("path", { d: "M14.5 5.25h-9a.75.75 0 0 0-.75.75v4.5c0 .414.336.75.75.75h9a.75.75 0 0 0 .75-.75V6a.75.75 0 0 0-.75-.75z", stroke: "currentColor", strokeWidth: 1.5, strokeLinecap: "round", strokeLinejoin: "round" })), Xk = (e) => /* @__PURE__ */ Me("svg", { width: 24, height: 18, viewBox: "0 0 24 18", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...e }, /* @__PURE__ */ Me("title", null, "portal-icon-4"), /* @__PURE__ */ Me("path", { d: "M21.75 1.5H2.25A1.5 1.5 0 0 0 .75 3v12a1.5 1.5 0 0 0 1.5 1.5h19.5a1.5 1.5 0 0 0 1.5-1.5V3a1.5 1.5 0 0 0-1.5-1.5zm-6.063 5.475L19.5 10.5M8.313 6.975 4.5 10.5", stroke: "currentColor", strokeWidth: 1.5, strokeLinecap: "round", strokeLinejoin: "round" }), /* @__PURE__ */ Me("path", { d: "m22.88 2.014-9.513 6.56a2.41 2.41 0 0 1-2.734 0L1.12 2.014", stroke: "currentColor", strokeWidth: 1.5, strokeLinecap: "round", strokeLinejoin: "round" })), Wk = (e) => /* @__PURE__ */ Me("svg", { width: 26, height: 26, viewBox: "0 0 26 26", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...e }, /* @__PURE__ */ Me("title", null, "portal-icon-5"), /* @__PURE__ */ Me("path", { d: "M17.903 12.016a5.007 5.007 0 0 0-3.031-3.654m-3.835.038a5.002 5.002 0 0 0-2.879 5.85m2.282 3.046A4.975 4.975 0 0 0 13 18a4.99 4.99 0 0 0 4.12-2.167m-1.949 5.387a8.504 8.504 0 0 0 5.756-11.295m-2.316-3.31A8.474 8.474 0 0 0 13 4.5a8.461 8.461 0 0 0-5.608 2.113m-2.28 3.213a8.503 8.503 0 0 0 5.914 11.444", stroke: "currentColor", strokeWidth: 1.5, strokeLinecap: "round" }), /* @__PURE__ */ Me("path", { d: "M8.924 24.29c1.273.46 2.645.71 4.076.71 5.52 0 10.17-3.727 11.57-8.803M6.712 2.777A11.994 11.994 0 0 0 1 13c0 3.545 1.537 6.731 3.982 8.928m19.867-10.839C23.933 5.369 18.977 1 13 1c-.69 0-1.367.058-2.025.17", stroke: "currentColor", strokeWidth: 1.5, strokeLinecap: "round" })), qa = [
|
|
@@ -19141,7 +19147,7 @@ const Nk = ({ clearError: e, errors: t, offer: r, updateOffer: n }) => {
|
|
|
19141
19147
|
}
|
|
19142
19148
|
], qk = ({ localSettings: e, updateSetting: t }) => {
|
|
19143
19149
|
var x, k;
|
|
19144
|
-
const { mutateAsync: r } = Pr(), n = je(), [a, o, i, c] = Ue(e, ["portal_button", "portal_button_style", "portal_button_icon", "portal_button_signup_text"]), l = i || qa[0].value, A = qa.map(({ value: y }) => y).includes(l), [u, h] = G(A ? void 0 : l),
|
|
19150
|
+
const { mutateAsync: r } = Pr(), n = je(), [a, o, i, c] = Ue(e, ["portal_button", "portal_button_style", "portal_button_icon", "portal_button_signup_text"]), l = i || qa[0].value, A = qa.map(({ value: y }) => y).includes(l), [u, h] = G(A ? void 0 : l), m = async (y) => {
|
|
19145
19151
|
try {
|
|
19146
19152
|
const I = Yt(await r({ file: y }));
|
|
19147
19153
|
t("portal_button_icon", I), h(I);
|
|
@@ -19149,7 +19155,7 @@ const Nk = ({ clearError: e, errors: t, offer: r, updateOffer: n }) => {
|
|
|
19149
19155
|
const C = I;
|
|
19150
19156
|
C.response.status === 415 && (C.message = "Unsupported file type"), n(C);
|
|
19151
19157
|
}
|
|
19152
|
-
},
|
|
19158
|
+
}, p = () => {
|
|
19153
19159
|
t("portal_button_icon", null), h(void 0);
|
|
19154
19160
|
}, w = [
|
|
19155
19161
|
{ value: "icon-and-text", label: "Icon and text" },
|
|
@@ -19190,9 +19196,9 @@ const Nk = ({ clearError: e, errors: t, offer: r, updateOffer: n }) => {
|
|
|
19190
19196
|
imageURL: u,
|
|
19191
19197
|
width: "46px",
|
|
19192
19198
|
deleteButtonUnstyled: !0,
|
|
19193
|
-
onDelete:
|
|
19199
|
+
onDelete: p,
|
|
19194
19200
|
onImageClick: () => u && t("portal_button_icon", u),
|
|
19195
|
-
onUpload:
|
|
19201
|
+
onUpload: m,
|
|
19196
19202
|
children: /* @__PURE__ */ s.jsx(Ge, { className: "dark:text-white", name: "upload", size: "md" })
|
|
19197
19203
|
}
|
|
19198
19204
|
) })
|
|
@@ -19289,10 +19295,10 @@ const Nk = ({ clearError: e, errors: t, offer: r, updateOffer: n }) => {
|
|
|
19289
19295
|
let o = r.filter((x) => x.visibility === "public" && x.type === "paid").map((x) => x.id);
|
|
19290
19296
|
const i = n.url.replace(/\/$/, ""), c = "/?v=modal-portal-settings#/portal/preview", l = JSON.parse(kt(e, "portal_plans") || ""), u = kt(e, "members_signup_access") === "all" && (!on(e, t) || l.includes("free")), h = new URLSearchParams();
|
|
19291
19297
|
h.append("button", kt(e, "portal_button") ? "true" : "false"), h.append("name", kt(e, "portal_name") ? "true" : "false"), h.append("isFree", l.includes("free") ? "true" : "false"), h.append("isMonthly", on(e, t) && l.includes("monthly") ? "true" : "false"), h.append("isYearly", on(e, t) && l.includes("yearly") ? "true" : "false"), h.append("page", a === "account" ? "accountHome" : "signup"), h.append("buttonIcon", encodeURIComponent(kt(e, "portal_button_icon") || "icon-1")), h.append("signupButtonText", encodeURIComponent(kt(e, "portal_button_signup_text") || "")), h.append("membersSignupAccess", kt(e, "members_signup_access") || "all"), h.append("allowSelfSignup", u ? "true" : "false"), h.append("signupTermsHtml", kt(e, "portal_signup_terms_html") || ""), h.append("signupCheckboxRequired", kt(e, "portal_signup_checkbox_required") ? "true" : "false"), h.append("portalProducts", o.join(","));
|
|
19292
|
-
const
|
|
19293
|
-
|
|
19294
|
-
const
|
|
19295
|
-
|
|
19298
|
+
const m = kt(e, "portal_default_plan");
|
|
19299
|
+
m && h.append("portalDefaultPlan", m), l && l.length && h.append("portalPrices", encodeURIComponent(l.join(",")));
|
|
19300
|
+
const p = kt(e, "accent_color");
|
|
19301
|
+
p != null && h.append("accentColor", encodeURIComponent(p));
|
|
19296
19302
|
const w = kt(e, "portal_button_style");
|
|
19297
19303
|
return w && h.append("buttonStyle", encodeURIComponent(w)), h.append("disableBackground", "false"), `${i}${c}?${h.toString()}`;
|
|
19298
19304
|
}, $k = ({
|
|
@@ -19324,10 +19330,10 @@ const Nk = ({ clearError: e, errors: t, offer: r, updateOffer: n }) => {
|
|
|
19324
19330
|
}
|
|
19325
19331
|
return i;
|
|
19326
19332
|
}, eb = ({ localSettings: e, updateSetting: t, localTiers: r, updateTier: n, errors: a, setError: o }) => {
|
|
19327
|
-
const { config: i } = Te(), [c, l, A, u, h,
|
|
19333
|
+
const { config: i } = Te(), [c, l, A, u, h, m] = Ue(
|
|
19328
19334
|
e,
|
|
19329
19335
|
["members_signup_access", "portal_name", "portal_signup_terms_html", "portal_signup_checkbox_required", "portal_plans", "portal_default_plan"]
|
|
19330
|
-
),
|
|
19336
|
+
), p = JSON.parse((h == null ? void 0 : h.toString()) || "[]"), w = 115, x = xt(() => {
|
|
19331
19337
|
const Y = document.createElement("div");
|
|
19332
19338
|
return Y.innerHTML = (A == null ? void 0 : A.toString()) || "", Y.innerText.length;
|
|
19333
19339
|
}, [A]), k = it((Y, X) => {
|
|
@@ -19337,18 +19343,18 @@ const Nk = ({ clearError: e, errors: t, offer: r, updateOffer: n }) => {
|
|
|
19337
19343
|
x > w ? k("portal_signup_terms_html", "Signup notice is too long") : k("portal_signup_terms_html", void 0);
|
|
19338
19344
|
}, [x, k]);
|
|
19339
19345
|
const y = (Y) => {
|
|
19340
|
-
const X =
|
|
19341
|
-
X === -1 ?
|
|
19346
|
+
const X = p.indexOf(Y);
|
|
19347
|
+
X === -1 ? p.push(Y) : p.splice(X, 1), t("portal_plans", JSON.stringify(p)), m === "yearly" ? !p.includes("yearly") && p.includes("monthly") && t("portal_default_plan", "monthly") : m === "monthly" && (p.includes("monthly") || t("portal_default_plan", "yearly"));
|
|
19342
19348
|
}, I = c !== "all", C = on(e, i);
|
|
19343
19349
|
let R = [];
|
|
19344
19350
|
r && r.forEach((Y) => {
|
|
19345
19351
|
Y.type === "free" && R.push({
|
|
19346
|
-
checked:
|
|
19352
|
+
checked: p.includes("free"),
|
|
19347
19353
|
disabled: I,
|
|
19348
19354
|
label: Y.name,
|
|
19349
19355
|
value: "free",
|
|
19350
19356
|
onChange: (X) => {
|
|
19351
|
-
|
|
19357
|
+
p.includes("free") && !X && p.splice(p.indexOf("free"), 1), !p.includes("free") && X && p.push("free"), t("portal_plans", JSON.stringify(p)), n({ ...Y, visibility: X ? "public" : "none" });
|
|
19352
19358
|
}
|
|
19353
19359
|
});
|
|
19354
19360
|
});
|
|
@@ -19389,7 +19395,7 @@ const Nk = ({ clearError: e, errors: t, offer: r, updateOffer: n }) => {
|
|
|
19389
19395
|
{
|
|
19390
19396
|
checkboxes: [
|
|
19391
19397
|
{
|
|
19392
|
-
checked:
|
|
19398
|
+
checked: p.includes("monthly"),
|
|
19393
19399
|
disabled: I,
|
|
19394
19400
|
label: "Monthly",
|
|
19395
19401
|
value: "monthly",
|
|
@@ -19398,7 +19404,7 @@ const Nk = ({ clearError: e, errors: t, offer: r, updateOffer: n }) => {
|
|
|
19398
19404
|
}
|
|
19399
19405
|
},
|
|
19400
19406
|
{
|
|
19401
|
-
checked:
|
|
19407
|
+
checked: p.includes("yearly"),
|
|
19402
19408
|
disabled: I,
|
|
19403
19409
|
label: "Yearly",
|
|
19404
19410
|
value: "yearly",
|
|
@@ -19410,11 +19416,11 @@ const Nk = ({ clearError: e, errors: t, offer: r, updateOffer: n }) => {
|
|
|
19410
19416
|
title: "Prices available at signup"
|
|
19411
19417
|
}
|
|
19412
19418
|
),
|
|
19413
|
-
|
|
19419
|
+
p.includes("yearly") && p.includes("monthly") && /* @__PURE__ */ s.jsx(
|
|
19414
19420
|
pt,
|
|
19415
19421
|
{
|
|
19416
19422
|
options: O,
|
|
19417
|
-
selectedOption: O.find((Y) => Y.value ===
|
|
19423
|
+
selectedOption: O.find((Y) => Y.value === m),
|
|
19418
19424
|
title: "Default price at signup",
|
|
19419
19425
|
onSelect: (Y) => {
|
|
19420
19426
|
t("portal_default_plan", (Y == null ? void 0 : Y.value) ?? "yearly");
|
|
@@ -19494,9 +19500,9 @@ const Nk = ({ clearError: e, errors: t, offer: r, updateOffer: n }) => {
|
|
|
19494
19500
|
};
|
|
19495
19501
|
return /* @__PURE__ */ s.jsx("div", { className: "pt-4", children: /* @__PURE__ */ s.jsx(pr, { selectedTab: i, tabs: l, onTabChange: A }) });
|
|
19496
19502
|
}, ab = () => {
|
|
19497
|
-
const { updateRoute: e } = ye(), [t, r] = G("signup"), n = je(), { settings: a, siteData: o, config: i } = Te(), { mutateAsync: c } = ar(), { data: { tiers: l } = {} } = yn(), { mutateAsync: A } = bs(), { mutateAsync: u } = rb(), { getParam: h } = vn(),
|
|
19503
|
+
const { updateRoute: e } = ye(), [t, r] = G("signup"), n = je(), { settings: a, siteData: o, config: i } = Te(), { mutateAsync: c } = ar(), { data: { tiers: l } = {} } = yn(), { mutateAsync: A } = bs(), { mutateAsync: u } = rb(), { getParam: h } = vn(), m = h("verifyEmail");
|
|
19498
19504
|
ie(() => {
|
|
19499
|
-
|
|
19505
|
+
m && (async ({ token: B }) => {
|
|
19500
19506
|
try {
|
|
19501
19507
|
let { settings: L } = await u({ token: B });
|
|
19502
19508
|
const [Z] = Ue(L, ["members_support_address"]);
|
|
@@ -19521,9 +19527,9 @@ const Nk = ({ clearError: e, errors: t, offer: r, updateOffer: n }) => {
|
|
|
19521
19527
|
onOk: (E) => E == null ? void 0 : E.remove()
|
|
19522
19528
|
}), n(L, { withToast: !1 });
|
|
19523
19529
|
}
|
|
19524
|
-
})({ token:
|
|
19525
|
-
}, [n,
|
|
19526
|
-
const { formState:
|
|
19530
|
+
})({ token: m });
|
|
19531
|
+
}, [n, m, u]);
|
|
19532
|
+
const { formState: p, setFormState: w, saveState: x, handleSave: k, updateForm: y, okProps: I } = St({
|
|
19527
19533
|
initialState: {
|
|
19528
19534
|
settings: a,
|
|
19529
19535
|
tiers: l || []
|
|
@@ -19531,13 +19537,13 @@ const Nk = ({ clearError: e, errors: t, offer: r, updateOffer: n }) => {
|
|
|
19531
19537
|
savingDelay: 500,
|
|
19532
19538
|
onSave: async () => {
|
|
19533
19539
|
var Z, E, Q, $;
|
|
19534
|
-
await Promise.all(
|
|
19535
|
-
const J =
|
|
19540
|
+
await Promise.all(p.tiers.filter(({ dirty: ue }) => ue).map((ue) => A(ue))), w((ue) => ({ ...ue, tiers: p.tiers.map((H) => ({ ...H, dirty: !1 })) }));
|
|
19541
|
+
const J = p.settings.filter((ue) => ue.dirty);
|
|
19536
19542
|
if (!J.length)
|
|
19537
19543
|
return;
|
|
19538
19544
|
const { meta: B, settings: L } = await c(J);
|
|
19539
|
-
if (w((ue) => ({ ...ue, settings:
|
|
19540
|
-
const ue = (Z =
|
|
19545
|
+
if (w((ue) => ({ ...ue, settings: p.settings.map((H) => ({ ...H, dirty: !1 })) })), B != null && B.sent_email_verification) {
|
|
19546
|
+
const ue = (Z = p.settings.find((fe) => fe.key === "members_support_address")) == null ? void 0 : Z.value, H = ((E = L.find((fe) => fe.key === "support_email_address")) == null ? void 0 : E.value) || _a((($ = (Q = L.find((fe) => fe.key === "members_support_address")) == null ? void 0 : Q.value) == null ? void 0 : $.toString()) || "noreply", o, i);
|
|
19541
19547
|
ne.show(We, {
|
|
19542
19548
|
title: "Confirm email address",
|
|
19543
19549
|
prompt: /* @__PURE__ */ s.jsxs(s.Fragment, { children: [
|
|
@@ -19556,8 +19562,8 @@ const Nk = ({ clearError: e, errors: t, offer: r, updateOffer: n }) => {
|
|
|
19556
19562
|
onSaveError: n
|
|
19557
19563
|
});
|
|
19558
19564
|
ie(() => {
|
|
19559
|
-
!
|
|
19560
|
-
}, [l,
|
|
19565
|
+
!p.tiers.length && (l != null && l.length) && w((J) => ({ ...J, tiers: l }));
|
|
19566
|
+
}, [l, p.tiers, w]);
|
|
19561
19567
|
const [C, R] = G({}), U = (J, B) => {
|
|
19562
19568
|
y((L) => ({
|
|
19563
19569
|
...L,
|
|
@@ -19579,8 +19585,8 @@ const Nk = ({ clearError: e, errors: t, offer: r, updateOffer: n }) => {
|
|
|
19579
19585
|
nb,
|
|
19580
19586
|
{
|
|
19581
19587
|
errors: C,
|
|
19582
|
-
localSettings:
|
|
19583
|
-
localTiers:
|
|
19588
|
+
localSettings: p.settings,
|
|
19589
|
+
localTiers: p.tiers,
|
|
19584
19590
|
setError: O,
|
|
19585
19591
|
updateSetting: U,
|
|
19586
19592
|
updateTier: F
|
|
@@ -19588,8 +19594,8 @@ const Nk = ({ clearError: e, errors: t, offer: r, updateOffer: n }) => {
|
|
|
19588
19594
|
), z = /* @__PURE__ */ s.jsx(
|
|
19589
19595
|
$k,
|
|
19590
19596
|
{
|
|
19591
|
-
localSettings:
|
|
19592
|
-
localTiers:
|
|
19597
|
+
localSettings: p.settings,
|
|
19598
|
+
localTiers: p.tiers,
|
|
19593
19599
|
selectedTab: t
|
|
19594
19600
|
}
|
|
19595
19601
|
);
|
|
@@ -19626,8 +19632,8 @@ const Nk = ({ clearError: e, errors: t, offer: r, updateOffer: n }) => {
|
|
|
19626
19632
|
}, sb = ne.create(ab), ob = ne.create(() => {
|
|
19627
19633
|
const { updateRoute: e } = ye(), { localSettings: t, updateSetting: r, handleSave: n, validate: a, errors: o, clearError: i, okProps: c } = kr({
|
|
19628
19634
|
onValidate: () => {
|
|
19629
|
-
const
|
|
19630
|
-
return l && !Ut.isURL(l, { require_protocol: !0 }) && (
|
|
19635
|
+
const p = {};
|
|
19636
|
+
return l && !Ut.isURL(l, { require_protocol: !0 }) && (p.slackUrl = "The URL must be in a format like https://hooks.slack.com/services/<your personal key>"), p;
|
|
19631
19637
|
},
|
|
19632
19638
|
savingDelay: 500
|
|
19633
19639
|
}), [l, A] = Ue(t, ["slack_url", "slack_username"]), { mutateAsync: u } = zh(), h = async () => {
|
|
@@ -19635,7 +19641,7 @@ const Nk = ({ clearError: e, errors: t, offer: r, updateOffer: n }) => {
|
|
|
19635
19641
|
title: "Check your Slack channel for the test message",
|
|
19636
19642
|
type: "info"
|
|
19637
19643
|
}));
|
|
19638
|
-
},
|
|
19644
|
+
}, m = t.some((p) => p.dirty);
|
|
19639
19645
|
return /* @__PURE__ */ s.jsxs(
|
|
19640
19646
|
ze,
|
|
19641
19647
|
{
|
|
@@ -19643,7 +19649,7 @@ const Nk = ({ clearError: e, errors: t, offer: r, updateOffer: n }) => {
|
|
|
19643
19649
|
e("integrations");
|
|
19644
19650
|
},
|
|
19645
19651
|
cancelLabel: "Close",
|
|
19646
|
-
dirty:
|
|
19652
|
+
dirty: m,
|
|
19647
19653
|
okColor: c.color,
|
|
19648
19654
|
okLabel: c.label || "Save",
|
|
19649
19655
|
testId: "slack-modal",
|
|
@@ -19674,7 +19680,7 @@ const Nk = ({ clearError: e, errors: t, offer: r, updateOffer: n }) => {
|
|
|
19674
19680
|
title: "Webhook URL",
|
|
19675
19681
|
value: l,
|
|
19676
19682
|
onBlur: a,
|
|
19677
|
-
onChange: (
|
|
19683
|
+
onChange: (p) => r("slack_url", p.target.value),
|
|
19678
19684
|
onKeyDown: () => i("slackUrl")
|
|
19679
19685
|
}
|
|
19680
19686
|
),
|
|
@@ -19686,7 +19692,7 @@ const Nk = ({ clearError: e, errors: t, offer: r, updateOffer: n }) => {
|
|
|
19686
19692
|
hint: "The username to display messages from",
|
|
19687
19693
|
title: "Username",
|
|
19688
19694
|
value: A,
|
|
19689
|
-
onChange: (
|
|
19695
|
+
onChange: (p) => r("slack_username", p.target.value)
|
|
19690
19696
|
}
|
|
19691
19697
|
),
|
|
19692
19698
|
/* @__PURE__ */ s.jsx(pe, { color: "outline", label: "Send test notification", onClick: h })
|
|
@@ -19712,9 +19718,9 @@ const Nk = ({ clearError: e, errors: t, offer: r, updateOffer: n }) => {
|
|
|
19712
19718
|
const [e, t] = G(!1), [r, n] = G(""), [a, o] = G(!1), [i, c] = G(""), { refetch: l } = yn({
|
|
19713
19719
|
searchParams: { filter: "type:paid+active:true" },
|
|
19714
19720
|
enabled: !1
|
|
19715
|
-
}), { mutateAsync: A } = bs(), { mutateAsync: u } = ar(), h = je(),
|
|
19721
|
+
}), { mutateAsync: A } = bs(), { mutateAsync: u } = ar(), h = je(), m = (y) => {
|
|
19716
19722
|
n(y.target.value), t(!!y.target.value);
|
|
19717
|
-
},
|
|
19723
|
+
}, p = async () => {
|
|
19718
19724
|
var C, R;
|
|
19719
19725
|
const { data: y } = await l(), I = y == null ? void 0 : y.pages[0].tiers[0];
|
|
19720
19726
|
if (I) {
|
|
@@ -19744,7 +19750,7 @@ const Nk = ({ clearError: e, errors: t, offer: r, updateOffer: n }) => {
|
|
|
19744
19750
|
try {
|
|
19745
19751
|
await u([
|
|
19746
19752
|
{ key: "stripe_connect_integration_token", value: r }
|
|
19747
|
-
]), await
|
|
19753
|
+
]), await p(), await u([
|
|
19748
19754
|
{ key: "portal_plans", value: JSON.stringify(["free", "monthly", "yearly"]) }
|
|
19749
19755
|
]);
|
|
19750
19756
|
} catch (I) {
|
|
@@ -19787,7 +19793,7 @@ const Nk = ({ clearError: e, errors: t, offer: r, updateOffer: n }) => {
|
|
|
19787
19793
|
"Step 2 — ",
|
|
19788
19794
|
/* @__PURE__ */ s.jsx("span", { className: "text-black dark:text-white", children: "Paste secure key" })
|
|
19789
19795
|
] }),
|
|
19790
|
-
/* @__PURE__ */ s.jsx(vr, { error: !!i, hint: i || void 0, placeholder: "Paste your secure key here", onChange:
|
|
19796
|
+
/* @__PURE__ */ s.jsx(vr, { error: !!i, hint: i || void 0, placeholder: "Paste your secure key here", onChange: m }),
|
|
19791
19797
|
e && /* @__PURE__ */ s.jsx(pe, { className: "mt-5", color: "green", label: "Save Stripe settings", onClick: w })
|
|
19792
19798
|
] });
|
|
19793
19799
|
}, fb = ({ onClose: e }) => {
|
|
@@ -19805,11 +19811,11 @@ const Nk = ({ clearError: e, errors: t, offer: r, updateOffer: n }) => {
|
|
|
19805
19811
|
" from this site. This will automatically turn off paid memberships on this site."
|
|
19806
19812
|
] }),
|
|
19807
19813
|
okLabel: u ? "" : "Disconnect",
|
|
19808
|
-
onOk: async (
|
|
19814
|
+
onOk: async (m) => {
|
|
19809
19815
|
try {
|
|
19810
|
-
await i(null),
|
|
19811
|
-
} catch (
|
|
19812
|
-
c(
|
|
19816
|
+
await i(null), m == null || m.remove(), e == null || e();
|
|
19817
|
+
} catch (p) {
|
|
19818
|
+
c(p);
|
|
19813
19819
|
}
|
|
19814
19820
|
}
|
|
19815
19821
|
});
|
|
@@ -19899,7 +19905,7 @@ const Nk = ({ clearError: e, errors: t, offer: r, updateOffer: n }) => {
|
|
|
19899
19905
|
);
|
|
19900
19906
|
}, gb = ne.create(pb), wb = ({ tier: e }) => {
|
|
19901
19907
|
var z;
|
|
19902
|
-
const t = (e == null ? void 0 : e.type) === "free", { updateRoute: r } = ye(), { mutateAsync: n } = bs(), { mutateAsync: a } = Gh(), { mutateAsync: o } = ar(), [i, c] = Je.useState(!!(e != null && e.trial_days)), l = je(), { localSettings: A, siteData: u } = kr(), [h] = Ue(A, ["portal_plans"]),
|
|
19908
|
+
const t = (e == null ? void 0 : e.type) === "free", { updateRoute: r } = ye(), { mutateAsync: n } = bs(), { mutateAsync: a } = Gh(), { mutateAsync: o } = ar(), [i, c] = Je.useState(!!(e != null && e.trial_days)), l = je(), { localSettings: A, siteData: u } = kr(), [h] = Ue(A, ["portal_plans"]), m = JSON.parse((h == null ? void 0 : h.toString()) || "[]"), p = {
|
|
19903
19909
|
name: () => w.name ? void 0 : "Enter a name for the tier",
|
|
19904
19910
|
monthly_price: () => w.type !== "free" ? oi(w.monthly_price || 0, w.currency, { allowZero: !1 }) : void 0,
|
|
19905
19911
|
yearly_price: () => w.type !== "free" ? oi(w.yearly_price || 0, w.currency, { allowZero: !1 }) : void 0
|
|
@@ -19915,7 +19921,7 @@ const Nk = ({ clearError: e, errors: t, offer: r, updateOffer: n }) => {
|
|
|
19915
19921
|
savedDelay: 500,
|
|
19916
19922
|
onValidate: () => {
|
|
19917
19923
|
const j = {};
|
|
19918
|
-
return Object.entries(
|
|
19924
|
+
return Object.entries(p).forEach(([J, B]) => {
|
|
19919
19925
|
j[J] = B == null ? void 0 : B();
|
|
19920
19926
|
}), j;
|
|
19921
19927
|
},
|
|
@@ -19925,10 +19931,10 @@ const Nk = ({ clearError: e, errors: t, offer: r, updateOffer: n }) => {
|
|
|
19925
19931
|
if (L.benefits = (Z = L.benefits) == null ? void 0 : Z.filter((E) => E), t || (L.currency = J, L.trial_days = parseInt(j)), e != null && e.id ? await n({ ...e, ...L }) : await a(L), t) {
|
|
19926
19932
|
const E = w.visibility === "public";
|
|
19927
19933
|
let Q = !1;
|
|
19928
|
-
|
|
19934
|
+
m.includes("free") && !E && (m.splice(m.indexOf("free"), 1), Q = !0), !m.includes("free") && E && (m.push("free"), Q = !0), Q && await o([
|
|
19929
19935
|
{
|
|
19930
19936
|
key: "portal_plans",
|
|
19931
|
-
value: JSON.stringify(
|
|
19937
|
+
value: JSON.stringify(m)
|
|
19932
19938
|
}
|
|
19933
19939
|
]);
|
|
19934
19940
|
}
|
|
@@ -19944,7 +19950,7 @@ const Nk = ({ clearError: e, errors: t, offer: r, updateOffer: n }) => {
|
|
|
19944
19950
|
}, F = Ye(!1);
|
|
19945
19951
|
ie(() => {
|
|
19946
19952
|
var j, J;
|
|
19947
|
-
F.current && ((j =
|
|
19953
|
+
F.current && ((j = p.monthly_price) == null || j.call(p), (J = p.yearly_price) == null || J.call(p)), F.current = !0;
|
|
19948
19954
|
}, [w.currency]);
|
|
19949
19955
|
const Y = () => {
|
|
19950
19956
|
if (e) {
|
|
@@ -20202,12 +20208,12 @@ const Nk = ({ clearError: e, errors: t, offer: r, updateOffer: n }) => {
|
|
|
20202
20208
|
try {
|
|
20203
20209
|
i("Saving..."), await Promise.all([
|
|
20204
20210
|
n(h),
|
|
20205
|
-
new Promise((
|
|
20206
|
-
setTimeout(
|
|
20211
|
+
new Promise((m) => {
|
|
20212
|
+
setTimeout(m, 1e3);
|
|
20207
20213
|
})
|
|
20208
20214
|
]), i("Saved");
|
|
20209
|
-
} catch (
|
|
20210
|
-
a(
|
|
20215
|
+
} catch (m) {
|
|
20216
|
+
a(m);
|
|
20211
20217
|
} finally {
|
|
20212
20218
|
setTimeout(() => i("Save"), 1e3);
|
|
20213
20219
|
}
|
|
@@ -20272,7 +20278,7 @@ const Nk = ({ clearError: e, errors: t, offer: r, updateOffer: n }) => {
|
|
|
20272
20278
|
return n = !1, n;
|
|
20273
20279
|
return n;
|
|
20274
20280
|
}, Mb = ({ user: e }) => {
|
|
20275
|
-
const { currentUser: t, config: r, siteData: n } = Te(), [a, o] = G(!1), [i, c] = G(""), [l, A] = G(""), [u, h] = G(""), [
|
|
20281
|
+
const { currentUser: t, config: r, siteData: n } = Te(), [a, o] = G(!1), [i, c] = G(""), [l, A] = G(""), [u, h] = G(""), [m, p] = G(""), [w, x] = G({}), k = Ye(null), y = Ye(null), { mutateAsync: I } = qh(), C = je(), R = e.id === t.id, U = ({ password: z, confirmPassword: j }) => {
|
|
20276
20282
|
if (R && !i)
|
|
20277
20283
|
return { oldPassword: "Your current password is required to set a new one" };
|
|
20278
20284
|
if (z !== j)
|
|
@@ -20295,10 +20301,10 @@ const Nk = ({ clearError: e, errors: t, offer: r, updateOffer: n }) => {
|
|
|
20295
20301
|
return z.toLowerCase() === B ? { newPassword: "Sorry, you cannot use an insecure password." } : z.toLowerCase() === J || z.toLowerCase() === L ? { newPassword: "Sorry, you cannot use an insecure password." } : Eb(z) ? {} : { newPassword: "Sorry, you cannot use an insecure password." };
|
|
20296
20302
|
};
|
|
20297
20303
|
ie(() => {
|
|
20298
|
-
|
|
20299
|
-
|
|
20304
|
+
m === "saved" && setTimeout(() => {
|
|
20305
|
+
p(""), o(!1);
|
|
20300
20306
|
}, 2500);
|
|
20301
|
-
}, [
|
|
20307
|
+
}, [m]);
|
|
20302
20308
|
const O = () => {
|
|
20303
20309
|
o(!0);
|
|
20304
20310
|
}, F = /* @__PURE__ */ s.jsx(
|
|
@@ -20310,7 +20316,7 @@ const Nk = ({ clearError: e, errors: t, offer: r, updateOffer: n }) => {
|
|
|
20310
20316
|
}
|
|
20311
20317
|
);
|
|
20312
20318
|
let Y = "Change password";
|
|
20313
|
-
|
|
20319
|
+
m === "saving" ? Y = "Updating..." : m === "saved" && (Y = "Updated");
|
|
20314
20320
|
const X = /* @__PURE__ */ s.jsxs(s.Fragment, { children: [
|
|
20315
20321
|
R && /* @__PURE__ */ s.jsx(
|
|
20316
20322
|
ce,
|
|
@@ -20359,10 +20365,10 @@ const Nk = ({ clearError: e, errors: t, offer: r, updateOffer: n }) => {
|
|
|
20359
20365
|
color: "red",
|
|
20360
20366
|
label: Y,
|
|
20361
20367
|
onClick: async () => {
|
|
20362
|
-
|
|
20368
|
+
p("saving");
|
|
20363
20369
|
const z = U({ password: l, confirmPassword: u });
|
|
20364
20370
|
if (x(z), Object.keys(z).length > 0) {
|
|
20365
|
-
c(""), A(""), h(""),
|
|
20371
|
+
c(""), A(""), h(""), p("");
|
|
20366
20372
|
return;
|
|
20367
20373
|
}
|
|
20368
20374
|
try {
|
|
@@ -20371,9 +20377,9 @@ const Nk = ({ clearError: e, errors: t, offer: r, updateOffer: n }) => {
|
|
|
20371
20377
|
confirmNewPassword: u,
|
|
20372
20378
|
oldPassword: i,
|
|
20373
20379
|
userId: e == null ? void 0 : e.id
|
|
20374
|
-
}),
|
|
20380
|
+
}), p("saved");
|
|
20375
20381
|
} catch (j) {
|
|
20376
|
-
|
|
20382
|
+
p(""), Le({
|
|
20377
20383
|
type: "error",
|
|
20378
20384
|
title: j instanceof Vh ? j.message : "Couldn't update password. Please try again."
|
|
20379
20385
|
}), C(j, { withToast: !1 });
|
|
@@ -20752,7 +20758,7 @@ const Nk = ({ clearError: e, errors: t, offer: r, updateOffer: n }) => {
|
|
|
20752
20758
|
/* @__PURE__ */ s.jsx("span", { className: "sr-only", children: "Actions" }),
|
|
20753
20759
|
/* @__PURE__ */ s.jsx(Ge, { colorClass: "text-white", name: "ellipsis", size: "md" })
|
|
20754
20760
|
] }), Ub = ({ user: e }) => {
|
|
20755
|
-
const { updateRoute: t } = ye(), { ownerUser: r } = gs(), { currentUser: n } = Te(), a = je(), { formState: o, setFormState: i, saveState: c, handleSave: l, updateForm: A, errors: u, setErrors: h, clearError:
|
|
20761
|
+
const { updateRoute: t } = ye(), { ownerUser: r } = gs(), { currentUser: n } = Te(), a = je(), { formState: o, setFormState: i, saveState: c, handleSave: l, updateForm: A, errors: u, setErrors: h, clearError: m, okProps: p } = St({
|
|
20756
20762
|
initialState: e,
|
|
20757
20763
|
savingDelay: 500,
|
|
20758
20764
|
savedDelay: 500,
|
|
@@ -20767,7 +20773,7 @@ const Nk = ({ clearError: e, errors: t, offer: r, updateOffer: n }) => {
|
|
|
20767
20773
|
}), w = (H) => A(() => H), x = (H, fe) => {
|
|
20768
20774
|
var ae;
|
|
20769
20775
|
const se = (ae = Bn[H]) == null ? void 0 : ae.call(Bn, { [H]: fe });
|
|
20770
|
-
return se ? (h({ ...u, [H]: se }), !1) : (
|
|
20776
|
+
return se ? (h({ ...u, [H]: se }), !1) : (m(H), !0);
|
|
20771
20777
|
}, k = vt(), { mutateAsync: y } = Pr(), { mutateAsync: I } = rf(), { mutateAsync: C } = nf(), { mutateAsync: R } = af(), U = Zr(), O = ll(), F = it(() => {
|
|
20772
20778
|
Tr(n) ? t("staff") : t({ isExternal: !0, route: "dashboard" });
|
|
20773
20779
|
}, [n, t]), Y = async (H) => {
|
|
@@ -20925,11 +20931,11 @@ const Nk = ({ clearError: e, errors: t, offer: r, updateOffer: n }) => {
|
|
|
20925
20931
|
afterClose: F,
|
|
20926
20932
|
animate: Tr(n),
|
|
20927
20933
|
backDrop: Tr(n),
|
|
20928
|
-
buttonsDisabled:
|
|
20934
|
+
buttonsDisabled: p.disabled,
|
|
20929
20935
|
cancelLabel: "Close",
|
|
20930
20936
|
dirty: c === "unsaved",
|
|
20931
|
-
okColor:
|
|
20932
|
-
okLabel:
|
|
20937
|
+
okColor: p.color,
|
|
20938
|
+
okLabel: p.label || "Save",
|
|
20933
20939
|
size: Tr(n) ? "lg" : "bleed",
|
|
20934
20940
|
stickyFooter: !0,
|
|
20935
20941
|
testId: "user-detail-modal",
|
|
@@ -21016,9 +21022,9 @@ const Nk = ({ clearError: e, errors: t, offer: r, updateOffer: n }) => {
|
|
|
21016
21022
|
] })
|
|
21017
21023
|
] }) }),
|
|
21018
21024
|
/* @__PURE__ */ s.jsxs("div", { className: `${!Tr(n) && "mx-auto max-w-4xl"} mt-10 grid grid-cols-1 gap-x-12 gap-y-20 md:grid-cols-2`, children: [
|
|
21019
|
-
/* @__PURE__ */ s.jsx(Cb, { clearError:
|
|
21025
|
+
/* @__PURE__ */ s.jsx(Cb, { clearError: m, errors: u, setUserData: w, user: o, validateField: x }),
|
|
21020
21026
|
/* @__PURE__ */ s.jsxs("div", { className: "flex flex-col justify-between gap-10", children: [
|
|
21021
|
-
/* @__PURE__ */ s.jsx(jb, { clearError:
|
|
21027
|
+
/* @__PURE__ */ s.jsx(jb, { clearError: m, errors: u, setUserData: w, user: o, validateField: x }),
|
|
21022
21028
|
e.id === n.id && /* @__PURE__ */ s.jsx(Nb, {})
|
|
21023
21029
|
] }),
|
|
21024
21030
|
/* @__PURE__ */ s.jsx(Ib, { setUserData: w, user: o }),
|
|
@@ -21034,18 +21040,18 @@ const Nk = ({ clearError: e, errors: t, offer: r, updateOffer: n }) => {
|
|
|
21034
21040
|
}, [n, r, o]), o ? /* @__PURE__ */ s.jsx(Ub, { user: o }) : null;
|
|
21035
21041
|
}, Lb = ne.create(Bb), zb = (e) => /* @__PURE__ */ Me("svg", { width: 42, height: 37, viewBox: "0 0 80 37", xmlns: "http://www.w3.org/2000/svg", className: "css-1oudp6l-ZapierLogo--red500", ...e }, /* @__PURE__ */ Me("title", null, "zapier-logo"), /* @__PURE__ */ Me("path", { fill: "#ff4a00", fillRule: "evenodd", clipRule: "evenodd", d: "M53.934 4.185h-2.94l2.079-2.073A5.053 5.053 0 0 0 51.886.928l-2.078 2.073V.07a5.129 5.129 0 0 0-.836-.07h-.006c-.285 0-.564.024-.836.07V3L46.052.929c-.23.163-.444.344-.642.543h-.002c-.198.198-.38.412-.543.641l2.078 2.073h-2.938s-.07.55-.07.835v.003c0 .284.024.564.07.836h2.938l-2.078 2.07a5.05 5.05 0 0 0 1.187 1.183l2.078-2.072v2.93c.272.046.55.07.835.07h.007c.285 0 .565-.024.836-.07v-2.93l2.078 2.072a5.098 5.098 0 0 0 1.186-1.184L50.995 5.86h2.94c.045-.272.07-.55.07-.834v-.007a5.08 5.08 0 0 0-.07-.833ZM58.85 25.53c-.84-.786-1.279-2.026-1.32-3.72h10.585c.02-.222.04-.488.06-.802.02-.312.031-.61.031-.892a9.263 9.263 0 0 0-.425-2.859c-.283-.877-.698-1.633-1.243-2.268a5.736 5.736 0 0 0-2.032-1.497c-.809-.364-1.75-.545-2.82-.545-1.254 0-2.341.217-3.261.65a6.532 6.532 0 0 0-2.29 1.755c-.606.736-1.056 1.603-1.349 2.6-.293 1-.44 2.073-.44 3.222 0 1.17.152 2.244.455 3.222a6.59 6.59 0 0 0 1.44 2.541c.657.716 1.492 1.27 2.503 1.664 1.01.393 2.223.59 3.64.59.97 0 1.854-.071 2.653-.212a10.191 10.191 0 0 0 2.198-.635 7.18 7.18 0 0 0-.181-1.286 4.54 4.54 0 0 0-.395-1.104 11.178 11.178 0 0 1-4.094.757c-1.638 0-2.876-.394-3.715-1.18ZM30.51 13.31a6.378 6.378 0 0 1 1.273-.121 7.115 7.115 0 0 1 1.274.12c.02.042.045.167.075.38.03.21.06.438.091.68.03.242.06.474.091.696.03.222.045.363.045.423.203-.323.445-.635.728-.938a4.85 4.85 0 0 1 1.016-.816 5.298 5.298 0 0 1 1.335-.575 6.016 6.016 0 0 1 1.653-.212c.91 0 1.753.152 2.532.454a5.068 5.068 0 0 1 2.001 1.406c.556.636.99 1.442 1.305 2.42.313.979.47 2.133.47 3.464 0 2.662-.723 4.744-2.169 6.246-1.446 1.503-3.492 2.254-6.141 2.254-.445 0-.9-.03-1.365-.09a8.095 8.095 0 0 1-1.213-.243v7.109a10.389 10.389 0 0 1-1.517.12c-.222 0-.47-.01-.742-.03-.273-.02-.52-.05-.743-.09V13.31Zm-6.218 5.294c0-1.19-.304-2.017-.91-2.481-.607-.463-1.486-.695-2.639-.695-.708 0-1.37.055-1.986.166-.617.111-1.219.257-1.804.438-.385-.665-.576-1.461-.576-2.39a14.015 14.015 0 0 1 2.274-.514 16.555 16.555 0 0 1 2.396-.181c2.021 0 3.558.46 4.61 1.376 1.05.918 1.576 2.385 1.576 4.401v9.71a47.6 47.6 0 0 1-2.577.5 18.55 18.55 0 0 1-3.094.256c-.99 0-1.885-.09-2.684-.272-.799-.181-1.476-.473-2.032-.877a4.061 4.061 0 0 1-1.289-1.543c-.303-.625-.454-1.38-.454-2.269 0-.866.176-1.628.53-2.283a4.77 4.77 0 0 1 1.44-1.634 6.427 6.427 0 0 1 2.093-.967 9.538 9.538 0 0 1 2.487-.318c.647 0 1.178.015 1.592.045.415.031.763.066 1.047.106v-.574Zm-23.625 9.8L8.855 15.7H1.637a7.356 7.356 0 0 1-.09-1.21c0-.424.03-.818.09-1.18h11.677l.15.393-8.248 12.735h7.734c.06.404.09.817.09 1.24 0 .404-.03.787-.09 1.15H.819l-.152-.424Zm22.472-6.987c.466.04.85.08 1.153.12v4.931a8.642 8.642 0 0 1-1.32.227 14.05 14.05 0 0 1-1.44.076c-.364 0-.748-.02-1.152-.06a2.9 2.9 0 0 1-1.107-.333 2.293 2.293 0 0 1-.834-.787c-.223-.342-.334-.817-.334-1.422 0-.947.328-1.653.986-2.117.656-.464 1.612-.696 2.866-.696.323 0 .717.02 1.182.061Zm11.555 5.172a5.87 5.87 0 0 1-1.183-.302v-6.292c0-.767.111-1.426.334-1.981.223-.555.515-1.014.88-1.377a3.58 3.58 0 0 1 1.243-.816c.464-.182.95-.273 1.455-.273 1.355 0 2.33.475 2.927 1.422.596.948.895 2.229.895 3.842 0 1.008-.127 1.88-.38 2.616-.253.736-.596 1.346-1.03 1.83a3.965 3.965 0 0 1-1.562 1.074 5.558 5.558 0 0 1-2.002.348c-.647 0-1.173-.03-1.577-.09Zm13.435-10.92h-1.972a3.793 3.793 0 0 1-.09-.56 6.432 6.432 0 0 1 0-1.24c.02-.211.05-.398.09-.56h4.914v15.52c-.223.039-.47.069-.743.09-.273.019-.521.03-.743.03-.203 0-.44-.011-.713-.03a7.367 7.367 0 0 1-.743-.09v-13.16Zm17.105 3.903a5.71 5.71 0 0 0-.227-1.62 4.113 4.113 0 0 0-.668-1.345 3.246 3.246 0 0 0-1.122-.922c-.455-.232-.996-.349-1.623-.349-1.233 0-2.178.374-2.836 1.12-.656.746-1.056 1.785-1.197 3.116h7.673Zm6.916-6.353a8.11 8.11 0 0 0-.637.09v15.519a10.308 10.308 0 0 0 1.517.12c.221 0 .47-.01.742-.03.273-.02.52-.05.743-.09v-7.714c0-1.048.117-1.905.35-2.57.231-.666.545-1.19.939-1.574a3.26 3.26 0 0 1 1.335-.801 5.33 5.33 0 0 1 1.562-.227h.409c.172 0 .338.02.5.06.04-.242.076-.494.107-.756a6.694 6.694 0 0 0 .014-1.392 4.99 4.99 0 0 0-.09-.575 4.641 4.641 0 0 0-.44-.045 8.203 8.203 0 0 0-.5-.015c-1.092 0-1.987.253-2.684.756a6.273 6.273 0 0 0-1.683 1.785c0-.343-.031-.76-.091-1.255a17.208 17.208 0 0 0-.182-1.195 5.019 5.019 0 0 0-.607-.09 7.54 7.54 0 0 0-.667-.031c-.223 0-.435.01-.637.03ZM50.034 6.084c.125-.33.194-.687.194-1.06v-.005c0-.373-.07-.73-.194-1.06a3.013 3.013 0 0 0-1.063-.193h-.004a3.03 3.03 0 0 0-1.064.193 3.03 3.03 0 0 0-.193 1.06v.005c0 .373.07.73.194 1.06.33.124.689.193 1.063.193h.005c.373 0 .732-.069 1.062-.193Z" })), Pb = ne.create(() => {
|
|
21036
21042
|
var w, x, k, y;
|
|
21037
|
-
const e = ne.useModal(), { updateRoute: t } = ye(), { zapierTemplates: r } = of(), { data: { integrations: n } = { integrations: [] } } = ol(), { config: a } = Te(), { adminRoot: o } = Ur(), { mutateAsync: i } = Ol(), c = je(), [l, A] = G(!1), u = (k = (x = (w = a.hostSettings) == null ? void 0 : w.limits) == null ? void 0 : x.customIntegrations) == null ? void 0 : k.disabled, h = n.find(({ slug: I }) => I === "zapier"),
|
|
21043
|
+
const e = ne.useModal(), { updateRoute: t } = ye(), { zapierTemplates: r } = of(), { data: { integrations: n } = { integrations: [] } } = ol(), { config: a } = Te(), { adminRoot: o } = Ur(), { mutateAsync: i } = Ol(), c = je(), [l, A] = G(!1), u = (k = (x = (w = a.hostSettings) == null ? void 0 : w.limits) == null ? void 0 : x.customIntegrations) == null ? void 0 : k.disabled, h = n.find(({ slug: I }) => I === "zapier"), m = (y = h == null ? void 0 : h.api_keys) == null ? void 0 : y.find((I) => I.type === "admin");
|
|
21038
21044
|
ie(() => {
|
|
21039
21045
|
u && t("integrations");
|
|
21040
21046
|
}, [u, t]);
|
|
21041
|
-
const
|
|
21042
|
-
!h || !
|
|
21047
|
+
const p = () => {
|
|
21048
|
+
!h || !m || (A(!1), ne.show(We, {
|
|
21043
21049
|
title: "Regenerate Admin API Key",
|
|
21044
21050
|
prompt: 'You will need to locate the Ghost App within your Zapier account and click on "Reconnect" to enter the new Admin API Key.',
|
|
21045
21051
|
okLabel: "Regenerate Admin API Key",
|
|
21046
21052
|
onOk: async (I) => {
|
|
21047
21053
|
try {
|
|
21048
|
-
await i({ integrationId: h.id, apiKeyId:
|
|
21054
|
+
await i({ integrationId: h.id, apiKeyId: m.id }), A(!0), I == null || I.remove();
|
|
21049
21055
|
} catch (C) {
|
|
21050
21056
|
c(C);
|
|
21051
21057
|
}
|
|
@@ -21093,9 +21099,9 @@ const Nk = ({ clearError: e, errors: t, offer: r, updateOffer: n }) => {
|
|
|
21093
21099
|
extra: /* @__PURE__ */ s.jsx("div", { className: "-mb-4 mt-1", children: /* @__PURE__ */ s.jsx(Cs, { keys: [
|
|
21094
21100
|
{
|
|
21095
21101
|
label: "Admin API key",
|
|
21096
|
-
text:
|
|
21102
|
+
text: m == null ? void 0 : m.secret,
|
|
21097
21103
|
hint: l ? /* @__PURE__ */ s.jsx("div", { className: "text-green", children: "Admin API Key was successfully regenerated" }) : void 0,
|
|
21098
|
-
onRegenerate:
|
|
21104
|
+
onRegenerate: p
|
|
21099
21105
|
},
|
|
21100
21106
|
{ label: "API URL", text: window.location.origin + Ur().subdir }
|
|
21101
21107
|
] }) }),
|
|
@@ -21157,4 +21163,4 @@ const Nk = ({ clearError: e, errors: t, offer: r, updateOffer: n }) => {
|
|
|
21157
21163
|
export {
|
|
21158
21164
|
Zb as default
|
|
21159
21165
|
};
|
|
21160
|
-
//# sourceMappingURL=modals-
|
|
21166
|
+
//# sourceMappingURL=modals-172c4d1c.mjs.map
|