@gradeui/ui 3.1.0 → 3.2.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.mjs CHANGED
@@ -1,5 +1,5 @@
1
1
  "use client";
2
- import {z}from'zod';import*as y from'react';import {useRef,useEffect}from'react';import*as Et from'@radix-ui/react-accordion';import {ChevronDown,X,ChevronLeft,ChevronRight,Check,Circle,Search,XCircle,ChevronUp,Image,Box,Code2,Music,Video,UtensilsCrossed,Package,Film,Mountain,User,Book,Gamepad2,Clapperboard,Tv as Tv$1,Disc3,Pause,Play,Paperclip,Square,Send,Bold,Italic,Underline,Strikethrough,Code,Heading1,Heading2,Heading3,Quote,List,ListOrdered,ChevronLeftIcon,ChevronRightIcon,ChevronDownIcon,CalendarIcon,GripVertical,MoreHorizontal,Plus,Minus,Blend,Grid3x3,Sparkles,Palette,Download,Trash2,SunDim,Sun,Moon,MoonStar}from'lucide-react';import {clsx}from'clsx';import {twMerge}from'tailwind-merge';import {cva}from'class-variance-authority';import {Slot}from'@radix-ui/react-slot';import*as uo from'@radix-ui/react-avatar';import {getDefaultClassNames,DayPicker}from'react-day-picker';import Rm from'embla-carousel-react';import*as zr from'@radix-ui/react-checkbox';import*as No from'@radix-ui/react-radio-group';import*as Zr from'@radix-ui/react-switch';import {Highlight}from'prism-react-renderer';import {useInView,motion,AnimatePresence,useReducedMotion}from'motion/react';import {LexicalComposer}from'@lexical/react/LexicalComposer';import {RichTextPlugin}from'@lexical/react/LexicalRichTextPlugin';import {ContentEditable}from'@lexical/react/LexicalContentEditable';import {LexicalErrorBoundary}from'@lexical/react/LexicalErrorBoundary';import {HistoryPlugin}from'@lexical/react/LexicalHistoryPlugin';import {OnChangePlugin}from'@lexical/react/LexicalOnChangePlugin';import {ListPlugin}from'@lexical/react/LexicalListPlugin';import {LinkPlugin}from'@lexical/react/LexicalLinkPlugin';import {useLexicalComposerContext}from'@lexical/react/LexicalComposerContext';import {HeadingNode,QuoteNode,$createHeadingNode,$createQuoteNode}from'@lexical/rich-text';import {ListNode,ListItemNode,INSERT_UNORDERED_LIST_COMMAND,INSERT_ORDERED_LIST_COMMAND}from'@lexical/list';import {LinkNode,AutoLinkNode}from'@lexical/link';import {CodeNode,CodeHighlightNode}from'@lexical/code';import {$setBlocksType}from'@lexical/selection';import {mergeRegister}from'@lexical/utils';import {$getSelection,$isRangeSelection,$getRoot,$createParagraphNode,$createTextNode,FORMAT_TEXT_COMMAND,KEY_ENTER_COMMAND,COMMAND_PRIORITY_HIGH}from'lexical';import {BeautifulMentionNode,BeautifulMentionsPlugin,$createBeautifulMentionNode}from'lexical-beautiful-mentions';import {format}from'date-fns';import*as Vt from'@radix-ui/react-popover';import*as Fe from'@radix-ui/react-dialog';import*as ne from'@radix-ui/react-dropdown-menu';import*as Rn from'@radix-ui/react-label';import*as $r from'@radix-ui/react-progress';import {Command}from'cmdk';import*as En from'@radix-ui/react-separator';import*as hr from'react-resizable-panels';import*as Lt from'@radix-ui/react-scroll-area';import*as de from'@radix-ui/react-select';import*as yo from'@radix-ui/react-slider';import {useSensors,useSensor,PointerSensor,KeyboardSensor,DndContext,closestCorners,closestCenter,useDroppable}from'@dnd-kit/core';import {sortableKeyboardCoordinates,arrayMove,SortableContext,rectSortingStrategy,horizontalListSortingStrategy,verticalListSortingStrategy,useSortable}from'@dnd-kit/sortable';import {CSS}from'@dnd-kit/utilities';import*as Ut from'@radix-ui/react-tabs';import*as Wt from'@radix-ui/react-tooltip';import*as br from'recharts';import*as $n from'@radix-ui/react-toggle';import*as vr from'@radix-ui/react-toggle-group';import {GDS_MODULAR_SCALES,GDS_TYPE_SIZE_NAMES,modularTypeSizes}from'@gradeui/core';import {createPortal}from'react-dom';import*as De from'three';import {EffectComposer,RenderPass,BloomEffect,KernelSize,NoiseEffect,BlendFunction,ScanlineEffect,VignetteEffect,ChromaticAberrationEffect,GlitchEffect,GlitchMode,EffectPass}from'postprocessing';import Ly from'lenis';var Au=Object.defineProperty;var Cr=(e,t)=>()=>(e&&(t=e(e=0)),t);var da=(e,t)=>{for(var o in t)Au(e,o,{get:t[o],enumerable:true});};var en,pp,up=Cr(()=>{en="2pMfyvhpuKonkf7h8HzH",pp=()=>en!=="YOUR_KEY_HERE"&&en.length>0;});var gp={};da(gp,{createMaplibreAdapter:()=>vb});function bb(){if(typeof document>"u"||document.getElementById(fp))return;let e=document.createElement("link");e.id=fp,e.rel="stylesheet",e.href=hb,document.head.appendChild(e);}var gb,mp,hb,fp,vb,hp=Cr(()=>{up();gb={light:"dataviz-light",dark:"dataviz-dark",satellite:"satellite"},mp=(e,t)=>`https://api.maptiler.com/maps/${gb[e]}/style.json?key=${encodeURIComponent(t)}`,hb="https://unpkg.com/maplibre-gl@4/dist/maplibre-gl.css",fp="gds-maplibre-gl-css";vb=async(e,t,o)=>{bb();let r;try{r=await import('maplibre-gl'),r.default&&(r=r.default);}catch(d){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:d}),d}let n=t.tilerKey??en;process.env.NODE_ENV!=="production"&&!t.tilerKey&&!pp()&&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??mp(t.appearance,n),i=new r.Map({container:e,style:a,center:t.center,zoom:t.zoom,interactive:t.interactive,attributionControl:{compact:true}});(t.tools==="zoom"||t.tools==="auto"&&t.interactive)&&i.addControl(new r.NavigationControl({showCompass:false}),t.toolsPosition),t.bounds&&i.fitBounds([t.bounds[0],t.bounds[1]],{animate:false}),await new Promise(d=>{i.once("load",()=>d());}),o.onLoad(),i.on("error",d=>{let p=String(d?.error?.message??d?.message??"MapLibre error"),m=p.toLowerCase().includes("style");o.onError({code:m?"style-load-failed":"tile-load-failed",message:p,cause:d?.error??d});});let s=new globalThis.Map;return {setCenter:d=>i.setCenter(d),setZoom:d=>i.setZoom(d),setBounds:(d,p)=>i.fitBounds([d,p],{animate:false}),setAppearance:d=>{let p=t.styleUrl??mp(d,n);i.setStyle(p,{diff:false});},setInteractive:d=>{let p=["scrollZoom","boxZoom","dragRotate","dragPan","keyboard","doubleClickZoom","touchZoomRotate"];for(let m of p){let u=i[m];u&&(d?u.enable():u.disable());}},flyTo:(d,p)=>i.flyTo({center:d,zoom:p?.zoom,duration:p?.durationMs??800}),panTo:(d,p)=>i.panTo(d,{duration:p?.durationMs??600}),fitBounds:(d,p)=>{if(d.length===0)return;let m=1/0,u=1/0,b=-1/0,f=-1/0;for(let[h,g]of d)h<m&&(m=h),g<u&&(u=g),h>b&&(b=h),g>f&&(f=g);i.fitBounds([[m,u],[b,f]],{padding:p?.paddingPx??40,duration:p?.durationMs??800});},getCenter:()=>{let d=i.getCenter();return [d.lng,d.lat]},getZoom:()=>i.getZoom(),getBounds:()=>{let d=i.getBounds();return [[d.getWest(),d.getSouth()],[d.getEast(),d.getNorth()]]},addMarker:(d,p,m)=>{let u=document.createElement("div");u.dataset.gdsPart="map-marker",u.dataset.gdsState="idle",u.style.cursor="pointer",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 r.Marker({element:u,anchor:m==="center"?"center":"bottom"}).setLngLat(p).addTo(i),f={element:u,coords:p,setHovered:h=>{u.dataset.gdsState=h?"hovered":"idle",u.style.zIndex=h?"10":"1";},setPosition:h=>{f.coords=h,b.setLngLat(h);},remove:()=>{b.remove(),s.delete(d);}};return s.set(d,{marker:b,handle:f}),f},destroy:()=>{s.forEach(({marker:d})=>d.remove()),s.clear(),i.remove();},instance:i}};});var yp={};da(yp,{createMapboxAdapter:()=>wb});function xb(){if(typeof document>"u"||document.getElementById(vp))return;let e=document.createElement("link");e.id=vp,e.rel="stylesheet",e.href=yb,document.head.appendChild(e);}var bp,yb,vp,wb,xp=Cr(()=>{bp={light:"mapbox://styles/mapbox/light-v11",dark:"mapbox://styles/mapbox/dark-v11",satellite:"mapbox://styles/mapbox/satellite-streets-v12"},yb="https://unpkg.com/mapbox-gl@3/dist/mapbox-gl.css",vp="gds-mapbox-gl-css";wb=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");xb();let r;try{r=await import('mapbox-gl'),r.default&&(r=r.default);}catch(l){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:l}),l}r.accessToken=t.accessToken;let n=t.styleUrl??bp[t.appearance],a=new r.Map({container:e,style:n,center:t.center,zoom:t.zoom,interactive:t.interactive});(t.tools==="zoom"||t.tools==="auto"&&t.interactive)&&a.addControl(new r.NavigationControl({showCompass:false}),t.toolsPosition),t.bounds&&a.fitBounds([t.bounds[0],t.bounds[1]],{animate:false}),await new Promise(l=>{a.once("load",()=>l());}),o.onLoad(),a.on("error",l=>{let d=String(l?.error?.message??l?.message??"Mapbox error"),p=d.toLowerCase().includes("style");o.onError({code:p?"style-load-failed":"tile-load-failed",message:d,cause:l?.error??l});});let i=new globalThis.Map;return {setCenter:l=>a.setCenter(l),setZoom:l=>a.setZoom(l),setBounds:(l,d)=>a.fitBounds([l,d],{animate:false}),setAppearance:l=>{let d=t.styleUrl??bp[l];a.setStyle(d,{diff:false});},setInteractive:l=>{let d=["scrollZoom","boxZoom","dragRotate","dragPan","keyboard","doubleClickZoom","touchZoomRotate"];for(let p of d){let m=a[p];m&&(l?m.enable():m.disable());}},flyTo:(l,d)=>a.flyTo({center:l,zoom:d?.zoom,duration:d?.durationMs??800}),panTo:(l,d)=>a.panTo(l,{duration:d?.durationMs??600}),fitBounds:(l,d)=>{if(l.length===0)return;let p=1/0,m=1/0,u=-1/0,b=-1/0;for(let[f,h]of l)f<p&&(p=f),h<m&&(m=h),f>u&&(u=f),h>b&&(b=h);a.fitBounds([[p,m],[u,b]],{padding:d?.paddingPx??40,duration:d?.durationMs??800});},getCenter:()=>{let l=a.getCenter();return [l.lng,l.lat]},getZoom:()=>a.getZoom(),getBounds:()=>{let l=a.getBounds();return [[l.getWest(),l.getSouth()],[l.getEast(),l.getNorth()]]},addMarker:(l,d,p)=>{let m=document.createElement("div");m.dataset.gdsPart="map-marker",m.dataset.gdsState="idle",m.style.cursor="pointer",m.addEventListener("mouseenter",()=>o.onMarkerHover(l)),m.addEventListener("mouseleave",()=>o.onMarkerHover(null)),m.addEventListener("click",f=>{o.onMarkerClick(l,b.coords,f);});let u=new r.Marker({element:m,anchor:p==="center"?"center":"bottom"}).setLngLat(d).addTo(a),b={element:m,coords:d,setHovered:f=>{m.dataset.gdsState=f?"hovered":"idle",m.style.zIndex=f?"10":"1";},setPosition:f=>{b.coords=f,u.setLngLat(f);},remove:()=>{u.remove(),i.delete(l);}};return i.set(l,{marker:u,handle:b}),b},destroy:()=>{i.forEach(({marker:l})=>l.remove()),i.clear(),a.remove();},instance:a}};});var kp={};da(kp,{createGoogleAdapter:()=>Rb});var kb,Sb,wp,Rb,Sp=Cr(()=>{kb=[{featureType:"poi",stylers:[{visibility:"off"}]},{featureType:"transit",stylers:[{visibility:"simplified"}]}],Sb=[{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"}]}],wp=e=>e==="dark"?Sb:kb,Rb=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 u=await import('@googlemaps/js-api-loader');r=u.Loader??u.default?.Loader;}catch(u){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:u}),u}let n=new r({apiKey:t.apiKey,version:"weekly",libraries:["maps","marker"]}),a;try{a=await n.load();}catch(u){throw o.onError({code:"provider-init-failed",message:"@gradeui/ui Map: Google Maps loader failed.",cause:u}),u}let i=t.appearance==="satellite",s=t.tools==="zoom"||t.tools==="auto"&&t.interactive,l={"top-left":a.maps.ControlPosition.LEFT_TOP,"top-right":a.maps.ControlPosition.RIGHT_TOP,"bottom-left":a.maps.ControlPosition.LEFT_BOTTOM,"bottom-right":a.maps.ControlPosition.RIGHT_BOTTOM},d=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:wp(t.appearance==="dark"?"dark":"light"),disableDefaultUI:true,zoomControl:s,zoomControlOptions:{position:l[t.toolsPosition]},gestureHandling:t.interactive?"auto":"none",keyboardShortcuts:t.interactive});if(t.bounds){let u=new a.maps.LatLngBounds({lat:t.bounds[0][1],lng:t.bounds[0][0]},{lat:t.bounds[1][1],lng:t.bounds[1][0]});d.fitBounds(u);}await new Promise(u=>{a.maps.event.addListenerOnce(d,"idle",()=>u());}),o.onLoad();let p=new globalThis.Map;return {setCenter:u=>d.setCenter({lat:u[1],lng:u[0]}),setZoom:u=>d.setZoom(u),setBounds:(u,b)=>{let f=new a.maps.LatLngBounds({lat:u[1],lng:u[0]},{lat:b[1],lng:b[0]});d.fitBounds(f);},setAppearance:u=>{u==="satellite"?(d.setMapTypeId(a.maps.MapTypeId.HYBRID),d.setOptions({styles:void 0})):(d.setMapTypeId(a.maps.MapTypeId.ROADMAP),d.setOptions({styles:wp(u)}));},setInteractive:u=>{d.setOptions({zoomControl:t.tools==="zoom"||t.tools==="auto"&&u,gestureHandling:u?"auto":"none",keyboardShortcuts:u});},flyTo:(u,b)=>{d.panTo({lat:u[1],lng:u[0]}),b?.zoom!=null&&d.setZoom(b.zoom);},panTo:u=>d.panTo({lat:u[1],lng:u[0]}),fitBounds:(u,b)=>{if(u.length===0)return;let f=new a.maps.LatLngBounds;for(let[h,g]of u)f.extend({lat:g,lng:h});d.fitBounds(f,b?.paddingPx??40);},getCenter:()=>{let u=d.getCenter();return u?[u.lng(),u.lat()]:[0,0]},getZoom:()=>d.getZoom()??0,getBounds:()=>{let u=d.getBounds();if(!u)return [[0,0],[0,0]];let b=u.getSouthWest(),f=u.getNorthEast();return [[b.lng(),b.lat()],[f.lng(),f.lat()]]},addMarker:(u,b,f)=>{let h=document.createElement("div");h.dataset.gdsPart="map-marker",h.dataset.gdsState="idle",h.style.cursor="pointer",f==="center"&&(h.style.transform="translateY(50%)"),h.addEventListener("mouseenter",()=>o.onMarkerHover(u)),h.addEventListener("mouseleave",()=>o.onMarkerHover(null)),h.addEventListener("click",k=>{o.onMarkerClick(u,v.coords,k);});let g=new a.maps.marker.AdvancedMarkerElement({map:d,position:{lat:b[1],lng:b[0]},content:h}),v={element:h,coords:b,setHovered:k=>{h.dataset.gdsState=k?"hovered":"idle",g.zIndex=k?10:1;},setPosition:k=>{v.coords=k,g.position={lat:k[1],lng:k[0]};},remove:()=>{g.map=null,p.delete(u);}};return p.set(u,{marker:g,handle:v}),v},destroy:()=>{p.forEach(({marker:u})=>{u.map=null;}),p.clear();},instance:d}};});var Tp={};da(Tp,{createLeafletAdapter:()=>Nb});function Tb(){if(typeof document>"u"||globalThis.__gradeLeafletCssBundled||document.getElementById(Rp))return;let e=document.createElement("link");e.id=Rp,e.rel="stylesheet",e.href=Cb,document.head.appendChild(e);}var Cb,Rp,Cp,Pb,Mb,Nb,Pp=Cr(()=>{Cb="https://unpkg.com/leaflet@1.9.4/dist/leaflet.css",Rp="gds-leaflet-css";Cp={light:"rastertiles/voyager",dark:"rastertiles/dark_all",satellite:"rastertiles/voyager"},Pb=e=>`https://{s}.basemaps.cartocdn.com/${e}/{z}/{x}/{y}{r}.png`,Mb="\xA9 OpenStreetMap contributors \xA9 CARTO",Nb=async(e,t,o)=>{Tb();let r;try{r=await import('leaflet'),r.default&&(r=r.default);}catch(f){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:f}),f}let n=f=>[f[1],f[0]],a=t.tools==="zoom"||t.tools==="auto"&&t.interactive,i={"top-left":"topleft","top-right":"topright","bottom-left":"bottomleft","bottom-right":"bottomright"},s=r.map(e,{center:n(t.center),zoom:t.zoom,zoomControl:false,attributionControl:true,dragging:t.interactive,scrollWheelZoom:t.interactive,doubleClickZoom:t.interactive,boxZoom:t.interactive,keyboard:t.interactive,touchZoom:t.interactive});a&&r.control.zoom({position:i[t.toolsPosition]??"topleft"}).addTo(s);let l=f=>{let h=r.tileLayer(Pb(Cp[f]??Cp.light),{maxZoom:20,subdomains:"abcd",detectRetina:true,attribution:Mb,crossOrigin:true});return h.on("tileerror",()=>o.onError({code:"tile-load-failed",message:"map tile failed to load (is the tile host allowed by CSP?)"})),h.addTo(s),h},d=l(t.appearance),p=f=>{d&&s.removeLayer(d),d=l(f);};t.bounds&&s.fitBounds([n(t.bounds[0]),n(t.bounds[1])],{animate:false}),o.onLoad();let m=typeof ResizeObserver<"u"?new ResizeObserver(()=>s.invalidateSize(false)):null;m?.observe(e),requestAnimationFrame(()=>s.invalidateSize(false)),window.setTimeout(()=>s.invalidateSize(false),200),window.setTimeout(()=>s.invalidateSize(false),600);let u=new globalThis.Map;return {setCenter:f=>s.panTo(n(f),{animate:false}),setZoom:f=>s.setZoom(f),setBounds:(f,h)=>s.fitBounds([n(f),n(h)],{animate:false}),setAppearance:f=>p(f),setInteractive:f=>{let h=["dragging","scrollWheelZoom","doubleClickZoom","boxZoom","keyboard","touchZoom"];for(let g of h){let v=s[g];v&&(f?v.enable():v.disable());}},flyTo:(f,h)=>s.flyTo(n(f),h?.zoom??s.getZoom(),{duration:(h?.durationMs??800)/1e3}),panTo:(f,h)=>s.panTo(n(f),{duration:(h?.durationMs??600)/1e3}),fitBounds:(f,h)=>{if(f.length===0)return;let g=h?.paddingPx??40;s.fitBounds(f.map(n),{padding:[g,g],duration:(h?.durationMs??800)/1e3});},getCenter:()=>{let f=s.getCenter();return [f.lng,f.lat]},getZoom:()=>s.getZoom(),getBounds:()=>{let f=s.getBounds(),h=f.getSouthWest(),g=f.getNorthEast();return [[h.lng,h.lat],[g.lng,g.lat]]},addMarker:(f,h,g)=>{let v=document.createElement("div");v.dataset.gdsPart="map-marker",v.dataset.gdsState="idle",v.style.position="absolute",v.style.cursor="pointer",v.style.transform=g==="center"?"translate(-50%, -50%)":"translate(-50%, -100%)",v.addEventListener("mouseenter",()=>o.onMarkerHover(f)),v.addEventListener("mouseleave",()=>o.onMarkerHover(null)),v.addEventListener("click",T=>o.onMarkerClick(f,S.coords,T));let k=r.divIcon({className:"gds-leaflet-marker",html:"",iconSize:[0,0],iconAnchor:[0,0]}),x=r.marker(n(h),{icon:k,interactive:true,keyboard:false}).addTo(s),w=x.getElement();w&&(w.style.pointerEvents="auto",w.appendChild(v));let S={element:v,coords:h,setHovered:T=>{v.dataset.gdsState=T?"hovered":"idle",w&&(w.style.zIndex=T?"1000":"");},setPosition:T=>{S.coords=T,x.setLatLng(n(T));},remove:()=>{s.removeLayer(x),u.delete(f);}};return u.set(f,{marker:x,handle:S}),S},destroy:()=>{m?.disconnect(),u.forEach(({marker:f})=>s.removeLayer(f)),u.clear(),s.remove();},instance:s}};});var Gi={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:z.enum(["single","multiple"]),design:"knob",description:"single keeps one open at a time, multiple lets several be open at once"},collapsible:{schema:z.boolean().optional(),design:"knob",description:'only valid with type="single"; allows the open item to be toggled shut'},defaultValue:{schema:z.union([z.string(),z.array(z.string())]).optional(),design:"knob",description:"initial open item(s)"},value:{schema:z.union([z.string(),z.array(z.string())]).optional(),design:"knob",description:"controlled"},onValueChange:{schema:z.unknown().optional(),design:"event"},children:{schema:z.unknown().optional(),design:"plumbing",description:"the row label users click to expand"}}};var Wi={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:z.unknown().optional(),design:"plumbing",description:'`{ id, role: "user" | "assistant", content, timestamp, thinking?, steps?, usage?, refs?, actions?, duration? }`; defaults to empty'},onSendMessage:{schema:z.unknown().optional(),design:"event",description:"fires when the user submits via the default composer; ignored if `composerSlot` is set"},isLoading:{schema:z.boolean().optional(),design:"knob",description:"shows a typing indicator at the bottom of the message list"},placeholder:{schema:z.string().optional(),design:"content",description:"composer placeholder text (ignored if `composerSlot` is set)"},title:{schema:z.string().optional(),design:"plumbing",description:'header title; defaults to "AI Assistant"'},titleIcon:{schema:z.unknown().optional(),design:"plumbing",description:"optional icon rendered before the title (e.g. `<Sparkles />`)"},headerTokens:{schema: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:z.unknown().optional(),design:"plumbing",description:"optional arbitrary content appended after `headerTokens` on the right of the header"},showUsage:{schema:z.boolean().optional(),design:"knob",description:"show the per-turn `usage` strip below the assistant bubble; default false"},showRefs:{schema:z.boolean().optional(),design:"knob",description:"show the per-turn `refs` strip below the assistant bubble; default false"},showActions:{schema:z.boolean().optional(),design:"knob",description:"render per-turn `actions` chips when a message has them; default true"},showDuration:{schema: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: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: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:z.string().optional(),design:"content",description:'override the "Thinking" label in the loading indicator'},suggestedPrompts:{schema:z.unknown().optional(),design:"plumbing",description:"empty-state quick prompts (ignored if `emptyStateSlot` is set)"},emptyStateSlot:{schema:z.unknown().optional(),design:"plumbing",description:"replaces the default empty state entirely"},errorSlot:{schema:z.unknown().optional(),design:"plumbing",description:"rendered after the messages list (typically an error banner)"},composerAboveSlot:{schema:z.unknown().optional(),design:"plumbing",description:"rendered between the messages and the composer (selection chip, settings panel)"},composerBelowSlot:{schema:z.unknown().optional(),design:"plumbing",description:"rendered below the composer (disclaimer, char counter)"},composerSlot:{schema:z.unknown().optional(),design:"plumbing",description:"full override of the composer; when provided, `onSendMessage` + `placeholder` are unused"},bare:{schema: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: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:z.string().optional(),design:"plumbing"}}};var Ui={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:z.string(),design:"content",description:"controlled textarea value"},onChange:{schema:z.unknown(),design:"event",description:"fires for every textarea change"},onSend:{schema: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:z.boolean().optional(),design:"knob",description:"disables the textarea + paperclip and swaps Send for Stop"},onStop:{schema:z.unknown().optional(),design:"event",description:"fires when the user clicks Stop; without this, Stop renders disabled"},placeholder:{schema:z.string().optional(),design:"content"},maxLength:{schema:z.number().optional(),design:"knob",description:"hard cap passed to the underlying `<textarea>`"},showHint:{schema: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:z.string().optional(),design:"plumbing"}}};var $i={name:"AppShell",description:`The top-level page scaffold for any app-like or marketing layout. Reach for AppShell
2
+ import {z}from'zod';import*as y from'react';import {useRef,useEffect}from'react';import*as Ft from'@radix-ui/react-accordion';import {ChevronDown,X,ChevronLeft,ChevronRight,Check,Circle,Search,XCircle,ChevronsUpDown,ChevronUp,Image,Box,Code2,Music,Video,UtensilsCrossed,Package,Film,Mountain,User,Book,Gamepad2,Clapperboard,Tv,Disc3,Pause,Play,Paperclip,Square,Send,Bold,Italic,Underline,Strikethrough,Code,Heading1,Heading2,Heading3,Quote,List,ListOrdered,ChevronLeftIcon,ChevronRightIcon,ChevronDownIcon,CalendarIcon,Grid3x3,LayoutGrid,Rows3,SlidersHorizontal,ArrowUp,ArrowDown,ArrowUpDown,GripVertical,MoreHorizontal,Plus,Minus,Blend,Sparkles,Palette,Download,Trash2,SunDim,Sun,Moon,MoonStar}from'lucide-react';import {clsx}from'clsx';import {twMerge}from'tailwind-merge';import {cva}from'class-variance-authority';import {Slot}from'@radix-ui/react-slot';import*as bo from'@radix-ui/react-avatar';import {getDefaultClassNames,DayPicker}from'react-day-picker';import Um from'embla-carousel-react';import*as qa from'@radix-ui/react-checkbox';import*as _o from'@radix-ui/react-radio-group';import*as gr from'@radix-ui/react-switch';import {Highlight}from'prism-react-renderer';import {useInView,motion,AnimatePresence,useReducedMotion}from'motion/react';import {LexicalComposer}from'@lexical/react/LexicalComposer';import {RichTextPlugin}from'@lexical/react/LexicalRichTextPlugin';import {ContentEditable}from'@lexical/react/LexicalContentEditable';import {LexicalErrorBoundary}from'@lexical/react/LexicalErrorBoundary';import {HistoryPlugin}from'@lexical/react/LexicalHistoryPlugin';import {OnChangePlugin}from'@lexical/react/LexicalOnChangePlugin';import {ListPlugin}from'@lexical/react/LexicalListPlugin';import {LinkPlugin}from'@lexical/react/LexicalLinkPlugin';import {useLexicalComposerContext}from'@lexical/react/LexicalComposerContext';import {HeadingNode,QuoteNode,$createHeadingNode,$createQuoteNode}from'@lexical/rich-text';import {ListNode,ListItemNode,INSERT_UNORDERED_LIST_COMMAND,INSERT_ORDERED_LIST_COMMAND}from'@lexical/list';import {LinkNode,AutoLinkNode}from'@lexical/link';import {CodeNode,CodeHighlightNode}from'@lexical/code';import {$setBlocksType}from'@lexical/selection';import {mergeRegister}from'@lexical/utils';import {$getSelection,$isRangeSelection,$getRoot,$createParagraphNode,$createTextNode,FORMAT_TEXT_COMMAND,KEY_ENTER_COMMAND,COMMAND_PRIORITY_HIGH}from'lexical';import {BeautifulMentionNode,BeautifulMentionsPlugin,$createBeautifulMentionNode}from'lexical-beautiful-mentions';import {format}from'date-fns';import*as Yt from'@radix-ui/react-popover';import*as Be from'@radix-ui/react-dialog';import*as ce from'@radix-ui/react-dropdown-menu';import*as ei from'@radix-ui/react-label';import*as or from'@radix-ui/react-progress';import {Command}from'cmdk';import*as ti from'@radix-ui/react-separator';import {useReactTable,getSortedRowModel,getCoreRowModel}from'@tanstack/react-table';import*as Pa from'@radix-ui/react-toggle-group';import*as oi from'@radix-ui/react-toggle';import*as Zt from'@radix-ui/react-tooltip';import*as Ma from'react-resizable-panels';import*as Vt from'@radix-ui/react-scroll-area';import*as fe from'@radix-ui/react-select';import*as Po from'@radix-ui/react-slider';import {useSensors,useSensor,PointerSensor,KeyboardSensor,DndContext,closestCorners,closestCenter,useDroppable}from'@dnd-kit/core';import {sortableKeyboardCoordinates,arrayMove,SortableContext,rectSortingStrategy,horizontalListSortingStrategy,verticalListSortingStrategy,useSortable}from'@dnd-kit/sortable';import {CSS}from'@dnd-kit/utilities';import*as Xt from'@radix-ui/react-tabs';import*as Na from'recharts';import {GDS_MODULAR_SCALES,GDS_TYPE_SIZE_NAMES,modularTypeSizes}from'@gradeui/core';import {createPortal}from'react-dom';import*as He from'three';import {EffectComposer,RenderPass,BloomEffect,KernelSize,NoiseEffect,BlendFunction,ScanlineEffect,VignetteEffect,ChromaticAberrationEffect,GlitchEffect,GlitchMode,EffectPass}from'postprocessing';import b0 from'lenis';var Ju=Object.defineProperty;var Fa=(e,t)=>()=>(e&&(t=e(e=0)),t);var Pr=(e,t)=>{for(var o in t)Ju(e,o,{get:t[o],enumerable:true});};var Mn,Lp,Dp=Fa(()=>{Mn="2pMfyvhpuKonkf7h8HzH",Lp=()=>Mn!=="YOUR_KEY_HERE"&&Mn.length>0;});var Hp={};Pr(Hp,{createMaplibreAdapter:()=>av});function ov(){if(typeof document>"u"||document.getElementById(Ip))return;let e=document.createElement("link");e.id=Ip,e.rel="stylesheet",e.href=tv,document.head.appendChild(e);}var ev,Ap,tv,Ip,av,Fp=Fa(()=>{Dp();ev={light:"dataviz-light",dark:"dataviz-dark",satellite:"satellite"},Ap=(e,t)=>`https://api.maptiler.com/maps/${ev[e]}/style.json?key=${encodeURIComponent(t)}`,tv="https://unpkg.com/maplibre-gl@4/dist/maplibre-gl.css",Ip="gds-maplibre-gl-css";av=async(e,t,o)=>{ov();let a;try{a=await import('maplibre-gl'),a.default&&(a=a.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??Mn;process.env.NODE_ENV!=="production"&&!t.tilerKey&&!Lp()&&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 r=t.styleUrl??Ap(t.appearance,n),i=new a.Map({container:e,style:r,center:t.center,zoom:t.zoom,interactive:t.interactive,attributionControl:{compact:true}});(t.tools==="zoom"||t.tools==="auto"&&t.interactive)&&i.addControl(new a.NavigationControl({showCompass:false}),t.toolsPosition),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 p=String(c?.error?.message??c?.message??"MapLibre error"),m=p.toLowerCase().includes("style");o.onError({code:m?"style-load-failed":"tile-load-failed",message:p,cause:c?.error??c});});let l=new globalThis.Map;return {setCenter:c=>i.setCenter(c),setZoom:c=>i.setZoom(c),setBounds:(c,p)=>i.fitBounds([c,p],{animate:false}),setAppearance:c=>{let p=t.styleUrl??Ap(c,n);i.setStyle(p,{diff:false});},setInteractive:c=>{let p=["scrollZoom","boxZoom","dragRotate","dragPan","keyboard","doubleClickZoom","touchZoomRotate"];for(let m of p){let u=i[m];u&&(c?u.enable():u.disable());}},flyTo:(c,p)=>i.flyTo({center:c,zoom:p?.zoom,duration:p?.durationMs??800}),panTo:(c,p)=>i.panTo(c,{duration:p?.durationMs??600}),fitBounds:(c,p)=>{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:p?.paddingPx??40,duration:p?.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,p,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 a.Marker({element:u,anchor:m==="center"?"center":"bottom"}).setLngLat(p).addTo(i),h={element:u,coords:p,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(),l.delete(c);}};return l.set(c,{marker:g,handle:h}),h},destroy:()=>{l.forEach(({marker:c})=>c.remove()),l.clear(),i.remove();},instance:i}};});var Vp={};Pr(Vp,{createMapboxAdapter:()=>iv});function nv(){if(typeof document>"u"||document.getElementById(Bp))return;let e=document.createElement("link");e.id=Bp,e.rel="stylesheet",e.href=rv,document.head.appendChild(e);}var zp,rv,Bp,iv,_p=Fa(()=>{zp={light:"mapbox://styles/mapbox/light-v11",dark:"mapbox://styles/mapbox/dark-v11",satellite:"mapbox://styles/mapbox/satellite-streets-v12"},rv="https://unpkg.com/mapbox-gl@3/dist/mapbox-gl.css",Bp="gds-mapbox-gl-css";iv=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");nv();let a;try{a=await import('mapbox-gl'),a.default&&(a=a.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}a.accessToken=t.accessToken;let n=t.styleUrl??zp[t.appearance],r=new a.Map({container:e,style:n,center:t.center,zoom:t.zoom,interactive:t.interactive});(t.tools==="zoom"||t.tools==="auto"&&t.interactive)&&r.addControl(new a.NavigationControl({showCompass:false}),t.toolsPosition),t.bounds&&r.fitBounds([t.bounds[0],t.bounds[1]],{animate:false}),await new Promise(s=>{r.once("load",()=>s());}),o.onLoad(),r.on("error",s=>{let c=String(s?.error?.message??s?.message??"Mapbox error"),p=c.toLowerCase().includes("style");o.onError({code:p?"style-load-failed":"tile-load-failed",message:c,cause:s?.error??s});});let i=new globalThis.Map;return {setCenter:s=>r.setCenter(s),setZoom:s=>r.setZoom(s),setBounds:(s,c)=>r.fitBounds([s,c],{animate:false}),setAppearance:s=>{let c=t.styleUrl??zp[s];r.setStyle(c,{diff:false});},setInteractive:s=>{let c=["scrollZoom","boxZoom","dragRotate","dragPan","keyboard","doubleClickZoom","touchZoomRotate"];for(let p of c){let m=r[p];m&&(s?m.enable():m.disable());}},flyTo:(s,c)=>r.flyTo({center:s,zoom:c?.zoom,duration:c?.durationMs??800}),panTo:(s,c)=>r.panTo(s,{duration:c?.durationMs??600}),fitBounds:(s,c)=>{if(s.length===0)return;let p=1/0,m=1/0,u=-1/0,g=-1/0;for(let[h,f]of s)h<p&&(p=h),f<m&&(m=f),h>u&&(u=h),f>g&&(g=f);r.fitBounds([[p,m],[u,g]],{padding:c?.paddingPx??40,duration:c?.durationMs??800});},getCenter:()=>{let s=r.getCenter();return [s.lng,s.lat]},getZoom:()=>r.getZoom(),getBounds:()=>{let s=r.getBounds();return [[s.getWest(),s.getSouth()],[s.getEast(),s.getNorth()]]},addMarker:(s,c,p)=>{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 a.Marker({element:m,anchor:p==="center"?"center":"bottom"}).setLngLat(c).addTo(r),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(),r.remove();},instance:r}};});var Gp={};Pr(Gp,{createGoogleAdapter:()=>cv});var sv,lv,Op,cv,Wp=Fa(()=>{sv=[{featureType:"poi",stylers:[{visibility:"off"}]},{featureType:"transit",stylers:[{visibility:"simplified"}]}],lv=[{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"}]}],Op=e=>e==="dark"?lv:sv,cv=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 a;try{let u=await import('@googlemaps/js-api-loader');a=u.Loader??u.default?.Loader;}catch(u){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:u}),u}let n=new a({apiKey:t.apiKey,version:"weekly",libraries:["maps","marker"]}),r;try{r=await n.load();}catch(u){throw o.onError({code:"provider-init-failed",message:"@gradeui/ui Map: Google Maps loader failed.",cause:u}),u}let i=t.appearance==="satellite",l=t.tools==="zoom"||t.tools==="auto"&&t.interactive,s={"top-left":r.maps.ControlPosition.LEFT_TOP,"top-right":r.maps.ControlPosition.RIGHT_TOP,"bottom-left":r.maps.ControlPosition.LEFT_BOTTOM,"bottom-right":r.maps.ControlPosition.RIGHT_BOTTOM},c=new r.maps.Map(e,{center:{lat:t.center[1],lng:t.center[0]},zoom:t.zoom,mapTypeId:i?r.maps.MapTypeId.HYBRID:r.maps.MapTypeId.ROADMAP,mapId:t.mapId,styles:i?void 0:Op(t.appearance==="dark"?"dark":"light"),disableDefaultUI:true,zoomControl:l,zoomControlOptions:{position:s[t.toolsPosition]},gestureHandling:t.interactive?"auto":"none",keyboardShortcuts:t.interactive});if(t.bounds){let u=new r.maps.LatLngBounds({lat:t.bounds[0][1],lng:t.bounds[0][0]},{lat:t.bounds[1][1],lng:t.bounds[1][0]});c.fitBounds(u);}await new Promise(u=>{r.maps.event.addListenerOnce(c,"idle",()=>u());}),o.onLoad();let p=new globalThis.Map;return {setCenter:u=>c.setCenter({lat:u[1],lng:u[0]}),setZoom:u=>c.setZoom(u),setBounds:(u,g)=>{let h=new r.maps.LatLngBounds({lat:u[1],lng:u[0]},{lat:g[1],lng:g[0]});c.fitBounds(h);},setAppearance:u=>{u==="satellite"?(c.setMapTypeId(r.maps.MapTypeId.HYBRID),c.setOptions({styles:void 0})):(c.setMapTypeId(r.maps.MapTypeId.ROADMAP),c.setOptions({styles:Op(u)}));},setInteractive:u=>{c.setOptions({zoomControl:t.tools==="zoom"||t.tools==="auto"&&u,gestureHandling:u?"auto":"none",keyboardShortcuts:u});},flyTo:(u,g)=>{c.panTo({lat:u[1],lng:u[0]}),g?.zoom!=null&&c.setZoom(g.zoom);},panTo:u=>c.panTo({lat:u[1],lng:u[0]}),fitBounds:(u,g)=>{if(u.length===0)return;let h=new r.maps.LatLngBounds;for(let[f,b]of u)h.extend({lat:b,lng:f});c.fitBounds(h,g?.paddingPx??40);},getCenter:()=>{let u=c.getCenter();return u?[u.lng(),u.lat()]:[0,0]},getZoom:()=>c.getZoom()??0,getBounds:()=>{let u=c.getBounds();if(!u)return [[0,0],[0,0]];let 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.cursor="pointer",h==="center"&&(f.style.transform="translateY(50%)"),f.addEventListener("mouseenter",()=>o.onMarkerHover(u)),f.addEventListener("mouseleave",()=>o.onMarkerHover(null)),f.addEventListener("click",S=>{o.onMarkerClick(u,v.coords,S);});let b=new r.maps.marker.AdvancedMarkerElement({map:c,position:{lat:g[1],lng:g[0]},content:f}),v={element:f,coords:g,setHovered:S=>{f.dataset.gdsState=S?"hovered":"idle",b.zIndex=S?10:1;},setPosition:S=>{v.coords=S,b.position={lat:S[1],lng:S[0]};},remove:()=>{b.map=null,p.delete(u);}};return p.set(u,{marker:b,handle:v}),v},destroy:()=>{p.forEach(({marker:u})=>{u.map=null;}),p.clear();},instance:c}};});var jp={};Pr(jp,{createLeafletAdapter:()=>gv});function pv(){if(typeof document>"u"||globalThis.__gradeLeafletCssBundled||document.getElementById(Up))return;let e=document.createElement("link");e.id=Up,e.rel="stylesheet",e.href=dv,document.head.appendChild(e);}var dv,Up,$p,uv,mv,gv,Kp=Fa(()=>{dv="https://unpkg.com/leaflet@1.9.4/dist/leaflet.css",Up="gds-leaflet-css";$p={light:"rastertiles/voyager",dark:"rastertiles/dark_all",satellite:"rastertiles/voyager"},uv=e=>`https://{s}.basemaps.cartocdn.com/${e}/{z}/{x}/{y}{r}.png`,mv="\xA9 OpenStreetMap contributors \xA9 CARTO",gv=async(e,t,o)=>{pv();let a;try{a=await import('leaflet'),a.default&&(a=a.default);}catch(h){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:h}),h}let n=h=>[h[1],h[0]],r=t.tools==="zoom"||t.tools==="auto"&&t.interactive,i={"top-left":"topleft","top-right":"topright","bottom-left":"bottomleft","bottom-right":"bottomright"},l=a.map(e,{center:n(t.center),zoom:t.zoom,zoomControl:false,attributionControl:true,dragging:t.interactive,scrollWheelZoom:t.interactive,doubleClickZoom:t.interactive,boxZoom:t.interactive,keyboard:t.interactive,touchZoom:t.interactive});r&&a.control.zoom({position:i[t.toolsPosition]??"topleft"}).addTo(l);let s=h=>{let f=a.tileLayer(uv($p[h]??$p.light),{maxZoom:20,subdomains:"abcd",detectRetina:true,attribution:mv,crossOrigin:true});return f.on("tileerror",()=>o.onError({code:"tile-load-failed",message:"map tile failed to load (is the tile host allowed by CSP?)"})),f.addTo(l),f},c=s(t.appearance),p=h=>{c&&l.removeLayer(c),c=s(h);};t.bounds&&l.fitBounds([n(t.bounds[0]),n(t.bounds[1])],{animate:false}),o.onLoad();let m=typeof ResizeObserver<"u"?new ResizeObserver(()=>l.invalidateSize(false)):null;m?.observe(e),requestAnimationFrame(()=>l.invalidateSize(false)),window.setTimeout(()=>l.invalidateSize(false),200),window.setTimeout(()=>l.invalidateSize(false),600);let u=new globalThis.Map;return {setCenter:h=>l.panTo(n(h),{animate:false}),setZoom:h=>l.setZoom(h),setBounds:(h,f)=>l.fitBounds([n(h),n(f)],{animate:false}),setAppearance:h=>p(h),setInteractive:h=>{let f=["dragging","scrollWheelZoom","doubleClickZoom","boxZoom","keyboard","touchZoom"];for(let b of f){let v=l[b];v&&(h?v.enable():v.disable());}},flyTo:(h,f)=>l.flyTo(n(h),f?.zoom??l.getZoom(),{duration:(f?.durationMs??800)/1e3}),panTo:(h,f)=>l.panTo(n(h),{duration:(f?.durationMs??600)/1e3}),fitBounds:(h,f)=>{if(h.length===0)return;let b=f?.paddingPx??40;l.fitBounds(h.map(n),{padding:[b,b],duration:(f?.durationMs??800)/1e3});},getCenter:()=>{let h=l.getCenter();return [h.lng,h.lat]},getZoom:()=>l.getZoom(),getBounds:()=>{let h=l.getBounds(),f=h.getSouthWest(),b=h.getNorthEast();return [[f.lng,f.lat],[b.lng,b.lat]]},addMarker:(h,f,b)=>{let v=document.createElement("div");v.dataset.gdsPart="map-marker",v.dataset.gdsState="idle",v.style.position="absolute",v.style.cursor="pointer",v.style.transform=b==="center"?"translate(-50%, -50%)":"translate(-50%, -100%)",v.addEventListener("mouseenter",()=>o.onMarkerHover(h)),v.addEventListener("mouseleave",()=>o.onMarkerHover(null)),v.addEventListener("click",C=>o.onMarkerClick(h,k.coords,C));let S=a.divIcon({className:"gds-leaflet-marker",html:"",iconSize:[0,0],iconAnchor:[0,0]}),x=a.marker(n(f),{icon:S,interactive:true,keyboard:false}).addTo(l),w=x.getElement();w&&(w.style.pointerEvents="auto",w.appendChild(v));let k={element:v,coords:f,setHovered:C=>{v.dataset.gdsState=C?"hovered":"idle",w&&(w.style.zIndex=C?"1000":"");},setPosition:C=>{k.coords=C,x.setLatLng(n(C));},remove:()=>{l.removeLayer(x),u.delete(h);}};return u.set(h,{marker:x,handle:k}),k},destroy:()=>{m?.disconnect(),u.forEach(({marker:h})=>l.removeLayer(h)),u.clear(),l.remove();},instance:l}};});var fs={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:z.enum(["single","multiple"]),design:"knob",description:"single keeps one open at a time, multiple lets several be open at once"},collapsible:{schema:z.boolean().optional(),design:"knob",description:'only valid with type="single"; allows the open item to be toggled shut'},defaultValue:{schema:z.union([z.string(),z.array(z.string())]).optional(),design:"knob",description:"initial open item(s)"},value:{schema:z.union([z.string(),z.array(z.string())]).optional(),design:"knob",description:"controlled"},onValueChange:{schema:z.unknown().optional(),design:"event"},children:{schema:z.unknown().optional(),design:"plumbing",description:"the row label users click to expand"}}};var hs={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:z.unknown().optional(),design:"plumbing",description:'`{ id, role: "user" | "assistant", content, timestamp, thinking?, steps?, usage?, refs?, actions?, duration? }`; defaults to empty'},onSendMessage:{schema:z.unknown().optional(),design:"event",description:"fires when the user submits via the default composer; ignored if `composerSlot` is set"},isLoading:{schema:z.boolean().optional(),design:"knob",description:"shows a typing indicator at the bottom of the message list"},placeholder:{schema:z.string().optional(),design:"content",description:"composer placeholder text (ignored if `composerSlot` is set)"},title:{schema:z.string().optional(),design:"plumbing",description:'header title; defaults to "AI Assistant"'},titleIcon:{schema:z.unknown().optional(),design:"plumbing",description:"optional icon rendered before the title (e.g. `<Sparkles />`)"},headerTokens:{schema: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:z.unknown().optional(),design:"plumbing",description:"optional arbitrary content appended after `headerTokens` on the right of the header"},showUsage:{schema:z.boolean().optional(),design:"knob",description:"show the per-turn `usage` strip below the assistant bubble; default false"},showRefs:{schema:z.boolean().optional(),design:"knob",description:"show the per-turn `refs` strip below the assistant bubble; default false"},showActions:{schema:z.boolean().optional(),design:"knob",description:"render per-turn `actions` chips when a message has them; default true"},showDuration:{schema: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: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: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:z.string().optional(),design:"content",description:'override the "Thinking" label in the loading indicator'},suggestedPrompts:{schema:z.unknown().optional(),design:"plumbing",description:"empty-state quick prompts (ignored if `emptyStateSlot` is set)"},emptyStateSlot:{schema:z.unknown().optional(),design:"plumbing",description:"replaces the default empty state entirely"},errorSlot:{schema:z.unknown().optional(),design:"plumbing",description:"rendered after the messages list (typically an error banner)"},composerAboveSlot:{schema:z.unknown().optional(),design:"plumbing",description:"rendered between the messages and the composer (selection chip, settings panel)"},composerBelowSlot:{schema:z.unknown().optional(),design:"plumbing",description:"rendered below the composer (disclaimer, char counter)"},composerSlot:{schema:z.unknown().optional(),design:"plumbing",description:"full override of the composer; when provided, `onSendMessage` + `placeholder` are unused"},bare:{schema: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: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:z.string().optional(),design:"plumbing"}}};var bs={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:z.string(),design:"content",description:"controlled textarea value"},onChange:{schema:z.unknown(),design:"event",description:"fires for every textarea change"},onSend:{schema: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:z.boolean().optional(),design:"knob",description:"disables the textarea + paperclip and swaps Send for Stop"},onStop:{schema:z.unknown().optional(),design:"event",description:"fires when the user clicks Stop; without this, Stop renders disabled"},placeholder:{schema:z.string().optional(),design:"content"},maxLength:{schema:z.number().optional(),design:"knob",description:"hard cap passed to the underlying `<textarea>`"},showHint:{schema: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:z.string().optional(),design:"plumbing"}}};var vs={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:z.enum(["none","top","side","three-pane"]).optional(),design:"knob",description:"layout structure",default:"none"},asChild:{schema:z.boolean().optional(),design:"plumbing",description:"render as the child element via Slot",default:false},className:{schema:z.string().optional(),design:"plumbing"},children:{schema:z.unknown(),design:"plumbing"}}};var ji={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: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:z.unknown().optional(),design:"plumbing"},alt:{schema:z.unknown().optional(),design:"plumbing"},tone:{schema: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:z.unknown().optional(),design:"plumbing",description:"initials (or a small icon), rendered while the image loads or when it fails"}}};var Ki={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:z.enum(["none","solid","gradient","image","video","shader"]),design:"knob",description:"which paint to render (required)"},color:{schema: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: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:z.string().optional(),design:"content",description:"image or video URL"},fit:{schema:z.enum(["cover","contain","fill","none"]).optional(),design:"knob",description:'object-fit for image/video (default "cover")'},position:{schema:z.string().optional(),design:"content",description:'CSS object/background position (default "center")'},repeat:{schema:z.boolean().optional(),design:"knob",description:"tile the image (background-repeat) instead of a single <img>"},tileSize:{schema:z.string().optional(),design:"content",description:'CSS background-size when repeating (e.g. "120px")'},preset:{schema:z.string().optional(),design:"content",description:"shader preset id (see ThreeScene)"},fragmentShader:{schema:z.string().optional(),design:"content",description:"custom GLSL (takes precedence over preset)"},palette:{schema:z.unknown().optional(),design:"plumbing",description:"shader palette overrides; wrap tokens as `oklch(var(--token))`"},postPreset:{schema:z.string().optional(),design:"content",description:"shader post-FX"},opacity:{schema:z.number().optional(),design:"knob",description:"layer opacity 0\u20131"},blendMode:{schema:z.unknown().optional(),design:"plumbing",description:"blend against the frame behind it"},radius:{schema:z.enum(["none","sm","md","lg","xl"]).optional(),design:"knob",description:"match the frame's radius so the paint clips cleanly"}}};var Yi={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: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:z.enum(["default","full"]).optional(),design:"knob",description:'"full" gives a pill shape'}}};var Zi={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: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: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: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:z.boolean().optional(),design:"knob",description:"stick to the top of the scroll container."},dismissible:{schema:z.boolean().optional(),design:"knob",description:"render the trailing X close button. Pair with `onDismiss` to react."},onDismiss:{schema:z.unknown().optional(),design:"event"},icon:{schema:z.unknown().optional(),design:"plumbing",description:"leading icon slot. NOT inferred from variant; pass what fits the message."},action:{schema:z.unknown().optional(),design:"plumbing",description:'trailing slot before dismiss. Usually a `<Button size="sm">` or `<a>`.'},role:{schema:z.string().optional(),design:"plumbing",description:"overrides the automatic role mapping (warning/destructive \u2192 alert, others \u2192 status)."}}};var Xi={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:z.unknown().optional(),design:"plumbing",description:"passed to the underlying <nav>"},separator:{schema: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:z.unknown().optional(),design:"plumbing",description:"the <ol> wrapper; usually no overrides needed"},href:{schema:z.unknown().optional(),design:"plumbing",description:"renders as <a> when set, <button> when not"},asChild:{schema:z.unknown().optional(),design:"plumbing"},children:{schema: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 Ji={name:"Button",description:'Any clickable action. Use size="icon" for square icon-only buttons, variant="link" for inline links that should look like Button, the `raised` prop for high-commitment / weighty actions where the chrome can afford a tactile "physical key" treatment (composes with any variant; variant="raised" remains the neutral-key alias). 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:z.enum(["default","destructive","outline","secondary","ghost","link","raised"]).optional(),design:"knob",description:"`raised` here is a back-compat alias (the raised TRAIT on a neutral key surface); prefer the `raised` prop"},raised:{schema:z.boolean().optional(),design:"knob",description:'presence TRAIT: tactile elevation (bevel + drop + hover glow + pressed sink) layered onto ANY variant \u2014 raised primary, raised outline, etc. Glow tone reads --btn-glow \u2192 --accent-glow \u2192 --selected-glow; override per-button via style={{ "--btn-glow": "var(--warning)" }}'},size:{schema: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:z.boolean().optional(),design:"plumbing",description:"renders as the child element (use to wrap <a>/<Link>)"},disabled:{schema:z.boolean().optional(),design:"knob"}}};var Qi={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:z.enum(["single","multiple","range"]).optional(),design:"knob",description:"picks one date, several dates, or a [from, to] range"},selected:{schema:z.unknown().optional(),design:"plumbing",description:"controlled selection; shape matches `mode`"},onSelect:{schema:z.unknown().optional(),design:"event",description:"fires with the new selection"},month:{schema:z.unknown().optional(),design:"plumbing",description:"controlled displayed month"},defaultMonth:{schema:z.unknown().optional(),design:"plumbing",description:"uncontrolled initial month"},onMonthChange:{schema:z.unknown().optional(),design:"event"},numberOfMonths:{schema:z.number().optional(),design:"knob",description:"render multiple months side by side, useful for range pickers"},disabled:{schema:z.unknown().optional(),design:"plumbing"},captionLayout:{schema:z.enum(["label","dropdown","dropdown-months","dropdown-years"]).optional(),design:"knob"},className:{schema:z.string().optional(),design:"plumbing"}}};var es={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:z.enum(["default","destructive","success","warning","info"]).optional(),design:"knob",description:"semantic colouring; `default` is neutral"}}};var os={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: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:z.unknown(),design:"plumbing"}}};var Iu=z.enum(["start","center","end"]),Hu=z.object({delay:z.number().int().positive().optional(),pauseOnHover:z.boolean().optional(),pauseWhenOffscreen:z.boolean().optional()}),Fu=z.union([z.boolean(),Hu]),rs={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: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:Iu.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: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:Fu.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: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:z.function().optional(),design:"event",description:"Fires with the new slide index whenever the active slide changes (programmatic, autoplay, or user swipe)."},className:{schema:z.string().optional(),design:"plumbing"},style:{schema:z.record(z.string(),z.unknown()).optional(),design:"plumbing"},children:{schema:z.unknown(),design:"plumbing",description:"Carousel.Slide / Carousel.VideoSlide children, plus optionally Carousel.Dots and Carousel.Arrows."}}};var as={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:z.unknown().optional(),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:z.string().optional(),design:"plumbing",description:"used for the inlined <style> tag"},children:{schema:z.unknown().optional(),design:"plumbing",description:"typically a single Recharts ResponsiveContainer or chart"},passes:{schema:z.unknown().optional(),design:"plumbing",description:"pair with `content={<ChartTooltipContent />}`"},indicator:{schema:z.enum(["dot","line","dashed"]).optional(),design:"knob"},hideLabel:{schema:z.unknown().optional(),design:"plumbing"},hideIndicator:{schema:z.unknown().optional(),design:"plumbing"},nameKey:{schema:z.unknown().optional(),design:"plumbing"},labelKey:{schema:z.unknown().optional(),design:"plumbing"},ChartLegend:{schema:z.unknown(),design:"plumbing"}}};var ns={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:z.boolean().optional(),design:"knob"},onCheckedChange:{schema:z.unknown().optional(),design:"event"},defaultChecked:{schema:z.boolean().optional(),design:"knob"},disabled:{schema:z.boolean().optional(),design:"knob"},id:{schema:z.string().optional(),design:"plumbing",description:"bind a Label's htmlFor to this"}}};var is={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:z.unknown().optional(),design:"plumbing",description:"standard checkbox state"},label:{schema:z.unknown().optional(),design:"plumbing",description:"title line"},description:{schema:z.unknown().optional(),design:"plumbing",description:"secondary line"},aside:{schema:z.unknown().optional(),design:"plumbing",description:"slot before the indicator (a Badge, price, hint)"},hideIndicator:{schema:z.boolean().optional(),design:"knob",description:"hide the check; selection shown by the card border + background"},indicatorPosition:{schema:z.enum(["leading","trailing"]).optional(),design:"knob",description:"default trailing"},children:{schema:z.unknown().optional(),design:"plumbing",description:"arbitrary static content instead of label/description"}}};var ss={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:z.string(),design:"content",description:"the code to render"},language:{schema: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:z.unknown().optional(),design:"plumbing",description:"1-indexed line number, array of numbers, or array of `[start, end]` ranges to emphasise"},diff:{schema:z.unknown().optional(),design:"plumbing",description:"`{ added?: number[]; removed?: number[] }` \u2014 1-indexed lines for diff hero / changelog mode"},reveal:{schema:z.enum(["none","lines","typewriter","diff"]).optional(),design:"knob",description:"entrance animation; defaults to `none`"},trigger:{schema:z.enum(["mount","inView","manual"]).optional(),design:"knob",description:"what kicks the reveal off; defaults to `mount`"},play:{schema:z.boolean().optional(),design:"knob",description:'for `trigger="manual"`, set true to play'},speed:{schema: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:z.number().optional(),design:"knob",description:"explicit delay before reveal starts (ms) \u2014 overrides the `speed` preset"},stagger:{schema: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: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:z.boolean().optional(),design:"knob"},filename:{schema:z.string().optional(),design:"content",description:"optional label rendered in the header chrome"},wrap:{schema:z.boolean().optional(),design:"knob",description:"wrap long lines instead of horizontal scroll"},bare:{schema:z.boolean().optional(),design:"knob",description:"drop chrome (border, header, padding) \u2014 for inline use"},size:{schema: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: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: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 ls={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:z.boolean().optional(),design:"knob",description:"controlled open state"},defaultOpen:{schema:z.boolean().optional(),design:"knob",description:"uncontrolled initial state"},onOpenChange:{schema:z.unknown().optional(),design:"event"},children:{schema:z.unknown().optional(),design:"plumbing",description:"the clickable header (often a Button asChild)"}}};var cs={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:z.string().optional(),design:"content",description:"controlled active item value"},onValueChange:{schema:z.unknown().optional(),design:"event"},placeholder:{schema:z.string().optional(),design:"content"},children:{schema:z.unknown().optional(),design:"plumbing",description:"wraps groups and empty state"},heading:{schema:z.string().optional(),design:"content"},onSelect:{schema:z.unknown().optional(),design:"event"},disabled:{schema:z.boolean().optional(),design:"knob"},open:{schema:z.unknown().optional(),design:"plumbing"},onOpenChange:{schema:z.unknown().optional(),design:"event",description:"when you want the command palette mounted in a modal (cmd+k pattern)"}}};var ds={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:z.enum(["none","top","side","three-pane"]).optional(),design:"knob",description:"layout structure",default:"none"},asChild:{schema:z.boolean().optional(),design:"plumbing",description:"render as the child element via Slot",default:false},className:{schema:z.string().optional(),design:"plumbing"},children:{schema:z.unknown(),design:"plumbing"}}};var ys={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: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:z.unknown().optional(),design:"plumbing"},alt:{schema:z.unknown().optional(),design:"plumbing"},tone:{schema: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:z.unknown().optional(),design:"plumbing",description:"initials (or a small icon), rendered while the image loads or when it fails"}}};var xs={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:z.enum(["none","solid","gradient","image","video","shader"]),design:"knob",description:"which paint to render (required)"},color:{schema: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: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:z.string().optional(),design:"content",description:"image or video URL"},fit:{schema:z.enum(["cover","contain","fill","none"]).optional(),design:"knob",description:'object-fit for image/video (default "cover")'},position:{schema:z.string().optional(),design:"content",description:'CSS object/background position (default "center")'},repeat:{schema:z.boolean().optional(),design:"knob",description:"tile the image (background-repeat) instead of a single <img>"},tileSize:{schema:z.string().optional(),design:"content",description:'CSS background-size when repeating (e.g. "120px")'},preset:{schema:z.string().optional(),design:"content",description:"shader preset id (see ThreeScene)"},fragmentShader:{schema:z.string().optional(),design:"content",description:"custom GLSL (takes precedence over preset)"},palette:{schema:z.unknown().optional(),design:"plumbing",description:"shader palette overrides; wrap tokens as `oklch(var(--token))`"},postPreset:{schema:z.string().optional(),design:"content",description:"shader post-FX"},opacity:{schema:z.number().optional(),design:"knob",description:"layer opacity 0\u20131"},blendMode:{schema:z.unknown().optional(),design:"plumbing",description:"blend against the frame behind it"},radius:{schema:z.enum(["none","sm","md","lg","xl"]).optional(),design:"knob",description:"match the frame's radius so the paint clips cleanly"}}};var ks={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 hover:bg-primary/80 rounded-md"},variantDefaults:{variant:"default",rounded:"default"},props:{variant:{schema: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:z.enum(["default","full"]).optional(),design:"knob",description:'"full" gives a pill shape'}}};var Ss={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: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: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: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:z.boolean().optional(),design:"knob",description:"stick to the top of the scroll container."},dismissible:{schema:z.boolean().optional(),design:"knob",description:"render the trailing X close button. Pair with `onDismiss` to react."},onDismiss:{schema:z.unknown().optional(),design:"event"},icon:{schema:z.unknown().optional(),design:"plumbing",description:"leading icon slot. NOT inferred from variant; pass what fits the message."},action:{schema:z.unknown().optional(),design:"plumbing",description:'trailing slot before dismiss. Usually a `<Button size="sm">` or `<a>`.'},role:{schema:z.string().optional(),design:"plumbing",description:"overrides the automatic role mapping (warning/destructive \u2192 alert, others \u2192 status)."}}};var Rs={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:z.unknown().optional(),design:"plumbing",description:"passed to the underlying <nav>"},separator:{schema: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:z.unknown().optional(),design:"plumbing",description:"the <ol> wrapper; usually no overrides needed"},href:{schema:z.unknown().optional(),design:"plumbing",description:"renders as <a> when set, <button> when not"},asChild:{schema:z.unknown().optional(),design:"plumbing"},children:{schema: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 Cs={name:"Button",description:'Any clickable action. Use size="icon" for square icon-only buttons, variant="link" for inline links that should look like Button, the `raised` prop for high-commitment / weighty actions where the chrome can afford a tactile "physical key" treatment (composes with any variant; variant="raised" remains the neutral-key alias). 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 hover:bg-primary/90 h-8 gap-1.5 px-3 text-base [&_svg]:size-4"},variantDefaults:{variant:"default",size:"md"},props:{variant:{schema:z.enum(["default","destructive","outline","secondary","ghost","link","raised"]).optional(),design:"knob",description:"`raised` here is a back-compat alias (the raised TRAIT on a neutral key surface); prefer the `raised` prop"},raised:{schema:z.boolean().optional(),design:"knob",description:'presence TRAIT: tactile elevation (bevel + drop + hover glow + pressed sink) layered onto ANY variant \u2014 raised primary, raised outline, etc. Glow tone reads --btn-glow \u2192 --accent-glow \u2192 --selected-glow; override per-button via style={{ "--btn-glow": "var(--warning)" }}'},size:{schema: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:z.boolean().optional(),design:"plumbing",description:"renders as the child element (use to wrap <a>/<Link>)"},disabled:{schema:z.boolean().optional(),design:"knob"}}};var Ts={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:z.enum(["single","multiple","range"]).optional(),design:"knob",description:"picks one date, several dates, or a [from, to] range"},selected:{schema:z.unknown().optional(),design:"plumbing",description:"controlled selection; shape matches `mode`"},onSelect:{schema:z.unknown().optional(),design:"event",description:"fires with the new selection"},month:{schema:z.unknown().optional(),design:"plumbing",description:"controlled displayed month"},defaultMonth:{schema:z.unknown().optional(),design:"plumbing",description:"uncontrolled initial month"},onMonthChange:{schema:z.unknown().optional(),design:"event"},numberOfMonths:{schema:z.number().optional(),design:"knob",description:"render multiple months side by side, useful for range pickers"},disabled:{schema:z.unknown().optional(),design:"plumbing"},captionLayout:{schema:z.enum(["label","dropdown","dropdown-months","dropdown-years"]).optional(),design:"knob"},className:{schema:z.string().optional(),design:"plumbing"}}};var Ps={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:z.enum(["default","destructive","success","warning","info"]).optional(),design:"knob",description:"semantic colouring; `default` is neutral"}}};var Ns={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: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:z.unknown(),design:"plumbing"}}};var em=z.enum(["start","center","end"]),tm=z.object({delay:z.number().int().positive().optional(),pauseOnHover:z.boolean().optional(),pauseWhenOffscreen:z.boolean().optional()}),om=z.union([z.boolean(),tm]),Es={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: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:em.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: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:om.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: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:z.function().optional(),design:"event",description:"Fires with the new slide index whenever the active slide changes (programmatic, autoplay, or user swipe)."},className:{schema:z.string().optional(),design:"plumbing"},style:{schema:z.record(z.string(),z.unknown()).optional(),design:"plumbing"},children:{schema:z.unknown(),design:"plumbing",description:"Carousel.Slide / Carousel.VideoSlide children, plus optionally Carousel.Dots and Carousel.Arrows."}}};var Ls={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:z.unknown().optional(),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:z.string().optional(),design:"plumbing",description:"used for the inlined <style> tag"},children:{schema:z.unknown().optional(),design:"plumbing",description:"typically a single Recharts ResponsiveContainer or chart"},passes:{schema:z.unknown().optional(),design:"plumbing",description:"pair with `content={<ChartTooltipContent />}`"},indicator:{schema:z.enum(["dot","line","dashed"]).optional(),design:"knob"},hideLabel:{schema:z.unknown().optional(),design:"plumbing"},hideIndicator:{schema:z.unknown().optional(),design:"plumbing"},nameKey:{schema:z.unknown().optional(),design:"plumbing"},labelKey:{schema:z.unknown().optional(),design:"plumbing"},ChartLegend:{schema:z.unknown(),design:"plumbing"}}};var Ds={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:z.boolean().optional(),design:"knob"},onCheckedChange:{schema:z.unknown().optional(),design:"event"},defaultChecked:{schema:z.boolean().optional(),design:"knob"},disabled:{schema:z.boolean().optional(),design:"knob"},id:{schema:z.string().optional(),design:"plumbing",description:"bind a Label's htmlFor to this"}}};var As={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:z.unknown().optional(),design:"plumbing",description:"standard checkbox state"},label:{schema:z.unknown().optional(),design:"plumbing",description:"title line"},description:{schema:z.unknown().optional(),design:"plumbing",description:"secondary line"},aside:{schema:z.unknown().optional(),design:"plumbing",description:"slot before the indicator (a Badge, price, hint)"},hideIndicator:{schema:z.boolean().optional(),design:"knob",description:"hide the check; selection shown by the card border + background"},indicatorPosition:{schema:z.enum(["leading","trailing"]).optional(),design:"knob",description:"default trailing"},children:{schema:z.unknown().optional(),design:"plumbing",description:"arbitrary static content instead of label/description"}}};var Is={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:z.string(),design:"content",description:"the code to render"},language:{schema: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:z.unknown().optional(),design:"plumbing",description:"1-indexed line number, array of numbers, or array of `[start, end]` ranges to emphasise"},diff:{schema:z.unknown().optional(),design:"plumbing",description:"`{ added?: number[]; removed?: number[] }` \u2014 1-indexed lines for diff hero / changelog mode"},reveal:{schema:z.enum(["none","lines","typewriter","diff"]).optional(),design:"knob",description:"entrance animation; defaults to `none`"},trigger:{schema:z.enum(["mount","inView","manual"]).optional(),design:"knob",description:"what kicks the reveal off; defaults to `mount`"},play:{schema:z.boolean().optional(),design:"knob",description:'for `trigger="manual"`, set true to play'},speed:{schema: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:z.number().optional(),design:"knob",description:"explicit delay before reveal starts (ms) \u2014 overrides the `speed` preset"},stagger:{schema: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: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:z.boolean().optional(),design:"knob"},filename:{schema:z.string().optional(),design:"content",description:"optional label rendered in the header chrome"},wrap:{schema:z.boolean().optional(),design:"knob",description:"wrap long lines instead of horizontal scroll"},bare:{schema:z.boolean().optional(),design:"knob",description:"drop chrome (border, header, padding) \u2014 for inline use"},size:{schema: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: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: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 Hs={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:z.boolean().optional(),design:"knob",description:"controlled open state"},defaultOpen:{schema:z.boolean().optional(),design:"knob",description:"uncontrolled initial state"},onOpenChange:{schema:z.unknown().optional(),design:"event"},children:{schema:z.unknown().optional(),design:"plumbing",description:"the clickable header (often a Button asChild)"}}};var Fs={name:"Combobox",description:'Single-pick searchable picker \u2014 the single-select sibling of MultiSelect and the Linear "selectable badge" pattern (status / priority / assignee). Use triggerVariant="inline" with renderValue returning a Badge to make a value read as a clickable token that opens a command menu. For multiple selection use MultiSelect; for a small fixed list with no search use Select; for free-form command palettes use Command directly. Pass disabled (driven by a permission check) to show the value without letting the user edit it.',import:"@gradeui/ui",aliases:["combobox","single select","searchable select","picker","status picker","priority picker","assignee picker","command select","autocomplete","dropdown select","selectable badge","inline select","token select","linear combobox"],composesWith:["Popover","Command","Badge","Avatar","PropertyList","Table","Field"],styleDefaults:{Combobox:"ring-offset-background focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50"},props:{options:{schema:z.unknown(),design:"plumbing",description:"the selectable pool"},value:{schema:z.string().optional(),design:"content",description:"controlled selection (wire onValueChange)"},defaultValue:{schema:z.string().optional(),design:"content",description:"uncontrolled initial selection"},onValueChange:{schema:z.unknown().optional(),design:"event",description:"fired with the next value, or null when cleared"},placeholder:{schema:z.string().optional(),design:"content",description:"trigger text when nothing is selected"},searchPlaceholder:{schema:z.string().optional(),design:"content",description:"search-input placeholder"},emptyMessage:{schema:z.string().optional(),design:"content",description:"shown when search returns no rows"},searchable:{schema:z.boolean().optional(),design:"knob",description:"show the search input (default true)"},clearable:{schema:z.boolean().optional(),design:"knob",description:"add a Clear row so the value can return to unset"},triggerVariant:{schema:z.enum(["default","inline"]).optional(),design:"knob",description:"default = form-control surface (like Select); inline = chrome-free token trigger"},renderValue:{schema:z.unknown().optional(),design:"plumbing",description:"render the selected value yourself (e.g. a Badge); falls back to icon + label"},hideChevron:{schema:z.boolean().optional(),design:"knob",description:"drop the trailing chevron (inline token look)"},disabled:{schema:z.boolean().optional(),design:"knob",description:"lock to a read-only display of the current value"},align:{schema:z.enum(["start","center","end"]).optional(),design:"knob",description:"popover alignment"}}};var zs={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:z.string().optional(),design:"content",description:"controlled active item value"},onValueChange:{schema:z.unknown().optional(),design:"event"},placeholder:{schema:z.string().optional(),design:"content"},children:{schema:z.unknown().optional(),design:"plumbing",description:"wraps groups and empty state"},heading:{schema:z.string().optional(),design:"content"},onSelect:{schema:z.unknown().optional(),design:"event"},disabled:{schema:z.boolean().optional(),design:"knob"},open:{schema:z.unknown().optional(),design:"plumbing"},onOpenChange:{schema:z.unknown().optional(),design:"event",description:"when you want the command palette mounted in a modal (cmd+k pattern)"}}};var Bs={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:z.string().optional(),design:"content"},initialText:{schema:z.string().optional(),design:"content",description:"plain text content to seed on mount"},initialJson:{schema:z.string().optional(),design:"content",description:"Lexical state JSON (from a previous onSubmit round-trip)"},formats:{schema: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:z.boolean().optional(),design:"knob",description:"show the formatting toolbar above the editor; default false"},triggers:{schema:z.unknown().optional(),design:"plumbing",description:'mention/slash configs, eg. `[{ char: "@", items: people }, { char: "/", items: commands }]`'},attachments:{schema:z.boolean().optional(),design:"knob",description:"enable image paste + paperclip when true/object; default off"},onSubmit:{schema:z.unknown().optional(),design:"event"},isLoading:{schema:z.boolean().optional(),design:"knob",description:"disables editor, swaps default Send for Stop"},onStop:{schema:z.unknown().optional(),design:"event"},maxLength:{schema:z.number().optional(),design:"knob"},autoFocus:{schema:z.boolean().optional(),design:"plumbing"},submitOnEnter:{schema:z.boolean().optional(),design:"knob",description:"default true (Shift-Enter still inserts newline)"},leftActions:{schema:z.unknown().optional(),design:"plumbing",description:"override the default paperclip"},rightActions:{schema:z.unknown().optional(),design:"plumbing",description:"override the default Send/Stop"},hideSend:{schema:z.boolean().optional(),design:"knob",description:"hide the default Send without replacing it"},steps:{schema:z.unknown().optional(),design:"plumbing",description:"scripted demo sequence"},trigger:{schema:z.unknown().optional(),design:"plumbing",description:'"mount" | "inView" | "manual"; default "mount"'},play:{schema:z.boolean().optional(),design:"knob",description:'for trigger="manual"'},speed:{schema:z.unknown().optional(),design:"plumbing",description:'"slow" | "normal" | "fast"; default "normal"'},loop:{schema:z.boolean().optional(),design:"knob"},loopDelay:{schema:z.number().optional(),design:"knob",description:"ms between loop iterations, default 2000"},readOnly:{schema: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:z.boolean().optional(),design:"knob",description:"strip the card chrome"},className:{schema:z.string().optional(),design:"plumbing"}}};var ps={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:z.unknown().optional(),design:"plumbing"},onChange:{schema:z.unknown().optional(),design:"event",description:"called on select or clear"},placeholder:{schema:z.string().optional(),design:"content",description:'trigger label when empty (default "Pick a date" / "Pick a date range")'},disabled:{schema:z.boolean().optional(),design:"knob"},format:{schema:z.string().optional(),design:"content",description:'date-fns format token for the trigger label (default "PPP" single, "LLL dd, y" range)'},align:{schema:z.enum(["start","center","end"]).optional(),design:"knob",description:'popover align (default "start")'},side:{schema:z.enum(["top","right","bottom","left"]).optional(),design:"knob",description:"popover side"},captionLayout:{schema:z.enum(["label","dropdown","dropdown-months","dropdown-years"]).optional(),design:"knob"},className:{schema:z.string().optional(),design:"plumbing",description:"on the trigger button"},contentClassName:{schema:z.string().optional(),design:"content",description:"on the PopoverContent"},icon:{schema:z.unknown().optional(),design:"plumbing",description:"replaces the default CalendarIcon"},numberOfMonths:{schema:z.number().optional(),design:"knob",description:"DateRangePicker only, default 2"}}};var us={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:z.unknown().optional(),design:"plumbing"},onOpenChange:{schema:z.unknown().optional(),design:"event",description:"Radix controlled/uncontrolled pattern"},asChild:{schema:z.enum(["wrap a Button"]).optional(),design:"plumbing"},surface:{schema: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:z.unknown().optional(),design:"plumbing"},used:{schema:z.unknown().optional(),design:"plumbing"}}};var ms={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:{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:z.unknown().optional(),design:"plumbing"},defaultOpen:{schema:z.unknown().optional(),design:"plumbing"},onOpenChange:{schema:z.unknown().optional(),design:"event"},modal:{schema:z.unknown().optional(),design:"plumbing"},asChild:{schema:z.boolean().optional(),design:"plumbing",description:"usually wraps a Button"},align:{schema:z.enum(["start","center","end"]).optional(),design:"knob"},side:{schema:z.enum(["top","right","bottom","left"]).optional(),design:"knob"},sideOffset:{schema:z.number().optional(),design:"knob"},surface:{schema: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: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:z.unknown().optional(),design:"event"},disabled:{schema:z.unknown().optional(),design:"plumbing"},inset:{schema:z.unknown().optional(),design:"plumbing"},DropdownMenuCheckboxItem:{schema:z.unknown(),design:"plumbing"},DropdownMenuSub:{schema:z.unknown(),design:"plumbing",description:"sub-trigger shows children, sub-content holds the deeper items"},children:{schema:z.unknown().optional(),design:"plumbing",description:"right-aligned kbd hint"}}};var gs={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:z.enum(["option","setting"]).optional(),design:"knob",description:"option (default): control leads, text beside it; setting: text leads, control pinned trailing"},children:{schema:z.unknown(),design:"plumbing",description:"order does not matter"}}};var bs={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:z.unknown(),design:"plumbing",description:"current paint ({ type, color?, gradient?, src?, fit?, repeat?, tileSize?, preset?, palette?, postPreset?, opacity? }) (required)"},onChange:{schema:z.unknown(),design:"event",description:"called on any change (required)"}}};var vs={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:z.enum(["row","col","row-reverse","col-reverse"]).optional(),design:"knob",description:"main-axis direction",default:"row"},gap:{schema:z.enum(["none","xs","sm","md","lg","xl","2xl"]).optional(),design:"knob",description:"gap between children",default:"none"},align:{schema:z.enum(["start","center","end","stretch","baseline"]).optional(),design:"knob",description:"cross-axis alignment",default:"stretch"},justify:{schema:z.enum(["start","center","end","between","around","evenly"]).optional(),design:"knob",description:"main-axis distribution",default:"start"},wrap:{schema:z.enum(["nowrap","wrap","wrap-reverse"]).optional(),design:"knob",description:"wrap behaviour when children overflow",default:"nowrap"},asChild:{schema:z.boolean().optional(),design:"plumbing",description:"render as the child element via Slot",default:false},className:{schema:z.string().optional(),design:"plumbing"},children:{schema:z.unknown(),design:"plumbing"}}};var ys={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: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: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:z.enum(["start","center","end","stretch"]).optional(),design:"knob",description:"cross-axis alignment of cells",default:"stretch"},asChild:{schema:z.boolean().optional(),design:"plumbing",description:"render as the child element via Slot",default:false},className:{schema:z.string().optional(),design:"plumbing"},children:{schema:z.unknown(),design:"plumbing"}}};var xs={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:z.unknown().optional(),design:"plumbing"},defaultOpen:{schema:z.unknown().optional(),design:"plumbing"},onOpenChange:{schema:z.unknown().optional(),design:"event"},openDelay:{schema:z.unknown().optional(),design:"plumbing"},closeDelay:{schema:z.unknown().optional(),design:"plumbing"},asChild:{schema:z.boolean().optional(),design:"plumbing",description:"usually a Link or Button"},side:{schema:z.unknown().optional(),design:"plumbing"},align:{schema:z.unknown().optional(),design:"plumbing"},sideOffset:{schema:z.unknown().optional(),design:"plumbing"},alignOffset:{schema:z.unknown().optional(),design:"plumbing"},className:{schema:z.unknown().optional(),design:"plumbing"},surface:{schema: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 ws={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:z.string().optional(),design:"content"},placeholder:{schema: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: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: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: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 Ss={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:z.string().optional(),design:"content",description:"binds to the input's id"},size:{schema: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:z.unknown().optional(),design:"plumbing",description:"artwork keyed by lockup then appearance: { square?: { light?, dark?, mono? }, horizontal?: {...}, icon?: {...} }. Each slot is any node (inline <svg>, <img>, component). OMIT ENTIRELY and the GRADE MARK renders (the square G-arrow, painted with currentColor so it sits correctly on any surface). A bare <Logo /> is always correct branding."},size:{schema:z.enum(["sm","md","lg","xl"]).optional(),design:"knob",description:'height of the mark: 20 / 28 / 40 / 56px (a raw pixel number also works). Width is intrinsic (square/icon 1:1, horizontal keeps its ratio). Default "md"; use "sm" in dense rails and toolbars.'},lockup:{schema:z.enum(["square","horizontal","icon"]).optional(),design:"knob",description:'which shape to show; falls back to the next-best available artwork. Default "horizontal".'},mode:{schema:z.enum(["light","dark"]).optional(),design:"knob",description:'the background the logo SITS ON, selecting light/dark artwork. Explicit, not theme-coupled. Default "light".'},mono:{schema:z.boolean().optional(),design:"knob",description:"render the single-colour treatment; inherits currentColor from the parent. Default false."},label:{schema:z.string().optional(),design:"content",description:'accessible name (aria-label + role="img"); pair with decorative when the brand name is already beside it.'},decorative:{schema:z.boolean().optional(),design:"knob",description:"aria-hidden, no role; use when text nearby names the brand."},href:{schema:z.string().optional(),design:"content",description:"renders the logo as a link (logo-links-home)."},className:{schema:z.string().optional(),design:"plumbing"}}};var Cs={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:z.unknown(),design:"plumbing",description:'"maplibre" (default, free, no key) | "mapbox" (needs accessToken) | "google" (needs apiKey). Switching is one prop change.'},center:{schema:z.unknown(),design:"plumbing",description:"`[lng, lat]` tuple. ALWAYS lng first. Required."},zoom:{schema:z.unknown(),design:"plumbing",description:"number, 0\u201322. Required."},bounds:{schema:z.unknown(),design:"plumbing",description:"`[[swLng, swLat], [neLng, neLat]]`. When set, takes precedence over center+zoom."},appearance:{schema:z.unknown(),design:"plumbing",description:'"light" | "dark" | "satellite" | "auto" (default "auto", follows GradeThemeProvider mode).'},hoveredId:{schema: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.'},onHoveredIdChange:{schema:z.unknown(),design:"event",description:"`(id: string | null) => void`. The other half of the controlled hover pair: fires when the pointer enters/leaves a marker so the sibling list can highlight in step. Without this entry in the contract, screens using the documented two-way sync fail save validation."},interactive:{schema:z.unknown(),design:"plumbing",description:"false freezes pan/zoom, useful for static cards."},tools:{schema:z.unknown(),design:"plumbing",description:'"auto" (default, zoom buttons follow `interactive`) | "zoom" (force zoom buttons) | "none" (chrome-free map; attribution always stays \u2014 license). One vocabulary across all providers.'},toolsPosition:{schema:z.unknown(),design:"plumbing",description:'"top-left" (default) | "top-right" | "bottom-left" | "bottom-right". Corner the tools dock to; use when a search bar or legend sits over the default corner.'},onLoad:{schema:z.unknown(),design:"event",description:"handle exposes flyTo, panTo, fitBounds, getCenter, getZoom, getBounds, instance."},tilerKey:{schema: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: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: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:z.unknown().optional(),design:"plumbing",description:"string. Required. Stable marker id; pair with Map's `hoveredId` for list\u2194map hover sync."},at:{schema:z.unknown().optional(),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:z.unknown().optional(),design:"plumbing",description:'"center" | "bottom" (default "bottom", pin tip sits on the coord). Only these two values.'},onClick:{schema:z.unknown().optional(),design:"event",description:"handler called with `({ id, coords, native })` on marker click."},children:{schema:z.unknown().optional(),design:"plumbing",description:"DOM rendered as the marker (Badge, Card, Avatar, or any element). Inherits `--gds-*` tokens."}}};var zu=z.object({kind:z.literal("album"),artist:z.string(),title:z.string(),year:z.number().optional(),description:z.string().optional()}),Bu=z.object({kind:z.literal("tv-show"),title:z.string(),year:z.number().optional(),description:z.string().optional()}),_u=z.object({kind:z.literal("movie"),title:z.string(),year:z.number().optional(),description:z.string().optional()}),Ou=z.object({kind:z.literal("game"),title:z.string(),description:z.string().optional()}),Vu=z.object({kind:z.literal("book"),title:z.string().optional(),author:z.string().optional(),isbn:z.string().optional(),description:z.string().optional()}),Gu=z.object({kind:z.literal("poster"),title:z.string(),year:z.number().optional(),description:z.string().optional()}),Wu=z.object({kind:z.literal("portrait"),name:z.string().optional(),role:z.string().optional()}),Uu=z.object({kind:z.literal("landscape"),location:z.string().optional(),mood:z.string().optional()}),$u=z.object({kind:z.literal("product"),name:z.string().optional(),brand:z.string().optional()}),ju=z.object({kind:z.literal("food"),dish:z.string().optional(),cuisine:z.string().optional()}),Ku=z.object({kind:z.literal("generic"),prompt:z.string()}),qu=z.union([z.object({kind:z.literal("video")}),z.object({kind:z.literal("audio")}),z.object({kind:z.literal("embed")}),z.object({kind:z.literal("3d")})]),Yu=z.union([zu,Bu,_u,Ou,Vu,Gu,Wu,Uu,$u,ju,Ku,qu]),Zu=z.enum(["video","square","portrait","wide","auto"]),Xu=z.enum(["none","sm","md","lg","xl"]),Ju=z.enum(["album","tv-show","movie","game","book","portrait","landscape","poster","product","food","video","audio","embed","3d","generic"]),Qu=z.union([z.literal("auto"),z.literal("icon"),z.literal("none")]),un={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:Ju.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:Zu.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:Xu.optional(),design:"knob",control:"toggle-group",label:"Corner radius",default:"lg",description:"Driven by the `--gds-media-radius` CSS variable."},border:{schema:z.boolean().optional(),design:"knob",label:"Show border",default:false},loading:{schema:z.boolean().optional(),design:"knob",label:"Loading state",default:false,description:"Overlays the muted-pulse skeleton on top of the slot."},emptyState:{schema:Qu.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: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: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."},instanceId:{schema:z.string().optional(),design:"content",group:"image",control:"text",label:"Instance id",description:"Stable per-instance id stamped as `data-gds-instance-id`. Use when rendering MediaSurfaces from a data array (`.map(item => <MediaSurface instanceId={item.id} \u2026/>)`) \u2014 it's how Studio's selection + Fill flows tell one card apart from its siblings and patch only that entry. Was missing from this hand-authored contract while the component documented it, which made save validation reject the documented pattern (June 2026)."},source:{schema:Yu.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:z.string().optional(),design:"plumbing"},style:{schema:z.record(z.string(),z.unknown()).optional(),design:"plumbing"},children:{schema: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: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: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:z.unknown().optional(),design:"plumbing",description:"Custom node shown while `loading` is true."},onVisibilityChange:{schema: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 Ts={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:z.string().optional(),design:"content"},initialText:{schema:z.string().optional(),design:"content",description:"plain text content to seed on mount"},initialJson:{schema:z.string().optional(),design:"content",description:"Lexical state JSON (from a previous onSubmit round-trip)"},formats:{schema: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:z.boolean().optional(),design:"knob",description:"show the formatting toolbar above the editor; default false"},triggers:{schema:z.unknown().optional(),design:"plumbing",description:'mention/slash configs, eg. `[{ char: "@", items: people }, { char: "/", items: commands }]`'},attachments:{schema:z.boolean().optional(),design:"knob",description:"enable image paste + paperclip when true/object; default off"},onSubmit:{schema:z.unknown().optional(),design:"event"},isLoading:{schema:z.boolean().optional(),design:"knob",description:"disables editor, swaps default Send for Stop"},onStop:{schema:z.unknown().optional(),design:"event"},maxLength:{schema:z.number().optional(),design:"knob"},autoFocus:{schema:z.boolean().optional(),design:"plumbing"},submitOnEnter:{schema:z.boolean().optional(),design:"knob",description:"default true (Shift-Enter still inserts newline)"},leftActions:{schema:z.unknown().optional(),design:"plumbing",description:"override the default paperclip"},rightActions:{schema:z.unknown().optional(),design:"plumbing",description:"override the default Send/Stop"},hideSend:{schema:z.boolean().optional(),design:"knob",description:"hide the default Send without replacing it"},steps:{schema:z.unknown().optional(),design:"plumbing",description:"scripted demo sequence"},trigger:{schema:z.unknown().optional(),design:"plumbing",description:'"mount" | "inView" | "manual"; default "mount"'},play:{schema:z.boolean().optional(),design:"knob",description:'for trigger="manual"'},speed:{schema:z.unknown().optional(),design:"plumbing",description:'"slow" | "normal" | "fast"; default "normal"'},loop:{schema:z.boolean().optional(),design:"knob"},loopDelay:{schema:z.number().optional(),design:"knob",description:"ms between loop iterations, default 2000"},readOnly:{schema: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:z.boolean().optional(),design:"knob",description:"strip the card chrome"},className:{schema:z.string().optional(),design:"plumbing"}}};var Vs={name:"DataView",description:'One dataset, drawn as a table, a list of cards, or a grid \u2014 without re-typing the TanStack boilerplate (sortable headers, flexRender, selection, view switch) on every page. Hand it data + a columns schema; columns declare a `type` (badge/tags/number/currency/percent/date/boolean/url/text) that DataView renders, with a `cell` override for bespoke cells (avatars, relations). The view toggle can live anywhere \u2014 `useDataView()` holds the state so a `<DataViewToggle>` or `<DataViewColumns>` in a page header drives a `<DataView>` lower down. Mark a column `pinned="left"` (with a `width`) for a fixed column and `stickyHeader` to freeze the header. For a single record\'s fields use PropertyList; for the raw table primitive use Table.',import:"@gradeui/ui",aliases:["data view","data table","datatable","data grid","dataview","table view","card view","grid view","list view","gallery","records list","master list","tanstack table","sortable table","column visibility","pinned column","frozen column","sticky header","view switcher"],composesWith:["Table","Card","Badge","Avatar","ToggleGroup","DropdownMenu","PropertyList","Combobox"],props:{data:{schema:z.unknown(),design:"plumbing",description:"the rows"},columns:{schema:z.unknown(),design:"plumbing",description:"the schema; one list drives table, cards, and grid"},getRowId:{schema:z.unknown().optional(),design:"plumbing",description:"defaults to row.id"},view:{schema:z.unknown().optional(),design:"plumbing",description:"controlled or uncontrolled view"},views:{schema:z.unknown().optional(),design:"plumbing",description:"allowed views; one entry = single view, no toggle"},activeId:{schema:z.unknown().optional(),design:"plumbing",description:"the selected row; click emits it"},sorting:{schema:z.unknown().optional(),design:"plumbing",description:"TanStack SortingState"},columnVisibility:{schema:z.unknown().optional(),design:"plumbing",description:"which fields show"},stickyHeader:{schema:z.boolean().optional(),design:"knob",description:"freeze the header row on scroll"},toolbar:{schema:z.boolean().optional(),design:"knob",description:"render the built-in columns menu + view toggle above the view"},renderCard:{schema:z.unknown().optional(),design:"plumbing",description:"override card / grid tiles"},emptyMessage:{schema:z.unknown().optional(),design:"plumbing"}}};var _s={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:z.unknown().optional(),design:"plumbing"},onChange:{schema:z.unknown().optional(),design:"event",description:"called on select or clear"},placeholder:{schema:z.string().optional(),design:"content",description:'trigger label when empty (default "Pick a date" / "Pick a date range")'},disabled:{schema:z.boolean().optional(),design:"knob"},format:{schema:z.string().optional(),design:"content",description:'date-fns format token for the trigger label (default "PPP" single, "LLL dd, y" range)'},align:{schema:z.enum(["start","center","end"]).optional(),design:"knob",description:'popover align (default "start")'},side:{schema:z.enum(["top","right","bottom","left"]).optional(),design:"knob",description:"popover side"},captionLayout:{schema:z.enum(["label","dropdown","dropdown-months","dropdown-years"]).optional(),design:"knob"},className:{schema:z.string().optional(),design:"plumbing",description:"on the trigger button"},contentClassName:{schema:z.string().optional(),design:"content",description:"on the PopoverContent"},icon:{schema:z.unknown().optional(),design:"plumbing",description:"replaces the default CalendarIcon"},numberOfMonths:{schema:z.number().optional(),design:"knob",description:"DateRangePicker only, default 2"}}};var Os={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:z.unknown().optional(),design:"plumbing"},onOpenChange:{schema:z.unknown().optional(),design:"event",description:"Radix controlled/uncontrolled pattern"},asChild:{schema:z.enum(["wrap a Button"]).optional(),design:"plumbing"},surface:{schema: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:z.unknown().optional(),design:"plumbing"},used:{schema:z.unknown().optional(),design:"plumbing"}}};var Gs={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:{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:z.unknown().optional(),design:"plumbing"},defaultOpen:{schema:z.unknown().optional(),design:"plumbing"},onOpenChange:{schema:z.unknown().optional(),design:"event"},modal:{schema:z.unknown().optional(),design:"plumbing"},asChild:{schema:z.boolean().optional(),design:"plumbing",description:"usually wraps a Button"},align:{schema:z.enum(["start","center","end"]).optional(),design:"knob"},side:{schema:z.enum(["top","right","bottom","left"]).optional(),design:"knob"},sideOffset:{schema:z.number().optional(),design:"knob"},surface:{schema: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: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:z.unknown().optional(),design:"event"},disabled:{schema:z.unknown().optional(),design:"plumbing"},inset:{schema:z.unknown().optional(),design:"plumbing"},DropdownMenuCheckboxItem:{schema:z.unknown(),design:"plumbing"},DropdownMenuSub:{schema:z.unknown(),design:"plumbing",description:"sub-trigger shows children, sub-content holds the deeper items"},children:{schema:z.unknown().optional(),design:"plumbing",description:"right-aligned kbd hint"}}};var Us={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:z.enum(["option","setting"]).optional(),design:"knob",description:"option (default): control leads, text beside it; setting: text leads, control pinned trailing"},children:{schema:z.unknown(),design:"plumbing",description:"order does not matter"}}};var js={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:z.unknown(),design:"plumbing",description:"current paint ({ type, color?, gradient?, src?, fit?, repeat?, tileSize?, preset?, palette?, postPreset?, opacity? }) (required)"},onChange:{schema:z.unknown(),design:"event",description:"called on any change (required)"}}};var Ks={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:z.enum(["row","col","row-reverse","col-reverse"]).optional(),design:"knob",description:"main-axis direction",default:"row"},gap:{schema:z.enum(["none","xs","sm","md","lg","xl","2xl"]).optional(),design:"knob",description:"gap between children",default:"none"},align:{schema:z.enum(["start","center","end","stretch","baseline"]).optional(),design:"knob",description:"cross-axis alignment",default:"stretch"},justify:{schema:z.enum(["start","center","end","between","around","evenly"]).optional(),design:"knob",description:"main-axis distribution",default:"start"},wrap:{schema:z.enum(["nowrap","wrap","wrap-reverse"]).optional(),design:"knob",description:"wrap behaviour when children overflow",default:"nowrap"},asChild:{schema:z.boolean().optional(),design:"plumbing",description:"render as the child element via Slot",default:false},className:{schema:z.string().optional(),design:"plumbing"},children:{schema:z.unknown(),design:"plumbing"}}};var qs={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: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: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:z.enum(["start","center","end","stretch"]).optional(),design:"knob",description:"cross-axis alignment of cells",default:"stretch"},asChild:{schema:z.boolean().optional(),design:"plumbing",description:"render as the child element via Slot",default:false},className:{schema:z.string().optional(),design:"plumbing"},children:{schema:z.unknown(),design:"plumbing"}}};var Ys={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:z.unknown().optional(),design:"plumbing"},defaultOpen:{schema:z.unknown().optional(),design:"plumbing"},onOpenChange:{schema:z.unknown().optional(),design:"event"},openDelay:{schema:z.unknown().optional(),design:"plumbing"},closeDelay:{schema:z.unknown().optional(),design:"plumbing"},asChild:{schema:z.boolean().optional(),design:"plumbing",description:"usually a Link or Button"},side:{schema:z.unknown().optional(),design:"plumbing"},align:{schema:z.unknown().optional(),design:"plumbing"},sideOffset:{schema:z.unknown().optional(),design:"plumbing"},alignOffset:{schema:z.unknown().optional(),design:"plumbing"},className:{schema:z.unknown().optional(),design:"plumbing"},surface:{schema: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 Zs={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:z.string().optional(),design:"content"},placeholder:{schema: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: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: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: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 Js={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:z.string().optional(),design:"content",description:"binds to the input's id"},size:{schema: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 Qs={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:z.unknown().optional(),design:"plumbing",description:"artwork keyed by lockup then appearance: { square?: { light?, dark?, mono? }, horizontal?: {...}, icon?: {...} }. Each slot is any node (inline <svg>, <img>, component). OMIT ENTIRELY and the GRADE MARK renders (the square G-arrow, painted with currentColor so it sits correctly on any surface). A bare <Logo /> is always correct branding."},size:{schema:z.enum(["sm","md","lg","xl"]).optional(),design:"knob",description:'height of the mark: 20 / 28 / 40 / 56px (a raw pixel number also works). Width is intrinsic (square/icon 1:1, horizontal keeps its ratio). Default "md"; use "sm" in dense rails and toolbars.'},lockup:{schema:z.enum(["square","horizontal","icon"]).optional(),design:"knob",description:'which shape to show; falls back to the next-best available artwork. Default "horizontal".'},mode:{schema:z.enum(["light","dark"]).optional(),design:"knob",description:'the background the logo SITS ON, selecting light/dark artwork. Explicit, not theme-coupled. Default "light".'},mono:{schema:z.boolean().optional(),design:"knob",description:"render the single-colour treatment; inherits currentColor from the parent. Default false."},label:{schema:z.string().optional(),design:"content",description:'accessible name (aria-label + role="img"); pair with decorative when the brand name is already beside it.'},decorative:{schema:z.boolean().optional(),design:"knob",description:"aria-hidden, no role; use when text nearby names the brand."},href:{schema:z.string().optional(),design:"content",description:"renders the logo as a link (logo-links-home)."},className:{schema:z.string().optional(),design:"plumbing"}}};var el={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:z.unknown(),design:"plumbing",description:'"maplibre" (default, free, no key) | "mapbox" (needs accessToken) | "google" (needs apiKey). Switching is one prop change.'},center:{schema:z.unknown(),design:"plumbing",description:"`[lng, lat]` tuple. ALWAYS lng first. Required."},zoom:{schema:z.unknown(),design:"plumbing",description:"number, 0\u201322. Required."},bounds:{schema:z.unknown(),design:"plumbing",description:"`[[swLng, swLat], [neLng, neLat]]`. When set, takes precedence over center+zoom."},appearance:{schema:z.unknown(),design:"plumbing",description:'"light" | "dark" | "satellite" | "auto" (default "auto", follows GradeThemeProvider mode).'},hoveredId:{schema: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.'},onHoveredIdChange:{schema:z.unknown(),design:"event",description:"`(id: string | null) => void`. The other half of the controlled hover pair: fires when the pointer enters/leaves a marker so the sibling list can highlight in step. Without this entry in the contract, screens using the documented two-way sync fail save validation."},interactive:{schema:z.unknown(),design:"plumbing",description:"false freezes pan/zoom, useful for static cards."},tools:{schema:z.unknown(),design:"plumbing",description:'"auto" (default, zoom buttons follow `interactive`) | "zoom" (force zoom buttons) | "none" (chrome-free map; attribution always stays \u2014 license). One vocabulary across all providers.'},toolsPosition:{schema:z.unknown(),design:"plumbing",description:'"top-left" (default) | "top-right" | "bottom-left" | "bottom-right". Corner the tools dock to; use when a search bar or legend sits over the default corner.'},onLoad:{schema:z.unknown(),design:"event",description:"handle exposes flyTo, panTo, fitBounds, getCenter, getZoom, getBounds, instance."},tilerKey:{schema: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: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: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:z.unknown().optional(),design:"plumbing",description:"string. Required. Stable marker id; pair with Map's `hoveredId` for list\u2194map hover sync."},at:{schema:z.unknown().optional(),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:z.unknown().optional(),design:"plumbing",description:'"center" | "bottom" (default "bottom", pin tip sits on the coord). Only these two values.'},onClick:{schema:z.unknown().optional(),design:"event",description:"handler called with `({ id, coords, native })` on marker click."},children:{schema:z.unknown().optional(),design:"plumbing",description:"DOM rendered as the marker (Badge, Card, Avatar, or any element). Inherits `--gds-*` tokens."}}};var am=z.object({kind:z.literal("album"),artist:z.string(),title:z.string(),year:z.number().optional(),description:z.string().optional()}),rm=z.object({kind:z.literal("tv-show"),title:z.string(),year:z.number().optional(),description:z.string().optional()}),nm=z.object({kind:z.literal("movie"),title:z.string(),year:z.number().optional(),description:z.string().optional()}),im=z.object({kind:z.literal("game"),title:z.string(),description:z.string().optional()}),sm=z.object({kind:z.literal("book"),title:z.string().optional(),author:z.string().optional(),isbn:z.string().optional(),description:z.string().optional()}),lm=z.object({kind:z.literal("poster"),title:z.string(),year:z.number().optional(),description:z.string().optional()}),cm=z.object({kind:z.literal("portrait"),name:z.string().optional(),role:z.string().optional()}),dm=z.object({kind:z.literal("landscape"),location:z.string().optional(),mood:z.string().optional()}),pm=z.object({kind:z.literal("product"),name:z.string().optional(),brand:z.string().optional()}),um=z.object({kind:z.literal("food"),dish:z.string().optional(),cuisine:z.string().optional()}),mm=z.object({kind:z.literal("generic"),prompt:z.string()}),gm=z.union([z.object({kind:z.literal("video")}),z.object({kind:z.literal("audio")}),z.object({kind:z.literal("embed")}),z.object({kind:z.literal("3d")})]),fm=z.union([am,rm,nm,im,sm,lm,cm,dm,pm,um,mm,gm]),hm=z.enum(["video","square","portrait","wide","auto"]),bm=z.enum(["none","sm","md","lg","xl"]),vm=z.enum(["album","tv-show","movie","game","book","portrait","landscape","poster","product","food","video","audio","embed","3d","generic"]),ym=z.union([z.literal("auto"),z.literal("icon"),z.literal("none")]),Vn={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:vm.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:hm.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:bm.optional(),design:"knob",control:"toggle-group",label:"Corner radius",default:"lg",description:"Driven by the `--gds-media-radius` CSS variable."},border:{schema:z.boolean().optional(),design:"knob",label:"Show border",default:false},loading:{schema:z.boolean().optional(),design:"knob",label:"Loading state",default:false,description:"Overlays the muted-pulse skeleton on top of the slot."},emptyState:{schema:ym.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: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: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."},instanceId:{schema:z.string().optional(),design:"content",group:"image",control:"text",label:"Instance id",description:"Stable per-instance id stamped as `data-gds-instance-id`. Use when rendering MediaSurfaces from a data array (`.map(item => <MediaSurface instanceId={item.id} \u2026/>)`) \u2014 it's how Studio's selection + Fill flows tell one card apart from its siblings and patch only that entry. Was missing from this hand-authored contract while the component documented it, which made save validation reject the documented pattern (June 2026)."},source:{schema:fm.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:z.string().optional(),design:"plumbing"},style:{schema:z.record(z.string(),z.unknown()).optional(),design:"plumbing"},children:{schema: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: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: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:z.unknown().optional(),design:"plumbing",description:"Custom node shown while `loading` is true."},onVisibilityChange:{schema: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 tl={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:z.string(),design:"content",description:"display name of the message author"},timestamp:{schema:z.unknown().optional(),design:"plumbing",description:'string ("11:24", "2 hours ago") or any node for custom formatting'},avatar:{schema:z.unknown().optional(),design:"plumbing",description:"slot for any `<Avatar>` composition; omit for grouped messages from the same author"},badge:{schema:z.unknown().optional(),design:"plumbing",description:"small chip(s) next to the author name (OP, Bot, Admin, role tag)"},edited:{schema:z.union([z.boolean(),z.string()]).optional(),design:"knob",description:'renders "(edited)" hint next to timestamp; pass a string to customise ("(edited 2 minutes ago)")'},pinned:{schema:z.boolean().optional(),design:"knob",description:'renders a pin glyph + "Pinned" label above the header row for sticky / pinned messages'},actions:{schema:z.unknown().optional(),design:"plumbing",description:"end-of-header slot, typically hover-revealed icon buttons (reply / react / more)"},reactions:{schema:z.unknown().optional(),design:"plumbing",description:"slot below the body, typically a Row of reaction chips (emoji + count)"},threadCount:{schema:z.number().optional(),design:"knob",description:'renders a "N replies" link affordance below the body'},onThreadClick:{schema:z.unknown().optional(),design:"event",description:"handler for the threadCount affordance"},align:{schema: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: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:z.unknown(),design:"plumbing",description:"body content (plain text or rich nodes)"},className:{schema:z.string().optional(),design:"plumbing"}}};var Ps={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:z.enum(["play","strip"]).optional(),design:"knob",description:"play runs the film; strip lays",default:"play"}}};var Ms={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:z.string(),design:"content",description:"display name of the message author"},timestamp:{schema:z.unknown().optional(),design:"plumbing",description:'string ("11:24", "2 hours ago") or any node for custom formatting'},avatar:{schema:z.unknown().optional(),design:"plumbing",description:"slot for any `<Avatar>` composition; omit for grouped messages from the same author"},badge:{schema:z.unknown().optional(),design:"plumbing",description:"small chip(s) next to the author name (OP, Bot, Admin, role tag)"},edited:{schema:z.union([z.boolean(),z.string()]).optional(),design:"knob",description:'renders "(edited)" hint next to timestamp; pass a string to customise ("(edited 2 minutes ago)")'},pinned:{schema:z.boolean().optional(),design:"knob",description:'renders a pin glyph + "Pinned" label above the header row for sticky / pinned messages'},actions:{schema:z.unknown().optional(),design:"plumbing",description:"end-of-header slot, typically hover-revealed icon buttons (reply / react / more)"},reactions:{schema:z.unknown().optional(),design:"plumbing",description:"slot below the body, typically a Row of reaction chips (emoji + count)"},threadCount:{schema:z.number().optional(),design:"knob",description:'renders a "N replies" link affordance below the body'},onThreadClick:{schema:z.unknown().optional(),design:"event",description:"handler for the threadCount affordance"},align:{schema: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: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:z.unknown(),design:"plumbing",description:"body content (plain text or rich nodes)"},className:{schema:z.string().optional(),design:"plumbing"}}};var ol={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:z.enum(["play","strip"]).optional(),design:"knob",description:"play runs the film; strip lays",default:"play"}}};var al={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:z.unknown(),design:"plumbing"},value:{schema:z.string().optional(),design:"content",description:"controlled selection"},defaultValue:{schema:z.string().optional(),design:"content",description:"uncontrolled initial selection"},onValueChange:{schema:z.unknown().optional(),design:"event"},placeholder:{schema:z.string().optional(),design:"content",default:"Select\u2026"},searchPlaceholder:{schema:z.string().optional(),design:"content",default:"Search\u2026"},emptyMessage:{schema:z.string().optional(),design:"content",default:"Nothing matches."},maxCount:{schema:z.number().optional(),design:"knob",description:'badges shown on the trigger before collapsing to "+N more"'},searchable:{schema:z.boolean().optional(),design:"knob",description:"hide for short option lists",default:true},badgeDismissible:{schema:z.boolean().optional(),design:"knob",description:"show \xD7 on each selected badge",default:true},disabled:{schema:z.boolean().optional(),design:"knob"},modalPopover:{schema:z.boolean().optional(),design:"knob",description:"Popover modal mode",default:false},className:{schema:z.string().optional(),design:"plumbing"}}};var Ns={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:z.unknown().optional(),design:"plumbing"},defaultOpen:{schema:z.unknown().optional(),design:"plumbing"},onOpenChange:{schema:z.unknown().optional(),design:"event"},modal:{schema:z.unknown().optional(),design:"plumbing"},asChild:{schema:z.boolean().optional(),design:"plumbing",description:"usually a Button"},side:{schema:z.enum(["top","right","bottom","left"]).optional(),design:"knob"},align:{schema:z.enum(["start","center","end"]).optional(),design:"knob"},sideOffset:{schema:z.unknown().optional(),design:"plumbing"},alignOffset:{schema:z.unknown().optional(),design:"plumbing"},collisionPadding:{schema:z.unknown().optional(),design:"plumbing"},className:{schema:z.unknown().optional(),design:"plumbing"},surface:{schema: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 Es={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:z.number().optional(),design:"knob",description:"percent complete"},max:{schema:z.number().optional(),design:"knob"},className:{schema:z.string().optional(),design:"plumbing"}}};var Ls={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:z.string(),design:"content",description:"the radio value"},label:{schema:z.unknown().optional(),design:"plumbing",description:"title line"},description:{schema:z.unknown().optional(),design:"plumbing",description:"secondary line"},aside:{schema:z.unknown().optional(),design:"plumbing",description:"slot before the indicator (a Badge, price, hint)"},hideIndicator:{schema:z.boolean().optional(),design:"knob",description:"hide the dot; selection shown by the card border + background"},indicatorPosition:{schema:z.enum(["leading","trailing"]).optional(),design:"knob",description:"default trailing"},children:{schema:z.unknown().optional(),design:"plumbing",description:"arbitrary static content (image, custom layout) instead of label/description"}}};var As={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:z.string().optional(),design:"content",description:"controlled selection"},defaultValue:{schema:z.string().optional(),design:"content",description:"uncontrolled initial"},onValueChange:{schema:z.unknown().optional(),design:"event"},disabled:{schema:z.boolean().optional(),design:"knob"},orientation:{schema:z.enum(["horizontal","vertical"]).optional(),design:"knob",default:"vertical"},name:{schema:z.string().optional(),design:"content",description:"form name when posting natively"},id:{schema:z.string().optional(),design:"plumbing",description:"pair with a <Label htmlFor> for click-on-label"}}};var Ds={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:z.enum(["horizontal","vertical"]).optional(),design:"knob",description:"required; sets the axis the user drags along"},autoSaveId:{schema:z.string().optional(),design:"content",description:"persists user-adjusted sizes to localStorage under this id"},onLayout:{schema:z.unknown().optional(),design:"event"},defaultSize:{schema:z.number().optional(),design:"knob",description:"percent of group (0-100); siblings should sum to ~100"},minSize:{schema:z.unknown().optional(),design:"plumbing"},maxSize:{schema:z.number().optional(),design:"knob",description:"percent bounds"},collapsible:{schema:z.boolean().optional(),design:"knob",description:"allow this panel to collapse to zero"},collapsedSize:{schema:z.unknown().optional(),design:"plumbing"},onCollapse:{schema:z.unknown().optional(),design:"event"},onExpand:{schema:z.unknown().optional(),design:"event",description:"collapse behaviour controls"},withHandle:{schema:z.boolean().optional(),design:"knob",description:"show a visible drag affordance (default just a hit-zone)"}}};var Is={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:z.string(),design:"content",description:"URL or path to the .riv file"},stateMachines:{schema:z.union([z.string(),z.array(z.string())]).optional(),design:"knob",description:"state machine(s) to run"},artboard:{schema:z.string().optional(),design:"content",description:"artboard name; omit to use default"},controls:{schema:z.boolean().optional(),design:"knob",description:"viewer mode by default; set true for play/pause overlay",default:false},autoPlay:{schema:z.boolean().optional(),design:"knob",description:"respects reduced-motion",default:true},loop:{schema:z.boolean().optional(),design:"knob",default:true},pauseOffscreen:{schema:z.boolean().optional(),design:"knob",default:true},fit:{schema:z.enum(["contain","cover","fill","fitWidth","fitHeight","none"]).optional(),design:"knob",default:"contain"},stateMachineInputs:{schema:z.unknown().optional(),design:"plumbing"},aspect:{schema:z.enum(["video","square","portrait","wide","auto"]).optional(),design:"knob",default:"square"},radius:{schema:z.enum(["none","sm","md","lg","xl"]).optional(),design:"knob",default:"lg"},poster:{schema:z.string().optional(),design:"content",description:"image shown while the runtime loads"}}};var Hs={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:z.enum(["none","xs","sm","md","lg","xl","2xl"]).optional(),design:"knob",description:"gap between children",default:"md"},align:{schema:z.enum(["start","center","end","stretch","baseline"]).optional(),design:"knob",description:"cross-axis (vertical) alignment",default:"center"},justify:{schema:z.enum(["start","center","end","between","around","evenly"]).optional(),design:"knob",description:"main-axis distribution",default:"start"},wrap:{schema:z.boolean().optional(),design:"knob",description:"allow children to wrap onto additional lines when they overflow",default:false},asChild:{schema:z.boolean().optional(),design:"plumbing",description:"render as the child element via Slot",default:false},className:{schema:z.string().optional(),design:"plumbing"},children:{schema: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:z.unknown().optional(),design:"plumbing",description:"the tour. Each"}}};var zs={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:z.enum(["auto","always","scroll","hover"]).optional(),design:"knob",description:"when the scrollbar shows"},scrollHideDelay:{schema:z.number().optional(),design:"knob",description:'ms before "scroll"/"hover" scrollbars fade'},dir:{schema:z.enum(["ltr","rtl"]).optional(),design:"plumbing"},className:{schema:z.string().optional(),design:"plumbing",description:"set a height/max-height here, otherwise nothing scrolls"},orientation:{schema: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:z.enum(["none","sm","md","lg","xl"]).optional(),design:"knob",description:"vertical rhythm. Defaults to `lg`."},background:{schema:z.enum(["transparent","muted","card","primary","gradient"]).optional(),design:"knob",description:"tonal direction of the section bg."},surface:{schema: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:z.enum(["default","wide","narrow","full"]).optional(),design:"knob",description:"max-width of the inner content."},alignment:{schema:z.enum(["left","center","right"]).optional(),design:"knob",description:"header / CTA alignment."},titleSize:{schema:z.enum(["sm","md","lg","xl"]).optional(),design:"knob"},title:{schema:z.string().optional(),design:"plumbing"},subtitle:{schema:z.string().optional(),design:"content"},cta1:{schema:z.unknown().optional(),design:"plumbing",description:"string or `{ text, variant, href, onClick }` config"},backgroundImage:{schema:z.string().optional(),design:"content",description:"direct CSS background image url"},as:{schema:z.enum(["section","div","article"]).optional(),design:"knob",description:"semantic root"},fullBleed:{schema:z.boolean().optional(),design:"knob"}}};var _s={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",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:z.unknown().optional(),design:"plumbing"},onValueChange:{schema:z.unknown().optional(),design:"event"},defaultValue:{schema:z.unknown().optional(),design:"plumbing"},disabled:{schema:z.unknown().optional(),design:"plumbing",description:"Radix root"},size:{schema:z.enum(["default","sm","xs"]).optional(),design:"knob",description:"control density; wraps the clickable control, nest SelectValue inside"},placeholder:{schema:z.string().optional(),design:"content",description:"text when nothing is selected"}}};var Os={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:z.enum(["horizontal","vertical"]).optional(),design:"knob",description:'default "horizontal"'},decorative:{schema:z.boolean().optional(),design:"knob",description:"hide from a11y tree",default:true},className:{schema:z.string().optional(),design:"plumbing"}}};var Vs={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:z.string().optional(),design:"content",description:"currently selected preset id (controlled)"},onChange:{schema:z.unknown().optional(),design:"event",description:"called when the user clicks a preset card"},filterTags:{schema:z.string().optional(),design:"content",description:'only show presets matching at least one tag ("space" | "retro" | "motion" | "hero" | "background" \u2026)'},live:{schema:z.enum(["never","hover","always"]).optional(),design:"knob",description:"thumbnail render mode",default:"hover"},postPreset:{schema:z.string().optional(),design:"content",description:"shared post-FX preset applied to every thumbnail"},palette:{schema:z.unknown().optional(),design:"plumbing",description:"shared palette applied to every thumbnail"},columns:{schema:z.unknown().optional(),design:"plumbing",description:"grid columns at md+ breakpoint"}}};var Gs={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:z.string(),design:"content",description:"shader preset id from the registry"},live:{schema:z.enum(["never","hover","always"]).optional(),design:"knob",description:"when to run the live WebGL render",default:"hover"},postPreset:{schema:z.string().optional(),design:"content",description:"override the preset's default post-FX"},palette:{schema:z.unknown().optional(),design:"plumbing",description:"palette overrides for the preview"},aspect:{schema:z.enum(["video","square","portrait","wide"]).optional(),design:"knob",default:"video"},hideLabel:{schema:z.boolean().optional(),design:"knob",description:"hide the label strip under the preview",default:false},onClick:{schema:z.unknown().optional(),design:"event"}}};var Ws={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:z.unknown().optional(),design:"plumbing"},defaultOpen:{schema:z.unknown().optional(),design:"plumbing"},onOpenChange:{schema:z.unknown().optional(),design:"event"},modal:{schema:z.unknown().optional(),design:"plumbing"},asChild:{schema:z.boolean().optional(),design:"plumbing"},side:{schema:z.enum(["top","right","bottom","left"]).optional(),design:"knob",default:"right"},surface:{schema: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:z.string().optional(),design:"plumbing",description:"usually set a width (right/left) or height (top/bottom)"},SheetTitle:{schema:z.unknown(),design:"plumbing"}}};var Us={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:z.boolean().optional(),design:"knob",description:"controlled collapsed state (wire onCollapsedChange when set)"},defaultCollapsed:{schema:z.boolean().optional(),design:"knob",description:"uncontrolled initial value (default false)"},onCollapsedChange:{schema:z.unknown().optional(),design:"event"},collapsible:{schema:z.boolean().optional(),design:"knob",description:"show the affordance for the user to collapse (default true)"},variant:{schema: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:z.unknown().optional(),design:"plumbing",description:"brand / logo / org switcher; hides nothing when collapsed (centred)"},title:{schema:z.unknown().optional(),design:"plumbing",description:'group label, tracking-wide muted styling; hidden when sidebar is collapsed. CASE: static (non-collapsible) headers historically render UPPERCASE (Notion / Linear / Slack-style "GAMES", "FAVORITES"); collapsible headers render the authored case. Control it explicitly with titleTransform.'},titleTransform:{schema:z.enum(["uppercase","none"]).optional(),design:"knob",description:'title casing for BOTH header variants. "none" renders the authored case (sentence-case headers like a "Recents" list); "uppercase" forces the shouty group label. Unset = the per-variant legacy default above.'},icon:{schema:z.unknown().optional(),design:"plumbing",description:"optional icon beside the title"},trailing:{schema: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:z.boolean().optional(),design:"knob",description:"initial open state (default true)"},badge:{schema:z.unknown().optional(),design:"plumbing",description:"trailing count / label (hidden when collapsed)"},active:{schema:z.boolean().optional(),design:"knob",description:'current route; adds aria-current="page"'},href:{schema:z.string().optional(),design:"content",description:"renders as <a>; for routing use `asChild` with your link component"},asChild:{schema:z.boolean().optional(),design:"plumbing",description:"wrap a custom link (<Link href> from Next.js etc.) via Radix Slot"},asButton:{schema:z.boolean().optional(),design:"knob",description:"render as <button> for action rows (open dialog, log out)"},disabled:{schema:z.boolean().optional(),design:"knob"},collapsedLabel:{schema:z.unknown().optional(),design:"plumbing",description:"tooltip override when sidebar is collapsed (defaults to children text)"},size:{schema: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: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 $s={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:z.string().optional(),design:"plumbing",description:"required in practice; supply width/height utilities"}}};var js={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 w-full grow overflow-hidden rounded-full"},props:{value:{schema:z.number().optional(),design:"knob",description:"controlled value; ALWAYS an array even for a single-thumb slider (`[50]`)"},defaultValue:{schema:z.number().optional(),design:"knob",description:"uncontrolled initial; `[20, 80]` for a two-thumb range"},onValueChange:{schema:z.unknown().optional(),design:"event"},min:{schema:z.number().optional(),design:"knob"},max:{schema:z.number().optional(),design:"knob"},step:{schema:z.number().optional(),design:"knob"},disabled:{schema:z.boolean().optional(),design:"knob"},orientation:{schema:z.enum(["horizontal","vertical"]).optional(),design:"knob",default:"horizontal"},dir:{schema:z.enum(["ltr","rtl"]).optional(),design:"plumbing"},inverted:{schema:z.boolean().optional(),design:"knob",description:"flip the visual direction"},name:{schema:z.string().optional(),design:"content",description:"form name when posting natively"}}};var Ks={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:z.unknown(),design:"plumbing",description:"ordered list of unique ids; the source of truth for the order"},onReorder:{schema:z.unknown().optional(),design:"event",description:"fires with the new order after a drag that changed it"},strategy:{schema:z.enum(["vertical","horizontal","grid"]).optional(),design:"knob",description:"match the layout your items render in",default:"vertical"},disabled:{schema:z.boolean().optional(),design:"knob",description:"disable drag on every item"},Sortable:{schema:z.unknown(),design:"plumbing",description:"must match one entry in the parent `values` array (identity, not React key)"}}};var qs={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:z.enum(["none","xs","sm","md","lg","xl","2xl"]).optional(),design:"knob",description:"vertical gap between children",default:"md"},align:{schema:z.enum(["start","center","end","stretch"]).optional(),design:"knob",description:"cross-axis (horizontal) alignment of children",default:"stretch"},justify:{schema: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: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:z.string().optional(),design:"plumbing"},children:{schema:z.unknown(),design:"plumbing"}}};var Ys={name:"Swatch",description:'Showing a colour as a small chip \u2014 brand-pop strips, palette / accent pickers, theme previews, token galleries, "pick a colour" rows. Reach for `token` to bind to a live theme variable; `color` for raw values. A transparency checkerboard sits behind the fill so semi-transparent values read honestly.',import:"@gradeui/ui",aliases:["colour swatch","color swatch","colour chip","color chip","palette swatch","token swatch","brand pop","accent swatch","colour tile","color tile","paint chip","react native colour swatch"],subcomponents:["SwatchGroup"],composesWith:["Row (strip of swatches)","Stack","Grid (palette wall)","Field (as a colour-picker trailing slot)","Card (in a theme-preview)","RadioGroup (selectable accent set)","Label"],styleDefaults:{Swatch:"relative inline-block shrink-0 overflow-hidden shadow-elevation-1 size-8 rounded-[var(--radius)]",SwatchGroup:"inline-flex flex-wrap items-center"},variantDefaults:{size:"md",shape:"rounded"},props:{color:{schema:z.string().optional(),design:"content",description:"any raw CSS colour (`#1f6feb`, `oklch(...)`, `rgb(...)`, or `var(--x)`). Takes precedence over `token`. Use for one-off or external colours."},token:{schema:z.string().optional(),design:"content",description:'a Grade colour token NAME with no `--` and no `oklch()` wrap; resolved internally to `oklch(var(--<token>))`. THE design-system path \u2014 e.g. `token="brand-3"`, `token="primary"`, `token="chart-2"`. Re-voices live when the theme changes.'},size:{schema:z.enum(["xs","sm","md","lg","xl"]).optional(),design:"knob",description:"t-shirt scale, 20px \u2192 56px; default md (32px). Prefer over h-*/w-* utilities."},shape:{schema:z.enum(["square","rounded","circle"]).optional(),design:"knob",description:"default rounded (rides `--radius`); circle for dot pickers; square for a hard tile."},selected:{schema:z.boolean().optional(),design:"knob",description:"draws the shared selection ring (`--selected`). For palette / accent pickers."},onSelect:{schema:z.unknown().optional(),design:"event",description:"makes the swatch a pickable <button> (adds aria-pressed, focus ring, hover lift). Omit for a static display chip."},onColorChange:{schema:z.unknown().optional(),design:"event",description:'makes the swatch an editable colour well: hosts a native `<input type="color">` (the OS picker) behind the DS chip and fires with the new `#rrggbb`. Presentation stays the chip, interaction stays native. Use for inspector / control-panel colour fields instead of styling a raw colour input. Takes precedence over `onSelect`.'},label:{schema:z.unknown().optional(),design:"plumbing",description:"caption rendered beneath the chip; also becomes the accessible name + tooltip."},layout:{schema:z.enum(["row","stack"]).optional(),design:"knob",description:'`row` (default) spaces chips out; `stack` overlaps them into a coin-stack (the theme-picker / "key colours" treatment, where each chip\'s ring reads as the separating edge).'},gap:{schema:z.enum(["xs","sm","md","lg"]).optional(),design:"knob",description:"spacing between chips in `row` layout; default sm."}}};var Zs={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:z.boolean().optional(),design:"knob"},onCheckedChange:{schema:z.unknown().optional(),design:"event"},defaultChecked:{schema:z.boolean().optional(),design:"knob"},disabled:{schema:z.boolean().optional(),design:"knob"},id:{schema:z.string().optional(),design:"plumbing"}}};var Xs={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:z.unknown().optional(),design:"plumbing",description:"standard switch state"},label:{schema:z.unknown().optional(),design:"plumbing",description:"title line"},description:{schema:z.unknown().optional(),design:"plumbing",description:"secondary line"},aside:{schema:z.unknown().optional(),design:"plumbing",description:"slot before the indicator (a Badge, price, hint)"},hideIndicator:{schema:z.boolean().optional(),design:"knob",description:"hide the switch glyph; state shown by the card border + background"},indicatorPosition:{schema:z.enum(["leading","trailing"]).optional(),design:"knob",description:"default trailing"},children:{schema:z.unknown().optional(),design:"plumbing",description:"arbitrary static content instead of label/description"}}};var Qs={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:z.unknown(),design:"plumbing"},No:{schema:z.unknown(),design:"plumbing",description:"styling follows the active theme tokens"}}};var el={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:z.unknown().optional(),design:"plumbing"},value:{schema:z.unknown().optional(),design:"plumbing"},onValueChange:{schema:z.unknown().optional(),design:"event"},orientation:{schema:z.unknown().optional(),design:"plumbing"},size:{schema: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: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."},tooltip:{schema:z.string().optional(),design:"content",description:"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 tl={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: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 ol={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:z.enum(["mesh","waves","space","plasma","voronoi","synthwave"]).optional(),design:"knob",description:"shader preset id from the registry"},fragmentShader:{schema:z.string().optional(),design:"content",description:"user-authored GLSL body; takes precedence over preset"},onShaderError:{schema:z.unknown().optional(),design:"event",description:'fires on compile failure; scene falls back to `preset="space"`'},postPreset:{schema:z.enum(["none","vhs","cinematic","synthwave","crt"]).optional(),design:"knob",description:"post-processing pass",default:"vhs"},palette:{schema: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:z.unknown().optional(),design:"plumbing",description:"custom full scene factory; takes precedence over preset AND fragmentShader"},controls:{schema:z.boolean().optional(),design:"knob",description:"play/pause overlay",default:false},autoPlay:{schema:z.boolean().optional(),design:"knob",description:"respects reduced-motion",default:true},pauseOffscreen:{schema:z.boolean().optional(),design:"knob",description:"big win for WebGL battery life",default:true},aspect:{schema:z.enum(["video","square","portrait","wide","auto"]).optional(),design:"knob",default:"video"},maxDpr:{schema:z.number().optional(),design:"knob",description:"lower for thumbnails / low-end devices"},radius:{schema:z.enum(["none","sm","md","lg","xl"]).optional(),design:"knob",default:"lg"}}};var rl={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:z.enum(["top-left","top-center","top-right","bottom-left","bottom-center","bottom-right"]).optional(),design:"knob",default:"bottom-right"},theme:{schema:z.enum(["light","dark","system"]).optional(),design:"knob"},richColors:{schema:z.boolean().optional(),design:"knob",description:"colored variants for success/error/warning/info"},expand:{schema:z.boolean().optional(),design:"knob",description:"keep multiple toasts visually separated rather than stacked"},visibleToasts:{schema:z.number().optional(),design:"knob",description:"max concurrent toasts on screen (default 3)"},duration:{schema:z.number().optional(),design:"knob",description:"default ms before auto-dismiss"}}};var al={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:z.enum(["default","outline"]).optional(),design:"knob",description:"outline adds a border, default is borderless and ghost-like"},size:{schema:z.enum(["default","sm","lg"]).optional(),design:"knob"},pressed:{schema:z.boolean().optional(),design:"knob",description:"controlled pressed state"},defaultPressed:{schema:z.boolean().optional(),design:"knob",description:"uncontrolled initial state"},onPressedChange:{schema:z.unknown().optional(),design:"event"},disabled:{schema:z.boolean().optional(),design:"knob"},children:{schema:z.unknown(),design:"plumbing",description:"usually an icon or short label"}}};var nl={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:"flex items-center justify-center gap-1"},props:{type:{schema:z.enum(["single","multiple"]),design:"knob",description:"single picks one, multiple picks any number"},value:{schema:z.union([z.string(),z.array(z.string())]).optional(),design:"knob",description:"controlled; matches `type` (string for single, string[] for multiple)"},defaultValue:{schema:z.union([z.string(),z.array(z.string())]).optional(),design:"knob",description:"uncontrolled initial"},onValueChange:{schema:z.unknown().optional(),design:"event"},size:{schema:z.enum(["sm","md","lg, default md"]).optional(),design:"knob",description:"cascades to every ToggleGroupItem via context, matches Tabs/Button heights"},variant:{schema:z.enum(["default","outline"]).optional(),design:"knob"},tooltip:{schema: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:z.enum(["top","right","bottom",'left", default "top']).optional(),design:"knob",description:"side the tooltip renders on"},tooltipDelay:{schema:z.number().optional(),design:"knob",description:"per-item delay override; falls back to the upstream TooltipProvider's delayDuration"}}};var il={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:z.unknown(),design:"plumbing"},value:{schema:z.string().optional(),design:"content",description:"controlled selection"},defaultValue:{schema:z.string().optional(),design:"content",description:"uncontrolled initial selection"},onValueChange:{schema:z.unknown().optional(),design:"event"},placeholder:{schema:z.string().optional(),design:"content",default:"Select\u2026"},searchPlaceholder:{schema:z.string().optional(),design:"content",default:"Search\u2026"},emptyMessage:{schema:z.string().optional(),design:"content",default:"Nothing matches."},maxCount:{schema:z.number().optional(),design:"knob",description:'badges shown on the trigger before collapsing to "+N more"'},searchable:{schema:z.boolean().optional(),design:"knob",description:"hide for short option lists",default:true},badgeDismissible:{schema:z.boolean().optional(),design:"knob",description:"show \xD7 on each selected badge",default:true},disabled:{schema:z.boolean().optional(),design:"knob"},modalPopover:{schema:z.boolean().optional(),design:"knob",description:"Popover modal mode",default:false},className:{schema:z.string().optional(),design:"plumbing"}}};var rl={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:z.unknown().optional(),design:"plumbing"},defaultOpen:{schema:z.unknown().optional(),design:"plumbing"},onOpenChange:{schema:z.unknown().optional(),design:"event"},modal:{schema:z.unknown().optional(),design:"plumbing"},asChild:{schema:z.boolean().optional(),design:"plumbing",description:"usually a Button"},side:{schema:z.enum(["top","right","bottom","left"]).optional(),design:"knob"},align:{schema:z.enum(["start","center","end"]).optional(),design:"knob"},sideOffset:{schema:z.unknown().optional(),design:"plumbing"},alignOffset:{schema:z.unknown().optional(),design:"plumbing"},collisionPadding:{schema:z.unknown().optional(),design:"plumbing"},className:{schema:z.unknown().optional(),design:"plumbing"},surface:{schema: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 nl={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:z.number().optional(),design:"knob",description:"percent complete"},max:{schema:z.number().optional(),design:"knob"},className:{schema:z.string().optional(),design:"plumbing"}}};var il={name:"PropertyList",description:'Read-only display of the properties of a SINGLE item \u2014 detail panels, inspectors, "about this" cards, order/record summaries. It is a Table row transposed (schema vertical, one record). The value side is a polymorphic slot, so the same renderers that fill a Table cell (text, Badge, tag group, Avatar stack, date, link) drop straight into a row. For an EDITABLE field (label + control) use Field instead; a panel that flips between read and edit swaps a PropertyList for a stack of Fields.',import:"@gradeui/ui",aliases:["property list","properties","property panel","description list","definition list","detail list","key value","key-value","data list","field list","attributes","metadata list","record summary","detail panel","inspector fields","spec list"],composesWith:["Badge","Avatar","Table","Field","Separator","Card"],styleDefaults:{PropertyListRoot:"flex min-w-0 flex-col",PropertyListRow:"grid"},props:{layout:{schema:z.enum(["row","stack"]).optional(),design:"knob",description:"row (default): label column beside value; stack: label above value for narrow panels"},density:{schema:z.enum(["compact","default","relaxed"]).optional(),design:"knob",description:"row rhythm"},align:{schema:z.enum(["start","center"]).optional(),design:"knob",description:"default vertical alignment of label vs value; use start when values wrap (tag groups, multi-line)"},divider:{schema:z.boolean().optional(),design:"knob",description:"hairline rule between rows"},labelWidth:{schema:z.string().optional(),design:"content",description:"override the label column width (any CSS length); sets --gds-property-list-label-width"},children:{schema:z.unknown(),design:"plumbing"}}};var sl={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:z.string(),design:"content",description:"the radio value"},label:{schema:z.unknown().optional(),design:"plumbing",description:"title line"},description:{schema:z.unknown().optional(),design:"plumbing",description:"secondary line"},aside:{schema:z.unknown().optional(),design:"plumbing",description:"slot before the indicator (a Badge, price, hint)"},hideIndicator:{schema:z.boolean().optional(),design:"knob",description:"hide the dot; selection shown by the card border + background"},indicatorPosition:{schema:z.enum(["leading","trailing"]).optional(),design:"knob",description:"default trailing"},children:{schema:z.unknown().optional(),design:"plumbing",description:"arbitrary static content (image, custom layout) instead of label/description"}}};var ll={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:z.string().optional(),design:"content",description:"controlled selection"},defaultValue:{schema:z.string().optional(),design:"content",description:"uncontrolled initial"},onValueChange:{schema:z.unknown().optional(),design:"event"},disabled:{schema:z.boolean().optional(),design:"knob"},orientation:{schema:z.enum(["horizontal","vertical"]).optional(),design:"knob",default:"vertical"},name:{schema:z.string().optional(),design:"content",description:"form name when posting natively"},id:{schema:z.string().optional(),design:"plumbing",description:"pair with a <Label htmlFor> for click-on-label"}}};var cl={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:z.enum(["horizontal","vertical"]).optional(),design:"knob",description:"required; sets the axis the user drags along"},autoSaveId:{schema:z.string().optional(),design:"content",description:"persists user-adjusted sizes to localStorage under this id"},onLayout:{schema:z.unknown().optional(),design:"event"},defaultSize:{schema:z.number().optional(),design:"knob",description:"percent of group (0-100); siblings should sum to ~100"},minSize:{schema:z.unknown().optional(),design:"plumbing"},maxSize:{schema:z.number().optional(),design:"knob",description:"percent bounds"},collapsible:{schema:z.boolean().optional(),design:"knob",description:"allow this panel to collapse to zero"},collapsedSize:{schema:z.unknown().optional(),design:"plumbing"},onCollapse:{schema:z.unknown().optional(),design:"event"},onExpand:{schema:z.unknown().optional(),design:"event",description:"collapse behaviour controls"},withHandle:{schema:z.boolean().optional(),design:"knob",description:"show a visible drag affordance (default just a hit-zone)"}}};var dl={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:z.string(),design:"content",description:"URL or path to the .riv file"},stateMachines:{schema:z.union([z.string(),z.array(z.string())]).optional(),design:"knob",description:"state machine(s) to run"},artboard:{schema:z.string().optional(),design:"content",description:"artboard name; omit to use default"},controls:{schema:z.boolean().optional(),design:"knob",description:"viewer mode by default; set true for play/pause overlay",default:false},autoPlay:{schema:z.boolean().optional(),design:"knob",description:"respects reduced-motion",default:true},loop:{schema:z.boolean().optional(),design:"knob",default:true},pauseOffscreen:{schema:z.boolean().optional(),design:"knob",default:true},fit:{schema:z.enum(["contain","cover","fill","fitWidth","fitHeight","none"]).optional(),design:"knob",default:"contain"},stateMachineInputs:{schema:z.unknown().optional(),design:"plumbing"},aspect:{schema:z.enum(["video","square","portrait","wide","auto"]).optional(),design:"knob",default:"square"},radius:{schema:z.enum(["none","sm","md","lg","xl"]).optional(),design:"knob",default:"lg"},poster:{schema:z.string().optional(),design:"content",description:"image shown while the runtime loads"}}};var pl={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:z.enum(["none","xs","sm","md","lg","xl","2xl"]).optional(),design:"knob",description:"gap between children",default:"md"},align:{schema:z.enum(["start","center","end","stretch","baseline"]).optional(),design:"knob",description:"cross-axis (vertical) alignment",default:"center"},justify:{schema:z.enum(["start","center","end","between","around","evenly"]).optional(),design:"knob",description:"main-axis distribution",default:"start"},wrap:{schema:z.boolean().optional(),design:"knob",description:"allow children to wrap onto additional lines when they overflow",default:false},asChild:{schema:z.boolean().optional(),design:"plumbing",description:"render as the child element via Slot",default:false},className:{schema:z.string().optional(),design:"plumbing"},children:{schema:z.unknown(),design:"plumbing"}}};var ul={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:z.unknown().optional(),design:"plumbing",description:"the tour. Each"}}};var ml={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:z.enum(["auto","always","scroll","hover"]).optional(),design:"knob",description:"when the scrollbar shows"},scrollHideDelay:{schema:z.number().optional(),design:"knob",description:'ms before "scroll"/"hover" scrollbars fade'},dir:{schema:z.enum(["ltr","rtl"]).optional(),design:"plumbing"},className:{schema:z.string().optional(),design:"plumbing",description:"set a height/max-height here, otherwise nothing scrolls"},orientation:{schema:z.enum(["vertical","horizontal"]).optional(),design:"knob",default:"vertical"}}};var gl={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:z.enum(["none","sm","md","lg","xl"]).optional(),design:"knob",description:"vertical rhythm. Defaults to `lg`."},background:{schema:z.enum(["transparent","muted","card","primary","gradient"]).optional(),design:"knob",description:"tonal direction of the section bg."},surface:{schema: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:z.enum(["default","wide","narrow","full"]).optional(),design:"knob",description:"max-width of the inner content."},alignment:{schema:z.enum(["left","center","right"]).optional(),design:"knob",description:"header / CTA alignment."},titleSize:{schema:z.enum(["sm","md","lg","xl"]).optional(),design:"knob"},title:{schema:z.string().optional(),design:"plumbing"},subtitle:{schema:z.string().optional(),design:"content"},cta1:{schema:z.unknown().optional(),design:"plumbing",description:"string or `{ text, variant, href, onClick }` config"},backgroundImage:{schema:z.string().optional(),design:"content",description:"direct CSS background image url"},as:{schema:z.enum(["section","div","article"]).optional(),design:"knob",description:"semantic root"},fullBleed:{schema:z.boolean().optional(),design:"knob"}}};var fl={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-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring 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",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:z.unknown().optional(),design:"plumbing"},onValueChange:{schema:z.unknown().optional(),design:"event"},defaultValue:{schema:z.unknown().optional(),design:"plumbing"},disabled:{schema:z.unknown().optional(),design:"plumbing",description:"Radix root"},size:{schema:z.enum(["default","sm","xs"]).optional(),design:"knob",description:"control density; wraps the clickable control, nest SelectValue inside"},placeholder:{schema:z.string().optional(),design:"content",description:"text when nothing is selected"}}};var hl={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:z.enum(["horizontal","vertical"]).optional(),design:"knob",description:'default "horizontal"'},decorative:{schema:z.boolean().optional(),design:"knob",description:"hide from a11y tree",default:true},className:{schema:z.string().optional(),design:"plumbing"}}};var bl={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:z.string().optional(),design:"content",description:"currently selected preset id (controlled)"},onChange:{schema:z.unknown().optional(),design:"event",description:"called when the user clicks a preset card"},filterTags:{schema:z.string().optional(),design:"content",description:'only show presets matching at least one tag ("space" | "retro" | "motion" | "hero" | "background" \u2026)'},live:{schema:z.enum(["never","hover","always"]).optional(),design:"knob",description:"thumbnail render mode",default:"hover"},postPreset:{schema:z.string().optional(),design:"content",description:"shared post-FX preset applied to every thumbnail"},palette:{schema:z.unknown().optional(),design:"plumbing",description:"shared palette applied to every thumbnail"},columns:{schema:z.unknown().optional(),design:"plumbing",description:"grid columns at md+ breakpoint"}}};var vl={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:z.string(),design:"content",description:"shader preset id from the registry"},live:{schema:z.enum(["never","hover","always"]).optional(),design:"knob",description:"when to run the live WebGL render",default:"hover"},postPreset:{schema:z.string().optional(),design:"content",description:"override the preset's default post-FX"},palette:{schema:z.unknown().optional(),design:"plumbing",description:"palette overrides for the preview"},aspect:{schema:z.enum(["video","square","portrait","wide"]).optional(),design:"knob",default:"video"},hideLabel:{schema:z.boolean().optional(),design:"knob",description:"hide the label strip under the preview",default:false},onClick:{schema:z.unknown().optional(),design:"event"}}};var yl={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:z.unknown().optional(),design:"plumbing"},defaultOpen:{schema:z.unknown().optional(),design:"plumbing"},onOpenChange:{schema:z.unknown().optional(),design:"event"},modal:{schema:z.unknown().optional(),design:"plumbing"},asChild:{schema:z.boolean().optional(),design:"plumbing"},side:{schema:z.enum(["top","right","bottom","left"]).optional(),design:"knob",default:"right"},surface:{schema: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:z.string().optional(),design:"plumbing",description:"usually set a width (right/left) or height (top/bottom)"},SheetTitle:{schema:z.unknown(),design:"plumbing"}}};var xl={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:z.boolean().optional(),design:"knob",description:"controlled collapsed state (wire onCollapsedChange when set)"},defaultCollapsed:{schema:z.boolean().optional(),design:"knob",description:"uncontrolled initial value (default false)"},onCollapsedChange:{schema:z.unknown().optional(),design:"event"},collapsible:{schema:z.boolean().optional(),design:"knob",description:"show the affordance for the user to collapse (default true)"},variant:{schema: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:z.unknown().optional(),design:"plumbing",description:"brand / logo / org switcher; hides nothing when collapsed (centred)"},title:{schema:z.unknown().optional(),design:"plumbing",description:'group label, tracking-wide muted styling; hidden when sidebar is collapsed. CASE: static (non-collapsible) headers historically render UPPERCASE (Notion / Linear / Slack-style "GAMES", "FAVORITES"); collapsible headers render the authored case. Control it explicitly with titleTransform.'},titleTransform:{schema:z.enum(["uppercase","none"]).optional(),design:"knob",description:'title casing for BOTH header variants. "none" renders the authored case (sentence-case headers like a "Recents" list); "uppercase" forces the shouty group label. Unset = the per-variant legacy default above.'},icon:{schema:z.unknown().optional(),design:"plumbing",description:"optional icon beside the title"},trailing:{schema: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:z.boolean().optional(),design:"knob",description:"initial open state (default true)"},badge:{schema:z.unknown().optional(),design:"plumbing",description:"trailing count / label (hidden when collapsed)"},active:{schema:z.boolean().optional(),design:"knob",description:'current route; adds aria-current="page"'},href:{schema:z.string().optional(),design:"content",description:"renders as <a>; for routing use `asChild` with your link component"},asChild:{schema:z.boolean().optional(),design:"plumbing",description:"wrap a custom link (<Link href> from Next.js etc.) via Radix Slot"},asButton:{schema:z.boolean().optional(),design:"knob",description:"render as <button> for action rows (open dialog, log out)"},disabled:{schema:z.boolean().optional(),design:"knob"},collapsedLabel:{schema:z.unknown().optional(),design:"plumbing",description:"tooltip override when sidebar is collapsed (defaults to children text)"},size:{schema: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: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 wl={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:z.string().optional(),design:"plumbing",description:"required in practice; supply width/height utilities"}}};var kl={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 w-full grow overflow-hidden rounded-full"},props:{value:{schema:z.number().optional(),design:"knob",description:"controlled value; ALWAYS an array even for a single-thumb slider (`[50]`)"},defaultValue:{schema:z.number().optional(),design:"knob",description:"uncontrolled initial; `[20, 80]` for a two-thumb range"},onValueChange:{schema:z.unknown().optional(),design:"event"},min:{schema:z.number().optional(),design:"knob"},max:{schema:z.number().optional(),design:"knob"},step:{schema:z.number().optional(),design:"knob"},disabled:{schema:z.boolean().optional(),design:"knob"},orientation:{schema:z.enum(["horizontal","vertical"]).optional(),design:"knob",default:"horizontal"},dir:{schema:z.enum(["ltr","rtl"]).optional(),design:"plumbing"},inverted:{schema:z.boolean().optional(),design:"knob",description:"flip the visual direction"},name:{schema:z.string().optional(),design:"content",description:"form name when posting natively"}}};var Sl={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:z.unknown(),design:"plumbing",description:"ordered list of unique ids; the source of truth for the order"},onReorder:{schema:z.unknown().optional(),design:"event",description:"fires with the new order after a drag that changed it"},strategy:{schema:z.enum(["vertical","horizontal","grid"]).optional(),design:"knob",description:"match the layout your items render in",default:"vertical"},disabled:{schema:z.boolean().optional(),design:"knob",description:"disable drag on every item"},Sortable:{schema:z.unknown(),design:"plumbing",description:"must match one entry in the parent `values` array (identity, not React key)"}}};var Rl={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:z.enum(["none","xs","sm","md","lg","xl","2xl"]).optional(),design:"knob",description:"vertical gap between children",default:"md"},align:{schema:z.enum(["start","center","end","stretch"]).optional(),design:"knob",description:"cross-axis (horizontal) alignment of children",default:"stretch"},justify:{schema: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: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:z.string().optional(),design:"plumbing"},children:{schema:z.unknown(),design:"plumbing"}}};var Cl={name:"Swatch",description:'Showing a colour as a small chip \u2014 brand-pop strips, palette / accent pickers, theme previews, token galleries, "pick a colour" rows. Reach for `token` to bind to a live theme variable; `color` for raw values. A transparency checkerboard sits behind the fill so semi-transparent values read honestly.',import:"@gradeui/ui",aliases:["colour swatch","color swatch","colour chip","color chip","palette swatch","token swatch","brand pop","accent swatch","colour tile","color tile","paint chip","react native colour swatch"],subcomponents:["SwatchGroup"],composesWith:["Row (strip of swatches)","Stack","Grid (palette wall)","Field (as a colour-picker trailing slot)","Card (in a theme-preview)","RadioGroup (selectable accent set)","Label"],styleDefaults:{Swatch:"relative inline-block shrink-0 overflow-hidden shadow-elevation-1 size-8 rounded-[var(--radius)]",SwatchGroup:"inline-flex flex-wrap items-center"},variantDefaults:{size:"md",shape:"rounded"},props:{color:{schema:z.string().optional(),design:"content",description:"any raw CSS colour (`#1f6feb`, `oklch(...)`, `rgb(...)`, or `var(--x)`). Takes precedence over `token`. Use for one-off or external colours."},token:{schema:z.string().optional(),design:"content",description:'a Grade colour token NAME with no `--` and no `oklch()` wrap; resolved internally to `oklch(var(--<token>))`. THE design-system path \u2014 e.g. `token="brand-3"`, `token="primary"`, `token="chart-2"`. Re-voices live when the theme changes.'},size:{schema:z.enum(["xs","sm","md","lg","xl"]).optional(),design:"knob",description:"t-shirt scale, 20px \u2192 56px; default md (32px). Prefer over h-*/w-* utilities."},shape:{schema:z.enum(["square","rounded","circle"]).optional(),design:"knob",description:"default rounded (rides `--radius`); circle for dot pickers; square for a hard tile."},selected:{schema:z.boolean().optional(),design:"knob",description:"draws the shared selection ring (`--selected`). For palette / accent pickers."},onSelect:{schema:z.unknown().optional(),design:"event",description:"makes the swatch a pickable <button> (adds aria-pressed, focus ring, hover lift). Omit for a static display chip."},onColorChange:{schema:z.unknown().optional(),design:"event",description:'makes the swatch an editable colour well: hosts a native `<input type="color">` (the OS picker) behind the DS chip and fires with the new `#rrggbb`. Presentation stays the chip, interaction stays native. Use for inspector / control-panel colour fields instead of styling a raw colour input. Takes precedence over `onSelect`.'},label:{schema:z.unknown().optional(),design:"plumbing",description:"caption rendered beneath the chip; also becomes the accessible name + tooltip."},layout:{schema:z.enum(["row","stack"]).optional(),design:"knob",description:'`row` (default) spaces chips out; `stack` overlaps them into a coin-stack (the theme-picker / "key colours" treatment, where each chip\'s ring reads as the separating edge).'},gap:{schema:z.enum(["xs","sm","md","lg"]).optional(),design:"knob",description:"spacing between chips in `row` layout; default sm."}}};var Tl={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:z.boolean().optional(),design:"knob"},onCheckedChange:{schema:z.unknown().optional(),design:"event"},defaultChecked:{schema:z.boolean().optional(),design:"knob"},disabled:{schema:z.boolean().optional(),design:"knob"},id:{schema:z.string().optional(),design:"plumbing"}}};var Pl={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:z.unknown().optional(),design:"plumbing",description:"standard switch state"},label:{schema:z.unknown().optional(),design:"plumbing",description:"title line"},description:{schema:z.unknown().optional(),design:"plumbing",description:"secondary line"},aside:{schema:z.unknown().optional(),design:"plumbing",description:"slot before the indicator (a Badge, price, hint)"},hideIndicator:{schema:z.boolean().optional(),design:"knob",description:"hide the switch glyph; state shown by the card border + background"},indicatorPosition:{schema:z.enum(["leading","trailing"]).optional(),design:"knob",description:"default trailing"},children:{schema:z.unknown().optional(),design:"plumbing",description:"arbitrary static content instead of label/description"}}};var Nl={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:z.unknown(),design:"plumbing"},No:{schema:z.unknown(),design:"plumbing",description:"styling follows the active theme tokens"}}};var El={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:z.unknown().optional(),design:"plumbing"},value:{schema:z.unknown().optional(),design:"plumbing"},onValueChange:{schema:z.unknown().optional(),design:"event"},orientation:{schema:z.unknown().optional(),design:"plumbing"},size:{schema: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: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."},tooltip:{schema:z.string().optional(),design:"content",description:"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 Ll={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: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 Dl={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:z.enum(["mesh","waves","space","plasma","voronoi","synthwave"]).optional(),design:"knob",description:"shader preset id from the registry"},fragmentShader:{schema:z.string().optional(),design:"content",description:"user-authored GLSL body; takes precedence over preset"},onShaderError:{schema:z.unknown().optional(),design:"event",description:'fires on compile failure; scene falls back to `preset="space"`'},postPreset:{schema:z.enum(["none","vhs","cinematic","synthwave","crt"]).optional(),design:"knob",description:"post-processing pass",default:"vhs"},palette:{schema: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:z.unknown().optional(),design:"plumbing",description:"custom full scene factory; takes precedence over preset AND fragmentShader"},controls:{schema:z.boolean().optional(),design:"knob",description:"play/pause overlay",default:false},autoPlay:{schema:z.boolean().optional(),design:"knob",description:"respects reduced-motion",default:true},pauseOffscreen:{schema:z.boolean().optional(),design:"knob",description:"big win for WebGL battery life",default:true},aspect:{schema:z.enum(["video","square","portrait","wide","auto"]).optional(),design:"knob",default:"video"},maxDpr:{schema:z.number().optional(),design:"knob",description:"lower for thumbnails / low-end devices"},radius:{schema:z.enum(["none","sm","md","lg","xl"]).optional(),design:"knob",default:"lg"}}};var Al={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:z.enum(["top-left","top-center","top-right","bottom-left","bottom-center","bottom-right"]).optional(),design:"knob",default:"bottom-right"},theme:{schema:z.enum(["light","dark","system"]).optional(),design:"knob"},richColors:{schema:z.boolean().optional(),design:"knob",description:"colored variants for success/error/warning/info"},expand:{schema:z.boolean().optional(),design:"knob",description:"keep multiple toasts visually separated rather than stacked"},visibleToasts:{schema:z.number().optional(),design:"knob",description:"max concurrent toasts on screen (default 3)"},duration:{schema:z.number().optional(),design:"knob",description:"default ms before auto-dismiss"}}};var Il={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:z.enum(["default","outline"]).optional(),design:"knob",description:"outline adds a border, default is borderless and ghost-like"},size:{schema:z.enum(["default","sm","lg"]).optional(),design:"knob"},pressed:{schema:z.boolean().optional(),design:"knob",description:"controlled pressed state"},defaultPressed:{schema:z.boolean().optional(),design:"knob",description:"uncontrolled initial state"},onPressedChange:{schema:z.unknown().optional(),design:"event"},disabled:{schema:z.boolean().optional(),design:"knob"},children:{schema:z.unknown(),design:"plumbing",description:"usually an icon or short label"}}};var Hl={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:"flex items-center justify-center gap-1"},props:{type:{schema:z.enum(["single","multiple"]),design:"knob",description:"single picks one, multiple picks any number"},value:{schema:z.union([z.string(),z.array(z.string())]).optional(),design:"knob",description:"controlled; matches `type` (string for single, string[] for multiple)"},defaultValue:{schema:z.union([z.string(),z.array(z.string())]).optional(),design:"knob",description:"uncontrolled initial"},onValueChange:{schema:z.unknown().optional(),design:"event"},size:{schema:z.enum(["sm","md","lg, default md"]).optional(),design:"knob",description:"cascades to every ToggleGroupItem via context, matches Tabs/Button heights"},variant:{schema:z.enum(["default","outline"]).optional(),design:"knob"},tooltip:{schema: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:z.enum(["top","right","bottom",'left", default "top']).optional(),design:"knob",description:"side the tooltip renders on"},tooltipDelay:{schema:z.number().optional(),design:"knob",description:"per-item delay override; falls back to the upstream TooltipProvider's delayDuration"}}};var Fl={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,26 +104,26 @@ 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:z.unknown().optional(),design:"plumbing",description:"left-aligned region (logo + primary nav)"},center:{schema:z.unknown().optional(),design:"plumbing",description:"center region (search, page title, segmented control)"},trailing:{schema:z.unknown().optional(),design:"plumbing",description:"right-aligned region (action icons, avatar, primary CTA)"},children:{schema:z.unknown().optional(),design:"plumbing",description:"escape hatch; bypasses slot layout"},position:{schema:z.enum(["top","bottom","inline"]).optional(),design:"knob",description:"border placement",default:"top"},variant:{schema:z.enum(["default","subtle","transparent"]).optional(),design:"knob",default:"default"},size:{schema:z.enum(["sm","md","lg"]).optional(),design:"knob",description:"height + padding",default:"md"},sticky:{schema:z.boolean().optional(),design:"knob",description:"pin to top/bottom of scroll container",default:false},"aria-label":{schema:z.string().optional(),design:"content",description:"required by WAI-ARIA toolbar pattern",default:"Toolbar"},className:{schema:z.string().optional(),design:"plumbing"}}};var sl={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:z.number().optional(),design:"knob",description:"ms hover before show; mount ONCE near the app root"},skipDelayDuration:{schema:z.number().optional(),design:"knob",description:'ms gap that still feels like "same hover"'},open:{schema:z.unknown().optional(),design:"plumbing"},defaultOpen:{schema:z.unknown().optional(),design:"plumbing"},onOpenChange:{schema:z.unknown().optional(),design:"event"},asChild:{schema:z.boolean().optional(),design:"plumbing",description:"usually wraps a Button or icon"},side:{schema:z.enum(["top","right","bottom","left"]).optional(),design:"knob",default:"top"},align:{schema:z.enum(["start","center","end"]).optional(),design:"knob"},sideOffset:{schema:z.number().optional(),design:"knob"}}};var ll={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:z.string(),design:"content",description:"video URL"},controls:{schema:z.boolean().optional(),design:"knob",description:"show native controls; false for chromeless hero/background video",default:true},autoPlay:{schema:z.boolean().optional(),design:"knob",description:"forces muted=true (browser restriction)",default:false},loop:{schema:z.boolean().optional(),design:"knob",default:false},muted:{schema:z.boolean().optional(),design:"knob",default:false},pauseOffscreen:{schema:z.boolean().optional(),design:"knob",description:"pause when scrolled out of viewport",default:true},aspect:{schema:z.enum(["video","square","portrait","wide","auto"]).optional(),design:"knob",default:"video"},radius:{schema:z.enum(["none","sm","md","lg","xl"]).optional(),design:"knob",description:"driven by `--gds-media-radius`",default:"lg"},objectFit:{schema:z.enum(["cover","contain","fill"]).optional(),design:"knob",default:"cover"},poster:{schema: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:z.number().optional(),design:"knob"}}};var gn={Accordion:Gi,AiChat:Wi,AiChatComposer:Ui,AppShell:$i,Avatar:ji,BackgroundFill:Ki,Badge:Yi,Banner:Zi,Breadcrumb:Xi,Button:Ji,Calendar:Qi,Callout:es,Card:os,Carousel:rs,Chart:as,Checkbox:ns,CheckboxCard:is,Code:ss,Collapsible:ls,Command:cs,Composer:ds,DatePicker:ps,Dialog:us,DropdownMenu:ms,Field:gs,FillPicker:bs,Flex:vs,Grid:ys,HoverCard:xs,Input:ws,Label:Ss,Logo:Rs,Map:Cs,MediaSurface:un,Message:Ts,Motion:Ps,MultiSelect:Ms,Popover:Ns,Progress:Es,RadioCard:Ls,RadioGroup:As,Resizable:Ds,RivePlayer:Is,Row:Hs,ScreenAnimator:Fs,ScrollArea:zs,SectionBlock:Bs,Select:_s,Separator:Os,ShaderPresetPicker:Vs,ShaderPresetPreview:Gs,Sheet:Ws,Sidebar:Us,Skeleton:$s,Slider:js,Sortable:Ks,Stack:qs,Swatch:Ys,Switch:Zs,SwitchCard:Xs,Table:Qs,Tabs:el,Textarea:tl,ThreeScene:ol,Toast:rl,Toggle:al,ToggleGroup:nl,Toolbar:il,Tooltip:sl,VideoPlayer:ll};function am(e){return e?gn[e]??null:null}function nm(){return Object.keys(gn)}function c(...e){return twMerge(clsx(e))}var cm=Et.Root,cl=y.forwardRef(({className:e,...t},o)=>y.createElement(Et.Item,{ref:o,className:c("border-b",e),...t}));cl.displayName="AccordionItem";var dl=y.forwardRef(({className:e,children:t,...o},r)=>y.createElement(Et.Header,{className:"flex"},y.createElement(Et.Trigger,{ref:r,className:c("flex flex-1 items-center justify-between py-4 font-medium transition-all hover:underline [&[data-state=open]>svg]:rotate-180",e),...o},t,y.createElement(ChevronDown,{className:"h-4 w-4 shrink-0 transition-transform duration-200"}))));dl.displayName=Et.Trigger.displayName;var pl=y.forwardRef(({className:e,children:t,...o},r)=>y.createElement(Et.Content,{ref:r,className:"overflow-hidden text-sm transition-all data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down",...o},y.createElement("div",{className:c("pb-4 pt-0",e)},t)));pl.displayName=Et.Content.displayName;var ul=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"}}),pm={destructive:"alert",warning:"alert",info:"status",success:"status",default:"status"},ml=y.forwardRef(({className:e,variant:t,role:o,...r},n)=>y.createElement("div",{ref:n,role:o??pm[t??"default"],"data-gds-part":"callout",className:c(ul({variant:t}),e),...r}));ml.displayName="Callout";var fl=y.forwardRef(({className:e,...t},o)=>y.createElement("h5",{ref:o,"data-gds-part":"callout-title",className:c("mb-1 font-medium leading-none tracking-tight",e),...t}));fl.displayName="CalloutTitle";var gl=y.forwardRef(({className:e,...t},o)=>y.createElement("div",{ref:o,"data-gds-part":"callout-description",className:c("text-sm [&_p]:leading-relaxed",e),...t}));gl.displayName="CalloutDescription";var hl=cva("gds-app-shell min-h-screen w-full bg-background text-foreground grid",{variants:{nav:{none:"",top:"",side:"","three-pane":""}},defaultVariants:{nav:"none"}}),bl=cva("gds-app-shell-header",{variants:{sticky:{true:"sticky top-0 z-30",false:""}},defaultVariants:{sticky:false}}),vl=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}}),yl=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}}),xl=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"}}),wl=cva("gds-app-shell-footer border-t bg-background"),kl=y.forwardRef(({className:e,nav:t,asChild:o=false,...r},n)=>y.createElement(o?Slot:"div",{ref:n,"data-gds-part":"app-shell","data-nav":t??"none",className:c(hl({nav:t,className:e})),...r}));kl.displayName="AppShell";var Sl=y.forwardRef(({className:e,sticky:t,asChild:o=false,...r},n)=>y.createElement(o?Slot:"header",{ref:n,"data-gds-part":"app-shell-header",className:c(bl({sticky:t,className:e})),...r}));Sl.displayName="AppShellHeader";var Rl=y.forwardRef(({className:e,placement:t,sticky:o,asChild:r=false,...n},a)=>y.createElement(r?Slot:"nav",{ref:a,"data-gds-part":"app-shell-nav","data-placement":t??"top",className:c(vl({placement:t,sticky:o,className:e})),...n}));Rl.displayName="AppShellNav";var Cl=y.forwardRef(({className:e,sticky:t,asChild:o=false,...r},n)=>y.createElement(o?Slot:"aside",{ref:n,"data-gds-part":"app-shell-aside",className:c(yl({sticky:t,className:e})),...r}));Cl.displayName="AppShellAside";var Tl=y.forwardRef(({className:e,maxWidth:t,asChild:o=false,...r},n)=>y.createElement(o?Slot:"main",{ref:n,"data-gds-part":"app-shell-main",className:c(xl({maxWidth:t,className:e})),...r}));Tl.displayName="AppShellMain";var Pl=y.forwardRef(({className:e,asChild:t=false,...o},r)=>y.createElement(t?Slot:"footer",{ref:r,"data-gds-part":"app-shell-footer",className:c(wl({className:e})),...o}));Pl.displayName="AppShellFooter";var um=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"}}),Nl=y.forwardRef(({className:e,size:t,...o},r)=>y.createElement(uo.Root,{ref:r,"data-gds-part":"avatar","data-gds-size":t??"md",className:c(um({size:t}),e),...o}));Nl.displayName=uo.Root.displayName;var El=y.forwardRef(({className:e,...t},o)=>y.createElement(uo.Image,{ref:o,"data-gds-part":"avatar-image",className:c("aspect-square h-full w-full",e),...t}));El.displayName=uo.Image.displayName;var mm=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"}}),Ll=y.forwardRef(({className:e,tone:t,...o},r)=>y.createElement(uo.Fallback,{ref:r,"data-gds-part":"avatar-fallback","data-gds-tone":t??"muted",className:c(mm({tone:t}),e),...o}));Ll.displayName=uo.Fallback.displayName;var Dl=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 ma({className:e,variant:t,rounded:o,...r}){return y.createElement("div",{className:c(Dl({variant:t,rounded:o}),e),...r})}var yt={solid:"",translucent:"gds-surface-translucent",glass:"gds-surface-glass","glass-strong":"gds-surface-glass-strong"};function Ot(e,t){return e==="solid"?t:""}var Il=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}}),bm={destructive:"alert",warning:"alert",info:"status",success:"status",default:"status",announcement:"status"},Hl=y.forwardRef(({className:e,variant:t="default",align:o,sticky:r,surface:n="solid",dismissible:a,onDismiss:i,icon:s,action:l,role:d,children:p,...m},u)=>{let b=t??"default",f=d??bm[b];return y.createElement("div",{ref:u,role:f,"data-gds-part":"banner","data-variant":b,"data-surface":n,className:c(Il({variant:t,align:o,sticky:r}),yt[n],e),...m},s?y.createElement("span",{"data-gds-part":"banner-icon","aria-hidden":true,className:"shrink-0"},s):null,y.createElement("div",{"data-gds-part":"banner-content",className:"flex-1 min-w-0"},p),l?y.createElement("span",{"data-gds-part":"banner-action",className:"shrink-0"},l):null,a?y.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"},y.createElement(X,{className:"h-4 w-4"})):null)});Hl.displayName="Banner";var Dr=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 gds-button-raised-surface"},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"}}),ut=y.forwardRef(({className:e,variant:t,size:o,asChild:r=false,raised:n=false,...a},i)=>y.createElement(r?Slot:"button",{"data-gds-part":"button",className:c("gds-button",Dr({variant:t,size:o}),n&&"gds-button-raised",e),ref:i,...a}));ut.displayName="Button";function ga({className:e,classNames:t,showOutsideDays:o=true,captionLayout:r="label",buttonVariant:n="ghost",formatters:a,components:i,...s}){let l=getDefaultClassNames();return y.createElement(DayPicker,{showOutsideDays:o,className:c("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:d=>d.toLocaleString("default",{month:"short"}),...a},classNames:{root:c("w-fit",l.root),months:c("relative flex flex-col gap-4 md:flex-row",l.months),month:c("flex w-full flex-col gap-4",l.month),nav:c("absolute inset-x-0 top-0 flex w-full items-center justify-between gap-1",l.nav),button_previous:c(Dr({variant:n}),"h-[--cell-size] w-[--cell-size] select-none p-0 aria-disabled:opacity-50",l.button_previous),button_next:c(Dr({variant:n}),"h-[--cell-size] w-[--cell-size] select-none p-0 aria-disabled:opacity-50",l.button_next),month_caption:c("flex h-[--cell-size] w-full items-center justify-center px-[--cell-size]",l.month_caption),dropdowns:c("flex h-[--cell-size] w-full items-center justify-center gap-1.5 text-sm font-medium",l.dropdowns),dropdown_root:c("has-focus:border-ring border-input shadow-xs has-focus:ring-ring/50 has-focus:ring-[3px] relative rounded-md border",l.dropdown_root),dropdown:c("bg-popover absolute inset-0 opacity-0",l.dropdown),caption_label:c("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",l.caption_label),table:"w-full border-collapse",weekdays:c("flex",l.weekdays),weekday:c("text-muted-foreground flex-1 select-none rounded-md text-[0.8rem] font-normal",l.weekday),week:c("mt-2 flex w-full",l.week),week_number_header:c("w-[--cell-size] select-none",l.week_number_header),week_number:c("text-muted-foreground select-none text-[0.8rem]",l.week_number),day:c("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",l.day),range_start:c("bg-accent rounded-l-md",l.range_start),range_middle:c("rounded-none",l.range_middle),range_end:c("bg-accent rounded-r-md",l.range_end),today:c("bg-accent text-accent-foreground rounded-md data-[selected=true]:rounded-none",l.today),outside:c("text-muted-foreground aria-selected:text-muted-foreground",l.outside),disabled:c("text-muted-foreground opacity-50",l.disabled),hidden:c("invisible",l.hidden),...t},components:{Root:({className:d,rootRef:p,...m})=>y.createElement("div",{"data-slot":"calendar",ref:p,className:c(d),...m}),Chevron:({className:d,orientation:p,...m})=>p==="left"?y.createElement(ChevronLeftIcon,{className:c("size-4",d),...m}):p==="right"?y.createElement(ChevronRightIcon,{className:c("size-4",d),...m}):y.createElement(ChevronDownIcon,{className:c("size-4",d),...m}),DayButton:zl,WeekNumber:({children:d,...p})=>y.createElement("td",{...p},y.createElement("div",{className:"flex size-[--cell-size] items-center justify-center text-center"},d)),...i},...s})}function zl({className:e,day:t,modifiers:o,...r}){let n=getDefaultClassNames(),a=y.useRef(null);return y.useEffect(()=>{o.focused&&a.current?.focus();},[o.focused]),y.createElement(ut,{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:c("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 hn=y.createContext(null);function Fr(e){let t=y.useContext(hn);if(!t)throw new Error(`<${e}> must be rendered inside a <Carousel> root.`);return t}var Pm=5e3,Ro=y.forwardRef(({loop:e=true,align:t="start",slidesPerView:o=1,autoplay:r=false,draggable:n=true,onSlideChange:a,className:i,style:s,children:l,...d},p)=>{let m=y.useMemo(()=>({loop:e,align:t,slidesToScroll:1,watchDrag:n,containScroll:e?false:"trimSnaps"}),[e,t,n]),[u,b]=Rm(m),[f,h]=y.useState(0),[g,v]=y.useState(0),[k,x]=y.useState(false),[w,S]=y.useState(false),T=y.useRef(new Map),L=y.useRef(a);L.current=a;let B=y.useMemo(()=>r?r===true?{}:r:null,[r]);y.useEffect(()=>{if(!b)return;let R=()=>{h(b.selectedScrollSnap()),v(b.scrollSnapList().length),x(b.canScrollPrev()),S(b.canScrollNext()),L.current?.(b.selectedScrollSnap());};return R(),b.on("select",R),b.on("reInit",R),()=>{b.off("select",R),b.off("reInit",R);}},[b]);let V=y.useCallback(R=>{b&&b.selectedScrollSnap()===R&&b.scrollNext();},[b]),N=y.useRef(false),A=y.useRef(true),F=y.useRef(null);y.useImperativeHandle(p,()=>F.current),y.useEffect(()=>{if(!B?.pauseWhenOffscreen){A.current=true;return}let R=F.current;if(!R||typeof IntersectionObserver>"u")return;let O=new IntersectionObserver(fe=>{A.current=fe.some(ve=>ve.isIntersecting);},{threshold:.25});return O.observe(R),()=>O.disconnect()},[B?.pauseWhenOffscreen]),y.useEffect(()=>{if(!b||!B)return;let R=null,O=()=>{R&&clearTimeout(R);let ae=b.selectedScrollSnap(),xe=T.current.get(ae)??B.delay??Pm;R=setTimeout(()=>{if(N.current||!A.current){O();return}b.scrollNext();},xe);},fe=()=>O(),ve=()=>{R&&clearTimeout(R);},U=()=>O();return b.on("select",fe),b.on("pointerDown",ve),b.on("settle",U),O(),()=>{R&&clearTimeout(R),b.off("select",fe),b.off("pointerDown",ve),b.off("settle",U);}},[b,B]);let Q=()=>{B?.pauseOnHover!==false&&(N.current=true);},ge=()=>{N.current=false;},I=y.useMemo(()=>({api:b,selectedIndex:f,slideCount:g,canScrollPrev:k,canScrollNext:w,durationsRef:T,advanceFromSlide:V}),[b,f,g,k,w,V]),ee=`calc(100% / ${o})`;return y.createElement(hn.Provider,{value:I},y.createElement("div",{ref:F,"data-gds-part":"carousel",className:c("relative",i),style:{"--gds-carousel-slide-basis":ee,...s},onMouseEnter:Q,onMouseLeave:ge,...d},y.createElement("div",{ref:u,"data-gds-part":"carousel-viewport",className:"overflow-hidden",style:{borderRadius:"var(--gds-carousel-radius, var(--gds-media-radius, 0.5rem))"}},y.createElement("div",{"data-gds-part":"carousel-track",className:"flex",style:{gap:"var(--gds-carousel-gap, 0)",touchAction:"pan-y pinch-zoom"}},l))))});Ro.displayName="Carousel";var ha=y.forwardRef(({duration:e,className:t,style:o,children:r,...n},a)=>{let{durationsRef:i}=Fr("Carousel.Slide"),s=y.useRef(null);return y.useImperativeHandle(a,()=>s.current),y.useEffect(()=>{if(e==null)return;let l=s.current;if(!l?.parentElement)return;let d=Array.from(l.parentElement.children).indexOf(l);if(d<0)return;let p=i.current;return p.set(d,e),()=>{p.delete(d);}},[e,i]),y.createElement("div",{ref:s,"data-gds-part":"carousel-slide",className:c("min-w-0 shrink-0 grow-0",t),style:{flexBasis:"var(--gds-carousel-slide-basis, 100%)",...o},...n},r)});ha.displayName="Carousel.Slide";var bn=y.forwardRef(({src:e,poster:t,alt:o,controls:r=false,loop:n=true,fit:a="cover",duration:i,className:s,style:l,...d},p)=>{let{api:m,selectedIndex:u,advanceFromSlide:b}=Fr("Carousel.VideoSlide"),f=y.useRef(null),h=y.useRef(null);y.useImperativeHandle(p,()=>f.current);let[g,v]=y.useState(null);y.useEffect(()=>{let x=f.current;x?.parentElement&&v(Array.from(x.parentElement.children).indexOf(x));},[m]);let k=g!=null&&g===u;return y.useEffect(()=>{let x=h.current;if(x)if(k){let w=x.play();w&&typeof w.catch=="function"&&w.catch(()=>{});}else x.pause(),x.currentTime=0;},[k]),y.createElement(ha,{ref:f,duration:i,className:c("relative overflow-hidden bg-[var(--gds-media-placeholder-bg)]",s),style:l,"data-gds-part":"carousel-video-slide",...d},t&&y.createElement("img",{src:t,alt:o??"","aria-hidden":k,className:"absolute inset-0 h-full w-full",style:{objectFit:a,opacity:k?0:1,transition:"opacity var(--gds-carousel-fade-ms, 200ms) ease-out"}}),y.createElement("video",{ref:h,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:k?1:0,transition:"opacity var(--gds-carousel-fade-ms, 200ms) ease-out"},onEnded:()=>{n||g!=null&&b(g);}}))});bn.displayName="Carousel.VideoSlide";var vn=y.forwardRef(({position:e="below",renderDot:t,className:o,style:r,...n},a)=>{let{api:i,selectedIndex:s,slideCount:l}=Fr("Carousel.Dots");if(l<=1)return null;let d=Array.from({length:l},(m,u)=>u),p=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 y.createElement("div",{ref:a,"data-gds-part":"carousel-dots",className:c("flex items-center justify-center",o),style:{gap:"var(--gds-carousel-dots-spacing, 0.5rem)",...p,...r},...n},d.map(m=>{let u=m===s,b=()=>i?.scrollTo(m);return t?t({index:m,active:u,onClick:b}):y.createElement("button",{key:m,type:"button",onClick:b,"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))"}})}))});vn.displayName="Carousel.Dots";var yn=y.forwardRef(({position:e="overlay",className:t,style:o,...r},n)=>e==="outside"?y.createElement("div",{ref:n,"data-gds-part":"carousel-arrows",className:c("flex items-center justify-end gap-2 pt-2",t),style:o,...r},y.createElement(Ir,null),y.createElement(Hr,null)):y.createElement("div",{ref:n,"data-gds-part":"carousel-arrows",className:c("pointer-events-none absolute inset-0 z-[1]",t),style:o,...r},y.createElement(Ir,{className:"pointer-events-auto absolute left-[var(--gds-carousel-arrow-inset,0.75rem)] top-1/2 -translate-y-1/2"}),y.createElement(Hr,{className:"pointer-events-auto absolute right-[var(--gds-carousel-arrow-inset,0.75rem)] top-1/2 -translate-y-1/2"})));yn.displayName="Carousel.Arrows";var Ir=y.forwardRef(({className:e,style:t,children:o,...r},n)=>{let{api:a,canScrollPrev:i}=Fr("Carousel.Prev");return y.createElement("button",{ref:n,type:"button","data-gds-part":"carousel-prev","aria-label":"Previous slide",disabled:!i,onClick:()=>a?.scrollPrev(),className:c("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??y.createElement(ChevronLeft,{className:"h-4 w-4","aria-hidden":true}))});Ir.displayName="Carousel.Prev";var Hr=y.forwardRef(({className:e,style:t,children:o,...r},n)=>{let{api:a,canScrollNext:i}=Fr("Carousel.Next");return y.createElement("button",{ref:n,type:"button","data-gds-part":"carousel-next","aria-label":"Next slide",disabled:!i,onClick:()=>a?.scrollNext(),className:c("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??y.createElement(ChevronRight,{className:"h-4 w-4","aria-hidden":true}))});Hr.displayName="Carousel.Next";Ro.Slide=ha;Ro.VideoSlide=bn;Ro.Dots=vn;Ro.Arrows=yn;Ro.Prev=Ir;Ro.Next=Hr;var Mm=Ro;function Nm(){return y.useContext(hn)?.api}var Bl=y.forwardRef(({className:e,surface:t="solid",...o},r)=>y.createElement("div",{ref:r,"data-gds-part":"card","data-surface":t,className:c("gds-card rounded-xl border text-card-foreground shadow",Ot(t,"bg-card"),yt[t],e),...o}));Bl.displayName="Card";var _l=y.forwardRef(({className:e,...t},o)=>y.createElement("div",{ref:o,"data-gds-part":"card-header",className:c("flex flex-col space-y-1.5 p-6",e),...t}));_l.displayName="CardHeader";var Ol=y.forwardRef(({className:e,...t},o)=>y.createElement("div",{ref:o,"data-gds-part":"card-title",className:c("font-semibold leading-none tracking-tight",e),...t}));Ol.displayName="CardTitle";var Vl=y.forwardRef(({className:e,...t},o)=>y.createElement("div",{ref:o,"data-gds-part":"card-description",className:c("text-sm text-muted-foreground",e),...t}));Vl.displayName="CardDescription";var Gl=y.forwardRef(({className:e,...t},o)=>y.createElement("div",{ref:o,"data-gds-part":"card-content",className:c("p-6 pt-0",e),...t}));Gl.displayName="CardContent";var Wl=y.forwardRef(({className:e,...t},o)=>y.createElement("div",{ref:o,"data-gds-part":"card-footer",className:c("flex items-center p-6 pt-0",e),...t}));Wl.displayName="CardFooter";var Ul=y.forwardRef(({className:e,...t},o)=>y.createElement(zr.Root,{ref:o,className:c("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},y.createElement(zr.Indicator,{className:c("flex items-center justify-center text-current")},y.createElement(Check,{className:"h-4 w-4"}))));Ul.displayName=zr.Root.displayName;var xn=y.createContext(null),ba=y.forwardRef(({className:e,...t},o)=>{let r=y.useContext(xn);return y.createElement("label",{ref:o,htmlFor:r?.controlId,className:c("text-sm font-medium leading-none text-foreground cursor-pointer peer-disabled:cursor-not-allowed peer-disabled:opacity-70",e),...t})});ba.displayName="Field.Label";var va=y.forwardRef(({className:e,...t},o)=>{let r=y.useContext(xn);return y.createElement("p",{ref:o,id:r?.descriptionId,className:c("text-sm text-muted-foreground",e),...t})});va.displayName="Field.Description";var ya=y.forwardRef(({className:e,...t},o)=>y.createElement("div",{ref:o,className:c("flex shrink-0 items-center gap-2",e),...t}));ya.displayName="Field.Trailing";var $l=y.forwardRef(({layout:e="option",className:t,children:o,...r},n)=>{let a=y.useId(),i=null,s=null,l=null,d=null;y.Children.forEach(o,v=>{y.isValidElement(v)&&(v.type===ba?i=v:v.type===va?s=v:v.type===ya?l=v:d||(d=v));});let p=d,m=p?.props??{},u=m.id??`${a}-control`,b=s?`${a}-description`:void 0,f=[m["aria-describedby"],b].filter(Boolean).join(" ")||void 0,h=p?y.cloneElement(p,{id:u,"aria-describedby":f}):null,g=y.createElement("div",{className:"flex min-w-0 flex-col gap-0.5"},i,s);return y.createElement(xn.Provider,{value:{controlId:u,descriptionId:b}},y.createElement("div",{ref:n,"data-gds-part":"field","data-layout":e,className:c("flex gap-3",e==="setting"?"items-center justify-between":s?"items-start":"items-center",t),...r},e==="setting"?y.createElement(y.Fragment,null,g,y.createElement("div",{className:"flex shrink-0 items-center gap-2"},l,h)):y.createElement(y.Fragment,null,y.createElement("div",{className:c("shrink-0",s?"mt-0.5":void 0)},h),y.createElement("div",{className:"flex min-w-0 flex-1 flex-col gap-0.5"},i,s),l)))});$l.displayName="Field";var Lm=Object.assign($l,{Label:ba,Description:va,Trailing:ya});function wn({label:e,description:t,aside:o,hideIndicator:r,indicatorPosition:n="trailing",titleId:a,descriptionId:i,indicator:s,children:l}){let d=l!=null?y.createElement("div",{className:"gds-selection-card__slot"},l):y.createElement("div",{className:"gds-selection-card__content"},e!=null&&y.createElement("span",{id:a,className:"gds-selection-card__title"},e),t!=null&&y.createElement("span",{id:i,className:"gds-selection-card__desc"},t)),p=r?null:s;return n==="leading"?y.createElement(y.Fragment,null,p,d,o):y.createElement(y.Fragment,null,d,o,p)}var Dm=y.createElement("span",{className:"gds-selection-indicator gds-selection-indicator--radio","aria-hidden":true},y.createElement(No.Indicator,{className:"gds-selection-indicator__dot"})),Im=y.createElement("span",{className:"gds-selection-indicator gds-selection-indicator--checkbox","aria-hidden":true},y.createElement(zr.Indicator,{className:"gds-selection-indicator__check"},y.createElement(Check,{className:"h-3.5 w-3.5",strokeWidth:3}))),Hm=y.createElement("span",{className:"gds-selection-indicator gds-selection-indicator--switch","aria-hidden":true},y.createElement(Zr.Thumb,{className:"gds-selection-indicator__thumb"})),jl=y.forwardRef(({className:e,label:t,description:o,aside:r,hideIndicator:n,indicatorPosition:a="trailing",children:i,...s},l)=>{let d=y.useId(),p=t!=null?`${d}-t`:void 0,m=o!=null?`${d}-d`:void 0;return y.createElement(No.Item,{ref:l,"data-gds-part":"radio-card","data-indicator":a,"aria-labelledby":p,"aria-describedby":m,className:c("gds-selection-card",e),...s},y.createElement(wn,{label:t,description:o,aside:r,hideIndicator:n,indicatorPosition:a,titleId:p,descriptionId:m,indicator:Dm},i))});jl.displayName="RadioCard";var Kl=y.forwardRef(({className:e,label:t,description:o,aside:r,hideIndicator:n,indicatorPosition:a="trailing",children:i,...s},l)=>{let d=y.useId(),p=t!=null?`${d}-t`:void 0,m=o!=null?`${d}-d`:void 0;return y.createElement(zr.Root,{ref:l,"data-gds-part":"checkbox-card","data-indicator":a,"aria-labelledby":p,"aria-describedby":m,className:c("gds-selection-card",e),...s},y.createElement(wn,{label:t,description:o,aside:r,hideIndicator:n,indicatorPosition:a,titleId:p,descriptionId:m,indicator:Im},i))});Kl.displayName="CheckboxCard";var ql=y.forwardRef(({className:e,label:t,description:o,aside:r,hideIndicator:n,indicatorPosition:a="trailing",children:i,...s},l)=>{let d=y.useId(),p=t!=null?`${d}-t`:void 0,m=o!=null?`${d}-d`:void 0;return y.createElement(Zr.Root,{ref:l,"data-gds-part":"switch-card","data-indicator":a,"aria-labelledby":p,"aria-describedby":m,className:c("gds-selection-card",e),...s},y.createElement(wn,{label:t,description:o,aside:r,hideIndicator:n,indicatorPosition:a,titleId:p,descriptionId:m,indicator:Hm},i))});ql.displayName="SwitchCard";var mr={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}},Sa=.55;function Ce(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 Ra(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 Ce(o,r);}function kn(e){return e instanceof DOMException&&e.name==="AbortError"}var Br="data-motion",Yl="off",Zl="(prefers-reduced-motion: reduce)";function Fm(){if(typeof window>"u"||typeof document>"u")return false;let e=window.matchMedia(Zl).matches,t=document.documentElement.getAttribute(Br)===Yl;return e||t}function fo(){let[e,t]=y.useState(false);return y.useEffect(()=>{let o=()=>t(Fm());o();let r=window.matchMedia(Zl);r.addEventListener("change",o);let n=new MutationObserver(o);return n.observe(document.documentElement,{attributes:true,attributeFilter:[Br]}),()=>{r.removeEventListener("change",o),n.disconnect();}},[]),e}var Co=fo;function _r(){let[e,t]=y.useState(true);return y.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 zm(e){if(typeof document>"u")return;let t=document.documentElement;e?t.removeAttribute(Br):t.setAttribute(Br,Yl);}var Bm=2e3,_m={tokenStagger:0,lineStagger:0,preDelay:0,fadeMs:0};function To(e){let{steps:t,interpret:o,speed:r="normal",trigger:n="mount",play:a,loop:i=false,loopDelay:s=Bm,maxLoops:l=1/0,containerRef:d,onComplete:p,onLoopReset:m}=e,u=fo(),b=u?_m:mr[r],f=u?false:i,h=_r(),[g,v]=y.useState(false),[k,x]=y.useState(false),[w,S]=y.useState(-1),T=y.useRef(null),L=useInView(d??T,{once:true,amount:Sa}),B=useInView(d??T,{amount:Sa}),V=h&&(d?B:true),[N,A]=y.useState(0),F=y.useMemo(()=>n==="mount"?true:n==="inView"?L:!!a||N>0,[n,L,a,N]),Q=y.useRef(o);Q.current=o;let ge=y.useRef(p);ge.current=p;let I=y.useRef(m);I.current=m;let ee=y.useRef(null),R=y.useRef(null),O=y.useCallback(()=>{ee.current?.abort(),ee.current=null,R.current!==null&&(window.clearTimeout(R.current),R.current=null),v(false);},[]),fe=y.useCallback(()=>{A(U=>U+1);},[]),ve=y.useCallback((U=0)=>{if(ee.current?.abort(),ee.current=null,R.current!==null&&(window.clearTimeout(R.current),R.current=null),U>0){R.current=window.setTimeout(()=>{R.current=null,A(ae=>ae+1);},U);return}A(ae=>ae+1);},[]);return y.useEffect(()=>()=>{R.current!==null&&(window.clearTimeout(R.current),R.current=null);},[]),y.useEffect(()=>{if(!t||t.length===0||!u&&(!F||!V))return;let U=new AbortController;ee.current=U;let{signal:ae}=U,Te={speed:b,signal:ae,cancelled:()=>ae.aborted,reduced:u},ie=true,C=0;return (async()=>{do{v(true),x(false),S(-1);try{await Ce(n==="inView"?b.preDelay:0,ae);for(let G=0;G<t.length;G++){if(ae.aborted)return;S(G),await Q.current(t[G],Te);}if(ae.aborted)return;if(S(-1),x(!0),ge.current?.(),C+=1,!f||C>=l){v(!1);return}if(await Ce(s,ae),ae.aborted)return;I.current?.();}catch(G){if(kn(G))return;process.env.NODE_ENV!=="production"&&console.error("[useScriptedDemo] step error:",G),v(false);return}}while(ie&&f&&!ae.aborted)})(),()=>{ie=false,U.abort(),ee.current===U&&(ee.current=null);}},[t,F,V,f,s,b,n,N,u]),{isPlaying:g,isComplete:k,currentIndex:w,play:fe,stop:O,restart:ve}}var Ta=y.forwardRef(function({variant:t="inline",className:o,...r},n){return y.createElement("span",{ref:n,"data-gds-part":"demo-cursor","data-gds-variant":t,"aria-hidden":true,className:c("gds-demo-cursor",o),...r})});var Jl=y.createContext({visible:new Set,hasStage:false,reducedMotion:false,defaultAnimation:"fade-up"});function Ql({steps:e,speed:t="normal",trigger:o="mount",play:r,loop:n=false,defaultAnimation:a="fade-up",visibleWhenIdle:i=true,className:s,children:l}){let d=useReducedMotion()??false,p=y.useRef(null),[m,u]=y.useState(()=>new Set),b=!!(e&&e.length);To({steps:b?e:void 0,speed:t,trigger:o,play:r,loop:n,containerRef:p,onLoopReset:()=>u(new Set),interpret:async(g,v)=>{if(g.type==="wait")return Ce(g.ms,v.signal);if(g.type==="reset")return u(new Set),Ce(v.speed.preDelay,v.signal);if(g.type==="reveal")return u(k=>{if(k.has(g.target))return k;let x=new Set(k);return x.add(g.target),x}),Ce(v.speed.lineStagger,v.signal);if(g.type==="reveal-all")return u(k=>{let x=new Set(k);return x.add("__all__"),x}),Ce(v.speed.lineStagger,v.signal);if(g.type==="hide")return u(k=>{if(!k.has(g.target))return k;let x=new Set(k);return x.delete(g.target),x}),Ce(v.speed.fadeMs,v.signal)}});let f=y.useMemo(()=>({visible:b?m:new Set(["__all__"]),hasStage:true,reducedMotion:d,defaultAnimation:a}),[b,m,d,a]),h=!b&&!i?{...f,visible:new Set}:f;return y.createElement("div",{ref:p,"data-gds-part":"demo-stage","data-gds-stage-playing":b?"true":"false",className:s},y.createElement(Jl.Provider,{value:h},l))}var Gm={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 ec({id:e,animation:t,durationMs:o,hideOutsideStage:r=false,onReveal:n,onHide:a,className:i,children:s}){let l=y.useContext(Jl),d=l.hasStage?l.visible.has("__all__")||l.visible.has(e):!r,p=y.useRef(d),m=y.useRef(n),u=y.useRef(a);m.current=n,u.current=a,y.useEffect(()=>{d!==p.current&&(p.current=d,d?m.current?.():u.current?.());},[d]);let b=t??l.defaultAnimation,f=Gm[b],h=(o??280)/1e3;return l.reducedMotion?y.createElement("div",{"data-gds-part":"reveal","data-gds-reveal-id":e,"data-gds-revealed":d?"true":"false",className:i,style:{opacity:d?1:0}},s):y.createElement(motion.div,{"data-gds-part":"reveal","data-gds-reveal-id":e,"data-gds-revealed":d?"true":"false",className:i,initial:f.initial,animate:d?f.animate:f.initial,transition:{duration:h,ease:[.22,1,.36,1]}},s)}var $m={xs:"text-xs",sm:"text-sm",md:"text-base"},jm={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}},Km={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 qm(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 oc=y.forwardRef(function({source:t,language:o="tsx",highlight:r,diff:n,reveal:a="none",trigger:i="mount",play:s,speed:l="normal",delay:d,stagger:p,showLineNumbers:m=false,filename:u,wrap:b=false,bare:f=false,prompt:h,cursor:g,steps:v,loop:k=false,size:x="sm",height:w,maxLines:S,className:T,style:L,...B},V){let N=jm[l],A=d??0,F=p??(a==="typewriter"?N.tokenStagger:N.lineStagger),Q=!!(v&&v.length),[ge,I]=y.useState(""),[ee,R]=y.useState(()=>new Set),O=Q?ge:t??"",fe=y.useMemo(()=>O.replace(/\n$/,""),[O]),ve=y.useMemo(()=>qm(r),[r]),U=!!(n?.added?.length||n?.removed?.length),ae=m||U,xe=y.useRef(null);y.useImperativeHandle(V,()=>xe.current);let[Te,ie]=y.useState(a==="none"),C=useInView(xe,{once:true,amount:.55}),K=i==="inView"?N.preDelay:0,G=i==="mount"?true:i==="inView"?C:!!s,Se=F,W=fe.split(`
108
- `).length,Ue=a==="typewriter"?fe.replace(/\s+/g," ").split(" ").length:W,Re=K+A+Ue*Se+280;y.useEffect(()=>{if(Q)return;if(!G||a==="none"){ie(a==="none");return}ie(false);let pe=window.setTimeout(()=>ie(true),Re);return ()=>window.clearTimeout(pe)},[G,a,Re,Q]);let Xe=y.useRef(""),z=y.useRef(new Set),$=y.useCallback(pe=>{Xe.current=pe,I(pe);},[]),_=y.useCallback(pe=>{z.current=pe,R(pe);},[]),{isComplete:se}=To({steps:Q?v:void 0,speed:l,trigger:"manual",play:G,loop:k,containerRef:xe,onLoopReset:()=>{$(""),_(new Set),ie(false);},interpret:async(pe,It)=>{let Be=It.signal;if(pe.type==="wait")return Ce(pe.ms,Be);if(pe.type==="clear"){$(""),_(new Set);return}if(pe.type==="output"){let te=Xe.current,Pe=te.length>0&&!te.endsWith(`
109
- `)?te+`
110
- `:te,Ht=Pe+pe.text,Fo=Pe.split(`
111
- `).length,pn=pe.text.split(`
112
- `).length,Rr=new Set(z.current);for(let rr=0;rr<pn;rr++)Rr.add(Fo+rr);return $(Ht),_(Rr),$(Ht+(Ht.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:z.unknown().optional(),design:"plumbing",description:"left-aligned region (logo + primary nav)"},center:{schema:z.unknown().optional(),design:"plumbing",description:"center region (search, page title, segmented control)"},trailing:{schema:z.unknown().optional(),design:"plumbing",description:"right-aligned region (action icons, avatar, primary CTA)"},children:{schema:z.unknown().optional(),design:"plumbing",description:"escape hatch; bypasses slot layout"},position:{schema:z.enum(["top","bottom","inline"]).optional(),design:"knob",description:"border placement",default:"top"},variant:{schema:z.enum(["default","subtle","transparent"]).optional(),design:"knob",default:"default"},size:{schema:z.enum(["sm","md","lg"]).optional(),design:"knob",description:"height + padding",default:"md"},sticky:{schema:z.boolean().optional(),design:"knob",description:"pin to top/bottom of scroll container",default:false},"aria-label":{schema:z.string().optional(),design:"content",description:"required by WAI-ARIA toolbar pattern",default:"Toolbar"},className:{schema:z.string().optional(),design:"plumbing"}}};var zl={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:z.number().optional(),design:"knob",description:"ms hover before show; mount ONCE near the app root"},skipDelayDuration:{schema:z.number().optional(),design:"knob",description:'ms gap that still feels like "same hover"'},open:{schema:z.unknown().optional(),design:"plumbing"},defaultOpen:{schema:z.unknown().optional(),design:"plumbing"},onOpenChange:{schema:z.unknown().optional(),design:"event"},asChild:{schema:z.boolean().optional(),design:"plumbing",description:"usually wraps a Button or icon"},side:{schema:z.enum(["top","right","bottom","left"]).optional(),design:"knob",default:"top"},align:{schema:z.enum(["start","center","end"]).optional(),design:"knob"},sideOffset:{schema:z.number().optional(),design:"knob"}}};var Bl={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:z.string(),design:"content",description:"video URL"},controls:{schema:z.boolean().optional(),design:"knob",description:"show native controls; false for chromeless hero/background video",default:true},autoPlay:{schema:z.boolean().optional(),design:"knob",description:"forces muted=true (browser restriction)",default:false},loop:{schema:z.boolean().optional(),design:"knob",default:false},muted:{schema:z.boolean().optional(),design:"knob",default:false},pauseOffscreen:{schema:z.boolean().optional(),design:"knob",description:"pause when scrolled out of viewport",default:true},aspect:{schema:z.enum(["video","square","portrait","wide","auto"]).optional(),design:"knob",default:"video"},radius:{schema:z.enum(["none","sm","md","lg","xl"]).optional(),design:"knob",description:"driven by `--gds-media-radius`",default:"lg"},objectFit:{schema:z.enum(["cover","contain","fill"]).optional(),design:"knob",default:"cover"},poster:{schema: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:z.number().optional(),design:"knob"}}};var Gn={Accordion:fs,AiChat:hs,AiChatComposer:bs,AppShell:vs,Avatar:ys,BackgroundFill:xs,Badge:ks,Banner:Ss,Breadcrumb:Rs,Button:Cs,Calendar:Ts,Callout:Ps,Card:Ns,Carousel:Es,Chart:Ls,Checkbox:Ds,CheckboxCard:As,Code:Is,Collapsible:Hs,Combobox:Fs,Command:zs,Composer:Bs,DataView:Vs,DatePicker:_s,Dialog:Os,DropdownMenu:Gs,Field:Us,FillPicker:js,Flex:Ks,Grid:qs,HoverCard:Ys,Input:Zs,Label:Js,Logo:Qs,Map:el,MediaSurface:Vn,Message:tl,Motion:ol,MultiSelect:al,Popover:rl,Progress:nl,PropertyList:il,RadioCard:sl,RadioGroup:ll,Resizable:cl,RivePlayer:dl,Row:pl,ScreenAnimator:ul,ScrollArea:ml,SectionBlock:gl,Select:fl,Separator:hl,ShaderPresetPicker:bl,ShaderPresetPreview:vl,Sheet:yl,Sidebar:xl,Skeleton:wl,Slider:kl,Sortable:Sl,Stack:Rl,Swatch:Cl,Switch:Tl,SwitchCard:Pl,Table:Nl,Tabs:El,Textarea:Ll,ThreeScene:Dl,Toast:Al,Toggle:Il,ToggleGroup:Hl,Toolbar:Fl,Tooltip:zl,VideoPlayer:Bl};function Rm(e){return e?Gn[e]??null:null}function Cm(){return Object.keys(Gn)}function d(...e){return twMerge(clsx(e))}var Nm=Ft.Root,Vl=y.forwardRef(({className:e,...t},o)=>y.createElement(Ft.Item,{ref:o,className:d("border-b",e),...t}));Vl.displayName="AccordionItem";var _l=y.forwardRef(({className:e,children:t,...o},a)=>y.createElement(Ft.Header,{className:"flex"},y.createElement(Ft.Trigger,{ref:a,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,y.createElement(ChevronDown,{className:"h-4 w-4 shrink-0 transition-transform duration-200"}))));_l.displayName=Ft.Trigger.displayName;var Ol=y.forwardRef(({className:e,children:t,...o},a)=>y.createElement(Ft.Content,{ref:a,className:"overflow-hidden text-sm transition-all data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down",...o},y.createElement("div",{className:d("pb-4 pt-0",e)},t)));Ol.displayName=Ft.Content.displayName;var Gl=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"}}),Lm={destructive:"alert",warning:"alert",info:"status",success:"status",default:"status"},Wl=y.forwardRef(({className:e,variant:t,role:o,...a},n)=>y.createElement("div",{ref:n,role:o??Lm[t??"default"],"data-gds-part":"callout",className:d(Gl({variant:t}),e),...a}));Wl.displayName="Callout";var Ul=y.forwardRef(({className:e,...t},o)=>y.createElement("h5",{ref:o,"data-gds-part":"callout-title",className:d("mb-1 font-medium leading-none tracking-tight",e),...t}));Ul.displayName="CalloutTitle";var $l=y.forwardRef(({className:e,...t},o)=>y.createElement("div",{ref:o,"data-gds-part":"callout-description",className:d("text-sm [&_p]:leading-relaxed",e),...t}));$l.displayName="CalloutDescription";var jl=cva("gds-app-shell min-h-screen w-full bg-background text-foreground grid",{variants:{nav:{none:"",top:"",side:"","three-pane":""}},defaultVariants:{nav:"none"}}),Kl=cva("gds-app-shell-header",{variants:{sticky:{true:"sticky top-0 z-30",false:""}},defaultVariants:{sticky:false}}),ql=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}}),Yl=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}}),Zl=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"}}),Xl=cva("gds-app-shell-footer border-t bg-background"),Jl=y.forwardRef(({className:e,nav:t,asChild:o=false,...a},n)=>y.createElement(o?Slot:"div",{ref:n,"data-gds-part":"app-shell","data-nav":t??"none",className:d(jl({nav:t,className:e})),...a}));Jl.displayName="AppShell";var Ql=y.forwardRef(({className:e,sticky:t,asChild:o=false,...a},n)=>y.createElement(o?Slot:"header",{ref:n,"data-gds-part":"app-shell-header",className:d(Kl({sticky:t,className:e})),...a}));Ql.displayName="AppShellHeader";var ec=y.forwardRef(({className:e,placement:t,sticky:o,asChild:a=false,...n},r)=>y.createElement(a?Slot:"nav",{ref:r,"data-gds-part":"app-shell-nav","data-placement":t??"top",className:d(ql({placement:t,sticky:o,className:e})),...n}));ec.displayName="AppShellNav";var tc=y.forwardRef(({className:e,sticky:t,asChild:o=false,...a},n)=>y.createElement(o?Slot:"aside",{ref:n,"data-gds-part":"app-shell-aside",className:d(Yl({sticky:t,className:e})),...a}));tc.displayName="AppShellAside";var oc=y.forwardRef(({className:e,maxWidth:t,asChild:o=false,...a},n)=>y.createElement(o?Slot:"main",{ref:n,"data-gds-part":"app-shell-main",className:d(Zl({maxWidth:t,className:e})),...a}));oc.displayName="AppShellMain";var ac=y.forwardRef(({className:e,asChild:t=false,...o},a)=>y.createElement(t?Slot:"footer",{ref:a,"data-gds-part":"app-shell-footer",className:d(Xl({className:e})),...o}));ac.displayName="AppShellFooter";var Dm=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"}}),nc=y.forwardRef(({className:e,size:t,...o},a)=>y.createElement(bo.Root,{ref:a,"data-gds-part":"avatar","data-gds-size":t??"md",className:d(Dm({size:t}),e),...o}));nc.displayName=bo.Root.displayName;var ic=y.forwardRef(({className:e,...t},o)=>y.createElement(bo.Image,{ref:o,"data-gds-part":"avatar-image",className:d("aspect-square h-full w-full",e),...t}));ic.displayName=bo.Image.displayName;var Am=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"}}),sc=y.forwardRef(({className:e,tone:t,...o},a)=>y.createElement(bo.Fallback,{ref:a,"data-gds-part":"avatar-fallback","data-gds-tone":t??"muted",className:d(Am({tone:t}),e),...o}));sc.displayName=bo.Fallback.displayName;var cc=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 hover:bg-primary/80",secondary:"border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80",destructive:"border-transparent bg-destructive text-destructive-foreground hover:bg-destructive/80",outline:"text-foreground",highlight:"border-transparent bg-gds-yellow-400 text-gds-gray-900 hover:bg-gds-yellow-500",success:"border-transparent bg-gds-green-500 text-gds-gray-900 hover:bg-gds-green-600",warning:"border-transparent bg-orange-500 text-white hover:bg-orange-600",info:"border-transparent bg-blue-500 text-white 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 Do({className:e,variant:t,rounded:o,...a}){return y.createElement("div",{className:d(cc({variant:t,rounded:o}),e),...a})}var St={solid:"",translucent:"gds-surface-translucent",glass:"gds-surface-glass","glass-strong":"gds-surface-glass-strong"};function qt(e,t){return e==="solid"?t:""}var dc=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}}),zm={destructive:"alert",warning:"alert",info:"status",success:"status",default:"status",announcement:"status"},pc=y.forwardRef(({className:e,variant:t="default",align:o,sticky:a,surface:n="solid",dismissible:r,onDismiss:i,icon:l,action:s,role:c,children:p,...m},u)=>{let g=t??"default",h=c??zm[g];return y.createElement("div",{ref:u,role:h,"data-gds-part":"banner","data-variant":g,"data-surface":n,className:d(dc({variant:t,align:o,sticky:a}),St[n],e),...m},l?y.createElement("span",{"data-gds-part":"banner-icon","aria-hidden":true,className:"shrink-0"},l):null,y.createElement("div",{"data-gds-part":"banner-content",className:"flex-1 min-w-0"},p),s?y.createElement("span",{"data-gds-part":"banner-action",className:"shrink-0"},s):null,r?y.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"},y.createElement(X,{className:"h-4 w-4"})):null)});pc.displayName="Banner";var Ua=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 hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/90",outline:"border border-input bg-background hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline",raised:"gds-button-raised gds-button-raised-surface"},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"}}),et=y.forwardRef(({className:e,variant:t,size:o,asChild:a=false,raised:n=false,...r},i)=>y.createElement(a?Slot:"button",{"data-gds-part":"button",className:d("gds-button",Ua({variant:t,size:o}),n&&"gds-button-raised",e),ref:i,...r}));et.displayName="Button";function Lr({className:e,classNames:t,showOutsideDays:o=true,captionLayout:a="label",buttonVariant:n="ghost",formatters:r,components:i,...l}){let s=getDefaultClassNames();return y.createElement(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:a,formatters:{formatMonthDropdown:c=>c.toLocaleString("default",{month:"short"}),...r},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(Ua({variant:n}),"h-[--cell-size] w-[--cell-size] select-none p-0 aria-disabled:opacity-50",s.button_previous),button_next:d(Ua({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",a==="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:p,...m})=>y.createElement("div",{"data-slot":"calendar",ref:p,className:d(c),...m}),Chevron:({className:c,orientation:p,...m})=>p==="left"?y.createElement(ChevronLeftIcon,{className:d("size-4",c),...m}):p==="right"?y.createElement(ChevronRightIcon,{className:d("size-4",c),...m}):y.createElement(ChevronDownIcon,{className:d("size-4",c),...m}),DayButton:mc,WeekNumber:({children:c,...p})=>y.createElement("td",{...p},y.createElement("div",{className:"flex size-[--cell-size] items-center justify-center text-center"},c)),...i},...l})}function mc({className:e,day:t,modifiers:o,...a}){let n=getDefaultClassNames(),r=y.useRef(null);return y.useEffect(()=>{o.focused&&r.current?.focus();},[o.focused]),y.createElement(et,{ref:r,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),...a})}var Wn=y.createContext(null);function Ka(e){let t=y.useContext(Wn);if(!t)throw new Error(`<${e}> must be rendered inside a <Carousel> root.`);return t}var Km=5e3,Ao=y.forwardRef(({loop:e=true,align:t="start",slidesPerView:o=1,autoplay:a=false,draggable:n=true,onSlideChange:r,className:i,style:l,children:s,...c},p)=>{let m=y.useMemo(()=>({loop:e,align:t,slidesToScroll:1,watchDrag:n,containScroll:e?false:"trimSnaps"}),[e,t,n]),[u,g]=Um(m),[h,f]=y.useState(0),[b,v]=y.useState(0),[S,x]=y.useState(false),[w,k]=y.useState(false),C=y.useRef(new Map),E=y.useRef(r);E.current=r;let F=y.useMemo(()=>a?a===true?{}:a:null,[a]);y.useEffect(()=>{if(!g)return;let R=()=>{f(g.selectedScrollSnap()),v(g.scrollSnapList().length),x(g.canScrollPrev()),k(g.canScrollNext()),E.current?.(g.selectedScrollSnap());};return R(),g.on("select",R),g.on("reInit",R),()=>{g.off("select",R),g.off("reInit",R);}},[g]);let O=y.useCallback(R=>{g&&g.selectedScrollSnap()===R&&g.scrollNext();},[g]),M=y.useRef(false),N=y.useRef(true),H=y.useRef(null);y.useImperativeHandle(p,()=>H.current),y.useEffect(()=>{if(!F?.pauseWhenOffscreen){N.current=true;return}let R=H.current;if(!R||typeof IntersectionObserver>"u")return;let _=new IntersectionObserver(le=>{N.current=le.some(X=>X.isIntersecting);},{threshold:.25});return _.observe(R),()=>_.disconnect()},[F?.pauseWhenOffscreen]),y.useEffect(()=>{if(!g||!F)return;let R=null,_=()=>{R&&clearTimeout(R);let J=g.selectedScrollSnap(),ke=C.current.get(J)??F.delay??Km;R=setTimeout(()=>{if(M.current||!N.current){_();return}g.scrollNext();},ke);},le=()=>_(),X=()=>{R&&clearTimeout(R);},U=()=>_();return g.on("select",le),g.on("pointerDown",X),g.on("settle",U),_(),()=>{R&&clearTimeout(R),g.off("select",le),g.off("pointerDown",X),g.off("settle",U);}},[g,F]);let Y=()=>{F?.pauseOnHover!==false&&(M.current=true);},se=()=>{M.current=false;},D=y.useMemo(()=>({api:g,selectedIndex:h,slideCount:b,canScrollPrev:S,canScrollNext:w,durationsRef:C,advanceFromSlide:O}),[g,h,b,S,w,O]),V=`calc(100% / ${o})`;return y.createElement(Wn.Provider,{value:D},y.createElement("div",{ref:H,"data-gds-part":"carousel",className:d("relative",i),style:{"--gds-carousel-slide-basis":V,...l},onMouseEnter:Y,onMouseLeave:se,...c},y.createElement("div",{ref:u,"data-gds-part":"carousel-viewport",className:"overflow-hidden",style:{borderRadius:"var(--gds-carousel-radius, var(--gds-media-radius, 0.5rem))"}},y.createElement("div",{"data-gds-part":"carousel-track",className:"flex",style:{gap:"var(--gds-carousel-gap, 0)",touchAction:"pan-y pinch-zoom"}},s))))});Ao.displayName="Carousel";var Dr=y.forwardRef(({duration:e,className:t,style:o,children:a,...n},r)=>{let{durationsRef:i}=Ka("Carousel.Slide"),l=y.useRef(null);return y.useImperativeHandle(r,()=>l.current),y.useEffect(()=>{if(e==null)return;let s=l.current;if(!s?.parentElement)return;let c=Array.from(s.parentElement.children).indexOf(s);if(c<0)return;let p=i.current;return p.set(c,e),()=>{p.delete(c);}},[e,i]),y.createElement("div",{ref:l,"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},a)});Dr.displayName="Carousel.Slide";var Un=y.forwardRef(({src:e,poster:t,alt:o,controls:a=false,loop:n=true,fit:r="cover",duration:i,className:l,style:s,...c},p)=>{let{api:m,selectedIndex:u,advanceFromSlide:g}=Ka("Carousel.VideoSlide"),h=y.useRef(null),f=y.useRef(null);y.useImperativeHandle(p,()=>h.current);let[b,v]=y.useState(null);y.useEffect(()=>{let x=h.current;x?.parentElement&&v(Array.from(x.parentElement.children).indexOf(x));},[m]);let S=b!=null&&b===u;return y.useEffect(()=>{let x=f.current;if(x)if(S){let w=x.play();w&&typeof w.catch=="function"&&w.catch(()=>{});}else x.pause(),x.currentTime=0;},[S]),y.createElement(Dr,{ref:h,duration:i,className:d("relative overflow-hidden bg-[var(--gds-media-placeholder-bg)]",l),style:s,"data-gds-part":"carousel-video-slide",...c},t&&y.createElement("img",{src:t,alt:o??"","aria-hidden":S,className:"absolute inset-0 h-full w-full",style:{objectFit:r,opacity:S?0:1,transition:"opacity var(--gds-carousel-fade-ms, 200ms) ease-out"}}),y.createElement("video",{ref:f,src:e,muted:true,playsInline:true,loop:n,controls:a,preload:"metadata","aria-label":o,className:"block h-full w-full",style:{objectFit:r,opacity:S?1:0,transition:"opacity var(--gds-carousel-fade-ms, 200ms) ease-out"},onEnded:()=>{n||b!=null&&g(b);}}))});Un.displayName="Carousel.VideoSlide";var $n=y.forwardRef(({position:e="below",renderDot:t,className:o,style:a,...n},r)=>{let{api:i,selectedIndex:l,slideCount:s}=Ka("Carousel.Dots");if(s<=1)return null;let c=Array.from({length:s},(m,u)=>u),p=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 y.createElement("div",{ref:r,"data-gds-part":"carousel-dots",className:d("flex items-center justify-center",o),style:{gap:"var(--gds-carousel-dots-spacing, 0.5rem)",...p,...a},...n},c.map(m=>{let u=m===l,g=()=>i?.scrollTo(m);return t?t({index:m,active:u,onClick:g}):y.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))"}})}))});$n.displayName="Carousel.Dots";var jn=y.forwardRef(({position:e="overlay",className:t,style:o,...a},n)=>e==="outside"?y.createElement("div",{ref:n,"data-gds-part":"carousel-arrows",className:d("flex items-center justify-end gap-2 pt-2",t),style:o,...a},y.createElement($a,null),y.createElement(ja,null)):y.createElement("div",{ref:n,"data-gds-part":"carousel-arrows",className:d("pointer-events-none absolute inset-0 z-[1]",t),style:o,...a},y.createElement($a,{className:"pointer-events-auto absolute left-[var(--gds-carousel-arrow-inset,0.75rem)] top-1/2 -translate-y-1/2"}),y.createElement(ja,{className:"pointer-events-auto absolute right-[var(--gds-carousel-arrow-inset,0.75rem)] top-1/2 -translate-y-1/2"})));jn.displayName="Carousel.Arrows";var $a=y.forwardRef(({className:e,style:t,children:o,...a},n)=>{let{api:r,canScrollPrev:i}=Ka("Carousel.Prev");return y.createElement("button",{ref:n,type:"button","data-gds-part":"carousel-prev","aria-label":"Previous slide",disabled:!i,onClick:()=>r?.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},...a},o??y.createElement(ChevronLeft,{className:"h-4 w-4","aria-hidden":true}))});$a.displayName="Carousel.Prev";var ja=y.forwardRef(({className:e,style:t,children:o,...a},n)=>{let{api:r,canScrollNext:i}=Ka("Carousel.Next");return y.createElement("button",{ref:n,type:"button","data-gds-part":"carousel-next","aria-label":"Next slide",disabled:!i,onClick:()=>r?.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},...a},o??y.createElement(ChevronRight,{className:"h-4 w-4","aria-hidden":true}))});ja.displayName="Carousel.Next";Ao.Slide=Dr;Ao.VideoSlide=Un;Ao.Dots=$n;Ao.Arrows=jn;Ao.Prev=$a;Ao.Next=ja;var qm=Ao;function Ym(){return y.useContext(Wn)?.api}var Ar=y.forwardRef(({className:e,surface:t="solid",...o},a)=>y.createElement("div",{ref:a,"data-gds-part":"card","data-surface":t,className:d("gds-card rounded-xl border text-card-foreground shadow",qt(t,"bg-card"),St[t],e),...o}));Ar.displayName="Card";var gc=y.forwardRef(({className:e,...t},o)=>y.createElement("div",{ref:o,"data-gds-part":"card-header",className:d("flex flex-col space-y-1.5 p-6",e),...t}));gc.displayName="CardHeader";var fc=y.forwardRef(({className:e,...t},o)=>y.createElement("div",{ref:o,"data-gds-part":"card-title",className:d("font-semibold leading-none tracking-tight",e),...t}));fc.displayName="CardTitle";var hc=y.forwardRef(({className:e,...t},o)=>y.createElement("div",{ref:o,"data-gds-part":"card-description",className:d("text-sm text-muted-foreground",e),...t}));hc.displayName="CardDescription";var bc=y.forwardRef(({className:e,...t},o)=>y.createElement("div",{ref:o,"data-gds-part":"card-content",className:d("p-6 pt-0",e),...t}));bc.displayName="CardContent";var vc=y.forwardRef(({className:e,...t},o)=>y.createElement("div",{ref:o,"data-gds-part":"card-footer",className:d("flex items-center p-6 pt-0",e),...t}));vc.displayName="CardFooter";var yc=y.forwardRef(({className:e,...t},o)=>y.createElement(qa.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},y.createElement(qa.Indicator,{className:d("flex items-center justify-center text-current")},y.createElement(Check,{className:"h-4 w-4"}))));yc.displayName=qa.Root.displayName;var Kn=y.createContext(null),Ir=y.forwardRef(({className:e,...t},o)=>{let a=y.useContext(Kn);return y.createElement("label",{ref:o,htmlFor:a?.controlId,className:d("text-sm font-medium leading-none text-foreground cursor-pointer peer-disabled:cursor-not-allowed peer-disabled:opacity-70",e),...t})});Ir.displayName="Field.Label";var Hr=y.forwardRef(({className:e,...t},o)=>{let a=y.useContext(Kn);return y.createElement("p",{ref:o,id:a?.descriptionId,className:d("text-sm text-muted-foreground",e),...t})});Hr.displayName="Field.Description";var Fr=y.forwardRef(({className:e,...t},o)=>y.createElement("div",{ref:o,className:d("flex shrink-0 items-center gap-2",e),...t}));Fr.displayName="Field.Trailing";var xc=y.forwardRef(({layout:e="option",className:t,children:o,...a},n)=>{let r=y.useId(),i=null,l=null,s=null,c=null;y.Children.forEach(o,v=>{y.isValidElement(v)&&(v.type===Ir?i=v:v.type===Hr?l=v:v.type===Fr?s=v:c||(c=v));});let p=c,m=p?.props??{},u=m.id??`${r}-control`,g=l?`${r}-description`:void 0,h=[m["aria-describedby"],g].filter(Boolean).join(" ")||void 0,f=p?y.cloneElement(p,{id:u,"aria-describedby":h}):null,b=y.createElement("div",{className:"flex min-w-0 flex-col gap-0.5"},i,l);return y.createElement(Kn.Provider,{value:{controlId:u,descriptionId:g}},y.createElement("div",{ref:n,"data-gds-part":"field","data-layout":e,className:d("flex gap-3",e==="setting"?"items-center justify-between":l?"items-start":"items-center",t),...a},e==="setting"?y.createElement(y.Fragment,null,b,y.createElement("div",{className:"flex shrink-0 items-center gap-2"},s,f)):y.createElement(y.Fragment,null,y.createElement("div",{className:d("shrink-0",l?"mt-0.5":void 0)},f),y.createElement("div",{className:"flex min-w-0 flex-1 flex-col gap-0.5"},i,l),s)))});xc.displayName="Field";var Xm=Object.assign(xc,{Label:Ir,Description:Hr,Trailing:Fr});var wc=y.createContext({layout:"row",align:"center",divider:false}),Jm={compact:"var(--gds-property-list-row-gap-compact, 0.375rem)",default:"var(--gds-property-list-row-gap, 0.625rem)",relaxed:"var(--gds-property-list-row-gap-relaxed, 1rem)"},kc=y.forwardRef(({layout:e="row",density:t="default",align:o="center",divider:a=false,labelWidth:n,className:r,style:i,children:l,...s},c)=>y.createElement(wc.Provider,{value:{layout:e,align:o,divider:a}},y.createElement("dl",{ref:c,"data-gds-part":"property-list","data-layout":e,"data-density":t,className:d("flex min-w-0 flex-col",r),style:{rowGap:Jm[t],...n?{"--gds-property-list-label-width":n}:{},...i},...s},l)));kc.displayName="PropertyList";var qn=y.forwardRef(({label:e,icon:t,value:o,align:a,className:n,children:r,...i},l)=>{let{layout:s,align:c,divider:p}=y.useContext(wc),m=a??c,u=o??r;return y.createElement("div",{ref:l,"data-gds-part":"property",className:d("grid",p&&"border-t border-[color:var(--gds-property-list-divider-color,oklch(var(--border)))] pt-[var(--gds-property-list-row-gap,0.625rem)] first:border-t-0 first:pt-0",n),style:{gridTemplateColumns:s==="stack"?"minmax(0, 1fr)":"var(--gds-property-list-label-width, 8.5rem) minmax(0, 1fr)",columnGap:"var(--gds-property-list-col-gap, 1rem)",rowGap:s==="stack"?"0.25rem":void 0,alignItems:m==="start"?"start":"center"},...i},y.createElement("dt",{"data-gds-part":"property-label",className:d("flex min-w-0 items-center gap-1.5 text-sm text-[color:var(--gds-property-list-label-color,oklch(var(--muted-foreground)))]",m==="start"&&"pt-px")},t?y.createElement("span",{"data-gds-part":"property-icon","aria-hidden":true,className:"flex shrink-0 items-center justify-center text-current [&_svg]:h-[var(--gds-property-list-icon-size,0.875rem)] [&_svg]:w-[var(--gds-property-list-icon-size,0.875rem)]"},t):null,y.createElement("span",{className:"truncate"},e)),y.createElement("dd",{"data-gds-part":"property-value",className:"m-0 min-w-0 text-sm text-foreground"},u))});qn.displayName="PropertyList.Row";var Qm=Object.assign(kc,{Row:qn});function Yn({label:e,description:t,aside:o,hideIndicator:a,indicatorPosition:n="trailing",titleId:r,descriptionId:i,indicator:l,children:s}){let c=s!=null?y.createElement("div",{className:"gds-selection-card__slot"},s):y.createElement("div",{className:"gds-selection-card__content"},e!=null&&y.createElement("span",{id:r,className:"gds-selection-card__title"},e),t!=null&&y.createElement("span",{id:i,className:"gds-selection-card__desc"},t)),p=a?null:l;return n==="leading"?y.createElement(y.Fragment,null,p,c,o):y.createElement(y.Fragment,null,c,o,p)}var tg=y.createElement("span",{className:"gds-selection-indicator gds-selection-indicator--radio","aria-hidden":true},y.createElement(_o.Indicator,{className:"gds-selection-indicator__dot"})),og=y.createElement("span",{className:"gds-selection-indicator gds-selection-indicator--checkbox","aria-hidden":true},y.createElement(qa.Indicator,{className:"gds-selection-indicator__check"},y.createElement(Check,{className:"h-3.5 w-3.5",strokeWidth:3}))),ag=y.createElement("span",{className:"gds-selection-indicator gds-selection-indicator--switch","aria-hidden":true},y.createElement(gr.Thumb,{className:"gds-selection-indicator__thumb"})),Sc=y.forwardRef(({className:e,label:t,description:o,aside:a,hideIndicator:n,indicatorPosition:r="trailing",children:i,...l},s)=>{let c=y.useId(),p=t!=null?`${c}-t`:void 0,m=o!=null?`${c}-d`:void 0;return y.createElement(_o.Item,{ref:s,"data-gds-part":"radio-card","data-indicator":r,"aria-labelledby":p,"aria-describedby":m,className:d("gds-selection-card",e),...l},y.createElement(Yn,{label:t,description:o,aside:a,hideIndicator:n,indicatorPosition:r,titleId:p,descriptionId:m,indicator:tg},i))});Sc.displayName="RadioCard";var Rc=y.forwardRef(({className:e,label:t,description:o,aside:a,hideIndicator:n,indicatorPosition:r="trailing",children:i,...l},s)=>{let c=y.useId(),p=t!=null?`${c}-t`:void 0,m=o!=null?`${c}-d`:void 0;return y.createElement(qa.Root,{ref:s,"data-gds-part":"checkbox-card","data-indicator":r,"aria-labelledby":p,"aria-describedby":m,className:d("gds-selection-card",e),...l},y.createElement(Yn,{label:t,description:o,aside:a,hideIndicator:n,indicatorPosition:r,titleId:p,descriptionId:m,indicator:og},i))});Rc.displayName="CheckboxCard";var Cc=y.forwardRef(({className:e,label:t,description:o,aside:a,hideIndicator:n,indicatorPosition:r="trailing",children:i,...l},s)=>{let c=y.useId(),p=t!=null?`${c}-t`:void 0,m=o!=null?`${c}-d`:void 0;return y.createElement(gr.Root,{ref:s,"data-gds-part":"switch-card","data-indicator":r,"aria-labelledby":p,"aria-describedby":m,className:d("gds-selection-card",e),...l},y.createElement(Yn,{label:t,description:o,aside:a,hideIndicator:n,indicatorPosition:r,titleId:p,descriptionId:m,indicator:ag},i))});Cc.displayName="SwitchCard";var Sa={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}},_r=.55;function Pe(e,t){return e<=0?Promise.resolve():new Promise((o,a)=>{if(t?.aborted){a(new DOMException("Aborted","AbortError"));return}let n=window.setTimeout(()=>{t?.removeEventListener("abort",r),o();},e),r=()=>{window.clearTimeout(n),a(new DOMException("Aborted","AbortError"));};t?.addEventListener("abort",r,{once:true});})}async function Or(e,t,o=22,a){if(o<=0){t(e);return}for(let n=1;n<=e.length;n++)t(e.slice(0,n)),n<e.length&&await Pe(o,a);}function Zn(e){return e instanceof DOMException&&e.name==="AbortError"}var Ya="data-motion",Tc="off",Pc="(prefers-reduced-motion: reduce)";function rg(){if(typeof window>"u"||typeof document>"u")return false;let e=window.matchMedia(Pc).matches,t=document.documentElement.getAttribute(Ya)===Tc;return e||t}function yo(){let[e,t]=y.useState(false);return y.useEffect(()=>{let o=()=>t(rg());o();let a=window.matchMedia(Pc);a.addEventListener("change",o);let n=new MutationObserver(o);return n.observe(document.documentElement,{attributes:true,attributeFilter:[Ya]}),()=>{a.removeEventListener("change",o),n.disconnect();}},[]),e}var Io=yo;function Za(){let[e,t]=y.useState(true);return y.useEffect(()=>{let o=window.self!==window.top,a=()=>document.visibilityState!=="hidden"&&(o||document.hasFocus()),n=()=>t(a());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 ng(e){if(typeof document>"u")return;let t=document.documentElement;e?t.removeAttribute(Ya):t.setAttribute(Ya,Tc);}var ig=2e3,sg={tokenStagger:0,lineStagger:0,preDelay:0,fadeMs:0};function Ho(e){let{steps:t,interpret:o,speed:a="normal",trigger:n="mount",play:r,loop:i=false,loopDelay:l=ig,maxLoops:s=1/0,containerRef:c,onComplete:p,onLoopReset:m}=e,u=yo(),g=u?sg:Sa[a],h=u?false:i,f=Za(),[b,v]=y.useState(false),[S,x]=y.useState(false),[w,k]=y.useState(-1),C=y.useRef(null),E=useInView(c??C,{once:true,amount:_r}),F=useInView(c??C,{amount:_r}),O=f&&(c?F:true),[M,N]=y.useState(0),H=y.useMemo(()=>n==="mount"?true:n==="inView"?E:!!r||M>0,[n,E,r,M]),Y=y.useRef(o);Y.current=o;let se=y.useRef(p);se.current=p;let D=y.useRef(m);D.current=m;let V=y.useRef(null),R=y.useRef(null),_=y.useCallback(()=>{V.current?.abort(),V.current=null,R.current!==null&&(window.clearTimeout(R.current),R.current=null),v(false);},[]),le=y.useCallback(()=>{N(U=>U+1);},[]),X=y.useCallback((U=0)=>{if(V.current?.abort(),V.current=null,R.current!==null&&(window.clearTimeout(R.current),R.current=null),U>0){R.current=window.setTimeout(()=>{R.current=null,N(J=>J+1);},U);return}N(J=>J+1);},[]);return y.useEffect(()=>()=>{R.current!==null&&(window.clearTimeout(R.current),R.current=null);},[]),y.useEffect(()=>{if(!t||t.length===0||!u&&(!H||!O))return;let U=new AbortController;V.current=U;let{signal:J}=U,De={speed:g,signal:J,cancelled:()=>J.aborted,reduced:u},de=true,T=0;return (async()=>{do{v(true),x(false),k(-1);try{await Pe(n==="inView"?g.preDelay:0,J);for(let $=0;$<t.length;$++){if(J.aborted)return;k($),await Y.current(t[$],De);}if(J.aborted)return;if(k(-1),x(!0),se.current?.(),T+=1,!h||T>=s){v(!1);return}if(await Pe(l,J),J.aborted)return;D.current?.();}catch($){if(Zn($))return;process.env.NODE_ENV!=="production"&&console.error("[useScriptedDemo] step error:",$),v(false);return}}while(de&&h&&!J.aborted)})(),()=>{de=false,U.abort(),V.current===U&&(V.current=null);}},[t,H,O,h,l,g,n,M,u]),{isPlaying:b,isComplete:S,currentIndex:w,play:le,stop:_,restart:X}}var Wr=y.forwardRef(function({variant:t="inline",className:o,...a},n){return y.createElement("span",{ref:n,"data-gds-part":"demo-cursor","data-gds-variant":t,"aria-hidden":true,className:d("gds-demo-cursor",o),...a})});var Nc=y.createContext({visible:new Set,hasStage:false,reducedMotion:false,defaultAnimation:"fade-up"});function Ec({steps:e,speed:t="normal",trigger:o="mount",play:a,loop:n=false,defaultAnimation:r="fade-up",visibleWhenIdle:i=true,className:l,children:s}){let c=useReducedMotion()??false,p=y.useRef(null),[m,u]=y.useState(()=>new Set),g=!!(e&&e.length);Ho({steps:g?e:void 0,speed:t,trigger:o,play:a,loop:n,containerRef:p,onLoopReset:()=>u(new Set),interpret:async(b,v)=>{if(b.type==="wait")return Pe(b.ms,v.signal);if(b.type==="reset")return u(new Set),Pe(v.speed.preDelay,v.signal);if(b.type==="reveal")return u(S=>{if(S.has(b.target))return S;let x=new Set(S);return x.add(b.target),x}),Pe(v.speed.lineStagger,v.signal);if(b.type==="reveal-all")return u(S=>{let x=new Set(S);return x.add("__all__"),x}),Pe(v.speed.lineStagger,v.signal);if(b.type==="hide")return u(S=>{if(!S.has(b.target))return S;let x=new Set(S);return x.delete(b.target),x}),Pe(v.speed.fadeMs,v.signal)}});let h=y.useMemo(()=>({visible:g?m:new Set(["__all__"]),hasStage:true,reducedMotion:c,defaultAnimation:r}),[g,m,c,r]),f=!g&&!i?{...h,visible:new Set}:h;return y.createElement("div",{ref:p,"data-gds-part":"demo-stage","data-gds-stage-playing":g?"true":"false",className:l},y.createElement(Nc.Provider,{value:f},s))}var dg={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 Lc({id:e,animation:t,durationMs:o,hideOutsideStage:a=false,onReveal:n,onHide:r,className:i,children:l}){let s=y.useContext(Nc),c=s.hasStage?s.visible.has("__all__")||s.visible.has(e):!a,p=y.useRef(c),m=y.useRef(n),u=y.useRef(r);m.current=n,u.current=r,y.useEffect(()=>{c!==p.current&&(p.current=c,c?m.current?.():u.current?.());},[c]);let g=t??s.defaultAnimation,h=dg[g],f=(o??280)/1e3;return s.reducedMotion?y.createElement("div",{"data-gds-part":"reveal","data-gds-reveal-id":e,"data-gds-revealed":c?"true":"false",className:i,style:{opacity:c?1:0}},l):y.createElement(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]}},l)}var mg={xs:"text-xs",sm:"text-sm",md:"text-base"},gg={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}},fg={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 hg(e){let t=new Set;if(e==null)return t;let o=Array.isArray(e)?e:[e];for(let a of o)if(typeof a=="number")t.add(a);else if(Array.isArray(a)&&a.length===2){let[n,r]=a;for(let i=n;i<=r;i++)t.add(i);}return t}function bg(e,t,o){return t?.added?.includes(e)?"added":t?.removed?.includes(e)?"removed":o.has(e)?"highlight":"default"}var Ac=y.forwardRef(function({source:t,language:o="tsx",highlight:a,diff:n,reveal:r="none",trigger:i="mount",play:l,speed:s="normal",delay:c,stagger:p,showLineNumbers:m=false,filename:u,wrap:g=false,bare:h=false,prompt:f,cursor:b,steps:v,loop:S=false,size:x="sm",height:w,maxLines:k,className:C,style:E,...F},O){let M=gg[s],N=c??0,H=p??(r==="typewriter"?M.tokenStagger:M.lineStagger),Y=!!(v&&v.length),[se,D]=y.useState(""),[V,R]=y.useState(()=>new Set),_=Y?se:t??"",le=y.useMemo(()=>_.replace(/\n$/,""),[_]),X=y.useMemo(()=>hg(a),[a]),U=!!(n?.added?.length||n?.removed?.length),J=m||U,ke=y.useRef(null);y.useImperativeHandle(O,()=>ke.current);let[De,de]=y.useState(r==="none"),T=useInView(ke,{once:true,amount:.55}),Z=i==="inView"?M.preDelay:0,$=i==="mount"?true:i==="inView"?T:!!l,Se=H,j=le.split(`
108
+ `).length,je=r==="typewriter"?le.replace(/\s+/g," ").split(" ").length:j,Te=Z+N+je*Se+280;y.useEffect(()=>{if(Y)return;if(!$||r==="none"){de(r==="none");return}de(false);let he=window.setTimeout(()=>de(true),Te);return ()=>window.clearTimeout(he)},[$,r,Te,Y]);let Qe=y.useRef(""),G=y.useRef(new Set),K=y.useCallback(he=>{Qe.current=he,D(he);},[]),W=y.useCallback(he=>{G.current=he,R(he);},[]),{isComplete:pe}=Ho({steps:Y?v:void 0,speed:s,trigger:"manual",play:$,loop:S,containerRef:ke,onLoopReset:()=>{K(""),W(new Set),de(false);},interpret:async(he,Gt)=>{let _e=Gt.signal;if(he.type==="wait")return Pe(he.ms,_e);if(he.type==="clear"){K(""),W(new Set);return}if(he.type==="output"){let re=Qe.current,Me=re.length>0&&!re.endsWith(`
109
+ `)?re+`
110
+ `:re,Wt=Me+he.text,jo=Me.split(`
111
+ `).length,Bn=he.text.split(`
112
+ `).length,Ha=new Set(G.current);for(let ua=0;ua<Bn;ua++)Ha.add(jo+ua);return K(Wt),W(Ha),K(Wt+(Wt.endsWith(`
113
113
  `)?"":`
114
- `)),Ce(240,Be)}let St=pe.speed?mr[pe.speed].tokenStagger:It.speed.tokenStagger,Ie=Xe.current,jt=Ie.length>0&&!Ie.endsWith(`
115
- `)?Ie+`
116
- `:Ie;await Ce(60,Be);for(let te=0;te<pe.text.length;te++){if(Be.aborted)return;let Pe=jt+pe.text.slice(0,te+1);$(Pe),te<pe.text.length-1&&await Ce(St,Be);}}});y.useEffect(()=>{Q&&ie(se);},[Q,se]);let Ae=g??(a==="typewriter"||Q);return y.createElement("div",{ref:xe,"data-gds-part":"code","data-gds-reveal":a,"data-gds-trigger":i,"data-gds-size":x,className:c("gds-code relative w-full overflow-hidden",$m[x],!f&&["rounded-lg border bg-[var(--gds-code-bg)] text-[var(--gds-code-fg)]","border-border/60"],T),style:L,...B},u&&!f?y.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"},y.createElement("span",{className:"font-mono"},u),o?y.createElement("span",{className:"uppercase tracking-wider opacity-60"},o):null):null,y.createElement(Highlight,{code:fe,language:o,theme:Km},({tokens:pe,getLineProps:It,getTokenProps:Be})=>y.createElement("pre",{"data-gds-part":"code-pre",className:c("font-mono leading-relaxed",f?"p-0":"px-0 py-3",b?"whitespace-pre-wrap break-words":"overflow-x-auto whitespace-pre",(w!==void 0||S!==void 0)&&"overflow-y-auto"),style:{background:"transparent",margin:0,...S!==void 0?{height:`calc(${S} * 1lh + 0.5rem)`}:w!==void 0&&w!=="auto"?{height:typeof w=="number"?`${w}px`:w}:null}},pe.map((St,Ie)=>{let jt=Ie+1,te=Ym(jt,n,ve),Pe=It({line:St}),Ht=Ie===pe.length-1,Fo=Q&&ee.has(jt),pn=Ae&&Ht&&(!Te||g===true),Rr=c("flex w-full pr-4",f?"pl-0":"pl-4",te==="added"&&"bg-[var(--gds-code-diff-added-bg)] text-[var(--gds-code-diff-added-fg)]",te==="removed"&&"bg-[var(--gds-code-diff-removed-bg)] text-[var(--gds-code-diff-removed-fg)]",te==="highlight"&&"bg-[var(--gds-code-line-highlight-bg)] shadow-[inset_2px_0_0_0_var(--gds-code-line-highlight-marker)]"),rr=y.createElement(y.Fragment,null,ae?y.createElement("span",{"data-gds-part":"code-gutter",className:c("select-none pr-3 text-right font-mono text-xs leading-relaxed opacity-60",U?"w-10":"w-8"),"aria-hidden":true},U?y.createElement("span",{className:"inline-block w-3 text-center"},te==="added"?"+":te==="removed"?"-":" "):null,m?y.createElement("span",{className:"ml-1 tabular-nums"},jt):null):null,y.createElement("span",{className:"flex-1",style:Fo?{color:"var(--gds-code-comment)"}:void 0},h&&!Fo?y.createElement("span",{"data-gds-part":"code-prompt","aria-hidden":true,className:"select-none opacity-60",style:{color:"var(--gds-code-comment)"}},h):null,a==="typewriter"&&G&&!Q?y.createElement(Zm,{line:St,getTokenProps:Be,delay:K+A+Ie*Se,stagger:Se}):St.map((Eu,Lu)=>y.createElement("span",{key:Lu,...Be({token:Eu})})),pn&&!Fo?y.createElement(Ta,{"data-gds-part":"code-cursor"}):null));return a==="none"||a==="typewriter"||Q||!G?y.createElement("div",{key:Ie,...Pe,className:c(Pe.className,Rr),style:{...Pe.style,opacity:i!=="mount"&&!G&&a!=="none"?0:void 0}},rr):y.createElement(motion.div,{key:Ie,...Pe,className:c(Pe.className,Rr),initial:{opacity:0,y:a==="diff"?te==="removed"?-4:6:4},animate:{opacity:1,y:0},transition:{delay:(K+A+Ie*Se)/1e3,duration:N.fadeMs/1e3,ease:[.22,1,.36,1]},style:Pe.style},rr)}))))});oc.displayName="Code";function Zm({line:e,getTokenProps:t,delay:o,stagger:r}){let n=0;return y.createElement(y.Fragment,null,e.map((a,i)=>{let s=/^\s*$/.test(a.content),l=t({token:a});if(s)return y.createElement("span",{key:i,...l});let d=n++;return y.createElement(motion.span,{key:i,...l,initial:{opacity:0},animate:{opacity:1},transition:{delay:(o+d*r)/1e3,duration:.12}})}))}var Xm={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]"}},Jm=y.forwardRef(function({author:t,timestamp:o,avatar:r,badge:n,edited:a,pinned:i,actions:s,reactions:l,threadCount:d,onThreadClick:p,align:m="start",density:u="default",className:b,children:f,...h},g){let v=m==="end",k=a===true?"(edited)":a||void 0,x=Xm[u];return y.createElement("div",{ref:g,"data-gds-part":"message","data-gds-align":m,"data-gds-density":u,"data-gds-pinned":i?"true":void 0,className:c("flex items-start",x.row,v&&"flex-row-reverse",b),...h},r&&y.createElement("div",{"data-gds-part":"message-avatar",className:"flex-shrink-0"},r),y.createElement("div",{"data-gds-part":"message-content",className:c("flex-1 min-w-0",x.content,v&&"text-right")},i&&y.createElement("div",{"data-gds-part":"message-pinned",className:c("flex items-center gap-1 text-[10px] uppercase tracking-wider text-muted-foreground",v&&"flex-row-reverse")},y.createElement("svg",{"aria-hidden":"true",viewBox:"0 0 16 16",className:"h-3 w-3",fill:"currentColor"},y.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"),y.createElement("div",{"data-gds-part":"message-header",className:c("flex items-baseline gap-2 flex-wrap",v&&"flex-row-reverse")},y.createElement("span",{"data-gds-part":"message-author",className:x.author},t),n&&y.createElement("div",{"data-gds-part":"message-badge"},n),o&&y.createElement("span",{"data-gds-part":"message-timestamp",className:c(x.meta,"text-muted-foreground")},o),k&&y.createElement("span",{"data-gds-part":"message-edited",className:c(x.meta,"text-muted-foreground")},k),s&&y.createElement("div",{"data-gds-part":"message-actions",className:c(v?"mr-auto":"ml-auto")},s)),y.createElement("div",{"data-gds-part":"message-body",className:x.body},f),l&&y.createElement("div",{"data-gds-part":"message-reactions",className:c("flex flex-wrap gap-1 pt-1",v&&"justify-end")},l),typeof d=="number"&&d>0&&y.createElement("button",{type:"button","data-gds-part":"message-thread",onClick:p,className:c("inline-flex items-center gap-1 font-medium",x.thread,"text-primary hover:underline","focus:outline-none focus-visible:ring-2 focus-visible:ring-primary rounded",v&&"flex-row-reverse")},y.createElement("svg",{"aria-hidden":"true",viewBox:"0 0 16 16",className:"h-3 w-3",fill:"currentColor"},y.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"})),d," ",d===1?"reply":"replies")))});function Uf({onSubmit:e,enabled:t}){let[o]=useLexicalComposerContext();return y.useEffect(()=>{if(t)return o.registerCommand(KEY_ENTER_COMMAND,r=>r&&r.shiftKey?false:(r?.preventDefault(),e(),true),COMMAND_PRIORITY_HIGH)},[o,t,e]),null}function $f({onImageFiles:e,enabled:t}){let[o]=useLexicalComposerContext();return y.useEffect(()=>{if(!t)return;let r=o.getRootElement();if(!r)return;let n=a=>{let s=Array.from(a.clipboardData?.items??[]).filter(l=>l.kind==="file"&&l.type.startsWith("image/")).map(l=>l.getAsFile()).filter(l=>l!==null);s.length>0&&(a.preventDefault(),e(s));};return r.addEventListener("paste",n),()=>r.removeEventListener("paste",n)},[o,t,e]),null}function jf({enabled:e}){let[t]=useLexicalComposerContext();return y.useEffect(()=>{e&&t.focus();},[t,e]),null}var ac={bold:"bold",italic:"italic",underline:"underline",strikethrough:"strikethrough",code:"code"};function nc(e,t){let o=ac[t];if(o){e.dispatchCommand(FORMAT_TEXT_COMMAND,o);return}if(t==="ul"){e.dispatchCommand(INSERT_UNORDERED_LIST_COMMAND,void 0);return}if(t==="ol"){e.dispatchCommand(INSERT_ORDERED_LIST_COMMAND,void 0);return}e.update(()=>{let r=$getSelection();if($isRangeSelection(r)){if(t==="h1"||t==="h2"||t==="h3"){let n=t;$setBlocksType(r,()=>$createHeadingNode(n));return}(t==="blockquote"||t==="pullquote")&&$setBlocksType(r,()=>{let n=$createQuoteNode();return t==="pullquote"&&(n.__pullquote=true),n});}});}function Kf(e,t,o,r){e.update(()=>{let n=$getSelection();if(!$isRangeSelection(n))return;let a=$createBeautifulMentionNode(t,o,r);n.insertNodes([a]),n.insertText(" ");});}function qf(e,t){let o=false;return e.update(()=>{let r=$getRoot(),a=r.getTextContent().indexOf(t);if(a===-1)return;let i=0,s=null,l=0,d=null,p=0,m=u=>{if(!(s&&d)){if(u.getType()==="text"){let b=u,f=b.getTextContentSize(),h=i,g=i+f;!s&&a>=h&&a<g&&(s=b,l=a-h);let v=a+t.length;!d&&v>h&&v<=g&&(d=b,p=v-h),i=g;return}if("getChildren"in u)for(let b of u.getChildren())m(b);else i+=u.getTextContentSize();}};if(m(r),s&&d){let u=s,b=d;u.select(l,0).focus.set(b.getKey(),p,"text"),o=true;}}),o}function Or(e){e.update(()=>{let t=$getRoot();t.clear();let o=$createParagraphNode();t.append(o),o.select();});}function ic(e){let t="",o="",r=[];return e.getEditorState().read(()=>{t=$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($getRoot());}),{text:t,json:o,mentions:r}}var Yf=[{format:"bold",icon:Bold,label:"Bold"},{format:"italic",icon:Italic,label:"Italic"},{format:"underline",icon:Underline,label:"Underline"},{format:"strikethrough",icon:Strikethrough,label:"Strikethrough"},{format:"code",icon:Code,label:"Inline code"},{format:"h1",icon:Heading1,label:"Heading 1"},{format:"h2",icon:Heading2,label:"Heading 2"},{format:"h3",icon:Heading3,label:"Heading 3"},{format:"blockquote",icon:Quote,label:"Blockquote"},{format:"ul",icon:List,label:"Bulleted list"},{format:"ol",icon:ListOrdered,label:"Numbered list"}];function Zf({formats:e}){let[t]=useLexicalComposerContext(),[o,r]=y.useState(()=>new Set);y.useEffect(()=>mergeRegister(t.registerUpdateListener(({editorState:a})=>{a.read(()=>{let i=$getSelection();if(!$isRangeSelection(i))return;let s=new Set;for(let l of ["bold","italic","underline","strikethrough","code"])i.hasFormat(l)&&s.add(l);r(s);});})),[t]);let n=Yf.filter(a=>e.includes(a.format));return y.createElement("div",{"data-gds-part":"composer-toolbar",className:c("flex flex-wrap items-center gap-0.5","px-2 py-1")},n.map(({format:a,icon:i,label:s})=>{let l=ac[a],d=l?o.has(l):false;return y.createElement("button",{key:a,type:"button","aria-label":s,title:s,"data-gds-part":"composer-toolbar-button","data-gds-active":d?"true":"false",onClick:()=>nc(t,a),className:c("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",d&&"bg-[var(--gds-composer-toolbar-active-bg)] text-[var(--gds-composer-toolbar-active-fg)]")},y.createElement(i,{className:"h-3.5 w-3.5"}))}))}function Xf({attachments:e,onRemove:t}){return y.createElement(AnimatePresence,{initial:false},e.length>0&&y.createElement(motion.div,{initial:{opacity:0,height:0},animate:{opacity:1,height:"auto"},exit:{opacity:0,height:0},transition:{duration:.18},className:"overflow-hidden"},y.createElement("div",{"data-gds-part":"composer-attachments",className:"flex flex-wrap gap-2 px-2 py-2"},e.map(o=>y.createElement("div",{key:o.id,className:"relative group"},o.file.type.startsWith("image/")?y.createElement("img",{src:o.previewUrl,alt:o.name,className:"h-14 w-14 rounded-md object-cover border border-[var(--gds-composer-border)]"}):y.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)),y.createElement("button",{type:"button",onClick:()=>t(o.id),"aria-label":`Remove ${o.name}`,className:c("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")},y.createElement(X,{className:"w-3 h-3"})))))))}function Jf({placeholder:e,triggers:t,attachmentsCfg:o,formatList:r,showToolbar:n,isLoading:a,onStop:i,maxLength:s,autoFocus:l,submitOnEnter:d=true,leftActions:p,rightActions:m,hideSend:u,steps:b,trigger:f="mount",play:h,speed:g="normal",loop:v=false,loopDelay:k,onLoopReset:x,bare:w,className:S,onSubmit:T,onChange:L,readOnly:B,handleEditorReady:V,submitRef:N,restartRef:A,attachments:F,setAttachments:Q,ingestImages:ge}){let[I]=useLexicalComposerContext(),ee=y.useRef(null),R=y.useRef(null),[O,fe]=y.useState(false);y.useEffect(()=>{V(I);},[I,V]),y.useEffect(()=>{I.setEditable(!B);},[I,B]);let ve=y.useRef(L);ve.current=L,y.useEffect(()=>I.registerUpdateListener(({editorState:C})=>{C.read(()=>{let K=$getRoot().getTextContent();fe(K.trim().length>0),ve.current?.(K);});}),[I]);let U=y.useCallback(()=>{if(a)return;let C=ic(I),K=C.text.trim().length>0,G=F.length>0;!K&&!G||(T?.(C,G?F:void 0),Or(I),F.forEach(Se=>URL.revokeObjectURL(Se.previewUrl)),Q([]));},[I,a,F,T,Q]);N.current=U;let{restart:ae}=To({steps:b,speed:g,trigger:f,play:h,loop:v,loopDelay:k,containerRef:ee,onLoopReset:()=>{Or(I),x?.();},interpret:async(C,K)=>{let G=K.signal;if(C.type==="wait")return Ce(C.ms,G);if(C.type==="clear")return Or(I),Ce(120,G);if(C.type==="newline")return I.update(()=>{let W=$getSelection();$isRangeSelection(W)&&W.insertParagraph();}),Ce(60,G);if(C.type==="submit")return U(),Ce(120,G);if(C.type==="format")return nc(I,C.format),I.update(()=>{let W=$getSelection();if(!$isRangeSelection(W)||W.isCollapsed())return;let Ue=W.focus;W.anchor.set(Ue.key,Ue.offset,Ue.type);}),Ce(80,G);if(C.type==="select")return qf(I,C.text),Ce(120,G);if(C.type==="mention")return C.query&&(I.update(()=>{let W=$getSelection();$isRangeSelection(W)&&W.insertText(C.trigger);}),await Ra(C.query,W=>{I.update(()=>{let Ue=$getRoot(),Re=Ue.getTextContent(),Xe=Re.slice(0,Re.length-C.trigger.length-(W.length-1));Ue.clear();let z=$createParagraphNode();Xe&&z.append($createTextNode(Xe)),z.append($createTextNode(C.trigger+W)),Ue.append(z);});},K.speed.tokenStagger,G),await Ce(180,G),I.update(()=>{let W=$getRoot(),Ue=W.getTextContent(),Re=C.trigger.length+C.query.length,Xe=Ue.slice(0,Ue.length-Re);W.clear();let z=$createParagraphNode();Xe&&z.append($createTextNode(Xe)),W.append(z),z.select();})),Kf(I,C.trigger,C.value),Ce(120,G);let Se=C.speed?{slow:70,normal:22,fast:8}[C.speed]:K.speed.tokenStagger;for(let W=0;W<C.text.length;W++){if(G.aborted)return;let Ue=C.text[W];I.update(()=>{let Re=$getSelection();if(!$isRangeSelection(Re)){$getRoot().selectEnd();let Xe=$getSelection();$isRangeSelection(Xe)&&Xe.insertText(Ue);return}Re.insertText(Ue);}),W<C.text.length-1&&await Ce(Se,G);}}});y.useEffect(()=>{A.current=C=>{Or(I),ae(C);};},[I,ae,A]);let xe=!B&&!m&&!u,Te=!B&&!p&&o!==null,ie=!B&&(Te||p||xe||m);return y.createElement("div",{ref:ee,"data-gds-part":"composer","data-gds-loading":a?"true":"false",className:c("w-full",!w&&["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&&y.createElement(Zf,{formats:r}),o&&y.createElement(Xf,{attachments:F,onRemove:C=>{Q(K=>{let G=K.find(Se=>Se.id===C);return G&&URL.revokeObjectURL(G.previewUrl),K.filter(Se=>Se.id!==C)});}}),y.createElement("div",{className:"relative"},y.createElement(RichTextPlugin,{contentEditable:y.createElement(ContentEditable,{"data-gds-part":"composer-editor",className:c("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:y.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}),y.createElement(HistoryPlugin,null),y.createElement(ListPlugin,null),y.createElement(LinkPlugin,null),y.createElement(OnChangePlugin,{onChange:()=>{}}),y.createElement(jf,{enabled:!!l}),y.createElement(Uf,{onSubmit:U,enabled:d}),o&&y.createElement($f,{onImageFiles:ge,enabled:true}),t.length>0&&y.createElement(BeautifulMentionsPlugin,{items:t.reduce((C,K)=>(typeof K.items=="function"||(C[K.char]=K.items.map(G=>({value:G.value}))),C),{})})),ie&&y.createElement("div",{"data-gds-part":"composer-actions",className:"flex items-center justify-between gap-2 px-2 pb-2 pt-1"},y.createElement("div",{className:"flex items-center gap-1"},p??(Te&&y.createElement("button",{type:"button",onClick:()=>R.current?.click(),disabled:a,"aria-label":"Attach image",title:"Attach image",className:c("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")},y.createElement(Paperclip,{className:"w-4 h-4"})))),m??(xe&&y.createElement("button",{type:"button",onClick:a?i:U,disabled:a?!i:!O&&F.length===0,"aria-label":a?"Stop":"Send",className:c("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":O||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?y.createElement(Square,{className:"w-3.5 h-3.5"}):y.createElement(Send,{className:"w-3.5 h-3.5"}))),o&&y.createElement("input",{ref:R,type:"file",accept:o.accept,multiple:o.multiple,onChange:C=>{C.target.files&&ge(Array.from(C.target.files)),C.target.value="";},className:"sr-only",tabIndex:-1,"aria-hidden":"true"})))}var sc=y.forwardRef(function(t,o){let{initialText:r,initialJson:n,formats:a,toolbar:i,triggers:s,attachments:l,...d}=t,p=y.useMemo(()=>a===false?[]:a??["bold","italic","underline","strikethrough","code","h1","h2","blockquote","ul","ol"],[a]),m=i===true||i==="top",u=y.useMemo(()=>{if(!l)return null;let N=l===true?{}:l;return N.enabled===false?null:{enabled:true,accept:N.accept??"image/*",maxItems:N.maxItems??10,multiple:N.multiple??true}},[l]),[b,f]=y.useState([]),h=y.useRef(b);h.current=b,y.useEffect(()=>()=>{h.current.forEach(N=>URL.revokeObjectURL(N.previewUrl));},[]);let g=y.useCallback(N=>{if(!u)return;let A=N.filter(F=>u.accept?u.accept==="image/*"?F.type.startsWith("image/"):u.accept.split(",").some(Q=>{let ge=Q.trim();return ge.endsWith("/*")?F.type.startsWith(ge.slice(0,-1)):F.type===ge||F.name.toLowerCase().endsWith(ge)}):true);A.length!==0&&f(F=>{let Q=u.maxItems-F.length;if(Q<=0)return F;let ge=A.slice(0,Q).map(I=>({id:`${I.name}-${I.size}-${Date.now()}-${Math.random().toString(36).slice(2,8)}`,file:I,previewUrl:URL.createObjectURL(I),name:I.name}));return [...F,...ge]});},[u]),v=y.useRef(null),k=y.useRef(()=>{}),x=y.useRef(()=>{}),w=y.useCallback(N=>{v.current=N;},[]);y.useImperativeHandle(o,()=>({play:N=>{console.warn('[Composer] handle.play(steps) is not wired in v1 \u2014 pass `steps` + `trigger="manual"` and toggle `play` instead.');},stop:()=>{},restart:N=>x.current(N),focus:()=>v.current?.focus(),clear:()=>{let N=v.current;N&&Or(N);},insert:N=>{v.current?.update(()=>{let A=$getSelection();$isRangeSelection(A)&&A.insertText(N);});},getContent:()=>v.current?ic(v.current):{text:"",json:"",mentions:[]},getEditor:()=>v.current}),[]);let S=y.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"}}),[]),T=y.useMemo(()=>({namespace:"gds-composer",theme:S,onError:N=>{console.error("[Composer]",N);},nodes:[HeadingNode,QuoteNode,ListNode,ListItemNode,LinkNode,AutoLinkNode,CodeNode,CodeHighlightNode,BeautifulMentionNode],editorState:n||(r?N=>{let A=$getRoot(),F=$createParagraphNode();F.append($createTextNode(r)),A.append(F);}:void 0)}),[S,n,r]),L=p.length>0,{readOnly:B=false,...V}=d;return y.createElement(LexicalComposer,{initialConfig:{...T,editable:!B}},y.createElement(Jf,{...V,readOnly:B,triggers:s??[],attachmentsCfg:B?null:u,formatList:p,showToolbar:m&&L&&!B,handleEditorReady:w,submitRef:k,restartRef:x,attachments:b,setAttachments:f,ingestImages:g}))}),Qf=y.forwardRef(function(t,o){return y.createElement(sc,{ref:o,placeholder:"Write a reply\u2026",formats:false,submitOnEnter:false,...t})});var Xt=Vt.Root,Jt=Vt.Trigger,eg=Vt.Anchor,Gt=y.forwardRef(({className:e,align:t="center",sideOffset:o=4,surface:r="solid",...n},a)=>y.createElement(Vt.Portal,null,y.createElement(Vt.Content,{ref:a,align:t,sideOffset:o,"data-surface":r,className:c("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]",Ot(r,"bg-popover"),yt[r],e),...n})));Gt.displayName=Vt.Content.displayName;var tg="PPP",og="LLL dd, y";function rg({value:e,onChange:t,placeholder:o="Pick a date",disabled:r,className:n,contentClassName:a,align:i="start",side:s,format:l=tg,captionLayout:d,icon:p,"aria-label":m}){return y.createElement(Xt,null,y.createElement(Jt,{asChild:true},y.createElement(ut,{type:"button",variant:"outline",disabled:r,"aria-label":m??(e?void 0:o),"data-empty":!e,className:c("w-[280px] justify-start text-left font-normal data-[empty=true]:text-muted-foreground",n)},p??y.createElement(CalendarIcon,{className:"mr-2 h-4 w-4","aria-hidden":true}),e?format(e,l):y.createElement("span",null,o))),y.createElement(Gt,{className:c("w-auto p-0",a),align:i,side:s},y.createElement(ga,{mode:"single",selected:e,onSelect:t,captionLayout:d,initialFocus:true})))}function ag({value:e,onChange:t,placeholder:o="Pick a date range",disabled:r,className:n,contentClassName:a,align:i="start",side:s,format:l=og,captionLayout:d,icon:p,numberOfMonths:m=2,"aria-label":u}){let b=!!e?.from;return y.createElement(Xt,null,y.createElement(Jt,{asChild:true},y.createElement(ut,{type:"button",variant:"outline",disabled:r,"aria-label":u??(b?void 0:o),"data-empty":!b,className:c("w-[300px] justify-start text-left font-normal data-[empty=true]:text-muted-foreground",n)},p??y.createElement(CalendarIcon,{className:"mr-2 h-4 w-4","aria-hidden":true}),e?.from?e.to?y.createElement(y.Fragment,null,format(e.from,l)," \u2013"," ",format(e.to,l)):format(e.from,l):y.createElement("span",null,o))),y.createElement(Gt,{className:c("w-auto p-0",a),align:i,side:s},y.createElement(ga,{mode:"range",selected:e,onSelect:t,defaultMonth:e?.from,numberOfMonths:m,captionLayout:d,initialFocus:true})))}var ig=Fe.Root,sg=Fe.Trigger,cc=Fe.Portal,lg=Fe.Close,Sn=y.forwardRef(({className:e,...t},o)=>y.createElement(Fe.Overlay,{ref:o,className:c("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}));Sn.displayName=Fe.Overlay.displayName;var dc=y.forwardRef(({className:e,children:t,surface:o="solid",...r},n)=>y.createElement(cc,null,y.createElement(Sn,null),y.createElement(Fe.Content,{ref:n,"data-surface":o,className:c("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",Ot(o,"bg-background"),yt[o],e),...r},t,y.createElement(Fe.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"},y.createElement(X,{className:"h-4 w-4"}),y.createElement("span",{className:"sr-only"},"Close")))));dc.displayName=Fe.Content.displayName;var pc=({className:e,...t})=>y.createElement("div",{className:c("flex flex-col space-y-1.5 text-center sm:text-left",e),...t});pc.displayName="DialogHeader";var uc=({className:e,...t})=>y.createElement("div",{className:c("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});uc.displayName="DialogFooter";var mc=y.forwardRef(({className:e,...t},o)=>y.createElement(Fe.Title,{ref:o,className:c("text-lg font-semibold leading-none tracking-tight",e),...t}));mc.displayName=Fe.Title.displayName;var fc=y.forwardRef(({className:e,...t},o)=>y.createElement(Fe.Description,{ref:o,className:c("text-sm text-muted-foreground",e),...t}));fc.displayName=Fe.Description.displayName;var ug=ne.Root,mg=ne.Trigger,jo=y.createContext("default"),gc=e=>e==="default"?"px-2 py-1.5 text-sm":"px-2 py-1 text-xs",fg=ne.Group,gg=ne.Portal,hg=ne.Sub,bg=ne.RadioGroup,hc=y.forwardRef(({className:e,inset:t,children:o,...r},n)=>{let a=y.useContext(jo);return y.createElement(ne.SubTrigger,{ref:n,className:c("flex cursor-default select-none items-center gap-2 rounded-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground [&_svg]:pointer-events-none [&_svg]:shrink-0",gc(a),a==="default"?"[&_svg]:size-4":"[&_svg]:size-3.5",t&&(a==="default"?"pl-8":"pl-7"),e),...r},o,y.createElement(ChevronRight,{className:"ml-auto"}))});hc.displayName=ne.SubTrigger.displayName;var bc=y.forwardRef(({className:e,surface:t="solid",size:o="default",children:r,...n},a)=>y.createElement(ne.SubContent,{ref:a,"data-surface":t,className:c("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",Ot(t,"bg-popover"),yt[t],e),...n},y.createElement(jo.Provider,{value:o},r)));bc.displayName=ne.SubContent.displayName;var vc=y.forwardRef(({className:e,sideOffset:t=4,surface:o="solid",size:r="default",children:n,...a},i)=>y.createElement(ne.Portal,null,y.createElement(ne.Content,{ref:i,sideOffset:t,"data-surface":o,className:c("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]",Ot(o,"bg-popover"),yt[o],e),...a},y.createElement(jo.Provider,{value:r},n))));vc.displayName=ne.Content.displayName;var yc=y.forwardRef(({className:e,inset:t,...o},r)=>{let n=y.useContext(jo);return y.createElement(ne.Item,{ref:r,className:c("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",gc(n),n==="default"?"[&>svg]:size-4":"[&>svg]:size-3.5",t&&(n==="default"?"pl-8":"pl-7"),e),...o})});yc.displayName=ne.Item.displayName;var xc=y.forwardRef(({className:e,children:t,checked:o,...r},n)=>{let i=y.useContext(jo)!=="default";return y.createElement(ne.CheckboxItem,{ref:n,className:c("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},y.createElement("span",{className:c("absolute flex items-center justify-center",i?"left-1.5 h-3 w-3":"left-2 h-3.5 w-3.5")},y.createElement(ne.ItemIndicator,null,y.createElement(Check,{className:i?"h-3 w-3":"h-4 w-4"}))),t)});xc.displayName=ne.CheckboxItem.displayName;var wc=y.forwardRef(({className:e,children:t,...o},r)=>{let a=y.useContext(jo)!=="default";return y.createElement(ne.RadioItem,{ref:r,className:c("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},y.createElement("span",{className:c("absolute flex items-center justify-center",a?"left-1.5 h-3 w-3":"left-2 h-3.5 w-3.5")},y.createElement(ne.ItemIndicator,null,y.createElement(Circle,{className:"h-2 w-2 fill-current"}))),t)});wc.displayName=ne.RadioItem.displayName;var kc=y.forwardRef(({className:e,inset:t,...o},r)=>{let n=y.useContext(jo);return y.createElement(ne.Label,{ref:r,className:c("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})});kc.displayName=ne.Label.displayName;var Sc=y.forwardRef(({className:e,...t},o)=>y.createElement(ne.Separator,{ref:o,className:c("-mx-1 my-1 h-px bg-muted",e),...t}));Sc.displayName=ne.Separator.displayName;var Rc=({className:e,...t})=>y.createElement("span",{className:c("ml-auto text-xs tracking-widest opacity-60",e),...t});Rc.displayName="DropdownMenuShortcut";var Cc=cva("flex w-full rounded-md 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"},variant:{default:"border border-input",ghost:"border border-transparent bg-transparent shadow-none"}},defaultVariants:{size:"default",variant:"default"}}),yg={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"}},vo=y.forwardRef(({className:e,type:t,size:o="default",variant:r="default",startSlot:n,endSlot:a,...i},s)=>{if(!n&&!a)return y.createElement("input",{type:t,className:c(Cc({size:o,variant:r}),e),ref:s,...i});let l=yg[o];return y.createElement("div",{className:"relative flex w-full items-center"},n?y.createElement("span",{className:c("pointer-events-none absolute inset-y-0 left-0 flex items-center text-muted-foreground [&_svg]:size-3.5",l.startInset)},n):null,y.createElement("input",{type:t,ref:s,className:c(Cc({size:o,variant:r}),n&&l.startPad,a&&l.endPad,e),...i}),a?y.createElement("span",{className:c("pointer-events-none absolute inset-y-0 right-0 flex items-center text-muted-foreground [&_svg]:size-3.5",l.endInset)},a):null)});vo.displayName="Input";var wg=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"}}),Wr=y.forwardRef(({className:e,size:t,...o},r)=>y.createElement(Rn.Root,{ref:r,className:c(wg({size:t}),e),...o}));Wr.displayName=Rn.Root.displayName;var Tc=y.forwardRef(({className:e,value:t,...o},r)=>y.createElement($r.Root,{ref:r,className:c("relative h-4 w-full overflow-hidden rounded-full bg-secondary",e),...o},y.createElement($r.Indicator,{className:"h-full w-full flex-1 bg-primary transition-all",style:{transform:`translateX(-${100-(t||0)}%)`}})));Tc.displayName=$r.Root.displayName;var Cn=y.forwardRef(({className:e,...t},o)=>y.createElement(Command,{ref:o,className:c("flex h-full w-full flex-col overflow-hidden rounded-md bg-popover text-popover-foreground",e),...t}));Cn.displayName=Command.displayName;var Tn=y.forwardRef(({className:e,...t},o)=>y.createElement("div",{className:"flex items-center border-b px-3","cmdk-input-wrapper":""},y.createElement(Search,{className:"mr-2 h-4 w-4 shrink-0 opacity-50"}),y.createElement(Command.Input,{ref:o,className:c("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})));Tn.displayName=Command.Input.displayName;var Pn=y.forwardRef(({className:e,...t},o)=>y.createElement(Command.List,{ref:o,className:c("max-h-[300px] overflow-y-auto overflow-x-hidden",e),...t}));Pn.displayName=Command.List.displayName;var Mn=y.forwardRef((e,t)=>y.createElement(Command.Empty,{ref:t,className:"py-6 text-center text-sm",...e}));Mn.displayName=Command.Empty.displayName;var La=y.forwardRef(({className:e,...t},o)=>y.createElement(Command.Group,{ref:o,className:c("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}));La.displayName=Command.Group.displayName;var Nn=y.forwardRef(({className:e,...t},o)=>y.createElement(Command.Separator,{ref:o,className:c("-mx-1 h-px bg-border",e),...t}));Nn.displayName=Command.Separator.displayName;var gr=y.forwardRef(({className:e,...t},o)=>y.createElement(Command.Item,{ref:o,className:c("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}));gr.displayName=Command.Item.displayName;var jr=y.forwardRef(({className:e,orientation:t="horizontal",decorative:o=true,...r},n)=>y.createElement(En.Root,{ref:n,decorative:o,orientation:t,className:c("shrink-0 bg-border",t==="horizontal"?"h-[1px] w-full":"h-full w-[1px]",e),...r}));jr.displayName=En.Root.displayName;var Mg=3,Pc=y.forwardRef(function({options:t,value:o,defaultValue:r,onValueChange:n,placeholder:a="Select\u2026",searchPlaceholder:i="Search\u2026",emptyMessage:s="Nothing matches.",maxCount:l=Mg,searchable:d=true,badgeDismissible:p=true,disabled:m=false,modalPopover:u=false,className:b,id:f,"aria-label":h,...g},v){let k=o!==void 0,[x,w]=y.useState(r??[]),S=k?o:x,[T,L]=y.useState(false),B=y.useMemo(()=>{let R=new Map;for(let O of t)R.set(O.value,O);return R},[t]),V=y.useCallback(R=>{k||w(R),n?.(R);},[k,n]),N=R=>{S.includes(R)?V(S.filter(O=>O!==R)):V([...S,R]);},A=(R,O)=>{R.preventDefault(),R.stopPropagation(),V(S.filter(fe=>fe!==O));},F=R=>{R?.preventDefault(),R?.stopPropagation(),V([]);},Q=()=>{let R=t.filter(O=>!O.disabled).map(O=>O.value);V(R);},ge=t.length>0&&t.filter(R=>!R.disabled).every(R=>S.includes(R.value)),I=S.slice(0,l),ee=Math.max(0,S.length-l);return y.createElement(Xt,{open:T,onOpenChange:L,modal:u},y.createElement(Jt,{asChild:true},y.createElement("button",{ref:v,type:"button",id:f,role:"combobox","aria-expanded":T,"aria-haspopup":"listbox","aria-label":h,disabled:m,"data-gds-part":"multi-select",className:c("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",b)},S.length===0?y.createElement("span",{className:"text-muted-foreground px-1"},a):y.createElement("div",{className:"flex flex-1 flex-wrap items-center gap-1 py-1","data-gds-part":"multi-select-badges"},I.map(R=>{let O=B.get(R);if(!O)return null;let fe=O.icon;return y.createElement(ma,{key:R,variant:"secondary",className:"gap-1 pr-1","data-gds-part":"multi-select-badge"},fe?y.createElement(fe,{className:"h-3 w-3"}):null,y.createElement("span",{className:"truncate max-w-[12rem]"},O.label),p&&!m&&y.createElement("span",{role:"button","aria-label":`Remove ${O.label}`,tabIndex:0,onClick:ve=>A(ve,R),onKeyDown:ve=>{(ve.key==="Enter"||ve.key===" ")&&A(ve,R);},className:"ml-0.5 inline-flex h-4 w-4 cursor-pointer items-center justify-center rounded-sm hover:bg-muted-foreground/20"},y.createElement(X,{className:"h-3 w-3","aria-hidden":true})))}),ee>0&&y.createElement(ma,{variant:"outline",className:"text-muted-foreground","data-gds-part":"multi-select-overflow",title:S.slice(l).map(R=>B.get(R)?.label??R).join(", ")},"+",ee," more")),y.createElement("div",{className:"flex shrink-0 items-center gap-1"},S.length>0&&!m&&y.createElement("span",{role:"button","aria-label":"Clear all",tabIndex:0,onClick:R=>F(R),onKeyDown:R=>{(R.key==="Enter"||R.key===" ")&&F(R);},className:"inline-flex h-5 w-5 cursor-pointer items-center justify-center rounded-sm text-muted-foreground hover:text-foreground hover:bg-muted"},y.createElement(XCircle,{className:"h-3.5 w-3.5","aria-hidden":true})),y.createElement(ChevronDown,{className:"h-4 w-4 shrink-0 text-muted-foreground","aria-hidden":true})))),y.createElement(Gt,{align:"start",className:"w-[var(--radix-popover-trigger-width)] p-0","data-gds-part":"multi-select-content"},y.createElement(Cn,null,d&&y.createElement(Tn,{placeholder:i}),y.createElement(Pn,null,y.createElement(Mn,null,s),y.createElement(La,null,t.map(R=>{let O=R.icon,fe=S.includes(R.value);return y.createElement(gr,{key:R.value,value:R.label,onSelect:()=>N(R.value),disabled:R.disabled,"data-gds-part":"multi-select-item","data-selected":fe||void 0},y.createElement("div",{className:c("mr-2 flex h-4 w-4 shrink-0 items-center justify-center rounded-sm border border-primary",fe?"bg-primary text-primary-foreground":"opacity-50 [&_svg]:invisible"),"aria-hidden":true},y.createElement(Check,{className:"h-3 w-3"})),O?y.createElement(O,{className:"mr-2 h-4 w-4 text-muted-foreground"}):null,y.createElement("span",{className:"truncate"},R.label))})),y.createElement(Nn,null),y.createElement(La,null,y.createElement("div",{className:"flex items-center justify-between gap-1 p-1"},y.createElement(gr,{onSelect:Q,className:"flex-1 justify-center text-xs",disabled:ge},"Select all"),y.createElement(jr,{orientation:"vertical",className:"h-5"}),y.createElement(gr,{onSelect:()=>F(),className:"flex-1 justify-center text-xs",disabled:S.length===0},"Clear"),y.createElement(jr,{orientation:"vertical",className:"h-5"}),y.createElement(gr,{onSelect:()=>L(false),className:"flex-1 justify-center text-xs"},"Close")))))))});Pc.displayName="MultiSelect";var Mc=y.forwardRef(({className:e,...t},o)=>y.createElement(No.Root,{className:c("grid gap-2",e),...t,ref:o}));Mc.displayName=No.Root.displayName;var Nc=y.forwardRef(({className:e,...t},o)=>y.createElement(No.Item,{ref:o,className:c("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},y.createElement(No.Indicator,{className:"flex items-center justify-center"},y.createElement(Circle,{className:"h-2.5 w-2.5 fill-current text-current"}))));Nc.displayName=No.Item.displayName;var Lg=({className:e,...t})=>y.createElement(hr.PanelGroup,{"data-gds-part":"resizable-panel-group",className:c("flex h-full w-full data-[panel-group-direction=vertical]:flex-col",e),...t}),Ag=hr.Panel,Dg=({withHandle:e,className:t,...o})=>y.createElement(hr.PanelResizeHandle,{"data-gds-part":"resizable-handle",className:c("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&&y.createElement("div",{className:"z-10 flex h-4 w-3 items-center justify-center rounded-sm border bg-border"},y.createElement(GripVertical,{className:"h-2.5 w-2.5"})));var Ec=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}}),Lc=y.forwardRef(({className:e,gap:t,align:o,justify:r,wrap:n,asChild:a=false,...i},s)=>y.createElement(a?Slot:"div",{ref:s,"data-gds-part":"row",className:c(Ec({gap:t,align:o,justify:r,wrap:n,className:e})),...i}));Lc.displayName="Row";var Ac=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"}}),Dc=y.forwardRef(({className:e,cols:t,gap:o,align:r,asChild:n=false,...a},i)=>y.createElement(n?Slot:"div",{ref:i,"data-gds-part":"grid",className:c(Ac({cols:t,gap:o,align:r,className:e})),...a}));Dc.displayName="Grid";var Ic=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"}}),Hc=y.forwardRef(({className:e,direction:t,gap:o,align:r,justify:n,wrap:a,asChild:i=false,...s},l)=>y.createElement(i?Slot:"div",{ref:l,"data-gds-part":"flex",className:c(Ic({direction:t,gap:o,align:r,justify:n,wrap:a,className:e})),...s}));Hc.displayName="Flex";var Fc=y.forwardRef(({className:e,children:t,...o},r)=>y.createElement(Lt.Root,{ref:r,className:c("relative overflow-hidden",e),...o},y.createElement(Lt.Viewport,{className:"h-full w-full rounded-[inherit]"},t),y.createElement(Ln,null),y.createElement(Lt.Corner,null)));Fc.displayName=Lt.Root.displayName;var Ln=y.forwardRef(({className:e,orientation:t="vertical",...o},r)=>y.createElement(Lt.ScrollAreaScrollbar,{ref:r,orientation:t,className:c("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},y.createElement(Lt.ScrollAreaThumb,{className:"relative flex-1 rounded-full bg-border"})));Ln.displayName=Lt.ScrollAreaScrollbar.displayName;var An=de.Root,Gg=de.Group,Dn=de.Value,In=y.createContext("default"),Wg=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"}}),Fa=y.forwardRef(({className:e,children:t,size:o="default",startSlot:r,chevron:n=true,...a},i)=>y.createElement(de.Trigger,{ref:i,className:c(Wg({size:o}),e),...a},r?y.createElement("div",{className:"flex min-w-0 flex-1 items-center gap-1.5 [&>span]:truncate"},y.createElement("span",{className:"pointer-events-none flex shrink-0 items-center text-muted-foreground/70 [&_svg]:size-4"},r),t):t,n?y.createElement(de.Icon,{asChild:true},y.createElement(ChevronDown,{className:c("opacity-50",o==="sm"?"h-3.5 w-3.5":"h-4 w-4")})):null));Fa.displayName=de.Trigger.displayName;var Hn=y.forwardRef(({className:e,...t},o)=>y.createElement(de.ScrollUpButton,{ref:o,className:c("flex cursor-default items-center justify-center py-1",e),...t},y.createElement(ChevronUp,{className:"h-4 w-4"})));Hn.displayName=de.ScrollUpButton.displayName;var Fn=y.forwardRef(({className:e,...t},o)=>y.createElement(de.ScrollDownButton,{ref:o,className:c("flex cursor-default items-center justify-center py-1",e),...t},y.createElement(ChevronDown,{className:"h-4 w-4"})));Fn.displayName=de.ScrollDownButton.displayName;var za=y.forwardRef(({className:e,children:t,position:o="popper",size:r="default",...n},a)=>y.createElement(de.Portal,null,y.createElement(de.Content,{ref:a,className:c("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},y.createElement(Hn,null),y.createElement(de.Viewport,{className:c(r==="default"?"p-1":"p-0.5",o==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]")},y.createElement(In.Provider,{value:r},t)),y.createElement(Fn,null))));za.displayName=de.Content.displayName;var Ug={default:"py-1.5 pl-8 pr-2 text-sm font-semibold",sm:"py-1 pl-7 pr-2 text-xs font-semibold",xs:"py-1 pl-6 pr-2 text-2xs font-medium text-muted-foreground uppercase tracking-wide","2xs":"py-0.5 pl-6 pr-2 text-2xs font-medium text-muted-foreground uppercase tracking-wide"},_c=y.forwardRef(({className:e,...t},o)=>{let r=y.useContext(In);return y.createElement(de.Label,{ref:o,className:c(Ug[r],e),...t})});_c.displayName=de.Label.displayName;var $g=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"}}),Ba=y.forwardRef(({className:e,children:t,hint:o,...r},n)=>{let a=y.useContext(In),i=a!=="default";return y.createElement(de.Item,{ref:n,className:c("group",$g({size:a}),e),...r},y.createElement("span",{className:c("absolute flex items-center justify-center",i?"left-1.5 h-3 w-3":"left-2 h-3.5 w-3.5")},y.createElement(de.ItemIndicator,null,y.createElement(Check,{className:i?"h-3 w-3":"h-4 w-4"}))),y.createElement(de.ItemText,null,t),o!=null?y.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)});Ba.displayName=de.Item.displayName;var Oc=y.forwardRef(({className:e,...t},o)=>y.createElement(de.Separator,{ref:o,className:c("-mx-1 my-1 h-px bg-muted",e),...t}));Oc.displayName=de.Separator.displayName;var Vc=cva("relative inline-block shrink-0 overflow-hidden shadow-elevation-1",{variants:{size:{xs:"size-5",sm:"size-6",md:"size-8",lg:"size-10",xl:"size-14"},shape:{square:"rounded-none",rounded:"rounded-[var(--radius)]",circle:"rounded-full"}},defaultVariants:{size:"md",shape:"rounded"}});function Kg(e,t){return e||(t?`oklch(var(--${t.replace(/^--/,"")}))`:"transparent")}var qg=/^#([0-9a-f]{3}|[0-9a-f]{6})$/i,Gc=y.createContext({}),_a=y.forwardRef(function({color:t,token:o,size:r,shape:n,label:a,selected:i,onSelect:s,onColorChange:l,className:d,style:p,title:m,"aria-label":u,...b},f){let h=y.useContext(Gc),g=r??h.size,v=n??h.shape,k=Kg(t,o),x=typeof l=="function",w=!x&&typeof s=="function",S=qg.test(t??"")?t:"#000000",T=(typeof a=="string"?a:void 0)??o??t??"colour swatch",L={backgroundImage:"repeating-conic-gradient(var(--gds-media-checker-color) 0% 25%, transparent 0% 50%)",backgroundSize:"var(--gds-media-checker-size) var(--gds-media-checker-size)"},V=y.createElement(x?"label":w?"button":"div",{ref:f,"data-gds-part":"swatch","data-selected":i?"":void 0,title:m??T,"aria-label":u??(w?T:void 0),"aria-pressed":w?!!i:void 0,type:w?"button":void 0,onClick:w?s:void 0,className:c(Vc({size:g,shape:v}),i&&"ring-2 ring-selected ring-offset-2 ring-offset-background",(w||x)&&"cursor-pointer outline-none transition-transform hover:scale-[1.06] focus-within:ring-2 focus-within:ring-ring focus-within:ring-offset-2 focus-within:ring-offset-background focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background",!a&&d),style:{...L,...a?void 0:p},...a?{}:b},y.createElement("span",{className:"absolute inset-0",style:{background:k}}),y.createElement("span",{"aria-hidden":true,className:"pointer-events-none absolute inset-0 rounded-[inherit] ring-1 ring-inset ring-foreground/40"}),x&&y.createElement("input",{type:"color",value:S,onChange:N=>l(N.currentTarget.value),"aria-label":u??T,className:"absolute inset-0 cursor-pointer opacity-0"}));return a?y.createElement("div",{className:c("inline-flex flex-col items-start gap-1.5",d),style:p,...b},V,y.createElement("span",{className:"text-xs leading-none text-muted-foreground"},a)):V});_a.displayName="Swatch";var Yg={xs:"-space-x-1.5",sm:"-space-x-2",md:"-space-x-2.5",lg:"-space-x-3",xl:"-space-x-4"},Zg={xs:"gap-1",sm:"gap-2",md:"gap-3",lg:"gap-4"},Wc=y.forwardRef(function({layout:t="row",size:o,shape:r,gap:n="sm",className:a,children:i,...s},l){let d=t==="stack";return y.createElement(Gc.Provider,{value:{size:o,shape:r}},y.createElement("div",{ref:l,"data-gds-part":"swatch-group","data-layout":t,className:c("inline-flex flex-wrap items-center",d?c(Yg[o??"md"],"[&_[data-gds-part=swatch]]:ring-2 [&_[data-gds-part=swatch]]:ring-background"):Zg[n],a),...s},i))});Wc.displayName="SwatchGroup";var Qg=Fe.Root,eh=Fe.Trigger,th=Fe.Close,Uc=Fe.Portal,zn=y.forwardRef(({className:e,...t},o)=>y.createElement(Fe.Overlay,{className:c("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}));zn.displayName=Fe.Overlay.displayName;var oh=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"}}),$c=y.forwardRef(({side:e="right",surface:t="solid",className:o,overlayClassName:r,closeClassName:n,children:a,...i},s)=>y.createElement(Uc,null,y.createElement(zn,{className:r}),y.createElement(Fe.Content,{ref:s,"data-surface":t,className:c(oh({side:e}),Ot(t,"bg-background"),yt[t],o),...i},a,y.createElement(Fe.Close,{className:c("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",n)},y.createElement(X,{className:"h-4 w-4"}),y.createElement("span",{className:"sr-only"},"Close")))));$c.displayName=Fe.Content.displayName;var jc=({className:e,...t})=>y.createElement("div",{className:c("flex flex-col space-y-2 text-center sm:text-left",e),...t});jc.displayName="SheetHeader";var Kc=({className:e,...t})=>y.createElement("div",{className:c("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});Kc.displayName="SheetFooter";var qc=y.forwardRef(({className:e,...t},o)=>y.createElement(Fe.Title,{ref:o,className:c("text-lg font-semibold text-foreground",e),...t}));qc.displayName=Fe.Title.displayName;var Yc=y.forwardRef(({className:e,...t},o)=>y.createElement(Fe.Description,{ref:o,className:c("text-sm text-muted-foreground",e),...t}));Yc.displayName=Fe.Description.displayName;function rh({className:e,...t}){return y.createElement("div",{className:c("animate-pulse rounded-md bg-muted",e),...t})}var ah={default:{track:"h-2 bg-secondary",range:"bg-primary",thumb:"h-5 w-5 border-2 border-primary focus-visible:ring-2 focus-visible:ring-offset-2"},sm:{track:"h-[3px] bg-border",range:"bg-foreground/40",thumb:"h-3 w-3 border border-border hover:border-foreground/40 focus-visible:ring-2"}},qo=y.forwardRef(({className:e,size:t="default",...o},r)=>{let n=ah[t];return y.createElement(yo.Root,{ref:r,className:c("relative flex w-full cursor-pointer touch-none select-none items-center py-2 -my-1",e),...o},y.createElement(yo.Track,{className:c("relative w-full grow overflow-hidden rounded-full",n.track)},y.createElement(yo.Range,{className:c("absolute h-full rounded-full",n.range)})),y.createElement(yo.Thumb,{className:c("block rounded-full bg-background shadow-sm ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",n.thumb)}))});qo.displayName=yo.Root.displayName;var fh={vertical:verticalListSortingStrategy,horizontal:horizontalListSortingStrategy,grid:rectSortingStrategy},Bn=y.createContext(null),ad=y.createContext(null),_n=y.forwardRef(function({disabled:t=false,className:o,children:r,...n},a){let i=y.useRef(new Map),s=y.useCallback(m=>(i.current.set(m.id,m),()=>{i.current.delete(m.id);}),[]),l=useSensors(useSensor(PointerSensor,{activationConstraint:{distance:4}}),useSensor(KeyboardSensor,{coordinateGetter:sortableKeyboardCoordinates})),d=m=>{let u=i.current,b=u.get(String(m));if(b)return b;for(let f of u.values())if(f.values.some(h=>h===m))return f;return null},p=y.useCallback(m=>{if(t)return;let{active:u,over:b}=m;if(!b)return;let f=d(u.id),h=d(b.id);if(!f||!h)return;if(f.id===h.id){if(u.id===b.id)return;let x=f.values.findIndex(S=>S===u.id),w=f.values.findIndex(S=>S===b.id);if(x===-1||w===-1)return;f.onReorder?.(arrayMove(f.values,x,w));return}let g=f.values.filter(x=>x!==u.id),v=b.id===h.id?h.values.length:Math.max(0,h.values.findIndex(x=>x===b.id)),k=[...h.values.slice(0,v),u.id,...h.values.slice(v)];f.onReorder?.(g),h.onReorder?.(k);},[t]);return y.createElement(ad.Provider,{value:{registerContainer:s}},y.createElement(DndContext,{sensors:l,collisionDetection:closestCorners,onDragEnd:p},y.createElement("div",{ref:a,"data-gds-part":"sortable-group","data-disabled":t||void 0,className:c(o),...n},r)))});_n.displayName="Sortable.Group";var qr=y.forwardRef(function({values:t,onReorder:o,strategy:r="vertical",disabled:n=false,id:a,className:i,children:s,...l},d){let p=y.useContext(ad),m=p!==null,u=y.useId(),b=a??u;y.useEffect(()=>{if(m)return p.registerContainer({id:b,values:t,onReorder:o})},[m,p,b,t,o]);let f=useSensors(useSensor(PointerSensor,{activationConstraint:{distance:4}}),useSensor(KeyboardSensor,{coordinateGetter:sortableKeyboardCoordinates})),h=y.useCallback(k=>{let{active:x,over:w}=k;if(!w||x.id===w.id)return;let S=t.findIndex(L=>L===x.id),T=t.findIndex(L=>L===w.id);S===-1||T===-1||o?.(arrayMove(t,S,T));},[t,o]),g=y.useMemo(()=>({disabled:n}),[n]),v=y.createElement(SortableContext,{items:t,strategy:fh[r]},y.createElement(gh,{id:b,enabled:m,forwardedRef:d,strategy:r,disabled:n,className:i,...l},s));return m?y.createElement(Bn.Provider,{value:g},v):y.createElement(Bn.Provider,{value:g},y.createElement(DndContext,{sensors:f,collisionDetection:closestCenter,onDragEnd:h},v))});qr.displayName="Sortable";function gh({id:e,enabled:t,forwardedRef:o,strategy:r,disabled:n,className:a,children:i,...s}){let l=useDroppable({id:e,disabled:!t}),d=y.useCallback(p=>{t&&l.setNodeRef(p),typeof o=="function"?o(p):o&&(o.current=p);},[t,l,o]);return y.createElement("div",{ref:d,"data-gds-part":"sortable","data-strategy":r,"data-disabled":n||void 0,className:c(a),...s},i)}var nd=y.createContext(null),On=y.forwardRef(function({value:t,asChild:o=false,disabled:r,className:n,style:a,children:i,...s},l){let d=y.useContext(Bn);if(!d)throw new Error("<Sortable.Item> must be rendered inside <Sortable>.");let p=d.disabled||r||false,{attributes:m,listeners:u,setNodeRef:b,setActivatorNodeRef:f,transform:h,transition:g,isDragging:v}=useSortable({id:t,disabled:p}),k=y.useRef(false),x=y.useCallback(L=>{b(L),typeof l=="function"?l(L):l&&(l.current=L);},[b,l]),w=y.useMemo(()=>({listeners:u,setActivatorNodeRef:f,hasHandle:k,disabled:p}),[u,f,p]),S={transform:CSS.Transform.toString(h),transition:g,zIndex:v?1:void 0,cursor:p?"default":k.current?void 0:"grab",...a},T=o?Slot:"div";return y.createElement(nd.Provider,{value:w},y.createElement(T,{ref:x,"data-gds-part":"sortable-item","data-value":String(t),"data-dragging":v||void 0,className:c(n),style:S,...m,...k.current?{}:u,...s},i))});On.displayName="Sortable.Item";var Vn=y.forwardRef(function({asChild:t=false,className:o,children:r,...n},a){let i=y.useContext(nd);if(!i)throw new Error("<Sortable.Handle> must be rendered inside <Sortable.Item>.");y.useLayoutEffect(()=>(i.hasHandle.current=true,()=>{i.hasHandle.current=false;}),[i.hasHandle]);let s=y.useCallback(d=>{i.setActivatorNodeRef(d),typeof a=="function"?a(d):a&&(a.current=d);},[i,a]),l={"data-gds-part":"sortable-handle","aria-label":"Drag to reorder",className:c("cursor-grab touch-none select-none",i.disabled&&"cursor-default opacity-50",o),...i.disabled?{}:i.listeners,...n};return t?y.createElement(Slot,{ref:s,...l},r):y.createElement("button",{type:"button",ref:s,...l},r)});Vn.displayName="Sortable.Handle";qr.Item=On;qr.Handle=Vn;qr.Group=_n;var hh=qr;var id=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"}}),sd=y.forwardRef(({className:e,gap:t,align:o,justify:r,asChild:n=false,...a},i)=>y.createElement(n?Slot:"div",{ref:i,"data-gds-part":"stack",className:c(id({gap:t,align:o,justify:r,className:e})),...a}));sd.displayName="Stack";var yh=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"}}),xh=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"}}),Ga=y.forwardRef(({className:e,size:t="default",...o},r)=>y.createElement(Zr.Root,{className:c(yh({size:t}),e),...o,ref:r},y.createElement(Zr.Thumb,{className:c(xh({size:t}))})));Ga.displayName=Zr.Root.displayName;var cd=y.forwardRef(({className:e,...t},o)=>y.createElement("div",{className:"relative w-full overflow-auto"},y.createElement("table",{ref:o,className:c("w-full caption-bottom text-sm",e),...t})));cd.displayName="Table";var dd=y.forwardRef(({className:e,...t},o)=>y.createElement("thead",{ref:o,className:c("[&_tr]:border-b",e),...t}));dd.displayName="TableHeader";var pd=y.forwardRef(({className:e,...t},o)=>y.createElement("tbody",{ref:o,className:c("[&_tr:last-child]:border-0",e),...t}));pd.displayName="TableBody";var ud=y.forwardRef(({className:e,...t},o)=>y.createElement("tfoot",{ref:o,className:c("border-t bg-muted/50 font-medium [&>tr]:last:border-b-0",e),...t}));ud.displayName="TableFooter";var md=y.forwardRef(({className:e,...t},o)=>y.createElement("tr",{ref:o,className:c("border-b transition-colors hover:bg-muted/50 data-[state=selected]:bg-muted",e),...t}));md.displayName="TableRow";var fd=y.forwardRef(({className:e,...t},o)=>y.createElement("th",{ref:o,className:c("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}));fd.displayName="TableHead";var gd=y.forwardRef(({className:e,...t},o)=>y.createElement("td",{ref:o,className:c("p-2 align-middle [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",e),...t}));gd.displayName="TableCell";var hd=y.forwardRef(({className:e,...t},o)=>y.createElement("caption",{ref:o,className:c("mt-4 text-sm text-muted-foreground",e),...t}));hd.displayName="TableCaption";var bd=y.createContext(y.createElement(ChevronRight,null)),vd=y.forwardRef(({separator:e,children:t,...o},r)=>y.createElement(bd.Provider,{value:e??y.createElement(ChevronRight,null)},y.createElement("nav",{ref:r,"aria-label":"breadcrumb",...o},t)));vd.displayName="Breadcrumb";var yd=y.forwardRef(({className:e,...t},o)=>y.createElement("ol",{ref:o,className:c("flex flex-wrap items-center gap-1.5 break-words text-xs text-muted-foreground",e),...t}));yd.displayName="BreadcrumbList";var xd=y.forwardRef(({className:e,...t},o)=>y.createElement("li",{ref:o,className:c("inline-flex items-center gap-1.5",e),...t}));xd.displayName="BreadcrumbItem";var Wa=c("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"),wd=y.forwardRef(({asChild:e,className:t,href:o,...r},n)=>e?y.createElement("span",{ref:n,className:c(Wa,t),...r}):o?y.createElement("a",{ref:n,href:o,className:c(Wa,t),...r}):y.createElement("button",{ref:n,type:"button",className:c(Wa,t),...r}));wd.displayName="BreadcrumbLink";var kd=y.forwardRef(({className:e,...t},o)=>y.createElement("span",{ref:o,role:"link","aria-disabled":"true","aria-current":"page",className:c("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}));kd.displayName="BreadcrumbPage";var Sd=({children:e,className:t,...o})=>{let r=y.useContext(bd);return y.createElement("li",{role:"presentation","aria-hidden":"true",className:c("[&_svg]:size-3 [&_svg]:shrink-0 text-muted-foreground/60",t),...o},e??r)};Sd.displayName="BreadcrumbSeparator";var Rd=({className:e,...t})=>y.createElement("span",{role:"presentation","aria-hidden":"true",className:c("flex h-5 w-5 items-center justify-center",e),...t},y.createElement(MoreHorizontal,{className:"h-3.5 w-3.5"}),y.createElement("span",{className:"sr-only"},"More"));Rd.displayName="BreadcrumbEllipsis";var Cd=y.forwardRef(({label:e,items:t,onSelect:o,onSelectLabel:r,current:n,className:a},i)=>{let[s,l]=y.useState(false);return y.createElement(Xt,{open:s,onOpenChange:l},y.createElement(Jt,{asChild:true},y.createElement("button",{ref:i,type:"button",className:c(Wa,n&&"font-medium text-foreground",a),onClick:()=>{r?r():l(d=>!d);}},y.createElement("span",null,e),y.createElement(ChevronDown,{className:c("h-3 w-3 text-muted-foreground transition-transform",s&&"rotate-180"),onClick:d=>{d.stopPropagation(),l(p=>!p);},role:"button","aria-label":`Show ${e} children`}))),y.createElement(Gt,{align:"start",className:"w-64 p-1 max-h-80 overflow-y-auto"},t.length===0?y.createElement("p",{className:"px-2 py-1.5 text-xs text-muted-foreground"},"No items here yet."):y.createElement("ul",{className:"flex flex-col gap-0.5"},t.map(d=>y.createElement("li",{key:d.id},y.createElement("button",{type:"button",onClick:()=>{o(d.id),l(false);},className:c("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",d.active&&"bg-muted/60")},y.createElement("span",{className:"flex-1 min-w-0"},y.createElement("span",{className:"flex items-center gap-1.5"},y.createElement("span",{className:"text-xs font-medium text-foreground truncate"},d.label),d.active&&y.createElement(Check,{className:"h-3 w-3 text-primary shrink-0"})),d.summary&&y.createElement("span",{className:"block text-[10px] text-muted-foreground leading-snug truncate"},d.summary)),d.hasChildren&&y.createElement(ChevronRight,{className:"h-3 w-3 text-muted-foreground/70 shrink-0 mt-0.5"})))))))});Cd.displayName="BreadcrumbMenuTrigger";var Wn=Wt.Provider,Yo=Wt.Root,Zo=Wt.Trigger,Eo=y.forwardRef(({className:e,sideOffset:t=4,...o},r)=>y.createElement(Wt.Portal,null,y.createElement(Wt.Content,{ref:r,sideOffset:t,className:c("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})));Eo.displayName=Wt.Content.displayName;var Pd=y.createContext({size:"md",variant:"pill"}),Rh=Ut.Root,Ch=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"}}),Th=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"}}),Md=y.forwardRef(({className:e,size:t="md",variant:o="pill",children:r,...n},a)=>y.createElement(Pd.Provider,{value:{size:t??"md",variant:o??"pill"}},y.createElement(Ut.List,{ref:a,className:c(Ch({size:t,variant:o}),e),...n},r)));Md.displayName=Ut.List.displayName;var Nd=y.forwardRef(({className:e,size:t,variant:o,tooltip:r,...n},a)=>{let i=y.useContext(Pd),s=t??i.size,l=o??i.variant,d=n["aria-label"]??(typeof r=="string"?r:void 0),p=y.createElement(Ut.Trigger,{ref:a,className:c(Th({size:s,variant:l}),e),"aria-label":d,...n});return r?y.createElement(Yo,null,y.createElement(Zo,{asChild:true},p),y.createElement(Eo,null,r)):p});Nd.displayName=Ut.Trigger.displayName;var Ed=y.forwardRef(({className:e,...t},o)=>y.createElement(Ut.Content,{ref:o,className:c("mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",e),...t}));Ed.displayName=Ut.Content.displayName;var Ph={light:"",dark:".dark"},Ld=y.createContext(null);function Ad(){let e=y.useContext(Ld);if(!e)throw new Error("useChart must be used within a <ChartContainer />");return e}var Dd=y.forwardRef(({id:e,className:t,children:o,config:r,...n},a)=>{let i=y.useId(),s=`chart-${e||i.replace(/:/g,"")}`;return y.createElement(Ld.Provider,{value:{config:r}},y.createElement("div",{"data-chart":s,ref:a,className:c("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},y.createElement(Id,{id:s,config:r}),y.createElement(br.ResponsiveContainer,null,o)))});Dd.displayName="Chart";var Id=({id:e,config:t})=>{let o=Object.entries(t).filter(([,r])=>r.theme||r.color);return o.length?y.createElement("style",{dangerouslySetInnerHTML:{__html:Object.entries(Ph).map(([r,n])=>`
114
+ `)),Pe(240,_e)}let Mt=he.speed?Sa[he.speed].tokenStagger:Gt.speed.tokenStagger,Fe=Qe.current,Qt=Fe.length>0&&!Fe.endsWith(`
115
+ `)?Fe+`
116
+ `:Fe;await Pe(60,_e);for(let re=0;re<he.text.length;re++){if(_e.aborted)return;let Me=Qt+he.text.slice(0,re+1);K(Me),re<he.text.length-1&&await Pe(Mt,_e);}}});y.useEffect(()=>{Y&&de(pe);},[Y,pe]);let Ie=b??(r==="typewriter"||Y);return y.createElement("div",{ref:ke,"data-gds-part":"code","data-gds-reveal":r,"data-gds-trigger":i,"data-gds-size":x,className:d("gds-code relative w-full overflow-hidden",mg[x],!h&&["rounded-lg border bg-[var(--gds-code-bg)] text-[var(--gds-code-fg)]","border-border/60"],C),style:E,...F},u&&!h?y.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"},y.createElement("span",{className:"font-mono"},u),o?y.createElement("span",{className:"uppercase tracking-wider opacity-60"},o):null):null,y.createElement(Highlight,{code:le,language:o,theme:fg},({tokens:he,getLineProps:Gt,getTokenProps:_e})=>y.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",(w!==void 0||k!==void 0)&&"overflow-y-auto"),style:{background:"transparent",margin:0,...k!==void 0?{height:`calc(${k} * 1lh + 0.5rem)`}:w!==void 0&&w!=="auto"?{height:typeof w=="number"?`${w}px`:w}:null}},he.map((Mt,Fe)=>{let Qt=Fe+1,re=bg(Qt,n,X),Me=Gt({line:Mt}),Wt=Fe===he.length-1,jo=Y&&V.has(Qt),Bn=Ie&&Wt&&(!De||b===true),Ha=d("flex w-full pr-4",h?"pl-0":"pl-4",re==="added"&&"bg-[var(--gds-code-diff-added-bg)] text-[var(--gds-code-diff-added-fg)]",re==="removed"&&"bg-[var(--gds-code-diff-removed-bg)] text-[var(--gds-code-diff-removed-fg)]",re==="highlight"&&"bg-[var(--gds-code-line-highlight-bg)] shadow-[inset_2px_0_0_0_var(--gds-code-line-highlight-marker)]"),ua=y.createElement(y.Fragment,null,J?y.createElement("span",{"data-gds-part":"code-gutter",className:d("select-none pr-3 text-right font-mono text-xs leading-relaxed opacity-60",U?"w-10":"w-8"),"aria-hidden":true},U?y.createElement("span",{className:"inline-block w-3 text-center"},re==="added"?"+":re==="removed"?"-":" "):null,m?y.createElement("span",{className:"ml-1 tabular-nums"},Qt):null):null,y.createElement("span",{className:"flex-1",style:jo?{color:"var(--gds-code-comment)"}:void 0},f&&!jo?y.createElement("span",{"data-gds-part":"code-prompt","aria-hidden":true,className:"select-none opacity-60",style:{color:"var(--gds-code-comment)"}},f):null,r==="typewriter"&&$&&!Y?y.createElement(vg,{line:Mt,getTokenProps:_e,delay:Z+N+Fe*Se,stagger:Se}):Mt.map((Zu,Xu)=>y.createElement("span",{key:Xu,..._e({token:Zu})})),Bn&&!jo?y.createElement(Wr,{"data-gds-part":"code-cursor"}):null));return r==="none"||r==="typewriter"||Y||!$?y.createElement("div",{key:Fe,...Me,className:d(Me.className,Ha),style:{...Me.style,opacity:i!=="mount"&&!$&&r!=="none"?0:void 0}},ua):y.createElement(motion.div,{key:Fe,...Me,className:d(Me.className,Ha),initial:{opacity:0,y:r==="diff"?re==="removed"?-4:6:4},animate:{opacity:1,y:0},transition:{delay:(Z+N+Fe*Se)/1e3,duration:M.fadeMs/1e3,ease:[.22,1,.36,1]},style:Me.style},ua)}))))});Ac.displayName="Code";function vg({line:e,getTokenProps:t,delay:o,stagger:a}){let n=0;return y.createElement(y.Fragment,null,e.map((r,i)=>{let l=/^\s*$/.test(r.content),s=t({token:r});if(l)return y.createElement("span",{key:i,...s});let c=n++;return y.createElement(motion.span,{key:i,...s,initial:{opacity:0},animate:{opacity:1},transition:{delay:(o+c*a)/1e3,duration:.12}})}))}var yg={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]"}},xg=y.forwardRef(function({author:t,timestamp:o,avatar:a,badge:n,edited:r,pinned:i,actions:l,reactions:s,threadCount:c,onThreadClick:p,align:m="start",density:u="default",className:g,children:h,...f},b){let v=m==="end",S=r===true?"(edited)":r||void 0,x=yg[u];return y.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",x.row,v&&"flex-row-reverse",g),...f},a&&y.createElement("div",{"data-gds-part":"message-avatar",className:"flex-shrink-0"},a),y.createElement("div",{"data-gds-part":"message-content",className:d("flex-1 min-w-0",x.content,v&&"text-right")},i&&y.createElement("div",{"data-gds-part":"message-pinned",className:d("flex items-center gap-1 text-[10px] uppercase tracking-wider text-muted-foreground",v&&"flex-row-reverse")},y.createElement("svg",{"aria-hidden":"true",viewBox:"0 0 16 16",className:"h-3 w-3",fill:"currentColor"},y.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"),y.createElement("div",{"data-gds-part":"message-header",className:d("flex items-baseline gap-2 flex-wrap",v&&"flex-row-reverse")},y.createElement("span",{"data-gds-part":"message-author",className:x.author},t),n&&y.createElement("div",{"data-gds-part":"message-badge"},n),o&&y.createElement("span",{"data-gds-part":"message-timestamp",className:d(x.meta,"text-muted-foreground")},o),S&&y.createElement("span",{"data-gds-part":"message-edited",className:d(x.meta,"text-muted-foreground")},S),l&&y.createElement("div",{"data-gds-part":"message-actions",className:d(v?"mr-auto":"ml-auto")},l)),y.createElement("div",{"data-gds-part":"message-body",className:x.body},h),s&&y.createElement("div",{"data-gds-part":"message-reactions",className:d("flex flex-wrap gap-1 pt-1",v&&"justify-end")},s),typeof c=="number"&&c>0&&y.createElement("button",{type:"button","data-gds-part":"message-thread",onClick:p,className:d("inline-flex items-center gap-1 font-medium",x.thread,"text-primary hover:underline","focus:outline-none focus-visible:ring-2 focus-visible:ring-primary rounded",v&&"flex-row-reverse")},y.createElement("svg",{"aria-hidden":"true",viewBox:"0 0 16 16",className:"h-3 w-3",fill:"currentColor"},y.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 uf({onSubmit:e,enabled:t}){let[o]=useLexicalComposerContext();return y.useEffect(()=>{if(t)return o.registerCommand(KEY_ENTER_COMMAND,a=>a&&a.shiftKey?false:(a?.preventDefault(),e(),true),COMMAND_PRIORITY_HIGH)},[o,t,e]),null}function mf({onImageFiles:e,enabled:t}){let[o]=useLexicalComposerContext();return y.useEffect(()=>{if(!t)return;let a=o.getRootElement();if(!a)return;let n=r=>{let l=Array.from(r.clipboardData?.items??[]).filter(s=>s.kind==="file"&&s.type.startsWith("image/")).map(s=>s.getAsFile()).filter(s=>s!==null);l.length>0&&(r.preventDefault(),e(l));};return a.addEventListener("paste",n),()=>a.removeEventListener("paste",n)},[o,t,e]),null}function gf({enabled:e}){let[t]=useLexicalComposerContext();return y.useEffect(()=>{e&&t.focus();},[t,e]),null}var Hc={bold:"bold",italic:"italic",underline:"underline",strikethrough:"strikethrough",code:"code"};function Fc(e,t){let o=Hc[t];if(o){e.dispatchCommand(FORMAT_TEXT_COMMAND,o);return}if(t==="ul"){e.dispatchCommand(INSERT_UNORDERED_LIST_COMMAND,void 0);return}if(t==="ol"){e.dispatchCommand(INSERT_ORDERED_LIST_COMMAND,void 0);return}e.update(()=>{let a=$getSelection();if($isRangeSelection(a)){if(t==="h1"||t==="h2"||t==="h3"){let n=t;$setBlocksType(a,()=>$createHeadingNode(n));return}(t==="blockquote"||t==="pullquote")&&$setBlocksType(a,()=>{let n=$createQuoteNode();return t==="pullquote"&&(n.__pullquote=true),n});}});}function ff(e,t,o,a){e.update(()=>{let n=$getSelection();if(!$isRangeSelection(n))return;let r=$createBeautifulMentionNode(t,o,a);n.insertNodes([r]),n.insertText(" ");});}function hf(e,t){let o=false;return e.update(()=>{let a=$getRoot(),r=a.getTextContent().indexOf(t);if(r===-1)return;let i=0,l=null,s=0,c=null,p=0,m=u=>{if(!(l&&c)){if(u.getType()==="text"){let g=u,h=g.getTextContentSize(),f=i,b=i+h;!l&&r>=f&&r<b&&(l=g,s=r-f);let v=r+t.length;!c&&v>f&&v<=b&&(c=g,p=v-f),i=b;return}if("getChildren"in u)for(let g of u.getChildren())m(g);else i+=u.getTextContentSize();}};if(m(a),l&&c){let u=l,g=c;u.select(s,0).focus.set(g.getKey(),p,"text"),o=true;}}),o}function Xa(e){e.update(()=>{let t=$getRoot();t.clear();let o=$createParagraphNode();t.append(o),o.select();});}function zc(e){let t="",o="",a=[];return e.getEditorState().read(()=>{t=$getRoot().getTextContent(),o=JSON.stringify(e.getEditorState().toJSON());let n=r=>{if(r.getType()==="beautifulMention"){let i=r;a.push({trigger:i.getTrigger(),value:i.getValue(),data:i.getData()});}if("getChildren"in r)for(let i of r.getChildren())n(i);};n($getRoot());}),{text:t,json:o,mentions:a}}var bf=[{format:"bold",icon:Bold,label:"Bold"},{format:"italic",icon:Italic,label:"Italic"},{format:"underline",icon:Underline,label:"Underline"},{format:"strikethrough",icon:Strikethrough,label:"Strikethrough"},{format:"code",icon:Code,label:"Inline code"},{format:"h1",icon:Heading1,label:"Heading 1"},{format:"h2",icon:Heading2,label:"Heading 2"},{format:"h3",icon:Heading3,label:"Heading 3"},{format:"blockquote",icon:Quote,label:"Blockquote"},{format:"ul",icon:List,label:"Bulleted list"},{format:"ol",icon:ListOrdered,label:"Numbered list"}];function vf({formats:e}){let[t]=useLexicalComposerContext(),[o,a]=y.useState(()=>new Set);y.useEffect(()=>mergeRegister(t.registerUpdateListener(({editorState:r})=>{r.read(()=>{let i=$getSelection();if(!$isRangeSelection(i))return;let l=new Set;for(let s of ["bold","italic","underline","strikethrough","code"])i.hasFormat(s)&&l.add(s);a(l);});})),[t]);let n=bf.filter(r=>e.includes(r.format));return y.createElement("div",{"data-gds-part":"composer-toolbar",className:d("flex flex-wrap items-center gap-0.5","px-2 py-1")},n.map(({format:r,icon:i,label:l})=>{let s=Hc[r],c=s?o.has(s):false;return y.createElement("button",{key:r,type:"button","aria-label":l,title:l,"data-gds-part":"composer-toolbar-button","data-gds-active":c?"true":"false",onClick:()=>Fc(t,r),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)]")},y.createElement(i,{className:"h-3.5 w-3.5"}))}))}function yf({attachments:e,onRemove:t}){return y.createElement(AnimatePresence,{initial:false},e.length>0&&y.createElement(motion.div,{initial:{opacity:0,height:0},animate:{opacity:1,height:"auto"},exit:{opacity:0,height:0},transition:{duration:.18},className:"overflow-hidden"},y.createElement("div",{"data-gds-part":"composer-attachments",className:"flex flex-wrap gap-2 px-2 py-2"},e.map(o=>y.createElement("div",{key:o.id,className:"relative group"},o.file.type.startsWith("image/")?y.createElement("img",{src:o.previewUrl,alt:o.name,className:"h-14 w-14 rounded-md object-cover border border-[var(--gds-composer-border)]"}):y.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)),y.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")},y.createElement(X,{className:"w-3 h-3"})))))))}function xf({placeholder:e,triggers:t,attachmentsCfg:o,formatList:a,showToolbar:n,isLoading:r,onStop:i,maxLength:l,autoFocus:s,submitOnEnter:c=true,leftActions:p,rightActions:m,hideSend:u,steps:g,trigger:h="mount",play:f,speed:b="normal",loop:v=false,loopDelay:S,onLoopReset:x,bare:w,className:k,onSubmit:C,onChange:E,readOnly:F,handleEditorReady:O,submitRef:M,restartRef:N,attachments:H,setAttachments:Y,ingestImages:se}){let[D]=useLexicalComposerContext(),V=y.useRef(null),R=y.useRef(null),[_,le]=y.useState(false);y.useEffect(()=>{O(D);},[D,O]),y.useEffect(()=>{D.setEditable(!F);},[D,F]);let X=y.useRef(E);X.current=E,y.useEffect(()=>D.registerUpdateListener(({editorState:T})=>{T.read(()=>{let Z=$getRoot().getTextContent();le(Z.trim().length>0),X.current?.(Z);});}),[D]);let U=y.useCallback(()=>{if(r)return;let T=zc(D),Z=T.text.trim().length>0,$=H.length>0;!Z&&!$||(C?.(T,$?H:void 0),Xa(D),H.forEach(Se=>URL.revokeObjectURL(Se.previewUrl)),Y([]));},[D,r,H,C,Y]);M.current=U;let{restart:J}=Ho({steps:g,speed:b,trigger:h,play:f,loop:v,loopDelay:S,containerRef:V,onLoopReset:()=>{Xa(D),x?.();},interpret:async(T,Z)=>{let $=Z.signal;if(T.type==="wait")return Pe(T.ms,$);if(T.type==="clear")return Xa(D),Pe(120,$);if(T.type==="newline")return D.update(()=>{let j=$getSelection();$isRangeSelection(j)&&j.insertParagraph();}),Pe(60,$);if(T.type==="submit")return U(),Pe(120,$);if(T.type==="format")return Fc(D,T.format),D.update(()=>{let j=$getSelection();if(!$isRangeSelection(j)||j.isCollapsed())return;let je=j.focus;j.anchor.set(je.key,je.offset,je.type);}),Pe(80,$);if(T.type==="select")return hf(D,T.text),Pe(120,$);if(T.type==="mention")return T.query&&(D.update(()=>{let j=$getSelection();$isRangeSelection(j)&&j.insertText(T.trigger);}),await Or(T.query,j=>{D.update(()=>{let je=$getRoot(),Te=je.getTextContent(),Qe=Te.slice(0,Te.length-T.trigger.length-(j.length-1));je.clear();let G=$createParagraphNode();Qe&&G.append($createTextNode(Qe)),G.append($createTextNode(T.trigger+j)),je.append(G);});},Z.speed.tokenStagger,$),await Pe(180,$),D.update(()=>{let j=$getRoot(),je=j.getTextContent(),Te=T.trigger.length+T.query.length,Qe=je.slice(0,je.length-Te);j.clear();let G=$createParagraphNode();Qe&&G.append($createTextNode(Qe)),j.append(G),G.select();})),ff(D,T.trigger,T.value),Pe(120,$);let Se=T.speed?{slow:70,normal:22,fast:8}[T.speed]:Z.speed.tokenStagger;for(let j=0;j<T.text.length;j++){if($.aborted)return;let je=T.text[j];D.update(()=>{let Te=$getSelection();if(!$isRangeSelection(Te)){$getRoot().selectEnd();let Qe=$getSelection();$isRangeSelection(Qe)&&Qe.insertText(je);return}Te.insertText(je);}),j<T.text.length-1&&await Pe(Se,$);}}});y.useEffect(()=>{N.current=T=>{Xa(D),J(T);};},[D,J,N]);let ke=!F&&!m&&!u,De=!F&&!p&&o!==null,de=!F&&(De||p||ke||m);return y.createElement("div",{ref:V,"data-gds-part":"composer","data-gds-loading":r?"true":"false",className:d("w-full",!w&&["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&&y.createElement(vf,{formats:a}),o&&y.createElement(yf,{attachments:H,onRemove:T=>{Y(Z=>{let $=Z.find(Se=>Se.id===T);return $&&URL.revokeObjectURL($.previewUrl),Z.filter(Se=>Se.id!==T)});}}),y.createElement("div",{className:"relative"},y.createElement(RichTextPlugin,{contentEditable:y.createElement(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",r&&"opacity-60 pointer-events-none"),"aria-placeholder":e??"",placeholder:y.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}),y.createElement(HistoryPlugin,null),y.createElement(ListPlugin,null),y.createElement(LinkPlugin,null),y.createElement(OnChangePlugin,{onChange:()=>{}}),y.createElement(gf,{enabled:!!s}),y.createElement(uf,{onSubmit:U,enabled:c}),o&&y.createElement(mf,{onImageFiles:se,enabled:true}),t.length>0&&y.createElement(BeautifulMentionsPlugin,{items:t.reduce((T,Z)=>(typeof Z.items=="function"||(T[Z.char]=Z.items.map($=>({value:$.value}))),T),{})})),de&&y.createElement("div",{"data-gds-part":"composer-actions",className:"flex items-center justify-between gap-2 px-2 pb-2 pt-1"},y.createElement("div",{className:"flex items-center gap-1"},p??(De&&y.createElement("button",{type:"button",onClick:()=>R.current?.click(),disabled:r,"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")},y.createElement(Paperclip,{className:"w-4 h-4"})))),m??(ke&&y.createElement("button",{type:"button",onClick:r?i:U,disabled:r?!i:!_&&H.length===0,"aria-label":r?"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",r?"bg-red-500 hover:bg-red-600 text-white disabled:opacity-50":_||H.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")},r?y.createElement(Square,{className:"w-3.5 h-3.5"}):y.createElement(Send,{className:"w-3.5 h-3.5"}))),o&&y.createElement("input",{ref:R,type:"file",accept:o.accept,multiple:o.multiple,onChange:T=>{T.target.files&&se(Array.from(T.target.files)),T.target.value="";},className:"sr-only",tabIndex:-1,"aria-hidden":"true"})))}var Bc=y.forwardRef(function(t,o){let{initialText:a,initialJson:n,formats:r,toolbar:i,triggers:l,attachments:s,...c}=t,p=y.useMemo(()=>r===false?[]:r??["bold","italic","underline","strikethrough","code","h1","h2","blockquote","ul","ol"],[r]),m=i===true||i==="top",u=y.useMemo(()=>{if(!s)return null;let M=s===true?{}:s;return M.enabled===false?null:{enabled:true,accept:M.accept??"image/*",maxItems:M.maxItems??10,multiple:M.multiple??true}},[s]),[g,h]=y.useState([]),f=y.useRef(g);f.current=g,y.useEffect(()=>()=>{f.current.forEach(M=>URL.revokeObjectURL(M.previewUrl));},[]);let b=y.useCallback(M=>{if(!u)return;let N=M.filter(H=>u.accept?u.accept==="image/*"?H.type.startsWith("image/"):u.accept.split(",").some(Y=>{let se=Y.trim();return se.endsWith("/*")?H.type.startsWith(se.slice(0,-1)):H.type===se||H.name.toLowerCase().endsWith(se)}):true);N.length!==0&&h(H=>{let Y=u.maxItems-H.length;if(Y<=0)return H;let se=N.slice(0,Y).map(D=>({id:`${D.name}-${D.size}-${Date.now()}-${Math.random().toString(36).slice(2,8)}`,file:D,previewUrl:URL.createObjectURL(D),name:D.name}));return [...H,...se]});},[u]),v=y.useRef(null),S=y.useRef(()=>{}),x=y.useRef(()=>{}),w=y.useCallback(M=>{v.current=M;},[]);y.useImperativeHandle(o,()=>({play:M=>{console.warn('[Composer] handle.play(steps) is not wired in v1 \u2014 pass `steps` + `trigger="manual"` and toggle `play` instead.');},stop:()=>{},restart:M=>x.current(M),focus:()=>v.current?.focus(),clear:()=>{let M=v.current;M&&Xa(M);},insert:M=>{v.current?.update(()=>{let N=$getSelection();$isRangeSelection(N)&&N.insertText(M);});},getContent:()=>v.current?zc(v.current):{text:"",json:"",mentions:[]},getEditor:()=>v.current}),[]);let k=y.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"}}),[]),C=y.useMemo(()=>({namespace:"gds-composer",theme:k,onError:M=>{console.error("[Composer]",M);},nodes:[HeadingNode,QuoteNode,ListNode,ListItemNode,LinkNode,AutoLinkNode,CodeNode,CodeHighlightNode,BeautifulMentionNode],editorState:n||(a?M=>{let N=$getRoot(),H=$createParagraphNode();H.append($createTextNode(a)),N.append(H);}:void 0)}),[k,n,a]),E=p.length>0,{readOnly:F=false,...O}=c;return y.createElement(LexicalComposer,{initialConfig:{...C,editable:!F}},y.createElement(xf,{...O,readOnly:F,triggers:l??[],attachmentsCfg:F?null:u,formatList:p,showToolbar:m&&E&&!F,handleEditorReady:w,submitRef:S,restartRef:x,attachments:g,setAttachments:h,ingestImages:b}))}),wf=y.forwardRef(function(t,o){return y.createElement(Bc,{ref:o,placeholder:"Write a reply\u2026",formats:false,submitOnEnter:false,...t})});var zt=Yt.Root,Bt=Yt.Trigger,kf=Yt.Anchor,Ct=y.forwardRef(({className:e,align:t="center",sideOffset:o=4,surface:a="solid",...n},r)=>y.createElement(Yt.Portal,null,y.createElement(Yt.Content,{ref:r,align:t,sideOffset:o,"data-surface":a,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]",qt(a,"bg-popover"),St[a],e),...n})));Ct.displayName=Yt.Content.displayName;var Sf="PPP",Rf="LLL dd, y";function Cf({value:e,onChange:t,placeholder:o="Pick a date",disabled:a,className:n,contentClassName:r,align:i="start",side:l,format:s=Sf,captionLayout:c,icon:p,"aria-label":m}){return y.createElement(zt,null,y.createElement(Bt,{asChild:true},y.createElement(et,{type:"button",variant:"outline",disabled:a,"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)},p??y.createElement(CalendarIcon,{className:"mr-2 h-4 w-4","aria-hidden":true}),e?format(e,s):y.createElement("span",null,o))),y.createElement(Ct,{className:d("w-auto p-0",r),align:i,side:l},y.createElement(Lr,{mode:"single",selected:e,onSelect:t,captionLayout:c,initialFocus:true})))}function Tf({value:e,onChange:t,placeholder:o="Pick a date range",disabled:a,className:n,contentClassName:r,align:i="start",side:l,format:s=Rf,captionLayout:c,icon:p,numberOfMonths:m=2,"aria-label":u}){let g=!!e?.from;return y.createElement(zt,null,y.createElement(Bt,{asChild:true},y.createElement(et,{type:"button",variant:"outline",disabled:a,"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)},p??y.createElement(CalendarIcon,{className:"mr-2 h-4 w-4","aria-hidden":true}),e?.from?e.to?y.createElement(y.Fragment,null,format(e.from,s)," \u2013"," ",format(e.to,s)):format(e.from,s):y.createElement("span",null,o))),y.createElement(Ct,{className:d("w-auto p-0",r),align:i,side:l},y.createElement(Lr,{mode:"range",selected:e,onSelect:t,defaultMonth:e?.from,numberOfMonths:m,captionLayout:c,initialFocus:true})))}var Mf=Be.Root,Nf=Be.Trigger,_c=Be.Portal,Ef=Be.Close,Xn=y.forwardRef(({className:e,...t},o)=>y.createElement(Be.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}));Xn.displayName=Be.Overlay.displayName;var Oc=y.forwardRef(({className:e,children:t,surface:o="solid",...a},n)=>y.createElement(_c,null,y.createElement(Xn,null),y.createElement(Be.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",qt(o,"bg-background"),St[o],e),...a},t,y.createElement(Be.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"},y.createElement(X,{className:"h-4 w-4"}),y.createElement("span",{className:"sr-only"},"Close")))));Oc.displayName=Be.Content.displayName;var Gc=({className:e,...t})=>y.createElement("div",{className:d("flex flex-col space-y-1.5 text-center sm:text-left",e),...t});Gc.displayName="DialogHeader";var Wc=({className:e,...t})=>y.createElement("div",{className:d("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});Wc.displayName="DialogFooter";var Uc=y.forwardRef(({className:e,...t},o)=>y.createElement(Be.Title,{ref:o,className:d("text-lg font-semibold leading-none tracking-tight",e),...t}));Uc.displayName=Be.Title.displayName;var $c=y.forwardRef(({className:e,...t},o)=>y.createElement(Be.Description,{ref:o,className:d("text-sm text-muted-foreground",e),...t}));$c.displayName=Be.Description.displayName;var Jn=ce.Root,Qn=ce.Trigger,oa=y.createContext("default"),jc=e=>e==="default"?"px-2 py-1.5 text-sm":"px-2 py-1 text-xs",If=ce.Group,Hf=ce.Portal,Ff=ce.Sub,zf=ce.RadioGroup,Kc=y.forwardRef(({className:e,inset:t,children:o,...a},n)=>{let r=y.useContext(oa);return y.createElement(ce.SubTrigger,{ref:n,className:d("flex cursor-default select-none items-center gap-2 rounded-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground [&_svg]:pointer-events-none [&_svg]:shrink-0",jc(r),r==="default"?"[&_svg]:size-4":"[&_svg]:size-3.5",t&&(r==="default"?"pl-8":"pl-7"),e),...a},o,y.createElement(ChevronRight,{className:"ml-auto"}))});Kc.displayName=ce.SubTrigger.displayName;var qc=y.forwardRef(({className:e,surface:t="solid",size:o="default",children:a,...n},r)=>y.createElement(ce.SubContent,{ref:r,"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",qt(t,"bg-popover"),St[t],e),...n},y.createElement(oa.Provider,{value:o},a)));qc.displayName=ce.SubContent.displayName;var Kr=y.forwardRef(({className:e,sideOffset:t=4,surface:o="solid",size:a="default",children:n,...r},i)=>y.createElement(ce.Portal,null,y.createElement(ce.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",a==="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]",qt(o,"bg-popover"),St[o],e),...r},y.createElement(oa.Provider,{value:a},n))));Kr.displayName=ce.Content.displayName;var Yc=y.forwardRef(({className:e,inset:t,...o},a)=>{let n=y.useContext(oa);return y.createElement(ce.Item,{ref:a,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",jc(n),n==="default"?"[&>svg]:size-4":"[&>svg]:size-3.5",t&&(n==="default"?"pl-8":"pl-7"),e),...o})});Yc.displayName=ce.Item.displayName;var qr=y.forwardRef(({className:e,children:t,checked:o,...a},n)=>{let i=y.useContext(oa)!=="default";return y.createElement(ce.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,...a},y.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")},y.createElement(ce.ItemIndicator,null,y.createElement(Check,{className:i?"h-3 w-3":"h-4 w-4"}))),t)});qr.displayName=ce.CheckboxItem.displayName;var Zc=y.forwardRef(({className:e,children:t,...o},a)=>{let r=y.useContext(oa)!=="default";return y.createElement(ce.RadioItem,{ref:a,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",r?"py-1 pl-7 text-xs":"py-1.5 pl-8 text-sm",e),...o},y.createElement("span",{className:d("absolute flex items-center justify-center",r?"left-1.5 h-3 w-3":"left-2 h-3.5 w-3.5")},y.createElement(ce.ItemIndicator,null,y.createElement(Circle,{className:"h-2 w-2 fill-current"}))),t)});Zc.displayName=ce.RadioItem.displayName;var Yr=y.forwardRef(({className:e,inset:t,...o},a)=>{let n=y.useContext(oa);return y.createElement(ce.Label,{ref:a,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})});Yr.displayName=ce.Label.displayName;var Zr=y.forwardRef(({className:e,...t},o)=>y.createElement(ce.Separator,{ref:o,className:d("-mx-1 my-1 h-px bg-muted",e),...t}));Zr.displayName=ce.Separator.displayName;var Xc=({className:e,...t})=>y.createElement("span",{className:d("ml-auto text-xs tracking-widest opacity-60",e),...t});Xc.displayName="DropdownMenuShortcut";var Jc=cva("flex w-full rounded-md bg-transparent 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"},variant:{default:"border border-input",ghost:"border border-transparent bg-transparent shadow-none"}},defaultVariants:{size:"default",variant:"default"}}),Vf={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"}},So=y.forwardRef(({className:e,type:t,size:o="default",variant:a="default",startSlot:n,endSlot:r,...i},l)=>{if(!n&&!r)return y.createElement("input",{type:t,className:d(Jc({size:o,variant:a}),e),ref:l,...i});let s=Vf[o];return y.createElement("div",{className:"relative flex w-full items-center"},n?y.createElement("span",{className:d("pointer-events-none absolute inset-y-0 left-0 flex items-center text-muted-foreground [&_svg]:size-3.5",s.startInset)},n):null,y.createElement("input",{type:t,ref:l,className:d(Jc({size:o,variant:a}),n&&s.startPad,r&&s.endPad,e),...i}),r?y.createElement("span",{className:d("pointer-events-none absolute inset-y-0 right-0 flex items-center text-muted-foreground [&_svg]:size-3.5",s.endInset)},r):null)});So.displayName="Input";var Of=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"}}),er=y.forwardRef(({className:e,size:t,...o},a)=>y.createElement(ei.Root,{ref:a,className:d(Of({size:t}),e),...o}));er.displayName=ei.Root.displayName;var Qc=y.forwardRef(({className:e,value:t,...o},a)=>y.createElement(or.Root,{ref:a,className:d("relative h-4 w-full overflow-hidden rounded-full bg-secondary",e),...o},y.createElement(or.Indicator,{className:"h-full w-full flex-1 bg-primary transition-all",style:{transform:`translateX(-${100-(t||0)}%)`}})));Qc.displayName=or.Root.displayName;var ar=y.forwardRef(({className:e,...t},o)=>y.createElement(Command,{ref:o,className:d("flex h-full w-full flex-col overflow-hidden rounded-md bg-popover text-popover-foreground",e),...t}));ar.displayName=Command.displayName;var rr=y.forwardRef(({className:e,...t},o)=>y.createElement("div",{className:"flex items-center border-b px-3","cmdk-input-wrapper":""},y.createElement(Search,{className:"mr-2 h-4 w-4 shrink-0 opacity-50"}),y.createElement(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})));rr.displayName=Command.Input.displayName;var nr=y.forwardRef(({className:e,...t},o)=>y.createElement(Command.List,{ref:o,className:d("max-h-[300px] overflow-y-auto overflow-x-hidden",e),...t}));nr.displayName=Command.List.displayName;var ir=y.forwardRef((e,t)=>y.createElement(Command.Empty,{ref:t,className:"py-6 text-center text-sm",...e}));ir.displayName=Command.Empty.displayName;var aa=y.forwardRef(({className:e,...t},o)=>y.createElement(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}));aa.displayName=Command.Group.displayName;var sr=y.forwardRef(({className:e,...t},o)=>y.createElement(Command.Separator,{ref:o,className:d("-mx-1 h-px bg-border",e),...t}));sr.displayName=Command.Separator.displayName;var Ro=y.forwardRef(({className:e,...t},o)=>y.createElement(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}));Ro.displayName=Command.Item.displayName;var lr=y.forwardRef(({className:e,orientation:t="horizontal",decorative:o=true,...a},n)=>y.createElement(ti.Root,{ref:n,decorative:o,orientation:t,className:d("shrink-0 bg-border",t==="horizontal"?"h-[1px] w-full":"h-full w-[1px]",e),...a}));lr.displayName=ti.Root.displayName;var qf=3,ed=y.forwardRef(function({options:t,value:o,defaultValue:a,onValueChange:n,placeholder:r="Select\u2026",searchPlaceholder:i="Search\u2026",emptyMessage:l="Nothing matches.",maxCount:s=qf,searchable:c=true,badgeDismissible:p=true,disabled:m=false,modalPopover:u=false,className:g,id:h,"aria-label":f,...b},v){let S=o!==void 0,[x,w]=y.useState(a??[]),k=S?o:x,[C,E]=y.useState(false),F=y.useMemo(()=>{let R=new Map;for(let _ of t)R.set(_.value,_);return R},[t]),O=y.useCallback(R=>{S||w(R),n?.(R);},[S,n]),M=R=>{k.includes(R)?O(k.filter(_=>_!==R)):O([...k,R]);},N=(R,_)=>{R.preventDefault(),R.stopPropagation(),O(k.filter(le=>le!==_));},H=R=>{R?.preventDefault(),R?.stopPropagation(),O([]);},Y=()=>{let R=t.filter(_=>!_.disabled).map(_=>_.value);O(R);},se=t.length>0&&t.filter(R=>!R.disabled).every(R=>k.includes(R.value)),D=k.slice(0,s),V=Math.max(0,k.length-s);return y.createElement(zt,{open:C,onOpenChange:E,modal:u},y.createElement(Bt,{asChild:true},y.createElement("button",{ref:v,type:"button",id:h,role:"combobox","aria-expanded":C,"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)},k.length===0?y.createElement("span",{className:"text-muted-foreground px-1"},r):y.createElement("div",{className:"flex flex-1 flex-wrap items-center gap-1 py-1","data-gds-part":"multi-select-badges"},D.map(R=>{let _=F.get(R);if(!_)return null;let le=_.icon;return y.createElement(Do,{key:R,variant:"secondary",className:"gap-1 pr-1","data-gds-part":"multi-select-badge"},le?y.createElement(le,{className:"h-3 w-3"}):null,y.createElement("span",{className:"truncate max-w-[12rem]"},_.label),p&&!m&&y.createElement("span",{role:"button","aria-label":`Remove ${_.label}`,tabIndex:0,onClick:X=>N(X,R),onKeyDown:X=>{(X.key==="Enter"||X.key===" ")&&N(X,R);},className:"ml-0.5 inline-flex h-4 w-4 cursor-pointer items-center justify-center rounded-sm hover:bg-muted-foreground/20"},y.createElement(X,{className:"h-3 w-3","aria-hidden":true})))}),V>0&&y.createElement(Do,{variant:"outline",className:"text-muted-foreground","data-gds-part":"multi-select-overflow",title:k.slice(s).map(R=>F.get(R)?.label??R).join(", ")},"+",V," more")),y.createElement("div",{className:"flex shrink-0 items-center gap-1"},k.length>0&&!m&&y.createElement("span",{role:"button","aria-label":"Clear all",tabIndex:0,onClick:R=>H(R),onKeyDown:R=>{(R.key==="Enter"||R.key===" ")&&H(R);},className:"inline-flex h-5 w-5 cursor-pointer items-center justify-center rounded-sm text-muted-foreground hover:text-foreground hover:bg-muted"},y.createElement(XCircle,{className:"h-3.5 w-3.5","aria-hidden":true})),y.createElement(ChevronDown,{className:"h-4 w-4 shrink-0 text-muted-foreground","aria-hidden":true})))),y.createElement(Ct,{align:"start",className:"w-[var(--radix-popover-trigger-width)] p-0","data-gds-part":"multi-select-content"},y.createElement(ar,null,c&&y.createElement(rr,{placeholder:i}),y.createElement(nr,null,y.createElement(ir,null,l),y.createElement(aa,null,t.map(R=>{let _=R.icon,le=k.includes(R.value);return y.createElement(Ro,{key:R.value,value:R.label,onSelect:()=>M(R.value),disabled:R.disabled,"data-gds-part":"multi-select-item","data-selected":le||void 0},y.createElement("div",{className:d("mr-2 flex h-4 w-4 shrink-0 items-center justify-center rounded-sm border border-primary",le?"bg-primary text-primary-foreground":"opacity-50 [&_svg]:invisible"),"aria-hidden":true},y.createElement(Check,{className:"h-3 w-3"})),_?y.createElement(_,{className:"mr-2 h-4 w-4 text-muted-foreground"}):null,y.createElement("span",{className:"truncate"},R.label))})),y.createElement(sr,null),y.createElement(aa,null,y.createElement("div",{className:"flex items-center justify-between gap-1 p-1"},y.createElement(Ro,{onSelect:Y,className:"flex-1 justify-center text-xs",disabled:se},"Select all"),y.createElement(lr,{orientation:"vertical",className:"h-5"}),y.createElement(Ro,{onSelect:()=>H(),className:"flex-1 justify-center text-xs",disabled:k.length===0},"Clear"),y.createElement(lr,{orientation:"vertical",className:"h-5"}),y.createElement(Ro,{onSelect:()=>E(false),className:"flex-1 justify-center text-xs"},"Close")))))))});ed.displayName="MultiSelect";var td=y.forwardRef(function({options:t,value:o,defaultValue:a=null,onValueChange:n,placeholder:r="Select\u2026",searchPlaceholder:i="Search\u2026",emptyMessage:l="Nothing matches.",searchable:s=true,clearable:c=false,triggerVariant:p="default",renderValue:m,hideChevron:u=false,disabled:g=false,modalPopover:h=false,align:f="start",className:b,id:v,"aria-label":S,...x},w){let k=o!==void 0,[C,E]=y.useState(a),F=k?o:C,[O,M]=y.useState(false),N=y.useMemo(()=>t.find(V=>V.value===F)??null,[t,F]),H=y.useCallback(V=>{k||E(V),n?.(V);},[k,n]),Y=V=>{H(c&&V===F?null:V),M(false);},se=p==="inline",D=N?.icon;return y.createElement(zt,{open:O,onOpenChange:M,modal:h},y.createElement(Bt,{asChild:true},y.createElement("button",{ref:w,type:"button",id:v,role:"combobox","aria-expanded":O,"aria-haspopup":"listbox","aria-label":S,disabled:g,"data-gds-part":"combobox","data-variant":p,className:d("ring-offset-background focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50",se?"inline-flex max-w-full items-center gap-1 rounded-md px-1 py-0.5 text-sm hover:bg-muted data-[state=open]:bg-muted":"flex min-h-9 w-full items-center justify-between gap-2 rounded-md border border-input bg-transparent px-3 text-sm shadow-sm data-[state=open]:ring-1 data-[state=open]:ring-ring",b),...x},y.createElement("span",{className:d("flex min-w-0 items-center gap-1.5",!N&&"text-muted-foreground"),"data-gds-part":"combobox-value"},N?m?m(N):y.createElement(y.Fragment,null,D?y.createElement(D,{className:"h-4 w-4 shrink-0 text-muted-foreground"}):null,y.createElement("span",{className:"truncate"},N.label)):r),!u&&y.createElement(ChevronsUpDown,{className:d("h-4 w-4 shrink-0 text-muted-foreground",se&&"opacity-60"),"aria-hidden":true}))),y.createElement(Ct,{align:f,className:"w-[var(--radix-popover-trigger-width)] min-w-[12rem] p-0","data-gds-part":"combobox-content"},y.createElement(ar,{filter:(V,R,_)=>`${V} ${(_??[]).join(" ")}`.toLowerCase().includes(R.toLowerCase())?1:0},s&&y.createElement(rr,{placeholder:i}),y.createElement(nr,null,y.createElement(ir,null,l),y.createElement(aa,null,t.map(V=>{let R=V.icon,_=V.value===F;return y.createElement(Ro,{key:V.value,value:V.label,keywords:V.keywords,onSelect:()=>Y(V.value),disabled:V.disabled,"data-gds-part":"combobox-item","data-selected":_||void 0},R?y.createElement(R,{className:"mr-2 h-4 w-4 text-muted-foreground"}):null,y.createElement("span",{className:"truncate"},V.label),y.createElement(Check,{className:d("ml-auto h-4 w-4",_?"opacity-100":"opacity-0"),"aria-hidden":true}))})),c&&F!==null&&y.createElement(y.Fragment,null,y.createElement(sr,null),y.createElement(aa,null,y.createElement(Ro,{onSelect:()=>{H(null),M(false);},"data-gds-part":"combobox-clear"},y.createElement(X,{className:"mr-2 h-4 w-4 text-muted-foreground"}),y.createElement("span",null,"Clear"))))))))});td.displayName="Combobox";var od=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}}),zo=y.forwardRef(({className:e,gap:t,align:o,justify:a,wrap:n,asChild:r=false,...i},l)=>y.createElement(r?Slot:"div",{ref:l,"data-gds-part":"row",className:d(od({gap:t,align:o,justify:a,wrap:n,className:e})),...i}));zo.displayName="Row";var ad=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"}}),Ca=y.forwardRef(({className:e,gap:t,align:o,justify:a,asChild:n=false,...r},i)=>y.createElement(n?Slot:"div",{ref:i,"data-gds-part":"stack",className:d(ad({gap:t,align:o,justify:a,className:e})),...r}));Ca.displayName="Stack";var tn=y.forwardRef(({className:e,...t},o)=>y.createElement("div",{className:"relative w-full overflow-auto"},y.createElement("table",{ref:o,className:d("w-full caption-bottom text-sm",e),...t})));tn.displayName="Table";var on=y.forwardRef(({className:e,...t},o)=>y.createElement("thead",{ref:o,className:d("[&_tr]:border-b",e),...t}));on.displayName="TableHeader";var an=y.forwardRef(({className:e,...t},o)=>y.createElement("tbody",{ref:o,className:d("[&_tr:last-child]:border-0",e),...t}));an.displayName="TableBody";var rd=y.forwardRef(({className:e,...t},o)=>y.createElement("tfoot",{ref:o,className:d("border-t bg-muted/50 font-medium [&>tr]:last:border-b-0",e),...t}));rd.displayName="TableFooter";var Ta=y.forwardRef(({className:e,...t},o)=>y.createElement("tr",{ref:o,className:d("border-b transition-colors hover:bg-muted/50 data-[state=selected]:bg-muted",e),...t}));Ta.displayName="TableRow";var rn=y.forwardRef(({className:e,...t},o)=>y.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}));rn.displayName="TableHead";var cr=y.forwardRef(({className:e,...t},o)=>y.createElement("td",{ref:o,className:d("p-2 align-middle [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",e),...t}));cr.displayName="TableCell";var nd=y.forwardRef(({className:e,...t},o)=>y.createElement("caption",{ref:o,className:d("mt-4 text-sm text-muted-foreground",e),...t}));nd.displayName="TableCaption";var sn=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",segmented:"rounded-md bg-transparent text-muted-foreground hover:bg-transparent hover:text-foreground data-[state=on]:bg-background data-[state=on]:text-foreground data-[state=on]:shadow-sm"},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"}}),id=y.forwardRef(({className:e,variant:t,size:o,...a},n)=>y.createElement(oi.Root,{ref:n,className:d(sn({variant:t,size:o,className:e})),...a}));id.displayName=oi.Root.displayName;var ai=Zt.Provider,ra=Zt.Root,na=Zt.Trigger,Bo=y.forwardRef(({className:e,sideOffset:t=4,...o},a)=>y.createElement(Zt.Portal,null,y.createElement(Zt.Content,{ref:a,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=Zt.Content.displayName;var sd=y.createContext({size:"default",variant:"default"}),Co=y.forwardRef(({className:e,variant:t,size:o,children:a,...n},r)=>y.createElement(Pa.Root,{ref:r,className:d("flex items-center justify-center gap-1",t==="segmented"&&"inline-flex gap-0 rounded-lg bg-muted/70 p-0.5",e),...n},y.createElement(sd.Provider,{value:{variant:t,size:o}},a)));Co.displayName=Pa.Root.displayName;var To=y.forwardRef(({className:e,children:t,variant:o,size:a,tooltip:n,tooltipSide:r="top",tooltipDelay:i,"aria-label":l,...s},c)=>{let p=y.useContext(sd),m=l??(typeof n=="string"?n:void 0),u=y.createElement(Pa.Item,{ref:c,className:d(sn({variant:p.variant||o,size:p.size||a}),e),"aria-label":m,...s},t);return n==null?u:y.createElement(ra,{delayDuration:i},y.createElement(na,{asChild:true},y.createElement("span",{className:"inline-flex"},u)),y.createElement(Bo,{side:r},n))});To.displayName=Pa.Item.displayName;function ln(e,t,o){let[a,n]=y.useState(t),r=e!==void 0?e:a,i=y.useCallback(l=>{let s=typeof l=="function"?l(r):l;e===void 0&&n(s),o?.(s);},[e,o,r]);return [r,i]}function mh(e={}){let{defaultView:t="table",views:o=["table","cards","grid"],defaultActiveId:a=null,defaultSorting:n=[],defaultColumnVisibility:r={}}=e,[i,l]=y.useState(t),[s,c]=y.useState(a),[p,m]=y.useState(n),[u,g]=y.useState(r);return {view:i,setView:l,views:o,activeId:s,setActiveId:c,sorting:p,setSorting:m,columnVisibility:u,setColumnVisibility:g}}var gh=e=>{let t=new Date(e);return Number.isNaN(t.getTime())?String(e):t.toLocaleDateString("en-US",{month:"short",day:"numeric",year:"numeric"})};function cn(e,t){if(e.cell)return e.cell(t);let o=t[e.key];switch(e.type){case "badge":{let a=e.options?.find(n=>n.value===o);return y.createElement(Do,{variant:a?.variant??"secondary"},a?.label??o)}case "tags":return Array.isArray(o)?y.createElement(zo,{gap:"xs",wrap:true},o.map(a=>y.createElement(Do,{key:String(a),variant:"secondary"},a))):null;case "number":return y.createElement("span",{className:"tabular-nums"},o);case "currency":return y.createElement("span",{className:"tabular-nums"},"$"+Number(o).toLocaleString("en-US"));case "percent":return y.createElement("span",{className:"tabular-nums"},Math.round(Number(o)*100)+"%");case "date":return y.createElement("span",{className:"tabular-nums text-muted-foreground"},gh(o));case "boolean":return y.createElement(Do,{variant:o?"success-soft":"outline"},o?"Yes":"No");case "url":return y.createElement("a",{href:String(o),className:"text-primary underline-offset-2 hover:underline"},String(o).replace(/^https?:\/\//,""));default:return y.createElement("span",null,o)}}var fh={table:Rows3,cards:LayoutGrid,grid:Grid3x3},hh={table:"Table view",cards:"Card view",grid:"Grid view"};function ri({value:e,onChange:t,views:o=["table","cards","grid"],className:a}){return o.length<2?null:y.createElement(Co,{type:"single",value:e,onValueChange:n=>n&&t(n),className:a,"data-gds-part":"data-view-toggle"},o.map(n=>{let r=fh[n];return y.createElement(To,{key:n,value:n,"aria-label":hh[n]},y.createElement(r,{className:"h-4 w-4"}))}))}function ni({columns:e,visibility:t,onVisibilityChange:o,label:a="Display",className:n}){let r=e.filter(s=>s.hideable!==false),i=s=>t[s]!==false,l=s=>o({...t,[s]:!i(s)});return y.createElement(Jn,null,y.createElement(Qn,{asChild:true},y.createElement(et,{variant:"outline",size:"sm",className:n,"data-gds-part":"data-view-columns"},y.createElement(SlidersHorizontal,{className:"mr-1.5 h-3.5 w-3.5"}),a)),y.createElement(Kr,{align:"end",className:"w-48"},y.createElement(Yr,null,"Show fields"),y.createElement(Zr,null),r.map(s=>y.createElement(qr,{key:s.key,checked:i(s.key),onCheckedChange:()=>l(s.key),onSelect:c=>c.preventDefault()},typeof s.header=="string"?s.header:s.key))))}function dn(e){let{data:t,columns:o,getRowId:a=X=>String(X.id),view:n,defaultView:r="table",onViewChange:i,views:l=["table","cards","grid"],activeId:s,defaultActiveId:c=null,onActiveChange:p,sorting:m,defaultSorting:u=[],onSortingChange:g,columnVisibility:h,defaultColumnVisibility:f,onColumnVisibilityChange:b,stickyHeader:v=false,toolbar:S=false,renderCard:x,emptyMessage:w="Nothing to show.",className:k}=e,[C,E]=ln(n,r,i),[F,O]=ln(s,c,p),[M,N]=ln(m,u,g),H=y.useMemo(()=>{let X={...f??{}};for(let U of o)U.defaultHidden&&(X[U.key]??=false);return X},[]),[Y,se]=ln(h,H,b),D=y.useMemo(()=>o.map(X=>({id:X.key,accessorKey:X.key,header:()=>X.header,enableSorting:!!X.sortable,enableHiding:X.hideable!==false,meta:X})),[o]),V=useReactTable({data:t,columns:D,getRowId:a,state:{sorting:M,columnVisibility:Y},onSortingChange:N,onColumnVisibilityChange:se,getCoreRowModel:getCoreRowModel(),getSortedRowModel:getSortedRowModel()}),R=y.useMemo(()=>{let X={},U=0;for(let J of o)J.pinned==="left"&&(X[J.key]=U,U+=J.width??0);return X},[o]),le=V.getRowModel().rows.length===0;return y.createElement(Ca,{gap:"md",className:k,"data-gds-part":"data-view","data-view":C},S&&y.createElement(zo,{justify:"end",align:"center",gap:"sm"},y.createElement(ni,{columns:o,visibility:Y,onVisibilityChange:X=>se(X)}),y.createElement(ri,{value:C,onChange:E,views:l})),C==="table"?y.createElement(bh,{table:V,activeId:F,onActivate:O,pinnedOffset:R,stickyHeader:v,emptyMessage:w,isEmpty:le}):y.createElement(vh,{table:V,mode:C,activeId:F,onActivate:O,renderCard:x,emptyMessage:w,isEmpty:le}))}dn.displayName="DataView";dn.Toggle=ri;dn.Columns=ni;function bh({table:e,activeId:t,onActivate:o,pinnedOffset:a,stickyHeader:n,emptyMessage:r,isEmpty:i}){let l=e.getVisibleLeafColumns(),s=(c,p)=>{if(c in a)return {position:"sticky",left:a[c],zIndex:p?30:10,background:"var(--gds-data-view-pinned-bg, oklch(var(--background)))"}};return y.createElement("div",{className:"rounded-lg border border-border overflow-auto","data-gds-part":"data-view-table",style:n?{maxHeight:"var(--gds-data-view-table-max-h, 28rem)"}:void 0},y.createElement(tn,null,y.createElement(on,null,e.getHeaderGroups().map(c=>y.createElement(Ta,{key:c.id},c.headers.map(p=>{let m=p.column.columnDef.meta,u=p.column.getCanSort(),g=p.column.getIsSorted(),h=g==="asc"?ArrowUp:g==="desc"?ArrowDown:ArrowUpDown,f=s(p.column.id,true);return y.createElement(rn,{key:p.id,style:{...m?.width?{width:m.width,minWidth:m.width}:{},...n?{position:"sticky",top:0,zIndex:f?30:20,background:"var(--gds-data-view-header-bg, oklch(var(--background)))"}:{},...f},className:d(m?.align==="end"&&"text-right",p.column.id in a&&"border-r border-border")},u?y.createElement("button",{type:"button",className:"inline-flex items-center gap-1 text-left font-medium hover:text-foreground",onClick:p.column.getToggleSortingHandler()},typeof m?.header<"u"?m.header:null,y.createElement(h,{className:g?"h-3 w-3 text-foreground":"h-3 w-3 text-muted-foreground"})):m?.header??null)})))),y.createElement(an,null,i?y.createElement(Ta,null,y.createElement(cr,{colSpan:l.length,className:"py-12 text-center text-sm text-muted-foreground"},r)):e.getRowModel().rows.map(c=>{let p=c.id===t;return y.createElement(Ta,{key:c.id,"data-state":p?"selected":void 0,className:p?"cursor-pointer bg-muted":"cursor-pointer",onClick:()=>o(c.id)},c.getVisibleCells().map(m=>{let u=m.column.columnDef.meta,g=s(m.column.id,false);return y.createElement(cr,{key:m.id,style:{...u?.width?{width:u.width,minWidth:u.width}:{},...g?{...g,background:p?"var(--muted, oklch(var(--background)))":g.background}:{}},className:d(u?.align==="end"&&"text-right",m.column.id in a&&"border-r border-border")},cn(u,c.original))}))}))))}function vh({table:e,mode:t,activeId:o,onActivate:a,renderCard:n,emptyMessage:r,isEmpty:i}){let l=e.getVisibleLeafColumns().map(g=>g.columnDef.meta),s=l.find(g=>g?.role==="title")??l[0],c=l.filter(g=>g&&g!==s&&(g.type==="badge"||g.type==="tags")),p=l.filter(g=>g&&g!==s&&g.type!=="badge"&&g.type!=="tags"),m=t==="grid",u=m?"var(--gds-data-view-grid-min, 11rem)":"var(--gds-data-view-card-min, 18rem)";return i?y.createElement("div",{className:"rounded-lg border border-border py-12 text-center text-sm text-muted-foreground"},r):y.createElement("div",{"data-gds-part":m?"data-view-grid":"data-view-cards",style:{display:"grid",gap:"var(--gds-data-view-gap, 0.75rem)",gridTemplateColumns:`repeat(auto-fill, minmax(${u}, 1fr))`}},e.getRowModel().rows.map(g=>{let h=g.id===o;return n?y.createElement("div",{key:g.id,onClick:()=>a(g.id)},n(g.original,{active:h})):y.createElement(Ar,{key:g.id,onClick:()=>a(g.id),className:h?"cursor-pointer ring-2 ring-primary":"cursor-pointer hover:bg-muted/40"},y.createElement(Ca,{gap:"sm",className:m?"p-3":"p-4"},y.createElement(zo,{justify:"between",align:"start",gap:"sm"},s?y.createElement("span",{className:"min-w-0 truncate font-medium"},cn(s,g.original)):null),c.length>0&&y.createElement(zo,{gap:"xs",wrap:true},c.map(f=>y.createElement(y.Fragment,{key:f.key},cn(f,g.original)))),!m&&p.length>0&&y.createElement(Ca,{gap:"xs"},p.slice(0,3).map(f=>y.createElement(zo,{key:f.key,justify:"between",gap:"sm",align:"center"},y.createElement("span",{className:"text-xs text-muted-foreground"},typeof f.header=="string"?f.header:f.key),y.createElement("span",{className:"text-sm"},cn(f,g.original)))))))}))}var ld=y.forwardRef(({className:e,...t},o)=>y.createElement(_o.Root,{className:d("grid gap-2",e),...t,ref:o}));ld.displayName=_o.Root.displayName;var cd=y.forwardRef(({className:e,...t},o)=>y.createElement(_o.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},y.createElement(_o.Indicator,{className:"flex items-center justify-center"},y.createElement(Circle,{className:"h-2.5 w-2.5 fill-current text-current"}))));cd.displayName=_o.Item.displayName;var wh=({className:e,...t})=>y.createElement(Ma.PanelGroup,{"data-gds-part":"resizable-panel-group",className:d("flex h-full w-full data-[panel-group-direction=vertical]:flex-col",e),...t}),kh=Ma.Panel,Sh=({withHandle:e,className:t,...o})=>y.createElement(Ma.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&&y.createElement("div",{className:"z-10 flex h-4 w-3 items-center justify-center rounded-sm border bg-border"},y.createElement(GripVertical,{className:"h-2.5 w-2.5"})));var dd=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=y.forwardRef(({className:e,cols:t,gap:o,align:a,asChild:n=false,...r},i)=>y.createElement(n?Slot:"div",{ref:i,"data-gds-part":"grid",className:d(dd({cols:t,gap:o,align:a,className:e})),...r}));pd.displayName="Grid";var ud=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=y.forwardRef(({className:e,direction:t,gap:o,align:a,justify:n,wrap:r,asChild:i=false,...l},s)=>y.createElement(i?Slot:"div",{ref:s,"data-gds-part":"flex",className:d(ud({direction:t,gap:o,align:a,justify:n,wrap:r,className:e})),...l}));md.displayName="Flex";var gd=y.forwardRef(({className:e,children:t,...o},a)=>y.createElement(Vt.Root,{ref:a,className:d("relative overflow-hidden",e),...o},y.createElement(Vt.Viewport,{className:"h-full w-full rounded-[inherit]"},t),y.createElement(ii,null),y.createElement(Vt.Corner,null)));gd.displayName=Vt.Root.displayName;var ii=y.forwardRef(({className:e,orientation:t="vertical",...o},a)=>y.createElement(Vt.ScrollAreaScrollbar,{ref:a,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},y.createElement(Vt.ScrollAreaThumb,{className:"relative flex-1 rounded-full bg-border"})));ii.displayName=Vt.ScrollAreaScrollbar.displayName;var si=fe.Root,Eh=fe.Group,li=fe.Value,ci=y.createContext("default"),Lh=cva("flex w-full items-center justify-between rounded-md border border-input bg-background ring-offset-background data-[placeholder]:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring 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"}}),mn=y.forwardRef(({className:e,children:t,size:o="default",startSlot:a,chevron:n=true,...r},i)=>y.createElement(fe.Trigger,{ref:i,className:d(Lh({size:o}),e),...r},a?y.createElement("div",{className:"flex min-w-0 flex-1 items-center gap-1.5 [&>span]:truncate"},y.createElement("span",{className:"pointer-events-none flex shrink-0 items-center text-muted-foreground/70 [&_svg]:size-4"},a),t):t,n?y.createElement(fe.Icon,{asChild:true},y.createElement(ChevronDown,{className:d("opacity-50",o==="sm"?"h-3.5 w-3.5":"h-4 w-4")})):null));mn.displayName=fe.Trigger.displayName;var di=y.forwardRef(({className:e,...t},o)=>y.createElement(fe.ScrollUpButton,{ref:o,className:d("flex cursor-default items-center justify-center py-1",e),...t},y.createElement(ChevronUp,{className:"h-4 w-4"})));di.displayName=fe.ScrollUpButton.displayName;var pi=y.forwardRef(({className:e,...t},o)=>y.createElement(fe.ScrollDownButton,{ref:o,className:d("flex cursor-default items-center justify-center py-1",e),...t},y.createElement(ChevronDown,{className:"h-4 w-4"})));pi.displayName=fe.ScrollDownButton.displayName;var gn=y.forwardRef(({className:e,children:t,position:o="popper",size:a="default",container:n,...r},i)=>y.createElement(fe.Portal,{container:n??void 0},y.createElement(fe.Content,{ref:i,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,...r},y.createElement(di,null),y.createElement(fe.Viewport,{className:d(a==="default"?"p-1":"p-0.5",o==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]")},y.createElement(ci.Provider,{value:a},t)),y.createElement(pi,null))));gn.displayName=fe.Content.displayName;var Dh={default:"py-1.5 pl-8 pr-2 text-sm font-semibold",sm:"py-1 pl-7 pr-2 text-xs font-semibold",xs:"py-1 pl-6 pr-2 text-2xs font-medium text-muted-foreground uppercase tracking-wide","2xs":"py-0.5 pl-6 pr-2 text-2xs font-medium text-muted-foreground uppercase tracking-wide"},bd=y.forwardRef(({className:e,...t},o)=>{let a=y.useContext(ci);return y.createElement(fe.Label,{ref:o,className:d(Dh[a],e),...t})});bd.displayName=fe.Label.displayName;var Ah=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"}}),fn=y.forwardRef(({className:e,children:t,hint:o,...a},n)=>{let r=y.useContext(ci),i=r!=="default";return y.createElement(fe.Item,{ref:n,className:d("group",Ah({size:r}),e),...a},y.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")},y.createElement(fe.ItemIndicator,null,y.createElement(Check,{className:i?"h-3 w-3":"h-4 w-4"}))),y.createElement(fe.ItemText,null,t),o!=null?y.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)});fn.displayName=fe.Item.displayName;var vd=y.forwardRef(({className:e,...t},o)=>y.createElement(fe.Separator,{ref:o,className:d("-mx-1 my-1 h-px bg-muted",e),...t}));vd.displayName=fe.Separator.displayName;var yd=cva("relative inline-block shrink-0 overflow-hidden shadow-elevation-1",{variants:{size:{xs:"size-5",sm:"size-6",md:"size-8",lg:"size-10",xl:"size-14"},shape:{square:"rounded-none",rounded:"rounded-[var(--radius)]",circle:"rounded-full"}},defaultVariants:{size:"md",shape:"rounded"}});function Hh(e,t){return e||(t?`oklch(var(--${t.replace(/^--/,"")}))`:"transparent")}var Fh=/^#([0-9a-f]{3}|[0-9a-f]{6})$/i,xd=y.createContext({}),hn=y.forwardRef(function({color:t,token:o,size:a,shape:n,label:r,selected:i,onSelect:l,onColorChange:s,className:c,style:p,title:m,"aria-label":u,...g},h){let f=y.useContext(xd),b=a??f.size,v=n??f.shape,S=Hh(t,o),x=typeof s=="function",w=!x&&typeof l=="function",k=Fh.test(t??"")?t:"#000000",C=(typeof r=="string"?r:void 0)??o??t??"colour swatch",E={backgroundImage:"repeating-conic-gradient(var(--gds-media-checker-color) 0% 25%, transparent 0% 50%)",backgroundSize:"var(--gds-media-checker-size) var(--gds-media-checker-size)"},O=y.createElement(x?"label":w?"button":"div",{ref:h,"data-gds-part":"swatch","data-selected":i?"":void 0,title:m??C,"aria-label":u??(w?C:void 0),"aria-pressed":w?!!i:void 0,type:w?"button":void 0,onClick:w?l:void 0,className:d(yd({size:b,shape:v}),i&&"ring-2 ring-selected ring-offset-2 ring-offset-background",(w||x)&&"cursor-pointer outline-none transition-transform hover:scale-[1.06] focus-within:ring-2 focus-within:ring-ring focus-within:ring-offset-2 focus-within:ring-offset-background focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background",!r&&c),style:{...E,...r?void 0:p},...r?{}:g},y.createElement("span",{className:"absolute inset-0",style:{background:S}}),y.createElement("span",{"aria-hidden":true,className:"pointer-events-none absolute inset-0 rounded-[inherit] ring-1 ring-inset ring-foreground/40"}),x&&y.createElement("input",{type:"color",value:k,onChange:M=>s(M.currentTarget.value),"aria-label":u??C,className:"absolute inset-0 cursor-pointer opacity-0"}));return r?y.createElement("div",{className:d("inline-flex flex-col items-start gap-1.5",c),style:p,...g},O,y.createElement("span",{className:"text-xs leading-none text-muted-foreground"},r)):O});hn.displayName="Swatch";var zh={xs:"-space-x-1.5",sm:"-space-x-2",md:"-space-x-2.5",lg:"-space-x-3",xl:"-space-x-4"},Bh={xs:"gap-1",sm:"gap-2",md:"gap-3",lg:"gap-4"},wd=y.forwardRef(function({layout:t="row",size:o,shape:a,gap:n="sm",className:r,children:i,...l},s){let c=t==="stack";return y.createElement(xd.Provider,{value:{size:o,shape:a}},y.createElement("div",{ref:s,"data-gds-part":"swatch-group","data-layout":t,className:d("inline-flex flex-wrap items-center",c?d(zh[o??"md"],"[&_[data-gds-part=swatch]]:ring-2 [&_[data-gds-part=swatch]]:ring-background"):Bh[n],r),...l},i))});wd.displayName="SwatchGroup";var Oh=Be.Root,Gh=Be.Trigger,Wh=Be.Close,kd=Be.Portal,ui=y.forwardRef(({className:e,...t},o)=>y.createElement(Be.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}));ui.displayName=Be.Overlay.displayName;var Uh=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"}}),Sd=y.forwardRef(({side:e="right",surface:t="solid",className:o,overlayClassName:a,closeClassName:n,children:r,...i},l)=>y.createElement(kd,null,y.createElement(ui,{className:a}),y.createElement(Be.Content,{ref:l,"data-surface":t,className:d(Uh({side:e}),qt(t,"bg-background"),St[t],o),...i},r,y.createElement(Be.Close,{className:d("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",n)},y.createElement(X,{className:"h-4 w-4"}),y.createElement("span",{className:"sr-only"},"Close")))));Sd.displayName=Be.Content.displayName;var Rd=({className:e,...t})=>y.createElement("div",{className:d("flex flex-col space-y-2 text-center sm:text-left",e),...t});Rd.displayName="SheetHeader";var Cd=({className:e,...t})=>y.createElement("div",{className:d("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});Cd.displayName="SheetFooter";var Td=y.forwardRef(({className:e,...t},o)=>y.createElement(Be.Title,{ref:o,className:d("text-lg font-semibold text-foreground",e),...t}));Td.displayName=Be.Title.displayName;var Pd=y.forwardRef(({className:e,...t},o)=>y.createElement(Be.Description,{ref:o,className:d("text-sm text-muted-foreground",e),...t}));Pd.displayName=Be.Description.displayName;function $h({className:e,...t}){return y.createElement("div",{className:d("animate-pulse rounded-md bg-muted",e),...t})}var jh={default:{track:"h-2 bg-secondary",range:"bg-primary",thumb:"h-5 w-5 border-2 border-primary focus-visible:ring-2 focus-visible:ring-offset-2"},sm:{track:"h-[3px] bg-border",range:"bg-foreground/40",thumb:"h-3 w-3 border border-border hover:border-foreground/40 focus-visible:ring-2"}},sa=y.forwardRef(({className:e,size:t="default",...o},a)=>{let n=jh[t];return y.createElement(Po.Root,{ref:a,className:d("relative flex w-full cursor-pointer touch-none select-none items-center py-2 -my-1",e),...o},y.createElement(Po.Track,{className:d("relative w-full grow overflow-hidden rounded-full",n.track)},y.createElement(Po.Range,{className:d("absolute h-full rounded-full",n.range)})),y.createElement(Po.Thumb,{className:d("block rounded-full bg-background shadow-sm ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",n.thumb)}))});sa.displayName=Po.Root.displayName;var ob={vertical:verticalListSortingStrategy,horizontal:horizontalListSortingStrategy,grid:rectSortingStrategy},mi=y.createContext(null),Fd=y.createContext(null),gi=y.forwardRef(function({disabled:t=false,className:o,children:a,...n},r){let i=y.useRef(new Map),l=y.useCallback(m=>(i.current.set(m.id,m),()=>{i.current.delete(m.id);}),[]),s=useSensors(useSensor(PointerSensor,{activationConstraint:{distance:4}}),useSensor(KeyboardSensor,{coordinateGetter: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},p=y.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 x=h.values.findIndex(k=>k===u.id),w=h.values.findIndex(k=>k===g.id);if(x===-1||w===-1)return;h.onReorder?.(arrayMove(h.values,x,w));return}let b=h.values.filter(x=>x!==u.id),v=g.id===f.id?f.values.length:Math.max(0,f.values.findIndex(x=>x===g.id)),S=[...f.values.slice(0,v),u.id,...f.values.slice(v)];h.onReorder?.(b),f.onReorder?.(S);},[t]);return y.createElement(Fd.Provider,{value:{registerContainer:l}},y.createElement(DndContext,{sensors:s,collisionDetection:closestCorners,onDragEnd:p},y.createElement("div",{ref:r,"data-gds-part":"sortable-group","data-disabled":t||void 0,className:d(o),...n},a)))});gi.displayName="Sortable.Group";var ur=y.forwardRef(function({values:t,onReorder:o,strategy:a="vertical",disabled:n=false,id:r,className:i,children:l,...s},c){let p=y.useContext(Fd),m=p!==null,u=y.useId(),g=r??u;y.useEffect(()=>{if(m)return p.registerContainer({id:g,values:t,onReorder:o})},[m,p,g,t,o]);let h=useSensors(useSensor(PointerSensor,{activationConstraint:{distance:4}}),useSensor(KeyboardSensor,{coordinateGetter:sortableKeyboardCoordinates})),f=y.useCallback(S=>{let{active:x,over:w}=S;if(!w||x.id===w.id)return;let k=t.findIndex(E=>E===x.id),C=t.findIndex(E=>E===w.id);k===-1||C===-1||o?.(arrayMove(t,k,C));},[t,o]),b=y.useMemo(()=>({disabled:n}),[n]),v=y.createElement(SortableContext,{items:t,strategy:ob[a]},y.createElement(ab,{id:g,enabled:m,forwardedRef:c,strategy:a,disabled:n,className:i,...s},l));return m?y.createElement(mi.Provider,{value:b},v):y.createElement(mi.Provider,{value:b},y.createElement(DndContext,{sensors:h,collisionDetection:closestCenter,onDragEnd:f},v))});ur.displayName="Sortable";function ab({id:e,enabled:t,forwardedRef:o,strategy:a,disabled:n,className:r,children:i,...l}){let s=useDroppable({id:e,disabled:!t}),c=y.useCallback(p=>{t&&s.setNodeRef(p),typeof o=="function"?o(p):o&&(o.current=p);},[t,s,o]);return y.createElement("div",{ref:c,"data-gds-part":"sortable","data-strategy":a,"data-disabled":n||void 0,className:d(r),...l},i)}var zd=y.createContext(null),fi=y.forwardRef(function({value:t,asChild:o=false,disabled:a,className:n,style:r,children:i,...l},s){let c=y.useContext(mi);if(!c)throw new Error("<Sortable.Item> must be rendered inside <Sortable>.");let p=c.disabled||a||false,{attributes:m,listeners:u,setNodeRef:g,setActivatorNodeRef:h,transform:f,transition:b,isDragging:v}=useSortable({id:t,disabled:p}),S=y.useRef(false),x=y.useCallback(E=>{g(E),typeof s=="function"?s(E):s&&(s.current=E);},[g,s]),w=y.useMemo(()=>({listeners:u,setActivatorNodeRef:h,hasHandle:S,disabled:p}),[u,h,p]),k={transform:CSS.Transform.toString(f),transition:b,zIndex:v?1:void 0,cursor:p?"default":S.current?void 0:"grab",...r},C=o?Slot:"div";return y.createElement(zd.Provider,{value:w},y.createElement(C,{ref:x,"data-gds-part":"sortable-item","data-value":String(t),"data-dragging":v||void 0,className:d(n),style:k,...m,...S.current?{}:u,...l},i))});fi.displayName="Sortable.Item";var hi=y.forwardRef(function({asChild:t=false,className:o,children:a,...n},r){let i=y.useContext(zd);if(!i)throw new Error("<Sortable.Handle> must be rendered inside <Sortable.Item>.");y.useLayoutEffect(()=>(i.hasHandle.current=true,()=>{i.hasHandle.current=false;}),[i.hasHandle]);let l=y.useCallback(c=>{i.setActivatorNodeRef(c),typeof r=="function"?r(c):r&&(r.current=c);},[i,r]),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?y.createElement(Slot,{ref:l,...s},a):y.createElement("button",{type:"button",ref:l,...s},a)});hi.displayName="Sortable.Handle";ur.Item=fi;ur.Handle=hi;ur.Group=gi;var rb=ur;var nb=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"}}),ib=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"}}),vn=y.forwardRef(({className:e,size:t="default",...o},a)=>y.createElement(gr.Root,{className:d(nb({size:t}),e),...o,ref:a},y.createElement(gr.Thumb,{className:d(ib({size:t}))})));vn.displayName=gr.Root.displayName;var Vd=y.createContext(y.createElement(ChevronRight,null)),_d=y.forwardRef(({separator:e,children:t,...o},a)=>y.createElement(Vd.Provider,{value:e??y.createElement(ChevronRight,null)},y.createElement("nav",{ref:a,"aria-label":"breadcrumb",...o},t)));_d.displayName="Breadcrumb";var Od=y.forwardRef(({className:e,...t},o)=>y.createElement("ol",{ref:o,className:d("flex flex-wrap items-center gap-1.5 break-words text-xs text-muted-foreground",e),...t}));Od.displayName="BreadcrumbList";var Gd=y.forwardRef(({className:e,...t},o)=>y.createElement("li",{ref:o,className:d("inline-flex items-center gap-1.5",e),...t}));Gd.displayName="BreadcrumbItem";var yn=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"),Wd=y.forwardRef(({asChild:e,className:t,href:o,...a},n)=>e?y.createElement("span",{ref:n,className:d(yn,t),...a}):o?y.createElement("a",{ref:n,href:o,className:d(yn,t),...a}):y.createElement("button",{ref:n,type:"button",className:d(yn,t),...a}));Wd.displayName="BreadcrumbLink";var Ud=y.forwardRef(({className:e,...t},o)=>y.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}));Ud.displayName="BreadcrumbPage";var $d=({children:e,className:t,...o})=>{let a=y.useContext(Vd);return y.createElement("li",{role:"presentation","aria-hidden":"true",className:d("[&_svg]:size-3 [&_svg]:shrink-0 text-muted-foreground/60",t),...o},e??a)};$d.displayName="BreadcrumbSeparator";var jd=({className:e,...t})=>y.createElement("span",{role:"presentation","aria-hidden":"true",className:d("flex h-5 w-5 items-center justify-center",e),...t},y.createElement(MoreHorizontal,{className:"h-3.5 w-3.5"}),y.createElement("span",{className:"sr-only"},"More"));jd.displayName="BreadcrumbEllipsis";var Kd=y.forwardRef(({label:e,items:t,onSelect:o,onSelectLabel:a,current:n,className:r},i)=>{let[l,s]=y.useState(false);return y.createElement(zt,{open:l,onOpenChange:s},y.createElement(Bt,{asChild:true},y.createElement("button",{ref:i,type:"button",className:d(yn,n&&"font-medium text-foreground",r),onClick:()=>{a?a():s(c=>!c);}},y.createElement("span",null,e),y.createElement(ChevronDown,{className:d("h-3 w-3 text-muted-foreground transition-transform",l&&"rotate-180"),onClick:c=>{c.stopPropagation(),s(p=>!p);},role:"button","aria-label":`Show ${e} children`}))),y.createElement(Ct,{align:"start",className:"w-64 p-1 max-h-80 overflow-y-auto"},t.length===0?y.createElement("p",{className:"px-2 py-1.5 text-xs text-muted-foreground"},"No items here yet."):y.createElement("ul",{className:"flex flex-col gap-0.5"},t.map(c=>y.createElement("li",{key:c.id},y.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")},y.createElement("span",{className:"flex-1 min-w-0"},y.createElement("span",{className:"flex items-center gap-1.5"},y.createElement("span",{className:"text-xs font-medium text-foreground truncate"},c.label),c.active&&y.createElement(Check,{className:"h-3 w-3 text-primary shrink-0"})),c.summary&&y.createElement("span",{className:"block text-[10px] text-muted-foreground leading-snug truncate"},c.summary)),c.hasChildren&&y.createElement(ChevronRight,{className:"h-3 w-3 text-muted-foreground/70 shrink-0 mt-0.5"})))))))});Kd.displayName="BreadcrumbMenuTrigger";var Yd=y.createContext({size:"md",variant:"pill"}),db=Xt.Root,pb=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"}}),ub=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"}}),Zd=y.forwardRef(({className:e,size:t="md",variant:o="pill",children:a,...n},r)=>y.createElement(Yd.Provider,{value:{size:t??"md",variant:o??"pill"}},y.createElement(Xt.List,{ref:r,className:d(pb({size:t,variant:o}),e),...n},a)));Zd.displayName=Xt.List.displayName;var Xd=y.forwardRef(({className:e,size:t,variant:o,tooltip:a,...n},r)=>{let i=y.useContext(Yd),l=t??i.size,s=o??i.variant,c=n["aria-label"]??(typeof a=="string"?a:void 0),p=y.createElement(Xt.Trigger,{ref:r,className:d(ub({size:l,variant:s}),e),"aria-label":c,...n});return a?y.createElement(ra,null,y.createElement(na,{asChild:true},p),y.createElement(Bo,null,a)):p});Xd.displayName=Xt.Trigger.displayName;var Jd=y.forwardRef(({className:e,...t},o)=>y.createElement(Xt.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}));Jd.displayName=Xt.Content.displayName;var mb={light:"",dark:".dark"},Qd=y.createContext(null);function ep(){let e=y.useContext(Qd);if(!e)throw new Error("useChart must be used within a <ChartContainer />");return e}var tp=y.forwardRef(({id:e,className:t,children:o,config:a,...n},r)=>{let i=y.useId(),l=`chart-${e||i.replace(/:/g,"")}`;return y.createElement(Qd.Provider,{value:{config:a}},y.createElement("div",{"data-chart":l,ref:r,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},y.createElement(op,{id:l,config:a}),y.createElement(Na.ResponsiveContainer,null,o)))});tp.displayName="Chart";var op=({id:e,config:t})=>{let o=Object.entries(t).filter(([,a])=>a.theme||a.color);return o.length?y.createElement("style",{dangerouslySetInnerHTML:{__html:Object.entries(mb).map(([a,n])=>`
117
117
  ${n} [data-chart=${e}] {
118
- ${o.map(([a,i])=>{let s=i.theme?.[r]||i.color;return s?` --color-${a}: ${s};`:null}).join(`
118
+ ${o.map(([r,i])=>{let l=i.theme?.[a]||i.color;return l?` --color-${r}: ${l};`:null}).join(`
119
119
  `)}
120
120
  }
121
121
  `).join(`
122
- `)}}):null},Mh=br.Tooltip,Hd=y.forwardRef(({active:e,payload:t,className:o,indicator:r="dot",hideLabel:n=false,hideIndicator:a=false,label:i,labelFormatter:s,labelClassName:l,formatter:d,color:p,nameKey:m,labelKey:u},b)=>{let{config:f}=Ad(),h=y.useMemo(()=>{if(n||!t?.length)return null;let[v]=t,k=`${u||v?.dataKey||v?.name||"value"}`,x=Un(f,v,k),w=!u&&typeof i=="string"?f[i]?.label||i:x?.label;return s?y.createElement("div",{className:c("font-medium",l)},s(w,t)):w?y.createElement("div",{className:c("font-medium",l)},w):null},[i,s,t,n,l,f,u]);if(!e||!t?.length)return null;let g=t.length===1&&r!=="dot";return y.createElement("div",{ref:b,className:c("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)},g?null:h,y.createElement("div",{className:"grid gap-1.5"},t.filter(v=>v.type!=="none").map((v,k)=>{let x=`${m||v.name||v.dataKey||"value"}`,w=Un(f,v,x),S=p||v.payload.fill||v.color;return y.createElement("div",{key:v.dataKey,className:c("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")},d&&v?.value!==void 0&&v.name?d(v.value,v.name,v,k,v.payload):y.createElement(y.Fragment,null,w?.icon?y.createElement(w.icon,null):!a&&y.createElement("div",{className:c("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":g&&r==="dashed"}),style:{"--color-bg":S,"--color-border":S}}),y.createElement("div",{className:c("flex flex-1 justify-between leading-none",g?"items-end":"items-center")},y.createElement("div",{className:"grid gap-1.5"},g?h:null,y.createElement("span",{className:"text-muted-foreground"},w?.label||v.name)),v.value&&y.createElement("span",{className:"font-mono font-medium tabular-nums text-foreground"},v.value.toLocaleString()))))})))});Hd.displayName="ChartTooltip";var Nh=br.Legend,Fd=y.forwardRef(({className:e,hideIcon:t=false,payload:o,verticalAlign:r="bottom",nameKey:n},a)=>{let{config:i}=Ad();return o?.length?y.createElement("div",{ref:a,className:c("flex items-center justify-center gap-4",r==="top"?"pb-3":"pt-3",e)},o.filter(s=>s.type!=="none").map(s=>{let l=`${n||s.dataKey||"value"}`,d=Un(i,s,l);return y.createElement("div",{key:s.value,className:c("flex items-center gap-1.5 [&>svg]:h-3 [&>svg]:w-3 [&>svg]:text-muted-foreground")},d?.icon&&!t?y.createElement(d.icon,null):y.createElement("div",{className:"h-2 w-2 shrink-0 rounded-[2px]",style:{backgroundColor:s.color}}),d?.label)})):null});Fd.displayName="ChartLegend";function Un(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 Lh=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"}}),zd=y.forwardRef(({className:e,size:t="default",...o},r)=>y.createElement("textarea",{className:c(Lh({size:t}),e),ref:r,...o}));zd.displayName="Textarea";var ja=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",segmented:"rounded-md bg-transparent text-muted-foreground hover:bg-transparent hover:text-foreground data-[state=on]:bg-background data-[state=on]:text-foreground data-[state=on]:shadow-sm"},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"}}),Bd=y.forwardRef(({className:e,variant:t,size:o,...r},n)=>y.createElement($n.Root,{ref:n,className:c(ja({variant:t,size:o,className:e})),...r}));Bd.displayName=$n.Root.displayName;var _d=y.createContext({size:"default",variant:"default"}),Xo=y.forwardRef(({className:e,variant:t,size:o,children:r,...n},a)=>y.createElement(vr.Root,{ref:a,className:c("flex items-center justify-center gap-1",t==="segmented"&&"inline-flex gap-0 rounded-lg bg-muted/70 p-0.5",e),...n},y.createElement(_d.Provider,{value:{variant:t,size:o}},r)));Xo.displayName=vr.Root.displayName;var Jo=y.forwardRef(({className:e,children:t,variant:o,size:r,tooltip:n,tooltipSide:a="top",tooltipDelay:i,"aria-label":s,...l},d)=>{let p=y.useContext(_d),m=s??(typeof n=="string"?n:void 0),u=y.createElement(vr.Item,{ref:d,className:c(ja({variant:p.variant||o,size:p.size||r}),e),"aria-label":m,...l},t);return n==null?u:y.createElement(Yo,{delayDuration:i},y.createElement(Zo,{asChild:true},y.createElement("span",{className:"inline-flex"},u)),y.createElement(Eo,{side:a},n))});Jo.displayName=vr.Item.displayName;var Ih=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}}),Od=y.forwardRef(({className:e,position:t,variant:o,size:r,sticky:n,leading:a,center:i,trailing:s,children:l,"aria-label":d,...p},m)=>{let u=l==null;return y.createElement("div",{ref:m,role:"toolbar","aria-label":d??"Toolbar","data-gds-part":"toolbar","data-position":t??"top",className:c(Ih({position:t,variant:o,size:r,sticky:n}),e),...p},u?y.createElement(y.Fragment,null,y.createElement("div",{"data-gds-part":"toolbar-leading",className:"flex items-center min-w-0"},a),y.createElement("div",{"data-gds-part":"toolbar-center",className:"flex items-center min-w-0 justify-center"},i),y.createElement("div",{"data-gds-part":"toolbar-trailing",className:"flex items-center min-w-0 justify-end"},s)):l)});Od.displayName="Toolbar";var Vd=y.forwardRef(({className:e,align:t="leading",...o},r)=>y.createElement("div",{ref:r,"data-gds-part":`toolbar-${t}`,className:c("flex items-center min-w-0",t==="center"&&"justify-center",t==="trailing"&&"justify-end",e),...o}));Vd.displayName="ToolbarSlot";var Wd=y.createContext(null),jn=y.createContext(0);function Ud(){return y.useContext(jn)}function Jr(e){let t=y.useContext(Wd);if(!t)throw new Error(`<${e}> must be rendered inside a <Sidebar> root.`);return t}var Lo=y.forwardRef(({collapsed:e,defaultCollapsed:t=false,onCollapsedChange:o,collapsible:r=true,variant:n="rail",className:a,style:i,children:s,...l},d)=>{let p=e!==void 0,[m,u]=y.useState(t),b=p?e:m,f=n==="panel",h=()=>{let g=!b;p||u(g),o?.(g);};return y.createElement(Wn,{delayDuration:0},y.createElement(Wd.Provider,{value:{collapsed:b}},y.createElement("aside",{ref:d,"data-gds-part":"sidebar","data-collapsed":b||void 0,"data-variant":n,className:c("relative flex h-full flex-col bg-card text-card-foreground",f?"w-full border border-border rounded-lg overflow-hidden":"border-r border-border transition-[width] duration-200 ease-out",a),style:f?i:{width:b?"var(--gds-sidebar-collapsed-width, 4rem)":"var(--gds-sidebar-width, 16rem)",...i},...l},s,r&&!f&&y.createElement("button",{type:"button",onClick:h,"aria-label":b?"Expand sidebar":"Collapse sidebar","data-gds-part":"sidebar-collapse-toggle",className:c("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")},b?y.createElement(ChevronRight,{className:"h-3 w-3"}):y.createElement(ChevronLeft,{className:"h-3 w-3"})))))});Lo.displayName="Sidebar";var qn=y.forwardRef(({className:e,...t},o)=>{let{collapsed:r}=Jr("SidebarHeader");return y.createElement("div",{ref:o,"data-gds-part":"sidebar-header","data-collapsed":r||void 0,className:c("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})});qn.displayName="SidebarHeader";var Yn=y.forwardRef(({className:e,...t},o)=>y.createElement("nav",{ref:o,"data-gds-part":"sidebar-content",className:c("flex-1 overflow-y-auto overflow-x-hidden","py-[var(--gds-sidebar-content-py,0.5rem)]",e),...t}));Yn.displayName="SidebarContent";var Zn=y.forwardRef(({className:e,...t},o)=>{let{collapsed:r}=Jr("SidebarFooter");return y.createElement("div",{ref:o,"data-gds-part":"sidebar-footer","data-collapsed":r||void 0,className:c("shrink-0 border-t border-border",r?"px-2 py-2":"px-3 py-2",e),...t})});Zn.displayName="SidebarFooter";var Xn=y.forwardRef(({title:e,icon:t,trailing:o,collapsible:r=true,defaultExpanded:n=true,titleTransform:a,className:i,children:s,...l},d)=>{let{collapsed:p}=Jr("SidebarSection"),[m,u]=y.useState(n),b=!!e&&r;return p?y.createElement("div",{ref:d,"data-gds-part":"sidebar-section",className:c("px-[var(--gds-sidebar-section-px,0.5rem)] space-y-[var(--gds-sidebar-section-gap,0.125rem)]",i),...l},s):y.createElement("div",{ref:d,"data-gds-part":"sidebar-section",className:c("px-[var(--gds-sidebar-section-px,0.5rem)] pb-1",i),...l},e&&(b?y.createElement("div",{className:c("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")},y.createElement("button",{type:"button",onClick:()=>u(f=>!f),"aria-expanded":m,className:"flex flex-1 items-center gap-2 text-left min-w-0"},t,y.createElement("span",{className:c("flex-1 text-left truncate",a==="uppercase"?"uppercase":"normal-case")},e),m?y.createElement(ChevronDown,{className:"h-3 w-3 shrink-0",strokeWidth:1.5}):y.createElement(ChevronRight,{className:"h-3 w-3 shrink-0",strokeWidth:1.5})),o&&y.createElement("span",{className:"flex items-center shrink-0",onClick:f=>f.stopPropagation(),onKeyDown:f=>f.stopPropagation()},o)):y.createElement("div",{className:c("flex items-center gap-2 px-2 py-1.5 text-xs font-medium tracking-wide",a==="none"?"":"uppercase","text-muted-foreground")},t,y.createElement("span",{className:"flex-1 truncate"},e),o&&y.createElement("span",{className:"shrink-0"},o))),m&&y.createElement("div",{className:c("mt-[var(--gds-sidebar-section-gap,0.125rem)]","space-y-[var(--gds-sidebar-section-gap,0.125rem)]")},s))});Xn.displayName="SidebarSection";var Jn=y.forwardRef(({icon:e,badge:t,active:o=false,asButton:r=false,asChild:n=false,disabled:a=false,collapsedLabel:i,size:s="md",description:l,className:d,children:p,...m},u)=>{let{collapsed:b}=Jr("SidebarItem"),f=Ud(),h=!b&&f>0?{paddingLeft:`calc(0.5rem + ${f} * var(--gds-sidebar-tree-indent, 1.5rem))`}:void 0,g=s==="sm",v=g?"text-xs px-2 py-1":"text-sm px-2 py-1.5",k=g&&!o?"font-normal":"font-medium",x=o?"bg-primary/10 text-primary":g?"text-muted-foreground hover:bg-muted hover:text-foreground":"text-foreground/80 hover:bg-muted hover:text-foreground",w=!b&&l!=null,S=c("group flex items-center gap-2.5 rounded-md transition-colors",v,k,w&&(g?"py-1.5":"py-2"),b?"justify-center px-2 py-2":null,x,a&&"opacity-50 pointer-events-none",d),T=w?y.createElement("span",{className:"flex min-w-0 flex-1 flex-col gap-0.5 text-left leading-tight"},y.createElement("span",{className:"truncate"},p),y.createElement("span",{className:c("truncate font-normal text-muted-foreground",g?"text-[10px]":"text-[11px]")},l)):y.createElement("span",{className:"flex-1 truncate text-left"},p),L=y.createElement(y.Fragment,null,e&&y.createElement("span",{className:"shrink-0 [&>svg]:h-4 [&>svg]:w-4","aria-hidden":true},e),!b&&T,!b&&t!==void 0&&t!==null&&y.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)),B;if(n)B=y.createElement(Slot,{"data-gds-part":"sidebar-item","data-active":o||void 0,"aria-current":o?"page":void 0,className:S,style:h},p);else if(r){let{href:N,target:A,rel:F,download:Q,hrefLang:ge,ping:I,referrerPolicy:ee,type:R,...O}=m;B=y.createElement("button",{type:"button","data-gds-part":"sidebar-item","data-active":o||void 0,"aria-current":o?"page":void 0,disabled:a,className:c(S,"w-full text-left"),style:h,...O},L);}else B=y.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:h,...m},L);if(!b)return B;let V=i??(typeof p=="string"?p:null);return V?y.createElement(Yo,null,y.createElement(Zo,{asChild:true},B),y.createElement(Eo,{side:"right",sideOffset:8},V,t!=null&&y.createElement("span",{className:"ml-2 inline-flex items-center justify-center rounded bg-foreground/10 px-1.5 py-0 text-[10px]"},t))):B});Jn.displayName="SidebarItem";var Qn=y.forwardRef(function({label:t,icon:o,badge:r,active:n=false,defaultExpanded:a=true,expanded:i,onExpandedChange:s,disabled:l,description:d,trailing:p,className:m,style:u,children:b,...f},h){let{collapsed:g}=Jr("SidebarTreeItem"),v=Ud(),k=i!==void 0,[x,w]=y.useState(a),S=k?i:x,T=()=>{let B=!S;k||w(B),s?.(B);};if(g)return y.createElement(jn.Provider,{value:v},b);let L=v*1.5;return y.createElement("div",{"data-gds-part":"sidebar-tree-item"},y.createElement("div",{className:"group/row relative"},y.createElement("button",{ref:h,type:"button",onClick:T,"aria-expanded":S,"aria-current":n?"page":void 0,"data-active":n||void 0,disabled:l,className:c("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",l&&"opacity-50 pointer-events-none",p!=null&&"pr-12",m),style:{paddingLeft:`calc(0.25rem + ${L}rem)`,paddingRight:p!=null?"3rem":"0.5rem",...u},...f},y.createElement("span",{className:"inline-flex h-4 w-4 items-center justify-center text-muted-foreground shrink-0","aria-hidden":true},S?y.createElement(ChevronDown,{className:"h-3 w-3"}):y.createElement(ChevronRight,{className:"h-3 w-3"})),o&&y.createElement("span",{className:"shrink-0 [&>svg]:h-4 [&>svg]:w-4","aria-hidden":true},o),d!=null?y.createElement("span",{className:"flex min-w-0 flex-1 flex-col gap-0.5 text-left leading-tight"},y.createElement("span",{className:"truncate"},t),y.createElement("span",{className:"truncate text-[11px] font-normal text-muted-foreground"},d)):y.createElement("span",{className:"flex-1 truncate text-left"},t),r!=null&&y.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)),p!=null&&y.createElement("div",{onClick:B=>B.stopPropagation(),className:"pointer-events-auto absolute inset-y-0 right-1.5 flex items-center gap-0.5"},p)),S&&b&&y.createElement(jn.Provider,{value:v+1},y.createElement("div",{className:"space-y-[var(--gds-sidebar-section-gap,0.125rem)]"},b)))});Qn.displayName="SidebarTreeItem";Lo.Header=qn;Lo.Content=Yn;Lo.Footer=Zn;Lo.Section=Xn;Lo.Item=Jn;Lo.TreeItem=Qn;var xo=[50,100,200,300,400,500,600,700,800,900,950],$d=[.985,.955,.895,.82,.72,.61,.51,.415,.325,.245,.17],zh=[.015,.04,.075,.11,.14,.17,.17,.15,.12,.08,.04];function eo({hue:e,chromaScale:t=1}){let o=(e%360+360)%360,r={};for(let n=0;n<xo.length;n++){let a=$d[n],i=zh[n]*t;r[xo[n]]=`${a.toFixed(4)} ${i.toFixed(4)} ${o.toFixed(2)}`;}return r}function jd(){let e={};for(let t=0;t<xo.length;t++){let o=$d[t];e[xo[t]]=`${o.toFixed(4)} 0 0`;}return e}var Ka={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"}},Qr="1 0 0",Kd="0 0 0";function yr(e,t){let[,o,r]=e.split(/\s+/).map(p=>p.trim()),n=Number(o),a=r;if(t==="light"){let m=Math.min(n*.22,.045),u=.38,b=n;return {soft:`${.965.toFixed(3)} ${m.toFixed(3)} ${a}`,deep:`${u.toFixed(3)} ${b.toFixed(3)} ${a}`}}let i=.22,s=Math.min(n*.45,.075),l=.82,d=n*.9;return {soft:`${i.toFixed(3)} ${s.toFixed(3)} ${a}`,deep:`${l.toFixed(3)} ${d.toFixed(3)} ${a}`}}var ei={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 qd="custom:";function Yd(e){return e.startsWith(qd)?e.slice(qd.length):null}var Zd={sans:"system-ui, sans-serif",serif:"Georgia, serif",mono:"ui-monospace, monospace"};var Vh=["superLight","light","dark","superDark"],Gh={muted:.6,default:1,vibrant:1.3};function Wh(e,t,o){let r=t.primary*o,n=t.accent*o,a=(r+n)/2*.8,i=s=>(s%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}),Dt=e=>({source:"primary",step:e}),Ao=e=>({source:"accent",step:e}),ea=e=>({source:"pure",value:e}),Uh={superLight:{background:oe(50),foreground:oe(800),card:ea(Qr),cardForeground:oe(800),popover:ea(Qr),popoverForeground:oe(800),primary:Dt(600),primaryForeground:Dt(50),secondary:oe(100),secondaryForeground:oe(700),muted:oe(100),mutedForeground:oe(500),accent:Ao(600),accentForeground:Ao(50),border:oe(200),input:oe(200),ring:Dt(500)},light:{background:oe(50),foreground:oe(950),card:ea(Qr),cardForeground:oe(950),popover:ea(Qr),popoverForeground:oe(950),primary:Dt(500),primaryForeground:Dt(50),secondary:oe(100),secondaryForeground:oe(700),muted:oe(100),mutedForeground:oe(500),accent:Ao(500),accentForeground:Ao(50),border:oe(200),input:oe(200),ring:Dt(500)},dark:{background:oe(950),foreground:oe(50),card:oe(900),cardForeground:oe(50),popover:oe(900),popoverForeground:oe(50),primary:Dt(400),primaryForeground:Dt(950),secondary:oe(800),secondaryForeground:oe(200),muted:oe(800),mutedForeground:oe(400),accent:Ao(400),accentForeground:Ao(950),border:oe(800),input:oe(800),ring:Dt(400)},superDark:{background:ea(Kd),foreground:oe(100),card:oe(950),cardForeground:oe(100),popover:oe(950),popoverForeground:oe(100),primary:Dt(300),primaryForeground:Dt(950),secondary:oe(900),secondaryForeground:oe(300),muted:oe(900),mutedForeground:oe(500),accent:Ao(300),accentForeground:Ao(950),border:oe(900),input:oe(900),ring:Dt(300)}};function et(e,t){return e.source==="pure"?e.value:t[e.source][e.step]}function $h(e,t,o){let r=Uh[t],n=t==="superLight"||t==="light",a=n?Ka.light:Ka.dark;return {background:et(r.background,e),foreground:et(r.foreground,e),card:et(r.card,e),cardForeground:et(r.cardForeground,e),popover:et(r.popover,e),popoverForeground:et(r.popoverForeground,e),primary:et(r.primary,e),primaryForeground:et(r.primaryForeground,e),secondary:et(r.secondary,e),secondaryForeground:et(r.secondaryForeground,e),muted:et(r.muted,e),mutedForeground:et(r.mutedForeground,e),accent:et(r.accent,e),accentForeground:et(r.accentForeground,e),border:et(r.border,e),input:et(r.input,e),ring:o&&r.ring.source!=="pure"?o[r.ring.step]:et(r.ring,e),destructive:a.destructive,destructiveForeground:a.destructiveFg,success:a.success,warning:a.warning,info:a.info,highlight:a.highlight,...(()=>{let i=n?"light":"dark",s=yr(a.destructive,i),l=yr(a.success,i),d=yr(a.warning,i),p=yr(a.info,i),m=yr(a.highlight,i);return {destructiveSoft:s.soft,destructiveDeep:s.deep,successSoft:l.soft,successDeep:l.deep,warningSoft:d.soft,warningDeep:d.deep,infoSoft:p.soft,infoDeep:p.deep,highlightSoft:m.soft,highlightDeep:m.deep}})()}}var jh={display:3.75,h1:2.5,h2:2,h3:1.5,h4:1.25,h5:1.125,h6:1,body:1,bodySm:.875},oi={compact:.85,default:1,spacious:1.18},Kh=Object.fromEntries(GDS_MODULAR_SCALES.map(e=>[e.id,e.ratio])),qh=.625,Yh=1.02,Zh=1.8,Jd=(e,t,o)=>Math.min(o,Math.max(t,e)),Xh={"2xs":1.455,xs:1.333,sm:1.429,base:1.5,lg:1.556,xl:1.4,"2xl":1.333,"3xl":1.2,"4xl":1.111,"5xl":1,"6xl":1,"7xl":1};function Jh(e){if(e in oi){let o=oi[e];return Object.fromEntries(Object.entries(jh).map(([r,n])=>[r,n*o]))}let t=Qd(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 Qd(e){let t=Jd(Kh[e],Yh,Zh);return modularTypeSizes(1,t,qh)}function ti(e,t,o){let r=Yd(e);if(r===null)return ei[e]??ei.system;let a=t?.find(i=>i.family===r)?.category??o;return `"${r}", ${Zd[a]}`}function Qh(e){let t=Jh(e.scale),o=n=>`${n.toFixed(3)}rem`,r;if(!(e.scale in oi)){let n=Qd(e.scale);r=Object.fromEntries(GDS_TYPE_SIZE_NAMES.map(a=>[a,{size:o(n[a]),lineHeight:String(Xh[a])}]));}return {fontSans:ti(e.body,e.customFonts,"sans"),fontMono:ti(e.mono,e.customFonts,"mono"),fontDisplay:ti(e.display,e.customFonts,"sans"),fontFaces:e.customFonts,headingWeight:e.headingWeight??600,bodyWeight:e.bodyWeight??400,headingTracking:e.headingTracking??"-0.01em",bodyStretch:e.bodyStretch??"normal",displayStretch:e.displayStretch??e.bodyStretch??"normal",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)},namedScale:r}}var eb={sharp:0,subtle:.25,soft:.5,round:.875,pill:1.25};function tb(e){let t=eb[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 Xd={tight:.85,default:1,roomy:1.2},ob=.25,rb=.125;function ab(e){let t=Jd(Xd[e.density],.6,1.6),o=Math.max(rb,Math.round(ob*t*1e4)/1e4);return {baseUnit:"1rem",densityFactor:Xd[e.density],unit:`${o}rem`}}var nb={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 ib(e){let t=e?.shadows??"default",o=e?.motionIntensity??1,r=n=>`${Math.round(n*o)}ms`;return {shadows:nb[t],motion:{fast:r(150),base:r(200),slow:r(300),slower:r(500)},borderWidth:e?.borderWidth??"1px"}}function Qo(e){let t=Gh[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?jd():eo({hue:e.hues.neutral,chromaScale:r}),s=eo({hue:e.hues.primary,chromaScale:n}),l=eo({hue:e.hues.accent,chromaScale:a}),d={neutral:i,primary:s,accent:l},p=Wh(e.hues,{primary:n,accent:a},t),m=e.ring?.hue!=null?eo({hue:e.ring.hue,chromaScale:n}):e.ring?.source&&e.ring.source!=="primary"?d[e.ring.source]:void 0,u=Object.fromEntries(Vh.map(S=>[S,$h(d,S,m)])),b=S=>parseFloat(S.trim().split(/\s+/)[2]??"0"),f=Ka.light,h={success:eo({hue:b(f.success)}),warning:eo({hue:b(f.warning)}),info:eo({hue:b(f.info)}),highlight:eo({hue:b(f.highlight)}),destructive:eo({hue:b(f.destructive)})},g=Qh(e.typography),v=tb(e.radius),k=ab(e.spacing),x=ib(e.effects),w={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:d,roleRamps:h,colors:u,chart:p,typography:g,radius:v,spacing:k,effects:x,components:w}}var ta={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"}},ri={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"}},qa=[ta,ri];function sb(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 ii(e,t){let o=e.colors[t],r={...sb(o),...ai("neutral",e.ramps.neutral),...ai("primary",e.ramps.primary),...ai("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],...lb(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,"--font-body-stretch":e.typography.bodyStretch??"normal","--font-display-stretch":e.typography.displayStretch??"normal","--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),"--spacing":e.spacing.unit??"0.25rem","--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};if(e.typography.namedScale)for(let[a,i]of Object.entries(e.typography.namedScale))r[`--text-${a}`]=i.size,r[`--text-${a}--line-height`]=i.lineHeight;let n=[["primary",e.ramps.primary],["accent",e.ramps.accent],["neutral",e.ramps.neutral],["success",e.roleRamps?.success],["warning",e.roleRamps?.warning],["info",e.roleRamps?.info],["highlight",e.roleRamps?.highlight],["destructive",e.roleRamps?.destructive]];for(let[a,i]of n)if(i)for(let s of xo)r[`--gds-${a}-${s}`]=i[s];return r}function lb(e){let t=s=>parseFloat(s.trim().split(/\s+/)[2]??"0"),o=s=>(s%360+360)%360,r=t(e.ramps.primary[500]),n=t(e.ramps.accent[500]),a=[r,n,r+45,n+60,r+150,n-75,r+210,n+165].map(o),i={};return a.forEach((s,l)=>{let d=(.68+l%3*.02).toFixed(3);i[`--brand-${l+1}`]=`${d} 0.200 ${s.toFixed(2)}`;}),i}function ai(e,t){let o={};for(let r of xo)o[`--ramp-${e}-${r}`]=t[r];return o}var ni="gds-theme-fonts";function ep(e){return !e||e.length===0?"":e.map(t=>{let o=t.format?`url("${t.url}") format("${t.format}")`:`url("${t.url}")`;return ["@font-face {",` font-family: "${t.family.replace(/"/g,"")}";`,` src: ${o};`,` font-weight: ${t.weight??"100 900"};`,` font-stretch: ${t.stretch??"50% 200%"};`,` font-style: ${t.style??"normal"};`," font-display: swap;","}"].join(`
122
+ `)}}):null},gb=Na.Tooltip,ap=y.forwardRef(({active:e,payload:t,className:o,indicator:a="dot",hideLabel:n=false,hideIndicator:r=false,label:i,labelFormatter:l,labelClassName:s,formatter:c,color:p,nameKey:m,labelKey:u},g)=>{let{config:h}=ep(),f=y.useMemo(()=>{if(n||!t?.length)return null;let[v]=t,S=`${u||v?.dataKey||v?.name||"value"}`,x=vi(h,v,S),w=!u&&typeof i=="string"?h[i]?.label||i:x?.label;return l?y.createElement("div",{className:d("font-medium",s)},l(w,t)):w?y.createElement("div",{className:d("font-medium",s)},w):null},[i,l,t,n,s,h,u]);if(!e||!t?.length)return null;let b=t.length===1&&a!=="dot";return y.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,y.createElement("div",{className:"grid gap-1.5"},t.filter(v=>v.type!=="none").map((v,S)=>{let x=`${m||v.name||v.dataKey||"value"}`,w=vi(h,v,x),k=p||v.payload.fill||v.color;return y.createElement("div",{key:v.dataKey,className:d("flex w-full flex-wrap items-stretch gap-2 [&>svg]:h-2.5 [&>svg]:w-2.5 [&>svg]:text-muted-foreground",a==="dot"&&"items-center")},c&&v?.value!==void 0&&v.name?c(v.value,v.name,v,S,v.payload):y.createElement(y.Fragment,null,w?.icon?y.createElement(w.icon,null):!r&&y.createElement("div",{className:d("shrink-0 rounded-[2px] border-[--color-border] bg-[--color-bg]",{"h-2.5 w-2.5":a==="dot","w-1":a==="line","w-0 border-[1.5px] border-dashed bg-transparent":a==="dashed","my-0.5":b&&a==="dashed"}),style:{"--color-bg":k,"--color-border":k}}),y.createElement("div",{className:d("flex flex-1 justify-between leading-none",b?"items-end":"items-center")},y.createElement("div",{className:"grid gap-1.5"},b?f:null,y.createElement("span",{className:"text-muted-foreground"},w?.label||v.name)),v.value&&y.createElement("span",{className:"font-mono font-medium tabular-nums text-foreground"},v.value.toLocaleString()))))})))});ap.displayName="ChartTooltip";var fb=Na.Legend,rp=y.forwardRef(({className:e,hideIcon:t=false,payload:o,verticalAlign:a="bottom",nameKey:n},r)=>{let{config:i}=ep();return o?.length?y.createElement("div",{ref:r,className:d("flex items-center justify-center gap-4",a==="top"?"pb-3":"pt-3",e)},o.filter(l=>l.type!=="none").map(l=>{let s=`${n||l.dataKey||"value"}`,c=vi(i,l,s);return y.createElement("div",{key:l.value,className:d("flex items-center gap-1.5 [&>svg]:h-3 [&>svg]:w-3 [&>svg]:text-muted-foreground")},c?.icon&&!t?y.createElement(c.icon,null):y.createElement("div",{className:"h-2 w-2 shrink-0 rounded-[2px]",style:{backgroundColor:l.color}}),c?.label)})):null});rp.displayName="ChartLegend";function vi(e,t,o){if(typeof t!="object"||t===null)return;let a="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]:a&&o in a&&typeof a[o]=="string"&&(n=a[o]),n in e?e[n]:e[o]}var bb=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"}}),np=y.forwardRef(({className:e,size:t="default",...o},a)=>y.createElement("textarea",{className:d(bb({size:t}),e),ref:a,...o}));np.displayName="Textarea";var yb=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}}),ip=y.forwardRef(({className:e,position:t,variant:o,size:a,sticky:n,leading:r,center:i,trailing:l,children:s,"aria-label":c,...p},m)=>{let u=s==null;return y.createElement("div",{ref:m,role:"toolbar","aria-label":c??"Toolbar","data-gds-part":"toolbar","data-position":t??"top",className:d(yb({position:t,variant:o,size:a,sticky:n}),e),...p},u?y.createElement(y.Fragment,null,y.createElement("div",{"data-gds-part":"toolbar-leading",className:"flex items-center min-w-0"},r),y.createElement("div",{"data-gds-part":"toolbar-center",className:"flex items-center min-w-0 justify-center"},i),y.createElement("div",{"data-gds-part":"toolbar-trailing",className:"flex items-center min-w-0 justify-end"},l)):s)});ip.displayName="Toolbar";var sp=y.forwardRef(({className:e,align:t="leading",...o},a)=>y.createElement("div",{ref:a,"data-gds-part":`toolbar-${t}`,className:d("flex items-center min-w-0",t==="center"&&"justify-center",t==="trailing"&&"justify-end",e),...o}));sp.displayName="ToolbarSlot";var cp=y.createContext(null),yi=y.createContext(0);function dp(){return y.useContext(yi)}function fr(e){let t=y.useContext(cp);if(!t)throw new Error(`<${e}> must be rendered inside a <Sidebar> root.`);return t}var Oo=y.forwardRef(({collapsed:e,defaultCollapsed:t=false,onCollapsedChange:o,collapsible:a=true,variant:n="rail",className:r,style:i,children:l,...s},c)=>{let p=e!==void 0,[m,u]=y.useState(t),g=p?e:m,h=n==="panel",f=()=>{let b=!g;p||u(b),o?.(b);};return y.createElement(ai,{delayDuration:0},y.createElement(cp.Provider,{value:{collapsed:g}},y.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",r),style:h?i:{width:g?"var(--gds-sidebar-collapsed-width, 4rem)":"var(--gds-sidebar-width, 16rem)",...i},...s},l,a&&!h&&y.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?y.createElement(ChevronRight,{className:"h-3 w-3"}):y.createElement(ChevronLeft,{className:"h-3 w-3"})))))});Oo.displayName="Sidebar";var wi=y.forwardRef(({className:e,...t},o)=>{let{collapsed:a}=fr("SidebarHeader");return y.createElement("div",{ref:o,"data-gds-part":"sidebar-header","data-collapsed":a||void 0,className:d("flex shrink-0 items-center border-b border-border",a?"justify-center px-2":"px-3","h-[var(--gds-sidebar-header-height,3.25rem)]",e),...t})});wi.displayName="SidebarHeader";var ki=y.forwardRef(({className:e,...t},o)=>y.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}));ki.displayName="SidebarContent";var Si=y.forwardRef(({className:e,...t},o)=>{let{collapsed:a}=fr("SidebarFooter");return y.createElement("div",{ref:o,"data-gds-part":"sidebar-footer","data-collapsed":a||void 0,className:d("shrink-0 border-t border-border",a?"px-2 py-2":"px-3 py-2",e),...t})});Si.displayName="SidebarFooter";var Ri=y.forwardRef(({title:e,icon:t,trailing:o,collapsible:a=true,defaultExpanded:n=true,titleTransform:r,className:i,children:l,...s},c)=>{let{collapsed:p}=fr("SidebarSection"),[m,u]=y.useState(n),g=!!e&&a;return p?y.createElement("div",{ref:c,"data-gds-part":"sidebar-section",className:d("px-[var(--gds-sidebar-section-px,0.5rem)] space-y-[var(--gds-sidebar-section-gap,0.125rem)]",i),...s},l):y.createElement("div",{ref:c,"data-gds-part":"sidebar-section",className:d("px-[var(--gds-sidebar-section-px,0.5rem)] pb-1",i),...s},e&&(g?y.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")},y.createElement("button",{type:"button",onClick:()=>u(h=>!h),"aria-expanded":m,className:"flex flex-1 items-center gap-2 text-left min-w-0"},t,y.createElement("span",{className:d("flex-1 text-left truncate",r==="uppercase"?"uppercase":"normal-case")},e),m?y.createElement(ChevronDown,{className:"h-3 w-3 shrink-0",strokeWidth:1.5}):y.createElement(ChevronRight,{className:"h-3 w-3 shrink-0",strokeWidth:1.5})),o&&y.createElement("span",{className:"flex items-center shrink-0",onClick:h=>h.stopPropagation(),onKeyDown:h=>h.stopPropagation()},o)):y.createElement("div",{className:d("flex items-center gap-2 px-2 py-1.5 text-xs font-medium tracking-wide",r==="none"?"":"uppercase","text-muted-foreground")},t,y.createElement("span",{className:"flex-1 truncate"},e),o&&y.createElement("span",{className:"shrink-0"},o))),m&&y.createElement("div",{className:d("mt-[var(--gds-sidebar-section-gap,0.125rem)]","space-y-[var(--gds-sidebar-section-gap,0.125rem)]")},l))});Ri.displayName="SidebarSection";var Ci=y.forwardRef(({icon:e,badge:t,active:o=false,asButton:a=false,asChild:n=false,disabled:r=false,collapsedLabel:i,size:l="md",description:s,className:c,children:p,...m},u)=>{let{collapsed:g}=fr("SidebarItem"),h=dp(),f=!g&&h>0?{paddingLeft:`calc(0.5rem + ${h} * var(--gds-sidebar-tree-indent, 1.5rem))`}:void 0,b=l==="sm",v=b?"text-xs px-2 py-1":"text-sm px-2 py-1.5",S=b&&!o?"font-normal":"font-medium",x=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",w=!g&&s!=null,k=d("group flex items-center gap-2.5 rounded-md transition-colors",v,S,w&&(b?"py-1.5":"py-2"),g?"justify-center px-2 py-2":null,x,r&&"opacity-50 pointer-events-none",c),C=w?y.createElement("span",{className:"flex min-w-0 flex-1 flex-col gap-0.5 text-left leading-tight"},y.createElement("span",{className:"truncate"},p),y.createElement("span",{className:d("truncate font-normal text-muted-foreground",b?"text-[10px]":"text-[11px]")},s)):y.createElement("span",{className:"flex-1 truncate text-left"},p),E=y.createElement(y.Fragment,null,e&&y.createElement("span",{className:"shrink-0 [&>svg]:h-4 [&>svg]:w-4","aria-hidden":true},e),!g&&C,!g&&t!==void 0&&t!==null&&y.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)),F;if(n)F=y.createElement(Slot,{"data-gds-part":"sidebar-item","data-active":o||void 0,"aria-current":o?"page":void 0,className:k,style:f},p);else if(a){let{href:M,target:N,rel:H,download:Y,hrefLang:se,ping:D,referrerPolicy:V,type:R,..._}=m;F=y.createElement("button",{type:"button","data-gds-part":"sidebar-item","data-active":o||void 0,"aria-current":o?"page":void 0,disabled:r,className:d(k,"w-full text-left"),style:f,..._},E);}else F=y.createElement("a",{ref:u,"data-gds-part":"sidebar-item","data-active":o||void 0,"aria-current":o?"page":void 0,"aria-disabled":r||void 0,className:k,style:f,...m},E);if(!g)return F;let O=i??(typeof p=="string"?p:null);return O?y.createElement(ra,null,y.createElement(na,{asChild:true},F),y.createElement(Bo,{side:"right",sideOffset:8},O,t!=null&&y.createElement("span",{className:"ml-2 inline-flex items-center justify-center rounded bg-foreground/10 px-1.5 py-0 text-[10px]"},t))):F});Ci.displayName="SidebarItem";var Ti=y.forwardRef(function({label:t,icon:o,badge:a,active:n=false,defaultExpanded:r=true,expanded:i,onExpandedChange:l,disabled:s,description:c,trailing:p,className:m,style:u,children:g,...h},f){let{collapsed:b}=fr("SidebarTreeItem"),v=dp(),S=i!==void 0,[x,w]=y.useState(r),k=S?i:x,C=()=>{let F=!k;S||w(F),l?.(F);};if(b)return y.createElement(yi.Provider,{value:v},g);let E=v*1.5;return y.createElement("div",{"data-gds-part":"sidebar-tree-item"},y.createElement("div",{className:"group/row relative"},y.createElement("button",{ref:f,type:"button",onClick:C,"aria-expanded":k,"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",p!=null&&"pr-12",m),style:{paddingLeft:`calc(0.25rem + ${E}rem)`,paddingRight:p!=null?"3rem":"0.5rem",...u},...h},y.createElement("span",{className:"inline-flex h-4 w-4 items-center justify-center text-muted-foreground shrink-0","aria-hidden":true},k?y.createElement(ChevronDown,{className:"h-3 w-3"}):y.createElement(ChevronRight,{className:"h-3 w-3"})),o&&y.createElement("span",{className:"shrink-0 [&>svg]:h-4 [&>svg]:w-4","aria-hidden":true},o),c!=null?y.createElement("span",{className:"flex min-w-0 flex-1 flex-col gap-0.5 text-left leading-tight"},y.createElement("span",{className:"truncate"},t),y.createElement("span",{className:"truncate text-[11px] font-normal text-muted-foreground"},c)):y.createElement("span",{className:"flex-1 truncate text-left"},t),a!=null&&y.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"},a)),p!=null&&y.createElement("div",{onClick:F=>F.stopPropagation(),className:"pointer-events-auto absolute inset-y-0 right-1.5 flex items-center gap-0.5"},p)),k&&g&&y.createElement(yi.Provider,{value:v+1},y.createElement("div",{className:"space-y-[var(--gds-sidebar-section-gap,0.125rem)]"},g)))});Ti.displayName="SidebarTreeItem";Oo.Header=wi;Oo.Content=ki;Oo.Footer=Si;Oo.Section=Ri;Oo.Item=Ci;Oo.TreeItem=Ti;var Mo=[50,100,200,300,400,500,600,700,800,900,950],pp=[.985,.955,.895,.82,.72,.61,.51,.415,.325,.245,.17],kb=[.015,.04,.075,.11,.14,.17,.17,.15,.12,.08,.04];function no({hue:e,chromaScale:t=1}){let o=(e%360+360)%360,a={};for(let n=0;n<Mo.length;n++){let r=pp[n],i=kb[n]*t;a[Mo[n]]=`${r.toFixed(4)} ${i.toFixed(4)} ${o.toFixed(2)}`;}return a}function up(){let e={};for(let t=0;t<Mo.length;t++){let o=pp[t];e[Mo[t]]=`${o.toFixed(4)} 0 0`;}return e}var wn={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"}},hr="1 0 0",mp="0 0 0";function Ea(e,t){let[,o,a]=e.split(/\s+/).map(p=>p.trim()),n=Number(o),r=a;if(t==="light"){let m=Math.min(n*.22,.045),u=.38,g=n;return {soft:`${.965.toFixed(3)} ${m.toFixed(3)} ${r}`,deep:`${u.toFixed(3)} ${g.toFixed(3)} ${r}`}}let i=.22,l=Math.min(n*.45,.075),s=.82,c=n*.9;return {soft:`${i.toFixed(3)} ${l.toFixed(3)} ${r}`,deep:`${s.toFixed(3)} ${c.toFixed(3)} ${r}`}}var Pi={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 gp="custom:";function fp(e){return e.startsWith(gp)?e.slice(gp.length):null}var hp={sans:"system-ui, sans-serif",serif:"Georgia, serif",mono:"ui-monospace, monospace"};var Tb=["superLight","light","dark","superDark"],Pb={muted:.6,default:1,vibrant:1.3};function Mb(e,t,o){let a=t.primary*o,n=t.accent*o,r=(a+n)/2*.8,i=l=>(l%360+360)%360;return {1:`0.600 ${(.17*a).toFixed(4)} ${e.primary.toFixed(2)}`,2:`0.640 ${(.17*r).toFixed(4)} ${i(e.primary+140).toFixed(2)}`,3:`0.580 ${(.17*r).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 ne=e=>({source:"neutral",step:e}),Ot=e=>({source:"primary",step:e}),Go=e=>({source:"accent",step:e}),br=e=>({source:"pure",value:e}),Nb={superLight:{background:ne(50),foreground:ne(800),card:br(hr),cardForeground:ne(800),popover:br(hr),popoverForeground:ne(800),primary:Ot(600),primaryForeground:Ot(50),secondary:ne(100),secondaryForeground:ne(700),muted:ne(100),mutedForeground:ne(500),accent:Go(600),accentForeground:Go(50),border:ne(200),input:ne(200),ring:Ot(500)},light:{background:ne(50),foreground:ne(950),card:br(hr),cardForeground:ne(950),popover:br(hr),popoverForeground:ne(950),primary:Ot(500),primaryForeground:Ot(50),secondary:ne(100),secondaryForeground:ne(700),muted:ne(100),mutedForeground:ne(500),accent:Go(500),accentForeground:Go(50),border:ne(200),input:ne(200),ring:Ot(500)},dark:{background:ne(950),foreground:ne(50),card:ne(900),cardForeground:ne(50),popover:ne(900),popoverForeground:ne(50),primary:Ot(400),primaryForeground:Ot(950),secondary:ne(800),secondaryForeground:ne(200),muted:ne(800),mutedForeground:ne(400),accent:Go(400),accentForeground:Go(950),border:ne(800),input:ne(800),ring:Ot(400)},superDark:{background:br(mp),foreground:ne(100),card:ne(950),cardForeground:ne(100),popover:ne(950),popoverForeground:ne(100),primary:Ot(300),primaryForeground:Ot(950),secondary:ne(900),secondaryForeground:ne(300),muted:ne(900),mutedForeground:ne(500),accent:Go(300),accentForeground:Go(950),border:ne(900),input:ne(900),ring:Ot(300)}};function at(e,t){return e.source==="pure"?e.value:t[e.source][e.step]}function Eb(e,t,o){let a=Nb[t],n=t==="superLight"||t==="light",r=n?wn.light:wn.dark;return {background:at(a.background,e),foreground:at(a.foreground,e),card:at(a.card,e),cardForeground:at(a.cardForeground,e),popover:at(a.popover,e),popoverForeground:at(a.popoverForeground,e),primary:at(a.primary,e),primaryForeground:at(a.primaryForeground,e),secondary:at(a.secondary,e),secondaryForeground:at(a.secondaryForeground,e),muted:at(a.muted,e),mutedForeground:at(a.mutedForeground,e),accent:at(a.accent,e),accentForeground:at(a.accentForeground,e),border:at(a.border,e),input:at(a.input,e),ring:o&&a.ring.source!=="pure"?o[a.ring.step]:at(a.ring,e),destructive:r.destructive,destructiveForeground:r.destructiveFg,success:r.success,warning:r.warning,info:r.info,highlight:r.highlight,...(()=>{let i=n?"light":"dark",l=Ea(r.destructive,i),s=Ea(r.success,i),c=Ea(r.warning,i),p=Ea(r.info,i),m=Ea(r.highlight,i);return {destructiveSoft:l.soft,destructiveDeep:l.deep,successSoft:s.soft,successDeep:s.deep,warningSoft:c.soft,warningDeep:c.deep,infoSoft:p.soft,infoDeep:p.deep,highlightSoft:m.soft,highlightDeep:m.deep}})()}}var Lb={display:3.75,h1:2.5,h2:2,h3:1.5,h4:1.25,h5:1.125,h6:1,body:1,bodySm:.875},Ni={compact:.85,default:1,spacious:1.18},Db=Object.fromEntries(GDS_MODULAR_SCALES.map(e=>[e.id,e.ratio])),Ab=.625,Ib=1.02,Hb=1.8,vp=(e,t,o)=>Math.min(o,Math.max(t,e)),Fb={"2xs":1.455,xs:1.333,sm:1.429,base:1.5,lg:1.556,xl:1.4,"2xl":1.333,"3xl":1.2,"4xl":1.111,"5xl":1,"6xl":1,"7xl":1};function zb(e){if(e in Ni){let o=Ni[e];return Object.fromEntries(Object.entries(Lb).map(([a,n])=>[a,n*o]))}let t=yp(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 yp(e){let t=vp(Db[e],Ib,Hb);return modularTypeSizes(1,t,Ab)}function Mi(e,t,o){let a=fp(e);if(a===null)return Pi[e]??Pi.system;let r=t?.find(i=>i.family===a)?.category??o;return `"${a}", ${hp[r]}`}function Bb(e){let t=zb(e.scale),o=n=>`${n.toFixed(3)}rem`,a;if(!(e.scale in Ni)){let n=yp(e.scale);a=Object.fromEntries(GDS_TYPE_SIZE_NAMES.map(r=>[r,{size:o(n[r]),lineHeight:String(Fb[r])}]));}return {fontSans:Mi(e.body,e.customFonts,"sans"),fontMono:Mi(e.mono,e.customFonts,"mono"),fontDisplay:Mi(e.display,e.customFonts,"sans"),fontFaces:e.customFonts,headingWeight:e.headingWeight??600,bodyWeight:e.bodyWeight??400,headingTracking:e.headingTracking??"-0.01em",bodyStretch:e.bodyStretch??"normal",displayStretch:e.displayStretch??e.bodyStretch??"normal",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)},namedScale:a}}var Vb={sharp:0,subtle:.25,soft:.5,round:.875,pill:1.25};function _b(e){let t=Vb[e.style],o=a=>`${a.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 bp={tight:.85,default:1,roomy:1.2},Ob=.25,Gb=.125;function Wb(e){let t=vp(bp[e.density],.6,1.6),o=Math.max(Gb,Math.round(Ob*t*1e4)/1e4);return {baseUnit:"1rem",densityFactor:bp[e.density],unit:`${o}rem`}}var Ub={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 $b(e){let t=e?.shadows??"default",o=e?.motionIntensity??1,a=n=>`${Math.round(n*o)}ms`;return {shadows:Ub[t],motion:{fast:a(150),base:a(200),slow:a(300),slower:a(500)},borderWidth:e?.borderWidth??"1px"}}function la(e){let t=Pb[e.intensity??"default"],o=e.neutralPureGray??false,a=(e.chroma?.neutral??.08)*t,n=(e.chroma?.primary??1)*t,r=(e.chroma?.accent??1)*t,i=o?up():no({hue:e.hues.neutral,chromaScale:a}),l=no({hue:e.hues.primary,chromaScale:n}),s=no({hue:e.hues.accent,chromaScale:r}),c={neutral:i,primary:l,accent:s},p=Mb(e.hues,{primary:n,accent:r},t),m=e.ring?.hue!=null?no({hue:e.ring.hue,chromaScale:n}):e.ring?.source&&e.ring.source!=="primary"?c[e.ring.source]:void 0,u=Object.fromEntries(Tb.map(k=>[k,Eb(c,k,m)])),g=k=>parseFloat(k.trim().split(/\s+/)[2]??"0"),h=wn.light,f={success:no({hue:g(h.success)}),warning:no({hue:g(h.warning)}),info:no({hue:g(h.info)}),highlight:no({hue:g(h.highlight)}),destructive:no({hue:g(h.destructive)})},b=Bb(e.typography),v=_b(e.radius),S=Wb(e.spacing),x=$b(e.effects),w={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,roleRamps:f,colors:u,chart:p,typography:b,radius:v,spacing:S,effects:x,components:w}}var vr={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"}},Ei={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"}},kn=[vr,Ei];function jb(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 Ai(e,t){let o=e.colors[t],a={...jb(o),...Li("neutral",e.ramps.neutral),...Li("primary",e.ramps.primary),...Li("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],...Kb(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,"--font-body-stretch":e.typography.bodyStretch??"normal","--font-display-stretch":e.typography.displayStretch??"normal","--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),"--spacing":e.spacing.unit??"0.25rem","--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};if(e.typography.namedScale)for(let[r,i]of Object.entries(e.typography.namedScale))a[`--text-${r}`]=i.size,a[`--text-${r}--line-height`]=i.lineHeight;let n=[["primary",e.ramps.primary],["accent",e.ramps.accent],["neutral",e.ramps.neutral],["success",e.roleRamps?.success],["warning",e.roleRamps?.warning],["info",e.roleRamps?.info],["highlight",e.roleRamps?.highlight],["destructive",e.roleRamps?.destructive]];for(let[r,i]of n)if(i)for(let l of Mo)a[`--gds-${r}-${l}`]=i[l];return a}function Kb(e){let t=l=>parseFloat(l.trim().split(/\s+/)[2]??"0"),o=l=>(l%360+360)%360,a=t(e.ramps.primary[500]),n=t(e.ramps.accent[500]),r=[a,n,a+45,n+60,a+150,n-75,a+210,n+165].map(o),i={};return r.forEach((l,s)=>{let c=(.68+s%3*.02).toFixed(3);i[`--brand-${s+1}`]=`${c} 0.200 ${l.toFixed(2)}`;}),i}function Li(e,t){let o={};for(let a of Mo)o[`--ramp-${e}-${a}`]=t[a];return o}var Di="gds-theme-fonts";function xp(e){return !e||e.length===0?"":e.map(t=>{let o=t.format?`url("${t.url}") format("${t.format}")`:`url("${t.url}")`;return ["@font-face {",` font-family: "${t.family.replace(/"/g,"")}";`,` src: ${o};`,` font-weight: ${t.weight??"100 900"};`,` font-stretch: ${t.stretch??"50% 200%"};`,` font-style: ${t.style??"normal"};`," font-display: swap;","}"].join(`
123
123
  `)}).join(`
124
- `)}function tp(e,t=typeof document>"u"?void 0:document){if(!t)return;let o=ep(e),r=t.getElementById(ni);if(!o){r?.remove();return}r||(r=t.createElement("style"),r.id=ni,t.head.appendChild(r)),r.textContent!==o&&(r.textContent=o);}function Ya(e,t){if(typeof document>"u")return;let o=document.documentElement,r=ii(e,t);for(let[n,a]of Object.entries(r))o.style.setProperty(n,a);tp(e.typography.fontFaces,document),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 oa(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(s=>Math.max(0,Math.min(255,s)).toString(16).padStart(2,"0")).join("").toUpperCase()}function cb(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=oa(e);return {oklch:a,hex:i}}function si(e,t,o){let r=[`### ${e} ramp (hue ${Math.round(o)}\xB0)`,"","| Step | OKLCH | Hex |","|------|-------|-----|"];for(let n of xo){let{oklch:a,hex:i}=cb(t[n]);r.push(`| ${n} | \`${a}\` | \`${i||"\u2014"}\` |`);}return r.join(`
125
- `)}function op(e,t){let o=[`### ${e}`,"","| Token | Usage | Light (hex) | Dark (hex) |","|-------|-------|-------------|------------|"];for(let r of t){let n=oa(r.light)||"\u2014",a=oa(r.dark)||"\u2014";o.push(`| \`--${r.token}\` | ${r.usage} | \`${n}\` (\`${r.light}\`) | \`${a}\` (\`${r.dark}\`) |`);}return o.join(`
126
- `)}function rp(e){return !e||e.input==null?"{}":JSON.stringify(e.input,null,2)??"{}"}function ap(e){let{input:t,ramps:o,colors:r,chart:n,typography:a,radius:i,spacing:s,effects:l,components:d}=e,p=t.intensity??"default",m=h=>({token:h,usage:db[h]??"",light:r.light[h],dark:r.dark[h]}),u=["background","foreground","card","cardForeground","popover","popoverForeground","primary","primaryForeground","secondary","secondaryForeground","muted","mutedForeground","accent","accentForeground","border","input","ring"].map(m),b=["destructive","destructiveForeground","success","warning","info","highlight"].map(m),f=[1,2,3,4,5].map(h=>{let g=n[h];return {slot:h,triplet:g,hex:oa(g)||"\u2014"}});return `# ${e.name} \u2014 Grade Design System Theme
124
+ `)}function wp(e,t=typeof document>"u"?void 0:document){if(!t)return;let o=xp(e),a=t.getElementById(Di);if(!o){a?.remove();return}a||(a=t.createElement("style"),a.id=Di,t.head.appendChild(a)),a.textContent!==o&&(a.textContent=o);}function Sn(e,t){if(typeof document>"u")return;let o=document.documentElement,a=Ai(e,t);for(let[n,r]of Object.entries(a))o.style.setProperty(n,r);wp(e.typography.fontFaces,document),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 yr(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 a=o.match(/\d+/g);if(!a||a.length<3)return "";let[n,r,i]=a.slice(0,3).map(Number);return "#"+[n,r,i].map(l=>Math.max(0,Math.min(255,l)).toString(16).padStart(2,"0")).join("").toUpperCase()}function qb(e){let t=e.trim().split(/\s+/);if(t.length<3)return {oklch:e,hex:""};let[o,a,n]=t.map(Number),r=`${o.toFixed(3)} ${a.toFixed(3)} ${Math.round(n)}`,i=yr(e);return {oklch:r,hex:i}}function Ii(e,t,o){let a=[`### ${e} ramp (hue ${Math.round(o)}\xB0)`,"","| Step | OKLCH | Hex |","|------|-------|-----|"];for(let n of Mo){let{oklch:r,hex:i}=qb(t[n]);a.push(`| ${n} | \`${r}\` | \`${i||"\u2014"}\` |`);}return a.join(`
125
+ `)}function kp(e,t){let o=[`### ${e}`,"","| Token | Usage | Light (hex) | Dark (hex) |","|-------|-------|-------------|------------|"];for(let a of t){let n=yr(a.light)||"\u2014",r=yr(a.dark)||"\u2014";o.push(`| \`--${a.token}\` | ${a.usage} | \`${n}\` (\`${a.light}\`) | \`${r}\` (\`${a.dark}\`) |`);}return o.join(`
126
+ `)}function Sp(e){return !e||e.input==null?"{}":JSON.stringify(e.input,null,2)??"{}"}function Rp(e){let{input:t,ramps:o,colors:a,chart:n,typography:r,radius:i,spacing:l,effects:s,components:c}=e,p=t.intensity??"default",m=f=>({token:f,usage:Yb[f]??"",light:a.light[f],dark:a.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:yr(b)||"\u2014"}});return `# ${e.name} \u2014 Grade Design System Theme
127
127
 
128
128
  > **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.
129
129
 
@@ -137,7 +137,7 @@ ${t.description?`- **Description**: ${t.description}
137
137
  - **Typography**: ${t.typography.display} display \xB7 ${t.typography.body} body \xB7 ${t.typography.mono} mono \xB7 scale \`${t.typography.scale}\`
138
138
  - **Spacing density**: \`${t.spacing.density}\`
139
139
  - **Radius style**: \`${t.radius.style}\` (base \`${i.base}\`)
140
- - **Button shape**: \`${d.buttonShape}\` \xB7 **Input style**: \`${d.inputStyle}\` \xB7 **Card style**: \`${d.cardStyle}\`
140
+ - **Button shape**: \`${c.buttonShape}\` \xB7 **Input style**: \`${c.inputStyle}\` \xB7 **Card style**: \`${c.cardStyle}\`
141
141
  - **Shadow preset**: \`${t.effects?.shadows??"default"}\` \xB7 **Motion intensity**: \`${t.effects?.motionIntensity??1}\`
142
142
 
143
143
  ## How themes work
@@ -153,30 +153,30 @@ A \`ThemeInput\` is a small object (three hues plus a handful of presets). The g
153
153
  ## Full ThemeInput (round-trippable)
154
154
 
155
155
  \`\`\`json
156
- ${rp(e)}
156
+ ${Sp(e)}
157
157
  \`\`\`
158
158
 
159
159
  ## Color ramps
160
160
 
161
161
  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.
162
162
 
163
- ${si("Neutral",o.neutral,t.hues.neutral)}
163
+ ${Ii("Neutral",o.neutral,t.hues.neutral)}
164
164
 
165
- ${si("Primary",o.primary,t.hues.primary)}
165
+ ${Ii("Primary",o.primary,t.hues.primary)}
166
166
 
167
- ${si("Accent",o.accent,t.hues.accent)}
167
+ ${Ii("Accent",o.accent,t.hues.accent)}
168
168
 
169
169
  ## Semantic tokens (hue-derived)
170
170
 
171
171
  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.
172
172
 
173
- ${op("Core semantic tokens",u)}
173
+ ${kp("Core semantic tokens",u)}
174
174
 
175
175
  ## Fixed semantic tokens (not hue-derived)
176
176
 
177
177
  Status colors stay consistent across themes so users always read green as success, red as destructive, etc. Accessibility wins over brand cohesion.
178
178
 
179
- ${op("Status colors",b)}
179
+ ${kp("Status colors",g)}
180
180
 
181
181
  ## Chart palette
182
182
 
@@ -184,31 +184,31 @@ ${op("Status colors",b)}
184
184
 
185
185
  | Slot | OKLCH | Hex |
186
186
  |------|-------|-----|
187
- ${f.map(h=>`| \`--chart-${h.slot}\` | \`${h.triplet}\` | \`${h.hex}\` |`).join(`
187
+ ${h.map(f=>`| \`--chart-${f.slot}\` | \`${f.triplet}\` | \`${f.hex}\` |`).join(`
188
188
  `)}
189
189
 
190
190
  ## Typography
191
191
 
192
- - **Display font**: \`${a.fontDisplay}\`
193
- - **Body font**: \`${a.fontSans}\`
194
- - **Mono font**: \`${a.fontMono}\`
195
- - **Heading weight**: \`${a.headingWeight}\`
196
- - **Body weight**: \`${a.bodyWeight}\`
197
- - **Heading letter-spacing**: \`${a.headingTracking}\`
192
+ - **Display font**: \`${r.fontDisplay}\`
193
+ - **Body font**: \`${r.fontSans}\`
194
+ - **Mono font**: \`${r.fontMono}\`
195
+ - **Heading weight**: \`${r.headingWeight}\`
196
+ - **Body weight**: \`${r.bodyWeight}\`
197
+ - **Heading letter-spacing**: \`${r.headingTracking}\`
198
198
 
199
199
  ### Type scale
200
200
 
201
201
  | Step | Size |
202
202
  |------|------|
203
- | \`text-display\` | \`${a.scale.display}\` |
204
- | \`text-h1\` | \`${a.scale.h1}\` |
205
- | \`text-h2\` | \`${a.scale.h2}\` |
206
- | \`text-h3\` | \`${a.scale.h3}\` |
207
- | \`text-h4\` | \`${a.scale.h4}\` |
208
- | \`text-h5\` | \`${a.scale.h5}\` |
209
- | \`text-h6\` | \`${a.scale.h6}\` |
210
- | body | \`${a.scale.body}\` |
211
- | body-sm | \`${a.scale.bodySm}\` |
203
+ | \`text-display\` | \`${r.scale.display}\` |
204
+ | \`text-h1\` | \`${r.scale.h1}\` |
205
+ | \`text-h2\` | \`${r.scale.h2}\` |
206
+ | \`text-h3\` | \`${r.scale.h3}\` |
207
+ | \`text-h4\` | \`${r.scale.h4}\` |
208
+ | \`text-h5\` | \`${r.scale.h5}\` |
209
+ | \`text-h6\` | \`${r.scale.h6}\` |
210
+ | body | \`${r.scale.body}\` |
211
+ | body-sm | \`${r.scale.bodySm}\` |
212
212
 
213
213
  ## Radius, spacing, effects
214
214
 
@@ -226,17 +226,17 @@ ${f.map(h=>`| \`--chart-${h.slot}\` | \`${h.triplet}\` | \`${h.hex}\` |`).join(`
226
226
 
227
227
  ### Spacing
228
228
 
229
- - **Density factor**: \`${s.densityFactor}\` (applied as \`var(--gds-density)\` on components that opt in)
230
- - **Base unit**: \`${s.baseUnit}\`
229
+ - **Density factor**: \`${l.densityFactor}\` (applied as \`var(--gds-density)\` on components that opt in)
230
+ - **Base unit**: \`${l.baseUnit}\`
231
231
 
232
232
  ### Motion
233
233
 
234
234
  | Var | Duration |
235
235
  |-----|----------|
236
- | \`--gds-transition-fast\` | \`${l.motion.fast}\` |
237
- | \`--gds-transition-base\` | \`${l.motion.base}\` |
238
- | \`--gds-transition-slow\` | \`${l.motion.slow}\` |
239
- | \`--gds-transition-slower\` | \`${l.motion.slower}\` |
236
+ | \`--gds-transition-fast\` | \`${s.motion.fast}\` |
237
+ | \`--gds-transition-base\` | \`${s.motion.base}\` |
238
+ | \`--gds-transition-slow\` | \`${s.motion.slow}\` |
239
+ | \`--gds-transition-slower\` | \`${s.motion.slower}\` |
240
240
 
241
241
  ### Shadows
242
242
 
@@ -244,10 +244,10 @@ All shadows are applied via Tailwind's \`shadow-*\` utilities mapped to these va
244
244
 
245
245
  | Var | Value |
246
246
  |-----|-------|
247
- | \`--gds-shadow-sm\` | \`${l.shadows.sm}\` |
248
- | \`--gds-shadow-md\` | \`${l.shadows.md}\` |
249
- | \`--gds-shadow-lg\` | \`${l.shadows.lg}\` |
250
- | \`--gds-shadow-xl\` | \`${l.shadows.xl}\` |
247
+ | \`--gds-shadow-sm\` | \`${s.shadows.sm}\` |
248
+ | \`--gds-shadow-md\` | \`${s.shadows.md}\` |
249
+ | \`--gds-shadow-lg\` | \`${s.shadows.lg}\` |
250
+ | \`--gds-shadow-xl\` | \`${s.shadows.xl}\` |
251
251
 
252
252
  ## CSS variable conventions
253
253
 
@@ -255,8 +255,8 @@ Every color is stored as a bare \`L C H\` OKLCH triplet and wrapped at call time
255
255
 
256
256
  \`\`\`css
257
257
  :root {
258
- --primary: ${r.light.primary};
259
- --background: ${r.light.background};
258
+ --primary: ${a.light.primary};
259
+ --background: ${a.light.background};
260
260
  }
261
261
  \`\`\`
262
262
 
@@ -305,7 +305,7 @@ Every component accepts a \`className\` for layout tweaks. Variants are passed v
305
305
 
306
306
  When generating UI in the ${e.name} theme, match this character:
307
307
 
308
- ${pb(e)}
308
+ ${Zb(e)}
309
309
 
310
310
  ## Instructions for the generating LLM
311
311
 
@@ -324,7 +324,7 @@ To recreate this theme in code:
324
324
  \`\`\`ts
325
325
  import { generateTheme, applyThemeToRoot, type ThemeInput } from "@gradeui/ui";
326
326
 
327
- const input: ThemeInput = ${rp(e).replace(/\n/g,`
327
+ const input: ThemeInput = ${Sp(e).replace(/\n/g,`
328
328
  `)};
329
329
 
330
330
  const theme = generateTheme(input);
@@ -333,11 +333,11 @@ applyThemeToRoot(theme, "light"); // or "dark" / "superLight" / "superDark"
333
333
 
334
334
  ---
335
335
  *Generated from Grade Design System v1 \xB7 ${new Date().toISOString()}*
336
- `}var db={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 pb(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(`
337
- `)}function li(e){if(typeof window>"u"||typeof document>"u")return;let t=ap(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 to=Object.fromEntries(qa.map(e=>[e.id,Qo(e)])),xr=ta.id;function er(e){if(e in to)return to[e];let t=di(e);if(t)return Qo(t)}function ci(){return [...Object.values(to),...sp()]}var np="grade-user-themes";function Za(){if(typeof localStorage>"u")return {};try{let e=localStorage.getItem(np);if(!e)return {};let t=JSON.parse(e);return t&&typeof t=="object"?t:{}}catch{return {}}}function ip(e){if(!(typeof localStorage>"u"))try{localStorage.setItem(np,JSON.stringify(e));}catch{}}function sp(){return Object.values(Za()).map(Qo)}function di(e){return Za()[e]}function Xa(e){let t=Za();return t[e.id]=e,ip(t),Qo(e)}function pi(e){if(e in to)return;let t=Za();delete t[e],ip(t);}function ub(e,t,o){let r=to[e]?.input??di(e);if(!r)return;let n={...r,id:t,name:o};return Xa(n),n}var ui="grade-theme",Ja="grade-mode",cp=["superLight","light","dark","superDark"],lp=new Set(["dark","superDark"]),mb=`
336
+ `}var Yb={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 Zb(e){let t=[],{input:o,components:a}=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."),a.cardStyle==="outlined"?t.push("- **Cards are outlined**, not shadowed. Rely on borders + spacing for hierarchy."):a.cardStyle==="elevated"?t.push("- **Cards have real elevation.** Use shadows to stack content visually."):a.cardStyle==="glass"&&t.push("- **Glass / frosted cards.** Use translucent surfaces over background imagery or gradients."),a.buttonShape==="pill"&&t.push("- **Buttons are pills** \u2014 don't override with square corners."),t.join(`
337
+ `)}function Hi(e){if(typeof window>"u"||typeof document>"u")return;let t=Rp(e),o=new Blob([t],{type:"text/markdown;charset=utf-8"}),a=URL.createObjectURL(o),n=document.createElement("a");n.href=a,n.download=`grade-theme-${e.input.id}.md`,document.body.appendChild(n),n.click(),document.body.removeChild(n),URL.revokeObjectURL(a);}var io=Object.fromEntries(kn.map(e=>[e.id,la(e)])),La=vr.id;function ca(e){if(e in io)return io[e];let t=zi(e);if(t)return la(t)}function Fi(){return [...Object.values(io),...Pp()]}var Cp="grade-user-themes";function Rn(){if(typeof localStorage>"u")return {};try{let e=localStorage.getItem(Cp);if(!e)return {};let t=JSON.parse(e);return t&&typeof t=="object"?t:{}}catch{return {}}}function Tp(e){if(!(typeof localStorage>"u"))try{localStorage.setItem(Cp,JSON.stringify(e));}catch{}}function Pp(){return Object.values(Rn()).map(la)}function zi(e){return Rn()[e]}function Cn(e){let t=Rn();return t[e.id]=e,Tp(t),la(e)}function Bi(e){if(e in io)return;let t=Rn();delete t[e],Tp(t);}function Xb(e,t,o){let a=io[e]?.input??zi(e);if(!a)return;let n={...a,id:t,name:o};return Cn(n),n}var Vi="grade-theme",Tn="grade-mode",Np=["superLight","light","dark","superDark"],Mp=new Set(["dark","superDark"]),Jb=`
338
338
  (function() {
339
339
  try {
340
- var mode = localStorage.getItem('${Ja}');
340
+ var mode = localStorage.getItem('${Tn}');
341
341
  var valid = ['superLight','light','dark','superDark'];
342
342
  if (!mode || valid.indexOf(mode) === -1) {
343
343
  mode = window.matchMedia('(prefers-color-scheme: dark)').matches ? 'dark' : 'light';
@@ -346,28 +346,28 @@ applyThemeToRoot(theme, "light"); // or "dark" / "superLight" / "superDark"
346
346
  document.documentElement.classList.add('dark');
347
347
  }
348
348
  document.documentElement.setAttribute('data-mode', mode);
349
- var themeId = localStorage.getItem('${ui}');
349
+ var themeId = localStorage.getItem('${Vi}');
350
350
  if (themeId) document.documentElement.setAttribute('data-grade-theme', themeId);
351
351
  } catch(e) {}
352
352
  })();
353
- `,mi=y.createContext(null);function fb({children:e,defaultTheme:t=xr,defaultMode:o="light"}){let[r,n]=y.useState(t),[a,i]=y.useState(o),[s,l]=y.useState(0);y.useEffect(()=>{try{let h=localStorage.getItem(ui);h&&er(h)&&n(h);let g=localStorage.getItem(Ja);if(g&&cp.includes(g))i(g);else if(typeof window<"u"){let v=window.matchMedia("(prefers-color-scheme: dark)").matches;i(v?"dark":"light");}}catch{}},[]),y.useEffect(()=>{let h=er(r)??er(xr);h&&(Ya(h,a),typeof document<"u"&&document.documentElement.classList.toggle("dark",lp.has(a)));},[r,a,s]),y.useEffect(()=>{if(typeof window>"u")return;let h=window.matchMedia("(prefers-color-scheme: dark)"),g=v=>{try{if(localStorage.getItem(Ja))return}catch{return}i(v.matches?"dark":"light");};return h.addEventListener("change",g),()=>h.removeEventListener("change",g)},[]);let d=y.useCallback(h=>{n(h);try{localStorage.setItem(ui,h);}catch{}},[]),p=y.useCallback(h=>{i(h);try{localStorage.setItem(Ja,h);}catch{}},[]),m=y.useCallback(h=>{Xa(h),l(g=>g+1),d(h.id);},[d]),u=y.useCallback(h=>{h in to||(pi(h),l(g=>g+1),n(g=>g===h?xr:g));},[]),b=y.useCallback(()=>{l(h=>h+1);},[]),f=y.useMemo(()=>{let h=er(r)??er(xr);return {theme:h,themeId:h.id,mode:a,isDark:lp.has(a),setThemeId:d,setMode:p,themes:ci(),saveAndActivate:m,deleteTheme:u,refresh:b}},[r,a,s,d,p,m,u,b]);return y.createElement(mi.Provider,{value:f},e)}function fi(){let e=y.useContext(mi);if(!e)throw new Error("useGradeTheme must be used inside <GradeThemeProvider>. Wrap your app (typically in app/layout.tsx).");return e}function tr(){return y.useContext(mi)}var gi=y.createContext(null);function dp(){return y.useContext(gi)}var Eb={maplibre:()=>Promise.resolve().then(()=>(hp(),gp)).then(e=>e.createMaplibreAdapter),mapbox:()=>Promise.resolve().then(()=>(xp(),yp)).then(e=>e.createMapboxAdapter),google:()=>Promise.resolve().then(()=>(Sp(),kp)).then(e=>e.createGoogleAdapter),leaflet:()=>Promise.resolve().then(()=>(Pp(),Tp)).then(e=>e.createLeafletAdapter)},Lb=500,hi=y.forwardRef(function(t,o){let{center:r,zoom:n,bounds:a,appearance:i="auto",interactive:s=true,tools:l="auto",toolsPosition:d="top-left",hoveredId:p,onHoveredIdChange:m,onLoad:u,onError:b,className:f,style:h,children:g,...v}=t,x=globalThis.__gradeMapProvider??v.provider??"leaflet",w=v.styleUrl,S=v.tilerKey,T=v.accessToken,L=v.apiKey,B=v.mapId,V=y.useRef(null),N=y.useRef(null),A=y.useRef(new globalThis.Map),F=y.useRef(null),[Q,ge]=y.useState(false),I=y.useRef(m),ee=y.useRef(b),R=y.useRef(u);y.useEffect(()=>{I.current=m,ee.current=b,R.current=u;});let O=tr(),fe=O!=null,[ve,U]=y.useState(false);y.useEffect(()=>{if(fe||typeof document>"u")return;let ie=document.documentElement,C=()=>U(ie.classList.contains("dark"));C();let K=new MutationObserver(C);return K.observe(ie,{attributes:true,attributeFilter:["class"]}),()=>K.disconnect()},[fe]);let ae=O?.isDark??ve,xe=i==="auto"?ae?"dark":"light":i;y.useEffect(()=>{let ie=false,C=V.current;if(!C)return;let K=i==="auto"?ae?"dark":"light":i;return (async()=>{try{let G=await Eb[x]();if(ie)return;let Se=await G(C,{center:r,zoom:n,bounds:a,appearance:K,interactive:s,tools:l,toolsPosition:d,styleUrl:w,tilerKey:S,accessToken:T,apiKey:L,mapId:B},{onLoad:()=>{},onError:W=>ee.current?.(W),onMarkerHover:W=>I.current?.(W),onMarkerClick:()=>{}});if(ie){Se.destroy();return}N.current=Se,ge(!0),R.current?.(Mp(N,A));}catch(G){if(ie)return;G?.code||ee.current?.({code:"provider-init-failed",message:G?.message??"Map init failed",cause:G});}})(),()=>{ie=true,N.current?.destroy(),N.current=null,ge(false),A.current.clear(),F.current=null;}},[x,w,T,L,B,S,l,d]),y.useEffect(()=>{N.current?.setAppearance(xe);},[xe]),y.useEffect(()=>{N.current?.setInteractive(s);},[s]),y.useEffect(()=>{N.current&&(a?N.current.setBounds(a[0],a[1]):(N.current.setCenter(r),N.current.setZoom(n)));},[r[0],r[1],n,a?.[0]?.[0],a?.[0]?.[1],a?.[1]?.[0],a?.[1]?.[1]]),y.useEffect(()=>{let ie=F.current;ie&&ie!==p&&A.current.get(ie)?.setHovered(false),p&&A.current.get(p)?.setHovered(true),F.current=p??null;},[p]),y.useImperativeHandle(o,()=>Mp(N,A),[]);let Te=y.useMemo(()=>({registerMarker:(ie,C,K)=>{let G=N.current;if(!G)return null;let Se=G.addMarker(ie,C,K);A.current.set(ie,Se),process.env.NODE_ENV!=="production"&&A.current.size===Lb+1&&console.warn(`@gradeui/ui Map: rendering ${A.current.size} markers. DOM markers degrade past ~1k. Consider clustering via the .instance escape hatch.`);let W=Se.remove;return Se.remove=()=>{W(),A.current.delete(ie),F.current===ie&&(F.current=null);},p===ie&&Se.setHovered(true),Se}}),[Q]);return y.createElement("div",{ref:V,"data-gds-part":"map",className:c("gds-map relative isolate overflow-hidden",f),style:{borderRadius:"var(--gds-map-radius, var(--radius, 0.5rem))",border:"var(--gds-map-border, 1px solid var(--border, transparent))",...h}},y.createElement(gi.Provider,{value:Te},g))});hi.displayName="Map";function Mp(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 bi=y.memo(function({id:t,at:o,anchor:r="bottom",className:n,children:a,onClick:i}){let s=dp(),[l,d]=y.useState(null),p=y.useRef(null),m=y.useRef(i);return y.useEffect(()=>{m.current=i;}),y.useEffect(()=>{if(!s)return;let u=s.registerMarker(t,o,r);if(u){p.current=u,d(u.element);let b=f=>{m.current?.({id:t,coords:u.coords,native:f});};return u.element.addEventListener("click",b),()=>{u.element.removeEventListener("click",b),u.remove(),p.current=null,d(null);}}},[s,t]),y.useEffect(()=>{p.current?.setPosition(o);},[o[0],o[1]]),l?createPortal(y.createElement("div",{"data-gds-part":"map-marker-content",className:c("pointer-events-auto",n)},a),l):null});bi.displayName="MapMarker";var Kb={video:"aspect-video",standard:"aspect-[4/3]",square:"aspect-square",portrait:"aspect-[3/4]",wide:"aspect-[21/9]",auto:""},qb={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)"},Yb={album:Disc3,"tv-show":Tv$1,movie:Clapperboard,game:Gamepad2,book:Book,portrait:User,landscape:Mountain,poster:Film,product:Package,food:UtensilsCrossed,video:Video,audio:Music,embed:Code2,"3d":Box,generic:Image},Zb={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 Xb(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 Jb(e){let t=Xb(e),[o,r]=y.useState(0);return y.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)},[]),y.useEffect(()=>{},[o]),!t||typeof window>"u"?false:!!window.__gradeMediaPending?.[t]}function Qb(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 ev(e){return e<64?"sm":e>=160?"lg":"md"}var oo=y.forwardRef(({className:e,aspect:t,radius:o="lg",border:r=false,loading:n=false,onVisibilityChange:a,fallback:i,emptyState:s="auto",hint:l="generic",alt:d,source:p,src:m,glyph:u,overlay:b,instanceId:f,style:h,children:g,...v},k)=>{let x=y.useRef(null);y.useImperativeHandle(k,()=>x.current);let w=l,S=t,T=o,L=r,B=n,V=d,N=m,A=s,F=S??Zb[w];y.useEffect(()=>{if(!a||!x.current)return;let ie=x.current,C=new IntersectionObserver(([K])=>a(K.isIntersecting),{threshold:.05});return C.observe(ie),()=>C.disconnect()},[a]);let Q=N,[ge,I]=y.useState(false);y.useEffect(()=>{I(false);},[Q]);let ee=ge?void 0:Q,R=!g&&A!=="none",[O,fe]=y.useState("md");y.useEffect(()=>{if(!R)return;let ie=x.current;if(!ie)return;let C=new ResizeObserver(([K])=>{let G=K.contentRect.width;fe(ev(G));});return C.observe(ie),()=>C.disconnect()},[R]);let ve=y.useMemo(()=>Qb(V),[V]),U=Yb[w]??Image,ae=A==="auto"||A==="icon",xe=y.useMemo(()=>p?JSON.stringify(p):void 0,[p]),Te=Jb(p)&&!ee;return y.createElement("div",{ref:x,"data-gds-part":"media-surface","data-media-hint":w,"data-media-source-kind":p?.kind,"data-media-source":xe,"data-media-alt":V,"data-gds-instance-id":f,className:c("gds-media-surface relative w-full overflow-hidden",Kb[F],L&&"border border-border",e),style:{borderRadius:`var(--gds-media-radius, ${qb[T]})`,...h},...v},R&&y.createElement("div",{"data-gds-part":"media-surface-placeholder","data-tier":O,"data-filled":ee?"":void 0,"data-fill-pending":Te||void 0,className:c("absolute inset-0 z-0 flex flex-col items-center justify-center gap-2 pointer-events-none px-3 text-center",Te&&"gds-aura-shimmer"),style:{position:"absolute",background:"var(--gds-media-placeholder-bg)",color:"var(--gds-media-placeholder-fg)",...Te?{"--aura-shimmer-duration":"1400ms","--aura-shimmer-delay-between":"400ms"}:null},"aria-hidden":true},ae?O==="sm"?ve?y.createElement("span",{className:"font-semibold text-sm tracking-tight"},ve):y.createElement(U,{className:"h-1/2 w-1/2 max-h-6 max-w-6"}):O==="md"?y.createElement(y.Fragment,null,u??y.createElement(U,{className:"h-1/3 w-1/3 max-h-10 max-w-10"})):y.createElement(y.Fragment,null,u??y.createElement(U,{className:"h-1/4 w-1/4 max-h-12 max-w-12"}),V&&y.createElement("span",{className:"text-xs leading-snug line-clamp-2 max-w-[80%]","data-gds-part":"media-surface-caption"},V)):A),(ee||g)&&y.createElement("div",{"data-gds-part":"media-surface-content",className:"absolute inset-0 z-[1]"},ee&&y.createElement("img",{src:ee,alt:V??"",onError:()=>I(true),className:"absolute inset-0 h-full w-full object-cover","data-gds-part":"media-surface-img"}),g),B&&y.createElement("div",{className:"absolute inset-0 z-[2] flex items-center justify-center bg-muted animate-pulse","aria-hidden":true},i),b&&y.createElement("div",{"data-gds-part":"media-surface-overlay",className:"absolute inset-0 z-10"},b))});oo.displayName="MediaSurface";var Ep=y.forwardRef(({src:e,controls:t=true,autoPlay:o=false,loop:r=false,muted:n,pauseOffscreen:a=true,aspect:i="video",radius:s="lg",border:l=false,poster:d,label:p,className:m,style:u,playbackRate:b=1,objectFit:f="cover"},h)=>{let g=y.useRef(null),v=Co(),[k,x]=y.useState(!!d);y.useImperativeHandle(h,()=>g.current);let w=n??o,S=o&&!v;y.useEffect(()=>{g.current&&(g.current.playbackRate=b);},[b]),y.useEffect(()=>{x(!!d);},[d]);let T=y.useCallback(L=>{!a||!g.current||(L&&S?g.current.play().catch(()=>{}):g.current.pause());},[a,S]);return y.createElement(oo,{aspect:i,radius:s,border:l,"aria-label":p,className:m,style:u,onVisibilityChange:a?T:void 0},y.createElement("video",{ref:g,src:e,controls:t,autoPlay:S,loop:r,muted:w,playsInline:true,preload:S?"auto":"metadata",onPlaying:()=>x(false),className:c("w-full h-full",f==="cover"&&"object-cover",f==="contain"&&"object-contain",f==="fill"&&"object-fill")},"Your browser does not support the video tag."),d&&k&&y.createElement("img",{src:d,alt:"","aria-hidden":"true",loading:"lazy",decoding:"async","data-gds-part":"video-poster",className:c("absolute inset-0 w-full h-full pointer-events-none transition-opacity duration-200",f==="cover"&&"object-cover",f==="contain"&&"object-contain",f==="fill"&&"object-fill")}))});Ep.displayName="VideoPlayer";var Lp=y.forwardRef(({src:e,controls:t=false,autoPlay:o=true,loop:r=true,pauseOffscreen:n=true,aspect:a="square",radius:i="lg",border:s=false,poster:l,label:d,className:p,style:m,stateMachines:u,artboard:b,fit:f="contain",stateMachineInputs:h},g)=>{let v=Co(),[k,x]=y.useState(null),[w,S]=y.useState(null);return y.useEffect(()=>{let T=false;return import('@rive-app/react-canvas').then(L=>{T||x(L);}).catch(()=>{T||S("Rive runtime not installed. Run `npm install @rive-app/react-canvas`.");}),()=>{T=true;}},[]),y.createElement(oo,{ref:g,aspect:a,radius:i,border:s,"aria-label":d,className:p,style:m},w?y.createElement("div",{className:"flex items-center justify-center h-full text-sm text-muted-foreground p-4 text-center"},w):k&&e?y.createElement(rv,{Mod:k,src:e,stateMachines:u,artboard:b,fit:f,stateMachineInputs:h,autoPlay:o&&!v,loop:r,pauseOffscreen:n,controls:t,poster:l}):l&&y.createElement("img",{src:l,alt:"",className:"w-full h-full object-contain"}))});Lp.displayName="RivePlayer";function rv({Mod:e,src:t,stateMachines:o,artboard:r,fit:n,autoPlay:a,loop:i,pauseOffscreen:s,controls:l,poster:d}){let{useRive:p,Layout:m,Fit:u,Alignment:b,EventType:f}=e,h={contain:u.Contain,cover:u.Cover,fill:u.Fill,fitWidth:u.FitWidth,fitHeight:u.FitHeight,none:u.None},{rive:g,RiveComponent:v}=p({src:t,stateMachines:o,artboard:r,autoplay:a,layout:new m({fit:h[n],alignment:b.Center})}),[k,x]=y.useState(a);y.useEffect(()=>{if(!g||!i)return;let S=()=>{g.play();};return g.on(f.Stop,S),()=>{g.off(f.Stop,S);}},[g,i,f]),y.useEffect(()=>{if(!s||!g)return;let S=g.canvas;if(!S)return;let T=new IntersectionObserver(([L])=>{L.isIntersecting&&a?g.play():g.pause();},{threshold:.05});return T.observe(S),()=>T.disconnect()},[g,s,a]);let w=()=>{g&&(k?(g.pause(),x(false)):(g.play(),x(true)));};return y.createElement(y.Fragment,null,y.createElement(v,{className:"w-full h-full"}),!g&&d&&y.createElement("img",{src:d,alt:"",className:"absolute inset-0 w-full h-full object-contain pointer-events-none"}),l&&y.createElement("div",{className:c("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")},y.createElement(ut,{size:"icon",variant:"secondary",onClick:w},k?y.createElement(Pause,{className:"h-4 w-4"}):y.createElement(Play,{className:"h-4 w-4"}))))}var av={sm:20,md:28,lg:40,xl:56},nv={horizontal:["horizontal","square","icon"],square:["square","icon","horizontal"],icon:["icon","square","horizontal"]};function iv(e,t,o,r){for(let n of nv[t]){let a=e[n];if(!a)continue;let i=o==="dark"?a.dark??a.light:a.light??a.dark,s=r?a.mono??i:i??a.mono;if(s!=null)return s}return null}var sv=y.forwardRef(function({sources:t={},lockup:o="horizontal",mode:r="light",mono:n=false,size:a="md",label:i,decorative:s=false,href:l,className:d,style:p,...m},u){let b=typeof a=="number"?a:av[a],f=iv(t,o,r,n),h=s?{"aria-hidden":true}:i?l?{}:{role:"img","aria-label":i}:{},g=f??y.createElement(lv,{label:i}),v=y.createElement("span",{className:c("gds-logo inline-flex shrink-0 select-none items-center","[&_img]:h-full [&_img]:w-auto [&_svg]:h-full [&_svg]:w-auto",d),style:{height:b,...p},"data-gds-part":"logo","data-gds-lockup":o,"data-gds-mode":r,...l?{}:h,...l?{}:m},g);return l?y.createElement("a",{ref:u,href:l,"aria-label":s?void 0:i,className:"inline-flex",...s?{"aria-hidden":true}:{},...m},v):y.cloneElement(v,{ref:u})});function lv({label:e}){return y.createElement("svg",{viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e?{}:{"aria-hidden":true}},y.createElement("path",{d:"M28 0L32 4V10L26 4H6L4 6V26L6 28H16L26 18V24L18 32H4L0 28V4L4 0H28ZM32 32H28V18H16V14H32V32Z",fill:"currentColor"}))}var Ap="M28 0L32 4V10L26 4H6L4 6V26L6 28H16L26 18V24L18 32H4L0 28V4L4 0H28ZM32 32H28V18H16V14H32V32Z",cv={sm:16,md:24,lg:32,xl:48},Dp=y.forwardRef(({size:e="md",label:t="Loading\u2026",showLabel:o=false,className:r,style:n,...a},i)=>{let s=typeof e=="number"?e:cv[e],l=y.useId().replace(/[^a-zA-Z0-9-]/g,"");return y.createElement("div",{ref:i,"data-gds-part":"grade-loader",role:"status","aria-label":t||void 0,className:c("gds-grade-loader inline-flex flex-col items-center gap-2",r),style:n,...a},y.createElement("style",null,`
353
+ `,_i=y.createContext(null);function Qb({children:e,defaultTheme:t=La,defaultMode:o="light"}){let[a,n]=y.useState(t),[r,i]=y.useState(o),[l,s]=y.useState(0);y.useEffect(()=>{try{let f=localStorage.getItem(Vi);f&&ca(f)&&n(f);let b=localStorage.getItem(Tn);if(b&&Np.includes(b))i(b);else if(typeof window<"u"){let v=window.matchMedia("(prefers-color-scheme: dark)").matches;i(v?"dark":"light");}}catch{}},[]),y.useEffect(()=>{let f=ca(a)??ca(La);f&&(Sn(f,r),typeof document<"u"&&document.documentElement.classList.toggle("dark",Mp.has(r)));},[a,r,l]),y.useEffect(()=>{if(typeof window>"u")return;let f=window.matchMedia("(prefers-color-scheme: dark)"),b=v=>{try{if(localStorage.getItem(Tn))return}catch{return}i(v.matches?"dark":"light");};return f.addEventListener("change",b),()=>f.removeEventListener("change",b)},[]);let c=y.useCallback(f=>{n(f);try{localStorage.setItem(Vi,f);}catch{}},[]),p=y.useCallback(f=>{i(f);try{localStorage.setItem(Tn,f);}catch{}},[]),m=y.useCallback(f=>{Cn(f),s(b=>b+1),c(f.id);},[c]),u=y.useCallback(f=>{f in io||(Bi(f),s(b=>b+1),n(b=>b===f?La:b));},[]),g=y.useCallback(()=>{s(f=>f+1);},[]),h=y.useMemo(()=>{let f=ca(a)??ca(La);return {theme:f,themeId:f.id,mode:r,isDark:Mp.has(r),setThemeId:c,setMode:p,themes:Fi(),saveAndActivate:m,deleteTheme:u,refresh:g}},[a,r,l,c,p,m,u,g]);return y.createElement(_i.Provider,{value:h},e)}function Oi(){let e=y.useContext(_i);if(!e)throw new Error("useGradeTheme must be used inside <GradeThemeProvider>. Wrap your app (typically in app/layout.tsx).");return e}function da(){return y.useContext(_i)}var Gi=y.createContext(null);function Ep(){return y.useContext(Gi)}var fv={maplibre:()=>Promise.resolve().then(()=>(Fp(),Hp)).then(e=>e.createMaplibreAdapter),mapbox:()=>Promise.resolve().then(()=>(_p(),Vp)).then(e=>e.createMapboxAdapter),google:()=>Promise.resolve().then(()=>(Wp(),Gp)).then(e=>e.createGoogleAdapter),leaflet:()=>Promise.resolve().then(()=>(Kp(),jp)).then(e=>e.createLeafletAdapter)},hv=500,Wi=y.forwardRef(function(t,o){let{center:a,zoom:n,bounds:r,appearance:i="auto",interactive:l=true,tools:s="auto",toolsPosition:c="top-left",hoveredId:p,onHoveredIdChange:m,onLoad:u,onError:g,className:h,style:f,children:b,...v}=t,x=globalThis.__gradeMapProvider??v.provider??"leaflet",w=v.styleUrl,k=v.tilerKey,C=v.accessToken,E=v.apiKey,F=v.mapId,O=y.useRef(null),M=y.useRef(null),N=y.useRef(new globalThis.Map),H=y.useRef(null),[Y,se]=y.useState(false),D=y.useRef(m),V=y.useRef(g),R=y.useRef(u);y.useEffect(()=>{D.current=m,V.current=g,R.current=u;});let _=da(),le=_!=null,[X,U]=y.useState(false);y.useEffect(()=>{if(le||typeof document>"u")return;let de=document.documentElement,T=()=>U(de.classList.contains("dark"));T();let Z=new MutationObserver(T);return Z.observe(de,{attributes:true,attributeFilter:["class"]}),()=>Z.disconnect()},[le]);let J=_?.isDark??X,ke=i==="auto"?J?"dark":"light":i;y.useEffect(()=>{let de=false,T=O.current;if(!T)return;let Z=i==="auto"?J?"dark":"light":i;return (async()=>{try{let $=await fv[x]();if(de)return;let Se=await $(T,{center:a,zoom:n,bounds:r,appearance:Z,interactive:l,tools:s,toolsPosition:c,styleUrl:w,tilerKey:k,accessToken:C,apiKey:E,mapId:F},{onLoad:()=>{},onError:j=>V.current?.(j),onMarkerHover:j=>D.current?.(j),onMarkerClick:()=>{}});if(de){Se.destroy();return}M.current=Se,se(!0),R.current?.(qp(M,N));}catch($){if(de)return;$?.code||V.current?.({code:"provider-init-failed",message:$?.message??"Map init failed",cause:$});}})(),()=>{de=true,M.current?.destroy(),M.current=null,se(false),N.current.clear(),H.current=null;}},[x,w,C,E,F,k,s,c]),y.useEffect(()=>{M.current?.setAppearance(ke);},[ke]),y.useEffect(()=>{M.current?.setInteractive(l);},[l]),y.useEffect(()=>{M.current&&(r?M.current.setBounds(r[0],r[1]):(M.current.setCenter(a),M.current.setZoom(n)));},[a[0],a[1],n,r?.[0]?.[0],r?.[0]?.[1],r?.[1]?.[0],r?.[1]?.[1]]),y.useEffect(()=>{let de=H.current;de&&de!==p&&N.current.get(de)?.setHovered(false),p&&N.current.get(p)?.setHovered(true),H.current=p??null;},[p]),y.useImperativeHandle(o,()=>qp(M,N),[]);let De=y.useMemo(()=>({registerMarker:(de,T,Z)=>{let $=M.current;if(!$)return null;let Se=$.addMarker(de,T,Z);N.current.set(de,Se),process.env.NODE_ENV!=="production"&&N.current.size===hv+1&&console.warn(`@gradeui/ui Map: rendering ${N.current.size} markers. DOM markers degrade past ~1k. Consider clustering via the .instance escape hatch.`);let j=Se.remove;return Se.remove=()=>{j(),N.current.delete(de),H.current===de&&(H.current=null);},p===de&&Se.setHovered(true),Se}}),[Y]);return y.createElement("div",{ref:O,"data-gds-part":"map",className:d("gds-map relative isolate overflow-hidden",h),style:f},y.createElement(Gi.Provider,{value:De},b))});Wi.displayName="Map";function qp(e,t){let o=()=>{};return {flyTo:(a,n)=>{let r=e.current;if(!r)return;let i;if(typeof a=="string"){if(i=t.current.get(a)?.coords??null,!i){console.warn(`@gradeui/ui Map.flyTo: no marker registered with id "${a}".`);return}}else i=a;r.flyTo(i,n);},panTo:(a,n)=>e.current?.panTo(a,n)??o(),fitBounds:(a,n)=>e.current?.fitBounds(a,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 Ui=y.memo(function({id:t,at:o,anchor:a="bottom",className:n,children:r,onClick:i}){let l=Ep(),[s,c]=y.useState(null),p=y.useRef(null),m=y.useRef(i);return y.useEffect(()=>{m.current=i;}),y.useEffect(()=>{if(!l)return;let u=l.registerMarker(t,o,a);if(u){p.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(),p.current=null,c(null);}}},[l,t]),y.useEffect(()=>{p.current?.setPosition(o);},[o[0],o[1]]),s?createPortal(y.createElement("div",{"data-gds-part":"map-marker-content",className:d("pointer-events-auto",n)},r),s):null});Ui.displayName="MapMarker";var Dv={video:"aspect-video",standard:"aspect-[4/3]",square:"aspect-square",portrait:"aspect-[3/4]",wide:"aspect-[21/9]",auto:""},Av={video:"16 / 9",standard:"4 / 3",square:"1 / 1",portrait:"3 / 4",wide:"21 / 9",auto:"auto"},Iv={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)"},Hv={album:Disc3,"tv-show":Tv,movie:Clapperboard,game:Gamepad2,book:Book,portrait:User,landscape:Mountain,poster:Film,product:Package,food:UtensilsCrossed,video:Video,audio:Music,embed:Code2,"3d":Box,generic:Image},Fv={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 zv(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 Bv(e){let t=zv(e),[o,a]=y.useState(0);return y.useEffect(()=>{if(typeof window>"u")return;let n=()=>a(r=>r+1);return window.addEventListener("grade:media-pending-updated",n),()=>window.removeEventListener("grade:media-pending-updated",n)},[]),y.useEffect(()=>{},[o]),!t||typeof window>"u"?false:!!window.__gradeMediaPending?.[t]}function Vv(e){if(!e)return "";let t=/^(the|a|an|and|for|by|of|in|on|at|to)$/i,o=e.trim().split(/\s+/).filter(a=>a&&!t.test(a));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 _v(e){return e<64?"sm":e>=160?"lg":"md"}var so=y.forwardRef(({className:e,aspect:t,radius:o="lg",border:a=false,loading:n=false,onVisibilityChange:r,fallback:i,emptyState:l="auto",hint:s="generic",alt:c,source:p,src:m,glyph:u,overlay:g,instanceId:h,style:f,children:b,...v},S)=>{let x=y.useRef(null);y.useImperativeHandle(S,()=>x.current);let w=s,k=t,C=o,E=a,F=n,O=c,M=m,N=l,H=k??Fv[w],Y=k!=null;y.useEffect(()=>{if(!r||!x.current)return;let T=x.current,Z=new IntersectionObserver(([$])=>r($.isIntersecting),{threshold:.05});return Z.observe(T),()=>Z.disconnect()},[r]);let se=M,[D,V]=y.useState(false);y.useEffect(()=>{V(false);},[se]);let R=D?void 0:se,_=!b&&N!=="none",[le,X]=y.useState("md");y.useEffect(()=>{if(!_)return;let T=x.current;if(!T)return;let Z=new ResizeObserver(([$])=>{let Se=$.contentRect.width;X(_v(Se));});return Z.observe(T),()=>Z.disconnect()},[_]);let U=y.useMemo(()=>Vv(O),[O]),J=Hv[w]??Image,ke=N==="auto"||N==="icon",De=y.useMemo(()=>p?JSON.stringify(p):void 0,[p]),de=Bv(p)&&!R;return y.createElement("div",{ref:x,"data-gds-part":"media-surface","data-media-hint":w,"data-media-source-kind":p?.kind,"data-media-source":De,"data-media-alt":O,"data-gds-instance-id":h,className:d("gds-media-surface relative w-full overflow-hidden",!Y&&Dv[H],E&&"border border-border",e),style:{...Y?{aspectRatio:Av[H]}:{},borderRadius:`var(--gds-media-radius, ${Iv[C]})`,...f},...v},_&&y.createElement("div",{"data-gds-part":"media-surface-placeholder","data-tier":le,"data-filled":R?"":void 0,"data-fill-pending":de||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",de&&"gds-aura-shimmer"),style:{position:"absolute",background:"var(--gds-media-placeholder-bg)",color:"var(--gds-media-placeholder-fg)",...de?{"--aura-shimmer-duration":"1400ms","--aura-shimmer-delay-between":"400ms"}:null},"aria-hidden":true},ke?le==="sm"?U?y.createElement("span",{className:"font-semibold text-sm tracking-tight"},U):y.createElement(J,{className:"h-1/2 w-1/2 max-h-6 max-w-6"}):le==="md"?y.createElement(y.Fragment,null,u??y.createElement(J,{className:"h-1/3 w-1/3 max-h-10 max-w-10"})):y.createElement(y.Fragment,null,u??y.createElement(J,{className:"h-1/4 w-1/4 max-h-12 max-w-12"}),O&&y.createElement("span",{className:"text-xs leading-snug line-clamp-2 max-w-[80%]","data-gds-part":"media-surface-caption"},O)):N),(R||b)&&y.createElement("div",{"data-gds-part":"media-surface-content",className:"absolute inset-0 z-[1]"},R&&y.createElement("img",{src:R,alt:O??"",onError:()=>V(true),className:"absolute inset-0 h-full w-full object-cover","data-gds-part":"media-surface-img"}),b),F&&y.createElement("div",{className:"absolute inset-0 z-[2] flex items-center justify-center bg-muted animate-pulse","aria-hidden":true},i),g&&y.createElement("div",{"data-gds-part":"media-surface-overlay",className:"absolute inset-0 z-10"},g))});so.displayName="MediaSurface";var Zp=y.forwardRef(({src:e,controls:t=true,autoPlay:o=false,loop:a=false,muted:n,pauseOffscreen:r=true,aspect:i="video",radius:l="lg",border:s=false,poster:c,label:p,className:m,style:u,playbackRate:g=1,objectFit:h="cover"},f)=>{let b=y.useRef(null),v=Io(),[S,x]=y.useState(!!c);y.useImperativeHandle(f,()=>b.current);let w=n??o,k=o&&!v;y.useEffect(()=>{b.current&&(b.current.playbackRate=g);},[g]),y.useEffect(()=>{x(!!c);},[c]);let C=y.useCallback(E=>{!r||!b.current||(E&&k?b.current.play().catch(()=>{}):b.current.pause());},[r,k]);return y.createElement(so,{aspect:i,radius:l,border:s,"aria-label":p,className:m,style:u,onVisibilityChange:r?C:void 0},y.createElement("video",{ref:b,src:e,controls:t,autoPlay:k,loop:a,muted:w,playsInline:true,preload:k?"auto":"metadata",onPlaying:()=>x(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&&S&&y.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")}))});Zp.displayName="VideoPlayer";var Xp=y.forwardRef(({src:e,controls:t=false,autoPlay:o=true,loop:a=true,pauseOffscreen:n=true,aspect:r="square",radius:i="lg",border:l=false,poster:s,label:c,className:p,style:m,stateMachines:u,artboard:g,fit:h="contain",stateMachineInputs:f},b)=>{let v=Io(),[S,x]=y.useState(null),[w,k]=y.useState(null);return y.useEffect(()=>{let C=false;return import('@rive-app/react-canvas').then(E=>{C||x(E);}).catch(()=>{C||k("Rive runtime not installed. Run `npm install @rive-app/react-canvas`.");}),()=>{C=true;}},[]),y.createElement(so,{ref:b,aspect:r,radius:i,border:l,"aria-label":c,className:p,style:m},w?y.createElement("div",{className:"flex items-center justify-center h-full text-sm text-muted-foreground p-4 text-center"},w):S&&e?y.createElement(Wv,{Mod:S,src:e,stateMachines:u,artboard:g,fit:h,stateMachineInputs:f,autoPlay:o&&!v,loop:a,pauseOffscreen:n,controls:t,poster:s}):s&&y.createElement("img",{src:s,alt:"",className:"w-full h-full object-contain"}))});Xp.displayName="RivePlayer";function Wv({Mod:e,src:t,stateMachines:o,artboard:a,fit:n,autoPlay:r,loop:i,pauseOffscreen:l,controls:s,poster:c}){let{useRive:p,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:v}=p({src:t,stateMachines:o,artboard:a,autoplay:r,layout:new m({fit:f[n],alignment:g.Center})}),[S,x]=y.useState(r);y.useEffect(()=>{if(!b||!i)return;let k=()=>{b.play();};return b.on(h.Stop,k),()=>{b.off(h.Stop,k);}},[b,i,h]),y.useEffect(()=>{if(!l||!b)return;let k=b.canvas;if(!k)return;let C=new IntersectionObserver(([E])=>{E.isIntersecting&&r?b.play():b.pause();},{threshold:.05});return C.observe(k),()=>C.disconnect()},[b,l,r]);let w=()=>{b&&(S?(b.pause(),x(false)):(b.play(),x(true)));};return y.createElement(y.Fragment,null,y.createElement(v,{className:"w-full h-full"}),!b&&c&&y.createElement("img",{src:c,alt:"",className:"absolute inset-0 w-full h-full object-contain pointer-events-none"}),s&&y.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")},y.createElement(et,{size:"icon",variant:"secondary",onClick:w},S?y.createElement(Pause,{className:"h-4 w-4"}):y.createElement(Play,{className:"h-4 w-4"}))))}var Uv={sm:20,md:28,lg:40,xl:56},$v={horizontal:["horizontal","square","icon"],square:["square","icon","horizontal"],icon:["icon","square","horizontal"]};function jv(e,t,o,a){for(let n of $v[t]){let r=e[n];if(!r)continue;let i=o==="dark"?r.dark??r.light:r.light??r.dark,l=a?r.mono??i:i??r.mono;if(l!=null)return l}return null}var Kv=y.forwardRef(function({sources:t={},lockup:o="horizontal",mode:a="light",mono:n=false,size:r="md",label:i,decorative:l=false,href:s,className:c,style:p,...m},u){let g=typeof r=="number"?r:Uv[r],h=jv(t,o,a,n),f=l?{"aria-hidden":true}:i?s?{}:{role:"img","aria-label":i}:{},b=h??y.createElement(qv,{label:i}),v=y.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,...p},"data-gds-part":"logo","data-gds-lockup":o,"data-gds-mode":a,...s?{}:f,...s?{}:m},b);return s?y.createElement("a",{ref:u,href:s,"aria-label":l?void 0:i,className:"inline-flex",...l?{"aria-hidden":true}:{},...m},v):y.cloneElement(v,{ref:u})});function qv({label:e}){return y.createElement("svg",{viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e?{}:{"aria-hidden":true}},y.createElement("path",{d:"M28 0L32 4V10L26 4H6L4 6V26L6 28H16L26 18V24L18 32H4L0 28V4L4 0H28ZM32 32H28V18H16V14H32V32Z",fill:"currentColor"}))}var Jp="M28 0L32 4V10L26 4H6L4 6V26L6 28H16L26 18V24L18 32H4L0 28V4L4 0H28ZM32 32H28V18H16V14H32V32Z",Yv={sm:16,md:24,lg:32,xl:48},Qp=y.forwardRef(({size:e="md",label:t="Loading\u2026",showLabel:o=false,className:a,style:n,...r},i)=>{let l=typeof e=="number"?e:Yv[e],s=y.useId().replace(/[^a-zA-Z0-9-]/g,"");return y.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",a),style:n,...r},y.createElement("style",null,`
354
354
  @keyframes gdsLoaderSweep { from { transform: translate(-48px, 48px) } to { transform: translate(48px, -48px) } }
355
355
  @keyframes gdsLoaderPulse { 0%, 100% { opacity: 0.35 } 50% { opacity: 0.9 } }
356
356
  @media (prefers-reduced-motion: reduce) {
357
357
  .gds-grade-loader [data-sweep] { display: none }
358
358
  .gds-grade-loader [data-mark] { animation: gdsLoaderPulse 2.2s ease-in-out infinite }
359
359
  }
360
- `),y.createElement("svg",{width:s,height:s,viewBox:"0 0 32 32",fill:"none","aria-hidden":true,style:{display:"block"}},y.createElement("defs",null,y.createElement("clipPath",{id:`${l}-clip`},y.createElement("path",{d:Ap})),y.createElement("linearGradient",{id:`${l}-shine`,x1:"0",y1:"1",x2:"1",y2:"0"},y.createElement("stop",{offset:"0.35",stopColor:"currentColor",stopOpacity:"0"}),y.createElement("stop",{offset:"0.5",stopColor:"oklch(var(--brand-1, 0.7 0 0))",stopOpacity:"0.95"}),y.createElement("stop",{offset:"0.65",stopColor:"currentColor",stopOpacity:"0"}))),y.createElement("path",{d:Ap,fill:"currentColor",opacity:.28,"data-mark":true}),y.createElement("g",{clipPath:`url(#${l}-clip)`},y.createElement("rect",{"data-sweep":true,x:-16,y:-16,width:64,height:64,fill:`url(#${l}-shine)`,style:{animation:"gdsLoaderSweep 1.4s cubic-bezier(0.45, 0, 0.55, 1) infinite"}}))),o&&t?y.createElement("span",{className:"text-xs text-muted-foreground"},t):null,!o&&t?y.createElement("span",{className:"sr-only"},t):null)});Dp.displayName="GradeLoader";var vi=1150,yi=1500,pv="translate(101%, 95%) scale(0.18)",uv="translate(122%, 36%) scale(0.2)",mv="var(--gds-canvas-fill, radial-gradient(circle at 50% 38%, #1b1b22, #0b0b0e))",fv="cubic-bezier(0.34, 1.16, 0.64, 1)",gv="cubic-bezier(0.65, 0, 0.35, 1)";function xi(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 Ip={display:"inline-flex",alignItems:"center",justifyContent:"center",width:28,height:28,borderRadius:999,border:"none",background:"transparent",color:"#fff",cursor:"pointer"};function hv(){return y.createElement("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":true},y.createElement("path",{d:"M8 5v14l11-7z"}))}function bv(){return y.createElement("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":true},y.createElement("rect",{x:"6",y:"5",width:"4",height:"14",rx:"1"}),y.createElement("rect",{x:"14",y:"5",width:"4",height:"14",rx:"1"}))}function Hp(){return y.createElement("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":true},y.createElement("path",{d:"M3 12a9 9 0 1 0 3-6.7L3 8"}),y.createElement("path",{d:"M3 3v5h5"}))}function wi({shots:e,autoplay:t=true,loop:o=true,maxLoops:r=1/0,controls:n=true,paused:a,onEnded:i,spotlight:s=false,cursor:l=true,enter:d=true,captionPosition:p="bottom",stage:m=mv,backdrop:u,className:b,style:f,children:h}){let g=fo(),v=y.useRef(null),k=_r(),x=useInView(v,{amount:.25}),w=k&&x,S=y.useMemo(()=>{let U=e&&e.length>0?e:[{zoom:1}],ae=[];d&&ae.push({transform:pv,zoom:.18,label:null,opacity:0,hold:360,trans:0}),ae.push(xi(U[0],d?yi:0));for(let xe=1;xe<U.length;xe++)ae.push(xi(U[xe],vi));return o&&(ae.push(xi(U[0],yi)),ae.push({transform:uv,zoom:.2,label:null,opacity:0,hold:520,trans:yi})),ae},[e,d,o]),T=d&&S.length>1?1:0,[L,B]=y.useState(t?0:T),[V,N]=y.useState(t),[A,F]=y.useState(false),Q=y.useRef(0),ge=y.useCallback(()=>{Q.current=0,F(false),B(0),N(true);},[]);y.useEffect(()=>{a!==void 0&&(a?N(false):A||N(true));},[a,A]);let I=y.useRef(i);y.useEffect(()=>{I.current=i;}),y.useEffect(()=>{A&&I.current?.();},[A]),y.useEffect(()=>{if(g||!V||!w||S.length<=1)return;let U=setTimeout(()=>{B(ae=>{let xe=ae+1;return xe>=S.length?o&&Q.current+1<r?(Q.current+=1,0):(N(false),F(true),T):xe});},S[L].hold);return ()=>clearTimeout(U)},[L,V,w,g,S,o,r,T]);let ee=g?T:Math.min(L,S.length-1),R=S[ee]??S[0],O=R.opacity===1&&R.zoom>1.05,fe=g?0:R.trans,ve=R.zoom<=1.05?fv:gv;return y.createElement("div",{ref:v,className:c("gds-screen-animator",b),"data-gds-part":"screen-animator",style:{position:"absolute",inset:0,overflow:"hidden",background:m,...f}},y.createElement("style",null,`
360
+ `),y.createElement("svg",{width:l,height:l,viewBox:"0 0 32 32",fill:"none","aria-hidden":true,style:{display:"block"}},y.createElement("defs",null,y.createElement("clipPath",{id:`${s}-clip`},y.createElement("path",{d:Jp})),y.createElement("linearGradient",{id:`${s}-shine`,x1:"0",y1:"1",x2:"1",y2:"0"},y.createElement("stop",{offset:"0.35",stopColor:"currentColor",stopOpacity:"0"}),y.createElement("stop",{offset:"0.5",stopColor:"oklch(var(--brand-1, 0.7 0 0))",stopOpacity:"0.95"}),y.createElement("stop",{offset:"0.65",stopColor:"currentColor",stopOpacity:"0"}))),y.createElement("path",{d:Jp,fill:"currentColor",opacity:.28,"data-mark":true}),y.createElement("g",{clipPath:`url(#${s}-clip)`},y.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?y.createElement("span",{className:"text-xs text-muted-foreground"},t):null,!o&&t?y.createElement("span",{className:"sr-only"},t):null)});Qp.displayName="GradeLoader";var $i=1150,ji=1500,Xv="translate(101%, 95%) scale(0.18)",Jv="translate(122%, 36%) scale(0.2)",Qv="var(--gds-canvas-fill, radial-gradient(circle at 50% 38%, #1b1b22, #0b0b0e))",ey="cubic-bezier(0.34, 1.16, 0.64, 1)",ty="cubic-bezier(0.65, 0, 0.35, 1)";function Ki(e,t){let o=e.zoom??1,a=e.cx??.5,n=e.cy??.5;return {transform:`translate(${(.5-a*o)*100}%, ${(.5-n*o)*100}%) scale(${o})`,zoom:o,label:e.label??null,opacity:1,hold:e.hold??2400,trans:t}}var eu={display:"inline-flex",alignItems:"center",justifyContent:"center",width:28,height:28,borderRadius:999,border:"none",background:"transparent",color:"#fff",cursor:"pointer"};function oy(){return y.createElement("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":true},y.createElement("path",{d:"M8 5v14l11-7z"}))}function ay(){return y.createElement("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":true},y.createElement("rect",{x:"6",y:"5",width:"4",height:"14",rx:"1"}),y.createElement("rect",{x:"14",y:"5",width:"4",height:"14",rx:"1"}))}function tu(){return y.createElement("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":true},y.createElement("path",{d:"M3 12a9 9 0 1 0 3-6.7L3 8"}),y.createElement("path",{d:"M3 3v5h5"}))}function qi({shots:e,autoplay:t=true,loop:o=true,maxLoops:a=1/0,controls:n=true,paused:r,onEnded:i,spotlight:l=false,cursor:s=true,enter:c=true,captionPosition:p="bottom",stage:m=Qv,backdrop:u,className:g,style:h,children:f}){let b=yo(),v=y.useRef(null),S=Za(),x=useInView(v,{amount:.25}),w=S&&x,k=y.useMemo(()=>{let U=e&&e.length>0?e:[{zoom:1}],J=[];c&&J.push({transform:Xv,zoom:.18,label:null,opacity:0,hold:360,trans:0}),J.push(Ki(U[0],c?ji:0));for(let ke=1;ke<U.length;ke++)J.push(Ki(U[ke],$i));return o&&(J.push(Ki(U[0],ji)),J.push({transform:Jv,zoom:.2,label:null,opacity:0,hold:520,trans:ji})),J},[e,c,o]),C=c&&k.length>1?1:0,[E,F]=y.useState(t?0:C),[O,M]=y.useState(t),[N,H]=y.useState(false),Y=y.useRef(0),se=y.useCallback(()=>{Y.current=0,H(false),F(0),M(true);},[]);y.useEffect(()=>{r!==void 0&&(r?M(false):N||M(true));},[r,N]);let D=y.useRef(i);y.useEffect(()=>{D.current=i;}),y.useEffect(()=>{N&&D.current?.();},[N]),y.useEffect(()=>{if(b||!O||!w||k.length<=1)return;let U=setTimeout(()=>{F(J=>{let ke=J+1;return ke>=k.length?o&&Y.current+1<a?(Y.current+=1,0):(M(false),H(true),C):ke});},k[E].hold);return ()=>clearTimeout(U)},[E,O,w,b,k,o,a,C]);let V=b?C:Math.min(E,k.length-1),R=k[V]??k[0],_=R.opacity===1&&R.zoom>1.05,le=b?0:R.trans,X=R.zoom<=1.05?ey:ty;return y.createElement("div",{ref:v,className:d("gds-screen-animator",g),"data-gds-part":"screen-animator",style:{position:"absolute",inset:0,overflow:"hidden",background:m,...h}},y.createElement("style",null,`
361
361
  @keyframes gdsSaPing { from { transform: scale(0.4); opacity: 0.9 } to { transform: scale(1.8); opacity: 0 } }
362
362
  @keyframes gdsSaPulse { 0%,100% { opacity: 1 } 50% { opacity: 0.5 } }
363
- `),u&&y.createElement("div",{"aria-hidden":true,style:{position:"absolute",inset:0,pointerEvents:"none"}},u),y.createElement("div",{style:{position:"absolute",inset:0,transform:R.transform,transformOrigin:"0 0",opacity:R.opacity,transition:`transform ${fe}ms ${ve}, opacity 700ms ease`}},h),s&&y.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:O?1:0,transition:`opacity ${vi}ms ease`}}),l&&y.createElement("div",{key:ee,"aria-hidden":true,style:{position:"absolute",left:"50%",top:"50%",transform:"translate(-50%, -50%)",pointerEvents:"none",opacity:O?1:0,transition:`opacity ${vi}ms ease`}},y.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"}}),y.createElement("svg",{width:"22",height:"22",viewBox:"0 0 24 24",fill:"none"},y.createElement("path",{d:"M5 3l14 7-6 1.5L10 18 5 3z",fill:"#fff",stroke:"#111",strokeWidth:"1.5",strokeLinejoin:"round"}))),y.createElement("div",{role:"status","aria-live":"polite","aria-atomic":"true",style:{position:"absolute",left:"50%",[p==="top"?"top":"bottom"]:22,transform:"translateX(-50%)",pointerEvents:"none"}},R.label&&y.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)"}},y.createElement("span",{"aria-hidden":true,style:{width:7,height:7,borderRadius:999,background:"#34d399",animation:"gdsSaPulse 1600ms ease-in-out infinite"}}),R.label)),n&&S.length>1&&!g&&y.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)"}},y.createElement("button",{type:"button",onClick:()=>A?ge():N(U=>!U),"aria-label":A?"Replay":V?"Pause":"Play",style:Ip},A?y.createElement(Hp,null):V?y.createElement(bv,null):y.createElement(hv,null)),y.createElement("button",{type:"button",onClick:ge,"aria-label":"Restart",style:Ip},y.createElement(Hp,null))),A&&!g&&y.createElement("button",{type:"button",onClick:ge,"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"}},y.createElement("svg",{width:"26",height:"26",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":true},y.createElement("path",{d:"M3 12a9 9 0 1 0 3-6.7L3 8"}),y.createElement("path",{d:"M3 3v5h5"}))))}var Op=y.createContext(null),vv={mode:"play",active:true,paused:false,register:()=>({done:()=>{},cancel:()=>{}})};function Ri(){return y.useContext(Op)??vv}var yv="var(--gds-canvas-fill, radial-gradient(circle at 50% 38%, #1b1b22, #0b0b0e))";function xv({label:e,onSkip:t}){return y.useEffect(()=>{if(!t)return;let o=setTimeout(t,1400);return ()=>clearTimeout(o)},[t]),y.createElement("div",{style:{position:"absolute",inset:0,display:"grid",placeItems:"center",pointerEvents:"none"}},y.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 ra=class extends y.Component{state={failed:false};static getDerivedStateFromError(){return {failed:true}}componentDidCatch(){}render(){return this.state.failed?y.createElement(xv,{label:this.props.label,onSkip:this.props.onSkip}):this.props.children}};function Fp({virtualWidth:e,children:t}){let o=y.useRef(null),[r,n]=y.useState(null);y.useEffect(()=>{let i=o.current;if(!i)return;let s=()=>n({w:i.clientWidth||1,h:i.clientHeight||1});s();let l=new ResizeObserver(s);return l.observe(i),()=>l.disconnect()},[]);let a=r?r.w/e:0;return y.createElement("div",{ref:o,style:{position:"absolute",inset:0,overflow:"hidden"}},r&&a>0&&y.createElement("div",{style:{width:e,height:r.h/a,transform:`scale(${a})`,transformOrigin:"0 0"}},t))}function wv(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 kv({ratio:e,children:t}){let o=y.useRef(null),[r,n]=y.useState(null);return y.useEffect(()=>{let a=o.current;if(!a)return;let i=()=>{let l=a.clientWidth||1,d=a.clientHeight||1,p=Math.min(l,d*e);n({w:p,h:p/e});};i();let s=new ResizeObserver(i);return s.observe(a),()=>s.disconnect()},[e]),y.createElement("div",{ref:o,style:{position:"absolute",inset:0}},r&&y.createElement("div",{style:{position:"absolute",left:"50%",top:"50%",transform:"translate(-50%, -50%)",width:r.w,height:r.h,overflow:"hidden"}},t))}function Vp({device:e="desktop",shots:t,virtualWidth:o,spotlight:r=false,cursor:n=true,enter:a=false,animate:i="none",screenId:s,className:l,style:d,children:p}){let m=Ri(),u=o??(e==="mobile"?390:1100),b=y.useRef(null),f=m.mode==="play"&&m.active,{register:h}=m;y.useEffect(()=>{if(!f)return;let v=h();return b.current=v,()=>{b.current=null,v.cancel();}},[f,h]);let g=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 y.createElement("div",{"data-gds-part":"motion-screen",className:c("gds-motion-screen",l),style:{...g,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)",...f&&zp[i]?{animation:zp[i]}:{},...d}},f?y.createElement(wi,{shots:t,loop:false,controls:false,enter:a,spotlight:r,cursor:n,stage:"transparent",paused:m.paused,onEnded:()=>b.current?.done()},y.createElement(Fp,{virtualWidth:u},p)):y.createElement(Fp,{virtualWidth:u},p))}var Gp={title:3800,"lower-third":3200,"section-break":4200,broadcast:4200,ticker:6e3,stat:4200,quote:5200};function Wp({template:e="title",heading:t,text:o,durationMs:r,tone:n="light",lift:a="none",className:i,style:s}){let l=Ri(),d=fo(),p=r??Gp[e],m=l.mode==="play"&&l.active,u=m&&!d,b=y.useRef(null),f=y.useRef(p),{register:h,paused:g}=l;y.useEffect(()=>{if(!m)return;f.current=p;let S=h();return b.current=S,()=>{b.current=null,S.cancel();}},[m,p,h]),y.useEffect(()=>{if(!m||g)return;let S=Date.now(),T=setTimeout(()=>{f.current=0,b.current?.done();},f.current);return ()=>{clearTimeout(T),f.current=Math.max(0,f.current-(Date.now()-S));}},[m,g]);let v=n==="dark"?"#16161a":"#fff",k=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)",x=g?"paused":"running",w=(S,T,L=0)=>u?{animation:`${S} ${T}ms cubic-bezier(0.22, 1, 0.36, 1) ${L}ms both`,animationPlayState:x}:{};return y.createElement("div",{"data-gds-part":"motion-text",className:c("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:v,textShadow:k,isolation:a==="scrim"?"isolate":void 0,pointerEvents:"none",...s}},a==="scrim"&&y.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)"}}),y.createElement("style",null,`
363
+ `),u&&y.createElement("div",{"aria-hidden":true,style:{position:"absolute",inset:0,pointerEvents:"none"}},u),y.createElement("div",{style:{position:"absolute",inset:0,transform:R.transform,transformOrigin:"0 0",opacity:R.opacity,transition:`transform ${le}ms ${X}, opacity 700ms ease`}},f),l&&y.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:_?1:0,transition:`opacity ${$i}ms ease`}}),s&&y.createElement("div",{key:V,"aria-hidden":true,style:{position:"absolute",left:"50%",top:"50%",transform:"translate(-50%, -50%)",pointerEvents:"none",opacity:_?1:0,transition:`opacity ${$i}ms ease`}},y.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"}}),y.createElement("svg",{width:"22",height:"22",viewBox:"0 0 24 24",fill:"none"},y.createElement("path",{d:"M5 3l14 7-6 1.5L10 18 5 3z",fill:"#fff",stroke:"#111",strokeWidth:"1.5",strokeLinejoin:"round"}))),y.createElement("div",{role:"status","aria-live":"polite","aria-atomic":"true",style:{position:"absolute",left:"50%",[p==="top"?"top":"bottom"]:22,transform:"translateX(-50%)",pointerEvents:"none"}},R.label&&y.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)"}},y.createElement("span",{"aria-hidden":true,style:{width:7,height:7,borderRadius:999,background:"#34d399",animation:"gdsSaPulse 1600ms ease-in-out infinite"}}),R.label)),n&&k.length>1&&!b&&y.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)"}},y.createElement("button",{type:"button",onClick:()=>N?se():M(U=>!U),"aria-label":N?"Replay":O?"Pause":"Play",style:eu},N?y.createElement(tu,null):O?y.createElement(ay,null):y.createElement(oy,null)),y.createElement("button",{type:"button",onClick:se,"aria-label":"Restart",style:eu},y.createElement(tu,null))),N&&!b&&y.createElement("button",{type:"button",onClick:se,"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"}},y.createElement("svg",{width:"26",height:"26",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":true},y.createElement("path",{d:"M3 12a9 9 0 1 0 3-6.7L3 8"}),y.createElement("path",{d:"M3 3v5h5"}))))}var iu=y.createContext(null),ry={mode:"play",active:true,paused:false,register:()=>({done:()=>{},cancel:()=>{}})};function Xi(){return y.useContext(iu)??ry}var ny="var(--gds-canvas-fill, radial-gradient(circle at 50% 38%, #1b1b22, #0b0b0e))";function iy({label:e,onSkip:t}){return y.useEffect(()=>{if(!t)return;let o=setTimeout(t,1400);return ()=>clearTimeout(o)},[t]),y.createElement("div",{style:{position:"absolute",inset:0,display:"grid",placeItems:"center",pointerEvents:"none"}},y.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 xr=class extends y.Component{state={failed:false};static getDerivedStateFromError(){return {failed:true}}componentDidCatch(){}render(){return this.state.failed?y.createElement(iy,{label:this.props.label,onSkip:this.props.onSkip}):this.props.children}};function ou({virtualWidth:e,children:t}){let o=y.useRef(null),[a,n]=y.useState(null);y.useEffect(()=>{let i=o.current;if(!i)return;let l=()=>n({w:i.clientWidth||1,h:i.clientHeight||1});l();let s=new ResizeObserver(l);return s.observe(i),()=>s.disconnect()},[]);let r=a?a.w/e:0;return y.createElement("div",{ref:o,style:{position:"absolute",inset:0,overflow:"hidden"}},a&&r>0&&y.createElement("div",{style:{width:e,height:a.h/r,transform:`scale(${r})`,transformOrigin:"0 0"}},t))}function sy(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 ly({ratio:e,children:t}){let o=y.useRef(null),[a,n]=y.useState(null);return y.useEffect(()=>{let r=o.current;if(!r)return;let i=()=>{let s=r.clientWidth||1,c=r.clientHeight||1,p=Math.min(s,c*e);n({w:p,h:p/e});};i();let l=new ResizeObserver(i);return l.observe(r),()=>l.disconnect()},[e]),y.createElement("div",{ref:o,style:{position:"absolute",inset:0}},a&&y.createElement("div",{style:{position:"absolute",left:"50%",top:"50%",transform:"translate(-50%, -50%)",width:a.w,height:a.h,overflow:"hidden"}},t))}function su({device:e="desktop",shots:t,virtualWidth:o,spotlight:a=false,cursor:n=true,enter:r=false,animate:i="none",screenId:l,className:s,style:c,children:p}){let m=Xi(),u=o??(e==="mobile"?390:1100),g=y.useRef(null),h=m.mode==="play"&&m.active,{register:f}=m;y.useEffect(()=>{if(!h)return;let v=f();return g.current=v,()=>{g.current=null,v.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 y.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&&au[i]?{animation:au[i]}:{},...c}},h?y.createElement(qi,{shots:t,loop:false,controls:false,enter:r,spotlight:a,cursor:n,stage:"transparent",paused:m.paused,onEnded:()=>g.current?.done()},y.createElement(ou,{virtualWidth:u},p)):y.createElement(ou,{virtualWidth:u},p))}var lu={title:3800,"lower-third":3200,"section-break":4200,broadcast:4200,ticker:6e3,stat:4200,quote:5200};function cu({template:e="title",heading:t,text:o,durationMs:a,tone:n="light",lift:r="none",className:i,style:l}){let s=Xi(),c=yo(),p=a??lu[e],m=s.mode==="play"&&s.active,u=m&&!c,g=y.useRef(null),h=y.useRef(p),{register:f,paused:b}=s;y.useEffect(()=>{if(!m)return;h.current=p;let k=f();return g.current=k,()=>{g.current=null,k.cancel();}},[m,p,f]),y.useEffect(()=>{if(!m||b)return;let k=Date.now(),C=setTimeout(()=>{h.current=0,g.current?.done();},h.current);return ()=>{clearTimeout(C),h.current=Math.max(0,h.current-(Date.now()-k));}},[m,b]);let v=n==="dark"?"#16161a":"#fff",S=r==="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)",x=b?"paused":"running",w=(k,C,E=0)=>u?{animation:`${k} ${C}ms cubic-bezier(0.22, 1, 0.36, 1) ${E}ms both`,animationPlayState:x}:{};return y.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:v,textShadow:S,isolation:r==="scrim"?"isolate":void 0,pointerEvents:"none",...l}},r==="scrim"&&y.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)"}}),y.createElement("style",null,`
364
364
  @keyframes gdsMotionFadeUp { from { opacity: 0; transform: translateY(18px) } to { opacity: 1; transform: translateY(0) } }
365
365
  @keyframes gdsMotionSlideIn { from { opacity: 0; transform: translateX(-28px) } to { opacity: 1; transform: translateX(0) } }
366
366
  @keyframes gdsMotionPush { from { opacity: 0; transform: scale(1.05) } to { opacity: 1; transform: scale(1) } }
367
367
  @keyframes gdsMotionMarquee { from { transform: translateX(0) } to { transform: translateX(-50%) } }
368
368
  @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) } }
369
369
  @keyframes gdsMotionQuoteMark { from { opacity: 0; transform: translateY(10px) scale(0.9) } to { opacity: 0.14; transform: translateY(0) scale(1) } }
370
- `),e==="title"&&y.createElement(y.Fragment,null,y.createElement("div",{style:{fontSize:"clamp(26px, 5.2vw, 60px)",fontWeight:700,letterSpacing:"-0.02em",lineHeight:1.06,...w("gdsMotionFadeUp",700)}},t),o&&y.createElement("div",{style:{marginTop:14,fontSize:"clamp(14px, 1.8vw, 20px)",opacity:.72,...w("gdsMotionFadeUp",700,160)}},o)),e==="lower-third"&&y.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)",...w("gdsMotionSlideIn",500)}},y.createElement("span",{style:{fontSize:15,fontWeight:650}},t),o&&y.createElement("span",{style:{fontSize:12.5,opacity:.72}},o)),e==="broadcast"&&y.createElement("div",{style:{overflow:"hidden",...w("gdsMotionSlideIn",600)}},o&&y.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),y.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"}},y.createElement("span",{style:{fontSize:22,fontWeight:800,letterSpacing:"-0.01em"}},t))),e==="section-break"&&y.createElement("div",{style:{fontSize:"clamp(30px, 6vw, 72px)",fontWeight:700,letterSpacing:"-0.025em",lineHeight:1.04,...w("gdsMotionPush",1400)}},t),e==="ticker"&&y.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",...w("gdsMotionFadeUp",500)}},y.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&&y.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%)"}},y.createElement("div",{style:{display:"inline-flex",whiteSpace:"nowrap",fontSize:13,...u?{animation:"gdsMotionMarquee 24000ms linear infinite",animationPlayState:x}:{}}},y.createElement("span",{style:{padding:"0 0 0 16px"}},o," \xB7 "),y.createElement("span",{style:{padding:"0 0 0 4px"}},o," \xB7 ")))),e==="stat"&&y.createElement(y.Fragment,null,y.createElement("div",{style:{fontSize:"clamp(48px, 16vw, 180px)",fontWeight:900,letterSpacing:"-0.04em",lineHeight:1,...w("gdsMotionStatSlam",800)}},t),o&&y.createElement("div",{style:{marginTop:16,fontSize:"clamp(14px, 1.8vw, 20px)",opacity:.72,...w("gdsMotionFadeUp",700,420)}},o)),e==="quote"&&y.createElement("div",{style:{position:"relative"}},y.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",...w("gdsMotionQuoteMark",900)}},"\u201C"),y.createElement("div",{style:{position:"relative",fontSize:"clamp(22px, 3.6vw, 44px)",fontWeight:600,letterSpacing:"-0.015em",lineHeight:1.25,...w("gdsMotionFadeUp",700)}},t),o&&y.createElement("div",{style:{marginTop:18,fontSize:"clamp(13px, 1.6vw, 17px)",opacity:.65,...w("gdsMotionFadeUp",700,240)}},"\u2014 ",o)))}var Sv={"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 Ci({zone:e="top-right",fromScene:t,toScene:o,interactive:r=false,className:n,style:a,children:i}){return y.createElement("div",{"data-gds-part":"motion-overlay",className:c("gds-motion-overlay",n),style:{position:"absolute",zIndex:20,pointerEvents:r?"auto":"none",...Sv[e],...a}},i)}var Up={fade:420,"slide-up":520,"slide-down":520,"slide-left":520,"slide-right":520,pop:420,zoom:650,"wipe-circle":750,none:0};function Rv(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 Cv=`
370
+ `),e==="title"&&y.createElement(y.Fragment,null,y.createElement("div",{style:{fontSize:"clamp(26px, 5.2vw, 60px)",fontWeight:700,letterSpacing:"-0.02em",lineHeight:1.06,...w("gdsMotionFadeUp",700)}},t),o&&y.createElement("div",{style:{marginTop:14,fontSize:"clamp(14px, 1.8vw, 20px)",opacity:.72,...w("gdsMotionFadeUp",700,160)}},o)),e==="lower-third"&&y.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)",...w("gdsMotionSlideIn",500)}},y.createElement("span",{style:{fontSize:15,fontWeight:650}},t),o&&y.createElement("span",{style:{fontSize:12.5,opacity:.72}},o)),e==="broadcast"&&y.createElement("div",{style:{overflow:"hidden",...w("gdsMotionSlideIn",600)}},o&&y.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),y.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"}},y.createElement("span",{style:{fontSize:22,fontWeight:800,letterSpacing:"-0.01em"}},t))),e==="section-break"&&y.createElement("div",{style:{fontSize:"clamp(30px, 6vw, 72px)",fontWeight:700,letterSpacing:"-0.025em",lineHeight:1.04,...w("gdsMotionPush",1400)}},t),e==="ticker"&&y.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",...w("gdsMotionFadeUp",500)}},y.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&&y.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%)"}},y.createElement("div",{style:{display:"inline-flex",whiteSpace:"nowrap",fontSize:13,...u?{animation:"gdsMotionMarquee 24000ms linear infinite",animationPlayState:x}:{}}},y.createElement("span",{style:{padding:"0 0 0 16px"}},o," \xB7 "),y.createElement("span",{style:{padding:"0 0 0 4px"}},o," \xB7 ")))),e==="stat"&&y.createElement(y.Fragment,null,y.createElement("div",{style:{fontSize:"clamp(48px, 16vw, 180px)",fontWeight:900,letterSpacing:"-0.04em",lineHeight:1,...w("gdsMotionStatSlam",800)}},t),o&&y.createElement("div",{style:{marginTop:16,fontSize:"clamp(14px, 1.8vw, 20px)",opacity:.72,...w("gdsMotionFadeUp",700,420)}},o)),e==="quote"&&y.createElement("div",{style:{position:"relative"}},y.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",...w("gdsMotionQuoteMark",900)}},"\u201C"),y.createElement("div",{style:{position:"relative",fontSize:"clamp(22px, 3.6vw, 44px)",fontWeight:600,letterSpacing:"-0.015em",lineHeight:1.25,...w("gdsMotionFadeUp",700)}},t),o&&y.createElement("div",{style:{marginTop:18,fontSize:"clamp(13px, 1.6vw, 17px)",opacity:.65,...w("gdsMotionFadeUp",700,240)}},"\u2014 ",o)))}var cy={"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 Ji({zone:e="top-right",fromScene:t,toScene:o,interactive:a=false,className:n,style:r,children:i}){return y.createElement("div",{"data-gds-part":"motion-overlay",className:d("gds-motion-overlay",n),style:{position:"absolute",zIndex:20,pointerEvents:a?"auto":"none",...cy[e],...r}},i)}var du={fade:420,"slide-up":520,"slide-down":520,"slide-left":520,"slide-right":520,pop:420,zoom:650,"wipe-circle":750,none:0};function dy(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 py=`
371
371
  @keyframes gdsMotionSceneIn { from { opacity: 0 } to { opacity: 1 } }
372
372
  @keyframes gdsMotionSceneUp { from { opacity: 0; transform: translateY(7%) } to { opacity: 1; transform: translateY(0) } }
373
373
  @keyframes gdsMotionSceneDown { from { opacity: 0; transform: translateY(-7%) } to { opacity: 1; transform: translateY(0) } }
@@ -380,7 +380,7 @@ applyThemeToRoot(theme, "light"); // or "dark" / "superLight" / "superDark"
380
380
  @keyframes gdsMotionScreenFloat { from { transform: translateY(-1.2%) } to { transform: translateY(1.2%) } }
381
381
  @keyframes gdsMotionScreenTilt { from { transform: perspective(1100px) rotateX(12deg) rotateY(-16deg) } to { transform: perspective(1100px) rotateX(0deg) rotateY(0deg) } }
382
382
  @keyframes gdsMotionScreenDrift { from { transform: translateX(-1.5%) } to { transform: translateX(1.5%) } }
383
- `,zp={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},Si=4e3,$p=420;function tn({label:e,durationMs:t,fill:o,transition:r="fade",transitionMs:n,className:a,style:i,children:s,internal:l}){let{active:d,paused:p,mode:m,onSceneEnd:u}=l,b=m==="play"&&d,f=t!=null,h=y.useRef(0),g=y.useRef(0),v=y.useRef(false),k=y.useRef(!f),x=y.useCallback(()=>{v.current||(v.current=true,u());},[u]),w=y.useRef(null),S=y.useRef(p);S.current=p;let T=y.useRef(false),L=y.useCallback(()=>{if(k.current&&!(h.current>0&&g.current<h.current)){if(S.current){T.current=true;return}w.current||(w.current=setTimeout(x,$p));}},[x]);y.useEffect(()=>{if(p){w.current&&(clearTimeout(w.current),w.current=null,T.current=true);return}T.current&&(T.current=false,L());},[p,L]);let B=y.useCallback(()=>{h.current+=1;let A=false;return {done:()=>{A||(A=true,g.current+=1,L());},cancel:()=>{h.current-=1,A?g.current-=1:L();}}},[L]),V=y.useRef(t??Si);y.useEffect(()=>{if(b)return V.current=t??Si,v.current=false,k.current=!f,()=>{w.current&&(clearTimeout(w.current),w.current=null);}},[b,t,f]),y.useEffect(()=>{if(!b||p||!f&&h.current>0)return;let A=Date.now(),F=setTimeout(()=>{k.current=true,L();},V.current);return ()=>{clearTimeout(F),V.current=Math.max(0,V.current-(Date.now()-A));}},[b,p,f,L]);let N=y.useMemo(()=>({mode:m,active:d,paused:p,register:B}),[m,d,p,B]);return y.createElement(Op.Provider,{value:N},y.createElement("div",{"data-gds-part":"motion-scene",className:c("gds-motion-scene",a),style:{position:"absolute",inset:0,background:o,isolation:"isolate",...b?(()=>{let A=n??Up[r],F=Rv(r,A);return F?{animation:F}:{}})():{},...i}},y.createElement("style",null,Cv),y.createElement("div",{style:{position:"absolute",inset:0,display:"flex",alignItems:"center",justifyContent:"center",gap:"4%",padding:"6%"}},s)))}function Tv(e){return y.createElement(tn,{...e,internal:{active:true,paused:false,mode:"play",onSceneEnd:()=>{}}})}var ki={display:"inline-flex",alignItems:"center",justifyContent:"center",width:28,height:28,borderRadius:999,border:"none",background:"transparent",color:"#fff",cursor:"pointer"};function Pv(){return y.createElement("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":true},y.createElement("path",{d:"M8 5v14l11-7z"}))}function Mv(){return y.createElement("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":true},y.createElement("rect",{x:"6",y:"5",width:"4",height:"14",rx:"1"}),y.createElement("rect",{x:"14",y:"5",width:"4",height:"14",rx:"1"}))}function Bp(){return y.createElement("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":true},y.createElement("path",{d:"M3 12a9 9 0 1 0 3-6.7L3 8"}),y.createElement("path",{d:"M3 3v5h5"}))}function Nv(e){return y.isValidElement(e)&&e.type===Ci}function Ev(e){return y.isValidElement(e)&&e.type!==Ci}var Lv=1500,Av=2400,Dv=1150;function Iv(e){let t=e.shots&&e.shots.length>0?e.shots:[{}],o=e.enter===true?Lv:0;return t.forEach((r,n)=>{o+=(r.hold??Av)+(n>0?r.trans??Dv:0);}),o}function jp(e,t,o){t>7||y.Children.forEach(e,r=>{if(!y.isValidElement(r))return;if(r.type===Vp){o.push(Iv(r.props));return}if(r.type===Wp){let a=r.props;o.push(a.durationMs??Gp[a.template??"title"]);return}let n=r.props.children;n&&jp(n,t+1,o);});}function Hv(e){let t=[];jp(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??Si))+$p}function _p(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 Fv({view:e="play",aspect:t="auto",stage:o=yv,backdrop:r,autoplay:n=true,loop:a=false,controls:i=true,className:s,style:l,children:d}){let p=fo(),m=y.Children.toArray(d),u=m.filter(Ev),b=m.filter(Nv),f=u.length,h=t!=="auto"?wv(t):null,g=h?t:"16 / 9",v=h&&h<1?"clamp(150px, 17%, 250px)":"clamp(260px, 30%, 440px)",[k,x]=y.useState(0),[w,S]=y.useState(!n),[T,L]=y.useState(false),[B,V]=y.useState(0),[N,A]=y.useState(null),F=N??e,[Q,ge]=y.useState(false),I=y.useMemo(()=>{let z=u.map(se=>Hv(se)),$=[],_=0;for(let se of z)$.push(_),_+=se;return {durations:z,starts:$,totalMs:Math.max(_,1)}},[u]),ee=y.useRef(0),R=y.useRef(null),O=y.useRef(0);O.current=k;let fe=y.useCallback(z=>{let{starts:$,durations:_}=I;for(let se=$.length-1;se>=0;se--)if(z>=$[se])return Math.min(se,$.length-1);return 0},[I]),ve=y.useCallback(()=>{let z=R.current?.querySelectorAll('[data-gds-part="motion-scene"]');return z&&z.length>0?z[z.length-1]:null},[]),U=y.useCallback((z,$)=>{let _=Math.max(0,Math.min(z,I.totalMs-1));ee.current=_,L(false),$?.resume&&S(false);let se=fe(_);if(se===O.current&&!$?.resume){let Be=_-I.starts[se];_p(ve(),Be,ae.current);try{window.parent?.postMessage({type:"grade:motion-time",timeMs:Math.round(_),totalMs:I.totalMs,durations:I.durations},"*");}catch{}return}try{window.parent?.postMessage({type:"grade:motion-time",timeMs:Math.round(_),totalMs:I.totalMs,durations:I.durations},"*");}catch{}let Ae=se;x(Ae),V(Be=>Be+1);let pe=_-I.starts[Ae],It=!$?.resume&&ae.current;requestAnimationFrame(()=>requestAnimationFrame(()=>{_p(ve(),pe,It);}));},[I,fe,ve]),ae=y.useRef(w);ae.current=w;let xe=y.useRef(I);xe.current=I,y.useEffect(()=>{if(w||T||p||F!=="play"||f===0)return;let z=0,$=performance.now(),_=0,se=Ae=>{let pe=xe.current,It=Math.min(Ae-$,120);if($=Ae,ee.current+=It,ee.current>=pe.totalMs)if(a)ee.current=0,x(0),V(Be=>Be+1);else {ee.current=pe.totalMs,L(true),S(true);return}else {let{starts:Be}=pe,St=0;for(let Ie=Be.length-1;Ie>=0;Ie--)if(ee.current>=Be[Ie]){St=Ie;break}St!==O.current&&(x(St),V(Ie=>Ie+1));}if(Ae-_>150){_=Ae;try{window.parent?.postMessage({type:"grade:motion-time",timeMs:Math.round(ee.current),totalMs:pe.totalMs,durations:pe.durations},"*");}catch{}}z=requestAnimationFrame(se);};return z=requestAnimationFrame(se),()=>cancelAnimationFrame(z)},[w,T,p,F,f,a]),y.useEffect(()=>{if(p||F!=="play")return;let z=R.current?.querySelectorAll('[data-gds-part="motion-scene"]'),$=z?.[z.length-1]??null;if(!(!$||typeof $.getAnimations!="function"))try{for(let _ of $.getAnimations({subtree:!0}))try{w?_.pause():_.play();}catch{}}catch{}},[w,p,F,k,B]);let[Te,ie]=y.useState(null),C=y.useRef(null);y.useEffect(()=>{let z=C.current;if(C.current=k,z===null||z===k)return;let $=u[k];if(!$)return;let _=$.props.transition??"fade",se=$.props.transitionMs??Up[_]??0;if(se<=0||ae.current){ie(null);return}ie(z);let Ae=setTimeout(()=>ie(null),se+60);return ()=>clearTimeout(Ae)},[k,B]);let K=y.useCallback(z=>{U(I.starts[Math.max(0,Math.min(z,f-1))]??0,{resume:true});},[U,I,f]),G=y.useCallback(()=>{let z=O.current+1;z<f?U(I.starts[z],{resume:true}):a&&f>0?U(0,{resume:true}):(L(true),S(true));},[f,a,U,I]);y.useEffect(()=>{if(p||typeof window>"u")return;let z=$=>{let _=$.data;if(!(!_||_.type!=="grade:motion-control")){if(_.action==="set-view"){(_.view==="play"||_.view==="strip")&&A(_.view);return}if(_.action==="export-mode"){ge(!!_.enabled);return}if(_.action==="seek"&&typeof _.ms=="number"){A("play"),U(_.ms);return}typeof _.scene=="number"?(A("play"),U(I.starts[Math.max(0,Math.min(f-1,Math.round(_.scene)))]??0)):_.action==="pause"?S(true):_.action==="play"?(A("play"),L(false),S(false)):_.action==="restart"&&(A("play"),K(0));}};return window.addEventListener("message",z),()=>window.removeEventListener("message",z)},[p,K,f,U,I]);let W=y.useRef(U);W.current=U,y.useEffect(()=>{if(typeof window>"u")return;let z=window;return z.__gradeMotion={ready:true,meta:()=>({totalMs:xe.current.totalMs,durations:xe.current.durations,count:f}),enterRenderMode:()=>{S(true),A("play"),ge(true);},renderFrame:$=>new Promise(_=>{S(true),W.current(Math.max(0,$));let se=false,Ae=()=>{se||(se=true,_());};requestAnimationFrame(()=>requestAnimationFrame(Ae)),setTimeout(Ae,4e3);})},()=>{delete window.__gradeMotion;}},[f]),y.useEffect(()=>{if(p||typeof window>"u")return;let z=$=>{if($.code!=="Space")return;let _=$.target;_&&(_.tagName==="INPUT"||_.tagName==="TEXTAREA"||_.tagName==="BUTTON"||_.isContentEditable)||($.preventDefault(),A("play"),L(false),S(se=>!se));};return window.addEventListener("keydown",z),()=>window.removeEventListener("keydown",z)},[p]),y.useEffect(()=>{if(!(p||typeof window>"u"))try{window.parent?.postMessage({type:"grade:motion-state",scene:k,paused:w,done:T,count:f,view:F},"*");}catch{}},[p,k,w,T,f,F]);let Ue=e==="strip"||N==="strip";if(F==="strip"||p){let $=!Ue&&u.length>2,_=$?u.slice(0,2):u,se=u.length-_.length;return y.createElement("div",{"data-gds-part":"motion",className:c("gds-motion",s),style:{position:"absolute",inset:0,overflow:"hidden",background:o,...l}},r&&y.createElement("div",{"aria-hidden":true,style:{position:"absolute",inset:0,pointerEvents:"none"}},r),y.createElement("div",{style:{position:"absolute",inset:0,display:"flex",alignItems:"center",gap:28,padding:"0 48px",overflowX:"auto"}},_.map((Ae,pe)=>y.createElement("figure",{key:pe,style:{margin:0,flex:"0 0 auto",width:v}},y.createElement("figcaption",{style:{marginBottom:8,fontSize:12,fontWeight:500,color:"rgba(255,255,255,0.66)"}},Ae.props.label??`Scene ${pe+1}`),y.createElement("div",{style:{position:"relative",aspectRatio:g,borderRadius:10,overflow:"hidden",background:Ae.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)"}},y.createElement(ra,{label:Ae.props.label},y.createElement(tn,{...Ae.props,fill:void 0,internal:{active:false,paused:true,mode:"strip",onSceneEnd:()=>{}}}))))),$&&se>0&&y.createElement("figure",{style:{margin:0,flex:"0 0 auto",width:v}},y.createElement("figcaption",{style:{marginBottom:8,fontSize:12,fontWeight:500,color:"rgba(255,255,255,0.66)"}},"\u2026"),y.createElement("div",{style:{aspectRatio:g,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}},"+",se," scene",se===1?"":"s"))))}let Re=u[Math.min(k,Math.max(0,f-1))],Xe=y.createElement("div",{ref:R,style:{position:"absolute",inset:0,overflow:"hidden",background:o}},r&&y.createElement("div",{"aria-hidden":true,style:{position:"absolute",inset:0,pointerEvents:"none"}},r),Te!==null&&Te!==k&&u[Te]&&y.createElement(ra,{key:`out:${Te}`,label:u[Te].props.label},y.createElement(tn,{...u[Te].props,transition:"none",internal:{active:false,paused:true,mode:"play",onSceneEnd:()=>{}}})),Re&&y.createElement(ra,{key:`${k}:${B}`,label:Re.props.label,onSkip:f>1?G:void 0},y.createElement(tn,{...Re.props,internal:{active:true,paused:w,mode:"play",onSceneEnd:()=>{}}})),b.filter(z=>{let $=z.props.fromScene??0,_=z.props.toScene??1/0;return k>=$&&k<=_}),Q&&y.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"}},y.createElement("svg",{viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg"},y.createElement("path",{d:"M28 0L32 4V10L26 4H6L4 6V26L6 28H16L26 18V24L18 32H4L0 28V4L4 0H28ZM32 32H28V18H16V14H32V32Z",fill:"currentColor"}))),i&&f>0&&!Q&&y.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)"}},y.createElement("style",null,`
383
+ `,au={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},Zi=4e3,pu=420;function Nn({label:e,durationMs:t,fill:o,transition:a="fade",transitionMs:n,className:r,style:i,children:l,internal:s}){let{active:c,paused:p,mode:m,onSceneEnd:u}=s,g=m==="play"&&c,h=t!=null,f=y.useRef(0),b=y.useRef(0),v=y.useRef(false),S=y.useRef(!h),x=y.useCallback(()=>{v.current||(v.current=true,u());},[u]),w=y.useRef(null),k=y.useRef(p);k.current=p;let C=y.useRef(false),E=y.useCallback(()=>{if(S.current&&!(f.current>0&&b.current<f.current)){if(k.current){C.current=true;return}w.current||(w.current=setTimeout(x,pu));}},[x]);y.useEffect(()=>{if(p){w.current&&(clearTimeout(w.current),w.current=null,C.current=true);return}C.current&&(C.current=false,E());},[p,E]);let F=y.useCallback(()=>{f.current+=1;let N=false;return {done:()=>{N||(N=true,b.current+=1,E());},cancel:()=>{f.current-=1,N?b.current-=1:E();}}},[E]),O=y.useRef(t??Zi);y.useEffect(()=>{if(g)return O.current=t??Zi,v.current=false,S.current=!h,()=>{w.current&&(clearTimeout(w.current),w.current=null);}},[g,t,h]),y.useEffect(()=>{if(!g||p||!h&&f.current>0)return;let N=Date.now(),H=setTimeout(()=>{S.current=true,E();},O.current);return ()=>{clearTimeout(H),O.current=Math.max(0,O.current-(Date.now()-N));}},[g,p,h,E]);let M=y.useMemo(()=>({mode:m,active:c,paused:p,register:F}),[m,c,p,F]);return y.createElement(iu.Provider,{value:M},y.createElement("div",{"data-gds-part":"motion-scene",className:d("gds-motion-scene",r),style:{position:"absolute",inset:0,background:o,isolation:"isolate",...g?(()=>{let N=n??du[a],H=dy(a,N);return H?{animation:H}:{}})():{},...i}},y.createElement("style",null,py),y.createElement("div",{style:{position:"absolute",inset:0,display:"flex",alignItems:"center",justifyContent:"center",gap:"4%",padding:"6%"}},l)))}function uy(e){return y.createElement(Nn,{...e,internal:{active:true,paused:false,mode:"play",onSceneEnd:()=>{}}})}var Yi={display:"inline-flex",alignItems:"center",justifyContent:"center",width:28,height:28,borderRadius:999,border:"none",background:"transparent",color:"#fff",cursor:"pointer"};function my(){return y.createElement("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":true},y.createElement("path",{d:"M8 5v14l11-7z"}))}function gy(){return y.createElement("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":true},y.createElement("rect",{x:"6",y:"5",width:"4",height:"14",rx:"1"}),y.createElement("rect",{x:"14",y:"5",width:"4",height:"14",rx:"1"}))}function ru(){return y.createElement("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":true},y.createElement("path",{d:"M3 12a9 9 0 1 0 3-6.7L3 8"}),y.createElement("path",{d:"M3 3v5h5"}))}function fy(e){return y.isValidElement(e)&&e.type===Ji}function hy(e){return y.isValidElement(e)&&e.type!==Ji}var by=1500,vy=2400,yy=1150;function xy(e){let t=e.shots&&e.shots.length>0?e.shots:[{}],o=e.enter===true?by:0;return t.forEach((a,n)=>{o+=(a.hold??vy)+(n>0?a.trans??yy:0);}),o}function uu(e,t,o){t>7||y.Children.forEach(e,a=>{if(!y.isValidElement(a))return;if(a.type===su){o.push(xy(a.props));return}if(a.type===cu){let r=a.props;o.push(r.durationMs??lu[r.template??"title"]);return}let n=a.props.children;n&&uu(n,t+1,o);});}function wy(e){let t=[];uu(e.props.children,0,t);let o=t.length>0?Math.max(...t):0,a=e.props.durationMs??0;return (Math.max(o,a)||(e.props.durationMs??Zi))+pu}function nu(e,t,o){if(!(!e||typeof e.getAnimations!="function"))try{for(let a of e.getAnimations({subtree:!0}))try{a.currentTime=t,o?a.pause():a.play();}catch{}}catch{}}function ky({view:e="play",aspect:t="auto",stage:o=ny,backdrop:a,autoplay:n=true,loop:r=false,controls:i=true,className:l,style:s,children:c}){let p=yo(),m=y.Children.toArray(c),u=m.filter(hy),g=m.filter(fy),h=u.length,f=t!=="auto"?sy(t):null,b=f?t:"16 / 9",v=f&&f<1?"clamp(150px, 17%, 250px)":"clamp(260px, 30%, 440px)",[S,x]=y.useState(0),[w,k]=y.useState(!n),[C,E]=y.useState(false),[F,O]=y.useState(0),[M,N]=y.useState(null),H=M??e,[Y,se]=y.useState(false),D=y.useMemo(()=>{let G=u.map(pe=>wy(pe)),K=[],W=0;for(let pe of G)K.push(W),W+=pe;return {durations:G,starts:K,totalMs:Math.max(W,1)}},[u]),V=y.useRef(0),R=y.useRef(null),_=y.useRef(0);_.current=S;let le=y.useCallback(G=>{let{starts:K,durations:W}=D;for(let pe=K.length-1;pe>=0;pe--)if(G>=K[pe])return Math.min(pe,K.length-1);return 0},[D]),X=y.useCallback(()=>{let G=R.current?.querySelectorAll('[data-gds-part="motion-scene"]');return G&&G.length>0?G[G.length-1]:null},[]),U=y.useCallback((G,K)=>{let W=Math.max(0,Math.min(G,D.totalMs-1));V.current=W,E(false),K?.resume&&k(false);let pe=le(W);if(pe===_.current&&!K?.resume){let _e=W-D.starts[pe];nu(X(),_e,J.current);try{window.parent?.postMessage({type:"grade:motion-time",timeMs:Math.round(W),totalMs:D.totalMs,durations:D.durations},"*");}catch{}return}try{window.parent?.postMessage({type:"grade:motion-time",timeMs:Math.round(W),totalMs:D.totalMs,durations:D.durations},"*");}catch{}let Ie=pe;x(Ie),O(_e=>_e+1);let he=W-D.starts[Ie],Gt=!K?.resume&&J.current;requestAnimationFrame(()=>requestAnimationFrame(()=>{nu(X(),he,Gt);}));},[D,le,X]),J=y.useRef(w);J.current=w;let ke=y.useRef(D);ke.current=D,y.useEffect(()=>{if(w||C||p||H!=="play"||h===0)return;let G=0,K=performance.now(),W=0,pe=Ie=>{let he=ke.current,Gt=Math.min(Ie-K,120);if(K=Ie,V.current+=Gt,V.current>=he.totalMs)if(r)V.current=0,x(0),O(_e=>_e+1);else {V.current=he.totalMs,E(true),k(true);return}else {let{starts:_e}=he,Mt=0;for(let Fe=_e.length-1;Fe>=0;Fe--)if(V.current>=_e[Fe]){Mt=Fe;break}Mt!==_.current&&(x(Mt),O(Fe=>Fe+1));}if(Ie-W>150){W=Ie;try{window.parent?.postMessage({type:"grade:motion-time",timeMs:Math.round(V.current),totalMs:he.totalMs,durations:he.durations},"*");}catch{}}G=requestAnimationFrame(pe);};return G=requestAnimationFrame(pe),()=>cancelAnimationFrame(G)},[w,C,p,H,h,r]),y.useEffect(()=>{if(p||H!=="play")return;let G=R.current?.querySelectorAll('[data-gds-part="motion-scene"]'),K=G?.[G.length-1]??null;if(!(!K||typeof K.getAnimations!="function"))try{for(let W of K.getAnimations({subtree:!0}))try{w?W.pause():W.play();}catch{}}catch{}},[w,p,H,S,F]);let[De,de]=y.useState(null),T=y.useRef(null);y.useEffect(()=>{let G=T.current;if(T.current=S,G===null||G===S)return;let K=u[S];if(!K)return;let W=K.props.transition??"fade",pe=K.props.transitionMs??du[W]??0;if(pe<=0||J.current){de(null);return}de(G);let Ie=setTimeout(()=>de(null),pe+60);return ()=>clearTimeout(Ie)},[S,F]);let Z=y.useCallback(G=>{U(D.starts[Math.max(0,Math.min(G,h-1))]??0,{resume:true});},[U,D,h]),$=y.useCallback(()=>{let G=_.current+1;G<h?U(D.starts[G],{resume:true}):r&&h>0?U(0,{resume:true}):(E(true),k(true));},[h,r,U,D]);y.useEffect(()=>{if(p||typeof window>"u")return;let G=K=>{let W=K.data;if(!(!W||W.type!=="grade:motion-control")){if(W.action==="set-view"){(W.view==="play"||W.view==="strip")&&N(W.view);return}if(W.action==="export-mode"){se(!!W.enabled);return}if(W.action==="seek"&&typeof W.ms=="number"){N("play"),U(W.ms);return}typeof W.scene=="number"?(N("play"),U(D.starts[Math.max(0,Math.min(h-1,Math.round(W.scene)))]??0)):W.action==="pause"?k(true):W.action==="play"?(N("play"),E(false),k(false)):W.action==="restart"&&(N("play"),Z(0));}};return window.addEventListener("message",G),()=>window.removeEventListener("message",G)},[p,Z,h,U,D]);let j=y.useRef(U);j.current=U,y.useEffect(()=>{if(typeof window>"u")return;let G=window;return G.__gradeMotion={ready:true,meta:()=>({totalMs:ke.current.totalMs,durations:ke.current.durations,count:h}),enterRenderMode:()=>{k(true),N("play"),se(true);},renderFrame:K=>new Promise(W=>{k(true),j.current(Math.max(0,K));let pe=false,Ie=()=>{pe||(pe=true,W());};requestAnimationFrame(()=>requestAnimationFrame(Ie)),setTimeout(Ie,4e3);})},()=>{delete window.__gradeMotion;}},[h]),y.useEffect(()=>{if(p||typeof window>"u")return;let G=K=>{if(K.code!=="Space")return;let W=K.target;W&&(W.tagName==="INPUT"||W.tagName==="TEXTAREA"||W.tagName==="BUTTON"||W.isContentEditable)||(K.preventDefault(),N("play"),E(false),k(pe=>!pe));};return window.addEventListener("keydown",G),()=>window.removeEventListener("keydown",G)},[p]),y.useEffect(()=>{if(!(p||typeof window>"u"))try{window.parent?.postMessage({type:"grade:motion-state",scene:S,paused:w,done:C,count:h,view:H},"*");}catch{}},[p,S,w,C,h,H]);let je=e==="strip"||M==="strip";if(H==="strip"||p){let K=!je&&u.length>2,W=K?u.slice(0,2):u,pe=u.length-W.length;return y.createElement("div",{"data-gds-part":"motion",className:d("gds-motion",l),style:{position:"absolute",inset:0,overflow:"hidden",background:o,...s}},a&&y.createElement("div",{"aria-hidden":true,style:{position:"absolute",inset:0,pointerEvents:"none"}},a),y.createElement("div",{style:{position:"absolute",inset:0,display:"flex",alignItems:"center",gap:28,padding:"0 48px",overflowX:"auto"}},W.map((Ie,he)=>y.createElement("figure",{key:he,style:{margin:0,flex:"0 0 auto",width:v}},y.createElement("figcaption",{style:{marginBottom:8,fontSize:12,fontWeight:500,color:"rgba(255,255,255,0.66)"}},Ie.props.label??`Scene ${he+1}`),y.createElement("div",{style:{position:"relative",aspectRatio:b,borderRadius:10,overflow:"hidden",background:Ie.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)"}},y.createElement(xr,{label:Ie.props.label},y.createElement(Nn,{...Ie.props,fill:void 0,internal:{active:false,paused:true,mode:"strip",onSceneEnd:()=>{}}}))))),K&&pe>0&&y.createElement("figure",{style:{margin:0,flex:"0 0 auto",width:v}},y.createElement("figcaption",{style:{marginBottom:8,fontSize:12,fontWeight:500,color:"rgba(255,255,255,0.66)"}},"\u2026"),y.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}},"+",pe," scene",pe===1?"":"s"))))}let Te=u[Math.min(S,Math.max(0,h-1))],Qe=y.createElement("div",{ref:R,style:{position:"absolute",inset:0,overflow:"hidden",background:o}},a&&y.createElement("div",{"aria-hidden":true,style:{position:"absolute",inset:0,pointerEvents:"none"}},a),De!==null&&De!==S&&u[De]&&y.createElement(xr,{key:`out:${De}`,label:u[De].props.label},y.createElement(Nn,{...u[De].props,transition:"none",internal:{active:false,paused:true,mode:"play",onSceneEnd:()=>{}}})),Te&&y.createElement(xr,{key:`${S}:${F}`,label:Te.props.label,onSkip:h>1?$:void 0},y.createElement(Nn,{...Te.props,internal:{active:true,paused:w,mode:"play",onSceneEnd:()=>{}}})),g.filter(G=>{let K=G.props.fromScene??0,W=G.props.toScene??1/0;return S>=K&&S<=W}),Y&&y.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"}},y.createElement("svg",{viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg"},y.createElement("path",{d:"M28 0L32 4V10L26 4H6L4 6V26L6 28H16L26 18V24L18 32H4L0 28V4L4 0H28ZM32 32H28V18H16V14H32V32Z",fill:"currentColor"}))),i&&h>0&&!Y&&y.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)"}},y.createElement("style",null,`
384
384
  .gds-motion-transport [data-gds-transport-extras] {
385
385
  display: flex; align-items: center; gap: 4px;
386
386
  max-width: 0; opacity: 0; overflow: hidden;
@@ -390,7 +390,7 @@ applyThemeToRoot(theme, "light"); // or "dark" / "superLight" / "superDark"
390
390
  .gds-motion-transport:focus-within [data-gds-transport-extras] {
391
391
  max-width: 360px; opacity: 1;
392
392
  }
393
- `),y.createElement("button",{type:"button",onClick:()=>T?K(0):S(z=>!z),"aria-label":T?"Replay":w?"Play":"Pause",style:ki},T?y.createElement(Bp,null):w?y.createElement(Pv,null):y.createElement(Mv,null)),y.createElement("div",{"data-gds-transport-extras":true},y.createElement("button",{type:"button",onClick:()=>K(0),"aria-label":"Restart",style:ki},y.createElement(Bp,null)),y.createElement("div",{style:{display:"flex",gap:5,padding:"0 6px"},"aria-hidden":true},u.map((z,$)=>y.createElement("button",{key:$,type:"button",onClick:()=>K($),"aria-label":`Go to ${z.props.label??`scene ${$+1}`}`,tabIndex:-1,style:{...ki,width:14,height:14}},y.createElement("span",{style:{width:6,height:6,borderRadius:999,background:$===k?"#fff":"rgba(255,255,255,0.35)",transition:"background 200ms ease"}})))))),T&&y.createElement("button",{type:"button",onClick:()=>K(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"}},y.createElement("svg",{width:"26",height:"26",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":true},y.createElement("path",{d:"M3 12a9 9 0 1 0 3-6.7L3 8"}),y.createElement("path",{d:"M3 3v5h5"}))));return y.createElement("div",{"data-gds-part":"motion",className:c("gds-motion",s),style:{position:"absolute",inset:0,overflow:"hidden",background:h?Q?"#000":"transparent":o,...l}},h?y.createElement(kv,{ratio:h},Xe):Xe)}var qp=({renderer:e,scene:t,camera:o,preset:r,width:n,height:a})=>{let i=new EffectComposer(e);i.setSize(n,a),i.addPass(new RenderPass(t,o));let s=new BloomEffect({intensity:0,luminanceThreshold:.6,radius:.6,kernelSize:KernelSize.MEDIUM}),l=new NoiseEffect({blendFunction:BlendFunction.OVERLAY});l.blendMode.opacity.value=0;let d=new ScanlineEffect({blendFunction:BlendFunction.OVERLAY,density:1.25});d.blendMode.opacity.value=0;let p=new VignetteEffect({darkness:0,offset:.5}),m=new ChromaticAberrationEffect({offset:new De.Vector2(0,0),radialModulation:false,modulationOffset:.15}),u=new GlitchEffect({chromaticAberrationOffset:new De.Vector2(0,0),columns:.05});u.minStrength=0,u.maxStrength=0,u.mode=GlitchMode.DISABLED,u.blendMode.opacity.value=0,i.addPass(new EffectPass(o,s)),i.addPass(new EffectPass(o,l,d,p)),i.addPass(new EffectPass(o,m)),i.addPass(new EffectPass(o,u));function b(f){let h=f.effects;s.intensity=h.bloom?.intensity??0,s.luminanceMaterial&&h.bloom?.luminanceThreshold!==void 0&&(s.luminanceMaterial.threshold=h.bloom.luminanceThreshold),l.blendMode.opacity.value=h.noise?.intensity??0,d.density=h.scanlines?.density??1.25,d.blendMode.opacity.value=h.scanlines?.opacity??0,p.darkness=h.vignette?.darkness??0,p.offset=h.vignette?.offset??.5;let g=h.chromatic?.offset??0;m.offset?.set(g,g);let v=h.glitch?.strength?.[1]??0;h.glitch&&v>0?(u.mode=GlitchMode.SPORADIC,u.blendMode.opacity.value=1,u.minStrength=h.glitch.strength?.[0]??0,u.maxStrength=v):(u.mode=GlitchMode.DISABLED,u.blendMode.opacity.value=0,u.minStrength=0,u.maxStrength=0);}return b(r),{composer:i,setPreset:b,resize:(f,h)=>i.setSize(f,h),dispose:()=>{i.dispose();}}};var wr=3e3,Mi=400,jv=80,Yp=({width:e,height:t,palette:o})=>{let r=new De.Scene;r.background=new De.Color(o.background);let n=new De.PerspectiveCamera(70,e/t,.1,Mi*2);n.position.z=0;let a=new Float32Array(wr*6),i=new Float32Array(wr*6),s=new Float32Array(wr),l=new De.Color(o.primary),d=new De.Color(o.accent);function p(g,v){let k=Math.random()*Math.PI*2,x=jv*Math.pow(Math.random(),.6),w=Math.cos(k)*x,S=Math.sin(k)*x,T=v?-Math.random()*Mi:-Mi;s[g]=T,a[g*6+0]=w,a[g*6+1]=S,a[g*6+2]=T,a[g*6+3]=w,a[g*6+4]=S,a[g*6+5]=T-2,i[g*6+0]=l.r,i[g*6+1]=l.g,i[g*6+2]=l.b,i[g*6+3]=d.r,i[g*6+4]=d.g,i[g*6+5]=d.b;}for(let g=0;g<wr;g++)p(g,true);let m=new De.BufferGeometry;m.setAttribute("position",new De.BufferAttribute(a,3)),m.setAttribute("color",new De.BufferAttribute(i,3));let u=new De.LineBasicMaterial({vertexColors:true,transparent:true,opacity:.95,blending:De.AdditiveBlending}),b=new De.LineSegments(m,u);r.add(b);let f=60,h=6;return {scene:r,camera:n,update:(g,v)=>{let k=m.attributes.position.array;for(let x=0;x<wr;x++){let w=x*6;k[w+2]+=f*v,k[w+5]=k[w+2]-h,k[w+2]>5&&p(x,false);}m.attributes.position.needsUpdate=true;},resize:(g,v)=>{let k=n;k.aspect=g/v,k.updateProjectionMatrix();},setPalette:g=>{r.background=new De.Color(g.background);let v=new De.Color(g.primary),k=new De.Color(g.accent),x=m.attributes.color.array;for(let w=0;w<wr;w++)x[w*6+0]=v.r,x[w*6+1]=v.g,x[w*6+2]=v.b,x[w*6+3]=k.r,x[w*6+4]=k.g,x[w*6+5]=k.b;m.attributes.color.needsUpdate=true;},dispose:()=>{m.dispose(),u.dispose();}}};var Kv=`
393
+ `),y.createElement("button",{type:"button",onClick:()=>C?Z(0):k(G=>!G),"aria-label":C?"Replay":w?"Play":"Pause",style:Yi},C?y.createElement(ru,null):w?y.createElement(my,null):y.createElement(gy,null)),y.createElement("div",{"data-gds-transport-extras":true},y.createElement("button",{type:"button",onClick:()=>Z(0),"aria-label":"Restart",style:Yi},y.createElement(ru,null)),y.createElement("div",{style:{display:"flex",gap:5,padding:"0 6px"},"aria-hidden":true},u.map((G,K)=>y.createElement("button",{key:K,type:"button",onClick:()=>Z(K),"aria-label":`Go to ${G.props.label??`scene ${K+1}`}`,tabIndex:-1,style:{...Yi,width:14,height:14}},y.createElement("span",{style:{width:6,height:6,borderRadius:999,background:K===S?"#fff":"rgba(255,255,255,0.35)",transition:"background 200ms ease"}})))))),C&&y.createElement("button",{type:"button",onClick:()=>Z(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"}},y.createElement("svg",{width:"26",height:"26",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":true},y.createElement("path",{d:"M3 12a9 9 0 1 0 3-6.7L3 8"}),y.createElement("path",{d:"M3 3v5h5"}))));return y.createElement("div",{"data-gds-part":"motion",className:d("gds-motion",l),style:{position:"absolute",inset:0,overflow:"hidden",background:f?Y?"#000":"transparent":o,...s}},f?y.createElement(ly,{ratio:f},Qe):Qe)}var gu=({renderer:e,scene:t,camera:o,preset:a,width:n,height:r})=>{let i=new EffectComposer(e);i.setSize(n,r),i.addPass(new RenderPass(t,o));let l=new BloomEffect({intensity:0,luminanceThreshold:.6,radius:.6,kernelSize:KernelSize.MEDIUM}),s=new NoiseEffect({blendFunction:BlendFunction.OVERLAY});s.blendMode.opacity.value=0;let c=new ScanlineEffect({blendFunction:BlendFunction.OVERLAY,density:1.25});c.blendMode.opacity.value=0;let p=new VignetteEffect({darkness:0,offset:.5}),m=new ChromaticAberrationEffect({offset:new He.Vector2(0,0),radialModulation:false,modulationOffset:.15}),u=new GlitchEffect({chromaticAberrationOffset:new He.Vector2(0,0),columns:.05});u.minStrength=0,u.maxStrength=0,u.mode=GlitchMode.DISABLED,u.blendMode.opacity.value=0,i.addPass(new EffectPass(o,l)),i.addPass(new EffectPass(o,s,c,p)),i.addPass(new EffectPass(o,m)),i.addPass(new EffectPass(o,u));function g(h){let f=h.effects;l.intensity=f.bloom?.intensity??0,l.luminanceMaterial&&f.bloom?.luminanceThreshold!==void 0&&(l.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,p.darkness=f.vignette?.darkness??0,p.offset=f.vignette?.offset??.5;let b=f.chromatic?.offset??0;m.offset?.set(b,b);let v=f.glitch?.strength?.[1]??0;f.glitch&&v>0?(u.mode=GlitchMode.SPORADIC,u.blendMode.opacity.value=1,u.minStrength=f.glitch.strength?.[0]??0,u.maxStrength=v):(u.mode=GlitchMode.DISABLED,u.blendMode.opacity.value=0,u.minStrength=0,u.maxStrength=0);}return g(a),{composer:i,setPreset:g,resize:(h,f)=>i.setSize(h,f),dispose:()=>{i.dispose();}}};var Da=3e3,ts=400,Dy=80,fu=({width:e,height:t,palette:o})=>{let a=new He.Scene;a.background=new He.Color(o.background);let n=new He.PerspectiveCamera(70,e/t,.1,ts*2);n.position.z=0;let r=new Float32Array(Da*6),i=new Float32Array(Da*6),l=new Float32Array(Da),s=new He.Color(o.primary),c=new He.Color(o.accent);function p(b,v){let S=Math.random()*Math.PI*2,x=Dy*Math.pow(Math.random(),.6),w=Math.cos(S)*x,k=Math.sin(S)*x,C=v?-Math.random()*ts:-ts;l[b]=C,r[b*6+0]=w,r[b*6+1]=k,r[b*6+2]=C,r[b*6+3]=w,r[b*6+4]=k,r[b*6+5]=C-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<Da;b++)p(b,true);let m=new He.BufferGeometry;m.setAttribute("position",new He.BufferAttribute(r,3)),m.setAttribute("color",new He.BufferAttribute(i,3));let u=new He.LineBasicMaterial({vertexColors:true,transparent:true,opacity:.95,blending:He.AdditiveBlending}),g=new He.LineSegments(m,u);a.add(g);let h=60,f=6;return {scene:a,camera:n,update:(b,v)=>{let S=m.attributes.position.array;for(let x=0;x<Da;x++){let w=x*6;S[w+2]+=h*v,S[w+5]=S[w+2]-f,S[w+2]>5&&p(x,false);}m.attributes.position.needsUpdate=true;},resize:(b,v)=>{let S=n;S.aspect=b/v,S.updateProjectionMatrix();},setPalette:b=>{a.background=new He.Color(b.background);let v=new He.Color(b.primary),S=new He.Color(b.accent),x=m.attributes.color.array;for(let w=0;w<Da;w++)x[w*6+0]=v.r,x[w*6+1]=v.g,x[w*6+2]=v.b,x[w*6+3]=S.r,x[w*6+4]=S.g,x[w*6+5]=S.b;m.attributes.color.needsUpdate=true;},dispose:()=>{m.dispose(),u.dispose();}}};var Ay=`
394
394
  precision highp float;
395
395
  varying vec2 vUv;
396
396
  uniform float uTime;
@@ -428,19 +428,19 @@ applyThemeToRoot(theme, "light"); // or "dark" / "superLight" / "superDark"
428
428
 
429
429
  gl_FragColor = vec4(col, 1.0);
430
430
  }
431
- `,qv=`
431
+ `,Iy=`
432
432
  varying vec2 vUv;
433
433
  void main() {
434
434
  vUv = uv;
435
435
  gl_Position = vec4(position.xy, 0.0, 1.0);
436
436
  }
437
- `,Zp=({width:e,height:t,palette:o})=>{let r=new De.Scene,n=new De.OrthographicCamera(-1,1,1,-1,0,1),a={uTime:{value:0},uResolution:{value:new De.Vector2(e,t)},uBackground:{value:new De.Color(o.background)},uPrimary:{value:new De.Color(o.primary)},uSecondary:{value:new De.Color(o.secondary)},uAccent:{value:new De.Color(o.accent)}},i=new De.ShaderMaterial({uniforms:a,vertexShader:qv,fragmentShader:Kv,depthTest:false,depthWrite:false}),s=new De.PlaneGeometry(2,2),l=new De.Mesh(s,i);return r.add(l),{scene:r,camera:n,update:p=>{a.uTime.value=p;},resize:(p,m)=>{a.uResolution.value.set(p,m);},setPalette:p=>{a.uBackground.value.set(p.background),a.uPrimary.value.set(p.primary),a.uSecondary.value.set(p.secondary),a.uAccent.value.set(p.accent);},dispose:()=>{s.dispose(),i.dispose();}}};var Yv=`
437
+ `,hu=({width:e,height:t,palette:o})=>{let a=new He.Scene,n=new He.OrthographicCamera(-1,1,1,-1,0,1),r={uTime:{value:0},uResolution:{value:new He.Vector2(e,t)},uBackground:{value:new He.Color(o.background)},uPrimary:{value:new He.Color(o.primary)},uSecondary:{value:new He.Color(o.secondary)},uAccent:{value:new He.Color(o.accent)}},i=new He.ShaderMaterial({uniforms:r,vertexShader:Iy,fragmentShader:Ay,depthTest:false,depthWrite:false}),l=new He.PlaneGeometry(2,2),s=new He.Mesh(l,i);return a.add(s),{scene:a,camera:n,update:p=>{r.uTime.value=p;},resize:(p,m)=>{r.uResolution.value.set(p,m);},setPalette:p=>{r.uBackground.value.set(p.background),r.uPrimary.value.set(p.primary),r.uSecondary.value.set(p.secondary),r.uAccent.value.set(p.accent);},dispose:()=>{l.dispose(),i.dispose();}}};var Hy=`
438
438
  varying vec2 vUv;
439
439
  void main() {
440
440
  vUv = uv;
441
441
  gl_Position = vec4(position.xy, 0.0, 1.0);
442
442
  }
443
- `,Zv=`
443
+ `,Fy=`
444
444
  precision highp float;
445
445
  varying vec2 vUv;
446
446
  uniform float uTime;
@@ -497,13 +497,13 @@ applyThemeToRoot(theme, "light"); // or "dark" / "superLight" / "superDark"
497
497
 
498
498
  gl_FragColor = vec4(col, 1.0);
499
499
  }
500
- `,Xp=({width:e,height:t,palette:o})=>{let r=new De.Scene,n=new De.OrthographicCamera(-1,1,1,-1,0,1),a={uTime:{value:0},uResolution:{value:new De.Vector2(e,t)},uBackground:{value:new De.Color(o.background)},uPrimary:{value:new De.Color(o.primary)},uSecondary:{value:new De.Color(o.secondary)},uAccent:{value:new De.Color(o.accent)}},i=new De.ShaderMaterial({uniforms:a,vertexShader:Yv,fragmentShader:Zv,depthTest:false,depthWrite:false}),s=new De.PlaneGeometry(2,2),l=new De.Mesh(s,i);return r.add(l),{scene:r,camera:n,update:p=>{a.uTime.value=p;},resize:(p,m)=>{a.uResolution.value.set(p,m);},setPalette:p=>{a.uBackground.value.set(p.background),a.uPrimary.value.set(p.primary),a.uSecondary.value.set(p.secondary),a.uAccent.value.set(p.accent);},dispose:()=>{s.dispose(),i.dispose();}}};var Xv=`
500
+ `,bu=({width:e,height:t,palette:o})=>{let a=new He.Scene,n=new He.OrthographicCamera(-1,1,1,-1,0,1),r={uTime:{value:0},uResolution:{value:new He.Vector2(e,t)},uBackground:{value:new He.Color(o.background)},uPrimary:{value:new He.Color(o.primary)},uSecondary:{value:new He.Color(o.secondary)},uAccent:{value:new He.Color(o.accent)}},i=new He.ShaderMaterial({uniforms:r,vertexShader:Hy,fragmentShader:Fy,depthTest:false,depthWrite:false}),l=new He.PlaneGeometry(2,2),s=new He.Mesh(l,i);return a.add(s),{scene:a,camera:n,update:p=>{r.uTime.value=p;},resize:(p,m)=>{r.uResolution.value.set(p,m);},setPalette:p=>{r.uBackground.value.set(p.background),r.uPrimary.value.set(p.primary),r.uSecondary.value.set(p.secondary),r.uAccent.value.set(p.accent);},dispose:()=>{l.dispose(),i.dispose();}}};var zy=`
501
501
  varying vec2 vUv;
502
502
  void main() {
503
503
  vUv = uv;
504
504
  gl_Position = vec4(position.xy, 0.0, 1.0);
505
505
  }
506
- `,Jv=`
506
+ `,By=`
507
507
  precision highp float;
508
508
  varying vec2 vUv;
509
509
  uniform float uTime;
@@ -573,8 +573,8 @@ applyThemeToRoot(theme, "light"); // or "dark" / "superLight" / "superDark"
573
573
 
574
574
  gl_FragColor = vec4(col, 1.0);
575
575
  }
576
- `,Jp=({palette:e})=>{let t=new De.Scene,o=new De.OrthographicCamera(-1,1,1,-1,0,1),r={uTime:{value:0},uBackground:{value:new De.Color(e.background)},uPrimary:{value:new De.Color(e.primary)},uSecondary:{value:new De.Color(e.secondary)},uAccent:{value:new De.Color(e.accent)}},n=new De.ShaderMaterial({uniforms:r,vertexShader:Xv,fragmentShader:Jv,depthTest:false,depthWrite:false}),a=new De.PlaneGeometry(2,2),i=new De.Mesh(a,n);return t.add(i),{scene:t,camera:o,update:l=>{r.uTime.value=l;},setPalette:l=>{r.uBackground.value.set(l.background),r.uPrimary.value.set(l.primary),r.uSecondary.value.set(l.secondary),r.uAccent.value.set(l.accent);},dispose:()=>{a.dispose(),n.dispose();}}};function Ni(e){return "u"+e.charAt(0).toUpperCase()+e.slice(1)}var eu=8;function Qv(e){let t=[];for(let o of e){if(o.type==="divider")continue;let r=Ni(o.key);if(o.type==="color")t.push(`uniform vec3 ${r};`);else if(o.type==="colorList"){let n=Math.min(o.max??o.default.length,eu);t.push(`uniform vec3 ${r}[${n}];`,`uniform int ${r}Count;`);}else t.push(`uniform float ${r};`);}return t.join(`
577
- `)}function Qp(e){let t=new De.Color;try{t.set(e);}catch{t.setRGB(.5,.5,.5);}return t}var tu=`
576
+ `,vu=({palette:e})=>{let t=new He.Scene,o=new He.OrthographicCamera(-1,1,1,-1,0,1),a={uTime:{value:0},uBackground:{value:new He.Color(e.background)},uPrimary:{value:new He.Color(e.primary)},uSecondary:{value:new He.Color(e.secondary)},uAccent:{value:new He.Color(e.accent)}},n=new He.ShaderMaterial({uniforms:a,vertexShader:zy,fragmentShader:By,depthTest:false,depthWrite:false}),r=new He.PlaneGeometry(2,2),i=new He.Mesh(r,n);return t.add(i),{scene:t,camera:o,update:s=>{a.uTime.value=s;},setPalette:s=>{a.uBackground.value.set(s.background),a.uPrimary.value.set(s.primary),a.uSecondary.value.set(s.secondary),a.uAccent.value.set(s.accent);},dispose:()=>{r.dispose(),n.dispose();}}};function os(e){return "u"+e.charAt(0).toUpperCase()+e.slice(1)}var xu=8;function Vy(e){let t=[];for(let o of e){if(o.type==="divider")continue;let a=os(o.key);if(o.type==="color")t.push(`uniform vec3 ${a};`);else if(o.type==="colorList"){let n=Math.min(o.max??o.default.length,xu);t.push(`uniform vec3 ${a}[${n}];`,`uniform int ${a}Count;`);}else t.push(`uniform float ${a};`);}return t.join(`
577
+ `)}function yu(e){let t=new He.Color;try{t.set(e);}catch{t.setRGB(.5,.5,.5);}return t}var wu=`
578
578
  precision highp float;
579
579
  varying vec2 vUv;
580
580
  uniform float uTime;
@@ -584,16 +584,16 @@ applyThemeToRoot(theme, "light"); // or "dark" / "superLight" / "superDark"
584
584
  uniform vec3 uSecondary;
585
585
  uniform vec3 uAccent;
586
586
  uniform vec3 uBackground;
587
- `,ey=`
587
+ `,_y=`
588
588
  varying vec2 vUv;
589
589
  void main() {
590
590
  vUv = uv;
591
591
  gl_Position = vec4(position.xy, 0.0, 1.0);
592
592
  }
593
- `,kr=class extends Error{log;source;constructor(t,o){super(`Fragment shader failed to compile:
594
- ${t.trim()}`),this.name="ShaderCompileError",this.log=t,this.source=o;}};function ty(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 kr(a,t)}function We(e,t){return ({renderer:o,width:r,height:n,palette:a})=>{let i=t?.length?Qv(t):"",s=`${tu}
593
+ `,Aa=class extends Error{log;source;constructor(t,o){super(`Fragment shader failed to compile:
594
+ ${t.trim()}`),this.name="ShaderCompileError",this.log=t,this.source=o;}};function Oy(e,t){let o=e.getContext(),a=o.createShader(o.FRAGMENT_SHADER);if(!a)throw new Error("Unable to allocate fragment shader");o.shaderSource(a,t),o.compileShader(a);let n=o.getShaderParameter(a,o.COMPILE_STATUS),r=o.getShaderInfoLog(a)||"";if(o.deleteShader(a),!n)throw new Aa(r,t)}function $e(e,t){return ({renderer:o,width:a,height:n,palette:r})=>{let i=t?.length?Vy(t):"",l=`${wu}
595
595
  ${i}
596
- ${e}`;ty(o,s);let l=new De.Scene,d=new De.OrthographicCamera(-1,1,1,-1,0,1),p={uTime:{value:0},uResolution:{value:new De.Vector2(r,n)},uMouse:{value:new De.Vector2(.5,.5)},uPrimary:{value:new De.Color(a.primary)},uSecondary:{value:new De.Color(a.secondary)},uAccent:{value:new De.Color(a.accent)},uBackground:{value:new De.Color(a.background)}};if(t?.length)for(let g of t){if(g.type==="divider")continue;let v=Ni(g.key);if(g.type==="color")p[v]={value:Qp(g.default)};else if(g.type==="colorList"){let k=Math.min(g.max??g.default.length,eu),x=Array.from({length:k},(w,S)=>Qp(g.default[Math.min(S,g.default.length-1)]??"#888"));p[v]={value:x},p[`${v}Count`]={value:Math.min(g.default.length,k)};}else if(g.type==="select"||g.type==="segmented"){let k=g.options.findIndex(x=>x.value===g.default);p[v]={value:Math.max(0,k)};}else g.type==="toggle"?p[v]={value:g.default?1:0}:p[v]={value:g.default};}let m=new Map;for(let g of t??[])g.type!=="divider"&&m.set(g.key,g);let u=new De.ShaderMaterial({uniforms:p,vertexShader:ey,fragmentShader:s,depthTest:false,depthWrite:false}),b=new De.PlaneGeometry(2,2),f=new De.Mesh(b,u);return l.add(f),{scene:l,camera:d,update:g=>{p.uTime.value=g;},resize:(g,v)=>{p.uResolution.value.set(g,v);},setPalette:g=>{p.uPrimary.value.set(g.primary),p.uSecondary.value.set(g.secondary),p.uAccent.value.set(g.accent),p.uBackground.value.set(g.background);},setMouse:(g,v)=>{p.uMouse.value.set(g,v);},setParams:g=>{for(let[v,k]of Object.entries(g)){let x=m.get(v);if(!x)continue;let w=Ni(v),S=p[w];if(S)if(x.type==="color")S.value.set(String(k));else if(x.type==="colorList"){let T=Array.isArray(k)?k:[],L=S.value;for(let V=0;V<L.length;V++){let N=T[Math.min(V,T.length-1)];N&&L[V].set(N);}let B=p[`${w}Count`];B&&(B.value=Math.min(T.length,L.length));}else if(x.type==="select"||x.type==="segmented"){let T=x.options.findIndex(L=>L.value===k);S.value=Math.max(0,T);}else x.type==="toggle"?S.value=k?1:0:S.value=Number(k);}},dispose:()=>{b.dispose(),u.dispose();}}}}var ou=We(`
596
+ ${e}`;Oy(o,l);let s=new He.Scene,c=new He.OrthographicCamera(-1,1,1,-1,0,1),p={uTime:{value:0},uResolution:{value:new He.Vector2(a,n)},uMouse:{value:new He.Vector2(.5,.5)},uPrimary:{value:new He.Color(r.primary)},uSecondary:{value:new He.Color(r.secondary)},uAccent:{value:new He.Color(r.accent)},uBackground:{value:new He.Color(r.background)}};if(t?.length)for(let b of t){if(b.type==="divider")continue;let v=os(b.key);if(b.type==="color")p[v]={value:yu(b.default)};else if(b.type==="colorList"){let S=Math.min(b.max??b.default.length,xu),x=Array.from({length:S},(w,k)=>yu(b.default[Math.min(k,b.default.length-1)]??"#888"));p[v]={value:x},p[`${v}Count`]={value:Math.min(b.default.length,S)};}else if(b.type==="select"||b.type==="segmented"){let S=b.options.findIndex(x=>x.value===b.default);p[v]={value:Math.max(0,S)};}else b.type==="toggle"?p[v]={value:b.default?1:0}:p[v]={value:b.default};}let m=new Map;for(let b of t??[])b.type!=="divider"&&m.set(b.key,b);let u=new He.ShaderMaterial({uniforms:p,vertexShader:_y,fragmentShader:l,depthTest:false,depthWrite:false}),g=new He.PlaneGeometry(2,2),h=new He.Mesh(g,u);return s.add(h),{scene:s,camera:c,update:b=>{p.uTime.value=b;},resize:(b,v)=>{p.uResolution.value.set(b,v);},setPalette:b=>{p.uPrimary.value.set(b.primary),p.uSecondary.value.set(b.secondary),p.uAccent.value.set(b.accent),p.uBackground.value.set(b.background);},setMouse:(b,v)=>{p.uMouse.value.set(b,v);},setParams:b=>{for(let[v,S]of Object.entries(b)){let x=m.get(v);if(!x)continue;let w=os(v),k=p[w];if(k)if(x.type==="color")k.value.set(String(S));else if(x.type==="colorList"){let C=Array.isArray(S)?S:[],E=k.value;for(let O=0;O<E.length;O++){let M=C[Math.min(O,C.length-1)];M&&E[O].set(M);}let F=p[`${w}Count`];F&&(F.value=Math.min(C.length,E.length));}else if(x.type==="select"||x.type==="segmented"){let C=x.options.findIndex(E=>E.value===S);k.value=Math.max(0,C);}else x.type==="toggle"?k.value=S?1:0:k.value=Number(S);}},dispose:()=>{g.dispose(),u.dispose();}}}}var ku=$e(`
597
597
  void main() {
598
598
  vec2 uv = vUv;
599
599
  float t = uTime * 0.15;
@@ -612,7 +612,7 @@ ${e}`;ty(o,s);let l=new De.Scene,d=new De.OrthographicCamera(-1,1,1,-1,0,1),p={u
612
612
  col = mix(col, uAccent, w3 * 0.85);
613
613
  gl_FragColor = vec4(col, 1.0);
614
614
  }
615
- `),ru=We(`
615
+ `),Su=$e(`
616
616
  float uHash(vec2 p) {
617
617
  return fract(sin(dot(p, vec2(127.1, 311.7))) * 43758.5453);
618
618
  }
@@ -664,7 +664,7 @@ ${e}`;ty(o,s);let l=new De.Scene,d=new De.OrthographicCamera(-1,1,1,-1,0,1),p={u
664
664
 
665
665
  gl_FragColor = vec4(col, 1.0);
666
666
  }
667
- `),au=We(`
667
+ `),Ru=$e(`
668
668
  float dHash(vec2 p) {
669
669
  return fract(sin(dot(p, vec2(127.1, 311.7))) * 43758.5453);
670
670
  }
@@ -708,7 +708,7 @@ ${e}`;ty(o,s);let l=new De.Scene,d=new De.OrthographicCamera(-1,1,1,-1,0,1),p={u
708
708
  vec3 col = mix(uBackground, dotCol, dot_ * (0.78 + 0.22 * flow));
709
709
  gl_FragColor = vec4(col, 1.0);
710
710
  }
711
- `),nu=We(`
711
+ `),Cu=$e(`
712
712
  float gHash(vec2 p) {
713
713
  return fract(sin(dot(p, vec2(127.1, 311.7))) * 43758.5453);
714
714
  }
@@ -746,7 +746,7 @@ ${e}`;ty(o,s);let l=new De.Scene,d=new De.OrthographicCamera(-1,1,1,-1,0,1),p={u
746
746
 
747
747
  gl_FragColor = vec4(col, 1.0);
748
748
  }
749
- `),iu=We(`
749
+ `),Tu=$e(`
750
750
  void main() {
751
751
  vec2 uv = vUv;
752
752
  float t = uTime * 0.4;
@@ -757,7 +757,7 @@ ${e}`;ty(o,s);let l=new De.Scene,d=new De.OrthographicCamera(-1,1,1,-1,0,1),p={u
757
757
  col = mix(col, uAccent, smoothstep(0.85, 1.0, m));
758
758
  gl_FragColor = vec4(col, 1.0);
759
759
  }
760
- `),su=We(`
760
+ `),Pu=$e(`
761
761
  float gHash(vec2 p) {
762
762
  return fract(sin(dot(p, vec2(127.1, 311.7))) * 43758.5453);
763
763
  }
@@ -849,7 +849,7 @@ ${e}`;ty(o,s);let l=new De.Scene,d=new De.OrthographicCamera(-1,1,1,-1,0,1),p={u
849
849
 
850
850
  gl_FragColor = vec4(col, 1.0);
851
851
  }
852
- `),lu=We(`
852
+ `),Mu=$e(`
853
853
  float hHash(vec2 p) {
854
854
  return fract(sin(dot(p, vec2(127.1, 311.7))) * 43758.5453);
855
855
  }
@@ -916,7 +916,7 @@ ${e}`;ty(o,s);let l=new De.Scene,d=new De.OrthographicCamera(-1,1,1,-1,0,1),p={u
916
916
 
917
917
  gl_FragColor = vec4(col, 1.0);
918
918
  }
919
- `),Ei=[{type:"slider",key:"speed",label:"Speed",min:0,max:3,step:.01,default:1},{type:"slider",key:"scale",label:"Scale",min:.4,max:2.5,step:.01,default:1},{type:"slider",key:"viscosity",label:"Viscosity",min:0,max:1,step:.01,default:.55},{type:"slider",key:"contrast",label:"Contrast",min:0,max:1,step:.01,default:.45},{type:"divider",key:"palette",label:"Colours"},{type:"color",key:"colorA",label:"Liquid A",slot:"secondary",default:"#6d5cff"},{type:"color",key:"colorB",label:"Liquid B",slot:"primary",default:"#22d3ee"},{type:"color",key:"colorC",label:"Core",slot:"accent",default:"#f0abfc"},{type:"divider",key:"interact",label:"Interaction"},{type:"slider",key:"mouseWarp",label:"Pointer warp",min:0,max:2,step:.01,default:.8},{type:"slider",key:"grain",label:"Grain",min:0,max:1.5,step:.01,default:1}],cu=We(`
919
+ `),as=[{type:"slider",key:"speed",label:"Speed",min:0,max:3,step:.01,default:1},{type:"slider",key:"scale",label:"Scale",min:.4,max:2.5,step:.01,default:1},{type:"slider",key:"viscosity",label:"Viscosity",min:0,max:1,step:.01,default:.55},{type:"slider",key:"contrast",label:"Contrast",min:0,max:1,step:.01,default:.45},{type:"divider",key:"palette",label:"Colours"},{type:"color",key:"colorA",label:"Liquid A",slot:"secondary",default:"#6d5cff"},{type:"color",key:"colorB",label:"Liquid B",slot:"primary",default:"#22d3ee"},{type:"color",key:"colorC",label:"Core",slot:"accent",default:"#f0abfc"},{type:"divider",key:"interact",label:"Interaction"},{type:"slider",key:"mouseWarp",label:"Pointer warp",min:0,max:2,step:.01,default:.8},{type:"slider",key:"grain",label:"Grain",min:0,max:1.5,step:.01,default:1}],Nu=$e(`
920
920
  float hash(vec2 p){ return fract(sin(dot(p, vec2(127.1,311.7)))*43758.5453); }
921
921
  float noise(vec2 p){
922
922
  vec2 i=floor(p), f=fract(p); f=f*f*(3.0-2.0*f);
@@ -961,7 +961,7 @@ ${e}`;ty(o,s);let l=new De.Scene,d=new De.OrthographicCamera(-1,1,1,-1,0,1),p={u
961
961
  col = clamp(col, 0.0, 1.0);
962
962
  gl_FragColor = vec4(col, 1.0);
963
963
  }
964
- `,Ei),Li=[{type:"slider",key:"speed",label:"Speed",min:0,max:3,step:.01,default:1},{type:"slider",key:"bandCount",label:"Curtains",min:1,max:5,step:1,default:3},{type:"slider",key:"waviness",label:"Waviness",min:0,max:2,step:.01,default:1},{type:"slider",key:"height",label:"Height",min:.2,max:.9,step:.01,default:.5},{type:"slider",key:"glow",label:"Glow",min:.2,max:2.5,step:.01,default:1.2},{type:"divider",key:"palette",label:"Aurora colours"},{type:"color",key:"colorLow",label:"Low (ground)",slot:"primary",default:"#22e0a3"},{type:"color",key:"colorMid",label:"Mid",slot:"secondary",default:"#19c2d6"},{type:"color",key:"colorHigh",label:"High (sky)",slot:"accent",default:"#9b5cff"},{type:"divider",key:"interact",label:"Interaction"},{type:"slider",key:"mouseSway",label:"Pointer sway",min:0,max:1,step:.01,default:.35},{type:"slider",key:"grain",label:"Grain",min:0,max:1.5,step:.01,default:1}],du=We(`
964
+ `,as),rs=[{type:"slider",key:"speed",label:"Speed",min:0,max:3,step:.01,default:1},{type:"slider",key:"bandCount",label:"Curtains",min:1,max:5,step:1,default:3},{type:"slider",key:"waviness",label:"Waviness",min:0,max:2,step:.01,default:1},{type:"slider",key:"height",label:"Height",min:.2,max:.9,step:.01,default:.5},{type:"slider",key:"glow",label:"Glow",min:.2,max:2.5,step:.01,default:1.2},{type:"divider",key:"palette",label:"Aurora colours"},{type:"color",key:"colorLow",label:"Low (ground)",slot:"primary",default:"#22e0a3"},{type:"color",key:"colorMid",label:"Mid",slot:"secondary",default:"#19c2d6"},{type:"color",key:"colorHigh",label:"High (sky)",slot:"accent",default:"#9b5cff"},{type:"divider",key:"interact",label:"Interaction"},{type:"slider",key:"mouseSway",label:"Pointer sway",min:0,max:1,step:.01,default:.35},{type:"slider",key:"grain",label:"Grain",min:0,max:1.5,step:.01,default:1}],Eu=$e(`
965
965
  float hash(vec2 p){ return fract(sin(dot(p, vec2(127.1,311.7)))*43758.5453); }
966
966
  float noise(vec2 p){
967
967
  vec2 i=floor(p), f=fract(p); f=f*f*(3.0-2.0*f);
@@ -1000,7 +1000,7 @@ ${e}`;ty(o,s);let l=new De.Scene,d=new De.OrthographicCamera(-1,1,1,-1,0,1),p={u
1000
1000
  col = clamp(col, 0.0, 1.0);
1001
1001
  gl_FragColor = vec4(col, 1.0);
1002
1002
  }
1003
- `,Li),Ai=[{type:"slider",key:"speed",label:"Speed",min:0,max:3,step:.01,default:1},{type:"slider",key:"scale",label:"Scale",min:.4,max:3,step:.01,default:1},{type:"slider",key:"sharpness",label:"Sharpness",min:0,max:1,step:.01,default:.5},{type:"slider",key:"brightness",label:"Brightness",min:.2,max:2.5,step:.01,default:1.1},{type:"divider",key:"palette",label:"Water tint"},{type:"color",key:"deep",label:"Deep",slot:"secondary",default:"#0b2a4a"},{type:"color",key:"shallow",label:"Shallow",slot:"primary",default:"#2bb0c9"},{type:"divider",key:"interact",label:"Interaction"},{type:"slider",key:"chroma",label:"Chromatic split",min:0,max:2,step:.01,default:.6},{type:"slider",key:"mouseRipple",label:"Pointer ripple",min:0,max:2,step:.01,default:.8},{type:"slider",key:"grain",label:"Grain",min:0,max:1.5,step:.01,default:1}],pu=We(`
1003
+ `,rs),ns=[{type:"slider",key:"speed",label:"Speed",min:0,max:3,step:.01,default:1},{type:"slider",key:"scale",label:"Scale",min:.4,max:3,step:.01,default:1},{type:"slider",key:"sharpness",label:"Sharpness",min:0,max:1,step:.01,default:.5},{type:"slider",key:"brightness",label:"Brightness",min:.2,max:2.5,step:.01,default:1.1},{type:"divider",key:"palette",label:"Water tint"},{type:"color",key:"deep",label:"Deep",slot:"secondary",default:"#0b2a4a"},{type:"color",key:"shallow",label:"Shallow",slot:"primary",default:"#2bb0c9"},{type:"divider",key:"interact",label:"Interaction"},{type:"slider",key:"chroma",label:"Chromatic split",min:0,max:2,step:.01,default:.6},{type:"slider",key:"mouseRipple",label:"Pointer ripple",min:0,max:2,step:.01,default:.8},{type:"slider",key:"grain",label:"Grain",min:0,max:1.5,step:.01,default:1}],Lu=$e(`
1004
1004
  vec2 hash2(vec2 p){
1005
1005
  p = vec2(dot(p, vec2(127.1,311.7)), dot(p, vec2(269.5,183.3)));
1006
1006
  return fract(sin(p)*43758.5453);
@@ -1050,7 +1050,7 @@ ${e}`;ty(o,s);let l=new De.Scene,d=new De.OrthographicCamera(-1,1,1,-1,0,1),p={u
1050
1050
  col = clamp(col, 0.0, 1.0);
1051
1051
  gl_FragColor = vec4(col, 1.0);
1052
1052
  }
1053
- `,Ai),Di=[{type:"divider",key:"motion",label:"Motion"},{type:"slider",key:"speed",label:"Speed",min:0,max:3,step:.01,default:.6},{type:"slider",key:"mouseSway",label:"Mouse sway",min:0,max:1,step:.01,default:.3},{type:"divider",key:"form",label:"Ribbon"},{type:"slider",key:"ribbonWidth",label:"Ribbon width",min:.08,max:.6,step:.01,default:.26},{type:"slider",key:"twist",label:"Twist",min:0,max:2.5,step:.01,default:1},{type:"slider",key:"sheen",label:"Sheen",min:0,max:1,step:.01,default:.7},{type:"divider",key:"palette",label:"Palette"},{type:"color",key:"ribbonA",label:"Ribbon A",default:"#f7a8c4",slot:"primary"},{type:"color",key:"ribbonB",label:"Ribbon B",default:"#8fe3d8",slot:"secondary"},{type:"color",key:"ribbonC",label:"Ribbon C",default:"#c9b8ff",slot:"accent"},{type:"color",key:"bg",label:"Background",default:"#f4f1ec",slot:"background"},{type:"divider",key:"finish",label:"Finish"},{type:"slider",key:"grain",label:"Grain",min:0,max:.08,step:.001,default:.02}],uu=We(`
1053
+ `,ns),is=[{type:"divider",key:"motion",label:"Motion"},{type:"slider",key:"speed",label:"Speed",min:0,max:3,step:.01,default:.6},{type:"slider",key:"mouseSway",label:"Mouse sway",min:0,max:1,step:.01,default:.3},{type:"divider",key:"form",label:"Ribbon"},{type:"slider",key:"ribbonWidth",label:"Ribbon width",min:.08,max:.6,step:.01,default:.26},{type:"slider",key:"twist",label:"Twist",min:0,max:2.5,step:.01,default:1},{type:"slider",key:"sheen",label:"Sheen",min:0,max:1,step:.01,default:.7},{type:"divider",key:"palette",label:"Palette"},{type:"color",key:"ribbonA",label:"Ribbon A",default:"#f7a8c4",slot:"primary"},{type:"color",key:"ribbonB",label:"Ribbon B",default:"#8fe3d8",slot:"secondary"},{type:"color",key:"ribbonC",label:"Ribbon C",default:"#c9b8ff",slot:"accent"},{type:"color",key:"bg",label:"Background",default:"#f4f1ec",slot:"background"},{type:"divider",key:"finish",label:"Finish"},{type:"slider",key:"grain",label:"Grain",min:0,max:.08,step:.001,default:.02}],Du=$e(`
1054
1054
  float hash(vec2 p){ return fract(sin(dot(p, vec2(127.1,311.7)))*43758.5453); }
1055
1055
  float vnoise(vec2 p){
1056
1056
  vec2 i=floor(p), f=fract(p); f=f*f*(3.0-2.0*f);
@@ -1095,7 +1095,7 @@ ${e}`;ty(o,s);let l=new De.Scene,d=new De.OrthographicCamera(-1,1,1,-1,0,1),p={u
1095
1095
  col = clamp(col, 0.0, 1.0);
1096
1096
  gl_FragColor = vec4(col, 1.0);
1097
1097
  }
1098
- `,Di),Ii=[{type:"divider",key:"motion",label:"Motion"},{type:"slider",key:"speed",label:"Speed",min:0,max:3,step:.01,default:.7},{type:"divider",key:"rings",label:"Rings"},{type:"slider",key:"ringCount",label:"Ring count",min:2,max:40,step:.5,default:14},{type:"slider",key:"ringSharpness",label:"Ring sharpness",min:0,max:1,step:.01,default:.45},{type:"slider",key:"moire",label:"Moir\xE9",min:0,max:1,step:.01,default:.5},{type:"slider",key:"glow",label:"Centre glow",min:0,max:1,step:.01,default:.5},{type:"divider",key:"center",label:"Centre"},{type:"toggle",key:"followMouse",label:"Follow cursor",default:true},{type:"slider",key:"centerX",label:"Centre X",min:0,max:1,step:.01,default:.5},{type:"slider",key:"centerY",label:"Centre Y",min:0,max:1,step:.01,default:.5},{type:"divider",key:"palette",label:"Palette"},{type:"color",key:"colorA",label:"Colour A",default:"#b45cff",slot:"primary"},{type:"color",key:"colorB",label:"Colour B",default:"#ff4fd8",slot:"secondary"},{type:"color",key:"colorC",label:"Colour C",default:"#6a2fb0",slot:"accent"},{type:"color",key:"bg",label:"Background",default:"#1a0e2a",slot:"background"},{type:"divider",key:"finish",label:"Finish"},{type:"slider",key:"grain",label:"Grain",min:0,max:.08,step:.001,default:.02}],mu=We(`
1098
+ `,is),ss=[{type:"divider",key:"motion",label:"Motion"},{type:"slider",key:"speed",label:"Speed",min:0,max:3,step:.01,default:.7},{type:"divider",key:"rings",label:"Rings"},{type:"slider",key:"ringCount",label:"Ring count",min:2,max:40,step:.5,default:14},{type:"slider",key:"ringSharpness",label:"Ring sharpness",min:0,max:1,step:.01,default:.45},{type:"slider",key:"moire",label:"Moir\xE9",min:0,max:1,step:.01,default:.5},{type:"slider",key:"glow",label:"Centre glow",min:0,max:1,step:.01,default:.5},{type:"divider",key:"center",label:"Centre"},{type:"toggle",key:"followMouse",label:"Follow cursor",default:true},{type:"slider",key:"centerX",label:"Centre X",min:0,max:1,step:.01,default:.5},{type:"slider",key:"centerY",label:"Centre Y",min:0,max:1,step:.01,default:.5},{type:"divider",key:"palette",label:"Palette"},{type:"color",key:"colorA",label:"Colour A",default:"#b45cff",slot:"primary"},{type:"color",key:"colorB",label:"Colour B",default:"#ff4fd8",slot:"secondary"},{type:"color",key:"colorC",label:"Colour C",default:"#6a2fb0",slot:"accent"},{type:"color",key:"bg",label:"Background",default:"#1a0e2a",slot:"background"},{type:"divider",key:"finish",label:"Finish"},{type:"slider",key:"grain",label:"Grain",min:0,max:.08,step:.001,default:.02}],Au=$e(`
1099
1099
  float hash(vec2 p){ return fract(sin(dot(p, vec2(127.1,311.7)))*43758.5453); }
1100
1100
  void main(){
1101
1101
  vec2 uv = vUv;
@@ -1126,7 +1126,7 @@ ${e}`;ty(o,s);let l=new De.Scene,d=new De.OrthographicCamera(-1,1,1,-1,0,1),p={u
1126
1126
  col = clamp(col, 0.0, 1.0);
1127
1127
  gl_FragColor = vec4(col, 1.0);
1128
1128
  }
1129
- `,Ii),Hi=[{type:"divider",key:"motion",label:"Motion"},{type:"slider",key:"speed",label:"Speed",min:0,max:3,step:.01,default:.7},{type:"slider",key:"mousePull",label:"Mouse pull",min:0,max:1,step:.01,default:.35},{type:"divider",key:"swirl",label:"Swirl"},{type:"slider",key:"spin",label:"Spin",min:-6,max:6,step:.1,default:3},{type:"slider",key:"armCount",label:"Arms",min:1,max:16,step:1,default:5},{type:"slider",key:"depth",label:"Depth",min:0,max:1,step:.01,default:.6},{type:"divider",key:"palette",label:"Palette"},{type:"color",key:"colorA",label:"Colour A",default:"#3a1d6e",slot:"primary"},{type:"color",key:"colorB",label:"Colour B",default:"#a24be0",slot:"secondary"},{type:"color",key:"bg",label:"Background",default:"#0a0612",slot:"background"},{type:"divider",key:"finish",label:"Finish"},{type:"slider",key:"sparkle",label:"Sparkle",min:0,max:1,step:.01,default:.4},{type:"slider",key:"grain",label:"Grain",min:0,max:.08,step:.001,default:.02}],fu=We(`
1129
+ `,ss),ls=[{type:"divider",key:"motion",label:"Motion"},{type:"slider",key:"speed",label:"Speed",min:0,max:3,step:.01,default:.7},{type:"slider",key:"mousePull",label:"Mouse pull",min:0,max:1,step:.01,default:.35},{type:"divider",key:"swirl",label:"Swirl"},{type:"slider",key:"spin",label:"Spin",min:-6,max:6,step:.1,default:3},{type:"slider",key:"armCount",label:"Arms",min:1,max:16,step:1,default:5},{type:"slider",key:"depth",label:"Depth",min:0,max:1,step:.01,default:.6},{type:"divider",key:"palette",label:"Palette"},{type:"color",key:"colorA",label:"Colour A",default:"#3a1d6e",slot:"primary"},{type:"color",key:"colorB",label:"Colour B",default:"#a24be0",slot:"secondary"},{type:"color",key:"bg",label:"Background",default:"#0a0612",slot:"background"},{type:"divider",key:"finish",label:"Finish"},{type:"slider",key:"sparkle",label:"Sparkle",min:0,max:1,step:.01,default:.4},{type:"slider",key:"grain",label:"Grain",min:0,max:.08,step:.001,default:.02}],Iu=$e(`
1130
1130
  float hash(vec2 p){ return fract(sin(dot(p, vec2(127.1,311.7)))*43758.5453); }
1131
1131
  float vnoise(vec2 p){
1132
1132
  vec2 i=floor(p), f=fract(p); f=f*f*(3.0-2.0*f);
@@ -1164,7 +1164,7 @@ ${e}`;ty(o,s);let l=new De.Scene,d=new De.OrthographicCamera(-1,1,1,-1,0,1),p={u
1164
1164
  col = clamp(col, 0.0, 1.0);
1165
1165
  gl_FragColor = vec4(col, 1.0);
1166
1166
  }
1167
- `,Hi),Fi=[{type:"slider",key:"speed",label:"Speed",min:0,max:3,step:.01,default:.6},{type:"slider",key:"petalCount",label:"Petals",min:3,max:24,step:1,default:8},{type:"slider",key:"bloomRadius",label:"Bloom radius",min:.1,max:1.2,step:.01,default:.5},{type:"slider",key:"spread",label:"Spectrum spread",min:.1,max:1.5,step:.01,default:.7},{type:"slider",key:"cycle",label:"Spectral cycling",min:0,max:2,step:.01,default:.6},{type:"slider",key:"glow",label:"Glow",min:0,max:1.5,step:.01,default:.6},{type:"divider",key:"palette",label:"Palette"},{type:"color",key:"colorA",label:"Colour A",default:"#2dd4bf",slot:"primary"},{type:"color",key:"colorB",label:"Colour B",default:"#3b82f6",slot:"secondary"},{type:"color",key:"colorC",label:"Colour C",default:"#a855f7",slot:"accent"},{type:"color",key:"bg",label:"Background",default:"#05060a",slot:"background"},{type:"divider",key:"interaction",label:"Interaction"},{type:"slider",key:"mouseInfluence",label:"Mouse pull",min:0,max:1,step:.01,default:.6}],gu=We(`
1167
+ `,ls),cs=[{type:"slider",key:"speed",label:"Speed",min:0,max:3,step:.01,default:.6},{type:"slider",key:"petalCount",label:"Petals",min:3,max:24,step:1,default:8},{type:"slider",key:"bloomRadius",label:"Bloom radius",min:.1,max:1.2,step:.01,default:.5},{type:"slider",key:"spread",label:"Spectrum spread",min:.1,max:1.5,step:.01,default:.7},{type:"slider",key:"cycle",label:"Spectral cycling",min:0,max:2,step:.01,default:.6},{type:"slider",key:"glow",label:"Glow",min:0,max:1.5,step:.01,default:.6},{type:"divider",key:"palette",label:"Palette"},{type:"color",key:"colorA",label:"Colour A",default:"#2dd4bf",slot:"primary"},{type:"color",key:"colorB",label:"Colour B",default:"#3b82f6",slot:"secondary"},{type:"color",key:"colorC",label:"Colour C",default:"#a855f7",slot:"accent"},{type:"color",key:"bg",label:"Background",default:"#05060a",slot:"background"},{type:"divider",key:"interaction",label:"Interaction"},{type:"slider",key:"mouseInfluence",label:"Mouse pull",min:0,max:1,step:.01,default:.6}],Hu=$e(`
1168
1168
  #define PI 3.14159265359
1169
1169
  #define TAU 6.28318530718
1170
1170
  float hash(vec2 p){ return fract(sin(dot(p, vec2(127.1,311.7)))*43758.5453); }
@@ -1208,7 +1208,7 @@ ${e}`;ty(o,s);let l=new De.Scene,d=new De.OrthographicCamera(-1,1,1,-1,0,1),p={u
1208
1208
  col = max(col, 0.0);
1209
1209
  gl_FragColor = vec4(col, 1.0);
1210
1210
  }
1211
- `,Fi),zi=[{type:"slider",key:"speed",label:"Speed",min:0,max:3,step:.01,default:.7},{type:"slider",key:"dotSize",label:"Dot size",min:6,max:48,step:1,default:18,unit:"px"},{type:"slider",key:"gridAngle",label:"Grid angle",min:0,max:90,step:1,default:27,unit:"deg"},{type:"slider",key:"contrast",label:"Contrast",min:.5,max:4,step:.01,default:1.6},{type:"slider",key:"dotSoftness",label:"Dot softness",min:0,max:1,step:.01,default:.35},{type:"divider",key:"palette",label:"Palette"},{type:"color",key:"colorA",label:"Ink A",default:"#f97316",slot:"primary"},{type:"color",key:"colorB",label:"Ink B",default:"#fb7185",slot:"secondary"},{type:"color",key:"colorC",label:"Ink C",default:"#fbbf24",slot:"accent"},{type:"color",key:"bg",label:"Paper",default:"#0b0b0f",slot:"background"},{type:"divider",key:"interaction",label:"Interaction"},{type:"slider",key:"mouseInfluence",label:"Mouse swell",min:0,max:2,step:.01,default:.8}],hu=We(`
1211
+ `,cs),ds=[{type:"slider",key:"speed",label:"Speed",min:0,max:3,step:.01,default:.7},{type:"slider",key:"dotSize",label:"Dot size",min:6,max:48,step:1,default:18,unit:"px"},{type:"slider",key:"gridAngle",label:"Grid angle",min:0,max:90,step:1,default:27,unit:"deg"},{type:"slider",key:"contrast",label:"Contrast",min:.5,max:4,step:.01,default:1.6},{type:"slider",key:"dotSoftness",label:"Dot softness",min:0,max:1,step:.01,default:.35},{type:"divider",key:"palette",label:"Palette"},{type:"color",key:"colorA",label:"Ink A",default:"#f97316",slot:"primary"},{type:"color",key:"colorB",label:"Ink B",default:"#fb7185",slot:"secondary"},{type:"color",key:"colorC",label:"Ink C",default:"#fbbf24",slot:"accent"},{type:"color",key:"bg",label:"Paper",default:"#0b0b0f",slot:"background"},{type:"divider",key:"interaction",label:"Interaction"},{type:"slider",key:"mouseInfluence",label:"Mouse swell",min:0,max:2,step:.01,default:.8}],Fu=$e(`
1212
1212
  float hash(vec2 p){ return fract(sin(dot(p, vec2(127.1,311.7)))*43758.5453); }
1213
1213
  float noise(vec2 p){ vec2 i=floor(p),f=fract(p); f=f*f*(3.0-2.0*f);
1214
1214
  float a=hash(i),b=hash(i+vec2(1,0)),c=hash(i+vec2(0,1)),d=hash(i+vec2(1,1));
@@ -1246,7 +1246,7 @@ ${e}`;ty(o,s);let l=new De.Scene,d=new De.OrthographicCamera(-1,1,1,-1,0,1),p={u
1246
1246
  col = clamp(col, 0.0, 1.0);
1247
1247
  gl_FragColor = vec4(col, 1.0);
1248
1248
  }
1249
- `,zi),Bi=[{type:"slider",key:"speed",label:"Speed",min:0,max:3,step:.01,default:.8},{type:"slider",key:"gridDensity",label:"Grid density",min:6,max:60,step:1,default:26},{type:"slider",key:"pulseSpeed",label:"Pulse speed",min:0,max:4,step:.01,default:1.2},{type:"slider",key:"glow",label:"Glow / intensity",min:0,max:2,step:.01,default:.9},{type:"slider",key:"ringRadius",label:"Ring radius",min:.1,max:.6,step:.01,default:.32},{type:"slider",key:"scanline",label:"Scanline mix",min:0,max:1,step:.01,default:.3},{type:"divider",key:"palette",label:"Palette"},{type:"color",key:"colorA",label:"Accent",default:"#22c55e",slot:"primary"},{type:"color",key:"colorB",label:"Rim",default:"#4ade80",slot:"accent"},{type:"color",key:"bg",label:"Background",default:"#03060a",slot:"background"},{type:"divider",key:"interaction",label:"Interaction"},{type:"slider",key:"mouseInfluence",label:"Mouse spotlight",min:0,max:2,step:.01,default:1}],bu=We(`
1249
+ `,ds),ps=[{type:"slider",key:"speed",label:"Speed",min:0,max:3,step:.01,default:.8},{type:"slider",key:"gridDensity",label:"Grid density",min:6,max:60,step:1,default:26},{type:"slider",key:"pulseSpeed",label:"Pulse speed",min:0,max:4,step:.01,default:1.2},{type:"slider",key:"glow",label:"Glow / intensity",min:0,max:2,step:.01,default:.9},{type:"slider",key:"ringRadius",label:"Ring radius",min:.1,max:.6,step:.01,default:.32},{type:"slider",key:"scanline",label:"Scanline mix",min:0,max:1,step:.01,default:.3},{type:"divider",key:"palette",label:"Palette"},{type:"color",key:"colorA",label:"Accent",default:"#22c55e",slot:"primary"},{type:"color",key:"colorB",label:"Rim",default:"#4ade80",slot:"accent"},{type:"color",key:"bg",label:"Background",default:"#03060a",slot:"background"},{type:"divider",key:"interaction",label:"Interaction"},{type:"slider",key:"mouseInfluence",label:"Mouse spotlight",min:0,max:2,step:.01,default:1}],zu=$e(`
1250
1250
  float hash(vec2 p){ return fract(sin(dot(p, vec2(127.1,311.7)))*43758.5453); }
1251
1251
  float hash1(float n){ return fract(sin(n)*43758.5453); }
1252
1252
  void main(){
@@ -1290,6 +1290,6 @@ ${e}`;ty(o,s);let l=new De.Scene,d=new De.OrthographicCamera(-1,1,1,-1,0,1),p={u
1290
1290
  col = max(col, 0.0);
1291
1291
  gl_FragColor = vec4(col, 1.0);
1292
1292
  }
1293
- `,Bi);var aa={space:Yp,plasma:Zp,voronoi:Xp,synthwave:Jp,mesh:ou,waves:iu,undertones:ru,"flowing-dots":au,grain:nu,glass:su,holographic:lu,fluid:cu,aurora:du,caustics:pu,ribbon:uu,concentric:mu,vortex:fu,spectral:gu,halftone:hu,digital:bu},na=[{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:"holographic",label:"Holographic foil",description:"Iridescent foil \u2014 a brushed diagonal grain (a diffraction grating) under a spectrum that sweeps across the sheet in dense shimmering bands, with metallic glints riding the grain. The spectrum cycles the brand colours (secondary \u2192 primary \u2192 accent) so it re-tints with the theme rather than being a fixed rainbow. The cursor acts as the view angle, sliding the whole spectrum like tilting a holographic card.",tags:["holographic","foil","iridescent","diffraction","grain","mouse","hero","background"],scene:"holographic",defaultPostPreset:"none"},{id:"glass",label:"Studio glass",description:"A brand-tinted wash seen through a sheet of frosted, slumped glass \u2014 chromatic refraction fringes the edges, anisotropic specular streaks catch a moving key light, and a faint caustic shimmer pools in the folds. The glass bulges toward the cursor like a lens and the highlight tracks it. The expensive, tactile backdrop; lovely in light AND dark tones.",tags:["glass","frosted","refraction","caustic","mouse","soft","hero","background"],scene:"glass",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"},{id:"fluid",label:"Fluid",description:"Soft liquid metaballs \u2014 large slow blobs of palette colour merge and split like a lava lamp. The cursor warps the liquid around it.",tags:["lava lamp","liquid","metaballs","organic","gradient","ambient","background"],scene:"fluid",defaultPostPreset:"none",controls:Ei},{id:"aurora",label:"Aurora",description:"Vertical curtains of northern-light ribbons drift and shimmer over a dark sky, with a faint star field. Lovely on dark surfaces.",tags:["aurora","northern lights","ribbons","dark","glow","atmospheric","background"],scene:"aurora",defaultPostPreset:"none",controls:Li},{id:"caustics",label:"Water caustics",description:"Animated underwater caustic light net \u2014 bright cellular veins ripple across a tinted water surface, with depth-graded colour and a pointer ripple.",tags:["caustics","water","underwater","ripple","cellular","light","background"],scene:"caustics",defaultPostPreset:"none",controls:Ai},{id:"ribbon",label:"Flowing ribbon",description:"A silky satin ribbon sweeps and folds across the frame, catching shifting palette colours with an iridescent specular sheen on a light ground.",tags:["ribbon","satin","iridescent","elegant","light","hero","background"],scene:"ribbon",defaultPostPreset:"none",controls:Di},{id:"concentric",label:"Concentric",description:"Concentric rings ripple outward from a centre with soft moir\xE9 interference and a gentle pulse. The centre can follow the cursor.",tags:["rings","ripple","moire","radial","hypnotic","background"],scene:"concentric",defaultPostPreset:"none",controls:Ii},{id:"vortex",label:"Deep vortex",description:"A dark radial vortex of spiralling streaks pulling into a deep centre, dusted with starfield sparkle. Brooding and atmospheric.",tags:["vortex","spiral","dark","cosmic","radial","atmospheric","background"],scene:"vortex",defaultPostPreset:"none",controls:Hi},{id:"spectral",label:"Spectral bloom",description:"A kaleidoscopic radial spectrum burst \u2014 petals of shifting spectrum colour bloom from a cursor-driven centre over a dark ground.",tags:["radial","spectrum","kaleidoscope","bloom","luminous","background"],scene:"spectral",defaultPostPreset:"none",controls:Fi},{id:"halftone",label:"Halftone pop",description:"A bold pop-art halftone field \u2014 a palette gradient resolved into a rotated grid of luminance-sized print dots, with a diagonal sweep and mouse swell.",tags:["halftone","pop-art","retro","print","dots","gradient","background"],scene:"halftone",defaultPostPreset:"none",controls:zi},{id:"digital",label:"Digital grid",description:"A techy data-activity field \u2014 a grid of cells lighting up in travelling waves with scanning pulses, a glowing ring, and a mouse spotlight on a near-black ground.",tags:["grid","digital","data","techy","scanline","glow","background"],scene:"digital",defaultPostPreset:"none",controls:Bi}],ia=Object.fromEntries(na.map(e=>[e.id,e]));var sa={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}}}},rn="vhs";var la={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))"},ay={dark:"oklch(0.13 0.015 265)",light:"oklch(0.97 0.005 265)"},ny=/^[\d.]+\s+[\d.]+\s+[\d.]+(?:\s*\/\s*[\d.%]+)?$/,iy=/^[\d.]+\s+[\d.]+%\s+[\d.]+%(?:\s*\/\s*[\d.%]+)?$/,sy=/^\s*var\(\s*(--[^,)\s]+)(?:\s*,[^)]*)?\s*\)\s*$/;function an(e,t,o){if(typeof document>"u")return o;let r=e,n=sy.exec(e);if(n){let s=getComputedStyle(t).getPropertyValue(n[1]).trim();s&&(ny.test(s)?r=`oklch(${s})`:iy.test(s)&&(r=`hsl(${s})`));}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 s=document.createElement("canvas");s.width=1,s.height=1;let l=s.getContext("2d");if(!l)return i;l.clearRect(0,0,1,1),l.fillStyle=i,l.fillRect(0,0,1,1);let[d,p,m]=l.getImageData(0,0,1,1).data;return `rgb(${d}, ${p}, ${m})`}catch{return i}}function vu(e,t){return {primary:an(e.primary,t,la.primary),secondary:an(e.secondary,t,la.secondary),accent:an(e.accent,t,la.accent),background:an(e.background,t,la.background)}}var ly=12,_i=new Set,cy=0;function xu(){[..._i].sort((t,o)=>o.touched-t.touched).forEach((t,o)=>t.setGranted(o<ly));}function dy(e){e.touched=++cy,_i.add(e),xu();}function yu(e){_i.delete(e)&&xu();}var Sr=y.forwardRef(({preset:e,fragmentShader:t,onShaderError:o,postPreset:r,palette:n,tone:a="auto",createScene:i,controls:s=false,autoPlay:l=true,play:d,pauseOffscreen:p=true,releaseOffscreen:m=false,aspect:u="video",radius:b="lg",border:f=false,poster:h,label:g,className:v,style:k,maxDpr:x,...w},S)=>{let T=y.useRef(null),[L,B]=y.useState(d??l),[V,N]=y.useState(false),A=Co(),[F,Q]=y.useState(!m),[ge,I]=y.useState(!m),ee=y.useRef(null);y.useEffect(()=>{if(!m){I(true);return}let C={touched:0,setGranted:I};return ee.current=C,()=>{yu(C),ee.current=null;}},[m]),y.useEffect(()=>{if(!m)return;let C=ee.current;C&&(F?dy(C):yu(C));},[F,m]),y.useEffect(()=>{if(!m){Q(true);return}let C=T.current;if(!C)return;let K=new IntersectionObserver(([G])=>Q(G.isIntersecting),{rootMargin:"0px",threshold:0});return K.observe(C),()=>K.disconnect()},[m]);let R=y.useMemo(()=>{let C={...la,...n};return a!=="auto"&&!n?.background&&(C.background=ay[a]),C},[n,a]),O=y.useMemo(()=>i||(t?We(t):e&&aa[e]?aa[e]:null),[i,t,e]),fe=y.useMemo(()=>{if(r&&typeof r=="object")return r;let C=typeof r=="string"?r:(e?ia[e]?.defaultPostPreset:void 0)??rn;return sa[C]??sa[rn]},[r,e]),ve=y.useRef(fe);ve.current=fe;let U=y.useRef(R);U.current=R;let ae=y.useMemo(()=>JSON.stringify(R??null),[R]),xe=y.useRef(o);xe.current=o,y.useEffect(()=>{let C=T.current;if(!C||!O)return;if(m&&(!F||!ge)){N(false);return}let K=C.clientWidth||1,G=C.clientHeight||1,Se=vu(U.current,C),W=new De.WebGLRenderer({antialias:true,alpha:false,powerPreference:"high-performance"}),Ue=x??Math.min(window.devicePixelRatio||1,2);W.setPixelRatio(Ue),W.setSize(K,G),W.setClearColor(new De.Color(Se.background),1),W.domElement.dataset.gdsPart="shader-canvas",W.domElement.style.width="100%",W.domElement.style.height="100%",W.domElement.style.display="block",C.appendChild(W.domElement);let Re;try{Re=O({renderer:W,width:K,height:G,palette:Se});}catch(te){if(te instanceof kr)xe.current?.(te),Re=aa.space({renderer:W,width:K,height:G,palette:Se});else throw W.dispose(),W.domElement.parentElement===C&&C.removeChild(W.domElement),te}let Xe=ve.current,z=qp({renderer:W,scene:Re.scene,camera:Re.camera,preset:Xe,width:K,height:G}),$=new De.Clock,_=0,se=(d??l)&&!A,Ae=true,pe=()=>{if(_=requestAnimationFrame(pe),!se||p&&!Ae)return;let te=$.getDelta(),Pe=$.getElapsedTime();Re.update?.(Pe,te),z.composer.render(te);};Re.update?.(0,0),z.composer.render(0),N(true),pe();let It=new ResizeObserver(([te])=>{let Pe=Math.max(1,Math.floor(te.contentRect.width)),Ht=Math.max(1,Math.floor(te.contentRect.height));W.setSize(Pe,Ht),z.resize(Pe,Ht),Re.resize?.(Pe,Ht),se||(Re.update?.($.getElapsedTime(),0),z.composer.render(0));});It.observe(C);let Be=new IntersectionObserver(([te])=>{Ae=te.isIntersecting;},{threshold:.05});Be.observe(C);let St=new MutationObserver(()=>{if(!T.current)return;let te=vu(U.current,T.current);W.setClearColor(new De.Color(te.background),1),Re.setPalette?.(te);});St.observe(document.documentElement,{attributes:true,attributeFilter:["class","style","data-theme","data-gds-theme","data-grade-mode"]});let Ie=Re,jt=Ie.setMouse?te=>{let Pe=C.getBoundingClientRect(),Ht=(te.clientX-Pe.left)/Pe.width,Fo=1-(te.clientY-Pe.top)/Pe.height;Ie.setMouse(Ht,Fo);}:null;return jt&&C.addEventListener("pointermove",jt),Te.current={toggle:()=>{se=!se,B(se);},setRunning:te=>{se=te&&!A,B(se);},setPalette:te=>{W.setClearColor(new De.Color(te.background),1),Re.setPalette?.(te);},setPostPreset:te=>{let Pe=typeof te=="string"?sa[te]:te;Pe&&z.setPreset(Pe);}},()=>{cancelAnimationFrame(_),It.disconnect(),Be.disconnect(),St.disconnect(),jt&&C.removeEventListener("pointermove",jt),z.dispose(),Re.dispose?.(),W.dispose(),W.domElement.parentElement===C&&C.removeChild(W.domElement),Te.current=null;}},[O,ae,l,A,p,m,F,ge,x]);let Te=y.useRef(null);y.useEffect(()=>{Te.current?.setPostPreset(fe);},[fe]),y.useEffect(()=>{d!==void 0&&Te.current?.setRunning(d);},[d]);let ie=()=>Te.current?.toggle();return y.createElement(oo,{...w,ref:C=>{T.current=C,typeof S=="function"?S(C):S&&(S.current=C);},aspect:u,radius:b,border:f,"aria-label":g,className:v,style:k,"data-gds-part":"three-scene"},!V&&h&&y.createElement("img",{src:h,alt:"",className:"absolute inset-0 w-full h-full object-cover","data-gds-part":"scene-poster"}),s&&y.createElement("div",{"data-gds-part":"scene-controls",className:c("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")},y.createElement(ut,{size:"icon",variant:"secondary",onClick:ie},L?y.createElement(Pause,{className:"h-4 w-4"}):y.createElement(Play,{className:"h-4 w-4"}))))});Sr.displayName="ThreeScene";function wu(e,t,o){let r=e[t];return typeof r=="number"?r:o}function nn(e,t,o){let r=e[t];return typeof r=="string"?r:o}function ku(e,t,o){let r=e[t];return typeof r=="boolean"?r:o}function Su(e,t,o){let r=e[t];return Array.isArray(r)?r:o}function my(e,t){return e.display==="percent"?true:t==="percent"&&!e.unit&&e.step<1&&e.min>=0}function fy({controls:e,state:t,onChange:o,disabled:r,labelPosition:n="inline",format:a="raw",className:i}){return y.createElement("div",{className:c("flex flex-col",n==="above"?"gap-2.5":"gap-1",i)},e.map(s=>{if(s.type==="divider")return y.createElement("div",{key:s.key,className:"mt-2 mb-0.5 first:mt-0"},s.label?y.createElement("span",{className:"text-[11px] font-medium text-foreground/70"},s.label):null);if(s.type==="slider"){let d=wu(t,s.key,s.default);return y.createElement(ca,{key:s.key,labelPosition:n,label:s.label,value:y.createElement(gy,{spec:s,value:d,percent:my(s,a),disabled:r,onChange:p=>o(s.key,p)}),control:y.createElement(qo,{size:"sm",className:"flex-1",value:[d],min:s.min,max:s.max,step:s.step,disabled:r,"aria-label":s.label,onValueChange:p=>o(s.key,Math.min(s.max,Math.max(s.min,p[0]??s.default)))})})}if(s.type==="segmented"){let d=nn(t,s.key,s.default);return y.createElement(ca,{key:s.key,labelPosition:n,label:s.label,control:y.createElement(Xo,{type:"single",variant:"segmented",size:"2xs",value:d,disabled:r,onValueChange:p=>p&&o(s.key,p),className:n==="above"?"w-full":""},s.options.map(p=>y.createElement(Jo,{key:p.value,value:p.value,className:"px-2.5 text-[11px] font-medium"},p.label)))})}if(s.type==="select"){let d=nn(t,s.key,s.default);return y.createElement(ca,{key:s.key,labelPosition:n,label:s.label,control:y.createElement(An,{value:d,onValueChange:p=>o(s.key,p),disabled:r},y.createElement(Fa,{size:"xs",className:n==="above"?"w-full":"w-auto"},y.createElement(Dn,null)),y.createElement(za,{size:"xs"},s.options.map(p=>y.createElement(Ba,{key:p.value,value:p.value},p.label))))})}if(s.type==="toggle"){let d=ku(t,s.key,s.default);return y.createElement(ca,{key:s.key,labelPosition:n,label:s.label,control:y.createElement(Ga,{checked:d,onCheckedChange:p=>o(s.key,p),disabled:r})})}if(s.type==="color"){let d=nn(t,s.key,s.default);return y.createElement(ca,{key:s.key,labelPosition:n,label:s.label,hint:s.slot,control:y.createElement(Ru,{value:d,disabled:r,onChange:p=>o(s.key,p)})})}let l=Su(t,s.key,s.default);return y.createElement(hy,{key:s.key,spec:s,value:l,disabled:r,onChange:d=>o(s.key,d)})}))}function ca({labelPosition:e,label:t,hint:o,control:r,value:n}){let a=y.createElement(Wr,{size:"xs",className:c("text-muted-foreground",e==="inline"&&"w-24 shrink-0 truncate")},t,o?y.createElement("span",{className:"ml-1.5 text-[10px] text-muted-foreground/50"},o):null);return e==="above"?y.createElement("div",{className:"space-y-1"},y.createElement("div",{className:"flex items-baseline justify-between gap-2"},a,n),r):y.createElement("div",{className:"flex items-center gap-2"},a,y.createElement("div",{className:"flex min-w-0 flex-1 items-center justify-end gap-2"},r,n))}function gy({spec:e,value:t,percent:o,disabled:r,onChange:n}){let a=e.max-e.min||1,i=e.step<1?e.step<.1?3:2:0,s=h=>Math.min(e.max,Math.max(e.min,h)),l=h=>o?String(Math.round((h-e.min)/a*100)):h.toFixed(i),d=h=>{let g=Number(h.replace("%",""));return Number.isFinite(g)?(o&&(g=e.min+g/100*a),s(Math.round(g/e.step)*e.step)):null},p=o?"%":e.unit,[m,u]=y.useState(null),b=m??l(t),f=h=>{let g=d(h);g!==null&&n(g),u(null);};return y.createElement("div",{className:"flex w-14 shrink-0 items-center justify-end gap-0.5"},y.createElement(vo,{size:"2xs",variant:"ghost",inputMode:"decimal","aria-label":e.label,className:"w-full px-0 text-right tabular-nums",value:b,disabled:r,onChange:h=>u(h.currentTarget.value),onBlur:h=>f(h.currentTarget.value),onKeyDown:h=>{h.key==="Enter"&&f(h.currentTarget.value);}}),p?y.createElement("span",{className:"text-[9px] text-muted-foreground/50"},p):null)}function Ru({value:e,disabled:t,onChange:o}){return y.createElement("div",{className:"flex items-center gap-1.5"},y.createElement(vo,{size:"2xs",variant:"ghost",value:e,disabled:t,onChange:r=>o(r.currentTarget.value),className:"w-20 px-0 text-right font-mono","aria-label":"Colour value"}),y.createElement(_a,{color:e,size:"xs",shape:"rounded",onColorChange:t?void 0:o,className:t?"opacity-50":void 0}))}function hy({spec:e,value:t,disabled:o,onChange:r}){let n=e.min??1,a=e.max??8,i=(d,p)=>r(t.map((m,u)=>u===d?p:m)),s=()=>t.length<a&&r([...t,t[t.length-1]??"#ffffff"]),l=d=>t.length>n&&r(t.filter((p,m)=>m!==d));return y.createElement("div",null,y.createElement("div",{className:"flex items-center gap-2"},y.createElement(Wr,{size:"xs",className:"w-24 shrink-0 truncate text-muted-foreground"},e.label),y.createElement("div",{className:"flex flex-1 justify-end"},y.createElement("button",{type:"button",onClick:s,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"},y.createElement(Plus,null)))),y.createElement("div",{className:"mt-1 space-y-1 pl-24"},t.map((d,p)=>y.createElement("div",{key:p,className:"flex items-center justify-end gap-1.5"},y.createElement(Ru,{value:d,disabled:o,onChange:m=>i(p,m)}),y.createElement("button",{type:"button",onClick:()=>l(p),disabled:o||t.length<=n,"aria-label":"Remove colour",className:"inline-flex h-6 w-5 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"},y.createElement(Minus,null))))))}var by={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 sn(e){if(e)return by[e]??e}var vy={none:"rounded-none",sm:"rounded-sm",md:"rounded-md",lg:"rounded-lg",xl:"rounded-xl"},Cu={cover:"object-cover",contain:"object-contain",fill:"object-fill",none:"object-none"},Tu=y.forwardRef(({type:e,color:t,gradient:o,src:r,fit:n="cover",position:a="center",repeat:i=false,tileSize:s,preset:l,fragmentShader:d,palette:p,tone:m,postPreset:u,opacity:b,blendMode:f,radius:h="none",className:g,style:v},k)=>{if(e==="none")return null;let x={opacity:b,mixBlendMode:f,...v},w=null;if(e==="solid")x.background=sn(t)??"oklch(var(--background))";else if(e==="gradient"){let S=[sn(o?.from)??"oklch(var(--primary))",sn(o?.via),sn(o?.to)??"oklch(var(--accent))"].filter(Boolean);if(o?.shape==="radial"){let T=o.at??"center",L=o.size?`${o.size} `:"";x.backgroundImage=`radial-gradient(${L}at ${T}, ${S.join(", ")})`;}else {let T=o?.angle??135;x.backgroundImage=`linear-gradient(${T}deg, ${S.join(", ")})`;}}else e==="image"?i&&r?(x.backgroundImage=`url(${r})`,x.backgroundRepeat="repeat",x.backgroundPosition=a,s&&(x.backgroundSize=s)):r&&(w=y.createElement("img",{src:r,alt:"",className:c("absolute inset-0 h-full w-full",Cu[n]),style:{objectPosition:a}})):e==="video"?r&&(w=y.createElement("video",{src:r,autoPlay:true,muted:true,loop:true,playsInline:true,className:c("absolute inset-0 h-full w-full",Cu[n]),style:{objectPosition:a}})):e==="shader"&&(w=y.createElement(Sr,{preset:l,fragmentShader:d,palette:p,tone:m,postPreset:u,aspect:"auto",radius:"none",className:"absolute inset-0"}));return y.createElement("div",{ref:k,"data-gds-part":"frame-fill","data-gds-fill-type":e,"aria-hidden":"true",className:c("absolute inset-0 z-0 overflow-hidden pointer-events-none",h!=="none"&&vy[h],g),style:x},w)});Tu.displayName="BackgroundFill";var Pu={primary:"oklch(var(--primary))",secondary:"oklch(var(--accent))",accent:"oklch(var(--primary))",background:"oklch(var(--foreground))"};var ln=y.forwardRef(({preset:e,live:t="hover",postPreset:o,palette:r,className:n,aspect:a="video",radius:i="lg",label:s,hideLabel:l=false,onClick:d},p)=>{let m=ia[e],[u,b]=y.useState(false),f=t!=="never",h=t==="always"||t==="hover"&&u;return y.createElement("div",{ref:p,"data-gds-part":"picker-card","data-gds-preset":e,onMouseEnter:()=>b(true),onMouseLeave:()=>b(false),onClick:d,className:c("group cursor-pointer flex flex-col gap-2",n)},f?y.createElement(Sr,{key:e,preset:e,postPreset:o,palette:r??Pu,aspect:a,radius:i,autoPlay:false,play:h,controls:false,pauseOffscreen:true,releaseOffscreen:true,poster:m?.poster,maxDpr:1}):y.createElement(oo,{aspect:a,radius:i,"data-gds-part":"preset-poster",className:"bg-gradient-to-br from-muted to-muted/50"},m?.poster?y.createElement("img",{src:m.poster,alt:m.label,className:"w-full h-full object-cover"}):y.createElement("div",{className:"absolute inset-0 flex items-center justify-center text-xs text-muted-foreground"},m?.label??e)),!l&&y.createElement("div",{className:"flex items-baseline justify-between text-xs"},y.createElement("span",{className:"font-medium text-foreground","data-gds-part":"preset-label"},s??m?.label??e),m?.tags?.[0]&&y.createElement("span",{className:"text-muted-foreground"},m.tags[0])))});ln.displayName="ShaderPresetPreview";function Oi({value:e,onChange:t,filterTags:o,live:r="hover",postPreset:n,palette:a,columns:i=3,className:s}){let l=y.useMemo(()=>o?.length?na.filter(p=>o.some(m=>p.tags.includes(m))):na,[o]);return y.createElement("div",{"data-gds-part":"preset-grid",role:"radiogroup",className:c("grid grid-cols-2 gap-3",i===2?"md:grid-cols-2":i===4?"md:grid-cols-4":"md:grid-cols-3",s)},l.map(p=>{let m=e===p.id;return y.createElement("div",{key:p.id,className:"relative",role:"radio","aria-checked":m},y.createElement(ln,{preset:p.id,postPreset:n,palette:a,live:r,onClick:()=>t?.(p.id),className:c("transition-all",m&&"ring-2 ring-primary ring-offset-2 ring-offset-background rounded-lg")}),m&&y.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"},y.createElement(Check,{className:"h-3.5 w-3.5"})))}))}var cn=["primary","accent","secondary","muted","card","background","destructive","transparent"];function Ty(e){return e==="transparent"?"transparent":`oklch(var(--${e}))`}var Py=[{tab:"solid",icon:Square,label:"Solid"},{tab:"gradient",icon:Blend,label:"Gradient"},{tab:"image",icon:Image,label:"Image"},{tab:"pattern",icon:Grid3x3,label:"Pattern"},{tab:"video",icon:Video,label:"Video"},{tab:"shader",icon:Sparkles,label:"Shader"}];function My(e){return e.type==="image"&&e.repeat?"pattern":e.type==="image"?"image":e.type}var ao="text-[11px] font-medium text-muted-foreground";function Vi({token:e,active:t,onClick:o}){return y.createElement("button",{type:"button",title:e,onClick:o,className:c("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:Ty(e)}})}function Mu({value:e,onChange:t,className:o}){let r=My(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 y.createElement("div",{className:c("flex flex-col gap-3",o)},y.createElement(Xo,{type:"single",size:"sm",value:r,onValueChange:i=>a(i),className:"justify-start gap-0.5"},Py.map(({tab:i,icon:s,label:l})=>y.createElement(Jo,{key:i,value:i,"aria-label":l,title:l},y.createElement(s,{className:"h-4 w-4"})))),r==="solid"&&y.createElement("div",{className:"flex flex-col gap-1.5"},y.createElement("span",{className:ao},"Token"),y.createElement("div",{className:"flex flex-wrap gap-1.5"},cn.map(i=>y.createElement(Vi,{key:i,token:i,active:e.color===i,onClick:()=>n({color:i})})))),r==="gradient"&&y.createElement("div",{className:"flex flex-col gap-2"},y.createElement("div",{className:"flex flex-col gap-1.5"},y.createElement("span",{className:ao},"From"),y.createElement("div",{className:"flex flex-wrap gap-1.5"},cn.map(i=>y.createElement(Vi,{key:i,token:i,active:e.gradient?.from===i,onClick:()=>n({gradient:{...e.gradient,from:i}})})))),y.createElement("div",{className:"flex flex-col gap-1.5"},y.createElement("span",{className:ao},"To"),y.createElement("div",{className:"flex flex-wrap gap-1.5"},cn.map(i=>y.createElement(Vi,{key:i,token:i,active:e.gradient?.to===i,onClick:()=>n({gradient:{...e.gradient,to:i}})})))),y.createElement("div",{className:"flex flex-col gap-1.5"},y.createElement("span",{className:ao},"Angle \u2014 ",e.gradient?.angle??135,"\xB0"),y.createElement(qo,{value:[e.gradient?.angle??135],min:0,max:360,step:5,onValueChange:([i])=>n({gradient:{...e.gradient,angle:i}})}))),(r==="image"||r==="pattern")&&y.createElement("div",{className:"flex flex-col gap-2"},y.createElement("div",{className:"flex flex-col gap-1.5"},y.createElement("span",{className:ao},"Image URL"),y.createElement(vo,{size:"sm",value:e.src??"",placeholder:"https://\u2026 or /asset.png",onChange:i=>n({src:i.target.value})})),r==="image"&&y.createElement("div",{className:"flex flex-col gap-1.5"},y.createElement("span",{className:ao},"Fit"),y.createElement(Xo,{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=>y.createElement(Jo,{key:i,value:i,className:"px-2 text-[11px] capitalize"},i)))),r==="pattern"&&y.createElement("div",{className:"flex flex-col gap-1.5"},y.createElement("span",{className:ao},"Tile size"),y.createElement(vo,{size:"sm",value:e.tileSize??"",placeholder:"120px",onChange:i=>n({tileSize:i.target.value})}))),r==="video"&&y.createElement("div",{className:"flex flex-col gap-1.5"},y.createElement("span",{className:ao},"Video URL"),y.createElement(vo,{size:"sm",value:e.src??"",placeholder:"https://\u2026.mp4",onChange:i=>n({src:i.target.value})})),r==="shader"&&y.createElement("div",{className:"flex flex-col gap-1.5"},y.createElement("span",{className:ao},"Shader"),y.createElement(Oi,{value:e.preset,onChange:i=>n({preset:i}),live:"hover",columns:3})),e.type!=="none"&&y.createElement("div",{className:"flex items-center gap-2 border-t border-border/50 pt-2.5"},y.createElement("span",{className:c(ao,"shrink-0")},"Opacity"),y.createElement(qo,{value:[e.opacity??1],min:0,max:1,step:.05,onValueChange:([i])=>n({opacity:i}),className:"flex-1"}),y.createElement("span",{className:"w-9 shrink-0 text-right text-[11px] tabular-nums text-foreground"},Math.round((e.opacity??1)*100),"%")))}Mu.displayName="FillPicker";function Ay({children:e}){let t=useRef(null);return useEffect(()=>{let o=new Ly({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;}},[]),y.createElement(y.Fragment,null,e)}function zy({className:e}){let t=tr();if(!t)return null;let{theme:o,themes:r,setThemeId:n,deleteTheme:a}=t;return y.createElement(Xt,null,y.createElement(Jt,{asChild:true},y.createElement(ut,{variant:"ghost",size:"sm",className:c("gap-2",e),"aria-label":"Switch theme"},y.createElement(Palette,{className:"h-4 w-4"}),y.createElement("span",{className:"hidden sm:inline"},o.name))),y.createElement(Gt,{className:"w-80 p-2",align:"end"},y.createElement("div",{className:"flex items-start justify-between gap-2 px-2 py-1.5 mb-1"},y.createElement("div",null,y.createElement("div",{className:"text-xs font-medium text-muted-foreground"},"Theme"),y.createElement("div",{className:"text-xs text-muted-foreground/80"},"Switch the skin applied site-wide.")),y.createElement("button",{type:"button",onClick:()=>li(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"},y.createElement(Download,{className:"h-3 w-3"}),".md")),y.createElement("div",{className:"flex flex-col gap-0.5"},r.map(i=>{let s=i.id===o.id,l=i.id in to,d=i.ramps.primary[500],p=i.ramps.accent[500],m=i.ramps.neutral[500];return y.createElement("div",{key:i.id,className:c("group flex items-start gap-3 rounded-md px-2 py-2 text-left transition-colors","hover:bg-muted",s&&"bg-muted")},y.createElement("button",{type:"button",onClick:()=>n(i.id),className:"flex items-start gap-3 flex-1 min-w-0 text-left"},y.createElement("div",{className:"mt-0.5 flex shrink-0 overflow-hidden rounded-md border border-border"},y.createElement("div",{className:"h-5 w-2.5",style:{background:`oklch(${d})`},"aria-hidden":true}),y.createElement("div",{className:"h-5 w-2.5",style:{background:`oklch(${p})`},"aria-hidden":true}),y.createElement("div",{className:"h-5 w-2.5",style:{background:`oklch(${m})`},"aria-hidden":true})),y.createElement("div",{className:"min-w-0 flex-1"},y.createElement("div",{className:"flex items-center gap-2"},y.createElement("span",{className:"text-sm font-medium truncate text-foreground"},i.name),i.tagline&&y.createElement("span",{className:"text-[10px] uppercase tracking-wide text-muted-foreground shrink-0"},i.tagline)),i.description&&y.createElement("div",{className:"text-xs text-muted-foreground line-clamp-2"},i.description))),s&&y.createElement(Check,{className:"mt-2 h-4 w-4 shrink-0 text-primary"}),!l&&!s&&y.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}`},y.createElement(Trash2,{className:"h-3.5 w-3.5"})))}))))}var Nu=[{mode:"superLight",label:"Super light",icon:SunDim,tooltip:"Super light \u2014 airy, low contrast"},{mode:"light",label:"Light",icon:Sun,tooltip:"Light"},{mode:"dark",label:"Dark",icon:Moon,tooltip:"Dark"},{mode:"superDark",label:"Super dark",icon:MoonStar,tooltip:"Super dark \u2014 OLED, high contrast"}];function Gy({className:e,variant:t="icons"}){let o=tr();if(!o)return null;let{mode:r,setMode:n}=o;return t==="labeled"?y.createElement("div",{role:"radiogroup","aria-label":"Brightness mode",className:c("inline-flex flex-wrap gap-1 rounded-md border border-border bg-background p-1",e)},Nu.map(({mode:a,label:i,icon:s})=>{let l=r===a;return y.createElement("button",{key:a,type:"button",role:"radio","aria-checked":l,onClick:()=>n(a),className:c("flex items-center gap-2 rounded px-3 py-1.5 text-sm transition-colors",l?"bg-primary text-primary-foreground":"hover:bg-accent hover:text-accent-foreground")},y.createElement(s,{className:"h-4 w-4"}),y.createElement("span",null,i))})):y.createElement("div",{role:"radiogroup","aria-label":"Brightness mode",className:c("inline-flex items-center gap-0.5 rounded-md border border-border bg-background p-0.5",e)},Nu.map(({mode:a,icon:i,tooltip:s})=>{let l=r===a;return y.createElement("button",{key:a,type:"button",role:"radio","aria-checked":l,"aria-label":s,title:s,onClick:()=>n(a),className:c("flex h-7 w-7 items-center justify-center rounded transition-colors",l?"bg-primary text-primary-foreground":"text-muted-foreground hover:bg-accent hover:text-accent-foreground")},y.createElement(i,{className:"h-3.5 w-3.5"}))}))}function $y(){let{isDark:e,setMode:t}=fi();return y.createElement(ut,{variant:"ghost",size:"sm",onClick:()=>t(e?"light":"dark"),className:"gap-2","aria-label":e?"Switch to light mode":"Switch to dark mode"},e?y.createElement(y.Fragment,null,y.createElement(Sun,{className:"h-4 w-4"}),y.createElement("span",{className:"hidden sm:inline"},"Light")):y.createElement(y.Fragment,null,y.createElement(Moon,{className:"h-4 w-4"}),y.createElement("span",{className:"hidden sm:inline"},"Dark")))}
1294
- export{cp as ALL_MODES,cm as Accordion,pl as AccordionContent,cl as AccordionItem,dl as AccordionTrigger,kl as AppShell,Cl as AppShellAside,Pl as AppShellFooter,Sl as AppShellHeader,Tl as AppShellMain,Rl as AppShellNav,Nl as Avatar,Ll as AvatarFallback,El as AvatarImage,qa as BUILT_IN_INPUTS,Tu as BackgroundFill,ma as Badge,Hl as Banner,Ta as BlinkingCursor,vd as Breadcrumb,Rd as BreadcrumbEllipsis,xd as BreadcrumbItem,wd as BreadcrumbLink,yd as BreadcrumbList,Cd as BreadcrumbMenuTrigger,kd as BreadcrumbPage,Sd as BreadcrumbSeparator,ut as Button,gn as COMPONENT_CONTRACTS,ga as Calendar,zl as CalendarDayButton,ml as Callout,gl as CalloutDescription,fl as CalloutTitle,Bl as Card,Gl as CardContent,Vl as CardDescription,Wl as CardFooter,_l as CardHeader,Ol as CardTitle,Mm as Carousel,yn as CarouselArrows,vn as CarouselDots,Hr as CarouselNext,Ir as CarouselPrev,ha as CarouselSlide,bn as CarouselVideoSlide,Dd as ChartContainer,Nh as ChartLegend,Fd as ChartLegendContent,Id as ChartStyle,Mh as ChartTooltip,Hd as ChartTooltipContent,Ul as Checkbox,Kl as CheckboxCard,oc as Code,sc as Composer,Qf as ComposerReply,mr as DEMO_SPEED_PRESETS,rg as DatePicker,ag as DateRangePicker,Ql as DemoStage,ig as Dialog,lg as DialogClose,dc as DialogContent,fc as DialogDescription,uc as DialogFooter,pc as DialogHeader,Sn as DialogOverlay,cc as DialogPortal,mc as DialogTitle,sg as DialogTrigger,ug as DropdownMenu,xc as DropdownMenuCheckboxItem,vc as DropdownMenuContent,fg as DropdownMenuGroup,yc as DropdownMenuItem,kc as DropdownMenuLabel,gg as DropdownMenuPortal,bg as DropdownMenuRadioGroup,wc as DropdownMenuRadioItem,Sc as DropdownMenuSeparator,Rc as DropdownMenuShortcut,hg as DropdownMenuSub,bc as DropdownMenuSubContent,hc as DropdownMenuSubTrigger,mg as DropdownMenuTrigger,cn as FILL_TOKENS,tu as FRAGMENT_HEADER,Lm as Field,va as FieldDescription,ba as FieldLabel,ya as FieldTrailing,Mu as FillPicker,Hc as Flex,mb as GRADE_PRE_HYDRATION_SCRIPT,Dp as GradeLoader,Gy as GradeModeSwitcher,fb as GradeThemeProvider,zy as GradeThemeSwitcher,Dc as Grid,vo as Input,Wr as Label,Ay as LenisProvider,sv as Logo,Br as MOTION_ATTR,hi as Map,bi as MapMarker,oo as MediaSurface,un as MediaSurfaceContract,Jm as Message,Fv as Motion,Ci as MotionOverlay,Tv as MotionScene,Vp as MotionScreen,Wp as MotionText,Pc as MultiSelect,Xt as Popover,eg as PopoverAnchor,Gt as PopoverContent,Jt as PopoverTrigger,Tc as Progress,jl as RadioCard,Mc as RadioGroup,Nc as RadioGroupItem,Dg as ResizableHandle,Ag as ResizablePanel,Lg as ResizablePanelGroup,ec as Reveal,Lp as RivePlayer,Lc as Row,wi as ScreenAnimator,Fc as ScrollArea,Ln as ScrollBar,An as Select,za as SelectContent,Gg as SelectGroup,Ba as SelectItem,_c as SelectLabel,Fn as SelectScrollDownButton,Hn as SelectScrollUpButton,Oc as SelectSeparator,Fa as SelectTrigger,Dn as SelectValue,jr as Separator,kr as ShaderCompileError,fy as ShaderControls,Oi as ShaderPresetPicker,ln as ShaderPresetPreview,Qg as Sheet,th as SheetClose,$c as SheetContent,Yc as SheetDescription,Kc as SheetFooter,jc as SheetHeader,zn as SheetOverlay,Uc as SheetPortal,qc as SheetTitle,eh as SheetTrigger,Lo as Sidebar,Yn as SidebarContent,Zn as SidebarFooter,qn as SidebarHeader,Jn as SidebarItem,Xn as SidebarSection,Qn as SidebarTreeItem,rh as Skeleton,qo as Slider,hh as Sortable,_n as SortableGroup,Vn as SortableHandle,On as SortableItem,sd as Stack,_a as Swatch,Wc as SwatchGroup,Ga as Switch,ql as SwitchCard,cd as Table,pd as TableBody,hd as TableCaption,gd as TableCell,ud as TableFooter,fd as TableHead,dd as TableHeader,md as TableRow,Rh as Tabs,Ed as TabsContent,Md as TabsList,Nd as TabsTrigger,zd as Textarea,$y as ThemeToggle,Sr as ThreeScene,Bd as Toggle,Xo as ToggleGroup,Jo as ToggleGroupItem,Od as Toolbar,Vd as ToolbarSlot,Yo as Tooltip,Eo as TooltipContent,Wn as TooltipProvider,Zo as TooltipTrigger,Ep as VideoPlayer,yl as appShellAsideVariants,wl as appShellFooterVariants,bl as appShellHeaderVariants,xl as appShellMainVariants,vl as appShellNavVariants,Ya as applyThemeToRoot,Dl as badgeVariants,Il as bannerVariants,We as buildFragmentShaderScene,to as builtInThemes,Dr as buttonVariants,ul as calloutVariants,ta as calmInput,c as cn,rn as defaultPostPreset,xr as defaultThemeId,pi as deleteUserTheme,Ce as demoSleep,Ra as demoTypeText,ub as duplicateTheme,ri as energyInput,Ic as flexVariants,Qo as generateTheme,am as getComponentContract,er as getTheme,Ac as gridVariants,nm as listContractedComponents,ci as listThemes,sp as listUserThemes,di as loadUserThemeInput,sa as postPresets,Ec as rowVariants,Xa as saveUserTheme,aa as sceneRegistry,zm as setMotion,ia as shaderPresetById,na as shaderPresets,hl as shellVariants,id as stackVariants,Vc as swatchVariants,ii as themeToCSSVars,ja as toggleVariants,Nm as useCarouselApi,fi as useGradeTheme,tr as useMaybeGradeTheme,Ri as useMotionScene,_r as usePageActive,Co as usePrefersReducedMotion,fo as useReducedMotion,To as useScriptedDemo};//# sourceMappingURL=index.mjs.map
1293
+ `,ps);var wr={space:fu,plasma:hu,voronoi:bu,synthwave:vu,mesh:ku,waves:Tu,undertones:Su,"flowing-dots":Ru,grain:Cu,glass:Pu,holographic:Mu,fluid:Nu,aurora:Eu,caustics:Lu,ribbon:Du,concentric:Au,vortex:Iu,spectral:Hu,halftone:Fu,digital:zu},kr=[{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:"holographic",label:"Holographic foil",description:"Iridescent foil \u2014 a brushed diagonal grain (a diffraction grating) under a spectrum that sweeps across the sheet in dense shimmering bands, with metallic glints riding the grain. The spectrum cycles the brand colours (secondary \u2192 primary \u2192 accent) so it re-tints with the theme rather than being a fixed rainbow. The cursor acts as the view angle, sliding the whole spectrum like tilting a holographic card.",tags:["holographic","foil","iridescent","diffraction","grain","mouse","hero","background"],scene:"holographic",defaultPostPreset:"none"},{id:"glass",label:"Studio glass",description:"A brand-tinted wash seen through a sheet of frosted, slumped glass \u2014 chromatic refraction fringes the edges, anisotropic specular streaks catch a moving key light, and a faint caustic shimmer pools in the folds. The glass bulges toward the cursor like a lens and the highlight tracks it. The expensive, tactile backdrop; lovely in light AND dark tones.",tags:["glass","frosted","refraction","caustic","mouse","soft","hero","background"],scene:"glass",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"},{id:"fluid",label:"Fluid",description:"Soft liquid metaballs \u2014 large slow blobs of palette colour merge and split like a lava lamp. The cursor warps the liquid around it.",tags:["lava lamp","liquid","metaballs","organic","gradient","ambient","background"],scene:"fluid",defaultPostPreset:"none",controls:as},{id:"aurora",label:"Aurora",description:"Vertical curtains of northern-light ribbons drift and shimmer over a dark sky, with a faint star field. Lovely on dark surfaces.",tags:["aurora","northern lights","ribbons","dark","glow","atmospheric","background"],scene:"aurora",defaultPostPreset:"none",controls:rs},{id:"caustics",label:"Water caustics",description:"Animated underwater caustic light net \u2014 bright cellular veins ripple across a tinted water surface, with depth-graded colour and a pointer ripple.",tags:["caustics","water","underwater","ripple","cellular","light","background"],scene:"caustics",defaultPostPreset:"none",controls:ns},{id:"ribbon",label:"Flowing ribbon",description:"A silky satin ribbon sweeps and folds across the frame, catching shifting palette colours with an iridescent specular sheen on a light ground.",tags:["ribbon","satin","iridescent","elegant","light","hero","background"],scene:"ribbon",defaultPostPreset:"none",controls:is},{id:"concentric",label:"Concentric",description:"Concentric rings ripple outward from a centre with soft moir\xE9 interference and a gentle pulse. The centre can follow the cursor.",tags:["rings","ripple","moire","radial","hypnotic","background"],scene:"concentric",defaultPostPreset:"none",controls:ss},{id:"vortex",label:"Deep vortex",description:"A dark radial vortex of spiralling streaks pulling into a deep centre, dusted with starfield sparkle. Brooding and atmospheric.",tags:["vortex","spiral","dark","cosmic","radial","atmospheric","background"],scene:"vortex",defaultPostPreset:"none",controls:ls},{id:"spectral",label:"Spectral bloom",description:"A kaleidoscopic radial spectrum burst \u2014 petals of shifting spectrum colour bloom from a cursor-driven centre over a dark ground.",tags:["radial","spectrum","kaleidoscope","bloom","luminous","background"],scene:"spectral",defaultPostPreset:"none",controls:cs},{id:"halftone",label:"Halftone pop",description:"A bold pop-art halftone field \u2014 a palette gradient resolved into a rotated grid of luminance-sized print dots, with a diagonal sweep and mouse swell.",tags:["halftone","pop-art","retro","print","dots","gradient","background"],scene:"halftone",defaultPostPreset:"none",controls:ds},{id:"digital",label:"Digital grid",description:"A techy data-activity field \u2014 a grid of cells lighting up in travelling waves with scanning pulses, a glowing ring, and a mouse spotlight on a near-black ground.",tags:["grid","digital","data","techy","scanline","glow","background"],scene:"digital",defaultPostPreset:"none",controls:ps}],Sr=Object.fromEntries(kr.map(e=>[e.id,e]));var Rr={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}}}},Ln="vhs";var Cr={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))"},Uy={dark:"oklch(0.13 0.015 265)",light:"oklch(0.97 0.005 265)"},$y=/^[\d.]+\s+[\d.]+\s+[\d.]+(?:\s*\/\s*[\d.%]+)?$/,jy=/^[\d.]+\s+[\d.]+%\s+[\d.]+%(?:\s*\/\s*[\d.%]+)?$/,Ky=/^\s*var\(\s*(--[^,)\s]+)(?:\s*,[^)]*)?\s*\)\s*$/;function Dn(e,t,o){if(typeof document>"u")return o;let a=e,n=Ky.exec(e);if(n){let l=getComputedStyle(t).getPropertyValue(n[1]).trim();l&&($y.test(l)?a=`oklch(${l})`:jy.test(l)&&(a=`hsl(${l})`));}let r=document.createElement("span");if(r.style.color="",r.style.color=a,r.style.color==="")return o;r.style.display="none",t.appendChild(r);let i=getComputedStyle(r).color;if(t.removeChild(r),!i)return o;if(i.startsWith("rgb"))return i;try{let l=document.createElement("canvas");l.width=1,l.height=1;let s=l.getContext("2d");if(!s)return i;s.clearRect(0,0,1,1),s.fillStyle=i,s.fillRect(0,0,1,1);let[c,p,m]=s.getImageData(0,0,1,1).data;return `rgb(${c}, ${p}, ${m})`}catch{return i}}function Bu(e,t){return {primary:Dn(e.primary,t,Cr.primary),secondary:Dn(e.secondary,t,Cr.secondary),accent:Dn(e.accent,t,Cr.accent),background:Dn(e.background,t,Cr.background)}}var qy=12,us=new Set,Yy=0;function _u(){[...us].sort((t,o)=>o.touched-t.touched).forEach((t,o)=>t.setGranted(o<qy));}function Zy(e){e.touched=++Yy,us.add(e),_u();}function Vu(e){us.delete(e)&&_u();}var Ia=y.forwardRef(({preset:e,fragmentShader:t,onShaderError:o,postPreset:a,palette:n,tone:r="auto",createScene:i,controls:l=false,autoPlay:s=true,play:c,pauseOffscreen:p=true,releaseOffscreen:m=false,aspect:u="video",radius:g="lg",border:h=false,poster:f,label:b,className:v,style:S,maxDpr:x,...w},k)=>{let C=y.useRef(null),[E,F]=y.useState(c??s),[O,M]=y.useState(false),N=Io(),[H,Y]=y.useState(!m),[se,D]=y.useState(!m),V=y.useRef(null);y.useEffect(()=>{if(!m){D(true);return}let T={touched:0,setGranted:D};return V.current=T,()=>{Vu(T),V.current=null;}},[m]),y.useEffect(()=>{if(!m)return;let T=V.current;T&&(H?Zy(T):Vu(T));},[H,m]),y.useEffect(()=>{if(!m){Y(true);return}let T=C.current;if(!T)return;let Z=new IntersectionObserver(([$])=>Y($.isIntersecting),{rootMargin:"0px",threshold:0});return Z.observe(T),()=>Z.disconnect()},[m]);let R=y.useMemo(()=>{let T={...Cr,...n};return r!=="auto"&&!n?.background&&(T.background=Uy[r]),T},[n,r]),_=y.useMemo(()=>i||(t?$e(t):e&&wr[e]?wr[e]:null),[i,t,e]),le=y.useMemo(()=>{if(a&&typeof a=="object")return a;let T=typeof a=="string"?a:(e?Sr[e]?.defaultPostPreset:void 0)??Ln;return Rr[T]??Rr[Ln]},[a,e]),X=y.useRef(le);X.current=le;let U=y.useRef(R);U.current=R;let J=y.useMemo(()=>JSON.stringify(R??null),[R]),ke=y.useRef(o);ke.current=o,y.useEffect(()=>{let T=C.current;if(!T||!_)return;if(m&&(!H||!se)){M(false);return}let Z=T.clientWidth||1,$=T.clientHeight||1,Se=Bu(U.current,T),j=new He.WebGLRenderer({antialias:true,alpha:false,powerPreference:"high-performance"}),je=x??Math.min(window.devicePixelRatio||1,2);j.setPixelRatio(je),j.setSize(Z,$),j.setClearColor(new He.Color(Se.background),1),j.domElement.dataset.gdsPart="shader-canvas",j.domElement.style.width="100%",j.domElement.style.height="100%",j.domElement.style.display="block",T.appendChild(j.domElement);let Te;try{Te=_({renderer:j,width:Z,height:$,palette:Se});}catch(re){if(re instanceof Aa)ke.current?.(re),Te=wr.space({renderer:j,width:Z,height:$,palette:Se});else throw j.dispose(),j.domElement.parentElement===T&&T.removeChild(j.domElement),re}let Qe=X.current,G=gu({renderer:j,scene:Te.scene,camera:Te.camera,preset:Qe,width:Z,height:$}),K=new He.Clock,W=0,pe=(c??s)&&!N,Ie=true,he=()=>{if(W=requestAnimationFrame(he),!pe||p&&!Ie)return;let re=K.getDelta(),Me=K.getElapsedTime();Te.update?.(Me,re),G.composer.render(re);};Te.update?.(0,0),G.composer.render(0),M(true),he();let Gt=new ResizeObserver(([re])=>{let Me=Math.max(1,Math.floor(re.contentRect.width)),Wt=Math.max(1,Math.floor(re.contentRect.height));j.setSize(Me,Wt),G.resize(Me,Wt),Te.resize?.(Me,Wt),pe||(Te.update?.(K.getElapsedTime(),0),G.composer.render(0));});Gt.observe(T);let _e=new IntersectionObserver(([re])=>{Ie=re.isIntersecting;},{threshold:.05});_e.observe(T);let Mt=new MutationObserver(()=>{if(!C.current)return;let re=Bu(U.current,C.current);j.setClearColor(new He.Color(re.background),1),Te.setPalette?.(re);});Mt.observe(document.documentElement,{attributes:true,attributeFilter:["class","style","data-theme","data-gds-theme","data-grade-mode"]});let Fe=Te,Qt=Fe.setMouse?re=>{let Me=T.getBoundingClientRect(),Wt=(re.clientX-Me.left)/Me.width,jo=1-(re.clientY-Me.top)/Me.height;Fe.setMouse(Wt,jo);}:null;return Qt&&T.addEventListener("pointermove",Qt),De.current={toggle:()=>{pe=!pe,F(pe);},setRunning:re=>{pe=re&&!N,F(pe);},setPalette:re=>{j.setClearColor(new He.Color(re.background),1),Te.setPalette?.(re);},setPostPreset:re=>{let Me=typeof re=="string"?Rr[re]:re;Me&&G.setPreset(Me);}},()=>{cancelAnimationFrame(W),Gt.disconnect(),_e.disconnect(),Mt.disconnect(),Qt&&T.removeEventListener("pointermove",Qt),G.dispose(),Te.dispose?.(),j.dispose(),j.domElement.parentElement===T&&T.removeChild(j.domElement),De.current=null;}},[_,J,s,N,p,m,H,se,x]);let De=y.useRef(null);y.useEffect(()=>{De.current?.setPostPreset(le);},[le]),y.useEffect(()=>{c!==void 0&&De.current?.setRunning(c);},[c]);let de=()=>De.current?.toggle();return y.createElement(so,{...w,ref:T=>{C.current=T,typeof k=="function"?k(T):k&&(k.current=T);},aspect:u,radius:g,border:h,"aria-label":b,className:v,style:S,"data-gds-part":"three-scene"},!O&&f&&y.createElement("img",{src:f,alt:"",className:"absolute inset-0 w-full h-full object-cover","data-gds-part":"scene-poster"}),l&&y.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")},y.createElement(et,{size:"icon",variant:"secondary",onClick:de},E?y.createElement(Pause,{className:"h-4 w-4"}):y.createElement(Play,{className:"h-4 w-4"}))))});Ia.displayName="ThreeScene";function Ou(e,t,o){let a=e[t];return typeof a=="number"?a:o}function An(e,t,o){let a=e[t];return typeof a=="string"?a:o}function Gu(e,t,o){let a=e[t];return typeof a=="boolean"?a:o}function Wu(e,t,o){let a=e[t];return Array.isArray(a)?a:o}function Qy(e,t){return e.display==="percent"?true:t==="percent"&&!e.unit&&e.step<1&&e.min>=0}function e0({controls:e,state:t,onChange:o,disabled:a,labelPosition:n="inline",format:r="raw",className:i}){return y.createElement("div",{className:d("flex flex-col",n==="above"?"gap-2.5":"gap-1",i)},e.map(l=>{if(l.type==="divider")return y.createElement("div",{key:l.key,className:"mt-2 mb-0.5 first:mt-0"},l.label?y.createElement("span",{className:"text-[11px] font-medium text-foreground/70"},l.label):null);if(l.type==="slider"){let c=Ou(t,l.key,l.default);return y.createElement(Tr,{key:l.key,labelPosition:n,label:l.label,value:y.createElement(t0,{spec:l,value:c,percent:Qy(l,r),disabled:a,onChange:p=>o(l.key,p)}),control:y.createElement(sa,{size:"sm",className:"flex-1",value:[c],min:l.min,max:l.max,step:l.step,disabled:a,"aria-label":l.label,onValueChange:p=>o(l.key,Math.min(l.max,Math.max(l.min,p[0]??l.default)))})})}if(l.type==="segmented"){let c=An(t,l.key,l.default);return y.createElement(Tr,{key:l.key,labelPosition:n,label:l.label,control:y.createElement(Co,{type:"single",variant:"segmented",size:"2xs",value:c,disabled:a,onValueChange:p=>p&&o(l.key,p),className:n==="above"?"w-full":""},l.options.map(p=>y.createElement(To,{key:p.value,value:p.value,className:"px-2.5 text-[11px] font-medium"},p.label)))})}if(l.type==="select"){let c=An(t,l.key,l.default);return y.createElement(Tr,{key:l.key,labelPosition:n,label:l.label,control:y.createElement(si,{value:c,onValueChange:p=>o(l.key,p),disabled:a},y.createElement(mn,{size:"xs",className:n==="above"?"w-full":"w-auto"},y.createElement(li,null)),y.createElement(gn,{size:"xs"},l.options.map(p=>y.createElement(fn,{key:p.value,value:p.value},p.label))))})}if(l.type==="toggle"){let c=Gu(t,l.key,l.default);return y.createElement(Tr,{key:l.key,labelPosition:n,label:l.label,control:y.createElement(vn,{checked:c,onCheckedChange:p=>o(l.key,p),disabled:a})})}if(l.type==="color"){let c=An(t,l.key,l.default);return y.createElement(Tr,{key:l.key,labelPosition:n,label:l.label,hint:l.slot,control:y.createElement(Uu,{value:c,disabled:a,onChange:p=>o(l.key,p)})})}let s=Wu(t,l.key,l.default);return y.createElement(o0,{key:l.key,spec:l,value:s,disabled:a,onChange:c=>o(l.key,c)})}))}function Tr({labelPosition:e,label:t,hint:o,control:a,value:n}){let r=y.createElement(er,{size:"xs",className:d("text-muted-foreground",e==="inline"&&"w-24 shrink-0 truncate")},t,o?y.createElement("span",{className:"ml-1.5 text-[10px] text-muted-foreground/50"},o):null);return e==="above"?y.createElement("div",{className:"space-y-1"},y.createElement("div",{className:"flex items-baseline justify-between gap-2"},r,n),a):y.createElement("div",{className:"flex items-center gap-2"},r,y.createElement("div",{className:"flex min-w-0 flex-1 items-center justify-end gap-2"},a,n))}function t0({spec:e,value:t,percent:o,disabled:a,onChange:n}){let r=e.max-e.min||1,i=e.step<1?e.step<.1?3:2:0,l=f=>Math.min(e.max,Math.max(e.min,f)),s=f=>o?String(Math.round((f-e.min)/r*100)):f.toFixed(i),c=f=>{let b=Number(f.replace("%",""));return Number.isFinite(b)?(o&&(b=e.min+b/100*r),l(Math.round(b/e.step)*e.step)):null},p=o?"%":e.unit,[m,u]=y.useState(null),g=m??s(t),h=f=>{let b=c(f);b!==null&&n(b),u(null);};return y.createElement("div",{className:"flex w-14 shrink-0 items-center justify-end gap-0.5"},y.createElement(So,{size:"2xs",variant:"ghost",inputMode:"decimal","aria-label":e.label,className:"w-full px-0 text-right tabular-nums",value:g,disabled:a,onChange:f=>u(f.currentTarget.value),onBlur:f=>h(f.currentTarget.value),onKeyDown:f=>{f.key==="Enter"&&h(f.currentTarget.value);}}),p?y.createElement("span",{className:"text-[9px] text-muted-foreground/50"},p):null)}function Uu({value:e,disabled:t,onChange:o}){return y.createElement("div",{className:"flex items-center gap-1.5"},y.createElement(So,{size:"2xs",variant:"ghost",value:e,disabled:t,onChange:a=>o(a.currentTarget.value),className:"w-20 px-0 text-right font-mono","aria-label":"Colour value"}),y.createElement(hn,{color:e,size:"xs",shape:"rounded",onColorChange:t?void 0:o,className:t?"opacity-50":void 0}))}function o0({spec:e,value:t,disabled:o,onChange:a}){let n=e.min??1,r=e.max??8,i=(c,p)=>a(t.map((m,u)=>u===c?p:m)),l=()=>t.length<r&&a([...t,t[t.length-1]??"#ffffff"]),s=c=>t.length>n&&a(t.filter((p,m)=>m!==c));return y.createElement("div",null,y.createElement("div",{className:"flex items-center gap-2"},y.createElement(er,{size:"xs",className:"w-24 shrink-0 truncate text-muted-foreground"},e.label),y.createElement("div",{className:"flex flex-1 justify-end"},y.createElement("button",{type:"button",onClick:l,disabled:o||t.length>=r,"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"},y.createElement(Plus,null)))),y.createElement("div",{className:"mt-1 space-y-1 pl-24"},t.map((c,p)=>y.createElement("div",{key:p,className:"flex items-center justify-end gap-1.5"},y.createElement(Uu,{value:c,disabled:o,onChange:m=>i(p,m)}),y.createElement("button",{type:"button",onClick:()=>s(p),disabled:o||t.length<=n,"aria-label":"Remove colour",className:"inline-flex h-6 w-5 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"},y.createElement(Minus,null))))))}var a0={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 In(e){if(e)return a0[e]??e}var r0={none:"rounded-none",sm:"rounded-sm",md:"rounded-md",lg:"rounded-lg",xl:"rounded-xl"},$u={cover:"object-cover",contain:"object-contain",fill:"object-fill",none:"object-none"},ju=y.forwardRef(({type:e,color:t,gradient:o,src:a,fit:n="cover",position:r="center",repeat:i=false,tileSize:l,preset:s,fragmentShader:c,palette:p,tone:m,postPreset:u,opacity:g,blendMode:h,radius:f="none",className:b,style:v},S)=>{if(e==="none")return null;let x={opacity:g,mixBlendMode:h,...v},w=null;if(e==="solid")x.background=In(t)??"oklch(var(--background))";else if(e==="gradient"){let k=[In(o?.from)??"oklch(var(--primary))",In(o?.via),In(o?.to)??"oklch(var(--accent))"].filter(Boolean);if(o?.shape==="radial"){let C=o.at??"center",E=o.size?`${o.size} `:"";x.backgroundImage=`radial-gradient(${E}at ${C}, ${k.join(", ")})`;}else {let C=o?.angle??135;x.backgroundImage=`linear-gradient(${C}deg, ${k.join(", ")})`;}}else e==="image"?i&&a?(x.backgroundImage=`url(${a})`,x.backgroundRepeat="repeat",x.backgroundPosition=r,l&&(x.backgroundSize=l)):a&&(w=y.createElement("img",{src:a,alt:"",className:d("absolute inset-0 h-full w-full",$u[n]),style:{objectPosition:r}})):e==="video"?a&&(w=y.createElement("video",{src:a,autoPlay:true,muted:true,loop:true,playsInline:true,className:d("absolute inset-0 h-full w-full",$u[n]),style:{objectPosition:r}})):e==="shader"&&(w=y.createElement(Ia,{preset:s,fragmentShader:c,palette:p,tone:m,postPreset:u,aspect:"auto",radius:"none",className:"absolute inset-0"}));return y.createElement("div",{ref:S,"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"&&r0[f],b),style:x},w)});ju.displayName="BackgroundFill";var Ku={primary:"oklch(var(--primary))",secondary:"oklch(var(--accent))",accent:"oklch(var(--primary))",background:"oklch(var(--foreground))"};var Hn=y.forwardRef(({preset:e,live:t="hover",postPreset:o,palette:a,className:n,aspect:r="video",radius:i="lg",label:l,hideLabel:s=false,onClick:c},p)=>{let m=Sr[e],[u,g]=y.useState(false),h=t!=="never",f=t==="always"||t==="hover"&&u;return y.createElement("div",{ref:p,"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?y.createElement(Ia,{key:e,preset:e,postPreset:o,palette:a??Ku,aspect:r,radius:i,autoPlay:false,play:f,controls:false,pauseOffscreen:true,releaseOffscreen:true,poster:m?.poster,maxDpr:1}):y.createElement(so,{aspect:r,radius:i,"data-gds-part":"preset-poster",className:"bg-gradient-to-br from-muted to-muted/50"},m?.poster?y.createElement("img",{src:m.poster,alt:m.label,className:"w-full h-full object-cover"}):y.createElement("div",{className:"absolute inset-0 flex items-center justify-center text-xs text-muted-foreground"},m?.label??e)),!s&&y.createElement("div",{className:"flex items-baseline justify-between text-xs"},y.createElement("span",{className:"font-medium text-foreground","data-gds-part":"preset-label"},l??m?.label??e),m?.tags?.[0]&&y.createElement("span",{className:"text-muted-foreground"},m.tags[0])))});Hn.displayName="ShaderPresetPreview";function ms({value:e,onChange:t,filterTags:o,live:a="hover",postPreset:n,palette:r,columns:i=3,className:l}){let s=y.useMemo(()=>o?.length?kr.filter(p=>o.some(m=>p.tags.includes(m))):kr,[o]);return y.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",l)},s.map(p=>{let m=e===p.id;return y.createElement("div",{key:p.id,className:"relative",role:"radio","aria-checked":m},y.createElement(Hn,{preset:p.id,postPreset:n,palette:r,live:a,onClick:()=>t?.(p.id),className:d("transition-all",m&&"ring-2 ring-primary ring-offset-2 ring-offset-background rounded-lg")}),m&&y.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"},y.createElement(Check,{className:"h-3.5 w-3.5"})))}))}var Fn=["primary","accent","secondary","muted","card","background","destructive","transparent"];function u0(e){return e==="transparent"?"transparent":`oklch(var(--${e}))`}var m0=[{tab:"solid",icon:Square,label:"Solid"},{tab:"gradient",icon:Blend,label:"Gradient"},{tab:"image",icon:Image,label:"Image"},{tab:"pattern",icon:Grid3x3,label:"Pattern"},{tab:"video",icon:Video,label:"Video"},{tab:"shader",icon:Sparkles,label:"Shader"}];function g0(e){return e.type==="image"&&e.repeat?"pattern":e.type==="image"?"image":e.type}var co="text-[11px] font-medium text-muted-foreground";function gs({token:e,active:t,onClick:o}){return y.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:u0(e)}})}function qu({value:e,onChange:t,className:o}){let a=g0(e),n=i=>t({...e,...i}),r=i=>{i&&n(i==="pattern"?{type:"image",repeat:true}:i==="image"?{type:"image",repeat:false}:{type:i});};return y.createElement("div",{className:d("flex flex-col gap-3",o)},y.createElement(Co,{type:"single",size:"sm",value:a,onValueChange:i=>r(i),className:"justify-start gap-0.5"},m0.map(({tab:i,icon:l,label:s})=>y.createElement(To,{key:i,value:i,"aria-label":s,title:s},y.createElement(l,{className:"h-4 w-4"})))),a==="solid"&&y.createElement("div",{className:"flex flex-col gap-1.5"},y.createElement("span",{className:co},"Token"),y.createElement("div",{className:"flex flex-wrap gap-1.5"},Fn.map(i=>y.createElement(gs,{key:i,token:i,active:e.color===i,onClick:()=>n({color:i})})))),a==="gradient"&&y.createElement("div",{className:"flex flex-col gap-2"},y.createElement("div",{className:"flex flex-col gap-1.5"},y.createElement("span",{className:co},"From"),y.createElement("div",{className:"flex flex-wrap gap-1.5"},Fn.map(i=>y.createElement(gs,{key:i,token:i,active:e.gradient?.from===i,onClick:()=>n({gradient:{...e.gradient,from:i}})})))),y.createElement("div",{className:"flex flex-col gap-1.5"},y.createElement("span",{className:co},"To"),y.createElement("div",{className:"flex flex-wrap gap-1.5"},Fn.map(i=>y.createElement(gs,{key:i,token:i,active:e.gradient?.to===i,onClick:()=>n({gradient:{...e.gradient,to:i}})})))),y.createElement("div",{className:"flex flex-col gap-1.5"},y.createElement("span",{className:co},"Angle \u2014 ",e.gradient?.angle??135,"\xB0"),y.createElement(sa,{value:[e.gradient?.angle??135],min:0,max:360,step:5,onValueChange:([i])=>n({gradient:{...e.gradient,angle:i}})}))),(a==="image"||a==="pattern")&&y.createElement("div",{className:"flex flex-col gap-2"},y.createElement("div",{className:"flex flex-col gap-1.5"},y.createElement("span",{className:co},"Image URL"),y.createElement(So,{size:"sm",value:e.src??"",placeholder:"https://\u2026 or /asset.png",onChange:i=>n({src:i.target.value})})),a==="image"&&y.createElement("div",{className:"flex flex-col gap-1.5"},y.createElement("span",{className:co},"Fit"),y.createElement(Co,{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=>y.createElement(To,{key:i,value:i,className:"px-2 text-[11px] capitalize"},i)))),a==="pattern"&&y.createElement("div",{className:"flex flex-col gap-1.5"},y.createElement("span",{className:co},"Tile size"),y.createElement(So,{size:"sm",value:e.tileSize??"",placeholder:"120px",onChange:i=>n({tileSize:i.target.value})}))),a==="video"&&y.createElement("div",{className:"flex flex-col gap-1.5"},y.createElement("span",{className:co},"Video URL"),y.createElement(So,{size:"sm",value:e.src??"",placeholder:"https://\u2026.mp4",onChange:i=>n({src:i.target.value})})),a==="shader"&&y.createElement("div",{className:"flex flex-col gap-1.5"},y.createElement("span",{className:co},"Shader"),y.createElement(ms,{value:e.preset,onChange:i=>n({preset:i}),live:"hover",columns:3})),e.type!=="none"&&y.createElement("div",{className:"flex items-center gap-2 border-t border-border/50 pt-2.5"},y.createElement("span",{className:d(co,"shrink-0")},"Opacity"),y.createElement(sa,{value:[e.opacity??1],min:0,max:1,step:.05,onValueChange:([i])=>n({opacity:i}),className:"flex-1"}),y.createElement("span",{className:"w-9 shrink-0 text-right text-[11px] tabular-nums text-foreground"},Math.round((e.opacity??1)*100),"%")))}qu.displayName="FillPicker";function v0({children:e}){let t=useRef(null);return useEffect(()=>{let o=new b0({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 a(n){o.raf(n),requestAnimationFrame(a);}return requestAnimationFrame(a),()=>{o.destroy(),t.current=null;}},[]),y.createElement(y.Fragment,null,e)}function S0({className:e}){let t=da();if(!t)return null;let{theme:o,themes:a,setThemeId:n,deleteTheme:r}=t;return y.createElement(zt,null,y.createElement(Bt,{asChild:true},y.createElement(et,{variant:"ghost",size:"sm",className:d("gap-2",e),"aria-label":"Switch theme"},y.createElement(Palette,{className:"h-4 w-4"}),y.createElement("span",{className:"hidden sm:inline"},o.name))),y.createElement(Ct,{className:"w-80 p-2",align:"end"},y.createElement("div",{className:"flex items-start justify-between gap-2 px-2 py-1.5 mb-1"},y.createElement("div",null,y.createElement("div",{className:"text-xs font-medium text-muted-foreground"},"Theme"),y.createElement("div",{className:"text-xs text-muted-foreground/80"},"Switch the skin applied site-wide.")),y.createElement("button",{type:"button",onClick:()=>Hi(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"},y.createElement(Download,{className:"h-3 w-3"}),".md")),y.createElement("div",{className:"flex flex-col gap-0.5"},a.map(i=>{let l=i.id===o.id,s=i.id in io,c=i.ramps.primary[500],p=i.ramps.accent[500],m=i.ramps.neutral[500];return y.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",l&&"bg-muted")},y.createElement("button",{type:"button",onClick:()=>n(i.id),className:"flex items-start gap-3 flex-1 min-w-0 text-left"},y.createElement("div",{className:"mt-0.5 flex shrink-0 overflow-hidden rounded-md border border-border"},y.createElement("div",{className:"h-5 w-2.5",style:{background:`oklch(${c})`},"aria-hidden":true}),y.createElement("div",{className:"h-5 w-2.5",style:{background:`oklch(${p})`},"aria-hidden":true}),y.createElement("div",{className:"h-5 w-2.5",style:{background:`oklch(${m})`},"aria-hidden":true})),y.createElement("div",{className:"min-w-0 flex-1"},y.createElement("div",{className:"flex items-center gap-2"},y.createElement("span",{className:"text-sm font-medium truncate text-foreground"},i.name),i.tagline&&y.createElement("span",{className:"text-[10px] uppercase tracking-wide text-muted-foreground shrink-0"},i.tagline)),i.description&&y.createElement("div",{className:"text-xs text-muted-foreground line-clamp-2"},i.description))),l&&y.createElement(Check,{className:"mt-2 h-4 w-4 shrink-0 text-primary"}),!s&&!l&&y.createElement("button",{type:"button",onClick:u=>{u.stopPropagation(),r(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}`},y.createElement(Trash2,{className:"h-3.5 w-3.5"})))}))))}var Yu=[{mode:"superLight",label:"Super light",icon:SunDim,tooltip:"Super light \u2014 airy, low contrast"},{mode:"light",label:"Light",icon:Sun,tooltip:"Light"},{mode:"dark",label:"Dark",icon:Moon,tooltip:"Dark"},{mode:"superDark",label:"Super dark",icon:MoonStar,tooltip:"Super dark \u2014 OLED, high contrast"}];function M0({className:e,variant:t="icons"}){let o=da();if(!o)return null;let{mode:a,setMode:n}=o;return t==="labeled"?y.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)},Yu.map(({mode:r,label:i,icon:l})=>{let s=a===r;return y.createElement("button",{key:r,type:"button",role:"radio","aria-checked":s,onClick:()=>n(r),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")},y.createElement(l,{className:"h-4 w-4"}),y.createElement("span",null,i))})):y.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)},Yu.map(({mode:r,icon:i,tooltip:l})=>{let s=a===r;return y.createElement("button",{key:r,type:"button",role:"radio","aria-checked":s,"aria-label":l,title:l,onClick:()=>n(r),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")},y.createElement(i,{className:"h-3.5 w-3.5"}))}))}function L0(){let{isDark:e,setMode:t}=Oi();return y.createElement(et,{variant:"ghost",size:"sm",onClick:()=>t(e?"light":"dark"),className:"gap-2","aria-label":e?"Switch to light mode":"Switch to dark mode"},e?y.createElement(y.Fragment,null,y.createElement(Sun,{className:"h-4 w-4"}),y.createElement("span",{className:"hidden sm:inline"},"Light")):y.createElement(y.Fragment,null,y.createElement(Moon,{className:"h-4 w-4"}),y.createElement("span",{className:"hidden sm:inline"},"Dark")))}
1294
+ export{Np as ALL_MODES,Nm as Accordion,Ol as AccordionContent,Vl as AccordionItem,_l as AccordionTrigger,Jl as AppShell,tc as AppShellAside,ac as AppShellFooter,Ql as AppShellHeader,oc as AppShellMain,ec as AppShellNav,nc as Avatar,sc as AvatarFallback,ic as AvatarImage,kn as BUILT_IN_INPUTS,ju as BackgroundFill,Do as Badge,pc as Banner,Wr as BlinkingCursor,_d as Breadcrumb,jd as BreadcrumbEllipsis,Gd as BreadcrumbItem,Wd as BreadcrumbLink,Od as BreadcrumbList,Kd as BreadcrumbMenuTrigger,Ud as BreadcrumbPage,$d as BreadcrumbSeparator,et as Button,Gn as COMPONENT_CONTRACTS,Lr as Calendar,mc as CalendarDayButton,Wl as Callout,$l as CalloutDescription,Ul as CalloutTitle,Ar as Card,bc as CardContent,hc as CardDescription,vc as CardFooter,gc as CardHeader,fc as CardTitle,qm as Carousel,jn as CarouselArrows,$n as CarouselDots,ja as CarouselNext,$a as CarouselPrev,Dr as CarouselSlide,Un as CarouselVideoSlide,tp as ChartContainer,fb as ChartLegend,rp as ChartLegendContent,op as ChartStyle,gb as ChartTooltip,ap as ChartTooltipContent,yc as Checkbox,Rc as CheckboxCard,Ac as Code,td as Combobox,Bc as Composer,wf as ComposerReply,Sa as DEMO_SPEED_PRESETS,dn as DataView,ni as DataViewColumns,ri as DataViewToggle,Cf as DatePicker,Tf as DateRangePicker,Ec as DemoStage,Mf as Dialog,Ef as DialogClose,Oc as DialogContent,$c as DialogDescription,Wc as DialogFooter,Gc as DialogHeader,Xn as DialogOverlay,_c as DialogPortal,Uc as DialogTitle,Nf as DialogTrigger,Jn as DropdownMenu,qr as DropdownMenuCheckboxItem,Kr as DropdownMenuContent,If as DropdownMenuGroup,Yc as DropdownMenuItem,Yr as DropdownMenuLabel,Hf as DropdownMenuPortal,zf as DropdownMenuRadioGroup,Zc as DropdownMenuRadioItem,Zr as DropdownMenuSeparator,Xc as DropdownMenuShortcut,Ff as DropdownMenuSub,qc as DropdownMenuSubContent,Kc as DropdownMenuSubTrigger,Qn as DropdownMenuTrigger,Fn as FILL_TOKENS,wu as FRAGMENT_HEADER,Xm as Field,Hr as FieldDescription,Ir as FieldLabel,Fr as FieldTrailing,qu as FillPicker,md as Flex,Jb as GRADE_PRE_HYDRATION_SCRIPT,Qp as GradeLoader,M0 as GradeModeSwitcher,Qb as GradeThemeProvider,S0 as GradeThemeSwitcher,pd as Grid,So as Input,er as Label,v0 as LenisProvider,Kv as Logo,Ya as MOTION_ATTR,Wi as Map,Ui as MapMarker,so as MediaSurface,Vn as MediaSurfaceContract,xg as Message,ky as Motion,Ji as MotionOverlay,uy as MotionScene,su as MotionScreen,cu as MotionText,ed as MultiSelect,zt as Popover,kf as PopoverAnchor,Ct as PopoverContent,Bt as PopoverTrigger,Qc as Progress,Qm as PropertyList,qn as PropertyListRow,Sc as RadioCard,ld as RadioGroup,cd as RadioGroupItem,Sh as ResizableHandle,kh as ResizablePanel,wh as ResizablePanelGroup,Lc as Reveal,Xp as RivePlayer,zo as Row,qi as ScreenAnimator,gd as ScrollArea,ii as ScrollBar,si as Select,gn as SelectContent,Eh as SelectGroup,fn as SelectItem,bd as SelectLabel,pi as SelectScrollDownButton,di as SelectScrollUpButton,vd as SelectSeparator,mn as SelectTrigger,li as SelectValue,lr as Separator,Aa as ShaderCompileError,e0 as ShaderControls,ms as ShaderPresetPicker,Hn as ShaderPresetPreview,Oh as Sheet,Wh as SheetClose,Sd as SheetContent,Pd as SheetDescription,Cd as SheetFooter,Rd as SheetHeader,ui as SheetOverlay,kd as SheetPortal,Td as SheetTitle,Gh as SheetTrigger,Oo as Sidebar,ki as SidebarContent,Si as SidebarFooter,wi as SidebarHeader,Ci as SidebarItem,Ri as SidebarSection,Ti as SidebarTreeItem,$h as Skeleton,sa as Slider,rb as Sortable,gi as SortableGroup,hi as SortableHandle,fi as SortableItem,Ca as Stack,hn as Swatch,wd as SwatchGroup,vn as Switch,Cc as SwitchCard,tn as Table,an as TableBody,nd as TableCaption,cr as TableCell,rd as TableFooter,rn as TableHead,on as TableHeader,Ta as TableRow,db as Tabs,Jd as TabsContent,Zd as TabsList,Xd as TabsTrigger,np as Textarea,L0 as ThemeToggle,Ia as ThreeScene,id as Toggle,Co as ToggleGroup,To as ToggleGroupItem,ip as Toolbar,sp as ToolbarSlot,ra as Tooltip,Bo as TooltipContent,ai as TooltipProvider,na as TooltipTrigger,Zp as VideoPlayer,Yl as appShellAsideVariants,Xl as appShellFooterVariants,Kl as appShellHeaderVariants,Zl as appShellMainVariants,ql as appShellNavVariants,Sn as applyThemeToRoot,cc as badgeVariants,dc as bannerVariants,$e as buildFragmentShaderScene,io as builtInThemes,Ua as buttonVariants,Gl as calloutVariants,vr as calmInput,d as cn,Ln as defaultPostPreset,La as defaultThemeId,Bi as deleteUserTheme,Pe as demoSleep,Or as demoTypeText,Xb as duplicateTheme,Ei as energyInput,ud as flexVariants,la as generateTheme,Rm as getComponentContract,ca as getTheme,dd as gridVariants,Cm as listContractedComponents,Fi as listThemes,Pp as listUserThemes,zi as loadUserThemeInput,Rr as postPresets,od as rowVariants,Cn as saveUserTheme,wr as sceneRegistry,ng as setMotion,Sr as shaderPresetById,kr as shaderPresets,jl as shellVariants,ad as stackVariants,yd as swatchVariants,Ai as themeToCSSVars,sn as toggleVariants,Ym as useCarouselApi,mh as useDataView,Oi as useGradeTheme,da as useMaybeGradeTheme,Xi as useMotionScene,Za as usePageActive,Io as usePrefersReducedMotion,yo as useReducedMotion,Ho as useScriptedDemo};//# sourceMappingURL=index.mjs.map
1295
1295
  //# sourceMappingURL=index.mjs.map