@monetize.software/sdk-extension 3.0.0-alpha.8 → 3.0.0-beta.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (227) hide show
  1. package/dist/chunks/ar-CViBaj16.js +2 -0
  2. package/dist/chunks/ar-CViBaj16.js.map +1 -0
  3. package/dist/chunks/{ar-nh4l4WDE.js → ar-ClwBmll7.js} +9 -4
  4. package/dist/chunks/ar-ClwBmll7.js.map +1 -0
  5. package/dist/chunks/chrome-port-BEMjZQAH.js +2 -0
  6. package/dist/chunks/chrome-port-BEMjZQAH.js.map +1 -0
  7. package/dist/chunks/{chrome-port-CxW3Pwc2.js → chrome-port-bfTUUDz_.js} +174 -138
  8. package/dist/chunks/chrome-port-bfTUUDz_.js.map +1 -0
  9. package/dist/chunks/{cs-2UYO2rWf.js → cs-Cc_D0W4S.js} +7 -2
  10. package/dist/chunks/cs-Cc_D0W4S.js.map +1 -0
  11. package/dist/chunks/cs-DQJWP65K.js +2 -0
  12. package/dist/chunks/cs-DQJWP65K.js.map +1 -0
  13. package/dist/chunks/{da-BD0O_HfV.js → da-BtKcMSxH.js} +7 -2
  14. package/dist/chunks/da-BtKcMSxH.js.map +1 -0
  15. package/dist/chunks/da-Cyr_IXhb.js +2 -0
  16. package/dist/chunks/da-Cyr_IXhb.js.map +1 -0
  17. package/dist/chunks/de-BOCUj1pF.js +2 -0
  18. package/dist/chunks/de-BOCUj1pF.js.map +1 -0
  19. package/dist/chunks/{de-BkCiXPsn.js → de-iwQW5eYl.js} +8 -2
  20. package/dist/chunks/de-iwQW5eYl.js.map +1 -0
  21. package/dist/chunks/{el-cIcxTp07.js → el-BoH65CeJ.js} +7 -2
  22. package/dist/chunks/el-BoH65CeJ.js.map +1 -0
  23. package/dist/chunks/el-C6jLHiEF.js +2 -0
  24. package/dist/chunks/el-C6jLHiEF.js.map +1 -0
  25. package/dist/chunks/es-CARHLxHR.js +2 -0
  26. package/dist/chunks/es-CARHLxHR.js.map +1 -0
  27. package/dist/chunks/{es-CJBC_jrV.js → es-CkP16_8K.js} +8 -2
  28. package/dist/chunks/es-CkP16_8K.js.map +1 -0
  29. package/dist/chunks/fi-B8OhRbwY.js +2 -0
  30. package/dist/chunks/fi-B8OhRbwY.js.map +1 -0
  31. package/dist/chunks/{fi-DyV7ynBf.js → fi-yUXSmK1E.js} +7 -2
  32. package/dist/chunks/fi-yUXSmK1E.js.map +1 -0
  33. package/dist/chunks/fr-CoM18zzM.js +2 -0
  34. package/dist/chunks/fr-CoM18zzM.js.map +1 -0
  35. package/dist/chunks/{fr-BLQ4AIu7.js → fr-DSZRGsxI.js} +8 -2
  36. package/dist/chunks/fr-DSZRGsxI.js.map +1 -0
  37. package/dist/chunks/he-DTDVc3lA.js +2 -0
  38. package/dist/chunks/he-DTDVc3lA.js.map +1 -0
  39. package/dist/chunks/{he-Bg-Bqi7r.js → he-ZUo7cQjk.js} +9 -4
  40. package/dist/chunks/he-ZUo7cQjk.js.map +1 -0
  41. package/dist/chunks/hi-BjnS9UeE.js +2 -0
  42. package/dist/chunks/hi-BjnS9UeE.js.map +1 -0
  43. package/dist/chunks/{hi-wQeE43oY.js → hi-CEutBKiG.js} +9 -4
  44. package/dist/chunks/hi-CEutBKiG.js.map +1 -0
  45. package/dist/chunks/hu-CN06FMhV.js +2 -0
  46. package/dist/chunks/hu-CN06FMhV.js.map +1 -0
  47. package/dist/chunks/{hu-D9qxzu0r.js → hu-DvEAWGS7.js} +7 -2
  48. package/dist/chunks/hu-DvEAWGS7.js.map +1 -0
  49. package/dist/chunks/id-BITgaBxq.js +2 -0
  50. package/dist/chunks/id-BITgaBxq.js.map +1 -0
  51. package/dist/chunks/{id-Rx_wYvqy.js → id-_eEMrYMW.js} +7 -2
  52. package/dist/chunks/id-_eEMrYMW.js.map +1 -0
  53. package/dist/chunks/{it-B1SRPZ3e.js → it-BAmsQbIl.js} +8 -2
  54. package/dist/chunks/it-BAmsQbIl.js.map +1 -0
  55. package/dist/chunks/it-DVcsq015.js +2 -0
  56. package/dist/chunks/it-DVcsq015.js.map +1 -0
  57. package/dist/chunks/ja-Bim7Ok2e.js +2 -0
  58. package/dist/chunks/ja-Bim7Ok2e.js.map +1 -0
  59. package/dist/chunks/{ja-DiItm8te.js → ja-BqCZWVKK.js} +10 -4
  60. package/dist/chunks/ja-BqCZWVKK.js.map +1 -0
  61. package/dist/chunks/{ko-CdGFWAKX.js → ko-CkIzeOzb.js} +10 -4
  62. package/dist/chunks/ko-CkIzeOzb.js.map +1 -0
  63. package/dist/chunks/ko-DqEfcVCB.js +2 -0
  64. package/dist/chunks/ko-DqEfcVCB.js.map +1 -0
  65. package/dist/chunks/nl-DSNuJWIo.js +2 -0
  66. package/dist/chunks/nl-DSNuJWIo.js.map +1 -0
  67. package/dist/chunks/{nl-CmZ3vEvj.js → nl-Mu_KNzli.js} +8 -2
  68. package/dist/chunks/nl-Mu_KNzli.js.map +1 -0
  69. package/dist/chunks/{no-BuxByZpq.js → no-9HMjljBs.js} +7 -2
  70. package/dist/chunks/no-9HMjljBs.js.map +1 -0
  71. package/dist/chunks/no-B5HY_A8_.js +2 -0
  72. package/dist/chunks/no-B5HY_A8_.js.map +1 -0
  73. package/dist/chunks/{pl-jZFCnDb8.js → pl-Cbr2qDwv.js} +7 -2
  74. package/dist/chunks/pl-Cbr2qDwv.js.map +1 -0
  75. package/dist/chunks/pl-ChGLn9Sy.js +2 -0
  76. package/dist/chunks/pl-ChGLn9Sy.js.map +1 -0
  77. package/dist/chunks/port-name-CF4WQQ3-.js +2 -0
  78. package/dist/chunks/port-name-CF4WQQ3-.js.map +1 -0
  79. package/dist/chunks/port-name-ervLBWAQ.js +6 -0
  80. package/dist/chunks/port-name-ervLBWAQ.js.map +1 -0
  81. package/dist/chunks/pt-CDLEktT9.js +2 -0
  82. package/dist/chunks/pt-CDLEktT9.js.map +1 -0
  83. package/dist/chunks/{pt-Cld7MwIW.js → pt-_jirA6IR.js} +8 -2
  84. package/dist/chunks/pt-_jirA6IR.js.map +1 -0
  85. package/dist/chunks/ro-BHCHiXY3.js +2 -0
  86. package/dist/chunks/ro-BHCHiXY3.js.map +1 -0
  87. package/dist/chunks/{ro-CuKDqj3C.js → ro-oZLxhwHc.js} +7 -2
  88. package/dist/chunks/ro-oZLxhwHc.js.map +1 -0
  89. package/dist/chunks/ru-B6HgmINj.js +2 -0
  90. package/dist/chunks/ru-B6HgmINj.js.map +1 -0
  91. package/dist/chunks/{ru-B7cjqJUm.js → ru-C2-sqY7B.js} +15 -2
  92. package/dist/chunks/ru-C2-sqY7B.js.map +1 -0
  93. package/dist/chunks/sv-DoSs4a9n.js +2 -0
  94. package/dist/chunks/sv-DoSs4a9n.js.map +1 -0
  95. package/dist/chunks/{sv-D9y-M1Fo.js → sv-y385MWVy.js} +7 -2
  96. package/dist/chunks/sv-y385MWVy.js.map +1 -0
  97. package/dist/chunks/{th-D9umBjEy.js → th-Bjbv4M1s.js} +7 -2
  98. package/dist/chunks/th-Bjbv4M1s.js.map +1 -0
  99. package/dist/chunks/th-UeweOhwg.js +2 -0
  100. package/dist/chunks/th-UeweOhwg.js.map +1 -0
  101. package/dist/chunks/tr-BbBr5tyB.js +2 -0
  102. package/dist/chunks/tr-BbBr5tyB.js.map +1 -0
  103. package/dist/chunks/{tr-BddMywiw.js → tr-DmHo9F8i.js} +9 -4
  104. package/dist/chunks/tr-DmHo9F8i.js.map +1 -0
  105. package/dist/chunks/uk-CJTA1SJK.js +2 -0
  106. package/dist/chunks/uk-CJTA1SJK.js.map +1 -0
  107. package/dist/chunks/{uk-Dbd31hFt.js → uk-DwvAoTe5.js} +15 -2
  108. package/dist/chunks/uk-DwvAoTe5.js.map +1 -0
  109. package/dist/chunks/{vi-Do3BMOdh.js → vi-BEpwsVLR.js} +7 -2
  110. package/dist/chunks/vi-BEpwsVLR.js.map +1 -0
  111. package/dist/chunks/vi-ZvBo7PbB.js +2 -0
  112. package/dist/chunks/vi-ZvBo7PbB.js.map +1 -0
  113. package/dist/chunks/zh-CPZBEb3d.js +2 -0
  114. package/dist/chunks/zh-CPZBEb3d.js.map +1 -0
  115. package/dist/chunks/{zh-gQSYLZI3.js → zh-DrG18oGe.js} +9 -3
  116. package/dist/chunks/zh-DrG18oGe.js.map +1 -0
  117. package/dist/content/PaywallUI.d.ts +1 -1
  118. package/dist/content/RemoteAuthClient.d.ts +3 -3
  119. package/dist/content/RemoteBillingClient.d.ts +7 -3
  120. package/dist/content/RemoteBillingClient.d.ts.map +1 -1
  121. package/dist/content/RemoteTrialStore.d.ts +2 -2
  122. package/dist/content.cjs +3 -3
  123. package/dist/content.cjs.map +1 -1
  124. package/dist/content.js +1289 -893
  125. package/dist/content.js.map +1 -1
  126. package/dist/offscreen/server.d.ts +3 -3
  127. package/dist/offscreen/server.d.ts.map +1 -1
  128. package/dist/offscreen.cjs +1 -1
  129. package/dist/offscreen.cjs.map +1 -1
  130. package/dist/offscreen.js +9 -9
  131. package/dist/offscreen.js.map +1 -1
  132. package/dist/shared/messages.d.ts +4 -4
  133. package/dist/shared/port-name.d.ts +1 -0
  134. package/dist/shared/port-name.d.ts.map +1 -1
  135. package/dist/sw.cjs +1 -1
  136. package/dist/sw.cjs.map +1 -1
  137. package/dist/sw.js +14 -14
  138. package/dist/sw.js.map +1 -1
  139. package/package.json +3 -3
  140. package/dist/chunks/ar-BUQInJ5a.js +0 -2
  141. package/dist/chunks/ar-BUQInJ5a.js.map +0 -1
  142. package/dist/chunks/ar-nh4l4WDE.js.map +0 -1
  143. package/dist/chunks/chrome-port-CxW3Pwc2.js.map +0 -1
  144. package/dist/chunks/chrome-port-PhlW29BV.js +0 -2
  145. package/dist/chunks/chrome-port-PhlW29BV.js.map +0 -1
  146. package/dist/chunks/cs-2UYO2rWf.js.map +0 -1
  147. package/dist/chunks/cs-i5K4KTFV.js +0 -2
  148. package/dist/chunks/cs-i5K4KTFV.js.map +0 -1
  149. package/dist/chunks/da-BD0O_HfV.js.map +0 -1
  150. package/dist/chunks/da-CZbhtVJO.js +0 -2
  151. package/dist/chunks/da-CZbhtVJO.js.map +0 -1
  152. package/dist/chunks/de-Bc-GoLgC.js +0 -2
  153. package/dist/chunks/de-Bc-GoLgC.js.map +0 -1
  154. package/dist/chunks/de-BkCiXPsn.js.map +0 -1
  155. package/dist/chunks/el-CcMEbl_F.js +0 -2
  156. package/dist/chunks/el-CcMEbl_F.js.map +0 -1
  157. package/dist/chunks/el-cIcxTp07.js.map +0 -1
  158. package/dist/chunks/es-BvYmomAz.js +0 -2
  159. package/dist/chunks/es-BvYmomAz.js.map +0 -1
  160. package/dist/chunks/es-CJBC_jrV.js.map +0 -1
  161. package/dist/chunks/fi-DyV7ynBf.js.map +0 -1
  162. package/dist/chunks/fi-aZR-qmZN.js +0 -2
  163. package/dist/chunks/fi-aZR-qmZN.js.map +0 -1
  164. package/dist/chunks/fr-BLQ4AIu7.js.map +0 -1
  165. package/dist/chunks/fr-BgbFAgHx.js +0 -2
  166. package/dist/chunks/fr-BgbFAgHx.js.map +0 -1
  167. package/dist/chunks/he-Bg-Bqi7r.js.map +0 -1
  168. package/dist/chunks/he-CQ4yCuja.js +0 -2
  169. package/dist/chunks/he-CQ4yCuja.js.map +0 -1
  170. package/dist/chunks/hi-DtUsj1c-.js +0 -2
  171. package/dist/chunks/hi-DtUsj1c-.js.map +0 -1
  172. package/dist/chunks/hi-wQeE43oY.js.map +0 -1
  173. package/dist/chunks/hu-D9qxzu0r.js.map +0 -1
  174. package/dist/chunks/hu-DXtscQ8_.js +0 -2
  175. package/dist/chunks/hu-DXtscQ8_.js.map +0 -1
  176. package/dist/chunks/id-BByOYpeo.js +0 -2
  177. package/dist/chunks/id-BByOYpeo.js.map +0 -1
  178. package/dist/chunks/id-Rx_wYvqy.js.map +0 -1
  179. package/dist/chunks/it-52Ip42pa.js +0 -2
  180. package/dist/chunks/it-52Ip42pa.js.map +0 -1
  181. package/dist/chunks/it-B1SRPZ3e.js.map +0 -1
  182. package/dist/chunks/ja-CMC3Parn.js +0 -2
  183. package/dist/chunks/ja-CMC3Parn.js.map +0 -1
  184. package/dist/chunks/ja-DiItm8te.js.map +0 -1
  185. package/dist/chunks/ko-3qY21q40.js +0 -2
  186. package/dist/chunks/ko-3qY21q40.js.map +0 -1
  187. package/dist/chunks/ko-CdGFWAKX.js.map +0 -1
  188. package/dist/chunks/nl-Borc5nw1.js +0 -2
  189. package/dist/chunks/nl-Borc5nw1.js.map +0 -1
  190. package/dist/chunks/nl-CmZ3vEvj.js.map +0 -1
  191. package/dist/chunks/no-BuxByZpq.js.map +0 -1
  192. package/dist/chunks/no-Do2iGedg.js +0 -2
  193. package/dist/chunks/no-Do2iGedg.js.map +0 -1
  194. package/dist/chunks/pl-jZFCnDb8.js.map +0 -1
  195. package/dist/chunks/pl-mRaky_7k.js +0 -2
  196. package/dist/chunks/pl-mRaky_7k.js.map +0 -1
  197. package/dist/chunks/port-name-BPfQKtdb.js +0 -5
  198. package/dist/chunks/port-name-BPfQKtdb.js.map +0 -1
  199. package/dist/chunks/port-name-qwB109u9.js +0 -2
  200. package/dist/chunks/port-name-qwB109u9.js.map +0 -1
  201. package/dist/chunks/pt-Cld7MwIW.js.map +0 -1
  202. package/dist/chunks/pt-DilDTXfs.js +0 -2
  203. package/dist/chunks/pt-DilDTXfs.js.map +0 -1
  204. package/dist/chunks/ro-CuKDqj3C.js.map +0 -1
  205. package/dist/chunks/ro-DF2uzPIB.js +0 -2
  206. package/dist/chunks/ro-DF2uzPIB.js.map +0 -1
  207. package/dist/chunks/ru-B7cjqJUm.js.map +0 -1
  208. package/dist/chunks/ru-YeaXnTO-.js +0 -2
  209. package/dist/chunks/ru-YeaXnTO-.js.map +0 -1
  210. package/dist/chunks/sv-2pHEvuSe.js +0 -2
  211. package/dist/chunks/sv-2pHEvuSe.js.map +0 -1
  212. package/dist/chunks/sv-D9y-M1Fo.js.map +0 -1
  213. package/dist/chunks/th-D9umBjEy.js.map +0 -1
  214. package/dist/chunks/th-u2QSDF0G.js +0 -2
  215. package/dist/chunks/th-u2QSDF0G.js.map +0 -1
  216. package/dist/chunks/tr-BddMywiw.js.map +0 -1
  217. package/dist/chunks/tr-Bhgm6_ti.js +0 -2
  218. package/dist/chunks/tr-Bhgm6_ti.js.map +0 -1
  219. package/dist/chunks/uk-7vwqsaVK.js +0 -2
  220. package/dist/chunks/uk-7vwqsaVK.js.map +0 -1
  221. package/dist/chunks/uk-Dbd31hFt.js.map +0 -1
  222. package/dist/chunks/vi-CJefLP_g.js +0 -2
  223. package/dist/chunks/vi-CJefLP_g.js.map +0 -1
  224. package/dist/chunks/vi-Do3BMOdh.js.map +0 -1
  225. package/dist/chunks/zh-D5C3BzYL.js +0 -2
  226. package/dist/chunks/zh-D5C3BzYL.js.map +0 -1
  227. package/dist/chunks/zh-gQSYLZI3.js.map +0 -1
package/dist/content.js CHANGED
@@ -1,16 +1,62 @@
1
- import { P as j, B as Re, E as ze, c as De, A as ue, w as qe, a as K, r as Ne, b as Fe } from "./chunks/chrome-port-CxW3Pwc2.js";
2
- import { render as X, h as de, createContext as Ve } from "preact";
3
- import { jsx as o, jsxs as c, Fragment as Y } from "preact/jsx-runtime";
4
- import { useState as x, useEffect as T, useContext as $e, useRef as z, useMemo as _e, useLayoutEffect as He } from "preact/hooks";
5
- import { P as Ge } from "./chunks/port-name-BPfQKtdb.js";
6
- const Se = '@layer theme,base,components,utilities;@layer theme{@theme default{ --font-sans: ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"; --font-serif: ui-serif, Georgia, Cambria, "Times New Roman", Times, serif; --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace; --color-red-50: oklch(97.1% .013 17.38); --color-red-100: oklch(93.6% .032 17.717); --color-red-200: oklch(88.5% .062 18.334); --color-red-300: oklch(80.8% .114 19.571); --color-red-400: oklch(70.4% .191 22.216); --color-red-500: oklch(63.7% .237 25.331); --color-red-600: oklch(57.7% .245 27.325); --color-red-700: oklch(50.5% .213 27.518); --color-red-800: oklch(44.4% .177 26.899); --color-red-900: oklch(39.6% .141 25.723); --color-red-950: oklch(25.8% .092 26.042); --color-orange-50: oklch(98% .016 73.684); --color-orange-100: oklch(95.4% .038 75.164); --color-orange-200: oklch(90.1% .076 70.697); --color-orange-300: oklch(83.7% .128 66.29); --color-orange-400: oklch(75% .183 55.934); --color-orange-500: oklch(70.5% .213 47.604); --color-orange-600: oklch(64.6% .222 41.116); --color-orange-700: oklch(55.3% .195 38.402); --color-orange-800: oklch(47% .157 37.304); --color-orange-900: oklch(40.8% .123 38.172); --color-orange-950: oklch(26.6% .079 36.259); --color-amber-50: oklch(98.7% .022 95.277); --color-amber-100: oklch(96.2% .059 95.617); --color-amber-200: oklch(92.4% .12 95.746); --color-amber-300: oklch(87.9% .169 91.605); --color-amber-400: oklch(82.8% .189 84.429); --color-amber-500: oklch(76.9% .188 70.08); --color-amber-600: oklch(66.6% .179 58.318); --color-amber-700: oklch(55.5% .163 48.998); --color-amber-800: oklch(47.3% .137 46.201); --color-amber-900: oklch(41.4% .112 45.904); --color-amber-950: oklch(27.9% .077 45.635); --color-yellow-50: oklch(98.7% .026 102.212); --color-yellow-100: oklch(97.3% .071 103.193); --color-yellow-200: oklch(94.5% .129 101.54); --color-yellow-300: oklch(90.5% .182 98.111); --color-yellow-400: oklch(85.2% .199 91.936); --color-yellow-500: oklch(79.5% .184 86.047); --color-yellow-600: oklch(68.1% .162 75.834); --color-yellow-700: oklch(55.4% .135 66.442); --color-yellow-800: oklch(47.6% .114 61.907); --color-yellow-900: oklch(42.1% .095 57.708); --color-yellow-950: oklch(28.6% .066 53.813); --color-lime-50: oklch(98.6% .031 120.757); --color-lime-100: oklch(96.7% .067 122.328); --color-lime-200: oklch(93.8% .127 124.321); --color-lime-300: oklch(89.7% .196 126.665); --color-lime-400: oklch(84.1% .238 128.85); --color-lime-500: oklch(76.8% .233 130.85); --color-lime-600: oklch(64.8% .2 131.684); --color-lime-700: oklch(53.2% .157 131.589); --color-lime-800: oklch(45.3% .124 130.933); --color-lime-900: oklch(40.5% .101 131.063); --color-lime-950: oklch(27.4% .072 132.109); --color-green-50: oklch(98.2% .018 155.826); --color-green-100: oklch(96.2% .044 156.743); --color-green-200: oklch(92.5% .084 155.995); --color-green-300: oklch(87.1% .15 154.449); --color-green-400: oklch(79.2% .209 151.711); --color-green-500: oklch(72.3% .219 149.579); --color-green-600: oklch(62.7% .194 149.214); --color-green-700: oklch(52.7% .154 150.069); --color-green-800: oklch(44.8% .119 151.328); --color-green-900: oklch(39.3% .095 152.535); --color-green-950: oklch(26.6% .065 152.934); --color-emerald-50: oklch(97.9% .021 166.113); --color-emerald-100: oklch(95% .052 163.051); --color-emerald-200: oklch(90.5% .093 164.15); --color-emerald-300: oklch(84.5% .143 164.978); --color-emerald-400: oklch(76.5% .177 163.223); --color-emerald-500: oklch(69.6% .17 162.48); --color-emerald-600: oklch(59.6% .145 163.225); --color-emerald-700: oklch(50.8% .118 165.612); --color-emerald-800: oklch(43.2% .095 166.913); --color-emerald-900: oklch(37.8% .077 168.94); --color-emerald-950: oklch(26.2% .051 172.552); --color-teal-50: oklch(98.4% .014 180.72); --color-teal-100: oklch(95.3% .051 180.801); --color-teal-200: oklch(91% .096 180.426); --color-teal-300: oklch(85.5% .138 181.071); --color-teal-400: oklch(77.7% .152 181.912); --color-teal-500: oklch(70.4% .14 182.503); --color-teal-600: oklch(60% .118 184.704); --color-teal-700: oklch(51.1% .096 186.391); --color-teal-800: oklch(43.7% .078 188.216); --color-teal-900: oklch(38.6% .063 188.416); --color-teal-950: oklch(27.7% .046 192.524); --color-cyan-50: oklch(98.4% .019 200.873); --color-cyan-100: oklch(95.6% .045 203.388); --color-cyan-200: oklch(91.7% .08 205.041); --color-cyan-300: oklch(86.5% .127 207.078); --color-cyan-400: oklch(78.9% .154 211.53); --color-cyan-500: oklch(71.5% .143 215.221); --color-cyan-600: oklch(60.9% .126 221.723); --color-cyan-700: oklch(52% .105 223.128); --color-cyan-800: oklch(45% .085 224.283); --color-cyan-900: oklch(39.8% .07 227.392); --color-cyan-950: oklch(30.2% .056 229.695); --color-sky-50: oklch(97.7% .013 236.62); --color-sky-100: oklch(95.1% .026 236.824); --color-sky-200: oklch(90.1% .058 230.902); --color-sky-300: oklch(82.8% .111 230.318); --color-sky-400: oklch(74.6% .16 232.661); --color-sky-500: oklch(68.5% .169 237.323); --color-sky-600: oklch(58.8% .158 241.966); --color-sky-700: oklch(50% .134 242.749); --color-sky-800: oklch(44.3% .11 240.79); --color-sky-900: oklch(39.1% .09 240.876); --color-sky-950: oklch(29.3% .066 243.157); --color-blue-50: oklch(97% .014 254.604); --color-blue-100: oklch(93.2% .032 255.585); --color-blue-200: oklch(88.2% .059 254.128); --color-blue-300: oklch(80.9% .105 251.813); --color-blue-400: oklch(70.7% .165 254.624); --color-blue-500: oklch(62.3% .214 259.815); --color-blue-600: oklch(54.6% .245 262.881); --color-blue-700: oklch(48.8% .243 264.376); --color-blue-800: oklch(42.4% .199 265.638); --color-blue-900: oklch(37.9% .146 265.522); --color-blue-950: oklch(28.2% .091 267.935); --color-indigo-50: oklch(96.2% .018 272.314); --color-indigo-100: oklch(93% .034 272.788); --color-indigo-200: oklch(87% .065 274.039); --color-indigo-300: oklch(78.5% .115 274.713); --color-indigo-400: oklch(67.3% .182 276.935); --color-indigo-500: oklch(58.5% .233 277.117); --color-indigo-600: oklch(51.1% .262 276.966); --color-indigo-700: oklch(45.7% .24 277.023); --color-indigo-800: oklch(39.8% .195 277.366); --color-indigo-900: oklch(35.9% .144 278.697); --color-indigo-950: oklch(25.7% .09 281.288); --color-violet-50: oklch(96.9% .016 293.756); --color-violet-100: oklch(94.3% .029 294.588); --color-violet-200: oklch(89.4% .057 293.283); --color-violet-300: oklch(81.1% .111 293.571); --color-violet-400: oklch(70.2% .183 293.541); --color-violet-500: oklch(60.6% .25 292.717); --color-violet-600: oklch(54.1% .281 293.009); --color-violet-700: oklch(49.1% .27 292.581); --color-violet-800: oklch(43.2% .232 292.759); --color-violet-900: oklch(38% .189 293.745); --color-violet-950: oklch(28.3% .141 291.089); --color-purple-50: oklch(97.7% .014 308.299); --color-purple-100: oklch(94.6% .033 307.174); --color-purple-200: oklch(90.2% .063 306.703); --color-purple-300: oklch(82.7% .119 306.383); --color-purple-400: oklch(71.4% .203 305.504); --color-purple-500: oklch(62.7% .265 303.9); --color-purple-600: oklch(55.8% .288 302.321); --color-purple-700: oklch(49.6% .265 301.924); --color-purple-800: oklch(43.8% .218 303.724); --color-purple-900: oklch(38.1% .176 304.987); --color-purple-950: oklch(29.1% .149 302.717); --color-fuchsia-50: oklch(97.7% .017 320.058); --color-fuchsia-100: oklch(95.2% .037 318.852); --color-fuchsia-200: oklch(90.3% .076 319.62); --color-fuchsia-300: oklch(83.3% .145 321.434); --color-fuchsia-400: oklch(74% .238 322.16); --color-fuchsia-500: oklch(66.7% .295 322.15); --color-fuchsia-600: oklch(59.1% .293 322.896); --color-fuchsia-700: oklch(51.8% .253 323.949); --color-fuchsia-800: oklch(45.2% .211 324.591); --color-fuchsia-900: oklch(40.1% .17 325.612); --color-fuchsia-950: oklch(29.3% .136 325.661); --color-pink-50: oklch(97.1% .014 343.198); --color-pink-100: oklch(94.8% .028 342.258); --color-pink-200: oklch(89.9% .061 343.231); --color-pink-300: oklch(82.3% .12 346.018); --color-pink-400: oklch(71.8% .202 349.761); --color-pink-500: oklch(65.6% .241 354.308); --color-pink-600: oklch(59.2% .249 .584); --color-pink-700: oklch(52.5% .223 3.958); --color-pink-800: oklch(45.9% .187 3.815); --color-pink-900: oklch(40.8% .153 2.432); --color-pink-950: oklch(28.4% .109 3.907); --color-rose-50: oklch(96.9% .015 12.422); --color-rose-100: oklch(94.1% .03 12.58); --color-rose-200: oklch(89.2% .058 10.001); --color-rose-300: oklch(81% .117 11.638); --color-rose-400: oklch(71.2% .194 13.428); --color-rose-500: oklch(64.5% .246 16.439); --color-rose-600: oklch(58.6% .253 17.585); --color-rose-700: oklch(51.4% .222 16.935); --color-rose-800: oklch(45.5% .188 13.697); --color-rose-900: oklch(41% .159 10.272); --color-rose-950: oklch(27.1% .105 12.094); --color-slate-50: oklch(98.4% .003 247.858); --color-slate-100: oklch(96.8% .007 247.896); --color-slate-200: oklch(92.9% .013 255.508); --color-slate-300: oklch(86.9% .022 252.894); --color-slate-400: oklch(70.4% .04 256.788); --color-slate-500: oklch(55.4% .046 257.417); --color-slate-600: oklch(44.6% .043 257.281); --color-slate-700: oklch(37.2% .044 257.287); --color-slate-800: oklch(27.9% .041 260.031); --color-slate-900: oklch(20.8% .042 265.755); --color-slate-950: oklch(12.9% .042 264.695); --color-gray-50: oklch(98.5% .002 247.839); --color-gray-100: oklch(96.7% .003 264.542); --color-gray-200: oklch(92.8% .006 264.531); --color-gray-300: oklch(87.2% .01 258.338); --color-gray-400: oklch(70.7% .022 261.325); --color-gray-500: oklch(55.1% .027 264.364); --color-gray-600: oklch(44.6% .03 256.802); --color-gray-700: oklch(37.3% .034 259.733); --color-gray-800: oklch(27.8% .033 256.848); --color-gray-900: oklch(21% .034 264.665); --color-gray-950: oklch(13% .028 261.692); --color-zinc-50: oklch(98.5% 0 0); --color-zinc-100: oklch(96.7% .001 286.375); --color-zinc-200: oklch(92% .004 286.32); --color-zinc-300: oklch(87.1% .006 286.286); --color-zinc-400: oklch(70.5% .015 286.067); --color-zinc-500: oklch(55.2% .016 285.938); --color-zinc-600: oklch(44.2% .017 285.786); --color-zinc-700: oklch(37% .013 285.805); --color-zinc-800: oklch(27.4% .006 286.033); --color-zinc-900: oklch(21% .006 285.885); --color-zinc-950: oklch(14.1% .005 285.823); --color-neutral-50: oklch(98.5% 0 0); --color-neutral-100: oklch(97% 0 0); --color-neutral-200: oklch(92.2% 0 0); --color-neutral-300: oklch(87% 0 0); --color-neutral-400: oklch(70.8% 0 0); --color-neutral-500: oklch(55.6% 0 0); --color-neutral-600: oklch(43.9% 0 0); --color-neutral-700: oklch(37.1% 0 0); --color-neutral-800: oklch(26.9% 0 0); --color-neutral-900: oklch(20.5% 0 0); --color-neutral-950: oklch(14.5% 0 0); --color-stone-50: oklch(98.5% .001 106.423); --color-stone-100: oklch(97% .001 106.424); --color-stone-200: oklch(92.3% .003 48.717); --color-stone-300: oklch(86.9% .005 56.366); --color-stone-400: oklch(70.9% .01 56.259); --color-stone-500: oklch(55.3% .013 58.071); --color-stone-600: oklch(44.4% .011 73.639); --color-stone-700: oklch(37.4% .01 67.558); --color-stone-800: oklch(26.8% .007 34.298); --color-stone-900: oklch(21.6% .006 56.043); --color-stone-950: oklch(14.7% .004 49.25); --color-mauve-50: oklch(98.5% 0 0); --color-mauve-100: oklch(96% .003 325.6); --color-mauve-200: oklch(92.2% .005 325.62); --color-mauve-300: oklch(86.5% .012 325.68); --color-mauve-400: oklch(71.1% .019 323.02); --color-mauve-500: oklch(54.2% .034 322.5); --color-mauve-600: oklch(43.5% .029 321.78); --color-mauve-700: oklch(36.4% .029 323.89); --color-mauve-800: oklch(26.3% .024 320.12); --color-mauve-900: oklch(21.2% .019 322.12); --color-mauve-950: oklch(14.5% .008 326); --color-olive-50: oklch(98.8% .003 106.5); --color-olive-100: oklch(96.6% .005 106.5); --color-olive-200: oklch(93% .007 106.5); --color-olive-300: oklch(88% .011 106.6); --color-olive-400: oklch(73.7% .021 106.9); --color-olive-500: oklch(58% .031 107.3); --color-olive-600: oklch(46.6% .025 107.3); --color-olive-700: oklch(39.4% .023 107.4); --color-olive-800: oklch(28.6% .016 107.4); --color-olive-900: oklch(22.8% .013 107.4); --color-olive-950: oklch(15.3% .006 107.1); --color-mist-50: oklch(98.7% .002 197.1); --color-mist-100: oklch(96.3% .002 197.1); --color-mist-200: oklch(92.5% .005 214.3); --color-mist-300: oklch(87.2% .007 219.6); --color-mist-400: oklch(72.3% .014 214.4); --color-mist-500: oklch(56% .021 213.5); --color-mist-600: oklch(45% .017 213.2); --color-mist-700: oklch(37.8% .015 216); --color-mist-800: oklch(27.5% .011 216.9); --color-mist-900: oklch(21.8% .008 223.9); --color-mist-950: oklch(14.8% .004 228.8); --color-taupe-50: oklch(98.6% .002 67.8); --color-taupe-100: oklch(96% .002 17.2); --color-taupe-200: oklch(92.2% .005 34.3); --color-taupe-300: oklch(86.8% .007 39.5); --color-taupe-400: oklch(71.4% .014 41.2); --color-taupe-500: oklch(54.7% .021 43.1); --color-taupe-600: oklch(43.8% .017 39.3); --color-taupe-700: oklch(36.7% .016 35.7); --color-taupe-800: oklch(26.8% .011 36.5); --color-taupe-900: oklch(21.4% .009 43.1); --color-taupe-950: oklch(14.7% .004 49.3); --color-black: #000; --color-white: #fff; --spacing: .25rem; --breakpoint-sm: 40rem; --breakpoint-md: 48rem; --breakpoint-lg: 64rem; --breakpoint-xl: 80rem; --breakpoint-2xl: 96rem; --container-3xs: 16rem; --container-2xs: 18rem; --container-xs: 20rem; --container-sm: 24rem; --container-md: 28rem; --container-lg: 32rem; --container-xl: 36rem; --container-2xl: 42rem; --container-3xl: 48rem; --container-4xl: 56rem; --container-5xl: 64rem; --container-6xl: 72rem; --container-7xl: 80rem; --text-xs: .75rem; --text-xs--line-height: calc(1 / .75); --text-sm: .875rem; --text-sm--line-height: calc(1.25 / .875); --text-base: 1rem; --text-base--line-height: 1.5 ; --text-lg: 1.125rem; --text-lg--line-height: calc(1.75 / 1.125); --text-xl: 1.25rem; --text-xl--line-height: calc(1.75 / 1.25); --text-2xl: 1.5rem; --text-2xl--line-height: calc(2 / 1.5); --text-3xl: 1.875rem; --text-3xl--line-height: 1.2 ; --text-4xl: 2.25rem; --text-4xl--line-height: calc(2.5 / 2.25); --text-5xl: 3rem; --text-5xl--line-height: 1; --text-6xl: 3.75rem; --text-6xl--line-height: 1; --text-7xl: 4.5rem; --text-7xl--line-height: 1; --text-8xl: 6rem; --text-8xl--line-height: 1; --text-9xl: 8rem; --text-9xl--line-height: 1; --font-weight-thin: 100; --font-weight-extralight: 200; --font-weight-light: 300; --font-weight-normal: 400; --font-weight-medium: 500; --font-weight-semibold: 600; --font-weight-bold: 700; --font-weight-extrabold: 800; --font-weight-black: 900; --tracking-tighter: -.05em; --tracking-tight: -.025em; --tracking-normal: 0em; --tracking-wide: .025em; --tracking-wider: .05em; --tracking-widest: .1em; --leading-tight: 1.25; --leading-snug: 1.375; --leading-normal: 1.5; --leading-relaxed: 1.625; --leading-loose: 2; --radius-xs: .125rem; --radius-sm: .25rem; --radius-md: .375rem; --radius-lg: .5rem; --radius-xl: .75rem; --radius-2xl: 1rem; --radius-3xl: 1.5rem; --radius-4xl: 2rem; --shadow-2xs: 0 1px rgb(0 0 0 / .05); --shadow-xs: 0 1px 2px 0 rgb(0 0 0 / .05); --shadow-sm: 0 1px 3px 0 rgb(0 0 0 / .1), 0 1px 2px -1px rgb(0 0 0 / .1); --shadow-md: 0 4px 6px -1px rgb(0 0 0 / .1), 0 2px 4px -2px rgb(0 0 0 / .1); --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / .1), 0 4px 6px -4px rgb(0 0 0 / .1); --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / .1), 0 8px 10px -6px rgb(0 0 0 / .1); --shadow-2xl: 0 25px 50px -12px rgb(0 0 0 / .25); --inset-shadow-2xs: inset 0 1px rgb(0 0 0 / .05); --inset-shadow-xs: inset 0 1px 1px rgb(0 0 0 / .05); --inset-shadow-sm: inset 0 2px 4px rgb(0 0 0 / .05); --drop-shadow-xs: 0 1px 1px rgb(0 0 0 / .05); --drop-shadow-sm: 0 1px 2px rgb(0 0 0 / .15); --drop-shadow-md: 0 3px 3px rgb(0 0 0 / .12); --drop-shadow-lg: 0 4px 4px rgb(0 0 0 / .15); --drop-shadow-xl: 0 9px 7px rgb(0 0 0 / .1); --drop-shadow-2xl: 0 25px 25px rgb(0 0 0 / .15); --text-shadow-2xs: 0px 1px 0px rgb(0 0 0 / .15); --text-shadow-xs: 0px 1px 1px rgb(0 0 0 / .2); --text-shadow-sm: 0px 1px 0px rgb(0 0 0 / .075), 0px 1px 1px rgb(0 0 0 / .075), 0px 2px 2px rgb(0 0 0 / .075); --text-shadow-md: 0px 1px 1px rgb(0 0 0 / .1), 0px 1px 2px rgb(0 0 0 / .1), 0px 2px 4px rgb(0 0 0 / .1); --text-shadow-lg: 0px 1px 2px rgb(0 0 0 / .1), 0px 3px 2px rgb(0 0 0 / .1), 0px 4px 8px rgb(0 0 0 / .1); --ease-in: cubic-bezier(.4, 0, 1, 1); --ease-out: cubic-bezier(0, 0, .2, 1); --ease-in-out: cubic-bezier(.4, 0, .2, 1); --animate-spin: spin 1s linear infinite; --animate-ping: ping 1s cubic-bezier(0, 0, .2, 1) infinite; --animate-pulse: pulse 2s cubic-bezier(.4, 0, .6, 1) infinite; --animate-bounce: bounce 1s infinite; @keyframes spin { to { transform: rotate(360deg); } } @keyframes ping { 75%, 100% { transform: scale(2); opacity: 0; } } @keyframes pulse { 50% { opacity: .5; } } @keyframes bounce { 0%, 100% { transform: translateY(-25%); animation-timing-function: cubic-bezier(.8, 0, 1, 1); } 50% { transform: none; animation-timing-function: cubic-bezier(0, 0, .2, 1); } } --blur-xs: 4px; --blur-sm: 8px; --blur-md: 12px; --blur-lg: 16px; --blur-xl: 24px; --blur-2xl: 40px; --blur-3xl: 64px; --perspective-dramatic: 100px; --perspective-near: 300px; --perspective-normal: 500px; --perspective-midrange: 800px; --perspective-distant: 1200px; --aspect-video: 16 / 9; --default-transition-duration: .15s; --default-transition-timing-function: cubic-bezier(.4, 0, .2, 1); --default-font-family: --theme(--font-sans, initial); --default-font-feature-settings: --theme( --font-sans--font-feature-settings, initial ); --default-font-variation-settings: --theme( --font-sans--font-variation-settings, initial ); --default-mono-font-family: --theme(--font-mono, initial); --default-mono-font-feature-settings: --theme( --font-mono--font-feature-settings, initial ); --default-mono-font-variation-settings: --theme( --font-mono--font-variation-settings, initial ); }@theme default inline reference{ --blur: 8px; --shadow: 0 1px 3px 0 rgb(0 0 0 / .1), 0 1px 2px -1px rgb(0 0 0 / .1); --shadow-inner: inset 0 2px 4px 0 rgb(0 0 0 / .05); --drop-shadow: 0 1px 2px rgb(0 0 0 / .1), 0 1px 1px rgb(0 0 0 / .06); --radius: .25rem; --max-width-prose: 65ch; }}@layer base{*,:after,:before,::backdrop,::file-selector-button{box-sizing:border-box;margin:0;padding:0;border:0 solid}html,:host{line-height:1.5;-webkit-text-size-adjust:100%;tab-size:4;font-family:--theme(--default-font-family,ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji");font-feature-settings:--theme(--default-font-feature-settings,normal);font-variation-settings:--theme(--default-font-variation-settings,normal);-webkit-tap-highlight-color:transparent}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:--theme(--default-mono-font-family,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace);font-feature-settings:--theme(--default-mono-font-feature-settings,normal);font-variation-settings:--theme(--default-mono-font-variation-settings,normal);font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}:-moz-focusring{outline:auto}progress{vertical-align:baseline}summary{display:list-item}ol,ul,menu{list-style:none}img,svg,video,canvas,audio,iframe,embed,object{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}button,input,select,optgroup,textarea,::file-selector-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;border-radius:0;background-color:transparent;opacity:1}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::file-selector-button{margin-inline-end:4px}::placeholder{opacity:1}@supports (not (-webkit-appearance: -apple-pay-button)) or (contain-intrinsic-size: 1px){::placeholder{color:color-mix(in oklab,currentcolor 50%,transparent)}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit,::-webkit-datetime-edit-year-field,::-webkit-datetime-edit-month-field,::-webkit-datetime-edit-day-field,::-webkit-datetime-edit-hour-field,::-webkit-datetime-edit-minute-field,::-webkit-datetime-edit-second-field,::-webkit-datetime-edit-millisecond-field,::-webkit-datetime-edit-meridiem-field{padding-block:0}::-webkit-calendar-picker-indicator{line-height:1}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]),::file-selector-button{appearance:button}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}}@layer utilities{@tailwind utilities;}@source "../**/*.{ts,tsx,js,jsx}";@layer base{:host{all:initial;color-scheme:light;font-family:ui-sans-serif,system-ui,-apple-system,Segoe UI,Roboto,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-rendering:optimizeLegibility}*,*:before,*:after{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}*,*:before,*:after{box-sizing:border-box}button{font-family:inherit;cursor:pointer}button:disabled{cursor:not-allowed}[role=button],[role=radio]{cursor:pointer}}.pw-cta-shimmer:before{content:"";position:absolute;top:0;left:-100%;width:100%;height:100%;background:linear-gradient(90deg,transparent,rgba(255,255,255,.35) 50%,transparent);animation:pw-cta-shimmer 3s infinite;z-index:1}@keyframes pw-cta-shimmer{0%{left:-100%}to{left:100%}}';
7
- let he = !1;
8
- function We() {
9
- if (he || (he = !0, typeof CSS > "u" || typeof CSS.registerProperty != "function")) return;
1
+ import { P as L, B as qe, E as Ne, c as Fe, A as de, w as Ve, a as Q, r as $e, b as He } from "./chunks/chrome-port-bfTUUDz_.js";
2
+ import { render as ee, h as he, createContext as Ge } from "preact";
3
+ import { jsx as o, jsxs as u, Fragment as le } from "preact/jsx-runtime";
4
+ import { useState as k, useEffect as P, useContext as We, useRef as U, useMemo as Ze, useLayoutEffect as Ye } from "preact/hooks";
5
+ import { P as Ke } from "./chunks/port-name-ervLBWAQ.js";
6
+ function Xe(r) {
7
+ return `pw-offer-${r}-start`;
8
+ }
9
+ function Ce(r, e) {
10
+ if (!r || r.length === 0) return null;
11
+ const t = r.find(
12
+ (i) => i.price_id === e && (i.discount_percent ?? 0) > 0
13
+ );
14
+ return t || (r.find(
15
+ (i) => i.price_id == null && (i.discount_percent ?? 0) > 0
16
+ ) ?? null);
17
+ }
18
+ function $(r, e, t = {}) {
19
+ const n = Ce(r, e);
20
+ return n && Ie(n, t) ? n : null;
21
+ }
22
+ function Ie(r, e = {}) {
23
+ const t = r.discount_percent ?? 0;
24
+ if (t <= 0) return null;
25
+ const n = e.now ?? Date.now(), i = Je(r, e.readStart), s = Qe(r, i), a = i !== null ? Math.max(0, i - n) : null;
26
+ return i !== null && i <= n ? null : { offer: r, discountPercent: t, remainingMs: a, totalMs: s, expiresAt: i };
27
+ }
28
+ function Je(r, e) {
29
+ if (r.expires_at) {
30
+ const t = Date.parse(r.expires_at);
31
+ return Number.isFinite(t) ? t : null;
32
+ }
33
+ if (r.duration_minutes && r.duration_minutes > 0 && e) {
34
+ const t = e(r.id);
35
+ if (!t) return null;
36
+ const n = Date.parse(t);
37
+ return Number.isFinite(n) ? n + r.duration_minutes * 6e4 : null;
38
+ }
39
+ return null;
40
+ }
41
+ function Qe(r, e) {
42
+ return r.duration_minutes && r.duration_minutes > 0 ? r.duration_minutes * 6e4 : e !== null ? e - Date.now() : null;
43
+ }
44
+ function N(r) {
45
+ if (typeof window > "u") return null;
46
+ try {
47
+ return window.localStorage.getItem(Xe(r));
48
+ } catch {
49
+ return null;
50
+ }
51
+ }
52
+ const Ae = '@layer theme,base,components,utilities;@layer theme{@theme default{ --font-sans: ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"; --font-serif: ui-serif, Georgia, Cambria, "Times New Roman", Times, serif; --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace; --color-red-50: oklch(97.1% .013 17.38); --color-red-100: oklch(93.6% .032 17.717); --color-red-200: oklch(88.5% .062 18.334); --color-red-300: oklch(80.8% .114 19.571); --color-red-400: oklch(70.4% .191 22.216); --color-red-500: oklch(63.7% .237 25.331); --color-red-600: oklch(57.7% .245 27.325); --color-red-700: oklch(50.5% .213 27.518); --color-red-800: oklch(44.4% .177 26.899); --color-red-900: oklch(39.6% .141 25.723); --color-red-950: oklch(25.8% .092 26.042); --color-orange-50: oklch(98% .016 73.684); --color-orange-100: oklch(95.4% .038 75.164); --color-orange-200: oklch(90.1% .076 70.697); --color-orange-300: oklch(83.7% .128 66.29); --color-orange-400: oklch(75% .183 55.934); --color-orange-500: oklch(70.5% .213 47.604); --color-orange-600: oklch(64.6% .222 41.116); --color-orange-700: oklch(55.3% .195 38.402); --color-orange-800: oklch(47% .157 37.304); --color-orange-900: oklch(40.8% .123 38.172); --color-orange-950: oklch(26.6% .079 36.259); --color-amber-50: oklch(98.7% .022 95.277); --color-amber-100: oklch(96.2% .059 95.617); --color-amber-200: oklch(92.4% .12 95.746); --color-amber-300: oklch(87.9% .169 91.605); --color-amber-400: oklch(82.8% .189 84.429); --color-amber-500: oklch(76.9% .188 70.08); --color-amber-600: oklch(66.6% .179 58.318); --color-amber-700: oklch(55.5% .163 48.998); --color-amber-800: oklch(47.3% .137 46.201); --color-amber-900: oklch(41.4% .112 45.904); --color-amber-950: oklch(27.9% .077 45.635); --color-yellow-50: oklch(98.7% .026 102.212); --color-yellow-100: oklch(97.3% .071 103.193); --color-yellow-200: oklch(94.5% .129 101.54); --color-yellow-300: oklch(90.5% .182 98.111); --color-yellow-400: oklch(85.2% .199 91.936); --color-yellow-500: oklch(79.5% .184 86.047); --color-yellow-600: oklch(68.1% .162 75.834); --color-yellow-700: oklch(55.4% .135 66.442); --color-yellow-800: oklch(47.6% .114 61.907); --color-yellow-900: oklch(42.1% .095 57.708); --color-yellow-950: oklch(28.6% .066 53.813); --color-lime-50: oklch(98.6% .031 120.757); --color-lime-100: oklch(96.7% .067 122.328); --color-lime-200: oklch(93.8% .127 124.321); --color-lime-300: oklch(89.7% .196 126.665); --color-lime-400: oklch(84.1% .238 128.85); --color-lime-500: oklch(76.8% .233 130.85); --color-lime-600: oklch(64.8% .2 131.684); --color-lime-700: oklch(53.2% .157 131.589); --color-lime-800: oklch(45.3% .124 130.933); --color-lime-900: oklch(40.5% .101 131.063); --color-lime-950: oklch(27.4% .072 132.109); --color-green-50: oklch(98.2% .018 155.826); --color-green-100: oklch(96.2% .044 156.743); --color-green-200: oklch(92.5% .084 155.995); --color-green-300: oklch(87.1% .15 154.449); --color-green-400: oklch(79.2% .209 151.711); --color-green-500: oklch(72.3% .219 149.579); --color-green-600: oklch(62.7% .194 149.214); --color-green-700: oklch(52.7% .154 150.069); --color-green-800: oklch(44.8% .119 151.328); --color-green-900: oklch(39.3% .095 152.535); --color-green-950: oklch(26.6% .065 152.934); --color-emerald-50: oklch(97.9% .021 166.113); --color-emerald-100: oklch(95% .052 163.051); --color-emerald-200: oklch(90.5% .093 164.15); --color-emerald-300: oklch(84.5% .143 164.978); --color-emerald-400: oklch(76.5% .177 163.223); --color-emerald-500: oklch(69.6% .17 162.48); --color-emerald-600: oklch(59.6% .145 163.225); --color-emerald-700: oklch(50.8% .118 165.612); --color-emerald-800: oklch(43.2% .095 166.913); --color-emerald-900: oklch(37.8% .077 168.94); --color-emerald-950: oklch(26.2% .051 172.552); --color-teal-50: oklch(98.4% .014 180.72); --color-teal-100: oklch(95.3% .051 180.801); --color-teal-200: oklch(91% .096 180.426); --color-teal-300: oklch(85.5% .138 181.071); --color-teal-400: oklch(77.7% .152 181.912); --color-teal-500: oklch(70.4% .14 182.503); --color-teal-600: oklch(60% .118 184.704); --color-teal-700: oklch(51.1% .096 186.391); --color-teal-800: oklch(43.7% .078 188.216); --color-teal-900: oklch(38.6% .063 188.416); --color-teal-950: oklch(27.7% .046 192.524); --color-cyan-50: oklch(98.4% .019 200.873); --color-cyan-100: oklch(95.6% .045 203.388); --color-cyan-200: oklch(91.7% .08 205.041); --color-cyan-300: oklch(86.5% .127 207.078); --color-cyan-400: oklch(78.9% .154 211.53); --color-cyan-500: oklch(71.5% .143 215.221); --color-cyan-600: oklch(60.9% .126 221.723); --color-cyan-700: oklch(52% .105 223.128); --color-cyan-800: oklch(45% .085 224.283); --color-cyan-900: oklch(39.8% .07 227.392); --color-cyan-950: oklch(30.2% .056 229.695); --color-sky-50: oklch(97.7% .013 236.62); --color-sky-100: oklch(95.1% .026 236.824); --color-sky-200: oklch(90.1% .058 230.902); --color-sky-300: oklch(82.8% .111 230.318); --color-sky-400: oklch(74.6% .16 232.661); --color-sky-500: oklch(68.5% .169 237.323); --color-sky-600: oklch(58.8% .158 241.966); --color-sky-700: oklch(50% .134 242.749); --color-sky-800: oklch(44.3% .11 240.79); --color-sky-900: oklch(39.1% .09 240.876); --color-sky-950: oklch(29.3% .066 243.157); --color-blue-50: oklch(97% .014 254.604); --color-blue-100: oklch(93.2% .032 255.585); --color-blue-200: oklch(88.2% .059 254.128); --color-blue-300: oklch(80.9% .105 251.813); --color-blue-400: oklch(70.7% .165 254.624); --color-blue-500: oklch(62.3% .214 259.815); --color-blue-600: oklch(54.6% .245 262.881); --color-blue-700: oklch(48.8% .243 264.376); --color-blue-800: oklch(42.4% .199 265.638); --color-blue-900: oklch(37.9% .146 265.522); --color-blue-950: oklch(28.2% .091 267.935); --color-indigo-50: oklch(96.2% .018 272.314); --color-indigo-100: oklch(93% .034 272.788); --color-indigo-200: oklch(87% .065 274.039); --color-indigo-300: oklch(78.5% .115 274.713); --color-indigo-400: oklch(67.3% .182 276.935); --color-indigo-500: oklch(58.5% .233 277.117); --color-indigo-600: oklch(51.1% .262 276.966); --color-indigo-700: oklch(45.7% .24 277.023); --color-indigo-800: oklch(39.8% .195 277.366); --color-indigo-900: oklch(35.9% .144 278.697); --color-indigo-950: oklch(25.7% .09 281.288); --color-violet-50: oklch(96.9% .016 293.756); --color-violet-100: oklch(94.3% .029 294.588); --color-violet-200: oklch(89.4% .057 293.283); --color-violet-300: oklch(81.1% .111 293.571); --color-violet-400: oklch(70.2% .183 293.541); --color-violet-500: oklch(60.6% .25 292.717); --color-violet-600: oklch(54.1% .281 293.009); --color-violet-700: oklch(49.1% .27 292.581); --color-violet-800: oklch(43.2% .232 292.759); --color-violet-900: oklch(38% .189 293.745); --color-violet-950: oklch(28.3% .141 291.089); --color-purple-50: oklch(97.7% .014 308.299); --color-purple-100: oklch(94.6% .033 307.174); --color-purple-200: oklch(90.2% .063 306.703); --color-purple-300: oklch(82.7% .119 306.383); --color-purple-400: oklch(71.4% .203 305.504); --color-purple-500: oklch(62.7% .265 303.9); --color-purple-600: oklch(55.8% .288 302.321); --color-purple-700: oklch(49.6% .265 301.924); --color-purple-800: oklch(43.8% .218 303.724); --color-purple-900: oklch(38.1% .176 304.987); --color-purple-950: oklch(29.1% .149 302.717); --color-fuchsia-50: oklch(97.7% .017 320.058); --color-fuchsia-100: oklch(95.2% .037 318.852); --color-fuchsia-200: oklch(90.3% .076 319.62); --color-fuchsia-300: oklch(83.3% .145 321.434); --color-fuchsia-400: oklch(74% .238 322.16); --color-fuchsia-500: oklch(66.7% .295 322.15); --color-fuchsia-600: oklch(59.1% .293 322.896); --color-fuchsia-700: oklch(51.8% .253 323.949); --color-fuchsia-800: oklch(45.2% .211 324.591); --color-fuchsia-900: oklch(40.1% .17 325.612); --color-fuchsia-950: oklch(29.3% .136 325.661); --color-pink-50: oklch(97.1% .014 343.198); --color-pink-100: oklch(94.8% .028 342.258); --color-pink-200: oklch(89.9% .061 343.231); --color-pink-300: oklch(82.3% .12 346.018); --color-pink-400: oklch(71.8% .202 349.761); --color-pink-500: oklch(65.6% .241 354.308); --color-pink-600: oklch(59.2% .249 .584); --color-pink-700: oklch(52.5% .223 3.958); --color-pink-800: oklch(45.9% .187 3.815); --color-pink-900: oklch(40.8% .153 2.432); --color-pink-950: oklch(28.4% .109 3.907); --color-rose-50: oklch(96.9% .015 12.422); --color-rose-100: oklch(94.1% .03 12.58); --color-rose-200: oklch(89.2% .058 10.001); --color-rose-300: oklch(81% .117 11.638); --color-rose-400: oklch(71.2% .194 13.428); --color-rose-500: oklch(64.5% .246 16.439); --color-rose-600: oklch(58.6% .253 17.585); --color-rose-700: oklch(51.4% .222 16.935); --color-rose-800: oklch(45.5% .188 13.697); --color-rose-900: oklch(41% .159 10.272); --color-rose-950: oklch(27.1% .105 12.094); --color-slate-50: oklch(98.4% .003 247.858); --color-slate-100: oklch(96.8% .007 247.896); --color-slate-200: oklch(92.9% .013 255.508); --color-slate-300: oklch(86.9% .022 252.894); --color-slate-400: oklch(70.4% .04 256.788); --color-slate-500: oklch(55.4% .046 257.417); --color-slate-600: oklch(44.6% .043 257.281); --color-slate-700: oklch(37.2% .044 257.287); --color-slate-800: oklch(27.9% .041 260.031); --color-slate-900: oklch(20.8% .042 265.755); --color-slate-950: oklch(12.9% .042 264.695); --color-gray-50: oklch(98.5% .002 247.839); --color-gray-100: oklch(96.7% .003 264.542); --color-gray-200: oklch(92.8% .006 264.531); --color-gray-300: oklch(87.2% .01 258.338); --color-gray-400: oklch(70.7% .022 261.325); --color-gray-500: oklch(55.1% .027 264.364); --color-gray-600: oklch(44.6% .03 256.802); --color-gray-700: oklch(37.3% .034 259.733); --color-gray-800: oklch(27.8% .033 256.848); --color-gray-900: oklch(21% .034 264.665); --color-gray-950: oklch(13% .028 261.692); --color-zinc-50: oklch(98.5% 0 0); --color-zinc-100: oklch(96.7% .001 286.375); --color-zinc-200: oklch(92% .004 286.32); --color-zinc-300: oklch(87.1% .006 286.286); --color-zinc-400: oklch(70.5% .015 286.067); --color-zinc-500: oklch(55.2% .016 285.938); --color-zinc-600: oklch(44.2% .017 285.786); --color-zinc-700: oklch(37% .013 285.805); --color-zinc-800: oklch(27.4% .006 286.033); --color-zinc-900: oklch(21% .006 285.885); --color-zinc-950: oklch(14.1% .005 285.823); --color-neutral-50: oklch(98.5% 0 0); --color-neutral-100: oklch(97% 0 0); --color-neutral-200: oklch(92.2% 0 0); --color-neutral-300: oklch(87% 0 0); --color-neutral-400: oklch(70.8% 0 0); --color-neutral-500: oklch(55.6% 0 0); --color-neutral-600: oklch(43.9% 0 0); --color-neutral-700: oklch(37.1% 0 0); --color-neutral-800: oklch(26.9% 0 0); --color-neutral-900: oklch(20.5% 0 0); --color-neutral-950: oklch(14.5% 0 0); --color-stone-50: oklch(98.5% .001 106.423); --color-stone-100: oklch(97% .001 106.424); --color-stone-200: oklch(92.3% .003 48.717); --color-stone-300: oklch(86.9% .005 56.366); --color-stone-400: oklch(70.9% .01 56.259); --color-stone-500: oklch(55.3% .013 58.071); --color-stone-600: oklch(44.4% .011 73.639); --color-stone-700: oklch(37.4% .01 67.558); --color-stone-800: oklch(26.8% .007 34.298); --color-stone-900: oklch(21.6% .006 56.043); --color-stone-950: oklch(14.7% .004 49.25); --color-mauve-50: oklch(98.5% 0 0); --color-mauve-100: oklch(96% .003 325.6); --color-mauve-200: oklch(92.2% .005 325.62); --color-mauve-300: oklch(86.5% .012 325.68); --color-mauve-400: oklch(71.1% .019 323.02); --color-mauve-500: oklch(54.2% .034 322.5); --color-mauve-600: oklch(43.5% .029 321.78); --color-mauve-700: oklch(36.4% .029 323.89); --color-mauve-800: oklch(26.3% .024 320.12); --color-mauve-900: oklch(21.2% .019 322.12); --color-mauve-950: oklch(14.5% .008 326); --color-olive-50: oklch(98.8% .003 106.5); --color-olive-100: oklch(96.6% .005 106.5); --color-olive-200: oklch(93% .007 106.5); --color-olive-300: oklch(88% .011 106.6); --color-olive-400: oklch(73.7% .021 106.9); --color-olive-500: oklch(58% .031 107.3); --color-olive-600: oklch(46.6% .025 107.3); --color-olive-700: oklch(39.4% .023 107.4); --color-olive-800: oklch(28.6% .016 107.4); --color-olive-900: oklch(22.8% .013 107.4); --color-olive-950: oklch(15.3% .006 107.1); --color-mist-50: oklch(98.7% .002 197.1); --color-mist-100: oklch(96.3% .002 197.1); --color-mist-200: oklch(92.5% .005 214.3); --color-mist-300: oklch(87.2% .007 219.6); --color-mist-400: oklch(72.3% .014 214.4); --color-mist-500: oklch(56% .021 213.5); --color-mist-600: oklch(45% .017 213.2); --color-mist-700: oklch(37.8% .015 216); --color-mist-800: oklch(27.5% .011 216.9); --color-mist-900: oklch(21.8% .008 223.9); --color-mist-950: oklch(14.8% .004 228.8); --color-taupe-50: oklch(98.6% .002 67.8); --color-taupe-100: oklch(96% .002 17.2); --color-taupe-200: oklch(92.2% .005 34.3); --color-taupe-300: oklch(86.8% .007 39.5); --color-taupe-400: oklch(71.4% .014 41.2); --color-taupe-500: oklch(54.7% .021 43.1); --color-taupe-600: oklch(43.8% .017 39.3); --color-taupe-700: oklch(36.7% .016 35.7); --color-taupe-800: oklch(26.8% .011 36.5); --color-taupe-900: oklch(21.4% .009 43.1); --color-taupe-950: oklch(14.7% .004 49.3); --color-black: #000; --color-white: #fff; --spacing: .25rem; --breakpoint-sm: 40rem; --breakpoint-md: 48rem; --breakpoint-lg: 64rem; --breakpoint-xl: 80rem; --breakpoint-2xl: 96rem; --container-3xs: 16rem; --container-2xs: 18rem; --container-xs: 20rem; --container-sm: 24rem; --container-md: 28rem; --container-lg: 32rem; --container-xl: 36rem; --container-2xl: 42rem; --container-3xl: 48rem; --container-4xl: 56rem; --container-5xl: 64rem; --container-6xl: 72rem; --container-7xl: 80rem; --text-xs: .75rem; --text-xs--line-height: calc(1 / .75); --text-sm: .875rem; --text-sm--line-height: calc(1.25 / .875); --text-base: 1rem; --text-base--line-height: 1.5 ; --text-lg: 1.125rem; --text-lg--line-height: calc(1.75 / 1.125); --text-xl: 1.25rem; --text-xl--line-height: calc(1.75 / 1.25); --text-2xl: 1.5rem; --text-2xl--line-height: calc(2 / 1.5); --text-3xl: 1.875rem; --text-3xl--line-height: 1.2 ; --text-4xl: 2.25rem; --text-4xl--line-height: calc(2.5 / 2.25); --text-5xl: 3rem; --text-5xl--line-height: 1; --text-6xl: 3.75rem; --text-6xl--line-height: 1; --text-7xl: 4.5rem; --text-7xl--line-height: 1; --text-8xl: 6rem; --text-8xl--line-height: 1; --text-9xl: 8rem; --text-9xl--line-height: 1; --font-weight-thin: 100; --font-weight-extralight: 200; --font-weight-light: 300; --font-weight-normal: 400; --font-weight-medium: 500; --font-weight-semibold: 600; --font-weight-bold: 700; --font-weight-extrabold: 800; --font-weight-black: 900; --tracking-tighter: -.05em; --tracking-tight: -.025em; --tracking-normal: 0em; --tracking-wide: .025em; --tracking-wider: .05em; --tracking-widest: .1em; --leading-tight: 1.25; --leading-snug: 1.375; --leading-normal: 1.5; --leading-relaxed: 1.625; --leading-loose: 2; --radius-xs: .125rem; --radius-sm: .25rem; --radius-md: .375rem; --radius-lg: .5rem; --radius-xl: .75rem; --radius-2xl: 1rem; --radius-3xl: 1.5rem; --radius-4xl: 2rem; --shadow-2xs: 0 1px rgb(0 0 0 / .05); --shadow-xs: 0 1px 2px 0 rgb(0 0 0 / .05); --shadow-sm: 0 1px 3px 0 rgb(0 0 0 / .1), 0 1px 2px -1px rgb(0 0 0 / .1); --shadow-md: 0 4px 6px -1px rgb(0 0 0 / .1), 0 2px 4px -2px rgb(0 0 0 / .1); --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / .1), 0 4px 6px -4px rgb(0 0 0 / .1); --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / .1), 0 8px 10px -6px rgb(0 0 0 / .1); --shadow-2xl: 0 25px 50px -12px rgb(0 0 0 / .25); --inset-shadow-2xs: inset 0 1px rgb(0 0 0 / .05); --inset-shadow-xs: inset 0 1px 1px rgb(0 0 0 / .05); --inset-shadow-sm: inset 0 2px 4px rgb(0 0 0 / .05); --drop-shadow-xs: 0 1px 1px rgb(0 0 0 / .05); --drop-shadow-sm: 0 1px 2px rgb(0 0 0 / .15); --drop-shadow-md: 0 3px 3px rgb(0 0 0 / .12); --drop-shadow-lg: 0 4px 4px rgb(0 0 0 / .15); --drop-shadow-xl: 0 9px 7px rgb(0 0 0 / .1); --drop-shadow-2xl: 0 25px 25px rgb(0 0 0 / .15); --text-shadow-2xs: 0px 1px 0px rgb(0 0 0 / .15); --text-shadow-xs: 0px 1px 1px rgb(0 0 0 / .2); --text-shadow-sm: 0px 1px 0px rgb(0 0 0 / .075), 0px 1px 1px rgb(0 0 0 / .075), 0px 2px 2px rgb(0 0 0 / .075); --text-shadow-md: 0px 1px 1px rgb(0 0 0 / .1), 0px 1px 2px rgb(0 0 0 / .1), 0px 2px 4px rgb(0 0 0 / .1); --text-shadow-lg: 0px 1px 2px rgb(0 0 0 / .1), 0px 3px 2px rgb(0 0 0 / .1), 0px 4px 8px rgb(0 0 0 / .1); --ease-in: cubic-bezier(.4, 0, 1, 1); --ease-out: cubic-bezier(0, 0, .2, 1); --ease-in-out: cubic-bezier(.4, 0, .2, 1); --animate-spin: spin 1s linear infinite; --animate-ping: ping 1s cubic-bezier(0, 0, .2, 1) infinite; --animate-pulse: pulse 2s cubic-bezier(.4, 0, .6, 1) infinite; --animate-bounce: bounce 1s infinite; @keyframes spin { to { transform: rotate(360deg); } } @keyframes ping { 75%, 100% { transform: scale(2); opacity: 0; } } @keyframes pulse { 50% { opacity: .5; } } @keyframes bounce { 0%, 100% { transform: translateY(-25%); animation-timing-function: cubic-bezier(.8, 0, 1, 1); } 50% { transform: none; animation-timing-function: cubic-bezier(0, 0, .2, 1); } } --blur-xs: 4px; --blur-sm: 8px; --blur-md: 12px; --blur-lg: 16px; --blur-xl: 24px; --blur-2xl: 40px; --blur-3xl: 64px; --perspective-dramatic: 100px; --perspective-near: 300px; --perspective-normal: 500px; --perspective-midrange: 800px; --perspective-distant: 1200px; --aspect-video: 16 / 9; --default-transition-duration: .15s; --default-transition-timing-function: cubic-bezier(.4, 0, .2, 1); --default-font-family: --theme(--font-sans, initial); --default-font-feature-settings: --theme( --font-sans--font-feature-settings, initial ); --default-font-variation-settings: --theme( --font-sans--font-variation-settings, initial ); --default-mono-font-family: --theme(--font-mono, initial); --default-mono-font-feature-settings: --theme( --font-mono--font-feature-settings, initial ); --default-mono-font-variation-settings: --theme( --font-mono--font-variation-settings, initial ); }@theme default inline reference{ --blur: 8px; --shadow: 0 1px 3px 0 rgb(0 0 0 / .1), 0 1px 2px -1px rgb(0 0 0 / .1); --shadow-inner: inset 0 2px 4px 0 rgb(0 0 0 / .05); --drop-shadow: 0 1px 2px rgb(0 0 0 / .1), 0 1px 1px rgb(0 0 0 / .06); --radius: .25rem; --max-width-prose: 65ch; }}@layer base{*,:after,:before,::backdrop,::file-selector-button{box-sizing:border-box;margin:0;padding:0;border:0 solid}html,:host{line-height:1.5;-webkit-text-size-adjust:100%;tab-size:4;font-family:--theme(--default-font-family,ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji");font-feature-settings:--theme(--default-font-feature-settings,normal);font-variation-settings:--theme(--default-font-variation-settings,normal);-webkit-tap-highlight-color:transparent}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:--theme(--default-mono-font-family,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace);font-feature-settings:--theme(--default-mono-font-feature-settings,normal);font-variation-settings:--theme(--default-mono-font-variation-settings,normal);font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}:-moz-focusring{outline:auto}progress{vertical-align:baseline}summary{display:list-item}ol,ul,menu{list-style:none}img,svg,video,canvas,audio,iframe,embed,object{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}button,input,select,optgroup,textarea,::file-selector-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;border-radius:0;background-color:transparent;opacity:1}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::file-selector-button{margin-inline-end:4px}::placeholder{opacity:1}@supports (not (-webkit-appearance: -apple-pay-button)) or (contain-intrinsic-size: 1px){::placeholder{color:color-mix(in oklab,currentcolor 50%,transparent)}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit,::-webkit-datetime-edit-year-field,::-webkit-datetime-edit-month-field,::-webkit-datetime-edit-day-field,::-webkit-datetime-edit-hour-field,::-webkit-datetime-edit-minute-field,::-webkit-datetime-edit-second-field,::-webkit-datetime-edit-millisecond-field,::-webkit-datetime-edit-meridiem-field{padding-block:0}::-webkit-calendar-picker-indicator{line-height:1}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]),::file-selector-button{appearance:button}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}}@layer utilities{@tailwind utilities;}@source "../**/*.{ts,tsx,js,jsx}";@layer base{:host{all:initial;color-scheme:light;font-family:ui-sans-serif,system-ui,-apple-system,Segoe UI,Roboto,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-rendering:optimizeLegibility}*,*:before,*:after{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}*,*:before,*:after{box-sizing:border-box}button{font-family:inherit;cursor:pointer}button:disabled{cursor:not-allowed}[role=button],[role=radio]{cursor:pointer}}.pw-cta-shimmer:before{content:"";position:absolute;top:0;left:-100%;width:100%;height:100%;background:linear-gradient(90deg,transparent,rgba(255,255,255,.35) 50%,transparent);animation:pw-cta-shimmer 3s infinite;z-index:1}@keyframes pw-cta-shimmer{0%{left:-100%}to{left:100%}}';
53
+ let pe = !1;
54
+ function et() {
55
+ if (pe || (pe = !0, typeof CSS > "u" || typeof CSS.registerProperty != "function")) return;
10
56
  let r;
11
57
  try {
12
58
  const e = new CSSStyleSheet();
13
- e.replaceSync(Se), r = e.cssRules;
59
+ e.replaceSync(Ae), r = e.cssRules;
14
60
  } catch {
15
61
  return;
16
62
  }
@@ -28,10 +74,10 @@ function We() {
28
74
  }
29
75
  }
30
76
  }
31
- function Ze(r, e, t = {}) {
77
+ function tt(r, e, t = {}) {
32
78
  if (typeof document > "u")
33
79
  throw new Error("mountShadow called in non-DOM environment");
34
- We();
80
+ et();
35
81
  const n = t.host ?? document.createElement("div");
36
82
  n.setAttribute("data-paywall-host", ""), n.style.cssText = t.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 && !t.inline && document.body.appendChild(n);
37
83
  const i = n.attachShadow({ mode: t.shadowMode ?? "closed" }), s = `
@@ -53,21 +99,21 @@ function Ze(r, e, t = {}) {
53
99
  visibility: visible !important;
54
100
  }
55
101
  `, a = document.createElement("style");
56
- a.textContent = s + Se + (t.injectCss ?? ""), i.appendChild(a);
102
+ a.textContent = s + Ae + (t.injectCss ?? ""), i.appendChild(a);
57
103
  const l = document.createElement("div");
58
104
  l.style.pointerEvents = "auto", i.appendChild(l);
59
- let d = e;
60
- return X(de(r, d), l), {
105
+ let c = e;
106
+ return ee(he(r, c), l), {
61
107
  shadowRoot: i,
62
- update(p) {
63
- d = { ...d, ...p }, X(de(r, d), l);
108
+ update(h) {
109
+ c = { ...c, ...h }, ee(he(r, c), l);
64
110
  },
65
111
  unmount() {
66
- X(null, l), n.remove();
112
+ ee(null, l), n.remove();
67
113
  }
68
114
  };
69
115
  }
70
- const Ye = (r, e, t) => {
116
+ const rt = (r, e, t) => {
71
117
  const n = r[e];
72
118
  return n ? typeof n == "function" ? n() : Promise.resolve(n) : new Promise((i, s) => {
73
119
  (typeof queueMicrotask == "function" ? queueMicrotask : setTimeout)(
@@ -79,7 +125,7 @@ const Ye = (r, e, t) => {
79
125
  )
80
126
  );
81
127
  });
82
- }, Ke = [
128
+ }, nt = [
83
129
  "ru",
84
130
  "uk",
85
131
  "de",
@@ -107,19 +153,19 @@ const Ye = (r, e, t) => {
107
153
  "th",
108
154
  "vi",
109
155
  "he"
110
- ], Ce = (r, e, t) => Le(e, t), Ie = Ve({ t: Ce, locale: "en" });
111
- function Le(r, e) {
156
+ ], Le = (r, e, t) => Te(e, t), Me = Ge({ t: Le, locale: "en" });
157
+ function Te(r, e) {
112
158
  if (!e) return r;
113
159
  let t = r;
114
160
  for (const [n, i] of Object.entries(e))
115
161
  t = t.split(`{${n}}`).join(String(i));
116
162
  return t;
117
163
  }
118
- const J = /* @__PURE__ */ new Map(), Q = /* @__PURE__ */ new Map();
119
- function Ae(r) {
120
- return Ke.includes(r);
164
+ const te = /* @__PURE__ */ new Map(), re = /* @__PURE__ */ new Map();
165
+ function Be(r) {
166
+ return nt.includes(r);
121
167
  }
122
- function Xe(r) {
168
+ function it(r) {
123
169
  const e = [];
124
170
  if (typeof navigator < "u" && navigator.language) {
125
171
  e.push(navigator.language);
@@ -133,56 +179,60 @@ function Xe(r) {
133
179
  n && n !== t && e.push(n);
134
180
  }
135
181
  for (const n of e)
136
- if (Ae(n)) return n;
182
+ if (Be(n)) return n;
137
183
  return null;
138
184
  }
139
- function Je(r) {
140
- return !!r.locales && Object.keys(r.locales).length > 0;
185
+ function ot(r, e) {
186
+ return !!r.locales && r.locales[e] !== void 0;
141
187
  }
142
- async function Qe(r) {
143
- const e = J.get(r);
188
+ async function st(r) {
189
+ const e = te.get(r);
144
190
  if (e) return e;
145
- const t = Q.get(r);
191
+ const t = re.get(r);
146
192
  if (t) return t;
147
- const n = Ye(/* @__PURE__ */ Object.assign({ "./locales/ar.ts": () => import("./chunks/ar-nh4l4WDE.js"), "./locales/cs.ts": () => import("./chunks/cs-2UYO2rWf.js"), "./locales/da.ts": () => import("./chunks/da-BD0O_HfV.js"), "./locales/de.ts": () => import("./chunks/de-BkCiXPsn.js"), "./locales/el.ts": () => import("./chunks/el-cIcxTp07.js"), "./locales/es.ts": () => import("./chunks/es-CJBC_jrV.js"), "./locales/fi.ts": () => import("./chunks/fi-DyV7ynBf.js"), "./locales/fr.ts": () => import("./chunks/fr-BLQ4AIu7.js"), "./locales/he.ts": () => import("./chunks/he-Bg-Bqi7r.js"), "./locales/hi.ts": () => import("./chunks/hi-wQeE43oY.js"), "./locales/hu.ts": () => import("./chunks/hu-D9qxzu0r.js"), "./locales/id.ts": () => import("./chunks/id-Rx_wYvqy.js"), "./locales/it.ts": () => import("./chunks/it-B1SRPZ3e.js"), "./locales/ja.ts": () => import("./chunks/ja-DiItm8te.js"), "./locales/ko.ts": () => import("./chunks/ko-CdGFWAKX.js"), "./locales/nl.ts": () => import("./chunks/nl-CmZ3vEvj.js"), "./locales/no.ts": () => import("./chunks/no-BuxByZpq.js"), "./locales/pl.ts": () => import("./chunks/pl-jZFCnDb8.js"), "./locales/pt.ts": () => import("./chunks/pt-Cld7MwIW.js"), "./locales/ro.ts": () => import("./chunks/ro-CuKDqj3C.js"), "./locales/ru.ts": () => import("./chunks/ru-B7cjqJUm.js"), "./locales/sv.ts": () => import("./chunks/sv-D9y-M1Fo.js"), "./locales/th.ts": () => import("./chunks/th-D9umBjEy.js"), "./locales/tr.ts": () => import("./chunks/tr-BddMywiw.js"), "./locales/uk.ts": () => import("./chunks/uk-Dbd31hFt.js"), "./locales/vi.ts": () => import("./chunks/vi-Do3BMOdh.js"), "./locales/zh.ts": () => import("./chunks/zh-gQSYLZI3.js") }), `./locales/${r}.ts`, 3).then((i) => {
193
+ const n = rt(/* @__PURE__ */ Object.assign({ "./locales/ar.ts": () => import("./chunks/ar-ClwBmll7.js"), "./locales/cs.ts": () => import("./chunks/cs-Cc_D0W4S.js"), "./locales/da.ts": () => import("./chunks/da-BtKcMSxH.js"), "./locales/de.ts": () => import("./chunks/de-iwQW5eYl.js"), "./locales/el.ts": () => import("./chunks/el-BoH65CeJ.js"), "./locales/es.ts": () => import("./chunks/es-CkP16_8K.js"), "./locales/fi.ts": () => import("./chunks/fi-yUXSmK1E.js"), "./locales/fr.ts": () => import("./chunks/fr-DSZRGsxI.js"), "./locales/he.ts": () => import("./chunks/he-ZUo7cQjk.js"), "./locales/hi.ts": () => import("./chunks/hi-CEutBKiG.js"), "./locales/hu.ts": () => import("./chunks/hu-DvEAWGS7.js"), "./locales/id.ts": () => import("./chunks/id-_eEMrYMW.js"), "./locales/it.ts": () => import("./chunks/it-BAmsQbIl.js"), "./locales/ja.ts": () => import("./chunks/ja-BqCZWVKK.js"), "./locales/ko.ts": () => import("./chunks/ko-CkIzeOzb.js"), "./locales/nl.ts": () => import("./chunks/nl-Mu_KNzli.js"), "./locales/no.ts": () => import("./chunks/no-9HMjljBs.js"), "./locales/pl.ts": () => import("./chunks/pl-Cbr2qDwv.js"), "./locales/pt.ts": () => import("./chunks/pt-_jirA6IR.js"), "./locales/ro.ts": () => import("./chunks/ro-oZLxhwHc.js"), "./locales/ru.ts": () => import("./chunks/ru-C2-sqY7B.js"), "./locales/sv.ts": () => import("./chunks/sv-y385MWVy.js"), "./locales/th.ts": () => import("./chunks/th-Bjbv4M1s.js"), "./locales/tr.ts": () => import("./chunks/tr-DmHo9F8i.js"), "./locales/uk.ts": () => import("./chunks/uk-DwvAoTe5.js"), "./locales/vi.ts": () => import("./chunks/vi-BEpwsVLR.js"), "./locales/zh.ts": () => import("./chunks/zh-DrG18oGe.js") }), `./locales/${r}.ts`, 3).then((i) => {
148
194
  const s = i.default ?? {};
149
- return J.set(r, s), s;
195
+ return te.set(r, s), s;
150
196
  }).catch((i) => {
151
197
  console.warn(`[paywall] failed to load locale chunk "${r}"`, i);
152
198
  const s = {};
153
- return J.set(r, s), s;
199
+ return te.set(r, s), s;
154
200
  }).finally(() => {
155
- Q.delete(r);
201
+ re.delete(r);
156
202
  });
157
- return Q.set(r, n), n;
203
+ return re.set(r, n), n;
158
204
  }
159
- function et({ bootstrap: r, forceLocale: e, children: t }) {
160
- const [n, i] = x("en"), [s, a] = x(null);
161
- T(() => {
162
- const p = (e && Ae(e) ? e : null) ?? (!r || !Je(r) ? null : Xe(r));
163
- if (!p) {
205
+ function at({ bootstrap: r, forceLocale: e, children: t }) {
206
+ const [n, i] = k("en"), [s, a] = k(null);
207
+ P(() => {
208
+ const h = (e && Be(e) ? e : null) ?? (() => {
209
+ if (!r) return null;
210
+ const g = it(r);
211
+ return !g || !ot(r, g) ? null : g;
212
+ })();
213
+ if (!h) {
164
214
  (s !== null || n !== "en") && (i("en"), a(null));
165
215
  return;
166
216
  }
167
- if (p === n && s) return;
168
- let u = !1;
169
- return Qe(p).then((h) => {
170
- u || (i(p), a(h));
217
+ if (h === n && s) return;
218
+ let d = !1;
219
+ return st(h).then((g) => {
220
+ d || (i(h), a(g));
171
221
  }), () => {
172
- u = !0;
222
+ d = !0;
173
223
  };
174
224
  }, [r, e]);
175
225
  const l = {
176
226
  locale: n,
177
- t: s ? (d, p, u) => Le(s[d] ?? p, u) : Ce
227
+ t: s ? (c, h, d) => Te(s[c] ?? h, d) : Le
178
228
  };
179
- return /* @__PURE__ */ o(Ie.Provider, { value: l, children: t });
229
+ return /* @__PURE__ */ o(Me.Provider, { value: l, children: t });
180
230
  }
181
- function w() {
182
- return $e(Ie);
231
+ function S() {
232
+ return We(Me);
183
233
  }
184
- const pe = 'a[href], button:not([disabled]), textarea:not([disabled]), input:not([disabled]), select:not([disabled]), [tabindex]:not([tabindex="-1"])';
185
- function tt({
234
+ const fe = 'a[href], button:not([disabled]), textarea:not([disabled]), input:not([disabled]), select:not([disabled]), [tabindex]:not([tabindex="-1"])';
235
+ function lt({
186
236
  open: r,
187
237
  onClose: e,
188
238
  labelledBy: t,
@@ -191,56 +241,56 @@ function tt({
191
241
  allowClose: s = !0,
192
242
  hideCloseButton: a = !1,
193
243
  inline: l = !1,
194
- children: d
244
+ children: c
195
245
  }) {
196
- const { t: p } = w(), u = z(null), h = z(null);
197
- return T(() => {
246
+ const { t: h } = S(), d = U(null), g = U(null);
247
+ return P(() => {
198
248
  if (!r) return;
199
- h.current = document.activeElement ?? null;
200
- const g = u.current;
201
- g && (g.querySelector(pe) ?? g).focus({ preventScroll: !0 });
202
- const A = (k) => {
203
- if (k.key === "Escape") {
249
+ g.current = document.activeElement ?? null;
250
+ const m = d.current;
251
+ m && (m.querySelector(fe) ?? m).focus({ preventScroll: !0 });
252
+ const A = (b) => {
253
+ if (b.key === "Escape") {
204
254
  if (!s) return;
205
- k.stopPropagation(), e();
255
+ b.stopPropagation(), e();
206
256
  return;
207
257
  }
208
- if (k.key !== "Tab" || !u.current) return;
209
- const E = Array.from(
210
- u.current.querySelectorAll(pe)
258
+ if (b.key !== "Tab" || !d.current) return;
259
+ const C = Array.from(
260
+ d.current.querySelectorAll(fe)
211
261
  ).filter((R) => !R.hasAttribute("disabled") && R.tabIndex !== -1);
212
- if (E.length === 0) {
213
- k.preventDefault();
262
+ if (C.length === 0) {
263
+ b.preventDefault();
214
264
  return;
215
265
  }
216
- const I = E[0], O = E[E.length - 1], B = document.activeElement;
217
- k.shiftKey && B === I ? (k.preventDefault(), O.focus()) : !k.shiftKey && B === O && (k.preventDefault(), I.focus());
266
+ const I = C[0], j = C[C.length - 1], M = document.activeElement;
267
+ b.shiftKey && M === I ? (b.preventDefault(), j.focus()) : !b.shiftKey && M === j && (b.preventDefault(), I.focus());
218
268
  };
219
269
  document.addEventListener("keydown", A, !0);
220
- const M = document.body.style.overflow;
270
+ const y = document.body.style.overflow;
221
271
  return l || (document.body.style.overflow = "hidden"), () => {
222
- document.removeEventListener("keydown", A, !0), l || (document.body.style.overflow = M), h.current?.focus?.({ preventScroll: !0 });
272
+ document.removeEventListener("keydown", A, !0), l || (document.body.style.overflow = y), g.current?.focus?.({ preventScroll: !0 });
223
273
  };
224
- }, [r, e, s, l]), r ? /* @__PURE__ */ c(
274
+ }, [r, e, s, l]), r ? /* @__PURE__ */ u(
225
275
  "div",
226
276
  {
227
277
  class: `${l ? "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]`,
228
- onClick: (g) => {
229
- s && g.target === g.currentTarget && e();
278
+ onClick: (m) => {
279
+ s && m.target === m.currentTarget && e();
230
280
  },
231
281
  "data-pw-root": !0,
232
282
  children: [
233
- /* @__PURE__ */ c(
283
+ /* @__PURE__ */ u(
234
284
  "div",
235
285
  {
236
286
  class: "relative flex w-full max-w-[400px] flex-col animate-[pw-scale-in_220ms_cubic-bezier(0.16,1,0.3,1)]",
237
287
  style: { "--pw-accent": n ?? "#3b82f6" },
238
288
  children: [
239
289
  i,
240
- /* @__PURE__ */ c(
290
+ /* @__PURE__ */ u(
241
291
  "div",
242
292
  {
243
- ref: u,
293
+ ref: d,
244
294
  role: "dialog",
245
295
  "aria-modal": "true",
246
296
  "aria-labelledby": t,
@@ -250,13 +300,13 @@ function tt({
250
300
  boxShadow: "0 20px 25px -5px rgba(0,0,0,0.1), 0 8px 10px -6px rgba(0,0,0,0.1)"
251
301
  },
252
302
  children: [
253
- d,
303
+ c,
254
304
  s && !a ? /* @__PURE__ */ o(
255
305
  "button",
256
306
  {
257
307
  type: "button",
258
308
  onClick: e,
259
- "aria-label": p("modal.close_aria", "Close"),
309
+ "aria-label": h("modal.close_aria", "Close"),
260
310
  class: "absolute right-3 top-3 z-10 flex h-8 w-8 items-center justify-center rounded-full bg-white/80 text-gray-500 backdrop-blur-sm transition-colors hover:bg-gray-100 hover:text-gray-900 focus:outline-none focus-visible:ring-2 focus-visible:ring-[var(--pw-accent)]",
261
311
  children: /* @__PURE__ */ o("svg", { width: "14", height: "14", viewBox: "0 0 16 16", fill: "none", "aria-hidden": "true", children: /* @__PURE__ */ o(
262
312
  "path",
@@ -286,7 +336,7 @@ function tt({
286
336
  }
287
337
  ) : null;
288
338
  }
289
- function rt(r, e) {
339
+ function ct(r, e) {
290
340
  switch (r) {
291
341
  case "google":
292
342
  return e("auth.continue_with_google", "Continue with Google");
@@ -298,9 +348,9 @@ function rt(r, e) {
298
348
  return e("auth.continue_with_facebook", "Continue with Facebook");
299
349
  }
300
350
  }
301
- function fe(r, e, t) {
351
+ function ge(r, e, t) {
302
352
  const n = e === "signup" ? t("auth.signup_failed", "Sign-up failed") : t("auth.signin_failed", "Sign-in failed");
303
- if (!(r instanceof j)) return n;
353
+ if (!(r instanceof L)) return n;
304
354
  switch (r.code) {
305
355
  case "invalid_credentials":
306
356
  return t("auth.invalid_credentials", "Invalid email or password");
@@ -319,7 +369,7 @@ function fe(r, e, t) {
319
369
  case "over_request_rate_limit":
320
370
  case "rate_limited":
321
371
  case "http_429":
322
- return t("auth.rate_limited", "Too many requests. Please try again in a moment.");
372
+ return t("auth.rate_limited", "Too many requests. Please try again later.");
323
373
  case "network_error":
324
374
  return t("auth.network_error", "Network error. Please check your connection and try again.");
325
375
  case "upstream":
@@ -337,9 +387,9 @@ function Ee({ block: r, ctx: e }) {
337
387
  if (!t)
338
388
  return typeof console < "u" && console.warn("[paywall] auth_panel rendered without AuthClient — pass `auth: true` to PaywallUI"), null;
339
389
  const l = n && !n.user.is_anonymous ? n : null;
340
- return l && a ? null : l ? /* @__PURE__ */ o(nt, { email: l.user.email ?? "", onSignOut: () => t.signOut().catch(() => {
390
+ return l && a ? null : l ? /* @__PURE__ */ o(ut, { email: l.user.email ?? "", onSignOut: () => t.signOut().catch(() => {
341
391
  }) }) : /* @__PURE__ */ o(
342
- it,
392
+ dt,
343
393
  {
344
394
  block: r,
345
395
  allowSignup: i,
@@ -348,10 +398,10 @@ function Ee({ block: r, ctx: e }) {
348
398
  }
349
399
  );
350
400
  }
351
- function nt({ email: r, onSignOut: e }) {
352
- const { t } = w();
353
- return /* @__PURE__ */ c("div", { class: "flex items-center justify-between gap-3 rounded-2xl bg-gray-100 px-4 py-3", children: [
354
- /* @__PURE__ */ c("div", { class: "flex flex-col", children: [
401
+ function ut({ email: r, onSignOut: e }) {
402
+ const { t } = S();
403
+ return /* @__PURE__ */ u("div", { class: "flex items-center justify-between gap-3 rounded-2xl bg-gray-100 px-4 py-3", children: [
404
+ /* @__PURE__ */ u("div", { class: "flex flex-col", children: [
355
405
  /* @__PURE__ */ o("span", { class: "text-[10px] font-semibold uppercase tracking-wider text-gray-500", children: t("auth.signed_in", "Signed in") }),
356
406
  /* @__PURE__ */ o("span", { class: "text-sm font-medium text-gray-900", children: r })
357
407
  ] }),
@@ -366,182 +416,179 @@ function nt({ email: r, onSignOut: e }) {
366
416
  )
367
417
  ] });
368
418
  }
369
- function it({ block: r, allowSignup: e, allowReset: t, ctx: n }) {
370
- const { t: i } = w(), s = n.auth, a = r.providers ?? [], [l, d] = x("signin"), [p, u] = x(""), [h, b] = x(""), [_, f] = x(""), [g, A] = x(""), [M, k] = x(null), [E, I] = x(null), [O, B] = x(null), [R, q] = x(!1), [D, N] = x(null);
371
- T(() => {
419
+ function dt({ block: r, allowSignup: e, allowReset: t, ctx: n }) {
420
+ const { t: i } = S(), s = n.auth, a = r.providers ?? [], l = n.initialAuthMode === "signup" && e ? "signup" : "signin", [c, h] = k(l), [d, g] = k(""), [_, p] = k(""), [v, m] = k(""), [A, y] = k(""), [b, C] = k(null), I = U(!1), [j, M] = k(null), [R, q] = k(null), [D, B] = k(!1), [T, z] = k(null);
421
+ P(() => {
372
422
  if (typeof s.getLastLogin != "function") return;
373
- let S = !1;
423
+ let f = !1;
374
424
  return s.getLastLogin().then(
375
- (P) => {
376
- S || !P || (N(P), P.email && u((V) => V === "" ? P.email : V));
425
+ (w) => {
426
+ f || !w || (z(w), w.email && g((E) => E === "" ? w.email : E));
377
427
  },
378
428
  () => {
379
429
  }
380
430
  ), () => {
381
- S = !0;
431
+ f = !0;
382
432
  };
383
433
  }, [s]);
384
- const L = (S) => {
385
- d(S), I(null), B(null), q(!1);
386
- }, C = async (S) => {
387
- if (S.preventDefault(), !M) {
388
- if (I(null), B(null), l === "signup" && !R) {
389
- if (!p.trim()) return;
390
- q(!0);
391
- return;
392
- }
393
- if (l === "signup" && h !== _) {
394
- I(i("auth.passwords_mismatch", "Passwords don't match"));
395
- return;
396
- }
397
- k("email");
434
+ const O = (f) => {
435
+ h(f), M(null), q(null), B(!1);
436
+ }, K = async (f) => {
437
+ if (f.preventDefault(), !(I.current || b)) {
438
+ I.current = !0;
398
439
  try {
399
- l === "signin" ? await s.signInWithEmail({ email: p, password: h }) : l === "signup" ? (await s.signUp({ email: p, password: h })).kind === "confirmation_required" && (d("reset_verify"), B(i("auth.check_email_message", "Check your email for a confirmation code."))) : l === "forgot" ? (await s.requestPasswordReset({ email: p }), d("reset_sent"), B(
400
- i("auth.reset_sent_message", "If that email exists, a reset code has been sent.")
401
- )) : l === "reset_verify" && (await s.verifyOtp({
402
- email: p,
403
- token: g,
404
- type: h ? "recovery" : "email"
405
- }), h && await s.updatePassword({ password: h }));
406
- } catch (P) {
407
- I(fe(P, l === "signup" ? "signup" : l === "reset_verify" ? "otp" : l === "forgot" ? "reset" : "signin", i));
440
+ if (M(null), q(null), c === "signup" && !D) {
441
+ if (!d.trim()) return;
442
+ B(!0);
443
+ return;
444
+ }
445
+ if (c === "signup" && _ !== v) {
446
+ M(i("auth.passwords_mismatch", "Passwords don't match"));
447
+ return;
448
+ }
449
+ C("email");
450
+ try {
451
+ c === "signin" ? await s.signInWithEmail({ email: d, password: _ }) : c === "signup" ? (await s.signUp({ email: d, password: _ })).kind === "confirmation_required" && (p(""), h("signup_sent")) : c === "forgot" ? (await s.requestPasswordReset({ email: d }), h("reset_sent")) : c === "reset_verify" && (await s.verifyOtp({
452
+ email: d,
453
+ token: A,
454
+ type: _ ? "recovery" : "email"
455
+ }), _ && await s.updatePassword({ password: _ }));
456
+ } catch (w) {
457
+ M(ge(w, c === "signup" ? "signup" : c === "reset_verify" ? "otp" : c === "forgot" ? "reset" : "signin", i));
458
+ } finally {
459
+ C(null);
460
+ }
408
461
  } finally {
409
- k(null);
462
+ I.current = !1;
410
463
  }
411
464
  }
412
- }, U = async (S) => {
413
- if (!M) {
414
- k(S), I(null), B(null);
465
+ }, H = async (f) => {
466
+ if (!(I.current || b)) {
467
+ I.current = !0, C(f), M(null), q(null);
415
468
  try {
416
469
  await s.signInWithOAuth({
417
- provider: S,
418
- onPopupOpened: () => k(null)
470
+ provider: f,
471
+ onPopupOpened: () => C(null)
419
472
  });
420
- } catch (P) {
421
- if (P instanceof j && (P.code === "oauth_cancelled" || P.code === "oauth_timeout"))
473
+ } catch (w) {
474
+ if (w instanceof L && (w.code === "oauth_cancelled" || w.code === "oauth_timeout"))
422
475
  return;
423
- I(fe(P, "signin", i));
476
+ M(ge(w, "signin", i));
424
477
  } finally {
425
- k(null);
478
+ I.current = !1, C(null);
426
479
  }
427
480
  }
428
- }, m = a.length > 0 && (l === "signin" || l === "signup"), y = l === "signin" || l === "signup" || l === "forgot", v = l === "signin" || l === "signup" && R;
429
- return /* @__PURE__ */ c("div", { class: "flex flex-col gap-5", children: [
430
- /* @__PURE__ */ o(ot, { mode: l, customHeading: r.heading, customSubheading: r.subheading }),
431
- m ? /* @__PURE__ */ c("div", { class: "flex flex-col gap-2.5", children: [
432
- a.map((S) => /* @__PURE__ */ c("div", { class: "relative", children: [
433
- /* @__PURE__ */ c(
481
+ }, X = a.length > 0 && (c === "signin" || c === "signup"), J = c === "signin" || c === "signup" || c === "forgot", x = c === "signin" || c === "signup" && D;
482
+ return c === "reset_sent" ? /* @__PURE__ */ o(St, { email: d, onBack: () => O("signin"), t: i }) : c === "signup_sent" ? /* @__PURE__ */ o(_t, { email: d, onBack: () => O("signin"), t: i }) : /* @__PURE__ */ u("div", { class: "flex flex-col gap-5", children: [
483
+ /* @__PURE__ */ o(ht, { mode: c, customHeading: r.heading, customSubheading: r.subheading }),
484
+ X ? /* @__PURE__ */ u("div", { class: "flex flex-col gap-2.5", children: [
485
+ a.map((f) => /* @__PURE__ */ u("div", { class: "relative", children: [
486
+ /* @__PURE__ */ u(
434
487
  "button",
435
488
  {
436
489
  type: "button",
437
- onClick: () => U(S),
438
- disabled: M !== null,
490
+ onClick: () => H(f),
491
+ disabled: b !== null,
439
492
  class: "flex h-12 w-full items-center justify-center gap-2.5 rounded-full border-1 border-gray-200 bg-white px-5 text-base font-medium text-gray-900 transition-all hover:border-gray-300 hover:bg-gray-50 disabled:cursor-not-allowed disabled:opacity-60 focus:outline-none focus-visible:ring-2 focus-visible:ring-[var(--pw-accent)]",
440
493
  children: [
441
- M === S ? /* @__PURE__ */ o("span", { class: "inline-block h-4 w-4 animate-spin rounded-full border-2 border-gray-300 border-t-gray-700" }) : /* @__PURE__ */ o(ft, { provider: S }),
442
- /* @__PURE__ */ o("span", { children: rt(S, i) })
494
+ b === f ? /* @__PURE__ */ o("span", { class: "inline-block h-4 w-4 animate-spin rounded-full border-2 border-gray-300 border-t-gray-700" }) : /* @__PURE__ */ o(vt, { provider: f }),
495
+ /* @__PURE__ */ o("span", { children: ct(f, i) })
443
496
  ]
444
497
  }
445
498
  ),
446
- D?.method === S ? /* @__PURE__ */ o(me, { email: D.email }) : null
447
- ] }, S)),
448
- /* @__PURE__ */ o(pt, {})
499
+ T?.method === f ? /* @__PURE__ */ o(xt, { email: T.email }) : null
500
+ ] }, f)),
501
+ /* @__PURE__ */ o(kt, {})
449
502
  ] }) : null,
450
- /* @__PURE__ */ c("form", { onSubmit: C, class: "flex flex-col gap-3", children: [
451
- y && /* @__PURE__ */ o(
452
- ge,
503
+ /* @__PURE__ */ u("form", { onSubmit: K, class: "flex flex-col gap-3", children: [
504
+ J && /* @__PURE__ */ o(
505
+ me,
453
506
  {
454
507
  type: "email",
455
508
  placeholder: i("auth.email", "Email address"),
456
- value: p,
457
- onInput: u,
509
+ value: d,
510
+ onInput: g,
458
511
  autocomplete: "email",
459
512
  required: !0
460
513
  }
461
514
  ),
462
- v && /* @__PURE__ */ o(
463
- ee,
515
+ x && /* @__PURE__ */ o(
516
+ ne,
464
517
  {
465
518
  placeholder: i("auth.password", "Password"),
466
- value: h,
467
- onInput: b,
468
- autocomplete: l === "signin" ? "current-password" : "new-password",
519
+ value: _,
520
+ onInput: p,
521
+ autocomplete: c === "signin" ? "current-password" : "new-password",
469
522
  required: !0
470
523
  }
471
524
  ),
472
- l === "signup" && R && /* @__PURE__ */ o(
473
- ee,
525
+ c === "signup" && D && /* @__PURE__ */ o(
526
+ ne,
474
527
  {
475
528
  placeholder: i("auth.repeat_password", "Repeat password"),
476
- value: _,
477
- onInput: f,
529
+ value: v,
530
+ onInput: m,
478
531
  autocomplete: "new-password",
479
532
  required: !0
480
533
  }
481
534
  ),
482
- l === "reset_verify" && /* @__PURE__ */ c(Y, { children: [
483
- /* @__PURE__ */ o(
484
- ge,
485
- {
486
- type: "text",
487
- placeholder: i("auth.confirmation_code", "Confirmation code"),
488
- value: g,
489
- onInput: A,
490
- autocomplete: "one-time-code",
491
- inputMode: "numeric",
492
- required: !0
493
- }
494
- ),
495
- /* @__PURE__ */ o(
496
- ee,
497
- {
498
- placeholder: i(
499
- "auth.new_password_optional",
500
- "New password (optional — only for password reset)"
501
- ),
502
- value: h,
503
- onInput: b,
504
- autocomplete: "new-password"
505
- }
506
- )
507
- ] }),
508
- l === "reset_sent" && O && /* @__PURE__ */ o("p", { class: "rounded-2xl bg-gray-100 px-4 py-3 text-sm text-gray-600", children: O }),
509
- l === "signin" && t && /* @__PURE__ */ o("div", { class: "flex justify-end text-sm", children: /* @__PURE__ */ o(Z, { onClick: () => L("forgot"), children: i("auth.forgot_password", "Forgot password?") }) }),
510
- E && /* @__PURE__ */ o("p", { class: "text-sm text-red-600", children: E }),
511
- O && l !== "reset_sent" && /* @__PURE__ */ o("p", { class: "text-sm text-gray-500", children: O }),
512
- l !== "reset_sent" && /* @__PURE__ */ c("div", { class: "relative", children: [
513
- /* @__PURE__ */ o(
514
- ct,
515
- {
516
- busy: M === "email",
517
- label: at(l, R, r.submit_label ?? r.heading, i)
518
- }
519
- ),
520
- l === "signin" && D?.method === "email" ? /* @__PURE__ */ o(me, { email: D.email }) : null
521
- ] })
535
+ c === "reset_verify" && /* @__PURE__ */ o(
536
+ me,
537
+ {
538
+ type: "text",
539
+ placeholder: i("auth.confirmation_code", "Confirmation code"),
540
+ value: A,
541
+ onInput: y,
542
+ autocomplete: "one-time-code",
543
+ inputMode: "numeric",
544
+ required: !0
545
+ }
546
+ ),
547
+ c === "reset_verify" && /* @__PURE__ */ o(
548
+ ne,
549
+ {
550
+ placeholder: i(
551
+ "auth.new_password_optional",
552
+ "New password (optional — only for password reset)"
553
+ ),
554
+ value: _,
555
+ onInput: p,
556
+ autocomplete: "new-password"
557
+ }
558
+ ),
559
+ c === "signin" && t && /* @__PURE__ */ o("div", { class: "flex justify-end text-sm", children: /* @__PURE__ */ o(Y, { onClick: () => O("forgot"), children: i("auth.forgot_password", "Forgot password?") }) }),
560
+ j && /* @__PURE__ */ o("p", { class: "text-sm text-red-600", children: j }),
561
+ R && /* @__PURE__ */ o("p", { class: "text-sm text-gray-500", children: R }),
562
+ /* @__PURE__ */ o(
563
+ mt,
564
+ {
565
+ busy: b === "email",
566
+ label: ft(c, D, r.submit_label ?? r.heading, i)
567
+ }
568
+ )
522
569
  ] }),
523
570
  /* @__PURE__ */ o(
524
- lt,
571
+ gt,
525
572
  {
526
- mode: l,
573
+ mode: c,
527
574
  allowSignup: e,
528
- onSwitch: L
575
+ onSwitch: O
529
576
  }
530
577
  )
531
578
  ] });
532
579
  }
533
- function ot({
580
+ function ht({
534
581
  mode: r,
535
582
  customHeading: e,
536
583
  customSubheading: t
537
584
  }) {
538
- const { t: n } = w(), i = st(r, n), s = r === "signin" || r === "signup", a = s && e ? e : i.title, l = s && t !== void 0 ? t || null : i.subtitle;
539
- return /* @__PURE__ */ c("div", { class: "flex flex-col gap-2", children: [
585
+ const { t: n } = S(), i = pt(r, n), s = r === "signin" || r === "signup", a = s && e ? e : i.title, l = s && t !== void 0 ? t || null : i.subtitle;
586
+ return /* @__PURE__ */ u("div", { class: "flex flex-col gap-2", children: [
540
587
  /* @__PURE__ */ o("h2", { class: "text-3xl font-bold tracking-tight text-gray-900", children: a }),
541
588
  l ? /* @__PURE__ */ o("p", { class: "text-base leading-relaxed text-gray-600", children: l }) : null
542
589
  ] });
543
590
  }
544
- function st(r, e) {
591
+ function pt(r, e) {
545
592
  switch (r) {
546
593
  case "signin":
547
594
  return {
@@ -562,6 +609,7 @@ function st(r, e) {
562
609
  )
563
610
  };
564
611
  case "reset_sent":
612
+ case "signup_sent":
565
613
  return {
566
614
  title: e("auth.check_email_title", "Check your email"),
567
615
  subtitle: null
@@ -576,7 +624,7 @@ function st(r, e) {
576
624
  };
577
625
  }
578
626
  }
579
- function at(r, e, t, n) {
627
+ function ft(r, e, t, n) {
580
628
  if (r === "signin" && t) return t;
581
629
  switch (r) {
582
630
  case "signin":
@@ -591,27 +639,27 @@ function at(r, e, t, n) {
591
639
  return n("cta.continue", "Continue");
592
640
  }
593
641
  }
594
- function lt({
642
+ function gt({
595
643
  mode: r,
596
644
  allowSignup: e,
597
645
  onSwitch: t
598
646
  }) {
599
- const { t: n } = w();
600
- return r === "signin" && e ? /* @__PURE__ */ c("p", { class: "text-center text-sm text-gray-600", children: [
647
+ const { t: n } = S();
648
+ return r === "signin" && e ? /* @__PURE__ */ u("p", { class: "text-center text-sm text-gray-600", children: [
601
649
  n("auth.no_account", "Don't have an account?"),
602
650
  " ",
603
- /* @__PURE__ */ o(Z, { onClick: () => t("signup"), children: n("auth.sign_up_link", "Sign Up") })
604
- ] }) : r === "signup" ? /* @__PURE__ */ c("p", { class: "text-center text-sm text-gray-600", children: [
651
+ /* @__PURE__ */ o(Y, { onClick: () => t("signup"), children: n("auth.sign_up_link", "Sign Up") })
652
+ ] }) : r === "signup" ? /* @__PURE__ */ u("p", { class: "text-center text-sm text-gray-600", children: [
605
653
  n("auth.have_account", "Already have an account?"),
606
654
  " ",
607
- /* @__PURE__ */ o(Z, { onClick: () => t("signin"), children: n("auth.log_in_link", "Log In") })
608
- ] }) : r === "forgot" || r === "reset_sent" || r === "reset_verify" ? /* @__PURE__ */ c("p", { class: "text-center text-sm text-gray-600", children: [
655
+ /* @__PURE__ */ o(Y, { onClick: () => t("signin"), children: n("auth.log_in_link", "Log In") })
656
+ ] }) : r === "forgot" || r === "reset_sent" || r === "reset_verify" ? /* @__PURE__ */ u("p", { class: "text-center text-sm text-gray-600", children: [
609
657
  n("auth.no_account", "Don't have an account?"),
610
658
  " ",
611
- /* @__PURE__ */ o(Z, { onClick: () => t("signup"), children: n("auth.sign_up_link", "Sign Up") })
659
+ /* @__PURE__ */ o(Y, { onClick: () => t("signup"), children: n("auth.sign_up_link", "Sign Up") })
612
660
  ] }) : null;
613
661
  }
614
- function Z({
662
+ function Y({
615
663
  onClick: r,
616
664
  children: e
617
665
  }) {
@@ -626,7 +674,7 @@ function Z({
626
674
  }
627
675
  );
628
676
  }
629
- function ct({ busy: r, label: e }) {
677
+ function mt({ busy: r, label: e }) {
630
678
  return /* @__PURE__ */ o(
631
679
  "button",
632
680
  {
@@ -641,7 +689,7 @@ function ct({ busy: r, label: e }) {
641
689
  }
642
690
  );
643
691
  }
644
- function ge({ type: r, placeholder: e, value: t, onInput: n, autocomplete: i, inputMode: s, required: a }) {
692
+ function me({ type: r, placeholder: e, value: t, onInput: n, autocomplete: i, inputMode: s, required: a }) {
645
693
  return /* @__PURE__ */ o(
646
694
  "input",
647
695
  {
@@ -656,22 +704,22 @@ function ge({ type: r, placeholder: e, value: t, onInput: n, autocomplete: i, in
656
704
  }
657
705
  );
658
706
  }
659
- function ee({ placeholder: r, value: e, onInput: t, autocomplete: n, required: i }) {
660
- const { t: s } = w(), [a, l] = x(!1), d = z(null);
661
- T(() => {
662
- const h = d.current;
663
- h && h.value !== e && (h.value = e);
707
+ function ne({ placeholder: r, value: e, onInput: t, autocomplete: n, required: i }) {
708
+ const { t: s } = S(), [a, l] = k(!1), c = U(null);
709
+ P(() => {
710
+ const g = c.current;
711
+ g && g.value !== e && (g.value = e);
664
712
  }, [a, e]);
665
- const p = s("auth.show_password", "Show password"), u = s("auth.hide_password", "Hide password");
666
- return /* @__PURE__ */ c("div", { class: "relative", children: [
713
+ const h = s("auth.show_password", "Show password"), d = s("auth.hide_password", "Hide password");
714
+ return /* @__PURE__ */ u("div", { class: "relative", children: [
667
715
  /* @__PURE__ */ o(
668
716
  "input",
669
717
  {
670
- ref: d,
718
+ ref: c,
671
719
  type: a ? "text" : "password",
672
720
  value: e,
673
721
  placeholder: r,
674
- onInput: (h) => t(h.target.value),
722
+ onInput: (g) => t(g.target.value),
675
723
  autocomplete: n,
676
724
  required: i,
677
725
  class: "h-14 w-full rounded-2xl bg-gray-100 pl-5 pr-12 text-base text-gray-900 outline-none transition-all placeholder:text-gray-500 hover:bg-gray-200/60 focus:bg-gray-200/60 focus:shadow-[0_0_0_2px_color-mix(in_srgb,var(--pw-accent)_30%,transparent)]"
@@ -681,17 +729,17 @@ function ee({ placeholder: r, value: e, onInput: t, autocomplete: n, required: i
681
729
  "button",
682
730
  {
683
731
  type: "button",
684
- onClick: () => l((h) => !h),
685
- "aria-label": a ? u : p,
732
+ onClick: () => l((g) => !g),
733
+ "aria-label": a ? d : h,
686
734
  tabIndex: -1,
687
735
  class: "absolute right-4 top-1/2 -translate-y-1/2 flex h-6 w-6 items-center justify-center rounded text-gray-500 transition-colors hover:text-gray-700 focus:outline-none focus-visible:ring-2 focus-visible:ring-[var(--pw-accent)]",
688
- children: a ? /* @__PURE__ */ o(dt, {}) : /* @__PURE__ */ o(ut, {})
736
+ children: a ? /* @__PURE__ */ o(yt, {}) : /* @__PURE__ */ o(bt, {})
689
737
  }
690
738
  )
691
739
  ] });
692
740
  }
693
- function ut() {
694
- return /* @__PURE__ */ c("svg", { width: "18", height: "18", viewBox: "0 0 20 20", fill: "none", "aria-hidden": "true", children: [
741
+ function bt() {
742
+ return /* @__PURE__ */ u("svg", { width: "18", height: "18", viewBox: "0 0 20 20", fill: "none", "aria-hidden": "true", children: [
695
743
  /* @__PURE__ */ o(
696
744
  "path",
697
745
  {
@@ -705,8 +753,8 @@ function ut() {
705
753
  /* @__PURE__ */ o("circle", { cx: "10", cy: "10", r: "2.5", stroke: "currentColor", "stroke-width": "1.5" })
706
754
  ] });
707
755
  }
708
- function dt() {
709
- return /* @__PURE__ */ c("svg", { width: "18", height: "18", viewBox: "0 0 20 20", fill: "none", "aria-hidden": "true", children: [
756
+ function yt() {
757
+ return /* @__PURE__ */ u("svg", { width: "18", height: "18", viewBox: "0 0 20 20", fill: "none", "aria-hidden": "true", children: [
710
758
  /* @__PURE__ */ o(
711
759
  "path",
712
760
  {
@@ -729,24 +777,24 @@ function dt() {
729
777
  )
730
778
  ] });
731
779
  }
732
- function me({ email: r }) {
733
- const { t: e } = w(), t = r ? e("auth.last_used", "Last · {email}", { email: ht(r) }) : e("auth.last_used_no_email", "Last");
780
+ function xt({ email: r }) {
781
+ const { t: e } = S(), t = r ? e("auth.last_used", "Last · {email}", { email: wt(r) }) : e("auth.last_used_no_email", "Last");
734
782
  return /* @__PURE__ */ o("span", { class: "pointer-events-none absolute -top-2 right-3 max-w-[75%] truncate rounded-full bg-gray-900 px-2 py-0.5 text-[10px] font-semibold tracking-wide text-white shadow-sm", children: t });
735
783
  }
736
- function ht(r) {
784
+ function wt(r) {
737
785
  const [e, t] = r.split("@");
738
786
  return t ? `${e.slice(0, 3)}*****@${t}` : r;
739
787
  }
740
- function pt() {
741
- const { t: r } = w();
742
- return /* @__PURE__ */ c("div", { class: "flex items-center gap-3 py-1 text-sm text-gray-400", children: [
788
+ function kt() {
789
+ const { t: r } = S();
790
+ return /* @__PURE__ */ u("div", { class: "flex items-center gap-3 py-1 text-sm text-gray-400", children: [
743
791
  /* @__PURE__ */ o("div", { class: "h-px flex-1 bg-gray-200" }),
744
792
  /* @__PURE__ */ o("span", { children: r("auth.or", "or") }),
745
793
  /* @__PURE__ */ o("div", { class: "h-px flex-1 bg-gray-200" })
746
794
  ] });
747
795
  }
748
- function ft({ provider: r }) {
749
- return r === "google" ? /* @__PURE__ */ c("svg", { width: "20", height: "20", viewBox: "0 0 18 18", "aria-hidden": "true", children: [
796
+ function vt({ provider: r }) {
797
+ return r === "google" ? /* @__PURE__ */ u("svg", { width: "20", height: "20", viewBox: "0 0 18 18", "aria-hidden": "true", children: [
750
798
  /* @__PURE__ */ o("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" }),
751
799
  /* @__PURE__ */ o("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" }),
752
800
  /* @__PURE__ */ o("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" }),
@@ -758,16 +806,116 @@ function ft({ provider: r }) {
758
806
  /* @__PURE__ */ o("svg", { width: "26", height: "26", viewBox: "0 0 24 24", fill: "currentColor", "aria-hidden": "true", children: /* @__PURE__ */ o("path", { d: "M17.05 20.28c-.98.95-2.05.8-3.08.35-1.09-.46-2.09-.48-3.24 0-1.44.62-2.2.44-3.06-.35C2.79 15.25 3.51 7.59 9.05 7.31c1.35.07 2.29.74 3.08.8 1.18-.24 2.31-.93 3.57-.84 1.51.12 2.65.72 3.4 1.8-3.12 1.87-2.38 5.98.48 7.13-.57 1.5-1.31 2.99-2.54 4.09zM12 7.25c-.15-2.23 1.66-4.07 3.74-4.25.29 2.58-2.34 4.5-3.74 4.25z" }) })
759
807
  ) : r === "github" ? /* @__PURE__ */ o("svg", { width: "20", height: "20", viewBox: "0 0 16 16", fill: "currentColor", "aria-hidden": "true", children: /* @__PURE__ */ o("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__ */ o("svg", { width: "18", height: "20", viewBox: "0 0 14 16", fill: "currentColor", "aria-hidden": "true", children: /* @__PURE__ */ o("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" }) });
760
808
  }
761
- function gt({
809
+ function _t({
810
+ email: r,
811
+ onBack: e,
812
+ t
813
+ }) {
814
+ return /* @__PURE__ */ u("div", { class: "flex flex-col items-center gap-4 py-2 text-center", children: [
815
+ /* @__PURE__ */ o(
816
+ "div",
817
+ {
818
+ class: "flex h-14 w-14 items-center justify-center rounded-full",
819
+ style: {
820
+ background: "linear-gradient(135deg, #4ade80, #16a34a)",
821
+ color: "#fff",
822
+ boxShadow: "0 0 0 8px rgba(74,222,128,0.12), 0 8px 20px -6px rgba(22,163,74,0.45)"
823
+ },
824
+ "aria-hidden": "true",
825
+ children: /* @__PURE__ */ o("svg", { width: "28", height: "28", viewBox: "0 0 24 24", fill: "none", children: /* @__PURE__ */ o(
826
+ "path",
827
+ {
828
+ d: "M5 13l4 4L19 7",
829
+ stroke: "currentColor",
830
+ "stroke-width": "2.5",
831
+ "stroke-linecap": "round",
832
+ "stroke-linejoin": "round"
833
+ }
834
+ ) })
835
+ }
836
+ ),
837
+ /* @__PURE__ */ o("h2", { class: "mt-1 text-3xl font-bold tracking-tight text-gray-900", children: t("auth.check_email_title", "Check your email") }),
838
+ /* @__PURE__ */ o("p", { class: "text-base leading-relaxed text-gray-600", children: t(
839
+ "auth.signup_sent_subtitle",
840
+ "We sent a confirmation link to your email. Click it to activate your account, then sign in."
841
+ ) }),
842
+ r ? /* @__PURE__ */ o("p", { class: "break-all text-base font-semibold text-gray-900", children: r }) : null,
843
+ /* @__PURE__ */ o(
844
+ "button",
845
+ {
846
+ type: "button",
847
+ onClick: e,
848
+ class: "pw-cta-shimmer relative mt-2 flex min-h-12 w-full items-center justify-center overflow-hidden rounded-3xl px-5 py-2 text-center text-base font-semibold leading-tight text-white transition-transform duration-150 active:scale-[0.98] focus:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:ring-[var(--pw-accent)]",
849
+ style: {
850
+ 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%)",
851
+ boxShadow: "0 0 20px 0 color-mix(in srgb, var(--pw-accent) 25%, transparent), inset 0 0 8px 0 color-mix(in srgb, white 25%, transparent)"
852
+ },
853
+ children: /* @__PURE__ */ o("span", { class: "relative z-10", children: t("auth.back_to_login", "Back to Login") })
854
+ }
855
+ )
856
+ ] });
857
+ }
858
+ function St({
859
+ email: r,
860
+ onBack: e,
861
+ t
862
+ }) {
863
+ return /* @__PURE__ */ u("div", { class: "flex flex-col items-center gap-4 py-2 text-center", children: [
864
+ /* @__PURE__ */ o(
865
+ "div",
866
+ {
867
+ class: "flex h-14 w-14 items-center justify-center rounded-full",
868
+ style: {
869
+ background: "linear-gradient(135deg, #4ade80, #16a34a)",
870
+ color: "#fff",
871
+ boxShadow: "0 0 0 8px rgba(74,222,128,0.12), 0 8px 20px -6px rgba(22,163,74,0.45)"
872
+ },
873
+ "aria-hidden": "true",
874
+ children: /* @__PURE__ */ o("svg", { width: "28", height: "28", viewBox: "0 0 24 24", fill: "none", children: /* @__PURE__ */ o(
875
+ "path",
876
+ {
877
+ d: "M5 13l4 4L19 7",
878
+ stroke: "currentColor",
879
+ "stroke-width": "2.5",
880
+ "stroke-linecap": "round",
881
+ "stroke-linejoin": "round"
882
+ }
883
+ ) })
884
+ }
885
+ ),
886
+ /* @__PURE__ */ o("h2", { class: "mt-1 text-3xl font-bold tracking-tight text-gray-900", children: t("auth.check_email_title", "Check your email") }),
887
+ /* @__PURE__ */ o("p", { class: "text-base leading-relaxed text-gray-600", children: t(
888
+ "auth.reset_sent_subtitle",
889
+ "We sent a password reset link. Follow the instructions in the email to reset your password."
890
+ ) }),
891
+ r ? /* @__PURE__ */ o("p", { class: "break-all text-base font-semibold text-gray-900", children: r }) : null,
892
+ /* @__PURE__ */ o("p", { class: "text-sm text-gray-500", children: t("auth.reset_link_valid", "The link is valid for 1 hour.") }),
893
+ /* @__PURE__ */ o(
894
+ "button",
895
+ {
896
+ type: "button",
897
+ onClick: e,
898
+ class: "pw-cta-shimmer relative mt-2 flex min-h-12 w-full items-center justify-center overflow-hidden rounded-3xl px-5 py-2 text-center text-base font-semibold leading-tight text-white transition-transform duration-150 active:scale-[0.98] focus:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:ring-[var(--pw-accent)]",
899
+ style: {
900
+ 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%)",
901
+ boxShadow: "0 0 20px 0 color-mix(in srgb, var(--pw-accent) 25%, transparent), inset 0 0 8px 0 color-mix(in srgb, white 25%, transparent)"
902
+ },
903
+ children: /* @__PURE__ */ o("span", { class: "relative z-10", children: t("auth.back_to_login", "Back to Login") })
904
+ }
905
+ )
906
+ ] });
907
+ }
908
+ function Ct({
762
909
  block: r,
763
910
  bootstrap: e,
764
911
  auth: t,
765
912
  authSession: n,
766
913
  onBack: i,
767
914
  showBack: s = !0,
768
- intent: a = "preauth"
915
+ intent: a = "preauth",
916
+ initialMode: l
769
917
  }) {
770
- const { t: l } = w(), d = {
918
+ const { t: c } = S(), h = {
771
919
  bootstrap: e,
772
920
  selectedPriceId: null,
773
921
  setSelectedPriceId: () => {
@@ -775,18 +923,19 @@ function gt({
775
923
  onAction: () => {
776
924
  },
777
925
  auth: t,
778
- authSession: n
779
- }, p = a === "restore" ? {
926
+ authSession: n,
927
+ initialAuthMode: l
928
+ }, d = a === "restore" ? {
780
929
  ...r,
781
- heading: l("auth.restore_purchases_heading", "Restore Purchases"),
782
- subheading: l(
930
+ heading: c("auth.restore_purchases_heading", "Restore Purchases"),
931
+ subheading: c(
783
932
  "auth.restore_purchases_subheading",
784
933
  "Please sign in to restore your purchases."
785
934
  )
786
935
  } : a === "preauth" ? {
787
936
  ...r,
788
- heading: l("auth.login_continue_purchase", "Log in to continue your purchase"),
789
- subheading: l(
937
+ heading: c("auth.login_continue_purchase", "Log in to continue your purchase"),
938
+ subheading: c(
790
939
  "auth.link_purchase_subheading",
791
940
  "We'll link the purchase to your account to keep access."
792
941
  ),
@@ -794,14 +943,14 @@ function gt({
794
943
  // purchase"), а не action verb. Длинные локализации (RU: "Войдите,
795
944
  // чтобы продолжить покупку") в pill-кнопку h-12 не помещаются и
796
945
  // переносятся на 2 строки. Явный короткий submit_label решает.
797
- submit_label: l("auth.log_in", "Sign In")
946
+ submit_label: c("auth.log_in", "Sign In")
798
947
  } : r;
799
- return /* @__PURE__ */ c("div", { class: "relative flex-1 min-h-0 overflow-y-auto p-6 sm:p-8", children: [
800
- s ? /* @__PURE__ */ o(mt, { onClick: i, ariaLabel: l("nav.back_aria", "Back") }) : null,
801
- /* @__PURE__ */ o(Ee, { block: p, ctx: d })
948
+ return /* @__PURE__ */ u("div", { class: "relative flex-1 min-h-0 overflow-y-auto p-6 sm:p-8", children: [
949
+ s ? /* @__PURE__ */ o(It, { onClick: i, ariaLabel: c("nav.back_aria", "Back") }) : null,
950
+ /* @__PURE__ */ o(Ee, { block: d, ctx: h })
802
951
  ] });
803
952
  }
804
- function mt({ onClick: r, ariaLabel: e }) {
953
+ function It({ onClick: r, ariaLabel: e }) {
805
954
  return /* @__PURE__ */ o(
806
955
  "button",
807
956
  {
@@ -809,7 +958,7 @@ function mt({ onClick: r, ariaLabel: e }) {
809
958
  onClick: r,
810
959
  "aria-label": e,
811
960
  class: "absolute right-4 top-4 z-10 flex h-8 w-8 items-center justify-center rounded-full text-gray-400 transition-colors hover:bg-gray-100 hover:text-gray-700 focus:outline-none focus-visible:ring-2 focus-visible:ring-[var(--pw-accent)]",
812
- children: /* @__PURE__ */ c("svg", { width: "18", height: "18", viewBox: "0 0 20 20", fill: "none", "aria-hidden": "true", children: [
961
+ children: /* @__PURE__ */ u("svg", { width: "18", height: "18", viewBox: "0 0 20 20", fill: "none", "aria-hidden": "true", children: [
813
962
  /* @__PURE__ */ o(
814
963
  "path",
815
964
  {
@@ -834,71 +983,8 @@ function mt({ onClick: r, ariaLabel: e }) {
834
983
  }
835
984
  );
836
985
  }
837
- function yt({
838
- auth: r,
839
- onSuccess: e,
840
- onBack: t,
841
- heading: n,
842
- description: i
843
- }) {
844
- const { t: s } = w(), a = n ?? s("anon.heading_default", "Continue as guest"), l = i ?? s("anon.description_default", "Setting up your guest session…"), [d, p] = x({ kind: "signing-in" }), u = z(!0);
845
- T(() => () => {
846
- u.current = !1;
847
- }, []);
848
- const h = () => {
849
- p({ kind: "signing-in" }), (async () => {
850
- try {
851
- const b = await r.signInAnonymously();
852
- if (!u.current) return;
853
- e(b);
854
- } catch (b) {
855
- if (!u.current) return;
856
- p({
857
- kind: "error",
858
- message: b instanceof Error ? b.message : "Anonymous sign-in failed"
859
- });
860
- }
861
- })();
862
- };
863
- return T(() => {
864
- h();
865
- }, []), /* @__PURE__ */ c("div", { class: "flex flex-col gap-3", children: [
866
- t ? /* @__PURE__ */ o(
867
- "button",
868
- {
869
- type: "button",
870
- onClick: t,
871
- class: "-ml-1 self-start rounded-md px-1.5 py-0.5 text-xs font-medium text-gray-500 transition-colors hover:bg-gray-100 hover:text-gray-900 focus:outline-none focus-visible:ring-2 focus-visible:ring-[var(--pw-accent)]",
872
- children: s("nav.back", "← Back")
873
- }
874
- ) : null,
875
- /* @__PURE__ */ c("div", { class: "flex flex-col gap-1", children: [
876
- /* @__PURE__ */ o("h2", { class: "text-xl font-semibold text-gray-900", children: a }),
877
- /* @__PURE__ */ o("p", { class: "text-sm text-gray-500", children: l })
878
- ] }),
879
- d.kind === "signing-in" ? /* @__PURE__ */ o("div", { class: "flex items-center justify-center py-6", children: /* @__PURE__ */ o(xt, {}) }) : null,
880
- d.kind === "error" ? /* @__PURE__ */ c("div", { class: "flex flex-col gap-3", children: [
881
- /* @__PURE__ */ o("div", { class: "rounded-lg bg-red-50 px-3 py-2 text-sm text-red-700", children: d.message }),
882
- /* @__PURE__ */ o(
883
- "button",
884
- {
885
- type: "button",
886
- onClick: h,
887
- 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",
888
- children: s("anon.try_again", "Try again")
889
- }
890
- )
891
- ] }) : null
892
- ] });
893
- }
894
- function xt() {
895
- return /* @__PURE__ */ c("svg", { class: "h-5 w-5 animate-spin text-[var(--pw-accent)]", viewBox: "0 0 24 24", fill: "none", children: [
896
- /* @__PURE__ */ o("circle", { cx: "12", cy: "12", r: "10", stroke: "currentColor", "stroke-width": "3", "stroke-opacity": "0.2" }),
897
- /* @__PURE__ */ o("path", { d: "M22 12a10 10 0 0 0-10-10", stroke: "currentColor", "stroke-width": "3", "stroke-linecap": "round" })
898
- ] });
899
- }
900
- const Pe = (r) => `pw-offer-${r}-start`;
901
- function te(r) {
986
+ const At = (r) => `pw-offer-${r}-start`;
987
+ function ie(r) {
902
988
  const e = r - Date.now();
903
989
  return e <= 0 ? { days: 0, hours: 0, minutes: 0, seconds: 0, expired: !0 } : {
904
990
  days: Math.floor(e / (1e3 * 60 * 60 * 24)),
@@ -908,7 +994,7 @@ function te(r) {
908
994
  expired: !1
909
995
  };
910
996
  }
911
- function bt(r) {
997
+ function Lt(r) {
912
998
  if (r.expires_at) {
913
999
  const e = Date.parse(r.expires_at);
914
1000
  return Number.isFinite(e) ? e : null;
@@ -916,7 +1002,7 @@ function bt(r) {
916
1002
  if (r.duration_minutes && r.duration_minutes > 0) {
917
1003
  if (typeof window > "u") return null;
918
1004
  try {
919
- const e = Pe(r.id);
1005
+ const e = At(r.id);
920
1006
  let t = window.localStorage.getItem(e);
921
1007
  return t || (t = (/* @__PURE__ */ new Date()).toISOString(), window.localStorage.setItem(e, t)), Date.parse(t) + r.duration_minutes * 6e4;
922
1008
  } catch {
@@ -925,7 +1011,7 @@ function bt(r) {
925
1011
  }
926
1012
  return null;
927
1013
  }
928
- function Te(r, e) {
1014
+ function Pe(r, e) {
929
1015
  if (!r || r.length === 0) return null;
930
1016
  if (e) {
931
1017
  const t = r.find((n) => n.id === e);
@@ -933,32 +1019,28 @@ function Te(r, e) {
933
1019
  }
934
1020
  return r.find((t) => t.expires_at || t.duration_minutes) ?? null;
935
1021
  }
936
- function Me(r) {
937
- const e = r ? bt(r) : null, [t, n] = x(
938
- () => e !== null ? te(e) : null
939
- ), i = z(e);
940
- return i.current = e, T(() => {
1022
+ function Oe(r) {
1023
+ const e = r ? Lt(r) : null, [t, n] = k(
1024
+ () => e !== null ? ie(e) : null
1025
+ ), i = U(e);
1026
+ return i.current = e, P(() => {
941
1027
  if (e === null) {
942
1028
  n(null);
943
1029
  return;
944
1030
  }
945
- n(te(e));
1031
+ n(ie(e));
946
1032
  const s = setInterval(() => {
947
- const a = te(i.current ?? 0);
948
- if (n(a), a.expired && (clearInterval(s), r?.duration_minutes && typeof window < "u"))
949
- try {
950
- window.localStorage.removeItem(Pe(r.id));
951
- } catch {
952
- }
1033
+ const a = ie(i.current ?? 0);
1034
+ n(a), a.expired && clearInterval(s);
953
1035
  }, 1e3);
954
1036
  return () => clearInterval(s);
955
1037
  }, [e, r?.duration_minutes, r?.id]), t;
956
1038
  }
957
- function wt({ block: r, ctx: e }) {
958
- const { t } = w(), n = Te(e.bootstrap.offers, r.offer_id), i = Me(n);
1039
+ function Mt({ block: r, ctx: e }) {
1040
+ const { t } = S(), n = Pe(e.bootstrap.offers, r.offer_id), i = Oe(n);
959
1041
  if (!n || i === null || i.expired && !r.force) return null;
960
1042
  const s = r.title ?? n.label ?? t("offer.limited_time", "Limited-time offer"), a = n.discount_percent ? `${s} ${n.discount_percent}%` : s;
961
- return /* @__PURE__ */ c(
1043
+ return /* @__PURE__ */ u(
962
1044
  "div",
963
1045
  {
964
1046
  class: "flex flex-wrap items-center justify-center gap-2 rounded-2xl px-4 py-3 text-[15px] font-semibold leading-tight text-white",
@@ -968,35 +1050,35 @@ function wt({ block: r, ctx: e }) {
968
1050
  },
969
1051
  role: "status",
970
1052
  children: [
971
- /* @__PURE__ */ o(Oe, {}),
1053
+ /* @__PURE__ */ o(Ue, {}),
972
1054
  /* @__PURE__ */ o("span", { children: a }),
973
- /* @__PURE__ */ o(Be, { value: i, t })
1055
+ /* @__PURE__ */ o(je, { value: i, t })
974
1056
  ]
975
1057
  }
976
1058
  );
977
1059
  }
978
- function Be({ value: r, t: e }) {
979
- return /* @__PURE__ */ c("div", { class: "flex items-center gap-1 font-mono text-sm", children: [
980
- r.days > 0 ? /* @__PURE__ */ c(Y, { children: [
981
- /* @__PURE__ */ o($, { children: String(r.days) }),
1060
+ function je({ value: r, t: e }) {
1061
+ return /* @__PURE__ */ u("div", { class: "flex items-center gap-1 font-mono text-sm", children: [
1062
+ r.days > 0 ? /* @__PURE__ */ u(le, { children: [
1063
+ /* @__PURE__ */ o(G, { children: String(r.days) }),
982
1064
  /* @__PURE__ */ o("span", { class: "text-xs", children: e("countdown.d", "d") })
983
1065
  ] }) : null,
984
- /* @__PURE__ */ o($, { children: String(r.hours).padStart(2, "0") }),
1066
+ /* @__PURE__ */ o(G, { children: String(r.hours).padStart(2, "0") }),
985
1067
  /* @__PURE__ */ o("span", { class: "text-xs", children: e("countdown.h", "h") }),
986
- /* @__PURE__ */ o($, { children: String(r.minutes).padStart(2, "0") }),
1068
+ /* @__PURE__ */ o(G, { children: String(r.minutes).padStart(2, "0") }),
987
1069
  /* @__PURE__ */ o("span", { class: "text-xs", children: e("countdown.m", "m") }),
988
- /* @__PURE__ */ o($, { children: String(r.seconds).padStart(2, "0") }),
1070
+ /* @__PURE__ */ o(G, { children: String(r.seconds).padStart(2, "0") }),
989
1071
  /* @__PURE__ */ o("span", { class: "text-xs", children: e("countdown.s", "s") })
990
1072
  ] });
991
1073
  }
992
- function $({ children: r }) {
1074
+ function G({ children: r }) {
993
1075
  return /* @__PURE__ */ o("span", { class: "rounded bg-black/20 px-1.5 py-0.5 text-xs font-bold", children: r });
994
1076
  }
995
- function kt({ offer: r }) {
996
- const { t: e } = w(), t = Me(r);
1077
+ function Tt({ offer: r }) {
1078
+ const { t: e } = S(), t = Oe(r);
997
1079
  if (t === null || t.expired) return null;
998
1080
  const n = r.label ?? e("offer.limited_time", "Limited-time offer"), i = r.discount_percent ? `${n} ${r.discount_percent}%` : n;
999
- return /* @__PURE__ */ c(
1081
+ return /* @__PURE__ */ u(
1000
1082
  "div",
1001
1083
  {
1002
1084
  class: "-mb-2 flex flex-wrap items-center justify-center gap-2 rounded-t-xl px-4 pb-5 pt-3 text-[15px] font-semibold leading-tight text-white",
@@ -1006,14 +1088,14 @@ function kt({ offer: r }) {
1006
1088
  },
1007
1089
  role: "status",
1008
1090
  children: [
1009
- /* @__PURE__ */ o(Oe, {}),
1091
+ /* @__PURE__ */ o(Ue, {}),
1010
1092
  /* @__PURE__ */ o("span", { children: i }),
1011
- /* @__PURE__ */ o(Be, { value: t, t: e })
1093
+ /* @__PURE__ */ o(je, { value: t, t: e })
1012
1094
  ]
1013
1095
  }
1014
1096
  );
1015
1097
  }
1016
- function Oe() {
1098
+ function Ue() {
1017
1099
  return /* @__PURE__ */ o(
1018
1100
  "svg",
1019
1101
  {
@@ -1032,43 +1114,40 @@ function Oe() {
1032
1114
  }
1033
1115
  );
1034
1116
  }
1035
- const re = 3, ne = 200, ie = 5e3, oe = 5, vt = 10 * 1024 * 1024, ye = ["image/jpeg", "image/png", "image/webp"], xe = /.+@.+\..+/;
1036
- function _t({ client: r, authSession: e, origin: t, onBack: n }) {
1037
- const { t: i } = w(), s = e?.user.email ?? "", a = s || null, [l, d] = x(s), [p, u] = x(""), [h, b] = x(""), [_, f] = x([]), [g, A] = x(!1), [M, k] = x(null), [E, I] = x({}), O = _e(() => {
1038
- const L = (a ?? l).trim().toLowerCase(), C = p.trim(), U = h.trim();
1039
- return xe.test(L) && C.length >= re && C.length <= ne && U.length >= 1 && U.length <= ie;
1040
- }, [a, l, p, h]), B = () => {
1041
- const L = {}, C = (a ?? l).trim(), U = p.trim(), m = h.trim();
1042
- return C ? xe.test(C.toLowerCase()) || (L.email = i("support.invalid_email", "Invalid email")) : L.email = i("support.required", "Required"), (U.length < re || U.length > ne) && (L.subject = i("support.subject_length", "{min}–{max} characters", {
1043
- min: re,
1044
- max: ne
1045
- })), (m.length < 1 || m.length > ie) && (L.message = i("support.message_length", "{min}–{max} characters", {
1117
+ const be = 3, ye = 200, xe = 5e3, oe = 5, Bt = 10 * 1024 * 1024, we = ["image/jpeg", "image/png", "image/webp"], Et = /.+@.+\..+/;
1118
+ function Pt({ client: r, authSession: e, origin: t, onBack: n }) {
1119
+ const { t: i } = S(), s = e?.user.email ?? "", a = s || null, [l, c] = k(s), [h, d] = k(""), [g, _] = k(""), [p, v] = k([]), [m, A] = k(!1), [y, b] = k(null), [C, I] = k({}), j = () => {
1120
+ const B = {}, T = (a ?? l).trim(), z = h.trim(), O = g.trim();
1121
+ return T ? Et.test(T.toLowerCase()) || (B.email = i("support.invalid_email", "Invalid email")) : B.email = i("support.required", "Required"), (z.length < be || z.length > ye) && (B.subject = i("support.subject_length", "{min}–{max} characters", {
1122
+ min: be,
1123
+ max: ye
1124
+ })), (O.length < 1 || O.length > xe) && (B.message = i("support.message_length", "{min}–{max} characters", {
1046
1125
  min: 1,
1047
- max: ie
1048
- })), I(L), Object.keys(L).length === 0;
1049
- }, R = async (L) => {
1050
- if (L.preventDefault(), !g && B()) {
1051
- A(!0), I((C) => ({ ...C, submit: void 0 }));
1126
+ max: xe
1127
+ })), I(B), Object.keys(B).length === 0;
1128
+ }, M = async (B) => {
1129
+ if (B.preventDefault(), !m && j()) {
1130
+ A(!0), I((T) => ({ ...T, submit: void 0 }));
1052
1131
  try {
1053
- const C = (a ?? l).trim();
1132
+ const T = (a ?? l).trim();
1054
1133
  await r.createSupportTicket({
1055
- subject: p.trim(),
1056
- content: h.trim(),
1057
- email: C || void 0,
1058
- files: _.length > 0 ? _ : void 0
1059
- }), k(C);
1060
- } catch (C) {
1061
- const U = C instanceof j && C.message || "Failed to send. Please try again.";
1062
- I((m) => ({ ...m, submit: U }));
1134
+ subject: h.trim(),
1135
+ content: g.trim(),
1136
+ email: T || void 0,
1137
+ files: p.length > 0 ? p : void 0
1138
+ }), b(T);
1139
+ } catch (T) {
1140
+ const z = T instanceof L && T.message || "Failed to send. Please try again.";
1141
+ I((O) => ({ ...O, submit: z }));
1063
1142
  } finally {
1064
1143
  A(!1);
1065
1144
  }
1066
1145
  }
1067
- }, q = () => {
1068
- u(""), b(""), f([]), I({}), k(null);
1069
- }, D = "flex flex-col gap-3 bg-white px-6 pb-6 pt-3 sm:px-8", N = { boxShadow: "0 -4px 12px -4px rgba(15,23,42,0.06)" };
1070
- return M ? /* @__PURE__ */ c("div", { class: "relative flex-1 min-h-0 flex flex-col", children: [
1071
- /* @__PURE__ */ c("div", { class: "flex-1 min-h-0 overflow-y-auto flex flex-col items-center gap-4 px-6 pb-3 pt-6 sm:px-8 sm:pb-4 sm:pt-8 text-center", children: [
1146
+ }, R = () => {
1147
+ d(""), _(""), v([]), I({}), b(null);
1148
+ }, q = "flex flex-col gap-3 bg-white px-6 pb-6 pt-3 sm:px-8", D = { boxShadow: "0 -4px 12px -4px rgba(15,23,42,0.06)" };
1149
+ return y ? /* @__PURE__ */ u("div", { class: "relative flex-1 min-h-0 flex flex-col", children: [
1150
+ /* @__PURE__ */ u("div", { class: "flex-1 min-h-0 overflow-y-auto flex flex-col items-center gap-4 px-6 pb-3 pt-6 sm:px-8 sm:pb-4 sm:pt-8 text-center", children: [
1072
1151
  /* @__PURE__ */ o(
1073
1152
  "div",
1074
1153
  {
@@ -1089,17 +1168,17 @@ function _t({ client: r, authSession: e, origin: t, onBack: n }) {
1089
1168
  }
1090
1169
  ),
1091
1170
  /* @__PURE__ */ o("div", { class: "text-lg font-semibold tracking-tight text-gray-900", children: i("support.success_heading", "Request submitted") }),
1092
- /* @__PURE__ */ c("div", { class: "max-w-[320px] text-sm leading-relaxed text-gray-500", children: [
1171
+ /* @__PURE__ */ u("div", { class: "max-w-[320px] text-sm leading-relaxed text-gray-500", children: [
1093
1172
  i(
1094
1173
  "support.success_message_prefix",
1095
1174
  "We've received your message and will respond to"
1096
1175
  ),
1097
1176
  " ",
1098
- /* @__PURE__ */ o("b", { class: "text-gray-700", children: M }),
1177
+ /* @__PURE__ */ o("b", { class: "text-gray-700", children: y }),
1099
1178
  "."
1100
1179
  ] })
1101
1180
  ] }),
1102
- /* @__PURE__ */ o("div", { class: D, style: N, children: /* @__PURE__ */ c("div", { class: "flex items-center justify-center gap-3", children: [
1181
+ /* @__PURE__ */ o("div", { class: q, style: D, children: /* @__PURE__ */ u("div", { class: "flex items-center justify-center gap-3", children: [
1103
1182
  /* @__PURE__ */ o(
1104
1183
  "button",
1105
1184
  {
@@ -1113,7 +1192,7 @@ function _t({ client: r, authSession: e, origin: t, onBack: n }) {
1113
1192
  "button",
1114
1193
  {
1115
1194
  type: "button",
1116
- onClick: q,
1195
+ onClick: R,
1117
1196
  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)]",
1118
1197
  style: {
1119
1198
  background: "linear-gradient(180deg, color-mix(in srgb, var(--pw-accent) 92%, white), var(--pw-accent))",
@@ -1123,63 +1202,63 @@ function _t({ client: r, authSession: e, origin: t, onBack: n }) {
1123
1202
  }
1124
1203
  )
1125
1204
  ] }) })
1126
- ] }) : /* @__PURE__ */ c("form", { onSubmit: R, class: "relative flex-1 min-h-0 flex flex-col", children: [
1127
- /* @__PURE__ */ o(St, { onClick: n, ariaLabel: i("nav.back_aria", "Back") }),
1128
- /* @__PURE__ */ o("div", { class: "flex-1 min-h-0 overflow-y-auto px-6 pb-3 pt-6 sm:px-8 sm:pb-4 sm:pt-8", children: /* @__PURE__ */ c("div", { class: "flex flex-col gap-5", children: [
1129
- /* @__PURE__ */ c("div", { class: "flex flex-col gap-2 pr-10", children: [
1205
+ ] }) : /* @__PURE__ */ u("form", { onSubmit: M, class: "relative flex-1 min-h-0 flex flex-col", children: [
1206
+ /* @__PURE__ */ o(Ot, { onClick: n, ariaLabel: i("nav.back_aria", "Back") }),
1207
+ /* @__PURE__ */ o("div", { class: "flex-1 min-h-0 overflow-y-auto px-6 pb-3 pt-6 sm:px-8 sm:pb-4 sm:pt-8", children: /* @__PURE__ */ u("div", { class: "flex flex-col gap-5", children: [
1208
+ /* @__PURE__ */ u("div", { class: "flex flex-col gap-2 pr-10", children: [
1130
1209
  /* @__PURE__ */ o("h2", { class: "text-3xl font-bold tracking-tight text-gray-900", children: i("support.heading", "Support") }),
1131
1210
  /* @__PURE__ */ o("p", { class: "text-base leading-relaxed text-gray-600", children: i("support.instruction", "Please fill out the form below to submit your support request.") })
1132
1211
  ] }),
1133
- /* @__PURE__ */ c("div", { class: "flex flex-col gap-3", children: [
1134
- a ? /* @__PURE__ */ c("div", { class: "rounded-2xl bg-gray-100 px-5 py-3 text-sm text-gray-600", children: [
1212
+ /* @__PURE__ */ u("div", { class: "flex flex-col gap-3", children: [
1213
+ a ? /* @__PURE__ */ u("div", { class: "rounded-2xl bg-gray-100 px-5 py-3 text-sm text-gray-600", children: [
1135
1214
  i("support.sending_as", "Sending as"),
1136
1215
  " ",
1137
1216
  /* @__PURE__ */ o("b", { class: "font-medium text-gray-900", children: a })
1138
1217
  ] }) : /* @__PURE__ */ o(
1139
- be,
1218
+ ke,
1140
1219
  {
1141
1220
  type: "email",
1142
1221
  placeholder: i("support.email_placeholder", "Enter your email *"),
1143
1222
  value: l,
1144
- onInput: d,
1145
- error: E.email,
1223
+ onInput: c,
1224
+ error: C.email,
1146
1225
  autocomplete: "email",
1147
1226
  required: !0
1148
1227
  }
1149
1228
  ),
1150
1229
  /* @__PURE__ */ o(
1151
- be,
1230
+ ke,
1152
1231
  {
1153
1232
  type: "text",
1154
1233
  placeholder: i("support.subject_placeholder", "Enter your subject *"),
1155
- value: p,
1156
- onInput: u,
1157
- error: E.subject,
1234
+ value: h,
1235
+ onInput: d,
1236
+ error: C.subject,
1158
1237
  required: !0
1159
1238
  }
1160
1239
  ),
1161
1240
  /* @__PURE__ */ o(
1162
- Ct,
1241
+ jt,
1163
1242
  {
1164
1243
  placeholder: i("support.message_placeholder", "Enter your message *"),
1165
- value: h,
1166
- onInput: b,
1167
- error: E.message,
1244
+ value: g,
1245
+ onInput: _,
1246
+ error: C.message,
1168
1247
  required: !0
1169
1248
  }
1170
1249
  ),
1171
- /* @__PURE__ */ o(It, { files: _, onChange: f, disabled: g })
1250
+ /* @__PURE__ */ o(Ut, { files: p, onChange: v, disabled: m })
1172
1251
  ] })
1173
1252
  ] }) }),
1174
- /* @__PURE__ */ c("div", { class: D, style: N, children: [
1175
- E.submit && /* @__PURE__ */ o("p", { class: "text-sm text-red-600", children: E.submit }),
1176
- /* @__PURE__ */ c("div", { class: "flex items-center justify-end gap-3", children: [
1253
+ /* @__PURE__ */ u("div", { class: q, style: D, children: [
1254
+ C.submit && /* @__PURE__ */ o("p", { class: "text-sm text-red-600", children: C.submit }),
1255
+ /* @__PURE__ */ u("div", { class: "flex items-center justify-end gap-3", children: [
1177
1256
  /* @__PURE__ */ o(
1178
1257
  "button",
1179
1258
  {
1180
1259
  type: "button",
1181
1260
  onClick: n,
1182
- disabled: g,
1261
+ disabled: m,
1183
1262
  class: "rounded-full px-4 py-2 text-base font-medium text-gray-700 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)]",
1184
1263
  children: t === "standalone" ? i("support.close_button", "Close") : i("nav.back_aria", "Back")
1185
1264
  }
@@ -1188,20 +1267,20 @@ function _t({ client: r, authSession: e, origin: t, onBack: n }) {
1188
1267
  "button",
1189
1268
  {
1190
1269
  type: "submit",
1191
- disabled: !O || g,
1270
+ disabled: m,
1192
1271
  class: "pw-cta-shimmer relative flex h-12 items-center justify-center overflow-hidden rounded-full px-8 text-base font-semibold text-white transition-transform duration-150 active:scale-[0.98] disabled:cursor-not-allowed disabled:opacity-60 focus:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:ring-[var(--pw-accent)]",
1193
1272
  style: {
1194
1273
  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%)",
1195
1274
  boxShadow: "0 0 20px 0 color-mix(in srgb, var(--pw-accent) 25%, transparent), inset 0 0 8px 0 color-mix(in srgb, white 25%, transparent)"
1196
1275
  },
1197
- children: g ? /* @__PURE__ */ o("span", { class: "relative z-10 inline-block h-4 w-4 animate-spin rounded-full border-2 border-white/40 border-t-white" }) : /* @__PURE__ */ o("span", { class: "relative z-10", children: i("support.send_button", "Send") })
1276
+ children: m ? /* @__PURE__ */ o("span", { class: "relative z-10 inline-block h-4 w-4 animate-spin rounded-full border-2 border-white/40 border-t-white" }) : /* @__PURE__ */ o("span", { class: "relative z-10", children: i("support.send_button", "Send") })
1198
1277
  }
1199
1278
  )
1200
1279
  ] })
1201
1280
  ] })
1202
1281
  ] });
1203
1282
  }
1204
- function St({ onClick: r, ariaLabel: e }) {
1283
+ function Ot({ onClick: r, ariaLabel: e }) {
1205
1284
  return /* @__PURE__ */ o(
1206
1285
  "button",
1207
1286
  {
@@ -1209,7 +1288,7 @@ function St({ onClick: r, ariaLabel: e }) {
1209
1288
  onClick: r,
1210
1289
  "aria-label": e,
1211
1290
  class: "absolute right-4 top-4 z-10 flex h-8 w-8 items-center justify-center rounded-full text-gray-400 transition-colors hover:bg-gray-100 hover:text-gray-700 focus:outline-none focus-visible:ring-2 focus-visible:ring-[var(--pw-accent)]",
1212
- children: /* @__PURE__ */ c("svg", { width: "18", height: "18", viewBox: "0 0 20 20", fill: "none", "aria-hidden": "true", children: [
1291
+ children: /* @__PURE__ */ u("svg", { width: "18", height: "18", viewBox: "0 0 20 20", fill: "none", "aria-hidden": "true", children: [
1213
1292
  /* @__PURE__ */ o(
1214
1293
  "path",
1215
1294
  {
@@ -1234,7 +1313,7 @@ function St({ onClick: r, ariaLabel: e }) {
1234
1313
  }
1235
1314
  );
1236
1315
  }
1237
- function be({
1316
+ function ke({
1238
1317
  type: r,
1239
1318
  placeholder: e,
1240
1319
  value: t,
@@ -1243,7 +1322,7 @@ function be({
1243
1322
  autocomplete: s,
1244
1323
  required: a
1245
1324
  }) {
1246
- return /* @__PURE__ */ c("div", { children: [
1325
+ return /* @__PURE__ */ u("div", { children: [
1247
1326
  /* @__PURE__ */ o(
1248
1327
  "input",
1249
1328
  {
@@ -1259,14 +1338,14 @@ function be({
1259
1338
  i && /* @__PURE__ */ o("span", { class: "mt-1 ml-2 block text-sm text-red-600", children: i })
1260
1339
  ] });
1261
1340
  }
1262
- function Ct({
1341
+ function jt({
1263
1342
  placeholder: r,
1264
1343
  value: e,
1265
1344
  onInput: t,
1266
1345
  error: n,
1267
1346
  required: i
1268
1347
  }) {
1269
- return /* @__PURE__ */ c("div", { children: [
1348
+ return /* @__PURE__ */ u("div", { children: [
1270
1349
  /* @__PURE__ */ o(
1271
1350
  "textarea",
1272
1351
  {
@@ -1281,39 +1360,39 @@ function Ct({
1281
1360
  n && /* @__PURE__ */ o("span", { class: "mt-1 ml-2 block text-sm text-red-600", children: n })
1282
1361
  ] });
1283
1362
  }
1284
- function It({ files: r, onChange: e, disabled: t }) {
1285
- const { t: n } = w(), i = z(null), [s, a] = x(!1), [l, d] = x(null), p = (u) => {
1286
- if (!u || t) return;
1287
- d(null);
1288
- const h = Array.from(u);
1289
- if (r.length + h.length > oe) {
1290
- d(n("support.too_many_files", "Up to {max} files", { max: oe }));
1363
+ function Ut({ files: r, onChange: e, disabled: t }) {
1364
+ const { t: n } = S(), i = U(null), [s, a] = k(!1), [l, c] = k(null), h = (d) => {
1365
+ if (!d || t) return;
1366
+ c(null);
1367
+ const g = Array.from(d);
1368
+ if (r.length + g.length > oe) {
1369
+ c(n("support.too_many_files", "Up to {max} files", { max: oe }));
1291
1370
  return;
1292
1371
  }
1293
- const b = h.filter(
1294
- (_) => ye.includes(_.type) && _.size <= vt
1372
+ const _ = g.filter(
1373
+ (p) => we.includes(p.type) && p.size <= Bt
1295
1374
  );
1296
- if (b.length !== h.length) {
1297
- d(n("support.invalid_file", "Only JPEG/PNG/WebP, ≤ 10MB each"));
1375
+ if (_.length !== g.length) {
1376
+ c(n("support.invalid_file", "Only JPEG/PNG/WebP, ≤ 10MB each"));
1298
1377
  return;
1299
1378
  }
1300
- e([...r, ...b]);
1379
+ e([...r, ..._]);
1301
1380
  };
1302
- return /* @__PURE__ */ c("div", { children: [
1381
+ return /* @__PURE__ */ u("div", { children: [
1303
1382
  /* @__PURE__ */ o("span", { class: "text-xs font-medium text-gray-700", children: n("support.attachments_label", "Attachments (optional)") }),
1304
- /* @__PURE__ */ c(
1383
+ /* @__PURE__ */ u(
1305
1384
  "div",
1306
1385
  {
1307
1386
  role: "button",
1308
1387
  tabIndex: 0,
1309
1388
  "aria-label": n("support.attachments_aria", "Attachments upload"),
1310
1389
  onClick: () => !t && i.current?.click(),
1311
- onDragOver: (u) => {
1312
- u.preventDefault(), t || a(!0);
1390
+ onDragOver: (d) => {
1391
+ d.preventDefault(), t || a(!0);
1313
1392
  },
1314
1393
  onDragLeave: () => a(!1),
1315
- onDrop: (u) => {
1316
- u.preventDefault(), a(!1), p(u.dataTransfer?.files ?? null);
1394
+ onDrop: (d) => {
1395
+ d.preventDefault(), a(!1), h(d.dataTransfer?.files ?? null);
1317
1396
  },
1318
1397
  class: `mt-1.5 cursor-pointer rounded-2xl border border-dashed p-3.5 text-center transition-all ${s ? "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"} ${t ? "cursor-not-allowed opacity-60" : ""}`,
1319
1398
  children: [
@@ -1330,69 +1409,69 @@ function It({ files: r, onChange: e, disabled: t }) {
1330
1409
  ref: i,
1331
1410
  type: "file",
1332
1411
  multiple: !0,
1333
- accept: ye.join(","),
1412
+ accept: we.join(","),
1334
1413
  class: "hidden",
1335
- onChange: (u) => {
1336
- p(u.target.files), u.currentTarget.value = "";
1414
+ onChange: (d) => {
1415
+ h(d.target.files), d.currentTarget.value = "";
1337
1416
  }
1338
1417
  }
1339
1418
  ),
1340
1419
  l && /* @__PURE__ */ o("p", { class: "mt-1 text-xs text-red-600", children: l }),
1341
- r.length > 0 && /* @__PURE__ */ o("ul", { class: "mt-2 flex flex-col gap-1", children: r.map((u, h) => /* @__PURE__ */ c(
1420
+ r.length > 0 && /* @__PURE__ */ o("ul", { class: "mt-2 flex flex-col gap-1", children: r.map((d, g) => /* @__PURE__ */ u(
1342
1421
  "li",
1343
1422
  {
1344
1423
  class: "flex items-center justify-between gap-2 rounded bg-gray-50 px-2 py-1 text-xs",
1345
1424
  children: [
1346
- /* @__PURE__ */ o("span", { class: "truncate text-gray-700", children: u.name }),
1425
+ /* @__PURE__ */ o("span", { class: "truncate text-gray-700", children: d.name }),
1347
1426
  /* @__PURE__ */ o(
1348
1427
  "button",
1349
1428
  {
1350
1429
  type: "button",
1351
1430
  onClick: () => {
1352
- const b = [...r];
1353
- b.splice(h, 1), e(b);
1431
+ const _ = [...r];
1432
+ _.splice(g, 1), e(_);
1354
1433
  },
1355
1434
  disabled: t,
1356
1435
  class: "text-gray-500 hover:text-red-600 disabled:cursor-not-allowed disabled:opacity-60",
1357
- "aria-label": n("support.remove_file_aria", "Remove {filename}", { filename: u.name }),
1436
+ "aria-label": n("support.remove_file_aria", "Remove {filename}", { filename: d.name }),
1358
1437
  children: "✕"
1359
1438
  }
1360
1439
  )
1361
1440
  ]
1362
1441
  },
1363
- `${u.name}-${u.size}-${h}`
1442
+ `${d.name}-${d.size}-${g}`
1364
1443
  )) })
1365
1444
  ] });
1366
1445
  }
1367
- const Lt = {
1446
+ const Rt = {
1368
1447
  day: "cta.get_plan_daily",
1369
1448
  week: "cta.get_plan_weekly",
1370
1449
  month: "cta.get_plan_monthly",
1371
1450
  year: "cta.get_plan_yearly"
1372
- }, At = {
1451
+ }, Dt = {
1373
1452
  day: "Get Daily Plan",
1374
1453
  week: "Get Weekly Plan",
1375
1454
  month: "Get Monthly Plan",
1376
1455
  year: "Get Yearly Plan"
1377
1456
  };
1378
- function Et(r, e, t, n) {
1457
+ function zt(r, e, t, n) {
1379
1458
  if (e === "close") return n("cta.close", "Close");
1380
1459
  if (!r) return n("cta.continue", "Continue");
1381
1460
  if (!t && r.trial_days && r.interval && r.interval !== "lifetime")
1382
1461
  return n("cta.start_trial", "Start {days}-Day Free Trial", { days: r.trial_days });
1383
1462
  if (!r.interval || r.interval === "lifetime")
1384
1463
  return n("cta.get_lifetime_access", "Get Lifetime Access");
1385
- const i = Lt[r.interval];
1386
- return i ? n(i, At[r.interval]) : n("cta.get_plan_generic", "Get {interval} Plan", {
1387
- interval: Pt(r.interval)
1464
+ const i = Rt[r.interval];
1465
+ return i ? n(i, Dt[r.interval]) : n("cta.get_plan_generic", "Get {interval} Plan", {
1466
+ interval: qt(r.interval)
1388
1467
  });
1389
1468
  }
1390
- function Pt(r) {
1469
+ function qt(r) {
1391
1470
  return r.length ? r[0].toUpperCase() + r.slice(1) : r;
1392
1471
  }
1393
- function Tt({ block: r, ctx: e }) {
1394
- const { t } = w(), [n, i] = x(!1), s = r.priceId ?? e.selectedPriceId, a = n || r.action === "checkout" && !s, l = s ? e.bootstrap.prices.find((h) => h.id === s) ?? null : null, d = e.bootstrap.user?.had_previous_trial ?? !1, p = r.label ?? Et(l, r.action, d, t);
1395
- return /* @__PURE__ */ c(
1472
+ function Nt({ block: r, ctx: e }) {
1473
+ const { t } = S(), [n, i] = k(!1), s = r.priceId ?? e.selectedPriceId, a = n || r.action === "checkout" && !s, l = s ? e.bootstrap.prices.find((g) => g.id === s) ?? null : null, c = e.bootstrap.user?.had_previous_trial ?? !1, h = r.label ?? zt(l, r.action, c, t);
1474
+ return /* @__PURE__ */ u(
1396
1475
  "button",
1397
1476
  {
1398
1477
  type: "button",
@@ -1423,13 +1502,13 @@ function Tt({ block: r, ctx: e }) {
1423
1502
  "aria-hidden": "true"
1424
1503
  }
1425
1504
  ),
1426
- n ? /* @__PURE__ */ o("span", { class: "relative z-10 inline-block h-4 w-4 animate-spin rounded-full border-2 border-white/40 border-t-white" }) : /* @__PURE__ */ o("span", { class: "relative z-10", children: p })
1505
+ n ? /* @__PURE__ */ o("span", { class: "relative z-10 inline-block h-4 w-4 animate-spin rounded-full border-2 border-white/40 border-t-white" }) : /* @__PURE__ */ o("span", { class: "relative z-10", children: h })
1427
1506
  ]
1428
1507
  }
1429
1508
  );
1430
1509
  }
1431
- function Mt({ ctx: r }) {
1432
- const { t: e } = w(), t = r.authSession, n = r.auth, [i, s] = x(!1), a = () => r.onAction("support");
1510
+ function Ft({ ctx: r }) {
1511
+ const { t: e } = S(), t = r.authSession, n = r.auth, [i, s] = k(!1), a = () => r.onAction("support");
1433
1512
  if (t && !t.user.is_anonymous) {
1434
1513
  const l = async () => {
1435
1514
  if (!(!n || i)) {
@@ -1442,26 +1521,26 @@ function Mt({ ctx: r }) {
1442
1521
  }
1443
1522
  }
1444
1523
  };
1445
- 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: [
1446
- /* @__PURE__ */ c("span", { children: [
1524
+ return /* @__PURE__ */ u("div", { class: "-mt-3 flex flex-col items-center gap-1.5 pt-1 text-center text-[13px] text-gray-500", children: [
1525
+ /* @__PURE__ */ u("span", { children: [
1447
1526
  e("session.signed_in_as_prefix", "Signed in as"),
1448
1527
  " ",
1449
1528
  /* @__PURE__ */ o("b", { class: "font-medium text-gray-700", children: t.user.email })
1450
1529
  ] }),
1451
- /* @__PURE__ */ c("div", { class: "flex items-center justify-center gap-3", children: [
1452
- /* @__PURE__ */ o(H, { onClick: l, disabled: !n || i, children: i ? e("session.signing_out", "Signing out…") : e("session.sign_out", "Sign Out") }),
1453
- /* @__PURE__ */ o(we, {}),
1454
- /* @__PURE__ */ o(H, { onClick: a, children: e("session.contact_support", "Contact Support") })
1530
+ /* @__PURE__ */ u("div", { class: "flex items-center justify-center gap-3", children: [
1531
+ /* @__PURE__ */ o(W, { onClick: l, disabled: !n || i, children: i ? e("session.signing_out", "Signing out…") : e("session.sign_out", "Sign Out") }),
1532
+ /* @__PURE__ */ o(ve, {}),
1533
+ /* @__PURE__ */ o(W, { onClick: a, children: e("session.contact_support", "Contact Support") })
1455
1534
  ] })
1456
1535
  ] });
1457
1536
  }
1458
- return /* @__PURE__ */ c("div", { class: "-mt-3 flex items-center justify-center gap-3 pt-1 text-center text-[13px]", children: [
1459
- /* @__PURE__ */ o(H, { onClick: () => r.onAction("restore"), children: e("session.restore_purchases", "Restore purchases") }),
1460
- /* @__PURE__ */ o(we, {}),
1461
- /* @__PURE__ */ o(H, { onClick: a, children: e("session.contact_support", "Contact Support") })
1537
+ return /* @__PURE__ */ u("div", { class: "-mt-3 flex items-center justify-center gap-3 pt-1 text-center text-[13px]", children: [
1538
+ /* @__PURE__ */ o(W, { onClick: () => r.onAction("restore"), children: e("session.restore_purchases", "Restore purchases") }),
1539
+ /* @__PURE__ */ o(ve, {}),
1540
+ /* @__PURE__ */ o(W, { onClick: a, children: e("session.contact_support", "Contact Support") })
1462
1541
  ] });
1463
1542
  }
1464
- function H({
1543
+ function W({
1465
1544
  onClick: r,
1466
1545
  disabled: e,
1467
1546
  children: t
@@ -1478,11 +1557,11 @@ function H({
1478
1557
  }
1479
1558
  );
1480
1559
  }
1481
- function we() {
1560
+ function ve() {
1482
1561
  return /* @__PURE__ */ o("span", { class: "h-1 w-1 rounded-full bg-gray-300", "aria-hidden": "true" });
1483
1562
  }
1484
- function Bt({ block: r }) {
1485
- return r.items.length ? /* @__PURE__ */ o("ul", { class: "flex flex-col gap-2.5", role: "list", children: r.items.map((e) => /* @__PURE__ */ c("li", { class: "flex items-start gap-3 text-sm text-gray-700", children: [
1563
+ function Vt({ block: r }) {
1564
+ return r.items.length ? /* @__PURE__ */ o("ul", { class: "flex flex-col gap-2.5", role: "list", children: r.items.map((e) => /* @__PURE__ */ u("li", { class: "flex items-start gap-3 text-sm text-gray-700", children: [
1486
1565
  /* @__PURE__ */ o(
1487
1566
  "svg",
1488
1567
  {
@@ -1504,18 +1583,18 @@ function Bt({ block: r }) {
1504
1583
  )
1505
1584
  }
1506
1585
  ),
1507
- /* @__PURE__ */ c("div", { class: "flex flex-col gap-0.5", children: [
1586
+ /* @__PURE__ */ u("div", { class: "flex flex-col gap-0.5", children: [
1508
1587
  /* @__PURE__ */ o("span", { class: "font-medium leading-snug text-gray-900", children: e.name }),
1509
1588
  e.desc ? /* @__PURE__ */ o("span", { class: "text-xs leading-relaxed text-gray-400", children: e.desc }) : null
1510
1589
  ] })
1511
1590
  ] }, e.id)) }) : null;
1512
1591
  }
1513
- function Ot({ block: r }) {
1514
- const { t: e } = w(), t = r.title ?? e("pricing.money_back", "30-day money-back guarantee"), n = r.subtitle, i = (r.icon ?? "dollar_shield") !== "none", s = Ut(t);
1515
- return /* @__PURE__ */ c("div", { class: "flex flex-col items-center gap-1.5 border-b-1 pb-4 mb-1 border-gray-100", children: [
1516
- /* @__PURE__ */ c("div", { class: "inline-flex items-center gap-2 text-[12px] text-gray-700", children: [
1517
- i ? /* @__PURE__ */ o(jt, {}) : null,
1518
- s ? /* @__PURE__ */ c("span", { children: [
1592
+ function $t({ block: r }) {
1593
+ const { t: e } = S(), t = r.title ?? e("pricing.money_back", "30-day money-back guarantee"), n = r.subtitle, i = (r.icon ?? "dollar_shield") !== "none", s = Ht(t);
1594
+ return /* @__PURE__ */ u("div", { class: "flex flex-col items-center gap-1.5 border-b-1 pb-4 mb-1 border-gray-100", children: [
1595
+ /* @__PURE__ */ u("div", { class: "inline-flex items-center gap-2 text-[12px] text-gray-700", children: [
1596
+ i ? /* @__PURE__ */ o(Gt, {}) : null,
1597
+ s ? /* @__PURE__ */ u("span", { children: [
1519
1598
  /* @__PURE__ */ o("b", { class: "font-bold text-gray-900", children: s.bold }),
1520
1599
  " ",
1521
1600
  /* @__PURE__ */ o("span", { class: "font-medium", children: s.rest })
@@ -1524,12 +1603,12 @@ function Ot({ block: r }) {
1524
1603
  n ? /* @__PURE__ */ o("span", { class: "text-center text-xs leading-relaxed text-gray-500", children: n }) : null
1525
1604
  ] });
1526
1605
  }
1527
- function Ut(r) {
1606
+ function Ht(r) {
1528
1607
  const e = r.match(/^(\d+[-\s]?days?)\s+(.+)$/i);
1529
1608
  return e ? { bold: e[1], rest: e[2] } : null;
1530
1609
  }
1531
- function jt() {
1532
- return /* @__PURE__ */ c(
1610
+ function Gt() {
1611
+ return /* @__PURE__ */ u(
1533
1612
  "svg",
1534
1613
  {
1535
1614
  xmlns: "http://www.w3.org/2000/svg",
@@ -1563,22 +1642,22 @@ function jt() {
1563
1642
  }
1564
1643
  );
1565
1644
  }
1566
- const Ue = 24, Rt = 16, zt = 2;
1567
- function Dt(r, e) {
1568
- const t = e * zt;
1569
- let n = Ue;
1570
- for (r.style.fontSize = `${n}px`; r.scrollHeight > t && n > Rt; )
1645
+ const Re = 24, Wt = 16, Zt = 2;
1646
+ function Yt(r, e) {
1647
+ const t = e * Zt;
1648
+ let n = Re;
1649
+ for (r.style.fontSize = `${n}px`; r.scrollHeight > t && n > Wt; )
1571
1650
  n -= 1, r.style.fontSize = `${n}px`;
1572
1651
  }
1573
- function qt({ block: r, ctx: e }) {
1574
- const t = r.level ?? 1, n = `h${t}`, i = t === 1 ? "text-[22px] sm:text-2xl font-semibold leading-tight text-center text-balance text-gray-800" : t === 2 ? "text-xl font-semibold leading-snug text-gray-900 tracking-tight" : "text-base font-medium text-gray-900", s = z(null), a = t === 1 && !!e.bootstrap.settings.title_auto_fit;
1575
- return T(() => {
1652
+ function Kt({ block: r, ctx: e }) {
1653
+ const t = r.level ?? 1, n = `h${t}`, i = t === 1 ? "text-[22px] sm:text-2xl font-semibold leading-tight text-center text-balance text-gray-800" : t === 2 ? "text-xl font-semibold leading-snug text-gray-900 tracking-tight" : "text-base font-medium text-gray-900", s = U(null), a = t === 1 && !!e.bootstrap.settings.title_auto_fit;
1654
+ return P(() => {
1576
1655
  if (!a || !s.current) return;
1577
- const l = getComputedStyle(s.current), d = parseFloat(l.lineHeight) || Ue * 1.5;
1578
- Dt(s.current, d);
1656
+ const l = getComputedStyle(s.current), c = parseFloat(l.lineHeight) || Re * 1.5;
1657
+ Yt(s.current, c);
1579
1658
  }, [a, r.text]), /* @__PURE__ */ o(n, { ref: s, class: i, children: r.text });
1580
1659
  }
1581
- function Nt(r) {
1660
+ function Xt(r) {
1582
1661
  const e = r.local ?? { currency: r.currency, amount: r.amount };
1583
1662
  if (r.interval === "year") {
1584
1663
  const t = (r.interval_count ?? 1) * 12;
@@ -1604,11 +1683,11 @@ function se(r, e) {
1604
1683
  return { currency: e, amount: String(r) };
1605
1684
  }
1606
1685
  }
1607
- function le(r, e) {
1608
- const { amount: t, currency: n } = Nt(r);
1686
+ function ce(r, e) {
1687
+ const { amount: t, currency: n } = Xt(r);
1609
1688
  if (!e) {
1610
- const { currency: l, amount: d } = se(t, n);
1611
- return { currency: l, amount: d, originalAmount: null };
1689
+ const { currency: l, amount: c } = se(t, n);
1690
+ return { currency: l, amount: c, originalAmount: null };
1612
1691
  }
1613
1692
  const i = t * (1 - e / 100), s = se(i, n), a = se(t, n);
1614
1693
  return {
@@ -1617,16 +1696,7 @@ function le(r, e) {
1617
1696
  originalAmount: `${a.currency}${a.amount}`
1618
1697
  };
1619
1698
  }
1620
- function G(r, e) {
1621
- if (!r || r.length === 0) return null;
1622
- const t = r.find(
1623
- (i) => i.price_id === e && i.discount_percent && i.discount_percent > 0
1624
- );
1625
- return t || (r.find(
1626
- (i) => i.price_id == null && i.discount_percent && i.discount_percent > 0
1627
- ) ?? null);
1628
- }
1629
- function je(r, e) {
1699
+ function De(r, e) {
1630
1700
  if (r.label) return r.label.toUpperCase();
1631
1701
  if (!r.interval || r.interval === "lifetime")
1632
1702
  return e("pricing.plan_label.lifetime", "LIFETIME");
@@ -1638,15 +1708,15 @@ function je(r, e) {
1638
1708
  }[r.interval];
1639
1709
  return n ? e(n.key, n.fallback) : `${r.interval.toUpperCase()} PLAN`;
1640
1710
  }
1641
- function ce(r, e) {
1711
+ function ue(r, e) {
1642
1712
  if (!r.interval || r.interval === "lifetime")
1643
1713
  return e("pricing.interval.lifetime_short", "lifetime");
1644
1714
  if (r.interval === "year") return e("pricing.interval.month", "month");
1645
1715
  const t = r.interval_count ?? 1;
1646
1716
  return t === 1 ? e(`pricing.interval.${r.interval}`, r.interval) : `${t} ${r.interval}s`;
1647
1717
  }
1648
- function Ft({ block: r, ctx: e }) {
1649
- const { t } = w(), n = r.priceIds && r.priceIds.length > 0 ? new Set(r.priceIds) : null, i = e.bootstrap.prices.filter((a) => !n || n.has(a.id));
1718
+ function Jt({ block: r, ctx: e }) {
1719
+ const { t } = S(), n = r.priceIds && r.priceIds.length > 0 ? new Set(r.priceIds) : null, i = e.bootstrap.prices.filter((a) => !n || n.has(a.id));
1650
1720
  if (i.length === 0)
1651
1721
  return /* @__PURE__ */ o("p", { class: "text-sm text-gray-500", children: t("pricing.no_prices", "No prices available.") });
1652
1722
  const s = r.popular_label ?? t("pricing.most_popular", "Most popular");
@@ -1658,13 +1728,13 @@ function Ft({ block: r, ctx: e }) {
1658
1728
  role: "radiogroup",
1659
1729
  "aria-label": t("pricing.plans_aria", "Plans"),
1660
1730
  children: i.map((a, l) => /* @__PURE__ */ o(
1661
- $t,
1731
+ er,
1662
1732
  {
1663
1733
  price: a,
1664
1734
  isLast: l === i.length - 1,
1665
1735
  isPopular: r.popular_price_id === a.id,
1666
1736
  popularLabel: s,
1667
- offer: G(e.bootstrap.offers, a.id),
1737
+ offer: $(e.bootstrap.offers, a.id, { readStart: N }),
1668
1738
  selected: e.selectedPriceId === a.id,
1669
1739
  onSelect: () => {
1670
1740
  e.setSelectedPriceId(a.id), e.onAction("price_selected", { priceId: a.id, price: a });
@@ -1677,7 +1747,7 @@ function Ft({ block: r, ctx: e }) {
1677
1747
  );
1678
1748
  if (r.view === "horizontal") {
1679
1749
  const a = Math.min(i.length, 3), l = i.some(
1680
- (d) => (G(e.bootstrap.offers, d.id)?.discount_percent ?? 0) > 0
1750
+ (c) => ($(e.bootstrap.offers, c.id, { readStart: N })?.discount_percent ?? 0) > 0
1681
1751
  );
1682
1752
  return /* @__PURE__ */ o(
1683
1753
  "div",
@@ -1686,21 +1756,21 @@ function Ft({ block: r, ctx: e }) {
1686
1756
  style: { gridTemplateColumns: `repeat(${a}, minmax(0, 1fr))` },
1687
1757
  role: "radiogroup",
1688
1758
  "aria-label": t("pricing.plans_aria", "Plans"),
1689
- children: i.map((d) => /* @__PURE__ */ o(
1690
- Ht,
1759
+ children: i.map((c) => /* @__PURE__ */ o(
1760
+ tr,
1691
1761
  {
1692
- price: d,
1693
- isPopular: r.popular_price_id === d.id,
1762
+ price: c,
1763
+ isPopular: r.popular_price_id === c.id,
1694
1764
  popularLabel: s,
1695
- offer: G(e.bootstrap.offers, d.id),
1765
+ offer: $(e.bootstrap.offers, c.id, { readStart: N }),
1696
1766
  reserveStrikeRow: l,
1697
- selected: e.selectedPriceId === d.id,
1767
+ selected: e.selectedPriceId === c.id,
1698
1768
  onSelect: () => {
1699
- e.setSelectedPriceId(d.id), e.onAction("price_selected", { priceId: d.id, price: d });
1769
+ e.setSelectedPriceId(c.id), e.onAction("price_selected", { priceId: c.id, price: c });
1700
1770
  },
1701
1771
  t
1702
1772
  },
1703
- d.id
1773
+ c.id
1704
1774
  ))
1705
1775
  }
1706
1776
  );
@@ -1712,8 +1782,8 @@ function Ft({ block: r, ctx: e }) {
1712
1782
  role: "radiogroup",
1713
1783
  "aria-label": t("pricing.plans_aria", "Plans"),
1714
1784
  children: i.map((a) => {
1715
- const l = e.selectedPriceId === a.id, d = r.popular_price_id === a.id, u = G(e.bootstrap.offers, a.id)?.discount_percent ?? null, { currency: h, amount: b, originalAmount: _ } = le(a, u);
1716
- return /* @__PURE__ */ c(
1785
+ const l = e.selectedPriceId === a.id, c = r.popular_price_id === a.id, d = $(e.bootstrap.offers, a.id, { readStart: N })?.discount_percent ?? null, { currency: g, amount: _, originalAmount: p } = ce(a, d);
1786
+ return /* @__PURE__ */ u(
1717
1787
  "button",
1718
1788
  {
1719
1789
  type: "button",
@@ -1740,7 +1810,7 @@ function Ft({ block: r, ctx: e }) {
1740
1810
  // визуально сдвигает центр content'а вниз. flex items-center
1741
1811
  // на карточке держит галочку по геометрическому центру, что
1742
1812
  // делает её визуально выше — компенсируем небольшим mt'ом.
1743
- d ? "mt-3" : ""
1813
+ c ? "mt-3" : ""
1744
1814
  ].join(" "),
1745
1815
  style: l ? {
1746
1816
  background: "linear-gradient(135deg, color-mix(in srgb, var(--pw-accent) 70%, white) 0%, var(--pw-accent) 50%, color-mix(in srgb, var(--pw-accent) 85%, black) 100%)"
@@ -1766,37 +1836,37 @@ function Ft({ block: r, ctx: e }) {
1766
1836
  )
1767
1837
  }
1768
1838
  ),
1769
- /* @__PURE__ */ c("div", { class: "flex flex-1 flex-col gap-0.5", children: [
1770
- /* @__PURE__ */ c("div", { class: "flex flex-wrap items-center gap-x-2 gap-y-1", children: [
1771
- /* @__PURE__ */ o("span", { class: "text-xs font-normal uppercase tracking-normal text-gray-800/70", children: je(a, t) }),
1772
- _ ? (
1839
+ /* @__PURE__ */ u("div", { class: "flex flex-1 flex-col gap-0.5", children: [
1840
+ /* @__PURE__ */ u("div", { class: "flex flex-wrap items-center gap-x-2 gap-y-1", children: [
1841
+ /* @__PURE__ */ o("span", { class: "text-xs font-normal uppercase tracking-normal text-gray-800/70", children: De(a, t) }),
1842
+ p ? (
1773
1843
  // opacity-60 приглушает strike: глаз сначала ловит label
1774
1844
  // и discount-badge, потом main price; original «бывшая цена»
1775
1845
  // — третичная информация, не должна конкурировать с label.
1776
- /* @__PURE__ */ o("span", { class: "text-[15px] font-normal text-gray-400 opacity-60 line-through decoration-gray-400 decoration-[1.5px]", children: _ })
1846
+ /* @__PURE__ */ o("span", { class: "text-[15px] font-normal text-gray-400 opacity-60 line-through decoration-gray-400 decoration-[1.5px]", children: p })
1777
1847
  ) : null,
1778
- u ? (
1848
+ d ? (
1779
1849
  // Emerald pill — фиксированный «успех/выгода», не зависит от
1780
1850
  // brand_color. Читается даже на тёмных бренд-акцентах.
1781
- /* @__PURE__ */ c("span", { class: "rounded-full bg-emerald-100 px-2.5 py-1 text-xs font-bold leading-none text-emerald-700", children: [
1851
+ /* @__PURE__ */ u("span", { class: "rounded-full bg-emerald-100 px-2.5 py-1 text-xs font-bold leading-none text-emerald-700", children: [
1782
1852
  "-",
1783
- u,
1853
+ d,
1784
1854
  "%"
1785
1855
  ] })
1786
1856
  ) : null
1787
1857
  ] }),
1788
- /* @__PURE__ */ o("div", { class: "flex items-baseline gap-2 flex-wrap", children: /* @__PURE__ */ c("span", { class: "text-[26px] leading-tight whitespace-nowrap text-gray-800 font-medium", children: [
1789
- /* @__PURE__ */ o("span", { class: "opacity-90", children: h }),
1790
- b,
1791
- /* @__PURE__ */ c("span", { class: "text-sm font-normal text-gray-500", children: [
1858
+ /* @__PURE__ */ o("div", { class: "flex items-baseline gap-2 flex-wrap", children: /* @__PURE__ */ u("span", { class: "text-[26px] leading-tight whitespace-nowrap text-gray-800 font-medium", children: [
1859
+ /* @__PURE__ */ o("span", { class: "opacity-90", children: g }),
1860
+ _,
1861
+ /* @__PURE__ */ u("span", { class: "text-sm font-normal text-gray-500", children: [
1792
1862
  " ",
1793
1863
  "/ ",
1794
- ce(a, t)
1864
+ ue(a, t)
1795
1865
  ] })
1796
1866
  ] }) }),
1797
1867
  a.description ? /* @__PURE__ */ o("span", { class: "mt-1 text-xs leading-relaxed text-gray-500", children: a.description }) : null
1798
1868
  ] }),
1799
- d ? /* @__PURE__ */ o(
1869
+ c ? /* @__PURE__ */ o(
1800
1870
  "span",
1801
1871
  {
1802
1872
  class: "absolute -top-[9px] -right-[6px] rounded-[11px] border-[5px] border-white px-2 py-1 text-[12px] font-semibold text-white",
@@ -1812,10 +1882,10 @@ function Ft({ block: r, ctx: e }) {
1812
1882
  }
1813
1883
  );
1814
1884
  }
1815
- function Vt(r, e) {
1885
+ function Qt(r, e) {
1816
1886
  return r.label ? r.label : !r.interval || r.interval === "lifetime" ? e("pricing.interval.lifetime_short", "lifetime") : e(`pricing.interval.${r.interval}`, r.interval);
1817
1887
  }
1818
- function $t({
1888
+ function er({
1819
1889
  price: r,
1820
1890
  isLast: e,
1821
1891
  isPopular: t,
@@ -1825,8 +1895,8 @@ function $t({
1825
1895
  onSelect: a,
1826
1896
  t: l
1827
1897
  }) {
1828
- const d = i?.discount_percent ?? null, { currency: p, amount: u, originalAmount: h } = le(r, d);
1829
- return /* @__PURE__ */ c(
1898
+ const c = i?.discount_percent ?? null, { currency: h, amount: d, originalAmount: g } = ce(r, c);
1899
+ return /* @__PURE__ */ u(
1830
1900
  "button",
1831
1901
  {
1832
1902
  type: "button",
@@ -1866,7 +1936,7 @@ function $t({
1866
1936
  )
1867
1937
  }
1868
1938
  ),
1869
- /* @__PURE__ */ c(
1939
+ /* @__PURE__ */ u(
1870
1940
  "div",
1871
1941
  {
1872
1942
  class: [
@@ -1874,8 +1944,8 @@ function $t({
1874
1944
  e ? "" : "border-b border-gray-200"
1875
1945
  ].join(" "),
1876
1946
  children: [
1877
- /* @__PURE__ */ c("div", { class: "flex flex-wrap items-center gap-1 gap-x-1.5", children: [
1878
- /* @__PURE__ */ o("span", { class: "text-base font-normal capitalize text-gray-800", children: Vt(r, l) }),
1947
+ /* @__PURE__ */ u("div", { class: "flex flex-wrap items-center gap-1 gap-x-1.5", children: [
1948
+ /* @__PURE__ */ o("span", { class: "text-base font-normal capitalize text-gray-800", children: Qt(r, l) }),
1879
1949
  t ? (
1880
1950
  // Pastel brand-mix pill — точно как `badge` в TelegramPricingRadio.
1881
1951
  // Низкий visual weight: pill про "имя плана" (most popular), а не
@@ -1892,22 +1962,22 @@ function $t({
1892
1962
  }
1893
1963
  )
1894
1964
  ) : null,
1895
- d ? /* @__PURE__ */ c("span", { class: "rounded-md bg-emerald-100 px-1.5 py-0.5 text-[10px] font-bold leading-none text-emerald-700", children: [
1965
+ c ? /* @__PURE__ */ u("span", { class: "rounded-md bg-emerald-100 px-1.5 py-0.5 text-[10px] font-bold leading-none text-emerald-700", children: [
1896
1966
  "-",
1897
- d,
1967
+ c,
1898
1968
  "%"
1899
1969
  ] }) : null
1900
1970
  ] }),
1901
1971
  /* @__PURE__ */ o("div", { class: "flex-1" }),
1902
- /* @__PURE__ */ c("span", { class: "flex items-baseline gap-1.5 text-base font-normal text-gray-600", children: [
1903
- h ? /* @__PURE__ */ o("span", { class: "text-xs text-gray-400 line-through decoration-gray-400 decoration-[1.5px]", children: h }) : null,
1904
- /* @__PURE__ */ c("span", { class: "whitespace-nowrap", children: [
1905
- /* @__PURE__ */ o("span", { class: "opacity-90", children: p }),
1906
- u,
1907
- /* @__PURE__ */ c("span", { class: "text-xs text-gray-400", children: [
1972
+ /* @__PURE__ */ u("span", { class: "flex items-baseline gap-1.5 text-base font-normal text-gray-600", children: [
1973
+ g ? /* @__PURE__ */ o("span", { class: "text-xs text-gray-400 line-through decoration-gray-400 decoration-[1.5px]", children: g }) : null,
1974
+ /* @__PURE__ */ u("span", { class: "whitespace-nowrap", children: [
1975
+ /* @__PURE__ */ o("span", { class: "opacity-90", children: h }),
1976
+ d,
1977
+ /* @__PURE__ */ u("span", { class: "text-xs text-gray-400", children: [
1908
1978
  " ",
1909
1979
  "/ ",
1910
- ce(r, l)
1980
+ ue(r, l)
1911
1981
  ] })
1912
1982
  ] })
1913
1983
  ] })
@@ -1918,7 +1988,7 @@ function $t({
1918
1988
  }
1919
1989
  );
1920
1990
  }
1921
- function Ht({
1991
+ function tr({
1922
1992
  price: r,
1923
1993
  isPopular: e,
1924
1994
  popularLabel: t,
@@ -1928,8 +1998,8 @@ function Ht({
1928
1998
  onSelect: a,
1929
1999
  t: l
1930
2000
  }) {
1931
- const d = n?.discount_percent ?? null, { currency: p, amount: u, originalAmount: h } = le(r, d);
1932
- return /* @__PURE__ */ c(
2001
+ const c = n?.discount_percent ?? null, { currency: h, amount: d, originalAmount: g } = ce(r, c);
2002
+ return /* @__PURE__ */ u(
1933
2003
  "button",
1934
2004
  {
1935
2005
  type: "button",
@@ -1942,22 +2012,22 @@ function Ht({
1942
2012
  ].join(" "),
1943
2013
  style: s ? { background: "color-mix(in srgb, var(--pw-accent) 6%, transparent)" } : void 0,
1944
2014
  children: [
1945
- /* @__PURE__ */ o("span", { class: "flex min-h-[2.4em] items-center text-[10px] font-normal uppercase leading-tight text-gray-800/70", children: je(r, l) }),
1946
- i ? /* @__PURE__ */ c("div", { class: "flex h-[22px] items-center justify-center gap-1.5", children: [
1947
- h ? /* @__PURE__ */ o("span", { class: "text-[12px] text-gray-400 line-through decoration-gray-400 decoration-[1.5px]", children: h }) : null,
1948
- d ? /* @__PURE__ */ c("span", { class: "rounded-md bg-emerald-100 px-1.5 py-0.5 text-[10px] font-bold leading-none text-emerald-700", children: [
2015
+ /* @__PURE__ */ o("span", { class: "flex min-h-[2.4em] items-center text-[10px] font-normal uppercase leading-tight text-gray-800/70", children: De(r, l) }),
2016
+ i ? /* @__PURE__ */ u("div", { class: "flex h-[22px] items-center justify-center gap-1.5", children: [
2017
+ g ? /* @__PURE__ */ o("span", { class: "text-[12px] text-gray-400 line-through decoration-gray-400 decoration-[1.5px]", children: g }) : null,
2018
+ c ? /* @__PURE__ */ u("span", { class: "rounded-md bg-emerald-100 px-1.5 py-0.5 text-[10px] font-bold leading-none text-emerald-700", children: [
1949
2019
  "-",
1950
- d,
2020
+ c,
1951
2021
  "%"
1952
2022
  ] }) : null
1953
2023
  ] }) : null,
1954
- /* @__PURE__ */ c("span", { class: "text-[26px] leading-none whitespace-nowrap text-gray-800 font-medium", children: [
1955
- /* @__PURE__ */ o("span", { class: "opacity-90", children: p }),
1956
- u
2024
+ /* @__PURE__ */ u("span", { class: "text-[26px] leading-none whitespace-nowrap text-gray-800 font-medium", children: [
2025
+ /* @__PURE__ */ o("span", { class: "opacity-90", children: h }),
2026
+ d
1957
2027
  ] }),
1958
- /* @__PURE__ */ c("span", { class: "text-xs font-normal text-gray-500", children: [
2028
+ /* @__PURE__ */ u("span", { class: "text-xs font-normal text-gray-500", children: [
1959
2029
  "/ ",
1960
- ce(r, l)
2030
+ ue(r, l)
1961
2031
  ] }),
1962
2032
  e ? /* @__PURE__ */ o(
1963
2033
  "span",
@@ -1971,28 +2041,28 @@ function Ht({
1971
2041
  }
1972
2042
  );
1973
2043
  }
1974
- function Gt({ block: r }) {
2044
+ function rr({ block: r }) {
1975
2045
  return /* @__PURE__ */ o("p", { class: "text-[0.9375rem] leading-relaxed text-gray-600", children: r.text });
1976
2046
  }
1977
- const Wt = {
2047
+ const nr = {
1978
2048
  week: 0.25,
1979
2049
  month: 1,
1980
2050
  year: 12
1981
2051
  };
1982
- function Zt(r, e) {
2052
+ function ir(r, e) {
1983
2053
  return r ? e(`pricing.interval.${r}`, r) : e("pricing.interval.period", "period");
1984
2054
  }
1985
- function Yt({ block: r, ctx: e }) {
1986
- const { t } = w();
2055
+ function or({ block: r, ctx: e }) {
2056
+ const { t } = S();
1987
2057
  if (!r.queries.length) return null;
1988
- const i = e.bootstrap.prices.find((a) => a.id === e.selectedPriceId)?.interval ?? null, s = i ? Wt[i] : void 0;
1989
- return /* @__PURE__ */ c("div", { class: "flex flex-col gap-2", children: [
2058
+ const i = e.bootstrap.prices.find((a) => a.id === e.selectedPriceId)?.interval ?? null, s = i ? nr[i] : void 0;
2059
+ return /* @__PURE__ */ u("div", { class: "flex flex-col gap-2", children: [
1990
2060
  /* @__PURE__ */ o("div", { class: "text-sm font-semibold text-gray-800", children: !i || i === "lifetime" ? t("pricing.included_total", "Included for lifetime:") : t("pricing.included_per", "Included per {interval}:", {
1991
- interval: Zt(i, t)
2061
+ interval: ir(i, t)
1992
2062
  }) }),
1993
2063
  /* @__PURE__ */ o("ul", { class: "flex flex-col gap-2", role: "list", children: r.queries.map((a) => {
1994
- const l = Number.isFinite(a.count) ? a.count : 0, d = s !== void 0 ? Math.round(l * s) : l;
1995
- return /* @__PURE__ */ c("li", { class: `flex gap-3 ${a.desc ? "items-start" : "items-center"}`, children: [
2064
+ const l = Number.isFinite(a.count) ? a.count : 0, c = s !== void 0 ? Math.round(l * s) : l;
2065
+ return /* @__PURE__ */ u("li", { class: `flex gap-3 ${a.desc ? "items-start" : "items-center"}`, children: [
1996
2066
  /* @__PURE__ */ o(
1997
2067
  "svg",
1998
2068
  {
@@ -2014,11 +2084,11 @@ function Yt({ block: r, ctx: e }) {
2014
2084
  )
2015
2085
  }
2016
2086
  ),
2017
- /* @__PURE__ */ c("div", { children: [
2018
- /* @__PURE__ */ o("span", { class: "font-semibold text-gray-900 text-sm", children: d }),
2087
+ /* @__PURE__ */ u("div", { children: [
2088
+ /* @__PURE__ */ o("span", { class: "font-semibold text-gray-900 text-sm", children: c }),
2019
2089
  " ",
2020
2090
  /* @__PURE__ */ o("span", { class: "text-sm text-gray-800", children: a.name }),
2021
- a.desc ? /* @__PURE__ */ c(Y, { children: [
2091
+ a.desc ? /* @__PURE__ */ u(le, { children: [
2022
2092
  /* @__PURE__ */ o("br", {}),
2023
2093
  /* @__PURE__ */ o("span", { class: "text-xs text-gray-400", children: a.desc })
2024
2094
  ] }) : null
@@ -2027,38 +2097,38 @@ function Yt({ block: r, ctx: e }) {
2027
2097
  }) })
2028
2098
  ] });
2029
2099
  }
2030
- const Kt = {
2031
- heading: qt,
2032
- text: Gt,
2033
- price_grid: Ft,
2034
- cta_button: Tt,
2100
+ const sr = {
2101
+ heading: Kt,
2102
+ text: rr,
2103
+ price_grid: Jt,
2104
+ cta_button: Nt,
2035
2105
  auth_panel: Ee,
2036
- current_session: Mt,
2037
- features_list: Bt,
2038
- tokenization_gate: Yt,
2039
- guarantee_badge: Ot,
2040
- offer_banner: wt
2106
+ current_session: Ft,
2107
+ features_list: Vt,
2108
+ tokenization_gate: or,
2109
+ guarantee_badge: $t,
2110
+ offer_banner: Mt
2041
2111
  };
2042
- function Xt({ layout: r, bootstrap: e, onAction: t, auth: n, authSession: i, hasTopBanner: s }) {
2043
- const a = _e(() => {
2044
- for (const f of r.blocks)
2045
- if (f.type === "price_grid" && f.popular_price_id && e.prices.some((g) => g.id === f.popular_price_id))
2046
- return f.popular_price_id;
2112
+ function ar({ layout: r, bootstrap: e, onAction: t, auth: n, authSession: i, hasTopBanner: s }) {
2113
+ const a = Ze(() => {
2114
+ for (const v of r.blocks)
2115
+ if (v.type === "price_grid" && v.popular_price_id && e.prices.some((m) => m.id === v.popular_price_id))
2116
+ return v.popular_price_id;
2047
2117
  return e.prices[0]?.id ?? null;
2048
- }, [r.blocks, e.prices]), [l, d] = x(a), p = {
2118
+ }, [r.blocks, e.prices]), [l, c] = k(a), h = {
2049
2119
  bootstrap: e,
2050
2120
  selectedPriceId: l,
2051
- setSelectedPriceId: d,
2121
+ setSelectedPriceId: c,
2052
2122
  onAction: t,
2053
2123
  auth: n,
2054
2124
  authSession: i
2055
- }, u = r.blocks.findIndex((f) => f.type === "cta_button"), h = u === -1 ? r.blocks : r.blocks.slice(0, u), b = u === -1 ? [] : r.blocks.slice(u), _ = (f, g) => {
2056
- const A = Kt[f.type];
2057
- return A ? /* @__PURE__ */ o(A, { block: f, ctx: p }, `${f.type}-${g}`) : (typeof console < "u" && console.warn(`[paywall] unknown block type: ${f.type}`), null);
2125
+ }, d = r.blocks.findIndex((v) => v.type === "cta_button"), g = d === -1 ? r.blocks : r.blocks.slice(0, d), _ = d === -1 ? [] : r.blocks.slice(d), p = (v, m) => {
2126
+ const A = sr[v.type];
2127
+ return A ? /* @__PURE__ */ o(A, { block: v, ctx: h }, `${v.type}-${m}`) : (typeof console < "u" && console.warn(`[paywall] unknown block type: ${v.type}`), null);
2058
2128
  };
2059
- return /* @__PURE__ */ c(Y, { children: [
2060
- /* @__PURE__ */ o("div", { class: "flex-1 min-h-0 overflow-y-auto px-6 pb-3 pt-6 sm:px-8 sm:pb-4 sm:pt-8", children: /* @__PURE__ */ o("div", { class: "flex flex-col gap-6", children: h.map(_) }) }),
2061
- b.length > 0 ? (
2129
+ return /* @__PURE__ */ u(le, { children: [
2130
+ /* @__PURE__ */ o("div", { class: "flex-1 min-h-0 overflow-y-auto px-6 pb-3 pt-6 sm:px-8 sm:pb-4 sm:pt-8", children: /* @__PURE__ */ o("div", { class: "flex flex-col gap-6", children: g.map(p) }) }),
2131
+ _.length > 0 ? (
2062
2132
  // Тонкий shadow-top вместо border-t — создаёт depth, читается как
2063
2133
  // «footer закреплён к низу dialog'а». Линия выглядела как divider
2064
2134
  // в обычном flow, не передавала sticky-character.
@@ -2067,169 +2137,202 @@ function Xt({ layout: r, bootstrap: e, onAction: t, auth: n, authSession: i, has
2067
2137
  {
2068
2138
  class: "flex flex-col gap-4 bg-white px-6 pb-6 pt-3 sm:px-8",
2069
2139
  style: { boxShadow: "0 -4px 12px -4px rgba(15,23,42,0.06)" },
2070
- children: b.map((f, g) => _(f, h.length + g))
2140
+ children: _.map((v, m) => p(v, g.length + m))
2071
2141
  }
2072
2142
  )
2073
2143
  ) : null
2074
2144
  ] });
2075
2145
  }
2076
- function Jt(r, e, t, n) {
2077
- return r ? n ? { open: !0, view: "purchased", error: null } : e.status === "idle" || e.status === "loading" ? { open: !0, view: "loading", error: null } : e.status === "error" ? { open: !0, view: "error", error: e.error } : t.kind === "support" ? { open: !0, view: "support", error: null } : t.kind === "auth_gate" ? { open: !0, view: "auth", error: null } : t.kind === "anon_gate" ? { open: !0, view: "anon", error: null } : t.kind === "awaiting_payment" ? { open: !0, view: "awaiting_payment", error: null } : t.kind === "popup_blocked" ? { open: !0, view: "popup_blocked", error: null } : t.kind === "purchase_success" ? { open: !0, view: "purchased", error: null } : t.kind === "verifying" ? { open: !0, view: "loading", error: null } : { open: !0, view: "layout", error: null } : { open: !1, view: null, error: null };
2146
+ function lr(r, e, t, n) {
2147
+ return r ? n ? { open: !0, view: "purchased", error: null, processing: !1 } : e.status === "idle" || e.status === "loading" ? { open: !0, view: "loading", error: null, processing: !1 } : e.status === "error" ? { open: !0, view: "error", error: e.error, processing: !1 } : t.kind === "support" ? { open: !0, view: "support", error: null, processing: !1 } : t.kind === "auth_gate" ? { open: !0, view: "auth", error: null, processing: !1 } : t.kind === "awaiting_payment" ? { open: !0, view: "awaiting_payment", error: null, processing: !1 } : t.kind === "popup_blocked" ? { open: !0, view: "popup_blocked", error: null, processing: !1 } : t.kind === "purchase_success" ? { open: !0, view: "purchased", error: null, processing: !1 } : t.kind === "verifying" ? { open: !0, view: "loading", error: null, processing: !1 } : { open: !0, view: "layout", error: null, processing: !1 } : { open: !1, view: null, error: null, processing: !1 };
2078
2148
  }
2079
- function Qt(r, e) {
2080
- return r.open === e.open && r.view === e.view && r.error === e.error;
2149
+ function cr(r, e) {
2150
+ return r.open === e.open && r.view === e.view && r.error === e.error && r.processing === e.processing;
2081
2151
  }
2082
- function er({
2152
+ function ur({
2083
2153
  client: r,
2084
2154
  open: e,
2085
2155
  onClose: t,
2086
2156
  onEvent: n,
2087
2157
  initialView: i,
2088
- purchased: s,
2089
- renew: a,
2090
- onState: l,
2091
- inline: d,
2092
- locale: p
2158
+ initialAuthMode: s,
2159
+ initialCheckoutPriceId: a,
2160
+ initialCheckoutUrl: l,
2161
+ purchased: c,
2162
+ renew: h,
2163
+ onState: d,
2164
+ inline: g,
2165
+ locale: _
2093
2166
  }) {
2094
- const [u, h] = x({ status: "idle" }), [b, _] = x(
2167
+ const [p, v] = k({ status: "idle" }), [m, A] = k(
2095
2168
  () => r.auth?.getCachedSession() ?? null
2096
- ), [f, g] = x(() => i === "support" ? { kind: "support", origin: "standalone" } : i === "auth" ? { kind: "auth_gate", origin: "standalone" } : i === "anon" ? { kind: "anon_gate", origin: "standalone" } : { kind: "layout" }), A = z(!1), M = z(null);
2097
- T(() => {
2098
- if (!l) return;
2099
- const m = Jt(e, u, f, s), y = M.current;
2100
- y && Qt(y, m) || (M.current = m, l(m));
2101
- }, [e, u, f, s, l]), T(() => {
2169
+ ), [y, b] = k(() => i === "support" ? { kind: "support", origin: "standalone" } : i === "auth" ? a ? {
2170
+ kind: "auth_gate",
2171
+ pendingCheckout: { priceId: a, direct: !0 },
2172
+ origin: "standalone",
2173
+ intent: "preauth"
2174
+ } : { kind: "auth_gate", origin: "standalone" } : i === "awaiting_payment" && a && l ? {
2175
+ kind: "awaiting_payment",
2176
+ priceId: a,
2177
+ url: l
2178
+ } : i === "popup_blocked" && a && l ? {
2179
+ kind: "popup_blocked",
2180
+ priceId: a,
2181
+ url: l
2182
+ } : { kind: "layout" }), C = i === "awaiting_payment" || i === "popup_blocked" || i === "auth" && !!a, I = U(!1), j = U(null);
2183
+ P(() => {
2184
+ if (!d) return;
2185
+ const x = lr(e, p, y, c), f = j.current;
2186
+ f && cr(f, x) || (j.current = x, d(x));
2187
+ }, [e, p, y, c, d]), P(() => {
2102
2188
  if (r.auth)
2103
- return r.auth.onAuthChange((m, y) => _(y));
2104
- }, [r.auth]), T(() => {
2189
+ return r.auth.onAuthChange((x, f) => A(f));
2190
+ }, [r.auth]), P(() => {
2105
2191
  if (typeof r.onBootstrapChange == "function")
2106
- return r.onBootstrapChange((m) => {
2107
- h(
2108
- (y) => y.status === "ready" ? { status: "ready", data: m } : y
2192
+ return r.onBootstrapChange((x) => {
2193
+ v(
2194
+ (f) => f.status === "ready" ? { status: "ready", data: x } : f
2109
2195
  );
2110
2196
  });
2111
- }, [r]), T(() => {
2112
- if (!e || u.status === "ready" || u.status === "loading") return;
2113
- let m = !1;
2114
- return h({ status: "loading" }), r.bootstrap().then((y) => {
2115
- m || (h({ status: "ready", data: y }), n("ready", y), y.user?.has_active_subscription && !a && (n("purchase_completed", {
2116
- priceId: null,
2197
+ }, [r]), P(() => {
2198
+ if (!e || p.status === "ready" || p.status === "loading") return;
2199
+ let x = !1;
2200
+ return v({ status: "loading" }), r.bootstrap().then((f) => {
2201
+ if (x) return;
2202
+ v({ status: "ready", data: f }), n("ready", f);
2203
+ const w = i === "support" || i === "auth" || C;
2204
+ f.user?.has_active_subscription && !h && !w && (n("purchase_completed", {
2205
+ priceId: a ?? null,
2117
2206
  sessionId: null,
2118
2207
  restored: !0
2119
- }), g({ kind: "purchase_success", restored: !0 })));
2120
- }).catch((y) => {
2121
- if (m) return;
2122
- const v = y instanceof j ? y : new j("unknown", "Failed to load paywall", { cause: y });
2123
- h({ status: "error", error: v }), n("error", v);
2208
+ }), b({ kind: "purchase_success", restored: !0 }));
2209
+ }).catch((f) => {
2210
+ if (x) return;
2211
+ const w = f instanceof L ? f : new L("unknown", "Failed to load paywall", { cause: f });
2212
+ v({ status: "error", error: w }), n("error", w);
2124
2213
  }), () => {
2125
- m = !0;
2214
+ x = !0;
2126
2215
  };
2127
- }, [e, r]), He(() => {
2216
+ }, [e, r]), Ye(() => {
2128
2217
  if (!e) {
2129
- g({ kind: "layout" }), A.current = !1;
2218
+ b({ kind: "layout" }), I.current = !1;
2130
2219
  return;
2131
2220
  }
2132
- i === "support" ? g({ kind: "support", origin: "standalone" }) : i === "auth" ? g({ kind: "auth_gate", origin: "standalone" }) : i === "anon" && g({ kind: "anon_gate", origin: "standalone" });
2133
- }, [e, i]);
2134
- const k = async (m) => {
2221
+ i === "support" ? b({ kind: "support", origin: "standalone" }) : i === "auth" ? b(a ? {
2222
+ kind: "auth_gate",
2223
+ pendingCheckout: { priceId: a, direct: !0 },
2224
+ origin: "standalone",
2225
+ intent: "preauth"
2226
+ } : { kind: "auth_gate", origin: "standalone" }) : i === "awaiting_payment" && a && l ? b({
2227
+ kind: "awaiting_payment",
2228
+ priceId: a,
2229
+ url: l
2230
+ }) : i === "popup_blocked" && a && l && b({
2231
+ kind: "popup_blocked",
2232
+ priceId: a,
2233
+ url: l
2234
+ });
2235
+ }, [e, i, a, l]);
2236
+ const M = async (x) => {
2135
2237
  try {
2136
- const y = await r.createCheckout({
2137
- priceId: m,
2138
- ignoreActivePurchase: a === !0
2238
+ const f = r.getCachedOffers?.() ?? null, w = f ? $(f, x, { readStart: N }) : null, E = await r.createCheckout({
2239
+ priceId: x,
2240
+ offerId: w?.id,
2241
+ ignoreActivePurchase: h === !0
2139
2242
  });
2140
- if (n("checkout_started", { priceId: m, url: y.url, acquiring: y.acquiring }), typeof window > "u" || !y.url) return;
2141
- const v = window.open(y.url, "_blank");
2142
- if (v) {
2243
+ if (n("checkout_started", { priceId: x, url: E.url, acquiring: E.acquiring }), typeof window > "u" || !E.url) return;
2244
+ const V = window.open(E.url, "_blank");
2245
+ if (V) {
2143
2246
  try {
2144
- v.opener = null;
2247
+ V.opener = null;
2145
2248
  } catch {
2146
2249
  }
2147
- g({ kind: "awaiting_payment", priceId: m, url: y.url });
2250
+ b({ kind: "awaiting_payment", priceId: x, url: E.url });
2148
2251
  } else
2149
- g({ kind: "popup_blocked", priceId: m, url: y.url });
2150
- } catch (y) {
2151
- if (y instanceof j && y.code === "already_purchased") {
2252
+ b({ kind: "popup_blocked", priceId: x, url: E.url });
2253
+ } catch (f) {
2254
+ if (f instanceof L && f.code === "already_purchased") {
2152
2255
  try {
2153
2256
  await r.getUser({ force: !0 });
2154
2257
  } catch {
2155
2258
  }
2156
- n("purchase_completed", { priceId: m, sessionId: null, restored: !0 }), g({ kind: "purchase_success", restored: !0 });
2259
+ n("purchase_completed", { priceId: x, sessionId: null, restored: !0 }), C ? t() : b({ kind: "purchase_success", restored: !0 });
2157
2260
  return;
2158
2261
  }
2159
- const v = y instanceof j ? y : new j("checkout_failed", "Checkout failed", { cause: y });
2160
- n("error", v), g({ kind: "layout" });
2262
+ const w = f instanceof L ? f : new L("checkout_failed", "Checkout failed", { cause: f });
2263
+ n("error", w), C ? t() : b({ kind: "layout" });
2161
2264
  }
2162
- }, E = (m, y) => {
2265
+ }, R = (x, f) => {
2163
2266
  if (typeof window > "u") return;
2164
- const v = window.open(y, "_blank");
2165
- if (v) {
2267
+ const w = window.open(f, "_blank");
2268
+ if (w) {
2166
2269
  try {
2167
- v.opener = null;
2270
+ w.opener = null;
2168
2271
  } catch {
2169
2272
  }
2170
- g({ kind: "awaiting_payment", priceId: m, url: y });
2273
+ b({ kind: "awaiting_payment", priceId: x, url: f });
2171
2274
  }
2172
2275
  };
2173
- T(() => {
2174
- if (f.kind !== "auth_gate" || !b || b.user.is_anonymous || A.current) return;
2175
- A.current = !0;
2176
- const m = f.pendingCheckout, y = f.origin;
2177
- g({ kind: "verifying" }), (async () => {
2178
- if (!a)
2276
+ P(() => {
2277
+ if (y.kind !== "auth_gate" || !m || m.user.is_anonymous || I.current) return;
2278
+ I.current = !0;
2279
+ const x = y.pendingCheckout, f = y.origin;
2280
+ b({ kind: "verifying" }), (async () => {
2281
+ if (!h)
2179
2282
  try {
2180
2283
  if ((await r.getUser({ force: !0 })).has_active_subscription) {
2181
2284
  n("purchase_completed", {
2182
- priceId: m?.priceId ?? null,
2285
+ priceId: x?.priceId ?? null,
2183
2286
  sessionId: null,
2184
2287
  restored: !0
2185
- }), g({ kind: "purchase_success", restored: !0 });
2288
+ }), x?.direct ? t() : b({ kind: "purchase_success", restored: !0 });
2186
2289
  return;
2187
2290
  }
2188
2291
  } catch {
2189
2292
  }
2190
- if (!m) {
2191
- y === "standalone" ? t() : g({ kind: "layout" });
2293
+ if (!x) {
2294
+ f === "standalone" ? t() : b({ kind: "layout" });
2192
2295
  return;
2193
2296
  }
2194
- await k(m.priceId);
2297
+ await M(x.priceId);
2195
2298
  })().finally(() => {
2196
- A.current = !1;
2299
+ I.current = !1;
2197
2300
  });
2198
- }, [b, f]);
2199
- const I = async (m, y) => {
2200
- if (m === "close") {
2301
+ }, [m, y]);
2302
+ const q = async (x, f) => {
2303
+ if (x === "close") {
2201
2304
  t();
2202
2305
  return;
2203
2306
  }
2204
- if (m === "price_selected") {
2205
- n("price_selected", y);
2307
+ if (x === "price_selected") {
2308
+ n("price_selected", f);
2206
2309
  return;
2207
2310
  }
2208
- if (m === "restore") {
2311
+ if (x === "restore") {
2209
2312
  if (!r.auth) return;
2210
- const v = r.auth.getCachedSession();
2211
- if (v && !v.user.is_anonymous) return;
2212
- g({ kind: "auth_gate", intent: "restore" });
2313
+ const w = r.auth.getCachedSession();
2314
+ if (w && !w.user.is_anonymous) return;
2315
+ b({ kind: "auth_gate", intent: "restore" });
2213
2316
  return;
2214
2317
  }
2215
- if (m === "support") {
2216
- g({ kind: "support", origin: "layout" });
2318
+ if (x === "support") {
2319
+ b({ kind: "support", origin: "layout" });
2217
2320
  return;
2218
2321
  }
2219
- if (m === "checkout" && u.status === "ready") {
2220
- const v = y?.priceId;
2221
- if (!v) {
2222
- n("error", new j("no_price", "No price selected"));
2322
+ if (x === "checkout" && p.status === "ready") {
2323
+ const w = f?.priceId;
2324
+ if (!w) {
2325
+ n("error", new L("no_price", "No price selected"));
2223
2326
  return;
2224
2327
  }
2225
- const S = u.data.settings.checkout_mode ?? "guest", P = r.auth?.getCachedSession() ?? null, V = !!P && !P.user.is_anonymous;
2226
- if (S === "preauth" && !!r.auth && !V) {
2227
- g({ kind: "auth_gate", pendingCheckout: { priceId: v } });
2328
+ const E = p.data.settings.checkout_mode ?? "guest", V = r.auth?.getCachedSession() ?? null, ze = !!V && !V.user.is_anonymous;
2329
+ if (E === "preauth" && !!r.auth && !ze) {
2330
+ b({ kind: "auth_gate", pendingCheckout: { priceId: w } });
2228
2331
  return;
2229
2332
  }
2230
- await k(v);
2333
+ await M(w);
2231
2334
  }
2232
- }, O = u.status === "ready" ? u.data.settings.brand_color : null, B = u.status === "ready" ? u.data.settings.allow_close !== !1 : !0, q = f.kind === "layout" && u.status === "ready" ? Te(u.data.offers) : null, D = q ? /* @__PURE__ */ o(kt, { offer: q }) : null, N = {
2335
+ }, D = p.status === "ready" ? p.data.settings.brand_color : null, B = p.status === "ready" ? p.data.settings.allow_close !== !1 : !0, z = y.kind === "layout" && p.status === "ready" ? Pe(p.data.offers) : null, O = z ? /* @__PURE__ */ o(Tt, { offer: z }) : null, K = {
2233
2336
  type: "auth_panel",
2234
2337
  // Заголовок не задаём — AuthGate сам решит по intent'у (restore →
2235
2338
  // "Restore Purchases", остальные → дефолтный "Welcome back!").
@@ -2238,91 +2341,83 @@ function er({
2238
2341
  // Не скрываем при наличии сессии — auto-resume useEffect отрабатывает быстрее,
2239
2342
  // чем хотим показывать "Signed in as ..." промежуточным экраном.
2240
2343
  hide_when_authenticated: !1,
2241
- providers: u.status === "ready" ? u.data.settings.auth_providers : void 0
2242
- }, L = f.kind === "support" ? /* @__PURE__ */ o(
2243
- _t,
2344
+ providers: p.status === "ready" ? p.data.settings.auth_providers : void 0
2345
+ }, H = y.kind === "support" ? /* @__PURE__ */ o(
2346
+ Pt,
2244
2347
  {
2245
2348
  client: r,
2246
- authSession: b,
2247
- origin: f.origin,
2349
+ authSession: m,
2350
+ origin: y.origin,
2248
2351
  onBack: () => {
2249
- f.origin === "standalone" ? t() : g({ kind: "layout" });
2352
+ y.origin === "standalone" ? t() : b({ kind: "layout" });
2250
2353
  }
2251
2354
  }
2252
- ) : null, C = f.kind === "auth_gate" && f.origin !== "standalone" || f.kind === "support", U = u.status === "ready" ? u.data : null;
2253
- return /* @__PURE__ */ o(et, { bootstrap: U, forceLocale: p, children: /* @__PURE__ */ o(
2254
- tt,
2355
+ ) : null, X = y.kind === "auth_gate" && y.origin !== "standalone" || y.kind === "support", J = p.status === "ready" ? p.data : null;
2356
+ return /* @__PURE__ */ o(at, { bootstrap: J, forceLocale: _, children: /* @__PURE__ */ o(
2357
+ lt,
2255
2358
  {
2256
2359
  open: e,
2257
2360
  onClose: t,
2258
- brandColor: O,
2259
- topBanner: D,
2361
+ brandColor: D,
2362
+ topBanner: O,
2260
2363
  allowClose: B,
2261
- hideCloseButton: C,
2262
- inline: d,
2364
+ hideCloseButton: X,
2365
+ inline: g,
2263
2366
  labelledBy: "pw-title",
2264
- children: s ? /* @__PURE__ */ o(ke, { onContinue: t }) : f.kind === "purchase_success" ? /* @__PURE__ */ o(ke, { restored: f.restored, onContinue: t }) : L || (u.status === "loading" || u.status === "idle" || f.kind === "verifying" ? /* @__PURE__ */ o(tr, { verifying: f.kind === "verifying" }) : u.status === "error" ? /* @__PURE__ */ o(rr, { message: u.error.message }) : f.kind === "auth_gate" && r.auth ? /* @__PURE__ */ o(
2265
- gt,
2367
+ children: c ? /* @__PURE__ */ o(_e, { onContinue: t }) : y.kind === "purchase_success" ? /* @__PURE__ */ o(_e, { restored: y.restored, onContinue: t }) : H || (p.status === "loading" || p.status === "idle" || y.kind === "verifying" ? /* @__PURE__ */ o(dr, { verifying: y.kind === "verifying" }) : p.status === "error" ? /* @__PURE__ */ o(hr, { message: p.error.message }) : y.kind === "auth_gate" && r.auth ? /* @__PURE__ */ o(
2368
+ Ct,
2266
2369
  {
2267
- block: N,
2268
- bootstrap: u.data,
2370
+ block: K,
2371
+ bootstrap: p.data,
2269
2372
  auth: r.auth,
2270
- authSession: b,
2271
- showBack: f.origin !== "standalone",
2272
- intent: f.intent ?? (f.origin === "standalone" ? "standalone" : "preauth"),
2373
+ authSession: m,
2374
+ showBack: y.origin !== "standalone",
2375
+ intent: y.intent ?? (y.origin === "standalone" ? "standalone" : "preauth"),
2376
+ initialMode: y.origin === "standalone" ? s : void 0,
2273
2377
  onBack: () => {
2274
- f.origin === "standalone" ? t() : g({ kind: "layout" });
2378
+ y.origin === "standalone" ? t() : b({ kind: "layout" });
2275
2379
  }
2276
2380
  }
2277
- ) : f.kind === "anon_gate" && r.auth ? /* @__PURE__ */ o(
2278
- yt,
2279
- {
2280
- auth: r.auth,
2281
- onSuccess: () => {
2282
- f.origin === "standalone" ? t() : g({ kind: "layout" });
2283
- },
2284
- onBack: f.origin === "standalone" ? void 0 : () => g({ kind: "layout" })
2285
- }
2286
- ) : f.kind === "awaiting_payment" ? /* @__PURE__ */ o(
2287
- ir,
2381
+ ) : y.kind === "awaiting_payment" ? /* @__PURE__ */ o(
2382
+ fr,
2288
2383
  {
2289
2384
  client: r,
2290
- onBack: () => g({ kind: "layout" }),
2385
+ onBack: () => b({ kind: "layout" }),
2291
2386
  onReopen: () => {
2292
2387
  if (typeof window > "u") return;
2293
- const m = window.open(f.url, "_blank");
2294
- if (m)
2388
+ const x = window.open(y.url, "_blank");
2389
+ if (x)
2295
2390
  try {
2296
- m.opener = null;
2391
+ x.opener = null;
2297
2392
  } catch {
2298
2393
  }
2299
2394
  },
2300
- onRetry: () => k(f.priceId)
2395
+ onRetry: () => M(y.priceId)
2301
2396
  }
2302
- ) : f.kind === "popup_blocked" ? /* @__PURE__ */ o(nr, { onReopen: () => E(f.priceId, f.url) }) : /* @__PURE__ */ o(
2303
- Xt,
2397
+ ) : y.kind === "popup_blocked" ? /* @__PURE__ */ o(pr, { onReopen: () => R(y.priceId, y.url) }) : /* @__PURE__ */ o(
2398
+ ar,
2304
2399
  {
2305
- layout: u.data.layout,
2306
- bootstrap: u.data,
2307
- onAction: I,
2400
+ layout: p.data.layout,
2401
+ bootstrap: p.data,
2402
+ onAction: q,
2308
2403
  auth: r.auth,
2309
- authSession: b
2404
+ authSession: m
2310
2405
  }
2311
2406
  ))
2312
2407
  }
2313
2408
  ) });
2314
2409
  }
2315
- function tr({ verifying: r }) {
2316
- const { t: e } = w();
2317
- return /* @__PURE__ */ c("div", { class: "flex flex-col items-center justify-center gap-3 py-12", children: [
2410
+ function dr({ verifying: r }) {
2411
+ const { t: e } = S();
2412
+ return /* @__PURE__ */ u("div", { class: "flex flex-col items-center justify-center gap-3 py-12", children: [
2318
2413
  /* @__PURE__ */ o("span", { class: "inline-block h-7 w-7 animate-spin rounded-full border-[2.5px] border-gray-200 border-t-[var(--pw-accent)]" }),
2319
2414
  /* @__PURE__ */ o("span", { class: "text-xs font-medium tracking-wide text-gray-500", children: r ? e("modal.verifying_subscription", "Checking your subscription…") : e("modal.loading", "Loading…") })
2320
2415
  ] });
2321
2416
  }
2322
- function rr({ message: r }) {
2323
- const { t: e } = w();
2324
- return /* @__PURE__ */ c("div", { class: "flex flex-col items-center gap-2 py-8 text-center", children: [
2325
- /* @__PURE__ */ o("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: [
2417
+ function hr({ message: r }) {
2418
+ const { t: e } = S();
2419
+ return /* @__PURE__ */ u("div", { class: "flex flex-col items-center gap-2 py-8 text-center", children: [
2420
+ /* @__PURE__ */ o("div", { class: "flex h-11 w-11 items-center justify-center rounded-full bg-red-50", children: /* @__PURE__ */ u("svg", { width: "20", height: "20", viewBox: "0 0 20 20", fill: "none", "aria-hidden": "true", children: [
2326
2421
  /* @__PURE__ */ o("path", { d: "M10 6v5M10 14h.01", stroke: "#dc2626", "stroke-width": "2", "stroke-linecap": "round" }),
2327
2422
  /* @__PURE__ */ o("circle", { cx: "10", cy: "10", r: "8", stroke: "#dc2626", "stroke-width": "1.75" })
2328
2423
  ] }) }),
@@ -2330,67 +2425,102 @@ function rr({ message: r }) {
2330
2425
  /* @__PURE__ */ o("p", { class: "text-xs leading-relaxed text-gray-500", children: r })
2331
2426
  ] });
2332
2427
  }
2333
- function nr({ onReopen: r }) {
2334
- const { t: e } = w();
2335
- return /* @__PURE__ */ c("div", { class: "flex flex-col items-center gap-3 py-8 text-center", children: [
2428
+ function pr({ onReopen: r }) {
2429
+ const { t: e } = S();
2430
+ return /* @__PURE__ */ u("div", { class: "flex flex-col items-center gap-3 py-8 text-center", children: [
2336
2431
  /* @__PURE__ */ o(
2337
2432
  "div",
2338
2433
  {
2339
- class: "flex h-11 w-11 items-center justify-center rounded-full",
2434
+ class: "flex h-14 w-14 items-center justify-center rounded-full",
2340
2435
  style: { background: "color-mix(in srgb, var(--pw-accent) 12%, white)", color: "var(--pw-accent)" },
2341
2436
  "aria-hidden": "true",
2342
- children: /* @__PURE__ */ c("svg", { width: "20", height: "20", viewBox: "0 0 20 20", fill: "none", children: [
2343
- /* @__PURE__ */ o("path", { d: "M4 5h12v10H4z", stroke: "currentColor", "stroke-width": "1.75", "stroke-linejoin": "round" }),
2344
- /* @__PURE__ */ o("path", { d: "M7 9l3 3 4-5", stroke: "currentColor", "stroke-width": "1.75", "stroke-linecap": "round", "stroke-linejoin": "round" })
2437
+ children: /* @__PURE__ */ u("svg", { width: "26", height: "26", viewBox: "0 0 24 24", fill: "none", children: [
2438
+ /* @__PURE__ */ o(
2439
+ "path",
2440
+ {
2441
+ d: "M14 4h6v6",
2442
+ stroke: "currentColor",
2443
+ "stroke-width": "2",
2444
+ "stroke-linecap": "round",
2445
+ "stroke-linejoin": "round"
2446
+ }
2447
+ ),
2448
+ /* @__PURE__ */ o(
2449
+ "path",
2450
+ {
2451
+ d: "M20 4l-9 9",
2452
+ stroke: "currentColor",
2453
+ "stroke-width": "2",
2454
+ "stroke-linecap": "round",
2455
+ "stroke-linejoin": "round"
2456
+ }
2457
+ ),
2458
+ /* @__PURE__ */ o(
2459
+ "path",
2460
+ {
2461
+ d: "M19 13v5a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V7a2 2 0 0 1 2-2h5",
2462
+ stroke: "currentColor",
2463
+ "stroke-width": "2",
2464
+ "stroke-linecap": "round",
2465
+ "stroke-linejoin": "round"
2466
+ }
2467
+ )
2345
2468
  ] })
2346
2469
  }
2347
2470
  ),
2348
- /* @__PURE__ */ o("p", { class: "text-sm font-semibold tracking-tight text-gray-900", children: e("payment.popup_blocked_title", "Allow popups to continue") }),
2349
- /* @__PURE__ */ o("p", { class: "max-w-[18rem] text-xs leading-relaxed text-gray-500", children: e("payment.popup_blocked_message", "Your browser blocked the checkout tab. Click below to open it.") }),
2471
+ /* @__PURE__ */ o(
2472
+ "p",
2473
+ {
2474
+ id: "pw-title",
2475
+ class: "mt-1 text-lg font-semibold tracking-tight text-gray-900",
2476
+ children: e("payment.popup_blocked_title", "Allow popups to continue")
2477
+ }
2478
+ ),
2479
+ /* @__PURE__ */ o("p", { class: "max-w-[20rem] text-sm leading-relaxed text-gray-500", children: e("payment.popup_blocked_message", "Your browser blocked the checkout tab. Click below to open it.") }),
2350
2480
  /* @__PURE__ */ o(
2351
2481
  "button",
2352
2482
  {
2353
2483
  type: "button",
2354
2484
  onClick: r,
2355
- 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)]",
2485
+ class: "mt-3 rounded-xl px-5 py-2.5 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)]",
2356
2486
  style: {
2357
2487
  background: "linear-gradient(180deg, color-mix(in srgb, var(--pw-accent) 92%, white), var(--pw-accent))",
2358
- boxShadow: "0 1px 2px rgba(15,23,42,0.08), 0 6px 14px -4px color-mix(in srgb, var(--pw-accent) 50%, transparent)"
2488
+ boxShadow: "0 1px 2px rgba(15,23,42,0.08), 0 8px 20px -6px color-mix(in srgb, var(--pw-accent) 50%, transparent)"
2359
2489
  },
2360
2490
  children: e("payment.open_checkout_button", "Open checkout")
2361
2491
  }
2362
2492
  )
2363
2493
  ] });
2364
2494
  }
2365
- function ir({
2495
+ function fr({
2366
2496
  client: r,
2367
2497
  onBack: e,
2368
2498
  onReopen: t,
2369
2499
  onRetry: n
2370
2500
  }) {
2371
- const { t: i } = w(), [s, a] = x(!1), [l, d] = x(!1), p = z(null);
2372
- T(() => () => {
2373
- p.current !== null && clearTimeout(p.current);
2501
+ const { t: i } = S(), [s, a] = k(!1), [l, c] = k(!1), h = U(null);
2502
+ P(() => () => {
2503
+ h.current !== null && clearTimeout(h.current);
2374
2504
  }, []);
2375
- const u = async () => {
2505
+ const d = async () => {
2376
2506
  if (!s) {
2377
- a(!0), d(!1);
2507
+ a(!0), c(!1);
2378
2508
  try {
2379
2509
  if ((await r.getUser({ force: !0 })).has_active_subscription) {
2380
2510
  typeof window < "u" && window.postMessage({ type: "paywall_purchase" }, "*");
2381
2511
  return;
2382
2512
  }
2383
- d(!0), p.current !== null && clearTimeout(p.current), p.current = setTimeout(() => {
2384
- d(!1), p.current = null;
2513
+ c(!0), h.current !== null && clearTimeout(h.current), h.current = setTimeout(() => {
2514
+ c(!1), h.current = null;
2385
2515
  }, 5e3);
2386
2516
  } catch {
2387
- d(!0);
2517
+ c(!0);
2388
2518
  } finally {
2389
2519
  a(!1);
2390
2520
  }
2391
2521
  }
2392
2522
  };
2393
- return /* @__PURE__ */ c("div", { class: "flex flex-col gap-3", children: [
2523
+ return /* @__PURE__ */ u("div", { class: "flex flex-col gap-3 px-6 pb-6 pt-4 sm:px-8 sm:pb-8 sm:pt-5", children: [
2394
2524
  /* @__PURE__ */ o(
2395
2525
  "button",
2396
2526
  {
@@ -2400,8 +2530,8 @@ function ir({
2400
2530
  children: i("nav.back", "← Back")
2401
2531
  }
2402
2532
  ),
2403
- /* @__PURE__ */ c("div", { class: "flex flex-col items-center gap-3 py-6 text-center", children: [
2404
- /* @__PURE__ */ c("div", { class: "relative flex h-12 w-12 items-center justify-center", children: [
2533
+ /* @__PURE__ */ u("div", { class: "flex flex-col items-center gap-3 py-6 text-center", children: [
2534
+ /* @__PURE__ */ u("div", { class: "relative flex h-14 w-14 items-center justify-center", children: [
2405
2535
  /* @__PURE__ */ o(
2406
2536
  "span",
2407
2537
  {
@@ -2410,10 +2540,17 @@ function ir({
2410
2540
  "aria-hidden": "true"
2411
2541
  }
2412
2542
  ),
2413
- /* @__PURE__ */ o("span", { class: "relative inline-block h-7 w-7 animate-spin rounded-full border-[2.5px] border-gray-200 border-t-[var(--pw-accent)]" })
2543
+ /* @__PURE__ */ o("span", { class: "relative inline-block h-8 w-8 animate-spin rounded-full border-[2.5px] border-gray-200 border-t-[var(--pw-accent)]" })
2414
2544
  ] }),
2415
- /* @__PURE__ */ o("p", { class: "text-sm font-semibold tracking-tight text-gray-900", children: i("payment.awaiting_title", "Complete payment in the new tab") }),
2416
- /* @__PURE__ */ o("p", { class: "max-w-[20rem] text-xs leading-relaxed text-gray-500", children: i(
2545
+ /* @__PURE__ */ o(
2546
+ "p",
2547
+ {
2548
+ id: "pw-title",
2549
+ class: "mt-1 text-lg font-semibold tracking-tight text-gray-900",
2550
+ children: i("payment.awaiting_title", "Complete payment in the new tab")
2551
+ }
2552
+ ),
2553
+ /* @__PURE__ */ o("p", { class: "max-w-[22rem] text-sm leading-relaxed text-gray-500", children: i(
2417
2554
  "payment.awaiting_subtitle",
2418
2555
  "We'll detect your payment automatically — or click below once you're done."
2419
2556
  ) }),
@@ -2421,19 +2558,19 @@ function ir({
2421
2558
  "button",
2422
2559
  {
2423
2560
  type: "button",
2424
- onClick: u,
2561
+ onClick: d,
2425
2562
  disabled: s,
2426
- class: "mt-1 rounded-xl px-5 py-2.5 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)]",
2563
+ class: "mt-3 rounded-xl px-5 py-2.5 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)]",
2427
2564
  style: {
2428
2565
  background: "linear-gradient(180deg, color-mix(in srgb, var(--pw-accent) 92%, white), var(--pw-accent))",
2429
- boxShadow: "0 1px 2px rgba(15,23,42,0.08), 0 6px 14px -4px color-mix(in srgb, var(--pw-accent) 50%, transparent)"
2566
+ boxShadow: "0 1px 2px rgba(15,23,42,0.08), 0 8px 20px -6px color-mix(in srgb, var(--pw-accent) 50%, transparent)"
2430
2567
  },
2431
2568
  children: s ? i("payment.checking", "Checking…") : i("payment.ive_paid", "I've paid")
2432
2569
  }
2433
2570
  ),
2434
2571
  l ? /* @__PURE__ */ o("p", { class: "text-xs leading-relaxed text-gray-500", children: i("payment.still_processing", "Payment is still being processed. Please try again in a moment.") }) : null
2435
2572
  ] }),
2436
- /* @__PURE__ */ c("div", { class: "rounded-2xl border border-gray-200 bg-gray-50/60 p-3.5", children: [
2573
+ /* @__PURE__ */ u("div", { class: "rounded-2xl border border-gray-200 bg-gray-50/60 p-3.5", children: [
2437
2574
  /* @__PURE__ */ o("p", { class: "text-xs leading-relaxed text-gray-600", children: i("payment.popup_help_text", "Checkout window didn't open or got blocked? Click here to open it again.") }),
2438
2575
  /* @__PURE__ */ o(
2439
2576
  "button",
@@ -2456,20 +2593,19 @@ function ir({
2456
2593
  )
2457
2594
  ] });
2458
2595
  }
2459
- function ke({
2596
+ function _e({
2460
2597
  onContinue: r,
2461
2598
  restored: e = !1
2462
2599
  }) {
2463
- const { t } = w();
2464
- return /* @__PURE__ */ c("div", { class: "flex flex-col items-center gap-3 py-8 text-center", children: [
2600
+ const { t } = S();
2601
+ return /* @__PURE__ */ u("div", { class: "flex flex-col items-center gap-4 py-6 text-center", children: [
2465
2602
  /* @__PURE__ */ o(
2466
2603
  "div",
2467
2604
  {
2468
- class: "flex h-14 w-14 items-center justify-center rounded-full ring-8",
2605
+ class: "flex h-14 w-14 items-center justify-center rounded-full",
2469
2606
  style: {
2470
2607
  background: "linear-gradient(135deg, #4ade80, #16a34a)",
2471
2608
  color: "#fff",
2472
- // emerald ring with low alpha for a halo effect
2473
2609
  boxShadow: "0 0 0 8px rgba(74,222,128,0.12), 0 8px 20px -6px rgba(22,163,74,0.45)"
2474
2610
  },
2475
2611
  "aria-hidden": "true",
@@ -2485,8 +2621,8 @@ function ke({
2485
2621
  ) })
2486
2622
  }
2487
2623
  ),
2488
- /* @__PURE__ */ o("p", { id: "pw-title", class: "mt-1 text-lg font-semibold tracking-tight text-gray-900", children: e ? t("modal.purchase_restored_title", "Subscription restored") : t("modal.purchase_success_title", "Payment received") }),
2489
- /* @__PURE__ */ o("p", { class: "text-sm leading-relaxed text-gray-500", children: e ? t(
2624
+ /* @__PURE__ */ o("p", { id: "pw-title", class: "mt-1 text-3xl font-bold tracking-tight text-gray-900", children: e ? t("modal.purchase_restored_title", "Subscription restored") : t("modal.purchase_success_title", "Payment received") }),
2625
+ /* @__PURE__ */ o("p", { class: "text-base leading-relaxed text-gray-600", children: e ? t(
2490
2626
  "modal.purchase_restored_subtitle",
2491
2627
  "Welcome back — your subscription is already active."
2492
2628
  ) : t("modal.purchase_success_subtitle", "Your subscription is now active.") }),
@@ -2495,27 +2631,27 @@ function ke({
2495
2631
  {
2496
2632
  type: "button",
2497
2633
  onClick: r,
2498
- class: "mt-3 rounded-xl px-5 py-2.5 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)]",
2634
+ class: "pw-cta-shimmer relative mt-2 flex min-h-12 w-full items-center justify-center overflow-hidden rounded-3xl px-5 py-2 text-center text-base font-semibold leading-tight text-white transition-transform duration-150 active:scale-[0.98] focus:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:ring-[var(--pw-accent)]",
2499
2635
  style: {
2500
- background: "linear-gradient(180deg, color-mix(in srgb, var(--pw-accent) 92%, white), var(--pw-accent))",
2501
- boxShadow: "0 1px 2px rgba(15,23,42,0.08), 0 8px 20px -6px color-mix(in srgb, var(--pw-accent) 50%, transparent)"
2636
+ 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%)",
2637
+ boxShadow: "0 0 20px 0 color-mix(in srgb, var(--pw-accent) 25%, transparent), inset 0 0 8px 0 color-mix(in srgb, white 25%, transparent)"
2502
2638
  },
2503
- children: t("modal.continue", "Continue")
2639
+ children: /* @__PURE__ */ o("span", { class: "relative z-10", children: t("modal.continue", "Continue") })
2504
2640
  }
2505
2641
  )
2506
2642
  ] });
2507
2643
  }
2508
- const or = 10 * 6e4, sr = 5e3, ar = 3e4;
2509
- class lr {
2644
+ const gr = 10 * 6e4, mr = 5e3, br = 3e4;
2645
+ class yr {
2510
2646
  constructor(e) {
2511
2647
  this.timer = null, this.timeoutTimer = null, this.visibilityHandler = null, this.focusHandler = null, this.messageHandler = null, this.stopped = !1, this.checking = !1, this.opts = {
2512
2648
  client: e.client,
2513
2649
  onActive: e.onActive,
2514
2650
  onTimeout: e.onTimeout ?? (() => {
2515
2651
  }),
2516
- timeoutMs: e.timeoutMs ?? or,
2517
- visibleIntervalMs: e.visibleIntervalMs ?? sr,
2518
- hiddenIntervalMs: e.hiddenIntervalMs ?? ar
2652
+ timeoutMs: e.timeoutMs ?? gr,
2653
+ visibleIntervalMs: e.visibleIntervalMs ?? mr,
2654
+ hiddenIntervalMs: e.hiddenIntervalMs ?? br
2519
2655
  };
2520
2656
  }
2521
2657
  start() {
@@ -2554,19 +2690,24 @@ class lr {
2554
2690
  !t || typeof t != "object" || t.type === "paywall_purchase" && this.check();
2555
2691
  }
2556
2692
  }
2557
- function cr() {
2693
+ function xr() {
2558
2694
  return !(typeof document > "u" || typeof window > "u" || typeof location < "u" && location.protocol === "chrome-extension:");
2559
2695
  }
2560
- const ae = { open: !1, view: null, error: null }, F = {
2696
+ const ae = {
2697
+ open: !1,
2698
+ view: null,
2699
+ error: null,
2700
+ processing: !1
2701
+ }, F = {
2561
2702
  status: "paywall_status",
2562
2703
  priceId: "paywall_price_id",
2563
2704
  sessionId: "paywall_session_id"
2564
2705
  };
2565
- let ur = class {
2706
+ let wr = class {
2566
2707
  constructor(e) {
2567
- this.handle = null, this.isOpen = !1, this.listeners = /* @__PURE__ */ new Map(), this.userUnsub = null, this.authUnsub = null, this.watcher = null, this.tracker = null, this.purchased = !1, this.trialStore = null, this.trialStoreConfig = null, this.lastTrialStatus = null, this.trialExpiredFired = !1, this.lastVisibility = null, this.currentState = ae, this.stateListeners = /* @__PURE__ */ new Set();
2568
- const { auth: t, ownsAuth: n } = dr(e);
2569
- this.auth = t, this.ownsAuth = n, this.billing = e.client ?? new Re({ ...e, auth: this.auth }), this.host = e.host, this.shadowMode = e.shadowMode ?? "closed", this.mountThenLoad = e.mountThenLoad ?? !0, this.inline = e.inline === !0, this.forceLocale = e.locale ?? null, this.userUnsub = this.billing.onUserChange((i) => {
2708
+ 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.lastMountedView = null, this.trialStore = null, this.trialStoreConfig = null, this.lastTrialStatus = null, this.trialExpiredFired = !1, this.lastVisibility = null, this.currentState = ae, this.stateListeners = /* @__PURE__ */ new Set();
2709
+ const { auth: t, ownsAuth: n } = kr(e);
2710
+ this.auth = t, this.ownsAuth = n, this.billing = e.client ?? new qe({ ...e, auth: this.auth }), this.host = e.host, this.shadowMode = e.shadowMode ?? "closed", this.mountThenLoad = e.mountThenLoad ?? !0, this.inline = e.inline === !0, this.forceLocale = e.locale ?? null, this.userUnsub = this.billing.onUserChange((i) => {
2570
2711
  this.emit("userChange", i);
2571
2712
  }), this.auth && (this.authUnsub = this.auth.onAuthChange((i, s) => {
2572
2713
  this.emit("authChange", { event: i, session: s });
@@ -2577,7 +2718,7 @@ let ur = class {
2577
2718
  const t = typeof e == "object" && e !== null ? e : {};
2578
2719
  if (t.enabled === !1) return;
2579
2720
  const n = t.endpoint ?? `${this.billing.apiOrigin}/api/v1/paywall/${this.billing.paywallId}/events`;
2580
- this.tracker = new ze({
2721
+ this.tracker = new Ne({
2581
2722
  endpoint: n,
2582
2723
  paywallId: this.billing.paywallId,
2583
2724
  capabilities: this.billing.capabilities,
@@ -2588,14 +2729,15 @@ let ur = class {
2588
2729
  maxBufferSize: t.maxBufferSize,
2589
2730
  fetch: t.fetch,
2590
2731
  sendBeacon: t.sendBeacon
2591
- }), this.on("open", () => this.tracker?.track("paywall_opened")), this.on(
2592
- "ready",
2593
- (i) => this.tracker?.track("paywall_viewed", {
2732
+ }), this.on("open", () => {
2733
+ this.lastMountedView === "layout" && this.tracker?.track("paywall_opened");
2734
+ }), this.on("ready", (i) => {
2735
+ this.lastMountedView === "layout" && this.tracker?.track("paywall_viewed", {
2594
2736
  is_test_mode: i.settings.is_test_mode,
2595
2737
  prices_count: i.prices.length,
2596
2738
  offers_count: i.offers.length
2597
- })
2598
- ), this.on(
2739
+ });
2740
+ }), this.on(
2599
2741
  "price_selected",
2600
2742
  (i) => this.tracker?.track("price_selected", { price_id: i.priceId })
2601
2743
  ), this.on(
@@ -2613,7 +2755,9 @@ let ur = class {
2613
2755
  ), this.on(
2614
2756
  "purchase_failed",
2615
2757
  (i) => this.tracker?.track("purchase_failed", { reason: i.reason })
2616
- ), this.on("close", () => this.tracker?.track("paywall_closed")), this.on(
2758
+ ), this.on("close", () => {
2759
+ this.lastMountedView === "layout" && this.tracker?.track("paywall_closed");
2760
+ }), this.on(
2617
2761
  "trial_blocked",
2618
2762
  (i) => this.tracker?.track("trial_blocked", {
2619
2763
  mode: i.mode,
@@ -2744,30 +2888,232 @@ let ur = class {
2744
2888
  this.auth && this.openInternal("auth", { ...e, skipTrial: !0 });
2745
2889
  }
2746
2890
  /**
2747
- * Открывает модалку с anonymous-gate. AnonGate сразу зовёт
2748
- * `auth.signInAnonymously()`:
2749
- * - если в storage есть `anonRefreshToken` silent resume через
2750
- * /auth/refresh, модалка схлопывается мгновенно (юзер видит лёгкий
2751
- * спиннер ~100мс);
2752
- * - иначе — fresh POST /auth/anonymous/signin без captcha (защита от
2753
- * abuse держится на Supabase per-real-IP rate-limit + CF Bot Fight Mode).
2891
+ * Шорткат над `openAuth()` открывает модалку сразу на signin-форме.
2892
+ * Эквивалент `openAuth()` (signin — дефолт). Существует для симметрии с
2893
+ * `openSignup()` и читаемости host-кода:
2894
+ * - `paywall.openSignin()` «вход в существующий аккаунт»
2895
+ * - `paywall.openSignup()` — «новая регистрация»
2896
+ * Без managed-auth no-op.
2897
+ */
2898
+ openSignin(e = {}) {
2899
+ this.auth && this.openInternal("auth", { ...e, skipTrial: !0, authMode: "signin" });
2900
+ }
2901
+ /**
2902
+ * Открывает модалку с auth-gate сразу в режиме регистрации (signup-mode
2903
+ * AuthPanel'а — email/password/repeat). Если в paywall layout админ
2904
+ * отключил allow_signup, AuthPanel игнорит mode и стартует с signin —
2905
+ * соблюдается admin-конфиг.
2906
+ * Без managed-auth — no-op.
2907
+ */
2908
+ openSignup(e = {}) {
2909
+ this.auth && this.openInternal("auth", { ...e, skipTrial: !0, authMode: "signup" });
2910
+ }
2911
+ /**
2912
+ * Direct-checkout: создать checkout-URL по конкретной цене и сразу открыть
2913
+ * платёжного провайдера, минуя layout с тарифами. Полезно когда
2914
+ * host-приложение рендерит pricing-карточки/таблицу собственным UI и
2915
+ * хочет, чтобы клик по «Buy / Get this plan» вёл прямо в Stripe/Paddle.
2916
+ *
2917
+ * **Late-mount UX.** В отличие от `open()`, модалка не появляется во время
2918
+ * фоновой работы (bootstrap + visibility/trial gates + createCheckout).
2919
+ * Хост на этой фазе показывает busy-state прямо на своей кнопке (через
2920
+ * `state.processing === true` из `paywall.getState()` — или автоматически
2921
+ * через `<PaywallButton priceId>` в sdk-react). Модалка монтируется
2922
+ * ТОЛЬКО когда реально нужна UI:
2923
+ * - `checkout_mode='preauth'` + managed-auth + не залогинен → auth-gate
2924
+ * (форма signin'а); после успеха auto-resume в createCheckout.
2925
+ * - popup провайдера заблокирован браузером → popup_blocked view с
2926
+ * retry-кнопкой под fresh user gesture.
2927
+ * - popup открылся успешно → awaiting_payment view (индикатор «оплати
2928
+ * в новой вкладке» + I've paid).
2929
+ *
2930
+ * Что эмитится без модалки:
2931
+ * - `purchase_completed{restored:true, priceId}` когда юзер уже подписан
2932
+ * (cached user, fresh bootstrap, или 409 hasActivePurchase от бэка) —
2933
+ * headless reject;
2934
+ * - `error` когда createCheckout упал или identity.email отсутствует;
2935
+ * - `visibility_blocked` / `trial_blocked` — стандартные gate-эвенты.
2936
+ *
2937
+ * Что эмитится одновременно с модалкой:
2938
+ * - `checkout_started{priceId, url, acquiring}` ровно когда headless URL
2939
+ * получен, ДО mount'а awaiting_payment/popup_blocked.
2754
2940
  *
2755
- * После успешного signIn'а модалка закрывается; host подхватывает свежую
2756
- * session через `auth.onAuthChange` или `paywall.onUserChange`. Для UX
2757
- * "просто залогиниться чтобы api-gateway работал, без покупок".
2941
+ * Offer (countdown-скидка) автоматически резолвится из cached offers'ов
2942
+ * через `getOfferForPrice(priceId)` и передаётся в createCheckout как
2943
+ * `offerId` чтобы duration_minutes-офферы тоже применились на бэке
2944
+ * (для них нет server-side таймера, без явного offer-id скидка теряется).
2758
2945
  *
2759
- * Без managed-auth (`auth` не подключён) метод — no-op. Триал и
2760
- * visibility-таргетинг этот flow обходит: анон-логин не должен зависеть
2761
- * от страны юзера или trial-стейджа.
2946
+ * Требования:
2947
+ * - `identity.email` должен быть выставлен (через `opts.identity`, либо
2948
+ * managed-auth, либо ранний `setIdentity`/`paywall.open({identity})`).
2949
+ * Без email бэк `/start-checkout` 400'нёт; SDK эмитнет `error`.
2950
+ * - В `checkout_mode='preauth'` без managed-auth — backend требует
2951
+ * email-юзера; убедись что `identity.email` явно задан.
2952
+ *
2953
+ * Без модалки совсем (когда host рендерит свой awaiting-payment экран) —
2954
+ * используй `paywall.billing.createCheckout({priceId, offerId})` напрямую,
2955
+ * но тогда auth-gate / popup_blocked / awaiting_payment придётся рисовать
2956
+ * самостоятельно.
2762
2957
  */
2763
- openAnonGate(e = {}) {
2764
- this.auth && this.openInternal("anon", { ...e, skipTrial: !0, skipVisibility: !0 });
2958
+ checkout(e, t = {}) {
2959
+ if (t.identity && this.billing.setIdentity(t.identity), t.renew !== !0 && this.billing.getCachedUser()?.has_active_subscription) {
2960
+ this.emit("purchase_completed", {
2961
+ priceId: e,
2962
+ sessionId: null,
2963
+ restored: !0
2964
+ });
2965
+ return;
2966
+ }
2967
+ this.runDirectCheckout(e, t);
2968
+ }
2969
+ /** Headless prep-work для `checkout(priceId, opts)`: bootstrap → gates →
2970
+ * preauth check → createCheckout → mount модалки с финальным view.
2971
+ * Вынесено отдельным методом ради чистого async/await flow вместо вложенных
2972
+ * then-chain'ов (5+ ветвей). Любая ошибка не пробрасывается наружу: эмитим
2973
+ * через `paywall.emit('error')` и выходим — host подписан на `error`-event. */
2974
+ async runDirectCheckout(e, t) {
2975
+ const n = t.renew === !0, i = t.skipTrial === !0, s = t.skipVisibility === !0;
2976
+ this.applyProcessing(!0);
2977
+ const a = () => {
2978
+ this.applyProcessing(!1);
2979
+ };
2980
+ let l;
2981
+ try {
2982
+ l = await this.billing.bootstrap();
2983
+ } catch (m) {
2984
+ const A = m instanceof L ? m : new L("unknown", "Failed to load paywall", { cause: m });
2985
+ this.emit("error", A), a();
2986
+ return;
2987
+ }
2988
+ if (!s) {
2989
+ const m = l.settings.visibility;
2990
+ if (m && (this.lastVisibility = m, !m.visible)) {
2991
+ this.emit("visibility_blocked", m), a();
2992
+ return;
2993
+ }
2994
+ }
2995
+ if (!i && await this.checkTrialBeforeCheckout(l)) {
2996
+ a();
2997
+ return;
2998
+ }
2999
+ if (!n && l.user?.has_active_subscription) {
3000
+ this.emit("purchase_completed", {
3001
+ priceId: e,
3002
+ sessionId: null,
3003
+ restored: !0
3004
+ }), a();
3005
+ return;
3006
+ }
3007
+ const c = l.settings.checkout_mode ?? "guest", h = this.auth?.getCachedSession() ?? null, d = !!h && !h.user.is_anonymous;
3008
+ if (c === "preauth" && !!this.auth && !d) {
3009
+ this.purchased = !1, this.mountAndShow("auth", {
3010
+ renew: n,
3011
+ authMode: "signin",
3012
+ checkoutPriceId: e
3013
+ });
3014
+ return;
3015
+ }
3016
+ const _ = this.getOfferForPrice(e);
3017
+ let p;
3018
+ try {
3019
+ p = await this.billing.createCheckout({
3020
+ priceId: e,
3021
+ offerId: _?.offer.id,
3022
+ ignoreActivePurchase: n
3023
+ });
3024
+ } catch (m) {
3025
+ if (m instanceof L && m.code === "already_purchased") {
3026
+ try {
3027
+ await this.billing.getUser({ force: !0 });
3028
+ } catch {
3029
+ }
3030
+ this.emit("purchase_completed", {
3031
+ priceId: e,
3032
+ sessionId: null,
3033
+ restored: !0
3034
+ }), a();
3035
+ return;
3036
+ }
3037
+ const A = m instanceof L ? m : new L("checkout_failed", "Checkout failed", { cause: m });
3038
+ this.emit("error", A), a();
3039
+ return;
3040
+ }
3041
+ if (this.emit("checkout_started", {
3042
+ priceId: e,
3043
+ url: p.url,
3044
+ acquiring: p.acquiring
3045
+ }), this.startUserWatcher(), typeof window > "u" || !p.url) {
3046
+ this.mountAndShow("awaiting_payment", {
3047
+ renew: n,
3048
+ checkoutPriceId: e,
3049
+ checkoutUrl: p.url
3050
+ });
3051
+ return;
3052
+ }
3053
+ const v = window.open(p.url, "_blank");
3054
+ if (this.purchased = !1, v) {
3055
+ try {
3056
+ v.opener = null;
3057
+ } catch {
3058
+ }
3059
+ this.mountAndShow("awaiting_payment", {
3060
+ renew: n,
3061
+ checkoutPriceId: e,
3062
+ checkoutUrl: p.url
3063
+ });
3064
+ } else
3065
+ this.mountAndShow("popup_blocked", {
3066
+ renew: n,
3067
+ checkoutPriceId: e,
3068
+ checkoutUrl: p.url
3069
+ });
3070
+ }
3071
+ /** Trial-check без mount'а (для late-mount direct-checkout). Возвращает
3072
+ * true если trial заблокировал — caller должен прекратить flow. На любой
3073
+ * storage-ошибке log+продолжаем (не блокируем продажу). */
3074
+ async checkTrialBeforeCheckout(e) {
3075
+ const t = e.settings.trial;
3076
+ if (!t) return !1;
3077
+ const n = this.ensureTrialStore(t);
3078
+ try {
3079
+ const i = await n.check();
3080
+ if (this.lastTrialStatus = i, i.mode === "none") return !1;
3081
+ if (i.blocked) {
3082
+ const s = await n.recordBlock();
3083
+ return this.lastTrialStatus = s, this.emit("trial_blocked", s), !0;
3084
+ }
3085
+ return this.trialExpiredFired || (this.trialExpiredFired = !0, this.emit("trial_expired")), !1;
3086
+ } catch (i) {
3087
+ return typeof console < "u" && console.warn("[paywall] trial check failed", i), !1;
3088
+ }
3089
+ }
3090
+ applyProcessing(e) {
3091
+ this.currentState.processing !== e && this.applyState({ ...this.currentState, processing: e });
3092
+ }
3093
+ /**
3094
+ * Headless anonymous signin без открытия модалки. Внутри:
3095
+ * idempotent (если уже анон — instant return) → resume через сохранённый
3096
+ * refresh_token → fresh /auth/anonymous/signin. Дедуплицирует
3097
+ * параллельные вызовы внутри AuthClient'а.
3098
+ *
3099
+ * Удобно для host-кнопок типа «Continue as guest» — host сам управляет
3100
+ * loading-стейтом на своей кнопке, без полупустой модалки со спиннером.
3101
+ * Без managed-auth — резолвится rejected promise'ом (нет AuthClient'а
3102
+ * чтобы делать signin).
3103
+ */
3104
+ signInAnonymously() {
3105
+ return this.auth ? this.auth.signInAnonymously() : Promise.reject(
3106
+ new L(
3107
+ "invalid_config",
3108
+ "signInAnonymously requires managed-auth. Pass `auth: true` to PaywallUI."
3109
+ )
3110
+ );
2765
3111
  }
2766
3112
  openInternal(e, t) {
2767
3113
  t.identity && this.billing.setIdentity(t.identity), this.purchased = !1;
2768
- const n = t.skipTrial === !0 || e === "support", i = t.skipVisibility === !0 || e === "support" || e === "auth" || e === "anon", s = t.renew === !0;
3114
+ const n = t.skipTrial === !0 || e === "support", i = t.skipVisibility === !0 || e === "support" || e === "auth", s = t.renew === !0;
2769
3115
  if (n && i) {
2770
- this.mountAndShow(e, { renew: s });
3116
+ this.mountAndShow(e, { renew: s, authMode: t.authMode });
2771
3117
  return;
2772
3118
  }
2773
3119
  const a = this.billing.getCachedBootstrap();
@@ -2780,7 +3126,9 @@ let ur = class {
2780
3126
  });
2781
3127
  return;
2782
3128
  }
2783
- this.billing.bootstrap().then((l) => this.runOpenGates(e, l, { skipTrial: n, skipVisibility: i, renew: s })).catch(() => {
3129
+ this.billing.bootstrap().then(
3130
+ (l) => this.runOpenGates(e, l, { skipTrial: n, skipVisibility: i, renew: s })
3131
+ ).catch(() => {
2784
3132
  this.mountAndShow(e, { renew: s });
2785
3133
  });
2786
3134
  }
@@ -2855,31 +3203,43 @@ let ur = class {
2855
3203
  });
2856
3204
  }
2857
3205
  ensureTrialStore(e) {
2858
- if (this.trialStore && this.trialStoreConfig && fr(this.trialStoreConfig, e))
3206
+ if (this.trialStore && this.trialStoreConfig && Sr(this.trialStoreConfig, e))
2859
3207
  return this.trialStore;
2860
3208
  this.trialStoreConfig = e;
2861
3209
  const t = this.billing.createTrialStore;
2862
- return this.trialStore = typeof t == "function" ? t.call(this.billing, e) : De(this.billing.getStorage(), this.billing.paywallId, e), this.trialStore;
3210
+ return this.trialStore = typeof t == "function" ? t.call(this.billing, e) : Fe(this.billing.getStorage(), this.billing.paywallId, e), this.trialStore;
2863
3211
  }
2864
3212
  mountAndShow(e, t = {}) {
2865
- const n = t.renew === !0;
3213
+ this.lastMountedView = e;
3214
+ const n = t.renew === !0, i = t.authMode, a = e === "auth" || e === "awaiting_payment" || e === "popup_blocked" ? t.checkoutPriceId ?? null : null, l = e === "awaiting_payment" || e === "popup_blocked" ? t.checkoutUrl ?? null : null;
2866
3215
  if (this.handle) {
2867
- this.isOpen = !0, this.handle.update({ open: !0, initialView: e, purchased: !1, renew: n }), this.emit("open");
3216
+ this.isOpen = !0, this.handle.update({
3217
+ open: !0,
3218
+ initialView: e,
3219
+ initialAuthMode: i,
3220
+ initialCheckoutPriceId: a,
3221
+ initialCheckoutUrl: l,
3222
+ purchased: !1,
3223
+ renew: n
3224
+ }), this.emit("open");
2868
3225
  return;
2869
3226
  }
2870
- this.isOpen = !0, this.handle = Ze(
2871
- er,
3227
+ this.isOpen = !0, this.handle = tt(
3228
+ ur,
2872
3229
  {
2873
3230
  client: this.billing,
2874
3231
  open: !0,
2875
3232
  initialView: e,
3233
+ initialAuthMode: i,
3234
+ initialCheckoutPriceId: a,
3235
+ initialCheckoutUrl: l,
2876
3236
  purchased: !1,
2877
3237
  renew: n,
2878
3238
  onClose: () => this.close(),
2879
- onEvent: (i, s) => {
2880
- this.emit(i, s), i === "checkout_started" && this.startUserWatcher();
3239
+ onEvent: (c, h) => {
3240
+ this.emit(c, h), c === "checkout_started" && this.startUserWatcher();
2881
3241
  },
2882
- onState: (i) => this.applyState(i),
3242
+ onState: (c) => this.applyState(c),
2883
3243
  inline: this.inline,
2884
3244
  locale: this.forceLocale
2885
3245
  },
@@ -2887,7 +3247,7 @@ let ur = class {
2887
3247
  ), this.emit("open");
2888
3248
  }
2889
3249
  applyState(e) {
2890
- if (!pr(this.currentState, e)) {
3250
+ if (!_r(this.currentState, e)) {
2891
3251
  this.currentState = e;
2892
3252
  for (const t of this.stateListeners)
2893
3253
  try {
@@ -2965,6 +3325,36 @@ let ur = class {
2965
3325
  getCachedPrices() {
2966
3326
  return this.billing.getCachedPrices();
2967
3327
  }
3328
+ /** Sync-снимок офферов. null = bootstrap не загружали, [] = пейвол без офферов.
3329
+ * Бэк уже применил серверный targeting (страны/email/режим) — наружу
3330
+ * выезжает только то, что применимо к текущему юзеру. */
3331
+ getCachedOffers() {
3332
+ return this.billing.getCachedOffers();
3333
+ }
3334
+ /**
3335
+ * Резолвит активный offer для конкретной цены: price_id-таргетинг +
3336
+ * countdown (`expires_at` ИЛИ `duration_minutes` от первого открытия
3337
+ * пейвола, см. clientStorage `pw-offer-{id}-start`).
3338
+ *
3339
+ * Read-only — НЕ записывает start для `duration_minutes`-офферов. Запись
3340
+ * стартует только когда модалка реально открыта (renderer'ом). До этого
3341
+ * `getOfferForPrice` вернёт `null` для duration-only офферов, чтобы
3342
+ * страницы-хосты вне модалки (pricing, landing) не активировали countdown
3343
+ * раньше времени.
3344
+ *
3345
+ * Хост-странице нужен countdown, который тикает каждую секунду — для
3346
+ * этого использовать React-хук `usePaywallOffer(priceId)` из sdk-react
3347
+ * либо обёртку поверх `setInterval(1000)` + повторный вызов этого метода.
3348
+ */
3349
+ getOfferForPrice(e) {
3350
+ const t = this.billing.getCachedOffers();
3351
+ if (!t) return null;
3352
+ const n = Ce(t, e);
3353
+ return n ? Ie(n, {
3354
+ now: Date.now(),
3355
+ readStart: N
3356
+ }) : null;
3357
+ }
2968
3358
  /** Снимок текущего «языка юзера» — proxy над `billing.getUserLanguage()`.
2969
3359
  * Используй, чтобы синхронизировать i18n host'а с тем, что фактически
2970
3360
  * показывает пейвол. См. подробности в `BillingClient.getUserLanguage`. */
@@ -3013,7 +3403,7 @@ let ur = class {
3013
3403
  user: a
3014
3404
  };
3015
3405
  }
3016
- const n = t.user ?? null;
3406
+ const n = this.billing.getCachedUser() ?? t.user ?? null;
3017
3407
  if (n?.has_active_subscription)
3018
3408
  return {
3019
3409
  access: "granted",
@@ -3053,7 +3443,7 @@ let ur = class {
3053
3443
  // В extension popup runtime — no-op (popup не доживёт). Там полагаемся на
3054
3444
  // bootstrap при следующем открытии.
3055
3445
  startUserWatcher() {
3056
- this.watcher || cr() && (this.watcher = new lr({
3446
+ this.watcher || xr() && (this.watcher = new yr({
3057
3447
  client: this.billing,
3058
3448
  onActive: (e) => {
3059
3449
  this.watcher = null, this.emit("purchase_completed", { priceId: null, sessionId: null });
@@ -3082,23 +3472,23 @@ let ur = class {
3082
3472
  */
3083
3473
  checkReturn() {
3084
3474
  if (typeof window > "u") return;
3085
- const e = new URL(window.location.href), t = ve(e.hash.replace(/^#/, "")), n = ve(e.search.replace(/^\?/, "")), i = t ?? n;
3475
+ const e = new URL(window.location.href), t = Se(e.hash.replace(/^#/, "")), n = Se(e.search.replace(/^\?/, "")), i = t ?? n;
3086
3476
  i && (i.status === "paid" ? (this.emit("purchase_completed", {
3087
3477
  priceId: i.priceId,
3088
3478
  sessionId: i.sessionId
3089
- }), gr(i)) : (i.status === "failed" || i.status === "cancelled") && this.emit("purchase_failed", { reason: i.status }), mr(e));
3479
+ }), Cr(i)) : (i.status === "failed" || i.status === "cancelled") && this.emit("purchase_failed", { reason: i.status }), Ir(e));
3090
3480
  }
3091
3481
  destroy() {
3092
3482
  this.tracker?.destroy(), this.tracker = null, this.listeners.clear(), this.stateListeners.clear(), this.watcher?.stop(), this.watcher = null, this.userUnsub?.(), this.userUnsub = null, this.authUnsub?.(), this.authUnsub = null, this.ownsAuth && this.auth && this.auth.destroy?.(), this.ownsAuth = !1, this.billing.destroy?.(), this.handle?.unmount(), this.handle = null, this.isOpen = !1, this.currentState = ae;
3093
3483
  }
3094
3484
  };
3095
- function dr(r) {
3485
+ function kr(r) {
3096
3486
  if (!r.auth) return { auth: void 0, ownsAuth: !1 };
3097
- if (r.auth instanceof ue || hr(r.auth))
3487
+ if (r.auth instanceof de || vr(r.auth))
3098
3488
  return { auth: r.auth, ownsAuth: !1 };
3099
3489
  const e = r.auth === !0 ? {} : r.auth;
3100
3490
  return {
3101
- auth: new ue({
3491
+ auth: new de({
3102
3492
  paywallId: r.paywallId,
3103
3493
  apiOrigin: e.apiOrigin ?? r.apiOrigin,
3104
3494
  storage: e.storage ?? r.storage,
@@ -3108,18 +3498,18 @@ function dr(r) {
3108
3498
  ownsAuth: !0
3109
3499
  };
3110
3500
  }
3111
- function hr(r) {
3501
+ function vr(r) {
3112
3502
  if (typeof r != "object" || r === null) return !1;
3113
3503
  const e = r;
3114
3504
  return typeof e.onAuthChange == "function" && typeof e.getCachedSession == "function" && typeof e.signOut == "function";
3115
3505
  }
3116
- function pr(r, e) {
3117
- return r.open === e.open && r.view === e.view && r.error === e.error;
3506
+ function _r(r, e) {
3507
+ return r.open === e.open && r.view === e.view && r.error === e.error && r.processing === e.processing;
3118
3508
  }
3119
- function fr(r, e) {
3509
+ function Sr(r, e) {
3120
3510
  return r.mode === e.mode && r.payload === e.payload && r.storage === e.storage;
3121
3511
  }
3122
- function ve(r) {
3512
+ function Se(r) {
3123
3513
  if (!r) return null;
3124
3514
  const e = new URLSearchParams(r), t = e.get(F.status);
3125
3515
  return t ? {
@@ -3128,7 +3518,7 @@ function ve(r) {
3128
3518
  sessionId: e.get(F.sessionId)
3129
3519
  } : null;
3130
3520
  }
3131
- function gr(r) {
3521
+ function Cr(r) {
3132
3522
  if (!(typeof window > "u" || !window.opener))
3133
3523
  try {
3134
3524
  window.opener.postMessage(
@@ -3143,7 +3533,7 @@ function gr(r) {
3143
3533
  } catch {
3144
3534
  }
3145
3535
  }
3146
- function mr(r) {
3536
+ function Ir(r) {
3147
3537
  const e = (n, i) => {
3148
3538
  if (!n) return "";
3149
3539
  const s = new URLSearchParams(n.replace(/^[?#]/, ""));
@@ -3153,7 +3543,7 @@ function mr(r) {
3153
3543
  }, t = r.pathname + e(r.search, "?") + e(r.hash, "#");
3154
3544
  window.history.replaceState(null, "", t);
3155
3545
  }
3156
- class yr {
3546
+ class Ar {
3157
3547
  constructor(e, t, n) {
3158
3548
  this.transport = e, this.paywallId = t, this.config = n;
3159
3549
  }
@@ -3176,7 +3566,7 @@ class yr {
3176
3566
  });
3177
3567
  }
3178
3568
  }
3179
- class xr {
3569
+ class Lr {
3180
3570
  constructor(e, t) {
3181
3571
  this.transport = e, this.cachedBootstrap = null, this.cachedUser = null, this.cachedBalances = null, this.identity = null, this.userListeners = /* @__PURE__ */ new Set(), this.balanceListeners = /* @__PURE__ */ new Set(), this.bootstrapListeners = /* @__PURE__ */ new Set(), this.unsubUserBroadcast = null, this.unsubBalancesBroadcast = null, this.paywallId = t.paywallId, this.apiOrigin = t.apiOrigin, this.remoteStorageAdapter = {
3182
3572
  getItem: (n) => this.transport.request("storage.get", { key: n }),
@@ -3244,6 +3634,12 @@ class xr {
3244
3634
  getCachedPrices() {
3245
3635
  return this.cachedBootstrap?.prices ?? null;
3246
3636
  }
3637
+ /** Sync-снимок офферов. null = bootstrap не загружали, [] = пейвол без офферов.
3638
+ * Серверный таргетинг (страны/email/режим) уже применён бэком — наружу
3639
+ * выезжает только то, что применимо к текущему юзеру. */
3640
+ getCachedOffers() {
3641
+ return this.cachedBootstrap?.offers ?? null;
3642
+ }
3247
3643
  // === Visitor ===
3248
3644
  async getVisitorId() {
3249
3645
  return this.transport.request("billing.getVisitorId", void 0);
@@ -3357,7 +3753,7 @@ class xr {
3357
3753
  * read-modify-write. PaywallUI duck-types этот метод и предпочитает его
3358
3754
  * локальной фабрике, если он есть. */
3359
3755
  createTrialStore(e) {
3360
- return new yr(this.transport, this.paywallId, e);
3756
+ return new Ar(this.transport, this.paywallId, e);
3361
3757
  }
3362
3758
  // === Identity ===
3363
3759
  getIdentity() {
@@ -3390,10 +3786,10 @@ class xr {
3390
3786
  * broadcast'ов от offscreen — чтобы host'овский onUserChange handler
3391
3787
  * получил signal независимо от того, кто триггернул обновление. */
3392
3788
  applyUser(e) {
3393
- br(this.cachedUser, e) || (this.cachedUser = e, this.fireUserListeners(e));
3789
+ Mr(this.cachedUser, e) || (this.cachedUser = e, this.fireUserListeners(e));
3394
3790
  }
3395
3791
  applyBalances(e) {
3396
- wr(this.cachedBalances, e) || (this.cachedBalances = e, this.fireBalanceListeners(e));
3792
+ Tr(this.cachedBalances, e) || (this.cachedBalances = e, this.fireBalanceListeners(e));
3397
3793
  }
3398
3794
  fireUserListeners(e) {
3399
3795
  for (const t of [...this.userListeners])
@@ -3412,17 +3808,17 @@ class xr {
3412
3808
  }
3413
3809
  }
3414
3810
  }
3415
- function br(r, e) {
3811
+ function Mr(r, e) {
3416
3812
  return r === e ? !0 : !r || !e ? !1 : r.has_active_subscription === e.has_active_subscription && (r.purchases?.length ?? 0) === (e.purchases?.length ?? 0);
3417
3813
  }
3418
- function wr(r, e) {
3814
+ function Tr(r, e) {
3419
3815
  if (r === e) return !0;
3420
3816
  if (!r || !e || r.length !== e.length) return !1;
3421
3817
  for (let t = 0; t < r.length; t++)
3422
3818
  if (r[t].type !== e[t].type || r[t].count !== e[t].count) return !1;
3423
3819
  return !0;
3424
3820
  }
3425
- class kr {
3821
+ class Br {
3426
3822
  constructor(e, t) {
3427
3823
  this.transport = e, this.session = null, this.listeners = /* @__PURE__ */ new Set(), this.unsubBroadcast = null, this.paywallId = t.paywallId, this.apiOrigin = t.apiOrigin, this.unsubBroadcast = this.transport.on("authChange", ({ event: n, session: i }) => {
3428
3824
  this.applySession(n, i);
@@ -3500,12 +3896,12 @@ class kr {
3500
3896
  /** Анонимный sign-in (Supabase user без email). Логика (idempotent-check +
3501
3897
  * resume через сохранённый refresh_token + fresh signin) живёт в
3502
3898
  * offscreen-AuthClient'е — content только проксирует. captchaToken и
3503
- * forceCaptcha — pass-through для forward-compat / switch-account flow. */
3899
+ * forceNewAnon — pass-through для forward-compat / switch-account flow. */
3504
3900
  async signInAnonymously(e = {}) {
3505
3901
  const t = await this.transport.request("auth.signInAnonymously", {
3506
3902
  captchaToken: e.captchaToken,
3507
3903
  userMeta: e.userMeta,
3508
- forceCaptcha: e.forceCaptcha
3904
+ forceNewAnon: e.forceNewAnon
3509
3905
  });
3510
3906
  return this.applySession("SIGNED_IN", t), t;
3511
3907
  }
@@ -3533,14 +3929,14 @@ class kr {
3533
3929
  */
3534
3930
  async signInWithOAuth(e) {
3535
3931
  if (typeof window > "u")
3536
- throw new j("oauth_unavailable", "window is required for OAuth");
3932
+ throw new L("oauth_unavailable", "window is required for OAuth");
3537
3933
  const t = `pw-oauth-pending-${Math.random().toString(36).slice(2, 10)}`, n = window.open("about:blank", t, "width=480,height=640,popup=yes");
3538
3934
  if (!n)
3539
- throw new j(
3935
+ throw new L(
3540
3936
  "popup_blocked",
3541
3937
  "browser blocked auth popup — call from a user gesture"
3542
3938
  );
3543
- Sr(n, e.provider);
3939
+ Or(n, e.provider);
3544
3940
  try {
3545
3941
  const { authorizeUrl: i, state: s } = await this.transport.request("auth.oauthStart", {
3546
3942
  provider: e.provider,
@@ -3548,7 +3944,7 @@ class kr {
3548
3944
  userMeta: e.userMeta
3549
3945
  });
3550
3946
  n.name = `pw-oauth-${s}`, n.location.replace(i), e.onPopupOpened?.();
3551
- const a = await qe(n, s), l = await this.transport.request("auth.oauthExchange", { state: s, code: a });
3947
+ const a = await Ve(n, s), l = await this.transport.request("auth.oauthExchange", { state: s, code: a });
3552
3948
  return this.applySession("SIGNED_IN", l), l;
3553
3949
  } catch (i) {
3554
3950
  try {
@@ -3562,7 +3958,7 @@ class kr {
3562
3958
  this.unsubBroadcast?.(), this.unsubBroadcast = null, this.listeners.clear(), this.session = null;
3563
3959
  }
3564
3960
  applySession(e, t) {
3565
- if (!vr(this.session, t)) {
3961
+ if (!Er(this.session, t)) {
3566
3962
  this.session = t;
3567
3963
  for (const n of [...this.listeners])
3568
3964
  try {
@@ -3573,17 +3969,17 @@ class kr {
3573
3969
  }
3574
3970
  }
3575
3971
  }
3576
- function vr(r, e) {
3972
+ function Er(r, e) {
3577
3973
  return r === e ? !0 : !r || !e ? !1 : r.access_token === e.access_token && r.refresh_token === e.refresh_token && r.expires_at === e.expires_at && r.user.id === e.user.id;
3578
3974
  }
3579
- const _r = {
3975
+ const Pr = {
3580
3976
  google: "Google",
3581
3977
  apple: "Apple",
3582
3978
  github: "GitHub",
3583
3979
  facebook: "Facebook"
3584
3980
  };
3585
- function Sr(r, e) {
3586
- const t = _r[e] ?? e;
3981
+ function Or(r, e) {
3982
+ const t = Pr[e] ?? e;
3587
3983
  try {
3588
3984
  const n = r.document;
3589
3985
  n.title = `Sign in with ${t}`;
@@ -3598,7 +3994,7 @@ function Sr(r, e) {
3598
3994
  } catch {
3599
3995
  }
3600
3996
  }
3601
- class Cr {
3997
+ class jr {
3602
3998
  constructor(e) {
3603
3999
  this.transport = e;
3604
4000
  }
@@ -3610,7 +4006,7 @@ class Cr {
3610
4006
  });
3611
4007
  }
3612
4008
  }
3613
- class Ir {
4009
+ class Ur {
3614
4010
  constructor(e) {
3615
4011
  this.factory = e, this.channel = null, this.channelDisposers = [], this.pending = /* @__PURE__ */ new Map(), this.listeners = /* @__PURE__ */ new Map(), this.destroyed = !1, this.nextId = 0, this.clientId = `c-${Math.random().toString(36).slice(2, 10)}`;
3616
4012
  }
@@ -3624,21 +4020,21 @@ class Ir {
3624
4020
  this.channel = e;
3625
4021
  const t = e.onMessage((i) => this.handleMessage(i)), n = e.onDisconnect(() => this.handleDisconnect());
3626
4022
  return this.channelDisposers = [t, n], this.request("handshake", {
3627
- protocolVersion: K,
4023
+ protocolVersion: Q,
3628
4024
  clientId: this.clientId
3629
4025
  }).then((i) => {
3630
- i.protocolVersion !== K && console.warn(
3631
- `[sdk-extension] protocol version mismatch: client=${K}, offscreen=${i.protocolVersion}. Update host's @monetize.software/sdk-extension.`
4026
+ i.protocolVersion !== Q && console.warn(
4027
+ `[sdk-extension] protocol version mismatch: client=${Q}, offscreen=${i.protocolVersion}. Update host's @monetize.software/sdk-extension.`
3632
4028
  );
3633
4029
  }).catch(() => {
3634
4030
  }), e;
3635
4031
  }
3636
4032
  handleMessage(e) {
3637
- if (Ar(e)) {
4033
+ if (Dr(e)) {
3638
4034
  if (e.type === "response") {
3639
4035
  const t = this.pending.get(e.id);
3640
4036
  if (!t) return;
3641
- this.pending.delete(e.id), t.signal?.removeEventListener("abort", t.abortListener), e.ok ? t.resolve(e.result) : t.reject(Ne(e.error));
4037
+ this.pending.delete(e.id), t.signal?.removeEventListener("abort", t.abortListener), e.ok ? t.resolve(e.result) : t.reject($e(e.error));
3642
4038
  return;
3643
4039
  }
3644
4040
  if (e.type === "event") {
@@ -3659,7 +4055,7 @@ class Ir {
3659
4055
  const e = Array.from(this.pending.values());
3660
4056
  this.pending.clear();
3661
4057
  for (const t of e)
3662
- t.signal?.removeEventListener("abort", t.abortListener), t.reject(new Lr());
4058
+ t.signal?.removeEventListener("abort", t.abortListener), t.reject(new Rr());
3663
4059
  }
3664
4060
  request(e, t, n = {}) {
3665
4061
  if (this.destroyed)
@@ -3668,12 +4064,12 @@ class Ir {
3668
4064
  return Promise.reject(new DOMException("Aborted", "AbortError"));
3669
4065
  const i = this.ensureChannel(), s = `r${++this.nextId}`;
3670
4066
  return new Promise((a, l) => {
3671
- const d = {
4067
+ const c = {
3672
4068
  resolve: a,
3673
4069
  reject: l,
3674
4070
  signal: n.signal
3675
4071
  };
3676
- n.signal && (d.abortListener = () => {
4072
+ n.signal && (c.abortListener = () => {
3677
4073
  if (this.pending.delete(s)) {
3678
4074
  l(new DOMException("Aborted", "AbortError"));
3679
4075
  try {
@@ -3681,17 +4077,17 @@ class Ir {
3681
4077
  } catch {
3682
4078
  }
3683
4079
  }
3684
- }, n.signal.addEventListener("abort", d.abortListener)), this.pending.set(s, d);
3685
- const p = {
4080
+ }, n.signal.addEventListener("abort", c.abortListener)), this.pending.set(s, c);
4081
+ const h = {
3686
4082
  type: "request",
3687
4083
  id: s,
3688
4084
  kind: e,
3689
4085
  params: t
3690
4086
  };
3691
4087
  try {
3692
- i.send(p);
3693
- } catch (u) {
3694
- this.pending.delete(s), n.signal?.removeEventListener("abort", d.abortListener), l(u);
4088
+ i.send(h);
4089
+ } catch (d) {
4090
+ this.pending.delete(s), n.signal?.removeEventListener("abort", c.abortListener), l(d);
3695
4091
  }
3696
4092
  });
3697
4093
  }
@@ -3715,28 +4111,28 @@ class Ir {
3715
4111
  this.channel?.close(), this.channel = null;
3716
4112
  }
3717
4113
  }
3718
- class Lr extends Error {
4114
+ class Rr extends Error {
3719
4115
  constructor() {
3720
4116
  super("Transport channel disconnected mid-request"), this.code = "transport_disconnected", this.name = "TransportDisconnectedError";
3721
4117
  }
3722
4118
  }
3723
- function Ar(r) {
4119
+ function Dr(r) {
3724
4120
  if (typeof r != "object" || r === null) return !1;
3725
4121
  const e = r.type;
3726
4122
  return e === "request" || e === "response" || e === "event";
3727
4123
  }
3728
- let W = null;
3729
- function Er() {
3730
- return W || (W = new Ir(() => Fe(Ge)), W);
4124
+ let Z = null;
4125
+ function zr() {
4126
+ return Z || (Z = new Ur(() => He(Ke)), Z);
3731
4127
  }
3732
- class Rr extends ur {
4128
+ class Wr extends wr {
3733
4129
  constructor(e) {
3734
- const t = Er(), n = new xr(t, {
4130
+ const t = zr(), n = new Lr(t, {
3735
4131
  paywallId: e.paywallId,
3736
4132
  apiOrigin: e.apiOrigin
3737
4133
  });
3738
4134
  let i;
3739
- e.auth === !0 ? i = new kr(t, {
4135
+ e.auth === !0 ? i = new Br(t, {
3740
4136
  paywallId: e.paywallId,
3741
4137
  apiOrigin: e.apiOrigin
3742
4138
  }) : e.auth && console.warn(
@@ -3752,7 +4148,7 @@ class Rr extends ur {
3752
4148
  // Внутренний EventTracker отключаем — единственный tracker живёт в
3753
4149
  // offscreen'е. Манчиально подписываемся ниже.
3754
4150
  analytics: !1
3755
- }), this.remoteTracker = null, this.trackerUnsubs = [], e.analytics !== !1 && (this.remoteTracker = new Cr(t), this.bindAnalytics());
4151
+ }), this.remoteTracker = null, this.trackerUnsubs = [], e.analytics !== !1 && (this.remoteTracker = new jr(t), this.bindAnalytics());
3756
4152
  }
3757
4153
  /** Зеркало sdk/PaywallUI.initTracker'овских биндингов, но с RemoteEventTracker.
3758
4154
  * Когда @monetize.software/sdk экспоузнет публичный hook для inject'а tracker'а,
@@ -3810,11 +4206,11 @@ class Rr extends ur {
3810
4206
  }
3811
4207
  }
3812
4208
  export {
3813
- K as PROTOCOL_VERSION,
3814
- Rr as PaywallUI,
3815
- kr as RemoteAuthClient,
3816
- xr as RemoteBillingClient,
3817
- Cr as RemoteEventTracker,
3818
- Er as getContentTransport
4209
+ Q as PROTOCOL_VERSION,
4210
+ Wr as PaywallUI,
4211
+ Br as RemoteAuthClient,
4212
+ Lr as RemoteBillingClient,
4213
+ jr as RemoteEventTracker,
4214
+ zr as getContentTransport
3819
4215
  };
3820
4216
  //# sourceMappingURL=content.js.map