1(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,353266,e=>{"use strict";var t=e.i(974030),r=e.i(563199),n=e.i(214072),a=e.i(271645),s=e.i(843476),o=e.i(647873),l=e.i(625877),i=e.i(557886);function c({includeRoot:e,includeSeparator:r,includePage:d,...u}){let p=(0,n.useTreePath)(),{root:f}=(0,n.useTreeContext)(),h=(0,a.useMemo)(()=>(0,i.getBreadcrumbItemsFromPath)(f,p,{includePage:d,includeSeparator:r,includeRoot:e}),[d,e,r,p,f]);return 0===h.length?null:(0,s.jsx)("div",{...u,className:(0,t.cn)("flex items-center gap-1.5 text-sm text-fd-muted-foreground",u.className),children:h.map((e,r)=>{let n=(0,t.cn)("truncate",r===h.length-1&&"text-fd-primary font-medium");return(0,s.jsxs)(a.Fragment,{children:[0!==r&&(0,s.jsx)(l.ChevronRight,{className:"size-3.5 shrink-0"}),e.url?(0,s.jsx)(o.default,{href:e.url,className:(0,t.cn)(n,"transition-opacity hover:opacity-80"),children:e.name}):(0,s.jsx)("span",{className:n,children:e.name})]},r)})})}var d=e.i(730942),u=e.i(309864),p=e.i(713548),f=e.i(14804),h=e.i(145586),m=e.i(191909);let x=(0,a.createContext)(null),g=(0,a.createContext)(null);function v({ref:e,onActiveChange:t=()=>null,...r}){let n=r.href?C(r.href):null,o=(0,a.use)(g),l=(0,a.useRef)(null),i=j(),[c,d]=(0,a.useState)(()=>i.items.some(e=>e.id===n&&e.active));function u(e,t=!1){let r,a=l.current,s=o?.current;if(n&&a&&s){for(let t of e)t.active&&(!r||r.t<t.t)&&(r=t);r?.id===n&&(0,m.default)(a,{behavior:t?"instant":"smooth",block:"center",inline:"center",scrollMode:"always",boundary:s})}}return b(e=>{let r=n?e.find(e=>e.id===n):null;r&&r.active!==c&&(d(r.active),t(r.active),u(e))}),(0,a.useEffect)(()=>{u(i.items,!0)},[i]),(0,s.jsx)("a",{ref:function(...e){return t=>{e.forEach(e=>{"function"==typeof e?e(t):null!=e&&(e.current=t)})}}(l,e),"data-active":c,...r})}function j(){let e=(0,a.use)(x);if(!e)throw Error("Component must be used under the <AnchorProvider /> component.");return e}function y(){let e=j();return(0,a.useMemo)(()=>({get:()=>e.items,listen:e.listen.bind(e),unlisten:e.unlisten.bind(e)}),[e])}function b(e){let t=j(),r=(0,a.useEffectEvent)(e);(0,a.useEffect)(()=>(t.listen(r),()=>t.unlisten(r)),[t])}function w(e,t=h.t){let r=j(),[n,s]=(0,a.useState)(()=>e(r.items));return b(r=>{let a=e(r);t(n,a)||s(a)}),n}function C(e){return e.startsWith("#")?e.slice(1):null}var k=class{constructor(){this.items=[],this.single=!1,this.observer=null,this.listeners=new Set}listen(e){this.listeners.add(e)}unlisten(e){this.listeners.delete(e)}setItems(e){let t=this.observer;if(t)for(let e of this.items){let r=document.getElementById(e.id);r&&t.unobserve(r)}let r=[];for(let t of e){let e=C(t.url);e&&r.push({id:e,active:!1,fallback:!1,t:0,original:t})}this.update(r),this.observeItems()}watch(e){this.observer||(this.observer=new IntersectionObserver(this.callback.bind(this),e),this.observeItems())}unwatch(){this.observer?.disconnect(),this.observer=null}callback(e){if(0===e.length)return;let t=!1,r=this.items.map(r=>{let n=e.find(e=>e.target.id===r.id),a=n?n.isIntersecting:r.active&&!r.fallback;return this.single&&t&&(a=!1),r.active!==a&&(r={...r,t:Date.now(),active:a,fallback:!1}),a&&(t=!0),r});if(!t&&e[0].rootBounds){let t=e[0].rootBounds.top,n=Number.MAX_VALUE,a=-1;for(let e=0;e<r.length;e++){let s=document.getElementById(r[e].id);if(!s)continue;let o=Math.abs(t-s.getBoundingClientRect().top);o<n&&(a=e,n=o)}-1!==a&&(r[a]={...r[a],active:!0,fallback:!0,t:Date.now()})}this.update(r)}observeItems(){if(this.observer)for(let e of this.items){let t=document.getElementById(e.id);t&&this.observer.observe(t)}}update(e){for(let t of(this.items=e,this.listeners))t(e)}};e.s(["AnchorProvider",0,function({toc:e,single:t=!1,children:r}){let n=(0,a.useMemo)(()=>new k,[]);return n.single=t,(0,a.useEffect)(()=>{n.setItems(e)},[n,e]),(0,a.useEffect)(()=>(n.watch({threshold:.9}),()=>n.unwatch()),[n]),(0,s.jsx)(x,{value:n,children:r})},"ScrollProvider",0,function({containerRef:e,children:t}){return(0,s.jsx)(g,{value:e,children:t})},"TOCItem",0,v,"useActiveAnchor",0,function(){return w(e=>{let t;for(let r of e)r.active&&(!t||r.t>t.t)&&(t=r);return t?.id})},"useActiveAnchors",0,function(){return w(e=>{let t=[];
1for(let r of e)r.active&&t.push(r.id);return t})},"useItems",0,function(){return w(e=>e)},"useTOC",0,y,"useTOCListener",0,b,"useTOCSelector",0,w],64588);var N=e.i(64588);let $=(0,a.createContext)([]);function S(){return(0,a.use)($)}let{useActiveAnchor:L,useActiveAnchors:T,useItems:P}=N;function _({toc:e,children:t,...r}){return(0,s.jsx)($,{value:e,children:(0,s.jsx)(N.AnchorProvider,{toc:e,...r,children:t})})}function I({ref:e,className:r,...n}){let o=(0,a.useRef)(null);return(0,s.jsx)("div",{ref:(0,f.mergeRefs)(o,e),className:(0,t.cn)("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",r),...n,children:(0,s.jsx)(N.ScrollProvider,{containerRef:o,children:n.children})})}var R=(0,d.__exportAll)({TOCEmpty:()=>A,TOCItem:()=>D,TOCItems:()=>O});function O({ref:e,className:r,...n}){let o=(0,a.useRef)(null),l=S(),[i,c]=(0,a.useState)(null),d=(0,a.useCallback)(()=>{let e=o.current;if(!e)return;if(0===l.length)return void c(null);let t=[];for(let r of l){let n=e.querySelector(`a[href="${r.url}"]`);if(!n)continue;let a=getComputedStyle(n);t.push([n.offsetTop+parseFloat(a.paddingTop),n.offsetTop+n.clientHeight-parseFloat(a.paddingBottom)])}c({positions:t})},[l]);return(0,a.useEffect)(()=>{let e=o.current;if(!e)return;let t=new ResizeObserver(d);return t.observe(e),d(),()=>{t.disconnect()}},[d]),(0,s.jsxs)("div",{className:"relative",children:[i&&(0,s.jsx)(M,{computed:i}),(0,s.jsx)("div",{ref:(0,f.mergeRefs)(e,o),className:(0,t.cn)("flex flex-col border-s border-fd-foreground/10",r),...n})]})}function M({computed:e}){let t=(0,a.useRef)(null),r=y();function n(t){let r={},n=t.findIndex(e=>e.active);if(-1===n)return r;let a=t.findLastIndex(e=>e.active);return r["--track-top"]=`${e.positions[n][0]}px`,r["--track-bottom"]=`${e.positions[a][1]}px`,r}return b(e=>{let r=t.current;if(r)for(let[t,a]of Object.entries(n(e)))r.style.setProperty(t,a)}),(0,s.jsx)("div",{ref:t,className:"absolute inset-y-0 inset-s-0 bg-fd-primary w-px transition-[clip-path]",style:{clipPath:"polygon(0 var(--track-top,0), 100% var(--track-top,0), 100% var(--track-bottom,0), 0 var(--track-bottom,0))",...n(r.get())}})}function A(){let{text:e}=(0,u.useI18n)();return(0,s.jsx)("div",{className:"rounded-lg border bg-fd-card p-3 text-xs text-fd-muted-foreground",children:e.tocNoHeadings})}function D({item:e,...r}){return(0,s.jsx)(v,{href:e.url,...r,className:(0,t.cn)("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",3===e.depth&&"ps-6",e.depth>=4&&"ps-8",r.className),children:e.title})}var E=(0,d.__exportAll)({TOCEmpty:()=>F,TOCItem:()=>H,TOCItems:()=>z});function z({ref:e,className:r,thumbBox:n=!0,children:o,...l}){let i=(0,a.useRef)(null),c=S(),[d,u]=(0,a.useState)(null),p=(0,a.useCallback)(()=>{let e=i.current;if(!e||0===e.clientHeight)return;if(0===c.length)return void u(null);let t=0,r=0,a="",o=[],l=[];for(let n=0;n<c.length;n++){let i=c[n],d=e.querySelector(`a[href="${i.url}"]`);if(!d)continue;let u=getComputedStyle(d),p=B(i.depth)+.5,f=d.offsetTop+parseFloat(u.paddingTop),h=d.offsetTop+d.clientHeight-parseFloat(u.paddingBottom);if(t=Math.max(p+8,t),r=Math.max(r,h),0===n)a+=` M${p} ${f} L${p} ${h}`;else{let[,e,t]=n>0?o[n-1]:[0,0,0];a+=` C ${t} ${f-4} ${p} ${e+4} ${p} ${f} L${p} ${h}`}void 0!==i._step&&l.push((0,s.jsxs)("g",{transform:`translate(${p}, ${(f+h)/2})`,children:[(0,s.jsx)("circle",{cx:"0",cy:"0",r:"8",className:"fill-fd-primary"}),(0,s.jsx)("text",{cx:"0",cy:"0",textAnchor:"middle",alignmentBaseline:"central",dominantBaseline:"middle",className:"fill-fd-primary-foreground font-medium text-xs leading-none font-mono rtl:-scale-x-100",children:i._step})]},n)),o.push([f,h,p])}l.unshift((0,s.jsx)("path",{d:a,className:"stroke-fd-primary",strokeWidth:"1",fill:"none"},"path"));let d=[];if(n){let e=document.createElementNS("http://www.w3.org/2000/svg","path");e.setAttribute("d",a);let t=e.getTotalLength();for(let r=0;r<o.length;r++){let[n,a]=o[r],s=r>0?d[r-1][1]+(n-o[r-1][1]):n;for(;s<t&&e.getPointAtLength(s).y<n;)s++;d.push([s,s+a-n])}}u({content:l,width:t,height:r,d:a,itemLineLengths:d,positions:o})},[c,n]);return(0,a.useEffect)(()=>{let e=i.current;if(!e)return;let t=new ResizeObserver(p);return t.observe(e),p(),()=>{t.unobserve(e)}},[p]),(0,s.jsxs)("div",{ref:(0,f.mergeRefs)(i,e),className:(0,t.cn)("relative flex flex-col",r),...l,children:[d&&(0,s.jsx)(U,{computed:d,thumbBox:n}),o]})}function F(){let{text:e}=(0,u.useI18n)();return(0,s.jsx)("div",{className:"rounded-lg border bg-fd-card p-3 text-xs text-fd-muted-foreground",children:e.tocNoHeadings})}function U({computed:e,thumbBox:t}){let r=(0,a.useRef)(null),n=(0,a.useRef)(null),o=y();function l(r){let a={},s=r.findIndex(e=>e.active);if(-1===s)return a;let o=r.findLastIndex(e=>e.active);if(a["--track-top"]=`${e.positions[s][0]}px`,a["--track-bottom"]=`${e.positions[o][1]}px`,t){let t=!1;if(n.current){let e=n.current;t=e.startIdx>s||e.endIdx>
1o||e.startIdx===s&&e.endIdx===o&&e.isUp}n.current={startIdx:s,endIdx:o,isUp:t},a["--offset-distance"]=t?`${e.itemLineLengths[s][0]}px`:`${e.itemLineLengths[o][1]}px`,a["--opacity"]=void 0!==r[t?s:o].original._step?"0":"1"}return a}return b(e=>{let t=r.current;if(t)for(let[r,n]of Object.entries(l(e)))t.style.setProperty(r,n)}),(0,s.jsxs)("div",{ref:r,className:"absolute top-0 inset-s-0 origin-center rtl:-scale-x-100",style:{width:e.width,height:e.height,...l(o.get())},children:[(0,s.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:`0 0 ${e.width} ${e.height}`,className:"absolute transition-[clip-path]",style:{width:e.width,height:e.height,clipPath:"polygon(0 var(--track-top,0), 100% var(--track-top,0), 100% var(--track-bottom,0), 0 var(--track-bottom,0))"},children:e.content}),t&&(0,s.jsx)("div",{className:"absolute left-0 size-1 bg-fd-primary rounded-full [offset-distance:var(--offset-distance,0)] opacity-(--opacity,0) transition-[opacity,offset-distance]",style:{offsetPath:`path("${e.d}")`}})]})}function B(e){return e<=2?8:3===e?16:24}function H({item:e,...r}){var n;let o=S(),{isFirst:l,isLast:i,svg:c}=(0,a.useMemo)(()=>
1{let r=o.indexOf(e),n=0===r,a=r===o.length-1,l=B(e.depth),i=n?l:B(o[r-1].depth),c=a?l:B(o[r+1].depth);return{isFirst:n,isLast:a,svg:(0,s.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",className:(0,t.cn)("absolute -top-1.5 inset-s-0 bottom-0 h-[calc(100%+--spacing(1.5))] -z-1 rtl:-scale-x-100",l!==c&&"h-full bottom-1.5"),style:{width:Math.max(i,l)+9},children:[i!==l&&(0,s.jsx)("path",{d:`M ${i+.5} 0 C ${i+.5} 8 ${l+.5} 4 ${l+.5} 12`,stroke:"black",strokeWidth:"1",fill:"none",className:"stroke-fd-foreground/10"}),(0,s.jsx)("line",{x1:l+.5,y1:i===l?"6":"12",x2:l+.5,y2:"100%",strokeWidth:"1",className:"stroke-fd-foreground/10"}),void 0!==e._step&&(0,s.jsxs)("g",{transform:`translate(${l+.5}, ${l===c?"3":"6"})`,children:[(0,s.jsx)("circle",{cx:"0",cy:"50%",r:"8",className:"fill-fd-muted"}),(0,s.jsx)("text",{x:"0",y:"50%",textAnchor:"middle",alignmentBaseline:"central",dominantBaseline:"middle",className:"fill-fd-muted-foreground font-medium text-xs leading-none font-mono rtl:-scale-x-100",children:e._step})]})]})}},[o,e]);return(0,s.jsxs)(v,{href:e.url,...r,className:(0,t.cn)("prose relative py-1.5 text-sm scroll-m-4 text-fd-muted-foreground hover:text-fd-accent-foreground transition-colors wrap-anywhere data-[active=true]:text-fd-primary",l&&"pt-0",i&&"pb-0",r.className),style:{paddingInlineStart:(n=e.depth)<=2?20:3===n?32:44,...r.style},children:[c,e.title]})}var V=e.i(451988);e.i(922943);var q=e.i(246872),W=e.i(155034);let G=(0,W.default)("text-align-start",[["path",{d:"M21 5H3",key:"1fi0y6"}],["path",{d:"M15 12H3",key:"6jk70r"}],["path",{d:"M17 19H3",key:"z6ezky"}]]);function Z(e){return(0,s.jsx)(_,{...e})}function J({container:e,header:r,footer:n,style:a="normal",list:o}){let l=S(),{TOCItems:i,TOCEmpty:c,TOCItem:d}="clerk"===a?E:R;return(0,s.jsxs)("div",{id:"nd-toc",...e,className:(0,t.cn)("sticky top-(--fd-docs-row-1) h-[calc(var(--fd-docs-height)-var(--fd-docs-row-1))] flex flex-col [grid-area:toc] w-(--fd-toc-width) pt-12 pe-4 pb-2 xl:layout:[--fd-toc-width:268px] max-xl:hidden",e?.className),children:[r,(0,s.jsxs)("h3",{id:"toc-title",className:"inline-flex items-center gap-1.5 text-sm text-fd-muted-foreground",children:[(0,s.jsx)(G,{className:"size-4"}),(0,s.jsx)(u.I18nLabel,{label:"toc"})]}),(0,s.jsx)(I,{children:(0,s.jsxs)(i,{...o,children:[0===l.length&&(0,s.jsx)(c,{}),l.map(e=>(0,s.jsx)(d,{item:e},e.url))]})}),n]})}let K=(0,a.createContext)(null);function Q({container:e,trigger:n,content:o,header:l,footer:i,style:c="normal",list:d}){let u=S(),p=(0,a.useRef)(null),[f,h]=(0,a.useState)(!1),{isNavTransparent:m}=(0,r.useDocsLayout)(),{TOCItems:x,TOCItem:g,TOCEmpty:v}="clerk"===c?E:R,j=(0,a.useEffectEvent)(e=>{f&&e.target instanceof HTMLElement&&p.current&&!p.current.contains(e.target)&&h(!1)}),y=()=>{h(!1)};return(0,a.useEffect)(()=>(window.addEventListener("click",j),()=>{window.removeEventListener("click",j)}),[]),(0,s.jsx)(K,{value:(0,a.useMemo)(()=>({open:f,setOpen:h}),[h,f]),children:(0,s.jsx)(V.Collapsible,{open:f,onOpenChange:h,"data-toc-popover":"",...e,className:(0,t.cn)("sticky top-(--fd-docs-row-2) z-10 [grid-area:toc-popover] h-(--fd-toc-popover-height) xl:hidden max-xl:layout:[--fd-toc-popover-height:--spacing(10)]",e?.className),children:(0,s.jsxs)("header",{ref:p,className:(0,t.cn)("border-b backdrop-blur-sm transition-colors",(!m||f)&&"bg-fd-background/80",f&&"shadow-lg"),children:[(0,s.jsx)(X,{...n}),(0,s.jsxs)(ee,{...o,children:[l,(0,s.jsx)(I,{children:(0,s.jsxs)(x,{...d,children:[0===u.length&&(0,s.jsx)(v,{}),u.map(e=>(0,s.jsx)(g,{item:e,onClick:y},e.url))]})}),i]})]})})})}function X({className:e,...r}){let{text:o}=(0,u.useI18n)(),{open:l}=(0,a.use)(K),i=P(),c=i.findIndex(e=>e.active),d=(0,n.useTreePath)().at(-1),p=-1!==c&&!l;return(0,s.jsxs)(V.CollapsibleTrigger,{className:(0,t.cn)("flex w-full h-10 items-center text-sm text-fd-muted-foreground gap-2.5 px-4 py-2.5 text-start focus-visible:outline-none [&_svg]:size-4 md:px-6",e),"data-toc-popover-trigger":"",...r,children:[(0,s.jsx)(Y,{value:(i.findLastIndex(e=>e.active)+1)/Math.max(1,i.length),max:1,className:(0,t.cn)("shrink-0",l&&"text-fd-primary")}),(0,s.jsxs)("span",{className:"grid flex-1 *:my-auto *:row-start-1 *:col-start-1",children:[(0,s.jsx)("span",{className:(0,t.cn)("truncate transition-[opacity,translate,color]",l&&"text-fd-foreground",p&&"opacity-0 -translate-y-full pointer-events-none"),children:d?.name??o.toc}),(0,s.jsx)("span",{className:(0,t.cn)("truncate transition-[opacity,translate]",!p&&"opacity-0 translate-y-full pointer-events-none"),children:i[c]?.original.title})]}),(0,s.jsx)(q.ChevronDown,{className:(0,t.cn)("shrink-0 transition-transform mx-0.5",l&&"rotate-180")}
1)]})}function Y({value:e,strokeWidth:t=1.5,size:r=18,min:n=0,max:a=100,style:o,...l}){let i=e<n?n:e>a?a:e,c=r/2-t,d=2*Math.PI*c,u=i/a*d,p={cx:r/2,cy:r/2,r:c,fill:"none",strokeWidth:t};return(0,s.jsxs)("svg",{role:"progressbar",viewBox:`0 0 ${r} ${r}`,"aria-valuenow":i,"aria-valuemin":n,"aria-valuemax":a,style:{width:r,height:r,...o},...l,children:[(0,s.jsx)("circle",{...p,className:"stroke-current/25"}),(0,s.jsx)("circle",{...p,stroke:"currentColor",strokeDasharray:d,strokeDashoffset:d-u,strokeLinecap:"round",transform:`rotate(-90 ${r/2} ${r/2})`,className:"transition-all"})]})}function ee(e){return(0,s.jsx)(V.CollapsibleContent,{"data-toc-popover-content":"",...e,children:(0,s.jsx)("div",{className:"flex flex-col px-4 max-h-[50vh] md:px-6",children:e.children})})}var et=e.i(600074);let er=new WeakMap;function en(){let{root:e}=(0,n.useTreeContext)(),t=er.get(e);if(t)return t;let r=[];for(let t of e.children)!function e(t){if("folder"===t.type)for(let r of(t.index&&e(t.index),t.children))e(r);else"page"!==t.type||t.external||r.push(t)}(t);return er.set(e,r),r}var ea=e.i(224110);let es=(0,W.default)("chevron-left",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]);function eo({items:e,children:r,className:n,...o}){let l=en(),i=(0,ea.usePathname)(),{previous:c,next:d}=(0,a.useMemo)(()=>{if(e)return e;let t=l.findIndex(e=>(0,et.isActive)(e.url,i));return -1===t?{}:{previous:l[t-1],next:l[t+1]}},[l,e,i]);return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)("div",{className:(0,t.cn)("@container grid gap-4",c&&d?"grid-cols-2":"grid-cols-1",n),...o,children:[c&&(0,s.jsx)(el,{item:c,index:0}),d&&(0,s.jsx)(el,{item:d,index:1})]}),r]})}function el({item:e,index:r}){let{text:n}=(0,u.useI18n)(),a=0===r?es:l.ChevronRight;return(0,s.jsxs)(o.default,{href:e.url,className:(0,t.cn)("flex flex-col gap-2 rounded-lg border p-4 text-sm transition-colors hover:bg-fd-accent/80 hover:text-fd-accent-foreground @max-lg:col-span-full",1===r&&"text-end"),children:[(0,s.jsxs)("div",{className:(0,t.cn)("inline-flex items-center gap-1.5 font-medium",1===r&&"flex-row-reverse"),children:[(0,s.jsx)(a,{className:"-mx-1 size-4 shrink-0 rtl:rotate-180"}),(0,s.jsx)("p",{children:e.name})]}),(0,s.jsx)("p",{className:"text-fd-muted-foreground truncate",children:e.description??(0===r?n.previousPage:n.nextPage)})]})}function ei(e){let{props:{full:r}}=ey();return(0,s.jsx)("article",{id:"nd-page","data-full":r,...e,className:(0,t.cn)("flex flex-col w-full max-w-[900px] mx-auto [grid-area:main] px-4 py-6 gap-4 md:px-6 md:pt-8 xl:px-8 xl:pt-14",r&&"max-w-[1168px]",e.className),children:e.children})}var ec=e.i(737877),ed=e.i(281878),eu=e.i(709428);let ep=(0,W.default)("copy",[["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"}]]);var ef=e.i(34402),ef=ef;let eh=new Map;function em({markdownUrl:e,...r}){let[n,o]=(0,a.useState)(!1),[l,i]=(0,ec.useCopyButton)(async()=>{let t=eh.get(e);if(t)return navigator.clipboard.writeText(await t);o(!0);try{let t=fetch(e).then(e=>e.text());eh.set(e,t),await navigator.clipboard.write([new ClipboardItem({"text/plain":t})])}finally{o(!1)}});return(0,s.jsxs)("button",{disabled:n,onClick:i,...r,className:(0,t.cn)((0,p.buttonVariants)({color:"secondary",size:"sm",className:"gap-2 [&_svg]:size-3.5 [&_svg]:text-fd-muted-foreground"}),r.className),children:[l?(0,s.jsx)(eu.Check,{}):(0,s.jsx)(ep,{}),r.children??"Copy Markdown"]})}function ex({markdownUrl:e,githubUrl:r,...n}){let o=(0,ea.usePathname)(),l=(0,a.useMemo)(()=>{let t=`Read ${"u"<typeof window?o:new URL(o,window.location.origin)}, I want to ask questions about it.`;return[r&&{title:"Open in GitHub",href:r,icon:(0,s.jsxs)("svg",{fill:"currentColor",role:"img",viewBox:"0 0 24 24",children:[(0,s.jsx)("title",{children:"GitHub"}),(0,s.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:(0,s.jsx)(G,{})},{title:"Open in Scira AI",href:`https://scira.ai/?${new URLSearchParams({q:t})}`,icon:(0,s.jsxs)("svg",{width:"910",height:"934",viewBox:"0 0 910 934",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,s.jsx)("title",{children:"Scira AI"}),(0,s.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"}),(0,s.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"}),(0,s.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"}),(0,s.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"}),(0,s.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"}),(0,s.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"}),(0,s.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:t})}
1`,icon:(0,s.jsxs)("svg",{role:"img",viewBox:"0 0 24 24",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:[(0,s.jsx)("title",{children:"OpenAI"}),(0,s.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:t})}`,icon:(0,s.jsxs)("svg",{fill:"currentColor",role:"img",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:[(0,s.jsx)("title",{children:"Anthropic"}),(0,s.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:(0,s.jsxs)("svg",{fill:"currentColor",role:"img",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:[(0,s.jsx)("title",{children:"Cursor"}),(0,s.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:t})}`}].filter(e=>!!e)},[r,e,o]);return(0,s.jsxs)(ed.Popover,{children:[(0,s.jsxs)(ed.PopoverTrigger,{...n,className:(0,t.cn)((0,p.buttonVariants)({color:"secondary",size:"sm"}),"gap-2 data-[state=open]:bg-fd-accent data-[state=open]:text-fd-accent-foreground",n.className),children:[n.children??"Open",(0,s.jsx)(q.ChevronDown,{className:"size-3.5 text-fd-muted-foreground"})]}),(0,s.jsx)(ed.PopoverContent,{className:"flex flex-col",children:l.map(e=>(0,s.jsxs)("a",{href:e.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:[e.icon,e.title,(0,s.jsx)(ef.default,{className:"text-fd-muted-foreground size-3.5 ms-auto"})]},e.href))})]})}let eg=(0,W.default)("square-pen",[["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"}]]);var ev=(0,d.__exportAll)({DocsBody:()=>eC,DocsDescription:()=>ek,DocsPage:()=>eb,DocsTitle:()=>eN,EditOnGitHub:()=>ew,MarkdownCopyButton:()=>em,PageBreadcrumb:()=>c,PageFooter:()=>eo,PageLastUpdate:()=>e$,ViewOptionsPopover:()=>ex,useDocsPage:()=>ey});let ej=(0,a.createContext)(null);function ey(){let e=(0,a.use)(ej);if(!e)throw Error("Please use page components under <DocsPage /> (`fumadocs-ui/layouts/docs/page`).");return e}function eb({tableOfContent:{enabled:e,single:t,...r}={},tableOfContentPopover:{enabled:n,...a}={},breadcrumb:{enabled:o=!0,...l}={},footer:{enabled:i=!0,...d}={},full:u=!1,toc:p=[],slots:f={},children:h,...m}){e??=!!(!u&&(p.length>0||r.footer||r.header)),n??=!!(p.length>0||a.header||a.footer);let x={breadcrumb:f.breadcrumb??c,footer:f.footer??eo,toc:f.toc??{provider:Z,main:J,popover:Q},container:f.container??ei};return(0,s.jsx)(ej,{value:{props:{full:u},slots:x},children:(0,s.jsxs)(x.toc.provider,{single:t,toc:e||n?p:[],children:[n&&(a.component??(0,s.jsx)(x.toc.popover,{...a}
1)),(0,s.jsxs)(x.container,{...m,children:[o&&(l.component??(0,s.jsx)(x.breadcrumb,{...l})),h,i&&(d.component??(0,s.jsx)(x.footer,{...d}))]}),e&&(r.component??(0,s.jsx)(x.toc.main,{...r}))]})})}function ew(e){return(0,s.jsx)("a",{target:"_blank",rel:"noreferrer noopener",...e,className:(0,t.cn)((0,p.buttonVariants)({color:"secondary",size:"sm"}),"gap-1.5 not-prose",e.className),children:e.children??(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(eg,{className:"size-3.5"}),(0,s.jsx)(u.I18nLabel,{label:"editOnGithub"})]})})}function eC({children:e,className:r,...n}){return(0,s.jsx)("div",{...n,className:(0,t.cn)("prose flex-1",r),children:e})}function ek({children:e,className:r,...n}){return void 0===e?null:(0,s.jsx)("p",{...n,className:(0,t.cn)("mb-8 text-lg text-fd-muted-foreground",r),children:e})}function eN({children:e,className:r,...n}){return(0,s.jsx)("h1",{...n,className:(0,t.cn)("text-[1.75em] font-semibold",r),children:e})}function e$({date:e,...r}){let{text:n}=(0,u.useI18n)(),[o,l]=(0,a.useState)("");return(0,a.useEffect)(()=>
1{l(e.toLocaleDateString())},[e]),(0,s.jsxs)("p",{...r,className:(0,t.cn)("text-sm text-fd-muted-foreground",r.className),children:[n.lastUpdate," ",o]})}var eS=e.i(874072);e.i(187302),e.i(411150);var eL=e.i(670956),eT=e.i(183374),eP=e.i(283978);e.i(106573),e.i(382125),e.i(773483),(0,W.default)("x",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);let e_=(0,e.i(225913).cva)("relative flex flex-row items-center gap-2 rounded-lg p-2 text-start text-fd-muted-foreground wrap-anywhere [&_svg]:size-4 [&_svg]:shrink-0",{variants:{variant:{link:"transition-colors hover:bg-fd-accent/50 hover:text-fd-accent-foreground/80 hover:transition-none data-[active=true]:bg-fd-primary/10 data-[active=true]:text-fd-primary data-[active=true]:hover:transition-colors",button:"transition-colors hover:bg-fd-accent/50 hover:text-fd-accent-foreground/80 hover:transition-none"},highlight:{true:"data-[active=true]:before:content-[''] data-[active=true]:before:bg-fd-primary data-[active=true]:before:absolute data-[active=true]:before:w-px data-[active=true]:before:inset-y-2.5 data-[active=true]:before:inset-s-2.5"}}});function eI(e){return`calc(${2+3*e} * var(--spacing))`}let{useSidebar:eR}=eL.base_exports;function eO(e){return(0,s.jsx)(eL.SidebarFolder,{...e})}function eM({className:e,style:r,children:n,...a}){let o=(0,eL.useFolderDepth)();return(0,s.jsx)(eL.SidebarItem,{className:(0,t.cn)(e_({variant:"link",highlight:o>=1}),e),style:{paddingInlineStart:eI(o),...r},...a,children:n})}function eA({className:e,style:r,...n}){let{depth:a,collapsible:o}=(0,eL.useFolder)();return(0,s.jsx)(eL.SidebarFolderTrigger,{className:(0,t.cn)(e_({variant:o?"button":null}),"w-full",e),style:{paddingInlineStart:eI(a-1),...r},...n,children:n.children})}function eD({className:e,style:r,...n}){let a=(0,eL.useFolderDepth)();return(0,s.jsx)(eL.SidebarFolderLink,{className:(0,t.cn)(e_({variant:"link",highlight:a>1}),"w-full",e),style:{paddingInlineStart:eI(a-1),...r},...n,children:n.children})}function eE({className:e,children:r,...n}){return(0,s.jsx)(eL.SidebarFolderContent,{className:(0,t.cn)("relative",1===(0,eL.useFolderDepth)()&&"before:content-[''] before:absolute before:w-px before:inset-y-1 before:bg-fd-border before:inset-s-2.5",e),...n,children:(0,s.jsx)("div",{className:"flex flex-col gap-0.5 pt-0.5",children:r})})}(0,eT.createPageTreeRenderer)({SidebarFolder:eO,SidebarFolderContent:eE,SidebarFolderLink:eD,SidebarFolderTrigger:eA,SidebarItem:eM,SidebarSeparator:function({className:e,style:r,children:n,...a}){let o=(0,eL.useFolderDepth)();return(0,s.jsx)(eL.SidebarSeparator,{className:(0,t.cn)("inline-flex items-center gap-2 mb-1.5 px-2 mt-6 empty:mb-0 [&_svg]:size-4 [&_svg]:shrink-0",0===o&&"first:mt-0",e),style:{paddingInlineStart:eI(o),...r},...a,children:n})}}),(0,eP.createLinkItemRenderer)({SidebarFolder:eO,SidebarFolderContent:eE,SidebarFolderLink:eD,SidebarFolderTrigger:eA,SidebarItem:eM}),e.i(900865);let{useProvider:ez}=(0,eS.baseSlots)({useProps:()=>eU().props}),eF=(0,a.createContext)(null);function eU(){let e=(0,a.use)(eF);if(!e)throw Error("Please use <DocsPage /> (`fumadocs-ui/layouts/notebook/page`) under <DocsLayout /> (`fumadocs-ui/layouts/notebook`).");return e}function eB(e){return(0,s.jsx)(_,{...e})}function eH({container:e,header:r,footer:n,style:a="normal",list:o}){let l=S(),{TOCItems:i,TOCEmpty:c,TOCItem:d}="clerk"===a?E:R;return(0,s.jsxs)("div",{id:"nd-toc",...e,className:(0,t.cn)("sticky top-(--fd-docs-row-3) [grid-area:toc] h-[calc(var(--fd-docs-height)-var(--fd-docs-row-3))] flex flex-col w-(--fd-toc-width) pt-12 pe-4 pb-2 xl:layout:[--fd-toc-width:268px] max-xl:hidden",e?.className),children:[r,(0,s.jsxs)("h3",{id:"toc-title",className:"inline-flex items-center gap-1.5 text-sm text-fd-muted-foreground",children:[(0,s.jsx)(G,{className:"size-4"}),(0,s.jsx)(u.I18nLabel,{label:"toc"})]}),(0,s.jsx)(I,{children:(0,s.jsxs)(i,{...o,children:[0===l.length&&(0,s.jsx)(c,{}),l.map(e=>(0,s.jsx)(d,{item:e},e.url))]})}),n]})}let eV=(0,a.createContext)(null);function eq({container:e,trigger:r,content:n,header:o,footer:l,style:i="normal",list:c}){let d=S(),u=(0,a.useRef)(null),[p,f]=(0,a.useState)(!1),{isNavTransparent:h}=eU(),{TOCItems:m,TOCItem:x,TOCEmpty:g}="clerk"===i?E:R,v=(0,a.useEffectEvent)(e=>{p&&e.target instanceof HTMLElement&&u.current&&!u.current.contains(e.target)&&f(!1)}),j=()=>{f(!1)};return(0,a.useEffect)(()=>(window.addEventListener("click",v),()=>{window.removeEventListener("click",v)}),[]),(0,s.jsx)(eV,{value:(0,a.useMemo)(()=>({open:p,setOpen:f}),[f,p]),children:(0,s.jsx)(V.Collapsible,{open:p,onOpenChange:f,"data-toc-popover":"",...e,className:(0,t.cn)("sticky top-(--fd-docs-row-2) z-10 [grid-area:toc-popover] h-(--fd-toc-popover-height) xl:hidden max-xl:layout:[--fd-toc-popover-height:--spacing(10)]",e?.className),children:(0,s.jsxs)("header",{ref:u,className:(0,t.cn)("border-b backdrop-blur-sm transition-colors",(!h||p)&&"bg-fd-background/80",p&&"shadow-lg"),children:[(0,s.jsx)(eW,{...r}),(0,s.jsxs)(eZ,{...n,children:[o,(0,s.jsx)(I,{children:(0,s.jsxs)(m,{...c,children:[0===d.length&&(0,s.jsx)(g,{}),d.map(e=>(0,s.jsx)(x,{item:e,onClick:j},e.url))]})}),l]})]})})})}function eW({className:e,...r}){let{text:o}=(0,u.useI18n)(),{open:l}=(0,a.use)(eV),i=P(),c=i.findIndex(e=>e.active),d=(0,n.useTreePath)().at(-1),p=-1!==c&&!l;
1return(0,s.jsxs)(V.CollapsibleTrigger,{className:(0,t.cn)("flex w-full h-10 items-center text-sm text-fd-muted-foreground gap-2.5 px-4 py-2.5 text-start focus-visible:outline-none [&_svg]:size-4 md:px-6",e),"data-toc-popover-trigger":"",...r,children:[(0,s.jsx)(eG,{value:(i.findLastIndex(e=>e.active)+1)/Math.max(1,i.length),max:1,className:(0,t.cn)("shrink-0",l&&"text-fd-primary")}),(0,s.jsxs)("span",{className:"grid flex-1 *:my-auto *:row-start-1 *:col-start-1",children:[(0,s.jsx)("span",{className:(0,t.cn)("truncate transition-[opacity,translate,color]",l&&"text-fd-foreground",p&&"opacity-0 -translate-y-full pointer-events-none"),children:d?.name??o.toc}),(0,s.jsx)("span",{className:(0,t.cn)("truncate transition-[opacity,translate]",!p&&"opacity-0 translate-y-full pointer-events-none"),children:i[c]?.original.title})]}),(0,s.jsx)(q.ChevronDown,{className:(0,t.cn)("shrink-0 transition-transform mx-0.5",l&&"rotate-180")})]})}function eG({value:e,strokeWidth:t=1.5,size:r=18,min:n=0,max:a=100,style:o,...l}){let i=e<n?n:e>a?a:e,c=r/2-t,d=2*Math.PI*c,u=i/a*d,p={cx:r/2,cy:r/2,r:c,fill:"none",strokeWidth:t};return(0,s.jsxs)("svg",{role:"progressbar",viewBox:`0 0 ${r} ${r}`,"aria-valuenow":i,"aria-valuemin":n,"aria-valuemax":a,style:{width:r,height:r,...o},...l,children:[(0,s.jsx)("circle",{...p,className:"stroke-current/25"}),(0,s.jsx)("circle",{...p,stroke:"currentColor",strokeDasharray:d,strokeDashoffset:d-u,strokeLinecap:"round",transform:`rotate(-90 ${r/2} ${r/2})`,className:"transition-all"})]})}function eZ(e){return(0,s.jsx)(V.CollapsibleContent,{"data-toc-popover-content":"",...e,children:(0,s.jsx)("div",{className:"flex flex-col px-4 max-h-[50vh] md:px-6",children:e.children})})}function eJ({items:e,children:r,className:n,...o}){let l=en(),i=(0,ea.usePathname)(),{previous:c,next:d}=(0,a.useMemo)(()=>{if(e)return e;let t=l.findIndex(e=>(0,et.isActive)(e.url,i));return -1===t?{}:{previous:l[t-1],next:l[t+1]}},[l,e,i]);return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)("div",{className:(0,t.cn)("@container grid gap-4",c&&d?"grid-cols-2":"grid-cols-1",n),...o,children:[c&&(0,s.jsx)(eK,{item:c,index:0}),d&&(0,s.jsx)(eK,{item:d,index:1})]}),r]})}function eK({item:e,index:r}){let{text:n}=(0,u.useI18n)(),a=0===r?es:l.ChevronRight;return(0,s.jsxs)(o.default,{href:e.url,className:(0,t.cn)("flex flex-col gap-2 rounded-lg border p-4 text-sm transition-colors hover:bg-fd-accent/80 hover:text-fd-accent-foreground @max-lg:col-span-full",1===r&&"text-end"),children:[(0,s.jsxs)("div",{className:(0,t.cn)("inline-flex items-center gap-1.5 font-medium",1===r&&"flex-row-reverse"),children:[(0,s.jsx)(a,{className:"-mx-1 size-4 shrink-0 rtl:rotate-180"}),(0,s.jsx)("p",{children:e.name})]}),(0,s.jsx)("p",{className:"text-fd-muted-foreground truncate",children:e.description??(0===r?n.previousPage:n.nextPage)})]})}function eQ({includeRoot:e,includeSeparator:r,includePage:c,...d}){let u=(0,n.useTreePath)(),{root:p}=(0,n.useTreeContext)(),f=(0,a.useMemo)(()=>(0,i.getBreadcrumbItemsFromPath)(p,u,{includePage:c,includeSeparator:r,includeRoot:e}),[c,e,r,u,p]);return 0===f.length?null:(0,s.jsx)("div",{...d,className:(0,t.cn)("flex items-center gap-1.5 text-sm text-fd-muted-foreground",d.className),children:f.map((e,r)=>{let n=(0,t.cn)("truncate",r===f.length-1&&"text-fd-primary font-medium");return(0,s.jsxs)(a.Fragment,{children:[0!==r&&(0,s.jsx)(l.ChevronRight,{className:"size-3.5 shrink-0"}),e.url?(0,s.jsx)(o.default,{href:e.url,className:(0,t.cn)(n,"transition-opacity hover:opacity-80"),children:e.name}):(0,s.jsx)("span",{className:n,children:e.name})]},r)})})}function eX(e){let{props:{full:r}}=e1();return(0,s.jsx)("article",{id:"nd-page","data-full":r,...e,className:(0,t.cn)("flex flex-col [grid-area:main] px-4 py-6 gap-4 md:px-6 md:pt-8 xl:px-8 xl:pt-14 *:max-w-[900px]",r&&"*:max-w-[1285px]",e.className),children:e.children})}var eY=(0,d.__exportAll)({DocsBody:()=>e5,DocsDescription:()=>e7,DocsPage:()=>e2,DocsTitle:()=>e6,EditOnGitHub:()=>e4,MarkdownCopyButton:()=>em,PageBreadcrumb:()=>eQ,PageFooter:()=>eJ,PageLastUpdate:()=>e8,ViewOptionsPopover:()=>ex,useDocsPage:()=>e1});let e0=(0,a.createContext)(null);function e1(){let e=(0,a.use)(e0);if(!e)throw Error("Please use page components under <DocsPage /> (`fumadocs-ui/layouts/notebook/page`).");return e}function e2({tableOfContent:{enabled:e,single:t,...r}={},tableOfContentPopover:{enabled:n,...a}={},breadcrumb:{enabled:o=!0,...l}={},footer:{enabled:i=!0,...c}={},full:d=!1,toc:u=[],slots:p={},children:f,...h}){e??=!!(!d&&(u.length>0||r.footer||r.header)),n??=!!(u.length>0||a.header||a.footer);let m={breadcrumb:p.breadcrumb??eQ,footer:p.footer??eJ,toc:p.toc??{provider:eB,main:eH,popover:eq}
1,container:p.container??eX};return(0,s.jsx)(e0,{value:{props:{full:d},slots:m},children:(0,s.jsxs)(m.toc.provider,{single:t,toc:e||n?u:[],children:[n&&(a.component??(0,s.jsx)(m.toc.popover,{...a})),(0,s.jsxs)(m.container,{...h,children:[o&&(l.component??(0,s.jsx)(m.breadcrumb,{...l})),f,i&&(c.component??(0,s.jsx)(m.footer,{...c}))]}),e&&(r.component??(0,s.jsx)(m.toc.main,{...r}))]})})}function e4(e){return(0,s.jsx)("a",{target:"_blank",rel:"noreferrer noopener",...e,className:(0,t.cn)((0,p.buttonVariants)({color:"secondary",size:"sm"}),"gap-1.5 not-prose",e.className),children:e.children??(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(eg,{className:"size-3.5"}),(0,s.jsx)(u.I18nLabel,{label:"editOnGithub"})]})})}function e5({children:e,className:r,...n}){return(0,s.jsx)("div",{...n,className:(0,t.cn)("prose flex-1",r),children:e})}function e7({children:e,className:r,...n}){return void 0===e?null:(0,s.jsx)("p",{...n,className:(0,t.cn)("mb-8 text-lg text-fd-muted-foreground",r),children:e})}function e6({children:e,className:r,...n}){return(0,s.jsx)("h1",{...n,className:(0,t.cn)("text-[1.75em] font-semibold",r),children:e})}function e8({date:e,...r}){let{text:n}=(0,u.useI18n)(),[o,l]=(0,a.useState)("");return(0,a.useEffect)(()=>
1{l(e.toLocaleDateString())},[e]),(0,s.jsxs)("p",{...r,className:(0,t.cn)("text-sm text-fd-muted-foreground",r.className),children:[n.lastUpdate," ",o]})}function e3(e){return(0,s.jsx)("main",{...e,className:(0,t.cn)("w-full max-w-[1400px] mx-auto px-4 py-12",e.className),children:(0,s.jsx)("article",{className:"prose",children:e.children})})}function e9({lastUpdate:e,editOnGithub:t,children:n,...a}){let{DocsPage:o,EditOnGitHub:l,PageLastUpdate:i}=(0,r.useIsDocsLayout)()?ev:eY;return(0,s.jsxs)(o,{...a,children:[n,(0,s.jsxs)("div",{className:"flex flex-row flex-wrap items-center justify-between gap-4 empty:hidden",children:[t&&(0,s.jsx)(l,{href:`https://github.com/${t.owner}/${t.repo}/blob/${t.sha}/${t.path.startsWith("/")?t.path.slice(1):t.path}`}),e&&(0,s.jsx)(i,{date:new Date(e)})]})]})}e.s(["DocsPage",0,e9,"withArticle",0,e3],512409),e.i(512409),e.s(["DocsBody",0,eC,"DocsDescription",0,ek,"DocsPage",0,e9,"DocsTitle",0,eN,"EditOnGitHub",0,ew,"PageBreadcrumb",0,c,"PageLastUpdate",0,e$,"withArticle",0,e3],353266)},494157,e=>{"use strict";var t=e.i(974030),r=e.i(713548),n=e.i(737877),a=e.i(843476),s=e.i(155034);let o=(0,s.default)("copy-check",[["path",{d:"m12 15 2 2 4-4",key:"2c609p"}],["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"}]]),l=(0,s.default)("link",[["path",{d:"M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71",key:"1cjeqo"}],["path",{d:"M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71",key:"19qd67"}]]);e.s(["Heading",0,function({as:e,...s}){let i=e??"h1",[c,d]=(0,n.useCopyButton)(()=>{if(!s.id)return;let e=new URL(window.location.href);return e.hash=s.id,navigator.clipboard.writeText(e.href)});return s.id?(0,a.jsxs)(i,{...s,className:(0,t.cn)("group/heading flex scroll-m-28 flex-row items-center gap-1",s.className),children:[(0,a.jsx)("a",{"data-card":"",href:`#${s.id}`,children:s.children}),(0,a.jsx)("button",{"aria-label":"Copy Anchor Link",className:(0,t.cn)((0,r.buttonVariants)({variant:"ghost",size:"icon-xs"}),"not-prose shrink-0 text-fd-muted-foreground opacity-0 transition-opacity group-hover/heading:opacity-100"),onClick:d,children:c?(0,a.jsx)(o,{}):(0,a.jsx)(l,{})})]}):(0,a.jsx)(i,{...s})}],494157)},322988,e=>{"use strict";var t=e.i(843476),r=e.i(271645),n=e.i(363178);function a({chart:s}){let o=(0,r.useId)(),[l,i]=(0,r.useState)(""),c=(0,r.useRef)(null),{resolvedTheme:d}=(0,n.useTheme)();return(0,r.useEffect)(()=>{let t=!0;return async function r(){let{default:r}=await e.A(695802);r.initialize({startOnLoad:!1,securityLevel:"strict",fontFamily:"inherit",themeCSS:"margin: 1.5rem auto 0;",theme:"dark"===d?"dark":"default"});try{let{svg:e}=await r.render(o.replaceAll(":","-"),s.replaceAll("\\n","\n"),c.current??void 0);t&&i(e)}catch(e){console.error("Failed to render mermaid chart",e)}}(),()=>{t=!1}},[s,o,d]),(0,t.jsx)("div",{ref:c,role:"img",dangerouslySetInnerHTML:{__html:l}})}e.s(["EMermaid",0,a,"default",0,a])},539820,e=>{"use strict";function t(e){return" ".repeat(2*e)}class r{value;constructor(e){this.value=e}}function n(e,a=0){if(null==e)return"null";if(e instanceof r){let r=e.value.split("\n");if(r.length>1){let e=t(a+1);return r.map((t,r)=>0===r?t:`${e}${t}`).join("\n")}return e.value}if("string"==typeof e)return`'${e.replace(/\\/g,"\\\\").replace(/'/g,"\\'")}'`;if("number"==typeof e||"boolean"==typeof e)return String(e);if(Array.isArray(e)){if(0===e.length)return"[]";let r=e.map(e=>n(e,a+1)).join(",\n"+t(a+1));return`[ 2${t(a+1)}${r} 3${t(a)}]`}if("object"==typeof e){let r=Object.entries(e);if(0===r.length)return"[]";let s=r.map(([e,t])=>`'${e}' => ${n(t,a+1)}`).join(",\n"+t(a+1));return`[ 4${t(a+1)}${s} 5${t(a)}]`}return"null"}let a={target:"php",client:"curl",title:"cURL",generate(e,t){let r={method:"GET",...e};r.method=r.method.toUpperCase();let a=[],s=!1,o=r.queryString?.length?"?"+r.queryString.map(e=>`${e.name}=${e.value}`).join("&"):"",l=`${r.url}${o}`;a.push(`$ch = curl_init("${l}");`),a.push(""),"POST"===r.method?a.push("curl_setopt($ch, CURLOPT_POST, true);
5"):"GET"!==r.method&&a.push(`curl_setopt($ch, CURLOPT_CUSTOMREQUEST, '${r.method}');`),t?.auth?.username&&t?.auth?.password&&a.push(`curl_setopt($ch, CURLOPT_USERPWD, '${t.auth.username}:${t.auth.password}');`);let i=[...r.headers||[]],c=()=>i.some(e=>"content-type"===e.name.toLowerCase());if(r.postData&&("application/x-www-form-urlencoded"===r.postData.mimeType&&r.postData.params&&!c()?i.push({name:"Content-Type",value:"application/x-www-form-urlencoded"}):"application/octet-stream"!==r.postData.mimeType||c()||i.push({name:"Content-Type",value:"application/octet-stream"})),i.length){let e=i.map(e=>`'${e.name}: ${e.value}'`);a.push(`curl_setopt($ch, CURLOPT_HTTPHEADER, [${e.join(", ")}]);`);let t=i.find(e=>"accept-encoding"===e.name.toLowerCase());t&&/gzip|deflate/.test(t.value)&&a.push("curl_setopt($ch, CURLOPT_ENCODING, '');")}if(r.cookies?.length){let e=r.cookies.map(e=>{let t=encodeURIComponent(e.name),r=encodeURIComponent(e.value);return`${t}=${r}`}).join("; ");a.push(`curl_setopt($ch, CURLOPT_COOKIE, '${e}');`)}if(r.postData){if("application/json"===r.postData.mimeType){if(r.postData.text)try{let e=JSON.parse(r.postData.text),t=n(e);a.push(`curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode(${t}));`)}catch{a.push(`curl_setopt($ch, CURLOPT_POSTFIELDS, '${r.postData.text}');`)}}else if("multipart/form-data"===r.postData.mimeType&&r.postData.params)s=!0,a.push("$mime = curl_mime_init($ch);"),r.postData.params.forEach((e,t)=>{let r=`$part${t}`;a.push(`${r} = curl_mime_addpart($mime);`),a.push(`curl_mime_name(${r}, '${e.name}');`),void 0!==e.fileName?a.push(`curl_mime_filedata(${r}, '${e.fileName}');`):void 0!==e.value&&a.push(`curl_mime_data(${r}, '${e.value}');`),e.contentType&&a.push(`curl_mime_type(${r}, '${e.contentType}');`)}),a.push("curl_setopt($ch, CURLOPT_MIMEPOST, $mime);");else if("application/x-www-form-urlencoded"===r.postData.mimeType&&r.postData.params){let e=r.postData.params.map(e=>{let t=encodeURIComponent(e.name),r=e.value?encodeURIComponent(e.value):"";return`${t}=${r}`}).join("&");a.push(`curl_setopt($ch, CURLOPT_POSTFIELDS, '${e}');`)}else if("application/octet-stream"===r.postData.mimeType)a.push(`curl_setopt($ch, CURLOPT_POSTFIELDS, '${r.postData.text||""}');`);else if(r.postData.text)try{let e=JSON.parse(r.postData.text),t=n(e);a.push(`curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode(${t}));`)}catch{a.push(`curl_setopt($ch, CURLOPT_POSTFIELDS, '${r.postData.text}');`)}}return a.push(""),a.push("curl_exec($ch);"),s&&a.push("curl_mime_free($mime);"),a.push(""),a.push("curl_close($ch);"),a.join("\n").replace(/\n\n\n/g,"\n\n")}};e.s(["phpCodeSample",0,(e,t)=>{var r,n;let s,o=t.bodyMediaType&&null!=(r=t.body)&&("string"==typeof r||Array.isArray(r)?r.length>0:"object"!=typeof r||Object.keys(r).length>0)?(n=t.body,{mimeType:(s=t.bodyMediaType.split(";",1)[0].trim().toLowerCase()).endsWith("+json")?"application/json":s,text:"string"==typeof n?n:JSON.stringify(n)}):void 0,l=Object.entries(t.header).filter(([e])=>o||"content-type"!==e.toLowerCase()).map(([e,t])=>({name:e,value:t.value}));o&&!l.some(e=>"content-type"===e.name.toLowerCase())&&l.unshift({name:"Content-Type",value:t.bodyMediaType??o.mimeType});let i=a.generate({method:t.method.toUpperCase(),url:e,headers:l,cookies:Object.entries(t.cookie).map(([e,t])=>({name:e,value:t.value})),...o?{postData:o}:{}});return`<?php 6 7${function(e){let t=e.split("\n"),r="curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);",n=t.findIndex(e=>e.startsWith("curl_setopt("));if(n>=0)t.splice(n,0,r);else{let e=t.findIndex(e=>e.startsWith("$ch = curl_init("));e>=0&&t.splice(e+1,0,"",r)}let a=t.findIndex(e=>"curl_exec($ch);"===e);for(a>=0&&(t[a]="$response = curl_exec($ch);");t.length>0&&""===t[t.length-1];)t.pop();return t.push("","echo $response;"),t.join("\n")}(i)}`}],539820)},725592,e=>{"use strict";var t=e.i(974030),r=e.i(843476),n=e.i(32550),a=e.i(271645),s=e.i(30030),o=e.i(75830),l=e.i(820783),i=e.i(981140),c=e.i(369340),d=e.i(248425),u=e.i(687607),p=e.i(610772),f=e.i(586318),h="Accordion",m=["Home","End","ArrowDown","ArrowUp","ArrowLeft","ArrowRight"],[x,g,v]=(0,o.createCollection)(h),[j,y]=(0,s.createContextScope)(h,[v,u.createCollapsibleScope]),b=(0,u.createCollapsibleScope)(),w=a.default.forwardRef((e,t)=>
7{let{type:n,...a}=e;return(0,r.jsx)(x.Provider,{scope:e.__scopeAccordion,children:"multiple"===n?(0,r.jsx)(L,{...a,ref:t}):(0,r.jsx)(S,{...a,ref:t})})});w.displayName=h;var[C,k]=j(h),[N,$]=j(h,{collapsible:!1}),S=a.default.forwardRef((e,t)=>{let{value:n,defaultValue:s,onValueChange:o=()=>{},collapsible:l=!1,...i}=e,[d,u]=(0,c.useControllableState)({prop:n,defaultProp:s??"",onChange:o,caller:h});return(0,r.jsx)(C,{scope:e.__scopeAccordion,value:a.default.useMemo(()=>d?[d]:[],[d]),onItemOpen:u,onItemClose:a.default.useCallback(()=>l&&u(""),[l,u]),children:(0,r.jsx)(N,{scope:e.__scopeAccordion,collapsible:l,children:(0,r.jsx)(_,{...i,ref:t})})})}),L=a.default.forwardRef((e,t)=>{let{value:n,defaultValue:s,onValueChange:o=()=>{},...l}=e,[i,d]=(0,c.useControllableState)({prop:n,defaultProp:s??[],onChange:o,caller:h}),u=a.default.useCallback(e=>d((t=[])=>[...t,e]),[d]),p=a.default.useCallback(e=>d((t=[])=>t.filter(t=>t!==e)),[d]);return(0,r.jsx)(C,{scope:e.__scopeAccordion,value:i,onItemOpen:u,onItemClose:p,children:(0,r.jsx)(N,{scope:e.__scopeAccordion,collapsible:!0,children:(0,r.jsx)(_,{...l,ref:t})})})}),[T,P]=j(h),_=a.default.forwardRef((e,t)=>{let{__scopeAccordion:n,disabled:s,dir:o,orientation:c="vertical",...u}=e,p=a.default.useRef(null),h=(0,l.useComposedRefs)(p,t),v=g(n),j="ltr"===(0,f.useDirection)(o),y=(0,i.composeEventHandlers)(e.onKeyDown,e=>{if(!m.includes(e.key))return;let t=e.target,r=v().filter(e=>!e.ref.current?.disabled),n=r.findIndex(e=>e.ref.current===t),a=r.length;if(-1===n)return;e.preventDefault();let s=n,o=a-1,l=()=>{(s=n+1)>o&&(s=0)},i=()=>{(s=n-1)<0&&(s=o)};switch(e.key){case"Home":s=0;break;case"End":s=o;break;case"ArrowRight":"horizontal"===c&&(j?l():i());break;case"ArrowDown":"vertical"===c&&l();break;case"ArrowLeft":"horizontal"===c&&(j?i():l());break;case"ArrowUp":"vertical"===c&&i()}let d=s%a;r[d].ref.current?.focus()});return(0,r.jsx)(T,{scope:n,disabled:s,direction:o,orientation:c,children:(0,r.jsx)(x.Slot,{scope:n,children:(0,r.jsx)(d.Primitive.div,{...u,"data-orientation":c,ref:h,onKeyDown:s?void 0:y})})})}),I="AccordionItem",[R,O]=j(I),M=a.default.forwardRef((e,t)=>{let{__scopeAccordion:n,value:a,...s}=e,o=P(I,n),l=k(I,n),i=b(n),c=(0,p.useId)(),d=a&&l.value.includes(a)||!1,f=o.disabled||e.disabled;return(0,r.jsx)(R,{scope:n,open:d,disabled:f,triggerId:c,children:(0,r.jsx)(u.Root,{"data-orientation":o.orientation,"data-state":B(d),...i,...s,ref:t,disabled:f,open:d,onOpenChange:e=>{e?l.onItemOpen(a):l.onItemClose(a)}})})});M.displayName=I;var A="AccordionHeader",D=a.default.forwardRef((e,t)=>{let{__scopeAccordion:n,...a}=e,s=P(h,n),o=O(A,n);return(0,r.jsx)(d.Primitive.h3,{"data-orientation":s.orientation,"data-state":B(o.open),"data-disabled":o.disabled?"":void 0,...a,ref:t})});D.displayName=A;var E="AccordionTrigger",z=a.default.forwardRef((e,t)=>{let{__scopeAccordion:n,...a}=e,s=P(h,n),o=O(E,n),l=$(E,n),i=b(n);return(0,r.jsx)(x.ItemSlot,{scope:n,children:(0,r.jsx)(u.Trigger,{"aria-disabled":o.open&&!l.collapsible||void 0,"data-orientation":s.orientation,id:o.triggerId,...i,...a,ref:t})})});z.displayName=E;var F="AccordionContent",U=a.default.forwardRef((e,t)=>{let{__scopeAccordion:n,...a}=e,s=P(h,n),o=O(F,n),l=b(n);return(0,r.jsx)(u.Content,{role:"region","aria-labelledby":o.triggerId,"data-orientation":s.orientation,...l,...a,ref:t,style:{"--radix-accordion-content-height":"var(--radix-collapsible-content-height)","--radix-accordion-content-width":"var(--radix-collapsible-content-width)",...e.style}})});function B(e){return e?"open":"closed"}U.displayName=F,e.s(["AccordionContent",0,function(e){return(0,r.jsx)(U,{...e,className:(0,t.cn)("overflow-hidden data-[state=closed]:animate-fd-accordion-up data-[state=open]:animate-fd-accordion-down",e.className),children:e.children})},"AccordionHeader",0,function(e){return(0,r.jsx)(D,{...e,className:(0,t.cn)("not-prose flex py-2 text-fd-foreground font-medium",e.className),children:e.children})},"AccordionItem",0,function(e){return(0,r.jsx)(M,{...e,className:(0,t.cn)("scroll-m-20",e.className),children:e.children})},"AccordionTrigger",0,function(e){return(0,r.jsxs)(z,{...e,className:(0,t.cn)("flex flex-1 items-center gap-1 text-start group/accordion focus-visible:outline-none",e.className),children:[(0,r.jsx)(n.ChevronRight,{className:"size-3.5 text-fd-muted-foreground shrink-0 transition-transform group-focus-visible/accordion:text-fd-primary group-data-[state=open]/accordion:rotate-90"}),e.children]})},"Accordions",0,function(e){return(0,r.jsx)(w,{...e,className:(0,t.cn)("divide-y divide-fd-border",e.className)})}],725592)},879873,e=>{"use strict";
7var t=e.i(974030),r=e.i(785118),n=e.i(271645),a=e.i(843476);let s=(0,n.createContext)(null);e.s(["SelectTab",0,function({value:e,...t}){if(e===(0,n.use)(s)?.value)return(0,a.jsx)("div",{...t,children:t.children})},"SelectTabTrigger",0,function({items:e,className:o,...l}){let{value:i,setValue:c}=(0,n.use)(s);return(0,a.jsxs)(r.Select,{value:i??"",onValueChange:c,children:[(0,a.jsx)(r.SelectTrigger,{className:(0,t.cn)("not-prose w-fit min-w-0 *:min-w-0",o),...l,children:(0,a.jsx)(r.SelectValue,{children:i&&e.find(e=>e.value===i)?.label})}),(0,a.jsx)(r.SelectContent,{children:e.map(({label:e,value:t})=>(0,a.jsx)(r.SelectItem,{value:t,children:e},t))})]})},"SelectTabs",0,function({defaultValue:e,children:t}){let[r,o]=(0,n.useState)(e??null);return(0,a.jsx)(s,{value:(0,n.useMemo)(()=>({value:r,setValue:o}),[r]),children:t})}])},672879,e=>{"use strict";var t=e.i(585695);let r=(0,t.createShikiFactory)({async init(t){let{createHighlighter:r,createJavaScriptRegexEngine:n}=await e.A(827868);return r({langs:[],themes:[],langAlias:t?.langAlias,engine:n()})}});(0,t.createShikiFactory)({async init(t){let{createHighlighter:r,createOnigurumaEngine:n}=await e.A(827868);return r({langs:[],themes:[],langAlias:t?.langAlias,engine:n(e.A(361288))})}}),e.s(["defaultShikiFactory",0,r])},337335,e=>{"use strict";var t=e.i(354787),r=e.i(843476),n=e.i(672879);e.s(["FullProvider",0,function({children:e}){return(0,r.jsx)(t.ClientCodeBlockProvider,{factory:n.defaultShikiFactory,children:e})}])},866746,e=>{"use strict";var t=e.i(843476),r=e.i(271645);let n=(0,r.createContext)(null);e.s(["ResponseMirrorProvider",0,function({children:e}){let[a,s]=(0,r.useState)(null);return(0,t.jsx)(n.Provider,{value:{result:a,setResult:s},children:e})},"useResponseMirror",0,function(){return(0,r.useContext)(n)??{result:null,setResult:()=>{}}}])},360574,e=>{"use strict";var t=e.i(843476);e.i(305270);var r=e.i(502145),n=e.i(271645),a=e.i(973728),s=e.i(286772);function o({children:e}){let[r,a]=(0,n.useState)(!1);return(0,n.useEffect)(()=>a(!0),[]),r?(0,t.jsx)(t.Fragment,{children:e}):null}function l(e,t){return null!=e&&null!=t?`${e}â${t}`:null!=e?`⥠${e}`:null!=t?`⤠${t}`:null}function i(e){return"string"==typeof e?e:JSON.stringify(e)}function c({rawSchema:e,description:r}){let n=(0,s.useResolvedSchema)(e??!1),a=r??n?.description,o=[];if(n){n.format&&o.push(`format: ${String(n.format)}`),n.pattern&&o.push(`pattern: ${String(n.pattern)}`);let e=l(n.minimum??n.exclusiveMinimum,n.maximum??n.exclusiveMaximum);e&&o.push(`value ${e}`);let t=l(n.minLength,n.maxLength);t&&o.push(`length ${t}`);let r=l(n.minItems,n.maxItems);r&&o.push(`items ${r}`),void 0!==n.default&&o.push(`default: ${i(n.default)}`);let a=n.example??(Array.isArray(n.examples)?n.examples[0]:void 0);void 0!==a&&o.push(`example: ${i(a)}`)}return a||0!==o.length?(0,t.jsxs)("div",{className:"mt-1.5 space-y-1 text-xs text-fd-muted-foreground",children:[a?(0,t.jsx)("div",{className:"whitespace-pre-wrap",children:a}):null,o.length>0?(0,t.jsx)("div",{className:"font-mono opacity-80",children:o.join(" · ")}):null]}):null}function d({name:e,fieldName:r,field:n,isRequired:o}){let l=(0,s.useResolvedSchema)(n??s.anyFields),{readOnly:i,writeOnly:c}
7=(0,s.useSchemaScope)(),{schemaToString:u}=(0,s.useSchemaUtils)();return l&&(l.oneOf||l.anyOf||l.allOf||Array.isArray(l.type)||"object"===l.type||"array"===l.type)?(0,t.jsx)(a.FieldSet,{name:e,fieldName:r,field:n??s.anyFields,isRequired:o,collapsible:!1}):l&&(l.readOnly&&!i||l.writeOnly&&!c)?null:(0,t.jsxs)("fieldset",{className:"flex flex-row flex-wrap items-center gap-x-4 gap-y-1.5",children:[(0,t.jsxs)("label",{className:"inline-flex shrink-0 items-center gap-1.5 font-mono",children:[(0,t.jsxs)("span",{className:"text-sm font-medium text-fd-foreground",children:[e,o?(0,t.jsx)("span",{className:"ms-0.5 text-red-400/80",children:"*"}):null]}),l?(0,t.jsx)("code",{className:"text-xs text-fd-muted-foreground",children:u(l)}):null]}),(0,t.jsx)("div",{className:"ms-auto w-1/2 min-w-[10rem]",children:(0,t.jsx)(a.FieldInput,{field:l??s.anyFields,fieldName:r,isRequired:o})})]})}function u({fieldName:e,param:r}){return(0,t.jsxs)("div",{className:"border-t py-3 first:border-t-0 first:pt-0",children:[(0,t.jsx)(o,{children:(0,t.jsx)(d,{name:r.name,fieldName:e,field:r.schema??s.anyFields,isRequired:r.required})}),(0,t.jsx)(c,{rawSchema:r.schema,description:r.description})]})}function p({rawSchema:e}){let r=(0,s.useResolvedSchema)(e??!1),n=r?.type==="object"?r.properties:void 0,a=["body"];if(!n)return(0,t.jsxs)("div",{children:[(0,t.jsx)(o,{children:(0,t.jsx)(d,{fieldName:a,field:e??s.anyFields,isRequired:!0})}),(0,t.jsx)(c,{rawSchema:e})]});let l=r?.required??[];return(0,t.jsx)("div",{className:"flex flex-col",children:Object.entries(n).map(([e,r])=>(0,t.jsxs)("div",{className:"border-t py-3 first:border-t-0 first:pt-0",children:[(0,t.jsx)(o,{children:(0,t.jsx)(d,{name:e,fieldName:[...a,e],field:r,isRequired:l.includes(e)})}),(0,t.jsx)(c,{rawSchema:r})]},e))})}var f=e.i(866746);let h=function(e={}){return e}({playground:{transformAuthInputs:e=>e.map(e=>"Bearer "===e.defaultValue?{...e,defaultValue:"Bearer sk_test_â¦"}:e),components:{ResultDisplay:function({data:e,reset:a,...s}){let{setResult:o}=(0,f.useResponseMirror)();return((0,n.useEffect)(()=>{let t;if("client_error"===e.type)return void o(null);let r="application/json"===(t=((e.headers.get("content-type")??"").split(";")[0]??"").trim().toLowerCase())||t.endsWith("+json")?"json":"application/xml"===t||"text/xml"===t||t.endsWith("+xml")?"xml":"text/html"===t?"html":"json",n=new TextDecoder("utf-8").decode(e.body);if("json"===r)try{n=JSON.stringify(JSON.parse(n),null,2)}catch{}return o({status:e.status,code:String(e.status),bodyText:n,lang:r}),()=>o(null)},[e,o]),"client_error"===e.type)?(0,t.jsx)(r.DefaultResultDisplay,{data:e,reset:a,...s}):null}},renderParameterField:(e,r)=>(0,t.jsx)(u,{fieldName:e,param:r},e.join(".")),renderBodyField:(e,r)=>(0,t.jsx)(p,{rawSchema:r.schema})}});e.s(["default",0,h],360574)},96207,e=>{e.v({panel:"openapi-response-module__IU_swW__panel"})},4600,e=>{"use strict";var t=e.i(843476),r=e.i(145562),n=e.i(672879);function a(e){return(0,t.jsx)(r.DynamicCodeBlock,{highlighter:()=>n.defaultShikiFactory.getOrInit(),options:{themes:{light:"github-light",dark:"github-dark"}},...e})}var s=e.i(213758),o=e.i(271645),l=e.i(866746),i=e.i(96207);let c=s.Tabs;e.s(["ResponsePanel",0,function({tabs:e}){let{result:r}=(0,l.useResponseMirror)(),n=(0,o.useRef)(null);(0,o.useEffect)(()=>{let e=n.current,t=e?.closest('[class*="@4xl:sticky"]');if(!e||!t)return;let r=0,a=-1,s=()=>{if(r=0,"sticky"!==getComputedStyle(t).position){-2!==a&&(a=-2,e.style.removeProperty("--resp-max-h"));return}let n=t.getBoundingClientRect().top,s=(e.querySelector(".fd-scroll-container")??e).getBoundingClientRect().top-n,o=Math.max(n,parseFloat(getComputedStyle(t).top)||0)+s,l=Math.max(240,Math.round(window.innerHeight-o-16));l!==a&&(a=l,e.style.setProperty("--resp-max-h",`${l}px`))},o=()=>{r||(r=requestAnimationFrame(s))};s(),window.addEventListener("scroll",o,{passive:!0}),window.addEventListener("resize",o);let l=new ResizeObserver(o);return l.observe(t),()=>{window.removeEventListener("scroll",o),window.removeEventListener("resize",o),l.disconnect(),r&&cancelAnimationFrame(r)}},[n]);let d=e.map(e=>e.code),u=r&&!d.includes(r.code)?r.code:null,p=u?[...d,u]:d,[f,h]=(0,o.useState)(d[0]);if((0,o.useEffect)(()=>{r&&h(r.code)},[r]),0===e.length)return null;let m=p.includes(f)?f:p[0];return(0,t.jsx)("div",{ref:n,className:i.default.panel,children:(0,t.jsxs)(c,{items:p,value:m,onValueChange:h,children:[e.map(e=>{let n=r&&r.code===e.code?r:null;return(0,t.jsx)(s.Tab,{value:e.code,children:n?(0,t.jsx)(a,{lang:n.lang,code:n.bodyText}):e.example},e.code)}),u&&r&&(0,t.jsx)(s.Tab,{value:u,children:(0,t.jsx)(a,{lang:r.lang,code:r.bodyText})},u)]})})}],4600)},627035,e=>{"use strict";var t=e.i(843476),r=e.i(271645),n=e.i(475254);let a=(0,n.default)("check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]),s=(0,n.default)("chevron-down",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}
7]]),o=(0,n.default)("copy",[["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"}]]),l=(0,n.default)("external-link",[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]]),i=(0,n.default)("text-align-start",[["path",{d:"M21 5H3",key:"1fi0y6"}],["path",{d:"M15 12H3",key:"6jk70r"}],["path",{d:"M17 19H3",key:"z6ezky"}]]);var c=e.i(224110),d=e.i(618566);let u=new Map,p={ja:e=>`${e} ãèªãã§ãã ããããã®ããã¥ã¡ã³ããå¯ä¸ã®æ£ããæ
å ±æºã¨ãã¦æ±ã£ã¦ãã ãããä»å¾ããªã¯ã¨ã¹ããã©ã¡ã¼ã¿ãã¬ã¹ãã³ã¹é
ç®ãããªãã¼ã·ã§ã³ã«ã¼ã«ãããã³ã¨ãã¸ã±ã¼ã¹ã«ã¤ãã¦è³ªåãã¾ãã`,en:e=>`Read ${e} and treat it as the source of truth. I will ask questions about request parameters, response fields, validation rules, and edge cases.`,zh:e=>`é
è¯»è¯¥ææ¡£${e} ï¼å¹¶å°å
¶è§ä¸ºå¯ä¸å¯ä¿¡æ¥æºãåç»æä¼è¯¢é®è¯·æ±åæ°ãè¿ååæ®µãæ ¡éªè§å以åè¾¹çæ
åµã`},f="inline-flex items-center gap-1 rounded-md border bg-fd-secondary text-fd-secondary-foreground px-2 py-1.5 text-xs font-medium transition-colors hover:bg-fd-accent hover:text-fd-accent-foreground disabled:pointer-events-none disabled:opacity-50";e.s(["MarkdownCopyButton",0,function({markdownUrl:e}){let[n,s]=(0,r.useState)(!1),[l,i]=(0,r.useState)(!1);async function c(){let t=u.get(e);t||(t=fetch(e).then(e=>e.text()),u.set(e,t)),i(!0);try{await navigator.clipboard.writeText(await t),s(!0),setTimeout(()=>s(!1),1500)}finally{i(!1)}}return(0,t.jsxs)("button",{type:"button",onClick:c,disabled:l,className:`${f} gap-2 [&_svg]:size-3.5 [&_svg]:text-fd-muted-foreground`,children:[n?(0,t.jsx)(a,{}):(0,t.jsx)(o,{}),"Copy Markdown"]})},"ViewOptionsPopover",0,function({markdownUrl:e}){let n=(0,c.usePathname)(),a=(0,d.useParams)(),o=a?.lang??"ja",[u,h]=(0,r.useState)(!1),m=(0,r.useRef)(null);(0,r.useEffect)(()=>{if(!u)return;let e=e=>{m.current?.contains(e.target)||h(!1)},t=e=>{"Escape"===e.key&&h(!1)};return document.addEventListener("mousedown",e),document.addEventListener("keydown",t),()=>{document.removeEventListener("mousedown",e),document.removeEventListener("keydown",t)}},[u]);let x=new URL(n,window.location.origin).toString(),g=(p[o]??p.ja)(x),v=[...e?[{title:"View as Markdown",href:e,icon:(0,t.jsx)(i,{})}]:[],{title:"Open in ChatGPT",href:`https://chatgpt.com/?${new URLSearchParams({hints:"search",q:g})}`,icon:(0,t.jsxs)("svg",{role:"img",viewBox:"0 0 24 24",fill:"currentColor",children:[(0,t.jsx)("title",{children:"OpenAI"}),(0,t.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.6813zm
71.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:g})}`,icon:(0,t.jsxs)("svg",{fill:"currentColor",role:"img",viewBox:"0 0 24 24",children:[(0,t.jsx)("title",{children:"Claude"}),(0,t.jsx)("path",{d:"m4.7144 15.9555 4.7174-2.6471.079-.2307-.079-.1275h-.2307l-.7893-.0486-2.6956-.0729-2.3375-.0971-2.2646-.1214-.5707-.1215-.5343-.7042.0546-.3522.4797-.3218.686.0608 1.5179.1032 2.2767.1578 1.6514.0972 2.4468.255h.3886l.0546-.1579-.1336-.0971-.1032-.0972L6.973 9.8356l-2.55-1.6879-1.3356-.9714-.7225-.4918-.3643-.4614-.1578-1.0078.6557-.7225.8803.0607.2246.0607.8925.686 1.9064 1.4754 2.4893 1.8336.3643.3035.1457-.1032.0182-.0728-.164-.2733-1.3539-2.4467-1.445-2.4893-.6435-1.032-.17-.6194c-.0607-.255-.1032-.4674-.1032-.7285L6.287.1335 6.6997 0l.9957.1336.419.3642.6192 1.4147 1.0018 2.2282 1.5543 3.0296.4553.8985.2429.8318.091.255h.1579v-.1457l.1275-1.706.2368-2.0947.2307-2.6957.0789-.7589.3764-.9107.7468-.4918.5828.2793.4797.686-.0668.4433-.2853 1.8517-.5586 2.9021-.3643 1.9429h.2125l.2429-.2429.9835-1.3053 1.6514-2.0643.7286-.8196.85-.9046.5464-.4311h1.0321l.759 1.1293-.34 1.1657-1.0625 1.3478-.8804 1.1414-1.2628 1.7-.7893 1.36.0729.1093.1882-.0183 2.8535-.607 1.5421-.2794 1.8396-.3157.8318.3886.091.3946-.3278.8075-1.967.4857-2.3072.4614-3.4364.8136-.0425.0304.0486.0607 1.5482.1457.6618.0364h1.621l3.0175.2247.7892.522.4736.6376-.079.4857-1.2142.6193-1.6393-.3886-3.825-.9107-1.3113-.3279h-.1822v.1093l1.0929 1.0686 2.0035 1.8092 2.5075 2.3314.1275.5768-.3218.4554-.34-.0486-2.2039-1.6575-.85-.7468-1.9246-1.621h-.1275v.17l.4432.6496 2.3436 3.5214.1214 1.0807-.17.3521-.6071.2125-.6679-.1214-1.3721-1.9246L14.38 17.959l-1.1414-1.9428-.1397.079-.674 7.2552-.3156.3703-.7286.2793-.6071-.4614-.3218-.7468.3218-1.4753.3886-1.9246.3157-1.53.2853-1.9004.17-.6314-.0121-.0425-.1397.
70182-1.4328 1.9672-2.1796 2.9446-1.7243 1.8456-.4128.164-.7164-.3704.0667-.6618.4008-.5889 2.386-3.0357 1.4389-1.882.929-1.0868-.0062-.1579h-.0546l-6.3385 4.1164-1.1293.1457-.4857-.4554.0608-.7467.2307-.2429 1.9064-1.3114Z"})]})}];return(0,t.jsxs)("div",{ref:m,className:"relative",children:[(0,t.jsxs)("button",{type:"button",onClick:()=>h(e=>!e),"aria-expanded":u,"aria-haspopup":"menu",className:`${f} ${u?"bg-fd-accent text-fd-accent-foreground":""}`,children:["Open",(0,t.jsx)(s,{className:"size-3.5 text-fd-muted-foreground"})]}),u&&(0,t.jsx)("div",{role:"menu",className:"absolute top-full right-0 mt-2 z-50 flex flex-col rounded-xl border bg-fd-popover/60 backdrop-blur-lg text-fd-popover-foreground shadow-lg p-2 min-w-[240px] max-w-[98vw]",children:v.map(e=>(0,t.jsxs)("a",{href:e.href,rel:"noreferrer noopener",target:"_blank",role:"menuitem",onClick:()=>h(!1),className:"text-sm p-2 rounded-lg inline-flex items-center gap-2 whitespace-nowrap hover:bg-fd-accent hover:text-fd-accent-foreground [&_svg]:size-4",children:[e.icon,e.title,(0,t.jsx)(l,{className:"text-fd-muted-foreground size-3.5 ms-auto"})]},e.href))})]})}],627035)}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.