@monetize.software/sdk-extension 3.0.0-alpha.22 → 3.0.0-alpha.24
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/dist/content.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { P as L, B as
|
|
2
|
-
import { render as
|
|
3
|
-
import { jsx as o, jsxs as u, Fragment as
|
|
4
|
-
import { useState as k, useEffect as P, useContext as
|
|
5
|
-
import { P as
|
|
6
|
-
function
|
|
1
|
+
import { P as L, B as qe, E as Ne, c as Fe, A as de, w as $e, a as Q, r as Ve, b as He } from "./chunks/chrome-port-bfTUUDz_.js";
|
|
2
|
+
import { render as ee, h as he, createContext as Ge } from "preact";
|
|
3
|
+
import { jsx as o, jsxs as u, Fragment as le } from "preact/jsx-runtime";
|
|
4
|
+
import { useState as k, useEffect as P, useContext as We, useRef as j, useMemo as Ze, useLayoutEffect as Ye } from "preact/hooks";
|
|
5
|
+
import { P as Ke } from "./chunks/port-name-ervLBWAQ.js";
|
|
6
|
+
function Xe(r) {
|
|
7
7
|
return `pw-offer-${r}-start`;
|
|
8
8
|
}
|
|
9
|
-
function
|
|
9
|
+
function Ce(r, e) {
|
|
10
10
|
if (!r || r.length === 0) return null;
|
|
11
11
|
const t = r.find(
|
|
12
12
|
(i) => i.price_id === e && (i.discount_percent ?? 0) > 0
|
|
@@ -15,13 +15,17 @@ function N(r, e) {
|
|
|
15
15
|
(i) => i.price_id == null && (i.discount_percent ?? 0) > 0
|
|
16
16
|
) ?? null);
|
|
17
17
|
}
|
|
18
|
-
function
|
|
18
|
+
function V(r, e, t = {}) {
|
|
19
|
+
const n = Ce(r, e);
|
|
20
|
+
return n && Ie(n, t) ? n : null;
|
|
21
|
+
}
|
|
22
|
+
function Ie(r, e = {}) {
|
|
19
23
|
const t = r.discount_percent ?? 0;
|
|
20
24
|
if (t <= 0) return null;
|
|
21
|
-
const n = e.now ?? Date.now(), i =
|
|
25
|
+
const n = e.now ?? Date.now(), i = Je(r, e.readStart), s = Qe(r, i), a = i !== null ? Math.max(0, i - n) : null;
|
|
22
26
|
return i !== null && i <= n ? null : { offer: r, discountPercent: t, remainingMs: a, totalMs: s, expiresAt: i };
|
|
23
27
|
}
|
|
24
|
-
function
|
|
28
|
+
function Je(r, e) {
|
|
25
29
|
if (r.expires_at) {
|
|
26
30
|
const t = Date.parse(r.expires_at);
|
|
27
31
|
return Number.isFinite(t) ? t : null;
|
|
@@ -34,25 +38,25 @@ function Xe(r, e) {
|
|
|
34
38
|
}
|
|
35
39
|
return null;
|
|
36
40
|
}
|
|
37
|
-
function
|
|
41
|
+
function Qe(r, e) {
|
|
38
42
|
return r.duration_minutes && r.duration_minutes > 0 ? r.duration_minutes * 6e4 : e !== null ? e - Date.now() : null;
|
|
39
43
|
}
|
|
40
|
-
function
|
|
44
|
+
function N(r) {
|
|
41
45
|
if (typeof window > "u") return null;
|
|
42
46
|
try {
|
|
43
|
-
return window.localStorage.getItem(
|
|
47
|
+
return window.localStorage.getItem(Xe(r));
|
|
44
48
|
} catch {
|
|
45
49
|
return null;
|
|
46
50
|
}
|
|
47
51
|
}
|
|
48
|
-
const Se = '@layer theme,base,components,utilities;@layer theme{@theme default{ --font-sans: ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"; --font-serif: ui-serif, Georgia, Cambria, "Times New Roman", Times, serif; --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace; --color-red-50: oklch(97.1% .013 17.38); --color-red-100: oklch(93.6% .032 17.717); --color-red-200: oklch(88.5% .062 18.334); --color-red-300: oklch(80.8% .114 19.571); --color-red-400: oklch(70.4% .191 22.216); --color-red-500: oklch(63.7% .237 25.331); --color-red-600: oklch(57.7% .245 27.325); --color-red-700: oklch(50.5% .213 27.518); --color-red-800: oklch(44.4% .177 26.899); --color-red-900: oklch(39.6% .141 25.723); --color-red-950: oklch(25.8% .092 26.042); --color-orange-50: oklch(98% .016 73.684); --color-orange-100: oklch(95.4% .038 75.164); --color-orange-200: oklch(90.1% .076 70.697); --color-orange-300: oklch(83.7% .128 66.29); --color-orange-400: oklch(75% .183 55.934); --color-orange-500: oklch(70.5% .213 47.604); --color-orange-600: oklch(64.6% .222 41.116); --color-orange-700: oklch(55.3% .195 38.402); --color-orange-800: oklch(47% .157 37.304); --color-orange-900: oklch(40.8% .123 38.172); --color-orange-950: oklch(26.6% .079 36.259); --color-amber-50: oklch(98.7% .022 95.277); --color-amber-100: oklch(96.2% .059 95.617); --color-amber-200: oklch(92.4% .12 95.746); --color-amber-300: oklch(87.9% .169 91.605); --color-amber-400: oklch(82.8% .189 84.429); --color-amber-500: oklch(76.9% .188 70.08); --color-amber-600: oklch(66.6% .179 58.318); --color-amber-700: oklch(55.5% .163 48.998); --color-amber-800: oklch(47.3% .137 46.201); --color-amber-900: oklch(41.4% .112 45.904); --color-amber-950: oklch(27.9% .077 45.635); --color-yellow-50: oklch(98.7% .026 102.212); --color-yellow-100: oklch(97.3% .071 103.193); --color-yellow-200: oklch(94.5% .129 101.54); --color-yellow-300: oklch(90.5% .182 98.111); --color-yellow-400: oklch(85.2% .199 91.936); --color-yellow-500: oklch(79.5% .184 86.047); --color-yellow-600: oklch(68.1% .162 75.834); --color-yellow-700: oklch(55.4% .135 66.442); --color-yellow-800: oklch(47.6% .114 61.907); --color-yellow-900: oklch(42.1% .095 57.708); --color-yellow-950: oklch(28.6% .066 53.813); --color-lime-50: oklch(98.6% .031 120.757); --color-lime-100: oklch(96.7% .067 122.328); --color-lime-200: oklch(93.8% .127 124.321); --color-lime-300: oklch(89.7% .196 126.665); --color-lime-400: oklch(84.1% .238 128.85); --color-lime-500: oklch(76.8% .233 130.85); --color-lime-600: oklch(64.8% .2 131.684); --color-lime-700: oklch(53.2% .157 131.589); --color-lime-800: oklch(45.3% .124 130.933); --color-lime-900: oklch(40.5% .101 131.063); --color-lime-950: oklch(27.4% .072 132.109); --color-green-50: oklch(98.2% .018 155.826); --color-green-100: oklch(96.2% .044 156.743); --color-green-200: oklch(92.5% .084 155.995); --color-green-300: oklch(87.1% .15 154.449); --color-green-400: oklch(79.2% .209 151.711); --color-green-500: oklch(72.3% .219 149.579); --color-green-600: oklch(62.7% .194 149.214); --color-green-700: oklch(52.7% .154 150.069); --color-green-800: oklch(44.8% .119 151.328); --color-green-900: oklch(39.3% .095 152.535); --color-green-950: oklch(26.6% .065 152.934); --color-emerald-50: oklch(97.9% .021 166.113); --color-emerald-100: oklch(95% .052 163.051); --color-emerald-200: oklch(90.5% .093 164.15); --color-emerald-300: oklch(84.5% .143 164.978); --color-emerald-400: oklch(76.5% .177 163.223); --color-emerald-500: oklch(69.6% .17 162.48); --color-emerald-600: oklch(59.6% .145 163.225); --color-emerald-700: oklch(50.8% .118 165.612); --color-emerald-800: oklch(43.2% .095 166.913); --color-emerald-900: oklch(37.8% .077 168.94); --color-emerald-950: oklch(26.2% .051 172.552); --color-teal-50: oklch(98.4% .014 180.72); --color-teal-100: oklch(95.3% .051 180.801); --color-teal-200: oklch(91% .096 180.426); --color-teal-300: oklch(85.5% .138 181.071); --color-teal-400: oklch(77.7% .152 181.912); --color-teal-500: oklch(70.4% .14 182.503); --color-teal-600: oklch(60% .118 184.704); --color-teal-700: oklch(51.1% .096 186.391); --color-teal-800: oklch(43.7% .078 188.216); --color-teal-900: oklch(38.6% .063 188.416); --color-teal-950: oklch(27.7% .046 192.524); --color-cyan-50: oklch(98.4% .019 200.873); --color-cyan-100: oklch(95.6% .045 203.388); --color-cyan-200: oklch(91.7% .08 205.041); --color-cyan-300: oklch(86.5% .127 207.078); --color-cyan-400: oklch(78.9% .154 211.53); --color-cyan-500: oklch(71.5% .143 215.221); --color-cyan-600: oklch(60.9% .126 221.723); --color-cyan-700: oklch(52% .105 223.128); --color-cyan-800: oklch(45% .085 224.283); --color-cyan-900: oklch(39.8% .07 227.392); --color-cyan-950: oklch(30.2% .056 229.695); --color-sky-50: oklch(97.7% .013 236.62); --color-sky-100: oklch(95.1% .026 236.824); --color-sky-200: oklch(90.1% .058 230.902); --color-sky-300: oklch(82.8% .111 230.318); --color-sky-400: oklch(74.6% .16 232.661); --color-sky-500: oklch(68.5% .169 237.323); --color-sky-600: oklch(58.8% .158 241.966); --color-sky-700: oklch(50% .134 242.749); --color-sky-800: oklch(44.3% .11 240.79); --color-sky-900: oklch(39.1% .09 240.876); --color-sky-950: oklch(29.3% .066 243.157); --color-blue-50: oklch(97% .014 254.604); --color-blue-100: oklch(93.2% .032 255.585); --color-blue-200: oklch(88.2% .059 254.128); --color-blue-300: oklch(80.9% .105 251.813); --color-blue-400: oklch(70.7% .165 254.624); --color-blue-500: oklch(62.3% .214 259.815); --color-blue-600: oklch(54.6% .245 262.881); --color-blue-700: oklch(48.8% .243 264.376); --color-blue-800: oklch(42.4% .199 265.638); --color-blue-900: oklch(37.9% .146 265.522); --color-blue-950: oklch(28.2% .091 267.935); --color-indigo-50: oklch(96.2% .018 272.314); --color-indigo-100: oklch(93% .034 272.788); --color-indigo-200: oklch(87% .065 274.039); --color-indigo-300: oklch(78.5% .115 274.713); --color-indigo-400: oklch(67.3% .182 276.935); --color-indigo-500: oklch(58.5% .233 277.117); --color-indigo-600: oklch(51.1% .262 276.966); --color-indigo-700: oklch(45.7% .24 277.023); --color-indigo-800: oklch(39.8% .195 277.366); --color-indigo-900: oklch(35.9% .144 278.697); --color-indigo-950: oklch(25.7% .09 281.288); --color-violet-50: oklch(96.9% .016 293.756); --color-violet-100: oklch(94.3% .029 294.588); --color-violet-200: oklch(89.4% .057 293.283); --color-violet-300: oklch(81.1% .111 293.571); --color-violet-400: oklch(70.2% .183 293.541); --color-violet-500: oklch(60.6% .25 292.717); --color-violet-600: oklch(54.1% .281 293.009); --color-violet-700: oklch(49.1% .27 292.581); --color-violet-800: oklch(43.2% .232 292.759); --color-violet-900: oklch(38% .189 293.745); --color-violet-950: oklch(28.3% .141 291.089); --color-purple-50: oklch(97.7% .014 308.299); --color-purple-100: oklch(94.6% .033 307.174); --color-purple-200: oklch(90.2% .063 306.703); --color-purple-300: oklch(82.7% .119 306.383); --color-purple-400: oklch(71.4% .203 305.504); --color-purple-500: oklch(62.7% .265 303.9); --color-purple-600: oklch(55.8% .288 302.321); --color-purple-700: oklch(49.6% .265 301.924); --color-purple-800: oklch(43.8% .218 303.724); --color-purple-900: oklch(38.1% .176 304.987); --color-purple-950: oklch(29.1% .149 302.717); --color-fuchsia-50: oklch(97.7% .017 320.058); --color-fuchsia-100: oklch(95.2% .037 318.852); --color-fuchsia-200: oklch(90.3% .076 319.62); --color-fuchsia-300: oklch(83.3% .145 321.434); --color-fuchsia-400: oklch(74% .238 322.16); --color-fuchsia-500: oklch(66.7% .295 322.15); --color-fuchsia-600: oklch(59.1% .293 322.896); --color-fuchsia-700: oklch(51.8% .253 323.949); --color-fuchsia-800: oklch(45.2% .211 324.591); --color-fuchsia-900: oklch(40.1% .17 325.612); --color-fuchsia-950: oklch(29.3% .136 325.661); --color-pink-50: oklch(97.1% .014 343.198); --color-pink-100: oklch(94.8% .028 342.258); --color-pink-200: oklch(89.9% .061 343.231); --color-pink-300: oklch(82.3% .12 346.018); --color-pink-400: oklch(71.8% .202 349.761); --color-pink-500: oklch(65.6% .241 354.308); --color-pink-600: oklch(59.2% .249 .584); --color-pink-700: oklch(52.5% .223 3.958); --color-pink-800: oklch(45.9% .187 3.815); --color-pink-900: oklch(40.8% .153 2.432); --color-pink-950: oklch(28.4% .109 3.907); --color-rose-50: oklch(96.9% .015 12.422); --color-rose-100: oklch(94.1% .03 12.58); --color-rose-200: oklch(89.2% .058 10.001); --color-rose-300: oklch(81% .117 11.638); --color-rose-400: oklch(71.2% .194 13.428); --color-rose-500: oklch(64.5% .246 16.439); --color-rose-600: oklch(58.6% .253 17.585); --color-rose-700: oklch(51.4% .222 16.935); --color-rose-800: oklch(45.5% .188 13.697); --color-rose-900: oklch(41% .159 10.272); --color-rose-950: oklch(27.1% .105 12.094); --color-slate-50: oklch(98.4% .003 247.858); --color-slate-100: oklch(96.8% .007 247.896); --color-slate-200: oklch(92.9% .013 255.508); --color-slate-300: oklch(86.9% .022 252.894); --color-slate-400: oklch(70.4% .04 256.788); --color-slate-500: oklch(55.4% .046 257.417); --color-slate-600: oklch(44.6% .043 257.281); --color-slate-700: oklch(37.2% .044 257.287); --color-slate-800: oklch(27.9% .041 260.031); --color-slate-900: oklch(20.8% .042 265.755); --color-slate-950: oklch(12.9% .042 264.695); --color-gray-50: oklch(98.5% .002 247.839); --color-gray-100: oklch(96.7% .003 264.542); --color-gray-200: oklch(92.8% .006 264.531); --color-gray-300: oklch(87.2% .01 258.338); --color-gray-400: oklch(70.7% .022 261.325); --color-gray-500: oklch(55.1% .027 264.364); --color-gray-600: oklch(44.6% .03 256.802); --color-gray-700: oklch(37.3% .034 259.733); --color-gray-800: oklch(27.8% .033 256.848); --color-gray-900: oklch(21% .034 264.665); --color-gray-950: oklch(13% .028 261.692); --color-zinc-50: oklch(98.5% 0 0); --color-zinc-100: oklch(96.7% .001 286.375); --color-zinc-200: oklch(92% .004 286.32); --color-zinc-300: oklch(87.1% .006 286.286); --color-zinc-400: oklch(70.5% .015 286.067); --color-zinc-500: oklch(55.2% .016 285.938); --color-zinc-600: oklch(44.2% .017 285.786); --color-zinc-700: oklch(37% .013 285.805); --color-zinc-800: oklch(27.4% .006 286.033); --color-zinc-900: oklch(21% .006 285.885); --color-zinc-950: oklch(14.1% .005 285.823); --color-neutral-50: oklch(98.5% 0 0); --color-neutral-100: oklch(97% 0 0); --color-neutral-200: oklch(92.2% 0 0); --color-neutral-300: oklch(87% 0 0); --color-neutral-400: oklch(70.8% 0 0); --color-neutral-500: oklch(55.6% 0 0); --color-neutral-600: oklch(43.9% 0 0); --color-neutral-700: oklch(37.1% 0 0); --color-neutral-800: oklch(26.9% 0 0); --color-neutral-900: oklch(20.5% 0 0); --color-neutral-950: oklch(14.5% 0 0); --color-stone-50: oklch(98.5% .001 106.423); --color-stone-100: oklch(97% .001 106.424); --color-stone-200: oklch(92.3% .003 48.717); --color-stone-300: oklch(86.9% .005 56.366); --color-stone-400: oklch(70.9% .01 56.259); --color-stone-500: oklch(55.3% .013 58.071); --color-stone-600: oklch(44.4% .011 73.639); --color-stone-700: oklch(37.4% .01 67.558); --color-stone-800: oklch(26.8% .007 34.298); --color-stone-900: oklch(21.6% .006 56.043); --color-stone-950: oklch(14.7% .004 49.25); --color-mauve-50: oklch(98.5% 0 0); --color-mauve-100: oklch(96% .003 325.6); --color-mauve-200: oklch(92.2% .005 325.62); --color-mauve-300: oklch(86.5% .012 325.68); --color-mauve-400: oklch(71.1% .019 323.02); --color-mauve-500: oklch(54.2% .034 322.5); --color-mauve-600: oklch(43.5% .029 321.78); --color-mauve-700: oklch(36.4% .029 323.89); --color-mauve-800: oklch(26.3% .024 320.12); --color-mauve-900: oklch(21.2% .019 322.12); --color-mauve-950: oklch(14.5% .008 326); --color-olive-50: oklch(98.8% .003 106.5); --color-olive-100: oklch(96.6% .005 106.5); --color-olive-200: oklch(93% .007 106.5); --color-olive-300: oklch(88% .011 106.6); --color-olive-400: oklch(73.7% .021 106.9); --color-olive-500: oklch(58% .031 107.3); --color-olive-600: oklch(46.6% .025 107.3); --color-olive-700: oklch(39.4% .023 107.4); --color-olive-800: oklch(28.6% .016 107.4); --color-olive-900: oklch(22.8% .013 107.4); --color-olive-950: oklch(15.3% .006 107.1); --color-mist-50: oklch(98.7% .002 197.1); --color-mist-100: oklch(96.3% .002 197.1); --color-mist-200: oklch(92.5% .005 214.3); --color-mist-300: oklch(87.2% .007 219.6); --color-mist-400: oklch(72.3% .014 214.4); --color-mist-500: oklch(56% .021 213.5); --color-mist-600: oklch(45% .017 213.2); --color-mist-700: oklch(37.8% .015 216); --color-mist-800: oklch(27.5% .011 216.9); --color-mist-900: oklch(21.8% .008 223.9); --color-mist-950: oklch(14.8% .004 228.8); --color-taupe-50: oklch(98.6% .002 67.8); --color-taupe-100: oklch(96% .002 17.2); --color-taupe-200: oklch(92.2% .005 34.3); --color-taupe-300: oklch(86.8% .007 39.5); --color-taupe-400: oklch(71.4% .014 41.2); --color-taupe-500: oklch(54.7% .021 43.1); --color-taupe-600: oklch(43.8% .017 39.3); --color-taupe-700: oklch(36.7% .016 35.7); --color-taupe-800: oklch(26.8% .011 36.5); --color-taupe-900: oklch(21.4% .009 43.1); --color-taupe-950: oklch(14.7% .004 49.3); --color-black: #000; --color-white: #fff; --spacing: .25rem; --breakpoint-sm: 40rem; --breakpoint-md: 48rem; --breakpoint-lg: 64rem; --breakpoint-xl: 80rem; --breakpoint-2xl: 96rem; --container-3xs: 16rem; --container-2xs: 18rem; --container-xs: 20rem; --container-sm: 24rem; --container-md: 28rem; --container-lg: 32rem; --container-xl: 36rem; --container-2xl: 42rem; --container-3xl: 48rem; --container-4xl: 56rem; --container-5xl: 64rem; --container-6xl: 72rem; --container-7xl: 80rem; --text-xs: .75rem; --text-xs--line-height: calc(1 / .75); --text-sm: .875rem; --text-sm--line-height: calc(1.25 / .875); --text-base: 1rem; --text-base--line-height: 1.5 ; --text-lg: 1.125rem; --text-lg--line-height: calc(1.75 / 1.125); --text-xl: 1.25rem; --text-xl--line-height: calc(1.75 / 1.25); --text-2xl: 1.5rem; --text-2xl--line-height: calc(2 / 1.5); --text-3xl: 1.875rem; --text-3xl--line-height: 1.2 ; --text-4xl: 2.25rem; --text-4xl--line-height: calc(2.5 / 2.25); --text-5xl: 3rem; --text-5xl--line-height: 1; --text-6xl: 3.75rem; --text-6xl--line-height: 1; --text-7xl: 4.5rem; --text-7xl--line-height: 1; --text-8xl: 6rem; --text-8xl--line-height: 1; --text-9xl: 8rem; --text-9xl--line-height: 1; --font-weight-thin: 100; --font-weight-extralight: 200; --font-weight-light: 300; --font-weight-normal: 400; --font-weight-medium: 500; --font-weight-semibold: 600; --font-weight-bold: 700; --font-weight-extrabold: 800; --font-weight-black: 900; --tracking-tighter: -.05em; --tracking-tight: -.025em; --tracking-normal: 0em; --tracking-wide: .025em; --tracking-wider: .05em; --tracking-widest: .1em; --leading-tight: 1.25; --leading-snug: 1.375; --leading-normal: 1.5; --leading-relaxed: 1.625; --leading-loose: 2; --radius-xs: .125rem; --radius-sm: .25rem; --radius-md: .375rem; --radius-lg: .5rem; --radius-xl: .75rem; --radius-2xl: 1rem; --radius-3xl: 1.5rem; --radius-4xl: 2rem; --shadow-2xs: 0 1px rgb(0 0 0 / .05); --shadow-xs: 0 1px 2px 0 rgb(0 0 0 / .05); --shadow-sm: 0 1px 3px 0 rgb(0 0 0 / .1), 0 1px 2px -1px rgb(0 0 0 / .1); --shadow-md: 0 4px 6px -1px rgb(0 0 0 / .1), 0 2px 4px -2px rgb(0 0 0 / .1); --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / .1), 0 4px 6px -4px rgb(0 0 0 / .1); --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / .1), 0 8px 10px -6px rgb(0 0 0 / .1); --shadow-2xl: 0 25px 50px -12px rgb(0 0 0 / .25); --inset-shadow-2xs: inset 0 1px rgb(0 0 0 / .05); --inset-shadow-xs: inset 0 1px 1px rgb(0 0 0 / .05); --inset-shadow-sm: inset 0 2px 4px rgb(0 0 0 / .05); --drop-shadow-xs: 0 1px 1px rgb(0 0 0 / .05); --drop-shadow-sm: 0 1px 2px rgb(0 0 0 / .15); --drop-shadow-md: 0 3px 3px rgb(0 0 0 / .12); --drop-shadow-lg: 0 4px 4px rgb(0 0 0 / .15); --drop-shadow-xl: 0 9px 7px rgb(0 0 0 / .1); --drop-shadow-2xl: 0 25px 25px rgb(0 0 0 / .15); --text-shadow-2xs: 0px 1px 0px rgb(0 0 0 / .15); --text-shadow-xs: 0px 1px 1px rgb(0 0 0 / .2); --text-shadow-sm: 0px 1px 0px rgb(0 0 0 / .075), 0px 1px 1px rgb(0 0 0 / .075), 0px 2px 2px rgb(0 0 0 / .075); --text-shadow-md: 0px 1px 1px rgb(0 0 0 / .1), 0px 1px 2px rgb(0 0 0 / .1), 0px 2px 4px rgb(0 0 0 / .1); --text-shadow-lg: 0px 1px 2px rgb(0 0 0 / .1), 0px 3px 2px rgb(0 0 0 / .1), 0px 4px 8px rgb(0 0 0 / .1); --ease-in: cubic-bezier(.4, 0, 1, 1); --ease-out: cubic-bezier(0, 0, .2, 1); --ease-in-out: cubic-bezier(.4, 0, .2, 1); --animate-spin: spin 1s linear infinite; --animate-ping: ping 1s cubic-bezier(0, 0, .2, 1) infinite; --animate-pulse: pulse 2s cubic-bezier(.4, 0, .6, 1) infinite; --animate-bounce: bounce 1s infinite; @keyframes spin { to { transform: rotate(360deg); } } @keyframes ping { 75%, 100% { transform: scale(2); opacity: 0; } } @keyframes pulse { 50% { opacity: .5; } } @keyframes bounce { 0%, 100% { transform: translateY(-25%); animation-timing-function: cubic-bezier(.8, 0, 1, 1); } 50% { transform: none; animation-timing-function: cubic-bezier(0, 0, .2, 1); } } --blur-xs: 4px; --blur-sm: 8px; --blur-md: 12px; --blur-lg: 16px; --blur-xl: 24px; --blur-2xl: 40px; --blur-3xl: 64px; --perspective-dramatic: 100px; --perspective-near: 300px; --perspective-normal: 500px; --perspective-midrange: 800px; --perspective-distant: 1200px; --aspect-video: 16 / 9; --default-transition-duration: .15s; --default-transition-timing-function: cubic-bezier(.4, 0, .2, 1); --default-font-family: --theme(--font-sans, initial); --default-font-feature-settings: --theme( --font-sans--font-feature-settings, initial ); --default-font-variation-settings: --theme( --font-sans--font-variation-settings, initial ); --default-mono-font-family: --theme(--font-mono, initial); --default-mono-font-feature-settings: --theme( --font-mono--font-feature-settings, initial ); --default-mono-font-variation-settings: --theme( --font-mono--font-variation-settings, initial ); }@theme default inline reference{ --blur: 8px; --shadow: 0 1px 3px 0 rgb(0 0 0 / .1), 0 1px 2px -1px rgb(0 0 0 / .1); --shadow-inner: inset 0 2px 4px 0 rgb(0 0 0 / .05); --drop-shadow: 0 1px 2px rgb(0 0 0 / .1), 0 1px 1px rgb(0 0 0 / .06); --radius: .25rem; --max-width-prose: 65ch; }}@layer base{*,:after,:before,::backdrop,::file-selector-button{box-sizing:border-box;margin:0;padding:0;border:0 solid}html,:host{line-height:1.5;-webkit-text-size-adjust:100%;tab-size:4;font-family:--theme(--default-font-family,ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji");font-feature-settings:--theme(--default-font-feature-settings,normal);font-variation-settings:--theme(--default-font-variation-settings,normal);-webkit-tap-highlight-color:transparent}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:--theme(--default-mono-font-family,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace);font-feature-settings:--theme(--default-mono-font-feature-settings,normal);font-variation-settings:--theme(--default-mono-font-variation-settings,normal);font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}:-moz-focusring{outline:auto}progress{vertical-align:baseline}summary{display:list-item}ol,ul,menu{list-style:none}img,svg,video,canvas,audio,iframe,embed,object{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}button,input,select,optgroup,textarea,::file-selector-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;border-radius:0;background-color:transparent;opacity:1}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::file-selector-button{margin-inline-end:4px}::placeholder{opacity:1}@supports (not (-webkit-appearance: -apple-pay-button)) or (contain-intrinsic-size: 1px){::placeholder{color:color-mix(in oklab,currentcolor 50%,transparent)}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit,::-webkit-datetime-edit-year-field,::-webkit-datetime-edit-month-field,::-webkit-datetime-edit-day-field,::-webkit-datetime-edit-hour-field,::-webkit-datetime-edit-minute-field,::-webkit-datetime-edit-second-field,::-webkit-datetime-edit-millisecond-field,::-webkit-datetime-edit-meridiem-field{padding-block:0}::-webkit-calendar-picker-indicator{line-height:1}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]),::file-selector-button{appearance:button}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}}@layer utilities{@tailwind utilities;}@source "../**/*.{ts,tsx,js,jsx}";@layer base{:host{all:initial;color-scheme:light;font-family:ui-sans-serif,system-ui,-apple-system,Segoe UI,Roboto,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-rendering:optimizeLegibility}*,*:before,*:after{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}*,*:before,*:after{box-sizing:border-box}button{font-family:inherit;cursor:pointer}button:disabled{cursor:not-allowed}[role=button],[role=radio]{cursor:pointer}}.pw-cta-shimmer:before{content:"";position:absolute;top:0;left:-100%;width:100%;height:100%;background:linear-gradient(90deg,transparent,rgba(255,255,255,.35) 50%,transparent);animation:pw-cta-shimmer 3s infinite;z-index:1}@keyframes pw-cta-shimmer{0%{left:-100%}to{left:100%}}';
|
|
49
|
-
let
|
|
52
|
+
const Ae = '@layer theme,base,components,utilities;@layer theme{@theme default{ --font-sans: ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"; --font-serif: ui-serif, Georgia, Cambria, "Times New Roman", Times, serif; --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace; --color-red-50: oklch(97.1% .013 17.38); --color-red-100: oklch(93.6% .032 17.717); --color-red-200: oklch(88.5% .062 18.334); --color-red-300: oklch(80.8% .114 19.571); --color-red-400: oklch(70.4% .191 22.216); --color-red-500: oklch(63.7% .237 25.331); --color-red-600: oklch(57.7% .245 27.325); --color-red-700: oklch(50.5% .213 27.518); --color-red-800: oklch(44.4% .177 26.899); --color-red-900: oklch(39.6% .141 25.723); --color-red-950: oklch(25.8% .092 26.042); --color-orange-50: oklch(98% .016 73.684); --color-orange-100: oklch(95.4% .038 75.164); --color-orange-200: oklch(90.1% .076 70.697); --color-orange-300: oklch(83.7% .128 66.29); --color-orange-400: oklch(75% .183 55.934); --color-orange-500: oklch(70.5% .213 47.604); --color-orange-600: oklch(64.6% .222 41.116); --color-orange-700: oklch(55.3% .195 38.402); --color-orange-800: oklch(47% .157 37.304); --color-orange-900: oklch(40.8% .123 38.172); --color-orange-950: oklch(26.6% .079 36.259); --color-amber-50: oklch(98.7% .022 95.277); --color-amber-100: oklch(96.2% .059 95.617); --color-amber-200: oklch(92.4% .12 95.746); --color-amber-300: oklch(87.9% .169 91.605); --color-amber-400: oklch(82.8% .189 84.429); --color-amber-500: oklch(76.9% .188 70.08); --color-amber-600: oklch(66.6% .179 58.318); --color-amber-700: oklch(55.5% .163 48.998); --color-amber-800: oklch(47.3% .137 46.201); --color-amber-900: oklch(41.4% .112 45.904); --color-amber-950: oklch(27.9% .077 45.635); --color-yellow-50: oklch(98.7% .026 102.212); --color-yellow-100: oklch(97.3% .071 103.193); --color-yellow-200: oklch(94.5% .129 101.54); --color-yellow-300: oklch(90.5% .182 98.111); --color-yellow-400: oklch(85.2% .199 91.936); --color-yellow-500: oklch(79.5% .184 86.047); --color-yellow-600: oklch(68.1% .162 75.834); --color-yellow-700: oklch(55.4% .135 66.442); --color-yellow-800: oklch(47.6% .114 61.907); --color-yellow-900: oklch(42.1% .095 57.708); --color-yellow-950: oklch(28.6% .066 53.813); --color-lime-50: oklch(98.6% .031 120.757); --color-lime-100: oklch(96.7% .067 122.328); --color-lime-200: oklch(93.8% .127 124.321); --color-lime-300: oklch(89.7% .196 126.665); --color-lime-400: oklch(84.1% .238 128.85); --color-lime-500: oklch(76.8% .233 130.85); --color-lime-600: oklch(64.8% .2 131.684); --color-lime-700: oklch(53.2% .157 131.589); --color-lime-800: oklch(45.3% .124 130.933); --color-lime-900: oklch(40.5% .101 131.063); --color-lime-950: oklch(27.4% .072 132.109); --color-green-50: oklch(98.2% .018 155.826); --color-green-100: oklch(96.2% .044 156.743); --color-green-200: oklch(92.5% .084 155.995); --color-green-300: oklch(87.1% .15 154.449); --color-green-400: oklch(79.2% .209 151.711); --color-green-500: oklch(72.3% .219 149.579); --color-green-600: oklch(62.7% .194 149.214); --color-green-700: oklch(52.7% .154 150.069); --color-green-800: oklch(44.8% .119 151.328); --color-green-900: oklch(39.3% .095 152.535); --color-green-950: oklch(26.6% .065 152.934); --color-emerald-50: oklch(97.9% .021 166.113); --color-emerald-100: oklch(95% .052 163.051); --color-emerald-200: oklch(90.5% .093 164.15); --color-emerald-300: oklch(84.5% .143 164.978); --color-emerald-400: oklch(76.5% .177 163.223); --color-emerald-500: oklch(69.6% .17 162.48); --color-emerald-600: oklch(59.6% .145 163.225); --color-emerald-700: oklch(50.8% .118 165.612); --color-emerald-800: oklch(43.2% .095 166.913); --color-emerald-900: oklch(37.8% .077 168.94); --color-emerald-950: oklch(26.2% .051 172.552); --color-teal-50: oklch(98.4% .014 180.72); --color-teal-100: oklch(95.3% .051 180.801); --color-teal-200: oklch(91% .096 180.426); --color-teal-300: oklch(85.5% .138 181.071); --color-teal-400: oklch(77.7% .152 181.912); --color-teal-500: oklch(70.4% .14 182.503); --color-teal-600: oklch(60% .118 184.704); --color-teal-700: oklch(51.1% .096 186.391); --color-teal-800: oklch(43.7% .078 188.216); --color-teal-900: oklch(38.6% .063 188.416); --color-teal-950: oklch(27.7% .046 192.524); --color-cyan-50: oklch(98.4% .019 200.873); --color-cyan-100: oklch(95.6% .045 203.388); --color-cyan-200: oklch(91.7% .08 205.041); --color-cyan-300: oklch(86.5% .127 207.078); --color-cyan-400: oklch(78.9% .154 211.53); --color-cyan-500: oklch(71.5% .143 215.221); --color-cyan-600: oklch(60.9% .126 221.723); --color-cyan-700: oklch(52% .105 223.128); --color-cyan-800: oklch(45% .085 224.283); --color-cyan-900: oklch(39.8% .07 227.392); --color-cyan-950: oklch(30.2% .056 229.695); --color-sky-50: oklch(97.7% .013 236.62); --color-sky-100: oklch(95.1% .026 236.824); --color-sky-200: oklch(90.1% .058 230.902); --color-sky-300: oklch(82.8% .111 230.318); --color-sky-400: oklch(74.6% .16 232.661); --color-sky-500: oklch(68.5% .169 237.323); --color-sky-600: oklch(58.8% .158 241.966); --color-sky-700: oklch(50% .134 242.749); --color-sky-800: oklch(44.3% .11 240.79); --color-sky-900: oklch(39.1% .09 240.876); --color-sky-950: oklch(29.3% .066 243.157); --color-blue-50: oklch(97% .014 254.604); --color-blue-100: oklch(93.2% .032 255.585); --color-blue-200: oklch(88.2% .059 254.128); --color-blue-300: oklch(80.9% .105 251.813); --color-blue-400: oklch(70.7% .165 254.624); --color-blue-500: oklch(62.3% .214 259.815); --color-blue-600: oklch(54.6% .245 262.881); --color-blue-700: oklch(48.8% .243 264.376); --color-blue-800: oklch(42.4% .199 265.638); --color-blue-900: oklch(37.9% .146 265.522); --color-blue-950: oklch(28.2% .091 267.935); --color-indigo-50: oklch(96.2% .018 272.314); --color-indigo-100: oklch(93% .034 272.788); --color-indigo-200: oklch(87% .065 274.039); --color-indigo-300: oklch(78.5% .115 274.713); --color-indigo-400: oklch(67.3% .182 276.935); --color-indigo-500: oklch(58.5% .233 277.117); --color-indigo-600: oklch(51.1% .262 276.966); --color-indigo-700: oklch(45.7% .24 277.023); --color-indigo-800: oklch(39.8% .195 277.366); --color-indigo-900: oklch(35.9% .144 278.697); --color-indigo-950: oklch(25.7% .09 281.288); --color-violet-50: oklch(96.9% .016 293.756); --color-violet-100: oklch(94.3% .029 294.588); --color-violet-200: oklch(89.4% .057 293.283); --color-violet-300: oklch(81.1% .111 293.571); --color-violet-400: oklch(70.2% .183 293.541); --color-violet-500: oklch(60.6% .25 292.717); --color-violet-600: oklch(54.1% .281 293.009); --color-violet-700: oklch(49.1% .27 292.581); --color-violet-800: oklch(43.2% .232 292.759); --color-violet-900: oklch(38% .189 293.745); --color-violet-950: oklch(28.3% .141 291.089); --color-purple-50: oklch(97.7% .014 308.299); --color-purple-100: oklch(94.6% .033 307.174); --color-purple-200: oklch(90.2% .063 306.703); --color-purple-300: oklch(82.7% .119 306.383); --color-purple-400: oklch(71.4% .203 305.504); --color-purple-500: oklch(62.7% .265 303.9); --color-purple-600: oklch(55.8% .288 302.321); --color-purple-700: oklch(49.6% .265 301.924); --color-purple-800: oklch(43.8% .218 303.724); --color-purple-900: oklch(38.1% .176 304.987); --color-purple-950: oklch(29.1% .149 302.717); --color-fuchsia-50: oklch(97.7% .017 320.058); --color-fuchsia-100: oklch(95.2% .037 318.852); --color-fuchsia-200: oklch(90.3% .076 319.62); --color-fuchsia-300: oklch(83.3% .145 321.434); --color-fuchsia-400: oklch(74% .238 322.16); --color-fuchsia-500: oklch(66.7% .295 322.15); --color-fuchsia-600: oklch(59.1% .293 322.896); --color-fuchsia-700: oklch(51.8% .253 323.949); --color-fuchsia-800: oklch(45.2% .211 324.591); --color-fuchsia-900: oklch(40.1% .17 325.612); --color-fuchsia-950: oklch(29.3% .136 325.661); --color-pink-50: oklch(97.1% .014 343.198); --color-pink-100: oklch(94.8% .028 342.258); --color-pink-200: oklch(89.9% .061 343.231); --color-pink-300: oklch(82.3% .12 346.018); --color-pink-400: oklch(71.8% .202 349.761); --color-pink-500: oklch(65.6% .241 354.308); --color-pink-600: oklch(59.2% .249 .584); --color-pink-700: oklch(52.5% .223 3.958); --color-pink-800: oklch(45.9% .187 3.815); --color-pink-900: oklch(40.8% .153 2.432); --color-pink-950: oklch(28.4% .109 3.907); --color-rose-50: oklch(96.9% .015 12.422); --color-rose-100: oklch(94.1% .03 12.58); --color-rose-200: oklch(89.2% .058 10.001); --color-rose-300: oklch(81% .117 11.638); --color-rose-400: oklch(71.2% .194 13.428); --color-rose-500: oklch(64.5% .246 16.439); --color-rose-600: oklch(58.6% .253 17.585); --color-rose-700: oklch(51.4% .222 16.935); --color-rose-800: oklch(45.5% .188 13.697); --color-rose-900: oklch(41% .159 10.272); --color-rose-950: oklch(27.1% .105 12.094); --color-slate-50: oklch(98.4% .003 247.858); --color-slate-100: oklch(96.8% .007 247.896); --color-slate-200: oklch(92.9% .013 255.508); --color-slate-300: oklch(86.9% .022 252.894); --color-slate-400: oklch(70.4% .04 256.788); --color-slate-500: oklch(55.4% .046 257.417); --color-slate-600: oklch(44.6% .043 257.281); --color-slate-700: oklch(37.2% .044 257.287); --color-slate-800: oklch(27.9% .041 260.031); --color-slate-900: oklch(20.8% .042 265.755); --color-slate-950: oklch(12.9% .042 264.695); --color-gray-50: oklch(98.5% .002 247.839); --color-gray-100: oklch(96.7% .003 264.542); --color-gray-200: oklch(92.8% .006 264.531); --color-gray-300: oklch(87.2% .01 258.338); --color-gray-400: oklch(70.7% .022 261.325); --color-gray-500: oklch(55.1% .027 264.364); --color-gray-600: oklch(44.6% .03 256.802); --color-gray-700: oklch(37.3% .034 259.733); --color-gray-800: oklch(27.8% .033 256.848); --color-gray-900: oklch(21% .034 264.665); --color-gray-950: oklch(13% .028 261.692); --color-zinc-50: oklch(98.5% 0 0); --color-zinc-100: oklch(96.7% .001 286.375); --color-zinc-200: oklch(92% .004 286.32); --color-zinc-300: oklch(87.1% .006 286.286); --color-zinc-400: oklch(70.5% .015 286.067); --color-zinc-500: oklch(55.2% .016 285.938); --color-zinc-600: oklch(44.2% .017 285.786); --color-zinc-700: oklch(37% .013 285.805); --color-zinc-800: oklch(27.4% .006 286.033); --color-zinc-900: oklch(21% .006 285.885); --color-zinc-950: oklch(14.1% .005 285.823); --color-neutral-50: oklch(98.5% 0 0); --color-neutral-100: oklch(97% 0 0); --color-neutral-200: oklch(92.2% 0 0); --color-neutral-300: oklch(87% 0 0); --color-neutral-400: oklch(70.8% 0 0); --color-neutral-500: oklch(55.6% 0 0); --color-neutral-600: oklch(43.9% 0 0); --color-neutral-700: oklch(37.1% 0 0); --color-neutral-800: oklch(26.9% 0 0); --color-neutral-900: oklch(20.5% 0 0); --color-neutral-950: oklch(14.5% 0 0); --color-stone-50: oklch(98.5% .001 106.423); --color-stone-100: oklch(97% .001 106.424); --color-stone-200: oklch(92.3% .003 48.717); --color-stone-300: oklch(86.9% .005 56.366); --color-stone-400: oklch(70.9% .01 56.259); --color-stone-500: oklch(55.3% .013 58.071); --color-stone-600: oklch(44.4% .011 73.639); --color-stone-700: oklch(37.4% .01 67.558); --color-stone-800: oklch(26.8% .007 34.298); --color-stone-900: oklch(21.6% .006 56.043); --color-stone-950: oklch(14.7% .004 49.25); --color-mauve-50: oklch(98.5% 0 0); --color-mauve-100: oklch(96% .003 325.6); --color-mauve-200: oklch(92.2% .005 325.62); --color-mauve-300: oklch(86.5% .012 325.68); --color-mauve-400: oklch(71.1% .019 323.02); --color-mauve-500: oklch(54.2% .034 322.5); --color-mauve-600: oklch(43.5% .029 321.78); --color-mauve-700: oklch(36.4% .029 323.89); --color-mauve-800: oklch(26.3% .024 320.12); --color-mauve-900: oklch(21.2% .019 322.12); --color-mauve-950: oklch(14.5% .008 326); --color-olive-50: oklch(98.8% .003 106.5); --color-olive-100: oklch(96.6% .005 106.5); --color-olive-200: oklch(93% .007 106.5); --color-olive-300: oklch(88% .011 106.6); --color-olive-400: oklch(73.7% .021 106.9); --color-olive-500: oklch(58% .031 107.3); --color-olive-600: oklch(46.6% .025 107.3); --color-olive-700: oklch(39.4% .023 107.4); --color-olive-800: oklch(28.6% .016 107.4); --color-olive-900: oklch(22.8% .013 107.4); --color-olive-950: oklch(15.3% .006 107.1); --color-mist-50: oklch(98.7% .002 197.1); --color-mist-100: oklch(96.3% .002 197.1); --color-mist-200: oklch(92.5% .005 214.3); --color-mist-300: oklch(87.2% .007 219.6); --color-mist-400: oklch(72.3% .014 214.4); --color-mist-500: oklch(56% .021 213.5); --color-mist-600: oklch(45% .017 213.2); --color-mist-700: oklch(37.8% .015 216); --color-mist-800: oklch(27.5% .011 216.9); --color-mist-900: oklch(21.8% .008 223.9); --color-mist-950: oklch(14.8% .004 228.8); --color-taupe-50: oklch(98.6% .002 67.8); --color-taupe-100: oklch(96% .002 17.2); --color-taupe-200: oklch(92.2% .005 34.3); --color-taupe-300: oklch(86.8% .007 39.5); --color-taupe-400: oklch(71.4% .014 41.2); --color-taupe-500: oklch(54.7% .021 43.1); --color-taupe-600: oklch(43.8% .017 39.3); --color-taupe-700: oklch(36.7% .016 35.7); --color-taupe-800: oklch(26.8% .011 36.5); --color-taupe-900: oklch(21.4% .009 43.1); --color-taupe-950: oklch(14.7% .004 49.3); --color-black: #000; --color-white: #fff; --spacing: .25rem; --breakpoint-sm: 40rem; --breakpoint-md: 48rem; --breakpoint-lg: 64rem; --breakpoint-xl: 80rem; --breakpoint-2xl: 96rem; --container-3xs: 16rem; --container-2xs: 18rem; --container-xs: 20rem; --container-sm: 24rem; --container-md: 28rem; --container-lg: 32rem; --container-xl: 36rem; --container-2xl: 42rem; --container-3xl: 48rem; --container-4xl: 56rem; --container-5xl: 64rem; --container-6xl: 72rem; --container-7xl: 80rem; --text-xs: .75rem; --text-xs--line-height: calc(1 / .75); --text-sm: .875rem; --text-sm--line-height: calc(1.25 / .875); --text-base: 1rem; --text-base--line-height: 1.5 ; --text-lg: 1.125rem; --text-lg--line-height: calc(1.75 / 1.125); --text-xl: 1.25rem; --text-xl--line-height: calc(1.75 / 1.25); --text-2xl: 1.5rem; --text-2xl--line-height: calc(2 / 1.5); --text-3xl: 1.875rem; --text-3xl--line-height: 1.2 ; --text-4xl: 2.25rem; --text-4xl--line-height: calc(2.5 / 2.25); --text-5xl: 3rem; --text-5xl--line-height: 1; --text-6xl: 3.75rem; --text-6xl--line-height: 1; --text-7xl: 4.5rem; --text-7xl--line-height: 1; --text-8xl: 6rem; --text-8xl--line-height: 1; --text-9xl: 8rem; --text-9xl--line-height: 1; --font-weight-thin: 100; --font-weight-extralight: 200; --font-weight-light: 300; --font-weight-normal: 400; --font-weight-medium: 500; --font-weight-semibold: 600; --font-weight-bold: 700; --font-weight-extrabold: 800; --font-weight-black: 900; --tracking-tighter: -.05em; --tracking-tight: -.025em; --tracking-normal: 0em; --tracking-wide: .025em; --tracking-wider: .05em; --tracking-widest: .1em; --leading-tight: 1.25; --leading-snug: 1.375; --leading-normal: 1.5; --leading-relaxed: 1.625; --leading-loose: 2; --radius-xs: .125rem; --radius-sm: .25rem; --radius-md: .375rem; --radius-lg: .5rem; --radius-xl: .75rem; --radius-2xl: 1rem; --radius-3xl: 1.5rem; --radius-4xl: 2rem; --shadow-2xs: 0 1px rgb(0 0 0 / .05); --shadow-xs: 0 1px 2px 0 rgb(0 0 0 / .05); --shadow-sm: 0 1px 3px 0 rgb(0 0 0 / .1), 0 1px 2px -1px rgb(0 0 0 / .1); --shadow-md: 0 4px 6px -1px rgb(0 0 0 / .1), 0 2px 4px -2px rgb(0 0 0 / .1); --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / .1), 0 4px 6px -4px rgb(0 0 0 / .1); --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / .1), 0 8px 10px -6px rgb(0 0 0 / .1); --shadow-2xl: 0 25px 50px -12px rgb(0 0 0 / .25); --inset-shadow-2xs: inset 0 1px rgb(0 0 0 / .05); --inset-shadow-xs: inset 0 1px 1px rgb(0 0 0 / .05); --inset-shadow-sm: inset 0 2px 4px rgb(0 0 0 / .05); --drop-shadow-xs: 0 1px 1px rgb(0 0 0 / .05); --drop-shadow-sm: 0 1px 2px rgb(0 0 0 / .15); --drop-shadow-md: 0 3px 3px rgb(0 0 0 / .12); --drop-shadow-lg: 0 4px 4px rgb(0 0 0 / .15); --drop-shadow-xl: 0 9px 7px rgb(0 0 0 / .1); --drop-shadow-2xl: 0 25px 25px rgb(0 0 0 / .15); --text-shadow-2xs: 0px 1px 0px rgb(0 0 0 / .15); --text-shadow-xs: 0px 1px 1px rgb(0 0 0 / .2); --text-shadow-sm: 0px 1px 0px rgb(0 0 0 / .075), 0px 1px 1px rgb(0 0 0 / .075), 0px 2px 2px rgb(0 0 0 / .075); --text-shadow-md: 0px 1px 1px rgb(0 0 0 / .1), 0px 1px 2px rgb(0 0 0 / .1), 0px 2px 4px rgb(0 0 0 / .1); --text-shadow-lg: 0px 1px 2px rgb(0 0 0 / .1), 0px 3px 2px rgb(0 0 0 / .1), 0px 4px 8px rgb(0 0 0 / .1); --ease-in: cubic-bezier(.4, 0, 1, 1); --ease-out: cubic-bezier(0, 0, .2, 1); --ease-in-out: cubic-bezier(.4, 0, .2, 1); --animate-spin: spin 1s linear infinite; --animate-ping: ping 1s cubic-bezier(0, 0, .2, 1) infinite; --animate-pulse: pulse 2s cubic-bezier(.4, 0, .6, 1) infinite; --animate-bounce: bounce 1s infinite; @keyframes spin { to { transform: rotate(360deg); } } @keyframes ping { 75%, 100% { transform: scale(2); opacity: 0; } } @keyframes pulse { 50% { opacity: .5; } } @keyframes bounce { 0%, 100% { transform: translateY(-25%); animation-timing-function: cubic-bezier(.8, 0, 1, 1); } 50% { transform: none; animation-timing-function: cubic-bezier(0, 0, .2, 1); } } --blur-xs: 4px; --blur-sm: 8px; --blur-md: 12px; --blur-lg: 16px; --blur-xl: 24px; --blur-2xl: 40px; --blur-3xl: 64px; --perspective-dramatic: 100px; --perspective-near: 300px; --perspective-normal: 500px; --perspective-midrange: 800px; --perspective-distant: 1200px; --aspect-video: 16 / 9; --default-transition-duration: .15s; --default-transition-timing-function: cubic-bezier(.4, 0, .2, 1); --default-font-family: --theme(--font-sans, initial); --default-font-feature-settings: --theme( --font-sans--font-feature-settings, initial ); --default-font-variation-settings: --theme( --font-sans--font-variation-settings, initial ); --default-mono-font-family: --theme(--font-mono, initial); --default-mono-font-feature-settings: --theme( --font-mono--font-feature-settings, initial ); --default-mono-font-variation-settings: --theme( --font-mono--font-variation-settings, initial ); }@theme default inline reference{ --blur: 8px; --shadow: 0 1px 3px 0 rgb(0 0 0 / .1), 0 1px 2px -1px rgb(0 0 0 / .1); --shadow-inner: inset 0 2px 4px 0 rgb(0 0 0 / .05); --drop-shadow: 0 1px 2px rgb(0 0 0 / .1), 0 1px 1px rgb(0 0 0 / .06); --radius: .25rem; --max-width-prose: 65ch; }}@layer base{*,:after,:before,::backdrop,::file-selector-button{box-sizing:border-box;margin:0;padding:0;border:0 solid}html,:host{line-height:1.5;-webkit-text-size-adjust:100%;tab-size:4;font-family:--theme(--default-font-family,ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji");font-feature-settings:--theme(--default-font-feature-settings,normal);font-variation-settings:--theme(--default-font-variation-settings,normal);-webkit-tap-highlight-color:transparent}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:--theme(--default-mono-font-family,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace);font-feature-settings:--theme(--default-mono-font-feature-settings,normal);font-variation-settings:--theme(--default-mono-font-variation-settings,normal);font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}:-moz-focusring{outline:auto}progress{vertical-align:baseline}summary{display:list-item}ol,ul,menu{list-style:none}img,svg,video,canvas,audio,iframe,embed,object{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}button,input,select,optgroup,textarea,::file-selector-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;border-radius:0;background-color:transparent;opacity:1}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::file-selector-button{margin-inline-end:4px}::placeholder{opacity:1}@supports (not (-webkit-appearance: -apple-pay-button)) or (contain-intrinsic-size: 1px){::placeholder{color:color-mix(in oklab,currentcolor 50%,transparent)}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit,::-webkit-datetime-edit-year-field,::-webkit-datetime-edit-month-field,::-webkit-datetime-edit-day-field,::-webkit-datetime-edit-hour-field,::-webkit-datetime-edit-minute-field,::-webkit-datetime-edit-second-field,::-webkit-datetime-edit-millisecond-field,::-webkit-datetime-edit-meridiem-field{padding-block:0}::-webkit-calendar-picker-indicator{line-height:1}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]),::file-selector-button{appearance:button}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}}@layer utilities{@tailwind utilities;}@source "../**/*.{ts,tsx,js,jsx}";@layer base{:host{all:initial;color-scheme:light;font-family:ui-sans-serif,system-ui,-apple-system,Segoe UI,Roboto,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-rendering:optimizeLegibility}*,*:before,*:after{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}*,*:before,*:after{box-sizing:border-box}button{font-family:inherit;cursor:pointer}button:disabled{cursor:not-allowed}[role=button],[role=radio]{cursor:pointer}}.pw-cta-shimmer:before{content:"";position:absolute;top:0;left:-100%;width:100%;height:100%;background:linear-gradient(90deg,transparent,rgba(255,255,255,.35) 50%,transparent);animation:pw-cta-shimmer 3s infinite;z-index:1}@keyframes pw-cta-shimmer{0%{left:-100%}to{left:100%}}';
|
|
53
|
+
let pe = !1;
|
|
50
54
|
function et() {
|
|
51
|
-
if (
|
|
55
|
+
if (pe || (pe = !0, typeof CSS > "u" || typeof CSS.registerProperty != "function")) return;
|
|
52
56
|
let r;
|
|
53
57
|
try {
|
|
54
58
|
const e = new CSSStyleSheet();
|
|
55
|
-
e.replaceSync(
|
|
59
|
+
e.replaceSync(Ae), r = e.cssRules;
|
|
56
60
|
} catch {
|
|
57
61
|
return;
|
|
58
62
|
}
|
|
@@ -95,17 +99,17 @@ function tt(r, e, t = {}) {
|
|
|
95
99
|
visibility: visible !important;
|
|
96
100
|
}
|
|
97
101
|
`, a = document.createElement("style");
|
|
98
|
-
a.textContent = s +
|
|
102
|
+
a.textContent = s + Ae + (t.injectCss ?? ""), i.appendChild(a);
|
|
99
103
|
const l = document.createElement("div");
|
|
100
104
|
l.style.pointerEvents = "auto", i.appendChild(l);
|
|
101
105
|
let c = e;
|
|
102
|
-
return
|
|
106
|
+
return ee(he(r, c), l), {
|
|
103
107
|
shadowRoot: i,
|
|
104
108
|
update(h) {
|
|
105
|
-
c = { ...c, ...h },
|
|
109
|
+
c = { ...c, ...h }, ee(he(r, c), l);
|
|
106
110
|
},
|
|
107
111
|
unmount() {
|
|
108
|
-
|
|
112
|
+
ee(null, l), n.remove();
|
|
109
113
|
}
|
|
110
114
|
};
|
|
111
115
|
}
|
|
@@ -149,16 +153,16 @@ const rt = (r, e, t) => {
|
|
|
149
153
|
"th",
|
|
150
154
|
"vi",
|
|
151
155
|
"he"
|
|
152
|
-
],
|
|
153
|
-
function
|
|
156
|
+
], Le = (r, e, t) => Ee(e, t), Me = Ge({ t: Le, locale: "en" });
|
|
157
|
+
function Ee(r, e) {
|
|
154
158
|
if (!e) return r;
|
|
155
159
|
let t = r;
|
|
156
160
|
for (const [n, i] of Object.entries(e))
|
|
157
161
|
t = t.split(`{${n}}`).join(String(i));
|
|
158
162
|
return t;
|
|
159
163
|
}
|
|
160
|
-
const
|
|
161
|
-
function
|
|
164
|
+
const te = /* @__PURE__ */ new Map(), re = /* @__PURE__ */ new Map();
|
|
165
|
+
function Te(r) {
|
|
162
166
|
return nt.includes(r);
|
|
163
167
|
}
|
|
164
168
|
function it(r) {
|
|
@@ -175,33 +179,33 @@ function it(r) {
|
|
|
175
179
|
n && n !== t && e.push(n);
|
|
176
180
|
}
|
|
177
181
|
for (const n of e)
|
|
178
|
-
if (
|
|
182
|
+
if (Te(n)) return n;
|
|
179
183
|
return null;
|
|
180
184
|
}
|
|
181
185
|
function ot(r, e) {
|
|
182
186
|
return !!r.locales && r.locales[e] !== void 0;
|
|
183
187
|
}
|
|
184
188
|
async function st(r) {
|
|
185
|
-
const e =
|
|
189
|
+
const e = te.get(r);
|
|
186
190
|
if (e) return e;
|
|
187
|
-
const t =
|
|
191
|
+
const t = re.get(r);
|
|
188
192
|
if (t) return t;
|
|
189
193
|
const n = rt(/* @__PURE__ */ Object.assign({ "./locales/ar.ts": () => import("./chunks/ar-rSKgwKvp.js"), "./locales/cs.ts": () => import("./chunks/cs-DIWkcge_.js"), "./locales/da.ts": () => import("./chunks/da-DdMW98j3.js"), "./locales/de.ts": () => import("./chunks/de-D1bSmD_-.js"), "./locales/el.ts": () => import("./chunks/el-C4LtWpfP.js"), "./locales/es.ts": () => import("./chunks/es-Bhx7w85J.js"), "./locales/fi.ts": () => import("./chunks/fi-C34Oc6rg.js"), "./locales/fr.ts": () => import("./chunks/fr-BrWtqej3.js"), "./locales/he.ts": () => import("./chunks/he-Byr2r07x.js"), "./locales/hi.ts": () => import("./chunks/hi-CABVgpKU.js"), "./locales/hu.ts": () => import("./chunks/hu-CSQ9avfJ.js"), "./locales/id.ts": () => import("./chunks/id-BJ5w6RSU.js"), "./locales/it.ts": () => import("./chunks/it-Df8ChmTK.js"), "./locales/ja.ts": () => import("./chunks/ja-a53E5b2s.js"), "./locales/ko.ts": () => import("./chunks/ko-AZ8GrmXu.js"), "./locales/nl.ts": () => import("./chunks/nl-sF6ms5FU.js"), "./locales/no.ts": () => import("./chunks/no-DGf5PuW5.js"), "./locales/pl.ts": () => import("./chunks/pl-Dd-Ze6wn.js"), "./locales/pt.ts": () => import("./chunks/pt-BL9X8Du2.js"), "./locales/ro.ts": () => import("./chunks/ro-CGYmtR8q.js"), "./locales/ru.ts": () => import("./chunks/ru-oPoQtUxk.js"), "./locales/sv.ts": () => import("./chunks/sv-kXHP1Ct3.js"), "./locales/th.ts": () => import("./chunks/th-DMcmb36d.js"), "./locales/tr.ts": () => import("./chunks/tr-zjLbddlL.js"), "./locales/uk.ts": () => import("./chunks/uk-BYSiM14V.js"), "./locales/vi.ts": () => import("./chunks/vi-FbVRwy9D.js"), "./locales/zh.ts": () => import("./chunks/zh-Cv0Yw4qR.js") }), `./locales/${r}.ts`, 3).then((i) => {
|
|
190
194
|
const s = i.default ?? {};
|
|
191
|
-
return
|
|
195
|
+
return te.set(r, s), s;
|
|
192
196
|
}).catch((i) => {
|
|
193
197
|
console.warn(`[paywall] failed to load locale chunk "${r}"`, i);
|
|
194
198
|
const s = {};
|
|
195
|
-
return
|
|
199
|
+
return te.set(r, s), s;
|
|
196
200
|
}).finally(() => {
|
|
197
|
-
|
|
201
|
+
re.delete(r);
|
|
198
202
|
});
|
|
199
|
-
return
|
|
203
|
+
return re.set(r, n), n;
|
|
200
204
|
}
|
|
201
205
|
function at({ bootstrap: r, forceLocale: e, children: t }) {
|
|
202
206
|
const [n, i] = k("en"), [s, a] = k(null);
|
|
203
207
|
P(() => {
|
|
204
|
-
const h = (e &&
|
|
208
|
+
const h = (e && Te(e) ? e : null) ?? (() => {
|
|
205
209
|
if (!r) return null;
|
|
206
210
|
const g = it(r);
|
|
207
211
|
return !g || !ot(r, g) ? null : g;
|
|
@@ -220,14 +224,14 @@ function at({ bootstrap: r, forceLocale: e, children: t }) {
|
|
|
220
224
|
}, [r, e]);
|
|
221
225
|
const l = {
|
|
222
226
|
locale: n,
|
|
223
|
-
t: s ? (c, h, d) =>
|
|
227
|
+
t: s ? (c, h, d) => Ee(s[c] ?? h, d) : Le
|
|
224
228
|
};
|
|
225
|
-
return /* @__PURE__ */ o(
|
|
229
|
+
return /* @__PURE__ */ o(Me.Provider, { value: l, children: t });
|
|
226
230
|
}
|
|
227
231
|
function S() {
|
|
228
|
-
return
|
|
232
|
+
return We(Me);
|
|
229
233
|
}
|
|
230
|
-
const
|
|
234
|
+
const fe = 'a[href], button:not([disabled]), textarea:not([disabled]), input:not([disabled]), select:not([disabled]), [tabindex]:not([tabindex="-1"])';
|
|
231
235
|
function lt({
|
|
232
236
|
open: r,
|
|
233
237
|
onClose: e,
|
|
@@ -244,7 +248,7 @@ function lt({
|
|
|
244
248
|
if (!r) return;
|
|
245
249
|
g.current = document.activeElement ?? null;
|
|
246
250
|
const m = d.current;
|
|
247
|
-
m && (m.querySelector(
|
|
251
|
+
m && (m.querySelector(fe) ?? m).focus({ preventScroll: !0 });
|
|
248
252
|
const A = (y) => {
|
|
249
253
|
if (y.key === "Escape") {
|
|
250
254
|
if (!s) return;
|
|
@@ -253,7 +257,7 @@ function lt({
|
|
|
253
257
|
}
|
|
254
258
|
if (y.key !== "Tab" || !d.current) return;
|
|
255
259
|
const C = Array.from(
|
|
256
|
-
d.current.querySelectorAll(
|
|
260
|
+
d.current.querySelectorAll(fe)
|
|
257
261
|
).filter((R) => !R.hasAttribute("disabled") && R.tabIndex !== -1);
|
|
258
262
|
if (C.length === 0) {
|
|
259
263
|
y.preventDefault();
|
|
@@ -344,7 +348,7 @@ function ct(r, e) {
|
|
|
344
348
|
return e("auth.continue_with_facebook", "Continue with Facebook");
|
|
345
349
|
}
|
|
346
350
|
}
|
|
347
|
-
function
|
|
351
|
+
function ge(r, e, t) {
|
|
348
352
|
const n = e === "signup" ? t("auth.signup_failed", "Sign-up failed") : t("auth.signin_failed", "Sign-in failed");
|
|
349
353
|
if (!(r instanceof L)) return n;
|
|
350
354
|
switch (r.code) {
|
|
@@ -378,7 +382,7 @@ function fe(r, e, t) {
|
|
|
378
382
|
return n;
|
|
379
383
|
}
|
|
380
384
|
}
|
|
381
|
-
function
|
|
385
|
+
function Be({ block: r, ctx: e }) {
|
|
382
386
|
const t = e.auth, n = e.authSession, i = r.allow_signup !== !1, s = r.allow_password_reset !== !1, a = r.hide_when_authenticated !== !1;
|
|
383
387
|
if (!t)
|
|
384
388
|
return typeof console < "u" && console.warn("[paywall] auth_panel rendered without AuthClient — pass `auth: true` to PaywallUI"), null;
|
|
@@ -429,7 +433,7 @@ function dt({ block: r, allowSignup: e, allowReset: t, ctx: n }) {
|
|
|
429
433
|
}, [s]);
|
|
430
434
|
const U = (f) => {
|
|
431
435
|
h(f), M(null), D(null), T(!1);
|
|
432
|
-
},
|
|
436
|
+
}, K = async (f) => {
|
|
433
437
|
if (f.preventDefault(), !(I.current || y)) {
|
|
434
438
|
I.current = !0;
|
|
435
439
|
try {
|
|
@@ -450,7 +454,7 @@ function dt({ block: r, allowSignup: e, allowReset: t, ctx: n }) {
|
|
|
450
454
|
type: _ ? "recovery" : "email"
|
|
451
455
|
}), _ && await s.updatePassword({ password: _ }));
|
|
452
456
|
} catch (w) {
|
|
453
|
-
M(
|
|
457
|
+
M(ge(w, c === "signup" ? "signup" : c === "signup_verify" || c === "reset_verify" ? "otp" : c === "forgot" ? "reset" : "signin", i));
|
|
454
458
|
} finally {
|
|
455
459
|
C(null);
|
|
456
460
|
}
|
|
@@ -458,7 +462,7 @@ function dt({ block: r, allowSignup: e, allowReset: t, ctx: n }) {
|
|
|
458
462
|
I.current = !1;
|
|
459
463
|
}
|
|
460
464
|
}
|
|
461
|
-
},
|
|
465
|
+
}, H = async (f) => {
|
|
462
466
|
if (!(I.current || y)) {
|
|
463
467
|
I.current = !0, C(f), M(null), D(null);
|
|
464
468
|
try {
|
|
@@ -469,21 +473,21 @@ function dt({ block: r, allowSignup: e, allowReset: t, ctx: n }) {
|
|
|
469
473
|
} catch (w) {
|
|
470
474
|
if (w instanceof L && (w.code === "oauth_cancelled" || w.code === "oauth_timeout"))
|
|
471
475
|
return;
|
|
472
|
-
M(
|
|
476
|
+
M(ge(w, "signin", i));
|
|
473
477
|
} finally {
|
|
474
478
|
I.current = !1, C(null);
|
|
475
479
|
}
|
|
476
480
|
}
|
|
477
|
-
},
|
|
481
|
+
}, X = a.length > 0 && (c === "signin" || c === "signup"), J = c === "signin" || c === "signup" || c === "forgot", x = c === "signin" || c === "signup" && z;
|
|
478
482
|
return c === "reset_sent" ? /* @__PURE__ */ o(_t, { email: d, onBack: () => U("signin"), t: i }) : /* @__PURE__ */ u("div", { class: "flex flex-col gap-5", children: [
|
|
479
483
|
/* @__PURE__ */ o(ht, { mode: c, customHeading: r.heading, customSubheading: r.subheading }),
|
|
480
|
-
|
|
484
|
+
X ? /* @__PURE__ */ u("div", { class: "flex flex-col gap-2.5", children: [
|
|
481
485
|
a.map((f) => /* @__PURE__ */ u("div", { class: "relative", children: [
|
|
482
486
|
/* @__PURE__ */ u(
|
|
483
487
|
"button",
|
|
484
488
|
{
|
|
485
489
|
type: "button",
|
|
486
|
-
onClick: () =>
|
|
490
|
+
onClick: () => H(f),
|
|
487
491
|
disabled: y !== null,
|
|
488
492
|
class: "flex h-12 w-full items-center justify-center gap-2.5 rounded-full border-1 border-gray-200 bg-white px-5 text-base font-medium text-gray-900 transition-all hover:border-gray-300 hover:bg-gray-50 disabled:cursor-not-allowed disabled:opacity-60 focus:outline-none focus-visible:ring-2 focus-visible:ring-[var(--pw-accent)]",
|
|
489
493
|
children: [
|
|
@@ -496,9 +500,9 @@ function dt({ block: r, allowSignup: e, allowReset: t, ctx: n }) {
|
|
|
496
500
|
] }, f)),
|
|
497
501
|
/* @__PURE__ */ o(kt, {})
|
|
498
502
|
] }) : null,
|
|
499
|
-
/* @__PURE__ */ u("form", { onSubmit:
|
|
500
|
-
|
|
501
|
-
|
|
503
|
+
/* @__PURE__ */ u("form", { onSubmit: K, class: "flex flex-col gap-3", children: [
|
|
504
|
+
J && /* @__PURE__ */ o(
|
|
505
|
+
me,
|
|
502
506
|
{
|
|
503
507
|
type: "email",
|
|
504
508
|
placeholder: i("auth.email", "Email address"),
|
|
@@ -509,7 +513,7 @@ function dt({ block: r, allowSignup: e, allowReset: t, ctx: n }) {
|
|
|
509
513
|
}
|
|
510
514
|
),
|
|
511
515
|
x && /* @__PURE__ */ o(
|
|
512
|
-
|
|
516
|
+
ne,
|
|
513
517
|
{
|
|
514
518
|
placeholder: i("auth.password", "Password"),
|
|
515
519
|
value: _,
|
|
@@ -519,7 +523,7 @@ function dt({ block: r, allowSignup: e, allowReset: t, ctx: n }) {
|
|
|
519
523
|
}
|
|
520
524
|
),
|
|
521
525
|
c === "signup" && z && /* @__PURE__ */ o(
|
|
522
|
-
|
|
526
|
+
ne,
|
|
523
527
|
{
|
|
524
528
|
placeholder: i("auth.repeat_password", "Repeat password"),
|
|
525
529
|
value: v,
|
|
@@ -529,7 +533,7 @@ function dt({ block: r, allowSignup: e, allowReset: t, ctx: n }) {
|
|
|
529
533
|
}
|
|
530
534
|
),
|
|
531
535
|
(c === "signup_verify" || c === "reset_verify") && /* @__PURE__ */ o(
|
|
532
|
-
|
|
536
|
+
me,
|
|
533
537
|
{
|
|
534
538
|
type: "text",
|
|
535
539
|
placeholder: i("auth.confirmation_code", "Confirmation code"),
|
|
@@ -541,7 +545,7 @@ function dt({ block: r, allowSignup: e, allowReset: t, ctx: n }) {
|
|
|
541
545
|
}
|
|
542
546
|
),
|
|
543
547
|
c === "reset_verify" && /* @__PURE__ */ o(
|
|
544
|
-
|
|
548
|
+
ne,
|
|
545
549
|
{
|
|
546
550
|
placeholder: i(
|
|
547
551
|
"auth.new_password_optional",
|
|
@@ -552,7 +556,7 @@ function dt({ block: r, allowSignup: e, allowReset: t, ctx: n }) {
|
|
|
552
556
|
autocomplete: "new-password"
|
|
553
557
|
}
|
|
554
558
|
),
|
|
555
|
-
c === "signin" && t && /* @__PURE__ */ o("div", { class: "flex justify-end text-sm", children: /* @__PURE__ */ o(
|
|
559
|
+
c === "signin" && t && /* @__PURE__ */ o("div", { class: "flex justify-end text-sm", children: /* @__PURE__ */ o(Y, { onClick: () => U("forgot"), children: i("auth.forgot_password", "Forgot password?") }) }),
|
|
556
560
|
O && /* @__PURE__ */ o("p", { class: "text-sm text-red-600", children: O }),
|
|
557
561
|
R && /* @__PURE__ */ o("p", { class: "text-sm text-gray-500", children: R }),
|
|
558
562
|
/* @__PURE__ */ o(
|
|
@@ -652,18 +656,18 @@ function gt({
|
|
|
652
656
|
return r === "signin" && e ? /* @__PURE__ */ u("p", { class: "text-center text-sm text-gray-600", children: [
|
|
653
657
|
n("auth.no_account", "Don't have an account?"),
|
|
654
658
|
" ",
|
|
655
|
-
/* @__PURE__ */ o(
|
|
659
|
+
/* @__PURE__ */ o(Y, { onClick: () => t("signup"), children: n("auth.sign_up_link", "Sign Up") })
|
|
656
660
|
] }) : r === "signup" || r === "signup_verify" ? /* @__PURE__ */ u("p", { class: "text-center text-sm text-gray-600", children: [
|
|
657
661
|
n("auth.have_account", "Already have an account?"),
|
|
658
662
|
" ",
|
|
659
|
-
/* @__PURE__ */ o(
|
|
663
|
+
/* @__PURE__ */ o(Y, { onClick: () => t("signin"), children: n("auth.log_in_link", "Log In") })
|
|
660
664
|
] }) : r === "forgot" || r === "reset_sent" || r === "reset_verify" ? /* @__PURE__ */ u("p", { class: "text-center text-sm text-gray-600", children: [
|
|
661
665
|
n("auth.no_account", "Don't have an account?"),
|
|
662
666
|
" ",
|
|
663
|
-
/* @__PURE__ */ o(
|
|
667
|
+
/* @__PURE__ */ o(Y, { onClick: () => t("signup"), children: n("auth.sign_up_link", "Sign Up") })
|
|
664
668
|
] }) : null;
|
|
665
669
|
}
|
|
666
|
-
function
|
|
670
|
+
function Y({
|
|
667
671
|
onClick: r,
|
|
668
672
|
children: e
|
|
669
673
|
}) {
|
|
@@ -693,7 +697,7 @@ function mt({ busy: r, label: e }) {
|
|
|
693
697
|
}
|
|
694
698
|
);
|
|
695
699
|
}
|
|
696
|
-
function
|
|
700
|
+
function me({ type: r, placeholder: e, value: t, onInput: n, autocomplete: i, inputMode: s, required: a }) {
|
|
697
701
|
return /* @__PURE__ */ o(
|
|
698
702
|
"input",
|
|
699
703
|
{
|
|
@@ -708,7 +712,7 @@ function ge({ type: r, placeholder: e, value: t, onInput: n, autocomplete: i, in
|
|
|
708
712
|
}
|
|
709
713
|
);
|
|
710
714
|
}
|
|
711
|
-
function
|
|
715
|
+
function ne({ placeholder: r, value: e, onInput: t, autocomplete: n, required: i }) {
|
|
712
716
|
const { t: s } = S(), [a, l] = k(!1), c = j(null);
|
|
713
717
|
P(() => {
|
|
714
718
|
const g = c.current;
|
|
@@ -902,7 +906,7 @@ function St({
|
|
|
902
906
|
} : r;
|
|
903
907
|
return /* @__PURE__ */ u("div", { class: "relative flex-1 min-h-0 overflow-y-auto p-6 sm:p-8", children: [
|
|
904
908
|
s ? /* @__PURE__ */ o(Ct, { onClick: i, ariaLabel: c("nav.back_aria", "Back") }) : null,
|
|
905
|
-
/* @__PURE__ */ o(
|
|
909
|
+
/* @__PURE__ */ o(Be, { block: d, ctx: h })
|
|
906
910
|
] });
|
|
907
911
|
}
|
|
908
912
|
function Ct({ onClick: r, ariaLabel: e }) {
|
|
@@ -938,8 +942,8 @@ function Ct({ onClick: r, ariaLabel: e }) {
|
|
|
938
942
|
}
|
|
939
943
|
);
|
|
940
944
|
}
|
|
941
|
-
const
|
|
942
|
-
function
|
|
945
|
+
const It = (r) => `pw-offer-${r}-start`;
|
|
946
|
+
function ie(r) {
|
|
943
947
|
const e = r - Date.now();
|
|
944
948
|
return e <= 0 ? { days: 0, hours: 0, minutes: 0, seconds: 0, expired: !0 } : {
|
|
945
949
|
days: Math.floor(e / (1e3 * 60 * 60 * 24)),
|
|
@@ -949,7 +953,7 @@ function ne(r) {
|
|
|
949
953
|
expired: !1
|
|
950
954
|
};
|
|
951
955
|
}
|
|
952
|
-
function
|
|
956
|
+
function At(r) {
|
|
953
957
|
if (r.expires_at) {
|
|
954
958
|
const e = Date.parse(r.expires_at);
|
|
955
959
|
return Number.isFinite(e) ? e : null;
|
|
@@ -957,7 +961,7 @@ function It(r) {
|
|
|
957
961
|
if (r.duration_minutes && r.duration_minutes > 0) {
|
|
958
962
|
if (typeof window > "u") return null;
|
|
959
963
|
try {
|
|
960
|
-
const e =
|
|
964
|
+
const e = It(r.id);
|
|
961
965
|
let t = window.localStorage.getItem(e);
|
|
962
966
|
return t || (t = (/* @__PURE__ */ new Date()).toISOString(), window.localStorage.setItem(e, t)), Date.parse(t) + r.duration_minutes * 6e4;
|
|
963
967
|
} catch {
|
|
@@ -966,7 +970,7 @@ function It(r) {
|
|
|
966
970
|
}
|
|
967
971
|
return null;
|
|
968
972
|
}
|
|
969
|
-
function
|
|
973
|
+
function Pe(r, e) {
|
|
970
974
|
if (!r || r.length === 0) return null;
|
|
971
975
|
if (e) {
|
|
972
976
|
const t = r.find((n) => n.id === e);
|
|
@@ -974,29 +978,25 @@ function Te(r, e) {
|
|
|
974
978
|
}
|
|
975
979
|
return r.find((t) => t.expires_at || t.duration_minutes) ?? null;
|
|
976
980
|
}
|
|
977
|
-
function
|
|
978
|
-
const e = r ?
|
|
979
|
-
() => e !== null ?
|
|
981
|
+
function Oe(r) {
|
|
982
|
+
const e = r ? At(r) : null, [t, n] = k(
|
|
983
|
+
() => e !== null ? ie(e) : null
|
|
980
984
|
), i = j(e);
|
|
981
985
|
return i.current = e, P(() => {
|
|
982
986
|
if (e === null) {
|
|
983
987
|
n(null);
|
|
984
988
|
return;
|
|
985
989
|
}
|
|
986
|
-
n(
|
|
990
|
+
n(ie(e));
|
|
987
991
|
const s = setInterval(() => {
|
|
988
|
-
const a =
|
|
989
|
-
|
|
990
|
-
try {
|
|
991
|
-
window.localStorage.removeItem(Ee(r.id));
|
|
992
|
-
} catch {
|
|
993
|
-
}
|
|
992
|
+
const a = ie(i.current ?? 0);
|
|
993
|
+
n(a), a.expired && clearInterval(s);
|
|
994
994
|
}, 1e3);
|
|
995
995
|
return () => clearInterval(s);
|
|
996
996
|
}, [e, r?.duration_minutes, r?.id]), t;
|
|
997
997
|
}
|
|
998
|
-
function
|
|
999
|
-
const { t } = S(), n =
|
|
998
|
+
function Lt({ block: r, ctx: e }) {
|
|
999
|
+
const { t } = S(), n = Pe(e.bootstrap.offers, r.offer_id), i = Oe(n);
|
|
1000
1000
|
if (!n || i === null || i.expired && !r.force) return null;
|
|
1001
1001
|
const s = r.title ?? n.label ?? t("offer.limited_time", "Limited-time offer"), a = n.discount_percent ? `${s} ${n.discount_percent}%` : s;
|
|
1002
1002
|
return /* @__PURE__ */ u(
|
|
@@ -1009,32 +1009,32 @@ function At({ block: r, ctx: e }) {
|
|
|
1009
1009
|
},
|
|
1010
1010
|
role: "status",
|
|
1011
1011
|
children: [
|
|
1012
|
-
/* @__PURE__ */ o(
|
|
1012
|
+
/* @__PURE__ */ o(je, {}),
|
|
1013
1013
|
/* @__PURE__ */ o("span", { children: a }),
|
|
1014
|
-
/* @__PURE__ */ o(
|
|
1014
|
+
/* @__PURE__ */ o(Ue, { value: i, t })
|
|
1015
1015
|
]
|
|
1016
1016
|
}
|
|
1017
1017
|
);
|
|
1018
1018
|
}
|
|
1019
|
-
function
|
|
1019
|
+
function Ue({ value: r, t: e }) {
|
|
1020
1020
|
return /* @__PURE__ */ u("div", { class: "flex items-center gap-1 font-mono text-sm", children: [
|
|
1021
|
-
r.days > 0 ? /* @__PURE__ */ u(
|
|
1022
|
-
/* @__PURE__ */ o(
|
|
1021
|
+
r.days > 0 ? /* @__PURE__ */ u(le, { children: [
|
|
1022
|
+
/* @__PURE__ */ o(G, { children: String(r.days) }),
|
|
1023
1023
|
/* @__PURE__ */ o("span", { class: "text-xs", children: e("countdown.d", "d") })
|
|
1024
1024
|
] }) : null,
|
|
1025
|
-
/* @__PURE__ */ o(
|
|
1025
|
+
/* @__PURE__ */ o(G, { children: String(r.hours).padStart(2, "0") }),
|
|
1026
1026
|
/* @__PURE__ */ o("span", { class: "text-xs", children: e("countdown.h", "h") }),
|
|
1027
|
-
/* @__PURE__ */ o(
|
|
1027
|
+
/* @__PURE__ */ o(G, { children: String(r.minutes).padStart(2, "0") }),
|
|
1028
1028
|
/* @__PURE__ */ o("span", { class: "text-xs", children: e("countdown.m", "m") }),
|
|
1029
|
-
/* @__PURE__ */ o(
|
|
1029
|
+
/* @__PURE__ */ o(G, { children: String(r.seconds).padStart(2, "0") }),
|
|
1030
1030
|
/* @__PURE__ */ o("span", { class: "text-xs", children: e("countdown.s", "s") })
|
|
1031
1031
|
] });
|
|
1032
1032
|
}
|
|
1033
|
-
function
|
|
1033
|
+
function G({ children: r }) {
|
|
1034
1034
|
return /* @__PURE__ */ o("span", { class: "rounded bg-black/20 px-1.5 py-0.5 text-xs font-bold", children: r });
|
|
1035
1035
|
}
|
|
1036
|
-
function
|
|
1037
|
-
const { t: e } = S(), t =
|
|
1036
|
+
function Mt({ offer: r }) {
|
|
1037
|
+
const { t: e } = S(), t = Oe(r);
|
|
1038
1038
|
if (t === null || t.expired) return null;
|
|
1039
1039
|
const n = r.label ?? e("offer.limited_time", "Limited-time offer"), i = r.discount_percent ? `${n} ${r.discount_percent}%` : n;
|
|
1040
1040
|
return /* @__PURE__ */ u(
|
|
@@ -1047,14 +1047,14 @@ function Lt({ offer: r }) {
|
|
|
1047
1047
|
},
|
|
1048
1048
|
role: "status",
|
|
1049
1049
|
children: [
|
|
1050
|
-
/* @__PURE__ */ o(
|
|
1050
|
+
/* @__PURE__ */ o(je, {}),
|
|
1051
1051
|
/* @__PURE__ */ o("span", { children: i }),
|
|
1052
|
-
/* @__PURE__ */ o(
|
|
1052
|
+
/* @__PURE__ */ o(Ue, { value: t, t: e })
|
|
1053
1053
|
]
|
|
1054
1054
|
}
|
|
1055
1055
|
);
|
|
1056
1056
|
}
|
|
1057
|
-
function
|
|
1057
|
+
function je() {
|
|
1058
1058
|
return /* @__PURE__ */ o(
|
|
1059
1059
|
"svg",
|
|
1060
1060
|
{
|
|
@@ -1073,16 +1073,16 @@ function Oe() {
|
|
|
1073
1073
|
}
|
|
1074
1074
|
);
|
|
1075
1075
|
}
|
|
1076
|
-
const
|
|
1077
|
-
function
|
|
1076
|
+
const ye = 3, be = 200, xe = 5e3, oe = 5, Et = 10 * 1024 * 1024, we = ["image/jpeg", "image/png", "image/webp"], Tt = /.+@.+\..+/;
|
|
1077
|
+
function Bt({ client: r, authSession: e, origin: t, onBack: n }) {
|
|
1078
1078
|
const { t: i } = S(), s = e?.user.email ?? "", a = s || null, [l, c] = k(s), [h, d] = k(""), [g, _] = k(""), [p, v] = k([]), [m, A] = k(!1), [b, y] = k(null), [C, I] = k({}), O = () => {
|
|
1079
1079
|
const T = {}, E = (a ?? l).trim(), q = h.trim(), U = g.trim();
|
|
1080
|
-
return E ?
|
|
1081
|
-
min:
|
|
1082
|
-
max: ye
|
|
1083
|
-
})), (U.length < 1 || U.length > be) && (T.message = i("support.message_length", "{min}–{max} characters", {
|
|
1084
|
-
min: 1,
|
|
1080
|
+
return E ? Tt.test(E.toLowerCase()) || (T.email = i("support.invalid_email", "Invalid email")) : T.email = i("support.required", "Required"), (q.length < ye || q.length > be) && (T.subject = i("support.subject_length", "{min}–{max} characters", {
|
|
1081
|
+
min: ye,
|
|
1085
1082
|
max: be
|
|
1083
|
+
})), (U.length < 1 || U.length > xe) && (T.message = i("support.message_length", "{min}–{max} characters", {
|
|
1084
|
+
min: 1,
|
|
1085
|
+
max: xe
|
|
1086
1086
|
})), I(T), Object.keys(T).length === 0;
|
|
1087
1087
|
}, M = async (T) => {
|
|
1088
1088
|
if (T.preventDefault(), !m && O()) {
|
|
@@ -1162,7 +1162,7 @@ function Tt({ client: r, authSession: e, origin: t, onBack: n }) {
|
|
|
1162
1162
|
)
|
|
1163
1163
|
] }) })
|
|
1164
1164
|
] }) : /* @__PURE__ */ u("form", { onSubmit: M, class: "relative flex-1 min-h-0 flex flex-col", children: [
|
|
1165
|
-
/* @__PURE__ */ o(
|
|
1165
|
+
/* @__PURE__ */ o(Pt, { onClick: n, ariaLabel: i("nav.back_aria", "Back") }),
|
|
1166
1166
|
/* @__PURE__ */ o("div", { class: "flex-1 min-h-0 overflow-y-auto px-6 pb-3 pt-6 sm:px-8 sm:pb-4 sm:pt-8", children: /* @__PURE__ */ u("div", { class: "flex flex-col gap-5", children: [
|
|
1167
1167
|
/* @__PURE__ */ u("div", { class: "flex flex-col gap-2 pr-10", children: [
|
|
1168
1168
|
/* @__PURE__ */ o("h2", { class: "text-3xl font-bold tracking-tight text-gray-900", children: i("support.heading", "Support") }),
|
|
@@ -1174,7 +1174,7 @@ function Tt({ client: r, authSession: e, origin: t, onBack: n }) {
|
|
|
1174
1174
|
" ",
|
|
1175
1175
|
/* @__PURE__ */ o("b", { class: "font-medium text-gray-900", children: a })
|
|
1176
1176
|
] }) : /* @__PURE__ */ o(
|
|
1177
|
-
|
|
1177
|
+
ke,
|
|
1178
1178
|
{
|
|
1179
1179
|
type: "email",
|
|
1180
1180
|
placeholder: i("support.email_placeholder", "Enter your email *"),
|
|
@@ -1186,7 +1186,7 @@ function Tt({ client: r, authSession: e, origin: t, onBack: n }) {
|
|
|
1186
1186
|
}
|
|
1187
1187
|
),
|
|
1188
1188
|
/* @__PURE__ */ o(
|
|
1189
|
-
|
|
1189
|
+
ke,
|
|
1190
1190
|
{
|
|
1191
1191
|
type: "text",
|
|
1192
1192
|
placeholder: i("support.subject_placeholder", "Enter your subject *"),
|
|
@@ -1197,7 +1197,7 @@ function Tt({ client: r, authSession: e, origin: t, onBack: n }) {
|
|
|
1197
1197
|
}
|
|
1198
1198
|
),
|
|
1199
1199
|
/* @__PURE__ */ o(
|
|
1200
|
-
|
|
1200
|
+
Ot,
|
|
1201
1201
|
{
|
|
1202
1202
|
placeholder: i("support.message_placeholder", "Enter your message *"),
|
|
1203
1203
|
value: g,
|
|
@@ -1206,7 +1206,7 @@ function Tt({ client: r, authSession: e, origin: t, onBack: n }) {
|
|
|
1206
1206
|
required: !0
|
|
1207
1207
|
}
|
|
1208
1208
|
),
|
|
1209
|
-
/* @__PURE__ */ o(
|
|
1209
|
+
/* @__PURE__ */ o(Ut, { files: p, onChange: v, disabled: m })
|
|
1210
1210
|
] })
|
|
1211
1211
|
] }) }),
|
|
1212
1212
|
/* @__PURE__ */ u("div", { class: D, style: z, children: [
|
|
@@ -1239,7 +1239,7 @@ function Tt({ client: r, authSession: e, origin: t, onBack: n }) {
|
|
|
1239
1239
|
] })
|
|
1240
1240
|
] });
|
|
1241
1241
|
}
|
|
1242
|
-
function
|
|
1242
|
+
function Pt({ onClick: r, ariaLabel: e }) {
|
|
1243
1243
|
return /* @__PURE__ */ o(
|
|
1244
1244
|
"button",
|
|
1245
1245
|
{
|
|
@@ -1272,7 +1272,7 @@ function Bt({ onClick: r, ariaLabel: e }) {
|
|
|
1272
1272
|
}
|
|
1273
1273
|
);
|
|
1274
1274
|
}
|
|
1275
|
-
function
|
|
1275
|
+
function ke({
|
|
1276
1276
|
type: r,
|
|
1277
1277
|
placeholder: e,
|
|
1278
1278
|
value: t,
|
|
@@ -1297,7 +1297,7 @@ function we({
|
|
|
1297
1297
|
i && /* @__PURE__ */ o("span", { class: "mt-1 ml-2 block text-sm text-red-600", children: i })
|
|
1298
1298
|
] });
|
|
1299
1299
|
}
|
|
1300
|
-
function
|
|
1300
|
+
function Ot({
|
|
1301
1301
|
placeholder: r,
|
|
1302
1302
|
value: e,
|
|
1303
1303
|
onInput: t,
|
|
@@ -1319,17 +1319,17 @@ function Pt({
|
|
|
1319
1319
|
n && /* @__PURE__ */ o("span", { class: "mt-1 ml-2 block text-sm text-red-600", children: n })
|
|
1320
1320
|
] });
|
|
1321
1321
|
}
|
|
1322
|
-
function
|
|
1322
|
+
function Ut({ files: r, onChange: e, disabled: t }) {
|
|
1323
1323
|
const { t: n } = S(), i = j(null), [s, a] = k(!1), [l, c] = k(null), h = (d) => {
|
|
1324
1324
|
if (!d || t) return;
|
|
1325
1325
|
c(null);
|
|
1326
1326
|
const g = Array.from(d);
|
|
1327
|
-
if (r.length + g.length >
|
|
1328
|
-
c(n("support.too_many_files", "Up to {max} files", { max:
|
|
1327
|
+
if (r.length + g.length > oe) {
|
|
1328
|
+
c(n("support.too_many_files", "Up to {max} files", { max: oe }));
|
|
1329
1329
|
return;
|
|
1330
1330
|
}
|
|
1331
1331
|
const _ = g.filter(
|
|
1332
|
-
(p) =>
|
|
1332
|
+
(p) => we.includes(p.type) && p.size <= Et
|
|
1333
1333
|
);
|
|
1334
1334
|
if (_.length !== g.length) {
|
|
1335
1335
|
c(n("support.invalid_file", "Only JPEG/PNG/WebP, ≤ 10MB each"));
|
|
@@ -1357,7 +1357,7 @@ function Ot({ files: r, onChange: e, disabled: t }) {
|
|
|
1357
1357
|
children: [
|
|
1358
1358
|
/* @__PURE__ */ o("div", { class: "text-xs text-gray-500", children: n("support.dropzone_text", "Drop images here or click to select") }),
|
|
1359
1359
|
/* @__PURE__ */ o("div", { class: "mt-0.5 text-[11px] text-gray-400", children: n("support.file_requirements", "JPEG/PNG/WebP, up to {max} files, ≤ 10MB each", {
|
|
1360
|
-
max:
|
|
1360
|
+
max: oe
|
|
1361
1361
|
}) })
|
|
1362
1362
|
]
|
|
1363
1363
|
}
|
|
@@ -1368,7 +1368,7 @@ function Ot({ files: r, onChange: e, disabled: t }) {
|
|
|
1368
1368
|
ref: i,
|
|
1369
1369
|
type: "file",
|
|
1370
1370
|
multiple: !0,
|
|
1371
|
-
accept:
|
|
1371
|
+
accept: we.join(","),
|
|
1372
1372
|
class: "hidden",
|
|
1373
1373
|
onChange: (d) => {
|
|
1374
1374
|
h(d.target.files), d.currentTarget.value = "";
|
|
@@ -1402,34 +1402,34 @@ function Ot({ files: r, onChange: e, disabled: t }) {
|
|
|
1402
1402
|
)) })
|
|
1403
1403
|
] });
|
|
1404
1404
|
}
|
|
1405
|
-
const
|
|
1405
|
+
const jt = {
|
|
1406
1406
|
day: "cta.get_plan_daily",
|
|
1407
1407
|
week: "cta.get_plan_weekly",
|
|
1408
1408
|
month: "cta.get_plan_monthly",
|
|
1409
1409
|
year: "cta.get_plan_yearly"
|
|
1410
|
-
},
|
|
1410
|
+
}, Rt = {
|
|
1411
1411
|
day: "Get Daily Plan",
|
|
1412
1412
|
week: "Get Weekly Plan",
|
|
1413
1413
|
month: "Get Monthly Plan",
|
|
1414
1414
|
year: "Get Yearly Plan"
|
|
1415
1415
|
};
|
|
1416
|
-
function
|
|
1416
|
+
function Dt(r, e, t, n) {
|
|
1417
1417
|
if (e === "close") return n("cta.close", "Close");
|
|
1418
1418
|
if (!r) return n("cta.continue", "Continue");
|
|
1419
1419
|
if (!t && r.trial_days && r.interval && r.interval !== "lifetime")
|
|
1420
1420
|
return n("cta.start_trial", "Start {days}-Day Free Trial", { days: r.trial_days });
|
|
1421
1421
|
if (!r.interval || r.interval === "lifetime")
|
|
1422
1422
|
return n("cta.get_lifetime_access", "Get Lifetime Access");
|
|
1423
|
-
const i =
|
|
1424
|
-
return i ? n(i,
|
|
1425
|
-
interval:
|
|
1423
|
+
const i = jt[r.interval];
|
|
1424
|
+
return i ? n(i, Rt[r.interval]) : n("cta.get_plan_generic", "Get {interval} Plan", {
|
|
1425
|
+
interval: zt(r.interval)
|
|
1426
1426
|
});
|
|
1427
1427
|
}
|
|
1428
|
-
function
|
|
1428
|
+
function zt(r) {
|
|
1429
1429
|
return r.length ? r[0].toUpperCase() + r.slice(1) : r;
|
|
1430
1430
|
}
|
|
1431
|
-
function
|
|
1432
|
-
const { t } = S(), [n, i] = k(!1), s = r.priceId ?? e.selectedPriceId, a = n || r.action === "checkout" && !s, l = s ? e.bootstrap.prices.find((g) => g.id === s) ?? null : null, c = e.bootstrap.user?.had_previous_trial ?? !1, h = r.label ??
|
|
1431
|
+
function qt({ block: r, ctx: e }) {
|
|
1432
|
+
const { t } = S(), [n, i] = k(!1), s = r.priceId ?? e.selectedPriceId, a = n || r.action === "checkout" && !s, l = s ? e.bootstrap.prices.find((g) => g.id === s) ?? null : null, c = e.bootstrap.user?.had_previous_trial ?? !1, h = r.label ?? Dt(l, r.action, c, t);
|
|
1433
1433
|
return /* @__PURE__ */ u(
|
|
1434
1434
|
"button",
|
|
1435
1435
|
{
|
|
@@ -1466,7 +1466,7 @@ function zt({ block: r, ctx: e }) {
|
|
|
1466
1466
|
}
|
|
1467
1467
|
);
|
|
1468
1468
|
}
|
|
1469
|
-
function
|
|
1469
|
+
function Nt({ ctx: r }) {
|
|
1470
1470
|
const { t: e } = S(), t = r.authSession, n = r.auth, [i, s] = k(!1), a = () => r.onAction("support");
|
|
1471
1471
|
if (t && !t.user.is_anonymous) {
|
|
1472
1472
|
const l = async () => {
|
|
@@ -1487,19 +1487,19 @@ function qt({ ctx: r }) {
|
|
|
1487
1487
|
/* @__PURE__ */ o("b", { class: "font-medium text-gray-700", children: t.user.email })
|
|
1488
1488
|
] }),
|
|
1489
1489
|
/* @__PURE__ */ u("div", { class: "flex items-center justify-center gap-3", children: [
|
|
1490
|
-
/* @__PURE__ */ o(
|
|
1491
|
-
/* @__PURE__ */ o(
|
|
1492
|
-
/* @__PURE__ */ o(
|
|
1490
|
+
/* @__PURE__ */ o(W, { onClick: l, disabled: !n || i, children: i ? e("session.signing_out", "Signing out…") : e("session.sign_out", "Sign Out") }),
|
|
1491
|
+
/* @__PURE__ */ o(ve, {}),
|
|
1492
|
+
/* @__PURE__ */ o(W, { onClick: a, children: e("session.contact_support", "Contact Support") })
|
|
1493
1493
|
] })
|
|
1494
1494
|
] });
|
|
1495
1495
|
}
|
|
1496
1496
|
return /* @__PURE__ */ u("div", { class: "-mt-3 flex items-center justify-center gap-3 pt-1 text-center text-[13px]", children: [
|
|
1497
|
-
/* @__PURE__ */ o(
|
|
1498
|
-
/* @__PURE__ */ o(
|
|
1499
|
-
/* @__PURE__ */ o(
|
|
1497
|
+
/* @__PURE__ */ o(W, { onClick: () => r.onAction("restore"), children: e("session.restore_purchases", "Restore purchases") }),
|
|
1498
|
+
/* @__PURE__ */ o(ve, {}),
|
|
1499
|
+
/* @__PURE__ */ o(W, { onClick: a, children: e("session.contact_support", "Contact Support") })
|
|
1500
1500
|
] });
|
|
1501
1501
|
}
|
|
1502
|
-
function
|
|
1502
|
+
function W({
|
|
1503
1503
|
onClick: r,
|
|
1504
1504
|
disabled: e,
|
|
1505
1505
|
children: t
|
|
@@ -1516,10 +1516,10 @@ function G({
|
|
|
1516
1516
|
}
|
|
1517
1517
|
);
|
|
1518
1518
|
}
|
|
1519
|
-
function
|
|
1519
|
+
function ve() {
|
|
1520
1520
|
return /* @__PURE__ */ o("span", { class: "h-1 w-1 rounded-full bg-gray-300", "aria-hidden": "true" });
|
|
1521
1521
|
}
|
|
1522
|
-
function
|
|
1522
|
+
function Ft({ block: r }) {
|
|
1523
1523
|
return r.items.length ? /* @__PURE__ */ o("ul", { class: "flex flex-col gap-2.5", role: "list", children: r.items.map((e) => /* @__PURE__ */ u("li", { class: "flex items-start gap-3 text-sm text-gray-700", children: [
|
|
1524
1524
|
/* @__PURE__ */ o(
|
|
1525
1525
|
"svg",
|
|
@@ -1548,11 +1548,11 @@ function Nt({ block: r }) {
|
|
|
1548
1548
|
] })
|
|
1549
1549
|
] }, e.id)) }) : null;
|
|
1550
1550
|
}
|
|
1551
|
-
function
|
|
1552
|
-
const { t: e } = S(), t = r.title ?? e("pricing.money_back", "30-day money-back guarantee"), n = r.subtitle, i = (r.icon ?? "dollar_shield") !== "none", s =
|
|
1551
|
+
function $t({ block: r }) {
|
|
1552
|
+
const { t: e } = S(), t = r.title ?? e("pricing.money_back", "30-day money-back guarantee"), n = r.subtitle, i = (r.icon ?? "dollar_shield") !== "none", s = Vt(t);
|
|
1553
1553
|
return /* @__PURE__ */ u("div", { class: "flex flex-col items-center gap-1.5 border-b-1 pb-4 mb-1 border-gray-100", children: [
|
|
1554
1554
|
/* @__PURE__ */ u("div", { class: "inline-flex items-center gap-2 text-[12px] text-gray-700", children: [
|
|
1555
|
-
i ? /* @__PURE__ */ o(
|
|
1555
|
+
i ? /* @__PURE__ */ o(Ht, {}) : null,
|
|
1556
1556
|
s ? /* @__PURE__ */ u("span", { children: [
|
|
1557
1557
|
/* @__PURE__ */ o("b", { class: "font-bold text-gray-900", children: s.bold }),
|
|
1558
1558
|
" ",
|
|
@@ -1562,11 +1562,11 @@ function Ft({ block: r }) {
|
|
|
1562
1562
|
n ? /* @__PURE__ */ o("span", { class: "text-center text-xs leading-relaxed text-gray-500", children: n }) : null
|
|
1563
1563
|
] });
|
|
1564
1564
|
}
|
|
1565
|
-
function
|
|
1565
|
+
function Vt(r) {
|
|
1566
1566
|
const e = r.match(/^(\d+[-\s]?days?)\s+(.+)$/i);
|
|
1567
1567
|
return e ? { bold: e[1], rest: e[2] } : null;
|
|
1568
1568
|
}
|
|
1569
|
-
function
|
|
1569
|
+
function Ht() {
|
|
1570
1570
|
return /* @__PURE__ */ u(
|
|
1571
1571
|
"svg",
|
|
1572
1572
|
{
|
|
@@ -1601,22 +1601,22 @@ function Vt() {
|
|
|
1601
1601
|
}
|
|
1602
1602
|
);
|
|
1603
1603
|
}
|
|
1604
|
-
const
|
|
1605
|
-
function
|
|
1606
|
-
const t = e *
|
|
1607
|
-
let n =
|
|
1608
|
-
for (r.style.fontSize = `${n}px`; r.scrollHeight > t && n >
|
|
1604
|
+
const Re = 24, Gt = 16, Wt = 2;
|
|
1605
|
+
function Zt(r, e) {
|
|
1606
|
+
const t = e * Wt;
|
|
1607
|
+
let n = Re;
|
|
1608
|
+
for (r.style.fontSize = `${n}px`; r.scrollHeight > t && n > Gt; )
|
|
1609
1609
|
n -= 1, r.style.fontSize = `${n}px`;
|
|
1610
1610
|
}
|
|
1611
|
-
function
|
|
1611
|
+
function Yt({ block: r, ctx: e }) {
|
|
1612
1612
|
const t = r.level ?? 1, n = `h${t}`, i = t === 1 ? "text-[22px] sm:text-2xl font-semibold leading-tight text-center text-balance text-gray-800" : t === 2 ? "text-xl font-semibold leading-snug text-gray-900 tracking-tight" : "text-base font-medium text-gray-900", s = j(null), a = t === 1 && !!e.bootstrap.settings.title_auto_fit;
|
|
1613
1613
|
return P(() => {
|
|
1614
1614
|
if (!a || !s.current) return;
|
|
1615
|
-
const l = getComputedStyle(s.current), c = parseFloat(l.lineHeight) ||
|
|
1616
|
-
|
|
1615
|
+
const l = getComputedStyle(s.current), c = parseFloat(l.lineHeight) || Re * 1.5;
|
|
1616
|
+
Zt(s.current, c);
|
|
1617
1617
|
}, [a, r.text]), /* @__PURE__ */ o(n, { ref: s, class: i, children: r.text });
|
|
1618
1618
|
}
|
|
1619
|
-
function
|
|
1619
|
+
function Kt(r) {
|
|
1620
1620
|
const e = r.local ?? { currency: r.currency, amount: r.amount };
|
|
1621
1621
|
if (r.interval === "year") {
|
|
1622
1622
|
const t = (r.interval_count ?? 1) * 12;
|
|
@@ -1624,7 +1624,7 @@ function Yt(r) {
|
|
|
1624
1624
|
}
|
|
1625
1625
|
return { amount: e.amount, currency: e.currency };
|
|
1626
1626
|
}
|
|
1627
|
-
function
|
|
1627
|
+
function se(r, e) {
|
|
1628
1628
|
const t = r % 1 !== 0 ? 2 : 0;
|
|
1629
1629
|
try {
|
|
1630
1630
|
const n = new Intl.NumberFormat(void 0, {
|
|
@@ -1642,20 +1642,20 @@ function oe(r, e) {
|
|
|
1642
1642
|
return { currency: e, amount: String(r) };
|
|
1643
1643
|
}
|
|
1644
1644
|
}
|
|
1645
|
-
function
|
|
1646
|
-
const { amount: t, currency: n } =
|
|
1645
|
+
function ce(r, e) {
|
|
1646
|
+
const { amount: t, currency: n } = Kt(r);
|
|
1647
1647
|
if (!e) {
|
|
1648
|
-
const { currency: l, amount: c } =
|
|
1648
|
+
const { currency: l, amount: c } = se(t, n);
|
|
1649
1649
|
return { currency: l, amount: c, originalAmount: null };
|
|
1650
1650
|
}
|
|
1651
|
-
const i = t * (1 - e / 100), s =
|
|
1651
|
+
const i = t * (1 - e / 100), s = se(i, n), a = se(t, n);
|
|
1652
1652
|
return {
|
|
1653
1653
|
currency: s.currency,
|
|
1654
1654
|
amount: s.amount,
|
|
1655
1655
|
originalAmount: `${a.currency}${a.amount}`
|
|
1656
1656
|
};
|
|
1657
1657
|
}
|
|
1658
|
-
function
|
|
1658
|
+
function De(r, e) {
|
|
1659
1659
|
if (r.label) return r.label.toUpperCase();
|
|
1660
1660
|
if (!r.interval || r.interval === "lifetime")
|
|
1661
1661
|
return e("pricing.plan_label.lifetime", "LIFETIME");
|
|
@@ -1667,14 +1667,14 @@ function je(r, e) {
|
|
|
1667
1667
|
}[r.interval];
|
|
1668
1668
|
return n ? e(n.key, n.fallback) : `${r.interval.toUpperCase()} PLAN`;
|
|
1669
1669
|
}
|
|
1670
|
-
function
|
|
1670
|
+
function ue(r, e) {
|
|
1671
1671
|
if (!r.interval || r.interval === "lifetime")
|
|
1672
1672
|
return e("pricing.interval.lifetime_short", "lifetime");
|
|
1673
1673
|
if (r.interval === "year") return e("pricing.interval.month", "month");
|
|
1674
1674
|
const t = r.interval_count ?? 1;
|
|
1675
1675
|
return t === 1 ? e(`pricing.interval.${r.interval}`, r.interval) : `${t} ${r.interval}s`;
|
|
1676
1676
|
}
|
|
1677
|
-
function
|
|
1677
|
+
function Xt({ block: r, ctx: e }) {
|
|
1678
1678
|
const { t } = S(), n = r.priceIds && r.priceIds.length > 0 ? new Set(r.priceIds) : null, i = e.bootstrap.prices.filter((a) => !n || n.has(a.id));
|
|
1679
1679
|
if (i.length === 0)
|
|
1680
1680
|
return /* @__PURE__ */ o("p", { class: "text-sm text-gray-500", children: t("pricing.no_prices", "No prices available.") });
|
|
@@ -1687,13 +1687,13 @@ function Kt({ block: r, ctx: e }) {
|
|
|
1687
1687
|
role: "radiogroup",
|
|
1688
1688
|
"aria-label": t("pricing.plans_aria", "Plans"),
|
|
1689
1689
|
children: i.map((a, l) => /* @__PURE__ */ o(
|
|
1690
|
-
|
|
1690
|
+
Qt,
|
|
1691
1691
|
{
|
|
1692
1692
|
price: a,
|
|
1693
1693
|
isLast: l === i.length - 1,
|
|
1694
1694
|
isPopular: r.popular_price_id === a.id,
|
|
1695
1695
|
popularLabel: s,
|
|
1696
|
-
offer:
|
|
1696
|
+
offer: V(e.bootstrap.offers, a.id, { readStart: N }),
|
|
1697
1697
|
selected: e.selectedPriceId === a.id,
|
|
1698
1698
|
onSelect: () => {
|
|
1699
1699
|
e.setSelectedPriceId(a.id), e.onAction("price_selected", { priceId: a.id, price: a });
|
|
@@ -1706,7 +1706,7 @@ function Kt({ block: r, ctx: e }) {
|
|
|
1706
1706
|
);
|
|
1707
1707
|
if (r.view === "horizontal") {
|
|
1708
1708
|
const a = Math.min(i.length, 3), l = i.some(
|
|
1709
|
-
(c) => (
|
|
1709
|
+
(c) => (V(e.bootstrap.offers, c.id, { readStart: N })?.discount_percent ?? 0) > 0
|
|
1710
1710
|
);
|
|
1711
1711
|
return /* @__PURE__ */ o(
|
|
1712
1712
|
"div",
|
|
@@ -1716,12 +1716,12 @@ function Kt({ block: r, ctx: e }) {
|
|
|
1716
1716
|
role: "radiogroup",
|
|
1717
1717
|
"aria-label": t("pricing.plans_aria", "Plans"),
|
|
1718
1718
|
children: i.map((c) => /* @__PURE__ */ o(
|
|
1719
|
-
|
|
1719
|
+
er,
|
|
1720
1720
|
{
|
|
1721
1721
|
price: c,
|
|
1722
1722
|
isPopular: r.popular_price_id === c.id,
|
|
1723
1723
|
popularLabel: s,
|
|
1724
|
-
offer:
|
|
1724
|
+
offer: V(e.bootstrap.offers, c.id, { readStart: N }),
|
|
1725
1725
|
reserveStrikeRow: l,
|
|
1726
1726
|
selected: e.selectedPriceId === c.id,
|
|
1727
1727
|
onSelect: () => {
|
|
@@ -1741,7 +1741,7 @@ function Kt({ block: r, ctx: e }) {
|
|
|
1741
1741
|
role: "radiogroup",
|
|
1742
1742
|
"aria-label": t("pricing.plans_aria", "Plans"),
|
|
1743
1743
|
children: i.map((a) => {
|
|
1744
|
-
const l = e.selectedPriceId === a.id, c = r.popular_price_id === a.id, d =
|
|
1744
|
+
const l = e.selectedPriceId === a.id, c = r.popular_price_id === a.id, d = V(e.bootstrap.offers, a.id, { readStart: N })?.discount_percent ?? null, { currency: g, amount: _, originalAmount: p } = ce(a, d);
|
|
1745
1745
|
return /* @__PURE__ */ u(
|
|
1746
1746
|
"button",
|
|
1747
1747
|
{
|
|
@@ -1797,7 +1797,7 @@ function Kt({ block: r, ctx: e }) {
|
|
|
1797
1797
|
),
|
|
1798
1798
|
/* @__PURE__ */ u("div", { class: "flex flex-1 flex-col gap-0.5", children: [
|
|
1799
1799
|
/* @__PURE__ */ u("div", { class: "flex flex-wrap items-center gap-x-2 gap-y-1", children: [
|
|
1800
|
-
/* @__PURE__ */ o("span", { class: "text-xs font-normal uppercase tracking-normal text-gray-800/70", children:
|
|
1800
|
+
/* @__PURE__ */ o("span", { class: "text-xs font-normal uppercase tracking-normal text-gray-800/70", children: De(a, t) }),
|
|
1801
1801
|
p ? (
|
|
1802
1802
|
// opacity-60 приглушает strike: глаз сначала ловит label
|
|
1803
1803
|
// и discount-badge, потом main price; original «бывшая цена»
|
|
@@ -1820,7 +1820,7 @@ function Kt({ block: r, ctx: e }) {
|
|
|
1820
1820
|
/* @__PURE__ */ u("span", { class: "text-sm font-normal text-gray-500", children: [
|
|
1821
1821
|
" ",
|
|
1822
1822
|
"/ ",
|
|
1823
|
-
|
|
1823
|
+
ue(a, t)
|
|
1824
1824
|
] })
|
|
1825
1825
|
] }) }),
|
|
1826
1826
|
a.description ? /* @__PURE__ */ o("span", { class: "mt-1 text-xs leading-relaxed text-gray-500", children: a.description }) : null
|
|
@@ -1841,10 +1841,10 @@ function Kt({ block: r, ctx: e }) {
|
|
|
1841
1841
|
}
|
|
1842
1842
|
);
|
|
1843
1843
|
}
|
|
1844
|
-
function
|
|
1844
|
+
function Jt(r, e) {
|
|
1845
1845
|
return r.label ? r.label : !r.interval || r.interval === "lifetime" ? e("pricing.interval.lifetime_short", "lifetime") : e(`pricing.interval.${r.interval}`, r.interval);
|
|
1846
1846
|
}
|
|
1847
|
-
function
|
|
1847
|
+
function Qt({
|
|
1848
1848
|
price: r,
|
|
1849
1849
|
isLast: e,
|
|
1850
1850
|
isPopular: t,
|
|
@@ -1854,7 +1854,7 @@ function Jt({
|
|
|
1854
1854
|
onSelect: a,
|
|
1855
1855
|
t: l
|
|
1856
1856
|
}) {
|
|
1857
|
-
const c = i?.discount_percent ?? null, { currency: h, amount: d, originalAmount: g } =
|
|
1857
|
+
const c = i?.discount_percent ?? null, { currency: h, amount: d, originalAmount: g } = ce(r, c);
|
|
1858
1858
|
return /* @__PURE__ */ u(
|
|
1859
1859
|
"button",
|
|
1860
1860
|
{
|
|
@@ -1904,7 +1904,7 @@ function Jt({
|
|
|
1904
1904
|
].join(" "),
|
|
1905
1905
|
children: [
|
|
1906
1906
|
/* @__PURE__ */ u("div", { class: "flex flex-wrap items-center gap-1 gap-x-1.5", children: [
|
|
1907
|
-
/* @__PURE__ */ o("span", { class: "text-base font-normal capitalize text-gray-800", children:
|
|
1907
|
+
/* @__PURE__ */ o("span", { class: "text-base font-normal capitalize text-gray-800", children: Jt(r, l) }),
|
|
1908
1908
|
t ? (
|
|
1909
1909
|
// Pastel brand-mix pill — точно как `badge` в TelegramPricingRadio.
|
|
1910
1910
|
// Низкий visual weight: pill про "имя плана" (most popular), а не
|
|
@@ -1936,7 +1936,7 @@ function Jt({
|
|
|
1936
1936
|
/* @__PURE__ */ u("span", { class: "text-xs text-gray-400", children: [
|
|
1937
1937
|
" ",
|
|
1938
1938
|
"/ ",
|
|
1939
|
-
|
|
1939
|
+
ue(r, l)
|
|
1940
1940
|
] })
|
|
1941
1941
|
] })
|
|
1942
1942
|
] })
|
|
@@ -1947,7 +1947,7 @@ function Jt({
|
|
|
1947
1947
|
}
|
|
1948
1948
|
);
|
|
1949
1949
|
}
|
|
1950
|
-
function
|
|
1950
|
+
function er({
|
|
1951
1951
|
price: r,
|
|
1952
1952
|
isPopular: e,
|
|
1953
1953
|
popularLabel: t,
|
|
@@ -1957,7 +1957,7 @@ function Qt({
|
|
|
1957
1957
|
onSelect: a,
|
|
1958
1958
|
t: l
|
|
1959
1959
|
}) {
|
|
1960
|
-
const c = n?.discount_percent ?? null, { currency: h, amount: d, originalAmount: g } =
|
|
1960
|
+
const c = n?.discount_percent ?? null, { currency: h, amount: d, originalAmount: g } = ce(r, c);
|
|
1961
1961
|
return /* @__PURE__ */ u(
|
|
1962
1962
|
"button",
|
|
1963
1963
|
{
|
|
@@ -1971,7 +1971,7 @@ function Qt({
|
|
|
1971
1971
|
].join(" "),
|
|
1972
1972
|
style: s ? { background: "color-mix(in srgb, var(--pw-accent) 6%, transparent)" } : void 0,
|
|
1973
1973
|
children: [
|
|
1974
|
-
/* @__PURE__ */ o("span", { class: "flex min-h-[2.4em] items-center text-[10px] font-normal uppercase leading-tight text-gray-800/70", children:
|
|
1974
|
+
/* @__PURE__ */ o("span", { class: "flex min-h-[2.4em] items-center text-[10px] font-normal uppercase leading-tight text-gray-800/70", children: De(r, l) }),
|
|
1975
1975
|
i ? /* @__PURE__ */ u("div", { class: "flex h-[22px] items-center justify-center gap-1.5", children: [
|
|
1976
1976
|
g ? /* @__PURE__ */ o("span", { class: "text-[12px] text-gray-400 line-through decoration-gray-400 decoration-[1.5px]", children: g }) : null,
|
|
1977
1977
|
c ? /* @__PURE__ */ u("span", { class: "rounded-md bg-emerald-100 px-1.5 py-0.5 text-[10px] font-bold leading-none text-emerald-700", children: [
|
|
@@ -1986,7 +1986,7 @@ function Qt({
|
|
|
1986
1986
|
] }),
|
|
1987
1987
|
/* @__PURE__ */ u("span", { class: "text-xs font-normal text-gray-500", children: [
|
|
1988
1988
|
"/ ",
|
|
1989
|
-
|
|
1989
|
+
ue(r, l)
|
|
1990
1990
|
] }),
|
|
1991
1991
|
e ? /* @__PURE__ */ o(
|
|
1992
1992
|
"span",
|
|
@@ -2000,24 +2000,24 @@ function Qt({
|
|
|
2000
2000
|
}
|
|
2001
2001
|
);
|
|
2002
2002
|
}
|
|
2003
|
-
function
|
|
2003
|
+
function tr({ block: r }) {
|
|
2004
2004
|
return /* @__PURE__ */ o("p", { class: "text-[0.9375rem] leading-relaxed text-gray-600", children: r.text });
|
|
2005
2005
|
}
|
|
2006
|
-
const
|
|
2006
|
+
const rr = {
|
|
2007
2007
|
week: 0.25,
|
|
2008
2008
|
month: 1,
|
|
2009
2009
|
year: 12
|
|
2010
2010
|
};
|
|
2011
|
-
function
|
|
2011
|
+
function nr(r, e) {
|
|
2012
2012
|
return r ? e(`pricing.interval.${r}`, r) : e("pricing.interval.period", "period");
|
|
2013
2013
|
}
|
|
2014
|
-
function
|
|
2014
|
+
function ir({ block: r, ctx: e }) {
|
|
2015
2015
|
const { t } = S();
|
|
2016
2016
|
if (!r.queries.length) return null;
|
|
2017
|
-
const i = e.bootstrap.prices.find((a) => a.id === e.selectedPriceId)?.interval ?? null, s = i ?
|
|
2017
|
+
const i = e.bootstrap.prices.find((a) => a.id === e.selectedPriceId)?.interval ?? null, s = i ? rr[i] : void 0;
|
|
2018
2018
|
return /* @__PURE__ */ u("div", { class: "flex flex-col gap-2", children: [
|
|
2019
2019
|
/* @__PURE__ */ o("div", { class: "text-sm font-semibold text-gray-800", children: !i || i === "lifetime" ? t("pricing.included_total", "Included for lifetime:") : t("pricing.included_per", "Included per {interval}:", {
|
|
2020
|
-
interval:
|
|
2020
|
+
interval: nr(i, t)
|
|
2021
2021
|
}) }),
|
|
2022
2022
|
/* @__PURE__ */ o("ul", { class: "flex flex-col gap-2", role: "list", children: r.queries.map((a) => {
|
|
2023
2023
|
const l = Number.isFinite(a.count) ? a.count : 0, c = s !== void 0 ? Math.round(l * s) : l;
|
|
@@ -2047,7 +2047,7 @@ function nr({ block: r, ctx: e }) {
|
|
|
2047
2047
|
/* @__PURE__ */ o("span", { class: "font-semibold text-gray-900 text-sm", children: c }),
|
|
2048
2048
|
" ",
|
|
2049
2049
|
/* @__PURE__ */ o("span", { class: "text-sm text-gray-800", children: a.name }),
|
|
2050
|
-
a.desc ? /* @__PURE__ */ u(
|
|
2050
|
+
a.desc ? /* @__PURE__ */ u(le, { children: [
|
|
2051
2051
|
/* @__PURE__ */ o("br", {}),
|
|
2052
2052
|
/* @__PURE__ */ o("span", { class: "text-xs text-gray-400", children: a.desc })
|
|
2053
2053
|
] }) : null
|
|
@@ -2056,20 +2056,20 @@ function nr({ block: r, ctx: e }) {
|
|
|
2056
2056
|
}) })
|
|
2057
2057
|
] });
|
|
2058
2058
|
}
|
|
2059
|
-
const
|
|
2060
|
-
heading:
|
|
2061
|
-
text:
|
|
2062
|
-
price_grid:
|
|
2063
|
-
cta_button:
|
|
2064
|
-
auth_panel:
|
|
2065
|
-
current_session:
|
|
2066
|
-
features_list:
|
|
2067
|
-
tokenization_gate:
|
|
2068
|
-
guarantee_badge:
|
|
2069
|
-
offer_banner:
|
|
2059
|
+
const or = {
|
|
2060
|
+
heading: Yt,
|
|
2061
|
+
text: tr,
|
|
2062
|
+
price_grid: Xt,
|
|
2063
|
+
cta_button: qt,
|
|
2064
|
+
auth_panel: Be,
|
|
2065
|
+
current_session: Nt,
|
|
2066
|
+
features_list: Ft,
|
|
2067
|
+
tokenization_gate: ir,
|
|
2068
|
+
guarantee_badge: $t,
|
|
2069
|
+
offer_banner: Lt
|
|
2070
2070
|
};
|
|
2071
|
-
function
|
|
2072
|
-
const a =
|
|
2071
|
+
function sr({ layout: r, bootstrap: e, onAction: t, auth: n, authSession: i, hasTopBanner: s }) {
|
|
2072
|
+
const a = Ze(() => {
|
|
2073
2073
|
for (const v of r.blocks)
|
|
2074
2074
|
if (v.type === "price_grid" && v.popular_price_id && e.prices.some((m) => m.id === v.popular_price_id))
|
|
2075
2075
|
return v.popular_price_id;
|
|
@@ -2082,10 +2082,10 @@ function or({ layout: r, bootstrap: e, onAction: t, auth: n, authSession: i, has
|
|
|
2082
2082
|
auth: n,
|
|
2083
2083
|
authSession: i
|
|
2084
2084
|
}, d = r.blocks.findIndex((v) => v.type === "cta_button"), g = d === -1 ? r.blocks : r.blocks.slice(0, d), _ = d === -1 ? [] : r.blocks.slice(d), p = (v, m) => {
|
|
2085
|
-
const A =
|
|
2085
|
+
const A = or[v.type];
|
|
2086
2086
|
return A ? /* @__PURE__ */ o(A, { block: v, ctx: h }, `${v.type}-${m}`) : (typeof console < "u" && console.warn(`[paywall] unknown block type: ${v.type}`), null);
|
|
2087
2087
|
};
|
|
2088
|
-
return /* @__PURE__ */ u(
|
|
2088
|
+
return /* @__PURE__ */ u(le, { children: [
|
|
2089
2089
|
/* @__PURE__ */ o("div", { class: "flex-1 min-h-0 overflow-y-auto px-6 pb-3 pt-6 sm:px-8 sm:pb-4 sm:pt-8", children: /* @__PURE__ */ o("div", { class: "flex flex-col gap-6", children: g.map(p) }) }),
|
|
2090
2090
|
_.length > 0 ? (
|
|
2091
2091
|
// Тонкий shadow-top вместо border-t — создаёт depth, читается как
|
|
@@ -2102,13 +2102,13 @@ function or({ layout: r, bootstrap: e, onAction: t, auth: n, authSession: i, has
|
|
|
2102
2102
|
) : null
|
|
2103
2103
|
] });
|
|
2104
2104
|
}
|
|
2105
|
-
function
|
|
2105
|
+
function ar(r, e, t, n) {
|
|
2106
2106
|
return r ? n ? { open: !0, view: "purchased", error: null, processing: !1 } : e.status === "idle" || e.status === "loading" ? { open: !0, view: "loading", error: null, processing: !1 } : e.status === "error" ? { open: !0, view: "error", error: e.error, processing: !1 } : t.kind === "support" ? { open: !0, view: "support", error: null, processing: !1 } : t.kind === "auth_gate" ? { open: !0, view: "auth", error: null, processing: !1 } : t.kind === "awaiting_payment" ? { open: !0, view: "awaiting_payment", error: null, processing: !1 } : t.kind === "popup_blocked" ? { open: !0, view: "popup_blocked", error: null, processing: !1 } : t.kind === "purchase_success" ? { open: !0, view: "purchased", error: null, processing: !1 } : t.kind === "verifying" ? { open: !0, view: "loading", error: null, processing: !1 } : { open: !0, view: "layout", error: null, processing: !1 } : { open: !1, view: null, error: null, processing: !1 };
|
|
2107
2107
|
}
|
|
2108
|
-
function
|
|
2108
|
+
function lr(r, e) {
|
|
2109
2109
|
return r.open === e.open && r.view === e.view && r.error === e.error && r.processing === e.processing;
|
|
2110
2110
|
}
|
|
2111
|
-
function
|
|
2111
|
+
function cr({
|
|
2112
2112
|
client: r,
|
|
2113
2113
|
open: e,
|
|
2114
2114
|
onClose: t,
|
|
@@ -2141,8 +2141,8 @@ function lr({
|
|
|
2141
2141
|
} : { kind: "layout" }), C = i === "awaiting_payment" || i === "popup_blocked" || i === "auth" && !!a, I = j(!1), O = j(null);
|
|
2142
2142
|
P(() => {
|
|
2143
2143
|
if (!d) return;
|
|
2144
|
-
const x =
|
|
2145
|
-
f &&
|
|
2144
|
+
const x = ar(e, p, b, c), f = O.current;
|
|
2145
|
+
f && lr(f, x) || (O.current = x, d(x));
|
|
2146
2146
|
}, [e, p, b, c, d]), P(() => {
|
|
2147
2147
|
if (r.auth)
|
|
2148
2148
|
return r.auth.onAuthChange((x, f) => A(f));
|
|
@@ -2172,7 +2172,7 @@ function lr({
|
|
|
2172
2172
|
}), () => {
|
|
2173
2173
|
x = !0;
|
|
2174
2174
|
};
|
|
2175
|
-
}, [e, r]),
|
|
2175
|
+
}, [e, r]), Ye(() => {
|
|
2176
2176
|
if (!e) {
|
|
2177
2177
|
y({ kind: "layout" }), I.current = !1;
|
|
2178
2178
|
return;
|
|
@@ -2194,7 +2194,7 @@ function lr({
|
|
|
2194
2194
|
}, [e, i, a, l]);
|
|
2195
2195
|
const M = async (x) => {
|
|
2196
2196
|
try {
|
|
2197
|
-
const f = r.getCachedOffers?.() ?? null, w = f ?
|
|
2197
|
+
const f = r.getCachedOffers?.() ?? null, w = f ? V(f, x, { readStart: N }) : null, B = await r.createCheckout({
|
|
2198
2198
|
priceId: x,
|
|
2199
2199
|
offerId: w?.id,
|
|
2200
2200
|
ignoreActivePurchase: h === !0
|
|
@@ -2284,14 +2284,14 @@ function lr({
|
|
|
2284
2284
|
n("error", new L("no_price", "No price selected"));
|
|
2285
2285
|
return;
|
|
2286
2286
|
}
|
|
2287
|
-
const B = p.data.settings.checkout_mode ?? "guest", $ = r.auth?.getCachedSession() ?? null,
|
|
2288
|
-
if (B === "preauth" && !!r.auth && !
|
|
2287
|
+
const B = p.data.settings.checkout_mode ?? "guest", $ = r.auth?.getCachedSession() ?? null, ze = !!$ && !$.user.is_anonymous;
|
|
2288
|
+
if (B === "preauth" && !!r.auth && !ze) {
|
|
2289
2289
|
y({ kind: "auth_gate", pendingCheckout: { priceId: w } });
|
|
2290
2290
|
return;
|
|
2291
2291
|
}
|
|
2292
2292
|
await M(w);
|
|
2293
2293
|
}
|
|
2294
|
-
}, z = p.status === "ready" ? p.data.settings.brand_color : null, T = p.status === "ready" ? p.data.settings.allow_close !== !1 : !0, q = b.kind === "layout" && p.status === "ready" ?
|
|
2294
|
+
}, z = p.status === "ready" ? p.data.settings.brand_color : null, T = p.status === "ready" ? p.data.settings.allow_close !== !1 : !0, q = b.kind === "layout" && p.status === "ready" ? Pe(p.data.offers) : null, U = q ? /* @__PURE__ */ o(Mt, { offer: q }) : null, K = {
|
|
2295
2295
|
type: "auth_panel",
|
|
2296
2296
|
// Заголовок не задаём — AuthGate сам решит по intent'у (restore →
|
|
2297
2297
|
// "Restore Purchases", остальные → дефолтный "Welcome back!").
|
|
@@ -2301,8 +2301,8 @@ function lr({
|
|
|
2301
2301
|
// чем хотим показывать "Signed in as ..." промежуточным экраном.
|
|
2302
2302
|
hide_when_authenticated: !1,
|
|
2303
2303
|
providers: p.status === "ready" ? p.data.settings.auth_providers : void 0
|
|
2304
|
-
},
|
|
2305
|
-
|
|
2304
|
+
}, H = b.kind === "support" ? /* @__PURE__ */ o(
|
|
2305
|
+
Bt,
|
|
2306
2306
|
{
|
|
2307
2307
|
client: r,
|
|
2308
2308
|
authSession: m,
|
|
@@ -2311,8 +2311,8 @@ function lr({
|
|
|
2311
2311
|
b.origin === "standalone" ? t() : y({ kind: "layout" });
|
|
2312
2312
|
}
|
|
2313
2313
|
}
|
|
2314
|
-
) : null,
|
|
2315
|
-
return /* @__PURE__ */ o(at, { bootstrap:
|
|
2314
|
+
) : null, X = b.kind === "auth_gate" && b.origin !== "standalone" || b.kind === "support", J = p.status === "ready" ? p.data : null;
|
|
2315
|
+
return /* @__PURE__ */ o(at, { bootstrap: J, forceLocale: _, children: /* @__PURE__ */ o(
|
|
2316
2316
|
lt,
|
|
2317
2317
|
{
|
|
2318
2318
|
open: e,
|
|
@@ -2320,13 +2320,13 @@ function lr({
|
|
|
2320
2320
|
brandColor: z,
|
|
2321
2321
|
topBanner: U,
|
|
2322
2322
|
allowClose: T,
|
|
2323
|
-
hideCloseButton:
|
|
2323
|
+
hideCloseButton: X,
|
|
2324
2324
|
inline: g,
|
|
2325
2325
|
labelledBy: "pw-title",
|
|
2326
|
-
children: c ? /* @__PURE__ */ o(
|
|
2326
|
+
children: c ? /* @__PURE__ */ o(_e, { onContinue: t }) : b.kind === "purchase_success" ? /* @__PURE__ */ o(_e, { restored: b.restored, onContinue: t }) : H || (p.status === "loading" || p.status === "idle" || b.kind === "verifying" ? /* @__PURE__ */ o(ur, { verifying: b.kind === "verifying" }) : p.status === "error" ? /* @__PURE__ */ o(dr, { message: p.error.message }) : b.kind === "auth_gate" && r.auth ? /* @__PURE__ */ o(
|
|
2327
2327
|
St,
|
|
2328
2328
|
{
|
|
2329
|
-
block:
|
|
2329
|
+
block: K,
|
|
2330
2330
|
bootstrap: p.data,
|
|
2331
2331
|
auth: r.auth,
|
|
2332
2332
|
authSession: m,
|
|
@@ -2338,7 +2338,7 @@ function lr({
|
|
|
2338
2338
|
}
|
|
2339
2339
|
}
|
|
2340
2340
|
) : b.kind === "awaiting_payment" ? /* @__PURE__ */ o(
|
|
2341
|
-
|
|
2341
|
+
pr,
|
|
2342
2342
|
{
|
|
2343
2343
|
client: r,
|
|
2344
2344
|
onBack: () => y({ kind: "layout" }),
|
|
@@ -2353,8 +2353,8 @@ function lr({
|
|
|
2353
2353
|
},
|
|
2354
2354
|
onRetry: () => M(b.priceId)
|
|
2355
2355
|
}
|
|
2356
|
-
) : b.kind === "popup_blocked" ? /* @__PURE__ */ o(
|
|
2357
|
-
|
|
2356
|
+
) : b.kind === "popup_blocked" ? /* @__PURE__ */ o(hr, { onReopen: () => R(b.priceId, b.url) }) : /* @__PURE__ */ o(
|
|
2357
|
+
sr,
|
|
2358
2358
|
{
|
|
2359
2359
|
layout: p.data.layout,
|
|
2360
2360
|
bootstrap: p.data,
|
|
@@ -2366,14 +2366,14 @@ function lr({
|
|
|
2366
2366
|
}
|
|
2367
2367
|
) });
|
|
2368
2368
|
}
|
|
2369
|
-
function
|
|
2369
|
+
function ur({ verifying: r }) {
|
|
2370
2370
|
const { t: e } = S();
|
|
2371
2371
|
return /* @__PURE__ */ u("div", { class: "flex flex-col items-center justify-center gap-3 py-12", children: [
|
|
2372
2372
|
/* @__PURE__ */ o("span", { class: "inline-block h-7 w-7 animate-spin rounded-full border-[2.5px] border-gray-200 border-t-[var(--pw-accent)]" }),
|
|
2373
2373
|
/* @__PURE__ */ o("span", { class: "text-xs font-medium tracking-wide text-gray-500", children: r ? e("modal.verifying_subscription", "Checking your subscription…") : e("modal.loading", "Loading…") })
|
|
2374
2374
|
] });
|
|
2375
2375
|
}
|
|
2376
|
-
function
|
|
2376
|
+
function dr({ message: r }) {
|
|
2377
2377
|
const { t: e } = S();
|
|
2378
2378
|
return /* @__PURE__ */ u("div", { class: "flex flex-col items-center gap-2 py-8 text-center", children: [
|
|
2379
2379
|
/* @__PURE__ */ o("div", { class: "flex h-11 w-11 items-center justify-center rounded-full bg-red-50", children: /* @__PURE__ */ u("svg", { width: "20", height: "20", viewBox: "0 0 20 20", fill: "none", "aria-hidden": "true", children: [
|
|
@@ -2384,7 +2384,7 @@ function ur({ message: r }) {
|
|
|
2384
2384
|
/* @__PURE__ */ o("p", { class: "text-xs leading-relaxed text-gray-500", children: r })
|
|
2385
2385
|
] });
|
|
2386
2386
|
}
|
|
2387
|
-
function
|
|
2387
|
+
function hr({ onReopen: r }) {
|
|
2388
2388
|
const { t: e } = S();
|
|
2389
2389
|
return /* @__PURE__ */ u("div", { class: "flex flex-col items-center gap-3 py-8 text-center", children: [
|
|
2390
2390
|
/* @__PURE__ */ o(
|
|
@@ -2451,7 +2451,7 @@ function dr({ onReopen: r }) {
|
|
|
2451
2451
|
)
|
|
2452
2452
|
] });
|
|
2453
2453
|
}
|
|
2454
|
-
function
|
|
2454
|
+
function pr({
|
|
2455
2455
|
client: r,
|
|
2456
2456
|
onBack: e,
|
|
2457
2457
|
onReopen: t,
|
|
@@ -2552,7 +2552,7 @@ function hr({
|
|
|
2552
2552
|
)
|
|
2553
2553
|
] });
|
|
2554
2554
|
}
|
|
2555
|
-
function
|
|
2555
|
+
function _e({
|
|
2556
2556
|
onContinue: r,
|
|
2557
2557
|
restored: e = !1
|
|
2558
2558
|
}) {
|
|
@@ -2601,17 +2601,17 @@ function ve({
|
|
|
2601
2601
|
)
|
|
2602
2602
|
] });
|
|
2603
2603
|
}
|
|
2604
|
-
const
|
|
2605
|
-
class
|
|
2604
|
+
const fr = 10 * 6e4, gr = 5e3, mr = 3e4;
|
|
2605
|
+
class yr {
|
|
2606
2606
|
constructor(e) {
|
|
2607
2607
|
this.timer = null, this.timeoutTimer = null, this.visibilityHandler = null, this.focusHandler = null, this.messageHandler = null, this.stopped = !1, this.checking = !1, this.opts = {
|
|
2608
2608
|
client: e.client,
|
|
2609
2609
|
onActive: e.onActive,
|
|
2610
2610
|
onTimeout: e.onTimeout ?? (() => {
|
|
2611
2611
|
}),
|
|
2612
|
-
timeoutMs: e.timeoutMs ??
|
|
2613
|
-
visibleIntervalMs: e.visibleIntervalMs ??
|
|
2614
|
-
hiddenIntervalMs: e.hiddenIntervalMs ??
|
|
2612
|
+
timeoutMs: e.timeoutMs ?? fr,
|
|
2613
|
+
visibleIntervalMs: e.visibleIntervalMs ?? gr,
|
|
2614
|
+
hiddenIntervalMs: e.hiddenIntervalMs ?? mr
|
|
2615
2615
|
};
|
|
2616
2616
|
}
|
|
2617
2617
|
start() {
|
|
@@ -2650,10 +2650,10 @@ class mr {
|
|
|
2650
2650
|
!t || typeof t != "object" || t.type === "paywall_purchase" && this.check();
|
|
2651
2651
|
}
|
|
2652
2652
|
}
|
|
2653
|
-
function
|
|
2653
|
+
function br() {
|
|
2654
2654
|
return !(typeof document > "u" || typeof window > "u" || typeof location < "u" && location.protocol === "chrome-extension:");
|
|
2655
2655
|
}
|
|
2656
|
-
const
|
|
2656
|
+
const ae = {
|
|
2657
2657
|
open: !1,
|
|
2658
2658
|
view: null,
|
|
2659
2659
|
error: null,
|
|
@@ -2663,11 +2663,11 @@ const se = {
|
|
|
2663
2663
|
priceId: "paywall_price_id",
|
|
2664
2664
|
sessionId: "paywall_session_id"
|
|
2665
2665
|
};
|
|
2666
|
-
let
|
|
2666
|
+
let xr = class {
|
|
2667
2667
|
constructor(e) {
|
|
2668
|
-
this.handle = null, this.isOpen = !1, this.listeners = /* @__PURE__ */ new Map(), this.userUnsub = null, this.authUnsub = null, this.watcher = null, this.tracker = null, this.purchased = !1, this.trialStore = null, this.trialStoreConfig = null, this.lastTrialStatus = null, this.trialExpiredFired = !1, this.lastVisibility = null, this.currentState =
|
|
2669
|
-
const { auth: t, ownsAuth: n } =
|
|
2670
|
-
this.auth = t, this.ownsAuth = n, this.billing = e.client ?? new
|
|
2668
|
+
this.handle = null, this.isOpen = !1, this.listeners = /* @__PURE__ */ new Map(), this.userUnsub = null, this.authUnsub = null, this.watcher = null, this.tracker = null, this.purchased = !1, this.trialStore = null, this.trialStoreConfig = null, this.lastTrialStatus = null, this.trialExpiredFired = !1, this.lastVisibility = null, this.currentState = ae, this.stateListeners = /* @__PURE__ */ new Set();
|
|
2669
|
+
const { auth: t, ownsAuth: n } = wr(e);
|
|
2670
|
+
this.auth = t, this.ownsAuth = n, this.billing = e.client ?? new qe({ ...e, auth: this.auth }), this.host = e.host, this.shadowMode = e.shadowMode ?? "closed", this.mountThenLoad = e.mountThenLoad ?? !0, this.inline = e.inline === !0, this.forceLocale = e.locale ?? null, this.userUnsub = this.billing.onUserChange((i) => {
|
|
2671
2671
|
this.emit("userChange", i);
|
|
2672
2672
|
}), this.auth && (this.authUnsub = this.auth.onAuthChange((i, s) => {
|
|
2673
2673
|
this.emit("authChange", { event: i, session: s });
|
|
@@ -2678,7 +2678,7 @@ let br = class {
|
|
|
2678
2678
|
const t = typeof e == "object" && e !== null ? e : {};
|
|
2679
2679
|
if (t.enabled === !1) return;
|
|
2680
2680
|
const n = t.endpoint ?? `${this.billing.apiOrigin}/api/v1/paywall/${this.billing.paywallId}/events`;
|
|
2681
|
-
this.tracker = new
|
|
2681
|
+
this.tracker = new Ne({
|
|
2682
2682
|
endpoint: n,
|
|
2683
2683
|
paywallId: this.billing.paywallId,
|
|
2684
2684
|
capabilities: this.billing.capabilities,
|
|
@@ -3160,11 +3160,11 @@ let br = class {
|
|
|
3160
3160
|
});
|
|
3161
3161
|
}
|
|
3162
3162
|
ensureTrialStore(e) {
|
|
3163
|
-
if (this.trialStore && this.trialStoreConfig &&
|
|
3163
|
+
if (this.trialStore && this.trialStoreConfig && _r(this.trialStoreConfig, e))
|
|
3164
3164
|
return this.trialStore;
|
|
3165
3165
|
this.trialStoreConfig = e;
|
|
3166
3166
|
const t = this.billing.createTrialStore;
|
|
3167
|
-
return this.trialStore = typeof t == "function" ? t.call(this.billing, e) :
|
|
3167
|
+
return this.trialStore = typeof t == "function" ? t.call(this.billing, e) : Fe(this.billing.getStorage(), this.billing.paywallId, e), this.trialStore;
|
|
3168
3168
|
}
|
|
3169
3169
|
mountAndShow(e, t = {}) {
|
|
3170
3170
|
const n = t.renew === !0, i = t.authMode, a = e === "auth" || e === "awaiting_payment" || e === "popup_blocked" ? t.checkoutPriceId ?? null : null, l = e === "awaiting_payment" || e === "popup_blocked" ? t.checkoutUrl ?? null : null;
|
|
@@ -3181,7 +3181,7 @@ let br = class {
|
|
|
3181
3181
|
return;
|
|
3182
3182
|
}
|
|
3183
3183
|
this.isOpen = !0, this.handle = tt(
|
|
3184
|
-
|
|
3184
|
+
cr,
|
|
3185
3185
|
{
|
|
3186
3186
|
client: this.billing,
|
|
3187
3187
|
open: !0,
|
|
@@ -3203,7 +3203,7 @@ let br = class {
|
|
|
3203
3203
|
), this.emit("open");
|
|
3204
3204
|
}
|
|
3205
3205
|
applyState(e) {
|
|
3206
|
-
if (!
|
|
3206
|
+
if (!vr(this.currentState, e)) {
|
|
3207
3207
|
this.currentState = e;
|
|
3208
3208
|
for (const t of this.stateListeners)
|
|
3209
3209
|
try {
|
|
@@ -3305,10 +3305,10 @@ let br = class {
|
|
|
3305
3305
|
getOfferForPrice(e) {
|
|
3306
3306
|
const t = this.billing.getCachedOffers();
|
|
3307
3307
|
if (!t) return null;
|
|
3308
|
-
const n =
|
|
3309
|
-
return n ?
|
|
3308
|
+
const n = Ce(t, e);
|
|
3309
|
+
return n ? Ie(n, {
|
|
3310
3310
|
now: Date.now(),
|
|
3311
|
-
readStart:
|
|
3311
|
+
readStart: N
|
|
3312
3312
|
}) : null;
|
|
3313
3313
|
}
|
|
3314
3314
|
/** Снимок текущего «языка юзера» — proxy над `billing.getUserLanguage()`.
|
|
@@ -3399,7 +3399,7 @@ let br = class {
|
|
|
3399
3399
|
// В extension popup runtime — no-op (popup не доживёт). Там полагаемся на
|
|
3400
3400
|
// bootstrap при следующем открытии.
|
|
3401
3401
|
startUserWatcher() {
|
|
3402
|
-
this.watcher ||
|
|
3402
|
+
this.watcher || br() && (this.watcher = new yr({
|
|
3403
3403
|
client: this.billing,
|
|
3404
3404
|
onActive: (e) => {
|
|
3405
3405
|
this.watcher = null, this.emit("purchase_completed", { priceId: null, sessionId: null });
|
|
@@ -3418,7 +3418,7 @@ let br = class {
|
|
|
3418
3418
|
}), this.watcher.start());
|
|
3419
3419
|
}
|
|
3420
3420
|
close() {
|
|
3421
|
-
!this.isOpen || !this.handle || (this.isOpen = !1, this.purchased = !1, this.handle.update({ open: !1, purchased: !1 }), this.applyState(
|
|
3421
|
+
!this.isOpen || !this.handle || (this.isOpen = !1, this.purchased = !1, this.handle.update({ open: !1, purchased: !1 }), this.applyState(ae), this.emit("close"));
|
|
3422
3422
|
}
|
|
3423
3423
|
/**
|
|
3424
3424
|
* Сканирует текущий URL на маркеры возврата с checkout и эмитит
|
|
@@ -3428,23 +3428,23 @@ let br = class {
|
|
|
3428
3428
|
*/
|
|
3429
3429
|
checkReturn() {
|
|
3430
3430
|
if (typeof window > "u") return;
|
|
3431
|
-
const e = new URL(window.location.href), t =
|
|
3431
|
+
const e = new URL(window.location.href), t = Se(e.hash.replace(/^#/, "")), n = Se(e.search.replace(/^\?/, "")), i = t ?? n;
|
|
3432
3432
|
i && (i.status === "paid" ? (this.emit("purchase_completed", {
|
|
3433
3433
|
priceId: i.priceId,
|
|
3434
3434
|
sessionId: i.sessionId
|
|
3435
|
-
}),
|
|
3435
|
+
}), Sr(i)) : (i.status === "failed" || i.status === "cancelled") && this.emit("purchase_failed", { reason: i.status }), Cr(e));
|
|
3436
3436
|
}
|
|
3437
3437
|
destroy() {
|
|
3438
|
-
this.tracker?.destroy(), this.tracker = null, this.listeners.clear(), this.stateListeners.clear(), this.watcher?.stop(), this.watcher = null, this.userUnsub?.(), this.userUnsub = null, this.authUnsub?.(), this.authUnsub = null, this.ownsAuth && this.auth && this.auth.destroy?.(), this.ownsAuth = !1, this.billing.destroy?.(), this.handle?.unmount(), this.handle = null, this.isOpen = !1, this.currentState =
|
|
3438
|
+
this.tracker?.destroy(), this.tracker = null, this.listeners.clear(), this.stateListeners.clear(), this.watcher?.stop(), this.watcher = null, this.userUnsub?.(), this.userUnsub = null, this.authUnsub?.(), this.authUnsub = null, this.ownsAuth && this.auth && this.auth.destroy?.(), this.ownsAuth = !1, this.billing.destroy?.(), this.handle?.unmount(), this.handle = null, this.isOpen = !1, this.currentState = ae;
|
|
3439
3439
|
}
|
|
3440
3440
|
};
|
|
3441
|
-
function
|
|
3441
|
+
function wr(r) {
|
|
3442
3442
|
if (!r.auth) return { auth: void 0, ownsAuth: !1 };
|
|
3443
|
-
if (r.auth instanceof
|
|
3443
|
+
if (r.auth instanceof de || kr(r.auth))
|
|
3444
3444
|
return { auth: r.auth, ownsAuth: !1 };
|
|
3445
3445
|
const e = r.auth === !0 ? {} : r.auth;
|
|
3446
3446
|
return {
|
|
3447
|
-
auth: new
|
|
3447
|
+
auth: new de({
|
|
3448
3448
|
paywallId: r.paywallId,
|
|
3449
3449
|
apiOrigin: e.apiOrigin ?? r.apiOrigin,
|
|
3450
3450
|
storage: e.storage ?? r.storage,
|
|
@@ -3454,18 +3454,18 @@ function xr(r) {
|
|
|
3454
3454
|
ownsAuth: !0
|
|
3455
3455
|
};
|
|
3456
3456
|
}
|
|
3457
|
-
function
|
|
3457
|
+
function kr(r) {
|
|
3458
3458
|
if (typeof r != "object" || r === null) return !1;
|
|
3459
3459
|
const e = r;
|
|
3460
3460
|
return typeof e.onAuthChange == "function" && typeof e.getCachedSession == "function" && typeof e.signOut == "function";
|
|
3461
3461
|
}
|
|
3462
|
-
function
|
|
3462
|
+
function vr(r, e) {
|
|
3463
3463
|
return r.open === e.open && r.view === e.view && r.error === e.error && r.processing === e.processing;
|
|
3464
3464
|
}
|
|
3465
|
-
function
|
|
3465
|
+
function _r(r, e) {
|
|
3466
3466
|
return r.mode === e.mode && r.payload === e.payload && r.storage === e.storage;
|
|
3467
3467
|
}
|
|
3468
|
-
function
|
|
3468
|
+
function Se(r) {
|
|
3469
3469
|
if (!r) return null;
|
|
3470
3470
|
const e = new URLSearchParams(r), t = e.get(F.status);
|
|
3471
3471
|
return t ? {
|
|
@@ -3474,7 +3474,7 @@ function _e(r) {
|
|
|
3474
3474
|
sessionId: e.get(F.sessionId)
|
|
3475
3475
|
} : null;
|
|
3476
3476
|
}
|
|
3477
|
-
function
|
|
3477
|
+
function Sr(r) {
|
|
3478
3478
|
if (!(typeof window > "u" || !window.opener))
|
|
3479
3479
|
try {
|
|
3480
3480
|
window.opener.postMessage(
|
|
@@ -3489,7 +3489,7 @@ function _r(r) {
|
|
|
3489
3489
|
} catch {
|
|
3490
3490
|
}
|
|
3491
3491
|
}
|
|
3492
|
-
function
|
|
3492
|
+
function Cr(r) {
|
|
3493
3493
|
const e = (n, i) => {
|
|
3494
3494
|
if (!n) return "";
|
|
3495
3495
|
const s = new URLSearchParams(n.replace(/^[?#]/, ""));
|
|
@@ -3499,7 +3499,7 @@ function Sr(r) {
|
|
|
3499
3499
|
}, t = r.pathname + e(r.search, "?") + e(r.hash, "#");
|
|
3500
3500
|
window.history.replaceState(null, "", t);
|
|
3501
3501
|
}
|
|
3502
|
-
class
|
|
3502
|
+
class Ir {
|
|
3503
3503
|
constructor(e, t, n) {
|
|
3504
3504
|
this.transport = e, this.paywallId = t, this.config = n;
|
|
3505
3505
|
}
|
|
@@ -3522,7 +3522,7 @@ class Cr {
|
|
|
3522
3522
|
});
|
|
3523
3523
|
}
|
|
3524
3524
|
}
|
|
3525
|
-
class
|
|
3525
|
+
class Ar {
|
|
3526
3526
|
constructor(e, t) {
|
|
3527
3527
|
this.transport = e, this.cachedBootstrap = null, this.cachedUser = null, this.cachedBalances = null, this.identity = null, this.userListeners = /* @__PURE__ */ new Set(), this.balanceListeners = /* @__PURE__ */ new Set(), this.bootstrapListeners = /* @__PURE__ */ new Set(), this.unsubUserBroadcast = null, this.unsubBalancesBroadcast = null, this.paywallId = t.paywallId, this.apiOrigin = t.apiOrigin, this.remoteStorageAdapter = {
|
|
3528
3528
|
getItem: (n) => this.transport.request("storage.get", { key: n }),
|
|
@@ -3709,7 +3709,7 @@ class Ir {
|
|
|
3709
3709
|
* read-modify-write. PaywallUI duck-types этот метод и предпочитает его
|
|
3710
3710
|
* локальной фабрике, если он есть. */
|
|
3711
3711
|
createTrialStore(e) {
|
|
3712
|
-
return new
|
|
3712
|
+
return new Ir(this.transport, this.paywallId, e);
|
|
3713
3713
|
}
|
|
3714
3714
|
// === Identity ===
|
|
3715
3715
|
getIdentity() {
|
|
@@ -3742,10 +3742,10 @@ class Ir {
|
|
|
3742
3742
|
* broadcast'ов от offscreen — чтобы host'овский onUserChange handler
|
|
3743
3743
|
* получил signal независимо от того, кто триггернул обновление. */
|
|
3744
3744
|
applyUser(e) {
|
|
3745
|
-
|
|
3745
|
+
Lr(this.cachedUser, e) || (this.cachedUser = e, this.fireUserListeners(e));
|
|
3746
3746
|
}
|
|
3747
3747
|
applyBalances(e) {
|
|
3748
|
-
|
|
3748
|
+
Mr(this.cachedBalances, e) || (this.cachedBalances = e, this.fireBalanceListeners(e));
|
|
3749
3749
|
}
|
|
3750
3750
|
fireUserListeners(e) {
|
|
3751
3751
|
for (const t of [...this.userListeners])
|
|
@@ -3764,17 +3764,17 @@ class Ir {
|
|
|
3764
3764
|
}
|
|
3765
3765
|
}
|
|
3766
3766
|
}
|
|
3767
|
-
function
|
|
3767
|
+
function Lr(r, e) {
|
|
3768
3768
|
return r === e ? !0 : !r || !e ? !1 : r.has_active_subscription === e.has_active_subscription && (r.purchases?.length ?? 0) === (e.purchases?.length ?? 0);
|
|
3769
3769
|
}
|
|
3770
|
-
function
|
|
3770
|
+
function Mr(r, e) {
|
|
3771
3771
|
if (r === e) return !0;
|
|
3772
3772
|
if (!r || !e || r.length !== e.length) return !1;
|
|
3773
3773
|
for (let t = 0; t < r.length; t++)
|
|
3774
3774
|
if (r[t].type !== e[t].type || r[t].count !== e[t].count) return !1;
|
|
3775
3775
|
return !0;
|
|
3776
3776
|
}
|
|
3777
|
-
class
|
|
3777
|
+
class Er {
|
|
3778
3778
|
constructor(e, t) {
|
|
3779
3779
|
this.transport = e, this.session = null, this.listeners = /* @__PURE__ */ new Set(), this.unsubBroadcast = null, this.paywallId = t.paywallId, this.apiOrigin = t.apiOrigin, this.unsubBroadcast = this.transport.on("authChange", ({ event: n, session: i }) => {
|
|
3780
3780
|
this.applySession(n, i);
|
|
@@ -3892,7 +3892,7 @@ class Mr {
|
|
|
3892
3892
|
"popup_blocked",
|
|
3893
3893
|
"browser blocked auth popup — call from a user gesture"
|
|
3894
3894
|
);
|
|
3895
|
-
|
|
3895
|
+
Pr(n, e.provider);
|
|
3896
3896
|
try {
|
|
3897
3897
|
const { authorizeUrl: i, state: s } = await this.transport.request("auth.oauthStart", {
|
|
3898
3898
|
provider: e.provider,
|
|
@@ -3900,7 +3900,7 @@ class Mr {
|
|
|
3900
3900
|
userMeta: e.userMeta
|
|
3901
3901
|
});
|
|
3902
3902
|
n.name = `pw-oauth-${s}`, n.location.replace(i), e.onPopupOpened?.();
|
|
3903
|
-
const a = await
|
|
3903
|
+
const a = await $e(n, s), l = await this.transport.request("auth.oauthExchange", { state: s, code: a });
|
|
3904
3904
|
return this.applySession("SIGNED_IN", l), l;
|
|
3905
3905
|
} catch (i) {
|
|
3906
3906
|
try {
|
|
@@ -3914,7 +3914,7 @@ class Mr {
|
|
|
3914
3914
|
this.unsubBroadcast?.(), this.unsubBroadcast = null, this.listeners.clear(), this.session = null;
|
|
3915
3915
|
}
|
|
3916
3916
|
applySession(e, t) {
|
|
3917
|
-
if (!
|
|
3917
|
+
if (!Tr(this.session, t)) {
|
|
3918
3918
|
this.session = t;
|
|
3919
3919
|
for (const n of [...this.listeners])
|
|
3920
3920
|
try {
|
|
@@ -3925,17 +3925,17 @@ class Mr {
|
|
|
3925
3925
|
}
|
|
3926
3926
|
}
|
|
3927
3927
|
}
|
|
3928
|
-
function
|
|
3928
|
+
function Tr(r, e) {
|
|
3929
3929
|
return r === e ? !0 : !r || !e ? !1 : r.access_token === e.access_token && r.refresh_token === e.refresh_token && r.expires_at === e.expires_at && r.user.id === e.user.id;
|
|
3930
3930
|
}
|
|
3931
|
-
const
|
|
3931
|
+
const Br = {
|
|
3932
3932
|
google: "Google",
|
|
3933
3933
|
apple: "Apple",
|
|
3934
3934
|
github: "GitHub",
|
|
3935
3935
|
facebook: "Facebook"
|
|
3936
3936
|
};
|
|
3937
|
-
function
|
|
3938
|
-
const t =
|
|
3937
|
+
function Pr(r, e) {
|
|
3938
|
+
const t = Br[e] ?? e;
|
|
3939
3939
|
try {
|
|
3940
3940
|
const n = r.document;
|
|
3941
3941
|
n.title = `Sign in with ${t}`;
|
|
@@ -3950,7 +3950,7 @@ function Br(r, e) {
|
|
|
3950
3950
|
} catch {
|
|
3951
3951
|
}
|
|
3952
3952
|
}
|
|
3953
|
-
class
|
|
3953
|
+
class Or {
|
|
3954
3954
|
constructor(e) {
|
|
3955
3955
|
this.transport = e;
|
|
3956
3956
|
}
|
|
@@ -3962,7 +3962,7 @@ class Pr {
|
|
|
3962
3962
|
});
|
|
3963
3963
|
}
|
|
3964
3964
|
}
|
|
3965
|
-
class
|
|
3965
|
+
class Ur {
|
|
3966
3966
|
constructor(e) {
|
|
3967
3967
|
this.factory = e, this.channel = null, this.channelDisposers = [], this.pending = /* @__PURE__ */ new Map(), this.listeners = /* @__PURE__ */ new Map(), this.destroyed = !1, this.nextId = 0, this.clientId = `c-${Math.random().toString(36).slice(2, 10)}`;
|
|
3968
3968
|
}
|
|
@@ -3976,21 +3976,21 @@ class Or {
|
|
|
3976
3976
|
this.channel = e;
|
|
3977
3977
|
const t = e.onMessage((i) => this.handleMessage(i)), n = e.onDisconnect(() => this.handleDisconnect());
|
|
3978
3978
|
return this.channelDisposers = [t, n], this.request("handshake", {
|
|
3979
|
-
protocolVersion:
|
|
3979
|
+
protocolVersion: Q,
|
|
3980
3980
|
clientId: this.clientId
|
|
3981
3981
|
}).then((i) => {
|
|
3982
|
-
i.protocolVersion !==
|
|
3983
|
-
`[sdk-extension] protocol version mismatch: client=${
|
|
3982
|
+
i.protocolVersion !== Q && console.warn(
|
|
3983
|
+
`[sdk-extension] protocol version mismatch: client=${Q}, offscreen=${i.protocolVersion}. Update host's @monetize.software/sdk-extension.`
|
|
3984
3984
|
);
|
|
3985
3985
|
}).catch(() => {
|
|
3986
3986
|
}), e;
|
|
3987
3987
|
}
|
|
3988
3988
|
handleMessage(e) {
|
|
3989
|
-
if (
|
|
3989
|
+
if (Rr(e)) {
|
|
3990
3990
|
if (e.type === "response") {
|
|
3991
3991
|
const t = this.pending.get(e.id);
|
|
3992
3992
|
if (!t) return;
|
|
3993
|
-
this.pending.delete(e.id), t.signal?.removeEventListener("abort", t.abortListener), e.ok ? t.resolve(e.result) : t.reject(
|
|
3993
|
+
this.pending.delete(e.id), t.signal?.removeEventListener("abort", t.abortListener), e.ok ? t.resolve(e.result) : t.reject(Ve(e.error));
|
|
3994
3994
|
return;
|
|
3995
3995
|
}
|
|
3996
3996
|
if (e.type === "event") {
|
|
@@ -4011,7 +4011,7 @@ class Or {
|
|
|
4011
4011
|
const e = Array.from(this.pending.values());
|
|
4012
4012
|
this.pending.clear();
|
|
4013
4013
|
for (const t of e)
|
|
4014
|
-
t.signal?.removeEventListener("abort", t.abortListener), t.reject(new
|
|
4014
|
+
t.signal?.removeEventListener("abort", t.abortListener), t.reject(new jr());
|
|
4015
4015
|
}
|
|
4016
4016
|
request(e, t, n = {}) {
|
|
4017
4017
|
if (this.destroyed)
|
|
@@ -4067,28 +4067,28 @@ class Or {
|
|
|
4067
4067
|
this.channel?.close(), this.channel = null;
|
|
4068
4068
|
}
|
|
4069
4069
|
}
|
|
4070
|
-
class
|
|
4070
|
+
class jr extends Error {
|
|
4071
4071
|
constructor() {
|
|
4072
4072
|
super("Transport channel disconnected mid-request"), this.code = "transport_disconnected", this.name = "TransportDisconnectedError";
|
|
4073
4073
|
}
|
|
4074
4074
|
}
|
|
4075
|
-
function
|
|
4075
|
+
function Rr(r) {
|
|
4076
4076
|
if (typeof r != "object" || r === null) return !1;
|
|
4077
4077
|
const e = r.type;
|
|
4078
4078
|
return e === "request" || e === "response" || e === "event";
|
|
4079
4079
|
}
|
|
4080
|
-
let
|
|
4081
|
-
function
|
|
4082
|
-
return
|
|
4080
|
+
let Z = null;
|
|
4081
|
+
function Dr() {
|
|
4082
|
+
return Z || (Z = new Ur(() => He(Ke)), Z);
|
|
4083
4083
|
}
|
|
4084
|
-
class
|
|
4084
|
+
class Gr extends xr {
|
|
4085
4085
|
constructor(e) {
|
|
4086
|
-
const t =
|
|
4086
|
+
const t = Dr(), n = new Ar(t, {
|
|
4087
4087
|
paywallId: e.paywallId,
|
|
4088
4088
|
apiOrigin: e.apiOrigin
|
|
4089
4089
|
});
|
|
4090
4090
|
let i;
|
|
4091
|
-
e.auth === !0 ? i = new
|
|
4091
|
+
e.auth === !0 ? i = new Er(t, {
|
|
4092
4092
|
paywallId: e.paywallId,
|
|
4093
4093
|
apiOrigin: e.apiOrigin
|
|
4094
4094
|
}) : e.auth && console.warn(
|
|
@@ -4104,7 +4104,7 @@ class Hr extends br {
|
|
|
4104
4104
|
// Внутренний EventTracker отключаем — единственный tracker живёт в
|
|
4105
4105
|
// offscreen'е. Манчиально подписываемся ниже.
|
|
4106
4106
|
analytics: !1
|
|
4107
|
-
}), this.remoteTracker = null, this.trackerUnsubs = [], e.analytics !== !1 && (this.remoteTracker = new
|
|
4107
|
+
}), this.remoteTracker = null, this.trackerUnsubs = [], e.analytics !== !1 && (this.remoteTracker = new Or(t), this.bindAnalytics());
|
|
4108
4108
|
}
|
|
4109
4109
|
/** Зеркало sdk/PaywallUI.initTracker'овских биндингов, но с RemoteEventTracker.
|
|
4110
4110
|
* Когда @monetize.software/sdk экспоузнет публичный hook для inject'а tracker'а,
|
|
@@ -4162,11 +4162,11 @@ class Hr extends br {
|
|
|
4162
4162
|
}
|
|
4163
4163
|
}
|
|
4164
4164
|
export {
|
|
4165
|
-
|
|
4166
|
-
|
|
4167
|
-
|
|
4168
|
-
|
|
4169
|
-
|
|
4170
|
-
|
|
4165
|
+
Q as PROTOCOL_VERSION,
|
|
4166
|
+
Gr as PaywallUI,
|
|
4167
|
+
Er as RemoteAuthClient,
|
|
4168
|
+
Ar as RemoteBillingClient,
|
|
4169
|
+
Or as RemoteEventTracker,
|
|
4170
|
+
Dr as getContentTransport
|
|
4171
4171
|
};
|
|
4172
4172
|
//# sourceMappingURL=content.js.map
|