@mavea/mavea 1.0.14 → 1.0.16
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/.vite/manifest.json +537 -537
- package/dist/assets/{AppCommandPalette-D5nd3VO_.js → AppCommandPalette-Dzl_DbDd.js} +1 -1
- package/dist/assets/{BlockEmpty-BZn5ETuL.js → BlockEmpty-B5Q0hgDJ.js} +1 -1
- package/dist/assets/{BriefingPlayer-JnrrvxYE.js → BriefingPlayer-Dy7JCGm-.js} +1 -1
- package/dist/assets/{CanvasSkeleton-D00MzkIV.js → CanvasSkeleton-CJwPWnFG.js} +2 -2
- package/dist/assets/{CheckLogRail--9iHharq.js → CheckLogRail-DNtXlkcR.js} +1 -1
- package/dist/assets/{CodeOutput-408gGn9V.js → CodeOutput-Bg64AyKu.js} +1 -1
- package/dist/assets/{CommandPalette-BIUG6Sn7.js → CommandPalette-mO1FEvlx.js} +1 -1
- package/dist/assets/{CourseLessonReader-Yp2qEsDx.js → CourseLessonReader-CKfvBMtL.js} +2 -2
- package/dist/assets/{CourseRail-BVvnoWBR.js → CourseRail-CRcB319H.js} +1 -1
- package/dist/assets/{CoursesApp-0N_F1p_u.js → CoursesApp-BbCGxAav.js} +2 -2
- package/dist/assets/{CrossExamPanel-CocJ_GxK.js → CrossExamPanel-Deywo95y.js} +1 -1
- package/dist/assets/{DashPresent-G8Actzx7.js → DashPresent-BEm1tGse.js} +1 -1
- package/dist/assets/{DashboardDetail-BpSe8wBT.js → DashboardDetail-tK6FpgtH.js} +2 -2
- package/dist/assets/DashboardLoopRuntime-Cis4WMqk.js +1 -0
- package/dist/assets/{DashboardOverview-Cdhy4x4b.js → DashboardOverview-DrdqBgds.js} +1 -1
- package/dist/assets/{DashboardSettings-ChPkh0t4.js → DashboardSettings-CBhzLW0P.js} +1 -1
- package/dist/assets/{DashboardsApp-mp-V3d1i.js → DashboardsApp-Dc43FBIi.js} +2 -2
- package/dist/assets/{DeepZoomApp-mZHk132w.js → DeepZoomApp-Chz6laKc.js} +1 -1
- package/dist/assets/{DelegatePanel-Dtl0oHaA.js → DelegatePanel-DmtTY_lE.js} +1 -1
- package/dist/assets/{DemoGallery-By2LV_U_.js → DemoGallery-zw3d7ap9.js} +1 -1
- package/dist/assets/{DropSelect-CeCNaut0.js → DropSelect-Bo2Oyi-2.js} +1 -1
- package/dist/assets/{ExportModal-CZ1-Vihb.js → ExportModal-DICXavg9.js} +2 -2
- package/dist/assets/{ExtractionPreview-CRkYnwCo.js → ExtractionPreview-C636AVw-.js} +1 -1
- package/dist/assets/{FlagshipCTA-DNtUnl0n.js → FlagshipCTA-B-7nH43r.js} +1 -1
- package/dist/assets/{FlagshipCommandPalette-DpP8joXb.js → FlagshipCommandPalette-DgTL_Kjj.js} +1 -1
- package/dist/assets/{FlagshipShowcase-CoOezhT-.js → FlagshipShowcase-CbAC2s4X.js} +1 -1
- package/dist/assets/{FlashcardsApp-REEdMdKG.js → FlashcardsApp-CatYcaJJ.js} +1 -1
- package/dist/assets/{ForecastPanel-CpR32hwb.js → ForecastPanel-BOG361kr.js} +1 -1
- package/dist/assets/{GalleryApp-DJZRHjMH.js → GalleryApp-uW6b1Y0d.js} +1 -1
- package/dist/assets/{HonestByDesign-CiOj_fA7.js → HonestByDesign-hCxc0A7b.js} +1 -1
- package/dist/assets/{HowItWorks-Ch2CgkVd.js → HowItWorks-BlbQcUxx.js} +1 -1
- package/dist/assets/{LegalApp-BisEJynn.js → LegalApp-sCZjJYWx.js} +1 -1
- package/dist/assets/{LegalMarkdownDocument-B7Yj_aRR.js → LegalMarkdownDocument-Bk3U7ChN.js} +1 -1
- package/dist/assets/{LegalPageShell-k9e22JlP.js → LegalPageShell-BsgRV7aL.js} +1 -1
- package/dist/assets/{LeverPanel-CXSDqinv.js → LeverPanel-CP32QcIf.js} +1 -1
- package/dist/assets/{Library-CmpF6gOU.js → Library-CJTnp1pC.js} +1 -1
- package/dist/assets/{LibraryOverlay-BErgFYxu.js → LibraryOverlay-geQRGAzG.js} +1 -1
- package/dist/assets/{LiveApp-DZ7t3P1O.js → LiveApp-C0BN0o3_.js} +4 -4
- package/dist/assets/{LiveSettings-BY5E3Ka8.js → LiveSettings-CzSXXMoo.js} +3 -3
- package/dist/assets/{MindMapViewerDrawer-Bc_qHdm9.js → MindMapViewerDrawer-7HLErRQF.js} +1 -1
- package/dist/assets/{MindShape-ULBAjrfD.js → MindShape-Bhu4yoIj.js} +1 -1
- package/dist/assets/MindShape-DjHtMW_5.css +1 -0
- package/dist/assets/{PinToDashboard-WgEX4YoY.js → PinToDashboard-Cj8S9XKC.js} +1 -1
- package/dist/assets/{PlanReview-Dd3sxa_o.js → PlanReview-3NxZD9wt.js} +1 -1
- package/dist/assets/{Presence-DgzicbeF.js → Presence-DDxb6yE5.js} +1 -1
- package/dist/assets/{PresentationDeck-Cx26X-wh.js → PresentationDeck-B6AHRYEA.js} +1 -1
- package/dist/assets/{PrismApp-FPqASfhZ.js → PrismApp-BlPpWxao.js} +2 -2
- package/dist/assets/{PrismAskController-Ds1tSE9S.js → PrismAskController-DUvOTeW9.js} +1 -1
- package/dist/assets/{PrismBriefingPlayer-BzqCK6JP.js → PrismBriefingPlayer-Bmo9tOGX.js} +2 -2
- package/dist/assets/{PrismOverlay-Cq3DBJ-N.js → PrismOverlay-9Q_14eEO.js} +4 -4
- package/dist/assets/{PrivacyApp-B8PGc-x5.js → PrivacyApp-CatB3OpJ.js} +1 -1
- package/dist/assets/{Recap-RwhzouRe.js → Recap-DkKrrqi5.js} +1 -1
- package/dist/assets/{ReelJelly-B2JQsaRI.js → ReelJelly-DCD4bG10.js} +1 -1
- package/dist/assets/{ReplayCard-DUBvQLBt.js → ReplayCard-Bz69tOST.js} +2 -2
- package/dist/assets/{ReplayOverlay-CzUFHdjK.js → ReplayOverlay-DbJX08Kr.js} +1 -1
- package/dist/assets/{RewindOverlay-CMx_cVxX.js → RewindOverlay-Bop4a63b.js} +1 -1
- package/dist/assets/{RippleApp-B186b8KW.js → RippleApp-u3hCfb5b.js} +2 -2
- package/dist/assets/{RippleAskController-BA_kGOmL.js → RippleAskController-CK4iSwT0.js} +1 -1
- package/dist/assets/{RippleOverlay-CkbkIgzC.js → RippleOverlay-BM_B9JEc.js} +2 -2
- package/dist/assets/{SeeDontRead-BZ4xFEKE.js → SeeDontRead-CGGKmvBV.js} +1 -1
- package/dist/assets/{ShareModal-DNpc-U9U.js → ShareModal-D4En6Y3L.js} +1 -1
- package/dist/assets/{ShipCascade-BmTE193h.js → ShipCascade-k_GWrcau.js} +1 -1
- package/dist/assets/{ShipCourse-K2vnS3Sw.js → ShipCourse-BQOY4MyI.js} +1 -1
- package/dist/assets/{ShipHotspots-DILwqPxh.js → ShipHotspots-vLRK0w_b.js} +1 -1
- package/dist/assets/{ShipIncident-DXXciEP7.js → ShipIncident-BWxerYtX.js} +1 -1
- package/dist/assets/{ShipMigration-rhBm0Tre.js → ShipMigration-OgAGEbjm.js} +1 -1
- package/dist/assets/{ShipOnboarding-9KCVVAkX.js → ShipOnboarding-B_2IEq3N.js} +1 -1
- package/dist/assets/{ShipRead-CMe1DNik.js → ShipRead--gGqg2SE.js} +1 -1
- package/dist/assets/{ShipRollout-BA4x-btU.js → ShipRollout-B_U2P8Yw.js} +1 -1
- package/dist/assets/{ShipSuggestions-Jm45jfFl.js → ShipSuggestions-D9coTmgw.js} +1 -1
- package/dist/assets/{ShipWorkspace--x-q6Ly3.js → ShipWorkspace-BmdcHZXa.js} +1 -1
- package/dist/assets/{SignatureLoop-B_cHyXgU.js → SignatureLoop-KA6Cf93g.js} +1 -1
- package/dist/assets/{SynthesisApp-CvR_8g1C.js → SynthesisApp-BCBhCJhx.js} +2 -2
- package/dist/assets/{SynthesisOverlay-DFFD69hf.js → SynthesisOverlay-BuGIeaKq.js} +1 -1
- package/dist/assets/{TermsApp-BxLgLSna.js → TermsApp-CleIlDtR.js} +1 -1
- package/dist/assets/{TopicCanvas-CKvJb_8Y.js → TopicCanvas-BRu3xVL8.js} +2 -2
- package/dist/assets/{TourPrism-bqOmSZ9T.js → TourPrism-zbVLe2ag.js} +1 -1
- package/dist/assets/{TrackerTile-BuAVmOyi.js → TrackerTile-D9Wa3CSq.js} +2 -2
- package/dist/assets/{TwoSurfaces-CjtKXWJr.js → TwoSurfaces-TyWXgAdq.js} +1 -1
- package/dist/assets/{UnderstoodPanel-BWFbpk9o.js → UnderstoodPanel-BS9OhgLJ.js} +1 -1
- package/dist/assets/{WhyMachineOverlay-D6pGEE78.js → WhyMachineOverlay-B-KJhCjr.js} +1 -1
- package/dist/assets/{WowFeatures-CLx5VoKn.js → WowFeatures-Bv1-PmXF.js} +1 -1
- package/dist/assets/{ZoomDeck-R6MLUt4Z.js → ZoomDeck-C2Q6xbgX.js} +1 -1
- package/dist/assets/{alternateFinishes-C8DBTwo_.js → alternateFinishes-BG6svkXG.js} +1 -1
- package/dist/assets/{annotationAuto-ofVcqRve.js → annotationAuto-BpBsjbDQ.js} +1 -1
- package/dist/assets/{annotationReel-CdAmTPlv.js → annotationReel-yzysA-Gr.js} +1 -1
- package/dist/assets/{backup-TgoSxdwf.js → backup-BdeBr3wq.js} +1 -1
- package/dist/assets/canvas-Ep2Kfupo.js +1 -0
- package/dist/assets/{catalog-BrmxA4bP.js → catalog-DF7YTNju.js} +1 -1
- package/dist/assets/{dashboardEvents-DT6ye9n7.js → dashboardEvents-C_XvGVLJ.js} +1 -1
- package/dist/assets/{dist-COAFD72d.js → dist-CBEt6Q8V.js} +1 -1
- package/dist/assets/{fit-BtKObM5Q.js → fit-B1LJWvMO.js} +1 -1
- package/dist/assets/{generateLive-BvE3kOrf.js → generateLive-ChhSWKbq.js} +1 -1
- package/dist/assets/{index-DOpl5xzv.js → index-C7H7A1rW.js} +3 -3
- package/dist/assets/{jspdf.es.min-DSMzCXtv.js → jspdf.es.min-DutJi91O.js} +1 -1
- package/dist/assets/{kokoro-B-MNB16v.js → kokoro-kGWf7M0e.js} +1 -1
- package/dist/assets/{lib-BLt1wpw2.js → lib-C7zXL8h0.js} +1 -1
- package/dist/assets/{liveSchema-DbjsSolX.js → liveSchema-DCL21WdS.js} +1 -1
- package/dist/assets/{motion-DKmdzFji.js → motion-dfA87zbb.js} +1 -1
- package/dist/assets/{notes-D_uDKcr5.js → notes-DblI4Ko_.js} +1 -1
- package/dist/assets/{pdf-uUFiTOYW.js → pdf-DFYCstCC.js} +1 -1
- package/dist/assets/{perfProbe-DIAQR2bi.js → perfProbe-CCSPF3EA.js} +1 -1
- package/dist/assets/{pin-DoSzEmTm.js → pin-D5_Ebl_s.js} +1 -1
- package/dist/assets/{portal-4sKB1Tgc.js → portal-BndazODr.js} +1 -1
- package/dist/assets/{pptxgen.es-BVKKMlmO.js → pptxgen.es-CwCkoJdp.js} +1 -1
- package/dist/assets/{prewarm-D31Si_08.js → prewarm--KODwuMi.js} +1 -1
- package/dist/assets/{quietHours-sfkvrkJv.js → quietHours-DVPplPtM.js} +1 -1
- package/dist/assets/{registry-B3RfPAd6.js → registry-0E1uKPCI.js} +1 -1
- package/dist/assets/{registry-DzNYBJ_a.js → registry-B3V5-8v0.js} +1 -1
- package/dist/assets/{registry-BnSnMnyk.js → registry-B51MhOLx.js} +2 -2
- package/dist/assets/{registry-CkXIaQmB.js → registry-BH6FfyZk.js} +1 -1
- package/dist/assets/{registry-DxtkIiAV.js → registry-Ba9xMFO4.js} +2 -2
- package/dist/assets/{registry-Bj8q4igW.js → registry-BlB0FYf0.js} +1 -1
- package/dist/assets/{registry-BOS6AdnB.js → registry-C30HGS2G.js} +1 -1
- package/dist/assets/{registry-CYnKlcEy.js → registry-CIa1EU-G.js} +1 -1
- package/dist/assets/{registry-d3dHoriR.js → registry-COxprhRN.js} +1 -1
- package/dist/assets/{registry-BWzoIPXp.js → registry-CWkBxxsI.js} +1 -1
- package/dist/assets/{registry-DOsiT4_6.js → registry-D-qEhm1d.js} +1 -1
- package/dist/assets/{registry-Chzw1Udo.js → registry-D7rspCZr.js} +1 -1
- package/dist/assets/{registry-DsjrEa0W.js → registry-DNzF-nvu.js} +1 -1
- package/dist/assets/{registry-BpccSYOo.js → registry-DQIm_hbI.js} +1 -1
- package/dist/assets/{registry-CAZ7ubmd.js → registry-Dphh5ADP.js} +1 -1
- package/dist/assets/{registry-NdA9xh9G.js → registry-DrNMbrA_.js} +1 -1
- package/dist/assets/{registry-B3u3--Kv.js → registry-Dvv84L9K.js} +1 -1
- package/dist/assets/{registry-VRtsyPV7.js → registry-M3VgAiQv.js} +1 -1
- package/dist/assets/{registry-C4KB6Ls0.js → registry-Pr5IKqro.js} +1 -1
- package/dist/assets/{registry-fLKnCnS5.js → registry-WJE8Z0T1.js} +1 -1
- package/dist/assets/{registry--yZ1HduK.js → registry-hsSlT6pi.js} +1 -1
- package/dist/assets/{registry-DssqYPgu.js → registry-nG70-amx.js} +1 -1
- package/dist/assets/{registry-CrKVDfq8.js → registry-wJhGGVuP.js} +1 -1
- package/dist/assets/{relate-BG7aZWOq.js → relate-DxAi8xpo.js} +1 -1
- package/dist/assets/{shikiHighlight-D9nfk5pW.js → shikiHighlight-B_TEagaE.js} +1 -1
- package/dist/assets/{useDashboardLoop-CJ0M7ZXf.js → useDashboardLoop-DzbRz-V9.js} +3 -3
- package/dist/assets/{useLiveConfig-DIvKKKpP.js → useLiveConfig-Lm0cYTcu.js} +1 -1
- package/dist/assets/{useSpatialCanvas-L0r29F7F.js → useSpatialCanvas-D_C8VoCy.js} +1 -1
- package/dist/assets/{useSpotlightWalk-oyvTWe20.js → useSpotlightWalk-CCQT0-_g.js} +1 -1
- package/dist/assets/{useSrsCards-BLNBqRe7.js → useSrsCards-BKCPBPYw.js} +1 -1
- package/dist/assets/{useStudy-hvN-iGz0.js → useStudy-Diy4ITBm.js} +1 -1
- package/dist/assets/{useZoomGesture-Dl_Cfmxm.js → useZoomGesture-B82XnSfi.js} +1 -1
- package/dist/index.html +1 -1
- package/package.json +17 -1
- package/dist/assets/DashboardLoopRuntime-CHPDkO3Y.js +0 -1
- package/dist/assets/MindShape-DGOmKwov.css +0 -1
- package/dist/assets/canvas-BrUiUI9Q.js +0 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/generate-8odaTyr4.js","assets/providers-wzm7E8Pa.js","assets/chunk-BVpWp9h4.js","assets/http-CJCtjYpA.js","assets/info-CiqHR5cs.js","assets/cache-BumECILO.js","assets/githubToken-DtcLYqwm.js","assets/keyVault-DEsNh9FR.js","assets/githubBrowser-DywfDeYx.js","assets/streamParse-DRgMHWye.js","assets/owners-FXDGInVq.js","assets/codeContext-0UMRSGRr.js","assets/ShipRead
|
|
2
|
-
import{t as e}from"./react-BQSORdFI.js";import{t}from"./jsx-runtime-DaSxXjOY.js";import{I as n,J as r,L as i,ht as a,k as o,q as s}from"./index-DOpl5xzv.js";import{t as c}from"./useFocusTrap-DbfG6zbM.js";import{t as l}from"./FeatureUseNotice-CoK5HkbR.js";import{t as u}from"./useSpatialCanvas-L0r29F7F.js";import{_ as d,a as f,i as p,m,r as h,t as g,v as _,y as v}from"./githubToken-DtcLYqwm.js";import{i as y,n as b,t as x}from"./cache-BumECILO.js";import{n as S,r as C}from"./colors-D49Req-e.js";import{n as w,r as ee}from"./courseStore-DfafnL-9.js";var T=e(),E=.82;function D(e,t){let n=e.find(e=>e.type===`pr`)??e[0],r=n?.id??``,i=e.filter(e=>e.id!==r),a=e=>230+(e-1)*210,o=e=>Math.max(4,Math.floor(2*Math.PI*a(e)*E/204)),s=[];n&&s.push({node:n,x:0,y:0});let c=1,l=0,u=o(c);for(let e of i){l>=u&&(c+=1,l=0,u=o(c));let t=a(c),n=l/u*Math.PI*2-Math.PI/2+c*.5;s.push({node:e,x:0+Math.cos(n)*t,y:0+Math.sin(n)*t*E}),l+=1}for(let e=0;e<240;e++){let e=!1;for(let t=0;t<s.length;t++)for(let n=t+1;n<s.length;n++){let i=s[t],a=s[n],o=a.x-i.x,c=a.y-i.y,l=204-Math.abs(o),u=112-Math.abs(c);if(!(l<=0||u<=0))if(e=!0,l<u){let e=(l/2+.5)*(o<0?-1:1);i.node.id!==r&&(i.x-=e),a.node.id!==r&&(a.x+=e)}else{let e=(u/2+.5)*(c<0?-1:1);i.node.id!==r&&(i.y-=e),a.node.id!==r&&(a.y+=e)}}if(!e)break}let d=1/0,f=1/0,p=-1/0,m=-1/0;for(let e of s)d=Math.min(d,e.x-168/2),f=Math.min(f,e.y-76/2),p=Math.max(p,e.x+168/2),m=Math.max(m,e.y+76/2);let h=80-d,g=80-f;for(let e of s)e.x+=h,e.y+=g;let _=p-d+160,v=m-f+160;return{centerId:r,nodes:s,w:_,h:v,bbox:{x:0,y:0,w:_,h:v}}}var O=t();function te({nodes:e,edges:t,altitude:n,onAsk:r,animate:i}){let[a,o]=(0,T.useState)(`severity`),[s,c]=(0,T.useState)(!1),[l,d]=(0,T.useState)(null),f=(0,T.useMemo)(()=>{let n=s?e.filter(e=>e.type===`pr`||e.crossRepo):e,r=new Set(n.map(e=>e.id));return D(n,t.filter(e=>r.has(e.from)&&r.has(e.to)))},[e,t,s]),p=(0,T.useMemo)(()=>{let e=new Map;for(let t of f.nodes)e.set(t.node.id,t);return e},[f]),m=(0,T.useMemo)(()=>{let e=new Map,t=p.get(f.centerId);if(!t)return e;let n=1;for(let e of f.nodes)n=Math.max(n,Math.hypot(e.x-t.x,e.y-t.y));for(let r of f.nodes){let i=Math.hypot(r.x-t.x,r.y-t.y);e.set(r.node.id,Math.round(i/n*460))}return e},[f,p]),h=p.get(f.centerId),g=u({clamp:{min:.7,max:2.2},margin:56}),{fitTo:_}=g;(0,T.useEffect)(()=>{_(f.bbox)},[f,_]);let[v,y]=(0,T.useState)(!1),b=(0,T.useRef)(!1),x=(0,T.useRef)(!1),w=(0,T.useRef)({x:0,y:0}),ee=(0,T.useCallback)(e=>{b.current=!0,x.current=!1,y(!0),w.current={x:e.clientX,y:e.clientY},e.currentTarget.setPointerCapture(e.pointerId)},[]),E=(0,T.useCallback)(e=>{if(!b.current)return;let t=e.clientX-w.current.x,n=e.clientY-w.current.y;Math.abs(t)+Math.abs(n)>2&&(x.current=!0),w.current={x:e.clientX,y:e.clientY},g.pan(t,n)},[g]),te=(0,T.useCallback)(e=>{b.current=!1,y(!1);try{e.currentTarget.releasePointerCapture(e.pointerId)}catch{}},[]),k=g.viewportRef,{zoomAtClient:A}=g;(0,T.useEffect)(()=>{let e=k.current;if(!e)return;let t=e=>{e.preventDefault(),A(e.deltaY<0?1.12:1/1.12,e.clientX,e.clientY)};return e.addEventListener(`wheel`,t,{passive:!1}),()=>e.removeEventListener(`wheel`,t)},[k,A]);let j=g.camera.scale>=.7,M=a===`traffic`,N=l?p.get(l)?.node??null:null,P=e.some(e=>typeof e.traffic==`number`),F=e.some(e=>e.crossRepo===!0);return(0,O.jsxs)(`div`,{className:`ripple-impact`,children:[(0,O.jsxs)(`div`,{className:`ripple-impact-controls`,children:[P&&(0,O.jsxs)(`div`,{className:`ripple-lens`,role:`group`,"aria-label":`Map lens`,children:[(0,O.jsx)(`button`,{type:`button`,"data-active":a===`severity`?`true`:void 0,onClick:()=>o(`severity`),children:`Severity`}),(0,O.jsx)(`button`,{type:`button`,"data-active":a===`traffic`?`true`:void 0,onClick:()=>o(`traffic`),children:`Traffic`})]}),F&&(0,O.jsxs)(`label`,{className:`ripple-crossrepo`,children:[(0,O.jsx)(`input`,{type:`checkbox`,checked:s,onChange:e=>c(e.target.checked)}),`Cross-repo only`]}),(0,O.jsx)(`div`,{className:`ripple-zoombtns`,children:(0,O.jsx)(`button`,{type:`button`,onClick:()=>_(f.bbox),title:`Fit the whole map`,"aria-label":`Fit`,children:`⤢`})})]}),(0,O.jsxs)(`div`,{className:`ripple-stage`+(v?` is-panning`:``),ref:g.viewportRef,onPointerDown:ee,onPointerMove:E,onPointerUp:te,onPointerCancel:te,children:[(0,O.jsxs)(`div`,{className:`ripple-world`,"data-animate":i?`true`:void 0,style:{width:f.w,height:f.h,transform:g.transform},children:[i&&h&&(0,O.jsx)(`span`,{className:`ripple-enter-pulse`,"aria-hidden":`true`,style:{left:h.x,top:h.y}}),(0,O.jsx)(`svg`,{className:`ripple-edges`,width:f.w,height:f.h,viewBox:`0 0 ${f.w} ${f.h}`,"aria-hidden":`true`,children:f.nodes.filter(e=>e.node.id!==f.centerId).map(e=>{let n=p.get(f.centerId);if(!n)return null;let r=t.find(t=>t.from===n.node.id&&t.to===e.node.id)??t.find(t=>t.to===n.node.id&&t.from===e.node.id),i=C(e.node.status),a=M?1.3+(e.node.traffic??0)*3:r?.breaking?2.4:1.6;return(0,O.jsx)(`line`,{x1:n.x,y1:n.y,x2:e.x,y2:e.y,stroke:i,strokeWidth:a,strokeLinecap:`round`,strokeDasharray:r?.breaking?`6 5`:r?.dashed?`2 6`:void 0,className:`ripple-edge`+(r?.breaking?` ripple-edge-break`:``),style:{animationDelay:`${m.get(e.node.id)??0}ms`},opacity:l&&l!==e.node.id?.25:.7},e.node.id)})}),j&&f.nodes.filter(e=>e.node.id!==f.centerId).map(e=>{let n=p.get(f.centerId);if(!n)return null;let r=t.find(t=>t.from===n.node.id&&t.to===e.node.id)??t.find(t=>t.to===n.node.id&&t.from===e.node.id);return r?(0,O.jsx)(`div`,{className:`ripple-edge-verb`,style:{left:(n.x+e.x)/2,top:(n.y+e.y)/2,color:C(e.node.status)},children:r.verb},`v-${e.node.id}`):null}),f.nodes.map(e=>{let t=e.node,n=t.id===f.centerId,r=C(t.status),i=M&&!n?1+(t.traffic??0)*.24:1;return(0,O.jsx)(`button`,{type:`button`,className:`ripple-node`,"data-center":n?`true`:void 0,"data-status":t.status,"data-open":l===t.id?`true`:void 0,style:{left:e.x-168/2,top:e.y-76/2,width:168,minHeight:76,transform:`scale(${i.toFixed(3)})`,borderColor:r,opacity:l&&l!==t.id?.55:1,animationDelay:`${m.get(t.id)??0}ms`},onClick:()=>{x.current||d(e=>e===t.id?null:t.id)},children:n?(0,O.jsxs)(O.Fragment,{children:[(0,O.jsx)(`span`,{className:`ripple-node-eyebrow`,style:{color:r},children:`THIS CHANGE`}),(0,O.jsx)(`span`,{className:`ripple-node-name ripple-node-name-lg`,children:t.label})]}):(0,O.jsxs)(O.Fragment,{children:[(0,O.jsxs)(`span`,{className:`ripple-node-top`,children:[(0,O.jsx)(`span`,{className:`ripple-node-dot`,style:{background:r},"aria-hidden":`true`}),(0,O.jsx)(`span`,{className:`ripple-node-status`,style:{color:r},children:S(t.status)}),t.severity&&(0,O.jsx)(`span`,{className:`ripple-node-sev`,style:{background:r},children:t.severity})]}),(0,O.jsx)(`span`,{className:`ripple-node-name`,children:t.label}),j&&(0,O.jsxs)(`span`,{className:`ripple-node-meta`,children:[t.team??t.owner??``,t.trafficLabel?` · ${t.trafficLabel}`:``]}),t.crossRepo&&(0,O.jsx)(`span`,{className:`ripple-node-repo`,children:`other repo`})]})},t.id)})]}),(0,O.jsx)(`div`,{className:`ripple-map-legend`,"aria-hidden":`true`,children:[`breaks`,`migration`,`untested`,`affected`,`safe`].map(e=>(0,O.jsxs)(`span`,{className:`ripple-map-legend-item`,children:[(0,O.jsx)(`span`,{className:`ripple-node-dot`,style:{background:C(e)}}),S(e).toLowerCase()]},e))})]}),N&&(0,O.jsxs)(`aside`,{className:`ripple-inspect`,"aria-label":`${N.label} detail`,children:[(0,O.jsxs)(`div`,{className:`ripple-inspect-head`,children:[(0,O.jsxs)(`div`,{className:`ripple-inspect-titles`,children:[(0,O.jsx)(`span`,{className:`ripple-node-status`,style:{color:C(N.status)},children:S(N.status)}),N.severity&&(0,O.jsxs)(`span`,{className:`ripple-inspect-sev`,style:{background:C(N.status)},children:[`would page · `,N.severity]})]}),(0,O.jsx)(`button`,{type:`button`,className:`ripple-iconbtn`,onClick:()=>d(null),"aria-label":`Close detail`,children:`✕`})]}),(0,O.jsx)(`div`,{className:`ripple-inspect-name`,children:N.label}),(0,O.jsxs)(`div`,{className:`ripple-inspect-owner`,children:[N.team?`owned by ${N.team}`:``,N.cite?(0,O.jsxs)(`span`,{className:`ripple-inspect-cite`,children:[` · `,N.cite.ref]}):null]}),N.trafficLabel&&(0,O.jsxs)(`div`,{className:`ripple-inspect-traffic`,children:[(0,O.jsx)(`strong`,{children:N.trafficLabel}),(0,O.jsx)(`span`,{children:`live traffic, from tracing — not the diff`})]}),N.contract&&(0,O.jsxs)(`div`,{className:`ripple-inspect-block`,children:[(0,O.jsx)(`div`,{className:`ripple-eyebrow`,children:`The contract`}),(0,O.jsx)(`p`,{children:N.contract})]}),N.problem&&(0,O.jsxs)(`div`,{className:`ripple-inspect-block ripple-inspect-problem`,style:{borderColor:`color-mix(in oklab, ${C(N.status)} 40%, transparent)`},children:[(0,O.jsx)(`div`,{className:`ripple-eyebrow`,style:{color:C(N.status)},children:`What happens`}),(0,O.jsx)(`p`,{children:N.problem})]}),N.altitudeNotes?.[n]&&(0,O.jsxs)(`div`,{className:`ripple-inspect-block`,children:[(0,O.jsx)(`div`,{className:`ripple-eyebrow`,children:`At your altitude`}),(0,O.jsx)(`p`,{children:N.altitudeNotes[n]})]}),N.fix&&(0,O.jsxs)(`div`,{className:`ripple-inspect-fix`,children:[(0,O.jsx)(`div`,{className:`ripple-eyebrow`,children:`Mavéa’s call`}),(0,O.jsx)(`p`,{children:N.fix})]}),r&&(0,O.jsxs)(`button`,{type:`button`,className:`ripple-ask-btn`,onClick:()=>r(N),children:[`Ask about `,N.label]})]})]})}function k(e){let t=e.lastIndexOf(`/`),n=t>0?e.slice(0,t):``;return n?n.split(`/`).slice(0,2).join(`/`):`(root)`}function A(e){let t=e.split(`/`);return t[t.length-1]||e}function j(e){let t=e.toLowerCase();return/\b(api|routes?|server|http|controllers?|handlers?)\b/.test(t)?`Routes + request handling.`:/\b(auth|identity|session|login)\b/.test(t)?`Tokens, sessions, permissions.`:/\b(db|data|models?|schema|migrations?|store)\b/.test(t)?`Schemas, queries, persistence.`:/\b(billing|payments?|charge|orders?)\b/.test(t)?`The money path.`:/\b(jobs?|workers?|queue|tasks?|cron)\b/.test(t)?`Async / background work.`:/\b(ui|components?|views?|pages?|client|web)\b/.test(t)?`The user interface.`:/\b(tests?|__tests__|spec|e2e)\b/.test(t)?`Tests.`:/\b(lib|utils?|shared|common|helpers?)\b/.test(t)?`Shared utilities.`:/\b(config|infra|deploy|ci|scripts?)\b/.test(t)?`Config + tooling.`:/\b(webhooks?|events?|integrations?|connectors?)\b/.test(t)?`Outbound events / integrations.`:``}function M(e){return e.find(e=>/\/(index|main|mod|app|server)\.[a-z]+$/i.test(e))||([...e].sort((e,t)=>e.length-t.length)[0]??e[0]??``)}function N(e,t,n=!1){let r=e.filter(e=>typeof e==`string`&&e.length>0),i=new Map;for(let e of r){let t=k(e);(i.get(t)??i.set(t,[]).get(t)).push(e)}let a=[...i.entries()].sort((e,t)=>t[1].length-e[1].length),o=a.map(([e,t],n)=>{let r=M(t),i=`${t.length} file${t.length===1?``:`s`}`,a=j(e);return{id:`m${n}`,name:e,purpose:a||i,entry:r,owner:``,health:i,explain:`${a?a+` `:``}${i} in ${e}.`+(r?` Start with ${A(r)} and follow what it imports.`:``),startHere:t.slice(0,3).map(A),depends:[],usedBy:[]}}),s=[{id:`pr`,label:t.split(`/`).pop()||t,sub:`THIS REPO`,type:`pr`,status:`affected`,scope:`in-pr`}],c=[],l=a.slice(0,9);l.forEach(([e,t],n)=>{let r=`n${n}`,i=M(t);s.push({id:r,label:e,sub:`${t.length} file${t.length===1?``:`s`}`,type:`module`,status:`affected`,scope:`in-pr`,contract:`${j(e)||`${t.length} files`}`+(i?` · start with ${A(i)}`:``)}),c.push({from:`pr`,to:r,verb:`contains`,status:`affected`})});let u=a.slice(0,4).map(([e])=>e).join(`, `);return{pr:{repo:t,title:`${r.length} file${r.length===1?``:`s`}`,files:r.length,summary:`${t} — ${r.length} file${r.length===1?``:`s`} across ${i.size} area${i.size===1?``:`s`}${u?` (${u})`:``}. Start with the busiest areas and follow what they touch.`,risks:[],readScope:`Read the repo tree: ${r.length} file${r.length===1?``:`s`}.`},nodes:s,edges:c,changes:[],cascades:[],rollout:[],workTypes:[],hotspots:[],suggestions:[],suppressedNits:0,modules:o,onboarding:{firstWeek:a.slice(0,5).map(([e,t])=>({team:e.toUpperCase(),title:e,sub:j(e)||`${t.length} files`,file:M(t)})),requestLife:[]},gate:{decision:`watch`,shipSafe:!1,unackedP0:0,requires:[],deployOrder:`unset`,conditions:[],rationale:`Exploring the repo — there’s no change to gate here.`},provenance:{source:`github`,example:!1,notes:[`Exploring ${t} — ${r.length} files grouped into ${i.size} areas.`,`This is the code as it stands, not a change. The gate and diff views don’t apply.`,...a.length>l.length?[`The map shows the ${l.length} busiest areas; the full list is in Onboarding.`]:[],...n?[`Large repo — only the first slice of files was read.`]:[]]}}}var P={tier:`slow-cheap`,enrichMaxTokens:1600,courseCount:3,coursesMaxTokens:2600,closingMaxTokens:3600,lessonMaxTokens:3600,fetchCodeContext:!1,thinkingLevel:`minimal`},F={tier:`frontier-deep`,enrichMaxTokens:2600,courseCount:5,coursesMaxTokens:3e3,closingMaxTokens:4e3,lessonMaxTokens:7e3,fetchCodeContext:!0,thinkingLevel:`low`},I={tier:`frontier-fast`,enrichMaxTokens:2600,courseCount:5,coursesMaxTokens:3e3,closingMaxTokens:4e3,lessonMaxTokens:6e3,fetchCodeContext:!0,thinkingLevel:`minimal`},L=e=>!!e&&/(localhost|127\.0\.0\.1|0\.0\.0\.0|host\.docker\.internal|:11434)/i.test(e);function ne(e){let t=e.model.toLowerCase();return L(e.baseUrl)||/:free\b/.test(t)?`slow-cheap`:/\bopus\b/.test(t)||/\bgpt-5(?!.*mini)/.test(t)||/(^|[^a-z])o[1-9](-|\b)/.test(t)||/gemini-[0-9.]*-?pro/.test(t)||/\bsonnet\b/.test(t)&&!/haiku/.test(t)?`frontier-deep`:`frontier-fast`}function re(e){switch(ne(e)){case`slow-cheap`:return P;case`frontier-deep`:return F;default:return I}}var ie=/^[A-Za-z0-9._-]+$/,R=e=>({kind:`invalid`,reason:e});function ae(e,t){let n=e.trim().replace(/^git@github\.com:/i,`github.com/`);if(!n)return R(`Paste a GitHub PR, compare, or repo URL — or owner/repo#123.`);let r=n.replace(/^https?:\/\//i,``).replace(/^www\./i,``),i=/^github\.com\/(.+)$/i.exec(r),a=/^[A-Za-z0-9._-]+\/[A-Za-z0-9._-]+\/(?:pull|pulls|compare|tree|blob)\b/i.test(n),o=i?i[1]:a?n:null;if(o){let e=o.split(`#`)[0].split(`?`)[0].replace(/\/+$/,``).split(`/`),t=e[0]??``,n=(e[1]??``).replace(/\.git$/,``);if(!t||!n||!ie.test(t)||!ie.test(n))return R(`That GitHub URL is missing an owner/repo.`);let r=`${t}/${n}`,i=e[2],a=e.slice(3);if(!i)return{kind:`repo`,repo:r};if(i===`pull`||i===`pulls`){let e=(a[0]??``).replace(/\D.*$/,``);return e?{kind:`pr`,repo:r,prNumber:e}:R(`That pull-request URL has no number.`)}if(i===`compare`){let e=decodeURIComponent(a.join(`/`)),t=/^(.+?)\.{2,3}(.+)$/.exec(e);return t?{kind:`compare`,repo:r,base:t[1],head:t[2]}:R(`A compare URL looks like base...head.`)}if(i===`tree`||i===`blob`){let e=a[0],t=a.slice(1).join(`/`);return i===`blob`&&t&&(t=t.replace(/\/?[^/]*$/,``)),{kind:`tree`,repo:r,ref:e||void 0,path:t||void 0}}return{kind:`repo`,repo:r}}let s=/^([A-Za-z0-9._-]+)\/([A-Za-z0-9._-]+?)(?:\.git)?#(\d+)$/.exec(n);if(s)return{kind:`pr`,repo:`${s[1]}/${s[2]}`,prNumber:s[3]};let c=/^([A-Za-z0-9._-]+)\/([A-Za-z0-9._-]+?)(?:\.git)?\/?$/.exec(n);if(c)return{kind:`repo`,repo:`${c[1]}/${c[2]}`};let l=/^#?(\d+)$/.exec(n);return l?t?{kind:`pr`,repo:t,prNumber:l[1]}:R(`Enter owner/repo#number, or connect a default repo first.`):R(`Paste a GitHub PR, compare, or repo URL — or owner/repo#123.`)}var oe=`mavea.ripple.tracked.v1`,se=20;function z(){try{let e=localStorage.getItem(oe);if(!e)return[];let t=JSON.parse(e);return Array.isArray(t)?t.filter(e=>e&&e.id&&e.model):[]}catch{return[]}}function B(e){try{localStorage.setItem(oe,JSON.stringify(e.slice(0,se)))}catch{}}function ce(){return z().sort((e,t)=>t.savedAt-e.savedAt)}function le(e,t=Date.now()){let n=e.pr.repo||e.pr.title||`change`,r={id:`${n}::${t}`,label:n,savedAt:t,source:e.provenance.source,model:e};return B([r,...z().filter(e=>e.label!==n)]),r}function ue(e){B(z().filter(t=>t.id!==e))}var V=a();function de(e){return(/^(.*?[.!?])(\s|$)/.exec(e.trim())?.[1]??e).trim()}function fe(e){let t=(0,V.c)(65),{model:n,altitude:r,onNavigate:i,onAsk:a}=e,{pr:o,gate:s}=n,c=n.changes.length===0,l;t[0]!==c||t[1]!==s?(l=c?{label:`Explore`,tone:`neutral`}:s.decision===`pass`?{label:`Clear to ship`,tone:`safe`}:s.decision===`block`?{label:`Hold`,tone:`breaks`}:{label:`Review first`,tone:`watch`},t[0]=c,t[1]=s,t[2]=l):l=t[2];let u=l,d=c?`${Math.max(0,n.nodes.length-1)} areas · ${o.files??0} files`:`+${o.added??0} −${o.removed??0} · ${o.files??n.changes.length} file${(o.files??n.changes.length)===1?``:`s`}`,f;t[3]===o.summary?f=t[4]:(f=de(o.summary),t[3]=o.summary,t[4]=f);let p=f,m=o.risks[0]?.text,h;t[5]!==n.courses||t[6]!==n.modules?(h=n.courses?.length||n.modules.length?[{id:`onboarding`,label:n.courses?.length?`Onboard · ${n.courses.length} course${n.courses.length===1?``:`s`}`:`Onboarding`}]:[],t[5]=n.courses,t[6]=n.modules,t[7]=h):h=t[7];let g;t[8]===n.changes.length?g=t[9]:(g=n.changes.length?[{id:`workspace`,label:`${n.changes.length} change${n.changes.length===1?``:`s`}`}]:[],t[8]=n.changes.length,t[9]=g);let _;t[10]===n.cascades.length?_=t[11]:(_=n.cascades.length?[{id:`cascade`,label:`The cascade`}]:[],t[10]=n.cascades.length,t[11]=_);let v;t[12]===n.migration?v=t[13]:(v=n.migration?[{id:`migration`,label:`The migration`}]:[],t[12]=n.migration,t[13]=v);let y;t[14]===n.rollout.length?y=t[15]:(y=n.rollout.length?[{id:`rollout`,label:`Safe rollout`}]:[],t[14]=n.rollout.length,t[15]=y);let b;t[16]===n.suggestions.length?b=t[17]:(b=n.suggestions.length?[{id:`suggestions`,label:`${n.suggestions.length} suggestion${n.suggestions.length===1?``:`s`}`}]:[],t[16]=n.suggestions.length,t[17]=b);let x;t[18]===n.hotspots.length?x=t[19]:(x=n.hotspots.length?[{id:`hotspots`,label:`The story`}]:[],t[18]=n.hotspots.length,t[19]=x);let S;t[20]===n.incident?S=t[21]:(S=n.incident?[{id:`incident`,label:`Incident`}]:[],t[20]=n.incident,t[21]=S);let C;t[22]===Symbol.for(`react.memo_cache_sentinel`)?(C={id:`read`,label:`Full read`},t[22]=C):C=t[22];let w;t[23]===c?w=t[24]:(w=c?[]:[{id:`gate`,label:`The gate`}],t[23]=c,t[24]=w);let ee;t[25]!==S||t[26]!==w||t[27]!==h||t[28]!==g||t[29]!==_||t[30]!==v||t[31]!==y||t[32]!==b||t[33]!==x?(ee=[...h,...g,..._,...v,...y,...b,...x,...S,C,...w],t[25]=S,t[26]=w,t[27]=h,t[28]=g,t[29]=_,t[30]=v,t[31]=y,t[32]=b,t[33]=x,t[34]=ee):ee=t[34];let T=ee,E;t[35]===u.label?E=t[36]:(E=(0,O.jsx)(`span`,{className:`ripple-verdict-badge`,children:u.label}),t[35]=u.label,t[36]=E);let D;t[37]===d?D=t[38]:(D=(0,O.jsx)(`span`,{className:`ripple-verdict-scale`,children:d}),t[37]=d,t[38]=D);let k;t[39]!==E||t[40]!==D?(k=(0,O.jsxs)(`div`,{className:`ripple-verdict-top`,children:[E,D]}),t[39]=E,t[40]=D,t[41]=k):k=t[41];let A;t[42]===p?A=t[43]:(A=(0,O.jsx)(`p`,{className:`ripple-verdict-what`,children:p}),t[42]=p,t[43]=A);let j;t[44]!==c||t[45]!==m?(j=m?(0,O.jsxs)(`div`,{className:`ripple-verdict-one`,children:[(0,O.jsx)(`span`,{className:`ripple-verdict-one-tag`,children:c?`Where to start`:`The one thing to check`}),(0,O.jsx)(`span`,{className:`ripple-verdict-one-text`,children:m})]}):!c&&(0,O.jsxs)(`div`,{className:`ripple-verdict-one ripple-verdict-clean`,children:[(0,O.jsx)(`span`,{className:`ripple-verdict-one-tag`,children:`Reads clean`}),(0,O.jsx)(`span`,{className:`ripple-verdict-one-text`,children:`Nothing risky pulled to the top — review and ship.`})]}),t[44]=c,t[45]=m,t[46]=j):j=t[46];let M;t[47]!==k||t[48]!==A||t[49]!==j||t[50]!==u.tone?(M=(0,O.jsxs)(`div`,{className:`ripple-verdict-head`,"data-tone":u.tone,children:[k,A,j]}),t[47]=k,t[48]=A,t[49]=j,t[50]=u.tone,t[51]=M):M=t[51];let N;t[52]!==r||t[53]!==n.edges||t[54]!==n.nodes||t[55]!==a?(N=(0,O.jsx)(`div`,{className:`ripple-verdict-map`,children:(0,O.jsx)(te,{nodes:n.nodes,edges:n.edges,altitude:r,onAsk:a,animate:!0})}),t[52]=r,t[53]=n.edges,t[54]=n.nodes,t[55]=a,t[56]=N):N=t[56];let P;t[57]===Symbol.for(`react.memo_cache_sentinel`)?(P=(0,O.jsx)(`span`,{className:`ripple-verdict-chips-tag`,children:`Go deeper`}),t[57]=P):P=t[57];let F;t[58]!==T||t[59]!==i?(F=(0,O.jsxs)(`div`,{className:`ripple-verdict-chips`,"aria-label":`Go deeper`,children:[P,T.map(e=>(0,O.jsx)(`button`,{type:`button`,className:`ripple-verdict-chip`,onClick:()=>i(e.id),children:e.label},e.id))]}),t[58]=T,t[59]=i,t[60]=F):F=t[60];let I;return t[61]!==M||t[62]!==N||t[63]!==F?(I=(0,O.jsxs)(`div`,{className:`ripple-verdict`,children:[M,N,F]}),t[61]=M,t[62]=N,t[63]=F,t[64]=I):I=t[64],I}r();var pe,H=()=>(pe??=s(()=>import(`./generate-8odaTyr4.js`),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9])),pe),me=(...e)=>H().then(t=>t.enrichShipModel(...e)),he=(...e)=>H().then(t=>t.enrichIncident(...e)),ge=(...e)=>H().then(t=>t.enrichOrientation(...e)),_e=(...e)=>H().then(t=>t.enrichCourses(...e)),ve=(...e)=>H().then(t=>t.enrichCourseClosing(...e)),ye=(...e)=>H().then(t=>t.enrichLesson(...e)),be=(...e)=>H().then(t=>t.gatherLessonCode(...e)),xe,U=()=>(xe??=s(()=>import(`./githubBrowser-DywfDeYx.js`).then(e=>e.i),__vite__mapDeps([8,2,3,6,7])),xe),Se=(...e)=>U().then(t=>t.fetchPrDiff(...e)),Ce=(...e)=>U().then(t=>t.compareRefs(...e)),we=(...e)=>U().then(t=>t.fetchRepoTree(...e)),Te,Ee=(...e)=>(Te??=s(()=>import(`./owners-FXDGInVq.js`),__vite__mapDeps([10,8,2,3,6,7])),Te.then(t=>t.resolveOwners(...e))),De,Oe=(...e)=>(De??=s(()=>import(`./codeContext-0UMRSGRr.js`),__vite__mapDeps([11,8,2,3,6,7])),De.then(t=>t.gatherCodeContext(...e))),ke=e=>e?/^([\w.-]+\/[\w.-]+)/.exec(e.trim())?.[1]:void 0,Ae=n(()=>s(()=>import(`./ShipRead-CMe1DNik.js`).then(e=>({default:e.ShipRead})),__vite__mapDeps([12,13,2,14,15,16,17]))),je=n(()=>s(()=>import(`./ShipIncident-DXXciEP7.js`).then(e=>({default:e.ShipIncident})),__vite__mapDeps([18,13,2,14,15,16,17,19]))),Me=n(()=>s(()=>import(`./ShipWorkspace--x-q6Ly3.js`).then(e=>({default:e.ShipWorkspace})),__vite__mapDeps([20,13,2,14,15,16,17,21,22]))),Ne=n(()=>s(()=>import(`./ShipCascade-BmTE193h.js`).then(e=>({default:e.ShipCascade})),__vite__mapDeps([23,13,2,14,15,16,17,21,24]))),Pe=n(()=>s(()=>import(`./ShipMigration-rhBm0Tre.js`).then(e=>({default:e.ShipMigration})),__vite__mapDeps([25,13,2,14,15,16,17,26]))),Fe=n(()=>s(()=>import(`./ShipRollout-BA4x-btU.js`).then(e=>({default:e.ShipRollout})),__vite__mapDeps([27,13,2,14,15,16,17,28]))),Ie=n(()=>s(()=>import(`./ShipCourse-K2vnS3Sw.js`).then(e=>({default:e.ShipCourse})),__vite__mapDeps([29,13,2,14,15,16,17,30,6,7,31,32,33,34]))),Le=n(()=>s(()=>import(`./ShipOnboarding-9KCVVAkX.js`).then(e=>({default:e.ShipOnboarding})),__vite__mapDeps([35,13,2,14,15,16,17,36]))),Re=n(()=>s(()=>import(`./ShipHotspots-DILwqPxh.js`).then(e=>({default:e.ShipHotspots})),__vite__mapDeps([37,13,2,14,15,16,17,38]))),W=n(()=>s(()=>import(`./ShipSuggestions-Jm45jfFl.js`).then(e=>({default:e.ShipSuggestions})),__vite__mapDeps([39,13,2,14,15,16,17,40]))),G=n(()=>s(()=>import(`./ShipGate-BYYu9WVq.js`).then(e=>({default:e.ShipGate})),__vite__mapDeps([41,14,2,15,42]))),ze=n(()=>s(()=>import(`./RippleAskController-BA_kGOmL.js`).then(e=>({default:e.RippleAskController})),__vite__mapDeps([43,13,2,14,15,16,17,1,3,4,44,45,8,6,7,31,46]))),Be=ze.Component,Ve=Ae.Component,He=je.Component,Ue=Me.Component,We=Ne.Component,Ge=Pe.Component,Ke=Fe.Component,qe=Ie.Component,Je=Le.Component,Ye=Re.Component,Xe=W.Component,Ze=G.Component,Qe=(e,t)=>`${e}::${t}`;function $e(e){try{return localStorage.getItem(e)}catch{return null}}function et(e,t){try{localStorage.setItem(e,t)}catch{}}var tt=[{id:`newgrad`,label:`New grad`},{id:`working`,label:`Working`},{id:`principal`,label:`Principal`}],nt=new Set([`anthropic`,`openai`,`gemini`,`grok`,`openrouter`]);function rt(e){return{read:Ae.preload,incident:je.preload,workspace:Me.preload,cascade:Ne.preload,migration:Pe.preload,rollout:Fe.preload,course:Ie.preload,onboarding:Le.preload,hotspots:Re.preload,suggestions:W.preload,gate:G.preload}[e]?.()??Promise.resolve()}var it={understand:`Understand`,ship:`Ship the change`},at=e=>e===`course`?`courses`:e===`onboarding`?`orientation`:`verdict`,ot=[{id:`verdict`,label:`Overview`,intent:`The verdict, the one thing to check, and the change rippling out.`,jobs:[`ship`],applies:e=>e.changes.length>0},{id:`read`,label:`Mavéa’s read`,intent:`The whole change in two sentences, risks pulled to the top.`,jobs:[`ship`,`understand`],applies:e=>!!e.pr.summary||e.changes.length>0},{id:`course`,label:`Courses`,intent:`A leveled curriculum built from THIS code — beginner → expert, with checkpoints.`,jobs:[`understand`],applies:(e,t)=>!!e.courses?.length||t.courses===`enriching`||t.hasRepo},{id:`onboarding`,label:`Map & request life`,intent:`The modules, who owns what, and a request’s life through the code.`,jobs:[`understand`],applies:(e,t)=>e.modules.length>0||t.hasRepo},{id:`incident`,label:`Incident`,intent:`A live alert, traced back to its likely cause — the rollback and who to wake.`,jobs:[`ship`,`understand`],applies:e=>!!e.incident},{id:`workspace`,label:`Workspace`,intent:`Pick a change — its diff, intent, and cause & effect assemble.`,jobs:[`ship`],applies:e=>e.changes.length>0},{id:`impact`,label:`Impact map`,intent:`Everything this change touches, and what those changes hit downstream.`,jobs:[`ship`,`understand`],applies:e=>e.nodes.length>0},{id:`cascade`,label:`The cascade`,intent:`How one line becomes a P0 — hop by hop, before anyone gets paged.`,jobs:[`ship`],applies:e=>e.cascades.length>0},{id:`migration`,label:`The migration`,intent:`The cost of a schema change isn’t in the SQL — it’s in the table size.`,jobs:[`ship`],applies:e=>!!e.migration},{id:`rollout`,label:`Safe rollout`,intent:`One safe order — so you ship with your eyes open.`,jobs:[`ship`],applies:e=>e.rollout.length>0},{id:`hotspots`,label:`The story`,intent:`Why a line exists, what it broke, and who to ask.`,jobs:[`understand`],applies:e=>e.hotspots.length>0},{id:`suggestions`,label:`Suggestions`,intent:`The “did you think about X?” a staff engineer would raise — grounded, and rare.`,jobs:[`ship`],applies:e=>e.suggestions.length>0},{id:`gate`,label:`The gate`,intent:`A picture for you, a pre-merge check for the agents.`,jobs:[`ship`],applies:e=>e.changes.length>0}];function st({model:e,cfg:t,speak:n,showcase:r,onClose:a}){let[s,u]=(0,T.useState)(!1),[S,C]=(0,T.useState)(!1),[E,D]=(0,T.useState)(`verdict`),[k,A]=(0,T.useState)(`working`),[j,M]=(0,T.useState)(e),P=(0,T.useRef)(e),[F,I]=(0,T.useState)({verdict:`floor`,orientation:`floor`,courses:`floor`}),L=(0,T.useRef)(0),ne=(0,T.useRef)(null),ie=(0,T.useRef)(null),R=(0,T.useRef)(null),oe=(0,T.useRef)(null),se=(0,T.useRef)(!1),z=(0,T.useRef)(!1),B=(0,T.useRef)(void 0),V=(0,T.useRef)(void 0),de=(0,T.useRef)(void 0),pe=(0,T.useRef)(null),[H,xe]=(0,T.useState)(!1),[U,Te]=(0,T.useState)(!1),[De,Ae]=(0,T.useState)(0),[je,Me]=(0,T.useState)(null),Ne=(0,T.useRef)([]),Pe=(0,T.useRef)(new Map),Fe=(0,T.useRef)(new Map),Ie=(0,T.useCallback)(e=>{Me(t=>({text:e,nonce:(t?.nonce??0)+1})),Te(!0)},[]),Le=(0,T.useMemo)(()=>t?{model:j,cfg:t,altitude:k,diffText:pe.current?.text,repo:B.current,gitRef:V.current,treePaths:Ne.current,lessonDetails:Fe.current,fileCache:Pe.current}:null,[t,j,k]),Re=(0,T.useCallback)(()=>{Ae(e=>e+1),Ne.current=[],Pe.current.clear(),Fe.current.clear()},[]),W=(0,T.useCallback)(()=>{ne.current?.abort(),ie.current?.abort(),R.current?.abort(),oe.current?.abort()},[]);(0,T.useEffect)(()=>W,[W]);let G=(0,T.useRef)(0);(0,T.useEffect)(()=>{M(e),P.current=e,B.current=void 0,se.current=!0,z.current=!0,I({verdict:`done`,orientation:e.modules.length?`done`:`floor`,courses:e.courses?.length?`done`:`floor`})},[e]);let st=(0,T.useRef)(!1);(0,T.useEffect)(()=>{st.current||(st.current=!0,!(!e.provenance.example||r)&&($e(`ripple.seenWorkedExample`)===`1`?(Nt(`github`),Y(!0)):et(`ripple.seenWorkedExample`,`1`)))},[e.provenance.example,r]);let K=(0,T.useMemo)(()=>t&&nt.has(t.provider)?t:{provider:`gemini`,model:`gemini-3.5-flash`,apiKey:``},[t]),q=(0,T.useMemo)(()=>re(K),[K]),[ct,lt]=(0,T.useState)(()=>$e(`ripple.hint.fastModel.dismissed`)===`1`),[ut,dt]=(0,T.useState)(!1),ft=(0,T.useCallback)(()=>{lt(!0),et(`ripple.hint.fastModel.dismissed`,`1`)},[]),pt=(0,T.useCallback)((e,t,n)=>{let r=++L.current;ne.current?.abort();let i=new AbortController;ne.current=i,xe(!1),I(e=>({...e,verdict:`enriching`})),(async()=>{let a=n&&q.fetchCodeContext?await Oe(e,n,void 0,i.signal).catch(()=>``):``;if(i.signal.aborted||L.current!==r)return;let o=await me(e,t,K,{signal:i.signal,codeContext:a||void 0,maxTokens:q.enrichMaxTokens,thinkingLevel:q.thinkingLevel,onPartial:t=>{L.current===r&&M(m(e,t,K.model))}});L.current===r&&(o?(M(o),P.current=o,I(e=>({...e,verdict:`done`}))):(M(e),P.current=e,I(e=>({...e,verdict:`error`}))))})()},[K,q]),mt=(0,T.useCallback)((e,t,n)=>{let r=v(_(e),t);return r.changes.length===0?0:(G.current++,W(),P.current=r,B.current=n,V.current=r.pr.branch||void 0,de.current=void 0,pe.current={text:e,repo:n},se.current=!1,z.current=!1,Re(),M(r),D(`verdict`),dt(!0),I({verdict:`enriching`,orientation:`floor`,courses:`floor`}),pt(r,e,n),r.changes.length)},[W,pt,Re]),ht=(0,T.useCallback)(()=>{let e=pe.current;e&&pt(P.current,e.text,e.repo)},[pt]),gt=(0,T.useCallback)(e=>{let t=P.current;return t.modules.length?t.modules:N(t.changes.map(e=>e.file),e,!1).modules},[]),_t=(0,T.useCallback)((e=!1)=>{let t=B.current;if(!t||se.current&&!e)return;se.current=!0;let n=L.current;ie.current?.abort();let r=new AbortController;ie.current=r,I(e=>({...e,orientation:`enriching`})),(async()=>{let e=await ge({...P.current,modules:gt(t)},t,V.current,K,{signal:r.signal,maxTokens:q.enrichMaxTokens,thinkingLevel:q.thinkingLevel}).catch(()=>null);if(r.signal.aborted||L.current!==n)return;let i=e?await Ee(e,t,V.current,r.signal).catch(()=>e):{...P.current,modules:gt(t)};r.signal.aborted||L.current!==n||(M(e=>({...e,modules:i.modules,nodes:i.nodes,onboarding:i.onboarding})),I(t=>({...t,orientation:e?`done`:`error`})))})()},[K,q,gt]),J=(0,T.useCallback)((e=!1,t)=>{let n=B.current;if(!n||z.current&&!e)return;z.current=!0;let r=L.current;R.current?.abort();let i=new AbortController;R.current=i;let a=setTimeout(()=>i.abort(),9e4);I(e=>({...e,courses:`enriching`})),(async()=>{let o=y(`courses|${n}|${V.current??``}|${t??``}`,K.model),s=e?null:await x(o);if(i.signal.aborted||L.current!==r)return;let c={...P.current,modules:gt(n)},l=s?.courses??await _e(c,n,V.current,K,{signal:i.signal,count:q.courseCount,maxTokens:q.coursesMaxTokens,thinkingLevel:q.thinkingLevel,focus:t}).catch(()=>void 0);if(clearTimeout(a),!(i.signal.aborted||L.current!==r))if(l?.length){M(e=>({...e,courses:l})),I(e=>({...e,courses:`done`}));let e=s?s.commitSha:de.current;s||b(o,{courses:l,commitSha:de.current}),ee(n,{commitSha:e??``,ref:V.current??``,model:K.model,builtAt:Date.now(),courseTitles:l.map(e=>e.title)})}else I(e=>({...e,courses:`error`}))})()},[K,q,gt]),vt=(0,T.useCallback)(()=>J(!0),[J]),[yt,bt]=(0,T.useState)(void 0),xt=(0,T.useCallback)(e=>{bt(e),z.current=!1,J(!0,e)},[J]),St=(0,T.useCallback)((e,t)=>{let n=B.current;return n?Ce(e,t,n):Promise.resolve({ok:!1,detail:`No connected repo.`})},[]),Ct=(0,T.useCallback)(async(e,t,n=!1,r)=>{let i=B.current;if(!i)return null;let{codeContext:a,contentHash:o}=await be(t,V.current,i),s=y(`lesson|${i}|${e.title}|${t.title}|${r??`working`}|${o}`,K.model);if(!n){let n=await x(s);if(n)return Fe.current.set(Qe(e.title,t.title),n),n}let c=await ye(e,t,a,K,{maxTokens:q.lessonMaxTokens,thinkingLevel:q.thinkingLevel,altitude:r}).catch(()=>null);return c&&(b(s,c),Fe.current.set(Qe(e.title,t.title),c)),c},[K,q]),wt=(0,T.useCallback)(async(e,t=!1)=>{let n=B.current;if(!n)return;let r=y(`closing|${n}|${e.title}|${V.current??``}`,K.model);if(!t){let e=await x(r);if(e)return e}let i=new AbortController,a=setTimeout(()=>i.abort(),9e4),o=await ve(e,K,{signal:i.signal,maxTokens:q.closingMaxTokens,thinkingLevel:q.thinkingLevel}).catch(()=>void 0).finally(()=>clearTimeout(a));return o&&b(r,o),o},[K,q]),Tt=(0,T.useCallback)(e=>{D(e);let t=at(e);t===`courses`?J():t===`orientation`&&_t()},[J,_t]),[Et,Y]=(0,T.useState)(!1),[Dt,Ot]=(0,T.useState)(``),[kt,At]=(0,T.useState)(``),jt=(0,T.useCallback)(()=>{let e=Dt.trim();if(!d(e)){At("That doesn’t look like a unified diff — paste the output of `git diff` (or a .diff / .patch file).");return}if(mt(e)===0){At(`No changed files found in that diff.`);return}Y(!1),Ot(``),At(``)},[Dt,mt]),[Mt,Nt]=(0,T.useState)(`github`),[Pt,Ft]=(0,T.useState)(()=>ce()),[It,Lt]=(0,T.useState)(!1),Rt=(0,T.useRef)(void 0),zt=(0,T.useCallback)(()=>{le(j),Lt(!0),window.clearTimeout(Rt.current),Rt.current=window.setTimeout(()=>Lt(!1),1600)},[j]);(0,T.useEffect)(()=>()=>window.clearTimeout(Rt.current),[]);let Bt=(0,T.useCallback)(e=>{Ft(ce()),Nt(e),qt(``),Z(``),ln(``),dn(h()),Y(!0)},[]),[Vt,Ht]=(0,T.useState)(``),[Ut,Wt]=(0,T.useState)(``),Gt=(0,T.useCallback)(()=>{let e=Vt.trim();if(!e){Wt(`Paste the alert, error, or log line that fired.`);return}G.current++;let t=f(e,j.changes.length>0&&!j.provenance.example?j:void 0);if(M(t),D(`incident`),Y(!1),Ht(``),Wt(``),K){oe.current?.abort();let n=new AbortController;oe.current=n,he(t,e,K,n.signal).then(e=>M(n=>n.incident===t.incident?e:n))}},[Vt,j,K]),[Kt,qt]=(0,T.useState)(``),[X,Jt]=(0,T.useState)(``),[Yt,Xt]=(0,T.useState)(``),[Zt,Qt]=(0,T.useState)(``),[$t,en]=(0,T.useState)(``),[tn,nn]=(0,T.useState)(``),[rn,an]=(0,T.useState)(``),[on,Z]=(0,T.useState)(``),[Q,sn]=(0,T.useState)(!1),[cn,ln]=(0,T.useState)(``),[un,dn]=(0,T.useState)(!1),fn=(0,T.useRef)(null);(0,T.useEffect)(()=>()=>fn.current?.abort(),[]);let pn=(0,T.useCallback)(async e=>{let t=G.current;fn.current?.abort();let n=new AbortController;fn.current=n,sn(!0),Z(``);let r=await e(n.signal);if(!(n.signal.aborted||t!==G.current)){if(sn(!1),!r.ok||!r.diff){Z(r.detail);return}if(mt(r.diff,r.label,ke(r.label))===0){Z(`That diff had no changed files to analyze.`);return}Y(!1)}},[mt]),mn=(0,T.useCallback)(()=>{let e=Yt.trim();if(!e){Z(`Enter a pull-request number.`);return}pn(t=>Se(e,X.trim()||void 0,t))},[Yt,X,pn]),hn=(0,T.useCallback)(()=>{let e=Zt.trim(),t=$t.trim();if(!e||!t){Z(`Enter a base and a head ref to compare.`);return}pn(n=>Ce(e,t,X.trim()||void 0,n))},[Zt,$t,X,pn]),gn=(0,T.useCallback)(()=>{let e=cn.trim();e&&p(e).then(e=>{dn(e),ln(``),e&&Z(``)})},[cn]),_n=(0,T.useCallback)(()=>{g().then(()=>{dn(!1),ln(``)})},[]),vn=(0,T.useCallback)(async(e,t,n)=>{let r=(e??X).trim()||void 0,i=(t??tn).trim()||void 0,a=(n??rn).trim(),o=G.current;fn.current?.abort();let s=new AbortController;fn.current=s,sn(!0),Z(``);let c=await we(i,r,s.signal);if(s.signal.aborted||o!==G.current)return;if(sn(!1),!c.ok||!c.paths){Z(c.detail);return}let l=a.replace(/^\/+|\/+$/g,``),u=l?c.paths.filter(e=>e===l||e.startsWith(l+`/`)):c.paths;if(u.length===0){Z(`No files under “${l}”.`);return}let d=N(u,l?`${c.label??`repo`}/${l}`:c.label??`repo`,c.truncated),f=ke(c.label),p=i,m=f?!!w(f):!1;G.current++,W(),++L.current,P.current=d,B.current=f,V.current=p,de.current=c.sha,pe.current=null,se.current=!1,z.current=!1,Re(),Ne.current=u,M(d),D(m?`course`:`onboarding`),dt(!0),Y(!1),I({verdict:`done`,orientation:`floor`,courses:`floor`}),f&&(_t(),m&&J())},[tn,X,rn,W,_t,J,Re]),yn=(0,T.useCallback)(()=>{let e=ae(Kt,X.trim()||void 0);if(e.kind===`invalid`){Z(e.reason);return}if(Z(``),e.kind===`pr`)pn(t=>Se(e.prNumber,e.repo,t));else if(e.kind===`compare`)pn(t=>Ce(e.base,e.head,e.repo,t));else{let t=e.kind===`tree`?e.ref:void 0,n=e.kind===`tree`?e.path:void 0;vn(e.repo,t,n)}},[Kt,X,pn,vn]),bn=j.changes.length>0?`ship`:`understand`,xn=(0,T.useMemo)(()=>{let e={orientation:F.orientation,courses:F.courses,hasRepo:!!B.current},t=ot.filter(t=>t.applies(j,e)),n=bn===`ship`?`understand`:`ship`,r=t.filter(e=>e.jobs.includes(bn)),i=t.filter(e=>!e.jobs.includes(bn)&&e.jobs.includes(n));return[{job:bn,items:r},{job:n,items:i}].filter(e=>e.items.length>0)},[j,F.orientation,F.courses,bn]),Sn=(0,T.useMemo)(()=>xn.flatMap(e=>e.items),[xn]);(0,T.useEffect)(()=>{Sn.length&&!Sn.some(e=>e.id===E)&&D(Sn[0].id)},[Sn,E]);let Cn=(0,T.useCallback)(e=>{S&&n&&n(`${e.label}. ${e.problem??e.contract??``} ${e.fix??``}`.trim()),Ie(`Explain ${e.label}${e.contract?` — ${e.contract}`:``}`)},[S,n,Ie]),wn=(0,T.useCallback)(e=>{let t=j;switch(e){case`verdict`:return t.pr.summary;case`read`:return t.pr.summary;case`incident`:return t.incident?`${t.incident.symptom}. ${t.incident.rootCause}`:``;case`workspace`:return`Here are all ${t.changes.length} changes, grouped by subsystem. Pick one to see its diff and what it touches.`;case`impact`:{let e=t.nodes.filter(e=>e.status===`breaks`).length;return e?`Everything this change touches. ${e} of these break — the coral lines are where.`:`Everything this change touches. Nothing breaks downstream.`}case`cascade`:{let e=t.cascades[0];return e?`Watch how one line becomes a ${e.incidentSeverity}: ${e.trigger}, and ${e.incident}.`:``}case`migration`:return t.migration?`The migration looks harmless, but on ${t.migration.rows} rows it costs ${t.migration.lockCost}.`:``;case`rollout`:return`Ship in this order and the change never breaks a caller mid-rollout.`;case`course`:return t.courses?.length?`A guided curriculum — ${t.courses.length} ${t.courses.length===1?`course`:`courses`} that take you from oriented to fearless, built from this code.`:`A leveled course, built from this code, so you can change it without fear.`;case`onboarding`:return`Understand the whole service — module by module, and a request's life through it.`;case`hotspots`:return`The story behind the lines worth knowing before you touch them.`;case`suggestions`:return`${t.suggestions.length} things worth your time. ${t.suppressedNits} shallow nits suppressed.`;case`gate`:return t.gate.rationale;default:return``}},[j]);(0,T.useEffect)(()=>{let e=e=>{e.key===`Escape`&&a()};return window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)},[a]);let Tn=(0,T.useRef)(null);c(Tn);let $=j.pr,En=j.provenance.example,Dn=(0,T.useCallback)(()=>{switch(E){case`verdict`:return(0,O.jsx)(fe,{model:j,altitude:k,onNavigate:e=>Tt(e),onAsk:Cn});case`read`:return(0,O.jsx)(Ve,{model:j,altitude:k});case`incident`:return(0,O.jsx)(He,{model:j,altitude:k});case`impact`:return(0,O.jsx)(te,{nodes:j.nodes,edges:j.edges,altitude:k,onAsk:Cn});case`workspace`:return(0,O.jsx)(Ue,{model:j,altitude:k});case`cascade`:return(0,O.jsx)(We,{model:j});case`migration`:return(0,O.jsx)(Ge,{model:j,altitude:k});case`rollout`:return(0,O.jsx)(Ke,{model:j,altitude:k});case`course`:return(0,O.jsx)(qe,{model:j,altitude:k,building:F.courses===`enriching`,onRegenerate:B.current?vt:void 0,loadLessonDetail:B.current?Ct:void 0,loadCourseClosing:B.current?wt:void 0,courseFocus:yt,onCourseFocus:B.current?xt:void 0,speak:S?n:void 0,commitSha:B.current?de.current:void 0,compareSinceBuilt:B.current?St:void 0,openFullAnalysis:B.current?mt:void 0,onAskAboutLesson:Ie});case`onboarding`:return(0,O.jsx)(Je,{model:j,altitude:k});case`hotspots`:return(0,O.jsx)(Ye,{model:j,altitude:k});case`suggestions`:return(0,O.jsx)(Xe,{model:j,altitude:k});case`gate`:return(0,O.jsx)(Ze,{model:j,altitude:k});default:throw Error(`Ripple: no section renderer for "${E}"`)}},[E,j,k,Cn,Tt,F.courses,vt,Ct,wt,yt,xt,St,mt,S,n,Ie]);return(0,O.jsx)(`div`,{className:`ripple-scrim`,"data-expanded":s?`true`:void 0,onClick:a,role:`button`,tabIndex:0,"aria-label":`Close Ripple`,onKeyDown:e=>{e.key!==`Enter`&&e.key!==` `||(e.preventDefault(),a())},children:(0,O.jsxs)(`section`,{className:`ripple-panel`,role:`dialog`,"aria-label":`Ripple`,ref:Tn,onClick:e=>e.stopPropagation(),children:[(0,O.jsxs)(`header`,{className:`ripple-head`,children:[(0,O.jsxs)(`div`,{className:`ripple-id`,children:[(0,O.jsx)(`span`,{className:`ripple-word`,children:`Ripple`}),(0,O.jsx)(`span`,{className:`ripple-sep`,"aria-hidden":`true`}),(0,O.jsx)(`span`,{className:`ripple-repo`,children:$.repo}),$.number&&(0,O.jsx)(`span`,{className:`ripple-pr`,children:$.number}),$.branch&&(0,O.jsxs)(`span`,{className:`ripple-branch`,children:[$.branch,$.base?` → ${$.base}`:``]})]}),(0,O.jsxs)(`div`,{className:`ripple-head-right`,children:[($.added!=null||$.removed!=null)&&(0,O.jsxs)(`span`,{className:`ripple-stat`,children:[$.added!=null&&(0,O.jsxs)(`span`,{className:`ripple-add`,children:[`+`,$.added.toLocaleString()]}),` `,$.removed!=null&&(0,O.jsxs)(`span`,{className:`ripple-del`,children:[`−`,$.removed.toLocaleString()]}),$.files==null?``:` · ${$.files} files`]}),$.p0Ways?(0,O.jsxs)(`span`,{className:`ripple-p0`,title:`Ways this change could cause a P0`,children:[(0,O.jsx)(`span`,{className:`ripple-p0-dot`,"aria-hidden":`true`}),$.p0Ways,` `,$.p0Ways===1?`way`:`ways`,` to cause a P0`]}):null,!En&&(0,O.jsx)(`button`,{type:`button`,className:`ripple-track-btn`,onClick:zt,title:`Keep an eye on this change — saved on this device`,children:It?`Tracked ✓`:`☆ Track`}),(0,O.jsx)(`button`,{type:`button`,className:`ripple-ask-toggle`+(U?` is-active`:``),onClick:()=>Te(e=>!e),...i(ze.preload),"aria-pressed":U,"aria-label":U?`Close the ask rail`:`Ask about this repo or PR`,title:U?`Hide ask`:`Ask about this repo or PR`,children:`Ask`}),n&&(0,O.jsx)(`button`,{type:`button`,className:`ripple-iconbtn`,onClick:()=>C(e=>!e),"aria-pressed":S,"aria-label":S?`Turn narration off`:`Turn narration on`,title:S?`Narration on — the orb speaks the walkthrough`:`Narration off`,children:S?`🔊`:`🔇`}),(0,O.jsx)(`button`,{type:`button`,className:`ripple-iconbtn`,onClick:()=>u(e=>!e),"aria-label":s?`Exit full screen`:`Expand to full screen`,title:s?`Exit full screen`:`Full screen`,children:s?`⤡`:`⤢`}),(0,O.jsx)(`button`,{type:`button`,className:`ripple-iconbtn`,onClick:a,"aria-label":`Close Ripple`,children:`✕`})]})]}),q.tier===`slow-cheap`&&ut&&!ct&&(0,O.jsxs)(`div`,{className:`ripple-hint`,role:`note`,children:[(0,O.jsx)(`span`,{className:`ripple-hint-text`,children:`Tip: a flash or lite model makes Ripple feel instant — your model still works, it’s just slower here.`}),(0,O.jsx)(`button`,{type:`button`,className:`ripple-hint-dismiss`,onClick:ft,"aria-label":`Dismiss tip`,children:`Got it`})]}),(En||(j.provenance.notes?.length??0)>0)&&(0,O.jsxs)(`div`,{className:`ripple-example`,"data-real":En?void 0:`true`,role:`note`,children:[(0,O.jsx)(`span`,{className:`ripple-example-dot`,"aria-hidden":`true`}),(0,O.jsx)(`span`,{className:`ripple-example-text`,children:En?(0,O.jsxs)(O.Fragment,{children:[(0,O.jsx)(`strong`,{children:`Worked example`}),` — a sample of a GitHub-connected analysis, not your code. It shows only what GitHub gives us (diff, files, in-repo callers).`]}):(0,O.jsxs)(O.Fragment,{children:[(0,O.jsx)(`strong`,{children:j.changes.length===0?`Exploring`:`From your diff`}),` —`,` `,j.provenance.notes?.[0]]})}),(0,O.jsx)(`button`,{type:`button`,className:`ripple-example-cta`,onClick:()=>Bt(`github`),children:En?`Run on your own code →`:`New`})]}),(0,O.jsxs)(`div`,{className:`ripple-body`,children:[(0,O.jsxs)(`nav`,{className:`ripple-rail`,"aria-label":`Sections`,children:[xn.map(e=>(0,O.jsxs)(`div`,{className:`ripple-rail-group`,children:[xn.length>1&&(0,O.jsx)(`div`,{className:`ripple-rail-grouplabel`,children:it[e.job]}),e.items.map(e=>(0,O.jsxs)(`button`,{type:`button`,className:`ripple-rail-item`,"data-ripple-section":e.id,"data-active":e.id===E?`true`:void 0,"data-enriching":F[at(e.id)]===`enriching`?`true`:void 0,onClick:()=>{if(Tt(e.id),S&&n){let t=wn(e.id);t&&n(t)}},...i(()=>rt(e.id)),children:[(0,O.jsx)(`span`,{className:`ripple-rail-label`,children:e.label}),F[at(e.id)]===`enriching`&&(0,O.jsx)(`span`,{className:`ripple-rail-spark`,"aria-hidden":`true`})]},e.id))]},e.job)),(0,O.jsxs)(`div`,{className:`ripple-rail-altitude`,children:[(0,O.jsx)(`div`,{className:`ripple-eyebrow`,children:`Explain for`}),(0,O.jsx)(`div`,{className:`ripple-alt`,role:`group`,"aria-label":`Explanation altitude`,children:tt.map(e=>(0,O.jsx)(`button`,{type:`button`,"data-active":k===e.id?`true`:void 0,onClick:()=>A(e.id),children:e.label},e.id))})]})]}),(0,O.jsxs)(`div`,{className:`ripple-main`,children:[F[at(E)]===`enriching`&&at(E)!==`courses`&&(0,O.jsxs)(`div`,{className:`ripple-sharpening-wrap`,children:[(0,O.jsxs)(`div`,{className:`ripple-sharpening`,role:`status`,"aria-live":`polite`,children:[(0,O.jsx)(`span`,{className:`ripple-sharpening-dot`,"aria-hidden":`true`}),at(E)===`orientation`?`Reading the repo to map it out…`:`Sharpening with the model’s read…`]}),(0,O.jsx)(`div`,{className:`ripple-progress`,"aria-hidden":`true`})]}),at(E)===`verdict`&&F.verdict===`error`&&!H&&(0,O.jsxs)(`div`,{className:`ripple-verdict-err`,role:`note`,children:[(0,O.jsx)(`span`,{className:`ripple-verdict-err-text`,children:`The model’s read didn’t land — showing the grounded floor. Connect a key in Settings → Live, or try again.`}),(0,O.jsxs)(`div`,{className:`ripple-verdict-err-actions`,children:[(0,O.jsx)(`button`,{type:`button`,className:`ripple-verdict-err-retry`,onClick:ht,children:`Try again`}),(0,O.jsx)(`button`,{type:`button`,className:`ripple-verdict-err-dismiss`,onClick:()=>xe(!0),"aria-label":`Dismiss`,children:`Dismiss`})]})]}),(0,O.jsx)(o,{label:`${ot.find(e=>e.id===E)?.label??`Ripple`} section`,children:Dn()})]}),U&&(0,O.jsx)(o,{label:`Ripple ask rail`,children:(0,O.jsx)(Be,{ctx:Le,onClose:()=>Te(!1),altitude:k,seed:je,repo:$.repo||``,gitRef:$.branch||`HEAD`,focusFile:j.changes[0]?.file??j.modules[0]?.entry},De)})]}),Et&&(0,O.jsx)(`div`,{className:`ripple-paste`,role:`dialog`,"aria-label":`Run Ripple on a diff`,children:(0,O.jsxs)(`div`,{className:`ripple-paste-card`,children:[(0,O.jsxs)(`div`,{className:`ripple-paste-head`,children:[(0,O.jsxs)(`div`,{children:[(0,O.jsx)(`div`,{className:`ripple-paste-title`,children:`Run Ripple on your code`}),(0,O.jsx)(`div`,{className:`ripple-paste-sub`,children:`Read-only — Ripple analyzes a change and never writes, comments, or merges.`})]}),(0,O.jsx)(`button`,{type:`button`,className:`ripple-iconbtn`,onClick:()=>Y(!1),"aria-label":`Cancel`,children:`✕`})]}),(0,O.jsx)(l,{kind:`code`,from:`live`}),Mt===`incident`?(0,O.jsxs)(O.Fragment,{children:[(0,O.jsx)(`textarea`,{className:`ripple-paste-input`,value:Vt,onChange:e=>{Ht(e.target.value),Ut&&Wt(``)},placeholder:`PagerDuty: [payments-api] P1 — 5xx rate 38% on /charge
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/generate-8odaTyr4.js","assets/providers-wzm7E8Pa.js","assets/chunk-BVpWp9h4.js","assets/http-CJCtjYpA.js","assets/info-CiqHR5cs.js","assets/cache-BumECILO.js","assets/githubToken-DtcLYqwm.js","assets/keyVault-DEsNh9FR.js","assets/githubBrowser-DywfDeYx.js","assets/streamParse-DRgMHWye.js","assets/owners-FXDGInVq.js","assets/codeContext-0UMRSGRr.js","assets/ShipRead--gGqg2SE.js","assets/index-C7H7A1rW.js","assets/jsx-runtime-DaSxXjOY.js","assets/react-BQSORdFI.js","assets/lazyRetry-D50B1UMY.js","assets/index-CepQEz75.css","assets/ShipIncident-BWxerYtX.js","assets/ShipIncident-BUHvFFiC.css","assets/ShipWorkspace-BmdcHZXa.js","assets/colors-D49Req-e.js","assets/ShipWorkspace-D6XQpGEN.css","assets/ShipCascade-k_GWrcau.js","assets/ShipCascade-CyFnrlET.css","assets/ShipMigration-OgAGEbjm.js","assets/ShipMigration-BznCskNg.css","assets/ShipRollout-B_U2P8Yw.js","assets/ShipRollout-CqeObx5b.css","assets/ShipCourse-BQOY4MyI.js","assets/courseStore-DfafnL-9.js","assets/links--u_phi0x.js","assets/DropSelect-Bo2Oyi-2.js","assets/store-DXmC_fP2.js","assets/ShipCourse-DcT7PUSm.css","assets/ShipOnboarding-B_2IEq3N.js","assets/ShipOnboarding-BC9Vxkpa.css","assets/ShipHotspots-vLRK0w_b.js","assets/ShipHotspots-CLOMutPv.css","assets/ShipSuggestions-D9coTmgw.js","assets/ShipSuggestions-BKRvk5Mj.css","assets/ShipGate-BYYu9WVq.js","assets/ShipGate-BVZfCllb.css","assets/RippleAskController-CK4iSwT0.js","assets/json-B0N3XRZU.js","assets/verbatim-CBMzUDlf.js","assets/RippleAskController-BNAUoIW0.css"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{t as e}from"./react-BQSORdFI.js";import{t}from"./jsx-runtime-DaSxXjOY.js";import{I as n,J as r,L as i,ht as a,k as o,q as s}from"./index-C7H7A1rW.js";import{t as c}from"./useFocusTrap-DbfG6zbM.js";import{t as l}from"./FeatureUseNotice-CoK5HkbR.js";import{t as u}from"./useSpatialCanvas-D_C8VoCy.js";import{_ as d,a as f,i as p,m,r as h,t as g,v as _,y as v}from"./githubToken-DtcLYqwm.js";import{i as y,n as b,t as x}from"./cache-BumECILO.js";import{n as S,r as C}from"./colors-D49Req-e.js";import{n as w,r as ee}from"./courseStore-DfafnL-9.js";var T=e(),E=.82;function D(e,t){let n=e.find(e=>e.type===`pr`)??e[0],r=n?.id??``,i=e.filter(e=>e.id!==r),a=e=>230+(e-1)*210,o=e=>Math.max(4,Math.floor(2*Math.PI*a(e)*E/204)),s=[];n&&s.push({node:n,x:0,y:0});let c=1,l=0,u=o(c);for(let e of i){l>=u&&(c+=1,l=0,u=o(c));let t=a(c),n=l/u*Math.PI*2-Math.PI/2+c*.5;s.push({node:e,x:0+Math.cos(n)*t,y:0+Math.sin(n)*t*E}),l+=1}for(let e=0;e<240;e++){let e=!1;for(let t=0;t<s.length;t++)for(let n=t+1;n<s.length;n++){let i=s[t],a=s[n],o=a.x-i.x,c=a.y-i.y,l=204-Math.abs(o),u=112-Math.abs(c);if(!(l<=0||u<=0))if(e=!0,l<u){let e=(l/2+.5)*(o<0?-1:1);i.node.id!==r&&(i.x-=e),a.node.id!==r&&(a.x+=e)}else{let e=(u/2+.5)*(c<0?-1:1);i.node.id!==r&&(i.y-=e),a.node.id!==r&&(a.y+=e)}}if(!e)break}let d=1/0,f=1/0,p=-1/0,m=-1/0;for(let e of s)d=Math.min(d,e.x-168/2),f=Math.min(f,e.y-76/2),p=Math.max(p,e.x+168/2),m=Math.max(m,e.y+76/2);let h=80-d,g=80-f;for(let e of s)e.x+=h,e.y+=g;let _=p-d+160,v=m-f+160;return{centerId:r,nodes:s,w:_,h:v,bbox:{x:0,y:0,w:_,h:v}}}var O=t();function te({nodes:e,edges:t,altitude:n,onAsk:r,animate:i}){let[a,o]=(0,T.useState)(`severity`),[s,c]=(0,T.useState)(!1),[l,d]=(0,T.useState)(null),f=(0,T.useMemo)(()=>{let n=s?e.filter(e=>e.type===`pr`||e.crossRepo):e,r=new Set(n.map(e=>e.id));return D(n,t.filter(e=>r.has(e.from)&&r.has(e.to)))},[e,t,s]),p=(0,T.useMemo)(()=>{let e=new Map;for(let t of f.nodes)e.set(t.node.id,t);return e},[f]),m=(0,T.useMemo)(()=>{let e=new Map,t=p.get(f.centerId);if(!t)return e;let n=1;for(let e of f.nodes)n=Math.max(n,Math.hypot(e.x-t.x,e.y-t.y));for(let r of f.nodes){let i=Math.hypot(r.x-t.x,r.y-t.y);e.set(r.node.id,Math.round(i/n*460))}return e},[f,p]),h=p.get(f.centerId),g=u({clamp:{min:.7,max:2.2},margin:56}),{fitTo:_}=g;(0,T.useEffect)(()=>{_(f.bbox)},[f,_]);let[v,y]=(0,T.useState)(!1),b=(0,T.useRef)(!1),x=(0,T.useRef)(!1),w=(0,T.useRef)({x:0,y:0}),ee=(0,T.useCallback)(e=>{b.current=!0,x.current=!1,y(!0),w.current={x:e.clientX,y:e.clientY},e.currentTarget.setPointerCapture(e.pointerId)},[]),E=(0,T.useCallback)(e=>{if(!b.current)return;let t=e.clientX-w.current.x,n=e.clientY-w.current.y;Math.abs(t)+Math.abs(n)>2&&(x.current=!0),w.current={x:e.clientX,y:e.clientY},g.pan(t,n)},[g]),te=(0,T.useCallback)(e=>{b.current=!1,y(!1);try{e.currentTarget.releasePointerCapture(e.pointerId)}catch{}},[]),k=g.viewportRef,{zoomAtClient:A}=g;(0,T.useEffect)(()=>{let e=k.current;if(!e)return;let t=e=>{e.preventDefault(),A(e.deltaY<0?1.12:1/1.12,e.clientX,e.clientY)};return e.addEventListener(`wheel`,t,{passive:!1}),()=>e.removeEventListener(`wheel`,t)},[k,A]);let j=g.camera.scale>=.7,M=a===`traffic`,N=l?p.get(l)?.node??null:null,P=e.some(e=>typeof e.traffic==`number`),F=e.some(e=>e.crossRepo===!0);return(0,O.jsxs)(`div`,{className:`ripple-impact`,children:[(0,O.jsxs)(`div`,{className:`ripple-impact-controls`,children:[P&&(0,O.jsxs)(`div`,{className:`ripple-lens`,role:`group`,"aria-label":`Map lens`,children:[(0,O.jsx)(`button`,{type:`button`,"data-active":a===`severity`?`true`:void 0,onClick:()=>o(`severity`),children:`Severity`}),(0,O.jsx)(`button`,{type:`button`,"data-active":a===`traffic`?`true`:void 0,onClick:()=>o(`traffic`),children:`Traffic`})]}),F&&(0,O.jsxs)(`label`,{className:`ripple-crossrepo`,children:[(0,O.jsx)(`input`,{type:`checkbox`,checked:s,onChange:e=>c(e.target.checked)}),`Cross-repo only`]}),(0,O.jsx)(`div`,{className:`ripple-zoombtns`,children:(0,O.jsx)(`button`,{type:`button`,onClick:()=>_(f.bbox),title:`Fit the whole map`,"aria-label":`Fit`,children:`⤢`})})]}),(0,O.jsxs)(`div`,{className:`ripple-stage`+(v?` is-panning`:``),ref:g.viewportRef,onPointerDown:ee,onPointerMove:E,onPointerUp:te,onPointerCancel:te,children:[(0,O.jsxs)(`div`,{className:`ripple-world`,"data-animate":i?`true`:void 0,style:{width:f.w,height:f.h,transform:g.transform},children:[i&&h&&(0,O.jsx)(`span`,{className:`ripple-enter-pulse`,"aria-hidden":`true`,style:{left:h.x,top:h.y}}),(0,O.jsx)(`svg`,{className:`ripple-edges`,width:f.w,height:f.h,viewBox:`0 0 ${f.w} ${f.h}`,"aria-hidden":`true`,children:f.nodes.filter(e=>e.node.id!==f.centerId).map(e=>{let n=p.get(f.centerId);if(!n)return null;let r=t.find(t=>t.from===n.node.id&&t.to===e.node.id)??t.find(t=>t.to===n.node.id&&t.from===e.node.id),i=C(e.node.status),a=M?1.3+(e.node.traffic??0)*3:r?.breaking?2.4:1.6;return(0,O.jsx)(`line`,{x1:n.x,y1:n.y,x2:e.x,y2:e.y,stroke:i,strokeWidth:a,strokeLinecap:`round`,strokeDasharray:r?.breaking?`6 5`:r?.dashed?`2 6`:void 0,className:`ripple-edge`+(r?.breaking?` ripple-edge-break`:``),style:{animationDelay:`${m.get(e.node.id)??0}ms`},opacity:l&&l!==e.node.id?.25:.7},e.node.id)})}),j&&f.nodes.filter(e=>e.node.id!==f.centerId).map(e=>{let n=p.get(f.centerId);if(!n)return null;let r=t.find(t=>t.from===n.node.id&&t.to===e.node.id)??t.find(t=>t.to===n.node.id&&t.from===e.node.id);return r?(0,O.jsx)(`div`,{className:`ripple-edge-verb`,style:{left:(n.x+e.x)/2,top:(n.y+e.y)/2,color:C(e.node.status)},children:r.verb},`v-${e.node.id}`):null}),f.nodes.map(e=>{let t=e.node,n=t.id===f.centerId,r=C(t.status),i=M&&!n?1+(t.traffic??0)*.24:1;return(0,O.jsx)(`button`,{type:`button`,className:`ripple-node`,"data-center":n?`true`:void 0,"data-status":t.status,"data-open":l===t.id?`true`:void 0,style:{left:e.x-168/2,top:e.y-76/2,width:168,minHeight:76,transform:`scale(${i.toFixed(3)})`,borderColor:r,opacity:l&&l!==t.id?.55:1,animationDelay:`${m.get(t.id)??0}ms`},onClick:()=>{x.current||d(e=>e===t.id?null:t.id)},children:n?(0,O.jsxs)(O.Fragment,{children:[(0,O.jsx)(`span`,{className:`ripple-node-eyebrow`,style:{color:r},children:`THIS CHANGE`}),(0,O.jsx)(`span`,{className:`ripple-node-name ripple-node-name-lg`,children:t.label})]}):(0,O.jsxs)(O.Fragment,{children:[(0,O.jsxs)(`span`,{className:`ripple-node-top`,children:[(0,O.jsx)(`span`,{className:`ripple-node-dot`,style:{background:r},"aria-hidden":`true`}),(0,O.jsx)(`span`,{className:`ripple-node-status`,style:{color:r},children:S(t.status)}),t.severity&&(0,O.jsx)(`span`,{className:`ripple-node-sev`,style:{background:r},children:t.severity})]}),(0,O.jsx)(`span`,{className:`ripple-node-name`,children:t.label}),j&&(0,O.jsxs)(`span`,{className:`ripple-node-meta`,children:[t.team??t.owner??``,t.trafficLabel?` · ${t.trafficLabel}`:``]}),t.crossRepo&&(0,O.jsx)(`span`,{className:`ripple-node-repo`,children:`other repo`})]})},t.id)})]}),(0,O.jsx)(`div`,{className:`ripple-map-legend`,"aria-hidden":`true`,children:[`breaks`,`migration`,`untested`,`affected`,`safe`].map(e=>(0,O.jsxs)(`span`,{className:`ripple-map-legend-item`,children:[(0,O.jsx)(`span`,{className:`ripple-node-dot`,style:{background:C(e)}}),S(e).toLowerCase()]},e))})]}),N&&(0,O.jsxs)(`aside`,{className:`ripple-inspect`,"aria-label":`${N.label} detail`,children:[(0,O.jsxs)(`div`,{className:`ripple-inspect-head`,children:[(0,O.jsxs)(`div`,{className:`ripple-inspect-titles`,children:[(0,O.jsx)(`span`,{className:`ripple-node-status`,style:{color:C(N.status)},children:S(N.status)}),N.severity&&(0,O.jsxs)(`span`,{className:`ripple-inspect-sev`,style:{background:C(N.status)},children:[`would page · `,N.severity]})]}),(0,O.jsx)(`button`,{type:`button`,className:`ripple-iconbtn`,onClick:()=>d(null),"aria-label":`Close detail`,children:`✕`})]}),(0,O.jsx)(`div`,{className:`ripple-inspect-name`,children:N.label}),(0,O.jsxs)(`div`,{className:`ripple-inspect-owner`,children:[N.team?`owned by ${N.team}`:``,N.cite?(0,O.jsxs)(`span`,{className:`ripple-inspect-cite`,children:[` · `,N.cite.ref]}):null]}),N.trafficLabel&&(0,O.jsxs)(`div`,{className:`ripple-inspect-traffic`,children:[(0,O.jsx)(`strong`,{children:N.trafficLabel}),(0,O.jsx)(`span`,{children:`live traffic, from tracing — not the diff`})]}),N.contract&&(0,O.jsxs)(`div`,{className:`ripple-inspect-block`,children:[(0,O.jsx)(`div`,{className:`ripple-eyebrow`,children:`The contract`}),(0,O.jsx)(`p`,{children:N.contract})]}),N.problem&&(0,O.jsxs)(`div`,{className:`ripple-inspect-block ripple-inspect-problem`,style:{borderColor:`color-mix(in oklab, ${C(N.status)} 40%, transparent)`},children:[(0,O.jsx)(`div`,{className:`ripple-eyebrow`,style:{color:C(N.status)},children:`What happens`}),(0,O.jsx)(`p`,{children:N.problem})]}),N.altitudeNotes?.[n]&&(0,O.jsxs)(`div`,{className:`ripple-inspect-block`,children:[(0,O.jsx)(`div`,{className:`ripple-eyebrow`,children:`At your altitude`}),(0,O.jsx)(`p`,{children:N.altitudeNotes[n]})]}),N.fix&&(0,O.jsxs)(`div`,{className:`ripple-inspect-fix`,children:[(0,O.jsx)(`div`,{className:`ripple-eyebrow`,children:`Mavéa’s call`}),(0,O.jsx)(`p`,{children:N.fix})]}),r&&(0,O.jsxs)(`button`,{type:`button`,className:`ripple-ask-btn`,onClick:()=>r(N),children:[`Ask about `,N.label]})]})]})}function k(e){let t=e.lastIndexOf(`/`),n=t>0?e.slice(0,t):``;return n?n.split(`/`).slice(0,2).join(`/`):`(root)`}function A(e){let t=e.split(`/`);return t[t.length-1]||e}function j(e){let t=e.toLowerCase();return/\b(api|routes?|server|http|controllers?|handlers?)\b/.test(t)?`Routes + request handling.`:/\b(auth|identity|session|login)\b/.test(t)?`Tokens, sessions, permissions.`:/\b(db|data|models?|schema|migrations?|store)\b/.test(t)?`Schemas, queries, persistence.`:/\b(billing|payments?|charge|orders?)\b/.test(t)?`The money path.`:/\b(jobs?|workers?|queue|tasks?|cron)\b/.test(t)?`Async / background work.`:/\b(ui|components?|views?|pages?|client|web)\b/.test(t)?`The user interface.`:/\b(tests?|__tests__|spec|e2e)\b/.test(t)?`Tests.`:/\b(lib|utils?|shared|common|helpers?)\b/.test(t)?`Shared utilities.`:/\b(config|infra|deploy|ci|scripts?)\b/.test(t)?`Config + tooling.`:/\b(webhooks?|events?|integrations?|connectors?)\b/.test(t)?`Outbound events / integrations.`:``}function M(e){return e.find(e=>/\/(index|main|mod|app|server)\.[a-z]+$/i.test(e))||([...e].sort((e,t)=>e.length-t.length)[0]??e[0]??``)}function N(e,t,n=!1){let r=e.filter(e=>typeof e==`string`&&e.length>0),i=new Map;for(let e of r){let t=k(e);(i.get(t)??i.set(t,[]).get(t)).push(e)}let a=[...i.entries()].sort((e,t)=>t[1].length-e[1].length),o=a.map(([e,t],n)=>{let r=M(t),i=`${t.length} file${t.length===1?``:`s`}`,a=j(e);return{id:`m${n}`,name:e,purpose:a||i,entry:r,owner:``,health:i,explain:`${a?a+` `:``}${i} in ${e}.`+(r?` Start with ${A(r)} and follow what it imports.`:``),startHere:t.slice(0,3).map(A),depends:[],usedBy:[]}}),s=[{id:`pr`,label:t.split(`/`).pop()||t,sub:`THIS REPO`,type:`pr`,status:`affected`,scope:`in-pr`}],c=[],l=a.slice(0,9);l.forEach(([e,t],n)=>{let r=`n${n}`,i=M(t);s.push({id:r,label:e,sub:`${t.length} file${t.length===1?``:`s`}`,type:`module`,status:`affected`,scope:`in-pr`,contract:`${j(e)||`${t.length} files`}`+(i?` · start with ${A(i)}`:``)}),c.push({from:`pr`,to:r,verb:`contains`,status:`affected`})});let u=a.slice(0,4).map(([e])=>e).join(`, `);return{pr:{repo:t,title:`${r.length} file${r.length===1?``:`s`}`,files:r.length,summary:`${t} — ${r.length} file${r.length===1?``:`s`} across ${i.size} area${i.size===1?``:`s`}${u?` (${u})`:``}. Start with the busiest areas and follow what they touch.`,risks:[],readScope:`Read the repo tree: ${r.length} file${r.length===1?``:`s`}.`},nodes:s,edges:c,changes:[],cascades:[],rollout:[],workTypes:[],hotspots:[],suggestions:[],suppressedNits:0,modules:o,onboarding:{firstWeek:a.slice(0,5).map(([e,t])=>({team:e.toUpperCase(),title:e,sub:j(e)||`${t.length} files`,file:M(t)})),requestLife:[]},gate:{decision:`watch`,shipSafe:!1,unackedP0:0,requires:[],deployOrder:`unset`,conditions:[],rationale:`Exploring the repo — there’s no change to gate here.`},provenance:{source:`github`,example:!1,notes:[`Exploring ${t} — ${r.length} files grouped into ${i.size} areas.`,`This is the code as it stands, not a change. The gate and diff views don’t apply.`,...a.length>l.length?[`The map shows the ${l.length} busiest areas; the full list is in Onboarding.`]:[],...n?[`Large repo — only the first slice of files was read.`]:[]]}}}var P={tier:`slow-cheap`,enrichMaxTokens:1600,courseCount:3,coursesMaxTokens:2600,closingMaxTokens:3600,lessonMaxTokens:3600,fetchCodeContext:!1,thinkingLevel:`minimal`},F={tier:`frontier-deep`,enrichMaxTokens:2600,courseCount:5,coursesMaxTokens:3e3,closingMaxTokens:4e3,lessonMaxTokens:7e3,fetchCodeContext:!0,thinkingLevel:`low`},I={tier:`frontier-fast`,enrichMaxTokens:2600,courseCount:5,coursesMaxTokens:3e3,closingMaxTokens:4e3,lessonMaxTokens:6e3,fetchCodeContext:!0,thinkingLevel:`minimal`},L=e=>!!e&&/(localhost|127\.0\.0\.1|0\.0\.0\.0|host\.docker\.internal|:11434)/i.test(e);function ne(e){let t=e.model.toLowerCase();return L(e.baseUrl)||/:free\b/.test(t)?`slow-cheap`:/\bopus\b/.test(t)||/\bgpt-5(?!.*mini)/.test(t)||/(^|[^a-z])o[1-9](-|\b)/.test(t)||/gemini-[0-9.]*-?pro/.test(t)||/\bsonnet\b/.test(t)&&!/haiku/.test(t)?`frontier-deep`:`frontier-fast`}function re(e){switch(ne(e)){case`slow-cheap`:return P;case`frontier-deep`:return F;default:return I}}var ie=/^[A-Za-z0-9._-]+$/,R=e=>({kind:`invalid`,reason:e});function ae(e,t){let n=e.trim().replace(/^git@github\.com:/i,`github.com/`);if(!n)return R(`Paste a GitHub PR, compare, or repo URL — or owner/repo#123.`);let r=n.replace(/^https?:\/\//i,``).replace(/^www\./i,``),i=/^github\.com\/(.+)$/i.exec(r),a=/^[A-Za-z0-9._-]+\/[A-Za-z0-9._-]+\/(?:pull|pulls|compare|tree|blob)\b/i.test(n),o=i?i[1]:a?n:null;if(o){let e=o.split(`#`)[0].split(`?`)[0].replace(/\/+$/,``).split(`/`),t=e[0]??``,n=(e[1]??``).replace(/\.git$/,``);if(!t||!n||!ie.test(t)||!ie.test(n))return R(`That GitHub URL is missing an owner/repo.`);let r=`${t}/${n}`,i=e[2],a=e.slice(3);if(!i)return{kind:`repo`,repo:r};if(i===`pull`||i===`pulls`){let e=(a[0]??``).replace(/\D.*$/,``);return e?{kind:`pr`,repo:r,prNumber:e}:R(`That pull-request URL has no number.`)}if(i===`compare`){let e=decodeURIComponent(a.join(`/`)),t=/^(.+?)\.{2,3}(.+)$/.exec(e);return t?{kind:`compare`,repo:r,base:t[1],head:t[2]}:R(`A compare URL looks like base...head.`)}if(i===`tree`||i===`blob`){let e=a[0],t=a.slice(1).join(`/`);return i===`blob`&&t&&(t=t.replace(/\/?[^/]*$/,``)),{kind:`tree`,repo:r,ref:e||void 0,path:t||void 0}}return{kind:`repo`,repo:r}}let s=/^([A-Za-z0-9._-]+)\/([A-Za-z0-9._-]+?)(?:\.git)?#(\d+)$/.exec(n);if(s)return{kind:`pr`,repo:`${s[1]}/${s[2]}`,prNumber:s[3]};let c=/^([A-Za-z0-9._-]+)\/([A-Za-z0-9._-]+?)(?:\.git)?\/?$/.exec(n);if(c)return{kind:`repo`,repo:`${c[1]}/${c[2]}`};let l=/^#?(\d+)$/.exec(n);return l?t?{kind:`pr`,repo:t,prNumber:l[1]}:R(`Enter owner/repo#number, or connect a default repo first.`):R(`Paste a GitHub PR, compare, or repo URL — or owner/repo#123.`)}var oe=`mavea.ripple.tracked.v1`,se=20;function z(){try{let e=localStorage.getItem(oe);if(!e)return[];let t=JSON.parse(e);return Array.isArray(t)?t.filter(e=>e&&e.id&&e.model):[]}catch{return[]}}function B(e){try{localStorage.setItem(oe,JSON.stringify(e.slice(0,se)))}catch{}}function ce(){return z().sort((e,t)=>t.savedAt-e.savedAt)}function le(e,t=Date.now()){let n=e.pr.repo||e.pr.title||`change`,r={id:`${n}::${t}`,label:n,savedAt:t,source:e.provenance.source,model:e};return B([r,...z().filter(e=>e.label!==n)]),r}function ue(e){B(z().filter(t=>t.id!==e))}var V=a();function de(e){return(/^(.*?[.!?])(\s|$)/.exec(e.trim())?.[1]??e).trim()}function fe(e){let t=(0,V.c)(65),{model:n,altitude:r,onNavigate:i,onAsk:a}=e,{pr:o,gate:s}=n,c=n.changes.length===0,l;t[0]!==c||t[1]!==s?(l=c?{label:`Explore`,tone:`neutral`}:s.decision===`pass`?{label:`Clear to ship`,tone:`safe`}:s.decision===`block`?{label:`Hold`,tone:`breaks`}:{label:`Review first`,tone:`watch`},t[0]=c,t[1]=s,t[2]=l):l=t[2];let u=l,d=c?`${Math.max(0,n.nodes.length-1)} areas · ${o.files??0} files`:`+${o.added??0} −${o.removed??0} · ${o.files??n.changes.length} file${(o.files??n.changes.length)===1?``:`s`}`,f;t[3]===o.summary?f=t[4]:(f=de(o.summary),t[3]=o.summary,t[4]=f);let p=f,m=o.risks[0]?.text,h;t[5]!==n.courses||t[6]!==n.modules?(h=n.courses?.length||n.modules.length?[{id:`onboarding`,label:n.courses?.length?`Onboard · ${n.courses.length} course${n.courses.length===1?``:`s`}`:`Onboarding`}]:[],t[5]=n.courses,t[6]=n.modules,t[7]=h):h=t[7];let g;t[8]===n.changes.length?g=t[9]:(g=n.changes.length?[{id:`workspace`,label:`${n.changes.length} change${n.changes.length===1?``:`s`}`}]:[],t[8]=n.changes.length,t[9]=g);let _;t[10]===n.cascades.length?_=t[11]:(_=n.cascades.length?[{id:`cascade`,label:`The cascade`}]:[],t[10]=n.cascades.length,t[11]=_);let v;t[12]===n.migration?v=t[13]:(v=n.migration?[{id:`migration`,label:`The migration`}]:[],t[12]=n.migration,t[13]=v);let y;t[14]===n.rollout.length?y=t[15]:(y=n.rollout.length?[{id:`rollout`,label:`Safe rollout`}]:[],t[14]=n.rollout.length,t[15]=y);let b;t[16]===n.suggestions.length?b=t[17]:(b=n.suggestions.length?[{id:`suggestions`,label:`${n.suggestions.length} suggestion${n.suggestions.length===1?``:`s`}`}]:[],t[16]=n.suggestions.length,t[17]=b);let x;t[18]===n.hotspots.length?x=t[19]:(x=n.hotspots.length?[{id:`hotspots`,label:`The story`}]:[],t[18]=n.hotspots.length,t[19]=x);let S;t[20]===n.incident?S=t[21]:(S=n.incident?[{id:`incident`,label:`Incident`}]:[],t[20]=n.incident,t[21]=S);let C;t[22]===Symbol.for(`react.memo_cache_sentinel`)?(C={id:`read`,label:`Full read`},t[22]=C):C=t[22];let w;t[23]===c?w=t[24]:(w=c?[]:[{id:`gate`,label:`The gate`}],t[23]=c,t[24]=w);let ee;t[25]!==S||t[26]!==w||t[27]!==h||t[28]!==g||t[29]!==_||t[30]!==v||t[31]!==y||t[32]!==b||t[33]!==x?(ee=[...h,...g,..._,...v,...y,...b,...x,...S,C,...w],t[25]=S,t[26]=w,t[27]=h,t[28]=g,t[29]=_,t[30]=v,t[31]=y,t[32]=b,t[33]=x,t[34]=ee):ee=t[34];let T=ee,E;t[35]===u.label?E=t[36]:(E=(0,O.jsx)(`span`,{className:`ripple-verdict-badge`,children:u.label}),t[35]=u.label,t[36]=E);let D;t[37]===d?D=t[38]:(D=(0,O.jsx)(`span`,{className:`ripple-verdict-scale`,children:d}),t[37]=d,t[38]=D);let k;t[39]!==E||t[40]!==D?(k=(0,O.jsxs)(`div`,{className:`ripple-verdict-top`,children:[E,D]}),t[39]=E,t[40]=D,t[41]=k):k=t[41];let A;t[42]===p?A=t[43]:(A=(0,O.jsx)(`p`,{className:`ripple-verdict-what`,children:p}),t[42]=p,t[43]=A);let j;t[44]!==c||t[45]!==m?(j=m?(0,O.jsxs)(`div`,{className:`ripple-verdict-one`,children:[(0,O.jsx)(`span`,{className:`ripple-verdict-one-tag`,children:c?`Where to start`:`The one thing to check`}),(0,O.jsx)(`span`,{className:`ripple-verdict-one-text`,children:m})]}):!c&&(0,O.jsxs)(`div`,{className:`ripple-verdict-one ripple-verdict-clean`,children:[(0,O.jsx)(`span`,{className:`ripple-verdict-one-tag`,children:`Reads clean`}),(0,O.jsx)(`span`,{className:`ripple-verdict-one-text`,children:`Nothing risky pulled to the top — review and ship.`})]}),t[44]=c,t[45]=m,t[46]=j):j=t[46];let M;t[47]!==k||t[48]!==A||t[49]!==j||t[50]!==u.tone?(M=(0,O.jsxs)(`div`,{className:`ripple-verdict-head`,"data-tone":u.tone,children:[k,A,j]}),t[47]=k,t[48]=A,t[49]=j,t[50]=u.tone,t[51]=M):M=t[51];let N;t[52]!==r||t[53]!==n.edges||t[54]!==n.nodes||t[55]!==a?(N=(0,O.jsx)(`div`,{className:`ripple-verdict-map`,children:(0,O.jsx)(te,{nodes:n.nodes,edges:n.edges,altitude:r,onAsk:a,animate:!0})}),t[52]=r,t[53]=n.edges,t[54]=n.nodes,t[55]=a,t[56]=N):N=t[56];let P;t[57]===Symbol.for(`react.memo_cache_sentinel`)?(P=(0,O.jsx)(`span`,{className:`ripple-verdict-chips-tag`,children:`Go deeper`}),t[57]=P):P=t[57];let F;t[58]!==T||t[59]!==i?(F=(0,O.jsxs)(`div`,{className:`ripple-verdict-chips`,"aria-label":`Go deeper`,children:[P,T.map(e=>(0,O.jsx)(`button`,{type:`button`,className:`ripple-verdict-chip`,onClick:()=>i(e.id),children:e.label},e.id))]}),t[58]=T,t[59]=i,t[60]=F):F=t[60];let I;return t[61]!==M||t[62]!==N||t[63]!==F?(I=(0,O.jsxs)(`div`,{className:`ripple-verdict`,children:[M,N,F]}),t[61]=M,t[62]=N,t[63]=F,t[64]=I):I=t[64],I}r();var pe,H=()=>(pe??=s(()=>import(`./generate-8odaTyr4.js`),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9])),pe),me=(...e)=>H().then(t=>t.enrichShipModel(...e)),he=(...e)=>H().then(t=>t.enrichIncident(...e)),ge=(...e)=>H().then(t=>t.enrichOrientation(...e)),_e=(...e)=>H().then(t=>t.enrichCourses(...e)),ve=(...e)=>H().then(t=>t.enrichCourseClosing(...e)),ye=(...e)=>H().then(t=>t.enrichLesson(...e)),be=(...e)=>H().then(t=>t.gatherLessonCode(...e)),xe,U=()=>(xe??=s(()=>import(`./githubBrowser-DywfDeYx.js`).then(e=>e.i),__vite__mapDeps([8,2,3,6,7])),xe),Se=(...e)=>U().then(t=>t.fetchPrDiff(...e)),Ce=(...e)=>U().then(t=>t.compareRefs(...e)),we=(...e)=>U().then(t=>t.fetchRepoTree(...e)),Te,Ee=(...e)=>(Te??=s(()=>import(`./owners-FXDGInVq.js`),__vite__mapDeps([10,8,2,3,6,7])),Te.then(t=>t.resolveOwners(...e))),De,Oe=(...e)=>(De??=s(()=>import(`./codeContext-0UMRSGRr.js`),__vite__mapDeps([11,8,2,3,6,7])),De.then(t=>t.gatherCodeContext(...e))),ke=e=>e?/^([\w.-]+\/[\w.-]+)/.exec(e.trim())?.[1]:void 0,Ae=n(()=>s(()=>import(`./ShipRead--gGqg2SE.js`).then(e=>({default:e.ShipRead})),__vite__mapDeps([12,13,2,14,15,16,17]))),je=n(()=>s(()=>import(`./ShipIncident-BWxerYtX.js`).then(e=>({default:e.ShipIncident})),__vite__mapDeps([18,13,2,14,15,16,17,19]))),Me=n(()=>s(()=>import(`./ShipWorkspace-BmdcHZXa.js`).then(e=>({default:e.ShipWorkspace})),__vite__mapDeps([20,13,2,14,15,16,17,21,22]))),Ne=n(()=>s(()=>import(`./ShipCascade-k_GWrcau.js`).then(e=>({default:e.ShipCascade})),__vite__mapDeps([23,13,2,14,15,16,17,21,24]))),Pe=n(()=>s(()=>import(`./ShipMigration-OgAGEbjm.js`).then(e=>({default:e.ShipMigration})),__vite__mapDeps([25,13,2,14,15,16,17,26]))),Fe=n(()=>s(()=>import(`./ShipRollout-B_U2P8Yw.js`).then(e=>({default:e.ShipRollout})),__vite__mapDeps([27,13,2,14,15,16,17,28]))),Ie=n(()=>s(()=>import(`./ShipCourse-BQOY4MyI.js`).then(e=>({default:e.ShipCourse})),__vite__mapDeps([29,13,2,14,15,16,17,30,6,7,31,32,33,34]))),Le=n(()=>s(()=>import(`./ShipOnboarding-B_2IEq3N.js`).then(e=>({default:e.ShipOnboarding})),__vite__mapDeps([35,13,2,14,15,16,17,36]))),Re=n(()=>s(()=>import(`./ShipHotspots-vLRK0w_b.js`).then(e=>({default:e.ShipHotspots})),__vite__mapDeps([37,13,2,14,15,16,17,38]))),W=n(()=>s(()=>import(`./ShipSuggestions-D9coTmgw.js`).then(e=>({default:e.ShipSuggestions})),__vite__mapDeps([39,13,2,14,15,16,17,40]))),G=n(()=>s(()=>import(`./ShipGate-BYYu9WVq.js`).then(e=>({default:e.ShipGate})),__vite__mapDeps([41,14,2,15,42]))),ze=n(()=>s(()=>import(`./RippleAskController-CK4iSwT0.js`).then(e=>({default:e.RippleAskController})),__vite__mapDeps([43,13,2,14,15,16,17,1,3,4,44,45,8,6,7,31,46]))),Be=ze.Component,Ve=Ae.Component,He=je.Component,Ue=Me.Component,We=Ne.Component,Ge=Pe.Component,Ke=Fe.Component,qe=Ie.Component,Je=Le.Component,Ye=Re.Component,Xe=W.Component,Ze=G.Component,Qe=(e,t)=>`${e}::${t}`;function $e(e){try{return localStorage.getItem(e)}catch{return null}}function et(e,t){try{localStorage.setItem(e,t)}catch{}}var tt=[{id:`newgrad`,label:`New grad`},{id:`working`,label:`Working`},{id:`principal`,label:`Principal`}],nt=new Set([`anthropic`,`openai`,`gemini`,`grok`,`openrouter`]);function rt(e){return{read:Ae.preload,incident:je.preload,workspace:Me.preload,cascade:Ne.preload,migration:Pe.preload,rollout:Fe.preload,course:Ie.preload,onboarding:Le.preload,hotspots:Re.preload,suggestions:W.preload,gate:G.preload}[e]?.()??Promise.resolve()}var it={understand:`Understand`,ship:`Ship the change`},at=e=>e===`course`?`courses`:e===`onboarding`?`orientation`:`verdict`,ot=[{id:`verdict`,label:`Overview`,intent:`The verdict, the one thing to check, and the change rippling out.`,jobs:[`ship`],applies:e=>e.changes.length>0},{id:`read`,label:`Mavéa’s read`,intent:`The whole change in two sentences, risks pulled to the top.`,jobs:[`ship`,`understand`],applies:e=>!!e.pr.summary||e.changes.length>0},{id:`course`,label:`Courses`,intent:`A leveled curriculum built from THIS code — beginner → expert, with checkpoints.`,jobs:[`understand`],applies:(e,t)=>!!e.courses?.length||t.courses===`enriching`||t.hasRepo},{id:`onboarding`,label:`Map & request life`,intent:`The modules, who owns what, and a request’s life through the code.`,jobs:[`understand`],applies:(e,t)=>e.modules.length>0||t.hasRepo},{id:`incident`,label:`Incident`,intent:`A live alert, traced back to its likely cause — the rollback and who to wake.`,jobs:[`ship`,`understand`],applies:e=>!!e.incident},{id:`workspace`,label:`Workspace`,intent:`Pick a change — its diff, intent, and cause & effect assemble.`,jobs:[`ship`],applies:e=>e.changes.length>0},{id:`impact`,label:`Impact map`,intent:`Everything this change touches, and what those changes hit downstream.`,jobs:[`ship`,`understand`],applies:e=>e.nodes.length>0},{id:`cascade`,label:`The cascade`,intent:`How one line becomes a P0 — hop by hop, before anyone gets paged.`,jobs:[`ship`],applies:e=>e.cascades.length>0},{id:`migration`,label:`The migration`,intent:`The cost of a schema change isn’t in the SQL — it’s in the table size.`,jobs:[`ship`],applies:e=>!!e.migration},{id:`rollout`,label:`Safe rollout`,intent:`One safe order — so you ship with your eyes open.`,jobs:[`ship`],applies:e=>e.rollout.length>0},{id:`hotspots`,label:`The story`,intent:`Why a line exists, what it broke, and who to ask.`,jobs:[`understand`],applies:e=>e.hotspots.length>0},{id:`suggestions`,label:`Suggestions`,intent:`The “did you think about X?” a staff engineer would raise — grounded, and rare.`,jobs:[`ship`],applies:e=>e.suggestions.length>0},{id:`gate`,label:`The gate`,intent:`A picture for you, a pre-merge check for the agents.`,jobs:[`ship`],applies:e=>e.changes.length>0}];function st({model:e,cfg:t,speak:n,showcase:r,onClose:a}){let[s,u]=(0,T.useState)(!1),[S,C]=(0,T.useState)(!1),[E,D]=(0,T.useState)(`verdict`),[k,A]=(0,T.useState)(`working`),[j,M]=(0,T.useState)(e),P=(0,T.useRef)(e),[F,I]=(0,T.useState)({verdict:`floor`,orientation:`floor`,courses:`floor`}),L=(0,T.useRef)(0),ne=(0,T.useRef)(null),ie=(0,T.useRef)(null),R=(0,T.useRef)(null),oe=(0,T.useRef)(null),se=(0,T.useRef)(!1),z=(0,T.useRef)(!1),B=(0,T.useRef)(void 0),V=(0,T.useRef)(void 0),de=(0,T.useRef)(void 0),pe=(0,T.useRef)(null),[H,xe]=(0,T.useState)(!1),[U,Te]=(0,T.useState)(!1),[De,Ae]=(0,T.useState)(0),[je,Me]=(0,T.useState)(null),Ne=(0,T.useRef)([]),Pe=(0,T.useRef)(new Map),Fe=(0,T.useRef)(new Map),Ie=(0,T.useCallback)(e=>{Me(t=>({text:e,nonce:(t?.nonce??0)+1})),Te(!0)},[]),Le=(0,T.useMemo)(()=>t?{model:j,cfg:t,altitude:k,diffText:pe.current?.text,repo:B.current,gitRef:V.current,treePaths:Ne.current,lessonDetails:Fe.current,fileCache:Pe.current}:null,[t,j,k]),Re=(0,T.useCallback)(()=>{Ae(e=>e+1),Ne.current=[],Pe.current.clear(),Fe.current.clear()},[]),W=(0,T.useCallback)(()=>{ne.current?.abort(),ie.current?.abort(),R.current?.abort(),oe.current?.abort()},[]);(0,T.useEffect)(()=>W,[W]);let G=(0,T.useRef)(0);(0,T.useEffect)(()=>{M(e),P.current=e,B.current=void 0,se.current=!0,z.current=!0,I({verdict:`done`,orientation:e.modules.length?`done`:`floor`,courses:e.courses?.length?`done`:`floor`})},[e]);let st=(0,T.useRef)(!1);(0,T.useEffect)(()=>{st.current||(st.current=!0,!(!e.provenance.example||r)&&($e(`ripple.seenWorkedExample`)===`1`?(Nt(`github`),Y(!0)):et(`ripple.seenWorkedExample`,`1`)))},[e.provenance.example,r]);let K=(0,T.useMemo)(()=>t&&nt.has(t.provider)?t:{provider:`gemini`,model:`gemini-3.5-flash`,apiKey:``},[t]),q=(0,T.useMemo)(()=>re(K),[K]),[ct,lt]=(0,T.useState)(()=>$e(`ripple.hint.fastModel.dismissed`)===`1`),[ut,dt]=(0,T.useState)(!1),ft=(0,T.useCallback)(()=>{lt(!0),et(`ripple.hint.fastModel.dismissed`,`1`)},[]),pt=(0,T.useCallback)((e,t,n)=>{let r=++L.current;ne.current?.abort();let i=new AbortController;ne.current=i,xe(!1),I(e=>({...e,verdict:`enriching`})),(async()=>{let a=n&&q.fetchCodeContext?await Oe(e,n,void 0,i.signal).catch(()=>``):``;if(i.signal.aborted||L.current!==r)return;let o=await me(e,t,K,{signal:i.signal,codeContext:a||void 0,maxTokens:q.enrichMaxTokens,thinkingLevel:q.thinkingLevel,onPartial:t=>{L.current===r&&M(m(e,t,K.model))}});L.current===r&&(o?(M(o),P.current=o,I(e=>({...e,verdict:`done`}))):(M(e),P.current=e,I(e=>({...e,verdict:`error`}))))})()},[K,q]),mt=(0,T.useCallback)((e,t,n)=>{let r=v(_(e),t);return r.changes.length===0?0:(G.current++,W(),P.current=r,B.current=n,V.current=r.pr.branch||void 0,de.current=void 0,pe.current={text:e,repo:n},se.current=!1,z.current=!1,Re(),M(r),D(`verdict`),dt(!0),I({verdict:`enriching`,orientation:`floor`,courses:`floor`}),pt(r,e,n),r.changes.length)},[W,pt,Re]),ht=(0,T.useCallback)(()=>{let e=pe.current;e&&pt(P.current,e.text,e.repo)},[pt]),gt=(0,T.useCallback)(e=>{let t=P.current;return t.modules.length?t.modules:N(t.changes.map(e=>e.file),e,!1).modules},[]),_t=(0,T.useCallback)((e=!1)=>{let t=B.current;if(!t||se.current&&!e)return;se.current=!0;let n=L.current;ie.current?.abort();let r=new AbortController;ie.current=r,I(e=>({...e,orientation:`enriching`})),(async()=>{let e=await ge({...P.current,modules:gt(t)},t,V.current,K,{signal:r.signal,maxTokens:q.enrichMaxTokens,thinkingLevel:q.thinkingLevel}).catch(()=>null);if(r.signal.aborted||L.current!==n)return;let i=e?await Ee(e,t,V.current,r.signal).catch(()=>e):{...P.current,modules:gt(t)};r.signal.aborted||L.current!==n||(M(e=>({...e,modules:i.modules,nodes:i.nodes,onboarding:i.onboarding})),I(t=>({...t,orientation:e?`done`:`error`})))})()},[K,q,gt]),J=(0,T.useCallback)((e=!1,t)=>{let n=B.current;if(!n||z.current&&!e)return;z.current=!0;let r=L.current;R.current?.abort();let i=new AbortController;R.current=i;let a=setTimeout(()=>i.abort(),9e4);I(e=>({...e,courses:`enriching`})),(async()=>{let o=y(`courses|${n}|${V.current??``}|${t??``}`,K.model),s=e?null:await x(o);if(i.signal.aborted||L.current!==r)return;let c={...P.current,modules:gt(n)},l=s?.courses??await _e(c,n,V.current,K,{signal:i.signal,count:q.courseCount,maxTokens:q.coursesMaxTokens,thinkingLevel:q.thinkingLevel,focus:t}).catch(()=>void 0);if(clearTimeout(a),!(i.signal.aborted||L.current!==r))if(l?.length){M(e=>({...e,courses:l})),I(e=>({...e,courses:`done`}));let e=s?s.commitSha:de.current;s||b(o,{courses:l,commitSha:de.current}),ee(n,{commitSha:e??``,ref:V.current??``,model:K.model,builtAt:Date.now(),courseTitles:l.map(e=>e.title)})}else I(e=>({...e,courses:`error`}))})()},[K,q,gt]),vt=(0,T.useCallback)(()=>J(!0),[J]),[yt,bt]=(0,T.useState)(void 0),xt=(0,T.useCallback)(e=>{bt(e),z.current=!1,J(!0,e)},[J]),St=(0,T.useCallback)((e,t)=>{let n=B.current;return n?Ce(e,t,n):Promise.resolve({ok:!1,detail:`No connected repo.`})},[]),Ct=(0,T.useCallback)(async(e,t,n=!1,r)=>{let i=B.current;if(!i)return null;let{codeContext:a,contentHash:o}=await be(t,V.current,i),s=y(`lesson|${i}|${e.title}|${t.title}|${r??`working`}|${o}`,K.model);if(!n){let n=await x(s);if(n)return Fe.current.set(Qe(e.title,t.title),n),n}let c=await ye(e,t,a,K,{maxTokens:q.lessonMaxTokens,thinkingLevel:q.thinkingLevel,altitude:r}).catch(()=>null);return c&&(b(s,c),Fe.current.set(Qe(e.title,t.title),c)),c},[K,q]),wt=(0,T.useCallback)(async(e,t=!1)=>{let n=B.current;if(!n)return;let r=y(`closing|${n}|${e.title}|${V.current??``}`,K.model);if(!t){let e=await x(r);if(e)return e}let i=new AbortController,a=setTimeout(()=>i.abort(),9e4),o=await ve(e,K,{signal:i.signal,maxTokens:q.closingMaxTokens,thinkingLevel:q.thinkingLevel}).catch(()=>void 0).finally(()=>clearTimeout(a));return o&&b(r,o),o},[K,q]),Tt=(0,T.useCallback)(e=>{D(e);let t=at(e);t===`courses`?J():t===`orientation`&&_t()},[J,_t]),[Et,Y]=(0,T.useState)(!1),[Dt,Ot]=(0,T.useState)(``),[kt,At]=(0,T.useState)(``),jt=(0,T.useCallback)(()=>{let e=Dt.trim();if(!d(e)){At("That doesn’t look like a unified diff — paste the output of `git diff` (or a .diff / .patch file).");return}if(mt(e)===0){At(`No changed files found in that diff.`);return}Y(!1),Ot(``),At(``)},[Dt,mt]),[Mt,Nt]=(0,T.useState)(`github`),[Pt,Ft]=(0,T.useState)(()=>ce()),[It,Lt]=(0,T.useState)(!1),Rt=(0,T.useRef)(void 0),zt=(0,T.useCallback)(()=>{le(j),Lt(!0),window.clearTimeout(Rt.current),Rt.current=window.setTimeout(()=>Lt(!1),1600)},[j]);(0,T.useEffect)(()=>()=>window.clearTimeout(Rt.current),[]);let Bt=(0,T.useCallback)(e=>{Ft(ce()),Nt(e),qt(``),Z(``),ln(``),dn(h()),Y(!0)},[]),[Vt,Ht]=(0,T.useState)(``),[Ut,Wt]=(0,T.useState)(``),Gt=(0,T.useCallback)(()=>{let e=Vt.trim();if(!e){Wt(`Paste the alert, error, or log line that fired.`);return}G.current++;let t=f(e,j.changes.length>0&&!j.provenance.example?j:void 0);if(M(t),D(`incident`),Y(!1),Ht(``),Wt(``),K){oe.current?.abort();let n=new AbortController;oe.current=n,he(t,e,K,n.signal).then(e=>M(n=>n.incident===t.incident?e:n))}},[Vt,j,K]),[Kt,qt]=(0,T.useState)(``),[X,Jt]=(0,T.useState)(``),[Yt,Xt]=(0,T.useState)(``),[Zt,Qt]=(0,T.useState)(``),[$t,en]=(0,T.useState)(``),[tn,nn]=(0,T.useState)(``),[rn,an]=(0,T.useState)(``),[on,Z]=(0,T.useState)(``),[Q,sn]=(0,T.useState)(!1),[cn,ln]=(0,T.useState)(``),[un,dn]=(0,T.useState)(!1),fn=(0,T.useRef)(null);(0,T.useEffect)(()=>()=>fn.current?.abort(),[]);let pn=(0,T.useCallback)(async e=>{let t=G.current;fn.current?.abort();let n=new AbortController;fn.current=n,sn(!0),Z(``);let r=await e(n.signal);if(!(n.signal.aborted||t!==G.current)){if(sn(!1),!r.ok||!r.diff){Z(r.detail);return}if(mt(r.diff,r.label,ke(r.label))===0){Z(`That diff had no changed files to analyze.`);return}Y(!1)}},[mt]),mn=(0,T.useCallback)(()=>{let e=Yt.trim();if(!e){Z(`Enter a pull-request number.`);return}pn(t=>Se(e,X.trim()||void 0,t))},[Yt,X,pn]),hn=(0,T.useCallback)(()=>{let e=Zt.trim(),t=$t.trim();if(!e||!t){Z(`Enter a base and a head ref to compare.`);return}pn(n=>Ce(e,t,X.trim()||void 0,n))},[Zt,$t,X,pn]),gn=(0,T.useCallback)(()=>{let e=cn.trim();e&&p(e).then(e=>{dn(e),ln(``),e&&Z(``)})},[cn]),_n=(0,T.useCallback)(()=>{g().then(()=>{dn(!1),ln(``)})},[]),vn=(0,T.useCallback)(async(e,t,n)=>{let r=(e??X).trim()||void 0,i=(t??tn).trim()||void 0,a=(n??rn).trim(),o=G.current;fn.current?.abort();let s=new AbortController;fn.current=s,sn(!0),Z(``);let c=await we(i,r,s.signal);if(s.signal.aborted||o!==G.current)return;if(sn(!1),!c.ok||!c.paths){Z(c.detail);return}let l=a.replace(/^\/+|\/+$/g,``),u=l?c.paths.filter(e=>e===l||e.startsWith(l+`/`)):c.paths;if(u.length===0){Z(`No files under “${l}”.`);return}let d=N(u,l?`${c.label??`repo`}/${l}`:c.label??`repo`,c.truncated),f=ke(c.label),p=i,m=f?!!w(f):!1;G.current++,W(),++L.current,P.current=d,B.current=f,V.current=p,de.current=c.sha,pe.current=null,se.current=!1,z.current=!1,Re(),Ne.current=u,M(d),D(m?`course`:`onboarding`),dt(!0),Y(!1),I({verdict:`done`,orientation:`floor`,courses:`floor`}),f&&(_t(),m&&J())},[tn,X,rn,W,_t,J,Re]),yn=(0,T.useCallback)(()=>{let e=ae(Kt,X.trim()||void 0);if(e.kind===`invalid`){Z(e.reason);return}if(Z(``),e.kind===`pr`)pn(t=>Se(e.prNumber,e.repo,t));else if(e.kind===`compare`)pn(t=>Ce(e.base,e.head,e.repo,t));else{let t=e.kind===`tree`?e.ref:void 0,n=e.kind===`tree`?e.path:void 0;vn(e.repo,t,n)}},[Kt,X,pn,vn]),bn=j.changes.length>0?`ship`:`understand`,xn=(0,T.useMemo)(()=>{let e={orientation:F.orientation,courses:F.courses,hasRepo:!!B.current},t=ot.filter(t=>t.applies(j,e)),n=bn===`ship`?`understand`:`ship`,r=t.filter(e=>e.jobs.includes(bn)),i=t.filter(e=>!e.jobs.includes(bn)&&e.jobs.includes(n));return[{job:bn,items:r},{job:n,items:i}].filter(e=>e.items.length>0)},[j,F.orientation,F.courses,bn]),Sn=(0,T.useMemo)(()=>xn.flatMap(e=>e.items),[xn]);(0,T.useEffect)(()=>{Sn.length&&!Sn.some(e=>e.id===E)&&D(Sn[0].id)},[Sn,E]);let Cn=(0,T.useCallback)(e=>{S&&n&&n(`${e.label}. ${e.problem??e.contract??``} ${e.fix??``}`.trim()),Ie(`Explain ${e.label}${e.contract?` — ${e.contract}`:``}`)},[S,n,Ie]),wn=(0,T.useCallback)(e=>{let t=j;switch(e){case`verdict`:return t.pr.summary;case`read`:return t.pr.summary;case`incident`:return t.incident?`${t.incident.symptom}. ${t.incident.rootCause}`:``;case`workspace`:return`Here are all ${t.changes.length} changes, grouped by subsystem. Pick one to see its diff and what it touches.`;case`impact`:{let e=t.nodes.filter(e=>e.status===`breaks`).length;return e?`Everything this change touches. ${e} of these break — the coral lines are where.`:`Everything this change touches. Nothing breaks downstream.`}case`cascade`:{let e=t.cascades[0];return e?`Watch how one line becomes a ${e.incidentSeverity}: ${e.trigger}, and ${e.incident}.`:``}case`migration`:return t.migration?`The migration looks harmless, but on ${t.migration.rows} rows it costs ${t.migration.lockCost}.`:``;case`rollout`:return`Ship in this order and the change never breaks a caller mid-rollout.`;case`course`:return t.courses?.length?`A guided curriculum — ${t.courses.length} ${t.courses.length===1?`course`:`courses`} that take you from oriented to fearless, built from this code.`:`A leveled course, built from this code, so you can change it without fear.`;case`onboarding`:return`Understand the whole service — module by module, and a request's life through it.`;case`hotspots`:return`The story behind the lines worth knowing before you touch them.`;case`suggestions`:return`${t.suggestions.length} things worth your time. ${t.suppressedNits} shallow nits suppressed.`;case`gate`:return t.gate.rationale;default:return``}},[j]);(0,T.useEffect)(()=>{let e=e=>{e.key===`Escape`&&a()};return window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)},[a]);let Tn=(0,T.useRef)(null);c(Tn);let $=j.pr,En=j.provenance.example,Dn=(0,T.useCallback)(()=>{switch(E){case`verdict`:return(0,O.jsx)(fe,{model:j,altitude:k,onNavigate:e=>Tt(e),onAsk:Cn});case`read`:return(0,O.jsx)(Ve,{model:j,altitude:k});case`incident`:return(0,O.jsx)(He,{model:j,altitude:k});case`impact`:return(0,O.jsx)(te,{nodes:j.nodes,edges:j.edges,altitude:k,onAsk:Cn});case`workspace`:return(0,O.jsx)(Ue,{model:j,altitude:k});case`cascade`:return(0,O.jsx)(We,{model:j});case`migration`:return(0,O.jsx)(Ge,{model:j,altitude:k});case`rollout`:return(0,O.jsx)(Ke,{model:j,altitude:k});case`course`:return(0,O.jsx)(qe,{model:j,altitude:k,building:F.courses===`enriching`,onRegenerate:B.current?vt:void 0,loadLessonDetail:B.current?Ct:void 0,loadCourseClosing:B.current?wt:void 0,courseFocus:yt,onCourseFocus:B.current?xt:void 0,speak:S?n:void 0,commitSha:B.current?de.current:void 0,compareSinceBuilt:B.current?St:void 0,openFullAnalysis:B.current?mt:void 0,onAskAboutLesson:Ie});case`onboarding`:return(0,O.jsx)(Je,{model:j,altitude:k});case`hotspots`:return(0,O.jsx)(Ye,{model:j,altitude:k});case`suggestions`:return(0,O.jsx)(Xe,{model:j,altitude:k});case`gate`:return(0,O.jsx)(Ze,{model:j,altitude:k});default:throw Error(`Ripple: no section renderer for "${E}"`)}},[E,j,k,Cn,Tt,F.courses,vt,Ct,wt,yt,xt,St,mt,S,n,Ie]);return(0,O.jsx)(`div`,{className:`ripple-scrim`,"data-expanded":s?`true`:void 0,onClick:a,role:`button`,tabIndex:0,"aria-label":`Close Ripple`,onKeyDown:e=>{e.key!==`Enter`&&e.key!==` `||(e.preventDefault(),a())},children:(0,O.jsxs)(`section`,{className:`ripple-panel`,role:`dialog`,"aria-label":`Ripple`,ref:Tn,onClick:e=>e.stopPropagation(),children:[(0,O.jsxs)(`header`,{className:`ripple-head`,children:[(0,O.jsxs)(`div`,{className:`ripple-id`,children:[(0,O.jsx)(`span`,{className:`ripple-word`,children:`Ripple`}),(0,O.jsx)(`span`,{className:`ripple-sep`,"aria-hidden":`true`}),(0,O.jsx)(`span`,{className:`ripple-repo`,children:$.repo}),$.number&&(0,O.jsx)(`span`,{className:`ripple-pr`,children:$.number}),$.branch&&(0,O.jsxs)(`span`,{className:`ripple-branch`,children:[$.branch,$.base?` → ${$.base}`:``]})]}),(0,O.jsxs)(`div`,{className:`ripple-head-right`,children:[($.added!=null||$.removed!=null)&&(0,O.jsxs)(`span`,{className:`ripple-stat`,children:[$.added!=null&&(0,O.jsxs)(`span`,{className:`ripple-add`,children:[`+`,$.added.toLocaleString()]}),` `,$.removed!=null&&(0,O.jsxs)(`span`,{className:`ripple-del`,children:[`−`,$.removed.toLocaleString()]}),$.files==null?``:` · ${$.files} files`]}),$.p0Ways?(0,O.jsxs)(`span`,{className:`ripple-p0`,title:`Ways this change could cause a P0`,children:[(0,O.jsx)(`span`,{className:`ripple-p0-dot`,"aria-hidden":`true`}),$.p0Ways,` `,$.p0Ways===1?`way`:`ways`,` to cause a P0`]}):null,!En&&(0,O.jsx)(`button`,{type:`button`,className:`ripple-track-btn`,onClick:zt,title:`Keep an eye on this change — saved on this device`,children:It?`Tracked ✓`:`☆ Track`}),(0,O.jsx)(`button`,{type:`button`,className:`ripple-ask-toggle`+(U?` is-active`:``),onClick:()=>Te(e=>!e),...i(ze.preload),"aria-pressed":U,"aria-label":U?`Close the ask rail`:`Ask about this repo or PR`,title:U?`Hide ask`:`Ask about this repo or PR`,children:`Ask`}),n&&(0,O.jsx)(`button`,{type:`button`,className:`ripple-iconbtn`,onClick:()=>C(e=>!e),"aria-pressed":S,"aria-label":S?`Turn narration off`:`Turn narration on`,title:S?`Narration on — the orb speaks the walkthrough`:`Narration off`,children:S?`🔊`:`🔇`}),(0,O.jsx)(`button`,{type:`button`,className:`ripple-iconbtn`,onClick:()=>u(e=>!e),"aria-label":s?`Exit full screen`:`Expand to full screen`,title:s?`Exit full screen`:`Full screen`,children:s?`⤡`:`⤢`}),(0,O.jsx)(`button`,{type:`button`,className:`ripple-iconbtn`,onClick:a,"aria-label":`Close Ripple`,children:`✕`})]})]}),q.tier===`slow-cheap`&&ut&&!ct&&(0,O.jsxs)(`div`,{className:`ripple-hint`,role:`note`,children:[(0,O.jsx)(`span`,{className:`ripple-hint-text`,children:`Tip: a flash or lite model makes Ripple feel instant — your model still works, it’s just slower here.`}),(0,O.jsx)(`button`,{type:`button`,className:`ripple-hint-dismiss`,onClick:ft,"aria-label":`Dismiss tip`,children:`Got it`})]}),(En||(j.provenance.notes?.length??0)>0)&&(0,O.jsxs)(`div`,{className:`ripple-example`,"data-real":En?void 0:`true`,role:`note`,children:[(0,O.jsx)(`span`,{className:`ripple-example-dot`,"aria-hidden":`true`}),(0,O.jsx)(`span`,{className:`ripple-example-text`,children:En?(0,O.jsxs)(O.Fragment,{children:[(0,O.jsx)(`strong`,{children:`Worked example`}),` — a sample of a GitHub-connected analysis, not your code. It shows only what GitHub gives us (diff, files, in-repo callers).`]}):(0,O.jsxs)(O.Fragment,{children:[(0,O.jsx)(`strong`,{children:j.changes.length===0?`Exploring`:`From your diff`}),` —`,` `,j.provenance.notes?.[0]]})}),(0,O.jsx)(`button`,{type:`button`,className:`ripple-example-cta`,onClick:()=>Bt(`github`),children:En?`Run on your own code →`:`New`})]}),(0,O.jsxs)(`div`,{className:`ripple-body`,children:[(0,O.jsxs)(`nav`,{className:`ripple-rail`,"aria-label":`Sections`,children:[xn.map(e=>(0,O.jsxs)(`div`,{className:`ripple-rail-group`,children:[xn.length>1&&(0,O.jsx)(`div`,{className:`ripple-rail-grouplabel`,children:it[e.job]}),e.items.map(e=>(0,O.jsxs)(`button`,{type:`button`,className:`ripple-rail-item`,"data-ripple-section":e.id,"data-active":e.id===E?`true`:void 0,"data-enriching":F[at(e.id)]===`enriching`?`true`:void 0,onClick:()=>{if(Tt(e.id),S&&n){let t=wn(e.id);t&&n(t)}},...i(()=>rt(e.id)),children:[(0,O.jsx)(`span`,{className:`ripple-rail-label`,children:e.label}),F[at(e.id)]===`enriching`&&(0,O.jsx)(`span`,{className:`ripple-rail-spark`,"aria-hidden":`true`})]},e.id))]},e.job)),(0,O.jsxs)(`div`,{className:`ripple-rail-altitude`,children:[(0,O.jsx)(`div`,{className:`ripple-eyebrow`,children:`Explain for`}),(0,O.jsx)(`div`,{className:`ripple-alt`,role:`group`,"aria-label":`Explanation altitude`,children:tt.map(e=>(0,O.jsx)(`button`,{type:`button`,"data-active":k===e.id?`true`:void 0,onClick:()=>A(e.id),children:e.label},e.id))})]})]}),(0,O.jsxs)(`div`,{className:`ripple-main`,children:[F[at(E)]===`enriching`&&at(E)!==`courses`&&(0,O.jsxs)(`div`,{className:`ripple-sharpening-wrap`,children:[(0,O.jsxs)(`div`,{className:`ripple-sharpening`,role:`status`,"aria-live":`polite`,children:[(0,O.jsx)(`span`,{className:`ripple-sharpening-dot`,"aria-hidden":`true`}),at(E)===`orientation`?`Reading the repo to map it out…`:`Sharpening with the model’s read…`]}),(0,O.jsx)(`div`,{className:`ripple-progress`,"aria-hidden":`true`})]}),at(E)===`verdict`&&F.verdict===`error`&&!H&&(0,O.jsxs)(`div`,{className:`ripple-verdict-err`,role:`note`,children:[(0,O.jsx)(`span`,{className:`ripple-verdict-err-text`,children:`The model’s read didn’t land — showing the grounded floor. Connect a key in Settings → Live, or try again.`}),(0,O.jsxs)(`div`,{className:`ripple-verdict-err-actions`,children:[(0,O.jsx)(`button`,{type:`button`,className:`ripple-verdict-err-retry`,onClick:ht,children:`Try again`}),(0,O.jsx)(`button`,{type:`button`,className:`ripple-verdict-err-dismiss`,onClick:()=>xe(!0),"aria-label":`Dismiss`,children:`Dismiss`})]})]}),(0,O.jsx)(o,{label:`${ot.find(e=>e.id===E)?.label??`Ripple`} section`,children:Dn()})]}),U&&(0,O.jsx)(o,{label:`Ripple ask rail`,children:(0,O.jsx)(Be,{ctx:Le,onClose:()=>Te(!1),altitude:k,seed:je,repo:$.repo||``,gitRef:$.branch||`HEAD`,focusFile:j.changes[0]?.file??j.modules[0]?.entry},De)})]}),Et&&(0,O.jsx)(`div`,{className:`ripple-paste`,role:`dialog`,"aria-label":`Run Ripple on a diff`,children:(0,O.jsxs)(`div`,{className:`ripple-paste-card`,children:[(0,O.jsxs)(`div`,{className:`ripple-paste-head`,children:[(0,O.jsxs)(`div`,{children:[(0,O.jsx)(`div`,{className:`ripple-paste-title`,children:`Run Ripple on your code`}),(0,O.jsx)(`div`,{className:`ripple-paste-sub`,children:`Read-only — Ripple analyzes a change and never writes, comments, or merges.`})]}),(0,O.jsx)(`button`,{type:`button`,className:`ripple-iconbtn`,onClick:()=>Y(!1),"aria-label":`Cancel`,children:`✕`})]}),(0,O.jsx)(l,{kind:`code`,from:`live`}),Mt===`incident`?(0,O.jsxs)(O.Fragment,{children:[(0,O.jsx)(`textarea`,{className:`ripple-paste-input`,value:Vt,onChange:e=>{Ht(e.target.value),Ut&&Wt(``)},placeholder:`PagerDuty: [payments-api] P1 — 5xx rate 38% on /charge
|
|
3
3
|
or paste the error / log line that fired`,spellCheck:!1}),Ut&&(0,O.jsx)(`div`,{className:`ripple-paste-err`,children:Ut}),(0,O.jsxs)(`div`,{className:`ripple-paste-actions`,children:[(0,O.jsx)(`button`,{type:`button`,className:`ripple-paste-go`,onClick:Gt,children:`Trace it back`}),(0,O.jsx)(`button`,{type:`button`,className:`ripple-paste-cancel`,onClick:()=>Y(!1),children:`Cancel`})]}),(0,O.jsx)(`div`,{className:`ripple-paste-hint`,children:`Ripple traces the alert back to its likely cause — read-only. If a change is open, the trace grounds in it. It never reverts, deploys, or pages anyone.`})]}):Mt===`tracked`?(0,O.jsx)(`div`,{className:`ripple-tracked`,children:Pt.length===0?(0,O.jsxs)(`div`,{className:`ripple-tracked-empty`,children:[`Nothing tracked yet. Open a change and hit `,(0,O.jsx)(`strong`,{children:`☆ Track`}),` to keep an eye on it — it’s saved on this device only.`]}):Pt.map(e=>(0,O.jsxs)(`div`,{className:`ripple-tracked-row`,children:[(0,O.jsxs)(`button`,{type:`button`,className:`ripple-tracked-open`,onClick:()=>{M(e.model),D(`verdict`),Y(!1)},children:[(0,O.jsx)(`span`,{className:`ripple-tracked-label`,children:e.label}),(0,O.jsxs)(`span`,{className:`ripple-tracked-meta`,children:[e.source,` · `,e.model.changes.length||e.model.modules.length,` items`]})]}),(0,O.jsx)(`button`,{type:`button`,className:`ripple-iconbtn`,"aria-label":`Untrack ${e.label}`,onClick:()=>{ue(e.id),Ft(ce())},children:`✕`})]},e.id))}):Mt===`paste`?(0,O.jsxs)(O.Fragment,{children:[(0,O.jsx)(`textarea`,{className:`ripple-paste-input`,value:Dt,onChange:e=>{Ot(e.target.value),kt&&At(``)},placeholder:`diff --git a/auth/token.ts b/auth/token.ts
|
|
4
4
|
@@ -42 +42 @@
|
|
5
5
|
-validateToken(t: string)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t as e}from"./react-BQSORdFI.js";import{t}from"./jsx-runtime-DaSxXjOY.js";import{dt as n,ht as r,ut as i}from"./index-
|
|
1
|
+
import{t as e}from"./react-BQSORdFI.js";import{t}from"./jsx-runtime-DaSxXjOY.js";import{dt as n,ht as r,ut as i}from"./index-C7H7A1rW.js";var a=r(),o=e(),s=t(),c=[{w:`100%`},{w:`94%`,data:!0},{w:`97%`},{w:`88%`,data:!0},{w:`100%`},{w:`91%`,data:!0},{w:`96%`},{w:`70%`,data:!0},{w:`82%`}],l=[`42%`,`54%`,`48%`,`70%`,`100%`];function u(e,t,n,r){let i=(0,a.c)(6),[s,c]=(0,o.useState)(0),l,u;return i[0]!==r||i[1]!==t||i[2]!==n||i[3]!==e?(l=()=>{if(!r)return;if(window.matchMedia?.(`(prefers-reduced-motion: reduce)`).matches||document.documentElement.dataset.perf===`lite`){c(e);return}let i=0,a=0,o=t=>{a||=t;let r=Math.min(1,(t-a)/n);c(e*(1-(1-r)**3)),r<1&&(i=requestAnimationFrame(o))},s=window.setTimeout(()=>{i=requestAnimationFrame(o)},t);return()=>{clearTimeout(s),cancelAnimationFrame(i)}},u=[r,e,t,n],i[0]=r,i[1]=t,i[2]=n,i[3]=e,i[4]=l,i[5]=u):(l=i[4],u=i[5]),(0,o.useEffect)(l,u),s}function d(){let[e,t]=n({threshold:.3,nearestScrollRoot:!0}),r=u(23.8,1100,900,t);return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)(i,{eyebrow:`Why it feels different`,children:[`Stop reading paragraphs.`,(0,s.jsx)(`br`,{}),(0,s.jsx)(`em`,{className:`fl-grad`,children:`Start seeing answers.`})]}),(0,s.jsxs)(`div`,{className:`fl-compare`+(t?` sd-play`:``),ref:e,children:[(0,s.jsxs)(`div`,{className:`fl-compare-wall`,children:[(0,s.jsx)(`div`,{className:`fl-compare-label`,children:`The usual answer · a wall of text`}),(0,s.jsx)(`div`,{className:`fl-wall-lines`,children:c.map((e,t)=>(0,s.jsx)(`div`,{className:`fl-wall-line`+(e.data?` data`:``),style:{width:e.w,"--wl-i":String(t)}},t))}),(0,s.jsx)(`div`,{className:`fl-compare-hand`,children:`…still reading?`})]}),(0,s.jsxs)(`div`,{className:`fl-compare-seen`,children:[(0,s.jsx)(`div`,{className:`fl-compare-label accent`,children:`Mavéa · the same answer, seen`}),(0,s.jsxs)(`div`,{className:`fl-seen-stat`,children:[(0,s.jsxs)(`span`,{className:`fl-seen-num`,children:[`$`,r.toFixed(1),`M`]}),(0,s.jsx)(`span`,{className:`fl-seen-delta`,children:`▲ 18%`})]}),(0,s.jsx)(`div`,{className:`fl-seen-cap`,children:`Q3 revenue · best quarter on record`}),(0,s.jsx)(`div`,{className:`fl-seen-bars`,children:l.map((e,t)=>(0,s.jsx)(`div`,{className:`fl-seen-bar`+(e===`100%`?` peak`:``),style:{"--h":e,"--sb-i":String(t)}},t))}),(0,s.jsx)(`div`,{className:`fl-seen-note`,children:`Illustrative numbers`})]})]})]})}export{d as SeeDontRead};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/src-B-t8Mww-.js","assets/chunk-BVpWp9h4.js","assets/__vite-browser-external-BufR4LQa.js","assets/providers-wzm7E8Pa.js","assets/http-CJCtjYpA.js","assets/info-CiqHR5cs.js"])))=>i.map(i=>d[i]);
|
|
2
|
-
import{r as e}from"./chunk-BVpWp9h4.js";import{t}from"./react-BQSORdFI.js";import{t as n}from"./jsx-runtime-DaSxXjOY.js";import{J as r,L as i,c as a,ht as o,q as s}from"./index-DOpl5xzv.js";import{n as c}from"./icons-CHVz6kv_.js";import{t as l}from"./useFocusTrap-DbfG6zbM.js";import{C as u,r as d,x as f}from"./kokoro-B-MNB16v.js";import{n as p,r as m}from"./spokenText-D4zPX9JY.js";import{n as h,t as g}from"./share-QHGHNDhQ.js";import{t as _}from"./toast-BBNs2h3L.js";import{C as v,D as y,E as b,T as x,a as S,i as C,n as w,o as T,r as E,s as ee,t as D,w as O}from"./registry-BnSnMnyk.js";import{t as k}from"./ReelJelly-B2JQsaRI.js";import{t as A}from"./threads-CkMgrSDP.js";import{t as te}from"./FeatureUseNotice-CoK5HkbR.js";var j=t(),M=24e3,N=.15,P=.18,F=240,ne=.008,I=.89,L=6;async function R(e,t,n){let r=f(e).trim().slice(0,F);if(!r)return new Float32Array;for(let e=0;e<2;e++)try{let e=await fetch(`/tts/v1/audio/speech`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({model:`kokoro`,input:r,voice:t,response_format:`pcm`,speed:1}),signal:n});if(e.ok)return u(new Uint8Array(await e.arrayBuffer()),null).samples}catch{if(n?.aborted)return new Float32Array}return new Float32Array}async function re(e,t){let n=e.slides,r=n.map(e=>Math.max(800,Math.round(e.durationMs))),i=a();if(!i||typeof OfflineAudioContext>`u`)return{buffer:null,timings:r,missing:0};let o=d(`mavea`),s=await Promise.all(n.map(e=>R(e.voiceover,o,t))),c=n.filter(e=>e.voiceover.trim()).length,l=s.filter(e=>e.length>0).length,u=Math.max(0,c-l);if(l===0)return{buffer:null,timings:r,missing:u};let f=n.map((e,t)=>{let n=s[t].length/M*1e3;return Math.round(n>0?Math.max(r[t],n+P*1e3):r[t])}),p=0;for(let e of s)for(let t=0;t<e.length;t++)p=Math.max(p,Math.abs(e[t]));let m=p>0?Math.min(L,I/p):1,h=i.sampleRate,g=.65+f.reduce((e,t)=>e+t/1e3,0),_=new OfflineAudioContext(1,Math.ceil(g*h),h),v=_.createGain();v.gain.value=m,v.connect(_.destination);let y=N;return f.forEach((e,t)=>{let n=s[t];if(n.length){let e=_.createBuffer(1,n.length,M);e.getChannelData(0).set(n);let t=_.createBufferSource();t.buffer=e;let r=_.createGain(),i=n.length/M,a=Math.min(ne,i/2);r.gain.setValueAtTime(0,y),r.gain.linearRampToValueAtTime(1,y+a),r.gain.setValueAtTime(1,y+i-a),r.gain.linearRampToValueAtTime(0,y+i),t.connect(r).connect(v),t.start(y)}y+=e/1e3}),{buffer:await _.startRendering(),timings:f,missing:u}}function z(e){let t=a();if(!t||typeof t.createMediaStreamDestination!=`function`)return null;let n=t.createMediaStreamDestination(),r=t.createBufferSource();r.buffer=e,r.connect(n);let i=!1;return{stream:n.stream,start(){i||(i=!0,t.state!==`running`&&t.resume().catch(()=>{}),r.start())},stop(){try{r.stop()}catch{}try{r.disconnect()}catch{}}}}function B(e,t,n){return t+Math.max(0,n-e)}function V(e,t){return!Number.isFinite(t)||t<=0||e>=t?null:Math.max(0,e)}function ie(e){let t=a();if(!t)return null;let n=t.createGain();n.connect(t.destination);let r=null,i=0,o=0,s=!1,c=()=>{try{r?.stop(),r?.disconnect()}catch{}r=null},l=a=>{c(),r=t.createBufferSource(),r.buffer=e,r.connect(n),r.start(0,a),i=a,o=t.currentTime,s=!1};return{play(){t.state!==`running`&&t.resume().catch(()=>{}),l(0)},setMuted(e){n.gain.value=+!e},pause(){s||!r||(i=Math.min(e.duration,B(o,i,t.currentTime)),c(),s=!0)},resume(){if(!s)return;s=!1;let n=V(i,e.duration);n!==null&&(t.state!==`running`&&t.resume().catch(()=>{}),l(n))},stop(){c();try{n.disconnect()}catch{}}}}r();var H={balanced:{fps:30,bitrate:6e6},high:{fps:30,bitrate:1e7},ultra:{fps:60,bitrate:16e6}};function ae(e){let{fps:t,bitrate:n}=H[e];return`up to ${t} fps · ${Math.round(n/1e6)} Mbps`}async function U(){try{let{Output:e,Mp4OutputFormat:t,BufferTarget:n,CanvasSource:r,AudioBufferSource:i,canEncodeVideo:a}=await s(async()=>{let{Output:e,Mp4OutputFormat:t,BufferTarget:n,CanvasSource:r,AudioBufferSource:i,canEncodeVideo:a}=await import(`./src-B-t8Mww-.js`);return{Output:e,Mp4OutputFormat:t,BufferTarget:n,CanvasSource:r,AudioBufferSource:i,canEncodeVideo:a}},__vite__mapDeps([0,1,2]));return{Output:e,Mp4OutputFormat:t,BufferTarget:n,CanvasSource:r,AudioBufferSource:i,canEncodeVideo:a}}catch{return null}}async function W(){try{return await s(()=>import(`./dist-xRGLOZwv.js`),[])}catch{return null}}var G={"9:16":{w:1080,h:1920},"1:1":{w:1080,h:1080},"16:9":{w:1920,h:1080}};function oe(){if(typeof document>`u`)return!1;let e=typeof MediaRecorder<`u`,t=typeof VideoEncoder<`u`&&globalThis.AudioEncoder!==void 0;return e||t}async function se(e){let t=H[e.quality??`high`],n=e.fps??t.fps,{w:r,h:i}=G[e.aspect],a=await W();if(!a)throw Error(`rasterizer-unavailable`);let o=e.el.clientWidth||r,s=Math.min(3,Math.max(1,r/o)),c=0,l=0,u=document.createElement(`canvas`);u.width=r,u.height=i;let d=u.getContext(`2d`,{alpha:!1});d.fillStyle=`#05070c`,d.fillRect(0,0,r,i);let f=document.createElement(`canvas`);f.width=Math.round(r/2),f.height=Math.round(i/2);let p=f.getContext(`2d`),m=!1,h=()=>{p&&(p.drawImage(u,0,0,f.width,f.height),m=!0)},g=()=>new Blob([],{type:`image/png`}),_=async()=>(!m&&c>0&&h(),m?await new Promise(e=>f.toBlob(e,`image/png`))??g():g()),v=async()=>{let t;try{t=await a.domToCanvas(e.el,{scale:s,backgroundColor:`#05070c`})}catch{l++;return}if(!t.width||!t.height){l++;return}l=0,c++;let n=Math.max(r/t.width,i/t.height),o=t.width*n,u=t.height*n;d.fillStyle=`#05070c`,d.fillRect(0,0,r,i),d.drawImage(t,(r-o)/2,(i-u)/2,o,u)},y=typeof VideoEncoder<`u`&&globalThis.AudioEncoder!==void 0?await U():null;if(y&&await y.canEncodeVideo(`avc`).catch(()=>!1)&&y){let r=new y.Output({format:new y.Mp4OutputFormat,target:new y.BufferTarget}),i=new y.CanvasSource(u,{codec:`avc`,bitrate:t.bitrate});r.addVideoTrack(i);let a=null;if(e.audioBuffer){let t=new y.AudioBufferSource({codec:`aac`,bitrate:192e3});r.addAudioTrack(t);let n=e.audioBuffer;a=async()=>{try{await t.add(n),t.close()}catch{}}}await r.start(),a?.();let o=!0,s=!0,d=performance.now(),p=0,g=1e3/n,b=e.maxDurationMs??1/0;(async()=>{for(;o;){let e=performance.now();if(await v(),!o)break;let t=s?0:(performance.now()-d)/1e3;s=!1;try{await i.add(t,Math.max(1/n,t-p))}catch{break}if(p=t,t*1e3>=b)break;!m&&t>1.2&&c>2&&l===0&&h();let r=performance.now()-e;await new Promise(e=>setTimeout(e,Math.max(0,g-r)))}})();let x=()=>{o=!1,u.width=u.height=0,f.width=f.height=0};return{async stop(){o=!1;let t=await _();await r.finalize();let n=r.target.buffer;return x(),{blob:new Blob([n??new ArrayBuffer(0)],{type:`video/mp4`}),type:`video/mp4`,poster:t,hasAudio:!!e.audioBuffer,durationMs:Math.round(performance.now()-d)}},cancel(){o=!1,r.cancel?.(),x()}}}let b=u.captureStream(n),x=new MediaStream(b.getVideoTracks()),S=e.audioBuffer?z(e.audioBuffer):null,C=S?.stream.getAudioTracks()[0]??null;C&&x.addTrack(C);let w=MediaRecorder.isTypeSupported(`video/webm;codecs=vp9,opus`)?`video/webm;codecs=vp9,opus`:`video/webm`,T=new MediaRecorder(x,{mimeType:w,videoBitsPerSecond:t.bitrate}),E=[];T.ondataavailable=e=>e.data.size&&E.push(e.data);let ee=new Promise(e=>{T.addEventListener(`stop`,()=>e(),{once:!0})}),D=()=>{try{T.state!==`inactive`&&T.stop()}catch{}};T.start(),S?.start();let O=!0,k=performance.now(),A=e.maxDurationMs??1/0,te=1e3/n;(async()=>{for(;O;){let e=performance.now();await v();let t=performance.now()-k;if(t>=A){D();break}!m&&t>1200&&c>2&&l===0&&h();let n=performance.now()-e;await new Promise(e=>setTimeout(e,Math.max(0,te-n)))}})();let j=()=>{O=!1;for(let e of x.getTracks())e.stop();S?.stop(),u.width=u.height=0,f.width=f.height=0};return{async stop(){O=!1;let e=await _();D(),await ee;let t=new Blob(E,{type:w}),n=Math.round(performance.now()-k);return j(),{blob:t,type:w,poster:e,hasAudio:!!C,durationMs:n}},cancel(){O=!1,D(),j()}}}var K=n();function q({slide:e}){"use no memo";let t=T(e);return(0,K.jsx)(t.Slide,{slots:t.slots})}var ce=o(),le=(0,j.createContext)(0),J=new Set([`hidden`,`clip`,`auto`,`scroll`]);function ue(e){let t=(0,ce.c)(11),{children:n}=e,r=(0,j.useRef)(null),i=(0,j.useRef)(null),a;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(a={k:1,x:0,y:0},t[0]=a):a=t[0];let[o,s]=(0,j.useState)(a),c=(0,j.useContext)(le),l;t[1]===Symbol.for(`react.memo_cache_sentinel`)?(l=()=>{let e=r.current,t=i.current;if(!e||!t)return;let n=()=>{let n=e.clientHeight,r=e.clientWidth;if(!n||!r)return;let i=t.style.transform;t.style.transform=`none`,t.style.left=`0`,t.style.top=`0`;let a=[],o=[...t.querySelectorAll(`*`)],c=new Set;for(let e of t.querySelectorAll(`[data-reel-marquee]`)){for(let n=e;n&&n!==t;n=n.parentElement)c.add(n);for(let t of e.querySelectorAll(`*`))c.add(t)}let l=new Set,u=[];for(let e of o){if(c.has(e))continue;let t=getComputedStyle(e);if(t.webkitLineClamp!==`none`){l.add(e);continue}!J.has(t.overflowX)&&!J.has(t.overflowY)||u.push(e)}for(let e of u)a.push({el:e,o:e.style.overflow,m:e.style.maxHeight}),e.style.overflow=`visible`,e.style.maxHeight=`none`;let d=e=>{for(let n=e;n&&n!==t;n=n.parentElement)if(l.has(n))return!0;return!1},f=e=>{let n=0,r=0;for(let i=e;i&&i!==t&&t.contains(i);i=i.offsetParent)n+=i.offsetLeft,r+=i.offsetTop;return{x:n,y:r}},p=t.scrollWidth,m=t.scrollHeight;for(let e of o)if(!c.has(e)&&!d(e)){if(e.scrollWidth>p&&(p=e.scrollWidth),e.scrollHeight>m&&(m=e.scrollHeight),e.scrollWidth>e.clientWidth+1){let t=f(e);t.x+e.scrollWidth>p&&(p=t.x+e.scrollWidth)}if(e.scrollHeight>e.clientHeight+1){let t=f(e);t.y+e.scrollHeight>m&&(m=t.y+e.scrollHeight)}}for(let e of l){let t=f(e);t.x+e.clientWidth>p&&(p=t.x+e.clientWidth),t.y+e.clientHeight>m&&(m=t.y+e.clientHeight)}for(let e of a)e.el.style.overflow=e.o,e.el.style.maxHeight=e.m;if(t.style.transform=i,!m||!p)return;let h=Math.min(1,n*.95/m,r*.92/p),g=Number.isFinite(h)&&h>0?Math.floor(h*1e3)/1e3:1,_=t.firstElementChild,v=_?.offsetWidth||p,y=_?f(_).x:0,b=Math.max(0,(r-v*g)/2-y*g),x=Math.max(0,(n-m*g)/2);s(e=>Math.abs(e.k-g)>.002||Math.abs(e.x-b)>.5||Math.abs(e.y-x)>.5?{k:g,x:b,y:x}:e)};n();let a=!1,o=0;typeof document<`u`&&document.fonts?.ready&&document.fonts.ready.then(()=>{a||(o=requestAnimationFrame(n))});let c=requestAnimationFrame(n),l=0,u=new ResizeObserver(()=>{cancelAnimationFrame(l),l=requestAnimationFrame(n)});return u.observe(e),u.observe(t),()=>{a=!0,u.disconnect(),cancelAnimationFrame(l),cancelAnimationFrame(c),cancelAnimationFrame(o)}},t[1]=l):l=t[1];let u;t[2]!==n||t[3]!==c?(u=[n,c],t[2]=n,t[3]=c,t[4]=u):u=t[4],(0,j.useLayoutEffect)(l,u);let d;t[5]===Symbol.for(`react.memo_cache_sentinel`)?(d={position:`absolute`,inset:0,overflow:`hidden`},t[5]=d):d=t[5];let f=`translate(${o.x}px, ${o.y}px) scale(${o.k})`,p;t[6]===f?p=t[7]:(p={position:`absolute`,left:0,top:0,transformOrigin:`top left`,transform:f},t[6]=f,t[7]=p);let m;return t[8]!==n||t[9]!==p?(m=(0,K.jsx)(`div`,{ref:r,style:d,children:(0,K.jsx)(`div`,{ref:i,style:p,children:n})}),t[8]=n,t[9]=p,t[10]=m):m=t[10],m}var de=[`up`,`left`,`zoom`,`wipe`,`fade`];function fe(e,t){let n=e/t;return n<.8?`9:16`:n<1.3?`1:1`:`16:9`}function pe(e){let t=e.clientWidth,n=e.clientHeight;if(!t||!n)return!1;let r=Math.min(t,n)/100,i=r*16/9,a=fe(t,n),o=`${r}px`,s=e.style.getPropertyValue(`--rw`)!==o||e.dataset.aspect!==a;return e.style.setProperty(`--ru`,`${i}px`),e.style.setProperty(`--rw`,o),e.dataset.aspect=a,s}var Y=e=>e.template!==`title`&&e.template!==`outro`,me=e=>e.template===`outro`,X=e=>e.template===`title`;function he(e,t){let n=0;for(let r=0;r<t&&r<e.length;r++)Y(e[r])&&n++;return n}function ge(e,t){let n=e[t];return n&&Y(n)?he(e,t):-1}function _e({script:e,timings:t,loop:n=!1,onDone:r,frameRef:i,playKey:a=0,playing:o=!0,initialIndex:s=0,onCycle:c,interactive:l=!1,paused:u,onPausedChange:d}){let f=e.slides,p=f.map((e,n)=>Math.max(800,Math.round(t?.[n]??e.durationMs))),m=Math.max(0,Math.min(s,f.length-1)),[h,g]=(0,j.useState)(m),[_,v]=(0,j.useState)(0),y=u!==void 0,[b,x]=(0,j.useState)(!1),S=y?u:b,w=(0,j.useCallback)(()=>{y?d?.(!S):x(e=>!e)},[y,S,d]),[T,ee]=(0,j.useState)(0),D=(0,j.useRef)(!1),O=(0,j.useRef)(null),A=(0,j.useRef)(null),te=(0,j.useRef)(i);te.current=i;let M=(0,j.useCallback)(e=>{A.current=e,te.current?.(e)},[]);(0,j.useEffect)(()=>{l&&A.current?.focus({preventScroll:!0})},[l]);let N=(0,j.useRef)(!1);N.current=S;let P=(0,j.useRef)(null),F=(0,j.useRef)(0),ne=(0,j.useCallback)(e=>{O.current=e,e&&pe(e)&&ee(e=>e+1)},[]);if((0,j.useLayoutEffect)(()=>{let e=O.current;if(!e)return;let t=new ResizeObserver(()=>{pe(e)&&ee(e=>e+1)});return t.observe(e),()=>t.disconnect()},[]),(0,j.useEffect)(()=>{o&&(D.current=!1,g(m),v(e=>e+1))},[a,o]),(0,j.useEffect)(()=>{if(!o||S||h>=f.length)return;let e=P.current??p[h];P.current=null,F.current=Date.now();let t=window.setTimeout(()=>{h+1<f.length?g(h+1):n?(g(0),v(e=>e+1),c?.()):D.current||(D.current=!0,r?.())},e);return()=>{window.clearTimeout(t),N.current&&(P.current=Math.max(0,e-(Date.now()-F.current)))}},[h,f.length,n,r,a,o,S]),(0,j.useEffect)(()=>{P.current=null},[h]),!f.length)return null;let I=f[Math.min(h,f.length-1)],L=he(f,h),R=ge(f,h),re=f.filter(Y).length,z=e=>{let t=-1;for(let n=0;n<f.length;n++)if(Y(f[n])&&t++,t===e){g(n),v(e=>e+1);return}},B=e=>{if(!re)return;let t=Y(I)?R+e:e>0?L:L-1;z(Math.max(0,Math.min(re-1,t)))},V=f.reduce((e,t,n)=>(X(t)&&e.push(n),e),[]),ie=e=>{if(V.length<=1)return;let t=V.filter(e=>e<=h).length-1;g(V[Math.max(0,Math.min(V.length-1,t+e))]),v(e=>e+1)},H=e=>{switch(e.key){case`ArrowRight`:e.preventDefault(),B(1);break;case`ArrowLeft`:e.preventDefault(),B(-1);break;case`ArrowDown`:e.preventDefault(),ie(1);break;case`ArrowUp`:e.preventDefault(),ie(-1);break;case` `:case`Spacebar`:e.preventDefault(),w();break;default:break}},ae=C(I.template)===`dark`,U=E(I.template),W=h===0?`fade`:de[(h+e.seed)%de.length];return(0,K.jsx)(`div`,{className:`reel`,"data-palette":e.palette,"data-vibe":e.vibe,ref:M,role:l?`application`:void 0,tabIndex:l?0:void 0,onKeyDown:l?H:void 0,"aria-label":l?`Reel preview. Left and right arrows step between beats, up and down jump sections, space bar pauses.`:void 0,children:(0,K.jsxs)(`div`,{className:`reel-board`,ref:ne,"data-surface":ae?`dark`:`light`,"data-bleed":U?`true`:`false`,children:[ae&&(0,K.jsx)(`div`,{className:`reel-darkwash`,"aria-hidden":`true`}),(0,K.jsx)(`div`,{className:`reel-progress`,"data-interactive":l,"aria-hidden":!l,children:Array.from({length:re},(e,t)=>{let n=t===R,r=t<L||me(I),i=(0,K.jsx)(`span`,{className:`reel-seg`,children:(0,K.jsx)(`i`,{style:n?{width:0,animation:`reel-seg-fill ${p[h]}ms linear forwards`,animationPlayState:S?`paused`:`running`}:{width:r?`100%`:`0%`}})},`seg`);return l?(0,K.jsx)(`button`,{type:`button`,className:`reel-seg-hit`,onClick:()=>z(t),"aria-label":`Jump to beat ${t+1}`,children:i},t):(0,K.jsx)(`span`,{className:`reel-seg-hit`,children:i},t)})}),(0,K.jsxs)(`div`,{className:`reel-top`,children:[(0,K.jsxs)(`span`,{className:`reel-wordmark`,children:[(0,K.jsx)(`span`,{className:`reel-dot`,"aria-hidden":`true`}),`Mavéa`]}),(0,K.jsx)(`span`,{className:`reel-palettename`,children:e.palette})]}),!U&&(0,K.jsx)(`div`,{className:`reel-jelly-pos`,"aria-hidden":`true`,children:(0,K.jsx)(k,{})}),(0,K.jsx)(`div`,{className:`reel-stage`,children:(0,K.jsx)(`div`,{className:`reel-trans`,"data-trans":W,children:(0,K.jsx)(le.Provider,{value:T,children:(0,K.jsx)(ue,{children:(0,K.jsx)(q,{slide:I})})})},`${_}-${h}`)}),(0,K.jsx)(`div`,{className:`reel-pause-badge`,"data-show":l&&S,"aria-hidden":`true`,children:(0,K.jsxs)(`div`,{className:`reel-pause-glyph`,children:[(0,K.jsx)(`span`,{}),(0,K.jsx)(`span`,{})]})})]})})}function ve(e){let t=[],n=A(e,null);return e.forEach((e,r)=>{t.length===0||n[r]?t.push([e]):t[t.length-1].push(e)}),t}var ye=/^(how|what|why|should|can|could|would|will|plan|show|make|build|tell|give|explain|who|when|where|which|is|are|do|does|did|help|me)\b[\s,]*/i,be=/\s*[,;:]\s+|\s+—\s+|\s+–\s+|\s+\band\b\s+|\s+\bbut\b\s+|\s+\bso\b\s+/i;function xe(e){let t=e[0];if(!t)return``;let n=t.spec?.title?.trim();if(n)return y(n,b.heading);let r=(t.question||``).trim();if(!r)return``;let i=r.replace(ye,``).replace(/[?!.]+$/,``).trim(),a=(i.split(be)[0]||``).trim()||i;return a?y(a.charAt(0).toUpperCase()+a.slice(1),b.heading):``}r();var Se={palette:`aurora`,vibe:`clean`,maxSlides:6};function Z(e){return y(e[0]?.question||e[0]?.spec?.title||`Mavéa`,b.title)}function Q(e){return e[0]?.spec?.topic||e[0]?.spec?.title||Z(e)}function Ce(e){return(e||``).replace(/\s+/g,` `).split(/(?<=[.!?])\s+/).map(e=>e.trim()).filter(e=>e.length>1)}function we(e){return(e.narration||e.spec?.found||e.spec?.sub||``).trim()}function Te(e){return(e.spoken||e.narration||e.spec?.found||e.spec?.sub||``).trim()}var Ee=0;function De(e,t,n,r,i){let a=y(m(r.voiceover),b.voiceover);return{id:`s${Ee++}`,content:e,template:t,slots:w(e,n,i),voiceover:a,durationMs:Math.max(r.ms,a?Math.round(a.length/13*1e3)+500:0),sourceBlockId:r.sourceBlockId}}function Oe(e,t,n,r,i,a){return De(e,D(e,i,a,S(e,t)),t,n,r)}function ke(e,t){return Math.max(1,Math.min(t,Math.floor((e-1)/2)))}function Ae(e,t,n=0){let r=Math.max(t,e-1-t);return Math.max(1,Math.floor(r/t)+ +(n<r%t))}function je(e,t,n,r){let i=Z(e.frames);return De(`title`,`title`,{question:i,kicker:e.heading||xe(e.frames)||void 0,part:n>1?{index:t+1,count:n}:void 0},{voiceover:i,ms:x.intro},r)}function Me(e,t,n){let r=e.flatMap(e=>e.frames),i=Z(r),a=Q(r),o=[];e.forEach((t,n)=>{let r={topic:Q(t.frames),question:Z(t.frames)};o.push(je(t,n,e.length,r)),o.push(...t.content)});let s={topic:a,question:i};return o.push(De(`outro`,`outro`,{wordmark:`Mavéa`,tagline:`Talk to AI. See what it means.`},{voiceover:`Made with Mavéa.`,ms:x.outro},s)),{topic:a,question:i,palette:t.palette,vibe:t.vibe,seed:n,slides:o,durationMs:o.reduce((e,t)=>e+t.durationMs,0)}}function Ne(e,t){return{...e,seed:t,slides:e.slides.map((e,n)=>e.content===`title`||e.content===`outro`?e:{...e,template:D(e.content,t,n,S(e.content,e.slots),e.template)})}}function Pe(e,t,n){let r=e.flatMap(e=>e.spec?.blocks??[]).map(e=>({shown:p((e.note||``).trim()),spoken:m((e.noteSpoken||e.note||``).trim())})).filter(e=>e.shown.length>8),i=r.map(e=>e.shown),a=r.map(e=>e.spoken||e.shown),o=[];if(e.forEach((e,t)=>{let n=we(e),r=Ce(Te(e)),s=Ce(p(n));s.length&&o.push({speaksFor:t,covers:!0,content:`quote`,raw:{quote:s[0]},voiceover:r.slice(0,2).join(` `)}),t===0&&i.length>=2&&o.push({speaksFor:t,covers:!1,content:`list`,raw:{items:i.slice(0,4)},voiceover:a.slice(0,3).join(`. `)})}),!o.length){let e=t.question;o.push({speaksFor:0,covers:!0,content:`quote`,raw:{quote:e},voiceover:e})}let s=new Set;for(let e of[!0,!1])for(let t of o){if(s.size>=n)break;t.covers===e&&!s.has(t)&&s.add(t)}return o.filter(e=>s.has(e)).map((e,n)=>Oe(e.content,e.raw,{voiceover:e.voiceover,ms:x.default},t,0,n+1))}function Fe(e,t){let n=ve(e);return n.slice(-ke(t,n.length))}function Ie(e,t={}){let n={...Se,...t},r=Fe(e,n.maxSlides);return Me(r.map((e,t)=>({frames:e,content:Pe(e,{topic:Q(e),question:Z(e)},Ae(n.maxSlides,r.length,t))})),n,0)}var $=v,Le=`You are Mavéa's reel director. You recut a finished conversation into a short, vertical (9:16) social video — a sequence of card "beats" for TikTok/Reels/Shorts. Each beat is ONE card with very little room.
|
|
2
|
+
import{r as e}from"./chunk-BVpWp9h4.js";import{t}from"./react-BQSORdFI.js";import{t as n}from"./jsx-runtime-DaSxXjOY.js";import{J as r,L as i,c as a,ht as o,q as s}from"./index-C7H7A1rW.js";import{n as c}from"./icons-CHVz6kv_.js";import{t as l}from"./useFocusTrap-DbfG6zbM.js";import{C as u,r as d,x as f}from"./kokoro-kGWf7M0e.js";import{n as p,r as m}from"./spokenText-D4zPX9JY.js";import{n as h,t as g}from"./share-QHGHNDhQ.js";import{t as _}from"./toast-BBNs2h3L.js";import{C as v,D as y,E as b,T as x,a as S,i as C,n as w,o as T,r as E,s as ee,t as D,w as O}from"./registry-B51MhOLx.js";import{t as k}from"./ReelJelly-DCD4bG10.js";import{t as A}from"./threads-CkMgrSDP.js";import{t as te}from"./FeatureUseNotice-CoK5HkbR.js";var j=t(),M=24e3,N=.15,P=.18,F=240,ne=.008,I=.89,L=6;async function R(e,t,n){let r=f(e).trim().slice(0,F);if(!r)return new Float32Array;for(let e=0;e<2;e++)try{let e=await fetch(`/tts/v1/audio/speech`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({model:`kokoro`,input:r,voice:t,response_format:`pcm`,speed:1}),signal:n});if(e.ok)return u(new Uint8Array(await e.arrayBuffer()),null).samples}catch{if(n?.aborted)return new Float32Array}return new Float32Array}async function re(e,t){let n=e.slides,r=n.map(e=>Math.max(800,Math.round(e.durationMs))),i=a();if(!i||typeof OfflineAudioContext>`u`)return{buffer:null,timings:r,missing:0};let o=d(`mavea`),s=await Promise.all(n.map(e=>R(e.voiceover,o,t))),c=n.filter(e=>e.voiceover.trim()).length,l=s.filter(e=>e.length>0).length,u=Math.max(0,c-l);if(l===0)return{buffer:null,timings:r,missing:u};let f=n.map((e,t)=>{let n=s[t].length/M*1e3;return Math.round(n>0?Math.max(r[t],n+P*1e3):r[t])}),p=0;for(let e of s)for(let t=0;t<e.length;t++)p=Math.max(p,Math.abs(e[t]));let m=p>0?Math.min(L,I/p):1,h=i.sampleRate,g=.65+f.reduce((e,t)=>e+t/1e3,0),_=new OfflineAudioContext(1,Math.ceil(g*h),h),v=_.createGain();v.gain.value=m,v.connect(_.destination);let y=N;return f.forEach((e,t)=>{let n=s[t];if(n.length){let e=_.createBuffer(1,n.length,M);e.getChannelData(0).set(n);let t=_.createBufferSource();t.buffer=e;let r=_.createGain(),i=n.length/M,a=Math.min(ne,i/2);r.gain.setValueAtTime(0,y),r.gain.linearRampToValueAtTime(1,y+a),r.gain.setValueAtTime(1,y+i-a),r.gain.linearRampToValueAtTime(0,y+i),t.connect(r).connect(v),t.start(y)}y+=e/1e3}),{buffer:await _.startRendering(),timings:f,missing:u}}function z(e){let t=a();if(!t||typeof t.createMediaStreamDestination!=`function`)return null;let n=t.createMediaStreamDestination(),r=t.createBufferSource();r.buffer=e,r.connect(n);let i=!1;return{stream:n.stream,start(){i||(i=!0,t.state!==`running`&&t.resume().catch(()=>{}),r.start())},stop(){try{r.stop()}catch{}try{r.disconnect()}catch{}}}}function B(e,t,n){return t+Math.max(0,n-e)}function V(e,t){return!Number.isFinite(t)||t<=0||e>=t?null:Math.max(0,e)}function ie(e){let t=a();if(!t)return null;let n=t.createGain();n.connect(t.destination);let r=null,i=0,o=0,s=!1,c=()=>{try{r?.stop(),r?.disconnect()}catch{}r=null},l=a=>{c(),r=t.createBufferSource(),r.buffer=e,r.connect(n),r.start(0,a),i=a,o=t.currentTime,s=!1};return{play(){t.state!==`running`&&t.resume().catch(()=>{}),l(0)},setMuted(e){n.gain.value=+!e},pause(){s||!r||(i=Math.min(e.duration,B(o,i,t.currentTime)),c(),s=!0)},resume(){if(!s)return;s=!1;let n=V(i,e.duration);n!==null&&(t.state!==`running`&&t.resume().catch(()=>{}),l(n))},stop(){c();try{n.disconnect()}catch{}}}}r();var H={balanced:{fps:30,bitrate:6e6},high:{fps:30,bitrate:1e7},ultra:{fps:60,bitrate:16e6}};function ae(e){let{fps:t,bitrate:n}=H[e];return`up to ${t} fps · ${Math.round(n/1e6)} Mbps`}async function U(){try{let{Output:e,Mp4OutputFormat:t,BufferTarget:n,CanvasSource:r,AudioBufferSource:i,canEncodeVideo:a}=await s(async()=>{let{Output:e,Mp4OutputFormat:t,BufferTarget:n,CanvasSource:r,AudioBufferSource:i,canEncodeVideo:a}=await import(`./src-B-t8Mww-.js`);return{Output:e,Mp4OutputFormat:t,BufferTarget:n,CanvasSource:r,AudioBufferSource:i,canEncodeVideo:a}},__vite__mapDeps([0,1,2]));return{Output:e,Mp4OutputFormat:t,BufferTarget:n,CanvasSource:r,AudioBufferSource:i,canEncodeVideo:a}}catch{return null}}async function W(){try{return await s(()=>import(`./dist-xRGLOZwv.js`),[])}catch{return null}}var G={"9:16":{w:1080,h:1920},"1:1":{w:1080,h:1080},"16:9":{w:1920,h:1080}};function oe(){if(typeof document>`u`)return!1;let e=typeof MediaRecorder<`u`,t=typeof VideoEncoder<`u`&&globalThis.AudioEncoder!==void 0;return e||t}async function se(e){let t=H[e.quality??`high`],n=e.fps??t.fps,{w:r,h:i}=G[e.aspect],a=await W();if(!a)throw Error(`rasterizer-unavailable`);let o=e.el.clientWidth||r,s=Math.min(3,Math.max(1,r/o)),c=0,l=0,u=document.createElement(`canvas`);u.width=r,u.height=i;let d=u.getContext(`2d`,{alpha:!1});d.fillStyle=`#05070c`,d.fillRect(0,0,r,i);let f=document.createElement(`canvas`);f.width=Math.round(r/2),f.height=Math.round(i/2);let p=f.getContext(`2d`),m=!1,h=()=>{p&&(p.drawImage(u,0,0,f.width,f.height),m=!0)},g=()=>new Blob([],{type:`image/png`}),_=async()=>(!m&&c>0&&h(),m?await new Promise(e=>f.toBlob(e,`image/png`))??g():g()),v=async()=>{let t;try{t=await a.domToCanvas(e.el,{scale:s,backgroundColor:`#05070c`})}catch{l++;return}if(!t.width||!t.height){l++;return}l=0,c++;let n=Math.max(r/t.width,i/t.height),o=t.width*n,u=t.height*n;d.fillStyle=`#05070c`,d.fillRect(0,0,r,i),d.drawImage(t,(r-o)/2,(i-u)/2,o,u)},y=typeof VideoEncoder<`u`&&globalThis.AudioEncoder!==void 0?await U():null;if(y&&await y.canEncodeVideo(`avc`).catch(()=>!1)&&y){let r=new y.Output({format:new y.Mp4OutputFormat,target:new y.BufferTarget}),i=new y.CanvasSource(u,{codec:`avc`,bitrate:t.bitrate});r.addVideoTrack(i);let a=null;if(e.audioBuffer){let t=new y.AudioBufferSource({codec:`aac`,bitrate:192e3});r.addAudioTrack(t);let n=e.audioBuffer;a=async()=>{try{await t.add(n),t.close()}catch{}}}await r.start(),a?.();let o=!0,s=!0,d=performance.now(),p=0,g=1e3/n,b=e.maxDurationMs??1/0;(async()=>{for(;o;){let e=performance.now();if(await v(),!o)break;let t=s?0:(performance.now()-d)/1e3;s=!1;try{await i.add(t,Math.max(1/n,t-p))}catch{break}if(p=t,t*1e3>=b)break;!m&&t>1.2&&c>2&&l===0&&h();let r=performance.now()-e;await new Promise(e=>setTimeout(e,Math.max(0,g-r)))}})();let x=()=>{o=!1,u.width=u.height=0,f.width=f.height=0};return{async stop(){o=!1;let t=await _();await r.finalize();let n=r.target.buffer;return x(),{blob:new Blob([n??new ArrayBuffer(0)],{type:`video/mp4`}),type:`video/mp4`,poster:t,hasAudio:!!e.audioBuffer,durationMs:Math.round(performance.now()-d)}},cancel(){o=!1,r.cancel?.(),x()}}}let b=u.captureStream(n),x=new MediaStream(b.getVideoTracks()),S=e.audioBuffer?z(e.audioBuffer):null,C=S?.stream.getAudioTracks()[0]??null;C&&x.addTrack(C);let w=MediaRecorder.isTypeSupported(`video/webm;codecs=vp9,opus`)?`video/webm;codecs=vp9,opus`:`video/webm`,T=new MediaRecorder(x,{mimeType:w,videoBitsPerSecond:t.bitrate}),E=[];T.ondataavailable=e=>e.data.size&&E.push(e.data);let ee=new Promise(e=>{T.addEventListener(`stop`,()=>e(),{once:!0})}),D=()=>{try{T.state!==`inactive`&&T.stop()}catch{}};T.start(),S?.start();let O=!0,k=performance.now(),A=e.maxDurationMs??1/0,te=1e3/n;(async()=>{for(;O;){let e=performance.now();await v();let t=performance.now()-k;if(t>=A){D();break}!m&&t>1200&&c>2&&l===0&&h();let n=performance.now()-e;await new Promise(e=>setTimeout(e,Math.max(0,te-n)))}})();let j=()=>{O=!1;for(let e of x.getTracks())e.stop();S?.stop(),u.width=u.height=0,f.width=f.height=0};return{async stop(){O=!1;let e=await _();D(),await ee;let t=new Blob(E,{type:w}),n=Math.round(performance.now()-k);return j(),{blob:t,type:w,poster:e,hasAudio:!!C,durationMs:n}},cancel(){O=!1,D(),j()}}}var K=n();function q({slide:e}){"use no memo";let t=T(e);return(0,K.jsx)(t.Slide,{slots:t.slots})}var ce=o(),le=(0,j.createContext)(0),J=new Set([`hidden`,`clip`,`auto`,`scroll`]);function ue(e){let t=(0,ce.c)(11),{children:n}=e,r=(0,j.useRef)(null),i=(0,j.useRef)(null),a;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(a={k:1,x:0,y:0},t[0]=a):a=t[0];let[o,s]=(0,j.useState)(a),c=(0,j.useContext)(le),l;t[1]===Symbol.for(`react.memo_cache_sentinel`)?(l=()=>{let e=r.current,t=i.current;if(!e||!t)return;let n=()=>{let n=e.clientHeight,r=e.clientWidth;if(!n||!r)return;let i=t.style.transform;t.style.transform=`none`,t.style.left=`0`,t.style.top=`0`;let a=[],o=[...t.querySelectorAll(`*`)],c=new Set;for(let e of t.querySelectorAll(`[data-reel-marquee]`)){for(let n=e;n&&n!==t;n=n.parentElement)c.add(n);for(let t of e.querySelectorAll(`*`))c.add(t)}let l=new Set,u=[];for(let e of o){if(c.has(e))continue;let t=getComputedStyle(e);if(t.webkitLineClamp!==`none`){l.add(e);continue}!J.has(t.overflowX)&&!J.has(t.overflowY)||u.push(e)}for(let e of u)a.push({el:e,o:e.style.overflow,m:e.style.maxHeight}),e.style.overflow=`visible`,e.style.maxHeight=`none`;let d=e=>{for(let n=e;n&&n!==t;n=n.parentElement)if(l.has(n))return!0;return!1},f=e=>{let n=0,r=0;for(let i=e;i&&i!==t&&t.contains(i);i=i.offsetParent)n+=i.offsetLeft,r+=i.offsetTop;return{x:n,y:r}},p=t.scrollWidth,m=t.scrollHeight;for(let e of o)if(!c.has(e)&&!d(e)){if(e.scrollWidth>p&&(p=e.scrollWidth),e.scrollHeight>m&&(m=e.scrollHeight),e.scrollWidth>e.clientWidth+1){let t=f(e);t.x+e.scrollWidth>p&&(p=t.x+e.scrollWidth)}if(e.scrollHeight>e.clientHeight+1){let t=f(e);t.y+e.scrollHeight>m&&(m=t.y+e.scrollHeight)}}for(let e of l){let t=f(e);t.x+e.clientWidth>p&&(p=t.x+e.clientWidth),t.y+e.clientHeight>m&&(m=t.y+e.clientHeight)}for(let e of a)e.el.style.overflow=e.o,e.el.style.maxHeight=e.m;if(t.style.transform=i,!m||!p)return;let h=Math.min(1,n*.95/m,r*.92/p),g=Number.isFinite(h)&&h>0?Math.floor(h*1e3)/1e3:1,_=t.firstElementChild,v=_?.offsetWidth||p,y=_?f(_).x:0,b=Math.max(0,(r-v*g)/2-y*g),x=Math.max(0,(n-m*g)/2);s(e=>Math.abs(e.k-g)>.002||Math.abs(e.x-b)>.5||Math.abs(e.y-x)>.5?{k:g,x:b,y:x}:e)};n();let a=!1,o=0;typeof document<`u`&&document.fonts?.ready&&document.fonts.ready.then(()=>{a||(o=requestAnimationFrame(n))});let c=requestAnimationFrame(n),l=0,u=new ResizeObserver(()=>{cancelAnimationFrame(l),l=requestAnimationFrame(n)});return u.observe(e),u.observe(t),()=>{a=!0,u.disconnect(),cancelAnimationFrame(l),cancelAnimationFrame(c),cancelAnimationFrame(o)}},t[1]=l):l=t[1];let u;t[2]!==n||t[3]!==c?(u=[n,c],t[2]=n,t[3]=c,t[4]=u):u=t[4],(0,j.useLayoutEffect)(l,u);let d;t[5]===Symbol.for(`react.memo_cache_sentinel`)?(d={position:`absolute`,inset:0,overflow:`hidden`},t[5]=d):d=t[5];let f=`translate(${o.x}px, ${o.y}px) scale(${o.k})`,p;t[6]===f?p=t[7]:(p={position:`absolute`,left:0,top:0,transformOrigin:`top left`,transform:f},t[6]=f,t[7]=p);let m;return t[8]!==n||t[9]!==p?(m=(0,K.jsx)(`div`,{ref:r,style:d,children:(0,K.jsx)(`div`,{ref:i,style:p,children:n})}),t[8]=n,t[9]=p,t[10]=m):m=t[10],m}var de=[`up`,`left`,`zoom`,`wipe`,`fade`];function fe(e,t){let n=e/t;return n<.8?`9:16`:n<1.3?`1:1`:`16:9`}function pe(e){let t=e.clientWidth,n=e.clientHeight;if(!t||!n)return!1;let r=Math.min(t,n)/100,i=r*16/9,a=fe(t,n),o=`${r}px`,s=e.style.getPropertyValue(`--rw`)!==o||e.dataset.aspect!==a;return e.style.setProperty(`--ru`,`${i}px`),e.style.setProperty(`--rw`,o),e.dataset.aspect=a,s}var Y=e=>e.template!==`title`&&e.template!==`outro`,me=e=>e.template===`outro`,X=e=>e.template===`title`;function he(e,t){let n=0;for(let r=0;r<t&&r<e.length;r++)Y(e[r])&&n++;return n}function ge(e,t){let n=e[t];return n&&Y(n)?he(e,t):-1}function _e({script:e,timings:t,loop:n=!1,onDone:r,frameRef:i,playKey:a=0,playing:o=!0,initialIndex:s=0,onCycle:c,interactive:l=!1,paused:u,onPausedChange:d}){let f=e.slides,p=f.map((e,n)=>Math.max(800,Math.round(t?.[n]??e.durationMs))),m=Math.max(0,Math.min(s,f.length-1)),[h,g]=(0,j.useState)(m),[_,v]=(0,j.useState)(0),y=u!==void 0,[b,x]=(0,j.useState)(!1),S=y?u:b,w=(0,j.useCallback)(()=>{y?d?.(!S):x(e=>!e)},[y,S,d]),[T,ee]=(0,j.useState)(0),D=(0,j.useRef)(!1),O=(0,j.useRef)(null),A=(0,j.useRef)(null),te=(0,j.useRef)(i);te.current=i;let M=(0,j.useCallback)(e=>{A.current=e,te.current?.(e)},[]);(0,j.useEffect)(()=>{l&&A.current?.focus({preventScroll:!0})},[l]);let N=(0,j.useRef)(!1);N.current=S;let P=(0,j.useRef)(null),F=(0,j.useRef)(0),ne=(0,j.useCallback)(e=>{O.current=e,e&&pe(e)&&ee(e=>e+1)},[]);if((0,j.useLayoutEffect)(()=>{let e=O.current;if(!e)return;let t=new ResizeObserver(()=>{pe(e)&&ee(e=>e+1)});return t.observe(e),()=>t.disconnect()},[]),(0,j.useEffect)(()=>{o&&(D.current=!1,g(m),v(e=>e+1))},[a,o]),(0,j.useEffect)(()=>{if(!o||S||h>=f.length)return;let e=P.current??p[h];P.current=null,F.current=Date.now();let t=window.setTimeout(()=>{h+1<f.length?g(h+1):n?(g(0),v(e=>e+1),c?.()):D.current||(D.current=!0,r?.())},e);return()=>{window.clearTimeout(t),N.current&&(P.current=Math.max(0,e-(Date.now()-F.current)))}},[h,f.length,n,r,a,o,S]),(0,j.useEffect)(()=>{P.current=null},[h]),!f.length)return null;let I=f[Math.min(h,f.length-1)],L=he(f,h),R=ge(f,h),re=f.filter(Y).length,z=e=>{let t=-1;for(let n=0;n<f.length;n++)if(Y(f[n])&&t++,t===e){g(n),v(e=>e+1);return}},B=e=>{if(!re)return;let t=Y(I)?R+e:e>0?L:L-1;z(Math.max(0,Math.min(re-1,t)))},V=f.reduce((e,t,n)=>(X(t)&&e.push(n),e),[]),ie=e=>{if(V.length<=1)return;let t=V.filter(e=>e<=h).length-1;g(V[Math.max(0,Math.min(V.length-1,t+e))]),v(e=>e+1)},H=e=>{switch(e.key){case`ArrowRight`:e.preventDefault(),B(1);break;case`ArrowLeft`:e.preventDefault(),B(-1);break;case`ArrowDown`:e.preventDefault(),ie(1);break;case`ArrowUp`:e.preventDefault(),ie(-1);break;case` `:case`Spacebar`:e.preventDefault(),w();break;default:break}},ae=C(I.template)===`dark`,U=E(I.template),W=h===0?`fade`:de[(h+e.seed)%de.length];return(0,K.jsx)(`div`,{className:`reel`,"data-palette":e.palette,"data-vibe":e.vibe,ref:M,role:l?`application`:void 0,tabIndex:l?0:void 0,onKeyDown:l?H:void 0,"aria-label":l?`Reel preview. Left and right arrows step between beats, up and down jump sections, space bar pauses.`:void 0,children:(0,K.jsxs)(`div`,{className:`reel-board`,ref:ne,"data-surface":ae?`dark`:`light`,"data-bleed":U?`true`:`false`,children:[ae&&(0,K.jsx)(`div`,{className:`reel-darkwash`,"aria-hidden":`true`}),(0,K.jsx)(`div`,{className:`reel-progress`,"data-interactive":l,"aria-hidden":!l,children:Array.from({length:re},(e,t)=>{let n=t===R,r=t<L||me(I),i=(0,K.jsx)(`span`,{className:`reel-seg`,children:(0,K.jsx)(`i`,{style:n?{width:0,animation:`reel-seg-fill ${p[h]}ms linear forwards`,animationPlayState:S?`paused`:`running`}:{width:r?`100%`:`0%`}})},`seg`);return l?(0,K.jsx)(`button`,{type:`button`,className:`reel-seg-hit`,onClick:()=>z(t),"aria-label":`Jump to beat ${t+1}`,children:i},t):(0,K.jsx)(`span`,{className:`reel-seg-hit`,children:i},t)})}),(0,K.jsxs)(`div`,{className:`reel-top`,children:[(0,K.jsxs)(`span`,{className:`reel-wordmark`,children:[(0,K.jsx)(`span`,{className:`reel-dot`,"aria-hidden":`true`}),`Mavéa`]}),(0,K.jsx)(`span`,{className:`reel-palettename`,children:e.palette})]}),!U&&(0,K.jsx)(`div`,{className:`reel-jelly-pos`,"aria-hidden":`true`,children:(0,K.jsx)(k,{})}),(0,K.jsx)(`div`,{className:`reel-stage`,children:(0,K.jsx)(`div`,{className:`reel-trans`,"data-trans":W,children:(0,K.jsx)(le.Provider,{value:T,children:(0,K.jsx)(ue,{children:(0,K.jsx)(q,{slide:I})})})},`${_}-${h}`)}),(0,K.jsx)(`div`,{className:`reel-pause-badge`,"data-show":l&&S,"aria-hidden":`true`,children:(0,K.jsxs)(`div`,{className:`reel-pause-glyph`,children:[(0,K.jsx)(`span`,{}),(0,K.jsx)(`span`,{})]})})]})})}function ve(e){let t=[],n=A(e,null);return e.forEach((e,r)=>{t.length===0||n[r]?t.push([e]):t[t.length-1].push(e)}),t}var ye=/^(how|what|why|should|can|could|would|will|plan|show|make|build|tell|give|explain|who|when|where|which|is|are|do|does|did|help|me)\b[\s,]*/i,be=/\s*[,;:]\s+|\s+—\s+|\s+–\s+|\s+\band\b\s+|\s+\bbut\b\s+|\s+\bso\b\s+/i;function xe(e){let t=e[0];if(!t)return``;let n=t.spec?.title?.trim();if(n)return y(n,b.heading);let r=(t.question||``).trim();if(!r)return``;let i=r.replace(ye,``).replace(/[?!.]+$/,``).trim(),a=(i.split(be)[0]||``).trim()||i;return a?y(a.charAt(0).toUpperCase()+a.slice(1),b.heading):``}r();var Se={palette:`aurora`,vibe:`clean`,maxSlides:6};function Z(e){return y(e[0]?.question||e[0]?.spec?.title||`Mavéa`,b.title)}function Q(e){return e[0]?.spec?.topic||e[0]?.spec?.title||Z(e)}function Ce(e){return(e||``).replace(/\s+/g,` `).split(/(?<=[.!?])\s+/).map(e=>e.trim()).filter(e=>e.length>1)}function we(e){return(e.narration||e.spec?.found||e.spec?.sub||``).trim()}function Te(e){return(e.spoken||e.narration||e.spec?.found||e.spec?.sub||``).trim()}var Ee=0;function De(e,t,n,r,i){let a=y(m(r.voiceover),b.voiceover);return{id:`s${Ee++}`,content:e,template:t,slots:w(e,n,i),voiceover:a,durationMs:Math.max(r.ms,a?Math.round(a.length/13*1e3)+500:0),sourceBlockId:r.sourceBlockId}}function Oe(e,t,n,r,i,a){return De(e,D(e,i,a,S(e,t)),t,n,r)}function ke(e,t){return Math.max(1,Math.min(t,Math.floor((e-1)/2)))}function Ae(e,t,n=0){let r=Math.max(t,e-1-t);return Math.max(1,Math.floor(r/t)+ +(n<r%t))}function je(e,t,n,r){let i=Z(e.frames);return De(`title`,`title`,{question:i,kicker:e.heading||xe(e.frames)||void 0,part:n>1?{index:t+1,count:n}:void 0},{voiceover:i,ms:x.intro},r)}function Me(e,t,n){let r=e.flatMap(e=>e.frames),i=Z(r),a=Q(r),o=[];e.forEach((t,n)=>{let r={topic:Q(t.frames),question:Z(t.frames)};o.push(je(t,n,e.length,r)),o.push(...t.content)});let s={topic:a,question:i};return o.push(De(`outro`,`outro`,{wordmark:`Mavéa`,tagline:`Talk to AI. See what it means.`},{voiceover:`Made with Mavéa.`,ms:x.outro},s)),{topic:a,question:i,palette:t.palette,vibe:t.vibe,seed:n,slides:o,durationMs:o.reduce((e,t)=>e+t.durationMs,0)}}function Ne(e,t){return{...e,seed:t,slides:e.slides.map((e,n)=>e.content===`title`||e.content===`outro`?e:{...e,template:D(e.content,t,n,S(e.content,e.slots),e.template)})}}function Pe(e,t,n){let r=e.flatMap(e=>e.spec?.blocks??[]).map(e=>({shown:p((e.note||``).trim()),spoken:m((e.noteSpoken||e.note||``).trim())})).filter(e=>e.shown.length>8),i=r.map(e=>e.shown),a=r.map(e=>e.spoken||e.shown),o=[];if(e.forEach((e,t)=>{let n=we(e),r=Ce(Te(e)),s=Ce(p(n));s.length&&o.push({speaksFor:t,covers:!0,content:`quote`,raw:{quote:s[0]},voiceover:r.slice(0,2).join(` `)}),t===0&&i.length>=2&&o.push({speaksFor:t,covers:!1,content:`list`,raw:{items:i.slice(0,4)},voiceover:a.slice(0,3).join(`. `)})}),!o.length){let e=t.question;o.push({speaksFor:0,covers:!0,content:`quote`,raw:{quote:e},voiceover:e})}let s=new Set;for(let e of[!0,!1])for(let t of o){if(s.size>=n)break;t.covers===e&&!s.has(t)&&s.add(t)}return o.filter(e=>s.has(e)).map((e,n)=>Oe(e.content,e.raw,{voiceover:e.voiceover,ms:x.default},t,0,n+1))}function Fe(e,t){let n=ve(e);return n.slice(-ke(t,n.length))}function Ie(e,t={}){let n={...Se,...t},r=Fe(e,n.maxSlides);return Me(r.map((e,t)=>({frames:e,content:Pe(e,{topic:Q(e),question:Z(e)},Ae(n.maxSlides,r.length,t))})),n,0)}var $=v,Le=`You are Mavéa's reel director. You recut a finished conversation into a short, vertical (9:16) social video — a sequence of card "beats" for TikTok/Reels/Shorts. Each beat is ONE card with very little room.
|
|
3
3
|
|
|
4
4
|
Return ONLY JSON: {"heading": <string>, "slides":[{ "type": <content-type>, "slots": {…}, "voiceover": <string> }]}. Give 3 to 5 content beats (the intro question and the outro are added for you — do NOT include them).
|
|
5
5
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t as e}from"./react-BQSORdFI.js";import{t}from"./jsx-runtime-DaSxXjOY.js";import{ht as n}from"./index-
|
|
1
|
+
import{t as e}from"./react-BQSORdFI.js";import{t}from"./jsx-runtime-DaSxXjOY.js";import{ht as n}from"./index-C7H7A1rW.js";import{t as r}from"./colors-D49Req-e.js";var i=e(),a=n(),o=t();function s(e){return e===`P0`?`var(--danger)`:`var(--warning)`}function c(){let e=(0,a.c)(1),t;return e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,o.jsx)(`svg`,{className:`ripple-casc-chevron`,viewBox:`0 0 16 16`,"aria-hidden":`true`,focusable:`false`,children:(0,o.jsx)(`path`,{d:`M5.5 3.5 L10 8 L5.5 12.5`,fill:`none`,stroke:`currentColor`,strokeWidth:`1.6`,strokeLinecap:`round`,strokeLinejoin:`round`})}),e[0]=t):t=e[0],t}function l(){let e=(0,a.c)(1),t;return e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,o.jsxs)(`svg`,{className:`ripple-casc-check`,viewBox:`0 0 18 18`,"aria-hidden":`true`,focusable:`false`,children:[(0,o.jsx)(`circle`,{cx:`9`,cy:`9`,r:`8`,fill:`none`,stroke:`currentColor`,strokeWidth:`1.4`}),(0,o.jsx)(`path`,{d:`M5.5 9.2 L8 11.6 L12.5 6.4`,fill:`none`,stroke:`currentColor`,strokeWidth:`1.6`,strokeLinecap:`round`,strokeLinejoin:`round`})]}),e[0]=t):t=e[0],t}function u({cascade:e}){return(0,o.jsxs)(`div`,{className:`ripple-casc-row`,children:[(0,o.jsxs)(`article`,{className:`ripple-casc-card ripple-casc-trigger`,style:{"--casc-tint":`var(--presence)`},children:[(0,o.jsxs)(`div`,{className:`ripple-casc-eyebrow`,children:[(0,o.jsx)(`span`,{className:`ripple-eyebrow`,children:`Your change`}),e.triggerRef?.ref&&(0,o.jsx)(`code`,{className:`ripple-casc-ref`,children:e.triggerRef.ref})]}),(0,o.jsx)(`p`,{className:`ripple-casc-title`,children:e.trigger})]}),e.hops.map((e,t)=>(0,o.jsxs)(`div`,{className:`ripple-casc-step`,children:[(0,o.jsx)(c,{}),(0,o.jsxs)(`article`,{className:`ripple-casc-card ripple-casc-hop`,style:{"--casc-tint":r(e.severity)},children:[(0,o.jsx)(`div`,{className:`ripple-eyebrow ripple-casc-hop-eyebrow`,children:e.context}),(0,o.jsx)(`p`,{className:`ripple-casc-title`,children:e.label})]})]},`${e.context}-${t}`)),(0,o.jsxs)(`div`,{className:`ripple-casc-step`,children:[(0,o.jsx)(c,{}),(0,o.jsxs)(`article`,{className:`ripple-casc-card ripple-casc-incident`,children:[(0,o.jsxs)(`div`,{className:`ripple-casc-incident-top`,children:[(0,o.jsx)(`span`,{className:`ripple-casc-sev`,style:{"--casc-sev":s(e.incidentSeverity)},children:e.incidentSeverity}),(0,o.jsx)(`span`,{className:`ripple-eyebrow ripple-casc-incident-label`,children:`Incident`})]}),(0,o.jsx)(`p`,{className:`ripple-casc-incident-text`,children:e.incident})]})]})]})}function d({model:e}){let{cascades:t}=e,[n,r]=(0,i.useState)(()=>new Set),a=e=>r(t=>{let n=new Set(t);return n.has(e)?n.delete(e):n.add(e),n});return t.length===0?(0,o.jsx)(`div`,{className:`ripple-casc-empty`,role:`status`,children:`No cascade found — nothing in this change reaches far enough to page someone.`}):(0,o.jsxs)(`section`,{className:`ripple-casc`,"aria-label":`How one line becomes an incident`,children:[(0,o.jsxs)(`header`,{className:`ripple-casc-intro`,children:[(0,o.jsx)(`div`,{className:`ripple-eyebrow`,children:`The cascade`}),(0,o.jsx)(`p`,{className:`ripple-casc-lede`,children:`Each chain is one line turning into a page — read it left to right, then read how it’s caught.`})]}),t.map((e,t)=>{let r=n.has(t),i=`ripple-casc-${t}`;return(0,o.jsxs)(`div`,{className:`ripple-casc-item`,children:[t>0&&(0,o.jsx)(`div`,{className:`ripple-casc-divider`,"aria-hidden":`true`}),(0,o.jsxs)(`button`,{type:`button`,className:`ripple-casc-bar`,"aria-expanded":!r,"aria-controls":i,onClick:()=>a(t),children:[(0,o.jsx)(`span`,{className:`ripple-casc-bar-sev`,style:{"--casc-sev":s(e.incidentSeverity)},"aria-hidden":`true`,children:e.incidentSeverity}),(0,o.jsxs)(`span`,{className:`ripple-casc-bar-text`,id:i,children:[e.trigger,` `,(0,o.jsx)(`span`,{className:`ripple-casc-bar-arrow`,children:`→`}),` `,(0,o.jsx)(`strong`,{children:e.incident})]}),(0,o.jsx)(`span`,{className:`ripple-casc-bar-toggle`,"aria-hidden":`true`,children:r?`Show chain`:`Hide chain`})]}),!r&&(0,o.jsxs)(`div`,{className:`ripple-casc-detail`,children:[(0,o.jsx)(`div`,{className:`ripple-casc-scroll`,children:(0,o.jsx)(u,{cascade:e})}),(0,o.jsxs)(`p`,{className:`ripple-casc-resolution`,children:[(0,o.jsx)(`span`,{className:`ripple-casc-resolution-icon`,"aria-hidden":`true`,children:(0,o.jsx)(l,{})}),(0,o.jsxs)(`span`,{className:`ripple-casc-resolution-text`,children:[(0,o.jsx)(`strong`,{children:`Caught before merge.`}),` `,e.caughtBeforeMerge]})]})]})]},`${e.trigger}-${t}`)})]})}export{d as ShipCascade};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t as e}from"./react-BQSORdFI.js";import{t}from"./jsx-runtime-DaSxXjOY.js";import{ht as n}from"./index-DOpl5xzv.js";import{t as r}from"./DropSelect-CeCNaut0.js";import{n as i}from"./store-DXmC_fP2.js";import{v as a}from"./githubToken-DtcLYqwm.js";import{n as o,t as s}from"./courseStore-DfafnL-9.js";import{t as c}from"./links--u_phi0x.js";var l=e(),u=n(),d=`mavea.ripple.course.v2`,f=`mavea.ripple.course.v1`;function p(){try{let e=localStorage.getItem(f);if(!e)return{};let t=JSON.parse(e);if(!t||typeof t!=`object`||Array.isArray(t))return{};let n={};for(let[e,r]of Object.entries(t))Array.isArray(r)&&(n[e]={lessons:r.filter(e=>typeof e==`number`)});return Object.keys(n).length>0&&h(n),n}catch{return{}}}function m(){try{let e=localStorage.getItem(d);if(e===null)return p();let t=JSON.parse(e);return t&&typeof t==`object`&&!Array.isArray(t)?t:{}}catch{return{}}}function h(e){try{localStorage.setItem(d,JSON.stringify(e))}catch{}}function g(e){return new Set(m()[e]?.lessons??[])}function _(e,t,n){let r=m(),i=new Set(r[e]?.lessons??[]);return n?i.add(t):i.delete(t),r[e]={...r[e],lessons:[...i].sort((e,t)=>e-t)},h(r),i}function v(e){return m()[e]?.quiz}function y(e,t,n){let r=m();r[e]={lessons:r[e]?.lessons??[],quiz:{correct:t,total:n,passedAt:Date.now()}},h(r)}function b(e,t){return t>0&&e>=t-1}function x(e){return!!(!(e.lessonsTotal>0&&e.lessonsDone>=e.lessonsTotal)||e.hasQuiz&&!e.quizPassed)}var S=t();function C(e){let t=(0,u.c)(86),{course:n,lesson:r,altitude:i,fileUrl:a,loadLessonDetail:o,speak:s,onAskAboutLesson:c}=e,[d,f]=(0,l.useState)(r.detail??null),[p,m]=(0,l.useState)(`idle`),[h,g]=(0,l.useState)(null),_=(0,l.useRef)(!1),v=(0,l.useRef)(!0),y=(0,l.useRef)(null),b=(0,l.useRef)(0),x,C;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(x=()=>()=>{v.current=!1,y.current!==null&&clearTimeout(y.current)},C=[],t[0]=x,t[1]=C):(x=t[0],C=t[1]),(0,l.useEffect)(x,C);let k;t[2]!==i||t[3]!==n||t[4]!==r||t[5]!==o?(k=e=>{if(!o)return;y.current!==null&&clearTimeout(y.current);let t=b.current+=1;m(`loading`),f(null);let a=s=>{o(n,r,e,i).then(e=>{!v.current||t!==b.current||(e?(f(e),m(`idle`)):s>0?y.current=setTimeout(()=>a(s-1),2e3):m(`error`))})};a(1)},t[2]=i,t[3]=n,t[4]=r,t[5]=o,t[6]=k):k=t[6];let A=k,j;t[7]!==r.detail||t[8]!==o||t[9]!==A?(j=()=>{if(r.detail){f(r.detail);return}!o||_.current||(_.current=!0,A(!1))},t[7]=r.detail,t[8]=o,t[9]=A,t[10]=j):j=t[10];let M;t[11]!==r||t[12]!==o||t[13]!==A?(M=[r,o,A],t[11]=r,t[12]=o,t[13]=A,t[14]=M):M=t[14],(0,l.useEffect)(j,M);let N;t[15]===d?.walkthrough?N=t[16]:(N=d?.walkthrough??[],t[15]=d?.walkthrough,t[16]=N);let P=N,F,I;t[17]!==s||t[18]!==h||t[19]!==P?(F=()=>{if(h===null||!s)return;let e=P[h];e&&s(`${e.focus?e.focus+`. `:``}${e.explain}`)},I=[h,P,s],t[17]=s,t[18]=h,t[19]=P,t[20]=F,t[21]=I):(F=t[20],I=t[21]),(0,l.useEffect)(F,I);let L=r.goal,R=r.explainFor?.[i]??r.goal,z;t[22]!==n||t[23]!==L||t[24]!==r.title||t[25]!==c?(z=c&&(0,S.jsx)(`button`,{type:`button`,className:`ripple-lesson-ask`,onClick:()=>c(`In "${n.title}" — ${r.title}: ${L||`what should I understand here?`}`),children:`Ask about this lesson`}),t[22]=n,t[23]=L,t[24]=r.title,t[25]=c,t[26]=z):z=t[26];let B=z;if(d){let e,n,r;if(t[27]!==B||t[28]!==d.overview||t[29]!==L){let i=d.overview.split(/\n\n+/).filter(te);t[33]===L?e=t[34]:(e=L&&(0,S.jsx)(`p`,{className:`ripple-course-lede`,children:L}),t[33]=L,t[34]=e),n=B,r=i.length>0&&(0,S.jsx)(`div`,{className:`ripple-lesson-overview`,children:i.map(ee)}),t[27]=B,t[28]=d.overview,t[29]=L,t[30]=e,t[31]=n,t[32]=r}else e=t[30],n=t[31],r=t[32];let i;t[35]!==a||t[36]!==h||t[37]!==P?(i=P.length>0&&(0,S.jsxs)(`section`,{className:`ripple-course-group`,children:[(0,S.jsxs)(`div`,{className:`ripple-lesson-spot-head`,children:[(0,S.jsx)(`div`,{className:`ripple-eyebrow`,children:`Spotlight — walk the real code`}),(0,S.jsxs)(`button`,{type:`button`,className:`ripple-course-reveal`,onClick:()=>g(0),"aria-label":`Step through the code one part at a time`,children:[`▶ Step through (`,P.length,`)`]})]}),h===null?(0,S.jsx)(`ol`,{className:`ripple-walk`,children:P.map((e,t)=>(0,S.jsxs)(`li`,{className:`ripple-walk-step`,children:[(0,S.jsxs)(`div`,{className:`ripple-walk-where`,children:[(0,S.jsx)(`span`,{className:`ripple-walk-num`,"aria-hidden":`true`,children:t+1}),(0,S.jsx)(O,{file:e.file,focus:e.focus,url:a(e.file)})]}),e.code&&(0,S.jsx)(`pre`,{className:`ripple-walk-code`,children:(0,S.jsx)(`code`,{children:e.code})}),(0,S.jsx)(`p`,{className:`ripple-walk-explain`,children:e.explain})]},t))}):(0,S.jsx)(ne,{steps:P,index:h,fileUrl:a,onPrev:()=>g(D),onNext:()=>g(e=>e===null?null:Math.min(P.length-1,e+1)),onClose:()=>g(null)})]}),t[35]=a,t[36]=h,t[37]=P,t[38]=i):i=t[38];let s;t[39]===d.concepts?s=t[40]:(s=d.concepts.length>0&&(0,S.jsxs)(`section`,{className:`ripple-course-group`,children:[(0,S.jsx)(`div`,{className:`ripple-eyebrow`,children:`Key concepts`}),(0,S.jsx)(`dl`,{className:`ripple-lesson-concepts`,children:d.concepts.map(E)})]}),t[39]=d.concepts,t[40]=s);let c;t[41]===d.pitfalls?c=t[42]:(c=d.pitfalls&&d.pitfalls.length>0&&(0,S.jsxs)(`section`,{className:`ripple-course-caution`,role:`note`,children:[(0,S.jsx)(`div`,{className:`ripple-eyebrow`,children:`Watch out for`}),(0,S.jsx)(`ul`,{className:`ripple-lesson-pitfalls`,children:d.pitfalls.map(T)})]}),t[41]=d.pitfalls,t[42]=c);let l;t[43]===d.exercise?l=t[44]:(l=d.exercise&&(0,S.jsxs)(`section`,{className:`ripple-course-group ripple-lesson-exercise`,children:[(0,S.jsx)(`div`,{className:`ripple-eyebrow`,children:`Try it`}),(0,S.jsx)(`p`,{className:`ripple-lesson-task`,children:d.exercise.task}),d.exercise.hint&&(0,S.jsxs)(`p`,{className:`ripple-lesson-hint`,children:[`Hint — `,d.exercise.hint]}),d.exercise.check&&(0,S.jsxs)(`p`,{className:`ripple-lesson-check`,children:[`How you’ll know it worked — `,d.exercise.check]})]}),t[43]=d.exercise,t[44]=l);let u;t[45]!==o||t[46]!==A?(u=o&&(0,S.jsx)(`button`,{type:`button`,className:`ripple-lesson-regen`,onClick:()=>A(!0),title:`Rewrite this lesson from the latest code`,children:`↻ Rewrite this lesson`}),t[45]=o,t[46]=A,t[47]=u):u=t[47];let f;return t[48]!==e||t[49]!==n||t[50]!==r||t[51]!==i||t[52]!==s||t[53]!==c||t[54]!==l||t[55]!==u?(f=(0,S.jsxs)(S.Fragment,{children:[e,n,r,i,s,c,l,u]}),t[48]=e,t[49]=n,t[50]=r,t[51]=i,t[52]=s,t[53]=c,t[54]=l,t[55]=u,t[56]=f):f=t[56],f}if(p===`loading`){let e,n;t[57]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,S.jsx)(`span`,{className:`ripple-sharpening-dot`,"aria-hidden":`true`}),n=(0,S.jsx)(`div`,{className:`ripple-course-skeleton-title`,children:`Writing this lesson from the real code…`}),t[57]=e,t[58]=n):(e=t[57],n=t[58]);let i;t[59]===r.read?i=t[60]:(i=r.read.slice(0,3).join(`, `)||`the relevant files`,t[59]=r.read,t[60]=i);let a;return t[61]===i?a=t[62]:(a=(0,S.jsxs)(`div`,{className:`ripple-course-skeleton`,role:`status`,"aria-live":`polite`,children:[e,n,(0,S.jsxs)(`div`,{className:`ripple-course-skeleton-sub`,children:[`Reading `,i,` to teach it properly — with a walk through the actual code.`]})]}),t[61]=i,t[62]=a),a}if(p===`error`){let e;t[63]===L?e=t[64]:(e=L&&(0,S.jsx)(`p`,{className:`ripple-course-lede`,children:L}),t[63]=L,t[64]=e);let n;t[65]===Symbol.for(`react.memo_cache_sentinel`)?(n=(0,S.jsx)(`p`,{children:`Couldn’t write this lesson from the code just now.`}),t[65]=n):n=t[65];let r;t[66]===A?r=t[67]:(r=(0,S.jsx)(`button`,{type:`button`,className:`ripple-course-reveal`,onClick:()=>A(!0),children:`Try again`}),t[66]=A,t[67]=r);let i;return t[68]!==e||t[69]!==r?(i=(0,S.jsxs)(`div`,{className:`ripple-course-empty`,children:[e,n,r]}),t[68]=e,t[69]=r,t[70]=i):i=t[70],i}let re;t[71]===R?re=t[72]:(re=(0,S.jsx)(`p`,{className:`ripple-course-explain`,children:R}),t[71]=R,t[72]=re);let ie;t[73]!==a||t[74]!==r.read?(ie=r.read.length>0&&(0,S.jsxs)(`section`,{className:`ripple-course-group`,children:[(0,S.jsx)(`div`,{className:`ripple-eyebrow`,children:`Open and read`}),(0,S.jsx)(`div`,{className:`ripple-course-files`,children:r.read.map(e=>(0,S.jsx)(O,{file:e,url:a(e)},e))})]}),t[73]=a,t[74]=r.read,t[75]=ie):ie=t[75];let ae;t[76]===r.concepts?ae=t[77]:(ae=r.concepts.length>0&&(0,S.jsxs)(`section`,{className:`ripple-course-group`,children:[(0,S.jsx)(`div`,{className:`ripple-eyebrow`,children:`Key concepts`}),(0,S.jsx)(`ul`,{className:`ripple-course-concepts`,children:r.concepts.map(w)})]}),t[76]=r.concepts,t[77]=ae);let V;t[78]===r.caution?V=t[79]:(V=r.caution&&(0,S.jsxs)(`section`,{className:`ripple-course-caution`,role:`note`,children:[(0,S.jsx)(`div`,{className:`ripple-eyebrow`,children:`Be careful here — and why`}),(0,S.jsx)(`p`,{className:`ripple-course-caution-text`,children:r.caution})]}),t[78]=r.caution,t[79]=V);let oe;return t[80]!==B||t[81]!==re||t[82]!==ie||t[83]!==ae||t[84]!==V?(oe=(0,S.jsxs)(S.Fragment,{children:[re,B,ie,ae,V]}),t[80]=B,t[81]=re,t[82]=ie,t[83]=ae,t[84]=V,t[85]=oe):oe=t[85],oe}function w(e,t){return(0,S.jsx)(`li`,{children:e},t)}function T(e,t){return(0,S.jsx)(`li`,{children:e},t)}function E(e,t){return(0,S.jsxs)(`div`,{children:[(0,S.jsx)(`dt`,{children:e.term}),(0,S.jsx)(`dd`,{children:e.explain})]},t)}function D(e){return e===null?null:Math.max(0,e-1)}function ee(e,t){return(0,S.jsx)(`p`,{children:e},t)}function te(e){return e.trim().length>0}function O(e){let t=(0,u.c)(3),{file:n,focus:r,url:i}=e,a=r?`${n} · ${r}`:n,o;return t[0]!==a||t[1]!==i?(o=i?(0,S.jsxs)(`a`,{className:`ripple-course-file ripple-course-file-link`,href:i,target:`_blank`,rel:`noreferrer noopener`,children:[a,` ↗`]}):(0,S.jsx)(`code`,{className:`ripple-course-file`,children:a}),t[0]=a,t[1]=i,t[2]=o):o=t[2],o}function ne(e){let t=(0,u.c)(36),{steps:n,index:r,fileUrl:i,onPrev:a,onNext:o,onClose:s}=e,c=n[r],l=r+1,d;t[0]!==n.length||t[1]!==l?(d=(0,S.jsxs)(`span`,{className:`ripple-spotlight-count`,children:[l,` / `,n.length]}),t[0]=n.length,t[1]=l,t[2]=d):d=t[2];let f=c.file,p=c.focus,m;t[3]!==i||t[4]!==c.file?(m=i(c.file),t[3]=i,t[4]=c.file,t[5]=m):m=t[5];let h;t[6]!==c.file||t[7]!==c.focus||t[8]!==m?(h=(0,S.jsx)(O,{file:f,focus:p,url:m}),t[6]=c.file,t[7]=c.focus,t[8]=m,t[9]=h):h=t[9];let g;t[10]===s?g=t[11]:(g=(0,S.jsx)(`button`,{type:`button`,className:`ripple-spotlight-x`,onClick:s,"aria-label":`Exit spotlight`,children:`✕`}),t[10]=s,t[11]=g);let _;t[12]!==d||t[13]!==h||t[14]!==g?(_=(0,S.jsxs)(`div`,{className:`ripple-spotlight-bar`,children:[d,h,g]}),t[12]=d,t[13]=h,t[14]=g,t[15]=_):_=t[15];let v;t[16]===c.code?v=t[17]:(v=c.code&&(0,S.jsx)(`pre`,{className:`ripple-walk-code ripple-spotlight-code`,children:(0,S.jsx)(`code`,{children:c.code})}),t[16]=c.code,t[17]=v);let y;t[18]===c.explain?y=t[19]:(y=(0,S.jsx)(`p`,{className:`ripple-spotlight-explain`,children:c.explain}),t[18]=c.explain,t[19]=y);let b=r===0,x;t[20]!==a||t[21]!==b?(x=(0,S.jsx)(`button`,{type:`button`,className:`ripple-course-skip`,onClick:a,disabled:b,children:`← Back`}),t[20]=a,t[21]=b,t[22]=x):x=t[22];let C;t[23]!==r||t[24]!==s||t[25]!==o||t[26]!==n.length?(C=r<n.length-1?(0,S.jsx)(`button`,{type:`button`,className:`ripple-course-done`,onClick:o,children:`Next →`}):(0,S.jsx)(`button`,{type:`button`,className:`ripple-course-done`,onClick:s,children:`Done ✓`}),t[23]=r,t[24]=s,t[25]=o,t[26]=n.length,t[27]=C):C=t[27];let w;t[28]!==x||t[29]!==C?(w=(0,S.jsxs)(`div`,{className:`ripple-spotlight-nav`,children:[x,C]}),t[28]=x,t[29]=C,t[30]=w):w=t[30];let T;return t[31]!==y||t[32]!==w||t[33]!==_||t[34]!==v?(T=(0,S.jsxs)(`div`,{className:`ripple-spotlight`,role:`group`,"aria-label":`Code spotlight`,children:[_,v,y,w]}),t[31]=y,t[32]=w,t[33]=_,t[34]=v,t[35]=T):T=t[35],T}function k(e){let t=(0,u.c)(56),{questions:n,onFinish:r,children:i}=e,[a,o]=(0,l.useState)(0),[s,c]=(0,l.useState)(`ask`),[d,f]=(0,l.useState)(null),[p,m]=(0,l.useState)(!1),[h,g]=(0,l.useState)(0),[_,v]=(0,l.useState)(!1),[y,x]=(0,l.useState)(null),C=n.length,w=n[Math.min(a,C-1)],T=!!(w.choices&&w.choices.length>=2&&w.correct!==void 0),E;t[0]===s?E=t[1]:(E=e=>{s!==`graded`&&(m(e),c(`graded`),e&&g(j))},t[0]=s,t[1]=E);let D=E,ee;t[2]!==D||t[3]!==s||t[4]!==w.correct?(ee=e=>{s!==`graded`&&(f(e),D(e===w.correct))},t[2]=D,t[3]=s,t[4]=w.correct,t[5]=ee):ee=t[5];let te=ee,O;t[6]===s?O=t[7]:(O=()=>{s===`ask`&&c(`revealed`)},t[6]=s,t[7]=O);let ne=O,k;t[8]!==h||t[9]!==a||t[10]!==r||t[11]!==C?(k=()=>{if(a+1>=C){let e={correct:h,total:C};x(e),v(!0),r?.(e);return}o(A),c(`ask`),f(null),m(!1)},t[8]=h,t[9]=a,t[10]=r,t[11]=C,t[12]=k):k=t[12];let M=k;if(_&&y){let e=y.total-y.correct,n=b(y.correct,y.total),r=n?`true`:void 0,a;t[13]!==y.correct||t[14]!==y.total?(a=(0,S.jsxs)(`div`,{className:`ripple-quiz-score-num`,children:[y.correct,`/`,y.total]}),t[13]=y.correct,t[14]=y.total,t[15]=a):a=t[15];let o=n?`You know this one — nice work.`:`Worth another pass — ${e} to revisit.`,s;t[16]===o?s=t[17]:(s=(0,S.jsx)(`p`,{className:`ripple-quiz-score-text`,children:o}),t[16]=o,t[17]=s);let c;t[18]!==r||t[19]!==a||t[20]!==s?(c=(0,S.jsxs)(`div`,{className:`ripple-quiz-score`,"data-passed":r,role:`status`,children:[a,s]}),t[18]=r,t[19]=a,t[20]=s,t[21]=c):c=t[21];let l;return t[22]!==i||t[23]!==c?(l=(0,S.jsxs)(`div`,{className:`ripple-quiz-done`,children:[c,i]}),t[22]=i,t[23]=c,t[24]=l):l=t[24],l}let N=`Question ${a+1} of ${C}`,P=a+1,F;t[25]!==P||t[26]!==C?(F=(0,S.jsxs)(`div`,{className:`ripple-quiz-progress`,children:[`Question `,P,` of `,C]}),t[25]=P,t[26]=C,t[27]=F):F=t[27];let I;t[28]===w.question?I=t[29]:(I=(0,S.jsx)(`p`,{className:`ripple-course-q`,children:w.question}),t[28]=w.question,t[29]=I);let L;t[30]!==D||t[31]!==T||t[32]!==s||t[33]!==te||t[34]!==d||t[35]!==w.answer||t[36]!==w.choices||t[37]!==w.correct||t[38]!==ne?(L=T?(0,S.jsx)(`ul`,{className:`ripple-quiz-choices`,children:w.choices.map((e,t)=>{let n=`idle`;return s===`graded`&&(t===w.correct?n=`correct`:t===d&&(n=`wrong`)),(0,S.jsx)(`li`,{children:(0,S.jsx)(`button`,{type:`button`,className:`ripple-quiz-choice`,"data-state":n,onClick:()=>te(t),disabled:s===`graded`,"aria-pressed":d===t,children:e})},t)})}):(0,S.jsxs)(`div`,{className:`ripple-quiz-plain`,children:[s===`ask`&&(0,S.jsx)(`button`,{type:`button`,className:`ripple-course-reveal`,onClick:ne,children:`Show answer`}),s!==`ask`&&(0,S.jsx)(`p`,{className:`ripple-course-a`,children:w.answer}),s===`revealed`&&(0,S.jsxs)(`div`,{className:`ripple-quiz-selfgrade`,children:[(0,S.jsx)(`span`,{className:`ripple-quiz-selfgrade-prompt`,children:`Did you get it?`}),(0,S.jsx)(`button`,{type:`button`,className:`ripple-quiz-selfgrade-btn`,"data-answer":`yes`,onClick:()=>D(!0),children:`Yes, I had it`}),(0,S.jsx)(`button`,{type:`button`,className:`ripple-quiz-selfgrade-btn`,"data-answer":`no`,onClick:()=>D(!1),children:`Not quite`})]})]}),t[30]=D,t[31]=T,t[32]=s,t[33]=te,t[34]=d,t[35]=w.answer,t[36]=w.choices,t[37]=w.correct,t[38]=ne,t[39]=L):L=t[39];let R;t[40]!==s||t[41]!==w.explain||t[42]!==p?(R=s===`graded`&&(0,S.jsxs)(`div`,{className:`ripple-quiz-feedback`,"data-right":p?`true`:void 0,children:[(0,S.jsx)(`p`,{className:`ripple-quiz-feedback-label`,children:p?`Correct`:`Not quite`}),w.explain&&(0,S.jsx)(`p`,{className:`ripple-quiz-explain`,children:w.explain})]}),t[40]=s,t[41]=w.explain,t[42]=p,t[43]=R):R=t[43];let z;t[44]!==M||t[45]!==a||t[46]!==s||t[47]!==C?(z=s===`graded`&&(0,S.jsx)(`div`,{className:`ripple-quiz-actions`,children:(0,S.jsx)(`button`,{type:`button`,className:`ripple-course-done`,onClick:M,children:a+1>=C?`See your score →`:`Next question →`})}),t[44]=M,t[45]=a,t[46]=s,t[47]=C,t[48]=z):z=t[48];let B;return t[49]!==R||t[50]!==z||t[51]!==N||t[52]!==F||t[53]!==I||t[54]!==L?(B=(0,S.jsxs)(`div`,{className:`ripple-quiz`,role:`group`,"aria-label":N,children:[F,I,L,R,z]}),t[49]=R,t[50]=z,t[51]=N,t[52]=F,t[53]=I,t[54]=L,t[55]=B):B=t[55],B}function A(e){return e+1}function j(e){return e+1}var M=e=>e.slice(0,7),N={beginner:`Beginner`,intermediate:`Intermediate`,expert:`Expert`};function P({title:e,sub:t,preview:n=!1}){return(0,S.jsxs)(`div`,{className:`ripple-course-skeleton`+(n?` ripple-course-skeleton--preview`:``),role:`status`,"aria-live":`polite`,children:[(0,S.jsxs)(`div`,{className:`ripple-course-skeleton-head`,children:[(0,S.jsx)(`span`,{className:`ripple-sharpening-dot`,"aria-hidden":`true`}),(0,S.jsx)(`div`,{className:`ripple-course-skeleton-title`,children:e})]}),(0,S.jsx)(`div`,{className:`ripple-course-skeleton-sub`,children:t}),(0,S.jsx)(`div`,{className:`ripple-progress`,"aria-hidden":`true`}),n&&(0,S.jsx)(`div`,{className:`ripple-course-skeleton-lessons`,"aria-hidden":`true`,children:[0,1,2,3].map(e=>(0,S.jsxs)(`div`,{className:`ripple-skel-lesson`,children:[(0,S.jsx)(`span`,{className:`ripple-skel-bar ripple-skel-step`}),(0,S.jsxs)(`span`,{className:`ripple-skel-lines`,children:[(0,S.jsx)(`span`,{className:`ripple-skel-bar ripple-skel-line-title`}),(0,S.jsx)(`span`,{className:`ripple-skel-bar ripple-skel-line-meta`})]})]},e))})]})}function F(e){let t=(0,u.c)(137),{model:n,altitude:d,building:f,onRegenerate:p,loadLessonDetail:m,loadCourseClosing:h,courseFocus:w,onCourseFocus:T,speak:E,commitSha:D,compareSinceBuilt:ee,openFullAnalysis:te,onAskAboutLesson:O}=e,ne;t[0]===n.courses?ne=t[1]:(ne=n.courses??[],t[0]=n.courses,t[1]=ne);let A=ne,j=n.pr.repo||``,F=n.pr.branch||`HEAD`,V=j?o(j):void 0,oe=!!(!n.provenance.example&&j&&D&&V?.commitSha&&V.commitSha!==D),[H,se]=(0,l.useState)(0),U=A[Math.min(H,Math.max(0,A.length-1))],W=U?`${j||`repo`}::${U.title}`:`repo`,ce;t[2]===W?ce=t[3]:(ce=()=>g(W),t[2]=W,t[3]=ce);let[G,le]=(0,l.useState)(ce),ue,de;t[4]===W?(ue=t[5],de=t[6]):(ue=()=>le(g(W)),de=[W],t[4]=W,t[5]=ue,t[6]=de),(0,l.useEffect)(ue,de);let fe;t[7]===W?fe=t[8]:(fe=(e,t)=>{le(new Set(_(W,e,t)))},t[7]=W,t[8]=fe);let pe=fe,[K,q]=(0,l.useState)(0),[me,he]=(0,l.useState)(!1),ge;t[9]===W?ge=t[10]:(ge=()=>v(W),t[9]=W,t[10]=ge);let[J,_e]=(0,l.useState)(ge),[ve,ye]=(0,l.useState)(0),[be,xe]=(0,l.useState)(!1),Se;t[11]!==H||t[12]!==A||t[13]!==W||t[14]!==q||t[15]!==xe?(Se=()=>{let e=g(W),t=(A[H]?.lessons??[]).findIndex((t,n)=>!e.has(n));q(t===-1?0:t),_e(v(W)),ye(0),xe(!1)},t[11]=H,t[12]=A,t[13]=W,t[14]=q,t[15]=xe,t[16]=Se):Se=t[16];let Ce;t[17]!==H||t[18]!==A||t[19]!==W?(Ce=[W,H,A],t[17]=H,t[18]=A,t[19]=W,t[20]=Ce):Ce=t[20],(0,l.useEffect)(Se,Ce);let we;t[21]===he?we=t[22]:(we=()=>he(!1),t[21]=he,t[22]=we);let Te;t[23]!==K||t[24]!==H?(Te=[K,H],t[23]=K,t[24]=H,t[25]=Te):Te=t[25],(0,l.useEffect)(we,Te);let[Ee,De]=(0,l.useState)(null),[Oe,ke]=(0,l.useState)(`idle`),[Ae,je]=(0,l.useState)(0),Me=(0,l.useRef)(null),Ne;t[26]===Symbol.for(`react.memo_cache_sentinel`)?(Ne=()=>{De(null),ke(`idle`),Me.current=null},t[26]=Ne):Ne=t[26];let Pe;t[27]===H?Pe=t[28]:(Pe=[H],t[27]=H,t[28]=Pe),(0,l.useEffect)(Ne,Pe);let Fe,Ie;t[29]!==K||t[30]!==Ae||t[31]!==H||t[32]!==A||t[33]!==h?(Fe=()=>{let e=A[H];if(!e||!h||K<e.lessons.length||e.quiz?.length||e.capstone)return;let t=`${H}:${Ae}`;if(Me.current===t)return;Me.current=t;let n=!0;return ke(`loading`),h(e).then(e=>{n&&(e&&(e.quiz?.length||e.capstone)?(De(e),ke(`ready`)):ke(`error`))}),()=>{n=!1}},Ie=[A,H,K,h,Ae],t[29]=K,t[30]=Ae,t[31]=H,t[32]=A,t[33]=h,t[34]=Fe,t[35]=Ie):(Fe=t[34],Ie=t[35]),(0,l.useEffect)(Fe,Ie);let Le;t[36]===Symbol.for(`react.memo_cache_sentinel`)?(Le=()=>je(ae),t[36]=Le):Le=t[36];let Re=Le,[Y,ze]=(0,l.useState)(null),[Be,Ve]=(0,l.useState)(``),[He,Ue]=(0,l.useState)(!1),[We,Ge]=(0,l.useState)(!1),[Ke,qe]=(0,l.useState)(``),Je;if(t[37]===Symbol.for(`react.memo_cache_sentinel`)?(Je=()=>{ze(null),Ve(``),Ue(!1),qe(``)},t[37]=Je):Je=t[37],(0,l.useEffect)(Je,[V?.commitSha,D]),A.length===0||!U){if(f){let e;return t[38]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,S.jsx)(P,{title:`Building your curriculum from the code…`,sub:`Reading the README, the areas, and the real files to write a leveled course you can climb without fear.`,preview:!0}),t[38]=e):e=t[38],e}let e;return t[39]===p?e=t[40]:(e=(0,S.jsx)(`div`,{className:`ripple-course-empty`,children:p?(0,S.jsxs)(S.Fragment,{children:[(0,S.jsx)(`p`,{children:`Couldn’t build a course from this view yet.`}),(0,S.jsx)(`button`,{type:`button`,className:`ripple-course-reveal`,onClick:p,children:`Try again`})]}):(0,S.jsx)(`p`,{children:`Connect a model in Settings to generate a course from this code.`})}),t[39]=p,t[40]=e),e}let X=U.lessons,Z=X[Math.min(K,X.length-1)],Ye=X.reduce(ie,0),Xe;t[41]!==G.size||t[42]!==X.length?(Xe=Math.round(G.size/X.length*100),t[41]=G.size,t[42]=X.length,t[43]=Xe):Xe=t[43];let Ze=Xe,Qe;t[44]!==Ee?.quiz||t[45]!==U.quiz?(Qe=U.quiz??Ee?.quiz??[],t[44]=Ee?.quiz,t[45]=U.quiz,t[46]=Qe):Qe=t[46];let Q=Qe,$=U.capstone??Ee?.capstone,$e=X.length>0&&(Q.length>0||!!$||!!h),et=$e&&K>=X.length,tt=K<X.length-1||$e,nt;t[47]===W?nt=t[48]:(nt=e=>{y(W,e.correct,e.total),_e(v(W))},t[47]=W,t[48]=nt);let rt=nt,it;t[49]!==U.title||t[50]!==Q||t[51]!==j?(it=()=>{ye(i(Q.map(re),{deck:`Ripple · ${j||`this repo`}`,tags:[U.title],source:{topic:U.title,ts:Date.now()},origin:`auto`}).length)},t[49]=U.title,t[50]=Q,t[51]=j,t[52]=it):it=t[52];let at=it,ot;t[53]!==ve||t[54]!==at?(ot=()=>ve>0?(0,S.jsxs)(`p`,{className:`ripple-quiz-flash-saved`,children:[`+`,ve,` card`,ve===1?``:`s`,` saved to your deck`]}):(0,S.jsx)(`button`,{type:`button`,className:`ripple-course-reveal`,onClick:at,children:`Keep these as flashcards`}),t[53]=ve,t[54]=at,t[55]=ot):ot=t[55];let st=ot,ct=oe&&Y?s(X,Y):new Set,lt=async()=>{if(Y)return Y;if(!ee||!V?.commitSha||!D)return null;Ge(!0),qe(``);let e=await ee(V.commitSha,D);if(Ge(!1),!e.ok||!e.diff)return qe(e.detail||`Couldn’t load what changed.`),null;let t=a(e.diff).files.map(B);return ze(t),Ve(e.diff),t},ut=()=>{if(He){Ue(!1);return}lt().then(e=>{e&&Ue(!0)})},dt=()=>{lt().then(e=>{if(!e)return;let t=s(X,e);t.size>0&&q(Math.min(...t))})},ft=()=>{!Be||!te||!V||!D||te(Be,`${j} ${M(V.commitSha)}...${M(D)}`,j)},pt;t[56]===j?pt=t[57]:(pt=e=>{let t=`${j||`repo`}::${e.title}`,n=v(t);return{lessonsDone:g(t).size,lessonsTotal:e.lessons.length,hasQuiz:(e.quiz?.length??0)>0,quizPassed:!!n&&b(n.correct,n.total)}},t[56]=j,t[57]=pt);let mt=pt,ht;t[58]===Symbol.for(`react.memo_cache_sentinel`)?(ht=(0,S.jsx)(`span`,{className:`ripple-course-pill`,children:`Guided curriculum`}),t[58]=ht):ht=t[58];let gt;t[59]!==f||t[60]!==w||t[61]!==n.modules||t[62]!==T?(gt=T&&n.modules.length>1&&(0,S.jsxs)(`div`,{className:`ripple-course-focus`,title:`Build the course around one area — best on a large repo, where a whole-repo course only skims. Whole repo prioritises the highest-impact areas.`,children:[(0,S.jsx)(`span`,{className:`ripple-course-focus-label`,children:`Focus`}),(0,S.jsx)(r,{ariaLabel:`Course focus`,triggerClassName:`ripple-course-focus-select`,value:w??``,onChange:e=>T(e||void 0),disabled:f,options:[{value:``,label:`Whole repo`},...n.modules.slice(0,50).map(z)]})]}),t[59]=f,t[60]=w,t[61]=n.modules,t[62]=T,t[63]=gt):gt=t[63];let _t;t[64]!==f||t[65]!==p?(_t=p&&(0,S.jsx)(`button`,{type:`button`,className:`ripple-course-regen`,onClick:p,disabled:f,title:`Rebuild the curriculum from the latest code`,children:f?`Rebuilding…`:`↻ Regenerate`}),t[64]=f,t[65]=p,t[66]=_t):_t=t[66];let vt;t[67]!==gt||t[68]!==_t?(vt=(0,S.jsxs)(`div`,{className:`ripple-course-head-top`,children:[ht,gt,_t]}),t[67]=gt,t[68]=_t,t[69]=vt):vt=t[69];let yt;t[70]!==H||t[71]!==A||t[72]!==mt||t[73]!==j?(yt=A.length>1&&(0,S.jsx)(`div`,{className:`ripple-course-tracks`,role:`tablist`,"aria-label":`Courses`,children:A.map((e,t)=>{let n=g(`${j||`repo`}::${e.title}`).size,r=n>=e.lessons.length,i=t>0?A[t-1]:void 0,a=!!i&&x(mt(i));return(0,S.jsxs)(`button`,{type:`button`,role:`tab`,className:`ripple-course-track`,"data-active":t===H?`true`:void 0,"data-locked":a?`true`:void 0,"aria-selected":t===H,onClick:()=>se(t),children:[(0,S.jsxs)(`span`,{className:`ripple-course-track-top`,children:[(0,S.jsx)(`span`,{className:`ripple-course-step`,"data-done":r?`true`:void 0,children:r?`✓`:t+1}),e.level?(0,S.jsx)(`span`,{className:`ripple-course-level`,"data-level":e.level,children:N[e.level]}):(0,S.jsxs)(`span`,{className:`ripple-course-track-meta`,children:[n,`/`,e.lessons.length]})]}),(0,S.jsx)(`span`,{className:`ripple-course-track-title`,children:e.title}),a&&(0,S.jsxs)(`span`,{className:`ripple-course-track-lock`,children:[(0,S.jsx)(`span`,{"aria-hidden":`true`,children:`🔒`}),` Usually after “`,i.title,`” —`,` `,(0,S.jsx)(`span`,{className:`ripple-course-track-skip`,children:`I already know this, skip ahead`})]})]},e.title)})}),t[70]=H,t[71]=A,t[72]=mt,t[73]=j,t[74]=yt):yt=t[74];let bt;t[75]===U.title?bt=t[76]:(bt=(0,S.jsx)(`h2`,{className:`ripple-course-title`,children:U.title}),t[75]=U.title,t[76]=bt);let xt;t[77]===U.subtitle?xt=t[78]:(xt=U.subtitle&&(0,S.jsx)(`p`,{className:`ripple-course-sub`,children:U.subtitle}),t[77]=U.subtitle,t[78]=xt);let St=Ye>0?` · ~${Ye} min`:``,Ct;t[79]!==G.size||t[80]!==X.length||t[81]!==St?(Ct=(0,S.jsxs)(`div`,{className:`ripple-course-meta`,children:[X.length,` lessons`,St,` · `,G.size,`/`,X.length,` done`]}),t[79]=G.size,t[80]=X.length,t[81]=St,t[82]=Ct):Ct=t[82];let wt=`${Ze}%`,Tt;t[83]===wt?Tt=t[84]:(Tt=(0,S.jsx)(`div`,{className:`ripple-course-bar`,"aria-hidden":`true`,children:(0,S.jsx)(`span`,{style:{width:wt}})}),t[83]=wt,t[84]=Tt);let Et;t[85]!==vt||t[86]!==yt||t[87]!==bt||t[88]!==xt||t[89]!==Ct||t[90]!==Tt?(Et=(0,S.jsxs)(`header`,{className:`ripple-course-head`,children:[vt,yt,bt,xt,Ct,Tt]}),t[85]=vt,t[86]=yt,t[87]=bt,t[88]=xt,t[89]=Ct,t[90]=Tt,t[91]=Et):Et=t[91];let Dt=oe&&V&&(0,S.jsxs)(`div`,{className:`ripple-course-stale`,role:`status`,children:[(0,S.jsx)(`div`,{className:`ripple-eyebrow`,children:`The code moved`}),(0,S.jsxs)(`p`,{className:`ripple-course-stale-text`,children:[`The code moved since this course was built (`,(0,S.jsx)(`code`,{children:M(V.commitSha)}),` →`,` `,(0,S.jsx)(`code`,{children:M(D)}),`).`]}),Ke&&(0,S.jsx)(`p`,{className:`ripple-course-stale-err`,children:Ke}),(0,S.jsxs)(`div`,{className:`ripple-course-stale-actions`,children:[(0,S.jsx)(`button`,{type:`button`,className:`ripple-course-stale-btn`,onClick:ut,disabled:We,children:We?`Loading…`:He?`Hide what changed`:`See what changed`}),(0,S.jsx)(`button`,{type:`button`,className:`ripple-course-stale-btn`,onClick:dt,disabled:We,children:`Refresh stale lessons`}),p&&(0,S.jsx)(`button`,{type:`button`,className:`ripple-course-stale-btn`,onClick:p,disabled:f,children:`Rebuild course`})]}),He&&Y&&(0,S.jsxs)(`div`,{className:`ripple-course-changed-panel`,children:[(0,S.jsx)(`ul`,{children:Y.slice(0,20).map(R)}),Y.length>20&&(0,S.jsxs)(`p`,{className:`ripple-course-changed-more`,children:[`+`,Y.length-20,` more file`,Y.length-20==1?``:`s`]}),te&&(0,S.jsx)(`button`,{type:`button`,className:`ripple-course-stale-btn`,onClick:ft,children:`Open as a full analysis →`})]})]}),Ot=X.map((e,t)=>{let n=G.has(t),r=ct.has(t);return(0,S.jsxs)(`button`,{type:`button`,className:`ripple-course-item`,"data-active":t===K?`true`:void 0,"data-done":n?`true`:void 0,"data-stale":r?`true`:void 0,onClick:()=>q(t),children:[(0,S.jsx)(`span`,{className:`ripple-course-num`,"aria-hidden":`true`,children:n?`✓`:t+1}),(0,S.jsxs)(`span`,{className:`ripple-course-item-body`,children:[(0,S.jsxs)(`span`,{className:`ripple-course-item-title`,children:[e.title,r&&(0,S.jsx)(`span`,{className:`ripple-course-item-stale`,title:`Its files changed since this course was built`,children:`stale`})]}),e.minutes?(0,S.jsxs)(`span`,{className:`ripple-course-item-min`,children:[`~`,e.minutes,` min`]}):null]})]},t)}),kt;t[92]!==$e||t[93]!==$||t[94]!==X.length||t[95]!==et||t[96]!==Q.length||t[97]!==q?(kt=$e&&(0,S.jsxs)(`button`,{type:`button`,className:`ripple-course-item ripple-course-item-quiz`,"data-active":et?`true`:void 0,onClick:()=>q(X.length),children:[(0,S.jsx)(`span`,{className:`ripple-course-num`,"aria-hidden":`true`,children:`★`}),(0,S.jsxs)(`span`,{className:`ripple-course-item-body`,children:[(0,S.jsx)(`span`,{className:`ripple-course-item-title`,children:Q.length>0?`Quiz`:$?`Capstone`:`Wrap-up`}),(0,S.jsx)(`span`,{className:`ripple-course-item-min`,children:Q.length>0?`${Q.length} question${Q.length===1?``:`s`}`:$?`Closing project`:`Quiz & capstone`})]})]}),t[92]=$e,t[93]=$,t[94]=X.length,t[95]=et,t[96]=Q.length,t[97]=q,t[98]=kt):kt=t[98];let At;t[99]!==Ot||t[100]!==kt?(At=(0,S.jsxs)(`nav`,{className:`ripple-course-list`,"aria-label":`Lessons`,children:[Ot,kt]}),t[99]=Ot,t[100]=kt,t[101]=At):At=t[101];let jt;t[102]!==K||t[103]!==d||t[104]!==$||t[105]!==Oe||t[106]!==U||t[107]!==H||t[108]!==G||t[109]!==rt||t[110]!==st||t[111]!==tt||t[112]!==Z||t[113]!==X.length||t[114]!==m||t[115]!==pe||t[116]!==O||t[117]!==et||t[118]!==Q||t[119]!==J||t[120]!==F||t[121]!==j||t[122]!==be||t[123]!==Re||t[124]!==me||t[125]!==q||t[126]!==xe||t[127]!==he||t[128]!==E?(jt=(0,S.jsx)(`article`,{className:`ripple-course-lesson`,"aria-live":`polite`,children:et?(0,S.jsx)(S.Fragment,{children:Q.length===0&&!$&&Oe===`loading`?(0,S.jsx)(P,{title:`Writing the quiz & capstone for ${U.title}…`,sub:`A few end-of-week questions and a small hands-on project, grounded in what this week studied.`}):Q.length===0&&!$&&Oe===`error`?(0,S.jsxs)(`div`,{className:`ripple-course-empty`,children:[(0,S.jsx)(`p`,{children:`Couldn’t build the quiz & capstone for this course yet.`}),(0,S.jsx)(`button`,{type:`button`,className:`ripple-course-reveal`,onClick:Re,children:`Try again`})]}):(0,S.jsxs)(S.Fragment,{children:[Q.length>0&&(0,S.jsxs)(S.Fragment,{children:[(0,S.jsx)(`div`,{className:`ripple-eyebrow`,children:`Course quiz`}),(0,S.jsx)(`h3`,{className:`ripple-course-lesson-title`,children:`Test yourself`}),(0,S.jsxs)(`p`,{className:`ripple-course-explain`,children:[`Answer these to be sure you really understood `,U.title,`.`]}),J&&!be?(0,S.jsxs)(`div`,{className:`ripple-quiz-done`,children:[(0,S.jsxs)(`div`,{className:`ripple-quiz-score`,"data-passed":b(J.correct,J.total)?`true`:void 0,role:`status`,children:[(0,S.jsxs)(`div`,{className:`ripple-quiz-score-num`,children:[J.correct,`/`,J.total]}),(0,S.jsx)(`p`,{className:`ripple-quiz-score-text`,children:b(J.correct,J.total)?`You know this one — nice work.`:`Worth another pass — ${J.total-J.correct} to revisit.`})]}),(0,S.jsx)(`div`,{className:`ripple-quiz-flashcards`,children:st()}),(0,S.jsx)(`button`,{type:`button`,className:`ripple-course-skip`,onClick:()=>xe(!0),children:`Retake the quiz`})]}):(0,S.jsx)(k,{questions:Q,onFinish:e=>{rt(e),xe(!1)},children:(0,S.jsx)(`div`,{className:`ripple-quiz-flashcards`,children:st()})},`quiz:${H}`)]}),$&&(0,S.jsxs)(`section`,{className:`ripple-course-capstone`,children:[(0,S.jsx)(`div`,{className:`ripple-eyebrow`,children:`Capstone`}),(0,S.jsx)(`h4`,{className:`ripple-course-capstone-title`,children:$.title}),(0,S.jsx)(`p`,{className:`ripple-course-capstone-brief`,children:$.brief}),$.steps.length>0&&(0,S.jsxs)(`div`,{className:`ripple-course-group`,children:[(0,S.jsx)(`div`,{className:`ripple-course-capstone-label`,children:`Do this`}),(0,S.jsx)(`ol`,{className:`ripple-course-capstone-steps`,children:$.steps.map(L)})]}),$.acceptance.length>0&&(0,S.jsxs)(`div`,{className:`ripple-course-group`,children:[(0,S.jsx)(`div`,{className:`ripple-course-capstone-label`,children:`You’ll know it worked when`}),(0,S.jsx)(`ul`,{className:`ripple-course-capstone-accept`,children:$.acceptance.map(I)})]})]})]})}):(0,S.jsxs)(S.Fragment,{children:[(0,S.jsxs)(`div`,{className:`ripple-eyebrow`,children:[`Lesson `,K+1,` of `,X.length,Z.minutes?` · ~${Z.minutes} min`:``]}),(0,S.jsx)(`h3`,{className:`ripple-course-lesson-title`,children:Z.title}),(0,S.jsx)(C,{course:U,lesson:Z,altitude:d,repo:j,gitRef:F,fileUrl:e=>c(j,F,e),loadLessonDetail:m,speak:E,onAskAboutLesson:O},`${H}:${K}:${d}`),Z.checkpoint&&(0,S.jsxs)(`section`,{className:`ripple-course-checkpoint`,children:[(0,S.jsx)(`div`,{className:`ripple-eyebrow`,children:`Check yourself`}),(0,S.jsx)(`p`,{className:`ripple-course-q`,children:Z.checkpoint.question}),me?(0,S.jsx)(`p`,{className:`ripple-course-a`,children:Z.checkpoint.answer}):(0,S.jsx)(`button`,{type:`button`,className:`ripple-course-reveal`,onClick:()=>he(!0),children:`Show answer`})]}),(0,S.jsxs)(`div`,{className:`ripple-course-actions`,children:[(0,S.jsx)(`button`,{type:`button`,className:`ripple-course-done`,onClick:()=>{let e=G.has(K);pe(K,!e),!e&&tt&&q(K+1)},children:G.has(K)?`Done ✓`:tt?`Mark done & next →`:`Mark done ✓`}),tt&&(0,S.jsx)(`button`,{type:`button`,className:`ripple-course-skip`,onClick:()=>q(K+1),children:K===X.length-1?`Take the quiz →`:`Skip ahead`})]})]})}),t[102]=K,t[103]=d,t[104]=$,t[105]=Oe,t[106]=U,t[107]=H,t[108]=G,t[109]=rt,t[110]=st,t[111]=tt,t[112]=Z,t[113]=X.length,t[114]=m,t[115]=pe,t[116]=O,t[117]=et,t[118]=Q,t[119]=J,t[120]=F,t[121]=j,t[122]=be,t[123]=Re,t[124]=me,t[125]=q,t[126]=xe,t[127]=he,t[128]=E,t[129]=jt):jt=t[129];let Mt;t[130]!==At||t[131]!==jt?(Mt=(0,S.jsxs)(`div`,{className:`ripple-course-body`,children:[At,jt]}),t[130]=At,t[131]=jt,t[132]=Mt):Mt=t[132];let Nt;return t[133]!==Et||t[134]!==Dt||t[135]!==Mt?(Nt=(0,S.jsxs)(`div`,{className:`ripple-course`,children:[Et,Dt,Mt]}),t[133]=Et,t[134]=Dt,t[135]=Mt,t[136]=Nt):Nt=t[136],Nt}function I(e,t){return(0,S.jsx)(`li`,{children:e},t)}function L(e,t){return(0,S.jsx)(`li`,{children:e},t)}function R(e){return(0,S.jsx)(`li`,{children:e},e)}function z(e){return{value:e.name,label:e.name}}function B(e){return e.path}function re(e){return{front:e.question,back:e.answer}}function ie(e,t){return e+(t.minutes??0)}function ae(e){return e+1}export{F as ShipCourse};
|
|
1
|
+
import{t as e}from"./react-BQSORdFI.js";import{t}from"./jsx-runtime-DaSxXjOY.js";import{ht as n}from"./index-C7H7A1rW.js";import{t as r}from"./DropSelect-Bo2Oyi-2.js";import{n as i}from"./store-DXmC_fP2.js";import{v as a}from"./githubToken-DtcLYqwm.js";import{n as o,t as s}from"./courseStore-DfafnL-9.js";import{t as c}from"./links--u_phi0x.js";var l=e(),u=n(),d=`mavea.ripple.course.v2`,f=`mavea.ripple.course.v1`;function p(){try{let e=localStorage.getItem(f);if(!e)return{};let t=JSON.parse(e);if(!t||typeof t!=`object`||Array.isArray(t))return{};let n={};for(let[e,r]of Object.entries(t))Array.isArray(r)&&(n[e]={lessons:r.filter(e=>typeof e==`number`)});return Object.keys(n).length>0&&h(n),n}catch{return{}}}function m(){try{let e=localStorage.getItem(d);if(e===null)return p();let t=JSON.parse(e);return t&&typeof t==`object`&&!Array.isArray(t)?t:{}}catch{return{}}}function h(e){try{localStorage.setItem(d,JSON.stringify(e))}catch{}}function g(e){return new Set(m()[e]?.lessons??[])}function _(e,t,n){let r=m(),i=new Set(r[e]?.lessons??[]);return n?i.add(t):i.delete(t),r[e]={...r[e],lessons:[...i].sort((e,t)=>e-t)},h(r),i}function v(e){return m()[e]?.quiz}function y(e,t,n){let r=m();r[e]={lessons:r[e]?.lessons??[],quiz:{correct:t,total:n,passedAt:Date.now()}},h(r)}function b(e,t){return t>0&&e>=t-1}function x(e){return!!(!(e.lessonsTotal>0&&e.lessonsDone>=e.lessonsTotal)||e.hasQuiz&&!e.quizPassed)}var S=t();function C(e){let t=(0,u.c)(86),{course:n,lesson:r,altitude:i,fileUrl:a,loadLessonDetail:o,speak:s,onAskAboutLesson:c}=e,[d,f]=(0,l.useState)(r.detail??null),[p,m]=(0,l.useState)(`idle`),[h,g]=(0,l.useState)(null),_=(0,l.useRef)(!1),v=(0,l.useRef)(!0),y=(0,l.useRef)(null),b=(0,l.useRef)(0),x,C;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(x=()=>()=>{v.current=!1,y.current!==null&&clearTimeout(y.current)},C=[],t[0]=x,t[1]=C):(x=t[0],C=t[1]),(0,l.useEffect)(x,C);let k;t[2]!==i||t[3]!==n||t[4]!==r||t[5]!==o?(k=e=>{if(!o)return;y.current!==null&&clearTimeout(y.current);let t=b.current+=1;m(`loading`),f(null);let a=s=>{o(n,r,e,i).then(e=>{!v.current||t!==b.current||(e?(f(e),m(`idle`)):s>0?y.current=setTimeout(()=>a(s-1),2e3):m(`error`))})};a(1)},t[2]=i,t[3]=n,t[4]=r,t[5]=o,t[6]=k):k=t[6];let A=k,j;t[7]!==r.detail||t[8]!==o||t[9]!==A?(j=()=>{if(r.detail){f(r.detail);return}!o||_.current||(_.current=!0,A(!1))},t[7]=r.detail,t[8]=o,t[9]=A,t[10]=j):j=t[10];let M;t[11]!==r||t[12]!==o||t[13]!==A?(M=[r,o,A],t[11]=r,t[12]=o,t[13]=A,t[14]=M):M=t[14],(0,l.useEffect)(j,M);let N;t[15]===d?.walkthrough?N=t[16]:(N=d?.walkthrough??[],t[15]=d?.walkthrough,t[16]=N);let P=N,F,I;t[17]!==s||t[18]!==h||t[19]!==P?(F=()=>{if(h===null||!s)return;let e=P[h];e&&s(`${e.focus?e.focus+`. `:``}${e.explain}`)},I=[h,P,s],t[17]=s,t[18]=h,t[19]=P,t[20]=F,t[21]=I):(F=t[20],I=t[21]),(0,l.useEffect)(F,I);let L=r.goal,R=r.explainFor?.[i]??r.goal,z;t[22]!==n||t[23]!==L||t[24]!==r.title||t[25]!==c?(z=c&&(0,S.jsx)(`button`,{type:`button`,className:`ripple-lesson-ask`,onClick:()=>c(`In "${n.title}" — ${r.title}: ${L||`what should I understand here?`}`),children:`Ask about this lesson`}),t[22]=n,t[23]=L,t[24]=r.title,t[25]=c,t[26]=z):z=t[26];let B=z;if(d){let e,n,r;if(t[27]!==B||t[28]!==d.overview||t[29]!==L){let i=d.overview.split(/\n\n+/).filter(te);t[33]===L?e=t[34]:(e=L&&(0,S.jsx)(`p`,{className:`ripple-course-lede`,children:L}),t[33]=L,t[34]=e),n=B,r=i.length>0&&(0,S.jsx)(`div`,{className:`ripple-lesson-overview`,children:i.map(ee)}),t[27]=B,t[28]=d.overview,t[29]=L,t[30]=e,t[31]=n,t[32]=r}else e=t[30],n=t[31],r=t[32];let i;t[35]!==a||t[36]!==h||t[37]!==P?(i=P.length>0&&(0,S.jsxs)(`section`,{className:`ripple-course-group`,children:[(0,S.jsxs)(`div`,{className:`ripple-lesson-spot-head`,children:[(0,S.jsx)(`div`,{className:`ripple-eyebrow`,children:`Spotlight — walk the real code`}),(0,S.jsxs)(`button`,{type:`button`,className:`ripple-course-reveal`,onClick:()=>g(0),"aria-label":`Step through the code one part at a time`,children:[`▶ Step through (`,P.length,`)`]})]}),h===null?(0,S.jsx)(`ol`,{className:`ripple-walk`,children:P.map((e,t)=>(0,S.jsxs)(`li`,{className:`ripple-walk-step`,children:[(0,S.jsxs)(`div`,{className:`ripple-walk-where`,children:[(0,S.jsx)(`span`,{className:`ripple-walk-num`,"aria-hidden":`true`,children:t+1}),(0,S.jsx)(O,{file:e.file,focus:e.focus,url:a(e.file)})]}),e.code&&(0,S.jsx)(`pre`,{className:`ripple-walk-code`,children:(0,S.jsx)(`code`,{children:e.code})}),(0,S.jsx)(`p`,{className:`ripple-walk-explain`,children:e.explain})]},t))}):(0,S.jsx)(ne,{steps:P,index:h,fileUrl:a,onPrev:()=>g(D),onNext:()=>g(e=>e===null?null:Math.min(P.length-1,e+1)),onClose:()=>g(null)})]}),t[35]=a,t[36]=h,t[37]=P,t[38]=i):i=t[38];let s;t[39]===d.concepts?s=t[40]:(s=d.concepts.length>0&&(0,S.jsxs)(`section`,{className:`ripple-course-group`,children:[(0,S.jsx)(`div`,{className:`ripple-eyebrow`,children:`Key concepts`}),(0,S.jsx)(`dl`,{className:`ripple-lesson-concepts`,children:d.concepts.map(E)})]}),t[39]=d.concepts,t[40]=s);let c;t[41]===d.pitfalls?c=t[42]:(c=d.pitfalls&&d.pitfalls.length>0&&(0,S.jsxs)(`section`,{className:`ripple-course-caution`,role:`note`,children:[(0,S.jsx)(`div`,{className:`ripple-eyebrow`,children:`Watch out for`}),(0,S.jsx)(`ul`,{className:`ripple-lesson-pitfalls`,children:d.pitfalls.map(T)})]}),t[41]=d.pitfalls,t[42]=c);let l;t[43]===d.exercise?l=t[44]:(l=d.exercise&&(0,S.jsxs)(`section`,{className:`ripple-course-group ripple-lesson-exercise`,children:[(0,S.jsx)(`div`,{className:`ripple-eyebrow`,children:`Try it`}),(0,S.jsx)(`p`,{className:`ripple-lesson-task`,children:d.exercise.task}),d.exercise.hint&&(0,S.jsxs)(`p`,{className:`ripple-lesson-hint`,children:[`Hint — `,d.exercise.hint]}),d.exercise.check&&(0,S.jsxs)(`p`,{className:`ripple-lesson-check`,children:[`How you’ll know it worked — `,d.exercise.check]})]}),t[43]=d.exercise,t[44]=l);let u;t[45]!==o||t[46]!==A?(u=o&&(0,S.jsx)(`button`,{type:`button`,className:`ripple-lesson-regen`,onClick:()=>A(!0),title:`Rewrite this lesson from the latest code`,children:`↻ Rewrite this lesson`}),t[45]=o,t[46]=A,t[47]=u):u=t[47];let f;return t[48]!==e||t[49]!==n||t[50]!==r||t[51]!==i||t[52]!==s||t[53]!==c||t[54]!==l||t[55]!==u?(f=(0,S.jsxs)(S.Fragment,{children:[e,n,r,i,s,c,l,u]}),t[48]=e,t[49]=n,t[50]=r,t[51]=i,t[52]=s,t[53]=c,t[54]=l,t[55]=u,t[56]=f):f=t[56],f}if(p===`loading`){let e,n;t[57]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,S.jsx)(`span`,{className:`ripple-sharpening-dot`,"aria-hidden":`true`}),n=(0,S.jsx)(`div`,{className:`ripple-course-skeleton-title`,children:`Writing this lesson from the real code…`}),t[57]=e,t[58]=n):(e=t[57],n=t[58]);let i;t[59]===r.read?i=t[60]:(i=r.read.slice(0,3).join(`, `)||`the relevant files`,t[59]=r.read,t[60]=i);let a;return t[61]===i?a=t[62]:(a=(0,S.jsxs)(`div`,{className:`ripple-course-skeleton`,role:`status`,"aria-live":`polite`,children:[e,n,(0,S.jsxs)(`div`,{className:`ripple-course-skeleton-sub`,children:[`Reading `,i,` to teach it properly — with a walk through the actual code.`]})]}),t[61]=i,t[62]=a),a}if(p===`error`){let e;t[63]===L?e=t[64]:(e=L&&(0,S.jsx)(`p`,{className:`ripple-course-lede`,children:L}),t[63]=L,t[64]=e);let n;t[65]===Symbol.for(`react.memo_cache_sentinel`)?(n=(0,S.jsx)(`p`,{children:`Couldn’t write this lesson from the code just now.`}),t[65]=n):n=t[65];let r;t[66]===A?r=t[67]:(r=(0,S.jsx)(`button`,{type:`button`,className:`ripple-course-reveal`,onClick:()=>A(!0),children:`Try again`}),t[66]=A,t[67]=r);let i;return t[68]!==e||t[69]!==r?(i=(0,S.jsxs)(`div`,{className:`ripple-course-empty`,children:[e,n,r]}),t[68]=e,t[69]=r,t[70]=i):i=t[70],i}let re;t[71]===R?re=t[72]:(re=(0,S.jsx)(`p`,{className:`ripple-course-explain`,children:R}),t[71]=R,t[72]=re);let ie;t[73]!==a||t[74]!==r.read?(ie=r.read.length>0&&(0,S.jsxs)(`section`,{className:`ripple-course-group`,children:[(0,S.jsx)(`div`,{className:`ripple-eyebrow`,children:`Open and read`}),(0,S.jsx)(`div`,{className:`ripple-course-files`,children:r.read.map(e=>(0,S.jsx)(O,{file:e,url:a(e)},e))})]}),t[73]=a,t[74]=r.read,t[75]=ie):ie=t[75];let ae;t[76]===r.concepts?ae=t[77]:(ae=r.concepts.length>0&&(0,S.jsxs)(`section`,{className:`ripple-course-group`,children:[(0,S.jsx)(`div`,{className:`ripple-eyebrow`,children:`Key concepts`}),(0,S.jsx)(`ul`,{className:`ripple-course-concepts`,children:r.concepts.map(w)})]}),t[76]=r.concepts,t[77]=ae);let V;t[78]===r.caution?V=t[79]:(V=r.caution&&(0,S.jsxs)(`section`,{className:`ripple-course-caution`,role:`note`,children:[(0,S.jsx)(`div`,{className:`ripple-eyebrow`,children:`Be careful here — and why`}),(0,S.jsx)(`p`,{className:`ripple-course-caution-text`,children:r.caution})]}),t[78]=r.caution,t[79]=V);let oe;return t[80]!==B||t[81]!==re||t[82]!==ie||t[83]!==ae||t[84]!==V?(oe=(0,S.jsxs)(S.Fragment,{children:[re,B,ie,ae,V]}),t[80]=B,t[81]=re,t[82]=ie,t[83]=ae,t[84]=V,t[85]=oe):oe=t[85],oe}function w(e,t){return(0,S.jsx)(`li`,{children:e},t)}function T(e,t){return(0,S.jsx)(`li`,{children:e},t)}function E(e,t){return(0,S.jsxs)(`div`,{children:[(0,S.jsx)(`dt`,{children:e.term}),(0,S.jsx)(`dd`,{children:e.explain})]},t)}function D(e){return e===null?null:Math.max(0,e-1)}function ee(e,t){return(0,S.jsx)(`p`,{children:e},t)}function te(e){return e.trim().length>0}function O(e){let t=(0,u.c)(3),{file:n,focus:r,url:i}=e,a=r?`${n} · ${r}`:n,o;return t[0]!==a||t[1]!==i?(o=i?(0,S.jsxs)(`a`,{className:`ripple-course-file ripple-course-file-link`,href:i,target:`_blank`,rel:`noreferrer noopener`,children:[a,` ↗`]}):(0,S.jsx)(`code`,{className:`ripple-course-file`,children:a}),t[0]=a,t[1]=i,t[2]=o):o=t[2],o}function ne(e){let t=(0,u.c)(36),{steps:n,index:r,fileUrl:i,onPrev:a,onNext:o,onClose:s}=e,c=n[r],l=r+1,d;t[0]!==n.length||t[1]!==l?(d=(0,S.jsxs)(`span`,{className:`ripple-spotlight-count`,children:[l,` / `,n.length]}),t[0]=n.length,t[1]=l,t[2]=d):d=t[2];let f=c.file,p=c.focus,m;t[3]!==i||t[4]!==c.file?(m=i(c.file),t[3]=i,t[4]=c.file,t[5]=m):m=t[5];let h;t[6]!==c.file||t[7]!==c.focus||t[8]!==m?(h=(0,S.jsx)(O,{file:f,focus:p,url:m}),t[6]=c.file,t[7]=c.focus,t[8]=m,t[9]=h):h=t[9];let g;t[10]===s?g=t[11]:(g=(0,S.jsx)(`button`,{type:`button`,className:`ripple-spotlight-x`,onClick:s,"aria-label":`Exit spotlight`,children:`✕`}),t[10]=s,t[11]=g);let _;t[12]!==d||t[13]!==h||t[14]!==g?(_=(0,S.jsxs)(`div`,{className:`ripple-spotlight-bar`,children:[d,h,g]}),t[12]=d,t[13]=h,t[14]=g,t[15]=_):_=t[15];let v;t[16]===c.code?v=t[17]:(v=c.code&&(0,S.jsx)(`pre`,{className:`ripple-walk-code ripple-spotlight-code`,children:(0,S.jsx)(`code`,{children:c.code})}),t[16]=c.code,t[17]=v);let y;t[18]===c.explain?y=t[19]:(y=(0,S.jsx)(`p`,{className:`ripple-spotlight-explain`,children:c.explain}),t[18]=c.explain,t[19]=y);let b=r===0,x;t[20]!==a||t[21]!==b?(x=(0,S.jsx)(`button`,{type:`button`,className:`ripple-course-skip`,onClick:a,disabled:b,children:`← Back`}),t[20]=a,t[21]=b,t[22]=x):x=t[22];let C;t[23]!==r||t[24]!==s||t[25]!==o||t[26]!==n.length?(C=r<n.length-1?(0,S.jsx)(`button`,{type:`button`,className:`ripple-course-done`,onClick:o,children:`Next →`}):(0,S.jsx)(`button`,{type:`button`,className:`ripple-course-done`,onClick:s,children:`Done ✓`}),t[23]=r,t[24]=s,t[25]=o,t[26]=n.length,t[27]=C):C=t[27];let w;t[28]!==x||t[29]!==C?(w=(0,S.jsxs)(`div`,{className:`ripple-spotlight-nav`,children:[x,C]}),t[28]=x,t[29]=C,t[30]=w):w=t[30];let T;return t[31]!==y||t[32]!==w||t[33]!==_||t[34]!==v?(T=(0,S.jsxs)(`div`,{className:`ripple-spotlight`,role:`group`,"aria-label":`Code spotlight`,children:[_,v,y,w]}),t[31]=y,t[32]=w,t[33]=_,t[34]=v,t[35]=T):T=t[35],T}function k(e){let t=(0,u.c)(56),{questions:n,onFinish:r,children:i}=e,[a,o]=(0,l.useState)(0),[s,c]=(0,l.useState)(`ask`),[d,f]=(0,l.useState)(null),[p,m]=(0,l.useState)(!1),[h,g]=(0,l.useState)(0),[_,v]=(0,l.useState)(!1),[y,x]=(0,l.useState)(null),C=n.length,w=n[Math.min(a,C-1)],T=!!(w.choices&&w.choices.length>=2&&w.correct!==void 0),E;t[0]===s?E=t[1]:(E=e=>{s!==`graded`&&(m(e),c(`graded`),e&&g(j))},t[0]=s,t[1]=E);let D=E,ee;t[2]!==D||t[3]!==s||t[4]!==w.correct?(ee=e=>{s!==`graded`&&(f(e),D(e===w.correct))},t[2]=D,t[3]=s,t[4]=w.correct,t[5]=ee):ee=t[5];let te=ee,O;t[6]===s?O=t[7]:(O=()=>{s===`ask`&&c(`revealed`)},t[6]=s,t[7]=O);let ne=O,k;t[8]!==h||t[9]!==a||t[10]!==r||t[11]!==C?(k=()=>{if(a+1>=C){let e={correct:h,total:C};x(e),v(!0),r?.(e);return}o(A),c(`ask`),f(null),m(!1)},t[8]=h,t[9]=a,t[10]=r,t[11]=C,t[12]=k):k=t[12];let M=k;if(_&&y){let e=y.total-y.correct,n=b(y.correct,y.total),r=n?`true`:void 0,a;t[13]!==y.correct||t[14]!==y.total?(a=(0,S.jsxs)(`div`,{className:`ripple-quiz-score-num`,children:[y.correct,`/`,y.total]}),t[13]=y.correct,t[14]=y.total,t[15]=a):a=t[15];let o=n?`You know this one — nice work.`:`Worth another pass — ${e} to revisit.`,s;t[16]===o?s=t[17]:(s=(0,S.jsx)(`p`,{className:`ripple-quiz-score-text`,children:o}),t[16]=o,t[17]=s);let c;t[18]!==r||t[19]!==a||t[20]!==s?(c=(0,S.jsxs)(`div`,{className:`ripple-quiz-score`,"data-passed":r,role:`status`,children:[a,s]}),t[18]=r,t[19]=a,t[20]=s,t[21]=c):c=t[21];let l;return t[22]!==i||t[23]!==c?(l=(0,S.jsxs)(`div`,{className:`ripple-quiz-done`,children:[c,i]}),t[22]=i,t[23]=c,t[24]=l):l=t[24],l}let N=`Question ${a+1} of ${C}`,P=a+1,F;t[25]!==P||t[26]!==C?(F=(0,S.jsxs)(`div`,{className:`ripple-quiz-progress`,children:[`Question `,P,` of `,C]}),t[25]=P,t[26]=C,t[27]=F):F=t[27];let I;t[28]===w.question?I=t[29]:(I=(0,S.jsx)(`p`,{className:`ripple-course-q`,children:w.question}),t[28]=w.question,t[29]=I);let L;t[30]!==D||t[31]!==T||t[32]!==s||t[33]!==te||t[34]!==d||t[35]!==w.answer||t[36]!==w.choices||t[37]!==w.correct||t[38]!==ne?(L=T?(0,S.jsx)(`ul`,{className:`ripple-quiz-choices`,children:w.choices.map((e,t)=>{let n=`idle`;return s===`graded`&&(t===w.correct?n=`correct`:t===d&&(n=`wrong`)),(0,S.jsx)(`li`,{children:(0,S.jsx)(`button`,{type:`button`,className:`ripple-quiz-choice`,"data-state":n,onClick:()=>te(t),disabled:s===`graded`,"aria-pressed":d===t,children:e})},t)})}):(0,S.jsxs)(`div`,{className:`ripple-quiz-plain`,children:[s===`ask`&&(0,S.jsx)(`button`,{type:`button`,className:`ripple-course-reveal`,onClick:ne,children:`Show answer`}),s!==`ask`&&(0,S.jsx)(`p`,{className:`ripple-course-a`,children:w.answer}),s===`revealed`&&(0,S.jsxs)(`div`,{className:`ripple-quiz-selfgrade`,children:[(0,S.jsx)(`span`,{className:`ripple-quiz-selfgrade-prompt`,children:`Did you get it?`}),(0,S.jsx)(`button`,{type:`button`,className:`ripple-quiz-selfgrade-btn`,"data-answer":`yes`,onClick:()=>D(!0),children:`Yes, I had it`}),(0,S.jsx)(`button`,{type:`button`,className:`ripple-quiz-selfgrade-btn`,"data-answer":`no`,onClick:()=>D(!1),children:`Not quite`})]})]}),t[30]=D,t[31]=T,t[32]=s,t[33]=te,t[34]=d,t[35]=w.answer,t[36]=w.choices,t[37]=w.correct,t[38]=ne,t[39]=L):L=t[39];let R;t[40]!==s||t[41]!==w.explain||t[42]!==p?(R=s===`graded`&&(0,S.jsxs)(`div`,{className:`ripple-quiz-feedback`,"data-right":p?`true`:void 0,children:[(0,S.jsx)(`p`,{className:`ripple-quiz-feedback-label`,children:p?`Correct`:`Not quite`}),w.explain&&(0,S.jsx)(`p`,{className:`ripple-quiz-explain`,children:w.explain})]}),t[40]=s,t[41]=w.explain,t[42]=p,t[43]=R):R=t[43];let z;t[44]!==M||t[45]!==a||t[46]!==s||t[47]!==C?(z=s===`graded`&&(0,S.jsx)(`div`,{className:`ripple-quiz-actions`,children:(0,S.jsx)(`button`,{type:`button`,className:`ripple-course-done`,onClick:M,children:a+1>=C?`See your score →`:`Next question →`})}),t[44]=M,t[45]=a,t[46]=s,t[47]=C,t[48]=z):z=t[48];let B;return t[49]!==R||t[50]!==z||t[51]!==N||t[52]!==F||t[53]!==I||t[54]!==L?(B=(0,S.jsxs)(`div`,{className:`ripple-quiz`,role:`group`,"aria-label":N,children:[F,I,L,R,z]}),t[49]=R,t[50]=z,t[51]=N,t[52]=F,t[53]=I,t[54]=L,t[55]=B):B=t[55],B}function A(e){return e+1}function j(e){return e+1}var M=e=>e.slice(0,7),N={beginner:`Beginner`,intermediate:`Intermediate`,expert:`Expert`};function P({title:e,sub:t,preview:n=!1}){return(0,S.jsxs)(`div`,{className:`ripple-course-skeleton`+(n?` ripple-course-skeleton--preview`:``),role:`status`,"aria-live":`polite`,children:[(0,S.jsxs)(`div`,{className:`ripple-course-skeleton-head`,children:[(0,S.jsx)(`span`,{className:`ripple-sharpening-dot`,"aria-hidden":`true`}),(0,S.jsx)(`div`,{className:`ripple-course-skeleton-title`,children:e})]}),(0,S.jsx)(`div`,{className:`ripple-course-skeleton-sub`,children:t}),(0,S.jsx)(`div`,{className:`ripple-progress`,"aria-hidden":`true`}),n&&(0,S.jsx)(`div`,{className:`ripple-course-skeleton-lessons`,"aria-hidden":`true`,children:[0,1,2,3].map(e=>(0,S.jsxs)(`div`,{className:`ripple-skel-lesson`,children:[(0,S.jsx)(`span`,{className:`ripple-skel-bar ripple-skel-step`}),(0,S.jsxs)(`span`,{className:`ripple-skel-lines`,children:[(0,S.jsx)(`span`,{className:`ripple-skel-bar ripple-skel-line-title`}),(0,S.jsx)(`span`,{className:`ripple-skel-bar ripple-skel-line-meta`})]})]},e))})]})}function F(e){let t=(0,u.c)(137),{model:n,altitude:d,building:f,onRegenerate:p,loadLessonDetail:m,loadCourseClosing:h,courseFocus:w,onCourseFocus:T,speak:E,commitSha:D,compareSinceBuilt:ee,openFullAnalysis:te,onAskAboutLesson:O}=e,ne;t[0]===n.courses?ne=t[1]:(ne=n.courses??[],t[0]=n.courses,t[1]=ne);let A=ne,j=n.pr.repo||``,F=n.pr.branch||`HEAD`,V=j?o(j):void 0,oe=!!(!n.provenance.example&&j&&D&&V?.commitSha&&V.commitSha!==D),[H,se]=(0,l.useState)(0),U=A[Math.min(H,Math.max(0,A.length-1))],W=U?`${j||`repo`}::${U.title}`:`repo`,ce;t[2]===W?ce=t[3]:(ce=()=>g(W),t[2]=W,t[3]=ce);let[G,le]=(0,l.useState)(ce),ue,de;t[4]===W?(ue=t[5],de=t[6]):(ue=()=>le(g(W)),de=[W],t[4]=W,t[5]=ue,t[6]=de),(0,l.useEffect)(ue,de);let fe;t[7]===W?fe=t[8]:(fe=(e,t)=>{le(new Set(_(W,e,t)))},t[7]=W,t[8]=fe);let pe=fe,[K,q]=(0,l.useState)(0),[me,he]=(0,l.useState)(!1),ge;t[9]===W?ge=t[10]:(ge=()=>v(W),t[9]=W,t[10]=ge);let[J,_e]=(0,l.useState)(ge),[ve,ye]=(0,l.useState)(0),[be,xe]=(0,l.useState)(!1),Se;t[11]!==H||t[12]!==A||t[13]!==W||t[14]!==q||t[15]!==xe?(Se=()=>{let e=g(W),t=(A[H]?.lessons??[]).findIndex((t,n)=>!e.has(n));q(t===-1?0:t),_e(v(W)),ye(0),xe(!1)},t[11]=H,t[12]=A,t[13]=W,t[14]=q,t[15]=xe,t[16]=Se):Se=t[16];let Ce;t[17]!==H||t[18]!==A||t[19]!==W?(Ce=[W,H,A],t[17]=H,t[18]=A,t[19]=W,t[20]=Ce):Ce=t[20],(0,l.useEffect)(Se,Ce);let we;t[21]===he?we=t[22]:(we=()=>he(!1),t[21]=he,t[22]=we);let Te;t[23]!==K||t[24]!==H?(Te=[K,H],t[23]=K,t[24]=H,t[25]=Te):Te=t[25],(0,l.useEffect)(we,Te);let[Ee,De]=(0,l.useState)(null),[Oe,ke]=(0,l.useState)(`idle`),[Ae,je]=(0,l.useState)(0),Me=(0,l.useRef)(null),Ne;t[26]===Symbol.for(`react.memo_cache_sentinel`)?(Ne=()=>{De(null),ke(`idle`),Me.current=null},t[26]=Ne):Ne=t[26];let Pe;t[27]===H?Pe=t[28]:(Pe=[H],t[27]=H,t[28]=Pe),(0,l.useEffect)(Ne,Pe);let Fe,Ie;t[29]!==K||t[30]!==Ae||t[31]!==H||t[32]!==A||t[33]!==h?(Fe=()=>{let e=A[H];if(!e||!h||K<e.lessons.length||e.quiz?.length||e.capstone)return;let t=`${H}:${Ae}`;if(Me.current===t)return;Me.current=t;let n=!0;return ke(`loading`),h(e).then(e=>{n&&(e&&(e.quiz?.length||e.capstone)?(De(e),ke(`ready`)):ke(`error`))}),()=>{n=!1}},Ie=[A,H,K,h,Ae],t[29]=K,t[30]=Ae,t[31]=H,t[32]=A,t[33]=h,t[34]=Fe,t[35]=Ie):(Fe=t[34],Ie=t[35]),(0,l.useEffect)(Fe,Ie);let Le;t[36]===Symbol.for(`react.memo_cache_sentinel`)?(Le=()=>je(ae),t[36]=Le):Le=t[36];let Re=Le,[Y,ze]=(0,l.useState)(null),[Be,Ve]=(0,l.useState)(``),[He,Ue]=(0,l.useState)(!1),[We,Ge]=(0,l.useState)(!1),[Ke,qe]=(0,l.useState)(``),Je;if(t[37]===Symbol.for(`react.memo_cache_sentinel`)?(Je=()=>{ze(null),Ve(``),Ue(!1),qe(``)},t[37]=Je):Je=t[37],(0,l.useEffect)(Je,[V?.commitSha,D]),A.length===0||!U){if(f){let e;return t[38]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,S.jsx)(P,{title:`Building your curriculum from the code…`,sub:`Reading the README, the areas, and the real files to write a leveled course you can climb without fear.`,preview:!0}),t[38]=e):e=t[38],e}let e;return t[39]===p?e=t[40]:(e=(0,S.jsx)(`div`,{className:`ripple-course-empty`,children:p?(0,S.jsxs)(S.Fragment,{children:[(0,S.jsx)(`p`,{children:`Couldn’t build a course from this view yet.`}),(0,S.jsx)(`button`,{type:`button`,className:`ripple-course-reveal`,onClick:p,children:`Try again`})]}):(0,S.jsx)(`p`,{children:`Connect a model in Settings to generate a course from this code.`})}),t[39]=p,t[40]=e),e}let X=U.lessons,Z=X[Math.min(K,X.length-1)],Ye=X.reduce(ie,0),Xe;t[41]!==G.size||t[42]!==X.length?(Xe=Math.round(G.size/X.length*100),t[41]=G.size,t[42]=X.length,t[43]=Xe):Xe=t[43];let Ze=Xe,Qe;t[44]!==Ee?.quiz||t[45]!==U.quiz?(Qe=U.quiz??Ee?.quiz??[],t[44]=Ee?.quiz,t[45]=U.quiz,t[46]=Qe):Qe=t[46];let Q=Qe,$=U.capstone??Ee?.capstone,$e=X.length>0&&(Q.length>0||!!$||!!h),et=$e&&K>=X.length,tt=K<X.length-1||$e,nt;t[47]===W?nt=t[48]:(nt=e=>{y(W,e.correct,e.total),_e(v(W))},t[47]=W,t[48]=nt);let rt=nt,it;t[49]!==U.title||t[50]!==Q||t[51]!==j?(it=()=>{ye(i(Q.map(re),{deck:`Ripple · ${j||`this repo`}`,tags:[U.title],source:{topic:U.title,ts:Date.now()},origin:`auto`}).length)},t[49]=U.title,t[50]=Q,t[51]=j,t[52]=it):it=t[52];let at=it,ot;t[53]!==ve||t[54]!==at?(ot=()=>ve>0?(0,S.jsxs)(`p`,{className:`ripple-quiz-flash-saved`,children:[`+`,ve,` card`,ve===1?``:`s`,` saved to your deck`]}):(0,S.jsx)(`button`,{type:`button`,className:`ripple-course-reveal`,onClick:at,children:`Keep these as flashcards`}),t[53]=ve,t[54]=at,t[55]=ot):ot=t[55];let st=ot,ct=oe&&Y?s(X,Y):new Set,lt=async()=>{if(Y)return Y;if(!ee||!V?.commitSha||!D)return null;Ge(!0),qe(``);let e=await ee(V.commitSha,D);if(Ge(!1),!e.ok||!e.diff)return qe(e.detail||`Couldn’t load what changed.`),null;let t=a(e.diff).files.map(B);return ze(t),Ve(e.diff),t},ut=()=>{if(He){Ue(!1);return}lt().then(e=>{e&&Ue(!0)})},dt=()=>{lt().then(e=>{if(!e)return;let t=s(X,e);t.size>0&&q(Math.min(...t))})},ft=()=>{!Be||!te||!V||!D||te(Be,`${j} ${M(V.commitSha)}...${M(D)}`,j)},pt;t[56]===j?pt=t[57]:(pt=e=>{let t=`${j||`repo`}::${e.title}`,n=v(t);return{lessonsDone:g(t).size,lessonsTotal:e.lessons.length,hasQuiz:(e.quiz?.length??0)>0,quizPassed:!!n&&b(n.correct,n.total)}},t[56]=j,t[57]=pt);let mt=pt,ht;t[58]===Symbol.for(`react.memo_cache_sentinel`)?(ht=(0,S.jsx)(`span`,{className:`ripple-course-pill`,children:`Guided curriculum`}),t[58]=ht):ht=t[58];let gt;t[59]!==f||t[60]!==w||t[61]!==n.modules||t[62]!==T?(gt=T&&n.modules.length>1&&(0,S.jsxs)(`div`,{className:`ripple-course-focus`,title:`Build the course around one area — best on a large repo, where a whole-repo course only skims. Whole repo prioritises the highest-impact areas.`,children:[(0,S.jsx)(`span`,{className:`ripple-course-focus-label`,children:`Focus`}),(0,S.jsx)(r,{ariaLabel:`Course focus`,triggerClassName:`ripple-course-focus-select`,value:w??``,onChange:e=>T(e||void 0),disabled:f,options:[{value:``,label:`Whole repo`},...n.modules.slice(0,50).map(z)]})]}),t[59]=f,t[60]=w,t[61]=n.modules,t[62]=T,t[63]=gt):gt=t[63];let _t;t[64]!==f||t[65]!==p?(_t=p&&(0,S.jsx)(`button`,{type:`button`,className:`ripple-course-regen`,onClick:p,disabled:f,title:`Rebuild the curriculum from the latest code`,children:f?`Rebuilding…`:`↻ Regenerate`}),t[64]=f,t[65]=p,t[66]=_t):_t=t[66];let vt;t[67]!==gt||t[68]!==_t?(vt=(0,S.jsxs)(`div`,{className:`ripple-course-head-top`,children:[ht,gt,_t]}),t[67]=gt,t[68]=_t,t[69]=vt):vt=t[69];let yt;t[70]!==H||t[71]!==A||t[72]!==mt||t[73]!==j?(yt=A.length>1&&(0,S.jsx)(`div`,{className:`ripple-course-tracks`,role:`tablist`,"aria-label":`Courses`,children:A.map((e,t)=>{let n=g(`${j||`repo`}::${e.title}`).size,r=n>=e.lessons.length,i=t>0?A[t-1]:void 0,a=!!i&&x(mt(i));return(0,S.jsxs)(`button`,{type:`button`,role:`tab`,className:`ripple-course-track`,"data-active":t===H?`true`:void 0,"data-locked":a?`true`:void 0,"aria-selected":t===H,onClick:()=>se(t),children:[(0,S.jsxs)(`span`,{className:`ripple-course-track-top`,children:[(0,S.jsx)(`span`,{className:`ripple-course-step`,"data-done":r?`true`:void 0,children:r?`✓`:t+1}),e.level?(0,S.jsx)(`span`,{className:`ripple-course-level`,"data-level":e.level,children:N[e.level]}):(0,S.jsxs)(`span`,{className:`ripple-course-track-meta`,children:[n,`/`,e.lessons.length]})]}),(0,S.jsx)(`span`,{className:`ripple-course-track-title`,children:e.title}),a&&(0,S.jsxs)(`span`,{className:`ripple-course-track-lock`,children:[(0,S.jsx)(`span`,{"aria-hidden":`true`,children:`🔒`}),` Usually after “`,i.title,`” —`,` `,(0,S.jsx)(`span`,{className:`ripple-course-track-skip`,children:`I already know this, skip ahead`})]})]},e.title)})}),t[70]=H,t[71]=A,t[72]=mt,t[73]=j,t[74]=yt):yt=t[74];let bt;t[75]===U.title?bt=t[76]:(bt=(0,S.jsx)(`h2`,{className:`ripple-course-title`,children:U.title}),t[75]=U.title,t[76]=bt);let xt;t[77]===U.subtitle?xt=t[78]:(xt=U.subtitle&&(0,S.jsx)(`p`,{className:`ripple-course-sub`,children:U.subtitle}),t[77]=U.subtitle,t[78]=xt);let St=Ye>0?` · ~${Ye} min`:``,Ct;t[79]!==G.size||t[80]!==X.length||t[81]!==St?(Ct=(0,S.jsxs)(`div`,{className:`ripple-course-meta`,children:[X.length,` lessons`,St,` · `,G.size,`/`,X.length,` done`]}),t[79]=G.size,t[80]=X.length,t[81]=St,t[82]=Ct):Ct=t[82];let wt=`${Ze}%`,Tt;t[83]===wt?Tt=t[84]:(Tt=(0,S.jsx)(`div`,{className:`ripple-course-bar`,"aria-hidden":`true`,children:(0,S.jsx)(`span`,{style:{width:wt}})}),t[83]=wt,t[84]=Tt);let Et;t[85]!==vt||t[86]!==yt||t[87]!==bt||t[88]!==xt||t[89]!==Ct||t[90]!==Tt?(Et=(0,S.jsxs)(`header`,{className:`ripple-course-head`,children:[vt,yt,bt,xt,Ct,Tt]}),t[85]=vt,t[86]=yt,t[87]=bt,t[88]=xt,t[89]=Ct,t[90]=Tt,t[91]=Et):Et=t[91];let Dt=oe&&V&&(0,S.jsxs)(`div`,{className:`ripple-course-stale`,role:`status`,children:[(0,S.jsx)(`div`,{className:`ripple-eyebrow`,children:`The code moved`}),(0,S.jsxs)(`p`,{className:`ripple-course-stale-text`,children:[`The code moved since this course was built (`,(0,S.jsx)(`code`,{children:M(V.commitSha)}),` →`,` `,(0,S.jsx)(`code`,{children:M(D)}),`).`]}),Ke&&(0,S.jsx)(`p`,{className:`ripple-course-stale-err`,children:Ke}),(0,S.jsxs)(`div`,{className:`ripple-course-stale-actions`,children:[(0,S.jsx)(`button`,{type:`button`,className:`ripple-course-stale-btn`,onClick:ut,disabled:We,children:We?`Loading…`:He?`Hide what changed`:`See what changed`}),(0,S.jsx)(`button`,{type:`button`,className:`ripple-course-stale-btn`,onClick:dt,disabled:We,children:`Refresh stale lessons`}),p&&(0,S.jsx)(`button`,{type:`button`,className:`ripple-course-stale-btn`,onClick:p,disabled:f,children:`Rebuild course`})]}),He&&Y&&(0,S.jsxs)(`div`,{className:`ripple-course-changed-panel`,children:[(0,S.jsx)(`ul`,{children:Y.slice(0,20).map(R)}),Y.length>20&&(0,S.jsxs)(`p`,{className:`ripple-course-changed-more`,children:[`+`,Y.length-20,` more file`,Y.length-20==1?``:`s`]}),te&&(0,S.jsx)(`button`,{type:`button`,className:`ripple-course-stale-btn`,onClick:ft,children:`Open as a full analysis →`})]})]}),Ot=X.map((e,t)=>{let n=G.has(t),r=ct.has(t);return(0,S.jsxs)(`button`,{type:`button`,className:`ripple-course-item`,"data-active":t===K?`true`:void 0,"data-done":n?`true`:void 0,"data-stale":r?`true`:void 0,onClick:()=>q(t),children:[(0,S.jsx)(`span`,{className:`ripple-course-num`,"aria-hidden":`true`,children:n?`✓`:t+1}),(0,S.jsxs)(`span`,{className:`ripple-course-item-body`,children:[(0,S.jsxs)(`span`,{className:`ripple-course-item-title`,children:[e.title,r&&(0,S.jsx)(`span`,{className:`ripple-course-item-stale`,title:`Its files changed since this course was built`,children:`stale`})]}),e.minutes?(0,S.jsxs)(`span`,{className:`ripple-course-item-min`,children:[`~`,e.minutes,` min`]}):null]})]},t)}),kt;t[92]!==$e||t[93]!==$||t[94]!==X.length||t[95]!==et||t[96]!==Q.length||t[97]!==q?(kt=$e&&(0,S.jsxs)(`button`,{type:`button`,className:`ripple-course-item ripple-course-item-quiz`,"data-active":et?`true`:void 0,onClick:()=>q(X.length),children:[(0,S.jsx)(`span`,{className:`ripple-course-num`,"aria-hidden":`true`,children:`★`}),(0,S.jsxs)(`span`,{className:`ripple-course-item-body`,children:[(0,S.jsx)(`span`,{className:`ripple-course-item-title`,children:Q.length>0?`Quiz`:$?`Capstone`:`Wrap-up`}),(0,S.jsx)(`span`,{className:`ripple-course-item-min`,children:Q.length>0?`${Q.length} question${Q.length===1?``:`s`}`:$?`Closing project`:`Quiz & capstone`})]})]}),t[92]=$e,t[93]=$,t[94]=X.length,t[95]=et,t[96]=Q.length,t[97]=q,t[98]=kt):kt=t[98];let At;t[99]!==Ot||t[100]!==kt?(At=(0,S.jsxs)(`nav`,{className:`ripple-course-list`,"aria-label":`Lessons`,children:[Ot,kt]}),t[99]=Ot,t[100]=kt,t[101]=At):At=t[101];let jt;t[102]!==K||t[103]!==d||t[104]!==$||t[105]!==Oe||t[106]!==U||t[107]!==H||t[108]!==G||t[109]!==rt||t[110]!==st||t[111]!==tt||t[112]!==Z||t[113]!==X.length||t[114]!==m||t[115]!==pe||t[116]!==O||t[117]!==et||t[118]!==Q||t[119]!==J||t[120]!==F||t[121]!==j||t[122]!==be||t[123]!==Re||t[124]!==me||t[125]!==q||t[126]!==xe||t[127]!==he||t[128]!==E?(jt=(0,S.jsx)(`article`,{className:`ripple-course-lesson`,"aria-live":`polite`,children:et?(0,S.jsx)(S.Fragment,{children:Q.length===0&&!$&&Oe===`loading`?(0,S.jsx)(P,{title:`Writing the quiz & capstone for ${U.title}…`,sub:`A few end-of-week questions and a small hands-on project, grounded in what this week studied.`}):Q.length===0&&!$&&Oe===`error`?(0,S.jsxs)(`div`,{className:`ripple-course-empty`,children:[(0,S.jsx)(`p`,{children:`Couldn’t build the quiz & capstone for this course yet.`}),(0,S.jsx)(`button`,{type:`button`,className:`ripple-course-reveal`,onClick:Re,children:`Try again`})]}):(0,S.jsxs)(S.Fragment,{children:[Q.length>0&&(0,S.jsxs)(S.Fragment,{children:[(0,S.jsx)(`div`,{className:`ripple-eyebrow`,children:`Course quiz`}),(0,S.jsx)(`h3`,{className:`ripple-course-lesson-title`,children:`Test yourself`}),(0,S.jsxs)(`p`,{className:`ripple-course-explain`,children:[`Answer these to be sure you really understood `,U.title,`.`]}),J&&!be?(0,S.jsxs)(`div`,{className:`ripple-quiz-done`,children:[(0,S.jsxs)(`div`,{className:`ripple-quiz-score`,"data-passed":b(J.correct,J.total)?`true`:void 0,role:`status`,children:[(0,S.jsxs)(`div`,{className:`ripple-quiz-score-num`,children:[J.correct,`/`,J.total]}),(0,S.jsx)(`p`,{className:`ripple-quiz-score-text`,children:b(J.correct,J.total)?`You know this one — nice work.`:`Worth another pass — ${J.total-J.correct} to revisit.`})]}),(0,S.jsx)(`div`,{className:`ripple-quiz-flashcards`,children:st()}),(0,S.jsx)(`button`,{type:`button`,className:`ripple-course-skip`,onClick:()=>xe(!0),children:`Retake the quiz`})]}):(0,S.jsx)(k,{questions:Q,onFinish:e=>{rt(e),xe(!1)},children:(0,S.jsx)(`div`,{className:`ripple-quiz-flashcards`,children:st()})},`quiz:${H}`)]}),$&&(0,S.jsxs)(`section`,{className:`ripple-course-capstone`,children:[(0,S.jsx)(`div`,{className:`ripple-eyebrow`,children:`Capstone`}),(0,S.jsx)(`h4`,{className:`ripple-course-capstone-title`,children:$.title}),(0,S.jsx)(`p`,{className:`ripple-course-capstone-brief`,children:$.brief}),$.steps.length>0&&(0,S.jsxs)(`div`,{className:`ripple-course-group`,children:[(0,S.jsx)(`div`,{className:`ripple-course-capstone-label`,children:`Do this`}),(0,S.jsx)(`ol`,{className:`ripple-course-capstone-steps`,children:$.steps.map(L)})]}),$.acceptance.length>0&&(0,S.jsxs)(`div`,{className:`ripple-course-group`,children:[(0,S.jsx)(`div`,{className:`ripple-course-capstone-label`,children:`You’ll know it worked when`}),(0,S.jsx)(`ul`,{className:`ripple-course-capstone-accept`,children:$.acceptance.map(I)})]})]})]})}):(0,S.jsxs)(S.Fragment,{children:[(0,S.jsxs)(`div`,{className:`ripple-eyebrow`,children:[`Lesson `,K+1,` of `,X.length,Z.minutes?` · ~${Z.minutes} min`:``]}),(0,S.jsx)(`h3`,{className:`ripple-course-lesson-title`,children:Z.title}),(0,S.jsx)(C,{course:U,lesson:Z,altitude:d,repo:j,gitRef:F,fileUrl:e=>c(j,F,e),loadLessonDetail:m,speak:E,onAskAboutLesson:O},`${H}:${K}:${d}`),Z.checkpoint&&(0,S.jsxs)(`section`,{className:`ripple-course-checkpoint`,children:[(0,S.jsx)(`div`,{className:`ripple-eyebrow`,children:`Check yourself`}),(0,S.jsx)(`p`,{className:`ripple-course-q`,children:Z.checkpoint.question}),me?(0,S.jsx)(`p`,{className:`ripple-course-a`,children:Z.checkpoint.answer}):(0,S.jsx)(`button`,{type:`button`,className:`ripple-course-reveal`,onClick:()=>he(!0),children:`Show answer`})]}),(0,S.jsxs)(`div`,{className:`ripple-course-actions`,children:[(0,S.jsx)(`button`,{type:`button`,className:`ripple-course-done`,onClick:()=>{let e=G.has(K);pe(K,!e),!e&&tt&&q(K+1)},children:G.has(K)?`Done ✓`:tt?`Mark done & next →`:`Mark done ✓`}),tt&&(0,S.jsx)(`button`,{type:`button`,className:`ripple-course-skip`,onClick:()=>q(K+1),children:K===X.length-1?`Take the quiz →`:`Skip ahead`})]})]})}),t[102]=K,t[103]=d,t[104]=$,t[105]=Oe,t[106]=U,t[107]=H,t[108]=G,t[109]=rt,t[110]=st,t[111]=tt,t[112]=Z,t[113]=X.length,t[114]=m,t[115]=pe,t[116]=O,t[117]=et,t[118]=Q,t[119]=J,t[120]=F,t[121]=j,t[122]=be,t[123]=Re,t[124]=me,t[125]=q,t[126]=xe,t[127]=he,t[128]=E,t[129]=jt):jt=t[129];let Mt;t[130]!==At||t[131]!==jt?(Mt=(0,S.jsxs)(`div`,{className:`ripple-course-body`,children:[At,jt]}),t[130]=At,t[131]=jt,t[132]=Mt):Mt=t[132];let Nt;return t[133]!==Et||t[134]!==Dt||t[135]!==Mt?(Nt=(0,S.jsxs)(`div`,{className:`ripple-course`,children:[Et,Dt,Mt]}),t[133]=Et,t[134]=Dt,t[135]=Mt,t[136]=Nt):Nt=t[136],Nt}function I(e,t){return(0,S.jsx)(`li`,{children:e},t)}function L(e,t){return(0,S.jsx)(`li`,{children:e},t)}function R(e){return(0,S.jsx)(`li`,{children:e},e)}function z(e){return{value:e.name,label:e.name}}function B(e){return e.path}function re(e){return{front:e.question,back:e.answer}}function ie(e,t){return e+(t.minutes??0)}function ae(e){return e+1}export{F as ShipCourse};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t as e}from"./react-BQSORdFI.js";import{t}from"./jsx-runtime-DaSxXjOY.js";import{ht as n}from"./index-
|
|
1
|
+
import{t as e}from"./react-BQSORdFI.js";import{t}from"./jsx-runtime-DaSxXjOY.js";import{ht as n}from"./index-C7H7A1rW.js";var r=e(),i=n(),a=t();function o(e){return e===`haunted`?`var(--danger)`:e===`hot`?`var(--warning)`:`var(--insight)`}function s(e){return e===`incident`?`var(--danger)`:`var(--presence)`}function c(e){let t=(0,i.c)(50),{model:n}=e,{hotspots:s}=n,[c,d]=(0,r.useState)(s[0]?.id??``),f;t[0]!==s||t[1]!==c?(f=s.find(e=>e.id===c)??s[0],t[0]=s,t[1]=c,t[2]=f):f=t[2];let p=f;if(!p){let e;return t[3]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,a.jsxs)(`div`,{className:`ripple-hot-empty`,children:[(0,a.jsx)(`div`,{className:`ripple-eyebrow`,children:`The story behind any line`}),(0,a.jsx)(`p`,{children:`No load-bearing lines surfaced for this change.`})]}),t[3]=e):e=t[3],e}let m;t[4]===p.cls?m=t[5]:(m=o(p.cls),t[4]=p.cls,t[5]=m);let h=m,g;t[6]===Symbol.for(`react.memo_cache_sentinel`)?(g=(0,a.jsx)(`div`,{className:`ripple-eyebrow ripple-hot-list-head`,children:`The story behind any line`}),t[6]=g):g=t[6];let _;if(t[7]!==p.id||t[8]!==s){let e;t[10]===p.id?e=t[11]:(e=e=>{let t=e.id===p.id;return(0,a.jsxs)(`button`,{type:`button`,role:`tab`,"aria-selected":t,className:`ripple-hot-item`,"data-active":t,onClick:()=>d(e.id),children:[(0,a.jsx)(`span`,{className:`ripple-hot-cls`,style:{color:o(e.cls),background:`color-mix(in oklab, ${o(e.cls)} 16%, transparent)`,borderColor:`color-mix(in oklab, ${o(e.cls)} 34%, transparent)`},children:e.cls}),(0,a.jsx)(`span`,{className:`ripple-hot-symbol`,children:e.symbol}),(0,a.jsx)(`span`,{className:`ripple-hot-file`,children:e.file})]},e.id)},t[10]=p.id,t[11]=e),_=s.map(e),t[7]=p.id,t[8]=s,t[9]=_}else _=t[9];let v;t[12]===_?v=t[13]:(v=(0,a.jsxs)(`div`,{className:`ripple-hot-list`,role:`tablist`,"aria-label":`Load-bearing lines`,children:[g,_]}),t[12]=_,t[13]=v);let y=`color-mix(in oklab, ${h} 14%, transparent)`,b=`color-mix(in oklab, ${h} 30%, transparent)`,x;t[14]!==h||t[15]!==y||t[16]!==b?(x={color:h,background:y,borderColor:b},t[14]=h,t[15]=y,t[16]=b,t[17]=x):x=t[17];let S;t[18]!==p.symbol||t[19]!==x?(S=(0,a.jsx)(`code`,{className:`ripple-hot-chip`,style:x,children:p.symbol}),t[18]=p.symbol,t[19]=x,t[20]=S):S=t[20];let C;t[21]===p.file?C=t[22]:(C=(0,a.jsx)(`span`,{className:`ripple-hot-detail-file`,children:p.file}),t[21]=p.file,t[22]=C);let w;t[23]!==C||t[24]!==S?(w=(0,a.jsxs)(`div`,{className:`ripple-hot-detail-head`,children:[S,C]}),t[23]=C,t[24]=S,t[25]=w):w=t[25];let T;t[26]===Symbol.for(`react.memo_cache_sentinel`)?(T=(0,a.jsx)(`div`,{className:`ripple-eyebrow`,children:`Why this line exists`}),t[26]=T):T=t[26];let E;t[27]===p.whyExists?E=t[28]:(E=(0,a.jsxs)(`section`,{className:`ripple-hot-why`,children:[T,(0,a.jsx)(`p`,{children:p.whyExists})]}),t[27]=p.whyExists,t[28]=E);let D;t[29]!==h||t[30]!==p.incident?(D=p.incident&&(0,a.jsxs)(`section`,{className:`ripple-hot-incident`,style:{background:`color-mix(in oklab, ${h} 9%, transparent)`,borderColor:`color-mix(in oklab, ${h} 28%, transparent)`},children:[(0,a.jsxs)(`div`,{className:`ripple-hot-incident-head`,children:[(0,a.jsx)(`span`,{className:`ripple-hot-sev`,style:{background:h},children:p.incident.severity}),(0,a.jsx)(`code`,{className:`ripple-hot-incident-id`,children:p.incident.id})]}),(0,a.jsx)(`p`,{children:p.incident.text})]}),t[29]=h,t[30]=p.incident,t[31]=D):D=t[31];let O;t[32]===p.decisionTrail?O=t[33]:(O=p.decisionTrail&&p.decisionTrail.length>0&&(0,a.jsxs)(`section`,{className:`ripple-hot-trail`,children:[(0,a.jsx)(`div`,{className:`ripple-eyebrow`,children:`The decision trail`}),(0,a.jsx)(`ol`,{className:`ripple-hot-timeline`,children:p.decisionTrail.map(u)})]}),t[32]=p.decisionTrail,t[33]=O);let k;t[34]===p.ask?k=t[35]:(k=p.ask&&(0,a.jsxs)(`section`,{className:`ripple-hot-ask`,children:[(0,a.jsx)(`div`,{className:`ripple-eyebrow`,children:`Who to actually ask`}),(0,a.jsxs)(`div`,{className:`ripple-hot-ask-card`,children:[(0,a.jsx)(`span`,{className:`ripple-hot-avatar`,"aria-hidden":`true`,children:p.ask.name.charAt(0)}),(0,a.jsxs)(`div`,{className:`ripple-hot-ask-who`,children:[(0,a.jsx)(`span`,{className:`ripple-hot-ask-name`,children:p.ask.name}),(0,a.jsx)(`span`,{className:`ripple-hot-ask-team`,children:p.ask.team})]})]}),(0,a.jsx)(`p`,{className:`ripple-hot-ask-why`,children:p.ask.why}),p.ask.note&&(0,a.jsx)(`p`,{className:`ripple-hot-ask-note`,children:p.ask.note})]}),t[34]=p.ask,t[35]=k);let A;t[36]===p.riskSignals?A=t[37]:(A=p.riskSignals&&p.riskSignals.length>0&&(0,a.jsxs)(`section`,{className:`ripple-hot-signals`,children:[(0,a.jsx)(`div`,{className:`ripple-eyebrow`,children:`Risk signals`}),(0,a.jsx)(`dl`,{className:`ripple-hot-signal-grid`,children:p.riskSignals.map(l)})]}),t[36]=p.riskSignals,t[37]=A);let j;t[38]!==k||t[39]!==A?(j=(0,a.jsxs)(`div`,{className:`ripple-hot-cols`,children:[k,A]}),t[38]=k,t[39]=A,t[40]=j):j=t[40];let M;t[41]!==w||t[42]!==E||t[43]!==D||t[44]!==O||t[45]!==j?(M=(0,a.jsxs)(`div`,{className:`ripple-hot-detail`,role:`tabpanel`,children:[w,E,D,O,j]}),t[41]=w,t[42]=E,t[43]=D,t[44]=O,t[45]=j,t[46]=M):M=t[46];let N;return t[47]!==M||t[48]!==v?(N=(0,a.jsxs)(`div`,{className:`ripple-hot`,children:[v,M]}),t[47]=M,t[48]=v,t[49]=N):N=t[49],N}function l(e,t){return(0,a.jsxs)(`div`,{className:`ripple-hot-signal`,children:[(0,a.jsx)(`dt`,{children:e.k}),(0,a.jsx)(`dd`,{children:e.v})]},`${e.k}-${t}`)}function u(e,t){return(0,a.jsxs)(`li`,{className:`ripple-hot-event`,children:[(0,a.jsx)(`span`,{className:`ripple-hot-event-dot`,style:{background:s(e.kind)},"aria-hidden":`true`}),(0,a.jsxs)(`div`,{className:`ripple-hot-event-body`,children:[(0,a.jsxs)(`div`,{className:`ripple-hot-event-top`,children:[(0,a.jsx)(`time`,{className:`ripple-hot-event-date`,children:e.date}),(0,a.jsx)(`span`,{className:`ripple-hot-event-kind`,children:e.kind})]}),(0,a.jsx)(`span`,{className:`ripple-hot-event-label`,children:e.label})]})]},`${e.date}-${t}`)}export{c as ShipHotspots};
|