fumapress 0.1.21 → 0.1.23
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/lib/cli/index.mjs +1 -1
- package/dist/waku/public/assets/Icon-DLjCXBap.js +1 -0
- package/dist/waku/public/assets/{Icon-D30p-2dq.js → Icon-uimJ5tpe.js} +1 -1
- package/dist/waku/public/assets/_root-BWpoCRFY.css +1 -0
- package/dist/waku/public/assets/{_root-BWh8XBln.js → _root-DcSLRIv8.js} +2 -2
- package/dist/waku/public/assets/{algolia-B1uhfuD6.js → algolia-akct_lCZ.js} +1 -1
- package/dist/waku/public/assets/{chevron-right-DmP6Xa1g.js → chevron-right-DJ6X4mXo.js} +1 -1
- package/dist/waku/public/assets/{client-BSFjekJY.js → client-DU5zOesq.js} +1 -1
- package/dist/waku/public/assets/{collapsible-B2rvGry7.js → collapsible-Bqzit3JO.js} +1 -1
- package/dist/waku/public/assets/{core-C4jOG9I2.js → core-BfOvCGca.js} +1 -1
- package/dist/waku/public/assets/{i18n-V4QzeUbV.js → i18n-BU0Gqrrh.js} +1 -1
- package/dist/waku/public/assets/{index-xXa72sZS.js → index-C3-lsDRv.js} +1 -1
- package/dist/waku/public/assets/{index-NB9D4S1v.js → index-CCR9ecA8.js} +1 -1
- package/dist/waku/public/assets/{index-DW9Fo86a.js → index-CWwHJATE.js} +1 -1
- package/dist/waku/public/assets/{index-BQZmdbam.js → index-CY9LswMc.js} +1 -1
- package/dist/waku/public/assets/{index-CYJW3hzB.js → index-Cae1bXCh.js} +1 -1
- package/dist/waku/public/assets/{index-Bojr-xLv.js → index-CkzHlXhF.js} +1 -1
- package/dist/waku/public/assets/{index-B-5ouVG_.js → index-DOC-_zsC.js} +1 -1
- package/dist/waku/public/assets/{index-B65N5043.js → index-DOsFxkYv.js} +1 -1
- package/dist/waku/public/assets/{index-DHENdpwd.js → index-DhgWLnXf.js} +1 -1
- package/dist/waku/public/assets/index-E12FLc8f.js +1 -0
- package/dist/waku/public/assets/{index-OFfnl8sH.js → index-Po1UZSgL.js} +3 -3
- package/dist/waku/public/assets/{index-2HLUYgxN.js → index-T_b7wuyJ.js} +5 -5
- package/dist/waku/public/assets/{index-CBSxJfFU.js → index-yiM3u0f9.js} +1 -1
- package/dist/waku/public/assets/{index-Bonlu0LX.js → index-zSjxh5o9.js} +1 -1
- package/dist/waku/public/assets/{link-item-BlYkot48.js → link-item-CAVxr8-m.js} +1 -1
- package/dist/waku/public/assets/{merge-refs-BIez66Kl.js → merge-refs-B7SuKGTI.js} +1 -1
- package/dist/waku/public/assets/{orama-cloud-CazpSeQ0.js → orama-cloud-D6HIyrrx.js} +1 -1
- package/dist/waku/public/assets/{orama-cloud-legacy-CINWERV2.js → orama-cloud-legacy-AQ__GML5.js} +1 -1
- package/dist/waku/public/assets/{orama-static-DwfVMMmc.js → orama-static-CyMYfAPj.js} +1 -1
- package/dist/waku/public/assets/{page-actions--VStSULV.js → page-actions-CcyvVvdr.js} +1 -1
- package/dist/waku/public/assets/{proxy-CWSxKwWP.js → proxy-DdABrE5r.js} +1 -1
- package/dist/waku/public/assets/{search-D1WUBd3N.js → search-AdRfsIll.js} +1 -1
- package/dist/waku/public/assets/{search-default-B2jTK1EC.js → search-default-B4NAC8AJ.js} +3 -3
- package/dist/waku/public/assets/{use-copy-button-BO3GBlwZ.js → use-copy-button-auHqSfgW.js} +1 -1
- package/dist/waku/public/assets/{x-CB1cQ-bo.js → x-Blg1xIpd.js} +1 -1
- package/dist/waku/server/__vite_rsc_assets_manifest.js +151 -151
- package/dist/waku/server/assets/{_...slugs_-8lFegkVB.js → _...slugs_-DF1SYPMg.js} +32 -30
- package/dist/waku/server/assets/_root-BWpoCRFY.css +1 -0
- package/dist/waku/server/assets/{_root-B7AMftRI.js → _root-BiaZL9xf.js} +1 -1
- package/dist/waku/server/assets/{ai-C1Bf8DXZ.js → ai-vEEzbqB8.js} +2 -2
- package/dist/waku/server/assets/{chat-CN1qUeN-.js → chat-DOZ_Cx8A.js} +202 -12
- package/dist/waku/server/assets/{image.webp-PNGidV2r.js → image.webp-BW_97iH9.js} +1 -1
- package/dist/waku/server/assets/{img-C2Ne7ke5.js → img-B-t2xy2h.js} +1 -1
- package/dist/waku/server/assets/{index-CtEJq0xW.js → index--w0er2WH.js} +5 -5
- package/dist/waku/server/assets/{index-AIo6cWfN.js → index-BK2ZBQW1.js} +132 -54
- package/dist/waku/server/assets/{index-dpJ5KyUl.js → index-BXqq5kje.js} +1 -1
- package/dist/waku/server/assets/{index-D6orYQqE.js → index-CoHTzFHF.js} +1 -1
- package/dist/waku/server/assets/{index-QgPg52ej.js → index-D32Kgl7D.js} +1 -1
- package/dist/waku/server/assets/{index-BtnFj3IN.js → index-DShTeblm.js} +1 -1
- package/dist/waku/server/assets/{index-DFPuXyRR.js → index-DWNJLNyX.js} +1 -1
- package/dist/waku/server/assets/{index-6LQQnOj9.js → index-eAdvdAYz.js} +1 -1
- package/dist/waku/server/assets/{search-BuYfcIgW.js → search-BHsWHDmx.js} +2 -2
- package/dist/waku/server/assets/{server-entry-inner-DrYrCg3c.js → server-entry-inner-CYeTE9pH.js} +230 -189
- package/dist/waku/server/assets/{token-BJQ71htz.js → token-Dc4bIZyb.js} +3 -3
- package/dist/waku/server/assets/{token-util-BdUbceAe.js → token-util-BDWFgKKT.js} +16 -16
- package/dist/waku/server/assets/{token-util-WrcienE5.js → token-util-yHc1UlLV.js} +2 -2
- package/dist/waku/server/build.js +1 -1
- package/dist/waku/server/index.js +1 -1
- package/dist/waku/server/ssr/__vite_rsc_assets_manifest.js +151 -151
- package/dist/waku/server/ssr/assets/{Icon-BkWS2wcn.js → Icon-CjkqongL.js} +2 -2
- package/dist/waku/server/ssr/assets/{core-CLB7CUo5.js → core-Ru16gShL.js} +3 -3
- package/dist/waku/server/ssr/assets/{index-CKMvBRnq.js → index-BFvm1zbH.js} +4 -4
- package/dist/waku/server/ssr/assets/{index-BggSP1CG.js → index-CTD5LS21.js} +3 -3
- package/dist/waku/server/ssr/assets/{index-F8Xj3Sj4.js → index-DR2zqaC5.js} +1 -1
- package/dist/waku/server/ssr/index.js +12 -13
- package/package.json +15 -15
- package/dist/waku/public/assets/Icon-C79MpmBL.js +0 -1
- package/dist/waku/public/assets/_root-CzUOgPm2.css +0 -1
- package/dist/waku/public/assets/index-B7lX48CB.js +0 -1
- package/dist/waku/server/assets/_root-CzUOgPm2.css +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as M,t as v,b as E}from"./index-Bojr-xLv.js";import{_ as O,f as G,P as U,a as X,C as J,b as K,E as Q}from"./collapsible-B2rvGry7.js";import{u as P}from"./i18n-V4QzeUbV.js";import{m as T,C as Y}from"./merge-refs-BIez66Kl.js";import{j as r,r as l}from"./index-OFfnl8sH.js";import{u as B,e as S}from"./index-xXa72sZS.js";import{u as ee}from"./use-copy-button-BO3GBlwZ.js";import{a as te}from"./index-B-5ouVG_.js";const ne=[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]],_e=M("chevron-left",ne);const re=[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]],se=M("copy",re);const oe=[["path",{d:"M12 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7",key:"1m0v6g"}],["path",{d:"M18.375 2.625a1 1 0 0 1 3 3l-9.013 9.014a2 2 0 0 1-.853.505l-2.873.84a.5.5 0 0 1-.62-.62l.84-2.873a2 2 0 0 1 .506-.852z",key:"ohrbg2"}]],Se=M("square-pen",oe);const ie=[["path",{d:"M21 5H3",key:"1fi0y6"}],["path",{d:"M15 12H3",key:"6jk70r"}],["path",{d:"M17 19H3",key:"z6ezky"}]],ae=M("text-align-start",ie);function ce(...e){return s=>{e.forEach(t=>{typeof t=="function"?t(s):t!=null&&(t.current=s)})}}const H=l.createContext(null),V=l.createContext(null);function W({containerRef:e,children:s}){return r.jsx(V,{value:e,children:s})}function Z({toc:e,single:s=!1,children:t}){const n=l.useMemo(()=>new de,[]),[o,i]=l.useState(n.items);return n.single=s,l.useEffect(()=>{n.setItems(e)},[n,e]),l.useEffect(()=>(n.watch({rootMargin:"0px",threshold:.98}),n.onChange=()=>i(n.items),()=>{n.unwatch()}),[n]),r.jsx(H,{value:o,children:t})}function N({ref:e,onActiveChange:s=()=>null,...t}){const n=k(),o=l.use(V),i=t.href?q(t.href):null,a=l.useRef(null),[c,d]=l.useState(()=>i&&n.some(u=>u.active&&u.id===i)),f=l.useRef(null);if(f.current===null){const u=n.findLast(h=>h.active);f.current=u!==void 0&&u.id===i}return B(n,()=>{if(i===null)return;const u=n.find(p=>p.id===i);if(!u||u.active===c)return;const h=a.current,m=o?.current;u.active&&n.every(p=>!p.active||p.t<=u.t)&&m&&h&&S(h,{behavior:"smooth",block:"center",inline:"center",scrollMode:"always",boundary:m}),d(u.active),s(u.active)}),l.useEffect(()=>{const u=a.current,h=o?.current;f.current&&h&&u&&S(u,{behavior:"instant",block:"center",inline:"center",scrollMode:"always",boundary:h})},[o]),r.jsx("a",{ref:ce(a,e),"data-active":c,...t})}function le(){const e=k();return l.useMemo(()=>{let s;for(const t of e)t.active&&(!s||t.t>s.t)&&(s=t);return s?.id},[e])}function ue(){const e=k();return l.useMemo(()=>{const s=[];for(const t of e)t.active&&s.push(t.id);return s},[e])}function k(){const e=l.use(H);if(!e)throw new Error("Component must be used under the <AnchorProvider /> component.");return e}function q(e){return e.startsWith("#")?e.slice(1):null}var de=class{constructor(){this.items=[],this.single=!1,this.observer=null}callback(e){if(e.length===0)return;let s=!1;if(this.items=this.items.map(t=>{const n=e.find(i=>i.target.id===t.id);let o=n?n.isIntersecting:t.active&&!t.fallback;return this.single&&s&&(o=!1),t.active!==o&&(t={...t,t:Date.now(),active:o,fallback:!1}),o&&(s=!0),t}),!s&&e[0].rootBounds){const t=e[0].rootBounds.top;let n=Number.MAX_VALUE,o=-1;for(let i=0;i<this.items.length;i++){const a=document.getElementById(this.items[i].id);if(!a)continue;const c=Math.abs(t-a.getBoundingClientRect().top);c<n&&(o=i,n=c)}o!==-1&&(this.items[o]={...this.items[o],active:!0,fallback:!0,t:Date.now()})}this.onChange?.()}setItems(e){const s=this.observer;if(s)for(const t of this.items){const n=document.getElementById(t.id);n&&s.unobserve(n)}this.items=[];for(const t of e){const n=q(t.url);n&&this.items.push({id:n,active:!1,fallback:!1,t:0,original:t})}this.watchItems()}watch(e){this.observer||(this.observer=new IntersectionObserver(this.callback.bind(this),e),this.watchItems())}watchItems(){if(this.observer)for(const e of this.items){const s=document.getElementById(e.id);s&&this.observer.observe(s)}}unwatch(){this.observer?.disconnect(),this.observer=null}};const fe=Object.freeze(Object.defineProperty({__proto__:null,AnchorProvider:Z,ScrollProvider:W,TOCItem:N,useActiveAnchor:le,useActiveAnchors:ue,useItems:k},Symbol.toStringTag,{value:"Module"}));var ze=O({TOCProvider:()=>pe,TOCScrollArea:()=>xe,TocThumb:()=>L,useActiveAnchor:()=>he,useActiveAnchors:()=>D,useItems:()=>me,useTOCItems:()=>A});const F=l.createContext([]);function A(){return l.use(F)}const{useActiveAnchor:he,useActiveAnchors:D,useItems:me}=fe;function pe({toc:e,children:s,...t}){return r.jsx(F,{value:e,children:r.jsx(Z,{toc:e,...t,children:s})})}function xe({ref:e,className:s,...t}){const n=l.useRef(null);return r.jsx("div",{ref:T(n,e),className:v("relative min-h-0 text-sm ms-px overflow-auto [scrollbar-width:none] mask-[linear-gradient(to_bottom,transparent,white_16px,white_calc(100%-16px),transparent)] py-3",s),...t,children:r.jsx(W,{containerRef:n,children:t.children})})}function L({containerRef:e,...s}){const t=l.useRef(null),n=D();function o(c){const d=t.current,f=e.current;!d||!f||(d.style.setProperty("--fd-top",`${c.top}px`),d.style.setProperty("--fd-height",`${c.height}px`))}function i(c){const d=e.current;if(!d||d.clientHeight===0)return null;if(c.length===0)return{height:0,top:0};let f=Number.MAX_VALUE,u=0;for(const h of c){const m=d.querySelector(`a[href="#${h}"]`);if(!m)continue;const p=getComputedStyle(m);f=Math.min(f,m.offsetTop+parseFloat(p.paddingTop)),u=Math.max(u,m.offsetTop+m.clientHeight-parseFloat(p.paddingBottom))}return{top:f,height:u-f}}const a=l.useEffectEvent(()=>{const c=i(n);c&&o(c)});return l.useEffect(()=>{if(!e.current)return;const c=e.current,d=new ResizeObserver(a);return d.observe(c),()=>{d.disconnect()}},[e]),B(n,()=>{const c=i(n);c&&o(c)}),r.jsx("div",{ref:t,"data-hidden":n.length===0,...s})}var Re=O({TOCEmpty:()=>ge,TOCItem:()=>Ce,TOCItems:()=>ve});function ve({ref:e,className:s,...t}){const n=l.useRef(null);return r.jsxs("div",{className:"relative",children:[r.jsx(L,{containerRef:n,className:"absolute inset-y-0 inset-s-0 bg-fd-primary w-px transition-[clip-path]",style:{clipPath:"polygon(0 var(--fd-top), 100% var(--fd-top), 100% calc(var(--fd-top) + var(--fd-height)), 0 calc(var(--fd-top) + var(--fd-height)))"}}),r.jsx("div",{ref:T(e,n),className:v("flex flex-col border-s border-fd-foreground/10",s),...t})]})}function ge(){const{text:e}=P();return r.jsx("div",{className:"rounded-lg border bg-fd-card p-3 text-xs text-fd-muted-foreground",children:e.tocNoHeadings})}function Ce({item:e,...s}){return r.jsx(N,{href:e.url,...s,className:v("prose py-1.5 text-sm text-fd-muted-foreground scroll-m-4 transition-colors wrap-anywhere first:pt-0 last:pb-0 data-[active=true]:text-fd-primary hover:text-fd-accent-foreground",e.depth<=2&&"ps-3",e.depth===3&&"ps-6",e.depth>=4&&"ps-8",s.className),children:e.title})}var Ee=O({TOCEmpty:()=>be,TOCItem:()=>ke,TOCItems:()=>we});function we({ref:e,className:s,...t}){const n=l.useRef(null),o=A(),[i,a]=l.useState(),c=l.useEffectEvent(()=>{const d=n.current;if(!d||d.clientHeight===0)return;let f=0,u=0,h=0,m=0,p="";const $=[];for(let g=0;g<o.length;g++){const I=o[g],b=d.querySelector(`a[href="#${I.url.slice(1)}"]`);if(!b)continue;const _=getComputedStyle(b),x=j(I.depth)+.5,y=b.offsetTop+parseFloat(_.paddingTop),C=b.offsetTop+b.clientHeight-parseFloat(_.paddingBottom);f=Math.max(x+8,f),u=Math.max(u,C),g===0?p+=` M${x} ${y} L${x} ${C}`:p+=` C ${m} ${y-4} ${x} ${h+4} ${x} ${y} L${x} ${C}`,I._step!==void 0&&$.push(r.jsx("circle",{cx:x,cy:(y+C)/2,r:"8",className:"fill-fd-primary"},`${g}-circle`),r.jsx("text",{x,y:(y+C)/2,textAnchor:"middle",alignmentBaseline:"central",dominantBaseline:"middle",className:"fill-fd-primary-foreground font-medium text-xs leading-none font-mono",children:I._step},`${g}-text`)),m=x,h=C}$.unshift(r.jsx("path",{d:p,className:"stroke-fd-primary",strokeWidth:"1",fill:"none"},"path")),a({content:$,width:f,height:u})});return l.useEffect(()=>{if(!n.current)return;const d=new ResizeObserver(c);return c(),d.observe(n.current),()=>{d.disconnect()}},[]),r.jsxs(r.Fragment,{children:[i&&r.jsxs(L,{containerRef:n,className:"absolute top-0 inset-s-0",style:{width:i.width,height:i.height},children:[r.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:`0 0 ${i.width} ${i.height}`,className:"absolute transition-[clip-path]",style:{width:i.width,height:i.height,clipPath:"polygon(0 var(--fd-top), 100% var(--fd-top), 100% calc(var(--fd-top) + var(--fd-height)), 0 calc(var(--fd-top) + var(--fd-height)))"},children:i.content}),r.jsx(ye,{})]}),r.jsx("div",{ref:T(n,e),className:v("flex flex-col",s),...t})]})}function be(){const{text:e}=P();return r.jsx("div",{className:"rounded-lg border bg-fd-card p-3 text-xs text-fd-muted-foreground",children:e.tocNoHeadings})}function ye(){const e=k(),s=l.useRef(null),t=e.findIndex(a=>a.active),n=e.findLastIndex(a=>a.active);if(t===-1)return;let o=!1;if(s.current){const a=s.current;o=a.startIdx>t||a.endIdx>n||a.startIdx===t&&a.endIdx===n&&a.isUp}s.current={startIdx:t,endIdx:n,isUp:o};const i=e[o?t:n].original;return r.jsx("div",{className:"absolute size-1 bg-fd-primary rounded-full transition-transform",style:{translate:`${j(i.depth)-1.5}px calc(${o?"var(--fd-top)":"var(--fd-top) + var(--fd-height)"} - 1.5px)`,scale:i._step!==void 0?"0":"1"}})}const w=8;function je(e){return e<=2?12+w:e===3?24+w:36+w}function j(e){return e<=2?w:e===3?8+w:16+w}function ke({item:e,...s}){const t=A(),{lowerOffset:n,offset:o,upperOffset:i}=l.useMemo(()=>{const a=t.indexOf(e),c=j(e.depth);return{offset:c,upperOffset:a>0?j(t[a-1].depth):c,lowerOffset:a+1<t.length?j(t[a+1].depth):c}},[t,e]);return r.jsxs(N,{href:e.url,...s,className:v("group prose relative py-1.5 text-sm scroll-m-4 text-fd-muted-foreground hover:text-fd-accent-foreground transition-colors wrap-anywhere first:pt-0 last:pb-0 data-[active=true]:text-fd-primary",s.className),style:{paddingInlineStart:je(e.depth),...s.style},children:[o!==i&&r.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:`${Math.min(o,i)} 0 ${Math.abs(i-o)} 12`,className:"absolute -top-1.5 -z-1",style:{width:Math.abs(i-o)+1,height:12,insetInlineStart:Math.min(o,i)},children:r.jsx("path",{d:`M ${i} 0 C ${i} 8 ${o} 4 ${o} 12`,stroke:"black",strokeWidth:"1",fill:"none",className:"stroke-fd-foreground/10"})}),r.jsx("div",{className:v("absolute inset-y-0 w-px bg-fd-foreground/10 -z-1",o!==i&&"top-1.5",o!==n&&"bottom-1.5"),style:{insetInlineStart:o}}),e._step!==void 0&&r.jsx("div",{className:"absolute flex items-center justify-center -translate-1/2 -z-1 top-[calc(50%-var(--t,0px)+var(--b,0px))] size-4 font-mono font-medium text-xs bg-fd-muted text-fd-muted-foreground rounded-full leading-none group-first:[--t:--spacing(0.75)] group-last:[--b:--spacing(0.75)]",style:{insetInlineStart:o},children:e._step}),e.title]})}const z=new WeakMap;function Pe(){const{root:e}=G(),s=z.get(e);if(s)return s;const t=[];function n(o){if(o.type==="folder"){o.index&&n(o.index);for(const i of o.children)n(i)}else o.type==="page"&&!o.external&&t.push(o)}for(const o of e.children)n(o);return z.set(e,t),t}const R=new Map;function Be({markdownUrl:e,...s}){const[t,n]=l.useState(!1),[o,i]=ee(async()=>{const a=R.get(e);if(a)return navigator.clipboard.writeText(await a);n(!0);try{const c=fetch(e).then(d=>d.text());R.set(e,c),await navigator.clipboard.write([new ClipboardItem({"text/plain":c})])}finally{n(!1)}});return r.jsxs("button",{disabled:t,onClick:i,...s,className:v(E({color:"secondary",size:"sm",className:"gap-2 [&_svg]:size-3.5 [&_svg]:text-fd-muted-foreground"}),s.className),children:[o?r.jsx(Y,{}):r.jsx(se,{}),s.children??"Copy Markdown"]})}function He({markdownUrl:e,githubUrl:s,...t}){const n=te(),o=l.useMemo(()=>{const i=`Read ${typeof window>"u"?n:new URL(n,window.location.origin)}, I want to ask questions about it.`;return[s&&{title:"Open in GitHub",href:s,icon:r.jsxs("svg",{fill:"currentColor",role:"img",viewBox:"0 0 24 24",children:[r.jsx("title",{children:"GitHub"}),r.jsx("path",{d:"M12 .297c-6.63 0-12 5.373-12 12 0 5.303 3.438 9.8 8.205 11.385.6.113.82-.258.82-.577 0-.285-.01-1.04-.015-2.04-3.338.724-4.042-1.61-4.042-1.61C4.422 18.07 3.633 17.7 3.633 17.7c-1.087-.744.084-.729.084-.729 1.205.084 1.838 1.236 1.838 1.236 1.07 1.835 2.809 1.305 3.495.998.108-.776.417-1.305.76-1.605-2.665-.3-5.466-1.332-5.466-5.93 0-1.31.465-2.38 1.235-3.22-.135-.303-.54-1.523.105-3.176 0 0 1.005-.322 3.3 1.23.96-.267 1.98-.399 3-.405 1.02.006 2.04.138 3 .405 2.28-1.552 3.285-1.23 3.285-1.23.645 1.653.24 2.873.12 3.176.765.84 1.23 1.91 1.23 3.22 0 4.61-2.805 5.625-5.475 5.92.42.36.81 1.096.81 2.22 0 1.606-.015 2.896-.015 3.286 0 .315.21.69.825.57C20.565 22.092 24 17.592 24 12.297c0-6.627-5.373-12-12-12"})]})},e&&{title:"View as Markdown",href:e,icon:r.jsx(ae,{})},{title:"Open in Scira AI",href:`https://scira.ai/?${new URLSearchParams({q:i})}`,icon:r.jsxs("svg",{width:"910",height:"934",viewBox:"0 0 910 934",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[r.jsx("title",{children:"Scira AI"}),r.jsx("path",{d:"M647.664 197.775C569.13 189.049 525.5 145.419 516.774 66.8849C508.048 145.419 464.418 189.049 385.884 197.775C464.418 206.501 508.048 250.131 516.774 328.665C525.5 250.131 569.13 206.501 647.664 197.775Z",fill:"currentColor",stroke:"currentColor",strokeWidth:"8",strokeLinejoin:"round"}),r.jsx("path",{d:"M516.774 304.217C510.299 275.491 498.208 252.087 480.335 234.214C462.462 216.341 439.058 204.251 410.333 197.775C439.059 191.3 462.462 179.209 480.335 161.336C498.208 143.463 510.299 120.06 516.774 91.334C523.25 120.059 535.34 143.463 553.213 161.336C571.086 179.209 594.49 191.3 623.216 197.775C594.49 204.251 571.086 216.341 553.213 234.214C535.34 252.087 523.25 275.491 516.774 304.217Z",fill:"currentColor",stroke:"currentColor",strokeWidth:"8",strokeLinejoin:"round"}),r.jsx("path",{d:"M857.5 508.116C763.259 497.644 710.903 445.288 700.432 351.047C689.961 445.288 637.605 497.644 543.364 508.116C637.605 518.587 689.961 570.943 700.432 665.184C710.903 570.943 763.259 518.587 857.5 508.116Z",stroke:"currentColor",strokeWidth:"20",strokeLinejoin:"round"}),r.jsx("path",{d:"M700.432 615.957C691.848 589.05 678.575 566.357 660.383 548.165C642.191 529.973 619.499 516.7 592.593 508.116C619.499 499.533 642.191 486.258 660.383 468.066C678.575 449.874 691.848 427.181 700.432 400.274C709.015 427.181 722.289 449.874 740.481 468.066C758.673 486.258 781.365 499.533 808.271 508.116C781.365 516.7 758.673 529.973 740.481 548.165C722.289 566.357 709.015 589.05 700.432 615.957Z",stroke:"currentColor",strokeWidth:"20",strokeLinejoin:"round"}),r.jsx("path",{d:"M889.949 121.237C831.049 114.692 798.326 81.9698 791.782 23.0692C785.237 81.9698 752.515 114.692 693.614 121.237C752.515 127.781 785.237 160.504 791.782 219.404C798.326 160.504 831.049 127.781 889.949 121.237Z",fill:"currentColor",stroke:"currentColor",strokeWidth:"8",strokeLinejoin:"round"}),r.jsx("path",{d:"M791.782 196.795C786.697 176.937 777.869 160.567 765.16 147.858C752.452 135.15 736.082 126.322 716.226 121.237C736.082 116.152 752.452 107.324 765.16 94.6152C777.869 81.9065 786.697 65.5368 791.782 45.6797C796.867 65.5367 805.695 81.9066 818.403 94.6152C831.112 107.324 847.481 116.152 867.338 121.237C847.481 126.322 831.112 135.15 818.403 147.858C805.694 160.567 796.867 176.937 791.782 196.795Z",fill:"currentColor",stroke:"currentColor",strokeWidth:"8",strokeLinejoin:"round"}),r.jsx("path",{d:"M760.632 764.337C720.719 814.616 669.835 855.1 611.872 882.692C553.91 910.285 490.404 924.255 426.213 923.533C362.022 922.812 298.846 907.419 241.518 878.531C184.19 849.643 134.228 808.026 95.4548 756.863C56.6815 705.7 30.1238 646.346 17.8129 583.343C5.50207 520.339 7.76433 455.354 24.4266 393.359C41.089 331.364 71.7099 274.001 113.947 225.658C156.184 177.315 208.919 139.273 268.117 114.442",stroke:"currentColor",strokeWidth:"30",strokeLinecap:"round",strokeLinejoin:"round"})]})},{title:"Open in ChatGPT",href:`https://chatgpt.com/?${new URLSearchParams({hints:"search",q:i})}`,icon:r.jsxs("svg",{role:"img",viewBox:"0 0 24 24",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:[r.jsx("title",{children:"OpenAI"}),r.jsx("path",{d:"M22.2819 9.8211a5.9847 5.9847 0 0 0-.5157-4.9108 6.0462 6.0462 0 0 0-6.5098-2.9A6.0651 6.0651 0 0 0 4.9807 4.1818a5.9847 5.9847 0 0 0-3.9977 2.9 6.0462 6.0462 0 0 0 .7427 7.0966 5.98 5.98 0 0 0 .511 4.9107 6.051 6.051 0 0 0 6.5146 2.9001A5.9847 5.9847 0 0 0 13.2599 24a6.0557 6.0557 0 0 0 5.7718-4.2058 5.9894 5.9894 0 0 0 3.9977-2.9001 6.0557 6.0557 0 0 0-.7475-7.0729zm-9.022 12.6081a4.4755 4.4755 0 0 1-2.8764-1.0408l.1419-.0804 4.7783-2.7582a.7948.7948 0 0 0 .3927-.6813v-6.7369l2.02 1.1686a.071.071 0 0 1 .038.052v5.5826a4.504 4.504 0 0 1-4.4945 4.4944zm-9.6607-4.1254a4.4708 4.4708 0 0 1-.5346-3.0137l.142.0852 4.783 2.7582a.7712.7712 0 0 0 .7806 0l5.8428-3.3685v2.3324a.0804.0804 0 0 1-.0332.0615L9.74 19.9502a4.4992 4.4992 0 0 1-6.1408-1.6464zM2.3408 7.8956a4.485 4.485 0 0 1 2.3655-1.9728V11.6a.7664.7664 0 0 0 .3879.6765l5.8144 3.3543-2.0201 1.1685a.0757.0757 0 0 1-.071 0l-4.8303-2.7865A4.504 4.504 0 0 1 2.3408 7.872zm16.5963 3.8558L13.1038 8.364 15.1192 7.2a.0757.0757 0 0 1 .071 0l4.8303 2.7913a4.4944 4.4944 0 0 1-.6765 8.1042v-5.6772a.79.79 0 0 0-.407-.667zm2.0107-3.0231l-.142-.0852-4.7735-2.7818a.7759.7759 0 0 0-.7854 0L9.409 9.2297V6.8974a.0662.0662 0 0 1 .0284-.0615l4.8303-2.7866a4.4992 4.4992 0 0 1 6.6802 4.66zM8.3065 12.863l-2.02-1.1638a.0804.0804 0 0 1-.038-.0567V6.0742a4.4992 4.4992 0 0 1 7.3757-3.4537l-.142.0805L8.704 5.459a.7948.7948 0 0 0-.3927.6813zm1.0976-2.3654l2.602-1.4998 2.6069 1.4998v2.9994l-2.5974 1.4997-2.6067-1.4997Z"})]})},{title:"Open in Claude",href:`https://claude.ai/new?${new URLSearchParams({q:i})}`,icon:r.jsxs("svg",{fill:"currentColor",role:"img",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:[r.jsx("title",{children:"Anthropic"}),r.jsx("path",{d:"M17.3041 3.541h-3.6718l6.696 16.918H24Zm-10.6082 0L0 20.459h3.7442l1.3693-3.5527h7.0052l1.3693 3.5528h3.7442L10.5363 3.5409Zm-.3712 10.2232 2.2914-5.9456 2.2914 5.9456Z"})]})},{title:"Open in Cursor",icon:r.jsxs("svg",{fill:"currentColor",role:"img",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:[r.jsx("title",{children:"Cursor"}),r.jsx("path",{d:"M11.503.131 1.891 5.678a.84.84 0 0 0-.42.726v11.188c0 .3.162.575.42.724l9.609 5.55a1 1 0 0 0 .998 0l9.61-5.55a.84.84 0 0 0 .42-.724V6.404a.84.84 0 0 0-.42-.726L12.497.131a1.01 1.01 0 0 0-.996 0M2.657 6.338h18.55c.263 0 .43.287.297.515L12.23 22.918c-.062.107-.229.064-.229-.06V12.335a.59.59 0 0 0-.295-.51l-9.11-5.257c-.109-.063-.064-.23.061-.23"})]}),href:`https://cursor.com/link/prompt?${new URLSearchParams({text:i})}`}].filter(a=>!!a)},[s,e,n]);return r.jsxs(U,{children:[r.jsxs(X,{...t,className:v(E({color:"secondary",size:"sm"}),"gap-2 data-[state=open]:bg-fd-accent data-[state=open]:text-fd-accent-foreground",t.className),children:[t.children??"Open",r.jsx(J,{className:"size-3.5 text-fd-muted-foreground"})]}),r.jsx(K,{className:"flex flex-col",children:o.map(i=>r.jsxs("a",{href:i.href,rel:"noreferrer noopener",target:"_blank",className:"text-sm p-2 rounded-lg inline-flex items-center gap-2 hover:text-fd-accent-foreground hover:bg-fd-accent [&_svg]:size-4",children:[i.icon,i.title,r.jsx(Q,{className:"text-fd-muted-foreground size-3.5 ms-auto"})]},i.href))})]})}export{_e as C,Be as M,Se as S,xe as T,He as V,ae as a,pe as b,Ee as c,Re as d,me as e,Pe as f,ze as t,A as u};
|
|
1
|
+
import{c as M,t as v,b as E}from"./index-CkzHlXhF.js";import{_ as O,f as G,P as U,a as X,C as J,b as K,E as Q}from"./collapsible-Bqzit3JO.js";import{u as P}from"./i18n-BU0Gqrrh.js";import{m as T,C as Y}from"./merge-refs-B7SuKGTI.js";import{j as r,r as l}from"./index-Po1UZSgL.js";import{u as B,e as S}from"./index-C3-lsDRv.js";import{u as ee}from"./use-copy-button-auHqSfgW.js";import{a as te}from"./index-DOC-_zsC.js";const ne=[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]],_e=M("chevron-left",ne);const re=[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]],se=M("copy",re);const oe=[["path",{d:"M12 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7",key:"1m0v6g"}],["path",{d:"M18.375 2.625a1 1 0 0 1 3 3l-9.013 9.014a2 2 0 0 1-.853.505l-2.873.84a.5.5 0 0 1-.62-.62l.84-2.873a2 2 0 0 1 .506-.852z",key:"ohrbg2"}]],Se=M("square-pen",oe);const ie=[["path",{d:"M21 5H3",key:"1fi0y6"}],["path",{d:"M15 12H3",key:"6jk70r"}],["path",{d:"M17 19H3",key:"z6ezky"}]],ae=M("text-align-start",ie);function ce(...e){return s=>{e.forEach(t=>{typeof t=="function"?t(s):t!=null&&(t.current=s)})}}const H=l.createContext(null),V=l.createContext(null);function W({containerRef:e,children:s}){return r.jsx(V,{value:e,children:s})}function Z({toc:e,single:s=!1,children:t}){const n=l.useMemo(()=>new de,[]),[o,i]=l.useState(n.items);return n.single=s,l.useEffect(()=>{n.setItems(e)},[n,e]),l.useEffect(()=>(n.watch({rootMargin:"0px",threshold:.98}),n.onChange=()=>i(n.items),()=>{n.unwatch()}),[n]),r.jsx(H,{value:o,children:t})}function N({ref:e,onActiveChange:s=()=>null,...t}){const n=k(),o=l.use(V),i=t.href?q(t.href):null,a=l.useRef(null),[c,d]=l.useState(()=>i&&n.some(u=>u.active&&u.id===i)),f=l.useRef(null);if(f.current===null){const u=n.findLast(h=>h.active);f.current=u!==void 0&&u.id===i}return B(n,()=>{if(i===null)return;const u=n.find(p=>p.id===i);if(!u||u.active===c)return;const h=a.current,m=o?.current;u.active&&n.every(p=>!p.active||p.t<=u.t)&&m&&h&&S(h,{behavior:"smooth",block:"center",inline:"center",scrollMode:"always",boundary:m}),d(u.active),s(u.active)}),l.useEffect(()=>{const u=a.current,h=o?.current;f.current&&h&&u&&S(u,{behavior:"instant",block:"center",inline:"center",scrollMode:"always",boundary:h})},[o]),r.jsx("a",{ref:ce(a,e),"data-active":c,...t})}function le(){const e=k();return l.useMemo(()=>{let s;for(const t of e)t.active&&(!s||t.t>s.t)&&(s=t);return s?.id},[e])}function ue(){const e=k();return l.useMemo(()=>{const s=[];for(const t of e)t.active&&s.push(t.id);return s},[e])}function k(){const e=l.use(H);if(!e)throw new Error("Component must be used under the <AnchorProvider /> component.");return e}function q(e){return e.startsWith("#")?e.slice(1):null}var de=class{constructor(){this.items=[],this.single=!1,this.observer=null}callback(e){if(e.length===0)return;let s=!1;if(this.items=this.items.map(t=>{const n=e.find(i=>i.target.id===t.id);let o=n?n.isIntersecting:t.active&&!t.fallback;return this.single&&s&&(o=!1),t.active!==o&&(t={...t,t:Date.now(),active:o,fallback:!1}),o&&(s=!0),t}),!s&&e[0].rootBounds){const t=e[0].rootBounds.top;let n=Number.MAX_VALUE,o=-1;for(let i=0;i<this.items.length;i++){const a=document.getElementById(this.items[i].id);if(!a)continue;const c=Math.abs(t-a.getBoundingClientRect().top);c<n&&(o=i,n=c)}o!==-1&&(this.items[o]={...this.items[o],active:!0,fallback:!0,t:Date.now()})}this.onChange?.()}setItems(e){const s=this.observer;if(s)for(const t of this.items){const n=document.getElementById(t.id);n&&s.unobserve(n)}this.items=[];for(const t of e){const n=q(t.url);n&&this.items.push({id:n,active:!1,fallback:!1,t:0,original:t})}this.watchItems()}watch(e){this.observer||(this.observer=new IntersectionObserver(this.callback.bind(this),e),this.watchItems())}watchItems(){if(this.observer)for(const e of this.items){const s=document.getElementById(e.id);s&&this.observer.observe(s)}}unwatch(){this.observer?.disconnect(),this.observer=null}};const fe=Object.freeze(Object.defineProperty({__proto__:null,AnchorProvider:Z,ScrollProvider:W,TOCItem:N,useActiveAnchor:le,useActiveAnchors:ue,useItems:k},Symbol.toStringTag,{value:"Module"}));var ze=O({TOCProvider:()=>pe,TOCScrollArea:()=>xe,TocThumb:()=>L,useActiveAnchor:()=>he,useActiveAnchors:()=>D,useItems:()=>me,useTOCItems:()=>A});const F=l.createContext([]);function A(){return l.use(F)}const{useActiveAnchor:he,useActiveAnchors:D,useItems:me}=fe;function pe({toc:e,children:s,...t}){return r.jsx(F,{value:e,children:r.jsx(Z,{toc:e,...t,children:s})})}function xe({ref:e,className:s,...t}){const n=l.useRef(null);return r.jsx("div",{ref:T(n,e),className:v("relative min-h-0 text-sm ms-px overflow-auto [scrollbar-width:none] mask-[linear-gradient(to_bottom,transparent,white_16px,white_calc(100%-16px),transparent)] py-3",s),...t,children:r.jsx(W,{containerRef:n,children:t.children})})}function L({containerRef:e,...s}){const t=l.useRef(null),n=D();function o(c){const d=t.current,f=e.current;!d||!f||(d.style.setProperty("--fd-top",`${c.top}px`),d.style.setProperty("--fd-height",`${c.height}px`))}function i(c){const d=e.current;if(!d||d.clientHeight===0)return null;if(c.length===0)return{height:0,top:0};let f=Number.MAX_VALUE,u=0;for(const h of c){const m=d.querySelector(`a[href="#${h}"]`);if(!m)continue;const p=getComputedStyle(m);f=Math.min(f,m.offsetTop+parseFloat(p.paddingTop)),u=Math.max(u,m.offsetTop+m.clientHeight-parseFloat(p.paddingBottom))}return{top:f,height:u-f}}const a=l.useEffectEvent(()=>{const c=i(n);c&&o(c)});return l.useEffect(()=>{if(!e.current)return;const c=e.current,d=new ResizeObserver(a);return d.observe(c),()=>{d.disconnect()}},[e]),B(n,()=>{const c=i(n);c&&o(c)}),r.jsx("div",{ref:t,"data-hidden":n.length===0,...s})}var Re=O({TOCEmpty:()=>ge,TOCItem:()=>Ce,TOCItems:()=>ve});function ve({ref:e,className:s,...t}){const n=l.useRef(null);return r.jsxs("div",{className:"relative",children:[r.jsx(L,{containerRef:n,className:"absolute inset-y-0 inset-s-0 bg-fd-primary w-px transition-[clip-path]",style:{clipPath:"polygon(0 var(--fd-top), 100% var(--fd-top), 100% calc(var(--fd-top) + var(--fd-height)), 0 calc(var(--fd-top) + var(--fd-height)))"}}),r.jsx("div",{ref:T(e,n),className:v("flex flex-col border-s border-fd-foreground/10",s),...t})]})}function ge(){const{text:e}=P();return r.jsx("div",{className:"rounded-lg border bg-fd-card p-3 text-xs text-fd-muted-foreground",children:e.tocNoHeadings})}function Ce({item:e,...s}){return r.jsx(N,{href:e.url,...s,className:v("prose py-1.5 text-sm text-fd-muted-foreground scroll-m-4 transition-colors wrap-anywhere first:pt-0 last:pb-0 data-[active=true]:text-fd-primary hover:text-fd-accent-foreground",e.depth<=2&&"ps-3",e.depth===3&&"ps-6",e.depth>=4&&"ps-8",s.className),children:e.title})}var Ee=O({TOCEmpty:()=>be,TOCItem:()=>ke,TOCItems:()=>we});function we({ref:e,className:s,...t}){const n=l.useRef(null),o=A(),[i,a]=l.useState(),c=l.useEffectEvent(()=>{const d=n.current;if(!d||d.clientHeight===0)return;let f=0,u=0,h=0,m=0,p="";const $=[];for(let g=0;g<o.length;g++){const I=o[g],b=d.querySelector(`a[href="#${I.url.slice(1)}"]`);if(!b)continue;const _=getComputedStyle(b),x=j(I.depth)+.5,y=b.offsetTop+parseFloat(_.paddingTop),C=b.offsetTop+b.clientHeight-parseFloat(_.paddingBottom);f=Math.max(x+8,f),u=Math.max(u,C),g===0?p+=` M${x} ${y} L${x} ${C}`:p+=` C ${m} ${y-4} ${x} ${h+4} ${x} ${y} L${x} ${C}`,I._step!==void 0&&$.push(r.jsx("circle",{cx:x,cy:(y+C)/2,r:"8",className:"fill-fd-primary"},`${g}-circle`),r.jsx("text",{x,y:(y+C)/2,textAnchor:"middle",alignmentBaseline:"central",dominantBaseline:"middle",className:"fill-fd-primary-foreground font-medium text-xs leading-none font-mono",children:I._step},`${g}-text`)),m=x,h=C}$.unshift(r.jsx("path",{d:p,className:"stroke-fd-primary",strokeWidth:"1",fill:"none"},"path")),a({content:$,width:f,height:u})});return l.useEffect(()=>{if(!n.current)return;const d=new ResizeObserver(c);return c(),d.observe(n.current),()=>{d.disconnect()}},[]),r.jsxs(r.Fragment,{children:[i&&r.jsxs(L,{containerRef:n,className:"absolute top-0 inset-s-0",style:{width:i.width,height:i.height},children:[r.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:`0 0 ${i.width} ${i.height}`,className:"absolute transition-[clip-path]",style:{width:i.width,height:i.height,clipPath:"polygon(0 var(--fd-top), 100% var(--fd-top), 100% calc(var(--fd-top) + var(--fd-height)), 0 calc(var(--fd-top) + var(--fd-height)))"},children:i.content}),r.jsx(ye,{})]}),r.jsx("div",{ref:T(n,e),className:v("flex flex-col",s),...t})]})}function be(){const{text:e}=P();return r.jsx("div",{className:"rounded-lg border bg-fd-card p-3 text-xs text-fd-muted-foreground",children:e.tocNoHeadings})}function ye(){const e=k(),s=l.useRef(null),t=e.findIndex(a=>a.active),n=e.findLastIndex(a=>a.active);if(t===-1)return;let o=!1;if(s.current){const a=s.current;o=a.startIdx>t||a.endIdx>n||a.startIdx===t&&a.endIdx===n&&a.isUp}s.current={startIdx:t,endIdx:n,isUp:o};const i=e[o?t:n].original;return r.jsx("div",{className:"absolute size-1 bg-fd-primary rounded-full transition-transform",style:{translate:`${j(i.depth)-1.5}px calc(${o?"var(--fd-top)":"var(--fd-top) + var(--fd-height)"} - 1.5px)`,scale:i._step!==void 0?"0":"1"}})}const w=8;function je(e){return e<=2?12+w:e===3?24+w:36+w}function j(e){return e<=2?w:e===3?8+w:16+w}function ke({item:e,...s}){const t=A(),{lowerOffset:n,offset:o,upperOffset:i}=l.useMemo(()=>{const a=t.indexOf(e),c=j(e.depth);return{offset:c,upperOffset:a>0?j(t[a-1].depth):c,lowerOffset:a+1<t.length?j(t[a+1].depth):c}},[t,e]);return r.jsxs(N,{href:e.url,...s,className:v("group prose relative py-1.5 text-sm scroll-m-4 text-fd-muted-foreground hover:text-fd-accent-foreground transition-colors wrap-anywhere first:pt-0 last:pb-0 data-[active=true]:text-fd-primary",s.className),style:{paddingInlineStart:je(e.depth),...s.style},children:[o!==i&&r.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:`${Math.min(o,i)} 0 ${Math.abs(i-o)} 12`,className:"absolute -top-1.5 -z-1",style:{width:Math.abs(i-o)+1,height:12,insetInlineStart:Math.min(o,i)},children:r.jsx("path",{d:`M ${i} 0 C ${i} 8 ${o} 4 ${o} 12`,stroke:"black",strokeWidth:"1",fill:"none",className:"stroke-fd-foreground/10"})}),r.jsx("div",{className:v("absolute inset-y-0 w-px bg-fd-foreground/10 -z-1",o!==i&&"top-1.5",o!==n&&"bottom-1.5"),style:{insetInlineStart:o}}),e._step!==void 0&&r.jsx("div",{className:"absolute flex items-center justify-center -translate-1/2 -z-1 top-[calc(50%-var(--t,0px)+var(--b,0px))] size-4 font-mono font-medium text-xs bg-fd-muted text-fd-muted-foreground rounded-full leading-none group-first:[--t:--spacing(0.75)] group-last:[--b:--spacing(0.75)]",style:{insetInlineStart:o},children:e._step}),e.title]})}const z=new WeakMap;function Pe(){const{root:e}=G(),s=z.get(e);if(s)return s;const t=[];function n(o){if(o.type==="folder"){o.index&&n(o.index);for(const i of o.children)n(i)}else o.type==="page"&&!o.external&&t.push(o)}for(const o of e.children)n(o);return z.set(e,t),t}const R=new Map;function Be({markdownUrl:e,...s}){const[t,n]=l.useState(!1),[o,i]=ee(async()=>{const a=R.get(e);if(a)return navigator.clipboard.writeText(await a);n(!0);try{const c=fetch(e).then(d=>d.text());R.set(e,c),await navigator.clipboard.write([new ClipboardItem({"text/plain":c})])}finally{n(!1)}});return r.jsxs("button",{disabled:t,onClick:i,...s,className:v(E({color:"secondary",size:"sm",className:"gap-2 [&_svg]:size-3.5 [&_svg]:text-fd-muted-foreground"}),s.className),children:[o?r.jsx(Y,{}):r.jsx(se,{}),s.children??"Copy Markdown"]})}function He({markdownUrl:e,githubUrl:s,...t}){const n=te(),o=l.useMemo(()=>{const i=`Read ${typeof window>"u"?n:new URL(n,window.location.origin)}, I want to ask questions about it.`;return[s&&{title:"Open in GitHub",href:s,icon:r.jsxs("svg",{fill:"currentColor",role:"img",viewBox:"0 0 24 24",children:[r.jsx("title",{children:"GitHub"}),r.jsx("path",{d:"M12 .297c-6.63 0-12 5.373-12 12 0 5.303 3.438 9.8 8.205 11.385.6.113.82-.258.82-.577 0-.285-.01-1.04-.015-2.04-3.338.724-4.042-1.61-4.042-1.61C4.422 18.07 3.633 17.7 3.633 17.7c-1.087-.744.084-.729.084-.729 1.205.084 1.838 1.236 1.838 1.236 1.07 1.835 2.809 1.305 3.495.998.108-.776.417-1.305.76-1.605-2.665-.3-5.466-1.332-5.466-5.93 0-1.31.465-2.38 1.235-3.22-.135-.303-.54-1.523.105-3.176 0 0 1.005-.322 3.3 1.23.96-.267 1.98-.399 3-.405 1.02.006 2.04.138 3 .405 2.28-1.552 3.285-1.23 3.285-1.23.645 1.653.24 2.873.12 3.176.765.84 1.23 1.91 1.23 3.22 0 4.61-2.805 5.625-5.475 5.92.42.36.81 1.096.81 2.22 0 1.606-.015 2.896-.015 3.286 0 .315.21.69.825.57C20.565 22.092 24 17.592 24 12.297c0-6.627-5.373-12-12-12"})]})},e&&{title:"View as Markdown",href:e,icon:r.jsx(ae,{})},{title:"Open in Scira AI",href:`https://scira.ai/?${new URLSearchParams({q:i})}`,icon:r.jsxs("svg",{width:"910",height:"934",viewBox:"0 0 910 934",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[r.jsx("title",{children:"Scira AI"}),r.jsx("path",{d:"M647.664 197.775C569.13 189.049 525.5 145.419 516.774 66.8849C508.048 145.419 464.418 189.049 385.884 197.775C464.418 206.501 508.048 250.131 516.774 328.665C525.5 250.131 569.13 206.501 647.664 197.775Z",fill:"currentColor",stroke:"currentColor",strokeWidth:"8",strokeLinejoin:"round"}),r.jsx("path",{d:"M516.774 304.217C510.299 275.491 498.208 252.087 480.335 234.214C462.462 216.341 439.058 204.251 410.333 197.775C439.059 191.3 462.462 179.209 480.335 161.336C498.208 143.463 510.299 120.06 516.774 91.334C523.25 120.059 535.34 143.463 553.213 161.336C571.086 179.209 594.49 191.3 623.216 197.775C594.49 204.251 571.086 216.341 553.213 234.214C535.34 252.087 523.25 275.491 516.774 304.217Z",fill:"currentColor",stroke:"currentColor",strokeWidth:"8",strokeLinejoin:"round"}),r.jsx("path",{d:"M857.5 508.116C763.259 497.644 710.903 445.288 700.432 351.047C689.961 445.288 637.605 497.644 543.364 508.116C637.605 518.587 689.961 570.943 700.432 665.184C710.903 570.943 763.259 518.587 857.5 508.116Z",stroke:"currentColor",strokeWidth:"20",strokeLinejoin:"round"}),r.jsx("path",{d:"M700.432 615.957C691.848 589.05 678.575 566.357 660.383 548.165C642.191 529.973 619.499 516.7 592.593 508.116C619.499 499.533 642.191 486.258 660.383 468.066C678.575 449.874 691.848 427.181 700.432 400.274C709.015 427.181 722.289 449.874 740.481 468.066C758.673 486.258 781.365 499.533 808.271 508.116C781.365 516.7 758.673 529.973 740.481 548.165C722.289 566.357 709.015 589.05 700.432 615.957Z",stroke:"currentColor",strokeWidth:"20",strokeLinejoin:"round"}),r.jsx("path",{d:"M889.949 121.237C831.049 114.692 798.326 81.9698 791.782 23.0692C785.237 81.9698 752.515 114.692 693.614 121.237C752.515 127.781 785.237 160.504 791.782 219.404C798.326 160.504 831.049 127.781 889.949 121.237Z",fill:"currentColor",stroke:"currentColor",strokeWidth:"8",strokeLinejoin:"round"}),r.jsx("path",{d:"M791.782 196.795C786.697 176.937 777.869 160.567 765.16 147.858C752.452 135.15 736.082 126.322 716.226 121.237C736.082 116.152 752.452 107.324 765.16 94.6152C777.869 81.9065 786.697 65.5368 791.782 45.6797C796.867 65.5367 805.695 81.9066 818.403 94.6152C831.112 107.324 847.481 116.152 867.338 121.237C847.481 126.322 831.112 135.15 818.403 147.858C805.694 160.567 796.867 176.937 791.782 196.795Z",fill:"currentColor",stroke:"currentColor",strokeWidth:"8",strokeLinejoin:"round"}),r.jsx("path",{d:"M760.632 764.337C720.719 814.616 669.835 855.1 611.872 882.692C553.91 910.285 490.404 924.255 426.213 923.533C362.022 922.812 298.846 907.419 241.518 878.531C184.19 849.643 134.228 808.026 95.4548 756.863C56.6815 705.7 30.1238 646.346 17.8129 583.343C5.50207 520.339 7.76433 455.354 24.4266 393.359C41.089 331.364 71.7099 274.001 113.947 225.658C156.184 177.315 208.919 139.273 268.117 114.442",stroke:"currentColor",strokeWidth:"30",strokeLinecap:"round",strokeLinejoin:"round"})]})},{title:"Open in ChatGPT",href:`https://chatgpt.com/?${new URLSearchParams({hints:"search",q:i})}`,icon:r.jsxs("svg",{role:"img",viewBox:"0 0 24 24",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:[r.jsx("title",{children:"OpenAI"}),r.jsx("path",{d:"M22.2819 9.8211a5.9847 5.9847 0 0 0-.5157-4.9108 6.0462 6.0462 0 0 0-6.5098-2.9A6.0651 6.0651 0 0 0 4.9807 4.1818a5.9847 5.9847 0 0 0-3.9977 2.9 6.0462 6.0462 0 0 0 .7427 7.0966 5.98 5.98 0 0 0 .511 4.9107 6.051 6.051 0 0 0 6.5146 2.9001A5.9847 5.9847 0 0 0 13.2599 24a6.0557 6.0557 0 0 0 5.7718-4.2058 5.9894 5.9894 0 0 0 3.9977-2.9001 6.0557 6.0557 0 0 0-.7475-7.0729zm-9.022 12.6081a4.4755 4.4755 0 0 1-2.8764-1.0408l.1419-.0804 4.7783-2.7582a.7948.7948 0 0 0 .3927-.6813v-6.7369l2.02 1.1686a.071.071 0 0 1 .038.052v5.5826a4.504 4.504 0 0 1-4.4945 4.4944zm-9.6607-4.1254a4.4708 4.4708 0 0 1-.5346-3.0137l.142.0852 4.783 2.7582a.7712.7712 0 0 0 .7806 0l5.8428-3.3685v2.3324a.0804.0804 0 0 1-.0332.0615L9.74 19.9502a4.4992 4.4992 0 0 1-6.1408-1.6464zM2.3408 7.8956a4.485 4.485 0 0 1 2.3655-1.9728V11.6a.7664.7664 0 0 0 .3879.6765l5.8144 3.3543-2.0201 1.1685a.0757.0757 0 0 1-.071 0l-4.8303-2.7865A4.504 4.504 0 0 1 2.3408 7.872zm16.5963 3.8558L13.1038 8.364 15.1192 7.2a.0757.0757 0 0 1 .071 0l4.8303 2.7913a4.4944 4.4944 0 0 1-.6765 8.1042v-5.6772a.79.79 0 0 0-.407-.667zm2.0107-3.0231l-.142-.0852-4.7735-2.7818a.7759.7759 0 0 0-.7854 0L9.409 9.2297V6.8974a.0662.0662 0 0 1 .0284-.0615l4.8303-2.7866a4.4992 4.4992 0 0 1 6.6802 4.66zM8.3065 12.863l-2.02-1.1638a.0804.0804 0 0 1-.038-.0567V6.0742a4.4992 4.4992 0 0 1 7.3757-3.4537l-.142.0805L8.704 5.459a.7948.7948 0 0 0-.3927.6813zm1.0976-2.3654l2.602-1.4998 2.6069 1.4998v2.9994l-2.5974 1.4997-2.6067-1.4997Z"})]})},{title:"Open in Claude",href:`https://claude.ai/new?${new URLSearchParams({q:i})}`,icon:r.jsxs("svg",{fill:"currentColor",role:"img",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:[r.jsx("title",{children:"Anthropic"}),r.jsx("path",{d:"M17.3041 3.541h-3.6718l6.696 16.918H24Zm-10.6082 0L0 20.459h3.7442l1.3693-3.5527h7.0052l1.3693 3.5528h3.7442L10.5363 3.5409Zm-.3712 10.2232 2.2914-5.9456 2.2914 5.9456Z"})]})},{title:"Open in Cursor",icon:r.jsxs("svg",{fill:"currentColor",role:"img",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:[r.jsx("title",{children:"Cursor"}),r.jsx("path",{d:"M11.503.131 1.891 5.678a.84.84 0 0 0-.42.726v11.188c0 .3.162.575.42.724l9.609 5.55a1 1 0 0 0 .998 0l9.61-5.55a.84.84 0 0 0 .42-.724V6.404a.84.84 0 0 0-.42-.726L12.497.131a1.01 1.01 0 0 0-.996 0M2.657 6.338h18.55c.263 0 .43.287.297.515L12.23 22.918c-.062.107-.229.064-.229-.06V12.335a.59.59 0 0 0-.295-.51l-9.11-5.257c-.109-.063-.064-.23.061-.23"})]}),href:`https://cursor.com/link/prompt?${new URLSearchParams({text:i})}`}].filter(a=>!!a)},[s,e,n]);return r.jsxs(U,{children:[r.jsxs(X,{...t,className:v(E({color:"secondary",size:"sm"}),"gap-2 data-[state=open]:bg-fd-accent data-[state=open]:text-fd-accent-foreground",t.className),children:[t.children??"Open",r.jsx(J,{className:"size-3.5 text-fd-muted-foreground"})]}),r.jsx(K,{className:"flex flex-col",children:o.map(i=>r.jsxs("a",{href:i.href,rel:"noreferrer noopener",target:"_blank",className:"text-sm p-2 rounded-lg inline-flex items-center gap-2 hover:text-fd-accent-foreground hover:bg-fd-accent [&_svg]:size-4",children:[i.icon,i.title,r.jsx(Q,{className:"text-fd-muted-foreground size-3.5 ms-auto"})]},i.href))})]})}export{_e as C,Be as M,Se as S,xe as T,He as V,ae as a,pe as b,Ee as c,Re as d,me as e,Pe as f,ze as t,A as u};
|