1(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,525343,e=>{"use strict";e.s(["TabSyncContextProvider",()=>a,"useTabSync",()=>u]);var t=e.i(843476),r=e.i(271645),n=e.i(408155),i=e.i(768834);let o=()=>(0,n.createStore)(e=>({selectedLabel:void 0,setSelectedLabel:t=>e({selectedLabel:t})})),l=(0,r.createContext)(null);function a({children:e}){let n=(0,r.useRef)(null);return n.current||(n.current=o()),(0,t.jsx)(l.Provider,{value:n.current,children:e})}let s=o();function u(e,t=!0){let n=(0,r.useContext)(l)??s,o=(0,i.useStore)(n,e=>t?e.selectedLabel:void 0),a=(0,i.useStore)(n,e=>e.setSelectedLabel),c=(0,r.useCallback)(e=>{t&&a(e)},[t,a]);return{matchingIndex:t&&o?e.findIndex(e=>e===o):-1,setSelectedLabel:c}}},792616,807898,177986,e=>{"use strict";e.s(["CodeBlock",()=>o],792616);var t,r=e.i(843476),n=e.i(453778),i=e.i(865420);function o({filename:e,children:t,expandable:o,...l}){let a=(0,i.useAnalyticsContext)("docs.code_block.copy");return(0,r.jsx)(n.CodeBlock,{filename:e,expandable:o?.toLowerCase()==="true",onCopied:(e,t)=>a({code:t}),...l,children:t})}e.s(["CodeGroup",()=>eN,"SnippetGroup",()=>eL],177986);var l=e.i(744198),a=e.i(640389),s=e.i(343590),u=e.i(885401);e.s(["useTabState",()=>m],807898);var c=e.i(392146),d=e.i(525343),p=e.i(599182),f=e.i(271645);let g=e=>{try{return decodeURIComponent(e)}catch{return e}};function m({tabIds:e,tabLabels:t,persistKey:r,defaultIndex:n=0,onIndexChange:i,findInPanels:o,sync:l=!0}){let{matchingIndex:a,setSelectedLabel:s}=(0,d.useTabSync)(t,l),{preferredCodeLanguage:u,setPreferredCodeLanguage:m}=(0,f.useContext)(c.LocalStorageContext),[h,b]=(0,f.useState)(n),x=(0,f.useRef)(h);x.current=h;let v=(0,f.useRef)(!1);(0,f.useLayoutEffect)(()=>{if(v.current)return;v.current=!0;let n=e=>{x.current=e,b(e)},a=window.location.hash.substring(1);if(a){let t=e.indexOf(a);if(-1===t&&(t=e.indexOf(g(a))),-1!==t)return void n(t);let r=g(a),l=o?.(a)??(r!==a?o?.(r)??null:null);if(null!=l){l!==x.current&&(n(l),i?.(l));return}}if(l&&r){let e=window.localStorage.getItem("code");if(e){let r=t.indexOf(e);-1!==r&&n(r)}}},[e,t,l,r,o,i]);let y=(0,f.useRef)(null),C=(0,f.useCallback)(({index:n,updateHash:o=!0,updateSync:a=!0,updatePersist:u=!0})=>{if(n<0||n>=e.length)return;let c=e[n],d=t[n],p=!!c&&!!d;if(b(n),i?.(n),p){if(o&&1){y.current=null;let e=new URL(window.location.href);e.hash=c,window.history.pushState({},"",e.toString())}a&&l&&s(d),u&&l&&r&&m&&m(d)}},[e,t,s,r,m,i,l]),k=(0,f.useCallback)(e=>{let t=CSS.escape(e),r=document.querySelector(`#${t}`);if(!r)return!1;let n=r.closest('[role="tabpanel"]');if(!n)return!1;let i=document.querySelector(`[aria-controls="${n.id}"]`);return i instanceof HTMLElement&&(i.click(),!0)},[]),S=(0,f.useCallback)(e=>{if(k(e))return!0;let t=t=>{for(let r of Array.from(document.querySelectorAll(`[${t}]`))){let n=r.getAttribute(t);if(n)try{let t=JSON.parse(n);if(Array.isArray(t)&&t.includes(e)&&r instanceof HTMLElement)return r.click(),!0}catch{continue}}return!1};return t(p.CHILD_TAB_IDS_ATTRIBUTE)||t(p.CHILD_HEADING_IDS_ATTRIBUTE)},[k]);return(0,f.useEffect)(()=>{y.current=null;let t=null,r=(n=!1)=>{let i=window.location.hash.substring(1);if(!i)return;let l=g(i);if(y.current===i||y.current===l)return;let a=x.current,s=e.indexOf(i);if(-1===s&&(s=e.indexOf(l)),-1!==s){s!==a&&C({index:s,updateHash:!1}),y.current=i;return}if(o){let e=o(i)??(l!==i?o(l):null);if(null!==e){y.current=i,e!==a&&C({index:e,updateHash:!1,updateSync:!1,updatePersist:!1});return}}S(i)||l!==i&&S(l)?y.current=i:n||(t=setTimeout(()=>r(!0),100))},n=()=>r();return r(),window.addEventListener("hashchange",n),()=>{window.removeEventListener("hashchange",n),null!==t&&clearTimeout(t)}},[e,C,o,S]),(0,f.useEffect)(()=>{let e=x.current;-1!==a&&a!==e&&a<t.length&&C({index:a,updateSync:!1,updateHash:!1,updatePersist:!1})},[a,C,t.length]),(0,f.useEffect)(()=>{if(!l||!r||!u)return;let e=x.current,n=t.indexOf(u);-1!==n&&n!==e&&C({index:n,updatePersist:!1,updateSync:!1,updateHash:!1})},[l,r,u,t,C]),{activeIndex:h,setActiveIndex:C}}var h=e.i(476781),b=e.i(568258),x=e.i(152537),v=e.i(543535);e.s(["Indicator",()=>er,"List",()=>eg,"Panel",()=>ep,"Root",()=>L,"Tab",()=>W],69281),e.s([],559657),e.i(559657),e.i(247167);var y=e.i(951437),C=e.i(146376),k=e.i(667865),S=e.i(552245),w=e.i(53687),R=e.i(733332);let T=f.createContext(void 0);function E(){let e=f.useContext(T);if(void 0===e)throw Error((0,R.default)(64));return e}let j={tabActivationDirection:e=>({"data-activation-direction":e})};var I=e.i(675606),N=e.i(56434);let L=f.forwardRef(function(e,t){let{className:n,defaultValue:i=0,onValueChange:o,orientation:l="horizontal",render:a,value:s,style:u,...c}=e,d=void 0!==e.defaultValue,p=f.useRef([]),[g,m]=f.useState(()=>new Map),[h,b]=(0,y.useControlled)({controlled:s,default:i,name:"Tabs",state:"value"}),x=void 0!==s,[v,R]=f.useState(()=>new Map),E=f.useRef(void 0),L=f.useCallback(e=>A(v,e),[v]),[B,D]=f.useState(()=>({previousValue:h,tabActivationDirection:"none"})),{previousValue:P,tabActivationDirection:O}=B,H=O,_=!1;
1P!==h&&(H=M(P,h,l,v),_=null!=P&&null!=h&&null==L(h));let F=_?P:h,$=P!==F||O!==H;(0,C.useIsoLayoutEffect)(()=>{$&&D({previousValue:F,tabActivationDirection:H})},[F,$,H]);let z=(0,k.useStableCallback)((e,t)=>{t.activationDirection=M(h,e,l,v),o?.(e,t),t.isCanceled||b(e)}),W=(0,k.useStableCallback)((e,t)=>{o?.(e,(0,I.createChangeEventDetails)(t,void 0,void 0,{activationDirection:"none"}))}),V=(0,k.useStableCallback)((e,t)=>(m(r=>{let n=new Map(r);return n.set(e,t),n}),()=>{m(r=>{if(r.get(e)!==t)return r;let n=new Map(r);return n.delete(e),n})})),U=f.useCallback(e=>g.get(e),[g]),G=f.useCallback(e=>{for(let t of v.values())if(e===t.value)return t.id},[v]),K=f.useMemo(()=>({getTabElementBySelectedValue:L,getTabIdByPanelValue:G,getTabPanelIdByValue:U,onValueChange:z,orientation:l,registerMountedTabPanel:V,setTabMap:R,tabActivationDirection:H,value:h}),[L,G,U,z,l,V,R,H,h]),q=f.useMemo(()=>{for(let e of v.values())if(e.value===h)return e},[v,h]),Y=f.useMemo(()=>{for(let e of v.values())if(!e.disabled)return e.value},[v]),J=f.useRef(!d),Q=f.useRef(i),X=f.useRef(d),Z=f.useRef(!1);(0,C.useIsoLayoutEffect)(()=>{if(x)return;function e(e,t){b(e),D({previousValue:e,tabActivationDirection:"none"}),W(e,t),J.current=!1}if(0===v.size){Z.current&&null!==h&&!E.current?.isConnected&&e(null,N.REASONS.missing);return}Z.current=!0,E.current=v.keys().next().value;let t=q?.disabled,r=null==q&&null!==h;if(t||h!==Q.current||(X.current=!1),X.current&&t&&h===Q.current)return;let n=J.current;if(t||r){let r=Y??null;if(h===r){J.current=!1;return}let i=N.REASONS.missing;n?i=N.REASONS.initial:t&&(i=N.REASONS.disabled),e(r,i);return}n&&null!=q&&(W(h,N.REASONS.initial),J.current=!1)},[Y,x,W,q,b,v,h]);let ee={orientation:l,tabActivationDirection:H},et=(0,S.useRenderElement)("div",e,{state:ee,ref:t,props:c,stateAttributesMapping:j});return(0,r.jsx)(T.Provider,{value:K,children:(0,r.jsx)(w.CompositeList,{elementsRef:p,children:et})})});function A(e,t){for(let[r,n]of e.entries())if(t===n.value)return r;return null}function M(e,t,r,n){if(null==e||null==t)return"none";let[i,o,l]="horizontal"===r?["left","left","right"]:["top","up","down"],a=A(n,e),s=A(n,t);if(null==a||null==s)return a!==s&&("number"==typeof e||"string"==typeof e)&&typeof e==typeof t?t>e?l:o:"none";let u=a.getBoundingClientRect()[i],c=s.getBoundingClientRect()[i];return c<u?o:c>u?l:"none"}var B=e.i(108868),D=e.i(788015),P=e.i(540886),O=e.i(370359),H=e.i(395530),_=e.i(838452);let F=f.createContext(void 0);function $(){let e=f.useContext(F);if(void 0===e)throw Error((0,R.default)(65));return e}var z=e.i(584446);let W=f.forwardRef(function(e,t){let{className:r,disabled:n=!1,render:i,value:o,id:l,nativeButton:a=!0,style:s,...u}=e,{value:c,getTabPanelIdByValue:d,onValueChange:p,orientation:g,tabActivationDirection:m}=E(),{activateOnFocus:h,registerTabResizeObserverElement:b,tabsListElement:x}=$(),{highlightedIndex:v,onHighlightedIndexChange:y}=(0,_.useCompositeRootContext)(),w=(0,D.useBaseUiId)(l),R=f.useMemo(()=>({disabled:n,id:w,value:o}),[n,w,o]),{compositeProps:T,compositeRef:L,index:A}=(0,H.useCompositeItem)({metadata:R}),M=o===c,F=f.useRef(!1),W=f.useRef(null),V=(0,k.useStableCallback)(e=>{W.current?.(),W.current=e?b(e):null});(0,C.useIsoLayoutEffect)(()=>{if(F.current){F.current=!1;return}if(M&&A>-1&&v!==A){if(null!=x){let e=(0,z.activeElement)((0,B.ownerDocument)(x));if(e&&(0,z.contains)(x,e))return}n||y(A)}},[M,A,v,y,n,x]);let{getButtonProps:U,buttonRef:G}=(0,P.useButton)({disabled:n,native:a,focusableWhenDisabled:!0}),K=d(o),q=f.useRef(!1),Y=f.useRef(!1);function J(e){p(o,(0,I.createChangeEventDetails)(N.REASONS.none,e.nativeEvent,void 0,{activationDirection:"none"}))}return(0,S.useRenderElement)("button",e,{state:{disabled:n,active:M,orientation:g,tabActivationDirection:m},ref:[t,G,L,V],props:[T,{role:"tab","aria-controls":K,"aria-selected":M,id:w,onClick:function(e){M||n||J(e)},onFocus:function(e){M||n||h&&(!q.current||Y.current)&&J(e)},onPointerDown:function(e){if(M||n)return;q.current=!0,Y.current=0===e.button;let t=(0,B.ownerDocument)(e.currentTarget);function r(){q.current=!1,Y.current=!1,t.removeEventListener("pointerup",r),t.removeEventListener("pointercancel",r)}t.addEventListener("pointerup",r),t.addEventListener("pointercancel",r)},[O.ACTIVE_COMPOSITE_ITEM]:M?"":void 0,onKeyDownCapture(){F.current=!0}},u,U],stateAttributesMapping:j})});var V=e.i(229315),U=e.i(333848),G=e.i(802239),K=e.i(956789);function q(){return K.NOOP}function Y(){return!1}function J(){return!0}var Q=e.i(172410);function X(e){let{script:t}=e,{nonce:n}=(0,Q.useCSPContext)();return(0,G.useSyncExternalStore)(q,Y,J)?(0,r.jsx)("script",{nonce:n,dangerouslySetInnerHTML:{__html:t},suppressHydrationWarning:!0}):null}var Z=e.i(73364),ee=e.i(49072);let et={...j,activeTabPosition:()=>null,activeTabSize:()=>null},er=f.forwardRef(function(e,n){let{className:i,render:o,renderBeforeHydration:l=!1,style:a,...s}=e,{getTabElementBySelectedValue:u,orientation:c,tabActivationDirection:d,value:p}=E(),{tabsListElement:g,registerIndicatorUpdateListener:m}=$(),h=function(){let[,e]=f.useState({});return f.useCallback(()=>{e({})},[])}();f.useEffect(()=>m(h),[m,h]);let b=0,x=0,v=0,y=0,C=0,k=0,w=!1;if(null!=p&&null!=g){let e=u(p);if(null!=e){w=!0;let{width:t,height:r}=(0,Z.getCssDimensions)(e),{width:n,height:i}=(0,Z.getCssDimensions)(g),o=e.getBoundingClientRect(),l=g.getBoundingClientRect(),a=n>0?l.width/n:1,s=i>0?l.height/i:1,u=function(e,t){let r=en(e),n=en(t),i=r.left-n.left-t.clientLeft,o=r.top-n.top-t.clientTop,l=(0,V.getParentNode)(e);for(;(0,V.isHTMLElement)(l)&&l!==t&&!(0,V.isLastTraversableNode)(l);)i-=l.scrollLeft,o-=l.scrollTop,l=(0,V.getParentNode)(l);return{left:i,top:o}}(e,g);b=u.left,v=u.top;let c=(o.left-l.left)/a+g.scrollLeft-g.clientLeft,d=(o.top-l.top)/s+g.scrollTop-g.clientTop,p=function(e){let t=(0,U.ownerWindow)(e).getComputedStyle(e),{x:r,y:n}=(0,ee.getElementTransform)(e,t),i=r,o=n,{translate:l}=t;if(l&&"none"!==l){let t=l.split(" ");i+=ei(t[0],e.offsetWidth),o+=ei(t[1],e.offsetHeight)}return{x:i,y:o}}(e);2>=Math.abs(c-p.x-b)&&2>=Math.abs(d-p.y-v)&&(b=c,v=d),C=t,k=r,x=g.scrollWidth-b-C,y=g.scrollHeight-v-k}}let R=w?{left:b,right:x,top:v,bottom:y}:null,T=w?{width:C,height:k}:null,j=w?{"--active-tab-left":`${b}px`,"--active-tab-right":`${x}px`,"--active-tab-top":`${v}px`,"--active-tab-bottom":`${y}px`,"--active-tab-width":`${C}px`,"--active-tab-height":`${k}px`}:void 0,I=w&&C>0&&k>0,N=(0,S.useRenderElement)("span",e,{state:{orientation:c,activeTabPosition:R,activeTabSize:T,tabActivationDirection:d},ref:n,props:[{role:"presentation",style:j,hidden:!I},s,{suppressHydrationWarning:!0}],stateAttributesMapping:et});return null==p?null:(0,r.jsxs)(f.Fragment,{children:[N,l&&(t||(t=(0,r.jsx)(X,{script:""})))]})});function en(e){let t=0,r=0,n=e;for(;null!=n;){t+=n.offsetLeft,r+=n.offsetTop;let e=n.offsetParent;null!=e&&(t+=e.clientLeft,r+=e.clientTop),n=e}return{left:t,top:r}}function ei(e,t){if(!e)return 0;let r=parseFloat(e);return Number.isFinite(r)?e.endsWith("%")?r/100*t:r:0}var eo=e.i(144394),el=e.i(474354),ea=e.i(137584),es=e.i(223910),eu=e.i(673553),ec=e.i(253335);ec.TransitionStatusDataAttributes.startingStyle,ec.TransitionStatusDataAttributes.endingStyle;let ed={...j,...el.transitionStatusMapping},ep=f.forwardRef(function(e,t){let{className:r,value:n,render:i,keepMounted:o=!1,style:l,...a}=e,{value:s,getTabIdByPanelValue:u,orientation:c,tabActivationDirection:d,registerMountedTabPanel:p}=E(),g=(0,D.useBaseUiId)(),{ref:m,index:h}=(0,eu.useCompositeListItem)(),b=n===s,{mounted:x,transitionStatus:v,setMounted:y}=(0,es.useTransitionStatus)(b),k=!x,w=u(n),R=f.useRef(null),T=(0,S.useRenderElement)("div",e,{state:{hidden:k,orientation:c,tabActivationDirection:d,transitionStatus:v},ref:[t,m,R],props:[{"aria-labelledby":w,hidden:k,id:g,role:"tabpanel",tabIndex:b?0:-1,inert:(0,eo.inertValue)(!b),"data-index":h},a],stateAttributesMapping:ed});return((0,ea.useOpenChangeComplete)({open:b,ref:R,onComplete(){b||y(!1)}}),(0,C.useIsoLayoutEffect)(()=>
1{if(null!=g&&(!k||o))return p(n,g)},[k,o,n,g,p]),o||x)?T:null});var ef=e.i(405934);let eg=f.forwardRef(function(e,t){let{activateOnFocus:n=!1,className:i,loopFocus:o=!0,render:l,style:a,...s}=e,{orientation:u,setTabMap:c,tabActivationDirection:d}=E(),[p,g]=f.useState(0),[m,h]=f.useState(null),b=f.useRef(new Set),x=f.useRef(new Set),v=f.useRef(null);(0,C.useIsoLayoutEffect)(()=>{if("undefined"==typeof ResizeObserver)return;let e=new ResizeObserver(()=>{b.current.forEach(e=>{e()})});return v.current=e,m&&e.observe(m),x.current.forEach(t=>{e.observe(t)}),()=>{e.disconnect(),v.current=null}},[m]);let y=(0,k.useStableCallback)(e=>(b.current.add(e),()=>{b.current.delete(e)})),S=(0,k.useStableCallback)(e=>(x.current.add(e),v.current?.observe(e),()=>{x.current.delete(e),v.current?.unobserve(e)})),w=f.useMemo(()=>({activateOnFocus:n,registerIndicatorUpdateListener:y,registerTabResizeObserverElement:S,tabsListElement:m}),[n,y,S,m]);return(0,r.jsx)(F.Provider,{value:w,children:(0,r.jsx)(ef.CompositeRoot,{render:l,className:i,style:a,state:{orientation:u,tabActivationDirection:d},refs:[t,h],props:[{"aria-orientation":"vertical"===u?"vertical":void 0,role:"tablist"},s],stateAttributesMapping:j,highlightedIndex:p,enableHomeAndEndKeys:!0,loopFocus:o,orientation:u,onHighlightedIndexChange:g,onMapChange:c,disabledIndices:K.EMPTY_ARRAY})})});var em=e.i(69281),em=em,eh=e.i(319129),eb=e.i(296548),ex=e.i(962730),ev=e.i(714953),ey=e.i(34567),eC=e.i(857866),ek=e.i(45143),eS=e.i(147611),ew=e.i(561945),eR=e.i(876469);let eT=({language:e,className:t})=>{let n=(e=>{let t=(0,eS.getIconKey)(e);return t?`${eR.MINTLIFY_ICONS_CDN_URL}/devicon/${t}.svg`:null})(e);return n?(0,r.jsx)("svg",{className:(0,eb.cn)("w-3.5 h-3.5 shrink-0",t),style:{WebkitMaskImage:`url(${n})`,WebkitMaskRepeat:"no-repeat",WebkitMaskPosition:"center",maskImage:`url(${n})`,maskRepeat:"no-repeat",maskPosition:"center",maskSize:"100%",backgroundColor:"currentColor"}}):null},eE=({selectedLanguage:e,setSelectedLanguage:t,languages:n,hideIcon:i})=>{let o=n.length>1,l=(0,u.useCodeBlockThemeEnum)(),a=(0,s.useSelectedLocale)(),[c,d]=(0,f.useState)(!1);return(0,r.jsxs)(ek.DropdownMenu,{open:c,onOpenChange:d,children:[(0,r.jsx)(ek.DropdownMenuTrigger,{disabled:!o,"aria-label":a["aria.selectLanguage"],className:(0,eb.cn)("select-none bg-transparent dark:bg-transparent pb-1 text-xs font-medium cursor-default focus-visible:-outline-offset-2","dark"===l&&"focus-visible:outline-primary-light"),children:(0,r.jsxs)("div",{className:(0,eb.cn)("flex gap-1 items-center pl-2.5 pr-1.5 py-[5px] rounded-[10px] border text-gray-500 dark:text-gray-400",o?"cursor-pointer":"cursor-default",o&&"system"===l&&"hover:bg-gray-200/50 dark:hover:bg-gray-700/70 hover:text-primary dark:hover:text-primary-light",o&&"dark"===l&&"hover:bg-gray-700/70 hover:text-primary-light",c?"ring-1 dark:ring-gray-800/50 "+("system"===l?"ring-gray-200/70 ":"ring-gray-800/50")+" border-gray-600/50 dark:border-gray-400/50":"border-transparent"),children:[!i&&(0,r.jsx)(eT,{language:e}),(0,r.jsx)("p",{className:"truncate font-medium",children:(0,eS.getDisplayName)(e)}),o&&(0,r.jsx)(ew.ChevronExpandYIcon,{"aria-hidden":"true",strokeWidth:2,className:"size-3.5 shrink-0"})]})}),(0,r.jsx)(ek.DropdownMenuContent,{className:(0,eb.cn)("p-1 overflow-y-auto min-w-[170px] border dark:border-white/10 dark:bg-codeblock","system"===l&&"border-gray-200/70","dark"===l&&"border-white/10 bg-codeblock"),align:"end",sideOffset:0,children:n.map((n,i)=>{let o=n===e;return(0,r.jsxs)(ek.DropdownMenuItem,{isSelected:o,onClick:()=>t(n),className:(0,eb.cn)("flex items-center py-1.5 gap-1.5 text-xs","system"===l&&"hover:text-primary hover:bg-primary/10 dark:hover:text-primary-light dark:hover:bg-primary-light/10","dark"===l&&"text-primary-light dark:text-primary-light hover:text-primary-light hover:bg-primary-light/10 focus-visible:outline-primary-light",n===e&&"system"===l&&"text-primary dark:text-primary-light font-medium",n===e&&"dark"===l&&"text-primary-light dark:text-primary-light font-medium",n!==e&&"system"===l&&"text-gray-500 dark:text-white/50",n!==e&&"dark"===l&&"text-white/50"),children:[(0,r.jsx)(eT,{language:n}),(0,r.jsx)("div",{className:"flex items-center min-w-0 flex-1 font-medium",children:(0,eS.getDisplayName)(n)})]},i)})})]})},ej=function({children:e,onCopied:t,onChange:i,isSmallText:o,className:c,noMargins:d,dropdown:p,hideCodeSnippetFeedbackButton:g,hideLanguageIcon:y,...C}
1){let k=(0,s.useSelectedLocale)(),S=(0,u.useCodeBlockThemeEnum)(),w=(0,f.useRef)(new Map),R=(0,f.useRef)(new Map),T=Array.isArray(e)?e:f.default.Children.toArray(e),E=(0,f.useCallback)(e=>p?e.props.language:e.props.filename,[p]),{activeIndex:j,setActiveIndex:I}=m({tabIds:(0,f.useMemo)(()=>T.map(e=>(0,eh.slugify)(E(e)??"")),[T,E]),tabLabels:(0,f.useMemo)(()=>T.map(e=>E(e)??""),[T,E]),persistKey:"code",defaultIndex:0,onIndexChange:i}),N=(0,f.useCallback)(e=>{let t=Number(e),r=document.activeElement?.getAttribute("role")==="tab";window.location.hash&&window.history.replaceState(window.history.state,"",window.location.pathname+window.location.search),I({index:t,updateHash:!1}),r&&requestAnimationFrame(()=>{let e=w.current.get(t);e&&e.focus()})},[I]);if(!e)return null;if(0===T.length)return console.warn("CodeGroup has no children, expected at least one CodeBlock child."),null;let L=Number(j),A=()=>(0,r.jsxs)("div",{className:"flex items-center gap-1.5 text-xs font-medium min-w-0",children:[T[L]?.props.icon&&"string"==typeof T[L]?.props.icon&&(0,r.jsx)(b.ComponentIcon,{icon:T[L]?.props.icon,iconType:"regular",className:(0,eb.cn)("h-3.5 w-3.5 bg-gray-500 dark:bg-gray-400",h.Classes.CodeBlockIcon),overrideColor:!0}),(0,r.jsx)("span",{className:(0,eb.cn)("truncate","system"===S&&"text-gray-950 dark:text-gray-50","dark"===S&&"text-gray-50"),title:T[L]?.props.filename,children:T[L]?.props.filename})]}),M=()=>(0,r.jsxs)(x.ScrollArea,{className:"flex-1 w-0 rounded-tl-xl",children:[(0,r.jsx)(x.ScrollAreaViewport,{className:"overflow-y-hidden!",children:(0,r.jsx)(x.ScrollAreaContent,{children:(0,r.jsx)(em.List,{className:"text-xs leading-6 gap-1 flex","aria-label":k["aria.codeExamples"],children:T.map((e,t)=>(0,r.jsxs)(eI,{value:String(t),isSelected:L===t,tabsLength:T.length,codeBlockTheme:S,ref:e=>{e&&w.current.set(t,e)},children:[e.props.icon&&"string"==typeof e.props.icon&&(0,r.jsx)(b.ComponentIcon,{icon:e.props.icon,iconType:"regular",className:(0,eb.cn)("h-3.5 w-3.5 bg-gray-500 dark:bg-gray-400","system"===S?"group-hover:bg-primary dark:group-hover:bg-primary-light":"group-hover:bg-gray-700/70 group-hover:text-primary-light",h.Classes.CodeBlockIcon),color:L===t?"currentColor":void 0,overrideColor:!0}),e.props.filename]},e.props.filename+"TabItem"+t))})})}),(0,r.jsx)(x.ScrollAreaScrollbar,{orientation:"horizontal"})]});return(0,r.jsx)(a.CodeSnippetFeedbackProvider,{code:(0,eC.getNodeText)(T[L]?.props?.children),hideCodeSnippetFeedbackButton:T[L]?.props.hideCodeSnippetFeedbackButton||g,...(0,v.extractCodeBlockBaseProps)(T[L]?.props),children:({feedbackModalOpen:e,anchorRef:i})=>(0,r.jsxs)(em.Root,{ref:i,value:String(j),onValueChange:N,className:(0,eb.cn)(h.Classes.CodeGroup,"p-0.5 mt-5 mb-8 flex flex-col not-prose relative rounded-2xl border border-gray-950/10 dark:border-white/10 min-w-0",d&&"my-0","system"===S&&"bg-gray-50 dark:bg-white/5 dark:codeblock-dark text-gray-950 dark:text-gray-50 codeblock-light","dark"===S&&"border-transparent bg-codeblock dark:bg-white/5 text-gray-50 codeblock-dark",e&&"border border-primary dark:border-primary-light",c),...C,children:[(0,r.jsxs)("div",{className:(0,eb.cn)("flex items-center justify-between gap-2 relative",p?"px-2.5":"pr-2.5"),"data-component-part":"code-group-tab-bar",children:[p?(0,r.jsx)(A,{}):(0,r.jsx)(M,{}),(0,r.jsxs)("div",{className:"flex items-center justify-end shrink-0 gap-1.5",children:[p&&(0,r.jsx)(eE,{selectedLanguage:T[L]?.props.language||"",setSelectedLanguage:e=>{let t=T.findIndex(t=>t.props.language===e);-1!==t&&N(String(t))},languages:T.map(e=>e.props.language||""),hideIcon:y}),(0,r.jsx)(ey.CodeSnippetFeedbackButton,{}),!(0,n.isCodeBlockFlagEnabled)(T[L]?.props.nocopy)&&(0,r.jsx)(n.CopyToClipboardButton,{textToCopy:(0,eC.getNodeText)(T[L]?.props?.children),codeBlockRef:{get current(){return R.current.get(L)??null}},onCopied:t}),(0,r.jsx)(ex.AskAssistantCodeBlockButton,{code:(0,eC.getNodeText)(T[L]?.props?.children),...(0,v.extractCodeBlockBaseProps)(T[L]?.props)})]})]}),(0,r.jsx)("div",{className:"flex flex-1 overflow-hidden",children:T.map((e,t)=>(0,r.jsx)(em.Panel,{value:String(t),keepMounted:!0,className:"w-full min-w-full max-w-full h-full max-h-full relative focus-visible:outline-hidden before:content-[''] before:absolute before:inset-0 before:z-10 before:pointer-events-none before:rounded-xt focus-visible:before:outline focus-visible:before:outline-1 focus-visible:before:-outline-offset-2 focus-visible:before:outline-primary dark:focus-visible:before:outline-primary-light data-hidden:hidden [&_[data-component-part=code-block-root]]:rounded-xt!",tabIndex:0,...p&&{role:void 0,"aria-labelledby":void 0},children:(0,r.jsx)(l.ActiveCodeTabContext.Provider,{value:t===L,children:(0,r.jsx)(ev.BaseCodeBlock,{...e.props,isParentCodeGroup:!0,isSmallText:o,shouldHighlight:t===L,expandable:e.props.expandable&&t===L,ref:e=>{e?R.current.set(t,e):R.current.delete(t)}})})},e.props.filename+"Content"+t))})]})})},eI=({children:e,value:t,isSelected:n,tabsLength:i,codeBlockTheme:o,ref:l})=>(0,r.jsxs)(em.Tab,{ref:l,value:t,className:(0,eb.cn)("group flex items-center relative gap-1.5 my-1 mb-1.5 outline-0 whitespace-nowrap font-medium ml-0! first:ml-2.5! focus-visible:outline-hidden",n&&"system"===o&&"text-primary dark:text-primary-light",n&&("dark"===o||void 0==o)&&"text-primary-light",!n&&"system"===o&&"text-gray-500 dark:text-gray-400",!n&&("dark"===o||void 0==o)&&"text-gray-400"),children:[(0,r.jsx)("div",{className:(0,eb.cn)("peer/title flex items-center gap-1.5 px-1.5 rounded-lg z-10 group-focus-visible:outline-1","system"===o?"group-focus-visible:outline-primary dark:group-focus-visible:outline-primary-light":"group-focus-visible:outline-primary-light",i>1&&"system"===o&&"group-hover:bg-gray-200/50 dark:group-hover:bg-gray-700/70 group-hover:text-primary dark:group-hover:text-primary-light",i>1&&("dark"===o||void 0==o)&&"group-hover:bg-gray-700/70 group-hover:text-primary-light"),children:e}),n&&(0,r.jsx)("div",{className:"absolute -bottom-1.5 left-0 right-0 h-0.5 rounded-full bg-primary dark:bg-primary-light peer-empty/title:hidden"})]});function eN({dropdown:e,children:t,isSmallText:n,noMargins:o,hideCodeSnippetFeedbackButton:l,onCopied:a,className:s,onChange:u,...c}
1){let d=(0,i.useAnalyticsContext)("docs.code_block.copy");return(0,r.jsx)(ej,{dropdown:e,isSmallText:n,noMargins:o,hideCodeSnippetFeedbackButton:l,className:s,onChange:u,onCopied:(e,t)=>{d({code:t}),a?.(e,t)},...c,children:t})}function eL(e){return(0,r.jsx)(eN,{...e})}}]);
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.