@monetize.software/sdk 3.0.0-alpha.2 → 3.0.0-alpha.4
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/chunks/{PaywallUI-CRTEPjJm.js → PaywallUI-2bwf2scV.js} +588 -540
- package/dist/chunks/PaywallUI-2bwf2scV.js.map +1 -0
- package/dist/chunks/PaywallUI-Bu51__PT.js +26 -0
- package/dist/chunks/PaywallUI-Bu51__PT.js.map +1 -0
- package/dist/core.cjs +1 -1
- package/dist/core.cjs.map +1 -1
- package/dist/core.d.ts +71 -6
- package/dist/core.js +296 -249
- package/dist/core.js.map +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +87 -9
- package/dist/index.js +1 -1
- package/dist/ui.cjs +1 -1
- package/dist/ui.d.ts +87 -9
- package/dist/ui.js +1 -1
- package/package.json +32 -31
- package/dist/chunks/PaywallUI-CRTEPjJm.js.map +0 -1
- package/dist/chunks/PaywallUI-CbbcfXXZ.js +0 -26
- package/dist/chunks/PaywallUI-CbbcfXXZ.js.map +0 -1
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import { PaywallError as
|
|
2
|
-
import { render as
|
|
3
|
-
import { jsxs as
|
|
4
|
-
import { useRef as
|
|
5
|
-
const
|
|
1
|
+
import { PaywallError as z, BillingClient as dt, EventTracker as ut, AuthClient as q } from "../core.js";
|
|
2
|
+
import { render as F, h as W } from "preact";
|
|
3
|
+
import { jsxs as c, jsx as r, Fragment as at } from "preact/jsx-runtime";
|
|
4
|
+
import { useRef as L, useEffect as T, useState as v, useMemo as nt } from "preact/hooks";
|
|
5
|
+
const Z = 3600 * 1e3;
|
|
6
6
|
function R(e) {
|
|
7
7
|
return `paywall-${e}-trial-time-first-open`;
|
|
8
8
|
}
|
|
9
|
-
function
|
|
9
|
+
function N(e) {
|
|
10
10
|
return `paywall-${e}-skip-times`;
|
|
11
11
|
}
|
|
12
|
-
class
|
|
12
|
+
class ot {
|
|
13
13
|
constructor(t, i, n) {
|
|
14
14
|
this.storage = t, this.paywallId = i, this.config = n;
|
|
15
15
|
}
|
|
@@ -20,10 +20,10 @@ class st {
|
|
|
20
20
|
return this.config.mode === "time" ? this.recordTime() : this.recordOpens();
|
|
21
21
|
}
|
|
22
22
|
async reset() {
|
|
23
|
-
await this.storage.removeItem(this.config.mode === "time" ? R(this.paywallId) :
|
|
23
|
+
await this.storage.removeItem(this.config.mode === "time" ? R(this.paywallId) : N(this.paywallId));
|
|
24
24
|
}
|
|
25
25
|
async checkTime() {
|
|
26
|
-
const t = this.config.payload *
|
|
26
|
+
const t = this.config.payload * Z, i = await this.storage.getItem(R(this.paywallId)), n = i ? Number(i) : null;
|
|
27
27
|
if (!n || !Number.isFinite(n))
|
|
28
28
|
return {
|
|
29
29
|
mode: "time",
|
|
@@ -44,7 +44,7 @@ class st {
|
|
|
44
44
|
};
|
|
45
45
|
}
|
|
46
46
|
async checkOpens() {
|
|
47
|
-
const t = this.config.payload, i = await this.storage.getItem(
|
|
47
|
+
const t = this.config.payload, i = await this.storage.getItem(N(this.paywallId)), n = i ? Number(i) : 0, a = Number.isFinite(n) ? n : 0, o = a < t, s = Math.max(0, t - a);
|
|
48
48
|
return {
|
|
49
49
|
mode: "opens",
|
|
50
50
|
blocked: o,
|
|
@@ -53,7 +53,7 @@ class st {
|
|
|
53
53
|
};
|
|
54
54
|
}
|
|
55
55
|
async recordTime() {
|
|
56
|
-
const t = this.config.payload *
|
|
56
|
+
const t = this.config.payload * Z, i = R(this.paywallId), n = await this.storage.getItem(i);
|
|
57
57
|
let a = n ? Number(n) : null;
|
|
58
58
|
(!a || !Number.isFinite(a)) && (a = Date.now(), await this.storage.setItem(i, String(a)));
|
|
59
59
|
const o = a + t, s = Math.max(0, o - Date.now());
|
|
@@ -67,7 +67,7 @@ class st {
|
|
|
67
67
|
};
|
|
68
68
|
}
|
|
69
69
|
async recordOpens() {
|
|
70
|
-
const t = this.config.payload, i =
|
|
70
|
+
const t = this.config.payload, i = N(this.paywallId), n = await this.storage.getItem(i), a = n ? Number(n) : 0, o = Number.isFinite(a) ? a : 0, s = Math.min(t, o + 1);
|
|
71
71
|
await this.storage.setItem(i, String(s));
|
|
72
72
|
const l = Math.max(0, t - s);
|
|
73
73
|
return {
|
|
@@ -78,12 +78,12 @@ class st {
|
|
|
78
78
|
};
|
|
79
79
|
}
|
|
80
80
|
}
|
|
81
|
-
let
|
|
82
|
-
class
|
|
81
|
+
let Y = !1;
|
|
82
|
+
class ht {
|
|
83
83
|
constructor(t, i, n) {
|
|
84
|
-
|
|
84
|
+
Y || (Y = !0, console.warn(
|
|
85
85
|
'[paywall] trial.storage="server" is not implemented yet — falling back to client storage. State lives in localStorage; users can reset trial by clearing site data.'
|
|
86
|
-
)), this.fallback = new
|
|
86
|
+
)), this.fallback = new ot(t, i, n);
|
|
87
87
|
}
|
|
88
88
|
check() {
|
|
89
89
|
return this.fallback.check();
|
|
@@ -95,17 +95,17 @@ class pt {
|
|
|
95
95
|
return this.fallback.reset();
|
|
96
96
|
}
|
|
97
97
|
}
|
|
98
|
-
function
|
|
99
|
-
return i.storage === "server" ? new
|
|
98
|
+
function pt(e, t, i) {
|
|
99
|
+
return i.storage === "server" ? new ht(e, t, i) : new ot(e, t, i);
|
|
100
100
|
}
|
|
101
|
-
const lt = '/*! tailwindcss v4.2.4 | MIT License | https://tailwindcss.com */@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-rotate-x:initial;--tw-rotate-y:initial;--tw-rotate-z:initial;--tw-skew-x:initial;--tw-skew-y:initial;--tw-border-style:solid;--tw-gradient-position:initial;--tw-gradient-from:#0000;--tw-gradient-via:#0000;--tw-gradient-to:#0000;--tw-gradient-stops:initial;--tw-gradient-via-stops:initial;--tw-gradient-from-position:0%;--tw-gradient-via-position:50%;--tw-gradient-to-position:100%;--tw-leading:initial;--tw-font-weight:initial;--tw-tracking:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-outline-style:solid;--tw-blur:initial;--tw-brightness:initial;--tw-contrast:initial;--tw-grayscale:initial;--tw-hue-rotate:initial;--tw-invert:initial;--tw-opacity:initial;--tw-saturate:initial;--tw-sepia:initial;--tw-drop-shadow:initial;--tw-drop-shadow-color:initial;--tw-drop-shadow-alpha:100%;--tw-drop-shadow-size:initial;--tw-backdrop-blur:initial;--tw-backdrop-brightness:initial;--tw-backdrop-contrast:initial;--tw-backdrop-grayscale:initial;--tw-backdrop-hue-rotate:initial;--tw-backdrop-invert:initial;--tw-backdrop-opacity:initial;--tw-backdrop-saturate:initial;--tw-backdrop-sepia:initial;--tw-duration:initial;--tw-translate-x:0;--tw-translate-y:0;--tw-translate-z:0}}}@layer theme{:root,:host{--font-sans:ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";--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-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-amber-300:oklch(87.9% .169 91.605);--color-amber-400:oklch(82.8% .189 84.429);--color-amber-950:oklch(27.9% .077 45.635);--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-black:#000;--color-white:#fff;--spacing:.25rem;--container-md:28rem;--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);--font-weight-medium:500;--font-weight-semibold:600;--tracking-tight:-.025em;--tracking-wide:.025em;--tracking-wider:.05em;--leading-tight:1.25;--leading-snug:1.375;--leading-relaxed:1.625;--radius-md:.375rem;--radius-lg:.5rem;--radius-xl:.75rem;--radius-2xl:1rem;--radius-3xl:1.5rem;--animate-spin:spin 1s linear infinite;--animate-ping:ping 1s cubic-bezier(0, 0, .2, 1) infinite;--blur-sm:8px;--blur-md:12px;--default-transition-duration:.15s;--default-transition-timing-function:cubic-bezier(.4, 0, .2, 1);--default-font-family:var(--font-sans);--default-mono-font-family:var(--font-mono)}}@layer base{*,:after,:before,::backdrop{box-sizing:border-box;border:0 solid;margin:0;padding:0}::file-selector-button{box-sizing:border-box;border:0 solid;margin:0;padding:0}html,:host{-webkit-text-size-adjust:100%;tab-size:4;line-height:1.5;font-family:var(--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:var(--default-font-feature-settings,normal);font-variation-settings:var(--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:var(--default-mono-font-family,ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace);font-feature-settings:var(--default-mono-font-feature-settings,normal);font-variation-settings:var(--default-mono-font-variation-settings,normal);font-size:1em}small{font-size:80%}sub,sup{vertical-align:baseline;font-size:75%;line-height:0;position:relative}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{vertical-align:middle;display:block}img,video{max-width:100%;height:auto}button,input,select,optgroup,textarea{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}::file-selector-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}: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:currentColor}@supports (color:color-mix(in lab,red,red)){::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{padding-block:0}::-webkit-datetime-edit-year-field{padding-block:0}::-webkit-datetime-edit-month-field{padding-block:0}::-webkit-datetime-edit-day-field{padding-block:0}::-webkit-datetime-edit-hour-field{padding-block:0}::-webkit-datetime-edit-minute-field{padding-block:0}::-webkit-datetime-edit-second-field{padding-block:0}::-webkit-datetime-edit-millisecond-field{padding-block:0}::-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]){appearance:button}::file-selector-button{appearance:button}::-webkit-inner-spin-button{height:auto}::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}:host{all:initial;color-scheme:light;font-family:ui-sans-serif,system-ui,-apple-system,Segoe UI,Roboto,sans-serif}*,:before,:after{box-sizing:border-box}button{cursor:pointer;font-family:inherit}button:disabled{cursor:not-allowed}[role=button],[role=radio]{cursor:pointer}}@layer components;@layer utilities{.visible{visibility:visible}.absolute{position:absolute}.fixed{position:fixed}.relative{position:relative}.inset-0{inset:calc(var(--spacing) * 0)}.start{inset-inline-start:var(--spacing)}.-top-2\\.5{top:calc(var(--spacing) * -2.5)}.top-3{top:calc(var(--spacing) * 3)}.top-10{top:calc(var(--spacing) * 10)}.right-3{right:calc(var(--spacing) * 3)}.left-4{left:calc(var(--spacing) * 4)}.z-10{z-index:10}.z-\\[2147483647\\]{z-index:2147483647}.container{width:100%}@media(min-width:40rem){.container{max-width:40rem}}@media(min-width:48rem){.container{max-width:48rem}}@media(min-width:64rem){.container{max-width:64rem}}@media(min-width:80rem){.container{max-width:80rem}}@media(min-width:96rem){.container{max-width:96rem}}.mt-0\\.5{margin-top:calc(var(--spacing) * .5)}.mt-1{margin-top:calc(var(--spacing) * 1)}.mt-1\\.5{margin-top:calc(var(--spacing) * 1.5)}.mt-2{margin-top:calc(var(--spacing) * 2)}.mt-2\\.5{margin-top:calc(var(--spacing) * 2.5)}.mt-3{margin-top:calc(var(--spacing) * 3)}.mt-px{margin-top:1px}.-ml-1{margin-left:calc(var(--spacing) * -1)}.block{display:block}.flex{display:flex}.grid{display:grid}.hidden{display:none}.inline{display:inline}.inline-block{display:inline-block}.h-1{height:calc(var(--spacing) * 1)}.h-1\\.5{height:calc(var(--spacing) * 1.5)}.h-4{height:calc(var(--spacing) * 4)}.h-5{height:calc(var(--spacing) * 5)}.h-7{height:calc(var(--spacing) * 7)}.h-8{height:calc(var(--spacing) * 8)}.h-10{height:calc(var(--spacing) * 10)}.h-11{height:calc(var(--spacing) * 11)}.h-12{height:calc(var(--spacing) * 12)}.h-14{height:calc(var(--spacing) * 14)}.h-px{height:1px}.max-h-\\[calc\\(100dvh-1rem\\)\\]{max-height:calc(100dvh - 1rem)}.min-h-\\[104px\\]{min-height:104px}.w-1{width:calc(var(--spacing) * 1)}.w-1\\.5{width:calc(var(--spacing) * 1.5)}.w-4{width:calc(var(--spacing) * 4)}.w-5{width:calc(var(--spacing) * 5)}.w-7{width:calc(var(--spacing) * 7)}.w-8{width:calc(var(--spacing) * 8)}.w-11{width:calc(var(--spacing) * 11)}.w-12{width:calc(var(--spacing) * 12)}.w-14{width:calc(var(--spacing) * 14)}.w-full{width:100%}.max-w-\\[18rem\\]{max-width:18rem}.max-w-\\[20rem\\]{max-width:20rem}.max-w-\\[320px\\]{max-width:320px}.max-w-md{max-width:var(--container-md)}.flex-1{flex:1}.flex-shrink-0{flex-shrink:0}.transform{transform:var(--tw-rotate-x,) var(--tw-rotate-y,) var(--tw-rotate-z,) var(--tw-skew-x,) var(--tw-skew-y,)}.animate-\\[pw-fade-in_180ms_ease-out\\]{animation:.18s ease-out pw-fade-in}.animate-\\[pw-scale-in_220ms_cubic-bezier\\(0\\.16\\,1\\,0\\.3\\,1\\)\\]{animation:.22s cubic-bezier(.16,1,.3,1) pw-scale-in}.animate-ping{animation:var(--animate-ping)}.animate-spin{animation:var(--animate-spin)}.cursor-not-allowed{cursor:not-allowed}.cursor-pointer{cursor:pointer}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.items-center{align-items:center}.items-end{align-items:flex-end}.items-start{align-items:flex-start}.justify-between{justify-content:space-between}.justify-center{justify-content:center}.justify-end{justify-content:flex-end}.gap-0\\.5{gap:calc(var(--spacing) * .5)}.gap-1{gap:calc(var(--spacing) * 1)}.gap-1\\.5{gap:calc(var(--spacing) * 1.5)}.gap-2{gap:calc(var(--spacing) * 2)}.gap-2\\.5{gap:calc(var(--spacing) * 2.5)}.gap-3{gap:calc(var(--spacing) * 3)}.gap-4{gap:calc(var(--spacing) * 4)}.gap-x-3{column-gap:calc(var(--spacing) * 3)}.gap-y-1{row-gap:calc(var(--spacing) * 1)}.self-center{align-self:center}.self-start{align-self:flex-start}.truncate{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.overflow-hidden{overflow:hidden}.overflow-y-auto{overflow-y:auto}.rounded{border-radius:.25rem}.rounded-2xl{border-radius:var(--radius-2xl)}.rounded-3xl{border-radius:var(--radius-3xl)}.rounded-full{border-radius:3.40282e38px}.rounded-lg{border-radius:var(--radius-lg)}.rounded-md{border-radius:var(--radius-md)}.rounded-xl{border-radius:var(--radius-xl)}.border{border-style:var(--tw-border-style);border-width:1px}.border-2{border-style:var(--tw-border-style);border-width:2px}.border-\\[2\\.5px\\]{border-style:var(--tw-border-style);border-width:2.5px}.border-dashed{--tw-border-style:dashed;border-style:dashed}.border-\\[var\\(--pw-accent\\)\\]{border-color:var(--pw-accent)}.border-gray-200{border-color:var(--color-gray-200)}.border-gray-300{border-color:var(--color-gray-300)}.border-red-400{border-color:var(--color-red-400)}.border-white\\/40{border-color:#fff6}@supports (color:color-mix(in lab,red,red)){.border-white\\/40{border-color:color-mix(in oklab,var(--color-white) 40%,transparent)}}.border-t-\\[var\\(--pw-accent\\)\\]{border-top-color:var(--pw-accent)}.border-t-gray-700{border-top-color:var(--color-gray-700)}.border-t-white{border-top-color:var(--color-white)}.bg-\\[color-mix\\(in_srgb\\,var\\(--pw-accent\\)_6\\%\\,white\\)\\]{background-color:var(--pw-accent)}@supports (color:color-mix(in lab,red,red)){.bg-\\[color-mix\\(in_srgb\\,var\\(--pw-accent\\)_6\\%\\,white\\)\\]{background-color:color-mix(in srgb,var(--pw-accent) 6%,white)}}.bg-\\[var\\(--pw-accent\\)\\]{background-color:var(--pw-accent)}.bg-gray-50{background-color:var(--color-gray-50)}.bg-gray-50\\/60{background-color:#f9fafb99}@supports (color:color-mix(in lab,red,red)){.bg-gray-50\\/60{background-color:color-mix(in oklab,var(--color-gray-50) 60%,transparent)}}.bg-gray-300{background-color:var(--color-gray-300)}.bg-red-50{background-color:var(--color-red-50)}.bg-slate-950\\/50{background-color:#02061880}@supports (color:color-mix(in lab,red,red)){.bg-slate-950\\/50{background-color:color-mix(in oklab,var(--color-slate-950) 50%,transparent)}}.bg-white{background-color:var(--color-white)}.bg-white\\/80{background-color:#fffc}@supports (color:color-mix(in lab,red,red)){.bg-white\\/80{background-color:color-mix(in oklab,var(--color-white) 80%,transparent)}}.bg-gradient-to-r{--tw-gradient-position:to right in oklab;background-image:linear-gradient(var(--tw-gradient-stops))}.from-amber-300{--tw-gradient-from:var(--color-amber-300);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.from-gray-200{--tw-gradient-from:var(--color-gray-200);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.from-transparent{--tw-gradient-from:transparent;--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.to-amber-400{--tw-gradient-to:var(--color-amber-400);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.to-gray-200{--tw-gradient-to:var(--color-gray-200);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.to-transparent{--tw-gradient-to:transparent;--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.p-2{padding:calc(var(--spacing) * 2)}.p-3\\.5{padding:calc(var(--spacing) * 3.5)}.p-7{padding:calc(var(--spacing) * 7)}.px-1\\.5{padding-inline:calc(var(--spacing) * 1.5)}.px-2{padding-inline:calc(var(--spacing) * 2)}.px-2\\.5{padding-inline:calc(var(--spacing) * 2.5)}.px-3{padding-inline:calc(var(--spacing) * 3)}.px-3\\.5{padding-inline:calc(var(--spacing) * 3.5)}.px-4{padding-inline:calc(var(--spacing) * 4)}.px-5{padding-inline:calc(var(--spacing) * 5)}.py-0\\.5{padding-block:calc(var(--spacing) * .5)}.py-1{padding-block:calc(var(--spacing) * 1)}.py-1\\.5{padding-block:calc(var(--spacing) * 1.5)}.py-2{padding-block:calc(var(--spacing) * 2)}.py-2\\.5{padding-block:calc(var(--spacing) * 2.5)}.py-3{padding-block:calc(var(--spacing) * 3)}.py-3\\.5{padding-block:calc(var(--spacing) * 3.5)}.py-6{padding-block:calc(var(--spacing) * 6)}.py-8{padding-block:calc(var(--spacing) * 8)}.py-12{padding-block:calc(var(--spacing) * 12)}.text-center{text-align:center}.text-left{text-align:left}.text-2xl{font-size:var(--text-2xl);line-height:var(--tw-leading,var(--text-2xl--line-height))}.text-base{font-size:var(--text-base);line-height:var(--tw-leading,var(--text-base--line-height))}.text-lg{font-size:var(--text-lg);line-height:var(--tw-leading,var(--text-lg--line-height))}.text-sm{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.text-xl{font-size:var(--text-xl);line-height:var(--tw-leading,var(--text-xl--line-height))}.text-xs{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.text-\\[0\\.9375rem\\]{font-size:.9375rem}.text-\\[1\\.625rem\\]{font-size:1.625rem}.text-\\[10px\\]{font-size:10px}.text-\\[11px\\]{font-size:11px}.leading-relaxed{--tw-leading:var(--leading-relaxed);line-height:var(--leading-relaxed)}.leading-snug{--tw-leading:var(--leading-snug);line-height:var(--leading-snug)}.leading-tight{--tw-leading:var(--leading-tight);line-height:var(--leading-tight)}.font-medium{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.font-semibold{--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold)}.tracking-\\[-0\\.02em\\]{--tw-tracking:-.02em;letter-spacing:-.02em}.tracking-\\[0\\.14em\\]{--tw-tracking:.14em;letter-spacing:.14em}.tracking-tight{--tw-tracking:var(--tracking-tight);letter-spacing:var(--tracking-tight)}.tracking-wide{--tw-tracking:var(--tracking-wide);letter-spacing:var(--tracking-wide)}.tracking-wider{--tw-tracking:var(--tracking-wider);letter-spacing:var(--tracking-wider)}.text-\\[var\\(--pw-accent\\)\\]{color:var(--pw-accent)}.text-amber-950{color:var(--color-amber-950)}.text-gray-400{color:var(--color-gray-400)}.text-gray-500{color:var(--color-gray-500)}.text-gray-600{color:var(--color-gray-600)}.text-gray-700{color:var(--color-gray-700)}.text-gray-800{color:var(--color-gray-800)}.text-gray-900{color:var(--color-gray-900)}.text-red-600{color:var(--color-red-600)}.text-red-700{color:var(--color-red-700)}.text-white{color:var(--color-white)}.uppercase{text-transform:uppercase}.underline{text-decoration-line:underline}.underline-offset-2{text-underline-offset:2px}.opacity-40{opacity:.4}.opacity-60{opacity:.6}.shadow{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a), 0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-\\[0_0_0_3px_color-mix\\(in_srgb\\,var\\(--pw-accent\\)_12\\%\\,transparent\\)\\]{--tw-shadow:0 0 0 3px var(--tw-shadow-color,var(--pw-accent))}@supports (color:color-mix(in lab,red,red)){.shadow-\\[0_0_0_3px_color-mix\\(in_srgb\\,var\\(--pw-accent\\)_12\\%\\,transparent\\)\\]{--tw-shadow:0 0 0 3px var(--tw-shadow-color,color-mix(in srgb,var(--pw-accent) 12%,transparent))}}.shadow-\\[0_0_0_3px_color-mix\\(in_srgb\\,var\\(--pw-accent\\)_12\\%\\,transparent\\)\\]{box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-\\[0_1px_0_rgba\\(15\\,23\\,42\\,0\\.02\\)\\]{--tw-shadow:0 1px 0 var(--tw-shadow-color,#0f172a05);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-\\[0_1px_0_rgba\\(15\\,23\\,42\\,0\\.04\\)\\]{--tw-shadow:0 1px 0 var(--tw-shadow-color,#0f172a0a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-sm{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a), 0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.ring,.ring-1{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.ring-8{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(8px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.ring-black\\/5{--tw-ring-color:#0000000d}@supports (color:color-mix(in lab,red,red)){.ring-black\\/5{--tw-ring-color:color-mix(in oklab, var(--color-black) 5%, transparent)}}.outline{outline-style:var(--tw-outline-style);outline-width:1px}.\\!filter{filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)!important}.filter{filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.backdrop-blur-md{--tw-backdrop-blur:blur(var(--blur-md));-webkit-backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,)}.backdrop-blur-sm{--tw-backdrop-blur:blur(var(--blur-sm));-webkit-backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,)}.transition-all{transition-property:all;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-colors{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.duration-150{--tw-duration:.15s;transition-duration:.15s}.outline-none{--tw-outline-style:none;outline-style:none}@media(hover:hover){.group-hover\\:border-gray-400:is(:where(.group):hover *){border-color:var(--color-gray-400)}}.placeholder\\:text-gray-400::placeholder{color:var(--color-gray-400)}@media(hover:hover){.hover\\:-translate-y-px:hover{--tw-translate-y:-1px;translate:var(--tw-translate-x) var(--tw-translate-y)}.hover\\:border-gray-300:hover{border-color:var(--color-gray-300)}.hover\\:border-gray-400:hover{border-color:var(--color-gray-400)}.hover\\:bg-gray-50:hover{background-color:var(--color-gray-50)}.hover\\:bg-gray-50\\/60:hover{background-color:#f9fafb99}@supports (color:color-mix(in lab,red,red)){.hover\\:bg-gray-50\\/60:hover{background-color:color-mix(in oklab,var(--color-gray-50) 60%,transparent)}}.hover\\:bg-gray-100:hover{background-color:var(--color-gray-100)}.hover\\:bg-white:hover{background-color:var(--color-white)}.hover\\:text-gray-700:hover{color:var(--color-gray-700)}.hover\\:text-gray-900:hover{color:var(--color-gray-900)}.hover\\:text-red-600:hover{color:var(--color-red-600)}.hover\\:underline:hover{text-decoration-line:underline}.hover\\:opacity-90:hover{opacity:.9}.hover\\:shadow-sm:hover{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a), 0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.hover\\:brightness-105:hover{--tw-brightness:brightness(105%);filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}}.focus\\:border-\\[var\\(--pw-accent\\)\\]:focus{border-color:var(--pw-accent)}.focus\\:border-red-500:focus{border-color:var(--color-red-500)}.focus\\:shadow-\\[0_0_0_3px_color-mix\\(in_srgb\\,var\\(--pw-accent\\)_18\\%\\,transparent\\)\\]:focus{--tw-shadow:0 0 0 3px var(--tw-shadow-color,var(--pw-accent))}@supports (color:color-mix(in lab,red,red)){.focus\\:shadow-\\[0_0_0_3px_color-mix\\(in_srgb\\,var\\(--pw-accent\\)_18\\%\\,transparent\\)\\]:focus{--tw-shadow:0 0 0 3px var(--tw-shadow-color,color-mix(in srgb,var(--pw-accent) 18%,transparent))}}.focus\\:shadow-\\[0_0_0_3px_color-mix\\(in_srgb\\,var\\(--pw-accent\\)_18\\%\\,transparent\\)\\]:focus{box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.focus\\:shadow-\\[0_0_0_3px_rgba\\(239\\,68\\,68\\,0\\.18\\)\\]:focus{--tw-shadow:0 0 0 3px var(--tw-shadow-color,#ef44442e);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.focus\\:outline-none:focus{--tw-outline-style:none;outline-style:none}.focus-visible\\:underline:focus-visible{text-decoration-line:underline}.focus-visible\\:ring-2:focus-visible{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.focus-visible\\:ring-\\[var\\(--pw-accent\\)\\]:focus-visible{--tw-ring-color:var(--pw-accent)}.focus-visible\\:ring-offset-2:focus-visible{--tw-ring-offset-width:2px;--tw-ring-offset-shadow:var(--tw-ring-inset,) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color)}.active\\:translate-y-0:active{--tw-translate-y:calc(var(--spacing) * 0);translate:var(--tw-translate-x) var(--tw-translate-y)}.active\\:brightness-95:active{--tw-brightness:brightness(95%);filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.disabled\\:cursor-not-allowed:disabled{cursor:not-allowed}.disabled\\:opacity-60:disabled{opacity:.6}@media(hover:hover){.disabled\\:hover\\:translate-y-0:disabled:hover{--tw-translate-y:calc(var(--spacing) * 0);translate:var(--tw-translate-x) var(--tw-translate-y)}.disabled\\:hover\\:shadow-\\[0_1px_0_rgba\\(15\\,23\\,42\\,0\\.04\\)\\]:disabled:hover{--tw-shadow:0 1px 0 var(--tw-shadow-color,#0f172a0a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.disabled\\:hover\\:brightness-100:disabled:hover{--tw-brightness:brightness(100%);filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}}@media(min-width:40rem){.sm\\:max-h-\\[calc\\(100dvh-2rem\\)\\]{max-height:calc(100dvh - 2rem)}.sm\\:p-4{padding:calc(var(--spacing) * 4)}}}@property --tw-rotate-x{syntax:"*";inherits:false}@property --tw-rotate-y{syntax:"*";inherits:false}@property --tw-rotate-z{syntax:"*";inherits:false}@property --tw-skew-x{syntax:"*";inherits:false}@property --tw-skew-y{syntax:"*";inherits:false}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-gradient-position{syntax:"*";inherits:false}@property --tw-gradient-from{syntax:"<color>";inherits:false;initial-value:#0000}@property --tw-gradient-via{syntax:"<color>";inherits:false;initial-value:#0000}@property --tw-gradient-to{syntax:"<color>";inherits:false;initial-value:#0000}@property --tw-gradient-stops{syntax:"*";inherits:false}@property --tw-gradient-via-stops{syntax:"*";inherits:false}@property --tw-gradient-from-position{syntax:"<length-percentage>";inherits:false;initial-value:0%}@property --tw-gradient-via-position{syntax:"<length-percentage>";inherits:false;initial-value:50%}@property --tw-gradient-to-position{syntax:"<length-percentage>";inherits:false;initial-value:100%}@property --tw-leading{syntax:"*";inherits:false}@property --tw-font-weight{syntax:"*";inherits:false}@property --tw-tracking{syntax:"*";inherits:false}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"<length>";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-outline-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-blur{syntax:"*";inherits:false}@property --tw-brightness{syntax:"*";inherits:false}@property --tw-contrast{syntax:"*";inherits:false}@property --tw-grayscale{syntax:"*";inherits:false}@property --tw-hue-rotate{syntax:"*";inherits:false}@property --tw-invert{syntax:"*";inherits:false}@property --tw-opacity{syntax:"*";inherits:false}@property --tw-saturate{syntax:"*";inherits:false}@property --tw-sepia{syntax:"*";inherits:false}@property --tw-drop-shadow{syntax:"*";inherits:false}@property --tw-drop-shadow-color{syntax:"*";inherits:false}@property --tw-drop-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-drop-shadow-size{syntax:"*";inherits:false}@property --tw-backdrop-blur{syntax:"*";inherits:false}@property --tw-backdrop-brightness{syntax:"*";inherits:false}@property --tw-backdrop-contrast{syntax:"*";inherits:false}@property --tw-backdrop-grayscale{syntax:"*";inherits:false}@property --tw-backdrop-hue-rotate{syntax:"*";inherits:false}@property --tw-backdrop-invert{syntax:"*";inherits:false}@property --tw-backdrop-opacity{syntax:"*";inherits:false}@property --tw-backdrop-saturate{syntax:"*";inherits:false}@property --tw-backdrop-sepia{syntax:"*";inherits:false}@property --tw-duration{syntax:"*";inherits:false}@property --tw-translate-x{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-y{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-z{syntax:"*";inherits:false;initial-value:0}@keyframes spin{to{transform:rotate(360deg)}}@keyframes ping{75%,to{opacity:0;transform:scale(2)}}';
|
|
102
|
-
let
|
|
103
|
-
function
|
|
104
|
-
if (
|
|
101
|
+
const st = '/*! tailwindcss v4.3.0 | MIT License | https://tailwindcss.com */@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-translate-x:0;--tw-translate-y:0;--tw-translate-z:0;--tw-rotate-x:initial;--tw-rotate-y:initial;--tw-rotate-z:initial;--tw-skew-x:initial;--tw-skew-y:initial;--tw-border-style:solid;--tw-gradient-position:initial;--tw-gradient-from:#0000;--tw-gradient-via:#0000;--tw-gradient-to:#0000;--tw-gradient-stops:initial;--tw-gradient-via-stops:initial;--tw-gradient-from-position:0%;--tw-gradient-via-position:50%;--tw-gradient-to-position:100%;--tw-leading:initial;--tw-font-weight:initial;--tw-tracking:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-outline-style:solid;--tw-blur:initial;--tw-brightness:initial;--tw-contrast:initial;--tw-grayscale:initial;--tw-hue-rotate:initial;--tw-invert:initial;--tw-opacity:initial;--tw-saturate:initial;--tw-sepia:initial;--tw-drop-shadow:initial;--tw-drop-shadow-color:initial;--tw-drop-shadow-alpha:100%;--tw-drop-shadow-size:initial;--tw-backdrop-blur:initial;--tw-backdrop-brightness:initial;--tw-backdrop-contrast:initial;--tw-backdrop-grayscale:initial;--tw-backdrop-hue-rotate:initial;--tw-backdrop-invert:initial;--tw-backdrop-opacity:initial;--tw-backdrop-saturate:initial;--tw-backdrop-sepia:initial;--tw-duration:initial}}}@layer theme{:root,:host{--font-sans:ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";--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-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-amber-300:oklch(87.9% .169 91.605);--color-amber-400:oklch(82.8% .189 84.429);--color-amber-950:oklch(27.9% .077 45.635);--color-emerald-500:oklch(69.6% .17 162.48);--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-black:#000;--color-white:#fff;--spacing:.25rem;--container-md:28rem;--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);--font-weight-normal:400;--font-weight-medium:500;--font-weight-semibold:600;--font-weight-bold:700;--tracking-tight:-.025em;--tracking-wide:.025em;--tracking-wider:.05em;--leading-snug:1.375;--leading-relaxed:1.625;--radius-md:.375rem;--radius-lg:.5rem;--radius-xl:.75rem;--radius-2xl:1rem;--radius-3xl:1.5rem;--animate-spin:spin 1s linear infinite;--animate-ping:ping 1s cubic-bezier(0, 0, .2, 1) infinite;--blur-sm:8px;--blur-md:12px;--default-transition-duration:.15s;--default-transition-timing-function:cubic-bezier(.4, 0, .2, 1);--default-font-family:var(--font-sans);--default-mono-font-family:var(--font-mono)}}@layer base{*,:after,:before,::backdrop{box-sizing:border-box;border:0 solid;margin:0;padding:0}::file-selector-button{box-sizing:border-box;border:0 solid;margin:0;padding:0}html,:host{-webkit-text-size-adjust:100%;tab-size:4;line-height:1.5;font-family:var(--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:var(--default-font-feature-settings,normal);font-variation-settings:var(--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:var(--default-mono-font-family,ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace);font-feature-settings:var(--default-mono-font-feature-settings,normal);font-variation-settings:var(--default-mono-font-variation-settings,normal);font-size:1em}small{font-size:80%}sub,sup{vertical-align:baseline;font-size:75%;line-height:0;position:relative}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{vertical-align:middle;display:block}img,video{max-width:100%;height:auto}button,input,select,optgroup,textarea{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}::file-selector-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}: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:currentColor}@supports (color:color-mix(in lab,red,red)){::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{padding-block:0}::-webkit-datetime-edit-year-field{padding-block:0}::-webkit-datetime-edit-month-field{padding-block:0}::-webkit-datetime-edit-day-field{padding-block:0}::-webkit-datetime-edit-hour-field{padding-block:0}::-webkit-datetime-edit-minute-field{padding-block:0}::-webkit-datetime-edit-second-field{padding-block:0}::-webkit-datetime-edit-millisecond-field{padding-block:0}::-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]){appearance:button}::file-selector-button{appearance:button}::-webkit-inner-spin-button{height:auto}::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}:host{all:initial;color-scheme:light;font-family:ui-sans-serif,system-ui,-apple-system,Segoe UI,Roboto,sans-serif}*,:before,:after{box-sizing:border-box}button{cursor:pointer;font-family:inherit}button:disabled{cursor:not-allowed}[role=button],[role=radio]{cursor:pointer}}@layer components;@layer utilities{.visible{visibility:visible}.absolute{position:absolute}.fixed{position:fixed}.relative{position:relative}.inset-0{inset:calc(var(--spacing) * 0)}.-top-2\\.5{top:calc(var(--spacing) * -2.5)}.top-0{top:calc(var(--spacing) * 0)}.top-3{top:calc(var(--spacing) * 3)}.right-3{right:calc(var(--spacing) * 3)}.left-4{left:calc(var(--spacing) * 4)}.z-10{z-index:10}.z-20{z-index:20}.z-\\[1\\]{z-index:1}.z-\\[2147483647\\]{z-index:2147483647}.container{width:100%}@media(min-width:40rem){.container{max-width:40rem}}@media(min-width:48rem){.container{max-width:48rem}}@media(min-width:64rem){.container{max-width:64rem}}@media(min-width:80rem){.container{max-width:80rem}}@media(min-width:96rem){.container{max-width:96rem}}.-mt-1{margin-top:calc(var(--spacing) * -1)}.-mt-3{margin-top:calc(var(--spacing) * -3)}.mt-0\\.5{margin-top:calc(var(--spacing) * .5)}.mt-1{margin-top:calc(var(--spacing) * 1)}.mt-1\\.5{margin-top:calc(var(--spacing) * 1.5)}.mt-2{margin-top:calc(var(--spacing) * 2)}.mt-2\\.5{margin-top:calc(var(--spacing) * 2.5)}.mt-3{margin-top:calc(var(--spacing) * 3)}.mt-px{margin-top:1px}.-ml-1{margin-left:calc(var(--spacing) * -1)}.ml-1{margin-left:calc(var(--spacing) * 1)}.block{display:block}.flex{display:flex}.grid{display:grid}.hidden{display:none}.inline{display:inline}.inline-block{display:inline-block}.h-1{height:calc(var(--spacing) * 1)}.h-4{height:calc(var(--spacing) * 4)}.h-5{height:calc(var(--spacing) * 5)}.h-6{height:calc(var(--spacing) * 6)}.h-7{height:calc(var(--spacing) * 7)}.h-8{height:calc(var(--spacing) * 8)}.h-10{height:calc(var(--spacing) * 10)}.h-11{height:calc(var(--spacing) * 11)}.h-12{height:calc(var(--spacing) * 12)}.h-14{height:calc(var(--spacing) * 14)}.h-px{height:1px}.max-h-\\[calc\\(100dvh-1rem\\)\\]{max-height:calc(100dvh - 1rem)}.min-h-\\[104px\\]{min-height:104px}.w-1{width:calc(var(--spacing) * 1)}.w-4{width:calc(var(--spacing) * 4)}.w-5{width:calc(var(--spacing) * 5)}.w-6{width:calc(var(--spacing) * 6)}.w-7{width:calc(var(--spacing) * 7)}.w-8{width:calc(var(--spacing) * 8)}.w-11{width:calc(var(--spacing) * 11)}.w-12{width:calc(var(--spacing) * 12)}.w-14{width:calc(var(--spacing) * 14)}.w-full{width:100%}.max-w-\\[18rem\\]{max-width:18rem}.max-w-\\[20rem\\]{max-width:20rem}.max-w-\\[320px\\]{max-width:320px}.max-w-md{max-width:var(--container-md)}.flex-1{flex:1}.flex-shrink-0{flex-shrink:0}.-translate-y-\\[calc\\(100\\%\\+6px\\)\\]{--tw-translate-y: calc((100% + 6px)*-1) ;translate:var(--tw-translate-x) var(--tw-translate-y)}.transform{transform:var(--tw-rotate-x,) var(--tw-rotate-y,) var(--tw-rotate-z,) var(--tw-skew-x,) var(--tw-skew-y,)}.animate-\\[pw-fade-in_180ms_ease-out\\]{animation:.18s ease-out pw-fade-in}.animate-\\[pw-scale-in_220ms_cubic-bezier\\(0\\.16\\,1\\,0\\.3\\,1\\)\\]{animation:.22s cubic-bezier(.16,1,.3,1) pw-scale-in}.animate-ping{animation:var(--animate-ping)}.animate-spin{animation:var(--animate-spin)}.cursor-not-allowed{cursor:not-allowed}.cursor-pointer{cursor:pointer}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.items-baseline{align-items:baseline}.items-center{align-items:center}.items-start{align-items:flex-start}.justify-between{justify-content:space-between}.justify-center{justify-content:center}.justify-end{justify-content:flex-end}.gap-0\\.5{gap:calc(var(--spacing) * .5)}.gap-1{gap:calc(var(--spacing) * 1)}.gap-1\\.5{gap:calc(var(--spacing) * 1.5)}.gap-2{gap:calc(var(--spacing) * 2)}.gap-2\\.5{gap:calc(var(--spacing) * 2.5)}.gap-3{gap:calc(var(--spacing) * 3)}.gap-4{gap:calc(var(--spacing) * 4)}.gap-x-3{column-gap:calc(var(--spacing) * 3)}.gap-y-1{row-gap:calc(var(--spacing) * 1)}.self-center{align-self:center}.self-start{align-self:flex-start}.truncate{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.overflow-hidden{overflow:hidden}.overflow-y-auto{overflow-y:auto}.rounded{border-radius:.25rem}.rounded-2xl{border-radius:var(--radius-2xl)}.rounded-3xl{border-radius:var(--radius-3xl)}.rounded-full{border-radius:3.40282e38px}.rounded-lg{border-radius:var(--radius-lg)}.rounded-md{border-radius:var(--radius-md)}.rounded-xl{border-radius:var(--radius-xl)}.border{border-style:var(--tw-border-style);border-width:1px}.border-2{border-style:var(--tw-border-style);border-width:2px}.border-\\[2\\.5px\\]{border-style:var(--tw-border-style);border-width:2.5px}.border-b{border-bottom-style:var(--tw-border-style);border-bottom-width:1px}.border-dashed{--tw-border-style:dashed;border-style:dashed}.border-\\[var\\(--pw-accent\\)\\]{border-color:var(--pw-accent)}.border-gray-200{border-color:var(--color-gray-200)}.border-gray-300{border-color:var(--color-gray-300)}.border-red-400{border-color:var(--color-red-400)}.border-white\\/40{border-color:#fff6}@supports (color:color-mix(in lab,red,red)){.border-white\\/40{border-color:color-mix(in oklab,var(--color-white) 40%,transparent)}}.border-t-\\[var\\(--pw-accent\\)\\]{border-top-color:var(--pw-accent)}.border-t-gray-700{border-top-color:var(--color-gray-700)}.border-t-white{border-top-color:var(--color-white)}.bg-\\[color-mix\\(in_srgb\\,var\\(--pw-accent\\)_6\\%\\,white\\)\\]{background-color:var(--pw-accent)}@supports (color:color-mix(in lab,red,red)){.bg-\\[color-mix\\(in_srgb\\,var\\(--pw-accent\\)_6\\%\\,white\\)\\]{background-color:color-mix(in srgb,var(--pw-accent) 6%,white)}}.bg-\\[var\\(--pw-accent\\)\\]{background-color:var(--pw-accent)}.bg-gray-50{background-color:var(--color-gray-50)}.bg-gray-50\\/60{background-color:#f9fafb99}@supports (color:color-mix(in lab,red,red)){.bg-gray-50\\/60{background-color:color-mix(in oklab,var(--color-gray-50) 60%,transparent)}}.bg-gray-300{background-color:var(--color-gray-300)}.bg-red-50{background-color:var(--color-red-50)}.bg-slate-950\\/50{background-color:#02061880}@supports (color:color-mix(in lab,red,red)){.bg-slate-950\\/50{background-color:color-mix(in oklab,var(--color-slate-950) 50%,transparent)}}.bg-white{background-color:var(--color-white)}.bg-white\\/80{background-color:#fffc}@supports (color:color-mix(in lab,red,red)){.bg-white\\/80{background-color:color-mix(in oklab,var(--color-white) 80%,transparent)}}.bg-gradient-to-r{--tw-gradient-position:to right in oklab;background-image:linear-gradient(var(--tw-gradient-stops))}.from-amber-300{--tw-gradient-from:var(--color-amber-300);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.from-gray-200{--tw-gradient-from:var(--color-gray-200);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.from-transparent{--tw-gradient-from:transparent;--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.to-amber-400{--tw-gradient-to:var(--color-amber-400);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.to-gray-200{--tw-gradient-to:var(--color-gray-200);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.to-transparent{--tw-gradient-to:transparent;--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.p-2{padding:calc(var(--spacing) * 2)}.p-3\\.5{padding:calc(var(--spacing) * 3.5)}.p-8{padding:calc(var(--spacing) * 8)}.px-1\\.5{padding-inline:calc(var(--spacing) * 1.5)}.px-2{padding-inline:calc(var(--spacing) * 2)}.px-2\\.5{padding-inline:calc(var(--spacing) * 2.5)}.px-3{padding-inline:calc(var(--spacing) * 3)}.px-3\\.5{padding-inline:calc(var(--spacing) * 3.5)}.px-4{padding-inline:calc(var(--spacing) * 4)}.px-5{padding-inline:calc(var(--spacing) * 5)}.px-6{padding-inline:calc(var(--spacing) * 6)}.py-0\\.5{padding-block:calc(var(--spacing) * .5)}.py-1{padding-block:calc(var(--spacing) * 1)}.py-1\\.5{padding-block:calc(var(--spacing) * 1.5)}.py-2{padding-block:calc(var(--spacing) * 2)}.py-2\\.5{padding-block:calc(var(--spacing) * 2.5)}.py-3{padding-block:calc(var(--spacing) * 3)}.py-6{padding-block:calc(var(--spacing) * 6)}.py-8{padding-block:calc(var(--spacing) * 8)}.py-12{padding-block:calc(var(--spacing) * 12)}.pt-1{padding-top:calc(var(--spacing) * 1)}.pb-4{padding-bottom:calc(var(--spacing) * 4)}.text-center{text-align:center}.text-left{text-align:left}.text-2xl{font-size:var(--text-2xl);line-height:var(--tw-leading,var(--text-2xl--line-height))}.text-base{font-size:var(--text-base);line-height:var(--tw-leading,var(--text-base--line-height))}.text-lg{font-size:var(--text-lg);line-height:var(--tw-leading,var(--text-lg--line-height))}.text-sm{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.text-xl{font-size:var(--text-xl);line-height:var(--tw-leading,var(--text-xl--line-height))}.text-xs{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.text-\\[0\\.9375rem\\]{font-size:.9375rem}.text-\\[1\\.875rem\\]{font-size:1.875rem}.text-\\[10px\\]{font-size:10px}.text-\\[11px\\]{font-size:11px}.text-\\[12px\\]{font-size:12px}.text-\\[13px\\]{font-size:13px}.text-\\[14px\\]{font-size:14px}.text-\\[24px\\]{font-size:24px}.text-\\[34px\\]{font-size:34px}.leading-\\[1\\.15\\]{--tw-leading:1.15;line-height:1.15}.leading-none{--tw-leading:1;line-height:1}.leading-relaxed{--tw-leading:var(--leading-relaxed);line-height:var(--leading-relaxed)}.leading-snug{--tw-leading:var(--leading-snug);line-height:var(--leading-snug)}.font-bold{--tw-font-weight:var(--font-weight-bold);font-weight:var(--font-weight-bold)}.font-medium{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.font-normal{--tw-font-weight:var(--font-weight-normal);font-weight:var(--font-weight-normal)}.font-semibold{--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold)}.tracking-\\[-0\\.02em\\]{--tw-tracking:-.02em;letter-spacing:-.02em}.tracking-\\[0\\.08em\\]{--tw-tracking:.08em;letter-spacing:.08em}.tracking-\\[0\\.14em\\]{--tw-tracking:.14em;letter-spacing:.14em}.tracking-tight{--tw-tracking:var(--tracking-tight);letter-spacing:var(--tracking-tight)}.tracking-wide{--tw-tracking:var(--tracking-wide);letter-spacing:var(--tracking-wide)}.tracking-wider{--tw-tracking:var(--tracking-wider);letter-spacing:var(--tracking-wider)}.text-balance{text-wrap:balance}.text-\\[var\\(--pw-accent\\)\\]{color:var(--pw-accent)}.text-amber-950{color:var(--color-amber-950)}.text-emerald-500{color:var(--color-emerald-500)}.text-gray-400{color:var(--color-gray-400)}.text-gray-500{color:var(--color-gray-500)}.text-gray-600{color:var(--color-gray-600)}.text-gray-700{color:var(--color-gray-700)}.text-gray-800{color:var(--color-gray-800)}.text-gray-900{color:var(--color-gray-900)}.text-red-600{color:var(--color-red-600)}.text-red-700{color:var(--color-red-700)}.text-transparent{color:#0000}.text-white{color:var(--color-white)}.uppercase{text-transform:uppercase}.underline{text-decoration-line:underline}.underline-offset-2{text-underline-offset:2px}.opacity-40{opacity:.4}.opacity-60{opacity:.6}.shadow{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a), 0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-\\[0_0_0_1px_var\\(--pw-accent\\)\\]{--tw-shadow:0 0 0 1px var(--tw-shadow-color,var(--pw-accent));box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-\\[0_1px_0_rgba\\(15\\,23\\,42\\,0\\.02\\)\\]{--tw-shadow:0 1px 0 var(--tw-shadow-color,#0f172a05);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-\\[0_1px_0_rgba\\(15\\,23\\,42\\,0\\.04\\)\\]{--tw-shadow:0 1px 0 var(--tw-shadow-color,#0f172a0a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-\\[0_4px_12px_-2px_rgba\\(245\\,158\\,11\\,0\\.45\\)\\,0_0_0_1px_rgba\\(255\\,255\\,255\\,0\\.6\\)\\]{--tw-shadow:0 4px 12px -2px var(--tw-shadow-color,#f59e0b73), 0 0 0 1px var(--tw-shadow-color,#fff9);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-sm{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a), 0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.ring,.ring-1{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.ring-8{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(8px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.ring-black\\/5{--tw-ring-color:#0000000d}@supports (color:color-mix(in lab,red,red)){.ring-black\\/5{--tw-ring-color:color-mix(in oklab, var(--color-black) 5%, transparent)}}.outline{outline-style:var(--tw-outline-style);outline-width:1px}.\\!filter{filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)!important}.filter{filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.backdrop-blur-md{--tw-backdrop-blur:blur(var(--blur-md));-webkit-backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,)}.backdrop-blur-sm{--tw-backdrop-blur:blur(var(--blur-sm));-webkit-backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,)}.transition-all{transition-property:all;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-colors{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-opacity{transition-property:opacity;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-transform{transition-property:transform,translate,scale,rotate;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.duration-150{--tw-duration:.15s;transition-duration:.15s}.outline-none{--tw-outline-style:none;outline-style:none}@media(hover:hover){.group-hover\\:border-gray-400:is(:where(.group):hover *){border-color:var(--color-gray-400)}}.placeholder\\:text-gray-400::placeholder{color:var(--color-gray-400)}@media(hover:hover){.hover\\:-translate-y-px:hover{--tw-translate-y:-1px;translate:var(--tw-translate-x) var(--tw-translate-y)}.hover\\:border-gray-300:hover{border-color:var(--color-gray-300)}.hover\\:border-gray-400:hover{border-color:var(--color-gray-400)}.hover\\:bg-gray-50:hover{background-color:var(--color-gray-50)}.hover\\:bg-gray-50\\/60:hover{background-color:#f9fafb99}@supports (color:color-mix(in lab,red,red)){.hover\\:bg-gray-50\\/60:hover{background-color:color-mix(in oklab,var(--color-gray-50) 60%,transparent)}}.hover\\:bg-gray-100:hover{background-color:var(--color-gray-100)}.hover\\:bg-white:hover{background-color:var(--color-white)}.hover\\:text-gray-700:hover{color:var(--color-gray-700)}.hover\\:text-gray-900:hover{color:var(--color-gray-900)}.hover\\:text-red-600:hover{color:var(--color-red-600)}.hover\\:underline:hover{text-decoration-line:underline}.hover\\:opacity-80:hover{opacity:.8}.hover\\:opacity-90:hover{opacity:.9}.hover\\:shadow-sm:hover{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a), 0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.hover\\:brightness-105:hover{--tw-brightness:brightness(105%);filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}}.focus\\:border-\\[var\\(--pw-accent\\)\\]:focus{border-color:var(--pw-accent)}.focus\\:border-red-500:focus{border-color:var(--color-red-500)}.focus\\:shadow-\\[0_0_0_3px_color-mix\\(in_srgb\\,var\\(--pw-accent\\)_18\\%\\,transparent\\)\\]:focus{--tw-shadow:0 0 0 3px var(--tw-shadow-color,var(--pw-accent))}@supports (color:color-mix(in lab,red,red)){.focus\\:shadow-\\[0_0_0_3px_color-mix\\(in_srgb\\,var\\(--pw-accent\\)_18\\%\\,transparent\\)\\]:focus{--tw-shadow:0 0 0 3px var(--tw-shadow-color,color-mix(in srgb,var(--pw-accent) 18%,transparent))}}.focus\\:shadow-\\[0_0_0_3px_color-mix\\(in_srgb\\,var\\(--pw-accent\\)_18\\%\\,transparent\\)\\]:focus{box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.focus\\:shadow-\\[0_0_0_3px_rgba\\(239\\,68\\,68\\,0\\.18\\)\\]:focus{--tw-shadow:0 0 0 3px var(--tw-shadow-color,#ef44442e);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.focus\\:outline-none:focus{--tw-outline-style:none;outline-style:none}.focus-visible\\:opacity-80:focus-visible{opacity:.8}.focus-visible\\:ring-2:focus-visible{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.focus-visible\\:ring-\\[var\\(--pw-accent\\)\\]:focus-visible{--tw-ring-color:var(--pw-accent)}.focus-visible\\:ring-offset-2:focus-visible{--tw-ring-offset-width:2px;--tw-ring-offset-shadow:var(--tw-ring-inset,) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color)}.active\\:translate-y-0:active{--tw-translate-y:calc(var(--spacing) * 0);translate:var(--tw-translate-x) var(--tw-translate-y)}.active\\:scale-\\[0\\.98\\]:active{scale:.98}.disabled\\:cursor-not-allowed:disabled{cursor:not-allowed}.disabled\\:opacity-60:disabled{opacity:.6}@media(hover:hover){.disabled\\:hover\\:translate-y-0:disabled:hover{--tw-translate-y:calc(var(--spacing) * 0);translate:var(--tw-translate-x) var(--tw-translate-y)}.disabled\\:hover\\:shadow-\\[0_1px_0_rgba\\(15\\,23\\,42\\,0\\.04\\)\\]:disabled:hover{--tw-shadow:0 1px 0 var(--tw-shadow-color,#0f172a0a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.disabled\\:hover\\:brightness-100:disabled:hover{--tw-brightness:brightness(100%);filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}}@media(min-width:40rem){.sm\\:max-h-\\[calc\\(100dvh-2rem\\)\\]{max-height:calc(100dvh - 2rem)}.sm\\:p-4{padding:calc(var(--spacing) * 4)}}}.pw-cta-shimmer:before{content:"";z-index:1;background:linear-gradient(90deg,#0000,#ffffff59 50%,#0000);width:100%;height:100%;animation:3s infinite pw-cta-shimmer;position:absolute;top:0;left:-100%}@keyframes pw-cta-shimmer{0%{left:-100%}to{left:100%}}@property --tw-translate-x{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-y{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-z{syntax:"*";inherits:false;initial-value:0}@property --tw-rotate-x{syntax:"*";inherits:false}@property --tw-rotate-y{syntax:"*";inherits:false}@property --tw-rotate-z{syntax:"*";inherits:false}@property --tw-skew-x{syntax:"*";inherits:false}@property --tw-skew-y{syntax:"*";inherits:false}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-gradient-position{syntax:"*";inherits:false}@property --tw-gradient-from{syntax:"<color>";inherits:false;initial-value:#0000}@property --tw-gradient-via{syntax:"<color>";inherits:false;initial-value:#0000}@property --tw-gradient-to{syntax:"<color>";inherits:false;initial-value:#0000}@property --tw-gradient-stops{syntax:"*";inherits:false}@property --tw-gradient-via-stops{syntax:"*";inherits:false}@property --tw-gradient-from-position{syntax:"<length-percentage>";inherits:false;initial-value:0%}@property --tw-gradient-via-position{syntax:"<length-percentage>";inherits:false;initial-value:50%}@property --tw-gradient-to-position{syntax:"<length-percentage>";inherits:false;initial-value:100%}@property --tw-leading{syntax:"*";inherits:false}@property --tw-font-weight{syntax:"*";inherits:false}@property --tw-tracking{syntax:"*";inherits:false}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"<length>";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-outline-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-blur{syntax:"*";inherits:false}@property --tw-brightness{syntax:"*";inherits:false}@property --tw-contrast{syntax:"*";inherits:false}@property --tw-grayscale{syntax:"*";inherits:false}@property --tw-hue-rotate{syntax:"*";inherits:false}@property --tw-invert{syntax:"*";inherits:false}@property --tw-opacity{syntax:"*";inherits:false}@property --tw-saturate{syntax:"*";inherits:false}@property --tw-sepia{syntax:"*";inherits:false}@property --tw-drop-shadow{syntax:"*";inherits:false}@property --tw-drop-shadow-color{syntax:"*";inherits:false}@property --tw-drop-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-drop-shadow-size{syntax:"*";inherits:false}@property --tw-backdrop-blur{syntax:"*";inherits:false}@property --tw-backdrop-brightness{syntax:"*";inherits:false}@property --tw-backdrop-contrast{syntax:"*";inherits:false}@property --tw-backdrop-grayscale{syntax:"*";inherits:false}@property --tw-backdrop-hue-rotate{syntax:"*";inherits:false}@property --tw-backdrop-invert{syntax:"*";inherits:false}@property --tw-backdrop-opacity{syntax:"*";inherits:false}@property --tw-backdrop-saturate{syntax:"*";inherits:false}@property --tw-backdrop-sepia{syntax:"*";inherits:false}@property --tw-duration{syntax:"*";inherits:false}@keyframes spin{to{transform:rotate(360deg)}}@keyframes ping{75%,to{opacity:0;transform:scale(2)}}';
|
|
102
|
+
let K = !1;
|
|
103
|
+
function gt() {
|
|
104
|
+
if (K || (K = !0, typeof CSS > "u" || typeof CSS.registerProperty != "function")) return;
|
|
105
105
|
let e;
|
|
106
106
|
try {
|
|
107
107
|
const t = new CSSStyleSheet();
|
|
108
|
-
t.replaceSync(
|
|
108
|
+
t.replaceSync(st), e = t.cssRules;
|
|
109
109
|
} catch {
|
|
110
110
|
return;
|
|
111
111
|
}
|
|
@@ -123,12 +123,12 @@ function ft() {
|
|
|
123
123
|
}
|
|
124
124
|
}
|
|
125
125
|
}
|
|
126
|
-
function
|
|
126
|
+
function ft(e, t, i = {}) {
|
|
127
127
|
if (typeof document > "u")
|
|
128
128
|
throw new Error("mountShadow called in non-DOM environment");
|
|
129
|
-
|
|
129
|
+
gt();
|
|
130
130
|
const n = i.host ?? document.createElement("div");
|
|
131
|
-
n.setAttribute("data-paywall-host", ""), n.style.cssText = "all: initial; position: fixed; inset: 0; z-index: 2147483647; pointer-events: none;", n.isConnected
|
|
131
|
+
n.setAttribute("data-paywall-host", ""), n.style.cssText = i.inline ? "all: initial; position: absolute; inset: 0; z-index: 1; pointer-events: none;" : "all: initial; position: fixed; inset: 0; z-index: 2147483647; pointer-events: none;", !n.isConnected && !i.inline && document.body.appendChild(n);
|
|
132
132
|
const a = n.attachShadow({ mode: i.shadowMode ?? "closed" }), o = `
|
|
133
133
|
:host {
|
|
134
134
|
all: initial !important;
|
|
@@ -148,126 +148,129 @@ function wt(e, t, i = {}) {
|
|
|
148
148
|
visibility: visible !important;
|
|
149
149
|
}
|
|
150
150
|
`, s = document.createElement("style");
|
|
151
|
-
s.textContent = o +
|
|
151
|
+
s.textContent = o + st + (i.injectCss ?? ""), a.appendChild(s);
|
|
152
152
|
const l = document.createElement("div");
|
|
153
153
|
l.style.pointerEvents = "auto", a.appendChild(l);
|
|
154
|
-
let
|
|
155
|
-
return
|
|
154
|
+
let h = t;
|
|
155
|
+
return F(W(e, h), l), {
|
|
156
156
|
shadowRoot: a,
|
|
157
|
-
update(
|
|
158
|
-
|
|
157
|
+
update(d) {
|
|
158
|
+
h = { ...h, ...d }, F(W(e, h), l);
|
|
159
159
|
},
|
|
160
160
|
unmount() {
|
|
161
|
-
|
|
161
|
+
F(null, l), n.remove();
|
|
162
162
|
}
|
|
163
163
|
};
|
|
164
164
|
}
|
|
165
|
-
const
|
|
166
|
-
function
|
|
165
|
+
const X = 'a[href], button:not([disabled]), textarea:not([disabled]), input:not([disabled]), select:not([disabled]), [tabindex]:not([tabindex="-1"])';
|
|
166
|
+
function wt({
|
|
167
167
|
open: e,
|
|
168
168
|
onClose: t,
|
|
169
169
|
labelledBy: i,
|
|
170
170
|
brandColor: n,
|
|
171
171
|
testMode: a,
|
|
172
172
|
allowClose: o = !0,
|
|
173
|
-
|
|
173
|
+
inline: s = !1,
|
|
174
|
+
children: l
|
|
174
175
|
}) {
|
|
175
|
-
const
|
|
176
|
-
return
|
|
176
|
+
const h = L(null), d = L(null);
|
|
177
|
+
return T(() => {
|
|
177
178
|
if (!e) return;
|
|
178
|
-
|
|
179
|
-
const
|
|
180
|
-
|
|
181
|
-
const
|
|
182
|
-
if (
|
|
179
|
+
d.current = document.activeElement ?? null;
|
|
180
|
+
const g = h.current;
|
|
181
|
+
g && (g.querySelector(X) ?? g).focus({ preventScroll: !0 });
|
|
182
|
+
const f = (k) => {
|
|
183
|
+
if (k.key === "Escape") {
|
|
183
184
|
if (!o) return;
|
|
184
|
-
|
|
185
|
+
k.stopPropagation(), t();
|
|
185
186
|
return;
|
|
186
187
|
}
|
|
187
|
-
if (
|
|
188
|
-
const
|
|
189
|
-
|
|
190
|
-
).filter((
|
|
191
|
-
if (
|
|
192
|
-
|
|
188
|
+
if (k.key !== "Tab" || !h.current) return;
|
|
189
|
+
const m = Array.from(
|
|
190
|
+
h.current.querySelectorAll(X)
|
|
191
|
+
).filter((E) => !E.hasAttribute("disabled") && E.tabIndex !== -1);
|
|
192
|
+
if (m.length === 0) {
|
|
193
|
+
k.preventDefault();
|
|
193
194
|
return;
|
|
194
195
|
}
|
|
195
|
-
const
|
|
196
|
-
|
|
196
|
+
const S = m[0], y = m[m.length - 1], P = document.activeElement;
|
|
197
|
+
k.shiftKey && P === S ? (k.preventDefault(), y.focus()) : !k.shiftKey && P === y && (k.preventDefault(), S.focus());
|
|
197
198
|
};
|
|
198
|
-
document.addEventListener("keydown",
|
|
199
|
-
const
|
|
200
|
-
return document.body.style.overflow = "hidden", () => {
|
|
201
|
-
document.removeEventListener("keydown",
|
|
199
|
+
document.addEventListener("keydown", f, !0);
|
|
200
|
+
const _ = document.body.style.overflow;
|
|
201
|
+
return s || (document.body.style.overflow = "hidden"), () => {
|
|
202
|
+
document.removeEventListener("keydown", f, !0), s || (document.body.style.overflow = _), d.current?.focus?.({ preventScroll: !0 });
|
|
202
203
|
};
|
|
203
|
-
}, [e, t, o]), e ? /* @__PURE__ */
|
|
204
|
+
}, [e, t, o, s]), e ? /* @__PURE__ */ c(
|
|
204
205
|
"div",
|
|
205
206
|
{
|
|
206
|
-
class: "
|
|
207
|
-
onClick: (
|
|
208
|
-
o &&
|
|
207
|
+
class: `${s ? "absolute z-[1]" : "fixed z-[2147483647]"} inset-0 flex items-center justify-center bg-slate-950/50 p-2 sm:p-4 backdrop-blur-md animate-[pw-fade-in_180ms_ease-out]`,
|
|
208
|
+
onClick: (g) => {
|
|
209
|
+
o && g.target === g.currentTarget && t();
|
|
209
210
|
},
|
|
210
211
|
"data-pw-root": !0,
|
|
211
212
|
children: [
|
|
212
|
-
/* @__PURE__ */
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
style: {
|
|
222
|
-
"--pw-accent": n ?? "#3b82f6",
|
|
223
|
-
boxShadow: "0 1px 2px rgba(15,23,42,0.04), 0 12px 32px -8px rgba(15,23,42,0.18), 0 24px 64px -16px rgba(15,23,42,0.22)"
|
|
224
|
-
},
|
|
225
|
-
children: [
|
|
226
|
-
a && /* @__PURE__ */ d(
|
|
227
|
-
"div",
|
|
228
|
-
{
|
|
229
|
-
class: "flex items-center justify-center gap-1.5 bg-gradient-to-r from-amber-300 to-amber-400 px-3 py-1.5 text-[11px] font-semibold uppercase tracking-wider text-amber-950",
|
|
230
|
-
role: "status",
|
|
231
|
-
children: [
|
|
232
|
-
/* @__PURE__ */ d("svg", { width: "12", height: "12", viewBox: "0 0 16 16", fill: "none", "aria-hidden": "true", children: [
|
|
233
|
-
/* @__PURE__ */ r(
|
|
234
|
-
"path",
|
|
235
|
-
{
|
|
236
|
-
d: "M8 1L15 14H1L8 1Z",
|
|
237
|
-
stroke: "currentColor",
|
|
238
|
-
"stroke-width": "1.5",
|
|
239
|
-
"stroke-linejoin": "round"
|
|
240
|
-
}
|
|
241
|
-
),
|
|
242
|
-
/* @__PURE__ */ r("path", { d: "M8 6v3", stroke: "currentColor", "stroke-width": "1.5", "stroke-linecap": "round" }),
|
|
243
|
-
/* @__PURE__ */ r("circle", { cx: "8", cy: "11.5", r: "0.5", fill: "currentColor" })
|
|
244
|
-
] }),
|
|
245
|
-
"Test mode — no real charge"
|
|
246
|
-
]
|
|
247
|
-
}
|
|
248
|
-
),
|
|
249
|
-
/* @__PURE__ */ r("div", { class: "flex-1 overflow-y-auto p-7", children: s }),
|
|
250
|
-
o ? /* @__PURE__ */ r(
|
|
251
|
-
"button",
|
|
252
|
-
{
|
|
253
|
-
type: "button",
|
|
254
|
-
onClick: t,
|
|
255
|
-
"aria-label": "Close",
|
|
256
|
-
class: `absolute right-3 ${a ? "top-10" : "top-3"} z-10 flex h-8 w-8 items-center justify-center rounded-full bg-white/80 text-gray-400 backdrop-blur-sm transition-colors hover:bg-gray-100 hover:text-gray-700 focus:outline-none focus-visible:ring-2 focus-visible:ring-[var(--pw-accent)]`,
|
|
257
|
-
children: /* @__PURE__ */ r("svg", { width: "14", height: "14", viewBox: "0 0 16 16", fill: "none", "aria-hidden": "true", children: /* @__PURE__ */ r(
|
|
213
|
+
/* @__PURE__ */ c("div", { class: "relative w-full max-w-md animate-[pw-scale-in_220ms_cubic-bezier(0.16,1,0.3,1)]", children: [
|
|
214
|
+
a && /* @__PURE__ */ c(
|
|
215
|
+
"div",
|
|
216
|
+
{
|
|
217
|
+
class: "absolute right-3 top-0 z-20 flex -translate-y-[calc(100%+6px)] items-center gap-1.5 rounded-full bg-gradient-to-r from-amber-300 to-amber-400 px-3 py-1 text-[11px] font-semibold uppercase tracking-wider text-amber-950 shadow-[0_4px_12px_-2px_rgba(245,158,11,0.45),0_0_0_1px_rgba(255,255,255,0.6)]",
|
|
218
|
+
role: "status",
|
|
219
|
+
children: [
|
|
220
|
+
/* @__PURE__ */ c("svg", { width: "12", height: "12", viewBox: "0 0 16 16", fill: "none", "aria-hidden": "true", children: [
|
|
221
|
+
/* @__PURE__ */ r(
|
|
258
222
|
"path",
|
|
259
223
|
{
|
|
260
|
-
d: "
|
|
224
|
+
d: "M8 1L15 14H1L8 1Z",
|
|
261
225
|
stroke: "currentColor",
|
|
262
|
-
"stroke-width": "1.
|
|
263
|
-
"stroke-
|
|
226
|
+
"stroke-width": "1.5",
|
|
227
|
+
"stroke-linejoin": "round"
|
|
264
228
|
}
|
|
265
|
-
)
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
229
|
+
),
|
|
230
|
+
/* @__PURE__ */ r("path", { d: "M8 6v3", stroke: "currentColor", "stroke-width": "1.5", "stroke-linecap": "round" }),
|
|
231
|
+
/* @__PURE__ */ r("circle", { cx: "8", cy: "11.5", r: "0.5", fill: "currentColor" })
|
|
232
|
+
] }),
|
|
233
|
+
"Test mode — no real charge"
|
|
234
|
+
]
|
|
235
|
+
}
|
|
236
|
+
),
|
|
237
|
+
/* @__PURE__ */ c(
|
|
238
|
+
"div",
|
|
239
|
+
{
|
|
240
|
+
ref: h,
|
|
241
|
+
role: "dialog",
|
|
242
|
+
"aria-modal": "true",
|
|
243
|
+
"aria-labelledby": i,
|
|
244
|
+
tabIndex: -1,
|
|
245
|
+
class: "relative flex max-h-[calc(100dvh-1rem)] sm:max-h-[calc(100dvh-2rem)] w-full flex-col overflow-hidden rounded-3xl bg-white outline-none ring-1 ring-black/5",
|
|
246
|
+
style: {
|
|
247
|
+
"--pw-accent": n ?? "#3b82f6",
|
|
248
|
+
boxShadow: "0 1px 2px rgba(15,23,42,0.04), 0 12px 32px -8px rgba(15,23,42,0.18), 0 24px 64px -16px rgba(15,23,42,0.22)"
|
|
249
|
+
},
|
|
250
|
+
children: [
|
|
251
|
+
/* @__PURE__ */ r("div", { class: "flex-1 overflow-y-auto p-8", children: l }),
|
|
252
|
+
o ? /* @__PURE__ */ r(
|
|
253
|
+
"button",
|
|
254
|
+
{
|
|
255
|
+
type: "button",
|
|
256
|
+
onClick: t,
|
|
257
|
+
"aria-label": "Close",
|
|
258
|
+
class: "absolute right-3 top-3 z-10 flex h-8 w-8 items-center justify-center rounded-full bg-white/80 text-gray-400 backdrop-blur-sm transition-colors hover:bg-gray-100 hover:text-gray-700 focus:outline-none focus-visible:ring-2 focus-visible:ring-[var(--pw-accent)]",
|
|
259
|
+
children: /* @__PURE__ */ r("svg", { width: "14", height: "14", viewBox: "0 0 16 16", fill: "none", "aria-hidden": "true", children: /* @__PURE__ */ r(
|
|
260
|
+
"path",
|
|
261
|
+
{
|
|
262
|
+
d: "M3 3l10 10M13 3L3 13",
|
|
263
|
+
stroke: "currentColor",
|
|
264
|
+
"stroke-width": "1.75",
|
|
265
|
+
"stroke-linecap": "round"
|
|
266
|
+
}
|
|
267
|
+
) })
|
|
268
|
+
}
|
|
269
|
+
) : null
|
|
270
|
+
]
|
|
271
|
+
}
|
|
272
|
+
)
|
|
273
|
+
] }),
|
|
271
274
|
/* @__PURE__ */ r("style", { children: `
|
|
272
275
|
@keyframes pw-fade-in { from { opacity: 0 } to { opacity: 1 } }
|
|
273
276
|
@keyframes pw-scale-in {
|
|
@@ -285,14 +288,14 @@ const vt = {
|
|
|
285
288
|
github: "Continue with GitHub",
|
|
286
289
|
facebook: "Continue with Facebook"
|
|
287
290
|
};
|
|
288
|
-
function
|
|
291
|
+
function lt({ block: e, ctx: t }) {
|
|
289
292
|
const i = t.auth, n = t.authSession, a = e.allow_signup !== !1, o = e.allow_password_reset !== !1, s = e.hide_when_authenticated !== !1;
|
|
290
293
|
if (!i)
|
|
291
294
|
return typeof console < "u" && console.warn("[paywall] auth_panel rendered without AuthClient — pass `auth: true` to PaywallUI"), null;
|
|
292
295
|
const l = n && !n.user.is_anonymous ? n : null;
|
|
293
|
-
return l && s ? null : l ? /* @__PURE__ */ r(
|
|
296
|
+
return l && s ? null : l ? /* @__PURE__ */ r(bt, { email: l.user.email ?? "", onSignOut: () => i.signOut().catch(() => {
|
|
294
297
|
}) }) : /* @__PURE__ */ r(
|
|
295
|
-
|
|
298
|
+
mt,
|
|
296
299
|
{
|
|
297
300
|
block: e,
|
|
298
301
|
allowSignup: a,
|
|
@@ -301,9 +304,9 @@ function ct({ block: e, ctx: t }) {
|
|
|
301
304
|
}
|
|
302
305
|
);
|
|
303
306
|
}
|
|
304
|
-
function
|
|
305
|
-
return /* @__PURE__ */
|
|
306
|
-
/* @__PURE__ */
|
|
307
|
+
function bt({ email: e, onSignOut: t }) {
|
|
308
|
+
return /* @__PURE__ */ c("div", { class: "flex items-center justify-between gap-3 rounded-2xl border border-gray-200 bg-gray-50/60 px-4 py-3", children: [
|
|
309
|
+
/* @__PURE__ */ c("div", { class: "flex flex-col", children: [
|
|
307
310
|
/* @__PURE__ */ r("span", { class: "text-[10px] font-semibold uppercase tracking-wider text-gray-500", children: "Signed in" }),
|
|
308
311
|
/* @__PURE__ */ r("span", { class: "text-sm font-medium text-gray-900", children: e })
|
|
309
312
|
] }),
|
|
@@ -318,69 +321,69 @@ function mt({ email: e, onSignOut: t }) {
|
|
|
318
321
|
)
|
|
319
322
|
] });
|
|
320
323
|
}
|
|
321
|
-
function
|
|
322
|
-
const a = n.auth, o = e.providers ?? [], [s, l] = v("signin"), [
|
|
323
|
-
if (
|
|
324
|
-
_("email"),
|
|
324
|
+
function mt({ block: e, allowSignup: t, allowReset: i, ctx: n }) {
|
|
325
|
+
const a = n.auth, o = e.providers ?? [], [s, l] = v("signin"), [h, d] = v(""), [w, b] = v(""), [A, g] = v(""), [f, _] = v(null), [k, m] = v(null), [S, y] = v(null), P = async (I) => {
|
|
326
|
+
if (I.preventDefault(), !f) {
|
|
327
|
+
_("email"), m(null), y(null);
|
|
325
328
|
try {
|
|
326
|
-
s === "signin" ? await a.signInWithEmail({ email:
|
|
327
|
-
email:
|
|
328
|
-
token:
|
|
329
|
-
type:
|
|
330
|
-
}),
|
|
331
|
-
} catch (
|
|
332
|
-
const
|
|
333
|
-
|
|
329
|
+
s === "signin" ? await a.signInWithEmail({ email: h, password: w }) : s === "signup" ? (await a.signUp({ email: h, password: w })).kind === "confirmation_required" && (l("reset_verify"), y("Check your email for a confirmation code.")) : s === "forgot" ? (await a.requestPasswordReset({ email: h }), l("reset_sent"), y("If that email exists, a reset code has been sent.")) : s === "reset_verify" && (await a.verifyOtp({
|
|
330
|
+
email: h,
|
|
331
|
+
token: A,
|
|
332
|
+
type: w ? "recovery" : "email"
|
|
333
|
+
}), w && await a.updatePassword({ password: w }));
|
|
334
|
+
} catch (M) {
|
|
335
|
+
const C = M instanceof z ? M.message : "Something went wrong";
|
|
336
|
+
m(C);
|
|
334
337
|
} finally {
|
|
335
338
|
_(null);
|
|
336
339
|
}
|
|
337
340
|
}
|
|
338
|
-
},
|
|
339
|
-
if (!
|
|
340
|
-
_(
|
|
341
|
+
}, E = async (I) => {
|
|
342
|
+
if (!f) {
|
|
343
|
+
_(I), m(null), y(null);
|
|
341
344
|
try {
|
|
342
345
|
await a.signInWithOAuth({
|
|
343
|
-
provider:
|
|
346
|
+
provider: I,
|
|
344
347
|
onPopupOpened: () => _(null)
|
|
345
348
|
});
|
|
346
|
-
} catch (
|
|
347
|
-
if (
|
|
348
|
-
if (
|
|
349
|
-
|
|
349
|
+
} catch (M) {
|
|
350
|
+
if (M instanceof z) {
|
|
351
|
+
if (M.code === "oauth_cancelled" || M.code === "oauth_timeout") return;
|
|
352
|
+
m(M.message);
|
|
350
353
|
} else
|
|
351
|
-
|
|
354
|
+
m("Sign-in failed");
|
|
352
355
|
} finally {
|
|
353
356
|
_(null);
|
|
354
357
|
}
|
|
355
358
|
}
|
|
356
359
|
};
|
|
357
|
-
return /* @__PURE__ */
|
|
360
|
+
return /* @__PURE__ */ c("div", { class: "flex flex-col gap-3", children: [
|
|
358
361
|
e.heading ? /* @__PURE__ */ r("h2", { class: "text-lg font-semibold tracking-tight text-gray-900", children: e.heading }) : null,
|
|
359
|
-
o.length > 0 && (s === "signin" || s === "signup") ? /* @__PURE__ */
|
|
360
|
-
o.map((
|
|
362
|
+
o.length > 0 && (s === "signin" || s === "signup") ? /* @__PURE__ */ c("div", { class: "flex flex-col gap-2", children: [
|
|
363
|
+
o.map((I) => /* @__PURE__ */ c(
|
|
361
364
|
"button",
|
|
362
365
|
{
|
|
363
366
|
type: "button",
|
|
364
|
-
onClick: () =>
|
|
365
|
-
disabled:
|
|
367
|
+
onClick: () => E(I),
|
|
368
|
+
disabled: f !== null,
|
|
366
369
|
class: "flex h-11 w-full items-center justify-center gap-2 rounded-xl border border-gray-200 bg-white px-4 text-sm font-medium text-gray-900 shadow-[0_1px_0_rgba(15,23,42,0.04)] transition-all hover:-translate-y-px hover:border-gray-300 hover:bg-gray-50 hover:shadow-sm disabled:cursor-not-allowed disabled:opacity-60 disabled:hover:translate-y-0 disabled:hover:shadow-[0_1px_0_rgba(15,23,42,0.04)] focus:outline-none focus-visible:ring-2 focus-visible:ring-[var(--pw-accent)]",
|
|
367
370
|
children: [
|
|
368
|
-
|
|
369
|
-
/* @__PURE__ */ r("span", { children: vt[
|
|
371
|
+
f === I ? /* @__PURE__ */ r("span", { class: "inline-block h-4 w-4 animate-spin rounded-full border-2 border-gray-300 border-t-gray-700" }) : /* @__PURE__ */ r(kt, { provider: I }),
|
|
372
|
+
/* @__PURE__ */ r("span", { children: vt[I] })
|
|
370
373
|
]
|
|
371
374
|
},
|
|
372
|
-
|
|
375
|
+
I
|
|
373
376
|
)),
|
|
374
|
-
/* @__PURE__ */ r(
|
|
377
|
+
/* @__PURE__ */ r(yt, {})
|
|
375
378
|
] }) : null,
|
|
376
|
-
/* @__PURE__ */
|
|
379
|
+
/* @__PURE__ */ c("form", { onSubmit: P, class: "flex flex-col gap-2", children: [
|
|
377
380
|
(s === "signin" || s === "signup" || s === "forgot") && /* @__PURE__ */ r(
|
|
378
381
|
O,
|
|
379
382
|
{
|
|
380
383
|
type: "email",
|
|
381
384
|
label: "Email",
|
|
382
|
-
value:
|
|
383
|
-
onInput:
|
|
385
|
+
value: h,
|
|
386
|
+
onInput: d,
|
|
384
387
|
autocomplete: "email",
|
|
385
388
|
required: !0
|
|
386
389
|
}
|
|
@@ -390,20 +393,20 @@ function xt({ block: e, allowSignup: t, allowReset: i, ctx: n }) {
|
|
|
390
393
|
{
|
|
391
394
|
type: "password",
|
|
392
395
|
label: "Password",
|
|
393
|
-
value:
|
|
394
|
-
onInput:
|
|
396
|
+
value: w,
|
|
397
|
+
onInput: b,
|
|
395
398
|
autocomplete: s === "signin" ? "current-password" : "new-password",
|
|
396
399
|
required: !0
|
|
397
400
|
}
|
|
398
401
|
),
|
|
399
|
-
s === "reset_verify" && /* @__PURE__ */
|
|
402
|
+
s === "reset_verify" && /* @__PURE__ */ c(at, { children: [
|
|
400
403
|
/* @__PURE__ */ r(
|
|
401
404
|
O,
|
|
402
405
|
{
|
|
403
406
|
type: "text",
|
|
404
407
|
label: "Confirmation code",
|
|
405
|
-
value:
|
|
406
|
-
onInput:
|
|
408
|
+
value: A,
|
|
409
|
+
onInput: g,
|
|
407
410
|
autocomplete: "one-time-code",
|
|
408
411
|
inputMode: "numeric",
|
|
409
412
|
required: !0
|
|
@@ -414,39 +417,39 @@ function xt({ block: e, allowSignup: t, allowReset: i, ctx: n }) {
|
|
|
414
417
|
{
|
|
415
418
|
type: "password",
|
|
416
419
|
label: "New password (optional — only for password reset)",
|
|
417
|
-
value:
|
|
418
|
-
onInput:
|
|
420
|
+
value: w,
|
|
421
|
+
onInput: b,
|
|
419
422
|
autocomplete: "new-password"
|
|
420
423
|
}
|
|
421
424
|
)
|
|
422
425
|
] }),
|
|
423
426
|
s === "reset_sent" && S && /* @__PURE__ */ r("p", { class: "rounded-lg bg-gray-50 px-3 py-2 text-xs text-gray-600", children: S }),
|
|
424
|
-
|
|
427
|
+
k && /* @__PURE__ */ r("p", { class: "text-xs text-red-600", children: k }),
|
|
425
428
|
S && s !== "reset_sent" && /* @__PURE__ */ r("p", { class: "text-xs text-gray-500", children: S }),
|
|
426
429
|
s !== "reset_sent" && /* @__PURE__ */ r(
|
|
427
430
|
"button",
|
|
428
431
|
{
|
|
429
432
|
type: "submit",
|
|
430
|
-
disabled:
|
|
433
|
+
disabled: f !== null,
|
|
431
434
|
class: "flex h-11 w-full items-center justify-center rounded-xl px-4 text-sm font-semibold tracking-tight text-white transition-all hover:-translate-y-px hover:brightness-105 disabled:cursor-not-allowed disabled:opacity-60 disabled:hover:translate-y-0 disabled:hover:brightness-100 focus:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:ring-[var(--pw-accent)]",
|
|
432
435
|
style: {
|
|
433
436
|
background: "linear-gradient(180deg, color-mix(in srgb, var(--pw-accent) 92%, white), var(--pw-accent))",
|
|
434
437
|
boxShadow: "0 1px 2px rgba(15,23,42,0.08), 0 6px 14px -4px color-mix(in srgb, var(--pw-accent) 50%, transparent)"
|
|
435
438
|
},
|
|
436
|
-
children:
|
|
439
|
+
children: f === "email" ? /* @__PURE__ */ r("span", { class: "inline-block h-4 w-4 animate-spin rounded-full border-2 border-white/40 border-t-white" }) : xt(s)
|
|
437
440
|
}
|
|
438
441
|
)
|
|
439
442
|
] }),
|
|
440
|
-
/* @__PURE__ */
|
|
441
|
-
s === "signin" && t && /* @__PURE__ */ r("button", { type: "button", onClick: () => B(l,
|
|
442
|
-
s === "signup" && /* @__PURE__ */ r("button", { type: "button", onClick: () => B(l,
|
|
443
|
-
s === "signin" && i && /* @__PURE__ */ r("button", { type: "button", onClick: () => B(l,
|
|
444
|
-
(s === "forgot" || s === "reset_sent" || s === "reset_verify") && /* @__PURE__ */ r("button", { type: "button", onClick: () => B(l,
|
|
445
|
-
s === "reset_sent" && /* @__PURE__ */ r("button", { type: "button", onClick: () => B(l,
|
|
443
|
+
/* @__PURE__ */ c("div", { class: "flex flex-wrap items-center justify-between gap-x-3 gap-y-1 text-xs text-gray-500", children: [
|
|
444
|
+
s === "signin" && t && /* @__PURE__ */ r("button", { type: "button", onClick: () => B(l, m, y, "signup"), class: "font-medium text-gray-700 hover:underline", children: "Create account" }),
|
|
445
|
+
s === "signup" && /* @__PURE__ */ r("button", { type: "button", onClick: () => B(l, m, y, "signin"), class: "font-medium text-gray-700 hover:underline", children: "I already have an account" }),
|
|
446
|
+
s === "signin" && i && /* @__PURE__ */ r("button", { type: "button", onClick: () => B(l, m, y, "forgot"), class: "hover:underline", children: "Forgot password?" }),
|
|
447
|
+
(s === "forgot" || s === "reset_sent" || s === "reset_verify") && /* @__PURE__ */ r("button", { type: "button", onClick: () => B(l, m, y, "signin"), class: "hover:underline", children: "Back to sign in" }),
|
|
448
|
+
s === "reset_sent" && /* @__PURE__ */ r("button", { type: "button", onClick: () => B(l, m, y, "reset_verify"), class: "font-medium text-gray-700 hover:underline", children: "I have a code" })
|
|
446
449
|
] })
|
|
447
450
|
] });
|
|
448
451
|
}
|
|
449
|
-
function
|
|
452
|
+
function xt(e) {
|
|
450
453
|
switch (e) {
|
|
451
454
|
case "signin":
|
|
452
455
|
return "Sign in";
|
|
@@ -464,7 +467,7 @@ function B(e, t, i, n) {
|
|
|
464
467
|
e(n), t(null), i(null);
|
|
465
468
|
}
|
|
466
469
|
function O({ type: e, label: t, value: i, onInput: n, autocomplete: a, inputMode: o, required: s }) {
|
|
467
|
-
return /* @__PURE__ */
|
|
470
|
+
return /* @__PURE__ */ c("label", { class: "flex flex-col gap-1.5", children: [
|
|
468
471
|
/* @__PURE__ */ r("span", { class: "text-xs font-medium text-gray-700", children: t }),
|
|
469
472
|
/* @__PURE__ */ r(
|
|
470
473
|
"input",
|
|
@@ -480,22 +483,22 @@ function O({ type: e, label: t, value: i, onInput: n, autocomplete: a, inputMode
|
|
|
480
483
|
)
|
|
481
484
|
] });
|
|
482
485
|
}
|
|
483
|
-
function
|
|
484
|
-
return /* @__PURE__ */
|
|
486
|
+
function yt() {
|
|
487
|
+
return /* @__PURE__ */ c("div", { class: "flex items-center gap-2 py-1 text-[10px] uppercase tracking-[0.14em] text-gray-400", children: [
|
|
485
488
|
/* @__PURE__ */ r("div", { class: "h-px flex-1 bg-gradient-to-r from-gray-200 to-transparent" }),
|
|
486
489
|
/* @__PURE__ */ r("span", { children: "or" }),
|
|
487
490
|
/* @__PURE__ */ r("div", { class: "h-px flex-1 bg-gradient-to-r from-transparent to-gray-200" })
|
|
488
491
|
] });
|
|
489
492
|
}
|
|
490
|
-
function
|
|
491
|
-
return e === "google" ? /* @__PURE__ */
|
|
493
|
+
function kt({ provider: e }) {
|
|
494
|
+
return e === "google" ? /* @__PURE__ */ c("svg", { width: "16", height: "16", viewBox: "0 0 18 18", "aria-hidden": "true", children: [
|
|
492
495
|
/* @__PURE__ */ r("path", { fill: "#4285F4", d: "M17.64 9.2c0-.64-.06-1.25-.16-1.84H9v3.49h4.84a4.14 4.14 0 0 1-1.79 2.71v2.26h2.9c1.7-1.56 2.69-3.87 2.69-6.62Z" }),
|
|
493
496
|
/* @__PURE__ */ r("path", { fill: "#34A853", d: "M9 18c2.43 0 4.47-.8 5.96-2.18l-2.9-2.26c-.8.54-1.83.86-3.06.86-2.36 0-4.36-1.59-5.07-3.74H.92v2.33A9 9 0 0 0 9 18Z" }),
|
|
494
497
|
/* @__PURE__ */ r("path", { fill: "#FBBC05", d: "M3.93 10.68a5.4 5.4 0 0 1 0-3.36V4.99H.92a9 9 0 0 0 0 8.02l3-2.33Z" }),
|
|
495
498
|
/* @__PURE__ */ r("path", { fill: "#EA4335", d: "M9 3.58c1.32 0 2.5.45 3.44 1.34l2.58-2.58A9 9 0 0 0 .92 4.99l3.01 2.33C4.64 5.17 6.64 3.58 9 3.58Z" })
|
|
496
499
|
] }) : e === "apple" ? /* @__PURE__ */ r("svg", { width: "14", height: "16", viewBox: "0 0 14 16", fill: "currentColor", "aria-hidden": "true", children: /* @__PURE__ */ r("path", { d: "M11.4 8.5c0-2 1.6-3 1.7-3-.9-1.3-2.4-1.5-2.9-1.5-1.2-.1-2.4.7-3 .7-.6 0-1.6-.7-2.6-.7-1.3 0-2.6.8-3.3 2C-.4 8.4.7 12.5 2.2 14.7c.7 1.1 1.6 2.3 2.7 2.3 1.1 0 1.5-.7 2.8-.7 1.3 0 1.7.7 2.8.7 1.2 0 1.9-1.1 2.6-2.2.6-.9 1-1.8 1.1-2.7-1.4-.5-2.8-1.7-2.8-3.6Zm-2-6.5C10 1.3 10.4.4 10.3 0c-.7 0-1.6.5-2.1 1.1-.5.5-1 1.4-.9 2.2.7 0 1.5-.4 2.1-1.3Z" }) }) : e === "github" ? /* @__PURE__ */ r("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "currentColor", "aria-hidden": "true", children: /* @__PURE__ */ r("path", { d: "M8 0C3.6 0 0 3.6 0 8a8 8 0 0 0 5.5 7.6c.4.1.5-.2.5-.4v-1.5c-2.2.5-2.7-1-2.7-1-.4-.9-.9-1.2-.9-1.2-.7-.5.1-.5.1-.5.8.1 1.2.8 1.2.8.7 1.2 1.9.9 2.4.7 0-.5.3-.9.5-1.1-1.8-.2-3.6-.9-3.6-4 0-.9.3-1.6.8-2.1-.1-.2-.4-1 .1-2.1 0 0 .7-.2 2.2.8a7.6 7.6 0 0 1 4 0c1.5-1 2.2-.8 2.2-.8.4 1.1.2 1.9.1 2.1.5.5.8 1.2.8 2.1 0 3.1-1.9 3.7-3.6 3.9.3.3.6.8.6 1.6V15c0 .2.1.5.6.4A8 8 0 0 0 16 8c0-4.4-3.6-8-8-8Z" }) }) : /* @__PURE__ */ r("svg", { width: "14", height: "16", viewBox: "0 0 14 16", fill: "currentColor", "aria-hidden": "true", children: /* @__PURE__ */ r("path", { d: "M14 2.7C14 1.2 12.8 0 11.3 0H2.7C1.2 0 0 1.2 0 2.7v10.6C0 14.8 1.2 16 2.7 16h4V9.8H4.7v-2H6.7V6.4c0-2 1.2-3.1 3-3.1.9 0 1.7.1 2 .2V5h-1.4c-.8 0-1 .4-1 1v1.5h2.4l-.3 2H9.3V16h2c1.5 0 2.7-1.2 2.7-2.7V2.7Z" }) });
|
|
497
500
|
}
|
|
498
|
-
function
|
|
501
|
+
function _t({
|
|
499
502
|
block: e,
|
|
500
503
|
bootstrap: t,
|
|
501
504
|
auth: i,
|
|
@@ -503,7 +506,7 @@ function St({
|
|
|
503
506
|
onBack: a,
|
|
504
507
|
showBack: o = !0
|
|
505
508
|
}) {
|
|
506
|
-
return /* @__PURE__ */
|
|
509
|
+
return /* @__PURE__ */ c("div", { class: "flex flex-col gap-3", children: [
|
|
507
510
|
o ? /* @__PURE__ */ r(
|
|
508
511
|
"button",
|
|
509
512
|
{
|
|
@@ -513,7 +516,7 @@ function St({
|
|
|
513
516
|
children: "← Back"
|
|
514
517
|
}
|
|
515
518
|
) : null,
|
|
516
|
-
/* @__PURE__ */ r(
|
|
519
|
+
/* @__PURE__ */ r(lt, { block: e, ctx: {
|
|
517
520
|
bootstrap: t,
|
|
518
521
|
selectedPriceId: null,
|
|
519
522
|
setSelectedPriceId: () => {
|
|
@@ -525,35 +528,35 @@ function St({
|
|
|
525
528
|
} })
|
|
526
529
|
] });
|
|
527
530
|
}
|
|
528
|
-
function
|
|
531
|
+
function St({
|
|
529
532
|
auth: e,
|
|
530
533
|
onSuccess: t,
|
|
531
534
|
onBack: i,
|
|
532
535
|
heading: n = "Continue as guest",
|
|
533
536
|
description: a = "Setting up your guest session…"
|
|
534
537
|
}) {
|
|
535
|
-
const [o, s] = v({ kind: "signing-in" }), l =
|
|
536
|
-
|
|
538
|
+
const [o, s] = v({ kind: "signing-in" }), l = L(!0);
|
|
539
|
+
T(() => () => {
|
|
537
540
|
l.current = !1;
|
|
538
541
|
}, []);
|
|
539
|
-
const
|
|
542
|
+
const h = () => {
|
|
540
543
|
s({ kind: "signing-in" }), (async () => {
|
|
541
544
|
try {
|
|
542
|
-
const
|
|
545
|
+
const d = await e.signInAnonymously();
|
|
543
546
|
if (!l.current) return;
|
|
544
|
-
t(
|
|
545
|
-
} catch (
|
|
547
|
+
t(d);
|
|
548
|
+
} catch (d) {
|
|
546
549
|
if (!l.current) return;
|
|
547
550
|
s({
|
|
548
551
|
kind: "error",
|
|
549
|
-
message:
|
|
552
|
+
message: d instanceof Error ? d.message : "Anonymous sign-in failed"
|
|
550
553
|
});
|
|
551
554
|
}
|
|
552
555
|
})();
|
|
553
556
|
};
|
|
554
|
-
return
|
|
555
|
-
|
|
556
|
-
}, []), /* @__PURE__ */
|
|
557
|
+
return T(() => {
|
|
558
|
+
h();
|
|
559
|
+
}, []), /* @__PURE__ */ c("div", { class: "flex flex-col gap-3", children: [
|
|
557
560
|
i ? /* @__PURE__ */ r(
|
|
558
561
|
"button",
|
|
559
562
|
{
|
|
@@ -563,18 +566,18 @@ function Ct({
|
|
|
563
566
|
children: "← Back"
|
|
564
567
|
}
|
|
565
568
|
) : null,
|
|
566
|
-
/* @__PURE__ */
|
|
569
|
+
/* @__PURE__ */ c("div", { class: "flex flex-col gap-1", children: [
|
|
567
570
|
/* @__PURE__ */ r("h2", { class: "text-xl font-semibold text-gray-900", children: n }),
|
|
568
571
|
/* @__PURE__ */ r("p", { class: "text-sm text-gray-500", children: a })
|
|
569
572
|
] }),
|
|
570
|
-
o.kind === "signing-in" ? /* @__PURE__ */ r("div", { class: "flex items-center justify-center py-6", children: /* @__PURE__ */ r(
|
|
571
|
-
o.kind === "error" ? /* @__PURE__ */
|
|
573
|
+
o.kind === "signing-in" ? /* @__PURE__ */ r("div", { class: "flex items-center justify-center py-6", children: /* @__PURE__ */ r(Ct, {}) }) : null,
|
|
574
|
+
o.kind === "error" ? /* @__PURE__ */ c("div", { class: "flex flex-col gap-3", children: [
|
|
572
575
|
/* @__PURE__ */ r("div", { class: "rounded-lg bg-red-50 px-3 py-2 text-sm text-red-700", children: o.message }),
|
|
573
576
|
/* @__PURE__ */ r(
|
|
574
577
|
"button",
|
|
575
578
|
{
|
|
576
579
|
type: "button",
|
|
577
|
-
onClick:
|
|
580
|
+
onClick: h,
|
|
578
581
|
class: "self-start rounded-md bg-[var(--pw-accent)] px-3 py-1.5 text-sm font-medium text-white hover:opacity-90 focus:outline-none focus-visible:ring-2 focus-visible:ring-[var(--pw-accent)] focus-visible:ring-offset-2",
|
|
579
582
|
children: "Try again"
|
|
580
583
|
}
|
|
@@ -582,42 +585,42 @@ function Ct({
|
|
|
582
585
|
] }) : null
|
|
583
586
|
] });
|
|
584
587
|
}
|
|
585
|
-
function
|
|
586
|
-
return /* @__PURE__ */
|
|
588
|
+
function Ct() {
|
|
589
|
+
return /* @__PURE__ */ c("svg", { class: "h-5 w-5 animate-spin text-[var(--pw-accent)]", viewBox: "0 0 24 24", fill: "none", children: [
|
|
587
590
|
/* @__PURE__ */ r("circle", { cx: "12", cy: "12", r: "10", stroke: "currentColor", "stroke-width": "3", "stroke-opacity": "0.2" }),
|
|
588
591
|
/* @__PURE__ */ r("path", { d: "M22 12a10 10 0 0 0-10-10", stroke: "currentColor", "stroke-width": "3", "stroke-linecap": "round" })
|
|
589
592
|
] });
|
|
590
593
|
}
|
|
591
|
-
const
|
|
592
|
-
function
|
|
593
|
-
const a = t?.user.email ?? "", o = a || null, [s, l] = v(a), [
|
|
594
|
-
const
|
|
595
|
-
return
|
|
596
|
-
}, [o, s,
|
|
597
|
-
const
|
|
598
|
-
return u ?
|
|
599
|
-
},
|
|
600
|
-
if (
|
|
594
|
+
const D = 3, H = 200, V = 5e3, $ = 5, It = 10 * 1024 * 1024, J = ["image/jpeg", "image/png", "image/webp"], Q = /.+@.+\..+/;
|
|
595
|
+
function At({ client: e, authSession: t, origin: i, onBack: n }) {
|
|
596
|
+
const a = t?.user.email ?? "", o = a || null, [s, l] = v(a), [h, d] = v(""), [w, b] = v(""), [A, g] = v([]), [f, _] = v(!1), [k, m] = v(null), [S, y] = v({}), P = nt(() => {
|
|
597
|
+
const C = (o ?? s).trim().toLowerCase(), u = h.trim(), p = w.trim();
|
|
598
|
+
return Q.test(C) && u.length >= D && u.length <= H && p.length >= 1 && p.length <= V;
|
|
599
|
+
}, [o, s, h, w]), E = () => {
|
|
600
|
+
const C = {}, u = (o ?? s).trim(), p = h.trim(), x = w.trim();
|
|
601
|
+
return u ? Q.test(u.toLowerCase()) || (C.email = "Invalid email") : C.email = "Required", (p.length < D || p.length > H) && (C.subject = `${D}–${H} characters`), (x.length < 1 || x.length > V) && (C.message = `1–${V} characters`), y(C), Object.keys(C).length === 0;
|
|
602
|
+
}, I = async (C) => {
|
|
603
|
+
if (C.preventDefault(), !f && E()) {
|
|
601
604
|
_(!0), y((u) => ({ ...u, submit: void 0 }));
|
|
602
605
|
try {
|
|
603
606
|
const u = (o ?? s).trim();
|
|
604
607
|
await e.createSupportTicket({
|
|
605
|
-
subject:
|
|
606
|
-
content:
|
|
608
|
+
subject: h.trim(),
|
|
609
|
+
content: w.trim(),
|
|
607
610
|
email: u || void 0,
|
|
608
|
-
files:
|
|
609
|
-
}),
|
|
611
|
+
files: A.length > 0 ? A : void 0
|
|
612
|
+
}), m(u);
|
|
610
613
|
} catch (u) {
|
|
611
|
-
const
|
|
612
|
-
y((
|
|
614
|
+
const p = u instanceof z && u.message || "Failed to send. Please try again.";
|
|
615
|
+
y((x) => ({ ...x, submit: p }));
|
|
613
616
|
} finally {
|
|
614
617
|
_(!1);
|
|
615
618
|
}
|
|
616
619
|
}
|
|
617
|
-
},
|
|
618
|
-
|
|
620
|
+
}, M = () => {
|
|
621
|
+
d(""), b(""), g([]), y({}), m(null);
|
|
619
622
|
};
|
|
620
|
-
return
|
|
623
|
+
return k ? /* @__PURE__ */ c("div", { class: "flex flex-col items-center gap-4 py-2 text-center", children: [
|
|
621
624
|
/* @__PURE__ */ r(
|
|
622
625
|
"div",
|
|
623
626
|
{
|
|
@@ -638,13 +641,13 @@ function Mt({ client: e, authSession: t, origin: i, onBack: n }) {
|
|
|
638
641
|
}
|
|
639
642
|
),
|
|
640
643
|
/* @__PURE__ */ r("div", { class: "text-lg font-semibold tracking-tight text-gray-900", children: "Request submitted" }),
|
|
641
|
-
/* @__PURE__ */
|
|
644
|
+
/* @__PURE__ */ c("div", { class: "max-w-[320px] text-sm leading-relaxed text-gray-500", children: [
|
|
642
645
|
"We've received your message and will respond to",
|
|
643
646
|
" ",
|
|
644
|
-
/* @__PURE__ */ r("b", { class: "text-gray-700", children:
|
|
647
|
+
/* @__PURE__ */ r("b", { class: "text-gray-700", children: k }),
|
|
645
648
|
"."
|
|
646
649
|
] }),
|
|
647
|
-
/* @__PURE__ */
|
|
650
|
+
/* @__PURE__ */ c("div", { class: "mt-2 flex items-center justify-center gap-3", children: [
|
|
648
651
|
/* @__PURE__ */ r(
|
|
649
652
|
"button",
|
|
650
653
|
{
|
|
@@ -658,7 +661,7 @@ function Mt({ client: e, authSession: t, origin: i, onBack: n }) {
|
|
|
658
661
|
"button",
|
|
659
662
|
{
|
|
660
663
|
type: "button",
|
|
661
|
-
onClick:
|
|
664
|
+
onClick: M,
|
|
662
665
|
class: "flex h-10 items-center justify-center rounded-xl px-4 text-sm font-semibold text-white transition-all hover:-translate-y-px hover:brightness-105 focus:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:ring-[var(--pw-accent)]",
|
|
663
666
|
style: {
|
|
664
667
|
background: "linear-gradient(180deg, color-mix(in srgb, var(--pw-accent) 92%, white), var(--pw-accent))",
|
|
@@ -668,8 +671,8 @@ function Mt({ client: e, authSession: t, origin: i, onBack: n }) {
|
|
|
668
671
|
}
|
|
669
672
|
)
|
|
670
673
|
] })
|
|
671
|
-
] }) : /* @__PURE__ */
|
|
672
|
-
/* @__PURE__ */ r("div", { class: "flex items-center justify-between", children: /* @__PURE__ */
|
|
674
|
+
] }) : /* @__PURE__ */ c("div", { class: "flex flex-col gap-3", children: [
|
|
675
|
+
/* @__PURE__ */ r("div", { class: "flex items-center justify-between", children: /* @__PURE__ */ c(
|
|
673
676
|
"button",
|
|
674
677
|
{
|
|
675
678
|
type: "button",
|
|
@@ -683,12 +686,12 @@ function Mt({ client: e, authSession: t, origin: i, onBack: n }) {
|
|
|
683
686
|
) }),
|
|
684
687
|
/* @__PURE__ */ r("h2", { class: "text-lg font-semibold tracking-tight text-gray-900", children: "Contact Support" }),
|
|
685
688
|
/* @__PURE__ */ r("p", { class: "text-xs leading-relaxed text-gray-500", children: "Fill out the form below and we'll get back to you." }),
|
|
686
|
-
/* @__PURE__ */
|
|
687
|
-
o ? /* @__PURE__ */
|
|
689
|
+
/* @__PURE__ */ c("form", { onSubmit: I, class: "flex flex-col gap-3", children: [
|
|
690
|
+
o ? /* @__PURE__ */ c("div", { class: "rounded-xl border border-gray-200 bg-gray-50/60 px-3 py-2 text-xs text-gray-500", children: [
|
|
688
691
|
"Sending as ",
|
|
689
692
|
/* @__PURE__ */ r("b", { class: "font-medium text-gray-700", children: o })
|
|
690
693
|
] }) : /* @__PURE__ */ r(
|
|
691
|
-
|
|
694
|
+
tt,
|
|
692
695
|
{
|
|
693
696
|
type: "email",
|
|
694
697
|
label: "Your email",
|
|
@@ -700,35 +703,35 @@ function Mt({ client: e, authSession: t, origin: i, onBack: n }) {
|
|
|
700
703
|
}
|
|
701
704
|
),
|
|
702
705
|
/* @__PURE__ */ r(
|
|
703
|
-
|
|
706
|
+
tt,
|
|
704
707
|
{
|
|
705
708
|
type: "text",
|
|
706
709
|
label: "Subject",
|
|
707
|
-
value:
|
|
708
|
-
onInput:
|
|
710
|
+
value: h,
|
|
711
|
+
onInput: d,
|
|
709
712
|
error: S.subject,
|
|
710
713
|
required: !0
|
|
711
714
|
}
|
|
712
715
|
),
|
|
713
716
|
/* @__PURE__ */ r(
|
|
714
|
-
|
|
717
|
+
Mt,
|
|
715
718
|
{
|
|
716
719
|
label: "Message",
|
|
717
|
-
value:
|
|
718
|
-
onInput:
|
|
720
|
+
value: w,
|
|
721
|
+
onInput: b,
|
|
719
722
|
error: S.message,
|
|
720
723
|
required: !0
|
|
721
724
|
}
|
|
722
725
|
),
|
|
723
|
-
/* @__PURE__ */ r(
|
|
726
|
+
/* @__PURE__ */ r(Tt, { files: A, onChange: g, disabled: f }),
|
|
724
727
|
S.submit && /* @__PURE__ */ r("p", { class: "text-xs text-red-600", children: S.submit }),
|
|
725
|
-
/* @__PURE__ */
|
|
728
|
+
/* @__PURE__ */ c("div", { class: "mt-1 flex items-center justify-end gap-2", children: [
|
|
726
729
|
/* @__PURE__ */ r(
|
|
727
730
|
"button",
|
|
728
731
|
{
|
|
729
732
|
type: "button",
|
|
730
733
|
onClick: n,
|
|
731
|
-
disabled:
|
|
734
|
+
disabled: f,
|
|
732
735
|
class: "rounded-xl px-3 py-2 text-sm font-medium text-gray-600 transition-colors hover:bg-gray-100 disabled:cursor-not-allowed disabled:opacity-60 focus:outline-none focus-visible:ring-2 focus-visible:ring-[var(--pw-accent)]",
|
|
733
736
|
children: i === "standalone" ? "Close" : "Back"
|
|
734
737
|
}
|
|
@@ -737,21 +740,21 @@ function Mt({ client: e, authSession: t, origin: i, onBack: n }) {
|
|
|
737
740
|
"button",
|
|
738
741
|
{
|
|
739
742
|
type: "submit",
|
|
740
|
-
disabled: !
|
|
743
|
+
disabled: !P || f,
|
|
741
744
|
class: "flex h-10 items-center justify-center rounded-xl px-4 text-sm font-semibold text-white transition-all hover:-translate-y-px hover:brightness-105 disabled:cursor-not-allowed disabled:opacity-60 disabled:hover:translate-y-0 disabled:hover:brightness-100 focus:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:ring-[var(--pw-accent)]",
|
|
742
745
|
style: {
|
|
743
746
|
background: "linear-gradient(180deg, color-mix(in srgb, var(--pw-accent) 92%, white), var(--pw-accent))",
|
|
744
747
|
boxShadow: "0 1px 2px rgba(15,23,42,0.08), 0 6px 14px -4px color-mix(in srgb, var(--pw-accent) 50%, transparent)"
|
|
745
748
|
},
|
|
746
|
-
children:
|
|
749
|
+
children: f ? /* @__PURE__ */ r("span", { class: "inline-block h-4 w-4 animate-spin rounded-full border-2 border-white/40 border-t-white" }) : "Send"
|
|
747
750
|
}
|
|
748
751
|
)
|
|
749
752
|
] })
|
|
750
753
|
] })
|
|
751
754
|
] });
|
|
752
755
|
}
|
|
753
|
-
function
|
|
754
|
-
return /* @__PURE__ */
|
|
756
|
+
function tt({ type: e, label: t, value: i, onInput: n, error: a, autocomplete: o, required: s }) {
|
|
757
|
+
return /* @__PURE__ */ c("label", { class: "flex flex-col gap-1.5", children: [
|
|
755
758
|
/* @__PURE__ */ r("span", { class: "text-xs font-medium text-gray-700", children: t }),
|
|
756
759
|
/* @__PURE__ */ r(
|
|
757
760
|
"input",
|
|
@@ -767,8 +770,8 @@ function Q({ type: e, label: t, value: i, onInput: n, error: a, autocomplete: o,
|
|
|
767
770
|
a && /* @__PURE__ */ r("span", { class: "text-xs text-red-600", children: a })
|
|
768
771
|
] });
|
|
769
772
|
}
|
|
770
|
-
function
|
|
771
|
-
return /* @__PURE__ */
|
|
773
|
+
function Mt({ label: e, value: t, onInput: i, error: n, required: a }) {
|
|
774
|
+
return /* @__PURE__ */ c("label", { class: "flex flex-col gap-1.5", children: [
|
|
772
775
|
/* @__PURE__ */ r("span", { class: "text-xs font-medium text-gray-700", children: e }),
|
|
773
776
|
/* @__PURE__ */ r(
|
|
774
777
|
"textarea",
|
|
@@ -783,46 +786,46 @@ function Tt({ label: e, value: t, onInput: i, error: n, required: a }) {
|
|
|
783
786
|
n && /* @__PURE__ */ r("span", { class: "text-xs text-red-600", children: n })
|
|
784
787
|
] });
|
|
785
788
|
}
|
|
786
|
-
function
|
|
787
|
-
const n =
|
|
788
|
-
if (!
|
|
789
|
+
function Tt({ files: e, onChange: t, disabled: i }) {
|
|
790
|
+
const n = L(null), [a, o] = v(!1), [s, l] = v(null), h = (d) => {
|
|
791
|
+
if (!d || i) return;
|
|
789
792
|
l(null);
|
|
790
|
-
const
|
|
791
|
-
if (e.length +
|
|
792
|
-
l(`Up to ${
|
|
793
|
+
const w = Array.from(d);
|
|
794
|
+
if (e.length + w.length > $) {
|
|
795
|
+
l(`Up to ${$} files`);
|
|
793
796
|
return;
|
|
794
797
|
}
|
|
795
|
-
const
|
|
796
|
-
(
|
|
798
|
+
const b = w.filter(
|
|
799
|
+
(A) => J.includes(A.type) && A.size <= It
|
|
797
800
|
);
|
|
798
|
-
if (
|
|
801
|
+
if (b.length !== w.length) {
|
|
799
802
|
l("Only JPEG/PNG/WebP, ≤ 10MB each");
|
|
800
803
|
return;
|
|
801
804
|
}
|
|
802
|
-
t([...e, ...
|
|
805
|
+
t([...e, ...b]);
|
|
803
806
|
};
|
|
804
|
-
return /* @__PURE__ */
|
|
807
|
+
return /* @__PURE__ */ c("div", { children: [
|
|
805
808
|
/* @__PURE__ */ r("span", { class: "text-xs font-medium text-gray-700", children: "Attachments (optional)" }),
|
|
806
|
-
/* @__PURE__ */
|
|
809
|
+
/* @__PURE__ */ c(
|
|
807
810
|
"div",
|
|
808
811
|
{
|
|
809
812
|
role: "button",
|
|
810
813
|
tabIndex: 0,
|
|
811
814
|
"aria-label": "Attachments upload",
|
|
812
815
|
onClick: () => !i && n.current?.click(),
|
|
813
|
-
onDragOver: (
|
|
814
|
-
|
|
816
|
+
onDragOver: (d) => {
|
|
817
|
+
d.preventDefault(), i || o(!0);
|
|
815
818
|
},
|
|
816
819
|
onDragLeave: () => o(!1),
|
|
817
|
-
onDrop: (
|
|
818
|
-
|
|
820
|
+
onDrop: (d) => {
|
|
821
|
+
d.preventDefault(), o(!1), h(d.dataTransfer?.files ?? null);
|
|
819
822
|
},
|
|
820
823
|
class: `mt-1.5 cursor-pointer rounded-2xl border border-dashed p-3.5 text-center transition-all ${a ? "border-[var(--pw-accent)] bg-[color-mix(in_srgb,var(--pw-accent)_6%,white)]" : "border-gray-300 hover:border-gray-400 hover:bg-gray-50/60"} ${i ? "cursor-not-allowed opacity-60" : ""}`,
|
|
821
824
|
children: [
|
|
822
825
|
/* @__PURE__ */ r("div", { class: "text-xs text-gray-500", children: "Drop images here or click to select" }),
|
|
823
|
-
/* @__PURE__ */
|
|
826
|
+
/* @__PURE__ */ c("div", { class: "mt-0.5 text-[11px] text-gray-400", children: [
|
|
824
827
|
"JPEG/PNG/WebP, up to ",
|
|
825
|
-
|
|
828
|
+
$,
|
|
826
829
|
" files, ≤ 10MB each"
|
|
827
830
|
] })
|
|
828
831
|
]
|
|
@@ -836,39 +839,39 @@ function Et({ files: e, onChange: t, disabled: i }) {
|
|
|
836
839
|
multiple: !0,
|
|
837
840
|
accept: J.join(","),
|
|
838
841
|
class: "hidden",
|
|
839
|
-
onChange: (
|
|
840
|
-
|
|
842
|
+
onChange: (d) => {
|
|
843
|
+
h(d.target.files), d.currentTarget.value = "";
|
|
841
844
|
}
|
|
842
845
|
}
|
|
843
846
|
),
|
|
844
847
|
s && /* @__PURE__ */ r("p", { class: "mt-1 text-xs text-red-600", children: s }),
|
|
845
|
-
e.length > 0 && /* @__PURE__ */ r("ul", { class: "mt-2 flex flex-col gap-1", children: e.map((
|
|
848
|
+
e.length > 0 && /* @__PURE__ */ r("ul", { class: "mt-2 flex flex-col gap-1", children: e.map((d, w) => /* @__PURE__ */ c(
|
|
846
849
|
"li",
|
|
847
850
|
{
|
|
848
851
|
class: "flex items-center justify-between gap-2 rounded bg-gray-50 px-2 py-1 text-xs",
|
|
849
852
|
children: [
|
|
850
|
-
/* @__PURE__ */ r("span", { class: "truncate text-gray-700", children:
|
|
853
|
+
/* @__PURE__ */ r("span", { class: "truncate text-gray-700", children: d.name }),
|
|
851
854
|
/* @__PURE__ */ r(
|
|
852
855
|
"button",
|
|
853
856
|
{
|
|
854
857
|
type: "button",
|
|
855
858
|
onClick: () => {
|
|
856
|
-
const
|
|
857
|
-
|
|
859
|
+
const b = [...e];
|
|
860
|
+
b.splice(w, 1), t(b);
|
|
858
861
|
},
|
|
859
862
|
disabled: i,
|
|
860
863
|
class: "text-gray-500 hover:text-red-600 disabled:cursor-not-allowed disabled:opacity-60",
|
|
861
|
-
"aria-label": `Remove ${
|
|
864
|
+
"aria-label": `Remove ${d.name}`,
|
|
862
865
|
children: "✕"
|
|
863
866
|
}
|
|
864
867
|
)
|
|
865
868
|
]
|
|
866
869
|
},
|
|
867
|
-
`${
|
|
870
|
+
`${d.name}-${d.size}-${w}`
|
|
868
871
|
)) })
|
|
869
872
|
] });
|
|
870
873
|
}
|
|
871
|
-
function
|
|
874
|
+
function zt({ block: e, ctx: t }) {
|
|
872
875
|
const [i, n] = v(!1), a = e.priceId ?? t.selectedPriceId, o = i || e.action === "checkout" && !a;
|
|
873
876
|
return /* @__PURE__ */ r(
|
|
874
877
|
"button",
|
|
@@ -885,16 +888,16 @@ function Pt({ block: e, ctx: t }) {
|
|
|
885
888
|
}
|
|
886
889
|
}
|
|
887
890
|
},
|
|
888
|
-
class: "relative flex h-
|
|
891
|
+
class: "pw-cta-shimmer relative mt-1 flex h-14 w-full items-center justify-center overflow-hidden rounded-full px-6 text-base font-semibold tracking-tight text-white transition-transform duration-150 hover:-translate-y-px active:scale-[0.98] active:translate-y-0 disabled:cursor-not-allowed disabled:opacity-60 disabled:hover:translate-y-0 focus:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:ring-[var(--pw-accent)]",
|
|
889
892
|
style: {
|
|
890
|
-
background: "linear-gradient(
|
|
891
|
-
boxShadow: "0
|
|
893
|
+
background: "linear-gradient(135deg, color-mix(in srgb, var(--pw-accent) 55%, white) 0%, var(--pw-accent) 55%, color-mix(in srgb, var(--pw-accent) 90%, black) 100%)",
|
|
894
|
+
boxShadow: "0 0 24px 0 color-mix(in srgb, var(--pw-accent) 35%, transparent), inset 0 0 8px 0 color-mix(in srgb, white 25%, transparent), 0 1px 2px rgba(15,23,42,0.08)"
|
|
892
895
|
},
|
|
893
|
-
children: i ? /* @__PURE__ */ r("span", { class: "inline-block h-4 w-4 animate-spin rounded-full border-2 border-white/40 border-t-white" }) : e.label
|
|
896
|
+
children: i ? /* @__PURE__ */ r("span", { class: "relative z-10 inline-block h-4 w-4 animate-spin rounded-full border-2 border-white/40 border-t-white" }) : /* @__PURE__ */ r("span", { class: "relative z-10", children: e.label })
|
|
894
897
|
}
|
|
895
898
|
);
|
|
896
899
|
}
|
|
897
|
-
function
|
|
900
|
+
function Pt({ ctx: e }) {
|
|
898
901
|
const t = e.authSession, i = e.auth, [n, a] = v(!1), o = () => e.onAction("support");
|
|
899
902
|
if (t && !t.user.is_anonymous) {
|
|
900
903
|
const s = async () => {
|
|
@@ -908,55 +911,47 @@ function jt({ ctx: e }) {
|
|
|
908
911
|
}
|
|
909
912
|
}
|
|
910
913
|
};
|
|
911
|
-
return /* @__PURE__ */
|
|
912
|
-
/* @__PURE__ */
|
|
913
|
-
|
|
914
|
-
|
|
915
|
-
/* @__PURE__ */ r(
|
|
916
|
-
|
|
917
|
-
|
|
918
|
-
|
|
919
|
-
onClick: s,
|
|
920
|
-
disabled: !i || n,
|
|
921
|
-
class: "font-medium text-gray-600 underline-offset-2 hover:underline disabled:cursor-not-allowed disabled:opacity-60 focus:outline-none focus-visible:underline",
|
|
922
|
-
children: n ? "Signing out…" : "Sign out"
|
|
923
|
-
}
|
|
924
|
-
),
|
|
914
|
+
return /* @__PURE__ */ c("div", { class: "-mt-3 flex flex-col items-center gap-1.5 pt-1 text-center text-[13px] text-gray-500", children: [
|
|
915
|
+
/* @__PURE__ */ c("span", { children: [
|
|
916
|
+
"Signed in as",
|
|
917
|
+
" ",
|
|
918
|
+
/* @__PURE__ */ r("b", { class: "font-medium text-gray-700", children: t.user.email })
|
|
919
|
+
] }),
|
|
920
|
+
/* @__PURE__ */ c("div", { class: "flex items-center justify-center gap-3", children: [
|
|
921
|
+
/* @__PURE__ */ r(U, { onClick: s, disabled: !i || n, children: n ? "Signing out…" : "Sign Out" }),
|
|
925
922
|
/* @__PURE__ */ r(et, {}),
|
|
926
|
-
/* @__PURE__ */ r(
|
|
923
|
+
/* @__PURE__ */ r(U, { onClick: o, children: "Contact Support" })
|
|
927
924
|
] })
|
|
928
925
|
] });
|
|
929
926
|
}
|
|
930
|
-
return /* @__PURE__ */
|
|
931
|
-
/* @__PURE__ */ r(
|
|
932
|
-
"button",
|
|
933
|
-
{
|
|
934
|
-
type: "button",
|
|
935
|
-
onClick: () => e.onAction("restore"),
|
|
936
|
-
class: "font-medium text-gray-600 underline-offset-2 hover:underline focus:outline-none focus-visible:underline",
|
|
937
|
-
children: "Restore purchases"
|
|
938
|
-
}
|
|
939
|
-
),
|
|
927
|
+
return /* @__PURE__ */ c("div", { class: "-mt-3 flex items-center justify-center gap-3 pt-1 text-center text-[13px]", children: [
|
|
928
|
+
/* @__PURE__ */ r(U, { onClick: () => e.onAction("restore"), children: "Restore purchases" }),
|
|
940
929
|
/* @__PURE__ */ r(et, {}),
|
|
941
|
-
/* @__PURE__ */ r(
|
|
930
|
+
/* @__PURE__ */ r(U, { onClick: o, children: "Contact Support" })
|
|
942
931
|
] });
|
|
943
932
|
}
|
|
944
|
-
function
|
|
933
|
+
function U({
|
|
934
|
+
onClick: e,
|
|
935
|
+
disabled: t,
|
|
936
|
+
children: i
|
|
937
|
+
}) {
|
|
945
938
|
return /* @__PURE__ */ r(
|
|
946
939
|
"button",
|
|
947
940
|
{
|
|
948
941
|
type: "button",
|
|
949
942
|
onClick: e,
|
|
950
|
-
|
|
951
|
-
|
|
943
|
+
disabled: t,
|
|
944
|
+
class: "font-semibold underline underline-offset-2 transition-opacity hover:opacity-80 disabled:cursor-not-allowed disabled:opacity-60 focus:outline-none focus-visible:opacity-80",
|
|
945
|
+
style: { color: "var(--pw-accent)" },
|
|
946
|
+
children: i
|
|
952
947
|
}
|
|
953
948
|
);
|
|
954
949
|
}
|
|
955
950
|
function et() {
|
|
956
951
|
return /* @__PURE__ */ r("span", { class: "h-1 w-1 rounded-full bg-gray-300", "aria-hidden": "true" });
|
|
957
952
|
}
|
|
958
|
-
function
|
|
959
|
-
return e.items.length ? /* @__PURE__ */ r("ul", { class: "flex flex-col gap-2.5", role: "list", children: e.items.map((t) => /* @__PURE__ */
|
|
953
|
+
function Et({ block: e }) {
|
|
954
|
+
return e.items.length ? /* @__PURE__ */ r("ul", { class: "flex flex-col gap-2.5", role: "list", children: e.items.map((t) => /* @__PURE__ */ c("li", { class: "flex items-start gap-3 text-sm text-gray-700", children: [
|
|
960
955
|
/* @__PURE__ */ r(
|
|
961
956
|
"span",
|
|
962
957
|
{
|
|
@@ -978,45 +973,84 @@ function zt({ block: e }) {
|
|
|
978
973
|
) })
|
|
979
974
|
}
|
|
980
975
|
),
|
|
981
|
-
/* @__PURE__ */
|
|
976
|
+
/* @__PURE__ */ c("div", { class: "flex flex-col gap-0.5", children: [
|
|
982
977
|
/* @__PURE__ */ r("span", { class: "font-medium leading-snug text-gray-900", children: t.name }),
|
|
983
978
|
t.desc ? /* @__PURE__ */ r("span", { class: "text-xs leading-relaxed text-gray-500", children: t.desc }) : null
|
|
984
979
|
] })
|
|
985
980
|
] }, t.id)) }) : null;
|
|
986
981
|
}
|
|
987
|
-
|
|
988
|
-
|
|
989
|
-
|
|
990
|
-
|
|
991
|
-
|
|
982
|
+
function Lt({ block: e }) {
|
|
983
|
+
const t = e.title ?? "100% Money-Back Guarantee", i = e.subtitle ?? "Not satisfied? We'll refund you — no questions asked.", n = (e.icon ?? "dollar_shield") !== "none";
|
|
984
|
+
return /* @__PURE__ */ c("div", { class: "-mt-1 flex flex-col items-center gap-1 border-b border-gray-200 pb-4 text-center", children: [
|
|
985
|
+
/* @__PURE__ */ c("div", { class: "flex items-center justify-center gap-1.5", children: [
|
|
986
|
+
n ? /* @__PURE__ */ r(jt, {}) : null,
|
|
987
|
+
/* @__PURE__ */ r("b", { class: "text-[14px] font-semibold text-gray-700", children: t })
|
|
988
|
+
] }),
|
|
989
|
+
i ? /* @__PURE__ */ r("span", { class: "text-[12px] leading-relaxed text-gray-500", children: i }) : null
|
|
990
|
+
] });
|
|
991
|
+
}
|
|
992
|
+
function jt() {
|
|
993
|
+
return /* @__PURE__ */ r(
|
|
994
|
+
"svg",
|
|
995
|
+
{
|
|
996
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
997
|
+
viewBox: "0 0 512 512",
|
|
998
|
+
fill: "currentColor",
|
|
999
|
+
width: "18",
|
|
1000
|
+
height: "18",
|
|
1001
|
+
class: "text-emerald-500",
|
|
1002
|
+
"aria-hidden": "true",
|
|
1003
|
+
children: /* @__PURE__ */ r("path", { d: "M257.5 .1l3.1 .4 192 42.7c4.3 1 8.2 3.2 11.2 6.5s4.8 7.4 5.3 11.8l.2 2.5 0 234.7C469.3 416.5 373.8 512 256 512C140.1 512 45.9 419.7 42.7 304.6l-.1-6L42.7 64c0-4.4 1.4-8.8 3.9-12.4s6.2-6.3 10.4-7.8l2.4-.7L251.4 .5c2-.4 4.1-.6 6.2-.4zM256 85.3c-12.8 0-21.3 8.5-21.3 21.3l0 23.5c-36.3 4.3-64 34.1-64 72.5c0 44.8 34.1 61.9 64 70.4l0 66.1c-11.9-4-20.1-15.3-21.2-27.1l-.1-2.7c0-12.8-8.5-21.3-21.3-21.3s-21.3 8.5-21.3 21.3c0 38.4 27.7 68.3 64 72.5l0 23.5c0 12.8 8.5 21.3 21.3 21.3s21.3-8.5 21.3-21.3l0-23.5c36.3-4.3 64-36.3 64-72.5c0-44.8-34.1-61.9-64-70.4l0-66.1c11.9 4 20.1 15.3 21.2 27.1l.1 2.7c0 12.8 8.5 21.3 21.3 21.3s21.3-8.5 21.3-21.3c0-38.4-27.7-68.3-64-72.5l0-23.5c0-12.8-8.5-21.3-21.3-21.3zm21.3 198.4c14.9 6.4 21.3 12.8 21.3 25.6c0 14.9-8.5 25.6-21.3 29.9l0-55.5zM234.7 172.8l0 55.5c-14.9-6.4-21.3-12.8-21.3-25.6c0-14.9 8.5-25.6 21.3-29.9z" })
|
|
1004
|
+
}
|
|
1005
|
+
);
|
|
1006
|
+
}
|
|
1007
|
+
const ct = 30, Bt = 16, Ot = 2;
|
|
1008
|
+
function Ut(e, t) {
|
|
1009
|
+
const i = t * Ot;
|
|
1010
|
+
let n = ct;
|
|
1011
|
+
for (e.style.fontSize = `${n}px`; e.scrollHeight > i && n > Bt; )
|
|
992
1012
|
n -= 1, e.style.fontSize = `${n}px`;
|
|
993
1013
|
}
|
|
994
|
-
function
|
|
995
|
-
const i = e.level ?? 1, n = `h${i}`, a = i === 1 ? "text-[1.
|
|
996
|
-
return
|
|
1014
|
+
function Ft({ block: e, ctx: t }) {
|
|
1015
|
+
const i = e.level ?? 1, n = `h${i}`, a = i === 1 ? "text-[1.875rem] font-bold leading-[1.15] text-center text-balance text-gray-900 tracking-[-0.02em]" : i === 2 ? "text-xl font-semibold leading-snug text-gray-900 tracking-tight" : "text-base font-medium text-gray-900", o = L(null), s = i === 1 && !!t.bootstrap.settings.title_auto_fit;
|
|
1016
|
+
return T(() => {
|
|
997
1017
|
if (!s || !o.current) return;
|
|
998
|
-
const l = getComputedStyle(o.current),
|
|
999
|
-
|
|
1018
|
+
const l = getComputedStyle(o.current), h = parseFloat(l.lineHeight) || ct * 1.5;
|
|
1019
|
+
Ut(o.current, h);
|
|
1000
1020
|
}, [s, e.text]), /* @__PURE__ */ r(n, { ref: o, class: a, children: e.text });
|
|
1001
1021
|
}
|
|
1002
1022
|
function Rt(e) {
|
|
1003
1023
|
const t = e.local ?? { currency: e.currency, amount: e.amount };
|
|
1004
1024
|
try {
|
|
1005
|
-
|
|
1025
|
+
const i = new Intl.NumberFormat(void 0, {
|
|
1006
1026
|
style: "currency",
|
|
1007
1027
|
currency: t.currency,
|
|
1008
|
-
|
|
1009
|
-
|
|
1028
|
+
currencyDisplay: "narrowSymbol",
|
|
1029
|
+
maximumFractionDigits: t.amount % 1 === 0 ? 0 : 2,
|
|
1030
|
+
minimumFractionDigits: t.amount % 1 === 0 ? 0 : 2
|
|
1031
|
+
}).formatToParts(t.amount);
|
|
1032
|
+
let n = "", a = "";
|
|
1033
|
+
for (const o of i)
|
|
1034
|
+
o.type === "currency" ? n = o.value : o.type !== "literal" && (a += o.value);
|
|
1035
|
+
return { currency: n || t.currency, amount: a.trim() };
|
|
1010
1036
|
} catch {
|
|
1011
|
-
return
|
|
1037
|
+
return { currency: t.currency, amount: String(t.amount) };
|
|
1012
1038
|
}
|
|
1013
1039
|
}
|
|
1014
|
-
function
|
|
1015
|
-
|
|
1040
|
+
function Nt(e) {
|
|
1041
|
+
return e.label ? e.label.toUpperCase() : !e.interval || e.interval === "lifetime" ? "LIFETIME" : {
|
|
1042
|
+
day: "DAILY PLAN",
|
|
1043
|
+
week: "WEEKLY PLAN",
|
|
1044
|
+
month: "MONTHLY PLAN",
|
|
1045
|
+
year: "YEARLY PLAN"
|
|
1046
|
+
}[e.interval] ?? `${e.interval.toUpperCase()} PLAN`;
|
|
1047
|
+
}
|
|
1048
|
+
function Dt(e) {
|
|
1049
|
+
if (!e.interval || e.interval === "lifetime") return "lifetime";
|
|
1016
1050
|
const t = e.interval_count ?? 1;
|
|
1017
|
-
return t === 1 ?
|
|
1051
|
+
return t === 1 ? e.interval : `${t} ${e.interval}s`;
|
|
1018
1052
|
}
|
|
1019
|
-
function
|
|
1053
|
+
function Ht({ block: e, ctx: t }) {
|
|
1020
1054
|
const i = e.priceIds && e.priceIds.length > 0 ? new Set(e.priceIds) : null, n = t.bootstrap.prices.filter((l) => !i || i.has(l.id));
|
|
1021
1055
|
if (n.length === 0)
|
|
1022
1056
|
return /* @__PURE__ */ r("p", { class: "text-sm text-gray-500", children: "No prices available." });
|
|
@@ -1029,24 +1063,23 @@ function Ft({ block: e, ctx: t }) {
|
|
|
1029
1063
|
role: "radiogroup",
|
|
1030
1064
|
"aria-label": "Plans",
|
|
1031
1065
|
children: n.map((l) => {
|
|
1032
|
-
const
|
|
1033
|
-
return /* @__PURE__ */
|
|
1066
|
+
const h = t.selectedPriceId === l.id, d = e.popular_price_id === l.id, { currency: w, amount: b } = Rt(l);
|
|
1067
|
+
return /* @__PURE__ */ c(
|
|
1034
1068
|
"button",
|
|
1035
1069
|
{
|
|
1036
1070
|
type: "button",
|
|
1037
1071
|
role: "radio",
|
|
1038
|
-
"aria-checked":
|
|
1072
|
+
"aria-checked": h,
|
|
1039
1073
|
onClick: () => {
|
|
1040
1074
|
t.setSelectedPriceId(l.id), t.onAction("price_selected", { priceId: l.id, price: l });
|
|
1041
1075
|
},
|
|
1042
1076
|
class: [
|
|
1043
|
-
"group relative rounded-2xl border px-4 py-3
|
|
1044
|
-
|
|
1045
|
-
|
|
1046
|
-
p ? "mt-2.5" : ""
|
|
1077
|
+
"group relative flex w-full items-center gap-3 rounded-2xl border px-4 py-3 text-left transition-all duration-150 focus:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:ring-[var(--pw-accent)]",
|
|
1078
|
+
h ? "border-[var(--pw-accent)] shadow-[0_0_0_1px_var(--pw-accent)]" : "border-gray-200 bg-white hover:border-gray-300 hover:shadow-sm",
|
|
1079
|
+
d ? "mt-2.5" : ""
|
|
1047
1080
|
].join(" "),
|
|
1048
1081
|
children: [
|
|
1049
|
-
|
|
1082
|
+
d ? /* @__PURE__ */ r(
|
|
1050
1083
|
"span",
|
|
1051
1084
|
{
|
|
1052
1085
|
class: "absolute -top-2.5 left-4 rounded-full px-2.5 py-0.5 text-[10px] font-semibold uppercase tracking-wider text-white shadow-sm",
|
|
@@ -1056,31 +1089,42 @@ function Ft({ block: e, ctx: t }) {
|
|
|
1056
1089
|
children: o
|
|
1057
1090
|
}
|
|
1058
1091
|
) : null,
|
|
1059
|
-
/* @__PURE__ */
|
|
1060
|
-
/* @__PURE__ */ r(
|
|
1061
|
-
|
|
1062
|
-
{
|
|
1063
|
-
|
|
1064
|
-
|
|
1065
|
-
|
|
1066
|
-
|
|
1067
|
-
|
|
1068
|
-
|
|
1069
|
-
|
|
1070
|
-
),
|
|
1071
|
-
|
|
1072
|
-
|
|
1073
|
-
|
|
1074
|
-
l.trial_days ? /* @__PURE__ */ d("span", { class: "text-xs font-medium text-[var(--pw-accent)]", children: [
|
|
1075
|
-
l.trial_days,
|
|
1076
|
-
"-day free trial"
|
|
1077
|
-
] }) : null
|
|
1078
|
-
] })
|
|
1092
|
+
/* @__PURE__ */ c("div", { class: "flex flex-1 flex-col gap-0.5", children: [
|
|
1093
|
+
/* @__PURE__ */ r("span", { class: "text-[11px] font-medium uppercase tracking-[0.08em] text-gray-500", children: Nt(l) }),
|
|
1094
|
+
/* @__PURE__ */ c("div", { class: "flex items-baseline gap-1.5 leading-none", children: [
|
|
1095
|
+
/* @__PURE__ */ r("span", { class: "text-[24px] font-normal text-gray-400", children: w }),
|
|
1096
|
+
/* @__PURE__ */ r("span", { class: "text-[34px] font-semibold tracking-tight text-gray-900", children: b }),
|
|
1097
|
+
/* @__PURE__ */ c("span", { class: "ml-1 text-sm font-medium text-gray-400", children: [
|
|
1098
|
+
"/ ",
|
|
1099
|
+
Dt(l)
|
|
1100
|
+
] })
|
|
1101
|
+
] }),
|
|
1102
|
+
l.description ? /* @__PURE__ */ r("span", { class: "mt-1 text-xs leading-relaxed text-gray-500", children: l.description }) : null,
|
|
1103
|
+
l.trial_days ? /* @__PURE__ */ c("span", { class: "mt-1 text-xs font-medium text-[var(--pw-accent)]", children: [
|
|
1104
|
+
l.trial_days,
|
|
1105
|
+
"-day free trial"
|
|
1106
|
+
] }) : null
|
|
1079
1107
|
] }),
|
|
1080
|
-
/* @__PURE__ */
|
|
1081
|
-
|
|
1082
|
-
|
|
1083
|
-
|
|
1108
|
+
/* @__PURE__ */ r(
|
|
1109
|
+
"span",
|
|
1110
|
+
{
|
|
1111
|
+
class: [
|
|
1112
|
+
"flex h-6 w-6 flex-shrink-0 items-center justify-center rounded-full border transition-colors",
|
|
1113
|
+
h ? "border-[var(--pw-accent)] bg-[var(--pw-accent)] text-white" : "border-gray-300 bg-white text-transparent group-hover:border-gray-400"
|
|
1114
|
+
].join(" "),
|
|
1115
|
+
"aria-hidden": "true",
|
|
1116
|
+
children: /* @__PURE__ */ r("svg", { width: "14", height: "14", viewBox: "0 0 16 16", fill: "none", children: /* @__PURE__ */ r(
|
|
1117
|
+
"path",
|
|
1118
|
+
{
|
|
1119
|
+
d: "M3.5 8.5l3 3 6-7",
|
|
1120
|
+
stroke: "currentColor",
|
|
1121
|
+
"stroke-width": "2",
|
|
1122
|
+
"stroke-linecap": "round",
|
|
1123
|
+
"stroke-linejoin": "round"
|
|
1124
|
+
}
|
|
1125
|
+
) })
|
|
1126
|
+
}
|
|
1127
|
+
)
|
|
1084
1128
|
]
|
|
1085
1129
|
},
|
|
1086
1130
|
l.id
|
|
@@ -1089,36 +1133,36 @@ function Ft({ block: e, ctx: t }) {
|
|
|
1089
1133
|
}
|
|
1090
1134
|
);
|
|
1091
1135
|
}
|
|
1092
|
-
function
|
|
1136
|
+
function Vt({ block: e }) {
|
|
1093
1137
|
return /* @__PURE__ */ r("p", { class: "text-[0.9375rem] leading-relaxed text-gray-600", children: e.text });
|
|
1094
1138
|
}
|
|
1095
|
-
const
|
|
1139
|
+
const $t = {
|
|
1096
1140
|
week: 0.25,
|
|
1097
1141
|
month: 1,
|
|
1098
1142
|
year: 12
|
|
1099
1143
|
};
|
|
1100
|
-
function
|
|
1144
|
+
function Gt(e) {
|
|
1101
1145
|
return e || "period";
|
|
1102
1146
|
}
|
|
1103
|
-
function
|
|
1147
|
+
function qt({ block: e, ctx: t }) {
|
|
1104
1148
|
if (!e.queries.length) return null;
|
|
1105
|
-
const n = t.bootstrap.prices.find((o) => o.id === t.selectedPriceId)?.interval ?? null, a = n ?
|
|
1106
|
-
return /* @__PURE__ */
|
|
1107
|
-
/* @__PURE__ */
|
|
1149
|
+
const n = t.bootstrap.prices.find((o) => o.id === t.selectedPriceId)?.interval ?? null, a = n ? $t[n] : void 0;
|
|
1150
|
+
return /* @__PURE__ */ c("div", { class: "flex flex-col gap-2", children: [
|
|
1151
|
+
/* @__PURE__ */ c("div", { class: "text-sm font-semibold text-gray-800", children: [
|
|
1108
1152
|
"Included per ",
|
|
1109
|
-
/* @__PURE__ */ r("span", { children:
|
|
1153
|
+
/* @__PURE__ */ r("span", { children: Gt(n) }),
|
|
1110
1154
|
":"
|
|
1111
1155
|
] }),
|
|
1112
1156
|
/* @__PURE__ */ r("ul", { class: "flex flex-col gap-2", role: "list", children: e.queries.map((o) => {
|
|
1113
1157
|
const s = Number.isFinite(o.count) ? o.count : 0, l = a !== void 0 ? Math.round(s * a) : s;
|
|
1114
|
-
return /* @__PURE__ */
|
|
1158
|
+
return /* @__PURE__ */ c("li", { class: `flex gap-2 ${o.desc ? "" : "items-center"}`, children: [
|
|
1115
1159
|
/* @__PURE__ */ r(
|
|
1116
1160
|
"span",
|
|
1117
1161
|
{
|
|
1118
1162
|
class: `flex h-5 w-5 flex-shrink-0 items-center justify-center rounded-full ${o.desc ? "mt-0.5" : ""}`,
|
|
1119
1163
|
style: {
|
|
1120
|
-
background: "
|
|
1121
|
-
color: "
|
|
1164
|
+
background: "var(--pw-accent)",
|
|
1165
|
+
color: "#ffffff"
|
|
1122
1166
|
},
|
|
1123
1167
|
"aria-hidden": "true",
|
|
1124
1168
|
children: /* @__PURE__ */ r("svg", { width: "12", height: "12", viewBox: "0 0 20 20", fill: "none", children: /* @__PURE__ */ r(
|
|
@@ -1126,18 +1170,18 @@ function Dt({ block: e, ctx: t }) {
|
|
|
1126
1170
|
{
|
|
1127
1171
|
d: "M5 10l3 3 7-7",
|
|
1128
1172
|
stroke: "currentColor",
|
|
1129
|
-
"stroke-width": "2.
|
|
1173
|
+
"stroke-width": "2.75",
|
|
1130
1174
|
"stroke-linecap": "round",
|
|
1131
1175
|
"stroke-linejoin": "round"
|
|
1132
1176
|
}
|
|
1133
1177
|
) })
|
|
1134
1178
|
}
|
|
1135
1179
|
),
|
|
1136
|
-
/* @__PURE__ */
|
|
1180
|
+
/* @__PURE__ */ c("div", { children: [
|
|
1137
1181
|
/* @__PURE__ */ r("span", { class: "font-semibold text-gray-900 text-sm", children: l }),
|
|
1138
1182
|
" ",
|
|
1139
1183
|
/* @__PURE__ */ r("span", { class: "text-sm text-gray-800", children: o.name }),
|
|
1140
|
-
o.desc ? /* @__PURE__ */
|
|
1184
|
+
o.desc ? /* @__PURE__ */ c(at, { children: [
|
|
1141
1185
|
/* @__PURE__ */ r("br", {}),
|
|
1142
1186
|
/* @__PURE__ */ r("span", { class: "text-xs text-gray-500", children: o.desc })
|
|
1143
1187
|
] }) : null
|
|
@@ -1146,18 +1190,19 @@ function Dt({ block: e, ctx: t }) {
|
|
|
1146
1190
|
}) })
|
|
1147
1191
|
] });
|
|
1148
1192
|
}
|
|
1149
|
-
const
|
|
1150
|
-
heading:
|
|
1151
|
-
text:
|
|
1152
|
-
price_grid:
|
|
1153
|
-
cta_button:
|
|
1154
|
-
auth_panel:
|
|
1155
|
-
current_session:
|
|
1156
|
-
features_list:
|
|
1157
|
-
tokenization_gate:
|
|
1193
|
+
const Wt = {
|
|
1194
|
+
heading: Ft,
|
|
1195
|
+
text: Vt,
|
|
1196
|
+
price_grid: Ht,
|
|
1197
|
+
cta_button: zt,
|
|
1198
|
+
auth_panel: lt,
|
|
1199
|
+
current_session: Pt,
|
|
1200
|
+
features_list: Et,
|
|
1201
|
+
tokenization_gate: qt,
|
|
1202
|
+
guarantee_badge: Lt
|
|
1158
1203
|
};
|
|
1159
|
-
function
|
|
1160
|
-
const o =
|
|
1204
|
+
function Zt({ layout: e, bootstrap: t, onAction: i, auth: n, authSession: a }) {
|
|
1205
|
+
const o = nt(() => t.prices[0]?.id ?? null, [t.prices]), [s, l] = v(o), h = {
|
|
1161
1206
|
bootstrap: t,
|
|
1162
1207
|
selectedPriceId: s,
|
|
1163
1208
|
setSelectedPriceId: l,
|
|
@@ -1165,18 +1210,18 @@ function Gt({ layout: e, bootstrap: t, onAction: i, auth: n, authSession: a }) {
|
|
|
1165
1210
|
auth: n,
|
|
1166
1211
|
authSession: a
|
|
1167
1212
|
};
|
|
1168
|
-
return /* @__PURE__ */ r("div", { class: "flex flex-col gap-4", children: e.blocks.map((
|
|
1169
|
-
const
|
|
1170
|
-
return
|
|
1213
|
+
return /* @__PURE__ */ r("div", { class: "flex flex-col gap-4", children: e.blocks.map((d, w) => {
|
|
1214
|
+
const b = Wt[d.type];
|
|
1215
|
+
return b ? /* @__PURE__ */ r(b, { block: d, ctx: h }, w) : (typeof console < "u" && console.warn(`[paywall] unknown block type: ${d.type}`), null);
|
|
1171
1216
|
}) });
|
|
1172
1217
|
}
|
|
1173
|
-
function
|
|
1218
|
+
function Yt(e, t, i, n) {
|
|
1174
1219
|
return e ? n ? { open: !0, view: "purchased", error: null } : t.status === "idle" || t.status === "loading" ? { open: !0, view: "loading", error: null } : t.status === "error" ? { open: !0, view: "error", error: t.error } : i.kind === "support" ? { open: !0, view: "support", error: null } : i.kind === "auth_gate" ? { open: !0, view: "auth", error: null } : i.kind === "anon_gate" ? { open: !0, view: "anon", error: null } : i.kind === "awaiting_payment" ? { open: !0, view: "awaiting_payment", error: null } : i.kind === "popup_blocked" ? { open: !0, view: "popup_blocked", error: null } : i.kind === "purchase_success" ? { open: !0, view: "purchased", error: null } : i.kind === "verifying" ? { open: !0, view: "loading", error: null } : { open: !0, view: "layout", error: null } : { open: !1, view: null, error: null };
|
|
1175
1220
|
}
|
|
1176
|
-
function
|
|
1221
|
+
function Kt(e, t) {
|
|
1177
1222
|
return e.open === t.open && e.view === t.view && e.error === t.error;
|
|
1178
1223
|
}
|
|
1179
|
-
function
|
|
1224
|
+
function Xt({
|
|
1180
1225
|
client: e,
|
|
1181
1226
|
open: t,
|
|
1182
1227
|
onClose: i,
|
|
@@ -1184,144 +1229,145 @@ function Zt({
|
|
|
1184
1229
|
initialView: a,
|
|
1185
1230
|
purchased: o,
|
|
1186
1231
|
renew: s,
|
|
1187
|
-
onState: l
|
|
1232
|
+
onState: l,
|
|
1233
|
+
inline: h
|
|
1188
1234
|
}) {
|
|
1189
|
-
const [
|
|
1235
|
+
const [d, w] = v({ status: "idle" }), [b, A] = v(
|
|
1190
1236
|
() => e.auth?.getCachedSession() ?? null
|
|
1191
|
-
), [g,
|
|
1192
|
-
|
|
1237
|
+
), [g, f] = v(() => a === "support" ? { kind: "support", origin: "standalone" } : a === "auth" ? { kind: "auth_gate", origin: "standalone" } : a === "anon" ? { kind: "anon_gate", origin: "standalone" } : { kind: "layout" }), _ = L(!1), k = L(null);
|
|
1238
|
+
T(() => {
|
|
1193
1239
|
if (!l) return;
|
|
1194
|
-
const
|
|
1195
|
-
|
|
1196
|
-
}, [t,
|
|
1240
|
+
const u = Yt(t, d, g, o), p = k.current;
|
|
1241
|
+
p && Kt(p, u) || (k.current = u, l(u));
|
|
1242
|
+
}, [t, d, g, o, l]), T(() => {
|
|
1197
1243
|
if (e.auth)
|
|
1198
|
-
return e.auth.onAuthChange((
|
|
1199
|
-
}, [e.auth]),
|
|
1244
|
+
return e.auth.onAuthChange((u, p) => A(p));
|
|
1245
|
+
}, [e.auth]), T(() => {
|
|
1200
1246
|
if (typeof e.onBootstrapChange == "function")
|
|
1201
|
-
return e.onBootstrapChange((
|
|
1202
|
-
|
|
1203
|
-
(
|
|
1247
|
+
return e.onBootstrapChange((u) => {
|
|
1248
|
+
w(
|
|
1249
|
+
(p) => p.status === "ready" ? { status: "ready", data: u } : p
|
|
1204
1250
|
);
|
|
1205
1251
|
});
|
|
1206
|
-
}, [e]),
|
|
1207
|
-
if (!t ||
|
|
1208
|
-
let
|
|
1209
|
-
return
|
|
1210
|
-
|
|
1252
|
+
}, [e]), T(() => {
|
|
1253
|
+
if (!t || d.status === "ready" || d.status === "loading") return;
|
|
1254
|
+
let u = !1;
|
|
1255
|
+
return w({ status: "loading" }), e.bootstrap().then((p) => {
|
|
1256
|
+
u || (w({ status: "ready", data: p }), n("ready", p), p.user?.has_active_subscription && !s && (n("purchase_completed", {
|
|
1211
1257
|
priceId: null,
|
|
1212
1258
|
sessionId: null,
|
|
1213
1259
|
restored: !0
|
|
1214
|
-
}),
|
|
1215
|
-
}).catch((
|
|
1216
|
-
if (
|
|
1217
|
-
const x =
|
|
1218
|
-
|
|
1260
|
+
}), f({ kind: "purchase_success", restored: !0 })));
|
|
1261
|
+
}).catch((p) => {
|
|
1262
|
+
if (u) return;
|
|
1263
|
+
const x = p instanceof z ? p : new z("unknown", "Failed to load paywall", { cause: p });
|
|
1264
|
+
w({ status: "error", error: x }), n("error", x);
|
|
1219
1265
|
}), () => {
|
|
1220
|
-
|
|
1266
|
+
u = !0;
|
|
1221
1267
|
};
|
|
1222
|
-
}, [t, e]),
|
|
1268
|
+
}, [t, e]), T(() => {
|
|
1223
1269
|
if (!t) {
|
|
1224
|
-
|
|
1270
|
+
f({ kind: "layout" }), _.current = !1;
|
|
1225
1271
|
return;
|
|
1226
1272
|
}
|
|
1227
|
-
a === "support" ?
|
|
1273
|
+
a === "support" ? f({ kind: "support", origin: "standalone" }) : a === "auth" ? f({ kind: "auth_gate", origin: "standalone" }) : a === "anon" && f({ kind: "anon_gate", origin: "standalone" });
|
|
1228
1274
|
}, [t, a]);
|
|
1229
|
-
const
|
|
1275
|
+
const m = async (u) => {
|
|
1230
1276
|
try {
|
|
1231
|
-
const
|
|
1232
|
-
priceId:
|
|
1277
|
+
const p = await e.createCheckout({
|
|
1278
|
+
priceId: u,
|
|
1233
1279
|
ignoreActivePurchase: s === !0
|
|
1234
1280
|
});
|
|
1235
|
-
if (n("checkout_started", { priceId:
|
|
1236
|
-
const x = window.open(
|
|
1281
|
+
if (n("checkout_started", { priceId: u, url: p.url, acquiring: p.acquiring }), typeof window > "u" || !p.url) return;
|
|
1282
|
+
const x = window.open(p.url, "_blank");
|
|
1237
1283
|
if (x) {
|
|
1238
1284
|
try {
|
|
1239
1285
|
x.opener = null;
|
|
1240
1286
|
} catch {
|
|
1241
1287
|
}
|
|
1242
|
-
|
|
1288
|
+
f({ kind: "awaiting_payment", priceId: u, url: p.url });
|
|
1243
1289
|
} else
|
|
1244
|
-
|
|
1245
|
-
} catch (
|
|
1246
|
-
if (
|
|
1290
|
+
f({ kind: "popup_blocked", priceId: u, url: p.url });
|
|
1291
|
+
} catch (p) {
|
|
1292
|
+
if (p instanceof z && p.code === "already_purchased") {
|
|
1247
1293
|
try {
|
|
1248
1294
|
await e.getUser({ force: !0 });
|
|
1249
1295
|
} catch {
|
|
1250
1296
|
}
|
|
1251
|
-
n("purchase_completed", { priceId:
|
|
1297
|
+
n("purchase_completed", { priceId: u, sessionId: null, restored: !0 }), f({ kind: "purchase_success", restored: !0 });
|
|
1252
1298
|
return;
|
|
1253
1299
|
}
|
|
1254
|
-
const x =
|
|
1255
|
-
n("error", x),
|
|
1300
|
+
const x = p instanceof z ? p : new z("checkout_failed", "Checkout failed", { cause: p });
|
|
1301
|
+
n("error", x), f({ kind: "layout" });
|
|
1256
1302
|
}
|
|
1257
|
-
},
|
|
1303
|
+
}, S = (u, p) => {
|
|
1258
1304
|
if (typeof window > "u") return;
|
|
1259
|
-
const x = window.open(
|
|
1305
|
+
const x = window.open(p, "_blank");
|
|
1260
1306
|
if (x) {
|
|
1261
1307
|
try {
|
|
1262
1308
|
x.opener = null;
|
|
1263
1309
|
} catch {
|
|
1264
1310
|
}
|
|
1265
|
-
|
|
1311
|
+
f({ kind: "awaiting_payment", priceId: u, url: p });
|
|
1266
1312
|
}
|
|
1267
1313
|
};
|
|
1268
|
-
|
|
1269
|
-
if (g.kind !== "auth_gate" || !
|
|
1270
|
-
|
|
1271
|
-
const
|
|
1272
|
-
|
|
1314
|
+
T(() => {
|
|
1315
|
+
if (g.kind !== "auth_gate" || !b || b.user.is_anonymous || _.current) return;
|
|
1316
|
+
_.current = !0;
|
|
1317
|
+
const u = g.pendingCheckout, p = g.origin;
|
|
1318
|
+
f({ kind: "verifying" }), (async () => {
|
|
1273
1319
|
if (!s)
|
|
1274
1320
|
try {
|
|
1275
1321
|
if ((await e.getUser({ force: !0 })).has_active_subscription) {
|
|
1276
1322
|
n("purchase_completed", {
|
|
1277
|
-
priceId:
|
|
1323
|
+
priceId: u?.priceId ?? null,
|
|
1278
1324
|
sessionId: null,
|
|
1279
1325
|
restored: !0
|
|
1280
|
-
}),
|
|
1326
|
+
}), f({ kind: "purchase_success", restored: !0 });
|
|
1281
1327
|
return;
|
|
1282
1328
|
}
|
|
1283
1329
|
} catch {
|
|
1284
1330
|
}
|
|
1285
|
-
if (!
|
|
1286
|
-
|
|
1331
|
+
if (!u) {
|
|
1332
|
+
p === "standalone" ? i() : f({ kind: "layout" });
|
|
1287
1333
|
return;
|
|
1288
1334
|
}
|
|
1289
|
-
await
|
|
1335
|
+
await m(u.priceId);
|
|
1290
1336
|
})().finally(() => {
|
|
1291
|
-
|
|
1337
|
+
_.current = !1;
|
|
1292
1338
|
});
|
|
1293
|
-
}, [
|
|
1294
|
-
const
|
|
1295
|
-
if (
|
|
1339
|
+
}, [b, g]);
|
|
1340
|
+
const y = async (u, p) => {
|
|
1341
|
+
if (u === "close") {
|
|
1296
1342
|
i();
|
|
1297
1343
|
return;
|
|
1298
1344
|
}
|
|
1299
|
-
if (
|
|
1300
|
-
n("price_selected",
|
|
1345
|
+
if (u === "price_selected") {
|
|
1346
|
+
n("price_selected", p);
|
|
1301
1347
|
return;
|
|
1302
1348
|
}
|
|
1303
|
-
if (
|
|
1349
|
+
if (u === "restore") {
|
|
1304
1350
|
if (!e.auth || e.auth.getCachedSession()) return;
|
|
1305
|
-
|
|
1351
|
+
f({ kind: "auth_gate" });
|
|
1306
1352
|
return;
|
|
1307
1353
|
}
|
|
1308
|
-
if (
|
|
1309
|
-
|
|
1354
|
+
if (u === "support") {
|
|
1355
|
+
f({ kind: "support", origin: "layout" });
|
|
1310
1356
|
return;
|
|
1311
1357
|
}
|
|
1312
|
-
if (
|
|
1313
|
-
const x =
|
|
1358
|
+
if (u === "checkout" && d.status === "ready") {
|
|
1359
|
+
const x = p?.priceId;
|
|
1314
1360
|
if (!x) {
|
|
1315
|
-
n("error", new
|
|
1361
|
+
n("error", new z("no_price", "No price selected"));
|
|
1316
1362
|
return;
|
|
1317
1363
|
}
|
|
1318
|
-
if ((
|
|
1319
|
-
|
|
1364
|
+
if ((d.data.settings.checkout_mode ?? "guest") === "preauth" && !!e.auth && !e.auth.getCachedSession()) {
|
|
1365
|
+
f({ kind: "auth_gate", pendingCheckout: { priceId: x } });
|
|
1320
1366
|
return;
|
|
1321
1367
|
}
|
|
1322
|
-
await
|
|
1368
|
+
await m(x);
|
|
1323
1369
|
}
|
|
1324
|
-
},
|
|
1370
|
+
}, P = d.status === "ready" ? d.data.settings.brand_color : null, E = d.status === "ready" ? !!d.data.settings.is_test_mode : !1, I = d.status === "ready" ? d.data.settings.allow_close !== !1 : !0, M = {
|
|
1325
1371
|
type: "auth_panel",
|
|
1326
1372
|
heading: "Sign in to continue",
|
|
1327
1373
|
allow_signup: !0,
|
|
@@ -1329,32 +1375,33 @@ function Zt({
|
|
|
1329
1375
|
// Не скрываем при наличии сессии — auto-resume useEffect отрабатывает быстрее,
|
|
1330
1376
|
// чем хотим показывать "Signed in as ..." промежуточным экраном.
|
|
1331
1377
|
hide_when_authenticated: !1,
|
|
1332
|
-
providers:
|
|
1333
|
-
},
|
|
1334
|
-
|
|
1378
|
+
providers: d.status === "ready" ? d.data.settings.auth_providers : void 0
|
|
1379
|
+
}, C = g.kind === "support" ? /* @__PURE__ */ r(
|
|
1380
|
+
At,
|
|
1335
1381
|
{
|
|
1336
1382
|
client: e,
|
|
1337
|
-
authSession:
|
|
1383
|
+
authSession: b,
|
|
1338
1384
|
origin: g.origin,
|
|
1339
1385
|
onBack: () => {
|
|
1340
|
-
g.origin === "standalone" ? i() :
|
|
1386
|
+
g.origin === "standalone" ? i() : f({ kind: "layout" });
|
|
1341
1387
|
}
|
|
1342
1388
|
}
|
|
1343
1389
|
) : null;
|
|
1344
1390
|
return /* @__PURE__ */ r(
|
|
1345
|
-
|
|
1391
|
+
wt,
|
|
1346
1392
|
{
|
|
1347
1393
|
open: t,
|
|
1348
1394
|
onClose: i,
|
|
1349
|
-
brandColor:
|
|
1350
|
-
testMode:
|
|
1351
|
-
allowClose:
|
|
1395
|
+
brandColor: P,
|
|
1396
|
+
testMode: E,
|
|
1397
|
+
allowClose: I,
|
|
1398
|
+
inline: h,
|
|
1352
1399
|
labelledBy: "pw-title",
|
|
1353
|
-
children: o ? /* @__PURE__ */ r(
|
|
1400
|
+
children: o ? /* @__PURE__ */ r(rt, { onContinue: i }) : g.kind === "purchase_success" ? /* @__PURE__ */ r(rt, { restored: g.restored, onContinue: i }) : C || (d.status === "loading" || d.status === "idle" || g.kind === "verifying" ? /* @__PURE__ */ c("div", { class: "flex flex-col items-center justify-center gap-3 py-12", children: [
|
|
1354
1401
|
/* @__PURE__ */ r("span", { class: "inline-block h-7 w-7 animate-spin rounded-full border-[2.5px] border-gray-200 border-t-[var(--pw-accent)]" }),
|
|
1355
1402
|
/* @__PURE__ */ r("span", { class: "text-xs font-medium tracking-wide text-gray-500", children: g.kind === "verifying" ? "Checking your subscription…" : "Loading…" })
|
|
1356
|
-
] }) :
|
|
1357
|
-
/* @__PURE__ */ r("div", { class: "flex h-11 w-11 items-center justify-center rounded-full bg-red-50", children: /* @__PURE__ */
|
|
1403
|
+
] }) : d.status === "error" ? /* @__PURE__ */ c("div", { class: "flex flex-col items-center gap-2 py-8 text-center", children: [
|
|
1404
|
+
/* @__PURE__ */ r("div", { class: "flex h-11 w-11 items-center justify-center rounded-full bg-red-50", children: /* @__PURE__ */ c("svg", { width: "20", height: "20", viewBox: "0 0 20 20", fill: "none", "aria-hidden": "true", children: [
|
|
1358
1405
|
/* @__PURE__ */ r(
|
|
1359
1406
|
"path",
|
|
1360
1407
|
{
|
|
@@ -1367,52 +1414,52 @@ function Zt({
|
|
|
1367
1414
|
/* @__PURE__ */ r("circle", { cx: "10", cy: "10", r: "8", stroke: "#dc2626", "stroke-width": "1.75" })
|
|
1368
1415
|
] }) }),
|
|
1369
1416
|
/* @__PURE__ */ r("p", { class: "text-sm font-semibold tracking-tight text-gray-900", children: "Something went wrong" }),
|
|
1370
|
-
/* @__PURE__ */ r("p", { class: "text-xs leading-relaxed text-gray-500", children:
|
|
1417
|
+
/* @__PURE__ */ r("p", { class: "text-xs leading-relaxed text-gray-500", children: d.error.message })
|
|
1371
1418
|
] }) : g.kind === "auth_gate" && e.auth ? /* @__PURE__ */ r(
|
|
1372
|
-
|
|
1419
|
+
_t,
|
|
1373
1420
|
{
|
|
1374
|
-
block:
|
|
1375
|
-
bootstrap:
|
|
1421
|
+
block: M,
|
|
1422
|
+
bootstrap: d.data,
|
|
1376
1423
|
auth: e.auth,
|
|
1377
|
-
authSession:
|
|
1424
|
+
authSession: b,
|
|
1378
1425
|
showBack: g.origin !== "standalone",
|
|
1379
1426
|
onBack: () => {
|
|
1380
|
-
g.origin === "standalone" ? i() :
|
|
1427
|
+
g.origin === "standalone" ? i() : f({ kind: "layout" });
|
|
1381
1428
|
}
|
|
1382
1429
|
}
|
|
1383
1430
|
) : g.kind === "anon_gate" && e.auth ? /* @__PURE__ */ r(
|
|
1384
|
-
|
|
1431
|
+
St,
|
|
1385
1432
|
{
|
|
1386
1433
|
auth: e.auth,
|
|
1387
1434
|
onSuccess: () => {
|
|
1388
|
-
g.origin === "standalone" ? i() :
|
|
1435
|
+
g.origin === "standalone" ? i() : f({ kind: "layout" });
|
|
1389
1436
|
},
|
|
1390
|
-
onBack: g.origin === "standalone" ? void 0 : () =>
|
|
1437
|
+
onBack: g.origin === "standalone" ? void 0 : () => f({ kind: "layout" })
|
|
1391
1438
|
}
|
|
1392
1439
|
) : g.kind === "awaiting_payment" ? /* @__PURE__ */ r(
|
|
1393
|
-
|
|
1440
|
+
Jt,
|
|
1394
1441
|
{
|
|
1395
1442
|
client: e,
|
|
1396
|
-
onBack: () =>
|
|
1443
|
+
onBack: () => f({ kind: "layout" }),
|
|
1397
1444
|
onReopen: () => {
|
|
1398
1445
|
if (typeof window > "u") return;
|
|
1399
|
-
const
|
|
1400
|
-
if (
|
|
1446
|
+
const u = window.open(g.url, "_blank");
|
|
1447
|
+
if (u)
|
|
1401
1448
|
try {
|
|
1402
|
-
|
|
1449
|
+
u.opener = null;
|
|
1403
1450
|
} catch {
|
|
1404
1451
|
}
|
|
1405
1452
|
},
|
|
1406
|
-
onRetry: () =>
|
|
1453
|
+
onRetry: () => m(g.priceId)
|
|
1407
1454
|
}
|
|
1408
|
-
) : g.kind === "popup_blocked" ? /* @__PURE__ */
|
|
1455
|
+
) : g.kind === "popup_blocked" ? /* @__PURE__ */ c("div", { class: "flex flex-col items-center gap-3 py-8 text-center", children: [
|
|
1409
1456
|
/* @__PURE__ */ r(
|
|
1410
1457
|
"div",
|
|
1411
1458
|
{
|
|
1412
1459
|
class: "flex h-11 w-11 items-center justify-center rounded-full",
|
|
1413
1460
|
style: { background: "color-mix(in srgb, var(--pw-accent) 12%, white)", color: "var(--pw-accent)" },
|
|
1414
1461
|
"aria-hidden": "true",
|
|
1415
|
-
children: /* @__PURE__ */
|
|
1462
|
+
children: /* @__PURE__ */ c("svg", { width: "20", height: "20", viewBox: "0 0 20 20", fill: "none", children: [
|
|
1416
1463
|
/* @__PURE__ */ r(
|
|
1417
1464
|
"path",
|
|
1418
1465
|
{
|
|
@@ -1432,7 +1479,7 @@ function Zt({
|
|
|
1432
1479
|
"button",
|
|
1433
1480
|
{
|
|
1434
1481
|
type: "button",
|
|
1435
|
-
onClick: () =>
|
|
1482
|
+
onClick: () => S(g.priceId, g.url),
|
|
1436
1483
|
class: "mt-1 rounded-xl px-4 py-2 text-xs font-semibold text-white transition-all hover:-translate-y-px hover:brightness-105 focus:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:ring-[var(--pw-accent)]",
|
|
1437
1484
|
style: {
|
|
1438
1485
|
background: "linear-gradient(180deg, color-mix(in srgb, var(--pw-accent) 92%, white), var(--pw-accent))",
|
|
@@ -1442,28 +1489,28 @@ function Zt({
|
|
|
1442
1489
|
}
|
|
1443
1490
|
)
|
|
1444
1491
|
] }) : /* @__PURE__ */ r(
|
|
1445
|
-
|
|
1492
|
+
Zt,
|
|
1446
1493
|
{
|
|
1447
|
-
layout:
|
|
1448
|
-
bootstrap:
|
|
1449
|
-
onAction:
|
|
1494
|
+
layout: d.data.layout,
|
|
1495
|
+
bootstrap: d.data,
|
|
1496
|
+
onAction: y,
|
|
1450
1497
|
auth: e.auth,
|
|
1451
|
-
authSession:
|
|
1498
|
+
authSession: b
|
|
1452
1499
|
}
|
|
1453
1500
|
))
|
|
1454
1501
|
}
|
|
1455
1502
|
);
|
|
1456
1503
|
}
|
|
1457
|
-
function
|
|
1504
|
+
function Jt({
|
|
1458
1505
|
client: e,
|
|
1459
1506
|
onBack: t,
|
|
1460
1507
|
onReopen: i,
|
|
1461
1508
|
onRetry: n
|
|
1462
1509
|
}) {
|
|
1463
|
-
const [a, o] = v(!1), [s, l] = v(!1),
|
|
1464
|
-
return
|
|
1465
|
-
|
|
1466
|
-
}, []), /* @__PURE__ */
|
|
1510
|
+
const [a, o] = v(!1), [s, l] = v(!1), h = L(null);
|
|
1511
|
+
return T(() => () => {
|
|
1512
|
+
h.current !== null && clearTimeout(h.current);
|
|
1513
|
+
}, []), /* @__PURE__ */ c("div", { class: "flex flex-col gap-3", children: [
|
|
1467
1514
|
/* @__PURE__ */ r(
|
|
1468
1515
|
"button",
|
|
1469
1516
|
{
|
|
@@ -1473,8 +1520,8 @@ function Xt({
|
|
|
1473
1520
|
children: "← Back"
|
|
1474
1521
|
}
|
|
1475
1522
|
),
|
|
1476
|
-
/* @__PURE__ */
|
|
1477
|
-
/* @__PURE__ */
|
|
1523
|
+
/* @__PURE__ */ c("div", { class: "flex flex-col items-center gap-3 py-6 text-center", children: [
|
|
1524
|
+
/* @__PURE__ */ c("div", { class: "relative flex h-12 w-12 items-center justify-center", children: [
|
|
1478
1525
|
/* @__PURE__ */ r(
|
|
1479
1526
|
"span",
|
|
1480
1527
|
{
|
|
@@ -1499,8 +1546,8 @@ function Xt({
|
|
|
1499
1546
|
typeof window < "u" && window.postMessage({ type: "paywall_purchase" }, "*");
|
|
1500
1547
|
return;
|
|
1501
1548
|
}
|
|
1502
|
-
l(!0),
|
|
1503
|
-
l(!1),
|
|
1549
|
+
l(!0), h.current !== null && clearTimeout(h.current), h.current = setTimeout(() => {
|
|
1550
|
+
l(!1), h.current = null;
|
|
1504
1551
|
}, 5e3);
|
|
1505
1552
|
} catch {
|
|
1506
1553
|
l(!0);
|
|
@@ -1520,7 +1567,7 @@ function Xt({
|
|
|
1520
1567
|
),
|
|
1521
1568
|
s ? /* @__PURE__ */ r("p", { class: "text-xs leading-relaxed text-gray-500", children: "Payment is still being processed. Please try again in a moment." }) : null
|
|
1522
1569
|
] }),
|
|
1523
|
-
/* @__PURE__ */
|
|
1570
|
+
/* @__PURE__ */ c("div", { class: "rounded-2xl border border-gray-200 bg-gray-50/60 p-3.5", children: [
|
|
1524
1571
|
/* @__PURE__ */ r("p", { class: "text-xs leading-relaxed text-gray-600", children: "Checkout window didn't open or got blocked? Click here to open it again." }),
|
|
1525
1572
|
/* @__PURE__ */ r(
|
|
1526
1573
|
"button",
|
|
@@ -1543,11 +1590,11 @@ function Xt({
|
|
|
1543
1590
|
)
|
|
1544
1591
|
] });
|
|
1545
1592
|
}
|
|
1546
|
-
function
|
|
1593
|
+
function rt({
|
|
1547
1594
|
onContinue: e,
|
|
1548
1595
|
restored: t = !1
|
|
1549
1596
|
}) {
|
|
1550
|
-
return /* @__PURE__ */
|
|
1597
|
+
return /* @__PURE__ */ c("div", { class: "flex flex-col items-center gap-3 py-8 text-center", children: [
|
|
1551
1598
|
/* @__PURE__ */ r(
|
|
1552
1599
|
"div",
|
|
1553
1600
|
{
|
|
@@ -1588,17 +1635,17 @@ function it({
|
|
|
1588
1635
|
)
|
|
1589
1636
|
] });
|
|
1590
1637
|
}
|
|
1591
|
-
const
|
|
1592
|
-
class
|
|
1638
|
+
const Qt = 10 * 6e4, te = 5e3, ee = 3e4;
|
|
1639
|
+
class re {
|
|
1593
1640
|
constructor(t) {
|
|
1594
1641
|
this.timer = null, this.timeoutTimer = null, this.visibilityHandler = null, this.focusHandler = null, this.messageHandler = null, this.stopped = !1, this.checking = !1, this.opts = {
|
|
1595
1642
|
client: t.client,
|
|
1596
1643
|
onActive: t.onActive,
|
|
1597
1644
|
onTimeout: t.onTimeout ?? (() => {
|
|
1598
1645
|
}),
|
|
1599
|
-
timeoutMs: t.timeoutMs ??
|
|
1600
|
-
visibleIntervalMs: t.visibleIntervalMs ??
|
|
1601
|
-
hiddenIntervalMs: t.hiddenIntervalMs ??
|
|
1646
|
+
timeoutMs: t.timeoutMs ?? Qt,
|
|
1647
|
+
visibleIntervalMs: t.visibleIntervalMs ?? te,
|
|
1648
|
+
hiddenIntervalMs: t.hiddenIntervalMs ?? ee
|
|
1602
1649
|
};
|
|
1603
1650
|
}
|
|
1604
1651
|
start() {
|
|
@@ -1637,22 +1684,22 @@ class Qt {
|
|
|
1637
1684
|
!i || typeof i != "object" || i.type === "paywall_purchase" && this.check();
|
|
1638
1685
|
}
|
|
1639
1686
|
}
|
|
1640
|
-
function
|
|
1687
|
+
function ie() {
|
|
1641
1688
|
return !(typeof document > "u" || typeof window > "u" || typeof location < "u" && location.protocol === "chrome-extension:");
|
|
1642
1689
|
}
|
|
1643
|
-
const
|
|
1690
|
+
const G = { open: !1, view: null, error: null }, j = {
|
|
1644
1691
|
status: "paywall_status",
|
|
1645
1692
|
priceId: "paywall_price_id",
|
|
1646
1693
|
sessionId: "paywall_session_id"
|
|
1647
1694
|
};
|
|
1648
|
-
class
|
|
1695
|
+
class we {
|
|
1649
1696
|
constructor(t) {
|
|
1650
|
-
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 =
|
|
1651
|
-
const { auth: i, ownsAuth: n } =
|
|
1652
|
-
this.auth = i, this.ownsAuth = n, this.billing = t.client ?? new
|
|
1697
|
+
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 = G, this.stateListeners = /* @__PURE__ */ new Set();
|
|
1698
|
+
const { auth: i, ownsAuth: n } = ae(t);
|
|
1699
|
+
this.auth = i, this.ownsAuth = n, this.billing = t.client ?? new dt({ ...t, auth: this.auth }), this.host = t.host, this.shadowMode = t.shadowMode ?? "closed", this.mountThenLoad = t.mountThenLoad ?? !0, this.inline = t.inline === !0, this.userUnsub = this.billing.onUserChange((a) => {
|
|
1653
1700
|
this.emit("userChange", a);
|
|
1654
|
-
}), this.auth && (this.authUnsub = this.auth.onAuthChange((a) => {
|
|
1655
|
-
this.emit("authChange", a);
|
|
1701
|
+
}), this.auth && (this.authUnsub = this.auth.onAuthChange((a, o) => {
|
|
1702
|
+
this.emit("authChange", { event: a, session: o });
|
|
1656
1703
|
})), this.initTracker(t.analytics), t.autoDetectReturn !== !1 && typeof window < "u" && queueMicrotask(() => this.checkReturn());
|
|
1657
1704
|
}
|
|
1658
1705
|
initTracker(t) {
|
|
@@ -1660,7 +1707,7 @@ class he {
|
|
|
1660
1707
|
const i = typeof t == "object" && t !== null ? t : {};
|
|
1661
1708
|
if (i.enabled === !1) return;
|
|
1662
1709
|
const n = i.endpoint ?? `${this.billing.apiOrigin}/api/v1/paywall/${this.billing.paywallId}/events`;
|
|
1663
|
-
this.tracker = new
|
|
1710
|
+
this.tracker = new ut({
|
|
1664
1711
|
endpoint: n,
|
|
1665
1712
|
paywallId: this.billing.paywallId,
|
|
1666
1713
|
capabilities: this.billing.capabilities,
|
|
@@ -1926,11 +1973,11 @@ class he {
|
|
|
1926
1973
|
});
|
|
1927
1974
|
}
|
|
1928
1975
|
ensureTrialStore(t) {
|
|
1929
|
-
if (this.trialStore && this.trialStoreConfig &&
|
|
1976
|
+
if (this.trialStore && this.trialStoreConfig && se(this.trialStoreConfig, t))
|
|
1930
1977
|
return this.trialStore;
|
|
1931
1978
|
this.trialStoreConfig = t;
|
|
1932
1979
|
const i = this.billing.createTrialStore;
|
|
1933
|
-
return this.trialStore = typeof i == "function" ? i.call(this.billing, t) :
|
|
1980
|
+
return this.trialStore = typeof i == "function" ? i.call(this.billing, t) : pt(this.billing.getStorage(), this.billing.paywallId, t), this.trialStore;
|
|
1934
1981
|
}
|
|
1935
1982
|
mountAndShow(t, i = {}) {
|
|
1936
1983
|
const n = i.renew === !0;
|
|
@@ -1938,8 +1985,8 @@ class he {
|
|
|
1938
1985
|
this.isOpen = !0, this.handle.update({ open: !0, initialView: t, purchased: !1, renew: n }), this.emit("open");
|
|
1939
1986
|
return;
|
|
1940
1987
|
}
|
|
1941
|
-
this.isOpen = !0, this.handle =
|
|
1942
|
-
|
|
1988
|
+
this.isOpen = !0, this.handle = ft(
|
|
1989
|
+
Xt,
|
|
1943
1990
|
{
|
|
1944
1991
|
client: this.billing,
|
|
1945
1992
|
open: !0,
|
|
@@ -1950,13 +1997,14 @@ class he {
|
|
|
1950
1997
|
onEvent: (a, o) => {
|
|
1951
1998
|
this.emit(a, o), a === "checkout_started" && this.startUserWatcher();
|
|
1952
1999
|
},
|
|
1953
|
-
onState: (a) => this.applyState(a)
|
|
2000
|
+
onState: (a) => this.applyState(a),
|
|
2001
|
+
inline: this.inline
|
|
1954
2002
|
},
|
|
1955
|
-
{ host: this.host, shadowMode: this.shadowMode }
|
|
2003
|
+
{ host: this.host, shadowMode: this.shadowMode, inline: this.inline }
|
|
1956
2004
|
), this.emit("open");
|
|
1957
2005
|
}
|
|
1958
2006
|
applyState(t) {
|
|
1959
|
-
if (!
|
|
2007
|
+
if (!oe(this.currentState, t)) {
|
|
1960
2008
|
this.currentState = t;
|
|
1961
2009
|
for (const i of this.stateListeners)
|
|
1962
2010
|
try {
|
|
@@ -2122,7 +2170,7 @@ class he {
|
|
|
2122
2170
|
// В extension popup runtime — no-op (popup не доживёт). Там полагаемся на
|
|
2123
2171
|
// bootstrap при следующем открытии.
|
|
2124
2172
|
startUserWatcher() {
|
|
2125
|
-
this.watcher ||
|
|
2173
|
+
this.watcher || ie() && (this.watcher = new re({
|
|
2126
2174
|
client: this.billing,
|
|
2127
2175
|
onActive: (t) => {
|
|
2128
2176
|
this.watcher = null, this.emit("purchase_completed", { priceId: null, sessionId: null });
|
|
@@ -2141,7 +2189,7 @@ class he {
|
|
|
2141
2189
|
}), this.watcher.start());
|
|
2142
2190
|
}
|
|
2143
2191
|
close() {
|
|
2144
|
-
!this.isOpen || !this.handle || (this.isOpen = !1, this.purchased = !1, this.handle.update({ open: !1, purchased: !1 }), this.applyState(
|
|
2192
|
+
!this.isOpen || !this.handle || (this.isOpen = !1, this.purchased = !1, this.handle.update({ open: !1, purchased: !1 }), this.applyState(G), this.emit("close"));
|
|
2145
2193
|
}
|
|
2146
2194
|
/**
|
|
2147
2195
|
* Сканирует текущий URL на маркеры возврата с checkout и эмитит
|
|
@@ -2151,23 +2199,23 @@ class he {
|
|
|
2151
2199
|
*/
|
|
2152
2200
|
checkReturn() {
|
|
2153
2201
|
if (typeof window > "u") return;
|
|
2154
|
-
const t = new URL(window.location.href), i =
|
|
2202
|
+
const t = new URL(window.location.href), i = it(t.hash.replace(/^#/, "")), n = it(t.search.replace(/^\?/, "")), a = i ?? n;
|
|
2155
2203
|
a && (a.status === "paid" ? (this.emit("purchase_completed", {
|
|
2156
2204
|
priceId: a.priceId,
|
|
2157
2205
|
sessionId: a.sessionId
|
|
2158
|
-
}),
|
|
2206
|
+
}), le(a)) : (a.status === "failed" || a.status === "cancelled") && this.emit("purchase_failed", { reason: a.status }), ce(t));
|
|
2159
2207
|
}
|
|
2160
2208
|
destroy() {
|
|
2161
|
-
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 =
|
|
2209
|
+
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 = G;
|
|
2162
2210
|
}
|
|
2163
2211
|
}
|
|
2164
|
-
function
|
|
2212
|
+
function ae(e) {
|
|
2165
2213
|
if (!e.auth) return { auth: void 0, ownsAuth: !1 };
|
|
2166
|
-
if (e.auth instanceof
|
|
2214
|
+
if (e.auth instanceof q || ne(e.auth))
|
|
2167
2215
|
return { auth: e.auth, ownsAuth: !1 };
|
|
2168
2216
|
const t = e.auth === !0 ? {} : e.auth;
|
|
2169
2217
|
return {
|
|
2170
|
-
auth: new
|
|
2218
|
+
auth: new q({
|
|
2171
2219
|
paywallId: e.paywallId,
|
|
2172
2220
|
apiOrigin: t.apiOrigin ?? e.apiOrigin,
|
|
2173
2221
|
storage: t.storage ?? e.storage,
|
|
@@ -2177,27 +2225,27 @@ function ee(e) {
|
|
|
2177
2225
|
ownsAuth: !0
|
|
2178
2226
|
};
|
|
2179
2227
|
}
|
|
2180
|
-
function
|
|
2228
|
+
function ne(e) {
|
|
2181
2229
|
if (typeof e != "object" || e === null) return !1;
|
|
2182
2230
|
const t = e;
|
|
2183
2231
|
return typeof t.onAuthChange == "function" && typeof t.getCachedSession == "function" && typeof t.signOut == "function";
|
|
2184
2232
|
}
|
|
2185
|
-
function
|
|
2233
|
+
function oe(e, t) {
|
|
2186
2234
|
return e.open === t.open && e.view === t.view && e.error === t.error;
|
|
2187
2235
|
}
|
|
2188
|
-
function
|
|
2236
|
+
function se(e, t) {
|
|
2189
2237
|
return e.mode === t.mode && e.payload === t.payload && e.storage === t.storage;
|
|
2190
2238
|
}
|
|
2191
|
-
function
|
|
2239
|
+
function it(e) {
|
|
2192
2240
|
if (!e) return null;
|
|
2193
|
-
const t = new URLSearchParams(e), i = t.get(
|
|
2241
|
+
const t = new URLSearchParams(e), i = t.get(j.status);
|
|
2194
2242
|
return i ? {
|
|
2195
2243
|
status: i,
|
|
2196
|
-
priceId: t.get(
|
|
2197
|
-
sessionId: t.get(
|
|
2244
|
+
priceId: t.get(j.priceId),
|
|
2245
|
+
sessionId: t.get(j.sessionId)
|
|
2198
2246
|
} : null;
|
|
2199
2247
|
}
|
|
2200
|
-
function
|
|
2248
|
+
function le(e) {
|
|
2201
2249
|
if (!(typeof window > "u" || !window.opener))
|
|
2202
2250
|
try {
|
|
2203
2251
|
window.opener.postMessage(
|
|
@@ -2212,18 +2260,18 @@ function ne(e) {
|
|
|
2212
2260
|
} catch {
|
|
2213
2261
|
}
|
|
2214
2262
|
}
|
|
2215
|
-
function
|
|
2263
|
+
function ce(e) {
|
|
2216
2264
|
const t = (n, a) => {
|
|
2217
2265
|
if (!n) return "";
|
|
2218
2266
|
const o = new URLSearchParams(n.replace(/^[?#]/, ""));
|
|
2219
|
-
o.delete(
|
|
2267
|
+
o.delete(j.status), o.delete(j.priceId), o.delete(j.sessionId);
|
|
2220
2268
|
const s = o.toString();
|
|
2221
2269
|
return s ? a + s : "";
|
|
2222
2270
|
}, i = e.pathname + t(e.search, "?") + t(e.hash, "#");
|
|
2223
2271
|
window.history.replaceState(null, "", i);
|
|
2224
2272
|
}
|
|
2225
2273
|
export {
|
|
2226
|
-
|
|
2227
|
-
|
|
2274
|
+
we as P,
|
|
2275
|
+
Wt as b
|
|
2228
2276
|
};
|
|
2229
|
-
//# sourceMappingURL=PaywallUI-
|
|
2277
|
+
//# sourceMappingURL=PaywallUI-2bwf2scV.js.map
|