@mavea/mavea 2.0.1 → 2.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +75 -0
- package/PRIVACY.md +9 -2
- package/README.md +13 -1
- package/SECURITY.md +1 -1
- package/TERMS.md +4 -2
- package/TRADEMARKS.md +3 -1
- package/dist/.vite/manifest.json +898 -858
- package/dist/assets/AnnotationLayer-BRYhJ1LB.css +1 -0
- package/dist/assets/AnnotationLayer-Bh1yiSAK.js +2 -0
- package/dist/assets/{AppCommandPalette-Cucwjk5N.js → AppCommandPalette-DS4sLY_K.js} +1 -1
- package/dist/assets/{AtlasView-DO_p0TdZ.js → AtlasView-CYZ9sfXb.js} +1 -1
- package/dist/assets/BlockEmpty-B-giiUPy.js +1 -0
- package/dist/assets/{CadenceCard-DxceyiPA.js → CadenceCard-j1V7XOxX.js} +1 -1
- package/dist/assets/{CheckLogRail-vq2lZ7a5.js → CheckLogRail-onH7DaxW.js} +1 -1
- package/dist/assets/{CommandPalette-Bs6tpdZl.js → CommandPalette-Cz8h94Jd.js} +1 -1
- package/dist/assets/ConversationVideoStudio-adb7legp.js +1 -0
- package/dist/assets/CourseLessonReader-CkzViEij.js +2 -0
- package/dist/assets/CourseLessonReader-DNHFQOkX.css +1 -0
- package/dist/assets/{CourseRail-CUa7uIGG.css → CourseRail-BDQIWara.css} +1 -1
- package/dist/assets/{CourseRail-BQmUsG6v.js → CourseRail-DD8gtAn4.js} +1 -1
- package/dist/assets/CoursesApp-B0HFM8Al.js +2 -0
- package/dist/assets/{DashPresent-DZcRdu6R.js → DashPresent-BdOJ7F9D.js} +1 -1
- package/dist/assets/DashboardDetail-Chrpi1Yk.js +2 -0
- package/dist/assets/DashboardLoopGate-B01Hpm7O.js +2 -0
- package/dist/assets/DashboardLoopRuntime-BcdZtIgH.js +1 -0
- package/dist/assets/{DashboardSettings-DJon1Q4o.js → DashboardSettings-5tn-dw6G.js} +1 -1
- package/dist/assets/DashboardsApp--jjj-GVX.js +2 -0
- package/dist/assets/DeepZoomApp-BpQbKTjc.js +37 -0
- package/dist/assets/DelegatePanel-e4y0CJsn.js +33 -0
- package/dist/assets/{DemoGallery-BcQ9yz2u.js → DemoGallery-DF1ShRG4.js} +1 -1
- package/dist/assets/{DropSelect-GKioj__f.js → DropSelect-D3Q9Su_x.js} +1 -1
- package/dist/assets/{ExportModal-1pWr-c7I.js → ExportModal-DkmyBpeN.js} +1 -1
- package/dist/assets/ExportModal-sX8MPVPW.css +1 -0
- package/dist/assets/{ExtractionPreview-TKyfEqwM.js → ExtractionPreview-C6F1q3qG.js} +2 -2
- package/dist/assets/FeatureUseNotice-CCI4mM39.js +1 -0
- package/dist/assets/{FlagshipCommandPalette-D1pv3hfZ.js → FlagshipCommandPalette-BkjvGrKT.js} +1 -1
- package/dist/assets/{FlagshipShowcase-CCFFcaL7.js → FlagshipShowcase-Dx2noFrP.js} +1 -1
- package/dist/assets/{FlashcardsApp-Dbe-8UkQ.js → FlashcardsApp-C1TeLlkY.js} +1 -1
- package/dist/assets/GalleryApp-7oBldBKU.js +1 -0
- package/dist/assets/{HonestByDesign-ByOR1sRQ.js → HonestByDesign-DlRrxgrO.js} +1 -1
- package/dist/assets/{HowItWorks-Dllc30ph.js → HowItWorks-BM2yn2dq.js} +1 -1
- package/dist/assets/LegalApp-DPfTD0jz.js +1 -0
- package/dist/assets/{LegalMarkdownDocument-CmxHsXlb.js → LegalMarkdownDocument-DJgwmK1q.js} +1 -1
- package/dist/assets/{LegalPageShell-CDD6D6T_.js → LegalPageShell-DuIwSVSJ.js} +1 -1
- package/dist/assets/Library-CDgWdTiF.js +1 -0
- package/dist/assets/{LibraryOverlay-CHmubwG3.js → LibraryOverlay-DsLhiJzF.js} +1 -1
- package/dist/assets/LiveApp-CEaISHEZ.css +1 -0
- package/dist/assets/LiveApp-DNYYimuo.js +79 -0
- package/dist/assets/LiveSettings-CDHQnEtF.js +6 -0
- package/dist/assets/{MindMapViewerDrawer-BLRBWsTz.js → MindMapViewerDrawer-C3BgiubE.js} +1 -1
- package/dist/assets/{MindShape-CaDuLyGa.js → MindShape-DVlgSR1B.js} +1 -1
- package/dist/assets/{PinToDashboard-ChK2Ou73.js → PinToDashboard-Dd_egidB.js} +1 -1
- package/dist/assets/{PlanReview-Dg6VE0xF.js → PlanReview-wOsBpofo.js} +1 -1
- package/dist/assets/PresentationDeck-BSMzp5T9.js +1 -0
- package/dist/assets/PrismApp-DbbDNVpy.js +2 -0
- package/dist/assets/{PrismAskController-C4MuB8om.js → PrismAskController-BgwijoI2.js} +1 -1
- package/dist/assets/PrismBriefingPlayer-B1_ziOwl.js +2 -0
- package/dist/assets/PrismOverlay-5ZVXu4WL.css +1 -0
- package/dist/assets/PrismOverlay-DLxvsh9l.js +105 -0
- package/dist/assets/PrismWorkbench-ZlhI7Mhw.js +1 -0
- package/dist/assets/{PrivacyApp-CBPMqUEA.js → PrivacyApp-Ki_5bM9Z.js} +10 -3
- package/dist/assets/ReplayCard-WKBKeSKc.js +2 -0
- package/dist/assets/ReplayOverlay-PFSJv540.js +1 -0
- package/dist/assets/{RewindOverlay-BO7YgDsW.js → RewindOverlay-okltPbfw.js} +1 -1
- package/dist/assets/{RippleApp-BnIUhIA0.js → RippleApp-DqVyZYKV.js} +2 -2
- package/dist/assets/{RippleAskController-BzdwYcYY.js → RippleAskController-BqnazbZ7.js} +1 -1
- package/dist/assets/{RippleOverlay-C9W7uVOp.js → RippleOverlay-4McJCSV8.js} +2 -2
- package/dist/assets/{SeeDontRead-ByW9HnOj.js → SeeDontRead-gARjJuF7.js} +1 -1
- package/dist/assets/ShareModal-C5HVVMtQ.js +2 -0
- package/dist/assets/{ShipCourse-CT_F9oJH.js → ShipCourse-BUm4TKUk.js} +1 -1
- package/dist/assets/{SignatureLoop-DejFTZ-Y.js → SignatureLoop-CYspJuij.js} +1 -1
- package/dist/assets/SynthesisApp-BNhF9aJ2.js +2 -0
- package/dist/assets/SynthesisOverlay-Bvwdc8uQ.js +66 -0
- package/dist/assets/TemplatePicker-DBa4lkpf.js +1 -0
- package/dist/assets/{TermsApp-ZzlhrXhd.js → TermsApp-BvwDtgIz.js} +5 -3
- package/dist/assets/TopicCanvas-Cwc6-K3q.js +2 -0
- package/dist/assets/{TourPrism-Cng4h9Ly.js → TourPrism-CCjys3-x.js} +1 -1
- package/dist/assets/{TrackerTile-DuUsFQTj.js → TrackerTile-B4j5qtop.js} +2 -2
- package/dist/assets/{TwoSurfaces-BeYMvVuX.js → TwoSurfaces-fGm1MJrD.js} +1 -1
- package/dist/assets/WorldOverlay-CLWtwuSl.css +1 -0
- package/dist/assets/WorldOverlay-JOp1rLyU.js +2 -0
- package/dist/assets/{WowFeatures-D58JgpLg.js → WowFeatures-D5dJvp9W.js} +1 -1
- package/dist/assets/{ZoomDeck-CPG2XQhr.js → ZoomDeck-DYmkT0TA.js} +1 -1
- package/dist/assets/{alternateFinishes-Cgks49KV.js → alternateFinishes-BHcX08Hs.js} +2 -2
- package/dist/assets/annotationAuto-B8_I3PNS.js +1 -0
- package/dist/assets/annotationReel-BA8Fv9Or.js +1 -0
- package/dist/assets/audioTrack-BJ2D_nuy.js +1 -0
- package/dist/assets/{BlockEmpty-B82uCse8.js → axis-DHAV38YM.js} +1 -1
- package/dist/assets/backup-DkCsHNEE.js +1 -0
- package/dist/assets/cache-7UEbF3S6.js +1 -0
- package/dist/assets/canvas-CYrbzF43.js +1 -0
- package/dist/assets/capture-Y6Qm8zCN.js +2 -0
- package/dist/assets/{catalog-DfIYAG3v.js → catalog-CRekRbKO.js} +1 -1
- package/dist/assets/chapters-DcdG3Lu8.js +1 -0
- package/dist/assets/{codeContext-goNoLAIr.js → codeContext-CFnI3GLf.js} +1 -1
- package/dist/assets/{confirmAdd-CxWIORcu.js → confirmAdd-D-TTCQ31.js} +1 -1
- package/dist/assets/contentVault-XKWjF2FB.js +1 -0
- package/dist/assets/{dashboardEvents-D1OP4ARB.js → dashboardEvents-MzCzak6K.js} +1 -1
- package/dist/assets/{deepen-BhP9OmH3.js → deepen-FZiVqiEc.js} +1 -1
- package/dist/assets/effort-BftNJCCV.js +39 -0
- package/dist/assets/empty-D51uhW0E.js +1 -0
- package/dist/assets/explode-niun7Zqc.js +15 -0
- package/dist/assets/{format-g3dP8OI3.js → format-BkvssSOr.js} +1 -1
- package/dist/assets/{generate-COfYQFmT.js → generate-BZobrQPX.js} +1 -1
- package/dist/assets/{generateBeats-CtffeoEa.js → generateBeats-Dqtfd8HC.js} +1 -1
- package/dist/assets/generateCourse-DPL0bO3L.js +28 -0
- package/dist/assets/generateLive-B7nlaqz8.js +24 -0
- package/dist/assets/{gesture-Bouqjr3g.js → gesture-BBS5nQEi.js} +2 -2
- package/dist/assets/{githubBrowser-BDiuD9dz.js → githubBrowser-CErQprLW.js} +1 -1
- package/dist/assets/homeTarget-CDc-r2mj.js +1 -0
- package/dist/assets/http-Bqk6nJiH.js +2 -0
- package/dist/assets/index-CFE0vqqO.css +1 -0
- package/dist/assets/{index-CdUH6Eo9.js → index-Db-FgYxX.js} +4 -4
- package/dist/assets/json-J4Y32_i9.js +1 -0
- package/dist/assets/kokoro-yB7iU_JU.js +1 -0
- package/dist/assets/{ledger-Cv0LBflx.js → ledger-DHS2di3l.js} +1 -1
- package/dist/assets/lens-DyGK7Owa.js +1 -0
- package/dist/assets/{lib-u95BsX_B.js → lib-Dkb5WBRc.js} +1 -1
- package/dist/assets/liveSchema-Z_39HuDI.js +125 -0
- package/dist/assets/{loader-ChcXMM9W.js → loader-Ciz6XbG-.js} +2 -2
- package/dist/assets/{model-CAewjw45.js → model-FR-9md4s.js} +1 -1
- package/dist/assets/{neighborhoods-CqECCmo8.js → neighborhoods-B56WegJs.js} +1 -1
- package/dist/assets/notes-CEloxKQ3.js +1 -0
- package/dist/assets/offers-eBNj_lSP.js +1 -0
- package/dist/assets/{openWorld-BHTJM39n.js → openWorld-B4VY6xO7.js} +1 -1
- package/dist/assets/{owners-HRBX7JN_.js → owners-CP-4Q59L.js} +1 -1
- package/dist/assets/{pen-DtEW1xf4.js → pen-UKrUHlDA.js} +1 -1
- package/dist/assets/{penStrokes-DlHnO9xE.js → penStrokes-CTC3AYiz.js} +1 -1
- package/dist/assets/{perfProbe-DaLsQQBb.js → perfProbe-DrOeB7yd.js} +1 -1
- package/dist/assets/{pin-BcKMUOiV.js → pin-C5_s4Ju5.js} +1 -1
- package/dist/assets/{planTracker-BwoKEftp.js → planTracker-BA-x4jbw.js} +1 -1
- package/dist/assets/{portal-BIN_aqvw.js → portal-TqJbr2rR.js} +1 -1
- package/dist/assets/prewarm-Bt5X_9CM.js +1 -0
- package/dist/assets/providers-CPhoN8j0.js +1 -0
- package/dist/assets/quietHours-LtXDl4-v.js +1 -0
- package/dist/assets/{ready-yBSGJubb.js → ready-_sg3IJkE.js} +1 -1
- package/dist/assets/{registry-DdgeK4fY.js → registry-BHDUu15I.js} +1 -1
- package/dist/assets/{registry-C8FuGbOr.js → registry-BPLbZIVz.js} +1 -1
- package/dist/assets/registry-BQuygaKz.js +1 -0
- package/dist/assets/registry-B_wlsfxh.js +1 -0
- package/dist/assets/{registry-Bl2qfp5V.js → registry-Bjf2Ggs6.js} +1 -1
- package/dist/assets/{registry-CE1T0z9x.js → registry-BmjYillB.js} +1 -1
- package/dist/assets/{registry-DGNSqTxE.js → registry-BodYWiga.js} +1 -1
- package/dist/assets/{registry-Dt0wu9rC.js → registry-BwlvYVHq.js} +1 -1
- package/dist/assets/{registry-CcHxIYQN.js → registry-BxkAuBx8.js} +1 -1
- package/dist/assets/{registry-BdHj_oIs.js → registry-C3bIc5Kp.js} +1 -1
- package/dist/assets/{registry-BFQQpjO2.js → registry-CfIJ9dJS.js} +1 -1
- package/dist/assets/{registry-CvylL2BN.css → registry-CmWPyj7Q.css} +1 -1
- package/dist/assets/{registry-BDXwUn3i.js → registry-CvtHBjkb.js} +1 -1
- package/dist/assets/{registry-Dd1lcXrO.js → registry-Cz5cZREW.js} +2 -2
- package/dist/assets/{registry-DdVZGvkL.js → registry-Di1fTdpi.js} +1 -1
- package/dist/assets/registry-GxnzELw0.js +1 -0
- package/dist/assets/{registry-Cgo4C0ux.js → registry-JRteQJcE.js} +1 -1
- package/dist/assets/registry-MwJlqlFZ.js +1 -0
- package/dist/assets/{registry-B53EEn8S.js → registry-YrewlFlo.js} +1 -1
- package/dist/assets/{registry-qRfnKTt4.js → registry-uiAoJKXu.js} +1 -1
- package/dist/assets/{relate-CqYpFpsO.js → relate-CCma73G9.js} +1 -1
- package/dist/assets/{replay-NognvQfM.js → replay-dMDmsTaD.js} +1 -1
- package/dist/assets/{run-CwMSPOps.js → run-BVgCc5Xi.js} +1 -1
- package/dist/assets/{run-DCQrxgHA.js → run-CW67JOGe.js} +1 -1
- package/dist/assets/{run-CuHaB8wF.js → run-DqsfL9JC.js} +1 -1
- package/dist/assets/{select-Dp-OeZfq.js → select-BuqyXI8k.js} +1 -1
- package/dist/assets/sentenceCase-CLDiNB0f.js +1 -0
- package/dist/assets/shard070-BmNyRhxw.js +1 -0
- package/dist/assets/spokenText-Dy-GZvZV.js +1 -0
- package/dist/assets/store-C9s8Bfz0.js +1 -0
- package/dist/assets/store-CgA7mKy1.js +1 -0
- package/dist/assets/store-D16dGt7I.js +1 -0
- package/dist/assets/{store-BWLbFXiY.js → store-DqOaVRLn.js} +1 -1
- package/dist/assets/store-gfPI5TVE.js +1 -0
- package/dist/assets/useDashboardLoop-Cnxmf7wU.js +5 -0
- package/dist/assets/{useDashboards-lgQnk2Al.js → useDashboards-B-EjE8FH.js} +1 -1
- package/dist/assets/{useLedger-1WVXef68.js → useLedger-D4cXEwI0.js} +1 -1
- package/dist/assets/useLiveConfig-CvOQTr0s.js +1 -0
- package/dist/assets/useStudy-70Iz4ZVn.js +1 -0
- package/dist/assets/validate-MQG0EcTD.js +4 -0
- package/dist/assets/walkSync-D6leFb_u.js +1 -0
- package/dist/fonts/LICENSE.txt +2 -0
- package/dist/fonts/PROVENANCE.md +1 -0
- package/dist/fonts/caveat-var-latin.woff2 +0 -0
- package/dist/fonts/fonts.css +10 -0
- package/dist/index.html +6 -2
- package/dist/legal/PRIVACY.md +9 -2
- package/dist/legal/SECURITY.md +1 -1
- package/dist/legal/TERMS.md +4 -2
- package/dist/legal/TRADEMARKS.md +3 -1
- package/docs/media/go-hub.jpg +0 -0
- package/docs/media/living-answer.jpg +0 -0
- package/package.json +1 -1
- package/dist/assets/AnnotationLayer-BsAcAd59.js +0 -0
- package/dist/assets/AnnotationLayer-ClU-e6qL.css +0 -1
- package/dist/assets/BriefingPlayer-74mRKyjl.js +0 -1
- package/dist/assets/ConversationVideoStudio-Df892wqs.js +0 -1
- package/dist/assets/CourseLessonReader-COmTQdSK.css +0 -1
- package/dist/assets/CourseLessonReader-DKQimh2S.js +0 -2
- package/dist/assets/CoursesApp-LeqL6dWT.js +0 -2
- package/dist/assets/DashboardDetail-2XL-J4rS.js +0 -2
- package/dist/assets/DashboardLoopGate-B95S4oKR.js +0 -2
- package/dist/assets/DashboardLoopRuntime-Wzk85QXi.js +0 -1
- package/dist/assets/DashboardsApp-ZGuT2QBi.js +0 -2
- package/dist/assets/DeepZoomApp-CPOsar8c.js +0 -37
- package/dist/assets/DelegatePanel-BkTtUMSl.js +0 -33
- package/dist/assets/ExportModal-D4WpAg2c.css +0 -1
- package/dist/assets/FeatureUseNotice-pQe4YHgJ.js +0 -1
- package/dist/assets/GalleryApp-CCLYcEqn.js +0 -1
- package/dist/assets/LegalApp-CpblxmmB.js +0 -1
- package/dist/assets/Library-CVj7R6F4.js +0 -1
- package/dist/assets/LiveApp-CSbjhgzM.js +0 -79
- package/dist/assets/LiveApp-CziqEsOb.css +0 -1
- package/dist/assets/LiveSettings-B4T6x41n.js +0 -6
- package/dist/assets/PresentationDeck-oEd6TXdN.js +0 -1
- package/dist/assets/PrismApp-Bju264hL.js +0 -2
- package/dist/assets/PrismBriefingPlayer-BY0RREUu.js +0 -2
- package/dist/assets/PrismOverlay-BwnF4BEn.css +0 -1
- package/dist/assets/PrismOverlay-DOWyOUVW.js +0 -105
- package/dist/assets/PrismWorkbench-9RonO2uv.js +0 -1
- package/dist/assets/ReplayCard-BnX73r9n.js +0 -2
- package/dist/assets/ReplayOverlay-B-Ok0mEs.js +0 -1
- package/dist/assets/ShareModal-Mo-dkgAZ.js +0 -2
- package/dist/assets/SynthesisApp-6W04mrMU.js +0 -2
- package/dist/assets/SynthesisOverlay-DDyFFiO8.js +0 -66
- package/dist/assets/TopicCanvas-CkqP92SC.js +0 -2
- package/dist/assets/WorldOverlay-D7ay5y4D.css +0 -1
- package/dist/assets/WorldOverlay-DeVpS8HE.js +0 -2
- package/dist/assets/annotationAuto-B2UdfJNj.js +0 -1
- package/dist/assets/annotationReel-K2FYv-3B.js +0 -1
- package/dist/assets/backup-CtEvuZoL.js +0 -1
- package/dist/assets/cache-CvbSI-pr.js +0 -1
- package/dist/assets/canvas-Ct-O9Jok.js +0 -1
- package/dist/assets/capture-CgaD86-q.js +0 -2
- package/dist/assets/chapters-CIvdCeBC.js +0 -1
- package/dist/assets/contentVault-xfUwSJ3i.js +0 -1
- package/dist/assets/effort-Bqti44UZ.js +0 -39
- package/dist/assets/empty-BO1NC9qY.js +0 -1
- package/dist/assets/explode-CPnvJiTg.js +0 -15
- package/dist/assets/friendlyAsk-BBdRZIar.js +0 -1
- package/dist/assets/generateCourse-BldPpgdh.js +0 -28
- package/dist/assets/generateLive-D5M8v38b.js +0 -24
- package/dist/assets/homeTarget-CwFsJYwb.js +0 -1
- package/dist/assets/http-Lar_UMKb.js +0 -2
- package/dist/assets/index-BIUYTk1W.css +0 -1
- package/dist/assets/json-B0N3XRZU.js +0 -1
- package/dist/assets/kokoro-D15HDMcP.js +0 -1
- package/dist/assets/lens-ChFJD9il.js +0 -1
- package/dist/assets/liveSchema-B8Y9HZxd.js +0 -100
- package/dist/assets/notes-BG5pIVAJ.js +0 -1
- package/dist/assets/prewarm-CyvSJKv4.js +0 -1
- package/dist/assets/providers-0DthJW_I.js +0 -1
- package/dist/assets/quietHours-D1nboK5q.js +0 -1
- package/dist/assets/registry-BQzvA61G.js +0 -1
- package/dist/assets/registry-CPImC7mO.js +0 -1
- package/dist/assets/registry-DPBJYRmC.js +0 -1
- package/dist/assets/registry-QbArAJKB.js +0 -1
- package/dist/assets/shard070-Dm9m2a5U.js +0 -1
- package/dist/assets/spokenText-C88IQJ0M.js +0 -1
- package/dist/assets/store-Ba9vzL4H.js +0 -1
- package/dist/assets/store-BwyOArJl.js +0 -1
- package/dist/assets/store-D-f8ZuaK.js +0 -1
- package/dist/assets/store-ruEsXJjU.js +0 -1
- package/dist/assets/useDashboardLoop-C3iCNS8X.js +0 -5
- package/dist/assets/useLiveConfig-B4CmBiAK.js +0 -1
- package/dist/assets/useStudy-CwCIyiTb.js +0 -1
- package/dist/assets/validate-sGUCmPAs.js +0 -4
- package/dist/assets/walkSync-DC9iE0BX.js +0 -1
- /package/dist/assets/{BriefingPlayer-DHV4vMga.css → PrismBriefingPlayer-DHV4vMga.css} +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t as e}from"./react-BZJXY1be.js";import{t}from"./compiler-runtime-qQQXpJgv.js";import{t as n}from"./jsx-runtime-DeHZSEgm.js";import{C as r,M as i,j as a}from"./store-Ba9vzL4H.js";import{t as o}from"./route-D4kd-D3B.js";import{t as s}from"./useDashboards-lgQnk2Al.js";import{c,f as l,p as u,s as d}from"./format-g3dP8OI3.js";import{n as f,r as p,t as ee}from"./notify-Bz4wuE4T.js";import{t as te}from"./CadenceCard-DxceyiPA.js";var m=e(),ne=t(),h={"15min":`Every ~15 min while open`,hourly:`Hourly while open`,"6h":`Every 6 hours while open`,daily:`Daily while open`,manual:`Manual only`},g={"15min":4,hourly:3,"6h":2,daily:1,manual:0},re=`You provide the API key and pay that provider directly. Data refreshes and AI analysis can consume quota or incur a third-party charge on every scheduled run. Check your provider’s pricing and make sure this cadence is what you want.`,ie=`Nothing runs on its own with this cadence — it only updates when you supply a value yourself, or when you explicitly pull in a conversation (which does spend a call at that moment).`;function ae(e,t,n){let r=n>0,i=r?g[e.data]:0,a=e.ai===`daily`?2:+(e.ai===`weekly`),o=i+(a+ +!!t),s=o>0,c;c=o===0?`none`:o<=1?`minimal`:o<=3?`light`:o<=5?`moderate`:`frequent`;let l=r?h[e.data]:`Free — no live-fetched metrics`,u;return u=t&&a===0?`Only when a line is crossed`:t?`${_(e.ai)} + when a line is crossed`:a===0?`Only when you ask`:_(e.ai),{level:c,usesKey:s,dataLabel:l,aiLabel:u,warning:s?re:ie}}function _(e){return e===`daily`?`Daily`:e===`weekly`?`Weekly`:`Manual`}var oe={none:`No automatic API usage`,minimal:`Minimal automatic API usage`,light:`Light automatic API usage`,moderate:`Moderate automatic API usage`,frequent:`Frequent automatic API usage`},v=n(),se=[{v:`on-cross`,label:`When a line crosses`,ai:`on-change`,smart:!0},{v:`daily`,label:`Daily`,ai:`daily`,smart:!1},{v:`weekly`,label:`Weekly`,ai:`weekly`,smart:!1},{v:`ask`,label:`Only when I ask`,ai:`manual`,smart:!1}];function ce(e,t){return e===`daily`?`daily`:e===`weekly`?`weekly`:e===`on-change`&&t?`on-cross`:`ask`}function y(e){let t=(0,ne.c)(131),{id:n}=e,l=s(),h;t[0]!==l||t[1]!==n?(h=l.find(e=>e.id===n)??null,t[0]=l,t[1]=n,t[2]=h):h=t[2];let g=h,re=u(),[ie]=(0,m.useState)(de),_;t[3]===g?_=t[4]:(_=g?ae(g.cadence,g.smartTrigger,c(g)+d(g)):null,t[3]=g,t[4]=_);let y=_,[b,me]=(0,m.useState)(!1),he,ge;t[5]===b?(he=t[6],ge=t[7]):(he=()=>{if(!b)return;let e=window.setTimeout(()=>me(!1),5e3);return()=>window.clearTimeout(e)},ge=[b],t[5]=b,t[6]=he,t[7]=ge),(0,m.useEffect)(he,ge);let[_e,ve]=(0,m.useState)(null),[x,ye]=(0,m.useState)(!1),be,xe;t[8]===x?(be=t[9],xe=t[10]):(be=()=>{if(!x)return;let e=window.setTimeout(()=>ye(!1),4e3);return()=>window.clearTimeout(e)},xe=[x],t[8]=x,t[9]=be,t[10]=xe),(0,m.useEffect)(be,xe);let Se;if(t[11]===n?Se=t[12]:(Se=[n],t[11]=n,t[12]=Se),(0,m.useEffect)(ue,Se),!g||!y){let e;t[13]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,v.jsx)(`p`,{className:`dash-empty-title`,children:`That dashboard isn’t here.`}),t[13]=e):e=t[13];let n;return t[14]===Symbol.for(`react.memo_cache_sentinel`)?(n=(0,v.jsx)(`div`,{className:`dash-settings`,children:(0,v.jsxs)(`div`,{className:`dash-empty`,children:[e,(0,v.jsx)(`p`,{className:`dash-empty-how`,children:(0,v.jsx)(`a`,{href:o.gallery,children:`Back to your dashboards →`})})]})}),t[14]=n):n=t[14],n}let Ce;t[15]===Symbol.for(`react.memo_cache_sentinel`)?(Ce=f(),t[15]=Ce):Ce=t[15];let we=Ce,Te=we?_e??`A desktop notification while Mavéa is open`:`Not supported in this browser`,Ee;t[16]!==g.alerts||t[17]!==g.id?(Ee=async()=>{if(g.alerts.push){i(g.id,{alerts:{...g.alerts,push:!1}}),ve(null);return}await p()?(i(g.id,{alerts:{...g.alerts,push:!0}}),ve(null)):ve(`Blocked — allow notifications for this site in your browser, then try again`)},t[16]=g.alerts,t[17]=g.id,t[18]=Ee):Ee=t[18];let De=Ee,Oe;t[19]===g?Oe=t[20]:(Oe=()=>{ee(g,[{id:`test`,label:`Test alert`,metricId:``,comparator:`gt`,threshold:0,state:`TRIGGERED`,sourceQuote:{text:``,saidAt:0}}]),ye(!0)},t[19]=g,t[20]=Oe);let ke=Oe,S;t[21]===g.id?S=t[22]:(S=o.detail(g.id),t[21]=g.id,t[22]=S);let C;t[23]===S?C=t[24]:(C=(0,v.jsx)(`a`,{className:`dash-back`,href:S,"aria-label":`Back to dashboard`,children:`←`}),t[23]=S,t[24]=C);let Ae;t[25]===Symbol.for(`react.memo_cache_sentinel`)?(Ae=(0,v.jsx)(`span`,{className:`dash-detail-title`,children:`Settings`}),t[25]=Ae):Ae=t[25];let w;t[26]===g.title?w=t[27]:(w=(0,v.jsx)(`span`,{className:`dash-detail-q`,children:g.title}),t[26]=g.title,t[27]=w);let T;t[28]!==C||t[29]!==w?(T=(0,v.jsxs)(`header`,{className:`dash-detail-head`,children:[C,Ae,w]}),t[28]=C,t[29]=w,t[30]=T):T=t[30];let E;t[31]!==g||t[32]!==ie?(E=(0,v.jsx)(te,{dashboard:g,now:ie}),t[31]=g,t[32]=ie,t[33]=E):E=t[33];let je,Me;t[34]===Symbol.for(`react.memo_cache_sentinel`)?(je=(0,v.jsx)(`div`,{className:`card-eyebrow`,children:`AI analysis`}),Me=(0,v.jsx)(`p`,{className:`dash-set-blurb`,children:`Mavéa reads the latest numbers and tells you, briefly and honestly, what they show and what’s changed since the last check — grounded in a fresh web search. Its read shows up on the dashboard. Each read is one model call on your API key. Choose when it runs:`}),t[34]=je,t[35]=Me):(je=t[34],Me=t[35]);let D;t[36]!==g.cadence.ai||t[37]!==g.smartTrigger?(D=ce(g.cadence.ai,g.smartTrigger),t[36]=g.cadence.ai,t[37]=g.smartTrigger,t[38]=D):D=t[38];let O;t[39]===g.id?O=t[40]:(O=e=>{let t=se.find(t=>t.v===e);t&&(a(g.id,{ai:t.ai}),i(g.id,{smartTrigger:t.smart}))},t[39]=g.id,t[40]=O);let k;t[41]!==D||t[42]!==O?(k=(0,v.jsx)(fe,{options:se,value:D,onPick:O}),t[41]=D,t[42]=O,t[43]=k):k=t[43];let Ne;t[44]===Symbol.for(`react.memo_cache_sentinel`)?(Ne=(0,v.jsx)(`p`,{className:`dash-set-blurb`,children:`Refreshing the numbers themselves — the web searches — is the Check cadence above. Checking whether a line crossed is a free comparison. This read is the one model call, and you can trigger it anytime from the dashboard with “Read the numbers now.”`}),t[44]=Ne):Ne=t[44];let A;t[45]===k?A=t[46]:(A=(0,v.jsxs)(`section`,{className:`card dash-set-card`,children:[je,Me,k,Ne]}),t[45]=k,t[46]=A);let Pe;t[47]===Symbol.for(`react.memo_cache_sentinel`)?(Pe=(0,v.jsx)(`div`,{className:`card-eyebrow`,children:`Where alerts go`}),t[47]=Pe):Pe=t[47];let j;t[48]!==g.alerts||t[49]!==g.id?(j=()=>i(g.id,{alerts:{...g.alerts,inApp:!g.alerts.inApp}}),t[48]=g.alerts,t[49]=g.id,t[50]=j):j=t[50];let M;t[51]!==g.alerts.inApp||t[52]!==j?(M=(0,v.jsx)(pe,{label:`In-app`,note:`A pop-up notice when a line you set is crossed — this dashboard’s own alert list always updates either way`,on:g.alerts.inApp,onToggle:j}),t[51]=g.alerts.inApp,t[52]=j,t[53]=M):M=t[53];let N;t[54]===De?N=t[55]:(N=()=>void De(),t[54]=De,t[55]=N);let P;t[56]!==g.alerts.push||t[57]!==Te||t[58]!==N?(P=(0,v.jsx)(pe,{label:`Push`,note:Te,on:g.alerts.push,disabled:!we,onToggle:N}),t[56]=g.alerts.push,t[57]=Te,t[58]=N,t[59]=P):P=t[59];let F;t[60]!==g.alerts.push||t[61]!==x||t[62]!==ke?(F=we&&g.alerts.push&&(0,v.jsxs)(`p`,{className:`dash-alert-test-row`,children:[(0,v.jsx)(`button`,{type:`button`,className:`dash-alert-test`,onClick:ke,children:`Send a test`}),x&&(0,v.jsx)(`span`,{className:`dash-alert-test-note`,role:`status`,children:`Sent a test — if nothing appeared, re-check this site’s notification permission.`})]}),t[60]=g.alerts.push,t[61]=x,t[62]=ke,t[63]=F):F=t[63];let I;t[64]!==M||t[65]!==P||t[66]!==F?(I=(0,v.jsxs)(`div`,{className:`dash-set-alerts`,children:[M,P,F]}),t[64]=M,t[65]=P,t[66]=F,t[67]=I):I=t[67];let Fe;t[68]===Symbol.for(`react.memo_cache_sentinel`)?(Fe=(0,v.jsx)(`p`,{className:`dash-set-blurb`,children:`Alerts are best-effort: a check that doesn’t run, a closed Mavéa, or blocked notifications means no alert. Don’t rely on one arriving for anything important.`}),t[68]=Fe):Fe=t[68];let L;t[69]===I?L=t[70]:(L=(0,v.jsxs)(`section`,{className:`card dash-set-card`,children:[Pe,I,Fe]}),t[69]=I,t[70]=L);let Ie;t[71]===Symbol.for(`react.memo_cache_sentinel`)?(Ie=(0,v.jsx)(`div`,{className:`card-eyebrow`,children:`Delete this dashboard`}),t[71]=Ie):Ie=t[71];let R;t[72]===g.title?R=t[73]:(R=(0,v.jsxs)(`p`,{className:`dash-set-blurb`,children:[`Removes “`,g.title,`” and everything tracked on it. The conversations it was built from are untouched.`]}),t[72]=g.title,t[73]=R);let Le=`dash-del-btn`+(b?` armed`:``),z;t[74]!==b||t[75]!==g.id?(z=()=>{if(!b){me(!0);return}r(g.id),window.location.hash=o.gallery},t[74]=b,t[75]=g.id,t[76]=z):z=t[76];let Re;t[77]===Symbol.for(`react.memo_cache_sentinel`)?(Re=()=>me(!1),t[77]=Re):Re=t[77];let ze=b?`Tap again to delete`:`Delete dashboard`,B;t[78]!==Le||t[79]!==z||t[80]!==ze?(B=(0,v.jsx)(`button`,{type:`button`,className:Le,onClick:z,onBlur:Re,children:ze}),t[78]=Le,t[79]=z,t[80]=ze,t[81]=B):B=t[81];let Be=b?`Tap again to delete ${g.title}`:``,V;t[82]===Be?V=t[83]:(V=(0,v.jsx)(`span`,{className:`dash-sr-only`,"aria-live":`polite`,children:Be}),t[82]=Be,t[83]=V);let H;t[84]!==R||t[85]!==B||t[86]!==V?(H=(0,v.jsxs)(`section`,{className:`card dash-set-card dash-set-danger`,children:[Ie,R,B,V]}),t[84]=R,t[85]=B,t[86]=V,t[87]=H):H=t[87];let U;t[88]!==E||t[89]!==A||t[90]!==L||t[91]!==H?(U=(0,v.jsxs)(`div`,{className:`dash-settings-cols`,children:[E,A,L,H]}),t[88]=E,t[89]=A,t[90]=L,t[91]=H,t[92]=U):U=t[92];let Ve;t[93]===Symbol.for(`react.memo_cache_sentinel`)?(Ve=(0,v.jsx)(`div`,{className:`card-eyebrow`,children:`On your API key`}),t[93]=Ve):Ve=t[93];let He=`dash-usage-band dash-usage--${y.level}`,Ue=oe[y.level],W;t[94]!==He||t[95]!==Ue?(W=(0,v.jsx)(`div`,{className:He,children:Ue}),t[94]=He,t[95]=Ue,t[96]=W):W=t[96];let We;t[97]===Symbol.for(`react.memo_cache_sentinel`)?(We=(0,v.jsx)(`span`,{children:`Data refresh`}),t[97]=We):We=t[97];let G;t[98]===y.dataLabel?G=t[99]:(G=(0,v.jsxs)(`div`,{className:`dash-usage-row`,children:[We,(0,v.jsx)(`span`,{className:`dash-usage-val`,children:y.dataLabel})]}),t[98]=y.dataLabel,t[99]=G);let Ge;t[100]===Symbol.for(`react.memo_cache_sentinel`)?(Ge=(0,v.jsx)(`span`,{children:`AI analysis`}),t[100]=Ge):Ge=t[100];let K;t[101]===y.aiLabel?K=t[102]:(K=(0,v.jsxs)(`div`,{className:`dash-usage-row`,children:[Ge,(0,v.jsx)(`span`,{className:`dash-usage-val`,children:y.aiLabel})]}),t[101]=y.aiLabel,t[102]=K);let Ke;t[103]===Symbol.for(`react.memo_cache_sentinel`)?(Ke=(0,v.jsxs)(`div`,{className:`dash-usage-row`,children:[(0,v.jsx)(`span`,{children:`Adding a conversation`}),(0,v.jsx)(`span`,{className:`dash-usage-val`,children:`One model call, each time`})]}),t[103]=Ke):Ke=t[103];let q;t[104]!==G||t[105]!==K?(q=(0,v.jsxs)(`div`,{className:`dash-usage-rows`,children:[G,K,Ke]}),t[104]=G,t[105]=K,t[106]=q):q=t[106];let J;t[107]===y.warning?J=t[108]:(J=(0,v.jsx)(`p`,{className:`dash-usage-warning`,children:y.warning}),t[107]=y.warning,t[108]=J);let qe,Je,Ye;t[109]===Symbol.for(`react.memo_cache_sentinel`)?(qe=(0,v.jsx)(`p`,{className:`dash-usage-warning`,children:`The bands above are the AUTOMATIC cadence only. "Refresh now", "Ask", and pulling in another conversation are things YOU trigger — each one is a real call on your key, regardless of what cadence you've set.`}),Je=(0,v.jsx)(`p`,{className:`dash-usage-warning`,children:`Automatic checks pause for the day once your daily search budget is reached — manual actions like Refresh now always work.`}),Ye=(0,v.jsx)(`div`,{className:`card-eyebrow dash-usage-global`,children:`Every dashboard`}),t[109]=qe,t[110]=Je,t[111]=Ye):(qe=t[109],Je=t[110],Ye=t[111]);let Xe;t[112]===Symbol.for(`react.memo_cache_sentinel`)?(Xe=(0,v.jsx)(`label`,{htmlFor:`dash-budget-input`,children:`Daily search budget (all dashboards)`}),t[112]=Xe):Xe=t[112];let Y;t[113]===re.dailySearchBudget?Y=t[114]:(Y=(0,v.jsxs)(`div`,{className:`dash-usage-budget`,children:[Xe,(0,v.jsx)(`input`,{id:`dash-budget-input`,type:`number`,min:5,max:200,value:re.dailySearchBudget,onChange:le})]}),t[113]=re.dailySearchBudget,t[114]=Y);let X;t[115]===g.id?X=t[116]:(X=o.detail(g.id),t[115]=g.id,t[116]=X);let Z;t[117]===X?Z=t[118]:(Z=(0,v.jsx)(`a`,{className:`dash-usage-done`,href:X,children:`Done`}),t[117]=X,t[118]=Z);let Q;t[119]!==W||t[120]!==q||t[121]!==J||t[122]!==Y||t[123]!==Z?(Q=(0,v.jsxs)(`aside`,{className:`card dash-usage`,"aria-label":`Estimated usage`,children:[Ve,W,q,J,qe,Je,Ye,Y,Z]}),t[119]=W,t[120]=q,t[121]=J,t[122]=Y,t[123]=Z,t[124]=Q):Q=t[124];let $;t[125]!==U||t[126]!==Q?($=(0,v.jsxs)(`div`,{className:`dash-settings-grid`,children:[U,Q]}),t[125]=U,t[126]=Q,t[127]=$):$=t[127];let Ze;return t[128]!==T||t[129]!==$?(Ze=(0,v.jsxs)(`div`,{className:`dash-settings`,children:[T,$]}),t[128]=T,t[129]=$,t[130]=Ze):Ze=t[130],Ze}function le(e){let t=Number(e.target.value);Number.isFinite(t)&&l({dailySearchBudget:t})}function ue(){window.scrollTo(0,0)}function de(){return Date.now()}function fe(e){let t=(0,ne.c)(9),{options:n,value:r,onPick:i}=e,a;if(t[0]!==i||t[1]!==n||t[2]!==r){let e;t[4]!==i||t[5]!==r?(e=e=>(0,v.jsx)(`button`,{type:`button`,className:`dash-seg-opt`+(e.v===r?` is-active`:``),"aria-pressed":e.v===r,onClick:()=>i(e.v),children:e.label},e.v),t[4]=i,t[5]=r,t[6]=e):e=t[6],a=n.map(e),t[0]=i,t[1]=n,t[2]=r,t[3]=a}else a=t[3];let o;return t[7]===a?o=t[8]:(o=(0,v.jsx)(`div`,{className:`dash-seg`,role:`group`,children:a}),t[7]=a,t[8]=o),o}function pe(e){let t=(0,ne.c)(16),{label:n,note:r,on:i,onToggle:a,disabled:o}=e,s=`dash-check`+(i?` on`:``)+(o?` disabled`:``),c=i?`✓`:``,l;t[0]===c?l=t[1]:(l=(0,v.jsx)(`span`,{className:`dash-check-box`,children:c}),t[0]=c,t[1]=l);let u;t[2]===n?u=t[3]:(u=(0,v.jsx)(`span`,{className:`dash-check-label`,children:n}),t[2]=n,t[3]=u);let d;t[4]===r?d=t[5]:(d=(0,v.jsx)(`span`,{className:`dash-check-note`,children:r}),t[4]=r,t[5]=d);let f;t[6]!==u||t[7]!==d?(f=(0,v.jsxs)(`span`,{className:`dash-check-text`,children:[u,d]}),t[6]=u,t[7]=d,t[8]=f):f=t[8];let p;return t[9]!==o||t[10]!==i||t[11]!==a||t[12]!==s||t[13]!==l||t[14]!==f?(p=(0,v.jsxs)(`button`,{type:`button`,className:s,onClick:a,disabled:o,"aria-pressed":i,children:[l,f]}),t[9]=o,t[10]=i,t[11]=a,t[12]=s,t[13]=l,t[14]=f,t[15]=p):p=t[15],p}export{y as DashboardSettings};
|
|
1
|
+
import{t as e}from"./react-BZJXY1be.js";import{t}from"./compiler-runtime-qQQXpJgv.js";import{t as n}from"./jsx-runtime-DeHZSEgm.js";import{C as r,M as i,j as a}from"./store-D16dGt7I.js";import{t as o}from"./route-D4kd-D3B.js";import{t as s}from"./useDashboards-B-EjE8FH.js";import{c,f as l,p as u,s as d}from"./format-BkvssSOr.js";import{n as f,r as p,t as ee}from"./notify-Bz4wuE4T.js";import{t as te}from"./CadenceCard-j1V7XOxX.js";var m=e(),ne=t(),h={"15min":`Every ~15 min while open`,hourly:`Hourly while open`,"6h":`Every 6 hours while open`,daily:`Daily while open`,manual:`Manual only`},g={"15min":4,hourly:3,"6h":2,daily:1,manual:0},re=`You provide the API key and pay that provider directly. Data refreshes and AI analysis can consume quota or incur a third-party charge on every scheduled run. Check your provider’s pricing and make sure this cadence is what you want.`,ie=`Nothing runs on its own with this cadence — it only updates when you supply a value yourself, or when you explicitly pull in a conversation (which does spend a call at that moment).`;function ae(e,t,n){let r=n>0,i=r?g[e.data]:0,a=e.ai===`daily`?2:+(e.ai===`weekly`),o=i+(a+ +!!t),s=o>0,c;c=o===0?`none`:o<=1?`minimal`:o<=3?`light`:o<=5?`moderate`:`frequent`;let l=r?h[e.data]:`Free — no live-fetched metrics`,u;return u=t&&a===0?`Only when a line is crossed`:t?`${_(e.ai)} + when a line is crossed`:a===0?`Only when you ask`:_(e.ai),{level:c,usesKey:s,dataLabel:l,aiLabel:u,warning:s?re:ie}}function _(e){return e===`daily`?`Daily`:e===`weekly`?`Weekly`:`Manual`}var oe={none:`No automatic API usage`,minimal:`Minimal automatic API usage`,light:`Light automatic API usage`,moderate:`Moderate automatic API usage`,frequent:`Frequent automatic API usage`},v=n(),se=[{v:`on-cross`,label:`When a line crosses`,ai:`on-change`,smart:!0},{v:`daily`,label:`Daily`,ai:`daily`,smart:!1},{v:`weekly`,label:`Weekly`,ai:`weekly`,smart:!1},{v:`ask`,label:`Only when I ask`,ai:`manual`,smart:!1}];function ce(e,t){return e===`daily`?`daily`:e===`weekly`?`weekly`:e===`on-change`&&t?`on-cross`:`ask`}function y(e){let t=(0,ne.c)(131),{id:n}=e,l=s(),h;t[0]!==l||t[1]!==n?(h=l.find(e=>e.id===n)??null,t[0]=l,t[1]=n,t[2]=h):h=t[2];let g=h,re=u(),[ie]=(0,m.useState)(de),_;t[3]===g?_=t[4]:(_=g?ae(g.cadence,g.smartTrigger,c(g)+d(g)):null,t[3]=g,t[4]=_);let y=_,[b,me]=(0,m.useState)(!1),he,ge;t[5]===b?(he=t[6],ge=t[7]):(he=()=>{if(!b)return;let e=window.setTimeout(()=>me(!1),5e3);return()=>window.clearTimeout(e)},ge=[b],t[5]=b,t[6]=he,t[7]=ge),(0,m.useEffect)(he,ge);let[_e,ve]=(0,m.useState)(null),[x,ye]=(0,m.useState)(!1),be,xe;t[8]===x?(be=t[9],xe=t[10]):(be=()=>{if(!x)return;let e=window.setTimeout(()=>ye(!1),4e3);return()=>window.clearTimeout(e)},xe=[x],t[8]=x,t[9]=be,t[10]=xe),(0,m.useEffect)(be,xe);let Se;if(t[11]===n?Se=t[12]:(Se=[n],t[11]=n,t[12]=Se),(0,m.useEffect)(ue,Se),!g||!y){let e;t[13]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,v.jsx)(`p`,{className:`dash-empty-title`,children:`That dashboard isn’t here.`}),t[13]=e):e=t[13];let n;return t[14]===Symbol.for(`react.memo_cache_sentinel`)?(n=(0,v.jsx)(`div`,{className:`dash-settings`,children:(0,v.jsxs)(`div`,{className:`dash-empty`,children:[e,(0,v.jsx)(`p`,{className:`dash-empty-how`,children:(0,v.jsx)(`a`,{href:o.gallery,children:`Back to your dashboards →`})})]})}),t[14]=n):n=t[14],n}let Ce;t[15]===Symbol.for(`react.memo_cache_sentinel`)?(Ce=f(),t[15]=Ce):Ce=t[15];let we=Ce,Te=we?_e??`A desktop notification while Mavéa is open`:`Not supported in this browser`,Ee;t[16]!==g.alerts||t[17]!==g.id?(Ee=async()=>{if(g.alerts.push){i(g.id,{alerts:{...g.alerts,push:!1}}),ve(null);return}await p()?(i(g.id,{alerts:{...g.alerts,push:!0}}),ve(null)):ve(`Blocked — allow notifications for this site in your browser, then try again`)},t[16]=g.alerts,t[17]=g.id,t[18]=Ee):Ee=t[18];let De=Ee,Oe;t[19]===g?Oe=t[20]:(Oe=()=>{ee(g,[{id:`test`,label:`Test alert`,metricId:``,comparator:`gt`,threshold:0,state:`TRIGGERED`,sourceQuote:{text:``,saidAt:0}}]),ye(!0)},t[19]=g,t[20]=Oe);let ke=Oe,S;t[21]===g.id?S=t[22]:(S=o.detail(g.id),t[21]=g.id,t[22]=S);let C;t[23]===S?C=t[24]:(C=(0,v.jsx)(`a`,{className:`dash-back`,href:S,"aria-label":`Back to dashboard`,children:`←`}),t[23]=S,t[24]=C);let Ae;t[25]===Symbol.for(`react.memo_cache_sentinel`)?(Ae=(0,v.jsx)(`span`,{className:`dash-detail-title`,children:`Settings`}),t[25]=Ae):Ae=t[25];let w;t[26]===g.title?w=t[27]:(w=(0,v.jsx)(`span`,{className:`dash-detail-q`,children:g.title}),t[26]=g.title,t[27]=w);let T;t[28]!==C||t[29]!==w?(T=(0,v.jsxs)(`header`,{className:`dash-detail-head`,children:[C,Ae,w]}),t[28]=C,t[29]=w,t[30]=T):T=t[30];let E;t[31]!==g||t[32]!==ie?(E=(0,v.jsx)(te,{dashboard:g,now:ie}),t[31]=g,t[32]=ie,t[33]=E):E=t[33];let je,Me;t[34]===Symbol.for(`react.memo_cache_sentinel`)?(je=(0,v.jsx)(`div`,{className:`card-eyebrow`,children:`AI analysis`}),Me=(0,v.jsx)(`p`,{className:`dash-set-blurb`,children:`Mavéa reads the latest numbers and tells you, briefly and honestly, what they show and what’s changed since the last check — grounded in a fresh web search. Its read shows up on the dashboard. Each read is one model call on your API key. Choose when it runs:`}),t[34]=je,t[35]=Me):(je=t[34],Me=t[35]);let D;t[36]!==g.cadence.ai||t[37]!==g.smartTrigger?(D=ce(g.cadence.ai,g.smartTrigger),t[36]=g.cadence.ai,t[37]=g.smartTrigger,t[38]=D):D=t[38];let O;t[39]===g.id?O=t[40]:(O=e=>{let t=se.find(t=>t.v===e);t&&(a(g.id,{ai:t.ai}),i(g.id,{smartTrigger:t.smart}))},t[39]=g.id,t[40]=O);let k;t[41]!==D||t[42]!==O?(k=(0,v.jsx)(fe,{options:se,value:D,onPick:O}),t[41]=D,t[42]=O,t[43]=k):k=t[43];let Ne;t[44]===Symbol.for(`react.memo_cache_sentinel`)?(Ne=(0,v.jsx)(`p`,{className:`dash-set-blurb`,children:`Refreshing the numbers themselves — the web searches — is the Check cadence above. Checking whether a line crossed is a free comparison. This read is the one model call, and you can trigger it anytime from the dashboard with “Read the numbers now.”`}),t[44]=Ne):Ne=t[44];let A;t[45]===k?A=t[46]:(A=(0,v.jsxs)(`section`,{className:`card dash-set-card`,children:[je,Me,k,Ne]}),t[45]=k,t[46]=A);let Pe;t[47]===Symbol.for(`react.memo_cache_sentinel`)?(Pe=(0,v.jsx)(`div`,{className:`card-eyebrow`,children:`Where alerts go`}),t[47]=Pe):Pe=t[47];let j;t[48]!==g.alerts||t[49]!==g.id?(j=()=>i(g.id,{alerts:{...g.alerts,inApp:!g.alerts.inApp}}),t[48]=g.alerts,t[49]=g.id,t[50]=j):j=t[50];let M;t[51]!==g.alerts.inApp||t[52]!==j?(M=(0,v.jsx)(pe,{label:`In-app`,note:`A pop-up notice when a line you set is crossed — this dashboard’s own alert list always updates either way`,on:g.alerts.inApp,onToggle:j}),t[51]=g.alerts.inApp,t[52]=j,t[53]=M):M=t[53];let N;t[54]===De?N=t[55]:(N=()=>void De(),t[54]=De,t[55]=N);let P;t[56]!==g.alerts.push||t[57]!==Te||t[58]!==N?(P=(0,v.jsx)(pe,{label:`Push`,note:Te,on:g.alerts.push,disabled:!we,onToggle:N}),t[56]=g.alerts.push,t[57]=Te,t[58]=N,t[59]=P):P=t[59];let F;t[60]!==g.alerts.push||t[61]!==x||t[62]!==ke?(F=we&&g.alerts.push&&(0,v.jsxs)(`p`,{className:`dash-alert-test-row`,children:[(0,v.jsx)(`button`,{type:`button`,className:`dash-alert-test`,onClick:ke,children:`Send a test`}),x&&(0,v.jsx)(`span`,{className:`dash-alert-test-note`,role:`status`,children:`Sent a test — if nothing appeared, re-check this site’s notification permission.`})]}),t[60]=g.alerts.push,t[61]=x,t[62]=ke,t[63]=F):F=t[63];let I;t[64]!==M||t[65]!==P||t[66]!==F?(I=(0,v.jsxs)(`div`,{className:`dash-set-alerts`,children:[M,P,F]}),t[64]=M,t[65]=P,t[66]=F,t[67]=I):I=t[67];let Fe;t[68]===Symbol.for(`react.memo_cache_sentinel`)?(Fe=(0,v.jsx)(`p`,{className:`dash-set-blurb`,children:`Alerts are best-effort: a check that doesn’t run, a closed Mavéa, or blocked notifications means no alert. Don’t rely on one arriving for anything important.`}),t[68]=Fe):Fe=t[68];let L;t[69]===I?L=t[70]:(L=(0,v.jsxs)(`section`,{className:`card dash-set-card`,children:[Pe,I,Fe]}),t[69]=I,t[70]=L);let Ie;t[71]===Symbol.for(`react.memo_cache_sentinel`)?(Ie=(0,v.jsx)(`div`,{className:`card-eyebrow`,children:`Delete this dashboard`}),t[71]=Ie):Ie=t[71];let R;t[72]===g.title?R=t[73]:(R=(0,v.jsxs)(`p`,{className:`dash-set-blurb`,children:[`Removes “`,g.title,`” and everything tracked on it. The conversations it was built from are untouched.`]}),t[72]=g.title,t[73]=R);let Le=`dash-del-btn`+(b?` armed`:``),z;t[74]!==b||t[75]!==g.id?(z=()=>{if(!b){me(!0);return}r(g.id),window.location.hash=o.gallery},t[74]=b,t[75]=g.id,t[76]=z):z=t[76];let Re;t[77]===Symbol.for(`react.memo_cache_sentinel`)?(Re=()=>me(!1),t[77]=Re):Re=t[77];let ze=b?`Tap again to delete`:`Delete dashboard`,B;t[78]!==Le||t[79]!==z||t[80]!==ze?(B=(0,v.jsx)(`button`,{type:`button`,className:Le,onClick:z,onBlur:Re,children:ze}),t[78]=Le,t[79]=z,t[80]=ze,t[81]=B):B=t[81];let Be=b?`Tap again to delete ${g.title}`:``,V;t[82]===Be?V=t[83]:(V=(0,v.jsx)(`span`,{className:`dash-sr-only`,"aria-live":`polite`,children:Be}),t[82]=Be,t[83]=V);let H;t[84]!==R||t[85]!==B||t[86]!==V?(H=(0,v.jsxs)(`section`,{className:`card dash-set-card dash-set-danger`,children:[Ie,R,B,V]}),t[84]=R,t[85]=B,t[86]=V,t[87]=H):H=t[87];let U;t[88]!==E||t[89]!==A||t[90]!==L||t[91]!==H?(U=(0,v.jsxs)(`div`,{className:`dash-settings-cols`,children:[E,A,L,H]}),t[88]=E,t[89]=A,t[90]=L,t[91]=H,t[92]=U):U=t[92];let Ve;t[93]===Symbol.for(`react.memo_cache_sentinel`)?(Ve=(0,v.jsx)(`div`,{className:`card-eyebrow`,children:`On your API key`}),t[93]=Ve):Ve=t[93];let He=`dash-usage-band dash-usage--${y.level}`,Ue=oe[y.level],W;t[94]!==He||t[95]!==Ue?(W=(0,v.jsx)(`div`,{className:He,children:Ue}),t[94]=He,t[95]=Ue,t[96]=W):W=t[96];let We;t[97]===Symbol.for(`react.memo_cache_sentinel`)?(We=(0,v.jsx)(`span`,{children:`Data refresh`}),t[97]=We):We=t[97];let G;t[98]===y.dataLabel?G=t[99]:(G=(0,v.jsxs)(`div`,{className:`dash-usage-row`,children:[We,(0,v.jsx)(`span`,{className:`dash-usage-val`,children:y.dataLabel})]}),t[98]=y.dataLabel,t[99]=G);let Ge;t[100]===Symbol.for(`react.memo_cache_sentinel`)?(Ge=(0,v.jsx)(`span`,{children:`AI analysis`}),t[100]=Ge):Ge=t[100];let K;t[101]===y.aiLabel?K=t[102]:(K=(0,v.jsxs)(`div`,{className:`dash-usage-row`,children:[Ge,(0,v.jsx)(`span`,{className:`dash-usage-val`,children:y.aiLabel})]}),t[101]=y.aiLabel,t[102]=K);let Ke;t[103]===Symbol.for(`react.memo_cache_sentinel`)?(Ke=(0,v.jsxs)(`div`,{className:`dash-usage-row`,children:[(0,v.jsx)(`span`,{children:`Adding a conversation`}),(0,v.jsx)(`span`,{className:`dash-usage-val`,children:`One model call, each time`})]}),t[103]=Ke):Ke=t[103];let q;t[104]!==G||t[105]!==K?(q=(0,v.jsxs)(`div`,{className:`dash-usage-rows`,children:[G,K,Ke]}),t[104]=G,t[105]=K,t[106]=q):q=t[106];let J;t[107]===y.warning?J=t[108]:(J=(0,v.jsx)(`p`,{className:`dash-usage-warning`,children:y.warning}),t[107]=y.warning,t[108]=J);let qe,Je,Ye;t[109]===Symbol.for(`react.memo_cache_sentinel`)?(qe=(0,v.jsx)(`p`,{className:`dash-usage-warning`,children:`The bands above are the AUTOMATIC cadence only. "Refresh now", "Ask", and pulling in another conversation are things YOU trigger — each one is a real call on your key, regardless of what cadence you've set.`}),Je=(0,v.jsx)(`p`,{className:`dash-usage-warning`,children:`Automatic checks pause for the day once your daily search budget is reached — manual actions like Refresh now always work.`}),Ye=(0,v.jsx)(`div`,{className:`card-eyebrow dash-usage-global`,children:`Every dashboard`}),t[109]=qe,t[110]=Je,t[111]=Ye):(qe=t[109],Je=t[110],Ye=t[111]);let Xe;t[112]===Symbol.for(`react.memo_cache_sentinel`)?(Xe=(0,v.jsx)(`label`,{htmlFor:`dash-budget-input`,children:`Daily search budget (all dashboards)`}),t[112]=Xe):Xe=t[112];let Y;t[113]===re.dailySearchBudget?Y=t[114]:(Y=(0,v.jsxs)(`div`,{className:`dash-usage-budget`,children:[Xe,(0,v.jsx)(`input`,{id:`dash-budget-input`,type:`number`,min:5,max:200,value:re.dailySearchBudget,onChange:le})]}),t[113]=re.dailySearchBudget,t[114]=Y);let X;t[115]===g.id?X=t[116]:(X=o.detail(g.id),t[115]=g.id,t[116]=X);let Z;t[117]===X?Z=t[118]:(Z=(0,v.jsx)(`a`,{className:`dash-usage-done`,href:X,children:`Done`}),t[117]=X,t[118]=Z);let Q;t[119]!==W||t[120]!==q||t[121]!==J||t[122]!==Y||t[123]!==Z?(Q=(0,v.jsxs)(`aside`,{className:`card dash-usage`,"aria-label":`Estimated usage`,children:[Ve,W,q,J,qe,Je,Ye,Y,Z]}),t[119]=W,t[120]=q,t[121]=J,t[122]=Y,t[123]=Z,t[124]=Q):Q=t[124];let $;t[125]!==U||t[126]!==Q?($=(0,v.jsxs)(`div`,{className:`dash-settings-grid`,children:[U,Q]}),t[125]=U,t[126]=Q,t[127]=$):$=t[127];let Ze;return t[128]!==T||t[129]!==$?(Ze=(0,v.jsxs)(`div`,{className:`dash-settings`,children:[T,$]}),t[128]=T,t[129]=$,t[130]=Ze):Ze=t[130],Ze}function le(e){let t=Number(e.target.value);Number.isFinite(t)&&l({dailySearchBudget:t})}function ue(){window.scrollTo(0,0)}function de(){return Date.now()}function fe(e){let t=(0,ne.c)(9),{options:n,value:r,onPick:i}=e,a;if(t[0]!==i||t[1]!==n||t[2]!==r){let e;t[4]!==i||t[5]!==r?(e=e=>(0,v.jsx)(`button`,{type:`button`,className:`dash-seg-opt`+(e.v===r?` is-active`:``),"aria-pressed":e.v===r,onClick:()=>i(e.v),children:e.label},e.v),t[4]=i,t[5]=r,t[6]=e):e=t[6],a=n.map(e),t[0]=i,t[1]=n,t[2]=r,t[3]=a}else a=t[3];let o;return t[7]===a?o=t[8]:(o=(0,v.jsx)(`div`,{className:`dash-seg`,role:`group`,children:a}),t[7]=a,t[8]=o),o}function pe(e){let t=(0,ne.c)(16),{label:n,note:r,on:i,onToggle:a,disabled:o}=e,s=`dash-check`+(i?` on`:``)+(o?` disabled`:``),c=i?`✓`:``,l;t[0]===c?l=t[1]:(l=(0,v.jsx)(`span`,{className:`dash-check-box`,children:c}),t[0]=c,t[1]=l);let u;t[2]===n?u=t[3]:(u=(0,v.jsx)(`span`,{className:`dash-check-label`,children:n}),t[2]=n,t[3]=u);let d;t[4]===r?d=t[5]:(d=(0,v.jsx)(`span`,{className:`dash-check-note`,children:r}),t[4]=r,t[5]=d);let f;t[6]!==u||t[7]!==d?(f=(0,v.jsxs)(`span`,{className:`dash-check-text`,children:[u,d]}),t[6]=u,t[7]=d,t[8]=f):f=t[8];let p;return t[9]!==o||t[10]!==i||t[11]!==a||t[12]!==s||t[13]!==l||t[14]!==f?(p=(0,v.jsxs)(`button`,{type:`button`,className:s,onClick:a,disabled:o,"aria-pressed":i,children:[l,f]}),t[9]=o,t[10]=i,t[11]=a,t[12]=s,t[13]=l,t[14]=f,t[15]=p):p=t[15],p}export{y as DashboardSettings};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/AppCommandPalette-DS4sLY_K.js","assets/react-BZJXY1be.js","assets/rolldown-runtime-DkW27tQK.js","assets/jsx-runtime-DeHZSEgm.js","assets/index-Db-FgYxX.js","assets/compiler-runtime-qQQXpJgv.js","assets/useInView-DsTvv7L_.js","assets/coreIcons-DDTChE1H.js","assets/preload-helper-CiWYd9n-.js","assets/preloadableLazy-MIX1ApBW.js","assets/cachedImport-DW0gP14h.js","assets/lazyRetry-D50B1UMY.js","assets/theme-D5D55hZi.js","assets/index-CFE0vqqO.css","assets/registry-BodYWiga.js","assets/CommandPalette-Cz8h94Jd.js","assets/icons-gLFQTv74.js","assets/CommandPalette-Bb-eErih.css","assets/demoPaletteItems-NPCSaSU6.js","assets/planTracker-BA-x4jbw.js","assets/http-Bqk6nJiH.js","assets/providers-CPhoN8j0.js","assets/blockTypes-DUDdP3pB.js","assets/info-CiqHR5cs.js","assets/attachments-BW-vki-E.js","assets/route-CMdTFx0P.js","assets/json-J4Y32_i9.js","assets/now-C9-UAzTC.js","assets/PlanReview-wOsBpofo.js","assets/store-D16dGt7I.js","assets/contentVault-XKWjF2FB.js","assets/keyVault-Aw5Y2PjT.js","assets/localBudget-CxLP6bjE.js","assets/useDashboardLoop-Cnxmf7wU.js","assets/number-zqlPMliA.js","assets/useLiveConfig-CvOQTr0s.js","assets/ledger-DHS2di3l.js","assets/format-BkvssSOr.js","assets/dataPending-DGdCvY5Y.js","assets/predictions-CkVKHq-5.js","assets/notify-Bz4wuE4T.js","assets/dashboardEvents-MzCzak6K.js","assets/spokenText-Dy-GZvZV.js","assets/kokoro-yB7iU_JU.js","assets/confirmAdd-D-TTCQ31.js","assets/relate-CCma73G9.js","assets/dashboards-Cvs28p3Z.css","assets/dash-composer-DeNWVwpU.css","assets/RewindOverlay-okltPbfw.js","assets/useFocusTrap-CJmpNZv2.js","assets/motion-DxHSlPN6.js","assets/useDashboards-B-EjE8FH.js","assets/useLedger-D4cXEwI0.js","assets/checkLogModel-BMtruriG.js","assets/RewindOverlay-C92qgvmi.css","assets/DashPresent-BdOJ7F9D.js","assets/TrackerTile-B4j5qtop.js","assets/route-D4kd-D3B.js","assets/AreaChart-DZGCSEwt.js","assets/tiles-D-s6v-mA.js","assets/tiles-CBiVVjtT.css","assets/DashPresent-DQYcgp-W.css","assets/templates-BIkAr4YH.css","assets/DashboardDetail-Chrpi1Yk.js","assets/TopicCanvas-Cwc6-K3q.js","assets/loader-Ciz6XbG-.js","assets/FallbackCard-ap_4wOfj.js","assets/blockLabel-FogyzEQY.js","assets/FallbackCard-D_6ps1xA.css","assets/motion-BY_Egaxm.js","assets/useSpatialCanvas-CfmZOXXP.js","assets/CanvasSkeleton-BmGjJHUQ.js","assets/CanvasSkeleton-DYASkTjW.css","assets/richText-BkxJhl9N.js","assets/toast-BBNs2h3L.js","assets/format-q0LwBjID.js","assets/safeImageUrl-BINWXOTz.js","assets/useValidatedImage-BQi2c66o.js","assets/empty-D51uhW0E.js","assets/deepenStore-BWLLzLCY.js","assets/catalog-BHjl-1uH.js","assets/lib-Dkb5WBRc.js","assets/BlockEmpty-B-giiUPy.js","assets/lib-DP9Kuxqk.css","assets/TopicCanvas-DWTm611H.css","assets/sourceHost-BV3t2XDb.js","assets/canvas-CYrbzF43.js","assets/pin-C5_s4Ju5.js","assets/pin-BXyyKnci.css","assets/CadenceCard-j1V7XOxX.js","assets/CheckLogRail-onH7DaxW.js","assets/CheckLogRail-BOaXnqWK.css","assets/DashboardDetail-8J8TsdQg.css","assets/DashboardSettings-5tn-dw6G.js","assets/DashboardOverview-C3hv9sm1.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{t as e}from"./react-BZJXY1be.js";import{t}from"./compiler-runtime-qQQXpJgv.js";import{t as n}from"./jsx-runtime-DeHZSEgm.js";import{n as r,t as i}from"./preload-helper-CiWYd9n-.js";import{t as a}from"./cachedImport-DW0gP14h.js";import{n as o,t as s}from"./preloadableLazy-MIX1ApBW.js";import{n as c,t as l}from"./theme-D5D55hZi.js";import{A as u,E as d,O as f,it as p,j as m,k as h,lt as g,nt as _,rt as v}from"./index-Db-FgYxX.js";import{n as y}from"./icons-gLFQTv74.js";import{t as b}from"./useFocusTrap-CJmpNZv2.js";import{r as x}from"./sourceHost-BV3t2XDb.js";import{T as S,w as C}from"./kokoro-yB7iU_JU.js";import{t as w}from"./FeatureUseNotice-CCI4mM39.js";import{t as T}from"./homeTarget-CDc-r2mj.js";/* empty css */import{m as E}from"./store-D16dGt7I.js";import{d as D,n as O,r as ee,u as k}from"./useLiveConfig-CvOQTr0s.js";import{t as A}from"./TopbarMenu-DQXxqSWY.js";import{n as te}from"./TemplatePicker-DBa4lkpf.js";import{n as j,r as M,t as N}from"./route-D4kd-D3B.js";import{n as ne,t as P}from"./useDashboards-B-EjE8FH.js";import{a as F}from"./useStudy-70Iz4ZVn.js";import{t as I}from"./useLedger-D4cXEwI0.js";import{i as L,p as R,u as z}from"./format-BkvssSOr.js";import{n as re,r as ie,t as B}from"./TrackerTile-B4j5qtop.js";import{n as ae,o as oe,s as se}from"./dashboardEvents-MzCzak6K.js";/* empty css */import{t as V}from"./CheckLogRail-onH7DaxW.js";/* empty css */var H=e(),U=t(),W=n();function G({href:e,label:t=`Mavéa`,className:n}){return(0,W.jsxs)(`a`,{className:n,href:e,"aria-label":`${t} home`,children:[(0,W.jsx)(`span`,{className:`jelly-mark`}),t]})}var K=g();function ce(e){let t=(t,n,r)=>({label:t,blurb:n,onClick:()=>{window.location.hash=r},preload:()=>f(r)??Promise.resolve(),show:r!==e.omitHash}),n=(t,n)=>({label:t,blurb:n,onClick:e.enterLive,show:!0});return{create:[n(`New`,`Start a fresh session`)],practice:[n(`Rehearse`,`Practice a hard conversation — take the seat, or send your Mavéa`),t(`Study`,`Go through your flashcards, and organize your decks`,`#/flashcards`),t(`Courses`,`Turn a topic into a structured syllabus — a lesson at a time, at your pace`,`#/courses`)],share:[n(`Present`,`Fill the room — the chrome falls away, the mic stays live`),n(`Export`,`Choose a template and export a polished PDF`),n(`Share`,`Share this conversation as a story`)],explore:[{label:`Search all features`,blurb:`Browse Mavéa’s feature index · ${u}`,onClick:e.openPalette,show:!0},n(`Atlas`,`Kept conversations and topics, as a place`),n(`Watch me think`,`A live map of your thinking`),t(`Prism`,`Split your document into a map of its claims`,`#/prism`),t(`Ripple`,`Model a code change’s impact, risks, and a proposed ship order`,`#/ripple`),t(`Dashboards`,`Dashboards that refresh on schedule while Mavéa is open`,`#/dashboards`),t(`Deep Zoom`,`Telescope any topic from big picture to finest detail`,`#/deepzoom`)]}}r();var q=s(()=>i(()=>import(`./AppCommandPalette-DS4sLY_K.js`).then(e=>({default:e.AppCommandPalette})),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18]))),le=q.Component;function ue(e){let t=(0,U.c)(26),{omitHash:n}=e,{open:r,openPalette:i,closePalette:a}=m(),o=de,s;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(s=()=>{v(),o()},t[0]=s):s=t[0];let c=s,l;t[1]===Symbol.for(`react.memo_cache_sentinel`)?(l=e=>()=>{v(),_(e),p(),o()},t[1]=l):l=t[1];let u=l,f;t[2]!==n||t[3]!==i?(f=ce({openPalette:i,enterLive:o,omitHash:n}),t[2]=n,t[3]=i,t[4]=f):f=t[4];let g=f,y=F(),b;t[5]===g.create?b=t[6]:(b=(0,W.jsx)(A,{label:`Create`,items:g.create}),t[5]=g.create,t[6]=b);let x;t[7]!==g.practice||t[8]!==y?(x=(0,W.jsx)(A,{label:`Practice`,items:g.practice,badge:y}),t[7]=g.practice,t[8]=y,t[9]=x):x=t[9];let S;t[10]===g.share?S=t[11]:(S=(0,W.jsx)(A,{label:`Share`,items:g.share}),t[10]=g.share,t[11]=S);let C;t[12]===g.explore?C=t[13]:(C=(0,W.jsx)(A,{label:`Explore`,items:g.explore}),t[12]=g.explore,t[13]=C);let w;t[14]===i?w=t[15]:(w=(0,W.jsx)(h,{onOpen:i,preload:q.preload}),t[14]=i,t[15]=w);let T;t[16]!==a||t[17]!==r?(T=r&&(0,K.createPortal)((0,W.jsx)(d,{label:`Feature search`,overlay:!0,children:(0,W.jsx)(le,{onClose:a,startTour:c,watchInLive:u,enterLive:o})}),document.body),t[16]=a,t[17]=r,t[18]=T):T=t[18];let E;return t[19]!==b||t[20]!==x||t[21]!==S||t[22]!==C||t[23]!==w||t[24]!==T?(E=(0,W.jsxs)(W.Fragment,{children:[b,x,S,C,w,T]}),t[19]=b,t[20]=x,t[21]=S,t[22]=C,t[23]=w,t[24]=T,t[25]=E):E=t[25],E}function de(){window.location.hash=`#/live`}function fe(e,t){let n=e.cadence.window;return!!n&&t>=n.startAt&&t<=n.endAt}function pe(e){return new Date(e).toLocaleTimeString([],{hour:`numeric`,minute:`2-digit`})}function me(e){let t=(0,U.c)(18),{state:n}=e;if(n.paused){let e;t[0]===n.resumesAt?e=t[1]:(e=pe(n.resumesAt),t[0]=n.resumesAt,t[1]=e);let r;return t[2]===e?r=t[3]:(r=(0,W.jsx)(`div`,{className:`dash-budget dash-budget--paused`,title:`Automatic checks are paused until your budget resets`,children:(0,W.jsxs)(`span`,{className:`dash-budget-label`,children:[`PAUSED · RESUMES `,e]})}),t[2]=e,t[3]=r),r}let r;t[4]!==n.cap||t[5]!==n.used?(r=n.cap>0?Math.min(100,Math.round(n.used/n.cap*100)):0,t[4]=n.cap,t[5]=n.used,t[6]=r):r=t[6];let i=r,a=`dash-budget`+(n.amber?` dash-budget--amber`:``),o=`${n.used} of ${n.cap} searches used today`,s=`${i}%`,c;t[7]===s?c=t[8]:(c=(0,W.jsx)(`span`,{className:`dash-budget-track`,children:(0,W.jsx)(`span`,{className:`dash-budget-fill`,style:{width:s}})}),t[7]=s,t[8]=c);let l=n.amber?` · LOW`:``,u;t[9]!==n.cap||t[10]!==n.used||t[11]!==l?(u=(0,W.jsxs)(`span`,{className:`dash-budget-label`,children:[n.used,`/`,n.cap,` SEARCHES TODAY`,l]}),t[9]=n.cap,t[10]=n.used,t[11]=l,t[12]=u):u=t[12];let d;return t[13]!==a||t[14]!==o||t[15]!==c||t[16]!==u?(d=(0,W.jsxs)(`div`,{className:a,title:o,children:[c,u]}),t[13]=a,t[14]=o,t[15]=c,t[16]=u,t[17]=d):d=t[17],d}function he(e){let t=(0,U.c)(28),{view:n}=e,r=P(),i=I(),a=R(),[o,s]=(0,H.useState)(ge),c,l;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(c=()=>{let e=window.setInterval(()=>s(Date.now()),3e4);return()=>window.clearInterval(e)},l=[],t[0]=c,t[1]=l):(c=t[0],l=t[1]),(0,H.useEffect)(c,l);let u;t[2]===r?u=t[3]:(u=r.filter(L),t[2]=r,t[3]=u);let d=u.length,f=r.some(e=>fe(e,o)),p;t[4]!==i||t[5]!==o||t[6]!==a.dailySearchBudget?(p=z(i,a.dailySearchBudget,o),t[4]=i,t[5]=o,t[6]=a.dailySearchBudget,t[7]=p):p=t[7];let m=p,h;t[8]===Symbol.for(`react.memo_cache_sentinel`)?(h=(0,W.jsx)(G,{className:`dash-topbar-brand`,href:T().href}),t[8]=h):h=t[8];let g=`dash-watch-pill`+(f?` dash-watch-pill--live`:``),_;t[9]===Symbol.for(`react.memo_cache_sentinel`)?(_=(0,W.jsx)(`i`,{className:`dash-live-dot`,"aria-hidden":`true`}),t[9]=_):_=t[9];let v;t[10]!==d||t[11]!==g?(v=(0,W.jsxs)(`span`,{className:g,children:[_,d,` ON WATCH`]}),t[10]=d,t[11]=g,t[12]=v):v=t[12];let y;t[13]===m?y=t[14]:(y=(0,W.jsx)(me,{state:m}),t[13]=m,t[14]=y);let b;t[15]===n?b=t[16]:(b=n!==`overview`&&(0,W.jsx)(`a`,{className:`dash-topbar-link`,href:N.overview,children:`How it works`}),t[15]=n,t[16]=b);let x;t[17]===Symbol.for(`react.memo_cache_sentinel`)?(x=(0,W.jsx)(`a`,{className:`dash-topbar-link`,href:`#/live`,children:`Live`}),t[17]=x):x=t[17];let S;t[18]!==b||t[19]!==v||t[20]!==y?(S=(0,W.jsxs)(`div`,{className:`dash-topbar-scroll`,children:[v,y,b,x]}),t[18]=b,t[19]=v,t[20]=y,t[21]=S):S=t[21];let C;t[22]===Symbol.for(`react.memo_cache_sentinel`)?(C=(0,W.jsx)(`span`,{className:`topbar-spacer`}),t[22]=C):C=t[22];let w,E;t[23]===Symbol.for(`react.memo_cache_sentinel`)?(w=(0,W.jsx)(`nav`,{className:`dash-topbar-nav`,"aria-label":`App`,children:(0,W.jsx)(ue,{omitHash:N.gallery})}),E=(0,W.jsx)(`span`,{className:`topbar-divider`,"aria-hidden":`true`}),t[23]=w,t[24]=E):(w=t[23],E=t[24]);let D;t[25]===Symbol.for(`react.memo_cache_sentinel`)?(D=(0,W.jsxs)(`div`,{className:`dash-topbar-tools`,children:[(0,W.jsx)(`a`,{className:`dash-topbar-action`,href:N.rewind,children:`✦ Rewind`}),(0,W.jsx)(`a`,{className:`dash-topbar-action`,href:N.present,children:`▸ Present`}),(0,W.jsx)(te,{triggerClassName:`ctrl`})]}),t[25]=D):D=t[25];let O;return t[26]===S?O=t[27]:(O=(0,W.jsxs)(`header`,{className:`dash-topbar`,children:[h,S,C,w,E,D]}),t[26]=S,t[27]=O),O}function ge(){return Date.now()}function _e({label:e,value:t,dashboardId:n,kind:r=`presence`}){return(0,W.jsxs)(`a`,{className:`metric-chip metric-chip--${r}`,href:N.detail(n),children:[(0,W.jsx)(`span`,{className:`metric-chip-value`,children:t}),(0,W.jsx)(`span`,{className:`metric-chip-label`,children:e})]})}function ve(e){return new Date(e).toLocaleTimeString([],{hour:`numeric`,minute:`2-digit`})}function ye({briefing:e}){let[t,n]=(0,H.useState)(!1),r=(0,H.useRef)(t);return r.current=t,(0,H.useEffect)(()=>{if(!t)return;let e=window.setInterval(()=>{S()||n(!1)},300);return()=>window.clearInterval(e)},[t]),(0,H.useEffect)(()=>()=>{r.current&&C()},[]),(0,W.jsxs)(`section`,{className:`card briefing-hero`,children:[(0,W.jsxs)(`div`,{className:`briefing-hero-head`,children:[(0,W.jsxs)(`span`,{className:`card-eyebrow briefing-hero-eyebrow`,children:[`MORNING BRIEFING · `,ve(e.at),` · COMPILED WHILE CHECKING YOUR DASHBOARDS`]}),(0,W.jsx)(`button`,{type:`button`,className:`briefing-hero-listen`,onClick:()=>{if(t){C(),n(!1);return}oe(e.text,e.spoken),n(!0)},"aria-pressed":t,children:t?`◼ STOP`:`▸ LISTEN`})]}),(0,W.jsx)(`p`,{className:`briefing-hero-text`,children:e.text}),e.chips.length>0&&(0,W.jsx)(`div`,{className:`briefing-hero-chips`,children:e.chips.map(e=>(0,W.jsx)(_e,{label:e.label,value:e.value,dashboardId:e.dashboardId},e.dashboardId))})]})}function be(e){let t=(0,U.c)(31),{dashboard:n,now:r}=e,i;t[0]!==n||t[1]!==r?(i=ie(n,r),t[0]=n,t[1]=r,t[2]=i):i=t[2];let a=i,o=n.cadence.window;if(!o||a.vizKind!==`livescore`){let e;return t[3]!==n||t[4]!==r?(e=(0,W.jsx)(`div`,{className:`featured-live featured-live--fallback`,children:(0,W.jsx)(B,{dashboard:n,now:r})}),t[3]=n,t[4]=r,t[5]=e):e=t[5],e}let s=a.everChecked?`AS OF ${a.asOf}`:a.asOf,c;t[6]===n.id?c=t[7]:(c=N.detail(n.id),t[6]=n.id,t[7]=c);let l;t[8]===Symbol.for(`react.memo_cache_sentinel`)?(l=(0,W.jsxs)(`span`,{className:`card-eyebrow featured-live-eyebrow`,children:[(0,W.jsx)(`i`,{className:`dash-live-dot`,"aria-hidden":`true`}),`LIVE NOW`]}),t[8]=l):l=t[8];let u;t[9]===n.title?u=t[10]:(u=(0,W.jsxs)(`div`,{className:`featured-live-head`,children:[l,(0,W.jsx)(`h3`,{className:`featured-live-title`,children:n.title})]}),t[9]=n.title,t[10]=u);let d;t[11]!==o||t[12]!==r?(d=(0,W.jsx)(re,{liveWindow:o,now:r}),t[11]=o,t[12]=r,t[13]=d):d=t[13];let f;t[14]===Symbol.for(`react.memo_cache_sentinel`)?(f=(0,W.jsx)(`span`,{className:`featured-live-check-label`,children:`FROM THE LAST CHECK`}),t[14]=f):f=t[14];let p;t[15]===a.value?p=t[16]:(p=(0,W.jsx)(`span`,{className:`featured-live-check-value`,children:a.value}),t[15]=a.value,t[16]=p);let m;t[17]===a.context?m=t[18]:(m=(0,W.jsx)(`span`,{className:`featured-live-check-context`,children:a.context}),t[17]=a.context,t[18]=m);let h;t[19]!==p||t[20]!==m?(h=(0,W.jsxs)(`p`,{className:`featured-live-check`,children:[f,p,m]}),t[19]=p,t[20]=m,t[21]=h):h=t[21];let g;t[22]!==s||t[23]!==o.label?(g=(0,W.jsxs)(`div`,{className:`featured-live-foot`,children:[s,` · `,o.label,` ONLY`]}),t[22]=s,t[23]=o.label,t[24]=g):g=t[24];let _;return t[25]!==g||t[26]!==c||t[27]!==u||t[28]!==d||t[29]!==h?(_=(0,W.jsxs)(`a`,{className:`card featured-live`,href:c,children:[u,d,h,g]}),t[25]=g,t[26]=c,t[27]=u,t[28]=d,t[29]=h,t[30]=_):_=t[30],_}function xe(e){let t=(0,U.c)(17),{answer:n,onTrackAnyway:r}=e;if(!n){let e;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,W.jsx)(`p`,{className:`dash-answer-text dash-answer-text--fallback`,children:`Mavéa couldn’t reach your model for that — try tracking it instead.`}),t[0]=e):e=t[0];let n;return t[1]===r?n=t[2]:(n=(0,W.jsxs)(`div`,{className:`dash-answer`,children:[e,(0,W.jsx)(`button`,{type:`button`,className:`dash-answer-track`,onClick:r,children:`Track it anyway →`})]}),t[1]=r,t[2]=n),n}let i;t[3]===n.text?i=t[4]:(i=(0,W.jsx)(`p`,{className:`dash-answer-text`,children:n.text}),t[3]=n.text,t[4]=i);let a;t[5]===n.grounded?a=t[6]:(a=!n.grounded&&(0,W.jsx)(`p`,{className:`dash-answer-qualifier`,children:`Based on background knowledge, not a fresh search.`}),t[5]=n.grounded,t[6]=a);let o;t[7]===n.sources?o=t[8]:(o=n.sources.length>0&&(0,W.jsx)(`div`,{className:`dash-answer-sources`,children:n.sources.map(Se)}),t[7]=n.sources,t[8]=o);let s;t[9]===Symbol.for(`react.memo_cache_sentinel`)?(s=(0,W.jsx)(`span`,{className:`dash-answer-badge`,children:`Answered once — nothing worth re-checking`}),t[9]=s):s=t[9];let c;t[10]===r?c=t[11]:(c=(0,W.jsxs)(`div`,{className:`dash-answer-foot`,children:[s,(0,W.jsx)(`button`,{type:`button`,className:`dash-answer-track`,onClick:r,children:`Track it anyway →`})]}),t[10]=r,t[11]=c);let l;return t[12]!==i||t[13]!==a||t[14]!==o||t[15]!==c?(l=(0,W.jsxs)(`div`,{className:`dash-answer`,children:[i,a,o,c]}),t[12]=i,t[13]=a,t[14]=o,t[15]=c,t[16]=l):l=t[16],l}function Se(e){let t=x(e.url);return t?(0,W.jsx)(`a`,{className:`dash-answer-source`,href:t,target:`_blank`,rel:`noopener noreferrer`,title:e.title,children:e.title},e.url):null}r();var J=a(()=>i(()=>import(`./planTracker-BA-x4jbw.js`).then(e=>e.n),__vite__mapDeps([19,2,20,21,22,23,24,25,26,27]))),Y=s(()=>i(()=>import(`./PlanReview-wOsBpofo.js`).then(e=>({default:e.PlanReview})),__vite__mapDeps([28,1,2,5,3,29,30,31,32,33,8,20,34,21,22,23,24,25,35,26,36,37,38,27,39,40,41,42,43,4,6,7,9,10,11,12,13,44,45,46,47]))),Ce=Y.Component;function we(){return Promise.all([J(),Y.preload()]).then(()=>void 0)}function Te({inert:e=!1}){let t=(0,H.useRef)(null),n=(0,H.useRef)(null),[r,i]=(0,H.useState)(``),[a,s]=(0,H.useState)(!1),[c,l]=(0,H.useState)(null),u=(0,H.useRef)(0),f=()=>{u.current++,l(null)};b(n,{onEscape:f,active:!!c}),(0,H.useEffect)(()=>{if(e)return;let n=e=>{(e.metaKey||e.ctrlKey)&&!e.altKey&&!e.shiftKey&&e.key.toLowerCase()===`k`&&(e.preventDefault(),t.current?.focus())};return window.addEventListener(`keydown`,n),()=>window.removeEventListener(`keydown`,n)},[e]),(0,H.useEffect)(()=>()=>{u.current++},[]);let p=async()=>{let e=r.trim();if(!e||a)return;s(!0);let t=++u.current,{planTracker:n,answerOnce:i}=await J(),o=await n(e,k(O()));if(t!==u.current)return;if(s(!1),o.kind!==`static`){l({step:`review`,plan:o});return}l({step:`answering`,plan:o});let c=await i(e,k(O()));t===u.current&&l({step:`answer`,plan:o,answer:c})},m=e=>{u.current++,l(null),i(``),window.location.hash=N.detail(e)};return(0,W.jsxs)(W.Fragment,{children:[(0,W.jsxs)(`form`,{className:`dash-composer-bar`,onSubmit:e=>{e.preventDefault(),p()},children:[(0,W.jsx)(`input`,{ref:t,className:`dash-composer-input`,value:r,onChange:e=>i(e.target.value),placeholder:`Track anything — Mavéa will suggest what's worth checking, and how often`,"aria-label":`Track anything`,disabled:a,...o(we)}),(0,W.jsx)(`kbd`,{className:`dash-composer-kbd`,"aria-hidden":`true`,children:`⌘K`}),(0,W.jsx)(`button`,{type:`submit`,className:`dash-composer-submit`,disabled:!r.trim()||a,children:a?`Planning…`:`Track`})]}),c&&(0,W.jsx)(`div`,{className:`xt-scrim`,onClick:e=>{e.target===e.currentTarget&&f()},role:`button`,tabIndex:0,"aria-label":`Close`,onKeyDown:e=>{e.target===e.currentTarget&&(e.key===`Enter`||e.key===` `)&&(e.key===` `&&e.preventDefault(),f())},children:(0,W.jsxs)(`div`,{className:`xt-modal`,ref:n,tabIndex:-1,role:`dialog`,"aria-modal":`true`,"aria-label":`Track anything`,children:[(0,W.jsxs)(`div`,{className:`xt-head`,children:[c.step===`review`?(0,W.jsx)(`button`,{type:`button`,className:`tpl-back`,onClick:f,children:`‹ Change what to track`}):(0,W.jsx)(`span`,{className:`xt-head-title`,children:c.plan.title}),(0,W.jsx)(`button`,{type:`button`,className:`xt-close`,onClick:f,"aria-label":`Close`,children:`×`})]}),c.step===`answering`&&(0,W.jsx)(`div`,{className:`xt-loading`,children:`Mavéa is checking that…`}),c.step===`answer`&&(0,W.jsx)(xe,{answer:c.answer,onTrackAnyway:()=>l({step:`review`,plan:c.plan})}),c.step===`review`&&(0,W.jsx)(d,{label:`tracker plan`,children:(0,W.jsx)(Ce,{plan:c.plan,ask:r,existing:E(),onDone:m})})]})})]})}var Ee=8e3;function De({message:e,onDismiss:t,kind:n=`presence`,href:r}){let i=(0,H.useRef)(t);return i.current=t,(0,H.useEffect)(()=>{let e=window.setTimeout(()=>i.current(),Ee);return()=>window.clearTimeout(e)},[]),(0,W.jsxs)(`div`,{className:`dash-toast dash-toast--${n}`,role:`status`,children:[r?(0,W.jsx)(`a`,{className:`dash-toast-text dash-toast-link`,href:r,children:e}):(0,W.jsx)(`span`,{className:`dash-toast-text`,children:e}),(0,W.jsx)(`button`,{type:`button`,className:`dash-toast-close`,onClick:t,"aria-label":`Dismiss`,children:`×`})]})}r();var Oe=[`AAPL price`,`Yankees scores`,`Weather in Denver`,`Bitcoin price`];function ke(e,t){let n=e.cadence.window;return!!n&&t>=n.startAt&&t<=n.endAt}function Ae(e){return new Date(e).toISOString().slice(0,10)}function X(e){let t=(0,U.c)(11),{eyebrow:n,sub:r}=e,i;t[0]===n?i=t[1]:(i=(0,W.jsx)(`span`,{className:`tile-name`,children:n}),t[0]=n,t[1]=i);let a;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(a=(0,W.jsx)(`span`,{className:`tile-cadence`,children:`EXAMPLE`}),t[2]=a):a=t[2];let o;t[3]===i?o=t[4]:(o=(0,W.jsxs)(`div`,{className:`tile-top`,children:[i,a]}),t[3]=i,t[4]=o);let s;t[5]===Symbol.for(`react.memo_cache_sentinel`)?(s=(0,W.jsx)(`div`,{className:`tile-value-row`,children:(0,W.jsx)(`span`,{className:`tile-value`,children:`—`})}),t[5]=s):s=t[5];let c;t[6]===r?c=t[7]:(c=(0,W.jsx)(`p`,{className:`tile-context`,children:r}),t[6]=r,t[7]=c);let l;return t[8]!==o||t[9]!==c?(l=(0,W.jsxs)(`div`,{className:`tile-frame tile-frame--ghost`,"aria-hidden":`true`,children:[o,s,c]}),t[8]=o,t[9]=c,t[10]=l):l=t[10],l}function je(){let e=(0,U.c)(4),t;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,W.jsx)(`p`,{className:`dash-empty-title`,children:`Nothing on watch yet.`}),e[0]=t):t=e[0];let n;e[1]===Symbol.for(`react.memo_cache_sentinel`)?(n=(0,W.jsxs)(`p`,{className:`dash-empty-how`,children:[`Type anything worth following in the bar below — scores, a price, the weather, a story — and Mavéa plans the live cards and keeps them current. Or talk it through in`,` `,(0,W.jsx)(`a`,{href:`#/live`,children:`Live`}),` and build one from that conversation instead.`]}),e[1]=n):n=e[1];let r;e[2]===Symbol.for(`react.memo_cache_sentinel`)?(r=(0,W.jsxs)(`p`,{className:`dash-empty-how`,children:[`New here? `,(0,W.jsx)(`a`,{href:N.overview,children:`See how it works →`})]}),e[2]=r):r=e[2];let i;return e[3]===Symbol.for(`react.memo_cache_sentinel`)?(i=(0,W.jsxs)(`div`,{className:`card dash-empty dash-empty--hero`,children:[t,n,r,(0,W.jsx)(`div`,{className:`dash-home-examples`,children:Oe.map(Me)})]}),e[3]=i):i=e[3],i}function Me(e){return(0,W.jsx)(`span`,{className:`dash-home-example-chip`,children:e},e)}function Z(){let e=P(),t=I(),n=R(),r=se(),[a]=D(),[o,s]=(0,H.useState)(()=>Date.now());(0,H.useEffect)(()=>{let e=window.setInterval(()=>s(Date.now()),3e4);return()=>window.clearInterval(e)},[]);let c=(0,H.useMemo)(()=>e.find(e=>ke(e,o))??null,[e,o]),l=r!==null&&r.date===Ae(o),u=(0,H.useMemo)(()=>z(t,n.dailySearchBudget,o),[t,n.dailySearchBudget,o]),d=e.length===0,f=(0,H.useMemo)(()=>e.some(L),[e]),p=ee(a),[m,h]=(0,H.useState)(null);(0,H.useEffect)(()=>ae(h),[]);let[g,_]=(0,H.useState)(!1),[v,b]=(0,H.useState)(null),x=async()=>{_(!0),b(null);try{let{checkAllDashboardsNow:e}=await i(async()=>{let{checkAllDashboardsNow:e}=await import(`./useDashboardLoop-Cnxmf7wU.js`).then(e=>e.i);return{checkAllDashboardsNow:e}},__vite__mapDeps([33,2,1,5,8,20,34,29,30,31,32,21,22,23,24,25,35,26,36,37,38,27,39,40,41,42,43,4,6,3,7,9,10,11,12,13]));await e()===`failed`&&b(`Your model provider stopped the run — usually its per-minute limit. Nothing was changed; try again in a minute.`)}finally{_(!1)}},[S,C]=(0,H.useState)(0);return(0,H.useEffect)(()=>{let e=0,t=0;return e=requestAnimationFrame(()=>{C(1),t=requestAnimationFrame(()=>C(2))}),()=>{cancelAnimationFrame(e),cancelAnimationFrame(t)}},[]),(0,W.jsxs)(`div`,{className:`dash-home`,children:[m&&(0,W.jsx)(De,{kind:`danger`,message:`${m.dashboardTitle}: ${m.tripwireLabel} crossed the line you set.`,href:N.detail(m.dashboardId),onDismiss:()=>h(null)},`${m.dashboardId}-${m.tripwireLabel}`),(0,W.jsxs)(`div`,{className:`dash-home-grid`,children:[(0,W.jsxs)(`div`,{className:`dash-home-main`,children:[!d&&!p&&f&&(0,W.jsxs)(`div`,{className:`dash-connect-banner`,children:[(0,W.jsx)(`span`,{className:`dash-connect-banner-text`,children:`These trackers can't fetch anything yet — connect a model to start filling them.`}),(0,W.jsx)(`a`,{className:`dash-connect-banner-link`,href:`#/live`,children:`Connect a model in Live →`})]}),d?(0,W.jsx)(je,{}):(0,W.jsxs)(W.Fragment,{children:[l&&r&&(0,W.jsx)(ye,{briefing:r}),c&&(0,W.jsx)(be,{dashboard:c,now:o})]}),S>=1&&(0,W.jsxs)(`section`,{className:`dash-track`,children:[(0,W.jsxs)(`div`,{className:`dash-track-head`,children:[(0,W.jsxs)(`span`,{className:`dash-track-eyebrow`,children:[`TRACKING · `,e.length]}),(0,W.jsxs)(`div`,{className:`dash-track-head-right`,children:[(0,W.jsx)(`span`,{className:`dash-track-honesty`,children:`NOT REAL-TIME — EVERY VALUE IS AS OF ITS LAST WEB SEARCH`}),p&&f&&(0,W.jsxs)(`button`,{type:`button`,className:`dash-check-all-btn`,onClick:()=>void x(),disabled:g,title:`Check every tracker with live content now`,children:[(0,W.jsx)(y.refresh,{className:g?`dash-refresh-spin`:void 0}),g?`Checking…`:`Check all`]})]})]}),v&&(0,W.jsx)(`p`,{className:`dash-quota-note`,role:`status`,children:v}),(0,W.jsx)(`div`,{className:`dash-track-grid`,children:d?(0,W.jsxs)(W.Fragment,{children:[(0,W.jsx)(X,{eyebrow:`AAPL`,sub:`Stock price`}),(0,W.jsx)(X,{eyebrow:`Yankees`,sub:`Latest score`}),(0,W.jsx)(X,{eyebrow:`Denver`,sub:`This week's forecast`})]}):e.map(e=>(0,W.jsx)(B,{dashboard:e,now:o,paused:u.paused},e.id))})]})]}),(0,W.jsx)(`aside`,{className:`dash-home-rail`,children:S>=2&&(0,W.jsx)(V,{now:o})})]}),(0,W.jsx)(Te,{})]})}r();var Ne=s(()=>i(()=>import(`./RewindOverlay-okltPbfw.js`).then(e=>({default:e.RewindOverlay})),__vite__mapDeps([48,1,2,5,3,49,50,51,29,30,31,32,36,52,39,53,54]))),Pe=s(()=>i(()=>import(`./DashPresent-BdOJ7F9D.js`).then(e=>({default:e.DashPresent})),__vite__mapDeps([55,1,2,5,3,4,6,7,8,9,10,11,12,13,51,29,30,31,32,52,36,37,56,16,57,38,58,59,60,61,62]))),Fe=s(()=>i(()=>import(`./DashboardDetail-Chrpi1Yk.js`).then(e=>({default:e.DashboardDetail})),__vite__mapDeps([63,1,2,5,3,8,16,64,4,6,7,9,10,11,12,13,65,66,67,68,49,69,70,71,72,73,74,75,76,77,78,79,80,20,81,82,50,83,84,85,86,29,30,31,32,35,23,21,22,24,25,57,51,37,36,38,58,59,60,33,34,26,27,39,40,41,42,43,44,19,87,88,89,90,52,53,91,92,46]))),Ie=s(()=>i(()=>import(`./DashboardSettings-5tn-dw6G.js`).then(e=>({default:e.DashboardSettings})),__vite__mapDeps([93,1,2,5,3,29,30,31,32,57,51,37,36,40,89,59,60]))),Le=s(()=>i(()=>import(`./DashboardOverview-C3hv9sm1.js`).then(e=>({default:e.DashboardOverview})),__vite__mapDeps([94,3,2,57,1,5]))),Re=Ne.Component,Q=Pe.Component,ze=Fe.Component,Be=Ie.Component,Ve=Le.Component;function $(){window.location.hash=N.gallery}function He(){let e=(0,U.c)(22),t;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t=[],e[0]=t):t=e[0],(0,H.useEffect)(Ue,t);let n=M(),r;e[1]===n?r=e[2]:(r=j(n),e[1]=n,e[2]=r);let i=r,a=ne();if(i.view===`present`){let t;return e[3]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,W.jsx)(d,{label:`Dashboard presentation`,children:(0,W.jsx)(Q,{onClose:$})}),e[3]=t):t=e[3],t}let o;bb0:switch(i.view){case`detail`:{let t;e[4]===i.id?t=e[5]:(t=i.id?(0,W.jsx)(d,{label:`Dashboard detail`,children:(0,W.jsx)(ze,{id:i.id})}):(0,W.jsx)(Z,{}),e[4]=i.id,e[5]=t),o=t;break bb0}case`settings`:{let t;e[6]===i.id?t=e[7]:(t=i.id?(0,W.jsx)(d,{label:`Dashboard settings`,children:(0,W.jsx)(Be,{id:i.id})}):(0,W.jsx)(Z,{}),e[6]=i.id,e[7]=t),o=t;break bb0}case`overview`:{let t;e[8]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,W.jsx)(d,{label:`Dashboard overview`,children:(0,W.jsx)(Ve,{})}),e[8]=t):t=e[8],o=t;break bb0}case`rewind`:case`gallery`:default:{let t;e[9]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,W.jsx)(Z,{}),e[9]=t):t=e[9],o=t}}let s=o,c;e[10]===i.view?c=e[11]:(c=(0,W.jsx)(he,{view:i.view}),e[10]=i.view,e[11]=c);let l;e[12]===Symbol.for(`react.memo_cache_sentinel`)?(l=(0,W.jsx)(w,{kind:`monitoring`,className:`dash-risk-note`}),e[12]=l):l=e[12];let u;e[13]===a?u=e[14]:(u=a&&(0,W.jsx)(`p`,{className:`dash-quota-note`,role:`status`,children:`This browser’s storage is full, so recent tracker changes are being held in memory and may not survive a reload. Free up space, or remove a tracker you no longer follow.`}),e[13]=a,e[14]=u);let f;e[15]===i.view?f=e[16]:(f=i.view===`rewind`&&(0,W.jsx)(d,{label:`Weekly rewind`,overlay:!0,children:(0,W.jsx)(Re,{onClose:$})}),e[15]=i.view,e[16]=f);let p;return e[17]!==s||e[18]!==c||e[19]!==u||e[20]!==f?(p=(0,W.jsxs)(`div`,{className:`mavea-app dash-app`,children:[c,l,u,s,f]}),e[17]=s,e[18]=c,e[19]=u,e[20]=f,e[21]=p):p=e[21],p}function Ue(){return l(c())}export{He as DashboardsApp};
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import{t as e}from"./react-BZJXY1be.js";import{t}from"./compiler-runtime-qQQXpJgv.js";import{t as n}from"./jsx-runtime-DeHZSEgm.js";import{n as r,r as i,t as a}from"./theme-D5D55hZi.js";import{t as o}from"./FeatureUseNotice-CCI4mM39.js";import{t as s}from"./homeTarget-CDc-r2mj.js";import{t as c}from"./providers-CPhoN8j0.js";import{n as l,u}from"./useLiveConfig-CvOQTr0s.js";import{n as d,t as f}from"./json-J4Y32_i9.js";import{n as p}from"./courseSeed-CZdNBTTs.js";var m=e(),h=t(),g=[`×1`,`×10`,`×100`,`×1k`,`×10k`,`×100k`,`×1M`,`×10M`,`×100M`,`×1B`,`×10B`,`×100B`,`×1T`,`×10T`,`×100T`,`×1Q`,`×10Q`,`×100Q`,`×1Qn`,`×10Qn`];function _(e,t){if(!e||typeof e!=`object`)return null;let n=e,r=Array.isArray(n.subtopics)?n.subtopics.map(String).filter(Boolean).slice(0,8):[];if(r.length===0)return null;let i=Math.max(0,Math.min(r.length-1,Number(n.selectedIndex??0)));return{scale:t,multiplier:g[t]??`×${10**t}`,scaleLabel:String(n.scaleLabel??`SCALE ${t}`).toUpperCase(),title:String(n.title??``).trim(),body:String(n.body??``).trim(),subtopics:r,selectedIndex:i}}function v(e,t,n){let r=typeof e==`string`?f(e):e,i=typeof r==`object`&&r?r:{},a=Array.isArray(i.levels)?i.levels:Array.isArray(i)?i:[],o=[];for(let e=0;e<Math.min(a.length,n);e++){let n=_(a[e],t+e);n&&o.push(n)}return o}var y=`You are a "Powers of Ten" semantic telescope builder.
|
|
2
|
+
|
|
3
|
+
Given a topic or question, produce EXACTLY 10 zoom levels — level 1 is the broadest possible view of the entire field, level 10 is the finest mechanism or detail.
|
|
4
|
+
|
|
5
|
+
Rules:
|
|
6
|
+
- Each level zooms into subtopics[selectedIndex] of the previous level
|
|
7
|
+
- Each level must be more specific and granular than the one before
|
|
8
|
+
- subtopics: 3–5 sub-areas visible at THIS scale (2–5 words each)
|
|
9
|
+
- selectedIndex: which subtopic the NEXT level zooms into (pick the most illuminating path)
|
|
10
|
+
- scaleLabel: 1–3 word ALL_CAPS poetic label (e.g. "THE FIELD", "THE PROCESS", "THE MOLECULE", "THE BOND")
|
|
11
|
+
- body: exactly 2 vivid, dense sentences grounding the reader at this exact scale — be concrete
|
|
12
|
+
|
|
13
|
+
Return ONLY valid JSON, no markdown fences, no prose:
|
|
14
|
+
{
|
|
15
|
+
"rangeStart": "2–4 word phrase for the broadest scope (e.g. 'all of biology')",
|
|
16
|
+
"levels": [
|
|
17
|
+
{ "scaleLabel": "...", "title": "...", "body": "...", "subtopics": [...], "selectedIndex": 0 },
|
|
18
|
+
...9 more objects...
|
|
19
|
+
]
|
|
20
|
+
}`,b=`You are extending a "Powers of Ten" semantic telescope by branching into a chosen subtopic.
|
|
21
|
+
|
|
22
|
+
Produce EXACTLY 10 new zoom levels starting one scale deeper than the given parent level, each more specific than the last.
|
|
23
|
+
|
|
24
|
+
Rules:
|
|
25
|
+
- Level 1 focuses on the chosen subtopic at the next scale depth
|
|
26
|
+
- Each level zooms into subtopics[selectedIndex] of the previous level
|
|
27
|
+
- scaleLabel: 1–3 word ALL_CAPS label (e.g. "THE REACTION", "THE PROTEIN", "THE SITE")
|
|
28
|
+
- body: exactly 2 vivid, dense sentences at this exact scale
|
|
29
|
+
- subtopics: 3–5 sub-parts visible at this scale
|
|
30
|
+
|
|
31
|
+
Return ONLY valid JSON, no markdown fences, no prose:
|
|
32
|
+
{
|
|
33
|
+
"levels": [
|
|
34
|
+
{ "scaleLabel": "...", "title": "...", "body": "...", "subtopics": [...], "selectedIndex": 0 },
|
|
35
|
+
...9 more objects...
|
|
36
|
+
]
|
|
37
|
+
}`;async function x(e,t,n){let r=await c(t.provider).generate({system:y,history:[],user:e,maxTokens:3200,temperature:.4,format:null,signal:n},t),i=d(typeof r.raw==`string`?r.raw:``),a=v(i,0,10);if(a.length===0)throw Error(`No zoom levels in model response`);return{rangeStart:String(i.rangeStart??a[0].title),levels:a}}async function S(e,t,n,r,i,a){let o=c(i.provider),s=`Topic: "${e}"\nCurrent level (${t.scaleLabel}): "${t.title}"\nForking into: "${n}"`,l=v((await o.generate({system:b,history:[],user:s,maxTokens:3200,temperature:.4,format:null,signal:a},i)).raw,r+1,10);if(l.length===0)throw Error(`No branch levels in model response`);return l}var C=[`×1`,`×10`,`×100`,`×1k`,`×10k`,`×100k`,`×1M`,`×10M`],w=[{scaleLabel:`THE PLANT`,title:`A plant, quietly eating light`,body:`Every green thing you can see is running the same trick: turning sunlight, air, and water into sugar. The work happens where the light lands — the leaves.`,subtopics:[`The leaves`,`The roots`,`The stem`,`The flowers`],selectedIndex:0},{scaleLabel:`THE LEAF`,title:`One leaf, a solar panel`,body:`A single leaf spreads thin and flat to catch as much sun as it can. Veins pipe water in, tiny pores let air in, and the green comes from the layer inside.`,subtopics:[`The waxy surface`,`The veins`,`The inner tissue`,`The pores`],selectedIndex:2},{scaleLabel:`THE TISSUE`,title:`Cells stacked like bricks of green`,body:`Just under the surface, cells sit shoulder to shoulder, each stuffed with green specks. Gaps between them let carbon dioxide drift in to be caught.`,subtopics:[`Column-shaped cells`,`Air spaces`,`Guard cells`],selectedIndex:0},{scaleLabel:`THE CELL`,title:`Inside a single plant cell`,body:`A stiff wall holds the cell’s shape while everything important floats inside. Dozens of green ovals drift through it — the cell’s own power plants.`,subtopics:[`The cell wall`,`The chloroplasts`,`The nucleus`,`The water sac`],selectedIndex:1},{scaleLabel:`THE CHLOROPLAST`,title:`The green engine`,body:`This oval is where sunlight actually becomes food. Inside it, membranes fold into neat stacks of discs, packed with the pigment that makes the whole thing green.`,subtopics:[`Stacks of discs`,`The fluid around them`,`The outer membranes`],selectedIndex:0},{scaleLabel:`THE MEMBRANE`,title:`Stacked discs that trap the sun`,body:`Each disc is a sheet studded with light-catching machines, stacked like coins to pack in as many as possible. Light hits here and the energy starts to move.`,subtopics:[`The light-catchers`,`The chlorophyll`,`The electron relay`],selectedIndex:1},{scaleLabel:`THE MOLECULE`,title:`A single chlorophyll molecule`,body:`Here is the green itself: a flat ring of carbon cradling one magnesium atom at its centre. That ring is shaped to grab a particle of light and hold its energy.`,subtopics:[`The magnesium core`,`The carbon ring`,`The long tail`],selectedIndex:0},{scaleLabel:`THE PHOTON`,title:`Where light becomes life`,body:`A single packet of sunlight strikes the ring and is gone — swapped for a jolt of energy in one of the molecule’s electrons. That one kick begins everything that feeds the plant, and eventually, us.`,subtopics:[`The strike`,`The excited electron`,`The handoff`],selectedIndex:1}].map((e,t)=>({...e,scale:t,multiplier:C[t]??`×${10**t}`})),T=w.map((e,t)=>({id:t,parentId:t===0?null:t-1,viaSubtopic:t===0?null:w[t-1].subtopics[w[t-1].selectedIndex]??null,level:e,depth:t})),E={query:`How does a leaf make food?`,rangeStart:`All of life`,nodes:T,trunkIds:T.map(e=>e.id)},D=10;function O(e){return`var(--dz-${(e%D+D)%D})`}function k(e,t){let n=[t],r=t;for(;;){let t=r.level.subtopics[r.level.selectedIndex],i=e.find(e=>e.parentId===r.id&&e.viaSubtopic===t);if(!i)break;n.push(i),r=i}return n}function A(e,t,n,r){let i=t[r],a=e.nodes.find(e=>e.id===i);if(!a)return null;let o=n[r]??a.level.selectedIndex,s=a.level.subtopics[o]??a.level.subtopics[0],c=t[r+1];if(c!==void 0&&e.nodes.find(e=>e.id===c)?.viaSubtopic===s)return{kind:`navigate`,navPath:t,chipSels:n,target:r+1};let l=e.nodes.find(e=>e.parentId===i&&e.viaSubtopic===s);if(l){let i=k(e.nodes,l),a=t.slice(0,r+1),o=n.slice(0,r+1);return{kind:`navigate`,navPath:[...a,...i.map(e=>e.id)],chipSels:[...o,...i.map(e=>e.level.selectedIndex)],target:r+1}}return{kind:`branch`,navPath:t.slice(0,r+1),chipSels:n.slice(0,r+1),parentId:i,subtopic:s,parentLevel:a.level,parentDepth:a.depth}}function j(e,t){return e.map((e,n)=>({id:e.id,index:n,multiplier:e.level.multiplier,label:e.level.scaleLabel,title:e.level.title,color:O(e.depth),state:n===t?`current`:n<t?`past`:`future`}))}var M=n(),N=560;function P(e){return typeof window>`u`?``:new URLSearchParams(window.location.hash.split(`?`)[1]??``).get(e)?.trim()??``}function F(e){let t=(0,h.c)(4),{className:n}=e,r,i;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(r=(0,M.jsx)(`circle`,{cx:`6.5`,cy:`6.5`,r:`4`}),i=(0,M.jsx)(`line`,{x1:`10`,y1:`10`,x2:`14`,y2:`14`}),t[0]=r,t[1]=i):(r=t[0],i=t[1]);let a;return t[2]===n?a=t[3]:(a=(0,M.jsxs)(`svg`,{viewBox:`0 0 16 16`,fill:`none`,stroke:`currentColor`,strokeWidth:1.8,strokeLinecap:`round`,strokeLinejoin:`round`,className:n,"aria-hidden":!0,children:[r,i]}),t[2]=n,t[3]=a),a}function I(){let e=(0,h.c)(1),t;return e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,M.jsxs)(`svg`,{viewBox:`0 0 20 20`,fill:`none`,stroke:`currentColor`,strokeWidth:1.6,"aria-hidden":!0,children:[(0,M.jsx)(`circle`,{cx:`10`,cy:`10`,r:`3.6`}),(0,M.jsx)(`path`,{strokeLinecap:`round`,d:`M10 2.4v1.8M10 15.8v1.8M17.6 10h-1.8M4.2 10H2.4M15.4 4.6l-1.3 1.3M5.9 14.1l-1.3 1.3M15.4 15.4l-1.3-1.3M5.9 5.9L4.6 4.6`})]}),e[0]=t):t=e[0],t}function L(){let e=(0,h.c)(1),t;return e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,M.jsx)(`svg`,{viewBox:`0 0 20 20`,fill:`none`,stroke:`currentColor`,strokeWidth:1.6,"aria-hidden":!0,children:(0,M.jsx)(`path`,{strokeLinejoin:`round`,d:`M16.5 11.4A6.6 6.6 0 1 1 8.6 3.5a5.2 5.2 0 0 0 7.9 7.9Z`})}),e[0]=t):t=e[0],t}function R(){let e=(0,h.c)(1),t;return e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,M.jsxs)(`svg`,{viewBox:`0 0 16 16`,fill:`none`,stroke:`currentColor`,strokeWidth:1.6,"aria-hidden":!0,children:[(0,M.jsx)(`path`,{strokeLinecap:`round`,strokeLinejoin:`round`,d:`M1.5 5 8 2l6.5 3-6.5 3-6.5-3Z`}),(0,M.jsx)(`path`,{strokeLinecap:`round`,strokeLinejoin:`round`,d:`M4 6.6v3.2c0 .9 1.8 2.2 4 2.2s4-1.3 4-2.2V6.6`})]}),e[0]=t):t=e[0],t}function z(){let e=(0,h.c)(7),[t,n]=(0,m.useState)(V),r;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(r=()=>{n(B)},e[0]=r):r=e[0];let i=r,a=t===`light`?`Switch to dark theme`:`Switch to light theme`,o=t===`light`?`Dark theme`:`Light theme`,s;e[1]===t?s=e[2]:(s=t===`light`?(0,M.jsx)(L,{}):(0,M.jsx)(I,{}),e[1]=t,e[2]=s);let c;return e[3]!==a||e[4]!==o||e[5]!==s?(c=(0,M.jsx)(`button`,{type:`button`,className:`dz-theme-toggle`,onClick:i,"aria-label":a,title:o,children:s}),e[3]=a,e[4]=o,e[5]=s,e[6]=c):c=e[6],c}function B(e){let t=e===`light`?`dark`:`light`;return a(t),i(t),t}function V(){return r()}function H(e){let t=(0,h.c)(19),{query:n,onMakeCourse:r,onNew:i}=e,a;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(a=s(),t[0]=a):a=t[0];let o=a,c;t[1]===Symbol.for(`react.memo_cache_sentinel`)?(c=()=>{window.location.hash=o.href},t[1]=c):c=t[1];let l;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(l=(0,M.jsx)(`button`,{type:`button`,className:`dz-back-btn`,"aria-label":`Back to ${o.label}`,title:`Back to ${o.label}`,onClick:c,children:(0,M.jsx)(`svg`,{viewBox:`0 0 16 16`,fill:`none`,stroke:`currentColor`,strokeWidth:1.7,"aria-hidden":!0,children:(0,M.jsx)(`path`,{strokeLinecap:`round`,strokeLinejoin:`round`,d:`M9.5 3.5 5 8l4.5 4.5`})})}),t[2]=l):l=t[2];let u;t[3]===Symbol.for(`react.memo_cache_sentinel`)?(u=(0,M.jsxs)(`span`,{className:`dz-wordmark`,children:[`Deep Zoom`,(0,M.jsx)(`span`,{className:`dz-wordmark-sub`,children:`powers of ten`})]}),t[3]=u):u=t[3];let d;t[4]===n?d=t[5]:(d=n&&(0,M.jsx)(`span`,{className:`dz-query`,children:n}),t[4]=n,t[5]=d);let f;t[6]===d?f=t[7]:(f=(0,M.jsxs)(`div`,{className:`dz-topbar-left`,children:[l,u,d]}),t[6]=d,t[7]=f);let p;t[8]===i?p=t[9]:(p=i&&(0,M.jsxs)(`button`,{type:`button`,className:`dz-new-btn`,onClick:i,"aria-label":`Start a new deep zoom`,title:`Start a new deep zoom on a different topic`,children:[(0,M.jsx)(`svg`,{viewBox:`0 0 16 16`,fill:`none`,stroke:`currentColor`,strokeWidth:1.7,"aria-hidden":!0,children:(0,M.jsx)(`path`,{strokeLinecap:`round`,strokeLinejoin:`round`,d:`M8 3.5v9M3.5 8h9`})}),(0,M.jsx)(`span`,{className:`dz-new-btn-label`,children:`New`})]}),t[8]=i,t[9]=p);let m;t[10]===r?m=t[11]:(m=r&&(0,M.jsxs)(`button`,{type:`button`,className:`dz-course-btn`,onClick:r,"aria-label":`Turn this into a course`,title:`Turn this into a course`,children:[(0,M.jsx)(R,{}),(0,M.jsx)(`span`,{className:`dz-course-btn-label`,children:`Turn this into a course`})]}),t[10]=r,t[11]=m);let g;t[12]===Symbol.for(`react.memo_cache_sentinel`)?(g=(0,M.jsx)(z,{}),t[12]=g):g=t[12];let _;t[13]!==p||t[14]!==m?(_=(0,M.jsxs)(`div`,{className:`dz-topbar-right`,children:[p,m,g]}),t[13]=p,t[14]=m,t[15]=_):_=t[15];let v;return t[16]!==_||t[17]!==f?(v=(0,M.jsxs)(`header`,{className:`dz-topbar`,children:[f,_]}),t[16]=_,t[17]=f,t[18]=v):v=t[18],v}function U(e){let t=(0,h.c)(7),{navNodes:n,current:r,onJump:i}=e,a=j(n,r),o=(0,m.useRef)(null),s;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(s=()=>{let e=o.current?.querySelector(`.dz-stop.is-current`);typeof e?.scrollIntoView==`function`&&e.scrollIntoView({block:`nearest`,inline:`nearest`})},t[0]=s):s=t[0],(0,m.useEffect)(s,[r,a.length]);let c;t[1]===Symbol.for(`react.memo_cache_sentinel`)?(c=(0,M.jsx)(`span`,{children:`The descent`}),t[1]=c):c=t[1];let l;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(l=(0,M.jsx)(`span`,{className:`dz-ladder-count-sep`,children:`/`}),t[2]=l):l=t[2];let u;t[3]===i?u=t[4]:(u=e=>(0,M.jsxs)(`button`,{type:`button`,className:`dz-stop is-${e.state}`,style:{"--stop-color":e.color},"aria-current":e.state===`current`?`true`:void 0,"aria-label":`${e.multiplier} · ${e.label} · ${e.title}`,onClick:()=>i(e.index),children:[(0,M.jsx)(`span`,{className:`dz-stop-node`,"aria-hidden":!0}),(0,M.jsx)(`span`,{className:`dz-stop-mult`,children:e.multiplier}),(0,M.jsx)(`span`,{className:`dz-stop-label`,children:e.label})]},e.id),t[3]=i,t[4]=u);let d=a.map(u),f;return t[5]===d?f=t[6]:(f=(0,M.jsx)(`div`,{className:`dz-ladder-track`,ref:o,children:d}),t[5]=d,t[6]=f),(0,M.jsxs)(`nav`,{className:`dz-ladder`,"aria-label":`Scale — jump to any level`,children:[(0,M.jsxs)(`div`,{className:`dz-ladder-cap`,children:[c,(0,M.jsxs)(`span`,{className:`dz-ladder-count`,children:[r+1,l,a.length]})]}),f]})}function W(e){let t=(0,h.c)(66),{node:n,layer:r,dir:i,selectedIndex:a,generating:o,onChipSelect:s,onZoomIn:c}=e,{level:l,depth:u}=n,d;t[0]===u?d=t[1]:(d=O(u),t[0]=u,t[1]=d);let f=d,p=r===`current`,m=l.subtopics[a]??l.subtopics[0],g,_,v,y,b,x,S,C,w,T,E,D;if(t[2]!==f||t[3]!==i||t[4]!==p||t[5]!==r||t[6]!==l.body||t[7]!==l.multiplier||t[8]!==l.scaleLabel||t[9]!==l.subtopics||t[10]!==l.title||t[11]!==s||t[12]!==a){let e=l.subtopics.slice(0,5);g=l.subtopics.length-e.length,w=`dz-level is-${r}`,T=i;let n;t[25]===f?n=t[26]:(n={"--dz-current":f},t[25]=f,t[26]=n),E=n,D=!p;let o;t[27]===l.multiplier?o=t[28]:(o=(0,M.jsx)(`span`,{className:`dz-scale-mult`,children:l.multiplier}),t[27]=l.multiplier,t[28]=o);let c;t[29]===Symbol.for(`react.memo_cache_sentinel`)?(c=(0,M.jsx)(`span`,{className:`dz-scale-tick`}),t[29]=c):c=t[29];let u;t[30]===l.scaleLabel?u=t[31]:(u=(0,M.jsx)(`span`,{className:`dz-scale-label`,children:l.scaleLabel}),t[30]=l.scaleLabel,t[31]=u),t[32]!==o||t[33]!==u?(_=(0,M.jsxs)(`div`,{className:`dz-scale-eyebrow`,children:[o,c,u]}),t[32]=o,t[33]=u,t[34]=_):_=t[34],t[35]===l.title?v=t[36]:(v=(0,M.jsx)(`h2`,{className:`dz-title`,children:l.title}),t[35]=l.title,t[36]=v),t[37]===l.body?y=t[38]:(y=(0,M.jsx)(`p`,{className:`dz-body`,children:l.body}),t[37]=l.body,t[38]=y),b=`dz-chips`,x=`group`,S=`Zoom into a sub-area`;let d;t[39]!==p||t[40]!==s||t[41]!==a?(d=(e,t)=>(0,M.jsxs)(`button`,{type:`button`,tabIndex:p?0:-1,className:`dz-chip`+(t===a?` is-selected`:``),"aria-pressed":t===a,onClick:()=>p&&s(t),children:[(0,M.jsx)(`span`,{className:`dz-chip-dot`,"aria-hidden":!0}),e]},`${e}-${t}`),t[39]=p,t[40]=s,t[41]=a,t[42]=d):d=t[42],C=e.map(d),t[2]=f,t[3]=i,t[4]=p,t[5]=r,t[6]=l.body,t[7]=l.multiplier,t[8]=l.scaleLabel,t[9]=l.subtopics,t[10]=l.title,t[11]=s,t[12]=a,t[13]=g,t[14]=_,t[15]=v,t[16]=y,t[17]=b,t[18]=x,t[19]=S,t[20]=C,t[21]=w,t[22]=T,t[23]=E,t[24]=D}else g=t[13],_=t[14],v=t[15],y=t[16],b=t[17],x=t[18],S=t[19],C=t[20],w=t[21],T=t[22],E=t[23],D=t[24];let k;t[43]===g?k=t[44]:(k=g>0&&(0,M.jsxs)(`span`,{className:`dz-chip dz-chip-more`,"aria-hidden":!0,children:[`+`,g]}),t[43]=g,t[44]=k);let A;t[45]!==k||t[46]!==b||t[47]!==x||t[48]!==S||t[49]!==C?(A=(0,M.jsxs)(`div`,{className:b,role:x,"aria-label":S,children:[C,k]}),t[45]=k,t[46]=b,t[47]=x,t[48]=S,t[49]=C,t[50]=A):A=t[50];let j;t[51]!==o||t[52]!==p||t[53]!==c||t[54]!==m?(j=o?(0,M.jsxs)(`p`,{className:`dz-zoom is-loading`,children:[(0,M.jsx)(`span`,{className:`dz-zoom-spinner`,"aria-hidden":!0}),`opening ten more levels…`]}):(0,M.jsxs)(`button`,{type:`button`,tabIndex:p?0:-1,className:`dz-zoom`,onClick:()=>p&&c(),children:[(0,M.jsx)(`span`,{className:`dz-zoom-glyph`,"aria-hidden":!0,children:(0,M.jsx)(F,{})}),`Zoom into `,(0,M.jsx)(`strong`,{children:m})]}),t[51]=o,t[52]=p,t[53]=c,t[54]=m,t[55]=j):j=t[55];let N;return t[56]!==_||t[57]!==v||t[58]!==y||t[59]!==A||t[60]!==j||t[61]!==w||t[62]!==T||t[63]!==E||t[64]!==D?(N=(0,M.jsxs)(`article`,{className:w,"data-dir":T,style:E,"aria-hidden":D,children:[_,v,y,A,j]}),t[56]=_,t[57]=v,t[58]=y,t[59]=A,t[60]=j,t[61]=w,t[62]=T,t[63]=E,t[64]=D,t[65]=N):N=t[65],N}function G({tree:e,generatingForId:t,query:n,allowBranchGeneration:r=!0,onBranchRequest:i,onNew:a}){let[o,s]=(0,m.useState)(()=>[...e.trunkIds]),[c,l]=(0,m.useState)(0),[u,d]=(0,m.useState)(()=>e.trunkIds.map(t=>e.nodes.find(e=>e.id===t)?.level.selectedIndex??0)),[f,h]=(0,m.useState)(null),g=(0,m.useRef)(0),_=(0,m.useCallback)((e,t)=>{let n=g.current;e!==n&&(h({from:n,dir:t}),g.current=e,l(e))},[]),v=(0,m.useCallback)(e=>{let t=g.current,n=Math.max(0,Math.min(o.length-1,e));n!==t&&_(n,n>t?`in`:`out`)},[o.length,_]),y=(0,m.useRef)(e.nodes.length);(0,m.useEffect)(()=>{if(e.nodes.length===y.current||(y.current=e.nodes.length,o.length===0))return;let t=o[o.length-1],n=e.nodes.find(e=>e.id===t);if(!n)return;let r=u[o.length-1]??n.level.selectedIndex,i=n.level.subtopics[r],a=e.nodes.find(e=>e.parentId===t&&e.viaSubtopic===i);if(!a||o.includes(a.id))return;let c=k(e.nodes,a),l=o.length;s(e=>[...e,...c.map(e=>e.id)]),d(e=>[...e,...c.map(e=>e.level.selectedIndex)]),_(l,`in`)},[e.nodes.length]);let b=(0,m.useMemo)(()=>new Map(e.nodes.map(e=>[e.id,e])),[e.nodes]),x=o.map(e=>b.get(e)).filter(Boolean),S=(0,m.useCallback)(n=>{let a=A(e,o,u,n);if(a){if(a.kind===`navigate`){s(a.navPath),d(a.chipSels),_(a.target,`in`);return}r&&(s(a.navPath),d(a.chipSels),t!==a.parentId&&i(a.parentId,a.subtopic,a.parentLevel,a.parentDepth))}},[e,o,u,_,t,r,i]);(0,m.useEffect)(()=>{let e=e=>{let t=e.target.tagName;if(t!==`INPUT`&&t!==`TEXTAREA`)switch(e.key){case`ArrowRight`:case`ArrowDown`:case` `:e.preventDefault(),c<o.length-1?v(c+1):S(c);break;case`ArrowLeft`:case`ArrowUp`:e.preventDefault(),v(c-1);break;case`Escape`:e.preventDefault(),v(0)}};return window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)},[c,o.length,v,S]),(0,m.useEffect)(()=>{if(f===null)return;let e=window.setTimeout(()=>h(null),N);return()=>window.clearTimeout(e)},[f]);let C=(0,m.useCallback)((e,t)=>{d(n=>{let r=[...n];return r[e]=t,r})},[]),w=x[c],T=O(w?.depth??0),E=c===o.length-1&&t===o[c],D=f?.dir??`in`,j=f?x[f.from]:void 0,P=(0,m.useCallback)(()=>{p(n),window.location.hash=`#/courses`},[n]);return(0,M.jsxs)(M.Fragment,{children:[(0,M.jsx)(H,{query:n,onMakeCourse:P,onNew:a}),(0,M.jsxs)(`div`,{className:`dz-stage`,children:[(0,M.jsx)(U,{navNodes:x,current:c,onJump:v}),(0,M.jsxs)(`div`,{className:`dz-reading`,style:{"--dz-current":T},children:[(0,M.jsx)(`div`,{className:`dz-field`,"aria-hidden":!0}),(0,M.jsxs)(`div`,{className:`dz-levels`,children:[j&&(0,M.jsx)(W,{node:j,layer:`exiting`,dir:D,selectedIndex:u[f?.from??0]??j.level.selectedIndex,generating:!1,onChipSelect:()=>{},onZoomIn:()=>{}},`x${f?.from}`),w&&(0,M.jsx)(W,{node:w,layer:`current`,dir:D,selectedIndex:u[c]??w.level.selectedIndex,generating:E,onChipSelect:e=>C(c,e),onZoomIn:()=>S(c)},`c${c}`)]})]})]})]})}var K=[`How does my body make energy?`,`What is quantum entanglement?`,`How does memory work?`,`What is photosynthesis?`,`How do vaccines work?`,`What is machine learning?`];function q(e){let t=(0,h.c)(35),{onSubmit:n,seed:r}=e,[i,a]=(0,m.useState)(r??``),s=(0,m.useRef)(null),c,l;t[0]===r?(c=t[1],l=t[2]):(c=()=>{s.current?.focus(),r&&s.current?.select()},l=[r],t[0]=r,t[1]=c,t[2]=l),(0,m.useEffect)(c,l);let u;t[3]!==n||t[4]!==i?(u=e=>{e.preventDefault(),i.trim()&&n(i.trim())},t[3]=n,t[4]=i,t[5]=u):u=t[5];let d=u,f;t[6]===Symbol.for(`react.memo_cache_sentinel`)?(f=(0,M.jsx)(H,{}),t[6]=f):f=t[6];let p;t[7]===Symbol.for(`react.memo_cache_sentinel`)?(p=(0,M.jsxs)(`p`,{className:`dz-start-eyebrow`,children:[(0,M.jsx)(`span`,{className:`dz-start-eyebrow-dot`,"aria-hidden":!0}),`×1 → ×1,000,000,000`]}),t[7]=p):p=t[7];let g,_,v;t[8]===Symbol.for(`react.memo_cache_sentinel`)?(g=(0,M.jsxs)(`h1`,{className:`dz-start-title`,children:[`Zoom into anything,`,(0,M.jsx)(`br`,{}),`one power of ten at a time.`]}),_=(0,M.jsx)(`p`,{className:`dz-start-sub`,children:`Ten nested scales, from the broadest field down to the finest mechanism. Fork at any level to fall down a different path.`}),v=(0,M.jsx)(o,{kind:`learning`}),t[8]=g,t[9]=_,t[10]=v):(g=t[8],_=t[9],v=t[10]);let y;t[11]===r?y=t[12]:(y=r&&(0,M.jsx)(`p`,{className:`dz-start-carry`,role:`status`,children:`Carried over from your conversation — zoom into it, or ask about anything else.`}),t[11]=r,t[12]=y);let b;t[13]===Symbol.for(`react.memo_cache_sentinel`)?(b=(0,M.jsx)(F,{className:`dz-start-composer-icon`}),t[13]=b):b=t[13];let x;t[14]===Symbol.for(`react.memo_cache_sentinel`)?(x=e=>a(e.target.value),t[14]=x):x=t[14];let S;t[15]===i?S=t[16]:(S=(0,M.jsx)(`input`,{ref:s,className:`dz-start-input`,type:`text`,placeholder:`how does my body make energy?`,value:i,"aria-label":`Topic to zoom into`,onChange:x}),t[15]=i,t[16]=S);let C;t[17]===i?C=t[18]:(C=i.trim(),t[17]=i,t[18]=C);let w=!C,T;t[19]===w?T=t[20]:(T=(0,M.jsx)(`button`,{type:`submit`,className:`dz-start-btn`,disabled:w,children:`Zoom in`}),t[19]=w,t[20]=T);let E;t[21]!==S||t[22]!==T?(E=(0,M.jsxs)(`div`,{className:`dz-start-composer`,children:[b,S,T]}),t[21]=S,t[22]=T,t[23]=E):E=t[23];let D;t[24]!==d||t[25]!==E?(D=(0,M.jsx)(`form`,{className:`dz-start-form`,onSubmit:d,children:E}),t[24]=d,t[25]=E,t[26]=D):D=t[26];let O;t[27]===n?O=t[28]:(O=K.map(e=>(0,M.jsx)(`button`,{type:`button`,className:`dz-start-chip`,onClick:()=>n(e),children:e},e)),t[27]=n,t[28]=O);let k;t[29]===O?k=t[30]:(k=(0,M.jsx)(`div`,{className:`dz-start-chips`,children:O}),t[29]=O,t[30]=k);let A;return t[31]!==D||t[32]!==k||t[33]!==y?(A=(0,M.jsxs)(`div`,{className:`dz-start`,children:[f,(0,M.jsxs)(`div`,{className:`dz-start-body`,children:[p,g,_,v,y,D,k]})]}),t[31]=D,t[32]=k,t[33]=y,t[34]=A):A=t[34],A}function J(e){let t=(0,h.c)(8),{query:n}=e,r;t[0]===n?r=t[1]:(r=(0,M.jsx)(H,{query:n}),t[0]=n,t[1]=r);let i;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(i=(0,M.jsxs)(`div`,{className:`dz-loading-lens`,"aria-hidden":!0,children:[(0,M.jsx)(`span`,{}),(0,M.jsx)(`span`,{}),(0,M.jsx)(`span`,{})]}),t[2]=i):i=t[2];let a;t[3]===n?a=t[4]:(a=(0,M.jsxs)(`div`,{className:`dz-loading`,children:[i,(0,M.jsxs)(`span`,{className:`dz-loading-text`,children:[`Building ten scales of “`,n,`”…`]})]}),t[3]=n,t[4]=a);let o;return t[5]!==r||t[6]!==a?(o=(0,M.jsxs)(`div`,{className:`dz-loading-screen`,children:[r,a]}),t[5]=r,t[6]=a,t[7]=o):o=t[7],o}function Y(e){let t=(0,h.c)(9),{message:n,onRetry:r}=e,i;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(i=(0,M.jsx)(H,{}),t[0]=i):i=t[0];let a;t[1]===Symbol.for(`react.memo_cache_sentinel`)?(a=(0,M.jsx)(`div`,{className:`dz-error-title`,children:`Couldn't build the zoom`}),t[1]=a):a=t[1];let o;t[2]===n?o=t[3]:(o=(0,M.jsx)(`div`,{className:`dz-error-body`,children:n}),t[2]=n,t[3]=o);let s;t[4]===r?s=t[5]:(s=(0,M.jsx)(`button`,{type:`button`,className:`dz-start-btn`,onClick:r,children:`Try another topic`}),t[4]=r,t[5]=s);let c;return t[6]!==o||t[7]!==s?(c=(0,M.jsxs)(`div`,{className:`dz-loading-screen`,children:[i,(0,M.jsxs)(`div`,{className:`dz-error`,children:[a,o,s]})]}),t[6]=o,t[7]=s,t[8]=c):c=t[8],c}function X(){(0,m.useEffect)(()=>a(r()),[]);let[e,t]=(0,m.useState)(``),[n,i]=(0,m.useState)(null),[o,s]=(0,m.useState)(!1),[c,d]=(0,m.useState)(null),[f,p]=(0,m.useState)(null),[h,g]=(0,m.useState)(P(`seed`)),_=(0,m.useRef)(0),v=(0,m.useRef)(null),y=(0,m.useRef)(``),b=(0,m.useRef)(null),C=(0,m.useCallback)(async e=>{b.current?.abort();let n=new AbortController;b.current=n,y.current=e,_.current=0,t(e),i(null),d(null),p(null),s(!0);try{let t=u(l());v.current=t;let{rangeStart:r,levels:a}=await x(e,t,n.signal);if(n.signal.aborted)return;let o=[],c=[],d=null;for(let e=0;e<a.length;e++){let t=_.current++,n=d===null?null:o.find(e=>e.id===d),r=n?n.level.subtopics[n.level.selectedIndex]??null:null;o.push({id:t,parentId:d,viaSubtopic:r,level:a[e],depth:e}),c.push(t),d=t}i({query:e,rangeStart:r,nodes:o,trunkIds:c}),s(!1)}catch(e){n.signal.aborted||(d(e instanceof Error?e.message:`Something went wrong.`),s(!1))}},[]),w=(0,m.useCallback)(async(e,t,n,r)=>{let a=v.current??u(l());b.current?.abort();let o=new AbortController;b.current=o,p(e);try{let s=await S(y.current,n,t,r,a,o.signal);if(o.signal.aborted)return;i(n=>{if(!n)return n;let i=[...n.nodes],a=e;for(let e=0;e<s.length;e++){let n=_.current++,o=e===0?t:s[e-1].subtopics[s[e-1].selectedIndex];i.push({id:n,parentId:a,viaSubtopic:o,level:s[e],depth:r+1+e}),a=n}return{...n,nodes:i}}),p(null)}catch{o.signal.aborted||p(null)}},[]),T=(0,m.useCallback)(()=>{b.current?.abort(),t(E.query),i(E),d(null),s(!1)},[]);(0,m.useEffect)(()=>{let e=new URLSearchParams(window.location.hash.split(`?`)[1]??``);if(e.get(`demo`)===`1`){T();return}let t=e.get(`q`)?.trim()??``;return t&&C(t),()=>b.current?.abort()},[]),(0,m.useEffect)(()=>{let n=()=>{let n=window.location.hash;if(!n.startsWith(`#/deepzoom`))return;let r=new URLSearchParams(n.split(`?`)[1]??``);if(r.get(`demo`)===`1`){e!==E.query&&T();return}let a=r.get(`q`)?.trim()??``;if(a&&a!==e)C(a);else if(!a){let e=r.get(`seed`)?.trim()??``;b.current?.abort(),t(``),i(null),d(null),g(e)}};return window.addEventListener(`hashchange`,n),()=>window.removeEventListener(`hashchange`,n)},[e,C,T]);let D=(0,m.useCallback)(()=>{b.current?.abort(),window.location.hash!==`#/deepzoom`&&(window.location.hash=`#/deepzoom`),d(null),g(``),t(``),i(null)},[]),O=(0,m.useCallback)(()=>{d(null),t(``),i(null)},[]),k=new URLSearchParams(window.location.hash.split(`?`)[1]??``).get(`demo`)===`1`;return(0,M.jsxs)(`div`,{className:`deepzoom-app mavea-app`,children:[!e&&!o&&!n&&!c&&(0,M.jsx)(q,{onSubmit:e=>void C(e),seed:h}),o&&(0,M.jsx)(J,{query:e}),c&&!o&&(0,M.jsx)(Y,{message:c,onRetry:O}),n&&!o&&(0,M.jsx)(G,{tree:n,query:e,generatingForId:f,allowBranchGeneration:!k,onBranchRequest:w,onNew:D})]})}export{X as DeepZoomApp};
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import{t as e}from"./react-BZJXY1be.js";import{t}from"./compiler-runtime-qQQXpJgv.js";import{t as n}from"./jsx-runtime-DeHZSEgm.js";import{R as r,l as i}from"./index-Db-FgYxX.js";import{t as a}from"./useFocusTrap-CJmpNZv2.js";import{t as o}from"./Presence-UqXfH4Y-.js";import{n as s}from"./spokenText-Dy-GZvZV.js";import{w as c}from"./kokoro-yB7iU_JU.js";import{t as l}from"./FeatureUseNotice-CCI4mM39.js";import{t as u}from"./providers-CPhoN8j0.js";var d=e(),f=t(),p=1600,m=1300;function h(e){let t=`right`,n=e.speaking;return n?.side===`yours`?n.pointing?{state:`acting`,emotion:`focused`,gaze:t}:{state:`speaking`,emotion:`focused`,gaze:t}:n?.side===`theirs`?{state:`idle`,emotion:n.offer?`curious`:`neutral`,gaze:t}:e.whoseTurn===`yours`?{state:`thinking`,emotion:e.guarded?`concerned`:`focused`,gaze:t}:{state:`idle`,emotion:`neutral`,gaze:t}}function g(e){let t=`left`,n=e.speaking;return n?.side===`theirs`?{state:`speaking`,emotion:n.offer?`focused`:`neutral`,gaze:t}:n?.side===`yours`?{state:`idle`,emotion:n.offer?`curious`:`neutral`,gaze:t}:e.whoseTurn===`theirs`?{state:`thinking`,emotion:`neutral`,gaze:t}:{state:`idle`,emotion:e.guarded?`curious`:`neutral`,gaze:t}}function _(e){switch(e.kind){case`running`:return{yours:h(e),theirs:g(e)};case`deal`:return{yours:{state:`idle`,emotion:`celebrate`,gaze:`center`},theirs:{state:`idle`,emotion:`warm`,gaze:`center`}};case`approved`:return{yours:{state:`idle`,emotion:`warm`,gaze:`center`},theirs:{state:`idle`,emotion:`neutral`,gaze:`center`}};case`nodeal`:return{yours:{state:`idle`,emotion:e.boundaryHeld?`focused`:`concerned`,gaze:`center`},theirs:{state:`idle`,emotion:`neutral`,gaze:`center`}};case`stopped`:return{yours:{state:`idle`,emotion:`sleepy`,gaze:`down`},theirs:{state:`idle`,emotion:`sleepy`,gaze:`down`}}}}function v(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 a name, place, brand, or borrowed term a voice would genuinely 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. Annotate sparingly: the said side is one you invent, so a wrong one makes the voice say a word WRONG. Ordinary English words and names are never annotated — a synthesizer already says them correctly. When unsure, leave it alone.`,`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 y(){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 b=900,x=1e3;function S(e){try{return typeof e==`string`?JSON.parse(e.match(/\{[\s\S]*\}/)?.[0]??`{}`):e}catch{return{}}}function C(e){return e.map(e=>({role:e.who===`you`?`user`:`assistant`,content:e.text}))}async function ee(e,t,n,r){try{let i=C(t),a=i.pop();if(!a||a.role!==`user`)return``;let o=await u(n.provider).generate({system:v(e),history:i,user:a.content,maxTokens:b,thinkingLevel:`minimal`,signal:r},n);if(r.aborted)return``;let s=S(o.raw).reply;return typeof s==`string`?s.trim().slice(0,600):``}catch{return``}}async function te(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
|
+
`),s=[`Conversation being rehearsed: ${e.scenario}`,r?`Earlier take, your summary then: ${r}`:null,`Take ${n} transcript:`,o].filter(Boolean).join(`
|
|
5
|
+
`),c=await u(i.provider).generate({system:y(),history:[],user:s,maxTokens:x,thinkingLevel:`minimal`,signal:a},i);if(a.aborted)return null;let l=S(c.raw),d=typeof l.note==`string`?l.note.trim().slice(0,400):``,f=typeof l.tip==`string`?l.tip.trim().slice(0,400):``;return d&&f?{note:d,tip:f}:null}catch{return null}}function w(e){return`Debrief: I had the real "${e.scenario}" conversation. Here's what happened: `}var T=n();function E(e){let t=(0,f.c)(112),{setup:n,themLabel:i,cfg:a,speak:u,onDebrief:m,onAdjustBrief:h}=e,g=r(),[v,y]=(0,d.useState)(1),b;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(b=[],t[0]=b):b=t[0];let[x,S]=(0,d.useState)(b),[C,E]=(0,d.useState)(``),[O,k]=(0,d.useState)(null),[re,A]=(0,d.useState)(!1),[ie,j]=(0,d.useState)(!1),[ae,oe]=(0,d.useState)(null),se=(0,d.useRef)(null),ce=(0,d.useRef)(null),M=(0,d.useRef)(null),le,N;t[1]===Symbol.for(`react.memo_cache_sentinel`)?(le=()=>()=>{M.current?.abort(),c()},N=[],t[1]=le,t[2]=N):(le=t[1],N=t[2]),(0,d.useEffect)(le,N);let P;t[3]===Symbol.for(`react.memo_cache_sentinel`)?(P=()=>{let e=ce.current;e&&(e.scrollTop=e.scrollHeight)},t[3]=P):P=t[3];let ue;t[4]!==O||t[5]!==x?(ue=[x,O],t[4]=O,t[5]=x,t[6]=ue):ue=t[6],(0,d.useEffect)(P,ue);let[de,fe]=(0,d.useState)(!1),pe=(0,d.useRef)(0),me,F;t[7]===x?(me=t[8],F=t[9]):(me=()=>{if(x.length===pe.current)return;if(pe.current=x.length,x[x.length-1]?.who!==`them`){fe(!1);return}fe(!0);let e=window.setTimeout(()=>fe(!1),p);return()=>window.clearTimeout(e)},F=[x],t[7]=x,t[8]=me,t[9]=F),(0,d.useEffect)(me,F);let he=O===`reply`?`theirs`:`yours`,ge;t[10]!==de||t[11]!==he?(ge=_({kind:`running`,whoseTurn:he,guarded:!1,speaking:de?{side:`theirs`,offer:!1,pointing:!1}:null}),t[10]=de,t[11]=he,t[12]=ge):ge=t[12];let _e=ge,ve;t[13]!==a||t[14]!==n||t[15]!==u?(ve=async e=>{M.current?.abort();let t=new AbortController;M.current=t,k(`reply`),A(!1);let r=await ee(n,e,a,t.signal);if(!t.signal.aborted){if(k(null),!r){A(!0);return}S([...e,{who:`them`,text:s(r)}]),u?.(r)}},t[13]=a,t[14]=n,t[15]=u,t[16]=ve):ve=t[16];let ye=ve,be;t[17]!==O||t[18]!==C||t[19]!==x||t[20]!==ye?(be=()=>{let e=C.trim();if(!e||O)return;E(``),oe(null),j(!1);let t=[...x,{who:`you`,text:e}];S(t),ye(t)},t[17]=O,t[18]=C,t[19]=x,t[20]=ye,t[21]=be):be=t[21];let xe=be,Se;t[22]!==O||t[23]!==a||t[24]!==x||t[25]!==n||t[26]!==v?(Se=async()=>{if(O)return;M.current?.abort();let e=new AbortController;M.current=e,k(`coach`),j(!1);let t=await te(n,x,v,se.current,a,e.signal);if(!e.signal.aborted){if(k(null),!t){j(!0);return}oe(t),se.current=t.note,y(D),S([])}},t[22]=O,t[23]=a,t[24]=x,t[25]=n,t[26]=v,t[27]=Se):Se=t[27];let Ce=Se,we;t[28]===i?we=t[29]:(we=e=>(0,T.jsxs)(`span`,{className:`dlg-side ${e===`you`?`yours`:`theirs`}`,children:[(0,T.jsx)(`span`,{className:`dlg-avatar`,"aria-hidden":`true`}),(0,T.jsx)(`span`,{className:`dlg-side-text`,children:(0,T.jsx)(`span`,{className:`dlg-side-name`,children:e===`you`?`You`:i})})]}),t[28]=i,t[29]=we);let I=we,L;t[30]===Symbol.for(`react.memo_cache_sentinel`)?(L=(0,T.jsx)(l,{kind:`simulation`,from:`live`}),t[30]=L):L=t[30];let Te;t[31]===Symbol.for(`react.memo_cache_sentinel`)?(Te=(0,T.jsxs)(`div`,{className:`dlg-seat yours`,children:[(0,T.jsx)(`span`,{className:`dlg-seat-you`,"aria-hidden":`true`}),(0,T.jsx)(`span`,{className:`dlg-seat-name`,children:`You`})]}),t[31]=Te):Te=t[31];let Ee;t[32]===v?Ee=t[33]:(Ee=(0,T.jsx)(`div`,{className:`dlg-meta`,children:(0,T.jsxs)(`span`,{className:`dlg-take-badge`,children:[`Take `,v]})}),t[32]=v,t[33]=Ee);let De;t[34]===_e.theirs?De=t[35]:(De=(0,T.jsx)(o,{..._e.theirs}),t[34]=_e.theirs,t[35]=De);let Oe;t[36]!==De||t[37]!==g?(Oe=(0,T.jsx)(`span`,{className:`dlg-jelly ghost`,"aria-hidden":`true`,ref:g,children:De}),t[36]=De,t[37]=g,t[38]=Oe):Oe=t[38];let ke;t[39]===i?ke=t[40]:(ke=(0,T.jsx)(`span`,{className:`dlg-seat-name`,children:i}),t[39]=i,t[40]=ke);let Ae;t[41]===Symbol.for(`react.memo_cache_sentinel`)?(Ae=(0,T.jsx)(`span`,{className:`dlg-seat-tag`,children:`in character`}),t[41]=Ae):Ae=t[41];let je;t[42]!==Oe||t[43]!==ke?(je=(0,T.jsxs)(`div`,{className:`dlg-seat theirs`,children:[Oe,ke,Ae]}),t[42]=Oe,t[43]=ke,t[44]=je):je=t[44];let Me;t[45]!==Ee||t[46]!==je?(Me=(0,T.jsxs)(`div`,{className:`dlg-tablescape`,children:[Te,Ee,je]}),t[45]=Ee,t[46]=je,t[47]=Me):Me=t[47];let Ne;if(t[48]!==I||t[49]!==x){let e;t[51]===I?e=t[52]:(e=(e,t)=>(0,T.jsxs)(`li`,{className:`dlg-turn ${e.who===`you`?`yours`:`theirs`}`,children:[I(e.who),(0,T.jsx)(`p`,{className:`dlg-turn-say`,children:e.text})]},t),t[51]=I,t[52]=e),Ne=x.map(e),t[48]=I,t[49]=x,t[50]=Ne}else Ne=t[50];let R;t[53]!==O||t[54]!==I?(R=O===`reply`&&(0,T.jsxs)(`li`,{className:`dlg-turn theirs thinking`,"aria-hidden":`true`,children:[I(`them`),(0,T.jsxs)(`span`,{className:`dlg-typing`,children:[(0,T.jsx)(`i`,{}),(0,T.jsx)(`i`,{}),(0,T.jsx)(`i`,{})]})]}),t[53]=O,t[54]=I,t[55]=R):R=t[55];let z;t[56]!==re||t[57]!==x||t[58]!==ye?(z=re&&(0,T.jsxs)(`li`,{className:`dlg-failed`,children:[`They didn't respond.`,` `,(0,T.jsx)(`button`,{type:`button`,onClick:()=>void ye(x),children:`Try again`})]}),t[56]=re,t[57]=x,t[58]=ye,t[59]=z):z=t[59];let B;t[60]!==Ne||t[61]!==R||t[62]!==z?(B=(0,T.jsxs)(`ol`,{className:`dlg-log`,ref:ce,role:`log`,"aria-live":`polite`,"aria-label":`The take`,children:[Ne,R,z]}),t[60]=Ne,t[61]=R,t[62]=z,t[63]=B):B=t[63];let Pe;t[64]===ae?Pe=t[65]:(Pe=ae&&(0,T.jsxs)(`aside`,{className:`dlg-coach`,"aria-label":`Coach, between takes`,children:[(0,T.jsx)(`span`,{className:`dlg-coach-kicker`,children:`COACH — BETWEEN TAKES`}),(0,T.jsx)(`p`,{className:`dlg-coach-note`,children:ae.note}),(0,T.jsx)(`p`,{className:`dlg-coach-tip`,children:ae.tip})]}),t[64]=ae,t[65]=Pe);let V;t[66]===O?V=t[67]:(V=O===`coach`&&(0,T.jsx)(`p`,{className:`dlg-coach-wait`,children:`Coach is watching the take back…`}),t[66]=O,t[67]=V);let Fe;t[68]!==ie||t[69]!==Ce?(Fe=ie&&(0,T.jsxs)(`p`,{className:`dlg-failed`,role:`status`,children:[`The coach didn’t respond — your take is still here.`,` `,(0,T.jsx)(`button`,{type:`button`,onClick:()=>void Ce(),children:`Try again`})]}),t[68]=ie,t[69]=Ce,t[70]=Fe):Fe=t[70];let H;t[71]===Symbol.for(`react.memo_cache_sentinel`)?(H=e=>E(e.target.value),t[71]=H):H=t[71];let Ie;t[72]===xe?Ie=t[73]:(Ie=e=>{e.key===`Enter`&&xe()},t[72]=xe,t[73]=Ie);let Le=x.length===0?`Open the conversation — your first line`:`Your next line`,U;t[74]!==C||t[75]!==Ie||t[76]!==Le?(U=(0,T.jsx)(`input`,{value:C,onChange:H,onKeyDown:Ie,placeholder:Le,"aria-label":`Your line`}),t[74]=C,t[75]=Ie,t[76]=Le,t[77]=U):U=t[77];let Re;t[78]!==O||t[79]!==C?(Re=!C.trim()||O!==null,t[78]=O,t[79]=C,t[80]=Re):Re=t[80];let ze;t[81]!==xe||t[82]!==Re?(ze=(0,T.jsx)(`button`,{type:`button`,className:`dlg-say`,disabled:Re,onClick:xe,children:`Say it`}),t[81]=xe,t[82]=Re,t[83]=ze):ze=t[83];let Be;t[84]!==U||t[85]!==ze?(Be=(0,T.jsxs)(`div`,{className:`dlg-compose`,children:[U,ze]}),t[84]=U,t[85]=ze,t[86]=Be):Be=t[86];let W;t[87]!==O||t[88]!==x?(W=O!==null||!x.some(ne),t[87]=O,t[88]=x,t[89]=W):W=t[89];let G;t[90]===Ce?G=t[91]:(G=()=>void Ce(),t[90]=Ce,t[91]=G);let K;t[92]!==W||t[93]!==G?(K=(0,T.jsx)(`button`,{type:`button`,className:`dlg-end-take`,disabled:W,onClick:G,children:`End take · get coached`}),t[92]=W,t[93]=G,t[94]=K):K=t[94];let q;t[95]===h?q=t[96]:(q=(0,T.jsx)(`button`,{type:`button`,className:`dlg-followup-btn ghost`,onClick:h,children:`Adjust the brief`}),t[95]=h,t[96]=q);let J;t[97]!==m||t[98]!==n?(J=m&&(0,T.jsx)(`button`,{type:`button`,className:`dlg-real-debrief`,onClick:()=>m(w(n)),title:`Had the real conversation? Tell Mavéa how it went.`,children:`Debrief the real one`}),t[97]=m,t[98]=n,t[99]=J):J=t[99];let Y;t[100]!==K||t[101]!==q||t[102]!==J?(Y=(0,T.jsxs)(`div`,{className:`dlg-take-actions`,children:[K,q,J]}),t[100]=K,t[101]=q,t[102]=J,t[103]=Y):Y=t[103];let Ve;return t[104]!==Me||t[105]!==B||t[106]!==Pe||t[107]!==V||t[108]!==Fe||t[109]!==Be||t[110]!==Y?(Ve=(0,T.jsxs)(`div`,{className:`dlg-table`,"data-seat":`you`,children:[L,Me,B,Pe,V,Fe,Be,Y]}),t[104]=Me,t[105]=B,t[106]=Pe,t[107]=V,t[108]=Fe,t[109]=Be,t[110]=Y,t[111]=Ve):Ve=t[111],Ve}function ne(e){return e.who===`you`}function D(e){return e+1}var O=`Reply with ONLY a JSON object (no prose, no fences):
|
|
6
|
+
{"say": "<ONE short spoken line for the negotiation log>", "offer": "<the full current proposal in plain words, or null>", "decision": "offer" | "accept" | "pass"}
|
|
7
|
+
"accept" means you take the OTHER side's standing offer as-is (only when one exists). "pass" ends the talks with no deal. Keep every "say" under 25 words.`;function k(e){return`You are the user's Mavéa, negotiating on their behalf with ${e.counterpart}'s side.
|
|
8
|
+
THE GOAL: ${e.goal}
|
|
9
|
+
YOU MAY OFFER (nothing else exists): ${e.mine}
|
|
10
|
+
${e.boundaries.length?`HARD BOUNDARIES — these are NEVER offered, in any form: ${e.boundaries.join(`; `)}`:``}
|
|
11
|
+
You are at the table to REACH an agreement the goal can live with, not to demonstrate firmness: open your first move with a concrete offer near the goal (never pass on your first move), concede in small steps toward the middle, and accept a standing offer when it clearly serves the goal. Walking away is a last resort for a genuinely unacceptable table, not a default. ${O}`}function re(e){return`You are a stand-in negotiator for ${e.counterpart}. Everything you know about ${e.counterpart}'s side: ${e.theirs}
|
|
12
|
+
Argue that side's interest in GOOD FAITH: counter with concrete terms rather than walking away, concede only for real gains, and accept a standing offer when it is genuinely fair to ${e.counterpart}. Never pass on your first move, and never invent assets the brief above doesn't mention. ${O}`}function A(e){let t=e.indexOf(`{`),n=e.lastIndexOf(`}`);if(t<0||n<=t)return null;try{let r=JSON.parse(e.slice(t,n+1)),i=typeof r.say==`string`?r.say.trim():``,a=typeof r.offer==`string`&&r.offer.trim()?r.offer.trim():null,o=r.decision===`accept`||r.decision===`pass`||r.decision===`offer`?r.decision:`offer`;return i?{say:i,offer:a,decision:o}:null}catch{return null}}var ie=e=>e.toLowerCase().replace(/[\s,]/g,``);function j(e,t){let n=ie(e);for(let e of t){let t=ie(e);if(t&&n.includes(t))return e}return null}function ae(e){for(let t=e.length-1;t>=0;t--){let n=e[t];if(n.offer&&(n.side===`yours`||n.side===`theirs`))return{offer:n.offer,by:n.side}}return null}function oe(e){let t=new Set,n=[];for(let r of e.split(/(?<!\d)[,;\n]|[,;\n](?!\d)/)){let e=r.trim();if(!e)continue;let i=e.toLowerCase();t.has(i)||(t.add(i),n.push(e))}return n}function se(e,t){return e.length===0?`(no moves yet — you open)`:e.map(e=>`${e.side===`yours`?`YOUR SIDE`:e.side===`theirs`?`${t.counterpart}'S SIDE`:`—`}: ${e.say}${e.offer?` [standing offer: ${e.offer}]`:``}`).join(`
|
|
13
|
+
`)}async function ce(e,t,n,r){let i=[],a=e=>{i.push(e),n(e)},o=e.maxRounds??8,s=null,c=null,l=0;for(;l<o&&!c&&!r?.aborted;l++){let n=l%2==0?`yours`:`theirs`,o=n===`yours`?k(e):re(e),u=`Negotiation so far:\n${se(i,e)}\nYour move.`,d=null,f=!i.some(e=>e.side===n),p=!1;for(let i=0;i<3;i++){let i=await t(o,u).catch(()=>``);if(r?.aborted)break;if(d=A(i),!d){p=!0,u+=`
|
|
14
|
+
Your last reply was not the required JSON object. Reply with ONLY {"say":…, "offer":…, "decision":…} — no prose, no fences.`;continue}if(p=!1,f&&d.decision===`pass`){u+=`
|
|
15
|
+
It is too early to end the talks — the table deserves your best concrete move first. Make an offer or a counter.`,d=null;continue}let s=n===`yours`&&d.offer?j(d.offer,e.boundaries):null;if(!s)break;a({side:`engine`,kind:`boundary`,say:`Withheld — "${s}" is outside your boundary.`}),u+=`\nYour previous offer was WITHHELD: it included "${s}", which is never offered. Make a different move.`,d=null}if(r?.aborted)break;if(!d){a({side:n,kind:`pass`,say:p?`No reply arrived — the run ended early.`:`No further moves.`});break}if(d.decision===`accept`&&s&&s.by!==n){c=s.offer,a({side:n,kind:`accept`,say:d.say,offer:c});break}if(d.decision===`pass`||d.decision===`accept`&&(!s||s.by===n)){a({side:n,kind:`pass`,say:d.say});break}d.offer&&(s={offer:d.offer,by:n}),a({side:n,kind:i.some(e=>e.kind===`offer`||e.kind===`counter`)?`counter`:`offer`,say:d.say,offer:d.offer??void 0})}return{events:i,deal:c,rounds:l}}var M=`Reply with ONLY a JSON object (no prose, no fences):
|
|
16
|
+
{"moved": [{"point": "<an argument the user's side made that the other side visibly responded to>", "turn": <the 1-based line number it happened on>}],
|
|
17
|
+
"exposed": [{"point": "<something the other side pushed that the user's side had no good answer for>", "turn": <line number>}],
|
|
18
|
+
"openers": ["<a line to open the REAL conversation with>", "...", "..."]}
|
|
19
|
+
"moved" and "exposed" may each be an empty array when the transcript doesn't support them — never invent one just to fill the slot — and otherwise at most 2 entries each. "openers" is up to 3 short lines (under 20 words), each usable as-is, grounded only in the brief and transcript below. Cite ONLY real line numbers from the transcript; never invent facts, numbers, or concessions.`;function le(e){return e?`They agreed: ${e}.`:`No deal was reached.`}function N(e,t){return e.map((e,n)=>{let r=e.side===`yours`?`YOUR SIDE`:e.side===`theirs`?`${t.counterpart}'S SIDE`:`REFEREE`;return`${n+1}. ${r}: ${e.say}${e.offer?` [standing offer: ${e.offer}]`:``}`}).join(`
|
|
20
|
+
`)}function P(e,t,n){return{system:`You are a negotiation coach reviewing a practice run. Judge ONLY the numbered transcript below — never anything outside it. ${M}`,user:`THE GOAL: ${e.goal}
|
|
21
|
+
WHAT THE USER COULD OFFER: ${e.mine}
|
|
22
|
+
${e.counterpart.toUpperCase()}'S POSITION, AS THE USER DESCRIBED IT: ${e.theirs}
|
|
23
|
+
THE TRANSCRIPT:
|
|
24
|
+
${N(t,e)}
|
|
25
|
+
OUTCOME: ${le(n)}`}}function ue(e,t){let n=e.indexOf(`{`),r=e.lastIndexOf(`}`);if(n<0||r<=n)return null;try{let i=JSON.parse(e.slice(n,r+1)),a=e=>{if(!Array.isArray(e))return[];let n=[];for(let r of e){if(n.length>=2)break;if(!r||typeof r!=`object`)continue;let e=r,i=typeof e.point==`string`?e.point.trim():``;if(!i)continue;let a=typeof e.turn==`number`&&e.turn>=1&&e.turn<=t?Math.trunc(e.turn):null;n.push({point:i,turn:a})}return n},o=a(i.moved),s=a(i.exposed),c=Array.isArray(i.openers)?i.openers.filter(e=>typeof e==`string`&&e.trim().length>0).map(e=>e.trim()).slice(0,3):[];return!o.length&&!s.length&&!c.length?null:{moved:o,exposed:s,openers:c}}catch{return null}}async function de(e,t,n,r,i){if(i?.aborted)return null;let{system:a,user:o}=P(e,t,n),s=await r(a,o).catch(()=>``);return i?.aborted||!s?null:ue(s,t.length)}function fe(e,t,n){return`I ran a practice negotiation as a rehearsal: my Mavéa argued my side against a stand-in for ${e.counterpart}, built only from my own notes. Nothing was sent to anyone — this was a scouting run on my own key.
|
|
26
|
+
My goal: ${e.goal}
|
|
27
|
+
What I could offer: ${e.mine}
|
|
28
|
+
${e.counterpart}'s position, as I described it: ${e.theirs}
|
|
29
|
+
The full exchange:
|
|
30
|
+
${N(t,e)}
|
|
31
|
+
Outcome: ${le(n)}
|
|
32
|
+
Help me prepare for the real conversation: what to open with, where my case is weakest, and how to phrase my strongest point. Work only from this transcript and brief — invent nothing about ${e.counterpart}.`}function pe(e){let t=`Negotiation prep: ${e.trim()}`;return t.length>60?`${t.slice(0,57)}…`:t}function me(e,t,n=1200){return async(r,i)=>{let a=await u(e.provider).generate({system:r,history:[],user:i,maxTokens:n,temperature:.7,thinkingLevel:`minimal`,signal:t},e);return typeof a.raw==`string`?a.raw:JSON.stringify(a.raw)}}var F=1200,he=[{tag:`Ask for a raise`,counterpart:`Priya`,goal:`A raise to $95k, up from $82k, this cycle`,mine:`I led the billing migration and can mentor two juniors`,theirs:`My manager. Budget's tight this quarter; she values retention and won't set precedents`,boundaries:`working weekends, a title bump instead of pay`},{tag:`Buy a used car`,counterpart:`the dealer`,goal:`Get the 2019 Civic to $14,000 out the door`,mine:`Pay cash today, skip the extended warranty, take it as-is`,theirs:`Wants it off the lot this month; won't budge on the doc fee`,boundaries:`going above $15,000, financing through them`},{tag:`Split the rent`,counterpart:`Sam`,goal:`Split rent by room size — I take the smaller room for $200 less`,mine:`I'll set up the utilities and cover the parking spot`,theirs:`My roommate. Thinks a straight 50/50 split is only fair, and always pays on time`,boundaries:`paying more than half`}],ge=e=>`${Math.floor(e/60)}:${String(e%60).padStart(2,`0`)}`;function _e(){let e=(0,f.c)(1),t;return e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,T.jsx)(`svg`,{viewBox:`0 0 24 24`,width:`16`,height:`16`,fill:`none`,"aria-hidden":`true`,children:(0,T.jsx)(`path`,{d:`M6 6l12 12M18 6L6 18`,stroke:`currentColor`,strokeWidth:`1.8`,strokeLinecap:`round`})}),e[0]=t):t=e[0],t}function ve(){let e=(0,f.c)(1),t;return e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,T.jsxs)(`svg`,{viewBox:`0 0 24 24`,width:`13`,height:`13`,fill:`none`,"aria-hidden":`true`,children:[(0,T.jsx)(`path`,{d:`M12 3l7 2.5v5c0 4.4-2.9 8-7 9.5-4.1-1.5-7-5.1-7-9.5v-5L12 3z`,stroke:`currentColor`,strokeWidth:`1.6`,strokeLinejoin:`round`}),(0,T.jsx)(`path`,{d:`M9 12l2 2 4-4.5`,stroke:`currentColor`,strokeWidth:`1.6`,strokeLinecap:`round`})]}),e[0]=t):t=e[0],t}function ye(){let e=(0,f.c)(1),t;return e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,T.jsx)(`svg`,{viewBox:`0 0 24 24`,width:`16`,height:`16`,fill:`none`,"aria-hidden":`true`,children:(0,T.jsx)(`path`,{d:`M4 12.5l5 5 11-12`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`})}),e[0]=t):t=e[0],t}function be(e){let t=(0,f.c)(6),{side:n,name:r}=e,i=n===`yours`,a=`dlg-side ${n}`,o;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(o=(0,T.jsx)(`span`,{className:`dlg-avatar`,"aria-hidden":`true`}),t[0]=o):o=t[0];let s=i?`Your Mavéa`:r,c;t[1]===s?c=t[2]:(c=(0,T.jsx)(`span`,{className:`dlg-side-text`,children:(0,T.jsx)(`span`,{className:`dlg-side-name`,children:s})}),t[1]=s,t[2]=c);let l;return t[3]!==a||t[4]!==c?(l=(0,T.jsxs)(`span`,{className:a,children:[o,c]}),t[3]=a,t[4]=c,t[5]=l):l=t[5],l}function xe(e){let t=(0,f.c)(10),{turns:n,running:r}=e,i=r?Math.min(n+1,8):n,a=r?`Round ${i} of 8`:`${n} turns`,o=r?`Round ${i}`:`${n} turn${n===1?``:`s`}`,s;t[0]===o?s=t[1]:(s=(0,T.jsx)(`span`,{className:`dlg-rounds-label`,children:o}),t[0]=o,t[1]=s);let c;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(c=Array.from({length:8}),t[2]=c):c=t[2];let l;t[3]!==r||t[4]!==n?(l=(0,T.jsx)(`span`,{className:`dlg-rounds-track`,"aria-hidden":`true`,children:c.map((e,t)=>(0,T.jsx)(`i`,{className:t<n?`on`:t===n&&r?`now`:``},t))}),t[3]=r,t[4]=n,t[5]=l):l=t[5];let u;return t[6]!==a||t[7]!==s||t[8]!==l?(u=(0,T.jsxs)(`div`,{className:`dlg-rounds`,"aria-label":a,children:[s,l]}),t[6]=a,t[7]=s,t[8]=l,t[9]=u):u=t[9],u}function Se(e){let t=(0,f.c)(15),{label:n,onConfirm:r}=e,[i,a]=(0,d.useState)(!1),o=(0,d.useRef)(void 0),s;t[0]===r?s=t[1]:(s=()=>{window.clearTimeout(o.current),a(!0),o.current=window.setTimeout(()=>{a(!1),r()},F)},t[0]=r,t[1]=s);let c=s,l;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(l=()=>{a(!1),window.clearTimeout(o.current)},t[2]=l):l=t[2];let u=l,p,m;t[3]===Symbol.for(`react.memo_cache_sentinel`)?(p=()=>()=>window.clearTimeout(o.current),m=[],t[3]=p,t[4]=m):(p=t[3],m=t[4]),(0,d.useEffect)(p,m);let h=`dlg-hold`+(i?` holding`:``),g;t[5]===c?g=t[6]:(g=e=>{e.repeat||(e.key===`Enter`||e.key===` `)&&c()},t[5]=c,t[6]=g);let _;t[7]===Symbol.for(`react.memo_cache_sentinel`)?(_=(0,T.jsx)(`span`,{className:`dlg-hold-fill`,"aria-hidden":`true`}),t[7]=_):_=t[7];let v;t[8]===n?v=t[9]:(v=(0,T.jsx)(`span`,{className:`dlg-hold-label`,children:n}),t[8]=n,t[9]=v);let y;return t[10]!==c||t[11]!==h||t[12]!==g||t[13]!==v?(y=(0,T.jsxs)(`button`,{type:`button`,className:h,onPointerDown:c,onPointerUp:u,onPointerLeave:u,onKeyDown:g,onKeyUp:u,children:[_,v]}),t[10]=c,t[11]=h,t[12]=g,t[13]=v,t[14]=y):y=t[14],y}function Ce(e){let t=(0,f.c)(5),[n,r]=(0,d.useState)(null),i=(0,d.useRef)(void 0),a=(0,d.useRef)(0),o,s;t[0]===e?(o=t[1],s=t[2]):(o=()=>{if(e.length===a.current)return;a.current=e.length,window.clearTimeout(i.current);let t=e[e.length-1];if(!t||t.side===`engine`){r(null);return}let n=!!t.offer;r({side:t.side,offer:n,pointing:!1}),t.side===`yours`&&n?i.current=window.setTimeout(()=>{r({side:`yours`,offer:!0,pointing:!0}),i.current=window.setTimeout(()=>r(null),m)},p):i.current=window.setTimeout(()=>r(null),p)},s=[e],t[0]=e,t[1]=o,t[2]=s),(0,d.useEffect)(o,s);let c,l;return t[3]===Symbol.for(`react.memo_cache_sentinel`)?(c=()=>()=>window.clearTimeout(i.current),l=[],t[3]=c,t[4]=l):(c=t[3],l=t[4]),(0,d.useEffect)(c,l),n}function we(e,t){return e.side===`yours`?`Your Mavéa`:e.side===`theirs`?`${t}’s stand-in`:`Referee`}function I(e){let t=(0,f.c)(21),{debrief:n,events:r,themLabel:i,onRetry:a}=e;if(n===`idle`)return null;if(n===`loading`){let e;return t[0]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,T.jsxs)(`div`,{className:`dlg-debrief`,"data-state":`loading`,children:[(0,T.jsx)(`span`,{className:`dlg-debrief-eyebrow`,children:`Debrief — drawn from this run`}),(0,T.jsx)(`p`,{className:`dlg-debrief-wait`,children:`Reading back what happened…`})]}),t[0]=e):e=t[0],e}if(n===`failed`){let e,n;t[1]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,T.jsx)(`span`,{className:`dlg-debrief-eyebrow`,children:`Debrief — drawn from this run`}),n=(0,T.jsx)(`p`,{className:`dlg-debrief-wait`,children:`Couldn’t draw a debrief from this run.`}),t[1]=e,t[2]=n):(e=t[1],n=t[2]);let r;return t[3]===a?r=t[4]:(r=(0,T.jsxs)(`div`,{className:`dlg-debrief`,"data-state":`failed`,children:[e,n,(0,T.jsx)(`button`,{type:`button`,className:`dlg-debrief-retry`,onClick:a,children:`Try again`})]}),t[3]=a,t[4]=r),r}let o;t[5]!==r||t[6]!==i?(o=e=>{if(e===null)return null;let t=r[e-1];return t?(0,T.jsxs)(`p`,{className:`dlg-debrief-quote`,children:[(0,T.jsx)(`span`,{className:`dlg-debrief-quote-who`,children:we(t,i)}),`“${s(t.say)}”`]}):null},t[5]=r,t[6]=i,t[7]=o):o=t[7];let c=o,l;t[8]===Symbol.for(`react.memo_cache_sentinel`)?(l=(0,T.jsx)(`span`,{className:`dlg-debrief-eyebrow`,children:`Debrief — drawn from this run`}),t[8]=l):l=t[8];let u;t[9]!==n.moved||t[10]!==c?(u=n.moved.length>0&&(0,T.jsxs)(`div`,{className:`dlg-debrief-group`,children:[(0,T.jsx)(`h4`,{children:`What moved them`}),(0,T.jsx)(`ul`,{children:n.moved.map((e,t)=>(0,T.jsxs)(`li`,{children:[(0,T.jsx)(`p`,{className:`dlg-debrief-point`,children:e.point}),c(e.turn)]},t))})]}),t[9]=n.moved,t[10]=c,t[11]=u):u=t[11];let d;t[12]!==n.exposed||t[13]!==c?(d=n.exposed.length>0&&(0,T.jsxs)(`div`,{className:`dlg-debrief-group`,children:[(0,T.jsx)(`h4`,{children:`Where you’re exposed`}),(0,T.jsx)(`ul`,{children:n.exposed.map((e,t)=>(0,T.jsxs)(`li`,{children:[(0,T.jsx)(`p`,{className:`dlg-debrief-point`,children:e.point}),c(e.turn)]},t))})]}),t[12]=n.exposed,t[13]=c,t[14]=d):d=t[14];let p;t[15]===n.openers?p=t[16]:(p=n.openers.length>0&&(0,T.jsxs)(`div`,{className:`dlg-debrief-group`,children:[(0,T.jsx)(`h4`,{children:`Say this first`}),(0,T.jsx)(`ol`,{className:`dlg-debrief-openers`,children:n.openers.map(L)}),(0,T.jsx)(`p`,{className:`dlg-debrief-footnote`,children:`Mavéa’s suggestions, drawn from the run above — the stand-in only knows what you wrote.`})]}),t[15]=n.openers,t[16]=p);let m;return t[17]!==u||t[18]!==d||t[19]!==p?(m=(0,T.jsxs)(`div`,{className:`dlg-debrief`,"data-state":`ready`,children:[l,u,d,p]}),t[17]=u,t[18]=d,t[19]=p,t[20]=m):m=t[20],m}function L(e,t){return(0,T.jsx)(`li`,{children:e},t)}function Te(e){let t=(0,f.c)(202),{cfg:n,onClose:c,onPrepTurn:u,memoryNodes:p,speak:m,onDebrief:h}=e,g=(0,d.useRef)(null);a(g);let v=r(),y=(0,d.useRef)(null),[b,x]=(0,d.useState)(`brief`),[S,C]=(0,d.useState)(`mavea`),[ee,te]=(0,d.useState)(!1),[w,ne]=(0,d.useState)(``),[D,O]=(0,d.useState)(``),[k,re]=(0,d.useState)(``),[A,ie]=(0,d.useState)(``),[j,se]=(0,d.useState)(``),[M,le]=(0,d.useState)(!1),N;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(N=[],t[0]=N):N=t[0];let[P,ue]=(0,d.useState)(N),[F,we]=(0,d.useState)(null),[L,Te]=(0,d.useState)(!1),[R,z]=(0,d.useState)(!1),[B,Pe]=(0,d.useState)(!1),[V,Fe]=(0,d.useState)(0),[H,Ie]=(0,d.useState)(`idle`),Le;t[1]===Symbol.for(`react.memo_cache_sentinel`)?(Le=[],t[1]=Le):Le=t[1];let[U,Re]=(0,d.useState)(Le),ze=(0,d.useRef)(null),Be=(0,d.useRef)(null),W=(0,d.useRef)(!1),G=(0,d.useRef)(!0),K,q;t[2]===b?(K=t[3],q=t[4]):(K=()=>{if(b!==`running`)return;let e=window.setInterval(()=>{i()||Fe(Ne)},1e3);return()=>window.clearInterval(e)},q=[b],t[2]=b,t[3]=K,t[4]=q),(0,d.useEffect)(K,q);let J,Y;t[5]===Symbol.for(`react.memo_cache_sentinel`)?(J=()=>()=>{G.current=!1,ze.current?.abort(),Be.current?.abort()},Y=[],t[5]=J,t[6]=Y):(J=t[5],Y=t[6]),(0,d.useEffect)(J,Y);let Ve,He;t[7]===c?(Ve=t[8],He=t[9]):(Ve=()=>{let e=e=>{e.key===`Escape`&&c()};return window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)},He=[c],t[7]=c,t[8]=Ve,t[9]=He),(0,d.useEffect)(Ve,He);let Ue;t[10]===Symbol.for(`react.memo_cache_sentinel`)?(Ue=()=>{let e=y.current;e&&(e.scrollTop=e.scrollHeight)},t[10]=Ue):Ue=t[10];let We;t[11]===P?We=t[12]:(We=[P],t[11]=P,t[12]=We),(0,d.useEffect)(Ue,We);let Ge;t[13]===j?Ge=t[14]:(Ge=oe(j),t[13]=j,t[14]=Ge);let Ke=Ge,qe;t[15]===w?qe=t[16]:(qe=w.trim(),t[15]=w,t[16]=qe);let Je;t[17]===D?Je=t[18]:(Je=D.trim(),t[17]=D,t[18]=Je);let Ye;t[19]===k?Ye=t[20]:(Ye=k.trim(),t[19]=k,t[20]=Ye);let Xe;t[21]===A?Xe=t[22]:(Xe=A.trim(),t[21]=A,t[22]=Xe);let Ze;t[23]!==Ke||t[24]!==qe||t[25]!==Je||t[26]!==Ye||t[27]!==Xe?(Ze={counterpart:qe,goal:Je,mine:Ye,theirs:Xe,boundaries:Ke},t[23]=Ke,t[24]=qe,t[25]=Je,t[26]=Ye,t[27]=Xe,t[28]=Ze):Ze=t[28];let X=Ze,Qe;t[29]!==p||t[30]!==ee?(Qe=ee?(p??[]).map(Me).join(`. `):``,t[29]=p,t[30]=ee,t[31]=Qe):Qe=t[31];let $e=Qe,et;t[32]===D?et=t[33]:(et=D.trim(),t[32]=D,t[33]=et);let tt;t[34]===w?tt=t[35]:(tt=w.trim(),t[34]=w,t[35]=tt);let nt;t[36]===A?nt=t[37]:(nt=A.trim(),t[36]=A,t[37]=nt);let rt;t[38]!==$e||t[39]!==nt?(rt=[nt,$e].filter(Boolean),t[38]=$e,t[39]=nt,t[40]=rt):rt=t[40];let it=rt.join(`
|
|
33
|
+
`),at;t[41]!==et||t[42]!==tt||t[43]!==it?(at={scenario:et,counterpart:tt,context:it},t[41]=et,t[42]=tt,t[43]=it,t[44]=at):at=t[44];let ot=at,st;t[45]===P?st=t[46]:(st=ae(P),t[45]=P,t[46]=st);let ct=st,lt;t[47]===P?lt=t[48]:(lt=P.filter(je),t[47]=P,t[48]=lt);let ut=lt.length,dt;t[49]===P?dt=t[50]:(dt=P.some(Ae),t[49]=P,t[50]=dt);let ft=dt,pt=P.length>0&&P[P.length-1].side===`engine`,mt=[...P].reverse().find(ke),ht=mt&&mt.side===`yours`?`theirs`:`yours`,gt=Ce(P),_t;bb0:{if(b===`done`){if(F&&L){let e;t[51]===Symbol.for(`react.memo_cache_sentinel`)?(e={kind:`approved`},t[51]=e):e=t[51],_t=e;break bb0}if(F){let e;t[52]===Symbol.for(`react.memo_cache_sentinel`)?(e={kind:`deal`},t[52]=e):e=t[52],_t=e;break bb0}if(B){let e;t[53]===Symbol.for(`react.memo_cache_sentinel`)?(e={kind:`stopped`},t[53]=e):e=t[53],_t=e;break bb0}let e;t[54]===ft?e=t[55]:(e={kind:`nodeal`,boundaryHeld:ft},t[54]=ft,t[55]=e),_t=e;break bb0}let e;t[56]!==pt||t[57]!==gt||t[58]!==ht?(e={kind:`running`,whoseTurn:ht,guarded:pt,speaking:gt},t[56]=pt,t[57]=gt,t[58]=ht,t[59]=e):e=t[59],_t=e}let vt=_t,yt;t[60]===vt?yt=t[61]:(yt=_(vt),t[60]=vt,t[61]=yt);let bt=yt,xt;t[62]!==w||t[63]!==D||t[64]!==k||t[65]!==S||t[66]!==A?(xt=S===`you`?!!(w.trim()&&D.trim()):!!(w.trim()&&D.trim()&&k.trim()&&A.trim()),t[62]=w,t[63]=D,t[64]=k,t[65]=S,t[66]=A,t[67]=xt):xt=t[67];let Z=xt,St;t[68]===w?St=t[69]:(St=w.trim()||`the other side`,t[68]=w,t[69]=St);let Q=St,Ct;t[70]!==j||t[71]!==w||t[72]!==D||t[73]!==k||t[74]!==A?(Ct=e=>w===e.counterpart&&D===e.goal&&k===e.mine&&A===e.theirs&&j===e.boundaries,t[70]=j,t[71]=w,t[72]=D,t[73]=k,t[74]=A,t[75]=Ct):Ct=t[75];let wt=Ct,Tt,Et,$,Dt,Ot,kt,At,jt,Mt,Nt,Pt,Ft,It,Lt,Rt,zt,Bt,Vt,Ht;if(t[76]!==j||t[77]!==Ke||t[78]!==X||t[79]!==n||t[80]!==w||t[81]!==F||t[82]!==P||t[83]!==D||t[84]!==p||t[85]!==k||t[86]!==c||t[87]!==u||t[88]!==Z||t[89]!==S||t[90]!==wt||t[91]!==M||t[92]!==b||t[93]!==A||t[94]!==ee||t[95]!==v){let e=e=>{ne(e.counterpart),O(e.goal),re(e.mine),ie(e.theirs),se(e.boundaries),le(!1),requestAnimationFrame(()=>{G.current&&le(!0)})},r;t[115]!==X||t[116]!==n?(r=(e,t)=>{Ie(`loading`);let r=new AbortController;Be.current=r,de(X,e,t,me(n,r.signal,1600),r.signal).then(e=>{!G.current||r.signal.aborted||Ie(e??`failed`)})},t[115]=X,t[116]=n,t[117]=r):r=t[117],$=r;let i;t[118]!==X||t[119]!==n||t[120]!==Z||t[121]!==$?(i=()=>{if(!Z)return;let e=new AbortController;ze.current=e,Be.current?.abort(),ue([]),we(null),Te(!1),z(!1),Pe(!1),W.current=!1,Fe(0),Ie(`idle`),x(`running`),ce(X,me(n,e.signal),e=>{G.current&&ue(t=>[...t,e])},e.signal).then(e=>{if(!G.current)return;we(e.deal),x(`done`);let t=e.events.filter(Oe).length;Re(n=>[...n,{n:n.length+1,outcome:W.current?`stopped`:e.deal?`deal`:`nodeal`,deal:e.deal,turns:t}]),!W.current&&t>=2&&$(e.events,e.deal)}).catch(()=>{G.current&&x(`done`)})},t[118]=X,t[119]=n,t[120]=Z,t[121]=$,t[122]=i):i=t[122],Tt=i;let a;t[123]===Symbol.for(`react.memo_cache_sentinel`)?(a=()=>{W.current=!0,Pe(!0),ze.current?.abort()},t[123]=a):a=t[123],Dt=a;let s;t[124]!==X||t[125]!==F||t[126]!==P||t[127]!==u?(s=()=>{u?.(fe(X,P,F),pe(X.goal))},t[124]=X,t[125]=F,t[126]=P,t[127]=u,t[128]=s):s=t[128],Et=s,Lt=`dlg-scrim`,t[129]===c?Rt=t[130]:(Rt=e=>{e.target===e.currentTarget&&c()},t[129]=c,t[130]=Rt),zt=`button`,Bt=0,Vt=`Close`,t[131]===c?Ht=t[132]:(Ht=e=>{e.target===e.currentTarget&&(e.key===`Enter`||e.key===` `)&&(e.key===` `&&e.preventDefault(),c())},t[131]=c,t[132]=Ht),Ot=`dlg-panel`,kt=g,At=-1,jt=`dialog`,Mt=`true`,Nt=`The Rehearsal — practice a hard conversation`,Pt=b;let d;t[133]!==Z||t[134]!==b||t[135]!==v?(d=b===`brief`&&(0,T.jsx)(`span`,{className:`dlg-jelly brief`,"aria-hidden":`true`,ref:v,children:(0,T.jsx)(o,{state:Z?`thinking`:`reading`,gaze:Z?`center`:`down`})}),t[133]=Z,t[134]=b,t[135]=v,t[136]=d):d=t[136];let f;t[137]===Symbol.for(`react.memo_cache_sentinel`)?(f=(0,T.jsx)(`h2`,{children:`The Rehearsal`}),t[137]=f):f=t[137];let m=b===`brief`?`Practice the conversation before you have it for real`:S===`you`?`Your take — say it like you will for real`:`Two agents, talking it out on your key`,h;t[138]===m?h=t[139]:(h=(0,T.jsxs)(`div`,{className:`dlg-title`,children:[f,(0,T.jsx)(`p`,{className:`dlg-kicker`,children:m})]}),t[138]=m,t[139]=h);let _;t[140]!==d||t[141]!==h?(_=(0,T.jsxs)(`div`,{className:`dlg-head-id`,children:[d,h]}),t[140]=d,t[141]=h,t[142]=_):_=t[142];let y;t[143]===Symbol.for(`react.memo_cache_sentinel`)?(y=(0,T.jsx)(_e,{}),t[143]=y):y=t[143];let E;t[144]===c?E=t[145]:(E=(0,T.jsx)(`button`,{type:`button`,className:`dlg-x`,onClick:c,"aria-label":`Close`,children:y}),t[144]=c,t[145]=E),t[146]!==_||t[147]!==E?(Ft=(0,T.jsxs)(`header`,{className:`dlg-head`,children:[_,E]}),t[146]=_,t[147]=E,t[148]=Ft):Ft=t[148],It=b===`brief`&&(0,T.jsxs)(`form`,{className:`dlg-brief`,onSubmit:e=>{e.preventDefault(),S===`you`?Z&&x(`running`):Tt()},children:[(0,T.jsxs)(`p`,{className:`dlg-lede`,children:[`The other side is a `,(0,T.jsx)(`strong`,{children:`stand-in`}),`, played only from what you write here — nothing is sent to them.`]}),(0,T.jsxs)(`div`,{className:`dlg-seatpick`,role:`radiogroup`,"aria-label":`Who sits on your side`,children:[(0,T.jsxs)(`button`,{type:`button`,role:`radio`,"aria-checked":S===`mavea`,className:`dlg-seatpick-opt`,onClick:()=>C(`mavea`),children:[(0,T.jsx)(`span`,{className:`dlg-seatpick-name`,children:`Send your Mavéa`}),(0,T.jsx)(`span`,{className:`dlg-seatpick-sub`,children:`Two agents talk it out while you watch`})]}),(0,T.jsxs)(`button`,{type:`button`,role:`radio`,"aria-checked":S===`you`,className:`dlg-seatpick-opt`,onClick:()=>C(`you`),children:[(0,T.jsx)(`span`,{className:`dlg-seatpick-name`,children:`Take the seat yourself`}),(0,T.jsx)(`span`,{className:`dlg-seatpick-sub`,children:`You say your lines; they answer in character, out loud`})]})]}),(0,T.jsx)(l,{kind:`simulation`,from:`live`}),(0,T.jsxs)(`div`,{className:`dlg-seeds`,role:`group`,"aria-label":`Start from an example`,children:[(0,T.jsx)(`span`,{className:`dlg-seeds-label`,children:`Try one`}),he.map(t=>(0,T.jsx)(`button`,{type:`button`,className:`dlg-seed`,"aria-pressed":wt(t),onClick:()=>e(t),children:t.tag},t.tag))]}),(0,T.jsxs)(`fieldset`,{className:`dlg-group`+(M?` dlg-seed-fill`:``),children:[(0,T.jsx)(`legend`,{children:`The other side`}),(0,T.jsxs)(`label`,{className:`dlg-field`,children:[(0,T.jsx)(`span`,{className:`dlg-field-name`,children:`Who you're negotiating with`}),(0,T.jsx)(`input`,{value:w,onChange:e=>ne(e.target.value),placeholder:`Priya, my manager`})]}),(0,T.jsxs)(`label`,{className:`dlg-field`,children:[(0,T.jsx)(`span`,{className:`dlg-field-name`,children:`Their position, as you see it`}),(0,T.jsx)(`textarea`,{rows:2,value:A,onChange:e=>ie(e.target.value),placeholder:`Budget's tight this quarter; she values retention and won't set precedents`}),(0,T.jsx)(`span`,{className:`dlg-field-hint`,children:S===`you`?`This is all they'll know — where it runs out, they play the role straight instead of pretending to know the real person.`:`This is all the stand-in knows — it argues only from this.`})]}),S===`you`&&p&&p.length>0&&(0,T.jsxs)(`label`,{className:`dlg-memory`,children:[(0,T.jsx)(`input`,{type:`checkbox`,checked:ee,onChange:e=>te(e.target.checked)}),`Also ground them in what Mavéa remembers (`,p.length,` `,p.length===1?`concept`:`concepts`,`)`]})]}),(0,T.jsxs)(`fieldset`,{className:`dlg-group`+(M?` dlg-seed-fill`:``),children:[(0,T.jsx)(`legend`,{children:`Your side`}),(0,T.jsxs)(`label`,{className:`dlg-field`,children:[(0,T.jsx)(`span`,{className:`dlg-field-name`,children:`What you're after`}),(0,T.jsx)(`input`,{value:D,onChange:e=>O(e.target.value),placeholder:`A raise to $95k, up from $82k, this cycle`})]}),S===`mavea`&&(0,T.jsxs)(`label`,{className:`dlg-field`,children:[(0,T.jsx)(`span`,{className:`dlg-field-name`,children:`What you'll put on the table`}),(0,T.jsx)(`textarea`,{rows:2,value:k,onChange:e=>re(e.target.value),placeholder:`I led the billing migration; I can mentor two juniors`})]})]}),S===`mavea`&&(0,T.jsxs)(`fieldset`,{className:`dlg-group dlg-group-line`+(M?` dlg-seed-fill`:``),children:[(0,T.jsxs)(`legend`,{children:[`Your line `,(0,T.jsx)(`span`,{className:`dlg-enforced`,children:`enforced`})]}),(0,T.jsx)(`p`,{className:`dlg-line-note`,children:`Mavéa never offers these. Every proposal is checked in code, and any that crosses your line is pulled back — not just discouraged.`}),(0,T.jsxs)(`label`,{className:`dlg-field`,children:[(0,T.jsx)(`span`,{className:`dlg-field-name sr-only`,children:`Never offer`}),(0,T.jsx)(`input`,{value:j,onChange:e=>se(e.target.value),placeholder:`working weekends, a title bump instead of pay`})]}),Ke.length>0&&(0,T.jsx)(`ul`,{className:`dlg-line-chips`,"aria-hidden":`true`,children:Ke.map(De)})]}),(0,T.jsxs)(`div`,{className:`dlg-brief-actions`,children:[(0,T.jsx)(`button`,{type:`submit`,className:`dlg-start`,disabled:!Z,children:S===`you`?`Start take 1`:`Start the negotiation`}),(0,T.jsx)(`span`,{className:`dlg-brief-cost`,children:S===`you`?`one short call per line, one for the coach`:`≈ one answer's worth of calls, debrief included`})]})]}),t[76]=j,t[77]=Ke,t[78]=X,t[79]=n,t[80]=w,t[81]=F,t[82]=P,t[83]=D,t[84]=p,t[85]=k,t[86]=c,t[87]=u,t[88]=Z,t[89]=S,t[90]=wt,t[91]=M,t[92]=b,t[93]=A,t[94]=ee,t[95]=v,t[96]=Tt,t[97]=Et,t[98]=$,t[99]=Dt,t[100]=Ot,t[101]=kt,t[102]=At,t[103]=jt,t[104]=Mt,t[105]=Nt,t[106]=Pt,t[107]=Ft,t[108]=It,t[109]=Lt,t[110]=Rt,t[111]=zt,t[112]=Bt,t[113]=Vt,t[114]=Ht}else Tt=t[96],Et=t[97],$=t[98],Dt=t[99],Ot=t[100],kt=t[101],At=t[102],jt=t[103],Mt=t[104],Nt=t[105],Pt=t[106],Ft=t[107],It=t[108],Lt=t[109],Rt=t[110],zt=t[111],Bt=t[112],Vt=t[113],Ht=t[114];let Ut;t[149]!==n||t[150]!==h||t[151]!==ot||t[152]!==S||t[153]!==m||t[154]!==b||t[155]!==Q?(Ut=b!==`brief`&&S===`you`&&(0,T.jsx)(E,{setup:ot,themLabel:Q,cfg:n,speak:m,onDebrief:h,onAdjustBrief:()=>x(`brief`)}),t[149]=n,t[150]=h,t[151]=ot,t[152]=S,t[153]=m,t[154]=b,t[155]=Q,t[156]=Ut):Ut=t[156];let Wt;t[157]!==L||t[158]!==Tt||t[159]!==ft||t[160]!==R||t[161]!==w||t[162]!==F||t[163]!==H||t[164]!==V||t[165]!==P||t[166]!==Et||t[167]!==bt||t[168]!==c||t[169]!==u||t[170]!==U||t[171]!==S||t[172]!==b||t[173]!==ct||t[174]!==$||t[175]!==Dt||t[176]!==B||t[177]!==Q||t[178]!==ut||t[179]!==v||t[180]!==ht?(Wt=b!==`brief`&&S===`mavea`&&(0,T.jsxs)(`div`,{className:`dlg-table`,children:[(0,T.jsxs)(`div`,{className:`dlg-tablescape`,children:[(0,T.jsxs)(`div`,{className:`dlg-seat yours`,children:[(0,T.jsx)(`span`,{className:`dlg-jelly`,"aria-hidden":`true`,ref:v,children:(0,T.jsx)(o,{...bt.yours})}),(0,T.jsx)(`span`,{className:`dlg-seat-name`,children:`Your Mavéa`})]}),(0,T.jsxs)(`div`,{className:`dlg-meta`,children:[(0,T.jsx)(xe,{turns:ut,running:b===`running`}),(0,T.jsx)(`span`,{className:`dlg-clock tab-num`,"aria-label":`${V} seconds elapsed`,children:ge(V)})]}),(0,T.jsxs)(`div`,{className:`dlg-seat theirs`,children:[(0,T.jsx)(`span`,{className:`dlg-jelly ghost`,"aria-hidden":`true`,ref:v,children:(0,T.jsx)(o,{...bt.theirs})}),(0,T.jsx)(`span`,{className:`dlg-seat-name`,children:w}),(0,T.jsx)(`span`,{className:`dlg-seat-tag`,children:`stand-in`})]})]}),(0,T.jsxs)(`div`,{className:`dlg-offer`,"data-empty":!ct||void 0,"data-by":ct?.by,children:[(0,T.jsx)(`span`,{className:`dlg-offer-eyebrow`,children:`On the table`}),ct?(0,T.jsxs)(T.Fragment,{children:[(0,T.jsx)(`p`,{className:`dlg-offer-text`,children:ct.offer},ct.offer),(0,T.jsx)(`span`,{className:`dlg-offer-by`,children:ct.by===`yours`?`Your Mavéa proposed this`:`${Q}'s stand-in countered`})]}):(0,T.jsx)(`p`,{className:`dlg-offer-empty`,children:b===`running`?`Opening the table…`:`No offer was tabled.`})]}),(0,T.jsxs)(`ol`,{className:`dlg-log`,ref:y,role:`log`,"aria-live":`polite`,"aria-label":`The exchange`,children:[P.map((e,t)=>e.side===`engine`?(0,T.jsxs)(`li`,{className:`dlg-referee`,children:[(0,T.jsx)(ve,{}),(0,T.jsx)(`span`,{children:s(e.say)})]},t):(0,T.jsxs)(`li`,{className:`dlg-turn ${e.side} ${e.kind}`,children:[(0,T.jsx)(be,{side:e.side,name:w}),(0,T.jsx)(`p`,{className:`dlg-turn-say`,children:s(e.say)}),e.offer&&e.kind!==`accept`&&(0,T.jsx)(`span`,{className:`dlg-turn-tag`,children:`Now on the table`}),e.kind===`accept`&&(0,T.jsx)(`span`,{className:`dlg-turn-tag agreed`,children:`Accepted`})]},t)),b===`running`&&(0,T.jsxs)(`li`,{className:`dlg-turn ${ht} thinking`,"aria-hidden":`true`,children:[(0,T.jsx)(be,{side:ht,name:w}),(0,T.jsxs)(`span`,{className:`dlg-typing`,children:[(0,T.jsx)(`i`,{}),(0,T.jsx)(`i`,{}),(0,T.jsx)(`i`,{})]})]})]}),b===`running`&&(0,T.jsx)(`div`,{className:`dlg-foot`,children:(0,T.jsx)(`button`,{type:`button`,className:`dlg-stop`,onClick:Dt,children:`Stop`})}),b===`done`&&F&&!L&&(0,T.jsxs)(`div`,{className:`dlg-result deal`,children:[(0,T.jsxs)(`div`,{className:`dlg-result-head`,children:[(0,T.jsx)(`span`,{className:`dlg-result-mark`,children:(0,T.jsx)(ye,{})}),(0,T.jsx)(`h3`,{children:`Both Mavéas agreed`})]}),(0,T.jsx)(`p`,{className:`dlg-result-terms`,children:F}),(0,T.jsxs)(`p`,{className:`dlg-result-honest`,children:[`Pending both humans — nothing's been sent. Approve your side and you'll get the summary to send to `,Q,` yourself.`]}),(0,T.jsx)(I,{debrief:H,events:P,themLabel:Q,onRetry:()=>$(P,F)}),(0,T.jsxs)(`div`,{className:`dlg-result-actions`,children:[(0,T.jsx)(Se,{label:`Hold to approve your side`,onConfirm:()=>{Te(!0),navigator.clipboard?.writeText(`Proposed deal with ${w}: ${F}`).then(()=>z(!0)).catch(()=>z(!1))}}),(0,T.jsx)(`button`,{type:`button`,className:`dlg-pass`,onClick:c,children:`Not yet`})]})]}),b===`done`&&F&&L&&(0,T.jsxs)(`div`,{className:`dlg-result approved`,children:[(0,T.jsxs)(`div`,{className:`dlg-result-head`,children:[(0,T.jsx)(`span`,{className:`dlg-result-mark`,children:(0,T.jsx)(ye,{})}),(0,T.jsx)(`h3`,{children:`Approved on your side`})]}),(0,T.jsx)(`p`,{className:`dlg-result-terms`,children:F}),(0,T.jsx)(`p`,{className:`dlg-result-honest`,children:R?`The summary's on your clipboard. ${Q} still has to say yes for real — you send it.`:`${Q} still has to say yes for real — copy the summary above and send it yourself.`}),(0,T.jsx)(I,{debrief:H,events:P,themLabel:Q,onRetry:()=>$(P,F)}),(0,T.jsx)(`button`,{type:`button`,className:`dlg-done`,onClick:c,children:`Done`})]}),b===`done`&&!F&&(0,T.jsxs)(`div`,{className:`dlg-result nodeal`,children:[(0,T.jsxs)(`div`,{className:`dlg-result-head`,children:[(0,T.jsx)(`span`,{className:`dlg-result-mark line`,"aria-hidden":`true`}),(0,T.jsx)(`h3`,{children:B?`Stopped`:ft?`No deal — your line held`:`No deal this run`})]}),(0,T.jsx)(`p`,{className:`dlg-result-honest`,children:B?`You called it off — nothing was sent.`:ft?`Mavéa pulled back every offer that crossed your line, and the sides couldn’t meet without it. Nothing was sent — that’s the point of scouting. Here’s where your case got tested.`:`The two sides couldn’t meet in ${ut} turn${ut===1?``:`s`}. Nothing was sent — that’s the point of scouting. Here’s where your case got tested.`}),B&&ut>=2&&H===`idle`?(0,T.jsx)(`button`,{type:`button`,className:`dlg-followup-btn`,onClick:()=>$(P,F),children:`Debrief what happened`}):(0,T.jsx)(I,{debrief:H,events:P,themLabel:Q,onRetry:()=>$(P,F)}),(0,T.jsx)(`button`,{type:`button`,className:`dlg-done`,onClick:c,children:`Close`})]}),b===`done`&&(0,T.jsxs)(`div`,{className:`dlg-followup`,children:[u&&(0,T.jsxs)(T.Fragment,{children:[(0,T.jsx)(`button`,{type:`button`,className:`dlg-followup-btn`,onClick:Et,children:`Bring this into the conversation`}),(0,T.jsx)(`span`,{className:`dlg-followup-hint`,children:`Runs one normal answer in Live, grounded in this transcript.`})]}),(0,T.jsxs)(`div`,{className:`dlg-followup-actions`,children:[(0,T.jsx)(`button`,{type:`button`,className:`dlg-followup-btn ghost`,onClick:()=>x(`brief`),children:`Adjust the brief`}),(0,T.jsx)(`button`,{type:`button`,className:`dlg-followup-btn ghost`,onClick:Tt,children:`Run it again`})]})]}),b===`done`&&U.length>=2&&(0,T.jsx)(`div`,{className:`dlg-runs`,"aria-label":`Runs this session`,children:U.map(Ee)})]}),t[157]=L,t[158]=Tt,t[159]=ft,t[160]=R,t[161]=w,t[162]=F,t[163]=H,t[164]=V,t[165]=P,t[166]=Et,t[167]=bt,t[168]=c,t[169]=u,t[170]=U,t[171]=S,t[172]=b,t[173]=ct,t[174]=$,t[175]=Dt,t[176]=B,t[177]=Q,t[178]=ut,t[179]=v,t[180]=ht,t[181]=Wt):Wt=t[181];let Gt;t[182]!==Ot||t[183]!==kt||t[184]!==At||t[185]!==jt||t[186]!==Mt||t[187]!==Nt||t[188]!==Pt||t[189]!==Ft||t[190]!==It||t[191]!==Ut||t[192]!==Wt?(Gt=(0,T.jsxs)(`section`,{className:Ot,ref:kt,tabIndex:At,role:jt,"aria-modal":Mt,"aria-label":Nt,"data-stage":Pt,children:[Ft,It,Ut,Wt]}),t[182]=Ot,t[183]=kt,t[184]=At,t[185]=jt,t[186]=Mt,t[187]=Nt,t[188]=Pt,t[189]=Ft,t[190]=It,t[191]=Ut,t[192]=Wt,t[193]=Gt):Gt=t[193];let Kt;return t[194]!==Lt||t[195]!==Rt||t[196]!==zt||t[197]!==Bt||t[198]!==Vt||t[199]!==Ht||t[200]!==Gt?(Kt=(0,T.jsx)(`div`,{className:Lt,onClick:Rt,role:zt,tabIndex:Bt,"aria-label":Vt,onKeyDown:Ht,children:Gt}),t[194]=Lt,t[195]=Rt,t[196]=zt,t[197]=Bt,t[198]=Vt,t[199]=Ht,t[200]=Gt,t[201]=Kt):Kt=t[201],Kt}function Ee(e){return(0,T.jsx)(`span`,{className:`dlg-runs-item`,children:`Run ${e.n} — ${e.outcome===`deal`?`deal`:e.outcome===`stopped`?`stopped`:`no deal`} · ${e.turns} turn${e.turns===1?``:`s`}${e.deal?` · ${e.deal}`:``}`},e.n)}function De(e){return(0,T.jsxs)(`li`,{className:`dlg-line-chip`,children:[(0,T.jsx)(ve,{}),e]},e)}function Oe(e){return e.side!==`engine`}function ke(e){return e.side!==`engine`}function Ae(e){return e.side===`engine`}function je(e){return e.side!==`engine`}function Me(e){return e.body}function Ne(e){return e+1}export{Te as DelegatePanel};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t as e}from"./jsx-runtime-DeHZSEgm.js";import{n as t,ot as n,r}from"./index-
|
|
1
|
+
import{t as e}from"./jsx-runtime-DeHZSEgm.js";import{n as t,ot as n,r}from"./index-Db-FgYxX.js";import{n as i}from"./icons-gLFQTv74.js";var a=e();function o(e){return/\p{Extended_Pictographic}/u.test(e)}var s=t.map(e=>({cat:e,persona:r(e.persona)})).filter(e=>!!e.persona);function c({onPlay:e}){return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(n,{eyebrow:`Curated examples`,sub:`Each fictional scenario is a prerecorded, model-generated answer sequence with curated feature choreography on the production UI. No live provider call runs during playback.`,children:`Watch a prerecorded workflow`}),(0,a.jsx)(`div`,{className:`fl-demo-grid`,children:s.map(({cat:t,persona:n})=>(0,a.jsxs)(`button`,{type:`button`,className:`fl-demo-card`,style:{"--accent":n.accent},onClick:()=>e(n),children:[(0,a.jsxs)(`div`,{className:`fl-demo-top`,children:[(0,a.jsx)(`span`,{className:`fl-demo-avatar`+(o(n.avatar)?` emoji`:``),children:n.avatar}),(0,a.jsxs)(`span`,{className:`fl-demo-who`,children:[(0,a.jsx)(`span`,{className:`fl-demo-name`,children:n.useCase}),(0,a.jsxs)(`span`,{className:`fl-demo-role`,children:[n.name,` · `,n.role]})]}),(0,a.jsx)(`span`,{className:`fl-demo-badge`,children:t.label})]}),(0,a.jsx)(`span`,{className:`fl-demo-blurb`,children:n.blurb}),(0,a.jsxs)(`span`,{className:`fl-demo-play`,children:[(0,a.jsx)(i.play,{}),` Play curated replay`]})]},n.id))})]})}export{c as DemoGallery};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t as e}from"./react-BZJXY1be.js";import{t}from"./compiler-runtime-qQQXpJgv.js";import{t as n}from"./jsx-runtime-DeHZSEgm.js";import{lt as r}from"./index-
|
|
1
|
+
import{t as e}from"./react-BZJXY1be.js";import{t}from"./compiler-runtime-qQQXpJgv.js";import{t as n}from"./jsx-runtime-DeHZSEgm.js";import{lt as r}from"./index-Db-FgYxX.js";var i=r(),a=t(),o=e();function s(e,t){let n=(0,a.c)(4),[r,i]=(0,o.useState)(),s,c;return n[0]!==t||n[1]!==e?(s=()=>{if(!e){i(void 0);return}let n=()=>{let e=t.current;if(!e)return;let n=e.getBoundingClientRect();i({position:`fixed`,left:n.left,top:n.bottom+6,width:n.width,right:`auto`,bottom:`auto`,maxHeight:Math.max(160,window.innerHeight-n.bottom-16),zIndex:1e3})};n();let r=0,a=()=>{cancelAnimationFrame(r),r=requestAnimationFrame(n)};return window.addEventListener(`scroll`,a,!0),window.addEventListener(`resize`,a),()=>{cancelAnimationFrame(r),window.removeEventListener(`scroll`,a,!0),window.removeEventListener(`resize`,a)}},c=[e,t],n[0]=t,n[1]=e,n[2]=s,n[3]=c):(s=n[2],c=n[3]),(0,o.useLayoutEffect)(s,c),r}var c=n();function l({options:e,value:t,onChange:n,ariaLabel:r,disabled:a=!1,focusOnMount:l=!1,triggerClassName:u=`setup-input`}){let d=(0,o.useId)(),f=(0,o.useRef)(null),[p,m]=(0,o.useState)(!1),[h,g]=(0,o.useState)(-1),_=s(p,f),v=e.find(e=>e.value===t),y=e=>`${d}-opt-${e}`,b=()=>{g(e.findIndex(e=>e.value===t)),m(!0)},x=e=>{n(e),m(!1),f.current?.focus()};return(0,o.useEffect)(()=>{p&&h>=0&&document.getElementById(y(h))?.scrollIntoView?.({block:`nearest`})},[p,h]),(0,c.jsxs)(`div`,{className:`drop-select`,children:[(0,c.jsxs)(`button`,{ref:f,type:`button`,className:`${u} drop-select-trigger`,role:`combobox`,"aria-expanded":p,"aria-controls":d,"aria-activedescendant":p&&h>=0?y(h):void 0,"aria-label":r,disabled:a,autoFocus:l,onClick:()=>p?m(!1):b(),onKeyDown:t=>{if(t.key===`ArrowDown`||t.key===`ArrowUp`){if(t.preventDefault(),!p)return b();let n=t.key===`ArrowDown`?1:-1;g(t=>(t+n+e.length)%e.length)}else t.key===`Enter`&&p&&h>=0?(t.preventDefault(),x(e[h].value)):t.key===`Escape`&&p&&(t.preventDefault(),m(!1))},onBlur:()=>m(!1),children:[(0,c.jsx)(`span`,{children:v?.label??t}),(0,c.jsx)(`svg`,{viewBox:`0 0 12 8`,fill:`none`,"aria-hidden":!0,children:(0,c.jsx)(`path`,{d:`M1 1.5L6 6.5L11 1.5`,stroke:`currentColor`,strokeWidth:`1.5`,strokeLinecap:`round`,strokeLinejoin:`round`})})]}),p&&(0,i.createPortal)((0,c.jsx)(`div`,{className:`drop-select-menu`,style:_,role:`listbox`,id:d,"aria-label":r,onPointerDown:e=>e.preventDefault(),children:e.map((e,n)=>(0,c.jsxs)(`div`,{id:y(n),role:`option`,tabIndex:-1,"aria-selected":e.value===t,className:`drop-select-option`+(n===h?` is-active`:``)+(e.value===t?` is-current`:``),onMouseEnter:()=>g(n),onClick:()=>x(e.value),children:[(0,c.jsx)(`span`,{className:`drop-select-option-head`,children:(0,c.jsx)(`span`,{className:`drop-select-option-label`,children:e.label})}),e.note&&(0,c.jsx)(`span`,{className:`drop-select-note`,children:e.note})]},e.value))}),document.body)]})}export{s as n,l as t};
|