@yuriai/web 0.2.14 → 0.2.19

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (94) hide show
  1. package/dist/assets/{AgentAvatar-DJCC3Aqe.js → AgentAvatar-CVIpaYPU.js} +1 -1
  2. package/dist/assets/AssistantView-D5vJW3gp.js +3 -0
  3. package/dist/assets/{DiagramView-B7Z-RJUd.js → DiagramView-HNaj_sVG.js} +1 -1
  4. package/dist/assets/{FadeInOnReveal-CxIQc2_J.js → FadeInOnReveal-Dq1IuEQp.js} +1 -1
  5. package/dist/assets/{GuiPluginSurface-DCkAA0R4.js → GuiPluginSurface-N-iK-MeX.js} +1 -1
  6. package/dist/assets/{GuiPluginWindow-pZqqyXGs.js → GuiPluginWindow-ClutFX_h.js} +1 -1
  7. package/dist/assets/Icon-tnX3bel1.js +1 -0
  8. package/dist/assets/{ImageLoadingPlaceholder-B5t9zOYn.js → ImageLoadingPlaceholder-IE6JO3WM.js} +1 -1
  9. package/dist/assets/{LoadingImage-ByZs_EGY.js → LoadingImage-DNZmZRZS.js} +1 -1
  10. package/dist/assets/{MarkdownRenderer-CYvVcdhy.js → MarkdownRenderer-DuA1vlFT.js} +2 -2
  11. package/dist/assets/{MarkdownRendererImpl-C_h6Vpba.js → MarkdownRendererImpl-BwZ91PA5.js} +1 -1
  12. package/dist/assets/{MarkstreamRendererImpl-BE2iZJll.js → MarkstreamRendererImpl-kgBwH_VF.js} +1 -1
  13. package/dist/assets/{MobileDetailNavigation-D57BJCZT.js → MobileDetailNavigation-sm5MbnK3.js} +1 -1
  14. package/dist/assets/{MobileResizableSheet-BdOIJ61C.js → MobileResizableSheet-Cw6rRBR2.js} +1 -1
  15. package/dist/assets/{MobileShareBridge-BMbgy_Y9.js → MobileShareBridge-BjpB1cz1.js} +1 -1
  16. package/dist/assets/{MobileTabPageHeader-BW9y2zRG.js → MobileTabPageHeader-CEsc9PYV.js} +1 -1
  17. package/dist/assets/{MultiRunWindow-qgKnxGjk.js → MultiRunWindow-pslncrAh.js} +1 -1
  18. package/dist/assets/{OnboardingScreen-CXIYe29y.js → OnboardingScreen-o9e7j2Lk.js} +1 -1
  19. package/dist/assets/{OverlayScrollbar-0_OUbhJe.js → OverlayScrollbar-BA6KEyhj.js} +1 -1
  20. package/dist/assets/{SettingsView-RfNOKLm3.js → SettingsView-20rmUHhk.js} +12 -12
  21. package/dist/assets/{SettingsWindow-tXzBaLS_.js → SettingsWindow-D-Vjsme7.js} +1 -1
  22. package/dist/assets/{TerminalView-aZe7_W0A.js → TerminalView-B4bliT5i.js} +1 -1
  23. package/dist/assets/ToolOutputDialog-D1rZbaHo.js +10 -0
  24. package/dist/assets/{YuriLogo-_lN4cqhJ.js → YuriLogo-CDmH1ycw.js} +1 -1
  25. package/dist/assets/{appThemeRegistry-Br3aTf8c.js → appThemeRegistry-DyTPt9Uq.js} +1 -1
  26. package/dist/assets/{button-DFX-UCuQ.js → button-BEOJB042.js} +1 -1
  27. package/dist/assets/{capgoAdapter-VGW_DUcK.js → capgoAdapter-BrU-ms8F.js} +1 -1
  28. package/dist/assets/{collapsible-CDkbWw1M.js → collapsible-DrQlDm15.js} +1 -1
  29. package/dist/assets/{diagram-JdjLWkpD.js → diagram-DyQPPDKS.js} +1 -1
  30. package/dist/assets/{dialog-jQrYy1B7.js → dialog-CooVl0xA.js} +1 -1
  31. package/dist/assets/{dropdown-menu.styles-EKni18O6.js → dropdown-menu.styles-Bj4YEb3T.js} +1 -1
  32. package/dist/assets/{es-BJGEAUsH.js → es-DklBd0ox.js} +1 -1
  33. package/dist/assets/{fileMentionTouchSelection-f8n4X8BW.js → fileMentionTouchSelection-8I9u8H6l.js} +1 -1
  34. package/dist/assets/{fr-CFAAV_Hr.js → fr-CVUs46wM.js} +1 -1
  35. package/dist/assets/{gitApi-CjQVuhXI.js → gitApi-BVMvxPtG.js} +1 -1
  36. package/dist/assets/{input-g3JXmugD.js → input-B-4VixoV.js} +1 -1
  37. package/dist/assets/{insertionBoundaries-DQMPnN81.js → insertionBoundaries-YVc2e3H2.js} +1 -1
  38. package/dist/assets/{ja-1qFce7BA.js → ja-5reg09JK.js} +1 -1
  39. package/dist/assets/{ko-BDwpL-64.js → ko-DZdC6ooz.js} +1 -1
  40. package/dist/assets/main-Cs5VJerX.js +169 -0
  41. package/dist/assets/{main-CIqFfTRC.js → main-DZ5HVH-j.js} +2 -2
  42. package/dist/assets/{markdownHeightCache-BsFt9Iuh.js → markdownHeightCache-SdaL8x58.js} +1 -1
  43. package/dist/assets/{mcpQueries-DJfEAbB6.js → mcpQueries-B1ZULr7c.js} +1 -1
  44. package/dist/assets/{miniChat-C6iONZ7A.js → miniChat-DUSGfEUO.js} +2 -2
  45. package/dist/assets/{mobile-EJ2ArrGZ.js → mobile-CMXtTX1x.js} +2 -2
  46. package/dist/assets/{mobileBackNavigation-DCfPeDp4.js → mobileBackNavigation-D-cRdrKd.js} +1 -1
  47. package/dist/assets/{multirun-Cw4SWn2h.js → multirun-D6bNScic.js} +1 -1
  48. package/dist/assets/{native-config-D_5OLigY.js → native-config-obwt8WA1.js} +1 -1
  49. package/dist/assets/{pl-COzHGIeC.js → pl-BerZSK-a.js} +1 -1
  50. package/dist/assets/{projectMeta-DbrpqsSQ.js → projectMeta-LtQkG8fN.js} +1 -1
  51. package/dist/assets/{pt-BR-B6ps5NQH.js → pt-BR-ydmV6U49.js} +1 -1
  52. package/dist/assets/{readiness-D-k9h36r.js → readiness-BWBtf7Am.js} +1 -1
  53. package/dist/assets/{renderElectronMiniChatApp-Bnv9tCyw.js → renderElectronMiniChatApp-EL2J2wQd.js} +2 -2
  54. package/dist/assets/{renderMobileApp-C1wyf84w.js → renderMobileApp-DOCWKmuC.js} +6 -6
  55. package/dist/assets/{runtimeConfig-V7w7piDM.js → runtimeConfig-D577Rc9x.js} +1 -1
  56. package/dist/assets/{runtimeEndpointReset-86pXjFoO.js → runtimeEndpointReset-C5EiiaQf.js} +4 -4
  57. package/dist/assets/{scheduledTaskNavigation-DPl7XI48.js → scheduledTaskNavigation-CJEzv5Zr.js} +1 -1
  58. package/dist/assets/{sessionChangeSummary-DdG2p-qM.js → sessionChangeSummary-DAV313F8.js} +1 -1
  59. package/dist/assets/{sessionLookup-En7eKd0r.js → sessionLookup-CN_iYfk5.js} +1 -1
  60. package/dist/assets/{sortable-tabs-strip-Bp_bMUwf.js → sortable-tabs-strip-9okrTn1K.js} +1 -1
  61. package/dist/assets/{speechSettingsQueries-DJpyiHX1.js → speechSettingsQueries-BvJCYdR_.js} +1 -1
  62. package/dist/assets/src-nJdn6EvY.css +2 -0
  63. package/dist/assets/{store-CKaWYiP4.js → store-ClIuNNU7.js} +2 -2
  64. package/dist/assets/{textarea-BuvlUTo2.js → textarea-9sBs8Uld.js} +1 -1
  65. package/dist/assets/{tooltip-Byl6nrXB.js → tooltip-BkcQKx-p.js} +1 -1
  66. package/dist/assets/{types-CVQBgR8T.js → types-BcumvHrl.js} +1 -1
  67. package/dist/assets/{uk-StL0Y7Ti.js → uk-BnTevguX.js} +1 -1
  68. package/dist/assets/{useAppFontEffects-CeYo_5_Z.js → useAppFontEffects-D9c0mG1P.js} +51 -51
  69. package/dist/assets/{useDesktopWindowControlsLayout-BhIAC-yK.js → useDesktopWindowControlsLayout-Dx-zWLPl.js} +1 -1
  70. package/dist/assets/{useEffectiveDirectory-DvnOvqoO.js → useEffectiveDirectory-DPvKdopQ.js} +1 -1
  71. package/dist/assets/{useMobileNavigationStore-mTG_inGR.js → useMobileNavigationStore-9pGm6Lkc.js} +22 -22
  72. package/dist/assets/useWorkerHighlightedLines-DSzghYUI.js +7 -0
  73. package/dist/assets/{vendor-framer-motion-D8hQsul-.js → vendor-framer-motion-BQ3-sJMO.js} +1 -1
  74. package/dist/assets/vendor-motion-B4xmxmaP.js +1 -0
  75. package/dist/assets/{zh-CN-CxO7ZteK.js → zh-CN-DT6qIAPJ.js} +1 -1
  76. package/dist/assets/{zh-TW-9MJgbinh.js → zh-TW-CtLsIcFb.js} +1 -1
  77. package/dist/index.html +6 -6
  78. package/dist/mini-chat.html +6 -6
  79. package/dist/mobile.html +6 -6
  80. package/package.json +1 -1
  81. package/server/lib/assistants/DOCUMENTATION.md +29 -2
  82. package/server/lib/assistants/contact-attachments.http.test.js +1 -1
  83. package/server/lib/assistants/contact-greeting.js +18 -0
  84. package/server/lib/assistants/harness.js +2 -0
  85. package/server/lib/assistants/harness.test.js +4 -0
  86. package/server/lib/assistants/service.js +47 -5
  87. package/server/lib/assistants/service.test.js +214 -26
  88. package/dist/assets/AssistantView-Ba0QibJU.js +0 -3
  89. package/dist/assets/Icon-C1nXIg7J.js +0 -1
  90. package/dist/assets/ToolOutputDialog-BVplHxKd.js +0 -10
  91. package/dist/assets/main-DrimNmCT.js +0 -169
  92. package/dist/assets/src-dSUmXLC4.css +0 -2
  93. package/dist/assets/useWorkerHighlightedLines-Ez7d_RoZ.js +0 -7
  94. package/dist/assets/vendor-motion-DufQFNcM.js +0 -1
@@ -0,0 +1,7 @@
1
+ import{r as e}from"./rolldown-runtime-hePW80VL.js";import{it as t,rt as n}from"./vendor-base-ui-CdzJ6My_.js";import{v as r}from"./useUIStore-NMQx_cnG.js";import{n as i}from"./vendor-react-BP2cRVqX.js";import{f as a,r as o,t as s}from"./button-BEOJB042.js";import{n as c}from"./useThemeSystem-8jhE4Zyk.js";import{n as l}from"./Icon-tnX3bel1.js";import{i as u,n as d,t as f}from"./tooltip-BkcQKx-p.js";import{n as p}from"./MarkdownRenderer-DuA1vlFT.js";import{n as m,r as h}from"./toolHelpers-DL452NVK.js";import{n as g}from"./markdownTheme-DHoKvD6O.js";import{n as _,t as v}from"./markdown-worker-oBGEB9Eg.js";var y=e(t(),1),b=i(),x=n(),S=`w-[min(30rem,calc(100cqw-1rem))] min-w-[280px] max-w-full overflow-hidden rounded-xl shadow-[inset_0_1px_0_0_rgba(255,255,255,0.8),inset_0_0_0_1px_rgba(0,0,0,0.04),0_0_0_1px_rgba(0,0,0,0.10),0_1px_2px_-0.5px_rgba(0,0,0,0.08),0_4px_8px_-2px_rgba(0,0,0,0.08),0_12px_20px_-4px_rgba(0,0,0,0.08)] dark:shadow-[inset_0_1px_0_0_rgba(255,255,255,0.12),inset_0_0_0_1px_rgba(255,255,255,0.08),0_0_0_1px_rgba(0,0,0,0.36),0_1px_1px_-0.5px_rgba(0,0,0,0.22),0_3px_3px_-1.5px_rgba(0,0,0,0.20),0_6px_6px_-3px_rgba(0,0,0,0.16)]`,C={maxWidth:`min(28rem, calc(100cqw - 4ch))`,backgroundColor:`var(--surface-elevated)`,color:`var(--surface-elevated-foreground)`},w=`flex items-center justify-between gap-3 border-b border-[var(--surface-subtle)] px-3 py-2.5`,T=`text-xs font-medium leading-4 text-foreground md:text-[0.8125rem] md:leading-5`,E=`text-xs tabular-nums leading-4 text-muted-foreground md:text-[0.8125rem] md:leading-5`,D=`m-0 list-none divide-y divide-[var(--surface-subtle)] p-0`,O=`${D} max-h-[min(22rem,50vh)] overflow-y-auto`,k=`${D} w-full`,A={className:`p-0 rounded-none`,maxHeightClass:`max-h-[46vh]`,disableHorizontal:!0},j=`px-2.5 py-1.5 text-xs leading-4 md:py-2 md:text-[0.8125rem] md:leading-5`,M=`flex min-w-0 items-center gap-1 text-xs leading-4 text-muted-foreground md:gap-1.5 md:text-[0.8125rem] md:leading-5`,N=`min-w-0 truncate text-xs leading-4 text-foreground md:text-[0.8125rem] md:leading-5`,ee=`inline-flex shrink-0 items-center gap-1 text-xs leading-4 tabular-nums text-muted-foreground md:text-[0.8125rem] md:leading-5`,P=`h-3 w-3 shrink-0 md:h-3.5 md:w-3.5`,F={in_progress:`text-foreground`,pending:`text-foreground`,completed:`text-muted-foreground line-through`,cancelled:`text-muted-foreground line-through`},I={in_progress:`chat.statusRow.todo.status.inProgress`,pending:`chat.statusRow.todo.status.pending`,completed:`chat.statusRow.todo.status.completed`,cancelled:`chat.statusRow.todo.status.cancelled`},L=e=>{let t=(0,b.c)(26),{todo:n,isActive:r,activeRef:i}=e,{t:s}=a(),c=R.has(n.status)?n.status:`pending`,p=I[c],m;t[0]!==s||t[1]!==p?(m=s(p),t[0]=s,t[1]=p,t[2]=m):m=t[2];let h=m,g;t[3]===c?g=t[4]:(g=c===`in_progress`?(0,x.jsx)(l,{name:`record-circle`,className:`h-3.5 w-3.5 text-[var(--status-info)]`,"aria-hidden":`true`}):c===`completed`?(0,x.jsx)(l,{name:`checkbox-circle`,className:`h-3.5 w-3.5 text-[var(--status-success)]`,"aria-hidden":`true`}):(0,x.jsx)(l,{name:`time`,className:`h-3.5 w-3.5 text-muted-foreground`,"aria-hidden":`true`}),t[3]=c,t[4]=g);let _=g,v=r?`step`:void 0,y=r&&`bg-[var(--surface-muted)] before:absolute before:inset-y-2 before:left-0 before:w-0.5 before:rounded-full before:bg-[var(--status-info)]`,S;t[5]===y?S=t[6]:(S=o(`group relative grid min-w-0 grid-cols-[1rem_minmax(0,1fr)] items-start gap-2.5`,j,y),t[5]=y,t[6]=S);let C;t[7]!==_||t[8]!==h?(C=(0,x.jsx)(u,{asChild:!0,children:(0,x.jsx)(`span`,{className:`flex size-4 items-center justify-center`,"aria-label":h,children:_})}),t[7]=_,t[8]=h,t[9]=C):C=t[9];let w;t[10]===h?w=t[11]:(w=(0,x.jsx)(d,{side:`left`,sideOffset:6,children:h}),t[10]=h,t[11]=w);let T;t[12]!==C||t[13]!==w?(T=(0,x.jsxs)(f,{children:[C,w]}),t[12]=C,t[13]=w,t[14]=T):T=t[14];let E=F[c],D;t[15]===E?D=t[16]:(D=o(`block whitespace-normal break-words`,E),t[15]=E,t[16]=D);let O;t[17]!==D||t[18]!==n.content?(O=(0,x.jsx)(`span`,{className:`min-w-0 flex-1`,children:(0,x.jsx)(`span`,{className:D,children:n.content})}),t[17]=D,t[18]=n.content,t[19]=O):O=t[19];let k;return t[20]!==i||t[21]!==O||t[22]!==v||t[23]!==S||t[24]!==T?(k=(0,x.jsxs)(`li`,{ref:i,"aria-current":v,className:S,children:[T,O]}),t[20]=i,t[21]=O,t[22]=v,t[23]=S,t[24]=T,t[25]=k):k=t[25],k},R=new Set([`in_progress`,`pending`,`completed`,`cancelled`]),z=e=>e.replace(/&/g,`&amp;`).replace(/</g,`&lt;`).replace(/>/g,`&gt;`).replace(/"/g,`&quot;`).replace(/'/g,`&#39;`),B=e=>e?Object.entries(e).map(([e,t])=>t==null?``:`${e.startsWith(`--`)?e:e.replace(/[A-Z]/g,e=>`-${e.toLowerCase()}`)}:${typeof t==`number`?`${t}px`:t};`).join(``):``,V=(e,t,n)=>{let r=e.querySelector(`pre`);r&&(r.style.margin=`0`,r.style.background=`transparent`,r.style.whiteSpace=t?`pre-wrap`:`pre`,t&&(r.style.wordBreak=`break-word`,r.style.overflowWrap=`break-word`));let i=e.querySelector(`code`);if(i){let e=B(n);e&&i.setAttribute(`style`,`${i.getAttribute(`style`)??``}${e}`)}},H=e=>`<pre><code>${z(e)}</code></pre>`,U=e=>{let t=(0,b.c)(21),{code:n,language:r,className:i,style:a,codeStyle:s,wrap:l}=e,u=l!==void 0&&l,{currentTheme:d}=c(),f=y.useRef(null),p;t[0]===d?p=t[1]:(p=g(d),t[0]=d,t[1]=p);let m=p,h,_;t[2]!==n||t[3]!==s||t[4]!==u?(h=()=>{let e=f.current;e&&(e.innerHTML=H(n),V(e,u,s))},_=[n,u,s],t[2]=n,t[3]=s,t[4]=u,t[5]=h,t[6]=_):(h=t[5],_=t[6]),y.useLayoutEffect(h,_);let S,C;t[7]!==n||t[8]!==s||t[9]!==r||t[10]!==u?(S=()=>{let e=f.current;if(!e)return;let t=!0,i=new AbortController;return v(n,(r||`text`).toLowerCase(),{signal:i.signal,priority:`visible`}).then(n=>{!t||!e||!n||(e.innerHTML=n,V(e,u,s))}),()=>{t=!1,i.abort()}},C=[n,r,u,s],t[7]=n,t[8]=s,t[9]=r,t[10]=u,t[11]=S,t[12]=C):(S=t[11],C=t[12]),y.useEffect(S,C);let w;t[13]===i?w=t[14]:(w=o(`typography-code`,i),t[13]=i,t[14]=w);let T=m,E;t[15]!==a||t[16]!==T?(E={...T,...a},t[15]=a,t[16]=T,t[17]=E):E=t[17];let D;return t[18]!==w||t[19]!==E?(D=(0,x.jsx)(`div`,{ref:f,className:w,style:E}),t[18]=w,t[19]=E,t[20]=D):D=t[20],D},W=e=>{let t=e.replace(/^<file>\s*\n?/,``).replace(/\n?<\/file>\s*$/,``);return t=t.replace(/^\s*\d{5}\|\s?/gm,``),t.trim()},G=(e,t=``)=>{if(typeof e==`string`)return e;if(e==null)return t;if(typeof e==`number`||typeof e==`boolean`||typeof e==`bigint`)return String(e);try{return JSON.stringify(e)}catch{return t}},K=e=>e?e.includes(`<diagnostics`)||e.includes(`<file_diagnostics>`)||e.includes(`LSP errors detected`)||e.includes(`This file has errors`):!1,q=e=>e?e.replace(/\n{0,2}LSP errors detected[\s\S]*?<diagnostics[^>]*>[\s\S]*?<\/diagnostics>/g,``).replace(/\n{0,2}This file has errors[\s\S]*?<\/file_diagnostics>/g,``).replace(/<diagnostics[^>]*>[\s\S]*?<\/diagnostics>/g,``).replace(/<file_diagnostics>[\s\S]*?<\/file_diagnostics>/g,``).trim():``,J=(e,t)=>!e||typeof e!=`object`?String(e):h(e,t||``),Y=e=>{if(typeof e==`string`){let t=e.trim();return t.length>0?t:void 0}if(e&&typeof e==`object`){let t=e.patch;if(typeof t==`string`){let e=t.trim();return e.length>0?e:void 0}}},X=e=>{if(!e||typeof e!=`object`)return;let t=Y(e.patch)??Y(e.diff);if(t)return t;let n=Array.isArray(e.files)?e.files:[];for(let e of n){if(!e||typeof e!=`object`)continue;let t=Y(e.patch)??Y(e.diff);if(t)return t}},Z=e=>{if(!e||typeof e!=`string`)return{data:null,isJson:!1};let t=e.trim();if(!t.startsWith(`{`)&&!t.startsWith(`[`)||!t.endsWith(`}`)&&!t.endsWith(`]`)||t.length<2)return{data:null,isJson:!1};try{let e=JSON.parse(t);return typeof e==`object`&&e?{data:e,isJson:!0}:{data:null,isJson:!1}}catch{return{data:null,isJson:!1}}},Q=(e,t,n)=>{let r=W(e);if((t===`edit`||t===`multiedit`||t===`write`||t===`apply_patch`)&&K(r)&&(r=q(r)),(t===`edit`||t===`multiedit`||t===`apply_patch`)&&r.trim().length===0){let e=X(n);if(e)return e}return r},te=e=>{let t=e.match(/<type>(file|directory)<\/type>/i)?.[1]?.toLowerCase()??`unknown`,n=(e.match(/<content>([\s\S]*?)<\/content>/i)?.[1]??e).replace(/\r\n/g,`
2
+ `).split(`
3
+ `),r=e=>/\(\s*File has more lines\..*offset.*\)/i.test(e.trim());return{type:t,lines:n.map(e=>{let n=e.trim(),i=n.startsWith(`(`)&&n.endsWith(`)`)||r(n);if(t!==`directory`){let t=e.match(/^(\d+):\s?(.*)$/);if(t){let e=t[2],n=e.trim(),i=n.startsWith(`(`)&&n.endsWith(`)`)||r(n);return{lineNumber:i?null:Number(t[1]),text:e,isInfo:i}}}return{lineNumber:null,text:e,isInfo:i}}).filter((e,t,n)=>{if(e.text.trim().length>0)return!0;let r=n[t-1],i=n[t+1],a=!!(r?.isInfo||i?.isInfo),o=e.lineNumber!==null;return!(a&&o)})}},ne=(e,t)=>{try{let n=e.trim().split(`
4
+ `).filter(Boolean);if(n.length===0)return null;let i=[];return n.forEach(e=>{let t=e.match(/^(\s*)(.+)$/);if(t){let[,e,n]=t,r=Math.floor(e.length/2),a=!n.endsWith(`/`);i.push({name:n.replace(/\/$/,``),depth:r,isFile:a})}}),(0,x.jsx)(`div`,{className:o(`w-full min-w-0 font-mono space-y-0.5`,t?.unstyled?null:`p-3 bg-muted/20 rounded-xl border border-border/30`),style:r.tool.popup,children:i.map((e,t)=>(0,x.jsx)(`div`,{className:`min-w-0`,style:{paddingLeft:`${e.depth*20}px`},children:e.isFile?(0,x.jsx)(`span`,{className:`text-foreground/90 block truncate`,children:e.name}):(0,x.jsxs)(`span`,{className:`font-semibold text-foreground block truncate`,children:[e.name,`/`]})},t))})}catch{return null}},re={backgroundColor:`var(--status-info)`,opacity:.6},ie=(e,t,n)=>{try{let i=e.trim().split(`
5
+ `).filter(Boolean);if(i.length===0)return null;let a={};return i.forEach(e=>{let t=e.match(/^(.+?):(\d+):(.*)$/)||e.match(/^(.+?):(.*)$/);if(t){let[,e,n,r]=t,i=r===void 0?``:n,o=r===void 0?n:r;a[e]||(a[e]=[]),a[e].push({lineNum:i,content:o})}}),(0,x.jsxs)(`div`,{className:o(`space-y-2 w-full min-w-0`,n?.unstyled?null:`p-3 bg-muted/20 rounded-xl border border-border/30`),style:r.tool.popup,children:[(0,x.jsxs)(`div`,{className:`typography-meta text-muted-foreground mb-2`,children:[`Found `,i.length,` match`,i.length===1?``:`es`]}),Object.entries(a).map(([e,n])=>(0,x.jsxs)(`div`,{className:`space-y-1`,children:[(0,x.jsx)(`div`,{className:o(`font-medium text-muted-foreground`,t?`typography-micro`:`typography-code`),children:e}),(0,x.jsx)(`div`,{className:`pl-4 space-y-1`,children:n.map((e,n)=>!e.lineNum&&!e.content?null:(0,x.jsxs)(`div`,{className:o(`flex items-start gap-2 min-w-0`,t?`typography-micro`:`typography-code`),children:[(0,x.jsx)(`div`,{className:`w-1.5 h-1.5 rounded-full flex-shrink-0 mt-1.5`,style:re}),(0,x.jsxs)(`div`,{className:`flex gap-2 min-w-0 flex-1`,children:[e.lineNum&&(0,x.jsxs)(`span`,{className:`text-muted-foreground font-mono whitespace-nowrap`,children:[`Line `,e.lineNum,`:`]}),(0,x.jsx)(`span`,{className:`text-foreground font-mono break-words flex-1`,children:e.content||`\xA0`})]})]},n))})]},e))]})}catch{return null}},ae={backgroundColor:`var(--status-info)`,opacity:.6},oe=(e,t,n)=>{try{let i=e.trim().split(`
6
+ `).filter(Boolean);if(i.length===0)return null;let a={};i.forEach(e=>{let t=e.lastIndexOf(`/`),n=t>0?e.substring(0,t):`/`,r=t>=0?e.substring(t+1):e;a[n]||(a[n]=[]),a[n].push(r)});let s=Object.keys(a).sort();return(0,x.jsxs)(`div`,{className:o(`space-y-2 w-full min-w-0`,n?.unstyled?null:`p-3 bg-muted/20 rounded-xl border border-border/30`),style:r.tool.popup,children:[(0,x.jsxs)(`div`,{className:`typography-meta text-muted-foreground mb-2`,children:[`Found `,i.length,` file`,i.length===1?``:`s`]}),s.map(e=>(0,x.jsxs)(`div`,{className:`space-y-1`,children:[(0,x.jsxs)(`div`,{className:o(`font-medium text-muted-foreground`,t?`typography-micro`:`typography-code`),children:[e,`/`]}),(0,x.jsx)(`div`,{className:o(`pl-4 grid gap-1`,t?`grid-cols-1`:`grid-cols-2`),children:a[e].sort().map(e=>(0,x.jsxs)(`div`,{className:o(`flex items-center gap-2 min-w-0`,t?`typography-micro`:`typography-code`),children:[(0,x.jsx)(`div`,{className:`w-1.5 h-1.5 rounded-full flex-shrink-0`,style:ae}),(0,x.jsx)(`span`,{className:`text-foreground font-mono truncate`,children:e})]},e))})]},e))]})}catch{return null}},$=new Set([`in_progress`,`pending`,`completed`,`cancelled`]),se=(e,t,n)=>{try{let t=JSON.parse(e);if(!Array.isArray(t))return null;let r=t.filter(e=>!!e&&typeof e==`object`&&typeof e.content==`string`&&typeof e.status==`string`&&$.has(e.status));if(r.length===0)return null;let i=r.find(e=>e.status===`in_progress`)??null;return(0,x.jsx)(`ul`,{className:n?.listClassName??O,children:r.map((e,t)=>(0,x.jsx)(L,{todo:e,isActive:e===i},e.id??`todo-${t}`))})}catch{return null}},ce=(e,t)=>{try{return(0,x.jsx)(`div`,{className:o(`typography-code max-w-none w-full min-w-0`,t?.unstyled?null:`p-3 bg-muted/20 rounded-xl border border-border/20`),style:r.tool.popup,children:(0,x.jsx)(p,{content:e,variant:`tool`})})}catch{return null}},le=e=>{let t=e.split(`
7
+ `),n=``,r=[],i=0;for(;i<t.length;){let e=t[i];if(e.startsWith(`Index:`)||e.startsWith(`===`)||e.startsWith(`---`)||e.startsWith(`+++`)){e.startsWith(`Index:`)&&(n=e.split(` `)[1].split(`/`).pop()||`file`),i++;continue}if(e.startsWith(`@@`)){let a=e.match(/@@ -(\d+),\d+ \+(\d+),\d+ @@/),o=a?parseInt(a[1]):0,s=a?parseInt(a[2]):0,c=[],l=o,u=s,d=i+1;for(;d<t.length&&!t[d].startsWith(`@@`)&&!t[d].startsWith(`Index:`);){let e=t[d];e.startsWith(`+`)?(c.push({type:`added`,lineNumber:u,content:e.substring(1)}),u++):e.startsWith(`-`)?(c.push({type:`removed`,lineNumber:l,content:e.substring(1)}),l++):e.startsWith(` `)&&(c.push({type:`context`,lineNumber:u,content:e.substring(1)}),l++,u++),d++}r.push({file:n,oldStart:o,newStart:s,lines:c}),i=d;continue}i++}return r},ue=(e,t,n)=>m(t,e,n),de=e=>{let t=(0,b.c)(12),{mode:n,onModeChange:r,className:i}=e,a;t[0]!==n||t[1]!==r?(a=e=>{e.stopPropagation(),r(n===`side-by-side`?`unified`:`side-by-side`)},t[0]=n,t[1]=r,t[2]=a):a=t[2];let c=a,u;t[3]===i?u=t[4]:(u=o(`h-5 w-5 p-0 opacity-60 hover:opacity-100`,i),t[3]=i,t[4]=u);let d=n===`side-by-side`?`Switch to unified view`:`Switch to side-by-side view`,f;t[5]===n?f=t[6]:(f=n===`side-by-side`?(0,x.jsx)(l,{name:`align-justify`,className:`h-3 w-3`}):(0,x.jsx)(l,{name:`layout-column`,className:`h-3 w-3`}),t[5]=n,t[6]=f);let p;return t[7]!==c||t[8]!==u||t[9]!==d||t[10]!==f?(p=(0,x.jsx)(s,{size:`sm`,variant:`ghost`,className:u,onClick:c,title:d,children:f}),t[7]=c,t[8]=u,t[9]=d,t[10]=f,t[11]=p):p=t[11],p},fe=(e,t)=>{let n=(0,b.c)(4),[r,i]=y.useState(null),a,o;return n[0]!==e||n[1]!==t?(a=()=>{let n=!0,r=new AbortController;return i(null),_(e,(t||`text`).toLowerCase(),{signal:r.signal,priority:`visible`}).then(e=>{n&&i(e)}),()=>{n=!1,r.abort()}},o=[e,t],n[0]=e,n[1]=t,n[2]=a,n[3]=o):(a=n[2],o=n[3]),y.useEffect(a,o),r};export{C,ee as D,N as E,k as O,j as S,P as T,S as _,Q as a,T as b,te as c,ne as d,se as f,L as g,U as h,ue as i,A as k,oe as l,Z as m,de as n,J as o,ce as p,G as r,le as s,fe as t,ie as u,w as v,M as w,O as x,E as y};
@@ -6,4 +6,4 @@ import{r as e}from"./rolldown-runtime-hePW80VL.js";import{it as t,rt as n}from".
6
6
  ${v}px !important;
7
7
  ${y}px !important;
8
8
  }
9
- `),()=>{g.removeAttribute(`data-motion-pop-id`),S.contains(x)&&S.removeChild(x)}},[t]),(0,Q.jsx)(lu,{isPresent:t,getElement:f,sizeRef:l,pop:a,children:a===!1?e:$.cloneElement(e,{ref:d})})}var du=({children:e,initial:t,isPresent:n,onExitComplete:r,custom:i,presenceAffectsLayout:a,mode:o,anchorX:s,anchorY:c,root:l})=>{let u=nu(fu),d=(0,$.useId)(),f=(0,$.useRef)(),p=(0,$.useRef)(n),m=(0,$.useRef)(r);ru(()=>{p.current=n,m.current=r});let h=!0,g=(0,$.useMemo)(()=>(h=!1,{id:d,initial:t,isPresent:n,custom:i,onExitComplete:e=>{u.set(e,!0);for(let e of u.values())if(!e)return;r&&r()},register:(e,t)=>(u.set(e,!1),t&&t.parent?.presenceContext?.id!==d&&(f.current=t),()=>{u.delete(e),!p.current&&!u.size&&m.current?.()})}),[n,u,r]);return a&&h&&(g={...g}),(0,$.useMemo)(()=>{u.forEach((e,t)=>u.set(t,!1))},[n]),$.useEffect(()=>{!n&&!u.size&&r&&r()},[n]),e=(0,Q.jsx)(uu,{pop:o===`popLayout`,isPresent:n,anchorX:s,anchorY:c,root:l,popNode:f,children:e}),(0,Q.jsx)(iu.Provider,{value:g,children:e})};function fu(){return new Map}function pu(e=!0){let t=(0,$.useContext)(iu);if(t===null)return[!0,null];let{isPresent:n,onExitComplete:r,register:i}=t,a=(0,$.useId)();(0,$.useEffect)(()=>{if(e)return i(a)},[e]);let o=(0,$.useCallback)(()=>e&&r&&r(a),[a,r,e]);return!n&&r?[!1,o]:[!0]}var mu=e=>e.key||``;function hu(e){let t=[];return $.Children.forEach(e,e=>{(0,$.isValidElement)(e)&&t.push(e)}),t}var gu=({children:e,custom:t,initial:n=!0,onExitComplete:r,presenceAffectsLayout:i=!0,mode:a=`sync`,propagate:o=!1,anchorX:s=`left`,anchorY:c=`top`,root:l})=>{let[u,d]=pu(o),f=(0,$.useMemo)(()=>hu(e),[e]),p=o&&!u?[]:f.map(mu),m=(0,$.useRef)(!0),h=nu(()=>new Map),g=(0,$.useRef)(new Set),[_,v]=(0,$.useState)(f),[y,b]=(0,$.useState)(f);ru(()=>{o&&!u&&!y.length&&d?.()},[u,o,y.length,d]);let x=(0,$.useRef)();(0,$.useEffect)(()=>()=>{let e=x.current;x.current=void 0,e?.()},[y]),ru(()=>{m.current=!1;for(let e=0;e<y.length;e++){let t=mu(y[e]);p.includes(t)?(h.delete(t),g.current.delete(t)):h.get(t)!==!0&&h.set(t,!1)}},[y,p.length,p.join(`-`)]);let S=[];if(f!==_){let e=[...f],t=0;for(let n of y){let r=p.indexOf(mu(n));r===-1?(e.splice(t++,0,n),S.push(n)):t=r+S.length+1}return S.every(e=>h.get(mu(e)))?e=f:a===`wait`&&(e=S),b(hu(e)),v(f),null}let{forceRender:C}=(0,$.useContext)(tu);return(0,Q.jsx)(Q.Fragment,{children:y.map(e=>{let _=mu(e),b=o&&!u?!1:f===y||p.includes(_);return(0,Q.jsx)(du,{isPresent:b,initial:!m.current||n?void 0:!1,custom:t,presenceAffectsLayout:i,mode:a,root:l,onExitComplete:b?void 0:()=>{if(g.current.has(_))return;if(h.has(_))g.current.add(_),h.set(_,!0);else return;let e=!0;h.forEach(t=>{t||(e=!1)}),e&&(C?.(),v([]),o&&d?.(),x.current=r)},anchorX:s,anchorY:c,children:e},_)})})},_u=(0,$.createContext)({strict:!1}),vu={animation:[`animate`,`variants`,`whileHover`,`whileTap`,`exit`,`whileInView`,`whileFocus`,`whileDrag`],exit:[`exit`],drag:[`drag`,`dragControls`],focus:[`whileFocus`],hover:[`whileHover`,`onHoverStart`,`onHoverEnd`],tap:[`whileTap`,`onTap`,`onTapStart`,`onTapCancel`],pan:[`onPan`,`onPanStart`,`onPanSessionStart`,`onPanEnd`],inView:[`whileInView`,`onViewportEnter`,`onViewportLeave`],layout:[`layout`,`layoutId`]},yu=!1;function bu(){if(yu)return;let e={};for(let t in vu)e[t]={isEnabled:e=>vu[t].some(t=>!!e[t])};ec(e),yu=!0}function xu(){return bu(),tc()}function Su(e){let t=xu();for(let n in e)t[n]={...t[n],...e[n]};ec(t)}var Cu=(0,$.createContext)({});function wu(e,t){if(Gs(e)){let{initial:t,animate:n}=e;return{initial:t===!1||Hs(t)?t:void 0,animate:Hs(n)?n:void 0}}return e.inherit===!1?{}:t}function Tu(e){let{initial:t,animate:n}=wu(e,(0,$.useContext)(Cu));return(0,$.useMemo)(()=>({initial:t,animate:n}),[Eu(t),Eu(n)])}function Eu(e){return Array.isArray(e)?e.join(` `):e}var Du=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function Ou(e,t,n){for(let r in t)!W(t[r])&&!ac(r,n)&&(e[r]=t[r])}function ku({transformTemplate:e},t){return(0,$.useMemo)(()=>{let n=Du();return ha(n,t,e),Object.assign({},n.vars,n.style)},[t])}function Au(e,t){let n=e.style||{},r={};return Ou(r,n,e),Object.assign(r,ku(e,t)),r}function ju(e,t){let n={},r=Au(e,t);return e.drag&&e.dragListener!==!1&&(n.draggable=!1,r.userSelect=r.WebkitUserSelect=r.WebkitTouchCallout=`none`,r.touchAction=e.drag===!0?`none`:`pan-${e.drag===`x`?`y`:`x`}`),e.tabIndex===void 0&&(e.onTap||e.onTapStart||e.whileTap)&&(n.tabIndex=0),n.style=r,n}var Mu=()=>({...Du(),attrs:{}});function Nu(e,t,n,r){let i=(0,$.useMemo)(()=>{let n=Mu();return ba(n,t,xl(r),e.transformTemplate,e.style),{...n.attrs,style:{...n.style}}},[t]);if(e.style){let t={};Ou(t,e.style,e),i.style={...t,...i.style}}return i}var Pu=new Set(`animate.exit.variants.initial.style.values.transition.transformTemplate.custom.inherit.onBeforeLayoutMeasure.onAnimationStart.onAnimationComplete.onUpdate.onDragStart.onDrag.onDragEnd.onMeasureDragConstraints.onDirectionLock.onDragTransitionEnd._dragX._dragY.onHoverStart.onHoverEnd.onViewportEnter.onViewportLeave.globalTapTarget.propagate.ignoreStrict.viewport`.split(`.`));function Fu(e){return e.startsWith(`while`)||e.startsWith(`drag`)&&e!==`draggable`||e.startsWith(`layout`)||e.startsWith(`onTap`)||e.startsWith(`onPan`)||e.startsWith(`onLayout`)||Pu.has(e)}function Iu(e,t){return e.startsWith(`on`)?!Fu(e):t?.(e)??!Fu(e)}function Lu(e,t,n,r){let i={};for(let a in e)(a!==`values`||typeof e.values!=`object`)&&(W(e[a])||(Iu(a,r)||n===!0&&Fu(a)||!t&&!Fu(a)||e.draggable&&a.startsWith(`onDrag`))&&(i[a]=e[a]));return i}var Ru=[`animate`,`circle`,`defs`,`desc`,`ellipse`,`g`,`image`,`line`,`filter`,`marker`,`mask`,`metadata`,`path`,`pattern`,`polygon`,`polyline`,`rect`,`stop`,`switch`,`symbol`,`svg`,`text`,`tspan`,`use`,`view`];function zu(e){return typeof e!=`string`||e.includes(`-`)?!1:!!(Ru.indexOf(e)>-1||/[A-Z]/u.test(e))}function Bu(e,t,n,{latestValues:r},i,a=!1,o,s){let c=(o??zu(e)?Nu:ju)(t,r,i,e),l=Lu(t,typeof e==`string`,a,s),u=e===$.Fragment?{}:{...l,...c,ref:n},{children:d}=t,f=(0,$.useMemo)(()=>W(d)?d.get():d,[d]);return(0,$.createElement)(e,{...u,children:f})}function Vu({scrapeMotionValuesFromProps:e,createRenderState:t},n,r,i){return{latestValues:Hu(n,r,i,e),renderState:t()}}function Hu(e,t,n,r){let i={},a=r(e,{});for(let e in a)i[e]=io(a[e]);let{initial:o,animate:s}=e,c=Gs(e),l=Ks(e);t&&l&&!c&&e.inherit!==!1&&(o===void 0&&(o=t.initial),s===void 0&&(s=t.animate));let u=n?n.initial===!1:!1;u||=o===!1;let d=u?s:o;if(d&&typeof d!=`boolean`&&!Vs(d)){let t=Array.isArray(d)?d:[d];for(let n=0;n<t.length;n++){let r=_i(e,t[n]);if(r){let{transitionEnd:e,transition:t,...n}=r;for(let e in n){let t=n[e];if(Array.isArray(t)){let e=u?t.length-1:0;t=t[e]}t!==null&&(i[e]=t)}for(let t in e)i[t]=e[t]}}}return i}var Uu=e=>(t,n)=>{let r=(0,$.useContext)(Cu),i=(0,$.useContext)(iu),a=()=>Vu(e,t,r,i);return n?a():nu(a)},Wu=Uu({scrapeMotionValuesFromProps:oc,createRenderState:Du}),Gu=Uu({scrapeMotionValuesFromProps:Cl,createRenderState:Mu}),Ku=Symbol.for(`motionComponentSymbol`);function qu(e,t,n){let r=(0,$.useRef)(n);(0,$.useInsertionEffect)(()=>{r.current=n});let i=(0,$.useRef)(null);return(0,$.useCallback)(n=>{n&&e.onMount?.(n),t&&(n?t.mount(n):t.unmount());let a=r.current;if(typeof a==`function`)if(n){let e=a(n);typeof e==`function`&&(i.current=e)}else i.current?(i.current(),i.current=null):a(n);else a&&(a.current=n)},[t])}var Ju=(0,$.createContext)({});function Yu(e){return e&&typeof e==`object`&&Object.prototype.hasOwnProperty.call(e,`current`)}function Xu(e,t,n,r,i,a){let{visualElement:o}=(0,$.useContext)(Cu),s=(0,$.useContext)(_u),c=(0,$.useContext)(iu),l=(0,$.useContext)(au),u=l.reducedMotion,d=l.skipAnimations,f=(0,$.useRef)(null),p=(0,$.useRef)(!1);r||=s.renderer,!f.current&&r&&(f.current=r(e,{visualState:t,parent:o,props:n,presenceContext:c,blockInitialAnimation:c?c.initial===!1:!1,reducedMotionConfig:u,skipAnimations:d,isSVG:a}),p.current&&f.current&&(f.current.manuallyAnimateOnMount=!0));let m=f.current,h=(0,$.useContext)(Ju);m&&!m.projection&&i&&(m.type===`html`||m.type===`svg`)&&Zu(f.current,n,i,h),(0,$.useInsertionEffect)(()=>{m&&m.props!==n&&m.update(n,c)});let g=n[Oi],_=(0,$.useRef)(!!g&&typeof window<`u`&&!window.MotionHandoffIsComplete?.(g)&&window.MotionHasOptimisedAnimation?.(g));return ru(()=>{!p.current||!m||(m.animationState?.animateChanges(),m.enteringChildren=void 0)},[]),ru(()=>{p.current=!0,m&&(window.MotionIsMounted=!0,m.updateFeatures(),m.scheduleRenderMicrotask(),_.current&&m.animationState&&m.animationState.animateChanges())}),(0,$.useEffect)(()=>{m&&(!_.current&&m.animationState&&m.animationState.animateChanges(),_.current&&=(queueMicrotask(()=>{window.MotionHandoffMarkAsComplete?.(g)}),!1),m.enteringChildren=void 0)}),m}function Zu(e,t,n,r){let{layoutId:i,layout:a,drag:o,dragConstraints:s,layoutScroll:c,layoutRoot:l,layoutAnchor:u,layoutCrossfade:d}=t;e.projection=new n(e.latestValues,t[`data-framer-portal-id`]?void 0:Qu(e.parent)),e.projection.setOptions({layoutId:i,layout:a,alwaysMeasureLayout:!!o||s&&Yu(s),visualElement:e,animationType:typeof a==`string`?a:`both`,initialPromotionConfig:r,crossfade:d,layoutScroll:c,layoutRoot:l,layoutAnchor:u})}function Qu(e){if(e)return e.options.allowProjection===!1?Qu(e.parent):e.projection}function $u(e,{forwardMotionProps:t=!1,type:n}={},r,i){r&&Su(r);let a=n?n===`svg`:zu(e),o=a?Gu:Wu;function s(n,s){let c,l={...(0,$.useContext)(au),...n,layoutId:ed(n)},{isStatic:u,isValidProp:d}=l,f=Tu(n),p=o(n,u);if(!u&&typeof window<`u`){td(l,r);let t=nd(l);c=t.MeasureLayout,f.visualElement=Xu(e,p,l,i,t.ProjectionNode,a)}return(0,Q.jsxs)(Cu.Provider,{value:f,children:[c&&f.visualElement?(0,Q.jsx)(c,{visualElement:f.visualElement,...l}):null,Bu(e,n,qu(p,f.visualElement,s),p,u,t,a,d)]})}s.displayName=`motion.${typeof e==`string`?e:`create(${e.displayName??e.name??``})`}`;let c=(0,$.forwardRef)(s);return c[Ku]=e,c}function ed({layoutId:e}){let t=(0,$.useContext)(tu).id;return t&&e!==void 0?t+`-`+e:e}function td(e,t){(0,$.useContext)(_u).strict}function nd(e){let{drag:t,layout:n}=xu();if(!t&&!n)return{};let r={...t,...n};return{MeasureLayout:t?.isEnabled(e)||n?.isEnabled(e)?r.MeasureLayout:void 0,ProjectionNode:r.ProjectionNode}}function rd(e,t){if(typeof Proxy>`u`)return $u;let n=new Map,r=(n,r)=>$u(n,r,e,t);return new Proxy((e,t)=>r(e,t),{get:(i,a)=>a===`create`?r:(n.has(a)||n.set(a,$u(a,void 0,e,t)),n.get(a))})}var id=(e,t)=>t.isSVG??zu(e)?new wl(t):new cc(t,{allowProjection:e!==$.Fragment}),ad=class extends Z{constructor(e){super(e),e.animationState||=Dl(e)}updateAnimationControlsSubscription(){let{animate:e}=this.node.getProps();Vs(e)&&(this.unmountControls=e.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){let{animate:e}=this.node.getProps(),{animate:t}=this.node.prevProps||{};e!==t&&this.updateAnimationControlsSubscription()}unmount(){this.node.animationState.reset(),this.unmountControls?.()}},od=0,sd={animation:{Feature:ad},exit:{Feature:class extends Z{constructor(){super(...arguments),this.id=od++}update(){let{presenceContext:e,prevPresenceContext:t,animationState:n}=this.node;if(!e||!n)return;let{isPresent:r,onExitComplete:i}=e,a=t?.isPresent;if(r===a)return;if(r&&a===!1){if(this.exit===!0){let{initial:e}=this.node.getProps();if(e&&!Array.isArray(e)){let{transition:t,transitionEnd:n,...r}=vi(this.node,e)||{};for(let e in r)this.node.getValue(e)?.jump(r[e])}this.node.blockInitialAnimation=!1,n.reset(),n.animateChanges()}else n.setActive(`exit`,!1);this.exit=void 0;return}let o=this.exit=n.setActive(`exit`,!r);i&&!r&&o.then(()=>{this.exit===o&&(this.exit=!0,i(this.id))})}mount(){let{register:e,onExitComplete:t}=this.node.presenceContext||{};t&&t(this.id),e&&(this.unmount=e(this.id,this.node))}unmount(){}}}},cd=class extends Z{constructor(e){super(e),this.removeGroupControls=d,this.removeListeners=d,this.controls=new tl(e)}mount(){let{dragControls:e}=this.node.getProps();e&&(this.removeGroupControls=e.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||d}update(){let{dragControls:e}=this.node.getProps(),{dragControls:t}=this.node.prevProps||{};e!==t&&(this.removeGroupControls(),e&&(this.removeGroupControls=e.subscribe(this.controls)))}unmount(){this.removeGroupControls(),this.removeListeners(),this.controls.isDragging||this.controls.endPanSession()}},ld=({current:e})=>e?e.ownerDocument.defaultView:null,ud=e=>(t,n)=>{e&&F.update(()=>e(t,n),!1,!0)},dd=class extends Z{constructor(){super(...arguments),this.removePointerDownListener=d}onPointerDown(e){this.session=new Ac(e,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:ld(this.node)})}createPanHandlers(){let{onPanSessionStart:e,onPanStart:t,onPan:n,onPanEnd:r}=this.node.getProps();return{onSessionStart:ud(e),onStart:ud(t),onMove:ud(n),onEnd:(e,t)=>{delete this.session,r&&F.postRender(()=>r(e,t))}}}mount(){this.removePointerDownListener=fc(this.node.current,`pointerdown`,e=>this.onPointerDown(e))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}},fd=!1,pd=({layout:e,layoutDependency:t})=>({layout:e,layoutDependency:t,animationType:typeof e==`string`?e:`both`}),md=class extends $.Component{componentDidMount(){let{visualElement:e,layoutGroup:t,switchLayoutGroup:n,layoutId:r}=this.props,{projection:i}=e;i&&(t.group&&t.group.add(i),n&&n.register&&r&&n.register(i),fd&&i.root.didUpdate(),i.addEventListener(`animationComplete`,()=>{this.safeToRemove()}),i.setOptions({...i.options,...pd(this.props),onExitComplete:()=>this.safeToRemove()})),es.hasEverUpdated=!0}getSnapshotBeforeUpdate(e){let{layout:t,layoutDependency:n,visualElement:r,drag:i,isPresent:a}=this.props,{projection:o}=r;return o?(o.isPresent=a,(e.layoutDependency!==n||e.layout!==t)&&o.setOptions({...o.options,...pd(this.props)}),fd=!0,i||e.layoutDependency!==n||n===void 0||e.isPresent!==a?o.willUpdate():this.safeToRemove(),e.isPresent!==a&&(a?o.promote():o.relegate()||F.postRender(()=>{let e=o.getStack();(!e||!e.members.length)&&this.safeToRemove()})),null):null}componentDidUpdate(){let{visualElement:e,layoutAnchor:t}=this.props,{projection:n}=e;n&&(n.options.layoutAnchor=t,n.root.didUpdate(),Za.postRender(()=>{!n.currentAnimation&&n.isLead()&&this.safeToRemove()}))}componentWillUnmount(){let{visualElement:e,layoutGroup:t,switchLayoutGroup:n}=this.props,{projection:r}=e;fd=!0,r&&(r.scheduleCheckAfterUnmount(),t&&t.group&&t.group.remove(r),n&&n.deregister&&n.deregister(r))}safeToRemove(){let{safeToRemove:e}=this.props;e&&e()}render(){return null}};function hd(e){let[t,n]=pu(),r=(0,$.useContext)(tu);return(0,Q.jsx)(md,{...e,layoutGroup:r,switchLayoutGroup:(0,$.useContext)(Ju),isPresent:t,safeToRemove:n})}var gd={pan:{Feature:dd},drag:{Feature:cd,ProjectionNode:zs,MeasureLayout:hd}};function _d(e,t,n){let{props:r}=e;e.animationState&&r.whileHover&&e.animationState.setActive(`whileHover`,n===`Start`);let i=r[`onHover`+n];i&&F.postRender(()=>i(t,uc(t)))}var vd=class extends Z{mount(){let{current:e}=this.node;e&&(this.unmount=ul(e,(e,t)=>(_d(this.node,t,`Start`),e=>_d(this.node,e,`End`))))}unmount(){}},yd=class extends Z{constructor(){super(...arguments),this.isActive=!1}onFocus(){let e=!1;try{e=this.node.current.matches(`:focus-visible`)}catch{e=!0}!e||!this.node.animationState||(this.node.animationState.setActive(`whileFocus`,!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive(`whileFocus`,!1),this.isActive=!1)}mount(){this.unmount=f(Is(this.node.current,`focus`,()=>this.onFocus()),Is(this.node.current,`blur`,()=>this.onBlur()))}unmount(){}};function bd(e,t,n){let{props:r}=e;if(e.current instanceof HTMLButtonElement&&e.current.disabled)return;e.animationState&&r.whileTap&&e.animationState.setActive(`whileTap`,n===`Start`);let i=r[`onTap`+(n===`End`?``:n)];i&&F.postRender(()=>i(t,uc(t)))}var xd=class extends Z{mount(){let{current:e}=this.node;if(!e)return;let{globalTapTarget:t,propagate:n}=this.node.props;this.unmount=vl(e,(e,t)=>(bd(this.node,t,`Start`),(e,{success:t})=>bd(this.node,e,t?`End`:`Cancel`)),{useGlobalTarget:t,stopPropagation:n?.tap===!1})}unmount(){}},Sd=new WeakMap,Cd=new WeakMap,wd=e=>{let t=Sd.get(e.target);t&&t(e)},Td=e=>{e.forEach(wd)};function Ed({root:e,...t}){let n=e||document;Cd.has(n)||Cd.set(n,{});let r=Cd.get(n),i=JSON.stringify(t);return r[i]||(r[i]=new IntersectionObserver(Td,{root:e,...t})),r[i]}function Dd(e,t,n){let r=Ed(t);return Sd.set(e,n),r.observe(e),()=>{Sd.delete(e),r.unobserve(e)}}var Od={some:0,all:1},kd=class extends Z{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.stopObserver?.();let{viewport:e={}}=this.node.getProps(),{root:t,margin:n,amount:r=`some`,once:i}=e,a={root:t?t.current:void 0,rootMargin:n,threshold:typeof r==`number`?r:Od[r]},o=e=>{let{isIntersecting:t}=e;if(this.isInView===t||(this.isInView=t,i&&!t&&this.hasEnteredView))return;t&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive(`whileInView`,t);let{onViewportEnter:n,onViewportLeave:r}=this.node.getProps(),a=t?n:r;a&&a(e)};this.stopObserver=Dd(this.node.current,a,o)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>`u`)return;let{props:e,prevProps:t}=this.node;[`amount`,`margin`,`root`].some(Ad(e,t))&&this.startObserver()}unmount(){this.stopObserver?.(),this.hasEnteredView=!1,this.isInView=!1}};function Ad({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}var jd={inView:{Feature:kd},tap:{Feature:xd},focus:{Feature:yd},hover:{Feature:vd}},Md={layout:{ProjectionNode:zs,MeasureLayout:hd}},Nd=rd({...sd,...jd,...gd,...Md},id);function Pd(e){let t=nu(()=>U(e)),{isStatic:n}=(0,$.useContext)(au);if(n){let[,n]=(0,$.useState)(e);(0,$.useEffect)(()=>t.on(`change`,n),[])}return t}function Fd(){!Ys.current&&Zs();let[e]=(0,$.useState)(Js.current);return e}export{eu as a,I as c,gu as i,F as l,Pd as n,Ql as o,Nd as r,Ht as s,Fd as t,b as u};
9
+ `),()=>{g.removeAttribute(`data-motion-pop-id`),S.contains(x)&&S.removeChild(x)}},[t]),(0,Q.jsx)(lu,{isPresent:t,getElement:f,sizeRef:l,pop:a,children:a===!1?e:$.cloneElement(e,{ref:d})})}var du=({children:e,initial:t,isPresent:n,onExitComplete:r,custom:i,presenceAffectsLayout:a,mode:o,anchorX:s,anchorY:c,root:l})=>{let u=nu(fu),d=(0,$.useId)(),f=(0,$.useRef)(),p=(0,$.useRef)(n),m=(0,$.useRef)(r);ru(()=>{p.current=n,m.current=r});let h=!0,g=(0,$.useMemo)(()=>(h=!1,{id:d,initial:t,isPresent:n,custom:i,onExitComplete:e=>{u.set(e,!0);for(let e of u.values())if(!e)return;r&&r()},register:(e,t)=>(u.set(e,!1),t&&t.parent?.presenceContext?.id!==d&&(f.current=t),()=>{u.delete(e),!p.current&&!u.size&&m.current?.()})}),[n,u,r]);return a&&h&&(g={...g}),(0,$.useMemo)(()=>{u.forEach((e,t)=>u.set(t,!1))},[n]),$.useEffect(()=>{!n&&!u.size&&r&&r()},[n]),e=(0,Q.jsx)(uu,{pop:o===`popLayout`,isPresent:n,anchorX:s,anchorY:c,root:l,popNode:f,children:e}),(0,Q.jsx)(iu.Provider,{value:g,children:e})};function fu(){return new Map}function pu(e=!0){let t=(0,$.useContext)(iu);if(t===null)return[!0,null];let{isPresent:n,onExitComplete:r,register:i}=t,a=(0,$.useId)();(0,$.useEffect)(()=>{if(e)return i(a)},[e]);let o=(0,$.useCallback)(()=>e&&r&&r(a),[a,r,e]);return!n&&r?[!1,o]:[!0]}var mu=e=>e.key||``;function hu(e){let t=[];return $.Children.forEach(e,e=>{(0,$.isValidElement)(e)&&t.push(e)}),t}var gu=({children:e,custom:t,initial:n=!0,onExitComplete:r,presenceAffectsLayout:i=!0,mode:a=`sync`,propagate:o=!1,anchorX:s=`left`,anchorY:c=`top`,root:l})=>{let[u,d]=pu(o),f=(0,$.useMemo)(()=>hu(e),[e]),p=o&&!u?[]:f.map(mu),m=(0,$.useRef)(!0),h=nu(()=>new Map),g=(0,$.useRef)(new Set),[_,v]=(0,$.useState)(f),[y,b]=(0,$.useState)(f);ru(()=>{o&&!u&&!y.length&&d?.()},[u,o,y.length,d]);let x=(0,$.useRef)();(0,$.useEffect)(()=>()=>{let e=x.current;x.current=void 0,e?.()},[y]),ru(()=>{m.current=!1;for(let e=0;e<y.length;e++){let t=mu(y[e]);p.includes(t)?(h.delete(t),g.current.delete(t)):h.get(t)!==!0&&h.set(t,!1)}},[y,p.length,p.join(`-`)]);let S=[];if(f!==_){let e=[...f],t=0;for(let n of y){let r=p.indexOf(mu(n));r===-1?(e.splice(t++,0,n),S.push(n)):t=r+S.length+1}return S.every(e=>h.get(mu(e)))?e=f:a===`wait`&&(e=S),b(hu(e)),v(f),null}let{forceRender:C}=(0,$.useContext)(tu);return(0,Q.jsx)(Q.Fragment,{children:y.map(e=>{let _=mu(e),b=o&&!u?!1:f===y||p.includes(_);return(0,Q.jsx)(du,{isPresent:b,initial:!m.current||n?void 0:!1,custom:t,presenceAffectsLayout:i,mode:a,root:l,onExitComplete:b?void 0:()=>{if(g.current.has(_))return;if(h.has(_))g.current.add(_),h.set(_,!0);else return;let e=!0;h.forEach(t=>{t||(e=!1)}),e&&(C?.(),v([]),o&&d?.(),x.current=r)},anchorX:s,anchorY:c,children:e},_)})})},_u=(0,$.createContext)({strict:!1}),vu={animation:[`animate`,`variants`,`whileHover`,`whileTap`,`exit`,`whileInView`,`whileFocus`,`whileDrag`],exit:[`exit`],drag:[`drag`,`dragControls`],focus:[`whileFocus`],hover:[`whileHover`,`onHoverStart`,`onHoverEnd`],tap:[`whileTap`,`onTap`,`onTapStart`,`onTapCancel`],pan:[`onPan`,`onPanStart`,`onPanSessionStart`,`onPanEnd`],inView:[`whileInView`,`onViewportEnter`,`onViewportLeave`],layout:[`layout`,`layoutId`]},yu=!1;function bu(){if(yu)return;let e={};for(let t in vu)e[t]={isEnabled:e=>vu[t].some(t=>!!e[t])};ec(e),yu=!0}function xu(){return bu(),tc()}function Su(e){let t=xu();for(let n in e)t[n]={...t[n],...e[n]};ec(t)}var Cu=(0,$.createContext)({});function wu(e,t){if(Gs(e)){let{initial:t,animate:n}=e;return{initial:t===!1||Hs(t)?t:void 0,animate:Hs(n)?n:void 0}}return e.inherit===!1?{}:t}function Tu(e){let{initial:t,animate:n}=wu(e,(0,$.useContext)(Cu));return(0,$.useMemo)(()=>({initial:t,animate:n}),[Eu(t),Eu(n)])}function Eu(e){return Array.isArray(e)?e.join(` `):e}var Du=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function Ou(e,t,n){for(let r in t)!W(t[r])&&!ac(r,n)&&(e[r]=t[r])}function ku({transformTemplate:e},t){return(0,$.useMemo)(()=>{let n=Du();return ha(n,t,e),Object.assign({},n.vars,n.style)},[t])}function Au(e,t){let n=e.style||{},r={};return Ou(r,n,e),Object.assign(r,ku(e,t)),r}function ju(e,t){let n={},r=Au(e,t);return e.drag&&e.dragListener!==!1&&(n.draggable=!1,r.userSelect=r.WebkitUserSelect=r.WebkitTouchCallout=`none`,r.touchAction=e.drag===!0?`none`:`pan-${e.drag===`x`?`y`:`x`}`),e.tabIndex===void 0&&(e.onTap||e.onTapStart||e.whileTap)&&(n.tabIndex=0),n.style=r,n}var Mu=()=>({...Du(),attrs:{}});function Nu(e,t,n,r){let i=(0,$.useMemo)(()=>{let n=Mu();return ba(n,t,xl(r),e.transformTemplate,e.style),{...n.attrs,style:{...n.style}}},[t]);if(e.style){let t={};Ou(t,e.style,e),i.style={...t,...i.style}}return i}var Pu=new Set(`animate.exit.variants.initial.style.values.transition.transformTemplate.custom.inherit.onBeforeLayoutMeasure.onAnimationStart.onAnimationComplete.onUpdate.onDragStart.onDrag.onDragEnd.onMeasureDragConstraints.onDirectionLock.onDragTransitionEnd._dragX._dragY.onHoverStart.onHoverEnd.onViewportEnter.onViewportLeave.globalTapTarget.propagate.ignoreStrict.viewport`.split(`.`));function Fu(e){return e.startsWith(`while`)||e.startsWith(`drag`)&&e!==`draggable`||e.startsWith(`layout`)||e.startsWith(`onTap`)||e.startsWith(`onPan`)||e.startsWith(`onLayout`)||Pu.has(e)}function Iu(e,t){return e.startsWith(`on`)?!Fu(e):t?.(e)??!Fu(e)}function Lu(e,t,n,r){let i={};for(let a in e)(a!==`values`||typeof e.values!=`object`)&&(W(e[a])||(Iu(a,r)||n===!0&&Fu(a)||!t&&!Fu(a)||e.draggable&&a.startsWith(`onDrag`))&&(i[a]=e[a]));return i}var Ru=[`animate`,`circle`,`defs`,`desc`,`ellipse`,`g`,`image`,`line`,`filter`,`marker`,`mask`,`metadata`,`path`,`pattern`,`polygon`,`polyline`,`rect`,`stop`,`switch`,`symbol`,`svg`,`text`,`tspan`,`use`,`view`];function zu(e){return typeof e!=`string`||e.includes(`-`)?!1:!!(Ru.indexOf(e)>-1||/[A-Z]/u.test(e))}function Bu(e,t,n,{latestValues:r},i,a=!1,o,s){let c=(o??zu(e)?Nu:ju)(t,r,i,e),l=Lu(t,typeof e==`string`,a,s),u=e===$.Fragment?{}:{...l,...c,ref:n},{children:d}=t,f=(0,$.useMemo)(()=>W(d)?d.get():d,[d]);return(0,$.createElement)(e,{...u,children:f})}function Vu({scrapeMotionValuesFromProps:e,createRenderState:t},n,r,i){return{latestValues:Hu(n,r,i,e),renderState:t()}}function Hu(e,t,n,r){let i={},a=r(e,{});for(let e in a)i[e]=io(a[e]);let{initial:o,animate:s}=e,c=Gs(e),l=Ks(e);t&&l&&!c&&e.inherit!==!1&&(o===void 0&&(o=t.initial),s===void 0&&(s=t.animate));let u=n?n.initial===!1:!1;u||=o===!1;let d=u?s:o;if(d&&typeof d!=`boolean`&&!Vs(d)){let t=Array.isArray(d)?d:[d];for(let n=0;n<t.length;n++){let r=_i(e,t[n]);if(r){let{transitionEnd:e,transition:t,...n}=r;for(let e in n){let t=n[e];if(Array.isArray(t)){let e=u?t.length-1:0;t=t[e]}t!==null&&(i[e]=t)}for(let t in e)i[t]=e[t]}}}return i}var Uu=e=>(t,n)=>{let r=(0,$.useContext)(Cu),i=(0,$.useContext)(iu),a=()=>Vu(e,t,r,i);return n?a():nu(a)},Wu=Uu({scrapeMotionValuesFromProps:oc,createRenderState:Du}),Gu=Uu({scrapeMotionValuesFromProps:Cl,createRenderState:Mu}),Ku=Symbol.for(`motionComponentSymbol`);function qu(e,t,n){let r=(0,$.useRef)(n);(0,$.useInsertionEffect)(()=>{r.current=n});let i=(0,$.useRef)(null);return(0,$.useCallback)(n=>{n&&e.onMount?.(n),t&&(n?t.mount(n):t.unmount());let a=r.current;if(typeof a==`function`)if(n){let e=a(n);typeof e==`function`&&(i.current=e)}else i.current?(i.current(),i.current=null):a(n);else a&&(a.current=n)},[t])}var Ju=(0,$.createContext)({});function Yu(e){return e&&typeof e==`object`&&Object.prototype.hasOwnProperty.call(e,`current`)}function Xu(e,t,n,r,i,a){let{visualElement:o}=(0,$.useContext)(Cu),s=(0,$.useContext)(_u),c=(0,$.useContext)(iu),l=(0,$.useContext)(au),u=l.reducedMotion,d=l.skipAnimations,f=(0,$.useRef)(null),p=(0,$.useRef)(!1);r||=s.renderer,!f.current&&r&&(f.current=r(e,{visualState:t,parent:o,props:n,presenceContext:c,blockInitialAnimation:c?c.initial===!1:!1,reducedMotionConfig:u,skipAnimations:d,isSVG:a}),p.current&&f.current&&(f.current.manuallyAnimateOnMount=!0));let m=f.current,h=(0,$.useContext)(Ju);m&&!m.projection&&i&&(m.type===`html`||m.type===`svg`)&&Zu(f.current,n,i,h),(0,$.useInsertionEffect)(()=>{m&&m.props!==n&&m.update(n,c)});let g=n[Oi],_=(0,$.useRef)(!!g&&typeof window<`u`&&!window.MotionHandoffIsComplete?.(g)&&window.MotionHasOptimisedAnimation?.(g));return ru(()=>{!p.current||!m||(m.animationState?.animateChanges(),m.enteringChildren=void 0)},[]),ru(()=>{p.current=!0,m&&(window.MotionIsMounted=!0,m.updateFeatures(),m.scheduleRenderMicrotask(),_.current&&m.animationState&&m.animationState.animateChanges())}),(0,$.useEffect)(()=>{m&&(!_.current&&m.animationState&&m.animationState.animateChanges(),_.current&&=(queueMicrotask(()=>{window.MotionHandoffMarkAsComplete?.(g)}),!1),m.enteringChildren=void 0)}),m}function Zu(e,t,n,r){let{layoutId:i,layout:a,drag:o,dragConstraints:s,layoutScroll:c,layoutRoot:l,layoutAnchor:u,layoutCrossfade:d}=t;e.projection=new n(e.latestValues,t[`data-framer-portal-id`]?void 0:Qu(e.parent)),e.projection.setOptions({layoutId:i,layout:a,alwaysMeasureLayout:!!o||s&&Yu(s),visualElement:e,animationType:typeof a==`string`?a:`both`,initialPromotionConfig:r,crossfade:d,layoutScroll:c,layoutRoot:l,layoutAnchor:u})}function Qu(e){if(e)return e.options.allowProjection===!1?Qu(e.parent):e.projection}function $u(e,{forwardMotionProps:t=!1,type:n}={},r,i){r&&Su(r);let a=n?n===`svg`:zu(e),o=a?Gu:Wu;function s(n,s){let c,l={...(0,$.useContext)(au),...n,layoutId:ed(n)},{isStatic:u,isValidProp:d}=l,f=Tu(n),p=o(n,u);if(!u&&typeof window<`u`){td(l,r);let t=nd(l);c=t.MeasureLayout,f.visualElement=Xu(e,p,l,i,t.ProjectionNode,a)}return(0,Q.jsxs)(Cu.Provider,{value:f,children:[c&&f.visualElement?(0,Q.jsx)(c,{visualElement:f.visualElement,...l}):null,Bu(e,n,qu(p,f.visualElement,s),p,u,t,a,d)]})}s.displayName=`motion.${typeof e==`string`?e:`create(${e.displayName??e.name??``})`}`;let c=(0,$.forwardRef)(s);return c[Ku]=e,c}function ed({layoutId:e}){let t=(0,$.useContext)(tu).id;return t&&e!==void 0?t+`-`+e:e}function td(e,t){(0,$.useContext)(_u).strict}function nd(e){let{drag:t,layout:n}=xu();if(!t&&!n)return{};let r={...t,...n};return{MeasureLayout:t?.isEnabled(e)||n?.isEnabled(e)?r.MeasureLayout:void 0,ProjectionNode:r.ProjectionNode}}function rd(e,t){if(typeof Proxy>`u`)return $u;let n=new Map,r=(n,r)=>$u(n,r,e,t);return new Proxy((e,t)=>r(e,t),{get:(i,a)=>a===`create`?r:(n.has(a)||n.set(a,$u(a,void 0,e,t)),n.get(a))})}var id=(e,t)=>t.isSVG??zu(e)?new wl(t):new cc(t,{allowProjection:e!==$.Fragment}),ad=class extends Z{constructor(e){super(e),e.animationState||=Dl(e)}updateAnimationControlsSubscription(){let{animate:e}=this.node.getProps();Vs(e)&&(this.unmountControls=e.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){let{animate:e}=this.node.getProps(),{animate:t}=this.node.prevProps||{};e!==t&&this.updateAnimationControlsSubscription()}unmount(){this.node.animationState.reset(),this.unmountControls?.()}},od=0,sd={animation:{Feature:ad},exit:{Feature:class extends Z{constructor(){super(...arguments),this.id=od++}update(){let{presenceContext:e,prevPresenceContext:t,animationState:n}=this.node;if(!e||!n)return;let{isPresent:r,onExitComplete:i}=e,a=t?.isPresent;if(r===a)return;if(r&&a===!1){if(this.exit===!0){let{initial:e}=this.node.getProps();if(e&&!Array.isArray(e)){let{transition:t,transitionEnd:n,...r}=vi(this.node,e)||{};for(let e in r)this.node.getValue(e)?.jump(r[e])}this.node.blockInitialAnimation=!1,n.reset(),n.animateChanges()}else n.setActive(`exit`,!1);this.exit=void 0;return}let o=this.exit=n.setActive(`exit`,!r);i&&!r&&o.then(()=>{this.exit===o&&(this.exit=!0,i(this.id))})}mount(){let{register:e,onExitComplete:t}=this.node.presenceContext||{};t&&t(this.id),e&&(this.unmount=e(this.id,this.node))}unmount(){}}}},cd=class extends Z{constructor(e){super(e),this.removeGroupControls=d,this.removeListeners=d,this.controls=new tl(e)}mount(){let{dragControls:e}=this.node.getProps();e&&(this.removeGroupControls=e.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||d}update(){let{dragControls:e}=this.node.getProps(),{dragControls:t}=this.node.prevProps||{};e!==t&&(this.removeGroupControls(),e&&(this.removeGroupControls=e.subscribe(this.controls)))}unmount(){this.removeGroupControls(),this.removeListeners(),this.controls.isDragging||this.controls.endPanSession()}},ld=({current:e})=>e?e.ownerDocument.defaultView:null,ud=e=>(t,n)=>{e&&F.update(()=>e(t,n),!1,!0)},dd=class extends Z{constructor(){super(...arguments),this.removePointerDownListener=d}onPointerDown(e){this.session=new Ac(e,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:ld(this.node)})}createPanHandlers(){let{onPanSessionStart:e,onPanStart:t,onPan:n,onPanEnd:r}=this.node.getProps();return{onSessionStart:ud(e),onStart:ud(t),onMove:ud(n),onEnd:(e,t)=>{delete this.session,r&&F.postRender(()=>r(e,t))}}}mount(){this.removePointerDownListener=fc(this.node.current,`pointerdown`,e=>this.onPointerDown(e))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}},fd=!1,pd=({layout:e,layoutDependency:t})=>({layout:e,layoutDependency:t,animationType:typeof e==`string`?e:`both`}),md=class extends $.Component{componentDidMount(){let{visualElement:e,layoutGroup:t,switchLayoutGroup:n,layoutId:r}=this.props,{projection:i}=e;i&&(t.group&&t.group.add(i),n&&n.register&&r&&n.register(i),fd&&i.root.didUpdate(),i.addEventListener(`animationComplete`,()=>{this.safeToRemove()}),i.setOptions({...i.options,...pd(this.props),onExitComplete:()=>this.safeToRemove()})),es.hasEverUpdated=!0}getSnapshotBeforeUpdate(e){let{layout:t,layoutDependency:n,visualElement:r,drag:i,isPresent:a}=this.props,{projection:o}=r;return o?(o.isPresent=a,(e.layoutDependency!==n||e.layout!==t)&&o.setOptions({...o.options,...pd(this.props)}),fd=!0,i||e.layoutDependency!==n||n===void 0||e.isPresent!==a?o.willUpdate():this.safeToRemove(),e.isPresent!==a&&(a?o.promote():o.relegate()||F.postRender(()=>{let e=o.getStack();(!e||!e.members.length)&&this.safeToRemove()})),null):null}componentDidUpdate(){let{visualElement:e,layoutAnchor:t}=this.props,{projection:n}=e;n&&(n.options.layoutAnchor=t,n.root.didUpdate(),Za.postRender(()=>{!n.currentAnimation&&n.isLead()&&this.safeToRemove()}))}componentWillUnmount(){let{visualElement:e,layoutGroup:t,switchLayoutGroup:n}=this.props,{projection:r}=e;fd=!0,r&&(r.scheduleCheckAfterUnmount(),t&&t.group&&t.group.remove(r),n&&n.deregister&&n.deregister(r))}safeToRemove(){let{safeToRemove:e}=this.props;e&&e()}render(){return null}};function hd(e){let[t,n]=pu(),r=(0,$.useContext)(tu);return(0,Q.jsx)(md,{...e,layoutGroup:r,switchLayoutGroup:(0,$.useContext)(Ju),isPresent:t,safeToRemove:n})}var gd={pan:{Feature:dd},drag:{Feature:cd,ProjectionNode:zs,MeasureLayout:hd}};function _d(e,t,n){let{props:r}=e;e.animationState&&r.whileHover&&e.animationState.setActive(`whileHover`,n===`Start`);let i=r[`onHover`+n];i&&F.postRender(()=>i(t,uc(t)))}var vd=class extends Z{mount(){let{current:e}=this.node;e&&(this.unmount=ul(e,(e,t)=>(_d(this.node,t,`Start`),e=>_d(this.node,e,`End`))))}unmount(){}},yd=class extends Z{constructor(){super(...arguments),this.isActive=!1}onFocus(){let e=!1;try{e=this.node.current.matches(`:focus-visible`)}catch{e=!0}!e||!this.node.animationState||(this.node.animationState.setActive(`whileFocus`,!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive(`whileFocus`,!1),this.isActive=!1)}mount(){this.unmount=f(Is(this.node.current,`focus`,()=>this.onFocus()),Is(this.node.current,`blur`,()=>this.onBlur()))}unmount(){}};function bd(e,t,n){let{props:r}=e;if(e.current instanceof HTMLButtonElement&&e.current.disabled)return;e.animationState&&r.whileTap&&e.animationState.setActive(`whileTap`,n===`Start`);let i=r[`onTap`+(n===`End`?``:n)];i&&F.postRender(()=>i(t,uc(t)))}var xd=class extends Z{mount(){let{current:e}=this.node;if(!e)return;let{globalTapTarget:t,propagate:n}=this.node.props;this.unmount=vl(e,(e,t)=>(bd(this.node,t,`Start`),(e,{success:t})=>bd(this.node,e,t?`End`:`Cancel`)),{useGlobalTarget:t,stopPropagation:n?.tap===!1})}unmount(){}},Sd=new WeakMap,Cd=new WeakMap,wd=e=>{let t=Sd.get(e.target);t&&t(e)},Td=e=>{e.forEach(wd)};function Ed({root:e,...t}){let n=e||document;Cd.has(n)||Cd.set(n,{});let r=Cd.get(n),i=JSON.stringify(t);return r[i]||(r[i]=new IntersectionObserver(Td,{root:e,...t})),r[i]}function Dd(e,t,n){let r=Ed(t);return Sd.set(e,n),r.observe(e),()=>{Sd.delete(e),r.unobserve(e)}}var Od={some:0,all:1},kd=class extends Z{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.stopObserver?.();let{viewport:e={}}=this.node.getProps(),{root:t,margin:n,amount:r=`some`,once:i}=e,a={root:t?t.current:void 0,rootMargin:n,threshold:typeof r==`number`?r:Od[r]},o=e=>{let{isIntersecting:t}=e;if(this.isInView===t||(this.isInView=t,i&&!t&&this.hasEnteredView))return;t&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive(`whileInView`,t);let{onViewportEnter:n,onViewportLeave:r}=this.node.getProps(),a=t?n:r;a&&a(e)};this.stopObserver=Dd(this.node.current,a,o)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>`u`)return;let{props:e,prevProps:t}=this.node;[`amount`,`margin`,`root`].some(Ad(e,t))&&this.startObserver()}unmount(){this.stopObserver?.(),this.hasEnteredView=!1,this.isInView=!1}};function Ad({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}var jd={inView:{Feature:kd},tap:{Feature:xd},focus:{Feature:yd},hover:{Feature:vd}},Md={layout:{ProjectionNode:zs,MeasureLayout:hd}},Nd=rd({...sd,...jd,...gd,...Md},id);function Pd(e){let t=nu(()=>U(e)),{isStatic:n}=(0,$.useContext)(au);if(n){let[,n]=(0,$.useState)(e);(0,$.useEffect)(()=>t.on(`change`,n),[])}return t}function Fd(){!Ys.current&&Zs();let[e]=(0,$.useState)(Js.current);return e}export{eu as a,Ht as c,b as d,gu as i,I as l,Pd as n,Ql as o,Nd as r,U as s,Fd as t,F as u};
@@ -0,0 +1 @@
1
+ import{r as e}from"./vendor-framer-motion-BQ3-sJMO.js";var t=e;export{t};