@mavea/mavea 1.0.12 → 1.0.14

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 (171) hide show
  1. package/CHANGELOG.md +20 -0
  2. package/README.md +4 -3
  3. package/dist/.vite/manifest.json +610 -628
  4. package/dist/assets/{AppCommandPalette-DzUPm-Qa.js → AppCommandPalette-D5nd3VO_.js} +1 -1
  5. package/dist/assets/{BlockEmpty-Dp9IPo4S.js → BlockEmpty-BZn5ETuL.js} +1 -1
  6. package/dist/assets/{BriefingPlayer-CTab7H0c.js → BriefingPlayer-JnrrvxYE.js} +1 -1
  7. package/dist/assets/{CanvasSkeleton-BCq4yAAN.js → CanvasSkeleton-D00MzkIV.js} +2 -2
  8. package/dist/assets/{CheckLogRail-DbGJtneK.js → CheckLogRail--9iHharq.js} +1 -1
  9. package/dist/assets/{CodeOutput-DjsCJAel.js → CodeOutput-408gGn9V.js} +1 -1
  10. package/dist/assets/{CommandPalette-Cq9mDWiI.js → CommandPalette-BIUG6Sn7.js} +1 -1
  11. package/dist/assets/{CourseLessonReader-Dz8IhHEw.js → CourseLessonReader-Yp2qEsDx.js} +2 -2
  12. package/dist/assets/{CourseRail-DjK_L3eD.js → CourseRail-BVvnoWBR.js} +1 -1
  13. package/dist/assets/{CoursesApp-Dv4yt63y.js → CoursesApp-0N_F1p_u.js} +2 -2
  14. package/dist/assets/{CrossExamPanel-DJCn13Aa.js → CrossExamPanel-CocJ_GxK.js} +1 -1
  15. package/dist/assets/{DashPresent-pfOEJGzV.js → DashPresent-G8Actzx7.js} +1 -1
  16. package/dist/assets/{DashboardDetail-BSZ3CgcK.js → DashboardDetail-BpSe8wBT.js} +2 -2
  17. package/dist/assets/DashboardLoopRuntime-CHPDkO3Y.js +1 -0
  18. package/dist/assets/{DashboardOverview-DpJ2BDNu.js → DashboardOverview-Cdhy4x4b.js} +1 -1
  19. package/dist/assets/{DashboardSettings-C1rC3iTs.js → DashboardSettings-ChPkh0t4.js} +1 -1
  20. package/dist/assets/DashboardsApp-mp-V3d1i.js +2 -0
  21. package/dist/assets/{DeepZoomApp-B91oHx2Y.js → DeepZoomApp-mZHk132w.js} +1 -1
  22. package/dist/assets/{DelegatePanel-_9RZiLHM.css → DelegatePanel-Cf85-0qE.css} +1 -1
  23. package/dist/assets/DelegatePanel-Dtl0oHaA.js +33 -0
  24. package/dist/assets/{DemoGallery-fYIVdHQV.js → DemoGallery-By2LV_U_.js} +1 -1
  25. package/dist/assets/{DropSelect-DbxAWKQn.js → DropSelect-CeCNaut0.js} +1 -1
  26. package/dist/assets/{ExportModal-HczU1Zg1.js → ExportModal-CZ1-Vihb.js} +2 -2
  27. package/dist/assets/{ExtractionPreview-BfjJci-N.js → ExtractionPreview-CRkYnwCo.js} +1 -1
  28. package/dist/assets/{FlagshipCTA-CTb5P2Ix.js → FlagshipCTA-DNtUnl0n.js} +1 -1
  29. package/dist/assets/{FlagshipCommandPalette-DLkDmsF-.js → FlagshipCommandPalette-DpP8joXb.js} +1 -1
  30. package/dist/assets/{FlagshipShowcase-CrFSCHHX.js → FlagshipShowcase-CoOezhT-.js} +1 -1
  31. package/dist/assets/{FlashcardsApp-CV777TGC.js → FlashcardsApp-REEdMdKG.js} +1 -1
  32. package/dist/assets/{ForecastPanel-BfAngk8l.js → ForecastPanel-CpR32hwb.js} +1 -1
  33. package/dist/assets/{GalleryApp-DLssAAhN.js → GalleryApp-DJZRHjMH.js} +1 -1
  34. package/dist/assets/{HonestByDesign-B0o03QVw.js → HonestByDesign-CiOj_fA7.js} +1 -1
  35. package/dist/assets/{HowItWorks-DfUsQ2xD.js → HowItWorks-Ch2CgkVd.js} +1 -1
  36. package/dist/assets/{LegalApp-CnFE80Ja.js → LegalApp-BisEJynn.js} +1 -1
  37. package/dist/assets/{LegalMarkdownDocument-BidNcrNj.js → LegalMarkdownDocument-B7Yj_aRR.js} +1 -1
  38. package/dist/assets/{LegalPageShell-CFktFKTK.js → LegalPageShell-k9e22JlP.js} +1 -1
  39. package/dist/assets/{LeverPanel-DgfX7mTL.js → LeverPanel-CXSDqinv.js} +1 -1
  40. package/dist/assets/{Library-CAnmN5YL.js → Library-CmpF6gOU.js} +1 -1
  41. package/dist/assets/{LibraryOverlay-D7Gg_GIv.js → LibraryOverlay-BErgFYxu.js} +1 -1
  42. package/dist/assets/LiveApp-DZ7t3P1O.js +61 -0
  43. package/dist/assets/LiveApp-Dj_6EQuL.css +1 -0
  44. package/dist/assets/LiveSettings-BY5E3Ka8.js +6 -0
  45. package/dist/assets/{MindMapViewerDrawer-DoXy6hCD.js → MindMapViewerDrawer-Bc_qHdm9.js} +1 -1
  46. package/dist/assets/MindShape-DGOmKwov.css +1 -0
  47. package/dist/assets/{MindShape-BJCnqyTi.js → MindShape-ULBAjrfD.js} +1 -1
  48. package/dist/assets/{PinToDashboard-Dq77a2iP.js → PinToDashboard-WgEX4YoY.js} +1 -1
  49. package/dist/assets/{PlanReview-DvxM1675.js → PlanReview-Dd3sxa_o.js} +1 -1
  50. package/dist/assets/{Presence-LNSqCz8N.js → Presence-DgzicbeF.js} +1 -1
  51. package/dist/assets/{PresentationDeck-8kT0cMtk.js → PresentationDeck-Cx26X-wh.js} +1 -1
  52. package/dist/assets/{PrismApp-Jf4pIAkh.js → PrismApp-FPqASfhZ.js} +2 -2
  53. package/dist/assets/{PrismAskController-QXSoZBNb.js → PrismAskController-Ds1tSE9S.js} +1 -1
  54. package/dist/assets/{PrismBriefingPlayer-edFfwMNP.js → PrismBriefingPlayer-BzqCK6JP.js} +2 -2
  55. package/dist/assets/{PrismOverlay-CYItOpax.js → PrismOverlay-Cq3DBJ-N.js} +4 -4
  56. package/dist/assets/{PrivacyApp-Dqz_BgOS.js → PrivacyApp-B8PGc-x5.js} +1 -1
  57. package/dist/assets/{Recap-Ba2qZ2lX.js → Recap-RwhzouRe.js} +1 -1
  58. package/dist/assets/{ReelJelly-9SCjNeHq.js → ReelJelly-B2JQsaRI.js} +1 -1
  59. package/dist/assets/{ReplayCard-MSWq-Mxr.js → ReplayCard-DUBvQLBt.js} +2 -2
  60. package/dist/assets/{ReplayOverlay-ChDrwMLh.js → ReplayOverlay-CzUFHdjK.js} +1 -1
  61. package/dist/assets/{RewindOverlay-CM9d5xhh.js → RewindOverlay-CMx_cVxX.js} +1 -1
  62. package/dist/assets/{RippleApp-B7G_jg05.js → RippleApp-B186b8KW.js} +2 -2
  63. package/dist/assets/{RippleAskController-CJjt7VG8.js → RippleAskController-BA_kGOmL.js} +1 -1
  64. package/dist/assets/{RippleOverlay-Cfu3ZVL1.js → RippleOverlay-CkbkIgzC.js} +2 -2
  65. package/dist/assets/{SeeDontRead-DHhwv6RU.js → SeeDontRead-BZ4xFEKE.js} +1 -1
  66. package/dist/assets/ShareModal-DNpc-U9U.js +32 -0
  67. package/dist/assets/{ShareModal-C8S7ySls.css → ShareModal-PobtP7AJ.css} +1 -1
  68. package/dist/assets/{ShipCascade-B6kVuilv.js → ShipCascade-BmTE193h.js} +1 -1
  69. package/dist/assets/{ShipCourse-CerQYrsy.js → ShipCourse-K2vnS3Sw.js} +1 -1
  70. package/dist/assets/{ShipHotspots-DOmWYgHH.js → ShipHotspots-DILwqPxh.js} +1 -1
  71. package/dist/assets/{ShipIncident-D0lvmytD.js → ShipIncident-DXXciEP7.js} +1 -1
  72. package/dist/assets/{ShipMigration-D70LbiJk.js → ShipMigration-rhBm0Tre.js} +1 -1
  73. package/dist/assets/{ShipOnboarding-B_0dp9a-.js → ShipOnboarding-9KCVVAkX.js} +1 -1
  74. package/dist/assets/{ShipRead-Cp2s7bSL.js → ShipRead-CMe1DNik.js} +1 -1
  75. package/dist/assets/{ShipRollout-Bw9pvbSM.js → ShipRollout-BA4x-btU.js} +1 -1
  76. package/dist/assets/{ShipSuggestions-eHLjOJL5.js → ShipSuggestions-Jm45jfFl.js} +1 -1
  77. package/dist/assets/{ShipWorkspace-DwdoBSix.js → ShipWorkspace--x-q6Ly3.js} +1 -1
  78. package/dist/assets/{SignatureLoop-Bl43npTM.js → SignatureLoop-B_cHyXgU.js} +1 -1
  79. package/dist/assets/{SynthesisApp-BkOWv_pc.js → SynthesisApp-CvR_8g1C.js} +2 -2
  80. package/dist/assets/{SynthesisOverlay-CHlVL7sT.js → SynthesisOverlay-DFFD69hf.js} +1 -1
  81. package/dist/assets/{TermsApp-PakIMrh0.js → TermsApp-BxLgLSna.js} +1 -1
  82. package/dist/assets/{TopicCanvas-wmAsICUd.js → TopicCanvas-CKvJb_8Y.js} +2 -2
  83. package/dist/assets/{TopicCanvas-D2Nax9II.css → TopicCanvas-uRuHi99s.css} +1 -1
  84. package/dist/assets/{TourPrism-VQqowXpY.js → TourPrism-bqOmSZ9T.js} +1 -1
  85. package/dist/assets/{TrackerTile-C1mU8Zxj.js → TrackerTile-BuAVmOyi.js} +2 -2
  86. package/dist/assets/{TwoSurfaces-SNT4AVzV.js → TwoSurfaces-CjtKXWJr.js} +1 -1
  87. package/dist/assets/{UnderstoodPanel-BkwhDLhW.js → UnderstoodPanel-BWFbpk9o.js} +1 -1
  88. package/dist/assets/{WhyMachineOverlay-DgYhqU53.js → WhyMachineOverlay-D6pGEE78.js} +1 -1
  89. package/dist/assets/{WowFeatures-Cky9THxT.js → WowFeatures-CLx5VoKn.js} +1 -1
  90. package/dist/assets/{ZoomDeck-BXwcRCO_.js → ZoomDeck-R6MLUt4Z.js} +1 -1
  91. package/dist/assets/{alternateFinishes-Cn5LyQ0-.js → alternateFinishes-C8DBTwo_.js} +1 -1
  92. package/dist/assets/{annotationAuto-L2AxlJ2F.js → annotationAuto-ofVcqRve.js} +1 -1
  93. package/dist/assets/annotationReel-CdAmTPlv.js +1 -0
  94. package/dist/assets/{backup-Cw4GBHBV.js → backup-TgoSxdwf.js} +1 -1
  95. package/dist/assets/canvas-BrUiUI9Q.js +1 -0
  96. package/dist/assets/{catalog-2srqP2Jf.js → catalog-BrmxA4bP.js} +1 -1
  97. package/dist/assets/{dashboardEvents-S4Y2aOP_.js → dashboardEvents-DT6ye9n7.js} +2 -2
  98. package/dist/assets/{dist-BJbBdhc0.js → dist-COAFD72d.js} +1 -1
  99. package/dist/assets/{fit-C3MkNFdn.js → fit-BtKObM5Q.js} +1 -1
  100. package/dist/assets/{generateLive-Ci8kqPD9.js → generateLive-BvE3kOrf.js} +1 -1
  101. package/dist/assets/gesture-Bouqjr3g.js +2 -0
  102. package/dist/assets/{index-DWHIOldG.js → index-DOpl5xzv.js} +3 -3
  103. package/dist/assets/{jspdf.es.min-CfZM9xhl.js → jspdf.es.min-DSMzCXtv.js} +1 -1
  104. package/dist/assets/kokoro-B-MNB16v.js +1 -0
  105. package/dist/assets/{lib-C9jT-CD8.js → lib-BLt1wpw2.js} +1 -1
  106. package/dist/assets/{liveSchema-Dw4t_k7M.js → liveSchema-DbjsSolX.js} +2 -2
  107. package/dist/assets/{motion-QSGW_vc_.js → motion-DKmdzFji.js} +1 -1
  108. package/dist/assets/{notes-D21K92Wx.js → notes-D_uDKcr5.js} +1 -1
  109. package/dist/assets/{pdf-BP_vXBKO.js → pdf-uUFiTOYW.js} +1 -1
  110. package/dist/assets/{penStrokes-9Q_l7NTt.js → penStrokes-DlHnO9xE.js} +1 -1
  111. package/dist/assets/{perfProbe-DFw7brPU.js → perfProbe-DIAQR2bi.js} +1 -1
  112. package/dist/assets/{pin-BzDcIYD4.js → pin-DoSzEmTm.js} +1 -1
  113. package/dist/assets/{portal-n6TW0FuE.js → portal-4sKB1Tgc.js} +1 -1
  114. package/dist/assets/{pptxgen.es-GleD8us4.js → pptxgen.es-BVKKMlmO.js} +1 -1
  115. package/dist/assets/{prewarm-CehIIttc.js → prewarm-D31Si_08.js} +1 -1
  116. package/dist/assets/{quietHours-Brg4oaDf.js → quietHours-sfkvrkJv.js} +1 -1
  117. package/dist/assets/registry--yZ1HduK.js +1 -0
  118. package/dist/assets/registry-5a-E7vEN.css +1 -0
  119. package/dist/assets/{registry-CrpEXqNF.js → registry-B3RfPAd6.js} +1 -1
  120. package/dist/assets/{registry-DgIia4dY.js → registry-B3u3--Kv.js} +1 -1
  121. package/dist/assets/{registry-BPpjU0S5.js → registry-BOS6AdnB.js} +1 -1
  122. package/dist/assets/{registry-VKh9QiDf.js → registry-BWzoIPXp.js} +1 -1
  123. package/dist/assets/{registry-eQ4cE0zj.js → registry-Bj8q4igW.js} +1 -1
  124. package/dist/assets/{registry-ChG5tFfx.js → registry-BnSnMnyk.js} +2 -2
  125. package/dist/assets/{registry-VS55xdsN.js → registry-BpccSYOo.js} +1 -1
  126. package/dist/assets/{registry-BvEfWbB0.js → registry-C4KB6Ls0.js} +1 -1
  127. package/dist/assets/{registry-CFU0k7VB.js → registry-CAZ7ubmd.js} +1 -1
  128. package/dist/assets/{registry-CoCl26Tl.js → registry-CYnKlcEy.js} +1 -1
  129. package/dist/assets/{registry-BE1QBNKm.js → registry-Chzw1Udo.js} +1 -1
  130. package/dist/assets/{registry-Cpr0zSyk.js → registry-CkXIaQmB.js} +1 -1
  131. package/dist/assets/{registry-_mqmf4_W.js → registry-CrKVDfq8.js} +1 -1
  132. package/dist/assets/registry-D5oMqeSa.js +1 -0
  133. package/dist/assets/{registry-mmGDT0wn.js → registry-DOsiT4_6.js} +1 -1
  134. package/dist/assets/{registry-ia68k5sK.js → registry-DsjrEa0W.js} +1 -1
  135. package/dist/assets/{registry-CG5W7Xs6.js → registry-DssqYPgu.js} +1 -1
  136. package/dist/assets/{registry-CePhqBU6.js → registry-DxtkIiAV.js} +2 -2
  137. package/dist/assets/{registry-h3m1zDGt.js → registry-DzNYBJ_a.js} +1 -1
  138. package/dist/assets/{registry-HB-VAc6H.js → registry-NdA9xh9G.js} +1 -1
  139. package/dist/assets/{registry-D86iln18.js → registry-VRtsyPV7.js} +1 -1
  140. package/dist/assets/{registry-vPwth4BB.js → registry-d3dHoriR.js} +1 -1
  141. package/dist/assets/{registry-NNLA0NQi.js → registry-fLKnCnS5.js} +1 -1
  142. package/dist/assets/{relate-DDWak0Tv.js → relate-BG7aZWOq.js} +1 -1
  143. package/dist/assets/{shikiHighlight-SWupBCFg.js → shikiHighlight-D9nfk5pW.js} +1 -1
  144. package/dist/assets/src-B-t8Mww-.js +2 -0
  145. package/dist/assets/{useDashboardLoop-BSBGTrE2.js → useDashboardLoop-CJ0M7ZXf.js} +3 -3
  146. package/dist/assets/{useLiveConfig-Cc4IKgOd.js → useLiveConfig-DIvKKKpP.js} +1 -1
  147. package/dist/assets/{useSpatialCanvas-D3nfHkST.js → useSpatialCanvas-L0r29F7F.js} +1 -1
  148. package/dist/assets/{useSpotlightWalk-gVilFhpa.js → useSpotlightWalk-oyvTWe20.js} +1 -1
  149. package/dist/assets/{useSrsCards-BhFfq4vc.js → useSrsCards-BLNBqRe7.js} +1 -1
  150. package/dist/assets/{useStudy-DRNarubG.js → useStudy-hvN-iGz0.js} +1 -1
  151. package/dist/assets/{useZoomGesture-BdeFOm7j.js → useZoomGesture-Dl_Cfmxm.js} +1 -1
  152. package/dist/index.html +1 -1
  153. package/package.json +1 -1
  154. package/dist/assets/DashboardLoopRuntime-DfnDIGFz.js +0 -1
  155. package/dist/assets/DashboardsApp-DeBWrYDk.js +0 -2
  156. package/dist/assets/DelegatePanel-bFmfn9-D.js +0 -26
  157. package/dist/assets/LiveApp-COz1ZZp9.css +0 -1
  158. package/dist/assets/LiveApp-DmU3RMfZ.js +0 -61
  159. package/dist/assets/LiveSettings-5UCN5UWM.js +0 -6
  160. package/dist/assets/MindShape-Ca3MXEgK.css +0 -1
  161. package/dist/assets/RehearsalPanel-BCU615wg.css +0 -1
  162. package/dist/assets/RehearsalPanel-CtYKPl6O.js +0 -6
  163. package/dist/assets/ShareModal-d_o2hebL.js +0 -32
  164. package/dist/assets/annotationReel-DdHNp2IH.js +0 -1
  165. package/dist/assets/canvas-BwR8ltlj.js +0 -1
  166. package/dist/assets/gesture-DabMpPcq.js +0 -2
  167. package/dist/assets/kokoro-Da60jB7C.js +0 -1
  168. package/dist/assets/registry-BYn3Bcie.js +0 -1
  169. package/dist/assets/registry-BffpZK5w.js +0 -1
  170. package/dist/assets/registry-CtbuZWYz.css +0 -1
  171. package/dist/assets/src-DbgF7cRH.js +0 -2
@@ -1,6 +0,0 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/backup-Cw4GBHBV.js","assets/useStudy-DRNarubG.js","assets/index-DWHIOldG.js","assets/chunk-BVpWp9h4.js","assets/jsx-runtime-DaSxXjOY.js","assets/react-BQSORdFI.js","assets/lazyRetry-D50B1UMY.js","assets/index-CepQEz75.css","assets/contentVault-DzTYWcbD.js","assets/keyVault-DEsNh9FR.js","assets/store-DrBDvqXF.js","assets/queue-J4h7E3uc.js","assets/store-DXmC_fP2.js","assets/queue-DHeyJ32F.css","assets/useLiveConfig-Cc4IKgOd.js","assets/providers-wzm7E8Pa.js","assets/http-CJCtjYpA.js","assets/info-CiqHR5cs.js","assets/store-Dn23_Ymr.js","assets/store-BMRQiV1z.js","assets/shapes-Cw7tCHIp.js","assets/store-DoJn3lBF.js"])))=>i.map(i=>d[i]);
2
- import{t as e}from"./react-BQSORdFI.js";import{t}from"./jsx-runtime-DaSxXjOY.js";import{J as n,a as r,ft as i,g as a,ht as o,p as s,q as c,v as l,y as u}from"./index-DWHIOldG.js";import{n as d}from"./icons-CHVz6kv_.js";import{t as f}from"./useFocusTrap-DbfG6zbM.js";import{a as p,b as m,c as h,h as g,l as _,o as v,s as y,u as b}from"./kokoro-Da60jB7C.js";import{t as x}from"./FeatureUseNotice-CoK5HkbR.js";import{t as S}from"./providers-wzm7E8Pa.js";import{i as C,r as w}from"./info-CiqHR5cs.js";import{t as T}from"./time-BHTmJR1s.js";import{n as E,t as D,u as ee}from"./useStudy-DRNarubG.js";import{i as te,l as ne,n as re,o as O,s as k,t as ie,u as ae}from"./useLiveConfig-Cc4IKgOd.js";import{C as oe,b as se,v as ce,y as A}from"./shapes-Cw7tCHIp.js";import{n as le}from"./store-DoJn3lBF.js";import{a as ue,d as de,f as fe,l as pe,n as me,p as he,r as ge,s as _e,u as ve}from"./quietHours-Brg4oaDf.js";import{t as ye}from"./DropSelect-DbxAWKQn.js";import{g as be}from"./store-DXmC_fP2.js";var j=o(),M=e(),N=t(),P={display:`flex`,flexDirection:`column`,gap:4,fontSize:13,background:`var(--surface-default)`,border:`1px solid var(--line)`,borderRadius:8,padding:`7px 10px`},F={flex:`0 0 auto`,background:`transparent`,border:`none`,color:`var(--text-muted)`,cursor:`pointer`,font:`inherit`,lineHeight:1,padding:0};function xe(e){let t=(0,j.c)(40),{node:n,ago:r}=e,[i,a]=(0,M.useState)(!1),[o,s]=(0,M.useState)(n.body),c=(0,M.useRef)(null),l,u;t[0]===i?(l=t[1],u=t[2]):(l=()=>{i&&c.current?.focus()},u=[i],t[0]=i,t[1]=l,t[2]=u),(0,M.useEffect)(l,u);let d;t[3]!==o||t[4]!==n.body||t[5]!==n.id?(d=()=>{let e=o.trim();e&&e!==n.body&&A(n.id,e),a(!1)},t[3]=o,t[4]=n.body,t[5]=n.id,t[6]=d):d=t[6];let f=d,p;t[7]===n.body?p=t[8]:(p=()=>{s(n.body),a(!1)},t[7]=n.body,t[8]=p);let m=p,h,g;t[9]===Symbol.for(`react.memo_cache_sentinel`)?(h={display:`flex`,alignItems:`center`,justifyContent:`space-between`,gap:8},g={fontFamily:`var(--font-data, inherit)`,fontSize:10.5,fontWeight:600,color:`var(--presence)`,letterSpacing:`0.02em`},t[9]=h,t[10]=g):(h=t[9],g=t[10]);let _;t[11]===n.concept?_=t[12]:(_=(0,N.jsx)(`span`,{style:g,children:n.concept}),t[11]=n.concept,t[12]=_);let v;t[13]===Symbol.for(`react.memo_cache_sentinel`)?(v={fontSize:10.5,color:`var(--text-muted)`,whiteSpace:`nowrap`},t[13]=v):v=t[13];let y;t[14]===r?y=t[15]:(y=(0,N.jsx)(`span`,{style:v,children:r}),t[14]=r,t[15]=y);let b;t[16]!==i||t[17]!==n.concept?(b=!i&&(0,N.jsx)(`button`,{type:`button`,onClick:()=>a(!0),title:`Edit this fact`,"aria-label":`Edit: ${n.concept}`,style:{...F,fontSize:12},children:`Edit`}),t[16]=i,t[17]=n.concept,t[18]=b):b=t[18];let x;t[19]===n.id?x=t[20]:(x=()=>ce(n.id),t[19]=n.id,t[20]=x);let S=`Forget: ${n.concept}`,C;t[21]===Symbol.for(`react.memo_cache_sentinel`)?(C={...F,fontSize:16},t[21]=C):C=t[21];let w;t[22]!==x||t[23]!==S?(w=(0,N.jsx)(`button`,{type:`button`,onClick:x,title:`Forget this concept`,"aria-label":S,style:C,children:`×`}),t[22]=x,t[23]=S,t[24]=w):w=t[24];let T;t[25]!==b||t[26]!==w||t[27]!==_||t[28]!==y?(T=(0,N.jsxs)(`div`,{style:h,children:[_,y,b,w]}),t[25]=b,t[26]=w,t[27]=_,t[28]=y,t[29]=T):T=t[29];let E;t[30]!==m||t[31]!==o||t[32]!==i||t[33]!==n.body||t[34]!==n.concept||t[35]!==f?(E=i?(0,N.jsxs)(`div`,{style:{display:`flex`,flexDirection:`column`,gap:6},children:[(0,N.jsx)(`textarea`,{ref:c,value:o,onChange:e=>s(e.target.value),rows:3,"aria-label":`Edit memory: ${n.concept}`,style:{font:`inherit`,fontSize:13,lineHeight:1.4,color:`var(--text-primary)`,background:`var(--surface-elevated)`,border:`1px solid var(--line)`,borderRadius:6,padding:`6px 8px`,resize:`vertical`,width:`100%`,boxSizing:`border-box`}}),(0,N.jsxs)(`div`,{style:{display:`flex`,gap:8,justifyContent:`flex-end`},children:[(0,N.jsx)(`button`,{type:`button`,onClick:m,style:{...F,fontSize:12},children:`Cancel`}),(0,N.jsx)(`button`,{type:`button`,onClick:f,disabled:!o.trim(),style:{...F,fontSize:12,color:`var(--presence)`,fontWeight:600},children:`Save`})]})]}):(0,N.jsx)(`span`,{style:{color:`var(--text-primary)`,lineHeight:1.4},children:n.body}),t[30]=m,t[31]=o,t[32]=i,t[33]=n.body,t[34]=n.concept,t[35]=f,t[36]=E):E=t[36];let D;return t[37]!==T||t[38]!==E?(D=(0,N.jsxs)(`li`,{style:P,children:[T,E]}),t[37]=T,t[38]=E,t[39]=D):D=t[39],D}function I(e){let t=e.concept.indexOf(`.`);return t<0?e.concept:e.concept.slice(0,t)}function Se(e){return{profile:`About you`,preferences:`Preferences`,topics:`Topics`,threads:`Open threads`,projects:`Projects`,work:`Work`,life:`Life`}[e]??e.slice(0,1).toUpperCase()+e.slice(1)}function Ce(e){let t=new Map;for(let n of e){let e=I(n),r=t.get(e);r?r.push(n):t.set(e,[n])}return[...t.keys()].sort((e,t)=>e===`profile`?-1:t===`profile`?1:e.localeCompare(t)).map(e=>({namespace:e,nodes:t.get(e).slice().sort((e,t)=>t.updatedAt-e.updatedAt)}))}function L(e){if(!e)return``;try{return new Date(e).toISOString().split(`T`)[0]}catch{return``}}function R(e){let t=L(e.updatedAt);return`${t?`---\nconcept: ${e.concept}\nupdated: ${t}\n---`:`---\nconcept: ${e.concept}\n---`}\n\n${e.body}`}function z(e){return e.length?[...e].sort((e,t)=>e.concept===`profile`?-1:t.concept===`profile`?1:e.concept.localeCompare(t.concept)).map(R).join(`
3
-
4
- ---
5
-
6
- `):``}function we(e){let t=z(e);if(t)try{let e=new Blob([t],{type:`text/markdown;charset=utf-8`}),n=URL.createObjectURL(e),r=document.createElement(`a`);r.href=n,r.download=`mavea-memory.md`,r.click(),URL.revokeObjectURL(n)}catch{}}var B=420,V=300,H=6,U=[`var(--presence)`,`var(--insight)`,`var(--warning)`,`var(--presence-soft)`,`var(--insight-soft)`,`var(--warning-soft)`],W={profile:U[0],preferences:U[3],topics:U[1],threads:U[4],projects:U[2]};function Te(e){return W[e]??U[Ee(e)%U.length]}function Ee(e){let t=0;for(let n=0;n<e.length;n++)t=Math.imul(31,t)+e.charCodeAt(n)|0;return Math.abs(t)}function De(e){let t=[],n=new Set,r=(e,t)=>[e,t].sort().join(`\0`),i=e.filter(e=>e.updatedAt>0).sort((e,t)=>e.updatedAt-t.updatedAt);for(let e=0;e<i.length;e++)for(let a=e+1;a<i.length&&i[a].updatedAt-i[e].updatedAt<200;a++){let o=r(i[e].concept,i[a].concept);n.has(o)||(n.add(o),t.push({a:i[e].concept,b:i[a].concept,cooccurred:!0}))}let a=new Set(e.map(e=>e.concept));for(let i of e){let e=i.concept.split(`.`)[0];if(e!==i.concept&&a.has(e)){let a=r(i.concept,e);n.has(a)||(n.add(a),t.push({a:i.concept,b:e,cooccurred:!1}))}}return t}function G(e,t){let n=[...e].sort((e,t)=>e.concept.localeCompare(t.concept)),r=new Map;n.forEach((e,t)=>{let i=t/Math.max(1,n.length)*Math.PI*2,a=Math.min(B,V)*.3;r.set(e.concept,{x:B/2+Math.cos(i)*a,y:V/2+Math.sin(i)*a,vx:0,vy:0})});let i=[...r.values()],a=.82;for(let e=0;e<80;e++){let o=1-e/80,s=.08*Math.sqrt(B*V/Math.max(1,n.length));for(let e=0;e<i.length;e++){let t=i[e];for(let n=e+1;n<i.length;n++){let e=i[n],r=e.x-t.x||.01,a=e.y-t.y||.01,c=Math.hypot(r,a)||.01,l=s*s/c*1.5;t.vx-=r/c*l*o,t.vy-=a/c*l*o,e.vx+=r/c*l*o,e.vy+=a/c*l*o}}for(let e of t){let t=r.get(e.a),n=r.get(e.b);if(!t||!n)continue;let i=n.x-t.x,a=n.y-t.y,s=Math.hypot(i,a)||.01,c=(s-(e.cooccurred?85:120))*.05*o;t.vx+=i/s*c,t.vy+=a/s*c,n.vx-=i/s*c,n.vy-=a/s*c}for(let e of r.values())e.vx+=(B/2-e.x)*.006*o,e.vy+=(V/2-e.y)*.006*o;let c=0;for(let e of i){let t=Math.abs(e.vx)+Math.abs(e.vy);t>c&&(c=t),e.x=Math.max(20,Math.min(B-20,e.x+e.vx)),e.y=Math.max(20,Math.min(V-20,e.y+e.vy)),e.vx*=a,e.vy*=a}if(c<.4)break}let o=new Map;for(let[e,t]of r)o.set(e,{x:t.x,y:t.y});return o}function Oe(e){let t=(0,j.c)(39),{nodes:n}=e,[r,i]=(0,M.useState)(null),[a,o]=(0,M.useState)(null),s;t[0]===n?s=t[1]:(s=De(n),t[0]=n,t[1]=s);let c=s,l;t[2]!==c||t[3]!==n?(l=G(n,c),t[2]=c,t[3]=n,t[4]=l):l=t[4];let u=l,d;t[5]===c?d=t[6]:(d=c.filter(ke),t[5]=c,t[6]=d);let f=d.length,p;t[7]!==a||t[8]!==n?(p=a?n.find(e=>e.concept===a):null,t[7]=a,t[8]=n,t[9]=p):p=t[9];let m=p;if(n.length===0){let e;return t[10]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,N.jsx)(`div`,{className:`mg-empty`,children:`Your knowledge graph appears here as you talk — start a conversation to add concepts.`}),t[10]=e):e=t[10],e}let h;if(t[11]!==c||t[12]!==r||t[13]!==u){let e;t[15]!==r||t[16]!==u?(e=(e,t)=>{let n=u.get(e.a),i=u.get(e.b);if(!n||!i)return null;let a=r===e.a||r===e.b,o=e.cooccurred?.55:.2;return(0,N.jsx)(`line`,{x1:n.x,y1:n.y,x2:i.x,y2:i.y,className:`mg-edge`+(e.cooccurred?` mg-edge--strong`:``),style:{opacity:r?a?o+.3:.05:o}},t)},t[15]=r,t[16]=u,t[17]=e):e=t[17],h=c.map(e),t[11]=c,t[12]=r,t[13]=u,t[14]=h}else h=t[14];let g;if(t[18]!==a||t[19]!==r||t[20]!==n||t[21]!==u){let e;t[23]!==a||t[24]!==r||t[25]!==u?(e=e=>{let t=u.get(e.concept);if(!t)return null;let n=Te(I(e)),s=Math.max(7,Math.min(18,7+e.body.length/400*11)),c=r===e.concept,l=a===e.concept,d=e.concept.split(`.`).pop()??e.concept,f=oe(e.source),p=e.kind===`procedural`,m=l?1:f?.82:.42,h=p||l||!f?n:`none`,g=p?2:l?1.5:+!f;return(0,N.jsxs)(`g`,{className:`mg-node`,transform:`translate(${t.x},${t.y})`,onMouseEnter:()=>i(e.concept),onMouseLeave:()=>i(null),onClick:()=>o(l?null:e.concept),style:{opacity:r&&!c?.3:1},children:[(0,N.jsx)(`title`,{children:`${e.concept} · ${f?`confirmed`:`unconfirmed`}${p?` · lesson`:``}`}),c&&(0,N.jsx)(`circle`,{r:s+5,fill:n,style:{opacity:.15},"aria-hidden":`true`}),(0,N.jsx)(`circle`,{r:s,fill:n,style:{opacity:m},stroke:h,strokeWidth:g,strokeDasharray:f?void 0:`3 2`,strokeOpacity:.5}),(0,N.jsx)(`text`,{className:`mg-label`,y:s+13,textAnchor:`middle`,style:{fill:n,opacity:c||l?1:.65},children:d})]},e.concept)},t[23]=a,t[24]=r,t[25]=u,t[26]=e):e=t[26],g=n.map(e),t[18]=a,t[19]=r,t[20]=n,t[21]=u,t[22]=g}else g=t[22];let _;t[27]!==h||t[28]!==g?(_=(0,N.jsxs)(`svg`,{className:`mg-svg`,viewBox:`0 0 ${B} ${V}`,width:`100%`,height:`auto`,"aria-label":`Memory concept graph`,children:[h,g]}),t[27]=h,t[28]=g,t[29]=_):_=t[29];let v;t[30]===m?v=t[31]:(v=m&&(0,N.jsxs)(`div`,{className:`mg-detail`,onClick:()=>o(null),title:`Click to close`,role:`button`,tabIndex:0,onKeyDown:e=>e.key===`Enter`&&o(null),children:[(0,N.jsx)(`span`,{className:`mg-detail-concept`,children:m.concept}),(0,N.jsx)(`p`,{className:`mg-detail-body`,children:m.body})]}),t[30]=m,t[31]=v);let y;t[32]!==n.length||t[33]!==f?(y=n.length<H?(0,N.jsxs)(`div`,{className:`mg-warmup`,children:[(0,N.jsx)(`div`,{className:`mg-warmup-track`,children:(0,N.jsx)(`div`,{className:`mg-warmup-fill`,style:{width:`${n.length/H*100}%`}})}),(0,N.jsxs)(`span`,{className:`mg-warmup-label`,children:[H-n.length,` more`,` `,H-n.length===1?`concept`:`concepts`,` until your map fills in`]})]}):(0,N.jsxs)(`p`,{className:`mg-foot`,children:[f,` connection`,f===1?``:`s`,` across `,n.length,` `,`concepts`]}),t[32]=n.length,t[33]=f,t[34]=y):y=t[34];let b;return t[35]!==_||t[36]!==v||t[37]!==y?(b=(0,N.jsxs)(`div`,{className:`mg-wrap`,children:[_,v,y]}),t[35]=_,t[36]=v,t[37]=y,t[38]=b):b=t[38],b}function ke(e){return e.cooccurred}n();function Ae({children:e,label:t=`More options`,defaultOpen:n=!1}){let[r,i]=(0,M.useState)(n);return(0,N.jsxs)(`div`,{style:{display:`flex`,flexDirection:`column`,gap:12},children:[(0,N.jsxs)(`button`,{type:`button`,onClick:()=>i(e=>!e),"aria-expanded":r,style:{display:`flex`,alignItems:`center`,gap:6,alignSelf:`flex-start`,padding:`4px 2px`,border:`none`,background:`transparent`,color:`var(--text-muted)`,cursor:`pointer`,font:`inherit`,fontSize:12,fontWeight:600,letterSpacing:`0.02em`},children:[(0,N.jsx)(`span`,{"aria-hidden":`true`,style:{display:`inline-block`,transition:`transform 150ms ease`,transform:r?`rotate(90deg)`:`none`,fontSize:10},children:`▶`}),t]}),r&&(0,N.jsx)(`div`,{style:{display:`flex`,flexDirection:`column`,gap:12,paddingLeft:10,borderLeft:`2px solid var(--line)`},children:e})]})}function je(e){return{padding:`5px 14px`,borderRadius:8,border:`1px solid ${e?`var(--presence)`:`var(--line)`}`,background:e?`color-mix(in oklab, var(--presence) 12%, var(--surface-elevated))`:`var(--surface-default)`,color:e?`var(--presence)`:`var(--text-secondary)`,cursor:`pointer`,font:`inherit`,fontSize:12,fontWeight:e?600:400}}var Me={background:`var(--surface-elevated)`,border:`1px solid var(--line)`,borderRadius:16,padding:16,display:`flex`,flexDirection:`column`,gap:12,width:`min(460px, calc(100vw - 32px))`,boxShadow:`var(--shadow-modal)`},K={fontSize:12,color:`var(--text-muted)`,textTransform:`uppercase`,letterSpacing:`0.06em`},q={background:`var(--surface-default)`,border:`1px solid var(--line)`,borderRadius:10,padding:`9px 11px`,color:`var(--text-primary)`,font:`inherit`,width:`100%`};function Ne(e,t){try{return localStorage.getItem(e)||t}catch{return t}}function Pe(e){let t=_(e);if(t){p(`mavea`,t.kokoro);try{localStorage.setItem(y,e)}catch{}}}function J(e){let t=(0,j.c)(25),{label:n,on:r,onToggle:i,note:a}=e,o;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(o={display:`flex`,alignItems:`flex-start`,gap:10},t[0]=o):o=t[0];let s=r?`var(--presence)`:`var(--track)`,c;t[1]===s?c=t[2]:(c={flex:`0 0 auto`,width:38,height:22,borderRadius:999,border:`1px solid var(--line-strong)`,background:s,position:`relative`,cursor:`pointer`,transition:`background 140ms ease`,marginTop:1},t[1]=s,t[2]=c);let l=r?18:2,u=r?`#fff`:`var(--text-muted)`,d;t[3]!==l||t[4]!==u?(d=(0,N.jsx)(`span`,{style:{position:`absolute`,top:2,left:l,width:16,height:16,borderRadius:`50%`,background:u,transition:`left 140ms ease, background 140ms ease`}}),t[3]=l,t[4]=u,t[5]=d):d=t[5];let f;t[6]!==n||t[7]!==r||t[8]!==i||t[9]!==c||t[10]!==d?(f=(0,N.jsx)(`button`,{type:`button`,role:`switch`,"aria-checked":r,"aria-label":n,onClick:i,style:c,children:d}),t[6]=n,t[7]=r,t[8]=i,t[9]=c,t[10]=d,t[11]=f):f=t[11];let p,m;t[12]===Symbol.for(`react.memo_cache_sentinel`)?(p={display:`flex`,flexDirection:`column`,gap:2},m={fontSize:13},t[12]=p,t[13]=m):(p=t[12],m=t[13]);let h;t[14]===n?h=t[15]:(h=(0,N.jsx)(`span`,{style:m,children:n}),t[14]=n,t[15]=h);let g;t[16]===Symbol.for(`react.memo_cache_sentinel`)?(g={fontSize:12,color:`var(--text-muted)`},t[16]=g):g=t[16];let _;t[17]===a?_=t[18]:(_=(0,N.jsx)(`span`,{style:g,children:a}),t[17]=a,t[18]=_);let v;t[19]!==h||t[20]!==_?(v=(0,N.jsxs)(`div`,{style:p,children:[h,_]}),t[19]=h,t[20]=_,t[21]=v):v=t[21];let y;return t[22]!==v||t[23]!==f?(y=(0,N.jsxs)(`div`,{style:o,children:[f,v]}),t[22]=v,t[23]=f,t[24]=y):y=t[24],y}function Y(e){let t=(0,j.c)(11),{value:n,options:r,onPick:i,label:a}=e,o;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(o={display:`flex`,gap:4,padding:3,borderRadius:10,background:`var(--track)`,border:`1px solid var(--line)`},t[0]=o):o=t[0];let s;if(t[1]!==i||t[2]!==r||t[3]!==n){let e;t[5]!==i||t[6]!==n?(e=e=>{let t=e.value===n;return(0,N.jsxs)(`button`,{type:`button`,role:`radio`,"aria-checked":t,onClick:()=>i(e.value),style:{flex:1,display:`flex`,flexDirection:`column`,alignItems:`center`,gap:1,padding:`6px 8px`,borderRadius:8,border:`none`,cursor:`pointer`,background:t?`var(--surface-elevated)`:`transparent`,boxShadow:t?`0 1px 2px rgba(0,0,0,0.12)`:`none`,color:`inherit`,font:`inherit`},children:[(0,N.jsx)(`span`,{style:{fontSize:13,fontWeight:t?600:400},children:e.label}),e.badge&&(0,N.jsx)(`span`,{style:{fontSize:10.5,color:`var(--text-muted)`},children:e.badge})]},e.value)},t[5]=i,t[6]=n,t[7]=e):e=t[7],s=r.map(e),t[1]=i,t[2]=r,t[3]=n,t[4]=s}else s=t[4];let c;return t[8]!==a||t[9]!==s?(c=(0,N.jsx)(`div`,{role:`radiogroup`,"aria-label":a,style:o,children:s}),t[8]=a,t[9]=s,t[10]=c):c=t[10],c}function X({onClose:e,initialTab:t,initialAdvancedYouOpen:n}){let[o]=ae(),{style:p,newPerDay:oe}=E(),ce=D(),A=C(o.provider),j=o.models[o.provider]??``,P=j||A.defaultModel,F=o.keys[o.provider]??``,I=S(o.provider).capabilities,L=ve(),R=(0,M.useMemo)(()=>Math.max(1,Math.round(JSON.stringify(L).length/1024)),[L]),z=he(),[B,V]=(0,M.useState)(me),[H,U]=(0,M.useState)(`list`),[W,Te]=(0,M.useState)(t??`model`),[Ee,De]=(0,M.useState)(!1),[G,ke]=(0,M.useState)(null),[X,Fe]=(0,M.useState)(!1),Ie=(0,M.useRef)(0),Le=(0,M.useRef)(null),[Re,ze]=(0,M.useState)(null),Be=(0,M.useRef)(null),[Ve,Z]=(0,M.useState)(null),[He,Q]=(0,M.useState)(null),Ue=(0,M.useRef)(null);f(Ue,{onEscape:e});function We(){let e=ie(),t=new Blob([e],{type:`application/json`}),n=URL.createObjectURL(t),r=document.createElement(`a`);r.href=n,r.download=`mavea-live-v2.json`,r.click(),URL.revokeObjectURL(n)}function Ge(e){let t=e.target.files?.[0];if(!t)return;let n=new FileReader;n.onload=()=>{try{te(n.result),ze(null)}catch(e){ze(e instanceof Error?e.message:`Import failed.`)}},n.readAsText(t),e.target.value=``}async function Ke(){Q(null),Z(null);try{let{downloadBackup:e}=await c(async()=>{let{downloadBackup:e}=await import(`./backup-Cw4GBHBV.js`);return{downloadBackup:e}},__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21]));e(),Z(`Backup downloaded.`)}catch{Q(`Couldn’t build the backup — please try again.`)}}function qe(e){let t=e.target.files?.[0];if(!t)return;if(Q(null),Z(null),t.size>25e6){Q(`That file is too large to be a Mavéa backup.`),e.target.value=``;return}let n=new FileReader;n.onload=()=>{(async()=>{try{let{importBackup:e}=await c(async()=>{let{importBackup:e}=await import(`./backup-Cw4GBHBV.js`);return{importBackup:e}},__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21])),t=e(n.result),r=[[t.dashboards,`dashboard`],[t.memory,`memory`],[t.flashcards,`card`],[t.library,`saved canvas`,`saved canvases`],[t.atlas,`map record`],[t.courses,`course`]].filter(([e])=>e>0).map(([e,t,n])=>`${e} ${e===1?t:n??`${t}s`}`);Z(r.length?`Merged ${r.join(`, `)}.`:`Nothing new to merge from that file.`)}catch(e){Q(e instanceof Error?e.message:`Import failed.`)}})()},n.readAsText(t),e.target.value=``}let[Je,Ye]=(0,M.useState)(()=>Ne(y,v)),[Xe,Ze]=(0,M.useState)(()=>m()),Qe=(0,M.useCallback)(e=>{Ze(e),g(e),b()},[]),[$e,et]=(0,M.useState)(()=>a()),tt=(0,M.useCallback)(e=>{et(e),u(e),s(l())},[]),$=(0,M.useCallback)(async()=>{let e=++Ie.current;Fe(!0);let{checkLiveReady:t}=await c(async()=>{let{checkLiveReady:e}=await import(`./shapes-Cw7tCHIp.js`).then(e=>e.s);return{checkLiveReady:e}},__vite__mapDeps([20,3,15,16,17,8,9])),n=await t(ne(re()),{tts:!1});e===Ie.current&&(ke({llm:n.llm,model:n.model,statusCode:n.statusCode}),Fe(!1))},[]);(0,M.useEffect)(()=>{let e=setTimeout(()=>void $(),400);return()=>clearTimeout(e)},[o.provider,P,F,$]);let nt=X?`var(--text-muted)`:G?.llm&&G?.model?`var(--insight)`:`var(--warning)`,rt=X?`Checking…`:G?.llm&&G?.model?`Ready`:G?.llm?`Reachable — model not found`:A.needsKey&&!F?`Add your API key`:G?.statusCode===401?`Invalid API key`:G?.statusCode===403?`Key lacks permission`:G?.statusCode===404?`Model not found`:G?.statusCode===void 0?`Not reachable`:`Error ${G.statusCode}`;return(0,N.jsxs)(`div`,{ref:Ue,style:Me,role:`dialog`,"aria-modal":`true`,"aria-label":`Mavéa settings`,children:[(0,N.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,justifyContent:`space-between`},children:[(0,N.jsxs)(`span`,{style:{fontWeight:700,fontSize:15,display:`flex`,alignItems:`center`,gap:8},children:[(0,N.jsx)(d.sparkle,{style:{width:16,height:16,flex:`0 0 auto`,color:`var(--presence)`}}),`Settings`]}),e&&(0,N.jsx)(`button`,{onClick:e,title:`Close`,"aria-label":`Close settings`,style:{display:`inline-grid`,placeItems:`center`,width:28,height:28,padding:0,border:`none`,borderRadius:6,background:`transparent`,color:`var(--text-secondary)`,cursor:`pointer`,flexShrink:0},children:(0,N.jsx)(d.x,{style:{width:16,height:16}})})]}),(0,N.jsx)(`div`,{className:`ls-tabs`,role:`tablist`,"aria-label":`Settings sections`,children:[`model`,`settings`,`you`,`data`].map(e=>(0,N.jsx)(`button`,{type:`button`,role:`tab`,"aria-selected":W===e,className:`ls-tab${W===e?` active`:``}`,onClick:()=>Te(e),children:e===`model`?`Model`:e===`settings`?`Settings`:e===`you`?`You`:`Your data`},e))}),(0,N.jsxs)(`div`,{className:`ls-body`,children:[W===`model`&&(0,N.jsxs)(`div`,{className:`settings-model-connect`,children:[(0,N.jsx)(`div`,{className:`settings-provider-picker`,style:{display:`flex`,flexWrap:`wrap`,gap:8},"aria-label":`Model providers`,children:w.map(e=>{let t=e.id===o.provider;return(0,N.jsx)(`button`,{onClick:()=>O({provider:e.id}),style:{...q,width:`auto`,cursor:`pointer`,borderColor:t?`var(--presence)`:`var(--line)`,boxShadow:t?`0 0 0 1px var(--presence)`:`none`,opacity:t?1:.7},"aria-pressed":t,children:e.label},e.id)})}),(0,N.jsxs)(`div`,{style:{display:`flex`,flexDirection:`column`,gap:6},children:[(0,N.jsx)(`span`,{style:K,children:`Model`}),(0,N.jsx)(fe,{provider:o.provider,value:j,onChange:e=>k(o.provider,`model`,e)},o.provider)]}),A.needsKey&&(0,N.jsxs)(`label`,{className:`settings-api-key-field`,style:{display:`flex`,flexDirection:`column`,gap:6},children:[(0,N.jsxs)(`span`,{style:{display:`flex`,alignItems:`center`,gap:8},children:[(0,N.jsx)(`span`,{style:K,children:`API key`}),!o.rememberKey&&(0,N.jsx)(`span`,{className:`settings-session-only`,"aria-label":`Key is not saved to disk`,children:`session only`})]}),(0,N.jsx)(`input`,{style:q,type:`password`,value:F,onChange:e=>k(o.provider,`key`,e.target.value),placeholder:o.provider===`anthropic`?`sk-ant-…`:`paste your key`,spellCheck:!1,autoComplete:`off`}),(0,N.jsxs)(`span`,{style:{fontSize:12,color:`var(--text-muted)`},children:[`Kept in memory unless Remember is on — sent through this deployment to`,` `,A.label.split(` · `)[1]??A.label,` when used.`]})]}),(0,N.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:8,fontSize:13},children:[(0,N.jsx)(`span`,{style:{width:8,height:8,borderRadius:8,background:nt,flex:`0 0 auto`},"aria-hidden":!0}),(0,N.jsx)(`span`,{children:rt}),(0,N.jsx)(`span`,{style:{color:`var(--text-muted)`},children:`·`}),(0,N.jsx)(`span`,{style:{color:`var(--text-muted)`},children:A.hint}),(0,N.jsx)(`button`,{onClick:()=>void $(),style:{marginLeft:`auto`,background:`transparent`,border:`1px solid var(--line)`,borderRadius:8,padding:`4px 10px`,color:`var(--text-muted)`,cursor:`pointer`,font:`inherit`,fontSize:12},title:`Re-check readiness`,children:`Recheck`})]}),A.needsKey&&(0,N.jsxs)(`label`,{style:{display:`flex`,alignItems:`center`,gap:8,fontSize:13},children:[(0,N.jsx)(`input`,{type:`checkbox`,checked:o.rememberKey,onChange:e=>O({rememberKey:e.target.checked})}),(0,N.jsx)(`span`,{children:`Remember key on this device`}),(0,N.jsx)(`span`,{style:{color:`var(--text-muted)`,fontSize:12},children:o.rememberKey?`encrypted in this browser — trusted devices only`:`kept in memory only — cleared on reload`})]}),(0,N.jsx)(de,{}),(0,N.jsxs)(`div`,{className:`settings-transfer-row`,children:[(0,N.jsx)(`button`,{type:`button`,className:`settings-transfer-btn`,onClick:We,children:`Export settings`}),(0,N.jsx)(`button`,{type:`button`,className:`settings-transfer-btn`,onClick:()=>Le.current?.click(),children:`Import settings`}),(0,N.jsx)(`input`,{ref:Le,type:`file`,accept:`application/json,.json`,style:{display:`none`},"aria-hidden":`true`,onChange:Ge}),(0,N.jsx)(`span`,{style:{fontSize:12,color:`var(--text-muted)`},children:`API and search keys are never included.`}),Re&&(0,N.jsx)(`span`,{className:`settings-import-error`,role:`alert`,children:Re})]})]}),W===`settings`&&(0,N.jsxs)(N.Fragment,{children:[(0,N.jsx)(ee,{}),(0,N.jsxs)(`div`,{style:{display:`flex`,flexDirection:`column`,gap:6},children:[(0,N.jsx)(`span`,{style:{fontSize:13,fontWeight:600},children:`Web search`}),(0,N.jsx)(Y,{value:o.searchMode,options:[{value:`off`,label:`Off`},{value:`realtime`,label:`Real-time`}],onPick:e=>O({searchMode:e})}),(0,N.jsx)(`span`,{style:{fontSize:12,color:`var(--text-muted)`},children:o.searchMode===`off`?`Answers from the model's own knowledge — no web calls.`:I.nativeWebSearch?`Grounds fresh asks in live results with citations when a question needs it.`:`This model has no built-in search, so Real-time won't ground anything right now. The four direct providers support it; on OpenRouter it depends on the selected model. Pick a search-capable model or leave this off.`})]}),(0,N.jsxs)(`div`,{style:{display:`flex`,flexDirection:`column`,gap:6},children:[(0,N.jsx)(`span`,{style:{fontSize:13,fontWeight:600},children:`Explanation level`}),(0,N.jsx)(Y,{value:o.explainLevel,options:[{value:`simple`,label:`Simple`,badge:`like I'm 5`},{value:`standard`,label:`Standard`,badge:`default`},{value:`deep`,label:`In-depth`,badge:`full rigor`}],onPick:e=>O({explainLevel:e})}),(0,N.jsx)(`span`,{style:{fontSize:12,color:`var(--text-muted)`},children:`Simple uses shorter sentences, everyday analogies, and fewer, more-labelled visuals. In-depth goes further — mechanisms, numbers, edge cases. You can also just say "explain it simpler" or "go deeper".`})]}),(0,N.jsxs)(`div`,{style:{display:`flex`,flexDirection:`column`,gap:6},children:[(0,N.jsx)(`span`,{style:{fontSize:13,fontWeight:600},children:`Answer quality`}),(0,N.jsx)(Y,{value:o.quality,options:[{value:`fast`,label:`Fast`,badge:`quickest`},{value:`balanced`,label:`Balanced`,badge:`default`},{value:`thorough`,label:`Thorough`}],onPick:e=>O({quality:e})}),(0,N.jsx)(`span`,{style:{fontSize:12,color:`var(--text-muted)`},children:`Fast keeps replies snappy; Thorough lets the model think more on hard questions.`})]}),(0,N.jsxs)(`div`,{style:{display:`flex`,flexDirection:`column`,gap:6},children:[(0,N.jsx)(`span`,{style:{fontSize:13,fontWeight:600},children:`Visual richness`}),(0,N.jsx)(Y,{value:$e,options:[{value:`auto`,label:`Auto`,badge:`recommended`},{value:`full`,label:`Full`},{value:`lite`,label:`Lite`,badge:`older machines`}],onPick:e=>tt(e)}),(0,N.jsx)(`span`,{style:{fontSize:12,color:`var(--text-muted)`},children:`Auto matches the effects to your machine. Lite calms the animated face and drops the glass blur so Mavéa stays smooth on older or lower-powered computers.`})]}),(0,N.jsxs)(`div`,{style:{display:`flex`,flexDirection:`column`,gap:6},children:[(0,N.jsx)(`span`,{style:{fontSize:13,fontWeight:600},children:`Voice`}),(0,N.jsx)(Y,{value:Xe,options:[{value:`auto`,label:`Auto`,badge:`recommended`},{value:`kokoro`,label:`Natural`,badge:`needs Docker`},{value:`browser`,label:`System`,badge:`older machines`}],onPick:e=>Qe(e)}),(0,N.jsx)(`span`,{style:{fontSize:12,color:`var(--text-muted)`},children:`Natural is Kokoro, the voice Mavéa is built around — it needs the Docker container and a machine that can keep up with it. System is your computer’s own voice: plainer, but it costs nothing and stays in step on older hardware. Without either, lines appear as captions.`})]}),(0,N.jsxs)(Ae,{children:[(0,N.jsx)(J,{label:`Pen mode`,on:o.annotationsEnabled,onToggle:()=>{let e=!o.annotationsEnabled;O({annotationsEnabled:e,teachMode:e})},note:`Mavéa draws on the canvas as it speaks — circling numbers, striking out misconceptions, annotating every walkthrough stop. Muted walks also write margin notes beside the cards, so you keep the marked-up answer. Off: the pen stays quiet entirely.`}),o.searchMode!==`off`&&(0,N.jsxs)(`span`,{style:{fontSize:12,color:`var(--text-muted)`,display:`flex`,gap:6},children:[(0,N.jsx)(d.globe,{style:{width:14,height:14,flex:`0 0 auto`,marginTop:1}}),`You'll see "Searching…" whenever a search actually runs.`]}),(0,N.jsx)(J,{label:`Keep a library`,on:o.libraryEnabled,onToggle:()=>O({libraryEnabled:!o.libraryEnabled}),note:`Saves the canvases you generate on this device so you can pick any one back up from the welcome screen. On by default; turn it off or clear the library any time.`}),o.libraryEnabled&&z.length>0&&(0,N.jsx)(`div`,{style:{marginLeft:48},children:(0,N.jsxs)(`button`,{type:`button`,onClick:()=>le(),style:{background:`transparent`,border:`1px solid var(--line)`,borderRadius:8,padding:`3px 9px`,color:`var(--text-muted)`,cursor:`pointer`,font:`inherit`,fontSize:12},children:[`Clear library (`,z.length,`)`]})})]})]}),W===`you`&&(0,N.jsxs)(N.Fragment,{children:[(0,N.jsx)(x,{kind:`stored-data`,from:`live`}),(0,N.jsx)(J,{label:`Remember me`,on:o.memoryEnabled,onToggle:()=>O({memoryEnabled:!o.memoryEnabled}),note:`Stored facts stay on this device. While Memory is enabled, relevant facts are included in future requests to your selected model provider. You can inspect, edit, export, or forget each stored fact below.`}),o.memoryEnabled&&(0,N.jsxs)(`div`,{style:{marginLeft:48,display:`flex`,flexDirection:`column`,gap:8},children:[L.length===0?(0,N.jsx)(`span`,{style:{fontSize:12,color:`var(--text-muted)`},children:`Nothing remembered yet — Mavéa will build a concept wiki as you talk.`}):(0,N.jsxs)(N.Fragment,{children:[(0,N.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,justifyContent:`space-between`},children:[(0,N.jsx)(`div`,{style:{display:`flex`,gap:2,padding:2,borderRadius:8,background:`var(--track)`,border:`1px solid var(--line)`,alignSelf:`flex-start`},children:[`list`,`graph`].map(e=>(0,N.jsx)(`button`,{type:`button`,onClick:()=>U(e),style:{padding:`4px 12px`,borderRadius:6,border:`none`,background:H===e?`var(--surface-elevated)`:`transparent`,boxShadow:H===e?`0 1px 2px rgba(0,0,0,0.1)`:`none`,color:H===e?`var(--text-primary)`:`var(--text-muted)`,cursor:`pointer`,font:`inherit`,fontSize:12,fontWeight:H===e?600:400},children:e===`list`?`Concepts`:`Graph`},e))}),(0,N.jsx)(`button`,{type:`button`,onClick:()=>se(),style:{background:`transparent`,border:`1px solid var(--line)`,borderRadius:8,padding:`3px 9px`,color:`var(--text-muted)`,cursor:`pointer`,font:`inherit`,fontSize:12},children:`Forget all`})]}),H===`graph`?(0,N.jsx)(Oe,{nodes:L}):(0,N.jsx)(`div`,{style:{display:`flex`,flexDirection:`column`,gap:8,maxHeight:280,overflowY:`auto`},children:Ce(L).map(({namespace:e,nodes:t})=>(0,N.jsxs)(`div`,{style:{display:`flex`,flexDirection:`column`,gap:6},children:[(0,N.jsx)(`span`,{style:{fontFamily:`var(--font-data, inherit)`,fontSize:10,letterSpacing:`0.14em`,textTransform:`uppercase`,color:`var(--text-muted)`,margin:`2px 2px 0`},children:Se(e)}),(0,N.jsx)(`ul`,{style:{listStyle:`none`,margin:0,padding:0,display:`flex`,flexDirection:`column`,gap:6},children:t.map(e=>(0,N.jsx)(xe,{node:e,ago:T(e.updatedAt)},e.id))})]},e))}),(0,N.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,justifyContent:`space-between`,gap:8},children:[(0,N.jsxs)(`span`,{style:{fontSize:11.5,color:`var(--text-muted)`},children:[L.length,` `,L.length===1?`concept`:`concepts`,` · `,R,` KB on this device`]}),(0,N.jsx)(`button`,{type:`button`,onClick:()=>we(L),style:{background:`transparent`,border:`1px solid var(--line)`,borderRadius:8,padding:`3px 9px`,color:`var(--text-muted)`,cursor:`pointer`,font:`inherit`,fontSize:12},children:`Export memory`})]})]}),(0,N.jsxs)(`span`,{style:{fontSize:12,color:`var(--text-muted)`,display:`flex`,gap:6},children:[(0,N.jsx)(d.sparkle,{style:{width:14,height:14,flex:`0 0 auto`,marginTop:1}}),`Stored on this device, and sent to ${A.label.split(` · `)[1]??A.label} inside each prompt to personalize answers — the same path as your questions.`]})]}),(0,N.jsxs)(`div`,{style:{display:`flex`,flexDirection:`column`,gap:8},children:[(0,N.jsx)(`span`,{style:K,children:`Voice`}),(0,N.jsx)(`div`,{style:{display:`flex`,gap:12,alignItems:`center`},children:(0,N.jsxs)(`div`,{style:{display:`flex`,flexDirection:`column`,gap:4,flex:1},children:[(0,N.jsx)(`span`,{style:{fontSize:11,color:`var(--text-muted)`},children:`Mavéa`}),(0,N.jsxs)(`div`,{style:{display:`flex`,gap:6},children:[(0,N.jsx)(`div`,{style:{flex:1},children:(0,N.jsx)(ye,{ariaLabel:`Mavéa's voice`,value:Je,onChange:e=>{Ye(e),Pe(e);let t=_(e);t&&pe(t)},options:h.map(e=>({value:e.id,label:e.label,note:e.tone}))})}),(0,N.jsx)(`button`,{type:`button`,onClick:()=>{let e=_(Je);e&&pe(e)},style:{...q,width:`auto`,padding:`6px 10px`,cursor:`pointer`,fontSize:11},title:`Preview voice`,"aria-label":`Preview Mavéa's voice`,children:`▶`})]})]})}),(0,N.jsx)(_e,{})]}),ce.total>0&&(0,N.jsxs)(`div`,{style:{display:`flex`,flexDirection:`column`,gap:6},children:[(0,N.jsx)(`span`,{style:{fontSize:13,fontWeight:600},children:`Flashcards`}),(0,N.jsx)(Y,{label:`Flashcards`,value:p,options:[{value:`collection`,label:`Just save them`},{value:`spaced`,label:`Help me remember`}],onPick:e=>be(e)}),(0,N.jsx)(`span`,{style:{fontSize:12,color:`var(--text-muted)`},children:p===`collection`?`A plain pile you flip through when you feel like it. No dates, no counts, nothing waiting for you.`:`Each card comes back just before you'd forget it. New ones join ${oe} a day, so a big pile never lands at once.`})]}),(0,N.jsxs)(Ae,{defaultOpen:n,children:[(0,N.jsxs)(`div`,{style:{display:`flex`,flexDirection:`column`,gap:6},children:[(0,N.jsxs)(`span`,{style:{fontSize:11,color:`var(--text-muted)`},children:[`Hold to talk key `,(0,N.jsx)(`span`,{style:{opacity:.6},children:`(tap mode only)`})]}),(0,N.jsx)(`div`,{style:{display:`flex`,gap:6},children:[{key:`Alt`,label:`Alt`},{key:`Control`,label:`Ctrl`},{key:`Shift`,label:`Shift`}].map(({key:e,label:t})=>{let n=(o.pttKey||`Alt`)===e;return(0,N.jsx)(`button`,{type:`button`,onClick:()=>O({pttKey:e}),style:je(n),"aria-pressed":n,title:`Hold ${t} to talk (shows as ${ue(e,o.pttSide)} in the hint)`,children:t},e)})}),(0,N.jsx)(`div`,{style:{display:`flex`,gap:6},children:[{side:`any`,label:`Either side`},{side:`left`,label:`Left`},{side:`right`,label:`Right`}].map(({side:e,label:t})=>{let n=(o.pttSide||`any`)===e;return(0,N.jsx)(`button`,{type:`button`,onClick:()=>O({pttSide:e}),style:je(n),"aria-pressed":n,title:e===`any`?`Either side of the key talks`:`Only the ${t.toLowerCase()} key talks`,children:t},e)})})]}),(0,N.jsx)(J,{label:`Morning brief`,on:o.morningBrief,onToggle:()=>O({morningBrief:!o.morningBrief}),note:`On the first open of the day, Mavéa opens with a quick read on the things you track.`}),(0,N.jsx)(J,{label:`Save flashcards automatically`,on:o.autoSaveFlashcards,onToggle:()=>O({autoSaveFlashcards:!o.autoSaveFlashcards}),note:`When an answer already contains flashcards, keep them without asking. Off by default — the usual way is tapping “Cards” on the answer you want. Every save shows a pill with Undo, so it's never silent.`}),(0,N.jsx)(J,{label:`Quiet hours`,on:B,onToggle:()=>{ge(!B),V(!B)},note:`10 PM – 6 AM: the screen dims and the voice drops to a murmur — won't wake anyone.`})]})]}),W===`data`&&(0,N.jsxs)(N.Fragment,{children:[(0,N.jsx)(x,{kind:`stored-data`,from:`live`}),(0,N.jsxs)(`p`,{style:{fontSize:13,lineHeight:1.5,color:`var(--text-secondary)`,margin:0},children:[`Export a backup, or import one you saved.`,` `,(0,N.jsx)(`strong`,{children:`Stored only in this browser.`}),` Because your data is encrypted to this exact browser, copying it to incognito, another port, or another computer won’t work — export a backup here and import it there.`]}),(0,N.jsxs)(`ul`,{style:{margin:0,paddingLeft:18,fontSize:12,lineHeight:1.6,color:`var(--text-muted)`},children:[(0,N.jsx)(`li`,{children:`Includes your dashboards, memory, flashcards, saved canvases, map, and courses.`}),(0,N.jsxs)(`li`,{children:[`Your API keys are `,(0,N.jsx)(`strong`,{children:`never included`}),` — you’ll re-enter them on a new device.`]}),(0,N.jsxs)(`li`,{children:[`Importing `,(0,N.jsx)(`strong`,{children:`merges`}),` — it adds and updates, and never erases what’s already here.`]}),(0,N.jsx)(`li`,{children:`The file is plain, unencrypted JSON: keep it somewhere safe, import only files you trust.`})]}),(0,N.jsxs)(`div`,{className:`settings-transfer-row`,children:[(0,N.jsx)(`button`,{type:`button`,className:`settings-transfer-btn`,onClick:()=>void Ke(),children:`Export all my data`}),(0,N.jsx)(`button`,{type:`button`,className:`settings-transfer-btn`,onClick:()=>Be.current?.click(),children:`Import a backup`}),(0,N.jsx)(`input`,{ref:Be,type:`file`,accept:`application/json,.json`,style:{display:`none`},"aria-hidden":`true`,onChange:qe}),Ve&&(0,N.jsx)(`span`,{style:{fontSize:12,color:`var(--text-muted)`},role:`status`,children:Ve}),He&&(0,N.jsx)(`span`,{className:`settings-import-error`,role:`alert`,children:He})]})]}),(0,N.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,flexWrap:`wrap`,gap:`6px 12px`,paddingTop:14,borderTop:`1px solid var(--line-soft)`,color:`var(--text-muted)`,fontSize:10.5},children:[(0,N.jsx)(`a`,{href:`#/terms?from=live`,style:{color:`inherit`},children:`Terms`}),(0,N.jsx)(`a`,{href:`#/privacy?from=live`,style:{color:`inherit`},children:`Privacy`}),(0,N.jsx)(`a`,{href:`#/legal?from=live`,style:{color:`inherit`},children:`Important information`}),(0,N.jsx)(`a`,{href:i(`LICENSE.txt`),target:`_blank`,rel:`noreferrer noopener`,style:{color:`inherit`},children:`License`}),(0,N.jsx)(`button`,{type:`button`,onClick:()=>{r(),De(!0)},style:{marginLeft:`auto`,padding:0,border:0,color:`inherit`,background:`transparent`,font:`inherit`,textDecoration:`underline`,textUnderlineOffset:3,cursor:`pointer`},children:Ee?`Review will appear next visit`:`Review acknowledgement again`})]})]})]})}export{X as LiveSettings};
@@ -1 +0,0 @@
1
- .ms-world{transform-origin:0 0;will-change:transform;--ms-counter:clamp(1, calc(1 / var(--ms-cam-scale,1)), 1.6);width:1000px;height:700px;transition:transform 1.1s cubic-bezier(.22,.9,.3,1);position:absolute;top:0;left:0}.ms-canvas .ms-center{top:50%}.ms-world .ms-spoke,.ms-world .ms-thread,.ms-world .ms-link{vector-effect:non-scaling-stroke}.ms-world .ms-card{transform:translate(-50%, -50%) scale(var(--ms-counter));transition:transform 1.1s cubic-bezier(.22,.9,.3,1),box-shadow .2s}.ms-world .ms-card[data-status=forming]{transform:translate(-50%, -50%) scale(calc(var(--ms-counter) * .97))}.ms-world .ms-card{animation-name:ms-card-in-world}.ms-world .ms-card[data-status=forming]{animation-name:ms-card-forming-in-world}@keyframes ms-card-in-world{to{opacity:1;transform:translate(-50%, -50%) scale(var(--ms-counter))}}@keyframes ms-card-forming-in-world{to{opacity:.65;transform:translate(-50%, -50%) scale(calc(var(--ms-counter) * .97))}}.ms-world .ms-cluster-label{transform:translate(-50%, -50%) scale(var(--ms-counter));animation-name:ms-cluster-rise-in-world}@keyframes ms-cluster-rise-in-world{0%{opacity:0;transform:translate(-50%, -42%) scale(var(--ms-counter))}to{opacity:.85;transform:translate(-50%, -50%) scale(var(--ms-counter))}}@media (prefers-reduced-motion:reduce){.ms-world{transition:none}.ms-world .ms-card{transition:box-shadow .2s}}
@@ -1 +0,0 @@
1
- .reh-scrim{z-index:52;background:rgba(var(--scrim-rgb), .62);-webkit-backdrop-filter:blur(6px);backdrop-filter:blur(6px);justify-content:center;align-items:flex-start;padding:7vh 24px 24px;display:flex;position:fixed;inset:0;overflow-y:auto}.reh-panel{border-radius:var(--r-xl);background:var(--surface-elevated);border:1px solid var(--line);width:min(640px,100%);box-shadow:var(--shadow-modal);flex-direction:column;gap:18px;padding:26px 30px 24px;display:flex}.reh-head{border-top:2px solid var(--text-primary);align-items:center;gap:14px;padding-top:18px;display:flex}.reh-title{color:var(--text-primary);margin:0;font-size:18px;font-weight:700}.reh-take-badge{font-family:var(--font-data);letter-spacing:.08em;text-transform:uppercase;color:var(--warning);text-overflow:ellipsis;white-space:nowrap;font-size:10.5px;overflow:hidden}.reh-close{border:1px solid var(--line);width:30px;height:30px;color:var(--text-muted);cursor:pointer;background:0 0;border-radius:50%;flex:none;margin-left:auto;font-size:13px;line-height:1}.reh-close:hover{color:var(--text-primary);border-color:var(--line-strong)}.reh-setup{flex-direction:column;gap:14px;display:flex}.reh-lead{color:var(--text-secondary);margin:0;font-size:14px;line-height:1.55}.reh-field{flex-direction:column;gap:6px;display:flex}.reh-field>span{font-family:var(--font-data);letter-spacing:.08em;text-transform:uppercase;color:var(--text-muted);font-size:10.5px}.reh-field input,.reh-field textarea,.reh-compose input{border-radius:var(--r-md);border:1px solid var(--line);background:var(--surface-glass);color:var(--text-primary);font:inherit;padding:9px 13px;font-size:13.5px}.reh-field textarea{resize:vertical;line-height:1.5}.reh-memory{color:var(--text-secondary);cursor:pointer;align-items:center;gap:9px;font-size:12.5px;display:flex}.reh-honest{color:var(--text-muted);margin:0;font-size:12px;line-height:1.5}.reh-start{border-radius:var(--r-full);background:var(--presence);color:#fff;cursor:pointer;font:inherit;border:none;align-self:flex-start;padding:10px 22px;font-size:13.5px;font-weight:600}.reh-start:disabled{opacity:.45;cursor:default}.reh-take{flex-direction:column;gap:14px;display:flex}.reh-lines{flex-direction:column;gap:10px;min-height:60px;margin:0;padding:0;list-style:none;display:flex}.reh-line{flex-direction:column;gap:3px;max-width:88%;display:flex}.reh-line.you{text-align:right;align-self:flex-end}.reh-line-who{font-family:var(--font-data);letter-spacing:.12em;text-transform:uppercase;color:var(--text-muted);font-size:9.5px}.reh-line-text{border-radius:var(--r-lg);color:var(--text-primary);padding:9px 14px;font-size:13.5px;line-height:1.5}.reh-line.them .reh-line-text{background:color-mix(in oklab, var(--warning) 10%, transparent);border:1px solid color-mix(in oklab, var(--warning) 25%, transparent)}.reh-line.you .reh-line-text{background:var(--surface-glass-strong);border:1px solid var(--line-soft)}.reh-thinking{color:var(--text-muted);font-size:12px;font-style:italic}.reh-failed{color:var(--text-secondary);font-size:12.5px}.reh-failed button{color:var(--presence);font:inherit;cursor:pointer;background:0 0;border:none;font-size:12.5px;font-weight:600;text-decoration:underline}.reh-coach{border-radius:var(--r-md);background:color-mix(in oklab, var(--warning) 11%, transparent);border:1px solid color-mix(in oklab, var(--warning) 30%, transparent);flex-direction:column;gap:7px;padding:14px 16px;display:flex}.reh-coach-kicker{font-family:var(--font-data);letter-spacing:.16em;color:var(--warning);font-size:9.5px;font-weight:700}.reh-coach-note,.reh-coach-tip{color:var(--text-primary);margin:0;font-size:13px;line-height:1.55}.reh-coach-tip{color:var(--text-secondary)}.reh-compose{gap:9px;display:flex}.reh-compose input{flex:1}.reh-say{border-radius:var(--r-full);background:var(--presence);color:#fff;cursor:pointer;font:inherit;border:none;flex:none;padding:9px 18px;font-size:13px;font-weight:600}.reh-say:disabled{opacity:.45;cursor:default}.reh-actions{align-items:center;gap:10px;display:flex}.reh-end,.reh-debrief{border-radius:var(--r-full);border:1px solid var(--line);color:var(--text-secondary);cursor:pointer;font:inherit;background:0 0;padding:8px 16px;font-size:12.5px;font-weight:600}.reh-end{border-color:color-mix(in oklab, var(--warning) 45%, transparent);color:var(--warning)}.reh-end:hover:not(:disabled){background:color-mix(in oklab, var(--warning) 10%, transparent)}.reh-end:disabled{opacity:.45;cursor:default}.reh-debrief{margin-left:auto}.reh-debrief:hover{color:var(--text-primary);border-color:var(--line-strong)}
@@ -1,6 +0,0 @@
1
- import{t as e}from"./react-BQSORdFI.js";import{t}from"./jsx-runtime-DaSxXjOY.js";import{ht as n}from"./index-DWHIOldG.js";import{t as r}from"./useFocusTrap-DbfG6zbM.js";import{n as i}from"./spokenText-D4zPX9JY.js";import{u as a}from"./kokoro-Da60jB7C.js";import{t as o}from"./FeatureUseNotice-CoK5HkbR.js";import{t as s}from"./providers-wzm7E8Pa.js";var c=e(),ee=n();function l(e){return[`You are role-playing the OTHER SIDE of a conversation the user is rehearsing: ${e.counterpart}.`,`The conversation: ${e.scenario}.`,`Ground everything in this context the user supplied — and NOTHING else:`,`"""${e.context||`(none given)`}"""`,`If the context does not tell you how this person would react, play a realistic, generic version of the role — never invent specific facts, history, or quotes about the real person.`,`Stay in character. Push back the way this role realistically would; do not cave easily, do not be cartoonishly hostile.`,`The reply is displayed AND spoken. Keep normal spelling on screen, but wrap every name, place, brand, or non-English term a voice might mispronounce as [[shown|said]] — for example [[Omakase|oh-mah-kah-seh]]. The said side must be lowercase voice-safe syllables matching a native/source-language pronunciation, never IPA or an Anglicized guess.`,`Reply ONLY with JSON: {"reply":"what you say next, 1-3 sentences, spoken language"}. No other keys, no prose outside the JSON.`].join(`
2
- `)}function u(){return[`You are a direct, warm conversation coach. The user just finished a practice take of a hard conversation.`,`Judge ONLY what is in the transcript — quote or reference their actual words; never invent things they said.`,`If an earlier take summary is given, say concretely what improved or regressed since it.`,`Reply ONLY with JSON: {"note":"how this take went, 1-2 sentences","tip":"ONE concrete thing to do differently next take, 1-2 sentences"}.`].join(`
3
- `)}var d=220,f=260;function p(e){try{return typeof e==`string`?JSON.parse(e.match(/\{[\s\S]*\}/)?.[0]??`{}`):e}catch{return{}}}function m(e){return e.map(e=>({role:e.who===`you`?`user`:`assistant`,content:e.text}))}async function te(e,t,n,r){try{let i=m(t),a=i.pop();if(!a||a.role!==`user`)return``;let o=await s(n.provider).generate({system:l(e),history:i,user:a.content,maxTokens:d},n);if(r.aborted)return``;let c=p(o.raw).reply;return typeof c==`string`?c.trim().slice(0,600):``}catch{return``}}async function ne(e,t,n,r,i,a){try{if(!t.some(e=>e.who===`you`))return null;let o=t.map(t=>`${t.who===`you`?`USER`:e.counterpart.toUpperCase()}: ${t.text}`).join(`
4
- `),c=[`Conversation being rehearsed: ${e.scenario}`,r?`Earlier take, your summary then: ${r}`:null,`Take ${n} transcript:`,o].filter(Boolean).join(`
5
- `),ee=await s(i.provider).generate({system:u(),history:[],user:c,maxTokens:f},i);if(a.aborted)return null;let l=p(ee.raw),d=typeof l.note==`string`?l.note.trim().slice(0,400):``,m=typeof l.tip==`string`?l.tip.trim().slice(0,400):``;return d&&m?{note:d,tip:m}:null}catch{return null}}function re(e){return`Debrief: I had the real "${e.scenario}" conversation. Here's what happened: `}var h=t();function ie(e){let t=(0,ee.c)(74),{cfg:n,memoryNodes:s,speak:l,onDebrief:u,onClose:d}=e,[f,p]=(0,c.useState)(``),[m,ie]=(0,c.useState)(``),[g,le]=(0,c.useState)(``),[_,ue]=(0,c.useState)(!1),[v,de]=(0,c.useState)(`setup`),[y,fe]=(0,c.useState)(1),b;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(b=[],t[0]=b):b=t[0];let[x,S]=(0,c.useState)(b),[C,pe]=(0,c.useState)(``),[w,T]=(0,c.useState)(null),[E,me]=(0,c.useState)(!1),[D,he]=(0,c.useState)(null),ge=(0,c.useRef)(null);r(ge);let _e=(0,c.useRef)(null),O=(0,c.useRef)(null),k,A;t[1]===Symbol.for(`react.memo_cache_sentinel`)?(k=()=>()=>{O.current?.abort(),a()},A=[],t[1]=k,t[2]=A):(k=t[1],A=t[2]),(0,c.useEffect)(k,A);let j;t[3]!==s||t[4]!==_?(j=_?s.map(ce).join(`. `):``,t[3]=s,t[4]=_,t[5]=j):j=t[5];let ve=j,M;t[6]===f?M=t[7]:(M=f.trim(),t[6]=f,t[7]=M);let N;t[8]===m?N=t[9]:(N=m.trim(),t[8]=m,t[9]=N);let P;t[10]===g?P=t[11]:(P=g.trim(),t[10]=g,t[11]=P);let F;t[12]!==ve||t[13]!==P?(F=[P,ve].filter(Boolean),t[12]=ve,t[13]=P,t[14]=F):F=t[14];let I=F.join(`
6
- `),L;t[15]!==M||t[16]!==N||t[17]!==I?(L={scenario:M,counterpart:N,context:I},t[15]=M,t[16]=N,t[17]=I,t[18]=L):L=t[18];let R=L,z;t[19]!==n||t[20]!==R||t[21]!==l?(z=async e=>{O.current?.abort();let t=new AbortController;O.current=t,T(`reply`),me(!1);let r=await te(R,e,n,t.signal);if(!t.signal.aborted){if(T(null),!r){me(!0);return}S([...e,{who:`them`,text:i(r)}]),l?.(r)}},t[19]=n,t[20]=R,t[21]=l,t[22]=z):z=t[22];let B=z,V;t[23]!==w||t[24]!==C||t[25]!==x||t[26]!==B?(V=()=>{let e=C.trim();if(!e||w)return;pe(``),he(null);let t=[...x,{who:`you`,text:e}];S(t),B(t)},t[23]=w,t[24]=C,t[25]=x,t[26]=B,t[27]=V):V=t[27];let H=V,U;t[28]!==w||t[29]!==n||t[30]!==x||t[31]!==R||t[32]!==y?(U=async()=>{if(w)return;O.current?.abort();let e=new AbortController;O.current=e,T(`coach`);let t=await ne(R,x,y,_e.current,n,e.signal);e.signal.aborted||(T(null),he(t),t&&(_e.current=t.note),fe(se),S([]))},t[28]=w,t[29]=n,t[30]=x,t[31]=R,t[32]=y,t[33]=U):U=t[33];let ye=U,W,G;t[34]===d?(W=t[35],G=t[36]):(W=()=>{let e=e=>{e.key===`Escape`&&d()};return window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)},G=[d],t[34]=d,t[35]=W,t[36]=G),(0,c.useEffect)(W,G);let be=R.scenario.length>0&&R.counterpart.length>0,K;t[37]===d?K=t[38]:(K=e=>{e.key!==`Enter`&&e.key!==` `||(e.preventDefault(),d())},t[37]=d,t[38]=K);let q;t[39]===Symbol.for(`react.memo_cache_sentinel`)?(q=(0,h.jsx)(`h2`,{className:`reh-title`,children:`The Rehearsal`}),t[39]=q):q=t[39];let J;t[40]!==R.scenario||t[41]!==v||t[42]!==y?(J=v===`take`&&(0,h.jsxs)(`span`,{className:`reh-take-badge`,children:[R.scenario,` · take `,y]}),t[40]=R.scenario,t[41]=v,t[42]=y,t[43]=J):J=t[43];let Y;t[44]===d?Y=t[45]:(Y=(0,h.jsx)(`button`,{type:`button`,className:`reh-close`,onClick:d,"aria-label":`Close the rehearsal`,children:`✕`}),t[44]=d,t[45]=Y);let X;t[46]!==J||t[47]!==Y?(X=(0,h.jsxs)(`header`,{className:`reh-head`,children:[q,J,Y]}),t[46]=J,t[47]=Y,t[48]=X):X=t[48];let Z;t[49]!==w||t[50]!==D||t[51]!==g||t[52]!==m||t[53]!==C||t[54]!==ye||t[55]!==E||t[56]!==x||t[57]!==s||t[58]!==u||t[59]!==be||t[60]!==B||t[61]!==H||t[62]!==f||t[63]!==R||t[64]!==v||t[65]!==_?(Z=v===`setup`?(0,h.jsxs)(`div`,{className:`reh-setup`,children:[(0,h.jsx)(`p`,{className:`reh-lead`,children:`Practice the conversation that scares you — against the other side, played only from what you share here.`}),(0,h.jsx)(o,{kind:`simulation`,from:`live`}),(0,h.jsxs)(`label`,{className:`reh-field`,children:[(0,h.jsx)(`span`,{children:`The conversation`}),(0,h.jsx)(`input`,{value:f,onChange:e=>p(e.target.value),placeholder:`asking my manager for the raise`})]}),(0,h.jsxs)(`label`,{className:`reh-field`,children:[(0,h.jsx)(`span`,{children:`Mavéa plays`}),(0,h.jsx)(`input`,{value:m,onChange:e=>ie(e.target.value),placeholder:`my manager`})]}),(0,h.jsxs)(`label`,{className:`reh-field`,children:[(0,h.jsx)(`span`,{children:`What should they know? (how this person talks, their constraints, history)`}),(0,h.jsx)(`textarea`,{value:g,onChange:e=>le(e.target.value),rows:4,placeholder:`She defers to budget freezes. Our last 1:1 she said scope would be 'recognized eventually'…`})]}),s.length>0&&(0,h.jsxs)(`label`,{className:`reh-memory`,children:[(0,h.jsx)(`input`,{type:`checkbox`,checked:_,onChange:e=>ue(e.target.checked)}),`Also ground them in what Mavéa remembers (`,s.length,` `,s.length===1?`concept`:`concepts`,`)`]}),(0,h.jsx)(`p`,{className:`reh-honest`,children:`They'll only know what's above — where it runs out, they play the role straight instead of pretending to know the real person.`}),(0,h.jsx)(`button`,{type:`button`,className:`reh-start`,disabled:!be,onClick:()=>de(`take`),children:`Start take 1`})]}):(0,h.jsxs)(`div`,{className:`reh-take`,children:[(0,h.jsxs)(`ul`,{className:`reh-lines`,children:[x.map((e,t)=>(0,h.jsxs)(`li`,{className:`reh-line `+e.who,children:[(0,h.jsx)(`span`,{className:`reh-line-who`,children:e.who===`you`?`You`:R.counterpart}),(0,h.jsx)(`span`,{className:`reh-line-text`,children:e.text})]},t)),w===`reply`&&(0,h.jsxs)(`li`,{className:`reh-thinking`,children:[R.counterpart,` is thinking…`]}),E&&(0,h.jsxs)(`li`,{className:`reh-failed`,children:[`They didn't respond.`,` `,(0,h.jsx)(`button`,{type:`button`,onClick:()=>void B(x),children:`Try again`})]})]}),D&&(0,h.jsxs)(`aside`,{className:`reh-coach`,"aria-label":`Coach, between takes`,children:[(0,h.jsx)(`span`,{className:`reh-coach-kicker`,children:`COACH — BETWEEN TAKES`}),(0,h.jsx)(`p`,{className:`reh-coach-note`,children:D.note}),(0,h.jsx)(`p`,{className:`reh-coach-tip`,children:D.tip})]}),w===`coach`&&(0,h.jsx)(`p`,{className:`reh-thinking`,children:`Coach is watching the take back…`}),(0,h.jsxs)(`div`,{className:`reh-compose`,children:[(0,h.jsx)(`input`,{value:C,onChange:e=>pe(e.target.value),onKeyDown:e=>{e.key===`Enter`&&H()},placeholder:x.length===0?`Open the conversation — your first line`:`Your next line`,"aria-label":`Your line`}),(0,h.jsx)(`button`,{type:`button`,className:`reh-say`,disabled:!C.trim()||w!==null,onClick:H,children:`Say it`})]}),(0,h.jsxs)(`footer`,{className:`reh-actions`,children:[(0,h.jsx)(`button`,{type:`button`,className:`reh-end`,disabled:w!==null||!x.some(ae),onClick:()=>void ye(),children:`End take · get coached`}),(0,h.jsx)(`button`,{type:`button`,className:`reh-debrief`,onClick:()=>u(re(R)),title:`Had the real conversation? Tell Mavéa how it went.`,children:`Debrief the real one`})]})]}),t[49]=w,t[50]=D,t[51]=g,t[52]=m,t[53]=C,t[54]=ye,t[55]=E,t[56]=x,t[57]=s,t[58]=u,t[59]=be,t[60]=B,t[61]=H,t[62]=f,t[63]=R,t[64]=v,t[65]=_,t[66]=Z):Z=t[66];let Q;t[67]!==X||t[68]!==Z?(Q=(0,h.jsxs)(`section`,{className:`reh-panel`,ref:ge,tabIndex:-1,role:`dialog`,"aria-label":`The Rehearsal`,onClick:oe,children:[X,Z]}),t[67]=X,t[68]=Z,t[69]=Q):Q=t[69];let $;return t[70]!==d||t[71]!==K||t[72]!==Q?($=(0,h.jsx)(`div`,{className:`reh-scrim`,onClick:d,role:`button`,tabIndex:0,"aria-label":`Close the rehearsal`,onKeyDown:K,children:Q}),t[70]=d,t[71]=K,t[72]=Q,t[73]=$):$=t[73],$}function ae(e){return e.who===`you`}function oe(e){return e.stopPropagation()}function se(e){return e+1}function ce(e){return e.body}export{ie as RehearsalPanel};
@@ -1,32 +0,0 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/src-DbgF7cRH.js","assets/chunk-BVpWp9h4.js","assets/__vite-browser-external-BufR4LQa.js","assets/providers-wzm7E8Pa.js","assets/http-CJCtjYpA.js","assets/info-CiqHR5cs.js"])))=>i.map(i=>d[i]);
2
- import{r as e}from"./chunk-BVpWp9h4.js";import{t}from"./react-BQSORdFI.js";import{t as n}from"./jsx-runtime-DaSxXjOY.js";import{J as r,L as i,c as a,ht as o,q as s}from"./index-DWHIOldG.js";import{n as c}from"./icons-CHVz6kv_.js";import{t as l}from"./useFocusTrap-DbfG6zbM.js";import{n as u,t as d}from"./share-QHGHNDhQ.js";import{t as f}from"./toast-BBNs2h3L.js";import{C as p,D as m,E as h,T as g,a as _,i as v,n as y,o as b,r as x,s as ee,t as S,w as C}from"./registry-ChG5tFfx.js";import{t as w}from"./ReelJelly-9SCjNeHq.js";import{n as T,r as E}from"./spokenText-D4zPX9JY.js";import{t as D}from"./threads-CkMgrSDP.js";import{C as O,r as k,x as A}from"./kokoro-Da60jB7C.js";import{t as te}from"./FeatureUseNotice-CoK5HkbR.js";var j=t();r();var ne={balanced:{fps:30,bitrate:6e6},high:{fps:30,bitrate:1e7},ultra:{fps:60,bitrate:16e6}};function re(e){let{fps:t,bitrate:n}=ne[e];return`up to ${t} fps · ${Math.round(n/1e6)} Mbps`}async function M(){try{let{Output:e,Mp4OutputFormat:t,BufferTarget:n,CanvasSource:r,MediaStreamAudioTrackSource:i,canEncodeVideo:a}=await s(async()=>{let{Output:e,Mp4OutputFormat:t,BufferTarget:n,CanvasSource:r,MediaStreamAudioTrackSource:i,canEncodeVideo:a}=await import(`./src-DbgF7cRH.js`);return{Output:e,Mp4OutputFormat:t,BufferTarget:n,CanvasSource:r,MediaStreamAudioTrackSource:i,canEncodeVideo:a}},__vite__mapDeps([0,1,2]));return{Output:e,Mp4OutputFormat:t,BufferTarget:n,CanvasSource:r,MediaStreamAudioTrackSource:i,canEncodeVideo:a}}catch{return null}}async function N(){try{return await s(()=>import(`./dist-xRGLOZwv.js`),[])}catch{return null}}var P={"9:16":{w:1080,h:1920},"1:1":{w:1080,h:1080},"16:9":{w:1920,h:1080}};function F(){if(typeof document>`u`)return!1;let e=typeof MediaRecorder<`u`,t=typeof VideoEncoder<`u`&&globalThis.AudioEncoder!==void 0;return e||t}async function ie(e){let t=ne[e.quality??`high`],n=e.fps??t.fps,{w:r,h:i}=P[e.aspect],a=e.audioStream?.getAudioTracks()[0]??null,o=await N();if(!o)throw Error(`rasterizer-unavailable`);let s=e.el.clientWidth||r,c=Math.min(3,Math.max(1,r/s)),l=0,u=0,d=document.createElement(`canvas`);d.width=r,d.height=i;let f=d.getContext(`2d`,{alpha:!1});f.fillStyle=`#05070c`,f.fillRect(0,0,r,i);let p=document.createElement(`canvas`);p.width=Math.round(r/2),p.height=Math.round(i/2);let m=p.getContext(`2d`),h=!1,g=()=>{m&&(m.drawImage(d,0,0,p.width,p.height),h=!0)},_=()=>new Blob([],{type:`image/png`}),v=async()=>(!h&&l>0&&g(),h?await new Promise(e=>p.toBlob(e,`image/png`))??_():_()),y=async()=>{let t;try{t=await o.domToCanvas(e.el,{scale:c,backgroundColor:`#05070c`})}catch{u++;return}if(!t.width||!t.height){u++;return}u=0,l++;let n=Math.max(r/t.width,i/t.height),a=t.width*n,s=t.height*n;f.fillStyle=`#05070c`,f.fillRect(0,0,r,i),f.drawImage(t,(r-a)/2,(i-s)/2,a,s)},b=typeof VideoEncoder<`u`&&globalThis.AudioEncoder!==void 0?await M():null;if(b&&await b.canEncodeVideo(`avc`).catch(()=>!1)&&b){let r=new b.Output({format:new b.Mp4OutputFormat,target:new b.BufferTarget}),i=new b.CanvasSource(d,{codec:`avc`,bitrate:t.bitrate});if(r.addVideoTrack(i),a){let e=new b.MediaStreamAudioTrackSource(a,{codec:`aac`,bitrate:192e3});e.errorPromise.catch(()=>{}),r.addAudioTrack(e)}await r.start();let o=!0,s=!0,c=performance.now(),f=0,m=1e3/n,_=e.maxDurationMs??1/0;(async()=>{for(;o;){let e=performance.now();if(await y(),!o)break;let t=s?0:(performance.now()-c)/1e3;s=!1;try{await i.add(t,Math.max(1/n,t-f))}catch{break}if(f=t,t*1e3>=_)break;!h&&t>1.2&&l>2&&u===0&&g();let r=performance.now()-e;await new Promise(e=>setTimeout(e,Math.max(0,m-r)))}})();let x=()=>{o=!1,a?.stop(),d.width=d.height=0,p.width=p.height=0};return{async stop(){o=!1;let e=await v();await r.finalize();let t=r.target.buffer;return x(),{blob:new Blob([t??new ArrayBuffer(0)],{type:`video/mp4`}),type:`video/mp4`,poster:e,hasAudio:!!a,durationMs:Math.round(performance.now()-c)}},cancel(){o=!1,r.cancel?.(),x()}}}let x=d.captureStream(n),ee=new MediaStream(x.getVideoTracks());a&&ee.addTrack(a);let S=MediaRecorder.isTypeSupported(`video/webm;codecs=vp9,opus`)?`video/webm;codecs=vp9,opus`:`video/webm`,C=new MediaRecorder(ee,{mimeType:S,videoBitsPerSecond:t.bitrate}),w=[];C.ondataavailable=e=>e.data.size&&w.push(e.data);let T=new Promise(e=>{C.addEventListener(`stop`,()=>e(),{once:!0})}),E=()=>{try{C.state!==`inactive`&&C.stop()}catch{}};C.start();let D=!0,O=performance.now(),k=e.maxDurationMs??1/0,A=1e3/n;(async()=>{for(;D;){let e=performance.now();await y();let t=performance.now()-O;if(t>=k){E();break}!h&&t>1200&&l>2&&u===0&&g();let n=performance.now()-e;await new Promise(e=>setTimeout(e,Math.max(0,A-n)))}})();let te=()=>{D=!1;for(let e of ee.getTracks())e.stop();a?.stop(),d.width=d.height=0,p.width=p.height=0};return{async stop(){D=!1;let e=await v();E(),await T;let t=new Blob(w,{type:S}),n=Math.round(performance.now()-O);return te(),{blob:t,type:S,poster:e,hasAudio:!!a,durationMs:n}},cancel(){D=!1,E(),te()}}}var I=n();function ae({slide:e}){"use no memo";let t=b(e);return(0,I.jsx)(t.Slide,{slots:t.slots})}var oe=o(),L=(0,j.createContext)(0),R=new Set([`hidden`,`clip`,`auto`,`scroll`]);function z(e){let t=(0,oe.c)(11),{children:n}=e,r=(0,j.useRef)(null),i=(0,j.useRef)(null),a;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(a={k:1,x:0,y:0},t[0]=a):a=t[0];let[o,s]=(0,j.useState)(a),c=(0,j.useContext)(L),l;t[1]===Symbol.for(`react.memo_cache_sentinel`)?(l=()=>{let e=r.current,t=i.current;if(!e||!t)return;let n=()=>{let n=e.clientHeight,r=e.clientWidth;if(!n||!r)return;let i=t.style.transform;t.style.transform=`none`,t.style.left=`0`,t.style.top=`0`;let a=[],o=[...t.querySelectorAll(`*`)],c=new Set;for(let e of t.querySelectorAll(`[data-reel-marquee]`)){for(let n=e;n&&n!==t;n=n.parentElement)c.add(n);for(let t of e.querySelectorAll(`*`))c.add(t)}let l=new Set,u=[];for(let e of o){if(c.has(e))continue;let t=getComputedStyle(e);if(t.webkitLineClamp!==`none`){l.add(e);continue}!R.has(t.overflowX)&&!R.has(t.overflowY)||u.push(e)}for(let e of u)a.push({el:e,o:e.style.overflow,m:e.style.maxHeight}),e.style.overflow=`visible`,e.style.maxHeight=`none`;let d=e=>{for(let n=e;n&&n!==t;n=n.parentElement)if(l.has(n))return!0;return!1},f=e=>{let n=0,r=0;for(let i=e;i&&i!==t&&t.contains(i);i=i.offsetParent)n+=i.offsetLeft,r+=i.offsetTop;return{x:n,y:r}},p=t.scrollWidth,m=t.scrollHeight;for(let e of o)if(!c.has(e)&&!d(e)){if(e.scrollWidth>p&&(p=e.scrollWidth),e.scrollHeight>m&&(m=e.scrollHeight),e.scrollWidth>e.clientWidth+1){let t=f(e);t.x+e.scrollWidth>p&&(p=t.x+e.scrollWidth)}if(e.scrollHeight>e.clientHeight+1){let t=f(e);t.y+e.scrollHeight>m&&(m=t.y+e.scrollHeight)}}for(let e of l){let t=f(e);t.x+e.clientWidth>p&&(p=t.x+e.clientWidth),t.y+e.clientHeight>m&&(m=t.y+e.clientHeight)}for(let e of a)e.el.style.overflow=e.o,e.el.style.maxHeight=e.m;if(t.style.transform=i,!m||!p)return;let h=Math.min(1,n*.95/m,r*.92/p),g=Number.isFinite(h)&&h>0?Math.floor(h*1e3)/1e3:1,_=t.firstElementChild,v=_?.offsetWidth||p,y=_?f(_).x:0,b=Math.max(0,(r-v*g)/2-y*g),x=Math.max(0,(n-m*g)/2);s(e=>Math.abs(e.k-g)>.002||Math.abs(e.x-b)>.5||Math.abs(e.y-x)>.5?{k:g,x:b,y:x}:e)};n();let a=!1,o=0;typeof document<`u`&&document.fonts?.ready&&document.fonts.ready.then(()=>{a||(o=requestAnimationFrame(n))});let c=requestAnimationFrame(n),l=0,u=new ResizeObserver(()=>{cancelAnimationFrame(l),l=requestAnimationFrame(n)});return u.observe(e),u.observe(t),()=>{a=!0,u.disconnect(),cancelAnimationFrame(l),cancelAnimationFrame(c),cancelAnimationFrame(o)}},t[1]=l):l=t[1];let u;t[2]!==n||t[3]!==c?(u=[n,c],t[2]=n,t[3]=c,t[4]=u):u=t[4],(0,j.useLayoutEffect)(l,u);let d;t[5]===Symbol.for(`react.memo_cache_sentinel`)?(d={position:`absolute`,inset:0,overflow:`hidden`},t[5]=d):d=t[5];let f=`translate(${o.x}px, ${o.y}px) scale(${o.k})`,p;t[6]===f?p=t[7]:(p={position:`absolute`,left:0,top:0,transformOrigin:`top left`,transform:f},t[6]=f,t[7]=p);let m;return t[8]!==n||t[9]!==p?(m=(0,I.jsx)(`div`,{ref:r,style:d,children:(0,I.jsx)(`div`,{ref:i,style:p,children:n})}),t[8]=n,t[9]=p,t[10]=m):m=t[10],m}var B=[`up`,`left`,`zoom`,`wipe`,`fade`];function V(e,t){let n=e/t;return n<.8?`9:16`:n<1.3?`1:1`:`16:9`}function se(e){let t=e.clientWidth,n=e.clientHeight;if(!t||!n)return!1;let r=Math.min(t,n)/100,i=r*16/9,a=V(t,n),o=`${r}px`,s=e.style.getPropertyValue(`--rw`)!==o||e.dataset.aspect!==a;return e.style.setProperty(`--ru`,`${i}px`),e.style.setProperty(`--rw`,o),e.dataset.aspect=a,s}var H=e=>e.template!==`title`&&e.template!==`outro`,U=e=>e.template===`outro`,W=e=>e.template===`title`;function G(e,t){let n=0;for(let r=0;r<t&&r<e.length;r++)H(e[r])&&n++;return n}function ce(e,t){let n=e[t];return n&&H(n)?G(e,t):-1}function le({script:e,timings:t,loop:n=!1,onDone:r,frameRef:i,playKey:a=0,playing:o=!0,initialIndex:s=0,onCycle:c,interactive:l=!1,paused:u,onPausedChange:d}){let f=e.slides,p=f.map((e,n)=>Math.max(800,Math.round(t?.[n]??e.durationMs))),m=Math.max(0,Math.min(s,f.length-1)),[h,g]=(0,j.useState)(m),[_,y]=(0,j.useState)(0),b=u!==void 0,[ee,S]=(0,j.useState)(!1),C=b?u:ee,T=(0,j.useCallback)(()=>{b?d?.(!C):S(e=>!e)},[b,C,d]),[E,D]=(0,j.useState)(0),O=(0,j.useRef)(!1),k=(0,j.useRef)(null),A=(0,j.useRef)(null),te=(0,j.useRef)(i);te.current=i;let ne=(0,j.useCallback)(e=>{A.current=e,te.current?.(e)},[]);(0,j.useEffect)(()=>{l&&A.current?.focus({preventScroll:!0})},[l]);let re=(0,j.useRef)(!1);re.current=C;let M=(0,j.useRef)(null),N=(0,j.useRef)(0),P=(0,j.useCallback)(e=>{k.current=e,e&&se(e)&&D(e=>e+1)},[]);if((0,j.useLayoutEffect)(()=>{let e=k.current;if(!e)return;let t=new ResizeObserver(()=>{se(e)&&D(e=>e+1)});return t.observe(e),()=>t.disconnect()},[]),(0,j.useEffect)(()=>{o&&(O.current=!1,g(m),y(e=>e+1))},[a,o]),(0,j.useEffect)(()=>{if(!o||C||h>=f.length)return;let e=M.current??p[h];M.current=null,N.current=Date.now();let t=window.setTimeout(()=>{h+1<f.length?g(h+1):n?(g(0),y(e=>e+1),c?.()):O.current||(O.current=!0,r?.())},e);return()=>{window.clearTimeout(t),re.current&&(M.current=Math.max(0,e-(Date.now()-N.current)))}},[h,f.length,n,r,a,o,C]),(0,j.useEffect)(()=>{M.current=null},[h]),!f.length)return null;let F=f[Math.min(h,f.length-1)],ie=G(f,h),oe=ce(f,h),R=f.filter(H).length,V=e=>{let t=-1;for(let n=0;n<f.length;n++)if(H(f[n])&&t++,t===e){g(n),y(e=>e+1);return}},le=e=>{if(!R)return;let t=H(F)?oe+e:e>0?ie:ie-1;V(Math.max(0,Math.min(R-1,t)))},K=f.reduce((e,t,n)=>(W(t)&&e.push(n),e),[]),q=e=>{if(K.length<=1)return;let t=K.filter(e=>e<=h).length-1;g(K[Math.max(0,Math.min(K.length-1,t+e))]),y(e=>e+1)},ue=e=>{switch(e.key){case`ArrowRight`:e.preventDefault(),le(1);break;case`ArrowLeft`:e.preventDefault(),le(-1);break;case`ArrowDown`:e.preventDefault(),q(1);break;case`ArrowUp`:e.preventDefault(),q(-1);break;case` `:case`Spacebar`:e.preventDefault(),T();break;default:break}},de=v(F.template)===`dark`,fe=x(F.template),J=h===0?`fade`:B[(h+e.seed)%B.length];return(0,I.jsx)(`div`,{className:`reel`,"data-palette":e.palette,"data-vibe":e.vibe,ref:ne,role:l?`application`:void 0,tabIndex:l?0:void 0,onKeyDown:l?ue:void 0,"aria-label":l?`Reel preview. Left and right arrows step between beats, up and down jump sections, space bar pauses.`:void 0,children:(0,I.jsxs)(`div`,{className:`reel-board`,ref:P,"data-surface":de?`dark`:`light`,"data-bleed":fe?`true`:`false`,children:[de&&(0,I.jsx)(`div`,{className:`reel-darkwash`,"aria-hidden":`true`}),(0,I.jsx)(`div`,{className:`reel-progress`,"data-interactive":l,"aria-hidden":!l,children:Array.from({length:R},(e,t)=>{let n=t===oe,r=t<ie||U(F),i=(0,I.jsx)(`span`,{className:`reel-seg`,children:(0,I.jsx)(`i`,{style:n?{width:0,animation:`reel-seg-fill ${p[h]}ms linear forwards`,animationPlayState:C?`paused`:`running`}:{width:r?`100%`:`0%`}})},`seg`);return l?(0,I.jsx)(`button`,{type:`button`,className:`reel-seg-hit`,onClick:()=>V(t),"aria-label":`Jump to beat ${t+1}`,children:i},t):(0,I.jsx)(`span`,{className:`reel-seg-hit`,children:i},t)})}),(0,I.jsxs)(`div`,{className:`reel-top`,children:[(0,I.jsxs)(`span`,{className:`reel-wordmark`,children:[(0,I.jsx)(`span`,{className:`reel-dot`,"aria-hidden":`true`}),`Mavéa`]}),(0,I.jsx)(`span`,{className:`reel-palettename`,children:e.palette})]}),!fe&&(0,I.jsx)(`div`,{className:`reel-jelly-pos`,"aria-hidden":`true`,children:(0,I.jsx)(w,{})}),(0,I.jsx)(`div`,{className:`reel-stage`,children:(0,I.jsx)(`div`,{className:`reel-trans`,"data-trans":J,children:(0,I.jsx)(L.Provider,{value:E,children:(0,I.jsx)(z,{children:(0,I.jsx)(ae,{slide:F})})})},`${_}-${h}`)}),(0,I.jsx)(`div`,{className:`reel-pause-badge`,"data-show":l&&C,"aria-hidden":`true`,children:(0,I.jsxs)(`div`,{className:`reel-pause-glyph`,children:[(0,I.jsx)(`span`,{}),(0,I.jsx)(`span`,{})]})})]})})}function K(e){let t=[],n=D(e,null);return e.forEach((e,r)=>{t.length===0||n[r]?t.push([e]):t[t.length-1].push(e)}),t}var q=/^(how|what|why|should|can|could|would|will|plan|show|make|build|tell|give|explain|who|when|where|which|is|are|do|does|did|help|me)\b[\s,]*/i,ue=/\s*[,;:]\s+|\s+—\s+|\s+–\s+|\s+\band\b\s+|\s+\bbut\b\s+|\s+\bso\b\s+/i;function de(e){let t=e[0];if(!t)return``;let n=t.spec?.title?.trim();if(n)return m(n,h.heading);let r=(t.question||``).trim();if(!r)return``;let i=r.replace(q,``).replace(/[?!.]+$/,``).trim(),a=(i.split(ue)[0]||``).trim()||i;return a?m(a.charAt(0).toUpperCase()+a.slice(1),h.heading):``}r();var fe={palette:`aurora`,vibe:`clean`,maxSlides:6};function J(e){return m(e[0]?.question||e[0]?.spec?.title||`Mavéa`,h.title)}function Y(e){return e[0]?.spec?.topic||e[0]?.spec?.title||J(e)}function pe(e){return(e||``).replace(/\s+/g,` `).split(/(?<=[.!?])\s+/).map(e=>e.trim()).filter(e=>e.length>1)}function X(e){return(e.narration||e.spec?.found||e.spec?.sub||``).trim()}function me(e){return(e.spoken||e.narration||e.spec?.found||e.spec?.sub||``).trim()}var he=0;function ge(e,t,n,r,i){let a=m(E(r.voiceover),h.voiceover);return{id:`s${he++}`,content:e,template:t,slots:y(e,n,i),voiceover:a,durationMs:Math.max(r.ms,a?Math.round(a.length/13*1e3)+500:0),sourceBlockId:r.sourceBlockId}}function _e(e,t,n,r,i,a){return ge(e,S(e,i,a,_(e,t)),t,n,r)}function ve(e,t){return Math.max(1,Math.min(t,Math.floor((e-1)/2)))}function ye(e,t,n=0){let r=Math.max(t,e-1-t);return Math.max(1,Math.floor(r/t)+ +(n<r%t))}function be(e,t,n,r){let i=J(e.frames);return ge(`title`,`title`,{question:i,kicker:e.heading||de(e.frames)||void 0,part:n>1?{index:t+1,count:n}:void 0},{voiceover:i,ms:g.intro},r)}function xe(e,t,n){let r=e.flatMap(e=>e.frames),i=J(r),a=Y(r),o=[];e.forEach((t,n)=>{let r={topic:Y(t.frames),question:J(t.frames)};o.push(be(t,n,e.length,r)),o.push(...t.content)});let s={topic:a,question:i};return o.push(ge(`outro`,`outro`,{wordmark:`Mavéa`,tagline:`Talk to AI. See what it means.`},{voiceover:`Made with Mavéa.`,ms:g.outro},s)),{topic:a,question:i,palette:t.palette,vibe:t.vibe,seed:n,slides:o,durationMs:o.reduce((e,t)=>e+t.durationMs,0)}}function Se(e,t){return{...e,seed:t,slides:e.slides.map((e,n)=>e.content===`title`||e.content===`outro`?e:{...e,template:S(e.content,t,n,_(e.content,e.slots),e.template)})}}function Z(e,t,n){let r=e.flatMap(e=>e.spec?.blocks??[]).map(e=>({shown:T((e.note||``).trim()),spoken:E((e.noteSpoken||e.note||``).trim())})).filter(e=>e.shown.length>8),i=r.map(e=>e.shown),a=r.map(e=>e.spoken||e.shown),o=[];if(e.forEach((e,t)=>{let n=X(e),r=pe(me(e)),s=pe(T(n));s.length&&o.push({speaksFor:t,covers:!0,content:`quote`,raw:{quote:s[0]},voiceover:r.slice(0,2).join(` `)}),t===0&&i.length>=2&&o.push({speaksFor:t,covers:!1,content:`list`,raw:{items:i.slice(0,4)},voiceover:a.slice(0,3).join(`. `)})}),!o.length){let e=t.question;o.push({speaksFor:0,covers:!0,content:`quote`,raw:{quote:e},voiceover:e})}let s=new Set;for(let e of[!0,!1])for(let t of o){if(s.size>=n)break;t.covers===e&&!s.has(t)&&s.add(t)}return o.filter(e=>s.has(e)).map((e,n)=>_e(e.content,e.raw,{voiceover:e.voiceover,ms:g.default},t,0,n+1))}function Ce(e,t){let n=K(e);return n.slice(-ve(t,n.length))}function we(e,t={}){let n={...fe,...t},r=Ce(e,n.maxSlides);return xe(r.map((e,t)=>({frames:e,content:Z(e,{topic:Y(e),question:J(e)},ye(n.maxSlides,r.length,t))})),n,0)}var Q=p,Te=`You are Mavéa's reel director. You recut a finished conversation into a short, vertical (9:16) social video — a sequence of card "beats" for TikTok/Reels/Shorts. Each beat is ONE card with very little room.
3
-
4
- Return ONLY JSON: {"heading": <string>, "slides":[{ "type": <content-type>, "slots": {…}, "voiceover": <string> }]}. Give 3 to 5 content beats (the intro question and the outro are added for you — do NOT include them).
5
-
6
- "heading" is a short, punchy title for this reel — a headline that sums up what it's about, at most 32 characters. It sits ABOVE the literal question (which is quoted verbatim elsewhere), so it must NOT just restate the question — it's the sharper, sub-editor's version of it.
7
-
8
- Choose a "type" per beat — the kind of thing it says — and fill its slots:
9
- - stat {value,label,unit?,prior?} — one headline number.
10
- - metrics {items:[{label,pct}],next?} — a few labelled percentages.
11
- - ranked {title?,items:[{label,score,pct}]} — a ranked comparison.
12
- - quote {quote,highlight?,attribution?} — one strong sentence.
13
- - list {items:[string],title?} — up to 4 short points.
14
- - concept {title,subtitle?,tag?} — a concept/term and a one-line gloss.
15
- - conceptmap {center,nodes:[{label}]} — a concept and what connects to it.
16
- - qa {question,answer} — a question and its answer.
17
- - chat {messages:[{role:"user"|"mavea",text}]} — a short exchange.
18
- - diagram {label,equation?,vectors?:[{label}],note?} — a formula / diagram idea.
19
- - steps {stops:[{label,state:"done"|"active"|"todo"}]} — a path or milestones.
20
- - recap {topic,metrics:[{label,value}]} — a tidy summary of figures.
21
-
22
- Rules:
23
- - REAL DATA ONLY. Use only facts, numbers and wording present in the conversation. Never invent a number, label or statistic. If a type needs data the conversation doesn't have, choose a different type.
24
- - IT MUST FIT THE CARD — write to these MAX CHARACTER limits so every value fits its slide with nothing cut. A beat may be re-styled into any look for its type, so write to the tightest. Counts are characters incl. spaces:
25
- ${[`stat — value ≤${Q.stat.value}, label ≤${Q.stat.label}, unit ≤${Q.stat.unit}, prior ≤${Q.stat.prior}.`,`metrics — ≤${Q.metrics.items} items, each label ≤${Q.metrics.label}; next ≤${Q.metrics.next}.`,`ranked — ≤${Q.ranked.items} items, label ≤${Q.ranked.label}, score ≤${Q.ranked.score}; title ≤${Q.ranked.title}.`,`quote — quote ≤${Q.quote.quote}, highlight ≤${Q.quote.highlight}, attribution ≤${Q.quote.attribution}.`,`list — ≤${Q.list.items} items, each ≤${Q.list.item}.`,`concept — title ≤${Q.concept.title} (1–2 words), subtitle ≤${Q.concept.subtitle}, tag ≤${Q.concept.tag}.`,`conceptmap — center ≤${Q.conceptmap.center}, ≤${Q.conceptmap.nodes} nodes, each label ≤${Q.conceptmap.node}.`,`qa — question ≤${Q.qa.question}, answer ≤${Q.qa.answer}.`,`chat — ≤${Q.chat.messages} messages, each ≤${Q.chat.message}.`,`diagram — label ≤${Q.diagram.label}, equation ≤${Q.diagram.equation}, note ≤${Q.diagram.note}.`,`steps — ≤${Q.steps.stops} stops, each label ≤${Q.steps.label}.`,`recap — topic ≤${Q.recap.topic}, ≤${Q.recap.metrics} metrics, label ≤${Q.recap.label}, value ≤${Q.recap.value}.`].map(e=>` · ${e}`).join(`
26
- `)}
27
- - Match each beat to the type that fits it best; vary the types across the reel.
28
- - "voiceover" is what's spoken over the slide — one natural, conversational sentence. Condense hard — trim filler, keep the punchy core.
29
- - In every voiceover, preserve normal spelling on the left and provide native/source-language pronunciation for every name, place, brand, or non-English term a voice might misread as [[shown|said]], for example "[[Omakase|oh-mah-kah-seh]]". The said side must be lowercase voice-safe phonetic syllables, never IPA or an Anglicized guess. This is required and does not change the visible slot text.`,Ee={type:`object`,properties:{heading:{type:`string`},slides:{type:`array`,items:{type:`object`,properties:{type:{type:`string`,enum:C},slots:{type:`object`},voiceover:{type:`string`}},required:[`type`,`slots`,`voiceover`]}}},required:[`slides`]};function De(e){let t=(e.note||``).trim(),n=``;try{let t=JSON.stringify(e.props);t&&t!==`{}`&&(n=` data=${m(t,220)}`)}catch{}return`- [${e.type}]${t?` ${m(t,120)}`:``}${n}`}function Oe(e){return e.slice(0,4).map(e=>{let t=(e.spec?.blocks??[]).slice(0,8).map(De).join(`
30
- `);return`Q: ${e.question}\nMavea: ${m(X(e),400)}\nCards:\n${t}`}).join(`
31
-
32
- `)}function ke(e){let t=e;if(typeof e==`string`){let n=e.indexOf(`{`),r=e.lastIndexOf(`}`);if(n<0||r<0)return{slides:[],heading:``};try{t=JSON.parse(e.slice(n,r+1))}catch{return{slides:[],heading:``}}}let n=t;return{slides:Array.isArray(n?.slides)?n.slides:[],heading:typeof n?.heading==`string`?n.heading:``}}async function Ae(e,t,n,r){let i=new AbortController,a=setTimeout(()=>i.abort(),18e3);try{let{getAdapter:a}=await s(async()=>{let{getAdapter:e}=await import(`./providers-wzm7E8Pa.js`).then(e=>e.n);return{getAdapter:e}},__vite__mapDeps([3,1,4,5])),{slides:o,heading:c}=ke((await a(t.provider).generate({system:Te,history:[],user:`Recut this conversation into ${r} or fewer content beats.\n\n${Oe(e)}`,maxTokens:Math.min(2200,350+r*260),temperature:.6,format:Ee,signal:i.signal},t)).raw),l=new Set(C),u=[];for(let e of o){let t=e,i=t.type;if(!i||!l.has(i))continue;let a=t.slots&&typeof t.slots==`object`?t.slots:{};if(u.push(_e(i,a,{voiceover:t.voiceover||t.caption||``,ms:g.default},n,0,u.length+1)),u.length>=r)break}return u.length?{frames:e,content:u,heading:c?m(c,h.heading):void 0}:null}catch{return null}finally{clearTimeout(a)}}var je=3;async function Me(e,t,n={}){let r={...fe,...n},i=Ce(e,r.maxSlides),a=e=>ye(r.maxSlides,i.length,e);try{let o=[];for(let[r,s]of i.entries()){let i={topic:Y(s),question:J(s)};if(r<je){let c=await Ae(s,t,i,a(r));if(!c)return we(e,n);o.push(c)}else o.push({frames:s,content:Z(s,i,a(r))})}return xe(o,r,0)}catch{return we(e,n)}}var Ne=24e3,Pe=.15,Fe=.18,Ie=240,Le=.008,Re=.89,ze=6;async function Be(e,t,n){let r=A(e).trim().slice(0,Ie);if(!r)return new Float32Array;for(let e=0;e<2;e++)try{let e=await fetch(`/tts/v1/audio/speech`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({model:`kokoro`,input:r,voice:t,response_format:`pcm`,speed:1}),signal:n});if(e.ok)return O(new Uint8Array(await e.arrayBuffer()),null).samples}catch{if(n?.aborted)return new Float32Array}return new Float32Array}async function Ve(e,t){let n=e.slides,r=n.map(e=>Math.max(800,Math.round(e.durationMs))),i=a();if(!i||typeof OfflineAudioContext>`u`)return{buffer:null,timings:r,missing:0};let o=k(`mavea`),s=await Promise.all(n.map(e=>Be(e.voiceover,o,t))),c=n.filter(e=>e.voiceover.trim()).length,l=s.filter(e=>e.length>0).length,u=Math.max(0,c-l);if(l===0)return{buffer:null,timings:r,missing:u};let d=n.map((e,t)=>{let n=s[t].length/Ne*1e3;return Math.round(n>0?Math.max(r[t],n+Fe*1e3):r[t])}),f=0;for(let e of s)for(let t=0;t<e.length;t++)f=Math.max(f,Math.abs(e[t]));let p=f>0?Math.min(ze,Re/f):1,m=i.sampleRate,h=.65+d.reduce((e,t)=>e+t/1e3,0),g=new OfflineAudioContext(1,Math.ceil(h*m),m),_=g.createGain();_.gain.value=p,_.connect(g.destination);let v=Pe;return d.forEach((e,t)=>{let n=s[t];if(n.length){let e=g.createBuffer(1,n.length,Ne);e.getChannelData(0).set(n);let t=g.createBufferSource();t.buffer=e;let r=g.createGain(),i=n.length/Ne,a=Math.min(Le,i/2);r.gain.setValueAtTime(0,v),r.gain.linearRampToValueAtTime(1,v+a),r.gain.setValueAtTime(1,v+i-a),r.gain.linearRampToValueAtTime(0,v+i),t.connect(r).connect(_),t.start(v)}v+=e/1e3}),{buffer:await g.startRendering(),timings:d,missing:u}}function He(e){let t=a();if(!t||typeof t.createMediaStreamDestination!=`function`)return null;let n=t.createMediaStreamDestination(),r=t.createBufferSource();r.buffer=e,r.connect(n);let i=!1;return{stream:n.stream,start(){i||(i=!0,t.state!==`running`&&t.resume().catch(()=>{}),r.start())},stop(){try{r.stop()}catch{}try{r.disconnect()}catch{}}}}function Ue(e,t,n){return t+Math.max(0,n-e)}function We(e,t){return!Number.isFinite(t)||t<=0||e>=t?null:Math.max(0,e)}function Ge(e){let t=a();if(!t)return null;let n=t.createGain();n.connect(t.destination);let r=null,i=0,o=0,s=!1,c=()=>{try{r?.stop(),r?.disconnect()}catch{}r=null},l=a=>{c(),r=t.createBufferSource(),r.buffer=e,r.connect(n),r.start(0,a),i=a,o=t.currentTime,s=!1};return{play(){t.state!==`running`&&t.resume().catch(()=>{}),l(0)},setMuted(e){n.gain.value=+!e},pause(){s||!r||(i=Math.min(e.duration,Ue(o,i,t.currentTime)),c(),s=!0)},resume(){if(!s)return;s=!1;let n=We(i,e.duration);n!==null&&(t.state!==`running`&&t.resume().catch(()=>{}),l(n))},stop(){c();try{n.disconnect()}catch{}}}}var Ke=[{id:`aurora`,label:`Aurora`,dot:`linear-gradient(135deg,#6d6dff,#a78bfa)`,blurb:`Indigo`},{id:`ember`,label:`Ember`,dot:`linear-gradient(135deg,#f4923c,#e0603a)`,blurb:`Warm amber`},{id:`ocean`,label:`Ocean`,dot:`linear-gradient(135deg,#2ad0e6,#0f9bad)`,blurb:`Deep teal`},{id:`chalk`,label:`Chalk`,dot:`linear-gradient(135deg,#c3c8d6,#7d8398)`,blurb:`Editorial`}],qe=e({ShareModal:()=>$e}),Je=[{id:`9:16`,label:`Story`,w:12,h:20},{id:`1:1`,label:`Square`,w:16,h:16},{id:`16:9`,label:`Landscape`,w:20,h:12}],Ye=[{id:`balanced`,label:`Balanced`},{id:`high`,label:`High`},{id:`ultra`,label:`Ultra`}],Xe={idle:``,voicing:`Synthesizing narration…`,recording:`Recording the reel…`,saving:`Finishing the file…`,error:`Something went wrong`},$=new Map;function Ze(e,t,n){let r=$.get(e);if(r)return r;let i=Me(t,n);if($.set(e,i),$.size>8){let e=$.keys().next().value;e&&$.delete(e)}return i}function Qe(e){return e.slides.map(e=>e.voiceover).join(`\0`)}function $e({frames:e,script:t,cfg:n,onClose:r,onShared:a}){let[o,s]=(0,j.useState)(`9:16`),[p,m]=(0,j.useState)(`aurora`),[h,g]=(0,j.useState)(`high`),[_,v]=(0,j.useState)(()=>t??(e?.length?we(e):null)),[y,b]=(0,j.useState)(!1),[x,S]=(0,j.useState)(!1),[C,w]=(0,j.useState)(!1),[T,E]=(0,j.useState)(`idle`),[D,O]=(0,j.useState)(!1),[k,A]=(0,j.useState)(!1),[ne,M]=(0,j.useState)(!1),[N,P]=(0,j.useState)(!1),[ae,oe]=(0,j.useState)(0),L=T===`voicing`||T===`recording`||T===`saving`,R=(0,j.useRef)(null),z=(0,j.useRef)(null),B=(0,j.useRef)(null),V=(0,j.useRef)(void 0),se=(0,j.useRef)(`share`),H=(0,j.useRef)(`high`);H.current=h;let U=(0,j.useRef)(null),W=(0,j.useRef)(null),[G,ce]=(0,j.useState)(null),K=(0,j.useRef)(!1),q=(0,j.useCallback)(()=>{K.current=!0},[]),ue=(0,j.useMemo)(()=>i(()=>ee().then(()=>void 0)),[]),de=(0,j.useRef)(null),[fe,J]=(0,j.useState)(!1);(0,j.useEffect)(()=>{if(typeof window>`u`||!window.matchMedia)return;let e=window.matchMedia(`(max-width: 760px)`),t=()=>J(e.matches);return t(),e.addEventListener(`change`,t),()=>e.removeEventListener(`change`,t)},[]),l(de,{onEscape:(0,j.useCallback)(()=>{L||r()},[L,r]),initialFocus:R});let Y=(e??[]).map(e=>`${e.at}:${e.question}`).join(`|`),pe=n?`${n.provider}:${n.model}:${n.baseUrl??``}`:``;(0,j.useEffect)(()=>{let r=!0;if(K.current=!1,b(!1),U.current?.stop(),U.current=null,W.current=null,ce(null),A(!1),P(!1),oe(0),t)return v(t),()=>{r=!1};let i=e??[];return v(we(i)),n&&Ze(`${Y}\u0001${pe}`,i,n).then(e=>{!r||K.current||(v(e),b(!0))}),()=>{r=!1}},[Y,pe,t]);let X=(0,j.useMemo)(()=>_?{..._,palette:p}:null,[_,p]),me=_?Math.max(6,Math.round(_.durationMs/1e3)):0,he=G?Math.max(6,Math.round(G.reduce((e,t)=>e+t,0)/1e3)):null,ge=he??me,_e=X?`${o}-${x?`rec`:`preview-${X.seed}-${G?`synced`:`rough`}`}`:null,ve=(0,j.useRef)(!1);ve.current=k;let ye=(0,j.useCallback)(async()=>{if(q(),k){U.current?.setMuted(!0),A(!1);return}if(!X)return;let e=Qe(X),t=W.current;if(!t||t.sig!==e){M(!0);try{t={sig:e,...await Ve(X)},W.current=t}finally{M(!1)}}t.buffer&&(U.current||=Ge(t.buffer),U.current?.setMuted(!1),U.current?.play(),N&&U.current?.pause(),ce(t.timings),A(!0))},[k,X,N,q]);(0,j.useEffect)(()=>()=>{U.current?.stop(),U.current=null},[]);let be=(0,j.useCallback)(e=>{q(),P(e),ve.current&&(e?U.current?.pause():U.current?.resume())},[q]),xe=(0,j.useCallback)(()=>{q(),P(!1),oe(e=>e+1),ve.current&&U.current?.play()},[q]),Z=(0,j.useCallback)((e=`idle`)=>{z.current?.cancel(),z.current=null,B.current?.stop(),B.current=null,V.current=void 0,S(!1),w(!1),E(e)},[]);(0,j.useEffect)(()=>()=>Z(),[Z]),(0,j.useEffect)(()=>{if(!x||!D||z.current||!R.current)return;let e=!1,t=(V.current??[]).reduce((e,t)=>e+t,0);return ie({el:R.current,audioStream:B.current?.stream??null,aspect:o,quality:H.current,maxDurationMs:t?t+900:void 0}).then(t=>{if(e){t.cancel();return}z.current=t,B.current?.start(),w(!0)}).catch(()=>{f(`Couldn't render the clip in this browser`,`warn`),Z(`error`)}),()=>{e=!0}},[x,D,o,Z]);let Ce=(0,j.useCallback)(e=>{if(L||!X)return;if(q(),!F()){f(`This browser can't render a video clip`,`warn`);return}se.current=e,E(`voicing`);let t=Qe(X),n=W.current;(n&&n.sig===t?Promise.resolve(n):Ve(X)).then(e=>{W.current={sig:t,...e};let{buffer:n,timings:r,missing:i}=e;V.current=r,B.current=n?He(n):null,i>0&&f(`${i} narration line${i===1?``:`s`} couldn’t be voiced — exporting the rest.`,`warn`),w(!1),O(!1),E(`recording`),S(!0)}).catch(()=>{f(`Could not prepare the narration`,`warn`),Z(`error`)})},[L,X,Z,q]),Q=(0,j.useCallback)(async()=>{let e=z.current;if(!e){Z();return}z.current=null,E(`saving`);try{let t=await e.stop();se.current===`download`?(d(t.blob),f(`Saved to your downloads`,`good`)):await u(t,{title:`My Mavéa reel`,text:`Made with Mavéa`})===`downloaded`&&f(`Saved to your downloads`,`good`),a?.(),Z()}catch{f(`Could not finish the clip`,`warn`),Z(`error`)}},[Z,a]);if(!t&&!e?.length)return null;let Te=()=>{q(),P(!1),v(e=>e&&Se(e,e.seed+1))};return(0,I.jsx)(`div`,{className:`shm-scrim`,role:`presentation`,onClick:L?void 0:e=>e.target===e.currentTarget&&r(),children:(0,I.jsxs)(`div`,{ref:de,className:`shm-modal`,role:`dialog`,"aria-modal":`true`,"aria-label":`Share your Mavéa session as a clip`,style:fe?{flexDirection:`column`}:void 0,children:[(0,I.jsxs)(`div`,{className:`shm-panel`,children:[(0,I.jsx)(`div`,{className:`shm-eyebrow`,children:`▷ MAVÉA REPLAY`}),(0,I.jsxs)(`div`,{className:`shm-headline`,children:[`Your session, as`,he?``:` about`,` a`,` `,(0,I.jsx)(`span`,{style:{color:`var(--presence-soft)`},children:ge?`${ge}-second`:``}),` `,`clip.`]}),(0,I.jsx)(`div`,{className:`shm-sub`,children:`Auto-cut from the conversation and rendered in this browser. Model direction and narration may use your selected providers; sharing sends the finished file to the destination you choose.`}),(0,I.jsx)(te,{kind:`publishing`,from:`live`}),X&&!x&&(0,I.jsxs)(`div`,{className:`shm-kbd-hint`,"aria-hidden":`true`,children:[(0,I.jsx)(`kbd`,{children:`←`}),(0,I.jsx)(`kbd`,{children:`→`}),` beats · `,(0,I.jsx)(`kbd`,{children:`↑`}),(0,I.jsx)(`kbd`,{children:`↓`}),` sections · `,(0,I.jsx)(`kbd`,{children:`space`}),` pause`]}),(0,I.jsxs)(`div`,{className:`shm-group`,children:[(0,I.jsx)(`div`,{className:`shm-label`,children:`Palette`}),(0,I.jsx)(`div`,{className:`shm-chips`,children:Ke.map(e=>(0,I.jsxs)(`button`,{type:`button`,className:`shm-chip`,"data-active":p===e.id,disabled:L,onClick:()=>{q(),m(e.id)},title:e.blurb,children:[(0,I.jsx)(`span`,{className:`shm-dot`,style:{background:e.dot},"aria-hidden":`true`}),e.label]},e.id))})]}),(0,I.jsxs)(`div`,{className:`shm-group`,children:[(0,I.jsx)(`div`,{className:`shm-label`,children:`Format`}),(0,I.jsx)(`div`,{className:`shm-chips`,children:Je.map(e=>(0,I.jsxs)(`button`,{type:`button`,className:`shm-chip`,"data-active":o===e.id,disabled:L,onClick:()=>{q(),s(e.id)},children:[(0,I.jsx)(`span`,{className:`shm-shape`,style:{width:e.w,height:e.h},"aria-hidden":`true`}),e.label]},e.id))})]}),(0,I.jsxs)(`div`,{className:`shm-group`,children:[(0,I.jsx)(`div`,{className:`shm-label`,children:`Quality`}),(0,I.jsx)(`div`,{className:`shm-chips`,children:Ye.map(e=>(0,I.jsx)(`button`,{type:`button`,className:`shm-chip`,"data-active":h===e.id,disabled:L,onClick:()=>{q(),g(e.id)},title:re(e.id),children:e.label},e.id))})]}),(0,I.jsxs)(`div`,{className:`shm-actions`,children:[(0,I.jsxs)(`button`,{type:`button`,className:`shm-btn shm-btn-primary`,disabled:L||!X,onClick:()=>Ce(`share`),children:[L?(0,I.jsx)(`span`,{className:`shm-spin`,"aria-hidden":`true`}):`⤴`,L?Xe[T]:`Share`]}),(0,I.jsx)(`button`,{type:`button`,className:`shm-btn`,disabled:L||!X,onClick:()=>Ce(`download`),children:`↓ Download`}),(0,I.jsx)(`button`,{type:`button`,className:`shm-remix`,...ue,disabled:L||!_||!!t,onClick:Te,title:`Re-roll the look (same content, free)`,children:`↻ Remix`})]}),(0,I.jsxs)(`div`,{className:`shm-progress`,"data-on":L,"aria-hidden":!L,children:[(0,I.jsx)(`div`,{className:`shm-progress-bar`,children:(0,I.jsx)(`i`,{})}),(0,I.jsx)(`span`,{className:`shm-progress-text`,children:Xe[T]||` `})]})]}),(0,I.jsx)(`div`,{className:`shm-stage`,children:(0,I.jsxs)(`div`,{className:`shm-frame`,"data-aspect":o,"data-directed":y,children:[X?(0,I.jsx)(le,{script:X,timings:x?V.current:G??void 0,loop:!x,playing:x?C:!0,playKey:x?0:ae,paused:x?void 0:N,onPausedChange:x?void 0:be,initialIndex:!x&&X.seed>0?Math.max(0,X.slides.findIndex(e=>e.content!==`title`&&e.content!==`outro`)):0,interactive:!x,onCycle:()=>{ve.current&&U.current?.play()},frameRef:e=>{R.current=e,e&&O(!0)},onDone:x?Q:void 0},_e):(0,I.jsxs)(`div`,{className:`shm-composing`,children:[(0,I.jsx)(`span`,{className:`shm-composing-dot`}),`Composing your reel…`]}),X&&!x&&(0,I.jsxs)(`div`,{className:`shm-controls`,children:[(0,I.jsx)(`button`,{type:`button`,className:`shm-sound`,"data-on":k,onClick:ye,disabled:ne,"aria-pressed":k,title:k?`Mute preview`:`Play sound`,children:ne?(0,I.jsx)(`span`,{className:`shm-spin`,"aria-hidden":`true`}):k?(0,I.jsx)(c.speaker,{style:{width:18,height:18}}):(0,I.jsx)(c.speakerOff,{style:{width:18,height:18}})}),(0,I.jsx)(`button`,{type:`button`,className:`shm-sound`,"data-on":N,onClick:()=>be(!N),"aria-pressed":N,title:N?`Play`:`Pause`,children:N?(0,I.jsx)(c.play,{style:{width:17,height:17}}):(0,I.jsx)(c.pause,{style:{width:17,height:17}})}),(0,I.jsx)(`button`,{type:`button`,className:`shm-sound`,onClick:xe,title:`Replay from the start`,children:(0,I.jsx)(c.refresh,{style:{width:17,height:17}})})]})]})}),(0,I.jsx)(`button`,{type:`button`,className:`shm-close`,onClick:L?void 0:r,"aria-label":`Close`,children:`✕`})]})})}export{qe as t};
@@ -1 +0,0 @@
1
- import{r as e}from"./chunk-BVpWp9h4.js";import{D as t,E as n,T as r,n as i}from"./registry-ChG5tFfx.js";import{r as a}from"./spokenText-D4zPX9JY.js";var o=e({buildAnnotationReel:()=>d}),s=8,c=0;function l(e,r,o,s,l){let u=t(a(s.voiceover),n.voiceover);return{id:`a${c++}`,content:e,template:r,slots:i(e,o,l),voiceover:u,durationMs:Math.max(s.ms,u?Math.round(u.length/13*1e3)+500:0)}}function u(e){return e.replace(/\.[a-z0-9]+$/i,``).trim()||e}function d(e,t){let n=`Inside ${u(t.fileName)}`,i={topic:t.fileName,question:n},a=l(`title`,`title`,{question:n},{voiceover:n,ms:r.intro},i),o=e.slice(0,s).map(e=>{let t=e.explanation||e.title,n=e.title&&!t.includes(e.title)?`${e.title}. ${t}`:t;return l(`markup`,`documentMarkup`,{...e},{voiceover:n,ms:r.default},i)}),c=l(`outro`,`outro`,{wordmark:`Mavéa`,tagline:`See what it means.`},{voiceover:`Made with Mavéa.`,ms:r.outro},i),d=[a,...o,c];return{topic:t.fileName,question:n,palette:t.palette??`aurora`,vibe:t.vibe??`clean`,seed:0,slides:d,durationMs:d.reduce((e,t)=>e+t.durationMs,0)}}export{o as t};
@@ -1 +0,0 @@
1
- import"./ReplayCard-MSWq-Mxr.js";import"./TopicCanvas-wmAsICUd.js";import"./CanvasSkeleton-BCq4yAAN.js";
@@ -1,2 +0,0 @@
1
- var e=e=>Math.round(e*10)/10,t=e=>Math.min(Math.max(e.height/18,.9),4);function n(e){let t=2166136261;for(let n=0;n<e.length;n++)t=Math.imul(t^e.charCodeAt(n),16777619);return t>>>0}function r(e){let t=e||1;return()=>{t|=0,t=t+1831565813|0;let e=Math.imul(t^t>>>15,1|t);return e=e+Math.imul(e^e>>>7,61|e)^e,((e^e>>>14)>>>0)/4294967296}}function i(t){let n=`M ${e(t[0].x)} ${e(t[0].y)}`;for(let r=0;r<t.length-1;r++){let i=t[Math.max(0,r-1)],a=t[r],o=t[r+1],s=t[Math.min(t.length-1,r+2)],c=a.x+(o.x-i.x)/6,l=a.y+(o.y-i.y)/6,u=o.x-(s.x-a.x)/6,d=o.y-(s.y-a.y)/6;n+=` C ${e(c)} ${e(l)} ${e(u)} ${e(d)} ${e(o.x)} ${e(o.y)}`}return n}function a(e,t,n){let r=e.left+e.width/2,a=e.top+e.height/2,o=Math.max(Math.min(Math.max(e.width/2+8,14),t.width*.42),e.width/2+2),s=Math.max(Math.min(Math.max(e.height/2+7,11),t.height*.42),e.height/2+2),c=-.07+(n()-.5)*.05,l=Math.cos(c),u=Math.sin(c),d=-.6+(n()-.5)*.4,f=Math.PI*2*1.16,p=[];for(let e=0;e<=11;e++){let t=d+f*e/11,i=1+(n()*2-1)*.04*Math.min(1,e/1.5),c=Math.cos(t)*o*i,m=Math.sin(t)*s*i;p.push({x:r+c*l-m*u,y:a+c*u+m*l})}return i(p)}function o(e,t,n,r=!1){let a=Math.min(e.top+e.height+(r?1.5:5),t.height-4),o=Math.max(4,e.left-4),s=Math.min(t.width-4,e.left+e.width+5),c=[];for(let e=0;e<=4;e++){let t=e/4,i=Math.sin(Math.PI*t)*(r?1:2.4),l=(n()*2-1)*(r?.6:1.2);c.push({x:o+(s-o)*t,y:a+i+l})}return c[4].y-=r?2.2:3.4,i(c)}function s(t,n,r){let i=1.5+r()*1.5,a=1+r(),o=Math.max(2,t.left-i),s=Math.max(2,t.top-a),c=Math.min(n.width-2,t.left+t.width+i),l=Math.min(n.height-2,t.top+t.height+a),u=(e,t)=>({x:(e?c:o)+(r()*2-1)*1.4,y:(t?l:s)+(r()*2-1)*1}),d=u(0,0),f=u(1,0),p=u(1,1),m=u(0,1);return`M ${e(d.x)} ${e(d.y)} L ${e(f.x)} ${e(f.y)} L ${e(p.x)} ${e(p.y)} L ${e(m.x)} ${e(m.y)} Z`}function c(e,t,n){let r=e.left+e.width/2,a=e.top<56,o=a?{x:r,y:Math.min(e.top+e.height+5,t.height-4)}:{x:r,y:Math.max(e.top-4,4)},s=r>t.width*.35?-1:1,c=a?1:-1,u={x:Math.min(Math.max(o.x+s*(58+n()*16),6),t.width-6),y:Math.min(Math.max(o.y+c*(42+n()*14),6),t.height-6)},d=(12+n()*8)*c,f={x:u.x+(o.x-u.x)*.38+(n()-.5)*4,y:u.y+(o.y-u.y)*.3+d},p={x:u.x+(o.x-u.x)*.78+(n()-.5)*3,y:u.y+(o.y-u.y)*.72+d*.5};return{d:i([u,f,p,o]),head:l(o,p),kind:`point`}}function l(t,n,r=9.5,i=.48){let a=t.x-n.x,o=t.y-n.y,s=Math.hypot(a,o)||1,c=a/s,l=o/s,u=e=>{let n=Math.cos(e),i=Math.sin(e),a=-c*n+l*i,o=-l*n-c*i;return{x:t.x+a*r,y:t.y+o*r}},d=u(i),f=u(-i);return`M ${e(d.x)} ${e(d.y)} L ${e(t.x)} ${e(t.y)} L ${e(f.x)} ${e(f.y)}`}var u=e=>({x:e.left+e.width/2,y:e.top+e.height/2});function d(e,t,n,r=5){let i=u(e),a=t?Math.abs(e.width/2/t):1/0,o=n?Math.abs(e.height/2/n):1/0,s=Math.min(a,o)+r;return{x:i.x-t*s,y:i.y-n*s}}function f(e,t,n,r,a){if(!n)return c(t,r,a);let o=u(t),s=u(n),f=s.x-o.x,p=s.y-o.y;if(Math.abs(p)>Math.abs(f))return c(t,r,a);let m=Math.hypot(f,p)||1,h=d(n,f/m,p/m),g=e===`rising`?1:-1,_=(Math.min(m*.2,26)+a()*5)*g,v=h.x-o.x,y=h.y-o.y,b={x:o.x+v*.35,y:o.y+y*.35+_},x={x:o.x+v*.72,y:o.y+y*.72+_*.6};return{d:i([o,b,x,h]),head:l(h,x),kind:e}}function p(e,t,n){let r=u(e),a=u(t),o=a.x-r.x,s=a.y-r.y,c=Math.hypot(o,s)||1,f=o/c,p=s/c,m=d(e,-f,-p),h=d(t,f,p),g=n()<.5?1:-1,_=(Math.min(c*.12,60)+n()*8)*g,v=h.x-m.x,y=h.y-m.y,b=-p,x=f,S={x:m.x+v*.35+b*_,y:m.y+y*.35+x*_},C={x:m.x+v*.72+b*_*.6,y:m.y+y*.72+x*_*.6};return{d:i([m,S,C,h]),head:l(h,C),kind:`connect`}}function m(e,t,n,r,a){let o=t?t.left+t.width:e.left+e.width,s=Math.max(4,Math.min(e.left,t?t.left:e.left)),c=Math.min(n.width-4,Math.max(e.left+e.width,o)),l=Math.max(12,Math.min(e.top,t?t.top:e.top)-8),u=[{x:s,y:l+7},{x:s,y:l}];for(let e=1;e<5;e++){let t=e/5;u.push({x:s+(c-s)*t,y:l+(r()*2-1)})}u.push({x:c,y:l}),u.push({x:c,y:l+7});let d={d:i(u),kind:`bracket`};return a&&(d.label={text:a,x:(s+c)/2,y:l-6,anchor:`middle`}),d}function h(e){let t=e.split(`
2
- `);return{w:t.reduce((e,t)=>Math.max(e,t.length),0)*8+10,lineH:17,h:(t.length-1)*17+17}}function g(e,t,n,r,a){let{w:o,h:s}=h(r),c=s-17,l=a??(t.width-(e.left+e.width)>o+22?`right`:`below`),u=l===`right`?Math.min(t.width-8-o,e.left+e.width+14):l===`left`?Math.max(8,e.left-o-14):Math.max(8,Math.min(e.left,t.width-8-o)),d=l===`right`||l===`left`?Math.min(t.height-8-c,Math.max(14,e.top+e.height/2)):l===`above`?Math.max(14,e.top-c-14):Math.min(t.height-8-c,e.top+e.height+18),f=l===`right`?{x:u-7,y:d-4}:l===`left`?{x:u+o-3,y:d-4}:l===`above`?{x:u+6,y:d+c+4}:{x:u+6,y:d-13},p=l===`right`?{x:e.left+e.width+2,y:e.top+e.height/2}:l===`left`?{x:e.left-2,y:e.top+e.height/2}:l===`above`?{x:e.left+Math.min(e.width/2,24),y:e.top-2}:{x:e.left+Math.min(e.width/2,24),y:e.top+e.height};return{d:i([f,{x:(f.x+p.x)/2+(n()-.5)*4,y:(f.y+p.y)/2+(l===`below`?5:-5)},p]),kind:`note`,label:{text:r,x:u,y:d,anchor:`start`}}}function _(e,n,r){if(e.height/Math.max(e.width,1)>1.4){let t=Math.max(4,e.left-3),a=Math.max(4,e.top-3),o=Math.min(n.width-4,e.left+e.width+3),s=Math.min(n.height-4,e.top+e.height+3),c=()=>(r()*2-1)*2,l=(e,t,n,r)=>i([{x:e+c(),y:t+c()},{x:(e+n)/2+c(),y:(t+r)/2+c()},{x:n+c(),y:r+c()}]);return{d:l(t,a,o,s),head:l(o,a,t,s),kind:`strike`}}let a=t(e),o=e.top+e.height/2,s=Math.max(4,e.left-4*a),c=Math.min(n.width-4,e.left+e.width+5*a),l=(r()-.5)*2.4*a,u=[];for(let e=0;e<=4;e++){let t=e/4;u.push({x:s+(c-s)*t,y:o-1.2*a+l*t+(r()*2-1)*1.1*a})}for(let e=4;e>=0;e--){let t=e/4;u.push({x:s+(c-s)*t,y:o+1.8*a+l*t+(r()*2-1)*1.1*a})}return u[u.length-1].y+=2.2*a,{d:i(u),kind:`strike`}}function v(e,n,r){let a=t(e),o=e.top+e.height/2,s=e.left>=26*a?e.left-22*a:Math.min(e.left+e.width+6*a,n.width-22*a),c=()=>(r()*2-1)*1.1*a;return{d:i([{x:s+c(),y:o+1*a+c()},{x:s+6*a+c(),y:o+7*a+c()},{x:s+17*a+c(),y:o-9*a+c()}].map(e=>({x:Math.min(Math.max(e.x,3),n.width-3),y:Math.min(Math.max(e.y,3),n.height-3)}))),kind:`check`}}function y(n,r,i){let a=t(n),o=9*a,s=Math.min(Math.max(n.left-16*a,o+4),r.width-o-4),c=Math.min(Math.max(n.top-12*a,o+4),r.height-o-4),l=-Math.PI/2+(i()-.5)*.3,u=[0,2,4,1,3,0].map(e=>{let t=l+e*2*Math.PI/5+(i()-.5)*.12,n=o*(1+(i()-.5)*.16);return{x:s+Math.cos(t)*n,y:c+Math.sin(t)*n}}),d=u[u.length-2],f=u[u.length-1],p=Math.hypot(f.x-d.x,f.y-d.y)||1;u.push({x:f.x+(f.x-d.x)/p*3*a,y:f.y+(f.y-d.y)/p*3*a});let m=`M ${e(u[0].x)} ${e(u[0].y)}`;for(let t=1;t<u.length;t++)m+=` L ${e(u[t].x)} ${e(u[t].y)}`;return{d:m,kind:`star`}}function b(n,r,i){let a=t(n),o=5*a,s=Math.max(3,n.left-o),c=Math.max(3,n.top-o),l=Math.min(r.width-3,n.left+n.width+o),u=Math.min(r.height-3,n.top+n.height+o),d=()=>(i()*2-1)*1.6*a,f=[{x:s,y:c},{x:l,y:c},{x:l,y:u},{x:s,y:u}],p=[];for(let e=0;e<=4;e++){let t=f[e%4];if(p.push({x:t.x+d(),y:t.y+d()}),e<4){let n=f[(e+1)%4];p.push({x:(t.x+n.x)/2+d(),y:(t.y+n.y)/2+d()})}}p.push({x:p[0].x+7*a+d(),y:p[0].y+d()});let m=`M ${e(p[0].x)} ${e(p[0].y)}`;for(let t=1;t<p.length;t++)m+=` L ${e(p[t].x)} ${e(p[t].y)}`;return{d:m,kind:`frame`}}function x(e,n,r,a,o,s){let c=t(e),l=Math.min(e.top,n.top)-2,u=Math.max(e.top+e.height,n.top+n.height)+2;if(u-l<24*c)return null;let d=Math.min(e.left,n.left),f=Math.max(e.left+e.width,n.left+n.width),p=s===`right`?`right`:s===`left`||d>=18*c?`left`:`right`,m=p===`left`?Math.max(6,d-10*c):Math.min(r.width-6,f+10*c),h=p===`left`?-1:1,g=(l+u)/2,_=()=>(a()*2-1)*1.2*c,v=4.5*c,y={d:i([{x:m-h*5*c+_(),y:l+_()},{x:m+_(),y:l+(g-l)*.3+_()},{x:m+_(),y:g-7*c+_()},{x:m+h*v+_(),y:g+_()},{x:m+_(),y:g+7*c+_()},{x:m+_(),y:u-(u-g)*.3+_()},{x:m-h*5*c+_(),y:u+_()}]),kind:`brace`};return o&&(y.label={text:o,x:m+h*(v+8*c),y:g+4*c,anchor:p===`left`?`end`:`start`,...c>1.2?{size:14*c}:{}}),y}function S(e,n,r,a){let o=t(e),s=18*o,c=24*o,l=a??(n.width-(e.left+e.width)>s+24?`right`:`above`),u=Math.min(n.width-s-4,Math.max(4,e.left+e.width/2-s/2)),d=l===`right`?Math.min(n.width-s-4,e.left+e.width+12*o):l===`left`?Math.max(4,e.left-s-12*o):u,f=l===`above`?Math.max(c,e.top-10*o):l===`below`?Math.min(n.height-6,e.top+e.height+c):Math.max(c,e.top+e.height/2+6*o),p={x:d+(l===`left`?s+2:-3*o),y:f-c/3},m=l===`above`?{x:e.left+e.width/2,y:e.top-2}:l===`below`?{x:e.left+e.width/2,y:e.top+e.height+2}:{x:l===`left`?e.left-2:e.left+e.width+2,y:e.top+e.height/2};return{d:i([p,{x:(p.x+m.x)/2+(r()-.5)*4*o,y:(p.y+m.y)/2-4*o},m]),kind:`question`,label:{text:`?`,x:d,y:f,anchor:`start`,...o>1.2?{size:26*o}:{}}}}function C(e,t){return{left:e.left-t.left,top:e.top-t.top,width:e.width,height:e.height}}function w(e,t,i,l=``,u){if(t.width<=0||t.height<=0||i.width<=0)return null;let d=r(n(l+e)),h=C(t,i),w=u?.to?C(u.to,i):void 0;return e===`circle`?h.width>i.width*.6||h.width/Math.max(h.height,1)>5?{d:o(h,i,d,u?.tight),kind:`underline`}:{d:a(h,i,d),kind:e}:e===`underline`?{d:o(h,i,d,u?.tight),kind:e}:e===`highlight`?{d:(u?.rects?.length?u.rects.map(e=>C(e,i)):[h]).map(e=>s(e,i,d)).join(` `),kind:e,fill:!0}:e===`rising`||e===`falling`?f(e,h,w,i,d):e===`bracket`?m(h,w,i,d,u?.label):e===`note`?u?.label?g(h,i,d,u.label,u?.place):null:e===`strike`?_(h,i,d):e===`check`?v(h,i,d):e===`star`?y(h,i,d):e===`frame`?b(h,i,d):e===`question`?S(h,i,d,u?.place):e===`brace`?w?x(h,w,i,d,u?.label,u?.place):null:e===`connect`?w?p(h,w,d):null:c(h,i,d)}var T=new Set([`circle`,`underline`,`point`,`highlight`,`rising`,`falling`,`bracket`,`note`]);function E(e){return e&&T.has(e)?e:null}function D(e,t,a){let o=r(n(a+`:tether`)),s={x:(e.x+t.x)/2+(o()-.5)*10,y:(e.y+t.y)/2+(o()-.5)*10};return{d:i([e,s,t]),head:l(t,s,7.5)}}function O(e,n,r,i,a){if(!i)return[];let{w:o,h:s}=h(i),c=Math.max(14,n.top+n.height/2)-14,l=e=>e.left>=2&&e.top>=2&&e.left+e.width<=r.width-2&&e.top+e.height<=r.height-2;if(e===`note`)return[{place:`right`,box:{left:n.left+n.width+14,top:c,width:o,height:s}},{place:`below`,box:{left:Math.max(8,Math.min(n.left,r.width-8-o)),top:n.top+n.height+6,width:o,height:s}},{place:`above`,box:{left:Math.max(8,Math.min(n.left,r.width-8-o)),top:Math.max(2,n.top-s-10),width:o,height:s}}].filter(e=>l(e.box));if(e===`question`){let e=t(n),r=18*e,i=26*e;return[{place:`right`,box:{left:n.left+n.width+12*e,top:c,width:r,height:i}},{place:`left`,box:{left:n.left-r-12*e,top:c,width:r,height:i}},{place:`above`,box:{left:n.left+n.width/2-r/2,top:Math.max(2,n.top-i-6),width:r,height:i}}].filter(e=>l(e.box))}if(e===`bracket`){let e=a?a.left+a.width:n.left+n.width,t=Math.min(n.left,a?a.left:n.left),r=Math.max(n.left+n.width,e),i=Math.max(12,Math.min(n.top,a?a.top:n.top)-8),s={left:(t+r)/2-o/2,top:i-6-15,width:o,height:16};return l(s)?[{place:`above`,box:s}]:[]}if(e===`brace`){let e=t(n),r=10*e+4.5*e+8*e,i=Math.min(n.left,a?.left??n.left),s=Math.max(n.left+n.width,a?a.left+a.width:n.left+n.width),c=(Math.min(n.top,a?.top??n.top)+Math.max(n.top+n.height,a?a.top+a.height:n.top+n.height))/2-8;return[{place:`left`,box:{left:i-r-o,top:c,width:o,height:16}},{place:`right`,box:{left:s+r,top:c,width:o,height:16}}].filter(e=>l(e.box))}return[]}export{D as i,O as n,w as r,E as t};
@@ -1 +0,0 @@
1
- import{r as e}from"./chunk-BVpWp9h4.js";import{c as t,d as n,f as r,l as i,s as a}from"./index-DWHIOldG.js";import{r as o,t as s}from"./spokenText-D4zPX9JY.js";var c=new Map,l=0;function u(e,t,n){return`${e}::${t}::${n}`}function d(e){let t=c.get(e);return t?(c.delete(e),c.set(e,t),t):null}function f(e){return c.has(e)}function p(e,t){if(t.length===0||t.length>2097152)return;let n=c.get(e);for(n&&(c.delete(e),l-=n.length);l+t.length>8388608&&c.size>0;){let e=c.keys().next().value;l-=c.get(e).length,c.delete(e)}c.set(e,t),l+=t.length}var m=24e3,ee=.08,te=.2,ne=2,h=0;function re(){h+=1}function g(){return h}function ie(e,t){if(e.length===0)return{samples:new Float32Array,carry:t};let n=t!==null,r=+!!n+e.length,i=r>>1,a=new Float32Array(i),o=0,s=0;if(n&&i>0){let n=t|e[0]<<8;n>=32768&&(n-=65536),a[o++]=n/32768,s=1}for(;o<i;o++,s+=2){let t=e[s]|e[s+1]<<8;t>=32768&&(t-=65536),a[o]=t/32768}return{samples:a,carry:(r&1)==1?e[e.length-1]:null}}var ae=null;function oe(e){ae=e}var _=1,v=!1,y=()=>v?0:_;function se(e){_=Math.min(1,Math.max(.05,e)),S&&(S.gain.gain.value=y())}var ce=1;function le(e){ce=Math.min(2,Math.max(.75,e))}function b(){return ce}function x(e){v=e,S&&(S.gain.gain.value=y())}var S=null,C=0,w=null;function T(e){for(let t of e.sources){try{t.stop()}catch{}try{t.disconnect()}catch{}}e.sources.clear();try{e.releaseTap()}catch{}try{e.gain.disconnect()}catch{}try{e.abort.abort()}catch{}S===e&&(S=null)}function ue(){C++,w?.abort(),w=null;let e=S;e&&(e.cancelled=!0,e.finishEarly?.(),T(e))}var de=e=>new Promise(t=>setTimeout(t,e));async function fe(e,n,r,a,o){let s=t();if(!s)return!1;if(s.state!==`running`)try{await s.resume()}catch{}if(s.state!==`running`)return!1;let c=new AbortController,l=C;w=c;let u;try{u=await fetch(`/tts/v1/audio/speech`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({model:`kokoro`,input:e,voice:n,response_format:`pcm`,speed:o??ce}),signal:c.signal})}catch{return w===c&&(w=null),l!==C}if(w===c&&(w=null),l!==C){try{c.abort()}catch{}return!0}if(!u.ok||!u.body)return!1;let d=s.createGain();d.gain.value=y();let f={sources:new Set,releaseTap:i(d),gain:d,abort:c,cancelled:!1};S&&(S.cancelled=!0,T(S)),S=f;let p=s.currentTime+ee,h=!1,g=ae;try{g?.begin(e)}catch{}let oe=e=>{if(!e.length)return;let t=s.createBuffer(1,e.length,m);t.getChannelData(0).set(e);let n=s.createBufferSource();if(n.buffer=t,n.connect(d),p<s.currentTime&&(p=s.currentTime+.02,re()),n.start(p),p+=t.duration,!h)try{r?.()}catch{}h=!0,f.sources.add(n),n.onended=()=>{f.sources.delete(n);try{n.disconnect()}catch{}}},_=[],v=0,se=Math.round(te*m),le=()=>{if(v===0)return;let e;if(_.length===1)e=_[0];else{e=new Float32Array(v);let t=0;for(let n of _)e.set(n,t),t+=n.length}_=[],v=0,oe(e)},b=a?[]:null,x=0;try{let e=u.body.getReader(),t=null;for(;;){for(;!f.cancelled&&p-s.currentTime>ne;)await de(60);if(f.cancelled)break;let{done:n,value:r}=await e.read();if(f.cancelled||n)break;if(!r||r.length===0)continue;b&&(x+=r.length,x>2097152?b=null:b.push(r));let i=ie(r,t);if(t=i.carry,i.samples.length){_.push(i.samples),v+=i.samples.length;try{g?.push(i.samples)}catch{}}(h?v>=se:v>0)&&le()}f.cancelled||le()}catch(e){f.cancelled||console.warn(`[streamTts] stream read failed mid-line — audio may be truncated`,e)}if(!f.cancelled&&h){if(a){let e=null;if(b){e=new Uint8Array(x);let t=0;for(let n of b)e.set(n,t),t+=n.length}try{a(e)}catch{}}await new Promise(e=>{let t=Math.max(0,(p-s.currentTime)*1e3)+40,n=setTimeout(e,t);f.finishEarly=()=>{clearTimeout(n),e()}})}let ue=f.cancelled;T(f);try{g?.end(h)}catch{}return ue||h}var pe=1;async function me(e,n,r){let a=t();if(!a||e.length<2)return!1;let o=C;if(a.state!==`running`)try{await a.resume()}catch{}if(a.state!==`running`)return!1;if(o!==C)return!0;let s=a.createGain();s.gain.value=y();let c={sources:new Set,releaseTap:i(s),gain:s,abort:new AbortController,cancelled:!1};S&&(S.cancelled=!0,T(S)),S=c;let l=ae;try{l?.begin(n)}catch{}let{samples:u}=ie(e,null);try{l?.push(u)}catch{}let d=a.currentTime+ee,f=!1,p=Math.round(pe*m);for(let e=0;e<u.length&&!c.cancelled;e+=p){let t=u.subarray(e,Math.min(e+p,u.length)),n=a.createBuffer(1,t.length,m);n.getChannelData(0).set(t);let i=a.createBufferSource();if(i.buffer=n,i.connect(s),i.start(d),d+=n.duration,!f)try{r?.()}catch{}f=!0,c.sources.add(i),i.onended=()=>{c.sources.delete(i);try{i.disconnect()}catch{}}}!c.cancelled&&f&&await new Promise(e=>{let t=Math.max(0,(d-a.currentTime)*1e3)+40,n=setTimeout(e,t);c.finishEarly=()=>{clearTimeout(n),e()}});let te=c.cancelled;T(c);try{l?.end(f)}catch{}return te||f}var he={Omakase:`oh-mah-kah-seh`,omakase:`oh-mah-kah-seh`,OMAKASE:`oh-mah-kah-seh`,CUDA:`kooda`,cuDNN:`koo dee en en`,JSON:`jason`,YAML:`yammel`,GUI:`gooey`,SaaS:`sass`,ASCII:`askee`,WYSIWYG:`wizzywig`,NASA:`nassa`,NASDAQ:`nazdack`,JPEG:`jaypeg`,OAuth:`oh-auth`,nginx:`engine x`,PyTorch:`pie torch`,Qwen:`kwen`,SQLite:`sequel lite`,MySQL:`my sequel`,PostgreSQL:`postgres`};function ge(e){return e.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`)}var _e=RegExp(`(?<![A-Za-z0-9])(${Object.keys(he).sort((e,t)=>t.length-e.length).map(ge).join(`|`)})(s)?(?![A-Za-z0-9])`,`g`);function ve(e){return e.replace(_e,(e,t,n)=>{let r=he[t];return n?`${r}${n}`:r})}var ye={Jan:`January`,Feb:`February`,Mar:`March`,Apr:`April`,Jun:`June`,Jul:`July`,Aug:`August`,Sep:`September`,Sept:`September`,Oct:`October`,Nov:`November`,Dec:`December`},be=RegExp(`(?<![A-Za-z])(${Object.keys(ye).join(`|`)})\\.?(?=,?\\s+\\d)`,`g`);function xe(e){return e.replace(be,(e,t)=>ye[t])}function E(e){return xe(ve(s(o(e))))}var Se=140,Ce=.15,we=.9,D=[],O=!1,k=null,A=!1,Te=new Set;function j(){return typeof window>`u`?null:window.speechSynthesis??null}function Ee(){let e=j();if(!e)return!1;try{return e.getVoices().length>0}catch{return!1}}function De(){let e=j();if(!e)return{mavea:null,user:null};let t;try{t=e.getVoices()}catch{return{mavea:null,user:null}}let n=e=>e.lang?.toLowerCase().startsWith(`en`)??!1,r=t.filter(e=>e.localService&&n(e)),i=t.filter(n),a=r.length?r:i.length?i:t;return{mavea:a[0]??null,user:a[1]??a[0]??null}}var M=null;function Oe(e){return M?.mavea||(M=De()),e===`user`?M.user:M.mavea}function N(){for(let e of Te)e()}function ke(){let e=0;return{onWord:()=>{e=performance.now()},release:n(()=>{if(!e)return Ce;let t=performance.now()-e;return Math.max(Ce,we*Math.exp(-t/Se))})}}function Ae(e){let t=j();return t?new Promise(n=>{let r=!1,i=e=>{r||(r=!0,s.release(),k=null,n(e))},a=new SpeechSynthesisUtterance(e.text),o=Oe(e.who);o&&(a.voice=o),a.pitch=e.who===`user`?.9:1.05,a.rate=e.who===`user`?.98:1.02;let s=ke();a.onstart=()=>{s.onWord(),e.start(!0)},a.onboundary=()=>s.onWord(),a.onend=()=>i(!0),a.onerror=()=>{e.start(!1),i(!1)},k=a;try{t.speak(a)}catch{e.start(!1),i(!1)}}):Promise.resolve(!1)}async function je(){if(!O){O=!0,N();try{for(;D.length;){let e=D.shift();if(A){e.start(!1),e.done(!1);continue}let t=await Ae(e);e.start(t),e.done(t)}}finally{O=!1,A=!1,N()}}}function Me(e,t){let n=E(F(e));if(!n||!Ee())return{started:Promise.resolve(!1),finished:Promise.resolve(!1)};let r,i=new Promise(e=>{r=e}),a=!1,o=e=>{a||(a=!0,r(e))};return{started:i,finished:new Promise(e=>{D.push({text:n,who:t,start:o,done:e}),N(),je()})}}function Ne(){A=!0,D.length=0;let e=j();try{e?.cancel()}catch{}k=null,N()}function Pe(){return O||D.length>0||k!==null}function Fe(e){return Te.add(e),()=>Te.delete(e)}var Ie=e({cancelSpeech:()=>qe,isSpeaking:()=>Je,isVoicePreparing:()=>Ye,primeLine:()=>Ge,sayable:()=>F,setVoiceMode:()=>Re,speak:()=>Ve,speakLine:()=>We,subscribeSpeaking:()=>Xe,voiceMode:()=>P}),Le=`mavea-voice-mode`;function P(){try{let e=localStorage.getItem(Le);return e===`kokoro`||e===`browser`?e:`auto`}catch{return`auto`}}function Re(e){try{e===`auto`?localStorage.removeItem(Le):localStorage.setItem(Le,e)}catch{}}var ze=/[\u{1F300}-\u{1FAFF}\u{2600}-\u{27BF}\u{2B00}-\u{2BFF}\u{2300}-\u{23FF}]/gu,Be=/[\uFE0F\u200D]/g;function F(e){return o(String(e)).replace(/<[^>]*>/g,` `).replace(/&[a-z]+;/gi,` `).replace(/```[\s\S]*?```/g,` `).replace(/`([^`]+)`/g,`$1`).replace(/^\s{0,3}#{1,6}\s+/gm,``).replace(/^\s*[-*+]\s+/gm,``).replace(/^\s*\d{1,2}[.)]\s+/gm,``).replace(/\*\*([^*]+)\*\*/g,`$1`).replace(/\*([^*]+)\*/g,`$1`).replace(/\bMav[eé]a['’]s\s*/gi,``).replace(/\s*\bMav[eé]a\b\s*/gi,` `).replace(/\s+([.,!?;:])/g,`$1`).replace(ze,``).replace(Be,``).replace(/[“”"]/g,``).replace(/[•★→·|]/g,` `).replace(/[—–]/g,`, `).replace(/\s+/g,` `).trim()}function Ve(e,t){We(e,t).finished}var He=2;function Ue(){return g()>=He}function We(e,t){let n=P();return n===`browser`?Me(e,t):n===`kokoro`?X(e,t):$()===!1||Ue()?Me(e,t):Ke(e,t)}function Ge(e,t){P()!==`browser`&&($()!==!0||Ue()||lt(e,t))}function Ke(e,t){let n=X(e,t),r;return{started:new Promise(e=>{r=e}),finished:(async()=>{if(await n.started)return r(!0),n.finished;if(await n.finished,!Ee())return r(!1),!1;let i=Me(e,t);return i.started.then(r),i.finished})()}}function qe(){mt(),Ne()}function Je(){return Z()||Pe()}function Ye(){return ht()}function Xe(e){let t=gt(e),n=Fe(e);return()=>{t(),n()}}var Ze=[{id:`heart`,label:`Heart`,kokoro:`af_heart`,tone:`warm`},{id:`emma`,label:`Emma`,kokoro:`bf_emma`,tone:`calm`},{id:`bella`,label:`Bella`,kokoro:`af_bella`,tone:`bright`},{id:`michael`,label:`Michael`,kokoro:`am_michael`,tone:`clear`},{id:`george`,label:`George`,kokoro:`bm_george`,tone:`steady`}],Qe=`heart`,$e=`mavea-voice-mavea`;function et(e){return Ze.find(t=>t.id===e)}var tt=e({cancelKokoro:()=>mt,kokoroAvailable:()=>vt,kokoroKnownAvailable:()=>$,kokoroSpeaking:()=>Z,kokoroSynthesizing:()=>ht,kokoroVoice:()=>rt,primeKokoroLine:()=>lt,resetKokoroProbe:()=>yt,setKokoroVoice:()=>nt,speakKokoroLine:()=>X,speakKokoroResult:()=>pt,subscribeKokoroSpeaking:()=>gt}),I={mavea:et(`heart`)?.kokoro??`af_heart`,user:et(`george`)?.kokoro??`bm_george`};function nt(e,t){t&&(I[e]=t)}function rt(e){return I[e]}var L=[],R=!1,z=!1,B=!1,V=0,H=null,U=null,W=null,G=null,it=new Set,at=!1,ot=!1;function K(){let e=Z(),t=ht();if(!(e===at&&t===ot)){at=e,ot=t;for(let e of it)e()}}function st(){if(W){try{URL.revokeObjectURL(W)}catch{}W=null}}var q=null,J=null,Y=null;function ct(){let e=L[0]??H;if(!e||g()>0||$()!==!0)return;let t=b(),n=u(e.voice,t,e.text);if(f(n)||J===n)return;q?.abort();let r=new AbortController;q=r,J=n,Y=(async()=>{try{let i=await fetch(`/tts/v1/audio/speech`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({model:`kokoro`,input:e.text,voice:e.voice,response_format:`pcm`,speed:t}),signal:r.signal});if(i.ok){let e=new Uint8Array(await i.arrayBuffer());e.length&&p(n,e)}}catch{}finally{q===r&&(q=null,J=null,Y=null)}})()}function lt(e,t){let n=E(F(e));n&&(H={text:n,voice:I[t]??I.mavea},B||ct())}async function ut(e){let t=b(),n=u(e.voice,t,e.text);H&&H.text===e.text&&(H=null);try{let r=d(n);if(!r&&J===n&&Y&&(await Y,r=d(n)),r&&(ct(),await me(r,e.text,()=>e.start(!0))))return!0;q&&J!==n&&(q.abort(),q=null,J=null,Y=null),B=!0;try{if(await fe(e.text,e.voice,()=>e.start(!0),e=>{B=!1,e&&p(n,e),ct()},t))return!0}finally{B=!1}}catch{}B=!0;try{return await dt(e)}finally{B=!1}}async function dt(e){let t=!1,n=new AbortController;G=n;try{let i=await fetch(`/tts/v1/audio/speech`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({model:`kokoro`,input:e.text,voice:e.voice,response_format:`mp3`,speed:b()}),signal:n.signal});if(!i.ok)return!1;let a=await i.blob();if(!a.size)return!1;let o=URL.createObjectURL(a);W=o,await new Promise(n=>{let i=new Audio(o);U=i;let a=r(i),s=!1,c=e=>{s||(s=!0,a(),t=e,n())};i.onended=()=>c(!0),i.onerror=()=>c(!1);let l=i.play();l&&typeof l.then==`function`?l.then(()=>e.start(!0),()=>c(!1)):e.start(!0)})}catch{}finally{G===n&&(G=null),st(),U=null}return t}async function ft(){if(!R){R=!0;try{for(;L.length;){let e=L.shift();z=!0,K();let t={...e,start:t=>{z=!1,K(),e.start(t)}},n=V,r=await vt()&&n===V&&await ut(t)&&n===V;t.start(r),t.done(r)}}finally{R=!1,K()}}}function X(e,t){let n=E(F(e));if(!n)return{started:Promise.resolve(!1),finished:Promise.resolve(!1)};let r,i=new Promise(e=>{r=e}),a=!1,o=e=>{a||(a=!0,r(e))};return{started:i,finished:new Promise(e=>{L.push({text:n,voice:I[t]??I.mavea,start:o,done:e}),K(),ft()})}}function pt(e,t){return X(e,t).finished}function mt(){V++,ue(),H=null,q&&(q.abort(),q=null,J=null,Y=null),G&&=(G.abort(),null);let e=L.splice(0,L.length);for(let t of e)try{t.start(!1),t.done(!1)}catch{}if(U)try{U.pause(),U.src=``}catch{}st(),U=null,z=!1,a(),K()}function Z(){return R||L.length>0||U!==null}function ht(){return R&&z}function gt(e){return it.add(e),()=>it.delete(e)}var Q=null,_t=null;function vt(){return Q||(Q=(async()=>{try{let e=await fetch(`/tts/health`,{method:`GET`});return e.ok||console.debug(`[kokoro] TTS health check returned`,e.status,`— voice off, captions only`),e.ok}catch(e){return console.debug(`[kokoro] TTS health check unreachable — voice off, captions only`,e),!1}})(),Q.then(e=>{_t=e})),Q}function $(){return _t}function yt(){Q=null,_t=null}export{ie as C,se as D,oe as E,le as O,ue as S,x as T,We as _,nt as a,P as b,Ze as c,Je as d,Ye as f,Ve as g,Re as h,tt as i,fe as k,et as l,F as m,$ as n,Qe as o,Ge as p,rt as r,$e as s,vt as t,qe as u,Xe as v,b as w,E as x,Ie as y};
@@ -1 +0,0 @@
1
- import{r as e}from"./chunk-BVpWp9h4.js";import{t}from"./react-BQSORdFI.js";import{t as n}from"./jsx-runtime-DaSxXjOY.js";import{n as r}from"./icons-CHVz6kv_.js";import{t as i}from"./richText-BkxJhl9N.js";import{i as a}from"./scale-Bcgfo6Hp.js";import{r as o}from"./lib-C9jT-CD8.js";import{t as s}from"./registry-types-DMuK0vJ6.js";import{n as c}from"./sourceHost-BV3t2XDb.js";var l=t(),u=n(),d=480,f=200,p=20,m=d-p*2,h=f-p*2-24,g=[`Exposition`,`Rising Action`,`Climax`,`Falling Action`,`Dénouement`],_=[0,.2,.5,.8,1],v=[.08,.45,1,.5,.1],y=[{label:`Act I — Setup`,x0:0,x1:.25},{label:`Act II — Confrontation`,x0:.25,x1:.75},{label:`Act III — Resolution`,x0:.75,x1:1}],b=[{x:.25,label:`Plot Point I`},{x:.75,label:`Plot Point II`}],x=[`Ordinary World`,`Call`,`Refusal`,`Mentor`,`Crossing`,`Tests`,`Innermost Cave`,`Ordeal`,`Reward`,`Road Back`,`Resurrection`,`Return`],S=[{label:`Opening Image`,pct:1},{label:`Theme Stated`,pct:5},{label:`Set-up`,pct:10},{label:`Catalyst`,pct:12},{label:`Debate`,pct:20},{label:`Break into 2`,pct:25},{label:`B Story`,pct:30},{label:`Fun & Games`,pct:50},{label:`Midpoint`,pct:50},{label:`Bad Guys Close In`,pct:62.5},{label:`All Is Lost`,pct:75},{label:`Dark Night`,pct:80},{label:`Break into 3`,pct:87},{label:`Finale`,pct:95},{label:`Final Image`,pct:99}],C=e=>p+e*m,w=e=>p+(1-e)*h,T=22;function E(e,t){return e.length>t?e.slice(0,t-1).trimEnd()+`…`:e}function D(e,t){let n=e.trim().toLowerCase(),r=t.findIndex(e=>e.toLowerCase()===n);return r>=0?r:t.findIndex(e=>e.toLowerCase().includes(n)||n.includes(e.toLowerCase()))}function ee({title:e,icon:t=`layers`,iconColor:n=`var(--presence)`,framework:a,beats:o,caption:s,footer:c,delay:p}){let m=r[t]??r.layers,h=(0,l.useMemo)(()=>{let e=o??[];return a===`freytag`?te(e):a===`threeact`?ne(e):a===`herojourney`?re(e):a===`savethecat`?ie(e):null},[a,o]),g={freytag:`Freytag Pyramid`,threeact:`Three-Act Structure`,herojourney:`Hero's Journey`,savethecat:`Save the Cat`};return(0,u.jsxs)(`div`,{className:`card reveal`,style:{"--delay":(p??0)+`ms`},children:[e&&(0,u.jsxs)(`div`,{className:`card-eyebrow`,children:[(0,u.jsx)(m,{className:`ic`,style:{color:n}}),` `,e]}),(0,u.jsx)(`div`,{className:`sa-framework-label`,children:g[a]??a}),(0,u.jsx)(`div`,{className:`sa-wrap`,children:(0,u.jsx)(`svg`,{className:`sa-svg`,viewBox:`0 0 ${d} ${f}`,role:`img`,"aria-label":`${g[a]??a} story structure`,preserveAspectRatio:`xMidYMid meet`,children:h})}),s&&(0,u.jsx)(`div`,{className:`block-caption`,children:s}),c&&(0,u.jsx)(`div`,{className:`insight-summary`,dangerouslySetInnerHTML:i(c),style:{marginTop:12}})]})}function te(e){let t=_.map((e,t)=>`${C(e).toFixed(1)},${w(v[t]).toFixed(1)}`).join(` `),n=[`${C(0).toFixed(1)},${w(0).toFixed(1)}`,..._.map((e,t)=>`${C(e).toFixed(1)},${w(v[t]).toFixed(1)}`),`${C(1).toFixed(1)},${w(0).toFixed(1)}`].join(` `),r=e.map((e,t)=>{let n=D(e.stage,g);if(n<0)return null;let r=_[n],i=v[n],a=C(r),o=w(i);return(0,u.jsxs)(`g`,{children:[(0,u.jsx)(`circle`,{cx:a,cy:o,r:4,className:`sa-beat-dot`}),(0,u.jsxs)(`text`,{x:a,y:o-10,textAnchor:`middle`,className:`sa-beat-lbl`,children:[E(e.label,T),e.label.length>T&&(0,u.jsx)(`title`,{children:e.label})]})]},t)}).filter(Boolean),i=f-6;return(0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)(`polygon`,{points:n,className:`sa-fill`}),(0,u.jsx)(`polyline`,{points:t,fill:`none`,className:`sa-curve`}),(0,u.jsx)(`line`,{x1:C(0),y1:w(0),x2:C(1),y2:w(0),className:`sa-baseline`}),g.map((e,t)=>{let n=t===0?`start`:t===g.length-1?`end`:`middle`;return(0,u.jsx)(`text`,{x:C(_[t]),y:i,textAnchor:n,className:`sa-stage-lbl`,children:e},t)}),r]})}function ne(e){let t=[`color-mix(in oklab, var(--presence) 12%, transparent)`,`color-mix(in oklab, var(--warning) 12%, transparent)`,`color-mix(in oklab, var(--insight) 12%, transparent)`],n=f-6,r=e.map((e,t)=>{let n=D(e.stage,y.map(e=>e.label));if(n<0)return null;let r=y[n],i=C((r.x0+r.x1)/2),a=w(.5);return(0,u.jsxs)(`g`,{children:[(0,u.jsx)(`circle`,{cx:i,cy:a,r:4,className:`sa-beat-dot`}),(0,u.jsxs)(`text`,{x:i,y:a-10,textAnchor:`middle`,className:`sa-beat-lbl`,children:[E(e.label,T),e.label.length>T&&(0,u.jsx)(`title`,{children:e.label})]})]},t)}).filter(Boolean);return(0,u.jsxs)(u.Fragment,{children:[y.map((e,n)=>(0,u.jsx)(`rect`,{x:C(e.x0),y:p,width:m*(e.x1-e.x0),height:h,fill:t[n],className:`sa-act-rect`},n)),b.map((e,t)=>(0,u.jsxs)(`g`,{children:[(0,u.jsx)(`line`,{x1:C(e.x),y1:p,x2:C(e.x),y2:w(0),className:`sa-transition`}),(0,u.jsx)(`text`,{x:C(e.x),y:32,textAnchor:`middle`,className:`sa-transition-lbl`,children:e.label})]},t)),y.map((e,t)=>(0,u.jsx)(`text`,{x:C((e.x0+e.x1)/2),y:n,textAnchor:`middle`,className:`sa-stage-lbl`,children:e.label},t)),r]})}function re(e){let t=x.length,n=h*.42,r=d/2,i=x.map((e,i)=>{let a=2*Math.PI*i/t-Math.PI/2;return{x:r+n*Math.cos(a),y:110+n*Math.sin(a),lx:r+83.12*Math.cos(a),ly:110+83.12*Math.sin(a),angle:a}}),a=e.map((e,t)=>{let n=D(e.stage,x);if(n<0)return null;let r=i[n];return(0,u.jsxs)(`g`,{children:[(0,u.jsx)(`circle`,{cx:r.x,cy:r.y,r:5,className:`sa-beat-dot-hero`}),(0,u.jsxs)(`text`,{x:r.lx,y:r.ly,textAnchor:`middle`,className:`sa-beat-lbl`,children:[E(e.label,T),e.label.length>T&&(0,u.jsx)(`title`,{children:e.label})]})]},t)}).filter(Boolean),o=i.map((e,t)=>t===0?`M ${e.x.toFixed(1)},${e.y.toFixed(1)}`:`L ${e.x.toFixed(1)},${e.y.toFixed(1)}`).join(` `)+` Z`;return(0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)(`circle`,{cx:r,cy:110,r:n,fill:`none`,className:`sa-circle-guide`}),(0,u.jsx)(`path`,{d:o,fill:`none`,className:`sa-circle-path`}),i.map((e,t)=>{let n=e.lx<r-10?`end`:e.lx>250?`start`:`middle`;return(0,u.jsxs)(`g`,{children:[(0,u.jsx)(`circle`,{cx:e.x,cy:e.y,r:3.5,className:`sa-stage-dot`}),(0,u.jsx)(`text`,{x:e.lx,y:e.ly+4,textAnchor:n,className:`sa-hj-lbl`,children:x[t]})]},t)}),a,(0,u.jsx)(`text`,{x:r-n-18,y:116,textAnchor:`middle`,className:`sa-arc-lbl`,transform:`rotate(-90 ${r-n-18} 110)`,children:`DEPARTURE`}),(0,u.jsx)(`text`,{x:r,y:28,textAnchor:`middle`,className:`sa-arc-lbl`,children:`INITIATION`}),(0,u.jsx)(`text`,{x:315.12,y:116,textAnchor:`middle`,className:`sa-arc-lbl`,transform:`rotate(90 315.12 110)`,children:`RETURN`})]})}function ie(e){let t=w(.5),n=e.map((e,n)=>{let r=D(e.stage,S.map(e=>e.label)),i=r>=0?S[r].pct/100:-1;if(i<0)return null;let a=C(i);return(0,u.jsxs)(`g`,{children:[(0,u.jsx)(`line`,{x1:a,y1:t-16,x2:a,y2:t+6,className:`sa-stc-pin`}),(0,u.jsxs)(`text`,{x:a,y:t-22,textAnchor:`middle`,className:`sa-beat-lbl`,children:[E(e.label,T),e.label.length>T&&(0,u.jsx)(`title`,{children:e.label})]})]},n)}).filter(Boolean);return(0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)(`rect`,{x:p,y:t-4,width:m,height:8,rx:4,className:`sa-stc-bar`}),[25,75].map((e,n)=>(0,u.jsx)(`line`,{x1:C(e/100),y1:t-20,x2:C(e/100),y2:t+20,className:`sa-stc-break`},n)),S.map((e,n)=>{let r=C(e.pct/100),i=n%2==0;return(0,u.jsxs)(`g`,{children:[(0,u.jsx)(`line`,{x1:r,y1:t-4,x2:r,y2:i?t-10:t+10,className:`sa-stc-tick`}),(0,u.jsx)(`text`,{x:r,y:i?t-16:t+22,textAnchor:`middle`,className:`sa-stc-lbl`,children:e.label})]},n)}),[0,25,50,75,100].map(e=>(0,u.jsxs)(`text`,{x:C(e/100),y:f-4,textAnchor:`middle`,className:`sa-pct-lbl`,children:[e,`%`]},e)),n]})}var O={metaphor:`color-mix(in oklab, var(--presence) 25%, transparent)`,simile:`color-mix(in oklab, var(--insight) 25%, transparent)`,alliteration:`color-mix(in oklab, var(--warning) 22%, transparent)`,irony:`color-mix(in oklab, var(--danger) 20%, transparent)`,anaphora:`color-mix(in oklab, var(--presence) 35%, transparent)`,hyperbole:`color-mix(in oklab, var(--warning) 32%, transparent)`,personification:`color-mix(in oklab, var(--insight) 30%, transparent)`,allusion:`color-mix(in oklab, var(--presence) 18%, transparent)`,parallelism:`color-mix(in oklab, var(--insight) 22%, transparent)`,antithesis:`color-mix(in oklab, var(--danger) 25%, transparent)`,oxymoron:`color-mix(in oklab, var(--warning) 28%, transparent)`,repetition:`color-mix(in oklab, var(--presence) 20%, transparent)`,chiasmus:`color-mix(in oklab, var(--insight) 28%, transparent)`,assonance:`color-mix(in oklab, var(--warning) 18%, transparent)`,other:`color-mix(in oklab, var(--text-muted) 22%, transparent)`},k={metaphor:`var(--presence)`,simile:`var(--insight)`,alliteration:`var(--warning)`,irony:`var(--danger)`,anaphora:`var(--presence)`,hyperbole:`var(--warning)`,personification:`var(--insight)`,allusion:`var(--presence)`,parallelism:`var(--insight)`,antithesis:`var(--danger)`,oxymoron:`var(--warning)`,repetition:`var(--presence)`,chiasmus:`var(--insight)`,assonance:`var(--warning)`,other:`var(--text-muted)`};function ae(e,t){let n=[...t].sort((e,t)=>t.phrase.length-e.phrase.length),r=[];for(let t of n){let n=e.toLowerCase(),i=t.phrase.toLowerCase(),a=0;for(;a<n.length;){let o=n.indexOf(i,a);if(o<0)break;r.some(e=>o<e.end&&o+t.phrase.length>e.start)||r.push({start:o,end:o+t.phrase.length,device:t.device,phrase:e.slice(o,o+t.phrase.length),note:t.note}),a=o+1}}r.sort((e,t)=>e.start-t.start);let i=[],a=0;for(let t of r)t.start>a&&i.push({kind:`plain`,text:e.slice(a,t.start)}),i.push({kind:`marked`,text:t.phrase,device:t.device,note:t.note}),a=t.end;return a<e.length&&i.push({kind:`plain`,text:e.slice(a)}),i.length?i:[{kind:`plain`,text:e}]}function oe({title:e,icon:t=`doc`,iconColor:n=`var(--presence)`,text:a,marks:o,caption:s,footer:c,delay:d}){let f=r[t]??r.doc,p=(0,l.useMemo)(()=>o??[],[o]),m=(0,l.useMemo)(()=>ae(a,p),[a,p]),h=(0,l.useMemo)(()=>[...new Set(p.map(e=>e.device))],[p]);return(0,u.jsxs)(`div`,{className:`card reveal`,style:{"--delay":(d??0)+`ms`},children:[e&&(0,u.jsxs)(`div`,{className:`card-eyebrow`,children:[(0,u.jsx)(f,{className:`ic`,style:{color:n}}),` `,e]}),(0,u.jsx)(`p`,{className:`dm-passage`,children:m.map((e,t)=>e.kind===`plain`?e.text:(0,u.jsx)(`span`,{className:`dm-mark`,style:{"--dm-bg":O[e.device]??O.other,"--dm-border":k[e.device]??k.other},title:e.note?`${e.device}: ${e.note}`:e.device,"aria-label":`${e.text} [${e.device}${e.note?`: `+e.note:``}]`,children:e.text},t))}),h.length>0&&(0,u.jsx)(`div`,{className:`dm-legend`,children:h.map(e=>{let t=O[e]??O.other,n=k[e]??k.other,r=p.find(t=>t.device===e&&t.note);return(0,u.jsxs)(`span`,{className:`dm-legend-item`,children:[(0,u.jsx)(`span`,{className:`dm-legend-swatch`,style:{"--dm-bg":t,"--dm-border":n}}),(0,u.jsxs)(`span`,{className:`dm-legend-label`,children:[e[0].toUpperCase()+e.slice(1),r&&(0,u.jsxs)(`span`,{className:`dm-legend-note`,children:[` — `,r.note]})]})]},e)})}),s&&(0,u.jsx)(`div`,{className:`block-caption dm-caption`,children:s}),c&&(0,u.jsx)(`div`,{className:`insight-summary`,dangerouslySetInnerHTML:i(c),style:{marginTop:12}})]})}var se={info:`var(--presence)`,success:`var(--insight)`,warn:`var(--warning)`,danger:`var(--danger)`,neutral:`var(--text-muted)`},ce={info:`spark`,success:`check`,warn:`alert`,danger:`shield`,neutral:`doc`};function le({title:e,icon:t,iconColor:n,tone:a=`info`,kicker:o,body:s,points:c,collapsed:d=!1,footer:f,delay:p}){let[m,h]=(0,l.useState)(!d),g=se[a],_=r[t??ce[a]]||r.spark;return(0,u.jsxs)(`div`,{className:`card reveal lay-callout`,style:{"--delay":(p||0)+`ms`,"--lc":g},children:[(0,u.jsxs)(`div`,{className:`card-eyebrow`,children:[(0,u.jsx)(_,{className:`ic`,style:{color:n||g}}),` `,e]}),(0,u.jsxs)(`button`,{className:`lay-co-band`,type:`button`,onClick:()=>h(e=>!e),"aria-expanded":m,children:[(0,u.jsx)(`span`,{className:`lay-co-bar`}),(0,u.jsx)(_,{className:`ic lay-co-kic-ic`,style:{color:g}}),(0,u.jsx)(`span`,{className:`lay-co-kicker`,children:o||a}),(0,u.jsx)(r.chevR,{className:`ic lay-chev`,style:{transform:m?`rotate(90deg)`:`none`}})]}),(0,u.jsx)(`div`,{className:`lay-co-body ${m?`open`:``}`,children:(0,u.jsxs)(`div`,{className:`lay-co-inner`,children:[(0,u.jsx)(`div`,{className:`lay-co-text`,dangerouslySetInnerHTML:i(s)}),c&&c.length>0&&(0,u.jsx)(`ul`,{className:`lay-co-points`,children:c.map((e,t)=>(0,u.jsxs)(`li`,{children:[(0,u.jsx)(r.chevR,{className:`ic lay-co-pt-ic`,style:{color:g}}),(0,u.jsx)(`span`,{dangerouslySetInnerHTML:i(e)})]},t))})]})}),f&&(0,u.jsx)(`div`,{className:`insight-summary`,style:{marginTop:12},dangerouslySetInnerHTML:i(f)})]})}var A={yes:{color:`var(--insight)`,label:`Yes`,icon:`check`},no:{color:`var(--danger)`,label:`No`,icon:`x`},maybe:{color:`var(--warning)`,label:`Maybe`,icon:`alert`},caution:{color:`var(--warning)`,label:`Be careful`,icon:`alert`}},ue={high:`High confidence`,medium:`Medium confidence`,low:`Low confidence`},de={high:3,medium:2,low:1};function fe({title:e,icon:t,iconColor:n,verdict:a,stance:o=`maybe`,label:s,reason:c,caveat:l,confidence:d,footer:f,delay:p}){let m=A[o]??A.maybe,h=r[t??m.icon]||r.spark,g=r[m.icon]||r.check;return(0,u.jsxs)(`div`,{className:`card reveal lay-verdict`,style:{"--delay":(p||0)+`ms`,"--vc":m.color},children:[(0,u.jsxs)(`div`,{className:`card-eyebrow`,children:[(0,u.jsx)(h,{className:`ic`,style:{color:n||m.color}}),` `,e]}),(0,u.jsxs)(`div`,{className:`lay-vd-head`,children:[(0,u.jsxs)(`span`,{className:`lay-vd-badge`,children:[(0,u.jsx)(g,{className:`ic lay-vd-badge-ic`}),s||m.label]}),d&&(0,u.jsxs)(`span`,{className:`lay-vd-conf`,children:[(0,u.jsx)(`span`,{className:`lay-vd-dots`,"aria-hidden":`true`,children:[0,1,2].map(e=>(0,u.jsx)(`span`,{className:`lay-vd-dot ${e<de[d]?`on`:``}`},e))}),ue[d]]})]}),(0,u.jsx)(`div`,{className:`lay-vd-verdict`,dangerouslySetInnerHTML:i(a)}),c&&(0,u.jsxs)(`div`,{className:`lay-vd-reason`,children:[(0,u.jsx)(`span`,{className:`lay-vd-tag`,children:`Why`}),(0,u.jsx)(`span`,{dangerouslySetInnerHTML:i(c)})]}),l&&(0,u.jsxs)(`div`,{className:`lay-vd-caveat`,children:[(0,u.jsx)(r.alert,{className:`ic lay-vd-caveat-ic`}),(0,u.jsx)(`span`,{dangerouslySetInnerHTML:i(l)})]}),f&&(0,u.jsx)(`div`,{className:`insight-summary`,style:{marginTop:12},dangerouslySetInnerHTML:i(f)})]})}var pe={best:{color:`var(--insight)`,label:`Best case`},likely:{color:`var(--presence)`,label:`Likely`},worst:{color:`var(--danger)`,label:`Worst case`}};function me({title:e,icon:t=`chart`,iconColor:n=`var(--presence)`,metric:a,scenarios:o,highlight:s,footer:c,delay:l}){let d=r[t]||r.chart,f=s??o.findIndex(e=>e.kind===`likely`);return(0,u.jsxs)(`div`,{className:`card reveal lay-scenarios`,style:{"--delay":(l||0)+`ms`},children:[(0,u.jsxs)(`div`,{className:`card-eyebrow`,children:[(0,u.jsx)(d,{className:`ic`,style:{color:n}}),` `,e]}),a&&(0,u.jsx)(`div`,{className:`lay-sc-metric faint`,children:a}),(0,u.jsx)(`div`,{className:`lay-sc-grid`,children:o.map((e,t)=>{let n=(e.kind?pe[e.kind]:void 0)??{color:`var(--text-muted)`,label:e.label||`Scenario`};return(0,u.jsxs)(`div`,{className:`lay-sc-panel ${t===f?`hi`:``}`,style:{"--sc":n.color},children:[(0,u.jsx)(`span`,{className:`lay-sc-bar`}),(0,u.jsx)(`span`,{className:`lay-sc-label`,children:e.label||n.label}),(0,u.jsx)(`span`,{className:`lay-sc-value`,children:e.value}),e.detail&&(0,u.jsx)(`span`,{className:`lay-sc-detail faint`,dangerouslySetInnerHTML:i(e.detail)}),e.points&&e.points.length>0&&(0,u.jsx)(`ul`,{className:`lay-sc-points`,children:e.points.map((e,t)=>(0,u.jsxs)(`li`,{children:[(0,u.jsx)(`span`,{className:`lay-sc-pt-dot`}),(0,u.jsx)(`span`,{dangerouslySetInnerHTML:i(e)})]},t))})]},t)})}),c&&(0,u.jsx)(`div`,{className:`insight-summary`,style:{marginTop:12},dangerouslySetInnerHTML:i(c)})]})}function he({title:e,icon:t=`layers`,iconColor:n=`var(--presence)`,sections:a,defaultOpen:o=0,multi:s=!1,footer:c,delay:d}){let f=r[t]||r.layers,[p,m]=(0,l.useState)(()=>o>=0?new Set([o]):new Set),h=e=>m(t=>{let n=new Set(s?t:[]);return t.has(e)?n.delete(e):n.add(e),n});return(0,u.jsxs)(`div`,{className:`card reveal`,style:{"--delay":(d||0)+`ms`},children:[(0,u.jsxs)(`div`,{className:`card-eyebrow`,children:[(0,u.jsx)(f,{className:`ic`,style:{color:n}}),` `,e]}),(0,u.jsx)(`div`,{className:`lay-acc-list`,children:a.map((e,t)=>{let a=p.has(t),o=e.icon?r[e.icon]:null;return(0,u.jsxs)(`div`,{className:`lay-acc-item ${a?`open`:``}`,children:[(0,u.jsxs)(`button`,{type:`button`,className:`lay-acc-head`,onClick:()=>h(t),"aria-expanded":a,children:[o&&(0,u.jsx)(o,{className:`ic lay-acc-lead`,style:{color:e.tagColor||n}}),(0,u.jsx)(`span`,{className:`lay-acc-label`,children:e.label}),e.tag&&(0,u.jsx)(`span`,{className:`lay-acc-tag`,style:e.tagColor?{color:e.tagColor,borderColor:`currentColor`}:void 0,children:e.tag}),e.meta&&(0,u.jsx)(`span`,{className:`lay-acc-meta`,children:e.meta}),(0,u.jsx)(r.arrowDown,{className:`ic lay-acc-chev`,style:{transform:a?`rotate(180deg)`:`none`}})]}),(0,u.jsx)(`div`,{className:`lay-acc-body ${a?`open`:``}`,children:(0,u.jsx)(`div`,{className:`lay-acc-body-inner`,dangerouslySetInnerHTML:i(e.body)})})]},t)})}),c&&(0,u.jsx)(`div`,{className:`insight-summary`,style:{marginTop:12},dangerouslySetInnerHTML:i(c)})]})}function j({side:e,label:t,items:n,accent:a,hover:o,setHover:s}){let c=e===`pro`?r.check:r.x;return(0,u.jsxs)(`div`,{className:`lay-pc-col`,style:{"--pc":a},children:[(0,u.jsxs)(`div`,{className:`lay-pc-head`,children:[(0,u.jsx)(c,{className:`ic`,style:{color:a}}),(0,u.jsx)(`span`,{children:t}),(0,u.jsx)(`span`,{className:`lay-pc-count tab-num`,children:n.length})]}),(0,u.jsx)(`ul`,{className:`lay-pc-list`,children:n.map((t,n)=>{let r=o?.side===e&&o.i===n,l=Math.max(1,Math.min(5,t.weight??3));return(0,u.jsxs)(`li`,{className:`lay-pc-item ${r?`on`:``}`,onMouseEnter:()=>s({side:e,i:n}),onMouseLeave:()=>s(null),children:[(0,u.jsx)(c,{className:`ic lay-pc-mark`,style:{color:a}}),(0,u.jsxs)(`div`,{className:`lay-pc-body`,children:[(0,u.jsx)(`span`,{className:`lay-pc-text`,dangerouslySetInnerHTML:i(t.text)}),(0,u.jsx)(`span`,{className:`lay-pc-pips`,"aria-label":`weight ${l} of 5`,children:[0,1,2,3,4].map(e=>(0,u.jsx)(`span`,{className:`lay-pc-pip ${e<l?`fill`:``}`,style:{background:e<l?a:void 0}},e))}),t.note&&r&&(0,u.jsx)(`span`,{className:`lay-pc-note faint`,dangerouslySetInnerHTML:i(t.note)})]})]},n)})})]})}function ge({title:e,icon:t=`layers`,iconColor:n=`var(--presence)`,prosLabel:a=`Pros`,consLabel:o=`Cons`,pros:s,cons:c,verdict:d,footer:f,delay:p}){let m=r[t]||r.layers,[h,g]=(0,l.useState)(null),_=s.reduce((e,t)=>e+(t.weight??3),0),v=c.reduce((e,t)=>e+(t.weight??3),0),y=_/(_+v||1)*100;return(0,u.jsxs)(`div`,{className:`card reveal`,style:{"--delay":(p||0)+`ms`},children:[(0,u.jsxs)(`div`,{className:`card-eyebrow`,children:[(0,u.jsx)(m,{className:`ic`,style:{color:n}}),` `,e]}),(0,u.jsxs)(`div`,{className:`lay-pc-grid`,children:[(0,u.jsx)(j,{side:`pro`,label:a,items:s,accent:`var(--insight)`,hover:h,setHover:g}),(0,u.jsx)(`div`,{className:`lay-pc-divider`}),(0,u.jsx)(j,{side:`con`,label:o,items:c,accent:`var(--danger)`,hover:h,setHover:g})]}),(0,u.jsxs)(`div`,{className:`lay-pc-verdict`,children:[(0,u.jsxs)(`div`,{className:`lay-pc-vbar`,children:[(0,u.jsx)(`span`,{className:`lay-pc-vbar-l`,style:{width:y+`%`}}),(0,u.jsx)(`span`,{className:`lay-pc-vbar-r`,style:{width:100-y+`%`}})]}),(0,u.jsxs)(`div`,{className:`lay-pc-vrow`,children:[(0,u.jsxs)(`span`,{className:`lay-pc-vlabel`,style:{color:`var(--insight)`},children:[(0,u.jsx)(`span`,{className:`tab-num`,children:_}),` for`]}),d?(0,u.jsx)(`span`,{className:`lay-pc-vtext`,dangerouslySetInnerHTML:i(d)}):(0,u.jsx)(`span`,{className:`lay-pc-vtext faint`,children:y>=50?`Leans for`:`Leans against`}),(0,u.jsxs)(`span`,{className:`lay-pc-vlabel`,style:{color:`var(--danger)`},children:[(0,u.jsx)(`span`,{className:`tab-num`,children:v}),` against`]})]})]}),f&&(0,u.jsx)(`div`,{className:`insight-summary`,style:{marginTop:12},dangerouslySetInnerHTML:i(f)})]})}function _e({title:e,icon:t=`spark`,iconColor:n=`var(--presence)`,heading:a,items:o,footer:s,delay:c}){let d=r[t]||r.spark,[f,p]=(0,l.useState)(new Set),m=e=>p(t=>{let n=new Set(t);return n.has(e)?n.delete(e):n.add(e),n}),h=o.length?Math.round(f.size/o.length*100):0;return(0,u.jsxs)(`div`,{className:`card reveal lay-ta`,style:{"--delay":(c||0)+`ms`},children:[(0,u.jsxs)(`div`,{className:`card-eyebrow`,children:[(0,u.jsx)(d,{className:`ic`,style:{color:n}}),` `,e]}),a&&(0,u.jsx)(`div`,{className:`lay-ta-heading`,children:a}),(0,u.jsx)(`ol`,{className:`lay-ta-list`,children:o.map((e,t)=>{let n=e.color||`var(--presence)`,a=f.has(t);return(0,u.jsxs)(`li`,{className:`lay-ta-item ${a?`done`:``}`,children:[(0,u.jsx)(`button`,{type:`button`,className:`lay-ta-num`,style:{"--tc":n},onClick:()=>m(t),"aria-pressed":a,children:a?(0,u.jsx)(r.check,{className:`ic`}):(0,u.jsx)(`span`,{className:`tab-num`,children:t+1})}),(0,u.jsxs)(`div`,{className:`lay-ta-body`,children:[(0,u.jsx)(`span`,{className:`lay-ta-text`,dangerouslySetInnerHTML:i(e.text)}),e.detail&&(0,u.jsx)(`span`,{className:`lay-ta-detail faint`,dangerouslySetInnerHTML:i(e.detail)})]})]},t)})}),(0,u.jsxs)(`div`,{className:`lay-ta-foot`,children:[(0,u.jsx)(`div`,{className:`lay-ta-track`,children:(0,u.jsx)(`span`,{className:`lay-ta-fill`,style:{width:h+`%`}})}),(0,u.jsxs)(`span`,{className:`lay-ta-pct tab-num faint`,children:[f.size,`/`,o.length]})]}),s&&(0,u.jsx)(`div`,{className:`insight-summary`,style:{marginTop:12},dangerouslySetInnerHTML:i(s)})]})}function ve({title:e,icon:t=`chat`,iconColor:n=`var(--presence)`,items:a,defaultOpen:o=0,multi:s=!1,footer:c,delay:d}){let f=r[t]||r.chat,[p,m]=(0,l.useState)(()=>o>=0?new Set([o]):new Set),h=e=>m(t=>{let n=new Set(s?t:[]);return t.has(e)?n.delete(e):n.add(e),n});return(0,u.jsxs)(`div`,{className:`card reveal`,style:{"--delay":(d||0)+`ms`},children:[(0,u.jsxs)(`div`,{className:`card-eyebrow`,children:[(0,u.jsx)(f,{className:`ic`,style:{color:n}}),` `,e]}),(0,u.jsx)(`div`,{className:`lay-faq-list`,children:a.map((e,t)=>{let n=p.has(t);return(0,u.jsxs)(`div`,{className:`lay-faq-item ${n?`open`:``}`,children:[(0,u.jsxs)(`button`,{type:`button`,className:`lay-faq-q`,onClick:()=>h(t),"aria-expanded":n,children:[(0,u.jsx)(r.plus,{className:`ic lay-faq-sign`,style:{transform:n?`rotate(45deg)`:`none`}}),(0,u.jsx)(`span`,{className:`lay-faq-q-text`,dangerouslySetInnerHTML:i(e.q)}),e.tag&&(0,u.jsx)(`span`,{className:`lay-faq-tag`,children:e.tag})]}),(0,u.jsx)(`div`,{className:`lay-faq-a ${n?`open`:``}`,children:(0,u.jsx)(`div`,{className:`lay-faq-a-inner`,dangerouslySetInnerHTML:i(e.a)})})]},t)})}),c&&(0,u.jsx)(`div`,{className:`insight-summary`,style:{marginTop:12},dangerouslySetInnerHTML:i(c)})]})}function ye({title:e,icon:t=`layers`,iconColor:n=`var(--presence)`,tabs:a,defaultTab:o=0,accent:s=`var(--presence)`,footer:c,delay:d}){let f=r[t]||r.layers,[p,m]=(0,l.useState)(Math.max(0,Math.min(o,a.length-1))),h=a[p],g=(0,l.useRef)([]),_=(e,t)=>{let n;if(e.key===`ArrowRight`||e.key===`ArrowDown`)n=(t+1)%a.length;else if(e.key===`ArrowLeft`||e.key===`ArrowUp`)n=(t-1+a.length)%a.length;else if(e.key===`Home`)n=0;else if(e.key===`End`)n=a.length-1;else return;e.preventDefault(),m(n),g.current[n]?.focus()},v=Math.max(1,a.length);return(0,u.jsxs)(`div`,{className:`card reveal lay-tabs`,style:{"--delay":(d||0)+`ms`,"--tab-acc":s},children:[(0,u.jsxs)(`div`,{className:`card-eyebrow`,children:[(0,u.jsx)(f,{className:`ic`,style:{color:n}}),` `,e]}),(0,u.jsxs)(`div`,{className:`lay-tab-bar`,role:`tablist`,children:[a.map((e,t)=>{let n=e.icon?r[e.icon]:null;return(0,u.jsxs)(`button`,{ref:e=>{g.current[t]=e},role:`tab`,type:`button`,className:`lay-tab ${t===p?`on`:``}`,"aria-selected":t===p,tabIndex:t===p?0:-1,onClick:()=>m(t),onKeyDown:e=>_(e,t),children:[n&&(0,u.jsx)(n,{className:`ic lay-tab-ic`}),(0,u.jsx)(`span`,{children:e.label}),e.badge!=null&&(0,u.jsx)(`span`,{className:`lay-tab-badge tab-num`,children:e.badge})]},t)}),(0,u.jsx)(`span`,{className:`lay-tab-underline`,style:{width:`${100/v}%`,transform:`translateX(${p*100}%)`}})]}),(0,u.jsx)(`div`,{className:`lay-tab-panel`,role:`tabpanel`,children:h&&(0,u.jsx)(`div`,{className:`lay-tab-body`,dangerouslySetInnerHTML:i(h.body)})},p),c&&(0,u.jsx)(`div`,{className:`insight-summary`,style:{marginTop:12},dangerouslySetInnerHTML:i(c)})]})}function M({title:e,icon:t=`layers`,iconColor:n=`var(--presence)`,eyebrow:a,heading:o,sub:s,badge:c,badgeColor:d=`var(--presence)`,chips:f,footer:p,delay:m}){let h=r[t]||r.layers,[g,_]=(0,l.useState)(0);return(0,u.jsxs)(`div`,{className:`card reveal lay-div`,style:{"--delay":(m||0)+`ms`},children:[(0,u.jsxs)(`div`,{className:`card-eyebrow`,children:[(0,u.jsx)(h,{className:`ic`,style:{color:n}}),` `,e]}),(0,u.jsxs)(`div`,{className:`lay-div-main`,children:[(0,u.jsxs)(`div`,{className:`lay-div-head`,children:[a&&(0,u.jsx)(`div`,{className:`lay-div-eyebrow`,children:a}),(0,u.jsx)(`div`,{className:`lay-div-heading`,children:o})]}),c&&(0,u.jsx)(`span`,{className:`lay-div-badge tab-num`,style:{"--bc":d},children:c})]}),(0,u.jsxs)(`div`,{className:`lay-div-rule`,children:[(0,u.jsx)(`span`,{className:`lay-div-rule-line`}),(0,u.jsx)(`span`,{className:`lay-div-rule-dot`,style:{background:d}}),(0,u.jsx)(`span`,{className:`lay-div-rule-line`})]}),s&&(0,u.jsx)(`div`,{className:`lay-div-sub`,dangerouslySetInnerHTML:i(s)}),f&&f.length>0&&(0,u.jsx)(`div`,{className:`lay-div-chips`,children:f.map((e,t)=>{let n=e.color||`var(--presence)`;return(0,u.jsx)(`button`,{type:`button`,className:`lay-div-chip ${t===g?`on`:``}`,style:{"--cc":n},onClick:()=>_(t),children:e.label},t)})}),p&&(0,u.jsx)(`div`,{className:`insight-summary`,style:{marginTop:12},dangerouslySetInnerHTML:i(p)})]})}var N={info:`var(--presence)`,success:`var(--insight)`,warn:`var(--warning)`,danger:`var(--danger)`,neutral:`var(--text-muted)`};function P({title:e,icon:t=`quote`,iconColor:n,quote:a,author:o,role:s,tone:c=`info`,variants:d,footer:f,delay:p}){let m=r[t]||r.quote,h=N[c],g=[{quote:a,author:o,role:s},...d||[]],[_,v]=(0,l.useState)(0),y=g[_];return(0,u.jsxs)(`div`,{className:`card reveal lay-pq`,style:{"--delay":(p||0)+`ms`,"--pq":h},children:[(0,u.jsxs)(`div`,{className:`card-eyebrow`,children:[(0,u.jsx)(m,{className:`ic`,style:{color:n||h}}),` `,e]}),(0,u.jsxs)(`figure`,{className:`lay-pq-fig`,children:[(0,u.jsx)(`span`,{className:`lay-pq-bar`}),(0,u.jsx)(r.quote,{className:`ic lay-pq-mark`,style:{color:h}}),(0,u.jsx)(`blockquote`,{className:`lay-pq-quote`,dangerouslySetInnerHTML:i(y.quote)},_),(y.author||y.role)&&(0,u.jsxs)(`figcaption`,{className:`lay-pq-cap`,children:[y.author&&(0,u.jsx)(`span`,{className:`lay-pq-author`,children:y.author}),y.role&&(0,u.jsx)(`span`,{className:`lay-pq-role faint`,children:y.role})]})]}),g.length>1&&(0,u.jsxs)(`div`,{className:`lay-pq-nav`,children:[(0,u.jsx)(`button`,{type:`button`,className:`lay-pq-arrow mini-btn`,onClick:()=>v(e=>(e-1+g.length)%g.length),"aria-label":`previous quote`,children:(0,u.jsx)(r.chevR,{className:`ic`,style:{transform:`rotate(180deg)`}})}),(0,u.jsx)(`span`,{className:`lay-pq-dots`,children:g.map((e,t)=>(0,u.jsx)(`button`,{type:`button`,className:`lay-pq-dot ${t===_?`on`:``}`,onClick:()=>v(t),"aria-label":`quote ${t+1}`},t))}),(0,u.jsx)(`button`,{type:`button`,className:`lay-pq-arrow mini-btn`,onClick:()=>v(e=>(e+1)%g.length),"aria-label":`next quote`,children:(0,u.jsx)(r.chevR,{className:`ic`})})]}),f&&(0,u.jsx)(`div`,{className:`insight-summary`,style:{marginTop:12},dangerouslySetInnerHTML:i(f)})]})}function be({title:e,icon:t=`slides`,iconColor:n=`var(--presence)`,panels:a,start:o=0,footer:s,delay:c}){let d=r[t]||r.slides,f=Math.max(0,a.length-1),[p,m]=(0,l.useState)(Math.max(0,Math.min(o,f))),h=a[p],g=h?.color||`var(--presence)`,_=h?.icon?r[h.icon]:r.spark,v=Math.max(1,a.length),y=e=>m(t=>Math.max(0,Math.min(f,t+e)));return(0,u.jsxs)(`div`,{className:`card reveal lay-story`,style:{"--delay":(c||0)+`ms`,"--sc":g},children:[(0,u.jsxs)(`div`,{className:`card-eyebrow`,children:[(0,u.jsx)(d,{className:`ic`,style:{color:n}}),` `,e]}),(0,u.jsx)(`div`,{className:`lay-story-stage`,children:(0,u.jsxs)(`div`,{className:`lay-story-panel`,children:[(0,u.jsx)(`div`,{className:`lay-story-badge`,style:{background:g},children:(0,u.jsx)(_,{className:`ic`})}),(0,u.jsxs)(`div`,{className:`lay-story-num tab-num`,children:[p+1,(0,u.jsxs)(`span`,{className:`lay-story-of`,children:[`/ `,v]})]}),(0,u.jsx)(`div`,{className:`lay-story-heading`,children:h?.heading}),h?.caption&&(0,u.jsx)(`div`,{className:`lay-story-caption faint`,children:h.caption}),(0,u.jsx)(`div`,{className:`lay-story-body`,dangerouslySetInnerHTML:i(h?.body||``)})]})},p),(0,u.jsx)(`div`,{className:`lay-story-track`,children:a.map((e,t)=>(0,u.jsx)(`button`,{type:`button`,className:`lay-story-tick ${t===p?`on`:``} ${t<p?`past`:``}`,style:{"--tk":e.color||`var(--presence)`},onClick:()=>m(t),"aria-label":`panel ${t+1}`},t))}),(0,u.jsxs)(`div`,{className:`lay-story-nav`,children:[(0,u.jsxs)(`button`,{type:`button`,className:`mini-btn`,onClick:()=>y(-1),disabled:p===0,children:[(0,u.jsx)(r.chevR,{className:`ic`,style:{transform:`rotate(180deg)`}}),` Back`]}),(0,u.jsxs)(`span`,{className:`lay-story-pos faint tab-num`,children:[p+1,` of `,v]}),(0,u.jsxs)(`button`,{type:`button`,className:`mini-btn accent`,onClick:()=>y(1),disabled:p===f,children:[`Next `,(0,u.jsx)(r.chevR,{className:`ic`})]})]}),s&&(0,u.jsx)(`div`,{className:`insight-summary`,style:{marginTop:12},dangerouslySetInnerHTML:i(s)})]})}var F=[{key:`setup`,label:`Setup`,icon:`doc`,color:`var(--text-muted)`},{key:`action`,label:`Action`,icon:`play`,color:`var(--presence)`},{key:`result`,label:`Result`,icon:`chart`,color:`var(--insight)`},{key:`lesson`,label:`Lesson`,icon:`spark`,color:`var(--warning)`}];function xe({title:e,icon:t=`proof`,iconColor:n=`var(--presence)`,subject:a,setup:o,action:s,result:c,lesson:d,defaultStage:f=`result`,footer:p,delay:m}){let h=r[t]||r.proof,g={setup:o,action:s,result:c,lesson:d},[_,v]=(0,l.useState)(f);return(0,u.jsxs)(`div`,{className:`card reveal lay-cs`,style:{"--delay":(m||0)+`ms`},children:[(0,u.jsxs)(`div`,{className:`card-eyebrow`,children:[(0,u.jsx)(h,{className:`ic`,style:{color:n}}),` `,e]}),(0,u.jsx)(`div`,{className:`lay-cs-subject`,children:a}),(0,u.jsx)(`div`,{className:`lay-cs-stages`,children:F.map((e,t)=>{let n=g[e.key],a=r[e.icon],o=_===e.key;return(0,u.jsxs)(`div`,{className:`lay-cs-stage ${o?`open`:``}`,style:{"--st":e.color},children:[(0,u.jsxs)(`button`,{type:`button`,className:`lay-cs-head`,onClick:()=>v(e.key),"aria-expanded":o,children:[(0,u.jsxs)(`span`,{className:`lay-cs-rail`,children:[(0,u.jsx)(`span`,{className:`lay-cs-node`,children:(0,u.jsx)(a,{className:`ic`})}),t<F.length-1&&(0,u.jsx)(`span`,{className:`lay-cs-line`})]}),(0,u.jsx)(`span`,{className:`lay-cs-label`,children:e.label}),n.metric&&(0,u.jsx)(`span`,{className:`lay-cs-metric tab-num`,children:n.metric}),(0,u.jsx)(r.chevR,{className:`ic lay-chev`,style:{transform:o?`rotate(90deg)`:`none`}})]}),(0,u.jsx)(`div`,{className:`lay-cs-body ${o?`open`:``}`,children:(0,u.jsx)(`div`,{className:`lay-cs-body-inner`,dangerouslySetInnerHTML:i(n.body)})})]},e.key)})}),p&&(0,u.jsx)(`div`,{className:`insight-summary`,style:{marginTop:12},dangerouslySetInnerHTML:i(p)})]})}function Se(e){return e.replace(/<[^>]*>/g,``)}function Ce({title:e,icon:t=`doc`,iconColor:n=`var(--presence)`,placeholder:a=`Filter terms…`,items:o,footer:s,delay:c}){let d=r[t]||r.doc,[f,p]=(0,l.useState)(``),m=(0,l.useMemo)(()=>{let e=f.trim().toLowerCase();return e?o.map((e,t)=>({it:e,i:t})).filter(({it:t})=>(t.term+` `+Se(t.def)+` `+(t.tag||``)).toLowerCase().includes(e)):o.map((e,t)=>({it:e,i:t}))},[f,o]);return(0,u.jsxs)(`div`,{className:`card reveal lay-dl`,style:{"--delay":(c||0)+`ms`},children:[(0,u.jsxs)(`div`,{className:`card-eyebrow`,children:[(0,u.jsx)(d,{className:`ic`,style:{color:n}}),` `,e]}),(0,u.jsxs)(`label`,{className:`lay-dl-search`,children:[(0,u.jsx)(r.eye,{className:`ic lay-dl-search-ic`}),(0,u.jsx)(`input`,{className:`lay-dl-input`,type:`text`,value:f,placeholder:a,onChange:e=>p(e.target.value)}),f&&(0,u.jsx)(`button`,{type:`button`,className:`lay-dl-clear`,onClick:()=>p(``),"aria-label":`clear`,children:(0,u.jsx)(r.x,{className:`ic`})}),(0,u.jsx)(`span`,{className:`lay-dl-count tab-num faint`,children:m.length})]}),(0,u.jsxs)(`dl`,{className:`lay-dl-list`,children:[m.map(({it:e,i:t})=>(0,u.jsxs)(`div`,{className:`lay-dl-item`,children:[(0,u.jsxs)(`dt`,{className:`lay-dl-term`,children:[(0,u.jsx)(`span`,{className:`lay-dl-dot`,style:{background:e.color||`var(--presence)`}}),(0,u.jsx)(`span`,{className:`lay-dl-term-text`,children:e.term}),e.tag&&(0,u.jsx)(`span`,{className:`lay-dl-tag`,children:e.tag})]}),(0,u.jsx)(`dd`,{className:`lay-dl-def`,dangerouslySetInnerHTML:i(e.def)})]},t)),m.length===0&&(0,u.jsxs)(`div`,{className:`lay-dl-empty faint`,children:[(0,u.jsx)(r.eyeOff,{className:`ic`}),` No terms match “`,f,`”.`]})]}),s&&(0,u.jsx)(`div`,{className:`insight-summary`,style:{marginTop:12},dangerouslySetInnerHTML:i(s)})]})}var I={"worth-it":{color:`var(--insight)`,label:`Worth it`,icon:`check`},skip:{color:`var(--danger)`,label:`Skip it`,icon:`x`},depends:{color:`var(--warning)`,label:`Depends`,icon:`alert`}};function we({title:e,icon:t,iconColor:n,product:a,verdict:o,price:s,priceNote:c,worthItIf:l,skipIf:d,dealBreaker:f,forWho:p,bottomLine:m,footer:h,delay:g}){let _=I[o]??I.depends,v=r[t??`cart`]||r.cart,y=r[_.icon]||r.check,b=l??[],x=d??[];return(0,u.jsxs)(`div`,{className:`card reveal`,style:{"--delay":(g||0)+`ms`,"--wi":_.color},children:[(0,u.jsxs)(`div`,{className:`card-eyebrow`,children:[(0,u.jsx)(v,{className:`ic`,style:{color:n||_.color}}),` `,e]}),(0,u.jsxs)(`div`,{className:`wi-head`,children:[(0,u.jsxs)(`div`,{className:`wi-head-l`,children:[a&&(0,u.jsx)(`div`,{className:`wi-product`,children:a}),s&&(0,u.jsxs)(`div`,{className:`wi-price`,children:[(0,u.jsx)(`span`,{className:`wi-price-val`,children:s}),c&&(0,u.jsx)(`span`,{className:`wi-price-note`,children:c})]})]}),(0,u.jsxs)(`span`,{className:`wi-badge`,children:[(0,u.jsx)(y,{className:`ic wi-badge-ic`}),` `,_.label]})]}),(b.length>0||x.length>0)&&(0,u.jsxs)(`div`,{className:`wi-split`,children:[b.length>0&&(0,u.jsxs)(`div`,{className:`wi-col wi-col--yes`,children:[(0,u.jsx)(`div`,{className:`wi-col-h`,children:`Worth it if`}),(0,u.jsx)(`ul`,{className:`wi-list`,children:b.map((e,t)=>(0,u.jsxs)(`li`,{children:[(0,u.jsx)(r.check,{className:`ic wi-li-ic`}),(0,u.jsx)(`span`,{children:e})]},t))})]}),x.length>0&&(0,u.jsxs)(`div`,{className:`wi-col wi-col--no`,children:[(0,u.jsx)(`div`,{className:`wi-col-h`,children:`Skip if`}),(0,u.jsx)(`ul`,{className:`wi-list`,children:x.map((e,t)=>(0,u.jsxs)(`li`,{children:[(0,u.jsx)(r.x,{className:`ic wi-li-ic`}),(0,u.jsx)(`span`,{children:e})]},t))})]})]}),f&&(0,u.jsxs)(`div`,{className:`wi-dealbreaker`,children:[(0,u.jsx)(r.alert,{className:`ic`}),(0,u.jsxs)(`span`,{children:[(0,u.jsx)(`b`,{children:`Deal-breaker:`}),` `,f]})]}),(p||m)&&(0,u.jsxs)(`div`,{className:`wi-bottom`,children:[p&&(0,u.jsxs)(`div`,{className:`wi-forwho`,children:[(0,u.jsx)(`span`,{className:`wi-forwho-tag`,children:`For`}),` `,p]}),m&&(0,u.jsx)(`div`,{className:`wi-bottomline`,dangerouslySetInnerHTML:i(m)})]}),h&&(0,u.jsx)(`div`,{className:`insight-summary`,style:{marginTop:12},dangerouslySetInnerHTML:i(h)})]})}function Te({reflection:e,follow:t,chip:n,delay:r}){return(0,u.jsxs)(`div`,{className:`card reveal cn-card`,style:{"--delay":(r||0)+`ms`},children:[(0,u.jsx)(`p`,{className:`cn-reflection`,children:e}),t&&(0,u.jsx)(`p`,{className:`cn-follow`,children:t}),n&&(0,u.jsx)(`span`,{className:`cn-chip`,children:n})]})}var L={good:`var(--insight)`,caution:`var(--warning)`,bad:`var(--danger)`};function Ee({title:e,icon:t=`alert`,iconColor:n,levels:a,atLevel:o,marker:s,reason:c,watchFor:l,caveat:d,footer:f,delay:p}){let m=r[t]||r.alert,h=a??[],g=typeof o==`number`?Math.max(0,Math.min(h.length-1,o)):-1,_=g>=0?h[g]:void 0,v=_?.tone?L[_.tone]:`var(--presence)`,y=l??[];return(0,u.jsxs)(`div`,{className:`card reveal`,style:{"--delay":(p||0)+`ms`},children:[(0,u.jsxs)(`div`,{className:`card-eyebrow`,children:[(0,u.jsx)(m,{className:`ic`,style:{color:n||v}}),` `,e]}),(0,u.jsx)(`div`,{className:`pc-track`,children:h.map((e,t)=>(0,u.jsx)(`div`,{className:`pc-seg`+(t===g?` on`:``),style:{"--pc":e.tone?L[e.tone]:`var(--text-muted)`}},t))}),(0,u.jsx)(`div`,{className:`pc-labels`,children:h.map((e,t)=>(0,u.jsx)(`span`,{className:`pc-label`+(t===g?` on`:``),children:e.label},t))}),_&&(0,u.jsxs)(`div`,{className:`pc-current`,style:{"--pc":v},children:[(0,u.jsx)(`span`,{className:`pc-marker`,children:s||`Where this falls`}),(0,u.jsx)(`div`,{className:`pc-cur-label`,children:_.label}),_.detail&&(0,u.jsx)(`div`,{className:`pc-cur-detail`,children:_.detail})]}),c&&(0,u.jsx)(`div`,{className:`pc-reason`,children:c}),y.length>0&&(0,u.jsxs)(`div`,{className:`pc-watch`,children:[(0,u.jsxs)(`div`,{className:`pc-watch-h`,children:[(0,u.jsx)(r.alert,{className:`ic`}),` Get it checked if`]}),(0,u.jsx)(`ul`,{className:`pc-watch-list`,children:y.map((e,t)=>(0,u.jsx)(`li`,{children:e},t))})]}),d&&(0,u.jsx)(`div`,{className:`pc-caveat`,children:d}),f&&(0,u.jsx)(`div`,{className:`insight-summary`,style:{marginTop:12},dangerouslySetInnerHTML:i(f)})]})}var De={common:{label:`Common`,color:`var(--insight)`},"less-common":{label:`Less common`,color:`var(--warning)`},rare:{label:`Rare`,color:`var(--text-muted)`}};function Oe({title:e,icon:t=`eye`,iconColor:n=`var(--presence)`,causes:a,prompt:o,caveat:s,footer:c,delay:l}){let d=r[t]||r.eye,f=a??[];return(0,u.jsxs)(`div`,{className:`card reveal`,style:{"--delay":(l||0)+`ms`},children:[(0,u.jsxs)(`div`,{className:`card-eyebrow`,children:[(0,u.jsx)(d,{className:`ic`,style:{color:n}}),` `,e]}),(0,u.jsx)(`ol`,{className:`df-list`,children:f.map((e,t)=>{let n=e.likelihood?De[e.likelihood]:void 0;return(0,u.jsxs)(`li`,{className:`df-cause`,children:[(0,u.jsxs)(`div`,{className:`df-head`,children:[(0,u.jsx)(`span`,{className:`df-rank`,children:t+1}),(0,u.jsx)(`span`,{className:`df-name`,children:e.name}),n&&(0,u.jsx)(`span`,{className:`df-band`,style:{"--db":n.color},children:n.label}),e.serious&&(0,u.jsxs)(`span`,{className:`df-serious`,children:[(0,u.jsx)(r.alert,{className:`ic`}),` serious`]})]}),e.tell&&(0,u.jsxs)(`div`,{className:`df-tell`,children:[(0,u.jsx)(`span`,{className:`df-tag df-tag--fit`,children:`Fits if`}),` `,e.tell]}),e.pointsAway&&(0,u.jsxs)(`div`,{className:`df-away`,children:[(0,u.jsx)(`span`,{className:`df-tag`,children:`Points away`}),` `,e.pointsAway]})]},t)})}),o&&(0,u.jsxs)(`div`,{className:`df-prompt`,children:[(0,u.jsx)(r.check,{className:`ic`}),(0,u.jsx)(`span`,{children:o})]}),s&&(0,u.jsx)(`div`,{className:`df-caveat`,children:s}),c&&(0,u.jsx)(`div`,{className:`insight-summary`,style:{marginTop:12},dangerouslySetInnerHTML:i(c)})]})}function ke({title:e=`A gentler take`,icon:t=`spark`,iconColor:n=`var(--presence)`,thought:a,distortion:o,reframe:s,footer:c,delay:l}){let d=r[t]||r.spark;return(0,u.jsxs)(`div`,{className:`card reveal rf-card`,style:{"--delay":(l||0)+`ms`},children:[(0,u.jsxs)(`div`,{className:`card-eyebrow`,children:[(0,u.jsx)(d,{className:`ic`,style:{color:n}}),` `,e]}),(0,u.jsxs)(`div`,{className:`rf-thought`,children:[(0,u.jsx)(`div`,{className:`rf-tag`,children:`What you're telling yourself`}),(0,u.jsxs)(`p`,{className:`rf-quote`,children:[(0,u.jsx)(r.quote,{className:`ic rf-quote-ic`,style:{width:14,height:14}}),(0,u.jsx)(`span`,{dangerouslySetInnerHTML:i(a)})]}),o&&(0,u.jsx)(`span`,{className:`rf-distortion`,children:o})]}),(0,u.jsxs)(`div`,{className:`rf-shift`,"aria-hidden":`true`,children:[(0,u.jsx)(`span`,{className:`rf-shift-line`}),(0,u.jsx)(r.spark,{className:`ic rf-shift-ic`,style:{width:13,height:13}}),(0,u.jsx)(`span`,{className:`rf-shift-line`})]}),(0,u.jsxs)(`div`,{className:`rf-reframe`,children:[(0,u.jsx)(`div`,{className:`rf-tag rf-tag--true`,children:`What's also true`}),(0,u.jsx)(`p`,{className:`rf-counter`,dangerouslySetInnerHTML:i(s)})]}),c&&(0,u.jsx)(`div`,{className:`insight-summary`,style:{marginTop:12},dangerouslySetInnerHTML:i(c)})]})}var R={478:{inhale:4,hold:7,exhale:8},box:{inhale:4,hold:4,exhale:4},calm:{inhale:4,hold:0,exhale:6}};function Ae({title:e=`Breathe with me`,icon:t=`wind`,iconColor:n=`var(--presence)`,pattern:i=`calm`,inhale:a,hold:o,exhale:s,note:c,delay:l}){let d=r[t]||r.wind,f=R[i]??R.calm,p=z(a??f.inhale,2,12),m=z(o??f.hold,0,12),h=z(s??f.exhale,2,14),g=p+m+h,_=m>0,v=p/g,y=(p+m)/g;return(0,u.jsxs)(`div`,{className:`card reveal bp-card`,style:{"--delay":(l||0)+`ms`,"--bp-cycle":g+`s`,"--bp-in-end":B(v),"--bp-hold-end":B(y),"--bp-accent":n},children:[(0,u.jsxs)(`div`,{className:`card-eyebrow`,children:[(0,u.jsx)(d,{className:`ic`,style:{color:n}}),` `,e]}),(0,u.jsxs)(`div`,{className:`bp-stage`,role:`img`,"aria-label":`Breathing pacer: ${je(p,m,h)}`,children:[(0,u.jsx)(`div`,{className:`bp-ring`,"aria-hidden":`true`,children:(0,u.jsx)(`span`,{className:`bp-orb`})}),(0,u.jsxs)(`div`,{className:`bp-caption`,"aria-hidden":`true`,children:[(0,u.jsxs)(`span`,{className:`bp-phase bp-phase--in`,children:[`Breathe in`,(0,u.jsxs)(`span`,{className:`bp-secs`,children:[p,`s`]})]}),_&&(0,u.jsxs)(`span`,{className:`bp-phase bp-phase--hold`,children:[`Hold`,(0,u.jsxs)(`span`,{className:`bp-secs`,children:[m,`s`]})]}),(0,u.jsxs)(`span`,{className:`bp-phase bp-phase--out`,children:[`Breathe out`,(0,u.jsxs)(`span`,{className:`bp-secs`,children:[h,`s`]})]})]})]}),(0,u.jsx)(`p`,{className:`bp-still`,children:Me(p,m,h)}),c&&(0,u.jsx)(`div`,{className:`bp-note`,children:c})]})}function z(e,t,n){return Number.isFinite(e)?Math.min(n,Math.max(t,e)):t}function B(e){return(e*100).toFixed(2)+`%`}function je(e,t,n){return t>0?`in ${e} seconds, hold ${t}, out ${n}`:`in ${e} seconds, out ${n}`}function Me(e,t,n){return t>0?`In through your nose for ${e}, hold for ${t}, out slowly for ${n}. Repeat a few times at your own pace.`:`In through your nose for ${e}, then out slowly for ${n}. Repeat a few times at your own pace.`}var Ne={low:{label:`Easy`,color:`var(--insight)`},medium:{label:`Some effort`,color:`var(--presence)`},high:{label:`A reach`,color:`var(--warning)`}};function Pe({title:e=`Things you could try`,icon:t=`spark`,iconColor:n=`var(--presence)`,intro:a=`Pick whatever feels possible — you don't have to do all of them.`,options:o,footer:s,delay:c}){let l=r[t]||r.spark,d=o??[];return(0,u.jsxs)(`div`,{className:`card reveal cpm-card`,style:{"--delay":(c||0)+`ms`},children:[(0,u.jsxs)(`div`,{className:`card-eyebrow`,children:[(0,u.jsx)(l,{className:`ic`,style:{color:n}}),` `,e]}),a&&(0,u.jsx)(`p`,{className:`cpm-intro`,children:a}),(0,u.jsx)(`ul`,{className:`cpm-list`,children:d.map((e,t)=>{let n=e.effort?Ne[e.effort]:void 0,i=e.icon?r[e.icon]:void 0;return(0,u.jsxs)(`li`,{className:`cpm-opt`,children:[(0,u.jsx)(`span`,{className:`cpm-opt-mark`,"aria-hidden":`true`,children:i?(0,u.jsx)(i,{className:`ic cpm-opt-ic`,style:{width:15,height:15}}):(0,u.jsx)(`span`,{className:`cpm-dot`})}),(0,u.jsxs)(`div`,{className:`cpm-opt-body`,children:[(0,u.jsxs)(`div`,{className:`cpm-opt-head`,children:[(0,u.jsx)(`span`,{className:`cpm-opt-label`,children:e.label}),e.time&&(0,u.jsxs)(`span`,{className:`cpm-tag cpm-tag--time`,children:[(0,u.jsx)(r.clock,{className:`ic cpm-tag-ic`,style:{width:11,height:11}}),e.time]}),n&&(0,u.jsx)(`span`,{className:`cpm-tag cpm-tag--effort`,style:{"--cm":n.color},children:n.label})]}),e.detail&&(0,u.jsx)(`p`,{className:`cpm-opt-detail`,children:e.detail})]})]},t)})}),s&&(0,u.jsx)(`div`,{className:`insight-summary`,style:{marginTop:12},dangerouslySetInnerHTML:i(s)})]})}var Fe={"most likely":{label:`Most likely`,color:`var(--insight)`},possible:{label:`Possible`,color:`var(--warning)`},"less likely":{label:`Less likely`,color:`var(--text-muted)`}};function Ie({title:e,icon:t,iconColor:n,flavor:a=`tone`,message:o,readings:s,cantKnow:c,reply:l,footer:d,delay:f}){let p=a===`caution`,m=r[t??(p?`shield`:`chat`)]||r.chat,h=n||(p?`var(--warning)`:`var(--presence)`),g=s??[];return(0,u.jsxs)(`div`,{className:`card reveal sbd-card`,style:{"--delay":(f||0)+`ms`,"--sd":h},children:[(0,u.jsxs)(`div`,{className:`card-eyebrow`,children:[(0,u.jsx)(m,{className:`ic`,style:{color:h}}),` `,e]}),(0,u.jsxs)(`figure`,{className:`sbd-msg`,children:[(0,u.jsx)(`span`,{className:`sbd-msg-bar`}),(0,u.jsx)(r.quote,{className:`ic sbd-msg-mark`,style:{width:22,height:22}}),(0,u.jsx)(`blockquote`,{className:`sbd-msg-text`,children:o})]}),g.length>0&&(0,u.jsx)(`ol`,{className:`sbd-readings`,children:g.map((e,t)=>{let n=e.likelihood?Fe[e.likelihood]:void 0;return(0,u.jsxs)(`li`,{className:`sbd-reading`,children:[(0,u.jsxs)(`div`,{className:`sbd-reading-head`,children:[(0,u.jsx)(`span`,{className:`sbd-rank`,children:t+1}),(0,u.jsx)(`span`,{className:`sbd-interp`,children:e.interpretation}),n&&(0,u.jsx)(`span`,{className:`sbd-band`,style:{"--sb":n.color},children:n.label})]}),e.cue&&(0,u.jsxs)(`div`,{className:`sbd-cue`,children:[(0,u.jsx)(`span`,{className:`sbd-cue-tag`,children:p?`Red flag`:`Rests on`}),(0,u.jsx)(`span`,{children:e.cue})]})]},t)})}),c&&(0,u.jsxs)(`div`,{className:`sbd-cantknow`,children:[(0,u.jsx)(r.eye,{className:`ic`,style:{width:14,height:14}}),(0,u.jsx)(`span`,{children:c})]}),l&&(0,u.jsxs)(`div`,{className:`sbd-reply`,children:[(0,u.jsxs)(`div`,{className:`sbd-reply-tag`,children:[(0,u.jsx)(r.send,{className:`ic`,style:{width:13,height:13}}),p?`If you respond`:`You could ask`]}),(0,u.jsx)(`p`,{className:`sbd-reply-text`,children:l})]}),d&&(0,u.jsx)(`div`,{className:`insight-summary`,style:{marginTop:12},dangerouslySetInnerHTML:i(d)})]})}function V({title:e,icon:t=`chat`,iconColor:n=`var(--presence)`,opener:a,branches:o,exit:s,footer:c,delay:l}){let d=r[t]||r.chat,f=o??[];return(0,u.jsxs)(`div`,{className:`card reveal rh-card`,style:{"--delay":(l||0)+`ms`},children:[(0,u.jsxs)(`div`,{className:`card-eyebrow`,children:[(0,u.jsx)(d,{className:`ic`,style:{color:n}}),` `,e]}),(0,u.jsxs)(`div`,{className:`rh-opener`,children:[(0,u.jsx)(`span`,{className:`rh-open-tag`,children:`Open with`}),(0,u.jsx)(`p`,{className:`rh-open-line`,dangerouslySetInnerHTML:i(a)})]}),f.length>0&&(0,u.jsx)(`ol`,{className:`rh-branches`,children:f.map((e,t)=>(0,u.jsxs)(`li`,{className:`rh-branch`,children:[(0,u.jsxs)(`div`,{className:`rh-reaction`,children:[(0,u.jsx)(r.undo,{className:`ic rh-reaction-ic`,style:{width:13,height:13}}),(0,u.jsx)(`span`,{className:`rh-if`,children:`If they`}),` `,(0,u.jsx)(`span`,{dangerouslySetInnerHTML:i(e.reaction)})]}),(0,u.jsxs)(`div`,{className:`rh-say`,children:[(0,u.jsx)(`span`,{className:`rh-say-tag`,children:`Say`}),(0,u.jsx)(`span`,{className:`rh-say-line`,dangerouslySetInnerHTML:i(e.say)})]}),e.why&&(0,u.jsxs)(`div`,{className:`rh-why`,children:[(0,u.jsx)(r.spark,{className:`ic rh-why-ic`,style:{width:11,height:11}}),(0,u.jsx)(`span`,{dangerouslySetInnerHTML:i(e.why)})]})]},t))}),s&&(0,u.jsxs)(`div`,{className:`rh-exit`,children:[(0,u.jsx)(r.check,{className:`ic rh-exit-ic`,style:{width:14,height:14}}),(0,u.jsxs)(`span`,{children:[(0,u.jsx)(`span`,{className:`rh-exit-tag`,children:`If you need to wrap it up`}),` `,(0,u.jsx)(`span`,{dangerouslySetInnerHTML:i(s)})]})]}),(0,u.jsx)(`p`,{className:`rh-note`,children:`A rehearsal, not a prediction — say it your way.`}),c&&(0,u.jsx)(`div`,{className:`insight-summary`,style:{marginTop:12},dangerouslySetInnerHTML:i(c)})]})}var Le={email:{label:`Email`,icon:`mail`},phone:{label:`Call`,icon:`speaker`},"in-app":{label:`In-app`,icon:`sliders`},chat:{label:`Chat`,icon:`chat`}};function Re({title:e,icon:t=`send`,iconColor:n=`var(--presence)`,intro:a,scripts:s,footer:c,delay:l}){let d=r[t]||r.send,f=s??[];return(0,u.jsxs)(`div`,{className:`card reveal mss-card`,style:{"--delay":(l||0)+`ms`},children:[(0,u.jsxs)(`div`,{className:`card-eyebrow`,children:[(0,u.jsx)(d,{className:`ic`,style:{color:n}}),` `,e]}),a&&(0,u.jsx)(`p`,{className:`mss-intro`,children:a}),(0,u.jsx)(`ul`,{className:`mss-list`,children:f.map((e,t)=>{let n=e.channel?Le[e.channel]:void 0,i=n?r[n.icon]||r.send:void 0;return(0,u.jsxs)(`li`,{className:`mss-item`,children:[(0,u.jsxs)(`div`,{className:`mss-head`,children:[(0,u.jsx)(`span`,{className:`mss-target`,children:e.target}),n&&i&&(0,u.jsxs)(`span`,{className:`mss-chan`,children:[(0,u.jsx)(i,{className:`ic mss-chan-ic`}),` `,n.label]})]}),(0,u.jsxs)(`div`,{className:`mss-msg`,children:[(0,u.jsx)(`p`,{className:`mss-msg-text`,children:e.message}),(0,u.jsx)(o,{text:e.message,label:`Copy message`,className:`mss-copy`})]}),e.rebuttal&&(0,u.jsxs)(`div`,{className:`mss-rebuttal`,children:[(0,u.jsx)(`span`,{className:`mss-rebuttal-tag`,children:`If they push back`}),(0,u.jsx)(`span`,{children:e.rebuttal})]})]},t)})}),c&&(0,u.jsx)(`div`,{className:`insight-summary`,style:{marginTop:12},dangerouslySetInnerHTML:i(c)})]})}function ze({title:e,icon:t=`mic`,iconColor:n=`var(--presence)`,lines:a,totalTime:o,footer:s,delay:c}){let l=r[t]||r.mic,d=a??[];return(0,u.jsxs)(`div`,{className:`card reveal tlk-card`,style:{"--delay":(c||0)+`ms`},children:[(0,u.jsxs)(`div`,{className:`card-eyebrow`,children:[(0,u.jsx)(l,{className:`ic`,style:{color:n}}),` `,e,o&&(0,u.jsxs)(`span`,{className:`tlk-total`,children:[(0,u.jsx)(r.clock,{className:`ic tlk-total-ic`}),` `,o]})]}),(0,u.jsx)(`ol`,{className:`tlk-list`,children:d.map((e,t)=>(0,u.jsxs)(`li`,{className:`tlk-line`,children:[(0,u.jsx)(`span`,{className:`tlk-rail`,"aria-hidden":`true`,children:(0,u.jsx)(`span`,{className:`tlk-dot`})}),(0,u.jsxs)(`div`,{className:`tlk-body`,children:[(0,u.jsx)(`p`,{className:`tlk-say`,children:e.say}),(e.beat||e.note)&&(0,u.jsxs)(`div`,{className:`tlk-meta`,children:[e.beat&&(0,u.jsxs)(`span`,{className:`tlk-beat`,children:[(0,u.jsx)(r.play,{className:`ic tlk-beat-ic`}),` `,e.beat]}),e.note&&(0,u.jsx)(`span`,{className:`tlk-note`,children:e.note})]})]})]},t))}),s&&(0,u.jsx)(`div`,{className:`insight-summary`,style:{marginTop:12},dangerouslySetInnerHTML:i(s)})]})}function Be({title:e=`You deserve support right now`,message:t,safetyQuestion:n,resources:i,grounding:a,reassurance:o,delay:s}){let l=i??[];return(0,u.jsxs)(`div`,{className:`card reveal lfl-card`,style:{"--delay":(s||0)+`ms`},children:[(0,u.jsxs)(`div`,{className:`card-eyebrow`,children:[(0,u.jsx)(r.shield,{className:`ic`,style:{color:`var(--presence)`}}),` `,e]}),t&&(0,u.jsx)(`p`,{className:`lfl-message`,children:t}),n&&(0,u.jsx)(`p`,{className:`lfl-safety`,children:n}),(0,u.jsx)(`div`,{className:`lfl-resources`,children:l.map((e,t)=>{let n=(0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)(`span`,{className:`lfl-res-name`,children:e.name}),(0,u.jsx)(`span`,{className:`lfl-res-contact`,children:e.contact}),e.note&&(0,u.jsx)(`span`,{className:`lfl-res-note`,children:e.note})]}),r=e.href?c(e.href):null;return r?(0,u.jsx)(`a`,{className:`lfl-res lfl-res--link`,href:r,children:n},t):(0,u.jsx)(`div`,{className:`lfl-res`,children:n},t)})}),a&&(0,u.jsxs)(`div`,{className:`lfl-grounding`,children:[(0,u.jsx)(r.spark,{className:`ic`,style:{width:14,height:14}}),(0,u.jsx)(`span`,{children:a})]}),o&&(0,u.jsx)(`p`,{className:`lfl-reassurance`,children:o})]})}var H={stressed:`´`,unstressed:`˘`},U=[`var(--presence)`,`var(--insight)`,`var(--warning)`,`var(--danger)`];function Ve({title:e,icon:t=`proof`,iconColor:n=`var(--presence)`,lines:a,meter:o,caption:s,footer:c,delay:l}){let d=r[t]||r.proof,f=new Map;for(let e of a){let t=e.rhyme?.trim().toLowerCase();t&&!f.has(t)&&f.set(t,U[f.size%U.length])}return(0,u.jsxs)(`div`,{className:`card reveal lay-scan`,style:{"--delay":(l||0)+`ms`},children:[e&&(0,u.jsxs)(`div`,{className:`card-eyebrow`,children:[(0,u.jsx)(d,{className:`ic`,style:{color:n}}),` `,e]}),o&&(0,u.jsxs)(`div`,{className:`lay-scan-meter`,children:[(0,u.jsxs)(`span`,{className:`lay-scan-meter-key`,children:[(0,u.jsx)(`span`,{className:`lay-scan-glyph`,children:H.stressed}),` stressed`,(0,u.jsx)(`span`,{className:`lay-scan-glyph muted`,children:H.unstressed}),` unstressed`]}),(0,u.jsx)(`span`,{className:`lay-scan-meter-name`,children:o})]}),(0,u.jsx)(`div`,{className:`lay-scan-lines`,children:a.map((e,t)=>{let n=new Set((e.feet||[]).filter(t=>t>0&&t<e.syllables.length)),r=e.rhyme?f.get(e.rhyme.trim().toLowerCase()):void 0;return(0,u.jsxs)(`div`,{className:`lay-scan-row`,children:[(0,u.jsx)(`ol`,{className:`lay-scan-line`,children:e.syllables.map((e,t)=>(0,u.jsxs)(`li`,{className:`lay-scan-syl`,"data-stress":e.stress===`stressed`?`on`:`off`,children:[n.has(t)&&(0,u.jsx)(`span`,{className:`lay-scan-bar`,"aria-hidden":`true`}),(0,u.jsx)(`span`,{className:`lay-scan-mark`,"aria-hidden":`true`,children:H[e.stress]??H.unstressed}),(0,u.jsx)(`span`,{className:`lay-scan-text`,children:e.text})]},t))}),e.rhyme&&(0,u.jsx)(`span`,{className:`lay-scan-rhyme`,style:r?{"--rh":r}:void 0,children:e.rhyme.trim().toLowerCase()})]},t)})}),s&&(0,u.jsx)(`div`,{className:`lay-scan-caption faint`,children:s}),c&&(0,u.jsx)(`div`,{className:`insight-summary`,style:{marginTop:12},dangerouslySetInnerHTML:i(c)})]})}var W=46,He=`The quick brown fox`;function Ue(e){return`${Number.isInteger(e)?e:Number(e.toFixed(1))} px`}function We({title:e,icon:t=`edit`,iconColor:n=`var(--presence)`,styles:a,pairing:o,caption:s,footer:c,delay:l}){let d=r[t]||r.edit,f=a.reduce((e,t)=>Math.max(e,t.sizePx||0),1),p=f>W?W/f:1,m=e=>{let t=[];return e.family&&t.push(e.family),e.weight&&t.push(String(e.weight)),t.push(Ue(e.sizePx)),e.lineHeight&&t.push(`${e.lineHeight}×`),e.tracking&&t.push(e.tracking),t};return(0,u.jsxs)(`div`,{className:`card reveal lay-tspec`,style:{"--delay":(l||0)+`ms`},children:[e&&(0,u.jsxs)(`div`,{className:`card-eyebrow`,children:[(0,u.jsx)(d,{className:`ic`,style:{color:n}}),` `,e]}),(0,u.jsx)(`ol`,{className:`lay-tspec-list`,children:a.map((e,t)=>{let n=e.color||`var(--presence)`,r=Math.max(11,Math.round((e.sizePx||16)*p));return(0,u.jsxs)(`li`,{className:`lay-tspec-row`,children:[(0,u.jsxs)(`div`,{className:`lay-tspec-meta`,children:[(0,u.jsx)(`span`,{className:`lay-tspec-name`,style:{color:n},children:e.name}),(0,u.jsx)(`div`,{className:`lay-tspec-chips`,children:m(e).map((e,t)=>(0,u.jsx)(`span`,{className:`lay-tspec-chip tab-num`,children:e},t))})]}),(0,u.jsx)(`div`,{className:`lay-tspec-sample`,style:{fontSize:r+`px`,fontWeight:e.weight??500,lineHeight:e.lineHeight??1.15,letterSpacing:e.tracking,fontFamily:e.family},children:e.sample||He})]},t)})}),o&&(0,u.jsxs)(`div`,{className:`lay-tspec-pairing`,children:[(0,u.jsx)(`div`,{className:`lay-tspec-pair-tag`,children:`Pairing`}),(0,u.jsx)(`div`,{className:`lay-tspec-pair-head`,style:{fontFamily:o.heading},children:o.heading}),(0,u.jsxs)(`div`,{className:`lay-tspec-pair-body`,style:{fontFamily:o.body},children:[(0,u.jsxs)(`span`,{className:`lay-tspec-pair-faces tab-num`,children:[o.heading,` `,`·`,` `,o.body]}),` `,`pair a confident display face with a calm, readable body face — the heading carries the voice while the paragraph stays out of the way and lets the words breathe.`]})]}),s&&(0,u.jsx)(`div`,{className:`lay-tspec-caption faint`,children:s}),c&&(0,u.jsx)(`div`,{className:`insight-summary`,style:{marginTop:12},dangerouslySetInnerHTML:i(c)})]})}var Ge={WS:{subject:.5,label:`Wide`},MS:{subject:.78,label:`Medium`},CU:{subject:1.05,label:`Close`},ECU:{subject:1.5,label:`Extreme`},OTS:{subject:.92,label:`Over-shoulder`}},G=100,K=64;function Ke(e){let t=Ge[e],n=K*t.subject/4;return{headR:n,cx:e===`OTS`?G*.62:G/2,headCy:K-n*1.7,shoulderW:n*2.4,label:t.label}}function qe({title:e,icon:t=`play`,iconColor:n=`var(--presence)`,shots:a,caption:o,footer:s,delay:c}){let l=r[t]||r.play;return(0,u.jsxs)(`div`,{className:`card reveal lay-shot`,style:{"--delay":(c||0)+`ms`},children:[e&&(0,u.jsxs)(`div`,{className:`card-eyebrow`,children:[(0,u.jsx)(l,{className:`ic`,style:{color:n}}),` `,e]}),(0,u.jsx)(`ol`,{className:`lay-shot-list`,children:a.map((e,t)=>{let n=e.size||`MS`,i=Ke(n),a=[e.movement,e.lens,e.duration].filter(Boolean);return(0,u.jsxs)(`li`,{className:`lay-shot-row`,children:[(0,u.jsxs)(`div`,{className:`lay-shot-thumb`,children:[(0,u.jsxs)(`svg`,{className:`lay-shot-frame`,viewBox:`0 0 ${G} ${K}`,role:`img`,"aria-label":`${n} shot framing`,preserveAspectRatio:`xMidYMid slice`,children:[n===`OTS`&&(0,u.jsx)(`path`,{d:`M 0 ${K} L 0 ${K*.28} Q ${G*.18} ${K*.2} ${G*.3} ${K} Z`,className:`lay-shot-fg`}),(0,u.jsx)(`circle`,{cx:i.cx,cy:i.headCy,r:i.headR,className:`lay-shot-subj`}),(0,u.jsx)(`path`,{d:`M ${i.cx-i.shoulderW} ${K} Q ${i.cx} ${i.headCy+i.headR*.4} ${i.cx+i.shoulderW} ${K} Z`,className:`lay-shot-subj`}),(0,u.jsx)(`line`,{x1:G/3,y1:0,x2:G/3,y2:K,className:`lay-shot-grid`}),(0,u.jsx)(`line`,{x1:G/3*2,y1:0,x2:G/3*2,y2:K,className:`lay-shot-grid`})]}),(0,u.jsx)(`span`,{className:`lay-shot-size`,children:n})]}),(0,u.jsxs)(`div`,{className:`lay-shot-body`,children:[(0,u.jsxs)(`div`,{className:`lay-shot-top`,children:[(0,u.jsx)(`span`,{className:`lay-shot-n tab-num`,children:e.n}),(0,u.jsx)(`span`,{className:`lay-shot-frame-label`,children:i.label}),a.length>0&&(0,u.jsx)(`div`,{className:`lay-shot-meta`,children:a.map((e,t)=>(0,u.jsx)(`span`,{className:`lay-shot-tag`,children:e},t))})]}),(0,u.jsx)(`div`,{className:`lay-shot-action`,children:e.action}),e.dialogue&&(0,u.jsxs)(`div`,{className:`lay-shot-dialogue`,children:[(0,u.jsx)(r.chat,{className:`ic`}),(0,u.jsx)(`span`,{children:e.dialogue})]})]})]},t)})}),o&&(0,u.jsx)(`div`,{className:`lay-shot-caption faint`,children:o}),s&&(0,u.jsx)(`div`,{className:`insight-summary`,style:{marginTop:12},dangerouslySetInnerHTML:i(s)})]})}var q=320,J=96,Y={l:8,r:8,t:12,b:10};function Je(e,t){if(!e)return null;let n=e.match(/-?\d+(\.\d+)?/);if(!n)return null;let r=parseFloat(n[0]);return Number.isFinite(r)?e.includes(`%`)||r<=100&&!/p/i.test(e)?Math.min(1,Math.max(0,r/100)):t>0?Math.min(1,Math.max(0,r/t)):null:null}function Ye({title:e,icon:t=`edit`,iconColor:n=`var(--presence)`,framework:o,beats:s,tension:c,caption:d,footer:f,delay:p}){let m=r[t]||r.edit,h=(0,l.useMemo)(()=>{let e=Math.max(1,s.length-1),t=s.map(e=>parseFloat((e.at||``).match(/\d+/)?.[0]||``)).filter(e=>Number.isFinite(e)),n=t.length?Math.max(...t):0,r=s.map((t,r)=>Je(t.at,n)??r/e),i=a([0,1],[Y.l,q-Y.r]),o=``,l=[];if(c&&c.length>=2){let e=Math.min(...c),t=Math.max(...c),n=a([e,t===e?e+1:t],[J-Y.b,Y.t]);l=c.map((e,t)=>({x:i(t<r.length?r[t]:t/Math.max(1,c.length-1)),y:n(e)})),o=l.map((e,t)=>{if(t===0)return`M ${e.x} ${e.y}`;let n=l[t-1],r=(n.x+e.x)/2;return`C ${r} ${n.y} ${r} ${e.y} ${e.x} ${e.y}`}).join(` `)}return{fracs:r,sx:i,curve:o,dots:l,baseY:J-Y.b}},[s,c]);return(0,u.jsxs)(`div`,{className:`card reveal lay-beat`,style:{"--delay":(p||0)+`ms`},children:[e&&(0,u.jsxs)(`div`,{className:`card-eyebrow`,children:[(0,u.jsx)(m,{className:`ic`,style:{color:n}}),` `,e]}),o&&(0,u.jsxs)(`div`,{className:`lay-beat-framework`,children:[(0,u.jsx)(`span`,{className:`lay-beat-fw-tag`,children:`Structure`}),o]}),(0,u.jsx)(`ol`,{className:`lay-beat-list`,children:s.map((e,t)=>(0,u.jsxs)(`li`,{className:`lay-beat-row`,children:[(0,u.jsx)(`div`,{className:`lay-beat-rail`,children:(0,u.jsx)(`span`,{className:`lay-beat-dot`})}),(0,u.jsxs)(`div`,{className:`lay-beat-body`,children:[(0,u.jsxs)(`div`,{className:`lay-beat-head`,children:[(0,u.jsx)(`span`,{className:`lay-beat-name`,children:e.name}),e.at&&(0,u.jsx)(`span`,{className:`lay-beat-at tab-num`,children:e.at})]}),(0,u.jsx)(`div`,{className:`lay-beat-line`,children:e.line})]})]},t))}),h.curve&&(0,u.jsxs)(`figure`,{className:`lay-beat-curve`,children:[(0,u.jsx)(`figcaption`,{className:`lay-beat-curve-cap faint`,children:`Dramatic tension`}),(0,u.jsxs)(`svg`,{viewBox:`0 0 ${q} ${J}`,className:`lay-beat-svg`,role:`img`,"aria-label":`tension curve`,children:[(0,u.jsx)(`defs`,{children:(0,u.jsxs)(`linearGradient`,{id:`lay-beat-fill`,x1:`0`,y1:`0`,x2:`0`,y2:`1`,children:[(0,u.jsx)(`stop`,{offset:`0%`,stopColor:`var(--presence)`,stopOpacity:`0.22`}),(0,u.jsx)(`stop`,{offset:`100%`,stopColor:`var(--presence)`,stopOpacity:`0`})]})}),(0,u.jsx)(`path`,{d:`${h.curve} L ${h.dots[h.dots.length-1].x} ${h.baseY} L ${h.dots[0].x} ${h.baseY} Z`,fill:`url(#lay-beat-fill)`}),(0,u.jsx)(`path`,{d:h.curve,className:`lay-beat-stroke`,fill:`none`}),h.dots.map((e,t)=>(0,u.jsx)(`circle`,{cx:e.x,cy:e.y,r:2.6,className:`lay-beat-pt`},t))]})]}),d&&(0,u.jsx)(`div`,{className:`lay-beat-caption faint`,children:d}),f&&(0,u.jsx)(`div`,{className:`insight-summary`,style:{marginTop:12},dangerouslySetInnerHTML:i(f)})]})}function Xe({title:e=`A few things to sit with`,icon:t=`edit`,iconColor:n=`var(--presence)`,theme:a,prompts:o,caption:s,footer:c,delay:l}){let d=r[t]||r.edit,f=o??[];return(0,u.jsxs)(`div`,{className:`card reveal lay-ps`,style:{"--delay":(l||0)+`ms`},children:[e&&(0,u.jsxs)(`div`,{className:`card-eyebrow`,children:[(0,u.jsx)(d,{className:`ic`,style:{color:n}}),` `,e]}),a&&(0,u.jsxs)(`div`,{className:`lay-ps-theme`,children:[(0,u.jsx)(`span`,{className:`lay-ps-theme-dot`,"aria-hidden":`true`}),a]}),(0,u.jsx)(`ol`,{className:`lay-ps-list`,children:f.map((e,t)=>(0,u.jsxs)(`li`,{className:`lay-ps-card`,children:[(0,u.jsx)(`span`,{className:`lay-ps-mark tab-num`,"aria-hidden":`true`,children:t+1}),(0,u.jsxs)(`div`,{className:`lay-ps-body`,children:[(0,u.jsx)(`p`,{className:`lay-ps-q`,children:e.question}),e.guidance&&(0,u.jsx)(`p`,{className:`lay-ps-guide`,children:e.guidance})]})]},t))}),s&&(0,u.jsx)(`div`,{className:`lay-ps-caption faint`,children:s}),c&&(0,u.jsx)(`div`,{className:`insight-summary`,style:{marginTop:12},dangerouslySetInnerHTML:i(c)})]})}var Ze={HR:`Heart rate`,pace:`Pace`,RPE:`Perceived effort`},X=[`var(--insight)`,`#10b981`,`var(--presence)`,`var(--warning)`,`var(--danger)`];function Qe(e){let t=X.length-1,n=Math.max(0,Math.min(t,e*t)),r=Math.floor(n),i=Math.min(t,r+1),a=n-r;return a===0?X[r]:`color-mix(in oklab, ${X[i]} ${Math.round(a*100)}%, ${X[r]})`}function $e({title:e=`Training zones`,icon:t=`spark`,iconColor:n=`var(--presence)`,metric:a=`HR`,zones:o,current:s,caption:c,footer:l,delay:d}){let f=r[t]||r.spark,p=o??[],m=p.length,h=typeof s==`number`&&m>0?Math.max(0,Math.min(m-1,Math.round(s))):-1,g=Ze[a]??a,_=p.map((e,t)=>({z:e,i:t})).reverse();return(0,u.jsxs)(`div`,{className:`card reveal lay-zl`,style:{"--delay":(d||0)+`ms`},children:[e&&(0,u.jsxs)(`div`,{className:`card-eyebrow`,children:[(0,u.jsx)(f,{className:`ic`,style:{color:n}}),` `,e,(0,u.jsx)(`span`,{className:`lay-zl-metric`,children:g})]}),(0,u.jsx)(`div`,{className:`lay-zl-ladder`,children:_.map(({z:e,i:t})=>{let n=Qe(m>1?t/(m-1):0),r=t===h;return(0,u.jsxs)(`div`,{className:`lay-zl-band`+(r?` here`:``),style:{"--zc":n},children:[(0,u.jsx)(`div`,{className:`lay-zl-rail`,"aria-hidden":`true`}),(0,u.jsxs)(`div`,{className:`lay-zl-band-body`,children:[(0,u.jsxs)(`div`,{className:`lay-zl-band-top`,children:[(0,u.jsx)(`span`,{className:`lay-zl-name`,children:e.name}),(0,u.jsx)(`span`,{className:`lay-zl-range tab-num`,children:e.range}),r&&(0,u.jsxs)(`span`,{className:`lay-zl-here`,children:[(0,u.jsx)(`span`,{className:`lay-zl-here-dot`,"aria-hidden":`true`}),`You are here`]})]}),(0,u.jsx)(`div`,{className:`lay-zl-effort`,children:e.effort}),(0,u.jsx)(`div`,{className:`lay-zl-purpose`,children:e.purpose})]})]},t)})}),c&&(0,u.jsx)(`div`,{className:`lay-zl-caption faint`,children:c}),l&&(0,u.jsx)(`div`,{className:`insight-summary`,style:{marginTop:12},dangerouslySetInnerHTML:i(l)})]})}var et={first:{label:`First`,color:`var(--insight)`},then:{label:`Then`,color:`var(--presence)`},next:{label:`Next`,color:`var(--presence)`},last:{label:`Last`,color:`var(--insight)`}};function tt(e,t){return e===0?`first`:e===t-1?`last`:e%2==1?`then`:`next`}function nt({title:e,icon:t=`layers`,iconColor:n=`var(--presence)`,panels:a,caption:o,footer:s,delay:c}){let d=r[t]||r.layers,f=a??[],p=f.length;return(0,u.jsxs)(`div`,{className:`card reveal lay-pseq`,style:{"--delay":(c||0)+`ms`},children:[e&&(0,u.jsxs)(`div`,{className:`card-eyebrow`,children:[(0,u.jsx)(d,{className:`ic`,style:{color:n}}),` `,e]}),(0,u.jsx)(`ol`,{className:`lay-pseq-strip`,children:f.map((e,t)=>{let n=et[e.marker??tt(t,p)];return(0,u.jsxs)(l.Fragment,{children:[(0,u.jsxs)(`li`,{className:`lay-pseq-panel`,style:{"--mc":n.color},children:[(0,u.jsx)(`span`,{className:`lay-pseq-marker`,children:n.label}),(0,u.jsx)(`div`,{className:`lay-pseq-frame`,children:(0,u.jsxs)(`svg`,{className:`lay-pseq-art`,viewBox:`0 0 64 48`,role:`img`,"aria-label":e.label,preserveAspectRatio:`xMidYMid meet`,children:[(0,u.jsx)(`rect`,{x:`8`,y:`8`,width:`48`,height:`32`,rx:`4`,className:`lay-pseq-art-card`}),(0,u.jsx)(`line`,{x1:`16`,y1:`32`,x2:`48`,y2:`32`,className:`lay-pseq-art-base`}),(0,u.jsx)(`circle`,{cx:`32`,cy:`21`,r:`9`,className:`lay-pseq-art-badge`}),(0,u.jsx)(`text`,{x:`32`,y:`21`,className:`lay-pseq-art-num`,children:t+1})]})}),(0,u.jsx)(`div`,{className:`lay-pseq-label`,children:e.label}),e.caption&&(0,u.jsx)(`div`,{className:`lay-pseq-cap faint`,children:e.caption})]}),t<p-1&&(0,u.jsx)(`li`,{className:`lay-pseq-arrow`,"aria-hidden":`true`,children:(0,u.jsx)(r.chevR,{className:`ic`})})]},t)})}),o&&(0,u.jsx)(`div`,{className:`lay-pseq-caption faint`,children:o}),s&&(0,u.jsx)(`div`,{className:`insight-summary`,style:{marginTop:12},dangerouslySetInnerHTML:i(s)})]})}function Z(e){return e==null||!Number.isFinite(e)?null:Math.max(0,Math.min(100,Math.round(e)))}function Q({label:e,items:t,accent:n,mark:a}){let o=a===`check`?r.check:r.alert;return(0,u.jsxs)(`div`,{className:`tr-ev-col`,style:{"--te":n},children:[(0,u.jsxs)(`div`,{className:`tr-ev-head`,children:[(0,u.jsx)(o,{className:`ic`,style:{color:n,width:13,height:13}}),(0,u.jsx)(`span`,{children:e}),(0,u.jsx)(`span`,{className:`tr-ev-count tab-num`,children:t.length})]}),t.length===0?(0,u.jsx)(`p`,{className:`tr-ev-empty faint`,children:`None noted`}):(0,u.jsx)(`ul`,{className:`tr-ev-list`,children:t.map((e,t)=>(0,u.jsxs)(`li`,{className:`tr-ev-item m-stagger-item m-fade-rise`,style:{"--i":t},children:[(0,u.jsx)(o,{className:`ic tr-ev-mark`,style:{color:n}}),(0,u.jsx)(`span`,{className:`tr-ev-text`,dangerouslySetInnerHTML:i(e)})]},t))})]})}function rt({title:e=`Thought record`,icon:t=`spark`,iconColor:n=`var(--presence)`,situation:a,automaticThought:o,emotion:s,emotionIntensity:c,evidenceFor:l=[],evidenceAgainst:d=[],alternativeThought:f,outcomeEmotion:p,outcomeIntensity:m,footer:h,delay:g}){let _=r[t]||r.spark,v=Z(c),y=Z(m),b=l.length>0||d.length>0,x=!!f,S=!!p||y!=null,C=(g||0)+140;return(0,u.jsxs)(`div`,{className:`card reveal tr-card`,style:{"--delay":(g||0)+`ms`},children:[(0,u.jsxs)(`div`,{className:`card-eyebrow`,children:[(0,u.jsx)(_,{className:`ic`,style:{color:n}}),` `,e]}),a&&(0,u.jsxs)(`div`,{className:`tr-block tr-situation`,children:[(0,u.jsx)(`div`,{className:`tr-tag`,children:`The situation`}),(0,u.jsx)(`p`,{className:`tr-body`,dangerouslySetInnerHTML:i(a)})]}),(0,u.jsxs)(`div`,{className:`tr-block tr-thought`,children:[(0,u.jsxs)(`div`,{className:`tr-row-head`,children:[(0,u.jsx)(`span`,{className:`tr-tag`,children:`The automatic thought`}),(0,u.jsxs)(`span`,{className:`tr-emo-chip`,children:[s,v!=null&&(0,u.jsxs)(`span`,{className:`tr-emo-pct tab-num`,children:[v,`%`]})]})]}),o&&(0,u.jsxs)(`p`,{className:`tr-quote`,children:[(0,u.jsx)(r.quote,{className:`ic tr-quote-ic`,style:{width:14,height:14}}),(0,u.jsx)(`span`,{dangerouslySetInnerHTML:i(o)})]}),v!=null&&(0,u.jsx)(`div`,{className:`tr-meter`,"aria-label":`felt ${v} of 100`,children:(0,u.jsx)(`span`,{className:`tr-meter-fill`,style:{width:v+`%`}})})]}),b&&(0,u.jsxs)(`div`,{className:`tr-block tr-evidence`,children:[(0,u.jsx)(`div`,{className:`tr-tag`,children:`Weighing the evidence`}),(0,u.jsxs)(`div`,{className:`tr-ev-grid`,children:[(0,u.jsx)(Q,{label:`Feeds the thought`,items:l,accent:`var(--warning)`,mark:`alert`}),(0,u.jsx)(`div`,{className:`tr-ev-divider`}),(0,u.jsx)(Q,{label:`Complicates it`,items:d,accent:`var(--insight)`,mark:`check`})]})]}),x&&(0,u.jsxs)(`div`,{className:`tr-shift`,"aria-hidden":`true`,children:[(0,u.jsx)(`span`,{className:`tr-shift-line`}),(0,u.jsx)(r.spark,{className:`ic tr-shift-ic`,style:{width:13,height:13}}),(0,u.jsx)(`span`,{className:`tr-shift-line`})]}),f&&(0,u.jsxs)(`div`,{className:`tr-block tr-alt m-fade-rise`,style:{"--delay":C+`ms`},children:[(0,u.jsx)(`div`,{className:`tr-tag tr-tag--true`,children:`The balanced thought`}),(0,u.jsx)(`p`,{className:`tr-alt-text`,dangerouslySetInnerHTML:i(f)})]}),S&&(0,u.jsxs)(`div`,{className:`tr-outcome`,children:[(0,u.jsxs)(`div`,{className:`tr-outcome-chip`,children:[(0,u.jsx)(`span`,{className:`tr-outcome-label`,children:`Felt`}),(0,u.jsx)(`span`,{className:`tr-outcome-emo`,children:s}),v!=null&&(0,u.jsxs)(`span`,{className:`tr-outcome-pct tab-num`,children:[v,`%`]})]}),(0,u.jsx)(r.chevR,{className:`ic tr-outcome-arrow`,style:{width:14,height:14}}),(0,u.jsxs)(`div`,{className:`tr-outcome-chip tr-outcome-chip--after`,children:[(0,u.jsx)(`span`,{className:`tr-outcome-label`,children:`Now`}),(0,u.jsx)(`span`,{className:`tr-outcome-emo`,children:p||s}),y!=null&&(0,u.jsxs)(`span`,{className:`tr-outcome-pct tab-num`,children:[y,`%`]})]})]}),h&&(0,u.jsx)(`div`,{className:`insight-summary`,style:{marginTop:12},dangerouslySetInnerHTML:i(h)})]})}var it=e({layoutRegistry:()=>$}),$={callout:s(le),verdictcard:s(fe),scenarioset:s(me),accordion:s(he),proscons:s(ge),takeaways:s(_e),faq:s(ve),tabs:s(ye),divider:s(M),pullquote:s(P),storystrip:s(be),casestudy:s(xe),deflist:s(Ce),worthit:s(we),companionnote:s(Te),positioncard:s(Ee),differential:s(Oe),reframecard:s(ke),breathpacer:s(Ae),copingmenu:s(Pe),subtextdecode:s(Ie),rehearsal:s(V),messagescriptset:s(Re),talktrack:s(ze),lifeline:s(Be),scansionmark:s(Ve),typespec:s(We),shotlist:s(qe),beatsheet:s(Ye),promptset:s(Xe),zoneladder:s($e),picturesequence:s(nt),storyarc:s(ee),devicemark:s(oe),thoughtrecord:s(rt)};export{it as n,$ as t};
@@ -1 +0,0 @@
1
- var e=[`Your world`,`This session`,`While listening`,`Setup`],t=[{id:`atlas`,label:`Atlas`,blurb:`Kept conversations and topics, as a place you can wander`,group:`Your world`,surface:`live`,tourChapter:`atlas`,keywords:[`map`,`history`,`everything`,`concepts`]},{id:`memory`,label:`What Mavéa remembers`,blurb:`See, edit, or forget the facts stored about you on this device`,group:`Your world`,surface:`live`,tourChapter:`memory`,keywords:[`memory`,`remember`,`forget`,`facts`,`about me`,`personal`,`privacy`]},{id:`library`,label:`Past conversations`,blurb:`Reopen a canvas you built before`,group:`Your world`,surface:`live`,tourChapter:`library`,keywords:[`library`,`past`,`history`,`saved`,`resume`,`previous`,`conversations`]},{id:`deepzoom`,label:`Deep Zoom`,blurb:`Telescope any topic from the big picture down to the finest detail`,group:`Your world`,surface:`both`,tourChapter:`deepzoom`,keywords:[`zoom`,`telescope`,`powers of ten`,`scale`,`detail`,`deeper`,`magnify`]},{id:`pdf-world`,label:`Prism`,blurb:`Split a PDF, Office doc, or data file (CSV, text, JSON) into a map of its grounded claims — or compare several`,group:`Your world`,surface:`live`,tourChapter:`prism`,keywords:`prism.pdf.explode.split.document.word.docx.powerpoint.pptx.slides.excel.xlsx.spreadsheet.sheets.google docs.csv.tsv.text.txt.markdown.json.data.code.paper.claims.contradictions.compare.comparison.world`.split(`.`)},{id:`synthesis`,label:`Synthesis`,blurb:`Fuse a pile of documents into one map — agreements, contradictions, gaps`,group:`Your world`,surface:`live`,tourChapter:`synthesis`,keywords:[`synthesis`,`synthesize`,`fuse`,`merge`,`combine`,`many documents`,`multiple documents`,`literature review`,`cross-reference`,`corpus`]},{id:`ripple`,label:`Ripple`,blurb:`Model a code change’s blast radius — likely impact, risks, and a proposed ship order`,group:`Your world`,surface:`both`,tourChapter:`ripple`,keywords:[`ripple`,`pr`,`pull request`,`review`,`diff`,`code review`,`blast radius`,`impact`,`ship`,`merge`,`rollout`,`cascade`,`breaking change`,`migration`,`onboarding`,`codebase`,`repo`]},{id:`rehearse`,label:`Rehearse`,blurb:`Practice a hard conversation before it happens`,group:`Your world`,surface:`live`,tourChapter:`rehearse`,keywords:[`practice`,`interview`,`role play`,`prepare`]},{id:`delegate`,label:`The Table`,blurb:`Scout a negotiation before you have it — your Mavéa vs a stand-in, then a debrief`,group:`Your world`,surface:`live`,tourChapter:`delegate`,keywords:[`negotiate`,`negotiation`,`deal`,`raise`,`salary`,`haggle`,`bargain`,`offer`,`counteroffer`,`prep`,`scout`,`boundaries`,`delegate`]},{id:`review`,label:`Study`,blurb:`Go through your flashcards — on a schedule if you want one`,group:`Your world`,surface:`live`,tourChapter:`review`,keywords:[`srs`,`flashcards`,`study`,`remember`,`spaced`,`due`,`flip`,`pile`,`anki`]},{id:`flashcards`,label:`Manage flashcards`,blurb:`See, organise, and edit your study deck (decks, tags, study)`,group:`Your world`,surface:`live`,tourChapter:`manage-flashcards`,keywords:[`flashcards`,`cards`,`deck`,`tag`,`manage`,`anki`,`study`]},{id:`courses`,label:`Courses`,blurb:`Turn a topic into a structured syllabus — a lesson at a time, at your pace`,group:`Your world`,surface:`live`,tourChapter:`course`,keywords:[`course`,`courses`,`lesson`,`syllabus`,`learn`,`teach`,`curriculum`,`class`]},{id:`dashboards`,label:`Living dashboards`,blurb:`Open dashboards that refresh on schedule while Mavéa is running`,group:`Your world`,surface:`both`,tourChapter:`dashboards`,keywords:[`dashboard`,`dashboards`,`track`,`metrics`,`watch`]},{id:`recap`,label:`Recap`,blurb:`What we've covered so far this session`,group:`This session`,surface:`live`,tourChapter:`recap`,keywords:[`summary`,`so far`,`covered`]},{id:`zoom-deck`,label:`Chapter view`,blurb:`Pull back from the cards to the shape of the whole session`,group:`This session`,surface:`live`,tourChapter:`zoom-deck`,keywords:[`zoom`,`chapters`,`pinch`,`altitude`,`overview`,`pull back`,`whole night`]},{id:`present`,label:`Present`,blurb:`Fill the room — the chrome falls away, the mic stays live`,group:`This session`,surface:`live`,tourChapter:`present`,keywords:[`presentation`,`full screen`,`room`,`talk`]},{id:`track`,label:`Track this`,blurb:`Turn this conversation into a dashboard that refreshes while Mavéa is running`,group:`This session`,surface:`live`,tourChapter:`track`,keywords:[`dashboard`,`watch`,`monitor`,`keep`]},{id:`share`,label:`Share`,blurb:`Turn this conversation into a polished presentation or document`,group:`This session`,surface:`live`,tourChapter:`share`,keywords:[`share`,`presentation`,`slides`,`document`,`export`,`publish`]},{id:`export`,label:`Export`,blurb:`Print this or save it as a PDF`,group:`This session`,surface:`live`,tourChapter:`export`,keywords:[`pdf`,`print`,`save`,`download`]},{id:`board`,label:`Board view`,blurb:`Spread this answer's cards on a spatial board you can wander`,group:`This session`,surface:`live`,tourChapter:`canvas`,keywords:[`board`,`spatial`,`canvas`,`spread`,`arrange`,`wander`,`map`]},{id:`focus`,label:`Focus mode`,blurb:`One card at a time, with a filmstrip of the rest`,group:`This session`,surface:`live`,tourChapter:`focus`,keywords:[`focus`,`one card`,`filmstrip`,`zoom`]},{id:`ink`,label:`Highlight to ask`,blurb:`Mark any part of an answer to ask Mavéa about it`,group:`This session`,surface:`live`,tourChapter:`highlight`,keywords:[`ink`,`draw`,`highlight`,`annotate`,`mark`,`ask`]},{id:`blanks`,label:`The Blank Space`,blurb:`An answer can leave a glowing hole for a value only you know — type it, say it, or drop a card in`,group:`This session`,surface:`live`,tourChapter:`blanks`,keywords:[`blank`,`blanks`,`fill`,`fill in`,`fill in my numbers`,`your numbers`,`hole`,`slot`,`placeholder`]},{id:`watch-me-think`,label:`Watch me think`,blurb:`Talk for a minute — Mavéa draws a live map of your thinking`,group:`While listening`,surface:`live`,tourChapter:`think`,keywords:[`mind map`,`mindshape`,`think`,`ramble`,`map`,`thinking`]},{id:`just-listen`,label:`Just listen`,blurb:`Bank recognized speech without answering — sort it later`,group:`While listening`,surface:`live`,tourChapter:`just-listen`,keywords:[`listen`,`bank`,`think out loud`,`notes`]},{id:`whisper`,label:`Whisper mode`,blurb:`Ultra-quiet voice for when you can't make a sound — opens its Quiet-hours setting`,group:`While listening`,surface:`live`,tourChapter:`whisper`,keywords:[`quiet`,`whisper`,`night`,`silent`]},{id:`ghost`,label:`Ghost answers`,blurb:`Mavéa quietly drafts what it would say — starts Just listen, where the drafts appear`,group:`While listening`,surface:`live`,tourChapter:`ghost`,keywords:[`ghost`,`draft`,`preview`,`alternative`]},{id:`settings`,label:`Model settings`,blurb:`Connect a provider and tune how Mavéa answers`,group:`Setup`,surface:`live`,tourChapter:`settings`,keywords:[`settings`,`model`,`provider`,`api key`,`config`]},{id:`morning-brief`,label:`Morning brief`,blurb:`Open the day with what's changed — off by default; opens the switch that turns it on`,group:`Setup`,surface:`live`,tourChapter:`morning-brief`,keywords:[`brief`,`briefing`,`morning`,`daily`,`catch up`,`start of day`]},{id:`how`,label:`How Mavéa works`,blurb:`A quick tour of the basics`,group:`Setup`,surface:`both`,keywords:[`help`,`tour`,`how`,`guide`,`onboarding`]}];function n(e){return[e.label,e.blurb,e.group,...e.keywords??[]].join(` `).toLowerCase()}export{e as n,n as r,t};