@gradeui/ui 2.0.0 → 2.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  "use client";
2
- 'use strict';var zod=require('zod'),C=require('react'),gt=require('@radix-ui/react-accordion'),lucideReact=require('lucide-react'),clsx=require('clsx'),tailwindMerge=require('tailwind-merge'),classVarianceAuthority=require('class-variance-authority'),reactSlot=require('@radix-ui/react-slot'),jt=require('@radix-ui/react-avatar'),reactDayPicker=require('react-day-picker'),qp=require('embla-carousel-react'),Rr=require('@radix-ui/react-checkbox'),lo=require('@radix-ui/react-radio-group'),Ir=require('@radix-ui/react-switch'),prismReactRenderer=require('prism-react-renderer'),react=require('motion/react'),LexicalComposer=require('@lexical/react/LexicalComposer'),LexicalRichTextPlugin=require('@lexical/react/LexicalRichTextPlugin'),LexicalContentEditable=require('@lexical/react/LexicalContentEditable'),LexicalErrorBoundary=require('@lexical/react/LexicalErrorBoundary'),LexicalHistoryPlugin=require('@lexical/react/LexicalHistoryPlugin'),LexicalOnChangePlugin=require('@lexical/react/LexicalOnChangePlugin'),LexicalListPlugin=require('@lexical/react/LexicalListPlugin'),LexicalLinkPlugin=require('@lexical/react/LexicalLinkPlugin'),LexicalComposerContext=require('@lexical/react/LexicalComposerContext'),richText=require('@lexical/rich-text'),list=require('@lexical/list'),link=require('@lexical/link'),code=require('@lexical/code'),selection=require('@lexical/selection'),utils=require('@lexical/utils'),lexical=require('lexical'),lexicalBeautifulMentions=require('lexical-beautiful-mentions'),dateFns=require('date-fns'),kt=require('@radix-ui/react-popover'),ke=require('@radix-ui/react-dialog'),X=require('@radix-ui/react-dropdown-menu'),mn=require('@radix-ui/react-label'),Mr=require('@radix-ui/react-progress'),cmdk=require('cmdk'),vn=require('@radix-ui/react-separator'),Jo=require('react-resizable-panels'),ft=require('@radix-ui/react-scroll-area'),ee=require('@radix-ui/react-select'),Yt=require('@radix-ui/react-slider'),core=require('@dnd-kit/core'),sortable=require('@dnd-kit/sortable'),utilities=require('@dnd-kit/utilities'),Pt=require('@radix-ui/react-tabs'),Tt=require('@radix-ui/react-tooltip'),Ln=require('@radix-ui/react-toggle'),Qo=require('@radix-ui/react-toggle-group'),reactDom=require('react-dom'),Re=require('three'),postprocessing=require('postprocessing'),sb=require('lenis');function _interopDefault(e){return e&&e.__esModule?e:{default:e}}function _interopNamespace(e){if(e&&e.__esModule)return e;var n=Object.create(null);if(e){Object.keys(e).forEach(function(k){if(k!=='default'){var d=Object.getOwnPropertyDescriptor(e,k);Object.defineProperty(n,k,d.get?d:{enumerable:true,get:function(){return e[k]}});}})}n.default=e;return Object.freeze(n)}var C__namespace=/*#__PURE__*/_interopNamespace(C);var gt__namespace=/*#__PURE__*/_interopNamespace(gt);var jt__namespace=/*#__PURE__*/_interopNamespace(jt);var qp__default=/*#__PURE__*/_interopDefault(qp);var Rr__namespace=/*#__PURE__*/_interopNamespace(Rr);var lo__namespace=/*#__PURE__*/_interopNamespace(lo);var Ir__namespace=/*#__PURE__*/_interopNamespace(Ir);var kt__namespace=/*#__PURE__*/_interopNamespace(kt);var ke__namespace=/*#__PURE__*/_interopNamespace(ke);var X__namespace=/*#__PURE__*/_interopNamespace(X);var mn__namespace=/*#__PURE__*/_interopNamespace(mn);var Mr__namespace=/*#__PURE__*/_interopNamespace(Mr);var vn__namespace=/*#__PURE__*/_interopNamespace(vn);var Jo__namespace=/*#__PURE__*/_interopNamespace(Jo);var ft__namespace=/*#__PURE__*/_interopNamespace(ft);var ee__namespace=/*#__PURE__*/_interopNamespace(ee);var Yt__namespace=/*#__PURE__*/_interopNamespace(Yt);var Pt__namespace=/*#__PURE__*/_interopNamespace(Pt);var Tt__namespace=/*#__PURE__*/_interopNamespace(Tt);var Ln__namespace=/*#__PURE__*/_interopNamespace(Ln);var Qo__namespace=/*#__PURE__*/_interopNamespace(Qo);var Re__namespace=/*#__PURE__*/_interopNamespace(Re);var sb__default=/*#__PURE__*/_interopDefault(sb);var op=Object.defineProperty;var $r=(e,t)=>()=>(e&&(t=e(e=0)),t);var Za=(e,t)=>{for(var o in t)op(e,o,{get:t[o],enumerable:true});};var Oa,hc,bc=$r(()=>{Oa="2pMfyvhpuKonkf7h8HzH",hc=()=>Oa!=="YOUR_KEY_HERE"&&Oa.length>0;});var xc={};Za(xc,{createMaplibreAdapter:()=>Sf});function Rf(){if(typeof document>"u"||document.getElementById(yc))return;let e=document.createElement("link");e.id=yc,e.rel="stylesheet",e.href=wf,document.head.appendChild(e);}var xf,vc,wf,yc,Sf,wc=$r(()=>{bc();xf={light:"dataviz-light",dark:"dataviz-dark",satellite:"satellite"},vc=(e,t)=>`https://api.maptiler.com/maps/${xf[e]}/style.json?key=${encodeURIComponent(t)}`,wf="https://unpkg.com/maplibre-gl@4/dist/maplibre-gl.css",yc="gds-maplibre-gl-css";Sf=async(e,t,o)=>{Rf();let r;try{r=await import('maplibre-gl'),r.default&&(r=r.default);}catch(c){throw o.onError({code:"sdk-missing",message:'@gradeui/ui Map: `maplibre-gl` is not installed. Run `pnpm add maplibre-gl` (or your package manager\'s equivalent) to use provider="maplibre".',cause:c}),c}let n=t.tilerKey??Oa;process.env.NODE_ENV!=="production"&&!t.tilerKey&&!hc()&&console.warn("@gradeui/ui Map: no `tilerKey` prop and the bundled MapTiler demo key is unset. Tile requests will 403. Set `tilerKey` or paste a key into demo-config.ts.");let a=t.styleUrl??vc(t.appearance,n),i=new r.Map({container:e,style:a,center:t.center,zoom:t.zoom,interactive:t.interactive,attributionControl:{compact:true}});t.bounds&&i.fitBounds([t.bounds[0],t.bounds[1]],{animate:false}),await new Promise(c=>{i.once("load",()=>c());}),o.onLoad(),i.on("error",c=>{let d=String(c?.error?.message??c?.message??"MapLibre error"),m=d.toLowerCase().includes("style");o.onError({code:m?"style-load-failed":"tile-load-failed",message:d,cause:c?.error??c});});let p=new globalThis.Map;return {setCenter:c=>i.setCenter(c),setZoom:c=>i.setZoom(c),setBounds:(c,d)=>i.fitBounds([c,d],{animate:false}),setAppearance:c=>{let d=t.styleUrl??vc(c,n);i.setStyle(d,{diff:false});},setInteractive:c=>{let d=["scrollZoom","boxZoom","dragRotate","dragPan","keyboard","doubleClickZoom","touchZoomRotate"];for(let m of d){let g=i[m];g&&(c?g.enable():g.disable());}},flyTo:(c,d)=>i.flyTo({center:c,zoom:d?.zoom,duration:d?.durationMs??800}),panTo:(c,d)=>i.panTo(c,{duration:d?.durationMs??600}),fitBounds:(c,d)=>{if(c.length===0)return;let m=1/0,g=1/0,u=-1/0,b=-1/0;for(let[f,h]of c)f<m&&(m=f),h<g&&(g=h),f>u&&(u=f),h>b&&(b=h);i.fitBounds([[m,g],[u,b]],{padding:d?.paddingPx??40,duration:d?.durationMs??800});},getCenter:()=>{let c=i.getCenter();return [c.lng,c.lat]},getZoom:()=>i.getZoom(),getBounds:()=>{let c=i.getBounds();return [[c.getWest(),c.getSouth()],[c.getEast(),c.getNorth()]]},addMarker:(c,d,m)=>{let g=document.createElement("div");g.dataset.gdsPart="map-marker",g.dataset.gdsState="idle",g.style.cursor="pointer",g.addEventListener("mouseenter",()=>o.onMarkerHover(c)),g.addEventListener("mouseleave",()=>o.onMarkerHover(null)),g.addEventListener("click",f=>{o.onMarkerClick(c,b.coords,f);});let u=new r.Marker({element:g,anchor:m==="center"?"center":"bottom"}).setLngLat(d).addTo(i),b={element:g,coords:d,setHovered:f=>{g.dataset.gdsState=f?"hovered":"idle",g.style.zIndex=f?"10":"1";},setPosition:f=>{b.coords=f,u.setLngLat(f);},remove:()=>{u.remove(),p.delete(c);}};return p.set(c,{marker:u,handle:b}),b},destroy:()=>{p.forEach(({marker:c})=>c.remove()),p.clear(),i.remove();},instance:i}};});var kc={};Za(kc,{createMapboxAdapter:()=>Tf});function Cf(){if(typeof document>"u"||document.getElementById(Sc))return;let e=document.createElement("link");e.id=Sc,e.rel="stylesheet",e.href=kf,document.head.appendChild(e);}var Rc,kf,Sc,Tf,Cc=$r(()=>{Rc={light:"mapbox://styles/mapbox/light-v11",dark:"mapbox://styles/mapbox/dark-v11",satellite:"mapbox://styles/mapbox/satellite-streets-v12"},kf="https://unpkg.com/mapbox-gl@3/dist/mapbox-gl.css",Sc="gds-mapbox-gl-css";Tf=async(e,t,o)=>{if(!t.accessToken)throw o.onError({code:"api-key-missing",message:'@gradeui/ui Map: provider="mapbox" requires an `accessToken` prop.'}),new Error("mapbox accessToken missing");Cf();let r;try{r=await import('mapbox-gl'),r.default&&(r=r.default);}catch(s){throw o.onError({code:"sdk-missing",message:'@gradeui/ui Map: `mapbox-gl` is not installed. Run `pnpm add mapbox-gl` to use provider="mapbox".',cause:s}),s}r.accessToken=t.accessToken;let n=t.styleUrl??Rc[t.appearance],a=new r.Map({container:e,style:n,center:t.center,zoom:t.zoom,interactive:t.interactive});t.bounds&&a.fitBounds([t.bounds[0],t.bounds[1]],{animate:false}),await new Promise(s=>{a.once("load",()=>s());}),o.onLoad(),a.on("error",s=>{let c=String(s?.error?.message??s?.message??"Mapbox error"),d=c.toLowerCase().includes("style");o.onError({code:d?"style-load-failed":"tile-load-failed",message:c,cause:s?.error??s});});let i=new globalThis.Map;return {setCenter:s=>a.setCenter(s),setZoom:s=>a.setZoom(s),setBounds:(s,c)=>a.fitBounds([s,c],{animate:false}),setAppearance:s=>{let c=t.styleUrl??Rc[s];a.setStyle(c,{diff:false});},setInteractive:s=>{let c=["scrollZoom","boxZoom","dragRotate","dragPan","keyboard","doubleClickZoom","touchZoomRotate"];for(let d of c){let m=a[d];m&&(s?m.enable():m.disable());}},flyTo:(s,c)=>a.flyTo({center:s,zoom:c?.zoom,duration:c?.durationMs??800}),panTo:(s,c)=>a.panTo(s,{duration:c?.durationMs??600}),fitBounds:(s,c)=>{if(s.length===0)return;let d=1/0,m=1/0,g=-1/0,u=-1/0;for(let[b,f]of s)b<d&&(d=b),f<m&&(m=f),b>g&&(g=b),f>u&&(u=f);a.fitBounds([[d,m],[g,u]],{padding:c?.paddingPx??40,duration:c?.durationMs??800});},getCenter:()=>{let s=a.getCenter();return [s.lng,s.lat]},getZoom:()=>a.getZoom(),getBounds:()=>{let s=a.getBounds();return [[s.getWest(),s.getSouth()],[s.getEast(),s.getNorth()]]},addMarker:(s,c,d)=>{let m=document.createElement("div");m.dataset.gdsPart="map-marker",m.dataset.gdsState="idle",m.style.cursor="pointer",m.addEventListener("mouseenter",()=>o.onMarkerHover(s)),m.addEventListener("mouseleave",()=>o.onMarkerHover(null)),m.addEventListener("click",b=>{o.onMarkerClick(s,u.coords,b);});let g=new r.Marker({element:m,anchor:d==="center"?"center":"bottom"}).setLngLat(c).addTo(a),u={element:m,coords:c,setHovered:b=>{m.dataset.gdsState=b?"hovered":"idle",m.style.zIndex=b?"10":"1";},setPosition:b=>{u.coords=b,g.setLngLat(b);},remove:()=>{g.remove(),i.delete(s);}};return i.set(s,{marker:g,handle:u}),u},destroy:()=>{i.forEach(({marker:s})=>s.remove()),i.clear(),a.remove();},instance:a}};});var Pc={};Za(Pc,{createGoogleAdapter:()=>Mf});var Pf,Nf,Tc,Mf,Nc=$r(()=>{Pf=[{featureType:"poi",stylers:[{visibility:"off"}]},{featureType:"transit",stylers:[{visibility:"simplified"}]}],Nf=[{elementType:"geometry",stylers:[{color:"#1a1a1a"}]},{elementType:"labels.text.stroke",stylers:[{color:"#1a1a1a"}]},{elementType:"labels.text.fill",stylers:[{color:"#9ca3af"}]},{featureType:"poi",stylers:[{visibility:"off"}]},{featureType:"road",elementType:"geometry",stylers:[{color:"#262626"}]},{featureType:"road",elementType:"labels.text.fill",stylers:[{color:"#9ca3af"}]},{featureType:"water",elementType:"geometry",stylers:[{color:"#0f172a"}]},{featureType:"transit",stylers:[{visibility:"simplified"},{color:"#3a3a3a"}]}],Tc=e=>e==="dark"?Nf:Pf,Mf=async(e,t,o)=>{if(!t.apiKey)throw o.onError({code:"api-key-missing",message:'@gradeui/ui Map: provider="google" requires an `apiKey` prop.'}),new Error("google apiKey missing");let r;try{let d=await import('@googlemaps/js-api-loader');r=d.Loader??d.default?.Loader;}catch(d){throw o.onError({code:"sdk-missing",message:'@gradeui/ui Map: `@googlemaps/js-api-loader` is not installed. Run `pnpm add @googlemaps/js-api-loader` to use provider="google".',cause:d}),d}let n=new r({apiKey:t.apiKey,version:"weekly",libraries:["maps","marker"]}),a;try{a=await n.load();}catch(d){throw o.onError({code:"provider-init-failed",message:"@gradeui/ui Map: Google Maps loader failed.",cause:d}),d}let i=t.appearance==="satellite",p=new a.maps.Map(e,{center:{lat:t.center[1],lng:t.center[0]},zoom:t.zoom,mapTypeId:i?a.maps.MapTypeId.HYBRID:a.maps.MapTypeId.ROADMAP,mapId:t.mapId,styles:i?void 0:Tc(t.appearance==="dark"?"dark":"light"),disableDefaultUI:!t.interactive,gestureHandling:t.interactive?"auto":"none",keyboardShortcuts:t.interactive});if(t.bounds){let d=new a.maps.LatLngBounds({lat:t.bounds[0][1],lng:t.bounds[0][0]},{lat:t.bounds[1][1],lng:t.bounds[1][0]});p.fitBounds(d);}await new Promise(d=>{a.maps.event.addListenerOnce(p,"idle",()=>d());}),o.onLoad();let s=new globalThis.Map;return {setCenter:d=>p.setCenter({lat:d[1],lng:d[0]}),setZoom:d=>p.setZoom(d),setBounds:(d,m)=>{let g=new a.maps.LatLngBounds({lat:d[1],lng:d[0]},{lat:m[1],lng:m[0]});p.fitBounds(g);},setAppearance:d=>{d==="satellite"?(p.setMapTypeId(a.maps.MapTypeId.HYBRID),p.setOptions({styles:void 0})):(p.setMapTypeId(a.maps.MapTypeId.ROADMAP),p.setOptions({styles:Tc(d)}));},setInteractive:d=>{p.setOptions({disableDefaultUI:!d,gestureHandling:d?"auto":"none",keyboardShortcuts:d});},flyTo:(d,m)=>{p.panTo({lat:d[1],lng:d[0]}),m?.zoom!=null&&p.setZoom(m.zoom);},panTo:d=>p.panTo({lat:d[1],lng:d[0]}),fitBounds:(d,m)=>{if(d.length===0)return;let g=new a.maps.LatLngBounds;for(let[u,b]of d)g.extend({lat:b,lng:u});p.fitBounds(g,m?.paddingPx??40);},getCenter:()=>{let d=p.getCenter();return d?[d.lng(),d.lat()]:[0,0]},getZoom:()=>p.getZoom()??0,getBounds:()=>{let d=p.getBounds();if(!d)return [[0,0],[0,0]];let m=d.getSouthWest(),g=d.getNorthEast();return [[m.lng(),m.lat()],[g.lng(),g.lat()]]},addMarker:(d,m,g)=>{let u=document.createElement("div");u.dataset.gdsPart="map-marker",u.dataset.gdsState="idle",u.style.cursor="pointer",g==="center"&&(u.style.transform="translateY(50%)"),u.addEventListener("mouseenter",()=>o.onMarkerHover(d)),u.addEventListener("mouseleave",()=>o.onMarkerHover(null)),u.addEventListener("click",h=>{o.onMarkerClick(d,f.coords,h);});let b=new a.maps.marker.AdvancedMarkerElement({map:p,position:{lat:m[1],lng:m[0]},content:u}),f={element:u,coords:m,setHovered:h=>{u.dataset.gdsState=h?"hovered":"idle",b.zIndex=h?10:1;},setPosition:h=>{f.coords=h,b.position={lat:h[1],lng:h[0]};},remove:()=>{b.map=null,s.delete(d);}};return s.set(d,{marker:b,handle:f}),f},destroy:()=>{s.forEach(({marker:d})=>{d.map=null;}),s.clear();},instance:p}};});var ci={name:"Accordion",description:`Long-form content that would overwhelm if shown all at once \u2014 FAQs, settings groups, "what's included" sections, nested help. For tab-style peer views with one always visible, reach for Tabs. For a single show/hide reveal use Collapsible.`,import:"@gradeui/ui",aliases:["accordion","faq","expand","collapse list","disclosure list","disclosure group","outline group","expandable list","sectionlist"],subcomponents:["AccordionItem","AccordionTrigger","AccordionContent"],composesWith:["Card (as a faq inside a card body)","Section primitives"],styleDefaults:{AccordionItem:"border-b",AccordionTrigger:"flex flex-1 items-center justify-between py-4 font-medium transition-all hover:underline [&[data-state=open]>svg]:rotate-180",AccordionContent:"pb-4 pt-0"},props:{type:{schema:zod.z.enum(["single","multiple"]),design:"knob",description:"single keeps one open at a time, multiple lets several be open at once"},collapsible:{schema:zod.z.boolean().optional(),design:"knob",description:'only valid with type="single"; allows the open item to be toggled shut'},defaultValue:{schema:zod.z.union([zod.z.string(),zod.z.array(zod.z.string())]).optional(),design:"knob",description:"initial open item(s)"},value:{schema:zod.z.union([zod.z.string(),zod.z.array(zod.z.string())]).optional(),design:"knob",description:"controlled"},onValueChange:{schema:zod.z.unknown().optional(),design:"event"},children:{schema:zod.z.unknown(),design:"plumbing",description:"the row label users click to expand"}}};var pi={name:"AiChat",description:'A flexible chat block \u2014 header + scrollable message list + composer. Out of the box it looks like a polished "AI panel"; under it, every region is a slot so hosts can compose richer chat surfaces (e.g. Studio\'s left column with selection chip + settings panel above the composer, an error banner inline, per-message usage / refs / actions). Per-turn token usage, refs, and actions are optional and gated by `showUsage` / `showRefs` / `showActions` \u2014 leave them off for product-facing chats, turn them on for developer-facing ones where transparency matters. Composes with [[AIChatComposer]] (rendered internally; can be slotted in with custom props via `composerSlot`).',import:"@gradeui/ui",aliases:["ai chat","chat panel","chat block","llm chat","assistant panel","copilot chat","ai assistant"],composesWith:["Card (host in a sidebar panel)","Sheet (mobile drawer)","Stack (place above other content)","AIChatComposer (internal composer; slot to override)"],styleDefaults:{MessageActions:"inline-flex items-center gap-1 rounded-md px-2 py-1 text-[11px]",ThinkingDisclosure:"w-3.5 h-3.5 text-gds-gray-500 dark:text-gds-gray-400 shrink-0",StepsDisclosure:"w-3.5 h-3.5 text-gds-gray-500 dark:text-gds-gray-400 transition-transform shrink-0",AIChat:"flex flex-col overflow-hidden"},props:{messages:{schema:zod.z.unknown().optional(),design:"plumbing",description:'`{ id, role: "user" | "assistant", content, timestamp, thinking?, steps?, usage?, refs?, actions?, duration? }`; defaults to empty'},onSendMessage:{schema:zod.z.unknown().optional(),design:"event",description:"fires when the user submits via the default composer; ignored if `composerSlot` is set"},isLoading:{schema:zod.z.boolean().optional(),design:"knob",description:"shows a typing indicator at the bottom of the message list"},placeholder:{schema:zod.z.string().optional(),design:"content",description:"composer placeholder text (ignored if `composerSlot` is set)"},title:{schema:zod.z.string().optional(),design:"plumbing",description:'header title; defaults to "AI Assistant"'},titleIcon:{schema:zod.z.unknown().optional(),design:"plumbing",description:"optional icon rendered before the title (e.g. `<Sparkles />`)"},headerTokens:{schema:zod.z.number().optional(),design:"knob",description:'optional session-level token total shown on the right of the header; rendered as "N tokens" with a small gauge icon when set'},headerEnd:{schema:zod.z.unknown().optional(),design:"plumbing",description:"optional arbitrary content appended after `headerTokens` on the right of the header"},showUsage:{schema:zod.z.boolean().optional(),design:"knob",description:"show the per-turn `usage` strip below the assistant bubble; default false"},showRefs:{schema:zod.z.boolean().optional(),design:"knob",description:"show the per-turn `refs` strip below the assistant bubble; default false"},showActions:{schema:zod.z.boolean().optional(),design:"knob",description:"render per-turn `actions` chips when a message has them; default true"},showDuration:{schema:zod.z.boolean().optional(),design:"knob",description:'render the per-turn wall-clock duration ("2.3s") below the assistant bubble when a message carries `duration`; default false'},showThinking:{schema:zod.z.boolean().optional(),design:"knob",description:'render the per-turn reasoning ("Thoughts") disclosure above the assistant prose when a message carries `thinking`; collapsed by default, click to expand; default false'},showSteps:{schema:zod.z.boolean().optional(),design:"knob",description:'render the per-turn step timeline above the assistant prose when a message carries `steps`; collapsed view shows the current running step (or "N steps completed"), click to expand the vertical timeline with status glyphs; default false'},thinkingPhrase:{schema:zod.z.string().optional(),design:"content",description:'override the "Thinking" label in the loading indicator'},suggestedPrompts:{schema:zod.z.unknown().optional(),design:"plumbing",description:"empty-state quick prompts (ignored if `emptyStateSlot` is set)"},emptyStateSlot:{schema:zod.z.unknown().optional(),design:"plumbing",description:"replaces the default empty state entirely"},errorSlot:{schema:zod.z.unknown().optional(),design:"plumbing",description:"rendered after the messages list (typically an error banner)"},composerAboveSlot:{schema:zod.z.unknown().optional(),design:"plumbing",description:"rendered between the messages and the composer (selection chip, settings panel)"},composerBelowSlot:{schema:zod.z.unknown().optional(),design:"plumbing",description:"rendered below the composer (disclaimer, char counter)"},composerSlot:{schema:zod.z.unknown().optional(),design:"plumbing",description:"full override of the composer; when provided, `onSendMessage` + `placeholder` are unused"},bare:{schema:zod.z.boolean().optional(),design:"knob",description:"strip the outer card chrome (background, border, rounded corners) so the chat takes the surface of its container; default false (keeps the canned card look)"},assistantBubble:{schema:zod.z.boolean().optional(),design:"knob",description:"whether assistant messages render with a bubble (background + border + padding + rounded corners); default true. Set false for a Claude.ai-style chromeless transcript where assistant text sits on the surface and only user turns wear a bubble."},className:{schema:zod.z.string().optional(),design:"plumbing"}}};var mi={name:"AiChatComposer",description:"The reusable \"input card\" for any chat surface \u2014 auto-growing textarea, image attachments via paperclip and clipboard paste, attachment chips with previews, Send/Stop toggle, controlled value. Drop in below any messages list. Use this when you want the input affordances of `<AIChat>` but you're rendering your own messages list / scrollarea / header (e.g. Studio's left-column chat, where SelectionChip and SettingsPanel sit between messages and composer). For the full canned chat block, use `<AIChat>` instead.",import:"@gradeui/ui",aliases:["chat composer","chat input","prompt composer","message input"],composesWith:["AIChat (uses this internally)","Card (host above)","ScrollArea (place messages above)"],styleDefaults:{AIChatComposer:"w-full"},props:{value:{schema:zod.z.string(),design:"content",description:"controlled textarea value"},onChange:{schema:zod.z.unknown(),design:"event",description:"fires for every textarea change"},onSend:{schema:zod.z.unknown(),design:"event",description:"fires when the user submits (Enter or click Send); composer validates that text or attachments exist before firing"},isLoading:{schema:zod.z.boolean().optional(),design:"knob",description:"disables the textarea + paperclip and swaps Send for Stop"},onStop:{schema:zod.z.unknown().optional(),design:"event",description:"fires when the user clicks Stop; without this, Stop renders disabled"},placeholder:{schema:zod.z.string().optional(),design:"content"},maxLength:{schema:zod.z.number().optional(),design:"knob",description:"hard cap passed to the underlying `<textarea>`"},showHint:{schema:zod.z.boolean().optional(),design:"knob",description:'show the "Press Enter\u2026 \xB7 Paste images" hint below the card; default true, set false when the host renders its own footer'},className:{schema:zod.z.string().optional(),design:"plumbing"}}};var ui={name:"AppShell",description:`The top-level page scaffold for any app-like or marketing layout. Reach for AppShell
2
+ 'use strict';var zod=require('zod'),v=require('react'),kt=require('@radix-ui/react-accordion'),lucideReact=require('lucide-react'),clsx=require('clsx'),tailwindMerge=require('tailwind-merge'),classVarianceAuthority=require('class-variance-authority'),reactSlot=require('@radix-ui/react-slot'),Yt=require('@radix-ui/react-avatar'),reactDayPicker=require('react-day-picker'),Iu=require('embla-carousel-react'),Pr=require('@radix-ui/react-checkbox'),ho=require('@radix-ui/react-radio-group'),Br=require('@radix-ui/react-switch'),prismReactRenderer=require('prism-react-renderer'),react=require('motion/react'),LexicalComposer=require('@lexical/react/LexicalComposer'),LexicalRichTextPlugin=require('@lexical/react/LexicalRichTextPlugin'),LexicalContentEditable=require('@lexical/react/LexicalContentEditable'),LexicalErrorBoundary=require('@lexical/react/LexicalErrorBoundary'),LexicalHistoryPlugin=require('@lexical/react/LexicalHistoryPlugin'),LexicalOnChangePlugin=require('@lexical/react/LexicalOnChangePlugin'),LexicalListPlugin=require('@lexical/react/LexicalListPlugin'),LexicalLinkPlugin=require('@lexical/react/LexicalLinkPlugin'),LexicalComposerContext=require('@lexical/react/LexicalComposerContext'),richText=require('@lexical/rich-text'),list=require('@lexical/list'),link=require('@lexical/link'),code=require('@lexical/code'),selection=require('@lexical/selection'),utils=require('@lexical/utils'),lexical=require('lexical'),lexicalBeautifulMentions=require('lexical-beautiful-mentions'),dateFns=require('date-fns'),It=require('@radix-ui/react-popover'),Ie=require('@radix-ui/react-dialog'),ne=require('@radix-ui/react-dropdown-menu'),bn=require('@radix-ui/react-label'),Ir=require('@radix-ui/react-progress'),cmdk=require('cmdk'),Sn=require('@radix-ui/react-separator'),or=require('react-resizable-panels'),Ct=require('@radix-ui/react-scroll-area'),le=require('@radix-ui/react-select'),ro=require('@radix-ui/react-slider'),core=require('@dnd-kit/core'),sortable=require('@dnd-kit/sortable'),utilities=require('@dnd-kit/utilities'),zt=require('@radix-ui/react-tabs'),Ft=require('@radix-ui/react-tooltip'),rr=require('recharts'),zn=require('@radix-ui/react-toggle'),ar=require('@radix-ui/react-toggle-group'),core$1=require('@gradeui/core'),reactDom=require('react-dom'),De=require('three'),postprocessing=require('postprocessing'),Tv=require('lenis');function _interopDefault(e){return e&&e.__esModule?e:{default:e}}function _interopNamespace(e){if(e&&e.__esModule)return e;var n=Object.create(null);if(e){Object.keys(e).forEach(function(k){if(k!=='default'){var d=Object.getOwnPropertyDescriptor(e,k);Object.defineProperty(n,k,d.get?d:{enumerable:true,get:function(){return e[k]}});}})}n.default=e;return Object.freeze(n)}var v__namespace=/*#__PURE__*/_interopNamespace(v);var kt__namespace=/*#__PURE__*/_interopNamespace(kt);var Yt__namespace=/*#__PURE__*/_interopNamespace(Yt);var Iu__default=/*#__PURE__*/_interopDefault(Iu);var Pr__namespace=/*#__PURE__*/_interopNamespace(Pr);var ho__namespace=/*#__PURE__*/_interopNamespace(ho);var Br__namespace=/*#__PURE__*/_interopNamespace(Br);var It__namespace=/*#__PURE__*/_interopNamespace(It);var Ie__namespace=/*#__PURE__*/_interopNamespace(Ie);var ne__namespace=/*#__PURE__*/_interopNamespace(ne);var bn__namespace=/*#__PURE__*/_interopNamespace(bn);var Ir__namespace=/*#__PURE__*/_interopNamespace(Ir);var Sn__namespace=/*#__PURE__*/_interopNamespace(Sn);var or__namespace=/*#__PURE__*/_interopNamespace(or);var Ct__namespace=/*#__PURE__*/_interopNamespace(Ct);var le__namespace=/*#__PURE__*/_interopNamespace(le);var ro__namespace=/*#__PURE__*/_interopNamespace(ro);var zt__namespace=/*#__PURE__*/_interopNamespace(zt);var Ft__namespace=/*#__PURE__*/_interopNamespace(Ft);var rr__namespace=/*#__PURE__*/_interopNamespace(rr);var zn__namespace=/*#__PURE__*/_interopNamespace(zn);var ar__namespace=/*#__PURE__*/_interopNamespace(ar);var De__namespace=/*#__PURE__*/_interopNamespace(De);var Tv__default=/*#__PURE__*/_interopDefault(Tv);var Vp=Object.defineProperty;var gr=(e,t)=>()=>(e&&(t=e(e=0)),t);var Jr=(e,t)=>{for(var o in t)Vp(e,o,{get:t[o],enumerable:true});};var Ua,Hc,Fc=gr(()=>{Ua="2pMfyvhpuKonkf7h8HzH",Hc=()=>Ua!=="YOUR_KEY_HERE"&&Ua.length>0;});var Bc={};Jr(Bc,{createMaplibreAdapter:()=>bh});function hh(){if(typeof document>"u"||document.getElementById(_c))return;let e=document.createElement("link");e.id=_c,e.rel="stylesheet",e.href=fh,document.head.appendChild(e);}var gh,zc,fh,_c,bh,Oc=gr(()=>{Fc();gh={light:"dataviz-light",dark:"dataviz-dark",satellite:"satellite"},zc=(e,t)=>`https://api.maptiler.com/maps/${gh[e]}/style.json?key=${encodeURIComponent(t)}`,fh="https://unpkg.com/maplibre-gl@4/dist/maplibre-gl.css",_c="gds-maplibre-gl-css";bh=async(e,t,o)=>{hh();let r;try{r=await import('maplibre-gl'),r.default&&(r=r.default);}catch(c){throw o.onError({code:"sdk-missing",message:'@gradeui/ui Map: `maplibre-gl` is not installed. Run `pnpm add maplibre-gl` (or your package manager\'s equivalent) to use provider="maplibre".',cause:c}),c}let n=t.tilerKey??Ua;process.env.NODE_ENV!=="production"&&!t.tilerKey&&!Hc()&&console.warn("@gradeui/ui Map: no `tilerKey` prop and the bundled MapTiler demo key is unset. Tile requests will 403. Set `tilerKey` or paste a key into demo-config.ts.");let a=t.styleUrl??zc(t.appearance,n),i=new r.Map({container:e,style:a,center:t.center,zoom:t.zoom,interactive:t.interactive,attributionControl:{compact:true}});t.bounds&&i.fitBounds([t.bounds[0],t.bounds[1]],{animate:false}),await new Promise(c=>{i.once("load",()=>c());}),o.onLoad(),i.on("error",c=>{let l=String(c?.error?.message??c?.message??"MapLibre error"),m=l.toLowerCase().includes("style");o.onError({code:m?"style-load-failed":"tile-load-failed",message:l,cause:c?.error??c});});let p=new globalThis.Map;return {setCenter:c=>i.setCenter(c),setZoom:c=>i.setZoom(c),setBounds:(c,l)=>i.fitBounds([c,l],{animate:false}),setAppearance:c=>{let l=t.styleUrl??zc(c,n);i.setStyle(l,{diff:false});},setInteractive:c=>{let l=["scrollZoom","boxZoom","dragRotate","dragPan","keyboard","doubleClickZoom","touchZoomRotate"];for(let m of l){let u=i[m];u&&(c?u.enable():u.disable());}},flyTo:(c,l)=>i.flyTo({center:c,zoom:l?.zoom,duration:l?.durationMs??800}),panTo:(c,l)=>i.panTo(c,{duration:l?.durationMs??600}),fitBounds:(c,l)=>{if(c.length===0)return;let m=1/0,u=1/0,g=-1/0,h=-1/0;for(let[f,b]of c)f<m&&(m=f),b<u&&(u=b),f>g&&(g=f),b>h&&(h=b);i.fitBounds([[m,u],[g,h]],{padding:l?.paddingPx??40,duration:l?.durationMs??800});},getCenter:()=>{let c=i.getCenter();return [c.lng,c.lat]},getZoom:()=>i.getZoom(),getBounds:()=>{let c=i.getBounds();return [[c.getWest(),c.getSouth()],[c.getEast(),c.getNorth()]]},addMarker:(c,l,m)=>{let u=document.createElement("div");u.dataset.gdsPart="map-marker",u.dataset.gdsState="idle",u.style.cursor="pointer",u.addEventListener("mouseenter",()=>o.onMarkerHover(c)),u.addEventListener("mouseleave",()=>o.onMarkerHover(null)),u.addEventListener("click",f=>{o.onMarkerClick(c,h.coords,f);});let g=new r.Marker({element:u,anchor:m==="center"?"center":"bottom"}).setLngLat(l).addTo(i),h={element:u,coords:l,setHovered:f=>{u.dataset.gdsState=f?"hovered":"idle",u.style.zIndex=f?"10":"1";},setPosition:f=>{h.coords=f,g.setLngLat(f);},remove:()=>{g.remove(),p.delete(c);}};return p.set(c,{marker:g,handle:h}),h},destroy:()=>{p.forEach(({marker:c})=>c.remove()),p.clear(),i.remove();},instance:i}};});var Wc={};Jr(Wc,{createMapboxAdapter:()=>xh});function yh(){if(typeof document>"u"||document.getElementById(Gc))return;let e=document.createElement("link");e.id=Gc,e.rel="stylesheet",e.href=vh,document.head.appendChild(e);}var Vc,vh,Gc,xh,jc=gr(()=>{Vc={light:"mapbox://styles/mapbox/light-v11",dark:"mapbox://styles/mapbox/dark-v11",satellite:"mapbox://styles/mapbox/satellite-streets-v12"},vh="https://unpkg.com/mapbox-gl@3/dist/mapbox-gl.css",Gc="gds-mapbox-gl-css";xh=async(e,t,o)=>{if(!t.accessToken)throw o.onError({code:"api-key-missing",message:'@gradeui/ui Map: provider="mapbox" requires an `accessToken` prop.'}),new Error("mapbox accessToken missing");yh();let r;try{r=await import('mapbox-gl'),r.default&&(r=r.default);}catch(s){throw o.onError({code:"sdk-missing",message:'@gradeui/ui Map: `mapbox-gl` is not installed. Run `pnpm add mapbox-gl` to use provider="mapbox".',cause:s}),s}r.accessToken=t.accessToken;let n=t.styleUrl??Vc[t.appearance],a=new r.Map({container:e,style:n,center:t.center,zoom:t.zoom,interactive:t.interactive});t.bounds&&a.fitBounds([t.bounds[0],t.bounds[1]],{animate:false}),await new Promise(s=>{a.once("load",()=>s());}),o.onLoad(),a.on("error",s=>{let c=String(s?.error?.message??s?.message??"Mapbox error"),l=c.toLowerCase().includes("style");o.onError({code:l?"style-load-failed":"tile-load-failed",message:c,cause:s?.error??s});});let i=new globalThis.Map;return {setCenter:s=>a.setCenter(s),setZoom:s=>a.setZoom(s),setBounds:(s,c)=>a.fitBounds([s,c],{animate:false}),setAppearance:s=>{let c=t.styleUrl??Vc[s];a.setStyle(c,{diff:false});},setInteractive:s=>{let c=["scrollZoom","boxZoom","dragRotate","dragPan","keyboard","doubleClickZoom","touchZoomRotate"];for(let l of c){let m=a[l];m&&(s?m.enable():m.disable());}},flyTo:(s,c)=>a.flyTo({center:s,zoom:c?.zoom,duration:c?.durationMs??800}),panTo:(s,c)=>a.panTo(s,{duration:c?.durationMs??600}),fitBounds:(s,c)=>{if(s.length===0)return;let l=1/0,m=1/0,u=-1/0,g=-1/0;for(let[h,f]of s)h<l&&(l=h),f<m&&(m=f),h>u&&(u=h),f>g&&(g=f);a.fitBounds([[l,m],[u,g]],{padding:c?.paddingPx??40,duration:c?.durationMs??800});},getCenter:()=>{let s=a.getCenter();return [s.lng,s.lat]},getZoom:()=>a.getZoom(),getBounds:()=>{let s=a.getBounds();return [[s.getWest(),s.getSouth()],[s.getEast(),s.getNorth()]]},addMarker:(s,c,l)=>{let m=document.createElement("div");m.dataset.gdsPart="map-marker",m.dataset.gdsState="idle",m.style.cursor="pointer",m.addEventListener("mouseenter",()=>o.onMarkerHover(s)),m.addEventListener("mouseleave",()=>o.onMarkerHover(null)),m.addEventListener("click",h=>{o.onMarkerClick(s,g.coords,h);});let u=new r.Marker({element:m,anchor:l==="center"?"center":"bottom"}).setLngLat(c).addTo(a),g={element:m,coords:c,setHovered:h=>{m.dataset.gdsState=h?"hovered":"idle",m.style.zIndex=h?"10":"1";},setPosition:h=>{g.coords=h,u.setLngLat(h);},remove:()=>{u.remove(),i.delete(s);}};return i.set(s,{marker:u,handle:g}),g},destroy:()=>{i.forEach(({marker:s})=>s.remove()),i.clear(),a.remove();},instance:a}};});var Uc={};Jr(Uc,{createGoogleAdapter:()=>Sh});var wh,Rh,$c,Sh,Kc=gr(()=>{wh=[{featureType:"poi",stylers:[{visibility:"off"}]},{featureType:"transit",stylers:[{visibility:"simplified"}]}],Rh=[{elementType:"geometry",stylers:[{color:"#1a1a1a"}]},{elementType:"labels.text.stroke",stylers:[{color:"#1a1a1a"}]},{elementType:"labels.text.fill",stylers:[{color:"#9ca3af"}]},{featureType:"poi",stylers:[{visibility:"off"}]},{featureType:"road",elementType:"geometry",stylers:[{color:"#262626"}]},{featureType:"road",elementType:"labels.text.fill",stylers:[{color:"#9ca3af"}]},{featureType:"water",elementType:"geometry",stylers:[{color:"#0f172a"}]},{featureType:"transit",stylers:[{visibility:"simplified"},{color:"#3a3a3a"}]}],$c=e=>e==="dark"?Rh:wh,Sh=async(e,t,o)=>{if(!t.apiKey)throw o.onError({code:"api-key-missing",message:'@gradeui/ui Map: provider="google" requires an `apiKey` prop.'}),new Error("google apiKey missing");let r;try{let l=await import('@googlemaps/js-api-loader');r=l.Loader??l.default?.Loader;}catch(l){throw o.onError({code:"sdk-missing",message:'@gradeui/ui Map: `@googlemaps/js-api-loader` is not installed. Run `pnpm add @googlemaps/js-api-loader` to use provider="google".',cause:l}),l}let n=new r({apiKey:t.apiKey,version:"weekly",libraries:["maps","marker"]}),a;try{a=await n.load();}catch(l){throw o.onError({code:"provider-init-failed",message:"@gradeui/ui Map: Google Maps loader failed.",cause:l}),l}let i=t.appearance==="satellite",p=new a.maps.Map(e,{center:{lat:t.center[1],lng:t.center[0]},zoom:t.zoom,mapTypeId:i?a.maps.MapTypeId.HYBRID:a.maps.MapTypeId.ROADMAP,mapId:t.mapId,styles:i?void 0:$c(t.appearance==="dark"?"dark":"light"),disableDefaultUI:!t.interactive,gestureHandling:t.interactive?"auto":"none",keyboardShortcuts:t.interactive});if(t.bounds){let l=new a.maps.LatLngBounds({lat:t.bounds[0][1],lng:t.bounds[0][0]},{lat:t.bounds[1][1],lng:t.bounds[1][0]});p.fitBounds(l);}await new Promise(l=>{a.maps.event.addListenerOnce(p,"idle",()=>l());}),o.onLoad();let s=new globalThis.Map;return {setCenter:l=>p.setCenter({lat:l[1],lng:l[0]}),setZoom:l=>p.setZoom(l),setBounds:(l,m)=>{let u=new a.maps.LatLngBounds({lat:l[1],lng:l[0]},{lat:m[1],lng:m[0]});p.fitBounds(u);},setAppearance:l=>{l==="satellite"?(p.setMapTypeId(a.maps.MapTypeId.HYBRID),p.setOptions({styles:void 0})):(p.setMapTypeId(a.maps.MapTypeId.ROADMAP),p.setOptions({styles:$c(l)}));},setInteractive:l=>{p.setOptions({disableDefaultUI:!l,gestureHandling:l?"auto":"none",keyboardShortcuts:l});},flyTo:(l,m)=>{p.panTo({lat:l[1],lng:l[0]}),m?.zoom!=null&&p.setZoom(m.zoom);},panTo:l=>p.panTo({lat:l[1],lng:l[0]}),fitBounds:(l,m)=>{if(l.length===0)return;let u=new a.maps.LatLngBounds;for(let[g,h]of l)u.extend({lat:h,lng:g});p.fitBounds(u,m?.paddingPx??40);},getCenter:()=>{let l=p.getCenter();return l?[l.lng(),l.lat()]:[0,0]},getZoom:()=>p.getZoom()??0,getBounds:()=>{let l=p.getBounds();if(!l)return [[0,0],[0,0]];let m=l.getSouthWest(),u=l.getNorthEast();return [[m.lng(),m.lat()],[u.lng(),u.lat()]]},addMarker:(l,m,u)=>{let g=document.createElement("div");g.dataset.gdsPart="map-marker",g.dataset.gdsState="idle",g.style.cursor="pointer",u==="center"&&(g.style.transform="translateY(50%)"),g.addEventListener("mouseenter",()=>o.onMarkerHover(l)),g.addEventListener("mouseleave",()=>o.onMarkerHover(null)),g.addEventListener("click",b=>{o.onMarkerClick(l,f.coords,b);});let h=new a.maps.marker.AdvancedMarkerElement({map:p,position:{lat:m[1],lng:m[0]},content:g}),f={element:g,coords:m,setHovered:b=>{g.dataset.gdsState=b?"hovered":"idle",h.zIndex=b?10:1;},setPosition:b=>{f.coords=b,h.position={lat:b[1],lng:b[0]};},remove:()=>{h.map=null,s.delete(l);}};return s.set(l,{marker:h,handle:f}),f},destroy:()=>{s.forEach(({marker:l})=>{l.map=null;}),s.clear();},instance:p}};});var Yc={};Jr(Yc,{createLeafletAdapter:()=>Mh});function Ch(){if(typeof document>"u"||globalThis.__gradeLeafletCssBundled||document.getElementById(qc))return;let e=document.createElement("link");e.id=qc,e.rel="stylesheet",e.href=kh,document.head.appendChild(e);}var kh,qc,Zc,Th,Ph,Mh,Xc=gr(()=>{kh="https://unpkg.com/leaflet@1.9.4/dist/leaflet.css",qc="gds-leaflet-css";Zc={light:"rastertiles/voyager",dark:"rastertiles/dark_all",satellite:"rastertiles/voyager"},Th=e=>`https://{s}.basemaps.cartocdn.com/${e}/{z}/{x}/{y}{r}.png`,Ph="\xA9 OpenStreetMap contributors \xA9 CARTO",Mh=async(e,t,o)=>{Ch();let r;try{r=await import('leaflet'),r.default&&(r=r.default);}catch(u){throw o.onError({code:"sdk-missing",message:"@gradeui/ui Map: `leaflet` is not installed. Run `pnpm add leaflet` to use the worker-free Leaflet adapter.",cause:u}),u}let n=u=>[u[1],u[0]],a=r.map(e,{center:n(t.center),zoom:t.zoom,zoomControl:t.interactive,attributionControl:true,dragging:t.interactive,scrollWheelZoom:t.interactive,doubleClickZoom:t.interactive,boxZoom:t.interactive,keyboard:t.interactive,touchZoom:t.interactive}),i=u=>{let g=r.tileLayer(Th(Zc[u]??Zc.light),{maxZoom:20,subdomains:"abcd",detectRetina:true,attribution:Ph,crossOrigin:true});return g.on("tileerror",()=>o.onError({code:"tile-load-failed",message:"map tile failed to load (is the tile host allowed by CSP?)"})),g.addTo(a),g},p=i(t.appearance),s=u=>{p&&a.removeLayer(p),p=i(u);};t.bounds&&a.fitBounds([n(t.bounds[0]),n(t.bounds[1])],{animate:false}),o.onLoad();let c=typeof ResizeObserver<"u"?new ResizeObserver(()=>a.invalidateSize(false)):null;c?.observe(e),requestAnimationFrame(()=>a.invalidateSize(false)),window.setTimeout(()=>a.invalidateSize(false),200),window.setTimeout(()=>a.invalidateSize(false),600);let l=new globalThis.Map;return {setCenter:u=>a.panTo(n(u),{animate:false}),setZoom:u=>a.setZoom(u),setBounds:(u,g)=>a.fitBounds([n(u),n(g)],{animate:false}),setAppearance:u=>s(u),setInteractive:u=>{let g=["dragging","scrollWheelZoom","doubleClickZoom","boxZoom","keyboard","touchZoom"];for(let h of g){let f=a[h];f&&(u?f.enable():f.disable());}},flyTo:(u,g)=>a.flyTo(n(u),g?.zoom??a.getZoom(),{duration:(g?.durationMs??800)/1e3}),panTo:(u,g)=>a.panTo(n(u),{duration:(g?.durationMs??600)/1e3}),fitBounds:(u,g)=>{if(u.length===0)return;let h=g?.paddingPx??40;a.fitBounds(u.map(n),{padding:[h,h],duration:(g?.durationMs??800)/1e3});},getCenter:()=>{let u=a.getCenter();return [u.lng,u.lat]},getZoom:()=>a.getZoom(),getBounds:()=>{let u=a.getBounds(),g=u.getSouthWest(),h=u.getNorthEast();return [[g.lng,g.lat],[h.lng,h.lat]]},addMarker:(u,g,h)=>{let f=document.createElement("div");f.dataset.gdsPart="map-marker",f.dataset.gdsState="idle",f.style.position="absolute",f.style.cursor="pointer",f.style.transform=h==="center"?"translate(-50%, -50%)":"translate(-50%, -100%)",f.addEventListener("mouseenter",()=>o.onMarkerHover(u)),f.addEventListener("mouseleave",()=>o.onMarkerHover(null)),f.addEventListener("click",x=>o.onMarkerClick(u,w.coords,x));let b=r.divIcon({className:"gds-leaflet-marker",html:"",iconSize:[0,0],iconAnchor:[0,0]}),y=r.marker(n(g),{icon:b,interactive:true,keyboard:false}).addTo(a),R=y.getElement();R&&(R.style.pointerEvents="auto",R.appendChild(f));let w={element:f,coords:g,setHovered:x=>{f.dataset.gdsState=x?"hovered":"idle",R&&(R.style.zIndex=x?"1000":"");},setPosition:x=>{w.coords=x,y.setLatLng(n(x));},remove:()=>{a.removeLayer(y),l.delete(u);}};return l.set(u,{marker:y,handle:w}),w},destroy:()=>{c?.disconnect(),l.forEach(({marker:u})=>a.removeLayer(u)),l.clear(),a.remove();},instance:a}};});var wi={name:"Accordion",description:`Long-form content that would overwhelm if shown all at once \u2014 FAQs, settings groups, "what's included" sections, nested help. For tab-style peer views with one always visible, reach for Tabs. For a single show/hide reveal use Collapsible.`,import:"@gradeui/ui",aliases:["accordion","faq","expand","collapse list","disclosure list","disclosure group","outline group","expandable list","sectionlist"],subcomponents:["AccordionItem","AccordionTrigger","AccordionContent"],composesWith:["Card (as a faq inside a card body)","Section primitives"],styleDefaults:{AccordionItem:"border-b",AccordionTrigger:"flex flex-1 items-center justify-between py-4 font-medium transition-all hover:underline [&[data-state=open]>svg]:rotate-180",AccordionContent:"pb-4 pt-0"},props:{type:{schema:zod.z.enum(["single","multiple"]),design:"knob",description:"single keeps one open at a time, multiple lets several be open at once"},collapsible:{schema:zod.z.boolean().optional(),design:"knob",description:'only valid with type="single"; allows the open item to be toggled shut'},defaultValue:{schema:zod.z.union([zod.z.string(),zod.z.array(zod.z.string())]).optional(),design:"knob",description:"initial open item(s)"},value:{schema:zod.z.union([zod.z.string(),zod.z.array(zod.z.string())]).optional(),design:"knob",description:"controlled"},onValueChange:{schema:zod.z.unknown().optional(),design:"event"},children:{schema:zod.z.unknown(),design:"plumbing",description:"the row label users click to expand"}}};var Ri={name:"AiChat",description:'A flexible chat block \u2014 header + scrollable message list + composer. Out of the box it looks like a polished "AI panel"; under it, every region is a slot so hosts can compose richer chat surfaces (e.g. Studio\'s left column with selection chip + settings panel above the composer, an error banner inline, per-message usage / refs / actions). Per-turn token usage, refs, and actions are optional and gated by `showUsage` / `showRefs` / `showActions` \u2014 leave them off for product-facing chats, turn them on for developer-facing ones where transparency matters. Composes with [[AIChatComposer]] (rendered internally; can be slotted in with custom props via `composerSlot`).',import:"@gradeui/ui",aliases:["ai chat","chat panel","chat block","llm chat","assistant panel","copilot chat","ai assistant"],composesWith:["Card (host in a sidebar panel)","Sheet (mobile drawer)","Stack (place above other content)","AIChatComposer (internal composer; slot to override)"],styleDefaults:{MessageActions:"inline-flex items-center gap-1 rounded-md px-2 py-1 text-[11px]",ThinkingDisclosure:"w-3.5 h-3.5 text-gds-gray-500 dark:text-gds-gray-400 shrink-0",StepsDisclosure:"w-3.5 h-3.5 text-gds-gray-500 dark:text-gds-gray-400 transition-transform shrink-0",AIChat:"flex flex-col overflow-hidden"},props:{messages:{schema:zod.z.unknown().optional(),design:"plumbing",description:'`{ id, role: "user" | "assistant", content, timestamp, thinking?, steps?, usage?, refs?, actions?, duration? }`; defaults to empty'},onSendMessage:{schema:zod.z.unknown().optional(),design:"event",description:"fires when the user submits via the default composer; ignored if `composerSlot` is set"},isLoading:{schema:zod.z.boolean().optional(),design:"knob",description:"shows a typing indicator at the bottom of the message list"},placeholder:{schema:zod.z.string().optional(),design:"content",description:"composer placeholder text (ignored if `composerSlot` is set)"},title:{schema:zod.z.string().optional(),design:"plumbing",description:'header title; defaults to "AI Assistant"'},titleIcon:{schema:zod.z.unknown().optional(),design:"plumbing",description:"optional icon rendered before the title (e.g. `<Sparkles />`)"},headerTokens:{schema:zod.z.number().optional(),design:"knob",description:'optional session-level token total shown on the right of the header; rendered as "N tokens" with a small gauge icon when set'},headerEnd:{schema:zod.z.unknown().optional(),design:"plumbing",description:"optional arbitrary content appended after `headerTokens` on the right of the header"},showUsage:{schema:zod.z.boolean().optional(),design:"knob",description:"show the per-turn `usage` strip below the assistant bubble; default false"},showRefs:{schema:zod.z.boolean().optional(),design:"knob",description:"show the per-turn `refs` strip below the assistant bubble; default false"},showActions:{schema:zod.z.boolean().optional(),design:"knob",description:"render per-turn `actions` chips when a message has them; default true"},showDuration:{schema:zod.z.boolean().optional(),design:"knob",description:'render the per-turn wall-clock duration ("2.3s") below the assistant bubble when a message carries `duration`; default false'},showThinking:{schema:zod.z.boolean().optional(),design:"knob",description:'render the per-turn reasoning ("Thoughts") disclosure above the assistant prose when a message carries `thinking`; collapsed by default, click to expand; default false'},showSteps:{schema:zod.z.boolean().optional(),design:"knob",description:'render the per-turn step timeline above the assistant prose when a message carries `steps`; collapsed view shows the current running step (or "N steps completed"), click to expand the vertical timeline with status glyphs; default false'},thinkingPhrase:{schema:zod.z.string().optional(),design:"content",description:'override the "Thinking" label in the loading indicator'},suggestedPrompts:{schema:zod.z.unknown().optional(),design:"plumbing",description:"empty-state quick prompts (ignored if `emptyStateSlot` is set)"},emptyStateSlot:{schema:zod.z.unknown().optional(),design:"plumbing",description:"replaces the default empty state entirely"},errorSlot:{schema:zod.z.unknown().optional(),design:"plumbing",description:"rendered after the messages list (typically an error banner)"},composerAboveSlot:{schema:zod.z.unknown().optional(),design:"plumbing",description:"rendered between the messages and the composer (selection chip, settings panel)"},composerBelowSlot:{schema:zod.z.unknown().optional(),design:"plumbing",description:"rendered below the composer (disclaimer, char counter)"},composerSlot:{schema:zod.z.unknown().optional(),design:"plumbing",description:"full override of the composer; when provided, `onSendMessage` + `placeholder` are unused"},bare:{schema:zod.z.boolean().optional(),design:"knob",description:"strip the outer card chrome (background, border, rounded corners) so the chat takes the surface of its container; default false (keeps the canned card look)"},assistantBubble:{schema:zod.z.boolean().optional(),design:"knob",description:"whether assistant messages render with a bubble (background + border + padding + rounded corners); default true. Set false for a Claude.ai-style chromeless transcript where assistant text sits on the surface and only user turns wear a bubble."},className:{schema:zod.z.string().optional(),design:"plumbing"}}};var Si={name:"AiChatComposer",description:"The reusable \"input card\" for any chat surface \u2014 auto-growing textarea, image attachments via paperclip and clipboard paste, attachment chips with previews, Send/Stop toggle, controlled value. Drop in below any messages list. Use this when you want the input affordances of `<AIChat>` but you're rendering your own messages list / scrollarea / header (e.g. Studio's left-column chat, where SelectionChip and SettingsPanel sit between messages and composer). For the full canned chat block, use `<AIChat>` instead.",import:"@gradeui/ui",aliases:["chat composer","chat input","prompt composer","message input"],composesWith:["AIChat (uses this internally)","Card (host above)","ScrollArea (place messages above)"],styleDefaults:{AIChatComposer:"w-full"},props:{value:{schema:zod.z.string(),design:"content",description:"controlled textarea value"},onChange:{schema:zod.z.unknown(),design:"event",description:"fires for every textarea change"},onSend:{schema:zod.z.unknown(),design:"event",description:"fires when the user submits (Enter or click Send); composer validates that text or attachments exist before firing"},isLoading:{schema:zod.z.boolean().optional(),design:"knob",description:"disables the textarea + paperclip and swaps Send for Stop"},onStop:{schema:zod.z.unknown().optional(),design:"event",description:"fires when the user clicks Stop; without this, Stop renders disabled"},placeholder:{schema:zod.z.string().optional(),design:"content"},maxLength:{schema:zod.z.number().optional(),design:"knob",description:"hard cap passed to the underlying `<textarea>`"},showHint:{schema:zod.z.boolean().optional(),design:"knob",description:'show the "Press Enter\u2026 \xB7 Paste images" hint below the card; default true, set false when the host renders its own footer'},className:{schema:zod.z.string().optional(),design:"plumbing"}}};var ki={name:"AppShell",description:`The top-level page scaffold for any app-like or marketing layout. Reach for AppShell
3
3
  instead of hand-rolling \`grid grid-cols-[auto_1fr]\` so the layout shape (top nav,
4
4
  side nav, three-pane Slack/Mail/Notion shape, constrained vs full-width main) is a
5
5
  prop the settings panel can mutate. Don't compose top-level layouts from raw grid
@@ -14,7 +14,7 @@ Pick the \`nav\` variant from the source:
14
14
  shape. ANY time you see a vertical icon rail next to
15
15
  a separate list/sidebar, this is the answer \u2014 don't
16
16
  reach for raw \`<div className="grid">\` with three
17
- column tracks.`,import:"@gradeui/ui",subcomponents:["AppShellHeader","AppShellNav","AppShellAside","AppShellMain","AppShellFooter"],composesWith:["Stack","Row","Card","Button","Separator","Sidebar","Toolbar","any page content"],styleDefaults:{AppShell:"gds-app-shell min-h-screen w-full bg-background text-foreground grid",AppShellHeader:"gds-app-shell-header",AppShellNav:"gds-app-shell-nav border-b bg-background",AppShellAside:"gds-app-shell-aside min-w-0 border-r bg-background",AppShellMain:"gds-app-shell-main min-w-0 w-full",AppShellFooter:"gds-app-shell-footer border-t bg-background"},variantDefaults:{nav:"none"},props:{nav:{schema:zod.z.enum(["none","top","side","three-pane"]).optional(),design:"knob",description:"layout structure",default:"none"},asChild:{schema:zod.z.boolean().optional(),design:"plumbing",description:"render as the child element via Slot",default:false},className:{schema:zod.z.string().optional(),design:"plumbing"},children:{schema:zod.z.unknown(),design:"plumbing"}}};var gi={name:"Avatar",description:"User/entity identity for PEOPLE \u2014 profile pictures, author rows, member lists, account headers. Circular by default; the AvatarFallback initials read as a person's name. Always include AvatarFallback so load failure doesn't leave a gap.",import:"@gradeui/ui",aliases:["profile picture","user image","account image","avatar","person glyph","user avatar","profile image","react native avatar"],subcomponents:["AvatarImage","AvatarFallback"],composesWith:["Card (in CardHeader)","Table cells","Badge (placed next to for status)","Skeleton (loading state)"],styleDefaults:{AvatarImage:"aspect-square h-full w-full"},props:{className:{schema:zod.z.unknown().optional(),design:"plumbing",description:"set size via utilities (default h-10 w-10)"},src:{schema:zod.z.unknown(),design:"plumbing"},initials:{schema:zod.z.unknown(),design:"plumbing"}}};var fi={name:"BackgroundFill",description:"The background *paint* of a frame \u2014 a generative shader, image, video, gradient, repeating texture, or solid token rendered as a layer BEHIND the frame's content. Use it as the first child of a `relative` frame; it paints an `absolute inset-0`, `z-0`, `pointer-events-none` layer, so content carrying `relative z-10` sits on top. This is the canonical way to give any container a rich background \u2014 never drop a full-bleed `<ThreeScene>` or `<img>` as a free-standing sibling. For a sized, in-flow media element (a hero card, a thumbnail), use ThreeScene / MediaSurface / VideoPlayer directly instead.",import:"@gradeui/ui",aliases:["background","fill","frame fill","backdrop","surface fill","background image","background video","background gradient","background shader","texture","paint"],composesWith:["AppShell","Card","Stack","Row","Grid (any relative container)","ThreeScene (shader fill)","MediaSurface"],styleDefaults:{BackgroundFill:"absolute inset-0 h-full w-full"},props:{type:{schema:zod.z.enum(["none","solid","gradient","image","video","shader"]),design:"knob",description:"which paint to render (required)"},color:{schema:zod.z.string().optional(),design:"content",description:"solid fill; a token name (`primary`, `card`, `muted`, `accent`, `secondary`, `destructive`, `background`, `transparent`) or any CSS colour"},gradient:{schema:zod.z.unknown().optional(),design:"plumbing",description:'stops are token names or CSS colours. shape: "linear" (default, uses `angle`, default 135\xB0) | "radial" (uses `at` \u2014 CSS position like "top" / "30% 20%", default "center" \u2014 and optional `size` like "45rem 50rem", default farthest-corner)'},src:{schema:zod.z.string().optional(),design:"content",description:"image or video URL"},fit:{schema:zod.z.enum(["cover","contain","fill","none"]).optional(),design:"knob",description:'object-fit for image/video (default "cover")'},position:{schema:zod.z.string().optional(),design:"content",description:'CSS object/background position (default "center")'},repeat:{schema:zod.z.boolean().optional(),design:"knob",description:"tile the image (background-repeat) instead of a single <img>"},tileSize:{schema:zod.z.string().optional(),design:"content",description:'CSS background-size when repeating (e.g. "120px")'},preset:{schema:zod.z.string().optional(),design:"content",description:"shader preset id (see ThreeScene)"},fragmentShader:{schema:zod.z.string().optional(),design:"content",description:"custom GLSL (takes precedence over preset)"},palette:{schema:zod.z.unknown().optional(),design:"plumbing",description:"shader palette overrides; wrap tokens as `oklch(var(--token))`"},postPreset:{schema:zod.z.string().optional(),design:"content",description:"shader post-FX"},opacity:{schema:zod.z.number().optional(),design:"knob",description:"layer opacity 0\u20131"},blendMode:{schema:zod.z.unknown().optional(),design:"plumbing",description:"blend against the frame behind it"},radius:{schema:zod.z.enum(["none","sm","md","lg","xl"]).optional(),design:"knob",description:"match the frame's radius so the paint clips cleanly"}}};var bi={name:"Badge",description:"Compact status chips, counts, tags, pills. For higher-signal inline status \u2192 use Callout. For solid CTAs \u2192 Button. Soft/outline variants are quieter; solid variants are loud.",import:"@gradeui/ui",aliases:["chip","tag","pill","label chip","badge","tag view","status pill","token","count badge"],composesWith:["Card","Table (inside a cell)","Avatar (next to it)","anywhere inline"],styleDefaults:{Badge:"inline-flex items-center gap-1 border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 [&_svg]:size-3 [&_svg]:shrink-0 border-transparent bg-primary text-primary-foreground shadow hover:bg-primary/80 rounded-md"},variantDefaults:{variant:"default",rounded:"default"},props:{variant:{schema:zod.z.enum(["see list above"]).optional(),design:"knob"},rounded:{schema:zod.z.enum(["default","full"]).optional(),design:"knob",description:'"full" gives a pill shape'}}};var vi={name:"Banner",description:`A full-width horizontal strip surfacing system-level state, announcements, or first-run guidance \u2014 "you're previewing a draft", "investigating incident", "new feature available", "send your design to Figma". Distinct from Callout (inline boxed message in the layout flow), Toast (transient floating notification), Dialog (modal interrupt). Banner is what lives at the TOP of an AppShellHeader, page, or panel.`,import:"@gradeui/ui",aliases:["banner","notification banner","system banner","header banner","announcement bar","top bar","status bar","promo banner","incident banner","draft banner","first run banner","glass banner","sticky banner"],composesWith:["AppShellHeader (most common host \u2014 banner sits ABOVE the header content)","Button (in the action slot)","Link (inside the content)","Lucide icons (in the icon slot)"],styleDefaults:{Banner:"relative flex items-center gap-3 px-4 py-2.5 text-sm leading-relaxed border-b bg-muted text-foreground border-border [&>svg]:text-muted-foreground justify-between"},variantDefaults:{variant:"default",align:"between"},props:{variant:{schema:zod.z.enum(["default","info","success","warning","destructive","announcement"]).optional(),design:"knob",description:'intent + tonal direction. `default` is a calm muted strip; `announcement` is a low-alpha brand tint for "new feature" messaging; status variants pick up the soft+deep token pairs.'},surface:{schema:zod.z.enum(["solid","translucent","glass","glass-strong"]).optional(),design:"knob",description:"material applied over the variant tint. `glass` for banners that sit over imagery / generative backdrops."},align:{schema:zod.z.enum(["start","center","between"]).optional(),design:"knob",description:"justify behaviour of the inner flex row. Defaults to `between` so the action / dismiss button right-align."},sticky:{schema:zod.z.boolean().optional(),design:"knob",description:"stick to the top of the scroll container."},dismissible:{schema:zod.z.boolean().optional(),design:"knob",description:"render the trailing X close button. Pair with `onDismiss` to react."},onDismiss:{schema:zod.z.unknown().optional(),design:"event"},icon:{schema:zod.z.unknown().optional(),design:"plumbing",description:"leading icon slot. NOT inferred from variant; pass what fits the message."},action:{schema:zod.z.unknown().optional(),design:"plumbing",description:'trailing slot before dismiss. Usually a `<Button size="sm">` or `<a>`.'},role:{schema:zod.z.string().optional(),design:"plumbing",description:"overrides the automatic role mapping (warning/destructive \u2192 alert, others \u2192 status)."}}};var yi={name:"Breadcrumb",description:'Reach for Breadcrumb whenever a screen sits inside a hierarchy and you want the path back to the top to be visible. Common spots: above page titles in admin/CMS screens, top of Settings detail pages, after a router redirect when the URL implies depth. Use the current page as a <BreadcrumbPage> (non-clickable) and prior levels as <BreadcrumbLink>. For a horizontal "top nav" of peer destinations use Side Menu or Tabs instead \u2014 Breadcrumb is strictly for hierarchical path.',import:"@gradeui/ui",aliases:["breadcrumb","breadcrumbs","crumbs","path","page hierarchy","path bar","navigation trail","finder path"],subcomponents:["BreadcrumbList","BreadcrumbItem","BreadcrumbLink","BreadcrumbPage","BreadcrumbSeparator","BreadcrumbEllipsis"],composesWith:["AppShellMain","Card (in CardHeader)","Dialog"],styleDefaults:{BreadcrumbList:"flex flex-wrap items-center gap-1.5 break-words text-xs text-muted-foreground",BreadcrumbItem:"inline-flex items-center gap-1.5",BreadcrumbPage:"inline-flex items-center gap-1.5 px-0.5 text-xs font-medium text-foreground",BreadcrumbSeparator:"[&_svg]:size-3 [&_svg]:shrink-0 text-muted-foreground/60",BreadcrumbEllipsis:"flex h-5 w-5 items-center justify-center",BreadcrumbMenuTrigger:"h-3 w-3 text-muted-foreground transition-transform"},props:{"aria-label":{schema:zod.z.unknown().optional(),design:"plumbing",description:"passed to the underlying <nav>"},separator:{schema:zod.z.unknown().optional(),design:"plumbing",description:'**tree-wide default** for every <BreadcrumbSeparator/> inside. Pass a string ("/", "\u203A", "\u2022"), a lucide icon (`<Slash/>`, `<ChevronRight/>`), or any ReactNode. Default: `<ChevronRight/>`. Set once on the root; every separator below picks it up via context.'},className:{schema:zod.z.unknown().optional(),design:"plumbing",description:"the <ol> wrapper; usually no overrides needed"},href:{schema:zod.z.unknown().optional(),design:"plumbing",description:"renders as <a> when set, <button> when not; asChild? wraps a custom element"},children:{schema:zod.z.unknown().optional(),design:"plumbing",description:"per-instance override of the separator glyph. When set, beats the root's `separator` prop for this one slot. When not set, falls back to the root's `separator`, then to `<ChevronRight/>`."}}};var xi={name:"Button",description:'Any clickable action. Use size="icon" for square icon-only buttons, variant="link" for inline links that should look like Button, variant="raised" for high-commitment / weighty actions where the chrome can afford a tactile "physical key" treatment. A Button placed next to a TabsList of the same size lines up edge-to-edge without per-call overrides.',import:"@gradeui/ui",aliases:["button","push button","plain button","bordered button","destructive button","capsule button","link button","action button","cta","raised button","pill button","key button"],composesWith:["Dialog","DropdownMenu","Tooltip","Card (in CardFooter)","Row","Form controls"],styleDefaults:{Button:"inline-flex items-center justify-center whitespace-nowrap rounded-md font-medium transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 bg-primary text-primary-foreground shadow hover:bg-primary/90 h-8 gap-1.5 px-3 text-base [&_svg]:size-4"},variantDefaults:{variant:"default",size:"md"},props:{variant:{schema:zod.z.enum(["default","destructive","outline","secondary","ghost","link","raised"]).optional(),design:"knob"},size:{schema:zod.z.enum(["sm","md","lg","icon"]).optional(),design:"knob",description:"t-shirt scale aligned with Tabs/ToggleGroup heights (sm=h-7, md=h-8, lg=h-10). `default` still works as an alias for `md`."},asChild:{schema:zod.z.boolean().optional(),design:"plumbing",description:"renders as the child element (use to wrap <a>/<Link>)"},disabled:{schema:zod.z.boolean().optional(),design:"knob"}}};var wi={name:"Calendar",description:'An inline date grid \u2014 date-of-birth pickers in profile forms, scheduling screens with a month view, range selection in reporting filters. For a compact trigger-and-popover input, use DatePicker / DateRangePicker (which wrap Calendar internally). For one-off relative dates ("yesterday", "last week") use a Select instead.',import:"@gradeui/ui",aliases:["calendar","date grid","month view","scheduler grid","calendar view","multidate picker","react native calendars"],subcomponents:["CalendarDayButton"],composesWith:["Popover (DatePicker composes them)","Card (inline scheduling card)","Dialog (full-screen mobile date pick)"],styleDefaults:{Calendar:"bg-background group/calendar p-3 [--cell-size:2rem] [[data-slot=card-content]_&]:bg-transparent [[data-slot=popover-content]_&]:bg-transparent"},props:{mode:{schema:zod.z.enum(["single","multiple","range"]).optional(),design:"knob",description:"picks one date, several dates, or a [from, to] range"},selected:{schema:zod.z.unknown().optional(),design:"plumbing",description:"controlled selection; shape matches `mode`"},onSelect:{schema:zod.z.unknown().optional(),design:"event",description:"fires with the new selection"},month:{schema:zod.z.unknown().optional(),design:"plumbing",description:"controlled displayed month"},defaultMonth:{schema:zod.z.unknown().optional(),design:"plumbing",description:"uncontrolled initial month"},onMonthChange:{schema:zod.z.unknown().optional(),design:"event"},numberOfMonths:{schema:zod.z.number().optional(),design:"knob",description:"render multiple months side by side, useful for range pickers"},disabled:{schema:zod.z.unknown().optional(),design:"plumbing"},captionLayout:{schema:zod.z.enum(["label","dropdown","dropdown-months","dropdown-years"]).optional(),design:"knob"},className:{schema:zod.z.string().optional(),design:"plumbing"}}};var Ri={name:"Callout",description:"Inline, ambient, non-blocking status/feedback that sits inside the layout flow. Form-level validation summaries, settings-page notices, page-level banners. NOT a toast (use Sonner for transient). NOT a modal (use Dialog when the user must respond). Put an icon as first child \u2014 it's auto-positioned; CalloutTitle + CalloutDescription follow.",import:"@gradeui/ui",aliases:["callout","banner","notice","inline alert","in-app notification","status banner","info banner","info callout","warning callout","success callout"],subcomponents:["CalloutTitle","CalloutDescription"],composesWith:["lucide-react icons as first child","Button (inside CalloutDescription)","Card (as a section callout)"],styleDefaults:{CalloutTitle:"mb-1 font-medium leading-none tracking-tight",CalloutDescription:"text-sm [&_p]:leading-relaxed"},props:{variant:{schema:zod.z.enum(["default","destructive","success","warning","info"]).optional(),design:"knob",description:"semantic colouring; `default` is neutral"}}};var ki={name:"Card",description:'Grouped content with a distinct surface \u2014 settings panels, dashboard tiles, list-of-cards layouts, marketing hero containers, AI suggestion overlays. Pair CardHeader (title + description) with CardContent and optional CardFooter (actions). Reach for `surface="glass"` whenever the card sits over a busy backdrop (gradient mesh, dot grid, generative art, image hero).',import:"@gradeui/ui",aliases:["card","group box","groupbox","panel","tile","surface","glass card","frosted card","floating panel","hero card","ai suggestion card","dashboard tile","settings panel"],subcomponents:["CardHeader","CardTitle","CardDescription","CardContent","CardFooter"],composesWith:["Button (in CardFooter)","Badge","Separator","Avatar","Code","MediaSurface","any form controls"],styleDefaults:{Card:"gds-card rounded-xl border text-card-foreground shadow",CardHeader:"flex flex-col space-y-1.5 p-6",CardTitle:"font-semibold leading-none tracking-tight",CardDescription:"text-sm text-muted-foreground",CardContent:"p-6 pt-0",CardFooter:"flex items-center p-6 pt-0"},props:{surface:{schema:zod.z.enum(["solid","translucent","glass","glass-strong"]).optional(),design:"knob",description:"what the card surface is *made of*. `solid` is the default opaque `bg-card`. `translucent` is ~82% opacity for menu sheets. `glass` is ~58% opacity + 14px blur + edge highlight for floating panels. `glass-strong` is ~42% + 24px blur for full-page overlays. Composes with `shadow-elevation-*` (depth) and `gds-aura-*` (state signal)."},Each:{schema:zod.z.unknown(),design:"plumbing"}}};var ap=zod.z.enum(["start","center","end"]),np=zod.z.object({delay:zod.z.number().int().positive().optional(),pauseOnHover:zod.z.boolean().optional(),pauseWhenOffscreen:zod.z.boolean().optional()}),ip=zod.z.union([zod.z.boolean(),np]),Ci={name:"Carousel",description:"Token-driven slideshow primitive. Embla under the hood, custom autoplay loop with per-slide duration overrides, and a VideoSlide variant that autoplays muted+loop with a poster fallback. Reach for it for marketing hero rotations, app onboarding tours, image galleries, TV/streaming featured rails \u2014 anywhere a horizontal stack of slides cycles automatically or on user input.",import:"@gradeui/ui",aliases:["carousel","slideshow","slider","hero rotation","image gallery","featured row","swipe deck"],subcomponents:["Carousel.Slide","Carousel.VideoSlide","Carousel.Dots","Carousel.Arrows","Carousel.Prev","Carousel.Next"],composesWith:["MediaSurface (inside Carousel.Slide for posters / album art)","Card (slide content)","Stack / Row (slide composition)"],props:{loop:{schema:zod.z.boolean().optional(),design:"knob",label:"Loop",default:true,description:"Wrap from the last slide back to the first. Default true \u2014 the natural fit for hero rotations. Turn off for finite onboarding sequences."},align:{schema:ap.optional(),design:"knob",control:"toggle-group",label:"Slide alignment",default:"start",description:"How slides line up inside the viewport when not at 100% width. 'start' is full-bleed; 'center' gives the 'peek of neighbours' carousel look."},slidesPerView:{schema:zod.z.number().int().positive().optional(),design:"knob",label:"Slides per view",default:1,description:"How many slides show at once. 1 for hero rotations; 3 for thumbnail strips; etc. For media-query responsive layouts, leave this at 1 and override `--gds-carousel-slide-basis` on each Slide via CSS."},autoplay:{schema:ip.optional(),design:"structured",label:"Autoplay",default:false,description:"`true` for sensible defaults (5s, pause on hover, pause offscreen). Object form: `{ delay, pauseOnHover, pauseWhenOffscreen }`. Per-slide overrides go on `<Carousel.Slide duration={ms}>`."},draggable:{schema:zod.z.boolean().optional(),design:"knob",label:"Drag to swipe",default:true,description:"Disable when slide content (a Map, a chart, a draggable card) needs to swallow drag events."},onSlideChange:{schema:zod.z.function().optional(),design:"event",description:"Fires with the new slide index whenever the active slide changes (programmatic, autoplay, or user swipe)."},className:{schema:zod.z.string().optional(),design:"plumbing"},style:{schema:zod.z.record(zod.z.string(),zod.z.unknown()).optional(),design:"plumbing"},children:{schema:zod.z.unknown(),design:"plumbing",description:"Carousel.Slide / Carousel.VideoSlide children, plus optionally Carousel.Dots and Carousel.Arrows."}}};var Ti={name:"Chart",description:"Reporting dashboards, single-purpose analytics cards (revenue, conversions, active users), or anywhere you'd otherwise hand-roll a Recharts setup. Bring the actual chart type from `recharts` \u2014 ChartContainer doesn't pick the chart shape for you, it themes whatever you nest. For sparkline-style decorative trends consider just rendering a small SVG line directly; ChartContainer is overkill for non-interactive ornament.",import:"@gradeui/ui",aliases:["chart","charts","graph","bar chart","line chart","area chart","recharts","analytics chart","swift chart","swiftui chart","victory chart","victory native"],subcomponents:["ChartTooltip","ChartTooltipContent","ChartLegend","ChartLegendContent","ChartStyle"],composesWith:["Card (chart-in-a-card pattern)","Tabs (multi-metric switcher)","Recharts components (Bar","Line","Area","Pie",'Radar from "recharts")'],styleDefaults:{ChartContainer:"flex aspect-video justify-center text-xs [&_.recharts-cartesian-axis-tick_text]:fill-muted-foreground [&_.recharts-cartesian-grid_line[stroke='#ccc']]:stroke-border/50 [&_.recharts-curve.recharts-tooltip-cursor]:stroke-border [&_.recharts-dot[stroke='#fff']]:stroke-transparent [&_.recharts-layer]:outline-none [&_.recharts-polar-grid_[stroke='#ccc']]:stroke-border [&_.recharts-radial-bar-background-sector]:fill-muted [&_.recharts-rectangle.recharts-tooltip-cursor]:fill-muted [&_.recharts-reference-line_[stroke='#ccc']]:stroke-border [&_.recharts-sector[stroke='#fff']]:stroke-transparent [&_.recharts-sector]:outline-none [&_.recharts-surface]:outline-none",ChartTooltipContent:"font-medium",ChartLegendContent:"flex items-center justify-center gap-4"},props:{config:{schema:zod.z.unknown(),design:"plumbing",description:'`{ [seriesKey]: { label: string; color?: string; theme?: { light: string; dark: string } } }`; the keys here are the names you reference in your Recharts <Bar dataKey="\u2026" /> calls'},id:{schema:zod.z.string().optional(),design:"plumbing",description:"used for the inlined <style> tag"},children:{schema:zod.z.unknown(),design:"plumbing",description:"typically a single Recharts ResponsiveContainer or chart"},passes:{schema:zod.z.unknown(),design:"plumbing",description:"pair with `content={<ChartTooltipContent />}`"},indicator:{schema:zod.z.enum(["dot","line","dashed"]).optional(),design:"knob"},ChartLegend:{schema:zod.z.unknown(),design:"plumbing"}}};var Pi={name:"Checkbox",description:"Binary on/off tied to a list (select multiple, agree to terms). Single on/off that controls a setting is better with Switch. For a label + description row, wrap in Field. When each option should be a whole selectable card (label + description, selected state on the card surface), use CheckboxCard.",import:"@gradeui/ui",aliases:["checkbox","tickbox","tick box","check","multi-select item"],composesWith:["Label (via htmlFor)","Field (label + description row)","CheckboxCard (whole-card selectable option)","Card","Form rows","Table (for row selection)"],styleDefaults:{Checkbox:"flex items-center justify-center text-current"},props:{checked:{schema:zod.z.boolean().optional(),design:"knob"},onCheckedChange:{schema:zod.z.unknown().optional(),design:"event"},defaultChecked:{schema:zod.z.boolean().optional(),design:"knob"},disabled:{schema:zod.z.boolean().optional(),design:"knob"},id:{schema:zod.z.string().optional(),design:"plumbing",description:"bind a Label's htmlFor to this"}}};var Ni={name:"CheckboxCard",description:"Multi-select where each option is a whole selectable card (add-ons, feature toggles, opt-ins). The whole card is the control, so focus and the checked state live on the card surface. Standalone (not in a group). Static content only \u2014 never nest an interactive control inside. For a plain checkbox + label row use Field instead.",import:"@gradeui/ui",aliases:["checkbox card","selectable card","multi-select card","add-on card","feature card","opt-in card"],composesWith:["Badge (in aside)","MediaSurface (custom children)","Stack / Grid (laying out several)"],props:{checked:{schema:zod.z.unknown().optional(),design:"plumbing",description:"standard checkbox state"},label:{schema:zod.z.unknown().optional(),design:"plumbing",description:"title line"},description:{schema:zod.z.unknown().optional(),design:"plumbing",description:"secondary line"},aside:{schema:zod.z.unknown().optional(),design:"plumbing",description:"slot before the indicator (a Badge, price, hint)"},hideIndicator:{schema:zod.z.boolean().optional(),design:"knob",description:"hide the check; selection shown by the card border + background"},indicatorPosition:{schema:zod.z.enum(["leading","trailing"]).optional(),design:"knob",description:"default trailing"},children:{schema:zod.z.unknown().optional(),design:"plumbing",description:"arbitrary static content instead of label/description"}}};var Mi={name:"Code",description:'Read-only code surface for marketing heroes, docs, changelog entries, AI-output displays. Use `diff` for the "diff hero" pattern (before/after side-by-side or stacked). Use `reveal="lines"` with `trigger="inView"` for scroll-driven marketing pages. Use `reveal="typewriter"` for AI-output / chat-style displays. Use `bare` for inline code inside prose. NOT a code editor \u2014 for editable code, reach for an external editor primitive (CodeMirror / Monaco).',import:"@gradeui/ui",aliases:["code block","code","code snippet","code surface","syntax highlighted code","diff hero","diff view","diff block","changelog code","before after code","scroll-triggered code","typewriter code"],composesWith:["SectionBlock","Card","Tabs (for multi-file examples)","Carousel (slide-to-slide code progression)"],styleDefaults:{Code:"gds-code relative w-full overflow-hidden"},props:{source:{schema:zod.z.string(),design:"content",description:"the code to render"},language:{schema:zod.z.enum(["tsx","jsx","ts","js","html","css","json","bash","md","py","go","rust"]).optional(),design:"knob",description:"Prism language id; defaults to `tsx`"},highlight:{schema:zod.z.unknown().optional(),design:"plumbing",description:"1-indexed line number, array of numbers, or array of `[start, end]` ranges to emphasise"},diff:{schema:zod.z.unknown().optional(),design:"plumbing",description:"`{ added?: number[]; removed?: number[] }` \u2014 1-indexed lines for diff hero / changelog mode"},reveal:{schema:zod.z.enum(["none","lines","typewriter","diff"]).optional(),design:"knob",description:"entrance animation; defaults to `none`"},trigger:{schema:zod.z.enum(["mount","inView","manual"]).optional(),design:"knob",description:"what kicks the reveal off; defaults to `mount`"},play:{schema:zod.z.boolean().optional(),design:"knob",description:'for `trigger="manual"`, set true to play'},speed:{schema:zod.z.enum(["slow","normal","fast"]).optional(),design:"knob",description:"animation feel preset. `normal` (default) maps to the canonical 50ms/22ms staggers + 180ms pre-delay. Pick a feel; don't tune individual numbers unless you have to."},delay:{schema:zod.z.number().optional(),design:"knob",description:"explicit delay before reveal starts (ms) \u2014 overrides the `speed` preset"},stagger:{schema:zod.z.number().optional(),design:"knob",description:"explicit per-line stagger for `lines`/`diff`, per-token for `typewriter` (ms) \u2014 overrides the `speed` preset"},prompt:{schema:zod.z.string().optional(),design:"content",description:'string prepended to each line. Use for terminal emulation: `prompt="$ "` for bash, `prompt="> "` for PowerShell, `prompt=">>> "` for Python REPL. Prompt characters render in muted token colour, don\'t pick up the typewriter stagger, and are hidden from screen readers.'},showLineNumbers:{schema:zod.z.boolean().optional(),design:"knob"},filename:{schema:zod.z.string().optional(),design:"content",description:"optional label rendered in the header chrome"},wrap:{schema:zod.z.boolean().optional(),design:"knob",description:"wrap long lines instead of horizontal scroll"},bare:{schema:zod.z.boolean().optional(),design:"knob",description:"drop chrome (border, header, padding) \u2014 for inline use"},size:{schema:zod.z.enum(["xs","sm","md"]).optional(),design:"knob",description:"type-scale preset. `xs` (12px) for dense changelog cards / inline blocks; `sm` (14px, default) for marketing heroes and docs; `md` (16px) for focal-point displays."},height:{schema:zod.z.enum(["auto","number","string"]).optional(),design:"knob",description:'container sizing. `auto` (default) grows with content. Number = pixels (`300` \u2192 `300px`). String passes through as CSS (`"20rem"`, `"50vh"`).'},maxLines:{schema:zod.z.number().optional(),design:"knob",description:"cap the visible line count at exactly N line-heights. Wins over `height`. Inherits the current size's line-height automatically."}}};var Ei={name:"Collapsible",description:'A single show/hide reveal \u2014 "Show advanced settings" rows, expandable inline help, "More details" sections inside cards. For multiple rows of expandable content where one-at-a-time matters, reach for Accordion. For a separate panel that floats above content, use Popover.',import:"@gradeui/ui",aliases:["collapsible","expand","show more","disclosure","advanced settings","disclosure group","expandable section","expandable view","show hide"],subcomponents:["CollapsibleTrigger","CollapsibleContent"],composesWith:["Button (as the trigger","asChild)","Card (expandable settings group)","Row (header + chevron)"],props:{open:{schema:zod.z.boolean().optional(),design:"knob",description:"controlled open state"},defaultOpen:{schema:zod.z.boolean().optional(),design:"knob",description:"uncontrolled initial state"},onOpenChange:{schema:zod.z.unknown().optional(),design:"event"},children:{schema:zod.z.unknown(),design:"plumbing",description:"the clickable header (often a Button asChild)"}}};var Li={name:"Command",description:'A searchable list of actions or destinations \u2014 global \u2318K palettes, "jump to" inputs, account switchers with filter. Wrap in CommandDialog when it should pop over the entire app on a hotkey. For straight forms with filter, prefer a Select with a search input. For free-text autocomplete tied to a single value, prefer Combobox built on Popover + Command.',import:"@gradeui/ui",aliases:["command palette","command menu","cmd k","quick switcher","action menu","spotlight","spotlight search","quick open","fuzzy finder"],subcomponents:["CommandInput","CommandList","CommandEmpty","CommandGroup","CommandItem","CommandSeparator","CommandShortcut","CommandDialog"],composesWith:["Dialog (CommandDialog wraps it)","Popover (inline combobox)","Tooltip"],styleDefaults:{Command:"flex h-full w-full flex-col overflow-hidden rounded-md bg-popover text-popover-foreground",CommandInput:"flex h-10 w-full rounded-md bg-transparent py-3 text-sm outline-none placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50",CommandList:"max-h-[300px] overflow-y-auto overflow-x-hidden",CommandGroup:"overflow-hidden p-1 text-foreground [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground",CommandSeparator:"-mx-1 h-px bg-border",CommandItem:"relative flex cursor-default gap-2 select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none data-[disabled=true]:pointer-events-none data-[selected=true]:bg-accent data-[selected=true]:text-accent-foreground data-[disabled=true]:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",CommandShortcut:"ml-auto text-xs tracking-widest text-muted-foreground"},props:{value:{schema:zod.z.string().optional(),design:"content",description:"controlled active item value"},onValueChange:{schema:zod.z.unknown().optional(),design:"event"},placeholder:{schema:zod.z.string().optional(),design:"content"},children:{schema:zod.z.unknown(),design:"plumbing",description:"wraps groups and empty state"},heading:{schema:zod.z.string().optional(),design:"content"},onSelect:{schema:zod.z.unknown().optional(),design:"event"},disabled:{schema:zod.z.boolean().optional(),design:"knob"},open:{schema:zod.z.unknown(),design:"plumbing",description:"when you want the command palette mounted in a modal (cmd+k pattern)"}}};var Di={name:"Composer",description:`THE PRIMITIVE for any text composition surface \u2014 Slack / Discord /
17
+ column tracks.`,import:"@gradeui/ui",subcomponents:["AppShellHeader","AppShellNav","AppShellAside","AppShellMain","AppShellFooter"],composesWith:["Stack","Row","Card","Button","Separator","Sidebar","Toolbar","any page content"],styleDefaults:{AppShell:"gds-app-shell min-h-screen w-full bg-background text-foreground grid",AppShellHeader:"gds-app-shell-header",AppShellNav:"gds-app-shell-nav border-b bg-background",AppShellAside:"gds-app-shell-aside min-w-0 border-r bg-background",AppShellMain:"gds-app-shell-main min-w-0 w-full",AppShellFooter:"gds-app-shell-footer border-t bg-background"},variantDefaults:{nav:"none"},props:{nav:{schema:zod.z.enum(["none","top","side","three-pane"]).optional(),design:"knob",description:"layout structure",default:"none"},asChild:{schema:zod.z.boolean().optional(),design:"plumbing",description:"render as the child element via Slot",default:false},className:{schema:zod.z.string().optional(),design:"plumbing"},children:{schema:zod.z.unknown(),design:"plumbing"}}};var Ci={name:"Avatar",description:"User/entity identity for PEOPLE \u2014 profile pictures, author rows, member lists, account headers. Circular by default; the AvatarFallback initials read as a person's name. Always include AvatarFallback so load failure doesn't leave a gap.",import:"@gradeui/ui",aliases:["profile picture","user image","account image","avatar","person glyph","user avatar","profile image","react native avatar"],subcomponents:["AvatarImage","AvatarFallback"],composesWith:["Card (in CardHeader)","Table cells","Badge (placed next to for status)","Skeleton (loading state)","Message (in the avatar slot)"],styleDefaults:{AvatarImage:"aspect-square h-full w-full"},props:{size:{schema:zod.z.enum(["2xs","xs","sm","md","lg","xl"]).optional(),design:"knob",description:"t-shirt scale, 20px \u2192 80px; default md (40px). xs for chat message rows, sm for comments/dense threads, lg/xl for profile headers. Prefer this over h-*/w-* className utilities."},src:{schema:zod.z.unknown(),design:"plumbing"},tone:{schema:zod.z.enum(["muted","primary","violet","amber","emerald","sky","rose","plum","lime"]).optional(),design:"knob",description:"tinted bg/text pair. Reach for explicit tones when each author needs a stable colour mapping (chat avatars, comment threads, member lists); default muted."},children:{schema:zod.z.unknown(),design:"plumbing",description:"initials (or a small icon), rendered while the image loads or when it fails"}}};var Ti={name:"BackgroundFill",description:"The background *paint* of a frame \u2014 a generative shader, image, video, gradient, repeating texture, or solid token rendered as a layer BEHIND the frame's content. Use it as the first child of a `relative` frame; it paints an `absolute inset-0`, `z-0`, `pointer-events-none` layer, so content carrying `relative z-10` sits on top. This is the canonical way to give any container a rich background \u2014 never drop a full-bleed `<ThreeScene>` or `<img>` as a free-standing sibling. For a sized, in-flow media element (a hero card, a thumbnail), use ThreeScene / MediaSurface / VideoPlayer directly instead.",import:"@gradeui/ui",aliases:["background","fill","frame fill","backdrop","surface fill","background image","background video","background gradient","background shader","texture","paint"],composesWith:["AppShell","Card","Stack","Row","Grid (any relative container)","ThreeScene (shader fill)","MediaSurface"],styleDefaults:{BackgroundFill:"absolute inset-0 h-full w-full"},props:{type:{schema:zod.z.enum(["none","solid","gradient","image","video","shader"]),design:"knob",description:"which paint to render (required)"},color:{schema:zod.z.string().optional(),design:"content",description:"solid fill; a token name (`primary`, `card`, `muted`, `accent`, `secondary`, `destructive`, `background`, `transparent`) or any CSS colour"},gradient:{schema:zod.z.unknown().optional(),design:"plumbing",description:'stops are token names or CSS colours. shape: "linear" (default, uses `angle`, default 135\xB0) | "radial" (uses `at` \u2014 CSS position like "top" / "30% 20%", default "center" \u2014 and optional `size` like "45rem 50rem", default farthest-corner)'},src:{schema:zod.z.string().optional(),design:"content",description:"image or video URL"},fit:{schema:zod.z.enum(["cover","contain","fill","none"]).optional(),design:"knob",description:'object-fit for image/video (default "cover")'},position:{schema:zod.z.string().optional(),design:"content",description:'CSS object/background position (default "center")'},repeat:{schema:zod.z.boolean().optional(),design:"knob",description:"tile the image (background-repeat) instead of a single <img>"},tileSize:{schema:zod.z.string().optional(),design:"content",description:'CSS background-size when repeating (e.g. "120px")'},preset:{schema:zod.z.string().optional(),design:"content",description:"shader preset id (see ThreeScene)"},fragmentShader:{schema:zod.z.string().optional(),design:"content",description:"custom GLSL (takes precedence over preset)"},palette:{schema:zod.z.unknown().optional(),design:"plumbing",description:"shader palette overrides; wrap tokens as `oklch(var(--token))`"},postPreset:{schema:zod.z.string().optional(),design:"content",description:"shader post-FX"},opacity:{schema:zod.z.number().optional(),design:"knob",description:"layer opacity 0\u20131"},blendMode:{schema:zod.z.unknown().optional(),design:"plumbing",description:"blend against the frame behind it"},radius:{schema:zod.z.enum(["none","sm","md","lg","xl"]).optional(),design:"knob",description:"match the frame's radius so the paint clips cleanly"}}};var Mi={name:"Badge",description:"Compact status chips, counts, tags, pills. For higher-signal inline status \u2192 use Callout. For solid CTAs \u2192 Button. Soft/outline variants are quieter; solid variants are loud.",import:"@gradeui/ui",aliases:["chip","tag","pill","label chip","badge","tag view","status pill","token","count badge"],composesWith:["Card","Table (inside a cell)","Avatar (next to it)","anywhere inline"],styleDefaults:{Badge:"inline-flex items-center gap-1 border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 [&_svg]:size-3 [&_svg]:shrink-0 border-transparent bg-primary text-primary-foreground shadow hover:bg-primary/80 rounded-md"},variantDefaults:{variant:"default",rounded:"default"},props:{variant:{schema:zod.z.enum(["default","secondary","destructive","outline","highlight","success","warning","info","success-soft","warning-soft","destructive-soft","info-soft","highlight-soft","success-outline","warning-outline","destructive-outline","info-outline"]).optional(),design:"knob"},rounded:{schema:zod.z.enum(["default","full"]).optional(),design:"knob",description:'"full" gives a pill shape'}}};var Ni={name:"Banner",description:`A full-width horizontal strip surfacing system-level state, announcements, or first-run guidance \u2014 "you're previewing a draft", "investigating incident", "new feature available", "send your design to Figma". Distinct from Callout (inline boxed message in the layout flow), Toast (transient floating notification), Dialog (modal interrupt). Banner is what lives at the TOP of an AppShellHeader, page, or panel.`,import:"@gradeui/ui",aliases:["banner","notification banner","system banner","header banner","announcement bar","top bar","status bar","promo banner","incident banner","draft banner","first run banner","glass banner","sticky banner"],composesWith:["AppShellHeader (most common host \u2014 banner sits ABOVE the header content)","Button (in the action slot)","Link (inside the content)","Lucide icons (in the icon slot)"],styleDefaults:{Banner:"relative flex items-center gap-3 px-4 py-2.5 text-sm leading-relaxed border-b bg-muted text-foreground border-border [&>svg]:text-muted-foreground justify-between"},variantDefaults:{variant:"default",align:"between"},props:{variant:{schema:zod.z.enum(["default","info","success","warning","destructive","announcement"]).optional(),design:"knob",description:'intent + tonal direction. `default` is a calm muted strip; `announcement` is a low-alpha brand tint for "new feature" messaging; status variants pick up the soft+deep token pairs.'},surface:{schema:zod.z.enum(["solid","translucent","glass","glass-strong"]).optional(),design:"knob",description:"material applied over the variant tint. `glass` for banners that sit over imagery / generative backdrops."},align:{schema:zod.z.enum(["start","center","between"]).optional(),design:"knob",description:"justify behaviour of the inner flex row. Defaults to `between` so the action / dismiss button right-align."},sticky:{schema:zod.z.boolean().optional(),design:"knob",description:"stick to the top of the scroll container."},dismissible:{schema:zod.z.boolean().optional(),design:"knob",description:"render the trailing X close button. Pair with `onDismiss` to react."},onDismiss:{schema:zod.z.unknown().optional(),design:"event"},icon:{schema:zod.z.unknown().optional(),design:"plumbing",description:"leading icon slot. NOT inferred from variant; pass what fits the message."},action:{schema:zod.z.unknown().optional(),design:"plumbing",description:'trailing slot before dismiss. Usually a `<Button size="sm">` or `<a>`.'},role:{schema:zod.z.string().optional(),design:"plumbing",description:"overrides the automatic role mapping (warning/destructive \u2192 alert, others \u2192 status)."}}};var Ei={name:"Breadcrumb",description:'Reach for Breadcrumb whenever a screen sits inside a hierarchy and you want the path back to the top to be visible. Common spots: above page titles in admin/CMS screens, top of Settings detail pages, after a router redirect when the URL implies depth. Use the current page as a <BreadcrumbPage> (non-clickable) and prior levels as <BreadcrumbLink>. For a horizontal "top nav" of peer destinations use Side Menu or Tabs instead \u2014 Breadcrumb is strictly for hierarchical path.',import:"@gradeui/ui",aliases:["breadcrumb","breadcrumbs","crumbs","path","page hierarchy","path bar","navigation trail","finder path"],subcomponents:["BreadcrumbList","BreadcrumbItem","BreadcrumbLink","BreadcrumbPage","BreadcrumbSeparator","BreadcrumbEllipsis"],composesWith:["AppShellMain","Card (in CardHeader)","Dialog"],styleDefaults:{BreadcrumbList:"flex flex-wrap items-center gap-1.5 break-words text-xs text-muted-foreground",BreadcrumbItem:"inline-flex items-center gap-1.5",BreadcrumbPage:"inline-flex items-center gap-1.5 px-0.5 text-xs font-medium text-foreground",BreadcrumbSeparator:"[&_svg]:size-3 [&_svg]:shrink-0 text-muted-foreground/60",BreadcrumbEllipsis:"flex h-5 w-5 items-center justify-center",BreadcrumbMenuTrigger:"h-3 w-3 text-muted-foreground transition-transform"},props:{"aria-label":{schema:zod.z.unknown().optional(),design:"plumbing",description:"passed to the underlying <nav>"},separator:{schema:zod.z.unknown().optional(),design:"plumbing",description:'**tree-wide default** for every <BreadcrumbSeparator/> inside. Pass a string ("/", "\u203A", "\u2022"), a lucide icon (`<Slash/>`, `<ChevronRight/>`), or any ReactNode. Default: `<ChevronRight/>`. Set once on the root; every separator below picks it up via context.'},className:{schema:zod.z.unknown().optional(),design:"plumbing",description:"the <ol> wrapper; usually no overrides needed"},href:{schema:zod.z.unknown().optional(),design:"plumbing",description:"renders as <a> when set, <button> when not; asChild? wraps a custom element"},children:{schema:zod.z.unknown().optional(),design:"plumbing",description:"per-instance override of the separator glyph. When set, beats the root's `separator` prop for this one slot. When not set, falls back to the root's `separator`, then to `<ChevronRight/>`."}}};var Li={name:"Button",description:'Any clickable action. Use size="icon" for square icon-only buttons, variant="link" for inline links that should look like Button, variant="raised" for high-commitment / weighty actions where the chrome can afford a tactile "physical key" treatment. A Button placed next to a TabsList of the same size lines up edge-to-edge without per-call overrides.',import:"@gradeui/ui",aliases:["button","push button","plain button","bordered button","destructive button","capsule button","link button","action button","cta","raised button","pill button","key button"],composesWith:["Dialog","DropdownMenu","Tooltip","Card (in CardFooter)","Row","Form controls"],styleDefaults:{Button:"inline-flex items-center justify-center whitespace-nowrap rounded-md font-medium transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 bg-primary text-primary-foreground shadow hover:bg-primary/90 h-8 gap-1.5 px-3 text-base [&_svg]:size-4"},variantDefaults:{variant:"default",size:"md"},props:{variant:{schema:zod.z.enum(["default","destructive","outline","secondary","ghost","link","raised"]).optional(),design:"knob"},size:{schema:zod.z.enum(["sm","md","lg","icon"]).optional(),design:"knob",description:"t-shirt scale aligned with Tabs/ToggleGroup heights (sm=h-7, md=h-8, lg=h-10). `default` still works as an alias for `md`."},asChild:{schema:zod.z.boolean().optional(),design:"plumbing",description:"renders as the child element (use to wrap <a>/<Link>)"},disabled:{schema:zod.z.boolean().optional(),design:"knob"}}};var Di={name:"Calendar",description:'An inline date grid \u2014 date-of-birth pickers in profile forms, scheduling screens with a month view, range selection in reporting filters. For a compact trigger-and-popover input, use DatePicker / DateRangePicker (which wrap Calendar internally). For one-off relative dates ("yesterday", "last week") use a Select instead.',import:"@gradeui/ui",aliases:["calendar","date grid","month view","scheduler grid","calendar view","multidate picker","react native calendars"],subcomponents:["CalendarDayButton"],composesWith:["Popover (DatePicker composes them)","Card (inline scheduling card)","Dialog (full-screen mobile date pick)"],styleDefaults:{Calendar:"bg-background group/calendar p-3 [--cell-size:2rem] [[data-slot=card-content]_&]:bg-transparent [[data-slot=popover-content]_&]:bg-transparent"},props:{mode:{schema:zod.z.enum(["single","multiple","range"]).optional(),design:"knob",description:"picks one date, several dates, or a [from, to] range"},selected:{schema:zod.z.unknown().optional(),design:"plumbing",description:"controlled selection; shape matches `mode`"},onSelect:{schema:zod.z.unknown().optional(),design:"event",description:"fires with the new selection"},month:{schema:zod.z.unknown().optional(),design:"plumbing",description:"controlled displayed month"},defaultMonth:{schema:zod.z.unknown().optional(),design:"plumbing",description:"uncontrolled initial month"},onMonthChange:{schema:zod.z.unknown().optional(),design:"event"},numberOfMonths:{schema:zod.z.number().optional(),design:"knob",description:"render multiple months side by side, useful for range pickers"},disabled:{schema:zod.z.unknown().optional(),design:"plumbing"},captionLayout:{schema:zod.z.enum(["label","dropdown","dropdown-months","dropdown-years"]).optional(),design:"knob"},className:{schema:zod.z.string().optional(),design:"plumbing"}}};var Ai={name:"Callout",description:"Inline, ambient, non-blocking status/feedback that sits inside the layout flow. Form-level validation summaries, settings-page notices, page-level banners. NOT a toast (use Sonner for transient). NOT a modal (use Dialog when the user must respond). Put an icon as first child \u2014 it's auto-positioned; CalloutTitle + CalloutDescription follow.",import:"@gradeui/ui",aliases:["callout","banner","notice","inline alert","in-app notification","status banner","info banner","info callout","warning callout","success callout"],subcomponents:["CalloutTitle","CalloutDescription"],composesWith:["lucide-react icons as first child","Button (inside CalloutDescription)","Card (as a section callout)"],styleDefaults:{CalloutTitle:"mb-1 font-medium leading-none tracking-tight",CalloutDescription:"text-sm [&_p]:leading-relaxed"},props:{variant:{schema:zod.z.enum(["default","destructive","success","warning","info"]).optional(),design:"knob",description:"semantic colouring; `default` is neutral"}}};var Hi={name:"Card",description:'Grouped content with a distinct surface \u2014 settings panels, dashboard tiles, list-of-cards layouts, marketing hero containers, AI suggestion overlays. Pair CardHeader (title + description) with CardContent and optional CardFooter (actions). Reach for `surface="glass"` whenever the card sits over a busy backdrop (gradient mesh, dot grid, generative art, image hero).',import:"@gradeui/ui",aliases:["card","group box","groupbox","panel","tile","surface","glass card","frosted card","floating panel","hero card","ai suggestion card","dashboard tile","settings panel"],subcomponents:["CardHeader","CardTitle","CardDescription","CardContent","CardFooter"],composesWith:["Button (in CardFooter)","Badge","Separator","Avatar","Code","MediaSurface","any form controls"],styleDefaults:{Card:"gds-card rounded-xl border text-card-foreground shadow",CardHeader:"flex flex-col space-y-1.5 p-6",CardTitle:"font-semibold leading-none tracking-tight",CardDescription:"text-sm text-muted-foreground",CardContent:"p-6 pt-0",CardFooter:"flex items-center p-6 pt-0"},props:{surface:{schema:zod.z.enum(["solid","translucent","glass","glass-strong"]).optional(),design:"knob",description:"what the card surface is *made of*. `solid` is the default opaque `bg-card`. `translucent` is ~82% opacity for menu sheets. `glass` is ~58% opacity + 14px blur + edge highlight for floating panels. `glass-strong` is ~42% + 24px blur for full-page overlays. Composes with `shadow-elevation-*` (depth) and `gds-aura-*` (state signal)."},Each:{schema:zod.z.unknown(),design:"plumbing"}}};var Wp=zod.z.enum(["start","center","end"]),jp=zod.z.object({delay:zod.z.number().int().positive().optional(),pauseOnHover:zod.z.boolean().optional(),pauseWhenOffscreen:zod.z.boolean().optional()}),$p=zod.z.union([zod.z.boolean(),jp]),Fi={name:"Carousel",description:"Token-driven slideshow primitive. Embla under the hood, custom autoplay loop with per-slide duration overrides, and a VideoSlide variant that autoplays muted+loop with a poster fallback. Reach for it for marketing hero rotations, app onboarding tours, image galleries, TV/streaming featured rails \u2014 anywhere a horizontal stack of slides cycles automatically or on user input.",import:"@gradeui/ui",aliases:["carousel","slideshow","slider","hero rotation","image gallery","featured row","swipe deck"],subcomponents:["Carousel.Slide","Carousel.VideoSlide","Carousel.Dots","Carousel.Arrows","Carousel.Prev","Carousel.Next"],composesWith:["MediaSurface (inside Carousel.Slide for posters / album art)","Card (slide content)","Stack / Row (slide composition)"],props:{loop:{schema:zod.z.boolean().optional(),design:"knob",label:"Loop",default:true,description:"Wrap from the last slide back to the first. Default true \u2014 the natural fit for hero rotations. Turn off for finite onboarding sequences."},align:{schema:Wp.optional(),design:"knob",control:"toggle-group",label:"Slide alignment",default:"start",description:"How slides line up inside the viewport when not at 100% width. 'start' is full-bleed; 'center' gives the 'peek of neighbours' carousel look."},slidesPerView:{schema:zod.z.number().int().positive().optional(),design:"knob",label:"Slides per view",default:1,description:"How many slides show at once. 1 for hero rotations; 3 for thumbnail strips; etc. For media-query responsive layouts, leave this at 1 and override `--gds-carousel-slide-basis` on each Slide via CSS."},autoplay:{schema:$p.optional(),design:"structured",label:"Autoplay",default:false,description:"`true` for sensible defaults (5s, pause on hover, pause offscreen). Object form: `{ delay, pauseOnHover, pauseWhenOffscreen }`. Per-slide overrides go on `<Carousel.Slide duration={ms}>`."},draggable:{schema:zod.z.boolean().optional(),design:"knob",label:"Drag to swipe",default:true,description:"Disable when slide content (a Map, a chart, a draggable card) needs to swallow drag events."},onSlideChange:{schema:zod.z.function().optional(),design:"event",description:"Fires with the new slide index whenever the active slide changes (programmatic, autoplay, or user swipe)."},className:{schema:zod.z.string().optional(),design:"plumbing"},style:{schema:zod.z.record(zod.z.string(),zod.z.unknown()).optional(),design:"plumbing"},children:{schema:zod.z.unknown(),design:"plumbing",description:"Carousel.Slide / Carousel.VideoSlide children, plus optionally Carousel.Dots and Carousel.Arrows."}}};var zi={name:"Chart",description:"Reporting dashboards, single-purpose analytics cards (revenue, conversions, active users), or anywhere you'd otherwise hand-roll a Recharts setup. Bring the actual chart type from `recharts` \u2014 ChartContainer doesn't pick the chart shape for you, it themes whatever you nest. For sparkline-style decorative trends consider just rendering a small SVG line directly; ChartContainer is overkill for non-interactive ornament.",import:"@gradeui/ui",aliases:["chart","charts","graph","bar chart","line chart","area chart","recharts","analytics chart","swift chart","swiftui chart","victory chart","victory native"],subcomponents:["ChartTooltip","ChartTooltipContent","ChartLegend","ChartLegendContent","ChartStyle"],composesWith:["Card (chart-in-a-card pattern)","Tabs (multi-metric switcher)","Recharts components (Bar","Line","Area","Pie",'Radar from "recharts")'],styleDefaults:{ChartContainer:"flex aspect-video justify-center text-xs [&_.recharts-cartesian-axis-tick_text]:fill-muted-foreground [&_.recharts-cartesian-grid_line[stroke='#ccc']]:stroke-border/50 [&_.recharts-curve.recharts-tooltip-cursor]:stroke-border [&_.recharts-dot[stroke='#fff']]:stroke-transparent [&_.recharts-layer]:outline-none [&_.recharts-polar-grid_[stroke='#ccc']]:stroke-border [&_.recharts-radial-bar-background-sector]:fill-muted [&_.recharts-rectangle.recharts-tooltip-cursor]:fill-muted [&_.recharts-reference-line_[stroke='#ccc']]:stroke-border [&_.recharts-sector[stroke='#fff']]:stroke-transparent [&_.recharts-sector]:outline-none [&_.recharts-surface]:outline-none",ChartTooltipContent:"font-medium",ChartLegendContent:"flex items-center justify-center gap-4"},props:{config:{schema:zod.z.unknown(),design:"plumbing",description:'`{ [seriesKey]: { label: string; color?: string; theme?: { light: string; dark: string } } }`; the keys here are the names you reference in your Recharts <Bar dataKey="\u2026" /> calls'},id:{schema:zod.z.string().optional(),design:"plumbing",description:"used for the inlined <style> tag"},children:{schema:zod.z.unknown(),design:"plumbing",description:"typically a single Recharts ResponsiveContainer or chart"},passes:{schema:zod.z.unknown(),design:"plumbing",description:"pair with `content={<ChartTooltipContent />}`"},indicator:{schema:zod.z.enum(["dot","line","dashed"]).optional(),design:"knob"},ChartLegend:{schema:zod.z.unknown(),design:"plumbing"}}};var _i={name:"Checkbox",description:"Binary on/off tied to a list (select multiple, agree to terms). Single on/off that controls a setting is better with Switch. For a label + description row, wrap in Field. When each option should be a whole selectable card (label + description, selected state on the card surface), use CheckboxCard.",import:"@gradeui/ui",aliases:["checkbox","tickbox","tick box","check","multi-select item"],composesWith:["Label (via htmlFor)","Field (label + description row)","CheckboxCard (whole-card selectable option)","Card","Form rows","Table (for row selection)"],styleDefaults:{Checkbox:"flex items-center justify-center text-current"},props:{checked:{schema:zod.z.boolean().optional(),design:"knob"},onCheckedChange:{schema:zod.z.unknown().optional(),design:"event"},defaultChecked:{schema:zod.z.boolean().optional(),design:"knob"},disabled:{schema:zod.z.boolean().optional(),design:"knob"},id:{schema:zod.z.string().optional(),design:"plumbing",description:"bind a Label's htmlFor to this"}}};var Bi={name:"CheckboxCard",description:"Multi-select where each option is a whole selectable card (add-ons, feature toggles, opt-ins). The whole card is the control, so focus and the checked state live on the card surface. Standalone (not in a group). Static content only \u2014 never nest an interactive control inside. For a plain checkbox + label row use Field instead.",import:"@gradeui/ui",aliases:["checkbox card","selectable card","multi-select card","add-on card","feature card","opt-in card"],composesWith:["Badge (in aside)","MediaSurface (custom children)","Stack / Grid (laying out several)"],props:{checked:{schema:zod.z.unknown().optional(),design:"plumbing",description:"standard checkbox state"},label:{schema:zod.z.unknown().optional(),design:"plumbing",description:"title line"},description:{schema:zod.z.unknown().optional(),design:"plumbing",description:"secondary line"},aside:{schema:zod.z.unknown().optional(),design:"plumbing",description:"slot before the indicator (a Badge, price, hint)"},hideIndicator:{schema:zod.z.boolean().optional(),design:"knob",description:"hide the check; selection shown by the card border + background"},indicatorPosition:{schema:zod.z.enum(["leading","trailing"]).optional(),design:"knob",description:"default trailing"},children:{schema:zod.z.unknown().optional(),design:"plumbing",description:"arbitrary static content instead of label/description"}}};var Oi={name:"Code",description:'Read-only code surface for marketing heroes, docs, changelog entries, AI-output displays. Use `diff` for the "diff hero" pattern (before/after side-by-side or stacked). Use `reveal="lines"` with `trigger="inView"` for scroll-driven marketing pages. Use `reveal="typewriter"` for AI-output / chat-style displays. Use `bare` for inline code inside prose. NOT a code editor \u2014 for editable code, reach for an external editor primitive (CodeMirror / Monaco).',import:"@gradeui/ui",aliases:["code block","code","code snippet","code surface","syntax highlighted code","diff hero","diff view","diff block","changelog code","before after code","scroll-triggered code","typewriter code"],composesWith:["SectionBlock","Card","Tabs (for multi-file examples)","Carousel (slide-to-slide code progression)"],styleDefaults:{Code:"gds-code relative w-full overflow-hidden"},props:{source:{schema:zod.z.string(),design:"content",description:"the code to render"},language:{schema:zod.z.enum(["tsx","jsx","ts","js","html","css","json","bash","md","py","go","rust"]).optional(),design:"knob",description:"Prism language id; defaults to `tsx`"},highlight:{schema:zod.z.unknown().optional(),design:"plumbing",description:"1-indexed line number, array of numbers, or array of `[start, end]` ranges to emphasise"},diff:{schema:zod.z.unknown().optional(),design:"plumbing",description:"`{ added?: number[]; removed?: number[] }` \u2014 1-indexed lines for diff hero / changelog mode"},reveal:{schema:zod.z.enum(["none","lines","typewriter","diff"]).optional(),design:"knob",description:"entrance animation; defaults to `none`"},trigger:{schema:zod.z.enum(["mount","inView","manual"]).optional(),design:"knob",description:"what kicks the reveal off; defaults to `mount`"},play:{schema:zod.z.boolean().optional(),design:"knob",description:'for `trigger="manual"`, set true to play'},speed:{schema:zod.z.enum(["slow","normal","fast"]).optional(),design:"knob",description:"animation feel preset. `normal` (default) maps to the canonical 50ms/22ms staggers + 180ms pre-delay. Pick a feel; don't tune individual numbers unless you have to."},delay:{schema:zod.z.number().optional(),design:"knob",description:"explicit delay before reveal starts (ms) \u2014 overrides the `speed` preset"},stagger:{schema:zod.z.number().optional(),design:"knob",description:"explicit per-line stagger for `lines`/`diff`, per-token for `typewriter` (ms) \u2014 overrides the `speed` preset"},prompt:{schema:zod.z.string().optional(),design:"content",description:'string prepended to each line. Use for terminal emulation: `prompt="$ "` for bash, `prompt="> "` for PowerShell, `prompt=">>> "` for Python REPL. Prompt characters render in muted token colour, don\'t pick up the typewriter stagger, and are hidden from screen readers.'},showLineNumbers:{schema:zod.z.boolean().optional(),design:"knob"},filename:{schema:zod.z.string().optional(),design:"content",description:"optional label rendered in the header chrome"},wrap:{schema:zod.z.boolean().optional(),design:"knob",description:"wrap long lines instead of horizontal scroll"},bare:{schema:zod.z.boolean().optional(),design:"knob",description:"drop chrome (border, header, padding) \u2014 for inline use"},size:{schema:zod.z.enum(["xs","sm","md"]).optional(),design:"knob",description:"type-scale preset. `xs` (12px) for dense changelog cards / inline blocks; `sm` (14px, default) for marketing heroes and docs; `md` (16px) for focal-point displays."},height:{schema:zod.z.enum(["auto","number","string"]).optional(),design:"knob",description:'container sizing. `auto` (default) grows with content. Number = pixels (`300` \u2192 `300px`). String passes through as CSS (`"20rem"`, `"50vh"`).'},maxLines:{schema:zod.z.number().optional(),design:"knob",description:"cap the visible line count at exactly N line-heights. Wins over `height`. Inherits the current size's line-height automatically."}}};var Vi={name:"Collapsible",description:'A single show/hide reveal \u2014 "Show advanced settings" rows, expandable inline help, "More details" sections inside cards. For multiple rows of expandable content where one-at-a-time matters, reach for Accordion. For a separate panel that floats above content, use Popover.',import:"@gradeui/ui",aliases:["collapsible","expand","show more","disclosure","advanced settings","disclosure group","expandable section","expandable view","show hide"],subcomponents:["CollapsibleTrigger","CollapsibleContent"],composesWith:["Button (as the trigger","asChild)","Card (expandable settings group)","Row (header + chevron)"],props:{open:{schema:zod.z.boolean().optional(),design:"knob",description:"controlled open state"},defaultOpen:{schema:zod.z.boolean().optional(),design:"knob",description:"uncontrolled initial state"},onOpenChange:{schema:zod.z.unknown().optional(),design:"event"},children:{schema:zod.z.unknown(),design:"plumbing",description:"the clickable header (often a Button asChild)"}}};var Gi={name:"Command",description:'A searchable list of actions or destinations \u2014 global \u2318K palettes, "jump to" inputs, account switchers with filter. Wrap in CommandDialog when it should pop over the entire app on a hotkey. For straight forms with filter, prefer a Select with a search input. For free-text autocomplete tied to a single value, prefer Combobox built on Popover + Command.',import:"@gradeui/ui",aliases:["command palette","command menu","cmd k","quick switcher","action menu","spotlight","spotlight search","quick open","fuzzy finder"],subcomponents:["CommandInput","CommandList","CommandEmpty","CommandGroup","CommandItem","CommandSeparator","CommandShortcut","CommandDialog"],composesWith:["Dialog (CommandDialog wraps it)","Popover (inline combobox)","Tooltip"],styleDefaults:{Command:"flex h-full w-full flex-col overflow-hidden rounded-md bg-popover text-popover-foreground",CommandInput:"flex h-10 w-full rounded-md bg-transparent py-3 text-sm outline-none placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50",CommandList:"max-h-[300px] overflow-y-auto overflow-x-hidden",CommandGroup:"overflow-hidden p-1 text-foreground [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground",CommandSeparator:"-mx-1 h-px bg-border",CommandItem:"relative flex cursor-default gap-2 select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none data-[disabled=true]:pointer-events-none data-[selected=true]:bg-accent data-[selected=true]:text-accent-foreground data-[disabled=true]:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",CommandShortcut:"ml-auto text-xs tracking-widest text-muted-foreground"},props:{value:{schema:zod.z.string().optional(),design:"content",description:"controlled active item value"},onValueChange:{schema:zod.z.unknown().optional(),design:"event"},placeholder:{schema:zod.z.string().optional(),design:"content"},children:{schema:zod.z.unknown(),design:"plumbing",description:"wraps groups and empty state"},heading:{schema:zod.z.string().optional(),design:"content"},onSelect:{schema:zod.z.unknown().optional(),design:"event"},disabled:{schema:zod.z.boolean().optional(),design:"knob"},open:{schema:zod.z.unknown(),design:"plumbing",description:"when you want the command palette mounted in a modal (cmd+k pattern)"}}};var Wi={name:"Composer",description:`THE PRIMITIVE for any text composition surface \u2014 Slack / Discord /
18
18
  Teams chat input, AI chat / copilot prompt box, comment thread input,
19
19
  GitHub / Linear / Jira comment box, Reddit / Twitter reply box,
20
20
  Notion / Linear document body, email composer, post body, anywhere
@@ -44,7 +44,7 @@ toolbar buttons render when \`toolbar\` is on.
44
44
 
45
45
  Shares the lib/demo step vocabulary with <Code> so scripted
46
46
  typing/format/mention demos animate in the same rhythm as your
47
- terminal demos.`,import:"@gradeui/ui",composesWith:["AIChatComposer (preset wrapping this with paperclip + send + attachments)","ComposerReply (preset for comment threads)","AIChat (uses AIChatComposer internally)","Card (host above for reply boxes)",'Avatar (in leftActions slot for "your" avatar next to the input)'],styleDefaults:{ComposerToolbar:"flex flex-wrap items-center gap-0.5",AttachmentChips:"absolute -top-1.5 -right-1.5 h-5 w-5 rounded-full",ComposerInner:"w-full"},props:{placeholder:{schema:zod.z.string().optional(),design:"content"},initialText:{schema:zod.z.string().optional(),design:"content",description:"plain text content to seed on mount"},initialJson:{schema:zod.z.string().optional(),design:"content",description:"Lexical state JSON (from a previous onSubmit round-trip)"},formats:{schema:zod.z.unknown().optional(),design:"plumbing",description:"available formats (defaults to bold/italic/underline/strikethrough/code/h1/h2/blockquote/ul/ol); pass false for plain text only"},toolbar:{schema:zod.z.boolean().optional(),design:"knob",description:"show the formatting toolbar above the editor; default false"},triggers:{schema:zod.z.unknown().optional(),design:"plumbing",description:'mention/slash configs, eg. `[{ char: "@", items: people }, { char: "/", items: commands }]`'},attachments:{schema:zod.z.boolean().optional(),design:"knob",description:"enable image paste + paperclip when true/object; default off"},onSubmit:{schema:zod.z.unknown().optional(),design:"event"},isLoading:{schema:zod.z.boolean().optional(),design:"knob",description:"disables editor, swaps default Send for Stop"},onStop:{schema:zod.z.unknown().optional(),design:"event"},maxLength:{schema:zod.z.number().optional(),design:"knob"},autoFocus:{schema:zod.z.boolean().optional(),design:"plumbing"},submitOnEnter:{schema:zod.z.boolean().optional(),design:"knob",description:"default true (Shift-Enter still inserts newline)"},leftActions:{schema:zod.z.unknown().optional(),design:"plumbing",description:"override the default paperclip"},rightActions:{schema:zod.z.unknown().optional(),design:"plumbing",description:"override the default Send/Stop"},hideSend:{schema:zod.z.boolean().optional(),design:"knob",description:"hide the default Send without replacing it"},steps:{schema:zod.z.unknown().optional(),design:"plumbing",description:"scripted demo sequence"},trigger:{schema:zod.z.unknown().optional(),design:"plumbing",description:'"mount" | "inView" | "manual"; default "mount"'},play:{schema:zod.z.boolean().optional(),design:"knob",description:'for trigger="manual"'},speed:{schema:zod.z.unknown().optional(),design:"plumbing",description:'"slow" | "normal" | "fast"; default "normal"'},loop:{schema:zod.z.boolean().optional(),design:"knob"},loopDelay:{schema:zod.z.number().optional(),design:"knob",description:"ms between loop iterations, default 2000"},readOnly:{schema:zod.z.boolean().optional(),design:"knob",description:"disables editing AND focusability; programmatic playback still works; use for marketing demos so the script doesn't steal focus"},bare:{schema:zod.z.boolean().optional(),design:"knob",description:"strip the card chrome"},className:{schema:zod.z.string().optional(),design:"plumbing"}}};var Ai={name:"DatePicker",description:'Any date or date-range entry. Use DatePicker for a single date (DOB, due date, booking). Use DateRangePicker for a span (report period, stay dates, filter window). Prefer these over <Input type="date"> \u2014 consistent theming, keyboard nav, a11y, and no browser-native UI drift.',import:"@gradeui/ui",aliases:["datepicker","calendar input","date field","date range","datepickerios","react native date picker","calendar input field","date field control"],subcomponents:["DateRangePicker"],composesWith:["Label","Form","Card (in CardContent)","Button (form submit)"],styleDefaults:{DatePicker:"w-[280px] justify-start text-left font-normal data-[empty=true]:text-muted-foreground",DateRangePicker:"w-[300px] justify-start text-left font-normal data-[empty=true]:text-muted-foreground"},props:{value:{schema:zod.z.unknown().optional(),design:"plumbing"},onChange:{schema:zod.z.unknown().optional(),design:"event",description:"called on select or clear"},placeholder:{schema:zod.z.string().optional(),design:"content",description:'trigger label when empty (default "Pick a date" / "Pick a date range")'},disabled:{schema:zod.z.boolean().optional(),design:"knob"},format:{schema:zod.z.string().optional(),design:"content",description:'date-fns format token for the trigger label (default "PPP" single, "LLL dd, y" range)'},align:{schema:zod.z.enum(["start","center","end"]).optional(),design:"knob",description:'popover align (default "start")'},side:{schema:zod.z.enum(["top","right","bottom","left"]).optional(),design:"knob",description:"popover side"},captionLayout:{schema:zod.z.enum(["label","dropdown","dropdown-months","dropdown-years"]).optional(),design:"knob"},className:{schema:zod.z.string().optional(),design:"plumbing",description:"on the trigger button"},contentClassName:{schema:zod.z.string().optional(),design:"content",description:"on the PopoverContent"},icon:{schema:zod.z.unknown().optional(),design:"plumbing",description:"replaces the default CalendarIcon"},numberOfMonths:{schema:zod.z.number().optional(),design:"knob",description:"DateRangePicker only, default 2"}}};var Ii={name:"Dialog",description:'Modal interruptions \u2014 confirmations, focused forms, detail views, AI suggestion sheets. Dialog is the right primitive for Apple HIG / React Native "Alert" (modal) semantics. For non-blocking inline messaging use Callout; for transient notifications use Toaster (Sonner). Always include DialogTitle (a11y requirement).',import:"@gradeui/ui",aliases:["modal","popup","overlay","alert","system alert","alert dialog","modal dialog","confirm dialog","react native modal","rn alert","glass modal","frosted modal","ai suggestion modal"],subcomponents:["DialogTrigger","DialogContent","DialogHeader","DialogTitle","DialogDescription","DialogFooter","DialogClose"],composesWith:["Button (as DialogTrigger asChild","and inside DialogFooter)","Input/Textarea/Select inside DialogContent","Code (for changelog / diff modals)","MediaSurface (for image / preview modals)"],styleDefaults:{DialogOverlay:"fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",DialogContent:"fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",DialogHeader:"flex flex-col space-y-1.5 text-center sm:text-left",DialogFooter:"flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",DialogTitle:"text-lg font-semibold leading-none tracking-tight",DialogDescription:"text-sm text-muted-foreground"},props:{open:{schema:zod.z.unknown().optional(),design:"plumbing",description:"Radix controlled/uncontrolled pattern"},asChild:{schema:zod.z.enum(["wrap a Button"]).optional(),design:"plumbing"},surface:{schema:zod.z.enum(["solid","translucent","glass","glass-strong"]).optional(),design:"knob",description:"what the modal panel is *made of*. Defaults to `solid` (opaque `bg-background`). `glass` lets the page show through softly \u2014 pairs with rich backdrops or AI-suggestion modals."},accepts:{schema:zod.z.unknown(),design:"plumbing"},used:{schema:zod.z.unknown(),design:"plumbing"}}};var Hi={name:"DropdownMenu",description:'A small action menu attached to a trigger \u2014 overflow "\u2026" buttons on cards, user-avatar menus in headers, "Insert" menus in editors. For a full searchable list, use Command. For ONE primary action plus a secondary, use a Button next to a smaller ghost Button instead of a dropdown.',import:"@gradeui/ui",aliases:["dropdown","dropdown menu","overflow menu","kebab menu","more menu","action menu","context-style menu","menu","pull-down menu","pulldown menu","context menu","popup menu","actions menu","glass menu","frosted menu","ios menu","hig menu"],subcomponents:["DropdownMenuTrigger","DropdownMenuContent","DropdownMenuItem","DropdownMenuCheckboxItem","DropdownMenuRadioGroup","DropdownMenuRadioItem","DropdownMenuLabel","DropdownMenuSeparator","DropdownMenuShortcut","DropdownMenuGroup","DropdownMenuSub","DropdownMenuSubTrigger","DropdownMenuSubContent"],composesWith:["Button (as trigger asChild)","Avatar (user menu)","Card (overflow on a tile)","Tooltip (on the trigger)"],styleDefaults:{DropdownMenuSubTrigger:"flex cursor-default select-none items-center gap-2 rounded-sm outline-none focus:bg-accent data-[state=open]:bg-accent [&_svg]:pointer-events-none [&_svg]:shrink-0",DropdownMenuSubContent:"z-50 min-w-[8rem] overflow-hidden rounded-md border text-popover-foreground shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 origin-[--radix-dropdown-menu-content-transform-origin]",DropdownMenuContent:"z-50 max-h-[var(--radix-dropdown-menu-content-available-height)] min-w-[8rem] overflow-y-auto overflow-x-hidden rounded-md border text-popover-foreground shadow-md",DropdownMenuItem:"relative flex cursor-default select-none items-center gap-2 rounded-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&>svg]:shrink-0",DropdownMenuCheckboxItem:"relative flex cursor-default select-none items-center rounded-sm pr-2 outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",DropdownMenuRadioItem:"relative flex cursor-default select-none items-center rounded-sm pr-2 outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",DropdownMenuLabel:"font-semibold",DropdownMenuSeparator:"-mx-1 my-1 h-px bg-muted",DropdownMenuShortcut:"ml-auto text-xs tracking-widest opacity-60"},props:{open:{schema:zod.z.unknown().optional(),design:"plumbing"},asChild:{schema:zod.z.boolean().optional(),design:"plumbing",description:"usually wraps a Button"},align:{schema:zod.z.enum(["start","center","end","top","right","bottom","left"]).optional(),design:"knob"},surface:{schema:zod.z.enum(["solid","translucent","glass","glass-strong"]).optional(),design:"knob",description:"what the menu surface is *made of*. `solid` (default) is `bg-popover`. `translucent` matches Apple HIG / iOS menu sheets. `glass` for menus floating over rich canvases."},size:{schema:zod.z.enum(["default","sm","xs"]).optional(),design:"knob",description:'menu density; cascades to every item (Item, Checkbox, Radio, SubTrigger, Label) via context so a compact trigger gets a compact menu. Use "xs" in dense tool panels.'},onSelect:{schema:zod.z.unknown().optional(),design:"event"},DropdownMenuCheckboxItem:{schema:zod.z.unknown(),design:"plumbing"},DropdownMenuSub:{schema:zod.z.unknown(),design:"plumbing",description:"sub-trigger shows children, sub-content holds the deeper items"},children:{schema:zod.z.unknown(),design:"plumbing",description:"right-aligned kbd hint"}}};var zi={name:"Field",description:'Pair a bare control with a label and optional description in a row, with id + aria-describedby wired automatically. Use layout="setting" for the classic settings row (label on the left, Switch on the right). For a selectable CARD where the whole surface is the control, use RadioCard / CheckboxCard / SwitchCard instead.',import:"@gradeui/ui",aliases:["field","form field","control row","label and description","two line checkbox","option row","setting row","toggle row"],composesWith:["Checkbox","RadioGroup","RadioGroupItem","Switch","Badge (inside Field.Trailing)"],styleDefaults:{FieldLabel:"text-sm font-medium leading-none text-foreground cursor-pointer peer-disabled:cursor-not-allowed peer-disabled:opacity-70",FieldDescription:"text-sm text-muted-foreground",FieldTrailing:"flex shrink-0 items-center gap-2",FieldRoot:"flex gap-3"},props:{layout:{schema:zod.z.enum(["option","setting"]).optional(),design:"knob",description:"option (default): control leads, text beside it; setting: text leads, control pinned trailing"},children:{schema:zod.z.unknown(),design:"plumbing",description:"order does not matter"}}};var _i={name:"FillPicker",description:"Grade's paint picker \u2014 the control for choosing a frame's background fill, modelled on Figma's fill popover. A fill-type icon row (solid \xB7 gradient \xB7 image \xB7 pattern \xB7 video \xB7 shader) switches the panel below; a global opacity sits at the foot. Emits a FillValue that maps 1:1 onto BackgroundFill props. This is a Studio/inspector chrome control \u2014 pair it with BackgroundFill, which renders the chosen paint. Not for app content.",import:"@gradeui/ui",aliases:["fill picker","paint picker","background picker","fill chooser","fill popover"],composesWith:["BackgroundFill (renders the FillValue)","Popover (host it in a popover)","ShaderPresetPicker (the shader tab)","the inspector Fill section"],styleDefaults:{Swatch:"h-7 w-7 rounded-md border border-border/60 transition-shadow",FillPicker:"flex flex-col gap-3"},props:{value:{schema:zod.z.unknown(),design:"plumbing",description:"current paint ({ type, color?, gradient?, src?, fit?, repeat?, tileSize?, preset?, palette?, postPreset?, opacity? }) (required)"},onChange:{schema:zod.z.unknown(),design:"event",description:"called on any change (required)"}}};var Oi={name:"Flex",description:"The unopinionated flexbox primitive \u2014 reach for Flex when Stack, Row, or Grid don't quite fit. Specifically when you need reverse direction (`row-reverse` / `col-reverse`), CSS defaults instead of Row's baked-in `items-center gap-md`, or baseline alignment. Otherwise prefer Stack / Row / Grid \u2014 they're easier to read and tuned for the 95% case. Flex is the escape hatch, not the default.",import:"@gradeui/ui",aliases:["flex","flexbox","flex container","hstack","vstack","horizontal","vertical","generic container","layout view"],composesWith:["any content component"],props:{direction:{schema:zod.z.enum(["row","col","row-reverse","col-reverse"]).optional(),design:"knob",description:"main-axis direction",default:"row"},gap:{schema:zod.z.enum(["none","xs","sm","md","lg","xl","2xl"]).optional(),design:"knob",description:"gap between children",default:"none"},align:{schema:zod.z.enum(["start","center","end","stretch","baseline"]).optional(),design:"knob",description:"cross-axis alignment",default:"stretch"},justify:{schema:zod.z.enum(["start","center","end","between","around","evenly"]).optional(),design:"knob",description:"main-axis distribution",default:"start"},wrap:{schema:zod.z.enum(["nowrap","wrap","wrap-reverse"]).optional(),design:"knob",description:"wrap behaviour when children overflow",default:"nowrap"},asChild:{schema:zod.z.boolean().optional(),design:"plumbing",description:"render as the child element via Slot",default:false},className:{schema:zod.z.string().optional(),design:"plumbing"},children:{schema:zod.z.unknown(),design:"plumbing"}}};var Vi={name:"Grid",description:"2D layouts where Stack (vertical) and Row (horizontal) don't fit \u2014 stat-card grids, feature tiles, pricing columns, photo grids. Reach for Grid over hand-rolled `grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4` so the column count is a prop the settings panel can mutate and the responsive ladder stays consistent across designs.",import:"@gradeui/ui",aliases:["grid","tiles","cards grid","stat grid","columns","feature grid","grid view","lazy v grid","lazyvgrid","lazy h grid","lazyhgrid","tile grid","masonry"],composesWith:["Card","Stack (inside each cell)","Row","Button","any content component"],styleDefaults:{Grid:"gds-grid grid grid-cols-1 sm:grid-cols-2 md:grid-cols-3 gap-4 items-stretch"},variantDefaults:{cols:"3",gap:"md",align:"stretch"},props:{cols:{schema:zod.z.enum(["1","2","3","4","5","6","12"]).optional(),design:"knob",description:'desktop column count; each value has a baked-in responsive ladder (e.g. "4" \u2192 1 col mobile, 2 tablet, 4 desktop)',default:"3"},gap:{schema:zod.z.enum(["none","xs","sm","md","lg","xl","2xl"]).optional(),design:"knob",description:"gap between grid cells (same scale as Stack/Row)",default:"md"},align:{schema:zod.z.enum(["start","center","end","stretch"]).optional(),design:"knob",description:"cross-axis alignment of cells",default:"stretch"},asChild:{schema:zod.z.boolean().optional(),design:"plumbing",description:"render as the child element via Slot",default:false},className:{schema:zod.z.string().optional(),design:"plumbing"},children:{schema:zod.z.unknown(),design:"plumbing"}}};var Gi={name:"HoverCard",description:"Rich preview content surfaced on hover \u2014 user profile mini-cards on @-mentions, link previews, definition popups, layer-thumbnail peeks. Pointer-only by design (no touch-friendly trigger); pair with a click target for touch devices, or fall back to Popover. NEVER use HoverCard for critical info \u2014 if the user can't reach it via keyboard or touch, it might as well not exist for accessibility.",import:"@gradeui/ui",aliases:["hover card","hover preview","mention preview","profile peek","link preview","rich tooltip","link preview card","profile hover","peek card","glass preview","frosted preview"],subcomponents:["HoverCardTrigger","HoverCardContent"],composesWith:["Avatar (user preview)","Card (richer content)","Link (the trigger)","MediaSurface (link/layer previews)","Code (snippet previews)"],styleDefaults:{HoverCardContent:"z-50 w-64 rounded-md border p-4 text-popover-foreground shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 origin-[--radix-hover-card-content-transform-origin]"},props:{open:{schema:zod.z.unknown().optional(),design:"plumbing"},asChild:{schema:zod.z.boolean().optional(),design:"plumbing",description:"usually a Link or Button"},side:{schema:zod.z.unknown().optional(),design:"plumbing"},surface:{schema:zod.z.enum(["solid","translucent","glass","glass-strong"]).optional(),design:"knob",description:"what the preview surface is *made of*. `solid` (default) is `bg-popover`. `glass` for hover previews over rich content (a media feed, a layout canvas)."}}};var ji={name:"Input",description:'Any single-line text entry. Always pair with a Label for accessibility. Use startSlot/endSlot for icons, prefixes and units instead of hand-positioning absolute children; use size="sm"/"xs" in dense tool panels.',import:"@gradeui/ui",aliases:["text field","textbox","textfield","form field","text input","secure field","search field","url field","number field","textinput","text input field","react native textinput","unit input","input with icon"],composesWith:["Label","Form","Card (in CardContent)","Button (form submit)"],styleDefaults:{Input:"pointer-events-none absolute inset-y-0 left-0 flex items-center text-muted-foreground [&_svg]:size-3.5"},props:{type:{schema:zod.z.string().optional(),design:"content"},size:{schema:zod.z.enum(["default","sm","xs"]).optional(),design:"knob",description:"control density. `default` (h-9) for forms; `sm` (h-8) and `xs` (h-7) for dense tool panels like the inspector."},startSlot:{schema:zod.z.unknown().optional(),design:"plumbing",description:"adornment rendered inside the leading edge (icon, prefix, currency symbol). Non-interactive by default so clicks focus the input."},endSlot:{schema:zod.z.unknown().optional(),design:"plumbing",description:'adornment rendered inside the trailing edge (unit like "px", a clear button, a stepper). Same pointer rules as startSlot.'}}};var Ui={name:"Label",description:'Every Input / Textarea / Checkbox / Switch / RadioGroup. Always use htmlFor so clicking the label focuses the control. Match `size` to the field it labels (size="xs" label over a size="xs" input).',import:"@gradeui/ui",aliases:["label","form label","field label","caption"],composesWith:["Input","Textarea","Checkbox","Switch","RadioGroup","Select"],styleDefaults:{Label:"font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70 text-sm"},variantDefaults:{size:"default"},props:{htmlFor:{schema:zod.z.string().optional(),design:"content",description:"binds to the input's id"},size:{schema:zod.z.enum(["default","sm","xs"]).optional(),design:"knob",description:"text size, mirrors Input/Select/Textarea so a field and its label scale together. default = text-sm; xs = 11px for dense tool panels."}}};var $i={name:"Logo",description:"A brand mark with built-in variations \u2014 a square mark for tight",import:"@gradeui/ui",aliases:["logo","brand","brandmark","wordmark","lockup","brand logo","app logo","logotype"],composesWith:["AppShell","AppShellHeader","Sidebar","SidebarHeader","Row","Stack"],styleDefaults:{Logo:"gds-logo inline-flex shrink-0 select-none items-center",LogoPlaceholder:"inline-flex h-full items-center gap-1.5 rounded-md border border-dashed px-2 text-xs font-medium"},props:{sources:{schema:zod.z.unknown().optional(),design:"plumbing",description:"artwork keyed by lockup then appearance:"}}};var Ki={name:"Map",description:"Any layout that needs a real map \u2014 listings (real estate, Airbnb-style), fleet/logistics dashboards, store locators, anywhere a user picks a location from a viewport. Reach for the controlled `hoveredId` prop when a sibling list and the map need to highlight each other.",import:"@gradeui/ui",aliases:["map","maps","mapbox","maplibre","google maps","geo","location","latlng","coordinates","marker","pin","airbnb","listings","fleet","real estate","logistics","map view","mapkit","mapview","react native maps","rn maps"],subcomponents:["MapMarker"],composesWith:["Card (as marker content)","Badge","Avatar","Button","Row","Stack","Skeleton"],props:{provider:{schema:zod.z.unknown(),design:"plumbing",description:'"maplibre" (default, free, no key) | "mapbox" (needs accessToken) | "google" (needs apiKey). Switching is one prop change.'},center:{schema:zod.z.unknown(),design:"plumbing",description:"`[lng, lat]` tuple. ALWAYS lng first. Required."},zoom:{schema:zod.z.unknown(),design:"plumbing",description:"number, 0\u201322. Required."},bounds:{schema:zod.z.unknown(),design:"plumbing",description:"`[[swLng, swLat], [neLng, neLat]]`. When set, takes precedence over center+zoom."},appearance:{schema:zod.z.unknown(),design:"plumbing",description:'"light" | "dark" | "satellite" | "auto" (default "auto", follows GradeThemeProvider mode).'},hoveredId:{schema:zod.z.unknown(),design:"plumbing",description:'controlled string id, pairs with onHoveredIdChange. The matching MapMarker gets `data-gds-state="hovered"` automatically. This is how you build list \u2194 map two-way sync.'},interactive:{schema:zod.z.unknown(),design:"plumbing",description:"false freezes pan/zoom, useful for static cards."},onLoad:{schema:zod.z.unknown(),design:"event",description:"handle exposes flyTo, panTo, fitBounds, getCenter, getZoom, getBounds, instance."},tilerKey:{schema:zod.z.enum(["maplibre"]),design:"knob",description:"only needed off `gradeui.com`/`localhost`. Default key is referrer-locked."},accessToken:{schema:zod.z.enum(["mapbox), apiKey (google"]),design:"knob",description:"required for those providers."}}};var lp=zod.z.object({kind:zod.z.literal("album"),artist:zod.z.string(),title:zod.z.string(),year:zod.z.number().optional(),description:zod.z.string().optional()}),dp=zod.z.object({kind:zod.z.literal("tv-show"),title:zod.z.string(),year:zod.z.number().optional(),description:zod.z.string().optional()}),cp=zod.z.object({kind:zod.z.literal("movie"),title:zod.z.string(),year:zod.z.number().optional(),description:zod.z.string().optional()}),pp=zod.z.object({kind:zod.z.literal("game"),title:zod.z.string(),description:zod.z.string().optional()}),mp=zod.z.object({kind:zod.z.literal("book"),title:zod.z.string().optional(),author:zod.z.string().optional(),isbn:zod.z.string().optional(),description:zod.z.string().optional()}),up=zod.z.object({kind:zod.z.literal("poster"),title:zod.z.string(),year:zod.z.number().optional(),description:zod.z.string().optional()}),gp=zod.z.object({kind:zod.z.literal("portrait"),name:zod.z.string().optional(),role:zod.z.string().optional()}),fp=zod.z.object({kind:zod.z.literal("landscape"),location:zod.z.string().optional(),mood:zod.z.string().optional()}),hp=zod.z.object({kind:zod.z.literal("product"),name:zod.z.string().optional(),brand:zod.z.string().optional()}),bp=zod.z.object({kind:zod.z.literal("food"),dish:zod.z.string().optional(),cuisine:zod.z.string().optional()}),vp=zod.z.object({kind:zod.z.literal("generic"),prompt:zod.z.string()}),yp=zod.z.union([zod.z.object({kind:zod.z.literal("video")}),zod.z.object({kind:zod.z.literal("audio")}),zod.z.object({kind:zod.z.literal("embed")}),zod.z.object({kind:zod.z.literal("3d")})]),xp=zod.z.union([lp,dp,cp,pp,mp,up,gp,fp,hp,bp,vp,yp]),wp=zod.z.enum(["video","square","portrait","wide","auto"]),Rp=zod.z.enum(["none","sm","md","lg","xl"]),Sp=zod.z.enum(["album","tv-show","movie","game","book","portrait","landscape","poster","product","food","video","audio","embed","3d","generic"]),kp=zod.z.union([zod.z.literal("auto"),zod.z.literal("icon"),zod.z.literal("none")]),Ja={name:"MediaSurface",description:"The canonical media slot for ALL non-person imagery \u2014 album art, posters, hero images, landscape photos, video and 3D containers.",when:"Pass `hint` + `alt` + (optionally) `source` so the empty-state placeholder is meaningful and the generation pipeline can later fill the slot with a real image. Use directly for declarative slots; the higher-level VideoPlayer / RivePlayer / ThreeScene wrap this for runtime-heavy media.",antipatterns:["Don't wrap <Avatar> inside <MediaSurface> to get an initials fallback. Set `alt` + `hint` on MediaSurface directly \u2014 the placeholder renders initials at small sizes derived from `alt`.","Don't use <Avatar> for album art, posters, products, food, landscapes, etc. Avatar is for PEOPLE only.","Don't inline manual gradient backgrounds (`bg-gradient-to-br \u2026`) on MediaSurface as a 'placeholder vibe' \u2014 the empty-state is already styled via `--gds-media-placeholder-bg/-fg` tokens."],composesWith:["Card","CardBlock","MediaBlock","VideoPlayer","RivePlayer","ThreeScene"],aliases:["media","image slot","media slot","image placeholder","cover","thumbnail","poster slot"],import:"@gradeui/ui",props:{hint:{schema:Sp.optional(),design:"knob",group:"image",control:"glyph-picker",label:"Slot kind",description:"Picks the placeholder glyph + the default aspect + the future generation provider. Defaults to 'generic'.",default:"generic",examples:["album","portrait","landscape","poster"]},aspect:{schema:wp.optional(),design:"knob",control:"toggle-group",label:"Aspect ratio",description:"Override the slot's natural framing. When omitted, derived from `hint`: album/product/food \u2192 square, portrait/poster \u2192 portrait, landscape \u2192 wide, video/audio/embed/generic \u2192 video."},radius:{schema:Rp.optional(),design:"knob",control:"toggle-group",label:"Corner radius",default:"lg",description:"Driven by the `--gds-media-radius` CSS variable."},border:{schema:zod.z.boolean().optional(),design:"knob",label:"Show border",default:false},loading:{schema:zod.z.boolean().optional(),design:"knob",label:"Loading state",default:false,description:"Overlays the muted-pulse skeleton on top of the slot."},emptyState:{schema:kp.optional(),design:"knob",control:"select",label:"Empty state",default:"auto",description:"'auto' renders the size-tiered placeholder (initials \u2192 glyph \u2192 glyph + caption). 'icon' is a legacy alias. 'none' renders a truly empty surface."},alt:{schema:zod.z.string().optional(),design:"content",group:"image",control:"text",label:"Alt text",description:"Becomes the eventual `<img alt>`. Also drives the placeholder caption (>160px slots) and the 2-letter initials fallback (<64px slots).",examples:["Travelling Without Moving \u2014 Jamiroquai","Sunset over Mount Fuji"]},src:{schema:zod.z.string().url().optional(),design:"content",group:"image",control:"url",label:"Image URL",description:"When set, renders an `<img>` filling the slot via object-cover. The wrapper keeps its aspect/radius/border. Generators patch this prop; manual values always win."},source:{schema:xp.optional(),design:"structured",label:"Source descriptor",description:"Structured metadata for the generation pipeline. Opaque to MediaSurface itself; read by the resolver to look up real imagery from the right provider (MusicBrainz / Pollinations / etc.).",perKindFields:{album:{artist:"string",title:"string",year:"number?"},poster:{title:"string",year:"number?"},portrait:{name:"string?",role:"string?"},landscape:{location:"string?",mood:"string?"},product:{name:"string?",brand:"string?"},food:{dish:"string?",cuisine:"string?"},generic:{prompt:"string"},video:{},audio:{},embed:{},"3d":{}}},className:{schema:zod.z.string().optional(),design:"plumbing"},style:{schema:zod.z.record(zod.z.string(),zod.z.unknown()).optional(),design:"plumbing"},children:{schema:zod.z.unknown().optional(),design:"plumbing",description:"Escape hatch for putting a custom <video>, <canvas>, Rive runtime, etc. inside. When supplied, the placeholder is suppressed."},overlay:{schema:zod.z.unknown().optional(),design:"plumbing",description:"Decorative layer rendered ABOVE the media/placeholder (play buttons, hover gradients, corner badges). Does NOT suppress the placeholder."},glyph:{schema:zod.z.unknown().optional(),design:"plumbing",description:"Per-instance override of the hint-derived placeholder glyph. Most consumers should pick a `hint` and let the map decide."},fallback:{schema:zod.z.unknown().optional(),design:"plumbing",description:"Custom node shown while `loading` is true."},onVisibilityChange:{schema:zod.z.function().optional(),design:"event",description:"Fires when the surface enters / leaves the viewport (IntersectionObserver)."}},actions:{fill:{label:"Fill image",icon:"Sparkles",description:"Resolve this slot's source via the free providers (MusicBrainz \u2192 Pollinations \u2192 Picsum) and patch the result into the runtime URL map.",kind:"resolve-media-source",enabledWhen:{propPresent:"source"}}}};var qi={name:"Message",description:`The canonical "avatar + author + timestamp + body" row. THE PRIMITIVE
47
+ terminal demos.`,import:"@gradeui/ui",composesWith:["AIChatComposer (preset wrapping this with paperclip + send + attachments)","ComposerReply (preset for comment threads)","AIChat (uses AIChatComposer internally)","Card (host above for reply boxes)",'Avatar (in leftActions slot for "your" avatar next to the input)'],styleDefaults:{ComposerToolbar:"flex flex-wrap items-center gap-0.5",AttachmentChips:"absolute -top-1.5 -right-1.5 h-5 w-5 rounded-full",ComposerInner:"w-full"},props:{placeholder:{schema:zod.z.string().optional(),design:"content"},initialText:{schema:zod.z.string().optional(),design:"content",description:"plain text content to seed on mount"},initialJson:{schema:zod.z.string().optional(),design:"content",description:"Lexical state JSON (from a previous onSubmit round-trip)"},formats:{schema:zod.z.unknown().optional(),design:"plumbing",description:"available formats (defaults to bold/italic/underline/strikethrough/code/h1/h2/blockquote/ul/ol); pass false for plain text only"},toolbar:{schema:zod.z.boolean().optional(),design:"knob",description:"show the formatting toolbar above the editor; default false"},triggers:{schema:zod.z.unknown().optional(),design:"plumbing",description:'mention/slash configs, eg. `[{ char: "@", items: people }, { char: "/", items: commands }]`'},attachments:{schema:zod.z.boolean().optional(),design:"knob",description:"enable image paste + paperclip when true/object; default off"},onSubmit:{schema:zod.z.unknown().optional(),design:"event"},isLoading:{schema:zod.z.boolean().optional(),design:"knob",description:"disables editor, swaps default Send for Stop"},onStop:{schema:zod.z.unknown().optional(),design:"event"},maxLength:{schema:zod.z.number().optional(),design:"knob"},autoFocus:{schema:zod.z.boolean().optional(),design:"plumbing"},submitOnEnter:{schema:zod.z.boolean().optional(),design:"knob",description:"default true (Shift-Enter still inserts newline)"},leftActions:{schema:zod.z.unknown().optional(),design:"plumbing",description:"override the default paperclip"},rightActions:{schema:zod.z.unknown().optional(),design:"plumbing",description:"override the default Send/Stop"},hideSend:{schema:zod.z.boolean().optional(),design:"knob",description:"hide the default Send without replacing it"},steps:{schema:zod.z.unknown().optional(),design:"plumbing",description:"scripted demo sequence"},trigger:{schema:zod.z.unknown().optional(),design:"plumbing",description:'"mount" | "inView" | "manual"; default "mount"'},play:{schema:zod.z.boolean().optional(),design:"knob",description:'for trigger="manual"'},speed:{schema:zod.z.unknown().optional(),design:"plumbing",description:'"slow" | "normal" | "fast"; default "normal"'},loop:{schema:zod.z.boolean().optional(),design:"knob"},loopDelay:{schema:zod.z.number().optional(),design:"knob",description:"ms between loop iterations, default 2000"},readOnly:{schema:zod.z.boolean().optional(),design:"knob",description:"disables editing AND focusability; programmatic playback still works; use for marketing demos so the script doesn't steal focus"},bare:{schema:zod.z.boolean().optional(),design:"knob",description:"strip the card chrome"},className:{schema:zod.z.string().optional(),design:"plumbing"}}};var ji={name:"DatePicker",description:'Any date or date-range entry. Use DatePicker for a single date (DOB, due date, booking). Use DateRangePicker for a span (report period, stay dates, filter window). Prefer these over <Input type="date"> \u2014 consistent theming, keyboard nav, a11y, and no browser-native UI drift.',import:"@gradeui/ui",aliases:["datepicker","calendar input","date field","date range","datepickerios","react native date picker","calendar input field","date field control"],subcomponents:["DateRangePicker"],composesWith:["Label","Form","Card (in CardContent)","Button (form submit)"],styleDefaults:{DatePicker:"w-[280px] justify-start text-left font-normal data-[empty=true]:text-muted-foreground",DateRangePicker:"w-[300px] justify-start text-left font-normal data-[empty=true]:text-muted-foreground"},props:{value:{schema:zod.z.unknown().optional(),design:"plumbing"},onChange:{schema:zod.z.unknown().optional(),design:"event",description:"called on select or clear"},placeholder:{schema:zod.z.string().optional(),design:"content",description:'trigger label when empty (default "Pick a date" / "Pick a date range")'},disabled:{schema:zod.z.boolean().optional(),design:"knob"},format:{schema:zod.z.string().optional(),design:"content",description:'date-fns format token for the trigger label (default "PPP" single, "LLL dd, y" range)'},align:{schema:zod.z.enum(["start","center","end"]).optional(),design:"knob",description:'popover align (default "start")'},side:{schema:zod.z.enum(["top","right","bottom","left"]).optional(),design:"knob",description:"popover side"},captionLayout:{schema:zod.z.enum(["label","dropdown","dropdown-months","dropdown-years"]).optional(),design:"knob"},className:{schema:zod.z.string().optional(),design:"plumbing",description:"on the trigger button"},contentClassName:{schema:zod.z.string().optional(),design:"content",description:"on the PopoverContent"},icon:{schema:zod.z.unknown().optional(),design:"plumbing",description:"replaces the default CalendarIcon"},numberOfMonths:{schema:zod.z.number().optional(),design:"knob",description:"DateRangePicker only, default 2"}}};var $i={name:"Dialog",description:'Modal interruptions \u2014 confirmations, focused forms, detail views, AI suggestion sheets. Dialog is the right primitive for Apple HIG / React Native "Alert" (modal) semantics. For non-blocking inline messaging use Callout; for transient notifications use Toaster (Sonner). Always include DialogTitle (a11y requirement).',import:"@gradeui/ui",aliases:["modal","popup","overlay","alert","system alert","alert dialog","modal dialog","confirm dialog","react native modal","rn alert","glass modal","frosted modal","ai suggestion modal"],subcomponents:["DialogTrigger","DialogContent","DialogHeader","DialogTitle","DialogDescription","DialogFooter","DialogClose"],composesWith:["Button (as DialogTrigger asChild","and inside DialogFooter)","Input/Textarea/Select inside DialogContent","Code (for changelog / diff modals)","MediaSurface (for image / preview modals)"],styleDefaults:{DialogOverlay:"fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",DialogContent:"fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",DialogHeader:"flex flex-col space-y-1.5 text-center sm:text-left",DialogFooter:"flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",DialogTitle:"text-lg font-semibold leading-none tracking-tight",DialogDescription:"text-sm text-muted-foreground"},props:{open:{schema:zod.z.unknown().optional(),design:"plumbing",description:"Radix controlled/uncontrolled pattern"},asChild:{schema:zod.z.enum(["wrap a Button"]).optional(),design:"plumbing"},surface:{schema:zod.z.enum(["solid","translucent","glass","glass-strong"]).optional(),design:"knob",description:"what the modal panel is *made of*. Defaults to `solid` (opaque `bg-background`). `glass` lets the page show through softly \u2014 pairs with rich backdrops or AI-suggestion modals."},accepts:{schema:zod.z.unknown(),design:"plumbing"},used:{schema:zod.z.unknown(),design:"plumbing"}}};var Ui={name:"DropdownMenu",description:'A small action menu attached to a trigger \u2014 overflow "\u2026" buttons on cards, user-avatar menus in headers, "Insert" menus in editors. For a full searchable list, use Command. For ONE primary action plus a secondary, use a Button next to a smaller ghost Button instead of a dropdown.',import:"@gradeui/ui",aliases:["dropdown","dropdown menu","overflow menu","kebab menu","more menu","action menu","context-style menu","menu","pull-down menu","pulldown menu","context menu","popup menu","actions menu","glass menu","frosted menu","ios menu","hig menu"],subcomponents:["DropdownMenuTrigger","DropdownMenuContent","DropdownMenuItem","DropdownMenuCheckboxItem","DropdownMenuRadioGroup","DropdownMenuRadioItem","DropdownMenuLabel","DropdownMenuSeparator","DropdownMenuShortcut","DropdownMenuGroup","DropdownMenuSub","DropdownMenuSubTrigger","DropdownMenuSubContent"],composesWith:["Button (as trigger asChild)","Avatar (user menu)","Card (overflow on a tile)","Tooltip (on the trigger)"],styleDefaults:{DropdownMenuSubTrigger:"flex cursor-default select-none items-center gap-2 rounded-sm outline-none focus:bg-accent data-[state=open]:bg-accent [&_svg]:pointer-events-none [&_svg]:shrink-0",DropdownMenuSubContent:"z-50 min-w-[8rem] overflow-hidden rounded-md border text-popover-foreground shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 origin-[--radix-dropdown-menu-content-transform-origin]",DropdownMenuContent:"z-50 max-h-[var(--radix-dropdown-menu-content-available-height)] min-w-[8rem] overflow-y-auto overflow-x-hidden rounded-md border text-popover-foreground shadow-md",DropdownMenuItem:"relative flex cursor-default select-none items-center gap-2 rounded-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&>svg]:shrink-0",DropdownMenuCheckboxItem:"relative flex cursor-default select-none items-center rounded-sm pr-2 outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",DropdownMenuRadioItem:"relative flex cursor-default select-none items-center rounded-sm pr-2 outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",DropdownMenuLabel:"font-semibold",DropdownMenuSeparator:"-mx-1 my-1 h-px bg-muted",DropdownMenuShortcut:"ml-auto text-xs tracking-widest opacity-60"},props:{open:{schema:zod.z.unknown().optional(),design:"plumbing"},asChild:{schema:zod.z.boolean().optional(),design:"plumbing",description:"usually wraps a Button"},align:{schema:zod.z.enum(["start","center","end","top","right","bottom","left"]).optional(),design:"knob"},surface:{schema:zod.z.enum(["solid","translucent","glass","glass-strong"]).optional(),design:"knob",description:"what the menu surface is *made of*. `solid` (default) is `bg-popover`. `translucent` matches Apple HIG / iOS menu sheets. `glass` for menus floating over rich canvases."},size:{schema:zod.z.enum(["default","sm","xs"]).optional(),design:"knob",description:'menu density; cascades to every item (Item, Checkbox, Radio, SubTrigger, Label) via context so a compact trigger gets a compact menu. Use "xs" in dense tool panels.'},onSelect:{schema:zod.z.unknown().optional(),design:"event"},DropdownMenuCheckboxItem:{schema:zod.z.unknown(),design:"plumbing"},DropdownMenuSub:{schema:zod.z.unknown(),design:"plumbing",description:"sub-trigger shows children, sub-content holds the deeper items"},children:{schema:zod.z.unknown(),design:"plumbing",description:"right-aligned kbd hint"}}};var qi={name:"Field",description:'Pair a bare control with a label and optional description in a row, with id + aria-describedby wired automatically. Use layout="setting" for the classic settings row (label on the left, Switch on the right). For a selectable CARD where the whole surface is the control, use RadioCard / CheckboxCard / SwitchCard instead.',import:"@gradeui/ui",aliases:["field","form field","control row","label and description","two line checkbox","option row","setting row","toggle row"],composesWith:["Checkbox","RadioGroup","RadioGroupItem","Switch","Badge (inside Field.Trailing)"],styleDefaults:{FieldLabel:"text-sm font-medium leading-none text-foreground cursor-pointer peer-disabled:cursor-not-allowed peer-disabled:opacity-70",FieldDescription:"text-sm text-muted-foreground",FieldTrailing:"flex shrink-0 items-center gap-2",FieldRoot:"flex gap-3"},props:{layout:{schema:zod.z.enum(["option","setting"]).optional(),design:"knob",description:"option (default): control leads, text beside it; setting: text leads, control pinned trailing"},children:{schema:zod.z.unknown(),design:"plumbing",description:"order does not matter"}}};var Yi={name:"FillPicker",description:"Grade's paint picker \u2014 the control for choosing a frame's background fill, modelled on Figma's fill popover. A fill-type icon row (solid \xB7 gradient \xB7 image \xB7 pattern \xB7 video \xB7 shader) switches the panel below; a global opacity sits at the foot. Emits a FillValue that maps 1:1 onto BackgroundFill props. This is a Studio/inspector chrome control \u2014 pair it with BackgroundFill, which renders the chosen paint. Not for app content.",import:"@gradeui/ui",aliases:["fill picker","paint picker","background picker","fill chooser","fill popover"],composesWith:["BackgroundFill (renders the FillValue)","Popover (host it in a popover)","ShaderPresetPicker (the shader tab)","the inspector Fill section"],styleDefaults:{Swatch:"h-7 w-7 rounded-md border border-border/60 transition-shadow",FillPicker:"flex flex-col gap-3"},props:{value:{schema:zod.z.unknown(),design:"plumbing",description:"current paint ({ type, color?, gradient?, src?, fit?, repeat?, tileSize?, preset?, palette?, postPreset?, opacity? }) (required)"},onChange:{schema:zod.z.unknown(),design:"event",description:"called on any change (required)"}}};var Xi={name:"Flex",description:"The unopinionated flexbox primitive \u2014 reach for Flex when Stack, Row, or Grid don't quite fit. Specifically when you need reverse direction (`row-reverse` / `col-reverse`), CSS defaults instead of Row's baked-in `items-center gap-md`, or baseline alignment. Otherwise prefer Stack / Row / Grid \u2014 they're easier to read and tuned for the 95% case. Flex is the escape hatch, not the default.",import:"@gradeui/ui",aliases:["flex","flexbox","flex container","hstack","vstack","horizontal","vertical","generic container","layout view"],composesWith:["any content component"],props:{direction:{schema:zod.z.enum(["row","col","row-reverse","col-reverse"]).optional(),design:"knob",description:"main-axis direction",default:"row"},gap:{schema:zod.z.enum(["none","xs","sm","md","lg","xl","2xl"]).optional(),design:"knob",description:"gap between children",default:"none"},align:{schema:zod.z.enum(["start","center","end","stretch","baseline"]).optional(),design:"knob",description:"cross-axis alignment",default:"stretch"},justify:{schema:zod.z.enum(["start","center","end","between","around","evenly"]).optional(),design:"knob",description:"main-axis distribution",default:"start"},wrap:{schema:zod.z.enum(["nowrap","wrap","wrap-reverse"]).optional(),design:"knob",description:"wrap behaviour when children overflow",default:"nowrap"},asChild:{schema:zod.z.boolean().optional(),design:"plumbing",description:"render as the child element via Slot",default:false},className:{schema:zod.z.string().optional(),design:"plumbing"},children:{schema:zod.z.unknown(),design:"plumbing"}}};var Ji={name:"Grid",description:"2D layouts where Stack (vertical) and Row (horizontal) don't fit \u2014 stat-card grids, feature tiles, pricing columns, photo grids. Reach for Grid over hand-rolled `grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4` so the column count is a prop the settings panel can mutate and the responsive ladder stays consistent across designs.",import:"@gradeui/ui",aliases:["grid","tiles","cards grid","stat grid","columns","feature grid","grid view","lazy v grid","lazyvgrid","lazy h grid","lazyhgrid","tile grid","masonry"],composesWith:["Card","Stack (inside each cell)","Row","Button","any content component"],styleDefaults:{Grid:"gds-grid grid grid-cols-1 sm:grid-cols-2 md:grid-cols-3 gap-4 items-stretch"},variantDefaults:{cols:"3",gap:"md",align:"stretch"},props:{cols:{schema:zod.z.enum(["1","2","3","4","5","6","12"]).optional(),design:"knob",description:'desktop column count; each value has a baked-in responsive ladder (e.g. "4" \u2192 1 col mobile, 2 tablet, 4 desktop)',default:"3"},gap:{schema:zod.z.enum(["none","xs","sm","md","lg","xl","2xl"]).optional(),design:"knob",description:"gap between grid cells (same scale as Stack/Row)",default:"md"},align:{schema:zod.z.enum(["start","center","end","stretch"]).optional(),design:"knob",description:"cross-axis alignment of cells",default:"stretch"},asChild:{schema:zod.z.boolean().optional(),design:"plumbing",description:"render as the child element via Slot",default:false},className:{schema:zod.z.string().optional(),design:"plumbing"},children:{schema:zod.z.unknown(),design:"plumbing"}}};var Qi={name:"HoverCard",description:"Rich preview content surfaced on hover \u2014 user profile mini-cards on @-mentions, link previews, definition popups, layer-thumbnail peeks. Pointer-only by design (no touch-friendly trigger); pair with a click target for touch devices, or fall back to Popover. NEVER use HoverCard for critical info \u2014 if the user can't reach it via keyboard or touch, it might as well not exist for accessibility.",import:"@gradeui/ui",aliases:["hover card","hover preview","mention preview","profile peek","link preview","rich tooltip","link preview card","profile hover","peek card","glass preview","frosted preview"],subcomponents:["HoverCardTrigger","HoverCardContent"],composesWith:["Avatar (user preview)","Card (richer content)","Link (the trigger)","MediaSurface (link/layer previews)","Code (snippet previews)"],styleDefaults:{HoverCardContent:"z-50 w-64 rounded-md border p-4 text-popover-foreground shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 origin-[--radix-hover-card-content-transform-origin]"},props:{open:{schema:zod.z.unknown().optional(),design:"plumbing"},asChild:{schema:zod.z.boolean().optional(),design:"plumbing",description:"usually a Link or Button"},side:{schema:zod.z.unknown().optional(),design:"plumbing"},surface:{schema:zod.z.enum(["solid","translucent","glass","glass-strong"]).optional(),design:"knob",description:"what the preview surface is *made of*. `solid` (default) is `bg-popover`. `glass` for hover previews over rich content (a media feed, a layout canvas)."}}};var es={name:"Input",description:'Any single-line text entry. Always pair with a Label for accessibility. Use startSlot/endSlot for icons, prefixes and units instead of hand-positioning absolute children; use size="sm"/"xs" in dense tool panels.',import:"@gradeui/ui",aliases:["text field","textbox","textfield","form field","text input","secure field","search field","url field","number field","textinput","text input field","react native textinput","unit input","input with icon"],composesWith:["Label","Form","Card (in CardContent)","Button (form submit)"],styleDefaults:{Input:"pointer-events-none absolute inset-y-0 left-0 flex items-center text-muted-foreground [&_svg]:size-3.5"},props:{type:{schema:zod.z.string().optional(),design:"content"},placeholder:{schema:zod.z.string().optional(),design:"content",description:"hint text shown while the input is empty. Model it explicitly (not just a native passthrough) so generated screens carry placeholders and the validator accepts them."},size:{schema:zod.z.enum(["default","sm","xs"]).optional(),design:"knob",description:"control density. `default` (h-9) for forms; `sm` (h-8) and `xs` (h-7) for dense tool panels like the inspector. NOTE: pre-unification scale \u2014 see Figma parity audit; due to migrate to the t-shirt scale (xs 24 | sm 28 | md 32 | lg 40, default\u2192md)."},startSlot:{schema:zod.z.unknown().optional(),design:"plumbing",description:"adornment rendered inside the leading edge (icon, prefix, currency symbol). Non-interactive by default so clicks focus the input."},endSlot:{schema:zod.z.unknown().optional(),design:"plumbing",description:'adornment rendered inside the trailing edge (unit like "px", a clear button, a stepper). Same pointer rules as startSlot.'}}};var os={name:"Label",description:'Every Input / Textarea / Checkbox / Switch / RadioGroup. Always use htmlFor so clicking the label focuses the control. Match `size` to the field it labels (size="xs" label over a size="xs" input).',import:"@gradeui/ui",aliases:["label","form label","field label","caption"],composesWith:["Input","Textarea","Checkbox","Switch","RadioGroup","Select"],styleDefaults:{Label:"font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70 text-sm"},variantDefaults:{size:"default"},props:{htmlFor:{schema:zod.z.string().optional(),design:"content",description:"binds to the input's id"},size:{schema:zod.z.enum(["default","sm","xs"]).optional(),design:"knob",description:"text size, mirrors Input/Select/Textarea so a field and its label scale together. default = text-sm; xs = 11px for dense tool panels."}}};var rs={name:"Logo",description:"ALWAYS use <Logo> wherever a screen carries a brand mark \u2014",import:"@gradeui/ui",aliases:["logo","brand","brandmark","wordmark","lockup","brand logo","app logo","logotype","grade mark","g arrow"],composesWith:["AppShell","AppShellHeader","Sidebar","SidebarHeader","Toolbar","MotionOverlay","Row","Stack"],styleDefaults:{Logo:"gds-logo inline-flex shrink-0 select-none items-center"},props:{sources:{schema:zod.z.unknown().optional(),design:"plumbing",description:"artwork keyed by lockup then appearance:"}}};var as={name:"Map",description:"Any layout that needs a real map \u2014 listings (real estate, Airbnb-style), fleet/logistics dashboards, store locators, anywhere a user picks a location from a viewport. Reach for the controlled `hoveredId` prop when a sibling list and the map need to highlight each other.",import:"@gradeui/ui",aliases:["map","maps","mapbox","maplibre","google maps","geo","location","latlng","coordinates","marker","pin","airbnb","listings","fleet","real estate","logistics","map view","mapkit","mapview","react native maps","rn maps"],subcomponents:["MapMarker"],composesWith:["Card (as marker content)","Badge","Avatar","Button","Row","Stack","Skeleton"],props:{provider:{schema:zod.z.unknown(),design:"plumbing",description:'"maplibre" (default, free, no key) | "mapbox" (needs accessToken) | "google" (needs apiKey). Switching is one prop change.'},center:{schema:zod.z.unknown(),design:"plumbing",description:"`[lng, lat]` tuple. ALWAYS lng first. Required."},zoom:{schema:zod.z.unknown(),design:"plumbing",description:"number, 0\u201322. Required."},bounds:{schema:zod.z.unknown(),design:"plumbing",description:"`[[swLng, swLat], [neLng, neLat]]`. When set, takes precedence over center+zoom."},appearance:{schema:zod.z.unknown(),design:"plumbing",description:'"light" | "dark" | "satellite" | "auto" (default "auto", follows GradeThemeProvider mode).'},hoveredId:{schema:zod.z.unknown(),design:"plumbing",description:'controlled string id, pairs with onHoveredIdChange. The matching MapMarker gets `data-gds-state="hovered"` automatically. This is how you build list \u2194 map two-way sync.'},interactive:{schema:zod.z.unknown(),design:"plumbing",description:"false freezes pan/zoom, useful for static cards."},onLoad:{schema:zod.z.unknown(),design:"event",description:"handle exposes flyTo, panTo, fitBounds, getCenter, getZoom, getBounds, instance."},tilerKey:{schema:zod.z.unknown().optional(),design:"plumbing",description:'MapLibre only (provider="maplibre"). Optional everywhere: omit on `gradeui.com`/`localhost` and the referrer-locked demo key is used; set it only when embedding off-domain. The contract never requires it.'},accessToken:{schema:zod.z.unknown().optional(),design:"plumbing",description:'Mapbox only. Pass it whenever provider="mapbox" \u2014 the component itself enforces this at runtime (throws a clear `provider="mapbox" requires an accessToken prop` error via onError if missing). It is OPTIONAL in the contract on purpose, so the validator never demands it from maplibre/google maps.'},apiKey:{schema:zod.z.unknown().optional(),design:"plumbing",description:'Google only. Pass it whenever provider="google" \u2014 the component enforces it at runtime (throws `provider="google" requires an apiKey prop` via onError if missing). OPTIONAL in the contract on purpose, so it\'s never demanded from maplibre/mapbox.'},id:{schema:zod.z.unknown(),design:"plumbing",description:"string. Required. Stable marker id; pair with Map's `hoveredId` for list\u2194map hover sync."},at:{schema:zod.z.unknown(),design:"plumbing",description:"`[lng, lat]` tuple. Required. THE coordinate prop. ALWAYS lng first. The prop is literally named `at` \u2014 it is NOT `lngLat`, `coordinates`, `position`, `latLng`, `center`, or separate `lng`/`lat` props. Passing any other name leaves the marker coord `undefined`, and MapLibre throws on mount, crashing the WHOLE screen in every renderer. When in doubt, copy the `airbnb-listings` scaffold: `<MapMarker id={l.id} at={l.coords}>`."},anchor:{schema:zod.z.unknown(),design:"plumbing",description:'"center" | "bottom" (default "bottom", pin tip sits on the coord). Only these two values.'},onClick:{schema:zod.z.unknown(),design:"event",description:"handler called with `({ id, coords, native })` on marker click."},children:{schema:zod.z.unknown(),design:"plumbing",description:"DOM rendered as the marker (Badge, Card, Avatar, or any element). Inherits `--gds-*` tokens."}}};var Kp=zod.z.object({kind:zod.z.literal("album"),artist:zod.z.string(),title:zod.z.string(),year:zod.z.number().optional(),description:zod.z.string().optional()}),qp=zod.z.object({kind:zod.z.literal("tv-show"),title:zod.z.string(),year:zod.z.number().optional(),description:zod.z.string().optional()}),Zp=zod.z.object({kind:zod.z.literal("movie"),title:zod.z.string(),year:zod.z.number().optional(),description:zod.z.string().optional()}),Yp=zod.z.object({kind:zod.z.literal("game"),title:zod.z.string(),description:zod.z.string().optional()}),Xp=zod.z.object({kind:zod.z.literal("book"),title:zod.z.string().optional(),author:zod.z.string().optional(),isbn:zod.z.string().optional(),description:zod.z.string().optional()}),Jp=zod.z.object({kind:zod.z.literal("poster"),title:zod.z.string(),year:zod.z.number().optional(),description:zod.z.string().optional()}),Qp=zod.z.object({kind:zod.z.literal("portrait"),name:zod.z.string().optional(),role:zod.z.string().optional()}),eu=zod.z.object({kind:zod.z.literal("landscape"),location:zod.z.string().optional(),mood:zod.z.string().optional()}),tu=zod.z.object({kind:zod.z.literal("product"),name:zod.z.string().optional(),brand:zod.z.string().optional()}),ou=zod.z.object({kind:zod.z.literal("food"),dish:zod.z.string().optional(),cuisine:zod.z.string().optional()}),ru=zod.z.object({kind:zod.z.literal("generic"),prompt:zod.z.string()}),au=zod.z.union([zod.z.object({kind:zod.z.literal("video")}),zod.z.object({kind:zod.z.literal("audio")}),zod.z.object({kind:zod.z.literal("embed")}),zod.z.object({kind:zod.z.literal("3d")})]),nu=zod.z.union([Kp,qp,Zp,Yp,Xp,Jp,Qp,eu,tu,ou,ru,au]),iu=zod.z.enum(["video","square","portrait","wide","auto"]),su=zod.z.enum(["none","sm","md","lg","xl"]),lu=zod.z.enum(["album","tv-show","movie","game","book","portrait","landscape","poster","product","food","video","audio","embed","3d","generic"]),du=zod.z.union([zod.z.literal("auto"),zod.z.literal("icon"),zod.z.literal("none")]),rn={name:"MediaSurface",description:"The canonical media slot for ALL non-person imagery \u2014 album art, posters, hero images, landscape photos, video and 3D containers.",when:"Pass `hint` + `alt` + (optionally) `source` so the empty-state placeholder is meaningful and the generation pipeline can later fill the slot with a real image. Use directly for declarative slots; the higher-level VideoPlayer / RivePlayer / ThreeScene wrap this for runtime-heavy media.",antipatterns:["Don't wrap <Avatar> inside <MediaSurface> to get an initials fallback. Set `alt` + `hint` on MediaSurface directly \u2014 the placeholder renders initials at small sizes derived from `alt`.","Don't use <Avatar> for album art, posters, products, food, landscapes, etc. Avatar is for PEOPLE only.","Don't inline manual gradient backgrounds (`bg-gradient-to-br \u2026`) on MediaSurface as a 'placeholder vibe' \u2014 the empty-state is already styled via `--gds-media-placeholder-bg/-fg` tokens."],composesWith:["Card","CardBlock","MediaBlock","VideoPlayer","RivePlayer","ThreeScene"],aliases:["media","image slot","media slot","image placeholder","cover","thumbnail","poster slot"],import:"@gradeui/ui",props:{hint:{schema:lu.optional(),design:"knob",group:"image",control:"glyph-picker",label:"Slot kind",description:"Picks the placeholder glyph + the default aspect + the future generation provider. Defaults to 'generic'.",default:"generic",examples:["album","portrait","landscape","poster"]},aspect:{schema:iu.optional(),design:"knob",control:"toggle-group",label:"Aspect ratio",description:"Override the slot's natural framing. When omitted, derived from `hint`: album/product/food \u2192 square, portrait/poster \u2192 portrait, landscape \u2192 wide, video/audio/embed/generic \u2192 video."},radius:{schema:su.optional(),design:"knob",control:"toggle-group",label:"Corner radius",default:"lg",description:"Driven by the `--gds-media-radius` CSS variable."},border:{schema:zod.z.boolean().optional(),design:"knob",label:"Show border",default:false},loading:{schema:zod.z.boolean().optional(),design:"knob",label:"Loading state",default:false,description:"Overlays the muted-pulse skeleton on top of the slot."},emptyState:{schema:du.optional(),design:"knob",control:"select",label:"Empty state",default:"auto",description:"'auto' renders the size-tiered placeholder (initials \u2192 glyph \u2192 glyph + caption). 'icon' is a legacy alias. 'none' renders a truly empty surface."},alt:{schema:zod.z.string().optional(),design:"content",group:"image",control:"text",label:"Alt text",description:"Becomes the eventual `<img alt>`. Also drives the placeholder caption (>160px slots) and the 2-letter initials fallback (<64px slots).",examples:["Travelling Without Moving \u2014 Jamiroquai","Sunset over Mount Fuji"]},src:{schema:zod.z.string().url().optional(),design:"content",group:"image",control:"url",label:"Image URL",description:"When set, renders an `<img>` filling the slot via object-cover. The wrapper keeps its aspect/radius/border. Generators patch this prop; manual values always win."},source:{schema:nu.optional(),design:"structured",label:"Source descriptor",description:"Structured metadata for the generation pipeline. Opaque to MediaSurface itself; read by the resolver to look up real imagery from the right provider (MusicBrainz / Pollinations / etc.).",perKindFields:{album:{artist:"string",title:"string",year:"number?"},poster:{title:"string",year:"number?"},portrait:{name:"string?",role:"string?"},landscape:{location:"string?",mood:"string?"},product:{name:"string?",brand:"string?"},food:{dish:"string?",cuisine:"string?"},generic:{prompt:"string"},video:{},audio:{},embed:{},"3d":{}}},className:{schema:zod.z.string().optional(),design:"plumbing"},style:{schema:zod.z.record(zod.z.string(),zod.z.unknown()).optional(),design:"plumbing"},children:{schema:zod.z.unknown().optional(),design:"plumbing",description:"Escape hatch for putting a custom <video>, <canvas>, Rive runtime, etc. inside. When supplied, the placeholder is suppressed."},overlay:{schema:zod.z.unknown().optional(),design:"plumbing",description:"Decorative layer rendered ABOVE the media/placeholder (play buttons, hover gradients, corner badges). Does NOT suppress the placeholder."},glyph:{schema:zod.z.unknown().optional(),design:"plumbing",description:"Per-instance override of the hint-derived placeholder glyph. Most consumers should pick a `hint` and let the map decide."},fallback:{schema:zod.z.unknown().optional(),design:"plumbing",description:"Custom node shown while `loading` is true."},onVisibilityChange:{schema:zod.z.function().optional(),design:"event",description:"Fires when the surface enters / leaves the viewport (IntersectionObserver)."}},actions:{fill:{label:"Fill image",icon:"Sparkles",description:"Resolve this slot's source via the free providers (MusicBrainz \u2192 Pollinations \u2192 Picsum) and patch the result into the runtime URL map.",kind:"resolve-media-source",enabledWhen:{propPresent:"source"}}}};var ns={name:"Message",description:`The canonical "avatar + author + timestamp + body" row. THE PRIMITIVE
48
48
  for any chat surface, comment thread, post-reply, activity log, or
49
49
  notification feed that follows the people-and-text shape.
50
50
 
@@ -58,7 +58,7 @@ Notion comment sidebars, in-app activity logs, notification rows \u2014
58
58
  every one of these IS \`<Message>\`. Do not roll the layout inline.
59
59
 
60
60
  For non-people activity (system events, log lines, status pings) use
61
- Callout or a plain Row instead \u2014 Message implies a human author.`,import:"@gradeui/ui",composesWith:['Avatar (in the avatar slot \u2014 pair with AvatarFallback tone="..." for stable per-author colour)',"Badge (in the badge slot for role / OP / bot tags)","Button (in actions",'typically size="icon" + variant="ghost")',"Stack (host multiple Messages in a thread)","Card (wrap a Stack of Messages for a comment-thread block)"],styleDefaults:{Message:"flex items-start"},props:{author:{schema:zod.z.string(),design:"content",description:"display name of the message author"},timestamp:{schema:zod.z.unknown().optional(),design:"plumbing",description:'string ("11:24", "2 hours ago") or any node for custom formatting'},avatar:{schema:zod.z.unknown().optional(),design:"plumbing",description:"slot for any `<Avatar>` composition; omit for grouped messages from the same author"},badge:{schema:zod.z.unknown().optional(),design:"plumbing",description:"small chip(s) next to the author name (OP, Bot, Admin, role tag)"},edited:{schema:zod.z.union([zod.z.boolean(),zod.z.string()]).optional(),design:"knob",description:'renders "(edited)" hint next to timestamp; pass a string to customise ("(edited 2 minutes ago)")'},pinned:{schema:zod.z.boolean().optional(),design:"knob",description:'renders a pin glyph + "Pinned" label above the header row for sticky / pinned messages'},actions:{schema:zod.z.unknown().optional(),design:"plumbing",description:"end-of-header slot, typically hover-revealed icon buttons (reply / react / more)"},reactions:{schema:zod.z.unknown().optional(),design:"plumbing",description:"slot below the body, typically a Row of reaction chips (emoji + count)"},threadCount:{schema:zod.z.number().optional(),design:"knob",description:'renders a "N replies" link affordance below the body'},onThreadClick:{schema:zod.z.unknown().optional(),design:"event",description:"handler for the threadCount affordance"},align:{schema:zod.z.enum(["start","end"]).optional(),design:"knob",description:'`start` (default) puts the avatar on the left; `end` mirrors for "your messages" in DM threads'},density:{schema:zod.z.enum(["default","compact"]).optional(),design:"knob",description:'`default` is the canonical chat / channel-feed rhythm; `compact` tightens text sizes + gaps for dense side panels (Studio comments, activity feeds). Pair with `Avatar size="xs"` for the tightest stack.'},children:{schema:zod.z.unknown(),design:"plumbing",description:"body content (plain text or rich nodes)"},className:{schema:zod.z.string().optional(),design:"plumbing"}}};var Yi={name:"MultiSelect",description:`Picking multiple items from a finite list \u2014 tag selectors, filter chips,
61
+ Callout or a plain Row instead \u2014 Message implies a human author.`,import:"@gradeui/ui",composesWith:['Avatar (in the avatar slot \u2014 pair with AvatarFallback tone="..." for stable per-author colour)',"Badge (in the badge slot for role / OP / bot tags)","Button (in actions",'typically size="icon" + variant="ghost")',"Stack (host multiple Messages in a thread)","Card (wrap a Stack of Messages for a comment-thread block)"],styleDefaults:{Message:"flex items-start"},props:{author:{schema:zod.z.string(),design:"content",description:"display name of the message author"},timestamp:{schema:zod.z.unknown().optional(),design:"plumbing",description:'string ("11:24", "2 hours ago") or any node for custom formatting'},avatar:{schema:zod.z.unknown().optional(),design:"plumbing",description:"slot for any `<Avatar>` composition; omit for grouped messages from the same author"},badge:{schema:zod.z.unknown().optional(),design:"plumbing",description:"small chip(s) next to the author name (OP, Bot, Admin, role tag)"},edited:{schema:zod.z.union([zod.z.boolean(),zod.z.string()]).optional(),design:"knob",description:'renders "(edited)" hint next to timestamp; pass a string to customise ("(edited 2 minutes ago)")'},pinned:{schema:zod.z.boolean().optional(),design:"knob",description:'renders a pin glyph + "Pinned" label above the header row for sticky / pinned messages'},actions:{schema:zod.z.unknown().optional(),design:"plumbing",description:"end-of-header slot, typically hover-revealed icon buttons (reply / react / more)"},reactions:{schema:zod.z.unknown().optional(),design:"plumbing",description:"slot below the body, typically a Row of reaction chips (emoji + count)"},threadCount:{schema:zod.z.number().optional(),design:"knob",description:'renders a "N replies" link affordance below the body'},onThreadClick:{schema:zod.z.unknown().optional(),design:"event",description:"handler for the threadCount affordance"},align:{schema:zod.z.enum(["start","end"]).optional(),design:"knob",description:'`start` (default) puts the avatar on the left; `end` mirrors for "your messages" in DM threads'},density:{schema:zod.z.enum(["default","compact"]).optional(),design:"knob",description:'`default` is the canonical chat / channel-feed rhythm; `compact` tightens text sizes + gaps for dense side panels (Studio comments, activity feeds). Pair with `Avatar size="xs"` for the tightest stack.'},children:{schema:zod.z.unknown(),design:"plumbing",description:"body content (plain text or rich nodes)"},className:{schema:zod.z.string().optional(),design:"plumbing"}}};var is={name:"Motion",description:"A directed sequence of scenes on one persistent stage \u2014 the",import:"@gradeui/ui",aliases:["motion","grade motion","scenes","sequence","demo reel","product video","launch video","title card","lower third","section break","multi-scene","storyboard"],subcomponents:["MotionScene","MotionScreen","MotionText"],composesWith:["ScreenAnimator","ThreeScene","VideoPlayer","AppShell","the whole component set (scenes hold screens)"],styleDefaults:{MotionScreen:"gds-motion-screen",MotionText:"gds-motion-text",MotionOverlay:"gds-motion-overlay",MotionSceneImpl:"gds-motion-scene",Motion:"gds-motion"},props:{view:{schema:zod.z.enum(["play","strip"]).optional(),design:"knob",description:"play runs the film; strip lays",default:"play"}}};var ss={name:"MultiSelect",description:`Picking multiple items from a finite list \u2014 tag selectors, filter chips,
62
62
  "share with N people", multi-region settings.
63
63
 
64
64
  **This is the answer for ANY "removable-chips-inside-an-input" pattern.**
@@ -76,7 +76,7 @@ already covers the trigger-with-badges shape.
76
76
 
77
77
  Use \`<Select>\` instead for SINGLE selection. Use \`<Command>\` directly
78
78
  (no MultiSelect wrapper) when the option set is unbounded or async
79
- (users to @-mention, email recipients, search-as-you-type API results).`,import:"@gradeui/ui",composesWith:["Popover","Command","Badge","Checkbox-style row indicator","Separator"],styleDefaults:{MultiSelect:"mr-2 flex h-4 w-4 shrink-0 items-center justify-center rounded-sm border border-primary"},props:{options:{schema:zod.z.unknown(),design:"plumbing"},value:{schema:zod.z.string().optional(),design:"content",description:"controlled selection"},defaultValue:{schema:zod.z.string().optional(),design:"content",description:"uncontrolled initial selection"},onValueChange:{schema:zod.z.unknown().optional(),design:"event"},placeholder:{schema:zod.z.string().optional(),design:"content",default:"Select\u2026"},searchPlaceholder:{schema:zod.z.string().optional(),design:"content",default:"Search\u2026"},emptyMessage:{schema:zod.z.string().optional(),design:"content",default:"Nothing matches."},maxCount:{schema:zod.z.number().optional(),design:"knob",description:'badges shown on the trigger before collapsing to "+N more"'},searchable:{schema:zod.z.boolean().optional(),design:"knob",description:"hide for short option lists",default:true},badgeDismissible:{schema:zod.z.boolean().optional(),design:"knob",description:"show \xD7 on each selected badge",default:true},disabled:{schema:zod.z.boolean().optional(),design:"knob"},modalPopover:{schema:zod.z.boolean().optional(),design:"knob",description:"Popover modal mode",default:false},className:{schema:zod.z.string().optional(),design:"plumbing"}}};var Zi={name:"Popover",description:'A floating panel anchored to a trigger that contains interactive content \u2014 date pickers, color pickers, filter pickers, "more info" panels, inline forms. Differs from Tooltip (hover-only, no focusable content) and Dialog (modal, blocks the page). DatePicker, DateRangePicker, and the Combobox pattern all compose Popover internally.',import:"@gradeui/ui",aliases:["popover","dropdown panel","floating panel","inline editor","attached panel","filter pop","popover view","popoverpresentation","attached popover","glass popover","frosted popover","inspector popover"],subcomponents:["PopoverTrigger","PopoverContent","PopoverAnchor"],composesWith:["Button (as trigger)","Calendar (date picker)","Command (combobox)","Form controls (inline edit popover)","Code (code-detail popovers)"],styleDefaults:{PopoverContent:"z-50 w-72 rounded-md border p-4 text-popover-foreground shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 origin-[--radix-popover-content-transform-origin]"},props:{open:{schema:zod.z.unknown().optional(),design:"plumbing"},asChild:{schema:zod.z.boolean().optional(),design:"plumbing",description:"usually a Button"},side:{schema:zod.z.enum(["top","right","bottom","left","start","center","end"]).optional(),design:"knob"},surface:{schema:zod.z.enum(["solid","translucent","glass","glass-strong"]).optional(),design:"knob",description:"what the popover surface is *made of*. `solid` is the default opaque `bg-popover`. `translucent` is the Apple HIG menu-sheet feel. `glass` for floating panels over rich canvases (Studio inspector, image-tool palette)."}}};var Xi={name:"Progress",description:"Determinate progress \u2014 file uploads, multi-step forms, quota meters. Indeterminate state \u2192 use Skeleton or animated Loader icon.",import:"@gradeui/ui",aliases:["progress","progress view","progress indicator","progress bar","determinate progress","loading bar","completion bar"],composesWith:["Card (as a section)","Badge (showing % next to it)","Label (describing what's loading)"],styleDefaults:{Progress:"relative h-4 w-full overflow-hidden rounded-full bg-secondary"},props:{value:{schema:zod.z.number().optional(),design:"knob",description:"percent complete"},max:{schema:zod.z.number().optional(),design:"knob"},className:{schema:zod.z.string().optional(),design:"plumbing"}}};var Ji={name:"RadioCard",description:"Single-select where each option is a whole selectable card (shipping options, plan picker, onboarding choices). The whole card is the control, so focus and the checked state live on the card surface and the entire card is clickable. MUST sit inside a RadioGroup (keeps roving focus + single-select). Static content only \u2014 never nest an interactive control (Slider/Input/Button/link) inside. For a plain radio + label row use Field instead.",import:"@gradeui/ui",aliases:["radio card","selectable card","option card","plan picker","choice card","pricing tier","segmented choice card"],composesWith:["RadioGroup (required parent)","Badge (in aside)","MediaSurface (custom children)"],props:{value:{schema:zod.z.string(),design:"content",description:"the radio value"},label:{schema:zod.z.unknown().optional(),design:"plumbing",description:"title line"},description:{schema:zod.z.unknown().optional(),design:"plumbing",description:"secondary line"},aside:{schema:zod.z.unknown().optional(),design:"plumbing",description:"slot before the indicator (a Badge, price, hint)"},hideIndicator:{schema:zod.z.boolean().optional(),design:"knob",description:"hide the dot; selection shown by the card border + background"},indicatorPosition:{schema:zod.z.enum(["leading","trailing"]).optional(),design:"knob",description:"default trailing"},children:{schema:zod.z.unknown().optional(),design:"plumbing",description:"arbitrary static content (image, custom layout) instead of label/description"}}};var Qi={name:"RadioGroup",description:"A small set of mutually-exclusive options where the user needs to SEE all of them at once \u2014 pricing tiers (3-4 options), shipping speed, payment method radio cards. When each option should be a whole clickable card (label + description, selected state on the card), use RadioCard inside the RadioGroup instead of a Card with a radio in the corner. For a plain label + description row, wrap RadioGroupItem in Field. For 5+ options use Select. For a segmented control as part of a toolbar use ToggleGroup. For yes/no use Switch.",import:"@gradeui/ui",aliases:["radio group","radio buttons","single-choice","pricing options","payment method","radio buttons","radio control","single-select"],subcomponents:["RadioGroupItem"],composesWith:["Label (paired with each item via htmlFor)","Field (label + description row)","RadioCard (whole-card selectable option)","Stack (vertical list)"],styleDefaults:{RadioGroup:"grid gap-2",RadioGroupItem:"aspect-square h-4 w-4 rounded-full border border-primary text-primary ring-offset-background focus:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50"},props:{value:{schema:zod.z.string().optional(),design:"content",description:"controlled selection"},defaultValue:{schema:zod.z.string().optional(),design:"content",description:"uncontrolled initial"},onValueChange:{schema:zod.z.unknown().optional(),design:"event"},disabled:{schema:zod.z.boolean().optional(),design:"knob"},orientation:{schema:zod.z.enum(["horizontal","vertical"]).optional(),design:"knob",default:"vertical"},name:{schema:zod.z.string().optional(),design:"content",description:"form name when posting natively"},id:{schema:zod.z.string().optional(),design:"plumbing",description:"pair with a <Label htmlFor> for click-on-label"}}};var es={name:"Resizable",description:`A multi-pane layout where the user wants to drag the divider \u2014 Slack/Mail-style list+detail, IDE editor+terminal, side-by-side compare view. Static layouts shouldn't use this \u2014 reach for AppShell with nav="three-pane" (fixed widths) or Grid (responsive ladder). Built on react-resizable-panels under the hood.`,import:"@gradeui/ui",aliases:["resizable","splitter","split pane","drag divider","adjustable panels","resizer","split view","draggable divider","split pane resizer","ns split view"],subcomponents:["ResizablePanelGroup","ResizablePanel","ResizableHandle"],composesWith:["AppShellMain (host the splitter inside main)","ScrollArea (each panel's content)","Card"],styleDefaults:{ResizablePanelGroup:"flex h-full w-full data-[panel-group-direction=vertical]:flex-col",ResizableHandle:"relative flex w-px items-center justify-center bg-border after:absolute after:inset-y-0 after:left-1/2 after:w-1 after:-translate-x-1/2 focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring focus-visible:ring-offset-1 data-[panel-group-direction=vertical]:h-px data-[panel-group-direction=vertical]:w-full data-[panel-group-direction=vertical]:after:left-0 data-[panel-group-direction=vertical]:after:h-1 data-[panel-group-direction=vertical]:after:w-full data-[panel-group-direction=vertical]:after:-translate-y-1/2 data-[panel-group-direction=vertical]:after:translate-x-0 [&[data-panel-group-direction=vertical]>div]:rotate-90"},props:{direction:{schema:zod.z.enum(["horizontal","vertical"]),design:"knob",description:"required; sets the axis the user drags along"},autoSaveId:{schema:zod.z.string().optional(),design:"content",description:"persists user-adjusted sizes to localStorage under this id"},onLayout:{schema:zod.z.unknown().optional(),design:"event"},defaultSize:{schema:zod.z.number().optional(),design:"knob",description:"percent of group (0-100); siblings should sum to ~100"},minSize:{schema:zod.z.unknown().optional(),design:"plumbing",description:"percent bounds"},collapsible:{schema:zod.z.boolean().optional(),design:"knob",description:"allow this panel to collapse to zero"},collapsedSize:{schema:zod.z.unknown().optional(),design:"plumbing",description:"collapse behaviour controls"},withHandle:{schema:zod.z.boolean().optional(),design:"knob",description:"show a visible drag affordance (default just a hit-zone)"}}};var ts={name:"RivePlayer",description:"Rive runtime wrapped in the shared media surface. Reach for Rive when you need interactive state-machine animations driven by scroll/hover/input. For non-interactive looping video, use VideoPlayer; for shader-driven backgrounds, use ThreeScene.",import:"@gradeui/ui",aliases:["rive","riv","animation","animated","lottie"],composesWith:["MediaSurface (internal)","Card","any container"],styleDefaults:{RiveInner:"absolute inset-0 flex items-end justify-end p-2"},props:{src:{schema:zod.z.string(),design:"content",description:"URL or path to the .riv file"},stateMachines:{schema:zod.z.union([zod.z.string(),zod.z.array(zod.z.string())]).optional(),design:"knob",description:"state machine(s) to run"},artboard:{schema:zod.z.string().optional(),design:"content",description:"artboard name; omit to use default"},controls:{schema:zod.z.boolean().optional(),design:"knob",description:"viewer mode by default; set true for play/pause overlay",default:false},autoPlay:{schema:zod.z.boolean().optional(),design:"knob",description:"respects reduced-motion",default:true},loop:{schema:zod.z.boolean().optional(),design:"knob",default:true},pauseOffscreen:{schema:zod.z.boolean().optional(),design:"knob",default:true},fit:{schema:zod.z.enum(["contain","cover","fill","fitWidth","fitHeight","none"]).optional(),design:"knob",default:"contain"},stateMachineInputs:{schema:zod.z.unknown().optional(),design:"plumbing"},aspect:{schema:zod.z.enum(["video","square","portrait","wide","auto"]).optional(),design:"knob",default:"square"},radius:{schema:zod.z.enum(["none","sm","md","lg","xl"]).optional(),design:"knob",default:"lg"},poster:{schema:zod.z.string().optional(),design:"content",description:"image shown while the runtime loads"}}};var os={name:"Row",description:"Horizontal composition \u2014 button groups, inline form rows, logo + nav rows, anything on one line. Reach for Row instead of `flex items-center gap-*` so the alignment and spacing are editable through the settings panel. For two-pane layouts with an explicit ratio (sidebar + content, 1/3 + 2/3) use Split instead \u2014 Row evenly flows whatever children it holds.",import:"@gradeui/ui",aliases:["row","hstack","horizontal","inline","horizontal layout","hstack","h-stack","horizontal stack","lazyhstack"],composesWith:["Button","Input","NavItem","Stack (can wrap a Row)","any content component"],styleDefaults:{Row:"gds-row flex flex-row gap-4 items-center justify-start"},variantDefaults:{gap:"md",align:"center",justify:"start"},props:{gap:{schema:zod.z.enum(["none","xs","sm","md","lg","xl","2xl"]).optional(),design:"knob",description:"gap between children",default:"md"},align:{schema:zod.z.enum(["start","center","end","stretch","baseline"]).optional(),design:"knob",description:"cross-axis (vertical) alignment",default:"center"},justify:{schema:zod.z.enum(["start","center","end","between","around","evenly"]).optional(),design:"knob",description:"main-axis distribution",default:"start"},wrap:{schema:zod.z.boolean().optional(),design:"knob",description:"allow children to wrap onto additional lines when they overflow",default:false},asChild:{schema:zod.z.boolean().optional(),design:"plumbing",description:"render as the child element via Slot",default:false},className:{schema:zod.z.string().optional(),design:"plumbing"},children:{schema:zod.z.unknown(),design:"plumbing"}}};var rs={name:"ScreenAnimator",description:'Wrap ANY screen or section in a directed camera \u2014 a "live demo',import:"@gradeui/ui",aliases:["screen animator","camera","camera tour","director","demo","product demo","zoom pan","spotlight","ken burns","presenter"],composesWith:["AppShell","ThreeScene","Card","Grid","the whole component set (it wraps a screen)"],styleDefaults:{ScreenAnimator:"gds-screen-animator"},props:{shots:{schema:zod.z.unknown().optional(),design:"plumbing",description:"the tour. Each"}}};var as={name:"ScrollArea",description:"Bounded content that needs custom scroll chrome \u2014 sidebars with long item lists, chat transcripts, table panels inside a dashboard, anywhere the OS scrollbar would feel out of place against the design tokens. The wrapping element has to have a height constraint (`h-`, `max-h-`, or grid row sizing) or nothing scrolls \u2014 scroll-area can't infer a bound on its own. For body-level scrolling, leave the document to the browser.",import:"@gradeui/ui",aliases:["scroll area","scroll container","custom scrollbar","sidebar scroll","panel scroll","scroll view","scrollview","react native scrollview"],subcomponents:["ScrollBar"],composesWith:["Card (long card body)","AppShellNav (long sidebar)","Sheet (long modal body)","Table (sticky-header scrolling list)"],styleDefaults:{ScrollArea:"relative overflow-hidden",ScrollBar:"flex touch-none select-none transition-colors"},props:{type:{schema:zod.z.enum(["auto","always","scroll","hover"]).optional(),design:"knob",description:"when the scrollbar shows"},scrollHideDelay:{schema:zod.z.number().optional(),design:"knob",description:'ms before "scroll"/"hover" scrollbars fade'},dir:{schema:zod.z.enum(["ltr","rtl"]).optional(),design:"plumbing"},className:{schema:zod.z.string().optional(),design:"plumbing",description:"set a height/max-height here, otherwise nothing scrolls"},orientation:{schema:zod.z.enum(["vertical","horizontal"]).optional(),design:"knob",default:"vertical"}}};var ns={name:"SectionBlock",description:'The top-level container for a marketing page section \u2014 hero, feature row, pricing table, testimonial strip, FAQ section. Always reach for SectionBlock over a hand-rolled `<section>` so vertical rhythm, container width, and tonal background stay consistent across the page. Pair `background="gradient"` + `surface="glass"` inner Cards for the "modern marketing hero" pattern.',import:"@gradeui/ui",aliases:["section","section block","hero section","marketing section","page section","content section","container section","feature section","hero","page hero","marketing hero","glass section","gradient section","mesh hero"],composesWith:['Card (the most common child \u2014 especially with surface="glass")',"Grid (feature rows)","Stack (hero column)","MediaSurface (hero imagery)","Code (developer hero)","Carousel (logo strips)"],styleDefaults:{SectionBlock:"relative w-full py-16 md:py-24 bg-transparent"},variantDefaults:{padding:"lg",background:"transparent"},props:{padding:{schema:zod.z.enum(["none","sm","md","lg","xl"]).optional(),design:"knob",description:"vertical rhythm. Defaults to `lg`."},background:{schema:zod.z.enum(["transparent","muted","card","primary","gradient"]).optional(),design:"knob",description:"tonal direction of the section bg."},surface:{schema:zod.z.enum(["solid","translucent","glass","glass-strong"]).optional(),design:"knob",description:"what the section is *made of*. Orthogonal to `background`. Use `glass` for hero sections that float over a generative backdrop / image / dot grid."},container:{schema:zod.z.enum(["default","wide","narrow","full"]).optional(),design:"knob",description:"max-width of the inner content."},alignment:{schema:zod.z.enum(["left","center","right"]).optional(),design:"knob",description:"header / CTA alignment."},titleSize:{schema:zod.z.enum(["sm","md","lg","xl"]).optional(),design:"knob"},title:{schema:zod.z.string().optional(),design:"plumbing"},subtitle:{schema:zod.z.string().optional(),design:"content"},cta1:{schema:zod.z.unknown().optional(),design:"plumbing",description:"string or `{ text, variant, href, onClick }` config"},backgroundImage:{schema:zod.z.string().optional(),design:"content",description:"direct CSS background image url"},as:{schema:zod.z.enum(["section","div","article"]).optional(),design:"knob",description:"semantic root"},fullBleed:{schema:zod.z.boolean().optional(),design:"knob"}}};var is={name:"Select",description:'Single-choice from 3+ known options. Fewer than 3 \u2192 RadioGroup. Huge list with search \u2192 use a Combobox (not in DS yet). Multi-select \u2192 not supported by this primitive. In dense tool panels, set size="xs" on BOTH the trigger and the content so the closed control and open menu match.',import:"@gradeui/ui",aliases:["dropdown","combobox","picker","select","pop-up button","popup button","popup picker","picker view","rnpickerselect","react native picker","native picker"],subcomponents:["SelectTrigger","SelectValue","SelectContent","SelectItem","SelectGroup","SelectLabel","SelectSeparator"],composesWith:["Label (above SelectTrigger)","Form","Card"],styleDefaults:{SelectTrigger:"flex w-full items-center justify-between rounded-md border border-input bg-background ring-offset-background data-[placeholder]:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1 h-10 px-3 py-2 text-sm",SelectScrollUpButton:"flex cursor-default items-center justify-center py-1",SelectScrollDownButton:"flex cursor-default items-center justify-center py-1",SelectContent:"relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",SelectLabel:"py-1.5 pl-8 pr-2 text-sm font-semibold",SelectItem:"relative flex w-full cursor-default select-none items-center rounded-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 py-1.5 pl-8 pr-2 text-sm",SelectSeparator:"-mx-1 my-1 h-px bg-muted"},props:{value:{schema:zod.z.unknown().optional(),design:"plumbing",description:"Radix root"},size:{schema:zod.z.enum(["default","sm","xs"]).optional(),design:"knob",description:"control density; wraps the clickable control, nest SelectValue inside"},placeholder:{schema:zod.z.string().optional(),design:"content",description:"text when nothing is selected"}}};var ss={name:"Separator",description:"Light divider between sibling blocks in a Card, list, or header. For section-level partition use extra spacing instead.",import:"@gradeui/ui",aliases:["divider","rule","hr","line","horizontal rule"],composesWith:["Card (between CardHeader/Content/Footer)","navigation menus","any vertical stacks"],styleDefaults:{Separator:"shrink-0 bg-border"},props:{orientation:{schema:zod.z.enum(["horizontal","vertical"]).optional(),design:"knob",description:'default "horizontal"'},decorative:{schema:zod.z.boolean().optional(),design:"knob",description:"hide from a11y tree",default:true},className:{schema:zod.z.string().optional(),design:"plumbing"}}};var ls={name:"ShaderPresetPicker",description:"Runtime gallery of shader presets \u2014 click to select. Use with ThreeScene as a controlled input so the user can pick a background shader. For a single preview card, use ShaderPresetPreview directly.",import:"@gradeui/ui",aliases:["shader picker","preset picker","shader gallery","preset gallery"],composesWith:["ShaderPresetPreview (internal)","ThreeScene (the typical downstream consumer)"],styleDefaults:{ShaderPresetPicker:"grid grid-cols-2 gap-3"},props:{value:{schema:zod.z.string().optional(),design:"content",description:"currently selected preset id (controlled)"},onChange:{schema:zod.z.unknown().optional(),design:"event",description:"called when the user clicks a preset card"},filterTags:{schema:zod.z.string().optional(),design:"content",description:'only show presets matching at least one tag ("space" | "retro" | "motion" | "hero" | "background" \u2026)'},live:{schema:zod.z.enum(["never","hover","always"]).optional(),design:"knob",description:"thumbnail render mode",default:"hover"},postPreset:{schema:zod.z.string().optional(),design:"content",description:"shared post-FX preset applied to every thumbnail"},palette:{schema:zod.z.unknown().optional(),design:"plumbing",description:"shared palette applied to every thumbnail"},columns:{schema:zod.z.unknown().optional(),design:"plumbing",description:"grid columns at md+ breakpoint"}}};var ds={name:"ShaderPresetPreview",description:"Thumbnail-sized preview card for a shader preset. Defaults to a cheap static placeholder until hovered, at which point the live WebGL render kicks in. Use directly when you want a single preset card; use ShaderPresetPicker for a filterable grid.",import:"@gradeui/ui",aliases:["shader preview","preset preview","shader card"],composesWith:["ThreeScene (internal)","ShaderPresetPicker (wraps this)"],styleDefaults:{ShaderPresetPreview:"group cursor-pointer flex flex-col gap-2"},props:{preset:{schema:zod.z.string(),design:"content",description:"shader preset id from the registry"},live:{schema:zod.z.enum(["never","hover","always"]).optional(),design:"knob",description:"when to run the live WebGL render",default:"hover"},postPreset:{schema:zod.z.string().optional(),design:"content",description:"override the preset's default post-FX"},palette:{schema:zod.z.unknown().optional(),design:"plumbing",description:"palette overrides for the preview"},aspect:{schema:zod.z.enum(["video","square","portrait","wide"]).optional(),design:"knob",default:"video"},hideLabel:{schema:zod.z.boolean().optional(),design:"knob",description:"hide the label strip under the preview",default:false},onClick:{schema:zod.z.unknown().optional(),design:"event"}}};var cs={name:"Sheet",description:"A panel that slides in from a screen edge \u2014 mobile nav drawers, side panels for editing a single record without leaving the list, filter trays on small viewports, Studio-style inspector panels. For a centered focus modal use Dialog. For a transient announcement use Toast (Sonner). For inline reveals use Collapsible.",import:"@gradeui/ui",aliases:["sheet","drawer","side panel","slide-in","nav drawer","mobile drawer","slide-over","action sheet","modal sheet","bottom sheet","side sheet","react native modal sheet","bottom-sheet","ios action sheet","inspector panel","glass sheet","frosted drawer"],subcomponents:["SheetTrigger","SheetContent","SheetHeader","SheetTitle","SheetDescription","SheetFooter","SheetClose"],composesWith:["Form controls (an inline edit sheet)","Button (trigger + close)","AppShellNav (mobile-only swap)","Code (changelog drawers)","MediaSurface (image-detail sheets)"],styleDefaults:{SheetOverlay:"fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",SheetContent:"fixed z-50 gap-4 p-6 shadow-lg transition ease-in-out data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:duration-300 data-[state=open]:duration-500 inset-y-0 right-0 h-full w-3/4 border-l data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right sm:max-w-sm",SheetHeader:"flex flex-col space-y-2 text-center sm:text-left",SheetFooter:"flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",SheetTitle:"text-lg font-semibold text-foreground",SheetDescription:"text-sm text-muted-foreground"},props:{open:{schema:zod.z.unknown().optional(),design:"plumbing"},asChild:{schema:zod.z.boolean().optional(),design:"plumbing"},side:{schema:zod.z.enum(["top","right","bottom","left"]).optional(),design:"knob",default:"right"},surface:{schema:zod.z.enum(["solid","translucent","glass","glass-strong"]).optional(),design:"knob",description:"what the sheet panel is *made of*. `solid` is the default opaque `bg-background`. Reach for `glass` whenever the canvas behind the sheet (a layout in progress, a media gallery, a dashboard) should remain visible."},className:{schema:zod.z.string().optional(),design:"plumbing",description:"usually set a width (right/left) or height (top/bottom)"},SheetTitle:{schema:zod.z.unknown(),design:"plumbing"}}};var ps={name:"Sidebar",description:'Vertical app navigation. Drop inside `<AppShellNav placement="side">` for full-page layouts. Compound API \u2014 `<SidebarHeader>` for brand, `<SidebarContent>` for the scrollable body of `<SidebarSection>` + `<SidebarItem>` rows, `<SidebarFooter>` for user / settings chrome. For top nav reach for TopMenu; for command-palette style search reach for Command.',import:"@gradeui/ui",aliases:["sidebar","side menu","sidemenu","navigation sidebar","app sidebar","side nav","side nav rail","master pane","sidebarmenu","navigation rail","react native drawer"],subcomponents:["SidebarHeader","SidebarContent","SidebarFooter","SidebarSection","SidebarItem"],composesWith:["AppShell (inside AppShellNav)","Avatar (in Footer)","Tooltip (auto-wrapped on collapsed items)","Button (asChild for custom routing)"],styleDefaults:{Sidebar:"relative flex h-full flex-col bg-card text-card-foreground",SidebarHeader:"flex shrink-0 items-center border-b border-border",SidebarContent:"flex-1 overflow-y-auto overflow-x-hidden",SidebarFooter:"shrink-0 border-t border-border",SidebarSection:"px-[var(--gds-sidebar-section-px,0.5rem)] space-y-[var(--gds-sidebar-section-gap,0.125rem)]",SidebarItem:"group flex items-center gap-2.5 rounded-md transition-colors",SidebarTreeItem:"group flex w-full items-center gap-1.5 rounded-md py-1 text-sm font-medium transition-colors"},props:{collapsed:{schema:zod.z.boolean().optional(),design:"knob",description:"controlled collapsed state (wire onCollapsedChange when set)"},defaultCollapsed:{schema:zod.z.boolean().optional(),design:"knob",description:"uncontrolled initial value (default false)"},onCollapsedChange:{schema:zod.z.unknown().optional(),design:"event"},collapsible:{schema:zod.z.boolean().optional(),design:"knob",description:"show the affordance for the user to collapse (default true)"},variant:{schema:zod.z.enum(["rail","panel"]).optional(),design:"knob",description:'outer chrome treatment. `rail` (default) is the classic nav rail with a single right-border + tracked width via `--gds-sidebar-width`; drops cleanly into `<AppShellNav placement="side">`. `panel` is a card-style floating sidebar with full border + rounded corners + parent-controlled width; use when the sidebar is one of several adjacent panes in a body row (e.g. Projects | Canvas | Settings). The compound children (Header/Content/Footer/Section/Item) are identical in both treatments.'},any:{schema:zod.z.unknown(),design:"plumbing",description:"brand / logo / org switcher; hides nothing when collapsed (centred)"},title:{schema:zod.z.unknown().optional(),design:"plumbing",description:'group label; **uppercase tracking-wide muted** styling auto-applied (Notion / Linear / Slack-style "GAMES", "FAVORITES", "WORKSPACE" headers); hidden when sidebar is collapsed'},icon:{schema:zod.z.unknown().optional(),design:"plumbing",description:"optional icon beside the title"},trailing:{schema:zod.z.unknown().optional(),design:"plumbing",description:`**action(s) on the right edge of the header** \u2014 the canonical "+" / "..." slot (Notion's "+ Add page" next to Pages, Linear's "+" next to Favorites, Slack's "+" next to Channels). Pointer events isolated so a Button here doesn't toggle collapse.`},defaultExpanded:{schema:zod.z.boolean().optional(),design:"knob",description:"initial open state (default true)"},badge:{schema:zod.z.unknown().optional(),design:"plumbing",description:"trailing count / label (hidden when collapsed)"},active:{schema:zod.z.boolean().optional(),design:"knob",description:'current route; adds aria-current="page"'},href:{schema:zod.z.string().optional(),design:"content",description:"renders as <a>; for routing use `asChild` with your link component"},asChild:{schema:zod.z.boolean().optional(),design:"plumbing",description:"wrap a custom link (<Link href> from Next.js etc.) via Radix Slot"},asButton:{schema:zod.z.boolean().optional(),design:"knob",description:"render as <button> for action rows (open dialog, log out)"},disabled:{schema:zod.z.boolean().optional(),design:"knob"},collapsedLabel:{schema:zod.z.unknown().optional(),design:"plumbing",description:"tooltip override when sidebar is collapsed (defaults to children text)"},size:{schema:zod.z.enum(["sm","md"]).optional(),design:"knob",description:"row size. `md` (default) is the standard `text-sm font-medium` nav row; `sm` is `text-xs` + lighter weight + tighter padding for visually subordinate rows (nested screens under a project, sub-pages under a section). Active state still wins on color + weight so the current row pops at either size."},description:{schema:zod.z.unknown().optional(),design:"plumbing",description:"secondary line beneath the label (metadata like 'Edited 2m ago', '12 items', a brief description). Row layout adapts: label + description stacked vertically; icon vertically-centered against the stack; badge stays on trailing edge. Hidden when sidebar collapsed."}}};var ms={name:"Skeleton",description:'Loading placeholder for content whose shape you know. Set width/height via className to mimic the real content (e.g. "h-4 w-32"). Not a spinner \u2014 use it where the real thing will drop in.',import:"@gradeui/ui",aliases:["placeholder","shimmer","loader","loading state","redacted","redacted placeholder","shimmer placeholder","content placeholder","lottie placeholder"],composesWith:["Card","Avatar (inside a Skeleton for avatar loading)","any layout"],styleDefaults:{Skeleton:"animate-pulse rounded-md bg-muted"},props:{className:{schema:zod.z.string().optional(),design:"plumbing",description:"required in practice; supply width/height utilities"}}};var us={name:"Slider",description:'A continuous-ish numeric pick \u2014 volume, opacity, font size, price-range filters. Use a single-thumb slider for one value, two-thumb for a range. For a small set of discrete options (1-5 stars, sm/md/lg) prefer ToggleGroup. For free-text numeric entry use an Input type="number".',import:"@gradeui/ui",aliases:["slider","range slider","range input","volume","opacity slider","scrub","drag value","slider control","value slider","react native slider"],composesWith:["Label (mandatory above)","Row (label + current value display)","Card (settings rows)"],styleDefaults:{Slider:"relative flex w-full touch-none select-none items-center"},props:{value:{schema:zod.z.number().optional(),design:"knob",description:"controlled value; ALWAYS an array even for a single-thumb slider (`[50]`)"},defaultValue:{schema:zod.z.number().optional(),design:"knob",description:"uncontrolled initial; `[20, 80]` for a two-thumb range"},onValueChange:{schema:zod.z.unknown().optional(),design:"event"},min:{schema:zod.z.number().optional(),design:"knob"},max:{schema:zod.z.number().optional(),design:"knob"},step:{schema:zod.z.number().optional(),design:"knob"},disabled:{schema:zod.z.boolean().optional(),design:"knob"},orientation:{schema:zod.z.enum(["horizontal","vertical"]).optional(),design:"knob",default:"horizontal"},dir:{schema:zod.z.enum(["ltr","rtl"]).optional(),design:"plumbing"},inverted:{schema:zod.z.boolean().optional(),design:"knob",description:"flip the visual direction"},name:{schema:zod.z.string().optional(),design:"content",description:"form name when posting natively"}}};var gs={name:"Sortable",description:"Drag-to-reorder lists, kanban-column reordering, sortable shelves, tab strips the user can rearrange. Pairs with any layout primitive \u2014 Stack for vertical lists, Row for horizontal strips, Grid for 2D card walls. For cross-container drag (drag a card from one column to another) hand-roll DndContext at the page level \u2014 Sortable v1 covers single-list reorder; Sortable.Group for cross-container is a planned follow-up. Reach for raw `@dnd-kit/core` if you need custom collision detection, drag overlays with arbitrary chrome, or non-list use cases (kanban swimlanes, draggable canvas nodes).",import:"@gradeui/ui",aliases:["sortable","reorder","drag and drop","dnd","draggable list","sortable list","kanban","drag to reorder","drag-drop","dragdroplist","drag handle","react native draggable flatlist"],subcomponents:["Sortable.Item","Sortable.Handle"],composesWith:["Stack (vertical lists)","Row (horizontal strips)","Grid (2D card walls)","Card (typical item content)","Button (as Sortable.Handle asChild)"],styleDefaults:{SortableHandle:"cursor-grab touch-none select-none"},props:{values:{schema:zod.z.unknown(),design:"plumbing",description:"ordered list of unique ids; the source of truth for the order"},onReorder:{schema:zod.z.unknown().optional(),design:"event",description:"fires with the new order after a drag that changed it"},strategy:{schema:zod.z.enum(["vertical","horizontal","grid"]).optional(),design:"knob",description:"match the layout your items render in",default:"vertical"},disabled:{schema:zod.z.boolean().optional(),design:"knob",description:"disable drag on every item"},Sortable:{schema:zod.z.unknown(),design:"plumbing",description:"must match one entry in the parent `values` array (identity, not React key)"}}};var fs={name:"Stack",description:"Default top-level layout inside the main slot when composing two or more stacked regions (hero + content + footer, auth card + subtext, etc.). Prefer Stack over hand-rolled `flex flex-col gap-*` so the vertical rhythm is editable through the settings panel.",import:"@gradeui/ui",aliases:["stack","vstack","vertical","column","vertical layout","v-stack","vertical stack","lazyvstack"],composesWith:["Section","Row","Split","Hero","any content component"],props:{gap:{schema:zod.z.enum(["none","xs","sm","md","lg","xl","2xl"]).optional(),design:"knob",description:"vertical gap between children",default:"md"},align:{schema:zod.z.enum(["start","center","end","stretch"]).optional(),design:"knob",description:"cross-axis (horizontal) alignment of children",default:"stretch"},justify:{schema:zod.z.enum(["start","center","end","between","around","evenly"]).optional(),design:"knob",description:'main-axis (vertical) distribution. Reach for this on absolute-positioned overlays (`justify="end"` pins children to the bottom) and split footers (`justify="between"`).',default:"start"},asChild:{schema:zod.z.boolean().optional(),design:"plumbing",description:"render as the child element via Slot, so `<Stack asChild><section>\u2026</section></Stack>` stamps Stack's classes onto the `<section>` rather than nesting a wrapper div",default:false},className:{schema:zod.z.string().optional(),design:"plumbing"},children:{schema:zod.z.unknown(),design:"plumbing"}}};var hs={name:"Switch",description:'Instant on/off setting ("Enable notifications", "Dark mode"). Commits on toggle \u2014 no submit button needed. For selecting-from-a-list use Checkbox. For a settings row (label + description on the left, Switch on the right) use Field layout="setting". For a prominent on/off presented as a whole selectable card, use SwitchCard.',import:"@gradeui/ui",aliases:["toggle","switch","on/off switch","ios toggle","toggle switch","switch control","react native switch"],composesWith:["Label (via htmlFor)",'Field (layout="setting" settings row)',"SwitchCard (whole-card toggle)","Card (settings rows)"],styleDefaults:{Switch:"peer inline-flex shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=unchecked]:bg-input h-6 w-11"},variantDefaults:{size:"default"},props:{checked:{schema:zod.z.boolean().optional(),design:"knob"},onCheckedChange:{schema:zod.z.unknown().optional(),design:"event"},defaultChecked:{schema:zod.z.boolean().optional(),design:"knob"},disabled:{schema:zod.z.boolean().optional(),design:"knob"},id:{schema:zod.z.string().optional(),design:"plumbing"}}};var bs={name:"SwitchCard",description:'A prominent on/off setting presented as a whole selectable card. The whole card is the switch, so the toggled state lives on the card surface. Standalone. For a row of compact settings (label left, small Switch right) use Field layout="setting" instead \u2014 SwitchCard is for the heavier, card-sized toggle.',import:"@gradeui/ui",aliases:["switch card","toggle card","setting card","feature toggle card"],composesWith:["Badge (in aside)","Stack (stacking several)"],props:{checked:{schema:zod.z.unknown().optional(),design:"plumbing",description:"standard switch state"},label:{schema:zod.z.unknown().optional(),design:"plumbing",description:"title line"},description:{schema:zod.z.unknown().optional(),design:"plumbing",description:"secondary line"},aside:{schema:zod.z.unknown().optional(),design:"plumbing",description:"slot before the indicator (a Badge, price, hint)"},hideIndicator:{schema:zod.z.boolean().optional(),design:"knob",description:"hide the switch glyph; state shown by the card border + background"},indicatorPosition:{schema:zod.z.enum(["leading","trailing"]).optional(),design:"knob",description:"default trailing"},children:{schema:zod.z.unknown().optional(),design:"plumbing",description:"arbitrary static content instead of label/description"}}};var ys={name:"Table",description:"Structured tabular data \u2014 rows \xD7 columns with alignment requirements. NOT a layout grid \u2014 for that use div+Tailwind grid utilities. Keep to <100 rows; larger datasets need virtualisation (not in DS).",import:"@gradeui/ui",aliases:["table","table view","data table","datatable","grid view","data grid","rows and columns"],subcomponents:["TableHeader","TableBody","TableFooter","TableRow","TableHead","TableCell","TableCaption"],composesWith:["Card (wrap the table)","Badge (inside TableCell for status)","Checkbox (row selection)","Button (row actions)"],styleDefaults:{Table:"w-full caption-bottom text-sm",TableHeader:"[&_tr]:border-b",TableBody:"[&_tr:last-child]:border-0",TableFooter:"border-t bg-muted/50 font-medium [&>tr]:last:border-b-0",TableRow:"border-b transition-colors hover:bg-muted/50 data-[state=selected]:bg-muted",TableHead:"h-10 px-2 text-left align-middle font-medium text-muted-foreground [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",TableCell:"p-2 align-middle [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",TableCaption:"mt-4 text-sm text-muted-foreground"},props:{Each:{schema:zod.z.unknown(),design:"plumbing"},No:{schema:zod.z.unknown(),design:"plumbing",description:"styling follows the active theme tokens"}}};var xs={name:"Tabs",description:'A small set of peer views within one surface (2\u20135 tabs). For primary nav use Side Menu/routing. For filters use a filter control, not tabs. Pick `variant="pill"` for app chrome (settings panels, in-card tab strips). Pick `variant="underlined"` for marketing/docs pages and browser-tab-style treatments.',import:"@gradeui/ui",aliases:["tabs","tab strip","tab bar","tab view","tabbed interface","pageviewcontroller","react native tab view","underlined tabs","page tabs","segment switcher","simple tabs"],subcomponents:["TabsList","TabsTrigger","TabsContent"],composesWith:["Card (tabs inside a card body)","Dialog","TooltipProvider (required for tooltip prop)"],styleDefaults:{TabsList:"inline-flex items-center text-muted-foreground justify-center rounded-lg bg-muted",TabsContent:"mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2"},props:{defaultValue:{schema:zod.z.unknown().optional(),design:"plumbing"},size:{schema:zod.z.enum(["sm","md","lg, default md"]).optional(),design:"knob",description:"t-shirt scale aligned with Button/ToggleGroup heights; cascades to every TabsTrigger via context so set it once on the list"},variant:{schema:zod.z.enum(["pill","underlined, default pill"]).optional(),design:"knob",description:"`pill` is the shadcn chip-on-muted look; `underlined` is the minimal text + bottom-border treatment (formerly the separate SimpleTabs component, collapsed into Tabs in May 2026). Cascades to triggers."},value:{schema:zod.z.string(),design:"content",description:"matches a TabsContent value; tooltip?: string \u2014 when set, wraps the trigger in the design-system Tooltip and auto-applies aria-label (useful for icon-only triggers); requires a TooltipProvider somewhere above the tabs"}}};var ws={name:"Textarea",description:'Multi-line text entry (descriptions, messages, comments). Pair with a Label. Single-line input \u2192 use Input instead. Use size="sm"/"xs" in dense tool panels.',import:"@gradeui/ui",aliases:["text area","multiline","comment box","message field","text editor","multi-line text","multiline input","multiline text field","comments box","multiline textinput"],composesWith:["Label","Form","Card (in CardContent)"],styleDefaults:{Textarea:"flex w-full rounded-md border border-input bg-background ring-offset-background placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 min-h-[80px] px-3 py-2 text-sm"},variantDefaults:{size:"default"},props:{size:{schema:zod.z.enum(["default","sm","xs"]).optional(),design:"knob",description:"control density, mirrors Input. default = min-h-80 / text-sm; sm and xs shrink the min-height + padding for dense panels."}}};var Rs={name:"ThreeScene",description:"WebGL primitive for shader backgrounds, generative visuals, and bespoke three.js scenes. Three authoring paths, in order of preference \u2014 (1) pick a `preset` id; (2) if nothing in the registry fits, write a `fragmentShader` against the fixed uniform contract; (3) only as a last resort, pass a full `createScene` factory. For looping video, use VideoPlayer; for interactive animations, use RivePlayer.",import:"@gradeui/ui",aliases:["three","threejs","webgl","shader","scene","3d","generative","hero background","fragment shader","glsl"],composesWith:["MediaSurface (internal)","foreground content stacked above with `position: absolute/relative z-10`"],styleDefaults:{ThreeScene:"absolute inset-0 flex items-end justify-end p-2"},props:{preset:{schema:zod.z.enum(["mesh","waves","space","plasma","voronoi","synthwave"]).optional(),design:"knob",description:"shader preset id from the registry"},fragmentShader:{schema:zod.z.string().optional(),design:"content",description:"user-authored GLSL body; takes precedence over preset"},onShaderError:{schema:zod.z.unknown().optional(),design:"event",description:'fires on compile failure; scene falls back to `preset="space"`'},postPreset:{schema:zod.z.enum(["none","vhs","cinematic","synthwave","crt"]).optional(),design:"knob",description:"post-processing pass",default:"vhs"},palette:{schema:zod.z.unknown().optional(),design:"plumbing",description:"any CSS-legal colour string per slot. Re-tints automatically when the theme changes. Unset slots fall back to defaults."},createScene:{schema:zod.z.unknown().optional(),design:"plumbing",description:"custom full scene factory; takes precedence over preset AND fragmentShader"},controls:{schema:zod.z.boolean().optional(),design:"knob",description:"play/pause overlay",default:false},autoPlay:{schema:zod.z.boolean().optional(),design:"knob",description:"respects reduced-motion",default:true},pauseOffscreen:{schema:zod.z.boolean().optional(),design:"knob",description:"big win for WebGL battery life",default:true},aspect:{schema:zod.z.enum(["video","square","portrait","wide","auto"]).optional(),design:"knob",default:"video"},maxDpr:{schema:zod.z.number().optional(),design:"knob",description:"lower for thumbnails / low-end devices"},radius:{schema:zod.z.enum(["none","sm","md","lg","xl"]).optional(),design:"knob",default:"lg"}}};var Ss={name:"Toast",description:'Transient, non-blocking feedback that confirms or warns about an action \u2014 "Saved", "Failed to upload", "Copied to clipboard", "Invitation sent". For permanent inline messages reach for Callout. For confirmations that block until acknowledged use Dialog. Mount <Toaster /> ONCE at the root of the app; everywhere else, call the `toast` helper.',import:"@gradeui/ui",aliases:["toast","toaster","sonner","notification","snackbar","alert toast","transient alert","transient banner","banner notification","toastandroid"],composesWith:["App root layout (single <Toaster /> mount)","Form submit handlers (success/error toasts)","Async actions"],props:{position:{schema:zod.z.enum(["top-left","top-center","top-right","bottom-left","bottom-center","bottom-right"]).optional(),design:"knob",default:"bottom-right"},theme:{schema:zod.z.enum(["light","dark","system"]).optional(),design:"knob"},richColors:{schema:zod.z.boolean().optional(),design:"knob",description:"colored variants for success/error/warning/info"},expand:{schema:zod.z.boolean().optional(),design:"knob",description:"keep multiple toasts visually separated rather than stacked"},visibleToasts:{schema:zod.z.number().optional(),design:"knob",description:"max concurrent toasts on screen (default 3)"},duration:{schema:zod.z.number().optional(),design:"knob",description:"default ms before auto-dismiss"}}};var ks={name:"Toggle",description:`A standalone on/off button \u2014 Bold/Italic in a toolbar, "Show grid" in a header, single binary toggle that doesn't belong inside a Switch row. For two-or-more mutually-exclusive options use ToggleGroup. For a labeled settings switch ("Active: on/off") use Switch.`,import:"@gradeui/ui",aliases:["toggle","toggle button","press button","bold button","italic button"],composesWith:["Tooltip (wrap an icon-only Toggle)","Row","TabsList (sibling)"],styleDefaults:{Toggle:"inline-flex items-center justify-center gap-2 rounded-md text-sm font-medium transition-colors hover:bg-muted hover:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 data-[state=on]:bg-accent data-[state=on]:text-accent-foreground [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0 bg-transparent h-9 px-2 min-w-9"},variantDefaults:{variant:"default",size:"default"},props:{variant:{schema:zod.z.enum(["default","outline"]).optional(),design:"knob",description:"outline adds a border, default is borderless and ghost-like"},size:{schema:zod.z.enum(["default","sm","lg"]).optional(),design:"knob"},pressed:{schema:zod.z.boolean().optional(),design:"knob",description:"controlled pressed state"},defaultPressed:{schema:zod.z.boolean().optional(),design:"knob",description:"uncontrolled initial state"},onPressedChange:{schema:zod.z.unknown().optional(),design:"event"},disabled:{schema:zod.z.boolean().optional(),design:"knob"},children:{schema:zod.z.unknown(),design:"plumbing",description:"usually an icon or short label"}}};var Cs={name:"ToggleGroup",description:'A small set of mutually-exclusive (`type="single"`) or independent (`type="multiple"`) binary options that live side-by-side as a segmented control \u2014 viewport size picker (Mobile/Tablet/Desktop), text alignment, view density. Reads identically to a TabsList of the same size; reach for ToggleGroup when each option emits a value (like a form input) rather than swapping panels. Use Tabs for panel switching, Toggle for a single on/off.',import:"@gradeui/ui",aliases:["toggle group","segmented control","segmented buttons","button group","pill group","view selector","segmented picker","segmentedcontrolios","segmented buttons group","rn segmented control"],subcomponents:["ToggleGroupItem"],composesWith:["Card (header controls)","Row","AppShellHeader chrome","settings panels"],styleDefaults:{ToggleGroup:"inline-flex items-center justify-center rounded-lg bg-muted text-muted-foreground h-8 p-0.5",ToggleGroupItem:"inline-flex items-center justify-center whitespace-nowrap rounded-md font-medium ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 data-[state=on]:bg-background data-[state=on]:text-foreground h-7 px-2 text-xs gap-1.5 [&_svg]:size-3.5"},variantDefaults:{size:"md"},props:{type:{schema:zod.z.enum(["single","multiple"]),design:"knob",description:"single picks one, multiple picks any number"},value:{schema:zod.z.union([zod.z.string(),zod.z.array(zod.z.string())]).optional(),design:"knob",description:"controlled; matches `type` (string for single, string[] for multiple)"},defaultValue:{schema:zod.z.union([zod.z.string(),zod.z.array(zod.z.string())]).optional(),design:"knob",description:"uncontrolled initial"},onValueChange:{schema:zod.z.unknown().optional(),design:"event"},size:{schema:zod.z.enum(["sm","md","lg, default md"]).optional(),design:"knob",description:"cascades to every ToggleGroupItem via context, matches Tabs/Button heights"},variant:{schema:zod.z.enum(["default","outline"]).optional(),design:"knob"},tooltip:{schema:zod.z.unknown().optional(),design:"plumbing",description:"when set, wraps the item in a Tooltip; required for icon-only items where the visible chrome doesn't carry a label"},tooltipSide:{schema:zod.z.enum(["top","right","bottom",'left", default "top']).optional(),design:"knob",description:"side the tooltip renders on"},tooltipDelay:{schema:zod.z.number().optional(),design:"knob",description:"per-item delay override; falls back to the upstream TooltipProvider's delayDuration"}}};var Ts={name:"Toolbar",description:`ANY three-region chrome bar \u2014 the leading/center/trailing pattern Apple HIG
79
+ (users to @-mention, email recipients, search-as-you-type API results).`,import:"@gradeui/ui",composesWith:["Popover","Command","Badge","Checkbox-style row indicator","Separator"],styleDefaults:{MultiSelect:"mr-2 flex h-4 w-4 shrink-0 items-center justify-center rounded-sm border border-primary"},props:{options:{schema:zod.z.unknown(),design:"plumbing"},value:{schema:zod.z.string().optional(),design:"content",description:"controlled selection"},defaultValue:{schema:zod.z.string().optional(),design:"content",description:"uncontrolled initial selection"},onValueChange:{schema:zod.z.unknown().optional(),design:"event"},placeholder:{schema:zod.z.string().optional(),design:"content",default:"Select\u2026"},searchPlaceholder:{schema:zod.z.string().optional(),design:"content",default:"Search\u2026"},emptyMessage:{schema:zod.z.string().optional(),design:"content",default:"Nothing matches."},maxCount:{schema:zod.z.number().optional(),design:"knob",description:'badges shown on the trigger before collapsing to "+N more"'},searchable:{schema:zod.z.boolean().optional(),design:"knob",description:"hide for short option lists",default:true},badgeDismissible:{schema:zod.z.boolean().optional(),design:"knob",description:"show \xD7 on each selected badge",default:true},disabled:{schema:zod.z.boolean().optional(),design:"knob"},modalPopover:{schema:zod.z.boolean().optional(),design:"knob",description:"Popover modal mode",default:false},className:{schema:zod.z.string().optional(),design:"plumbing"}}};var ls={name:"Popover",description:'A floating panel anchored to a trigger that contains interactive content \u2014 date pickers, color pickers, filter pickers, "more info" panels, inline forms. Differs from Tooltip (hover-only, no focusable content) and Dialog (modal, blocks the page). DatePicker, DateRangePicker, and the Combobox pattern all compose Popover internally.',import:"@gradeui/ui",aliases:["popover","dropdown panel","floating panel","inline editor","attached panel","filter pop","popover view","popoverpresentation","attached popover","glass popover","frosted popover","inspector popover"],subcomponents:["PopoverTrigger","PopoverContent","PopoverAnchor"],composesWith:["Button (as trigger)","Calendar (date picker)","Command (combobox)","Form controls (inline edit popover)","Code (code-detail popovers)"],styleDefaults:{PopoverContent:"z-50 w-72 rounded-md border p-4 text-popover-foreground shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 origin-[--radix-popover-content-transform-origin]"},props:{open:{schema:zod.z.unknown().optional(),design:"plumbing"},asChild:{schema:zod.z.boolean().optional(),design:"plumbing",description:"usually a Button"},side:{schema:zod.z.enum(["top","right","bottom","left","start","center","end"]).optional(),design:"knob"},surface:{schema:zod.z.enum(["solid","translucent","glass","glass-strong"]).optional(),design:"knob",description:"what the popover surface is *made of*. `solid` is the default opaque `bg-popover`. `translucent` is the Apple HIG menu-sheet feel. `glass` for floating panels over rich canvases (Studio inspector, image-tool palette)."}}};var ds={name:"Progress",description:"Determinate progress \u2014 file uploads, multi-step forms, quota meters. Indeterminate state \u2192 use Skeleton or animated Loader icon.",import:"@gradeui/ui",aliases:["progress","progress view","progress indicator","progress bar","determinate progress","loading bar","completion bar"],composesWith:["Card (as a section)","Badge (showing % next to it)","Label (describing what's loading)"],styleDefaults:{Progress:"relative h-4 w-full overflow-hidden rounded-full bg-secondary"},props:{value:{schema:zod.z.number().optional(),design:"knob",description:"percent complete"},max:{schema:zod.z.number().optional(),design:"knob"},className:{schema:zod.z.string().optional(),design:"plumbing"}}};var cs={name:"RadioCard",description:"Single-select where each option is a whole selectable card (shipping options, plan picker, onboarding choices). The whole card is the control, so focus and the checked state live on the card surface and the entire card is clickable. MUST sit inside a RadioGroup (keeps roving focus + single-select). Static content only \u2014 never nest an interactive control (Slider/Input/Button/link) inside. For a plain radio + label row use Field instead.",import:"@gradeui/ui",aliases:["radio card","selectable card","option card","plan picker","choice card","pricing tier","segmented choice card"],composesWith:["RadioGroup (required parent)","Badge (in aside)","MediaSurface (custom children)"],props:{value:{schema:zod.z.string(),design:"content",description:"the radio value"},label:{schema:zod.z.unknown().optional(),design:"plumbing",description:"title line"},description:{schema:zod.z.unknown().optional(),design:"plumbing",description:"secondary line"},aside:{schema:zod.z.unknown().optional(),design:"plumbing",description:"slot before the indicator (a Badge, price, hint)"},hideIndicator:{schema:zod.z.boolean().optional(),design:"knob",description:"hide the dot; selection shown by the card border + background"},indicatorPosition:{schema:zod.z.enum(["leading","trailing"]).optional(),design:"knob",description:"default trailing"},children:{schema:zod.z.unknown().optional(),design:"plumbing",description:"arbitrary static content (image, custom layout) instead of label/description"}}};var ps={name:"RadioGroup",description:"A small set of mutually-exclusive options where the user needs to SEE all of them at once \u2014 pricing tiers (3-4 options), shipping speed, payment method radio cards. When each option should be a whole clickable card (label + description, selected state on the card), use RadioCard inside the RadioGroup instead of a Card with a radio in the corner. For a plain label + description row, wrap RadioGroupItem in Field. For 5+ options use Select. For a segmented control as part of a toolbar use ToggleGroup. For yes/no use Switch.",import:"@gradeui/ui",aliases:["radio group","radio buttons","single-choice","pricing options","payment method","radio buttons","radio control","single-select"],subcomponents:["RadioGroupItem"],composesWith:["Label (paired with each item via htmlFor)","Field (label + description row)","RadioCard (whole-card selectable option)","Stack (vertical list)"],styleDefaults:{RadioGroup:"grid gap-2",RadioGroupItem:"aspect-square h-4 w-4 rounded-full border border-primary text-primary ring-offset-background focus:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50"},props:{value:{schema:zod.z.string().optional(),design:"content",description:"controlled selection"},defaultValue:{schema:zod.z.string().optional(),design:"content",description:"uncontrolled initial"},onValueChange:{schema:zod.z.unknown().optional(),design:"event"},disabled:{schema:zod.z.boolean().optional(),design:"knob"},orientation:{schema:zod.z.enum(["horizontal","vertical"]).optional(),design:"knob",default:"vertical"},name:{schema:zod.z.string().optional(),design:"content",description:"form name when posting natively"},id:{schema:zod.z.string().optional(),design:"plumbing",description:"pair with a <Label htmlFor> for click-on-label"}}};var us={name:"Resizable",description:`A multi-pane layout where the user wants to drag the divider \u2014 Slack/Mail-style list+detail, IDE editor+terminal, side-by-side compare view. Static layouts shouldn't use this \u2014 reach for AppShell with nav="three-pane" (fixed widths) or Grid (responsive ladder). Built on react-resizable-panels under the hood.`,import:"@gradeui/ui",aliases:["resizable","splitter","split pane","drag divider","adjustable panels","resizer","split view","draggable divider","split pane resizer","ns split view"],subcomponents:["ResizablePanelGroup","ResizablePanel","ResizableHandle"],composesWith:["AppShellMain (host the splitter inside main)","ScrollArea (each panel's content)","Card"],styleDefaults:{ResizablePanelGroup:"flex h-full w-full data-[panel-group-direction=vertical]:flex-col",ResizableHandle:"relative flex w-px items-center justify-center bg-border after:absolute after:inset-y-0 after:left-1/2 after:w-1 after:-translate-x-1/2 focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring focus-visible:ring-offset-1 data-[panel-group-direction=vertical]:h-px data-[panel-group-direction=vertical]:w-full data-[panel-group-direction=vertical]:after:left-0 data-[panel-group-direction=vertical]:after:h-1 data-[panel-group-direction=vertical]:after:w-full data-[panel-group-direction=vertical]:after:-translate-y-1/2 data-[panel-group-direction=vertical]:after:translate-x-0 [&[data-panel-group-direction=vertical]>div]:rotate-90"},props:{direction:{schema:zod.z.enum(["horizontal","vertical"]),design:"knob",description:"required; sets the axis the user drags along"},autoSaveId:{schema:zod.z.string().optional(),design:"content",description:"persists user-adjusted sizes to localStorage under this id"},onLayout:{schema:zod.z.unknown().optional(),design:"event"},defaultSize:{schema:zod.z.number().optional(),design:"knob",description:"percent of group (0-100); siblings should sum to ~100"},minSize:{schema:zod.z.unknown().optional(),design:"plumbing",description:"percent bounds"},collapsible:{schema:zod.z.boolean().optional(),design:"knob",description:"allow this panel to collapse to zero"},collapsedSize:{schema:zod.z.unknown().optional(),design:"plumbing",description:"collapse behaviour controls"},withHandle:{schema:zod.z.boolean().optional(),design:"knob",description:"show a visible drag affordance (default just a hit-zone)"}}};var ms={name:"RivePlayer",description:"Rive runtime wrapped in the shared media surface. Reach for Rive when you need interactive state-machine animations driven by scroll/hover/input. For non-interactive looping video, use VideoPlayer; for shader-driven backgrounds, use ThreeScene.",import:"@gradeui/ui",aliases:["rive","riv","animation","animated","lottie"],composesWith:["MediaSurface (internal)","Card","any container"],styleDefaults:{RiveInner:"absolute inset-0 flex items-end justify-end p-2"},props:{src:{schema:zod.z.string(),design:"content",description:"URL or path to the .riv file"},stateMachines:{schema:zod.z.union([zod.z.string(),zod.z.array(zod.z.string())]).optional(),design:"knob",description:"state machine(s) to run"},artboard:{schema:zod.z.string().optional(),design:"content",description:"artboard name; omit to use default"},controls:{schema:zod.z.boolean().optional(),design:"knob",description:"viewer mode by default; set true for play/pause overlay",default:false},autoPlay:{schema:zod.z.boolean().optional(),design:"knob",description:"respects reduced-motion",default:true},loop:{schema:zod.z.boolean().optional(),design:"knob",default:true},pauseOffscreen:{schema:zod.z.boolean().optional(),design:"knob",default:true},fit:{schema:zod.z.enum(["contain","cover","fill","fitWidth","fitHeight","none"]).optional(),design:"knob",default:"contain"},stateMachineInputs:{schema:zod.z.unknown().optional(),design:"plumbing"},aspect:{schema:zod.z.enum(["video","square","portrait","wide","auto"]).optional(),design:"knob",default:"square"},radius:{schema:zod.z.enum(["none","sm","md","lg","xl"]).optional(),design:"knob",default:"lg"},poster:{schema:zod.z.string().optional(),design:"content",description:"image shown while the runtime loads"}}};var gs={name:"Row",description:"Horizontal composition \u2014 button groups, inline form rows, logo + nav rows, anything on one line. Reach for Row instead of `flex items-center gap-*` so the alignment and spacing are editable through the settings panel. For two-pane layouts with an explicit ratio (sidebar + content, 1/3 + 2/3) use Split instead \u2014 Row evenly flows whatever children it holds.",import:"@gradeui/ui",aliases:["row","hstack","horizontal","inline","horizontal layout","hstack","h-stack","horizontal stack","lazyhstack"],composesWith:["Button","Input","NavItem","Stack (can wrap a Row)","any content component"],styleDefaults:{Row:"gds-row flex flex-row gap-4 items-center justify-start"},variantDefaults:{gap:"md",align:"center",justify:"start"},props:{gap:{schema:zod.z.enum(["none","xs","sm","md","lg","xl","2xl"]).optional(),design:"knob",description:"gap between children",default:"md"},align:{schema:zod.z.enum(["start","center","end","stretch","baseline"]).optional(),design:"knob",description:"cross-axis (vertical) alignment",default:"center"},justify:{schema:zod.z.enum(["start","center","end","between","around","evenly"]).optional(),design:"knob",description:"main-axis distribution",default:"start"},wrap:{schema:zod.z.boolean().optional(),design:"knob",description:"allow children to wrap onto additional lines when they overflow",default:false},asChild:{schema:zod.z.boolean().optional(),design:"plumbing",description:"render as the child element via Slot",default:false},className:{schema:zod.z.string().optional(),design:"plumbing"},children:{schema:zod.z.unknown(),design:"plumbing"}}};var fs={name:"ScreenAnimator",description:'Wrap ANY screen or section in a directed camera \u2014 a "live demo',import:"@gradeui/ui",aliases:["screen animator","camera","camera tour","director","demo","product demo","zoom pan","spotlight","ken burns","presenter"],composesWith:["AppShell","ThreeScene","Card","Grid","the whole component set (it wraps a screen)"],styleDefaults:{ScreenAnimator:"gds-screen-animator"},props:{shots:{schema:zod.z.unknown().optional(),design:"plumbing",description:"the tour. Each"}}};var hs={name:"ScrollArea",description:"Bounded content that needs custom scroll chrome \u2014 sidebars with long item lists, chat transcripts, table panels inside a dashboard, anywhere the OS scrollbar would feel out of place against the design tokens. The wrapping element has to have a height constraint (`h-`, `max-h-`, or grid row sizing) or nothing scrolls \u2014 scroll-area can't infer a bound on its own. For body-level scrolling, leave the document to the browser.",import:"@gradeui/ui",aliases:["scroll area","scroll container","custom scrollbar","sidebar scroll","panel scroll","scroll view","scrollview","react native scrollview"],subcomponents:["ScrollBar"],composesWith:["Card (long card body)","AppShellNav (long sidebar)","Sheet (long modal body)","Table (sticky-header scrolling list)"],styleDefaults:{ScrollArea:"relative overflow-hidden",ScrollBar:"flex touch-none select-none transition-colors"},props:{type:{schema:zod.z.enum(["auto","always","scroll","hover"]).optional(),design:"knob",description:"when the scrollbar shows"},scrollHideDelay:{schema:zod.z.number().optional(),design:"knob",description:'ms before "scroll"/"hover" scrollbars fade'},dir:{schema:zod.z.enum(["ltr","rtl"]).optional(),design:"plumbing"},className:{schema:zod.z.string().optional(),design:"plumbing",description:"set a height/max-height here, otherwise nothing scrolls"},orientation:{schema:zod.z.enum(["vertical","horizontal"]).optional(),design:"knob",default:"vertical"}}};var bs={name:"SectionBlock",description:'The top-level container for a marketing page section \u2014 hero, feature row, pricing table, testimonial strip, FAQ section. Always reach for SectionBlock over a hand-rolled `<section>` so vertical rhythm, container width, and tonal background stay consistent across the page. Pair `background="gradient"` + `surface="glass"` inner Cards for the "modern marketing hero" pattern.',import:"@gradeui/ui",aliases:["section","section block","hero section","marketing section","page section","content section","container section","feature section","hero","page hero","marketing hero","glass section","gradient section","mesh hero"],composesWith:['Card (the most common child \u2014 especially with surface="glass")',"Grid (feature rows)","Stack (hero column)","MediaSurface (hero imagery)","Code (developer hero)","Carousel (logo strips)"],styleDefaults:{SectionBlock:"relative w-full py-16 md:py-24 bg-transparent"},variantDefaults:{padding:"lg",background:"transparent"},props:{padding:{schema:zod.z.enum(["none","sm","md","lg","xl"]).optional(),design:"knob",description:"vertical rhythm. Defaults to `lg`."},background:{schema:zod.z.enum(["transparent","muted","card","primary","gradient"]).optional(),design:"knob",description:"tonal direction of the section bg."},surface:{schema:zod.z.enum(["solid","translucent","glass","glass-strong"]).optional(),design:"knob",description:"what the section is *made of*. Orthogonal to `background`. Use `glass` for hero sections that float over a generative backdrop / image / dot grid."},container:{schema:zod.z.enum(["default","wide","narrow","full"]).optional(),design:"knob",description:"max-width of the inner content."},alignment:{schema:zod.z.enum(["left","center","right"]).optional(),design:"knob",description:"header / CTA alignment."},titleSize:{schema:zod.z.enum(["sm","md","lg","xl"]).optional(),design:"knob"},title:{schema:zod.z.string().optional(),design:"plumbing"},subtitle:{schema:zod.z.string().optional(),design:"content"},cta1:{schema:zod.z.unknown().optional(),design:"plumbing",description:"string or `{ text, variant, href, onClick }` config"},backgroundImage:{schema:zod.z.string().optional(),design:"content",description:"direct CSS background image url"},as:{schema:zod.z.enum(["section","div","article"]).optional(),design:"knob",description:"semantic root"},fullBleed:{schema:zod.z.boolean().optional(),design:"knob"}}};var vs={name:"Select",description:'Single-choice from 3+ known options. Fewer than 3 \u2192 RadioGroup. Huge list with search \u2192 use a Combobox (not in DS yet). Multi-select \u2192 not supported by this primitive. In dense tool panels, set size="xs" on BOTH the trigger and the content so the closed control and open menu match.',import:"@gradeui/ui",aliases:["dropdown","combobox","picker","select","pop-up button","popup button","popup picker","picker view","rnpickerselect","react native picker","native picker"],subcomponents:["SelectTrigger","SelectValue","SelectContent","SelectItem","SelectGroup","SelectLabel","SelectSeparator"],composesWith:["Label (above SelectTrigger)","Form","Card"],styleDefaults:{SelectTrigger:"flex w-full items-center justify-between rounded-md border border-input bg-background ring-offset-background data-[placeholder]:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1 h-10 px-3 py-2 text-sm",SelectScrollUpButton:"flex cursor-default items-center justify-center py-1",SelectScrollDownButton:"flex cursor-default items-center justify-center py-1",SelectContent:"relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",SelectLabel:"py-1.5 pl-8 pr-2 text-sm font-semibold",SelectItem:"relative flex w-full cursor-default select-none items-center rounded-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 py-1.5 pl-8 pr-2 text-sm",SelectSeparator:"-mx-1 my-1 h-px bg-muted"},props:{value:{schema:zod.z.unknown().optional(),design:"plumbing",description:"Radix root"},size:{schema:zod.z.enum(["default","sm","xs"]).optional(),design:"knob",description:"control density; wraps the clickable control, nest SelectValue inside"},placeholder:{schema:zod.z.string().optional(),design:"content",description:"text when nothing is selected"}}};var ys={name:"Separator",description:"Light divider between sibling blocks in a Card, list, or header. For section-level partition use extra spacing instead.",import:"@gradeui/ui",aliases:["divider","rule","hr","line","horizontal rule"],composesWith:["Card (between CardHeader/Content/Footer)","navigation menus","any vertical stacks"],styleDefaults:{Separator:"shrink-0 bg-border"},props:{orientation:{schema:zod.z.enum(["horizontal","vertical"]).optional(),design:"knob",description:'default "horizontal"'},decorative:{schema:zod.z.boolean().optional(),design:"knob",description:"hide from a11y tree",default:true},className:{schema:zod.z.string().optional(),design:"plumbing"}}};var xs={name:"ShaderPresetPicker",description:"Runtime gallery of shader presets \u2014 click to select. Use with ThreeScene as a controlled input so the user can pick a background shader. For a single preview card, use ShaderPresetPreview directly.",import:"@gradeui/ui",aliases:["shader picker","preset picker","shader gallery","preset gallery"],composesWith:["ShaderPresetPreview (internal)","ThreeScene (the typical downstream consumer)"],styleDefaults:{ShaderPresetPicker:"grid grid-cols-2 gap-3"},props:{value:{schema:zod.z.string().optional(),design:"content",description:"currently selected preset id (controlled)"},onChange:{schema:zod.z.unknown().optional(),design:"event",description:"called when the user clicks a preset card"},filterTags:{schema:zod.z.string().optional(),design:"content",description:'only show presets matching at least one tag ("space" | "retro" | "motion" | "hero" | "background" \u2026)'},live:{schema:zod.z.enum(["never","hover","always"]).optional(),design:"knob",description:"thumbnail render mode",default:"hover"},postPreset:{schema:zod.z.string().optional(),design:"content",description:"shared post-FX preset applied to every thumbnail"},palette:{schema:zod.z.unknown().optional(),design:"plumbing",description:"shared palette applied to every thumbnail"},columns:{schema:zod.z.unknown().optional(),design:"plumbing",description:"grid columns at md+ breakpoint"}}};var ws={name:"ShaderPresetPreview",description:"Thumbnail-sized preview card for a shader preset. Defaults to a cheap static placeholder until hovered, at which point the live WebGL render kicks in. Use directly when you want a single preset card; use ShaderPresetPicker for a filterable grid.",import:"@gradeui/ui",aliases:["shader preview","preset preview","shader card"],composesWith:["ThreeScene (internal)","ShaderPresetPicker (wraps this)"],styleDefaults:{ShaderPresetPreview:"group cursor-pointer flex flex-col gap-2"},props:{preset:{schema:zod.z.string(),design:"content",description:"shader preset id from the registry"},live:{schema:zod.z.enum(["never","hover","always"]).optional(),design:"knob",description:"when to run the live WebGL render",default:"hover"},postPreset:{schema:zod.z.string().optional(),design:"content",description:"override the preset's default post-FX"},palette:{schema:zod.z.unknown().optional(),design:"plumbing",description:"palette overrides for the preview"},aspect:{schema:zod.z.enum(["video","square","portrait","wide"]).optional(),design:"knob",default:"video"},hideLabel:{schema:zod.z.boolean().optional(),design:"knob",description:"hide the label strip under the preview",default:false},onClick:{schema:zod.z.unknown().optional(),design:"event"}}};var Rs={name:"Sheet",description:"A panel that slides in from a screen edge \u2014 mobile nav drawers, side panels for editing a single record without leaving the list, filter trays on small viewports, Studio-style inspector panels. For a centered focus modal use Dialog. For a transient announcement use Toast (Sonner). For inline reveals use Collapsible.",import:"@gradeui/ui",aliases:["sheet","drawer","side panel","slide-in","nav drawer","mobile drawer","slide-over","action sheet","modal sheet","bottom sheet","side sheet","react native modal sheet","bottom-sheet","ios action sheet","inspector panel","glass sheet","frosted drawer"],subcomponents:["SheetTrigger","SheetContent","SheetHeader","SheetTitle","SheetDescription","SheetFooter","SheetClose"],composesWith:["Form controls (an inline edit sheet)","Button (trigger + close)","AppShellNav (mobile-only swap)","Code (changelog drawers)","MediaSurface (image-detail sheets)"],styleDefaults:{SheetOverlay:"fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",SheetContent:"fixed z-50 gap-4 p-6 shadow-lg transition ease-in-out data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:duration-300 data-[state=open]:duration-500 inset-y-0 right-0 h-full w-3/4 border-l data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right sm:max-w-sm",SheetHeader:"flex flex-col space-y-2 text-center sm:text-left",SheetFooter:"flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",SheetTitle:"text-lg font-semibold text-foreground",SheetDescription:"text-sm text-muted-foreground"},props:{open:{schema:zod.z.unknown().optional(),design:"plumbing"},asChild:{schema:zod.z.boolean().optional(),design:"plumbing"},side:{schema:zod.z.enum(["top","right","bottom","left"]).optional(),design:"knob",default:"right"},surface:{schema:zod.z.enum(["solid","translucent","glass","glass-strong"]).optional(),design:"knob",description:"what the sheet panel is *made of*. `solid` is the default opaque `bg-background`. Reach for `glass` whenever the canvas behind the sheet (a layout in progress, a media gallery, a dashboard) should remain visible."},className:{schema:zod.z.string().optional(),design:"plumbing",description:"usually set a width (right/left) or height (top/bottom)"},SheetTitle:{schema:zod.z.unknown(),design:"plumbing"}}};var Ss={name:"Sidebar",description:'Vertical app navigation. Drop inside `<AppShellNav placement="side">` for full-page layouts. Compound API \u2014 `<SidebarHeader>` for brand, `<SidebarContent>` for the scrollable body of `<SidebarSection>` + `<SidebarItem>` rows, `<SidebarFooter>` for user / settings chrome. For top nav reach for TopMenu; for command-palette style search reach for Command.',import:"@gradeui/ui",aliases:["sidebar","side menu","sidemenu","navigation sidebar","app sidebar","side nav","side nav rail","master pane","sidebarmenu","navigation rail","react native drawer"],subcomponents:["SidebarHeader","SidebarContent","SidebarFooter","SidebarSection","SidebarItem"],composesWith:["AppShell (inside AppShellNav)","Avatar (in Footer)","Tooltip (auto-wrapped on collapsed items)","Button (asChild for custom routing)"],styleDefaults:{Sidebar:"relative flex h-full flex-col bg-card text-card-foreground",SidebarHeader:"flex shrink-0 items-center border-b border-border",SidebarContent:"flex-1 overflow-y-auto overflow-x-hidden",SidebarFooter:"shrink-0 border-t border-border",SidebarSection:"px-[var(--gds-sidebar-section-px,0.5rem)] space-y-[var(--gds-sidebar-section-gap,0.125rem)]",SidebarItem:"group flex items-center gap-2.5 rounded-md transition-colors",SidebarTreeItem:"group flex w-full items-center gap-1.5 rounded-md py-1 text-sm font-medium transition-colors"},props:{collapsed:{schema:zod.z.boolean().optional(),design:"knob",description:"controlled collapsed state (wire onCollapsedChange when set)"},defaultCollapsed:{schema:zod.z.boolean().optional(),design:"knob",description:"uncontrolled initial value (default false)"},onCollapsedChange:{schema:zod.z.unknown().optional(),design:"event"},collapsible:{schema:zod.z.boolean().optional(),design:"knob",description:"show the affordance for the user to collapse (default true)"},variant:{schema:zod.z.enum(["rail","panel"]).optional(),design:"knob",description:'outer chrome treatment. `rail` (default) is the classic nav rail with a single right-border + tracked width via `--gds-sidebar-width`; drops cleanly into `<AppShellNav placement="side">`. `panel` is a card-style floating sidebar with full border + rounded corners + parent-controlled width; use when the sidebar is one of several adjacent panes in a body row (e.g. Projects | Canvas | Settings). The compound children (Header/Content/Footer/Section/Item) are identical in both treatments.'},any:{schema:zod.z.unknown(),design:"plumbing",description:"brand / logo / org switcher; hides nothing when collapsed (centred)"},title:{schema:zod.z.unknown().optional(),design:"plumbing",description:'group label; **uppercase tracking-wide muted** styling auto-applied (Notion / Linear / Slack-style "GAMES", "FAVORITES", "WORKSPACE" headers); hidden when sidebar is collapsed'},icon:{schema:zod.z.unknown().optional(),design:"plumbing",description:"optional icon beside the title"},trailing:{schema:zod.z.unknown().optional(),design:"plumbing",description:`**action(s) on the right edge of the header** \u2014 the canonical "+" / "..." slot (Notion's "+ Add page" next to Pages, Linear's "+" next to Favorites, Slack's "+" next to Channels). Pointer events isolated so a Button here doesn't toggle collapse.`},defaultExpanded:{schema:zod.z.boolean().optional(),design:"knob",description:"initial open state (default true)"},badge:{schema:zod.z.unknown().optional(),design:"plumbing",description:"trailing count / label (hidden when collapsed)"},active:{schema:zod.z.boolean().optional(),design:"knob",description:'current route; adds aria-current="page"'},href:{schema:zod.z.string().optional(),design:"content",description:"renders as <a>; for routing use `asChild` with your link component"},asChild:{schema:zod.z.boolean().optional(),design:"plumbing",description:"wrap a custom link (<Link href> from Next.js etc.) via Radix Slot"},asButton:{schema:zod.z.boolean().optional(),design:"knob",description:"render as <button> for action rows (open dialog, log out)"},disabled:{schema:zod.z.boolean().optional(),design:"knob"},collapsedLabel:{schema:zod.z.unknown().optional(),design:"plumbing",description:"tooltip override when sidebar is collapsed (defaults to children text)"},size:{schema:zod.z.enum(["sm","md"]).optional(),design:"knob",description:"row size. `md` (default) is the standard `text-sm font-medium` nav row; `sm` is `text-xs` + lighter weight + tighter padding for visually subordinate rows (nested screens under a project, sub-pages under a section). Active state still wins on color + weight so the current row pops at either size."},description:{schema:zod.z.unknown().optional(),design:"plumbing",description:"secondary line beneath the label (metadata like 'Edited 2m ago', '12 items', a brief description). Row layout adapts: label + description stacked vertically; icon vertically-centered against the stack; badge stays on trailing edge. Hidden when sidebar collapsed."}}};var ks={name:"Skeleton",description:'Loading placeholder for content whose shape you know. Set width/height via className to mimic the real content (e.g. "h-4 w-32"). Not a spinner \u2014 use it where the real thing will drop in.',import:"@gradeui/ui",aliases:["placeholder","shimmer","loader","loading state","redacted","redacted placeholder","shimmer placeholder","content placeholder","lottie placeholder"],composesWith:["Card","Avatar (inside a Skeleton for avatar loading)","any layout"],styleDefaults:{Skeleton:"animate-pulse rounded-md bg-muted"},props:{className:{schema:zod.z.string().optional(),design:"plumbing",description:"required in practice; supply width/height utilities"}}};var Cs={name:"Slider",description:'A continuous-ish numeric pick \u2014 volume, opacity, font size, price-range filters. Use a single-thumb slider for one value, two-thumb for a range. For a small set of discrete options (1-5 stars, sm/md/lg) prefer ToggleGroup. For free-text numeric entry use an Input type="number".',import:"@gradeui/ui",aliases:["slider","range slider","range input","volume","opacity slider","scrub","drag value","slider control","value slider","react native slider"],composesWith:["Label (mandatory above)","Row (label + current value display)","Card (settings rows)"],styleDefaults:{Slider:"relative flex w-full touch-none select-none items-center"},props:{value:{schema:zod.z.number().optional(),design:"knob",description:"controlled value; ALWAYS an array even for a single-thumb slider (`[50]`)"},defaultValue:{schema:zod.z.number().optional(),design:"knob",description:"uncontrolled initial; `[20, 80]` for a two-thumb range"},onValueChange:{schema:zod.z.unknown().optional(),design:"event"},min:{schema:zod.z.number().optional(),design:"knob"},max:{schema:zod.z.number().optional(),design:"knob"},step:{schema:zod.z.number().optional(),design:"knob"},disabled:{schema:zod.z.boolean().optional(),design:"knob"},orientation:{schema:zod.z.enum(["horizontal","vertical"]).optional(),design:"knob",default:"horizontal"},dir:{schema:zod.z.enum(["ltr","rtl"]).optional(),design:"plumbing"},inverted:{schema:zod.z.boolean().optional(),design:"knob",description:"flip the visual direction"},name:{schema:zod.z.string().optional(),design:"content",description:"form name when posting natively"}}};var Ts={name:"Sortable",description:"Drag-to-reorder lists, kanban-column reordering, sortable shelves, tab strips the user can rearrange. Pairs with any layout primitive \u2014 Stack for vertical lists, Row for horizontal strips, Grid for 2D card walls. For cross-container drag (drag a card from one column to another) hand-roll DndContext at the page level \u2014 Sortable v1 covers single-list reorder; Sortable.Group for cross-container is a planned follow-up. Reach for raw `@dnd-kit/core` if you need custom collision detection, drag overlays with arbitrary chrome, or non-list use cases (kanban swimlanes, draggable canvas nodes).",import:"@gradeui/ui",aliases:["sortable","reorder","drag and drop","dnd","draggable list","sortable list","kanban","drag to reorder","drag-drop","dragdroplist","drag handle","react native draggable flatlist"],subcomponents:["Sortable.Item","Sortable.Handle"],composesWith:["Stack (vertical lists)","Row (horizontal strips)","Grid (2D card walls)","Card (typical item content)","Button (as Sortable.Handle asChild)"],styleDefaults:{SortableHandle:"cursor-grab touch-none select-none"},props:{values:{schema:zod.z.unknown(),design:"plumbing",description:"ordered list of unique ids; the source of truth for the order"},onReorder:{schema:zod.z.unknown().optional(),design:"event",description:"fires with the new order after a drag that changed it"},strategy:{schema:zod.z.enum(["vertical","horizontal","grid"]).optional(),design:"knob",description:"match the layout your items render in",default:"vertical"},disabled:{schema:zod.z.boolean().optional(),design:"knob",description:"disable drag on every item"},Sortable:{schema:zod.z.unknown(),design:"plumbing",description:"must match one entry in the parent `values` array (identity, not React key)"}}};var Ps={name:"Stack",description:"Default top-level layout inside the main slot when composing two or more stacked regions (hero + content + footer, auth card + subtext, etc.). Prefer Stack over hand-rolled `flex flex-col gap-*` so the vertical rhythm is editable through the settings panel.",import:"@gradeui/ui",aliases:["stack","vstack","vertical","column","vertical layout","v-stack","vertical stack","lazyvstack"],composesWith:["Section","Row","Split","Hero","any content component"],props:{gap:{schema:zod.z.enum(["none","xs","sm","md","lg","xl","2xl"]).optional(),design:"knob",description:"vertical gap between children",default:"md"},align:{schema:zod.z.enum(["start","center","end","stretch"]).optional(),design:"knob",description:"cross-axis (horizontal) alignment of children",default:"stretch"},justify:{schema:zod.z.enum(["start","center","end","between","around","evenly"]).optional(),design:"knob",description:'main-axis (vertical) distribution. Reach for this on absolute-positioned overlays (`justify="end"` pins children to the bottom) and split footers (`justify="between"`).',default:"start"},asChild:{schema:zod.z.boolean().optional(),design:"plumbing",description:"render as the child element via Slot, so `<Stack asChild><section>\u2026</section></Stack>` stamps Stack's classes onto the `<section>` rather than nesting a wrapper div",default:false},className:{schema:zod.z.string().optional(),design:"plumbing"},children:{schema:zod.z.unknown(),design:"plumbing"}}};var Ms={name:"Switch",description:'Instant on/off setting ("Enable notifications", "Dark mode"). Commits on toggle \u2014 no submit button needed. For selecting-from-a-list use Checkbox. For a settings row (label + description on the left, Switch on the right) use Field layout="setting". For a prominent on/off presented as a whole selectable card, use SwitchCard.',import:"@gradeui/ui",aliases:["toggle","switch","on/off switch","ios toggle","toggle switch","switch control","react native switch"],composesWith:["Label (via htmlFor)",'Field (layout="setting" settings row)',"SwitchCard (whole-card toggle)","Card (settings rows)"],styleDefaults:{Switch:"peer inline-flex shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=unchecked]:bg-input h-6 w-11"},variantDefaults:{size:"default"},props:{checked:{schema:zod.z.boolean().optional(),design:"knob"},onCheckedChange:{schema:zod.z.unknown().optional(),design:"event"},defaultChecked:{schema:zod.z.boolean().optional(),design:"knob"},disabled:{schema:zod.z.boolean().optional(),design:"knob"},id:{schema:zod.z.string().optional(),design:"plumbing"}}};var Ns={name:"SwitchCard",description:'A prominent on/off setting presented as a whole selectable card. The whole card is the switch, so the toggled state lives on the card surface. Standalone. For a row of compact settings (label left, small Switch right) use Field layout="setting" instead \u2014 SwitchCard is for the heavier, card-sized toggle.',import:"@gradeui/ui",aliases:["switch card","toggle card","setting card","feature toggle card"],composesWith:["Badge (in aside)","Stack (stacking several)"],props:{checked:{schema:zod.z.unknown().optional(),design:"plumbing",description:"standard switch state"},label:{schema:zod.z.unknown().optional(),design:"plumbing",description:"title line"},description:{schema:zod.z.unknown().optional(),design:"plumbing",description:"secondary line"},aside:{schema:zod.z.unknown().optional(),design:"plumbing",description:"slot before the indicator (a Badge, price, hint)"},hideIndicator:{schema:zod.z.boolean().optional(),design:"knob",description:"hide the switch glyph; state shown by the card border + background"},indicatorPosition:{schema:zod.z.enum(["leading","trailing"]).optional(),design:"knob",description:"default trailing"},children:{schema:zod.z.unknown().optional(),design:"plumbing",description:"arbitrary static content instead of label/description"}}};var Ls={name:"Table",description:"Structured tabular data \u2014 rows \xD7 columns with alignment requirements. NOT a layout grid \u2014 for that use div+Tailwind grid utilities. Keep to <100 rows; larger datasets need virtualisation (not in DS).",import:"@gradeui/ui",aliases:["table","table view","data table","datatable","grid view","data grid","rows and columns"],subcomponents:["TableHeader","TableBody","TableFooter","TableRow","TableHead","TableCell","TableCaption"],composesWith:["Card (wrap the table)","Badge (inside TableCell for status)","Checkbox (row selection)","Button (row actions)"],styleDefaults:{Table:"w-full caption-bottom text-sm",TableHeader:"[&_tr]:border-b",TableBody:"[&_tr:last-child]:border-0",TableFooter:"border-t bg-muted/50 font-medium [&>tr]:last:border-b-0",TableRow:"border-b transition-colors hover:bg-muted/50 data-[state=selected]:bg-muted",TableHead:"h-10 px-2 text-left align-middle font-medium text-muted-foreground [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",TableCell:"p-2 align-middle [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",TableCaption:"mt-4 text-sm text-muted-foreground"},props:{Each:{schema:zod.z.unknown(),design:"plumbing"},No:{schema:zod.z.unknown(),design:"plumbing",description:"styling follows the active theme tokens"}}};var Ds={name:"Tabs",description:'A small set of peer views within one surface (2\u20135 tabs). For primary nav use Side Menu/routing. For filters use a filter control, not tabs. Pick `variant="pill"` for app chrome (settings panels, in-card tab strips). Pick `variant="underlined"` for marketing/docs pages and browser-tab-style treatments.',import:"@gradeui/ui",aliases:["tabs","tab strip","tab bar","tab view","tabbed interface","pageviewcontroller","react native tab view","underlined tabs","page tabs","segment switcher","simple tabs"],subcomponents:["TabsList","TabsTrigger","TabsContent"],composesWith:["Card (tabs inside a card body)","Dialog","TooltipProvider (required for tooltip prop)"],styleDefaults:{TabsList:"inline-flex items-center text-muted-foreground justify-center rounded-lg bg-muted",TabsContent:"mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2"},props:{defaultValue:{schema:zod.z.unknown().optional(),design:"plumbing"},size:{schema:zod.z.enum(["sm","md","lg, default md"]).optional(),design:"knob",description:"t-shirt scale aligned with Button/ToggleGroup heights; cascades to every TabsTrigger via context so set it once on the list"},variant:{schema:zod.z.enum(["pill","underlined, default pill"]).optional(),design:"knob",description:"`pill` is the shadcn chip-on-muted look; `underlined` is the minimal text + bottom-border treatment (formerly the separate SimpleTabs component, collapsed into Tabs in May 2026). Cascades to triggers."},value:{schema:zod.z.string(),design:"content",description:"matches a TabsContent value; tooltip?: string \u2014 when set, wraps the trigger in the design-system Tooltip and auto-applies aria-label (useful for icon-only triggers); requires a TooltipProvider somewhere above the tabs"}}};var As={name:"Textarea",description:'Multi-line text entry (descriptions, messages, comments). Pair with a Label. Single-line input \u2192 use Input instead. Use size="sm"/"xs" in dense tool panels.',import:"@gradeui/ui",aliases:["text area","multiline","comment box","message field","text editor","multi-line text","multiline input","multiline text field","comments box","multiline textinput"],composesWith:["Label","Form","Card (in CardContent)"],styleDefaults:{Textarea:"flex w-full rounded-md border border-input bg-background ring-offset-background placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 min-h-[80px] px-3 py-2 text-sm"},variantDefaults:{size:"default"},props:{size:{schema:zod.z.enum(["default","sm","xs"]).optional(),design:"knob",description:"control density, mirrors Input. default = min-h-80 / text-sm; sm and xs shrink the min-height + padding for dense panels."}}};var Is={name:"ThreeScene",description:"WebGL primitive for shader backgrounds, generative visuals, and bespoke three.js scenes. Three authoring paths, in order of preference \u2014 (1) pick a `preset` id; (2) if nothing in the registry fits, write a `fragmentShader` against the fixed uniform contract; (3) only as a last resort, pass a full `createScene` factory. For looping video, use VideoPlayer; for interactive animations, use RivePlayer.",import:"@gradeui/ui",aliases:["three","threejs","webgl","shader","scene","3d","generative","hero background","fragment shader","glsl"],composesWith:["MediaSurface (internal)","foreground content stacked above with `position: absolute/relative z-10`"],styleDefaults:{ThreeScene:"absolute inset-0 flex items-end justify-end p-2"},props:{preset:{schema:zod.z.enum(["mesh","waves","space","plasma","voronoi","synthwave"]).optional(),design:"knob",description:"shader preset id from the registry"},fragmentShader:{schema:zod.z.string().optional(),design:"content",description:"user-authored GLSL body; takes precedence over preset"},onShaderError:{schema:zod.z.unknown().optional(),design:"event",description:'fires on compile failure; scene falls back to `preset="space"`'},postPreset:{schema:zod.z.enum(["none","vhs","cinematic","synthwave","crt"]).optional(),design:"knob",description:"post-processing pass",default:"vhs"},palette:{schema:zod.z.unknown().optional(),design:"plumbing",description:"any CSS-legal colour string per slot. Re-tints automatically when the theme changes. Unset slots fall back to defaults."},createScene:{schema:zod.z.unknown().optional(),design:"plumbing",description:"custom full scene factory; takes precedence over preset AND fragmentShader"},controls:{schema:zod.z.boolean().optional(),design:"knob",description:"play/pause overlay",default:false},autoPlay:{schema:zod.z.boolean().optional(),design:"knob",description:"respects reduced-motion",default:true},pauseOffscreen:{schema:zod.z.boolean().optional(),design:"knob",description:"big win for WebGL battery life",default:true},aspect:{schema:zod.z.enum(["video","square","portrait","wide","auto"]).optional(),design:"knob",default:"video"},maxDpr:{schema:zod.z.number().optional(),design:"knob",description:"lower for thumbnails / low-end devices"},radius:{schema:zod.z.enum(["none","sm","md","lg","xl"]).optional(),design:"knob",default:"lg"}}};var Hs={name:"Toast",description:'Transient, non-blocking feedback that confirms or warns about an action \u2014 "Saved", "Failed to upload", "Copied to clipboard", "Invitation sent". For permanent inline messages reach for Callout. For confirmations that block until acknowledged use Dialog. Mount <Toaster /> ONCE at the root of the app; everywhere else, call the `toast` helper.',import:"@gradeui/ui",aliases:["toast","toaster","sonner","notification","snackbar","alert toast","transient alert","transient banner","banner notification","toastandroid"],composesWith:["App root layout (single <Toaster /> mount)","Form submit handlers (success/error toasts)","Async actions"],props:{position:{schema:zod.z.enum(["top-left","top-center","top-right","bottom-left","bottom-center","bottom-right"]).optional(),design:"knob",default:"bottom-right"},theme:{schema:zod.z.enum(["light","dark","system"]).optional(),design:"knob"},richColors:{schema:zod.z.boolean().optional(),design:"knob",description:"colored variants for success/error/warning/info"},expand:{schema:zod.z.boolean().optional(),design:"knob",description:"keep multiple toasts visually separated rather than stacked"},visibleToasts:{schema:zod.z.number().optional(),design:"knob",description:"max concurrent toasts on screen (default 3)"},duration:{schema:zod.z.number().optional(),design:"knob",description:"default ms before auto-dismiss"}}};var Fs={name:"Toggle",description:`A standalone on/off button \u2014 Bold/Italic in a toolbar, "Show grid" in a header, single binary toggle that doesn't belong inside a Switch row. For two-or-more mutually-exclusive options use ToggleGroup. For a labeled settings switch ("Active: on/off") use Switch.`,import:"@gradeui/ui",aliases:["toggle","toggle button","press button","bold button","italic button"],composesWith:["Tooltip (wrap an icon-only Toggle)","Row","TabsList (sibling)"],styleDefaults:{Toggle:"inline-flex items-center justify-center gap-2 rounded-md text-sm font-medium transition-colors hover:bg-muted hover:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 data-[state=on]:bg-accent data-[state=on]:text-accent-foreground [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0 bg-transparent h-9 px-2 min-w-9"},variantDefaults:{variant:"default",size:"default"},props:{variant:{schema:zod.z.enum(["default","outline"]).optional(),design:"knob",description:"outline adds a border, default is borderless and ghost-like"},size:{schema:zod.z.enum(["default","sm","lg"]).optional(),design:"knob"},pressed:{schema:zod.z.boolean().optional(),design:"knob",description:"controlled pressed state"},defaultPressed:{schema:zod.z.boolean().optional(),design:"knob",description:"uncontrolled initial state"},onPressedChange:{schema:zod.z.unknown().optional(),design:"event"},disabled:{schema:zod.z.boolean().optional(),design:"knob"},children:{schema:zod.z.unknown(),design:"plumbing",description:"usually an icon or short label"}}};var zs={name:"ToggleGroup",description:'A small set of mutually-exclusive (`type="single"`) or independent (`type="multiple"`) binary options that live side-by-side as a segmented control \u2014 viewport size picker (Mobile/Tablet/Desktop), text alignment, view density. Reads identically to a TabsList of the same size; reach for ToggleGroup when each option emits a value (like a form input) rather than swapping panels. Use Tabs for panel switching, Toggle for a single on/off.',import:"@gradeui/ui",aliases:["toggle group","segmented control","segmented buttons","button group","pill group","view selector","segmented picker","segmentedcontrolios","segmented buttons group","rn segmented control"],subcomponents:["ToggleGroupItem"],composesWith:["Card (header controls)","Row","AppShellHeader chrome","settings panels"],styleDefaults:{ToggleGroup:"inline-flex items-center justify-center rounded-lg bg-muted text-muted-foreground h-8 p-0.5",ToggleGroupItem:"inline-flex items-center justify-center whitespace-nowrap rounded-md font-medium ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 data-[state=on]:bg-background data-[state=on]:text-foreground h-7 px-2 text-xs gap-1.5 [&_svg]:size-3.5"},variantDefaults:{size:"md"},props:{type:{schema:zod.z.enum(["single","multiple"]),design:"knob",description:"single picks one, multiple picks any number"},value:{schema:zod.z.union([zod.z.string(),zod.z.array(zod.z.string())]).optional(),design:"knob",description:"controlled; matches `type` (string for single, string[] for multiple)"},defaultValue:{schema:zod.z.union([zod.z.string(),zod.z.array(zod.z.string())]).optional(),design:"knob",description:"uncontrolled initial"},onValueChange:{schema:zod.z.unknown().optional(),design:"event"},size:{schema:zod.z.enum(["sm","md","lg, default md"]).optional(),design:"knob",description:"cascades to every ToggleGroupItem via context, matches Tabs/Button heights"},variant:{schema:zod.z.enum(["default","outline"]).optional(),design:"knob"},tooltip:{schema:zod.z.unknown().optional(),design:"plumbing",description:"when set, wraps the item in a Tooltip; required for icon-only items where the visible chrome doesn't carry a label"},tooltipSide:{schema:zod.z.enum(["top","right","bottom",'left", default "top']).optional(),design:"knob",description:"side the tooltip renders on"},tooltipDelay:{schema:zod.z.number().optional(),design:"knob",description:"per-item delay override; falls back to the upstream TooltipProvider's delayDuration"}}};var _s={name:"Toolbar",description:`ANY three-region chrome bar \u2014 the leading/center/trailing pattern Apple HIG
80
80
  describes as a "Toolbar." App window chrome (Reddit, Twitter, GitHub, Linear,
81
81
  most desktop apps), section toolbars inside Cards or panels, bottom action
82
82
  bars on mobile layouts, persistent footer toolbars.
@@ -104,18 +104,24 @@ Use directly inside a Card or page section for section-scoped toolbars:
104
104
  <Card>
105
105
  <Toolbar size="sm" variant="subtle" leading={...} trailing={...} />
106
106
  {content}
107
- </Card>`,import:"@gradeui/ui",subcomponents:["ToolbarSlot"],composesWith:["Button","Avatar","Input","Logo","Badge","AppShellHeader","Card","Row","Stack"],styleDefaults:{ToolbarSlot:"flex items-center min-w-0"},props:{leading:{schema:zod.z.unknown().optional(),design:"plumbing",description:"left-aligned region (logo + primary nav)"},center:{schema:zod.z.unknown().optional(),design:"plumbing",description:"center region (search, page title, segmented control)"},trailing:{schema:zod.z.unknown().optional(),design:"plumbing",description:"right-aligned region (action icons, avatar, primary CTA)"},children:{schema:zod.z.unknown().optional(),design:"plumbing",description:"escape hatch; bypasses slot layout"},position:{schema:zod.z.enum(["top","bottom","inline"]).optional(),design:"knob",description:"border placement",default:"top"},variant:{schema:zod.z.enum(["default","subtle","transparent"]).optional(),design:"knob",default:"default"},size:{schema:zod.z.enum(["sm","md","lg"]).optional(),design:"knob",description:"height + padding",default:"md"},sticky:{schema:zod.z.boolean().optional(),design:"knob",description:"pin to top/bottom of scroll container",default:false},"aria-label":{schema:zod.z.string().optional(),design:"content",description:"required by WAI-ARIA toolbar pattern",default:"Toolbar"},className:{schema:zod.z.string().optional(),design:"plumbing"}}};var Ps={name:"Tooltip",description:"A short, non-essential label that explains a control on hover/focus \u2014 icon-only buttons in toolbars, abbreviated column headers, status dots. NEVER hide critical info inside a tooltip \u2014 they're invisible on touch and can be skipped by screen readers if implemented carelessly. For richer hover content use HoverCard. For inline help text that's always visible, use a description paragraph.",import:"@gradeui/ui",aliases:["tooltip","tip","hover tip","hint","label on hover","help tag","hint","helper text bubble","info tip"],subcomponents:["TooltipTrigger","TooltipContent","TooltipProvider"],composesWith:["Button (icon-only)","Toggle","TabsTrigger (the canonical tabs already have a `tooltip` prop that wraps this)","Avatar (status badge meaning)"],styleDefaults:{TooltipContent:"z-50 overflow-hidden rounded-md bg-primary px-3 py-1.5 text-xs text-primary-foreground animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 origin-[--radix-tooltip-content-transform-origin]"},props:{delayDuration:{schema:zod.z.number().optional(),design:"knob",description:"ms hover before show; mount ONCE near the app root"},skipDelayDuration:{schema:zod.z.number().optional(),design:"knob",description:'ms gap that still feels like "same hover"'},open:{schema:zod.z.unknown().optional(),design:"plumbing"},asChild:{schema:zod.z.boolean().optional(),design:"plumbing",description:"usually wraps a Button or icon"},side:{schema:zod.z.enum(["top","right","bottom","left","start","center","end"]).optional(),design:"knob",default:"top"}}};var Ns={name:"VideoPlayer",description:"HTML5 video wrapped in the shared media surface. Controls-on for a standard player, controls-off (+ autoplay/muted/loop) for hero / background video. Prefer Rive for anything interactive, Three Scene for shader backgrounds.",import:"@gradeui/ui",aliases:["video","mp4","movie","webm","clip","video view","av player","react native video","video element"],composesWith:["MediaSurface (internal)","Card (wrap for thumbnail grids)"],styleDefaults:{VideoPlayer:"w-full h-full"},props:{src:{schema:zod.z.string(),design:"content",description:"video URL"},controls:{schema:zod.z.boolean().optional(),design:"knob",description:"show native controls; false for chromeless hero/background video",default:true},autoPlay:{schema:zod.z.boolean().optional(),design:"knob",description:"forces muted=true (browser restriction)",default:false},loop:{schema:zod.z.boolean().optional(),design:"knob",default:false},muted:{schema:zod.z.boolean().optional(),design:"knob",default:false},pauseOffscreen:{schema:zod.z.boolean().optional(),design:"knob",description:"pause when scrolled out of viewport",default:true},aspect:{schema:zod.z.enum(["video","square","portrait","wide","auto"]).optional(),design:"knob",default:"video"},radius:{schema:zod.z.enum(["none","sm","md","lg","xl"]).optional(),design:"knob",description:"driven by `--gds-media-radius`",default:"lg"},objectFit:{schema:zod.z.enum(["cover","contain","fill"]).optional(),design:"knob",default:"cover"},poster:{schema:zod.z.string().optional(),design:"content",description:'image shown before playback. Always rendered as a `loading="lazy"` `<img>` overlay (not the native `poster` attribute, which fetches eagerly).'},playbackRate:{schema:zod.z.number().optional(),design:"knob"}}};var on={Accordion:ci,AiChat:pi,AiChatComposer:mi,AppShell:ui,Avatar:gi,BackgroundFill:fi,Badge:bi,Banner:vi,Breadcrumb:yi,Button:xi,Calendar:wi,Callout:Ri,Card:ki,Carousel:Ci,Chart:Ti,Checkbox:Pi,CheckboxCard:Ni,Code:Mi,Collapsible:Ei,Command:Li,Composer:Di,DatePicker:Ai,Dialog:Ii,DropdownMenu:Hi,Field:zi,FillPicker:_i,Flex:Oi,Grid:Vi,HoverCard:Gi,Input:ji,Label:Ui,Logo:$i,Map:Ki,MediaSurface:Ja,Message:qi,MultiSelect:Yi,Popover:Zi,Progress:Xi,RadioCard:Ji,RadioGroup:Qi,Resizable:es,RivePlayer:ts,Row:os,ScreenAnimator:rs,ScrollArea:as,SectionBlock:ns,Select:is,Separator:ss,ShaderPresetPicker:ls,ShaderPresetPreview:ds,Sheet:cs,Sidebar:ps,Skeleton:ms,Slider:us,Sortable:gs,Stack:fs,Switch:hs,SwitchCard:bs,Table:ys,Tabs:xs,Textarea:ws,ThreeScene:Rs,Toast:Ss,Toggle:ks,ToggleGroup:Cs,Toolbar:Ts,Tooltip:Ps,VideoPlayer:Ns};function Np(e){return e?on[e]??null:null}function Mp(){return Object.keys(on)}function l(...e){return tailwindMerge.twMerge(clsx.clsx(e))}var Ap=gt__namespace.Root,Ms=C__namespace.forwardRef(({className:e,...t},o)=>C__namespace.createElement(gt__namespace.Item,{ref:o,className:l("border-b",e),...t}));Ms.displayName="AccordionItem";var Es=C__namespace.forwardRef(({className:e,children:t,...o},r)=>C__namespace.createElement(gt__namespace.Header,{className:"flex"},C__namespace.createElement(gt__namespace.Trigger,{ref:r,className:l("flex flex-1 items-center justify-between py-4 font-medium transition-all hover:underline [&[data-state=open]>svg]:rotate-180",e),...o},t,C__namespace.createElement(lucideReact.ChevronDown,{className:"h-4 w-4 shrink-0 transition-transform duration-200"}))));Es.displayName=gt__namespace.Trigger.displayName;var Ls=C__namespace.forwardRef(({className:e,children:t,...o},r)=>C__namespace.createElement(gt__namespace.Content,{ref:r,className:"overflow-hidden text-sm transition-all data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down",...o},C__namespace.createElement("div",{className:l("pb-4 pt-0",e)},t)));Ls.displayName=gt__namespace.Content.displayName;var Ds=classVarianceAuthority.cva("relative w-full rounded-lg border p-4 [&>svg~*]:pl-7 [&>svg+div]:translate-y-[-3px] [&>svg]:absolute [&>svg]:left-4 [&>svg]:top-4",{variants:{variant:{default:"bg-background text-foreground [&>svg]:text-foreground",destructive:"border-destructive/30 bg-destructive-soft text-destructive-deep [&>svg]:text-destructive-deep",success:"border-success/30 bg-success-soft text-success-deep [&>svg]:text-success-deep",warning:"border-warning/30 bg-warning-soft text-warning-deep [&>svg]:text-warning-deep",info:"border-info/30 bg-info-soft text-info-deep [&>svg]:text-info-deep"}},defaultVariants:{variant:"default"}}),Hp={destructive:"alert",warning:"alert",info:"status",success:"status",default:"status"},As=C__namespace.forwardRef(({className:e,variant:t,role:o,...r},n)=>C__namespace.createElement("div",{ref:n,role:o??Hp[t??"default"],"data-gds-part":"callout",className:l(Ds({variant:t}),e),...r}));As.displayName="Callout";var Is=C__namespace.forwardRef(({className:e,...t},o)=>C__namespace.createElement("h5",{ref:o,"data-gds-part":"callout-title",className:l("mb-1 font-medium leading-none tracking-tight",e),...t}));Is.displayName="CalloutTitle";var Hs=C__namespace.forwardRef(({className:e,...t},o)=>C__namespace.createElement("div",{ref:o,"data-gds-part":"callout-description",className:l("text-sm [&_p]:leading-relaxed",e),...t}));Hs.displayName="CalloutDescription";var Fs=classVarianceAuthority.cva("gds-app-shell min-h-screen w-full bg-background text-foreground grid",{variants:{nav:{none:"",top:"",side:"","three-pane":""}},defaultVariants:{nav:"none"}}),zs=classVarianceAuthority.cva("gds-app-shell-header",{variants:{sticky:{true:"sticky top-0 z-30",false:""}},defaultVariants:{sticky:false}}),Bs=classVarianceAuthority.cva("gds-app-shell-nav",{variants:{placement:{top:"border-b bg-background",side:"border-r bg-background",none:"hidden"},sticky:{true:"",false:""}},compoundVariants:[{placement:"top",sticky:true,className:"sticky top-0 z-30"},{placement:"side",sticky:true,className:"sticky top-0 h-screen self-start"}],defaultVariants:{placement:"top",sticky:true}}),_s=classVarianceAuthority.cva("gds-app-shell-aside min-w-0 border-r bg-background",{variants:{sticky:{true:"sticky top-0 h-screen self-start",false:""}},defaultVariants:{sticky:false}}),Os=classVarianceAuthority.cva("gds-app-shell-main min-w-0",{variants:{maxWidth:{full:"w-full",container:"w-full mx-auto max-w-7xl px-4 md:px-6 lg:px-8"}},defaultVariants:{maxWidth:"full"}}),Vs=classVarianceAuthority.cva("gds-app-shell-footer border-t bg-background"),Gs=C__namespace.forwardRef(({className:e,nav:t,asChild:o=false,...r},n)=>C__namespace.createElement(o?reactSlot.Slot:"div",{ref:n,"data-gds-part":"app-shell","data-nav":t??"none",className:l(Fs({nav:t,className:e})),...r}));Gs.displayName="AppShell";var js=C__namespace.forwardRef(({className:e,sticky:t,asChild:o=false,...r},n)=>C__namespace.createElement(o?reactSlot.Slot:"header",{ref:n,"data-gds-part":"app-shell-header",className:l(zs({sticky:t,className:e})),...r}));js.displayName="AppShellHeader";var Ws=C__namespace.forwardRef(({className:e,placement:t,sticky:o,asChild:r=false,...n},a)=>C__namespace.createElement(r?reactSlot.Slot:"nav",{ref:a,"data-gds-part":"app-shell-nav","data-placement":t??"top",className:l(Bs({placement:t,sticky:o,className:e})),...n}));Ws.displayName="AppShellNav";var Us=C__namespace.forwardRef(({className:e,sticky:t,asChild:o=false,...r},n)=>C__namespace.createElement(o?reactSlot.Slot:"aside",{ref:n,"data-gds-part":"app-shell-aside",className:l(_s({sticky:t,className:e})),...r}));Us.displayName="AppShellAside";var $s=C__namespace.forwardRef(({className:e,maxWidth:t,asChild:o=false,...r},n)=>C__namespace.createElement(o?reactSlot.Slot:"main",{ref:n,"data-gds-part":"app-shell-main",className:l(Os({maxWidth:t,className:e})),...r}));$s.displayName="AppShellMain";var Ks=C__namespace.forwardRef(({className:e,asChild:t=false,...o},r)=>C__namespace.createElement(t?reactSlot.Slot:"footer",{ref:r,"data-gds-part":"app-shell-footer",className:l(Vs({className:e})),...o}));Ks.displayName="AppShellFooter";var Fp=classVarianceAuthority.cva("relative flex shrink-0 overflow-hidden rounded-full",{variants:{size:{"2xs":"h-5 w-5",xs:"h-6 w-6",sm:"h-7 w-7",md:"h-10 w-10",lg:"h-14 w-14",xl:"h-20 w-20"}},defaultVariants:{size:"md"}}),Ys=C__namespace.forwardRef(({className:e,size:t,...o},r)=>C__namespace.createElement(jt__namespace.Root,{ref:r,"data-gds-part":"avatar","data-gds-size":t??"md",className:l(Fp({size:t}),e),...o}));Ys.displayName=jt__namespace.Root.displayName;var Zs=C__namespace.forwardRef(({className:e,...t},o)=>C__namespace.createElement(jt__namespace.Image,{ref:o,"data-gds-part":"avatar-image",className:l("aspect-square h-full w-full",e),...t}));Zs.displayName=jt__namespace.Image.displayName;var zp=classVarianceAuthority.cva("flex h-full w-full items-center justify-center rounded-full font-semibold",{variants:{tone:{muted:"bg-muted text-foreground",primary:"bg-primary/15 text-primary",violet:"bg-violet-500/20 text-violet-600 dark:text-violet-400",amber:"bg-amber-500/20 text-amber-600 dark:text-amber-400",emerald:"bg-emerald-500/20 text-emerald-600 dark:text-emerald-400",sky:"bg-sky-500/20 text-sky-600 dark:text-sky-400",rose:"bg-rose-500/20 text-rose-600 dark:text-rose-400",plum:"bg-fuchsia-500/20 text-fuchsia-600 dark:text-fuchsia-400",lime:"bg-lime-500/20 text-lime-600 dark:text-lime-400"}},defaultVariants:{tone:"muted"}}),Xs=C__namespace.forwardRef(({className:e,tone:t,...o},r)=>C__namespace.createElement(jt__namespace.Fallback,{ref:r,"data-gds-part":"avatar-fallback","data-gds-tone":t??"muted",className:l(zp({tone:t}),e),...o}));Xs.displayName=jt__namespace.Fallback.displayName;var Qs=classVarianceAuthority.cva("inline-flex items-center gap-1 border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 [&_svg]:size-3 [&_svg]:shrink-0",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground shadow hover:bg-primary/80",secondary:"border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80",destructive:"border-transparent bg-destructive text-destructive-foreground shadow hover:bg-destructive/80",outline:"text-foreground",highlight:"border-transparent bg-gds-yellow-400 text-gds-gray-900 shadow hover:bg-gds-yellow-500",success:"border-transparent bg-gds-green-500 text-gds-gray-900 shadow hover:bg-gds-green-600",warning:"border-transparent bg-orange-500 text-white shadow hover:bg-orange-600",info:"border-transparent bg-blue-500 text-white shadow hover:bg-blue-600","success-soft":"border-gds-green-500/20 bg-gds-green-500/10 text-gds-green-600 dark:text-gds-green-400","warning-soft":"border-orange-500/20 bg-orange-500/10 text-orange-600 dark:text-orange-400","destructive-soft":"border-destructive/20 bg-destructive/10 text-destructive dark:text-red-400","info-soft":"border-blue-500/20 bg-blue-500/10 text-blue-600 dark:text-blue-400","highlight-soft":"border-gds-yellow-500/20 bg-gds-yellow-400/10 text-gds-yellow-600 dark:text-gds-yellow-400","success-outline":"border-gds-green-500/50 bg-transparent text-gds-green-600 dark:text-gds-green-400","warning-outline":"border-orange-500/50 bg-transparent text-orange-600 dark:text-orange-400","destructive-outline":"border-destructive/50 bg-transparent text-destructive dark:text-red-400","info-outline":"border-blue-500/50 bg-transparent text-blue-600 dark:text-blue-400"},rounded:{default:"rounded-md",full:"rounded-full"}},defaultVariants:{variant:"default",rounded:"default"}});function ea({className:e,variant:t,rounded:o,...r}){return C__namespace.createElement("div",{className:l(Qs({variant:t,rounded:o}),e),...r})}var it={solid:"",translucent:"gds-surface-translucent",glass:"gds-surface-glass","glass-strong":"gds-surface-glass-strong"};function St(e,t){return e==="solid"?t:""}var el=classVarianceAuthority.cva("relative flex items-center gap-3 px-4 py-2.5 text-sm leading-relaxed border-b",{variants:{variant:{default:"bg-muted text-foreground border-border [&>svg]:text-muted-foreground",info:"bg-info-soft text-info-deep border-info/30 [&>svg]:text-info-deep",success:"bg-success-soft text-success-deep border-success/30 [&>svg]:text-success-deep",warning:"bg-warning-soft text-warning-deep border-warning/30 [&>svg]:text-warning-deep",destructive:"bg-destructive-soft text-destructive-deep border-destructive/30 [&>svg]:text-destructive-deep",announcement:"bg-[oklch(var(--primary)_/_0.06)] text-foreground border-[oklch(var(--primary)_/_0.18)] [&>svg]:text-primary"},align:{start:"justify-start",center:"justify-center",between:"justify-between"},sticky:{true:"sticky top-0 z-30",false:""}},defaultVariants:{variant:"default",align:"between",sticky:false}}),Vp={destructive:"alert",warning:"alert",info:"status",success:"status",default:"status",announcement:"status"},tl=C__namespace.forwardRef(({className:e,variant:t="default",align:o,sticky:r,surface:n="solid",dismissible:a,onDismiss:i,icon:p,action:s,role:c,children:d,...m},g)=>{let u=t??"default",b=c??Vp[u];return C__namespace.createElement("div",{ref:g,role:b,"data-gds-part":"banner","data-variant":u,"data-surface":n,className:l(el({variant:t,align:o,sticky:r}),it[n],e),...m},p?C__namespace.createElement("span",{"data-gds-part":"banner-icon","aria-hidden":true,className:"shrink-0"},p):null,C__namespace.createElement("div",{"data-gds-part":"banner-content",className:"flex-1 min-w-0"},d),s?C__namespace.createElement("span",{"data-gds-part":"banner-action",className:"shrink-0"},s):null,a?C__namespace.createElement("button",{type:"button","data-gds-part":"banner-dismiss",onClick:i,"aria-label":"Dismiss",className:"shrink-0 inline-flex h-7 w-7 items-center justify-center rounded-md opacity-70 hover:opacity-100 hover:bg-black/5 focus:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 transition-opacity"},C__namespace.createElement(lucideReact.X,{className:"h-4 w-4"})):null)});tl.displayName="Banner";var vr=classVarianceAuthority.cva("inline-flex items-center justify-center whitespace-nowrap rounded-md font-medium transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0",{variants:{variant:{default:"bg-primary text-primary-foreground shadow hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground shadow-sm hover:bg-destructive/90",outline:"border border-input bg-background shadow-sm hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground shadow-sm hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline",raised:"gds-button-raised"},size:{"2xs":"h-6 gap-1 px-1.5 text-2xs [&_svg]:size-3",xs:"h-6 gap-1 px-2 text-xs [&_svg]:size-3",sm:"h-7 gap-1.5 px-2.5 text-sm [&_svg]:size-3.5",md:"h-8 gap-1.5 px-3 text-base [&_svg]:size-4",default:"h-8 gap-1.5 px-3 text-base [&_svg]:size-4",lg:"h-10 gap-2 px-4 text-lg [&_svg]:size-5",icon:"h-8 w-8 [&_svg]:size-4"}},defaultVariants:{variant:"default",size:"md"}}),Xe=C__namespace.forwardRef(({className:e,variant:t,size:o,asChild:r=false,...n},a)=>C__namespace.createElement(r?reactSlot.Slot:"button",{"data-gds-part":"button",className:l("gds-button",vr({variant:t,size:o,className:e})),ref:a,...n}));Xe.displayName="Button";function oa({className:e,classNames:t,showOutsideDays:o=true,captionLayout:r="label",buttonVariant:n="ghost",formatters:a,components:i,...p}){let s=reactDayPicker.getDefaultClassNames();return C__namespace.createElement(reactDayPicker.DayPicker,{showOutsideDays:o,className:l("bg-background group/calendar p-3 [--cell-size:2rem] [[data-slot=card-content]_&]:bg-transparent [[data-slot=popover-content]_&]:bg-transparent",String.raw`rtl:**:[.rdp-button\_next>svg]:rotate-180`,String.raw`rtl:**:[.rdp-button\_previous>svg]:rotate-180`,e),captionLayout:r,formatters:{formatMonthDropdown:c=>c.toLocaleString("default",{month:"short"}),...a},classNames:{root:l("w-fit",s.root),months:l("relative flex flex-col gap-4 md:flex-row",s.months),month:l("flex w-full flex-col gap-4",s.month),nav:l("absolute inset-x-0 top-0 flex w-full items-center justify-between gap-1",s.nav),button_previous:l(vr({variant:n}),"h-[--cell-size] w-[--cell-size] select-none p-0 aria-disabled:opacity-50",s.button_previous),button_next:l(vr({variant:n}),"h-[--cell-size] w-[--cell-size] select-none p-0 aria-disabled:opacity-50",s.button_next),month_caption:l("flex h-[--cell-size] w-full items-center justify-center px-[--cell-size]",s.month_caption),dropdowns:l("flex h-[--cell-size] w-full items-center justify-center gap-1.5 text-sm font-medium",s.dropdowns),dropdown_root:l("has-focus:border-ring border-input shadow-xs has-focus:ring-ring/50 has-focus:ring-[3px] relative rounded-md border",s.dropdown_root),dropdown:l("bg-popover absolute inset-0 opacity-0",s.dropdown),caption_label:l("select-none font-medium",r==="label"?"text-sm":"[&>svg]:text-muted-foreground flex h-8 items-center gap-1 rounded-md pl-2 pr-1 text-sm [&>svg]:size-3.5",s.caption_label),table:"w-full border-collapse",weekdays:l("flex",s.weekdays),weekday:l("text-muted-foreground flex-1 select-none rounded-md text-[0.8rem] font-normal",s.weekday),week:l("mt-2 flex w-full",s.week),week_number_header:l("w-[--cell-size] select-none",s.week_number_header),week_number:l("text-muted-foreground select-none text-[0.8rem]",s.week_number),day:l("group/day relative aspect-square h-full w-full select-none p-0 text-center [&:first-child[data-selected=true]_button]:rounded-l-md [&:last-child[data-selected=true]_button]:rounded-r-md",s.day),range_start:l("bg-accent rounded-l-md",s.range_start),range_middle:l("rounded-none",s.range_middle),range_end:l("bg-accent rounded-r-md",s.range_end),today:l("bg-accent text-accent-foreground rounded-md data-[selected=true]:rounded-none",s.today),outside:l("text-muted-foreground aria-selected:text-muted-foreground",s.outside),disabled:l("text-muted-foreground opacity-50",s.disabled),hidden:l("invisible",s.hidden),...t},components:{Root:({className:c,rootRef:d,...m})=>C__namespace.createElement("div",{"data-slot":"calendar",ref:d,className:l(c),...m}),Chevron:({className:c,orientation:d,...m})=>d==="left"?C__namespace.createElement(lucideReact.ChevronLeftIcon,{className:l("size-4",c),...m}):d==="right"?C__namespace.createElement(lucideReact.ChevronRightIcon,{className:l("size-4",c),...m}):C__namespace.createElement(lucideReact.ChevronDownIcon,{className:l("size-4",c),...m}),DayButton:rl,WeekNumber:({children:c,...d})=>C__namespace.createElement("td",{...d},C__namespace.createElement("div",{className:"flex size-[--cell-size] items-center justify-center text-center"},c)),...i},...p})}function rl({className:e,day:t,modifiers:o,...r}){let n=reactDayPicker.getDefaultClassNames(),a=C__namespace.useRef(null);return C__namespace.useEffect(()=>{o.focused&&a.current?.focus();},[o.focused]),C__namespace.createElement(Xe,{ref:a,variant:"ghost",size:"icon","data-day":`${t.date.getFullYear()}-${String(t.date.getMonth()+1).padStart(2,"0")}-${String(t.date.getDate()).padStart(2,"0")}`,"data-selected-single":o.selected&&!o.range_start&&!o.range_end&&!o.range_middle,"data-range-start":o.range_start,"data-range-end":o.range_end,"data-range-middle":o.range_middle,className:l("hover:bg-accent/40 hover:text-foreground","data-[selected-single=true]:bg-primary data-[selected-single=true]:text-primary-foreground data-[range-middle=true]:bg-accent data-[range-middle=true]:text-accent-foreground data-[range-start=true]:bg-primary data-[range-start=true]:text-primary-foreground data-[range-end=true]:bg-primary data-[range-end=true]:text-primary-foreground group-data-[focused=true]/day:border-ring group-data-[focused=true]/day:ring-ring/50 flex aspect-square h-auto w-full min-w-[--cell-size] flex-col gap-1 font-normal leading-none data-[range-end=true]:rounded-md data-[range-middle=true]:rounded-none data-[range-start=true]:rounded-md group-data-[focused=true]/day:relative group-data-[focused=true]/day:z-10 group-data-[focused=true]/day:ring-[3px] [&>span]:text-xs [&>span]:opacity-70",n.day,e),...r})}var rn=C__namespace.createContext(null);function wr(e){let t=C__namespace.useContext(rn);if(!t)throw new Error(`<${e}> must be rendered inside a <Carousel> root.`);return t}var Xp=5e3,ro=C__namespace.forwardRef(({loop:e=true,align:t="start",slidesPerView:o=1,autoplay:r=false,draggable:n=true,onSlideChange:a,className:i,style:p,children:s,...c},d)=>{let m=C__namespace.useMemo(()=>({loop:e,align:t,slidesToScroll:1,watchDrag:n,containScroll:e?false:"trimSnaps"}),[e,t,n]),[g,u]=qp__default.default(m),[b,f]=C__namespace.useState(0),[h,v]=C__namespace.useState(0),[w,y]=C__namespace.useState(false),[S,k]=C__namespace.useState(false),H=C__namespace.useRef(new Map),E=C__namespace.useRef(a);E.current=a;let D=C__namespace.useMemo(()=>r?r===true?{}:r:null,[r]);C__namespace.useEffect(()=>{if(!u)return;let x=()=>{f(u.selectedScrollSnap()),v(u.scrollSnapList().length),y(u.canScrollPrev()),k(u.canScrollNext()),E.current?.(u.selectedScrollSnap());};return x(),u.on("select",x),u.on("reInit",x),()=>{u.off("select",x),u.off("reInit",x);}},[u]);let U=C__namespace.useCallback(x=>{u&&u.selectedScrollSnap()===x&&u.scrollNext();},[u]),A=C__namespace.useRef(false),q=C__namespace.useRef(true),F=C__namespace.useRef(null);C__namespace.useImperativeHandle(d,()=>F.current),C__namespace.useEffect(()=>{if(!D?.pauseWhenOffscreen){q.current=true;return}let x=F.current;if(!x||typeof IntersectionObserver>"u")return;let I=new IntersectionObserver(P=>{q.current=P.some(te=>te.isIntersecting);},{threshold:.25});return I.observe(x),()=>I.disconnect()},[D?.pauseWhenOffscreen]),C__namespace.useEffect(()=>{if(!u||!D)return;let x=null,I=()=>{x&&clearTimeout(x);let ne=u.selectedScrollSnap(),B=H.current.get(ne)??D.delay??Xp;x=setTimeout(()=>{if(A.current||!q.current){I();return}u.scrollNext();},B);},P=()=>I(),te=()=>{x&&clearTimeout(x);},se=()=>I();return u.on("select",P),u.on("pointerDown",te),u.on("settle",se),I(),()=>{x&&clearTimeout(x),u.off("select",P),u.off("pointerDown",te),u.off("settle",se);}},[u,D]);let Y=()=>{D?.pauseOnHover!==false&&(A.current=true);},J=()=>{A.current=false;},z=C__namespace.useMemo(()=>({api:u,selectedIndex:b,slideCount:h,canScrollPrev:w,canScrollNext:S,durationsRef:H,advanceFromSlide:U}),[u,b,h,w,S,U]),pe=`calc(100% / ${o})`;return C__namespace.createElement(rn.Provider,{value:z},C__namespace.createElement("div",{ref:F,"data-gds-part":"carousel",className:l("relative",i),style:{"--gds-carousel-slide-basis":pe,...p},onMouseEnter:Y,onMouseLeave:J,...c},C__namespace.createElement("div",{ref:g,"data-gds-part":"carousel-viewport",className:"overflow-hidden",style:{borderRadius:"var(--gds-carousel-radius, var(--gds-media-radius, 0.5rem))"}},C__namespace.createElement("div",{"data-gds-part":"carousel-track",className:"flex",style:{gap:"var(--gds-carousel-gap, 0)",touchAction:"pan-y pinch-zoom"}},s))))});ro.displayName="Carousel";var ra=C__namespace.forwardRef(({duration:e,className:t,style:o,children:r,...n},a)=>{let{durationsRef:i}=wr("Carousel.Slide"),p=C__namespace.useRef(null);return C__namespace.useImperativeHandle(a,()=>p.current),C__namespace.useEffect(()=>{if(e==null)return;let s=p.current;if(!s?.parentElement)return;let c=Array.from(s.parentElement.children).indexOf(s);if(c<0)return;let d=i.current;return d.set(c,e),()=>{d.delete(c);}},[e,i]),C__namespace.createElement("div",{ref:p,"data-gds-part":"carousel-slide",className:l("min-w-0 shrink-0 grow-0",t),style:{flexBasis:"var(--gds-carousel-slide-basis, 100%)",...o},...n},r)});ra.displayName="Carousel.Slide";var an=C__namespace.forwardRef(({src:e,poster:t,alt:o,controls:r=false,loop:n=true,fit:a="cover",duration:i,className:p,style:s,...c},d)=>{let{api:m,selectedIndex:g,advanceFromSlide:u}=wr("Carousel.VideoSlide"),b=C__namespace.useRef(null),f=C__namespace.useRef(null);C__namespace.useImperativeHandle(d,()=>b.current);let[h,v]=C__namespace.useState(null);C__namespace.useEffect(()=>{let y=b.current;y?.parentElement&&v(Array.from(y.parentElement.children).indexOf(y));},[m]);let w=h!=null&&h===g;return C__namespace.useEffect(()=>{let y=f.current;if(y)if(w){let S=y.play();S&&typeof S.catch=="function"&&S.catch(()=>{});}else y.pause(),y.currentTime=0;},[w]),C__namespace.createElement(ra,{ref:b,duration:i,className:l("relative overflow-hidden bg-[var(--gds-media-placeholder-bg)]",p),style:s,"data-gds-part":"carousel-video-slide",...c},t&&C__namespace.createElement("img",{src:t,alt:o??"","aria-hidden":w,className:"absolute inset-0 h-full w-full",style:{objectFit:a,opacity:w?0:1,transition:"opacity var(--gds-carousel-fade-ms, 200ms) ease-out"}}),C__namespace.createElement("video",{ref:f,src:e,muted:true,playsInline:true,loop:n,controls:r,preload:"metadata","aria-label":o,className:"block h-full w-full",style:{objectFit:a,opacity:w?1:0,transition:"opacity var(--gds-carousel-fade-ms, 200ms) ease-out"},onEnded:()=>{n||h!=null&&u(h);}}))});an.displayName="Carousel.VideoSlide";var nn=C__namespace.forwardRef(({position:e="below",renderDot:t,className:o,style:r,...n},a)=>{let{api:i,selectedIndex:p,slideCount:s}=wr("Carousel.Dots");if(s<=1)return null;let c=Array.from({length:s},(m,g)=>g),d=e==="overlay"?{position:"absolute",insetInlineStart:0,insetInlineEnd:0,bottom:"var(--gds-carousel-dots-inset, 0.75rem)",zIndex:1}:{marginBlockStart:"var(--gds-carousel-dots-gap, 0.75rem)"};return C__namespace.createElement("div",{ref:a,"data-gds-part":"carousel-dots",className:l("flex items-center justify-center",o),style:{gap:"var(--gds-carousel-dots-spacing, 0.5rem)",...d,...r},...n},c.map(m=>{let g=m===p,u=()=>i?.scrollTo(m);return t?t({index:m,active:g,onClick:u}):C__namespace.createElement("button",{key:m,type:"button",onClick:u,"aria-label":`Go to slide ${m+1}`,"aria-current":g?"true":void 0,"data-active":g||void 0,className:"rounded-full transition-all",style:{width:g?"var(--gds-carousel-dot-active-width, 1.25rem)":"var(--gds-carousel-dot-size, 0.5rem)",height:"var(--gds-carousel-dot-size, 0.5rem)",background:g?"var(--gds-carousel-dot-active-color, oklch(var(--primary)))":"var(--gds-carousel-dot-color, oklch(var(--muted-foreground) / 0.4))"}})}))});nn.displayName="Carousel.Dots";var sn=C__namespace.forwardRef(({position:e="overlay",className:t,style:o,...r},n)=>e==="outside"?C__namespace.createElement("div",{ref:n,"data-gds-part":"carousel-arrows",className:l("flex items-center justify-end gap-2 pt-2",t),style:o,...r},C__namespace.createElement(yr,null),C__namespace.createElement(xr,null)):C__namespace.createElement("div",{ref:n,"data-gds-part":"carousel-arrows",className:l("pointer-events-none absolute inset-0 z-[1]",t),style:o,...r},C__namespace.createElement(yr,{className:"pointer-events-auto absolute left-[var(--gds-carousel-arrow-inset,0.75rem)] top-1/2 -translate-y-1/2"}),C__namespace.createElement(xr,{className:"pointer-events-auto absolute right-[var(--gds-carousel-arrow-inset,0.75rem)] top-1/2 -translate-y-1/2"})));sn.displayName="Carousel.Arrows";var yr=C__namespace.forwardRef(({className:e,style:t,children:o,...r},n)=>{let{api:a,canScrollPrev:i}=wr("Carousel.Prev");return C__namespace.createElement("button",{ref:n,type:"button","data-gds-part":"carousel-prev","aria-label":"Previous slide",disabled:!i,onClick:()=>a?.scrollPrev(),className:l("inline-flex items-center justify-center rounded-full","transition disabled:opacity-40 disabled:cursor-not-allowed","hover:[background:var(--gds-carousel-arrow-hover-bg,oklch(var(--background)))]",e),style:{width:"var(--gds-carousel-arrow-size, 2.25rem)",height:"var(--gds-carousel-arrow-size, 2.25rem)",background:"var(--gds-carousel-arrow-bg, oklch(var(--background) / 0.85))",color:"var(--gds-carousel-arrow-fg, oklch(var(--foreground)))",backdropFilter:"var(--gds-carousel-arrow-backdrop, blur(6px))",boxShadow:"var(--gds-carousel-arrow-shadow, 0 2px 8px oklch(0 0 0 / 0.12))",...t},...r},o??C__namespace.createElement(lucideReact.ChevronLeft,{className:"h-4 w-4","aria-hidden":true}))});yr.displayName="Carousel.Prev";var xr=C__namespace.forwardRef(({className:e,style:t,children:o,...r},n)=>{let{api:a,canScrollNext:i}=wr("Carousel.Next");return C__namespace.createElement("button",{ref:n,type:"button","data-gds-part":"carousel-next","aria-label":"Next slide",disabled:!i,onClick:()=>a?.scrollNext(),className:l("inline-flex items-center justify-center rounded-full","transition disabled:opacity-40 disabled:cursor-not-allowed","hover:[background:var(--gds-carousel-arrow-hover-bg,oklch(var(--background)))]",e),style:{width:"var(--gds-carousel-arrow-size, 2.25rem)",height:"var(--gds-carousel-arrow-size, 2.25rem)",background:"var(--gds-carousel-arrow-bg, oklch(var(--background) / 0.85))",color:"var(--gds-carousel-arrow-fg, oklch(var(--foreground)))",backdropFilter:"var(--gds-carousel-arrow-backdrop, blur(6px))",boxShadow:"var(--gds-carousel-arrow-shadow, 0 2px 8px oklch(0 0 0 / 0.12))",...t},...r},o??C__namespace.createElement(lucideReact.ChevronRight,{className:"h-4 w-4","aria-hidden":true}))});xr.displayName="Carousel.Next";ro.Slide=ra;ro.VideoSlide=an;ro.Dots=nn;ro.Arrows=sn;ro.Prev=yr;ro.Next=xr;var Jp=ro;function Qp(){return C__namespace.useContext(rn)?.api}var al=C__namespace.forwardRef(({className:e,surface:t="solid",...o},r)=>C__namespace.createElement("div",{ref:r,"data-gds-part":"card","data-surface":t,className:l("gds-card rounded-xl border text-card-foreground shadow",St(t,"bg-card"),it[t],e),...o}));al.displayName="Card";var nl=C__namespace.forwardRef(({className:e,...t},o)=>C__namespace.createElement("div",{ref:o,"data-gds-part":"card-header",className:l("flex flex-col space-y-1.5 p-6",e),...t}));nl.displayName="CardHeader";var il=C__namespace.forwardRef(({className:e,...t},o)=>C__namespace.createElement("div",{ref:o,"data-gds-part":"card-title",className:l("font-semibold leading-none tracking-tight",e),...t}));il.displayName="CardTitle";var sl=C__namespace.forwardRef(({className:e,...t},o)=>C__namespace.createElement("div",{ref:o,"data-gds-part":"card-description",className:l("text-sm text-muted-foreground",e),...t}));sl.displayName="CardDescription";var ll=C__namespace.forwardRef(({className:e,...t},o)=>C__namespace.createElement("div",{ref:o,"data-gds-part":"card-content",className:l("p-6 pt-0",e),...t}));ll.displayName="CardContent";var dl=C__namespace.forwardRef(({className:e,...t},o)=>C__namespace.createElement("div",{ref:o,"data-gds-part":"card-footer",className:l("flex items-center p-6 pt-0",e),...t}));dl.displayName="CardFooter";var cl=C__namespace.forwardRef(({className:e,...t},o)=>C__namespace.createElement(Rr__namespace.Root,{ref:o,className:l("gds-checkbox peer h-4 w-4 shrink-0 rounded-[3px] border border-primary ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground",e),...t},C__namespace.createElement(Rr__namespace.Indicator,{className:l("flex items-center justify-center text-current")},C__namespace.createElement(lucideReact.Check,{className:"h-4 w-4"}))));cl.displayName=Rr__namespace.Root.displayName;var ln=C__namespace.createContext(null),aa=C__namespace.forwardRef(({className:e,...t},o)=>{let r=C__namespace.useContext(ln);return C__namespace.createElement("label",{ref:o,htmlFor:r?.controlId,className:l("text-sm font-medium leading-none text-foreground cursor-pointer peer-disabled:cursor-not-allowed peer-disabled:opacity-70",e),...t})});aa.displayName="Field.Label";var na=C__namespace.forwardRef(({className:e,...t},o)=>{let r=C__namespace.useContext(ln);return C__namespace.createElement("p",{ref:o,id:r?.descriptionId,className:l("text-sm text-muted-foreground",e),...t})});na.displayName="Field.Description";var ia=C__namespace.forwardRef(({className:e,...t},o)=>C__namespace.createElement("div",{ref:o,className:l("flex shrink-0 items-center gap-2",e),...t}));ia.displayName="Field.Trailing";var pl=C__namespace.forwardRef(({layout:e="option",className:t,children:o,...r},n)=>{let a=C__namespace.useId(),i=null,p=null,s=null,c=null;C__namespace.Children.forEach(o,v=>{C__namespace.isValidElement(v)&&(v.type===aa?i=v:v.type===na?p=v:v.type===ia?s=v:c||(c=v));});let d=c,m=d?.props??{},g=m.id??`${a}-control`,u=p?`${a}-description`:void 0,b=[m["aria-describedby"],u].filter(Boolean).join(" ")||void 0,f=d?C__namespace.cloneElement(d,{id:g,"aria-describedby":b}):null,h=C__namespace.createElement("div",{className:"flex min-w-0 flex-col gap-0.5"},i,p);return C__namespace.createElement(ln.Provider,{value:{controlId:g,descriptionId:u}},C__namespace.createElement("div",{ref:n,"data-gds-part":"field","data-layout":e,className:l("flex gap-3",e==="setting"?"items-center justify-between":"items-start",t),...r},e==="setting"?C__namespace.createElement(C__namespace.Fragment,null,h,C__namespace.createElement("div",{className:"flex shrink-0 items-center gap-2"},s,f)):C__namespace.createElement(C__namespace.Fragment,null,C__namespace.createElement("div",{className:"mt-0.5 shrink-0"},f),C__namespace.createElement("div",{className:"flex min-w-0 flex-1 flex-col gap-0.5"},i,p),s)))});pl.displayName="Field";var tm=Object.assign(pl,{Label:aa,Description:na,Trailing:ia});function dn({label:e,description:t,aside:o,hideIndicator:r,indicatorPosition:n="trailing",titleId:a,descriptionId:i,indicator:p,children:s}){let c=s!=null?C__namespace.createElement("div",{className:"gds-selection-card__slot"},s):C__namespace.createElement("div",{className:"gds-selection-card__content"},e!=null&&C__namespace.createElement("span",{id:a,className:"gds-selection-card__title"},e),t!=null&&C__namespace.createElement("span",{id:i,className:"gds-selection-card__desc"},t)),d=r?null:p;return n==="leading"?C__namespace.createElement(C__namespace.Fragment,null,d,c,o):C__namespace.createElement(C__namespace.Fragment,null,c,o,d)}var rm=C__namespace.createElement("span",{className:"gds-selection-indicator gds-selection-indicator--radio","aria-hidden":true},C__namespace.createElement(lo__namespace.Indicator,{className:"gds-selection-indicator__dot"})),am=C__namespace.createElement("span",{className:"gds-selection-indicator gds-selection-indicator--checkbox","aria-hidden":true},C__namespace.createElement(Rr__namespace.Indicator,{className:"gds-selection-indicator__check"},C__namespace.createElement(lucideReact.Check,{className:"h-3.5 w-3.5",strokeWidth:3}))),nm=C__namespace.createElement("span",{className:"gds-selection-indicator gds-selection-indicator--switch","aria-hidden":true},C__namespace.createElement(Ir__namespace.Thumb,{className:"gds-selection-indicator__thumb"})),ml=C__namespace.forwardRef(({className:e,label:t,description:o,aside:r,hideIndicator:n,indicatorPosition:a="trailing",children:i,...p},s)=>{let c=C__namespace.useId(),d=t!=null?`${c}-t`:void 0,m=o!=null?`${c}-d`:void 0;return C__namespace.createElement(lo__namespace.Item,{ref:s,"data-gds-part":"radio-card","data-indicator":a,"aria-labelledby":d,"aria-describedby":m,className:l("gds-selection-card",e),...p},C__namespace.createElement(dn,{label:t,description:o,aside:r,hideIndicator:n,indicatorPosition:a,titleId:d,descriptionId:m,indicator:rm},i))});ml.displayName="RadioCard";var ul=C__namespace.forwardRef(({className:e,label:t,description:o,aside:r,hideIndicator:n,indicatorPosition:a="trailing",children:i,...p},s)=>{let c=C__namespace.useId(),d=t!=null?`${c}-t`:void 0,m=o!=null?`${c}-d`:void 0;return C__namespace.createElement(Rr__namespace.Root,{ref:s,"data-gds-part":"checkbox-card","data-indicator":a,"aria-labelledby":d,"aria-describedby":m,className:l("gds-selection-card",e),...p},C__namespace.createElement(dn,{label:t,description:o,aside:r,hideIndicator:n,indicatorPosition:a,titleId:d,descriptionId:m,indicator:am},i))});ul.displayName="CheckboxCard";var gl=C__namespace.forwardRef(({className:e,label:t,description:o,aside:r,hideIndicator:n,indicatorPosition:a="trailing",children:i,...p},s)=>{let c=C__namespace.useId(),d=t!=null?`${c}-t`:void 0,m=o!=null?`${c}-d`:void 0;return C__namespace.createElement(Ir__namespace.Root,{ref:s,"data-gds-part":"switch-card","data-indicator":a,"aria-labelledby":d,"aria-describedby":m,className:l("gds-selection-card",e),...p},C__namespace.createElement(dn,{label:t,description:o,aside:r,hideIndicator:n,indicatorPosition:a,titleId:d,descriptionId:m,indicator:nm},i))});gl.displayName="SwitchCard";var qo={slow:{tokenStagger:70,lineStagger:200,preDelay:500,fadeMs:480},normal:{tokenStagger:22,lineStagger:55,preDelay:200,fadeMs:280},fast:{tokenStagger:8,lineStagger:18,preDelay:60,fadeMs:160}},ca=.55;function fe(e,t){return e<=0?Promise.resolve():new Promise((o,r)=>{if(t?.aborted){r(new DOMException("Aborted","AbortError"));return}let n=window.setTimeout(()=>{t?.removeEventListener("abort",a),o();},e),a=()=>{window.clearTimeout(n),r(new DOMException("Aborted","AbortError"));};t?.addEventListener("abort",a,{once:true});})}async function pa(e,t,o=22,r){if(o<=0){t(e);return}for(let n=1;n<=e.length;n++)t(e.slice(0,n)),n<e.length&&await fe(o,r);}function cn(e){return e instanceof DOMException&&e.name==="AbortError"}var Sr="data-motion",fl="off",hl="(prefers-reduced-motion: reduce)";function im(){if(typeof window>"u"||typeof document>"u")return false;let e=window.matchMedia(hl).matches,t=document.documentElement.getAttribute(Sr)===fl;return e||t}function Zo(){let[e,t]=C__namespace.useState(false);return C__namespace.useEffect(()=>{let o=()=>t(im());o();let r=window.matchMedia(hl);r.addEventListener("change",o);let n=new MutationObserver(o);return n.observe(document.documentElement,{attributes:true,attributeFilter:[Sr]}),()=>{r.removeEventListener("change",o),n.disconnect();}},[]),e}var ao=Zo;function kr(){let[e,t]=C__namespace.useState(true);return C__namespace.useEffect(()=>{let o=window.self!==window.top,r=()=>document.visibilityState!=="hidden"&&(o||document.hasFocus()),n=()=>t(r());return n(),document.addEventListener("visibilitychange",n),window.addEventListener("focus",n),window.addEventListener("blur",n),window.addEventListener("pageshow",n),()=>{document.removeEventListener("visibilitychange",n),window.removeEventListener("focus",n),window.removeEventListener("blur",n),window.removeEventListener("pageshow",n);}},[]),e}function sm(e){if(typeof document>"u")return;let t=document.documentElement;e?t.removeAttribute(Sr):t.setAttribute(Sr,fl);}var lm=2e3,dm={tokenStagger:0,lineStagger:0,preDelay:0,fadeMs:0};function no(e){let{steps:t,interpret:o,speed:r="normal",trigger:n="mount",play:a,loop:i=false,loopDelay:p=lm,maxLoops:s=1/0,containerRef:c,onComplete:d,onLoopReset:m}=e,g=Zo(),u=g?dm:qo[r],b=g?false:i,f=kr(),[h,v]=C__namespace.useState(false),[w,y]=C__namespace.useState(false),[S,k]=C__namespace.useState(-1),H=C__namespace.useRef(null),E=react.useInView(c??H,{once:true,amount:ca}),D=react.useInView(c??H,{amount:ca}),U=f&&(c?D:true),[A,q]=C__namespace.useState(0),F=C__namespace.useMemo(()=>n==="mount"?true:n==="inView"?E:!!a||A>0,[n,E,a,A]),Y=C__namespace.useRef(o);Y.current=o;let J=C__namespace.useRef(d);J.current=d;let z=C__namespace.useRef(m);z.current=m;let pe=C__namespace.useRef(null),x=C__namespace.useRef(null),I=C__namespace.useCallback(()=>{pe.current?.abort(),pe.current=null,x.current!==null&&(window.clearTimeout(x.current),x.current=null),v(false);},[]),P=C__namespace.useCallback(()=>{q(se=>se+1);},[]),te=C__namespace.useCallback((se=0)=>{if(pe.current?.abort(),pe.current=null,x.current!==null&&(window.clearTimeout(x.current),x.current=null),se>0){x.current=window.setTimeout(()=>{x.current=null,q(ne=>ne+1);},se);return}q(ne=>ne+1);},[]);return C__namespace.useEffect(()=>()=>{x.current!==null&&(window.clearTimeout(x.current),x.current=null);},[]),C__namespace.useEffect(()=>{if(!t||t.length===0||!g&&(!F||!U))return;let se=new AbortController;pe.current=se;let{signal:ne}=se,Le={speed:u,signal:ne,cancelled:()=>ne.aborted,reduced:g},me=true,L=0;return (async()=>{do{v(true),y(false),k(-1);try{await fe(n==="inView"?u.preDelay:0,ne);for(let Z=0;Z<t.length;Z++){if(ne.aborted)return;k(Z),await Y.current(t[Z],Le);}if(ne.aborted)return;if(k(-1),y(!0),J.current?.(),L+=1,!b||L>=s){v(!1);return}if(await fe(p,ne),ne.aborted)return;z.current?.();}catch(Z){if(cn(Z))return;process.env.NODE_ENV!=="production"&&console.error("[useScriptedDemo] step error:",Z),v(false);return}}while(me&&b&&!ne.aborted)})(),()=>{me=false,se.abort(),pe.current===se&&(pe.current=null);}},[t,F,U,b,p,u,n,A,g]),{isPlaying:h,isComplete:w,currentIndex:S,play:P,stop:I,restart:te}}var ua=C__namespace.forwardRef(function({variant:t="inline",className:o,...r},n){return C__namespace.createElement("span",{ref:n,"data-gds-part":"demo-cursor","data-gds-variant":t,"aria-hidden":true,className:l("gds-demo-cursor",o),...r})});var vl=C__namespace.createContext({visible:new Set,hasStage:false,reducedMotion:false,defaultAnimation:"fade-up"});function yl({steps:e,speed:t="normal",trigger:o="mount",play:r,loop:n=false,defaultAnimation:a="fade-up",visibleWhenIdle:i=true,className:p,children:s}){let c=react.useReducedMotion()??false,d=C__namespace.useRef(null),[m,g]=C__namespace.useState(()=>new Set),u=!!(e&&e.length);no({steps:u?e:void 0,speed:t,trigger:o,play:r,loop:n,containerRef:d,onLoopReset:()=>g(new Set),interpret:async(h,v)=>{if(h.type==="wait")return fe(h.ms,v.signal);if(h.type==="reset")return g(new Set),fe(v.speed.preDelay,v.signal);if(h.type==="reveal")return g(w=>{if(w.has(h.target))return w;let y=new Set(w);return y.add(h.target),y}),fe(v.speed.lineStagger,v.signal);if(h.type==="reveal-all")return g(w=>{let y=new Set(w);return y.add("__all__"),y}),fe(v.speed.lineStagger,v.signal);if(h.type==="hide")return g(w=>{if(!w.has(h.target))return w;let y=new Set(w);return y.delete(h.target),y}),fe(v.speed.fadeMs,v.signal)}});let b=C__namespace.useMemo(()=>({visible:u?m:new Set(["__all__"]),hasStage:true,reducedMotion:c,defaultAnimation:a}),[u,m,c,a]),f=!u&&!i?{...b,visible:new Set}:b;return C__namespace.createElement("div",{ref:d,"data-gds-part":"demo-stage","data-gds-stage-playing":u?"true":"false",className:p},C__namespace.createElement(vl.Provider,{value:f},s))}var mm={fade:{initial:{opacity:0},animate:{opacity:1}},"fade-up":{initial:{opacity:0,y:12},animate:{opacity:1,y:0}},"fade-down":{initial:{opacity:0,y:-12},animate:{opacity:1,y:0}},"fade-left":{initial:{opacity:0,x:12},animate:{opacity:1,x:0}},"fade-right":{initial:{opacity:0,x:-12},animate:{opacity:1,x:0}},scale:{initial:{opacity:0,scale:.96},animate:{opacity:1,scale:1}},none:{initial:{opacity:1},animate:{opacity:1}}};function xl({id:e,animation:t,durationMs:o,hideOutsideStage:r=false,onReveal:n,onHide:a,className:i,children:p}){let s=C__namespace.useContext(vl),c=s.hasStage?s.visible.has("__all__")||s.visible.has(e):!r,d=C__namespace.useRef(c),m=C__namespace.useRef(n),g=C__namespace.useRef(a);m.current=n,g.current=a,C__namespace.useEffect(()=>{c!==d.current&&(d.current=c,c?m.current?.():g.current?.());},[c]);let u=t??s.defaultAnimation,b=mm[u],f=(o??280)/1e3;return s.reducedMotion?C__namespace.createElement("div",{"data-gds-part":"reveal","data-gds-reveal-id":e,"data-gds-revealed":c?"true":"false",className:i,style:{opacity:c?1:0}},p):C__namespace.createElement(react.motion.div,{"data-gds-part":"reveal","data-gds-reveal-id":e,"data-gds-revealed":c?"true":"false",className:i,initial:b.initial,animate:c?b.animate:b.initial,transition:{duration:f,ease:[.22,1,.36,1]}},p)}var fm={xs:"text-xs",sm:"text-sm",md:"text-base"},hm={slow:{lineStagger:200,tokenStagger:70,preDelay:500,fadeMs:480},normal:{lineStagger:55,tokenStagger:22,preDelay:200,fadeMs:280},fast:{lineStagger:18,tokenStagger:8,preDelay:60,fadeMs:160}},bm={plain:{color:"var(--gds-code-fg)",backgroundColor:"transparent"},styles:[{types:["comment","prolog","doctype","cdata"],style:{color:"var(--gds-code-comment)",fontStyle:"normal"}},{types:["punctuation"],style:{color:"var(--gds-code-punctuation)"}},{types:["property","constant","symbol","deleted"],style:{color:"var(--gds-code-property)"}},{types:["boolean","number"],style:{color:"var(--gds-code-number)"}},{types:["selector","attr-name","string","char","builtin","inserted"],style:{color:"var(--gds-code-string)"}},{types:["operator","entity","url"],style:{color:"var(--gds-code-operator)"}},{types:["atrule","keyword"],style:{color:"var(--gds-code-keyword)"}},{types:["function","class-name"],style:{color:"var(--gds-code-function)"}},{types:["regex","important","variable"],style:{color:"var(--gds-code-variable)"}},{types:["tag"],style:{color:"var(--gds-code-tag)"}},{types:["attr-name"],style:{color:"var(--gds-code-attr-name)"}},{types:["attr-value"],style:{color:"var(--gds-code-attr-value)"}}]};function vm(e){let t=new Set;if(e==null)return t;let o=Array.isArray(e)?e:[e];for(let r of o)if(typeof r=="number")t.add(r);else if(Array.isArray(r)&&r.length===2){let[n,a]=r;for(let i=n;i<=a;i++)t.add(i);}return t}function ym(e,t,o){return t?.added?.includes(e)?"added":t?.removed?.includes(e)?"removed":o.has(e)?"highlight":"default"}var Rl=C__namespace.forwardRef(function({source:t,language:o="tsx",highlight:r,diff:n,reveal:a="none",trigger:i="mount",play:p,speed:s="normal",delay:c,stagger:d,showLineNumbers:m=false,filename:g,wrap:u=false,bare:b=false,prompt:f,cursor:h,steps:v,loop:w=false,size:y="sm",height:S,maxLines:k,className:H,style:E,...D},U){let A=hm[s],q=c??0,F=d??(a==="typewriter"?A.tokenStagger:A.lineStagger),Y=!!(v&&v.length),[J,z]=C__namespace.useState(""),[pe,x]=C__namespace.useState(()=>new Set),I=Y?J:t??"",P=C__namespace.useMemo(()=>I.replace(/\n$/,""),[I]),te=C__namespace.useMemo(()=>vm(r),[r]),se=!!(n?.added?.length||n?.removed?.length),ne=m||se,B=C__namespace.useRef(null);C__namespace.useImperativeHandle(U,()=>B.current);let[Le,me]=C__namespace.useState(a==="none"),L=react.useInView(B,{once:true,amount:.55}),de=i==="inView"?A.preDelay:0,Z=i==="mount"?true:i==="inView"?L:!!p,$e=F,le=P.split(`
108
- `).length,De=a==="typewriter"?P.replace(/\s+/g," ").split(" ").length:le,rt=de+q+De*$e+280;C__namespace.useEffect(()=>{if(Y)return;if(!Z||a==="none"){me(a==="none");return}me(false);let oe=window.setTimeout(()=>me(true),rt);return ()=>window.clearTimeout(oe)},[Z,a,rt,Y]);let Ke=C__namespace.useRef(""),at=C__namespace.useRef(new Set),Xt=C__namespace.useCallback(oe=>{Ke.current=oe,z(oe);},[]),Bo=C__namespace.useCallback(oe=>{at.current=oe,x(oe);},[]),{isComplete:bo}=no({steps:Y?v:void 0,speed:s,trigger:"manual",play:Z,loop:w,containerRef:B,onLoopReset:()=>{Xt(""),Bo(new Set),me(false);},interpret:async(oe,Nt)=>{let Mt=Nt.signal;if(oe.type==="wait")return fe(oe.ms,Mt);if(oe.type==="clear"){Xt(""),Bo(new Set);return}if(oe.type==="output"){let Ge=Ke.current,yt=Ge.length>0&&!Ge.endsWith(`
109
- `)?Ge+`
110
- `:Ge,lr=yt+oe.text,dr=yt.split(`
111
- `).length,Ya=oe.text.split(`
112
- `).length,cr=new Set(at.current);for(let _o=0;_o<Ya;_o++)cr.add(dr+_o);return Xt(lr),Bo(cr),Xt(lr+(lr.endsWith(`
107
+ </Card>`,import:"@gradeui/ui",subcomponents:["ToolbarSlot"],composesWith:["Button","Avatar","Input","Logo","Badge","AppShellHeader","Card","Row","Stack"],styleDefaults:{ToolbarSlot:"flex items-center min-w-0"},props:{leading:{schema:zod.z.unknown().optional(),design:"plumbing",description:"left-aligned region (logo + primary nav)"},center:{schema:zod.z.unknown().optional(),design:"plumbing",description:"center region (search, page title, segmented control)"},trailing:{schema:zod.z.unknown().optional(),design:"plumbing",description:"right-aligned region (action icons, avatar, primary CTA)"},children:{schema:zod.z.unknown().optional(),design:"plumbing",description:"escape hatch; bypasses slot layout"},position:{schema:zod.z.enum(["top","bottom","inline"]).optional(),design:"knob",description:"border placement",default:"top"},variant:{schema:zod.z.enum(["default","subtle","transparent"]).optional(),design:"knob",default:"default"},size:{schema:zod.z.enum(["sm","md","lg"]).optional(),design:"knob",description:"height + padding",default:"md"},sticky:{schema:zod.z.boolean().optional(),design:"knob",description:"pin to top/bottom of scroll container",default:false},"aria-label":{schema:zod.z.string().optional(),design:"content",description:"required by WAI-ARIA toolbar pattern",default:"Toolbar"},className:{schema:zod.z.string().optional(),design:"plumbing"}}};var Bs={name:"Tooltip",description:"A short, non-essential label that explains a control on hover/focus \u2014 icon-only buttons in toolbars, abbreviated column headers, status dots. NEVER hide critical info inside a tooltip \u2014 they're invisible on touch and can be skipped by screen readers if implemented carelessly. For richer hover content use HoverCard. For inline help text that's always visible, use a description paragraph.",import:"@gradeui/ui",aliases:["tooltip","tip","hover tip","hint","label on hover","help tag","hint","helper text bubble","info tip"],subcomponents:["TooltipTrigger","TooltipContent","TooltipProvider"],composesWith:["Button (icon-only)","Toggle","TabsTrigger (the canonical tabs already have a `tooltip` prop that wraps this)","Avatar (status badge meaning)"],styleDefaults:{TooltipContent:"z-50 overflow-hidden rounded-md bg-primary px-3 py-1.5 text-xs text-primary-foreground animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 origin-[--radix-tooltip-content-transform-origin]"},props:{delayDuration:{schema:zod.z.number().optional(),design:"knob",description:"ms hover before show; mount ONCE near the app root"},skipDelayDuration:{schema:zod.z.number().optional(),design:"knob",description:'ms gap that still feels like "same hover"'},open:{schema:zod.z.unknown().optional(),design:"plumbing"},asChild:{schema:zod.z.boolean().optional(),design:"plumbing",description:"usually wraps a Button or icon"},side:{schema:zod.z.enum(["top","right","bottom","left","start","center","end"]).optional(),design:"knob",default:"top"}}};var Os={name:"VideoPlayer",description:"HTML5 video wrapped in the shared media surface. Controls-on for a standard player, controls-off (+ autoplay/muted/loop) for hero / background video. Prefer Rive for anything interactive, Three Scene for shader backgrounds.",import:"@gradeui/ui",aliases:["video","mp4","movie","webm","clip","video view","av player","react native video","video element"],composesWith:["MediaSurface (internal)","Card (wrap for thumbnail grids)"],styleDefaults:{VideoPlayer:"w-full h-full"},props:{src:{schema:zod.z.string(),design:"content",description:"video URL"},controls:{schema:zod.z.boolean().optional(),design:"knob",description:"show native controls; false for chromeless hero/background video",default:true},autoPlay:{schema:zod.z.boolean().optional(),design:"knob",description:"forces muted=true (browser restriction)",default:false},loop:{schema:zod.z.boolean().optional(),design:"knob",default:false},muted:{schema:zod.z.boolean().optional(),design:"knob",default:false},pauseOffscreen:{schema:zod.z.boolean().optional(),design:"knob",description:"pause when scrolled out of viewport",default:true},aspect:{schema:zod.z.enum(["video","square","portrait","wide","auto"]).optional(),design:"knob",default:"video"},radius:{schema:zod.z.enum(["none","sm","md","lg","xl"]).optional(),design:"knob",description:"driven by `--gds-media-radius`",default:"lg"},objectFit:{schema:zod.z.enum(["cover","contain","fill"]).optional(),design:"knob",default:"cover"},poster:{schema:zod.z.string().optional(),design:"content",description:'image shown before playback. Always rendered as a `loading="lazy"` `<img>` overlay (not the native `poster` attribute, which fetches eagerly).'},playbackRate:{schema:zod.z.number().optional(),design:"knob"}}};var ln={Accordion:wi,AiChat:Ri,AiChatComposer:Si,AppShell:ki,Avatar:Ci,BackgroundFill:Ti,Badge:Mi,Banner:Ni,Breadcrumb:Ei,Button:Li,Calendar:Di,Callout:Ai,Card:Hi,Carousel:Fi,Chart:zi,Checkbox:_i,CheckboxCard:Bi,Code:Oi,Collapsible:Vi,Command:Gi,Composer:Wi,DatePicker:ji,Dialog:$i,DropdownMenu:Ui,Field:qi,FillPicker:Yi,Flex:Xi,Grid:Ji,HoverCard:Qi,Input:es,Label:os,Logo:rs,Map:as,MediaSurface:rn,Message:ns,Motion:is,MultiSelect:ss,Popover:ls,Progress:ds,RadioCard:cs,RadioGroup:ps,Resizable:us,RivePlayer:ms,Row:gs,ScreenAnimator:fs,ScrollArea:hs,SectionBlock:bs,Select:vs,Separator:ys,ShaderPresetPicker:xs,ShaderPresetPreview:ws,Sheet:Rs,Sidebar:Ss,Skeleton:ks,Slider:Cs,Sortable:Ts,Stack:Ps,Switch:Ms,SwitchCard:Ns,Table:Ls,Tabs:Ds,Textarea:As,ThreeScene:Is,Toast:Hs,Toggle:Fs,ToggleGroup:zs,Toolbar:_s,Tooltip:Bs,VideoPlayer:Os};function gu(e){return e?ln[e]??null:null}function fu(){return Object.keys(ln)}function d(...e){return tailwindMerge.twMerge(clsx.clsx(e))}var yu=kt__namespace.Root,Vs=v__namespace.forwardRef(({className:e,...t},o)=>v__namespace.createElement(kt__namespace.Item,{ref:o,className:d("border-b",e),...t}));Vs.displayName="AccordionItem";var Gs=v__namespace.forwardRef(({className:e,children:t,...o},r)=>v__namespace.createElement(kt__namespace.Header,{className:"flex"},v__namespace.createElement(kt__namespace.Trigger,{ref:r,className:d("flex flex-1 items-center justify-between py-4 font-medium transition-all hover:underline [&[data-state=open]>svg]:rotate-180",e),...o},t,v__namespace.createElement(lucideReact.ChevronDown,{className:"h-4 w-4 shrink-0 transition-transform duration-200"}))));Gs.displayName=kt__namespace.Trigger.displayName;var Ws=v__namespace.forwardRef(({className:e,children:t,...o},r)=>v__namespace.createElement(kt__namespace.Content,{ref:r,className:"overflow-hidden text-sm transition-all data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down",...o},v__namespace.createElement("div",{className:d("pb-4 pt-0",e)},t)));Ws.displayName=kt__namespace.Content.displayName;var js=classVarianceAuthority.cva("relative w-full rounded-lg border p-4 [&>svg~*]:pl-7 [&>svg+div]:translate-y-[-3px] [&>svg]:absolute [&>svg]:left-4 [&>svg]:top-4",{variants:{variant:{default:"bg-background text-foreground [&>svg]:text-foreground",destructive:"border-destructive/30 bg-destructive-soft text-destructive-deep [&>svg]:text-destructive-deep",success:"border-success/30 bg-success-soft text-success-deep [&>svg]:text-success-deep",warning:"border-warning/30 bg-warning-soft text-warning-deep [&>svg]:text-warning-deep",info:"border-info/30 bg-info-soft text-info-deep [&>svg]:text-info-deep"}},defaultVariants:{variant:"default"}}),wu={destructive:"alert",warning:"alert",info:"status",success:"status",default:"status"},$s=v__namespace.forwardRef(({className:e,variant:t,role:o,...r},n)=>v__namespace.createElement("div",{ref:n,role:o??wu[t??"default"],"data-gds-part":"callout",className:d(js({variant:t}),e),...r}));$s.displayName="Callout";var Us=v__namespace.forwardRef(({className:e,...t},o)=>v__namespace.createElement("h5",{ref:o,"data-gds-part":"callout-title",className:d("mb-1 font-medium leading-none tracking-tight",e),...t}));Us.displayName="CalloutTitle";var Ks=v__namespace.forwardRef(({className:e,...t},o)=>v__namespace.createElement("div",{ref:o,"data-gds-part":"callout-description",className:d("text-sm [&_p]:leading-relaxed",e),...t}));Ks.displayName="CalloutDescription";var qs=classVarianceAuthority.cva("gds-app-shell min-h-screen w-full bg-background text-foreground grid",{variants:{nav:{none:"",top:"",side:"","three-pane":""}},defaultVariants:{nav:"none"}}),Zs=classVarianceAuthority.cva("gds-app-shell-header",{variants:{sticky:{true:"sticky top-0 z-30",false:""}},defaultVariants:{sticky:false}}),Ys=classVarianceAuthority.cva("gds-app-shell-nav",{variants:{placement:{top:"border-b bg-background",side:"border-r bg-background",none:"hidden"},sticky:{true:"",false:""}},compoundVariants:[{placement:"top",sticky:true,className:"sticky top-0 z-30"},{placement:"side",sticky:true,className:"sticky top-0 h-screen self-start"}],defaultVariants:{placement:"top",sticky:true}}),Xs=classVarianceAuthority.cva("gds-app-shell-aside min-w-0 border-r bg-background",{variants:{sticky:{true:"sticky top-0 h-screen self-start",false:""}},defaultVariants:{sticky:false}}),Js=classVarianceAuthority.cva("gds-app-shell-main min-w-0",{variants:{maxWidth:{full:"w-full",container:"w-full mx-auto max-w-7xl px-4 md:px-6 lg:px-8"}},defaultVariants:{maxWidth:"full"}}),Qs=classVarianceAuthority.cva("gds-app-shell-footer border-t bg-background"),el=v__namespace.forwardRef(({className:e,nav:t,asChild:o=false,...r},n)=>v__namespace.createElement(o?reactSlot.Slot:"div",{ref:n,"data-gds-part":"app-shell","data-nav":t??"none",className:d(qs({nav:t,className:e})),...r}));el.displayName="AppShell";var tl=v__namespace.forwardRef(({className:e,sticky:t,asChild:o=false,...r},n)=>v__namespace.createElement(o?reactSlot.Slot:"header",{ref:n,"data-gds-part":"app-shell-header",className:d(Zs({sticky:t,className:e})),...r}));tl.displayName="AppShellHeader";var ol=v__namespace.forwardRef(({className:e,placement:t,sticky:o,asChild:r=false,...n},a)=>v__namespace.createElement(r?reactSlot.Slot:"nav",{ref:a,"data-gds-part":"app-shell-nav","data-placement":t??"top",className:d(Ys({placement:t,sticky:o,className:e})),...n}));ol.displayName="AppShellNav";var rl=v__namespace.forwardRef(({className:e,sticky:t,asChild:o=false,...r},n)=>v__namespace.createElement(o?reactSlot.Slot:"aside",{ref:n,"data-gds-part":"app-shell-aside",className:d(Xs({sticky:t,className:e})),...r}));rl.displayName="AppShellAside";var al=v__namespace.forwardRef(({className:e,maxWidth:t,asChild:o=false,...r},n)=>v__namespace.createElement(o?reactSlot.Slot:"main",{ref:n,"data-gds-part":"app-shell-main",className:d(Js({maxWidth:t,className:e})),...r}));al.displayName="AppShellMain";var nl=v__namespace.forwardRef(({className:e,asChild:t=false,...o},r)=>v__namespace.createElement(t?reactSlot.Slot:"footer",{ref:r,"data-gds-part":"app-shell-footer",className:d(Qs({className:e})),...o}));nl.displayName="AppShellFooter";var Ru=classVarianceAuthority.cva("relative flex shrink-0 overflow-hidden rounded-full",{variants:{size:{"2xs":"h-5 w-5",xs:"h-6 w-6",sm:"h-7 w-7",md:"h-10 w-10",lg:"h-14 w-14",xl:"h-20 w-20"}},defaultVariants:{size:"md"}}),sl=v__namespace.forwardRef(({className:e,size:t,...o},r)=>v__namespace.createElement(Yt__namespace.Root,{ref:r,"data-gds-part":"avatar","data-gds-size":t??"md",className:d(Ru({size:t}),e),...o}));sl.displayName=Yt__namespace.Root.displayName;var ll=v__namespace.forwardRef(({className:e,...t},o)=>v__namespace.createElement(Yt__namespace.Image,{ref:o,"data-gds-part":"avatar-image",className:d("aspect-square h-full w-full",e),...t}));ll.displayName=Yt__namespace.Image.displayName;var Su=classVarianceAuthority.cva("flex h-full w-full items-center justify-center rounded-full font-semibold",{variants:{tone:{muted:"bg-muted text-foreground",primary:"bg-primary/15 text-primary",violet:"bg-violet-500/20 text-violet-600 dark:text-violet-400",amber:"bg-amber-500/20 text-amber-600 dark:text-amber-400",emerald:"bg-emerald-500/20 text-emerald-600 dark:text-emerald-400",sky:"bg-sky-500/20 text-sky-600 dark:text-sky-400",rose:"bg-rose-500/20 text-rose-600 dark:text-rose-400",plum:"bg-fuchsia-500/20 text-fuchsia-600 dark:text-fuchsia-400",lime:"bg-lime-500/20 text-lime-600 dark:text-lime-400"}},defaultVariants:{tone:"muted"}}),dl=v__namespace.forwardRef(({className:e,tone:t,...o},r)=>v__namespace.createElement(Yt__namespace.Fallback,{ref:r,"data-gds-part":"avatar-fallback","data-gds-tone":t??"muted",className:d(Su({tone:t}),e),...o}));dl.displayName=Yt__namespace.Fallback.displayName;var pl=classVarianceAuthority.cva("inline-flex items-center gap-1 border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 [&_svg]:size-3 [&_svg]:shrink-0",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground shadow hover:bg-primary/80",secondary:"border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80",destructive:"border-transparent bg-destructive text-destructive-foreground shadow hover:bg-destructive/80",outline:"text-foreground",highlight:"border-transparent bg-gds-yellow-400 text-gds-gray-900 shadow hover:bg-gds-yellow-500",success:"border-transparent bg-gds-green-500 text-gds-gray-900 shadow hover:bg-gds-green-600",warning:"border-transparent bg-orange-500 text-white shadow hover:bg-orange-600",info:"border-transparent bg-blue-500 text-white shadow hover:bg-blue-600","success-soft":"border-gds-green-500/20 bg-gds-green-500/10 text-gds-green-600 dark:text-gds-green-400","warning-soft":"border-orange-500/20 bg-orange-500/10 text-orange-600 dark:text-orange-400","destructive-soft":"border-destructive/20 bg-destructive/10 text-destructive dark:text-red-400","info-soft":"border-blue-500/20 bg-blue-500/10 text-blue-600 dark:text-blue-400","highlight-soft":"border-gds-yellow-500/20 bg-gds-yellow-400/10 text-gds-yellow-600 dark:text-gds-yellow-400","success-outline":"border-gds-green-500/50 bg-transparent text-gds-green-600 dark:text-gds-green-400","warning-outline":"border-orange-500/50 bg-transparent text-orange-600 dark:text-orange-400","destructive-outline":"border-destructive/50 bg-transparent text-destructive dark:text-red-400","info-outline":"border-blue-500/50 bg-transparent text-blue-600 dark:text-blue-400"},rounded:{default:"rounded-md",full:"rounded-full"}},defaultVariants:{variant:"default",rounded:"default"}});function ia({className:e,variant:t,rounded:o,...r}){return v__namespace.createElement("div",{className:d(pl({variant:t,rounded:o}),e),...r})}var ht={solid:"",translucent:"gds-surface-translucent",glass:"gds-surface-glass","glass-strong":"gds-surface-glass-strong"};function At(e,t){return e==="solid"?t:""}var ul=classVarianceAuthority.cva("relative flex items-center gap-3 px-4 py-2.5 text-sm leading-relaxed border-b",{variants:{variant:{default:"bg-muted text-foreground border-border [&>svg]:text-muted-foreground",info:"bg-info-soft text-info-deep border-info/30 [&>svg]:text-info-deep",success:"bg-success-soft text-success-deep border-success/30 [&>svg]:text-success-deep",warning:"bg-warning-soft text-warning-deep border-warning/30 [&>svg]:text-warning-deep",destructive:"bg-destructive-soft text-destructive-deep border-destructive/30 [&>svg]:text-destructive-deep",announcement:"bg-[oklch(var(--primary)_/_0.06)] text-foreground border-[oklch(var(--primary)_/_0.18)] [&>svg]:text-primary"},align:{start:"justify-start",center:"justify-center",between:"justify-between"},sticky:{true:"sticky top-0 z-30",false:""}},defaultVariants:{variant:"default",align:"between",sticky:false}}),Pu={destructive:"alert",warning:"alert",info:"status",success:"status",default:"status",announcement:"status"},ml=v__namespace.forwardRef(({className:e,variant:t="default",align:o,sticky:r,surface:n="solid",dismissible:a,onDismiss:i,icon:p,action:s,role:c,children:l,...m},u)=>{let g=t??"default",h=c??Pu[g];return v__namespace.createElement("div",{ref:u,role:h,"data-gds-part":"banner","data-variant":g,"data-surface":n,className:d(ul({variant:t,align:o,sticky:r}),ht[n],e),...m},p?v__namespace.createElement("span",{"data-gds-part":"banner-icon","aria-hidden":true,className:"shrink-0"},p):null,v__namespace.createElement("div",{"data-gds-part":"banner-content",className:"flex-1 min-w-0"},l),s?v__namespace.createElement("span",{"data-gds-part":"banner-action",className:"shrink-0"},s):null,a?v__namespace.createElement("button",{type:"button","data-gds-part":"banner-dismiss",onClick:i,"aria-label":"Dismiss",className:"shrink-0 inline-flex h-7 w-7 items-center justify-center rounded-md opacity-70 hover:opacity-100 hover:bg-black/5 focus:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 transition-opacity"},v__namespace.createElement(lucideReact.X,{className:"h-4 w-4"})):null)});ml.displayName="Banner";var Sr=classVarianceAuthority.cva("inline-flex items-center justify-center whitespace-nowrap rounded-md font-medium transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0",{variants:{variant:{default:"bg-primary text-primary-foreground shadow hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground shadow-sm hover:bg-destructive/90",outline:"border border-input bg-background shadow-sm hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground shadow-sm hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline",raised:"gds-button-raised"},size:{"2xs":"h-6 gap-1 px-1.5 text-2xs [&_svg]:size-3",xs:"h-6 gap-1 px-2 text-xs [&_svg]:size-3",sm:"h-7 gap-1.5 px-2.5 text-sm [&_svg]:size-3.5",md:"h-8 gap-1.5 px-3 text-base [&_svg]:size-4",default:"h-8 gap-1.5 px-3 text-base [&_svg]:size-4",lg:"h-10 gap-2 px-4 text-lg [&_svg]:size-5",icon:"h-8 w-8 [&_svg]:size-4"}},defaultVariants:{variant:"default",size:"md"}}),dt=v__namespace.forwardRef(({className:e,variant:t,size:o,asChild:r=false,...n},a)=>v__namespace.createElement(r?reactSlot.Slot:"button",{"data-gds-part":"button",className:d("gds-button",Sr({variant:t,size:o,className:e})),ref:a,...n}));dt.displayName="Button";function la({className:e,classNames:t,showOutsideDays:o=true,captionLayout:r="label",buttonVariant:n="ghost",formatters:a,components:i,...p}){let s=reactDayPicker.getDefaultClassNames();return v__namespace.createElement(reactDayPicker.DayPicker,{showOutsideDays:o,className:d("bg-background group/calendar p-3 [--cell-size:2rem] [[data-slot=card-content]_&]:bg-transparent [[data-slot=popover-content]_&]:bg-transparent",String.raw`rtl:**:[.rdp-button\_next>svg]:rotate-180`,String.raw`rtl:**:[.rdp-button\_previous>svg]:rotate-180`,e),captionLayout:r,formatters:{formatMonthDropdown:c=>c.toLocaleString("default",{month:"short"}),...a},classNames:{root:d("w-fit",s.root),months:d("relative flex flex-col gap-4 md:flex-row",s.months),month:d("flex w-full flex-col gap-4",s.month),nav:d("absolute inset-x-0 top-0 flex w-full items-center justify-between gap-1",s.nav),button_previous:d(Sr({variant:n}),"h-[--cell-size] w-[--cell-size] select-none p-0 aria-disabled:opacity-50",s.button_previous),button_next:d(Sr({variant:n}),"h-[--cell-size] w-[--cell-size] select-none p-0 aria-disabled:opacity-50",s.button_next),month_caption:d("flex h-[--cell-size] w-full items-center justify-center px-[--cell-size]",s.month_caption),dropdowns:d("flex h-[--cell-size] w-full items-center justify-center gap-1.5 text-sm font-medium",s.dropdowns),dropdown_root:d("has-focus:border-ring border-input shadow-xs has-focus:ring-ring/50 has-focus:ring-[3px] relative rounded-md border",s.dropdown_root),dropdown:d("bg-popover absolute inset-0 opacity-0",s.dropdown),caption_label:d("select-none font-medium",r==="label"?"text-sm":"[&>svg]:text-muted-foreground flex h-8 items-center gap-1 rounded-md pl-2 pr-1 text-sm [&>svg]:size-3.5",s.caption_label),table:"w-full border-collapse",weekdays:d("flex",s.weekdays),weekday:d("text-muted-foreground flex-1 select-none rounded-md text-[0.8rem] font-normal",s.weekday),week:d("mt-2 flex w-full",s.week),week_number_header:d("w-[--cell-size] select-none",s.week_number_header),week_number:d("text-muted-foreground select-none text-[0.8rem]",s.week_number),day:d("group/day relative aspect-square h-full w-full select-none p-0 text-center [&:first-child[data-selected=true]_button]:rounded-l-md [&:last-child[data-selected=true]_button]:rounded-r-md",s.day),range_start:d("bg-accent rounded-l-md",s.range_start),range_middle:d("rounded-none",s.range_middle),range_end:d("bg-accent rounded-r-md",s.range_end),today:d("bg-accent text-accent-foreground rounded-md data-[selected=true]:rounded-none",s.today),outside:d("text-muted-foreground aria-selected:text-muted-foreground",s.outside),disabled:d("text-muted-foreground opacity-50",s.disabled),hidden:d("invisible",s.hidden),...t},components:{Root:({className:c,rootRef:l,...m})=>v__namespace.createElement("div",{"data-slot":"calendar",ref:l,className:d(c),...m}),Chevron:({className:c,orientation:l,...m})=>l==="left"?v__namespace.createElement(lucideReact.ChevronLeftIcon,{className:d("size-4",c),...m}):l==="right"?v__namespace.createElement(lucideReact.ChevronRightIcon,{className:d("size-4",c),...m}):v__namespace.createElement(lucideReact.ChevronDownIcon,{className:d("size-4",c),...m}),DayButton:fl,WeekNumber:({children:c,...l})=>v__namespace.createElement("td",{...l},v__namespace.createElement("div",{className:"flex size-[--cell-size] items-center justify-center text-center"},c)),...i},...p})}function fl({className:e,day:t,modifiers:o,...r}){let n=reactDayPicker.getDefaultClassNames(),a=v__namespace.useRef(null);return v__namespace.useEffect(()=>{o.focused&&a.current?.focus();},[o.focused]),v__namespace.createElement(dt,{ref:a,variant:"ghost",size:"icon","data-day":`${t.date.getFullYear()}-${String(t.date.getMonth()+1).padStart(2,"0")}-${String(t.date.getDate()).padStart(2,"0")}`,"data-selected-single":o.selected&&!o.range_start&&!o.range_end&&!o.range_middle,"data-range-start":o.range_start,"data-range-end":o.range_end,"data-range-middle":o.range_middle,className:d("hover:bg-accent/40 hover:text-foreground","data-[selected-single=true]:bg-primary data-[selected-single=true]:text-primary-foreground data-[range-middle=true]:bg-accent data-[range-middle=true]:text-accent-foreground data-[range-start=true]:bg-primary data-[range-start=true]:text-primary-foreground data-[range-end=true]:bg-primary data-[range-end=true]:text-primary-foreground group-data-[focused=true]/day:border-ring group-data-[focused=true]/day:ring-ring/50 flex aspect-square h-auto w-full min-w-[--cell-size] flex-col gap-1 font-normal leading-none data-[range-end=true]:rounded-md data-[range-middle=true]:rounded-none data-[range-start=true]:rounded-md group-data-[focused=true]/day:relative group-data-[focused=true]/day:z-10 group-data-[focused=true]/day:ring-[3px] [&>span]:text-xs [&>span]:opacity-70",n.day,e),...r})}var dn=v__namespace.createContext(null);function Tr(e){let t=v__namespace.useContext(dn);if(!t)throw new Error(`<${e}> must be rendered inside a <Carousel> root.`);return t}var zu=5e3,po=v__namespace.forwardRef(({loop:e=true,align:t="start",slidesPerView:o=1,autoplay:r=false,draggable:n=true,onSlideChange:a,className:i,style:p,children:s,...c},l)=>{let m=v__namespace.useMemo(()=>({loop:e,align:t,slidesToScroll:1,watchDrag:n,containScroll:e?false:"trimSnaps"}),[e,t,n]),[u,g]=Iu__default.default(m),[h,f]=v__namespace.useState(0),[b,y]=v__namespace.useState(0),[R,w]=v__namespace.useState(false),[x,S]=v__namespace.useState(false),M=v__namespace.useRef(new Map),A=v__namespace.useRef(a);A.current=a;let H=v__namespace.useMemo(()=>r?r===true?{}:r:null,[r]);v__namespace.useEffect(()=>{if(!g)return;let k=()=>{f(g.selectedScrollSnap()),y(g.scrollSnapList().length),w(g.canScrollPrev()),S(g.canScrollNext()),A.current?.(g.selectedScrollSnap());};return k(),g.on("select",k),g.on("reInit",k),()=>{g.off("select",k),g.off("reInit",k);}},[g]);let W=v__namespace.useCallback(k=>{g&&g.selectedScrollSnap()===k&&g.scrollNext();},[g]),z=v__namespace.useRef(false),F=v__namespace.useRef(true),B=v__namespace.useRef(null);v__namespace.useImperativeHandle(l,()=>B.current),v__namespace.useEffect(()=>{if(!H?.pauseWhenOffscreen){F.current=true;return}let k=B.current;if(!k||typeof IntersectionObserver>"u")return;let G=new IntersectionObserver(he=>{F.current=he.some(I=>I.isIntersecting);},{threshold:.25});return G.observe(k),()=>G.disconnect()},[H?.pauseWhenOffscreen]),v__namespace.useEffect(()=>{if(!g||!H)return;let k=null,G=()=>{k&&clearTimeout(k);let Y=g.selectedScrollSnap(),ae=M.current.get(Y)??H.delay??zu;k=setTimeout(()=>{if(z.current||!F.current){G();return}g.scrollNext();},ae);},he=()=>G(),I=()=>{k&&clearTimeout(k);},j=()=>G();return g.on("select",he),g.on("pointerDown",I),g.on("settle",j),G(),()=>{k&&clearTimeout(k),g.off("select",he),g.off("pointerDown",I),g.off("settle",j);}},[g,H]);let q=()=>{H?.pauseOnHover!==false&&(z.current=true);},ie=()=>{z.current=false;},N=v__namespace.useMemo(()=>({api:g,selectedIndex:h,slideCount:b,canScrollPrev:R,canScrollNext:x,durationsRef:M,advanceFromSlide:W}),[g,h,b,R,x,W]),ue=`calc(100% / ${o})`;return v__namespace.createElement(dn.Provider,{value:N},v__namespace.createElement("div",{ref:B,"data-gds-part":"carousel",className:d("relative",i),style:{"--gds-carousel-slide-basis":ue,...p},onMouseEnter:q,onMouseLeave:ie,...c},v__namespace.createElement("div",{ref:u,"data-gds-part":"carousel-viewport",className:"overflow-hidden",style:{borderRadius:"var(--gds-carousel-radius, var(--gds-media-radius, 0.5rem))"}},v__namespace.createElement("div",{"data-gds-part":"carousel-track",className:"flex",style:{gap:"var(--gds-carousel-gap, 0)",touchAction:"pan-y pinch-zoom"}},s))))});po.displayName="Carousel";var da=v__namespace.forwardRef(({duration:e,className:t,style:o,children:r,...n},a)=>{let{durationsRef:i}=Tr("Carousel.Slide"),p=v__namespace.useRef(null);return v__namespace.useImperativeHandle(a,()=>p.current),v__namespace.useEffect(()=>{if(e==null)return;let s=p.current;if(!s?.parentElement)return;let c=Array.from(s.parentElement.children).indexOf(s);if(c<0)return;let l=i.current;return l.set(c,e),()=>{l.delete(c);}},[e,i]),v__namespace.createElement("div",{ref:p,"data-gds-part":"carousel-slide",className:d("min-w-0 shrink-0 grow-0",t),style:{flexBasis:"var(--gds-carousel-slide-basis, 100%)",...o},...n},r)});da.displayName="Carousel.Slide";var cn=v__namespace.forwardRef(({src:e,poster:t,alt:o,controls:r=false,loop:n=true,fit:a="cover",duration:i,className:p,style:s,...c},l)=>{let{api:m,selectedIndex:u,advanceFromSlide:g}=Tr("Carousel.VideoSlide"),h=v__namespace.useRef(null),f=v__namespace.useRef(null);v__namespace.useImperativeHandle(l,()=>h.current);let[b,y]=v__namespace.useState(null);v__namespace.useEffect(()=>{let w=h.current;w?.parentElement&&y(Array.from(w.parentElement.children).indexOf(w));},[m]);let R=b!=null&&b===u;return v__namespace.useEffect(()=>{let w=f.current;if(w)if(R){let x=w.play();x&&typeof x.catch=="function"&&x.catch(()=>{});}else w.pause(),w.currentTime=0;},[R]),v__namespace.createElement(da,{ref:h,duration:i,className:d("relative overflow-hidden bg-[var(--gds-media-placeholder-bg)]",p),style:s,"data-gds-part":"carousel-video-slide",...c},t&&v__namespace.createElement("img",{src:t,alt:o??"","aria-hidden":R,className:"absolute inset-0 h-full w-full",style:{objectFit:a,opacity:R?0:1,transition:"opacity var(--gds-carousel-fade-ms, 200ms) ease-out"}}),v__namespace.createElement("video",{ref:f,src:e,muted:true,playsInline:true,loop:n,controls:r,preload:"metadata","aria-label":o,className:"block h-full w-full",style:{objectFit:a,opacity:R?1:0,transition:"opacity var(--gds-carousel-fade-ms, 200ms) ease-out"},onEnded:()=>{n||b!=null&&g(b);}}))});cn.displayName="Carousel.VideoSlide";var pn=v__namespace.forwardRef(({position:e="below",renderDot:t,className:o,style:r,...n},a)=>{let{api:i,selectedIndex:p,slideCount:s}=Tr("Carousel.Dots");if(s<=1)return null;let c=Array.from({length:s},(m,u)=>u),l=e==="overlay"?{position:"absolute",insetInlineStart:0,insetInlineEnd:0,bottom:"var(--gds-carousel-dots-inset, 0.75rem)",zIndex:1}:{marginBlockStart:"var(--gds-carousel-dots-gap, 0.75rem)"};return v__namespace.createElement("div",{ref:a,"data-gds-part":"carousel-dots",className:d("flex items-center justify-center",o),style:{gap:"var(--gds-carousel-dots-spacing, 0.5rem)",...l,...r},...n},c.map(m=>{let u=m===p,g=()=>i?.scrollTo(m);return t?t({index:m,active:u,onClick:g}):v__namespace.createElement("button",{key:m,type:"button",onClick:g,"aria-label":`Go to slide ${m+1}`,"aria-current":u?"true":void 0,"data-active":u||void 0,className:"rounded-full transition-all",style:{width:u?"var(--gds-carousel-dot-active-width, 1.25rem)":"var(--gds-carousel-dot-size, 0.5rem)",height:"var(--gds-carousel-dot-size, 0.5rem)",background:u?"var(--gds-carousel-dot-active-color, oklch(var(--primary)))":"var(--gds-carousel-dot-color, oklch(var(--muted-foreground) / 0.4))"}})}))});pn.displayName="Carousel.Dots";var un=v__namespace.forwardRef(({position:e="overlay",className:t,style:o,...r},n)=>e==="outside"?v__namespace.createElement("div",{ref:n,"data-gds-part":"carousel-arrows",className:d("flex items-center justify-end gap-2 pt-2",t),style:o,...r},v__namespace.createElement(kr,null),v__namespace.createElement(Cr,null)):v__namespace.createElement("div",{ref:n,"data-gds-part":"carousel-arrows",className:d("pointer-events-none absolute inset-0 z-[1]",t),style:o,...r},v__namespace.createElement(kr,{className:"pointer-events-auto absolute left-[var(--gds-carousel-arrow-inset,0.75rem)] top-1/2 -translate-y-1/2"}),v__namespace.createElement(Cr,{className:"pointer-events-auto absolute right-[var(--gds-carousel-arrow-inset,0.75rem)] top-1/2 -translate-y-1/2"})));un.displayName="Carousel.Arrows";var kr=v__namespace.forwardRef(({className:e,style:t,children:o,...r},n)=>{let{api:a,canScrollPrev:i}=Tr("Carousel.Prev");return v__namespace.createElement("button",{ref:n,type:"button","data-gds-part":"carousel-prev","aria-label":"Previous slide",disabled:!i,onClick:()=>a?.scrollPrev(),className:d("inline-flex items-center justify-center rounded-full","transition disabled:opacity-40 disabled:cursor-not-allowed","hover:[background:var(--gds-carousel-arrow-hover-bg,oklch(var(--background)))]",e),style:{width:"var(--gds-carousel-arrow-size, 2.25rem)",height:"var(--gds-carousel-arrow-size, 2.25rem)",background:"var(--gds-carousel-arrow-bg, oklch(var(--background) / 0.85))",color:"var(--gds-carousel-arrow-fg, oklch(var(--foreground)))",backdropFilter:"var(--gds-carousel-arrow-backdrop, blur(6px))",boxShadow:"var(--gds-carousel-arrow-shadow, 0 2px 8px oklch(0 0 0 / 0.12))",...t},...r},o??v__namespace.createElement(lucideReact.ChevronLeft,{className:"h-4 w-4","aria-hidden":true}))});kr.displayName="Carousel.Prev";var Cr=v__namespace.forwardRef(({className:e,style:t,children:o,...r},n)=>{let{api:a,canScrollNext:i}=Tr("Carousel.Next");return v__namespace.createElement("button",{ref:n,type:"button","data-gds-part":"carousel-next","aria-label":"Next slide",disabled:!i,onClick:()=>a?.scrollNext(),className:d("inline-flex items-center justify-center rounded-full","transition disabled:opacity-40 disabled:cursor-not-allowed","hover:[background:var(--gds-carousel-arrow-hover-bg,oklch(var(--background)))]",e),style:{width:"var(--gds-carousel-arrow-size, 2.25rem)",height:"var(--gds-carousel-arrow-size, 2.25rem)",background:"var(--gds-carousel-arrow-bg, oklch(var(--background) / 0.85))",color:"var(--gds-carousel-arrow-fg, oklch(var(--foreground)))",backdropFilter:"var(--gds-carousel-arrow-backdrop, blur(6px))",boxShadow:"var(--gds-carousel-arrow-shadow, 0 2px 8px oklch(0 0 0 / 0.12))",...t},...r},o??v__namespace.createElement(lucideReact.ChevronRight,{className:"h-4 w-4","aria-hidden":true}))});Cr.displayName="Carousel.Next";po.Slide=da;po.VideoSlide=cn;po.Dots=pn;po.Arrows=un;po.Prev=kr;po.Next=Cr;var _u=po;function Bu(){return v__namespace.useContext(dn)?.api}var hl=v__namespace.forwardRef(({className:e,surface:t="solid",...o},r)=>v__namespace.createElement("div",{ref:r,"data-gds-part":"card","data-surface":t,className:d("gds-card rounded-xl border text-card-foreground shadow",At(t,"bg-card"),ht[t],e),...o}));hl.displayName="Card";var bl=v__namespace.forwardRef(({className:e,...t},o)=>v__namespace.createElement("div",{ref:o,"data-gds-part":"card-header",className:d("flex flex-col space-y-1.5 p-6",e),...t}));bl.displayName="CardHeader";var vl=v__namespace.forwardRef(({className:e,...t},o)=>v__namespace.createElement("div",{ref:o,"data-gds-part":"card-title",className:d("font-semibold leading-none tracking-tight",e),...t}));vl.displayName="CardTitle";var yl=v__namespace.forwardRef(({className:e,...t},o)=>v__namespace.createElement("div",{ref:o,"data-gds-part":"card-description",className:d("text-sm text-muted-foreground",e),...t}));yl.displayName="CardDescription";var xl=v__namespace.forwardRef(({className:e,...t},o)=>v__namespace.createElement("div",{ref:o,"data-gds-part":"card-content",className:d("p-6 pt-0",e),...t}));xl.displayName="CardContent";var wl=v__namespace.forwardRef(({className:e,...t},o)=>v__namespace.createElement("div",{ref:o,"data-gds-part":"card-footer",className:d("flex items-center p-6 pt-0",e),...t}));wl.displayName="CardFooter";var Rl=v__namespace.forwardRef(({className:e,...t},o)=>v__namespace.createElement(Pr__namespace.Root,{ref:o,className:d("gds-checkbox peer h-4 w-4 shrink-0 rounded-[3px] border border-primary ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground",e),...t},v__namespace.createElement(Pr__namespace.Indicator,{className:d("flex items-center justify-center text-current")},v__namespace.createElement(lucideReact.Check,{className:"h-4 w-4"}))));Rl.displayName=Pr__namespace.Root.displayName;var mn=v__namespace.createContext(null),ca=v__namespace.forwardRef(({className:e,...t},o)=>{let r=v__namespace.useContext(mn);return v__namespace.createElement("label",{ref:o,htmlFor:r?.controlId,className:d("text-sm font-medium leading-none text-foreground cursor-pointer peer-disabled:cursor-not-allowed peer-disabled:opacity-70",e),...t})});ca.displayName="Field.Label";var pa=v__namespace.forwardRef(({className:e,...t},o)=>{let r=v__namespace.useContext(mn);return v__namespace.createElement("p",{ref:o,id:r?.descriptionId,className:d("text-sm text-muted-foreground",e),...t})});pa.displayName="Field.Description";var ua=v__namespace.forwardRef(({className:e,...t},o)=>v__namespace.createElement("div",{ref:o,className:d("flex shrink-0 items-center gap-2",e),...t}));ua.displayName="Field.Trailing";var Sl=v__namespace.forwardRef(({layout:e="option",className:t,children:o,...r},n)=>{let a=v__namespace.useId(),i=null,p=null,s=null,c=null;v__namespace.Children.forEach(o,y=>{v__namespace.isValidElement(y)&&(y.type===ca?i=y:y.type===pa?p=y:y.type===ua?s=y:c||(c=y));});let l=c,m=l?.props??{},u=m.id??`${a}-control`,g=p?`${a}-description`:void 0,h=[m["aria-describedby"],g].filter(Boolean).join(" ")||void 0,f=l?v__namespace.cloneElement(l,{id:u,"aria-describedby":h}):null,b=v__namespace.createElement("div",{className:"flex min-w-0 flex-col gap-0.5"},i,p);return v__namespace.createElement(mn.Provider,{value:{controlId:u,descriptionId:g}},v__namespace.createElement("div",{ref:n,"data-gds-part":"field","data-layout":e,className:d("flex gap-3",e==="setting"?"items-center justify-between":"items-start",t),...r},e==="setting"?v__namespace.createElement(v__namespace.Fragment,null,b,v__namespace.createElement("div",{className:"flex shrink-0 items-center gap-2"},s,f)):v__namespace.createElement(v__namespace.Fragment,null,v__namespace.createElement("div",{className:"mt-0.5 shrink-0"},f),v__namespace.createElement("div",{className:"flex min-w-0 flex-1 flex-col gap-0.5"},i,p),s)))});Sl.displayName="Field";var Vu=Object.assign(Sl,{Label:ca,Description:pa,Trailing:ua});function gn({label:e,description:t,aside:o,hideIndicator:r,indicatorPosition:n="trailing",titleId:a,descriptionId:i,indicator:p,children:s}){let c=s!=null?v__namespace.createElement("div",{className:"gds-selection-card__slot"},s):v__namespace.createElement("div",{className:"gds-selection-card__content"},e!=null&&v__namespace.createElement("span",{id:a,className:"gds-selection-card__title"},e),t!=null&&v__namespace.createElement("span",{id:i,className:"gds-selection-card__desc"},t)),l=r?null:p;return n==="leading"?v__namespace.createElement(v__namespace.Fragment,null,l,c,o):v__namespace.createElement(v__namespace.Fragment,null,c,o,l)}var Wu=v__namespace.createElement("span",{className:"gds-selection-indicator gds-selection-indicator--radio","aria-hidden":true},v__namespace.createElement(ho__namespace.Indicator,{className:"gds-selection-indicator__dot"})),ju=v__namespace.createElement("span",{className:"gds-selection-indicator gds-selection-indicator--checkbox","aria-hidden":true},v__namespace.createElement(Pr__namespace.Indicator,{className:"gds-selection-indicator__check"},v__namespace.createElement(lucideReact.Check,{className:"h-3.5 w-3.5",strokeWidth:3}))),$u=v__namespace.createElement("span",{className:"gds-selection-indicator gds-selection-indicator--switch","aria-hidden":true},v__namespace.createElement(Br__namespace.Thumb,{className:"gds-selection-indicator__thumb"})),kl=v__namespace.forwardRef(({className:e,label:t,description:o,aside:r,hideIndicator:n,indicatorPosition:a="trailing",children:i,...p},s)=>{let c=v__namespace.useId(),l=t!=null?`${c}-t`:void 0,m=o!=null?`${c}-d`:void 0;return v__namespace.createElement(ho__namespace.Item,{ref:s,"data-gds-part":"radio-card","data-indicator":a,"aria-labelledby":l,"aria-describedby":m,className:d("gds-selection-card",e),...p},v__namespace.createElement(gn,{label:t,description:o,aside:r,hideIndicator:n,indicatorPosition:a,titleId:l,descriptionId:m,indicator:Wu},i))});kl.displayName="RadioCard";var Cl=v__namespace.forwardRef(({className:e,label:t,description:o,aside:r,hideIndicator:n,indicatorPosition:a="trailing",children:i,...p},s)=>{let c=v__namespace.useId(),l=t!=null?`${c}-t`:void 0,m=o!=null?`${c}-d`:void 0;return v__namespace.createElement(Pr__namespace.Root,{ref:s,"data-gds-part":"checkbox-card","data-indicator":a,"aria-labelledby":l,"aria-describedby":m,className:d("gds-selection-card",e),...p},v__namespace.createElement(gn,{label:t,description:o,aside:r,hideIndicator:n,indicatorPosition:a,titleId:l,descriptionId:m,indicator:ju},i))});Cl.displayName="CheckboxCard";var Tl=v__namespace.forwardRef(({className:e,label:t,description:o,aside:r,hideIndicator:n,indicatorPosition:a="trailing",children:i,...p},s)=>{let c=v__namespace.useId(),l=t!=null?`${c}-t`:void 0,m=o!=null?`${c}-d`:void 0;return v__namespace.createElement(Br__namespace.Root,{ref:s,"data-gds-part":"switch-card","data-indicator":a,"aria-labelledby":l,"aria-describedby":m,className:d("gds-selection-card",e),...p},v__namespace.createElement(gn,{label:t,description:o,aside:r,hideIndicator:n,indicatorPosition:a,titleId:l,descriptionId:m,indicator:$u},i))});Tl.displayName="SwitchCard";var Qo={slow:{tokenStagger:70,lineStagger:200,preDelay:500,fadeMs:480},normal:{tokenStagger:22,lineStagger:55,preDelay:200,fadeMs:280},fast:{tokenStagger:8,lineStagger:18,preDelay:60,fadeMs:160}},ha=.55;function we(e,t){return e<=0?Promise.resolve():new Promise((o,r)=>{if(t?.aborted){r(new DOMException("Aborted","AbortError"));return}let n=window.setTimeout(()=>{t?.removeEventListener("abort",a),o();},e),a=()=>{window.clearTimeout(n),r(new DOMException("Aborted","AbortError"));};t?.addEventListener("abort",a,{once:true});})}async function ba(e,t,o=22,r){if(o<=0){t(e);return}for(let n=1;n<=e.length;n++)t(e.slice(0,n)),n<e.length&&await we(o,r);}function fn(e){return e instanceof DOMException&&e.name==="AbortError"}var Mr="data-motion",Pl="off",Ml="(prefers-reduced-motion: reduce)";function Uu(){if(typeof window>"u"||typeof document>"u")return false;let e=window.matchMedia(Ml).matches,t=document.documentElement.getAttribute(Mr)===Pl;return e||t}function Jt(){let[e,t]=v__namespace.useState(false);return v__namespace.useEffect(()=>{let o=()=>t(Uu());o();let r=window.matchMedia(Ml);r.addEventListener("change",o);let n=new MutationObserver(o);return n.observe(document.documentElement,{attributes:true,attributeFilter:[Mr]}),()=>{r.removeEventListener("change",o),n.disconnect();}},[]),e}var uo=Jt;function Nr(){let[e,t]=v__namespace.useState(true);return v__namespace.useEffect(()=>{let o=window.self!==window.top,r=()=>document.visibilityState!=="hidden"&&(o||document.hasFocus()),n=()=>t(r());return n(),document.addEventListener("visibilitychange",n),window.addEventListener("focus",n),window.addEventListener("blur",n),window.addEventListener("pageshow",n),()=>{document.removeEventListener("visibilitychange",n),window.removeEventListener("focus",n),window.removeEventListener("blur",n),window.removeEventListener("pageshow",n);}},[]),e}function Ku(e){if(typeof document>"u")return;let t=document.documentElement;e?t.removeAttribute(Mr):t.setAttribute(Mr,Pl);}var qu=2e3,Zu={tokenStagger:0,lineStagger:0,preDelay:0,fadeMs:0};function mo(e){let{steps:t,interpret:o,speed:r="normal",trigger:n="mount",play:a,loop:i=false,loopDelay:p=qu,maxLoops:s=1/0,containerRef:c,onComplete:l,onLoopReset:m}=e,u=Jt(),g=u?Zu:Qo[r],h=u?false:i,f=Nr(),[b,y]=v__namespace.useState(false),[R,w]=v__namespace.useState(false),[x,S]=v__namespace.useState(-1),M=v__namespace.useRef(null),A=react.useInView(c??M,{once:true,amount:ha}),H=react.useInView(c??M,{amount:ha}),W=f&&(c?H:true),[z,F]=v__namespace.useState(0),B=v__namespace.useMemo(()=>n==="mount"?true:n==="inView"?A:!!a||z>0,[n,A,a,z]),q=v__namespace.useRef(o);q.current=o;let ie=v__namespace.useRef(l);ie.current=l;let N=v__namespace.useRef(m);N.current=m;let ue=v__namespace.useRef(null),k=v__namespace.useRef(null),G=v__namespace.useCallback(()=>{ue.current?.abort(),ue.current=null,k.current!==null&&(window.clearTimeout(k.current),k.current=null),y(false);},[]),he=v__namespace.useCallback(()=>{F(j=>j+1);},[]),I=v__namespace.useCallback((j=0)=>{if(ue.current?.abort(),ue.current=null,k.current!==null&&(window.clearTimeout(k.current),k.current=null),j>0){k.current=window.setTimeout(()=>{k.current=null,F(Y=>Y+1);},j);return}F(Y=>Y+1);},[]);return v__namespace.useEffect(()=>()=>{k.current!==null&&(window.clearTimeout(k.current),k.current=null);},[]),v__namespace.useEffect(()=>{if(!t||t.length===0||!u&&(!B||!W))return;let j=new AbortController;ue.current=j;let{signal:Y}=j,U={speed:g,signal:Y,cancelled:()=>Y.aborted,reduced:u},xe=true,E=0;return (async()=>{do{y(true),w(false),S(-1);try{await we(n==="inView"?g.preDelay:0,Y);for(let X=0;X<t.length;X++){if(Y.aborted)return;S(X),await q.current(t[X],U);}if(Y.aborted)return;if(S(-1),w(!0),ie.current?.(),E+=1,!h||E>=s){y(!1);return}if(await we(p,Y),Y.aborted)return;N.current?.();}catch(X){if(fn(X))return;process.env.NODE_ENV!=="production"&&console.error("[useScriptedDemo] step error:",X),y(false);return}}while(xe&&h&&!Y.aborted)})(),()=>{xe=false,j.abort(),ue.current===j&&(ue.current=null);}},[t,B,W,h,p,g,n,z,u]),{isPlaying:b,isComplete:R,currentIndex:x,play:he,stop:G,restart:I}}var ya=v__namespace.forwardRef(function({variant:t="inline",className:o,...r},n){return v__namespace.createElement("span",{ref:n,"data-gds-part":"demo-cursor","data-gds-variant":t,"aria-hidden":true,className:d("gds-demo-cursor",o),...r})});var El=v__namespace.createContext({visible:new Set,hasStage:false,reducedMotion:false,defaultAnimation:"fade-up"});function Ll({steps:e,speed:t="normal",trigger:o="mount",play:r,loop:n=false,defaultAnimation:a="fade-up",visibleWhenIdle:i=true,className:p,children:s}){let c=react.useReducedMotion()??false,l=v__namespace.useRef(null),[m,u]=v__namespace.useState(()=>new Set),g=!!(e&&e.length);mo({steps:g?e:void 0,speed:t,trigger:o,play:r,loop:n,containerRef:l,onLoopReset:()=>u(new Set),interpret:async(b,y)=>{if(b.type==="wait")return we(b.ms,y.signal);if(b.type==="reset")return u(new Set),we(y.speed.preDelay,y.signal);if(b.type==="reveal")return u(R=>{if(R.has(b.target))return R;let w=new Set(R);return w.add(b.target),w}),we(y.speed.lineStagger,y.signal);if(b.type==="reveal-all")return u(R=>{let w=new Set(R);return w.add("__all__"),w}),we(y.speed.lineStagger,y.signal);if(b.type==="hide")return u(R=>{if(!R.has(b.target))return R;let w=new Set(R);return w.delete(b.target),w}),we(y.speed.fadeMs,y.signal)}});let h=v__namespace.useMemo(()=>({visible:g?m:new Set(["__all__"]),hasStage:true,reducedMotion:c,defaultAnimation:a}),[g,m,c,a]),f=!g&&!i?{...h,visible:new Set}:h;return v__namespace.createElement("div",{ref:l,"data-gds-part":"demo-stage","data-gds-stage-playing":g?"true":"false",className:p},v__namespace.createElement(El.Provider,{value:f},s))}var Ju={fade:{initial:{opacity:0},animate:{opacity:1}},"fade-up":{initial:{opacity:0,y:12},animate:{opacity:1,y:0}},"fade-down":{initial:{opacity:0,y:-12},animate:{opacity:1,y:0}},"fade-left":{initial:{opacity:0,x:12},animate:{opacity:1,x:0}},"fade-right":{initial:{opacity:0,x:-12},animate:{opacity:1,x:0}},scale:{initial:{opacity:0,scale:.96},animate:{opacity:1,scale:1}},none:{initial:{opacity:1},animate:{opacity:1}}};function Dl({id:e,animation:t,durationMs:o,hideOutsideStage:r=false,onReveal:n,onHide:a,className:i,children:p}){let s=v__namespace.useContext(El),c=s.hasStage?s.visible.has("__all__")||s.visible.has(e):!r,l=v__namespace.useRef(c),m=v__namespace.useRef(n),u=v__namespace.useRef(a);m.current=n,u.current=a,v__namespace.useEffect(()=>{c!==l.current&&(l.current=c,c?m.current?.():u.current?.());},[c]);let g=t??s.defaultAnimation,h=Ju[g],f=(o??280)/1e3;return s.reducedMotion?v__namespace.createElement("div",{"data-gds-part":"reveal","data-gds-reveal-id":e,"data-gds-revealed":c?"true":"false",className:i,style:{opacity:c?1:0}},p):v__namespace.createElement(react.motion.div,{"data-gds-part":"reveal","data-gds-reveal-id":e,"data-gds-revealed":c?"true":"false",className:i,initial:h.initial,animate:c?h.animate:h.initial,transition:{duration:f,ease:[.22,1,.36,1]}},p)}var tm={xs:"text-xs",sm:"text-sm",md:"text-base"},om={slow:{lineStagger:200,tokenStagger:70,preDelay:500,fadeMs:480},normal:{lineStagger:55,tokenStagger:22,preDelay:200,fadeMs:280},fast:{lineStagger:18,tokenStagger:8,preDelay:60,fadeMs:160}},rm={plain:{color:"var(--gds-code-fg)",backgroundColor:"transparent"},styles:[{types:["comment","prolog","doctype","cdata"],style:{color:"var(--gds-code-comment)",fontStyle:"normal"}},{types:["punctuation"],style:{color:"var(--gds-code-punctuation)"}},{types:["property","constant","symbol","deleted"],style:{color:"var(--gds-code-property)"}},{types:["boolean","number"],style:{color:"var(--gds-code-number)"}},{types:["selector","attr-name","string","char","builtin","inserted"],style:{color:"var(--gds-code-string)"}},{types:["operator","entity","url"],style:{color:"var(--gds-code-operator)"}},{types:["atrule","keyword"],style:{color:"var(--gds-code-keyword)"}},{types:["function","class-name"],style:{color:"var(--gds-code-function)"}},{types:["regex","important","variable"],style:{color:"var(--gds-code-variable)"}},{types:["tag"],style:{color:"var(--gds-code-tag)"}},{types:["attr-name"],style:{color:"var(--gds-code-attr-name)"}},{types:["attr-value"],style:{color:"var(--gds-code-attr-value)"}}]};function am(e){let t=new Set;if(e==null)return t;let o=Array.isArray(e)?e:[e];for(let r of o)if(typeof r=="number")t.add(r);else if(Array.isArray(r)&&r.length===2){let[n,a]=r;for(let i=n;i<=a;i++)t.add(i);}return t}function nm(e,t,o){return t?.added?.includes(e)?"added":t?.removed?.includes(e)?"removed":o.has(e)?"highlight":"default"}var Il=v__namespace.forwardRef(function({source:t,language:o="tsx",highlight:r,diff:n,reveal:a="none",trigger:i="mount",play:p,speed:s="normal",delay:c,stagger:l,showLineNumbers:m=false,filename:u,wrap:g=false,bare:h=false,prompt:f,cursor:b,steps:y,loop:R=false,size:w="sm",height:x,maxLines:S,className:M,style:A,...H},W){let z=om[s],F=c??0,B=l??(a==="typewriter"?z.tokenStagger:z.lineStagger),q=!!(y&&y.length),[ie,N]=v__namespace.useState(""),[ue,k]=v__namespace.useState(()=>new Set),G=q?ie:t??"",he=v__namespace.useMemo(()=>G.replace(/\n$/,""),[G]),I=v__namespace.useMemo(()=>am(r),[r]),j=!!(n?.added?.length||n?.removed?.length),Y=m||j,ae=v__namespace.useRef(null);v__namespace.useImperativeHandle(W,()=>ae.current);let[U,xe]=v__namespace.useState(a==="none"),E=react.useInView(ae,{once:true,amount:.55}),me=i==="inView"?z.preDelay:0,X=i==="mount"?true:i==="inView"?E:!!p,Ke=B,ve=he.split(`
108
+ `).length,ke=a==="typewriter"?he.replace(/\s+/g," ").split(" ").length:ve,qe=me+F+ke*Ke+280;v__namespace.useEffect(()=>{if(q)return;if(!X||a==="none"){xe(a==="none");return}xe(false);let _=window.setTimeout(()=>xe(true),qe);return ()=>window.clearTimeout(_)},[X,a,qe,q]);let Ge=v__namespace.useRef(""),O=v__namespace.useRef(new Set),K=v__namespace.useCallback(_=>{Ge.current=_,N(_);},[]),V=v__namespace.useCallback(_=>{O.current=_,k(_);},[]),{isComplete:ge}=mo({steps:q?y:void 0,speed:s,trigger:"manual",play:X,loop:R,containerRef:ae,onLoopReset:()=>{K(""),V(new Set),xe(false);},interpret:async(_,Le)=>{let Ne=Le.signal;if(_.type==="wait")return we(_.ms,Ne);if(_.type==="clear"){K(""),V(new Set);return}if(_.type==="output"){let tt=Ge.current,Nt=tt.length>0&&!tt.endsWith(`
109
+ `)?tt+`
110
+ `:tt,pr=Nt+_.text,ur=Nt.split(`
111
+ `).length,on=_.text.split(`
112
+ `).length,mr=new Set(O.current);for(let jo=0;jo<on;jo++)mr.add(ur+jo);return K(pr),V(mr),K(pr+(pr.endsWith(`
113
113
  `)?"":`
114
- `)),fe(240,Mt)}let ir=oe.speed?qo[oe.speed].tokenStagger:Nt.speed.tokenStagger,vt=Ke.current,sr=vt.length>0&&!vt.endsWith(`
115
- `)?vt+`
116
- `:vt;await fe(60,Mt);for(let Ge=0;Ge<oe.text.length;Ge++){if(Mt.aborted)return;let yt=sr+oe.text.slice(0,Ge+1);Xt(yt),Ge<oe.text.length-1&&await fe(ir,Mt);}}});C__namespace.useEffect(()=>{Y&&me(bo);},[Y,bo]);let ue=h??(a==="typewriter"||Y);return C__namespace.createElement("div",{ref:B,"data-gds-part":"code","data-gds-reveal":a,"data-gds-trigger":i,"data-gds-size":y,className:l("gds-code relative w-full overflow-hidden",fm[y],!b&&["rounded-lg border bg-[var(--gds-code-bg)] text-[var(--gds-code-fg)]","border-border/60"],H),style:E,...D},g&&!b?C__namespace.createElement("div",{"data-gds-part":"code-header",className:"flex items-center justify-between border-b border-border/60 px-4 py-2 text-xs text-muted-foreground"},C__namespace.createElement("span",{className:"font-mono"},g),o?C__namespace.createElement("span",{className:"uppercase tracking-wider opacity-60"},o):null):null,C__namespace.createElement(prismReactRenderer.Highlight,{code:P,language:o,theme:bm},({tokens:oe,getLineProps:Nt,getTokenProps:Mt})=>C__namespace.createElement("pre",{"data-gds-part":"code-pre",className:l("font-mono leading-relaxed",b?"p-0":"px-0 py-3",u?"whitespace-pre-wrap break-words":"overflow-x-auto whitespace-pre",(S!==void 0||k!==void 0)&&"overflow-y-auto"),style:{background:"transparent",margin:0,...k!==void 0?{height:`calc(${k} * 1lh + 0.5rem)`}:S!==void 0&&S!=="auto"?{height:typeof S=="number"?`${S}px`:S}:null}},oe.map((ir,vt)=>{let sr=vt+1,Ge=ym(sr,n,te),yt=Nt({line:ir}),lr=vt===oe.length-1,dr=Y&&pe.has(sr),Ya=ue&&lr&&(!Le||h===true),cr=l("flex w-full pr-4",b?"pl-0":"pl-4",Ge==="added"&&"bg-[var(--gds-code-diff-added-bg)] text-[var(--gds-code-diff-added-fg)]",Ge==="removed"&&"bg-[var(--gds-code-diff-removed-bg)] text-[var(--gds-code-diff-removed-fg)]",Ge==="highlight"&&"bg-[var(--gds-code-line-highlight-bg)] shadow-[inset_2px_0_0_0_var(--gds-code-line-highlight-marker)]"),_o=C__namespace.createElement(C__namespace.Fragment,null,ne?C__namespace.createElement("span",{"data-gds-part":"code-gutter",className:l("select-none pr-3 text-right font-mono text-xs leading-relaxed opacity-60",se?"w-10":"w-8"),"aria-hidden":true},se?C__namespace.createElement("span",{className:"inline-block w-3 text-center"},Ge==="added"?"+":Ge==="removed"?"-":" "):null,m?C__namespace.createElement("span",{className:"ml-1 tabular-nums"},sr):null):null,C__namespace.createElement("span",{className:"flex-1",style:dr?{color:"var(--gds-code-comment)"}:void 0},f&&!dr?C__namespace.createElement("span",{"data-gds-part":"code-prompt","aria-hidden":true,className:"select-none opacity-60",style:{color:"var(--gds-code-comment)"}},f):null,a==="typewriter"&&Z&&!Y?C__namespace.createElement(xm,{line:ir,getTokenProps:Mt,delay:de+q+vt*$e,stagger:$e}):ir.map((ep,tp)=>C__namespace.createElement("span",{key:tp,...Mt({token:ep})})),Ya&&!dr?C__namespace.createElement(ua,{"data-gds-part":"code-cursor"}):null));return a==="none"||a==="typewriter"||Y||!Z?C__namespace.createElement("div",{key:vt,...yt,className:l(yt.className,cr),style:{...yt.style,opacity:i!=="mount"&&!Z&&a!=="none"?0:void 0}},_o):C__namespace.createElement(react.motion.div,{key:vt,...yt,className:l(yt.className,cr),initial:{opacity:0,y:a==="diff"?Ge==="removed"?-4:6:4},animate:{opacity:1,y:0},transition:{delay:(de+q+vt*$e)/1e3,duration:A.fadeMs/1e3,ease:[.22,1,.36,1]},style:yt.style},_o)}))))});Rl.displayName="Code";function xm({line:e,getTokenProps:t,delay:o,stagger:r}){let n=0;return C__namespace.createElement(C__namespace.Fragment,null,e.map((a,i)=>{let p=/^\s*$/.test(a.content),s=t({token:a});if(p)return C__namespace.createElement("span",{key:i,...s});let c=n++;return C__namespace.createElement(react.motion.span,{key:i,...s,initial:{opacity:0},animate:{opacity:1},transition:{delay:(o+c*r)/1e3,duration:.12}})}))}var wm={default:{row:"gap-3",content:"space-y-1",author:"text-sm font-semibold",meta:"text-xs",body:"text-sm leading-relaxed",thread:"text-xs"},compact:{row:"gap-2",content:"space-y-0.5",author:"text-xs font-semibold",meta:"text-[10px]",body:"text-xs leading-relaxed",thread:"text-[11px]"}},Rm=C__namespace.forwardRef(function({author:t,timestamp:o,avatar:r,badge:n,edited:a,pinned:i,actions:p,reactions:s,threadCount:c,onThreadClick:d,align:m="start",density:g="default",className:u,children:b,...f},h){let v=m==="end",w=a===true?"(edited)":a||void 0,y=wm[g];return C__namespace.createElement("div",{ref:h,"data-gds-part":"message","data-gds-align":m,"data-gds-density":g,"data-gds-pinned":i?"true":void 0,className:l("flex items-start",y.row,v&&"flex-row-reverse",u),...f},r&&C__namespace.createElement("div",{"data-gds-part":"message-avatar",className:"flex-shrink-0"},r),C__namespace.createElement("div",{"data-gds-part":"message-content",className:l("flex-1 min-w-0",y.content,v&&"text-right")},i&&C__namespace.createElement("div",{"data-gds-part":"message-pinned",className:l("flex items-center gap-1 text-[10px] uppercase tracking-wider text-muted-foreground",v&&"flex-row-reverse")},C__namespace.createElement("svg",{"aria-hidden":"true",viewBox:"0 0 16 16",className:"h-3 w-3",fill:"currentColor"},C__namespace.createElement("path",{d:"M9.828.722a.5.5 0 0 1 .707 0l4.743 4.743a.5.5 0 0 1 0 .707l-2.121 2.121a.5.5 0 0 1-.354.146h-1.792l-3.586 3.586v2.293a.5.5 0 0 1-.854.354L4.146 12.39 1 15.535V14.12l3.146-3.146-1.293-1.293a.5.5 0 0 1 .354-.854h2.293l3.586-3.586V3.45a.5.5 0 0 1 .146-.354L9.828.722Z"})),"Pinned"),C__namespace.createElement("div",{"data-gds-part":"message-header",className:l("flex items-baseline gap-2 flex-wrap",v&&"flex-row-reverse")},C__namespace.createElement("span",{"data-gds-part":"message-author",className:y.author},t),n&&C__namespace.createElement("div",{"data-gds-part":"message-badge"},n),o&&C__namespace.createElement("span",{"data-gds-part":"message-timestamp",className:l(y.meta,"text-muted-foreground")},o),w&&C__namespace.createElement("span",{"data-gds-part":"message-edited",className:l(y.meta,"text-muted-foreground")},w),p&&C__namespace.createElement("div",{"data-gds-part":"message-actions",className:l(v?"mr-auto":"ml-auto")},p)),C__namespace.createElement("div",{"data-gds-part":"message-body",className:y.body},b),s&&C__namespace.createElement("div",{"data-gds-part":"message-reactions",className:l("flex flex-wrap gap-1 pt-1",v&&"justify-end")},s),typeof c=="number"&&c>0&&C__namespace.createElement("button",{type:"button","data-gds-part":"message-thread",onClick:d,className:l("inline-flex items-center gap-1 font-medium",y.thread,"text-primary hover:underline","focus:outline-none focus-visible:ring-2 focus-visible:ring-primary rounded",v&&"flex-row-reverse")},C__namespace.createElement("svg",{"aria-hidden":"true",viewBox:"0 0 16 16",className:"h-3 w-3",fill:"currentColor"},C__namespace.createElement("path",{d:"M2 3a1 1 0 0 1 1-1h10a1 1 0 0 1 1 1v6a1 1 0 0 1-1 1H6.414l-2.707 2.707A1 1 0 0 1 2 12V3Z"})),c," ",c===1?"reply":"replies")))});function uu({onSubmit:e,enabled:t}){let[o]=LexicalComposerContext.useLexicalComposerContext();return C__namespace.useEffect(()=>{if(t)return o.registerCommand(lexical.KEY_ENTER_COMMAND,r=>r&&r.shiftKey?false:(r?.preventDefault(),e(),true),lexical.COMMAND_PRIORITY_HIGH)},[o,t,e]),null}function gu({onImageFiles:e,enabled:t}){let[o]=LexicalComposerContext.useLexicalComposerContext();return C__namespace.useEffect(()=>{if(!t)return;let r=o.getRootElement();if(!r)return;let n=a=>{let p=Array.from(a.clipboardData?.items??[]).filter(s=>s.kind==="file"&&s.type.startsWith("image/")).map(s=>s.getAsFile()).filter(s=>s!==null);p.length>0&&(a.preventDefault(),e(p));};return r.addEventListener("paste",n),()=>r.removeEventListener("paste",n)},[o,t,e]),null}function fu({enabled:e}){let[t]=LexicalComposerContext.useLexicalComposerContext();return C__namespace.useEffect(()=>{e&&t.focus();},[t,e]),null}var kl={bold:"bold",italic:"italic",underline:"underline",strikethrough:"strikethrough",code:"code"};function Cl(e,t){let o=kl[t];if(o){e.dispatchCommand(lexical.FORMAT_TEXT_COMMAND,o);return}if(t==="ul"){e.dispatchCommand(list.INSERT_UNORDERED_LIST_COMMAND,void 0);return}if(t==="ol"){e.dispatchCommand(list.INSERT_ORDERED_LIST_COMMAND,void 0);return}e.update(()=>{let r=lexical.$getSelection();if(lexical.$isRangeSelection(r)){if(t==="h1"||t==="h2"||t==="h3"){let n=t;selection.$setBlocksType(r,()=>richText.$createHeadingNode(n));return}(t==="blockquote"||t==="pullquote")&&selection.$setBlocksType(r,()=>{let n=richText.$createQuoteNode();return t==="pullquote"&&(n.__pullquote=true),n});}});}function hu(e,t,o,r){e.update(()=>{let n=lexical.$getSelection();if(!lexical.$isRangeSelection(n))return;let a=lexicalBeautifulMentions.$createBeautifulMentionNode(t,o,r);n.insertNodes([a]),n.insertText(" ");});}function bu(e,t){let o=false;return e.update(()=>{let r=lexical.$getRoot(),a=r.getTextContent().indexOf(t);if(a===-1)return;let i=0,p=null,s=0,c=null,d=0,m=g=>{if(!(p&&c)){if(g.getType()==="text"){let u=g,b=u.getTextContentSize(),f=i,h=i+b;!p&&a>=f&&a<h&&(p=u,s=a-f);let v=a+t.length;!c&&v>f&&v<=h&&(c=u,d=v-f),i=h;return}if("getChildren"in g)for(let u of g.getChildren())m(u);else i+=g.getTextContentSize();}};if(m(r),p&&c){let g=p,u=c;g.select(s,0).focus.set(u.getKey(),d,"text"),o=true;}}),o}function Cr(e){e.update(()=>{let t=lexical.$getRoot();t.clear();let o=lexical.$createParagraphNode();t.append(o),o.select();});}function Tl(e){let t="",o="",r=[];return e.getEditorState().read(()=>{t=lexical.$getRoot().getTextContent(),o=JSON.stringify(e.getEditorState().toJSON());let n=a=>{if(a.getType()==="beautifulMention"){let i=a;r.push({trigger:i.getTrigger(),value:i.getValue(),data:i.getData()});}if("getChildren"in a)for(let i of a.getChildren())n(i);};n(lexical.$getRoot());}),{text:t,json:o,mentions:r}}var vu=[{format:"bold",icon:lucideReact.Bold,label:"Bold"},{format:"italic",icon:lucideReact.Italic,label:"Italic"},{format:"underline",icon:lucideReact.Underline,label:"Underline"},{format:"strikethrough",icon:lucideReact.Strikethrough,label:"Strikethrough"},{format:"code",icon:lucideReact.Code,label:"Inline code"},{format:"h1",icon:lucideReact.Heading1,label:"Heading 1"},{format:"h2",icon:lucideReact.Heading2,label:"Heading 2"},{format:"h3",icon:lucideReact.Heading3,label:"Heading 3"},{format:"blockquote",icon:lucideReact.Quote,label:"Blockquote"},{format:"ul",icon:lucideReact.List,label:"Bulleted list"},{format:"ol",icon:lucideReact.ListOrdered,label:"Numbered list"}];function yu({formats:e}){let[t]=LexicalComposerContext.useLexicalComposerContext(),[o,r]=C__namespace.useState(()=>new Set);C__namespace.useEffect(()=>utils.mergeRegister(t.registerUpdateListener(({editorState:a})=>{a.read(()=>{let i=lexical.$getSelection();if(!lexical.$isRangeSelection(i))return;let p=new Set;for(let s of ["bold","italic","underline","strikethrough","code"])i.hasFormat(s)&&p.add(s);r(p);});})),[t]);let n=vu.filter(a=>e.includes(a.format));return C__namespace.createElement("div",{"data-gds-part":"composer-toolbar",className:l("flex flex-wrap items-center gap-0.5","px-2 py-1")},n.map(({format:a,icon:i,label:p})=>{let s=kl[a],c=s?o.has(s):false;return C__namespace.createElement("button",{key:a,type:"button","aria-label":p,title:p,"data-gds-part":"composer-toolbar-button","data-gds-active":c?"true":"false",onClick:()=>Cl(t,a),className:l("h-7 w-7 inline-flex items-center justify-center rounded","text-[var(--gds-composer-toolbar-fg)]","hover:bg-[var(--gds-composer-toolbar-hover-bg)]","focus:outline-none focus:ring-2 focus:ring-primary",c&&"bg-[var(--gds-composer-toolbar-active-bg)] text-[var(--gds-composer-toolbar-active-fg)]")},C__namespace.createElement(i,{className:"h-3.5 w-3.5"}))}))}function xu({attachments:e,onRemove:t}){return C__namespace.createElement(react.AnimatePresence,{initial:false},e.length>0&&C__namespace.createElement(react.motion.div,{initial:{opacity:0,height:0},animate:{opacity:1,height:"auto"},exit:{opacity:0,height:0},transition:{duration:.18},className:"overflow-hidden"},C__namespace.createElement("div",{"data-gds-part":"composer-attachments",className:"flex flex-wrap gap-2 px-2 py-2"},e.map(o=>C__namespace.createElement("div",{key:o.id,className:"relative group"},o.file.type.startsWith("image/")?C__namespace.createElement("img",{src:o.previewUrl,alt:o.name,className:"h-14 w-14 rounded-md object-cover border border-[var(--gds-composer-border)]"}):C__namespace.createElement("div",{className:"h-14 w-14 rounded-md border border-[var(--gds-composer-border)] flex items-center justify-center text-xs px-1 text-center text-[var(--gds-composer-muted-fg)]"},o.name.slice(0,18)),C__namespace.createElement("button",{type:"button",onClick:()=>t(o.id),"aria-label":`Remove ${o.name}`,className:l("absolute -top-1.5 -right-1.5 h-5 w-5 rounded-full","bg-[var(--gds-composer-chip-remove-bg)]","text-[var(--gds-composer-chip-remove-fg)]","flex items-center justify-center","opacity-0 group-hover:opacity-100 focus:opacity-100","focus:outline-none focus:ring-2 focus:ring-primary","transition-opacity")},C__namespace.createElement(lucideReact.X,{className:"w-3 h-3"})))))))}function wu({placeholder:e,triggers:t,attachmentsCfg:o,formatList:r,showToolbar:n,isLoading:a,onStop:i,maxLength:p,autoFocus:s,submitOnEnter:c=true,leftActions:d,rightActions:m,hideSend:g,steps:u,trigger:b="mount",play:f,speed:h="normal",loop:v=false,loopDelay:w,onLoopReset:y,bare:S,className:k,onSubmit:H,onChange:E,readOnly:D,handleEditorReady:U,submitRef:A,restartRef:q,attachments:F,setAttachments:Y,ingestImages:J}){let[z]=LexicalComposerContext.useLexicalComposerContext(),pe=C__namespace.useRef(null),x=C__namespace.useRef(null),[I,P]=C__namespace.useState(false);C__namespace.useEffect(()=>{U(z);},[z,U]),C__namespace.useEffect(()=>{z.setEditable(!D);},[z,D]);let te=C__namespace.useRef(E);te.current=E,C__namespace.useEffect(()=>z.registerUpdateListener(({editorState:L})=>{L.read(()=>{let de=lexical.$getRoot().getTextContent();P(de.trim().length>0),te.current?.(de);});}),[z]);let se=C__namespace.useCallback(()=>{if(a)return;let L=Tl(z),de=L.text.trim().length>0,Z=F.length>0;!de&&!Z||(H?.(L,Z?F:void 0),Cr(z),F.forEach($e=>URL.revokeObjectURL($e.previewUrl)),Y([]));},[z,a,F,H,Y]);A.current=se;let{restart:ne}=no({steps:u,speed:h,trigger:b,play:f,loop:v,loopDelay:w,containerRef:pe,onLoopReset:()=>{Cr(z),y?.();},interpret:async(L,de)=>{let Z=de.signal;if(L.type==="wait")return fe(L.ms,Z);if(L.type==="clear")return Cr(z),fe(120,Z);if(L.type==="newline")return z.update(()=>{let le=lexical.$getSelection();lexical.$isRangeSelection(le)&&le.insertParagraph();}),fe(60,Z);if(L.type==="submit")return se(),fe(120,Z);if(L.type==="format")return Cl(z,L.format),z.update(()=>{let le=lexical.$getSelection();if(!lexical.$isRangeSelection(le)||le.isCollapsed())return;let De=le.focus;le.anchor.set(De.key,De.offset,De.type);}),fe(80,Z);if(L.type==="select")return bu(z,L.text),fe(120,Z);if(L.type==="mention")return L.query&&(z.update(()=>{let le=lexical.$getSelection();lexical.$isRangeSelection(le)&&le.insertText(L.trigger);}),await pa(L.query,le=>{z.update(()=>{let De=lexical.$getRoot(),rt=De.getTextContent(),Ke=rt.slice(0,rt.length-L.trigger.length-(le.length-1));De.clear();let at=lexical.$createParagraphNode();Ke&&at.append(lexical.$createTextNode(Ke)),at.append(lexical.$createTextNode(L.trigger+le)),De.append(at);});},de.speed.tokenStagger,Z),await fe(180,Z),z.update(()=>{let le=lexical.$getRoot(),De=le.getTextContent(),rt=L.trigger.length+L.query.length,Ke=De.slice(0,De.length-rt);le.clear();let at=lexical.$createParagraphNode();Ke&&at.append(lexical.$createTextNode(Ke)),le.append(at),at.select();})),hu(z,L.trigger,L.value),fe(120,Z);let $e=L.speed?{slow:70,normal:22,fast:8}[L.speed]:de.speed.tokenStagger;for(let le=0;le<L.text.length;le++){if(Z.aborted)return;let De=L.text[le];z.update(()=>{let rt=lexical.$getSelection();if(!lexical.$isRangeSelection(rt)){lexical.$getRoot().selectEnd();let Ke=lexical.$getSelection();lexical.$isRangeSelection(Ke)&&Ke.insertText(De);return}rt.insertText(De);}),le<L.text.length-1&&await fe($e,Z);}}});C__namespace.useEffect(()=>{q.current=L=>{Cr(z),ne(L);};},[z,ne,q]);let B=!D&&!m&&!g,Le=!D&&!d&&o!==null,me=!D&&(Le||d||B||m);return C__namespace.createElement("div",{ref:pe,"data-gds-part":"composer","data-gds-loading":a?"true":"false",className:l("w-full",!S&&["rounded-md","bg-transparent","border border-input","shadow-sm","focus-within:outline-none focus-within:ring-1 focus-within:ring-ring","transition-colors"],k)},n&&C__namespace.createElement(yu,{formats:r}),o&&C__namespace.createElement(xu,{attachments:F,onRemove:L=>{Y(de=>{let Z=de.find($e=>$e.id===L);return Z&&URL.revokeObjectURL(Z.previewUrl),de.filter($e=>$e.id!==L)});}}),C__namespace.createElement("div",{className:"relative"},C__namespace.createElement(LexicalRichTextPlugin.RichTextPlugin,{contentEditable:C__namespace.createElement(LexicalContentEditable.ContentEditable,{"data-gds-part":"composer-editor",className:l("outline-none","px-3 sm:px-4 py-3","text-sm text-[var(--gds-composer-fg)]","min-h-[44px] max-h-[300px] overflow-y-auto","[&_p]:m-0 [&_p+p]:mt-2","[&_h1]:text-xl [&_h1]:font-semibold [&_h1]:mt-2","[&_h2]:text-lg [&_h2]:font-semibold [&_h2]:mt-2","[&_h3]:text-base [&_h3]:font-semibold [&_h3]:mt-2","[&_ul]:list-disc [&_ul]:pl-5 [&_ol]:list-decimal [&_ol]:pl-5","[&_blockquote]:border-l-2 [&_blockquote]:border-[var(--gds-composer-border)] [&_blockquote]:pl-3 [&_blockquote]:italic","[&_code]:bg-[var(--gds-composer-toolbar-active-bg)] [&_code]:px-1 [&_code]:py-0.5 [&_code]:rounded [&_code]:text-xs [&_code]:font-mono",a&&"opacity-60 pointer-events-none"),"aria-placeholder":e??"",placeholder:C__namespace.createElement("div",{"data-gds-part":"composer-placeholder",className:"absolute top-3 left-3 sm:left-4 text-sm text-muted-foreground pointer-events-none select-none"},e),spellCheck:true}),ErrorBoundary:LexicalErrorBoundary.LexicalErrorBoundary}),C__namespace.createElement(LexicalHistoryPlugin.HistoryPlugin,null),C__namespace.createElement(LexicalListPlugin.ListPlugin,null),C__namespace.createElement(LexicalLinkPlugin.LinkPlugin,null),C__namespace.createElement(LexicalOnChangePlugin.OnChangePlugin,{onChange:()=>{}}),C__namespace.createElement(fu,{enabled:!!s}),C__namespace.createElement(uu,{onSubmit:se,enabled:c}),o&&C__namespace.createElement(gu,{onImageFiles:J,enabled:true}),t.length>0&&C__namespace.createElement(lexicalBeautifulMentions.BeautifulMentionsPlugin,{items:t.reduce((L,de)=>(typeof de.items=="function"||(L[de.char]=de.items.map(Z=>({value:Z.value}))),L),{})})),me&&C__namespace.createElement("div",{"data-gds-part":"composer-actions",className:"flex items-center justify-between gap-2 px-2 pb-2 pt-1"},C__namespace.createElement("div",{className:"flex items-center gap-1"},d??(Le&&C__namespace.createElement("button",{type:"button",onClick:()=>x.current?.click(),disabled:a,"aria-label":"Attach image",title:"Attach image",className:l("h-8 w-8 rounded-lg flex items-center justify-center","text-[var(--gds-composer-action-fg)]","hover:text-[var(--gds-composer-fg)]","hover:bg-[var(--gds-composer-toolbar-hover-bg)]","focus:outline-none focus:ring-2 focus:ring-primary","transition-colors","disabled:opacity-50 disabled:cursor-not-allowed")},C__namespace.createElement(lucideReact.Paperclip,{className:"w-4 h-4"})))),m??(B&&C__namespace.createElement("button",{type:"button",onClick:a?i:se,disabled:a?!i:!I&&F.length===0,"aria-label":a?"Stop":"Send",className:l("h-8 w-8 rounded-lg flex items-center justify-center transition-colors flex-shrink-0","focus:outline-none focus:ring-2 focus:ring-primary",a?"bg-red-500 hover:bg-red-600 text-white disabled:opacity-50":I||F.length>0?"bg-primary hover:bg-primary/90 text-primary-foreground":"bg-[var(--gds-composer-toolbar-active-bg)] text-[var(--gds-composer-muted-fg)] cursor-not-allowed")},a?C__namespace.createElement(lucideReact.Square,{className:"w-3.5 h-3.5"}):C__namespace.createElement(lucideReact.Send,{className:"w-3.5 h-3.5"}))),o&&C__namespace.createElement("input",{ref:x,type:"file",accept:o.accept,multiple:o.multiple,onChange:L=>{L.target.files&&J(Array.from(L.target.files)),L.target.value="";},className:"sr-only",tabIndex:-1,"aria-hidden":"true"})))}var Pl=C__namespace.forwardRef(function(t,o){let{initialText:r,initialJson:n,formats:a,toolbar:i,triggers:p,attachments:s,...c}=t,d=C__namespace.useMemo(()=>a===false?[]:a??["bold","italic","underline","strikethrough","code","h1","h2","blockquote","ul","ol"],[a]),m=i===true||i==="top",g=C__namespace.useMemo(()=>{if(!s)return null;let A=s===true?{}:s;return A.enabled===false?null:{enabled:true,accept:A.accept??"image/*",maxItems:A.maxItems??10,multiple:A.multiple??true}},[s]),[u,b]=C__namespace.useState([]),f=C__namespace.useRef(u);f.current=u,C__namespace.useEffect(()=>()=>{f.current.forEach(A=>URL.revokeObjectURL(A.previewUrl));},[]);let h=C__namespace.useCallback(A=>{if(!g)return;let q=A.filter(F=>g.accept?g.accept==="image/*"?F.type.startsWith("image/"):g.accept.split(",").some(Y=>{let J=Y.trim();return J.endsWith("/*")?F.type.startsWith(J.slice(0,-1)):F.type===J||F.name.toLowerCase().endsWith(J)}):true);q.length!==0&&b(F=>{let Y=g.maxItems-F.length;if(Y<=0)return F;let J=q.slice(0,Y).map(z=>({id:`${z.name}-${z.size}-${Date.now()}-${Math.random().toString(36).slice(2,8)}`,file:z,previewUrl:URL.createObjectURL(z),name:z.name}));return [...F,...J]});},[g]),v=C__namespace.useRef(null),w=C__namespace.useRef(()=>{}),y=C__namespace.useRef(()=>{}),S=C__namespace.useCallback(A=>{v.current=A;},[]);C__namespace.useImperativeHandle(o,()=>({play:A=>{console.warn('[Composer] handle.play(steps) is not wired in v1 \u2014 pass `steps` + `trigger="manual"` and toggle `play` instead.');},stop:()=>{},restart:A=>y.current(A),focus:()=>v.current?.focus(),clear:()=>{let A=v.current;A&&Cr(A);},insert:A=>{v.current?.update(()=>{let q=lexical.$getSelection();lexical.$isRangeSelection(q)&&q.insertText(A);});},getContent:()=>v.current?Tl(v.current):{text:"",json:"",mentions:[]},getEditor:()=>v.current}),[]);let k=C__namespace.useMemo(()=>({paragraph:"gds-composer-paragraph",quote:"gds-composer-quote",heading:{h1:"gds-composer-h1",h2:"gds-composer-h2",h3:"gds-composer-h3"},list:{ul:"gds-composer-ul",ol:"gds-composer-ol",listitem:"gds-composer-li"},text:{bold:"font-semibold",italic:"italic",underline:"underline",strikethrough:"line-through",code:"gds-composer-code"},beautifulMentions:{"@":"gds-composer-mention px-1.5 py-0.5 mx-0.5 rounded bg-primary/10 text-primary font-medium","/":"gds-composer-mention px-1.5 py-0.5 mx-0.5 rounded bg-violet-500/15 text-violet-600 dark:text-violet-400 font-medium"}}),[]),H=C__namespace.useMemo(()=>({namespace:"gds-composer",theme:k,onError:A=>{console.error("[Composer]",A);},nodes:[richText.HeadingNode,richText.QuoteNode,list.ListNode,list.ListItemNode,link.LinkNode,link.AutoLinkNode,code.CodeNode,code.CodeHighlightNode,lexicalBeautifulMentions.BeautifulMentionNode],editorState:n||(r?A=>{let q=lexical.$getRoot(),F=lexical.$createParagraphNode();F.append(lexical.$createTextNode(r)),q.append(F);}:void 0)}),[k,n,r]),E=d.length>0,{readOnly:D=false,...U}=c;return C__namespace.createElement(LexicalComposer.LexicalComposer,{initialConfig:{...H,editable:!D}},C__namespace.createElement(wu,{...U,readOnly:D,triggers:p??[],attachmentsCfg:D?null:g,formatList:d,showToolbar:m&&E&&!D,handleEditorReady:S,submitRef:w,restartRef:y,attachments:u,setAttachments:b,ingestImages:h}))}),Ru=C__namespace.forwardRef(function(t,o){return C__namespace.createElement(Pl,{ref:o,placeholder:"Write a reply\u2026",formats:false,submitOnEnter:false,...t})});var At=kt__namespace.Root,It=kt__namespace.Trigger,Su=kt__namespace.Anchor,Ct=C__namespace.forwardRef(({className:e,align:t="center",sideOffset:o=4,surface:r="solid",...n},a)=>C__namespace.createElement(kt__namespace.Portal,null,C__namespace.createElement(kt__namespace.Content,{ref:a,align:t,sideOffset:o,"data-surface":r,className:l("z-50 w-72 rounded-md border p-4 text-popover-foreground shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 origin-[--radix-popover-content-transform-origin]",St(r,"bg-popover"),it[r],e),...n})));Ct.displayName=kt__namespace.Content.displayName;var ku="PPP",Cu="LLL dd, y";function Tu({value:e,onChange:t,placeholder:o="Pick a date",disabled:r,className:n,contentClassName:a,align:i="start",side:p,format:s=ku,captionLayout:c,icon:d,"aria-label":m}){return C__namespace.createElement(At,null,C__namespace.createElement(It,{asChild:true},C__namespace.createElement(Xe,{type:"button",variant:"outline",disabled:r,"aria-label":m??(e?void 0:o),"data-empty":!e,className:l("w-[280px] justify-start text-left font-normal data-[empty=true]:text-muted-foreground",n)},d??C__namespace.createElement(lucideReact.CalendarIcon,{className:"mr-2 h-4 w-4","aria-hidden":true}),e?dateFns.format(e,s):C__namespace.createElement("span",null,o))),C__namespace.createElement(Ct,{className:l("w-auto p-0",a),align:i,side:p},C__namespace.createElement(oa,{mode:"single",selected:e,onSelect:t,captionLayout:c,initialFocus:true})))}function Pu({value:e,onChange:t,placeholder:o="Pick a date range",disabled:r,className:n,contentClassName:a,align:i="start",side:p,format:s=Cu,captionLayout:c,icon:d,numberOfMonths:m=2,"aria-label":g}){let u=!!e?.from;return C__namespace.createElement(At,null,C__namespace.createElement(It,{asChild:true},C__namespace.createElement(Xe,{type:"button",variant:"outline",disabled:r,"aria-label":g??(u?void 0:o),"data-empty":!u,className:l("w-[300px] justify-start text-left font-normal data-[empty=true]:text-muted-foreground",n)},d??C__namespace.createElement(lucideReact.CalendarIcon,{className:"mr-2 h-4 w-4","aria-hidden":true}),e?.from?e.to?C__namespace.createElement(C__namespace.Fragment,null,dateFns.format(e.from,s)," \u2013"," ",dateFns.format(e.to,s)):dateFns.format(e.from,s):C__namespace.createElement("span",null,o))),C__namespace.createElement(Ct,{className:l("w-auto p-0",a),align:i,side:p},C__namespace.createElement(oa,{mode:"range",selected:e,onSelect:t,defaultMonth:e?.from,numberOfMonths:m,captionLayout:c,initialFocus:true})))}var Mu=ke__namespace.Root,Eu=ke__namespace.Trigger,Ml=ke__namespace.Portal,Lu=ke__namespace.Close,pn=C__namespace.forwardRef(({className:e,...t},o)=>C__namespace.createElement(ke__namespace.Overlay,{ref:o,className:l("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t}));pn.displayName=ke__namespace.Overlay.displayName;var El=C__namespace.forwardRef(({className:e,children:t,surface:o="solid",...r},n)=>C__namespace.createElement(Ml,null,C__namespace.createElement(pn,null),C__namespace.createElement(ke__namespace.Content,{ref:n,"data-surface":o,className:l("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",St(o,"bg-background"),it[o],e),...r},t,C__namespace.createElement(ke__namespace.Close,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground"},C__namespace.createElement(lucideReact.X,{className:"h-4 w-4"}),C__namespace.createElement("span",{className:"sr-only"},"Close")))));El.displayName=ke__namespace.Content.displayName;var Ll=({className:e,...t})=>C__namespace.createElement("div",{className:l("flex flex-col space-y-1.5 text-center sm:text-left",e),...t});Ll.displayName="DialogHeader";var Dl=({className:e,...t})=>C__namespace.createElement("div",{className:l("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});Dl.displayName="DialogFooter";var Al=C__namespace.forwardRef(({className:e,...t},o)=>C__namespace.createElement(ke__namespace.Title,{ref:o,className:l("text-lg font-semibold leading-none tracking-tight",e),...t}));Al.displayName=ke__namespace.Title.displayName;var Il=C__namespace.forwardRef(({className:e,...t},o)=>C__namespace.createElement(ke__namespace.Description,{ref:o,className:l("text-sm text-muted-foreground",e),...t}));Il.displayName=ke__namespace.Description.displayName;var Hu=X__namespace.Root,Fu=X__namespace.Trigger,To=C__namespace.createContext("default"),Hl=e=>e==="default"?"px-2 py-1.5 text-sm":"px-2 py-1 text-xs",zu=X__namespace.Group,Bu=X__namespace.Portal,_u=X__namespace.Sub,Ou=X__namespace.RadioGroup,Fl=C__namespace.forwardRef(({className:e,inset:t,children:o,...r},n)=>{let a=C__namespace.useContext(To);return C__namespace.createElement(X__namespace.SubTrigger,{ref:n,className:l("flex cursor-default select-none items-center gap-2 rounded-sm outline-none focus:bg-accent data-[state=open]:bg-accent [&_svg]:pointer-events-none [&_svg]:shrink-0",Hl(a),a==="default"?"[&_svg]:size-4":"[&_svg]:size-3.5",t&&(a==="default"?"pl-8":"pl-7"),e),...r},o,C__namespace.createElement(lucideReact.ChevronRight,{className:"ml-auto"}))});Fl.displayName=X__namespace.SubTrigger.displayName;var zl=C__namespace.forwardRef(({className:e,surface:t="solid",size:o="default",children:r,...n},a)=>C__namespace.createElement(X__namespace.SubContent,{ref:a,"data-surface":t,className:l("z-50 min-w-[8rem] overflow-hidden rounded-md border text-popover-foreground shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 origin-[--radix-dropdown-menu-content-transform-origin]",o==="default"?"p-1":"p-0.5",St(t,"bg-popover"),it[t],e),...n},C__namespace.createElement(To.Provider,{value:o},r)));zl.displayName=X__namespace.SubContent.displayName;var Bl=C__namespace.forwardRef(({className:e,sideOffset:t=4,surface:o="solid",size:r="default",children:n,...a},i)=>C__namespace.createElement(X__namespace.Portal,null,C__namespace.createElement(X__namespace.Content,{ref:i,sideOffset:t,"data-surface":o,className:l("z-50 max-h-[var(--radix-dropdown-menu-content-available-height)] min-w-[8rem] overflow-y-auto overflow-x-hidden rounded-md border text-popover-foreground shadow-md",r==="default"?"p-1":"p-0.5","data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 origin-[--radix-dropdown-menu-content-transform-origin]",St(o,"bg-popover"),it[o],e),...a},C__namespace.createElement(To.Provider,{value:r},n))));Bl.displayName=X__namespace.Content.displayName;var _l=C__namespace.forwardRef(({className:e,inset:t,...o},r)=>{let n=C__namespace.useContext(To);return C__namespace.createElement(X__namespace.Item,{ref:r,className:l("relative flex cursor-default select-none items-center gap-2 rounded-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&>svg]:shrink-0",Hl(n),n==="default"?"[&>svg]:size-4":"[&>svg]:size-3.5",t&&(n==="default"?"pl-8":"pl-7"),e),...o})});_l.displayName=X__namespace.Item.displayName;var Ol=C__namespace.forwardRef(({className:e,children:t,checked:o,...r},n)=>{let i=C__namespace.useContext(To)!=="default";return C__namespace.createElement(X__namespace.CheckboxItem,{ref:n,className:l("relative flex cursor-default select-none items-center rounded-sm pr-2 outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",i?"py-1 pl-7 text-xs":"py-1.5 pl-8 text-sm",e),checked:o,...r},C__namespace.createElement("span",{className:l("absolute flex items-center justify-center",i?"left-1.5 h-3 w-3":"left-2 h-3.5 w-3.5")},C__namespace.createElement(X__namespace.ItemIndicator,null,C__namespace.createElement(lucideReact.Check,{className:i?"h-3 w-3":"h-4 w-4"}))),t)});Ol.displayName=X__namespace.CheckboxItem.displayName;var Vl=C__namespace.forwardRef(({className:e,children:t,...o},r)=>{let a=C__namespace.useContext(To)!=="default";return C__namespace.createElement(X__namespace.RadioItem,{ref:r,className:l("relative flex cursor-default select-none items-center rounded-sm pr-2 outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",a?"py-1 pl-7 text-xs":"py-1.5 pl-8 text-sm",e),...o},C__namespace.createElement("span",{className:l("absolute flex items-center justify-center",a?"left-1.5 h-3 w-3":"left-2 h-3.5 w-3.5")},C__namespace.createElement(X__namespace.ItemIndicator,null,C__namespace.createElement(lucideReact.Circle,{className:"h-2 w-2 fill-current"}))),t)});Vl.displayName=X__namespace.RadioItem.displayName;var Gl=C__namespace.forwardRef(({className:e,inset:t,...o},r)=>{let n=C__namespace.useContext(To);return C__namespace.createElement(X__namespace.Label,{ref:r,className:l("font-semibold",n==="default"?"px-2 py-1.5 text-sm":"px-2 py-1 text-xs",t&&(n==="default"?"pl-8":"pl-7"),e),...o})});Gl.displayName=X__namespace.Label.displayName;var jl=C__namespace.forwardRef(({className:e,...t},o)=>C__namespace.createElement(X__namespace.Separator,{ref:o,className:l("-mx-1 my-1 h-px bg-muted",e),...t}));jl.displayName=X__namespace.Separator.displayName;var Wl=({className:e,...t})=>C__namespace.createElement("span",{className:l("ml-auto text-xs tracking-widest opacity-60",e),...t});Wl.displayName="DropdownMenuShortcut";var Ul=classVarianceAuthority.cva("flex w-full rounded-md border border-input bg-transparent shadow-sm transition-colors file:border-0 file:bg-transparent file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50",{variants:{size:{default:"h-9 pl-3 pr-3 py-1 text-base file:text-sm md:text-sm",sm:"h-8 pl-2 pr-2 py-1 text-sm file:text-xs",xs:"h-7 pl-2 pr-2 py-0 text-xs file:text-xs shadow-none","2xs":"h-6 rounded-lg pl-1.5 pr-2 py-0 text-2xs file:text-2xs shadow-none"}},defaultVariants:{size:"default"}}),Gu={default:{startPad:"pl-9",endPad:"pr-9",startInset:"pl-3",endInset:"pr-3"},sm:{startPad:"pl-7",endPad:"pr-6",startInset:"pl-2",endInset:"pr-2"},xs:{startPad:"pl-6",endPad:"pr-5",startInset:"pl-2",endInset:"pr-2"},"2xs":{startPad:"pl-6",endPad:"pr-5",startInset:"pl-1.5",endInset:"pr-2"}},qt=C__namespace.forwardRef(({className:e,type:t,size:o="default",startSlot:r,endSlot:n,...a},i)=>{if(!r&&!n)return C__namespace.createElement("input",{type:t,className:l(Ul({size:o}),e),ref:i,...a});let p=Gu[o];return C__namespace.createElement("div",{className:"relative flex w-full items-center"},r?C__namespace.createElement("span",{className:l("pointer-events-none absolute inset-y-0 left-0 flex items-center text-muted-foreground [&_svg]:size-3.5",p.startInset)},r):null,C__namespace.createElement("input",{type:t,ref:i,className:l(Ul({size:o}),r&&p.startPad,n&&p.endPad,e),...a}),n?C__namespace.createElement("span",{className:l("pointer-events-none absolute inset-y-0 right-0 flex items-center text-muted-foreground [&_svg]:size-3.5",p.endInset)},n):null)});qt.displayName="Input";var Wu=classVarianceAuthority.cva("font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70",{variants:{size:{default:"text-sm",sm:"text-sm",xs:"text-xs","2xs":"text-2xs"}},defaultVariants:{size:"default"}}),Po=C__namespace.forwardRef(({className:e,size:t,...o},r)=>C__namespace.createElement(mn__namespace.Root,{ref:r,className:l(Wu({size:t}),e),...o}));Po.displayName=mn__namespace.Root.displayName;var $l=C__namespace.forwardRef(({className:e,value:t,...o},r)=>C__namespace.createElement(Mr__namespace.Root,{ref:r,className:l("relative h-4 w-full overflow-hidden rounded-full bg-secondary",e),...o},C__namespace.createElement(Mr__namespace.Indicator,{className:"h-full w-full flex-1 bg-primary transition-all",style:{transform:`translateX(-${100-(t||0)}%)`}})));$l.displayName=Mr__namespace.Root.displayName;var un=C__namespace.forwardRef(({className:e,...t},o)=>C__namespace.createElement(cmdk.Command,{ref:o,className:l("flex h-full w-full flex-col overflow-hidden rounded-md bg-popover text-popover-foreground",e),...t}));un.displayName=cmdk.Command.displayName;var gn=C__namespace.forwardRef(({className:e,...t},o)=>C__namespace.createElement("div",{className:"flex items-center border-b px-3","cmdk-input-wrapper":""},C__namespace.createElement(lucideReact.Search,{className:"mr-2 h-4 w-4 shrink-0 opacity-50"}),C__namespace.createElement(cmdk.Command.Input,{ref:o,className:l("flex h-10 w-full rounded-md bg-transparent py-3 text-sm outline-none placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50",e),...t})));gn.displayName=cmdk.Command.Input.displayName;var fn=C__namespace.forwardRef(({className:e,...t},o)=>C__namespace.createElement(cmdk.Command.List,{ref:o,className:l("max-h-[300px] overflow-y-auto overflow-x-hidden",e),...t}));fn.displayName=cmdk.Command.List.displayName;var hn=C__namespace.forwardRef((e,t)=>C__namespace.createElement(cmdk.Command.Empty,{ref:t,className:"py-6 text-center text-sm",...e}));hn.displayName=cmdk.Command.Empty.displayName;var va=C__namespace.forwardRef(({className:e,...t},o)=>C__namespace.createElement(cmdk.Command.Group,{ref:o,className:l("overflow-hidden p-1 text-foreground [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground",e),...t}));va.displayName=cmdk.Command.Group.displayName;var bn=C__namespace.forwardRef(({className:e,...t},o)=>C__namespace.createElement(cmdk.Command.Separator,{ref:o,className:l("-mx-1 h-px bg-border",e),...t}));bn.displayName=cmdk.Command.Separator.displayName;var Xo=C__namespace.forwardRef(({className:e,...t},o)=>C__namespace.createElement(cmdk.Command.Item,{ref:o,className:l("relative flex cursor-default gap-2 select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none data-[disabled=true]:pointer-events-none data-[selected=true]:bg-accent data-[selected=true]:text-accent-foreground data-[disabled=true]:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",e),...t}));Xo.displayName=cmdk.Command.Item.displayName;var Er=C__namespace.forwardRef(({className:e,orientation:t="horizontal",decorative:o=true,...r},n)=>C__namespace.createElement(vn__namespace.Root,{ref:n,decorative:o,orientation:t,className:l("shrink-0 bg-border",t==="horizontal"?"h-[1px] w-full":"h-full w-[1px]",e),...r}));Er.displayName=vn__namespace.Root.displayName;var Xu=3,Kl=C__namespace.forwardRef(function({options:t,value:o,defaultValue:r,onValueChange:n,placeholder:a="Select\u2026",searchPlaceholder:i="Search\u2026",emptyMessage:p="Nothing matches.",maxCount:s=Xu,searchable:c=true,badgeDismissible:d=true,disabled:m=false,modalPopover:g=false,className:u,id:b,"aria-label":f,...h},v){let w=o!==void 0,[y,S]=C__namespace.useState(r??[]),k=w?o:y,[H,E]=C__namespace.useState(false),D=C__namespace.useMemo(()=>{let x=new Map;for(let I of t)x.set(I.value,I);return x},[t]),U=C__namespace.useCallback(x=>{w||S(x),n?.(x);},[w,n]),A=x=>{k.includes(x)?U(k.filter(I=>I!==x)):U([...k,x]);},q=(x,I)=>{x.preventDefault(),x.stopPropagation(),U(k.filter(P=>P!==I));},F=x=>{x?.preventDefault(),x?.stopPropagation(),U([]);},Y=()=>{let x=t.filter(I=>!I.disabled).map(I=>I.value);U(x);},J=t.length>0&&t.filter(x=>!x.disabled).every(x=>k.includes(x.value)),z=k.slice(0,s),pe=Math.max(0,k.length-s);return C__namespace.createElement(At,{open:H,onOpenChange:E,modal:g},C__namespace.createElement(It,{asChild:true},C__namespace.createElement("button",{ref:v,type:"button",id:b,role:"combobox","aria-expanded":H,"aria-haspopup":"listbox","aria-label":f,disabled:m,"data-gds-part":"multi-select",className:l("flex min-h-9 w-full items-center justify-between gap-2 rounded-md border border-input bg-transparent pl-2 pr-2 text-sm shadow-sm","ring-offset-background placeholder:text-muted-foreground","focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring","disabled:cursor-not-allowed disabled:opacity-50","[&[data-state=open]]:ring-1 [&[data-state=open]]:ring-ring",u)},k.length===0?C__namespace.createElement("span",{className:"text-muted-foreground px-1"},a):C__namespace.createElement("div",{className:"flex flex-1 flex-wrap items-center gap-1 py-1","data-gds-part":"multi-select-badges"},z.map(x=>{let I=D.get(x);if(!I)return null;let P=I.icon;return C__namespace.createElement(ea,{key:x,variant:"secondary",className:"gap-1 pr-1","data-gds-part":"multi-select-badge"},P?C__namespace.createElement(P,{className:"h-3 w-3"}):null,C__namespace.createElement("span",{className:"truncate max-w-[12rem]"},I.label),d&&!m&&C__namespace.createElement("span",{role:"button","aria-label":`Remove ${I.label}`,tabIndex:0,onClick:te=>q(te,x),onKeyDown:te=>{(te.key==="Enter"||te.key===" ")&&q(te,x);},className:"ml-0.5 inline-flex h-4 w-4 cursor-pointer items-center justify-center rounded-sm hover:bg-muted-foreground/20"},C__namespace.createElement(lucideReact.X,{className:"h-3 w-3","aria-hidden":true})))}),pe>0&&C__namespace.createElement(ea,{variant:"outline",className:"text-muted-foreground","data-gds-part":"multi-select-overflow",title:k.slice(s).map(x=>D.get(x)?.label??x).join(", ")},"+",pe," more")),C__namespace.createElement("div",{className:"flex shrink-0 items-center gap-1"},k.length>0&&!m&&C__namespace.createElement("span",{role:"button","aria-label":"Clear all",tabIndex:0,onClick:x=>F(x),onKeyDown:x=>{(x.key==="Enter"||x.key===" ")&&F(x);},className:"inline-flex h-5 w-5 cursor-pointer items-center justify-center rounded-sm text-muted-foreground hover:text-foreground hover:bg-muted"},C__namespace.createElement(lucideReact.XCircle,{className:"h-3.5 w-3.5","aria-hidden":true})),C__namespace.createElement(lucideReact.ChevronDown,{className:"h-4 w-4 shrink-0 text-muted-foreground","aria-hidden":true})))),C__namespace.createElement(Ct,{align:"start",className:"w-[var(--radix-popover-trigger-width)] p-0","data-gds-part":"multi-select-content"},C__namespace.createElement(un,null,c&&C__namespace.createElement(gn,{placeholder:i}),C__namespace.createElement(fn,null,C__namespace.createElement(hn,null,p),C__namespace.createElement(va,null,t.map(x=>{let I=x.icon,P=k.includes(x.value);return C__namespace.createElement(Xo,{key:x.value,value:x.label,onSelect:()=>A(x.value),disabled:x.disabled,"data-gds-part":"multi-select-item","data-selected":P||void 0},C__namespace.createElement("div",{className:l("mr-2 flex h-4 w-4 shrink-0 items-center justify-center rounded-sm border border-primary",P?"bg-primary text-primary-foreground":"opacity-50 [&_svg]:invisible"),"aria-hidden":true},C__namespace.createElement(lucideReact.Check,{className:"h-3 w-3"})),I?C__namespace.createElement(I,{className:"mr-2 h-4 w-4 text-muted-foreground"}):null,C__namespace.createElement("span",{className:"truncate"},x.label))})),C__namespace.createElement(bn,null),C__namespace.createElement(va,null,C__namespace.createElement("div",{className:"flex items-center justify-between gap-1 p-1"},C__namespace.createElement(Xo,{onSelect:Y,className:"flex-1 justify-center text-xs",disabled:J},"Select all"),C__namespace.createElement(Er,{orientation:"vertical",className:"h-5"}),C__namespace.createElement(Xo,{onSelect:()=>F(),className:"flex-1 justify-center text-xs",disabled:k.length===0},"Clear"),C__namespace.createElement(Er,{orientation:"vertical",className:"h-5"}),C__namespace.createElement(Xo,{onSelect:()=>E(false),className:"flex-1 justify-center text-xs"},"Close")))))))});Kl.displayName="MultiSelect";var ql=C__namespace.forwardRef(({className:e,...t},o)=>C__namespace.createElement(lo__namespace.Root,{className:l("grid gap-2",e),...t,ref:o}));ql.displayName=lo__namespace.Root.displayName;var Yl=C__namespace.forwardRef(({className:e,...t},o)=>C__namespace.createElement(lo__namespace.Item,{ref:o,className:l("aspect-square h-4 w-4 rounded-full border border-primary text-primary ring-offset-background focus:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",e),...t},C__namespace.createElement(lo__namespace.Indicator,{className:"flex items-center justify-center"},C__namespace.createElement(lucideReact.Circle,{className:"h-2.5 w-2.5 fill-current text-current"}))));Yl.displayName=lo__namespace.Item.displayName;var eg=({className:e,...t})=>C__namespace.createElement(Jo__namespace.PanelGroup,{"data-gds-part":"resizable-panel-group",className:l("flex h-full w-full data-[panel-group-direction=vertical]:flex-col",e),...t}),tg=Jo__namespace.Panel,og=({withHandle:e,className:t,...o})=>C__namespace.createElement(Jo__namespace.PanelResizeHandle,{"data-gds-part":"resizable-handle",className:l("relative flex w-px items-center justify-center bg-border after:absolute after:inset-y-0 after:left-1/2 after:w-1 after:-translate-x-1/2 focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring focus-visible:ring-offset-1 data-[panel-group-direction=vertical]:h-px data-[panel-group-direction=vertical]:w-full data-[panel-group-direction=vertical]:after:left-0 data-[panel-group-direction=vertical]:after:h-1 data-[panel-group-direction=vertical]:after:w-full data-[panel-group-direction=vertical]:after:-translate-y-1/2 data-[panel-group-direction=vertical]:after:translate-x-0 [&[data-panel-group-direction=vertical]>div]:rotate-90",t),...o},e&&C__namespace.createElement("div",{className:"z-10 flex h-4 w-3 items-center justify-center rounded-sm border bg-border"},C__namespace.createElement(lucideReact.GripVertical,{className:"h-2.5 w-2.5"})));var Zl=classVarianceAuthority.cva("gds-row flex flex-row",{variants:{gap:{none:"gap-0",xs:"gap-1",sm:"gap-2",md:"gap-4",lg:"gap-6",xl:"gap-8","2xl":"gap-12"},align:{start:"items-start",center:"items-center",end:"items-end",stretch:"items-stretch",baseline:"items-baseline"},justify:{start:"justify-start",center:"justify-center",end:"justify-end",between:"justify-between",around:"justify-around",evenly:"justify-evenly"},wrap:{true:"flex-wrap",false:"flex-nowrap"}},defaultVariants:{gap:"md",align:"center",justify:"start",wrap:false}}),Xl=C__namespace.forwardRef(({className:e,gap:t,align:o,justify:r,wrap:n,asChild:a=false,...i},p)=>C__namespace.createElement(a?reactSlot.Slot:"div",{ref:p,"data-gds-part":"row",className:l(Zl({gap:t,align:o,justify:r,wrap:n,className:e})),...i}));Xl.displayName="Row";var Jl=classVarianceAuthority.cva("gds-grid grid",{variants:{cols:{1:"grid-cols-1",2:"grid-cols-1 md:grid-cols-2",3:"grid-cols-1 sm:grid-cols-2 md:grid-cols-3",4:"grid-cols-1 sm:grid-cols-2 lg:grid-cols-4",5:"grid-cols-1 sm:grid-cols-2 lg:grid-cols-5",6:"grid-cols-2 sm:grid-cols-3 lg:grid-cols-6",12:"grid-cols-4 md:grid-cols-6 lg:grid-cols-12"},gap:{none:"gap-0",xs:"gap-1",sm:"gap-2",md:"gap-4",lg:"gap-6",xl:"gap-8","2xl":"gap-12"},align:{start:"items-start",center:"items-center",end:"items-end",stretch:"items-stretch"}},defaultVariants:{cols:"3",gap:"md",align:"stretch"}}),Ql=C__namespace.forwardRef(({className:e,cols:t,gap:o,align:r,asChild:n=false,...a},i)=>C__namespace.createElement(n?reactSlot.Slot:"div",{ref:i,"data-gds-part":"grid",className:l(Jl({cols:t,gap:o,align:r,className:e})),...a}));Ql.displayName="Grid";var ed=classVarianceAuthority.cva("gds-flex flex",{variants:{direction:{row:"flex-row",col:"flex-col","row-reverse":"flex-row-reverse","col-reverse":"flex-col-reverse"},gap:{none:"gap-0",xs:"gap-1",sm:"gap-2",md:"gap-4",lg:"gap-6",xl:"gap-8","2xl":"gap-12"},align:{start:"items-start",center:"items-center",end:"items-end",stretch:"items-stretch",baseline:"items-baseline"},justify:{start:"justify-start",center:"justify-center",end:"justify-end",between:"justify-between",around:"justify-around",evenly:"justify-evenly"},wrap:{nowrap:"flex-nowrap",wrap:"flex-wrap","wrap-reverse":"flex-wrap-reverse"}},defaultVariants:{direction:"row",gap:"none",align:"stretch",justify:"start",wrap:"nowrap"}}),td=C__namespace.forwardRef(({className:e,direction:t,gap:o,align:r,justify:n,wrap:a,asChild:i=false,...p},s)=>C__namespace.createElement(i?reactSlot.Slot:"div",{ref:s,"data-gds-part":"flex",className:l(ed({direction:t,gap:o,align:r,justify:n,wrap:a,className:e})),...p}));td.displayName="Flex";var od=C__namespace.forwardRef(({className:e,children:t,...o},r)=>C__namespace.createElement(ft__namespace.Root,{ref:r,className:l("relative overflow-hidden",e),...o},C__namespace.createElement(ft__namespace.Viewport,{className:"h-full w-full rounded-[inherit]"},t),C__namespace.createElement(yn,null),C__namespace.createElement(ft__namespace.Corner,null)));od.displayName=ft__namespace.Root.displayName;var yn=C__namespace.forwardRef(({className:e,orientation:t="vertical",...o},r)=>C__namespace.createElement(ft__namespace.ScrollAreaScrollbar,{ref:r,orientation:t,className:l("flex touch-none select-none transition-colors",t==="vertical"&&"h-full w-2.5 border-l border-l-transparent p-[1px]",t==="horizontal"&&"h-2.5 flex-col border-t border-t-transparent p-[1px]",e),...o},C__namespace.createElement(ft__namespace.ScrollAreaThumb,{className:"relative flex-1 rounded-full bg-border"})));yn.displayName=ft__namespace.ScrollAreaScrollbar.displayName;var xn=ee__namespace.Root,pg=ee__namespace.Group,wn=ee__namespace.Value,nd=C__namespace.createContext("default"),mg=classVarianceAuthority.cva("flex w-full items-center justify-between rounded-md border border-input bg-background ring-offset-background data-[placeholder]:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",{variants:{size:{default:"h-10 px-3 py-2 text-sm",sm:"h-8 px-2 py-1 text-sm",xs:"h-7 px-2 py-0 text-xs","2xs":"h-6 rounded-lg pl-1.5 pr-2 py-0 text-2xs"}},defaultVariants:{size:"default"}}),Sa=C__namespace.forwardRef(({className:e,children:t,size:o="default",startSlot:r,chevron:n=true,...a},i)=>C__namespace.createElement(ee__namespace.Trigger,{ref:i,className:l(mg({size:o}),e),...a},r?C__namespace.createElement("div",{className:"flex min-w-0 flex-1 items-center gap-1.5 [&>span]:truncate"},C__namespace.createElement("span",{className:"pointer-events-none flex shrink-0 items-center text-muted-foreground/70 [&_svg]:size-4"},r),t):t,n?C__namespace.createElement(ee__namespace.Icon,{asChild:true},C__namespace.createElement(lucideReact.ChevronDown,{className:l("opacity-50",o==="sm"?"h-3.5 w-3.5":"h-4 w-4")})):null));Sa.displayName=ee__namespace.Trigger.displayName;var Rn=C__namespace.forwardRef(({className:e,...t},o)=>C__namespace.createElement(ee__namespace.ScrollUpButton,{ref:o,className:l("flex cursor-default items-center justify-center py-1",e),...t},C__namespace.createElement(lucideReact.ChevronUp,{className:"h-4 w-4"})));Rn.displayName=ee__namespace.ScrollUpButton.displayName;var Sn=C__namespace.forwardRef(({className:e,...t},o)=>C__namespace.createElement(ee__namespace.ScrollDownButton,{ref:o,className:l("flex cursor-default items-center justify-center py-1",e),...t},C__namespace.createElement(lucideReact.ChevronDown,{className:"h-4 w-4"})));Sn.displayName=ee__namespace.ScrollDownButton.displayName;var ka=C__namespace.forwardRef(({className:e,children:t,position:o="popper",size:r="default",...n},a)=>C__namespace.createElement(ee__namespace.Portal,null,C__namespace.createElement(ee__namespace.Content,{ref:a,className:l("relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",o==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",e),position:o,...n},C__namespace.createElement(Rn,null),C__namespace.createElement(ee__namespace.Viewport,{className:l(r==="default"?"p-1":"p-0.5",o==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]")},C__namespace.createElement(nd.Provider,{value:r},t)),C__namespace.createElement(Sn,null))));ka.displayName=ee__namespace.Content.displayName;var id=C__namespace.forwardRef(({className:e,...t},o)=>C__namespace.createElement(ee__namespace.Label,{ref:o,className:l("py-1.5 pl-8 pr-2 text-sm font-semibold",e),...t}));id.displayName=ee__namespace.Label.displayName;var ug=classVarianceAuthority.cva("relative flex w-full cursor-default select-none items-center rounded-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",{variants:{size:{default:"py-1.5 pl-8 pr-2 text-sm",sm:"py-1 pl-7 pr-2 text-sm",xs:"py-1 pl-6 pr-2 text-xs","2xs":"py-0.5 pl-6 pr-2 text-2xs"}},defaultVariants:{size:"default"}}),Ca=C__namespace.forwardRef(({className:e,children:t,hint:o,...r},n)=>{let a=C__namespace.useContext(nd),i=a!=="default";return C__namespace.createElement(ee__namespace.Item,{ref:n,className:l("group",ug({size:a}),e),...r},C__namespace.createElement("span",{className:l("absolute flex items-center justify-center",i?"left-1.5 h-3 w-3":"left-2 h-3.5 w-3.5")},C__namespace.createElement(ee__namespace.ItemIndicator,null,C__namespace.createElement(lucideReact.Check,{className:i?"h-3 w-3":"h-4 w-4"}))),C__namespace.createElement(ee__namespace.ItemText,null,t),o!=null?C__namespace.createElement("span",{className:"ml-auto pl-3 tabular-nums text-muted-foreground/60 group-focus:text-accent-foreground/80 group-data-[highlighted]:text-accent-foreground/80"},o):null)});Ca.displayName=ee__namespace.Item.displayName;var sd=C__namespace.forwardRef(({className:e,...t},o)=>C__namespace.createElement(ee__namespace.Separator,{ref:o,className:l("-mx-1 my-1 h-px bg-muted",e),...t}));sd.displayName=ee__namespace.Separator.displayName;var hg=ke__namespace.Root,bg=ke__namespace.Trigger,vg=ke__namespace.Close,ld=ke__namespace.Portal,kn=C__namespace.forwardRef(({className:e,...t},o)=>C__namespace.createElement(ke__namespace.Overlay,{className:l("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t,ref:o}));kn.displayName=ke__namespace.Overlay.displayName;var yg=classVarianceAuthority.cva("fixed z-50 gap-4 p-6 shadow-lg transition ease-in-out data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:duration-300 data-[state=open]:duration-500",{variants:{side:{top:"inset-x-0 top-0 border-b data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top",bottom:"inset-x-0 bottom-0 border-t data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom",left:"inset-y-0 left-0 h-full w-3/4 border-r data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left sm:max-w-sm",right:"inset-y-0 right-0 h-full w-3/4 border-l data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right sm:max-w-sm"}},defaultVariants:{side:"right"}}),dd=C__namespace.forwardRef(({side:e="right",surface:t="solid",className:o,children:r,...n},a)=>C__namespace.createElement(ld,null,C__namespace.createElement(kn,null),C__namespace.createElement(ke__namespace.Content,{ref:a,"data-surface":t,className:l(yg({side:e}),St(t,"bg-background"),it[t],o),...n},r,C__namespace.createElement(ke__namespace.Close,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-secondary"},C__namespace.createElement(lucideReact.X,{className:"h-4 w-4"}),C__namespace.createElement("span",{className:"sr-only"},"Close")))));dd.displayName=ke__namespace.Content.displayName;var cd=({className:e,...t})=>C__namespace.createElement("div",{className:l("flex flex-col space-y-2 text-center sm:text-left",e),...t});cd.displayName="SheetHeader";var pd=({className:e,...t})=>C__namespace.createElement("div",{className:l("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});pd.displayName="SheetFooter";var md=C__namespace.forwardRef(({className:e,...t},o)=>C__namespace.createElement(ke__namespace.Title,{ref:o,className:l("text-lg font-semibold text-foreground",e),...t}));md.displayName=ke__namespace.Title.displayName;var ud=C__namespace.forwardRef(({className:e,...t},o)=>C__namespace.createElement(ke__namespace.Description,{ref:o,className:l("text-sm text-muted-foreground",e),...t}));ud.displayName=ke__namespace.Description.displayName;function xg({className:e,...t}){return React.createElement("div",{className:l("animate-pulse rounded-md bg-muted",e),...t})}var Mo=C__namespace.forwardRef(({className:e,...t},o)=>C__namespace.createElement(Yt__namespace.Root,{ref:o,className:l("relative flex w-full touch-none select-none items-center",e),...t},C__namespace.createElement(Yt__namespace.Track,{className:"relative h-2 w-full grow overflow-hidden rounded-full bg-secondary"},C__namespace.createElement(Yt__namespace.Range,{className:"absolute h-full bg-primary"})),C__namespace.createElement(Yt__namespace.Thumb,{className:"block h-5 w-5 rounded-full border-2 border-primary bg-background ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50"})));Mo.displayName=Yt__namespace.Root.displayName;var Eg={vertical:sortable.verticalListSortingStrategy,horizontal:sortable.horizontalListSortingStrategy,grid:sortable.rectSortingStrategy},Cn=C__namespace.createContext(null),wd=C__namespace.createContext(null),Tn=C__namespace.forwardRef(function({disabled:t=false,className:o,children:r,...n},a){let i=C__namespace.useRef(new Map),p=C__namespace.useCallback(m=>(i.current.set(m.id,m),()=>{i.current.delete(m.id);}),[]),s=core.useSensors(core.useSensor(core.PointerSensor,{activationConstraint:{distance:4}}),core.useSensor(core.KeyboardSensor,{coordinateGetter:sortable.sortableKeyboardCoordinates})),c=m=>{let g=i.current,u=g.get(String(m));if(u)return u;for(let b of g.values())if(b.values.some(f=>f===m))return b;return null},d=C__namespace.useCallback(m=>{if(t)return;let{active:g,over:u}=m;if(!u)return;let b=c(g.id),f=c(u.id);if(!b||!f)return;if(b.id===f.id){if(g.id===u.id)return;let y=b.values.findIndex(k=>k===g.id),S=b.values.findIndex(k=>k===u.id);if(y===-1||S===-1)return;b.onReorder?.(sortable.arrayMove(b.values,y,S));return}let h=b.values.filter(y=>y!==g.id),v=u.id===f.id?f.values.length:Math.max(0,f.values.findIndex(y=>y===u.id)),w=[...f.values.slice(0,v),g.id,...f.values.slice(v)];b.onReorder?.(h),f.onReorder?.(w);},[t]);return C__namespace.createElement(wd.Provider,{value:{registerContainer:p}},C__namespace.createElement(core.DndContext,{sensors:s,collisionDetection:core.closestCorners,onDragEnd:d},C__namespace.createElement("div",{ref:a,"data-gds-part":"sortable-group","data-disabled":t||void 0,className:l(o),...n},r)))});Tn.displayName="Sortable.Group";var Dr=C__namespace.forwardRef(function({values:t,onReorder:o,strategy:r="vertical",disabled:n=false,id:a,className:i,children:p,...s},c){let d=C__namespace.useContext(wd),m=d!==null,g=C__namespace.useId(),u=a??g;C__namespace.useEffect(()=>{if(m)return d.registerContainer({id:u,values:t,onReorder:o})},[m,d,u,t,o]);let b=core.useSensors(core.useSensor(core.PointerSensor,{activationConstraint:{distance:4}}),core.useSensor(core.KeyboardSensor,{coordinateGetter:sortable.sortableKeyboardCoordinates})),f=C__namespace.useCallback(w=>{let{active:y,over:S}=w;if(!S||y.id===S.id)return;let k=t.findIndex(E=>E===y.id),H=t.findIndex(E=>E===S.id);k===-1||H===-1||o?.(sortable.arrayMove(t,k,H));},[t,o]),h=C__namespace.useMemo(()=>({disabled:n}),[n]),v=C__namespace.createElement(sortable.SortableContext,{items:t,strategy:Eg[r]},C__namespace.createElement(Lg,{id:u,enabled:m,forwardedRef:c,strategy:r,disabled:n,className:i,...s},p));return m?C__namespace.createElement(Cn.Provider,{value:h},v):C__namespace.createElement(Cn.Provider,{value:h},C__namespace.createElement(core.DndContext,{sensors:b,collisionDetection:core.closestCenter,onDragEnd:f},v))});Dr.displayName="Sortable";function Lg({id:e,enabled:t,forwardedRef:o,strategy:r,disabled:n,className:a,children:i,...p}){let s=core.useDroppable({id:e,disabled:!t}),c=C__namespace.useCallback(d=>{t&&s.setNodeRef(d),typeof o=="function"?o(d):o&&(o.current=d);},[t,s,o]);return C__namespace.createElement("div",{ref:c,"data-gds-part":"sortable","data-strategy":r,"data-disabled":n||void 0,className:l(a),...p},i)}var Rd=C__namespace.createContext(null),Pn=C__namespace.forwardRef(function({value:t,asChild:o=false,disabled:r,className:n,style:a,children:i,...p},s){let c=C__namespace.useContext(Cn);if(!c)throw new Error("<Sortable.Item> must be rendered inside <Sortable>.");let d=c.disabled||r||false,{attributes:m,listeners:g,setNodeRef:u,setActivatorNodeRef:b,transform:f,transition:h,isDragging:v}=sortable.useSortable({id:t,disabled:d}),w=C__namespace.useRef(false),y=C__namespace.useCallback(E=>{u(E),typeof s=="function"?s(E):s&&(s.current=E);},[u,s]),S=C__namespace.useMemo(()=>({listeners:g,setActivatorNodeRef:b,hasHandle:w,disabled:d}),[g,b,d]),k={transform:utilities.CSS.Transform.toString(f),transition:h,zIndex:v?1:void 0,cursor:d?"default":w.current?void 0:"grab",...a},H=o?reactSlot.Slot:"div";return C__namespace.createElement(Rd.Provider,{value:S},C__namespace.createElement(H,{ref:y,"data-gds-part":"sortable-item","data-value":String(t),"data-dragging":v||void 0,className:l(n),style:k,...m,...w.current?{}:g,...p},i))});Pn.displayName="Sortable.Item";var Nn=C__namespace.forwardRef(function({asChild:t=false,className:o,children:r,...n},a){let i=C__namespace.useContext(Rd);if(!i)throw new Error("<Sortable.Handle> must be rendered inside <Sortable.Item>.");C__namespace.useLayoutEffect(()=>(i.hasHandle.current=true,()=>{i.hasHandle.current=false;}),[i.hasHandle]);let p=C__namespace.useCallback(c=>{i.setActivatorNodeRef(c),typeof a=="function"?a(c):a&&(a.current=c);},[i,a]),s={"data-gds-part":"sortable-handle","aria-label":"Drag to reorder",className:l("cursor-grab touch-none select-none",i.disabled&&"cursor-default opacity-50",o),...i.disabled?{}:i.listeners,...n};return t?C__namespace.createElement(reactSlot.Slot,{ref:p,...s},r):C__namespace.createElement("button",{type:"button",ref:p,...s},r)});Nn.displayName="Sortable.Handle";Dr.Item=Pn;Dr.Handle=Nn;Dr.Group=Tn;var Dg=Dr;var Sd=classVarianceAuthority.cva("gds-stack flex flex-col",{variants:{gap:{none:"gap-0",xs:"gap-1",sm:"gap-2",md:"gap-4",lg:"gap-6",xl:"gap-8","2xl":"gap-12"},align:{start:"items-start",center:"items-center",end:"items-end",stretch:"items-stretch"},justify:{start:"justify-start",center:"justify-center",end:"justify-end",between:"justify-between",around:"justify-around",evenly:"justify-evenly"}},defaultVariants:{gap:"md",align:"stretch",justify:"start"}}),kd=C__namespace.forwardRef(({className:e,gap:t,align:o,justify:r,asChild:n=false,...a},i)=>C__namespace.createElement(n?reactSlot.Slot:"div",{ref:i,"data-gds-part":"stack",className:l(Sd({gap:t,align:o,justify:r,className:e})),...a}));kd.displayName="Stack";var Hg=classVarianceAuthority.cva("peer inline-flex shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=unchecked]:bg-input",{variants:{size:{default:"h-6 w-11",sm:"h-5 w-9",xs:"h-4 w-7","2xs":"h-3 w-5"}},defaultVariants:{size:"default"}}),Fg=classVarianceAuthority.cva("pointer-events-none block rounded-full bg-background shadow-lg ring-0 transition-transform data-[state=unchecked]:translate-x-0",{variants:{size:{default:"h-5 w-5 data-[state=checked]:translate-x-5",sm:"h-4 w-4 data-[state=checked]:translate-x-4",xs:"h-3 w-3 data-[state=checked]:translate-x-3","2xs":"h-2 w-2 data-[state=checked]:translate-x-2"}},defaultVariants:{size:"default"}}),Na=C__namespace.forwardRef(({className:e,size:t="default",...o},r)=>C__namespace.createElement(Ir__namespace.Root,{className:l(Hg({size:t}),e),...o,ref:r},C__namespace.createElement(Ir__namespace.Thumb,{className:l(Fg({size:t}))})));Na.displayName=Ir__namespace.Root.displayName;var Td=C__namespace.forwardRef(({className:e,...t},o)=>C__namespace.createElement("div",{className:"relative w-full overflow-auto"},C__namespace.createElement("table",{ref:o,className:l("w-full caption-bottom text-sm",e),...t})));Td.displayName="Table";var Pd=C__namespace.forwardRef(({className:e,...t},o)=>C__namespace.createElement("thead",{ref:o,className:l("[&_tr]:border-b",e),...t}));Pd.displayName="TableHeader";var Nd=C__namespace.forwardRef(({className:e,...t},o)=>C__namespace.createElement("tbody",{ref:o,className:l("[&_tr:last-child]:border-0",e),...t}));Nd.displayName="TableBody";var Md=C__namespace.forwardRef(({className:e,...t},o)=>C__namespace.createElement("tfoot",{ref:o,className:l("border-t bg-muted/50 font-medium [&>tr]:last:border-b-0",e),...t}));Md.displayName="TableFooter";var Ed=C__namespace.forwardRef(({className:e,...t},o)=>C__namespace.createElement("tr",{ref:o,className:l("border-b transition-colors hover:bg-muted/50 data-[state=selected]:bg-muted",e),...t}));Ed.displayName="TableRow";var Ld=C__namespace.forwardRef(({className:e,...t},o)=>C__namespace.createElement("th",{ref:o,className:l("h-10 px-2 text-left align-middle font-medium text-muted-foreground [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",e),...t}));Ld.displayName="TableHead";var Dd=C__namespace.forwardRef(({className:e,...t},o)=>C__namespace.createElement("td",{ref:o,className:l("p-2 align-middle [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",e),...t}));Dd.displayName="TableCell";var Ad=C__namespace.forwardRef(({className:e,...t},o)=>C__namespace.createElement("caption",{ref:o,className:l("mt-4 text-sm text-muted-foreground",e),...t}));Ad.displayName="TableCaption";var Id=C__namespace.createContext(C__namespace.createElement(lucideReact.ChevronRight,null)),Hd=C__namespace.forwardRef(({separator:e,children:t,...o},r)=>C__namespace.createElement(Id.Provider,{value:e??C__namespace.createElement(lucideReact.ChevronRight,null)},C__namespace.createElement("nav",{ref:r,"aria-label":"breadcrumb",...o},t)));Hd.displayName="Breadcrumb";var Fd=C__namespace.forwardRef(({className:e,...t},o)=>C__namespace.createElement("ol",{ref:o,className:l("flex flex-wrap items-center gap-1.5 break-words text-xs text-muted-foreground",e),...t}));Fd.displayName="BreadcrumbList";var zd=C__namespace.forwardRef(({className:e,...t},o)=>C__namespace.createElement("li",{ref:o,className:l("inline-flex items-center gap-1.5",e),...t}));zd.displayName="BreadcrumbItem";var Ma=l("inline-flex items-center gap-1.5 rounded-md px-1.5 py-0.5 text-xs","transition-colors hover:text-foreground hover:bg-muted/60","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring","[&_svg]:pointer-events-none [&_svg]:size-3.5 [&_svg]:shrink-0"),Bd=C__namespace.forwardRef(({asChild:e,className:t,href:o,...r},n)=>e?C__namespace.createElement("span",{ref:n,className:l(Ma,t),...r}):o?C__namespace.createElement("a",{ref:n,href:o,className:l(Ma,t),...r}):C__namespace.createElement("button",{ref:n,type:"button",className:l(Ma,t),...r}));Bd.displayName="BreadcrumbLink";var _d=C__namespace.forwardRef(({className:e,...t},o)=>C__namespace.createElement("span",{ref:o,role:"link","aria-disabled":"true","aria-current":"page",className:l("inline-flex items-center gap-1.5 px-0.5 text-xs font-medium text-foreground","[&_svg]:pointer-events-none [&_svg]:size-3.5 [&_svg]:shrink-0",e),...t}));_d.displayName="BreadcrumbPage";var Od=({children:e,className:t,...o})=>{let r=C__namespace.useContext(Id);return C__namespace.createElement("li",{role:"presentation","aria-hidden":"true",className:l("[&_svg]:size-3 [&_svg]:shrink-0 text-muted-foreground/60",t),...o},e??r)};Od.displayName="BreadcrumbSeparator";var Vd=({className:e,...t})=>C__namespace.createElement("span",{role:"presentation","aria-hidden":"true",className:l("flex h-5 w-5 items-center justify-center",e),...t},C__namespace.createElement(lucideReact.MoreHorizontal,{className:"h-3.5 w-3.5"}),C__namespace.createElement("span",{className:"sr-only"},"More"));Vd.displayName="BreadcrumbEllipsis";var Gd=C__namespace.forwardRef(({label:e,items:t,onSelect:o,onSelectLabel:r,current:n,className:a},i)=>{let[p,s]=C__namespace.useState(false);return C__namespace.createElement(At,{open:p,onOpenChange:s},C__namespace.createElement(It,{asChild:true},C__namespace.createElement("button",{ref:i,type:"button",className:l(Ma,n&&"font-medium text-foreground",a),onClick:()=>{r?r():s(c=>!c);}},C__namespace.createElement("span",null,e),C__namespace.createElement(lucideReact.ChevronDown,{className:l("h-3 w-3 text-muted-foreground transition-transform",p&&"rotate-180"),onClick:c=>{c.stopPropagation(),s(d=>!d);},role:"button","aria-label":`Show ${e} children`}))),C__namespace.createElement(Ct,{align:"start",className:"w-64 p-1 max-h-80 overflow-y-auto"},t.length===0?C__namespace.createElement("p",{className:"px-2 py-1.5 text-xs text-muted-foreground"},"No items here yet."):C__namespace.createElement("ul",{className:"flex flex-col gap-0.5"},t.map(c=>C__namespace.createElement("li",{key:c.id},C__namespace.createElement("button",{type:"button",onClick:()=>{o(c.id),s(false);},className:l("w-full text-left rounded-md px-2 py-1.5","flex items-start gap-2","hover:bg-muted transition-colors","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",c.active&&"bg-muted/60")},C__namespace.createElement("span",{className:"flex-1 min-w-0"},C__namespace.createElement("span",{className:"flex items-center gap-1.5"},C__namespace.createElement("span",{className:"text-xs font-medium text-foreground truncate"},c.label),c.active&&C__namespace.createElement(lucideReact.Check,{className:"h-3 w-3 text-primary shrink-0"})),c.summary&&C__namespace.createElement("span",{className:"block text-[10px] text-muted-foreground leading-snug truncate"},c.summary)),c.hasChildren&&C__namespace.createElement(lucideReact.ChevronRight,{className:"h-3 w-3 text-muted-foreground/70 shrink-0 mt-0.5"})))))))});Gd.displayName="BreadcrumbMenuTrigger";var En=Tt__namespace.Provider,Eo=Tt__namespace.Root,Lo=Tt__namespace.Trigger,co=C__namespace.forwardRef(({className:e,sideOffset:t=4,...o},r)=>C__namespace.createElement(Tt__namespace.Portal,null,C__namespace.createElement(Tt__namespace.Content,{ref:r,sideOffset:t,className:l("z-50 overflow-hidden rounded-md bg-primary px-3 py-1.5 text-xs text-primary-foreground animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 origin-[--radix-tooltip-content-transform-origin]",e),...o})));co.displayName=Tt__namespace.Content.displayName;var Wd=C__namespace.createContext({size:"md",variant:"pill"}),Og=Pt__namespace.Root,Vg=classVarianceAuthority.cva("inline-flex items-center text-muted-foreground",{variants:{variant:{pill:"justify-center rounded-lg bg-muted",underlined:"justify-start border-b border-border"},size:{sm:"",md:"",lg:""}},compoundVariants:[{variant:"pill",size:"sm",className:"h-7 p-0.5"},{variant:"pill",size:"md",className:"h-8 p-0.5"},{variant:"pill",size:"lg",className:"h-10 p-1"},{variant:"underlined",size:"sm",className:"gap-3"},{variant:"underlined",size:"md",className:"gap-4"},{variant:"underlined",size:"lg",className:"gap-6"}],defaultVariants:{variant:"pill",size:"md"}}),Gg=classVarianceAuthority.cva("inline-flex items-center justify-center whitespace-nowrap font-medium ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0",{variants:{variant:{pill:"rounded-md data-[state=active]:bg-background data-[state=active]:text-foreground",underlined:"rounded-none bg-transparent border-b-2 border-transparent -mb-px hover:text-foreground data-[state=active]:border-primary data-[state=active]:text-primary"},size:{sm:"text-2xs gap-1 [&_svg]:size-3",md:"text-xs gap-1.5 [&_svg]:size-3.5",lg:"text-sm gap-2 [&_svg]:size-4"}},compoundVariants:[{variant:"pill",size:"sm",className:"h-6 px-1.5"},{variant:"pill",size:"md",className:"h-7 px-2"},{variant:"pill",size:"lg",className:"h-8 px-2.5"},{variant:"underlined",size:"sm",className:"pb-1.5 pt-1 px-1"},{variant:"underlined",size:"md",className:"pb-2 pt-1.5 px-1.5"},{variant:"underlined",size:"lg",className:"pb-2.5 pt-2 px-2"}],defaultVariants:{variant:"pill",size:"md"}}),Ud=C__namespace.forwardRef(({className:e,size:t="md",variant:o="pill",children:r,...n},a)=>C__namespace.createElement(Wd.Provider,{value:{size:t??"md",variant:o??"pill"}},C__namespace.createElement(Pt__namespace.List,{ref:a,className:l(Vg({size:t,variant:o}),e),...n},r)));Ud.displayName=Pt__namespace.List.displayName;var $d=C__namespace.forwardRef(({className:e,size:t,variant:o,tooltip:r,...n},a)=>{let i=C__namespace.useContext(Wd),p=t??i.size,s=o??i.variant,c=n["aria-label"]??(typeof r=="string"?r:void 0),d=C__namespace.createElement(Pt__namespace.Trigger,{ref:a,className:l(Gg({size:p,variant:s}),e),"aria-label":c,...n});return r?C__namespace.createElement(Eo,null,C__namespace.createElement(Lo,{asChild:true},d),C__namespace.createElement(co,null,r)):d});$d.displayName=Pt__namespace.Trigger.displayName;var Kd=C__namespace.forwardRef(({className:e,...t},o)=>C__namespace.createElement(Pt__namespace.Content,{ref:o,className:l("mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",e),...t}));Kd.displayName=Pt__namespace.Content.displayName;var Wg=classVarianceAuthority.cva("flex w-full rounded-md border border-input bg-background ring-offset-background placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",{variants:{size:{default:"min-h-[80px] px-3 py-2 text-sm",sm:"min-h-[64px] px-2 py-1.5 text-sm",xs:"min-h-[52px] px-2 py-1 text-xs","2xs":"min-h-[44px] px-2 py-1 text-2xs"}},defaultVariants:{size:"default"}}),qd=C__namespace.forwardRef(({className:e,size:t="default",...o},r)=>C__namespace.createElement("textarea",{className:l(Wg({size:t}),e),ref:r,...o}));qd.displayName="Textarea";var Yd=classVarianceAuthority.cva("inline-flex items-center justify-center gap-2 rounded-md text-sm font-medium transition-colors hover:bg-muted hover:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 data-[state=on]:bg-accent data-[state=on]:text-accent-foreground [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",{variants:{variant:{default:"bg-transparent",outline:"border border-input bg-transparent shadow-sm hover:bg-accent hover:text-accent-foreground"},size:{default:"h-9 px-2 min-w-9",sm:"h-8 px-1.5 min-w-8",xs:"h-7 px-1 min-w-7","2xs":"h-6 px-1 min-w-6",lg:"h-10 px-2.5 min-w-10"}},defaultVariants:{variant:"default",size:"default"}}),Zd=C__namespace.forwardRef(({className:e,variant:t,size:o,...r},n)=>C__namespace.createElement(Ln__namespace.Root,{ref:n,className:l(Yd({variant:t,size:o,className:e})),...r}));Zd.displayName=Ln__namespace.Root.displayName;var Jd=C__namespace.createContext("md"),$g=classVarianceAuthority.cva("inline-flex items-center justify-center rounded-lg bg-muted text-muted-foreground",{variants:{size:{sm:"h-7 p-0.5",md:"h-8 p-0.5",lg:"h-10 p-1"}},defaultVariants:{size:"md"}}),Kg=classVarianceAuthority.cva("inline-flex items-center justify-center whitespace-nowrap rounded-md font-medium ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 data-[state=on]:bg-background data-[state=on]:text-foreground",{variants:{size:{sm:"h-6 px-1.5 text-2xs gap-1 [&_svg]:size-3",md:"h-7 px-2 text-xs gap-1.5 [&_svg]:size-3.5",lg:"h-8 px-2.5 text-sm gap-2 [&_svg]:size-4"}},defaultVariants:{size:"md"}}),Do=C__namespace.forwardRef(({className:e,size:t="md",children:o,...r},n)=>C__namespace.createElement(Jd.Provider,{value:t??"md"},C__namespace.createElement(Qo__namespace.Root,{ref:n,className:l($g({size:t}),e),...r},o)));Do.displayName=Qo__namespace.Root.displayName;var Ao=C__namespace.forwardRef(({className:e,size:t,tooltip:o,tooltipSide:r="top",tooltipDelay:n,"aria-label":a,...i},p)=>{let s=C__namespace.useContext(Jd),c=t??s,d=a??(typeof o=="string"?o:void 0),m=C__namespace.createElement(Qo__namespace.Item,{ref:p,className:l(Kg({size:c}),e),"aria-label":d,...i});return o==null?m:C__namespace.createElement(Eo,{delayDuration:n},C__namespace.createElement(Lo,{asChild:true},C__namespace.createElement("span",{className:"inline-flex"},m)),C__namespace.createElement(co,{side:r},o))});Ao.displayName=Qo__namespace.Item.displayName;var Yg=classVarianceAuthority.cva("grid items-center w-full gap-3 [grid-template-columns:auto_1fr_auto]",{variants:{position:{top:"border-b border-border",bottom:"border-t border-border",inline:""},variant:{default:"bg-background",subtle:"bg-muted/30",transparent:"bg-transparent"},size:{sm:"min-h-10 px-3",md:"min-h-12 px-4",lg:"min-h-14 px-6"},sticky:{true:"",false:""}},compoundVariants:[{sticky:true,position:"top",className:"sticky top-0 z-20"},{sticky:true,position:"bottom",className:"sticky bottom-0 z-20"}],defaultVariants:{position:"top",variant:"default",size:"md",sticky:false}}),Qd=C__namespace.forwardRef(({className:e,position:t,variant:o,size:r,sticky:n,leading:a,center:i,trailing:p,children:s,"aria-label":c,...d},m)=>{let g=s==null;return C__namespace.createElement("div",{ref:m,role:"toolbar","aria-label":c??"Toolbar","data-gds-part":"toolbar","data-position":t??"top",className:l(Yg({position:t,variant:o,size:r,sticky:n}),e),...d},g?C__namespace.createElement(C__namespace.Fragment,null,C__namespace.createElement("div",{"data-gds-part":"toolbar-leading",className:"flex items-center min-w-0"},a),C__namespace.createElement("div",{"data-gds-part":"toolbar-center",className:"flex items-center min-w-0 justify-center"},i),C__namespace.createElement("div",{"data-gds-part":"toolbar-trailing",className:"flex items-center min-w-0 justify-end"},p)):s)});Qd.displayName="Toolbar";var ec=C__namespace.forwardRef(({className:e,align:t="leading",...o},r)=>C__namespace.createElement("div",{ref:r,"data-gds-part":`toolbar-${t}`,className:l("flex items-center min-w-0",t==="center"&&"justify-center",t==="trailing"&&"justify-end",e),...o}));ec.displayName="ToolbarSlot";var oc=C__namespace.createContext(null),Dn=C__namespace.createContext(0);function rc(){return C__namespace.useContext(Dn)}function Fr(e){let t=C__namespace.useContext(oc);if(!t)throw new Error(`<${e}> must be rendered inside a <Sidebar> root.`);return t}var po=C__namespace.forwardRef(({collapsed:e,defaultCollapsed:t=false,onCollapsedChange:o,collapsible:r=true,variant:n="rail",className:a,style:i,children:p,...s},c)=>{let d=e!==void 0,[m,g]=C__namespace.useState(t),u=d?e:m,b=n==="panel",f=()=>{let h=!u;d||g(h),o?.(h);};return C__namespace.createElement(En,{delayDuration:0},C__namespace.createElement(oc.Provider,{value:{collapsed:u}},C__namespace.createElement("aside",{ref:c,"data-gds-part":"sidebar","data-collapsed":u||void 0,"data-variant":n,className:l("relative flex h-full flex-col bg-card text-card-foreground",b?"w-full border border-border rounded-lg overflow-hidden":"border-r border-border transition-[width] duration-200 ease-out",a),style:b?i:{width:u?"var(--gds-sidebar-collapsed-width, 4rem)":"var(--gds-sidebar-width, 16rem)",...i},...s},p,r&&!b&&C__namespace.createElement("button",{type:"button",onClick:f,"aria-label":u?"Expand sidebar":"Collapse sidebar","data-gds-part":"sidebar-collapse-toggle",className:l("absolute -right-3 top-6 z-10 flex h-6 w-6 items-center justify-center","rounded-full border border-border bg-card text-muted-foreground shadow-sm","hover:text-foreground hover:bg-muted transition-colors")},u?C__namespace.createElement(lucideReact.ChevronRight,{className:"h-3 w-3"}):C__namespace.createElement(lucideReact.ChevronLeft,{className:"h-3 w-3"})))))});po.displayName="Sidebar";var In=C__namespace.forwardRef(({className:e,...t},o)=>{let{collapsed:r}=Fr("SidebarHeader");return C__namespace.createElement("div",{ref:o,"data-gds-part":"sidebar-header","data-collapsed":r||void 0,className:l("flex shrink-0 items-center border-b border-border",r?"justify-center px-2":"px-3","h-[var(--gds-sidebar-header-height,3.25rem)]",e),...t})});In.displayName="SidebarHeader";var Hn=C__namespace.forwardRef(({className:e,...t},o)=>C__namespace.createElement("nav",{ref:o,"data-gds-part":"sidebar-content",className:l("flex-1 overflow-y-auto overflow-x-hidden","py-[var(--gds-sidebar-content-py,0.5rem)]",e),...t}));Hn.displayName="SidebarContent";var Fn=C__namespace.forwardRef(({className:e,...t},o)=>{let{collapsed:r}=Fr("SidebarFooter");return C__namespace.createElement("div",{ref:o,"data-gds-part":"sidebar-footer","data-collapsed":r||void 0,className:l("shrink-0 border-t border-border",r?"px-2 py-2":"px-3 py-2",e),...t})});Fn.displayName="SidebarFooter";var zn=C__namespace.forwardRef(({title:e,icon:t,trailing:o,collapsible:r=true,defaultExpanded:n=true,className:a,children:i,...p},s)=>{let{collapsed:c}=Fr("SidebarSection"),[d,m]=C__namespace.useState(n),g=!!e&&r;return c?C__namespace.createElement("div",{ref:s,"data-gds-part":"sidebar-section",className:l("px-[var(--gds-sidebar-section-px,0.5rem)] space-y-[var(--gds-sidebar-section-gap,0.125rem)]",a),...p},i):C__namespace.createElement("div",{ref:s,"data-gds-part":"sidebar-section",className:l("px-[var(--gds-sidebar-section-px,0.5rem)] pb-1",a),...p},e&&(g?C__namespace.createElement("div",{className:l("group/header flex w-full items-center gap-1 rounded-md px-2 py-1.5 text-xs font-medium uppercase tracking-wide","text-muted-foreground hover:text-foreground hover:bg-muted/50 transition-colors")},C__namespace.createElement("button",{type:"button",onClick:()=>m(u=>!u),"aria-expanded":d,className:"flex flex-1 items-center gap-2 text-left min-w-0"},t,C__namespace.createElement("span",{className:"flex-1 text-left normal-case truncate"},e),d?C__namespace.createElement(lucideReact.ChevronDown,{className:"h-3 w-3 shrink-0",strokeWidth:1.5}):C__namespace.createElement(lucideReact.ChevronRight,{className:"h-3 w-3 shrink-0",strokeWidth:1.5})),o&&C__namespace.createElement("span",{className:"flex items-center shrink-0",onClick:u=>u.stopPropagation(),onKeyDown:u=>u.stopPropagation()},o)):C__namespace.createElement("div",{className:l("flex items-center gap-2 px-2 py-1.5 text-xs font-medium uppercase tracking-wide","text-muted-foreground")},t,C__namespace.createElement("span",{className:"flex-1 truncate"},e),o&&C__namespace.createElement("span",{className:"shrink-0"},o))),d&&C__namespace.createElement("div",{className:l("mt-[var(--gds-sidebar-section-gap,0.125rem)]","space-y-[var(--gds-sidebar-section-gap,0.125rem)]")},i))});zn.displayName="SidebarSection";var Bn=C__namespace.forwardRef(({icon:e,badge:t,active:o=false,asButton:r=false,asChild:n=false,disabled:a=false,collapsedLabel:i,size:p="md",description:s,className:c,children:d,...m},g)=>{let{collapsed:u}=Fr("SidebarItem"),b=rc(),f=!u&&b>0?{paddingLeft:`calc(0.5rem + ${b} * var(--gds-sidebar-tree-indent, 1.5rem))`}:void 0,h=p==="sm",v=h?"text-xs px-2 py-1":"text-sm px-2 py-1.5",w=h&&!o?"font-normal":"font-medium",y=o?"bg-primary/10 text-primary":h?"text-muted-foreground hover:bg-muted hover:text-foreground":"text-foreground/80 hover:bg-muted hover:text-foreground",S=!u&&s!=null,k=l("group flex items-center gap-2.5 rounded-md transition-colors",v,w,S&&(h?"py-1.5":"py-2"),u?"justify-center px-2 py-2":null,y,a&&"opacity-50 pointer-events-none",c),H=S?C__namespace.createElement("span",{className:"flex min-w-0 flex-1 flex-col gap-0.5 text-left leading-tight"},C__namespace.createElement("span",{className:"truncate"},d),C__namespace.createElement("span",{className:l("truncate font-normal text-muted-foreground",h?"text-[10px]":"text-[11px]")},s)):C__namespace.createElement("span",{className:"flex-1 truncate text-left"},d),E=C__namespace.createElement(C__namespace.Fragment,null,e&&C__namespace.createElement("span",{className:"shrink-0 [&>svg]:h-4 [&>svg]:w-4","aria-hidden":true},e),!u&&H,!u&&t!==void 0&&t!==null&&C__namespace.createElement("span",{className:"ml-auto inline-flex items-center justify-center rounded bg-muted px-1.5 py-0.5 text-[10px] font-medium text-muted-foreground"},t)),D;if(n)D=C__namespace.createElement(reactSlot.Slot,{"data-gds-part":"sidebar-item","data-active":o||void 0,"aria-current":o?"page":void 0,className:k,style:f},d);else if(r){let{href:A,target:q,rel:F,download:Y,hrefLang:J,ping:z,referrerPolicy:pe,type:x,...I}=m;D=C__namespace.createElement("button",{type:"button","data-gds-part":"sidebar-item","data-active":o||void 0,"aria-current":o?"page":void 0,disabled:a,className:l(k,"w-full text-left"),style:f,...I},E);}else D=C__namespace.createElement("a",{ref:g,"data-gds-part":"sidebar-item","data-active":o||void 0,"aria-current":o?"page":void 0,"aria-disabled":a||void 0,className:k,style:f,...m},E);if(!u)return D;let U=i??(typeof d=="string"?d:null);return U?C__namespace.createElement(Eo,null,C__namespace.createElement(Lo,{asChild:true},D),C__namespace.createElement(co,{side:"right",sideOffset:8},U,t!=null&&C__namespace.createElement("span",{className:"ml-2 inline-flex items-center justify-center rounded bg-foreground/10 px-1.5 py-0 text-[10px]"},t))):D});Bn.displayName="SidebarItem";var _n=C__namespace.forwardRef(function({label:t,icon:o,badge:r,active:n=false,defaultExpanded:a=true,expanded:i,onExpandedChange:p,disabled:s,description:c,trailing:d,className:m,style:g,children:u,...b},f){let{collapsed:h}=Fr("SidebarTreeItem"),v=rc(),w=i!==void 0,[y,S]=C__namespace.useState(a),k=w?i:y,H=()=>{let D=!k;w||S(D),p?.(D);};if(h)return C__namespace.createElement(Dn.Provider,{value:v},u);let E=v*1.5;return C__namespace.createElement("div",{"data-gds-part":"sidebar-tree-item"},C__namespace.createElement("div",{className:"group/row relative"},C__namespace.createElement("button",{ref:f,type:"button",onClick:H,"aria-expanded":k,"aria-current":n?"page":void 0,"data-active":n||void 0,disabled:s,className:l("group flex w-full items-center gap-1.5 rounded-md py-1 text-sm font-medium transition-colors",n?"bg-primary/10 text-primary":"text-foreground/80 hover:bg-muted hover:text-foreground",s&&"opacity-50 pointer-events-none",d!=null&&"pr-12",m),style:{paddingLeft:`calc(0.25rem + ${E}rem)`,paddingRight:d!=null?"3rem":"0.5rem",...g},...b},C__namespace.createElement("span",{className:"inline-flex h-4 w-4 items-center justify-center text-muted-foreground shrink-0","aria-hidden":true},k?C__namespace.createElement(lucideReact.ChevronDown,{className:"h-3 w-3"}):C__namespace.createElement(lucideReact.ChevronRight,{className:"h-3 w-3"})),o&&C__namespace.createElement("span",{className:"shrink-0 [&>svg]:h-4 [&>svg]:w-4","aria-hidden":true},o),c!=null?C__namespace.createElement("span",{className:"flex min-w-0 flex-1 flex-col gap-0.5 text-left leading-tight"},C__namespace.createElement("span",{className:"truncate"},t),C__namespace.createElement("span",{className:"truncate text-[11px] font-normal text-muted-foreground"},c)):C__namespace.createElement("span",{className:"flex-1 truncate text-left"},t),r!=null&&C__namespace.createElement("span",{className:"ml-auto inline-flex items-center justify-center rounded bg-muted px-1.5 py-0.5 text-[10px] font-medium text-muted-foreground"},r)),d!=null&&C__namespace.createElement("div",{onClick:D=>D.stopPropagation(),className:"pointer-events-auto absolute inset-y-0 right-1.5 flex items-center gap-0.5"},d)),k&&u&&C__namespace.createElement(Dn.Provider,{value:v+1},C__namespace.createElement("div",{className:"space-y-[var(--gds-sidebar-section-gap,0.125rem)]"},u)))});_n.displayName="SidebarTreeItem";po.Header=In;po.Content=Hn;po.Footer=Fn;po.Section=zn;po.Item=Bn;po.TreeItem=_n;var mo=[50,100,200,300,400,500,600,700,800,900,950],ac=[.985,.955,.895,.82,.72,.61,.51,.415,.325,.245,.17],Jg=[.015,.04,.075,.11,.14,.17,.17,.15,.12,.08,.04];function Da({hue:e,chromaScale:t=1}){let o=(e%360+360)%360,r={};for(let n=0;n<mo.length;n++){let a=ac[n],i=Jg[n]*t;r[mo[n]]=`${a.toFixed(4)} ${i.toFixed(4)} ${o.toFixed(2)}`;}return r}function nc(){let e={};for(let t=0;t<mo.length;t++){let o=ac[t];e[mo[t]]=`${o.toFixed(4)} 0 0`;}return e}var On={light:{destructive:"0.560 0.220 27.0",destructiveFg:"0.990 0.005 27.0",success:"0.610 0.180 145.0",warning:"0.720 0.180 60.0",info:"0.580 0.200 240.0",highlight:"0.860 0.180 95.0"},dark:{destructive:"0.680 0.220 27.0",destructiveFg:"0.990 0.005 27.0",success:"0.720 0.180 145.0",warning:"0.800 0.180 60.0",info:"0.700 0.200 240.0",highlight:"0.880 0.180 95.0"}},zr="1 0 0",ic="0 0 0";function er(e,t){let[,o,r]=e.split(/\s+/).map(d=>d.trim()),n=Number(o),a=r;if(t==="light"){let m=Math.min(n*.22,.045),g=.38,u=n;return {soft:`${.965.toFixed(3)} ${m.toFixed(3)} ${a}`,deep:`${g.toFixed(3)} ${u.toFixed(3)} ${a}`}}let i=.22,p=Math.min(n*.45,.075),s=.82,c=n*.9;return {soft:`${i.toFixed(3)} ${p.toFixed(3)} ${a}`,deep:`${s.toFixed(3)} ${c.toFixed(3)} ${a}`}}var Aa={geist:"var(--font-geist), system-ui, sans-serif",inter:"var(--font-inter), system-ui, sans-serif",manrope:"var(--font-manrope), system-ui, sans-serif",figtree:"var(--font-figtree), system-ui, sans-serif",dmSans:"var(--font-dm-sans), system-ui, sans-serif",lexend:"var(--font-lexend), system-ui, sans-serif",outfit:"var(--font-outfit), system-ui, sans-serif",plusJakarta:"var(--font-plus-jakarta), system-ui, sans-serif",spaceGrotesk:"var(--font-space-grotesk), system-ui, sans-serif",fraunces:"var(--font-fraunces), Georgia, serif",instrumentSerif:"var(--font-instrument-serif), Georgia, serif",sourceSerif:"var(--font-source-serif), Georgia, serif",jetbrainsMono:"var(--font-jetbrains-mono), ui-monospace, monospace",geistMono:"var(--font-geist-mono), ui-monospace, monospace",ibmPlexMono:"var(--font-ibm-plex-mono), ui-monospace, monospace",system:"system-ui, -apple-system, sans-serif",serif:"Georgia, 'Times New Roman', serif",mono:"ui-monospace, Menlo, monospace"};var Qg=["superLight","light","dark","superDark"],ef={muted:.6,default:1,vibrant:1.3};function tf(e,t,o){let r=t.primary*o,n=t.accent*o,a=(r+n)/2*.8,i=p=>(p%360+360)%360;return {1:`0.600 ${(.17*r).toFixed(4)} ${e.primary.toFixed(2)}`,2:`0.640 ${(.17*a).toFixed(4)} ${i(e.primary+140).toFixed(2)}`,3:`0.580 ${(.17*a).toFixed(4)} ${i(e.primary+220).toFixed(2)}`,4:`0.510 0.0250 ${e.neutral.toFixed(2)}`,5:`0.620 ${(.17*n).toFixed(4)} ${e.accent.toFixed(2)}`}}var $=e=>({source:"neutral",step:e}),bt=e=>({source:"primary",step:e}),uo=e=>({source:"accent",step:e}),Br=e=>({source:"pure",value:e}),of={superLight:{background:$(50),foreground:$(800),card:Br(zr),cardForeground:$(800),popover:Br(zr),popoverForeground:$(800),primary:bt(600),primaryForeground:bt(50),secondary:$(100),secondaryForeground:$(700),muted:$(100),mutedForeground:$(500),accent:uo(600),accentForeground:uo(50),border:$(200),input:$(200),ring:bt(500)},light:{background:$(50),foreground:$(950),card:Br(zr),cardForeground:$(950),popover:Br(zr),popoverForeground:$(950),primary:bt(500),primaryForeground:bt(50),secondary:$(100),secondaryForeground:$(700),muted:$(100),mutedForeground:$(500),accent:uo(500),accentForeground:uo(50),border:$(200),input:$(200),ring:bt(500)},dark:{background:$(950),foreground:$(50),card:$(900),cardForeground:$(50),popover:$(900),popoverForeground:$(50),primary:bt(400),primaryForeground:bt(950),secondary:$(800),secondaryForeground:$(200),muted:$(800),mutedForeground:$(400),accent:uo(400),accentForeground:uo(950),border:$(800),input:$(800),ring:bt(400)},superDark:{background:Br(ic),foreground:$(100),card:$(950),cardForeground:$(100),popover:$(950),popoverForeground:$(100),primary:bt(300),primaryForeground:bt(950),secondary:$(900),secondaryForeground:$(300),muted:$(900),mutedForeground:$(500),accent:uo(300),accentForeground:uo(950),border:$(900),input:$(900),ring:bt(300)}};function Be(e,t){return e.source==="pure"?e.value:t[e.source][e.step]}function rf(e,t){let o=of[t],r=t==="superLight"||t==="light",n=r?On.light:On.dark;return {background:Be(o.background,e),foreground:Be(o.foreground,e),card:Be(o.card,e),cardForeground:Be(o.cardForeground,e),popover:Be(o.popover,e),popoverForeground:Be(o.popoverForeground,e),primary:Be(o.primary,e),primaryForeground:Be(o.primaryForeground,e),secondary:Be(o.secondary,e),secondaryForeground:Be(o.secondaryForeground,e),muted:Be(o.muted,e),mutedForeground:Be(o.mutedForeground,e),accent:Be(o.accent,e),accentForeground:Be(o.accentForeground,e),border:Be(o.border,e),input:Be(o.input,e),ring:Be(o.ring,e),destructive:n.destructive,destructiveForeground:n.destructiveFg,success:n.success,warning:n.warning,info:n.info,highlight:n.highlight,...(()=>{let a=r?"light":"dark",i=er(n.destructive,a),p=er(n.success,a),s=er(n.warning,a),c=er(n.info,a),d=er(n.highlight,a);return {destructiveSoft:i.soft,destructiveDeep:i.deep,successSoft:p.soft,successDeep:p.deep,warningSoft:s.soft,warningDeep:s.deep,infoSoft:c.soft,infoDeep:c.deep,highlightSoft:d.soft,highlightDeep:d.deep}})()}}var Zt={display:3.75,h1:2.5,h2:2,h3:1.5,h4:1.25,h5:1.125,h6:1,body:1,bodySm:.875},af={compact:.85,default:1,spacious:1.18};function nf(e){let t=af[e.scale],o=r=>`${(r*t).toFixed(3)}rem`;return {fontSans:Aa[e.body],fontMono:Aa[e.mono],fontDisplay:Aa[e.display],headingWeight:e.headingWeight??600,bodyWeight:e.bodyWeight??400,headingTracking:e.headingTracking??"-0.01em",scale:{display:o(Zt.display),h1:o(Zt.h1),h2:o(Zt.h2),h3:o(Zt.h3),h4:o(Zt.h4),h5:o(Zt.h5),h6:o(Zt.h6),body:o(Zt.body),bodySm:o(Zt.bodySm)}}}var sf={sharp:0,subtle:.25,soft:.5,round:.875,pill:1.25};function lf(e){let t=sf[e.style],o=r=>`${r.toFixed(3)}rem`;return {base:o(t),sm:o(Math.max(0,t-.25)),md:o(t),lg:o(t+.25),xl:o(t+.5),"2xl":o(t+1),full:"9999px"}}var df={tight:.85,default:1,roomy:1.2};function cf(e){return {baseUnit:"1rem",densityFactor:df[e.density]}}var pf={none:{sm:"none",md:"none",lg:"none",xl:"none","2xl":"none",inner:"none"},subtle:{sm:"0 1px 2px 0 rgb(0 0 0 / 0.03)",md:"0 2px 4px -1px rgb(0 0 0 / 0.04), 0 1px 2px -1px rgb(0 0 0 / 0.03)",lg:"0 6px 14px -2px rgb(0 0 0 / 0.05)",xl:"0 12px 24px -4px rgb(0 0 0 / 0.06)","2xl":"0 24px 48px -12px rgb(0 0 0 / 0.12)",inner:"inset 0 1px 2px 0 rgb(0 0 0 / 0.03)"},default:{sm:"0 1px 2px 0 rgb(0 0 0 / 0.05)",md:"0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1)",lg:"0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1)",xl:"0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1)","2xl":"0 25px 50px -12px rgb(0 0 0 / 0.25)",inner:"inset 0 2px 4px 0 rgb(0 0 0 / 0.05)"},dramatic:{sm:"0 2px 4px 0 rgb(0 0 0 / 0.12)",md:"0 8px 16px -2px rgb(0 0 0 / 0.18), 0 4px 8px -4px rgb(0 0 0 / 0.12)",lg:"0 20px 32px -4px rgb(0 0 0 / 0.22), 0 8px 16px -8px rgb(0 0 0 / 0.18)",xl:"0 32px 48px -6px rgb(0 0 0 / 0.28), 0 12px 24px -10px rgb(0 0 0 / 0.22)","2xl":"0 48px 80px -16px rgb(0 0 0 / 0.45)",inner:"inset 0 4px 8px 0 rgb(0 0 0 / 0.1)"}};function mf(e){let t=e?.shadows??"default",o=e?.motionIntensity??1,r=n=>`${Math.round(n*o)}ms`;return {shadows:pf[t],motion:{fast:r(150),base:r(200),slow:r(300),slower:r(500)},borderWidth:e?.borderWidth??"1px"}}function Io(e){let t=ef[e.intensity??"default"],o=e.neutralPureGray??false,r=(e.chroma?.neutral??.08)*t,n=(e.chroma?.primary??1)*t,a=(e.chroma?.accent??1)*t,i=o?nc():Da({hue:e.hues.neutral,chromaScale:r}),p=Da({hue:e.hues.primary,chromaScale:n}),s=Da({hue:e.hues.accent,chromaScale:a}),c={neutral:i,primary:p,accent:s},d=tf(e.hues,{primary:n,accent:a},t),m=Object.fromEntries(Qg.map(v=>[v,rf(c,v)])),g=nf(e.typography),u=lf(e.radius),b=cf(e.spacing),f=mf(e.effects),h={buttonShape:e.components?.buttonShape??"default",inputStyle:e.components?.inputStyle??"outlined",cardStyle:e.components?.cardStyle??"flat"};return {id:e.id,name:e.name,description:e.description,tagline:e.tagline,input:e,ramps:c,colors:m,chart:d,typography:g,radius:u,spacing:b,effects:f,components:h}}var _r={id:"calm",name:"Calm",description:"Warm neutrals, terracotta primary, serif typography.",tagline:"Signature",hues:{neutral:40,primary:20,accent:40},chroma:{neutral:.15,primary:.75,accent:.8},intensity:"muted",typography:{display:"fraunces",body:"fraunces",mono:"jetbrainsMono",scale:"default",headingWeight:600,headingTracking:"-0.02em"},spacing:{density:"roomy"},radius:{style:"round"},effects:{shadows:"subtle",motionIntensity:1.25},components:{buttonShape:"pill",inputStyle:"outlined",cardStyle:"outlined"}},Vn={id:"energy",name:"Energy",description:"Teal + indigo \u2014 punchy, cool-tone, modern sans.",tagline:"Alternate",hues:{neutral:175,primary:175,accent:235},chroma:{neutral:.08,primary:1,accent:1},intensity:"vibrant",typography:{display:"geist",body:"geist",mono:"geistMono",scale:"default",headingWeight:600},spacing:{density:"default"},radius:{style:"soft"},effects:{shadows:"default",motionIntensity:1},components:{buttonShape:"default",inputStyle:"outlined",cardStyle:"flat"}},Ia=[_r,Vn];function uf(e){return {"--background":e.background,"--foreground":e.foreground,"--card":e.card,"--card-foreground":e.cardForeground,"--popover":e.popover,"--popover-foreground":e.popoverForeground,"--primary":e.primary,"--primary-foreground":e.primaryForeground,"--secondary":e.secondary,"--secondary-foreground":e.secondaryForeground,"--muted":e.muted,"--muted-foreground":e.mutedForeground,"--accent":e.accent,"--accent-foreground":e.accentForeground,"--destructive":e.destructive,"--destructive-foreground":e.destructiveForeground,"--border":e.border,"--input":e.input,"--ring":e.ring,"--success":e.success,"--warning":e.warning,"--info":e.info,"--highlight":e.highlight,"--destructive-soft":e.destructiveSoft,"--destructive-deep":e.destructiveDeep,"--success-soft":e.successSoft,"--success-deep":e.successDeep,"--warning-soft":e.warningSoft,"--warning-deep":e.warningDeep,"--info-soft":e.infoSoft,"--info-deep":e.infoDeep,"--highlight-soft":e.highlightSoft,"--highlight-deep":e.highlightDeep}}function jn(e,t){let o=e.colors[t];return {...uf(o),...Gn("neutral",e.ramps.neutral),...Gn("primary",e.ramps.primary),...Gn("accent",e.ramps.accent),"--chart-1":e.chart[1],"--chart-2":e.chart[2],"--chart-3":e.chart[3],"--chart-4":e.chart[4],"--chart-5":e.chart[5],"--font-sans":e.typography.fontSans,"--font-mono":e.typography.fontMono,"--font-display":e.typography.fontDisplay,"--font-heading-weight":String(e.typography.headingWeight),"--font-body-weight":String(e.typography.bodyWeight),"--font-heading-tracking":e.typography.headingTracking,"--text-display":e.typography.scale.display,"--text-h1":e.typography.scale.h1,"--text-h2":e.typography.scale.h2,"--text-h3":e.typography.scale.h3,"--text-h4":e.typography.scale.h4,"--text-h5":e.typography.scale.h5,"--text-h6":e.typography.scale.h6,"--text-body":e.typography.scale.body,"--text-body-sm":e.typography.scale.bodySm,"--radius":e.radius.base,"--gds-radius-sm":e.radius.sm,"--gds-radius-md":e.radius.md,"--gds-radius-lg":e.radius.lg,"--gds-radius-xl":e.radius.xl,"--gds-radius-2xl":e.radius["2xl"],"--gds-radius-full":e.radius.full,"--gds-density":String(e.spacing.densityFactor),"--gds-shadow-sm":e.effects.shadows.sm,"--gds-shadow-md":e.effects.shadows.md,"--gds-shadow-lg":e.effects.shadows.lg,"--gds-shadow-xl":e.effects.shadows.xl,"--gds-shadow-2xl":e.effects.shadows["2xl"],"--gds-shadow-inner":e.effects.shadows.inner,"--gds-transition-fast":e.effects.motion.fast,"--gds-transition-base":e.effects.motion.base,"--gds-transition-slow":e.effects.motion.slow,"--gds-transition-slower":e.effects.motion.slower,"--gds-border-width":e.effects.borderWidth}}function Gn(e,t){let o={};for(let r of mo)o[`--ramp-${e}-${r}`]=t[r];return o}function Ha(e,t){if(typeof document>"u")return;let o=document.documentElement,r=jn(e,t);for(let[n,a]of Object.entries(r))o.style.setProperty(n,a);o.setAttribute("data-grade-theme",e.id),o.setAttribute("data-mode",t),o.setAttribute("data-button-shape",e.components.buttonShape??"default"),o.setAttribute("data-input-style",e.components.inputStyle??"outlined"),o.setAttribute("data-card-style",e.components.cardStyle??"flat");}function Or(e){if(typeof document>"u")return "";let t=document.createElement("span");t.style.color=`oklch(${e})`,t.style.position="absolute",t.style.visibility="hidden",document.body.appendChild(t);let o=getComputedStyle(t).color;document.body.removeChild(t);let r=o.match(/\d+/g);if(!r||r.length<3)return "";let[n,a,i]=r.slice(0,3).map(Number);return "#"+[n,a,i].map(p=>Math.max(0,Math.min(255,p)).toString(16).padStart(2,"0")).join("").toUpperCase()}function gf(e){let t=e.trim().split(/\s+/);if(t.length<3)return {oklch:e,hex:""};let[o,r,n]=t.map(Number),a=`${o.toFixed(3)} ${r.toFixed(3)} ${Math.round(n)}`,i=Or(e);return {oklch:a,hex:i}}function Wn(e,t,o){let r=[`### ${e} ramp (hue ${Math.round(o)}\xB0)`,"","| Step | OKLCH | Hex |","|------|-------|-----|"];for(let n of mo){let{oklch:a,hex:i}=gf(t[n]);r.push(`| ${n} | \`${a}\` | \`${i||"\u2014"}\` |`);}return r.join(`
117
- `)}function sc(e,t){let o=[`### ${e}`,"","| Token | Usage | Light (hex) | Dark (hex) |","|-------|-------|-------------|------------|"];for(let r of t){let n=Or(r.light)||"\u2014",a=Or(r.dark)||"\u2014";o.push(`| \`--${r.token}\` | ${r.usage} | \`${n}\` (\`${r.light}\`) | \`${a}\` (\`${r.dark}\`) |`);}return o.join(`
118
- `)}function lc(e){return !e||e.input==null?"{}":JSON.stringify(e.input,null,2)??"{}"}function dc(e){let{input:t,ramps:o,colors:r,chart:n,typography:a,radius:i,spacing:p,effects:s,components:c}=e,d=t.intensity??"default",m=f=>({token:f,usage:ff[f]??"",light:r.light[f],dark:r.dark[f]}),g=["background","foreground","card","cardForeground","popover","popoverForeground","primary","primaryForeground","secondary","secondaryForeground","muted","mutedForeground","accent","accentForeground","border","input","ring"].map(m),u=["destructive","destructiveForeground","success","warning","info","highlight"].map(m),b=[1,2,3,4,5].map(f=>{let h=n[f];return {slot:f,triplet:h,hex:Or(h)||"\u2014"}});return `# ${e.name} \u2014 Grade Design System Theme
114
+ `)),we(240,Ne)}let Mt=_.speed?Qo[_.speed].tokenStagger:Le.speed.tokenStagger,We=Ge.current,cr=We.length>0&&!We.endsWith(`
115
+ `)?We+`
116
+ `:We;await we(60,Ne);for(let tt=0;tt<_.text.length;tt++){if(Ne.aborted)return;let Nt=cr+_.text.slice(0,tt+1);K(Nt),tt<_.text.length-1&&await we(Mt,Ne);}}});v__namespace.useEffect(()=>{q&&xe(ge);},[q,ge]);let Te=b??(a==="typewriter"||q);return v__namespace.createElement("div",{ref:ae,"data-gds-part":"code","data-gds-reveal":a,"data-gds-trigger":i,"data-gds-size":w,className:d("gds-code relative w-full overflow-hidden",tm[w],!h&&["rounded-lg border bg-[var(--gds-code-bg)] text-[var(--gds-code-fg)]","border-border/60"],M),style:A,...H},u&&!h?v__namespace.createElement("div",{"data-gds-part":"code-header",className:"flex items-center justify-between border-b border-border/60 px-4 py-2 text-xs text-muted-foreground"},v__namespace.createElement("span",{className:"font-mono"},u),o?v__namespace.createElement("span",{className:"uppercase tracking-wider opacity-60"},o):null):null,v__namespace.createElement(prismReactRenderer.Highlight,{code:he,language:o,theme:rm},({tokens:_,getLineProps:Le,getTokenProps:Ne})=>v__namespace.createElement("pre",{"data-gds-part":"code-pre",className:d("font-mono leading-relaxed",h?"p-0":"px-0 py-3",g?"whitespace-pre-wrap break-words":"overflow-x-auto whitespace-pre",(x!==void 0||S!==void 0)&&"overflow-y-auto"),style:{background:"transparent",margin:0,...S!==void 0?{height:`calc(${S} * 1lh + 0.5rem)`}:x!==void 0&&x!=="auto"?{height:typeof x=="number"?`${x}px`:x}:null}},_.map((Mt,We)=>{let cr=We+1,tt=nm(cr,n,I),Nt=Le({line:Mt}),pr=We===_.length-1,ur=q&&ue.has(cr),on=Te&&pr&&(!U||b===true),mr=d("flex w-full pr-4",h?"pl-0":"pl-4",tt==="added"&&"bg-[var(--gds-code-diff-added-bg)] text-[var(--gds-code-diff-added-fg)]",tt==="removed"&&"bg-[var(--gds-code-diff-removed-bg)] text-[var(--gds-code-diff-removed-fg)]",tt==="highlight"&&"bg-[var(--gds-code-line-highlight-bg)] shadow-[inset_2px_0_0_0_var(--gds-code-line-highlight-marker)]"),jo=v__namespace.createElement(v__namespace.Fragment,null,Y?v__namespace.createElement("span",{"data-gds-part":"code-gutter",className:d("select-none pr-3 text-right font-mono text-xs leading-relaxed opacity-60",j?"w-10":"w-8"),"aria-hidden":true},j?v__namespace.createElement("span",{className:"inline-block w-3 text-center"},tt==="added"?"+":tt==="removed"?"-":" "):null,m?v__namespace.createElement("span",{className:"ml-1 tabular-nums"},cr):null):null,v__namespace.createElement("span",{className:"flex-1",style:ur?{color:"var(--gds-code-comment)"}:void 0},f&&!ur?v__namespace.createElement("span",{"data-gds-part":"code-prompt","aria-hidden":true,className:"select-none opacity-60",style:{color:"var(--gds-code-comment)"}},f):null,a==="typewriter"&&X&&!q?v__namespace.createElement(im,{line:Mt,getTokenProps:Ne,delay:me+F+We*Ke,stagger:Ke}):Mt.map((Bp,Op)=>v__namespace.createElement("span",{key:Op,...Ne({token:Bp})})),on&&!ur?v__namespace.createElement(ya,{"data-gds-part":"code-cursor"}):null));return a==="none"||a==="typewriter"||q||!X?v__namespace.createElement("div",{key:We,...Nt,className:d(Nt.className,mr),style:{...Nt.style,opacity:i!=="mount"&&!X&&a!=="none"?0:void 0}},jo):v__namespace.createElement(react.motion.div,{key:We,...Nt,className:d(Nt.className,mr),initial:{opacity:0,y:a==="diff"?tt==="removed"?-4:6:4},animate:{opacity:1,y:0},transition:{delay:(me+F+We*Ke)/1e3,duration:z.fadeMs/1e3,ease:[.22,1,.36,1]},style:Nt.style},jo)}))))});Il.displayName="Code";function im({line:e,getTokenProps:t,delay:o,stagger:r}){let n=0;return v__namespace.createElement(v__namespace.Fragment,null,e.map((a,i)=>{let p=/^\s*$/.test(a.content),s=t({token:a});if(p)return v__namespace.createElement("span",{key:i,...s});let c=n++;return v__namespace.createElement(react.motion.span,{key:i,...s,initial:{opacity:0},animate:{opacity:1},transition:{delay:(o+c*r)/1e3,duration:.12}})}))}var sm={default:{row:"gap-3",content:"space-y-1",author:"text-sm font-semibold",meta:"text-xs",body:"text-sm leading-relaxed",thread:"text-xs"},compact:{row:"gap-2",content:"space-y-0.5",author:"text-xs font-semibold",meta:"text-[10px]",body:"text-xs leading-relaxed",thread:"text-[11px]"}},lm=v__namespace.forwardRef(function({author:t,timestamp:o,avatar:r,badge:n,edited:a,pinned:i,actions:p,reactions:s,threadCount:c,onThreadClick:l,align:m="start",density:u="default",className:g,children:h,...f},b){let y=m==="end",R=a===true?"(edited)":a||void 0,w=sm[u];return v__namespace.createElement("div",{ref:b,"data-gds-part":"message","data-gds-align":m,"data-gds-density":u,"data-gds-pinned":i?"true":void 0,className:d("flex items-start",w.row,y&&"flex-row-reverse",g),...f},r&&v__namespace.createElement("div",{"data-gds-part":"message-avatar",className:"flex-shrink-0"},r),v__namespace.createElement("div",{"data-gds-part":"message-content",className:d("flex-1 min-w-0",w.content,y&&"text-right")},i&&v__namespace.createElement("div",{"data-gds-part":"message-pinned",className:d("flex items-center gap-1 text-[10px] uppercase tracking-wider text-muted-foreground",y&&"flex-row-reverse")},v__namespace.createElement("svg",{"aria-hidden":"true",viewBox:"0 0 16 16",className:"h-3 w-3",fill:"currentColor"},v__namespace.createElement("path",{d:"M9.828.722a.5.5 0 0 1 .707 0l4.743 4.743a.5.5 0 0 1 0 .707l-2.121 2.121a.5.5 0 0 1-.354.146h-1.792l-3.586 3.586v2.293a.5.5 0 0 1-.854.354L4.146 12.39 1 15.535V14.12l3.146-3.146-1.293-1.293a.5.5 0 0 1 .354-.854h2.293l3.586-3.586V3.45a.5.5 0 0 1 .146-.354L9.828.722Z"})),"Pinned"),v__namespace.createElement("div",{"data-gds-part":"message-header",className:d("flex items-baseline gap-2 flex-wrap",y&&"flex-row-reverse")},v__namespace.createElement("span",{"data-gds-part":"message-author",className:w.author},t),n&&v__namespace.createElement("div",{"data-gds-part":"message-badge"},n),o&&v__namespace.createElement("span",{"data-gds-part":"message-timestamp",className:d(w.meta,"text-muted-foreground")},o),R&&v__namespace.createElement("span",{"data-gds-part":"message-edited",className:d(w.meta,"text-muted-foreground")},R),p&&v__namespace.createElement("div",{"data-gds-part":"message-actions",className:d(y?"mr-auto":"ml-auto")},p)),v__namespace.createElement("div",{"data-gds-part":"message-body",className:w.body},h),s&&v__namespace.createElement("div",{"data-gds-part":"message-reactions",className:d("flex flex-wrap gap-1 pt-1",y&&"justify-end")},s),typeof c=="number"&&c>0&&v__namespace.createElement("button",{type:"button","data-gds-part":"message-thread",onClick:l,className:d("inline-flex items-center gap-1 font-medium",w.thread,"text-primary hover:underline","focus:outline-none focus-visible:ring-2 focus-visible:ring-primary rounded",y&&"flex-row-reverse")},v__namespace.createElement("svg",{"aria-hidden":"true",viewBox:"0 0 16 16",className:"h-3 w-3",fill:"currentColor"},v__namespace.createElement("path",{d:"M2 3a1 1 0 0 1 1-1h10a1 1 0 0 1 1 1v6a1 1 0 0 1-1 1H6.414l-2.707 2.707A1 1 0 0 1 2 12V3Z"})),c," ",c===1?"reply":"replies")))});function Qm({onSubmit:e,enabled:t}){let[o]=LexicalComposerContext.useLexicalComposerContext();return v__namespace.useEffect(()=>{if(t)return o.registerCommand(lexical.KEY_ENTER_COMMAND,r=>r&&r.shiftKey?false:(r?.preventDefault(),e(),true),lexical.COMMAND_PRIORITY_HIGH)},[o,t,e]),null}function eg({onImageFiles:e,enabled:t}){let[o]=LexicalComposerContext.useLexicalComposerContext();return v__namespace.useEffect(()=>{if(!t)return;let r=o.getRootElement();if(!r)return;let n=a=>{let p=Array.from(a.clipboardData?.items??[]).filter(s=>s.kind==="file"&&s.type.startsWith("image/")).map(s=>s.getAsFile()).filter(s=>s!==null);p.length>0&&(a.preventDefault(),e(p));};return r.addEventListener("paste",n),()=>r.removeEventListener("paste",n)},[o,t,e]),null}function tg({enabled:e}){let[t]=LexicalComposerContext.useLexicalComposerContext();return v__namespace.useEffect(()=>{e&&t.focus();},[t,e]),null}var Fl={bold:"bold",italic:"italic",underline:"underline",strikethrough:"strikethrough",code:"code"};function zl(e,t){let o=Fl[t];if(o){e.dispatchCommand(lexical.FORMAT_TEXT_COMMAND,o);return}if(t==="ul"){e.dispatchCommand(list.INSERT_UNORDERED_LIST_COMMAND,void 0);return}if(t==="ol"){e.dispatchCommand(list.INSERT_ORDERED_LIST_COMMAND,void 0);return}e.update(()=>{let r=lexical.$getSelection();if(lexical.$isRangeSelection(r)){if(t==="h1"||t==="h2"||t==="h3"){let n=t;selection.$setBlocksType(r,()=>richText.$createHeadingNode(n));return}(t==="blockquote"||t==="pullquote")&&selection.$setBlocksType(r,()=>{let n=richText.$createQuoteNode();return t==="pullquote"&&(n.__pullquote=true),n});}});}function og(e,t,o,r){e.update(()=>{let n=lexical.$getSelection();if(!lexical.$isRangeSelection(n))return;let a=lexicalBeautifulMentions.$createBeautifulMentionNode(t,o,r);n.insertNodes([a]),n.insertText(" ");});}function rg(e,t){let o=false;return e.update(()=>{let r=lexical.$getRoot(),a=r.getTextContent().indexOf(t);if(a===-1)return;let i=0,p=null,s=0,c=null,l=0,m=u=>{if(!(p&&c)){if(u.getType()==="text"){let g=u,h=g.getTextContentSize(),f=i,b=i+h;!p&&a>=f&&a<b&&(p=g,s=a-f);let y=a+t.length;!c&&y>f&&y<=b&&(c=g,l=y-f),i=b;return}if("getChildren"in u)for(let g of u.getChildren())m(g);else i+=u.getTextContentSize();}};if(m(r),p&&c){let u=p,g=c;u.select(s,0).focus.set(g.getKey(),l,"text"),o=true;}}),o}function Er(e){e.update(()=>{let t=lexical.$getRoot();t.clear();let o=lexical.$createParagraphNode();t.append(o),o.select();});}function _l(e){let t="",o="",r=[];return e.getEditorState().read(()=>{t=lexical.$getRoot().getTextContent(),o=JSON.stringify(e.getEditorState().toJSON());let n=a=>{if(a.getType()==="beautifulMention"){let i=a;r.push({trigger:i.getTrigger(),value:i.getValue(),data:i.getData()});}if("getChildren"in a)for(let i of a.getChildren())n(i);};n(lexical.$getRoot());}),{text:t,json:o,mentions:r}}var ag=[{format:"bold",icon:lucideReact.Bold,label:"Bold"},{format:"italic",icon:lucideReact.Italic,label:"Italic"},{format:"underline",icon:lucideReact.Underline,label:"Underline"},{format:"strikethrough",icon:lucideReact.Strikethrough,label:"Strikethrough"},{format:"code",icon:lucideReact.Code,label:"Inline code"},{format:"h1",icon:lucideReact.Heading1,label:"Heading 1"},{format:"h2",icon:lucideReact.Heading2,label:"Heading 2"},{format:"h3",icon:lucideReact.Heading3,label:"Heading 3"},{format:"blockquote",icon:lucideReact.Quote,label:"Blockquote"},{format:"ul",icon:lucideReact.List,label:"Bulleted list"},{format:"ol",icon:lucideReact.ListOrdered,label:"Numbered list"}];function ng({formats:e}){let[t]=LexicalComposerContext.useLexicalComposerContext(),[o,r]=v__namespace.useState(()=>new Set);v__namespace.useEffect(()=>utils.mergeRegister(t.registerUpdateListener(({editorState:a})=>{a.read(()=>{let i=lexical.$getSelection();if(!lexical.$isRangeSelection(i))return;let p=new Set;for(let s of ["bold","italic","underline","strikethrough","code"])i.hasFormat(s)&&p.add(s);r(p);});})),[t]);let n=ag.filter(a=>e.includes(a.format));return v__namespace.createElement("div",{"data-gds-part":"composer-toolbar",className:d("flex flex-wrap items-center gap-0.5","px-2 py-1")},n.map(({format:a,icon:i,label:p})=>{let s=Fl[a],c=s?o.has(s):false;return v__namespace.createElement("button",{key:a,type:"button","aria-label":p,title:p,"data-gds-part":"composer-toolbar-button","data-gds-active":c?"true":"false",onClick:()=>zl(t,a),className:d("h-7 w-7 inline-flex items-center justify-center rounded","text-[var(--gds-composer-toolbar-fg)]","hover:bg-[var(--gds-composer-toolbar-hover-bg)]","focus:outline-none focus:ring-2 focus:ring-primary",c&&"bg-[var(--gds-composer-toolbar-active-bg)] text-[var(--gds-composer-toolbar-active-fg)]")},v__namespace.createElement(i,{className:"h-3.5 w-3.5"}))}))}function ig({attachments:e,onRemove:t}){return v__namespace.createElement(react.AnimatePresence,{initial:false},e.length>0&&v__namespace.createElement(react.motion.div,{initial:{opacity:0,height:0},animate:{opacity:1,height:"auto"},exit:{opacity:0,height:0},transition:{duration:.18},className:"overflow-hidden"},v__namespace.createElement("div",{"data-gds-part":"composer-attachments",className:"flex flex-wrap gap-2 px-2 py-2"},e.map(o=>v__namespace.createElement("div",{key:o.id,className:"relative group"},o.file.type.startsWith("image/")?v__namespace.createElement("img",{src:o.previewUrl,alt:o.name,className:"h-14 w-14 rounded-md object-cover border border-[var(--gds-composer-border)]"}):v__namespace.createElement("div",{className:"h-14 w-14 rounded-md border border-[var(--gds-composer-border)] flex items-center justify-center text-xs px-1 text-center text-[var(--gds-composer-muted-fg)]"},o.name.slice(0,18)),v__namespace.createElement("button",{type:"button",onClick:()=>t(o.id),"aria-label":`Remove ${o.name}`,className:d("absolute -top-1.5 -right-1.5 h-5 w-5 rounded-full","bg-[var(--gds-composer-chip-remove-bg)]","text-[var(--gds-composer-chip-remove-fg)]","flex items-center justify-center","opacity-0 group-hover:opacity-100 focus:opacity-100","focus:outline-none focus:ring-2 focus:ring-primary","transition-opacity")},v__namespace.createElement(lucideReact.X,{className:"w-3 h-3"})))))))}function sg({placeholder:e,triggers:t,attachmentsCfg:o,formatList:r,showToolbar:n,isLoading:a,onStop:i,maxLength:p,autoFocus:s,submitOnEnter:c=true,leftActions:l,rightActions:m,hideSend:u,steps:g,trigger:h="mount",play:f,speed:b="normal",loop:y=false,loopDelay:R,onLoopReset:w,bare:x,className:S,onSubmit:M,onChange:A,readOnly:H,handleEditorReady:W,submitRef:z,restartRef:F,attachments:B,setAttachments:q,ingestImages:ie}){let[N]=LexicalComposerContext.useLexicalComposerContext(),ue=v__namespace.useRef(null),k=v__namespace.useRef(null),[G,he]=v__namespace.useState(false);v__namespace.useEffect(()=>{W(N);},[N,W]),v__namespace.useEffect(()=>{N.setEditable(!H);},[N,H]);let I=v__namespace.useRef(A);I.current=A,v__namespace.useEffect(()=>N.registerUpdateListener(({editorState:E})=>{E.read(()=>{let me=lexical.$getRoot().getTextContent();he(me.trim().length>0),I.current?.(me);});}),[N]);let j=v__namespace.useCallback(()=>{if(a)return;let E=_l(N),me=E.text.trim().length>0,X=B.length>0;!me&&!X||(M?.(E,X?B:void 0),Er(N),B.forEach(Ke=>URL.revokeObjectURL(Ke.previewUrl)),q([]));},[N,a,B,M,q]);z.current=j;let{restart:Y}=mo({steps:g,speed:b,trigger:h,play:f,loop:y,loopDelay:R,containerRef:ue,onLoopReset:()=>{Er(N),w?.();},interpret:async(E,me)=>{let X=me.signal;if(E.type==="wait")return we(E.ms,X);if(E.type==="clear")return Er(N),we(120,X);if(E.type==="newline")return N.update(()=>{let ve=lexical.$getSelection();lexical.$isRangeSelection(ve)&&ve.insertParagraph();}),we(60,X);if(E.type==="submit")return j(),we(120,X);if(E.type==="format")return zl(N,E.format),N.update(()=>{let ve=lexical.$getSelection();if(!lexical.$isRangeSelection(ve)||ve.isCollapsed())return;let ke=ve.focus;ve.anchor.set(ke.key,ke.offset,ke.type);}),we(80,X);if(E.type==="select")return rg(N,E.text),we(120,X);if(E.type==="mention")return E.query&&(N.update(()=>{let ve=lexical.$getSelection();lexical.$isRangeSelection(ve)&&ve.insertText(E.trigger);}),await ba(E.query,ve=>{N.update(()=>{let ke=lexical.$getRoot(),qe=ke.getTextContent(),Ge=qe.slice(0,qe.length-E.trigger.length-(ve.length-1));ke.clear();let O=lexical.$createParagraphNode();Ge&&O.append(lexical.$createTextNode(Ge)),O.append(lexical.$createTextNode(E.trigger+ve)),ke.append(O);});},me.speed.tokenStagger,X),await we(180,X),N.update(()=>{let ve=lexical.$getRoot(),ke=ve.getTextContent(),qe=E.trigger.length+E.query.length,Ge=ke.slice(0,ke.length-qe);ve.clear();let O=lexical.$createParagraphNode();Ge&&O.append(lexical.$createTextNode(Ge)),ve.append(O),O.select();})),og(N,E.trigger,E.value),we(120,X);let Ke=E.speed?{slow:70,normal:22,fast:8}[E.speed]:me.speed.tokenStagger;for(let ve=0;ve<E.text.length;ve++){if(X.aborted)return;let ke=E.text[ve];N.update(()=>{let qe=lexical.$getSelection();if(!lexical.$isRangeSelection(qe)){lexical.$getRoot().selectEnd();let Ge=lexical.$getSelection();lexical.$isRangeSelection(Ge)&&Ge.insertText(ke);return}qe.insertText(ke);}),ve<E.text.length-1&&await we(Ke,X);}}});v__namespace.useEffect(()=>{F.current=E=>{Er(N),Y(E);};},[N,Y,F]);let ae=!H&&!m&&!u,U=!H&&!l&&o!==null,xe=!H&&(U||l||ae||m);return v__namespace.createElement("div",{ref:ue,"data-gds-part":"composer","data-gds-loading":a?"true":"false",className:d("w-full",!x&&["rounded-md","bg-transparent","border border-input","shadow-sm","focus-within:outline-none focus-within:ring-1 focus-within:ring-ring","transition-colors"],S)},n&&v__namespace.createElement(ng,{formats:r}),o&&v__namespace.createElement(ig,{attachments:B,onRemove:E=>{q(me=>{let X=me.find(Ke=>Ke.id===E);return X&&URL.revokeObjectURL(X.previewUrl),me.filter(Ke=>Ke.id!==E)});}}),v__namespace.createElement("div",{className:"relative"},v__namespace.createElement(LexicalRichTextPlugin.RichTextPlugin,{contentEditable:v__namespace.createElement(LexicalContentEditable.ContentEditable,{"data-gds-part":"composer-editor",className:d("outline-none","px-3 sm:px-4 py-3","text-sm text-[var(--gds-composer-fg)]","min-h-[44px] max-h-[300px] overflow-y-auto","[&_p]:m-0 [&_p+p]:mt-2","[&_h1]:text-xl [&_h1]:font-semibold [&_h1]:mt-2","[&_h2]:text-lg [&_h2]:font-semibold [&_h2]:mt-2","[&_h3]:text-base [&_h3]:font-semibold [&_h3]:mt-2","[&_ul]:list-disc [&_ul]:pl-5 [&_ol]:list-decimal [&_ol]:pl-5","[&_blockquote]:border-l-2 [&_blockquote]:border-[var(--gds-composer-border)] [&_blockquote]:pl-3 [&_blockquote]:italic","[&_code]:bg-[var(--gds-composer-toolbar-active-bg)] [&_code]:px-1 [&_code]:py-0.5 [&_code]:rounded [&_code]:text-xs [&_code]:font-mono",a&&"opacity-60 pointer-events-none"),"aria-placeholder":e??"",placeholder:v__namespace.createElement("div",{"data-gds-part":"composer-placeholder",className:"absolute top-3 left-3 sm:left-4 text-sm text-muted-foreground pointer-events-none select-none"},e),spellCheck:true}),ErrorBoundary:LexicalErrorBoundary.LexicalErrorBoundary}),v__namespace.createElement(LexicalHistoryPlugin.HistoryPlugin,null),v__namespace.createElement(LexicalListPlugin.ListPlugin,null),v__namespace.createElement(LexicalLinkPlugin.LinkPlugin,null),v__namespace.createElement(LexicalOnChangePlugin.OnChangePlugin,{onChange:()=>{}}),v__namespace.createElement(tg,{enabled:!!s}),v__namespace.createElement(Qm,{onSubmit:j,enabled:c}),o&&v__namespace.createElement(eg,{onImageFiles:ie,enabled:true}),t.length>0&&v__namespace.createElement(lexicalBeautifulMentions.BeautifulMentionsPlugin,{items:t.reduce((E,me)=>(typeof me.items=="function"||(E[me.char]=me.items.map(X=>({value:X.value}))),E),{})})),xe&&v__namespace.createElement("div",{"data-gds-part":"composer-actions",className:"flex items-center justify-between gap-2 px-2 pb-2 pt-1"},v__namespace.createElement("div",{className:"flex items-center gap-1"},l??(U&&v__namespace.createElement("button",{type:"button",onClick:()=>k.current?.click(),disabled:a,"aria-label":"Attach image",title:"Attach image",className:d("h-8 w-8 rounded-lg flex items-center justify-center","text-[var(--gds-composer-action-fg)]","hover:text-[var(--gds-composer-fg)]","hover:bg-[var(--gds-composer-toolbar-hover-bg)]","focus:outline-none focus:ring-2 focus:ring-primary","transition-colors","disabled:opacity-50 disabled:cursor-not-allowed")},v__namespace.createElement(lucideReact.Paperclip,{className:"w-4 h-4"})))),m??(ae&&v__namespace.createElement("button",{type:"button",onClick:a?i:j,disabled:a?!i:!G&&B.length===0,"aria-label":a?"Stop":"Send",className:d("h-8 w-8 rounded-lg flex items-center justify-center transition-colors flex-shrink-0","focus:outline-none focus:ring-2 focus:ring-primary",a?"bg-red-500 hover:bg-red-600 text-white disabled:opacity-50":G||B.length>0?"bg-primary hover:bg-primary/90 text-primary-foreground":"bg-[var(--gds-composer-toolbar-active-bg)] text-[var(--gds-composer-muted-fg)] cursor-not-allowed")},a?v__namespace.createElement(lucideReact.Square,{className:"w-3.5 h-3.5"}):v__namespace.createElement(lucideReact.Send,{className:"w-3.5 h-3.5"}))),o&&v__namespace.createElement("input",{ref:k,type:"file",accept:o.accept,multiple:o.multiple,onChange:E=>{E.target.files&&ie(Array.from(E.target.files)),E.target.value="";},className:"sr-only",tabIndex:-1,"aria-hidden":"true"})))}var Bl=v__namespace.forwardRef(function(t,o){let{initialText:r,initialJson:n,formats:a,toolbar:i,triggers:p,attachments:s,...c}=t,l=v__namespace.useMemo(()=>a===false?[]:a??["bold","italic","underline","strikethrough","code","h1","h2","blockquote","ul","ol"],[a]),m=i===true||i==="top",u=v__namespace.useMemo(()=>{if(!s)return null;let z=s===true?{}:s;return z.enabled===false?null:{enabled:true,accept:z.accept??"image/*",maxItems:z.maxItems??10,multiple:z.multiple??true}},[s]),[g,h]=v__namespace.useState([]),f=v__namespace.useRef(g);f.current=g,v__namespace.useEffect(()=>()=>{f.current.forEach(z=>URL.revokeObjectURL(z.previewUrl));},[]);let b=v__namespace.useCallback(z=>{if(!u)return;let F=z.filter(B=>u.accept?u.accept==="image/*"?B.type.startsWith("image/"):u.accept.split(",").some(q=>{let ie=q.trim();return ie.endsWith("/*")?B.type.startsWith(ie.slice(0,-1)):B.type===ie||B.name.toLowerCase().endsWith(ie)}):true);F.length!==0&&h(B=>{let q=u.maxItems-B.length;if(q<=0)return B;let ie=F.slice(0,q).map(N=>({id:`${N.name}-${N.size}-${Date.now()}-${Math.random().toString(36).slice(2,8)}`,file:N,previewUrl:URL.createObjectURL(N),name:N.name}));return [...B,...ie]});},[u]),y=v__namespace.useRef(null),R=v__namespace.useRef(()=>{}),w=v__namespace.useRef(()=>{}),x=v__namespace.useCallback(z=>{y.current=z;},[]);v__namespace.useImperativeHandle(o,()=>({play:z=>{console.warn('[Composer] handle.play(steps) is not wired in v1 \u2014 pass `steps` + `trigger="manual"` and toggle `play` instead.');},stop:()=>{},restart:z=>w.current(z),focus:()=>y.current?.focus(),clear:()=>{let z=y.current;z&&Er(z);},insert:z=>{y.current?.update(()=>{let F=lexical.$getSelection();lexical.$isRangeSelection(F)&&F.insertText(z);});},getContent:()=>y.current?_l(y.current):{text:"",json:"",mentions:[]},getEditor:()=>y.current}),[]);let S=v__namespace.useMemo(()=>({paragraph:"gds-composer-paragraph",quote:"gds-composer-quote",heading:{h1:"gds-composer-h1",h2:"gds-composer-h2",h3:"gds-composer-h3"},list:{ul:"gds-composer-ul",ol:"gds-composer-ol",listitem:"gds-composer-li"},text:{bold:"font-semibold",italic:"italic",underline:"underline",strikethrough:"line-through",code:"gds-composer-code"},beautifulMentions:{"@":"gds-composer-mention px-1.5 py-0.5 mx-0.5 rounded bg-primary/10 text-primary font-medium","/":"gds-composer-mention px-1.5 py-0.5 mx-0.5 rounded bg-violet-500/15 text-violet-600 dark:text-violet-400 font-medium"}}),[]),M=v__namespace.useMemo(()=>({namespace:"gds-composer",theme:S,onError:z=>{console.error("[Composer]",z);},nodes:[richText.HeadingNode,richText.QuoteNode,list.ListNode,list.ListItemNode,link.LinkNode,link.AutoLinkNode,code.CodeNode,code.CodeHighlightNode,lexicalBeautifulMentions.BeautifulMentionNode],editorState:n||(r?z=>{let F=lexical.$getRoot(),B=lexical.$createParagraphNode();B.append(lexical.$createTextNode(r)),F.append(B);}:void 0)}),[S,n,r]),A=l.length>0,{readOnly:H=false,...W}=c;return v__namespace.createElement(LexicalComposer.LexicalComposer,{initialConfig:{...M,editable:!H}},v__namespace.createElement(sg,{...W,readOnly:H,triggers:p??[],attachmentsCfg:H?null:u,formatList:l,showToolbar:m&&A&&!H,handleEditorReady:x,submitRef:R,restartRef:w,attachments:g,setAttachments:h,ingestImages:b}))}),lg=v__namespace.forwardRef(function(t,o){return v__namespace.createElement(Bl,{ref:o,placeholder:"Write a reply\u2026",formats:false,submitOnEnter:false,...t})});var Ot=It__namespace.Root,Vt=It__namespace.Trigger,dg=It__namespace.Anchor,Ht=v__namespace.forwardRef(({className:e,align:t="center",sideOffset:o=4,surface:r="solid",...n},a)=>v__namespace.createElement(It__namespace.Portal,null,v__namespace.createElement(It__namespace.Content,{ref:a,align:t,sideOffset:o,"data-surface":r,className:d("z-50 w-72 rounded-md border p-4 text-popover-foreground shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 origin-[--radix-popover-content-transform-origin]",At(r,"bg-popover"),ht[r],e),...n})));Ht.displayName=It__namespace.Content.displayName;var cg="PPP",pg="LLL dd, y";function ug({value:e,onChange:t,placeholder:o="Pick a date",disabled:r,className:n,contentClassName:a,align:i="start",side:p,format:s=cg,captionLayout:c,icon:l,"aria-label":m}){return v__namespace.createElement(Ot,null,v__namespace.createElement(Vt,{asChild:true},v__namespace.createElement(dt,{type:"button",variant:"outline",disabled:r,"aria-label":m??(e?void 0:o),"data-empty":!e,className:d("w-[280px] justify-start text-left font-normal data-[empty=true]:text-muted-foreground",n)},l??v__namespace.createElement(lucideReact.CalendarIcon,{className:"mr-2 h-4 w-4","aria-hidden":true}),e?dateFns.format(e,s):v__namespace.createElement("span",null,o))),v__namespace.createElement(Ht,{className:d("w-auto p-0",a),align:i,side:p},v__namespace.createElement(la,{mode:"single",selected:e,onSelect:t,captionLayout:c,initialFocus:true})))}function mg({value:e,onChange:t,placeholder:o="Pick a date range",disabled:r,className:n,contentClassName:a,align:i="start",side:p,format:s=pg,captionLayout:c,icon:l,numberOfMonths:m=2,"aria-label":u}){let g=!!e?.from;return v__namespace.createElement(Ot,null,v__namespace.createElement(Vt,{asChild:true},v__namespace.createElement(dt,{type:"button",variant:"outline",disabled:r,"aria-label":u??(g?void 0:o),"data-empty":!g,className:d("w-[300px] justify-start text-left font-normal data-[empty=true]:text-muted-foreground",n)},l??v__namespace.createElement(lucideReact.CalendarIcon,{className:"mr-2 h-4 w-4","aria-hidden":true}),e?.from?e.to?v__namespace.createElement(v__namespace.Fragment,null,dateFns.format(e.from,s)," \u2013"," ",dateFns.format(e.to,s)):dateFns.format(e.from,s):v__namespace.createElement("span",null,o))),v__namespace.createElement(Ht,{className:d("w-auto p-0",a),align:i,side:p},v__namespace.createElement(la,{mode:"range",selected:e,onSelect:t,defaultMonth:e?.from,numberOfMonths:m,captionLayout:c,initialFocus:true})))}var fg=Ie__namespace.Root,hg=Ie__namespace.Trigger,Vl=Ie__namespace.Portal,bg=Ie__namespace.Close,hn=v__namespace.forwardRef(({className:e,...t},o)=>v__namespace.createElement(Ie__namespace.Overlay,{ref:o,className:d("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t}));hn.displayName=Ie__namespace.Overlay.displayName;var Gl=v__namespace.forwardRef(({className:e,children:t,surface:o="solid",...r},n)=>v__namespace.createElement(Vl,null,v__namespace.createElement(hn,null),v__namespace.createElement(Ie__namespace.Content,{ref:n,"data-surface":o,className:d("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",At(o,"bg-background"),ht[o],e),...r},t,v__namespace.createElement(Ie__namespace.Close,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground"},v__namespace.createElement(lucideReact.X,{className:"h-4 w-4"}),v__namespace.createElement("span",{className:"sr-only"},"Close")))));Gl.displayName=Ie__namespace.Content.displayName;var Wl=({className:e,...t})=>v__namespace.createElement("div",{className:d("flex flex-col space-y-1.5 text-center sm:text-left",e),...t});Wl.displayName="DialogHeader";var jl=({className:e,...t})=>v__namespace.createElement("div",{className:d("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});jl.displayName="DialogFooter";var $l=v__namespace.forwardRef(({className:e,...t},o)=>v__namespace.createElement(Ie__namespace.Title,{ref:o,className:d("text-lg font-semibold leading-none tracking-tight",e),...t}));$l.displayName=Ie__namespace.Title.displayName;var Ul=v__namespace.forwardRef(({className:e,...t},o)=>v__namespace.createElement(Ie__namespace.Description,{ref:o,className:d("text-sm text-muted-foreground",e),...t}));Ul.displayName=Ie__namespace.Description.displayName;var wg=ne__namespace.Root,Rg=ne__namespace.Trigger,Do=v__namespace.createContext("default"),Kl=e=>e==="default"?"px-2 py-1.5 text-sm":"px-2 py-1 text-xs",Sg=ne__namespace.Group,kg=ne__namespace.Portal,Cg=ne__namespace.Sub,Tg=ne__namespace.RadioGroup,ql=v__namespace.forwardRef(({className:e,inset:t,children:o,...r},n)=>{let a=v__namespace.useContext(Do);return v__namespace.createElement(ne__namespace.SubTrigger,{ref:n,className:d("flex cursor-default select-none items-center gap-2 rounded-sm outline-none focus:bg-accent data-[state=open]:bg-accent [&_svg]:pointer-events-none [&_svg]:shrink-0",Kl(a),a==="default"?"[&_svg]:size-4":"[&_svg]:size-3.5",t&&(a==="default"?"pl-8":"pl-7"),e),...r},o,v__namespace.createElement(lucideReact.ChevronRight,{className:"ml-auto"}))});ql.displayName=ne__namespace.SubTrigger.displayName;var Zl=v__namespace.forwardRef(({className:e,surface:t="solid",size:o="default",children:r,...n},a)=>v__namespace.createElement(ne__namespace.SubContent,{ref:a,"data-surface":t,className:d("z-50 min-w-[8rem] overflow-hidden rounded-md border text-popover-foreground shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 origin-[--radix-dropdown-menu-content-transform-origin]",o==="default"?"p-1":"p-0.5",At(t,"bg-popover"),ht[t],e),...n},v__namespace.createElement(Do.Provider,{value:o},r)));Zl.displayName=ne__namespace.SubContent.displayName;var Yl=v__namespace.forwardRef(({className:e,sideOffset:t=4,surface:o="solid",size:r="default",children:n,...a},i)=>v__namespace.createElement(ne__namespace.Portal,null,v__namespace.createElement(ne__namespace.Content,{ref:i,sideOffset:t,"data-surface":o,className:d("z-50 max-h-[var(--radix-dropdown-menu-content-available-height)] min-w-[8rem] overflow-y-auto overflow-x-hidden rounded-md border text-popover-foreground shadow-md",r==="default"?"p-1":"p-0.5","data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 origin-[--radix-dropdown-menu-content-transform-origin]",At(o,"bg-popover"),ht[o],e),...a},v__namespace.createElement(Do.Provider,{value:r},n))));Yl.displayName=ne__namespace.Content.displayName;var Xl=v__namespace.forwardRef(({className:e,inset:t,...o},r)=>{let n=v__namespace.useContext(Do);return v__namespace.createElement(ne__namespace.Item,{ref:r,className:d("relative flex cursor-default select-none items-center gap-2 rounded-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&>svg]:shrink-0",Kl(n),n==="default"?"[&>svg]:size-4":"[&>svg]:size-3.5",t&&(n==="default"?"pl-8":"pl-7"),e),...o})});Xl.displayName=ne__namespace.Item.displayName;var Jl=v__namespace.forwardRef(({className:e,children:t,checked:o,...r},n)=>{let i=v__namespace.useContext(Do)!=="default";return v__namespace.createElement(ne__namespace.CheckboxItem,{ref:n,className:d("relative flex cursor-default select-none items-center rounded-sm pr-2 outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",i?"py-1 pl-7 text-xs":"py-1.5 pl-8 text-sm",e),checked:o,...r},v__namespace.createElement("span",{className:d("absolute flex items-center justify-center",i?"left-1.5 h-3 w-3":"left-2 h-3.5 w-3.5")},v__namespace.createElement(ne__namespace.ItemIndicator,null,v__namespace.createElement(lucideReact.Check,{className:i?"h-3 w-3":"h-4 w-4"}))),t)});Jl.displayName=ne__namespace.CheckboxItem.displayName;var Ql=v__namespace.forwardRef(({className:e,children:t,...o},r)=>{let a=v__namespace.useContext(Do)!=="default";return v__namespace.createElement(ne__namespace.RadioItem,{ref:r,className:d("relative flex cursor-default select-none items-center rounded-sm pr-2 outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",a?"py-1 pl-7 text-xs":"py-1.5 pl-8 text-sm",e),...o},v__namespace.createElement("span",{className:d("absolute flex items-center justify-center",a?"left-1.5 h-3 w-3":"left-2 h-3.5 w-3.5")},v__namespace.createElement(ne__namespace.ItemIndicator,null,v__namespace.createElement(lucideReact.Circle,{className:"h-2 w-2 fill-current"}))),t)});Ql.displayName=ne__namespace.RadioItem.displayName;var ed=v__namespace.forwardRef(({className:e,inset:t,...o},r)=>{let n=v__namespace.useContext(Do);return v__namespace.createElement(ne__namespace.Label,{ref:r,className:d("font-semibold",n==="default"?"px-2 py-1.5 text-sm":"px-2 py-1 text-xs",t&&(n==="default"?"pl-8":"pl-7"),e),...o})});ed.displayName=ne__namespace.Label.displayName;var td=v__namespace.forwardRef(({className:e,...t},o)=>v__namespace.createElement(ne__namespace.Separator,{ref:o,className:d("-mx-1 my-1 h-px bg-muted",e),...t}));td.displayName=ne__namespace.Separator.displayName;var od=({className:e,...t})=>v__namespace.createElement("span",{className:d("ml-auto text-xs tracking-widest opacity-60",e),...t});od.displayName="DropdownMenuShortcut";var rd=classVarianceAuthority.cva("flex w-full rounded-md border border-input bg-transparent shadow-sm transition-colors file:border-0 file:bg-transparent file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50",{variants:{size:{default:"h-9 pl-3 pr-3 py-1 text-base file:text-sm md:text-sm",sm:"h-8 pl-2 pr-2 py-1 text-sm file:text-xs",xs:"h-7 pl-2 pr-2 py-0 text-xs file:text-xs shadow-none","2xs":"h-6 rounded-lg pl-1.5 pr-2 py-0 text-2xs file:text-2xs shadow-none"}},defaultVariants:{size:"default"}}),Mg={default:{startPad:"pl-9",endPad:"pr-9",startInset:"pl-3",endInset:"pr-3"},sm:{startPad:"pl-7",endPad:"pr-6",startInset:"pl-2",endInset:"pr-2"},xs:{startPad:"pl-6",endPad:"pr-5",startInset:"pl-2",endInset:"pr-2"},"2xs":{startPad:"pl-6",endPad:"pr-5",startInset:"pl-1.5",endInset:"pr-2"}},oo=v__namespace.forwardRef(({className:e,type:t,size:o="default",startSlot:r,endSlot:n,...a},i)=>{if(!r&&!n)return v__namespace.createElement("input",{type:t,className:d(rd({size:o}),e),ref:i,...a});let p=Mg[o];return v__namespace.createElement("div",{className:"relative flex w-full items-center"},r?v__namespace.createElement("span",{className:d("pointer-events-none absolute inset-y-0 left-0 flex items-center text-muted-foreground [&_svg]:size-3.5",p.startInset)},r):null,v__namespace.createElement("input",{type:t,ref:i,className:d(rd({size:o}),r&&p.startPad,n&&p.endPad,e),...a}),n?v__namespace.createElement("span",{className:d("pointer-events-none absolute inset-y-0 right-0 flex items-center text-muted-foreground [&_svg]:size-3.5",p.endInset)},n):null)});oo.displayName="Input";var Eg=classVarianceAuthority.cva("font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70",{variants:{size:{default:"text-sm",sm:"text-sm",xs:"text-xs","2xs":"text-2xs"}},defaultVariants:{size:"default"}}),Ao=v__namespace.forwardRef(({className:e,size:t,...o},r)=>v__namespace.createElement(bn__namespace.Root,{ref:r,className:d(Eg({size:t}),e),...o}));Ao.displayName=bn__namespace.Root.displayName;var ad=v__namespace.forwardRef(({className:e,value:t,...o},r)=>v__namespace.createElement(Ir__namespace.Root,{ref:r,className:d("relative h-4 w-full overflow-hidden rounded-full bg-secondary",e),...o},v__namespace.createElement(Ir__namespace.Indicator,{className:"h-full w-full flex-1 bg-primary transition-all",style:{transform:`translateX(-${100-(t||0)}%)`}})));ad.displayName=Ir__namespace.Root.displayName;var vn=v__namespace.forwardRef(({className:e,...t},o)=>v__namespace.createElement(cmdk.Command,{ref:o,className:d("flex h-full w-full flex-col overflow-hidden rounded-md bg-popover text-popover-foreground",e),...t}));vn.displayName=cmdk.Command.displayName;var yn=v__namespace.forwardRef(({className:e,...t},o)=>v__namespace.createElement("div",{className:"flex items-center border-b px-3","cmdk-input-wrapper":""},v__namespace.createElement(lucideReact.Search,{className:"mr-2 h-4 w-4 shrink-0 opacity-50"}),v__namespace.createElement(cmdk.Command.Input,{ref:o,className:d("flex h-10 w-full rounded-md bg-transparent py-3 text-sm outline-none placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50",e),...t})));yn.displayName=cmdk.Command.Input.displayName;var xn=v__namespace.forwardRef(({className:e,...t},o)=>v__namespace.createElement(cmdk.Command.List,{ref:o,className:d("max-h-[300px] overflow-y-auto overflow-x-hidden",e),...t}));xn.displayName=cmdk.Command.List.displayName;var wn=v__namespace.forwardRef((e,t)=>v__namespace.createElement(cmdk.Command.Empty,{ref:t,className:"py-6 text-center text-sm",...e}));wn.displayName=cmdk.Command.Empty.displayName;var ka=v__namespace.forwardRef(({className:e,...t},o)=>v__namespace.createElement(cmdk.Command.Group,{ref:o,className:d("overflow-hidden p-1 text-foreground [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground",e),...t}));ka.displayName=cmdk.Command.Group.displayName;var Rn=v__namespace.forwardRef(({className:e,...t},o)=>v__namespace.createElement(cmdk.Command.Separator,{ref:o,className:d("-mx-1 h-px bg-border",e),...t}));Rn.displayName=cmdk.Command.Separator.displayName;var tr=v__namespace.forwardRef(({className:e,...t},o)=>v__namespace.createElement(cmdk.Command.Item,{ref:o,className:d("relative flex cursor-default gap-2 select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none data-[disabled=true]:pointer-events-none data-[selected=true]:bg-accent data-[selected=true]:text-accent-foreground data-[disabled=true]:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",e),...t}));tr.displayName=cmdk.Command.Item.displayName;var Hr=v__namespace.forwardRef(({className:e,orientation:t="horizontal",decorative:o=true,...r},n)=>v__namespace.createElement(Sn__namespace.Root,{ref:n,decorative:o,orientation:t,className:d("shrink-0 bg-border",t==="horizontal"?"h-[1px] w-full":"h-full w-[1px]",e),...r}));Hr.displayName=Sn__namespace.Root.displayName;var zg=3,nd=v__namespace.forwardRef(function({options:t,value:o,defaultValue:r,onValueChange:n,placeholder:a="Select\u2026",searchPlaceholder:i="Search\u2026",emptyMessage:p="Nothing matches.",maxCount:s=zg,searchable:c=true,badgeDismissible:l=true,disabled:m=false,modalPopover:u=false,className:g,id:h,"aria-label":f,...b},y){let R=o!==void 0,[w,x]=v__namespace.useState(r??[]),S=R?o:w,[M,A]=v__namespace.useState(false),H=v__namespace.useMemo(()=>{let k=new Map;for(let G of t)k.set(G.value,G);return k},[t]),W=v__namespace.useCallback(k=>{R||x(k),n?.(k);},[R,n]),z=k=>{S.includes(k)?W(S.filter(G=>G!==k)):W([...S,k]);},F=(k,G)=>{k.preventDefault(),k.stopPropagation(),W(S.filter(he=>he!==G));},B=k=>{k?.preventDefault(),k?.stopPropagation(),W([]);},q=()=>{let k=t.filter(G=>!G.disabled).map(G=>G.value);W(k);},ie=t.length>0&&t.filter(k=>!k.disabled).every(k=>S.includes(k.value)),N=S.slice(0,s),ue=Math.max(0,S.length-s);return v__namespace.createElement(Ot,{open:M,onOpenChange:A,modal:u},v__namespace.createElement(Vt,{asChild:true},v__namespace.createElement("button",{ref:y,type:"button",id:h,role:"combobox","aria-expanded":M,"aria-haspopup":"listbox","aria-label":f,disabled:m,"data-gds-part":"multi-select",className:d("flex min-h-9 w-full items-center justify-between gap-2 rounded-md border border-input bg-transparent pl-2 pr-2 text-sm shadow-sm","ring-offset-background placeholder:text-muted-foreground","focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring","disabled:cursor-not-allowed disabled:opacity-50","[&[data-state=open]]:ring-1 [&[data-state=open]]:ring-ring",g)},S.length===0?v__namespace.createElement("span",{className:"text-muted-foreground px-1"},a):v__namespace.createElement("div",{className:"flex flex-1 flex-wrap items-center gap-1 py-1","data-gds-part":"multi-select-badges"},N.map(k=>{let G=H.get(k);if(!G)return null;let he=G.icon;return v__namespace.createElement(ia,{key:k,variant:"secondary",className:"gap-1 pr-1","data-gds-part":"multi-select-badge"},he?v__namespace.createElement(he,{className:"h-3 w-3"}):null,v__namespace.createElement("span",{className:"truncate max-w-[12rem]"},G.label),l&&!m&&v__namespace.createElement("span",{role:"button","aria-label":`Remove ${G.label}`,tabIndex:0,onClick:I=>F(I,k),onKeyDown:I=>{(I.key==="Enter"||I.key===" ")&&F(I,k);},className:"ml-0.5 inline-flex h-4 w-4 cursor-pointer items-center justify-center rounded-sm hover:bg-muted-foreground/20"},v__namespace.createElement(lucideReact.X,{className:"h-3 w-3","aria-hidden":true})))}),ue>0&&v__namespace.createElement(ia,{variant:"outline",className:"text-muted-foreground","data-gds-part":"multi-select-overflow",title:S.slice(s).map(k=>H.get(k)?.label??k).join(", ")},"+",ue," more")),v__namespace.createElement("div",{className:"flex shrink-0 items-center gap-1"},S.length>0&&!m&&v__namespace.createElement("span",{role:"button","aria-label":"Clear all",tabIndex:0,onClick:k=>B(k),onKeyDown:k=>{(k.key==="Enter"||k.key===" ")&&B(k);},className:"inline-flex h-5 w-5 cursor-pointer items-center justify-center rounded-sm text-muted-foreground hover:text-foreground hover:bg-muted"},v__namespace.createElement(lucideReact.XCircle,{className:"h-3.5 w-3.5","aria-hidden":true})),v__namespace.createElement(lucideReact.ChevronDown,{className:"h-4 w-4 shrink-0 text-muted-foreground","aria-hidden":true})))),v__namespace.createElement(Ht,{align:"start",className:"w-[var(--radix-popover-trigger-width)] p-0","data-gds-part":"multi-select-content"},v__namespace.createElement(vn,null,c&&v__namespace.createElement(yn,{placeholder:i}),v__namespace.createElement(xn,null,v__namespace.createElement(wn,null,p),v__namespace.createElement(ka,null,t.map(k=>{let G=k.icon,he=S.includes(k.value);return v__namespace.createElement(tr,{key:k.value,value:k.label,onSelect:()=>z(k.value),disabled:k.disabled,"data-gds-part":"multi-select-item","data-selected":he||void 0},v__namespace.createElement("div",{className:d("mr-2 flex h-4 w-4 shrink-0 items-center justify-center rounded-sm border border-primary",he?"bg-primary text-primary-foreground":"opacity-50 [&_svg]:invisible"),"aria-hidden":true},v__namespace.createElement(lucideReact.Check,{className:"h-3 w-3"})),G?v__namespace.createElement(G,{className:"mr-2 h-4 w-4 text-muted-foreground"}):null,v__namespace.createElement("span",{className:"truncate"},k.label))})),v__namespace.createElement(Rn,null),v__namespace.createElement(ka,null,v__namespace.createElement("div",{className:"flex items-center justify-between gap-1 p-1"},v__namespace.createElement(tr,{onSelect:q,className:"flex-1 justify-center text-xs",disabled:ie},"Select all"),v__namespace.createElement(Hr,{orientation:"vertical",className:"h-5"}),v__namespace.createElement(tr,{onSelect:()=>B(),className:"flex-1 justify-center text-xs",disabled:S.length===0},"Clear"),v__namespace.createElement(Hr,{orientation:"vertical",className:"h-5"}),v__namespace.createElement(tr,{onSelect:()=>A(false),className:"flex-1 justify-center text-xs"},"Close")))))))});nd.displayName="MultiSelect";var id=v__namespace.forwardRef(({className:e,...t},o)=>v__namespace.createElement(ho__namespace.Root,{className:d("grid gap-2",e),...t,ref:o}));id.displayName=ho__namespace.Root.displayName;var sd=v__namespace.forwardRef(({className:e,...t},o)=>v__namespace.createElement(ho__namespace.Item,{ref:o,className:d("aspect-square h-4 w-4 rounded-full border border-primary text-primary ring-offset-background focus:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",e),...t},v__namespace.createElement(ho__namespace.Indicator,{className:"flex items-center justify-center"},v__namespace.createElement(lucideReact.Circle,{className:"h-2.5 w-2.5 fill-current text-current"}))));sd.displayName=ho__namespace.Item.displayName;var Og=({className:e,...t})=>v__namespace.createElement(or__namespace.PanelGroup,{"data-gds-part":"resizable-panel-group",className:d("flex h-full w-full data-[panel-group-direction=vertical]:flex-col",e),...t}),Vg=or__namespace.Panel,Gg=({withHandle:e,className:t,...o})=>v__namespace.createElement(or__namespace.PanelResizeHandle,{"data-gds-part":"resizable-handle",className:d("relative flex w-px items-center justify-center bg-border after:absolute after:inset-y-0 after:left-1/2 after:w-1 after:-translate-x-1/2 focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring focus-visible:ring-offset-1 data-[panel-group-direction=vertical]:h-px data-[panel-group-direction=vertical]:w-full data-[panel-group-direction=vertical]:after:left-0 data-[panel-group-direction=vertical]:after:h-1 data-[panel-group-direction=vertical]:after:w-full data-[panel-group-direction=vertical]:after:-translate-y-1/2 data-[panel-group-direction=vertical]:after:translate-x-0 [&[data-panel-group-direction=vertical]>div]:rotate-90",t),...o},e&&v__namespace.createElement("div",{className:"z-10 flex h-4 w-3 items-center justify-center rounded-sm border bg-border"},v__namespace.createElement(lucideReact.GripVertical,{className:"h-2.5 w-2.5"})));var ld=classVarianceAuthority.cva("gds-row flex flex-row",{variants:{gap:{none:"gap-0",xs:"gap-1",sm:"gap-2",md:"gap-4",lg:"gap-6",xl:"gap-8","2xl":"gap-12"},align:{start:"items-start",center:"items-center",end:"items-end",stretch:"items-stretch",baseline:"items-baseline"},justify:{start:"justify-start",center:"justify-center",end:"justify-end",between:"justify-between",around:"justify-around",evenly:"justify-evenly"},wrap:{true:"flex-wrap",false:"flex-nowrap"}},defaultVariants:{gap:"md",align:"center",justify:"start",wrap:false}}),dd=v__namespace.forwardRef(({className:e,gap:t,align:o,justify:r,wrap:n,asChild:a=false,...i},p)=>v__namespace.createElement(a?reactSlot.Slot:"div",{ref:p,"data-gds-part":"row",className:d(ld({gap:t,align:o,justify:r,wrap:n,className:e})),...i}));dd.displayName="Row";var cd=classVarianceAuthority.cva("gds-grid grid",{variants:{cols:{1:"grid-cols-1",2:"grid-cols-1 md:grid-cols-2",3:"grid-cols-1 sm:grid-cols-2 md:grid-cols-3",4:"grid-cols-1 sm:grid-cols-2 lg:grid-cols-4",5:"grid-cols-1 sm:grid-cols-2 lg:grid-cols-5",6:"grid-cols-2 sm:grid-cols-3 lg:grid-cols-6",12:"grid-cols-4 md:grid-cols-6 lg:grid-cols-12"},gap:{none:"gap-0",xs:"gap-1",sm:"gap-2",md:"gap-4",lg:"gap-6",xl:"gap-8","2xl":"gap-12"},align:{start:"items-start",center:"items-center",end:"items-end",stretch:"items-stretch"}},defaultVariants:{cols:"3",gap:"md",align:"stretch"}}),pd=v__namespace.forwardRef(({className:e,cols:t,gap:o,align:r,asChild:n=false,...a},i)=>v__namespace.createElement(n?reactSlot.Slot:"div",{ref:i,"data-gds-part":"grid",className:d(cd({cols:t,gap:o,align:r,className:e})),...a}));pd.displayName="Grid";var ud=classVarianceAuthority.cva("gds-flex flex",{variants:{direction:{row:"flex-row",col:"flex-col","row-reverse":"flex-row-reverse","col-reverse":"flex-col-reverse"},gap:{none:"gap-0",xs:"gap-1",sm:"gap-2",md:"gap-4",lg:"gap-6",xl:"gap-8","2xl":"gap-12"},align:{start:"items-start",center:"items-center",end:"items-end",stretch:"items-stretch",baseline:"items-baseline"},justify:{start:"justify-start",center:"justify-center",end:"justify-end",between:"justify-between",around:"justify-around",evenly:"justify-evenly"},wrap:{nowrap:"flex-nowrap",wrap:"flex-wrap","wrap-reverse":"flex-wrap-reverse"}},defaultVariants:{direction:"row",gap:"none",align:"stretch",justify:"start",wrap:"nowrap"}}),md=v__namespace.forwardRef(({className:e,direction:t,gap:o,align:r,justify:n,wrap:a,asChild:i=false,...p},s)=>v__namespace.createElement(i?reactSlot.Slot:"div",{ref:s,"data-gds-part":"flex",className:d(ud({direction:t,gap:o,align:r,justify:n,wrap:a,className:e})),...p}));md.displayName="Flex";var gd=v__namespace.forwardRef(({className:e,children:t,...o},r)=>v__namespace.createElement(Ct__namespace.Root,{ref:r,className:d("relative overflow-hidden",e),...o},v__namespace.createElement(Ct__namespace.Viewport,{className:"h-full w-full rounded-[inherit]"},t),v__namespace.createElement(kn,null),v__namespace.createElement(Ct__namespace.Corner,null)));gd.displayName=Ct__namespace.Root.displayName;var kn=v__namespace.forwardRef(({className:e,orientation:t="vertical",...o},r)=>v__namespace.createElement(Ct__namespace.ScrollAreaScrollbar,{ref:r,orientation:t,className:d("flex touch-none select-none transition-colors",t==="vertical"&&"h-full w-2.5 border-l border-l-transparent p-[1px]",t==="horizontal"&&"h-2.5 flex-col border-t border-t-transparent p-[1px]",e),...o},v__namespace.createElement(Ct__namespace.ScrollAreaThumb,{className:"relative flex-1 rounded-full bg-border"})));kn.displayName=Ct__namespace.ScrollAreaScrollbar.displayName;var Cn=le__namespace.Root,Xg=le__namespace.Group,Tn=le__namespace.Value,bd=v__namespace.createContext("default"),Jg=classVarianceAuthority.cva("flex w-full items-center justify-between rounded-md border border-input bg-background ring-offset-background data-[placeholder]:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",{variants:{size:{default:"h-10 px-3 py-2 text-sm",sm:"h-8 px-2 py-1 text-sm",xs:"h-7 px-2 py-0 text-xs","2xs":"h-6 rounded-lg pl-1.5 pr-2 py-0 text-2xs"}},defaultVariants:{size:"default"}}),Na=v__namespace.forwardRef(({className:e,children:t,size:o="default",startSlot:r,chevron:n=true,...a},i)=>v__namespace.createElement(le__namespace.Trigger,{ref:i,className:d(Jg({size:o}),e),...a},r?v__namespace.createElement("div",{className:"flex min-w-0 flex-1 items-center gap-1.5 [&>span]:truncate"},v__namespace.createElement("span",{className:"pointer-events-none flex shrink-0 items-center text-muted-foreground/70 [&_svg]:size-4"},r),t):t,n?v__namespace.createElement(le__namespace.Icon,{asChild:true},v__namespace.createElement(lucideReact.ChevronDown,{className:d("opacity-50",o==="sm"?"h-3.5 w-3.5":"h-4 w-4")})):null));Na.displayName=le__namespace.Trigger.displayName;var Pn=v__namespace.forwardRef(({className:e,...t},o)=>v__namespace.createElement(le__namespace.ScrollUpButton,{ref:o,className:d("flex cursor-default items-center justify-center py-1",e),...t},v__namespace.createElement(lucideReact.ChevronUp,{className:"h-4 w-4"})));Pn.displayName=le__namespace.ScrollUpButton.displayName;var Mn=v__namespace.forwardRef(({className:e,...t},o)=>v__namespace.createElement(le__namespace.ScrollDownButton,{ref:o,className:d("flex cursor-default items-center justify-center py-1",e),...t},v__namespace.createElement(lucideReact.ChevronDown,{className:"h-4 w-4"})));Mn.displayName=le__namespace.ScrollDownButton.displayName;var Ea=v__namespace.forwardRef(({className:e,children:t,position:o="popper",size:r="default",...n},a)=>v__namespace.createElement(le__namespace.Portal,null,v__namespace.createElement(le__namespace.Content,{ref:a,className:d("relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",o==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",e),position:o,...n},v__namespace.createElement(Pn,null),v__namespace.createElement(le__namespace.Viewport,{className:d(r==="default"?"p-1":"p-0.5",o==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]")},v__namespace.createElement(bd.Provider,{value:r},t)),v__namespace.createElement(Mn,null))));Ea.displayName=le__namespace.Content.displayName;var vd=v__namespace.forwardRef(({className:e,...t},o)=>v__namespace.createElement(le__namespace.Label,{ref:o,className:d("py-1.5 pl-8 pr-2 text-sm font-semibold",e),...t}));vd.displayName=le__namespace.Label.displayName;var Qg=classVarianceAuthority.cva("relative flex w-full cursor-default select-none items-center rounded-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",{variants:{size:{default:"py-1.5 pl-8 pr-2 text-sm",sm:"py-1 pl-7 pr-2 text-sm",xs:"py-1 pl-6 pr-2 text-xs","2xs":"py-0.5 pl-6 pr-2 text-2xs"}},defaultVariants:{size:"default"}}),La=v__namespace.forwardRef(({className:e,children:t,hint:o,...r},n)=>{let a=v__namespace.useContext(bd),i=a!=="default";return v__namespace.createElement(le__namespace.Item,{ref:n,className:d("group",Qg({size:a}),e),...r},v__namespace.createElement("span",{className:d("absolute flex items-center justify-center",i?"left-1.5 h-3 w-3":"left-2 h-3.5 w-3.5")},v__namespace.createElement(le__namespace.ItemIndicator,null,v__namespace.createElement(lucideReact.Check,{className:i?"h-3 w-3":"h-4 w-4"}))),v__namespace.createElement(le__namespace.ItemText,null,t),o!=null?v__namespace.createElement("span",{className:"ml-auto pl-3 tabular-nums text-muted-foreground/60 group-focus:text-accent-foreground/80 group-data-[highlighted]:text-accent-foreground/80"},o):null)});La.displayName=le__namespace.Item.displayName;var yd=v__namespace.forwardRef(({className:e,...t},o)=>v__namespace.createElement(le__namespace.Separator,{ref:o,className:d("-mx-1 my-1 h-px bg-muted",e),...t}));yd.displayName=le__namespace.Separator.displayName;var of=Ie__namespace.Root,rf=Ie__namespace.Trigger,af=Ie__namespace.Close,xd=Ie__namespace.Portal,Nn=v__namespace.forwardRef(({className:e,...t},o)=>v__namespace.createElement(Ie__namespace.Overlay,{className:d("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t,ref:o}));Nn.displayName=Ie__namespace.Overlay.displayName;var nf=classVarianceAuthority.cva("fixed z-50 gap-4 p-6 shadow-lg transition ease-in-out data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:duration-300 data-[state=open]:duration-500",{variants:{side:{top:"inset-x-0 top-0 border-b data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top",bottom:"inset-x-0 bottom-0 border-t data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom",left:"inset-y-0 left-0 h-full w-3/4 border-r data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left sm:max-w-sm",right:"inset-y-0 right-0 h-full w-3/4 border-l data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right sm:max-w-sm"}},defaultVariants:{side:"right"}}),wd=v__namespace.forwardRef(({side:e="right",surface:t="solid",className:o,children:r,...n},a)=>v__namespace.createElement(xd,null,v__namespace.createElement(Nn,null),v__namespace.createElement(Ie__namespace.Content,{ref:a,"data-surface":t,className:d(nf({side:e}),At(t,"bg-background"),ht[t],o),...n},r,v__namespace.createElement(Ie__namespace.Close,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-secondary"},v__namespace.createElement(lucideReact.X,{className:"h-4 w-4"}),v__namespace.createElement("span",{className:"sr-only"},"Close")))));wd.displayName=Ie__namespace.Content.displayName;var Rd=({className:e,...t})=>v__namespace.createElement("div",{className:d("flex flex-col space-y-2 text-center sm:text-left",e),...t});Rd.displayName="SheetHeader";var Sd=({className:e,...t})=>v__namespace.createElement("div",{className:d("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});Sd.displayName="SheetFooter";var kd=v__namespace.forwardRef(({className:e,...t},o)=>v__namespace.createElement(Ie__namespace.Title,{ref:o,className:d("text-lg font-semibold text-foreground",e),...t}));kd.displayName=Ie__namespace.Title.displayName;var Cd=v__namespace.forwardRef(({className:e,...t},o)=>v__namespace.createElement(Ie__namespace.Description,{ref:o,className:d("text-sm text-muted-foreground",e),...t}));Cd.displayName=Ie__namespace.Description.displayName;function sf({className:e,...t}){return React.createElement("div",{className:d("animate-pulse rounded-md bg-muted",e),...t})}var Ho=v__namespace.forwardRef(({className:e,...t},o)=>v__namespace.createElement(ro__namespace.Root,{ref:o,className:d("relative flex w-full touch-none select-none items-center",e),...t},v__namespace.createElement(ro__namespace.Track,{className:"relative h-2 w-full grow overflow-hidden rounded-full bg-secondary"},v__namespace.createElement(ro__namespace.Range,{className:"absolute h-full bg-primary"})),v__namespace.createElement(ro__namespace.Thumb,{className:"block h-5 w-5 rounded-full border-2 border-primary bg-background ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50"})));Ho.displayName=ro__namespace.Root.displayName;var bf={vertical:sortable.verticalListSortingStrategy,horizontal:sortable.horizontalListSortingStrategy,grid:sortable.rectSortingStrategy},En=v__namespace.createContext(null),Ad=v__namespace.createContext(null),Ln=v__namespace.forwardRef(function({disabled:t=false,className:o,children:r,...n},a){let i=v__namespace.useRef(new Map),p=v__namespace.useCallback(m=>(i.current.set(m.id,m),()=>{i.current.delete(m.id);}),[]),s=core.useSensors(core.useSensor(core.PointerSensor,{activationConstraint:{distance:4}}),core.useSensor(core.KeyboardSensor,{coordinateGetter:sortable.sortableKeyboardCoordinates})),c=m=>{let u=i.current,g=u.get(String(m));if(g)return g;for(let h of u.values())if(h.values.some(f=>f===m))return h;return null},l=v__namespace.useCallback(m=>{if(t)return;let{active:u,over:g}=m;if(!g)return;let h=c(u.id),f=c(g.id);if(!h||!f)return;if(h.id===f.id){if(u.id===g.id)return;let w=h.values.findIndex(S=>S===u.id),x=h.values.findIndex(S=>S===g.id);if(w===-1||x===-1)return;h.onReorder?.(sortable.arrayMove(h.values,w,x));return}let b=h.values.filter(w=>w!==u.id),y=g.id===f.id?f.values.length:Math.max(0,f.values.findIndex(w=>w===g.id)),R=[...f.values.slice(0,y),u.id,...f.values.slice(y)];h.onReorder?.(b),f.onReorder?.(R);},[t]);return v__namespace.createElement(Ad.Provider,{value:{registerContainer:p}},v__namespace.createElement(core.DndContext,{sensors:s,collisionDetection:core.closestCorners,onDragEnd:l},v__namespace.createElement("div",{ref:a,"data-gds-part":"sortable-group","data-disabled":t||void 0,className:d(o),...n},r)))});Ln.displayName="Sortable.Group";var zr=v__namespace.forwardRef(function({values:t,onReorder:o,strategy:r="vertical",disabled:n=false,id:a,className:i,children:p,...s},c){let l=v__namespace.useContext(Ad),m=l!==null,u=v__namespace.useId(),g=a??u;v__namespace.useEffect(()=>{if(m)return l.registerContainer({id:g,values:t,onReorder:o})},[m,l,g,t,o]);let h=core.useSensors(core.useSensor(core.PointerSensor,{activationConstraint:{distance:4}}),core.useSensor(core.KeyboardSensor,{coordinateGetter:sortable.sortableKeyboardCoordinates})),f=v__namespace.useCallback(R=>{let{active:w,over:x}=R;if(!x||w.id===x.id)return;let S=t.findIndex(A=>A===w.id),M=t.findIndex(A=>A===x.id);S===-1||M===-1||o?.(sortable.arrayMove(t,S,M));},[t,o]),b=v__namespace.useMemo(()=>({disabled:n}),[n]),y=v__namespace.createElement(sortable.SortableContext,{items:t,strategy:bf[r]},v__namespace.createElement(vf,{id:g,enabled:m,forwardedRef:c,strategy:r,disabled:n,className:i,...s},p));return m?v__namespace.createElement(En.Provider,{value:b},y):v__namespace.createElement(En.Provider,{value:b},v__namespace.createElement(core.DndContext,{sensors:h,collisionDetection:core.closestCenter,onDragEnd:f},y))});zr.displayName="Sortable";function vf({id:e,enabled:t,forwardedRef:o,strategy:r,disabled:n,className:a,children:i,...p}){let s=core.useDroppable({id:e,disabled:!t}),c=v__namespace.useCallback(l=>{t&&s.setNodeRef(l),typeof o=="function"?o(l):o&&(o.current=l);},[t,s,o]);return v__namespace.createElement("div",{ref:c,"data-gds-part":"sortable","data-strategy":r,"data-disabled":n||void 0,className:d(a),...p},i)}var Id=v__namespace.createContext(null),Dn=v__namespace.forwardRef(function({value:t,asChild:o=false,disabled:r,className:n,style:a,children:i,...p},s){let c=v__namespace.useContext(En);if(!c)throw new Error("<Sortable.Item> must be rendered inside <Sortable>.");let l=c.disabled||r||false,{attributes:m,listeners:u,setNodeRef:g,setActivatorNodeRef:h,transform:f,transition:b,isDragging:y}=sortable.useSortable({id:t,disabled:l}),R=v__namespace.useRef(false),w=v__namespace.useCallback(A=>{g(A),typeof s=="function"?s(A):s&&(s.current=A);},[g,s]),x=v__namespace.useMemo(()=>({listeners:u,setActivatorNodeRef:h,hasHandle:R,disabled:l}),[u,h,l]),S={transform:utilities.CSS.Transform.toString(f),transition:b,zIndex:y?1:void 0,cursor:l?"default":R.current?void 0:"grab",...a},M=o?reactSlot.Slot:"div";return v__namespace.createElement(Id.Provider,{value:x},v__namespace.createElement(M,{ref:w,"data-gds-part":"sortable-item","data-value":String(t),"data-dragging":y||void 0,className:d(n),style:S,...m,...R.current?{}:u,...p},i))});Dn.displayName="Sortable.Item";var An=v__namespace.forwardRef(function({asChild:t=false,className:o,children:r,...n},a){let i=v__namespace.useContext(Id);if(!i)throw new Error("<Sortable.Handle> must be rendered inside <Sortable.Item>.");v__namespace.useLayoutEffect(()=>(i.hasHandle.current=true,()=>{i.hasHandle.current=false;}),[i.hasHandle]);let p=v__namespace.useCallback(c=>{i.setActivatorNodeRef(c),typeof a=="function"?a(c):a&&(a.current=c);},[i,a]),s={"data-gds-part":"sortable-handle","aria-label":"Drag to reorder",className:d("cursor-grab touch-none select-none",i.disabled&&"cursor-default opacity-50",o),...i.disabled?{}:i.listeners,...n};return t?v__namespace.createElement(reactSlot.Slot,{ref:p,...s},r):v__namespace.createElement("button",{type:"button",ref:p,...s},r)});An.displayName="Sortable.Handle";zr.Item=Dn;zr.Handle=An;zr.Group=Ln;var yf=zr;var Hd=classVarianceAuthority.cva("gds-stack flex flex-col",{variants:{gap:{none:"gap-0",xs:"gap-1",sm:"gap-2",md:"gap-4",lg:"gap-6",xl:"gap-8","2xl":"gap-12"},align:{start:"items-start",center:"items-center",end:"items-end",stretch:"items-stretch"},justify:{start:"justify-start",center:"justify-center",end:"justify-end",between:"justify-between",around:"justify-around",evenly:"justify-evenly"}},defaultVariants:{gap:"md",align:"stretch",justify:"start"}}),Fd=v__namespace.forwardRef(({className:e,gap:t,align:o,justify:r,asChild:n=false,...a},i)=>v__namespace.createElement(n?reactSlot.Slot:"div",{ref:i,"data-gds-part":"stack",className:d(Hd({gap:t,align:o,justify:r,className:e})),...a}));Fd.displayName="Stack";var Rf=classVarianceAuthority.cva("peer inline-flex shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=unchecked]:bg-input",{variants:{size:{default:"h-6 w-11",sm:"h-5 w-9",xs:"h-4 w-7","2xs":"h-3 w-5"}},defaultVariants:{size:"default"}}),Sf=classVarianceAuthority.cva("pointer-events-none block rounded-full bg-background shadow-lg ring-0 transition-transform data-[state=unchecked]:translate-x-0",{variants:{size:{default:"h-5 w-5 data-[state=checked]:translate-x-5",sm:"h-4 w-4 data-[state=checked]:translate-x-4",xs:"h-3 w-3 data-[state=checked]:translate-x-3","2xs":"h-2 w-2 data-[state=checked]:translate-x-2"}},defaultVariants:{size:"default"}}),Ia=v__namespace.forwardRef(({className:e,size:t="default",...o},r)=>v__namespace.createElement(Br__namespace.Root,{className:d(Rf({size:t}),e),...o,ref:r},v__namespace.createElement(Br__namespace.Thumb,{className:d(Sf({size:t}))})));Ia.displayName=Br__namespace.Root.displayName;var _d=v__namespace.forwardRef(({className:e,...t},o)=>v__namespace.createElement("div",{className:"relative w-full overflow-auto"},v__namespace.createElement("table",{ref:o,className:d("w-full caption-bottom text-sm",e),...t})));_d.displayName="Table";var Bd=v__namespace.forwardRef(({className:e,...t},o)=>v__namespace.createElement("thead",{ref:o,className:d("[&_tr]:border-b",e),...t}));Bd.displayName="TableHeader";var Od=v__namespace.forwardRef(({className:e,...t},o)=>v__namespace.createElement("tbody",{ref:o,className:d("[&_tr:last-child]:border-0",e),...t}));Od.displayName="TableBody";var Vd=v__namespace.forwardRef(({className:e,...t},o)=>v__namespace.createElement("tfoot",{ref:o,className:d("border-t bg-muted/50 font-medium [&>tr]:last:border-b-0",e),...t}));Vd.displayName="TableFooter";var Gd=v__namespace.forwardRef(({className:e,...t},o)=>v__namespace.createElement("tr",{ref:o,className:d("border-b transition-colors hover:bg-muted/50 data-[state=selected]:bg-muted",e),...t}));Gd.displayName="TableRow";var Wd=v__namespace.forwardRef(({className:e,...t},o)=>v__namespace.createElement("th",{ref:o,className:d("h-10 px-2 text-left align-middle font-medium text-muted-foreground [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",e),...t}));Wd.displayName="TableHead";var jd=v__namespace.forwardRef(({className:e,...t},o)=>v__namespace.createElement("td",{ref:o,className:d("p-2 align-middle [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",e),...t}));jd.displayName="TableCell";var $d=v__namespace.forwardRef(({className:e,...t},o)=>v__namespace.createElement("caption",{ref:o,className:d("mt-4 text-sm text-muted-foreground",e),...t}));$d.displayName="TableCaption";var Ud=v__namespace.createContext(v__namespace.createElement(lucideReact.ChevronRight,null)),Kd=v__namespace.forwardRef(({separator:e,children:t,...o},r)=>v__namespace.createElement(Ud.Provider,{value:e??v__namespace.createElement(lucideReact.ChevronRight,null)},v__namespace.createElement("nav",{ref:r,"aria-label":"breadcrumb",...o},t)));Kd.displayName="Breadcrumb";var qd=v__namespace.forwardRef(({className:e,...t},o)=>v__namespace.createElement("ol",{ref:o,className:d("flex flex-wrap items-center gap-1.5 break-words text-xs text-muted-foreground",e),...t}));qd.displayName="BreadcrumbList";var Zd=v__namespace.forwardRef(({className:e,...t},o)=>v__namespace.createElement("li",{ref:o,className:d("inline-flex items-center gap-1.5",e),...t}));Zd.displayName="BreadcrumbItem";var Ha=d("inline-flex items-center gap-1.5 rounded-md px-1.5 py-0.5 text-xs","transition-colors hover:text-foreground hover:bg-muted/60","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring","[&_svg]:pointer-events-none [&_svg]:size-3.5 [&_svg]:shrink-0"),Yd=v__namespace.forwardRef(({asChild:e,className:t,href:o,...r},n)=>e?v__namespace.createElement("span",{ref:n,className:d(Ha,t),...r}):o?v__namespace.createElement("a",{ref:n,href:o,className:d(Ha,t),...r}):v__namespace.createElement("button",{ref:n,type:"button",className:d(Ha,t),...r}));Yd.displayName="BreadcrumbLink";var Xd=v__namespace.forwardRef(({className:e,...t},o)=>v__namespace.createElement("span",{ref:o,role:"link","aria-disabled":"true","aria-current":"page",className:d("inline-flex items-center gap-1.5 px-0.5 text-xs font-medium text-foreground","[&_svg]:pointer-events-none [&_svg]:size-3.5 [&_svg]:shrink-0",e),...t}));Xd.displayName="BreadcrumbPage";var Jd=({children:e,className:t,...o})=>{let r=v__namespace.useContext(Ud);return v__namespace.createElement("li",{role:"presentation","aria-hidden":"true",className:d("[&_svg]:size-3 [&_svg]:shrink-0 text-muted-foreground/60",t),...o},e??r)};Jd.displayName="BreadcrumbSeparator";var Qd=({className:e,...t})=>v__namespace.createElement("span",{role:"presentation","aria-hidden":"true",className:d("flex h-5 w-5 items-center justify-center",e),...t},v__namespace.createElement(lucideReact.MoreHorizontal,{className:"h-3.5 w-3.5"}),v__namespace.createElement("span",{className:"sr-only"},"More"));Qd.displayName="BreadcrumbEllipsis";var ec=v__namespace.forwardRef(({label:e,items:t,onSelect:o,onSelectLabel:r,current:n,className:a},i)=>{let[p,s]=v__namespace.useState(false);return v__namespace.createElement(Ot,{open:p,onOpenChange:s},v__namespace.createElement(Vt,{asChild:true},v__namespace.createElement("button",{ref:i,type:"button",className:d(Ha,n&&"font-medium text-foreground",a),onClick:()=>{r?r():s(c=>!c);}},v__namespace.createElement("span",null,e),v__namespace.createElement(lucideReact.ChevronDown,{className:d("h-3 w-3 text-muted-foreground transition-transform",p&&"rotate-180"),onClick:c=>{c.stopPropagation(),s(l=>!l);},role:"button","aria-label":`Show ${e} children`}))),v__namespace.createElement(Ht,{align:"start",className:"w-64 p-1 max-h-80 overflow-y-auto"},t.length===0?v__namespace.createElement("p",{className:"px-2 py-1.5 text-xs text-muted-foreground"},"No items here yet."):v__namespace.createElement("ul",{className:"flex flex-col gap-0.5"},t.map(c=>v__namespace.createElement("li",{key:c.id},v__namespace.createElement("button",{type:"button",onClick:()=>{o(c.id),s(false);},className:d("w-full text-left rounded-md px-2 py-1.5","flex items-start gap-2","hover:bg-muted transition-colors","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",c.active&&"bg-muted/60")},v__namespace.createElement("span",{className:"flex-1 min-w-0"},v__namespace.createElement("span",{className:"flex items-center gap-1.5"},v__namespace.createElement("span",{className:"text-xs font-medium text-foreground truncate"},c.label),c.active&&v__namespace.createElement(lucideReact.Check,{className:"h-3 w-3 text-primary shrink-0"})),c.summary&&v__namespace.createElement("span",{className:"block text-[10px] text-muted-foreground leading-snug truncate"},c.summary)),c.hasChildren&&v__namespace.createElement(lucideReact.ChevronRight,{className:"h-3 w-3 text-muted-foreground/70 shrink-0 mt-0.5"})))))))});ec.displayName="BreadcrumbMenuTrigger";var Hn=Ft__namespace.Provider,Fo=Ft__namespace.Root,zo=Ft__namespace.Trigger,bo=v__namespace.forwardRef(({className:e,sideOffset:t=4,...o},r)=>v__namespace.createElement(Ft__namespace.Portal,null,v__namespace.createElement(Ft__namespace.Content,{ref:r,sideOffset:t,className:d("z-50 overflow-hidden rounded-md bg-primary px-3 py-1.5 text-xs text-primary-foreground animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 origin-[--radix-tooltip-content-transform-origin]",e),...o})));bo.displayName=Ft__namespace.Content.displayName;var oc=v__namespace.createContext({size:"md",variant:"pill"}),Pf=zt__namespace.Root,Mf=classVarianceAuthority.cva("inline-flex items-center text-muted-foreground",{variants:{variant:{pill:"justify-center rounded-lg bg-muted",underlined:"justify-start border-b border-border"},size:{sm:"",md:"",lg:""}},compoundVariants:[{variant:"pill",size:"sm",className:"h-7 p-0.5"},{variant:"pill",size:"md",className:"h-8 p-0.5"},{variant:"pill",size:"lg",className:"h-10 p-1"},{variant:"underlined",size:"sm",className:"gap-3"},{variant:"underlined",size:"md",className:"gap-4"},{variant:"underlined",size:"lg",className:"gap-6"}],defaultVariants:{variant:"pill",size:"md"}}),Nf=classVarianceAuthority.cva("inline-flex items-center justify-center whitespace-nowrap font-medium ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0",{variants:{variant:{pill:"rounded-md data-[state=active]:bg-background data-[state=active]:text-foreground",underlined:"rounded-none bg-transparent border-b-2 border-transparent -mb-px hover:text-foreground data-[state=active]:border-primary data-[state=active]:text-primary"},size:{sm:"text-2xs gap-1 [&_svg]:size-3",md:"text-xs gap-1.5 [&_svg]:size-3.5",lg:"text-sm gap-2 [&_svg]:size-4"}},compoundVariants:[{variant:"pill",size:"sm",className:"h-6 px-1.5"},{variant:"pill",size:"md",className:"h-7 px-2"},{variant:"pill",size:"lg",className:"h-8 px-2.5"},{variant:"underlined",size:"sm",className:"pb-1.5 pt-1 px-1"},{variant:"underlined",size:"md",className:"pb-2 pt-1.5 px-1.5"},{variant:"underlined",size:"lg",className:"pb-2.5 pt-2 px-2"}],defaultVariants:{variant:"pill",size:"md"}}),rc=v__namespace.forwardRef(({className:e,size:t="md",variant:o="pill",children:r,...n},a)=>v__namespace.createElement(oc.Provider,{value:{size:t??"md",variant:o??"pill"}},v__namespace.createElement(zt__namespace.List,{ref:a,className:d(Mf({size:t,variant:o}),e),...n},r)));rc.displayName=zt__namespace.List.displayName;var ac=v__namespace.forwardRef(({className:e,size:t,variant:o,tooltip:r,...n},a)=>{let i=v__namespace.useContext(oc),p=t??i.size,s=o??i.variant,c=n["aria-label"]??(typeof r=="string"?r:void 0),l=v__namespace.createElement(zt__namespace.Trigger,{ref:a,className:d(Nf({size:p,variant:s}),e),"aria-label":c,...n});return r?v__namespace.createElement(Fo,null,v__namespace.createElement(zo,{asChild:true},l),v__namespace.createElement(bo,null,r)):l});ac.displayName=zt__namespace.Trigger.displayName;var nc=v__namespace.forwardRef(({className:e,...t},o)=>v__namespace.createElement(zt__namespace.Content,{ref:o,className:d("mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",e),...t}));nc.displayName=zt__namespace.Content.displayName;var Ef={light:"",dark:".dark"},ic=v__namespace.createContext(null);function sc(){let e=v__namespace.useContext(ic);if(!e)throw new Error("useChart must be used within a <ChartContainer />");return e}var lc=v__namespace.forwardRef(({id:e,className:t,children:o,config:r,...n},a)=>{let i=v__namespace.useId(),p=`chart-${e||i.replace(/:/g,"")}`;return v__namespace.createElement(ic.Provider,{value:{config:r}},v__namespace.createElement("div",{"data-chart":p,ref:a,className:d("flex aspect-video justify-center text-xs [&_.recharts-cartesian-axis-tick_text]:fill-muted-foreground [&_.recharts-cartesian-grid_line[stroke='#ccc']]:stroke-border/50 [&_.recharts-curve.recharts-tooltip-cursor]:stroke-border [&_.recharts-dot[stroke='#fff']]:stroke-transparent [&_.recharts-layer]:outline-none [&_.recharts-polar-grid_[stroke='#ccc']]:stroke-border [&_.recharts-radial-bar-background-sector]:fill-muted [&_.recharts-rectangle.recharts-tooltip-cursor]:fill-muted [&_.recharts-reference-line_[stroke='#ccc']]:stroke-border [&_.recharts-sector[stroke='#fff']]:stroke-transparent [&_.recharts-sector]:outline-none [&_.recharts-surface]:outline-none",t),...n},v__namespace.createElement(dc,{id:p,config:r}),v__namespace.createElement(rr__namespace.ResponsiveContainer,null,o)))});lc.displayName="Chart";var dc=({id:e,config:t})=>{let o=Object.entries(t).filter(([,r])=>r.theme||r.color);return o.length?v__namespace.createElement("style",{dangerouslySetInnerHTML:{__html:Object.entries(Ef).map(([r,n])=>`
117
+ ${n} [data-chart=${e}] {
118
+ ${o.map(([a,i])=>{let p=i.theme?.[r]||i.color;return p?` --color-${a}: ${p};`:null}).join(`
119
+ `)}
120
+ }
121
+ `).join(`
122
+ `)}}):null},Lf=rr__namespace.Tooltip,cc=v__namespace.forwardRef(({active:e,payload:t,className:o,indicator:r="dot",hideLabel:n=false,hideIndicator:a=false,label:i,labelFormatter:p,labelClassName:s,formatter:c,color:l,nameKey:m,labelKey:u},g)=>{let{config:h}=sc(),f=v__namespace.useMemo(()=>{if(n||!t?.length)return null;let[y]=t,R=`${u||y?.dataKey||y?.name||"value"}`,w=Fn(h,y,R),x=!u&&typeof i=="string"?h[i]?.label||i:w?.label;return p?v__namespace.createElement("div",{className:d("font-medium",s)},p(x,t)):x?v__namespace.createElement("div",{className:d("font-medium",s)},x):null},[i,p,t,n,s,h,u]);if(!e||!t?.length)return null;let b=t.length===1&&r!=="dot";return v__namespace.createElement("div",{ref:g,className:d("grid min-w-[8rem] items-start gap-1.5 rounded-lg border border-border/50 bg-background px-2.5 py-1.5 text-xs shadow-xl",o)},b?null:f,v__namespace.createElement("div",{className:"grid gap-1.5"},t.filter(y=>y.type!=="none").map((y,R)=>{let w=`${m||y.name||y.dataKey||"value"}`,x=Fn(h,y,w),S=l||y.payload.fill||y.color;return v__namespace.createElement("div",{key:y.dataKey,className:d("flex w-full flex-wrap items-stretch gap-2 [&>svg]:h-2.5 [&>svg]:w-2.5 [&>svg]:text-muted-foreground",r==="dot"&&"items-center")},c&&y?.value!==void 0&&y.name?c(y.value,y.name,y,R,y.payload):v__namespace.createElement(v__namespace.Fragment,null,x?.icon?v__namespace.createElement(x.icon,null):!a&&v__namespace.createElement("div",{className:d("shrink-0 rounded-[2px] border-[--color-border] bg-[--color-bg]",{"h-2.5 w-2.5":r==="dot","w-1":r==="line","w-0 border-[1.5px] border-dashed bg-transparent":r==="dashed","my-0.5":b&&r==="dashed"}),style:{"--color-bg":S,"--color-border":S}}),v__namespace.createElement("div",{className:d("flex flex-1 justify-between leading-none",b?"items-end":"items-center")},v__namespace.createElement("div",{className:"grid gap-1.5"},b?f:null,v__namespace.createElement("span",{className:"text-muted-foreground"},x?.label||y.name)),y.value&&v__namespace.createElement("span",{className:"font-mono font-medium tabular-nums text-foreground"},y.value.toLocaleString()))))})))});cc.displayName="ChartTooltip";var Df=rr__namespace.Legend,pc=v__namespace.forwardRef(({className:e,hideIcon:t=false,payload:o,verticalAlign:r="bottom",nameKey:n},a)=>{let{config:i}=sc();return o?.length?v__namespace.createElement("div",{ref:a,className:d("flex items-center justify-center gap-4",r==="top"?"pb-3":"pt-3",e)},o.filter(p=>p.type!=="none").map(p=>{let s=`${n||p.dataKey||"value"}`,c=Fn(i,p,s);return v__namespace.createElement("div",{key:p.value,className:d("flex items-center gap-1.5 [&>svg]:h-3 [&>svg]:w-3 [&>svg]:text-muted-foreground")},c?.icon&&!t?v__namespace.createElement(c.icon,null):v__namespace.createElement("div",{className:"h-2 w-2 shrink-0 rounded-[2px]",style:{backgroundColor:p.color}}),c?.label)})):null});pc.displayName="ChartLegend";function Fn(e,t,o){if(typeof t!="object"||t===null)return;let r="payload"in t&&typeof t.payload=="object"&&t.payload!==null?t.payload:void 0,n=o;return o in t&&typeof t[o]=="string"?n=t[o]:r&&o in r&&typeof r[o]=="string"&&(n=r[o]),n in e?e[n]:e[o]}var If=classVarianceAuthority.cva("flex w-full rounded-md border border-input bg-background ring-offset-background placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",{variants:{size:{default:"min-h-[80px] px-3 py-2 text-sm",sm:"min-h-[64px] px-2 py-1.5 text-sm",xs:"min-h-[52px] px-2 py-1 text-xs","2xs":"min-h-[44px] px-2 py-1 text-2xs"}},defaultVariants:{size:"default"}}),uc=v__namespace.forwardRef(({className:e,size:t="default",...o},r)=>v__namespace.createElement("textarea",{className:d(If({size:t}),e),ref:r,...o}));uc.displayName="Textarea";var mc=classVarianceAuthority.cva("inline-flex items-center justify-center gap-2 rounded-md text-sm font-medium transition-colors hover:bg-muted hover:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 data-[state=on]:bg-accent data-[state=on]:text-accent-foreground [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",{variants:{variant:{default:"bg-transparent",outline:"border border-input bg-transparent shadow-sm hover:bg-accent hover:text-accent-foreground"},size:{default:"h-9 px-2 min-w-9",sm:"h-8 px-1.5 min-w-8",xs:"h-7 px-1 min-w-7","2xs":"h-6 px-1 min-w-6",lg:"h-10 px-2.5 min-w-10"}},defaultVariants:{variant:"default",size:"default"}}),gc=v__namespace.forwardRef(({className:e,variant:t,size:o,...r},n)=>v__namespace.createElement(zn__namespace.Root,{ref:n,className:d(mc({variant:t,size:o,className:e})),...r}));gc.displayName=zn__namespace.Root.displayName;var hc=v__namespace.createContext("md"),Ff=classVarianceAuthority.cva("inline-flex items-center justify-center rounded-lg bg-muted text-muted-foreground",{variants:{size:{sm:"h-7 p-0.5",md:"h-8 p-0.5",lg:"h-10 p-1"}},defaultVariants:{size:"md"}}),zf=classVarianceAuthority.cva("inline-flex items-center justify-center whitespace-nowrap rounded-md font-medium ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 data-[state=on]:bg-background data-[state=on]:text-foreground",{variants:{size:{sm:"h-6 px-1.5 text-2xs gap-1 [&_svg]:size-3",md:"h-7 px-2 text-xs gap-1.5 [&_svg]:size-3.5",lg:"h-8 px-2.5 text-sm gap-2 [&_svg]:size-4"}},defaultVariants:{size:"md"}}),_o=v__namespace.forwardRef(({className:e,size:t="md",children:o,...r},n)=>v__namespace.createElement(hc.Provider,{value:t??"md"},v__namespace.createElement(ar__namespace.Root,{ref:n,className:d(Ff({size:t}),e),...r},o)));_o.displayName=ar__namespace.Root.displayName;var Bo=v__namespace.forwardRef(({className:e,size:t,tooltip:o,tooltipSide:r="top",tooltipDelay:n,"aria-label":a,...i},p)=>{let s=v__namespace.useContext(hc),c=t??s,l=a??(typeof o=="string"?o:void 0),m=v__namespace.createElement(ar__namespace.Item,{ref:p,className:d(zf({size:c}),e),"aria-label":l,...i});return o==null?m:v__namespace.createElement(Fo,{delayDuration:n},v__namespace.createElement(zo,{asChild:true},v__namespace.createElement("span",{className:"inline-flex"},m)),v__namespace.createElement(bo,{side:r},o))});Bo.displayName=ar__namespace.Item.displayName;var Bf=classVarianceAuthority.cva("grid items-center w-full gap-3 [grid-template-columns:auto_1fr_auto]",{variants:{position:{top:"border-b border-border",bottom:"border-t border-border",inline:""},variant:{default:"bg-background",subtle:"bg-muted/30",transparent:"bg-transparent"},size:{sm:"min-h-10 px-3",md:"min-h-12 px-4",lg:"min-h-14 px-6"},sticky:{true:"",false:""}},compoundVariants:[{sticky:true,position:"top",className:"sticky top-0 z-20"},{sticky:true,position:"bottom",className:"sticky bottom-0 z-20"}],defaultVariants:{position:"top",variant:"default",size:"md",sticky:false}}),bc=v__namespace.forwardRef(({className:e,position:t,variant:o,size:r,sticky:n,leading:a,center:i,trailing:p,children:s,"aria-label":c,...l},m)=>{let u=s==null;return v__namespace.createElement("div",{ref:m,role:"toolbar","aria-label":c??"Toolbar","data-gds-part":"toolbar","data-position":t??"top",className:d(Bf({position:t,variant:o,size:r,sticky:n}),e),...l},u?v__namespace.createElement(v__namespace.Fragment,null,v__namespace.createElement("div",{"data-gds-part":"toolbar-leading",className:"flex items-center min-w-0"},a),v__namespace.createElement("div",{"data-gds-part":"toolbar-center",className:"flex items-center min-w-0 justify-center"},i),v__namespace.createElement("div",{"data-gds-part":"toolbar-trailing",className:"flex items-center min-w-0 justify-end"},p)):s)});bc.displayName="Toolbar";var vc=v__namespace.forwardRef(({className:e,align:t="leading",...o},r)=>v__namespace.createElement("div",{ref:r,"data-gds-part":`toolbar-${t}`,className:d("flex items-center min-w-0",t==="center"&&"justify-center",t==="trailing"&&"justify-end",e),...o}));vc.displayName="ToolbarSlot";var xc=v__namespace.createContext(null),_n=v__namespace.createContext(0);function wc(){return v__namespace.useContext(_n)}function Vr(e){let t=v__namespace.useContext(xc);if(!t)throw new Error(`<${e}> must be rendered inside a <Sidebar> root.`);return t}var vo=v__namespace.forwardRef(({collapsed:e,defaultCollapsed:t=false,onCollapsedChange:o,collapsible:r=true,variant:n="rail",className:a,style:i,children:p,...s},c)=>{let l=e!==void 0,[m,u]=v__namespace.useState(t),g=l?e:m,h=n==="panel",f=()=>{let b=!g;l||u(b),o?.(b);};return v__namespace.createElement(Hn,{delayDuration:0},v__namespace.createElement(xc.Provider,{value:{collapsed:g}},v__namespace.createElement("aside",{ref:c,"data-gds-part":"sidebar","data-collapsed":g||void 0,"data-variant":n,className:d("relative flex h-full flex-col bg-card text-card-foreground",h?"w-full border border-border rounded-lg overflow-hidden":"border-r border-border transition-[width] duration-200 ease-out",a),style:h?i:{width:g?"var(--gds-sidebar-collapsed-width, 4rem)":"var(--gds-sidebar-width, 16rem)",...i},...s},p,r&&!h&&v__namespace.createElement("button",{type:"button",onClick:f,"aria-label":g?"Expand sidebar":"Collapse sidebar","data-gds-part":"sidebar-collapse-toggle",className:d("absolute -right-3 top-6 z-10 flex h-6 w-6 items-center justify-center","rounded-full border border-border bg-card text-muted-foreground shadow-sm","hover:text-foreground hover:bg-muted transition-colors")},g?v__namespace.createElement(lucideReact.ChevronRight,{className:"h-3 w-3"}):v__namespace.createElement(lucideReact.ChevronLeft,{className:"h-3 w-3"})))))});vo.displayName="Sidebar";var On=v__namespace.forwardRef(({className:e,...t},o)=>{let{collapsed:r}=Vr("SidebarHeader");return v__namespace.createElement("div",{ref:o,"data-gds-part":"sidebar-header","data-collapsed":r||void 0,className:d("flex shrink-0 items-center border-b border-border",r?"justify-center px-2":"px-3","h-[var(--gds-sidebar-header-height,3.25rem)]",e),...t})});On.displayName="SidebarHeader";var Vn=v__namespace.forwardRef(({className:e,...t},o)=>v__namespace.createElement("nav",{ref:o,"data-gds-part":"sidebar-content",className:d("flex-1 overflow-y-auto overflow-x-hidden","py-[var(--gds-sidebar-content-py,0.5rem)]",e),...t}));Vn.displayName="SidebarContent";var Gn=v__namespace.forwardRef(({className:e,...t},o)=>{let{collapsed:r}=Vr("SidebarFooter");return v__namespace.createElement("div",{ref:o,"data-gds-part":"sidebar-footer","data-collapsed":r||void 0,className:d("shrink-0 border-t border-border",r?"px-2 py-2":"px-3 py-2",e),...t})});Gn.displayName="SidebarFooter";var Wn=v__namespace.forwardRef(({title:e,icon:t,trailing:o,collapsible:r=true,defaultExpanded:n=true,className:a,children:i,...p},s)=>{let{collapsed:c}=Vr("SidebarSection"),[l,m]=v__namespace.useState(n),u=!!e&&r;return c?v__namespace.createElement("div",{ref:s,"data-gds-part":"sidebar-section",className:d("px-[var(--gds-sidebar-section-px,0.5rem)] space-y-[var(--gds-sidebar-section-gap,0.125rem)]",a),...p},i):v__namespace.createElement("div",{ref:s,"data-gds-part":"sidebar-section",className:d("px-[var(--gds-sidebar-section-px,0.5rem)] pb-1",a),...p},e&&(u?v__namespace.createElement("div",{className:d("group/header flex w-full items-center gap-1 rounded-md px-2 py-1.5 text-xs font-medium uppercase tracking-wide","text-muted-foreground hover:text-foreground hover:bg-muted/50 transition-colors")},v__namespace.createElement("button",{type:"button",onClick:()=>m(g=>!g),"aria-expanded":l,className:"flex flex-1 items-center gap-2 text-left min-w-0"},t,v__namespace.createElement("span",{className:"flex-1 text-left normal-case truncate"},e),l?v__namespace.createElement(lucideReact.ChevronDown,{className:"h-3 w-3 shrink-0",strokeWidth:1.5}):v__namespace.createElement(lucideReact.ChevronRight,{className:"h-3 w-3 shrink-0",strokeWidth:1.5})),o&&v__namespace.createElement("span",{className:"flex items-center shrink-0",onClick:g=>g.stopPropagation(),onKeyDown:g=>g.stopPropagation()},o)):v__namespace.createElement("div",{className:d("flex items-center gap-2 px-2 py-1.5 text-xs font-medium uppercase tracking-wide","text-muted-foreground")},t,v__namespace.createElement("span",{className:"flex-1 truncate"},e),o&&v__namespace.createElement("span",{className:"shrink-0"},o))),l&&v__namespace.createElement("div",{className:d("mt-[var(--gds-sidebar-section-gap,0.125rem)]","space-y-[var(--gds-sidebar-section-gap,0.125rem)]")},i))});Wn.displayName="SidebarSection";var jn=v__namespace.forwardRef(({icon:e,badge:t,active:o=false,asButton:r=false,asChild:n=false,disabled:a=false,collapsedLabel:i,size:p="md",description:s,className:c,children:l,...m},u)=>{let{collapsed:g}=Vr("SidebarItem"),h=wc(),f=!g&&h>0?{paddingLeft:`calc(0.5rem + ${h} * var(--gds-sidebar-tree-indent, 1.5rem))`}:void 0,b=p==="sm",y=b?"text-xs px-2 py-1":"text-sm px-2 py-1.5",R=b&&!o?"font-normal":"font-medium",w=o?"bg-primary/10 text-primary":b?"text-muted-foreground hover:bg-muted hover:text-foreground":"text-foreground/80 hover:bg-muted hover:text-foreground",x=!g&&s!=null,S=d("group flex items-center gap-2.5 rounded-md transition-colors",y,R,x&&(b?"py-1.5":"py-2"),g?"justify-center px-2 py-2":null,w,a&&"opacity-50 pointer-events-none",c),M=x?v__namespace.createElement("span",{className:"flex min-w-0 flex-1 flex-col gap-0.5 text-left leading-tight"},v__namespace.createElement("span",{className:"truncate"},l),v__namespace.createElement("span",{className:d("truncate font-normal text-muted-foreground",b?"text-[10px]":"text-[11px]")},s)):v__namespace.createElement("span",{className:"flex-1 truncate text-left"},l),A=v__namespace.createElement(v__namespace.Fragment,null,e&&v__namespace.createElement("span",{className:"shrink-0 [&>svg]:h-4 [&>svg]:w-4","aria-hidden":true},e),!g&&M,!g&&t!==void 0&&t!==null&&v__namespace.createElement("span",{className:"ml-auto inline-flex items-center justify-center rounded bg-muted px-1.5 py-0.5 text-[10px] font-medium text-muted-foreground"},t)),H;if(n)H=v__namespace.createElement(reactSlot.Slot,{"data-gds-part":"sidebar-item","data-active":o||void 0,"aria-current":o?"page":void 0,className:S,style:f},l);else if(r){let{href:z,target:F,rel:B,download:q,hrefLang:ie,ping:N,referrerPolicy:ue,type:k,...G}=m;H=v__namespace.createElement("button",{type:"button","data-gds-part":"sidebar-item","data-active":o||void 0,"aria-current":o?"page":void 0,disabled:a,className:d(S,"w-full text-left"),style:f,...G},A);}else H=v__namespace.createElement("a",{ref:u,"data-gds-part":"sidebar-item","data-active":o||void 0,"aria-current":o?"page":void 0,"aria-disabled":a||void 0,className:S,style:f,...m},A);if(!g)return H;let W=i??(typeof l=="string"?l:null);return W?v__namespace.createElement(Fo,null,v__namespace.createElement(zo,{asChild:true},H),v__namespace.createElement(bo,{side:"right",sideOffset:8},W,t!=null&&v__namespace.createElement("span",{className:"ml-2 inline-flex items-center justify-center rounded bg-foreground/10 px-1.5 py-0 text-[10px]"},t))):H});jn.displayName="SidebarItem";var $n=v__namespace.forwardRef(function({label:t,icon:o,badge:r,active:n=false,defaultExpanded:a=true,expanded:i,onExpandedChange:p,disabled:s,description:c,trailing:l,className:m,style:u,children:g,...h},f){let{collapsed:b}=Vr("SidebarTreeItem"),y=wc(),R=i!==void 0,[w,x]=v__namespace.useState(a),S=R?i:w,M=()=>{let H=!S;R||x(H),p?.(H);};if(b)return v__namespace.createElement(_n.Provider,{value:y},g);let A=y*1.5;return v__namespace.createElement("div",{"data-gds-part":"sidebar-tree-item"},v__namespace.createElement("div",{className:"group/row relative"},v__namespace.createElement("button",{ref:f,type:"button",onClick:M,"aria-expanded":S,"aria-current":n?"page":void 0,"data-active":n||void 0,disabled:s,className:d("group flex w-full items-center gap-1.5 rounded-md py-1 text-sm font-medium transition-colors",n?"bg-primary/10 text-primary":"text-foreground/80 hover:bg-muted hover:text-foreground",s&&"opacity-50 pointer-events-none",l!=null&&"pr-12",m),style:{paddingLeft:`calc(0.25rem + ${A}rem)`,paddingRight:l!=null?"3rem":"0.5rem",...u},...h},v__namespace.createElement("span",{className:"inline-flex h-4 w-4 items-center justify-center text-muted-foreground shrink-0","aria-hidden":true},S?v__namespace.createElement(lucideReact.ChevronDown,{className:"h-3 w-3"}):v__namespace.createElement(lucideReact.ChevronRight,{className:"h-3 w-3"})),o&&v__namespace.createElement("span",{className:"shrink-0 [&>svg]:h-4 [&>svg]:w-4","aria-hidden":true},o),c!=null?v__namespace.createElement("span",{className:"flex min-w-0 flex-1 flex-col gap-0.5 text-left leading-tight"},v__namespace.createElement("span",{className:"truncate"},t),v__namespace.createElement("span",{className:"truncate text-[11px] font-normal text-muted-foreground"},c)):v__namespace.createElement("span",{className:"flex-1 truncate text-left"},t),r!=null&&v__namespace.createElement("span",{className:"ml-auto inline-flex items-center justify-center rounded bg-muted px-1.5 py-0.5 text-[10px] font-medium text-muted-foreground"},r)),l!=null&&v__namespace.createElement("div",{onClick:H=>H.stopPropagation(),className:"pointer-events-auto absolute inset-y-0 right-1.5 flex items-center gap-0.5"},l)),S&&g&&v__namespace.createElement(_n.Provider,{value:y+1},v__namespace.createElement("div",{className:"space-y-[var(--gds-sidebar-section-gap,0.125rem)]"},g)))});$n.displayName="SidebarTreeItem";vo.Header=On;vo.Content=Vn;vo.Footer=Gn;vo.Section=Wn;vo.Item=jn;vo.TreeItem=$n;var yo=[50,100,200,300,400,500,600,700,800,900,950],Rc=[.985,.955,.895,.82,.72,.61,.51,.415,.325,.245,.17],Gf=[.015,.04,.075,.11,.14,.17,.17,.15,.12,.08,.04];function _a({hue:e,chromaScale:t=1}){let o=(e%360+360)%360,r={};for(let n=0;n<yo.length;n++){let a=Rc[n],i=Gf[n]*t;r[yo[n]]=`${a.toFixed(4)} ${i.toFixed(4)} ${o.toFixed(2)}`;}return r}function Sc(){let e={};for(let t=0;t<yo.length;t++){let o=Rc[t];e[yo[t]]=`${o.toFixed(4)} 0 0`;}return e}var Un={light:{destructive:"0.560 0.220 27.0",destructiveFg:"0.990 0.005 27.0",success:"0.610 0.180 145.0",warning:"0.720 0.180 60.0",info:"0.580 0.200 240.0",highlight:"0.860 0.180 95.0"},dark:{destructive:"0.680 0.220 27.0",destructiveFg:"0.990 0.005 27.0",success:"0.720 0.180 145.0",warning:"0.800 0.180 60.0",info:"0.700 0.200 240.0",highlight:"0.880 0.180 95.0"}},Gr="1 0 0",kc="0 0 0";function nr(e,t){let[,o,r]=e.split(/\s+/).map(l=>l.trim()),n=Number(o),a=r;if(t==="light"){let m=Math.min(n*.22,.045),u=.38,g=n;return {soft:`${.965.toFixed(3)} ${m.toFixed(3)} ${a}`,deep:`${u.toFixed(3)} ${g.toFixed(3)} ${a}`}}let i=.22,p=Math.min(n*.45,.075),s=.82,c=n*.9;return {soft:`${i.toFixed(3)} ${p.toFixed(3)} ${a}`,deep:`${s.toFixed(3)} ${c.toFixed(3)} ${a}`}}var Ba={geist:"var(--font-geist), system-ui, sans-serif",inter:"var(--font-inter), system-ui, sans-serif",manrope:"var(--font-manrope), system-ui, sans-serif",figtree:"var(--font-figtree), system-ui, sans-serif",dmSans:"var(--font-dm-sans), system-ui, sans-serif",lexend:"var(--font-lexend), system-ui, sans-serif",outfit:"var(--font-outfit), system-ui, sans-serif",plusJakarta:"var(--font-plus-jakarta), system-ui, sans-serif",spaceGrotesk:"var(--font-space-grotesk), system-ui, sans-serif",poppins:"var(--font-poppins), system-ui, sans-serif",fraunces:"var(--font-fraunces), Georgia, serif",instrumentSerif:"var(--font-instrument-serif), Georgia, serif",sourceSerif:"var(--font-source-serif), Georgia, serif",jetbrainsMono:"var(--font-jetbrains-mono), ui-monospace, monospace",geistMono:"var(--font-geist-mono), ui-monospace, monospace",ibmPlexMono:"var(--font-ibm-plex-mono), ui-monospace, monospace",system:"system-ui, -apple-system, sans-serif",serif:"Georgia, 'Times New Roman', serif",mono:"ui-monospace, Menlo, monospace"};var $f=["superLight","light","dark","superDark"],Uf={muted:.6,default:1,vibrant:1.3};function Kf(e,t,o){let r=t.primary*o,n=t.accent*o,a=(r+n)/2*.8,i=p=>(p%360+360)%360;return {1:`0.600 ${(.17*r).toFixed(4)} ${e.primary.toFixed(2)}`,2:`0.640 ${(.17*a).toFixed(4)} ${i(e.primary+140).toFixed(2)}`,3:`0.580 ${(.17*a).toFixed(4)} ${i(e.primary+220).toFixed(2)}`,4:`0.510 0.0250 ${e.neutral.toFixed(2)}`,5:`0.620 ${(.17*n).toFixed(4)} ${e.accent.toFixed(2)}`}}var oe=e=>({source:"neutral",step:e}),Pt=e=>({source:"primary",step:e}),xo=e=>({source:"accent",step:e}),Wr=e=>({source:"pure",value:e}),qf={superLight:{background:oe(50),foreground:oe(800),card:Wr(Gr),cardForeground:oe(800),popover:Wr(Gr),popoverForeground:oe(800),primary:Pt(600),primaryForeground:Pt(50),secondary:oe(100),secondaryForeground:oe(700),muted:oe(100),mutedForeground:oe(500),accent:xo(600),accentForeground:xo(50),border:oe(200),input:oe(200),ring:Pt(500)},light:{background:oe(50),foreground:oe(950),card:Wr(Gr),cardForeground:oe(950),popover:Wr(Gr),popoverForeground:oe(950),primary:Pt(500),primaryForeground:Pt(50),secondary:oe(100),secondaryForeground:oe(700),muted:oe(100),mutedForeground:oe(500),accent:xo(500),accentForeground:xo(50),border:oe(200),input:oe(200),ring:Pt(500)},dark:{background:oe(950),foreground:oe(50),card:oe(900),cardForeground:oe(50),popover:oe(900),popoverForeground:oe(50),primary:Pt(400),primaryForeground:Pt(950),secondary:oe(800),secondaryForeground:oe(200),muted:oe(800),mutedForeground:oe(400),accent:xo(400),accentForeground:xo(950),border:oe(800),input:oe(800),ring:Pt(400)},superDark:{background:Wr(kc),foreground:oe(100),card:oe(950),cardForeground:oe(100),popover:oe(950),popoverForeground:oe(100),primary:Pt(300),primaryForeground:Pt(950),secondary:oe(900),secondaryForeground:oe(300),muted:oe(900),mutedForeground:oe(500),accent:xo(300),accentForeground:xo(950),border:oe(900),input:oe(900),ring:Pt(300)}};function Xe(e,t){return e.source==="pure"?e.value:t[e.source][e.step]}function Zf(e,t){let o=qf[t],r=t==="superLight"||t==="light",n=r?Un.light:Un.dark;return {background:Xe(o.background,e),foreground:Xe(o.foreground,e),card:Xe(o.card,e),cardForeground:Xe(o.cardForeground,e),popover:Xe(o.popover,e),popoverForeground:Xe(o.popoverForeground,e),primary:Xe(o.primary,e),primaryForeground:Xe(o.primaryForeground,e),secondary:Xe(o.secondary,e),secondaryForeground:Xe(o.secondaryForeground,e),muted:Xe(o.muted,e),mutedForeground:Xe(o.mutedForeground,e),accent:Xe(o.accent,e),accentForeground:Xe(o.accentForeground,e),border:Xe(o.border,e),input:Xe(o.input,e),ring:Xe(o.ring,e),destructive:n.destructive,destructiveForeground:n.destructiveFg,success:n.success,warning:n.warning,info:n.info,highlight:n.highlight,...(()=>{let a=r?"light":"dark",i=nr(n.destructive,a),p=nr(n.success,a),s=nr(n.warning,a),c=nr(n.info,a),l=nr(n.highlight,a);return {destructiveSoft:i.soft,destructiveDeep:i.deep,successSoft:p.soft,successDeep:p.deep,warningSoft:s.soft,warningDeep:s.deep,infoSoft:c.soft,infoDeep:c.deep,highlightSoft:l.soft,highlightDeep:l.deep}})()}}var Yf={display:3.75,h1:2.5,h2:2,h3:1.5,h4:1.25,h5:1.125,h6:1,body:1,bodySm:.875},Cc={compact:.85,default:1,spacious:1.18},Xf=Object.fromEntries(core$1.GDS_MODULAR_SCALES.map(e=>[e.id,e.ratio]));function Jf(e){if(e in Cc){let o=Cc[e];return Object.fromEntries(Object.entries(Yf).map(([r,n])=>[r,n*o]))}let t=core$1.modularTypeSizes(1,Xf[e]);return {display:t["6xl"],h1:t["4xl"],h2:t["3xl"],h3:t["2xl"],h4:t.xl,h5:t.lg,h6:t.base,body:t.base,bodySm:t.sm}}function Qf(e){let t=Jf(e.scale),o=r=>`${r.toFixed(3)}rem`;return {fontSans:Ba[e.body],fontMono:Ba[e.mono],fontDisplay:Ba[e.display],headingWeight:e.headingWeight??600,bodyWeight:e.bodyWeight??400,headingTracking:e.headingTracking??"-0.01em",scale:{display:o(t.display),h1:o(t.h1),h2:o(t.h2),h3:o(t.h3),h4:o(t.h4),h5:o(t.h5),h6:o(t.h6),body:o(t.body),bodySm:o(t.bodySm)}}}var eh={sharp:0,subtle:.25,soft:.5,round:.875,pill:1.25};function th(e){let t=eh[e.style],o=r=>`${r.toFixed(3)}rem`;return {base:o(t),sm:o(Math.max(0,t-.25)),md:o(t),lg:o(t+.25),xl:o(t+.5),"2xl":o(t+1),full:"9999px"}}var oh={tight:.85,default:1,roomy:1.2};function rh(e){return {baseUnit:"1rem",densityFactor:oh[e.density]}}var ah={none:{sm:"none",md:"none",lg:"none",xl:"none","2xl":"none",inner:"none"},subtle:{sm:"0 1px 2px 0 rgb(0 0 0 / 0.03)",md:"0 2px 4px -1px rgb(0 0 0 / 0.04), 0 1px 2px -1px rgb(0 0 0 / 0.03)",lg:"0 6px 14px -2px rgb(0 0 0 / 0.05)",xl:"0 12px 24px -4px rgb(0 0 0 / 0.06)","2xl":"0 24px 48px -12px rgb(0 0 0 / 0.12)",inner:"inset 0 1px 2px 0 rgb(0 0 0 / 0.03)"},default:{sm:"0 1px 2px 0 rgb(0 0 0 / 0.05)",md:"0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1)",lg:"0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1)",xl:"0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1)","2xl":"0 25px 50px -12px rgb(0 0 0 / 0.25)",inner:"inset 0 2px 4px 0 rgb(0 0 0 / 0.05)"},dramatic:{sm:"0 2px 4px 0 rgb(0 0 0 / 0.12)",md:"0 8px 16px -2px rgb(0 0 0 / 0.18), 0 4px 8px -4px rgb(0 0 0 / 0.12)",lg:"0 20px 32px -4px rgb(0 0 0 / 0.22), 0 8px 16px -8px rgb(0 0 0 / 0.18)",xl:"0 32px 48px -6px rgb(0 0 0 / 0.28), 0 12px 24px -10px rgb(0 0 0 / 0.22)","2xl":"0 48px 80px -16px rgb(0 0 0 / 0.45)",inner:"inset 0 4px 8px 0 rgb(0 0 0 / 0.1)"}};function nh(e){let t=e?.shadows??"default",o=e?.motionIntensity??1,r=n=>`${Math.round(n*o)}ms`;return {shadows:ah[t],motion:{fast:r(150),base:r(200),slow:r(300),slower:r(500)},borderWidth:e?.borderWidth??"1px"}}function Oo(e){let t=Uf[e.intensity??"default"],o=e.neutralPureGray??false,r=(e.chroma?.neutral??.08)*t,n=(e.chroma?.primary??1)*t,a=(e.chroma?.accent??1)*t,i=o?Sc():_a({hue:e.hues.neutral,chromaScale:r}),p=_a({hue:e.hues.primary,chromaScale:n}),s=_a({hue:e.hues.accent,chromaScale:a}),c={neutral:i,primary:p,accent:s},l=Kf(e.hues,{primary:n,accent:a},t),m=Object.fromEntries($f.map(y=>[y,Zf(c,y)])),u=Qf(e.typography),g=th(e.radius),h=rh(e.spacing),f=nh(e.effects),b={buttonShape:e.components?.buttonShape??"default",inputStyle:e.components?.inputStyle??"outlined",cardStyle:e.components?.cardStyle??"flat"};return {id:e.id,name:e.name,description:e.description,tagline:e.tagline,input:e,ramps:c,colors:m,chart:l,typography:u,radius:g,spacing:h,effects:f,components:b}}var jr={id:"calm",name:"Calm",description:"Warm neutrals, terracotta primary, serif typography.",tagline:"Signature",hues:{neutral:40,primary:20,accent:40},chroma:{neutral:.15,primary:.75,accent:.8},intensity:"muted",typography:{display:"fraunces",body:"fraunces",mono:"jetbrainsMono",scale:"default",headingWeight:600,headingTracking:"-0.02em"},spacing:{density:"roomy"},radius:{style:"round"},effects:{shadows:"subtle",motionIntensity:1.25},components:{buttonShape:"pill",inputStyle:"outlined",cardStyle:"outlined"}},Kn={id:"energy",name:"Energy",description:"Teal + indigo \u2014 punchy, cool-tone, modern sans.",tagline:"Alternate",hues:{neutral:175,primary:175,accent:235},chroma:{neutral:.08,primary:1,accent:1},intensity:"vibrant",typography:{display:"geist",body:"geist",mono:"geistMono",scale:"default",headingWeight:600},spacing:{density:"default"},radius:{style:"soft"},effects:{shadows:"default",motionIntensity:1},components:{buttonShape:"default",inputStyle:"outlined",cardStyle:"flat"}},Oa=[jr,Kn];function ih(e){return {"--background":e.background,"--foreground":e.foreground,"--card":e.card,"--card-foreground":e.cardForeground,"--popover":e.popover,"--popover-foreground":e.popoverForeground,"--primary":e.primary,"--primary-foreground":e.primaryForeground,"--secondary":e.secondary,"--secondary-foreground":e.secondaryForeground,"--muted":e.muted,"--muted-foreground":e.mutedForeground,"--accent":e.accent,"--accent-foreground":e.accentForeground,"--destructive":e.destructive,"--destructive-foreground":e.destructiveForeground,"--border":e.border,"--input":e.input,"--ring":e.ring,"--success":e.success,"--warning":e.warning,"--info":e.info,"--highlight":e.highlight,"--destructive-soft":e.destructiveSoft,"--destructive-deep":e.destructiveDeep,"--success-soft":e.successSoft,"--success-deep":e.successDeep,"--warning-soft":e.warningSoft,"--warning-deep":e.warningDeep,"--info-soft":e.infoSoft,"--info-deep":e.infoDeep,"--highlight-soft":e.highlightSoft,"--highlight-deep":e.highlightDeep}}function Zn(e,t){let o=e.colors[t];return {...ih(o),...qn("neutral",e.ramps.neutral),...qn("primary",e.ramps.primary),...qn("accent",e.ramps.accent),"--chart-1":e.chart[1],"--chart-2":e.chart[2],"--chart-3":e.chart[3],"--chart-4":e.chart[4],"--chart-5":e.chart[5],...sh(e),"--font-sans":e.typography.fontSans,"--font-mono":e.typography.fontMono,"--font-display":e.typography.fontDisplay,"--font-heading-weight":String(e.typography.headingWeight),"--font-body-weight":String(e.typography.bodyWeight),"--font-heading-tracking":e.typography.headingTracking,"--text-display":e.typography.scale.display,"--text-h1":e.typography.scale.h1,"--text-h2":e.typography.scale.h2,"--text-h3":e.typography.scale.h3,"--text-h4":e.typography.scale.h4,"--text-h5":e.typography.scale.h5,"--text-h6":e.typography.scale.h6,"--text-body":e.typography.scale.body,"--text-body-sm":e.typography.scale.bodySm,"--radius":e.radius.base,"--gds-radius-sm":e.radius.sm,"--gds-radius-md":e.radius.md,"--gds-radius-lg":e.radius.lg,"--gds-radius-xl":e.radius.xl,"--gds-radius-2xl":e.radius["2xl"],"--gds-radius-full":e.radius.full,"--gds-density":String(e.spacing.densityFactor),"--gds-shadow-sm":e.effects.shadows.sm,"--gds-shadow-md":e.effects.shadows.md,"--gds-shadow-lg":e.effects.shadows.lg,"--gds-shadow-xl":e.effects.shadows.xl,"--gds-shadow-2xl":e.effects.shadows["2xl"],"--gds-shadow-inner":e.effects.shadows.inner,"--gds-transition-fast":e.effects.motion.fast,"--gds-transition-base":e.effects.motion.base,"--gds-transition-slow":e.effects.motion.slow,"--gds-transition-slower":e.effects.motion.slower,"--gds-border-width":e.effects.borderWidth}}function sh(e){let t=e.chart,o=e.ramps.primary,r=e.ramps.accent,n=[t[1],t[2],t[3],t[4],t[5],o[400]??o[500],r[400]??r[500],o[600]??o[500]],a={};return n.forEach((i,p)=>{a[`--brand-${p+1}`]=i;}),a}function qn(e,t){let o={};for(let r of yo)o[`--ramp-${e}-${r}`]=t[r];return o}function Va(e,t){if(typeof document>"u")return;let o=document.documentElement,r=Zn(e,t);for(let[n,a]of Object.entries(r))o.style.setProperty(n,a);o.setAttribute("data-grade-theme",e.id),o.setAttribute("data-mode",t),o.setAttribute("data-button-shape",e.components.buttonShape??"default"),o.setAttribute("data-input-style",e.components.inputStyle??"outlined"),o.setAttribute("data-card-style",e.components.cardStyle??"flat");}function $r(e){if(typeof document>"u")return "";let t=document.createElement("span");t.style.color=`oklch(${e})`,t.style.position="absolute",t.style.visibility="hidden",document.body.appendChild(t);let o=getComputedStyle(t).color;document.body.removeChild(t);let r=o.match(/\d+/g);if(!r||r.length<3)return "";let[n,a,i]=r.slice(0,3).map(Number);return "#"+[n,a,i].map(p=>Math.max(0,Math.min(255,p)).toString(16).padStart(2,"0")).join("").toUpperCase()}function lh(e){let t=e.trim().split(/\s+/);if(t.length<3)return {oklch:e,hex:""};let[o,r,n]=t.map(Number),a=`${o.toFixed(3)} ${r.toFixed(3)} ${Math.round(n)}`,i=$r(e);return {oklch:a,hex:i}}function Yn(e,t,o){let r=[`### ${e} ramp (hue ${Math.round(o)}\xB0)`,"","| Step | OKLCH | Hex |","|------|-------|-----|"];for(let n of yo){let{oklch:a,hex:i}=lh(t[n]);r.push(`| ${n} | \`${a}\` | \`${i||"\u2014"}\` |`);}return r.join(`
123
+ `)}function Tc(e,t){let o=[`### ${e}`,"","| Token | Usage | Light (hex) | Dark (hex) |","|-------|-------|-------------|------------|"];for(let r of t){let n=$r(r.light)||"\u2014",a=$r(r.dark)||"\u2014";o.push(`| \`--${r.token}\` | ${r.usage} | \`${n}\` (\`${r.light}\`) | \`${a}\` (\`${r.dark}\`) |`);}return o.join(`
124
+ `)}function Pc(e){return !e||e.input==null?"{}":JSON.stringify(e.input,null,2)??"{}"}function Mc(e){let{input:t,ramps:o,colors:r,chart:n,typography:a,radius:i,spacing:p,effects:s,components:c}=e,l=t.intensity??"default",m=f=>({token:f,usage:dh[f]??"",light:r.light[f],dark:r.dark[f]}),u=["background","foreground","card","cardForeground","popover","popoverForeground","primary","primaryForeground","secondary","secondaryForeground","muted","mutedForeground","accent","accentForeground","border","input","ring"].map(m),g=["destructive","destructiveForeground","success","warning","info","highlight"].map(m),h=[1,2,3,4,5].map(f=>{let b=n[f];return {slot:f,triplet:b,hex:$r(b)||"\u2014"}});return `# ${e.name} \u2014 Grade Design System Theme
119
125
 
120
126
  > **Portable theme spec.** Paste this entire file into a fresh LLM prompt along with your design brief. The model will have everything it needs to produce UI that matches this exact theme \u2014 colors, typography, spacing, shapes, and the "feel" we're after.
121
127
 
@@ -125,7 +131,7 @@ Use directly inside a Card or page section for section-scoped toolbars:
125
131
  - **ID**: \`${t.id}\`
126
132
  ${t.description?`- **Description**: ${t.description}
127
133
  `:""}- **Hues**: neutral \`${t.hues.neutral}\xB0\` \xB7 primary \`${t.hues.primary}\xB0\` \xB7 accent \`${t.hues.accent}\xB0\`
128
- - **Intensity**: \`${d}\` ${d==="muted"?"(quieter chroma across the board)":d==="vibrant"?"(punchier chroma across the board)":"(balanced)"}
134
+ - **Intensity**: \`${l}\` ${l==="muted"?"(quieter chroma across the board)":l==="vibrant"?"(punchier chroma across the board)":"(balanced)"}
129
135
  - **Typography**: ${t.typography.display} display \xB7 ${t.typography.body} body \xB7 ${t.typography.mono} mono \xB7 scale \`${t.typography.scale}\`
130
136
  - **Spacing density**: \`${t.spacing.density}\`
131
137
  - **Radius style**: \`${t.radius.style}\` (base \`${i.base}\`)
@@ -145,30 +151,30 @@ A \`ThemeInput\` is a small object (three hues plus a handful of presets). The g
145
151
  ## Full ThemeInput (round-trippable)
146
152
 
147
153
  \`\`\`json
148
- ${lc(e)}
154
+ ${Pc(e)}
149
155
  \`\`\`
150
156
 
151
157
  ## Color ramps
152
158
 
153
159
  Three 11-stop OKLCH ramps, generated from the input hues + chromas + global intensity. Every color elsewhere in the theme resolves back to one of these stops.
154
160
 
155
- ${Wn("Neutral",o.neutral,t.hues.neutral)}
161
+ ${Yn("Neutral",o.neutral,t.hues.neutral)}
156
162
 
157
- ${Wn("Primary",o.primary,t.hues.primary)}
163
+ ${Yn("Primary",o.primary,t.hues.primary)}
158
164
 
159
- ${Wn("Accent",o.accent,t.hues.accent)}
165
+ ${Yn("Accent",o.accent,t.hues.accent)}
160
166
 
161
167
  ## Semantic tokens (hue-derived)
162
168
 
163
169
  Purpose-based tokens drawn from the ramps. Two values per token \u2014 the generator produces them for all four brightness modes, but only light + dark are shown here for brevity.
164
170
 
165
- ${sc("Core semantic tokens",g)}
171
+ ${Tc("Core semantic tokens",u)}
166
172
 
167
173
  ## Fixed semantic tokens (not hue-derived)
168
174
 
169
175
  Status colors stay consistent across themes so users always read green as success, red as destructive, etc. Accessibility wins over brand cohesion.
170
176
 
171
- ${sc("Status colors",u)}
177
+ ${Tc("Status colors",g)}
172
178
 
173
179
  ## Chart palette
174
180
 
@@ -176,7 +182,7 @@ ${sc("Status colors",u)}
176
182
 
177
183
  | Slot | OKLCH | Hex |
178
184
  |------|-------|-----|
179
- ${b.map(f=>`| \`--chart-${f.slot}\` | \`${f.triplet}\` | \`${f.hex}\` |`).join(`
185
+ ${h.map(f=>`| \`--chart-${f.slot}\` | \`${f.triplet}\` | \`${f.hex}\` |`).join(`
180
186
  `)}
181
187
 
182
188
  ## Typography
@@ -297,7 +303,7 @@ Every component accepts a \`className\` for layout tweaks. Variants are passed v
297
303
 
298
304
  When generating UI in the ${e.name} theme, match this character:
299
305
 
300
- ${hf(e)}
306
+ ${ch(e)}
301
307
 
302
308
  ## Instructions for the generating LLM
303
309
 
@@ -316,7 +322,7 @@ To recreate this theme in code:
316
322
  \`\`\`ts
317
323
  import { generateTheme, applyThemeToRoot, type ThemeInput } from "@gradeui/ui";
318
324
 
319
- const input: ThemeInput = ${lc(e).replace(/\n/g,`
325
+ const input: ThemeInput = ${Pc(e).replace(/\n/g,`
320
326
  `)};
321
327
 
322
328
  const theme = generateTheme(input);
@@ -325,11 +331,11 @@ applyThemeToRoot(theme, "light"); // or "dark" / "superLight" / "superDark"
325
331
 
326
332
  ---
327
333
  *Generated from Grade Design System v1 \xB7 ${new Date().toISOString()}*
328
- `}var ff={background:"Page / body background",foreground:"Primary text",card:"Elevated surface background",cardForeground:"Text on cards",popover:"Floating menu background",popoverForeground:"Text inside floating menus",primary:"Primary actions, links, default button",primaryForeground:"Text on primary-tinted fills",secondary:"Secondary surfaces + quiet buttons",secondaryForeground:"Text on secondary surfaces",muted:"Subtle surfaces (hover states, skeletons)",mutedForeground:"Secondary / less-important text",accent:"Highlights, hover accents",accentForeground:"Text on accent surfaces",border:"Default borders",input:"Form input borders",ring:"Focus ring color",destructive:"Destructive actions, errors",destructiveForeground:"Text on destructive surfaces",success:"Success states",warning:"Warning states",info:"Informational states",highlight:"Emphasis, new features, callouts"};function hf(e){let t=[],{input:o,components:r}=e;o.intensity==="muted"?t.push("- **Quiet and restrained.** Avoid heavy saturation, glowing effects, or loud contrast jumps. Let whitespace do the work."):o.intensity==="vibrant"?t.push("- **Loud and confident.** Primary color wants to lead. Use it on hero CTAs, key metrics, empty states. Don't be shy."):t.push("- **Balanced.** Neither shouty nor sleepy \u2014 a workhorse feel suited to product interfaces."),o.spacing.density==="roomy"?t.push("- **Generous spacing.** Stretch things out \u2014 reach for `gap-6`, `gap-8`, `p-6`, `p-8`. Airy is the vibe."):o.spacing.density==="tight"?t.push("- **Dense layouts.** Pack information in \u2014 `gap-2`, `gap-3`, `p-3`, `p-4`. Scan-friendly dashboard energy."):t.push("- **Standard density.** Use Tailwind's default spacing ladder."),o.radius.style==="pill"?t.push("- **Fully rounded.** Controls are pill-shaped. Use `rounded-full` on custom chips / pills too."):o.radius.style==="sharp"?t.push("- **Square corners.** Zero radius everywhere \u2014 very architectural. Do not add curves."):o.radius.style==="round"?t.push("- **Rounded and friendly.** Corner radius is noticeable (\u224814px base). Avoid sharp edges."):t.push("- **Standard rounded corners.**");let n=o.typography.display;return n==="fraunces"||n==="instrumentSerif"||n==="sourceSerif"?t.push("- **Editorial serif headings.** Treat headings like magazine titles \u2014 give them space and weight. Serifs reward larger sizes."):(n==="geist"||n==="inter")&&t.push("- **Modern technical sans.** Clean, functional, neutral. Good for product UIs."),r.cardStyle==="outlined"?t.push("- **Cards are outlined**, not shadowed. Rely on borders + spacing for hierarchy."):r.cardStyle==="elevated"?t.push("- **Cards have real elevation.** Use shadows to stack content visually."):r.cardStyle==="glass"&&t.push("- **Glass / frosted cards.** Use translucent surfaces over background imagery or gradients."),r.buttonShape==="pill"&&t.push("- **Buttons are pills** \u2014 don't override with square corners."),t.join(`
329
- `)}function Un(e){if(typeof window>"u"||typeof document>"u")return;let t=dc(e),o=new Blob([t],{type:"text/markdown;charset=utf-8"}),r=URL.createObjectURL(o),n=document.createElement("a");n.href=r,n.download=`grade-theme-${e.input.id}.md`,document.body.appendChild(n),n.click(),document.body.removeChild(n),URL.revokeObjectURL(r);}var Ft=Object.fromEntries(Ia.map(e=>[e.id,Io(e)])),tr=_r.id;function Ho(e){if(e in Ft)return Ft[e];let t=Kn(e);if(t)return Io(t)}function $n(){return [...Object.values(Ft),...mc()]}var cc="grade-user-themes";function Fa(){if(typeof localStorage>"u")return {};try{let e=localStorage.getItem(cc);if(!e)return {};let t=JSON.parse(e);return t&&typeof t=="object"?t:{}}catch{return {}}}function pc(e){if(!(typeof localStorage>"u"))try{localStorage.setItem(cc,JSON.stringify(e));}catch{}}function mc(){return Object.values(Fa()).map(Io)}function Kn(e){return Fa()[e]}function za(e){let t=Fa();return t[e.id]=e,pc(t),Io(e)}function qn(e){if(e in Ft)return;let t=Fa();delete t[e],pc(t);}function bf(e,t,o){let r=Ft[e]?.input??Kn(e);if(!r)return;let n={...r,id:t,name:o};return za(n),n}var Yn="grade-theme",Ba="grade-mode",gc=["superLight","light","dark","superDark"],uc=new Set(["dark","superDark"]),vf=`
334
+ `}var dh={background:"Page / body background",foreground:"Primary text",card:"Elevated surface background",cardForeground:"Text on cards",popover:"Floating menu background",popoverForeground:"Text inside floating menus",primary:"Primary actions, links, default button",primaryForeground:"Text on primary-tinted fills",secondary:"Secondary surfaces + quiet buttons",secondaryForeground:"Text on secondary surfaces",muted:"Subtle surfaces (hover states, skeletons)",mutedForeground:"Secondary / less-important text",accent:"Highlights, hover accents",accentForeground:"Text on accent surfaces",border:"Default borders",input:"Form input borders",ring:"Focus ring color",destructive:"Destructive actions, errors",destructiveForeground:"Text on destructive surfaces",success:"Success states",warning:"Warning states",info:"Informational states",highlight:"Emphasis, new features, callouts"};function ch(e){let t=[],{input:o,components:r}=e;o.intensity==="muted"?t.push("- **Quiet and restrained.** Avoid heavy saturation, glowing effects, or loud contrast jumps. Let whitespace do the work."):o.intensity==="vibrant"?t.push("- **Loud and confident.** Primary color wants to lead. Use it on hero CTAs, key metrics, empty states. Don't be shy."):t.push("- **Balanced.** Neither shouty nor sleepy \u2014 a workhorse feel suited to product interfaces."),o.spacing.density==="roomy"?t.push("- **Generous spacing.** Stretch things out \u2014 reach for `gap-6`, `gap-8`, `p-6`, `p-8`. Airy is the vibe."):o.spacing.density==="tight"?t.push("- **Dense layouts.** Pack information in \u2014 `gap-2`, `gap-3`, `p-3`, `p-4`. Scan-friendly dashboard energy."):t.push("- **Standard density.** Use Tailwind's default spacing ladder."),o.radius.style==="pill"?t.push("- **Fully rounded.** Controls are pill-shaped. Use `rounded-full` on custom chips / pills too."):o.radius.style==="sharp"?t.push("- **Square corners.** Zero radius everywhere \u2014 very architectural. Do not add curves."):o.radius.style==="round"?t.push("- **Rounded and friendly.** Corner radius is noticeable (\u224814px base). Avoid sharp edges."):t.push("- **Standard rounded corners.**");let n=o.typography.display;return n==="fraunces"||n==="instrumentSerif"||n==="sourceSerif"?t.push("- **Editorial serif headings.** Treat headings like magazine titles \u2014 give them space and weight. Serifs reward larger sizes."):(n==="geist"||n==="inter")&&t.push("- **Modern technical sans.** Clean, functional, neutral. Good for product UIs."),r.cardStyle==="outlined"?t.push("- **Cards are outlined**, not shadowed. Rely on borders + spacing for hierarchy."):r.cardStyle==="elevated"?t.push("- **Cards have real elevation.** Use shadows to stack content visually."):r.cardStyle==="glass"&&t.push("- **Glass / frosted cards.** Use translucent surfaces over background imagery or gradients."),r.buttonShape==="pill"&&t.push("- **Buttons are pills** \u2014 don't override with square corners."),t.join(`
335
+ `)}function Xn(e){if(typeof window>"u"||typeof document>"u")return;let t=Mc(e),o=new Blob([t],{type:"text/markdown;charset=utf-8"}),r=URL.createObjectURL(o),n=document.createElement("a");n.href=r,n.download=`grade-theme-${e.input.id}.md`,document.body.appendChild(n),n.click(),document.body.removeChild(n),URL.revokeObjectURL(r);}var Wt=Object.fromEntries(Oa.map(e=>[e.id,Oo(e)])),ir=jr.id;function Vo(e){if(e in Wt)return Wt[e];let t=Qn(e);if(t)return Oo(t)}function Jn(){return [...Object.values(Wt),...Lc()]}var Nc="grade-user-themes";function Ga(){if(typeof localStorage>"u")return {};try{let e=localStorage.getItem(Nc);if(!e)return {};let t=JSON.parse(e);return t&&typeof t=="object"?t:{}}catch{return {}}}function Ec(e){if(!(typeof localStorage>"u"))try{localStorage.setItem(Nc,JSON.stringify(e));}catch{}}function Lc(){return Object.values(Ga()).map(Oo)}function Qn(e){return Ga()[e]}function Wa(e){let t=Ga();return t[e.id]=e,Ec(t),Oo(e)}function ei(e){if(e in Wt)return;let t=Ga();delete t[e],Ec(t);}function ph(e,t,o){let r=Wt[e]?.input??Qn(e);if(!r)return;let n={...r,id:t,name:o};return Wa(n),n}var ti="grade-theme",ja="grade-mode",Ac=["superLight","light","dark","superDark"],Dc=new Set(["dark","superDark"]),uh=`
330
336
  (function() {
331
337
  try {
332
- var mode = localStorage.getItem('${Ba}');
338
+ var mode = localStorage.getItem('${ja}');
333
339
  var valid = ['superLight','light','dark','superDark'];
334
340
  if (!mode || valid.indexOf(mode) === -1) {
335
341
  mode = window.matchMedia('(prefers-color-scheme: dark)').matches ? 'dark' : 'light';
@@ -338,14 +344,51 @@ applyThemeToRoot(theme, "light"); // or "dark" / "superLight" / "superDark"
338
344
  document.documentElement.classList.add('dark');
339
345
  }
340
346
  document.documentElement.setAttribute('data-mode', mode);
341
- var themeId = localStorage.getItem('${Yn}');
347
+ var themeId = localStorage.getItem('${ti}');
342
348
  if (themeId) document.documentElement.setAttribute('data-grade-theme', themeId);
343
349
  } catch(e) {}
344
350
  })();
345
- `,Zn=C__namespace.createContext(null);function yf({children:e,defaultTheme:t=tr,defaultMode:o="light"}){let[r,n]=C__namespace.useState(t),[a,i]=C__namespace.useState(o),[p,s]=C__namespace.useState(0);C__namespace.useEffect(()=>{try{let f=localStorage.getItem(Yn);f&&Ho(f)&&n(f);let h=localStorage.getItem(Ba);if(h&&gc.includes(h))i(h);else if(typeof window<"u"){let v=window.matchMedia("(prefers-color-scheme: dark)").matches;i(v?"dark":"light");}}catch{}},[]),C__namespace.useEffect(()=>{let f=Ho(r)??Ho(tr);f&&(Ha(f,a),typeof document<"u"&&document.documentElement.classList.toggle("dark",uc.has(a)));},[r,a,p]),C__namespace.useEffect(()=>{if(typeof window>"u")return;let f=window.matchMedia("(prefers-color-scheme: dark)"),h=v=>{try{if(localStorage.getItem(Ba))return}catch{return}i(v.matches?"dark":"light");};return f.addEventListener("change",h),()=>f.removeEventListener("change",h)},[]);let c=C__namespace.useCallback(f=>{n(f);try{localStorage.setItem(Yn,f);}catch{}},[]),d=C__namespace.useCallback(f=>{i(f);try{localStorage.setItem(Ba,f);}catch{}},[]),m=C__namespace.useCallback(f=>{za(f),s(h=>h+1),c(f.id);},[c]),g=C__namespace.useCallback(f=>{f in Ft||(qn(f),s(h=>h+1),n(h=>h===f?tr:h));},[]),u=C__namespace.useCallback(()=>{s(f=>f+1);},[]),b=C__namespace.useMemo(()=>{let f=Ho(r)??Ho(tr);return {theme:f,themeId:f.id,mode:a,isDark:uc.has(a),setThemeId:c,setMode:d,themes:$n(),saveAndActivate:m,deleteTheme:g,refresh:u}},[r,a,p,c,d,m,g,u]);return C__namespace.createElement(Zn.Provider,{value:b},e)}function Xn(){let e=C__namespace.useContext(Zn);if(!e)throw new Error("useGradeTheme must be used inside <GradeThemeProvider>. Wrap your app (typically in app/layout.tsx).");return e}function Fo(){return C__namespace.useContext(Zn)}var Jn=C__namespace.createContext(null);function fc(){return C__namespace.useContext(Jn)}var Ef={maplibre:()=>Promise.resolve().then(()=>(wc(),xc)).then(e=>e.createMaplibreAdapter),mapbox:()=>Promise.resolve().then(()=>(Cc(),kc)).then(e=>e.createMapboxAdapter),google:()=>Promise.resolve().then(()=>(Nc(),Pc)).then(e=>e.createGoogleAdapter)},Lf=500,Qn=C__namespace.forwardRef(function(t,o){let{center:r,zoom:n,bounds:a,appearance:i="auto",interactive:p=true,hoveredId:s,onHoveredIdChange:c,onLoad:d,onError:m,className:g,style:u,children:b,...f}=t,h=f.provider??"maplibre",v=f.styleUrl,w=f.tilerKey,y=f.accessToken,S=f.apiKey,k=f.mapId,H=C__namespace.useRef(null),E=C__namespace.useRef(null),D=C__namespace.useRef(new globalThis.Map),U=C__namespace.useRef(null),[A,q]=C__namespace.useState(false),F=C__namespace.useRef(c),Y=C__namespace.useRef(m),J=C__namespace.useRef(d);C__namespace.useEffect(()=>{F.current=c,Y.current=m,J.current=d;});let pe=Fo()?.isDark??false,x=i==="auto"?pe?"dark":"light":i;C__namespace.useEffect(()=>{let P=false,te=H.current;if(!te)return;let se=i==="auto"?pe?"dark":"light":i;return (async()=>{try{let ne=await Ef[h]();if(P)return;let B=await ne(te,{center:r,zoom:n,bounds:a,appearance:se,interactive:p,styleUrl:v,tilerKey:w,accessToken:y,apiKey:S,mapId:k},{onLoad:()=>{},onError:Le=>Y.current?.(Le),onMarkerHover:Le=>F.current?.(Le),onMarkerClick:()=>{}});if(P){B.destroy();return}E.current=B,q(!0),J.current?.(Mc(E,D));}catch(ne){if(P)return;ne?.code||Y.current?.({code:"provider-init-failed",message:ne?.message??"Map init failed",cause:ne});}})(),()=>{P=true,E.current?.destroy(),E.current=null,q(false),D.current.clear(),U.current=null;}},[h,v,y,S,k,w]),C__namespace.useEffect(()=>{E.current?.setAppearance(x);},[x]),C__namespace.useEffect(()=>{E.current?.setInteractive(p);},[p]),C__namespace.useEffect(()=>{E.current&&(a?E.current.setBounds(a[0],a[1]):(E.current.setCenter(r),E.current.setZoom(n)));},[r[0],r[1],n,a?.[0]?.[0],a?.[0]?.[1],a?.[1]?.[0],a?.[1]?.[1]]),C__namespace.useEffect(()=>{let P=U.current;P&&P!==s&&D.current.get(P)?.setHovered(false),s&&D.current.get(s)?.setHovered(true),U.current=s??null;},[s]),C__namespace.useImperativeHandle(o,()=>Mc(E,D),[]);let I=C__namespace.useMemo(()=>({registerMarker:(P,te,se)=>{let ne=E.current;if(!ne)return null;let B=ne.addMarker(P,te,se);D.current.set(P,B),process.env.NODE_ENV!=="production"&&D.current.size===Lf+1&&console.warn(`@gradeui/ui Map: rendering ${D.current.size} markers. DOM markers degrade past ~1k. Consider clustering via the .instance escape hatch.`);let Le=B.remove;return B.remove=()=>{Le(),D.current.delete(P),U.current===P&&(U.current=null);},s===P&&B.setHovered(true),B}}),[A]);return C__namespace.createElement("div",{ref:H,"data-gds-part":"map",className:l("gds-map relative isolate overflow-hidden",g),style:{borderRadius:"var(--gds-map-radius, var(--radius, 0.5rem))",border:"var(--gds-map-border, 1px solid var(--border, transparent))",...u}},C__namespace.createElement(Jn.Provider,{value:I},b))});Qn.displayName="Map";function Mc(e,t){let o=()=>{};return {flyTo:(r,n)=>{let a=e.current;if(!a)return;let i;if(typeof r=="string"){if(i=t.current.get(r)?.coords??null,!i){console.warn(`@gradeui/ui Map.flyTo: no marker registered with id "${r}".`);return}}else i=r;a.flyTo(i,n);},panTo:(r,n)=>e.current?.panTo(r,n)??o(),fitBounds:(r,n)=>e.current?.fitBounds(r,n)??o(),getCenter:()=>e.current?.getCenter()??[0,0],getZoom:()=>e.current?.getZoom()??0,getBounds:()=>e.current?.getBounds()??[[0,0],[0,0]],get instance(){return e.current?.instance??null}}}var ei=C__namespace.memo(function({id:t,at:o,anchor:r="bottom",className:n,children:a,onClick:i}){let p=fc(),[s,c]=C__namespace.useState(null),d=C__namespace.useRef(null),m=C__namespace.useRef(i);return C__namespace.useEffect(()=>{m.current=i;}),C__namespace.useEffect(()=>{if(!p)return;let g=p.registerMarker(t,o,r);if(g){d.current=g,c(g.element);let u=b=>{m.current?.({id:t,coords:g.coords,native:b});};return g.element.addEventListener("click",u),()=>{g.element.removeEventListener("click",u),g.remove(),d.current=null,c(null);}}},[p,t]),C__namespace.useEffect(()=>{d.current?.setPosition(o);},[o[0],o[1]]),s?reactDom.createPortal(C__namespace.createElement("div",{"data-gds-part":"map-marker-content",className:l("pointer-events-auto",n)},a),s):null});ei.displayName="MapMarker";var Kf={video:"aspect-video",standard:"aspect-[4/3]",square:"aspect-square",portrait:"aspect-[3/4]",wide:"aspect-[21/9]",auto:""},qf={none:"0",sm:"var(--radius, 0.25rem)",md:"calc(var(--radius, 0.375rem) * 1.25)",lg:"calc(var(--radius, 0.5rem) * 1.5)",xl:"calc(var(--radius, 0.75rem) * 2)"},Yf={album:lucideReact.Disc3,"tv-show":lucideReact.Tv,movie:lucideReact.Clapperboard,game:lucideReact.Gamepad2,book:lucideReact.Book,portrait:lucideReact.User,landscape:lucideReact.Mountain,poster:lucideReact.Film,product:lucideReact.Package,food:lucideReact.UtensilsCrossed,video:lucideReact.Video,audio:lucideReact.Music,embed:lucideReact.Code2,"3d":lucideReact.Box,generic:lucideReact.Image},Zf={album:"square","tv-show":"portrait",movie:"portrait",game:"portrait",book:"portrait",portrait:"portrait",landscape:"wide",poster:"portrait",product:"square",food:"square",video:"video",audio:"video",embed:"video","3d":"square",generic:"video"};function Xf(e){if(!e)return null;switch(e.kind){case "album":return `album:${e.artist}|${e.title}|${e.year??""}`;case "tv-show":return `tv-show:${e.title}|${e.year??""}`;case "movie":return `movie:${e.title}|${e.year??""}`;case "game":return `game:${e.title}`;case "book":return `book:${e.isbn??""}|${e.title??""}|${e.author??""}`;case "poster":return `poster:${e.title}|${e.year??""}`;case "portrait":return `portrait:${e.name??""}|${e.role??""}`;case "landscape":return `landscape:${e.location??""}|${e.mood??""}`;case "product":return `product:${e.brand??""}|${e.name??""}`;case "food":return `food:${e.dish??""}|${e.cuisine??""}`;case "generic":return `generic:${e.prompt}`;default:return `${e.kind}:`}}function Jf(e){let t=Xf(e),[o,r]=C__namespace.useState(0);return C__namespace.useEffect(()=>{if(typeof window>"u")return;let n=()=>r(a=>a+1);return window.addEventListener("grade:media-pending-updated",n),()=>window.removeEventListener("grade:media-pending-updated",n)},[]),C__namespace.useEffect(()=>{},[o]),!t||typeof window>"u"?false:!!window.__gradeMediaPending?.[t]}function Qf(e){if(!e)return "";let t=/^(the|a|an|and|for|by|of|in|on|at|to)$/i,o=e.trim().split(/\s+/).filter(r=>r&&!t.test(r));return o.length===0?e.replace(/\s+/g,"").slice(0,2).toUpperCase():o.length===1?o[0].slice(0,2).toUpperCase():(o[0][0]+o[1][0]).toUpperCase()}function eh(e){return e<64?"sm":e>=160?"lg":"md"}var zt=C__namespace.forwardRef(({className:e,aspect:t,radius:o="lg",border:r=false,loading:n=false,onVisibilityChange:a,fallback:i,emptyState:p="auto",hint:s="generic",alt:c,source:d,src:m,glyph:g,overlay:u,instanceId:b,style:f,children:h,...v},w)=>{let y=C__namespace.useRef(null);C__namespace.useImperativeHandle(w,()=>y.current);let S=s,k=t,H=o,E=r,D=n,U=c,A=m,q=p,F=k??Zf[S];C__namespace.useEffect(()=>{if(!a||!y.current)return;let me=y.current,L=new IntersectionObserver(([de])=>a(de.isIntersecting),{threshold:.05});return L.observe(me),()=>L.disconnect()},[a]);let Y=!h&&q!=="none",[J,z]=C__namespace.useState("md");C__namespace.useEffect(()=>{if(!Y)return;let me=y.current;if(!me)return;let L=new ResizeObserver(([de])=>{let Z=de.contentRect.width;z(eh(Z));});return L.observe(me),()=>L.disconnect()},[Y]);let pe=C__namespace.useMemo(()=>Qf(U),[U]),x=Yf[S]??lucideReact.Image,I=q==="auto"||q==="icon",P=A,te=C__namespace.useMemo(()=>d?JSON.stringify(d):void 0,[d]),[se,ne]=C__namespace.useState(false);C__namespace.useEffect(()=>{ne(false);},[P]);let B=se?void 0:P,Le=Jf(d)&&!B;return C__namespace.createElement("div",{ref:y,"data-gds-part":"media-surface","data-media-hint":S,"data-media-source-kind":d?.kind,"data-media-source":te,"data-media-alt":U,"data-gds-instance-id":b,className:l("gds-media-surface relative w-full overflow-hidden",Kf[F],E&&"border border-border",e),style:{borderRadius:`var(--gds-media-radius, ${qf[H]})`,...f},...v},Y&&C__namespace.createElement("div",{"data-gds-part":"media-surface-placeholder","data-tier":J,"data-fill-pending":Le||void 0,className:l("absolute inset-0 z-0 flex flex-col items-center justify-center gap-2 pointer-events-none px-3 text-center",Le&&"gds-aura-shimmer"),style:{position:"absolute",background:"var(--gds-media-placeholder-bg)",color:"var(--gds-media-placeholder-fg)",...Le?{"--aura-shimmer-duration":"1400ms","--aura-shimmer-delay-between":"400ms"}:null},"aria-hidden":true},I?J==="sm"?pe?C__namespace.createElement("span",{className:"font-semibold text-sm tracking-tight"},pe):C__namespace.createElement(x,{className:"h-1/2 w-1/2 max-h-6 max-w-6"}):J==="md"?C__namespace.createElement(C__namespace.Fragment,null,g??C__namespace.createElement(x,{className:"h-1/3 w-1/3 max-h-10 max-w-10"})):C__namespace.createElement(C__namespace.Fragment,null,g??C__namespace.createElement(x,{className:"h-1/4 w-1/4 max-h-12 max-w-12"}),U&&C__namespace.createElement("span",{className:"text-xs leading-snug line-clamp-2 max-w-[80%]","data-gds-part":"media-surface-caption"},U)):q),(B||h)&&C__namespace.createElement("div",{"data-gds-part":"media-surface-content",className:"absolute inset-0 z-[1]"},B&&C__namespace.createElement("img",{src:B,alt:U??"",onError:()=>ne(true),className:"absolute inset-0 h-full w-full object-cover","data-gds-part":"media-surface-img"}),h),D&&C__namespace.createElement("div",{className:"absolute inset-0 z-[2] flex items-center justify-center bg-muted animate-pulse","aria-hidden":true},i),u&&C__namespace.createElement("div",{"data-gds-part":"media-surface-overlay",className:"absolute inset-0 z-10"},u))});zt.displayName="MediaSurface";var Lc=C__namespace.forwardRef(({src:e,controls:t=true,autoPlay:o=false,loop:r=false,muted:n,pauseOffscreen:a=true,aspect:i="video",radius:p="lg",border:s=false,poster:c,label:d,className:m,style:g,playbackRate:u=1,objectFit:b="cover"},f)=>{let h=C__namespace.useRef(null),v=ao(),[w,y]=C__namespace.useState(!!c);C__namespace.useImperativeHandle(f,()=>h.current);let S=n??o,k=o&&!v;C__namespace.useEffect(()=>{h.current&&(h.current.playbackRate=u);},[u]),C__namespace.useEffect(()=>{y(!!c);},[c]);let H=C__namespace.useCallback(E=>{!a||!h.current||(E&&k?h.current.play().catch(()=>{}):h.current.pause());},[a,k]);return C__namespace.createElement(zt,{aspect:i,radius:p,border:s,"aria-label":d,className:m,style:g,onVisibilityChange:a?H:void 0},C__namespace.createElement("video",{ref:h,src:e,controls:t,autoPlay:k,loop:r,muted:S,playsInline:true,preload:k?"auto":"metadata",onPlaying:()=>y(false),className:l("w-full h-full",b==="cover"&&"object-cover",b==="contain"&&"object-contain",b==="fill"&&"object-fill")},"Your browser does not support the video tag."),c&&w&&C__namespace.createElement("img",{src:c,alt:"","aria-hidden":"true",loading:"lazy",decoding:"async","data-gds-part":"video-poster",className:l("absolute inset-0 w-full h-full pointer-events-none transition-opacity duration-200",b==="cover"&&"object-cover",b==="contain"&&"object-contain",b==="fill"&&"object-fill")}))});Lc.displayName="VideoPlayer";var Dc=C__namespace.forwardRef(({src:e,controls:t=false,autoPlay:o=true,loop:r=true,pauseOffscreen:n=true,aspect:a="square",radius:i="lg",border:p=false,poster:s,label:c,className:d,style:m,stateMachines:g,artboard:u,fit:b="contain",stateMachineInputs:f},h)=>{let v=ao(),[w,y]=C__namespace.useState(null),[S,k]=C__namespace.useState(null);return C__namespace.useEffect(()=>{let H=false;return import('@rive-app/react-canvas').then(E=>{H||y(E);}).catch(()=>{H||k("Rive runtime not installed. Run `npm install @rive-app/react-canvas`.");}),()=>{H=true;}},[]),C__namespace.createElement(zt,{ref:h,aspect:a,radius:i,border:p,"aria-label":c,className:d,style:m},S?C__namespace.createElement("div",{className:"flex items-center justify-center h-full text-sm text-muted-foreground p-4 text-center"},S):w&&e?C__namespace.createElement(rh,{Mod:w,src:e,stateMachines:g,artboard:u,fit:b,stateMachineInputs:f,autoPlay:o&&!v,loop:r,pauseOffscreen:n,controls:t,poster:s}):s&&C__namespace.createElement("img",{src:s,alt:"",className:"w-full h-full object-contain"}))});Dc.displayName="RivePlayer";function rh({Mod:e,src:t,stateMachines:o,artboard:r,fit:n,autoPlay:a,loop:i,pauseOffscreen:p,controls:s,poster:c}){let{useRive:d,Layout:m,Fit:g,Alignment:u,EventType:b}=e,f={contain:g.Contain,cover:g.Cover,fill:g.Fill,fitWidth:g.FitWidth,fitHeight:g.FitHeight,none:g.None},{rive:h,RiveComponent:v}=d({src:t,stateMachines:o,artboard:r,autoplay:a,layout:new m({fit:f[n],alignment:u.Center})}),[w,y]=C__namespace.useState(a);C__namespace.useEffect(()=>{if(!h||!i)return;let k=()=>{h.play();};return h.on(b.Stop,k),()=>{h.off(b.Stop,k);}},[h,i,b]),C__namespace.useEffect(()=>{if(!p||!h)return;let k=h.canvas;if(!k)return;let H=new IntersectionObserver(([E])=>{E.isIntersecting&&a?h.play():h.pause();},{threshold:.05});return H.observe(k),()=>H.disconnect()},[h,p,a]);let S=()=>{h&&(w?(h.pause(),y(false)):(h.play(),y(true)));};return C__namespace.createElement(C__namespace.Fragment,null,C__namespace.createElement(v,{className:"w-full h-full"}),!h&&c&&C__namespace.createElement("img",{src:c,alt:"",className:"absolute inset-0 w-full h-full object-contain pointer-events-none"}),s&&C__namespace.createElement("div",{className:l("absolute inset-0 flex items-end justify-end p-2","opacity-0 hover:opacity-100 transition-opacity","bg-gradient-to-t from-black/40 to-transparent")},C__namespace.createElement(Xe,{size:"icon",variant:"secondary",onClick:S},w?C__namespace.createElement(lucideReact.Pause,{className:"h-4 w-4"}):C__namespace.createElement(lucideReact.Play,{className:"h-4 w-4"}))))}var ah={sm:20,md:28,lg:40,xl:56},nh={horizontal:["horizontal","square","icon"],square:["square","icon","horizontal"],icon:["icon","square","horizontal"]};function ih(e,t,o,r){for(let n of nh[t]){let a=e[n];if(!a)continue;let i=o==="dark"?a.dark??a.light:a.light??a.dark,p=r?a.mono??i:i??a.mono;if(p!=null)return p}return null}var sh=C__namespace.forwardRef(function({sources:t={},lockup:o="horizontal",mode:r="light",mono:n=false,size:a="md",label:i,decorative:p=false,href:s,className:c,style:d,...m},g){let u=typeof a=="number"?a:ah[a],b=ih(t,o,r,n),f=p?{"aria-hidden":true}:i?s?{}:{role:"img","aria-label":i}:{},h=b??C__namespace.createElement(lh,{label:i,mono:n}),v=C__namespace.createElement("span",{className:l("gds-logo inline-flex shrink-0 select-none items-center","[&_img]:h-full [&_img]:w-auto [&_svg]:h-full [&_svg]:w-auto",c),style:{height:u,...d},"data-gds-part":"logo","data-gds-lockup":o,"data-gds-mode":r,...s?{}:f,...s?{}:m},h);return s?C__namespace.createElement("a",{ref:g,href:s,"aria-label":p?void 0:i,className:"inline-flex",...p?{"aria-hidden":true}:{},...m},v):C__namespace.cloneElement(v,{ref:g})});function lh({label:e,mono:t}){return C__namespace.createElement("span",{className:l("inline-flex h-full items-center gap-1.5 rounded-md border border-dashed px-2 text-xs font-medium",t?"border-current/40 text-current":"border-border bg-muted text-muted-foreground")},C__namespace.createElement("span",{"aria-hidden":true,className:"inline-block h-3.5 w-3.5 rounded-[3px] bg-current opacity-60"}),e??"Logo")}var ti=1150,oi=1500,ch="translate(101%, 95%) scale(0.18)",ph="translate(122%, 36%) scale(0.2)",mh="var(--gds-canvas-fill, radial-gradient(circle at 50% 38%, #1b1b22, #0b0b0e))",uh="cubic-bezier(0.34, 1.16, 0.64, 1)",gh="cubic-bezier(0.65, 0, 0.35, 1)";function ri(e,t){let o=e.zoom??1,r=e.cx??.5,n=e.cy??.5;return {transform:`translate(${(.5-r*o)*100}%, ${(.5-n*o)*100}%) scale(${o})`,zoom:o,label:e.label??null,opacity:1,hold:e.hold??2400,trans:t}}var Ac={display:"inline-flex",alignItems:"center",justifyContent:"center",width:28,height:28,borderRadius:999,border:"none",background:"transparent",color:"#fff",cursor:"pointer"};function fh(){return C__namespace.createElement("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":true},C__namespace.createElement("path",{d:"M8 5v14l11-7z"}))}function hh(){return C__namespace.createElement("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":true},C__namespace.createElement("rect",{x:"6",y:"5",width:"4",height:"14",rx:"1"}),C__namespace.createElement("rect",{x:"14",y:"5",width:"4",height:"14",rx:"1"}))}function Ic(){return C__namespace.createElement("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":true},C__namespace.createElement("path",{d:"M3 12a9 9 0 1 0 3-6.7L3 8"}),C__namespace.createElement("path",{d:"M3 3v5h5"}))}function bh({shots:e,autoplay:t=true,loop:o=true,maxLoops:r=1/0,controls:n=true,spotlight:a=false,cursor:i=true,enter:p=true,captionPosition:s="bottom",stage:c=mh,backdrop:d,className:m,style:g,children:u}){let b=Zo(),f=C__namespace.useRef(null),h=kr(),v=react.useInView(f,{amount:.25}),w=h&&v,y=C__namespace.useMemo(()=>{let I=e&&e.length>0?e:[{zoom:1}],P=[];p&&P.push({transform:ch,zoom:.18,label:null,opacity:0,hold:360,trans:0}),P.push(ri(I[0],p?oi:0));for(let te=1;te<I.length;te++)P.push(ri(I[te],ti));return o&&(P.push(ri(I[0],oi)),P.push({transform:ph,zoom:.2,label:null,opacity:0,hold:520,trans:oi})),P},[e,p,o]),S=p&&y.length>1?1:0,[k,H]=C__namespace.useState(t?0:S),[E,D]=C__namespace.useState(t),[U,A]=C__namespace.useState(false),q=C__namespace.useRef(0),F=C__namespace.useCallback(()=>{q.current=0,A(false),H(0),D(true);},[]);C__namespace.useEffect(()=>{if(b||!E||!w||y.length<=1)return;let I=setTimeout(()=>{H(P=>{let te=P+1;return te>=y.length?o&&q.current+1<r?(q.current+=1,0):(D(false),A(true),S):te});},y[k].hold);return ()=>clearTimeout(I)},[k,E,w,b,y,o,r,S]);let Y=b?S:Math.min(k,y.length-1),J=y[Y]??y[0],z=J.opacity===1&&J.zoom>1.05,pe=b?0:J.trans,x=J.zoom<=1.05?uh:gh;return C__namespace.createElement("div",{ref:f,className:l("gds-screen-animator",m),"data-gds-part":"screen-animator",style:{position:"absolute",inset:0,overflow:"hidden",background:c,...g}},C__namespace.createElement("style",null,`
351
+ `,oi=v__namespace.createContext(null);function mh({children:e,defaultTheme:t=ir,defaultMode:o="light"}){let[r,n]=v__namespace.useState(t),[a,i]=v__namespace.useState(o),[p,s]=v__namespace.useState(0);v__namespace.useEffect(()=>{try{let f=localStorage.getItem(ti);f&&Vo(f)&&n(f);let b=localStorage.getItem(ja);if(b&&Ac.includes(b))i(b);else if(typeof window<"u"){let y=window.matchMedia("(prefers-color-scheme: dark)").matches;i(y?"dark":"light");}}catch{}},[]),v__namespace.useEffect(()=>{let f=Vo(r)??Vo(ir);f&&(Va(f,a),typeof document<"u"&&document.documentElement.classList.toggle("dark",Dc.has(a)));},[r,a,p]),v__namespace.useEffect(()=>{if(typeof window>"u")return;let f=window.matchMedia("(prefers-color-scheme: dark)"),b=y=>{try{if(localStorage.getItem(ja))return}catch{return}i(y.matches?"dark":"light");};return f.addEventListener("change",b),()=>f.removeEventListener("change",b)},[]);let c=v__namespace.useCallback(f=>{n(f);try{localStorage.setItem(ti,f);}catch{}},[]),l=v__namespace.useCallback(f=>{i(f);try{localStorage.setItem(ja,f);}catch{}},[]),m=v__namespace.useCallback(f=>{Wa(f),s(b=>b+1),c(f.id);},[c]),u=v__namespace.useCallback(f=>{f in Wt||(ei(f),s(b=>b+1),n(b=>b===f?ir:b));},[]),g=v__namespace.useCallback(()=>{s(f=>f+1);},[]),h=v__namespace.useMemo(()=>{let f=Vo(r)??Vo(ir);return {theme:f,themeId:f.id,mode:a,isDark:Dc.has(a),setThemeId:c,setMode:l,themes:Jn(),saveAndActivate:m,deleteTheme:u,refresh:g}},[r,a,p,c,l,m,u,g]);return v__namespace.createElement(oi.Provider,{value:h},e)}function ri(){let e=v__namespace.useContext(oi);if(!e)throw new Error("useGradeTheme must be used inside <GradeThemeProvider>. Wrap your app (typically in app/layout.tsx).");return e}function Go(){return v__namespace.useContext(oi)}var ai=v__namespace.createContext(null);function Ic(){return v__namespace.useContext(ai)}var Nh={maplibre:()=>Promise.resolve().then(()=>(Oc(),Bc)).then(e=>e.createMaplibreAdapter),mapbox:()=>Promise.resolve().then(()=>(jc(),Wc)).then(e=>e.createMapboxAdapter),google:()=>Promise.resolve().then(()=>(Kc(),Uc)).then(e=>e.createGoogleAdapter),leaflet:()=>Promise.resolve().then(()=>(Xc(),Yc)).then(e=>e.createLeafletAdapter)},Eh=500,ni=v__namespace.forwardRef(function(t,o){let{center:r,zoom:n,bounds:a,appearance:i="auto",interactive:p=true,hoveredId:s,onHoveredIdChange:c,onLoad:l,onError:m,className:u,style:g,children:h,...f}=t,y=globalThis.__gradeMapProvider??f.provider??"leaflet",R=f.styleUrl,w=f.tilerKey,x=f.accessToken,S=f.apiKey,M=f.mapId,A=v__namespace.useRef(null),H=v__namespace.useRef(null),W=v__namespace.useRef(new globalThis.Map),z=v__namespace.useRef(null),[F,B]=v__namespace.useState(false),q=v__namespace.useRef(c),ie=v__namespace.useRef(m),N=v__namespace.useRef(l);v__namespace.useEffect(()=>{q.current=c,ie.current=m,N.current=l;});let k=Go()?.isDark??false,G=i==="auto"?k?"dark":"light":i;v__namespace.useEffect(()=>{let I=false,j=A.current;if(!j)return;let Y=i==="auto"?k?"dark":"light":i;return (async()=>{try{let ae=await Nh[y]();if(I)return;let U=await ae(j,{center:r,zoom:n,bounds:a,appearance:Y,interactive:p,styleUrl:R,tilerKey:w,accessToken:x,apiKey:S,mapId:M},{onLoad:()=>{},onError:xe=>ie.current?.(xe),onMarkerHover:xe=>q.current?.(xe),onMarkerClick:()=>{}});if(I){U.destroy();return}H.current=U,B(!0),N.current?.(Jc(H,W));}catch(ae){if(I)return;ae?.code||ie.current?.({code:"provider-init-failed",message:ae?.message??"Map init failed",cause:ae});}})(),()=>{I=true,H.current?.destroy(),H.current=null,B(false),W.current.clear(),z.current=null;}},[y,R,x,S,M,w]),v__namespace.useEffect(()=>{H.current?.setAppearance(G);},[G]),v__namespace.useEffect(()=>{H.current?.setInteractive(p);},[p]),v__namespace.useEffect(()=>{H.current&&(a?H.current.setBounds(a[0],a[1]):(H.current.setCenter(r),H.current.setZoom(n)));},[r[0],r[1],n,a?.[0]?.[0],a?.[0]?.[1],a?.[1]?.[0],a?.[1]?.[1]]),v__namespace.useEffect(()=>{let I=z.current;I&&I!==s&&W.current.get(I)?.setHovered(false),s&&W.current.get(s)?.setHovered(true),z.current=s??null;},[s]),v__namespace.useImperativeHandle(o,()=>Jc(H,W),[]);let he=v__namespace.useMemo(()=>({registerMarker:(I,j,Y)=>{let ae=H.current;if(!ae)return null;let U=ae.addMarker(I,j,Y);W.current.set(I,U),process.env.NODE_ENV!=="production"&&W.current.size===Eh+1&&console.warn(`@gradeui/ui Map: rendering ${W.current.size} markers. DOM markers degrade past ~1k. Consider clustering via the .instance escape hatch.`);let xe=U.remove;return U.remove=()=>{xe(),W.current.delete(I),z.current===I&&(z.current=null);},s===I&&U.setHovered(true),U}}),[F]);return v__namespace.createElement("div",{ref:A,"data-gds-part":"map",className:d("gds-map relative isolate overflow-hidden",u),style:{borderRadius:"var(--gds-map-radius, var(--radius, 0.5rem))",border:"var(--gds-map-border, 1px solid var(--border, transparent))",...g}},v__namespace.createElement(ai.Provider,{value:he},h))});ni.displayName="Map";function Jc(e,t){let o=()=>{};return {flyTo:(r,n)=>{let a=e.current;if(!a)return;let i;if(typeof r=="string"){if(i=t.current.get(r)?.coords??null,!i){console.warn(`@gradeui/ui Map.flyTo: no marker registered with id "${r}".`);return}}else i=r;a.flyTo(i,n);},panTo:(r,n)=>e.current?.panTo(r,n)??o(),fitBounds:(r,n)=>e.current?.fitBounds(r,n)??o(),getCenter:()=>e.current?.getCenter()??[0,0],getZoom:()=>e.current?.getZoom()??0,getBounds:()=>e.current?.getBounds()??[[0,0],[0,0]],get instance(){return e.current?.instance??null}}}var ii=v__namespace.memo(function({id:t,at:o,anchor:r="bottom",className:n,children:a,onClick:i}){let p=Ic(),[s,c]=v__namespace.useState(null),l=v__namespace.useRef(null),m=v__namespace.useRef(i);return v__namespace.useEffect(()=>{m.current=i;}),v__namespace.useEffect(()=>{if(!p)return;let u=p.registerMarker(t,o,r);if(u){l.current=u,c(u.element);let g=h=>{m.current?.({id:t,coords:u.coords,native:h});};return u.element.addEventListener("click",g),()=>{u.element.removeEventListener("click",g),u.remove(),l.current=null,c(null);}}},[p,t]),v__namespace.useEffect(()=>{l.current?.setPosition(o);},[o[0],o[1]]),s?reactDom.createPortal(v__namespace.createElement("div",{"data-gds-part":"map-marker-content",className:d("pointer-events-auto",n)},a),s):null});ii.displayName="MapMarker";var Uh={video:"aspect-video",standard:"aspect-[4/3]",square:"aspect-square",portrait:"aspect-[3/4]",wide:"aspect-[21/9]",auto:""},Kh={none:"0",sm:"var(--radius, 0.25rem)",md:"calc(var(--radius, 0.375rem) * 1.25)",lg:"calc(var(--radius, 0.5rem) * 1.5)",xl:"calc(var(--radius, 0.75rem) * 2)"},qh={album:lucideReact.Disc3,"tv-show":lucideReact.Tv,movie:lucideReact.Clapperboard,game:lucideReact.Gamepad2,book:lucideReact.Book,portrait:lucideReact.User,landscape:lucideReact.Mountain,poster:lucideReact.Film,product:lucideReact.Package,food:lucideReact.UtensilsCrossed,video:lucideReact.Video,audio:lucideReact.Music,embed:lucideReact.Code2,"3d":lucideReact.Box,generic:lucideReact.Image},Zh={album:"square","tv-show":"portrait",movie:"portrait",game:"portrait",book:"portrait",portrait:"portrait",landscape:"wide",poster:"portrait",product:"square",food:"square",video:"video",audio:"video",embed:"video","3d":"square",generic:"video"};function Yh(e){if(!e)return null;switch(e.kind){case "album":return `album:${e.artist}|${e.title}|${e.year??""}`;case "tv-show":return `tv-show:${e.title}|${e.year??""}`;case "movie":return `movie:${e.title}|${e.year??""}`;case "game":return `game:${e.title}`;case "book":return `book:${e.isbn??""}|${e.title??""}|${e.author??""}`;case "poster":return `poster:${e.title}|${e.year??""}`;case "portrait":return `portrait:${e.name??""}|${e.role??""}`;case "landscape":return `landscape:${e.location??""}|${e.mood??""}`;case "product":return `product:${e.brand??""}|${e.name??""}`;case "food":return `food:${e.dish??""}|${e.cuisine??""}`;case "generic":return `generic:${e.prompt}`;default:return `${e.kind}:`}}function Xh(e){let t=Yh(e),[o,r]=v__namespace.useState(0);return v__namespace.useEffect(()=>{if(typeof window>"u")return;let n=()=>r(a=>a+1);return window.addEventListener("grade:media-pending-updated",n),()=>window.removeEventListener("grade:media-pending-updated",n)},[]),v__namespace.useEffect(()=>{},[o]),!t||typeof window>"u"?false:!!window.__gradeMediaPending?.[t]}function Jh(e){if(!e)return "";let t=/^(the|a|an|and|for|by|of|in|on|at|to)$/i,o=e.trim().split(/\s+/).filter(r=>r&&!t.test(r));return o.length===0?e.replace(/\s+/g,"").slice(0,2).toUpperCase():o.length===1?o[0].slice(0,2).toUpperCase():(o[0][0]+o[1][0]).toUpperCase()}function Qh(e){return e<64?"sm":e>=160?"lg":"md"}var jt=v__namespace.forwardRef(({className:e,aspect:t,radius:o="lg",border:r=false,loading:n=false,onVisibilityChange:a,fallback:i,emptyState:p="auto",hint:s="generic",alt:c,source:l,src:m,glyph:u,overlay:g,instanceId:h,style:f,children:b,...y},R)=>{let w=v__namespace.useRef(null);v__namespace.useImperativeHandle(R,()=>w.current);let x=s,S=t,M=o,A=r,H=n,W=c,z=m,F=p,B=S??Zh[x];v__namespace.useEffect(()=>{if(!a||!w.current)return;let xe=w.current,E=new IntersectionObserver(([me])=>a(me.isIntersecting),{threshold:.05});return E.observe(xe),()=>E.disconnect()},[a]);let q=!b&&F!=="none",[ie,N]=v__namespace.useState("md");v__namespace.useEffect(()=>{if(!q)return;let xe=w.current;if(!xe)return;let E=new ResizeObserver(([me])=>{let X=me.contentRect.width;N(Qh(X));});return E.observe(xe),()=>E.disconnect()},[q]);let ue=v__namespace.useMemo(()=>Jh(W),[W]),k=qh[x]??lucideReact.Image,G=F==="auto"||F==="icon",he=z,I=v__namespace.useMemo(()=>l?JSON.stringify(l):void 0,[l]),[j,Y]=v__namespace.useState(false);v__namespace.useEffect(()=>{Y(false);},[he]);let ae=j?void 0:he,U=Xh(l)&&!ae;return v__namespace.createElement("div",{ref:w,"data-gds-part":"media-surface","data-media-hint":x,"data-media-source-kind":l?.kind,"data-media-source":I,"data-media-alt":W,"data-gds-instance-id":h,className:d("gds-media-surface relative w-full overflow-hidden",Uh[B],A&&"border border-border",e),style:{borderRadius:`var(--gds-media-radius, ${Kh[M]})`,...f},...y},q&&v__namespace.createElement("div",{"data-gds-part":"media-surface-placeholder","data-tier":ie,"data-fill-pending":U||void 0,className:d("absolute inset-0 z-0 flex flex-col items-center justify-center gap-2 pointer-events-none px-3 text-center",U&&"gds-aura-shimmer"),style:{position:"absolute",background:"var(--gds-media-placeholder-bg)",color:"var(--gds-media-placeholder-fg)",...U?{"--aura-shimmer-duration":"1400ms","--aura-shimmer-delay-between":"400ms"}:null},"aria-hidden":true},G?ie==="sm"?ue?v__namespace.createElement("span",{className:"font-semibold text-sm tracking-tight"},ue):v__namespace.createElement(k,{className:"h-1/2 w-1/2 max-h-6 max-w-6"}):ie==="md"?v__namespace.createElement(v__namespace.Fragment,null,u??v__namespace.createElement(k,{className:"h-1/3 w-1/3 max-h-10 max-w-10"})):v__namespace.createElement(v__namespace.Fragment,null,u??v__namespace.createElement(k,{className:"h-1/4 w-1/4 max-h-12 max-w-12"}),W&&v__namespace.createElement("span",{className:"text-xs leading-snug line-clamp-2 max-w-[80%]","data-gds-part":"media-surface-caption"},W)):F),(ae||b)&&v__namespace.createElement("div",{"data-gds-part":"media-surface-content",className:"absolute inset-0 z-[1]"},ae&&v__namespace.createElement("img",{src:ae,alt:W??"",onError:()=>Y(true),className:"absolute inset-0 h-full w-full object-cover","data-gds-part":"media-surface-img"}),b),H&&v__namespace.createElement("div",{className:"absolute inset-0 z-[2] flex items-center justify-center bg-muted animate-pulse","aria-hidden":true},i),g&&v__namespace.createElement("div",{"data-gds-part":"media-surface-overlay",className:"absolute inset-0 z-10"},g))});jt.displayName="MediaSurface";var ep=v__namespace.forwardRef(({src:e,controls:t=true,autoPlay:o=false,loop:r=false,muted:n,pauseOffscreen:a=true,aspect:i="video",radius:p="lg",border:s=false,poster:c,label:l,className:m,style:u,playbackRate:g=1,objectFit:h="cover"},f)=>{let b=v__namespace.useRef(null),y=uo(),[R,w]=v__namespace.useState(!!c);v__namespace.useImperativeHandle(f,()=>b.current);let x=n??o,S=o&&!y;v__namespace.useEffect(()=>{b.current&&(b.current.playbackRate=g);},[g]),v__namespace.useEffect(()=>{w(!!c);},[c]);let M=v__namespace.useCallback(A=>{!a||!b.current||(A&&S?b.current.play().catch(()=>{}):b.current.pause());},[a,S]);return v__namespace.createElement(jt,{aspect:i,radius:p,border:s,"aria-label":l,className:m,style:u,onVisibilityChange:a?M:void 0},v__namespace.createElement("video",{ref:b,src:e,controls:t,autoPlay:S,loop:r,muted:x,playsInline:true,preload:S?"auto":"metadata",onPlaying:()=>w(false),className:d("w-full h-full",h==="cover"&&"object-cover",h==="contain"&&"object-contain",h==="fill"&&"object-fill")},"Your browser does not support the video tag."),c&&R&&v__namespace.createElement("img",{src:c,alt:"","aria-hidden":"true",loading:"lazy",decoding:"async","data-gds-part":"video-poster",className:d("absolute inset-0 w-full h-full pointer-events-none transition-opacity duration-200",h==="cover"&&"object-cover",h==="contain"&&"object-contain",h==="fill"&&"object-fill")}))});ep.displayName="VideoPlayer";var tp=v__namespace.forwardRef(({src:e,controls:t=false,autoPlay:o=true,loop:r=true,pauseOffscreen:n=true,aspect:a="square",radius:i="lg",border:p=false,poster:s,label:c,className:l,style:m,stateMachines:u,artboard:g,fit:h="contain",stateMachineInputs:f},b)=>{let y=uo(),[R,w]=v__namespace.useState(null),[x,S]=v__namespace.useState(null);return v__namespace.useEffect(()=>{let M=false;return import('@rive-app/react-canvas').then(A=>{M||w(A);}).catch(()=>{M||S("Rive runtime not installed. Run `npm install @rive-app/react-canvas`.");}),()=>{M=true;}},[]),v__namespace.createElement(jt,{ref:b,aspect:a,radius:i,border:p,"aria-label":c,className:l,style:m},x?v__namespace.createElement("div",{className:"flex items-center justify-center h-full text-sm text-muted-foreground p-4 text-center"},x):R&&e?v__namespace.createElement(ob,{Mod:R,src:e,stateMachines:u,artboard:g,fit:h,stateMachineInputs:f,autoPlay:o&&!y,loop:r,pauseOffscreen:n,controls:t,poster:s}):s&&v__namespace.createElement("img",{src:s,alt:"",className:"w-full h-full object-contain"}))});tp.displayName="RivePlayer";function ob({Mod:e,src:t,stateMachines:o,artboard:r,fit:n,autoPlay:a,loop:i,pauseOffscreen:p,controls:s,poster:c}){let{useRive:l,Layout:m,Fit:u,Alignment:g,EventType:h}=e,f={contain:u.Contain,cover:u.Cover,fill:u.Fill,fitWidth:u.FitWidth,fitHeight:u.FitHeight,none:u.None},{rive:b,RiveComponent:y}=l({src:t,stateMachines:o,artboard:r,autoplay:a,layout:new m({fit:f[n],alignment:g.Center})}),[R,w]=v__namespace.useState(a);v__namespace.useEffect(()=>{if(!b||!i)return;let S=()=>{b.play();};return b.on(h.Stop,S),()=>{b.off(h.Stop,S);}},[b,i,h]),v__namespace.useEffect(()=>{if(!p||!b)return;let S=b.canvas;if(!S)return;let M=new IntersectionObserver(([A])=>{A.isIntersecting&&a?b.play():b.pause();},{threshold:.05});return M.observe(S),()=>M.disconnect()},[b,p,a]);let x=()=>{b&&(R?(b.pause(),w(false)):(b.play(),w(true)));};return v__namespace.createElement(v__namespace.Fragment,null,v__namespace.createElement(y,{className:"w-full h-full"}),!b&&c&&v__namespace.createElement("img",{src:c,alt:"",className:"absolute inset-0 w-full h-full object-contain pointer-events-none"}),s&&v__namespace.createElement("div",{className:d("absolute inset-0 flex items-end justify-end p-2","opacity-0 hover:opacity-100 transition-opacity","bg-gradient-to-t from-black/40 to-transparent")},v__namespace.createElement(dt,{size:"icon",variant:"secondary",onClick:x},R?v__namespace.createElement(lucideReact.Pause,{className:"h-4 w-4"}):v__namespace.createElement(lucideReact.Play,{className:"h-4 w-4"}))))}var rb={sm:20,md:28,lg:40,xl:56},ab={horizontal:["horizontal","square","icon"],square:["square","icon","horizontal"],icon:["icon","square","horizontal"]};function nb(e,t,o,r){for(let n of ab[t]){let a=e[n];if(!a)continue;let i=o==="dark"?a.dark??a.light:a.light??a.dark,p=r?a.mono??i:i??a.mono;if(p!=null)return p}return null}var ib=v__namespace.forwardRef(function({sources:t={},lockup:o="horizontal",mode:r="light",mono:n=false,size:a="md",label:i,decorative:p=false,href:s,className:c,style:l,...m},u){let g=typeof a=="number"?a:rb[a],h=nb(t,o,r,n),f=p?{"aria-hidden":true}:i?s?{}:{role:"img","aria-label":i}:{},b=h??v__namespace.createElement(sb,{label:i}),y=v__namespace.createElement("span",{className:d("gds-logo inline-flex shrink-0 select-none items-center","[&_img]:h-full [&_img]:w-auto [&_svg]:h-full [&_svg]:w-auto",c),style:{height:g,...l},"data-gds-part":"logo","data-gds-lockup":o,"data-gds-mode":r,...s?{}:f,...s?{}:m},b);return s?v__namespace.createElement("a",{ref:u,href:s,"aria-label":p?void 0:i,className:"inline-flex",...p?{"aria-hidden":true}:{},...m},y):v__namespace.cloneElement(y,{ref:u})});function sb({label:e}){return v__namespace.createElement("svg",{viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e?{}:{"aria-hidden":true}},v__namespace.createElement("path",{d:"M28 0L32 4V10L26 4H6L4 6V26L6 28H16L26 18V24L18 32H4L0 28V4L4 0H28ZM32 32H28V18H16V14H32V32Z",fill:"currentColor"}))}var op="M28 0L32 4V10L26 4H6L4 6V26L6 28H16L26 18V24L18 32H4L0 28V4L4 0H28ZM32 32H28V18H16V14H32V32Z",lb={sm:16,md:24,lg:32,xl:48},rp=v__namespace.forwardRef(({size:e="md",label:t="Loading\u2026",showLabel:o=false,className:r,style:n,...a},i)=>{let p=typeof e=="number"?e:lb[e],s=v__namespace.useId().replace(/[^a-zA-Z0-9-]/g,"");return v__namespace.createElement("div",{ref:i,"data-gds-part":"grade-loader",role:"status","aria-label":t||void 0,className:d("gds-grade-loader inline-flex flex-col items-center gap-2",r),style:n,...a},v__namespace.createElement("style",null,`
352
+ @keyframes gdsLoaderSweep { from { transform: translate(-48px, 48px) } to { transform: translate(48px, -48px) } }
353
+ @keyframes gdsLoaderPulse { 0%, 100% { opacity: 0.35 } 50% { opacity: 0.9 } }
354
+ @media (prefers-reduced-motion: reduce) {
355
+ .gds-grade-loader [data-sweep] { display: none }
356
+ .gds-grade-loader [data-mark] { animation: gdsLoaderPulse 2.2s ease-in-out infinite }
357
+ }
358
+ `),v__namespace.createElement("svg",{width:p,height:p,viewBox:"0 0 32 32",fill:"none","aria-hidden":true,style:{display:"block"}},v__namespace.createElement("defs",null,v__namespace.createElement("clipPath",{id:`${s}-clip`},v__namespace.createElement("path",{d:op})),v__namespace.createElement("linearGradient",{id:`${s}-shine`,x1:"0",y1:"1",x2:"1",y2:"0"},v__namespace.createElement("stop",{offset:"0.35",stopColor:"currentColor",stopOpacity:"0"}),v__namespace.createElement("stop",{offset:"0.5",stopColor:"oklch(var(--brand-1, 0.7 0 0))",stopOpacity:"0.95"}),v__namespace.createElement("stop",{offset:"0.65",stopColor:"currentColor",stopOpacity:"0"}))),v__namespace.createElement("path",{d:op,fill:"currentColor",opacity:.28,"data-mark":true}),v__namespace.createElement("g",{clipPath:`url(#${s}-clip)`},v__namespace.createElement("rect",{"data-sweep":true,x:-16,y:-16,width:64,height:64,fill:`url(#${s}-shine)`,style:{animation:"gdsLoaderSweep 1.4s cubic-bezier(0.45, 0, 0.55, 1) infinite"}}))),o&&t?v__namespace.createElement("span",{className:"text-xs text-muted-foreground"},t):null,!o&&t?v__namespace.createElement("span",{className:"sr-only"},t):null)});rp.displayName="GradeLoader";var si=1150,li=1500,cb="translate(101%, 95%) scale(0.18)",pb="translate(122%, 36%) scale(0.2)",ub="var(--gds-canvas-fill, radial-gradient(circle at 50% 38%, #1b1b22, #0b0b0e))",mb="cubic-bezier(0.34, 1.16, 0.64, 1)",gb="cubic-bezier(0.65, 0, 0.35, 1)";function di(e,t){let o=e.zoom??1,r=e.cx??.5,n=e.cy??.5;return {transform:`translate(${(.5-r*o)*100}%, ${(.5-n*o)*100}%) scale(${o})`,zoom:o,label:e.label??null,opacity:1,hold:e.hold??2400,trans:t}}var ap={display:"inline-flex",alignItems:"center",justifyContent:"center",width:28,height:28,borderRadius:999,border:"none",background:"transparent",color:"#fff",cursor:"pointer"};function fb(){return v__namespace.createElement("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":true},v__namespace.createElement("path",{d:"M8 5v14l11-7z"}))}function hb(){return v__namespace.createElement("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":true},v__namespace.createElement("rect",{x:"6",y:"5",width:"4",height:"14",rx:"1"}),v__namespace.createElement("rect",{x:"14",y:"5",width:"4",height:"14",rx:"1"}))}function np(){return v__namespace.createElement("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":true},v__namespace.createElement("path",{d:"M3 12a9 9 0 1 0 3-6.7L3 8"}),v__namespace.createElement("path",{d:"M3 3v5h5"}))}function ci({shots:e,autoplay:t=true,loop:o=true,maxLoops:r=1/0,controls:n=true,paused:a,onEnded:i,spotlight:p=false,cursor:s=true,enter:c=true,captionPosition:l="bottom",stage:m=ub,backdrop:u,className:g,style:h,children:f}){let b=Jt(),y=v__namespace.useRef(null),R=Nr(),w=react.useInView(y,{amount:.25}),x=R&&w,S=v__namespace.useMemo(()=>{let j=e&&e.length>0?e:[{zoom:1}],Y=[];c&&Y.push({transform:cb,zoom:.18,label:null,opacity:0,hold:360,trans:0}),Y.push(di(j[0],c?li:0));for(let ae=1;ae<j.length;ae++)Y.push(di(j[ae],si));return o&&(Y.push(di(j[0],li)),Y.push({transform:pb,zoom:.2,label:null,opacity:0,hold:520,trans:li})),Y},[e,c,o]),M=c&&S.length>1?1:0,[A,H]=v__namespace.useState(t?0:M),[W,z]=v__namespace.useState(t),[F,B]=v__namespace.useState(false),q=v__namespace.useRef(0),ie=v__namespace.useCallback(()=>{q.current=0,B(false),H(0),z(true);},[]);v__namespace.useEffect(()=>{a!==void 0&&(a?z(false):F||z(true));},[a,F]);let N=v__namespace.useRef(i);v__namespace.useEffect(()=>{N.current=i;}),v__namespace.useEffect(()=>{F&&N.current?.();},[F]),v__namespace.useEffect(()=>{if(b||!W||!x||S.length<=1)return;let j=setTimeout(()=>{H(Y=>{let ae=Y+1;return ae>=S.length?o&&q.current+1<r?(q.current+=1,0):(z(false),B(true),M):ae});},S[A].hold);return ()=>clearTimeout(j)},[A,W,x,b,S,o,r,M]);let ue=b?M:Math.min(A,S.length-1),k=S[ue]??S[0],G=k.opacity===1&&k.zoom>1.05,he=b?0:k.trans,I=k.zoom<=1.05?mb:gb;return v__namespace.createElement("div",{ref:y,className:d("gds-screen-animator",g),"data-gds-part":"screen-animator",style:{position:"absolute",inset:0,overflow:"hidden",background:m,...h}},v__namespace.createElement("style",null,`
346
359
  @keyframes gdsSaPing { from { transform: scale(0.4); opacity: 0.9 } to { transform: scale(1.8); opacity: 0 } }
347
360
  @keyframes gdsSaPulse { 0%,100% { opacity: 1 } 50% { opacity: 0.5 } }
348
- `),d&&C__namespace.createElement("div",{"aria-hidden":true,style:{position:"absolute",inset:0,pointerEvents:"none"}},d),C__namespace.createElement("div",{style:{position:"absolute",inset:0,transform:J.transform,transformOrigin:"0 0",opacity:J.opacity,transition:`transform ${pe}ms ${x}, opacity 700ms ease`}},u),a&&C__namespace.createElement("div",{"aria-hidden":true,style:{position:"absolute",inset:0,pointerEvents:"none",background:"radial-gradient(circle at 50% 50%, transparent 26%, rgba(0,0,0,0.46) 80%)",opacity:z?1:0,transition:`opacity ${ti}ms ease`}}),i&&C__namespace.createElement("div",{key:Y,"aria-hidden":true,style:{position:"absolute",left:"50%",top:"50%",transform:"translate(-50%, -50%)",pointerEvents:"none",opacity:z?1:0,transition:`opacity ${ti}ms ease`}},C__namespace.createElement("span",{style:{position:"absolute",left:-19,top:-19,width:38,height:38,borderRadius:999,border:"2px solid rgba(59,130,246,0.75)",animation:"gdsSaPing 1100ms ease-out 0.4s 1"}}),C__namespace.createElement("svg",{width:"22",height:"22",viewBox:"0 0 24 24",fill:"none"},C__namespace.createElement("path",{d:"M5 3l14 7-6 1.5L10 18 5 3z",fill:"#fff",stroke:"#111",strokeWidth:"1.5",strokeLinejoin:"round"}))),C__namespace.createElement("div",{role:"status","aria-live":"polite","aria-atomic":"true",style:{position:"absolute",left:"50%",[s==="top"?"top":"bottom"]:22,transform:"translateX(-50%)",pointerEvents:"none"}},J.label&&C__namespace.createElement("span",{style:{display:"inline-flex",alignItems:"center",gap:9,padding:"8px 14px",borderRadius:999,background:"rgba(15,15,17,0.62)",color:"#fff",fontSize:13.5,fontWeight:600,backdropFilter:"blur(10px)",boxShadow:"0 6px 22px rgba(0,0,0,0.25)"}},C__namespace.createElement("span",{"aria-hidden":true,style:{width:7,height:7,borderRadius:999,background:"#34d399",animation:"gdsSaPulse 1600ms ease-in-out infinite"}}),J.label)),n&&y.length>1&&!b&&C__namespace.createElement("div",{role:"group","aria-label":"Demo playback controls",style:{position:"absolute",right:16,bottom:16,display:"flex",gap:4,alignItems:"center",padding:"4px 6px",borderRadius:999,background:"rgba(15,15,17,0.55)",backdropFilter:"blur(10px)",boxShadow:"0 6px 22px rgba(0,0,0,0.25)"}},C__namespace.createElement("button",{type:"button",onClick:()=>U?F():D(I=>!I),"aria-label":U?"Replay":E?"Pause":"Play",style:Ac},U?C__namespace.createElement(Ic,null):E?C__namespace.createElement(hh,null):C__namespace.createElement(fh,null)),C__namespace.createElement("button",{type:"button",onClick:F,"aria-label":"Restart",style:Ac},C__namespace.createElement(Ic,null))),U&&!b&&C__namespace.createElement("button",{type:"button",onClick:F,"aria-label":"Replay",style:{position:"absolute",inset:0,margin:"auto",width:64,height:64,display:"grid",placeItems:"center",borderRadius:999,border:"none",color:"#fff",background:"rgba(15,15,17,0.55)",backdropFilter:"blur(10px)",boxShadow:"0 8px 30px rgba(0,0,0,0.35)",cursor:"pointer"}},C__namespace.createElement("svg",{width:"26",height:"26",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":true},C__namespace.createElement("path",{d:"M3 12a9 9 0 1 0 3-6.7L3 8"}),C__namespace.createElement("path",{d:"M3 3v5h5"}))))}var Fc=({renderer:e,scene:t,camera:o,preset:r,width:n,height:a})=>{let i=new postprocessing.EffectComposer(e);i.setSize(n,a),i.addPass(new postprocessing.RenderPass(t,o));let p=new postprocessing.BloomEffect({intensity:0,luminanceThreshold:.6,radius:.6,kernelSize:postprocessing.KernelSize.MEDIUM}),s=new postprocessing.NoiseEffect({blendFunction:postprocessing.BlendFunction.OVERLAY});s.blendMode.opacity.value=0;let c=new postprocessing.ScanlineEffect({blendFunction:postprocessing.BlendFunction.OVERLAY,density:1.25});c.blendMode.opacity.value=0;let d=new postprocessing.VignetteEffect({darkness:0,offset:.5}),m=new postprocessing.ChromaticAberrationEffect({offset:new Re__namespace.Vector2(0,0),radialModulation:false,modulationOffset:.15}),g=new postprocessing.GlitchEffect({chromaticAberrationOffset:new Re__namespace.Vector2(0,0),columns:.05});g.minStrength=0,g.maxStrength=0,g.mode=postprocessing.GlitchMode.DISABLED,g.blendMode.opacity.value=0,i.addPass(new postprocessing.EffectPass(o,p)),i.addPass(new postprocessing.EffectPass(o,s,c,d)),i.addPass(new postprocessing.EffectPass(o,m)),i.addPass(new postprocessing.EffectPass(o,g));function u(b){let f=b.effects;p.intensity=f.bloom?.intensity??0,p.luminanceMaterial&&f.bloom?.luminanceThreshold!==void 0&&(p.luminanceMaterial.threshold=f.bloom.luminanceThreshold),s.blendMode.opacity.value=f.noise?.intensity??0,c.density=f.scanlines?.density??1.25,c.blendMode.opacity.value=f.scanlines?.opacity??0,d.darkness=f.vignette?.darkness??0,d.offset=f.vignette?.offset??.5;let h=f.chromatic?.offset??0;m.offset?.set(h,h);let v=f.glitch?.strength?.[1]??0;f.glitch&&v>0?(g.mode=postprocessing.GlitchMode.SPORADIC,g.blendMode.opacity.value=1,g.minStrength=f.glitch.strength?.[0]??0,g.maxStrength=v):(g.mode=postprocessing.GlitchMode.DISABLED,g.blendMode.opacity.value=0,g.minStrength=0,g.maxStrength=0);}return u(r),{composer:i,setPreset:u,resize:(b,f)=>i.setSize(b,f),dispose:()=>{i.dispose();}}};var or=3e3,ii=400,Ph=80,zc=({width:e,height:t,palette:o})=>{let r=new Re__namespace.Scene;r.background=new Re__namespace.Color(o.background);let n=new Re__namespace.PerspectiveCamera(70,e/t,.1,ii*2);n.position.z=0;let a=new Float32Array(or*6),i=new Float32Array(or*6),p=new Float32Array(or),s=new Re__namespace.Color(o.primary),c=new Re__namespace.Color(o.accent);function d(h,v){let w=Math.random()*Math.PI*2,y=Ph*Math.pow(Math.random(),.6),S=Math.cos(w)*y,k=Math.sin(w)*y,H=v?-Math.random()*ii:-ii;p[h]=H,a[h*6+0]=S,a[h*6+1]=k,a[h*6+2]=H,a[h*6+3]=S,a[h*6+4]=k,a[h*6+5]=H-2,i[h*6+0]=s.r,i[h*6+1]=s.g,i[h*6+2]=s.b,i[h*6+3]=c.r,i[h*6+4]=c.g,i[h*6+5]=c.b;}for(let h=0;h<or;h++)d(h,true);let m=new Re__namespace.BufferGeometry;m.setAttribute("position",new Re__namespace.BufferAttribute(a,3)),m.setAttribute("color",new Re__namespace.BufferAttribute(i,3));let g=new Re__namespace.LineBasicMaterial({vertexColors:true,transparent:true,opacity:.95,blending:Re__namespace.AdditiveBlending}),u=new Re__namespace.LineSegments(m,g);r.add(u);let b=60,f=6;return {scene:r,camera:n,update:(h,v)=>{let w=m.attributes.position.array;for(let y=0;y<or;y++){let S=y*6;w[S+2]+=b*v,w[S+5]=w[S+2]-f,w[S+2]>5&&d(y,false);}m.attributes.position.needsUpdate=true;},resize:(h,v)=>{let w=n;w.aspect=h/v,w.updateProjectionMatrix();},setPalette:h=>{r.background=new Re__namespace.Color(h.background);let v=new Re__namespace.Color(h.primary),w=new Re__namespace.Color(h.accent),y=m.attributes.color.array;for(let S=0;S<or;S++)y[S*6+0]=v.r,y[S*6+1]=v.g,y[S*6+2]=v.b,y[S*6+3]=w.r,y[S*6+4]=w.g,y[S*6+5]=w.b;m.attributes.color.needsUpdate=true;},dispose:()=>{m.dispose(),g.dispose();}}};var Nh=`
361
+ `),u&&v__namespace.createElement("div",{"aria-hidden":true,style:{position:"absolute",inset:0,pointerEvents:"none"}},u),v__namespace.createElement("div",{style:{position:"absolute",inset:0,transform:k.transform,transformOrigin:"0 0",opacity:k.opacity,transition:`transform ${he}ms ${I}, opacity 700ms ease`}},f),p&&v__namespace.createElement("div",{"aria-hidden":true,style:{position:"absolute",inset:0,pointerEvents:"none",background:"radial-gradient(circle at 50% 50%, transparent 26%, rgba(0,0,0,0.46) 80%)",opacity:G?1:0,transition:`opacity ${si}ms ease`}}),s&&v__namespace.createElement("div",{key:ue,"aria-hidden":true,style:{position:"absolute",left:"50%",top:"50%",transform:"translate(-50%, -50%)",pointerEvents:"none",opacity:G?1:0,transition:`opacity ${si}ms ease`}},v__namespace.createElement("span",{style:{position:"absolute",left:-19,top:-19,width:38,height:38,borderRadius:999,border:"2px solid rgba(59,130,246,0.75)",animation:"gdsSaPing 1100ms ease-out 0.4s 1"}}),v__namespace.createElement("svg",{width:"22",height:"22",viewBox:"0 0 24 24",fill:"none"},v__namespace.createElement("path",{d:"M5 3l14 7-6 1.5L10 18 5 3z",fill:"#fff",stroke:"#111",strokeWidth:"1.5",strokeLinejoin:"round"}))),v__namespace.createElement("div",{role:"status","aria-live":"polite","aria-atomic":"true",style:{position:"absolute",left:"50%",[l==="top"?"top":"bottom"]:22,transform:"translateX(-50%)",pointerEvents:"none"}},k.label&&v__namespace.createElement("span",{style:{display:"inline-flex",alignItems:"center",gap:9,padding:"8px 14px",borderRadius:999,background:"rgba(15,15,17,0.62)",color:"#fff",fontSize:13.5,fontWeight:600,backdropFilter:"blur(10px)",boxShadow:"0 6px 22px rgba(0,0,0,0.25)"}},v__namespace.createElement("span",{"aria-hidden":true,style:{width:7,height:7,borderRadius:999,background:"#34d399",animation:"gdsSaPulse 1600ms ease-in-out infinite"}}),k.label)),n&&S.length>1&&!b&&v__namespace.createElement("div",{role:"group","aria-label":"Demo playback controls",style:{position:"absolute",right:16,bottom:16,display:"flex",gap:4,alignItems:"center",padding:"4px 6px",borderRadius:999,background:"rgba(15,15,17,0.55)",backdropFilter:"blur(10px)",boxShadow:"0 6px 22px rgba(0,0,0,0.25)"}},v__namespace.createElement("button",{type:"button",onClick:()=>F?ie():z(j=>!j),"aria-label":F?"Replay":W?"Pause":"Play",style:ap},F?v__namespace.createElement(np,null):W?v__namespace.createElement(hb,null):v__namespace.createElement(fb,null)),v__namespace.createElement("button",{type:"button",onClick:ie,"aria-label":"Restart",style:ap},v__namespace.createElement(np,null))),F&&!b&&v__namespace.createElement("button",{type:"button",onClick:ie,"aria-label":"Replay",style:{position:"absolute",inset:0,margin:"auto",width:64,height:64,display:"grid",placeItems:"center",borderRadius:999,border:"none",color:"#fff",background:"rgba(15,15,17,0.55)",backdropFilter:"blur(10px)",boxShadow:"0 8px 30px rgba(0,0,0,0.35)",cursor:"pointer"}},v__namespace.createElement("svg",{width:"26",height:"26",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":true},v__namespace.createElement("path",{d:"M3 12a9 9 0 1 0 3-6.7L3 8"}),v__namespace.createElement("path",{d:"M3 3v5h5"}))))}var cp=v__namespace.createContext(null),bb={mode:"play",active:true,paused:false,register:()=>({done:()=>{},cancel:()=>{}})};function mi(){return v__namespace.useContext(cp)??bb}var vb="var(--gds-canvas-fill, radial-gradient(circle at 50% 38%, #1b1b22, #0b0b0e))";function yb({label:e,onSkip:t}){return v__namespace.useEffect(()=>{if(!t)return;let o=setTimeout(t,1400);return ()=>clearTimeout(o)},[t]),v__namespace.createElement("div",{style:{position:"absolute",inset:0,display:"grid",placeItems:"center",pointerEvents:"none"}},v__namespace.createElement("span",{style:{padding:"8px 14px",borderRadius:999,background:"rgba(15,15,17,0.6)",border:"1px solid rgba(255,255,255,0.16)",color:"rgba(255,255,255,0.75)",fontSize:12.5,backdropFilter:"blur(10px)"}},e?`Scene \u201C${e}\u201D hit an error`:"This scene hit an error",t?" \u2014 skipping":""))}var Ur=class extends v__namespace.Component{state={failed:false};static getDerivedStateFromError(){return {failed:true}}componentDidCatch(){}render(){return this.state.failed?v__namespace.createElement(yb,{label:this.props.label,onSkip:this.props.onSkip}):this.props.children}};function ip({virtualWidth:e,children:t}){let o=v__namespace.useRef(null),[r,n]=v__namespace.useState(null);v__namespace.useEffect(()=>{let i=o.current;if(!i)return;let p=()=>n({w:i.clientWidth||1,h:i.clientHeight||1});p();let s=new ResizeObserver(p);return s.observe(i),()=>s.disconnect()},[]);let a=r?r.w/e:0;return v__namespace.createElement("div",{ref:o,style:{position:"absolute",inset:0,overflow:"hidden"}},r&&a>0&&v__namespace.createElement("div",{style:{width:e,height:r.h/a,transform:`scale(${a})`,transformOrigin:"0 0"}},t))}function xb(e){let t=e.match(/^\s*([0-9.]+)\s*\/\s*([0-9.]+)\s*$/);if(!t)return null;let o=Number(t[1])/Number(t[2]);return Number.isFinite(o)&&o>0?o:null}function wb({ratio:e,children:t}){let o=v__namespace.useRef(null),[r,n]=v__namespace.useState(null);return v__namespace.useEffect(()=>{let a=o.current;if(!a)return;let i=()=>{let s=a.clientWidth||1,c=a.clientHeight||1,l=Math.min(s,c*e);n({w:l,h:l/e});};i();let p=new ResizeObserver(i);return p.observe(a),()=>p.disconnect()},[e]),v__namespace.createElement("div",{ref:o,style:{position:"absolute",inset:0}},r&&v__namespace.createElement("div",{style:{position:"absolute",left:"50%",top:"50%",transform:"translate(-50%, -50%)",width:r.w,height:r.h,overflow:"hidden"}},t))}function pp({device:e="desktop",shots:t,virtualWidth:o,spotlight:r=false,cursor:n=true,enter:a=false,animate:i="none",screenId:p,className:s,style:c,children:l}){let m=mi(),u=o??(e==="mobile"?390:1100),g=v__namespace.useRef(null),h=m.mode==="play"&&m.active,{register:f}=m;v__namespace.useEffect(()=>{if(!h)return;let y=f();return g.current=y,()=>{g.current=null,y.cancel();}},[h,f]);let b=e==="mobile"?{position:"relative",height:"76%",aspectRatio:"390 / 800",borderRadius:22,flex:"0 0 auto"}:{position:"relative",flex:"1 1 0%",maxWidth:"82%",aspectRatio:"16 / 10",minWidth:0,borderRadius:12};return v__namespace.createElement("div",{"data-gds-part":"motion-screen",className:d("gds-motion-screen",s),style:{...b,overflow:"hidden",background:"var(--gds-background, #fff)",boxShadow:"0 18px 60px rgba(0,0,0,0.38), 0 2px 10px rgba(0,0,0,0.22)",...h&&sp[i]?{animation:sp[i]}:{},...c}},h?v__namespace.createElement(ci,{shots:t,loop:false,controls:false,enter:a,spotlight:r,cursor:n,stage:"transparent",paused:m.paused,onEnded:()=>g.current?.done()},v__namespace.createElement(ip,{virtualWidth:u},l)):v__namespace.createElement(ip,{virtualWidth:u},l))}var up={title:3800,"lower-third":3200,"section-break":4200,broadcast:4200,ticker:6e3,stat:4200,quote:5200};function mp({template:e="title",heading:t,text:o,durationMs:r,tone:n="light",lift:a="none",className:i,style:p}){let s=mi(),c=Jt(),l=r??up[e],m=s.mode==="play"&&s.active,u=m&&!c,g=v__namespace.useRef(null),h=v__namespace.useRef(l),{register:f,paused:b}=s;v__namespace.useEffect(()=>{if(!m)return;h.current=l;let S=f();return g.current=S,()=>{g.current=null,S.cancel();}},[m,l,f]),v__namespace.useEffect(()=>{if(!m||b)return;let S=Date.now(),M=setTimeout(()=>{h.current=0,g.current?.done();},h.current);return ()=>{clearTimeout(M),h.current=Math.max(0,h.current-(Date.now()-S));}},[m,b]);let y=n==="dark"?"#16161a":"#fff",R=a==="none"?void 0:n==="dark"?"0 1px 2px rgba(255,255,255,0.55), 0 2px 24px rgba(255,255,255,0.45)":"0 1px 2px rgba(0,0,0,0.35), 0 2px 28px rgba(0,0,0,0.30)",w=b?"paused":"running",x=(S,M,A=0)=>u?{animation:`${S} ${M}ms cubic-bezier(0.22, 1, 0.36, 1) ${A}ms both`,animationPlayState:w}:{};return v__namespace.createElement("div",{"data-gds-part":"motion-text",className:d("gds-motion-text",i),style:{position:e==="lower-third"||e==="broadcast"||e==="ticker"?"absolute":"relative",...e==="lower-third"?{left:"6%",bottom:"9%"}:e==="broadcast"?{left:0,right:0,bottom:"6%"}:e==="ticker"?{left:0,right:0,bottom:0}:e==="quote"?{textAlign:"center",maxWidth:"64%"}:{textAlign:"center",maxWidth:"72%"},color:y,textShadow:R,isolation:a==="scrim"?"isolate":void 0,pointerEvents:"none",...p}},a==="scrim"&&v__namespace.createElement("div",{"aria-hidden":true,style:{position:"absolute",inset:"-30% -20%",zIndex:-1,pointerEvents:"none",background:n==="dark"?"radial-gradient(ellipse at center, rgba(255,255,255,0.45), transparent 70%)":"radial-gradient(ellipse at center, rgba(0,0,0,0.34), transparent 70%)",filter:"blur(2px)"}}),v__namespace.createElement("style",null,`
362
+ @keyframes gdsMotionFadeUp { from { opacity: 0; transform: translateY(18px) } to { opacity: 1; transform: translateY(0) } }
363
+ @keyframes gdsMotionSlideIn { from { opacity: 0; transform: translateX(-28px) } to { opacity: 1; transform: translateX(0) } }
364
+ @keyframes gdsMotionPush { from { opacity: 0; transform: scale(1.05) } to { opacity: 1; transform: scale(1) } }
365
+ @keyframes gdsMotionMarquee { from { transform: translateX(0) } to { transform: translateX(-50%) } }
366
+ @keyframes gdsMotionStatSlam { 0% { opacity: 0; transform: scale(2.2) } 60% { opacity: 1; transform: scale(0.96) } 80% { transform: scale(1.02) } 100% { opacity: 1; transform: scale(1) } }
367
+ @keyframes gdsMotionQuoteMark { from { opacity: 0; transform: translateY(10px) scale(0.9) } to { opacity: 0.14; transform: translateY(0) scale(1) } }
368
+ `),e==="title"&&v__namespace.createElement(v__namespace.Fragment,null,v__namespace.createElement("div",{style:{fontSize:"clamp(26px, 5.2vw, 60px)",fontWeight:700,letterSpacing:"-0.02em",lineHeight:1.06,...x("gdsMotionFadeUp",700)}},t),o&&v__namespace.createElement("div",{style:{marginTop:14,fontSize:"clamp(14px, 1.8vw, 20px)",opacity:.72,...x("gdsMotionFadeUp",700,160)}},o)),e==="lower-third"&&v__namespace.createElement("div",{style:{display:"inline-flex",flexDirection:"column",gap:3,padding:"10px 16px",borderRadius:12,background:n==="dark"?"rgba(255,255,255,0.78)":"rgba(15,15,17,0.62)",backdropFilter:"blur(10px)",boxShadow:"0 6px 22px rgba(0,0,0,0.25)",...x("gdsMotionSlideIn",500)}},v__namespace.createElement("span",{style:{fontSize:15,fontWeight:650}},t),o&&v__namespace.createElement("span",{style:{fontSize:12.5,opacity:.72}},o)),e==="broadcast"&&v__namespace.createElement("div",{style:{overflow:"hidden",...x("gdsMotionSlideIn",600)}},o&&v__namespace.createElement("div",{style:{display:"inline-block",marginLeft:"6%",padding:"5px 14px",fontSize:12.5,fontWeight:600,letterSpacing:"0.04em",textTransform:"uppercase",color:"#fff",background:"oklch(var(--primary, 0.45 0.18 264) / 0.85)"}},o),v__namespace.createElement("div",{style:{padding:"12px 6% 14px",background:"linear-gradient(90deg, oklch(var(--primary, 0.45 0.18 264)) 0%, oklch(var(--primary, 0.45 0.18 264) / 0.92) 70%, oklch(var(--primary, 0.45 0.18 264) / 0) 100%)",color:"#fff"}},v__namespace.createElement("span",{style:{fontSize:22,fontWeight:800,letterSpacing:"-0.01em"}},t))),e==="section-break"&&v__namespace.createElement("div",{style:{fontSize:"clamp(30px, 6vw, 72px)",fontWeight:700,letterSpacing:"-0.025em",lineHeight:1.04,...x("gdsMotionPush",1400)}},t),e==="ticker"&&v__namespace.createElement("div",{style:{display:"flex",alignItems:"stretch",background:n==="dark"?"rgba(255,255,255,0.78)":"rgba(15,15,17,0.62)",backdropFilter:"blur(10px)",overflow:"hidden",...x("gdsMotionFadeUp",500)}},v__namespace.createElement("span",{style:{flex:"0 0 auto",display:"inline-flex",alignItems:"center",padding:"7px 14px",fontSize:11.5,fontWeight:700,letterSpacing:"0.08em",textTransform:"uppercase",color:"#fff",background:"oklch(var(--primary, 0.45 0.18 264))"}},t),o&&v__namespace.createElement("div",{style:{flex:"1 1 0%",minWidth:0,display:"flex",alignItems:"center",overflow:"hidden",maskImage:"linear-gradient(90deg, transparent 0, #000 24px, #000 calc(100% - 24px), transparent 100%)"}},v__namespace.createElement("div",{style:{display:"inline-flex",whiteSpace:"nowrap",fontSize:13,...u?{animation:"gdsMotionMarquee 24000ms linear infinite",animationPlayState:w}:{}}},v__namespace.createElement("span",{style:{padding:"0 0 0 16px"}},o," \xB7 "),v__namespace.createElement("span",{style:{padding:"0 0 0 4px"}},o," \xB7 ")))),e==="stat"&&v__namespace.createElement(v__namespace.Fragment,null,v__namespace.createElement("div",{style:{fontSize:"clamp(48px, 16vw, 180px)",fontWeight:900,letterSpacing:"-0.04em",lineHeight:1,...x("gdsMotionStatSlam",800)}},t),o&&v__namespace.createElement("div",{style:{marginTop:16,fontSize:"clamp(14px, 1.8vw, 20px)",opacity:.72,...x("gdsMotionFadeUp",700,420)}},o)),e==="quote"&&v__namespace.createElement("div",{style:{position:"relative"}},v__namespace.createElement("span",{"aria-hidden":true,style:{position:"absolute",top:"-0.45em",left:"-0.18em",fontSize:"clamp(80px, 12vw, 160px)",fontWeight:800,lineHeight:1,opacity:u?void 0:.14,pointerEvents:"none",...x("gdsMotionQuoteMark",900)}},"\u201C"),v__namespace.createElement("div",{style:{position:"relative",fontSize:"clamp(22px, 3.6vw, 44px)",fontWeight:600,letterSpacing:"-0.015em",lineHeight:1.25,...x("gdsMotionFadeUp",700)}},t),o&&v__namespace.createElement("div",{style:{marginTop:18,fontSize:"clamp(13px, 1.6vw, 17px)",opacity:.65,...x("gdsMotionFadeUp",700,240)}},"\u2014 ",o)))}var Rb={"top-left":{top:18,left:20},top:{top:18,left:0,right:0,display:"grid",placeItems:"center"},"top-right":{top:18,right:20},center:{inset:0,display:"grid",placeItems:"center"},"bottom-left":{bottom:18,left:20},bottom:{bottom:18,left:0,right:0,display:"grid",placeItems:"center"},"bottom-right":{bottom:52,right:20},"lower-third":{left:"6%",right:"6%",bottom:"8%"}};function gi({zone:e="top-right",fromScene:t,toScene:o,interactive:r=false,className:n,style:a,children:i}){return v__namespace.createElement("div",{"data-gds-part":"motion-overlay",className:d("gds-motion-overlay",n),style:{position:"absolute",zIndex:20,pointerEvents:r?"auto":"none",...Rb[e],...a}},i)}var gp={fade:420,"slide-up":520,"slide-down":520,"slide-left":520,"slide-right":520,pop:420,zoom:650,"wipe-circle":750,none:0};function Sb(e,t){switch(e){case "fade":return `gdsMotionSceneIn ${t}ms ease both`;case "slide-up":return `gdsMotionSceneUp ${t}ms cubic-bezier(0.22, 1, 0.36, 1) both`;case "slide-down":return `gdsMotionSceneDown ${t}ms cubic-bezier(0.22, 1, 0.36, 1) both`;case "slide-left":return `gdsMotionSceneLeft ${t}ms cubic-bezier(0.22, 1, 0.36, 1) both`;case "slide-right":return `gdsMotionSceneRight ${t}ms cubic-bezier(0.22, 1, 0.36, 1) both`;case "pop":return `gdsMotionScenePop ${t}ms cubic-bezier(0.34, 1.56, 0.64, 1) both`;case "zoom":return `gdsMotionSceneZoom ${t}ms cubic-bezier(0.22, 1, 0.36, 1) both`;case "wipe-circle":return `gdsMotionSceneWipe ${t}ms cubic-bezier(0.65, 0, 0.35, 1) both`;case "none":return null}}var kb=`
369
+ @keyframes gdsMotionSceneIn { from { opacity: 0 } to { opacity: 1 } }
370
+ @keyframes gdsMotionSceneUp { from { opacity: 0; transform: translateY(7%) } to { opacity: 1; transform: translateY(0) } }
371
+ @keyframes gdsMotionSceneDown { from { opacity: 0; transform: translateY(-7%) } to { opacity: 1; transform: translateY(0) } }
372
+ @keyframes gdsMotionSceneLeft { from { opacity: 0; transform: translateX(7%) } to { opacity: 1; transform: translateX(0) } }
373
+ @keyframes gdsMotionSceneRight { from { opacity: 0; transform: translateX(-7%) } to { opacity: 1; transform: translateX(0) } }
374
+ @keyframes gdsMotionScenePop { from { opacity: 0; transform: scale(0.9) } to { opacity: 1; transform: scale(1) } }
375
+ @keyframes gdsMotionSceneZoom { from { opacity: 0; transform: scale(1.1) } to { opacity: 1; transform: scale(1) } }
376
+ @keyframes gdsMotionSceneWipe { from { clip-path: circle(0% at 50% 50%) } to { clip-path: circle(141% at 50% 50%) } }
377
+ @keyframes gdsMotionScreenRise { from { opacity: 0; transform: translateY(7%) scale(0.97) } to { opacity: 1; transform: translateY(0) scale(1) } }
378
+ @keyframes gdsMotionScreenFloat { from { transform: translateY(-1.2%) } to { transform: translateY(1.2%) } }
379
+ @keyframes gdsMotionScreenTilt { from { transform: perspective(1100px) rotateX(12deg) rotateY(-16deg) } to { transform: perspective(1100px) rotateX(0deg) rotateY(0deg) } }
380
+ @keyframes gdsMotionScreenDrift { from { transform: translateX(-1.5%) } to { transform: translateX(1.5%) } }
381
+ `,sp={rise:"gdsMotionScreenRise 900ms cubic-bezier(0.22, 1, 0.36, 1) both",float:"gdsMotionScreenFloat 6s ease-in-out infinite alternate","tilt-settle":"gdsMotionScreenTilt 1800ms cubic-bezier(0.22, 1, 0.36, 1) both",drift:"gdsMotionScreenDrift 9s ease-in-out infinite alternate",none:null},ui=4e3,fp=420;function Ka({label:e,durationMs:t,fill:o,transition:r="fade",transitionMs:n,className:a,style:i,children:p,internal:s}){let{active:c,paused:l,mode:m,onSceneEnd:u}=s,g=m==="play"&&c,h=t!=null,f=v__namespace.useRef(0),b=v__namespace.useRef(0),y=v__namespace.useRef(false),R=v__namespace.useRef(!h),w=v__namespace.useCallback(()=>{y.current||(y.current=true,u());},[u]),x=v__namespace.useRef(null),S=v__namespace.useRef(l);S.current=l;let M=v__namespace.useRef(false),A=v__namespace.useCallback(()=>{if(R.current&&!(f.current>0&&b.current<f.current)){if(S.current){M.current=true;return}x.current||(x.current=setTimeout(w,fp));}},[w]);v__namespace.useEffect(()=>{if(l){x.current&&(clearTimeout(x.current),x.current=null,M.current=true);return}M.current&&(M.current=false,A());},[l,A]);let H=v__namespace.useCallback(()=>{f.current+=1;let F=false;return {done:()=>{F||(F=true,b.current+=1,A());},cancel:()=>{f.current-=1,F?b.current-=1:A();}}},[A]),W=v__namespace.useRef(t??ui);v__namespace.useEffect(()=>{if(g)return W.current=t??ui,y.current=false,R.current=!h,()=>{x.current&&(clearTimeout(x.current),x.current=null);}},[g,t,h]),v__namespace.useEffect(()=>{if(!g||l||!h&&f.current>0)return;let F=Date.now(),B=setTimeout(()=>{R.current=true,A();},W.current);return ()=>{clearTimeout(B),W.current=Math.max(0,W.current-(Date.now()-F));}},[g,l,h,A]);let z=v__namespace.useMemo(()=>({mode:m,active:c,paused:l,register:H}),[m,c,l,H]);return v__namespace.createElement(cp.Provider,{value:z},v__namespace.createElement("div",{"data-gds-part":"motion-scene",className:d("gds-motion-scene",a),style:{position:"absolute",inset:0,background:o,isolation:"isolate",...g?(()=>{let F=n??gp[r],B=Sb(r,F);return B?{animation:B}:{}})():{},...i}},v__namespace.createElement("style",null,kb),v__namespace.createElement("div",{style:{position:"absolute",inset:0,display:"flex",alignItems:"center",justifyContent:"center",gap:"4%",padding:"6%"}},p)))}function Cb(e){return v__namespace.createElement(Ka,{...e,internal:{active:true,paused:false,mode:"play",onSceneEnd:()=>{}}})}var pi={display:"inline-flex",alignItems:"center",justifyContent:"center",width:28,height:28,borderRadius:999,border:"none",background:"transparent",color:"#fff",cursor:"pointer"};function Tb(){return v__namespace.createElement("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":true},v__namespace.createElement("path",{d:"M8 5v14l11-7z"}))}function Pb(){return v__namespace.createElement("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":true},v__namespace.createElement("rect",{x:"6",y:"5",width:"4",height:"14",rx:"1"}),v__namespace.createElement("rect",{x:"14",y:"5",width:"4",height:"14",rx:"1"}))}function lp(){return v__namespace.createElement("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":true},v__namespace.createElement("path",{d:"M3 12a9 9 0 1 0 3-6.7L3 8"}),v__namespace.createElement("path",{d:"M3 3v5h5"}))}function Mb(e){return v__namespace.isValidElement(e)&&e.type===gi}function Nb(e){return v__namespace.isValidElement(e)&&e.type!==gi}var Eb=1500,Lb=2400,Db=1150;function Ab(e){let t=e.shots&&e.shots.length>0?e.shots:[{}],o=e.enter===true?Eb:0;return t.forEach((r,n)=>{o+=(r.hold??Lb)+(n>0?r.trans??Db:0);}),o}function hp(e,t,o){t>7||v__namespace.Children.forEach(e,r=>{if(!v__namespace.isValidElement(r))return;if(r.type===pp){o.push(Ab(r.props));return}if(r.type===mp){let a=r.props;o.push(a.durationMs??up[a.template??"title"]);return}let n=r.props.children;n&&hp(n,t+1,o);});}function Ib(e){let t=[];hp(e.props.children,0,t);let o=t.length>0?Math.max(...t):0,r=e.props.durationMs??0;return (Math.max(o,r)||(e.props.durationMs??ui))+fp}function dp(e,t,o){if(!(!e||typeof e.getAnimations!="function"))try{for(let r of e.getAnimations({subtree:!0}))try{r.currentTime=t,o?r.pause():r.play();}catch{}}catch{}}function Hb({view:e="play",aspect:t="auto",stage:o=vb,backdrop:r,autoplay:n=true,loop:a=false,controls:i=true,className:p,style:s,children:c}){let l=Jt(),m=v__namespace.Children.toArray(c),u=m.filter(Nb),g=m.filter(Mb),h=u.length,f=t!=="auto"?xb(t):null,b=f?t:"16 / 9",y=f&&f<1?"clamp(150px, 17%, 250px)":"clamp(260px, 30%, 440px)",[R,w]=v__namespace.useState(0),[x,S]=v__namespace.useState(!n),[M,A]=v__namespace.useState(false),[H,W]=v__namespace.useState(0),[z,F]=v__namespace.useState(null),B=z??e,[q,ie]=v__namespace.useState(false),N=v__namespace.useMemo(()=>{let O=u.map(ge=>Ib(ge)),K=[],V=0;for(let ge of O)K.push(V),V+=ge;return {durations:O,starts:K,totalMs:Math.max(V,1)}},[u]),ue=v__namespace.useRef(0),k=v__namespace.useRef(null),G=v__namespace.useRef(0);G.current=R;let he=v__namespace.useCallback(O=>{let{starts:K,durations:V}=N;for(let ge=K.length-1;ge>=0;ge--)if(O>=K[ge])return Math.min(ge,K.length-1);return 0},[N]),I=v__namespace.useCallback(()=>{let O=k.current?.querySelectorAll('[data-gds-part="motion-scene"]');return O&&O.length>0?O[O.length-1]:null},[]),j=v__namespace.useCallback((O,K)=>{let V=Math.max(0,Math.min(O,N.totalMs-1));ue.current=V,A(false),K?.resume&&S(false);let ge=he(V);if(ge===G.current&&!K?.resume){let Ne=V-N.starts[ge];dp(I(),Ne,Y.current);try{window.parent?.postMessage({type:"grade:motion-time",timeMs:Math.round(V),totalMs:N.totalMs,durations:N.durations},"*");}catch{}return}try{window.parent?.postMessage({type:"grade:motion-time",timeMs:Math.round(V),totalMs:N.totalMs,durations:N.durations},"*");}catch{}let Te=ge;w(Te),W(Ne=>Ne+1);let _=V-N.starts[Te],Le=!K?.resume&&Y.current;requestAnimationFrame(()=>requestAnimationFrame(()=>{dp(I(),_,Le);}));},[N,he,I]),Y=v__namespace.useRef(x);Y.current=x;let ae=v__namespace.useRef(N);ae.current=N,v__namespace.useEffect(()=>{if(x||M||l||B!=="play"||h===0)return;let O=0,K=performance.now(),V=0,ge=Te=>{let _=ae.current,Le=Math.min(Te-K,120);if(K=Te,ue.current+=Le,ue.current>=_.totalMs)if(a)ue.current=0,w(0),W(Ne=>Ne+1);else {ue.current=_.totalMs,A(true),S(true);return}else {let{starts:Ne}=_,Mt=0;for(let We=Ne.length-1;We>=0;We--)if(ue.current>=Ne[We]){Mt=We;break}Mt!==G.current&&(w(Mt),W(We=>We+1));}if(Te-V>150){V=Te;try{window.parent?.postMessage({type:"grade:motion-time",timeMs:Math.round(ue.current),totalMs:_.totalMs,durations:_.durations},"*");}catch{}}O=requestAnimationFrame(ge);};return O=requestAnimationFrame(ge),()=>cancelAnimationFrame(O)},[x,M,l,B,h,a]),v__namespace.useEffect(()=>{if(l||B!=="play")return;let O=k.current?.querySelectorAll('[data-gds-part="motion-scene"]'),K=O?.[O.length-1]??null;if(!(!K||typeof K.getAnimations!="function"))try{for(let V of K.getAnimations({subtree:!0}))try{x?V.pause():V.play();}catch{}}catch{}},[x,l,B,R,H]);let[U,xe]=v__namespace.useState(null),E=v__namespace.useRef(null);v__namespace.useEffect(()=>{let O=E.current;if(E.current=R,O===null||O===R)return;let K=u[R];if(!K)return;let V=K.props.transition??"fade",ge=K.props.transitionMs??gp[V]??0;if(ge<=0||Y.current){xe(null);return}xe(O);let Te=setTimeout(()=>xe(null),ge+60);return ()=>clearTimeout(Te)},[R,H]);let me=v__namespace.useCallback(O=>{j(N.starts[Math.max(0,Math.min(O,h-1))]??0,{resume:true});},[j,N,h]),X=v__namespace.useCallback(()=>{let O=G.current+1;O<h?j(N.starts[O],{resume:true}):a&&h>0?j(0,{resume:true}):(A(true),S(true));},[h,a,j,N]);v__namespace.useEffect(()=>{if(l||typeof window>"u")return;let O=K=>{let V=K.data;if(!(!V||V.type!=="grade:motion-control")){if(V.action==="set-view"){(V.view==="play"||V.view==="strip")&&F(V.view);return}if(V.action==="export-mode"){ie(!!V.enabled);return}if(V.action==="seek"&&typeof V.ms=="number"){F("play"),j(V.ms);return}typeof V.scene=="number"?(F("play"),j(N.starts[Math.max(0,Math.min(h-1,Math.round(V.scene)))]??0)):V.action==="pause"?S(true):V.action==="play"?(F("play"),A(false),S(false)):V.action==="restart"&&(F("play"),me(0));}};return window.addEventListener("message",O),()=>window.removeEventListener("message",O)},[l,me,h,j,N]);let ve=v__namespace.useRef(j);ve.current=j,v__namespace.useEffect(()=>{if(typeof window>"u")return;let O=window;return O.__gradeMotion={ready:true,meta:()=>({totalMs:ae.current.totalMs,durations:ae.current.durations,count:h}),enterRenderMode:()=>{S(true),F("play"),ie(true);},renderFrame:K=>new Promise(V=>{S(true),ve.current(Math.max(0,K));let ge=false,Te=()=>{ge||(ge=true,V());};requestAnimationFrame(()=>requestAnimationFrame(Te)),setTimeout(Te,4e3);})},()=>{delete window.__gradeMotion;}},[h]),v__namespace.useEffect(()=>{if(l||typeof window>"u")return;let O=K=>{if(K.code!=="Space")return;let V=K.target;V&&(V.tagName==="INPUT"||V.tagName==="TEXTAREA"||V.tagName==="BUTTON"||V.isContentEditable)||(K.preventDefault(),F("play"),A(false),S(ge=>!ge));};return window.addEventListener("keydown",O),()=>window.removeEventListener("keydown",O)},[l]),v__namespace.useEffect(()=>{if(!(l||typeof window>"u"))try{window.parent?.postMessage({type:"grade:motion-state",scene:R,paused:x,done:M,count:h,view:B},"*");}catch{}},[l,R,x,M,h,B]);let ke=e==="strip"||z==="strip";if(B==="strip"||l){let K=!ke&&u.length>2,V=K?u.slice(0,2):u,ge=u.length-V.length;return v__namespace.createElement("div",{"data-gds-part":"motion",className:d("gds-motion",p),style:{position:"absolute",inset:0,overflow:"hidden",background:o,...s}},r&&v__namespace.createElement("div",{"aria-hidden":true,style:{position:"absolute",inset:0,pointerEvents:"none"}},r),v__namespace.createElement("div",{style:{position:"absolute",inset:0,display:"flex",alignItems:"center",gap:28,padding:"0 48px",overflowX:"auto"}},V.map((Te,_)=>v__namespace.createElement("figure",{key:_,style:{margin:0,flex:"0 0 auto",width:y}},v__namespace.createElement("figcaption",{style:{marginBottom:8,fontSize:12,fontWeight:500,color:"rgba(255,255,255,0.66)"}},Te.props.label??`Scene ${_+1}`),v__namespace.createElement("div",{style:{position:"relative",aspectRatio:b,borderRadius:10,overflow:"hidden",background:Te.props.fill??"rgba(127,127,127,0.10)",border:"1px solid rgba(127,127,127,0.22)",boxShadow:"0 10px 34px rgba(0,0,0,0.28)"}},v__namespace.createElement(Ur,{label:Te.props.label},v__namespace.createElement(Ka,{...Te.props,fill:void 0,internal:{active:false,paused:true,mode:"strip",onSceneEnd:()=>{}}}))))),K&&ge>0&&v__namespace.createElement("figure",{style:{margin:0,flex:"0 0 auto",width:y}},v__namespace.createElement("figcaption",{style:{marginBottom:8,fontSize:12,fontWeight:500,color:"rgba(255,255,255,0.66)"}},"\u2026"),v__namespace.createElement("div",{style:{aspectRatio:b,borderRadius:10,display:"grid",placeItems:"center",border:"1px dashed rgba(127,127,127,0.4)",color:"rgba(255,255,255,0.55)",fontSize:14,fontWeight:600}},"+",ge," scene",ge===1?"":"s"))))}let qe=u[Math.min(R,Math.max(0,h-1))],Ge=v__namespace.createElement("div",{ref:k,style:{position:"absolute",inset:0,overflow:"hidden",background:o}},r&&v__namespace.createElement("div",{"aria-hidden":true,style:{position:"absolute",inset:0,pointerEvents:"none"}},r),U!==null&&U!==R&&u[U]&&v__namespace.createElement(Ur,{key:`out:${U}`,label:u[U].props.label},v__namespace.createElement(Ka,{...u[U].props,transition:"none",internal:{active:false,paused:true,mode:"play",onSceneEnd:()=>{}}})),qe&&v__namespace.createElement(Ur,{key:`${R}:${H}`,label:qe.props.label,onSkip:h>1?X:void 0},v__namespace.createElement(Ka,{...qe.props,internal:{active:true,paused:x,mode:"play",onSceneEnd:()=>{}}})),g.filter(O=>{let K=O.props.fromScene??0,V=O.props.toScene??1/0;return R>=K&&R<=V}),q&&v__namespace.createElement("div",{"aria-hidden":true,style:{position:"absolute",left:14,bottom:14,zIndex:30,width:16,height:16,opacity:.55,color:"#fff",mixBlendMode:"difference",pointerEvents:"none"}},v__namespace.createElement("svg",{viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg"},v__namespace.createElement("path",{d:"M28 0L32 4V10L26 4H6L4 6V26L6 28H16L26 18V24L18 32H4L0 28V4L4 0H28ZM32 32H28V18H16V14H32V32Z",fill:"currentColor"}))),i&&h>0&&!q&&v__namespace.createElement("div",{role:"group","aria-label":"Motion playback controls",className:"gds-motion-transport",style:{position:"absolute",right:16,bottom:16,display:"flex",gap:4,alignItems:"center",padding:"4px 6px",borderRadius:999,background:"rgba(15,15,17,0.55)",backdropFilter:"blur(10px)",boxShadow:"0 6px 22px rgba(0,0,0,0.25)"}},v__namespace.createElement("style",null,`
382
+ .gds-motion-transport [data-gds-transport-extras] {
383
+ display: flex; align-items: center; gap: 4px;
384
+ max-width: 0; opacity: 0; overflow: hidden;
385
+ transition: max-width 240ms cubic-bezier(0.22, 1, 0.36, 1), opacity 180ms ease;
386
+ }
387
+ .gds-motion-transport:hover [data-gds-transport-extras],
388
+ .gds-motion-transport:focus-within [data-gds-transport-extras] {
389
+ max-width: 360px; opacity: 1;
390
+ }
391
+ `),v__namespace.createElement("button",{type:"button",onClick:()=>M?me(0):S(O=>!O),"aria-label":M?"Replay":x?"Play":"Pause",style:pi},M?v__namespace.createElement(lp,null):x?v__namespace.createElement(Tb,null):v__namespace.createElement(Pb,null)),v__namespace.createElement("div",{"data-gds-transport-extras":true},v__namespace.createElement("button",{type:"button",onClick:()=>me(0),"aria-label":"Restart",style:pi},v__namespace.createElement(lp,null)),v__namespace.createElement("div",{style:{display:"flex",gap:5,padding:"0 6px"},"aria-hidden":true},u.map((O,K)=>v__namespace.createElement("button",{key:K,type:"button",onClick:()=>me(K),"aria-label":`Go to ${O.props.label??`scene ${K+1}`}`,tabIndex:-1,style:{...pi,width:14,height:14}},v__namespace.createElement("span",{style:{width:6,height:6,borderRadius:999,background:K===R?"#fff":"rgba(255,255,255,0.35)",transition:"background 200ms ease"}})))))),M&&v__namespace.createElement("button",{type:"button",onClick:()=>me(0),"aria-label":"Replay",style:{position:"absolute",inset:0,margin:"auto",width:64,height:64,display:"grid",placeItems:"center",borderRadius:999,border:"none",color:"#fff",background:"rgba(15,15,17,0.55)",backdropFilter:"blur(10px)",boxShadow:"0 8px 30px rgba(0,0,0,0.35)",cursor:"pointer"}},v__namespace.createElement("svg",{width:"26",height:"26",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":true},v__namespace.createElement("path",{d:"M3 12a9 9 0 1 0 3-6.7L3 8"}),v__namespace.createElement("path",{d:"M3 3v5h5"}))));return v__namespace.createElement("div",{"data-gds-part":"motion",className:d("gds-motion",p),style:{position:"absolute",inset:0,overflow:"hidden",background:f?q?"#000":"transparent":o,...s}},f?v__namespace.createElement(wb,{ratio:f},Ge):Ge)}var vp=({renderer:e,scene:t,camera:o,preset:r,width:n,height:a})=>{let i=new postprocessing.EffectComposer(e);i.setSize(n,a),i.addPass(new postprocessing.RenderPass(t,o));let p=new postprocessing.BloomEffect({intensity:0,luminanceThreshold:.6,radius:.6,kernelSize:postprocessing.KernelSize.MEDIUM}),s=new postprocessing.NoiseEffect({blendFunction:postprocessing.BlendFunction.OVERLAY});s.blendMode.opacity.value=0;let c=new postprocessing.ScanlineEffect({blendFunction:postprocessing.BlendFunction.OVERLAY,density:1.25});c.blendMode.opacity.value=0;let l=new postprocessing.VignetteEffect({darkness:0,offset:.5}),m=new postprocessing.ChromaticAberrationEffect({offset:new De__namespace.Vector2(0,0),radialModulation:false,modulationOffset:.15}),u=new postprocessing.GlitchEffect({chromaticAberrationOffset:new De__namespace.Vector2(0,0),columns:.05});u.minStrength=0,u.maxStrength=0,u.mode=postprocessing.GlitchMode.DISABLED,u.blendMode.opacity.value=0,i.addPass(new postprocessing.EffectPass(o,p)),i.addPass(new postprocessing.EffectPass(o,s,c,l)),i.addPass(new postprocessing.EffectPass(o,m)),i.addPass(new postprocessing.EffectPass(o,u));function g(h){let f=h.effects;p.intensity=f.bloom?.intensity??0,p.luminanceMaterial&&f.bloom?.luminanceThreshold!==void 0&&(p.luminanceMaterial.threshold=f.bloom.luminanceThreshold),s.blendMode.opacity.value=f.noise?.intensity??0,c.density=f.scanlines?.density??1.25,c.blendMode.opacity.value=f.scanlines?.opacity??0,l.darkness=f.vignette?.darkness??0,l.offset=f.vignette?.offset??.5;let b=f.chromatic?.offset??0;m.offset?.set(b,b);let y=f.glitch?.strength?.[1]??0;f.glitch&&y>0?(u.mode=postprocessing.GlitchMode.SPORADIC,u.blendMode.opacity.value=1,u.minStrength=f.glitch.strength?.[0]??0,u.maxStrength=y):(u.mode=postprocessing.GlitchMode.DISABLED,u.blendMode.opacity.value=0,u.minStrength=0,u.maxStrength=0);}return g(r),{composer:i,setPreset:g,resize:(h,f)=>i.setSize(h,f),dispose:()=>{i.dispose();}}};var sr=3e3,bi=400,$b=80,yp=({width:e,height:t,palette:o})=>{let r=new De__namespace.Scene;r.background=new De__namespace.Color(o.background);let n=new De__namespace.PerspectiveCamera(70,e/t,.1,bi*2);n.position.z=0;let a=new Float32Array(sr*6),i=new Float32Array(sr*6),p=new Float32Array(sr),s=new De__namespace.Color(o.primary),c=new De__namespace.Color(o.accent);function l(b,y){let R=Math.random()*Math.PI*2,w=$b*Math.pow(Math.random(),.6),x=Math.cos(R)*w,S=Math.sin(R)*w,M=y?-Math.random()*bi:-bi;p[b]=M,a[b*6+0]=x,a[b*6+1]=S,a[b*6+2]=M,a[b*6+3]=x,a[b*6+4]=S,a[b*6+5]=M-2,i[b*6+0]=s.r,i[b*6+1]=s.g,i[b*6+2]=s.b,i[b*6+3]=c.r,i[b*6+4]=c.g,i[b*6+5]=c.b;}for(let b=0;b<sr;b++)l(b,true);let m=new De__namespace.BufferGeometry;m.setAttribute("position",new De__namespace.BufferAttribute(a,3)),m.setAttribute("color",new De__namespace.BufferAttribute(i,3));let u=new De__namespace.LineBasicMaterial({vertexColors:true,transparent:true,opacity:.95,blending:De__namespace.AdditiveBlending}),g=new De__namespace.LineSegments(m,u);r.add(g);let h=60,f=6;return {scene:r,camera:n,update:(b,y)=>{let R=m.attributes.position.array;for(let w=0;w<sr;w++){let x=w*6;R[x+2]+=h*y,R[x+5]=R[x+2]-f,R[x+2]>5&&l(w,false);}m.attributes.position.needsUpdate=true;},resize:(b,y)=>{let R=n;R.aspect=b/y,R.updateProjectionMatrix();},setPalette:b=>{r.background=new De__namespace.Color(b.background);let y=new De__namespace.Color(b.primary),R=new De__namespace.Color(b.accent),w=m.attributes.color.array;for(let x=0;x<sr;x++)w[x*6+0]=y.r,w[x*6+1]=y.g,w[x*6+2]=y.b,w[x*6+3]=R.r,w[x*6+4]=R.g,w[x*6+5]=R.b;m.attributes.color.needsUpdate=true;},dispose:()=>{m.dispose(),u.dispose();}}};var Ub=`
349
392
  precision highp float;
350
393
  varying vec2 vUv;
351
394
  uniform float uTime;
@@ -383,19 +426,19 @@ applyThemeToRoot(theme, "light"); // or "dark" / "superLight" / "superDark"
383
426
 
384
427
  gl_FragColor = vec4(col, 1.0);
385
428
  }
386
- `,Mh=`
429
+ `,Kb=`
387
430
  varying vec2 vUv;
388
431
  void main() {
389
432
  vUv = uv;
390
433
  gl_Position = vec4(position.xy, 0.0, 1.0);
391
434
  }
392
- `,Bc=({width:e,height:t,palette:o})=>{let r=new Re__namespace.Scene,n=new Re__namespace.OrthographicCamera(-1,1,1,-1,0,1),a={uTime:{value:0},uResolution:{value:new Re__namespace.Vector2(e,t)},uBackground:{value:new Re__namespace.Color(o.background)},uPrimary:{value:new Re__namespace.Color(o.primary)},uSecondary:{value:new Re__namespace.Color(o.secondary)},uAccent:{value:new Re__namespace.Color(o.accent)}},i=new Re__namespace.ShaderMaterial({uniforms:a,vertexShader:Mh,fragmentShader:Nh,depthTest:false,depthWrite:false}),p=new Re__namespace.PlaneGeometry(2,2),s=new Re__namespace.Mesh(p,i);return r.add(s),{scene:r,camera:n,update:d=>{a.uTime.value=d;},resize:(d,m)=>{a.uResolution.value.set(d,m);},setPalette:d=>{a.uBackground.value.set(d.background),a.uPrimary.value.set(d.primary),a.uSecondary.value.set(d.secondary),a.uAccent.value.set(d.accent);},dispose:()=>{p.dispose(),i.dispose();}}};var Eh=`
435
+ `,xp=({width:e,height:t,palette:o})=>{let r=new De__namespace.Scene,n=new De__namespace.OrthographicCamera(-1,1,1,-1,0,1),a={uTime:{value:0},uResolution:{value:new De__namespace.Vector2(e,t)},uBackground:{value:new De__namespace.Color(o.background)},uPrimary:{value:new De__namespace.Color(o.primary)},uSecondary:{value:new De__namespace.Color(o.secondary)},uAccent:{value:new De__namespace.Color(o.accent)}},i=new De__namespace.ShaderMaterial({uniforms:a,vertexShader:Kb,fragmentShader:Ub,depthTest:false,depthWrite:false}),p=new De__namespace.PlaneGeometry(2,2),s=new De__namespace.Mesh(p,i);return r.add(s),{scene:r,camera:n,update:l=>{a.uTime.value=l;},resize:(l,m)=>{a.uResolution.value.set(l,m);},setPalette:l=>{a.uBackground.value.set(l.background),a.uPrimary.value.set(l.primary),a.uSecondary.value.set(l.secondary),a.uAccent.value.set(l.accent);},dispose:()=>{p.dispose(),i.dispose();}}};var qb=`
393
436
  varying vec2 vUv;
394
437
  void main() {
395
438
  vUv = uv;
396
439
  gl_Position = vec4(position.xy, 0.0, 1.0);
397
440
  }
398
- `,Lh=`
441
+ `,Zb=`
399
442
  precision highp float;
400
443
  varying vec2 vUv;
401
444
  uniform float uTime;
@@ -452,13 +495,13 @@ applyThemeToRoot(theme, "light"); // or "dark" / "superLight" / "superDark"
452
495
 
453
496
  gl_FragColor = vec4(col, 1.0);
454
497
  }
455
- `,_c=({width:e,height:t,palette:o})=>{let r=new Re__namespace.Scene,n=new Re__namespace.OrthographicCamera(-1,1,1,-1,0,1),a={uTime:{value:0},uResolution:{value:new Re__namespace.Vector2(e,t)},uBackground:{value:new Re__namespace.Color(o.background)},uPrimary:{value:new Re__namespace.Color(o.primary)},uSecondary:{value:new Re__namespace.Color(o.secondary)},uAccent:{value:new Re__namespace.Color(o.accent)}},i=new Re__namespace.ShaderMaterial({uniforms:a,vertexShader:Eh,fragmentShader:Lh,depthTest:false,depthWrite:false}),p=new Re__namespace.PlaneGeometry(2,2),s=new Re__namespace.Mesh(p,i);return r.add(s),{scene:r,camera:n,update:d=>{a.uTime.value=d;},resize:(d,m)=>{a.uResolution.value.set(d,m);},setPalette:d=>{a.uBackground.value.set(d.background),a.uPrimary.value.set(d.primary),a.uSecondary.value.set(d.secondary),a.uAccent.value.set(d.accent);},dispose:()=>{p.dispose(),i.dispose();}}};var Dh=`
498
+ `,wp=({width:e,height:t,palette:o})=>{let r=new De__namespace.Scene,n=new De__namespace.OrthographicCamera(-1,1,1,-1,0,1),a={uTime:{value:0},uResolution:{value:new De__namespace.Vector2(e,t)},uBackground:{value:new De__namespace.Color(o.background)},uPrimary:{value:new De__namespace.Color(o.primary)},uSecondary:{value:new De__namespace.Color(o.secondary)},uAccent:{value:new De__namespace.Color(o.accent)}},i=new De__namespace.ShaderMaterial({uniforms:a,vertexShader:qb,fragmentShader:Zb,depthTest:false,depthWrite:false}),p=new De__namespace.PlaneGeometry(2,2),s=new De__namespace.Mesh(p,i);return r.add(s),{scene:r,camera:n,update:l=>{a.uTime.value=l;},resize:(l,m)=>{a.uResolution.value.set(l,m);},setPalette:l=>{a.uBackground.value.set(l.background),a.uPrimary.value.set(l.primary),a.uSecondary.value.set(l.secondary),a.uAccent.value.set(l.accent);},dispose:()=>{p.dispose(),i.dispose();}}};var Yb=`
456
499
  varying vec2 vUv;
457
500
  void main() {
458
501
  vUv = uv;
459
502
  gl_Position = vec4(position.xy, 0.0, 1.0);
460
503
  }
461
- `,Ah=`
504
+ `,Xb=`
462
505
  precision highp float;
463
506
  varying vec2 vUv;
464
507
  uniform float uTime;
@@ -528,7 +571,7 @@ applyThemeToRoot(theme, "light"); // or "dark" / "superLight" / "superDark"
528
571
 
529
572
  gl_FragColor = vec4(col, 1.0);
530
573
  }
531
- `,Oc=({palette:e})=>{let t=new Re__namespace.Scene,o=new Re__namespace.OrthographicCamera(-1,1,1,-1,0,1),r={uTime:{value:0},uBackground:{value:new Re__namespace.Color(e.background)},uPrimary:{value:new Re__namespace.Color(e.primary)},uSecondary:{value:new Re__namespace.Color(e.secondary)},uAccent:{value:new Re__namespace.Color(e.accent)}},n=new Re__namespace.ShaderMaterial({uniforms:r,vertexShader:Dh,fragmentShader:Ah,depthTest:false,depthWrite:false}),a=new Re__namespace.PlaneGeometry(2,2),i=new Re__namespace.Mesh(a,n);return t.add(i),{scene:t,camera:o,update:s=>{r.uTime.value=s;},setPalette:s=>{r.uBackground.value.set(s.background),r.uPrimary.value.set(s.primary),r.uSecondary.value.set(s.secondary),r.uAccent.value.set(s.accent);},dispose:()=>{a.dispose(),n.dispose();}}};var Vc=`
574
+ `,Rp=({palette:e})=>{let t=new De__namespace.Scene,o=new De__namespace.OrthographicCamera(-1,1,1,-1,0,1),r={uTime:{value:0},uBackground:{value:new De__namespace.Color(e.background)},uPrimary:{value:new De__namespace.Color(e.primary)},uSecondary:{value:new De__namespace.Color(e.secondary)},uAccent:{value:new De__namespace.Color(e.accent)}},n=new De__namespace.ShaderMaterial({uniforms:r,vertexShader:Yb,fragmentShader:Xb,depthTest:false,depthWrite:false}),a=new De__namespace.PlaneGeometry(2,2),i=new De__namespace.Mesh(a,n);return t.add(i),{scene:t,camera:o,update:s=>{r.uTime.value=s;},setPalette:s=>{r.uBackground.value.set(s.background),r.uPrimary.value.set(s.primary),r.uSecondary.value.set(s.secondary),r.uAccent.value.set(s.accent);},dispose:()=>{a.dispose(),n.dispose();}}};var Sp=`
532
575
  precision highp float;
533
576
  varying vec2 vUv;
534
577
  uniform float uTime;
@@ -538,15 +581,15 @@ applyThemeToRoot(theme, "light"); // or "dark" / "superLight" / "superDark"
538
581
  uniform vec3 uSecondary;
539
582
  uniform vec3 uAccent;
540
583
  uniform vec3 uBackground;
541
- `,Ih=`
584
+ `,Jb=`
542
585
  varying vec2 vUv;
543
586
  void main() {
544
587
  vUv = uv;
545
588
  gl_Position = vec4(position.xy, 0.0, 1.0);
546
589
  }
547
- `,rr=class extends Error{log;source;constructor(t,o){super(`Fragment shader failed to compile:
548
- ${t.trim()}`),this.name="ShaderCompileError",this.log=t,this.source=o;}};function Hh(e,t){let o=e.getContext(),r=o.createShader(o.FRAGMENT_SHADER);if(!r)throw new Error("Unable to allocate fragment shader");o.shaderSource(r,t),o.compileShader(r);let n=o.getShaderParameter(r,o.COMPILE_STATUS),a=o.getShaderInfoLog(r)||"";if(o.deleteShader(r),!n)throw new rr(a,t)}function ar(e){return ({renderer:t,width:o,height:r,palette:n})=>{let a=`${Vc}
549
- ${e}`;Hh(t,a);let i=new Re__namespace.Scene,p=new Re__namespace.OrthographicCamera(-1,1,1,-1,0,1),s={uTime:{value:0},uResolution:{value:new Re__namespace.Vector2(o,r)},uMouse:{value:new Re__namespace.Vector2(.5,.5)},uPrimary:{value:new Re__namespace.Color(n.primary)},uSecondary:{value:new Re__namespace.Color(n.secondary)},uAccent:{value:new Re__namespace.Color(n.accent)},uBackground:{value:new Re__namespace.Color(n.background)}},c=new Re__namespace.ShaderMaterial({uniforms:s,vertexShader:Ih,fragmentShader:a,depthTest:false,depthWrite:false}),d=new Re__namespace.PlaneGeometry(2,2),m=new Re__namespace.Mesh(d,c);return i.add(m),{scene:i,camera:p,update:u=>{s.uTime.value=u;},resize:(u,b)=>{s.uResolution.value.set(u,b);},setPalette:u=>{s.uPrimary.value.set(u.primary),s.uSecondary.value.set(u.secondary),s.uAccent.value.set(u.accent),s.uBackground.value.set(u.background);},setMouse:(u,b)=>{s.uMouse.value.set(u,b);},dispose:()=>{d.dispose(),c.dispose();}}}}var Gc=ar(`
590
+ `,lr=class extends Error{log;source;constructor(t,o){super(`Fragment shader failed to compile:
591
+ ${t.trim()}`),this.name="ShaderCompileError",this.log=t,this.source=o;}};function Qb(e,t){let o=e.getContext(),r=o.createShader(o.FRAGMENT_SHADER);if(!r)throw new Error("Unable to allocate fragment shader");o.shaderSource(r,t),o.compileShader(r);let n=o.getShaderParameter(r,o.COMPILE_STATUS),a=o.getShaderInfoLog(r)||"";if(o.deleteShader(r),!n)throw new lr(a,t)}function ao(e){return ({renderer:t,width:o,height:r,palette:n})=>{let a=`${Sp}
592
+ ${e}`;Qb(t,a);let i=new De__namespace.Scene,p=new De__namespace.OrthographicCamera(-1,1,1,-1,0,1),s={uTime:{value:0},uResolution:{value:new De__namespace.Vector2(o,r)},uMouse:{value:new De__namespace.Vector2(.5,.5)},uPrimary:{value:new De__namespace.Color(n.primary)},uSecondary:{value:new De__namespace.Color(n.secondary)},uAccent:{value:new De__namespace.Color(n.accent)},uBackground:{value:new De__namespace.Color(n.background)}},c=new De__namespace.ShaderMaterial({uniforms:s,vertexShader:Jb,fragmentShader:a,depthTest:false,depthWrite:false}),l=new De__namespace.PlaneGeometry(2,2),m=new De__namespace.Mesh(l,c);return i.add(m),{scene:i,camera:p,update:g=>{s.uTime.value=g;},resize:(g,h)=>{s.uResolution.value.set(g,h);},setPalette:g=>{s.uPrimary.value.set(g.primary),s.uSecondary.value.set(g.secondary),s.uAccent.value.set(g.accent),s.uBackground.value.set(g.background);},setMouse:(g,h)=>{s.uMouse.value.set(g,h);},dispose:()=>{l.dispose(),c.dispose();}}}}var kp=ao(`
550
593
  void main() {
551
594
  vec2 uv = vUv;
552
595
  float t = uTime * 0.15;
@@ -565,7 +608,141 @@ ${e}`;Hh(t,a);let i=new Re__namespace.Scene,p=new Re__namespace.OrthographicCame
565
608
  col = mix(col, uAccent, w3 * 0.85);
566
609
  gl_FragColor = vec4(col, 1.0);
567
610
  }
568
- `),jc=ar(`
611
+ `),Cp=ao(`
612
+ float uHash(vec2 p) {
613
+ return fract(sin(dot(p, vec2(127.1, 311.7))) * 43758.5453);
614
+ }
615
+ float uNoise(vec2 p) {
616
+ vec2 i = floor(p);
617
+ vec2 f = fract(p);
618
+ f = f * f * (3.0 - 2.0 * f);
619
+ float a = uHash(i);
620
+ float b = uHash(i + vec2(1.0, 0.0));
621
+ float c = uHash(i + vec2(0.0, 1.0));
622
+ float d = uHash(i + vec2(1.0, 1.0));
623
+ return mix(mix(a, b, f.x), mix(c, d, f.x), f.y);
624
+ }
625
+ float uFbm(vec2 p) {
626
+ float v = 0.0;
627
+ float amp = 0.5;
628
+ for (int i = 0; i < 4; i++) {
629
+ v += amp * uNoise(p);
630
+ p *= 2.03;
631
+ amp *= 0.5;
632
+ }
633
+ return v;
634
+ }
635
+ void main() {
636
+ vec2 uv = vUv;
637
+ float t = uTime * 0.06; // undertones move like weather, not water
638
+
639
+ // The field bends gently toward the cursor\u2026
640
+ vec2 toMouse = uv - uMouse;
641
+ float md = length(toMouse);
642
+ vec2 warp = normalize(toMouse + 1e-4) * 0.12 * exp(-md * 2.2);
643
+
644
+ vec2 p = uv * 1.6 + warp;
645
+ float n1 = uFbm(p + vec2(t, -t * 0.6));
646
+ float n2 = uFbm(p * 1.4 - vec2(t * 0.8, t * 0.4) + 3.7);
647
+ float diag = uv.x * 0.55 + uv.y * 0.45;
648
+
649
+ // Washes, not blobs \u2014 but the brand pops carry enough weight to read.
650
+ vec3 col = uBackground;
651
+ col = mix(col, uPrimary, smoothstep(0.18, 0.92, n1) * 0.62);
652
+ col = mix(col, uSecondary, smoothstep(0.28, 1.00, n2) * 0.50);
653
+ col = mix(col, uAccent, smoothstep(0.45, 1.00, n1 * n2 + diag * 0.2) * 0.38);
654
+
655
+ // \u2026and a soft light follows the cursor, in brand.
656
+ col += (uPrimary - uBackground) * 0.22 * exp(-md * 3.0);
657
+
658
+ // Fine grain to kill banding.
659
+ col += (uNoise(uv * 900.0) - 0.5) * 0.012;
660
+
661
+ gl_FragColor = vec4(col, 1.0);
662
+ }
663
+ `),Tp=ao(`
664
+ float dHash(vec2 p) {
665
+ return fract(sin(dot(p, vec2(127.1, 311.7))) * 43758.5453);
666
+ }
667
+ float dNoise(vec2 p) {
668
+ vec2 i = floor(p);
669
+ vec2 f = fract(p);
670
+ f = f * f * (3.0 - 2.0 * f);
671
+ float a = dHash(i);
672
+ float b = dHash(i + vec2(1.0, 0.0));
673
+ float c = dHash(i + vec2(0.0, 1.0));
674
+ float d = dHash(i + vec2(1.0, 1.0));
675
+ return mix(mix(a, b, f.x), mix(c, d, f.x), f.y);
676
+ }
677
+ void main() {
678
+ float aspect = uResolution.x / max(uResolution.y, 1.0);
679
+ vec2 uv = vec2(vUv.x * aspect, vUv.y);
680
+ float t = uTime * 0.25;
681
+
682
+ const float N = 26.0; // dots per unit height
683
+ vec2 cell = fract(uv * N) - 0.5;
684
+ vec2 id = floor(uv * N) / N;
685
+
686
+ // The flow field \u2014 each dot samples it at its own cell.
687
+ float flow = dNoise(id * 2.2 + vec2(t * 0.6, -t * 0.35));
688
+ float flow2 = dNoise(id * 3.6 - vec2(t * 0.4, t * 0.5) + 7.3);
689
+
690
+ // Mouse swell \u2014 cursor distance in the same aspect-corrected space.
691
+ vec2 m = vec2(uMouse.x * aspect, uMouse.y);
692
+ float md = length(id + 0.5 / N - m);
693
+ float swell = exp(-md * 5.0);
694
+
695
+ // Dot radius rides the field + the cursor.
696
+ float r = 0.08 + 0.30 * smoothstep(0.35, 0.95, flow) + 0.22 * swell;
697
+ float d = length(cell);
698
+ float dot_ = smoothstep(r, r - 0.06, d);
699
+
700
+ vec3 dotCol = mix(uPrimary, uAccent, smoothstep(0.3, 0.9, flow2));
701
+ dotCol = mix(dotCol, uSecondary, swell * 0.6);
702
+
703
+ // Dots read at near-full brand saturation (the grid was too dim).
704
+ vec3 col = mix(uBackground, dotCol, dot_ * (0.78 + 0.22 * flow));
705
+ gl_FragColor = vec4(col, 1.0);
706
+ }
707
+ `),Pp=ao(`
708
+ float gHash(vec2 p) {
709
+ return fract(sin(dot(p, vec2(127.1, 311.7))) * 43758.5453);
710
+ }
711
+ float gNoise(vec2 p) {
712
+ vec2 i = floor(p);
713
+ vec2 f = fract(p);
714
+ f = f * f * (3.0 - 2.0 * f);
715
+ float a = gHash(i);
716
+ float b = gHash(i + vec2(1.0, 0.0));
717
+ float c = gHash(i + vec2(0.0, 1.0));
718
+ float d = gHash(i + vec2(1.0, 1.0));
719
+ return mix(mix(a, b, f.x), mix(c, d, f.x), f.y);
720
+ }
721
+ void main() {
722
+ vec2 uv = vUv;
723
+ float t = uTime * 0.04; // glacial \u2014 the grain carries the motion
724
+
725
+ // Broad diagonal wash \u2014 two slow tints crossing the frame.
726
+ float w1 = gNoise(uv * 1.2 + vec2(t, -t * 0.7));
727
+ float w2 = gNoise(uv * 0.9 - vec2(t * 0.6, t * 0.3) + 5.1);
728
+ vec3 col = uBackground;
729
+ col = mix(col, uPrimary, smoothstep(0.30, 1.00, w1 + (uv.x + uv.y) * 0.15) * 0.40);
730
+ col = mix(col, uAccent, smoothstep(0.45, 1.00, w2) * 0.25);
731
+
732
+ // THE GRAIN \u2014 animated per-frame (time-salted hash), two scales:
733
+ // fine print grain + a coarser fleck that catches the eye.
734
+ float salt = fract(uTime * 7.0);
735
+ float fine = gHash(uv * uResolution.xy * 0.9 + salt * 113.0) - 0.5;
736
+ float coarse = gHash(floor(uv * uResolution.xy * 0.22) + salt * 71.0) - 0.5;
737
+ col += fine * 0.085 + coarse * 0.045;
738
+
739
+ // Gentle vignette keeps edges from going flat.
740
+ float vig = smoothstep(1.25, 0.45, length(uv - 0.5) * 1.6);
741
+ col *= 0.92 + 0.08 * vig;
742
+
743
+ gl_FragColor = vec4(col, 1.0);
744
+ }
745
+ `),Mp=ao(`
569
746
  void main() {
570
747
  vec2 uv = vUv;
571
748
  float t = uTime * 0.4;
@@ -576,6 +753,6 @@ ${e}`;Hh(t,a);let i=new Re__namespace.Scene,p=new Re__namespace.OrthographicCame
576
753
  col = mix(col, uAccent, smoothstep(0.85, 1.0, m));
577
754
  gl_FragColor = vec4(col, 1.0);
578
755
  }
579
- `);var Vr={space:zc,plasma:Bc,voronoi:_c,synthwave:Oc,mesh:Gc,waves:jc},Gr=[{id:"mesh",label:"Mesh gradient",description:"Smooth moving blobs of the primary / secondary / accent colours over the background \u2014 the go-to soft, theme-reactive background.",tags:["gradient","mesh","abstract","hero","background"],scene:"mesh",defaultPostPreset:"none"},{id:"waves",label:"Waves",description:"Flowing banded ribbons that ripple across the surface. Clean motion for headers and hero backdrops.",tags:["waves","motion","abstract","hero"],scene:"waves",defaultPostPreset:"none"},{id:"space",label:"Hyperspace",description:"Classic 'jump to hyperspace' \u2014 streaking stars flying past camera. Pairs well with VHS or Cinematic post-FX.",tags:["space","retro","motion","hero","background"],scene:"space",defaultPostPreset:"vhs"},{id:"plasma",label:"Plasma",description:"Soft rolling colour clouds \u2014 overlapping sines warping a palette ramp. Classic demoscene vibe. Pairs well with Synthwave or Cinematic.",tags:["abstract","soft","ambient","hero","background","gradient"],scene:"plasma",defaultPostPreset:"synthwave"},{id:"voronoi",label:"Voronoi",description:"Jittered cellular grid \u2014 orbiting seed points form animated cells with glowing edges. Great for data / organic / network moods. Pairs well with CRT or VHS.",tags:["abstract","cells","organic","network","hero","background"],scene:"voronoi",defaultPostPreset:"crt"},{id:"synthwave",label:"Synthwave Grid",description:"Retro-future perspective grid receding to a banded sun disc on the horizon. Pairs beautifully with the Synthwave post preset (its namesake).",tags:["retro","synthwave","80s","hero","background","grid","sun"],scene:"synthwave",defaultPostPreset:"synthwave"}],jr=Object.fromEntries(Gr.map(e=>[e.id,e]));var Wr={none:{id:"none",label:"Clean",effects:{}},vhs:{id:"vhs",label:"VHS",effects:{bloom:{intensity:.35,luminanceThreshold:.5,radius:.7},noise:{intensity:.04},scanlines:{density:1.5,opacity:.12},vignette:{darkness:.4,offset:.45},chromatic:{offset:.0015}}},cinematic:{id:"cinematic",label:"Cinematic",effects:{bloom:{intensity:.5,luminanceThreshold:.55,radius:.8},vignette:{darkness:.5,offset:.5}}},synthwave:{id:"synthwave",label:"Synthwave",effects:{bloom:{intensity:.8,luminanceThreshold:.3,radius:.9},chromatic:{offset:.002},vignette:{darkness:.3,offset:.55}}},crt:{id:"crt",label:"CRT",effects:{bloom:{intensity:.2,luminanceThreshold:.7,radius:.4},scanlines:{density:2,opacity:.25},vignette:{darkness:.6,offset:.4},chromatic:{offset:.0025}}}},Ga="vhs";var Ur={primary:"#ff5fb9",secondary:"#9fe8ff",accent:"#ffc857",background:"#0a0a14"},Bh=/^[\d.]+\s+[\d.]+\s+[\d.]+(?:\s*\/\s*[\d.%]+)?$/,_h=/^[\d.]+\s+[\d.]+%\s+[\d.]+%(?:\s*\/\s*[\d.%]+)?$/,Oh=/^\s*var\(\s*(--[^,)\s]+)(?:\s*,[^)]*)?\s*\)\s*$/;function ja(e,t,o){if(typeof document>"u")return o;let r=e,n=Oh.exec(e);if(n){let p=getComputedStyle(t).getPropertyValue(n[1]).trim();p&&(Bh.test(p)?r=`oklch(${p})`:_h.test(p)&&(r=`hsl(${p})`));}let a=document.createElement("span");if(a.style.color="",a.style.color=r,a.style.color==="")return o;a.style.display="none",t.appendChild(a);let i=getComputedStyle(a).color;if(t.removeChild(a),!i)return o;if(i.startsWith("rgb"))return i;try{let p=document.createElement("canvas");p.width=1,p.height=1;let s=p.getContext("2d");if(!s)return i;s.clearRect(0,0,1,1),s.fillStyle=i,s.fillRect(0,0,1,1);let[c,d,m]=s.getImageData(0,0,1,1).data;return `rgb(${c}, ${d}, ${m})`}catch{return i}}function Wc(e,t){return {primary:ja(e.primary,t,Ur.primary),secondary:ja(e.secondary,t,Ur.secondary),accent:ja(e.accent,t,Ur.accent),background:ja(e.background,t,Ur.background)}}var nr=C__namespace.forwardRef(({preset:e,fragmentShader:t,onShaderError:o,postPreset:r,palette:n,createScene:a,controls:i=false,autoPlay:p=true,play:s,pauseOffscreen:c=true,aspect:d="video",radius:m="lg",border:g=false,poster:u,label:b,className:f,style:h,maxDpr:v,...w},y)=>{let S=C__namespace.useRef(null),[k,H]=C__namespace.useState(s??p),[E,D]=C__namespace.useState(false),U=ao(),A=C__namespace.useMemo(()=>({...Ur,...n}),[n]),q=C__namespace.useMemo(()=>a||(t?ar(t):e&&Vr[e]?Vr[e]:null),[a,t,e]),F=C__namespace.useMemo(()=>{if(r&&typeof r=="object")return r;let P=typeof r=="string"?r:(e?jr[e]?.defaultPostPreset:void 0)??Ga;return Wr[P]??Wr[Ga]},[r,e]),Y=C__namespace.useRef(F);Y.current=F;let J=C__namespace.useRef(A);J.current=A;let z=C__namespace.useMemo(()=>JSON.stringify(A??null),[A]),pe=C__namespace.useRef(o);pe.current=o,C__namespace.useEffect(()=>{let P=S.current;if(!P||!q)return;let te=P.clientWidth||1,se=P.clientHeight||1,ne=Wc(J.current,P),B=new Re__namespace.WebGLRenderer({antialias:true,alpha:false,powerPreference:"high-performance"}),Le=v??Math.min(window.devicePixelRatio||1,2);B.setPixelRatio(Le),B.setSize(te,se),B.setClearColor(new Re__namespace.Color(ne.background),1),B.domElement.dataset.gdsPart="shader-canvas",B.domElement.style.width="100%",B.domElement.style.height="100%",B.domElement.style.display="block",P.appendChild(B.domElement);let me;try{me=q({renderer:B,width:te,height:se,palette:ne});}catch(ue){if(ue instanceof rr)pe.current?.(ue),me=Vr.space({renderer:B,width:te,height:se,palette:ne});else throw B.dispose(),B.domElement.parentElement===P&&P.removeChild(B.domElement),ue}let L=Y.current,de=Fc({renderer:B,scene:me.scene,camera:me.camera,preset:L,width:te,height:se}),Z=new Re__namespace.Clock,$e=0,le=(s??p)&&!U,De=true,rt=()=>{if($e=requestAnimationFrame(rt),!le||c&&!De)return;let ue=Z.getDelta(),oe=Z.getElapsedTime();me.update?.(oe,ue),de.composer.render(ue);};me.update?.(0,0),de.composer.render(0),D(true),rt();let Ke=new ResizeObserver(([ue])=>{let oe=Math.max(1,Math.floor(ue.contentRect.width)),Nt=Math.max(1,Math.floor(ue.contentRect.height));B.setSize(oe,Nt),de.resize(oe,Nt),me.resize?.(oe,Nt),le||(me.update?.(Z.getElapsedTime(),0),de.composer.render(0));});Ke.observe(P);let at=new IntersectionObserver(([ue])=>{De=ue.isIntersecting;},{threshold:.05});at.observe(P);let Xt=new MutationObserver(()=>{if(!S.current)return;let ue=Wc(J.current,S.current);B.setClearColor(new Re__namespace.Color(ue.background),1),me.setPalette?.(ue);});Xt.observe(document.documentElement,{attributes:true,attributeFilter:["class","style","data-theme","data-gds-theme","data-grade-mode"]});let Bo=me,bo=Bo.setMouse?ue=>{let oe=P.getBoundingClientRect(),Nt=(ue.clientX-oe.left)/oe.width,Mt=1-(ue.clientY-oe.top)/oe.height;Bo.setMouse(Nt,Mt);}:null;return bo&&P.addEventListener("pointermove",bo),x.current={toggle:()=>{le=!le,H(le);},setRunning:ue=>{le=ue&&!U,H(le);},setPalette:ue=>{B.setClearColor(new Re__namespace.Color(ue.background),1),me.setPalette?.(ue);},setPostPreset:ue=>{let oe=typeof ue=="string"?Wr[ue]:ue;oe&&de.setPreset(oe);}},()=>{cancelAnimationFrame($e),Ke.disconnect(),at.disconnect(),Xt.disconnect(),bo&&P.removeEventListener("pointermove",bo),de.dispose(),me.dispose?.(),B.dispose(),B.domElement.parentElement===P&&P.removeChild(B.domElement),x.current=null;}},[q,z,p,U,c,v]);let x=C__namespace.useRef(null);C__namespace.useEffect(()=>{x.current?.setPostPreset(F);},[F]),C__namespace.useEffect(()=>{s!==void 0&&x.current?.setRunning(s);},[s]);let I=()=>x.current?.toggle();return C__namespace.createElement(zt,{...w,ref:P=>{S.current=P,typeof y=="function"?y(P):y&&(y.current=P);},aspect:d,radius:m,border:g,"aria-label":b,className:f,style:h,"data-gds-part":"three-scene"},!E&&u&&C__namespace.createElement("img",{src:u,alt:"",className:"absolute inset-0 w-full h-full object-cover","data-gds-part":"scene-poster"}),i&&C__namespace.createElement("div",{"data-gds-part":"scene-controls",className:l("absolute inset-0 flex items-end justify-end p-2","opacity-0 hover:opacity-100 transition-opacity","bg-gradient-to-t from-black/30 to-transparent")},C__namespace.createElement(Xe,{size:"icon",variant:"secondary",onClick:I},k?C__namespace.createElement(lucideReact.Pause,{className:"h-4 w-4"}):C__namespace.createElement(lucideReact.Play,{className:"h-4 w-4"}))))});nr.displayName="ThreeScene";function Uc(e,t,o){let r=e[t];return typeof r=="number"?r:o}function Wa(e,t,o){let r=e[t];return typeof r=="string"?r:o}function $c(e,t,o){let r=e[t];return typeof r=="boolean"?r:o}function Kc(e,t,o){let r=e[t];return Array.isArray(r)?r:o}var Ua="text-[11px] font-medium text-foreground";function jh({controls:e,state:t,onChange:o,disabled:r,className:n}){return C__namespace.createElement("div",{className:l("flex flex-col",n)},e.map(a=>{if(a.type==="divider")return C__namespace.createElement("div",{key:a.key,className:"mt-3 mb-1 border-t border-border/60 pt-2 first:mt-0 first:border-t-0 first:pt-0"},a.label?C__namespace.createElement("span",{className:"text-[11px] font-semibold uppercase tracking-wide text-foreground/80"},a.label):null);if(a.type==="slider")return C__namespace.createElement(Wh,{key:a.key,spec:a,value:Uc(t,a.key,a.default),disabled:r,onChange:p=>o(a.key,p)});if(a.type==="segmented"){let p=Wa(t,a.key,a.default);return C__namespace.createElement(si,{key:a.key,label:a.label},C__namespace.createElement(Do,{type:"single",size:"sm",value:p,onValueChange:s=>s&&o(a.key,s),disabled:r,className:"w-full justify-start"},a.options.map(s=>C__namespace.createElement(Ao,{key:s.value,value:s.value,className:"flex-1"},s.label))))}if(a.type==="select"){let p=Wa(t,a.key,a.default);return C__namespace.createElement(si,{key:a.key,label:a.label},C__namespace.createElement(xn,{value:p,onValueChange:s=>o(a.key,s),disabled:r},C__namespace.createElement(Sa,{size:"xs",className:"w-full"},C__namespace.createElement(wn,null)),C__namespace.createElement(ka,{size:"xs"},a.options.map(s=>C__namespace.createElement(Ca,{key:s.value,value:s.value},s.label)))))}if(a.type==="toggle"){let p=$c(t,a.key,a.default);return C__namespace.createElement("div",{key:a.key,className:"flex items-center justify-between gap-2 py-1"},C__namespace.createElement(Po,{className:Ua},a.label),C__namespace.createElement(Na,{checked:p,onCheckedChange:s=>o(a.key,s),disabled:r}))}if(a.type==="color"){let p=Wa(t,a.key,a.default);return C__namespace.createElement(si,{key:a.key,label:a.label,hint:a.slot?`\u2192 ${a.slot}`:void 0},C__namespace.createElement(qc,{value:p,disabled:r,onChange:s=>o(a.key,s)}))}let i=Kc(t,a.key,a.default);return C__namespace.createElement($h,{key:a.key,spec:a,value:i,disabled:r,onChange:p=>o(a.key,p)})}))}function si({label:e,hint:t,children:o}){return C__namespace.createElement("div",{className:"space-y-1 py-1"},C__namespace.createElement("div",{className:"flex items-baseline justify-between gap-2"},C__namespace.createElement(Po,{className:Ua},e),t?C__namespace.createElement("span",{className:"text-[10px] text-muted-foreground/70"},t):null),o)}function Wh({spec:e,value:t,disabled:o,onChange:r}){let n=e.step<1?e.step<.1?3:2:0,a=d=>Math.min(e.max,Math.max(e.min,d)),[i,p]=C__namespace.useState(null),s=i??t.toFixed(n),c=d=>{let m=Number(d);Number.isFinite(m)&&r(a(m)),p(null);};return C__namespace.createElement("div",{className:"space-y-1 py-1"},C__namespace.createElement("div",{className:"flex items-center justify-between gap-2"},C__namespace.createElement(Po,{className:Ua},e.label),C__namespace.createElement(qt,{size:"xs",type:"text",inputMode:"decimal","aria-label":e.label,value:s,disabled:o,endSlot:e.unit?C__namespace.createElement("span",{className:"text-[9px] text-muted-foreground/60"},e.unit):void 0,className:"w-16 tabular-nums",onChange:d=>p(d.currentTarget.value),onBlur:d=>c(d.currentTarget.value),onKeyDown:d=>{d.key==="Enter"&&c(d.currentTarget.value);}})),C__namespace.createElement(Mo,{value:[t],min:e.min,max:e.max,step:e.step,disabled:o,onValueChange:d=>r(a(d[0]??e.default))}))}var Uh=/^#([0-9a-f]{3}|[0-9a-f]{6})$/i;function qc({value:e,disabled:t,onChange:o}){let r=Uh.test(e)?e:"#000000";return C__namespace.createElement("div",{className:"flex items-center gap-1.5"},C__namespace.createElement("input",{type:"color",value:r,disabled:t,onChange:n=>o(n.currentTarget.value),"aria-label":"Colour swatch",className:"h-7 w-9 shrink-0 cursor-pointer rounded-md border border-input bg-transparent disabled:opacity-50"}),C__namespace.createElement(qt,{size:"xs",value:e,disabled:t,onChange:n=>o(n.currentTarget.value),className:"font-mono"}))}function $h({spec:e,value:t,disabled:o,onChange:r}){let n=e.min??1,a=e.max??8,i=(c,d)=>r(t.map((m,g)=>g===c?d:m)),p=()=>t.length<a&&r([...t,t[t.length-1]??"#ffffff"]),s=c=>t.length>n&&r(t.filter((d,m)=>m!==c));return C__namespace.createElement("div",{className:"space-y-1 py-1"},C__namespace.createElement("div",{className:"flex items-baseline justify-between gap-2"},C__namespace.createElement(Po,{className:Ua},e.label),C__namespace.createElement("button",{type:"button",onClick:p,disabled:o||t.length>=a,"aria-label":"Add colour",className:"inline-flex h-5 w-5 items-center justify-center rounded-md text-muted-foreground transition-colors hover:bg-muted hover:text-foreground disabled:opacity-40 [&_svg]:size-3.5"},C__namespace.createElement(lucideReact.Plus,null))),C__namespace.createElement("div",{className:"space-y-1.5"},t.map((c,d)=>C__namespace.createElement("div",{key:d,className:"flex items-center gap-1.5"},C__namespace.createElement(qc,{value:c,disabled:o,onChange:m=>i(d,m)}),C__namespace.createElement("button",{type:"button",onClick:()=>s(d),disabled:o||t.length<=n,"aria-label":"Remove colour",className:"inline-flex h-7 w-6 shrink-0 items-center justify-center rounded-md text-muted-foreground transition-colors hover:bg-muted hover:text-foreground disabled:opacity-40 [&_svg]:size-3.5"},C__namespace.createElement(lucideReact.Minus,null))))))}var Kh={background:"oklch(var(--background))",card:"oklch(var(--card))",muted:"oklch(var(--muted))",secondary:"oklch(var(--secondary))",accent:"oklch(var(--accent))",primary:"oklch(var(--primary))",destructive:"oklch(var(--destructive))",transparent:"transparent"};function $a(e){if(e)return Kh[e]??e}var qh={none:"rounded-none",sm:"rounded-sm",md:"rounded-md",lg:"rounded-lg",xl:"rounded-xl"},Yc={cover:"object-cover",contain:"object-contain",fill:"object-fill",none:"object-none"},Zc=C__namespace.forwardRef(({type:e,color:t,gradient:o,src:r,fit:n="cover",position:a="center",repeat:i=false,tileSize:p,preset:s,fragmentShader:c,palette:d,postPreset:m,opacity:g,blendMode:u,radius:b="none",className:f,style:h},v)=>{if(e==="none")return null;let w={opacity:g,mixBlendMode:u,...h},y=null;if(e==="solid")w.background=$a(t)??"oklch(var(--background))";else if(e==="gradient"){let S=[$a(o?.from)??"oklch(var(--primary))",$a(o?.via),$a(o?.to)??"oklch(var(--accent))"].filter(Boolean);if(o?.shape==="radial"){let k=o.at??"center",H=o.size?`${o.size} `:"";w.backgroundImage=`radial-gradient(${H}at ${k}, ${S.join(", ")})`;}else {let k=o?.angle??135;w.backgroundImage=`linear-gradient(${k}deg, ${S.join(", ")})`;}}else e==="image"?i&&r?(w.backgroundImage=`url(${r})`,w.backgroundRepeat="repeat",w.backgroundPosition=a,p&&(w.backgroundSize=p)):r&&(y=C__namespace.createElement("img",{src:r,alt:"",className:l("absolute inset-0 h-full w-full",Yc[n]),style:{objectPosition:a}})):e==="video"?r&&(y=C__namespace.createElement("video",{src:r,autoPlay:true,muted:true,loop:true,playsInline:true,className:l("absolute inset-0 h-full w-full",Yc[n]),style:{objectPosition:a}})):e==="shader"&&(y=C__namespace.createElement(nr,{preset:s,fragmentShader:c,palette:d,postPreset:m,aspect:"auto",radius:"none",className:"absolute inset-0"}));return C__namespace.createElement("div",{ref:v,"data-gds-part":"frame-fill","data-gds-fill-type":e,"aria-hidden":"true",className:l("absolute inset-0 z-0 overflow-hidden pointer-events-none",b!=="none"&&qh[b],f),style:w},y)});Zc.displayName="BackgroundFill";var Xc={primary:"oklch(var(--primary))",secondary:"oklch(var(--accent))",accent:"oklch(var(--primary))",background:"oklch(var(--foreground))"};var Ka=C__namespace.forwardRef(({preset:e,live:t="hover",postPreset:o,palette:r,className:n,aspect:a="video",radius:i="lg",label:p,hideLabel:s=false,onClick:c},d)=>{let m=jr[e],[g,u]=C__namespace.useState(false),b=t!=="never",f=t==="always"||t==="hover"&&g;return C__namespace.createElement("div",{ref:d,"data-gds-part":"picker-card","data-gds-preset":e,onMouseEnter:()=>u(true),onMouseLeave:()=>u(false),onClick:c,className:l("group cursor-pointer flex flex-col gap-2",n)},b?C__namespace.createElement(nr,{key:e,preset:e,postPreset:o,palette:r??Xc,aspect:a,radius:i,autoPlay:false,play:f,controls:false,pauseOffscreen:true,poster:m?.poster,maxDpr:1}):C__namespace.createElement(zt,{aspect:a,radius:i,"data-gds-part":"preset-poster",className:"bg-gradient-to-br from-muted to-muted/50"},m?.poster?C__namespace.createElement("img",{src:m.poster,alt:m.label,className:"w-full h-full object-cover"}):C__namespace.createElement("div",{className:"absolute inset-0 flex items-center justify-center text-xs text-muted-foreground"},m?.label??e)),!s&&C__namespace.createElement("div",{className:"flex items-baseline justify-between text-xs"},C__namespace.createElement("span",{className:"font-medium text-foreground","data-gds-part":"preset-label"},p??m?.label??e),m?.tags?.[0]&&C__namespace.createElement("span",{className:"text-muted-foreground"},m.tags[0])))});Ka.displayName="ShaderPresetPreview";function li({value:e,onChange:t,filterTags:o,live:r="hover",postPreset:n,palette:a,columns:i=3,className:p}){let s=C__namespace.useMemo(()=>o?.length?Gr.filter(d=>o.some(m=>d.tags.includes(m))):Gr,[o]);return C__namespace.createElement("div",{"data-gds-part":"preset-grid",role:"radiogroup",className:l("grid grid-cols-2 gap-3",i===2?"md:grid-cols-2":i===4?"md:grid-cols-4":"md:grid-cols-3",p)},s.map(d=>{let m=e===d.id;return C__namespace.createElement("div",{key:d.id,className:"relative",role:"radio","aria-checked":m},C__namespace.createElement(Ka,{preset:d.id,postPreset:n,palette:a,live:r,onClick:()=>t?.(d.id),className:l("transition-all",m&&"ring-2 ring-primary ring-offset-2 ring-offset-background rounded-lg")}),m&&C__namespace.createElement("div",{"data-gds-part":"picker-selected-badge",className:"absolute top-2 right-2 rounded-full bg-primary text-primary-foreground p-1 shadow-sm"},C__namespace.createElement(lucideReact.Check,{className:"h-3.5 w-3.5"})))}))}var qa=["primary","accent","secondary","muted","card","background","destructive","transparent"];function ob(e){return e==="transparent"?"transparent":`oklch(var(--${e}))`}var rb=[{tab:"solid",icon:lucideReact.Square,label:"Solid"},{tab:"gradient",icon:lucideReact.Blend,label:"Gradient"},{tab:"image",icon:lucideReact.Image,label:"Image"},{tab:"pattern",icon:lucideReact.Grid3x3,label:"Pattern"},{tab:"video",icon:lucideReact.Video,label:"Video"},{tab:"shader",icon:lucideReact.Sparkles,label:"Shader"}];function ab(e){return e.type==="image"&&e.repeat?"pattern":e.type==="image"?"image":e.type}var _t="text-[11px] font-medium text-muted-foreground";function di({token:e,active:t,onClick:o}){return C__namespace.createElement("button",{type:"button",title:e,onClick:o,className:l("h-7 w-7 rounded-md border border-border/60 transition-shadow",e==="transparent"&&"bg-[linear-gradient(45deg,#bbb_25%,transparent_25%,transparent_75%,#bbb_75%),linear-gradient(45deg,#bbb_25%,transparent_25%,transparent_75%,#bbb_75%)] bg-[length:8px_8px] bg-[position:0_0,4px_4px]",t&&"ring-2 ring-primary ring-offset-1 ring-offset-background"),style:e==="transparent"?void 0:{background:ob(e)}})}function Jc({value:e,onChange:t,className:o}){let r=ab(e),n=i=>t({...e,...i}),a=i=>{i&&n(i==="pattern"?{type:"image",repeat:true}:i==="image"?{type:"image",repeat:false}:{type:i});};return C__namespace.createElement("div",{className:l("flex flex-col gap-3",o)},C__namespace.createElement(Do,{type:"single",size:"sm",value:r,onValueChange:i=>a(i),className:"justify-start gap-0.5"},rb.map(({tab:i,icon:p,label:s})=>C__namespace.createElement(Ao,{key:i,value:i,"aria-label":s,title:s},C__namespace.createElement(p,{className:"h-4 w-4"})))),r==="solid"&&C__namespace.createElement("div",{className:"flex flex-col gap-1.5"},C__namespace.createElement("span",{className:_t},"Token"),C__namespace.createElement("div",{className:"flex flex-wrap gap-1.5"},qa.map(i=>C__namespace.createElement(di,{key:i,token:i,active:e.color===i,onClick:()=>n({color:i})})))),r==="gradient"&&C__namespace.createElement("div",{className:"flex flex-col gap-2"},C__namespace.createElement("div",{className:"flex flex-col gap-1.5"},C__namespace.createElement("span",{className:_t},"From"),C__namespace.createElement("div",{className:"flex flex-wrap gap-1.5"},qa.map(i=>C__namespace.createElement(di,{key:i,token:i,active:e.gradient?.from===i,onClick:()=>n({gradient:{...e.gradient,from:i}})})))),C__namespace.createElement("div",{className:"flex flex-col gap-1.5"},C__namespace.createElement("span",{className:_t},"To"),C__namespace.createElement("div",{className:"flex flex-wrap gap-1.5"},qa.map(i=>C__namespace.createElement(di,{key:i,token:i,active:e.gradient?.to===i,onClick:()=>n({gradient:{...e.gradient,to:i}})})))),C__namespace.createElement("div",{className:"flex flex-col gap-1.5"},C__namespace.createElement("span",{className:_t},"Angle \u2014 ",e.gradient?.angle??135,"\xB0"),C__namespace.createElement(Mo,{value:[e.gradient?.angle??135],min:0,max:360,step:5,onValueChange:([i])=>n({gradient:{...e.gradient,angle:i}})}))),(r==="image"||r==="pattern")&&C__namespace.createElement("div",{className:"flex flex-col gap-2"},C__namespace.createElement("div",{className:"flex flex-col gap-1.5"},C__namespace.createElement("span",{className:_t},"Image URL"),C__namespace.createElement(qt,{size:"sm",value:e.src??"",placeholder:"https://\u2026 or /asset.png",onChange:i=>n({src:i.target.value})})),r==="image"&&C__namespace.createElement("div",{className:"flex flex-col gap-1.5"},C__namespace.createElement("span",{className:_t},"Fit"),C__namespace.createElement(Do,{type:"single",size:"sm",value:e.fit??"cover",onValueChange:i=>i&&n({fit:i}),className:"justify-start gap-0.5"},["cover","contain","fill","none"].map(i=>C__namespace.createElement(Ao,{key:i,value:i,className:"px-2 text-[11px] capitalize"},i)))),r==="pattern"&&C__namespace.createElement("div",{className:"flex flex-col gap-1.5"},C__namespace.createElement("span",{className:_t},"Tile size"),C__namespace.createElement(qt,{size:"sm",value:e.tileSize??"",placeholder:"120px",onChange:i=>n({tileSize:i.target.value})}))),r==="video"&&C__namespace.createElement("div",{className:"flex flex-col gap-1.5"},C__namespace.createElement("span",{className:_t},"Video URL"),C__namespace.createElement(qt,{size:"sm",value:e.src??"",placeholder:"https://\u2026.mp4",onChange:i=>n({src:i.target.value})})),r==="shader"&&C__namespace.createElement("div",{className:"flex flex-col gap-1.5"},C__namespace.createElement("span",{className:_t},"Shader"),C__namespace.createElement(li,{value:e.preset,onChange:i=>n({preset:i}),live:"hover",columns:3})),e.type!=="none"&&C__namespace.createElement("div",{className:"flex items-center gap-2 border-t border-border/50 pt-2.5"},C__namespace.createElement("span",{className:l(_t,"shrink-0")},"Opacity"),C__namespace.createElement(Mo,{value:[e.opacity??1],min:0,max:1,step:.05,onValueChange:([i])=>n({opacity:i}),className:"flex-1"}),C__namespace.createElement("span",{className:"w-9 shrink-0 text-right text-[11px] tabular-nums text-foreground"},Math.round((e.opacity??1)*100),"%")))}Jc.displayName="FillPicker";function lb({children:e}){let t=C.useRef(null);return C.useEffect(()=>{let o=new sb__default.default({duration:1.2,easing:n=>Math.min(1,1.001-Math.pow(2,-10*n)),orientation:"vertical",gestureOrientation:"vertical",smoothWheel:true});t.current=o;function r(n){o.raf(n),requestAnimationFrame(r);}return requestAnimationFrame(r),()=>{o.destroy(),t.current=null;}},[]),React.createElement(React.Fragment,null,e)}function ub({className:e}){let t=Fo();if(!t)return null;let{theme:o,themes:r,setThemeId:n,deleteTheme:a}=t;return C__namespace.createElement(At,null,C__namespace.createElement(It,{asChild:true},C__namespace.createElement(Xe,{variant:"ghost",size:"sm",className:l("gap-2",e),"aria-label":"Switch theme"},C__namespace.createElement(lucideReact.Palette,{className:"h-4 w-4"}),C__namespace.createElement("span",{className:"hidden sm:inline"},o.name))),C__namespace.createElement(Ct,{className:"w-80 p-2",align:"end"},C__namespace.createElement("div",{className:"flex items-start justify-between gap-2 px-2 py-1.5 mb-1"},C__namespace.createElement("div",null,C__namespace.createElement("div",{className:"text-xs font-medium text-muted-foreground"},"Theme"),C__namespace.createElement("div",{className:"text-xs text-muted-foreground/80"},"Switch the skin applied site-wide.")),C__namespace.createElement("button",{type:"button",onClick:()=>Un(o),className:"flex items-center gap-1 rounded-md border border-border px-2 py-1 text-[10px] font-medium text-muted-foreground hover:bg-muted hover:text-foreground transition-colors",title:"Download the active theme as a markdown spec \u2014 paste into a fresh LLM prompt"},C__namespace.createElement(lucideReact.Download,{className:"h-3 w-3"}),".md")),C__namespace.createElement("div",{className:"flex flex-col gap-0.5"},r.map(i=>{let p=i.id===o.id,s=i.id in Ft,c=i.ramps.primary[500],d=i.ramps.accent[500],m=i.ramps.neutral[500];return C__namespace.createElement("div",{key:i.id,className:l("group flex items-start gap-3 rounded-md px-2 py-2 text-left transition-colors","hover:bg-muted",p&&"bg-muted")},C__namespace.createElement("button",{type:"button",onClick:()=>n(i.id),className:"flex items-start gap-3 flex-1 min-w-0 text-left"},C__namespace.createElement("div",{className:"mt-0.5 flex shrink-0 overflow-hidden rounded-md border border-border"},C__namespace.createElement("div",{className:"h-5 w-2.5",style:{background:`oklch(${c})`},"aria-hidden":true}),C__namespace.createElement("div",{className:"h-5 w-2.5",style:{background:`oklch(${d})`},"aria-hidden":true}),C__namespace.createElement("div",{className:"h-5 w-2.5",style:{background:`oklch(${m})`},"aria-hidden":true})),C__namespace.createElement("div",{className:"min-w-0 flex-1"},C__namespace.createElement("div",{className:"flex items-center gap-2"},C__namespace.createElement("span",{className:"text-sm font-medium truncate text-foreground"},i.name),i.tagline&&C__namespace.createElement("span",{className:"text-[10px] uppercase tracking-wide text-muted-foreground shrink-0"},i.tagline)),i.description&&C__namespace.createElement("div",{className:"text-xs text-muted-foreground line-clamp-2"},i.description))),p&&C__namespace.createElement(lucideReact.Check,{className:"mt-2 h-4 w-4 shrink-0 text-primary"}),!s&&!p&&C__namespace.createElement("button",{type:"button",onClick:g=>{g.stopPropagation(),a(i.id);},className:"mt-1 opacity-0 group-hover:opacity-100 transition-opacity rounded p-1 hover:bg-destructive/10 hover:text-destructive","aria-label":`Delete theme ${i.name}`},C__namespace.createElement(lucideReact.Trash2,{className:"h-3.5 w-3.5"})))}))))}var Qc=[{mode:"superLight",label:"Super light",icon:lucideReact.SunDim,tooltip:"Super light \u2014 airy, low contrast"},{mode:"light",label:"Light",icon:lucideReact.Sun,tooltip:"Light"},{mode:"dark",label:"Dark",icon:lucideReact.Moon,tooltip:"Dark"},{mode:"superDark",label:"Super dark",icon:lucideReact.MoonStar,tooltip:"Super dark \u2014 OLED, high contrast"}];function vb({className:e,variant:t="icons"}){let o=Fo();if(!o)return null;let{mode:r,setMode:n}=o;return t==="labeled"?C__namespace.createElement("div",{role:"radiogroup","aria-label":"Brightness mode",className:l("inline-flex flex-wrap gap-1 rounded-md border border-border bg-background p-1",e)},Qc.map(({mode:a,label:i,icon:p})=>{let s=r===a;return C__namespace.createElement("button",{key:a,type:"button",role:"radio","aria-checked":s,onClick:()=>n(a),className:l("flex items-center gap-2 rounded px-3 py-1.5 text-sm transition-colors",s?"bg-primary text-primary-foreground":"hover:bg-accent hover:text-accent-foreground")},C__namespace.createElement(p,{className:"h-4 w-4"}),C__namespace.createElement("span",null,i))})):C__namespace.createElement("div",{role:"radiogroup","aria-label":"Brightness mode",className:l("inline-flex items-center gap-0.5 rounded-md border border-border bg-background p-0.5",e)},Qc.map(({mode:a,icon:i,tooltip:p})=>{let s=r===a;return C__namespace.createElement("button",{key:a,type:"button",role:"radio","aria-checked":s,"aria-label":p,title:p,onClick:()=>n(a),className:l("flex h-7 w-7 items-center justify-center rounded transition-colors",s?"bg-primary text-primary-foreground":"text-muted-foreground hover:bg-accent hover:text-accent-foreground")},C__namespace.createElement(i,{className:"h-3.5 w-3.5"}))}))}function wb(){let{isDark:e,setMode:t}=Xn();return React.createElement(Xe,{variant:"ghost",size:"sm",onClick:()=>t(e?"light":"dark"),className:"gap-2","aria-label":e?"Switch to light mode":"Switch to dark mode"},e?React.createElement(React.Fragment,null,React.createElement(lucideReact.Sun,{className:"h-4 w-4"}),React.createElement("span",{className:"hidden sm:inline"},"Light")):React.createElement(React.Fragment,null,React.createElement(lucideReact.Moon,{className:"h-4 w-4"}),React.createElement("span",{className:"hidden sm:inline"},"Dark")))}
580
- exports.ALL_MODES=gc;exports.Accordion=Ap;exports.AccordionContent=Ls;exports.AccordionItem=Ms;exports.AccordionTrigger=Es;exports.AppShell=Gs;exports.AppShellAside=Us;exports.AppShellFooter=Ks;exports.AppShellHeader=js;exports.AppShellMain=$s;exports.AppShellNav=Ws;exports.Avatar=Ys;exports.AvatarFallback=Xs;exports.AvatarImage=Zs;exports.BUILT_IN_INPUTS=Ia;exports.BackgroundFill=Zc;exports.Badge=ea;exports.Banner=tl;exports.BlinkingCursor=ua;exports.Breadcrumb=Hd;exports.BreadcrumbEllipsis=Vd;exports.BreadcrumbItem=zd;exports.BreadcrumbLink=Bd;exports.BreadcrumbList=Fd;exports.BreadcrumbMenuTrigger=Gd;exports.BreadcrumbPage=_d;exports.BreadcrumbSeparator=Od;exports.Button=Xe;exports.COMPONENT_CONTRACTS=on;exports.Calendar=oa;exports.CalendarDayButton=rl;exports.Callout=As;exports.CalloutDescription=Hs;exports.CalloutTitle=Is;exports.Card=al;exports.CardContent=ll;exports.CardDescription=sl;exports.CardFooter=dl;exports.CardHeader=nl;exports.CardTitle=il;exports.Carousel=Jp;exports.CarouselArrows=sn;exports.CarouselDots=nn;exports.CarouselNext=xr;exports.CarouselPrev=yr;exports.CarouselSlide=ra;exports.CarouselVideoSlide=an;exports.Checkbox=cl;exports.CheckboxCard=ul;exports.Code=Rl;exports.Composer=Pl;exports.ComposerReply=Ru;exports.DEMO_SPEED_PRESETS=qo;exports.DatePicker=Tu;exports.DateRangePicker=Pu;exports.DemoStage=yl;exports.Dialog=Mu;exports.DialogClose=Lu;exports.DialogContent=El;exports.DialogDescription=Il;exports.DialogFooter=Dl;exports.DialogHeader=Ll;exports.DialogOverlay=pn;exports.DialogPortal=Ml;exports.DialogTitle=Al;exports.DialogTrigger=Eu;exports.DropdownMenu=Hu;exports.DropdownMenuCheckboxItem=Ol;exports.DropdownMenuContent=Bl;exports.DropdownMenuGroup=zu;exports.DropdownMenuItem=_l;exports.DropdownMenuLabel=Gl;exports.DropdownMenuPortal=Bu;exports.DropdownMenuRadioGroup=Ou;exports.DropdownMenuRadioItem=Vl;exports.DropdownMenuSeparator=jl;exports.DropdownMenuShortcut=Wl;exports.DropdownMenuSub=_u;exports.DropdownMenuSubContent=zl;exports.DropdownMenuSubTrigger=Fl;exports.DropdownMenuTrigger=Fu;exports.FILL_TOKENS=qa;exports.FRAGMENT_HEADER=Vc;exports.Field=tm;exports.FieldDescription=na;exports.FieldLabel=aa;exports.FieldTrailing=ia;exports.FillPicker=Jc;exports.Flex=td;exports.GRADE_PRE_HYDRATION_SCRIPT=vf;exports.GradeModeSwitcher=vb;exports.GradeThemeProvider=yf;exports.GradeThemeSwitcher=ub;exports.Grid=Ql;exports.Input=qt;exports.Label=Po;exports.LenisProvider=lb;exports.Logo=sh;exports.MOTION_ATTR=Sr;exports.Map=Qn;exports.MapMarker=ei;exports.MediaSurface=zt;exports.MediaSurfaceContract=Ja;exports.Message=Rm;exports.MultiSelect=Kl;exports.Popover=At;exports.PopoverAnchor=Su;exports.PopoverContent=Ct;exports.PopoverTrigger=It;exports.Progress=$l;exports.RadioCard=ml;exports.RadioGroup=ql;exports.RadioGroupItem=Yl;exports.ResizableHandle=og;exports.ResizablePanel=tg;exports.ResizablePanelGroup=eg;exports.Reveal=xl;exports.RivePlayer=Dc;exports.Row=Xl;exports.ScreenAnimator=bh;exports.ScrollArea=od;exports.ScrollBar=yn;exports.Select=xn;exports.SelectContent=ka;exports.SelectGroup=pg;exports.SelectItem=Ca;exports.SelectLabel=id;exports.SelectScrollDownButton=Sn;exports.SelectScrollUpButton=Rn;exports.SelectSeparator=sd;exports.SelectTrigger=Sa;exports.SelectValue=wn;exports.Separator=Er;exports.ShaderCompileError=rr;exports.ShaderControls=jh;exports.ShaderPresetPicker=li;exports.ShaderPresetPreview=Ka;exports.Sheet=hg;exports.SheetClose=vg;exports.SheetContent=dd;exports.SheetDescription=ud;exports.SheetFooter=pd;exports.SheetHeader=cd;exports.SheetOverlay=kn;exports.SheetPortal=ld;exports.SheetTitle=md;exports.SheetTrigger=bg;exports.Sidebar=po;exports.SidebarContent=Hn;exports.SidebarFooter=Fn;exports.SidebarHeader=In;exports.SidebarItem=Bn;exports.SidebarSection=zn;exports.SidebarTreeItem=_n;exports.Skeleton=xg;exports.Slider=Mo;exports.Sortable=Dg;exports.SortableGroup=Tn;exports.SortableHandle=Nn;exports.SortableItem=Pn;exports.Stack=kd;exports.Switch=Na;exports.SwitchCard=gl;exports.Table=Td;exports.TableBody=Nd;exports.TableCaption=Ad;exports.TableCell=Dd;exports.TableFooter=Md;exports.TableHead=Ld;exports.TableHeader=Pd;exports.TableRow=Ed;exports.Tabs=Og;exports.TabsContent=Kd;exports.TabsList=Ud;exports.TabsTrigger=$d;exports.Textarea=qd;exports.ThemeToggle=wb;exports.ThreeScene=nr;exports.Toggle=Zd;exports.ToggleGroup=Do;exports.ToggleGroupItem=Ao;exports.Toolbar=Qd;exports.ToolbarSlot=ec;exports.Tooltip=Eo;exports.TooltipContent=co;exports.TooltipProvider=En;exports.TooltipTrigger=Lo;exports.VideoPlayer=Lc;exports.appShellAsideVariants=_s;exports.appShellFooterVariants=Vs;exports.appShellHeaderVariants=zs;exports.appShellMainVariants=Os;exports.appShellNavVariants=Bs;exports.applyThemeToRoot=Ha;exports.badgeVariants=Qs;exports.bannerVariants=el;exports.buildFragmentShaderScene=ar;exports.builtInThemes=Ft;exports.buttonVariants=vr;exports.calloutVariants=Ds;exports.calmInput=_r;exports.cn=l;exports.defaultPostPreset=Ga;exports.defaultThemeId=tr;exports.deleteUserTheme=qn;exports.demoSleep=fe;exports.demoTypeText=pa;exports.duplicateTheme=bf;exports.energyInput=Vn;exports.flexVariants=ed;exports.generateTheme=Io;exports.getComponentContract=Np;exports.getTheme=Ho;exports.gridVariants=Jl;exports.listContractedComponents=Mp;exports.listThemes=$n;exports.listUserThemes=mc;exports.loadUserThemeInput=Kn;exports.postPresets=Wr;exports.rowVariants=Zl;exports.saveUserTheme=za;exports.sceneRegistry=Vr;exports.setMotion=sm;exports.shaderPresetById=jr;exports.shaderPresets=Gr;exports.shellVariants=Fs;exports.stackVariants=Sd;exports.themeToCSSVars=jn;exports.toggleVariants=Yd;exports.useCarouselApi=Qp;exports.useGradeTheme=Xn;exports.useMaybeGradeTheme=Fo;exports.usePageActive=kr;exports.usePrefersReducedMotion=ao;exports.useReducedMotion=Zo;exports.useScriptedDemo=no;//# sourceMappingURL=index.js.map
756
+ `);var Kr={space:yp,plasma:xp,voronoi:wp,synthwave:Rp,mesh:kp,waves:Mp,undertones:Cp,"flowing-dots":Tp,grain:Pp},qr=[{id:"mesh",label:"Mesh gradient",description:"Smooth moving blobs of the primary / secondary / accent colours over the background \u2014 the go-to soft, theme-reactive background.",tags:["gradient","mesh","abstract","hero","background"],scene:"mesh",defaultPostPreset:"none"},{id:"waves",label:"Waves",description:"Flowing banded ribbons that ripple across the surface. Clean motion for headers and hero backdrops.",tags:["waves","motion","abstract","hero"],scene:"waves",defaultPostPreset:"none"},{id:"undertones",label:"Undertones",description:"Soft low-saturation tonal washes drifting like weather \u2014 the field bends gently toward the cursor and a faint light follows it. The calm, expensive-feeling backdrop.",tags:["gradient","soft","subtle","mouse","hero","background","calm"],scene:"undertones",defaultPostPreset:"none"},{id:"flowing-dots",label:"Flowing dots",description:"A dot-matrix grid where waves of dots swell and tint as a flow field passes through \u2014 and swell toward the cursor. Playful, technical, great behind type.",tags:["dots","grid","halftone","mouse","motion","background","playful"],scene:"flowing-dots",defaultPostPreset:"none"},{id:"grain",label:"Grain",description:"A glacial tonal wash under heavy animated film grain \u2014 fine print grain plus a coarser fleck, with a gentle vignette. The editorial, print-feeling backdrop; lovely in light AND dark tones.",tags:["grain","film","texture","editorial","print","subtle","hero","background"],scene:"grain",defaultPostPreset:"none"},{id:"space",label:"Hyperspace",description:"Classic 'jump to hyperspace' \u2014 streaking stars flying past camera. Pairs well with VHS or Cinematic post-FX.",tags:["space","retro","motion","hero","background"],scene:"space",defaultPostPreset:"vhs"},{id:"plasma",label:"Plasma",description:"Soft rolling colour clouds \u2014 overlapping sines warping a palette ramp. Classic demoscene vibe. Pairs well with Synthwave or Cinematic.",tags:["abstract","soft","ambient","hero","background","gradient"],scene:"plasma",defaultPostPreset:"synthwave"},{id:"voronoi",label:"Voronoi",description:"Jittered cellular grid \u2014 orbiting seed points form animated cells with glowing edges. Great for data / organic / network moods. Pairs well with CRT or VHS.",tags:["abstract","cells","organic","network","hero","background"],scene:"voronoi",defaultPostPreset:"crt"},{id:"synthwave",label:"Synthwave Grid",description:"Retro-future perspective grid receding to a banded sun disc on the horizon. Pairs beautifully with the Synthwave post preset (its namesake).",tags:["retro","synthwave","80s","hero","background","grid","sun"],scene:"synthwave",defaultPostPreset:"synthwave"}],Zr=Object.fromEntries(qr.map(e=>[e.id,e]));var Yr={none:{id:"none",label:"Clean",effects:{}},vhs:{id:"vhs",label:"VHS",effects:{bloom:{intensity:.35,luminanceThreshold:.5,radius:.7},noise:{intensity:.04},scanlines:{density:1.5,opacity:.12},vignette:{darkness:.4,offset:.45},chromatic:{offset:.0015}}},cinematic:{id:"cinematic",label:"Cinematic",effects:{bloom:{intensity:.5,luminanceThreshold:.55,radius:.8},vignette:{darkness:.5,offset:.5}}},synthwave:{id:"synthwave",label:"Synthwave",effects:{bloom:{intensity:.8,luminanceThreshold:.3,radius:.9},chromatic:{offset:.002},vignette:{darkness:.3,offset:.55}}},crt:{id:"crt",label:"CRT",effects:{bloom:{intensity:.2,luminanceThreshold:.7,radius:.4},scanlines:{density:2,opacity:.25},vignette:{darkness:.6,offset:.4},chromatic:{offset:.0025}}}},Za="vhs";var Xr={primary:"oklch(var(--brand-1, 0.62 0.20 20))",secondary:"oklch(var(--brand-2, 0.70 0.16 200))",accent:"oklch(var(--brand-3, 0.78 0.17 90))",background:"oklch(var(--background, 0.12 0.01 265))"},ov={dark:"oklch(0.13 0.015 265)",light:"oklch(0.97 0.005 265)"},rv=/^[\d.]+\s+[\d.]+\s+[\d.]+(?:\s*\/\s*[\d.%]+)?$/,av=/^[\d.]+\s+[\d.]+%\s+[\d.]+%(?:\s*\/\s*[\d.%]+)?$/,nv=/^\s*var\(\s*(--[^,)\s]+)(?:\s*,[^)]*)?\s*\)\s*$/;function Ya(e,t,o){if(typeof document>"u")return o;let r=e,n=nv.exec(e);if(n){let p=getComputedStyle(t).getPropertyValue(n[1]).trim();p&&(rv.test(p)?r=`oklch(${p})`:av.test(p)&&(r=`hsl(${p})`));}let a=document.createElement("span");if(a.style.color="",a.style.color=r,a.style.color==="")return o;a.style.display="none",t.appendChild(a);let i=getComputedStyle(a).color;if(t.removeChild(a),!i)return o;if(i.startsWith("rgb"))return i;try{let p=document.createElement("canvas");p.width=1,p.height=1;let s=p.getContext("2d");if(!s)return i;s.clearRect(0,0,1,1),s.fillStyle=i,s.fillRect(0,0,1,1);let[c,l,m]=s.getImageData(0,0,1,1).data;return `rgb(${c}, ${l}, ${m})`}catch{return i}}function Np(e,t){return {primary:Ya(e.primary,t,Xr.primary),secondary:Ya(e.secondary,t,Xr.secondary),accent:Ya(e.accent,t,Xr.accent),background:Ya(e.background,t,Xr.background)}}var dr=v__namespace.forwardRef(({preset:e,fragmentShader:t,onShaderError:o,postPreset:r,palette:n,tone:a="auto",createScene:i,controls:p=false,autoPlay:s=true,play:c,pauseOffscreen:l=true,aspect:m="video",radius:u="lg",border:g=false,poster:h,label:f,className:b,style:y,maxDpr:R,...w},x)=>{let S=v__namespace.useRef(null),[M,A]=v__namespace.useState(c??s),[H,W]=v__namespace.useState(false),z=uo(),F=v__namespace.useMemo(()=>{let I={...Xr,...n};return a!=="auto"&&!n?.background&&(I.background=ov[a]),I},[n,a]),B=v__namespace.useMemo(()=>i||(t?ao(t):e&&Kr[e]?Kr[e]:null),[i,t,e]),q=v__namespace.useMemo(()=>{if(r&&typeof r=="object")return r;let I=typeof r=="string"?r:(e?Zr[e]?.defaultPostPreset:void 0)??Za;return Yr[I]??Yr[Za]},[r,e]),ie=v__namespace.useRef(q);ie.current=q;let N=v__namespace.useRef(F);N.current=F;let ue=v__namespace.useMemo(()=>JSON.stringify(F??null),[F]),k=v__namespace.useRef(o);k.current=o,v__namespace.useEffect(()=>{let I=S.current;if(!I||!B)return;let j=I.clientWidth||1,Y=I.clientHeight||1,ae=Np(N.current,I),U=new De__namespace.WebGLRenderer({antialias:true,alpha:false,powerPreference:"high-performance"}),xe=R??Math.min(window.devicePixelRatio||1,2);U.setPixelRatio(xe),U.setSize(j,Y),U.setClearColor(new De__namespace.Color(ae.background),1),U.domElement.dataset.gdsPart="shader-canvas",U.domElement.style.width="100%",U.domElement.style.height="100%",U.domElement.style.display="block",I.appendChild(U.domElement);let E;try{E=B({renderer:U,width:j,height:Y,palette:ae});}catch(_){if(_ instanceof lr)k.current?.(_),E=Kr.space({renderer:U,width:j,height:Y,palette:ae});else throw U.dispose(),U.domElement.parentElement===I&&I.removeChild(U.domElement),_}let me=ie.current,X=vp({renderer:U,scene:E.scene,camera:E.camera,preset:me,width:j,height:Y}),Ke=new De__namespace.Clock,ve=0,ke=(c??s)&&!z,qe=true,Ge=()=>{if(ve=requestAnimationFrame(Ge),!ke||l&&!qe)return;let _=Ke.getDelta(),Le=Ke.getElapsedTime();E.update?.(Le,_),X.composer.render(_);};E.update?.(0,0),X.composer.render(0),W(true),Ge();let O=new ResizeObserver(([_])=>{let Le=Math.max(1,Math.floor(_.contentRect.width)),Ne=Math.max(1,Math.floor(_.contentRect.height));U.setSize(Le,Ne),X.resize(Le,Ne),E.resize?.(Le,Ne),ke||(E.update?.(Ke.getElapsedTime(),0),X.composer.render(0));});O.observe(I);let K=new IntersectionObserver(([_])=>{qe=_.isIntersecting;},{threshold:.05});K.observe(I);let V=new MutationObserver(()=>{if(!S.current)return;let _=Np(N.current,S.current);U.setClearColor(new De__namespace.Color(_.background),1),E.setPalette?.(_);});V.observe(document.documentElement,{attributes:true,attributeFilter:["class","style","data-theme","data-gds-theme","data-grade-mode"]});let ge=E,Te=ge.setMouse?_=>{let Le=I.getBoundingClientRect(),Ne=(_.clientX-Le.left)/Le.width,Mt=1-(_.clientY-Le.top)/Le.height;ge.setMouse(Ne,Mt);}:null;return Te&&I.addEventListener("pointermove",Te),G.current={toggle:()=>{ke=!ke,A(ke);},setRunning:_=>{ke=_&&!z,A(ke);},setPalette:_=>{U.setClearColor(new De__namespace.Color(_.background),1),E.setPalette?.(_);},setPostPreset:_=>{let Le=typeof _=="string"?Yr[_]:_;Le&&X.setPreset(Le);}},()=>{cancelAnimationFrame(ve),O.disconnect(),K.disconnect(),V.disconnect(),Te&&I.removeEventListener("pointermove",Te),X.dispose(),E.dispose?.(),U.dispose(),U.domElement.parentElement===I&&I.removeChild(U.domElement),G.current=null;}},[B,ue,s,z,l,R]);let G=v__namespace.useRef(null);v__namespace.useEffect(()=>{G.current?.setPostPreset(q);},[q]),v__namespace.useEffect(()=>{c!==void 0&&G.current?.setRunning(c);},[c]);let he=()=>G.current?.toggle();return v__namespace.createElement(jt,{...w,ref:I=>{S.current=I,typeof x=="function"?x(I):x&&(x.current=I);},aspect:m,radius:u,border:g,"aria-label":f,className:b,style:y,"data-gds-part":"three-scene"},!H&&h&&v__namespace.createElement("img",{src:h,alt:"",className:"absolute inset-0 w-full h-full object-cover","data-gds-part":"scene-poster"}),p&&v__namespace.createElement("div",{"data-gds-part":"scene-controls",className:d("absolute inset-0 flex items-end justify-end p-2","opacity-0 hover:opacity-100 transition-opacity","bg-gradient-to-t from-black/30 to-transparent")},v__namespace.createElement(dt,{size:"icon",variant:"secondary",onClick:he},M?v__namespace.createElement(lucideReact.Pause,{className:"h-4 w-4"}):v__namespace.createElement(lucideReact.Play,{className:"h-4 w-4"}))))});dr.displayName="ThreeScene";function Ep(e,t,o){let r=e[t];return typeof r=="number"?r:o}function Xa(e,t,o){let r=e[t];return typeof r=="string"?r:o}function Lp(e,t,o){let r=e[t];return typeof r=="boolean"?r:o}function Dp(e,t,o){let r=e[t];return Array.isArray(r)?r:o}var Ja="text-[11px] font-medium text-foreground";function lv({controls:e,state:t,onChange:o,disabled:r,className:n}){return v__namespace.createElement("div",{className:d("flex flex-col",n)},e.map(a=>{if(a.type==="divider")return v__namespace.createElement("div",{key:a.key,className:"mt-3 mb-1 border-t border-border/60 pt-2 first:mt-0 first:border-t-0 first:pt-0"},a.label?v__namespace.createElement("span",{className:"text-[11px] font-semibold uppercase tracking-wide text-foreground/80"},a.label):null);if(a.type==="slider")return v__namespace.createElement(dv,{key:a.key,spec:a,value:Ep(t,a.key,a.default),disabled:r,onChange:p=>o(a.key,p)});if(a.type==="segmented"){let p=Xa(t,a.key,a.default);return v__namespace.createElement(vi,{key:a.key,label:a.label},v__namespace.createElement(_o,{type:"single",size:"sm",value:p,onValueChange:s=>s&&o(a.key,s),disabled:r,className:"w-full justify-start"},a.options.map(s=>v__namespace.createElement(Bo,{key:s.value,value:s.value,className:"flex-1"},s.label))))}if(a.type==="select"){let p=Xa(t,a.key,a.default);return v__namespace.createElement(vi,{key:a.key,label:a.label},v__namespace.createElement(Cn,{value:p,onValueChange:s=>o(a.key,s),disabled:r},v__namespace.createElement(Na,{size:"xs",className:"w-full"},v__namespace.createElement(Tn,null)),v__namespace.createElement(Ea,{size:"xs"},a.options.map(s=>v__namespace.createElement(La,{key:s.value,value:s.value},s.label)))))}if(a.type==="toggle"){let p=Lp(t,a.key,a.default);return v__namespace.createElement("div",{key:a.key,className:"flex items-center justify-between gap-2 py-1"},v__namespace.createElement(Ao,{className:Ja},a.label),v__namespace.createElement(Ia,{checked:p,onCheckedChange:s=>o(a.key,s),disabled:r}))}if(a.type==="color"){let p=Xa(t,a.key,a.default);return v__namespace.createElement(vi,{key:a.key,label:a.label,hint:a.slot?`\u2192 ${a.slot}`:void 0},v__namespace.createElement(Ap,{value:p,disabled:r,onChange:s=>o(a.key,s)}))}let i=Dp(t,a.key,a.default);return v__namespace.createElement(pv,{key:a.key,spec:a,value:i,disabled:r,onChange:p=>o(a.key,p)})}))}function vi({label:e,hint:t,children:o}){return v__namespace.createElement("div",{className:"space-y-1 py-1"},v__namespace.createElement("div",{className:"flex items-baseline justify-between gap-2"},v__namespace.createElement(Ao,{className:Ja},e),t?v__namespace.createElement("span",{className:"text-[10px] text-muted-foreground/70"},t):null),o)}function dv({spec:e,value:t,disabled:o,onChange:r}){let n=e.step<1?e.step<.1?3:2:0,a=l=>Math.min(e.max,Math.max(e.min,l)),[i,p]=v__namespace.useState(null),s=i??t.toFixed(n),c=l=>{let m=Number(l);Number.isFinite(m)&&r(a(m)),p(null);};return v__namespace.createElement("div",{className:"space-y-1 py-1"},v__namespace.createElement("div",{className:"flex items-center justify-between gap-2"},v__namespace.createElement(Ao,{className:Ja},e.label),v__namespace.createElement(oo,{size:"xs",type:"text",inputMode:"decimal","aria-label":e.label,value:s,disabled:o,endSlot:e.unit?v__namespace.createElement("span",{className:"text-[9px] text-muted-foreground/60"},e.unit):void 0,className:"w-16 tabular-nums",onChange:l=>p(l.currentTarget.value),onBlur:l=>c(l.currentTarget.value),onKeyDown:l=>{l.key==="Enter"&&c(l.currentTarget.value);}})),v__namespace.createElement(Ho,{value:[t],min:e.min,max:e.max,step:e.step,disabled:o,onValueChange:l=>r(a(l[0]??e.default))}))}var cv=/^#([0-9a-f]{3}|[0-9a-f]{6})$/i;function Ap({value:e,disabled:t,onChange:o}){let r=cv.test(e)?e:"#000000";return v__namespace.createElement("div",{className:"flex items-center gap-1.5"},v__namespace.createElement("input",{type:"color",value:r,disabled:t,onChange:n=>o(n.currentTarget.value),"aria-label":"Colour swatch",className:"h-7 w-9 shrink-0 cursor-pointer rounded-md border border-input bg-transparent disabled:opacity-50"}),v__namespace.createElement(oo,{size:"xs",value:e,disabled:t,onChange:n=>o(n.currentTarget.value),className:"font-mono"}))}function pv({spec:e,value:t,disabled:o,onChange:r}){let n=e.min??1,a=e.max??8,i=(c,l)=>r(t.map((m,u)=>u===c?l:m)),p=()=>t.length<a&&r([...t,t[t.length-1]??"#ffffff"]),s=c=>t.length>n&&r(t.filter((l,m)=>m!==c));return v__namespace.createElement("div",{className:"space-y-1 py-1"},v__namespace.createElement("div",{className:"flex items-baseline justify-between gap-2"},v__namespace.createElement(Ao,{className:Ja},e.label),v__namespace.createElement("button",{type:"button",onClick:p,disabled:o||t.length>=a,"aria-label":"Add colour",className:"inline-flex h-5 w-5 items-center justify-center rounded-md text-muted-foreground transition-colors hover:bg-muted hover:text-foreground disabled:opacity-40 [&_svg]:size-3.5"},v__namespace.createElement(lucideReact.Plus,null))),v__namespace.createElement("div",{className:"space-y-1.5"},t.map((c,l)=>v__namespace.createElement("div",{key:l,className:"flex items-center gap-1.5"},v__namespace.createElement(Ap,{value:c,disabled:o,onChange:m=>i(l,m)}),v__namespace.createElement("button",{type:"button",onClick:()=>s(l),disabled:o||t.length<=n,"aria-label":"Remove colour",className:"inline-flex h-7 w-6 shrink-0 items-center justify-center rounded-md text-muted-foreground transition-colors hover:bg-muted hover:text-foreground disabled:opacity-40 [&_svg]:size-3.5"},v__namespace.createElement(lucideReact.Minus,null))))))}var uv={background:"oklch(var(--background))",card:"oklch(var(--card))",muted:"oklch(var(--muted))",secondary:"oklch(var(--secondary))",accent:"oklch(var(--accent))",primary:"oklch(var(--primary))",destructive:"oklch(var(--destructive))",transparent:"transparent"};function Qa(e){if(e)return uv[e]??e}var mv={none:"rounded-none",sm:"rounded-sm",md:"rounded-md",lg:"rounded-lg",xl:"rounded-xl"},Ip={cover:"object-cover",contain:"object-contain",fill:"object-fill",none:"object-none"},Hp=v__namespace.forwardRef(({type:e,color:t,gradient:o,src:r,fit:n="cover",position:a="center",repeat:i=false,tileSize:p,preset:s,fragmentShader:c,palette:l,tone:m,postPreset:u,opacity:g,blendMode:h,radius:f="none",className:b,style:y},R)=>{if(e==="none")return null;let w={opacity:g,mixBlendMode:h,...y},x=null;if(e==="solid")w.background=Qa(t)??"oklch(var(--background))";else if(e==="gradient"){let S=[Qa(o?.from)??"oklch(var(--primary))",Qa(o?.via),Qa(o?.to)??"oklch(var(--accent))"].filter(Boolean);if(o?.shape==="radial"){let M=o.at??"center",A=o.size?`${o.size} `:"";w.backgroundImage=`radial-gradient(${A}at ${M}, ${S.join(", ")})`;}else {let M=o?.angle??135;w.backgroundImage=`linear-gradient(${M}deg, ${S.join(", ")})`;}}else e==="image"?i&&r?(w.backgroundImage=`url(${r})`,w.backgroundRepeat="repeat",w.backgroundPosition=a,p&&(w.backgroundSize=p)):r&&(x=v__namespace.createElement("img",{src:r,alt:"",className:d("absolute inset-0 h-full w-full",Ip[n]),style:{objectPosition:a}})):e==="video"?r&&(x=v__namespace.createElement("video",{src:r,autoPlay:true,muted:true,loop:true,playsInline:true,className:d("absolute inset-0 h-full w-full",Ip[n]),style:{objectPosition:a}})):e==="shader"&&(x=v__namespace.createElement(dr,{preset:s,fragmentShader:c,palette:l,tone:m,postPreset:u,aspect:"auto",radius:"none",className:"absolute inset-0"}));return v__namespace.createElement("div",{ref:R,"data-gds-part":"frame-fill","data-gds-fill-type":e,"aria-hidden":"true",className:d("absolute inset-0 z-0 overflow-hidden pointer-events-none",f!=="none"&&mv[f],b),style:w},x)});Hp.displayName="BackgroundFill";var Fp={primary:"oklch(var(--primary))",secondary:"oklch(var(--accent))",accent:"oklch(var(--primary))",background:"oklch(var(--foreground))"};var en=v__namespace.forwardRef(({preset:e,live:t="hover",postPreset:o,palette:r,className:n,aspect:a="video",radius:i="lg",label:p,hideLabel:s=false,onClick:c},l)=>{let m=Zr[e],[u,g]=v__namespace.useState(false),h=t!=="never",f=t==="always"||t==="hover"&&u;return v__namespace.createElement("div",{ref:l,"data-gds-part":"picker-card","data-gds-preset":e,onMouseEnter:()=>g(true),onMouseLeave:()=>g(false),onClick:c,className:d("group cursor-pointer flex flex-col gap-2",n)},h?v__namespace.createElement(dr,{key:e,preset:e,postPreset:o,palette:r??Fp,aspect:a,radius:i,autoPlay:false,play:f,controls:false,pauseOffscreen:true,poster:m?.poster,maxDpr:1}):v__namespace.createElement(jt,{aspect:a,radius:i,"data-gds-part":"preset-poster",className:"bg-gradient-to-br from-muted to-muted/50"},m?.poster?v__namespace.createElement("img",{src:m.poster,alt:m.label,className:"w-full h-full object-cover"}):v__namespace.createElement("div",{className:"absolute inset-0 flex items-center justify-center text-xs text-muted-foreground"},m?.label??e)),!s&&v__namespace.createElement("div",{className:"flex items-baseline justify-between text-xs"},v__namespace.createElement("span",{className:"font-medium text-foreground","data-gds-part":"preset-label"},p??m?.label??e),m?.tags?.[0]&&v__namespace.createElement("span",{className:"text-muted-foreground"},m.tags[0])))});en.displayName="ShaderPresetPreview";function yi({value:e,onChange:t,filterTags:o,live:r="hover",postPreset:n,palette:a,columns:i=3,className:p}){let s=v__namespace.useMemo(()=>o?.length?qr.filter(l=>o.some(m=>l.tags.includes(m))):qr,[o]);return v__namespace.createElement("div",{"data-gds-part":"preset-grid",role:"radiogroup",className:d("grid grid-cols-2 gap-3",i===2?"md:grid-cols-2":i===4?"md:grid-cols-4":"md:grid-cols-3",p)},s.map(l=>{let m=e===l.id;return v__namespace.createElement("div",{key:l.id,className:"relative",role:"radio","aria-checked":m},v__namespace.createElement(en,{preset:l.id,postPreset:n,palette:a,live:r,onClick:()=>t?.(l.id),className:d("transition-all",m&&"ring-2 ring-primary ring-offset-2 ring-offset-background rounded-lg")}),m&&v__namespace.createElement("div",{"data-gds-part":"picker-selected-badge",className:"absolute top-2 right-2 rounded-full bg-primary text-primary-foreground p-1 shadow-sm"},v__namespace.createElement(lucideReact.Check,{className:"h-3.5 w-3.5"})))}))}var tn=["primary","accent","secondary","muted","card","background","destructive","transparent"];function wv(e){return e==="transparent"?"transparent":`oklch(var(--${e}))`}var Rv=[{tab:"solid",icon:lucideReact.Square,label:"Solid"},{tab:"gradient",icon:lucideReact.Blend,label:"Gradient"},{tab:"image",icon:lucideReact.Image,label:"Image"},{tab:"pattern",icon:lucideReact.Grid3x3,label:"Pattern"},{tab:"video",icon:lucideReact.Video,label:"Video"},{tab:"shader",icon:lucideReact.Sparkles,label:"Shader"}];function Sv(e){return e.type==="image"&&e.repeat?"pattern":e.type==="image"?"image":e.type}var Ut="text-[11px] font-medium text-muted-foreground";function xi({token:e,active:t,onClick:o}){return v__namespace.createElement("button",{type:"button",title:e,onClick:o,className:d("h-7 w-7 rounded-md border border-border/60 transition-shadow",e==="transparent"&&"bg-[linear-gradient(45deg,#bbb_25%,transparent_25%,transparent_75%,#bbb_75%),linear-gradient(45deg,#bbb_25%,transparent_25%,transparent_75%,#bbb_75%)] bg-[length:8px_8px] bg-[position:0_0,4px_4px]",t&&"ring-2 ring-primary ring-offset-1 ring-offset-background"),style:e==="transparent"?void 0:{background:wv(e)}})}function zp({value:e,onChange:t,className:o}){let r=Sv(e),n=i=>t({...e,...i}),a=i=>{i&&n(i==="pattern"?{type:"image",repeat:true}:i==="image"?{type:"image",repeat:false}:{type:i});};return v__namespace.createElement("div",{className:d("flex flex-col gap-3",o)},v__namespace.createElement(_o,{type:"single",size:"sm",value:r,onValueChange:i=>a(i),className:"justify-start gap-0.5"},Rv.map(({tab:i,icon:p,label:s})=>v__namespace.createElement(Bo,{key:i,value:i,"aria-label":s,title:s},v__namespace.createElement(p,{className:"h-4 w-4"})))),r==="solid"&&v__namespace.createElement("div",{className:"flex flex-col gap-1.5"},v__namespace.createElement("span",{className:Ut},"Token"),v__namespace.createElement("div",{className:"flex flex-wrap gap-1.5"},tn.map(i=>v__namespace.createElement(xi,{key:i,token:i,active:e.color===i,onClick:()=>n({color:i})})))),r==="gradient"&&v__namespace.createElement("div",{className:"flex flex-col gap-2"},v__namespace.createElement("div",{className:"flex flex-col gap-1.5"},v__namespace.createElement("span",{className:Ut},"From"),v__namespace.createElement("div",{className:"flex flex-wrap gap-1.5"},tn.map(i=>v__namespace.createElement(xi,{key:i,token:i,active:e.gradient?.from===i,onClick:()=>n({gradient:{...e.gradient,from:i}})})))),v__namespace.createElement("div",{className:"flex flex-col gap-1.5"},v__namespace.createElement("span",{className:Ut},"To"),v__namespace.createElement("div",{className:"flex flex-wrap gap-1.5"},tn.map(i=>v__namespace.createElement(xi,{key:i,token:i,active:e.gradient?.to===i,onClick:()=>n({gradient:{...e.gradient,to:i}})})))),v__namespace.createElement("div",{className:"flex flex-col gap-1.5"},v__namespace.createElement("span",{className:Ut},"Angle \u2014 ",e.gradient?.angle??135,"\xB0"),v__namespace.createElement(Ho,{value:[e.gradient?.angle??135],min:0,max:360,step:5,onValueChange:([i])=>n({gradient:{...e.gradient,angle:i}})}))),(r==="image"||r==="pattern")&&v__namespace.createElement("div",{className:"flex flex-col gap-2"},v__namespace.createElement("div",{className:"flex flex-col gap-1.5"},v__namespace.createElement("span",{className:Ut},"Image URL"),v__namespace.createElement(oo,{size:"sm",value:e.src??"",placeholder:"https://\u2026 or /asset.png",onChange:i=>n({src:i.target.value})})),r==="image"&&v__namespace.createElement("div",{className:"flex flex-col gap-1.5"},v__namespace.createElement("span",{className:Ut},"Fit"),v__namespace.createElement(_o,{type:"single",size:"sm",value:e.fit??"cover",onValueChange:i=>i&&n({fit:i}),className:"justify-start gap-0.5"},["cover","contain","fill","none"].map(i=>v__namespace.createElement(Bo,{key:i,value:i,className:"px-2 text-[11px] capitalize"},i)))),r==="pattern"&&v__namespace.createElement("div",{className:"flex flex-col gap-1.5"},v__namespace.createElement("span",{className:Ut},"Tile size"),v__namespace.createElement(oo,{size:"sm",value:e.tileSize??"",placeholder:"120px",onChange:i=>n({tileSize:i.target.value})}))),r==="video"&&v__namespace.createElement("div",{className:"flex flex-col gap-1.5"},v__namespace.createElement("span",{className:Ut},"Video URL"),v__namespace.createElement(oo,{size:"sm",value:e.src??"",placeholder:"https://\u2026.mp4",onChange:i=>n({src:i.target.value})})),r==="shader"&&v__namespace.createElement("div",{className:"flex flex-col gap-1.5"},v__namespace.createElement("span",{className:Ut},"Shader"),v__namespace.createElement(yi,{value:e.preset,onChange:i=>n({preset:i}),live:"hover",columns:3})),e.type!=="none"&&v__namespace.createElement("div",{className:"flex items-center gap-2 border-t border-border/50 pt-2.5"},v__namespace.createElement("span",{className:d(Ut,"shrink-0")},"Opacity"),v__namespace.createElement(Ho,{value:[e.opacity??1],min:0,max:1,step:.05,onValueChange:([i])=>n({opacity:i}),className:"flex-1"}),v__namespace.createElement("span",{className:"w-9 shrink-0 text-right text-[11px] tabular-nums text-foreground"},Math.round((e.opacity??1)*100),"%")))}zp.displayName="FillPicker";function Pv({children:e}){let t=v.useRef(null);return v.useEffect(()=>{let o=new Tv__default.default({duration:1.2,easing:n=>Math.min(1,1.001-Math.pow(2,-10*n)),orientation:"vertical",gestureOrientation:"vertical",smoothWheel:true});t.current=o;function r(n){o.raf(n),requestAnimationFrame(r);}return requestAnimationFrame(r),()=>{o.destroy(),t.current=null;}},[]),React.createElement(React.Fragment,null,e)}function Dv({className:e}){let t=Go();if(!t)return null;let{theme:o,themes:r,setThemeId:n,deleteTheme:a}=t;return v__namespace.createElement(Ot,null,v__namespace.createElement(Vt,{asChild:true},v__namespace.createElement(dt,{variant:"ghost",size:"sm",className:d("gap-2",e),"aria-label":"Switch theme"},v__namespace.createElement(lucideReact.Palette,{className:"h-4 w-4"}),v__namespace.createElement("span",{className:"hidden sm:inline"},o.name))),v__namespace.createElement(Ht,{className:"w-80 p-2",align:"end"},v__namespace.createElement("div",{className:"flex items-start justify-between gap-2 px-2 py-1.5 mb-1"},v__namespace.createElement("div",null,v__namespace.createElement("div",{className:"text-xs font-medium text-muted-foreground"},"Theme"),v__namespace.createElement("div",{className:"text-xs text-muted-foreground/80"},"Switch the skin applied site-wide.")),v__namespace.createElement("button",{type:"button",onClick:()=>Xn(o),className:"flex items-center gap-1 rounded-md border border-border px-2 py-1 text-[10px] font-medium text-muted-foreground hover:bg-muted hover:text-foreground transition-colors",title:"Download the active theme as a markdown spec \u2014 paste into a fresh LLM prompt"},v__namespace.createElement(lucideReact.Download,{className:"h-3 w-3"}),".md")),v__namespace.createElement("div",{className:"flex flex-col gap-0.5"},r.map(i=>{let p=i.id===o.id,s=i.id in Wt,c=i.ramps.primary[500],l=i.ramps.accent[500],m=i.ramps.neutral[500];return v__namespace.createElement("div",{key:i.id,className:d("group flex items-start gap-3 rounded-md px-2 py-2 text-left transition-colors","hover:bg-muted",p&&"bg-muted")},v__namespace.createElement("button",{type:"button",onClick:()=>n(i.id),className:"flex items-start gap-3 flex-1 min-w-0 text-left"},v__namespace.createElement("div",{className:"mt-0.5 flex shrink-0 overflow-hidden rounded-md border border-border"},v__namespace.createElement("div",{className:"h-5 w-2.5",style:{background:`oklch(${c})`},"aria-hidden":true}),v__namespace.createElement("div",{className:"h-5 w-2.5",style:{background:`oklch(${l})`},"aria-hidden":true}),v__namespace.createElement("div",{className:"h-5 w-2.5",style:{background:`oklch(${m})`},"aria-hidden":true})),v__namespace.createElement("div",{className:"min-w-0 flex-1"},v__namespace.createElement("div",{className:"flex items-center gap-2"},v__namespace.createElement("span",{className:"text-sm font-medium truncate text-foreground"},i.name),i.tagline&&v__namespace.createElement("span",{className:"text-[10px] uppercase tracking-wide text-muted-foreground shrink-0"},i.tagline)),i.description&&v__namespace.createElement("div",{className:"text-xs text-muted-foreground line-clamp-2"},i.description))),p&&v__namespace.createElement(lucideReact.Check,{className:"mt-2 h-4 w-4 shrink-0 text-primary"}),!s&&!p&&v__namespace.createElement("button",{type:"button",onClick:u=>{u.stopPropagation(),a(i.id);},className:"mt-1 opacity-0 group-hover:opacity-100 transition-opacity rounded p-1 hover:bg-destructive/10 hover:text-destructive","aria-label":`Delete theme ${i.name}`},v__namespace.createElement(lucideReact.Trash2,{className:"h-3.5 w-3.5"})))}))))}var _p=[{mode:"superLight",label:"Super light",icon:lucideReact.SunDim,tooltip:"Super light \u2014 airy, low contrast"},{mode:"light",label:"Light",icon:lucideReact.Sun,tooltip:"Light"},{mode:"dark",label:"Dark",icon:lucideReact.Moon,tooltip:"Dark"},{mode:"superDark",label:"Super dark",icon:lucideReact.MoonStar,tooltip:"Super dark \u2014 OLED, high contrast"}];function zv({className:e,variant:t="icons"}){let o=Go();if(!o)return null;let{mode:r,setMode:n}=o;return t==="labeled"?v__namespace.createElement("div",{role:"radiogroup","aria-label":"Brightness mode",className:d("inline-flex flex-wrap gap-1 rounded-md border border-border bg-background p-1",e)},_p.map(({mode:a,label:i,icon:p})=>{let s=r===a;return v__namespace.createElement("button",{key:a,type:"button",role:"radio","aria-checked":s,onClick:()=>n(a),className:d("flex items-center gap-2 rounded px-3 py-1.5 text-sm transition-colors",s?"bg-primary text-primary-foreground":"hover:bg-accent hover:text-accent-foreground")},v__namespace.createElement(p,{className:"h-4 w-4"}),v__namespace.createElement("span",null,i))})):v__namespace.createElement("div",{role:"radiogroup","aria-label":"Brightness mode",className:d("inline-flex items-center gap-0.5 rounded-md border border-border bg-background p-0.5",e)},_p.map(({mode:a,icon:i,tooltip:p})=>{let s=r===a;return v__namespace.createElement("button",{key:a,type:"button",role:"radio","aria-checked":s,"aria-label":p,title:p,onClick:()=>n(a),className:d("flex h-7 w-7 items-center justify-center rounded transition-colors",s?"bg-primary text-primary-foreground":"text-muted-foreground hover:bg-accent hover:text-accent-foreground")},v__namespace.createElement(i,{className:"h-3.5 w-3.5"}))}))}function Ov(){let{isDark:e,setMode:t}=ri();return React.createElement(dt,{variant:"ghost",size:"sm",onClick:()=>t(e?"light":"dark"),className:"gap-2","aria-label":e?"Switch to light mode":"Switch to dark mode"},e?React.createElement(React.Fragment,null,React.createElement(lucideReact.Sun,{className:"h-4 w-4"}),React.createElement("span",{className:"hidden sm:inline"},"Light")):React.createElement(React.Fragment,null,React.createElement(lucideReact.Moon,{className:"h-4 w-4"}),React.createElement("span",{className:"hidden sm:inline"},"Dark")))}
757
+ exports.ALL_MODES=Ac;exports.Accordion=yu;exports.AccordionContent=Ws;exports.AccordionItem=Vs;exports.AccordionTrigger=Gs;exports.AppShell=el;exports.AppShellAside=rl;exports.AppShellFooter=nl;exports.AppShellHeader=tl;exports.AppShellMain=al;exports.AppShellNav=ol;exports.Avatar=sl;exports.AvatarFallback=dl;exports.AvatarImage=ll;exports.BUILT_IN_INPUTS=Oa;exports.BackgroundFill=Hp;exports.Badge=ia;exports.Banner=ml;exports.BlinkingCursor=ya;exports.Breadcrumb=Kd;exports.BreadcrumbEllipsis=Qd;exports.BreadcrumbItem=Zd;exports.BreadcrumbLink=Yd;exports.BreadcrumbList=qd;exports.BreadcrumbMenuTrigger=ec;exports.BreadcrumbPage=Xd;exports.BreadcrumbSeparator=Jd;exports.Button=dt;exports.COMPONENT_CONTRACTS=ln;exports.Calendar=la;exports.CalendarDayButton=fl;exports.Callout=$s;exports.CalloutDescription=Ks;exports.CalloutTitle=Us;exports.Card=hl;exports.CardContent=xl;exports.CardDescription=yl;exports.CardFooter=wl;exports.CardHeader=bl;exports.CardTitle=vl;exports.Carousel=_u;exports.CarouselArrows=un;exports.CarouselDots=pn;exports.CarouselNext=Cr;exports.CarouselPrev=kr;exports.CarouselSlide=da;exports.CarouselVideoSlide=cn;exports.ChartContainer=lc;exports.ChartLegend=Df;exports.ChartLegendContent=pc;exports.ChartStyle=dc;exports.ChartTooltip=Lf;exports.ChartTooltipContent=cc;exports.Checkbox=Rl;exports.CheckboxCard=Cl;exports.Code=Il;exports.Composer=Bl;exports.ComposerReply=lg;exports.DEMO_SPEED_PRESETS=Qo;exports.DatePicker=ug;exports.DateRangePicker=mg;exports.DemoStage=Ll;exports.Dialog=fg;exports.DialogClose=bg;exports.DialogContent=Gl;exports.DialogDescription=Ul;exports.DialogFooter=jl;exports.DialogHeader=Wl;exports.DialogOverlay=hn;exports.DialogPortal=Vl;exports.DialogTitle=$l;exports.DialogTrigger=hg;exports.DropdownMenu=wg;exports.DropdownMenuCheckboxItem=Jl;exports.DropdownMenuContent=Yl;exports.DropdownMenuGroup=Sg;exports.DropdownMenuItem=Xl;exports.DropdownMenuLabel=ed;exports.DropdownMenuPortal=kg;exports.DropdownMenuRadioGroup=Tg;exports.DropdownMenuRadioItem=Ql;exports.DropdownMenuSeparator=td;exports.DropdownMenuShortcut=od;exports.DropdownMenuSub=Cg;exports.DropdownMenuSubContent=Zl;exports.DropdownMenuSubTrigger=ql;exports.DropdownMenuTrigger=Rg;exports.FILL_TOKENS=tn;exports.FRAGMENT_HEADER=Sp;exports.Field=Vu;exports.FieldDescription=pa;exports.FieldLabel=ca;exports.FieldTrailing=ua;exports.FillPicker=zp;exports.Flex=md;exports.GRADE_PRE_HYDRATION_SCRIPT=uh;exports.GradeLoader=rp;exports.GradeModeSwitcher=zv;exports.GradeThemeProvider=mh;exports.GradeThemeSwitcher=Dv;exports.Grid=pd;exports.Input=oo;exports.Label=Ao;exports.LenisProvider=Pv;exports.Logo=ib;exports.MOTION_ATTR=Mr;exports.Map=ni;exports.MapMarker=ii;exports.MediaSurface=jt;exports.MediaSurfaceContract=rn;exports.Message=lm;exports.Motion=Hb;exports.MotionOverlay=gi;exports.MotionScene=Cb;exports.MotionScreen=pp;exports.MotionText=mp;exports.MultiSelect=nd;exports.Popover=Ot;exports.PopoverAnchor=dg;exports.PopoverContent=Ht;exports.PopoverTrigger=Vt;exports.Progress=ad;exports.RadioCard=kl;exports.RadioGroup=id;exports.RadioGroupItem=sd;exports.ResizableHandle=Gg;exports.ResizablePanel=Vg;exports.ResizablePanelGroup=Og;exports.Reveal=Dl;exports.RivePlayer=tp;exports.Row=dd;exports.ScreenAnimator=ci;exports.ScrollArea=gd;exports.ScrollBar=kn;exports.Select=Cn;exports.SelectContent=Ea;exports.SelectGroup=Xg;exports.SelectItem=La;exports.SelectLabel=vd;exports.SelectScrollDownButton=Mn;exports.SelectScrollUpButton=Pn;exports.SelectSeparator=yd;exports.SelectTrigger=Na;exports.SelectValue=Tn;exports.Separator=Hr;exports.ShaderCompileError=lr;exports.ShaderControls=lv;exports.ShaderPresetPicker=yi;exports.ShaderPresetPreview=en;exports.Sheet=of;exports.SheetClose=af;exports.SheetContent=wd;exports.SheetDescription=Cd;exports.SheetFooter=Sd;exports.SheetHeader=Rd;exports.SheetOverlay=Nn;exports.SheetPortal=xd;exports.SheetTitle=kd;exports.SheetTrigger=rf;exports.Sidebar=vo;exports.SidebarContent=Vn;exports.SidebarFooter=Gn;exports.SidebarHeader=On;exports.SidebarItem=jn;exports.SidebarSection=Wn;exports.SidebarTreeItem=$n;exports.Skeleton=sf;exports.Slider=Ho;exports.Sortable=yf;exports.SortableGroup=Ln;exports.SortableHandle=An;exports.SortableItem=Dn;exports.Stack=Fd;exports.Switch=Ia;exports.SwitchCard=Tl;exports.Table=_d;exports.TableBody=Od;exports.TableCaption=$d;exports.TableCell=jd;exports.TableFooter=Vd;exports.TableHead=Wd;exports.TableHeader=Bd;exports.TableRow=Gd;exports.Tabs=Pf;exports.TabsContent=nc;exports.TabsList=rc;exports.TabsTrigger=ac;exports.Textarea=uc;exports.ThemeToggle=Ov;exports.ThreeScene=dr;exports.Toggle=gc;exports.ToggleGroup=_o;exports.ToggleGroupItem=Bo;exports.Toolbar=bc;exports.ToolbarSlot=vc;exports.Tooltip=Fo;exports.TooltipContent=bo;exports.TooltipProvider=Hn;exports.TooltipTrigger=zo;exports.VideoPlayer=ep;exports.appShellAsideVariants=Xs;exports.appShellFooterVariants=Qs;exports.appShellHeaderVariants=Zs;exports.appShellMainVariants=Js;exports.appShellNavVariants=Ys;exports.applyThemeToRoot=Va;exports.badgeVariants=pl;exports.bannerVariants=ul;exports.buildFragmentShaderScene=ao;exports.builtInThemes=Wt;exports.buttonVariants=Sr;exports.calloutVariants=js;exports.calmInput=jr;exports.cn=d;exports.defaultPostPreset=Za;exports.defaultThemeId=ir;exports.deleteUserTheme=ei;exports.demoSleep=we;exports.demoTypeText=ba;exports.duplicateTheme=ph;exports.energyInput=Kn;exports.flexVariants=ud;exports.generateTheme=Oo;exports.getComponentContract=gu;exports.getTheme=Vo;exports.gridVariants=cd;exports.listContractedComponents=fu;exports.listThemes=Jn;exports.listUserThemes=Lc;exports.loadUserThemeInput=Qn;exports.postPresets=Yr;exports.rowVariants=ld;exports.saveUserTheme=Wa;exports.sceneRegistry=Kr;exports.setMotion=Ku;exports.shaderPresetById=Zr;exports.shaderPresets=qr;exports.shellVariants=qs;exports.stackVariants=Hd;exports.themeToCSSVars=Zn;exports.toggleVariants=mc;exports.useCarouselApi=Bu;exports.useGradeTheme=ri;exports.useMaybeGradeTheme=Go;exports.useMotionScene=mi;exports.usePageActive=Nr;exports.usePrefersReducedMotion=uo;exports.useReducedMotion=Jt;exports.useScriptedDemo=mo;//# sourceMappingURL=index.js.map
581
758
  //# sourceMappingURL=index.js.map