@app-studio/components 0.11.3 → 0.11.4

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/web.umd.js CHANGED
@@ -1,9 +1,9 @@
1
- (function(F,r){typeof exports=="object"&&typeof module<"u"?r(exports,require("react/jsx-runtime"),require("react"),require("app-studio"),require("react-dom"),require("zustand"),require("react-router-dom"),require("formik")):typeof define=="function"&&define.amd?define(["exports","react/jsx-runtime","react","app-studio","react-dom","zustand","react-router-dom","formik"],r):(F=typeof globalThis<"u"?globalThis:F||self,r(F.AppStudioWeb={},F.jsxRuntime,F.React,F.appStudio,F.ReactDOM,F.zustand,F.ReactRouterDOM,F.Formik))})(this,function(F,r,h,i,Pc,vo,it,Ee){"use strict";var zb=Object.defineProperty;var Mb=(F,r,h)=>r in F?zb(F,r,{enumerable:!0,configurable:!0,writable:!0,value:h}):F[r]=h;var Ze=(F,r,h)=>Mb(F,typeof r!="symbol"?r+"":r,h);var wo,Pn;const ct=(e="id")=>`${e}-${Math.random().toString(36).substring(2,9)}`,Vc=({type:e="single",value:o,defaultValue:t,onValueChange:n,collapsible:a=!1})=>{const l=o!==void 0,c=o??t,s=()=>e==="multiple"?Array.isArray(c)?c:c?[c]:[]:Array.isArray(c)?c[0]:c,[d,g]=h.useState(s()),m=h.useMemo(()=>ct("accordion"),[]),f=l?o:d,p=h.useMemo(()=>f===void 0?[]:Array.isArray(f)?f:[f],[f]);h.useEffect(()=>{l&&(e==="multiple"&&!Array.isArray(o)?(console.warn('Accordion with type="multiple" received non-array value:',o),g(o?[String(o)]:[])):e==="single"&&Array.isArray(o)?(console.warn('Accordion with type="single" received array value:',o),g(o.length>0?o[0]:void 0)):g(o))},[o,l,e]);const u=h.useCallback(k=>{let x;if(e==="single")f===k&&a?x=void 0:f!==k?x=k:x=f;else{const C=Array.isArray(f)?f:[];C.includes(k)?x=C.filter(S=>S!==k):x=[...C,k],Array.isArray(x)&&x.length===0&&(x=[])}l||g(x),n&&n(x)},[e,f,a,l,n]),y=h.useCallback(k=>p.includes(k),[p]);return{expandedItems:p,toggleItem:u,isItemExpanded:y,type:e,collapsible:a,baseId:m}},Ac={square:{borderRadius:0},rounded:{borderRadius:8}},Ec={default:{borderWidth:0,style:{backgroundColor:"transparent"},transition:"background-color 0.15s ease"},outline:{borderWidth:1,borderStyle:"solid",borderColor:"color-gray-200",transition:"border-color 0.15s ease, background-color 0.15s ease",_hover:{borderColor:"color-gray-300"}},filled:{backgroundColor:"color-gray-50",transition:"background-color 0.15s ease",_hover:{backgroundColor:"color-gray-100"}}},Dc={metadata:{id:"default",label:"Default",sourcePath:"",sourceTitle:"Default adaptive design system (light + dark)",defaultAppearance:"light",googleFontLinks:["https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap"]},theme:{primary:"#2563eb",secondary:"#7c3aed",success:"#16a34a",warning:"#d97706",error:"#dc2626",onPrimary:"#ffffff",canvas:"color-white",surface:"color-gray-50",text:"color-black",muted:"color-gray-500",border:"color-gray-200"},tokens:{rawCssVars:{primary:"#2563eb",secondary:"#7c3aed",success:"#16a34a",warning:"#d97706",error:"#dc2626"},colors:[{name:"primary",value:"#2563eb",role:"primary"},{name:"secondary",value:"#7c3aed",role:"secondary"},{name:"success",value:"#16a34a",role:"success"},{name:"warning",value:"#d97706",role:"warning"},{name:"error",value:"#dc2626",role:"error"}],typography:{fontFamily:"'Inter', system-ui, -apple-system, sans-serif",monoFamily:"ui-monospace, 'SF Mono', Menlo, Monaco, Consolas, monospace",fontSizes:["12px","13px","14px","16px","18px","22px","28px","36px","48px","64px"],fontWeights:["400","500","600","700","800"],lineHeights:["1.0","1.1","1.2","1.4","1.5","1.6"]},spacing:["2px","4px","8px","12px","16px","24px","32px","48px","64px"],radii:["2px","4px","6px","8px","12px","16px","9999px"],shadows:["0 1px 2px rgba(0,0,0,0.04)","0 4px 12px rgba(0,0,0,0.08)","0 12px 32px rgba(0,0,0,0.12)"]},components:{button:{variant:"filled",size:"md",shape:"rounded",color:"theme-primary",textColor:"theme-onPrimary",views:{container:{borderRadius:8,fontFamily:"'Inter', system-ui, -apple-system, sans-serif",fontWeight:600,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},content:{fontFamily:"'Inter', system-ui, -apple-system, sans-serif",fontWeight:600,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"}}},badge:{variant:"filled",size:"sm",shape:"rounded",views:{container:{backgroundColor:null,color:null,borderColor:null,borderRadius:6,fontFamily:"'Inter', system-ui, -apple-system, sans-serif",letterSpacing:"-0.01em",textTransform:"none",fontWeight:600,fontStyle:"normal"},text:{fontFamily:"'Inter', system-ui, -apple-system, sans-serif",fontWeight:600}}},card:{variant:"outlined",size:"md",shape:"rounded",views:{container:{backgroundColor:"color-gray-50",borderColor:"color-gray-200",color:"color-black",borderRadius:12,borderWidth:"1px",borderStyle:"solid",boxShadow:"0 1px 2px rgba(0,0,0,0.04)"},header:{color:"color-black",fontFamily:"'Inter', system-ui, -apple-system, sans-serif",fontWeight:600,borderColor:"color-gray-200"},content:{color:"color-gray-500",fontFamily:"'Inter', system-ui, -apple-system, sans-serif"},footer:{borderColor:"color-gray-200"}}},input:{size:"md",shape:"default",variant:"default",views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"color-black",borderRadius:8,borderWidth:"1px",borderStyle:"solid"},field:{color:"color-black",fontFamily:"'Inter', system-ui, -apple-system, sans-serif",fontStyle:"normal",letterSpacing:"-0.01em"},label:{fontFamily:"'Inter', system-ui, -apple-system, sans-serif",fontWeight:600,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},helperText:{}}},textarea:{size:"md",shape:"default",variant:"default",views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"color-black",borderRadius:8,borderWidth:"1px",borderStyle:"solid"},field:{color:"color-black",fontFamily:"'Inter', system-ui, -apple-system, sans-serif",fontStyle:"normal",letterSpacing:"-0.01em"},label:{fontFamily:"'Inter', system-ui, -apple-system, sans-serif",fontWeight:600,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},helperText:{}}},select:{size:"md",shape:"default",variant:"default",views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"color-black",borderRadius:8,borderWidth:"1px",borderStyle:"solid"},field:{color:"color-black",fontFamily:"'Inter', system-ui, -apple-system, sans-serif"},label:{fontFamily:"'Inter', system-ui, -apple-system, sans-serif",fontWeight:600,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},helperText:{},text:{letterSpacing:"-0.01em",fontStyle:"normal"}}},checkbox:{size:"md",views:{checkbox:{borderColor:"color-gray-200",backgroundColor:"color-white",_checked:{backgroundColor:"theme-primary",borderColor:"theme-primary"},borderRadius:4},label:{fontFamily:"'Inter', system-ui, -apple-system, sans-serif",fontWeight:600,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},infoText:{color:"color-gray-500"},container:{borderRadius:4}}},radio:{size:"md",views:{radio:{borderColor:"color-gray-200",backgroundColor:"color-white"},dot:{backgroundColor:"theme-primary"},label:{fontFamily:"'Inter', system-ui, -apple-system, sans-serif",fontWeight:600,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},infoText:{color:"color-gray-500"},container:{borderRadius:"50%"}}},switch:{size:"sm",views:{slider:{backgroundColor:"color-gray-200"},circle:{backgroundColor:"color-white"},label:{fontFamily:"'Inter', system-ui, -apple-system, sans-serif",fontWeight:600,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},container:{borderRadius:"9999px"}}},slider:{backgroundColor:"theme-primary",views:{track:{backgroundColor:"color-gray-200"},progress:{backgroundColor:"theme-primary"},filledTrack:{backgroundColor:"theme-primary"},thumb:{borderColor:"theme-primary",backgroundColor:"color-white"},label:{color:"color-black"},valueLabel:{color:"color-gray-500"}}},tabs:{variant:"underline",views:{headerTabs:{borderColor:"color-gray-200"},tab:{color:"color-gray-500",fontWeight:600,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},activeTab:{color:"theme-primary",borderColor:"theme-primary",backgroundColor:"transparent"},title:{fontFamily:"'Inter', system-ui, -apple-system, sans-serif"},activeText:{color:"theme-primary"},content:{color:"color-black"},container:{borderRadius:"8px"}}},accordion:{views:{container:{borderColor:"color-gray-200",backgroundColor:"color-gray-50",color:"color-black",borderRadius:"12px"},trigger:{color:"color-black",fontFamily:"'Inter', system-ui, -apple-system, sans-serif"},content:{color:"color-gray-500"}}},table:{views:{table:{backgroundColor:"color-white",color:"color-black",borderColor:"color-gray-200",borderRadius:12},thead:{backgroundColor:"color-gray-50",color:"color-black"},th:{color:"color-gray-500",borderColor:"color-gray-200",fontFamily:"'Inter', system-ui, -apple-system, sans-serif",fontWeight:600,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},tr:{borderColor:"color-gray-200"},td:{color:"color-black",borderColor:"color-gray-200",letterSpacing:"-0.01em",fontStyle:"normal"},caption:{color:"color-gray-500",fontStyle:"italic",letterSpacing:"-0.01em"}}},avatar:{views:{container:{backgroundColor:"color-gray-50",borderColor:"color-gray-200",color:"color-black",borderRadius:"50%"},fallback:{color:"color-black",fontFamily:"'Inter', system-ui, -apple-system, sans-serif"}}},alert:{views:{container:{backgroundColor:"color-gray-50",borderColor:"color-gray-200",borderRadius:12},title:{color:"color-black",fontFamily:"'Inter', system-ui, -apple-system, sans-serif",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},description:{color:"color-gray-500",fontFamily:"'Inter', system-ui, -apple-system, sans-serif"},icon:{color:"theme-primary"}}},status:{views:{indicator:{backgroundColor:"theme-success"},label:{color:"color-black",fontFamily:"'Inter', system-ui, -apple-system, sans-serif"}}},progress:{color:"theme-primary",backgroundColor:"color-gray-200",radius:"9999px",views:{container:{backgroundColor:"color-gray-200",borderRadius:"9999px"},bar:{backgroundColor:"theme-primary"},text:{color:"color-black"}}},loader:{color:"theme-primary"},separator:{color:"color-gray-200",views:{container:{borderColor:"color-gray-200"},label:{color:"color-gray-500",fontFamily:"'Inter', system-ui, -apple-system, sans-serif"}}},navigation:{views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"color-black",borderRadius:"12px"},item:{color:"color-gray-500"},activeItem:{color:"theme-primary",borderColor:"theme-primary"}}},hero:{views:{container:{backgroundColor:"color-white",color:"color-black",fontFamily:"'Inter', system-ui, -apple-system, sans-serif"},eyebrow:{color:"color-gray-500"},title:{color:"color-black",fontFamily:"'Inter', system-ui, -apple-system, sans-serif"},description:{color:"color-gray-500"}}},page:{views:{container:{backgroundColor:"color-white",color:"color-black",fontFamily:"'Inter', system-ui, -apple-system, sans-serif"},section:{backgroundColor:"color-white",borderColor:"color-gray-200"},surface:{backgroundColor:"color-gray-50",borderColor:"color-gray-200",color:"color-black"}}}},personality:{cornerStyle:"soft",typeWeight:"regular",typeCase:"normal",typeStyle:"normal",letterSpacing:"-0.01em",accentTreatment:"flat",signatureMotif:"●",density:"comfortable",surfaceTone:"paper",cardRadius:12,pillRadius:9999,badgeRadius:6,voice:"neutral-clear"}},st={airbnb:{metadata:{id:"airbnb",label:"Airbnb",sourcePath:"design.md/html/airbnb.html",sourceTitle:"Design System Inspiration of Airbnb",defaultAppearance:"light",googleFontLinks:["https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap"]},theme:{primary:"#ff385c",secondary:"#222222",success:"#428bff",warning:"#460479",error:"#c13515",canvas:"color-white",surface:"color-gray-50",text:"color-black",muted:"color-gray-500",border:"color-gray-200",onPrimary:"#ffffff"},tokens:{rawCssVars:{primary:"#ff385c","primary-active":"#e00b41","primary-disabled":"#ffd1da",error:"#c13515",luxe:"#460479",plus:"#92174d",ink:"#222222",body:"#3f3f3f",muted:"#6a6a6a","muted-soft":"#929292",hairline:"#dddddd","hairline-soft":"#ebebeb","border-strong":"#c1c1c1",canvas:"#ffffff","surface-soft":"#f7f7f7","surface-strong":"#f2f2f2","on-primary":"#ffffff","legal-link":"#428bff",shadow:"rgba(0, 0, 0, 0.02) 0 0 0 1px, rgba(0, 0, 0, 0.04) 0 2px 6px 0, rgba(0, 0, 0, 0.1) 0 4px 8px 0",display:"'Inter', 'Airbnb Cereal VF', Circular, -apple-system, system-ui, Roboto, 'Helvetica Neue', sans-serif",text:"'Inter', 'Airbnb Cereal VF', Circular, -apple-system, system-ui, Roboto, sans-serif"},colors:[{name:"primary",value:"#ff385c",role:"primary"},{name:"primary-active",value:"#e00b41",role:"primary active"},{name:"primary-disabled",value:"#ffd1da",role:"primary disabled"},{name:"error",value:"#c13515",role:"error"},{name:"luxe",value:"#460479",role:"luxe"},{name:"plus",value:"#92174d",role:"plus"},{name:"ink",value:"#222222",role:"ink"},{name:"body",value:"#3f3f3f",role:"body"},{name:"muted",value:"#6a6a6a",role:"muted"},{name:"muted-soft",value:"#929292",role:"muted soft"},{name:"hairline",value:"#dddddd",role:"hairline"},{name:"hairline-soft",value:"#ebebeb",role:"hairline soft"},{name:"border-strong",value:"#c1c1c1",role:"border strong"},{name:"canvas",value:"#ffffff",role:"canvas"},{name:"surface-soft",value:"#f7f7f7",role:"surface soft"},{name:"surface-strong",value:"#f2f2f2",role:"surface strong"},{name:"on-primary",value:"#ffffff",role:"on primary"},{name:"legal-link",value:"#428bff",role:"legal link"},{name:"shadow",value:"rgba(0, 0, 0, 0.02) 0 0 0 1px, rgba(0, 0, 0, 0.04) 0 2px 6px 0, rgba(0, 0, 0, 0.1) 0 4px 8px 0",role:"shadow"}],typography:{fontFamily:"'Inter', 'Airbnb Cereal VF', Circular, -apple-system, system-ui, Roboto, 'Helvetica Neue', sans-serif",monoFamily:"ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace",fontSizes:["16px","14px","48px","18px","20px","11px","28px","13px","12px","8px","64px","21px","10px","24px","36px","15px"],fontWeights:["400","600","700","500"],lineHeights:["1.5","1.1","1.43","1.25","2","1","1.2","1.35","1.4"]},spacing:["2px","4px","5px","6px","7px","8px","10px","11px","12px","13px","14px","16px","20px","23px","24px","28px","32px","40px","48px","56px"],radii:["9999px","8px","14px","4px","6px","3px"],shadows:["rgba(0, 0, 0, 0.02) 0 0 0 1px, rgba(0, 0, 0, 0.04) 0 2px 6px 0, rgba(0, 0, 0, 0.1) 0 4px 8px 0","var(--shadow)"]},components:{button:{variant:"filled",size:"md",shape:"rounded",color:"theme-primary",textColor:"theme-onPrimary",views:{container:{borderRadius:9999,fontFamily:"'Inter', 'Airbnb Cereal VF', Circular, -apple-system, system-ui, Roboto, 'Helvetica Neue', sans-serif",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},content:{fontFamily:"'Inter', 'Airbnb Cereal VF', Circular, -apple-system, system-ui, Roboto, 'Helvetica Neue', sans-serif",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"}}},badge:{variant:"filled",size:"sm",shape:"rounded",views:{container:{backgroundColor:null,color:null,borderColor:null,borderRadius:6,fontFamily:"'Inter', 'Airbnb Cereal VF', Circular, -apple-system, system-ui, Roboto, 'Helvetica Neue', sans-serif",letterSpacing:"-0.01em",textTransform:"none",fontWeight:700,fontStyle:"normal"},text:{fontFamily:"'Inter', 'Airbnb Cereal VF', Circular, -apple-system, system-ui, Roboto, 'Helvetica Neue', sans-serif",fontWeight:600}}},card:{variant:"outlined",size:"md",shape:"rounded",views:{container:{backgroundColor:"color-gray-50",borderColor:"color-gray-200",color:"color-black",borderRadius:16,borderWidth:"1px",borderStyle:"solid",boxShadow:"rgba(0, 0, 0, 0.02) 0 0 0 1px, rgba(0, 0, 0, 0.04) 0 2px 6px 0, rgba(0, 0, 0, 0.1) 0 4px 8px 0"},header:{color:"color-black",fontFamily:"'Inter', 'Airbnb Cereal VF', Circular, -apple-system, system-ui, Roboto, 'Helvetica Neue', sans-serif",fontWeight:600,borderColor:"color-gray-200"},content:{color:"color-gray-500",fontFamily:"'Inter', 'Airbnb Cereal VF', Circular, -apple-system, system-ui, Roboto, 'Helvetica Neue', sans-serif"},footer:{borderColor:"color-gray-200"}}},input:{size:"md",shape:"default",variant:"default",views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"color-black",borderRadius:10,borderWidth:"1px",borderStyle:"solid",boxShadow:"rgba(0, 0, 0, 0.02) 0 0 0 1px, rgba(0, 0, 0, 0.04) 0 2px 6px 0, rgba(0, 0, 0, 0.1) 0 4px 8px 0"},field:{color:"color-black",fontFamily:"'Inter', 'Airbnb Cereal VF', Circular, -apple-system, system-ui, Roboto, 'Helvetica Neue', sans-serif",fontStyle:"normal",letterSpacing:"-0.01em"},label:{fontFamily:"'Inter', 'Airbnb Cereal VF', Circular, -apple-system, system-ui, Roboto, 'Helvetica Neue', sans-serif",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},helperText:{}}},textarea:{size:"md",shape:"default",variant:"default",views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"color-black",borderRadius:10,borderWidth:"1px",borderStyle:"solid",boxShadow:"rgba(0, 0, 0, 0.02) 0 0 0 1px, rgba(0, 0, 0, 0.04) 0 2px 6px 0, rgba(0, 0, 0, 0.1) 0 4px 8px 0"},field:{color:"color-black",fontFamily:"'Inter', 'Airbnb Cereal VF', Circular, -apple-system, system-ui, Roboto, 'Helvetica Neue', sans-serif",fontStyle:"normal",letterSpacing:"-0.01em"},label:{fontFamily:"'Inter', 'Airbnb Cereal VF', Circular, -apple-system, system-ui, Roboto, 'Helvetica Neue', sans-serif",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},helperText:{}}},select:{size:"md",shape:"default",variant:"default",views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"color-black",borderRadius:10,borderWidth:"1px",borderStyle:"solid",boxShadow:"rgba(0, 0, 0, 0.02) 0 0 0 1px, rgba(0, 0, 0, 0.04) 0 2px 6px 0, rgba(0, 0, 0, 0.1) 0 4px 8px 0"},field:{color:"color-black",fontFamily:"'Inter', 'Airbnb Cereal VF', Circular, -apple-system, system-ui, Roboto, 'Helvetica Neue', sans-serif"},label:{fontFamily:"'Inter', 'Airbnb Cereal VF', Circular, -apple-system, system-ui, Roboto, 'Helvetica Neue', sans-serif",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},helperText:{},text:{letterSpacing:"-0.01em",fontStyle:"normal"}}},checkbox:{size:"md",views:{checkbox:{borderColor:"color-gray-200",backgroundColor:"color-white",_checked:{backgroundColor:"theme-primary",borderColor:"theme-primary"},borderRadius:4},label:{fontFamily:"'Inter', 'Airbnb Cereal VF', Circular, -apple-system, system-ui, Roboto, 'Helvetica Neue', sans-serif",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},infoText:{color:"color-gray-500"},container:{borderRadius:4}}},radio:{size:"md",views:{radio:{borderColor:"color-gray-200",backgroundColor:"color-white"},dot:{backgroundColor:"theme-primary"},label:{fontFamily:"'Inter', 'Airbnb Cereal VF', Circular, -apple-system, system-ui, Roboto, 'Helvetica Neue', sans-serif",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},infoText:{color:"color-gray-500"},container:{borderRadius:"50%"}}},switch:{size:"sm",views:{slider:{backgroundColor:"color-gray-200"},circle:{backgroundColor:"color-white"},label:{fontFamily:"'Inter', 'Airbnb Cereal VF', Circular, -apple-system, system-ui, Roboto, 'Helvetica Neue', sans-serif",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},container:{borderRadius:"9999px"}}},slider:{backgroundColor:"theme-primary",views:{track:{backgroundColor:"color-gray-200"},progress:{backgroundColor:"theme-primary"},filledTrack:{backgroundColor:"theme-primary"},thumb:{borderColor:"theme-primary",backgroundColor:"color-white"},label:{color:"color-black"},valueLabel:{color:"color-gray-500"}}},tabs:{variant:"underline",views:{headerTabs:{borderColor:"color-gray-200"},tab:{color:"color-gray-500",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},activeTab:{color:"theme-primary",borderColor:"theme-primary",backgroundColor:"transparent"},title:{fontFamily:"'Inter', 'Airbnb Cereal VF', Circular, -apple-system, system-ui, Roboto, 'Helvetica Neue', sans-serif"},activeText:{color:"theme-primary"},content:{color:"color-black"},container:{borderRadius:"8px"}}},accordion:{views:{container:{borderColor:"color-gray-200",backgroundColor:"color-gray-50",color:"color-black",borderRadius:"14px"},trigger:{color:"color-black",fontFamily:"'Inter', 'Airbnb Cereal VF', Circular, -apple-system, system-ui, Roboto, 'Helvetica Neue', sans-serif"},content:{color:"color-gray-500"}}},table:{views:{table:{backgroundColor:"color-white",color:"color-black",borderColor:"color-gray-200",borderRadius:16},thead:{backgroundColor:"color-gray-50",color:"color-black"},th:{color:"color-gray-500",borderColor:"color-gray-200",fontFamily:"ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},tr:{borderColor:"color-gray-200"},td:{color:"color-black",borderColor:"color-gray-200",letterSpacing:"-0.01em",fontStyle:"normal"},caption:{color:"color-gray-500",fontStyle:"italic",letterSpacing:"-0.01em"}}},avatar:{views:{container:{backgroundColor:"color-gray-50",borderColor:"color-gray-200",color:"color-black",borderRadius:"50%"},fallback:{color:"color-black",fontFamily:"'Inter', 'Airbnb Cereal VF', Circular, -apple-system, system-ui, Roboto, 'Helvetica Neue', sans-serif"}}},alert:{views:{container:{backgroundColor:"color-gray-50",borderColor:"color-gray-200",borderRadius:16},title:{color:"color-black",fontFamily:"'Inter', 'Airbnb Cereal VF', Circular, -apple-system, system-ui, Roboto, 'Helvetica Neue', sans-serif",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},description:{color:"color-gray-500",fontFamily:"'Inter', 'Airbnb Cereal VF', Circular, -apple-system, system-ui, Roboto, 'Helvetica Neue', sans-serif"},icon:{color:"theme-primary"}}},status:{views:{indicator:{backgroundColor:"theme-success"},label:{color:"color-black",fontFamily:"'Inter', 'Airbnb Cereal VF', Circular, -apple-system, system-ui, Roboto, 'Helvetica Neue', sans-serif"}}},progress:{color:"theme-primary",backgroundColor:"color-gray-200",radius:"14px",views:{container:{backgroundColor:"color-gray-200",borderRadius:"9999px"},bar:{backgroundColor:"theme-primary"},text:{color:"color-black"}}},loader:{color:"theme-primary"},separator:{color:"color-gray-200",views:{container:{borderColor:"color-gray-200"},label:{color:"color-gray-500",fontFamily:"'Inter', 'Airbnb Cereal VF', Circular, -apple-system, system-ui, Roboto, 'Helvetica Neue', sans-serif"}}},navigation:{views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"color-black",borderRadius:"14px"},item:{color:"color-gray-500"},activeItem:{color:"theme-primary",borderColor:"theme-primary"}}},hero:{views:{container:{backgroundColor:"color-white",color:"color-black",fontFamily:"'Inter', 'Airbnb Cereal VF', Circular, -apple-system, system-ui, Roboto, 'Helvetica Neue', sans-serif"},eyebrow:{color:"color-gray-500"},title:{color:"color-black",fontFamily:"'Inter', 'Airbnb Cereal VF', Circular, -apple-system, system-ui, Roboto, 'Helvetica Neue', sans-serif"},description:{color:"color-gray-500"}}},page:{views:{container:{backgroundColor:"color-white",color:"color-black",fontFamily:"'Inter', 'Airbnb Cereal VF', Circular, -apple-system, system-ui, Roboto, 'Helvetica Neue', sans-serif"},section:{backgroundColor:"color-white",borderColor:"color-gray-200"},surface:{backgroundColor:"color-gray-50",borderColor:"color-gray-200",color:"color-black"}}}},personality:{cornerStyle:"soft",typeWeight:"bold",typeCase:"normal",typeStyle:"normal",letterSpacing:"-0.01em",accentTreatment:"flat",signatureMotif:"●",density:"comfortable",surfaceTone:"paper",cardRadius:16,pillRadius:9999,badgeRadius:6,voice:"warm-welcoming"}},apple:{metadata:{id:"apple",label:"Apple",sourcePath:"design.md/html/apple.html",sourceTitle:"Design System Inspiration of Apple",defaultAppearance:"light",googleFontLinks:["https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap"]},theme:{primary:"#0071E3",secondary:"#1d1d1f",success:"#0071e3",warning:"#272729",error:"#2997ff",canvas:"color-white",surface:"color-gray-50",text:"color-black",muted:"color-gray-500",border:"color-gray-200",onPrimary:"#ffffff"},tokens:{rawCssVars:{primary:"#0066cc","primary-focus":"#0071e3","primary-on-dark":"#2997ff",ink:"#1d1d1f",body:"#1d1d1f","body-on-dark":"#ffffff","body-muted":"#cccccc","ink-muted-80":"#333333","ink-muted-48":"#7a7a7a","divider-soft":"#f0f0f0",hairline:"#e0e0e0",canvas:"#ffffff","canvas-parchment":"#f5f5f7","surface-pearl":"#fafafc","surface-tile-1":"#272729","surface-tile-2":"#2a2a2c","surface-tile-3":"#252527","surface-black":"#000000","surface-chip-translucent":"rgba(210, 210, 215, 0.64)","on-primary":"#ffffff","on-dark":"#ffffff",display:"-apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Inter', system-ui, sans-serif",text:"-apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Inter', system-ui, sans-serif"},colors:[{name:"primary",value:"#0071E3",role:"primary"},{name:"primary-focus",value:"#0071e3",role:"primary focus"},{name:"primary-on-dark",value:"#2997ff",role:"primary on dark"},{name:"ink",value:"#1d1d1f",role:"ink"},{name:"body",value:"#1d1d1f",role:"body"},{name:"body-on-dark",value:"#ffffff",role:"body on dark"},{name:"body-muted",value:"#cccccc",role:"body muted"},{name:"ink-muted-80",value:"#333333",role:"ink muted 80"},{name:"ink-muted-48",value:"#7a7a7a",role:"ink muted 48"},{name:"divider-soft",value:"#f0f0f0",role:"divider soft"},{name:"hairline",value:"#e0e0e0",role:"hairline"},{name:"canvas",value:"#ffffff",role:"canvas"},{name:"canvas-parchment",value:"#f5f5f7",role:"canvas parchment"},{name:"surface-pearl",value:"#fafafc",role:"surface pearl"},{name:"surface-tile-1",value:"#272729",role:"surface tile 1"},{name:"surface-tile-2",value:"#2a2a2c",role:"surface tile 2"},{name:"surface-tile-3",value:"#252527",role:"surface tile 3"},{name:"surface-black",value:"#000000",role:"surface black"},{name:"surface-chip-translucent",value:"rgba(210, 210, 215, 0.64)",role:"surface chip translucent"},{name:"on-primary",value:"#ffffff",role:"on primary"},{name:"on-dark",value:"#ffffff",role:"on dark"}],typography:{fontFamily:"-apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Inter', system-ui, sans-serif",monoFamily:"ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace",fontSizes:["17px","14px","56px","21px","12px","40px","24px","13px","18px","28px","11px","34px","44px","32px","19px"],fontWeights:["400","600","300","700"],lineHeights:["1.47","1.07","1.19","1.1","1.43","1.5","1","1.14","2.0","2.41","1.2","1.35"]},spacing:["5px","6px","7px","8px","10px","11px","12px","14px","15px","16px","18px","20px","21px","22px","24px","28px","32px","44px","48px","50px"],radii:["9999px","18px","28px","24px","8px","11px","50%","12px","4px","6px","3px"],shadows:["0 5px 30px rgba(0, 0, 0, 0.22)"]},components:{button:{variant:"filled",size:"md",shape:"rounded",color:"theme-primary",textColor:"theme-onPrimary",views:{container:{borderRadius:9999,fontFamily:"-apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Inter', system-ui, sans-serif",fontWeight:300,letterSpacing:"-0.022em",textTransform:"none",fontStyle:"normal"},content:{fontFamily:"-apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Inter', system-ui, sans-serif",fontWeight:300,letterSpacing:"-0.022em",textTransform:"none",fontStyle:"normal"}}},badge:{variant:"filled",size:"sm",shape:"pill",views:{container:{backgroundColor:"theme-secondary",color:"color-white",borderColor:"theme-secondary",borderRadius:8,fontFamily:"-apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Inter', system-ui, sans-serif",letterSpacing:"-0.022em",textTransform:"none",fontWeight:300,fontStyle:"normal"},text:{fontFamily:"-apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Inter', system-ui, sans-serif",fontWeight:600}}},card:{variant:"outlined",size:"md",shape:"rounded",views:{container:{backgroundColor:"color-gray-50",borderColor:"color-gray-200",color:"color-black",borderRadius:18,borderWidth:"1px",borderStyle:"solid",boxShadow:"0 5px 30px rgba(0, 0, 0, 0.22)"},header:{color:"color-black",fontFamily:"-apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Inter', system-ui, sans-serif",fontWeight:600,borderColor:"color-gray-200"},content:{color:"color-gray-500",fontFamily:"-apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Inter', system-ui, sans-serif"},footer:{borderColor:"color-gray-200"}}},input:{size:"md",shape:"default",variant:"default",views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"color-black",borderRadius:10,borderWidth:"1px",borderStyle:"solid",boxShadow:"none"},field:{color:"color-black",fontFamily:"-apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Inter', system-ui, sans-serif",fontStyle:"normal",letterSpacing:"-0.022em"},label:{fontFamily:"-apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Inter', system-ui, sans-serif",fontWeight:300,letterSpacing:"-0.022em",textTransform:"none",fontStyle:"normal"},helperText:{}}},textarea:{size:"md",shape:"default",variant:"default",views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"color-black",borderRadius:10,borderWidth:"1px",borderStyle:"solid",boxShadow:"none"},field:{color:"color-black",fontFamily:"-apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Inter', system-ui, sans-serif",fontStyle:"normal",letterSpacing:"-0.022em"},label:{fontFamily:"-apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Inter', system-ui, sans-serif",fontWeight:300,letterSpacing:"-0.022em",textTransform:"none",fontStyle:"normal"},helperText:{}}},select:{size:"md",shape:"default",variant:"default",views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"color-black",borderRadius:10,borderWidth:"1px",borderStyle:"solid",boxShadow:"none"},field:{color:"color-black",fontFamily:"-apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Inter', system-ui, sans-serif"},label:{fontFamily:"-apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Inter', system-ui, sans-serif",fontWeight:300,letterSpacing:"-0.022em",textTransform:"none",fontStyle:"normal"},helperText:{},text:{letterSpacing:"-0.022em",fontStyle:"normal"}}},checkbox:{size:"md",views:{checkbox:{borderColor:"color-gray-200",backgroundColor:"color-white",_checked:{backgroundColor:"theme-primary",borderColor:"theme-primary"},borderRadius:4},label:{fontFamily:"-apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Inter', system-ui, sans-serif",fontWeight:300,letterSpacing:"-0.022em",textTransform:"none",fontStyle:"normal"},infoText:{color:"color-gray-500"},container:{borderRadius:4}}},radio:{size:"md",views:{radio:{borderColor:"color-gray-200",backgroundColor:"color-white"},dot:{backgroundColor:"theme-primary"},label:{fontFamily:"-apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Inter', system-ui, sans-serif",fontWeight:300,letterSpacing:"-0.022em",textTransform:"none",fontStyle:"normal"},infoText:{color:"color-gray-500"},container:{borderRadius:"50%"}}},switch:{size:"sm",views:{slider:{backgroundColor:"color-gray-200"},circle:{backgroundColor:"color-white"},label:{fontFamily:"-apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Inter', system-ui, sans-serif",fontWeight:300,letterSpacing:"-0.022em",textTransform:"none",fontStyle:"normal"},container:{borderRadius:"9999px"}}},slider:{backgroundColor:"theme-primary",views:{track:{backgroundColor:"color-gray-200"},progress:{backgroundColor:"theme-primary"},filledTrack:{backgroundColor:"theme-primary"},thumb:{borderColor:"theme-primary",backgroundColor:"color-white"},label:{color:"color-black"},valueLabel:{color:"color-gray-500"}}},tabs:{variant:"pill",views:{headerTabs:{borderColor:"color-gray-200"},tab:{color:"color-gray-500",fontWeight:300,letterSpacing:"-0.022em",textTransform:"none",fontStyle:"normal"},activeTab:{color:"theme-primary",borderColor:"theme-primary",backgroundColor:"theme-primary"},title:{fontFamily:"-apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Inter', system-ui, sans-serif"},activeText:{color:"color-white"},content:{color:"color-black"},container:{borderRadius:"9999px"}}},accordion:{views:{container:{borderColor:"color-gray-200",backgroundColor:"color-gray-50",color:"color-black",borderRadius:"18px"},trigger:{color:"color-black",fontFamily:"-apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Inter', system-ui, sans-serif"},content:{color:"color-gray-500"}}},table:{views:{table:{backgroundColor:"color-white",color:"color-black",borderColor:"color-gray-200",borderRadius:18},thead:{backgroundColor:"color-gray-50",color:"color-black"},th:{color:"color-gray-500",borderColor:"color-gray-200",fontFamily:"ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace",fontWeight:300,letterSpacing:"-0.022em",textTransform:"none",fontStyle:"normal"},tr:{borderColor:"color-gray-200"},td:{color:"color-black",borderColor:"color-gray-200",letterSpacing:"-0.022em",fontStyle:"normal"},caption:{color:"color-gray-500",fontStyle:"italic",letterSpacing:"-0.022em"}}},avatar:{views:{container:{backgroundColor:"color-gray-50",borderColor:"color-gray-200",color:"color-black",borderRadius:"50%"},fallback:{color:"color-black",fontFamily:"-apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Inter', system-ui, sans-serif"}}},alert:{views:{container:{backgroundColor:"color-gray-50",borderColor:"color-gray-200",borderRadius:18},title:{color:"color-black",fontFamily:"-apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Inter', system-ui, sans-serif",fontWeight:300,letterSpacing:"-0.022em",textTransform:"none",fontStyle:"normal"},description:{color:"color-gray-500",fontFamily:"-apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Inter', system-ui, sans-serif"},icon:{color:"theme-primary"}}},status:{views:{indicator:{backgroundColor:"theme-success"},label:{color:"color-black",fontFamily:"-apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Inter', system-ui, sans-serif"}}},progress:{color:"theme-primary",backgroundColor:"color-gray-200",radius:"18px",views:{container:{backgroundColor:"color-gray-200",borderRadius:"9999px"},bar:{backgroundColor:"theme-primary"},text:{color:"color-black"}}},loader:{color:"theme-primary"},separator:{color:"color-gray-200",views:{container:{borderColor:"color-gray-200"},label:{color:"color-gray-500",fontFamily:"-apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Inter', system-ui, sans-serif"}}},navigation:{views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"color-black",borderRadius:"18px"},item:{color:"color-gray-500"},activeItem:{color:"theme-primary",borderColor:"theme-primary"}}},hero:{views:{container:{backgroundColor:"color-white",color:"color-black",fontFamily:"-apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Inter', system-ui, sans-serif"},eyebrow:{color:"color-gray-500"},title:{color:"color-black",fontFamily:"-apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Inter', system-ui, sans-serif"},description:{color:"color-gray-500"}}},page:{views:{container:{backgroundColor:"color-white",color:"color-black",fontFamily:"-apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Inter', system-ui, sans-serif"},section:{backgroundColor:"color-white",borderColor:"color-gray-200"},surface:{backgroundColor:"color-gray-50",borderColor:"color-gray-200",color:"color-black"}}}},personality:{cornerStyle:"soft",typeWeight:"light",typeCase:"normal",typeStyle:"normal",letterSpacing:"-0.022em",accentTreatment:"flat",signatureMotif:"◯",density:"spacious",surfaceTone:"paper",cardRadius:18,pillRadius:9999,badgeRadius:8,voice:"minimal-precise"}},coinbase:{metadata:{id:"coinbase",label:"Coinbase",sourcePath:"design.md/html/coinbase.html",sourceTitle:"Design System Inspiration of Coinbase",defaultAppearance:"light",googleFontLinks:["https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=JetBrains+Mono:wght@500&display=swap"]},theme:{primary:"#0052ff",secondary:"#0a0b0d",success:"#16a34a",warning:"#003ecc",error:"#dc2626",canvas:"color-white",surface:"color-gray-50",text:"color-black",muted:"color-gray-500",border:"color-gray-200",onPrimary:"#ffffff"},tokens:{rawCssVars:{primary:"#0052ff","primary-active":"#003ecc","primary-disabled":"#a8b8cc",ink:"#0a0b0d",body:"#5b616e",muted:"#7c828a","muted-soft":"#a8acb3",hairline:"#dee1e6","hairline-soft":"#eef0f3",canvas:"#ffffff","surface-soft":"#f7f7f7","surface-strong":"#eef0f3","surface-dark":"#0a0b0d","surface-dark-elevated":"#16181c","on-primary":"#ffffff","on-dark":"#ffffff","on-dark-soft":"#a8acb3","semantic-up":"#05b169","semantic-down":"#cf202f","accent-yellow":"#f4b000",display:"'Inter', 'Coinbase Display', -apple-system, system-ui, sans-serif",text:"'Inter', 'Coinbase Sans', sans-serif",mono:"'JetBrains Mono', 'Coinbase Mono', monospace"},colors:[{name:"primary",value:"#0052ff",role:"primary"},{name:"primary-active",value:"#003ecc",role:"primary active"},{name:"primary-disabled",value:"#a8b8cc",role:"primary disabled"},{name:"ink",value:"#0a0b0d",role:"ink"},{name:"body",value:"#5b616e",role:"body"},{name:"muted",value:"#7c828a",role:"muted"},{name:"muted-soft",value:"#a8acb3",role:"muted soft"},{name:"hairline",value:"#dee1e6",role:"hairline"},{name:"hairline-soft",value:"#eef0f3",role:"hairline soft"},{name:"canvas",value:"#ffffff",role:"canvas"},{name:"surface-soft",value:"#f7f7f7",role:"surface soft"},{name:"surface-strong",value:"#eef0f3",role:"surface strong"},{name:"surface-dark",value:"#0a0b0d",role:"surface dark"},{name:"surface-dark-elevated",value:"#16181c",role:"surface dark elevated"},{name:"on-primary",value:"#ffffff",role:"on primary"},{name:"on-dark",value:"#ffffff",role:"on dark"},{name:"on-dark-soft",value:"#a8acb3",role:"on dark soft"},{name:"semantic-up",value:"#05b169",role:"semantic up"},{name:"semantic-down",value:"#cf202f",role:"semantic down"},{name:"accent-yellow",value:"#f4b000",role:"accent yellow"}],typography:{fontFamily:"'Inter', 'Coinbase Display', -apple-system, system-ui, sans-serif",monoFamily:"'JetBrains Mono', 'Coinbase Mono', monospace",fontSizes:["16px","14px","72px","18px","13px","36px","12px","44px","11px","52px","28px","40px","32px","48px","26px"],fontWeights:["500","600","400","700"],lineHeights:["1.5","1.2","1.05","1.15","1.0","1.09","1","1.35","1.4"]},spacing:["4px","5px","6px","8px","10px","11px","12px","13px","14px","15px","16px","19px","20px","24px","28px","32px","40px","44px","48px","56px"],radii:["100px","24px","20px","16px","9999px","14px","12px","8px","6px","3px"],shadows:["0 16px 40px rgba(0,0,0,0.5)","0 16px 40px rgba(0,0,0,0.4)","0 4px 12px rgba(0,0,0,0.04)"]},components:{button:{variant:"filled",size:"md",shape:"rounded",color:"theme-primary",textColor:"theme-onPrimary",views:{container:{borderRadius:9999,fontFamily:"'Inter', 'Coinbase Display', -apple-system, system-ui, sans-serif",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},content:{fontFamily:"'Inter', 'Coinbase Display', -apple-system, system-ui, sans-serif",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"}}},badge:{variant:"filled",size:"sm",shape:"pill",views:{container:{backgroundColor:"theme-secondary",color:"color-white",borderColor:"theme-secondary",borderRadius:6,fontFamily:"'Inter', 'Coinbase Display', -apple-system, system-ui, sans-serif",letterSpacing:"-0.01em",textTransform:"none",fontWeight:700,fontStyle:"normal"},text:{fontFamily:"'Inter', 'Coinbase Display', -apple-system, system-ui, sans-serif",fontWeight:600}}},card:{variant:"outlined",size:"md",shape:"rounded",views:{container:{backgroundColor:"color-gray-50",borderColor:"color-gray-200",color:"color-black",borderRadius:12,borderWidth:"1px",borderStyle:"solid",boxShadow:"0 16px 40px rgba(0,0,0,0.5)"},header:{color:"color-black",fontFamily:"'Inter', 'Coinbase Display', -apple-system, system-ui, sans-serif",fontWeight:600,borderColor:"color-gray-200"},content:{color:"color-gray-500",fontFamily:"'Inter', 'Coinbase Display', -apple-system, system-ui, sans-serif"},footer:{borderColor:"color-gray-200"}}},input:{size:"md",shape:"default",variant:"default",views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"color-black",borderRadius:10,borderWidth:"1px",borderStyle:"solid",boxShadow:"none"},field:{color:"color-black",fontFamily:"'Inter', 'Coinbase Display', -apple-system, system-ui, sans-serif",fontStyle:"normal",letterSpacing:"-0.01em"},label:{fontFamily:"'Inter', 'Coinbase Display', -apple-system, system-ui, sans-serif",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},helperText:{}}},textarea:{size:"md",shape:"default",variant:"default",views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"color-black",borderRadius:10,borderWidth:"1px",borderStyle:"solid",boxShadow:"none"},field:{color:"color-black",fontFamily:"'Inter', 'Coinbase Display', -apple-system, system-ui, sans-serif",fontStyle:"normal",letterSpacing:"-0.01em"},label:{fontFamily:"'Inter', 'Coinbase Display', -apple-system, system-ui, sans-serif",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},helperText:{}}},select:{size:"md",shape:"default",variant:"default",views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"color-black",borderRadius:10,borderWidth:"1px",borderStyle:"solid",boxShadow:"none"},field:{color:"color-black",fontFamily:"'Inter', 'Coinbase Display', -apple-system, system-ui, sans-serif"},label:{fontFamily:"'Inter', 'Coinbase Display', -apple-system, system-ui, sans-serif",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},helperText:{},text:{letterSpacing:"-0.01em",fontStyle:"normal"}}},checkbox:{size:"md",views:{checkbox:{borderColor:"color-gray-200",backgroundColor:"color-white",_checked:{backgroundColor:"theme-primary",borderColor:"theme-primary"},borderRadius:4},label:{fontFamily:"'Inter', 'Coinbase Display', -apple-system, system-ui, sans-serif",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},infoText:{color:"color-gray-500"},container:{borderRadius:4}}},radio:{size:"md",views:{radio:{borderColor:"color-gray-200",backgroundColor:"color-white"},dot:{backgroundColor:"theme-primary"},label:{fontFamily:"'Inter', 'Coinbase Display', -apple-system, system-ui, sans-serif",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},infoText:{color:"color-gray-500"},container:{borderRadius:"50%"}}},switch:{size:"sm",views:{slider:{backgroundColor:"color-gray-200"},circle:{backgroundColor:"color-white"},label:{fontFamily:"'Inter', 'Coinbase Display', -apple-system, system-ui, sans-serif",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},container:{borderRadius:"9999px"}}},slider:{backgroundColor:"theme-primary",views:{track:{backgroundColor:"color-gray-200"},progress:{backgroundColor:"theme-primary"},filledTrack:{backgroundColor:"theme-primary"},thumb:{borderColor:"theme-primary",backgroundColor:"color-white"},label:{color:"color-black"},valueLabel:{color:"color-gray-500"}}},tabs:{variant:"pill",views:{headerTabs:{borderColor:"color-gray-200"},tab:{color:"color-gray-500",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},activeTab:{color:"theme-primary",borderColor:"theme-primary",backgroundColor:"theme-primary"},title:{fontFamily:"'Inter', 'Coinbase Display', -apple-system, system-ui, sans-serif"},activeText:{color:"color-white"},content:{color:"color-black"},container:{borderRadius:"9999px"}}},accordion:{views:{container:{borderColor:"color-gray-200",backgroundColor:"color-gray-50",color:"color-black",borderRadius:"16px"},trigger:{color:"color-black",fontFamily:"'Inter', 'Coinbase Display', -apple-system, system-ui, sans-serif"},content:{color:"color-gray-500"}}},table:{views:{table:{backgroundColor:"color-white",color:"color-black",borderColor:"color-gray-200",borderRadius:12},thead:{backgroundColor:"color-gray-50",color:"color-black"},th:{color:"color-gray-500",borderColor:"color-gray-200",fontFamily:"'JetBrains Mono', 'Coinbase Mono', monospace",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},tr:{borderColor:"color-gray-200"},td:{color:"color-black",borderColor:"color-gray-200",letterSpacing:"-0.01em",fontStyle:"normal"},caption:{color:"color-gray-500",fontStyle:"italic",letterSpacing:"-0.01em"}}},avatar:{views:{container:{backgroundColor:"color-gray-50",borderColor:"color-gray-200",color:"color-black",borderRadius:"50%"},fallback:{color:"color-black",fontFamily:"'Inter', 'Coinbase Display', -apple-system, system-ui, sans-serif"}}},alert:{views:{container:{backgroundColor:"color-gray-50",borderColor:"color-gray-200",borderRadius:12},title:{color:"color-black",fontFamily:"'Inter', 'Coinbase Display', -apple-system, system-ui, sans-serif",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},description:{color:"color-gray-500",fontFamily:"'Inter', 'Coinbase Display', -apple-system, system-ui, sans-serif"},icon:{color:"theme-primary"}}},status:{views:{indicator:{backgroundColor:"theme-success"},label:{color:"color-black",fontFamily:"'Inter', 'Coinbase Display', -apple-system, system-ui, sans-serif"}}},progress:{color:"theme-primary",backgroundColor:"color-gray-200",radius:"16px",views:{container:{backgroundColor:"color-gray-200",borderRadius:"9999px"},bar:{backgroundColor:"theme-primary"},text:{color:"color-black"}}},loader:{color:"theme-primary"},separator:{color:"color-gray-200",views:{container:{borderColor:"color-gray-200"},label:{color:"color-gray-500",fontFamily:"'Inter', 'Coinbase Display', -apple-system, system-ui, sans-serif"}}},navigation:{views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"color-black",borderRadius:"16px"},item:{color:"color-gray-500"},activeItem:{color:"theme-primary",borderColor:"theme-primary"}}},hero:{views:{container:{backgroundColor:"color-white",color:"color-black",fontFamily:"'Inter', 'Coinbase Display', -apple-system, system-ui, sans-serif"},eyebrow:{color:"color-gray-500"},title:{color:"color-black",fontFamily:"'Inter', 'Coinbase Display', -apple-system, system-ui, sans-serif"},description:{color:"color-gray-500"}}},page:{views:{container:{backgroundColor:"color-white",color:"color-black",fontFamily:"'Inter', 'Coinbase Display', -apple-system, system-ui, sans-serif"},section:{backgroundColor:"color-white",borderColor:"color-gray-200"},surface:{backgroundColor:"color-gray-50",borderColor:"color-gray-200",color:"color-black"}}}},personality:{cornerStyle:"soft",typeWeight:"bold",typeCase:"normal",typeStyle:"normal",letterSpacing:"-0.01em",accentTreatment:"flat",signatureMotif:"◆",density:"comfortable",surfaceTone:"paper",cardRadius:12,pillRadius:9999,badgeRadius:6,voice:"trustworthy-financial"}},figma:{metadata:{id:"figma",label:"Figma",sourcePath:"design.md/html/figma.html",sourceTitle:"Design System Inspiration of Figma",defaultAppearance:"light",googleFontLinks:["https://fonts.googleapis.com/css2?family=Inter:wght@300..700&family=JetBrains+Mono:wght@400;500&display=swap"]},theme:{primary:"#F24E1E",secondary:"#A259FF",success:"#0ACF83",warning:"#FFC700",error:"#FF7262",canvas:"color-white",surface:"color-gray-50",text:"color-black",muted:"color-gray-500",border:"color-gray-200",onPrimary:"#ffffff"},tokens:{rawCssVars:{primary:"#000000","on-primary":"#ffffff",ink:"#000000",canvas:"#ffffff","inverse-canvas":"#000000","inverse-ink":"#ffffff",hairline:"#e6e6e6","hairline-soft":"#f1f1f1","surface-soft":"#f7f7f5","block-lime":"#dceeb1","block-lilac":"#c5b0f4","block-cream":"#f4ecd6","block-pink":"#efd4d4","block-mint":"#c8e6cd","block-coral":"#f3c9b6","block-navy":"#1f1d3d","accent-magenta":"#ff3d8b","semantic-success":"#1ea64a",sans:"'Inter', 'SF Pro Display', system-ui, -apple-system, Helvetica, sans-serif",mono:"'JetBrains Mono', 'SF Mono', Menlo, monospace"},colors:[{name:"primary",value:"#F24E1E",role:"primary"},{name:"on-primary",value:"#ffffff",role:"on primary"},{name:"ink",value:"#000000",role:"ink"},{name:"canvas",value:"#ffffff",role:"canvas"},{name:"inverse-canvas",value:"#000000",role:"inverse canvas"},{name:"inverse-ink",value:"#ffffff",role:"inverse ink"},{name:"hairline",value:"#e6e6e6",role:"hairline"},{name:"hairline-soft",value:"#f1f1f1",role:"hairline soft"},{name:"surface-soft",value:"#f7f7f5",role:"surface soft"},{name:"block-lime",value:"#dceeb1",role:"block lime"},{name:"block-lilac",value:"#c5b0f4",role:"block lilac"},{name:"block-cream",value:"#f4ecd6",role:"block cream"},{name:"block-pink",value:"#efd4d4",role:"block pink"},{name:"block-mint",value:"#c8e6cd",role:"block mint"},{name:"block-coral",value:"#f3c9b6",role:"block coral"},{name:"block-navy",value:"#1f1d3d",role:"block navy"},{name:"accent-magenta",value:"#ff3d8b",role:"accent magenta"},{name:"semantic-success",value:"#1ea64a",role:"semantic success"}],typography:{fontFamily:"'Inter', 'SF Pro Display', system-ui, -apple-system, Helvetica, sans-serif",monoFamily:"'JetBrains Mono', 'SF Mono', Menlo, monospace",fontSizes:["18px","16px","80px","20px","12px","40px","14px","11px","26px","24px","32px","13px","10px","56px","36px"],fontWeights:["320","330","480","600","500","700"],lineHeights:["1.45","1.0","1.4","1.1","1.6","1.35","1","1.2"]},spacing:["5px","6px","8px","10px","12px","14px","16px","20px","22px","24px","28px","32px","36px","40px","44px","48px","56px","64px","96px","100px"],radii:["50px","8px","9999px","24px","6px","2px","3px"],shadows:["0 0 0 2px rgba(0,0,0,0.08)","none","0 4px 16px rgba(0,0,0,0.06)","0 12px 32px rgba(0,0,0,0.18)"]},components:{button:{variant:"filled",size:"md",shape:"rounded",color:"theme-primary",textColor:"theme-onPrimary",views:{container:{borderRadius:9999,fontFamily:"'Inter', 'SF Pro Display', system-ui, -apple-system, Helvetica, sans-serif",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},content:{fontFamily:"'Inter', 'SF Pro Display', system-ui, -apple-system, Helvetica, sans-serif",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"}}},badge:{variant:"filled",size:"sm",shape:"rounded",views:{container:{backgroundColor:"theme-secondary",color:"color-white",borderColor:"theme-secondary",borderRadius:4,fontFamily:"'Inter', 'SF Pro Display', system-ui, -apple-system, Helvetica, sans-serif",letterSpacing:"-0.01em",textTransform:"none",fontWeight:700,fontStyle:"normal"},text:{fontFamily:"'Inter', 'SF Pro Display', system-ui, -apple-system, Helvetica, sans-serif",fontWeight:600}}},card:{variant:"outlined",size:"md",shape:"rounded",views:{container:{backgroundColor:"color-gray-50",borderColor:"color-gray-200",color:"theme-primary",borderRadius:8,borderWidth:"1px",borderStyle:"solid",boxShadow:"0 0 0 2px rgba(0,0,0,0.08)"},header:{color:"theme-primary",fontFamily:"'Inter', 'SF Pro Display', system-ui, -apple-system, Helvetica, sans-serif",fontWeight:600,borderColor:"color-gray-200"},content:{color:"color-gray-500",fontFamily:"'Inter', 'SF Pro Display', system-ui, -apple-system, Helvetica, sans-serif"},footer:{borderColor:"color-gray-200"}}},input:{size:"md",shape:"default",variant:"default",views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"theme-primary",borderRadius:10,borderWidth:"1px",borderStyle:"solid",boxShadow:"none"},field:{color:"theme-primary",fontFamily:"'Inter', 'SF Pro Display', system-ui, -apple-system, Helvetica, sans-serif",fontStyle:"normal",letterSpacing:"-0.01em"},label:{fontFamily:"'Inter', 'SF Pro Display', system-ui, -apple-system, Helvetica, sans-serif",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},helperText:{}}},textarea:{size:"md",shape:"default",variant:"default",views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"theme-primary",borderRadius:10,borderWidth:"1px",borderStyle:"solid",boxShadow:"none"},field:{color:"theme-primary",fontFamily:"'Inter', 'SF Pro Display', system-ui, -apple-system, Helvetica, sans-serif",fontStyle:"normal",letterSpacing:"-0.01em"},label:{fontFamily:"'Inter', 'SF Pro Display', system-ui, -apple-system, Helvetica, sans-serif",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},helperText:{}}},select:{size:"md",shape:"default",variant:"default",views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"theme-primary",borderRadius:10,borderWidth:"1px",borderStyle:"solid",boxShadow:"none"},field:{color:"theme-primary",fontFamily:"'Inter', 'SF Pro Display', system-ui, -apple-system, Helvetica, sans-serif"},label:{fontFamily:"'Inter', 'SF Pro Display', system-ui, -apple-system, Helvetica, sans-serif",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},helperText:{},text:{letterSpacing:"-0.01em",fontStyle:"normal"}}},checkbox:{size:"md",views:{checkbox:{borderColor:"color-gray-200",backgroundColor:"color-white",_checked:{backgroundColor:"theme-primary",borderColor:"theme-primary"},borderRadius:4},label:{fontFamily:"'Inter', 'SF Pro Display', system-ui, -apple-system, Helvetica, sans-serif",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},infoText:{color:"color-gray-500"},container:{borderRadius:4}}},radio:{size:"md",views:{radio:{borderColor:"color-gray-200",backgroundColor:"color-white"},dot:{backgroundColor:"theme-primary"},label:{fontFamily:"'Inter', 'SF Pro Display', system-ui, -apple-system, Helvetica, sans-serif",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},infoText:{color:"color-gray-500"},container:{borderRadius:"50%"}}},switch:{size:"sm",views:{slider:{backgroundColor:"color-gray-200"},circle:{backgroundColor:"color-white"},label:{fontFamily:"'Inter', 'SF Pro Display', system-ui, -apple-system, Helvetica, sans-serif",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},container:{borderRadius:"9999px"}}},slider:{backgroundColor:"theme-primary",views:{track:{backgroundColor:"color-gray-200"},progress:{backgroundColor:"theme-primary"},filledTrack:{backgroundColor:"theme-primary"},thumb:{borderColor:"theme-primary",backgroundColor:"color-white"},label:{color:"theme-primary"},valueLabel:{color:"color-gray-500"}}},tabs:{variant:"underline",views:{headerTabs:{borderColor:"color-gray-200"},tab:{color:"color-gray-500",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},activeTab:{color:"theme-primary",borderColor:"theme-primary",backgroundColor:"transparent"},title:{fontFamily:"'Inter', 'SF Pro Display', system-ui, -apple-system, Helvetica, sans-serif"},activeText:{color:"theme-primary"},content:{color:"theme-primary"},container:{borderRadius:"8px"}}},accordion:{views:{container:{borderColor:"color-gray-200",backgroundColor:"color-gray-50",color:"theme-primary",borderRadius:"12px"},trigger:{color:"theme-primary",fontFamily:"'Inter', 'SF Pro Display', system-ui, -apple-system, Helvetica, sans-serif"},content:{color:"color-gray-500"}}},table:{views:{table:{backgroundColor:"color-white",color:"theme-primary",borderColor:"color-gray-200",borderRadius:8},thead:{backgroundColor:"color-gray-50",color:"theme-primary"},th:{color:"color-gray-500",borderColor:"color-gray-200",fontFamily:"'JetBrains Mono', 'SF Mono', Menlo, monospace",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},tr:{borderColor:"color-gray-200"},td:{color:"theme-primary",borderColor:"color-gray-200",letterSpacing:"-0.01em",fontStyle:"normal"},caption:{color:"color-gray-500",fontStyle:"italic",letterSpacing:"-0.01em"}}},avatar:{views:{container:{backgroundColor:"color-gray-50",borderColor:"color-gray-200",color:"theme-primary",borderRadius:"50%"},fallback:{color:"theme-primary",fontFamily:"'Inter', 'SF Pro Display', system-ui, -apple-system, Helvetica, sans-serif"}}},alert:{views:{container:{backgroundColor:"color-gray-50",borderColor:"color-gray-200",borderRadius:8},title:{color:"theme-primary",fontFamily:"'Inter', 'SF Pro Display', system-ui, -apple-system, Helvetica, sans-serif",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},description:{color:"color-gray-500",fontFamily:"'Inter', 'SF Pro Display', system-ui, -apple-system, Helvetica, sans-serif"},icon:{color:"theme-primary"}}},status:{views:{indicator:{backgroundColor:"theme-success"},label:{color:"theme-primary",fontFamily:"'Inter', 'SF Pro Display', system-ui, -apple-system, Helvetica, sans-serif"}}},progress:{color:"theme-primary",backgroundColor:"color-gray-200",radius:"8px",views:{container:{backgroundColor:"color-gray-200",borderRadius:"9999px"},bar:{backgroundColor:"theme-primary"},text:{color:"theme-primary"}}},loader:{color:"theme-primary"},separator:{color:"color-gray-200",views:{container:{borderColor:"color-gray-200"},label:{color:"color-gray-500",fontFamily:"'Inter', 'SF Pro Display', system-ui, -apple-system, Helvetica, sans-serif"}}},navigation:{views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"theme-primary",borderRadius:"12px"},item:{color:"color-gray-500"},activeItem:{color:"theme-primary",borderColor:"theme-primary"}}},hero:{views:{container:{backgroundColor:"color-white",color:"theme-primary",fontFamily:"'Inter', 'SF Pro Display', system-ui, -apple-system, Helvetica, sans-serif"},eyebrow:{color:"color-gray-500"},title:{color:"theme-primary",fontFamily:"'Inter', 'SF Pro Display', system-ui, -apple-system, Helvetica, sans-serif"},description:{color:"color-gray-500"}}},page:{views:{container:{backgroundColor:"color-white",color:"theme-primary",fontFamily:"'Inter', 'SF Pro Display', system-ui, -apple-system, Helvetica, sans-serif"},section:{backgroundColor:"color-white",borderColor:"color-gray-200"},surface:{backgroundColor:"color-gray-50",borderColor:"color-gray-200",color:"theme-primary"}}}},personality:{cornerStyle:"soft",typeWeight:"bold",typeCase:"normal",typeStyle:"normal",letterSpacing:"-0.01em",accentTreatment:"flat",signatureMotif:"✦",density:"comfortable",surfaceTone:"paper",cardRadius:8,pillRadius:9999,badgeRadius:4,voice:"playful-creative"}},linear:{metadata:{id:"linear",label:"Linear",sourcePath:"design.md/html/linear.html",sourceTitle:"Design System Inspiration of Linear",defaultAppearance:"dark",googleFontLinks:["https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=JetBrains+Mono:wght@400&display=swap"]},theme:{primary:"#5e6ad2",secondary:"#828fff",success:"#27a644",warning:"#5e69d1",error:"#828fff",canvas:"color-white",surface:"color-gray-50",text:"color-black",muted:"color-gray-500",border:"color-gray-200",onPrimary:"#ffffff"},tokens:{rawCssVars:{primary:"#5e6ad2","primary-hover":"#828fff","primary-focus":"#5e69d1","on-primary":"#ffffff",ink:"#f7f8f8","ink-muted":"#d0d6e0","ink-subtle":"#8a8f98","ink-tertiary":"#62666d",canvas:"#010102","surface-1":"#0f1011","surface-2":"#141516","surface-3":"#18191a","surface-4":"#191a1b",hairline:"#23252a","hairline-strong":"#34343a","hairline-tertiary":"#3e3e44","semantic-success":"#27a644",sans:"'Inter', 'SF Pro Display', system-ui, -apple-system, sans-serif",mono:"'JetBrains Mono', ui-monospace, 'SF Mono', menlo, monospace"},colors:[{name:"primary",value:"#5e6ad2",role:"primary"},{name:"primary-hover",value:"#828fff",role:"primary hover"},{name:"primary-focus",value:"#5e69d1",role:"primary focus"},{name:"on-primary",value:"#ffffff",role:"on primary"},{name:"ink",value:"#f7f8f8",role:"ink"},{name:"ink-muted",value:"#d0d6e0",role:"ink muted"},{name:"ink-subtle",value:"#8a8f98",role:"ink subtle"},{name:"ink-tertiary",value:"#62666d",role:"ink tertiary"},{name:"canvas",value:"#08090A",role:"canvas"},{name:"surface-1",value:"#0f1011",role:"surface 1"},{name:"surface-2",value:"#141516",role:"surface 2"},{name:"surface-3",value:"#18191a",role:"surface 3"},{name:"surface-4",value:"#191a1b",role:"surface 4"},{name:"hairline",value:"#23252a",role:"hairline"},{name:"hairline-strong",value:"#34343a",role:"hairline strong"},{name:"hairline-tertiary",value:"#3e3e44",role:"hairline tertiary"},{name:"semantic-success",value:"#27a644",role:"semantic success"}],typography:{fontFamily:"'Inter', 'SF Pro Display', system-ui, -apple-system, sans-serif",monoFamily:"'JetBrains Mono', ui-monospace, 'SF Mono', menlo, monospace",fontSizes:["16px","14px","80px","18px","13px","56px","15px","12px","11px","28px","40px","22px","10px","36px"],fontWeights:["400","500","600","700"],lineHeights:["1.50","1.05","1.20","1.10","1.5","1.6","1.25","1","1.2","1.35","1.4"]},spacing:["2px","5px","6px","8px","10px","12px","14px","16px","20px","24px","28px","32px","36px","40px","48px","56px","64px","80px","96px","120px"],radii:["8px","12px","9999px","16px","4px","2px","6px","3px"],shadows:["rgba(255,255,255,0.05) 0 0.5px 0 0.5px","0 0 0 2px rgba(94,105,209,0.25)"]},components:{button:{variant:"filled",size:"md",shape:"rounded",color:"theme-primary",textColor:"theme-on-primary",views:{container:{borderRadius:9999,fontFamily:"'Inter', 'SF Pro Display', system-ui, -apple-system, sans-serif",fontWeight:700,letterSpacing:"-0.025em",textTransform:"none",fontStyle:"normal"},content:{fontFamily:"'Inter', 'SF Pro Display', system-ui, -apple-system, sans-serif",fontWeight:700,letterSpacing:"-0.025em",textTransform:"none",fontStyle:"normal"}}},badge:{variant:"filled",size:"sm",shape:"rounded",views:{container:{backgroundColor:"theme-secondary",color:"theme-on-primary",borderColor:"theme-secondary",borderRadius:6,fontFamily:"'Inter', 'SF Pro Display', system-ui, -apple-system, sans-serif",letterSpacing:"-0.025em",textTransform:"none",fontWeight:700,fontStyle:"normal"},text:{fontFamily:"'Inter', 'SF Pro Display', system-ui, -apple-system, sans-serif",fontWeight:600}}},card:{variant:"outlined",size:"md",shape:"rounded",views:{container:{backgroundColor:"color-gray-50",borderColor:"color-gray-200",color:"color-black",borderRadius:12,borderWidth:"1px",borderStyle:"solid",boxShadow:"rgba(255,255,255,0.05) 0 0.5px 0 0.5px"},header:{color:"color-black",fontFamily:"'Inter', 'SF Pro Display', system-ui, -apple-system, sans-serif",fontWeight:600,borderColor:"color-gray-200"},content:{color:"color-gray-500",fontFamily:"'Inter', 'SF Pro Display', system-ui, -apple-system, sans-serif"},footer:{borderColor:"color-gray-200"}}},input:{size:"md",shape:"default",variant:"default",views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"color-black",borderRadius:10,borderWidth:"1px",borderStyle:"solid",boxShadow:"none"},field:{color:"color-black",fontFamily:"'Inter', 'SF Pro Display', system-ui, -apple-system, sans-serif",fontStyle:"normal",letterSpacing:"-0.025em"},label:{fontFamily:"'Inter', 'SF Pro Display', system-ui, -apple-system, sans-serif",fontWeight:700,letterSpacing:"-0.025em",textTransform:"none",fontStyle:"normal"},helperText:{}}},textarea:{size:"md",shape:"default",variant:"default",views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"color-black",borderRadius:10,borderWidth:"1px",borderStyle:"solid",boxShadow:"none"},field:{color:"color-black",fontFamily:"'Inter', 'SF Pro Display', system-ui, -apple-system, sans-serif",fontStyle:"normal",letterSpacing:"-0.025em"},label:{fontFamily:"'Inter', 'SF Pro Display', system-ui, -apple-system, sans-serif",fontWeight:700,letterSpacing:"-0.025em",textTransform:"none",fontStyle:"normal"},helperText:{}}},select:{size:"md",shape:"default",variant:"default",views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"color-black",borderRadius:10,borderWidth:"1px",borderStyle:"solid",boxShadow:"none"},field:{color:"color-black",fontFamily:"'Inter', 'SF Pro Display', system-ui, -apple-system, sans-serif"},label:{fontFamily:"'Inter', 'SF Pro Display', system-ui, -apple-system, sans-serif",fontWeight:700,letterSpacing:"-0.025em",textTransform:"none",fontStyle:"normal"},helperText:{},text:{letterSpacing:"-0.025em",fontStyle:"normal"}}},checkbox:{size:"md",views:{checkbox:{borderColor:"color-gray-200",backgroundColor:"color-white",_checked:{backgroundColor:"theme-primary",borderColor:"theme-primary"},borderRadius:4},label:{fontFamily:"'Inter', 'SF Pro Display', system-ui, -apple-system, sans-serif",fontWeight:700,letterSpacing:"-0.025em",textTransform:"none",fontStyle:"normal"},infoText:{color:"color-gray-500"},container:{borderRadius:4}}},radio:{size:"md",views:{radio:{borderColor:"color-gray-200",backgroundColor:"color-white"},dot:{backgroundColor:"theme-primary"},label:{fontFamily:"'Inter', 'SF Pro Display', system-ui, -apple-system, sans-serif",fontWeight:700,letterSpacing:"-0.025em",textTransform:"none",fontStyle:"normal"},infoText:{color:"color-gray-500"},container:{borderRadius:"50%"}}},switch:{size:"sm",views:{slider:{backgroundColor:"color-gray-200"},circle:{backgroundColor:"color-white"},label:{fontFamily:"'Inter', 'SF Pro Display', system-ui, -apple-system, sans-serif",fontWeight:700,letterSpacing:"-0.025em",textTransform:"none",fontStyle:"normal"},container:{borderRadius:"9999px"}}},slider:{backgroundColor:"theme-primary",views:{track:{backgroundColor:"color-gray-200"},progress:{backgroundColor:"theme-primary"},filledTrack:{backgroundColor:"theme-primary"},thumb:{borderColor:"theme-primary",backgroundColor:"color-white"},label:{color:"color-black"},valueLabel:{color:"color-gray-500"}}},tabs:{variant:"underline",views:{headerTabs:{borderColor:"color-gray-200"},tab:{color:"color-gray-500",fontWeight:700,letterSpacing:"-0.025em",textTransform:"none",fontStyle:"normal"},activeTab:{color:"theme-primary",borderColor:"theme-primary",backgroundColor:"transparent"},title:{fontFamily:"'Inter', 'SF Pro Display', system-ui, -apple-system, sans-serif"},activeText:{color:"theme-primary"},content:{color:"color-black"},container:{borderRadius:"8px"}}},accordion:{views:{container:{borderColor:"color-gray-200",backgroundColor:"color-gray-50",color:"color-black",borderRadius:"12px"},trigger:{color:"color-black",fontFamily:"'Inter', 'SF Pro Display', system-ui, -apple-system, sans-serif"},content:{color:"color-gray-500"}}},table:{views:{table:{backgroundColor:"color-white",color:"color-black",borderColor:"color-gray-200",borderRadius:12},thead:{backgroundColor:"color-gray-50",color:"color-black"},th:{color:"color-gray-500",borderColor:"color-gray-200",fontFamily:"'JetBrains Mono', ui-monospace, 'SF Mono', menlo, monospace",fontWeight:700,letterSpacing:"-0.025em",textTransform:"none",fontStyle:"normal"},tr:{borderColor:"color-gray-200"},td:{color:"color-black",borderColor:"color-gray-200",letterSpacing:"-0.025em",fontStyle:"normal"},caption:{color:"color-gray-500",fontStyle:"italic",letterSpacing:"-0.025em"}}},avatar:{views:{container:{backgroundColor:"color-gray-50",borderColor:"color-gray-200",color:"color-black",borderRadius:"50%"},fallback:{color:"color-black",fontFamily:"'Inter', 'SF Pro Display', system-ui, -apple-system, sans-serif"}}},alert:{views:{container:{backgroundColor:"color-gray-50",borderColor:"color-gray-200",borderRadius:12},title:{color:"color-black",fontFamily:"'Inter', 'SF Pro Display', system-ui, -apple-system, sans-serif",fontWeight:700,letterSpacing:"-0.025em",textTransform:"none",fontStyle:"normal"},description:{color:"color-gray-500",fontFamily:"'Inter', 'SF Pro Display', system-ui, -apple-system, sans-serif"},icon:{color:"theme-primary"}}},status:{views:{indicator:{backgroundColor:"theme-success"},label:{color:"color-black",fontFamily:"'Inter', 'SF Pro Display', system-ui, -apple-system, sans-serif"}}},progress:{color:"theme-primary",backgroundColor:"color-gray-200",radius:"8px",views:{container:{backgroundColor:"color-gray-200",borderRadius:"9999px"},bar:{backgroundColor:"theme-primary"},text:{color:"color-black"}}},loader:{color:"theme-primary"},separator:{color:"color-gray-200",views:{container:{borderColor:"color-gray-200"},label:{color:"color-gray-500",fontFamily:"'Inter', 'SF Pro Display', system-ui, -apple-system, sans-serif"}}},navigation:{views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"color-black",borderRadius:"12px"},item:{color:"color-gray-500"},activeItem:{color:"theme-primary",borderColor:"theme-primary"}}},hero:{views:{container:{backgroundColor:"color-white",color:"color-black",fontFamily:"'Inter', 'SF Pro Display', system-ui, -apple-system, sans-serif"},eyebrow:{color:"color-gray-500"},title:{color:"color-black",fontFamily:"'Inter', 'SF Pro Display', system-ui, -apple-system, sans-serif"},description:{color:"color-gray-500"}}},page:{views:{container:{backgroundColor:"color-white",color:"color-black",fontFamily:"'Inter', 'SF Pro Display', system-ui, -apple-system, sans-serif"},section:{backgroundColor:"color-white",borderColor:"color-gray-200"},surface:{backgroundColor:"color-gray-50",borderColor:"color-gray-200",color:"color-black"}}}},personality:{cornerStyle:"soft",typeWeight:"bold",typeCase:"normal",typeStyle:"normal",letterSpacing:"-0.025em",accentTreatment:"gradient",signatureMotif:"↗",density:"tight",surfaceTone:"glass",cardRadius:12,pillRadius:9999,badgeRadius:6,voice:"speed-clarity"}},nike:{metadata:{id:"nike",label:"Nike",sourcePath:"design.md/html/nike.html",sourceTitle:"Design System Inspiration of Nike",defaultAppearance:"light",googleFontLinks:["https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap"]},theme:{primary:"color-black",secondary:"#FA5400",success:"#76E0B5",warning:"#1151ff",error:"#d30005",canvas:"color-white",surface:"color-gray-50",text:"color-black",muted:"color-gray-500",border:"color-gray-200",onPrimary:"color-white"},tokens:{rawCssVars:{ink:"#111111","on-primary":"#ffffff",canvas:"#ffffff","soft-cloud":"#f5f5f5",charcoal:"#39393b",ash:"#4b4b4d",mute:"#707072",stone:"#9e9ea0",hairline:"#cacacb","hairline-soft":"#e5e5e5",sale:"#d30005","sale-deep":"#780700",success:"#007d48","success-bright":"#1eaa52",info:"#1151ff","info-deep":"#0034e3","accent-pink":"#ed1aa0","accent-pink-soft":"#ffb0dd","accent-purple-soft":"#beaffd","accent-purple-pale":"#d6d1ff","accent-teal":"#0a7281","accent-pink-deep":"#4c012d","font-display":"'Helvetica Now Display', 'Helvetica Neue', 'Inter', Helvetica, Arial, sans-serif","font-ui":"'Inter', 'Helvetica Now Text Medium', Helvetica, Arial, sans-serif","font-body":"'Inter', 'Helvetica Now Text', Helvetica, Arial, sans-serif"},colors:[{name:"ink",value:"#111111",role:"ink"},{name:"on-primary",value:"#ffffff",role:"on primary"},{name:"canvas",value:"#ffffff",role:"canvas"},{name:"soft-cloud",value:"#f5f5f5",role:"soft cloud"},{name:"charcoal",value:"#39393b",role:"charcoal"},{name:"ash",value:"#4b4b4d",role:"ash"},{name:"mute",value:"#707072",role:"mute"},{name:"stone",value:"#9e9ea0",role:"stone"},{name:"hairline",value:"#cacacb",role:"hairline"},{name:"hairline-soft",value:"#e5e5e5",role:"hairline soft"},{name:"sale",value:"#d30005",role:"sale"},{name:"sale-deep",value:"#780700",role:"sale deep"},{name:"success",value:"#76E0B5",role:"success"},{name:"success-bright",value:"#1eaa52",role:"success bright"},{name:"info",value:"#1151ff",role:"info"},{name:"info-deep",value:"#0034e3",role:"info deep"},{name:"accent-pink",value:"#ed1aa0",role:"accent pink"},{name:"accent-pink-soft",value:"#ffb0dd",role:"accent pink soft"},{name:"accent-purple-soft",value:"#beaffd",role:"accent purple soft"},{name:"accent-purple-pale",value:"#d6d1ff",role:"accent purple pale"},{name:"accent-teal",value:"#0a7281",role:"accent teal"},{name:"accent-pink-deep",value:"#4c012d",role:"accent pink deep"}],typography:{fontFamily:"'Helvetica Now Display', 'Helvetica Neue', 'Inter', Helvetica, Arial, sans-serif",monoFamily:"ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace",fontSizes:["16px","15px","14px","96px","18px","12px","56px","13px","11px","24px","40px","64px","48px","32px"],fontWeights:["700","500","600"],lineHeights:["1.5","0.92","1","1.4","1.6","0.9","1.2","1.75","1.7","1.35"]},spacing:["2px","4px","5px","6px","8px","10px","12px","14px","16px","18px","20px","24px","28px","30px","32px","36px","40px","44px","48px","56px"],radii:["9999px","24px","14px","6px","3px"],shadows:["0 0 0 12px var(--soft-cloud)","0 20px 30px -10px rgba(0,0,0,0.18)","0 0 0 2px var(--canvas), 0 0 0 4px var(--ink)","inset 0 -1px 0 var(--hairline-soft)"]},components:{button:{variant:"filled",size:"md",shape:"square",color:"theme-primary",textColor:"theme-onPrimary",views:{container:{borderRadius:0,fontFamily:"'Helvetica Now Display', 'Helvetica Neue', 'Inter', Helvetica, Arial, sans-serif",fontWeight:800,letterSpacing:"0.08em",textTransform:"uppercase",fontStyle:"italic"},content:{fontFamily:"'Helvetica Now Display', 'Helvetica Neue', 'Inter', Helvetica, Arial, sans-serif",fontWeight:800,letterSpacing:"0.08em",textTransform:"uppercase",fontStyle:"italic"}}},badge:{variant:"filled",size:"sm",shape:"pill",views:{container:{backgroundColor:"theme-secondary",color:"color-white",borderColor:"theme-secondary",borderRadius:0,fontFamily:"'Helvetica Now Display', 'Helvetica Neue', 'Inter', Helvetica, Arial, sans-serif",letterSpacing:"0.08em",textTransform:"uppercase",fontWeight:800,fontStyle:"italic"},text:{fontFamily:"'Helvetica Now Display', 'Helvetica Neue', 'Inter', Helvetica, Arial, sans-serif",fontWeight:600}}},card:{variant:"outlined",size:"md",shape:"square",views:{container:{backgroundColor:"theme-secondary",borderColor:"color-gray-200",color:"theme-primary",borderRadius:4,borderWidth:"1px",borderStyle:"solid",boxShadow:"0 0 0 12px var(--soft-cloud)"},header:{color:"theme-primary",fontFamily:"'Helvetica Now Display', 'Helvetica Neue', 'Inter', Helvetica, Arial, sans-serif",fontWeight:600,borderColor:"color-gray-200"},content:{color:"color-gray-500",fontFamily:"'Helvetica Now Display', 'Helvetica Neue', 'Inter', Helvetica, Arial, sans-serif"},footer:{borderColor:"color-gray-200"}}},input:{size:"md",shape:"default",variant:"default",views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"theme-primary",borderRadius:2,borderWidth:"1px",borderStyle:"solid",boxShadow:"none"},field:{color:"theme-primary",fontFamily:"'Helvetica Now Display', 'Helvetica Neue', 'Inter', Helvetica, Arial, sans-serif",fontStyle:"italic",letterSpacing:"0.02em"},label:{fontFamily:"'Helvetica Now Display', 'Helvetica Neue', 'Inter', Helvetica, Arial, sans-serif",fontWeight:800,letterSpacing:"0.02em",textTransform:"uppercase",fontStyle:"italic"},helperText:{}}},textarea:{size:"md",shape:"default",variant:"default",views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"theme-primary",borderRadius:2,borderWidth:"1px",borderStyle:"solid",boxShadow:"none"},field:{color:"theme-primary",fontFamily:"'Helvetica Now Display', 'Helvetica Neue', 'Inter', Helvetica, Arial, sans-serif",fontStyle:"italic",letterSpacing:"0.02em"},label:{fontFamily:"'Helvetica Now Display', 'Helvetica Neue', 'Inter', Helvetica, Arial, sans-serif",fontWeight:800,letterSpacing:"0.02em",textTransform:"uppercase",fontStyle:"italic"},helperText:{}}},select:{size:"md",shape:"default",variant:"default",views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"theme-primary",borderRadius:2,borderWidth:"1px",borderStyle:"solid",boxShadow:"none"},field:{color:"theme-primary",fontFamily:"'Helvetica Now Display', 'Helvetica Neue', 'Inter', Helvetica, Arial, sans-serif"},label:{fontFamily:"'Helvetica Now Display', 'Helvetica Neue', 'Inter', Helvetica, Arial, sans-serif",fontWeight:800,letterSpacing:"0.02em",textTransform:"uppercase",fontStyle:"italic"},helperText:{},text:{letterSpacing:"0.02em",fontStyle:"italic"}}},checkbox:{size:"md",views:{checkbox:{borderColor:"color-gray-200",backgroundColor:"color-white",_checked:{backgroundColor:"theme-primary",borderColor:"theme-primary"},borderRadius:0},label:{fontFamily:"'Helvetica Now Display', 'Helvetica Neue', 'Inter', Helvetica, Arial, sans-serif",fontWeight:800,letterSpacing:"0.02em",textTransform:"uppercase",fontStyle:"italic"},infoText:{color:"color-gray-500"},container:{borderRadius:0}}},radio:{size:"md",views:{radio:{borderColor:"color-gray-200",backgroundColor:"color-white"},dot:{backgroundColor:"theme-primary"},label:{fontFamily:"'Helvetica Now Display', 'Helvetica Neue', 'Inter', Helvetica, Arial, sans-serif",fontWeight:800,letterSpacing:"0.02em",textTransform:"uppercase",fontStyle:"italic"},infoText:{color:"color-gray-500"},container:{borderRadius:"50%"}}},switch:{size:"sm",views:{slider:{backgroundColor:"color-gray-200"},circle:{backgroundColor:"color-white"},label:{fontFamily:"'Helvetica Now Display', 'Helvetica Neue', 'Inter', Helvetica, Arial, sans-serif",fontWeight:800,letterSpacing:"0.02em",textTransform:"uppercase",fontStyle:"italic"},container:{borderRadius:"9999px"}}},slider:{backgroundColor:"theme-primary",views:{track:{backgroundColor:"color-gray-200"},progress:{backgroundColor:"theme-primary"},filledTrack:{backgroundColor:"theme-primary"},thumb:{borderColor:"theme-primary",backgroundColor:"color-white"},label:{color:"theme-primary"},valueLabel:{color:"color-gray-500"}}},tabs:{variant:"pill",views:{headerTabs:{borderColor:"color-gray-200"},tab:{color:"color-gray-500",fontWeight:800,letterSpacing:"0.02em",textTransform:"uppercase",fontStyle:"italic"},activeTab:{color:"theme-primary",borderColor:"theme-primary",backgroundColor:"theme-primary"},title:{fontFamily:"'Helvetica Now Display', 'Helvetica Neue', 'Inter', Helvetica, Arial, sans-serif"},activeText:{color:"color-white"},content:{color:"theme-primary"},container:{borderRadius:"9999px"}}},accordion:{views:{container:{borderColor:"color-gray-200",backgroundColor:"theme-secondary",color:"theme-primary",borderRadius:0},trigger:{color:"theme-primary",fontFamily:"'Helvetica Now Display', 'Helvetica Neue', 'Inter', Helvetica, Arial, sans-serif"},content:{color:"color-gray-500"}}},table:{views:{table:{backgroundColor:"color-white",color:"theme-primary",borderColor:"color-gray-200",borderRadius:4},thead:{backgroundColor:"theme-secondary",color:"theme-primary"},th:{color:"color-gray-500",borderColor:"color-gray-200",fontFamily:"ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace",fontWeight:800,letterSpacing:"0.02em",textTransform:"uppercase",fontStyle:"italic"},tr:{borderColor:"color-gray-200"},td:{color:"theme-primary",borderColor:"color-gray-200",letterSpacing:"0.02em",fontStyle:"italic"},caption:{color:"color-gray-500",fontStyle:"italic",letterSpacing:"0.02em"}}},avatar:{views:{container:{backgroundColor:"theme-secondary",borderColor:"color-gray-200",color:"theme-primary",borderRadius:"50%"},fallback:{color:"theme-primary",fontFamily:"'Helvetica Now Display', 'Helvetica Neue', 'Inter', Helvetica, Arial, sans-serif"}}},alert:{views:{container:{backgroundColor:"theme-secondary",borderColor:"color-gray-200",borderRadius:4},title:{color:"theme-primary",fontFamily:"'Helvetica Now Display', 'Helvetica Neue', 'Inter', Helvetica, Arial, sans-serif",fontWeight:800,letterSpacing:"0.02em",textTransform:"uppercase",fontStyle:"italic"},description:{color:"color-gray-500",fontFamily:"'Helvetica Now Display', 'Helvetica Neue', 'Inter', Helvetica, Arial, sans-serif"},icon:{color:"theme-primary"}}},status:{views:{indicator:{backgroundColor:"theme-success"},label:{color:"theme-primary",fontFamily:"'Helvetica Now Display', 'Helvetica Neue', 'Inter', Helvetica, Arial, sans-serif"}}},progress:{color:"theme-primary",backgroundColor:"color-gray-200",radius:0,views:{container:{backgroundColor:"color-gray-200",borderRadius:"9999px"},bar:{backgroundColor:"theme-primary"},text:{color:"theme-primary"}}},loader:{color:"theme-primary"},separator:{color:"color-gray-200",views:{container:{borderColor:"color-gray-200"},label:{color:"color-gray-500",fontFamily:"'Helvetica Now Display', 'Helvetica Neue', 'Inter', Helvetica, Arial, sans-serif"}}},navigation:{views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"theme-primary",borderRadius:0},item:{color:"color-gray-500"},activeItem:{color:"theme-primary",borderColor:"theme-primary"}}},hero:{views:{container:{backgroundColor:"color-white",color:"theme-primary",fontFamily:"'Helvetica Now Display', 'Helvetica Neue', 'Inter', Helvetica, Arial, sans-serif"},eyebrow:{color:"color-gray-500"},title:{color:"theme-primary",fontFamily:"'Helvetica Now Display', 'Helvetica Neue', 'Inter', Helvetica, Arial, sans-serif"},description:{color:"color-gray-500"}}},page:{views:{container:{backgroundColor:"color-white",color:"theme-primary",fontFamily:"'Helvetica Now Display', 'Helvetica Neue', 'Inter', Helvetica, Arial, sans-serif"},section:{backgroundColor:"color-white",borderColor:"color-gray-200"},surface:{backgroundColor:"theme-secondary",borderColor:"color-gray-200",color:"theme-primary"}}}},personality:{cornerStyle:"sharp",typeWeight:"black",typeCase:"uppercase",typeStyle:"italic",letterSpacing:"0.02em",accentTreatment:"flat",signatureMotif:"▶",density:"tight",surfaceTone:"mono",cardRadius:4,pillRadius:0,badgeRadius:0,voice:"athletic-bold"}},notion:{metadata:{id:"notion",label:"Notion",sourcePath:"design.md/html/notion.html",sourceTitle:"Design System Inspiration of Notion",defaultAppearance:"light",googleFontLinks:["https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap"]},theme:{primary:"#5645d4",secondary:"#ff64c8",success:"#1aae39",warning:"#dd5b00",error:"#ff64c8",canvas:"color-white",surface:"color-gray-50",text:"color-black",muted:"color-gray-500",border:"color-gray-200",onPrimary:"#ffffff"},tokens:{rawCssVars:{primary:"#5645d4","primary-pressed":"#4534b3","primary-deep":"#3a2a99","on-primary":"#ffffff","brand-navy":"#0a1530","brand-navy-deep":"#070f24","link-blue":"#0075de","brand-pink":"#ff64c8","brand-orange":"#dd5b00","brand-purple":"#7b3ff2","brand-purple-800":"#391c57","brand-orange-deep":"#793400","brand-green":"#1aae39","brand-yellow":"#f5d75e","brand-teal":"#2a9d99","tint-peach":"#ffe8d4","tint-rose":"#fde0ec","tint-mint":"#d9f3e1","tint-lavender":"#e6e0f5","tint-sky":"#dcecfa","tint-yellow":"#fef7d6","tint-yellow-bold":"#f9e79f","tint-cream":"#f8f5e8",canvas:"#ffffff",surface:"#f6f5f4","surface-soft":"#fafaf9",hairline:"#e5e3df","hairline-soft":"#ede9e4","hairline-strong":"#c8c4be","hairline-dark":"rgba(255,255,255,0.16)","ink-deep":"#000000",ink:"#1a1a1a",charcoal:"#37352f",slate:"#5d5b54",steel:"#787671",stone:"#a4a097",muted:"#bbb8b1","on-dark":"#ffffff","on-dark-muted":"#a4a097"},colors:[{name:"primary",value:"#5645d4",role:"primary"},{name:"primary-pressed",value:"#4534b3",role:"primary pressed"},{name:"primary-deep",value:"#3a2a99",role:"primary deep"},{name:"on-primary",value:"#ffffff",role:"on primary"},{name:"brand-navy",value:"#0a1530",role:"brand navy"},{name:"brand-navy-deep",value:"#070f24",role:"brand navy deep"},{name:"link-blue",value:"#0075de",role:"link blue"},{name:"brand-pink",value:"#ff64c8",role:"brand pink"},{name:"brand-orange",value:"#dd5b00",role:"brand orange"},{name:"brand-purple",value:"#7b3ff2",role:"brand purple"},{name:"brand-purple-800",value:"#391c57",role:"brand purple 800"},{name:"brand-orange-deep",value:"#793400",role:"brand orange deep"},{name:"brand-green",value:"#1aae39",role:"brand green"},{name:"brand-yellow",value:"#f5d75e",role:"brand yellow"},{name:"brand-teal",value:"#2a9d99",role:"brand teal"},{name:"tint-peach",value:"#ffe8d4",role:"tint peach"},{name:"tint-rose",value:"#fde0ec",role:"tint rose"},{name:"tint-mint",value:"#d9f3e1",role:"tint mint"},{name:"tint-lavender",value:"#e6e0f5",role:"tint lavender"},{name:"tint-sky",value:"#dcecfa",role:"tint sky"},{name:"tint-yellow",value:"#fef7d6",role:"tint yellow"},{name:"tint-yellow-bold",value:"#f9e79f",role:"tint yellow bold"},{name:"tint-cream",value:"#f8f5e8",role:"tint cream"},{name:"canvas",value:"#ffffff",role:"canvas"},{name:"surface",value:"#f6f5f4",role:"surface"},{name:"surface-soft",value:"#fafaf9",role:"surface soft"},{name:"hairline",value:"#e5e3df",role:"hairline"},{name:"hairline-soft",value:"#ede9e4",role:"hairline soft"},{name:"hairline-strong",value:"#c8c4be",role:"hairline strong"},{name:"hairline-dark",value:"rgba(255,255,255,0.16)",role:"hairline dark"},{name:"ink-deep",value:"#000000",role:"ink deep"},{name:"ink",value:"#1a1a1a",role:"ink"},{name:"charcoal",value:"#37352f",role:"charcoal"},{name:"slate",value:"#5d5b54",role:"slate"},{name:"steel",value:"#787671",role:"steel"},{name:"stone",value:"#a4a097",role:"stone"},{name:"muted",value:"#bbb8b1",role:"muted"},{name:"on-dark",value:"#ffffff",role:"on dark"},{name:"on-dark-muted",value:"#a4a097",role:"on dark muted"}],typography:{fontFamily:"'Inter', -apple-system, BlinkMacSystemFont, sans-serif",monoFamily:"ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace",fontSizes:["14px","15px","12px","80px","18px","48px","16px","13px","22px","11px","56px","36px","10px","20px","28px"],fontWeights:["500","600","400","700"],lineHeights:["1.55","1","1.05","1.15","1.4","1.3","1.5","1.1","1.2","1.35"]},spacing:["2px","4px","5px","6px","8px","10px","11px","12px","14px","15px","16px","18px","20px","24px","31px","32px","40px","44px","48px","56px"],radii:["6px","8px","16px","50%","12px","9999px","4px","3px"],shadows:["rgba(15, 15, 15, 0.20) 0px 24px 48px -8px","rgba(15,15,15,0.04) 0px 1px 2px 0px","rgba(15,15,15,0.08) 0px 4px 12px 0px","rgba(15,15,15,0.20) 0px 24px 48px -8px","rgba(15,15,15,0.16) 0px 16px 48px -8px"]},components:{button:{variant:"filled",size:"md",shape:"rounded",color:"theme-primary",textColor:"theme-onPrimary",views:{container:{borderRadius:9999,fontFamily:"'Inter', -apple-system, BlinkMacSystemFont, sans-serif",fontWeight:400,letterSpacing:"0em",textTransform:"none",fontStyle:"normal"},content:{fontFamily:"'Inter', -apple-system, BlinkMacSystemFont, sans-serif",fontWeight:400,letterSpacing:"0em",textTransform:"none",fontStyle:"normal"}}},badge:{variant:"filled",size:"sm",shape:"rounded",views:{container:{backgroundColor:"theme-secondary",color:"color-white",borderColor:"theme-secondary",borderRadius:4,fontFamily:"'Inter', -apple-system, BlinkMacSystemFont, sans-serif",letterSpacing:"0em",textTransform:"none",fontWeight:400,fontStyle:"normal"},text:{fontFamily:"'Inter', -apple-system, BlinkMacSystemFont, sans-serif",fontWeight:600}}},card:{variant:"outlined",size:"md",shape:"rounded",views:{container:{backgroundColor:"color-gray-50",borderColor:"color-gray-200",color:"color-black",borderRadius:10,borderWidth:"1px",borderStyle:"solid",boxShadow:"rgba(15, 15, 15, 0.20) 0px 24px 48px -8px"},header:{color:"color-black",fontFamily:"'Inter', -apple-system, BlinkMacSystemFont, sans-serif",fontWeight:600,borderColor:"color-gray-200"},content:{color:"color-gray-500",fontFamily:"'Inter', -apple-system, BlinkMacSystemFont, sans-serif"},footer:{borderColor:"color-gray-200"}}},input:{size:"md",shape:"default",variant:"default",views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"color-black",borderRadius:10,borderWidth:"1px",borderStyle:"solid",boxShadow:"none"},field:{color:"color-black",fontFamily:"'Inter', -apple-system, BlinkMacSystemFont, sans-serif",fontStyle:"normal",letterSpacing:"0em"},label:{fontFamily:"'Inter', -apple-system, BlinkMacSystemFont, sans-serif",fontWeight:400,letterSpacing:"0em",textTransform:"none",fontStyle:"normal"},helperText:{}}},textarea:{size:"md",shape:"default",variant:"default",views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"color-black",borderRadius:10,borderWidth:"1px",borderStyle:"solid",boxShadow:"none"},field:{color:"color-black",fontFamily:"'Inter', -apple-system, BlinkMacSystemFont, sans-serif",fontStyle:"normal",letterSpacing:"0em"},label:{fontFamily:"'Inter', -apple-system, BlinkMacSystemFont, sans-serif",fontWeight:400,letterSpacing:"0em",textTransform:"none",fontStyle:"normal"},helperText:{}}},select:{size:"md",shape:"default",variant:"default",views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"color-black",borderRadius:10,borderWidth:"1px",borderStyle:"solid",boxShadow:"none"},field:{color:"color-black",fontFamily:"'Inter', -apple-system, BlinkMacSystemFont, sans-serif"},label:{fontFamily:"'Inter', -apple-system, BlinkMacSystemFont, sans-serif",fontWeight:400,letterSpacing:"0em",textTransform:"none",fontStyle:"normal"},helperText:{},text:{letterSpacing:"0em",fontStyle:"normal"}}},checkbox:{size:"md",views:{checkbox:{borderColor:"color-gray-200",backgroundColor:"color-white",_checked:{backgroundColor:"theme-primary",borderColor:"theme-primary"},borderRadius:4},label:{fontFamily:"'Inter', -apple-system, BlinkMacSystemFont, sans-serif",fontWeight:400,letterSpacing:"0em",textTransform:"none",fontStyle:"normal"},infoText:{color:"color-gray-500"},container:{borderRadius:4}}},radio:{size:"md",views:{radio:{borderColor:"color-gray-200",backgroundColor:"color-white"},dot:{backgroundColor:"theme-primary"},label:{fontFamily:"'Inter', -apple-system, BlinkMacSystemFont, sans-serif",fontWeight:400,letterSpacing:"0em",textTransform:"none",fontStyle:"normal"},infoText:{color:"color-gray-500"},container:{borderRadius:"50%"}}},switch:{size:"sm",views:{slider:{backgroundColor:"color-gray-200"},circle:{backgroundColor:"color-white"},label:{fontFamily:"'Inter', -apple-system, BlinkMacSystemFont, sans-serif",fontWeight:400,letterSpacing:"0em",textTransform:"none",fontStyle:"normal"},container:{borderRadius:"9999px"}}},slider:{backgroundColor:"theme-primary",views:{track:{backgroundColor:"color-gray-200"},progress:{backgroundColor:"theme-primary"},filledTrack:{backgroundColor:"theme-primary"},thumb:{borderColor:"theme-primary",backgroundColor:"color-white"},label:{color:"color-black"},valueLabel:{color:"color-gray-500"}}},tabs:{variant:"underline",views:{headerTabs:{borderColor:"color-gray-200"},tab:{color:"color-gray-500",fontWeight:400,letterSpacing:"0em",textTransform:"none",fontStyle:"normal"},activeTab:{color:"theme-primary",borderColor:"theme-primary",backgroundColor:"transparent"},title:{fontFamily:"'Inter', -apple-system, BlinkMacSystemFont, sans-serif"},activeText:{color:"theme-primary"},content:{color:"color-black"},container:{borderRadius:"8px"}}},accordion:{views:{container:{borderColor:"color-gray-200",backgroundColor:"color-gray-50",color:"color-black",borderRadius:"12px"},trigger:{color:"color-black",fontFamily:"'Inter', -apple-system, BlinkMacSystemFont, sans-serif"},content:{color:"color-gray-500"}}},table:{views:{table:{backgroundColor:"color-white",color:"color-black",borderColor:"color-gray-200",borderRadius:10},thead:{backgroundColor:"color-gray-50",color:"color-black"},th:{color:"color-gray-500",borderColor:"color-gray-200",fontFamily:"ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace",fontWeight:400,letterSpacing:"0em",textTransform:"none",fontStyle:"normal"},tr:{borderColor:"color-gray-200"},td:{color:"color-black",borderColor:"color-gray-200",letterSpacing:"0em",fontStyle:"normal"},caption:{color:"color-gray-500",fontStyle:"italic",letterSpacing:"0em"}}},avatar:{views:{container:{backgroundColor:"color-gray-50",borderColor:"color-gray-200",color:"color-black",borderRadius:"50%"},fallback:{color:"color-black",fontFamily:"'Inter', -apple-system, BlinkMacSystemFont, sans-serif"}}},alert:{views:{container:{backgroundColor:"color-gray-50",borderColor:"color-gray-200",borderRadius:10},title:{color:"color-black",fontFamily:"'Inter', -apple-system, BlinkMacSystemFont, sans-serif",fontWeight:400,letterSpacing:"0em",textTransform:"none",fontStyle:"normal"},description:{color:"color-gray-500",fontFamily:"'Inter', -apple-system, BlinkMacSystemFont, sans-serif"},icon:{color:"theme-primary"}}},status:{views:{indicator:{backgroundColor:"theme-success"},label:{color:"color-black",fontFamily:"'Inter', -apple-system, BlinkMacSystemFont, sans-serif"}}},progress:{color:"theme-primary",backgroundColor:"color-gray-200",radius:"8px",views:{container:{backgroundColor:"color-gray-200",borderRadius:"9999px"},bar:{backgroundColor:"theme-primary"},text:{color:"color-black"}}},loader:{color:"theme-primary"},separator:{color:"color-gray-200",views:{container:{borderColor:"color-gray-200"},label:{color:"color-gray-500",fontFamily:"'Inter', -apple-system, BlinkMacSystemFont, sans-serif"}}},navigation:{views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"color-black",borderRadius:"12px"},item:{color:"color-gray-500"},activeItem:{color:"theme-primary",borderColor:"theme-primary"}}},hero:{views:{container:{backgroundColor:"color-white",color:"color-black",fontFamily:"'Inter', -apple-system, BlinkMacSystemFont, sans-serif"},eyebrow:{color:"color-gray-500"},title:{color:"color-black",fontFamily:"'Inter', -apple-system, BlinkMacSystemFont, sans-serif"},description:{color:"color-gray-500"}}},page:{views:{container:{backgroundColor:"color-white",color:"color-black",fontFamily:"'Inter', -apple-system, BlinkMacSystemFont, sans-serif"},section:{backgroundColor:"color-white",borderColor:"color-gray-200"},surface:{backgroundColor:"color-gray-50",borderColor:"color-gray-200",color:"color-black"}}}},personality:{cornerStyle:"soft",typeWeight:"regular",typeCase:"normal",typeStyle:"normal",letterSpacing:"0em",accentTreatment:"flat",signatureMotif:"◇",density:"comfortable",surfaceTone:"paper",cardRadius:10,pillRadius:9999,badgeRadius:4,voice:"thoughtful-quiet"}},revolut:{metadata:{id:"revolut",label:"Revolut",sourcePath:"design.md/html/revolut.html",sourceTitle:"Design System Inspiration of Revolut",defaultAppearance:"light",googleFontLinks:["https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap"]},theme:{primary:"#1361F0",secondary:"#101D31",success:"#16a34a",warning:"#d97706",error:"#e61e49",canvas:"color-white",surface:"color-gray-50",text:"color-black",muted:"color-gray-500",border:"color-gray-200",onPrimary:"#ffffff"},tokens:{rawCssVars:{primary:"#494fdf","primary-bright":"#4f55f1","primary-deep":"#3a40c4","on-primary":"#ffffff",ink:"#191c1f",body:"#1f2226",charcoal:"#3a3d40",mute:"#505a63",ash:"#5c5e60",stone:"#8d969e",faint:"#c9c9cd","on-dark":"#ffffff","on-dark-mute":"rgba(255,255,255,0.72)","canvas-light":"#ffffff","canvas-dark":"#000000","surface-soft":"#f4f4f4","surface-card":"#ffffff","surface-deep":"#0a0a0a","surface-elevated":"#16181a","hairline-light":"#e2e2e7","hairline-dark":"rgba(255,255,255,0.12)","hairline-strong":"#191c1f","divider-soft":"rgba(255,255,255,0.06)",teal:"#00a87e","light-blue":"#007bc2","blue-link":"#376cd5","light-green":"#428619","green-text":"#006400",yellow:"#b09000",warning:"#ec7e00",pink:"#e61e49",danger:"#e23b4a","deep-red":"#8b0000",brown:"#936d62","font-display":"'Aeonik Pro', 'Inter', system-ui, -apple-system, sans-serif","font-ui":"'Inter', system-ui, sans-serif"},colors:[{name:"primary",value:"#1361F0",role:"primary"},{name:"primary-bright",value:"#4f55f1",role:"primary bright"},{name:"primary-deep",value:"#3a40c4",role:"primary deep"},{name:"on-primary",value:"#ffffff",role:"on primary"},{name:"ink",value:"#191c1f",role:"ink"},{name:"body",value:"#1f2226",role:"body"},{name:"charcoal",value:"#3a3d40",role:"charcoal"},{name:"mute",value:"#505a63",role:"mute"},{name:"ash",value:"#5c5e60",role:"ash"},{name:"stone",value:"#8d969e",role:"stone"},{name:"faint",value:"#c9c9cd",role:"faint"},{name:"on-dark",value:"#ffffff",role:"on dark"},{name:"on-dark-mute",value:"rgba(255,255,255,0.72)",role:"on dark mute"},{name:"canvas-light",value:"#ffffff",role:"canvas light"},{name:"canvas-dark",value:"#000000",role:"canvas dark"},{name:"surface-soft",value:"#f4f4f4",role:"surface soft"},{name:"surface-card",value:"#ffffff",role:"surface card"},{name:"surface-deep",value:"#0a0a0a",role:"surface deep"},{name:"surface-elevated",value:"#16181a",role:"surface elevated"},{name:"hairline-light",value:"#e2e2e7",role:"hairline light"},{name:"hairline-dark",value:"rgba(255,255,255,0.12)",role:"hairline dark"},{name:"hairline-strong",value:"#191c1f",role:"hairline strong"},{name:"divider-soft",value:"rgba(255,255,255,0.06)",role:"divider soft"},{name:"teal",value:"#00a87e",role:"teal"},{name:"light-blue",value:"#007bc2",role:"light blue"},{name:"blue-link",value:"#376cd5",role:"blue link"},{name:"light-green",value:"#428619",role:"light green"},{name:"green-text",value:"#006400",role:"green text"},{name:"yellow",value:"#b09000",role:"yellow"},{name:"warning",value:"#d97706",role:"warning"},{name:"pink",value:"#e61e49",role:"pink"},{name:"danger",value:"#e23b4a",role:"danger"},{name:"deep-red",value:"#8b0000",role:"deep red"},{name:"brown",value:"#936d62",role:"brown"}],typography:{fontFamily:"'Aeonik Pro', 'Inter', system-ui, -apple-system, sans-serif",monoFamily:"ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace",fontSizes:["16px","14px","18px","12px","96px","56px","24px","13px","32px","11px","64px","44px"],fontWeights:["600","500","700"],lineHeights:["1.5","1.0","1.56","1.4","1.33","1.19","1.6","1.2","1.35"]},spacing:["4px","6px","8px","10px","12px","13px","14px","16px","20px","24px","27px","28px","32px","36px","40px","48px","56px","64px","80px","88px"],radii:["9999px","20px","28px","36px","24px","12px","3px"],shadows:[]},components:{button:{variant:"filled",size:"md",shape:"pill",color:"theme-primary",textColor:"theme-onPrimary",views:{container:{borderRadius:9999,fontFamily:"'Aeonik Pro', 'Inter', system-ui, -apple-system, sans-serif",fontWeight:700,letterSpacing:"-0.02em",textTransform:"none",fontStyle:"normal"},content:{fontFamily:"'Aeonik Pro', 'Inter', system-ui, -apple-system, sans-serif",fontWeight:700,letterSpacing:"-0.02em",textTransform:"none",fontStyle:"normal"}}},badge:{variant:"filled",size:"sm",shape:"pill",views:{container:{backgroundColor:"theme-secondary",color:"color-white",borderColor:"theme-secondary",borderRadius:9999,fontFamily:"'Aeonik Pro', 'Inter', system-ui, -apple-system, sans-serif",letterSpacing:"-0.02em",textTransform:"none",fontWeight:700,fontStyle:"normal"},text:{fontFamily:"'Aeonik Pro', 'Inter', system-ui, -apple-system, sans-serif",fontWeight:600}}},card:{variant:"outlined",size:"md",shape:"rounded",views:{container:{backgroundColor:"color-gray-50",borderColor:"color-gray-200",color:"color-black",borderRadius:20,borderWidth:"1px",borderStyle:"solid",boxShadow:"0 1px 3px rgba(0, 0, 0, 0.08)"},header:{color:"color-black",fontFamily:"'Aeonik Pro', 'Inter', system-ui, -apple-system, sans-serif",fontWeight:600,borderColor:"color-gray-200"},content:{color:"color-gray-500",fontFamily:"'Aeonik Pro', 'Inter', system-ui, -apple-system, sans-serif"},footer:{borderColor:"color-gray-200"}}},input:{size:"md",shape:"default",variant:"default",views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"color-black",borderRadius:16,borderWidth:"1px",borderStyle:"solid",boxShadow:"none"},field:{color:"color-black",fontFamily:"'Aeonik Pro', 'Inter', system-ui, -apple-system, sans-serif",fontStyle:"normal",letterSpacing:"-0.02em"},label:{fontFamily:"'Aeonik Pro', 'Inter', system-ui, -apple-system, sans-serif",fontWeight:700,letterSpacing:"-0.02em",textTransform:"none",fontStyle:"normal"},helperText:{}}},textarea:{size:"md",shape:"default",variant:"default",views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"color-black",borderRadius:16,borderWidth:"1px",borderStyle:"solid",boxShadow:"none"},field:{color:"color-black",fontFamily:"'Aeonik Pro', 'Inter', system-ui, -apple-system, sans-serif",fontStyle:"normal",letterSpacing:"-0.02em"},label:{fontFamily:"'Aeonik Pro', 'Inter', system-ui, -apple-system, sans-serif",fontWeight:700,letterSpacing:"-0.02em",textTransform:"none",fontStyle:"normal"},helperText:{}}},select:{size:"md",shape:"default",variant:"default",views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"color-black",borderRadius:16,borderWidth:"1px",borderStyle:"solid",boxShadow:"none"},field:{color:"color-black",fontFamily:"'Aeonik Pro', 'Inter', system-ui, -apple-system, sans-serif"},label:{fontFamily:"'Aeonik Pro', 'Inter', system-ui, -apple-system, sans-serif",fontWeight:700,letterSpacing:"-0.02em",textTransform:"none",fontStyle:"normal"},helperText:{},text:{letterSpacing:"-0.02em",fontStyle:"normal"}}},checkbox:{size:"md",views:{checkbox:{borderColor:"color-gray-200",backgroundColor:"color-white",_checked:{backgroundColor:"theme-primary",borderColor:"theme-primary"},borderRadius:9999},label:{fontFamily:"'Aeonik Pro', 'Inter', system-ui, -apple-system, sans-serif",fontWeight:700,letterSpacing:"-0.02em",textTransform:"none",fontStyle:"normal"},infoText:{color:"color-gray-500"},container:{borderRadius:9999}}},radio:{size:"md",views:{radio:{borderColor:"color-gray-200",backgroundColor:"color-white"},dot:{backgroundColor:"theme-primary"},label:{fontFamily:"'Aeonik Pro', 'Inter', system-ui, -apple-system, sans-serif",fontWeight:700,letterSpacing:"-0.02em",textTransform:"none",fontStyle:"normal"},infoText:{color:"color-gray-500"},container:{borderRadius:"50%"}}},switch:{size:"sm",views:{slider:{backgroundColor:"color-gray-200"},circle:{backgroundColor:"color-white"},label:{fontFamily:"'Aeonik Pro', 'Inter', system-ui, -apple-system, sans-serif",fontWeight:700,letterSpacing:"-0.02em",textTransform:"none",fontStyle:"normal"},container:{borderRadius:"9999px"}}},slider:{backgroundColor:"theme-primary",views:{track:{backgroundColor:"color-gray-200"},progress:{backgroundColor:"theme-primary"},filledTrack:{backgroundColor:"theme-primary"},thumb:{borderColor:"theme-primary",backgroundColor:"color-white"},label:{color:"color-black"},valueLabel:{color:"color-gray-500"}}},tabs:{variant:"pill",views:{headerTabs:{borderColor:"color-gray-200"},tab:{color:"color-gray-500",fontWeight:700,letterSpacing:"-0.02em",textTransform:"none",fontStyle:"normal"},activeTab:{color:"theme-primary",borderColor:"theme-primary",backgroundColor:"theme-primary"},title:{fontFamily:"'Aeonik Pro', 'Inter', system-ui, -apple-system, sans-serif"},activeText:{color:"color-white"},content:{color:"color-black"},container:{borderRadius:"9999px"}}},accordion:{views:{container:{borderColor:"color-gray-200",backgroundColor:"color-gray-50",color:"color-black",borderRadius:"24px"},trigger:{color:"color-black",fontFamily:"'Aeonik Pro', 'Inter', system-ui, -apple-system, sans-serif"},content:{color:"color-gray-500"}}},table:{views:{table:{backgroundColor:"color-white",color:"color-black",borderColor:"color-gray-200",borderRadius:20},thead:{backgroundColor:"color-gray-50",color:"color-black"},th:{color:"color-gray-500",borderColor:"color-gray-200",fontFamily:"ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace",fontWeight:700,letterSpacing:"-0.02em",textTransform:"none",fontStyle:"normal"},tr:{borderColor:"color-gray-200"},td:{color:"color-black",borderColor:"color-gray-200",letterSpacing:"-0.02em",fontStyle:"normal"},caption:{color:"color-gray-500",fontStyle:"italic",letterSpacing:"-0.02em"}}},avatar:{views:{container:{backgroundColor:"color-gray-50",borderColor:"color-gray-200",color:"color-black",borderRadius:"50%"},fallback:{color:"color-black",fontFamily:"'Aeonik Pro', 'Inter', system-ui, -apple-system, sans-serif"}}},alert:{views:{container:{backgroundColor:"color-gray-50",borderColor:"color-gray-200",borderRadius:20},title:{color:"color-black",fontFamily:"'Aeonik Pro', 'Inter', system-ui, -apple-system, sans-serif",fontWeight:700,letterSpacing:"-0.02em",textTransform:"none",fontStyle:"normal"},description:{color:"color-gray-500",fontFamily:"'Aeonik Pro', 'Inter', system-ui, -apple-system, sans-serif"},icon:{color:"theme-primary"}}},status:{views:{indicator:{backgroundColor:"theme-success"},label:{color:"color-black",fontFamily:"'Aeonik Pro', 'Inter', system-ui, -apple-system, sans-serif"}}},progress:{color:"theme-primary",backgroundColor:"color-gray-200",radius:"24px",views:{container:{backgroundColor:"color-gray-200",borderRadius:"9999px"},bar:{backgroundColor:"theme-primary"},text:{color:"color-black"}}},loader:{color:"theme-primary"},separator:{color:"color-gray-200",views:{container:{borderColor:"color-gray-200"},label:{color:"color-gray-500",fontFamily:"'Aeonik Pro', 'Inter', system-ui, -apple-system, sans-serif"}}},navigation:{views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"color-black",borderRadius:"24px"},item:{color:"color-gray-500"},activeItem:{color:"theme-primary",borderColor:"theme-primary"}}},hero:{views:{container:{backgroundColor:"color-white",color:"color-black",fontFamily:"'Aeonik Pro', 'Inter', system-ui, -apple-system, sans-serif"},eyebrow:{color:"color-gray-500"},title:{color:"color-black",fontFamily:"'Aeonik Pro', 'Inter', system-ui, -apple-system, sans-serif"},description:{color:"color-gray-500"}}},page:{views:{container:{backgroundColor:"color-white",color:"color-black",fontFamily:"'Aeonik Pro', 'Inter', system-ui, -apple-system, sans-serif"},section:{backgroundColor:"color-white",borderColor:"color-gray-200"},surface:{backgroundColor:"color-gray-50",borderColor:"color-gray-200",color:"color-black"}}}},personality:{cornerStyle:"pill",typeWeight:"bold",typeCase:"normal",typeStyle:"normal",letterSpacing:"-0.02em",accentTreatment:"gradient",signatureMotif:"★",density:"comfortable",surfaceTone:"glass",cardRadius:20,pillRadius:9999,badgeRadius:9999,voice:"bold-fintech"}},shopify:{metadata:{id:"shopify",label:"Shopify",sourcePath:"design.md/html/shopify.html",sourceTitle:"Design System Inspired by Shopify",defaultAppearance:"light",googleFontLinks:["https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap"]},theme:{primary:"#008060",secondary:"#202223",success:"#008060",warning:"#FFC453",error:"#D72C0D",canvas:"color-white",surface:"color-gray-50",text:"color-black",muted:"color-gray-500",border:"color-gray-200",onPrimary:"#FFFFFF"},tokens:{rawCssVars:{white:"#FFFFFF",black:"#000000","neon-green":"#36F4A4",aloe:"#C1FBD4",pistachio:"#D4F9E0","deep-teal":"#02090A","dark-forest":"#061A1C",forest:"#102620","card-border":"#1E2C31","shade-30":"#D4D4D8",muted:"#A1A1AA","shade-50":"#71717A","shade-60":"#52525B","shade-70":"#3F3F46","light-border":"#E4E4E7","link-muted":"#9797A2","shadow-card":"rgba(0,0,0,0.1) 0px 0px 0px 1px, rgba(0,0,0,0.1) 0px 2px 2px 0px, rgba(0,0,0,0.1) 0px 4px 4px 0px, rgba(0,0,0,0.1) 0px 8px 8px 0px, rgba(255,255,255,0.03) 0px 1px 0px 0px inset"},colors:[{name:"white",value:"#FFFFFF",role:"white"},{name:"black",value:"#000000",role:"black"},{name:"neon-green",value:"#36F4A4",role:"neon green"},{name:"aloe",value:"#C1FBD4",role:"aloe"},{name:"pistachio",value:"#D4F9E0",role:"pistachio"},{name:"deep-teal",value:"#02090A",role:"deep teal"},{name:"dark-forest",value:"#061A1C",role:"dark forest"},{name:"forest",value:"#102620",role:"forest"},{name:"card-border",value:"#1E2C31",role:"card border"},{name:"shade-30",value:"#D4D4D8",role:"shade 30"},{name:"muted",value:"#A1A1AA",role:"muted"},{name:"shade-50",value:"#71717A",role:"shade 50"},{name:"shade-60",value:"#52525B",role:"shade 60"},{name:"shade-70",value:"#3F3F46",role:"shade 70"},{name:"light-border",value:"#E4E4E7",role:"light border"},{name:"link-muted",value:"#9797A2",role:"link muted"},{name:"shadow-card",value:"rgba(0,0,0,0.1) 0px 0px 0px 1px, rgba(0,0,0,0.1) 0px 2px 2px 0px, rgba(0,0,0,0.1) 0px 4px 4px 0px, rgba(0,0,0,0.1) 0px 8px 8px 0px, rgba(255,255,255,0.03) 0px 1px 0px 0px inset",role:"shadow card"}],typography:{fontFamily:"'Inter', Helvetica, Arial, sans-serif",monoFamily:"ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace",fontSizes:["20px","16px","14px","80px","48px","18px","12px","13px","11px","55px","32px","28px","24px","36px"],fontWeights:["400","600","500","330","360","550","700"],lineHeights:["1.5","0.96","1.14","1.56","1.16","1.28","1.4","1.49","1.2","1.35"]},spacing:["4px","8px","10px","12px","14px","16px","20px","24px","28px","32px","40px","48px","64px","72px","80px","100px"],radii:["9999px","8px","4px","12px","2px","3px"],shadows:["rgba(0,0,0,0.1) 0px 0px 0px 1px, rgba(0,0,0,0.1) 0px 2px 2px 0px, rgba(0,0,0,0.1) 0px 4px 4px 0px, rgba(0,0,0,0.1) 0px 8px 8px 0px, rgba(255,255,255,0.03) 0px 1px 0px 0px inset","0 0 0 2px var(--neon-green)","var(--shadow-card)","rgba(0,0,0,0.1) 0px 0px 0px 1px, rgba(255,255,255,0.03) 0px 1px 0px 0px inset"]},components:{button:{variant:"filled",size:"md",shape:"rounded",color:"theme-primary",textColor:"theme-onPrimary",views:{container:{borderRadius:9999,fontFamily:"'Inter', Helvetica, Arial, sans-serif",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},content:{fontFamily:"'Inter', Helvetica, Arial, sans-serif",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"}}},badge:{variant:"filled",size:"sm",shape:"pill",views:{container:{backgroundColor:"color-aloe",color:"color-white",borderColor:"color-aloe",borderRadius:6,fontFamily:"'Inter', Helvetica, Arial, sans-serif",letterSpacing:"-0.01em",textTransform:"none",fontWeight:700,fontStyle:"normal"},text:{fontFamily:"'Inter', Helvetica, Arial, sans-serif",fontWeight:600}}},card:{variant:"outlined",size:"md",shape:"rounded",views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"color-black",borderRadius:12,borderWidth:"1px",borderStyle:"solid",boxShadow:"rgba(0,0,0,0.1) 0px 0px 0px 1px, rgba(0,0,0,0.1) 0px 2px 2px 0px, rgba(0,0,0,0.1) 0px 4px 4px 0px, rgba(0,0,0,0.1) 0px 8px 8px 0px, rgba(255,255,255,0.03) 0px 1px 0px 0px inset"},header:{color:"color-black",fontFamily:"'Inter', Helvetica, Arial, sans-serif",fontWeight:600,borderColor:"color-gray-200"},content:{color:"color-muted",fontFamily:"'Inter', Helvetica, Arial, sans-serif"},footer:{borderColor:"color-gray-200"}}},input:{size:"md",shape:"default",variant:"default",views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"color-black",borderRadius:10,borderWidth:"1px",borderStyle:"solid",boxShadow:"rgba(0,0,0,0.1) 0px 0px 0px 1px, rgba(0,0,0,0.1) 0px 2px 2px 0px, rgba(0,0,0,0.1) 0px 4px 4px 0px, rgba(0,0,0,0.1) 0px 8px 8px 0px, rgba(255,255,255,0.03) 0px 1px 0px 0px inset"},field:{color:"color-black",fontFamily:"'Inter', Helvetica, Arial, sans-serif",fontStyle:"normal",letterSpacing:"-0.01em"},label:{fontFamily:"'Inter', Helvetica, Arial, sans-serif",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},helperText:{}}},textarea:{size:"md",shape:"default",variant:"default",views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"color-black",borderRadius:10,borderWidth:"1px",borderStyle:"solid",boxShadow:"rgba(0,0,0,0.1) 0px 0px 0px 1px, rgba(0,0,0,0.1) 0px 2px 2px 0px, rgba(0,0,0,0.1) 0px 4px 4px 0px, rgba(0,0,0,0.1) 0px 8px 8px 0px, rgba(255,255,255,0.03) 0px 1px 0px 0px inset"},field:{color:"color-black",fontFamily:"'Inter', Helvetica, Arial, sans-serif",fontStyle:"normal",letterSpacing:"-0.01em"},label:{fontFamily:"'Inter', Helvetica, Arial, sans-serif",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},helperText:{}}},select:{size:"md",shape:"default",variant:"default",views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"color-black",borderRadius:10,borderWidth:"1px",borderStyle:"solid",boxShadow:"rgba(0,0,0,0.1) 0px 0px 0px 1px, rgba(0,0,0,0.1) 0px 2px 2px 0px, rgba(0,0,0,0.1) 0px 4px 4px 0px, rgba(0,0,0,0.1) 0px 8px 8px 0px, rgba(255,255,255,0.03) 0px 1px 0px 0px inset"},field:{color:"color-black",fontFamily:"'Inter', Helvetica, Arial, sans-serif"},label:{fontFamily:"'Inter', Helvetica, Arial, sans-serif",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},helperText:{},text:{letterSpacing:"-0.01em",fontStyle:"normal"}}},checkbox:{size:"md",views:{checkbox:{borderColor:"color-gray-200",backgroundColor:"color-white",_checked:{backgroundColor:"theme-primary",borderColor:"theme-primary"},borderRadius:4},label:{fontFamily:"'Inter', Helvetica, Arial, sans-serif",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},infoText:{color:"color-muted"},container:{borderRadius:4}}},radio:{size:"md",views:{radio:{borderColor:"color-gray-200",backgroundColor:"color-white"},dot:{backgroundColor:"theme-primary"},label:{fontFamily:"'Inter', Helvetica, Arial, sans-serif",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},infoText:{color:"color-muted"},container:{borderRadius:"50%"}}},switch:{size:"sm",views:{slider:{backgroundColor:"color-gray-200"},circle:{backgroundColor:"color-white"},label:{fontFamily:"'Inter', Helvetica, Arial, sans-serif",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},container:{borderRadius:"9999px"}}},slider:{backgroundColor:"theme-primary",views:{track:{backgroundColor:"color-gray-200"},progress:{backgroundColor:"theme-primary"},filledTrack:{backgroundColor:"theme-primary"},thumb:{borderColor:"theme-primary",backgroundColor:"color-white"},label:{color:"color-black"},valueLabel:{color:"color-muted"}}},tabs:{variant:"pill",views:{headerTabs:{borderColor:"color-gray-200"},tab:{color:"color-muted",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},activeTab:{color:"theme-primary",borderColor:"theme-primary",backgroundColor:"theme-primary"},title:{fontFamily:"'Inter', Helvetica, Arial, sans-serif"},activeText:{color:"color-white"},content:{color:"color-black"},container:{borderRadius:"9999px"}}},accordion:{views:{container:{borderColor:"color-gray-200",backgroundColor:"color-white",color:"color-black",borderRadius:"24px"},trigger:{color:"color-black",fontFamily:"'Inter', Helvetica, Arial, sans-serif"},content:{color:"color-muted"}}},table:{views:{table:{backgroundColor:"color-white",color:"color-black",borderColor:"color-gray-200",borderRadius:12},thead:{backgroundColor:"color-white",color:"color-black"},th:{color:"color-muted",borderColor:"color-gray-200",fontFamily:"ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},tr:{borderColor:"color-gray-200"},td:{color:"color-black",borderColor:"color-gray-200",letterSpacing:"-0.01em",fontStyle:"normal"},caption:{color:"color-muted",fontStyle:"italic",letterSpacing:"-0.01em"}}},avatar:{views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"color-black",borderRadius:"50%"},fallback:{color:"color-black",fontFamily:"'Inter', Helvetica, Arial, sans-serif"}}},alert:{views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",borderRadius:12},title:{color:"color-black",fontFamily:"'Inter', Helvetica, Arial, sans-serif",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},description:{color:"color-muted",fontFamily:"'Inter', Helvetica, Arial, sans-serif"},icon:{color:"theme-primary"}}},status:{views:{indicator:{backgroundColor:"theme-primary"},label:{color:"color-black",fontFamily:"'Inter', Helvetica, Arial, sans-serif"}}},progress:{color:"theme-primary",backgroundColor:"color-gray-200",radius:"16px",views:{container:{backgroundColor:"color-gray-200",borderRadius:"9999px"},bar:{backgroundColor:"theme-primary"},text:{color:"color-black"}}},loader:{color:"theme-primary"},separator:{color:"color-gray-200",views:{container:{borderColor:"color-gray-200"},label:{color:"color-muted",fontFamily:"'Inter', Helvetica, Arial, sans-serif"}}},navigation:{views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"color-black",borderRadius:"24px"},item:{color:"color-muted"},activeItem:{color:"theme-primary",borderColor:"theme-primary"}}},hero:{views:{container:{backgroundColor:"color-white",color:"color-black",fontFamily:"'Inter', Helvetica, Arial, sans-serif"},eyebrow:{color:"color-muted"},title:{color:"color-black",fontFamily:"'Inter', Helvetica, Arial, sans-serif"},description:{color:"color-muted"}}},page:{views:{container:{backgroundColor:"color-white",color:"color-black",fontFamily:"'Inter', Helvetica, Arial, sans-serif"},section:{backgroundColor:"color-white",borderColor:"color-gray-200"},surface:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"color-black"}}}},personality:{cornerStyle:"soft",typeWeight:"bold",typeCase:"normal",typeStyle:"normal",letterSpacing:"-0.01em",accentTreatment:"flat",signatureMotif:"●",density:"comfortable",surfaceTone:"paper",cardRadius:12,pillRadius:9999,badgeRadius:6,voice:"commerce-friendly"}},spacex:{metadata:{id:"spacex",label:"SpaceX",sourcePath:"design.md/html/spaceX.html",sourceTitle:"Design System Preview: SpaceX (Light)",defaultAppearance:"dark",googleFontLinks:["https://fonts.googleapis.com/css2?family=Share+Tech&display=swap"]},theme:{primary:"color-black",secondary:"#a3a3a3",success:"#4ade80",warning:"#fbbf24",error:"#ef4444",canvas:"color-white",surface:"color-gray-50",text:"color-black",muted:"color-gray-500",border:"color-gray-200",onPrimary:"color-white"},tokens:{rawCssVars:{black:"#000000",spectral:"#f0f0fa","ghost-bg":"rgba(240,240,250,0.1)","ghost-border":"rgba(240,240,250,0.35)",overlay:"rgba(0,0,0,0.5)",font:"'Share Tech', Arial, Verdana, sans-serif"},colors:[{name:"black",value:"#000000",role:"black"},{name:"spectral",value:"#f0f0fa",role:"spectral"},{name:"ghost-bg",value:"rgba(240,240,250,0.1)",role:"ghost bg"},{name:"ghost-border",value:"rgba(240,240,250,0.35)",role:"ghost border"},{name:"overlay",value:"rgba(0,0,0,0.5)",role:"overlay"}],typography:{fontFamily:"'Share Tech', Arial, Verdana, sans-serif",monoFamily:"ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace",fontSizes:["16px","13px","12px","48px","10px","32px","11px","9px","14px"],fontWeights:["700","400","600"],lineHeights:["1.50","1.00","1.70","1.2","1.35","1.4"]},spacing:["8px","10px","12px","14px","16px","18px","20px","24px","28px","32px","48px","60px","64px","72px","80px","120px"],radii:["32px","4px","2px","3px"],shadows:[]},components:{button:{config:{variants:{ghost:{backgroundColor:"color-gray-50",borderColor:"color-gray-200"}}},variant:"ghost",size:"md",shape:"square",color:"theme-primary",textColor:"theme-primary",views:{container:{borderRadius:0,fontFamily:"'Share Tech', Arial, Verdana, sans-serif",fontWeight:800,letterSpacing:"0.08em",textTransform:"uppercase",fontStyle:"normal"},content:{fontFamily:"'Share Tech', Arial, Verdana, sans-serif",fontWeight:800,letterSpacing:"0.08em",textTransform:"uppercase",fontStyle:"normal"}}},badge:{variant:"filled",size:"sm",shape:"rounded",views:{container:{backgroundColor:"color-gray-50",color:"color-white",borderColor:"color-gray-50",borderRadius:0,fontFamily:"'Share Tech', Arial, Verdana, sans-serif",letterSpacing:"0.08em",textTransform:"uppercase",fontWeight:800,fontStyle:"normal"},text:{fontFamily:"'Share Tech', Arial, Verdana, sans-serif",fontWeight:600}}},card:{variant:"outlined",size:"md",shape:"square",views:{container:{backgroundColor:"color-gray-50",borderColor:"color-gray-200",color:"theme-primary",borderRadius:2,borderWidth:"1px",borderStyle:"solid",boxShadow:"0 1px 3px rgba(0, 0, 0, 0.08)"},header:{color:"theme-primary",fontFamily:"'Share Tech', Arial, Verdana, sans-serif",fontWeight:600,borderColor:"color-gray-200"},content:{color:"color-gray-200",fontFamily:"'Share Tech', Arial, Verdana, sans-serif"},footer:{borderColor:"color-gray-200"}}},input:{size:"md",shape:"default",variant:"default",views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"theme-primary",borderRadius:2,borderWidth:"1px",borderStyle:"solid",boxShadow:"none"},field:{color:"theme-primary",fontFamily:"'Share Tech', Arial, Verdana, sans-serif",fontStyle:"normal",letterSpacing:"0.06em"},label:{fontFamily:"'Share Tech', Arial, Verdana, sans-serif",fontWeight:800,letterSpacing:"0.06em",textTransform:"uppercase",fontStyle:"normal"},helperText:{}}},textarea:{size:"md",shape:"default",variant:"default",views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"theme-primary",borderRadius:2,borderWidth:"1px",borderStyle:"solid",boxShadow:"none"},field:{color:"theme-primary",fontFamily:"'Share Tech', Arial, Verdana, sans-serif",fontStyle:"normal",letterSpacing:"0.06em"},label:{fontFamily:"'Share Tech', Arial, Verdana, sans-serif",fontWeight:800,letterSpacing:"0.06em",textTransform:"uppercase",fontStyle:"normal"},helperText:{}}},select:{size:"md",shape:"default",variant:"default",views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"theme-primary",borderRadius:2,borderWidth:"1px",borderStyle:"solid",boxShadow:"none"},field:{color:"theme-primary",fontFamily:"'Share Tech', Arial, Verdana, sans-serif"},label:{fontFamily:"'Share Tech', Arial, Verdana, sans-serif",fontWeight:800,letterSpacing:"0.06em",textTransform:"uppercase",fontStyle:"normal"},helperText:{},text:{letterSpacing:"0.06em",fontStyle:"normal"}}},checkbox:{size:"md",views:{checkbox:{borderColor:"color-gray-200",backgroundColor:"color-white",_checked:{backgroundColor:"theme-primary",borderColor:"theme-primary"},borderRadius:0},label:{fontFamily:"'Share Tech', Arial, Verdana, sans-serif",fontWeight:800,letterSpacing:"0.06em",textTransform:"uppercase",fontStyle:"normal"},infoText:{color:"color-gray-200"},container:{borderRadius:0}}},radio:{size:"md",views:{radio:{borderColor:"color-gray-200",backgroundColor:"color-white"},dot:{backgroundColor:"theme-primary"},label:{fontFamily:"'Share Tech', Arial, Verdana, sans-serif",fontWeight:800,letterSpacing:"0.06em",textTransform:"uppercase",fontStyle:"normal"},infoText:{color:"color-gray-200"},container:{borderRadius:"50%"}}},switch:{size:"sm",views:{slider:{backgroundColor:"color-gray-200"},circle:{backgroundColor:"color-white"},label:{fontFamily:"'Share Tech', Arial, Verdana, sans-serif",fontWeight:800,letterSpacing:"0.06em",textTransform:"uppercase",fontStyle:"normal"},container:{borderRadius:"9999px"}}},slider:{backgroundColor:"theme-primary",views:{track:{backgroundColor:"color-gray-200"},progress:{backgroundColor:"theme-primary"},filledTrack:{backgroundColor:"theme-primary"},thumb:{borderColor:"theme-primary",backgroundColor:"color-white"},label:{color:"theme-primary"},valueLabel:{color:"color-gray-200"}}},tabs:{variant:"underline",views:{headerTabs:{borderColor:"color-gray-200"},tab:{color:"color-gray-200",fontWeight:800,letterSpacing:"0.06em",textTransform:"uppercase",fontStyle:"normal"},activeTab:{color:"theme-primary",borderColor:"theme-primary",backgroundColor:"transparent"},title:{fontFamily:"'Share Tech', Arial, Verdana, sans-serif"},activeText:{color:"theme-primary"},content:{color:"theme-primary"},container:{borderRadius:"32px"}}},accordion:{views:{container:{borderColor:"color-gray-200",backgroundColor:"color-gray-50",color:"theme-primary",borderRadius:0},trigger:{color:"theme-primary",fontFamily:"'Share Tech', Arial, Verdana, sans-serif"},content:{color:"color-gray-200"}}},table:{views:{table:{backgroundColor:"color-white",color:"theme-primary",borderColor:"color-gray-200",borderRadius:2},thead:{backgroundColor:"color-gray-50",color:"theme-primary"},th:{color:"color-gray-200",borderColor:"color-gray-200",fontFamily:"ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace",fontWeight:800,letterSpacing:"0.06em",textTransform:"uppercase",fontStyle:"normal"},tr:{borderColor:"color-gray-200"},td:{color:"theme-primary",borderColor:"color-gray-200",letterSpacing:"0.06em",fontStyle:"normal"},caption:{color:"color-gray-200",fontStyle:"italic",letterSpacing:"0.06em"}}},avatar:{views:{container:{backgroundColor:"color-gray-50",borderColor:"color-gray-200",color:"theme-primary",borderRadius:"50%"},fallback:{color:"theme-primary",fontFamily:"'Share Tech', Arial, Verdana, sans-serif"}}},alert:{views:{container:{backgroundColor:"color-gray-50",borderColor:"color-gray-200",borderRadius:2},title:{color:"theme-primary",fontFamily:"'Share Tech', Arial, Verdana, sans-serif",fontWeight:800,letterSpacing:"0.06em",textTransform:"uppercase",fontStyle:"normal"},description:{color:"color-gray-200",fontFamily:"'Share Tech', Arial, Verdana, sans-serif"},icon:{color:"theme-primary"}}},status:{views:{indicator:{backgroundColor:"theme-primary"},label:{color:"theme-primary",fontFamily:"'Share Tech', Arial, Verdana, sans-serif"}}},progress:{color:"theme-primary",backgroundColor:"color-gray-200",radius:0,views:{container:{backgroundColor:"color-gray-200",borderRadius:"9999px"},bar:{backgroundColor:"theme-primary"},text:{color:"theme-primary"}}},loader:{color:"theme-primary"},separator:{color:"color-gray-200",views:{container:{borderColor:"color-gray-200"},label:{color:"color-gray-200",fontFamily:"'Share Tech', Arial, Verdana, sans-serif"}}},navigation:{views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"theme-primary",borderRadius:0},item:{color:"color-gray-200"},activeItem:{color:"theme-primary",borderColor:"theme-primary"}}},hero:{views:{container:{backgroundColor:"color-white",color:"theme-primary",fontFamily:"'Share Tech', Arial, Verdana, sans-serif"},eyebrow:{color:"color-gray-200"},title:{color:"theme-primary",fontFamily:"'Share Tech', Arial, Verdana, sans-serif"},description:{color:"color-gray-200"}}},page:{views:{container:{backgroundColor:"color-white",color:"theme-primary",fontFamily:"'Share Tech', Arial, Verdana, sans-serif"},section:{backgroundColor:"color-white",borderColor:"color-gray-200"},surface:{backgroundColor:"color-gray-50",borderColor:"color-gray-200",color:"theme-primary"}}}},personality:{cornerStyle:"sharp",typeWeight:"black",typeCase:"uppercase",typeStyle:"normal",letterSpacing:"0.06em",accentTreatment:"glow",signatureMotif:"⚡",density:"tight",surfaceTone:"mono",cardRadius:2,pillRadius:0,badgeRadius:0,voice:"technical-mission"}},spotify:{metadata:{id:"spotify",label:"Spotify",sourcePath:"design.md/html/spotify.html",sourceTitle:"Design System Inspired by Shopify",defaultAppearance:"dark",googleFontLinks:["https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap"]},theme:{primary:"#1DB954",secondary:"#C1FBD4",success:"#1DB954",warning:"#D4F9E0",error:"#D4D4D8",canvas:"color-white",surface:"color-gray-50",text:"color-black",muted:"color-gray-500",border:"color-gray-200",onPrimary:"#000000"},tokens:{rawCssVars:{white:"#FFFFFF",black:"#000000","spotify-green":"#1DB954",aloe:"#C1FBD4",pistachio:"#D4F9E0","deep-teal":"#02090A","dark-forest":"#061A1C",forest:"#102620","card-border":"#1E2C31","shade-30":"#D4D4D8",muted:"#A1A1AA","shade-50":"#71717A","shade-60":"#52525B","shade-70":"#3F3F46","light-border":"#E4E4E7","link-muted":"#9797A2","shadow-card":"rgba(0,0,0,0.1) 0px 0px 0px 1px, rgba(0,0,0,0.1) 0px 2px 2px 0px, rgba(0,0,0,0.1) 0px 4px 4px 0px, rgba(0,0,0,0.1) 0px 8px 8px 0px, rgba(255,255,255,0.03) 0px 1px 0px 0px inset"},colors:[{name:"white",value:"#FFFFFF",role:"white"},{name:"black",value:"#000000",role:"black"},{name:"spotify-green",value:"#1DB954",role:"neon green"},{name:"aloe",value:"#C1FBD4",role:"aloe"},{name:"pistachio",value:"#D4F9E0",role:"pistachio"},{name:"deep-teal",value:"#02090A",role:"deep teal"},{name:"dark-forest",value:"#061A1C",role:"dark forest"},{name:"forest",value:"#102620",role:"forest"},{name:"card-border",value:"#1E2C31",role:"card border"},{name:"shade-30",value:"#D4D4D8",role:"shade 30"},{name:"muted",value:"#A1A1AA",role:"muted"},{name:"shade-50",value:"#71717A",role:"shade 50"},{name:"shade-60",value:"#52525B",role:"shade 60"},{name:"shade-70",value:"#3F3F46",role:"shade 70"},{name:"light-border",value:"#E4E4E7",role:"light border"},{name:"link-muted",value:"#9797A2",role:"link muted"},{name:"shadow-card",value:"rgba(0,0,0,0.1) 0px 0px 0px 1px, rgba(0,0,0,0.1) 0px 2px 2px 0px, rgba(0,0,0,0.1) 0px 4px 4px 0px, rgba(0,0,0,0.1) 0px 8px 8px 0px, rgba(255,255,255,0.03) 0px 1px 0px 0px inset",role:"shadow card"}],typography:{fontFamily:"'Inter', Helvetica, Arial, sans-serif",monoFamily:"ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace",fontSizes:["20px","16px","14px","80px","48px","18px","12px","13px","11px","55px","32px","28px","24px","36px"],fontWeights:["400","600","500","330","360","550","700"],lineHeights:["1.5","0.96","1.14","1.56","1.16","1.28","1.4","1.49","1.2","1.35"]},spacing:["4px","8px","10px","12px","14px","16px","20px","24px","28px","32px","40px","48px","64px","72px","80px","100px"],radii:["9999px","8px","4px","12px","2px","3px"],shadows:["rgba(0,0,0,0.1) 0px 0px 0px 1px, rgba(0,0,0,0.1) 0px 2px 2px 0px, rgba(0,0,0,0.1) 0px 4px 4px 0px, rgba(0,0,0,0.1) 0px 8px 8px 0px, rgba(255,255,255,0.03) 0px 1px 0px 0px inset","0 0 0 2px var(--neon-green)","var(--shadow-card)","rgba(0,0,0,0.1) 0px 0px 0px 1px, rgba(255,255,255,0.03) 0px 1px 0px 0px inset"]},components:{button:{variant:"filled",size:"md",shape:"pill",color:"theme-primary",textColor:"theme-onPrimary",views:{container:{borderRadius:9999,fontFamily:"'Inter', Helvetica, Arial, sans-serif",fontWeight:800,letterSpacing:"-0.02em",textTransform:"none",fontStyle:"normal"},content:{fontFamily:"'Inter', Helvetica, Arial, sans-serif",fontWeight:800,letterSpacing:"-0.02em",textTransform:"none",fontStyle:"normal"}}},badge:{variant:"filled",size:"sm",shape:"pill",views:{container:{backgroundColor:"theme-secondary",color:"color-white",borderColor:"theme-secondary",borderRadius:9999,fontFamily:"'Inter', Helvetica, Arial, sans-serif",letterSpacing:"-0.02em",textTransform:"none",fontWeight:800,fontStyle:"normal"},text:{fontFamily:"'Inter', Helvetica, Arial, sans-serif",fontWeight:600}}},card:{variant:"outlined",size:"md",shape:"rounded",views:{container:{backgroundColor:"color-gray-50",borderColor:"color-gray-200",color:"color-black",borderRadius:8,borderWidth:"1px",borderStyle:"solid",boxShadow:"rgba(0,0,0,0.1) 0px 0px 0px 1px, rgba(0,0,0,0.1) 0px 2px 2px 0px, rgba(0,0,0,0.1) 0px 4px 4px 0px, rgba(0,0,0,0.1) 0px 8px 8px 0px, rgba(255,255,255,0.03) 0px 1px 0px 0px inset"},header:{color:"color-black",fontFamily:"'Inter', Helvetica, Arial, sans-serif",fontWeight:600,borderColor:"color-gray-200"},content:{color:"color-gray-500",fontFamily:"'Inter', Helvetica, Arial, sans-serif"},footer:{borderColor:"color-gray-200"}}},input:{size:"md",shape:"default",variant:"default",views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"color-black",borderRadius:16,borderWidth:"1px",borderStyle:"solid",boxShadow:"rgba(0,0,0,0.1) 0px 0px 0px 1px, rgba(0,0,0,0.1) 0px 2px 2px 0px, rgba(0,0,0,0.1) 0px 4px 4px 0px, rgba(0,0,0,0.1) 0px 8px 8px 0px, rgba(255,255,255,0.03) 0px 1px 0px 0px inset"},field:{color:"color-black",fontFamily:"'Inter', Helvetica, Arial, sans-serif",fontStyle:"normal",letterSpacing:"-0.02em"},label:{fontFamily:"'Inter', Helvetica, Arial, sans-serif",fontWeight:800,letterSpacing:"-0.02em",textTransform:"none",fontStyle:"normal"},helperText:{}}},textarea:{size:"md",shape:"default",variant:"default",views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"color-black",borderRadius:16,borderWidth:"1px",borderStyle:"solid",boxShadow:"rgba(0,0,0,0.1) 0px 0px 0px 1px, rgba(0,0,0,0.1) 0px 2px 2px 0px, rgba(0,0,0,0.1) 0px 4px 4px 0px, rgba(0,0,0,0.1) 0px 8px 8px 0px, rgba(255,255,255,0.03) 0px 1px 0px 0px inset"},field:{color:"color-black",fontFamily:"'Inter', Helvetica, Arial, sans-serif",fontStyle:"normal",letterSpacing:"-0.02em"},label:{fontFamily:"'Inter', Helvetica, Arial, sans-serif",fontWeight:800,letterSpacing:"-0.02em",textTransform:"none",fontStyle:"normal"},helperText:{}}},select:{size:"md",shape:"default",variant:"default",views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"color-black",borderRadius:16,borderWidth:"1px",borderStyle:"solid",boxShadow:"rgba(0,0,0,0.1) 0px 0px 0px 1px, rgba(0,0,0,0.1) 0px 2px 2px 0px, rgba(0,0,0,0.1) 0px 4px 4px 0px, rgba(0,0,0,0.1) 0px 8px 8px 0px, rgba(255,255,255,0.03) 0px 1px 0px 0px inset"},field:{color:"color-black",fontFamily:"'Inter', Helvetica, Arial, sans-serif"},label:{fontFamily:"'Inter', Helvetica, Arial, sans-serif",fontWeight:800,letterSpacing:"-0.02em",textTransform:"none",fontStyle:"normal"},helperText:{},text:{letterSpacing:"-0.02em",fontStyle:"normal"}}},checkbox:{size:"md",views:{checkbox:{borderColor:"color-gray-200",backgroundColor:"color-white",_checked:{backgroundColor:"theme-primary",borderColor:"theme-primary"},borderRadius:9999},label:{fontFamily:"'Inter', Helvetica, Arial, sans-serif",fontWeight:800,letterSpacing:"-0.02em",textTransform:"none",fontStyle:"normal"},infoText:{color:"color-gray-500"},container:{borderRadius:9999}}},radio:{size:"md",views:{radio:{borderColor:"color-gray-200",backgroundColor:"color-white"},dot:{backgroundColor:"theme-primary"},label:{fontFamily:"'Inter', Helvetica, Arial, sans-serif",fontWeight:800,letterSpacing:"-0.02em",textTransform:"none",fontStyle:"normal"},infoText:{color:"color-gray-500"},container:{borderRadius:"50%"}}},switch:{size:"sm",views:{slider:{backgroundColor:"color-gray-200"},circle:{backgroundColor:"color-white"},label:{fontFamily:"'Inter', Helvetica, Arial, sans-serif",fontWeight:800,letterSpacing:"-0.02em",textTransform:"none",fontStyle:"normal"},container:{borderRadius:"9999px"}}},slider:{backgroundColor:"theme-primary",views:{track:{backgroundColor:"color-gray-200"},progress:{backgroundColor:"theme-primary"},filledTrack:{backgroundColor:"theme-primary"},thumb:{borderColor:"theme-primary",backgroundColor:"color-white"},label:{color:"color-black"},valueLabel:{color:"color-gray-500"}}},tabs:{variant:"pill",views:{headerTabs:{borderColor:"color-gray-200"},tab:{color:"color-gray-500",fontWeight:800,letterSpacing:"-0.02em",textTransform:"none",fontStyle:"normal"},activeTab:{color:"theme-primary",borderColor:"theme-primary",backgroundColor:"theme-primary"},title:{fontFamily:"'Inter', Helvetica, Arial, sans-serif"},activeText:{color:"color-white"},content:{color:"color-black"},container:{borderRadius:"9999px"}}},accordion:{views:{container:{borderColor:"color-gray-200",backgroundColor:"color-gray-50",color:"color-black",borderRadius:"24px"},trigger:{color:"color-black",fontFamily:"'Inter', Helvetica, Arial, sans-serif"},content:{color:"color-gray-500"}}},table:{views:{table:{backgroundColor:"color-white",color:"color-black",borderColor:"color-gray-200",borderRadius:8},thead:{backgroundColor:"color-gray-50",color:"color-black"},th:{color:"color-gray-500",borderColor:"color-gray-200",fontFamily:"ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace",fontWeight:800,letterSpacing:"-0.02em",textTransform:"none",fontStyle:"normal"},tr:{borderColor:"color-gray-200"},td:{color:"color-black",borderColor:"color-gray-200",letterSpacing:"-0.02em",fontStyle:"normal"},caption:{color:"color-gray-500",fontStyle:"italic",letterSpacing:"-0.02em"}}},avatar:{views:{container:{backgroundColor:"color-gray-50",borderColor:"color-gray-200",color:"color-black",borderRadius:"50%"},fallback:{color:"color-black",fontFamily:"'Inter', Helvetica, Arial, sans-serif"}}},alert:{views:{container:{backgroundColor:"color-gray-50",borderColor:"color-gray-200",borderRadius:8},title:{color:"color-black",fontFamily:"'Inter', Helvetica, Arial, sans-serif",fontWeight:800,letterSpacing:"-0.02em",textTransform:"none",fontStyle:"normal"},description:{color:"color-gray-500",fontFamily:"'Inter', Helvetica, Arial, sans-serif"},icon:{color:"theme-primary"}}},status:{views:{indicator:{backgroundColor:"theme-primary"},label:{color:"color-black",fontFamily:"'Inter', Helvetica, Arial, sans-serif"}}},progress:{color:"theme-primary",backgroundColor:"color-gray-200",radius:"16px",views:{container:{backgroundColor:"color-gray-200",borderRadius:"9999px"},bar:{backgroundColor:"theme-primary"},text:{color:"color-black"}}},loader:{color:"theme-primary"},separator:{color:"color-gray-200",views:{container:{borderColor:"color-gray-200"},label:{color:"color-gray-500",fontFamily:"'Inter', Helvetica, Arial, sans-serif"}}},navigation:{views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"color-black",borderRadius:"24px"},item:{color:"color-gray-500"},activeItem:{color:"theme-primary",borderColor:"theme-primary"}}},hero:{views:{container:{backgroundColor:"color-white",color:"color-black",fontFamily:"'Inter', Helvetica, Arial, sans-serif"},eyebrow:{color:"color-gray-500"},title:{color:"color-black",fontFamily:"'Inter', Helvetica, Arial, sans-serif"},description:{color:"color-gray-500"}}},page:{views:{container:{backgroundColor:"color-white",color:"color-black",fontFamily:"'Inter', Helvetica, Arial, sans-serif"},section:{backgroundColor:"color-white",borderColor:"color-gray-200"},surface:{backgroundColor:"color-gray-50",borderColor:"color-gray-200",color:"color-black"}}}},personality:{cornerStyle:"pill",typeWeight:"black",typeCase:"normal",typeStyle:"normal",letterSpacing:"-0.02em",accentTreatment:"flat",signatureMotif:"●",density:"comfortable",surfaceTone:"matte",cardRadius:8,pillRadius:9999,badgeRadius:9999,voice:"rhythmic-vibrant"}},stripe:{metadata:{id:"stripe",label:"Stripe",sourcePath:"design.md/html/stripe.html",sourceTitle:"Design System Preview: Stripe (Light)",defaultAppearance:"light",googleFontLinks:["https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Source+Code+Pro:wght@400;500;700&display=swap"]},theme:{primary:"#635BFF",secondary:"#f96bee",success:"#15be53",warning:"#9b6829",error:"#ea2261",canvas:"color-white",surface:"color-gray-50",text:"color-black",muted:"color-gray-500",border:"color-gray-200",onPrimary:"#ffffff"},tokens:{rawCssVars:{purple:"#533afd","purple-hover":"#4434d4","purple-deep":"#2e2b8c","purple-light":"#b9b9f9","purple-mid":"#665efd",navy:"#061b31","dark-navy":"#0d253d","brand-dark":"#1c1e54",white:"#ffffff",ruby:"#ea2261",magenta:"#f96bee","magenta-light":"#ffd7ef",success:"#15be53","success-text":"#108c3d",lemon:"#9b6829",slate:"#64748d","dark-slate":"#273951",border:"#e5edf5","border-purple":"#b9b9f9","border-soft":"#d6d9fc","shadow-blue":"rgba(50,50,93,0.25)","shadow-dark-blue":"rgba(3,3,39,0.25)","shadow-black":"rgba(0,0,0,0.1)","shadow-ambient":"rgba(23,23,23,0.08)","shadow-soft":"rgba(23,23,23,0.06)","shadow-card":"rgba(50,50,93,0.25) 0px 30px 45px -30px, rgba(0,0,0,0.1) 0px 18px 36px -18px","shadow-ambient-card":"rgba(23,23,23,0.08) 0px 15px 35px 0px","shadow-subtle":"rgba(23,23,23,0.06) 0px 3px 6px 0px","font-primary":"'sohne-var', 'SF Pro Display', -apple-system, system-ui, sans-serif","font-mono":"'Source Code Pro', SFMono-Regular, ui-monospace, Menlo, monospace"},colors:[{name:"purple",value:"#533afd",role:"purple"},{name:"purple-hover",value:"#4434d4",role:"purple hover"},{name:"purple-deep",value:"#2e2b8c",role:"purple deep"},{name:"purple-light",value:"#b9b9f9",role:"purple light"},{name:"purple-mid",value:"#665efd",role:"purple mid"},{name:"navy",value:"#061b31",role:"navy"},{name:"dark-navy",value:"#0d253d",role:"dark navy"},{name:"brand-dark",value:"#1c1e54",role:"brand dark"},{name:"white",value:"#ffffff",role:"white"},{name:"ruby",value:"#ea2261",role:"ruby"},{name:"magenta",value:"#f96bee",role:"magenta"},{name:"magenta-light",value:"#ffd7ef",role:"magenta light"},{name:"success",value:"#15be53",role:"success"},{name:"success-text",value:"#108c3d",role:"success text"},{name:"lemon",value:"#9b6829",role:"lemon"},{name:"slate",value:"#64748d",role:"slate"},{name:"dark-slate",value:"#273951",role:"dark slate"},{name:"border",value:"#e5edf5",role:"border"},{name:"border-purple",value:"#b9b9f9",role:"border purple"},{name:"border-soft",value:"#d6d9fc",role:"border soft"},{name:"shadow-blue",value:"rgba(50,50,93,0.25)",role:"shadow blue"},{name:"shadow-dark-blue",value:"rgba(3,3,39,0.25)",role:"shadow dark blue"},{name:"shadow-black",value:"rgba(0,0,0,0.1)",role:"shadow black"},{name:"shadow-ambient",value:"rgba(23,23,23,0.08)",role:"shadow ambient"},{name:"shadow-soft",value:"rgba(23,23,23,0.06)",role:"shadow soft"},{name:"shadow-card",value:"rgba(50,50,93,0.25) 0px 30px 45px -30px, rgba(0,0,0,0.1) 0px 18px 36px -18px",role:"shadow card"},{name:"shadow-ambient-card",value:"rgba(23,23,23,0.08) 0px 15px 35px 0px",role:"shadow ambient card"},{name:"shadow-subtle",value:"rgba(23,23,23,0.06) 0px 3px 6px 0px",role:"shadow subtle"}],typography:{fontFamily:"'sohne-var', 'SF Pro Display', -apple-system, system-ui, sans-serif",monoFamily:"'Source Code Pro', SFMono-Regular, ui-monospace, Menlo, monospace",fontSizes:["16px","14px","48px","18px","12px","32px","13px","11px","10px","22px"],fontWeights:["100 900","300","400","500","700","600"],lineHeights:["1.40","1.15","1.10","1.50","1.2","1.35","1.4"]},spacing:["1px","6px","8px","10px","12px","14px","16px","20px","24px","28px","32px","48px","64px","72px","80px","96px"],radii:["0 0 6px 6px","4px","6px","2px","3px"],shadows:["rgba(50,50,93,0.25)","rgba(3,3,39,0.25)","rgba(0,0,0,0.1)","rgba(23,23,23,0.08)","rgba(23,23,23,0.06)","rgba(50,50,93,0.25) 0px 30px 45px -30px, rgba(0,0,0,0.1) 0px 18px 36px -18px","rgba(23,23,23,0.08) 0px 15px 35px 0px","rgba(23,23,23,0.06) 0px 3px 6px 0px","var(--shadow-subtle)","var(--shadow-card)","0 0 0 1px theme-primary","0 0 0 1px var(--ruby)"]},components:{button:{variant:"filled",size:"md",shape:"rounded",color:"theme-primary",textColor:"theme-onPrimary",views:{container:{borderRadius:9999,fontFamily:"'sohne-var', 'SF Pro Display', -apple-system, system-ui, sans-serif",fontWeight:700,letterSpacing:"-0.022em",textTransform:"none",fontStyle:"normal"},content:{fontFamily:"'sohne-var', 'SF Pro Display', -apple-system, system-ui, sans-serif",fontWeight:700,letterSpacing:"-0.022em",textTransform:"none",fontStyle:"normal"}}},badge:{variant:"filled",size:"sm",shape:"rounded",views:{container:{backgroundColor:"theme-secondary",color:"color-white",borderColor:"theme-secondary",borderRadius:6,fontFamily:"'sohne-var', 'SF Pro Display', -apple-system, system-ui, sans-serif",letterSpacing:"-0.022em",textTransform:"none",fontWeight:700,fontStyle:"normal"},text:{fontFamily:"'sohne-var', 'SF Pro Display', -apple-system, system-ui, sans-serif",fontWeight:600}}},card:{variant:"outlined",size:"md",shape:"rounded",views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"color-black",borderRadius:12,borderWidth:"1px",borderStyle:"solid",boxShadow:"rgba(23,23,23,0.06) 0px 3px 6px 0px"},header:{color:"color-black",fontFamily:"'sohne-var', 'SF Pro Display', -apple-system, system-ui, sans-serif",fontWeight:600,borderColor:"color-gray-200"},content:{color:"color-gray-500",fontFamily:"'sohne-var', 'SF Pro Display', -apple-system, system-ui, sans-serif"},footer:{borderColor:"color-gray-200"}}},input:{size:"md",shape:"default",variant:"default",views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"color-black",borderRadius:10,borderWidth:"1px",borderStyle:"solid",boxShadow:"0 0 0 1px theme-primary"},field:{color:"color-black",fontFamily:"'sohne-var', 'SF Pro Display', -apple-system, system-ui, sans-serif",fontStyle:"normal",letterSpacing:"-0.022em"},label:{fontFamily:"'sohne-var', 'SF Pro Display', -apple-system, system-ui, sans-serif",fontWeight:700,letterSpacing:"-0.022em",textTransform:"none",fontStyle:"normal"},helperText:{}}},textarea:{size:"md",shape:"default",variant:"default",views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"color-black",borderRadius:10,borderWidth:"1px",borderStyle:"solid",boxShadow:"0 0 0 1px theme-primary"},field:{color:"color-black",fontFamily:"'sohne-var', 'SF Pro Display', -apple-system, system-ui, sans-serif",fontStyle:"normal",letterSpacing:"-0.022em"},label:{fontFamily:"'sohne-var', 'SF Pro Display', -apple-system, system-ui, sans-serif",fontWeight:700,letterSpacing:"-0.022em",textTransform:"none",fontStyle:"normal"},helperText:{}}},select:{size:"md",shape:"default",variant:"default",views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"color-black",borderRadius:10,borderWidth:"1px",borderStyle:"solid",boxShadow:"0 0 0 1px theme-primary"},field:{color:"color-black",fontFamily:"'sohne-var', 'SF Pro Display', -apple-system, system-ui, sans-serif"},label:{fontFamily:"'sohne-var', 'SF Pro Display', -apple-system, system-ui, sans-serif",fontWeight:700,letterSpacing:"-0.022em",textTransform:"none",fontStyle:"normal"},helperText:{},text:{letterSpacing:"-0.022em",fontStyle:"normal"}}},checkbox:{size:"md",views:{checkbox:{borderColor:"color-gray-200",backgroundColor:"color-white",_checked:{backgroundColor:"theme-primary",borderColor:"theme-primary"},borderRadius:4},label:{fontFamily:"'sohne-var', 'SF Pro Display', -apple-system, system-ui, sans-serif",fontWeight:700,letterSpacing:"-0.022em",textTransform:"none",fontStyle:"normal"},infoText:{color:"color-gray-500"},container:{borderRadius:4}}},radio:{size:"md",views:{radio:{borderColor:"color-gray-200",backgroundColor:"color-white"},dot:{backgroundColor:"theme-primary"},label:{fontFamily:"'sohne-var', 'SF Pro Display', -apple-system, system-ui, sans-serif",fontWeight:700,letterSpacing:"-0.022em",textTransform:"none",fontStyle:"normal"},infoText:{color:"color-gray-500"},container:{borderRadius:"50%"}}},switch:{size:"sm",views:{slider:{backgroundColor:"color-gray-200"},circle:{backgroundColor:"color-white"},label:{fontFamily:"'sohne-var', 'SF Pro Display', -apple-system, system-ui, sans-serif",fontWeight:700,letterSpacing:"-0.022em",textTransform:"none",fontStyle:"normal"},container:{borderRadius:"9999px"}}},slider:{backgroundColor:"theme-primary",views:{track:{backgroundColor:"color-gray-200"},progress:{backgroundColor:"theme-primary"},filledTrack:{backgroundColor:"theme-primary"},thumb:{borderColor:"theme-primary",backgroundColor:"color-white"},label:{color:"color-black"},valueLabel:{color:"color-gray-500"}}},tabs:{variant:"underline",views:{headerTabs:{borderColor:"color-gray-200"},tab:{color:"color-gray-500",fontWeight:700,letterSpacing:"-0.022em",textTransform:"none",fontStyle:"normal"},activeTab:{color:"theme-primary",borderColor:"theme-primary",backgroundColor:"transparent"},title:{fontFamily:"'sohne-var', 'SF Pro Display', -apple-system, system-ui, sans-serif"},activeText:{color:"theme-primary"},content:{color:"color-black"},container:{borderRadius:"4px"}}},accordion:{views:{container:{borderColor:"color-gray-200",backgroundColor:"color-white",color:"color-black",borderRadius:"6px"},trigger:{color:"color-black",fontFamily:"'sohne-var', 'SF Pro Display', -apple-system, system-ui, sans-serif"},content:{color:"color-gray-500"}}},table:{views:{table:{backgroundColor:"color-white",color:"color-black",borderColor:"color-gray-200",borderRadius:12},thead:{backgroundColor:"color-white",color:"color-black"},th:{color:"color-gray-500",borderColor:"color-gray-200",fontFamily:"'Source Code Pro', SFMono-Regular, ui-monospace, Menlo, monospace",fontWeight:700,letterSpacing:"-0.022em",textTransform:"none",fontStyle:"normal"},tr:{borderColor:"color-gray-200"},td:{color:"color-black",borderColor:"color-gray-200",letterSpacing:"-0.022em",fontStyle:"normal"},caption:{color:"color-gray-500",fontStyle:"italic",letterSpacing:"-0.022em"}}},avatar:{views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"color-black",borderRadius:"50%"},fallback:{color:"color-black",fontFamily:"'sohne-var', 'SF Pro Display', -apple-system, system-ui, sans-serif"}}},alert:{views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",borderRadius:12},title:{color:"color-black",fontFamily:"'sohne-var', 'SF Pro Display', -apple-system, system-ui, sans-serif",fontWeight:700,letterSpacing:"-0.022em",textTransform:"none",fontStyle:"normal"},description:{color:"color-gray-500",fontFamily:"'sohne-var', 'SF Pro Display', -apple-system, system-ui, sans-serif"},icon:{color:"theme-primary"}}},status:{views:{indicator:{backgroundColor:"theme-success"},label:{color:"color-black",fontFamily:"'sohne-var', 'SF Pro Display', -apple-system, system-ui, sans-serif"}}},progress:{color:"theme-primary",backgroundColor:"color-gray-200",radius:"6px",views:{container:{backgroundColor:"color-gray-200",borderRadius:"9999px"},bar:{backgroundColor:"theme-primary"},text:{color:"color-black"}}},loader:{color:"theme-primary"},separator:{color:"color-gray-200",views:{container:{borderColor:"color-gray-200"},label:{color:"color-gray-500",fontFamily:"'sohne-var', 'SF Pro Display', -apple-system, system-ui, sans-serif"}}},navigation:{views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"color-black",borderRadius:"6px"},item:{color:"color-gray-500"},activeItem:{color:"theme-primary",borderColor:"theme-primary"}}},hero:{views:{container:{backgroundColor:"color-white",color:"color-black",fontFamily:"'sohne-var', 'SF Pro Display', -apple-system, system-ui, sans-serif"},eyebrow:{color:"color-gray-500"},title:{color:"color-black",fontFamily:"'sohne-var', 'SF Pro Display', -apple-system, system-ui, sans-serif"},description:{color:"color-gray-500"}}},page:{views:{container:{backgroundColor:"color-white",color:"color-black",fontFamily:"'sohne-var', 'SF Pro Display', -apple-system, system-ui, sans-serif"},section:{backgroundColor:"color-white",borderColor:"color-gray-200"},surface:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"color-black"}}}},personality:{cornerStyle:"soft",typeWeight:"bold",typeCase:"normal",typeStyle:"normal",letterSpacing:"-0.022em",accentTreatment:"gradient",signatureMotif:"↗",density:"comfortable",surfaceTone:"glass",cardRadius:12,pillRadius:9999,badgeRadius:6,voice:"refined-fintech"}},tesla:{metadata:{id:"tesla",label:"Tesla",sourcePath:"design.md/html/tesla.html",sourceTitle:"Design System Inspired by Tesla",defaultAppearance:"light",googleFontLinks:["https://fonts.googleapis.com/css2?family=Inter:wght@400;500&display=swap"]},theme:{primary:"#3E6AE1",secondary:"#171A20",success:"#3E6AE1",warning:"#5C5E62",error:"#171A20",canvas:"color-white",surface:"color-gray-50",text:"color-black",muted:"color-gray-500",border:"color-gray-200",onPrimary:"#FFFFFF"},tokens:{rawCssVars:{"electric-blue":"#3E6AE1","pure-white":"#FFFFFF","carbon-dark":"#171A20",graphite:"#393C41",pewter:"#5C5E62","silver-fog":"#8E8E8E","cloud-gray":"#EEEEEE","pale-silver":"#D0D1D2","light-ash":"#F4F4F4","frosted-glass":"rgba(255,255,255,0.75)",overlay:"rgba(128,128,128,0.65)","subtle-shadow":"rgba(0,0,0,0.05)","font-display":"'Inter', -apple-system, Arial, sans-serif","font-text":"'Inter', -apple-system, Arial, sans-serif"},colors:[{name:"electric-blue",value:"#3E6AE1",role:"electric blue"},{name:"pure-white",value:"#FFFFFF",role:"pure white"},{name:"carbon-dark",value:"#171A20",role:"carbon dark"},{name:"graphite",value:"#393C41",role:"graphite"},{name:"pewter",value:"#5C5E62",role:"pewter"},{name:"silver-fog",value:"#8E8E8E",role:"silver fog"},{name:"cloud-gray",value:"#EEEEEE",role:"cloud gray"},{name:"pale-silver",value:"#D0D1D2",role:"pale silver"},{name:"light-ash",value:"#F4F4F4",role:"light ash"},{name:"frosted-glass",value:"rgba(255,255,255,0.75)",role:"frosted glass"},{name:"overlay",value:"rgba(128,128,128,0.65)",role:"overlay"},{name:"subtle-shadow",value:"rgba(0,0,0,0.05)",role:"subtle shadow"}],typography:{fontFamily:"'Inter', -apple-system, Arial, sans-serif",monoFamily:"ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace",fontSizes:["14px","40px","28px","13px","12px","11px","17px","16px"],fontWeights:["400","500","700","600"],lineHeights:["1.43","48px","20px","1.2","1.3","36px","1.35","1.4"]},spacing:["4px","6px","8px","10px","12px","14px","16px","20px","24px","32px","40px","48px","56px","60px","64px","80px","100px"],radii:["4px","4px 4px 0 0","0 0 4px 4px","12px","3px"],shadows:["rgba(0,0,0,0.05)","0 1px 0 var(--pewter)"]},components:{button:{variant:"filled",size:"md",shape:"square",color:"theme-primary",textColor:"theme-onPrimary",views:{container:{borderRadius:0,fontFamily:"'Inter', -apple-system, Arial, sans-serif",fontWeight:300,letterSpacing:"0.08em",textTransform:"uppercase",fontStyle:"normal"},content:{fontFamily:"'Inter', -apple-system, Arial, sans-serif",fontWeight:300,letterSpacing:"0.08em",textTransform:"uppercase",fontStyle:"normal"}}},badge:{variant:"filled",size:"sm",shape:"rounded",views:{container:{backgroundColor:"theme-secondary",color:"color-white",borderColor:"theme-secondary",borderRadius:0,fontFamily:"'Inter', -apple-system, Arial, sans-serif",letterSpacing:"0.08em",textTransform:"uppercase",fontWeight:300,fontStyle:"normal"},text:{fontFamily:"'Inter', -apple-system, Arial, sans-serif",fontWeight:600}}},card:{variant:"outlined",size:"md",shape:"square",views:{container:{backgroundColor:"color-gray-50",borderColor:"color-gray-200",color:"color-black",borderRadius:0,borderWidth:"1px",borderStyle:"solid",boxShadow:"rgba(0,0,0,0.05)"},header:{color:"color-black",fontFamily:"'Inter', -apple-system, Arial, sans-serif",fontWeight:600,borderColor:"color-gray-200"},content:{color:"theme-warning",fontFamily:"'Inter', -apple-system, Arial, sans-serif"},footer:{borderColor:"color-gray-200"}}},input:{size:"md",shape:"default",variant:"default",views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"color-black",borderRadius:2,borderWidth:"1px",borderStyle:"solid",boxShadow:"none"},field:{color:"color-black",fontFamily:"'Inter', -apple-system, Arial, sans-serif",fontStyle:"normal",letterSpacing:"0.02em"},label:{fontFamily:"'Inter', -apple-system, Arial, sans-serif",fontWeight:300,letterSpacing:"0.02em",textTransform:"uppercase",fontStyle:"normal"},helperText:{}}},textarea:{size:"md",shape:"default",variant:"default",views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"color-black",borderRadius:2,borderWidth:"1px",borderStyle:"solid",boxShadow:"none"},field:{color:"color-black",fontFamily:"'Inter', -apple-system, Arial, sans-serif",fontStyle:"normal",letterSpacing:"0.02em"},label:{fontFamily:"'Inter', -apple-system, Arial, sans-serif",fontWeight:300,letterSpacing:"0.02em",textTransform:"uppercase",fontStyle:"normal"},helperText:{}}},select:{size:"md",shape:"default",variant:"default",views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"color-black",borderRadius:2,borderWidth:"1px",borderStyle:"solid",boxShadow:"none"},field:{color:"color-black",fontFamily:"'Inter', -apple-system, Arial, sans-serif"},label:{fontFamily:"'Inter', -apple-system, Arial, sans-serif",fontWeight:300,letterSpacing:"0.02em",textTransform:"uppercase",fontStyle:"normal"},helperText:{},text:{letterSpacing:"0.02em",fontStyle:"normal"}}},checkbox:{size:"md",views:{checkbox:{borderColor:"color-gray-200",backgroundColor:"color-white",_checked:{backgroundColor:"theme-primary",borderColor:"theme-primary"},borderRadius:0},label:{fontFamily:"'Inter', -apple-system, Arial, sans-serif",fontWeight:300,letterSpacing:"0.02em",textTransform:"uppercase",fontStyle:"normal"},infoText:{color:"theme-warning"},container:{borderRadius:0}}},radio:{size:"md",views:{radio:{borderColor:"color-gray-200",backgroundColor:"color-white"},dot:{backgroundColor:"theme-primary"},label:{fontFamily:"'Inter', -apple-system, Arial, sans-serif",fontWeight:300,letterSpacing:"0.02em",textTransform:"uppercase",fontStyle:"normal"},infoText:{color:"theme-warning"},container:{borderRadius:"50%"}}},switch:{size:"sm",views:{slider:{backgroundColor:"color-gray-200"},circle:{backgroundColor:"color-white"},label:{fontFamily:"'Inter', -apple-system, Arial, sans-serif",fontWeight:300,letterSpacing:"0.02em",textTransform:"uppercase",fontStyle:"normal"},container:{borderRadius:"9999px"}}},slider:{backgroundColor:"theme-primary",views:{track:{backgroundColor:"color-gray-200"},progress:{backgroundColor:"theme-primary"},filledTrack:{backgroundColor:"theme-primary"},thumb:{borderColor:"theme-primary",backgroundColor:"color-white"},label:{color:"color-black"},valueLabel:{color:"theme-warning"}}},tabs:{variant:"underline",views:{headerTabs:{borderColor:"color-gray-200"},tab:{color:"theme-warning",fontWeight:300,letterSpacing:"0.02em",textTransform:"uppercase",fontStyle:"normal"},activeTab:{color:"theme-primary",borderColor:"theme-primary",backgroundColor:"transparent"},title:{fontFamily:"'Inter', -apple-system, Arial, sans-serif"},activeText:{color:"theme-primary"},content:{color:"color-black"},container:{borderRadius:"4px"}}},accordion:{views:{container:{borderColor:"color-gray-200",backgroundColor:"color-gray-50",color:"color-black",borderRadius:0},trigger:{color:"color-black",fontFamily:"'Inter', -apple-system, Arial, sans-serif"},content:{color:"theme-warning"}}},table:{views:{table:{backgroundColor:"color-white",color:"color-black",borderColor:"color-gray-200",borderRadius:0},thead:{backgroundColor:"color-gray-50",color:"color-black"},th:{color:"theme-warning",borderColor:"color-gray-200",fontFamily:"ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace",fontWeight:300,letterSpacing:"0.02em",textTransform:"uppercase",fontStyle:"normal"},tr:{borderColor:"color-gray-200"},td:{color:"color-black",borderColor:"color-gray-200",letterSpacing:"0.02em",fontStyle:"normal"},caption:{color:"theme-warning",fontStyle:"italic",letterSpacing:"0.02em"}}},avatar:{views:{container:{backgroundColor:"color-gray-50",borderColor:"color-gray-200",color:"color-black",borderRadius:"50%"},fallback:{color:"color-black",fontFamily:"'Inter', -apple-system, Arial, sans-serif"}}},alert:{views:{container:{backgroundColor:"color-gray-50",borderColor:"color-gray-200",borderRadius:0},title:{color:"color-black",fontFamily:"'Inter', -apple-system, Arial, sans-serif",fontWeight:300,letterSpacing:"0.02em",textTransform:"uppercase",fontStyle:"normal"},description:{color:"theme-warning",fontFamily:"'Inter', -apple-system, Arial, sans-serif"},icon:{color:"theme-primary"}}},status:{views:{indicator:{backgroundColor:"theme-primary"},label:{color:"color-black",fontFamily:"'Inter', -apple-system, Arial, sans-serif"}}},progress:{color:"theme-primary",backgroundColor:"color-gray-200",radius:"4px",views:{container:{backgroundColor:"color-gray-200",borderRadius:"9999px"},bar:{backgroundColor:"theme-primary"},text:{color:"color-black"}}},loader:{color:"theme-primary"},separator:{color:"color-gray-200",views:{container:{borderColor:"color-gray-200"},label:{color:"theme-warning",fontFamily:"'Inter', -apple-system, Arial, sans-serif"}}},navigation:{views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"color-black",borderRadius:0},item:{color:"theme-warning"},activeItem:{color:"theme-primary",borderColor:"theme-primary"}}},hero:{views:{container:{backgroundColor:"color-white",color:"color-black",fontFamily:"'Inter', -apple-system, Arial, sans-serif"},eyebrow:{color:"theme-warning"},title:{color:"color-black",fontFamily:"'Inter', -apple-system, Arial, sans-serif"},description:{color:"theme-warning"}}},page:{views:{container:{backgroundColor:"color-white",color:"color-black",fontFamily:"'Inter', -apple-system, Arial, sans-serif"},section:{backgroundColor:"color-white",borderColor:"color-gray-200"},surface:{backgroundColor:"color-gray-50",borderColor:"color-gray-200",color:"color-black"}}}},personality:{cornerStyle:"sharp",typeWeight:"light",typeCase:"uppercase",typeStyle:"normal",letterSpacing:"0.02em",accentTreatment:"flat",signatureMotif:"▲",density:"spacious",surfaceTone:"mono",cardRadius:0,pillRadius:0,badgeRadius:0,voice:"futurist-clean"}},uber:{metadata:{id:"uber",label:"Uber",sourcePath:"design.md/html/uber.html",sourceTitle:"Design System Preview: Uber (Light)",defaultAppearance:"light",googleFontLinks:["https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,300;0,9..40,400;0,9..40,500;0,9..40,700&display=swap"]},theme:{primary:"color-black",secondary:"#efefef",success:"#06C167",warning:"#e2e2e2",error:"#000000",canvas:"color-white",surface:"color-gray-50",text:"color-black",muted:"color-gray-500",border:"color-gray-200",onPrimary:"color-white"},tokens:{rawCssVars:{"color-black":"#000000","color-white":"#ffffff","color-hover-gray":"#e2e2e2","color-hover-light":"#f3f3f3","color-chip-gray":"#efefef","color-body-gray":"#4b4b4b","color-muted-gray":"#afafaf","shadow-card":"rgba(0, 0, 0, 0.12) 0px 4px 16px 0px","shadow-medium":"rgba(0, 0, 0, 0.16) 0px 4px 16px 0px","shadow-float":"rgba(0, 0, 0, 0.16) 0px 2px 8px 0px","shadow-press":"rgba(0, 0, 0, 0.08) 0px 0px 0px 999px inset","font-display":"'DM Sans', system-ui, -apple-system, 'Helvetica Neue', Helvetica, Arial, sans-serif","font-body":"'DM Sans', system-ui, -apple-system, 'Helvetica Neue', Helvetica, Arial, sans-serif","bg-page":"#ffffff","bg-card":"#ffffff","bg-nav":"rgba(255,255,255,0.92)","text-primary":"#000000","text-secondary":"#4b4b4b","text-tertiary":"#afafaf","border-color":"#efefef","section-label-color":"#000000"},colors:[{name:"color-black",value:"#000000",role:"color black"},{name:"color-white",value:"#ffffff",role:"color white"},{name:"color-hover-gray",value:"#e2e2e2",role:"color hover gray"},{name:"color-hover-light",value:"#f3f3f3",role:"color hover light"},{name:"color-chip-gray",value:"#efefef",role:"color chip gray"},{name:"color-body-gray",value:"#4b4b4b",role:"color body gray"},{name:"color-muted-gray",value:"#afafaf",role:"color muted gray"},{name:"shadow-card",value:"rgba(0, 0, 0, 0.12) 0px 4px 16px 0px",role:"shadow card"},{name:"shadow-medium",value:"rgba(0, 0, 0, 0.16) 0px 4px 16px 0px",role:"shadow medium"},{name:"shadow-float",value:"rgba(0, 0, 0, 0.16) 0px 2px 8px 0px",role:"shadow float"},{name:"shadow-press",value:"rgba(0, 0, 0, 0.08) 0px 0px 0px 999px inset",role:"shadow press"},{name:"bg-page",value:"#ffffff",role:"bg page"},{name:"bg-card",value:"#ffffff",role:"bg card"},{name:"bg-nav",value:"rgba(255,255,255,0.92)",role:"bg nav"},{name:"text-primary",value:"#000000",role:"text primary"},{name:"text-secondary",value:"#4b4b4b",role:"text secondary"},{name:"text-tertiary",value:"#afafaf",role:"text tertiary"},{name:"border-color",value:"#efefef",role:"border color"},{name:"section-label-color",value:"#000000",role:"section label color"}],typography:{fontFamily:"'DM Sans', system-ui, -apple-system, 'Helvetica Neue', Helvetica, Arial, sans-serif",monoFamily:"ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace",fontSizes:["16px","18px","14px","64px","20px","12px","36px","13px","24px","28px"],fontWeights:["700","500","400","600"],lineHeights:["1.50","1.10","1.22","1.33","2.0","1.2","1.35","1.4"]},spacing:["8px","10px","12px","14px","16px","20px","24px","28px","32px","36px","40px","50px","60px","64px","80px","100px","120px","140px"],radii:["8px","999px","12px","16px","4px","3px"],shadows:["rgba(0, 0, 0, 0.12) 0px 4px 16px 0px","rgba(0, 0, 0, 0.16) 0px 4px 16px 0px","rgba(0, 0, 0, 0.16) 0px 2px 8px 0px","rgba(0, 0, 0, 0.08) 0px 0px 0px 999px inset","var(--shadow-card)","var(--shadow-float)","var(--shadow-medium)","0 0 0 1px color-black","rgba(0,0,0,0.12) 0px 4px 16px 0px","rgba(0,0,0,0.16) 0px 4px 16px 0px","rgba(0,0,0,0.16) 0px 2px 8px 0px","rgba(0,0,0,0.08) 0px 0px 0px 999px inset"]},components:{button:{variant:"filled",size:"md",shape:"square",color:"theme-primary",textColor:"theme-onPrimary",views:{container:{borderRadius:0,fontFamily:"'DM Sans', system-ui, -apple-system, 'Helvetica Neue', Helvetica, Arial, sans-serif",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},content:{fontFamily:"'DM Sans', system-ui, -apple-system, 'Helvetica Neue', Helvetica, Arial, sans-serif",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"}}},badge:{variant:"filled",size:"sm",shape:"pill",views:{container:{backgroundColor:"theme-secondary",color:"color-white",borderColor:"theme-secondary",borderRadius:0,fontFamily:"'DM Sans', system-ui, -apple-system, 'Helvetica Neue', Helvetica, Arial, sans-serif",letterSpacing:"-0.01em",textTransform:"none",fontWeight:700,fontStyle:"normal"},text:{fontFamily:"'DM Sans', system-ui, -apple-system, 'Helvetica Neue', Helvetica, Arial, sans-serif",fontWeight:600}}},card:{variant:"outlined",size:"md",shape:"square",views:{container:{backgroundColor:"color-white",borderColor:"theme-warning",color:"theme-primary",borderRadius:4,borderWidth:"1px",borderStyle:"solid",boxShadow:"rgba(0, 0, 0, 0.12) 0px 4px 16px 0px"},header:{color:"theme-primary",fontFamily:"'DM Sans', system-ui, -apple-system, 'Helvetica Neue', Helvetica, Arial, sans-serif",fontWeight:600,borderColor:"theme-warning"},content:{color:"color-gray-500",fontFamily:"'DM Sans', system-ui, -apple-system, 'Helvetica Neue', Helvetica, Arial, sans-serif"},footer:{borderColor:"theme-warning"}}},input:{size:"md",shape:"default",variant:"default",views:{container:{backgroundColor:"color-white",borderColor:"theme-warning",color:"theme-primary",borderRadius:2,borderWidth:"1px",borderStyle:"solid",boxShadow:"0 0 0 1px color-black"},field:{color:"theme-primary",fontFamily:"'DM Sans', system-ui, -apple-system, 'Helvetica Neue', Helvetica, Arial, sans-serif",fontStyle:"normal",letterSpacing:"-0.01em"},label:{fontFamily:"'DM Sans', system-ui, -apple-system, 'Helvetica Neue', Helvetica, Arial, sans-serif",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},helperText:{}}},textarea:{size:"md",shape:"default",variant:"default",views:{container:{backgroundColor:"color-white",borderColor:"theme-warning",color:"theme-primary",borderRadius:2,borderWidth:"1px",borderStyle:"solid",boxShadow:"0 0 0 1px color-black"},field:{color:"theme-primary",fontFamily:"'DM Sans', system-ui, -apple-system, 'Helvetica Neue', Helvetica, Arial, sans-serif",fontStyle:"normal",letterSpacing:"-0.01em"},label:{fontFamily:"'DM Sans', system-ui, -apple-system, 'Helvetica Neue', Helvetica, Arial, sans-serif",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},helperText:{}}},select:{size:"md",shape:"default",variant:"default",views:{container:{backgroundColor:"color-white",borderColor:"theme-warning",color:"theme-primary",borderRadius:2,borderWidth:"1px",borderStyle:"solid",boxShadow:"0 0 0 1px color-black"},field:{color:"theme-primary",fontFamily:"'DM Sans', system-ui, -apple-system, 'Helvetica Neue', Helvetica, Arial, sans-serif"},label:{fontFamily:"'DM Sans', system-ui, -apple-system, 'Helvetica Neue', Helvetica, Arial, sans-serif",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},helperText:{},text:{letterSpacing:"-0.01em",fontStyle:"normal"}}},checkbox:{size:"md",views:{checkbox:{borderColor:"theme-warning",backgroundColor:"color-white",_checked:{backgroundColor:"theme-primary",borderColor:"theme-primary"},borderRadius:0},label:{fontFamily:"'DM Sans', system-ui, -apple-system, 'Helvetica Neue', Helvetica, Arial, sans-serif",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},infoText:{color:"color-gray-500"},container:{borderRadius:0}}},radio:{size:"md",views:{radio:{borderColor:"theme-warning",backgroundColor:"color-white"},dot:{backgroundColor:"theme-primary"},label:{fontFamily:"'DM Sans', system-ui, -apple-system, 'Helvetica Neue', Helvetica, Arial, sans-serif",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},infoText:{color:"color-gray-500"},container:{borderRadius:"50%"}}},switch:{size:"sm",views:{slider:{backgroundColor:"theme-warning"},circle:{backgroundColor:"color-white"},label:{fontFamily:"'DM Sans', system-ui, -apple-system, 'Helvetica Neue', Helvetica, Arial, sans-serif",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},container:{borderRadius:"9999px"}}},slider:{backgroundColor:"theme-primary",views:{track:{backgroundColor:"theme-warning"},progress:{backgroundColor:"theme-primary"},filledTrack:{backgroundColor:"theme-primary"},thumb:{borderColor:"theme-primary",backgroundColor:"color-white"},label:{color:"theme-primary"},valueLabel:{color:"color-gray-500"}}},tabs:{variant:"pill",views:{headerTabs:{borderColor:"theme-warning"},tab:{color:"color-gray-500",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},activeTab:{color:"theme-primary",borderColor:"theme-primary",backgroundColor:"theme-primary"},title:{fontFamily:"'DM Sans', system-ui, -apple-system, 'Helvetica Neue', Helvetica, Arial, sans-serif"},activeText:{color:"color-white"},content:{color:"theme-primary"},container:{borderRadius:"9999px"}}},accordion:{views:{container:{borderColor:"theme-warning",backgroundColor:"color-white",color:"theme-primary",borderRadius:0},trigger:{color:"theme-primary",fontFamily:"'DM Sans', system-ui, -apple-system, 'Helvetica Neue', Helvetica, Arial, sans-serif"},content:{color:"color-gray-500"}}},table:{views:{table:{backgroundColor:"color-white",color:"theme-primary",borderColor:"theme-warning",borderRadius:4},thead:{backgroundColor:"color-white",color:"theme-primary"},th:{color:"color-gray-500",borderColor:"theme-warning",fontFamily:"ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},tr:{borderColor:"theme-warning"},td:{color:"theme-primary",borderColor:"theme-warning",letterSpacing:"-0.01em",fontStyle:"normal"},caption:{color:"color-gray-500",fontStyle:"italic",letterSpacing:"-0.01em"}}},avatar:{views:{container:{backgroundColor:"color-white",borderColor:"theme-warning",color:"theme-primary",borderRadius:"50%"},fallback:{color:"theme-primary",fontFamily:"'DM Sans', system-ui, -apple-system, 'Helvetica Neue', Helvetica, Arial, sans-serif"}}},alert:{views:{container:{backgroundColor:"color-white",borderColor:"theme-warning",borderRadius:4},title:{color:"theme-primary",fontFamily:"'DM Sans', system-ui, -apple-system, 'Helvetica Neue', Helvetica, Arial, sans-serif",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},description:{color:"color-gray-500",fontFamily:"'DM Sans', system-ui, -apple-system, 'Helvetica Neue', Helvetica, Arial, sans-serif"},icon:{color:"theme-primary"}}},status:{views:{indicator:{backgroundColor:"theme-primary"},label:{color:"theme-primary",fontFamily:"'DM Sans', system-ui, -apple-system, 'Helvetica Neue', Helvetica, Arial, sans-serif"}}},progress:{color:"theme-primary",backgroundColor:"theme-warning",radius:"8px",views:{container:{backgroundColor:"theme-warning",borderRadius:"9999px"},bar:{backgroundColor:"theme-primary"},text:{color:"theme-primary"}}},loader:{color:"theme-primary"},separator:{color:"theme-warning",views:{container:{borderColor:"theme-warning"},label:{color:"color-gray-500",fontFamily:"'DM Sans', system-ui, -apple-system, 'Helvetica Neue', Helvetica, Arial, sans-serif"}}},navigation:{views:{container:{backgroundColor:"color-white",borderColor:"theme-warning",color:"theme-primary",borderRadius:0},item:{color:"color-gray-500"},activeItem:{color:"theme-primary",borderColor:"theme-primary"}}},hero:{views:{container:{backgroundColor:"color-white",color:"theme-primary",fontFamily:"'DM Sans', system-ui, -apple-system, 'Helvetica Neue', Helvetica, Arial, sans-serif"},eyebrow:{color:"color-gray-500"},title:{color:"theme-primary",fontFamily:"'DM Sans', system-ui, -apple-system, 'Helvetica Neue', Helvetica, Arial, sans-serif"},description:{color:"color-gray-500"}}},page:{views:{container:{backgroundColor:"color-white",color:"theme-primary",fontFamily:"'DM Sans', system-ui, -apple-system, 'Helvetica Neue', Helvetica, Arial, sans-serif"},section:{backgroundColor:"color-white",borderColor:"theme-warning"},surface:{backgroundColor:"color-white",borderColor:"theme-warning",color:"theme-primary"}}}},personality:{cornerStyle:"sharp",typeWeight:"bold",typeCase:"normal",typeStyle:"normal",letterSpacing:"-0.01em",accentTreatment:"flat",signatureMotif:"▶",density:"tight",surfaceTone:"mono",cardRadius:4,pillRadius:0,badgeRadius:0,voice:"motion-utility"}},vercel:{metadata:{id:"vercel",label:"Vercel",sourcePath:"design.md/html/vercel.html",sourceTitle:"Design System Preview: Vercel (Light)",defaultAppearance:"light",googleFontLinks:["https://fonts.googleapis.com/css2?family=Geist:wght@400;500;600;700&family=Geist+Mono:wght@400;500;600&display=swap"]},theme:{primary:"color-black",secondary:"#0072f5",success:"#0a72ef",warning:"#de1d8d",error:"#ff5b4f",canvas:"color-white",surface:"color-gray-50",text:"color-black",muted:"color-gray-500",border:"color-gray-200",onPrimary:"color-white"},tokens:{rawCssVars:{black:"#171717",white:"#ffffff","gray-50":"#fafafa","gray-100":"#ebebeb","gray-400":"#808080","gray-500":"#666666","gray-600":"#4d4d4d","link-blue":"#0072f5","focus-blue":"hsl(212,100%,48%)","ship-red":"#ff5b4f","preview-pink":"#de1d8d","develop-blue":"#0a72ef","console-blue":"#0070f3","console-purple":"#7928ca","console-pink":"#eb367f","badge-bg":"#ebf5ff","badge-text":"#0068d6","shadow-ring":"rgba(0,0,0,0.08) 0px 0px 0px 1px","shadow-ring-light":"rgb(235,235,235) 0px 0px 0px 1px","shadow-subtle":"rgba(0,0,0,0.04) 0px 2px 2px 0px","shadow-card":"rgba(0,0,0,0.08) 0px 0px 0px 1px, rgba(0,0,0,0.04) 0px 2px 2px 0px, rgb(250,250,250) 0px 0px 0px 1px","shadow-card-full":"rgba(0,0,0,0.08) 0px 0px 0px 1px, rgba(0,0,0,0.04) 0px 2px 2px 0px, rgba(0,0,0,0.04) 0px 8px 8px -8px, rgb(250,250,250) 0px 0px 0px 1px","font-sans":"'Geist', system-ui, -apple-system, Arial, sans-serif","font-mono":"'Geist Mono', ui-monospace, SFMono-Regular, 'Roboto Mono', Menlo, monospace"},colors:[{name:"black",value:"#171717",role:"black"},{name:"white",value:"#ffffff",role:"white"},{name:"gray-50",value:"#fafafa",role:"gray 50"},{name:"gray-100",value:"#ebebeb",role:"gray 100"},{name:"gray-400",value:"#808080",role:"gray 400"},{name:"gray-500",value:"#666666",role:"gray 500"},{name:"gray-600",value:"#4d4d4d",role:"gray 600"},{name:"link-blue",value:"#0072f5",role:"link blue"},{name:"focus-blue",value:"hsl(212,100%,48%)",role:"focus blue"},{name:"ship-red",value:"#ff5b4f",role:"ship red"},{name:"preview-pink",value:"#de1d8d",role:"preview pink"},{name:"develop-blue",value:"#0a72ef",role:"develop blue"},{name:"console-blue",value:"#0070f3",role:"console blue"},{name:"console-purple",value:"#7928ca",role:"console purple"},{name:"console-pink",value:"#eb367f",role:"console pink"},{name:"badge-bg",value:"#ebf5ff",role:"badge bg"},{name:"badge-text",value:"#0068d6",role:"badge text"},{name:"shadow-ring",value:"rgba(0,0,0,0.08) 0px 0px 0px 1px",role:"shadow ring"},{name:"shadow-ring-light",value:"rgb(235,235,235) 0px 0px 0px 1px",role:"shadow ring light"},{name:"shadow-subtle",value:"rgba(0,0,0,0.04) 0px 2px 2px 0px",role:"shadow subtle"},{name:"shadow-card",value:"rgba(0,0,0,0.08) 0px 0px 0px 1px, rgba(0,0,0,0.04) 0px 2px 2px 0px, rgb(250,250,250) 0px 0px 0px 1px",role:"shadow card"},{name:"shadow-card-full",value:"rgba(0,0,0,0.08) 0px 0px 0px 1px, rgba(0,0,0,0.04) 0px 2px 2px 0px, rgba(0,0,0,0.04) 0px 8px 8px -8px, rgb(250,250,250) 0px 0px 0px 1px",role:"shadow card full"}],typography:{fontFamily:"var(--font-sans)",monoFamily:"'Geist Mono', ui-monospace, SFMono-Regular, 'Roboto Mono', Menlo, monospace",fontSizes:["16px","14px","48px","20px","12px","32px","13px","11px","10px","36px"],fontWeights:["400","600","500","700"],lineHeights:["1.50","1.00","1.80","1.25","1.2","1.35","1.4"]},spacing:["2px","4px","8px","10px","12px","14px","16px","20px","24px","28px","32px","48px","64px","72px","80px","96px"],radii:["6px","8px","9999px","3px"],shadows:["rgba(0,0,0,0.08) 0px 0px 0px 1px","rgb(235,235,235) 0px 0px 0px 1px","rgba(0,0,0,0.04) 0px 2px 2px 0px","rgba(0,0,0,0.08) 0px 0px 0px 1px, rgba(0,0,0,0.04) 0px 2px 2px 0px, rgb(250,250,250) 0px 0px 0px 1px","rgba(0,0,0,0.08) 0px 0px 0px 1px, rgba(0,0,0,0.04) 0px 2px 2px 0px, rgba(0,0,0,0.04) 0px 8px 8px -8px, rgb(250,250,250) 0px 0px 0px 1px","var(--shadow-ring)","var(--shadow-ring-light)","var(--shadow-card)","var(--shadow-card-full)","0 0 0 2px var(--focus-blue)","0 0 0 2px var(--ship-red)"]},components:{button:{variant:"filled",size:"md",shape:"square",color:"theme-primary",textColor:"theme-onPrimary",views:{container:{borderRadius:4,fontFamily:"var(--font-sans)",fontWeight:700,letterSpacing:"-0.04em",textTransform:"none",fontStyle:"normal"},content:{fontFamily:"var(--font-sans)",fontWeight:700,letterSpacing:"-0.04em",textTransform:"none",fontStyle:"normal"}}},badge:{variant:"filled",size:"sm",shape:"rounded",views:{container:{backgroundColor:"theme-secondary",color:"color-white",borderColor:"theme-secondary",borderRadius:4,fontFamily:"var(--font-sans)",letterSpacing:"-0.04em",textTransform:"none",fontWeight:700,fontStyle:"normal"},text:{fontFamily:"var(--font-sans)",fontWeight:600}}},card:{variant:"outlined",size:"md",shape:"rounded",views:{container:{backgroundColor:"color-gray-50",borderColor:"color-gray-200",color:"theme-primary",borderRadius:4,borderWidth:"1px",borderStyle:"solid",boxShadow:"rgba(0,0,0,0.08) 0px 0px 0px 1px"},header:{color:"theme-primary",fontFamily:"var(--font-sans)",fontWeight:600,borderColor:"color-gray-200"},content:{color:"color-gray-500",fontFamily:"var(--font-sans)"},footer:{borderColor:"color-gray-200"}}},input:{size:"md",shape:"default",variant:"default",views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"theme-primary",borderRadius:2,borderWidth:"1px",borderStyle:"solid",boxShadow:"rgba(0,0,0,0.08) 0px 0px 0px 1px"},field:{color:"theme-primary",fontFamily:"var(--font-sans)",fontStyle:"normal",letterSpacing:"-0.04em"},label:{fontFamily:"var(--font-sans)",fontWeight:700,letterSpacing:"-0.04em",textTransform:"none",fontStyle:"normal"},helperText:{}}},textarea:{size:"md",shape:"default",variant:"default",views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"theme-primary",borderRadius:2,borderWidth:"1px",borderStyle:"solid",boxShadow:"rgba(0,0,0,0.08) 0px 0px 0px 1px"},field:{color:"theme-primary",fontFamily:"var(--font-sans)",fontStyle:"normal",letterSpacing:"-0.04em"},label:{fontFamily:"var(--font-sans)",fontWeight:700,letterSpacing:"-0.04em",textTransform:"none",fontStyle:"normal"},helperText:{}}},select:{size:"md",shape:"default",variant:"default",views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"theme-primary",borderRadius:2,borderWidth:"1px",borderStyle:"solid",boxShadow:"rgba(0,0,0,0.08) 0px 0px 0px 1px"},field:{color:"theme-primary",fontFamily:"var(--font-sans)"},label:{fontFamily:"var(--font-sans)",fontWeight:700,letterSpacing:"-0.04em",textTransform:"none",fontStyle:"normal"},helperText:{},text:{letterSpacing:"-0.04em",fontStyle:"normal"}}},checkbox:{size:"md",views:{checkbox:{borderColor:"color-gray-200",backgroundColor:"color-white",_checked:{backgroundColor:"theme-primary",borderColor:"theme-primary"},borderRadius:0},label:{fontFamily:"var(--font-sans)",fontWeight:700,letterSpacing:"-0.04em",textTransform:"none",fontStyle:"normal"},infoText:{color:"color-gray-500"},container:{borderRadius:0}}},radio:{size:"md",views:{radio:{borderColor:"color-gray-200",backgroundColor:"color-white"},dot:{backgroundColor:"theme-primary"},label:{fontFamily:"var(--font-sans)",fontWeight:700,letterSpacing:"-0.04em",textTransform:"none",fontStyle:"normal"},infoText:{color:"color-gray-500"},container:{borderRadius:"50%"}}},switch:{size:"sm",views:{slider:{backgroundColor:"color-gray-200"},circle:{backgroundColor:"color-white"},label:{fontFamily:"var(--font-sans)",fontWeight:700,letterSpacing:"-0.04em",textTransform:"none",fontStyle:"normal"},container:{borderRadius:"9999px"}}},slider:{backgroundColor:"theme-primary",views:{track:{backgroundColor:"color-gray-200"},progress:{backgroundColor:"theme-primary"},filledTrack:{backgroundColor:"theme-primary"},thumb:{borderColor:"theme-primary",backgroundColor:"color-white"},label:{color:"theme-primary"},valueLabel:{color:"color-gray-500"}}},tabs:{variant:"underline",views:{headerTabs:{borderColor:"color-gray-200"},tab:{color:"color-gray-500",fontWeight:700,letterSpacing:"-0.04em",textTransform:"none",fontStyle:"normal"},activeTab:{color:"theme-primary",borderColor:"theme-primary",backgroundColor:"transparent"},title:{fontFamily:"var(--font-sans)"},activeText:{color:"theme-primary"},content:{color:"theme-primary"},container:{borderRadius:"6px"}}},accordion:{views:{container:{borderColor:"color-gray-200",backgroundColor:"color-gray-50",color:"theme-primary",borderRadius:"6px"},trigger:{color:"theme-primary",fontFamily:"var(--font-sans)"},content:{color:"color-gray-500"}}},table:{views:{table:{backgroundColor:"color-white",color:"theme-primary",borderColor:"color-gray-200",borderRadius:4},thead:{backgroundColor:"color-gray-50",color:"theme-primary"},th:{color:"color-gray-500",borderColor:"color-gray-200",fontFamily:"'Geist Mono', ui-monospace, SFMono-Regular, 'Roboto Mono', Menlo, monospace",fontWeight:700,letterSpacing:"-0.04em",textTransform:"none",fontStyle:"normal"},tr:{borderColor:"color-gray-200"},td:{color:"theme-primary",borderColor:"color-gray-200",letterSpacing:"-0.04em",fontStyle:"normal"},caption:{color:"color-gray-500",fontStyle:"italic",letterSpacing:"-0.04em"}}},avatar:{views:{container:{backgroundColor:"color-gray-50",borderColor:"color-gray-200",color:"theme-primary",borderRadius:"50%"},fallback:{color:"theme-primary",fontFamily:"var(--font-sans)"}}},alert:{views:{container:{backgroundColor:"color-gray-50",borderColor:"color-gray-200",borderRadius:4},title:{color:"theme-primary",fontFamily:"var(--font-sans)",fontWeight:700,letterSpacing:"-0.04em",textTransform:"none",fontStyle:"normal"},description:{color:"color-gray-500",fontFamily:"var(--font-sans)"},icon:{color:"theme-primary"}}},status:{views:{indicator:{backgroundColor:"theme-success"},label:{color:"theme-primary",fontFamily:"var(--font-sans)"}}},progress:{color:"theme-primary",backgroundColor:"color-gray-200",radius:"6px",views:{container:{backgroundColor:"color-gray-200",borderRadius:"9999px"},bar:{backgroundColor:"theme-primary"},text:{color:"theme-primary"}}},loader:{color:"theme-primary"},separator:{color:"color-gray-200",views:{container:{borderColor:"color-gray-200"},label:{color:"color-gray-500",fontFamily:"var(--font-sans)"}}},navigation:{views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"theme-primary",borderRadius:"6px"},item:{color:"color-gray-500"},activeItem:{color:"theme-primary",borderColor:"theme-primary"}}},hero:{views:{container:{backgroundColor:"color-white",color:"theme-primary",fontFamily:"var(--font-sans)"},eyebrow:{color:"color-gray-500"},title:{color:"theme-primary",fontFamily:"var(--font-sans)"},description:{color:"color-gray-500"}}},page:{views:{container:{backgroundColor:"color-white",color:"theme-primary",fontFamily:"var(--font-sans)"},section:{backgroundColor:"color-white",borderColor:"color-gray-200"},surface:{backgroundColor:"color-gray-50",borderColor:"color-gray-200",color:"theme-primary"}}}},personality:{cornerStyle:"sharp",typeWeight:"bold",typeCase:"normal",typeStyle:"normal",letterSpacing:"-0.04em",accentTreatment:"flat",signatureMotif:"▲",density:"comfortable",surfaceTone:"mono",cardRadius:4,pillRadius:4,badgeRadius:4,voice:"deploy-geometric"}}},$c=Object.values(st),An=Dc,To=e=>!!e&&typeof e=="object"&&!Array.isArray(e)&&Object.prototype.toString.call(e)==="[object Object]",dt=e=>e,Be=(...e)=>{const o={};return e.forEach(t=>{To(t)&&Object.entries(t).forEach(([n,a])=>{if(a!=null){if(To(a)&&To(o[n])){o[n]=Be(o[n],a);return}o[n]=a}})}),o},En=e=>{if(Array.isArray(e)||!To(e))return e;const o={};for(const[t,n]of Object.entries(e))n!==null&&(o[t]=To(n)?En(n):n);return o},Lc=new Set(["button"]),_c=["backgroundColor","background","borderColor","color"],Dn=new Set,Bc=(e,o)=>{if(process.env.NODE_ENV!=="production"&&!(!o||!Lc.has(e))&&!Dn.has(e))for(const[t,n]of Object.entries(o)){if(!To(n))continue;const a=_c.filter(l=>n[l]!=null);if(a.length>0){Dn.add(e),console.warn(`[design-system] components.${e}.views.${t} sets ${a.join(", ")} — view styles apply above every variant, so this flattens ghost/outline/subtle into solid blocks. Move colors to components.${e}.config.variants.<variant> (merged under each variant); keep views to shape and typography.`);return}}},gt=(e,o)=>{if(!o)return{};const t=o.components[e]||{},n=dt(En(t));return Bc(e,n.views),n},$n=(e,o,t)=>{const{config:n,...a}=o,l=gt(e,t),c=Be(l,n||{});return dt(Be(c,a))},Ln=h.createContext({isEnabled:!1}),ht=({children:e,config:o,configId:t,mode:n})=>{const a=o||(t?st[t]:null)||An,{themeMode:l}=i.useTheme(),c=n??l??a.metadata.defaultAppearance,s=h.useMemo(()=>({config:a,configId:a.metadata.id,isEnabled:!0}),[a]);return r.jsx(Ln.Provider,{value:s,children:r.jsx(i.ThemeProvider,{theme:a.theme,mode:c,transparentWrapper:!0,children:r.jsx("div",{"data-design-system":a.metadata.id,"data-appearance":c,style:{display:"contents"},children:e})})})},br=()=>h.useContext(Ln),Io=e=>{const{config:o}=br();return gt(e,o)},pe=(e,o)=>{const{config:t}=br();return $n(e,o,t)},_n=h.createContext({expandedItems:[],toggleItem:()=>{},isItemExpanded:()=>!1,type:"single",collapsible:!1,baseId:""}),Oc=({children:e,value:o})=>r.jsx(_n.Provider,{value:o,children:e}),Bn=()=>{const e=h.useContext(_n);if(!e)throw new Error("useAccordionContext must be used within an AccordionProvider");return e},Nc=({value:e,children:o,isDisabled:t=!1,views:n,...a})=>{var p;const{isItemExpanded:l,baseId:c}=Bn(),s=Io("accordion"),d=Be({item:(p=s.views)==null?void 0:p.container},n),g=l(e),m=`${c}-trigger-${e}`,f=`${c}-content-${e}`;return r.jsx(i.View,{borderWidth:1,borderStyle:"solid",borderColor:"color-gray-200",overflow:"hidden",opacity:t?.5:1,pointerEvents:t?"none":"auto","data-state":g?"open":"closed","data-disabled":t?"":void 0,...d==null?void 0:d.item,...a,children:h.Children.map(o,u=>h.isValidElement(u)?h.cloneElement(u,{...u.props,value:e,isExpanded:g,isDisabled:t,triggerId:m,contentId:f}):u)})},qc=({children:e,value:o,isExpanded:t,isDisabled:n,triggerId:a,contentId:l,views:c,asChild:s=!1,...d})=>{var y;const{toggleItem:g}=Bn(),m=Io("accordion"),f=Be({container:(y=m.views)==null?void 0:y.trigger},c),u={id:a,"aria-expanded":t,"aria-controls":l,"aria-disabled":n,"data-state":t?"open":"closed","data-disabled":n?"":void 0,onClick:()=>{o&&!n&&g(o)},padding:16,cursor:n?"not-allowed":"pointer",alignItems:"center",justifyContent:"space-between",width:"100%",style:{backgroundColor:"transparent"},...f==null?void 0:f.container,...d};if(s&&h.isValidElement(e)){const k=h.Children.only(e);return h.cloneElement(k,{...u,...k.props})}return r.jsxs(i.Horizontal,{...u,children:[e,r.jsx(i.View,{width:24,height:24,display:"flex",alignItems:"center",justifyContent:"center",transition:"transform 0.2s ease",transform:t?"rotate(180deg)":"rotate(0deg)",...f==null?void 0:f.icon,children:r.jsx("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:r.jsx("path",{d:"M16.59 8.59L12 13.17L7.41 8.59L6 10L12 16L18 10L16.59 8.59Z",fill:"currentColor"})})})]})},Uc=({children:e,isExpanded:o,isDisabled:t,triggerId:n,contentId:a,views:l,...c})=>{var S;const s=Io("accordion"),d=Be({container:(S=s.views)==null?void 0:S.content},l),g=260,m=h.useRef(null),f=h.useRef(null),[p,u]=h.useState(!!o),[y,k]=h.useState(o?"none":"0px"),[x,C]=h.useState(o?1:0);return h.useEffect(()=>()=>{f.current&&clearTimeout(f.current)},[]),h.useEffect(()=>{var v;if(f.current&&(clearTimeout(f.current),f.current=null),o){u(!0),requestAnimationFrame(()=>{var I;const b=((I=m.current)==null?void 0:I.scrollHeight)??0;k(`${b}px`),C(1)});return}const w=((v=m.current)==null?void 0:v.scrollHeight)??0;k(`${w}px`),C(1),requestAnimationFrame(()=>{k("0px"),C(0)}),f.current=setTimeout(()=>{u(!1)},g)},[o,e]),h.useEffect(()=>{var v;if(!o||!p)return;const w=((v=m.current)==null?void 0:v.scrollHeight)??0;k(`${w}px`)},[e,o,p]),p?r.jsx(i.View,{id:a,role:"region","aria-labelledby":n,overflow:"hidden",maxHeight:y,opacity:x,transition:`max-height ${g}ms cubic-bezier(0.22, 1, 0.36, 1), opacity ${g}ms ease`,"data-state":o?"open":"closed","data-disabled":t?"":void 0,style:{backgroundColor:"transparent"},...d==null?void 0:d.container,...c,children:r.jsx(i.View,{ref:m,padding:16,children:e})}):null},Gc=({children:e,shape:o="rounded",variant:t="default",views:n,baseId:a,type:l,collapsible:c,themeMode:s,...d})=>r.jsx(i.Vertical,{width:"100%","data-orientation":"vertical",...Ac[o],...Ec[t],...n==null?void 0:n.container,...d,children:e}),De=e=>{const o=pe("accordion",e),{children:t,type:n="single",value:a,defaultValue:l,onValueChange:c,collapsible:s=!1,shape:d="rounded",variant:g="default",views:m,...f}=o,p=Array.isArray(l)?l:l?[l]:void 0,u=Vc({type:n,value:a,defaultValue:l??p,onValueChange:c,collapsible:s});return r.jsx(Oc,{value:{expandedItems:u.expandedItems,toggleItem:u.toggleItem,isItemExpanded:u.isItemExpanded,type:u.type,collapsible:u.collapsible,baseId:u.baseId},children:r.jsx(Gc,{shape:d,variant:g,views:m,baseId:u.baseId,type:u.type,collapsible:u.collapsible,...f,children:t})})};De.Item=Nc,De.Trigger=qc,De.Content=Uc;const Yc=({isOpen:e,defaultOpen:o=!1,value:t,defaultValue:n,isMulti:a=!1,onOpenChange:l,onClose:c})=>{const s=typeof e=="boolean",d=t!==void 0,g=n??(a?[]:""),[m,f]=h.useState(o),[p,u]=h.useState(g),y=s?!!e:m,k=d?t:p,x=h.useCallback(w=>{s||f(w),l==null||l(w),w||c==null||c()},[s,c,l]),C=h.useCallback(()=>{x(!1)},[x]),S=h.useCallback(w=>{d||u(w)},[d]);return{isSheetOpen:y,selectedValue:k,setSelectedValue:S,closeSheet:C}},ft=({children:e,containerId:o="portal-root"})=>{const[t,n]=h.useState(null);return h.useEffect(()=>{let a=document.getElementById(o),l=!1;return a||(l=!0,a=document.createElement("div"),a.setAttribute("id",o),document.body.appendChild(a)),n(a),()=>{l&&a&&a.parentNode&&a.childNodes.length===0&&a.parentNode.removeChild(a)}},[o]),t?Pc.createPortal(e,t):null},mt=new Map,Kc=(e,o,t)=>(mt.has(e)||mt.set(e,h.lazy(()=>import("lucide-react/dynamicIconImports").then(n=>{const a=n.default[e];return a?a():{default:()=>r.jsx(r.Fragment,{children:o||t})}}))),mt.get(e)),On=h.memo(({widthHeight:e,color:o="currentColor",transform:t,orientation:n="up",children:a,...l})=>r.jsx(i.View,{widthHeight:e,color:o,display:"flex",alignItems:"center",justifyContent:"center",transform:t||(n==="left"?"rotate(-90deg)":n==="right"?"rotate(90deg)":n==="up"?"rotate(0deg)":n==="down"?"rotate(180deg)":"none"),...l,children:a})),xr=h.memo(({name:e="circle",widthHeight:o=24,color:t="currentColor",filled:n=!1,strokeWidth:a=1,size:l,children:c,fallback:s,...d})=>{const{getColor:g}=i.useTheme(),m=l||o,f=h.useMemo(()=>{const y=g(t);return{fill:n?y:"none",stroke:y,strokeWidth:a,strokeLinecap:"round",strokeLinejoin:"round"}},[n,t,a,g]);if(!e)return r.jsx(On,{widthHeight:o,color:t,...d,children:c});const p=e.toLowerCase().replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase(),u=Kc(p,s,c);return r.jsx(On,{widthHeight:m,color:t,...d,children:r.jsx(h.Suspense,{fallback:s||null,children:r.jsx(u,{size:m,...f})})})}),G=(e,o={})=>{const t=n=>r.jsx(xr,{name:e,...o,...n});return t.displayName=`${e}Icon`,t},Xc=G("user",{filled:!1}),Jc=G("circle-help",{filled:!1}),Qc=G("folder",{filled:!1}),he=G("chevron-up",{filled:!1}),Zc=G("grip-vertical",{filled:!1}),go=G("file",{filled:!1}),Rc=G("video",{filled:!1}),es=G("image",{filled:!1}),Fo=G("volume",{filled:!1}),os=G("twitter",{filled:!1}),rs=G("x",{filled:!1}),ts=G("twitch",{filled:!1}),He=G("x",{filled:!1,strokeWidth:2}),ns=G("instagram",{filled:!1}),as=G("youtube",{filled:!1}),ls=G("facebook",{filled:!1}),is=G("linkedin",{filled:!1}),cs=G("at-sign",{filled:!1}),Nn=G("minus",{filled:!1}),Re=G("info",{filled:!1}),qn=G("play",{filled:!1}),ss=G("pause",{filled:!1}),ds=G("heart",{filled:!1}),gs=G("star",{filled:!1}),hs=G("save",{filled:!1}),pt=G("triangle-alert",{filled:!1}),fs=G("battery",{filled:!1}),ms=G("bookmark",{filled:!1}),ps=G("cloud",{filled:!1}),us=G("copy",{filled:!1}),kr=G("trash",{filled:!1}),ys=kr,bs=G("edit",{filled:!1}),ut=G("mic",{filled:!1}),Cr=G("square",{filled:!1}),yt=G("send",{filled:!1}),bt=G("loader",{filled:!1}),Ko=G("paperclip",{filled:!1}),wr=G("search",{filled:!1}),xs=G("home",{filled:!1}),Un=G("settings",{filled:!1}),ks=G("download",{filled:!1}),Gn=G("share",{filled:!1}),Xo=G("check",{filled:!1}),Cs=G("plus",{filled:!1}),xt=G("eye-off",{filled:!1}),kt=G("eye",{filled:!1}),ws=G("lock",{filled:!1}),Ss=G("user",{filled:!1}),Yn=G("external-link",{filled:!1}),Ct=G("check-circle",{filled:!1}),Sr=G("alert-circle",{filled:!1}),vs=G("bell",{filled:!1}),Ts=G("file-text",{filled:!1}),Is=G("bar-chart",{filled:!1}),Fs=G("moon",{filled:!1}),Kn=G("panel-left",{filled:!1}),wt=G("upload",{filled:!1}),zs=Xo,Ms=e=>r.jsx(he,{orientation:"left",...e}),Ws=G("zoom-out",{filled:!1}),Hs=G("type",{filled:!1}),js=G("shapes",{filled:!1}),Ps=G("rotate-cw",{filled:!1}),Vs=G("gift",{filled:!1}),As=G("shield",{filled:!1}),Es=G("log-out",{filled:!1}),Ds=G("power",{filled:!1}),$s=G("link",{filled:!1}),Ls=G("layout",{filled:!1}),_s=G("zap",{filled:!1}),Bs=G("credit-card",{filled:!1}),Os=G("more-horizontal",{filled:!1}),Ns=kr,qs=G("filter",{filled:!1}),Us=G("calendar",{filled:!1}),Gs=G("clock",{filled:!1}),Ys=G("map-pin",{filled:!1}),Ks=G("menu",{filled:!1}),Xs=G("refresh-cw",{filled:!1}),Js=G("printer",{filled:!1}),Qs=G("wand",{filled:!1}),Zs=G("thumbs-down",{filled:!1}),Rs=G("thumbs-up",{filled:!1}),ed=G("camera",{filled:!1}),od=G("bluetooth",{filled:!1}),rd=G("unlock",{filled:!1}),td=G("wifi",{filled:!1}),nd=G("arrow-right",{filled:!1}),ad=G("arrow-up",{filled:!1}),ld=G("loader",{filled:!1}),id=G("sliders-horizontal",{filled:!1}),cd=G("crop",{filled:!1}),sd=G("zoom-in",{filled:!1}),dd=G("grip-horizontal",{filled:!1}),Xn=G("mouse-pointer-2",{filled:!1}),gd={sm:{minHeight:44,paddingVertical:10,paddingHorizontal:16},md:{minHeight:52,paddingVertical:12,paddingHorizontal:18},lg:{minHeight:60,paddingVertical:14,paddingHorizontal:20}},zo={sm:{label:14,description:12},md:{label:16,description:13},lg:{label:18,description:14}},Jn=(e,o)=>e.id??e.value??`action-sheet-item-${o}`,Qn=e=>e.value??e.id,Zn=e=>e.disabled||e.isDisabled||e.divider,hd=(e,o)=>{if(typeof e.selected=="boolean")return e.selected;const t=Qn(e);return t?Array.isArray(o)?o.includes(t):o===t:!1},fd=({isSheetOpen:e,closeSheet:o,selectedValue:t,setSelectedValue:n,isClosePrevented:a=!1,dismissOnBackdropPress:l=!0,title:c,description:s,header:d,children:g,items:m=[],isMulti:f=!1,closeOnSelect:p,onSelect:u,onChange:y,showCancel:k=!1,cancelLabel:x="Cancel",onCancel:C,showHandle:S=!0,size:w="md",maxHeight:v="88vh",views:b,animationType:I,...T})=>{if(!e)return null;const P=()=>{a||o()},E=()=>{l&&P()},D=()=>{C==null||C(),P()},z=A=>{var j;if(Zn(A))return;const W=Qn(A);let H=t;if(W){if(f){const M=Array.isArray(t)?t:t?[t]:[];H=M.includes(W)?M.filter(L=>L!==W):[...M,W]}else H=W;n(H),u==null||u(W,A),y==null||y(H,A)}(j=A.onPress)==null||j.call(A,A),(A.closeOnSelect??p??!f)&&P()};return r.jsx(ft,{children:r.jsx(i.View,{position:"fixed",top:0,right:0,bottom:0,left:0,zIndex:9999,backgroundColor:"color-dark-50-360",display:"flex",justifyContent:"flex-end",onClick:E,...b==null?void 0:b.overlay,children:r.jsxs(i.Vertical,{width:"100%",maxWidth:520,maxHeight:v,marginHorizontal:"auto",backgroundColor:"color-white",borderTopLeftRadius:24,borderTopRightRadius:24,paddingTop:8,paddingBottom:12,overflow:"hidden",boxShadow:"0 -18px 48px rgba(15, 23, 42, 0.18)",onClick:A=>A.stopPropagation(),...b==null?void 0:b.container,...b==null?void 0:b.sheet,...T,children:[S&&r.jsx(i.View,{width:36,height:4,borderRadius:999,backgroundColor:"color-gray-300",alignSelf:"center",marginTop:4,marginBottom:8,...b==null?void 0:b.handle}),(c||s)&&r.jsxs(i.Vertical,{paddingHorizontal:20,paddingTop:6,paddingBottom:12,gap:4,...b==null?void 0:b.header,children:[c&&r.jsx(i.Text,{fontSize:18,lineHeight:24,fontWeight:"600",color:"color-gray-900",...b==null?void 0:b.title,children:c}),s&&r.jsx(i.Text,{fontSize:13,lineHeight:18,color:"color-gray-500",...b==null?void 0:b.description,children:s})]}),d,r.jsxs(i.Vertical,{overflowY:"auto",paddingBottom:4,...b==null?void 0:b.content,children:[m.map((A,W)=>{if(A.divider)return r.jsx(i.View,{height:1,backgroundColor:"color-gray-200",marginVertical:6,...b==null?void 0:b.divider},Jn(A,W));const H=hd(A,t),V=Zn(A),j=V?"color-gray-400":A.destructive?"color-red-600":H?"theme-primary":"color-gray-900";return r.jsxs(i.Horizontal,{alignItems:"center",gap:12,opacity:V?.5:1,cursor:V?"not-allowed":"pointer",onClick:()=>z(A),...gd[w],...b==null?void 0:b.item,children:[A.icon&&r.jsx(i.View,{flexShrink:0,...b==null?void 0:b.itemIcon,children:A.icon}),r.jsxs(i.Vertical,{flex:1,gap:2,children:[typeof A.label=="string"?r.jsx(i.Text,{fontSize:zo[w].label,lineHeight:zo[w].label+6,fontWeight:H?"600":"400",color:j,...b==null?void 0:b.itemLabel,children:A.label}):A.label,A.description&&r.jsx(i.Text,{fontSize:zo[w].description,lineHeight:zo[w].description+5,color:"color-gray-500",...b==null?void 0:b.itemDescription,children:A.description})]}),H&&r.jsx(Xo,{widthHeight:18,color:"theme-primary",...b==null?void 0:b.itemIndicator})]},Jn(A,W))}),g]}),k&&r.jsx(i.View,{marginTop:8,paddingHorizontal:12,paddingTop:8,borderTopWidth:1,borderTopColor:"color-gray-200",children:r.jsx(i.Horizontal,{minHeight:52,alignItems:"center",justifyContent:"center",borderRadius:14,backgroundColor:"color-gray-100",cursor:"pointer",onClick:D,...b==null?void 0:b.cancelButton,children:r.jsx(i.Text,{fontSize:zo[w].label,lineHeight:zo[w].label+6,fontWeight:"600",color:"color-gray-900",...b==null?void 0:b.cancelLabel,children:x})})})]})})})},md=e=>{const o=Yc(e);return r.jsx(fd,{...e,...o})},pd=e=>{const o=e==="dark";return{default:{container:{backgroundColor:"color-gray-50",borderColor:"color-gray-200",boxShadow:o?"0 1px 3px rgba(0, 0, 0, 0.3)":"0 1px 2px rgba(0, 0, 0, 0.05)"},content:{color:"color-gray-700"},icon:{color:"color-gray-500"}},info:{container:{backgroundColor:"color-blue-50",borderColor:"color-blue-200",boxShadow:o?"0 1px 3px rgba(29, 78, 216, 0.25)":"0 1px 2px rgba(59, 130, 246, 0.05)"},content:{color:"color-blue-700"},icon:{color:"color-blue-500"}},success:{container:{backgroundColor:"color-green-50",borderColor:"color-green-200",boxShadow:o?"0 1px 3px rgba(34, 197, 94, 0.2)":"0 1px 2px rgba(34, 197, 94, 0.05)"},content:{color:"color-green-700"},icon:{color:"color-green-500"}},error:{container:{backgroundColor:"color-red-50",borderColor:"color-red-200",boxShadow:o?"0 1px 3px rgba(239, 68, 68, 0.2)":"0 1px 2px rgba(239, 68, 68, 0.05)"},content:{color:"color-red-700"},icon:{color:"color-red-500"}},warning:{container:{backgroundColor:"color-orange-50",borderColor:"color-orange-200",boxShadow:o?"0 1px 3px rgba(249, 115, 22, 0.2)":"0 1px 2px rgba(249, 115, 22, 0.05)"},content:{color:"color-orange-700"},icon:{color:"color-orange-500"}}}},ud={default:void 0,info:"status",success:"status",error:"alert",warning:"alert"},yd=h.memo(({icon:e,title:o="",views:t,description:n="",variant:a="default",themeMode:l,children:c,...s})=>{const{themeMode:d}=i.useTheme(),g=l||d,m=h.useMemo(()=>pd(g),[g]),f=()=>{var y;if(e)return e;const u={size:20,color:((y=t==null?void 0:t.icon)==null?void 0:y.color)??m[a].icon.color};switch(a){case"info":return r.jsx(Re,{...u});case"success":return r.jsx(Ct,{...u});case"error":return r.jsx(Sr,{...u});case"warning":default:return r.jsx(pt,{...u})}};return r.jsxs(i.Horizontal,{role:ud[a],gap:12,padding:"12px 16px",flexWrap:"nowrap",alignItems:"flex-start",borderRadius:"8px",borderWidth:"1px",borderStyle:"solid",borderColor:m[a].container.borderColor,backgroundColor:m[a].container.backgroundColor,boxShadow:m[a].container.boxShadow,transition:"background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease",...t==null?void 0:t.container,...s,children:[r.jsx(i.View,{alignSelf:"flex-start",marginTop:"2px",...t==null?void 0:t.icon,children:f()}),r.jsxs(i.Vertical,{gap:4,children:[o?r.jsx(i.Text,{fontSize:"14px",fontWeight:"600",lineHeight:"20px",color:m[a].content.color,...t==null?void 0:t.title,children:o}):null,r.jsx(i.Text,{fontSize:"12px",fontWeight:"400",lineHeight:"16px",color:m[a].content.color,...t==null?void 0:t.description,children:n||c})]})]})}),St=e=>{const o=pe("alert",e);return r.jsx(yd,{...o})},bd=({ratio:e=16/9,children:o,views:t,...n})=>r.jsx(i.View,{width:"100%",position:"relative",overflow:"hidden",paddingTop:`${1/e*100}%`,borderRadius:8,...n,...t==null?void 0:t.center,children:r.jsx(i.View,{position:"absolute",top:0,right:0,bottom:0,left:0,...t==null?void 0:t.view,children:o})}),Rn=({ratio:e,children:o,...t})=>r.jsx(bd,{ratio:e,...t,children:o});function xd(e,o,t){return Math.min(Math.max(e,o),t)}const kd=({bars:e,isPaused:o,...t})=>{const a=[6,16,23,24,18,9,14,22,24,20,11,12,20,24,21,13,9,19,24,23,16,7,17,23,23,18,8,15,22,24,20,10];return r.jsx(i.Horizontal,{alignItems:"center",minWidth:120,gap:2,height:24,width:"100%",maxWidth:"100%",...t,children:e.map((l,c)=>r.jsx(i.View,{width:3,borderRadius:2,backgroundColor:o?"color-gray-300":l>=0?"theme-primary":"color-gray-300",style:{height:`${l>=0?xd(l*300,6,24):a[c%a.length]}px`}},c))})},vt=({analyserNode:e,isPaused:o,...t})=>{const n=h.useRef(null),a=60,l=32,[c,s]=h.useState([]);return h.useEffect(()=>{if(!e){s(Array(a).fill(-1));return}const d=e.frequencyBinCount,g=new Uint8Array(d),m=()=>{e.getByteTimeDomainData(g);let f=0;for(let u=0;u<d;u++){const y=(g[u]-128)/128;f+=y*y}const p=Math.sqrt(f/d);h.startTransition(()=>{s(u=>{const k=[...u,p].slice(-a);return k.length<a?[...Array(a-k.length).fill(-1),...k]:k})})};return n.current=setInterval(m,l),()=>{n.current&&clearInterval(n.current)}},[e]),r.jsx(kd,{bars:c,isPaused:o,...t})},vr=vo.create(e=>({visible:!1,title:"",subtitle:"",variant:"info",isClosable:!1,views:{},action:()=>{},actionText:"",showIcon:!1,timeout:3e3,show:(o,t="",n="",a,l,c,s,d,g)=>e({visible:!0,variant:o,title:t,subtitle:n,isClosable:a,views:l,action:c,actionText:s,showIcon:d,timeout:g}),hide:()=>e({visible:!1})})),ea=(e,o,t,n)=>{vr.getState().show(e,o,t,n==null?void 0:n.isClosable,n==null?void 0:n.views,n==null?void 0:n.action,n==null?void 0:n.actionText,n==null?void 0:n.showIcon,n==null?void 0:n.timeout)},oa=()=>{vr.getState().hide()},Cd={info:{container:{backgroundColor:"color-white",border:"rgba(191, 219, 254, 0.95)"},icon:{color:"theme-primary",name:"InformationIcon"},content:{color:"color-gray-900"},close:{color:"color-gray-500",name:"CloseIcon"}},success:{container:{backgroundColor:"#F0FDF4",border:"#BBF7D0"},icon:{color:"#16A34A",name:"SuccessIcon"},content:{color:"#14532D"},close:{color:"#15803D",name:"CloseIcon"}},error:{container:{backgroundColor:"#FEF2F2",border:"#FECACA"},icon:{color:"#DC2626",name:"ErrorIcon"},content:{color:"#7F1D1D"},close:{color:"#B91C1C",name:"CloseIcon"}},warning:{container:{backgroundColor:"#FFF7ED",border:"#FED7AA"},icon:{color:"#EA580C",name:"WarningIcon"},content:{color:"#9A3412"},close:{color:"#C2410C",name:"CloseIcon"}}},ra=({variant:e,hide:o,title:t,subtitle:n,theme:a,action:l,actionText:c,showIcon:s=!1,isClosable:d=!1,timeout:g=3e3,views:m})=>{var C,S;h.useEffect(()=>{if(g&&!d){const w=setTimeout(()=>{o()},g);return()=>{clearTimeout(w)}}},[]);const f=a??Cd,p=!!(l&&c),u={borderWidth:1,borderStyle:"solid",borderRadius:12,borderColor:`${f[e].container.border}`,boxShadow:"0 8px 24px rgba(15, 23, 42, 0.06)"},y={info:"#3b82f6",success:"#4ade80",warning:"#f97316",error:"#ef4444"}[e],k={info:r.jsx(Re,{widthHeight:24,color:y,...m==null?void 0:m.icon}),success:r.jsx(Ct,{widthHeight:24,color:y,...m==null?void 0:m.icon}),warning:r.jsx(pt,{widthHeight:24,color:y,...m==null?void 0:m.icon}),error:r.jsx(Sr,{widthHeight:24,color:y,...m==null?void 0:m.icon})}[e],x=s&&k;return r.jsxs(i.Horizontal,{role:"messageContent",gap:12,width:"100%",maxWidth:520,flexWrap:"nowrap",position:"relative",alignItems:"flex-start",padding:"12px 14px",color:`${f[e].content.color}`,backgroundColor:`${f[e].container.backgroundColor}`,onClick:d?()=>{}:()=>{o()},...u,transition:"background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease",...m==null?void 0:m.container,children:[x&&k,r.jsxs(i.Vertical,{gap:4,width:"100%",children:[r.jsx(i.Text,{size:"md",weight:"semiBold",...m==null?void 0:m.title,children:t}),n&&r.jsx(i.Text,{size:"sm",lineHeight:"20px",color:f[e].content.color,...m==null?void 0:m.subtitle,children:n})]}),p&&r.jsx(i.View,{as:"button",type:"button",onClick:l,backgroundColor:"color-white",borderWidth:"1px",borderStyle:"solid",borderColor:f[e].container.border,borderRadius:"9999px",padding:"6px 12px",cursor:"pointer",transition:"background-color 0.2s ease, border-color 0.2s ease",...m==null?void 0:m.actionText,children:r.jsx(i.Text,{whiteSpace:"nowrap",size:"sm",weight:"semiBold",color:f[e].content.color,children:c})}),d&&r.jsx(i.View,{position:"absolute",zIndex:1e4,right:8,top:8,onClick:()=>{o()},cursor:"pointer",padding:"4px",borderRadius:"9999px",transition:"background-color 0.2s ease",...(C=m==null?void 0:m.closingIcon)==null?void 0:C.container,children:r.jsx(He,{widthHeight:16,color:f[e].close.color,...(S=m==null?void 0:m.closingIcon)==null?void 0:S.icon})})]})},wd=({container:e,theme:o,position:t="topRight"})=>{const{visible:n,title:a,variant:l,subtitle:c,isClosable:s,views:d,action:g,actionText:m,showIcon:f,timeout:p}=vr(),u={topLeft:{top:6,left:8},topRight:{top:6,right:8},bottomLeft:{bottom:8,left:6},bottomRight:{bottom:8,right:6}}[t],y=()=>r.jsx(ra,{variant:l,subtitle:c,show:n,title:a,theme:o,isClosable:s,views:d,action:g,actionText:m,showIcon:f,timeout:p,hide:()=>oa()}),k=e?h.cloneElement(e,{},y()):r.jsx(i.View,{position:"absolute",zIndex:1e4,...u,children:y()});return n?k:null},Sd=(e,o)=>{if(typeof document>"u")return;const t=document.createElement("video");t.preload="metadata",t.onloadedmetadata=()=>{t.currentTime=1},t.oncanplay=()=>{const n=document.createElement("canvas");n.width=t.videoWidth,n.height=t.videoHeight;const a=n.getContext("2d");if(a){a.drawImage(t,0,0,n.width,n.height);const l=n.toDataURL("image/jpeg");o(l)}URL.revokeObjectURL(t.src)},t.src=URL.createObjectURL(e)},vd=({maxSize:e=100*1024*1024,onFileSelect:o,onMultipleFileSelect:t,validateFile:n,thumbnail:a,multiple:l=!1,onError:c=s=>{ea("error","Error",s)}})=>{const s=h.useRef(null),d=h.useRef(null),[g,m]=h.useState(null),[f,p]=h.useState([]),[u,y]=h.useState(null),[k,x]=h.useState(null),[C,S]=h.useState(a||null),w=h.useCallback(b=>{const I=b.target.files;if(y(null),!I||I.length===0){c("No file selected"),y("No file selected");return}if(l){const T=Array.from(I),P=[];for(const E of T){if(E.size>e){c(`File ${E.name} exceeds ${Math.round(e/(1024*1024))}MB.`),y(`File ${E.name} exceeds ${Math.round(e/(1024*1024))}MB.`);continue}if(n){const D=n(E);if(D){c(`${E.name}: ${D}`),y(`${E.name}: ${D}`);continue}}P.push(E)}P.length>0&&(p(P),t&&t(P))}else{const T=I[0];if(T.size>e){c(`File exceeds ${Math.round(e/(1024*1024))}MB.`),y(`File exceeds ${Math.round(e/(1024*1024))}MB.`);return}if(n){const P=n(T);if(P){c(P),y(P);return}}x(URL.createObjectURL(T)),T.type.startsWith("video/")&&Sd(T,S),o&&(m(T),o(T))}},[e,o,t,n,l]),v=()=>{const b=s.current;b&&typeof b.click=="function"&&b.click()};return h.useEffect(()=>()=>{typeof URL<"u"&&typeof URL.revokeObjectURL=="function"&&(k&&URL.revokeObjectURL(k),C&&URL.revokeObjectURL(C))},[k,C]),{previewUrl:k,thumbnailUrl:C,errorMessage:u,fileInputRef:s,videoRef:d,selectedFile:g,selectedFiles:f,handleFileChange:w,handleClick:v}},Td=({accept:e,isLoading:o=!1,progress:t=0,icon:n,text:a,previewUrl:l,thumbnailUrl:c,errorMessage:s,fileInputRef:d,videoRef:g,selectedFile:m,selectedFiles:f,handleFileChange:p,handleClick:u,multiple:y=!1,containerProps:k,errorMessageProps:x,progressProps:C,videoProps:S,imageProps:w,iconProps:v,textProps:b,fileType:I,previewUrl:T,renderError:P=({errorMessage:V,errorMessageProps:j,themeMode:M})=>r.jsx(i.Text,{color:"red",fontSize:12,marginTop:8,...j,...H==null?void 0:H.text,children:V}),renderText:E=({text:V,textProps:j})=>r.jsx(i.Text,{marginTop:8,...j,...H==null?void 0:H.text,children:V}),renderFile:D=({selectedFile:V,textProps:j})=>V?r.jsxs(i.Center,{marginTop:8,gap:10,flexDirection:"column",...H==null?void 0:H.container,children:[r.jsx(i.Text,{maxLines:2,...j,...H==null?void 0:H.text,children:V.name}),r.jsxs(i.Text,{...j,...H==null?void 0:H.text,children:["(",Math.round(V.size/1024)," KB)"]})]}):null,renderVideo:z=({selectedFile:V,videoRef:j,videoProps:M})=>r.jsx(i.View,{width:"100%",height:"100%",position:"relative",...H==null?void 0:H.view,children:r.jsx(i.View,{as:"video",width:"100%",height:"100%",src:V?URL.createObjectURL(V):void 0,style:{objectFit:"cover"},ref:j,...M,...H==null?void 0:H.view})}),renderImage:A=({previewUrl:V,imageProps:j})=>(console.log("Rendering image with URL:",V),r.jsx(i.View,{width:"100%",height:"100%",position:"relative",...H==null?void 0:H.view,children:r.jsx(i.Image,{src:V,alt:"Preview",width:"100%",height:"100%",objectFit:"cover",style:{maxHeight:"100%",maxWidth:"100%"},...j,...H==null?void 0:H.image})})),renderProgress:W=({progress:V,progressProps:j})=>r.jsxs(i.Horizontal,{gap:8,alignItems:"center",...j,...H==null?void 0:H.horizontal,children:[r.jsx(i.View,{height:4,backgroundColor:"color-black-100",width:"100%",borderRadius:2,...H==null?void 0:H.view,children:r.jsx(i.View,{height:4,width:`${V}%`,borderRadius:2,backgroundColor:"color-dark-50",...H==null?void 0:H.view})}),r.jsxs(i.Text,{fontSize:12,...H==null?void 0:H.text,children:[V,"%"]})]}),views:H={}})=>{const V=T||l;return r.jsxs(i.Center,{onClick:u,cursor:"pointer",border:"1px solid color-black-100",borderRadius:8,padding:16,flexDirection:"column",overflow:"hidden",position:"relative",height:m&&t===100?"200px":"auto",...k,...H==null?void 0:H.container,children:[t===100&&I==="image"&&V&&A({previewUrl:V,imageProps:w}),t===100&&I==="video"&&c&&z({selectedFile:m,thumbnailUrl:c,videoRef:g,videoProps:S,imageProps:w}),t===100&&I==="file"&&m&&D({selectedFile:m,textProps:b}),t<100&&(n||r.jsx(wt,{widthHeight:32,...v})),!o&&!m&&a&&E({text:a,textProps:b}),o&&W({progress:t,progressProps:C}),!o&&s&&P({errorMessage:s,errorMessageProps:x}),r.jsx(i.Input,{type:"file",ref:d,onChange:p,accept:e,multiple:y,style:{display:"none"},...H==null?void 0:H.view})]})},Tr=({accept:e="*/*",icon:o,text:t,maxSize:n,onFileSelect:a,onMultipleFileSelect:l,validateFile:c,isLoading:s=!1,progress:d=0,fileType:g,multiple:m=!1,...f})=>{const{previewUrl:p,thumbnailUrl:u,errorMessage:y,videoRef:k,fileInputRef:x,selectedFile:C,selectedFiles:S,handleFileChange:w,handleClick:v}=vd({maxSize:n,onFileSelect:a,onMultipleFileSelect:l,validateFile:c,multiple:m}),I=(()=>{if(g)return g;if(C)return C.type.startsWith("image/")?"image":C.type.startsWith("video/")?"video":"file"})();return r.jsx(Td,{handleClick:v,accept:e,isLoading:s,progress:d,icon:o,text:t,maxSize:n,onFileSelect:a,validateFile:c,errorMessage:y,handleFileChange:w,selectedFile:C,selectedFiles:S,videoRef:k,fileInputRef:x,previewUrl:p,thumbnailUrl:u,fileType:I,multiple:m,...f})};function Id(e){const o=Math.floor(e/60),t=e%60;return`${o}:${t.toString().padStart(2,"0")}`}function Fd({onAudio:e,recording:o,paused:t,audioBlob:n,analyserNode:a,duration:l,error:c,startRecording:s,stopRecording:d,pauseRecording:g,resumeRecording:m,resetRecording:f,handleFileChange:p,...u}){const[y,k]=h.useState(null);h.useEffect(()=>{if(n){const S=URL.createObjectURL(n);return k({url:S,label:`recording-${Date.now()}.webm`}),()=>{URL.revokeObjectURL(S)}}return()=>{}},[n]);const x=()=>{y!=null&&y.url&&URL.revokeObjectURL(y.url),k(null),f()},C=S=>{e(S),y!=null&&y.url&&URL.revokeObjectURL(y.url),k({url:URL.createObjectURL(S),label:S.name})};return r.jsxs(i.Vertical,{gap:"10px",width:"100%",...u,children:[r.jsxs(i.Horizontal,{gap:12,alignItems:"center",padding:"12px 14px",border:"1px solid color-gray-200",borderRadius:"12px",backgroundColor:"color-white",children:[r.jsx(Tr,{accept:"audio/*",icon:r.jsx(Ko,{widthHeight:16}),maxSize:100*1024*1024,onFileSelect:C,fileType:"file",multiple:!1,renderError:({errorMessage:S})=>null,views:{container:{width:"36px",height:"36px",cursor:"pointer",border:"1px solid color-gray-200",borderRadius:"10px",backgroundColor:"color-white",transition:"background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease",_hover:{backgroundColor:"color-gray-50",borderColor:"color-gray-300"}}},containerProps:{display:"flex",alignItems:"center",justifyContent:"center",borderRadius:"10px",width:"36px",height:"36px"},validateFile:S=>S.size>100*1024*1024?"File size exceeds 100MB limit":S.type.startsWith("audio/")?null:"Only audio files are allowed"}),r.jsx(i.View,{as:"button",type:"button",onClick:o?d:s,width:"36px",height:"36px",minWidth:"36px",display:"flex",alignItems:"center",justifyContent:"center",backgroundColor:"theme-primary",color:"color-white",borderRadius:"999px",border:"0",cursor:"pointer",transition:"background-color 0.2s ease, opacity 0.2s ease",_hover:{opacity:.92},children:o?r.jsx(Cr,{widthHeight:14,color:"color-white",filled:!1}):r.jsx(ut,{widthHeight:18,color:"color-white",filled:!1})}),r.jsx(i.View,{flex:1,minWidth:120,children:r.jsx(vt,{analyserNode:o?a:null,isPaused:!o||t})}),r.jsx(i.Text,{fontSize:"12px",lineHeight:"16px",color:"color-gray-500",whiteSpace:"nowrap",children:Id(l)})]}),y&&!o&&r.jsxs(i.Vertical,{gap:"8px",padding:"12px 14px",border:"1px solid color-gray-200",borderRadius:"12px",backgroundColor:"color-white",children:[r.jsxs(i.Horizontal,{alignItems:"center",justifyContent:"space-between",gap:8,children:[r.jsx(i.Text,{fontSize:"12px",lineHeight:"16px",color:"color-gray-500",children:y.label}),r.jsx(i.View,{as:"button",type:"button",onClick:x,width:"24px",height:"24px",display:"flex",alignItems:"center",justifyContent:"center",border:"0",backgroundColor:"transparent",color:"color-gray-500",cursor:"pointer",children:r.jsx(He,{widthHeight:14,color:"currentColor"})})]}),r.jsx(i.View,{as:"audio",controls:!0,src:y.url,width:"100%"})]}),c&&r.jsx(i.Text,{fontSize:"11px",lineHeight:"16px",color:"color-red-500",children:c})]})}function ta(){const[e,o]=h.useState(!1),[t,n]=h.useState(!1),[a,l]=h.useState(0),[c,s]=h.useState(null),[d,g]=h.useState(null),[m,f]=h.useState(null),p=h.useRef(null),u=h.useRef(null),y=h.useRef(null),k=h.useRef(null),x=h.useRef([]),C=h.useRef(null),S=typeof MediaRecorder<"u"&&MediaRecorder.isTypeSupported("audio/webm;codecs=opus")?"audio/webm;codecs=opus":"audio/webm",w=h.useCallback(()=>{p.current&&(p.current.state!=="inactive"&&p.current.stop(),p.current=null),k.current&&(k.current.getTracks().forEach(E=>E.stop()),k.current=null),u.current&&(u.current.close(),u.current=null),y.current&&(y.current.disconnect(),y.current=null),g(null),C.current&&(clearInterval(C.current),C.current=null)},[]),v=h.useCallback(async()=>{w(),s(null),l(0),x.current=[];try{const E=await navigator.mediaDevices.getUserMedia({audio:!0});k.current=E;const D=MediaRecorder.isTypeSupported(S)?S:void 0,z=new MediaRecorder(E,D?{mimeType:D}:void 0);p.current=z;const A=new(window.AudioContext||window.webkitAudioContext);u.current=A;const W=A.createMediaStreamSource(E),H=A.createAnalyser();H.fftSize=256,H.smoothingTimeConstant=.8,W.connect(H),y.current=H,g(H),z.ondataavailable=V=>{V.data.size>0&&x.current.push(V.data)},z.onstop=()=>{const V=new Blob(x.current,{type:z.mimeType||S});f(V),w()},z.start(),o(!0),n(!1),C.current=setInterval(()=>{l(V=>V+1)},1e3)}catch{s("Microphone access denied or unavailable."),w()}},[w]),b=h.useCallback(()=>{p.current&&p.current.state!=="inactive"&&p.current.stop(),o(!1),n(!1),C.current&&(clearInterval(C.current),C.current=null)},[]),I=h.useCallback(()=>{p.current&&p.current.state==="recording"&&(p.current.pause(),n(!0),C.current&&(clearInterval(C.current),C.current=null))},[]),T=h.useCallback(()=>{p.current&&p.current.state==="paused"&&(p.current.resume(),n(!1),C.current||(C.current=setInterval(()=>{l(E=>E+1)},1e3)))},[]),P=h.useCallback(()=>{w(),o(!1),n(!1),f(null),l(0),s(null),x.current=[]},[w]);return h.useEffect(()=>()=>w(),[w]),{recording:e,paused:t,audioBlob:m,analyserNode:d,duration:a,error:c,startRecording:v,stopRecording:b,pauseRecording:I,resumeRecording:T,resetRecording:P}}function zd(e){const{onAudio:o}=e,{recording:t,paused:n,audioBlob:a,analyserNode:l,duration:c,error:s,startRecording:d,stopRecording:g,pauseRecording:m,resumeRecording:f,resetRecording:p}=ta();return h.useEffect(()=>{if(a&&o){const y=new File([a],"recording.webm",{type:a.type||"audio/webm;codecs=opus"});o(y)}},[a,o]),{recording:t,paused:n,audioBlob:a,analyserNode:l,duration:c,error:s,startRecording:d,stopRecording:g,pauseRecording:m,resumeRecording:f,resetRecording:p,handleFileChange:y=>{var x;const k=(x=y.target.files)==null?void 0:x[0];k&&o&&o(k)}}}function Md(e){const o=zd(e);return r.jsx(Fd,{...e,...o})}const Wd=()=>{const[e,o]=h.useState(!1);return{imageError:e,setImageError:o}},Hd={xs:24,sm:32,md:44,lg:56,xl:72},Tt={container:{borderRadius:"50%",overflow:"hidden",borderWidth:"1px",borderStyle:"solid",borderColor:"color-gray-200",backgroundColor:"theme-primary",transition:"background-color 0.2s ease, border-color 0.2s ease, opacity 0.2s ease"},fallback:{fontWeight:"600",color:"color-white",letterSpacing:"-0.02em"},image:{objectFit:"cover",transition:"opacity 0.2s ease"}},jd=({src:e,size:o="md",fallback:t="IM",views:n,imageError:a,setImageError:l,onClick:c=()=>{},children:s})=>{const d=Hd[o],g={...Tt.image,...(n==null?void 0:n.image)||{}};return r.jsxs(i.Center,{"data-role":"avatar",width:d,height:d,...Tt.container,borderColor:a?"color-gray-400":"transparent",onClick:c,...n==null?void 0:n.container,children:[!a&&e?r.jsx(i.Image,{alt:"",src:e,style:g,width:d,height:d,onError:()=>l(!0)}):r.jsx(i.Text,{size:o,...Tt.fallback,...n==null?void 0:n.fallback,children:t}),s]})},na=e=>{const o=pe("avatar",e),{src:t,size:n,views:a,fallback:l,onClick:c,children:s}=o,{imageError:d,setImageError:g}=Wd();return r.jsx(jd,{src:t,size:n,views:a,fallback:l,imageError:d,setImageError:g,onClick:c,children:s})},Pd={xs:{minWidth:"16px",height:"16px",padding:"0 4px",fontSize:"9px",fontWeight:"600",lineHeight:"12px",letterSpacing:"-0.01em"},sm:{minWidth:"20px",height:"20px",padding:"0 6px",fontSize:"10px",fontWeight:"600",lineHeight:"14px",letterSpacing:"-0.01em"},md:{minWidth:"24px",height:"24px",padding:"0 8px",fontSize:"12px",fontWeight:"600",lineHeight:"16px",letterSpacing:"-0.01em"},lg:{minWidth:"28px",height:"28px",padding:"0 10px",fontSize:"14px",fontWeight:"600",lineHeight:"20px",letterSpacing:"-0.01em"},xl:{minWidth:"32px",height:"32px",padding:"0 12px",fontSize:"16px",fontWeight:"600",lineHeight:"24px",letterSpacing:"-0.01em"}},Vd={xs:{gap:"6px",padding:"3px 8px 3px 3px"},sm:{gap:"8px",padding:"4px 10px 4px 4px"},md:{gap:"12px",padding:"6px 16px 6px 6px"},lg:{gap:"12px",padding:"7px 18px 7px 7px"},xl:{gap:"14px",padding:"8px 20px 8px 8px"}},Ad={xs:{padding:"2px 6px",fontSize:"9px",lineHeight:"12px"},sm:{padding:"3px 8px",fontSize:"10px",lineHeight:"14px"},md:{padding:"6px 12px",fontSize:"11px",lineHeight:"14px"},lg:{padding:"7px 14px",fontSize:"12px",lineHeight:"16px"},xl:{padding:"8px 16px",fontSize:"13px",lineHeight:"18px"}},aa={xs:{fontSize:"11px",lineHeight:"14px"},sm:{fontSize:"12px",lineHeight:"16px"},md:{fontSize:"13px",lineHeight:"18px"},lg:{fontSize:"14px",lineHeight:"20px"},xl:{fontSize:"15px",lineHeight:"22px"}},Ed={square:0,rounded:"8px",pill:"9999px"},Dd={"top-right":{top:"4px",right:"4px",position:"absolute"},"top-left":{top:"4px",left:"4px",position:"absolute"},"bottom-right":{bottom:"4px",right:"4px",position:"absolute"},"bottom-left":{bottom:"4px",left:"4px",position:"absolute"}},$d=e=>({display:"inline-flex",height:"auto",minWidth:"auto",backgroundColor:"color-white-600",color:"color-gray-900",borderWidth:"1px",borderStyle:"solid",borderColor:"color-white",backdropFilter:"blur(12px)",boxShadow:"0 1px 2px rgba(15, 23, 42, 0.08)",transition:"background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease",_hover:{backgroundColor:"color-white-800",boxShadow:"0 2px 8px rgba(15, 23, 42, 0.1)"}}),Ld=e=>({filled:{backgroundColor:"theme-primary",color:"color-white",borderWidth:"1px",borderStyle:"solid",borderColor:"theme-primary",transition:"background-color 0.2s ease, opacity 0.2s ease",_hover:{opacity:.9},_active:{opacity:.95}},outline:{borderWidth:"1px",borderStyle:"solid",borderColor:"theme-primary",color:"theme-primary",style:{backgroundColor:"transparent"},transition:"border-color 0.2s ease, opacity 0.2s ease",_hover:{opacity:.9},_active:{opacity:.95}},link:{borderWidth:0,borderStyle:"none",borderColor:"theme-primary",color:"theme-primary",textDecoration:"underline",style:{backgroundColor:"transparent",textUnderlineOffset:"2px",textDecorationThickness:"1px"},transition:"opacity 0.2s ease",_hover:{opacity:.8}},ghost:{color:"color-gray-500",borderWidth:0,borderStyle:"solid",borderColor:"color-gray-500",style:{backgroundColor:"transparent"},transition:"background-color 0.2s ease, color 0.2s ease",_hover:{backgroundColor:"color-gray-100"}}}),la=e=>({default:{indicator:{backgroundColor:"color-gray-400"},label:{color:"inherit"}},info:{indicator:{backgroundColor:"color-blue-500"},label:{color:"inherit"}},success:{indicator:{backgroundColor:"color-green-500"},label:{color:"inherit"}},warning:{indicator:{backgroundColor:"color-orange-500"},label:{color:"inherit"}},error:{indicator:{backgroundColor:"color-red-500"},label:{color:"inherit"}}}),_d=h.memo(({content:e,children:o,icon:t,pastil:n,pastilContent:a,action:l,position:c,shape:s="pill",variant:d="filled",size:g="md",isAuto:m=!1,views:f,themeMode:p,...u})=>{const{themeMode:y}=i.useTheme(),k=p||y,x=h.useMemo(()=>Ld()[d],[k,d]),C=h.useMemo(()=>$d(),[k]),S=h.useMemo(()=>la(),[k]),w=a!=null,v=l!=null,b=w||v,I=o??e,T=I!=null,P=m&&typeof I=="string"&&/^(color|theme|light|dark)-/.test(I)?I:void 0,E=h.useMemo(()=>{const z={width:"fit-content",display:"flex",flexDirection:"row",alignItems:"center",justifyContent:"center",gap:"6px",borderRadius:Ed[s],...Pd[g],...x,...b?Vd[g]:{},...b?C:{},...c?Dd[c]:{},...f==null?void 0:f.container};return d!=="filled"&&!b&&(x.color!==void 0&&(z.color=x.color),x.borderColor!==void 0&&(z.borderColor=x.borderColor),x.backgroundColor!==void 0&&(z.backgroundColor=x.backgroundColor),x&&x.style&&(z.style={...z.style||{},...x.style})),P&&(z.backgroundColor=P,z.borderColor=P,z.color="color-white"),z},[s,g,d,x,b,C,c,P,f==null?void 0:f.container]);let D="currentColor";return typeof n=="string"?n in S?D=S[n].indicator.backgroundColor:D=n:n===!0&&(D="color-green-500",d==="filled"&&(D="color-white")),r.jsxs(i.Center,{"data-role":"badge",...E,...u,children:[t&&r.jsx(i.View,{"data-role":"badge-icon",...f==null?void 0:f.icon,children:t}),w&&r.jsx(i.Text,{"data-role":"badge-pastil-content",backgroundColor:"color-gray-900",borderRadius:"9999px",color:"color-white",fontWeight:"700",letterSpacing:0,textTransform:"uppercase",whiteSpace:"nowrap",...Ad[g],...f==null?void 0:f.pastilContent,children:a}),n&&r.jsx(i.View,{"data-role":"badge-pastil",width:"6px",height:"6px",borderRadius:"50%",backgroundColor:D,...f==null?void 0:f.pastil}),T&&r.jsx(i.Text,{"data-role":"badge-text",color:b?"color-gray-900":E.color,fontWeight:b?"700":"600",textAlign:"center",letterSpacing:b?0:"0.02em",whiteSpace:b?"nowrap":void 0,...b?aa[g]:{},...f==null?void 0:f.text,children:I}),v&&r.jsx(i.Text,{"data-role":"badge-action",color:"color-gray-400",fontWeight:"500",letterSpacing:0,whiteSpace:"nowrap",...aa[g],...f==null?void 0:f.action,children:l})]})}),Fe=e=>{const o=pe("badge",e);return r.jsx(_d,{...o})},Bd={xs:12,sm:14,md:16,lg:18,xl:20},Od=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,It=h.forwardRef(({children:e,href:o,iconSize:t="sm",underline:n="default",isExternal:a=!1,views:l={},to:c,isHovered:s,setIsHovered:d,_hover:g,...m},f)=>r.jsxs(i.Element,{as:"a",ref:f,href:o,display:"inline-flex",gap:3,alignItems:"center",flexWrap:"nowrap",color:"inherit",textDecoration:n==="underline"?"underline":"none",_hover:n==="hover"?{textDecoration:"underline",...g}:g,...a?{target:"_blank",rel:"noopener noreferrer"}:{},...l.text,...m,children:[e,a&&r.jsx(Yn,{widthHeight:Bd[t]})]}));It.displayName="LinkAnchor";const ia=h.forwardRef(({to:e="/",onClick:o,...t},n)=>{const a=it.useHref(e),l=it.useNavigate(),c=s=>{o==null||o(s),!(s.defaultPrevented||s.button!==0||t.target&&t.target!=="_self"||s.metaKey||s.altKey||s.ctrlKey||s.shiftKey)&&(s.preventDefault(),l(e))};return r.jsx(It,{...t,to:e,href:a,onClick:c,ref:n})});ia.displayName="RouterLinkAnchor";const ca=h.forwardRef((e,o)=>{const t=it.useInRouterContext(),{href:n,to:a="/",isExternal:l}=e;return t&&!l&&n==null&&!Od.test(a)?r.jsx(ia,{...e,ref:o}):r.jsx(It,{...e,href:n??a,ref:o})});ca.displayName="LinkView";const sa=h.forwardRef((e,o)=>r.jsx(ca,{ref:o,...e}));sa.displayName="Link";const Ft=sa,zt={xs:14,sm:18,md:22,lg:26,xl:30},Mt={fast:50,normal:100,slow:300},Nd=e=>typeof e=="string"&&(/^(#|rgb\(|rgba\(|hsl\(|hsla\(|var\()/.test(e)||["black","currentColor","inherit","transparent","white"].includes(e)),qd=({size:e="md",speed:o="normal",color:t="theme-loading",themeMode:n,...a})=>{const{getColor:l,themeMode:c}=i.useTheme(),s=l(t,{themeMode:n||c}),d=typeof e=="number"?e:zt[e],[g,m]=h.useState(0);return h.useEffect(()=>{const f=setInterval(()=>{m(p=>p+45)},Mt[o]);return()=>clearInterval(f)},[o]),r.jsxs(i.View,{as:"svg",xmlns:"http://www.w3.org/2000/svg",width:`${d}px`,height:`${d}px`,viewBox:"0 0 24 24",fill:"none",stroke:s,strokeWidth:"1",strokeLinecap:"round",strokeLinejoin:"round",style:{transform:`rotate(${g}deg)`},...a,children:[r.jsx("g",{id:"SVGRepo_bgCarrier",strokeWidth:"0"}),r.jsx("g",{id:"SVGRepo_tracerCarrier",strokeLinecap:"round",strokeLinejoin:"round"}),r.jsx("g",{id:"SVGRepo_iconCarrier",children:r.jsx("path",{d:"M21 12a9 9 0 11-6.219-8.56"})})]})},Ud=({size:e="md",speed:o="normal",color:t="theme-loading",themeMode:n,...a})=>{const{getColor:l,themeMode:c}=i.useTheme(),s=l(t,{themeMode:n||c}),d=typeof e=="number"?e:zt[e],[g,m]=h.useState(0);return h.useEffect(()=>{const f=setInterval(()=>{m(p=>p+45)},Mt[o]);return()=>clearInterval(f)},[o]),r.jsxs(i.View,{as:"svg",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 50 50",width:`${d}px`,height:`${d}px`,style:{transform:`rotate(${g}deg)`},...a,children:[r.jsx("circle",{cx:"10",cy:"25",r:"4",fill:s}),r.jsx("circle",{cx:"25",cy:"25",r:"4",fill:s}),r.jsx("circle",{cx:"40",cy:"25",r:"4",fill:s})]})},Gd=({size:e="md",speed:o="normal",color:t="theme-loading",themeMode:n,...a})=>{const{getColor:l,themeMode:c}=i.useTheme(),s=l(t,{themeMode:n||c}),d=typeof e=="number"?e:zt[e],[g,m]=h.useState(0);return h.useEffect(()=>{const f=setInterval(()=>{m(p=>p+45)},Mt[o]);return()=>clearInterval(f)},[o]),r.jsx(i.View,{as:"svg",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 50 50",width:`${d}px`,height:`${d}px`,style:{transform:`rotate(${g}deg)`},...a,children:r.jsx("circle",{cx:"25",cy:"25",r:"20",fill:"none",stroke:s,strokeWidth:"5",strokeDasharray:"1,10"})})},Yd=({size:e,children:o,textColor:t,loaderColor:n,type:a="default",speed:l="normal",textPosition:c="right",views:s,...d})=>{const{getColor:g}=i.useTheme(),m=u=>Nd(u)?u:g(u||"theme-loading");n=m(n||d.color||"theme-loading"),t=m(t||d.color||"theme-loading");const f={size:e,speed:l,color:n},p={default:r.jsx(qd,{...f}),dotted:r.jsx(Ud,{...f}),quarter:r.jsx(Gd,{...f})};return r.jsxs(i.Center,{gap:10,flexDirection:c==="top"||c==="bottom"?"column":"row",...d,...s==null?void 0:s.container,children:[(c==="left"||c==="top")&&o&&r.jsx(i.View,{color:t,...s==null?void 0:s.text,children:o}),p[a],(c==="right"||c==="bottom")&&o&&r.jsx(i.View,{color:t,...s==null?void 0:s.text,children:o})]})},eo=e=>{const o=pe("loader",e);return r.jsx(Yd,{...o})},Kd=/^(color|theme|light|dark)-/,Xd=e=>Kd.test(e),Jd=e=>{const o=e.split("-"),t=parseInt(o[o.length-1],10),n=e.startsWith("theme-")?3:4;return o.length>=n&&!isNaN(t)&&t>=0&&t<=1e3?o.slice(0,-1).join("-"):e},Ir=(e,o)=>Xd(e)?`${Jd(e)}-${o}`:`color-mix(in srgb, ${e} ${Math.round(o/10)}%, transparent)`,da={xs:{minHeight:24,paddingHorizontal:12,paddingVertical:5,fontSize:10,fontWeight:500,lineHeight:12,letterSpacing:"-0.01em"},sm:{minHeight:32,paddingHorizontal:16,paddingVertical:7,fontSize:12,fontWeight:500,lineHeight:16,letterSpacing:"-0.01em"},md:{minHeight:40,paddingHorizontal:20,paddingVertical:9,fontSize:14,fontWeight:500,lineHeight:20,letterSpacing:"-0.01em"},lg:{minHeight:48,paddingHorizontal:24,paddingVertical:11,fontSize:16,fontWeight:500,lineHeight:24,letterSpacing:"-0.01em"},xl:{minHeight:56,paddingHorizontal:28,paddingVertical:13,fontSize:20,fontWeight:500,lineHeight:28,letterSpacing:"-0.01em"}},Jo={square:0,rounded:8,pill:999},Qd={xs:{width:16,height:16,padding:6},sm:{width:20,height:20,padding:6},md:{width:24,height:24,padding:8},lg:{width:24,height:24,padding:12},xl:{width:28,height:28,padding:14}},Oe=e=>/^(color|theme|light|dark)-/.test(e)?`var(--${e})`:e,Zd=(e,o,t=!1,n)=>{const a=t?o:e,l=t?e:o,c=t?o:e,d=(e==="theme-primary"||n&&e===n.primary)&&(n!=null&&n.onPrimary)?n.onPrimary:l,g=`0 0 0 2px ${Oe("color-white")}, 0 0 0 4px ${Oe(c)}`;return{filled:{backgroundColor:a,color:d,borderWidth:1,borderStyle:"solid",borderColor:a,_hover:{opacity:.92},_active:{opacity:.96},_focusVisible:{outline:"none",boxShadow:g},transition:"background-color 0.2s ease, border-color 0.2s ease, opacity 0.2s ease"},empty:{color:c,borderWidth:1,borderStyle:"solid",borderColor:c,backgroundColor:"transparent",_hover:{opacity:.9},_active:{opacity:.95},_focusVisible:{outline:"none",boxShadow:g},transition:"background-color 0.2s ease, opacity 0.2s ease"},outline:{color:c,borderWidth:1,borderStyle:"solid",borderColor:c,backgroundColor:"transparent",_hover:{opacity:.9},_active:{opacity:.95},_focusVisible:{outline:"none",boxShadow:g},transition:"background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease"},ghost:{color:c,borderWidth:0,borderStyle:"solid",borderColor:c,backgroundColor:"transparent",_hover:{opacity:.86},_active:{opacity:.94},_focusVisible:{outline:"none",boxShadow:g},transition:"background-color 0.2s ease, color 0.2s ease"},link:{color:c,borderWidth:0,borderStyle:"none",borderColor:c,minHeight:"auto",paddingHorizontal:"4px",paddingVertical:"10px",textDecoration:"underline",backgroundColor:"transparent",style:{textUnderlineOffset:"2px",textDecorationThickness:"1px",textDecorationColor:Oe(c)},_hover:{opacity:.8},_active:{opacity:.9},_focusVisible:{outline:"none",boxShadow:g},transition:"opacity 0.2s ease"},subtle:{backgroundColor:Ir(c,t?200:100),color:c,borderWidth:1,borderStyle:"solid",borderColor:Ir(c,t?400:250),_hover:{backgroundColor:Ir(c,t?300:180)},_active:{backgroundColor:Ir(c,t?380:240)},_focusVisible:{outline:"none",boxShadow:g},transition:"background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease"}}},Rd=h.memo(({children:e,icon:o,leftIcon:t,rightIcon:n,isLoading:a,iconPosition:l="left",loaderPosition:c="left",size:s="md",resolvedTextColor:d,isIconRounded:g,loaderProps:m,views:f})=>{const p=["left","right"].includes(l)?i.Horizontal:i.Vertical,u=da[s];return r.jsxs(p,{gap:8,alignItems:"center",justifyContent:"center",fontSize:u.fontSize,fontWeight:u.fontWeight,lineHeight:u.lineHeight,letterSpacing:u.letterSpacing,whiteSpace:"nowrap",color:d,...f==null?void 0:f.content,children:[a&&c==="left"&&r.jsx(eo,{size:s==="xs"||s==="sm"?"sm":"md",color:d,...m,...f==null?void 0:f.loader}),t&&r.jsx(i.View,{color:d,...f==null?void 0:f.icon,children:t}),o&&["left","top"].includes(l)&&!a&&r.jsx(i.View,{color:d,...f==null?void 0:f.icon,children:o}),e,o&&["right","bottom"].includes(l)&&!a&&r.jsx(i.View,{color:d,...f==null?void 0:f.icon,children:o}),n&&r.jsx(i.View,{color:d,...f==null?void 0:f.icon,children:n}),a&&c==="right"&&r.jsx(eo,{size:s==="xs"||s==="sm"?"sm":"md",color:d,...m,...f==null?void 0:f.loader})]})}),e0=e=>{const o=Jo[e];return typeof o=="number"?o:typeof o=="string"&&parseInt(o,10)||0},o0=({asComponent:e,isDisabled:o,isLoading:t,isWrapped:n=!1,borderRadius:a,width:l,height:c,baseStyles:s,sizeStyles:d,iconPad:g,mainTone:m,resolvedTextColor:f,children:p,borderWidth:u=0,...y})=>r.jsx(i.Element,{as:e,disabled:!!(o||t),display:n?"flex":"inline-flex",alignItems:"center",justifyContent:"center",borderRadius:a,width:l,height:c,...s,...d,...g,backgroundColor:(s==null?void 0:s.backgroundColor)||(n?m:void 0),color:f,borderWidth:n?0:void 0,cursor:o?"default":"pointer",...y,children:p}),r0=({shape:e,isDisabled:o,onClick:t,shadow:n,borderWidth:a,isAuto:l,isFilled:c,views:s,children:d,...g})=>r.jsx(i.Element,{as:"div",position:"relative",display:"inline-flex",alignItems:"center",justifyContent:"center",borderRadius:Jo[e],cursor:o?"default":"pointer",onClick:t,boxShadow:n,padding:a,width:c?"100%":l?"fit-content":void 0,...s==null?void 0:s.container,...g,children:d}),t0=({variant:e,animation:o,to:t,isDisabled:n,isLoading:a,isAuto:l,isFilled:c,isExternal:s,shape:d="rounded",shadow:g,onClick:m,views:f,baseStyles:p,sizeStyles:u,iconPad:y,containerRef:k,resolvedTextColor:x,content:C,size:S,mainTone:w,borderMovingDuration:v=2,borderMovingGradientColors:b=["#705CFF","#FF5C97","#FFC75C"],animatedStrokeAccentColor:I="#705CFF",animatedStrokeTextColor:T="color-gray-900",...P})=>{var A;const E=e0(d),D=t?r.jsx(Ft,{to:t,isExternal:s,color:"currentColor",textDecoration:"inherit",_hover:{color:"currentColor"},...f==null?void 0:f.link,children:C}):C,z={isDisabled:n,isLoading:a,baseStyles:p,sizeStyles:u,iconPad:y,resolvedTextColor:x,mainTone:w,children:D};if(o==="borderMoving"&&b){const H={from:{backgroundPosition:"0% 50%"},to:{backgroundPosition:"200% 50%"},duration:`${v}s`,timingFunction:"linear",iterationCount:"infinite"};return r.jsx(r0,{shape:d,isDisabled:n,onClick:m,shadow:g,borderWidth:3,isAuto:l,isFilled:c,views:f,background:`linear-gradient(90deg, ${Oe(b[0])}, ${Oe(b[1])}, ${Oe(b[2])}, ${Oe(b[0])})`,backgroundSize:"200% 100%",animate:H,...P,children:r.jsx(o0,{asComponent:t?"div":"button",isWrapped:!0,borderRadius:Math.max(0,E-3),width:"100%",height:"100%",...z})})}if(o==="animatedStroke"){const W=Oe(I),H=Oe(T),V=1e3,j={from:{strokeWidth:"8px",strokeDasharray:`0 ${V}`,strokeDashoffset:-Math.round(V*.63)},to:{strokeWidth:"3px",strokeDasharray:`${V}`,strokeDashoffset:0},duration:"0.9s",timingFunction:"ease-in",fillMode:"forwards"},M=["group",(A=f==null?void 0:f.container)==null?void 0:A.className,P==null?void 0:P.className].filter(Boolean).join(" ");return r.jsxs(i.Element,{ref:k,as:t?"div":"button",type:t?void 0:"button",disabled:!!(!t&&(n||a)),onClick:m,position:"relative",display:"inline-flex",alignItems:"center",justifyContent:"center",width:c?"100%":l?"fit-content":void 0,borderRadius:Jo[d],boxShadow:g,transition:"background-color 0.2s ease, opacity 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease",cursor:n?"default":"pointer",color:H,backgroundColor:"transparent",borderWidth:0,...f==null?void 0:f.container,...P,className:M,children:[r.jsx(i.View,{as:"svg",position:"absolute",top:0,right:0,bottom:0,left:0,width:"100%",height:"100%",xmlns:"http://www.w3.org/2000/svg",pointerEvents:"none",zIndex:1,"aria-hidden":"true",children:r.jsx(i.View,{as:"rect",x:"0",y:"0",height:"100%",width:"100%",rx:E,ry:E,fill:"transparent",stroke:W,strokeWidth:"8px",strokeDasharray:`0 ${V}`,strokeDashoffset:-Math.round(V*.63),pathLength:V,on:{groupHover:{animate:j}}})}),r.jsx(i.View,{position:"relative",zIndex:0,children:D})]})}if(o==="borderReveal"){const H=Oe((b==null?void 0:b[0])||w||"#000000"),j=v*.75/4,M=`linear-gradient(90deg, ${H} 50%, transparent 50%)`,L=`linear-gradient(180deg, ${H} 50%, transparent 50%)`,_=`linear-gradient(270deg, ${H} 50%, transparent 50%)`,O=`linear-gradient(0deg, ${H} 50%, transparent 50%)`,N="100% 0, 100% 100%, 0 100%, 0 0",U="0 0, 100% 0, 100% 100%, 0 100%",X=`0s, ${j}s, ${j*2}s, ${j*2}s`,oe=`${j*2}s, ${j*2}s, ${j}s, 0s`,B=4;return r.jsx(i.Element,{ref:k,as:"div",position:"relative",display:"inline-flex",alignItems:"center",justifyContent:"center",borderRadius:Jo[d],cursor:n?"default":"pointer",onClick:m,boxShadow:g,padding:3,background:`
1
+ (function(F,r){typeof exports=="object"&&typeof module<"u"?r(exports,require("react/jsx-runtime"),require("react"),require("app-studio"),require("react-dom"),require("zustand"),require("react-router-dom"),require("formik")):typeof define=="function"&&define.amd?define(["exports","react/jsx-runtime","react","app-studio","react-dom","zustand","react-router-dom","formik"],r):(F=typeof globalThis<"u"?globalThis:F||self,r(F.AppStudioWeb={},F.jsxRuntime,F.React,F.appStudio,F.ReactDOM,F.zustand,F.ReactRouterDOM,F.Formik))})(this,function(F,r,h,i,Pc,vo,it,Ee){"use strict";var zb=Object.defineProperty;var Mb=(F,r,h)=>r in F?zb(F,r,{enumerable:!0,configurable:!0,writable:!0,value:h}):F[r]=h;var Ze=(F,r,h)=>Mb(F,typeof r!="symbol"?r+"":r,h);var wo,Pn;const ct=(e="id")=>`${e}-${Math.random().toString(36).substring(2,9)}`,Vc=({type:e="single",value:o,defaultValue:t,onValueChange:n,collapsible:a=!1})=>{const l=o!==void 0,c=o??t,s=()=>e==="multiple"?Array.isArray(c)?c:c?[c]:[]:Array.isArray(c)?c[0]:c,[d,g]=h.useState(s()),m=h.useMemo(()=>ct("accordion"),[]),f=l?o:d,p=h.useMemo(()=>f===void 0?[]:Array.isArray(f)?f:[f],[f]);h.useEffect(()=>{l&&(e==="multiple"&&!Array.isArray(o)?(console.warn('Accordion with type="multiple" received non-array value:',o),g(o?[String(o)]:[])):e==="single"&&Array.isArray(o)?(console.warn('Accordion with type="single" received array value:',o),g(o.length>0?o[0]:void 0)):g(o))},[o,l,e]);const u=h.useCallback(k=>{let x;if(e==="single")f===k&&a?x=void 0:f!==k?x=k:x=f;else{const C=Array.isArray(f)?f:[];C.includes(k)?x=C.filter(S=>S!==k):x=[...C,k],Array.isArray(x)&&x.length===0&&(x=[])}l||g(x),n&&n(x)},[e,f,a,l,n]),y=h.useCallback(k=>p.includes(k),[p]);return{expandedItems:p,toggleItem:u,isItemExpanded:y,type:e,collapsible:a,baseId:m}},Ac={square:{borderRadius:0},rounded:{borderRadius:8}},Ec={default:{borderWidth:0,style:{backgroundColor:"transparent"},transition:"background-color 0.15s ease"},outline:{borderWidth:1,borderStyle:"solid",borderColor:"color-gray-200",transition:"border-color 0.15s ease, background-color 0.15s ease",_hover:{borderColor:"color-gray-300"}},filled:{backgroundColor:"color-gray-50",transition:"background-color 0.15s ease",_hover:{backgroundColor:"color-gray-100"}}},Dc={metadata:{id:"default",label:"Default",sourcePath:"",sourceTitle:"Default adaptive design system (light + dark)",defaultAppearance:"light",googleFontLinks:["https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap"]},theme:{primary:"#2563eb",secondary:"#7c3aed",success:"#16a34a",warning:"#d97706",error:"#dc2626",onPrimary:"#ffffff",canvas:"color-white",surface:"color-gray-50",text:"color-black",muted:"color-gray-500",border:"color-gray-200"},tokens:{rawCssVars:{primary:"#2563eb",secondary:"#7c3aed",success:"#16a34a",warning:"#d97706",error:"#dc2626"},colors:[{name:"primary",value:"#2563eb",role:"primary"},{name:"secondary",value:"#7c3aed",role:"secondary"},{name:"success",value:"#16a34a",role:"success"},{name:"warning",value:"#d97706",role:"warning"},{name:"error",value:"#dc2626",role:"error"}],typography:{fontFamily:"'Inter', system-ui, -apple-system, sans-serif",monoFamily:"ui-monospace, 'SF Mono', Menlo, Monaco, Consolas, monospace",fontSizes:["12px","13px","14px","16px","18px","22px","28px","36px","48px","64px"],fontWeights:["400","500","600","700","800"],lineHeights:["1.0","1.1","1.2","1.4","1.5","1.6"]},spacing:["2px","4px","8px","12px","16px","24px","32px","48px","64px"],radii:["2px","4px","6px","8px","12px","16px","9999px"],shadows:["0 1px 2px rgba(0,0,0,0.04)","0 4px 12px rgba(0,0,0,0.08)","0 12px 32px rgba(0,0,0,0.12)"]},components:{button:{variant:"filled",size:"md",shape:"rounded",color:"theme-primary",textColor:"theme-onPrimary",views:{container:{borderRadius:8,fontFamily:"'Inter', system-ui, -apple-system, sans-serif",fontWeight:600,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},content:{fontFamily:"'Inter', system-ui, -apple-system, sans-serif",fontWeight:600,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"}}},badge:{variant:"filled",size:"sm",shape:"rounded",views:{container:{backgroundColor:null,color:null,borderColor:null,borderRadius:6,fontFamily:"'Inter', system-ui, -apple-system, sans-serif",letterSpacing:"-0.01em",textTransform:"none",fontWeight:600,fontStyle:"normal"},text:{fontFamily:"'Inter', system-ui, -apple-system, sans-serif",fontWeight:600}}},card:{variant:"outlined",size:"md",shape:"rounded",views:{container:{backgroundColor:"color-gray-50",borderColor:"color-gray-200",color:"color-black",borderRadius:12,borderWidth:"1px",borderStyle:"solid",boxShadow:"0 1px 2px rgba(0,0,0,0.04)"},header:{color:"color-black",fontFamily:"'Inter', system-ui, -apple-system, sans-serif",fontWeight:600,borderColor:"color-gray-200"},content:{color:"color-gray-500",fontFamily:"'Inter', system-ui, -apple-system, sans-serif"},footer:{borderColor:"color-gray-200"}}},input:{size:"md",shape:"default",variant:"default",views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"color-black",borderRadius:8,borderWidth:"1px",borderStyle:"solid"},field:{color:"color-black",fontFamily:"'Inter', system-ui, -apple-system, sans-serif",fontStyle:"normal",letterSpacing:"-0.01em"},label:{fontFamily:"'Inter', system-ui, -apple-system, sans-serif",fontWeight:600,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},helperText:{}}},textarea:{size:"md",shape:"default",variant:"default",views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"color-black",borderRadius:8,borderWidth:"1px",borderStyle:"solid"},field:{color:"color-black",fontFamily:"'Inter', system-ui, -apple-system, sans-serif",fontStyle:"normal",letterSpacing:"-0.01em"},label:{fontFamily:"'Inter', system-ui, -apple-system, sans-serif",fontWeight:600,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},helperText:{}}},select:{size:"md",shape:"default",variant:"default",views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"color-black",borderRadius:8,borderWidth:"1px",borderStyle:"solid"},field:{color:"color-black",fontFamily:"'Inter', system-ui, -apple-system, sans-serif"},label:{fontFamily:"'Inter', system-ui, -apple-system, sans-serif",fontWeight:600,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},helperText:{},text:{letterSpacing:"-0.01em",fontStyle:"normal"}}},checkbox:{size:"md",views:{checkbox:{borderColor:"color-gray-200",backgroundColor:"color-white",_checked:{backgroundColor:"theme-primary",borderColor:"theme-primary"},borderRadius:4},label:{fontFamily:"'Inter', system-ui, -apple-system, sans-serif",fontWeight:600,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},infoText:{color:"color-gray-500"},container:{borderRadius:4}}},radio:{size:"md",views:{radio:{borderColor:"color-gray-200",backgroundColor:"color-white"},dot:{backgroundColor:"theme-primary"},label:{fontFamily:"'Inter', system-ui, -apple-system, sans-serif",fontWeight:600,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},infoText:{color:"color-gray-500"},container:{borderRadius:"50%"}}},switch:{size:"sm",views:{slider:{backgroundColor:"color-gray-200"},circle:{backgroundColor:"color-white"},label:{fontFamily:"'Inter', system-ui, -apple-system, sans-serif",fontWeight:600,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},container:{borderRadius:"9999px"}}},slider:{backgroundColor:"theme-primary",views:{track:{backgroundColor:"color-gray-200"},progress:{backgroundColor:"theme-primary"},filledTrack:{backgroundColor:"theme-primary"},thumb:{borderColor:"theme-primary",backgroundColor:"color-white"},label:{color:"color-black"},valueLabel:{color:"color-gray-500"}}},tabs:{variant:"underline",views:{headerTabs:{borderColor:"color-gray-200"},tab:{color:"color-gray-500",fontWeight:600,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},activeTab:{color:"theme-primary",borderColor:"theme-primary",backgroundColor:"transparent"},title:{fontFamily:"'Inter', system-ui, -apple-system, sans-serif"},activeText:{color:"theme-primary"},content:{color:"color-black"},container:{borderRadius:"8px"}}},accordion:{views:{container:{borderColor:"color-gray-200",backgroundColor:"color-gray-50",color:"color-black",borderRadius:"12px"},trigger:{color:"color-black",fontFamily:"'Inter', system-ui, -apple-system, sans-serif"},content:{color:"color-gray-500"}}},table:{views:{table:{backgroundColor:"color-white",color:"color-black",borderColor:"color-gray-200",borderRadius:12},thead:{backgroundColor:"color-gray-50",color:"color-black"},th:{color:"color-gray-500",borderColor:"color-gray-200",fontFamily:"'Inter', system-ui, -apple-system, sans-serif",fontWeight:600,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},tr:{borderColor:"color-gray-200"},td:{color:"color-black",borderColor:"color-gray-200",letterSpacing:"-0.01em",fontStyle:"normal"},caption:{color:"color-gray-500",fontStyle:"italic",letterSpacing:"-0.01em"}}},avatar:{views:{container:{backgroundColor:"color-gray-50",borderColor:"color-gray-200",color:"color-black",borderRadius:"50%"},fallback:{color:"color-black",fontFamily:"'Inter', system-ui, -apple-system, sans-serif"}}},alert:{views:{container:{backgroundColor:"color-gray-50",borderColor:"color-gray-200",borderRadius:12},title:{color:"color-black",fontFamily:"'Inter', system-ui, -apple-system, sans-serif",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},description:{color:"color-gray-500",fontFamily:"'Inter', system-ui, -apple-system, sans-serif"},icon:{color:"theme-primary"}}},status:{views:{indicator:{backgroundColor:"theme-success"},label:{color:"color-black",fontFamily:"'Inter', system-ui, -apple-system, sans-serif"}}},progress:{color:"theme-primary",backgroundColor:"color-gray-200",radius:"9999px",views:{container:{backgroundColor:"color-gray-200",borderRadius:"9999px"},bar:{backgroundColor:"theme-primary"},text:{color:"color-black"}}},loader:{color:"theme-primary"},separator:{color:"color-gray-200",views:{container:{borderColor:"color-gray-200"},label:{color:"color-gray-500",fontFamily:"'Inter', system-ui, -apple-system, sans-serif"}}},navigation:{views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"color-black",borderRadius:"12px"},item:{color:"color-gray-500"},activeItem:{color:"theme-primary",borderColor:"theme-primary"}}},hero:{views:{container:{backgroundColor:"color-white",color:"color-black",fontFamily:"'Inter', system-ui, -apple-system, sans-serif"},eyebrow:{color:"color-gray-500"},title:{color:"color-black",fontFamily:"'Inter', system-ui, -apple-system, sans-serif"},description:{color:"color-gray-500"}}},page:{views:{container:{backgroundColor:"color-white",color:"color-black",fontFamily:"'Inter', system-ui, -apple-system, sans-serif"},section:{backgroundColor:"color-white",borderColor:"color-gray-200"},surface:{backgroundColor:"color-gray-50",borderColor:"color-gray-200",color:"color-black"}}}},personality:{cornerStyle:"soft",typeWeight:"regular",typeCase:"normal",typeStyle:"normal",letterSpacing:"-0.01em",accentTreatment:"flat",signatureMotif:"●",density:"comfortable",surfaceTone:"paper",cardRadius:12,pillRadius:9999,badgeRadius:6,voice:"neutral-clear"}},st={airbnb:{metadata:{id:"airbnb",label:"Airbnb",sourcePath:"design.md/html/airbnb.html",sourceTitle:"Design System Inspiration of Airbnb",defaultAppearance:"light",googleFontLinks:["https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap"]},theme:{primary:"#ff385c",secondary:"#222222",success:"#428bff",warning:"#460479",error:"#c13515",canvas:"color-white",surface:"color-gray-50",text:"color-black",muted:"color-gray-500",border:"color-gray-200",onPrimary:"#ffffff"},tokens:{rawCssVars:{primary:"#ff385c","primary-active":"#e00b41","primary-disabled":"#ffd1da",error:"#c13515",luxe:"#460479",plus:"#92174d",ink:"#222222",body:"#3f3f3f",muted:"#6a6a6a","muted-soft":"#929292",hairline:"#dddddd","hairline-soft":"#ebebeb","border-strong":"#c1c1c1",canvas:"#ffffff","surface-soft":"#f7f7f7","surface-strong":"#f2f2f2","on-primary":"#ffffff","legal-link":"#428bff",shadow:"rgba(0, 0, 0, 0.02) 0 0 0 1px, rgba(0, 0, 0, 0.04) 0 2px 6px 0, rgba(0, 0, 0, 0.1) 0 4px 8px 0",display:"'Inter', 'Airbnb Cereal VF', Circular, -apple-system, system-ui, Roboto, 'Helvetica Neue', sans-serif",text:"'Inter', 'Airbnb Cereal VF', Circular, -apple-system, system-ui, Roboto, sans-serif"},colors:[{name:"primary",value:"#ff385c",role:"primary"},{name:"primary-active",value:"#e00b41",role:"primary active"},{name:"primary-disabled",value:"#ffd1da",role:"primary disabled"},{name:"error",value:"#c13515",role:"error"},{name:"luxe",value:"#460479",role:"luxe"},{name:"plus",value:"#92174d",role:"plus"},{name:"ink",value:"#222222",role:"ink"},{name:"body",value:"#3f3f3f",role:"body"},{name:"muted",value:"#6a6a6a",role:"muted"},{name:"muted-soft",value:"#929292",role:"muted soft"},{name:"hairline",value:"#dddddd",role:"hairline"},{name:"hairline-soft",value:"#ebebeb",role:"hairline soft"},{name:"border-strong",value:"#c1c1c1",role:"border strong"},{name:"canvas",value:"#ffffff",role:"canvas"},{name:"surface-soft",value:"#f7f7f7",role:"surface soft"},{name:"surface-strong",value:"#f2f2f2",role:"surface strong"},{name:"on-primary",value:"#ffffff",role:"on primary"},{name:"legal-link",value:"#428bff",role:"legal link"},{name:"shadow",value:"rgba(0, 0, 0, 0.02) 0 0 0 1px, rgba(0, 0, 0, 0.04) 0 2px 6px 0, rgba(0, 0, 0, 0.1) 0 4px 8px 0",role:"shadow"}],typography:{fontFamily:"'Inter', 'Airbnb Cereal VF', Circular, -apple-system, system-ui, Roboto, 'Helvetica Neue', sans-serif",monoFamily:"ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace",fontSizes:["16px","14px","48px","18px","20px","11px","28px","13px","12px","8px","64px","21px","10px","24px","36px","15px"],fontWeights:["400","600","700","500"],lineHeights:["1.5","1.1","1.43","1.25","2","1","1.2","1.35","1.4"]},spacing:["2px","4px","5px","6px","7px","8px","10px","11px","12px","13px","14px","16px","20px","23px","24px","28px","32px","40px","48px","56px"],radii:["9999px","8px","14px","4px","6px","3px"],shadows:["rgba(0, 0, 0, 0.02) 0 0 0 1px, rgba(0, 0, 0, 0.04) 0 2px 6px 0, rgba(0, 0, 0, 0.1) 0 4px 8px 0","var(--shadow)"]},components:{button:{variant:"filled",size:"md",shape:"rounded",color:"theme-primary",textColor:"theme-onPrimary",views:{container:{borderRadius:9999,fontFamily:"'Inter', 'Airbnb Cereal VF', Circular, -apple-system, system-ui, Roboto, 'Helvetica Neue', sans-serif",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},content:{fontFamily:"'Inter', 'Airbnb Cereal VF', Circular, -apple-system, system-ui, Roboto, 'Helvetica Neue', sans-serif",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"}}},badge:{variant:"filled",size:"sm",shape:"rounded",views:{container:{backgroundColor:null,color:null,borderColor:null,borderRadius:6,fontFamily:"'Inter', 'Airbnb Cereal VF', Circular, -apple-system, system-ui, Roboto, 'Helvetica Neue', sans-serif",letterSpacing:"-0.01em",textTransform:"none",fontWeight:700,fontStyle:"normal"},text:{fontFamily:"'Inter', 'Airbnb Cereal VF', Circular, -apple-system, system-ui, Roboto, 'Helvetica Neue', sans-serif",fontWeight:600}}},card:{variant:"outlined",size:"md",shape:"rounded",views:{container:{backgroundColor:"color-gray-50",borderColor:"color-gray-200",color:"color-black",borderRadius:16,borderWidth:"1px",borderStyle:"solid",boxShadow:"rgba(0, 0, 0, 0.02) 0 0 0 1px, rgba(0, 0, 0, 0.04) 0 2px 6px 0, rgba(0, 0, 0, 0.1) 0 4px 8px 0"},header:{color:"color-black",fontFamily:"'Inter', 'Airbnb Cereal VF', Circular, -apple-system, system-ui, Roboto, 'Helvetica Neue', sans-serif",fontWeight:600,borderColor:"color-gray-200"},content:{color:"color-gray-500",fontFamily:"'Inter', 'Airbnb Cereal VF', Circular, -apple-system, system-ui, Roboto, 'Helvetica Neue', sans-serif"},footer:{borderColor:"color-gray-200"}}},input:{size:"md",shape:"default",variant:"default",views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"color-black",borderRadius:10,borderWidth:"1px",borderStyle:"solid",boxShadow:"rgba(0, 0, 0, 0.02) 0 0 0 1px, rgba(0, 0, 0, 0.04) 0 2px 6px 0, rgba(0, 0, 0, 0.1) 0 4px 8px 0"},field:{color:"color-black",fontFamily:"'Inter', 'Airbnb Cereal VF', Circular, -apple-system, system-ui, Roboto, 'Helvetica Neue', sans-serif",fontStyle:"normal",letterSpacing:"-0.01em"},label:{fontFamily:"'Inter', 'Airbnb Cereal VF', Circular, -apple-system, system-ui, Roboto, 'Helvetica Neue', sans-serif",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},helperText:{}}},textarea:{size:"md",shape:"default",variant:"default",views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"color-black",borderRadius:10,borderWidth:"1px",borderStyle:"solid",boxShadow:"rgba(0, 0, 0, 0.02) 0 0 0 1px, rgba(0, 0, 0, 0.04) 0 2px 6px 0, rgba(0, 0, 0, 0.1) 0 4px 8px 0"},field:{color:"color-black",fontFamily:"'Inter', 'Airbnb Cereal VF', Circular, -apple-system, system-ui, Roboto, 'Helvetica Neue', sans-serif",fontStyle:"normal",letterSpacing:"-0.01em"},label:{fontFamily:"'Inter', 'Airbnb Cereal VF', Circular, -apple-system, system-ui, Roboto, 'Helvetica Neue', sans-serif",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},helperText:{}}},select:{size:"md",shape:"default",variant:"default",views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"color-black",borderRadius:10,borderWidth:"1px",borderStyle:"solid",boxShadow:"rgba(0, 0, 0, 0.02) 0 0 0 1px, rgba(0, 0, 0, 0.04) 0 2px 6px 0, rgba(0, 0, 0, 0.1) 0 4px 8px 0"},field:{color:"color-black",fontFamily:"'Inter', 'Airbnb Cereal VF', Circular, -apple-system, system-ui, Roboto, 'Helvetica Neue', sans-serif"},label:{fontFamily:"'Inter', 'Airbnb Cereal VF', Circular, -apple-system, system-ui, Roboto, 'Helvetica Neue', sans-serif",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},helperText:{},text:{letterSpacing:"-0.01em",fontStyle:"normal"}}},checkbox:{size:"md",views:{checkbox:{borderColor:"color-gray-200",backgroundColor:"color-white",_checked:{backgroundColor:"theme-primary",borderColor:"theme-primary"},borderRadius:4},label:{fontFamily:"'Inter', 'Airbnb Cereal VF', Circular, -apple-system, system-ui, Roboto, 'Helvetica Neue', sans-serif",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},infoText:{color:"color-gray-500"},container:{borderRadius:4}}},radio:{size:"md",views:{radio:{borderColor:"color-gray-200",backgroundColor:"color-white"},dot:{backgroundColor:"theme-primary"},label:{fontFamily:"'Inter', 'Airbnb Cereal VF', Circular, -apple-system, system-ui, Roboto, 'Helvetica Neue', sans-serif",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},infoText:{color:"color-gray-500"},container:{borderRadius:"50%"}}},switch:{size:"sm",views:{slider:{backgroundColor:"color-gray-200"},circle:{backgroundColor:"color-white"},label:{fontFamily:"'Inter', 'Airbnb Cereal VF', Circular, -apple-system, system-ui, Roboto, 'Helvetica Neue', sans-serif",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},container:{borderRadius:"9999px"}}},slider:{backgroundColor:"theme-primary",views:{track:{backgroundColor:"color-gray-200"},progress:{backgroundColor:"theme-primary"},filledTrack:{backgroundColor:"theme-primary"},thumb:{borderColor:"theme-primary",backgroundColor:"color-white"},label:{color:"color-black"},valueLabel:{color:"color-gray-500"}}},tabs:{variant:"underline",views:{headerTabs:{borderColor:"color-gray-200"},tab:{color:"color-gray-500",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},activeTab:{color:"theme-primary",borderColor:"theme-primary",backgroundColor:"transparent"},title:{fontFamily:"'Inter', 'Airbnb Cereal VF', Circular, -apple-system, system-ui, Roboto, 'Helvetica Neue', sans-serif"},activeText:{color:"theme-primary"},content:{color:"color-black"},container:{borderRadius:"8px"}}},accordion:{views:{container:{borderColor:"color-gray-200",backgroundColor:"color-gray-50",color:"color-black",borderRadius:"14px"},trigger:{color:"color-black",fontFamily:"'Inter', 'Airbnb Cereal VF', Circular, -apple-system, system-ui, Roboto, 'Helvetica Neue', sans-serif"},content:{color:"color-gray-500"}}},table:{views:{table:{backgroundColor:"color-white",color:"color-black",borderColor:"color-gray-200",borderRadius:16},thead:{backgroundColor:"color-gray-50",color:"color-black"},th:{color:"color-gray-500",borderColor:"color-gray-200",fontFamily:"ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},tr:{borderColor:"color-gray-200"},td:{color:"color-black",borderColor:"color-gray-200",letterSpacing:"-0.01em",fontStyle:"normal"},caption:{color:"color-gray-500",fontStyle:"italic",letterSpacing:"-0.01em"}}},avatar:{views:{container:{backgroundColor:"color-gray-50",borderColor:"color-gray-200",color:"color-black",borderRadius:"50%"},fallback:{color:"color-black",fontFamily:"'Inter', 'Airbnb Cereal VF', Circular, -apple-system, system-ui, Roboto, 'Helvetica Neue', sans-serif"}}},alert:{views:{container:{backgroundColor:"color-gray-50",borderColor:"color-gray-200",borderRadius:16},title:{color:"color-black",fontFamily:"'Inter', 'Airbnb Cereal VF', Circular, -apple-system, system-ui, Roboto, 'Helvetica Neue', sans-serif",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},description:{color:"color-gray-500",fontFamily:"'Inter', 'Airbnb Cereal VF', Circular, -apple-system, system-ui, Roboto, 'Helvetica Neue', sans-serif"},icon:{color:"theme-primary"}}},status:{views:{indicator:{backgroundColor:"theme-success"},label:{color:"color-black",fontFamily:"'Inter', 'Airbnb Cereal VF', Circular, -apple-system, system-ui, Roboto, 'Helvetica Neue', sans-serif"}}},progress:{color:"theme-primary",backgroundColor:"color-gray-200",radius:"14px",views:{container:{backgroundColor:"color-gray-200",borderRadius:"9999px"},bar:{backgroundColor:"theme-primary"},text:{color:"color-black"}}},loader:{color:"theme-primary"},separator:{color:"color-gray-200",views:{container:{borderColor:"color-gray-200"},label:{color:"color-gray-500",fontFamily:"'Inter', 'Airbnb Cereal VF', Circular, -apple-system, system-ui, Roboto, 'Helvetica Neue', sans-serif"}}},navigation:{views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"color-black",borderRadius:"14px"},item:{color:"color-gray-500"},activeItem:{color:"theme-primary",borderColor:"theme-primary"}}},hero:{views:{container:{backgroundColor:"color-white",color:"color-black",fontFamily:"'Inter', 'Airbnb Cereal VF', Circular, -apple-system, system-ui, Roboto, 'Helvetica Neue', sans-serif"},eyebrow:{color:"color-gray-500"},title:{color:"color-black",fontFamily:"'Inter', 'Airbnb Cereal VF', Circular, -apple-system, system-ui, Roboto, 'Helvetica Neue', sans-serif"},description:{color:"color-gray-500"}}},page:{views:{container:{backgroundColor:"color-white",color:"color-black",fontFamily:"'Inter', 'Airbnb Cereal VF', Circular, -apple-system, system-ui, Roboto, 'Helvetica Neue', sans-serif"},section:{backgroundColor:"color-white",borderColor:"color-gray-200"},surface:{backgroundColor:"color-gray-50",borderColor:"color-gray-200",color:"color-black"}}}},personality:{cornerStyle:"soft",typeWeight:"bold",typeCase:"normal",typeStyle:"normal",letterSpacing:"-0.01em",accentTreatment:"flat",signatureMotif:"●",density:"comfortable",surfaceTone:"paper",cardRadius:16,pillRadius:9999,badgeRadius:6,voice:"warm-welcoming"}},apple:{metadata:{id:"apple",label:"Apple",sourcePath:"design.md/html/apple.html",sourceTitle:"Design System Inspiration of Apple",defaultAppearance:"light",googleFontLinks:["https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap"]},theme:{primary:"#0071E3",secondary:"#1d1d1f",success:"#0071e3",warning:"#272729",error:"#2997ff",canvas:"color-white",surface:"color-gray-50",text:"color-black",muted:"color-gray-500",border:"color-gray-200",onPrimary:"#ffffff"},tokens:{rawCssVars:{primary:"#0066cc","primary-focus":"#0071e3","primary-on-dark":"#2997ff",ink:"#1d1d1f",body:"#1d1d1f","body-on-dark":"#ffffff","body-muted":"#cccccc","ink-muted-80":"#333333","ink-muted-48":"#7a7a7a","divider-soft":"#f0f0f0",hairline:"#e0e0e0",canvas:"#ffffff","canvas-parchment":"#f5f5f7","surface-pearl":"#fafafc","surface-tile-1":"#272729","surface-tile-2":"#2a2a2c","surface-tile-3":"#252527","surface-black":"#000000","surface-chip-translucent":"rgba(210, 210, 215, 0.64)","on-primary":"#ffffff","on-dark":"#ffffff",display:"-apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Inter', system-ui, sans-serif",text:"-apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Inter', system-ui, sans-serif"},colors:[{name:"primary",value:"#0071E3",role:"primary"},{name:"primary-focus",value:"#0071e3",role:"primary focus"},{name:"primary-on-dark",value:"#2997ff",role:"primary on dark"},{name:"ink",value:"#1d1d1f",role:"ink"},{name:"body",value:"#1d1d1f",role:"body"},{name:"body-on-dark",value:"#ffffff",role:"body on dark"},{name:"body-muted",value:"#cccccc",role:"body muted"},{name:"ink-muted-80",value:"#333333",role:"ink muted 80"},{name:"ink-muted-48",value:"#7a7a7a",role:"ink muted 48"},{name:"divider-soft",value:"#f0f0f0",role:"divider soft"},{name:"hairline",value:"#e0e0e0",role:"hairline"},{name:"canvas",value:"#ffffff",role:"canvas"},{name:"canvas-parchment",value:"#f5f5f7",role:"canvas parchment"},{name:"surface-pearl",value:"#fafafc",role:"surface pearl"},{name:"surface-tile-1",value:"#272729",role:"surface tile 1"},{name:"surface-tile-2",value:"#2a2a2c",role:"surface tile 2"},{name:"surface-tile-3",value:"#252527",role:"surface tile 3"},{name:"surface-black",value:"#000000",role:"surface black"},{name:"surface-chip-translucent",value:"rgba(210, 210, 215, 0.64)",role:"surface chip translucent"},{name:"on-primary",value:"#ffffff",role:"on primary"},{name:"on-dark",value:"#ffffff",role:"on dark"}],typography:{fontFamily:"-apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Inter', system-ui, sans-serif",monoFamily:"ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace",fontSizes:["17px","14px","56px","21px","12px","40px","24px","13px","18px","28px","11px","34px","44px","32px","19px"],fontWeights:["400","600","300","700"],lineHeights:["1.47","1.07","1.19","1.1","1.43","1.5","1","1.14","2.0","2.41","1.2","1.35"]},spacing:["5px","6px","7px","8px","10px","11px","12px","14px","15px","16px","18px","20px","21px","22px","24px","28px","32px","44px","48px","50px"],radii:["9999px","18px","28px","24px","8px","11px","50%","12px","4px","6px","3px"],shadows:["0 5px 30px rgba(0, 0, 0, 0.22)"]},components:{button:{variant:"filled",size:"md",shape:"rounded",color:"theme-primary",textColor:"theme-onPrimary",views:{container:{borderRadius:9999,fontFamily:"-apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Inter', system-ui, sans-serif",fontWeight:300,letterSpacing:"-0.022em",textTransform:"none",fontStyle:"normal"},content:{fontFamily:"-apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Inter', system-ui, sans-serif",fontWeight:300,letterSpacing:"-0.022em",textTransform:"none",fontStyle:"normal"}}},badge:{variant:"filled",size:"sm",shape:"pill",views:{container:{backgroundColor:"theme-secondary",color:"color-white",borderColor:"theme-secondary",borderRadius:8,fontFamily:"-apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Inter', system-ui, sans-serif",letterSpacing:"-0.022em",textTransform:"none",fontWeight:300,fontStyle:"normal"},text:{fontFamily:"-apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Inter', system-ui, sans-serif",fontWeight:600}}},card:{variant:"outlined",size:"md",shape:"rounded",views:{container:{backgroundColor:"color-gray-50",borderColor:"color-gray-200",color:"color-black",borderRadius:18,borderWidth:"1px",borderStyle:"solid",boxShadow:"0 5px 30px rgba(0, 0, 0, 0.22)"},header:{color:"color-black",fontFamily:"-apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Inter', system-ui, sans-serif",fontWeight:600,borderColor:"color-gray-200"},content:{color:"color-gray-500",fontFamily:"-apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Inter', system-ui, sans-serif"},footer:{borderColor:"color-gray-200"}}},input:{size:"md",shape:"default",variant:"default",views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"color-black",borderRadius:10,borderWidth:"1px",borderStyle:"solid",boxShadow:"none"},field:{color:"color-black",fontFamily:"-apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Inter', system-ui, sans-serif",fontStyle:"normal",letterSpacing:"-0.022em"},label:{fontFamily:"-apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Inter', system-ui, sans-serif",fontWeight:300,letterSpacing:"-0.022em",textTransform:"none",fontStyle:"normal"},helperText:{}}},textarea:{size:"md",shape:"default",variant:"default",views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"color-black",borderRadius:10,borderWidth:"1px",borderStyle:"solid",boxShadow:"none"},field:{color:"color-black",fontFamily:"-apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Inter', system-ui, sans-serif",fontStyle:"normal",letterSpacing:"-0.022em"},label:{fontFamily:"-apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Inter', system-ui, sans-serif",fontWeight:300,letterSpacing:"-0.022em",textTransform:"none",fontStyle:"normal"},helperText:{}}},select:{size:"md",shape:"default",variant:"default",views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"color-black",borderRadius:10,borderWidth:"1px",borderStyle:"solid",boxShadow:"none"},field:{color:"color-black",fontFamily:"-apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Inter', system-ui, sans-serif"},label:{fontFamily:"-apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Inter', system-ui, sans-serif",fontWeight:300,letterSpacing:"-0.022em",textTransform:"none",fontStyle:"normal"},helperText:{},text:{letterSpacing:"-0.022em",fontStyle:"normal"}}},checkbox:{size:"md",views:{checkbox:{borderColor:"color-gray-200",backgroundColor:"color-white",_checked:{backgroundColor:"theme-primary",borderColor:"theme-primary"},borderRadius:4},label:{fontFamily:"-apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Inter', system-ui, sans-serif",fontWeight:300,letterSpacing:"-0.022em",textTransform:"none",fontStyle:"normal"},infoText:{color:"color-gray-500"},container:{borderRadius:4}}},radio:{size:"md",views:{radio:{borderColor:"color-gray-200",backgroundColor:"color-white"},dot:{backgroundColor:"theme-primary"},label:{fontFamily:"-apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Inter', system-ui, sans-serif",fontWeight:300,letterSpacing:"-0.022em",textTransform:"none",fontStyle:"normal"},infoText:{color:"color-gray-500"},container:{borderRadius:"50%"}}},switch:{size:"sm",views:{slider:{backgroundColor:"color-gray-200"},circle:{backgroundColor:"color-white"},label:{fontFamily:"-apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Inter', system-ui, sans-serif",fontWeight:300,letterSpacing:"-0.022em",textTransform:"none",fontStyle:"normal"},container:{borderRadius:"9999px"}}},slider:{backgroundColor:"theme-primary",views:{track:{backgroundColor:"color-gray-200"},progress:{backgroundColor:"theme-primary"},filledTrack:{backgroundColor:"theme-primary"},thumb:{borderColor:"theme-primary",backgroundColor:"color-white"},label:{color:"color-black"},valueLabel:{color:"color-gray-500"}}},tabs:{variant:"pill",views:{headerTabs:{borderColor:"color-gray-200"},tab:{color:"color-gray-500",fontWeight:300,letterSpacing:"-0.022em",textTransform:"none",fontStyle:"normal"},activeTab:{color:"theme-primary",borderColor:"theme-primary",backgroundColor:"theme-primary"},title:{fontFamily:"-apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Inter', system-ui, sans-serif"},activeText:{color:"color-white"},content:{color:"color-black"},container:{borderRadius:"9999px"}}},accordion:{views:{container:{borderColor:"color-gray-200",backgroundColor:"color-gray-50",color:"color-black",borderRadius:"18px"},trigger:{color:"color-black",fontFamily:"-apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Inter', system-ui, sans-serif"},content:{color:"color-gray-500"}}},table:{views:{table:{backgroundColor:"color-white",color:"color-black",borderColor:"color-gray-200",borderRadius:18},thead:{backgroundColor:"color-gray-50",color:"color-black"},th:{color:"color-gray-500",borderColor:"color-gray-200",fontFamily:"ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace",fontWeight:300,letterSpacing:"-0.022em",textTransform:"none",fontStyle:"normal"},tr:{borderColor:"color-gray-200"},td:{color:"color-black",borderColor:"color-gray-200",letterSpacing:"-0.022em",fontStyle:"normal"},caption:{color:"color-gray-500",fontStyle:"italic",letterSpacing:"-0.022em"}}},avatar:{views:{container:{backgroundColor:"color-gray-50",borderColor:"color-gray-200",color:"color-black",borderRadius:"50%"},fallback:{color:"color-black",fontFamily:"-apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Inter', system-ui, sans-serif"}}},alert:{views:{container:{backgroundColor:"color-gray-50",borderColor:"color-gray-200",borderRadius:18},title:{color:"color-black",fontFamily:"-apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Inter', system-ui, sans-serif",fontWeight:300,letterSpacing:"-0.022em",textTransform:"none",fontStyle:"normal"},description:{color:"color-gray-500",fontFamily:"-apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Inter', system-ui, sans-serif"},icon:{color:"theme-primary"}}},status:{views:{indicator:{backgroundColor:"theme-success"},label:{color:"color-black",fontFamily:"-apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Inter', system-ui, sans-serif"}}},progress:{color:"theme-primary",backgroundColor:"color-gray-200",radius:"18px",views:{container:{backgroundColor:"color-gray-200",borderRadius:"9999px"},bar:{backgroundColor:"theme-primary"},text:{color:"color-black"}}},loader:{color:"theme-primary"},separator:{color:"color-gray-200",views:{container:{borderColor:"color-gray-200"},label:{color:"color-gray-500",fontFamily:"-apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Inter', system-ui, sans-serif"}}},navigation:{views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"color-black",borderRadius:"18px"},item:{color:"color-gray-500"},activeItem:{color:"theme-primary",borderColor:"theme-primary"}}},hero:{views:{container:{backgroundColor:"color-white",color:"color-black",fontFamily:"-apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Inter', system-ui, sans-serif"},eyebrow:{color:"color-gray-500"},title:{color:"color-black",fontFamily:"-apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Inter', system-ui, sans-serif"},description:{color:"color-gray-500"}}},page:{views:{container:{backgroundColor:"color-white",color:"color-black",fontFamily:"-apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Inter', system-ui, sans-serif"},section:{backgroundColor:"color-white",borderColor:"color-gray-200"},surface:{backgroundColor:"color-gray-50",borderColor:"color-gray-200",color:"color-black"}}}},personality:{cornerStyle:"soft",typeWeight:"light",typeCase:"normal",typeStyle:"normal",letterSpacing:"-0.022em",accentTreatment:"flat",signatureMotif:"◯",density:"spacious",surfaceTone:"paper",cardRadius:18,pillRadius:9999,badgeRadius:8,voice:"minimal-precise"}},coinbase:{metadata:{id:"coinbase",label:"Coinbase",sourcePath:"design.md/html/coinbase.html",sourceTitle:"Design System Inspiration of Coinbase",defaultAppearance:"light",googleFontLinks:["https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=JetBrains+Mono:wght@500&display=swap"]},theme:{primary:"#0052ff",secondary:"#0a0b0d",success:"#16a34a",warning:"#003ecc",error:"#dc2626",canvas:"color-white",surface:"color-gray-50",text:"color-black",muted:"color-gray-500",border:"color-gray-200",onPrimary:"#ffffff"},tokens:{rawCssVars:{primary:"#0052ff","primary-active":"#003ecc","primary-disabled":"#a8b8cc",ink:"#0a0b0d",body:"#5b616e",muted:"#7c828a","muted-soft":"#a8acb3",hairline:"#dee1e6","hairline-soft":"#eef0f3",canvas:"#ffffff","surface-soft":"#f7f7f7","surface-strong":"#eef0f3","surface-dark":"#0a0b0d","surface-dark-elevated":"#16181c","on-primary":"#ffffff","on-dark":"#ffffff","on-dark-soft":"#a8acb3","semantic-up":"#05b169","semantic-down":"#cf202f","accent-yellow":"#f4b000",display:"'Inter', 'Coinbase Display', -apple-system, system-ui, sans-serif",text:"'Inter', 'Coinbase Sans', sans-serif",mono:"'JetBrains Mono', 'Coinbase Mono', monospace"},colors:[{name:"primary",value:"#0052ff",role:"primary"},{name:"primary-active",value:"#003ecc",role:"primary active"},{name:"primary-disabled",value:"#a8b8cc",role:"primary disabled"},{name:"ink",value:"#0a0b0d",role:"ink"},{name:"body",value:"#5b616e",role:"body"},{name:"muted",value:"#7c828a",role:"muted"},{name:"muted-soft",value:"#a8acb3",role:"muted soft"},{name:"hairline",value:"#dee1e6",role:"hairline"},{name:"hairline-soft",value:"#eef0f3",role:"hairline soft"},{name:"canvas",value:"#ffffff",role:"canvas"},{name:"surface-soft",value:"#f7f7f7",role:"surface soft"},{name:"surface-strong",value:"#eef0f3",role:"surface strong"},{name:"surface-dark",value:"#0a0b0d",role:"surface dark"},{name:"surface-dark-elevated",value:"#16181c",role:"surface dark elevated"},{name:"on-primary",value:"#ffffff",role:"on primary"},{name:"on-dark",value:"#ffffff",role:"on dark"},{name:"on-dark-soft",value:"#a8acb3",role:"on dark soft"},{name:"semantic-up",value:"#05b169",role:"semantic up"},{name:"semantic-down",value:"#cf202f",role:"semantic down"},{name:"accent-yellow",value:"#f4b000",role:"accent yellow"}],typography:{fontFamily:"'Inter', 'Coinbase Display', -apple-system, system-ui, sans-serif",monoFamily:"'JetBrains Mono', 'Coinbase Mono', monospace",fontSizes:["16px","14px","72px","18px","13px","36px","12px","44px","11px","52px","28px","40px","32px","48px","26px"],fontWeights:["500","600","400","700"],lineHeights:["1.5","1.2","1.05","1.15","1.0","1.09","1","1.35","1.4"]},spacing:["4px","5px","6px","8px","10px","11px","12px","13px","14px","15px","16px","19px","20px","24px","28px","32px","40px","44px","48px","56px"],radii:["100px","24px","20px","16px","9999px","14px","12px","8px","6px","3px"],shadows:["0 16px 40px rgba(0,0,0,0.5)","0 16px 40px rgba(0,0,0,0.4)","0 4px 12px rgba(0,0,0,0.04)"]},components:{button:{variant:"filled",size:"md",shape:"rounded",color:"theme-primary",textColor:"theme-onPrimary",views:{container:{borderRadius:9999,fontFamily:"'Inter', 'Coinbase Display', -apple-system, system-ui, sans-serif",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},content:{fontFamily:"'Inter', 'Coinbase Display', -apple-system, system-ui, sans-serif",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"}}},badge:{variant:"filled",size:"sm",shape:"pill",views:{container:{backgroundColor:"theme-secondary",color:"color-white",borderColor:"theme-secondary",borderRadius:6,fontFamily:"'Inter', 'Coinbase Display', -apple-system, system-ui, sans-serif",letterSpacing:"-0.01em",textTransform:"none",fontWeight:700,fontStyle:"normal"},text:{fontFamily:"'Inter', 'Coinbase Display', -apple-system, system-ui, sans-serif",fontWeight:600}}},card:{variant:"outlined",size:"md",shape:"rounded",views:{container:{backgroundColor:"color-gray-50",borderColor:"color-gray-200",color:"color-black",borderRadius:12,borderWidth:"1px",borderStyle:"solid",boxShadow:"0 16px 40px rgba(0,0,0,0.5)"},header:{color:"color-black",fontFamily:"'Inter', 'Coinbase Display', -apple-system, system-ui, sans-serif",fontWeight:600,borderColor:"color-gray-200"},content:{color:"color-gray-500",fontFamily:"'Inter', 'Coinbase Display', -apple-system, system-ui, sans-serif"},footer:{borderColor:"color-gray-200"}}},input:{size:"md",shape:"default",variant:"default",views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"color-black",borderRadius:10,borderWidth:"1px",borderStyle:"solid",boxShadow:"none"},field:{color:"color-black",fontFamily:"'Inter', 'Coinbase Display', -apple-system, system-ui, sans-serif",fontStyle:"normal",letterSpacing:"-0.01em"},label:{fontFamily:"'Inter', 'Coinbase Display', -apple-system, system-ui, sans-serif",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},helperText:{}}},textarea:{size:"md",shape:"default",variant:"default",views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"color-black",borderRadius:10,borderWidth:"1px",borderStyle:"solid",boxShadow:"none"},field:{color:"color-black",fontFamily:"'Inter', 'Coinbase Display', -apple-system, system-ui, sans-serif",fontStyle:"normal",letterSpacing:"-0.01em"},label:{fontFamily:"'Inter', 'Coinbase Display', -apple-system, system-ui, sans-serif",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},helperText:{}}},select:{size:"md",shape:"default",variant:"default",views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"color-black",borderRadius:10,borderWidth:"1px",borderStyle:"solid",boxShadow:"none"},field:{color:"color-black",fontFamily:"'Inter', 'Coinbase Display', -apple-system, system-ui, sans-serif"},label:{fontFamily:"'Inter', 'Coinbase Display', -apple-system, system-ui, sans-serif",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},helperText:{},text:{letterSpacing:"-0.01em",fontStyle:"normal"}}},checkbox:{size:"md",views:{checkbox:{borderColor:"color-gray-200",backgroundColor:"color-white",_checked:{backgroundColor:"theme-primary",borderColor:"theme-primary"},borderRadius:4},label:{fontFamily:"'Inter', 'Coinbase Display', -apple-system, system-ui, sans-serif",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},infoText:{color:"color-gray-500"},container:{borderRadius:4}}},radio:{size:"md",views:{radio:{borderColor:"color-gray-200",backgroundColor:"color-white"},dot:{backgroundColor:"theme-primary"},label:{fontFamily:"'Inter', 'Coinbase Display', -apple-system, system-ui, sans-serif",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},infoText:{color:"color-gray-500"},container:{borderRadius:"50%"}}},switch:{size:"sm",views:{slider:{backgroundColor:"color-gray-200"},circle:{backgroundColor:"color-white"},label:{fontFamily:"'Inter', 'Coinbase Display', -apple-system, system-ui, sans-serif",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},container:{borderRadius:"9999px"}}},slider:{backgroundColor:"theme-primary",views:{track:{backgroundColor:"color-gray-200"},progress:{backgroundColor:"theme-primary"},filledTrack:{backgroundColor:"theme-primary"},thumb:{borderColor:"theme-primary",backgroundColor:"color-white"},label:{color:"color-black"},valueLabel:{color:"color-gray-500"}}},tabs:{variant:"pill",views:{headerTabs:{borderColor:"color-gray-200"},tab:{color:"color-gray-500",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},activeTab:{color:"theme-primary",borderColor:"theme-primary",backgroundColor:"theme-primary"},title:{fontFamily:"'Inter', 'Coinbase Display', -apple-system, system-ui, sans-serif"},activeText:{color:"color-white"},content:{color:"color-black"},container:{borderRadius:"9999px"}}},accordion:{views:{container:{borderColor:"color-gray-200",backgroundColor:"color-gray-50",color:"color-black",borderRadius:"16px"},trigger:{color:"color-black",fontFamily:"'Inter', 'Coinbase Display', -apple-system, system-ui, sans-serif"},content:{color:"color-gray-500"}}},table:{views:{table:{backgroundColor:"color-white",color:"color-black",borderColor:"color-gray-200",borderRadius:12},thead:{backgroundColor:"color-gray-50",color:"color-black"},th:{color:"color-gray-500",borderColor:"color-gray-200",fontFamily:"'JetBrains Mono', 'Coinbase Mono', monospace",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},tr:{borderColor:"color-gray-200"},td:{color:"color-black",borderColor:"color-gray-200",letterSpacing:"-0.01em",fontStyle:"normal"},caption:{color:"color-gray-500",fontStyle:"italic",letterSpacing:"-0.01em"}}},avatar:{views:{container:{backgroundColor:"color-gray-50",borderColor:"color-gray-200",color:"color-black",borderRadius:"50%"},fallback:{color:"color-black",fontFamily:"'Inter', 'Coinbase Display', -apple-system, system-ui, sans-serif"}}},alert:{views:{container:{backgroundColor:"color-gray-50",borderColor:"color-gray-200",borderRadius:12},title:{color:"color-black",fontFamily:"'Inter', 'Coinbase Display', -apple-system, system-ui, sans-serif",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},description:{color:"color-gray-500",fontFamily:"'Inter', 'Coinbase Display', -apple-system, system-ui, sans-serif"},icon:{color:"theme-primary"}}},status:{views:{indicator:{backgroundColor:"theme-success"},label:{color:"color-black",fontFamily:"'Inter', 'Coinbase Display', -apple-system, system-ui, sans-serif"}}},progress:{color:"theme-primary",backgroundColor:"color-gray-200",radius:"16px",views:{container:{backgroundColor:"color-gray-200",borderRadius:"9999px"},bar:{backgroundColor:"theme-primary"},text:{color:"color-black"}}},loader:{color:"theme-primary"},separator:{color:"color-gray-200",views:{container:{borderColor:"color-gray-200"},label:{color:"color-gray-500",fontFamily:"'Inter', 'Coinbase Display', -apple-system, system-ui, sans-serif"}}},navigation:{views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"color-black",borderRadius:"16px"},item:{color:"color-gray-500"},activeItem:{color:"theme-primary",borderColor:"theme-primary"}}},hero:{views:{container:{backgroundColor:"color-white",color:"color-black",fontFamily:"'Inter', 'Coinbase Display', -apple-system, system-ui, sans-serif"},eyebrow:{color:"color-gray-500"},title:{color:"color-black",fontFamily:"'Inter', 'Coinbase Display', -apple-system, system-ui, sans-serif"},description:{color:"color-gray-500"}}},page:{views:{container:{backgroundColor:"color-white",color:"color-black",fontFamily:"'Inter', 'Coinbase Display', -apple-system, system-ui, sans-serif"},section:{backgroundColor:"color-white",borderColor:"color-gray-200"},surface:{backgroundColor:"color-gray-50",borderColor:"color-gray-200",color:"color-black"}}}},personality:{cornerStyle:"soft",typeWeight:"bold",typeCase:"normal",typeStyle:"normal",letterSpacing:"-0.01em",accentTreatment:"flat",signatureMotif:"◆",density:"comfortable",surfaceTone:"paper",cardRadius:12,pillRadius:9999,badgeRadius:6,voice:"trustworthy-financial"}},figma:{metadata:{id:"figma",label:"Figma",sourcePath:"design.md/html/figma.html",sourceTitle:"Design System Inspiration of Figma",defaultAppearance:"light",googleFontLinks:["https://fonts.googleapis.com/css2?family=Inter:wght@300..700&family=JetBrains+Mono:wght@400;500&display=swap"]},theme:{primary:"#F24E1E",secondary:"#A259FF",success:"#0ACF83",warning:"#FFC700",error:"#FF7262",canvas:"color-white",surface:"color-gray-50",text:"color-black",muted:"color-gray-500",border:"color-gray-200",onPrimary:"#ffffff"},tokens:{rawCssVars:{primary:"#000000","on-primary":"#ffffff",ink:"#000000",canvas:"#ffffff","inverse-canvas":"#000000","inverse-ink":"#ffffff",hairline:"#e6e6e6","hairline-soft":"#f1f1f1","surface-soft":"#f7f7f5","block-lime":"#dceeb1","block-lilac":"#c5b0f4","block-cream":"#f4ecd6","block-pink":"#efd4d4","block-mint":"#c8e6cd","block-coral":"#f3c9b6","block-navy":"#1f1d3d","accent-magenta":"#ff3d8b","semantic-success":"#1ea64a",sans:"'Inter', 'SF Pro Display', system-ui, -apple-system, Helvetica, sans-serif",mono:"'JetBrains Mono', 'SF Mono', Menlo, monospace"},colors:[{name:"primary",value:"#F24E1E",role:"primary"},{name:"on-primary",value:"#ffffff",role:"on primary"},{name:"ink",value:"#000000",role:"ink"},{name:"canvas",value:"#ffffff",role:"canvas"},{name:"inverse-canvas",value:"#000000",role:"inverse canvas"},{name:"inverse-ink",value:"#ffffff",role:"inverse ink"},{name:"hairline",value:"#e6e6e6",role:"hairline"},{name:"hairline-soft",value:"#f1f1f1",role:"hairline soft"},{name:"surface-soft",value:"#f7f7f5",role:"surface soft"},{name:"block-lime",value:"#dceeb1",role:"block lime"},{name:"block-lilac",value:"#c5b0f4",role:"block lilac"},{name:"block-cream",value:"#f4ecd6",role:"block cream"},{name:"block-pink",value:"#efd4d4",role:"block pink"},{name:"block-mint",value:"#c8e6cd",role:"block mint"},{name:"block-coral",value:"#f3c9b6",role:"block coral"},{name:"block-navy",value:"#1f1d3d",role:"block navy"},{name:"accent-magenta",value:"#ff3d8b",role:"accent magenta"},{name:"semantic-success",value:"#1ea64a",role:"semantic success"}],typography:{fontFamily:"'Inter', 'SF Pro Display', system-ui, -apple-system, Helvetica, sans-serif",monoFamily:"'JetBrains Mono', 'SF Mono', Menlo, monospace",fontSizes:["18px","16px","80px","20px","12px","40px","14px","11px","26px","24px","32px","13px","10px","56px","36px"],fontWeights:["320","330","480","600","500","700"],lineHeights:["1.45","1.0","1.4","1.1","1.6","1.35","1","1.2"]},spacing:["5px","6px","8px","10px","12px","14px","16px","20px","22px","24px","28px","32px","36px","40px","44px","48px","56px","64px","96px","100px"],radii:["50px","8px","9999px","24px","6px","2px","3px"],shadows:["0 0 0 2px rgba(0,0,0,0.08)","none","0 4px 16px rgba(0,0,0,0.06)","0 12px 32px rgba(0,0,0,0.18)"]},components:{button:{variant:"filled",size:"md",shape:"rounded",color:"theme-primary",textColor:"theme-onPrimary",views:{container:{borderRadius:9999,fontFamily:"'Inter', 'SF Pro Display', system-ui, -apple-system, Helvetica, sans-serif",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},content:{fontFamily:"'Inter', 'SF Pro Display', system-ui, -apple-system, Helvetica, sans-serif",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"}}},badge:{variant:"filled",size:"sm",shape:"rounded",views:{container:{backgroundColor:"theme-secondary",color:"color-white",borderColor:"theme-secondary",borderRadius:4,fontFamily:"'Inter', 'SF Pro Display', system-ui, -apple-system, Helvetica, sans-serif",letterSpacing:"-0.01em",textTransform:"none",fontWeight:700,fontStyle:"normal"},text:{fontFamily:"'Inter', 'SF Pro Display', system-ui, -apple-system, Helvetica, sans-serif",fontWeight:600}}},card:{variant:"outlined",size:"md",shape:"rounded",views:{container:{backgroundColor:"color-gray-50",borderColor:"color-gray-200",color:"theme-primary",borderRadius:8,borderWidth:"1px",borderStyle:"solid",boxShadow:"0 0 0 2px rgba(0,0,0,0.08)"},header:{color:"theme-primary",fontFamily:"'Inter', 'SF Pro Display', system-ui, -apple-system, Helvetica, sans-serif",fontWeight:600,borderColor:"color-gray-200"},content:{color:"color-gray-500",fontFamily:"'Inter', 'SF Pro Display', system-ui, -apple-system, Helvetica, sans-serif"},footer:{borderColor:"color-gray-200"}}},input:{size:"md",shape:"default",variant:"default",views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"theme-primary",borderRadius:10,borderWidth:"1px",borderStyle:"solid",boxShadow:"none"},field:{color:"theme-primary",fontFamily:"'Inter', 'SF Pro Display', system-ui, -apple-system, Helvetica, sans-serif",fontStyle:"normal",letterSpacing:"-0.01em"},label:{fontFamily:"'Inter', 'SF Pro Display', system-ui, -apple-system, Helvetica, sans-serif",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},helperText:{}}},textarea:{size:"md",shape:"default",variant:"default",views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"theme-primary",borderRadius:10,borderWidth:"1px",borderStyle:"solid",boxShadow:"none"},field:{color:"theme-primary",fontFamily:"'Inter', 'SF Pro Display', system-ui, -apple-system, Helvetica, sans-serif",fontStyle:"normal",letterSpacing:"-0.01em"},label:{fontFamily:"'Inter', 'SF Pro Display', system-ui, -apple-system, Helvetica, sans-serif",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},helperText:{}}},select:{size:"md",shape:"default",variant:"default",views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"theme-primary",borderRadius:10,borderWidth:"1px",borderStyle:"solid",boxShadow:"none"},field:{color:"theme-primary",fontFamily:"'Inter', 'SF Pro Display', system-ui, -apple-system, Helvetica, sans-serif"},label:{fontFamily:"'Inter', 'SF Pro Display', system-ui, -apple-system, Helvetica, sans-serif",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},helperText:{},text:{letterSpacing:"-0.01em",fontStyle:"normal"}}},checkbox:{size:"md",views:{checkbox:{borderColor:"color-gray-200",backgroundColor:"color-white",_checked:{backgroundColor:"theme-primary",borderColor:"theme-primary"},borderRadius:4},label:{fontFamily:"'Inter', 'SF Pro Display', system-ui, -apple-system, Helvetica, sans-serif",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},infoText:{color:"color-gray-500"},container:{borderRadius:4}}},radio:{size:"md",views:{radio:{borderColor:"color-gray-200",backgroundColor:"color-white"},dot:{backgroundColor:"theme-primary"},label:{fontFamily:"'Inter', 'SF Pro Display', system-ui, -apple-system, Helvetica, sans-serif",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},infoText:{color:"color-gray-500"},container:{borderRadius:"50%"}}},switch:{size:"sm",views:{slider:{backgroundColor:"color-gray-200"},circle:{backgroundColor:"color-white"},label:{fontFamily:"'Inter', 'SF Pro Display', system-ui, -apple-system, Helvetica, sans-serif",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},container:{borderRadius:"9999px"}}},slider:{backgroundColor:"theme-primary",views:{track:{backgroundColor:"color-gray-200"},progress:{backgroundColor:"theme-primary"},filledTrack:{backgroundColor:"theme-primary"},thumb:{borderColor:"theme-primary",backgroundColor:"color-white"},label:{color:"theme-primary"},valueLabel:{color:"color-gray-500"}}},tabs:{variant:"underline",views:{headerTabs:{borderColor:"color-gray-200"},tab:{color:"color-gray-500",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},activeTab:{color:"theme-primary",borderColor:"theme-primary",backgroundColor:"transparent"},title:{fontFamily:"'Inter', 'SF Pro Display', system-ui, -apple-system, Helvetica, sans-serif"},activeText:{color:"theme-primary"},content:{color:"theme-primary"},container:{borderRadius:"8px"}}},accordion:{views:{container:{borderColor:"color-gray-200",backgroundColor:"color-gray-50",color:"theme-primary",borderRadius:"12px"},trigger:{color:"theme-primary",fontFamily:"'Inter', 'SF Pro Display', system-ui, -apple-system, Helvetica, sans-serif"},content:{color:"color-gray-500"}}},table:{views:{table:{backgroundColor:"color-white",color:"theme-primary",borderColor:"color-gray-200",borderRadius:8},thead:{backgroundColor:"color-gray-50",color:"theme-primary"},th:{color:"color-gray-500",borderColor:"color-gray-200",fontFamily:"'JetBrains Mono', 'SF Mono', Menlo, monospace",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},tr:{borderColor:"color-gray-200"},td:{color:"theme-primary",borderColor:"color-gray-200",letterSpacing:"-0.01em",fontStyle:"normal"},caption:{color:"color-gray-500",fontStyle:"italic",letterSpacing:"-0.01em"}}},avatar:{views:{container:{backgroundColor:"color-gray-50",borderColor:"color-gray-200",color:"theme-primary",borderRadius:"50%"},fallback:{color:"theme-primary",fontFamily:"'Inter', 'SF Pro Display', system-ui, -apple-system, Helvetica, sans-serif"}}},alert:{views:{container:{backgroundColor:"color-gray-50",borderColor:"color-gray-200",borderRadius:8},title:{color:"theme-primary",fontFamily:"'Inter', 'SF Pro Display', system-ui, -apple-system, Helvetica, sans-serif",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},description:{color:"color-gray-500",fontFamily:"'Inter', 'SF Pro Display', system-ui, -apple-system, Helvetica, sans-serif"},icon:{color:"theme-primary"}}},status:{views:{indicator:{backgroundColor:"theme-success"},label:{color:"theme-primary",fontFamily:"'Inter', 'SF Pro Display', system-ui, -apple-system, Helvetica, sans-serif"}}},progress:{color:"theme-primary",backgroundColor:"color-gray-200",radius:"8px",views:{container:{backgroundColor:"color-gray-200",borderRadius:"9999px"},bar:{backgroundColor:"theme-primary"},text:{color:"theme-primary"}}},loader:{color:"theme-primary"},separator:{color:"color-gray-200",views:{container:{borderColor:"color-gray-200"},label:{color:"color-gray-500",fontFamily:"'Inter', 'SF Pro Display', system-ui, -apple-system, Helvetica, sans-serif"}}},navigation:{views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"theme-primary",borderRadius:"12px"},item:{color:"color-gray-500"},activeItem:{color:"theme-primary",borderColor:"theme-primary"}}},hero:{views:{container:{backgroundColor:"color-white",color:"theme-primary",fontFamily:"'Inter', 'SF Pro Display', system-ui, -apple-system, Helvetica, sans-serif"},eyebrow:{color:"color-gray-500"},title:{color:"theme-primary",fontFamily:"'Inter', 'SF Pro Display', system-ui, -apple-system, Helvetica, sans-serif"},description:{color:"color-gray-500"}}},page:{views:{container:{backgroundColor:"color-white",color:"theme-primary",fontFamily:"'Inter', 'SF Pro Display', system-ui, -apple-system, Helvetica, sans-serif"},section:{backgroundColor:"color-white",borderColor:"color-gray-200"},surface:{backgroundColor:"color-gray-50",borderColor:"color-gray-200",color:"theme-primary"}}}},personality:{cornerStyle:"soft",typeWeight:"bold",typeCase:"normal",typeStyle:"normal",letterSpacing:"-0.01em",accentTreatment:"flat",signatureMotif:"✦",density:"comfortable",surfaceTone:"paper",cardRadius:8,pillRadius:9999,badgeRadius:4,voice:"playful-creative"}},linear:{metadata:{id:"linear",label:"Linear",sourcePath:"design.md/html/linear.html",sourceTitle:"Design System Inspiration of Linear",defaultAppearance:"dark",googleFontLinks:["https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=JetBrains+Mono:wght@400&display=swap"]},theme:{primary:"#5e6ad2",secondary:"#828fff",success:"#27a644",warning:"#5e69d1",error:"#828fff",canvas:"color-white",surface:"color-gray-50",text:"color-black",muted:"color-gray-500",border:"color-gray-200",onPrimary:"#ffffff"},tokens:{rawCssVars:{primary:"#5e6ad2","primary-hover":"#828fff","primary-focus":"#5e69d1","on-primary":"#ffffff",ink:"#f7f8f8","ink-muted":"#d0d6e0","ink-subtle":"#8a8f98","ink-tertiary":"#62666d",canvas:"#010102","surface-1":"#0f1011","surface-2":"#141516","surface-3":"#18191a","surface-4":"#191a1b",hairline:"#23252a","hairline-strong":"#34343a","hairline-tertiary":"#3e3e44","semantic-success":"#27a644",sans:"'Inter', 'SF Pro Display', system-ui, -apple-system, sans-serif",mono:"'JetBrains Mono', ui-monospace, 'SF Mono', menlo, monospace"},colors:[{name:"primary",value:"#5e6ad2",role:"primary"},{name:"primary-hover",value:"#828fff",role:"primary hover"},{name:"primary-focus",value:"#5e69d1",role:"primary focus"},{name:"on-primary",value:"#ffffff",role:"on primary"},{name:"ink",value:"#f7f8f8",role:"ink"},{name:"ink-muted",value:"#d0d6e0",role:"ink muted"},{name:"ink-subtle",value:"#8a8f98",role:"ink subtle"},{name:"ink-tertiary",value:"#62666d",role:"ink tertiary"},{name:"canvas",value:"#08090A",role:"canvas"},{name:"surface-1",value:"#0f1011",role:"surface 1"},{name:"surface-2",value:"#141516",role:"surface 2"},{name:"surface-3",value:"#18191a",role:"surface 3"},{name:"surface-4",value:"#191a1b",role:"surface 4"},{name:"hairline",value:"#23252a",role:"hairline"},{name:"hairline-strong",value:"#34343a",role:"hairline strong"},{name:"hairline-tertiary",value:"#3e3e44",role:"hairline tertiary"},{name:"semantic-success",value:"#27a644",role:"semantic success"}],typography:{fontFamily:"'Inter', 'SF Pro Display', system-ui, -apple-system, sans-serif",monoFamily:"'JetBrains Mono', ui-monospace, 'SF Mono', menlo, monospace",fontSizes:["16px","14px","80px","18px","13px","56px","15px","12px","11px","28px","40px","22px","10px","36px"],fontWeights:["400","500","600","700"],lineHeights:["1.50","1.05","1.20","1.10","1.5","1.6","1.25","1","1.2","1.35","1.4"]},spacing:["2px","5px","6px","8px","10px","12px","14px","16px","20px","24px","28px","32px","36px","40px","48px","56px","64px","80px","96px","120px"],radii:["8px","12px","9999px","16px","4px","2px","6px","3px"],shadows:["rgba(255,255,255,0.05) 0 0.5px 0 0.5px","0 0 0 2px rgba(94,105,209,0.25)"]},components:{button:{variant:"filled",size:"md",shape:"rounded",color:"theme-primary",textColor:"theme-on-primary",views:{container:{borderRadius:9999,fontFamily:"'Inter', 'SF Pro Display', system-ui, -apple-system, sans-serif",fontWeight:700,letterSpacing:"-0.025em",textTransform:"none",fontStyle:"normal"},content:{fontFamily:"'Inter', 'SF Pro Display', system-ui, -apple-system, sans-serif",fontWeight:700,letterSpacing:"-0.025em",textTransform:"none",fontStyle:"normal"}}},badge:{variant:"filled",size:"sm",shape:"rounded",views:{container:{backgroundColor:"theme-secondary",color:"theme-on-primary",borderColor:"theme-secondary",borderRadius:6,fontFamily:"'Inter', 'SF Pro Display', system-ui, -apple-system, sans-serif",letterSpacing:"-0.025em",textTransform:"none",fontWeight:700,fontStyle:"normal"},text:{fontFamily:"'Inter', 'SF Pro Display', system-ui, -apple-system, sans-serif",fontWeight:600}}},card:{variant:"outlined",size:"md",shape:"rounded",views:{container:{backgroundColor:"color-gray-50",borderColor:"color-gray-200",color:"color-black",borderRadius:12,borderWidth:"1px",borderStyle:"solid",boxShadow:"rgba(255,255,255,0.05) 0 0.5px 0 0.5px"},header:{color:"color-black",fontFamily:"'Inter', 'SF Pro Display', system-ui, -apple-system, sans-serif",fontWeight:600,borderColor:"color-gray-200"},content:{color:"color-gray-500",fontFamily:"'Inter', 'SF Pro Display', system-ui, -apple-system, sans-serif"},footer:{borderColor:"color-gray-200"}}},input:{size:"md",shape:"default",variant:"default",views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"color-black",borderRadius:10,borderWidth:"1px",borderStyle:"solid",boxShadow:"none"},field:{color:"color-black",fontFamily:"'Inter', 'SF Pro Display', system-ui, -apple-system, sans-serif",fontStyle:"normal",letterSpacing:"-0.025em"},label:{fontFamily:"'Inter', 'SF Pro Display', system-ui, -apple-system, sans-serif",fontWeight:700,letterSpacing:"-0.025em",textTransform:"none",fontStyle:"normal"},helperText:{}}},textarea:{size:"md",shape:"default",variant:"default",views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"color-black",borderRadius:10,borderWidth:"1px",borderStyle:"solid",boxShadow:"none"},field:{color:"color-black",fontFamily:"'Inter', 'SF Pro Display', system-ui, -apple-system, sans-serif",fontStyle:"normal",letterSpacing:"-0.025em"},label:{fontFamily:"'Inter', 'SF Pro Display', system-ui, -apple-system, sans-serif",fontWeight:700,letterSpacing:"-0.025em",textTransform:"none",fontStyle:"normal"},helperText:{}}},select:{size:"md",shape:"default",variant:"default",views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"color-black",borderRadius:10,borderWidth:"1px",borderStyle:"solid",boxShadow:"none"},field:{color:"color-black",fontFamily:"'Inter', 'SF Pro Display', system-ui, -apple-system, sans-serif"},label:{fontFamily:"'Inter', 'SF Pro Display', system-ui, -apple-system, sans-serif",fontWeight:700,letterSpacing:"-0.025em",textTransform:"none",fontStyle:"normal"},helperText:{},text:{letterSpacing:"-0.025em",fontStyle:"normal"}}},checkbox:{size:"md",views:{checkbox:{borderColor:"color-gray-200",backgroundColor:"color-white",_checked:{backgroundColor:"theme-primary",borderColor:"theme-primary"},borderRadius:4},label:{fontFamily:"'Inter', 'SF Pro Display', system-ui, -apple-system, sans-serif",fontWeight:700,letterSpacing:"-0.025em",textTransform:"none",fontStyle:"normal"},infoText:{color:"color-gray-500"},container:{borderRadius:4}}},radio:{size:"md",views:{radio:{borderColor:"color-gray-200",backgroundColor:"color-white"},dot:{backgroundColor:"theme-primary"},label:{fontFamily:"'Inter', 'SF Pro Display', system-ui, -apple-system, sans-serif",fontWeight:700,letterSpacing:"-0.025em",textTransform:"none",fontStyle:"normal"},infoText:{color:"color-gray-500"},container:{borderRadius:"50%"}}},switch:{size:"sm",views:{slider:{backgroundColor:"color-gray-200"},circle:{backgroundColor:"color-white"},label:{fontFamily:"'Inter', 'SF Pro Display', system-ui, -apple-system, sans-serif",fontWeight:700,letterSpacing:"-0.025em",textTransform:"none",fontStyle:"normal"},container:{borderRadius:"9999px"}}},slider:{backgroundColor:"theme-primary",views:{track:{backgroundColor:"color-gray-200"},progress:{backgroundColor:"theme-primary"},filledTrack:{backgroundColor:"theme-primary"},thumb:{borderColor:"theme-primary",backgroundColor:"color-white"},label:{color:"color-black"},valueLabel:{color:"color-gray-500"}}},tabs:{variant:"underline",views:{headerTabs:{borderColor:"color-gray-200"},tab:{color:"color-gray-500",fontWeight:700,letterSpacing:"-0.025em",textTransform:"none",fontStyle:"normal"},activeTab:{color:"theme-primary",borderColor:"theme-primary",backgroundColor:"transparent"},title:{fontFamily:"'Inter', 'SF Pro Display', system-ui, -apple-system, sans-serif"},activeText:{color:"theme-primary"},content:{color:"color-black"},container:{borderRadius:"8px"}}},accordion:{views:{container:{borderColor:"color-gray-200",backgroundColor:"color-gray-50",color:"color-black",borderRadius:"12px"},trigger:{color:"color-black",fontFamily:"'Inter', 'SF Pro Display', system-ui, -apple-system, sans-serif"},content:{color:"color-gray-500"}}},table:{views:{table:{backgroundColor:"color-white",color:"color-black",borderColor:"color-gray-200",borderRadius:12},thead:{backgroundColor:"color-gray-50",color:"color-black"},th:{color:"color-gray-500",borderColor:"color-gray-200",fontFamily:"'JetBrains Mono', ui-monospace, 'SF Mono', menlo, monospace",fontWeight:700,letterSpacing:"-0.025em",textTransform:"none",fontStyle:"normal"},tr:{borderColor:"color-gray-200"},td:{color:"color-black",borderColor:"color-gray-200",letterSpacing:"-0.025em",fontStyle:"normal"},caption:{color:"color-gray-500",fontStyle:"italic",letterSpacing:"-0.025em"}}},avatar:{views:{container:{backgroundColor:"color-gray-50",borderColor:"color-gray-200",color:"color-black",borderRadius:"50%"},fallback:{color:"color-black",fontFamily:"'Inter', 'SF Pro Display', system-ui, -apple-system, sans-serif"}}},alert:{views:{container:{backgroundColor:"color-gray-50",borderColor:"color-gray-200",borderRadius:12},title:{color:"color-black",fontFamily:"'Inter', 'SF Pro Display', system-ui, -apple-system, sans-serif",fontWeight:700,letterSpacing:"-0.025em",textTransform:"none",fontStyle:"normal"},description:{color:"color-gray-500",fontFamily:"'Inter', 'SF Pro Display', system-ui, -apple-system, sans-serif"},icon:{color:"theme-primary"}}},status:{views:{indicator:{backgroundColor:"theme-success"},label:{color:"color-black",fontFamily:"'Inter', 'SF Pro Display', system-ui, -apple-system, sans-serif"}}},progress:{color:"theme-primary",backgroundColor:"color-gray-200",radius:"8px",views:{container:{backgroundColor:"color-gray-200",borderRadius:"9999px"},bar:{backgroundColor:"theme-primary"},text:{color:"color-black"}}},loader:{color:"theme-primary"},separator:{color:"color-gray-200",views:{container:{borderColor:"color-gray-200"},label:{color:"color-gray-500",fontFamily:"'Inter', 'SF Pro Display', system-ui, -apple-system, sans-serif"}}},navigation:{views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"color-black",borderRadius:"12px"},item:{color:"color-gray-500"},activeItem:{color:"theme-primary",borderColor:"theme-primary"}}},hero:{views:{container:{backgroundColor:"color-white",color:"color-black",fontFamily:"'Inter', 'SF Pro Display', system-ui, -apple-system, sans-serif"},eyebrow:{color:"color-gray-500"},title:{color:"color-black",fontFamily:"'Inter', 'SF Pro Display', system-ui, -apple-system, sans-serif"},description:{color:"color-gray-500"}}},page:{views:{container:{backgroundColor:"color-white",color:"color-black",fontFamily:"'Inter', 'SF Pro Display', system-ui, -apple-system, sans-serif"},section:{backgroundColor:"color-white",borderColor:"color-gray-200"},surface:{backgroundColor:"color-gray-50",borderColor:"color-gray-200",color:"color-black"}}}},personality:{cornerStyle:"soft",typeWeight:"bold",typeCase:"normal",typeStyle:"normal",letterSpacing:"-0.025em",accentTreatment:"gradient",signatureMotif:"↗",density:"tight",surfaceTone:"glass",cardRadius:12,pillRadius:9999,badgeRadius:6,voice:"speed-clarity"}},nike:{metadata:{id:"nike",label:"Nike",sourcePath:"design.md/html/nike.html",sourceTitle:"Design System Inspiration of Nike",defaultAppearance:"light",googleFontLinks:["https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap"]},theme:{primary:"color-black",secondary:"#FA5400",success:"#76E0B5",warning:"#1151ff",error:"#d30005",canvas:"color-white",surface:"color-gray-50",text:"color-black",muted:"color-gray-500",border:"color-gray-200",onPrimary:"color-white"},tokens:{rawCssVars:{ink:"#111111","on-primary":"#ffffff",canvas:"#ffffff","soft-cloud":"#f5f5f5",charcoal:"#39393b",ash:"#4b4b4d",mute:"#707072",stone:"#9e9ea0",hairline:"#cacacb","hairline-soft":"#e5e5e5",sale:"#d30005","sale-deep":"#780700",success:"#007d48","success-bright":"#1eaa52",info:"#1151ff","info-deep":"#0034e3","accent-pink":"#ed1aa0","accent-pink-soft":"#ffb0dd","accent-purple-soft":"#beaffd","accent-purple-pale":"#d6d1ff","accent-teal":"#0a7281","accent-pink-deep":"#4c012d","font-display":"'Helvetica Now Display', 'Helvetica Neue', 'Inter', Helvetica, Arial, sans-serif","font-ui":"'Inter', 'Helvetica Now Text Medium', Helvetica, Arial, sans-serif","font-body":"'Inter', 'Helvetica Now Text', Helvetica, Arial, sans-serif"},colors:[{name:"ink",value:"#111111",role:"ink"},{name:"on-primary",value:"#ffffff",role:"on primary"},{name:"canvas",value:"#ffffff",role:"canvas"},{name:"soft-cloud",value:"#f5f5f5",role:"soft cloud"},{name:"charcoal",value:"#39393b",role:"charcoal"},{name:"ash",value:"#4b4b4d",role:"ash"},{name:"mute",value:"#707072",role:"mute"},{name:"stone",value:"#9e9ea0",role:"stone"},{name:"hairline",value:"#cacacb",role:"hairline"},{name:"hairline-soft",value:"#e5e5e5",role:"hairline soft"},{name:"sale",value:"#d30005",role:"sale"},{name:"sale-deep",value:"#780700",role:"sale deep"},{name:"success",value:"#76E0B5",role:"success"},{name:"success-bright",value:"#1eaa52",role:"success bright"},{name:"info",value:"#1151ff",role:"info"},{name:"info-deep",value:"#0034e3",role:"info deep"},{name:"accent-pink",value:"#ed1aa0",role:"accent pink"},{name:"accent-pink-soft",value:"#ffb0dd",role:"accent pink soft"},{name:"accent-purple-soft",value:"#beaffd",role:"accent purple soft"},{name:"accent-purple-pale",value:"#d6d1ff",role:"accent purple pale"},{name:"accent-teal",value:"#0a7281",role:"accent teal"},{name:"accent-pink-deep",value:"#4c012d",role:"accent pink deep"}],typography:{fontFamily:"'Helvetica Now Display', 'Helvetica Neue', 'Inter', Helvetica, Arial, sans-serif",monoFamily:"ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace",fontSizes:["16px","15px","14px","96px","18px","12px","56px","13px","11px","24px","40px","64px","48px","32px"],fontWeights:["700","500","600"],lineHeights:["1.5","0.92","1","1.4","1.6","0.9","1.2","1.75","1.7","1.35"]},spacing:["2px","4px","5px","6px","8px","10px","12px","14px","16px","18px","20px","24px","28px","30px","32px","36px","40px","44px","48px","56px"],radii:["9999px","24px","14px","6px","3px"],shadows:["0 0 0 12px var(--soft-cloud)","0 20px 30px -10px rgba(0,0,0,0.18)","0 0 0 2px var(--canvas), 0 0 0 4px var(--ink)","inset 0 -1px 0 var(--hairline-soft)"]},components:{button:{variant:"filled",size:"md",shape:"square",color:"theme-primary",textColor:"theme-onPrimary",views:{container:{borderRadius:0,fontFamily:"'Helvetica Now Display', 'Helvetica Neue', 'Inter', Helvetica, Arial, sans-serif",fontWeight:800,letterSpacing:"0.08em",textTransform:"uppercase",fontStyle:"italic"},content:{fontFamily:"'Helvetica Now Display', 'Helvetica Neue', 'Inter', Helvetica, Arial, sans-serif",fontWeight:800,letterSpacing:"0.08em",textTransform:"uppercase",fontStyle:"italic"}}},badge:{variant:"filled",size:"sm",shape:"pill",views:{container:{backgroundColor:"theme-secondary",color:"color-white",borderColor:"theme-secondary",borderRadius:0,fontFamily:"'Helvetica Now Display', 'Helvetica Neue', 'Inter', Helvetica, Arial, sans-serif",letterSpacing:"0.08em",textTransform:"uppercase",fontWeight:800,fontStyle:"italic"},text:{fontFamily:"'Helvetica Now Display', 'Helvetica Neue', 'Inter', Helvetica, Arial, sans-serif",fontWeight:600}}},card:{variant:"outlined",size:"md",shape:"square",views:{container:{backgroundColor:"theme-secondary",borderColor:"color-gray-200",color:"theme-primary",borderRadius:4,borderWidth:"1px",borderStyle:"solid",boxShadow:"0 0 0 12px var(--soft-cloud)"},header:{color:"theme-primary",fontFamily:"'Helvetica Now Display', 'Helvetica Neue', 'Inter', Helvetica, Arial, sans-serif",fontWeight:600,borderColor:"color-gray-200"},content:{color:"color-gray-500",fontFamily:"'Helvetica Now Display', 'Helvetica Neue', 'Inter', Helvetica, Arial, sans-serif"},footer:{borderColor:"color-gray-200"}}},input:{size:"md",shape:"default",variant:"default",views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"theme-primary",borderRadius:2,borderWidth:"1px",borderStyle:"solid",boxShadow:"none"},field:{color:"theme-primary",fontFamily:"'Helvetica Now Display', 'Helvetica Neue', 'Inter', Helvetica, Arial, sans-serif",fontStyle:"italic",letterSpacing:"0.02em"},label:{fontFamily:"'Helvetica Now Display', 'Helvetica Neue', 'Inter', Helvetica, Arial, sans-serif",fontWeight:800,letterSpacing:"0.02em",textTransform:"uppercase",fontStyle:"italic"},helperText:{}}},textarea:{size:"md",shape:"default",variant:"default",views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"theme-primary",borderRadius:2,borderWidth:"1px",borderStyle:"solid",boxShadow:"none"},field:{color:"theme-primary",fontFamily:"'Helvetica Now Display', 'Helvetica Neue', 'Inter', Helvetica, Arial, sans-serif",fontStyle:"italic",letterSpacing:"0.02em"},label:{fontFamily:"'Helvetica Now Display', 'Helvetica Neue', 'Inter', Helvetica, Arial, sans-serif",fontWeight:800,letterSpacing:"0.02em",textTransform:"uppercase",fontStyle:"italic"},helperText:{}}},select:{size:"md",shape:"default",variant:"default",views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"theme-primary",borderRadius:2,borderWidth:"1px",borderStyle:"solid",boxShadow:"none"},field:{color:"theme-primary",fontFamily:"'Helvetica Now Display', 'Helvetica Neue', 'Inter', Helvetica, Arial, sans-serif"},label:{fontFamily:"'Helvetica Now Display', 'Helvetica Neue', 'Inter', Helvetica, Arial, sans-serif",fontWeight:800,letterSpacing:"0.02em",textTransform:"uppercase",fontStyle:"italic"},helperText:{},text:{letterSpacing:"0.02em",fontStyle:"italic"}}},checkbox:{size:"md",views:{checkbox:{borderColor:"color-gray-200",backgroundColor:"color-white",_checked:{backgroundColor:"theme-primary",borderColor:"theme-primary"},borderRadius:0},label:{fontFamily:"'Helvetica Now Display', 'Helvetica Neue', 'Inter', Helvetica, Arial, sans-serif",fontWeight:800,letterSpacing:"0.02em",textTransform:"uppercase",fontStyle:"italic"},infoText:{color:"color-gray-500"},container:{borderRadius:0}}},radio:{size:"md",views:{radio:{borderColor:"color-gray-200",backgroundColor:"color-white"},dot:{backgroundColor:"theme-primary"},label:{fontFamily:"'Helvetica Now Display', 'Helvetica Neue', 'Inter', Helvetica, Arial, sans-serif",fontWeight:800,letterSpacing:"0.02em",textTransform:"uppercase",fontStyle:"italic"},infoText:{color:"color-gray-500"},container:{borderRadius:"50%"}}},switch:{size:"sm",views:{slider:{backgroundColor:"color-gray-200"},circle:{backgroundColor:"color-white"},label:{fontFamily:"'Helvetica Now Display', 'Helvetica Neue', 'Inter', Helvetica, Arial, sans-serif",fontWeight:800,letterSpacing:"0.02em",textTransform:"uppercase",fontStyle:"italic"},container:{borderRadius:"9999px"}}},slider:{backgroundColor:"theme-primary",views:{track:{backgroundColor:"color-gray-200"},progress:{backgroundColor:"theme-primary"},filledTrack:{backgroundColor:"theme-primary"},thumb:{borderColor:"theme-primary",backgroundColor:"color-white"},label:{color:"theme-primary"},valueLabel:{color:"color-gray-500"}}},tabs:{variant:"pill",views:{headerTabs:{borderColor:"color-gray-200"},tab:{color:"color-gray-500",fontWeight:800,letterSpacing:"0.02em",textTransform:"uppercase",fontStyle:"italic"},activeTab:{color:"theme-primary",borderColor:"theme-primary",backgroundColor:"theme-primary"},title:{fontFamily:"'Helvetica Now Display', 'Helvetica Neue', 'Inter', Helvetica, Arial, sans-serif"},activeText:{color:"color-white"},content:{color:"theme-primary"},container:{borderRadius:"9999px"}}},accordion:{views:{container:{borderColor:"color-gray-200",backgroundColor:"theme-secondary",color:"theme-primary",borderRadius:0},trigger:{color:"theme-primary",fontFamily:"'Helvetica Now Display', 'Helvetica Neue', 'Inter', Helvetica, Arial, sans-serif"},content:{color:"color-gray-500"}}},table:{views:{table:{backgroundColor:"color-white",color:"theme-primary",borderColor:"color-gray-200",borderRadius:4},thead:{backgroundColor:"theme-secondary",color:"theme-primary"},th:{color:"color-gray-500",borderColor:"color-gray-200",fontFamily:"ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace",fontWeight:800,letterSpacing:"0.02em",textTransform:"uppercase",fontStyle:"italic"},tr:{borderColor:"color-gray-200"},td:{color:"theme-primary",borderColor:"color-gray-200",letterSpacing:"0.02em",fontStyle:"italic"},caption:{color:"color-gray-500",fontStyle:"italic",letterSpacing:"0.02em"}}},avatar:{views:{container:{backgroundColor:"theme-secondary",borderColor:"color-gray-200",color:"theme-primary",borderRadius:"50%"},fallback:{color:"theme-primary",fontFamily:"'Helvetica Now Display', 'Helvetica Neue', 'Inter', Helvetica, Arial, sans-serif"}}},alert:{views:{container:{backgroundColor:"theme-secondary",borderColor:"color-gray-200",borderRadius:4},title:{color:"theme-primary",fontFamily:"'Helvetica Now Display', 'Helvetica Neue', 'Inter', Helvetica, Arial, sans-serif",fontWeight:800,letterSpacing:"0.02em",textTransform:"uppercase",fontStyle:"italic"},description:{color:"color-gray-500",fontFamily:"'Helvetica Now Display', 'Helvetica Neue', 'Inter', Helvetica, Arial, sans-serif"},icon:{color:"theme-primary"}}},status:{views:{indicator:{backgroundColor:"theme-success"},label:{color:"theme-primary",fontFamily:"'Helvetica Now Display', 'Helvetica Neue', 'Inter', Helvetica, Arial, sans-serif"}}},progress:{color:"theme-primary",backgroundColor:"color-gray-200",radius:0,views:{container:{backgroundColor:"color-gray-200",borderRadius:"9999px"},bar:{backgroundColor:"theme-primary"},text:{color:"theme-primary"}}},loader:{color:"theme-primary"},separator:{color:"color-gray-200",views:{container:{borderColor:"color-gray-200"},label:{color:"color-gray-500",fontFamily:"'Helvetica Now Display', 'Helvetica Neue', 'Inter', Helvetica, Arial, sans-serif"}}},navigation:{views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"theme-primary",borderRadius:0},item:{color:"color-gray-500"},activeItem:{color:"theme-primary",borderColor:"theme-primary"}}},hero:{views:{container:{backgroundColor:"color-white",color:"theme-primary",fontFamily:"'Helvetica Now Display', 'Helvetica Neue', 'Inter', Helvetica, Arial, sans-serif"},eyebrow:{color:"color-gray-500"},title:{color:"theme-primary",fontFamily:"'Helvetica Now Display', 'Helvetica Neue', 'Inter', Helvetica, Arial, sans-serif"},description:{color:"color-gray-500"}}},page:{views:{container:{backgroundColor:"color-white",color:"theme-primary",fontFamily:"'Helvetica Now Display', 'Helvetica Neue', 'Inter', Helvetica, Arial, sans-serif"},section:{backgroundColor:"color-white",borderColor:"color-gray-200"},surface:{backgroundColor:"theme-secondary",borderColor:"color-gray-200",color:"theme-primary"}}}},personality:{cornerStyle:"sharp",typeWeight:"black",typeCase:"uppercase",typeStyle:"italic",letterSpacing:"0.02em",accentTreatment:"flat",signatureMotif:"▶",density:"tight",surfaceTone:"mono",cardRadius:4,pillRadius:0,badgeRadius:0,voice:"athletic-bold"}},notion:{metadata:{id:"notion",label:"Notion",sourcePath:"design.md/html/notion.html",sourceTitle:"Design System Inspiration of Notion",defaultAppearance:"light",googleFontLinks:["https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap"]},theme:{primary:"#5645d4",secondary:"#ff64c8",success:"#1aae39",warning:"#dd5b00",error:"#ff64c8",canvas:"color-white",surface:"color-gray-50",text:"color-black",muted:"color-gray-500",border:"color-gray-200",onPrimary:"#ffffff"},tokens:{rawCssVars:{primary:"#5645d4","primary-pressed":"#4534b3","primary-deep":"#3a2a99","on-primary":"#ffffff","brand-navy":"#0a1530","brand-navy-deep":"#070f24","link-blue":"#0075de","brand-pink":"#ff64c8","brand-orange":"#dd5b00","brand-purple":"#7b3ff2","brand-purple-800":"#391c57","brand-orange-deep":"#793400","brand-green":"#1aae39","brand-yellow":"#f5d75e","brand-teal":"#2a9d99","tint-peach":"#ffe8d4","tint-rose":"#fde0ec","tint-mint":"#d9f3e1","tint-lavender":"#e6e0f5","tint-sky":"#dcecfa","tint-yellow":"#fef7d6","tint-yellow-bold":"#f9e79f","tint-cream":"#f8f5e8",canvas:"#ffffff",surface:"#f6f5f4","surface-soft":"#fafaf9",hairline:"#e5e3df","hairline-soft":"#ede9e4","hairline-strong":"#c8c4be","hairline-dark":"rgba(255,255,255,0.16)","ink-deep":"#000000",ink:"#1a1a1a",charcoal:"#37352f",slate:"#5d5b54",steel:"#787671",stone:"#a4a097",muted:"#bbb8b1","on-dark":"#ffffff","on-dark-muted":"#a4a097"},colors:[{name:"primary",value:"#5645d4",role:"primary"},{name:"primary-pressed",value:"#4534b3",role:"primary pressed"},{name:"primary-deep",value:"#3a2a99",role:"primary deep"},{name:"on-primary",value:"#ffffff",role:"on primary"},{name:"brand-navy",value:"#0a1530",role:"brand navy"},{name:"brand-navy-deep",value:"#070f24",role:"brand navy deep"},{name:"link-blue",value:"#0075de",role:"link blue"},{name:"brand-pink",value:"#ff64c8",role:"brand pink"},{name:"brand-orange",value:"#dd5b00",role:"brand orange"},{name:"brand-purple",value:"#7b3ff2",role:"brand purple"},{name:"brand-purple-800",value:"#391c57",role:"brand purple 800"},{name:"brand-orange-deep",value:"#793400",role:"brand orange deep"},{name:"brand-green",value:"#1aae39",role:"brand green"},{name:"brand-yellow",value:"#f5d75e",role:"brand yellow"},{name:"brand-teal",value:"#2a9d99",role:"brand teal"},{name:"tint-peach",value:"#ffe8d4",role:"tint peach"},{name:"tint-rose",value:"#fde0ec",role:"tint rose"},{name:"tint-mint",value:"#d9f3e1",role:"tint mint"},{name:"tint-lavender",value:"#e6e0f5",role:"tint lavender"},{name:"tint-sky",value:"#dcecfa",role:"tint sky"},{name:"tint-yellow",value:"#fef7d6",role:"tint yellow"},{name:"tint-yellow-bold",value:"#f9e79f",role:"tint yellow bold"},{name:"tint-cream",value:"#f8f5e8",role:"tint cream"},{name:"canvas",value:"#ffffff",role:"canvas"},{name:"surface",value:"#f6f5f4",role:"surface"},{name:"surface-soft",value:"#fafaf9",role:"surface soft"},{name:"hairline",value:"#e5e3df",role:"hairline"},{name:"hairline-soft",value:"#ede9e4",role:"hairline soft"},{name:"hairline-strong",value:"#c8c4be",role:"hairline strong"},{name:"hairline-dark",value:"rgba(255,255,255,0.16)",role:"hairline dark"},{name:"ink-deep",value:"#000000",role:"ink deep"},{name:"ink",value:"#1a1a1a",role:"ink"},{name:"charcoal",value:"#37352f",role:"charcoal"},{name:"slate",value:"#5d5b54",role:"slate"},{name:"steel",value:"#787671",role:"steel"},{name:"stone",value:"#a4a097",role:"stone"},{name:"muted",value:"#bbb8b1",role:"muted"},{name:"on-dark",value:"#ffffff",role:"on dark"},{name:"on-dark-muted",value:"#a4a097",role:"on dark muted"}],typography:{fontFamily:"'Inter', -apple-system, BlinkMacSystemFont, sans-serif",monoFamily:"ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace",fontSizes:["14px","15px","12px","80px","18px","48px","16px","13px","22px","11px","56px","36px","10px","20px","28px"],fontWeights:["500","600","400","700"],lineHeights:["1.55","1","1.05","1.15","1.4","1.3","1.5","1.1","1.2","1.35"]},spacing:["2px","4px","5px","6px","8px","10px","11px","12px","14px","15px","16px","18px","20px","24px","31px","32px","40px","44px","48px","56px"],radii:["6px","8px","16px","50%","12px","9999px","4px","3px"],shadows:["rgba(15, 15, 15, 0.20) 0px 24px 48px -8px","rgba(15,15,15,0.04) 0px 1px 2px 0px","rgba(15,15,15,0.08) 0px 4px 12px 0px","rgba(15,15,15,0.20) 0px 24px 48px -8px","rgba(15,15,15,0.16) 0px 16px 48px -8px"]},components:{button:{variant:"filled",size:"md",shape:"rounded",color:"theme-primary",textColor:"theme-onPrimary",views:{container:{borderRadius:9999,fontFamily:"'Inter', -apple-system, BlinkMacSystemFont, sans-serif",fontWeight:400,letterSpacing:"0em",textTransform:"none",fontStyle:"normal"},content:{fontFamily:"'Inter', -apple-system, BlinkMacSystemFont, sans-serif",fontWeight:400,letterSpacing:"0em",textTransform:"none",fontStyle:"normal"}}},badge:{variant:"filled",size:"sm",shape:"rounded",views:{container:{backgroundColor:"theme-secondary",color:"color-white",borderColor:"theme-secondary",borderRadius:4,fontFamily:"'Inter', -apple-system, BlinkMacSystemFont, sans-serif",letterSpacing:"0em",textTransform:"none",fontWeight:400,fontStyle:"normal"},text:{fontFamily:"'Inter', -apple-system, BlinkMacSystemFont, sans-serif",fontWeight:600}}},card:{variant:"outlined",size:"md",shape:"rounded",views:{container:{backgroundColor:"color-gray-50",borderColor:"color-gray-200",color:"color-black",borderRadius:10,borderWidth:"1px",borderStyle:"solid",boxShadow:"rgba(15, 15, 15, 0.20) 0px 24px 48px -8px"},header:{color:"color-black",fontFamily:"'Inter', -apple-system, BlinkMacSystemFont, sans-serif",fontWeight:600,borderColor:"color-gray-200"},content:{color:"color-gray-500",fontFamily:"'Inter', -apple-system, BlinkMacSystemFont, sans-serif"},footer:{borderColor:"color-gray-200"}}},input:{size:"md",shape:"default",variant:"default",views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"color-black",borderRadius:10,borderWidth:"1px",borderStyle:"solid",boxShadow:"none"},field:{color:"color-black",fontFamily:"'Inter', -apple-system, BlinkMacSystemFont, sans-serif",fontStyle:"normal",letterSpacing:"0em"},label:{fontFamily:"'Inter', -apple-system, BlinkMacSystemFont, sans-serif",fontWeight:400,letterSpacing:"0em",textTransform:"none",fontStyle:"normal"},helperText:{}}},textarea:{size:"md",shape:"default",variant:"default",views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"color-black",borderRadius:10,borderWidth:"1px",borderStyle:"solid",boxShadow:"none"},field:{color:"color-black",fontFamily:"'Inter', -apple-system, BlinkMacSystemFont, sans-serif",fontStyle:"normal",letterSpacing:"0em"},label:{fontFamily:"'Inter', -apple-system, BlinkMacSystemFont, sans-serif",fontWeight:400,letterSpacing:"0em",textTransform:"none",fontStyle:"normal"},helperText:{}}},select:{size:"md",shape:"default",variant:"default",views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"color-black",borderRadius:10,borderWidth:"1px",borderStyle:"solid",boxShadow:"none"},field:{color:"color-black",fontFamily:"'Inter', -apple-system, BlinkMacSystemFont, sans-serif"},label:{fontFamily:"'Inter', -apple-system, BlinkMacSystemFont, sans-serif",fontWeight:400,letterSpacing:"0em",textTransform:"none",fontStyle:"normal"},helperText:{},text:{letterSpacing:"0em",fontStyle:"normal"}}},checkbox:{size:"md",views:{checkbox:{borderColor:"color-gray-200",backgroundColor:"color-white",_checked:{backgroundColor:"theme-primary",borderColor:"theme-primary"},borderRadius:4},label:{fontFamily:"'Inter', -apple-system, BlinkMacSystemFont, sans-serif",fontWeight:400,letterSpacing:"0em",textTransform:"none",fontStyle:"normal"},infoText:{color:"color-gray-500"},container:{borderRadius:4}}},radio:{size:"md",views:{radio:{borderColor:"color-gray-200",backgroundColor:"color-white"},dot:{backgroundColor:"theme-primary"},label:{fontFamily:"'Inter', -apple-system, BlinkMacSystemFont, sans-serif",fontWeight:400,letterSpacing:"0em",textTransform:"none",fontStyle:"normal"},infoText:{color:"color-gray-500"},container:{borderRadius:"50%"}}},switch:{size:"sm",views:{slider:{backgroundColor:"color-gray-200"},circle:{backgroundColor:"color-white"},label:{fontFamily:"'Inter', -apple-system, BlinkMacSystemFont, sans-serif",fontWeight:400,letterSpacing:"0em",textTransform:"none",fontStyle:"normal"},container:{borderRadius:"9999px"}}},slider:{backgroundColor:"theme-primary",views:{track:{backgroundColor:"color-gray-200"},progress:{backgroundColor:"theme-primary"},filledTrack:{backgroundColor:"theme-primary"},thumb:{borderColor:"theme-primary",backgroundColor:"color-white"},label:{color:"color-black"},valueLabel:{color:"color-gray-500"}}},tabs:{variant:"underline",views:{headerTabs:{borderColor:"color-gray-200"},tab:{color:"color-gray-500",fontWeight:400,letterSpacing:"0em",textTransform:"none",fontStyle:"normal"},activeTab:{color:"theme-primary",borderColor:"theme-primary",backgroundColor:"transparent"},title:{fontFamily:"'Inter', -apple-system, BlinkMacSystemFont, sans-serif"},activeText:{color:"theme-primary"},content:{color:"color-black"},container:{borderRadius:"8px"}}},accordion:{views:{container:{borderColor:"color-gray-200",backgroundColor:"color-gray-50",color:"color-black",borderRadius:"12px"},trigger:{color:"color-black",fontFamily:"'Inter', -apple-system, BlinkMacSystemFont, sans-serif"},content:{color:"color-gray-500"}}},table:{views:{table:{backgroundColor:"color-white",color:"color-black",borderColor:"color-gray-200",borderRadius:10},thead:{backgroundColor:"color-gray-50",color:"color-black"},th:{color:"color-gray-500",borderColor:"color-gray-200",fontFamily:"ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace",fontWeight:400,letterSpacing:"0em",textTransform:"none",fontStyle:"normal"},tr:{borderColor:"color-gray-200"},td:{color:"color-black",borderColor:"color-gray-200",letterSpacing:"0em",fontStyle:"normal"},caption:{color:"color-gray-500",fontStyle:"italic",letterSpacing:"0em"}}},avatar:{views:{container:{backgroundColor:"color-gray-50",borderColor:"color-gray-200",color:"color-black",borderRadius:"50%"},fallback:{color:"color-black",fontFamily:"'Inter', -apple-system, BlinkMacSystemFont, sans-serif"}}},alert:{views:{container:{backgroundColor:"color-gray-50",borderColor:"color-gray-200",borderRadius:10},title:{color:"color-black",fontFamily:"'Inter', -apple-system, BlinkMacSystemFont, sans-serif",fontWeight:400,letterSpacing:"0em",textTransform:"none",fontStyle:"normal"},description:{color:"color-gray-500",fontFamily:"'Inter', -apple-system, BlinkMacSystemFont, sans-serif"},icon:{color:"theme-primary"}}},status:{views:{indicator:{backgroundColor:"theme-success"},label:{color:"color-black",fontFamily:"'Inter', -apple-system, BlinkMacSystemFont, sans-serif"}}},progress:{color:"theme-primary",backgroundColor:"color-gray-200",radius:"8px",views:{container:{backgroundColor:"color-gray-200",borderRadius:"9999px"},bar:{backgroundColor:"theme-primary"},text:{color:"color-black"}}},loader:{color:"theme-primary"},separator:{color:"color-gray-200",views:{container:{borderColor:"color-gray-200"},label:{color:"color-gray-500",fontFamily:"'Inter', -apple-system, BlinkMacSystemFont, sans-serif"}}},navigation:{views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"color-black",borderRadius:"12px"},item:{color:"color-gray-500"},activeItem:{color:"theme-primary",borderColor:"theme-primary"}}},hero:{views:{container:{backgroundColor:"color-white",color:"color-black",fontFamily:"'Inter', -apple-system, BlinkMacSystemFont, sans-serif"},eyebrow:{color:"color-gray-500"},title:{color:"color-black",fontFamily:"'Inter', -apple-system, BlinkMacSystemFont, sans-serif"},description:{color:"color-gray-500"}}},page:{views:{container:{backgroundColor:"color-white",color:"color-black",fontFamily:"'Inter', -apple-system, BlinkMacSystemFont, sans-serif"},section:{backgroundColor:"color-white",borderColor:"color-gray-200"},surface:{backgroundColor:"color-gray-50",borderColor:"color-gray-200",color:"color-black"}}}},personality:{cornerStyle:"soft",typeWeight:"regular",typeCase:"normal",typeStyle:"normal",letterSpacing:"0em",accentTreatment:"flat",signatureMotif:"◇",density:"comfortable",surfaceTone:"paper",cardRadius:10,pillRadius:9999,badgeRadius:4,voice:"thoughtful-quiet"}},revolut:{metadata:{id:"revolut",label:"Revolut",sourcePath:"design.md/html/revolut.html",sourceTitle:"Design System Inspiration of Revolut",defaultAppearance:"light",googleFontLinks:["https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap"]},theme:{primary:"#1361F0",secondary:"#101D31",success:"#16a34a",warning:"#d97706",error:"#e61e49",canvas:"color-white",surface:"color-gray-50",text:"color-black",muted:"color-gray-500",border:"color-gray-200",onPrimary:"#ffffff"},tokens:{rawCssVars:{primary:"#494fdf","primary-bright":"#4f55f1","primary-deep":"#3a40c4","on-primary":"#ffffff",ink:"#191c1f",body:"#1f2226",charcoal:"#3a3d40",mute:"#505a63",ash:"#5c5e60",stone:"#8d969e",faint:"#c9c9cd","on-dark":"#ffffff","on-dark-mute":"rgba(255,255,255,0.72)","canvas-light":"#ffffff","canvas-dark":"#000000","surface-soft":"#f4f4f4","surface-card":"#ffffff","surface-deep":"#0a0a0a","surface-elevated":"#16181a","hairline-light":"#e2e2e7","hairline-dark":"rgba(255,255,255,0.12)","hairline-strong":"#191c1f","divider-soft":"rgba(255,255,255,0.06)",teal:"#00a87e","light-blue":"#007bc2","blue-link":"#376cd5","light-green":"#428619","green-text":"#006400",yellow:"#b09000",warning:"#ec7e00",pink:"#e61e49",danger:"#e23b4a","deep-red":"#8b0000",brown:"#936d62","font-display":"'Aeonik Pro', 'Inter', system-ui, -apple-system, sans-serif","font-ui":"'Inter', system-ui, sans-serif"},colors:[{name:"primary",value:"#1361F0",role:"primary"},{name:"primary-bright",value:"#4f55f1",role:"primary bright"},{name:"primary-deep",value:"#3a40c4",role:"primary deep"},{name:"on-primary",value:"#ffffff",role:"on primary"},{name:"ink",value:"#191c1f",role:"ink"},{name:"body",value:"#1f2226",role:"body"},{name:"charcoal",value:"#3a3d40",role:"charcoal"},{name:"mute",value:"#505a63",role:"mute"},{name:"ash",value:"#5c5e60",role:"ash"},{name:"stone",value:"#8d969e",role:"stone"},{name:"faint",value:"#c9c9cd",role:"faint"},{name:"on-dark",value:"#ffffff",role:"on dark"},{name:"on-dark-mute",value:"rgba(255,255,255,0.72)",role:"on dark mute"},{name:"canvas-light",value:"#ffffff",role:"canvas light"},{name:"canvas-dark",value:"#000000",role:"canvas dark"},{name:"surface-soft",value:"#f4f4f4",role:"surface soft"},{name:"surface-card",value:"#ffffff",role:"surface card"},{name:"surface-deep",value:"#0a0a0a",role:"surface deep"},{name:"surface-elevated",value:"#16181a",role:"surface elevated"},{name:"hairline-light",value:"#e2e2e7",role:"hairline light"},{name:"hairline-dark",value:"rgba(255,255,255,0.12)",role:"hairline dark"},{name:"hairline-strong",value:"#191c1f",role:"hairline strong"},{name:"divider-soft",value:"rgba(255,255,255,0.06)",role:"divider soft"},{name:"teal",value:"#00a87e",role:"teal"},{name:"light-blue",value:"#007bc2",role:"light blue"},{name:"blue-link",value:"#376cd5",role:"blue link"},{name:"light-green",value:"#428619",role:"light green"},{name:"green-text",value:"#006400",role:"green text"},{name:"yellow",value:"#b09000",role:"yellow"},{name:"warning",value:"#d97706",role:"warning"},{name:"pink",value:"#e61e49",role:"pink"},{name:"danger",value:"#e23b4a",role:"danger"},{name:"deep-red",value:"#8b0000",role:"deep red"},{name:"brown",value:"#936d62",role:"brown"}],typography:{fontFamily:"'Aeonik Pro', 'Inter', system-ui, -apple-system, sans-serif",monoFamily:"ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace",fontSizes:["16px","14px","18px","12px","96px","56px","24px","13px","32px","11px","64px","44px"],fontWeights:["600","500","700"],lineHeights:["1.5","1.0","1.56","1.4","1.33","1.19","1.6","1.2","1.35"]},spacing:["4px","6px","8px","10px","12px","13px","14px","16px","20px","24px","27px","28px","32px","36px","40px","48px","56px","64px","80px","88px"],radii:["9999px","20px","28px","36px","24px","12px","3px"],shadows:[]},components:{button:{variant:"filled",size:"md",shape:"pill",color:"theme-primary",textColor:"theme-onPrimary",views:{container:{borderRadius:9999,fontFamily:"'Aeonik Pro', 'Inter', system-ui, -apple-system, sans-serif",fontWeight:700,letterSpacing:"-0.02em",textTransform:"none",fontStyle:"normal"},content:{fontFamily:"'Aeonik Pro', 'Inter', system-ui, -apple-system, sans-serif",fontWeight:700,letterSpacing:"-0.02em",textTransform:"none",fontStyle:"normal"}}},badge:{variant:"filled",size:"sm",shape:"pill",views:{container:{backgroundColor:"theme-secondary",color:"color-white",borderColor:"theme-secondary",borderRadius:9999,fontFamily:"'Aeonik Pro', 'Inter', system-ui, -apple-system, sans-serif",letterSpacing:"-0.02em",textTransform:"none",fontWeight:700,fontStyle:"normal"},text:{fontFamily:"'Aeonik Pro', 'Inter', system-ui, -apple-system, sans-serif",fontWeight:600}}},card:{variant:"outlined",size:"md",shape:"rounded",views:{container:{backgroundColor:"color-gray-50",borderColor:"color-gray-200",color:"color-black",borderRadius:20,borderWidth:"1px",borderStyle:"solid",boxShadow:"0 1px 3px rgba(0, 0, 0, 0.08)"},header:{color:"color-black",fontFamily:"'Aeonik Pro', 'Inter', system-ui, -apple-system, sans-serif",fontWeight:600,borderColor:"color-gray-200"},content:{color:"color-gray-500",fontFamily:"'Aeonik Pro', 'Inter', system-ui, -apple-system, sans-serif"},footer:{borderColor:"color-gray-200"}}},input:{size:"md",shape:"default",variant:"default",views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"color-black",borderRadius:16,borderWidth:"1px",borderStyle:"solid",boxShadow:"none"},field:{color:"color-black",fontFamily:"'Aeonik Pro', 'Inter', system-ui, -apple-system, sans-serif",fontStyle:"normal",letterSpacing:"-0.02em"},label:{fontFamily:"'Aeonik Pro', 'Inter', system-ui, -apple-system, sans-serif",fontWeight:700,letterSpacing:"-0.02em",textTransform:"none",fontStyle:"normal"},helperText:{}}},textarea:{size:"md",shape:"default",variant:"default",views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"color-black",borderRadius:16,borderWidth:"1px",borderStyle:"solid",boxShadow:"none"},field:{color:"color-black",fontFamily:"'Aeonik Pro', 'Inter', system-ui, -apple-system, sans-serif",fontStyle:"normal",letterSpacing:"-0.02em"},label:{fontFamily:"'Aeonik Pro', 'Inter', system-ui, -apple-system, sans-serif",fontWeight:700,letterSpacing:"-0.02em",textTransform:"none",fontStyle:"normal"},helperText:{}}},select:{size:"md",shape:"default",variant:"default",views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"color-black",borderRadius:16,borderWidth:"1px",borderStyle:"solid",boxShadow:"none"},field:{color:"color-black",fontFamily:"'Aeonik Pro', 'Inter', system-ui, -apple-system, sans-serif"},label:{fontFamily:"'Aeonik Pro', 'Inter', system-ui, -apple-system, sans-serif",fontWeight:700,letterSpacing:"-0.02em",textTransform:"none",fontStyle:"normal"},helperText:{},text:{letterSpacing:"-0.02em",fontStyle:"normal"}}},checkbox:{size:"md",views:{checkbox:{borderColor:"color-gray-200",backgroundColor:"color-white",_checked:{backgroundColor:"theme-primary",borderColor:"theme-primary"},borderRadius:9999},label:{fontFamily:"'Aeonik Pro', 'Inter', system-ui, -apple-system, sans-serif",fontWeight:700,letterSpacing:"-0.02em",textTransform:"none",fontStyle:"normal"},infoText:{color:"color-gray-500"},container:{borderRadius:9999}}},radio:{size:"md",views:{radio:{borderColor:"color-gray-200",backgroundColor:"color-white"},dot:{backgroundColor:"theme-primary"},label:{fontFamily:"'Aeonik Pro', 'Inter', system-ui, -apple-system, sans-serif",fontWeight:700,letterSpacing:"-0.02em",textTransform:"none",fontStyle:"normal"},infoText:{color:"color-gray-500"},container:{borderRadius:"50%"}}},switch:{size:"sm",views:{slider:{backgroundColor:"color-gray-200"},circle:{backgroundColor:"color-white"},label:{fontFamily:"'Aeonik Pro', 'Inter', system-ui, -apple-system, sans-serif",fontWeight:700,letterSpacing:"-0.02em",textTransform:"none",fontStyle:"normal"},container:{borderRadius:"9999px"}}},slider:{backgroundColor:"theme-primary",views:{track:{backgroundColor:"color-gray-200"},progress:{backgroundColor:"theme-primary"},filledTrack:{backgroundColor:"theme-primary"},thumb:{borderColor:"theme-primary",backgroundColor:"color-white"},label:{color:"color-black"},valueLabel:{color:"color-gray-500"}}},tabs:{variant:"pill",views:{headerTabs:{borderColor:"color-gray-200"},tab:{color:"color-gray-500",fontWeight:700,letterSpacing:"-0.02em",textTransform:"none",fontStyle:"normal"},activeTab:{color:"theme-primary",borderColor:"theme-primary",backgroundColor:"theme-primary"},title:{fontFamily:"'Aeonik Pro', 'Inter', system-ui, -apple-system, sans-serif"},activeText:{color:"color-white"},content:{color:"color-black"},container:{borderRadius:"9999px"}}},accordion:{views:{container:{borderColor:"color-gray-200",backgroundColor:"color-gray-50",color:"color-black",borderRadius:"24px"},trigger:{color:"color-black",fontFamily:"'Aeonik Pro', 'Inter', system-ui, -apple-system, sans-serif"},content:{color:"color-gray-500"}}},table:{views:{table:{backgroundColor:"color-white",color:"color-black",borderColor:"color-gray-200",borderRadius:20},thead:{backgroundColor:"color-gray-50",color:"color-black"},th:{color:"color-gray-500",borderColor:"color-gray-200",fontFamily:"ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace",fontWeight:700,letterSpacing:"-0.02em",textTransform:"none",fontStyle:"normal"},tr:{borderColor:"color-gray-200"},td:{color:"color-black",borderColor:"color-gray-200",letterSpacing:"-0.02em",fontStyle:"normal"},caption:{color:"color-gray-500",fontStyle:"italic",letterSpacing:"-0.02em"}}},avatar:{views:{container:{backgroundColor:"color-gray-50",borderColor:"color-gray-200",color:"color-black",borderRadius:"50%"},fallback:{color:"color-black",fontFamily:"'Aeonik Pro', 'Inter', system-ui, -apple-system, sans-serif"}}},alert:{views:{container:{backgroundColor:"color-gray-50",borderColor:"color-gray-200",borderRadius:20},title:{color:"color-black",fontFamily:"'Aeonik Pro', 'Inter', system-ui, -apple-system, sans-serif",fontWeight:700,letterSpacing:"-0.02em",textTransform:"none",fontStyle:"normal"},description:{color:"color-gray-500",fontFamily:"'Aeonik Pro', 'Inter', system-ui, -apple-system, sans-serif"},icon:{color:"theme-primary"}}},status:{views:{indicator:{backgroundColor:"theme-success"},label:{color:"color-black",fontFamily:"'Aeonik Pro', 'Inter', system-ui, -apple-system, sans-serif"}}},progress:{color:"theme-primary",backgroundColor:"color-gray-200",radius:"24px",views:{container:{backgroundColor:"color-gray-200",borderRadius:"9999px"},bar:{backgroundColor:"theme-primary"},text:{color:"color-black"}}},loader:{color:"theme-primary"},separator:{color:"color-gray-200",views:{container:{borderColor:"color-gray-200"},label:{color:"color-gray-500",fontFamily:"'Aeonik Pro', 'Inter', system-ui, -apple-system, sans-serif"}}},navigation:{views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"color-black",borderRadius:"24px"},item:{color:"color-gray-500"},activeItem:{color:"theme-primary",borderColor:"theme-primary"}}},hero:{views:{container:{backgroundColor:"color-white",color:"color-black",fontFamily:"'Aeonik Pro', 'Inter', system-ui, -apple-system, sans-serif"},eyebrow:{color:"color-gray-500"},title:{color:"color-black",fontFamily:"'Aeonik Pro', 'Inter', system-ui, -apple-system, sans-serif"},description:{color:"color-gray-500"}}},page:{views:{container:{backgroundColor:"color-white",color:"color-black",fontFamily:"'Aeonik Pro', 'Inter', system-ui, -apple-system, sans-serif"},section:{backgroundColor:"color-white",borderColor:"color-gray-200"},surface:{backgroundColor:"color-gray-50",borderColor:"color-gray-200",color:"color-black"}}}},personality:{cornerStyle:"pill",typeWeight:"bold",typeCase:"normal",typeStyle:"normal",letterSpacing:"-0.02em",accentTreatment:"gradient",signatureMotif:"★",density:"comfortable",surfaceTone:"glass",cardRadius:20,pillRadius:9999,badgeRadius:9999,voice:"bold-fintech"}},shopify:{metadata:{id:"shopify",label:"Shopify",sourcePath:"design.md/html/shopify.html",sourceTitle:"Design System Inspired by Shopify",defaultAppearance:"light",googleFontLinks:["https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap"]},theme:{primary:"#008060",secondary:"#202223",success:"#008060",warning:"#FFC453",error:"#D72C0D",canvas:"color-white",surface:"color-gray-50",text:"color-black",muted:"color-gray-500",border:"color-gray-200",onPrimary:"#FFFFFF"},tokens:{rawCssVars:{white:"#FFFFFF",black:"#000000","neon-green":"#36F4A4",aloe:"#C1FBD4",pistachio:"#D4F9E0","deep-teal":"#02090A","dark-forest":"#061A1C",forest:"#102620","card-border":"#1E2C31","shade-30":"#D4D4D8",muted:"#A1A1AA","shade-50":"#71717A","shade-60":"#52525B","shade-70":"#3F3F46","light-border":"#E4E4E7","link-muted":"#9797A2","shadow-card":"rgba(0,0,0,0.1) 0px 0px 0px 1px, rgba(0,0,0,0.1) 0px 2px 2px 0px, rgba(0,0,0,0.1) 0px 4px 4px 0px, rgba(0,0,0,0.1) 0px 8px 8px 0px, rgba(255,255,255,0.03) 0px 1px 0px 0px inset"},colors:[{name:"white",value:"#FFFFFF",role:"white"},{name:"black",value:"#000000",role:"black"},{name:"neon-green",value:"#36F4A4",role:"neon green"},{name:"aloe",value:"#C1FBD4",role:"aloe"},{name:"pistachio",value:"#D4F9E0",role:"pistachio"},{name:"deep-teal",value:"#02090A",role:"deep teal"},{name:"dark-forest",value:"#061A1C",role:"dark forest"},{name:"forest",value:"#102620",role:"forest"},{name:"card-border",value:"#1E2C31",role:"card border"},{name:"shade-30",value:"#D4D4D8",role:"shade 30"},{name:"muted",value:"#A1A1AA",role:"muted"},{name:"shade-50",value:"#71717A",role:"shade 50"},{name:"shade-60",value:"#52525B",role:"shade 60"},{name:"shade-70",value:"#3F3F46",role:"shade 70"},{name:"light-border",value:"#E4E4E7",role:"light border"},{name:"link-muted",value:"#9797A2",role:"link muted"},{name:"shadow-card",value:"rgba(0,0,0,0.1) 0px 0px 0px 1px, rgba(0,0,0,0.1) 0px 2px 2px 0px, rgba(0,0,0,0.1) 0px 4px 4px 0px, rgba(0,0,0,0.1) 0px 8px 8px 0px, rgba(255,255,255,0.03) 0px 1px 0px 0px inset",role:"shadow card"}],typography:{fontFamily:"'Inter', Helvetica, Arial, sans-serif",monoFamily:"ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace",fontSizes:["20px","16px","14px","80px","48px","18px","12px","13px","11px","55px","32px","28px","24px","36px"],fontWeights:["400","600","500","330","360","550","700"],lineHeights:["1.5","0.96","1.14","1.56","1.16","1.28","1.4","1.49","1.2","1.35"]},spacing:["4px","8px","10px","12px","14px","16px","20px","24px","28px","32px","40px","48px","64px","72px","80px","100px"],radii:["9999px","8px","4px","12px","2px","3px"],shadows:["rgba(0,0,0,0.1) 0px 0px 0px 1px, rgba(0,0,0,0.1) 0px 2px 2px 0px, rgba(0,0,0,0.1) 0px 4px 4px 0px, rgba(0,0,0,0.1) 0px 8px 8px 0px, rgba(255,255,255,0.03) 0px 1px 0px 0px inset","0 0 0 2px var(--neon-green)","var(--shadow-card)","rgba(0,0,0,0.1) 0px 0px 0px 1px, rgba(255,255,255,0.03) 0px 1px 0px 0px inset"]},components:{button:{variant:"filled",size:"md",shape:"rounded",color:"theme-primary",textColor:"theme-onPrimary",views:{container:{borderRadius:9999,fontFamily:"'Inter', Helvetica, Arial, sans-serif",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},content:{fontFamily:"'Inter', Helvetica, Arial, sans-serif",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"}}},badge:{variant:"filled",size:"sm",shape:"pill",views:{container:{backgroundColor:"color-aloe",color:"color-white",borderColor:"color-aloe",borderRadius:6,fontFamily:"'Inter', Helvetica, Arial, sans-serif",letterSpacing:"-0.01em",textTransform:"none",fontWeight:700,fontStyle:"normal"},text:{fontFamily:"'Inter', Helvetica, Arial, sans-serif",fontWeight:600}}},card:{variant:"outlined",size:"md",shape:"rounded",views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"color-black",borderRadius:12,borderWidth:"1px",borderStyle:"solid",boxShadow:"rgba(0,0,0,0.1) 0px 0px 0px 1px, rgba(0,0,0,0.1) 0px 2px 2px 0px, rgba(0,0,0,0.1) 0px 4px 4px 0px, rgba(0,0,0,0.1) 0px 8px 8px 0px, rgba(255,255,255,0.03) 0px 1px 0px 0px inset"},header:{color:"color-black",fontFamily:"'Inter', Helvetica, Arial, sans-serif",fontWeight:600,borderColor:"color-gray-200"},content:{color:"color-muted",fontFamily:"'Inter', Helvetica, Arial, sans-serif"},footer:{borderColor:"color-gray-200"}}},input:{size:"md",shape:"default",variant:"default",views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"color-black",borderRadius:10,borderWidth:"1px",borderStyle:"solid",boxShadow:"rgba(0,0,0,0.1) 0px 0px 0px 1px, rgba(0,0,0,0.1) 0px 2px 2px 0px, rgba(0,0,0,0.1) 0px 4px 4px 0px, rgba(0,0,0,0.1) 0px 8px 8px 0px, rgba(255,255,255,0.03) 0px 1px 0px 0px inset"},field:{color:"color-black",fontFamily:"'Inter', Helvetica, Arial, sans-serif",fontStyle:"normal",letterSpacing:"-0.01em"},label:{fontFamily:"'Inter', Helvetica, Arial, sans-serif",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},helperText:{}}},textarea:{size:"md",shape:"default",variant:"default",views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"color-black",borderRadius:10,borderWidth:"1px",borderStyle:"solid",boxShadow:"rgba(0,0,0,0.1) 0px 0px 0px 1px, rgba(0,0,0,0.1) 0px 2px 2px 0px, rgba(0,0,0,0.1) 0px 4px 4px 0px, rgba(0,0,0,0.1) 0px 8px 8px 0px, rgba(255,255,255,0.03) 0px 1px 0px 0px inset"},field:{color:"color-black",fontFamily:"'Inter', Helvetica, Arial, sans-serif",fontStyle:"normal",letterSpacing:"-0.01em"},label:{fontFamily:"'Inter', Helvetica, Arial, sans-serif",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},helperText:{}}},select:{size:"md",shape:"default",variant:"default",views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"color-black",borderRadius:10,borderWidth:"1px",borderStyle:"solid",boxShadow:"rgba(0,0,0,0.1) 0px 0px 0px 1px, rgba(0,0,0,0.1) 0px 2px 2px 0px, rgba(0,0,0,0.1) 0px 4px 4px 0px, rgba(0,0,0,0.1) 0px 8px 8px 0px, rgba(255,255,255,0.03) 0px 1px 0px 0px inset"},field:{color:"color-black",fontFamily:"'Inter', Helvetica, Arial, sans-serif"},label:{fontFamily:"'Inter', Helvetica, Arial, sans-serif",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},helperText:{},text:{letterSpacing:"-0.01em",fontStyle:"normal"}}},checkbox:{size:"md",views:{checkbox:{borderColor:"color-gray-200",backgroundColor:"color-white",_checked:{backgroundColor:"theme-primary",borderColor:"theme-primary"},borderRadius:4},label:{fontFamily:"'Inter', Helvetica, Arial, sans-serif",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},infoText:{color:"color-muted"},container:{borderRadius:4}}},radio:{size:"md",views:{radio:{borderColor:"color-gray-200",backgroundColor:"color-white"},dot:{backgroundColor:"theme-primary"},label:{fontFamily:"'Inter', Helvetica, Arial, sans-serif",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},infoText:{color:"color-muted"},container:{borderRadius:"50%"}}},switch:{size:"sm",views:{slider:{backgroundColor:"color-gray-200"},circle:{backgroundColor:"color-white"},label:{fontFamily:"'Inter', Helvetica, Arial, sans-serif",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},container:{borderRadius:"9999px"}}},slider:{backgroundColor:"theme-primary",views:{track:{backgroundColor:"color-gray-200"},progress:{backgroundColor:"theme-primary"},filledTrack:{backgroundColor:"theme-primary"},thumb:{borderColor:"theme-primary",backgroundColor:"color-white"},label:{color:"color-black"},valueLabel:{color:"color-muted"}}},tabs:{variant:"pill",views:{headerTabs:{borderColor:"color-gray-200"},tab:{color:"color-muted",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},activeTab:{color:"theme-primary",borderColor:"theme-primary",backgroundColor:"theme-primary"},title:{fontFamily:"'Inter', Helvetica, Arial, sans-serif"},activeText:{color:"color-white"},content:{color:"color-black"},container:{borderRadius:"9999px"}}},accordion:{views:{container:{borderColor:"color-gray-200",backgroundColor:"color-white",color:"color-black",borderRadius:"24px"},trigger:{color:"color-black",fontFamily:"'Inter', Helvetica, Arial, sans-serif"},content:{color:"color-muted"}}},table:{views:{table:{backgroundColor:"color-white",color:"color-black",borderColor:"color-gray-200",borderRadius:12},thead:{backgroundColor:"color-white",color:"color-black"},th:{color:"color-muted",borderColor:"color-gray-200",fontFamily:"ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},tr:{borderColor:"color-gray-200"},td:{color:"color-black",borderColor:"color-gray-200",letterSpacing:"-0.01em",fontStyle:"normal"},caption:{color:"color-muted",fontStyle:"italic",letterSpacing:"-0.01em"}}},avatar:{views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"color-black",borderRadius:"50%"},fallback:{color:"color-black",fontFamily:"'Inter', Helvetica, Arial, sans-serif"}}},alert:{views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",borderRadius:12},title:{color:"color-black",fontFamily:"'Inter', Helvetica, Arial, sans-serif",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},description:{color:"color-muted",fontFamily:"'Inter', Helvetica, Arial, sans-serif"},icon:{color:"theme-primary"}}},status:{views:{indicator:{backgroundColor:"theme-primary"},label:{color:"color-black",fontFamily:"'Inter', Helvetica, Arial, sans-serif"}}},progress:{color:"theme-primary",backgroundColor:"color-gray-200",radius:"16px",views:{container:{backgroundColor:"color-gray-200",borderRadius:"9999px"},bar:{backgroundColor:"theme-primary"},text:{color:"color-black"}}},loader:{color:"theme-primary"},separator:{color:"color-gray-200",views:{container:{borderColor:"color-gray-200"},label:{color:"color-muted",fontFamily:"'Inter', Helvetica, Arial, sans-serif"}}},navigation:{views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"color-black",borderRadius:"24px"},item:{color:"color-muted"},activeItem:{color:"theme-primary",borderColor:"theme-primary"}}},hero:{views:{container:{backgroundColor:"color-white",color:"color-black",fontFamily:"'Inter', Helvetica, Arial, sans-serif"},eyebrow:{color:"color-muted"},title:{color:"color-black",fontFamily:"'Inter', Helvetica, Arial, sans-serif"},description:{color:"color-muted"}}},page:{views:{container:{backgroundColor:"color-white",color:"color-black",fontFamily:"'Inter', Helvetica, Arial, sans-serif"},section:{backgroundColor:"color-white",borderColor:"color-gray-200"},surface:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"color-black"}}}},personality:{cornerStyle:"soft",typeWeight:"bold",typeCase:"normal",typeStyle:"normal",letterSpacing:"-0.01em",accentTreatment:"flat",signatureMotif:"●",density:"comfortable",surfaceTone:"paper",cardRadius:12,pillRadius:9999,badgeRadius:6,voice:"commerce-friendly"}},spacex:{metadata:{id:"spacex",label:"SpaceX",sourcePath:"design.md/html/spaceX.html",sourceTitle:"Design System Preview: SpaceX (Light)",defaultAppearance:"dark",googleFontLinks:["https://fonts.googleapis.com/css2?family=Share+Tech&display=swap"]},theme:{primary:"color-black",secondary:"#a3a3a3",success:"#4ade80",warning:"#fbbf24",error:"#ef4444",canvas:"color-white",surface:"color-gray-50",text:"color-black",muted:"color-gray-500",border:"color-gray-200",onPrimary:"color-white"},tokens:{rawCssVars:{black:"#000000",spectral:"#f0f0fa","ghost-bg":"rgba(240,240,250,0.1)","ghost-border":"rgba(240,240,250,0.35)",overlay:"rgba(0,0,0,0.5)",font:"'Share Tech', Arial, Verdana, sans-serif"},colors:[{name:"black",value:"#000000",role:"black"},{name:"spectral",value:"#f0f0fa",role:"spectral"},{name:"ghost-bg",value:"rgba(240,240,250,0.1)",role:"ghost bg"},{name:"ghost-border",value:"rgba(240,240,250,0.35)",role:"ghost border"},{name:"overlay",value:"rgba(0,0,0,0.5)",role:"overlay"}],typography:{fontFamily:"'Share Tech', Arial, Verdana, sans-serif",monoFamily:"ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace",fontSizes:["16px","13px","12px","48px","10px","32px","11px","9px","14px"],fontWeights:["700","400","600"],lineHeights:["1.50","1.00","1.70","1.2","1.35","1.4"]},spacing:["8px","10px","12px","14px","16px","18px","20px","24px","28px","32px","48px","60px","64px","72px","80px","120px"],radii:["32px","4px","2px","3px"],shadows:[]},components:{button:{config:{variants:{ghost:{backgroundColor:"color-gray-50",borderColor:"color-gray-200"}}},variant:"ghost",size:"md",shape:"square",color:"theme-primary",textColor:"theme-primary",views:{container:{borderRadius:0,fontFamily:"'Share Tech', Arial, Verdana, sans-serif",fontWeight:800,letterSpacing:"0.08em",textTransform:"uppercase",fontStyle:"normal"},content:{fontFamily:"'Share Tech', Arial, Verdana, sans-serif",fontWeight:800,letterSpacing:"0.08em",textTransform:"uppercase",fontStyle:"normal"}}},badge:{variant:"filled",size:"sm",shape:"rounded",views:{container:{backgroundColor:"color-gray-50",color:"color-white",borderColor:"color-gray-50",borderRadius:0,fontFamily:"'Share Tech', Arial, Verdana, sans-serif",letterSpacing:"0.08em",textTransform:"uppercase",fontWeight:800,fontStyle:"normal"},text:{fontFamily:"'Share Tech', Arial, Verdana, sans-serif",fontWeight:600}}},card:{variant:"outlined",size:"md",shape:"square",views:{container:{backgroundColor:"color-gray-50",borderColor:"color-gray-200",color:"theme-primary",borderRadius:2,borderWidth:"1px",borderStyle:"solid",boxShadow:"0 1px 3px rgba(0, 0, 0, 0.08)"},header:{color:"theme-primary",fontFamily:"'Share Tech', Arial, Verdana, sans-serif",fontWeight:600,borderColor:"color-gray-200"},content:{color:"color-gray-200",fontFamily:"'Share Tech', Arial, Verdana, sans-serif"},footer:{borderColor:"color-gray-200"}}},input:{size:"md",shape:"default",variant:"default",views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"theme-primary",borderRadius:2,borderWidth:"1px",borderStyle:"solid",boxShadow:"none"},field:{color:"theme-primary",fontFamily:"'Share Tech', Arial, Verdana, sans-serif",fontStyle:"normal",letterSpacing:"0.06em"},label:{fontFamily:"'Share Tech', Arial, Verdana, sans-serif",fontWeight:800,letterSpacing:"0.06em",textTransform:"uppercase",fontStyle:"normal"},helperText:{}}},textarea:{size:"md",shape:"default",variant:"default",views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"theme-primary",borderRadius:2,borderWidth:"1px",borderStyle:"solid",boxShadow:"none"},field:{color:"theme-primary",fontFamily:"'Share Tech', Arial, Verdana, sans-serif",fontStyle:"normal",letterSpacing:"0.06em"},label:{fontFamily:"'Share Tech', Arial, Verdana, sans-serif",fontWeight:800,letterSpacing:"0.06em",textTransform:"uppercase",fontStyle:"normal"},helperText:{}}},select:{size:"md",shape:"default",variant:"default",views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"theme-primary",borderRadius:2,borderWidth:"1px",borderStyle:"solid",boxShadow:"none"},field:{color:"theme-primary",fontFamily:"'Share Tech', Arial, Verdana, sans-serif"},label:{fontFamily:"'Share Tech', Arial, Verdana, sans-serif",fontWeight:800,letterSpacing:"0.06em",textTransform:"uppercase",fontStyle:"normal"},helperText:{},text:{letterSpacing:"0.06em",fontStyle:"normal"}}},checkbox:{size:"md",views:{checkbox:{borderColor:"color-gray-200",backgroundColor:"color-white",_checked:{backgroundColor:"theme-primary",borderColor:"theme-primary"},borderRadius:0},label:{fontFamily:"'Share Tech', Arial, Verdana, sans-serif",fontWeight:800,letterSpacing:"0.06em",textTransform:"uppercase",fontStyle:"normal"},infoText:{color:"color-gray-200"},container:{borderRadius:0}}},radio:{size:"md",views:{radio:{borderColor:"color-gray-200",backgroundColor:"color-white"},dot:{backgroundColor:"theme-primary"},label:{fontFamily:"'Share Tech', Arial, Verdana, sans-serif",fontWeight:800,letterSpacing:"0.06em",textTransform:"uppercase",fontStyle:"normal"},infoText:{color:"color-gray-200"},container:{borderRadius:"50%"}}},switch:{size:"sm",views:{slider:{backgroundColor:"color-gray-200"},circle:{backgroundColor:"color-white"},label:{fontFamily:"'Share Tech', Arial, Verdana, sans-serif",fontWeight:800,letterSpacing:"0.06em",textTransform:"uppercase",fontStyle:"normal"},container:{borderRadius:"9999px"}}},slider:{backgroundColor:"theme-primary",views:{track:{backgroundColor:"color-gray-200"},progress:{backgroundColor:"theme-primary"},filledTrack:{backgroundColor:"theme-primary"},thumb:{borderColor:"theme-primary",backgroundColor:"color-white"},label:{color:"theme-primary"},valueLabel:{color:"color-gray-200"}}},tabs:{variant:"underline",views:{headerTabs:{borderColor:"color-gray-200"},tab:{color:"color-gray-200",fontWeight:800,letterSpacing:"0.06em",textTransform:"uppercase",fontStyle:"normal"},activeTab:{color:"theme-primary",borderColor:"theme-primary",backgroundColor:"transparent"},title:{fontFamily:"'Share Tech', Arial, Verdana, sans-serif"},activeText:{color:"theme-primary"},content:{color:"theme-primary"},container:{borderRadius:"32px"}}},accordion:{views:{container:{borderColor:"color-gray-200",backgroundColor:"color-gray-50",color:"theme-primary",borderRadius:0},trigger:{color:"theme-primary",fontFamily:"'Share Tech', Arial, Verdana, sans-serif"},content:{color:"color-gray-200"}}},table:{views:{table:{backgroundColor:"color-white",color:"theme-primary",borderColor:"color-gray-200",borderRadius:2},thead:{backgroundColor:"color-gray-50",color:"theme-primary"},th:{color:"color-gray-200",borderColor:"color-gray-200",fontFamily:"ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace",fontWeight:800,letterSpacing:"0.06em",textTransform:"uppercase",fontStyle:"normal"},tr:{borderColor:"color-gray-200"},td:{color:"theme-primary",borderColor:"color-gray-200",letterSpacing:"0.06em",fontStyle:"normal"},caption:{color:"color-gray-200",fontStyle:"italic",letterSpacing:"0.06em"}}},avatar:{views:{container:{backgroundColor:"color-gray-50",borderColor:"color-gray-200",color:"theme-primary",borderRadius:"50%"},fallback:{color:"theme-primary",fontFamily:"'Share Tech', Arial, Verdana, sans-serif"}}},alert:{views:{container:{backgroundColor:"color-gray-50",borderColor:"color-gray-200",borderRadius:2},title:{color:"theme-primary",fontFamily:"'Share Tech', Arial, Verdana, sans-serif",fontWeight:800,letterSpacing:"0.06em",textTransform:"uppercase",fontStyle:"normal"},description:{color:"color-gray-200",fontFamily:"'Share Tech', Arial, Verdana, sans-serif"},icon:{color:"theme-primary"}}},status:{views:{indicator:{backgroundColor:"theme-primary"},label:{color:"theme-primary",fontFamily:"'Share Tech', Arial, Verdana, sans-serif"}}},progress:{color:"theme-primary",backgroundColor:"color-gray-200",radius:0,views:{container:{backgroundColor:"color-gray-200",borderRadius:"9999px"},bar:{backgroundColor:"theme-primary"},text:{color:"theme-primary"}}},loader:{color:"theme-primary"},separator:{color:"color-gray-200",views:{container:{borderColor:"color-gray-200"},label:{color:"color-gray-200",fontFamily:"'Share Tech', Arial, Verdana, sans-serif"}}},navigation:{views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"theme-primary",borderRadius:0},item:{color:"color-gray-200"},activeItem:{color:"theme-primary",borderColor:"theme-primary"}}},hero:{views:{container:{backgroundColor:"color-white",color:"theme-primary",fontFamily:"'Share Tech', Arial, Verdana, sans-serif"},eyebrow:{color:"color-gray-200"},title:{color:"theme-primary",fontFamily:"'Share Tech', Arial, Verdana, sans-serif"},description:{color:"color-gray-200"}}},page:{views:{container:{backgroundColor:"color-white",color:"theme-primary",fontFamily:"'Share Tech', Arial, Verdana, sans-serif"},section:{backgroundColor:"color-white",borderColor:"color-gray-200"},surface:{backgroundColor:"color-gray-50",borderColor:"color-gray-200",color:"theme-primary"}}}},personality:{cornerStyle:"sharp",typeWeight:"black",typeCase:"uppercase",typeStyle:"normal",letterSpacing:"0.06em",accentTreatment:"glow",signatureMotif:"⚡",density:"tight",surfaceTone:"mono",cardRadius:2,pillRadius:0,badgeRadius:0,voice:"technical-mission"}},spotify:{metadata:{id:"spotify",label:"Spotify",sourcePath:"design.md/html/spotify.html",sourceTitle:"Design System Inspired by Shopify",defaultAppearance:"dark",googleFontLinks:["https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap"]},theme:{primary:"#1DB954",secondary:"#C1FBD4",success:"#1DB954",warning:"#D4F9E0",error:"#D4D4D8",canvas:"color-white",surface:"color-gray-50",text:"color-black",muted:"color-gray-500",border:"color-gray-200",onPrimary:"#000000"},tokens:{rawCssVars:{white:"#FFFFFF",black:"#000000","spotify-green":"#1DB954",aloe:"#C1FBD4",pistachio:"#D4F9E0","deep-teal":"#02090A","dark-forest":"#061A1C",forest:"#102620","card-border":"#1E2C31","shade-30":"#D4D4D8",muted:"#A1A1AA","shade-50":"#71717A","shade-60":"#52525B","shade-70":"#3F3F46","light-border":"#E4E4E7","link-muted":"#9797A2","shadow-card":"rgba(0,0,0,0.1) 0px 0px 0px 1px, rgba(0,0,0,0.1) 0px 2px 2px 0px, rgba(0,0,0,0.1) 0px 4px 4px 0px, rgba(0,0,0,0.1) 0px 8px 8px 0px, rgba(255,255,255,0.03) 0px 1px 0px 0px inset"},colors:[{name:"white",value:"#FFFFFF",role:"white"},{name:"black",value:"#000000",role:"black"},{name:"spotify-green",value:"#1DB954",role:"neon green"},{name:"aloe",value:"#C1FBD4",role:"aloe"},{name:"pistachio",value:"#D4F9E0",role:"pistachio"},{name:"deep-teal",value:"#02090A",role:"deep teal"},{name:"dark-forest",value:"#061A1C",role:"dark forest"},{name:"forest",value:"#102620",role:"forest"},{name:"card-border",value:"#1E2C31",role:"card border"},{name:"shade-30",value:"#D4D4D8",role:"shade 30"},{name:"muted",value:"#A1A1AA",role:"muted"},{name:"shade-50",value:"#71717A",role:"shade 50"},{name:"shade-60",value:"#52525B",role:"shade 60"},{name:"shade-70",value:"#3F3F46",role:"shade 70"},{name:"light-border",value:"#E4E4E7",role:"light border"},{name:"link-muted",value:"#9797A2",role:"link muted"},{name:"shadow-card",value:"rgba(0,0,0,0.1) 0px 0px 0px 1px, rgba(0,0,0,0.1) 0px 2px 2px 0px, rgba(0,0,0,0.1) 0px 4px 4px 0px, rgba(0,0,0,0.1) 0px 8px 8px 0px, rgba(255,255,255,0.03) 0px 1px 0px 0px inset",role:"shadow card"}],typography:{fontFamily:"'Inter', Helvetica, Arial, sans-serif",monoFamily:"ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace",fontSizes:["20px","16px","14px","80px","48px","18px","12px","13px","11px","55px","32px","28px","24px","36px"],fontWeights:["400","600","500","330","360","550","700"],lineHeights:["1.5","0.96","1.14","1.56","1.16","1.28","1.4","1.49","1.2","1.35"]},spacing:["4px","8px","10px","12px","14px","16px","20px","24px","28px","32px","40px","48px","64px","72px","80px","100px"],radii:["9999px","8px","4px","12px","2px","3px"],shadows:["rgba(0,0,0,0.1) 0px 0px 0px 1px, rgba(0,0,0,0.1) 0px 2px 2px 0px, rgba(0,0,0,0.1) 0px 4px 4px 0px, rgba(0,0,0,0.1) 0px 8px 8px 0px, rgba(255,255,255,0.03) 0px 1px 0px 0px inset","0 0 0 2px var(--neon-green)","var(--shadow-card)","rgba(0,0,0,0.1) 0px 0px 0px 1px, rgba(255,255,255,0.03) 0px 1px 0px 0px inset"]},components:{button:{variant:"filled",size:"md",shape:"pill",color:"theme-primary",textColor:"theme-onPrimary",views:{container:{borderRadius:9999,fontFamily:"'Inter', Helvetica, Arial, sans-serif",fontWeight:800,letterSpacing:"-0.02em",textTransform:"none",fontStyle:"normal"},content:{fontFamily:"'Inter', Helvetica, Arial, sans-serif",fontWeight:800,letterSpacing:"-0.02em",textTransform:"none",fontStyle:"normal"}}},badge:{variant:"filled",size:"sm",shape:"pill",views:{container:{backgroundColor:"theme-secondary",color:"color-white",borderColor:"theme-secondary",borderRadius:9999,fontFamily:"'Inter', Helvetica, Arial, sans-serif",letterSpacing:"-0.02em",textTransform:"none",fontWeight:800,fontStyle:"normal"},text:{fontFamily:"'Inter', Helvetica, Arial, sans-serif",fontWeight:600}}},card:{variant:"outlined",size:"md",shape:"rounded",views:{container:{backgroundColor:"color-gray-50",borderColor:"color-gray-200",color:"color-black",borderRadius:8,borderWidth:"1px",borderStyle:"solid",boxShadow:"rgba(0,0,0,0.1) 0px 0px 0px 1px, rgba(0,0,0,0.1) 0px 2px 2px 0px, rgba(0,0,0,0.1) 0px 4px 4px 0px, rgba(0,0,0,0.1) 0px 8px 8px 0px, rgba(255,255,255,0.03) 0px 1px 0px 0px inset"},header:{color:"color-black",fontFamily:"'Inter', Helvetica, Arial, sans-serif",fontWeight:600,borderColor:"color-gray-200"},content:{color:"color-gray-500",fontFamily:"'Inter', Helvetica, Arial, sans-serif"},footer:{borderColor:"color-gray-200"}}},input:{size:"md",shape:"default",variant:"default",views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"color-black",borderRadius:16,borderWidth:"1px",borderStyle:"solid",boxShadow:"rgba(0,0,0,0.1) 0px 0px 0px 1px, rgba(0,0,0,0.1) 0px 2px 2px 0px, rgba(0,0,0,0.1) 0px 4px 4px 0px, rgba(0,0,0,0.1) 0px 8px 8px 0px, rgba(255,255,255,0.03) 0px 1px 0px 0px inset"},field:{color:"color-black",fontFamily:"'Inter', Helvetica, Arial, sans-serif",fontStyle:"normal",letterSpacing:"-0.02em"},label:{fontFamily:"'Inter', Helvetica, Arial, sans-serif",fontWeight:800,letterSpacing:"-0.02em",textTransform:"none",fontStyle:"normal"},helperText:{}}},textarea:{size:"md",shape:"default",variant:"default",views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"color-black",borderRadius:16,borderWidth:"1px",borderStyle:"solid",boxShadow:"rgba(0,0,0,0.1) 0px 0px 0px 1px, rgba(0,0,0,0.1) 0px 2px 2px 0px, rgba(0,0,0,0.1) 0px 4px 4px 0px, rgba(0,0,0,0.1) 0px 8px 8px 0px, rgba(255,255,255,0.03) 0px 1px 0px 0px inset"},field:{color:"color-black",fontFamily:"'Inter', Helvetica, Arial, sans-serif",fontStyle:"normal",letterSpacing:"-0.02em"},label:{fontFamily:"'Inter', Helvetica, Arial, sans-serif",fontWeight:800,letterSpacing:"-0.02em",textTransform:"none",fontStyle:"normal"},helperText:{}}},select:{size:"md",shape:"default",variant:"default",views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"color-black",borderRadius:16,borderWidth:"1px",borderStyle:"solid",boxShadow:"rgba(0,0,0,0.1) 0px 0px 0px 1px, rgba(0,0,0,0.1) 0px 2px 2px 0px, rgba(0,0,0,0.1) 0px 4px 4px 0px, rgba(0,0,0,0.1) 0px 8px 8px 0px, rgba(255,255,255,0.03) 0px 1px 0px 0px inset"},field:{color:"color-black",fontFamily:"'Inter', Helvetica, Arial, sans-serif"},label:{fontFamily:"'Inter', Helvetica, Arial, sans-serif",fontWeight:800,letterSpacing:"-0.02em",textTransform:"none",fontStyle:"normal"},helperText:{},text:{letterSpacing:"-0.02em",fontStyle:"normal"}}},checkbox:{size:"md",views:{checkbox:{borderColor:"color-gray-200",backgroundColor:"color-white",_checked:{backgroundColor:"theme-primary",borderColor:"theme-primary"},borderRadius:9999},label:{fontFamily:"'Inter', Helvetica, Arial, sans-serif",fontWeight:800,letterSpacing:"-0.02em",textTransform:"none",fontStyle:"normal"},infoText:{color:"color-gray-500"},container:{borderRadius:9999}}},radio:{size:"md",views:{radio:{borderColor:"color-gray-200",backgroundColor:"color-white"},dot:{backgroundColor:"theme-primary"},label:{fontFamily:"'Inter', Helvetica, Arial, sans-serif",fontWeight:800,letterSpacing:"-0.02em",textTransform:"none",fontStyle:"normal"},infoText:{color:"color-gray-500"},container:{borderRadius:"50%"}}},switch:{size:"sm",views:{slider:{backgroundColor:"color-gray-200"},circle:{backgroundColor:"color-white"},label:{fontFamily:"'Inter', Helvetica, Arial, sans-serif",fontWeight:800,letterSpacing:"-0.02em",textTransform:"none",fontStyle:"normal"},container:{borderRadius:"9999px"}}},slider:{backgroundColor:"theme-primary",views:{track:{backgroundColor:"color-gray-200"},progress:{backgroundColor:"theme-primary"},filledTrack:{backgroundColor:"theme-primary"},thumb:{borderColor:"theme-primary",backgroundColor:"color-white"},label:{color:"color-black"},valueLabel:{color:"color-gray-500"}}},tabs:{variant:"pill",views:{headerTabs:{borderColor:"color-gray-200"},tab:{color:"color-gray-500",fontWeight:800,letterSpacing:"-0.02em",textTransform:"none",fontStyle:"normal"},activeTab:{color:"theme-primary",borderColor:"theme-primary",backgroundColor:"theme-primary"},title:{fontFamily:"'Inter', Helvetica, Arial, sans-serif"},activeText:{color:"color-white"},content:{color:"color-black"},container:{borderRadius:"9999px"}}},accordion:{views:{container:{borderColor:"color-gray-200",backgroundColor:"color-gray-50",color:"color-black",borderRadius:"24px"},trigger:{color:"color-black",fontFamily:"'Inter', Helvetica, Arial, sans-serif"},content:{color:"color-gray-500"}}},table:{views:{table:{backgroundColor:"color-white",color:"color-black",borderColor:"color-gray-200",borderRadius:8},thead:{backgroundColor:"color-gray-50",color:"color-black"},th:{color:"color-gray-500",borderColor:"color-gray-200",fontFamily:"ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace",fontWeight:800,letterSpacing:"-0.02em",textTransform:"none",fontStyle:"normal"},tr:{borderColor:"color-gray-200"},td:{color:"color-black",borderColor:"color-gray-200",letterSpacing:"-0.02em",fontStyle:"normal"},caption:{color:"color-gray-500",fontStyle:"italic",letterSpacing:"-0.02em"}}},avatar:{views:{container:{backgroundColor:"color-gray-50",borderColor:"color-gray-200",color:"color-black",borderRadius:"50%"},fallback:{color:"color-black",fontFamily:"'Inter', Helvetica, Arial, sans-serif"}}},alert:{views:{container:{backgroundColor:"color-gray-50",borderColor:"color-gray-200",borderRadius:8},title:{color:"color-black",fontFamily:"'Inter', Helvetica, Arial, sans-serif",fontWeight:800,letterSpacing:"-0.02em",textTransform:"none",fontStyle:"normal"},description:{color:"color-gray-500",fontFamily:"'Inter', Helvetica, Arial, sans-serif"},icon:{color:"theme-primary"}}},status:{views:{indicator:{backgroundColor:"theme-primary"},label:{color:"color-black",fontFamily:"'Inter', Helvetica, Arial, sans-serif"}}},progress:{color:"theme-primary",backgroundColor:"color-gray-200",radius:"16px",views:{container:{backgroundColor:"color-gray-200",borderRadius:"9999px"},bar:{backgroundColor:"theme-primary"},text:{color:"color-black"}}},loader:{color:"theme-primary"},separator:{color:"color-gray-200",views:{container:{borderColor:"color-gray-200"},label:{color:"color-gray-500",fontFamily:"'Inter', Helvetica, Arial, sans-serif"}}},navigation:{views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"color-black",borderRadius:"24px"},item:{color:"color-gray-500"},activeItem:{color:"theme-primary",borderColor:"theme-primary"}}},hero:{views:{container:{backgroundColor:"color-white",color:"color-black",fontFamily:"'Inter', Helvetica, Arial, sans-serif"},eyebrow:{color:"color-gray-500"},title:{color:"color-black",fontFamily:"'Inter', Helvetica, Arial, sans-serif"},description:{color:"color-gray-500"}}},page:{views:{container:{backgroundColor:"color-white",color:"color-black",fontFamily:"'Inter', Helvetica, Arial, sans-serif"},section:{backgroundColor:"color-white",borderColor:"color-gray-200"},surface:{backgroundColor:"color-gray-50",borderColor:"color-gray-200",color:"color-black"}}}},personality:{cornerStyle:"pill",typeWeight:"black",typeCase:"normal",typeStyle:"normal",letterSpacing:"-0.02em",accentTreatment:"flat",signatureMotif:"●",density:"comfortable",surfaceTone:"matte",cardRadius:8,pillRadius:9999,badgeRadius:9999,voice:"rhythmic-vibrant"}},stripe:{metadata:{id:"stripe",label:"Stripe",sourcePath:"design.md/html/stripe.html",sourceTitle:"Design System Preview: Stripe (Light)",defaultAppearance:"light",googleFontLinks:["https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Source+Code+Pro:wght@400;500;700&display=swap"]},theme:{primary:"#635BFF",secondary:"#f96bee",success:"#15be53",warning:"#9b6829",error:"#ea2261",canvas:"color-white",surface:"color-gray-50",text:"color-black",muted:"color-gray-500",border:"color-gray-200",onPrimary:"#ffffff"},tokens:{rawCssVars:{purple:"#533afd","purple-hover":"#4434d4","purple-deep":"#2e2b8c","purple-light":"#b9b9f9","purple-mid":"#665efd",navy:"#061b31","dark-navy":"#0d253d","brand-dark":"#1c1e54",white:"#ffffff",ruby:"#ea2261",magenta:"#f96bee","magenta-light":"#ffd7ef",success:"#15be53","success-text":"#108c3d",lemon:"#9b6829",slate:"#64748d","dark-slate":"#273951",border:"#e5edf5","border-purple":"#b9b9f9","border-soft":"#d6d9fc","shadow-blue":"rgba(50,50,93,0.25)","shadow-dark-blue":"rgba(3,3,39,0.25)","shadow-black":"rgba(0,0,0,0.1)","shadow-ambient":"rgba(23,23,23,0.08)","shadow-soft":"rgba(23,23,23,0.06)","shadow-card":"rgba(50,50,93,0.25) 0px 30px 45px -30px, rgba(0,0,0,0.1) 0px 18px 36px -18px","shadow-ambient-card":"rgba(23,23,23,0.08) 0px 15px 35px 0px","shadow-subtle":"rgba(23,23,23,0.06) 0px 3px 6px 0px","font-primary":"'sohne-var', 'SF Pro Display', -apple-system, system-ui, sans-serif","font-mono":"'Source Code Pro', SFMono-Regular, ui-monospace, Menlo, monospace"},colors:[{name:"purple",value:"#533afd",role:"purple"},{name:"purple-hover",value:"#4434d4",role:"purple hover"},{name:"purple-deep",value:"#2e2b8c",role:"purple deep"},{name:"purple-light",value:"#b9b9f9",role:"purple light"},{name:"purple-mid",value:"#665efd",role:"purple mid"},{name:"navy",value:"#061b31",role:"navy"},{name:"dark-navy",value:"#0d253d",role:"dark navy"},{name:"brand-dark",value:"#1c1e54",role:"brand dark"},{name:"white",value:"#ffffff",role:"white"},{name:"ruby",value:"#ea2261",role:"ruby"},{name:"magenta",value:"#f96bee",role:"magenta"},{name:"magenta-light",value:"#ffd7ef",role:"magenta light"},{name:"success",value:"#15be53",role:"success"},{name:"success-text",value:"#108c3d",role:"success text"},{name:"lemon",value:"#9b6829",role:"lemon"},{name:"slate",value:"#64748d",role:"slate"},{name:"dark-slate",value:"#273951",role:"dark slate"},{name:"border",value:"#e5edf5",role:"border"},{name:"border-purple",value:"#b9b9f9",role:"border purple"},{name:"border-soft",value:"#d6d9fc",role:"border soft"},{name:"shadow-blue",value:"rgba(50,50,93,0.25)",role:"shadow blue"},{name:"shadow-dark-blue",value:"rgba(3,3,39,0.25)",role:"shadow dark blue"},{name:"shadow-black",value:"rgba(0,0,0,0.1)",role:"shadow black"},{name:"shadow-ambient",value:"rgba(23,23,23,0.08)",role:"shadow ambient"},{name:"shadow-soft",value:"rgba(23,23,23,0.06)",role:"shadow soft"},{name:"shadow-card",value:"rgba(50,50,93,0.25) 0px 30px 45px -30px, rgba(0,0,0,0.1) 0px 18px 36px -18px",role:"shadow card"},{name:"shadow-ambient-card",value:"rgba(23,23,23,0.08) 0px 15px 35px 0px",role:"shadow ambient card"},{name:"shadow-subtle",value:"rgba(23,23,23,0.06) 0px 3px 6px 0px",role:"shadow subtle"}],typography:{fontFamily:"'sohne-var', 'SF Pro Display', -apple-system, system-ui, sans-serif",monoFamily:"'Source Code Pro', SFMono-Regular, ui-monospace, Menlo, monospace",fontSizes:["16px","14px","48px","18px","12px","32px","13px","11px","10px","22px"],fontWeights:["100 900","300","400","500","700","600"],lineHeights:["1.40","1.15","1.10","1.50","1.2","1.35","1.4"]},spacing:["1px","6px","8px","10px","12px","14px","16px","20px","24px","28px","32px","48px","64px","72px","80px","96px"],radii:["0 0 6px 6px","4px","6px","2px","3px"],shadows:["rgba(50,50,93,0.25)","rgba(3,3,39,0.25)","rgba(0,0,0,0.1)","rgba(23,23,23,0.08)","rgba(23,23,23,0.06)","rgba(50,50,93,0.25) 0px 30px 45px -30px, rgba(0,0,0,0.1) 0px 18px 36px -18px","rgba(23,23,23,0.08) 0px 15px 35px 0px","rgba(23,23,23,0.06) 0px 3px 6px 0px","var(--shadow-subtle)","var(--shadow-card)","0 0 0 1px theme-primary","0 0 0 1px var(--ruby)"]},components:{button:{variant:"filled",size:"md",shape:"rounded",color:"theme-primary",textColor:"theme-onPrimary",views:{container:{borderRadius:9999,fontFamily:"'sohne-var', 'SF Pro Display', -apple-system, system-ui, sans-serif",fontWeight:700,letterSpacing:"-0.022em",textTransform:"none",fontStyle:"normal"},content:{fontFamily:"'sohne-var', 'SF Pro Display', -apple-system, system-ui, sans-serif",fontWeight:700,letterSpacing:"-0.022em",textTransform:"none",fontStyle:"normal"}}},badge:{variant:"filled",size:"sm",shape:"rounded",views:{container:{backgroundColor:"theme-secondary",color:"color-white",borderColor:"theme-secondary",borderRadius:6,fontFamily:"'sohne-var', 'SF Pro Display', -apple-system, system-ui, sans-serif",letterSpacing:"-0.022em",textTransform:"none",fontWeight:700,fontStyle:"normal"},text:{fontFamily:"'sohne-var', 'SF Pro Display', -apple-system, system-ui, sans-serif",fontWeight:600}}},card:{variant:"outlined",size:"md",shape:"rounded",views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"color-black",borderRadius:12,borderWidth:"1px",borderStyle:"solid",boxShadow:"rgba(23,23,23,0.06) 0px 3px 6px 0px"},header:{color:"color-black",fontFamily:"'sohne-var', 'SF Pro Display', -apple-system, system-ui, sans-serif",fontWeight:600,borderColor:"color-gray-200"},content:{color:"color-gray-500",fontFamily:"'sohne-var', 'SF Pro Display', -apple-system, system-ui, sans-serif"},footer:{borderColor:"color-gray-200"}}},input:{size:"md",shape:"default",variant:"default",views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"color-black",borderRadius:10,borderWidth:"1px",borderStyle:"solid",boxShadow:"0 0 0 1px theme-primary"},field:{color:"color-black",fontFamily:"'sohne-var', 'SF Pro Display', -apple-system, system-ui, sans-serif",fontStyle:"normal",letterSpacing:"-0.022em"},label:{fontFamily:"'sohne-var', 'SF Pro Display', -apple-system, system-ui, sans-serif",fontWeight:700,letterSpacing:"-0.022em",textTransform:"none",fontStyle:"normal"},helperText:{}}},textarea:{size:"md",shape:"default",variant:"default",views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"color-black",borderRadius:10,borderWidth:"1px",borderStyle:"solid",boxShadow:"0 0 0 1px theme-primary"},field:{color:"color-black",fontFamily:"'sohne-var', 'SF Pro Display', -apple-system, system-ui, sans-serif",fontStyle:"normal",letterSpacing:"-0.022em"},label:{fontFamily:"'sohne-var', 'SF Pro Display', -apple-system, system-ui, sans-serif",fontWeight:700,letterSpacing:"-0.022em",textTransform:"none",fontStyle:"normal"},helperText:{}}},select:{size:"md",shape:"default",variant:"default",views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"color-black",borderRadius:10,borderWidth:"1px",borderStyle:"solid",boxShadow:"0 0 0 1px theme-primary"},field:{color:"color-black",fontFamily:"'sohne-var', 'SF Pro Display', -apple-system, system-ui, sans-serif"},label:{fontFamily:"'sohne-var', 'SF Pro Display', -apple-system, system-ui, sans-serif",fontWeight:700,letterSpacing:"-0.022em",textTransform:"none",fontStyle:"normal"},helperText:{},text:{letterSpacing:"-0.022em",fontStyle:"normal"}}},checkbox:{size:"md",views:{checkbox:{borderColor:"color-gray-200",backgroundColor:"color-white",_checked:{backgroundColor:"theme-primary",borderColor:"theme-primary"},borderRadius:4},label:{fontFamily:"'sohne-var', 'SF Pro Display', -apple-system, system-ui, sans-serif",fontWeight:700,letterSpacing:"-0.022em",textTransform:"none",fontStyle:"normal"},infoText:{color:"color-gray-500"},container:{borderRadius:4}}},radio:{size:"md",views:{radio:{borderColor:"color-gray-200",backgroundColor:"color-white"},dot:{backgroundColor:"theme-primary"},label:{fontFamily:"'sohne-var', 'SF Pro Display', -apple-system, system-ui, sans-serif",fontWeight:700,letterSpacing:"-0.022em",textTransform:"none",fontStyle:"normal"},infoText:{color:"color-gray-500"},container:{borderRadius:"50%"}}},switch:{size:"sm",views:{slider:{backgroundColor:"color-gray-200"},circle:{backgroundColor:"color-white"},label:{fontFamily:"'sohne-var', 'SF Pro Display', -apple-system, system-ui, sans-serif",fontWeight:700,letterSpacing:"-0.022em",textTransform:"none",fontStyle:"normal"},container:{borderRadius:"9999px"}}},slider:{backgroundColor:"theme-primary",views:{track:{backgroundColor:"color-gray-200"},progress:{backgroundColor:"theme-primary"},filledTrack:{backgroundColor:"theme-primary"},thumb:{borderColor:"theme-primary",backgroundColor:"color-white"},label:{color:"color-black"},valueLabel:{color:"color-gray-500"}}},tabs:{variant:"underline",views:{headerTabs:{borderColor:"color-gray-200"},tab:{color:"color-gray-500",fontWeight:700,letterSpacing:"-0.022em",textTransform:"none",fontStyle:"normal"},activeTab:{color:"theme-primary",borderColor:"theme-primary",backgroundColor:"transparent"},title:{fontFamily:"'sohne-var', 'SF Pro Display', -apple-system, system-ui, sans-serif"},activeText:{color:"theme-primary"},content:{color:"color-black"},container:{borderRadius:"4px"}}},accordion:{views:{container:{borderColor:"color-gray-200",backgroundColor:"color-white",color:"color-black",borderRadius:"6px"},trigger:{color:"color-black",fontFamily:"'sohne-var', 'SF Pro Display', -apple-system, system-ui, sans-serif"},content:{color:"color-gray-500"}}},table:{views:{table:{backgroundColor:"color-white",color:"color-black",borderColor:"color-gray-200",borderRadius:12},thead:{backgroundColor:"color-white",color:"color-black"},th:{color:"color-gray-500",borderColor:"color-gray-200",fontFamily:"'Source Code Pro', SFMono-Regular, ui-monospace, Menlo, monospace",fontWeight:700,letterSpacing:"-0.022em",textTransform:"none",fontStyle:"normal"},tr:{borderColor:"color-gray-200"},td:{color:"color-black",borderColor:"color-gray-200",letterSpacing:"-0.022em",fontStyle:"normal"},caption:{color:"color-gray-500",fontStyle:"italic",letterSpacing:"-0.022em"}}},avatar:{views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"color-black",borderRadius:"50%"},fallback:{color:"color-black",fontFamily:"'sohne-var', 'SF Pro Display', -apple-system, system-ui, sans-serif"}}},alert:{views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",borderRadius:12},title:{color:"color-black",fontFamily:"'sohne-var', 'SF Pro Display', -apple-system, system-ui, sans-serif",fontWeight:700,letterSpacing:"-0.022em",textTransform:"none",fontStyle:"normal"},description:{color:"color-gray-500",fontFamily:"'sohne-var', 'SF Pro Display', -apple-system, system-ui, sans-serif"},icon:{color:"theme-primary"}}},status:{views:{indicator:{backgroundColor:"theme-success"},label:{color:"color-black",fontFamily:"'sohne-var', 'SF Pro Display', -apple-system, system-ui, sans-serif"}}},progress:{color:"theme-primary",backgroundColor:"color-gray-200",radius:"6px",views:{container:{backgroundColor:"color-gray-200",borderRadius:"9999px"},bar:{backgroundColor:"theme-primary"},text:{color:"color-black"}}},loader:{color:"theme-primary"},separator:{color:"color-gray-200",views:{container:{borderColor:"color-gray-200"},label:{color:"color-gray-500",fontFamily:"'sohne-var', 'SF Pro Display', -apple-system, system-ui, sans-serif"}}},navigation:{views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"color-black",borderRadius:"6px"},item:{color:"color-gray-500"},activeItem:{color:"theme-primary",borderColor:"theme-primary"}}},hero:{views:{container:{backgroundColor:"color-white",color:"color-black",fontFamily:"'sohne-var', 'SF Pro Display', -apple-system, system-ui, sans-serif"},eyebrow:{color:"color-gray-500"},title:{color:"color-black",fontFamily:"'sohne-var', 'SF Pro Display', -apple-system, system-ui, sans-serif"},description:{color:"color-gray-500"}}},page:{views:{container:{backgroundColor:"color-white",color:"color-black",fontFamily:"'sohne-var', 'SF Pro Display', -apple-system, system-ui, sans-serif"},section:{backgroundColor:"color-white",borderColor:"color-gray-200"},surface:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"color-black"}}}},personality:{cornerStyle:"soft",typeWeight:"bold",typeCase:"normal",typeStyle:"normal",letterSpacing:"-0.022em",accentTreatment:"gradient",signatureMotif:"↗",density:"comfortable",surfaceTone:"glass",cardRadius:12,pillRadius:9999,badgeRadius:6,voice:"refined-fintech"}},tesla:{metadata:{id:"tesla",label:"Tesla",sourcePath:"design.md/html/tesla.html",sourceTitle:"Design System Inspired by Tesla",defaultAppearance:"light",googleFontLinks:["https://fonts.googleapis.com/css2?family=Inter:wght@400;500&display=swap"]},theme:{primary:"#3E6AE1",secondary:"#171A20",success:"#3E6AE1",warning:"#5C5E62",error:"#171A20",canvas:"color-white",surface:"color-gray-50",text:"color-black",muted:"color-gray-500",border:"color-gray-200",onPrimary:"#FFFFFF"},tokens:{rawCssVars:{"electric-blue":"#3E6AE1","pure-white":"#FFFFFF","carbon-dark":"#171A20",graphite:"#393C41",pewter:"#5C5E62","silver-fog":"#8E8E8E","cloud-gray":"#EEEEEE","pale-silver":"#D0D1D2","light-ash":"#F4F4F4","frosted-glass":"rgba(255,255,255,0.75)",overlay:"rgba(128,128,128,0.65)","subtle-shadow":"rgba(0,0,0,0.05)","font-display":"'Inter', -apple-system, Arial, sans-serif","font-text":"'Inter', -apple-system, Arial, sans-serif"},colors:[{name:"electric-blue",value:"#3E6AE1",role:"electric blue"},{name:"pure-white",value:"#FFFFFF",role:"pure white"},{name:"carbon-dark",value:"#171A20",role:"carbon dark"},{name:"graphite",value:"#393C41",role:"graphite"},{name:"pewter",value:"#5C5E62",role:"pewter"},{name:"silver-fog",value:"#8E8E8E",role:"silver fog"},{name:"cloud-gray",value:"#EEEEEE",role:"cloud gray"},{name:"pale-silver",value:"#D0D1D2",role:"pale silver"},{name:"light-ash",value:"#F4F4F4",role:"light ash"},{name:"frosted-glass",value:"rgba(255,255,255,0.75)",role:"frosted glass"},{name:"overlay",value:"rgba(128,128,128,0.65)",role:"overlay"},{name:"subtle-shadow",value:"rgba(0,0,0,0.05)",role:"subtle shadow"}],typography:{fontFamily:"'Inter', -apple-system, Arial, sans-serif",monoFamily:"ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace",fontSizes:["14px","40px","28px","13px","12px","11px","17px","16px"],fontWeights:["400","500","700","600"],lineHeights:["1.43","48px","20px","1.2","1.3","36px","1.35","1.4"]},spacing:["4px","6px","8px","10px","12px","14px","16px","20px","24px","32px","40px","48px","56px","60px","64px","80px","100px"],radii:["4px","4px 4px 0 0","0 0 4px 4px","12px","3px"],shadows:["rgba(0,0,0,0.05)","0 1px 0 var(--pewter)"]},components:{button:{variant:"filled",size:"md",shape:"square",color:"theme-primary",textColor:"theme-onPrimary",views:{container:{borderRadius:0,fontFamily:"'Inter', -apple-system, Arial, sans-serif",fontWeight:300,letterSpacing:"0.08em",textTransform:"uppercase",fontStyle:"normal"},content:{fontFamily:"'Inter', -apple-system, Arial, sans-serif",fontWeight:300,letterSpacing:"0.08em",textTransform:"uppercase",fontStyle:"normal"}}},badge:{variant:"filled",size:"sm",shape:"rounded",views:{container:{backgroundColor:"theme-secondary",color:"color-white",borderColor:"theme-secondary",borderRadius:0,fontFamily:"'Inter', -apple-system, Arial, sans-serif",letterSpacing:"0.08em",textTransform:"uppercase",fontWeight:300,fontStyle:"normal"},text:{fontFamily:"'Inter', -apple-system, Arial, sans-serif",fontWeight:600}}},card:{variant:"outlined",size:"md",shape:"square",views:{container:{backgroundColor:"color-gray-50",borderColor:"color-gray-200",color:"color-black",borderRadius:0,borderWidth:"1px",borderStyle:"solid",boxShadow:"rgba(0,0,0,0.05)"},header:{color:"color-black",fontFamily:"'Inter', -apple-system, Arial, sans-serif",fontWeight:600,borderColor:"color-gray-200"},content:{color:"theme-warning",fontFamily:"'Inter', -apple-system, Arial, sans-serif"},footer:{borderColor:"color-gray-200"}}},input:{size:"md",shape:"default",variant:"default",views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"color-black",borderRadius:2,borderWidth:"1px",borderStyle:"solid",boxShadow:"none"},field:{color:"color-black",fontFamily:"'Inter', -apple-system, Arial, sans-serif",fontStyle:"normal",letterSpacing:"0.02em"},label:{fontFamily:"'Inter', -apple-system, Arial, sans-serif",fontWeight:300,letterSpacing:"0.02em",textTransform:"uppercase",fontStyle:"normal"},helperText:{}}},textarea:{size:"md",shape:"default",variant:"default",views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"color-black",borderRadius:2,borderWidth:"1px",borderStyle:"solid",boxShadow:"none"},field:{color:"color-black",fontFamily:"'Inter', -apple-system, Arial, sans-serif",fontStyle:"normal",letterSpacing:"0.02em"},label:{fontFamily:"'Inter', -apple-system, Arial, sans-serif",fontWeight:300,letterSpacing:"0.02em",textTransform:"uppercase",fontStyle:"normal"},helperText:{}}},select:{size:"md",shape:"default",variant:"default",views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"color-black",borderRadius:2,borderWidth:"1px",borderStyle:"solid",boxShadow:"none"},field:{color:"color-black",fontFamily:"'Inter', -apple-system, Arial, sans-serif"},label:{fontFamily:"'Inter', -apple-system, Arial, sans-serif",fontWeight:300,letterSpacing:"0.02em",textTransform:"uppercase",fontStyle:"normal"},helperText:{},text:{letterSpacing:"0.02em",fontStyle:"normal"}}},checkbox:{size:"md",views:{checkbox:{borderColor:"color-gray-200",backgroundColor:"color-white",_checked:{backgroundColor:"theme-primary",borderColor:"theme-primary"},borderRadius:0},label:{fontFamily:"'Inter', -apple-system, Arial, sans-serif",fontWeight:300,letterSpacing:"0.02em",textTransform:"uppercase",fontStyle:"normal"},infoText:{color:"theme-warning"},container:{borderRadius:0}}},radio:{size:"md",views:{radio:{borderColor:"color-gray-200",backgroundColor:"color-white"},dot:{backgroundColor:"theme-primary"},label:{fontFamily:"'Inter', -apple-system, Arial, sans-serif",fontWeight:300,letterSpacing:"0.02em",textTransform:"uppercase",fontStyle:"normal"},infoText:{color:"theme-warning"},container:{borderRadius:"50%"}}},switch:{size:"sm",views:{slider:{backgroundColor:"color-gray-200"},circle:{backgroundColor:"color-white"},label:{fontFamily:"'Inter', -apple-system, Arial, sans-serif",fontWeight:300,letterSpacing:"0.02em",textTransform:"uppercase",fontStyle:"normal"},container:{borderRadius:"9999px"}}},slider:{backgroundColor:"theme-primary",views:{track:{backgroundColor:"color-gray-200"},progress:{backgroundColor:"theme-primary"},filledTrack:{backgroundColor:"theme-primary"},thumb:{borderColor:"theme-primary",backgroundColor:"color-white"},label:{color:"color-black"},valueLabel:{color:"theme-warning"}}},tabs:{variant:"underline",views:{headerTabs:{borderColor:"color-gray-200"},tab:{color:"theme-warning",fontWeight:300,letterSpacing:"0.02em",textTransform:"uppercase",fontStyle:"normal"},activeTab:{color:"theme-primary",borderColor:"theme-primary",backgroundColor:"transparent"},title:{fontFamily:"'Inter', -apple-system, Arial, sans-serif"},activeText:{color:"theme-primary"},content:{color:"color-black"},container:{borderRadius:"4px"}}},accordion:{views:{container:{borderColor:"color-gray-200",backgroundColor:"color-gray-50",color:"color-black",borderRadius:0},trigger:{color:"color-black",fontFamily:"'Inter', -apple-system, Arial, sans-serif"},content:{color:"theme-warning"}}},table:{views:{table:{backgroundColor:"color-white",color:"color-black",borderColor:"color-gray-200",borderRadius:0},thead:{backgroundColor:"color-gray-50",color:"color-black"},th:{color:"theme-warning",borderColor:"color-gray-200",fontFamily:"ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace",fontWeight:300,letterSpacing:"0.02em",textTransform:"uppercase",fontStyle:"normal"},tr:{borderColor:"color-gray-200"},td:{color:"color-black",borderColor:"color-gray-200",letterSpacing:"0.02em",fontStyle:"normal"},caption:{color:"theme-warning",fontStyle:"italic",letterSpacing:"0.02em"}}},avatar:{views:{container:{backgroundColor:"color-gray-50",borderColor:"color-gray-200",color:"color-black",borderRadius:"50%"},fallback:{color:"color-black",fontFamily:"'Inter', -apple-system, Arial, sans-serif"}}},alert:{views:{container:{backgroundColor:"color-gray-50",borderColor:"color-gray-200",borderRadius:0},title:{color:"color-black",fontFamily:"'Inter', -apple-system, Arial, sans-serif",fontWeight:300,letterSpacing:"0.02em",textTransform:"uppercase",fontStyle:"normal"},description:{color:"theme-warning",fontFamily:"'Inter', -apple-system, Arial, sans-serif"},icon:{color:"theme-primary"}}},status:{views:{indicator:{backgroundColor:"theme-primary"},label:{color:"color-black",fontFamily:"'Inter', -apple-system, Arial, sans-serif"}}},progress:{color:"theme-primary",backgroundColor:"color-gray-200",radius:"4px",views:{container:{backgroundColor:"color-gray-200",borderRadius:"9999px"},bar:{backgroundColor:"theme-primary"},text:{color:"color-black"}}},loader:{color:"theme-primary"},separator:{color:"color-gray-200",views:{container:{borderColor:"color-gray-200"},label:{color:"theme-warning",fontFamily:"'Inter', -apple-system, Arial, sans-serif"}}},navigation:{views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"color-black",borderRadius:0},item:{color:"theme-warning"},activeItem:{color:"theme-primary",borderColor:"theme-primary"}}},hero:{views:{container:{backgroundColor:"color-white",color:"color-black",fontFamily:"'Inter', -apple-system, Arial, sans-serif"},eyebrow:{color:"theme-warning"},title:{color:"color-black",fontFamily:"'Inter', -apple-system, Arial, sans-serif"},description:{color:"theme-warning"}}},page:{views:{container:{backgroundColor:"color-white",color:"color-black",fontFamily:"'Inter', -apple-system, Arial, sans-serif"},section:{backgroundColor:"color-white",borderColor:"color-gray-200"},surface:{backgroundColor:"color-gray-50",borderColor:"color-gray-200",color:"color-black"}}}},personality:{cornerStyle:"sharp",typeWeight:"light",typeCase:"uppercase",typeStyle:"normal",letterSpacing:"0.02em",accentTreatment:"flat",signatureMotif:"▲",density:"spacious",surfaceTone:"mono",cardRadius:0,pillRadius:0,badgeRadius:0,voice:"futurist-clean"}},uber:{metadata:{id:"uber",label:"Uber",sourcePath:"design.md/html/uber.html",sourceTitle:"Design System Preview: Uber (Light)",defaultAppearance:"light",googleFontLinks:["https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,300;0,9..40,400;0,9..40,500;0,9..40,700&display=swap"]},theme:{primary:"color-black",secondary:"#efefef",success:"#06C167",warning:"#e2e2e2",error:"#000000",canvas:"color-white",surface:"color-gray-50",text:"color-black",muted:"color-gray-500",border:"color-gray-200",onPrimary:"color-white"},tokens:{rawCssVars:{"color-black":"#000000","color-white":"#ffffff","color-hover-gray":"#e2e2e2","color-hover-light":"#f3f3f3","color-chip-gray":"#efefef","color-body-gray":"#4b4b4b","color-muted-gray":"#afafaf","shadow-card":"rgba(0, 0, 0, 0.12) 0px 4px 16px 0px","shadow-medium":"rgba(0, 0, 0, 0.16) 0px 4px 16px 0px","shadow-float":"rgba(0, 0, 0, 0.16) 0px 2px 8px 0px","shadow-press":"rgba(0, 0, 0, 0.08) 0px 0px 0px 999px inset","font-display":"'DM Sans', system-ui, -apple-system, 'Helvetica Neue', Helvetica, Arial, sans-serif","font-body":"'DM Sans', system-ui, -apple-system, 'Helvetica Neue', Helvetica, Arial, sans-serif","bg-page":"#ffffff","bg-card":"#ffffff","bg-nav":"rgba(255,255,255,0.92)","text-primary":"#000000","text-secondary":"#4b4b4b","text-tertiary":"#afafaf","border-color":"#efefef","section-label-color":"#000000"},colors:[{name:"color-black",value:"#000000",role:"color black"},{name:"color-white",value:"#ffffff",role:"color white"},{name:"color-hover-gray",value:"#e2e2e2",role:"color hover gray"},{name:"color-hover-light",value:"#f3f3f3",role:"color hover light"},{name:"color-chip-gray",value:"#efefef",role:"color chip gray"},{name:"color-body-gray",value:"#4b4b4b",role:"color body gray"},{name:"color-muted-gray",value:"#afafaf",role:"color muted gray"},{name:"shadow-card",value:"rgba(0, 0, 0, 0.12) 0px 4px 16px 0px",role:"shadow card"},{name:"shadow-medium",value:"rgba(0, 0, 0, 0.16) 0px 4px 16px 0px",role:"shadow medium"},{name:"shadow-float",value:"rgba(0, 0, 0, 0.16) 0px 2px 8px 0px",role:"shadow float"},{name:"shadow-press",value:"rgba(0, 0, 0, 0.08) 0px 0px 0px 999px inset",role:"shadow press"},{name:"bg-page",value:"#ffffff",role:"bg page"},{name:"bg-card",value:"#ffffff",role:"bg card"},{name:"bg-nav",value:"rgba(255,255,255,0.92)",role:"bg nav"},{name:"text-primary",value:"#000000",role:"text primary"},{name:"text-secondary",value:"#4b4b4b",role:"text secondary"},{name:"text-tertiary",value:"#afafaf",role:"text tertiary"},{name:"border-color",value:"#efefef",role:"border color"},{name:"section-label-color",value:"#000000",role:"section label color"}],typography:{fontFamily:"'DM Sans', system-ui, -apple-system, 'Helvetica Neue', Helvetica, Arial, sans-serif",monoFamily:"ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace",fontSizes:["16px","18px","14px","64px","20px","12px","36px","13px","24px","28px"],fontWeights:["700","500","400","600"],lineHeights:["1.50","1.10","1.22","1.33","2.0","1.2","1.35","1.4"]},spacing:["8px","10px","12px","14px","16px","20px","24px","28px","32px","36px","40px","50px","60px","64px","80px","100px","120px","140px"],radii:["8px","999px","12px","16px","4px","3px"],shadows:["rgba(0, 0, 0, 0.12) 0px 4px 16px 0px","rgba(0, 0, 0, 0.16) 0px 4px 16px 0px","rgba(0, 0, 0, 0.16) 0px 2px 8px 0px","rgba(0, 0, 0, 0.08) 0px 0px 0px 999px inset","var(--shadow-card)","var(--shadow-float)","var(--shadow-medium)","0 0 0 1px color-black","rgba(0,0,0,0.12) 0px 4px 16px 0px","rgba(0,0,0,0.16) 0px 4px 16px 0px","rgba(0,0,0,0.16) 0px 2px 8px 0px","rgba(0,0,0,0.08) 0px 0px 0px 999px inset"]},components:{button:{variant:"filled",size:"md",shape:"square",color:"theme-primary",textColor:"theme-onPrimary",views:{container:{borderRadius:0,fontFamily:"'DM Sans', system-ui, -apple-system, 'Helvetica Neue', Helvetica, Arial, sans-serif",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},content:{fontFamily:"'DM Sans', system-ui, -apple-system, 'Helvetica Neue', Helvetica, Arial, sans-serif",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"}}},badge:{variant:"filled",size:"sm",shape:"pill",views:{container:{backgroundColor:"theme-secondary",color:"color-white",borderColor:"theme-secondary",borderRadius:0,fontFamily:"'DM Sans', system-ui, -apple-system, 'Helvetica Neue', Helvetica, Arial, sans-serif",letterSpacing:"-0.01em",textTransform:"none",fontWeight:700,fontStyle:"normal"},text:{fontFamily:"'DM Sans', system-ui, -apple-system, 'Helvetica Neue', Helvetica, Arial, sans-serif",fontWeight:600}}},card:{variant:"outlined",size:"md",shape:"square",views:{container:{backgroundColor:"color-white",borderColor:"theme-warning",color:"theme-primary",borderRadius:4,borderWidth:"1px",borderStyle:"solid",boxShadow:"rgba(0, 0, 0, 0.12) 0px 4px 16px 0px"},header:{color:"theme-primary",fontFamily:"'DM Sans', system-ui, -apple-system, 'Helvetica Neue', Helvetica, Arial, sans-serif",fontWeight:600,borderColor:"theme-warning"},content:{color:"color-gray-500",fontFamily:"'DM Sans', system-ui, -apple-system, 'Helvetica Neue', Helvetica, Arial, sans-serif"},footer:{borderColor:"theme-warning"}}},input:{size:"md",shape:"default",variant:"default",views:{container:{backgroundColor:"color-white",borderColor:"theme-warning",color:"theme-primary",borderRadius:2,borderWidth:"1px",borderStyle:"solid",boxShadow:"0 0 0 1px color-black"},field:{color:"theme-primary",fontFamily:"'DM Sans', system-ui, -apple-system, 'Helvetica Neue', Helvetica, Arial, sans-serif",fontStyle:"normal",letterSpacing:"-0.01em"},label:{fontFamily:"'DM Sans', system-ui, -apple-system, 'Helvetica Neue', Helvetica, Arial, sans-serif",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},helperText:{}}},textarea:{size:"md",shape:"default",variant:"default",views:{container:{backgroundColor:"color-white",borderColor:"theme-warning",color:"theme-primary",borderRadius:2,borderWidth:"1px",borderStyle:"solid",boxShadow:"0 0 0 1px color-black"},field:{color:"theme-primary",fontFamily:"'DM Sans', system-ui, -apple-system, 'Helvetica Neue', Helvetica, Arial, sans-serif",fontStyle:"normal",letterSpacing:"-0.01em"},label:{fontFamily:"'DM Sans', system-ui, -apple-system, 'Helvetica Neue', Helvetica, Arial, sans-serif",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},helperText:{}}},select:{size:"md",shape:"default",variant:"default",views:{container:{backgroundColor:"color-white",borderColor:"theme-warning",color:"theme-primary",borderRadius:2,borderWidth:"1px",borderStyle:"solid",boxShadow:"0 0 0 1px color-black"},field:{color:"theme-primary",fontFamily:"'DM Sans', system-ui, -apple-system, 'Helvetica Neue', Helvetica, Arial, sans-serif"},label:{fontFamily:"'DM Sans', system-ui, -apple-system, 'Helvetica Neue', Helvetica, Arial, sans-serif",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},helperText:{},text:{letterSpacing:"-0.01em",fontStyle:"normal"}}},checkbox:{size:"md",views:{checkbox:{borderColor:"theme-warning",backgroundColor:"color-white",_checked:{backgroundColor:"theme-primary",borderColor:"theme-primary"},borderRadius:0},label:{fontFamily:"'DM Sans', system-ui, -apple-system, 'Helvetica Neue', Helvetica, Arial, sans-serif",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},infoText:{color:"color-gray-500"},container:{borderRadius:0}}},radio:{size:"md",views:{radio:{borderColor:"theme-warning",backgroundColor:"color-white"},dot:{backgroundColor:"theme-primary"},label:{fontFamily:"'DM Sans', system-ui, -apple-system, 'Helvetica Neue', Helvetica, Arial, sans-serif",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},infoText:{color:"color-gray-500"},container:{borderRadius:"50%"}}},switch:{size:"sm",views:{slider:{backgroundColor:"theme-warning"},circle:{backgroundColor:"color-white"},label:{fontFamily:"'DM Sans', system-ui, -apple-system, 'Helvetica Neue', Helvetica, Arial, sans-serif",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},container:{borderRadius:"9999px"}}},slider:{backgroundColor:"theme-primary",views:{track:{backgroundColor:"theme-warning"},progress:{backgroundColor:"theme-primary"},filledTrack:{backgroundColor:"theme-primary"},thumb:{borderColor:"theme-primary",backgroundColor:"color-white"},label:{color:"theme-primary"},valueLabel:{color:"color-gray-500"}}},tabs:{variant:"pill",views:{headerTabs:{borderColor:"theme-warning"},tab:{color:"color-gray-500",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},activeTab:{color:"theme-primary",borderColor:"theme-primary",backgroundColor:"theme-primary"},title:{fontFamily:"'DM Sans', system-ui, -apple-system, 'Helvetica Neue', Helvetica, Arial, sans-serif"},activeText:{color:"color-white"},content:{color:"theme-primary"},container:{borderRadius:"9999px"}}},accordion:{views:{container:{borderColor:"theme-warning",backgroundColor:"color-white",color:"theme-primary",borderRadius:0},trigger:{color:"theme-primary",fontFamily:"'DM Sans', system-ui, -apple-system, 'Helvetica Neue', Helvetica, Arial, sans-serif"},content:{color:"color-gray-500"}}},table:{views:{table:{backgroundColor:"color-white",color:"theme-primary",borderColor:"theme-warning",borderRadius:4},thead:{backgroundColor:"color-white",color:"theme-primary"},th:{color:"color-gray-500",borderColor:"theme-warning",fontFamily:"ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},tr:{borderColor:"theme-warning"},td:{color:"theme-primary",borderColor:"theme-warning",letterSpacing:"-0.01em",fontStyle:"normal"},caption:{color:"color-gray-500",fontStyle:"italic",letterSpacing:"-0.01em"}}},avatar:{views:{container:{backgroundColor:"color-white",borderColor:"theme-warning",color:"theme-primary",borderRadius:"50%"},fallback:{color:"theme-primary",fontFamily:"'DM Sans', system-ui, -apple-system, 'Helvetica Neue', Helvetica, Arial, sans-serif"}}},alert:{views:{container:{backgroundColor:"color-white",borderColor:"theme-warning",borderRadius:4},title:{color:"theme-primary",fontFamily:"'DM Sans', system-ui, -apple-system, 'Helvetica Neue', Helvetica, Arial, sans-serif",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},description:{color:"color-gray-500",fontFamily:"'DM Sans', system-ui, -apple-system, 'Helvetica Neue', Helvetica, Arial, sans-serif"},icon:{color:"theme-primary"}}},status:{views:{indicator:{backgroundColor:"theme-primary"},label:{color:"theme-primary",fontFamily:"'DM Sans', system-ui, -apple-system, 'Helvetica Neue', Helvetica, Arial, sans-serif"}}},progress:{color:"theme-primary",backgroundColor:"theme-warning",radius:"8px",views:{container:{backgroundColor:"theme-warning",borderRadius:"9999px"},bar:{backgroundColor:"theme-primary"},text:{color:"theme-primary"}}},loader:{color:"theme-primary"},separator:{color:"theme-warning",views:{container:{borderColor:"theme-warning"},label:{color:"color-gray-500",fontFamily:"'DM Sans', system-ui, -apple-system, 'Helvetica Neue', Helvetica, Arial, sans-serif"}}},navigation:{views:{container:{backgroundColor:"color-white",borderColor:"theme-warning",color:"theme-primary",borderRadius:0},item:{color:"color-gray-500"},activeItem:{color:"theme-primary",borderColor:"theme-primary"}}},hero:{views:{container:{backgroundColor:"color-white",color:"theme-primary",fontFamily:"'DM Sans', system-ui, -apple-system, 'Helvetica Neue', Helvetica, Arial, sans-serif"},eyebrow:{color:"color-gray-500"},title:{color:"theme-primary",fontFamily:"'DM Sans', system-ui, -apple-system, 'Helvetica Neue', Helvetica, Arial, sans-serif"},description:{color:"color-gray-500"}}},page:{views:{container:{backgroundColor:"color-white",color:"theme-primary",fontFamily:"'DM Sans', system-ui, -apple-system, 'Helvetica Neue', Helvetica, Arial, sans-serif"},section:{backgroundColor:"color-white",borderColor:"theme-warning"},surface:{backgroundColor:"color-white",borderColor:"theme-warning",color:"theme-primary"}}}},personality:{cornerStyle:"sharp",typeWeight:"bold",typeCase:"normal",typeStyle:"normal",letterSpacing:"-0.01em",accentTreatment:"flat",signatureMotif:"▶",density:"tight",surfaceTone:"mono",cardRadius:4,pillRadius:0,badgeRadius:0,voice:"motion-utility"}},vercel:{metadata:{id:"vercel",label:"Vercel",sourcePath:"design.md/html/vercel.html",sourceTitle:"Design System Preview: Vercel (Light)",defaultAppearance:"light",googleFontLinks:["https://fonts.googleapis.com/css2?family=Geist:wght@400;500;600;700&family=Geist+Mono:wght@400;500;600&display=swap"]},theme:{primary:"color-black",secondary:"#0072f5",success:"#0a72ef",warning:"#de1d8d",error:"#ff5b4f",canvas:"color-white",surface:"color-gray-50",text:"color-black",muted:"color-gray-500",border:"color-gray-200",onPrimary:"color-white"},tokens:{rawCssVars:{black:"#171717",white:"#ffffff","gray-50":"#fafafa","gray-100":"#ebebeb","gray-400":"#808080","gray-500":"#666666","gray-600":"#4d4d4d","link-blue":"#0072f5","focus-blue":"hsl(212,100%,48%)","ship-red":"#ff5b4f","preview-pink":"#de1d8d","develop-blue":"#0a72ef","console-blue":"#0070f3","console-purple":"#7928ca","console-pink":"#eb367f","badge-bg":"#ebf5ff","badge-text":"#0068d6","shadow-ring":"rgba(0,0,0,0.08) 0px 0px 0px 1px","shadow-ring-light":"rgb(235,235,235) 0px 0px 0px 1px","shadow-subtle":"rgba(0,0,0,0.04) 0px 2px 2px 0px","shadow-card":"rgba(0,0,0,0.08) 0px 0px 0px 1px, rgba(0,0,0,0.04) 0px 2px 2px 0px, rgb(250,250,250) 0px 0px 0px 1px","shadow-card-full":"rgba(0,0,0,0.08) 0px 0px 0px 1px, rgba(0,0,0,0.04) 0px 2px 2px 0px, rgba(0,0,0,0.04) 0px 8px 8px -8px, rgb(250,250,250) 0px 0px 0px 1px","font-sans":"'Geist', system-ui, -apple-system, Arial, sans-serif","font-mono":"'Geist Mono', ui-monospace, SFMono-Regular, 'Roboto Mono', Menlo, monospace"},colors:[{name:"black",value:"#171717",role:"black"},{name:"white",value:"#ffffff",role:"white"},{name:"gray-50",value:"#fafafa",role:"gray 50"},{name:"gray-100",value:"#ebebeb",role:"gray 100"},{name:"gray-400",value:"#808080",role:"gray 400"},{name:"gray-500",value:"#666666",role:"gray 500"},{name:"gray-600",value:"#4d4d4d",role:"gray 600"},{name:"link-blue",value:"#0072f5",role:"link blue"},{name:"focus-blue",value:"hsl(212,100%,48%)",role:"focus blue"},{name:"ship-red",value:"#ff5b4f",role:"ship red"},{name:"preview-pink",value:"#de1d8d",role:"preview pink"},{name:"develop-blue",value:"#0a72ef",role:"develop blue"},{name:"console-blue",value:"#0070f3",role:"console blue"},{name:"console-purple",value:"#7928ca",role:"console purple"},{name:"console-pink",value:"#eb367f",role:"console pink"},{name:"badge-bg",value:"#ebf5ff",role:"badge bg"},{name:"badge-text",value:"#0068d6",role:"badge text"},{name:"shadow-ring",value:"rgba(0,0,0,0.08) 0px 0px 0px 1px",role:"shadow ring"},{name:"shadow-ring-light",value:"rgb(235,235,235) 0px 0px 0px 1px",role:"shadow ring light"},{name:"shadow-subtle",value:"rgba(0,0,0,0.04) 0px 2px 2px 0px",role:"shadow subtle"},{name:"shadow-card",value:"rgba(0,0,0,0.08) 0px 0px 0px 1px, rgba(0,0,0,0.04) 0px 2px 2px 0px, rgb(250,250,250) 0px 0px 0px 1px",role:"shadow card"},{name:"shadow-card-full",value:"rgba(0,0,0,0.08) 0px 0px 0px 1px, rgba(0,0,0,0.04) 0px 2px 2px 0px, rgba(0,0,0,0.04) 0px 8px 8px -8px, rgb(250,250,250) 0px 0px 0px 1px",role:"shadow card full"}],typography:{fontFamily:"var(--font-sans)",monoFamily:"'Geist Mono', ui-monospace, SFMono-Regular, 'Roboto Mono', Menlo, monospace",fontSizes:["16px","14px","48px","20px","12px","32px","13px","11px","10px","36px"],fontWeights:["400","600","500","700"],lineHeights:["1.50","1.00","1.80","1.25","1.2","1.35","1.4"]},spacing:["2px","4px","8px","10px","12px","14px","16px","20px","24px","28px","32px","48px","64px","72px","80px","96px"],radii:["6px","8px","9999px","3px"],shadows:["rgba(0,0,0,0.08) 0px 0px 0px 1px","rgb(235,235,235) 0px 0px 0px 1px","rgba(0,0,0,0.04) 0px 2px 2px 0px","rgba(0,0,0,0.08) 0px 0px 0px 1px, rgba(0,0,0,0.04) 0px 2px 2px 0px, rgb(250,250,250) 0px 0px 0px 1px","rgba(0,0,0,0.08) 0px 0px 0px 1px, rgba(0,0,0,0.04) 0px 2px 2px 0px, rgba(0,0,0,0.04) 0px 8px 8px -8px, rgb(250,250,250) 0px 0px 0px 1px","var(--shadow-ring)","var(--shadow-ring-light)","var(--shadow-card)","var(--shadow-card-full)","0 0 0 2px var(--focus-blue)","0 0 0 2px var(--ship-red)"]},components:{button:{variant:"filled",size:"md",shape:"square",color:"theme-primary",textColor:"theme-onPrimary",views:{container:{borderRadius:4,fontFamily:"var(--font-sans)",fontWeight:700,letterSpacing:"-0.04em",textTransform:"none",fontStyle:"normal"},content:{fontFamily:"var(--font-sans)",fontWeight:700,letterSpacing:"-0.04em",textTransform:"none",fontStyle:"normal"}}},badge:{variant:"filled",size:"sm",shape:"rounded",views:{container:{backgroundColor:"theme-secondary",color:"color-white",borderColor:"theme-secondary",borderRadius:4,fontFamily:"var(--font-sans)",letterSpacing:"-0.04em",textTransform:"none",fontWeight:700,fontStyle:"normal"},text:{fontFamily:"var(--font-sans)",fontWeight:600}}},card:{variant:"outlined",size:"md",shape:"rounded",views:{container:{backgroundColor:"color-gray-50",borderColor:"color-gray-200",color:"theme-primary",borderRadius:4,borderWidth:"1px",borderStyle:"solid",boxShadow:"rgba(0,0,0,0.08) 0px 0px 0px 1px"},header:{color:"theme-primary",fontFamily:"var(--font-sans)",fontWeight:600,borderColor:"color-gray-200"},content:{color:"color-gray-500",fontFamily:"var(--font-sans)"},footer:{borderColor:"color-gray-200"}}},input:{size:"md",shape:"default",variant:"default",views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"theme-primary",borderRadius:2,borderWidth:"1px",borderStyle:"solid",boxShadow:"rgba(0,0,0,0.08) 0px 0px 0px 1px"},field:{color:"theme-primary",fontFamily:"var(--font-sans)",fontStyle:"normal",letterSpacing:"-0.04em"},label:{fontFamily:"var(--font-sans)",fontWeight:700,letterSpacing:"-0.04em",textTransform:"none",fontStyle:"normal"},helperText:{}}},textarea:{size:"md",shape:"default",variant:"default",views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"theme-primary",borderRadius:2,borderWidth:"1px",borderStyle:"solid",boxShadow:"rgba(0,0,0,0.08) 0px 0px 0px 1px"},field:{color:"theme-primary",fontFamily:"var(--font-sans)",fontStyle:"normal",letterSpacing:"-0.04em"},label:{fontFamily:"var(--font-sans)",fontWeight:700,letterSpacing:"-0.04em",textTransform:"none",fontStyle:"normal"},helperText:{}}},select:{size:"md",shape:"default",variant:"default",views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"theme-primary",borderRadius:2,borderWidth:"1px",borderStyle:"solid",boxShadow:"rgba(0,0,0,0.08) 0px 0px 0px 1px"},field:{color:"theme-primary",fontFamily:"var(--font-sans)"},label:{fontFamily:"var(--font-sans)",fontWeight:700,letterSpacing:"-0.04em",textTransform:"none",fontStyle:"normal"},helperText:{},text:{letterSpacing:"-0.04em",fontStyle:"normal"}}},checkbox:{size:"md",views:{checkbox:{borderColor:"color-gray-200",backgroundColor:"color-white",_checked:{backgroundColor:"theme-primary",borderColor:"theme-primary"},borderRadius:0},label:{fontFamily:"var(--font-sans)",fontWeight:700,letterSpacing:"-0.04em",textTransform:"none",fontStyle:"normal"},infoText:{color:"color-gray-500"},container:{borderRadius:0}}},radio:{size:"md",views:{radio:{borderColor:"color-gray-200",backgroundColor:"color-white"},dot:{backgroundColor:"theme-primary"},label:{fontFamily:"var(--font-sans)",fontWeight:700,letterSpacing:"-0.04em",textTransform:"none",fontStyle:"normal"},infoText:{color:"color-gray-500"},container:{borderRadius:"50%"}}},switch:{size:"sm",views:{slider:{backgroundColor:"color-gray-200"},circle:{backgroundColor:"color-white"},label:{fontFamily:"var(--font-sans)",fontWeight:700,letterSpacing:"-0.04em",textTransform:"none",fontStyle:"normal"},container:{borderRadius:"9999px"}}},slider:{backgroundColor:"theme-primary",views:{track:{backgroundColor:"color-gray-200"},progress:{backgroundColor:"theme-primary"},filledTrack:{backgroundColor:"theme-primary"},thumb:{borderColor:"theme-primary",backgroundColor:"color-white"},label:{color:"theme-primary"},valueLabel:{color:"color-gray-500"}}},tabs:{variant:"underline",views:{headerTabs:{borderColor:"color-gray-200"},tab:{color:"color-gray-500",fontWeight:700,letterSpacing:"-0.04em",textTransform:"none",fontStyle:"normal"},activeTab:{color:"theme-primary",borderColor:"theme-primary",backgroundColor:"transparent"},title:{fontFamily:"var(--font-sans)"},activeText:{color:"theme-primary"},content:{color:"theme-primary"},container:{borderRadius:"6px"}}},accordion:{views:{container:{borderColor:"color-gray-200",backgroundColor:"color-gray-50",color:"theme-primary",borderRadius:"6px"},trigger:{color:"theme-primary",fontFamily:"var(--font-sans)"},content:{color:"color-gray-500"}}},table:{views:{table:{backgroundColor:"color-white",color:"theme-primary",borderColor:"color-gray-200",borderRadius:4},thead:{backgroundColor:"color-gray-50",color:"theme-primary"},th:{color:"color-gray-500",borderColor:"color-gray-200",fontFamily:"'Geist Mono', ui-monospace, SFMono-Regular, 'Roboto Mono', Menlo, monospace",fontWeight:700,letterSpacing:"-0.04em",textTransform:"none",fontStyle:"normal"},tr:{borderColor:"color-gray-200"},td:{color:"theme-primary",borderColor:"color-gray-200",letterSpacing:"-0.04em",fontStyle:"normal"},caption:{color:"color-gray-500",fontStyle:"italic",letterSpacing:"-0.04em"}}},avatar:{views:{container:{backgroundColor:"color-gray-50",borderColor:"color-gray-200",color:"theme-primary",borderRadius:"50%"},fallback:{color:"theme-primary",fontFamily:"var(--font-sans)"}}},alert:{views:{container:{backgroundColor:"color-gray-50",borderColor:"color-gray-200",borderRadius:4},title:{color:"theme-primary",fontFamily:"var(--font-sans)",fontWeight:700,letterSpacing:"-0.04em",textTransform:"none",fontStyle:"normal"},description:{color:"color-gray-500",fontFamily:"var(--font-sans)"},icon:{color:"theme-primary"}}},status:{views:{indicator:{backgroundColor:"theme-success"},label:{color:"theme-primary",fontFamily:"var(--font-sans)"}}},progress:{color:"theme-primary",backgroundColor:"color-gray-200",radius:"6px",views:{container:{backgroundColor:"color-gray-200",borderRadius:"9999px"},bar:{backgroundColor:"theme-primary"},text:{color:"theme-primary"}}},loader:{color:"theme-primary"},separator:{color:"color-gray-200",views:{container:{borderColor:"color-gray-200"},label:{color:"color-gray-500",fontFamily:"var(--font-sans)"}}},navigation:{views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"theme-primary",borderRadius:"6px"},item:{color:"color-gray-500"},activeItem:{color:"theme-primary",borderColor:"theme-primary"}}},hero:{views:{container:{backgroundColor:"color-white",color:"theme-primary",fontFamily:"var(--font-sans)"},eyebrow:{color:"color-gray-500"},title:{color:"theme-primary",fontFamily:"var(--font-sans)"},description:{color:"color-gray-500"}}},page:{views:{container:{backgroundColor:"color-white",color:"theme-primary",fontFamily:"var(--font-sans)"},section:{backgroundColor:"color-white",borderColor:"color-gray-200"},surface:{backgroundColor:"color-gray-50",borderColor:"color-gray-200",color:"theme-primary"}}}},personality:{cornerStyle:"sharp",typeWeight:"bold",typeCase:"normal",typeStyle:"normal",letterSpacing:"-0.04em",accentTreatment:"flat",signatureMotif:"▲",density:"comfortable",surfaceTone:"mono",cardRadius:4,pillRadius:4,badgeRadius:4,voice:"deploy-geometric"}}},$c=Object.values(st),An=Dc,To=e=>!!e&&typeof e=="object"&&!Array.isArray(e)&&Object.prototype.toString.call(e)==="[object Object]",dt=e=>e,Be=(...e)=>{const o={};return e.forEach(t=>{To(t)&&Object.entries(t).forEach(([n,a])=>{if(a!=null){if(To(a)&&To(o[n])){o[n]=Be(o[n],a);return}o[n]=a}})}),o},En=e=>{if(Array.isArray(e)||!To(e))return e;const o={};for(const[t,n]of Object.entries(e))n!==null&&(o[t]=To(n)?En(n):n);return o},Lc=new Set(["button"]),_c=["backgroundColor","background","borderColor","color"],Dn=new Set,Bc=(e,o)=>{if(process.env.NODE_ENV!=="production"&&!(!o||!Lc.has(e))&&!Dn.has(e))for(const[t,n]of Object.entries(o)){if(!To(n))continue;const a=_c.filter(l=>n[l]!=null);if(a.length>0){Dn.add(e),console.warn(`[design-system] components.${e}.views.${t} sets ${a.join(", ")} — view styles apply above every variant, so this flattens ghost/outline/subtle into solid blocks. Move colors to components.${e}.config.variants.<variant> (merged under each variant); keep views to shape and typography.`);return}}},gt=(e,o)=>{if(!o)return{};const t=o.components[e]||{},n=dt(En(t));return Bc(e,n.views),n},$n=(e,o,t)=>{const{config:n,...a}=o,l=gt(e,t),c=Be(l,n||{});return dt(Be(c,a))},Ln=h.createContext({isEnabled:!1}),ht=({children:e,config:o,configId:t,mode:n})=>{const a=o||(t?st[t]:null)||An,{themeMode:l}=i.useTheme(),c=n??l??a.metadata.defaultAppearance,s=h.useMemo(()=>({config:a,configId:a.metadata.id,isEnabled:!0}),[a]);return r.jsx(Ln.Provider,{value:s,children:r.jsx(i.ThemeProvider,{theme:a.theme,mode:c,transparentWrapper:!0,children:r.jsx("div",{"data-design-system":a.metadata.id,"data-appearance":c,style:{display:"contents"},children:e})})})},br=()=>h.useContext(Ln),Io=e=>{const{config:o}=br();return gt(e,o)},pe=(e,o)=>{const{config:t}=br();return $n(e,o,t)},_n=h.createContext({expandedItems:[],toggleItem:()=>{},isItemExpanded:()=>!1,type:"single",collapsible:!1,baseId:""}),Oc=({children:e,value:o})=>r.jsx(_n.Provider,{value:o,children:e}),Bn=()=>{const e=h.useContext(_n);if(!e)throw new Error("useAccordionContext must be used within an AccordionProvider");return e},Nc=({value:e,children:o,isDisabled:t=!1,views:n,...a})=>{var p;const{isItemExpanded:l,baseId:c}=Bn(),s=Io("accordion"),d=Be({item:(p=s.views)==null?void 0:p.container},n),g=l(e),m=`${c}-trigger-${e}`,f=`${c}-content-${e}`;return r.jsx(i.View,{borderWidth:1,borderStyle:"solid",borderColor:"color-gray-200",overflow:"hidden",opacity:t?.5:1,pointerEvents:t?"none":"auto","data-state":g?"open":"closed","data-disabled":t?"":void 0,...d==null?void 0:d.item,...a,children:h.Children.map(o,u=>h.isValidElement(u)?h.cloneElement(u,{...u.props,value:e,isExpanded:g,isDisabled:t,triggerId:m,contentId:f}):u)})},qc=({children:e,value:o,isExpanded:t,isDisabled:n,triggerId:a,contentId:l,views:c,asChild:s=!1,...d})=>{var y;const{toggleItem:g}=Bn(),m=Io("accordion"),f=Be({container:(y=m.views)==null?void 0:y.trigger},c),u={id:a,"aria-expanded":t,"aria-controls":l,"aria-disabled":n,"data-state":t?"open":"closed","data-disabled":n?"":void 0,onClick:()=>{o&&!n&&g(o)},padding:16,cursor:n?"not-allowed":"pointer",alignItems:"center",justifyContent:"space-between",width:"100%",style:{backgroundColor:"transparent"},...f==null?void 0:f.container,...d};if(s&&h.isValidElement(e)){const k=h.Children.only(e);return h.cloneElement(k,{...u,...k.props})}return r.jsxs(i.Horizontal,{...u,children:[e,r.jsx(i.View,{width:24,height:24,display:"flex",alignItems:"center",justifyContent:"center",transition:"transform 0.2s ease",transform:t?"rotate(180deg)":"rotate(0deg)",...f==null?void 0:f.icon,children:r.jsx("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:r.jsx("path",{d:"M16.59 8.59L12 13.17L7.41 8.59L6 10L12 16L18 10L16.59 8.59Z",fill:"currentColor"})})})]})},Uc=({children:e,isExpanded:o,isDisabled:t,triggerId:n,contentId:a,views:l,...c})=>{var S;const s=Io("accordion"),d=Be({container:(S=s.views)==null?void 0:S.content},l),g=260,m=h.useRef(null),f=h.useRef(null),[p,u]=h.useState(!!o),[y,k]=h.useState(o?"none":"0px"),[x,C]=h.useState(o?1:0);return h.useEffect(()=>()=>{f.current&&clearTimeout(f.current)},[]),h.useEffect(()=>{var v;if(f.current&&(clearTimeout(f.current),f.current=null),o){u(!0),requestAnimationFrame(()=>{var I;const b=((I=m.current)==null?void 0:I.scrollHeight)??0;k(`${b}px`),C(1)});return}const w=((v=m.current)==null?void 0:v.scrollHeight)??0;k(`${w}px`),C(1),requestAnimationFrame(()=>{k("0px"),C(0)}),f.current=setTimeout(()=>{u(!1)},g)},[o,e]),h.useEffect(()=>{var v;if(!o||!p)return;const w=((v=m.current)==null?void 0:v.scrollHeight)??0;k(`${w}px`)},[e,o,p]),p?r.jsx(i.View,{id:a,role:"region","aria-labelledby":n,overflow:"hidden",maxHeight:y,opacity:x,transition:`max-height ${g}ms cubic-bezier(0.22, 1, 0.36, 1), opacity ${g}ms ease`,"data-state":o?"open":"closed","data-disabled":t?"":void 0,style:{backgroundColor:"transparent"},...d==null?void 0:d.container,...c,children:r.jsx(i.View,{ref:m,padding:16,children:e})}):null},Gc=({children:e,shape:o="rounded",variant:t="default",views:n,baseId:a,type:l,collapsible:c,themeMode:s,...d})=>r.jsx(i.Vertical,{width:"100%","data-orientation":"vertical",...Ac[o],...Ec[t],...n==null?void 0:n.container,...d,children:e}),De=e=>{const o=pe("accordion",e),{children:t,type:n="single",value:a,defaultValue:l,onValueChange:c,collapsible:s=!1,shape:d="rounded",variant:g="default",views:m,...f}=o,p=Array.isArray(l)?l:l?[l]:void 0,u=Vc({type:n,value:a,defaultValue:l??p,onValueChange:c,collapsible:s});return r.jsx(Oc,{value:{expandedItems:u.expandedItems,toggleItem:u.toggleItem,isItemExpanded:u.isItemExpanded,type:u.type,collapsible:u.collapsible,baseId:u.baseId},children:r.jsx(Gc,{shape:d,variant:g,views:m,baseId:u.baseId,type:u.type,collapsible:u.collapsible,...f,children:t})})};De.Item=Nc,De.Trigger=qc,De.Content=Uc;const Yc=({isOpen:e,defaultOpen:o=!1,value:t,defaultValue:n,isMulti:a=!1,onOpenChange:l,onClose:c})=>{const s=typeof e=="boolean",d=t!==void 0,g=n??(a?[]:""),[m,f]=h.useState(o),[p,u]=h.useState(g),y=s?!!e:m,k=d?t:p,x=h.useCallback(w=>{s||f(w),l==null||l(w),w||c==null||c()},[s,c,l]),C=h.useCallback(()=>{x(!1)},[x]),S=h.useCallback(w=>{d||u(w)},[d]);return{isSheetOpen:y,selectedValue:k,setSelectedValue:S,closeSheet:C}},ft=({children:e,containerId:o="portal-root"})=>{const[t,n]=h.useState(null);return h.useEffect(()=>{let a=document.getElementById(o),l=!1;return a||(l=!0,a=document.createElement("div"),a.setAttribute("id",o),document.body.appendChild(a)),n(a),()=>{l&&a&&a.parentNode&&a.childNodes.length===0&&a.parentNode.removeChild(a)}},[o]),t?Pc.createPortal(e,t):null},mt=new Map,Kc=(e,o,t)=>(mt.has(e)||mt.set(e,h.lazy(()=>import("lucide-react/dynamicIconImports").then(n=>{const a=n.default[e];return a?a():{default:()=>r.jsx(r.Fragment,{children:o||t})}}))),mt.get(e)),On=h.memo(({widthHeight:e,color:o="currentColor",transform:t,orientation:n="up",children:a,...l})=>r.jsx(i.View,{widthHeight:e,color:o,display:"flex",alignItems:"center",justifyContent:"center",transform:t||(n==="left"?"rotate(-90deg)":n==="right"?"rotate(90deg)":n==="up"?"rotate(0deg)":n==="down"?"rotate(180deg)":"none"),...l,children:a})),xr=h.memo(({name:e="circle",widthHeight:o=24,color:t="currentColor",filled:n=!1,strokeWidth:a=1,size:l,children:c,fallback:s,...d})=>{const{getColor:g}=i.useTheme(),m=l||o,f=h.useMemo(()=>{const y=g(t);return{fill:n?y:"none",stroke:y,strokeWidth:a,strokeLinecap:"round",strokeLinejoin:"round"}},[n,t,a,g]);if(!e)return r.jsx(On,{widthHeight:o,color:t,...d,children:c});const p=e.toLowerCase().replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase(),u=Kc(p,s,c);return r.jsx(On,{widthHeight:m,color:t,...d,children:r.jsx(h.Suspense,{fallback:s||null,children:r.jsx(u,{size:m,...f})})})}),G=(e,o={})=>{const t=n=>r.jsx(xr,{name:e,...o,...n});return t.displayName=`${e}Icon`,t},Xc=G("user",{filled:!1}),Jc=G("circle-help",{filled:!1}),Qc=G("folder",{filled:!1}),he=G("chevron-up",{filled:!1}),Zc=G("grip-vertical",{filled:!1}),go=G("file",{filled:!1}),Rc=G("video",{filled:!1}),es=G("image",{filled:!1}),Fo=G("volume",{filled:!1}),os=G("twitter",{filled:!1}),rs=G("x",{filled:!1}),ts=G("twitch",{filled:!1}),He=G("x",{filled:!1,strokeWidth:2}),ns=G("instagram",{filled:!1}),as=G("youtube",{filled:!1}),ls=G("facebook",{filled:!1}),is=G("linkedin",{filled:!1}),cs=G("at-sign",{filled:!1}),Nn=G("minus",{filled:!1}),Re=G("info",{filled:!1}),qn=G("play",{filled:!1}),ss=G("pause",{filled:!1}),ds=G("heart",{filled:!1}),gs=G("star",{filled:!1}),hs=G("save",{filled:!1}),pt=G("triangle-alert",{filled:!1}),fs=G("battery",{filled:!1}),ms=G("bookmark",{filled:!1}),ps=G("cloud",{filled:!1}),us=G("copy",{filled:!1}),kr=G("trash",{filled:!1}),ys=kr,bs=G("edit",{filled:!1}),ut=G("mic",{filled:!1}),Cr=G("square",{filled:!1}),yt=G("send",{filled:!1}),bt=G("loader",{filled:!1}),Ko=G("paperclip",{filled:!1}),wr=G("search",{filled:!1}),xs=G("home",{filled:!1}),Un=G("settings",{filled:!1}),ks=G("download",{filled:!1}),Gn=G("share",{filled:!1}),Xo=G("check",{filled:!1}),Cs=G("plus",{filled:!1}),xt=G("eye-off",{filled:!1}),kt=G("eye",{filled:!1}),ws=G("lock",{filled:!1}),Ss=G("user",{filled:!1}),Yn=G("external-link",{filled:!1}),Ct=G("check-circle",{filled:!1}),Sr=G("alert-circle",{filled:!1}),vs=G("bell",{filled:!1}),Ts=G("file-text",{filled:!1}),Is=G("bar-chart",{filled:!1}),Fs=G("moon",{filled:!1}),Kn=G("panel-left",{filled:!1}),wt=G("upload",{filled:!1}),zs=Xo,Ms=e=>r.jsx(he,{orientation:"left",...e}),Ws=G("zoom-out",{filled:!1}),Hs=G("type",{filled:!1}),js=G("shapes",{filled:!1}),Ps=G("rotate-cw",{filled:!1}),Vs=G("gift",{filled:!1}),As=G("shield",{filled:!1}),Es=G("log-out",{filled:!1}),Ds=G("power",{filled:!1}),$s=G("link",{filled:!1}),Ls=G("layout",{filled:!1}),_s=G("zap",{filled:!1}),Bs=G("credit-card",{filled:!1}),Os=G("more-horizontal",{filled:!1}),Ns=kr,qs=G("filter",{filled:!1}),Us=G("calendar",{filled:!1}),Gs=G("clock",{filled:!1}),Ys=G("map-pin",{filled:!1}),Ks=G("menu",{filled:!1}),Xs=G("refresh-cw",{filled:!1}),Js=G("printer",{filled:!1}),Qs=G("wand",{filled:!1}),Zs=G("thumbs-down",{filled:!1}),Rs=G("thumbs-up",{filled:!1}),ed=G("camera",{filled:!1}),od=G("bluetooth",{filled:!1}),rd=G("unlock",{filled:!1}),td=G("wifi",{filled:!1}),nd=G("arrow-right",{filled:!1}),ad=G("arrow-up",{filled:!1}),ld=G("loader",{filled:!1}),id=G("sliders-horizontal",{filled:!1}),cd=G("crop",{filled:!1}),sd=G("zoom-in",{filled:!1}),dd=G("grip-horizontal",{filled:!1}),Xn=G("mouse-pointer-2",{filled:!1}),gd={sm:{minHeight:44,paddingVertical:10,paddingHorizontal:16},md:{minHeight:52,paddingVertical:12,paddingHorizontal:18},lg:{minHeight:60,paddingVertical:14,paddingHorizontal:20}},zo={sm:{label:14,description:12},md:{label:16,description:13},lg:{label:18,description:14}},Jn=(e,o)=>e.id??e.value??`action-sheet-item-${o}`,Qn=e=>e.value??e.id,Zn=e=>e.disabled||e.isDisabled||e.divider,hd=(e,o)=>{if(typeof e.selected=="boolean")return e.selected;const t=Qn(e);return t?Array.isArray(o)?o.includes(t):o===t:!1},fd=({isSheetOpen:e,closeSheet:o,selectedValue:t,setSelectedValue:n,isClosePrevented:a=!1,dismissOnBackdropPress:l=!0,title:c,description:s,header:d,children:g,items:m=[],isMulti:f=!1,closeOnSelect:p,onSelect:u,onChange:y,showCancel:k=!1,cancelLabel:x="Cancel",onCancel:C,showHandle:S=!0,size:w="md",maxHeight:v="88vh",views:b,animationType:I,...T})=>{if(!e)return null;const j=()=>{a||o()},E=()=>{l&&j()},D=()=>{C==null||C(),j()},W=A=>{var V;if(Zn(A))return;const H=Qn(A);let z=t;if(H){if(f){const M=Array.isArray(t)?t:t?[t]:[];z=M.includes(H)?M.filter(L=>L!==H):[...M,H]}else z=H;n(z),u==null||u(H,A),y==null||y(z,A)}(V=A.onPress)==null||V.call(A,A),(A.closeOnSelect??p??!f)&&j()};return r.jsx(ft,{children:r.jsx(i.View,{position:"fixed",top:0,right:0,bottom:0,left:0,zIndex:9999,backgroundColor:"color-dark-50-360",display:"flex",justifyContent:"flex-end",onClick:E,...b==null?void 0:b.overlay,children:r.jsxs(i.Vertical,{width:"100%",maxWidth:520,maxHeight:v,marginHorizontal:"auto",backgroundColor:"color-white",borderTopLeftRadius:24,borderTopRightRadius:24,paddingTop:8,paddingBottom:12,overflow:"hidden",boxShadow:"0 -18px 48px rgba(15, 23, 42, 0.18)",onClick:A=>A.stopPropagation(),...b==null?void 0:b.container,...b==null?void 0:b.sheet,...T,children:[S&&r.jsx(i.View,{width:36,height:4,borderRadius:999,backgroundColor:"color-gray-300",alignSelf:"center",marginTop:4,marginBottom:8,...b==null?void 0:b.handle}),(c||s)&&r.jsxs(i.Vertical,{paddingHorizontal:20,paddingTop:6,paddingBottom:12,gap:4,...b==null?void 0:b.header,children:[c&&r.jsx(i.Text,{fontSize:18,lineHeight:24,fontWeight:"600",color:"color-gray-900",...b==null?void 0:b.title,children:c}),s&&r.jsx(i.Text,{fontSize:13,lineHeight:18,color:"color-gray-500",...b==null?void 0:b.description,children:s})]}),d,r.jsxs(i.Vertical,{overflowY:"auto",paddingBottom:4,...b==null?void 0:b.content,children:[m.map((A,H)=>{if(A.divider)return r.jsx(i.View,{height:1,backgroundColor:"color-gray-200",marginVertical:6,...b==null?void 0:b.divider},Jn(A,H));const z=hd(A,t),P=Zn(A),V=P?"color-gray-400":A.destructive?"color-red-600":z?"theme-primary":"color-gray-900";return r.jsxs(i.Horizontal,{alignItems:"center",gap:12,opacity:P?.5:1,cursor:P?"not-allowed":"pointer",onClick:()=>W(A),...gd[w],...b==null?void 0:b.item,children:[A.icon&&r.jsx(i.View,{flexShrink:0,...b==null?void 0:b.itemIcon,children:A.icon}),r.jsxs(i.Vertical,{flex:1,gap:2,children:[typeof A.label=="string"?r.jsx(i.Text,{fontSize:zo[w].label,lineHeight:zo[w].label+6,fontWeight:z?"600":"400",color:V,...b==null?void 0:b.itemLabel,children:A.label}):A.label,A.description&&r.jsx(i.Text,{fontSize:zo[w].description,lineHeight:zo[w].description+5,color:"color-gray-500",...b==null?void 0:b.itemDescription,children:A.description})]}),z&&r.jsx(Xo,{widthHeight:18,color:"theme-primary",...b==null?void 0:b.itemIndicator})]},Jn(A,H))}),g]}),k&&r.jsx(i.View,{marginTop:8,paddingHorizontal:12,paddingTop:8,borderTopWidth:1,borderTopColor:"color-gray-200",children:r.jsx(i.Horizontal,{minHeight:52,alignItems:"center",justifyContent:"center",borderRadius:14,backgroundColor:"color-gray-100",cursor:"pointer",onClick:D,...b==null?void 0:b.cancelButton,children:r.jsx(i.Text,{fontSize:zo[w].label,lineHeight:zo[w].label+6,fontWeight:"600",color:"color-gray-900",...b==null?void 0:b.cancelLabel,children:x})})})]})})})},md=e=>{const o=Yc(e);return r.jsx(fd,{...e,...o})},pd=e=>{const o=e==="dark";return{default:{container:{backgroundColor:"color-gray-50",borderColor:"color-gray-200",boxShadow:o?"0 1px 3px rgba(0, 0, 0, 0.3)":"0 1px 2px rgba(0, 0, 0, 0.05)"},content:{color:"color-gray-700"},icon:{color:"color-gray-500"}},info:{container:{backgroundColor:"color-blue-50",borderColor:"color-blue-200",boxShadow:o?"0 1px 3px rgba(29, 78, 216, 0.25)":"0 1px 2px rgba(59, 130, 246, 0.05)"},content:{color:"color-blue-700"},icon:{color:"color-blue-500"}},success:{container:{backgroundColor:"color-green-50",borderColor:"color-green-200",boxShadow:o?"0 1px 3px rgba(34, 197, 94, 0.2)":"0 1px 2px rgba(34, 197, 94, 0.05)"},content:{color:"color-green-700"},icon:{color:"color-green-500"}},error:{container:{backgroundColor:"color-red-50",borderColor:"color-red-200",boxShadow:o?"0 1px 3px rgba(239, 68, 68, 0.2)":"0 1px 2px rgba(239, 68, 68, 0.05)"},content:{color:"color-red-700"},icon:{color:"color-red-500"}},warning:{container:{backgroundColor:"color-orange-50",borderColor:"color-orange-200",boxShadow:o?"0 1px 3px rgba(249, 115, 22, 0.2)":"0 1px 2px rgba(249, 115, 22, 0.05)"},content:{color:"color-orange-700"},icon:{color:"color-orange-500"}}}},ud={default:"alert",info:"status",success:"status",error:"alert",warning:"alert"},yd=h.memo(({icon:e,title:o="",views:t,description:n="",variant:a="default",themeMode:l,children:c,...s})=>{const{themeMode:d}=i.useTheme(),g=l||d,m=h.useMemo(()=>pd(g),[g]),f=()=>{var y;if(e)return e;const u={size:20,color:((y=t==null?void 0:t.icon)==null?void 0:y.color)??m[a].icon.color};switch(a){case"info":return r.jsx(Re,{...u});case"success":return r.jsx(Ct,{...u});case"error":return r.jsx(Sr,{...u});case"warning":default:return r.jsx(pt,{...u})}};return r.jsxs(i.Horizontal,{role:ud[a],gap:12,padding:"12px 16px",flexWrap:"nowrap",alignItems:"flex-start",borderRadius:"8px",borderWidth:"1px",borderStyle:"solid",borderColor:m[a].container.borderColor,backgroundColor:m[a].container.backgroundColor,boxShadow:m[a].container.boxShadow,transition:"background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease",...t==null?void 0:t.container,...s,children:[r.jsx(i.View,{alignSelf:"flex-start",marginTop:"2px",...t==null?void 0:t.icon,children:f()}),r.jsxs(i.Vertical,{gap:4,children:[o?r.jsx(i.Text,{fontSize:"14px",fontWeight:"600",lineHeight:"20px",color:m[a].content.color,...t==null?void 0:t.title,children:o}):null,r.jsx(i.Text,{fontSize:"12px",fontWeight:"400",lineHeight:"16px",color:m[a].content.color,...t==null?void 0:t.description,children:n||c})]})]})}),St=e=>{const o=pe("alert",e);return r.jsx(yd,{...o})},bd=({ratio:e=16/9,children:o,views:t,...n})=>r.jsx(i.View,{width:"100%",position:"relative",overflow:"hidden",paddingTop:`${1/e*100}%`,borderRadius:8,...n,...t==null?void 0:t.center,children:r.jsx(i.View,{position:"absolute",top:0,right:0,bottom:0,left:0,...t==null?void 0:t.view,children:o})}),Rn=({ratio:e,children:o,...t})=>r.jsx(bd,{ratio:e,...t,children:o});function xd(e,o,t){return Math.min(Math.max(e,o),t)}const kd=({bars:e,isPaused:o,...t})=>{const a=[6,16,23,24,18,9,14,22,24,20,11,12,20,24,21,13,9,19,24,23,16,7,17,23,23,18,8,15,22,24,20,10];return r.jsx(i.Horizontal,{alignItems:"center",minWidth:120,gap:2,height:24,width:"100%",maxWidth:"100%",...t,children:e.map((l,c)=>r.jsx(i.View,{width:3,borderRadius:2,backgroundColor:o?"color-gray-300":l>=0?"theme-primary":"color-gray-300",style:{height:`${l>=0?xd(l*300,6,24):a[c%a.length]}px`}},c))})},vt=({analyserNode:e,isPaused:o,...t})=>{const n=h.useRef(null),a=60,l=32,[c,s]=h.useState([]);return h.useEffect(()=>{if(!e){s(Array(a).fill(-1));return}const d=e.frequencyBinCount,g=new Uint8Array(d),m=()=>{e.getByteTimeDomainData(g);let f=0;for(let u=0;u<d;u++){const y=(g[u]-128)/128;f+=y*y}const p=Math.sqrt(f/d);h.startTransition(()=>{s(u=>{const k=[...u,p].slice(-a);return k.length<a?[...Array(a-k.length).fill(-1),...k]:k})})};return n.current=setInterval(m,l),()=>{n.current&&clearInterval(n.current)}},[e]),r.jsx(kd,{bars:c,isPaused:o,...t})},vr=vo.create(e=>({visible:!1,title:"",subtitle:"",variant:"info",isClosable:!1,views:{},action:()=>{},actionText:"",showIcon:!1,timeout:3e3,show:(o,t="",n="",a,l,c,s,d,g)=>e({visible:!0,variant:o,title:t,subtitle:n,isClosable:a,views:l,action:c,actionText:s,showIcon:d,timeout:g}),hide:()=>e({visible:!1})})),ea=(e,o,t,n)=>{vr.getState().show(e,o,t,n==null?void 0:n.isClosable,n==null?void 0:n.views,n==null?void 0:n.action,n==null?void 0:n.actionText,n==null?void 0:n.showIcon,n==null?void 0:n.timeout)},oa=()=>{vr.getState().hide()},Cd={info:{container:{backgroundColor:"color-white",border:"rgba(191, 219, 254, 0.95)"},icon:{color:"theme-primary",name:"InformationIcon"},content:{color:"color-gray-900"},close:{color:"color-gray-500",name:"CloseIcon"}},success:{container:{backgroundColor:"#F0FDF4",border:"#BBF7D0"},icon:{color:"#16A34A",name:"SuccessIcon"},content:{color:"#14532D"},close:{color:"#15803D",name:"CloseIcon"}},error:{container:{backgroundColor:"#FEF2F2",border:"#FECACA"},icon:{color:"#DC2626",name:"ErrorIcon"},content:{color:"#7F1D1D"},close:{color:"#B91C1C",name:"CloseIcon"}},warning:{container:{backgroundColor:"#FFF7ED",border:"#FED7AA"},icon:{color:"#EA580C",name:"WarningIcon"},content:{color:"#9A3412"},close:{color:"#C2410C",name:"CloseIcon"}}},ra=({variant:e,hide:o,title:t,subtitle:n,theme:a,action:l,actionText:c,showIcon:s=!1,isClosable:d=!1,timeout:g=3e3,views:m})=>{var C,S;h.useEffect(()=>{if(g&&!d){const w=setTimeout(()=>{o()},g);return()=>{clearTimeout(w)}}},[]);const f=a??Cd,p=!!(l&&c),u={borderWidth:1,borderStyle:"solid",borderRadius:12,borderColor:`${f[e].container.border}`,boxShadow:"0 8px 24px rgba(15, 23, 42, 0.06)"},y={info:"#3b82f6",success:"#4ade80",warning:"#f97316",error:"#ef4444"}[e],k={info:r.jsx(Re,{widthHeight:24,color:y,...m==null?void 0:m.icon}),success:r.jsx(Ct,{widthHeight:24,color:y,...m==null?void 0:m.icon}),warning:r.jsx(pt,{widthHeight:24,color:y,...m==null?void 0:m.icon}),error:r.jsx(Sr,{widthHeight:24,color:y,...m==null?void 0:m.icon})}[e],x=s&&k;return r.jsxs(i.Horizontal,{role:"messageContent",gap:12,width:"100%",maxWidth:520,flexWrap:"nowrap",position:"relative",alignItems:"flex-start",padding:"12px 14px",color:`${f[e].content.color}`,backgroundColor:`${f[e].container.backgroundColor}`,onClick:d?()=>{}:()=>{o()},...u,transition:"background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease",...m==null?void 0:m.container,children:[x&&k,r.jsxs(i.Vertical,{gap:4,width:"100%",children:[r.jsx(i.Text,{size:"md",weight:"semiBold",...m==null?void 0:m.title,children:t}),n&&r.jsx(i.Text,{size:"sm",lineHeight:"20px",color:f[e].content.color,...m==null?void 0:m.subtitle,children:n})]}),p&&r.jsx(i.View,{as:"button",type:"button",onClick:l,backgroundColor:"color-white",borderWidth:"1px",borderStyle:"solid",borderColor:f[e].container.border,borderRadius:"9999px",padding:"6px 12px",cursor:"pointer",transition:"background-color 0.2s ease, border-color 0.2s ease",...m==null?void 0:m.actionText,children:r.jsx(i.Text,{whiteSpace:"nowrap",size:"sm",weight:"semiBold",color:f[e].content.color,children:c})}),d&&r.jsx(i.View,{position:"absolute",zIndex:1e4,right:8,top:8,onClick:()=>{o()},cursor:"pointer",padding:"4px",borderRadius:"9999px",transition:"background-color 0.2s ease",...(C=m==null?void 0:m.closingIcon)==null?void 0:C.container,children:r.jsx(He,{widthHeight:16,color:f[e].close.color,...(S=m==null?void 0:m.closingIcon)==null?void 0:S.icon})})]})},wd=({container:e,theme:o,position:t="topRight"})=>{const{visible:n,title:a,variant:l,subtitle:c,isClosable:s,views:d,action:g,actionText:m,showIcon:f,timeout:p}=vr(),u={topLeft:{top:6,left:8},topRight:{top:6,right:8},bottomLeft:{bottom:8,left:6},bottomRight:{bottom:8,right:6}}[t],y=()=>r.jsx(ra,{variant:l,subtitle:c,show:n,title:a,theme:o,isClosable:s,views:d,action:g,actionText:m,showIcon:f,timeout:p,hide:()=>oa()}),k=e?h.cloneElement(e,{},y()):r.jsx(i.View,{position:"absolute",zIndex:1e4,...u,children:y()});return n?k:null},Sd=(e,o)=>{if(typeof document>"u")return;const t=document.createElement("video");t.preload="metadata",t.onloadedmetadata=()=>{t.currentTime=1},t.oncanplay=()=>{const n=document.createElement("canvas");n.width=t.videoWidth,n.height=t.videoHeight;const a=n.getContext("2d");if(a){a.drawImage(t,0,0,n.width,n.height);const l=n.toDataURL("image/jpeg");o(l)}URL.revokeObjectURL(t.src)},t.src=URL.createObjectURL(e)},vd=({maxSize:e=100*1024*1024,onFileSelect:o,onMultipleFileSelect:t,validateFile:n,thumbnail:a,multiple:l=!1,onError:c=s=>{ea("error","Error",s)}})=>{const s=h.useRef(null),d=h.useRef(null),[g,m]=h.useState(null),[f,p]=h.useState([]),[u,y]=h.useState(null),[k,x]=h.useState(null),[C,S]=h.useState(a||null),w=h.useCallback(b=>{const I=b.target.files;if(y(null),!I||I.length===0){c("No file selected"),y("No file selected");return}if(l){const T=Array.from(I),j=[];for(const E of T){if(E.size>e){c(`File ${E.name} exceeds ${Math.round(e/(1024*1024))}MB.`),y(`File ${E.name} exceeds ${Math.round(e/(1024*1024))}MB.`);continue}if(n){const D=n(E);if(D){c(`${E.name}: ${D}`),y(`${E.name}: ${D}`);continue}}j.push(E)}j.length>0&&(p(j),t&&t(j))}else{const T=I[0];if(T.size>e){c(`File exceeds ${Math.round(e/(1024*1024))}MB.`),y(`File exceeds ${Math.round(e/(1024*1024))}MB.`);return}if(n){const j=n(T);if(j){c(j),y(j);return}}x(URL.createObjectURL(T)),T.type.startsWith("video/")&&Sd(T,S),o&&(m(T),o(T))}},[e,o,t,n,l]),v=()=>{const b=s.current;b&&typeof b.click=="function"&&b.click()};return h.useEffect(()=>()=>{typeof URL<"u"&&typeof URL.revokeObjectURL=="function"&&(k&&URL.revokeObjectURL(k),C&&URL.revokeObjectURL(C))},[k,C]),{previewUrl:k,thumbnailUrl:C,errorMessage:u,fileInputRef:s,videoRef:d,selectedFile:g,selectedFiles:f,handleFileChange:w,handleClick:v}},Td=({accept:e,isLoading:o=!1,progress:t=0,icon:n,text:a,previewUrl:l,thumbnailUrl:c,errorMessage:s,fileInputRef:d,videoRef:g,selectedFile:m,selectedFiles:f,handleFileChange:p,handleClick:u,multiple:y=!1,containerProps:k,errorMessageProps:x,progressProps:C,videoProps:S,imageProps:w,iconProps:v,textProps:b,fileType:I,previewUrl:T,renderError:j=({errorMessage:P,errorMessageProps:V,themeMode:M})=>r.jsx(i.Text,{color:"red",fontSize:12,marginTop:8,...V,...z==null?void 0:z.text,children:P}),renderText:E=({text:P,textProps:V})=>r.jsx(i.Text,{marginTop:8,...V,...z==null?void 0:z.text,children:P}),renderFile:D=({selectedFile:P,textProps:V})=>P?r.jsxs(i.Center,{marginTop:8,gap:10,flexDirection:"column",...z==null?void 0:z.container,children:[r.jsx(i.Text,{maxLines:2,...V,...z==null?void 0:z.text,children:P.name}),r.jsxs(i.Text,{...V,...z==null?void 0:z.text,children:["(",Math.round(P.size/1024)," KB)"]})]}):null,renderVideo:W=({selectedFile:P,videoRef:V,videoProps:M})=>r.jsx(i.View,{width:"100%",height:"100%",position:"relative",...z==null?void 0:z.view,children:r.jsx(i.View,{as:"video",width:"100%",height:"100%",src:P?URL.createObjectURL(P):void 0,style:{objectFit:"cover"},ref:V,...M,...z==null?void 0:z.view})}),renderImage:A=({previewUrl:P,imageProps:V})=>(console.log("Rendering image with URL:",P),r.jsx(i.View,{width:"100%",height:"100%",position:"relative",...z==null?void 0:z.view,children:r.jsx(i.Image,{src:P,alt:"Preview",width:"100%",height:"100%",objectFit:"cover",style:{maxHeight:"100%",maxWidth:"100%"},...V,...z==null?void 0:z.image})})),renderProgress:H=({progress:P,progressProps:V})=>r.jsxs(i.Horizontal,{gap:8,alignItems:"center",...V,...z==null?void 0:z.horizontal,children:[r.jsx(i.View,{height:4,backgroundColor:"color-black-100",width:"100%",borderRadius:2,...z==null?void 0:z.view,children:r.jsx(i.View,{height:4,width:`${P}%`,borderRadius:2,backgroundColor:"color-dark-50",...z==null?void 0:z.view})}),r.jsxs(i.Text,{fontSize:12,...z==null?void 0:z.text,children:[P,"%"]})]}),views:z={}})=>{const P=T||l;return r.jsxs(i.Center,{onClick:u,cursor:"pointer",border:"1px solid color-black-100",borderRadius:8,padding:16,flexDirection:"column",overflow:"hidden",position:"relative",height:m&&t===100?"200px":"auto",...k,...z==null?void 0:z.container,children:[t===100&&I==="image"&&P&&A({previewUrl:P,imageProps:w}),t===100&&I==="video"&&c&&W({selectedFile:m,thumbnailUrl:c,videoRef:g,videoProps:S,imageProps:w}),t===100&&I==="file"&&m&&D({selectedFile:m,textProps:b}),t<100&&(n||r.jsx(wt,{widthHeight:32,...v})),!o&&!m&&a&&E({text:a,textProps:b}),o&&H({progress:t,progressProps:C}),!o&&s&&j({errorMessage:s,errorMessageProps:x}),r.jsx(i.Input,{type:"file",ref:d,onChange:p,accept:e,multiple:y,style:{display:"none"},...z==null?void 0:z.view})]})},Tr=({accept:e="*/*",icon:o,text:t,maxSize:n,onFileSelect:a,onMultipleFileSelect:l,validateFile:c,isLoading:s=!1,progress:d=0,fileType:g,multiple:m=!1,...f})=>{const{previewUrl:p,thumbnailUrl:u,errorMessage:y,videoRef:k,fileInputRef:x,selectedFile:C,selectedFiles:S,handleFileChange:w,handleClick:v}=vd({maxSize:n,onFileSelect:a,onMultipleFileSelect:l,validateFile:c,multiple:m}),I=(()=>{if(g)return g;if(C)return C.type.startsWith("image/")?"image":C.type.startsWith("video/")?"video":"file"})();return r.jsx(Td,{handleClick:v,accept:e,isLoading:s,progress:d,icon:o,text:t,maxSize:n,onFileSelect:a,validateFile:c,errorMessage:y,handleFileChange:w,selectedFile:C,selectedFiles:S,videoRef:k,fileInputRef:x,previewUrl:p,thumbnailUrl:u,fileType:I,multiple:m,...f})};function Id(e){const o=Math.floor(e/60),t=e%60;return`${o}:${t.toString().padStart(2,"0")}`}function Fd({onAudio:e,recording:o,paused:t,audioBlob:n,analyserNode:a,duration:l,error:c,startRecording:s,stopRecording:d,pauseRecording:g,resumeRecording:m,resetRecording:f,handleFileChange:p,...u}){const[y,k]=h.useState(null);h.useEffect(()=>{if(n){const S=URL.createObjectURL(n);return k({url:S,label:`recording-${Date.now()}.webm`}),()=>{URL.revokeObjectURL(S)}}return()=>{}},[n]);const x=()=>{y!=null&&y.url&&URL.revokeObjectURL(y.url),k(null),f()},C=S=>{e(S),y!=null&&y.url&&URL.revokeObjectURL(y.url),k({url:URL.createObjectURL(S),label:S.name})};return r.jsxs(i.Vertical,{gap:"10px",width:"100%",...u,children:[r.jsxs(i.Horizontal,{gap:12,alignItems:"center",padding:"12px 14px",border:"1px solid color-gray-200",borderRadius:"12px",backgroundColor:"color-white",children:[r.jsx(Tr,{accept:"audio/*",icon:r.jsx(Ko,{widthHeight:16}),maxSize:100*1024*1024,onFileSelect:C,fileType:"file",multiple:!1,renderError:({errorMessage:S})=>null,views:{container:{width:"36px",height:"36px",cursor:"pointer",border:"1px solid color-gray-200",borderRadius:"10px",backgroundColor:"color-white",transition:"background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease",_hover:{backgroundColor:"color-gray-50",borderColor:"color-gray-300"}}},containerProps:{display:"flex",alignItems:"center",justifyContent:"center",borderRadius:"10px",width:"36px",height:"36px"},validateFile:S=>S.size>100*1024*1024?"File size exceeds 100MB limit":S.type.startsWith("audio/")?null:"Only audio files are allowed"}),r.jsx(i.View,{as:"button",type:"button",onClick:o?d:s,width:"36px",height:"36px",minWidth:"36px",display:"flex",alignItems:"center",justifyContent:"center",backgroundColor:"theme-primary",color:"color-white",borderRadius:"999px",border:"0",cursor:"pointer",transition:"background-color 0.2s ease, opacity 0.2s ease",_hover:{opacity:.92},children:o?r.jsx(Cr,{widthHeight:14,color:"color-white",filled:!1}):r.jsx(ut,{widthHeight:18,color:"color-white",filled:!1})}),r.jsx(i.View,{flex:1,minWidth:120,children:r.jsx(vt,{analyserNode:o?a:null,isPaused:!o||t})}),r.jsx(i.Text,{fontSize:"12px",lineHeight:"16px",color:"color-gray-500",whiteSpace:"nowrap",children:Id(l)})]}),y&&!o&&r.jsxs(i.Vertical,{gap:"8px",padding:"12px 14px",border:"1px solid color-gray-200",borderRadius:"12px",backgroundColor:"color-white",children:[r.jsxs(i.Horizontal,{alignItems:"center",justifyContent:"space-between",gap:8,children:[r.jsx(i.Text,{fontSize:"12px",lineHeight:"16px",color:"color-gray-500",children:y.label}),r.jsx(i.View,{as:"button",type:"button",onClick:x,width:"24px",height:"24px",display:"flex",alignItems:"center",justifyContent:"center",border:"0",backgroundColor:"transparent",color:"color-gray-500",cursor:"pointer",children:r.jsx(He,{widthHeight:14,color:"currentColor"})})]}),r.jsx(i.View,{as:"audio",controls:!0,src:y.url,width:"100%"})]}),c&&r.jsx(i.Text,{fontSize:"11px",lineHeight:"16px",color:"color-red-500",children:c})]})}function ta(){const[e,o]=h.useState(!1),[t,n]=h.useState(!1),[a,l]=h.useState(0),[c,s]=h.useState(null),[d,g]=h.useState(null),[m,f]=h.useState(null),p=h.useRef(null),u=h.useRef(null),y=h.useRef(null),k=h.useRef(null),x=h.useRef([]),C=h.useRef(null),S=typeof MediaRecorder<"u"&&MediaRecorder.isTypeSupported("audio/webm;codecs=opus")?"audio/webm;codecs=opus":"audio/webm",w=h.useCallback(()=>{p.current&&(p.current.state!=="inactive"&&p.current.stop(),p.current=null),k.current&&(k.current.getTracks().forEach(E=>E.stop()),k.current=null),u.current&&(u.current.close(),u.current=null),y.current&&(y.current.disconnect(),y.current=null),g(null),C.current&&(clearInterval(C.current),C.current=null)},[]),v=h.useCallback(async()=>{w(),s(null),l(0),x.current=[];try{const E=await navigator.mediaDevices.getUserMedia({audio:!0});k.current=E;const D=MediaRecorder.isTypeSupported(S)?S:void 0,W=new MediaRecorder(E,D?{mimeType:D}:void 0);p.current=W;const A=new(window.AudioContext||window.webkitAudioContext);u.current=A;const H=A.createMediaStreamSource(E),z=A.createAnalyser();z.fftSize=256,z.smoothingTimeConstant=.8,H.connect(z),y.current=z,g(z),W.ondataavailable=P=>{P.data.size>0&&x.current.push(P.data)},W.onstop=()=>{const P=new Blob(x.current,{type:W.mimeType||S});f(P),w()},W.start(),o(!0),n(!1),C.current=setInterval(()=>{l(P=>P+1)},1e3)}catch{s("Microphone access denied or unavailable."),w()}},[w]),b=h.useCallback(()=>{p.current&&p.current.state!=="inactive"&&p.current.stop(),o(!1),n(!1),C.current&&(clearInterval(C.current),C.current=null)},[]),I=h.useCallback(()=>{p.current&&p.current.state==="recording"&&(p.current.pause(),n(!0),C.current&&(clearInterval(C.current),C.current=null))},[]),T=h.useCallback(()=>{p.current&&p.current.state==="paused"&&(p.current.resume(),n(!1),C.current||(C.current=setInterval(()=>{l(E=>E+1)},1e3)))},[]),j=h.useCallback(()=>{w(),o(!1),n(!1),f(null),l(0),s(null),x.current=[]},[w]);return h.useEffect(()=>()=>w(),[w]),{recording:e,paused:t,audioBlob:m,analyserNode:d,duration:a,error:c,startRecording:v,stopRecording:b,pauseRecording:I,resumeRecording:T,resetRecording:j}}function zd(e){const{onAudio:o}=e,{recording:t,paused:n,audioBlob:a,analyserNode:l,duration:c,error:s,startRecording:d,stopRecording:g,pauseRecording:m,resumeRecording:f,resetRecording:p}=ta();return h.useEffect(()=>{if(a&&o){const y=new File([a],"recording.webm",{type:a.type||"audio/webm;codecs=opus"});o(y)}},[a,o]),{recording:t,paused:n,audioBlob:a,analyserNode:l,duration:c,error:s,startRecording:d,stopRecording:g,pauseRecording:m,resumeRecording:f,resetRecording:p,handleFileChange:y=>{var x;const k=(x=y.target.files)==null?void 0:x[0];k&&o&&o(k)}}}function Md(e){const o=zd(e);return r.jsx(Fd,{...e,...o})}const Wd=()=>{const[e,o]=h.useState(!1);return{imageError:e,setImageError:o}},Hd={xs:24,sm:32,md:44,lg:56,xl:72},Tt={container:{borderRadius:"50%",overflow:"hidden",borderWidth:"1px",borderStyle:"solid",borderColor:"color-gray-200",backgroundColor:"theme-primary",transition:"background-color 0.2s ease, border-color 0.2s ease, opacity 0.2s ease"},fallback:{fontWeight:"600",color:"color-white",letterSpacing:"-0.02em"},image:{objectFit:"cover",transition:"opacity 0.2s ease"}},jd=({src:e,size:o="md",fallback:t="IM",views:n,imageError:a,setImageError:l,onClick:c=()=>{},children:s})=>{const d=Hd[o],g={...Tt.image,...(n==null?void 0:n.image)||{}};return r.jsxs(i.Center,{"data-role":"avatar",width:d,height:d,...Tt.container,borderColor:a?"color-gray-400":"transparent",onClick:c,...n==null?void 0:n.container,children:[!a&&e?r.jsx(i.Image,{alt:"",src:e,style:g,width:d,height:d,onError:()=>l(!0)}):r.jsx(i.Text,{size:o,...Tt.fallback,...n==null?void 0:n.fallback,children:t}),s]})},na=e=>{const o=pe("avatar",e),{src:t,size:n,views:a,fallback:l,onClick:c,children:s}=o,{imageError:d,setImageError:g}=Wd();return r.jsx(jd,{src:t,size:n,views:a,fallback:l,imageError:d,setImageError:g,onClick:c,children:s})},Pd={xs:{minWidth:"16px",height:"16px",padding:"0 4px",fontSize:"9px",fontWeight:"600",lineHeight:"12px",letterSpacing:"-0.01em"},sm:{minWidth:"20px",height:"20px",padding:"0 6px",fontSize:"10px",fontWeight:"600",lineHeight:"14px",letterSpacing:"-0.01em"},md:{minWidth:"24px",height:"24px",padding:"0 8px",fontSize:"12px",fontWeight:"600",lineHeight:"16px",letterSpacing:"-0.01em"},lg:{minWidth:"28px",height:"28px",padding:"0 10px",fontSize:"14px",fontWeight:"600",lineHeight:"20px",letterSpacing:"-0.01em"},xl:{minWidth:"32px",height:"32px",padding:"0 12px",fontSize:"16px",fontWeight:"600",lineHeight:"24px",letterSpacing:"-0.01em"}},Vd={xs:{gap:"6px",padding:"3px 8px 3px 3px"},sm:{gap:"8px",padding:"4px 10px 4px 4px"},md:{gap:"12px",padding:"6px 16px 6px 6px"},lg:{gap:"12px",padding:"7px 18px 7px 7px"},xl:{gap:"14px",padding:"8px 20px 8px 8px"}},Ad={xs:{padding:"2px 6px",fontSize:"9px",lineHeight:"12px"},sm:{padding:"3px 8px",fontSize:"10px",lineHeight:"14px"},md:{padding:"6px 12px",fontSize:"11px",lineHeight:"14px"},lg:{padding:"7px 14px",fontSize:"12px",lineHeight:"16px"},xl:{padding:"8px 16px",fontSize:"13px",lineHeight:"18px"}},aa={xs:{fontSize:"11px",lineHeight:"14px"},sm:{fontSize:"12px",lineHeight:"16px"},md:{fontSize:"13px",lineHeight:"18px"},lg:{fontSize:"14px",lineHeight:"20px"},xl:{fontSize:"15px",lineHeight:"22px"}},Ed={square:0,rounded:"8px",pill:"9999px"},Dd={"top-right":{top:"4px",right:"4px",position:"absolute"},"top-left":{top:"4px",left:"4px",position:"absolute"},"bottom-right":{bottom:"4px",right:"4px",position:"absolute"},"bottom-left":{bottom:"4px",left:"4px",position:"absolute"}},$d=e=>({display:"inline-flex",height:"auto",minWidth:"auto",backgroundColor:"color-white-600",color:"color-gray-900",borderWidth:"1px",borderStyle:"solid",borderColor:"color-white",backdropFilter:"blur(12px)",boxShadow:"0 1px 2px rgba(15, 23, 42, 0.08)",transition:"background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease",_hover:{backgroundColor:"color-white-800",boxShadow:"0 2px 8px rgba(15, 23, 42, 0.1)"}}),Ld=e=>({filled:{backgroundColor:"theme-primary",color:"color-white",borderWidth:"1px",borderStyle:"solid",borderColor:"theme-primary",transition:"background-color 0.2s ease, opacity 0.2s ease",_hover:{opacity:.9},_active:{opacity:.95}},outline:{borderWidth:"1px",borderStyle:"solid",borderColor:"theme-primary",color:"theme-primary",style:{backgroundColor:"transparent"},transition:"border-color 0.2s ease, opacity 0.2s ease",_hover:{opacity:.9},_active:{opacity:.95}},link:{borderWidth:0,borderStyle:"none",borderColor:"theme-primary",color:"theme-primary",textDecoration:"underline",style:{backgroundColor:"transparent",textUnderlineOffset:"2px",textDecorationThickness:"1px"},transition:"opacity 0.2s ease",_hover:{opacity:.8}},ghost:{color:"color-gray-500",borderWidth:0,borderStyle:"solid",borderColor:"color-gray-500",style:{backgroundColor:"transparent"},transition:"background-color 0.2s ease, color 0.2s ease",_hover:{backgroundColor:"color-gray-100"}}}),la=e=>({default:{indicator:{backgroundColor:"color-gray-400"},label:{color:"inherit"}},info:{indicator:{backgroundColor:"color-blue-500"},label:{color:"inherit"}},success:{indicator:{backgroundColor:"color-green-500"},label:{color:"inherit"}},warning:{indicator:{backgroundColor:"color-orange-500"},label:{color:"inherit"}},error:{indicator:{backgroundColor:"color-red-500"},label:{color:"inherit"}}}),_d=h.memo(({content:e,children:o,icon:t,pastil:n,pastilContent:a,action:l,position:c,shape:s="pill",variant:d="filled",size:g="md",isAuto:m=!1,views:f,themeMode:p,backgroundColor:u,color:y,borderColor:k,...x})=>{const{themeMode:C}=i.useTheme(),S=p||C,w=h.useMemo(()=>Ld()[d],[S,d]),v=h.useMemo(()=>$d(),[S]),b=h.useMemo(()=>la(),[S]),I=a!=null,T=l!=null,j=I||T,E=o??e,D=E!=null,W=m&&typeof E=="string"&&/^(color|theme|light|dark)-/.test(E)?E:void 0,A=h.useMemo(()=>{const z={width:"fit-content",display:"flex",flexDirection:"row",alignItems:"center",justifyContent:"center",gap:"6px",borderRadius:Ed[s],...Pd[g],...w,...j?Vd[g]:{},...j?v:{},...c?Dd[c]:{},...f==null?void 0:f.container};return d!=="filled"&&!j&&(w.color!==void 0&&(z.color=w.color),w.borderColor!==void 0&&(z.borderColor=w.borderColor),w.backgroundColor!==void 0&&(z.backgroundColor=w.backgroundColor),w&&w.style&&(z.style={...z.style||{},...w.style})),T||x.onClick!==void 0||(delete z._hover,delete z._active),u!==void 0&&(z.backgroundColor=u,k===void 0&&(z.borderColor=u)),k!==void 0&&(z.borderColor=k),y!==void 0&&(z.color=y),W&&(z.backgroundColor=W,z.borderColor=W,z.color="color-white"),z},[T,x.onClick,u,y,k,s,g,d,w,j,v,c,W,f==null?void 0:f.container]);let H="currentColor";return typeof n=="string"?n in b?H=b[n].indicator.backgroundColor:H=n:n===!0&&(H="color-green-500",d==="filled"&&(H="color-white")),r.jsxs(i.Center,{"data-role":"badge",...A,...x,children:[t&&r.jsx(i.View,{"data-role":"badge-icon",...f==null?void 0:f.icon,children:t}),I&&r.jsx(i.Text,{"data-role":"badge-pastil-content",backgroundColor:"color-gray-900",borderRadius:"9999px",color:"color-white",fontWeight:"700",letterSpacing:0,textTransform:"uppercase",whiteSpace:"nowrap",...Ad[g],...f==null?void 0:f.pastilContent,children:a}),n&&r.jsx(i.View,{"data-role":"badge-pastil",width:"6px",height:"6px",borderRadius:"50%",backgroundColor:H,...f==null?void 0:f.pastil}),D&&r.jsx(i.Text,{"data-role":"badge-text",color:j?"color-gray-900":A.color,fontWeight:j?"700":"600",textAlign:"center",letterSpacing:j?0:"0.02em",whiteSpace:"nowrap",...j?aa[g]:{},...f==null?void 0:f.text,children:E}),T&&r.jsx(i.Text,{"data-role":"badge-action",color:"color-gray-400",fontWeight:"500",letterSpacing:0,whiteSpace:"nowrap",...aa[g],...f==null?void 0:f.action,children:l})]})}),Fe=e=>{const o=pe("badge",e);return r.jsx(_d,{...o})},Bd={xs:12,sm:14,md:16,lg:18,xl:20},Od=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,It=h.forwardRef(({children:e,href:o,iconSize:t="sm",underline:n="default",isExternal:a=!1,views:l={},to:c,isHovered:s,setIsHovered:d,_hover:g,...m},f)=>r.jsxs(i.Element,{as:"a",ref:f,href:o,display:"inline-flex",gap:3,alignItems:"center",flexWrap:"nowrap",color:"inherit",textDecoration:n==="underline"?"underline":"none",_hover:n==="hover"?{textDecoration:"underline",...g}:g,...a?{target:"_blank",rel:"noopener noreferrer"}:{},...l.text,...m,children:[e,a&&r.jsx(Yn,{widthHeight:Bd[t]})]}));It.displayName="LinkAnchor";const ia=h.forwardRef(({to:e="/",onClick:o,...t},n)=>{const a=it.useHref(e),l=it.useNavigate(),c=s=>{o==null||o(s),!(s.defaultPrevented||s.button!==0||t.target&&t.target!=="_self"||s.metaKey||s.altKey||s.ctrlKey||s.shiftKey)&&(s.preventDefault(),l(e))};return r.jsx(It,{...t,to:e,href:a,onClick:c,ref:n})});ia.displayName="RouterLinkAnchor";const ca=h.forwardRef((e,o)=>{const t=it.useInRouterContext(),{href:n,to:a="/",isExternal:l}=e;return t&&!l&&n==null&&!Od.test(a)?r.jsx(ia,{...e,ref:o}):r.jsx(It,{...e,href:n??a,ref:o})});ca.displayName="LinkView";const sa=h.forwardRef((e,o)=>r.jsx(ca,{ref:o,...e}));sa.displayName="Link";const Ft=sa,zt={xs:14,sm:18,md:22,lg:26,xl:30},Mt={fast:50,normal:100,slow:300},Nd=e=>typeof e=="string"&&(/^(#|rgb\(|rgba\(|hsl\(|hsla\(|var\()/.test(e)||["black","currentColor","inherit","transparent","white"].includes(e)),qd=({size:e="md",speed:o="normal",color:t="theme-loading",themeMode:n,...a})=>{const{getColor:l,themeMode:c}=i.useTheme(),s=l(t,{themeMode:n||c}),d=typeof e=="number"?e:zt[e],[g,m]=h.useState(0);return h.useEffect(()=>{const f=setInterval(()=>{m(p=>p+45)},Mt[o]);return()=>clearInterval(f)},[o]),r.jsxs(i.View,{as:"svg",xmlns:"http://www.w3.org/2000/svg",width:`${d}px`,height:`${d}px`,viewBox:"0 0 24 24",fill:"none",stroke:s,strokeWidth:"1",strokeLinecap:"round",strokeLinejoin:"round",style:{transform:`rotate(${g}deg)`},...a,children:[r.jsx("g",{id:"SVGRepo_bgCarrier",strokeWidth:"0"}),r.jsx("g",{id:"SVGRepo_tracerCarrier",strokeLinecap:"round",strokeLinejoin:"round"}),r.jsx("g",{id:"SVGRepo_iconCarrier",children:r.jsx("path",{d:"M21 12a9 9 0 11-6.219-8.56"})})]})},Ud=({size:e="md",speed:o="normal",color:t="theme-loading",themeMode:n,...a})=>{const{getColor:l,themeMode:c}=i.useTheme(),s=l(t,{themeMode:n||c}),d=typeof e=="number"?e:zt[e],[g,m]=h.useState(0);return h.useEffect(()=>{const f=setInterval(()=>{m(p=>p+45)},Mt[o]);return()=>clearInterval(f)},[o]),r.jsxs(i.View,{as:"svg",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 50 50",width:`${d}px`,height:`${d}px`,style:{transform:`rotate(${g}deg)`},...a,children:[r.jsx("circle",{cx:"10",cy:"25",r:"4",fill:s}),r.jsx("circle",{cx:"25",cy:"25",r:"4",fill:s}),r.jsx("circle",{cx:"40",cy:"25",r:"4",fill:s})]})},Gd=({size:e="md",speed:o="normal",color:t="theme-loading",themeMode:n,...a})=>{const{getColor:l,themeMode:c}=i.useTheme(),s=l(t,{themeMode:n||c}),d=typeof e=="number"?e:zt[e],[g,m]=h.useState(0);return h.useEffect(()=>{const f=setInterval(()=>{m(p=>p+45)},Mt[o]);return()=>clearInterval(f)},[o]),r.jsx(i.View,{as:"svg",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 50 50",width:`${d}px`,height:`${d}px`,style:{transform:`rotate(${g}deg)`},...a,children:r.jsx("circle",{cx:"25",cy:"25",r:"20",fill:"none",stroke:s,strokeWidth:"5",strokeDasharray:"1,10"})})},Yd=({size:e,children:o,textColor:t,loaderColor:n,type:a="default",speed:l="normal",textPosition:c="right",views:s,...d})=>{const{getColor:g}=i.useTheme(),m=u=>Nd(u)?u:g(u||"theme-loading");n=m(n||d.color||"theme-loading"),t=m(t||d.color||"theme-loading");const f={size:e,speed:l,color:n},p={default:r.jsx(qd,{...f}),dotted:r.jsx(Ud,{...f}),quarter:r.jsx(Gd,{...f})};return r.jsxs(i.Center,{gap:10,flexDirection:c==="top"||c==="bottom"?"column":"row",...d,...s==null?void 0:s.container,children:[(c==="left"||c==="top")&&o&&r.jsx(i.View,{color:t,...s==null?void 0:s.text,children:o}),p[a],(c==="right"||c==="bottom")&&o&&r.jsx(i.View,{color:t,...s==null?void 0:s.text,children:o})]})},eo=e=>{const o=pe("loader",e);return r.jsx(Yd,{...o})},Kd=/^(color|theme|light|dark)-/,Xd=e=>Kd.test(e),Jd=e=>{const o=e.split("-"),t=parseInt(o[o.length-1],10),n=e.startsWith("theme-")?3:4;return o.length>=n&&!isNaN(t)&&t>=0&&t<=1e3?o.slice(0,-1).join("-"):e},Ir=(e,o)=>Xd(e)?`${Jd(e)}-${o}`:`color-mix(in srgb, ${e} ${Math.round(o/10)}%, transparent)`,da={xs:{minHeight:24,paddingHorizontal:12,paddingVertical:5,fontSize:10,fontWeight:500,lineHeight:12,letterSpacing:"-0.01em"},sm:{minHeight:32,paddingHorizontal:16,paddingVertical:7,fontSize:12,fontWeight:500,lineHeight:16,letterSpacing:"-0.01em"},md:{minHeight:40,paddingHorizontal:20,paddingVertical:9,fontSize:14,fontWeight:500,lineHeight:20,letterSpacing:"-0.01em"},lg:{minHeight:48,paddingHorizontal:24,paddingVertical:11,fontSize:16,fontWeight:500,lineHeight:24,letterSpacing:"-0.01em"},xl:{minHeight:56,paddingHorizontal:28,paddingVertical:13,fontSize:20,fontWeight:500,lineHeight:28,letterSpacing:"-0.01em"}},Jo={square:0,rounded:8,pill:999},Qd={xs:{width:16,height:16,padding:6},sm:{width:20,height:20,padding:6},md:{width:24,height:24,padding:8},lg:{width:24,height:24,padding:12},xl:{width:28,height:28,padding:14}},Oe=e=>/^(color|theme|light|dark)-/.test(e)?`var(--${e})`:e,Zd=(e,o,t=!1,n)=>{const a=t?o:e,l=t?e:o,c=t?o:e,d=(e==="theme-primary"||n&&e===n.primary)&&(n!=null&&n.onPrimary)?n.onPrimary:l,g=`0 0 0 2px ${Oe("color-white")}, 0 0 0 4px ${Oe(c)}`;return{filled:{backgroundColor:a,color:d,borderWidth:1,borderStyle:"solid",borderColor:a,_hover:{opacity:.92},_active:{opacity:.96},_focusVisible:{outline:"none",boxShadow:g},transition:"background-color 0.2s ease, border-color 0.2s ease, opacity 0.2s ease"},empty:{color:c,borderWidth:1,borderStyle:"solid",borderColor:c,backgroundColor:"transparent",_hover:{opacity:.9},_active:{opacity:.95},_focusVisible:{outline:"none",boxShadow:g},transition:"background-color 0.2s ease, opacity 0.2s ease"},outline:{color:c,borderWidth:1,borderStyle:"solid",borderColor:c,backgroundColor:"transparent",_hover:{opacity:.9},_active:{opacity:.95},_focusVisible:{outline:"none",boxShadow:g},transition:"background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease"},ghost:{color:c,borderWidth:0,borderStyle:"solid",borderColor:c,backgroundColor:"transparent",_hover:{opacity:.86},_active:{opacity:.94},_focusVisible:{outline:"none",boxShadow:g},transition:"background-color 0.2s ease, color 0.2s ease"},link:{color:c,borderWidth:0,borderStyle:"none",borderColor:c,minHeight:"auto",paddingHorizontal:"4px",paddingVertical:"10px",textDecoration:"underline",backgroundColor:"transparent",style:{textUnderlineOffset:"2px",textDecorationThickness:"1px",textDecorationColor:Oe(c)},_hover:{opacity:.8},_active:{opacity:.9},_focusVisible:{outline:"none",boxShadow:g},transition:"opacity 0.2s ease"},subtle:{backgroundColor:Ir(c,t?200:100),color:c,borderWidth:1,borderStyle:"solid",borderColor:Ir(c,t?400:250),_hover:{backgroundColor:Ir(c,t?300:180)},_active:{backgroundColor:Ir(c,t?380:240)},_focusVisible:{outline:"none",boxShadow:g},transition:"background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease"}}},Rd=h.memo(({children:e,icon:o,leftIcon:t,rightIcon:n,isLoading:a,iconPosition:l="left",loaderPosition:c="left",size:s="md",resolvedTextColor:d,isIconRounded:g,loaderProps:m,views:f})=>{const p=["left","right"].includes(l)?i.Horizontal:i.Vertical,u=da[s];return r.jsxs(p,{gap:8,alignItems:"center",justifyContent:"center",fontSize:u.fontSize,fontWeight:u.fontWeight,lineHeight:u.lineHeight,letterSpacing:u.letterSpacing,whiteSpace:"nowrap",color:d,...f==null?void 0:f.content,children:[a&&c==="left"&&r.jsx(eo,{size:s==="xs"||s==="sm"?"sm":"md",color:d,...m,...f==null?void 0:f.loader}),t&&r.jsx(i.View,{color:d,...f==null?void 0:f.icon,children:t}),o&&["left","top"].includes(l)&&!a&&r.jsx(i.View,{color:d,...f==null?void 0:f.icon,children:o}),e,o&&["right","bottom"].includes(l)&&!a&&r.jsx(i.View,{color:d,...f==null?void 0:f.icon,children:o}),n&&r.jsx(i.View,{color:d,...f==null?void 0:f.icon,children:n}),a&&c==="right"&&r.jsx(eo,{size:s==="xs"||s==="sm"?"sm":"md",color:d,...m,...f==null?void 0:f.loader})]})}),e0=e=>{const o=Jo[e];return typeof o=="number"?o:typeof o=="string"&&parseInt(o,10)||0},o0=({asComponent:e,isDisabled:o,isLoading:t,isWrapped:n=!1,borderRadius:a,width:l,height:c,baseStyles:s,sizeStyles:d,iconPad:g,mainTone:m,resolvedTextColor:f,children:p,borderWidth:u=0,...y})=>r.jsx(i.Element,{as:e,disabled:!!(o||t),display:n?"flex":"inline-flex",alignItems:"center",justifyContent:"center",borderRadius:a,width:l,height:c,...s,...d,...g,backgroundColor:(s==null?void 0:s.backgroundColor)||(n?m:void 0),color:f,borderWidth:n?0:void 0,cursor:o?"default":"pointer",...y,children:p}),r0=({shape:e,isDisabled:o,onClick:t,shadow:n,borderWidth:a,isAuto:l,isFilled:c,views:s,children:d,...g})=>r.jsx(i.Element,{as:"div",position:"relative",display:"inline-flex",alignItems:"center",justifyContent:"center",borderRadius:Jo[e],cursor:o?"default":"pointer",onClick:t,boxShadow:n,padding:a,width:c?"100%":l?"fit-content":void 0,...s==null?void 0:s.container,...g,children:d}),t0=({variant:e,animation:o,to:t,isDisabled:n,isLoading:a,isAuto:l,isFilled:c,isExternal:s,shape:d="rounded",shadow:g,onClick:m,views:f,baseStyles:p,sizeStyles:u,iconPad:y,containerRef:k,resolvedTextColor:x,content:C,size:S,mainTone:w,borderMovingDuration:v=2,borderMovingGradientColors:b=["#705CFF","#FF5C97","#FFC75C"],animatedStrokeAccentColor:I="#705CFF",animatedStrokeTextColor:T="color-gray-900",...j})=>{var A;const E=e0(d),D=t?r.jsx(Ft,{to:t,isExternal:s,color:"currentColor",textDecoration:"inherit",_hover:{color:"currentColor"},...f==null?void 0:f.link,children:C}):C,W={isDisabled:n,isLoading:a,baseStyles:p,sizeStyles:u,iconPad:y,resolvedTextColor:x,mainTone:w,children:D};if(o==="borderMoving"&&b){const z={from:{backgroundPosition:"0% 50%"},to:{backgroundPosition:"200% 50%"},duration:`${v}s`,timingFunction:"linear",iterationCount:"infinite"};return r.jsx(r0,{shape:d,isDisabled:n,onClick:m,shadow:g,borderWidth:3,isAuto:l,isFilled:c,views:f,background:`linear-gradient(90deg, ${Oe(b[0])}, ${Oe(b[1])}, ${Oe(b[2])}, ${Oe(b[0])})`,backgroundSize:"200% 100%",animate:z,...j,children:r.jsx(o0,{asComponent:t?"div":"button",isWrapped:!0,borderRadius:Math.max(0,E-3),width:"100%",height:"100%",...W})})}if(o==="animatedStroke"){const H=Oe(I),z=Oe(T),P=1e3,V={from:{strokeWidth:"8px",strokeDasharray:`0 ${P}`,strokeDashoffset:-Math.round(P*.63)},to:{strokeWidth:"3px",strokeDasharray:`${P}`,strokeDashoffset:0},duration:"0.9s",timingFunction:"ease-in",fillMode:"forwards"},M=["group",(A=f==null?void 0:f.container)==null?void 0:A.className,j==null?void 0:j.className].filter(Boolean).join(" ");return r.jsxs(i.Element,{ref:k,as:t?"div":"button",type:t?void 0:"button",disabled:!!(!t&&(n||a)),onClick:m,position:"relative",display:"inline-flex",alignItems:"center",justifyContent:"center",width:c?"100%":l?"fit-content":void 0,borderRadius:Jo[d],boxShadow:g,transition:"background-color 0.2s ease, opacity 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease",cursor:n?"default":"pointer",color:z,backgroundColor:"transparent",borderWidth:0,...f==null?void 0:f.container,...j,className:M,children:[r.jsx(i.View,{as:"svg",position:"absolute",top:0,right:0,bottom:0,left:0,width:"100%",height:"100%",xmlns:"http://www.w3.org/2000/svg",pointerEvents:"none",zIndex:1,"aria-hidden":"true",children:r.jsx(i.View,{as:"rect",x:"0",y:"0",height:"100%",width:"100%",rx:E,ry:E,fill:"transparent",stroke:H,strokeWidth:"8px",strokeDasharray:`0 ${P}`,strokeDashoffset:-Math.round(P*.63),pathLength:P,on:{groupHover:{animate:V}}})}),r.jsx(i.View,{position:"relative",zIndex:0,children:D})]})}if(o==="borderReveal"){const z=Oe((b==null?void 0:b[0])||w||"#000000"),V=v*.75/4,M=`linear-gradient(90deg, ${z} 50%, transparent 50%)`,L=`linear-gradient(180deg, ${z} 50%, transparent 50%)`,_=`linear-gradient(270deg, ${z} 50%, transparent 50%)`,O=`linear-gradient(0deg, ${z} 50%, transparent 50%)`,N="100% 0, 100% 100%, 0 100%, 0 0",U="0 0, 100% 0, 100% 100%, 0 100%",X=`0s, ${V}s, ${V*2}s, ${V*2}s`,oe=`${V*2}s, ${V*2}s, ${V}s, 0s`,B=4;return r.jsx(i.Element,{ref:k,as:"div",position:"relative",display:"inline-flex",alignItems:"center",justifyContent:"center",borderRadius:Jo[d],cursor:n?"default":"pointer",onClick:m,boxShadow:g,padding:3,background:`
2
2
  ${M} no-repeat,
3
3
  ${L} no-repeat,
4
4
  ${_} no-repeat,
5
5
  ${O} no-repeat
6
- `,backgroundSize:`200% ${B}px, ${B}px 200%, 200% ${B}px, ${B}px 200%`,backgroundPosition:N,transitionProperty:"background-position",transitionDuration:`${j}s`,transitionTimingFunction:"linear",transitionDelay:oe,_hover:{backgroundPosition:U,transitionDelay:X},width:c?"100%":l?"fit-content":void 0,...f==null?void 0:f.container,...P,children:r.jsx(i.View,{as:t?"div":"button",disabled:!!(n||a),display:"flex",alignItems:"center",justifyContent:"center",borderRadius:Math.max(0,E-3),width:"100%",height:"100%",...p,...u,...y,backgroundColor:(p==null?void 0:p.backgroundColor)||w,color:x,borderWidth:0,cursor:n?"default":"pointer",children:D})})}return r.jsx(i.Element,{ref:k,as:e==="link"&&t?"div":"button",type:e==="link"&&t?void 0:"button",disabled:!!(n||a),...u,...y,display:"inline-flex",alignItems:"center",justifyContent:"center",width:c?"100%":l?"fit-content":void 0,borderRadius:Jo[d],boxShadow:g,transition:"background-color 0.2s ease, opacity 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease",cursor:n?"default":"pointer",onClick:m,...p,...f==null?void 0:f.container,...P,children:D})},n0=h.memo(h.forwardRef(({variant:e="filled",size:o="md",shape:t="rounded",iconPosition:n="left",loaderPosition:a="left",backgroundColor:l,color:c,textColor:s,explicitTextColor:d,reversed:g=!1,isAuto:m=!0,isFilled:f,isDisabled:p,isLoading:u,isIconRounded:y,isIcon:k,isHovered:x,icon:C,leftIcon:S,rightIcon:w,startIcon:v,endIcon:b,children:I,to:T,isExternal:P,shadow:E,onClick:D,views:z={},animation:A,loaderProps:W,config:H,ariaLabel:V,borderMovingDuration:j=2,borderMovingGradientColors:M=["#705CFF","#FF5C97","#FFC75C"],animatedStrokeAccentColor:L="#705CFF",animatedStrokeTextColor:_="color-gray-900",...O},N)=>{const X=p?"theme-disabled":u?"theme-loading":l??c??"theme-primary",oe=d??s??"color-white",{config:B}=br(),$=B==null?void 0:B.theme,q=h.useMemo(()=>{const re=Zd(X,oe,g,$);return H!=null&&H.variants&&Object.keys(H.variants).forEach(ie=>{re[ie]&&(re[ie]=Be(re[ie],H.variants[ie]))}),re},[X,oe,g,$,H==null?void 0:H.variants]),J=q[e]??q.filled,Y=d?{...J,color:d}:J,Z=(Y==null?void 0:Y.color)??oe,ee=r.jsx(Rd,{icon:C,leftIcon:S??v,rightIcon:w??b,isLoading:u,iconPosition:n,loaderPosition:a,size:o,resolvedTextColor:Z,isIconRounded:y,loaderProps:W,views:z,children:I}),ne=da[o],K=y||k?Qd[o]:{};return r.jsx(t0,{variant:e,animation:A,to:T,isDisabled:p,isLoading:u,isAuto:m,isFilled:f,isExternal:P,shape:t,shadow:E,onClick:D,views:z,baseStyles:Y,sizeStyles:ne,iconPad:K,resolvedTextColor:Z,content:ee,size:o,mainTone:X,borderMovingDuration:j,borderMovingGradientColors:M,animatedStrokeAccentColor:L,animatedStrokeTextColor:_,containerRef:N,...V!==void 0?{"aria-label":V}:{},...O})})),de=e=>{const[o,t]=i.useHover(),n=pe("button",e),a=e.textColor??(e.backgroundColor!=null&&e.color!=null?e.color:void 0);return r.jsx(n0,{isHovered:t,...n,explicitTextColor:a})},a0={sm:{padding:"12px"},md:{padding:"16px"},lg:{padding:"24px"}},l0={square:0,rounded:"8px",pill:"24px"},i0=e=>{const o=e==="dark";return{default:{backgroundColor:"color-white",border:"none",transition:"background-color 0.2s ease, box-shadow 0.2s ease"},outlined:{backgroundColor:"color-white",borderWidth:"1px",borderStyle:"solid",borderColor:"color-gray-200",transition:"border-color 0.2s ease, box-shadow 0.2s ease",_hover:{borderColor:"color-gray-300",boxShadow:o?"0px 1px 3px rgba(0, 0, 0, 0.3)":"0px 1px 3px rgba(0, 0, 0, 0.05)"}},elevated:{backgroundColor:"color-white",boxShadow:o?"0px 1px 3px rgba(0, 0, 0, 0.35), 0px 1px 2px rgba(0, 0, 0, 0.3)":"0px 1px 3px rgba(0, 0, 0, 0.08), 0px 1px 2px rgba(0, 0, 0, 0.06)",border:"none",transition:"box-shadow 0.2s ease",_hover:{boxShadow:o?"0px 4px 6px rgba(0, 0, 0, 0.4), 0px 2px 4px rgba(0, 0, 0, 0.35)":"0px 4px 6px rgba(0, 0, 0, 0.08), 0px 2px 4px rgba(0, 0, 0, 0.06)"}}}},Fr=e=>(e.themeMode,{container:{backgroundColor:"color-white",color:"color-gray-900",borderRadius:"8px",overflow:"hidden",transition:"background-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease"},header:{padding:"16px",borderBottom:"1px solid",borderColor:"color-gray-100",color:"theme-primary",fontWeight:600,fontSize:14},content:{padding:"16px",color:"color-gray-600",fontSize:12,lineHeight:"18px"},footer:{padding:"16px",borderTop:"1px solid",borderColor:"color-gray-100",justifyContent:"flex-end",gap:8}}),ga=h.createContext({}),Wt=()=>h.useContext(ga),Ht=({children:e,views:o,style:t,themeMode:n,...a})=>{var g;const l=i.useTheme(),{styles:c}=Wt(),s=Fr(l).header,d={...s,...c==null?void 0:c.header,...a,style:{...s==null?void 0:s.style,...(g=c==null?void 0:c.header)==null?void 0:g.style,...t}};return r.jsx(i.Vertical,{gap:8,...d,children:e})},jt=({children:e,views:o,style:t,themeMode:n,...a})=>{var g;const l=i.useTheme(),{styles:c}=Wt(),s=Fr(l).content,d={...s,...c==null?void 0:c.content,...a,style:{...s==null?void 0:s.style,...(g=c==null?void 0:c.content)==null?void 0:g.style,...t}};return r.jsx(i.Vertical,{gap:12,...d,children:e})},Pt=({children:e,views:o,style:t,themeMode:n,...a})=>{var g;const l=i.useTheme(),{styles:c}=Wt(),s=Fr(l).footer,d={...s,...c==null?void 0:c.footer,...a,style:{...s==null?void 0:s.style,...(g=c==null?void 0:c.footer)==null?void 0:g.style,...t}};return r.jsx(i.Vertical,{gap:8,...d,children:e})},c0=({variant:e="default",size:o="md",shape:t="rounded",children:n,header:a,footer:l,isFullWidth:c=!1,views:s,style:d,themeMode:g,config:m,...f})=>{var b,I;const p=i.useTheme(),u=Fr(p),y=((b=a0[o])==null?void 0:b.padding)||"16px",k=h.useMemo(()=>({styles:{container:{...u.container,borderRadius:l0[t],...s==null?void 0:s.container},header:{...u.header,padding:y,...s==null?void 0:s.header},content:{...u.content,padding:y,...s==null?void 0:s.content},footer:{...u.footer,padding:y,...s==null?void 0:s.footer}}}),[u,s,y,t]),x=h.Children.toArray(n).some(T=>h.isValidElement(T)&&(T.type===Ht||T.type===jt||T.type===Pt)),{themeMode:C}=p,w=i0(g||C)[e],v={width:c?"100%":"auto",overflow:"hidden",...w,...k.styles.container,...f,style:{...(I=k.styles.container)==null?void 0:I.style,...d}};return r.jsx(ga.Provider,{value:k,children:r.jsx(i.View,{...v,children:x?n:r.jsxs(i.Vertical,{width:"100%",children:[a&&r.jsx(Ht,{children:a}),r.jsx(jt,{children:n}),l&&r.jsx(Pt,{children:l})]})})})},we=e=>{const o=pe("card",e);return r.jsx(c0,{...o})};we.Header=Ht,we.Content=jt,we.Footer=Pt;const s0=({defaultActiveIndex:e=0,activeIndex:o,onChange:t,autoPlay:n=!1,autoPlayInterval:a=3e3,pauseOnHover:l=!0,infinite:c=!0,totalSlides:s,stepIndices:d})=>{const g=h.useRef(s||0),[m,f]=h.useState(s||0),p=h.useRef(new Set),u=h.useRef(0),y=h.useMemo(()=>ct("carousel-content"),[]),[k,x]=h.useState(o!==void 0?o:e),[C,S]=h.useState(!1),[w,v]=h.useState(!1),[b,I]=h.useState(0),[T,P]=h.useState(0),E=h.useRef(null);h.useEffect(()=>{o!==void 0&&x(o)},[o]);const D=h.useCallback(U=>{let X=U;c?U<0?X=m-1:U>=m&&(X=0):X=Math.max(0,Math.min(U,m-1)),d&&d.length>0&&(d.includes(X)||(X=d.reduce((B,$)=>Math.abs($-X)<Math.abs(B-X)?$:B))),o===void 0&&x(X),t&&t(X)},[o,c,t,m]),z=h.useCallback(()=>{D(k+1)},[k,D]),A=h.useCallback(()=>{D(k-1)},[k,D]);h.useEffect(()=>(n&&!C&&!w&&(E.current=setInterval(()=>{z()},a)),()=>{E.current&&clearInterval(E.current)}),[n,a,C,w,z,l]);const W=h.useCallback(()=>{l&&S(!0)},[l]),H=h.useCallback(()=>{S(!1)},[]),V=h.useCallback(U=>{v(!0),"touches"in U?(I(U.touches[0].clientX),P(U.touches[0].clientY)):(I(U.clientX),P(U.clientY))},[]),j=h.useCallback(U=>{if(!w)return;let X,oe;"touches"in U?(X=U.touches[0].clientX,oe=U.touches[0].clientY):(X=U.clientX,oe=U.clientY);const B=X-b,$=oe-T;Math.abs(B)>Math.abs($)&&Math.abs(B)>50&&(B>0?A():z(),v(!1))},[w,b,T,z,A]),M=h.useCallback(()=>{v(!1)},[]),L=h.useCallback(()=>{const U=u.current++;p.current.add(U);const X=p.current.size;return g.current=X,f(X),U},[]),_=h.useCallback(U=>{p.current.delete(U);const X=p.current.size;if(g.current=X,f(X),X>0&&k>=X){const oe=Math.max(0,X-1);o===void 0&&x(oe),t&&t(oe)}},[k,o,t]),O=c||k>0,N=c||k<m-1;return{activeIndex:k,totalSlides:m,goToSlide:D,nextSlide:z,prevSlide:A,canGoNext:N,canGoPrevious:O,handleMouseEnter:W,handleMouseLeave:H,handleDragStart:V,handleDragMove:j,handleDragEnd:M,registerSlide:L,unregisterSlide:_,contentId:y,infinite:c}},d0={dot:{width:"10px",height:"10px",borderRadius:"50%",backgroundColor:"color-gray-300",margin:"0 4px",cursor:"pointer",transition:"background-color 0.3s ease"},line:{width:"20px",height:"4px",borderRadius:"2px",backgroundColor:"color-gray-300",margin:"0 4px",cursor:"pointer",transition:"background-color 0.3s ease"},number:{minWidth:"24px",height:"24px",borderRadius:"50%",backgroundColor:"color-gray-300",margin:"0 4px",cursor:"pointer",display:"flex",alignItems:"center",justifyContent:"center",fontSize:"12px",transition:"background-color 0.3s ease"}},g0={dot:{backgroundColor:"theme-primary"},line:{backgroundColor:"theme-primary"},number:{backgroundColor:"theme-primary",color:"color-white"}},zr={width:"40px",height:"40px",borderRadius:"50%",backgroundColor:"color-white",color:"color-gray-800",display:"flex",alignItems:"center",justifyContent:"center",cursor:"pointer",boxShadow:"0 2px 5px rgba(0, 0, 0, 0.1)",zIndex:1,transition:"background-color 0.3s ease",_hover:{backgroundColor:"color-gray-100"}},Qo=()=>({container:{position:"relative",overflow:"hidden"},content:{overflow:"hidden",width:"100%",height:"100%"},innerContainer:{display:"flex",transitionProperty:"transform",transitionDuration:"300ms",transitionTimingFunction:"ease-in-out",height:"100%"},item:{flex:"0 0 100%",minWidth:0,position:"relative",height:"100%"},prevButton:{position:"absolute",top:"50%",left:"16px",transform:"translateY(-50%)",zIndex:10,...zr},nextButton:{position:"absolute",top:"50%",right:"16px",transform:"translateY(-50%)",zIndex:10,...zr}}),ha=h.createContext(null),Mr=()=>{const e=h.useContext(ha);if(!e)throw new Error("Carousel compound components must be used within <Carousel>");return e},fa=({children:e,isActive:o,index:t,views:n,...a})=>r.jsx(i.View,{flexShrink:0,width:"100%",height:"100%",display:o?"block":"none",...n,...a,children:e}),ma=({views:e,children:o,...t})=>{const{goToPrevious:n,canGoPrevious:a,styles:l}=Mr(),s={...Qo().prevButton,...l==null?void 0:l.prevButton,...e==null?void 0:e.prevButton};return r.jsx(de,{"aria-label":"Previous slide",onClick:()=>n(),isDisabled:!a,...s,...t,children:o??r.jsx(he,{orientation:"left",widthHeight:16})})},pa=({views:e,children:o,...t})=>{const{goToNext:n,canGoNext:a,styles:l}=Mr(),s={...Qo().nextButton,...l==null?void 0:l.nextButton,...e==null?void 0:e.nextButton};return r.jsx(de,{"aria-label":"Next slide",onClick:()=>n(),isDisabled:!a,...s,...t,children:o??r.jsx(he,{orientation:"right",widthHeight:16})})},ua=({children:e,views:o,...t})=>{const{registerSlide:n,unregisterSlide:a,styles:l}=Mr(),c=h.useRef(null);h.useEffect(()=>{const g=n();return c.current=g,()=>{c.current!==null&&a(c.current)}},[n,a]);const d={...Qo().item,...l==null?void 0:l.item,...o==null?void 0:o.item};return r.jsx(i.View,{role:"group","aria-roledescription":"slide",...d,...t,children:e})},ya=({children:e,views:o,style:t,...n})=>{const{currentIndex:a,styles:l,contentId:c}=Mr(),s=Qo(),d={...s.content,...l==null?void 0:l.content,...o==null?void 0:o.content},g={...s.innerContainer,...l==null?void 0:l.innerContainer,...o==null?void 0:o.innerContainer},m=`-${a*100}%`;return r.jsx(i.View,{...d,...n,style:{...d==null?void 0:d.style,...t},id:c,"aria-live":"polite",children:r.jsx(i.View,{...g,style:{...g==null?void 0:g.style,transform:`translateX(${m})`},children:e})})},h0=({children:e,defaultActiveIndex:o=0,activeIndex:t,onChange:n,showNavigation:a=!0,navigationPosition:l="inside",prevButton:c,nextButton:s,showIndicators:d=!0,indicatorPosition:g="bottom",indicatorVariant:m="dot",autoPlay:f=!1,autoPlayInterval:p=3e3,pauseOnHover:u=!0,infinite:y=!0,direction:k="horizontal",transitionDuration:x=300,views:C,stepIndices:S,themeMode:w,...v})=>{const b=h.useMemo(()=>h.Children.toArray(e),[e]),I=s0({defaultActiveIndex:o,activeIndex:t,onChange:n,autoPlay:f,autoPlayInterval:p,pauseOnHover:u,infinite:y,totalSlides:b.length}),{activeIndex:T,totalSlides:P,goToSlide:E,nextSlide:D,prevSlide:z,handleMouseEnter:A,handleMouseLeave:W,handleDragStart:H,handleDragMove:V,handleDragEnd:j}=I,M=()=>{if(!a)return null;const O=c||r.jsx(i.View,{as:"button","aria-label":"Previous slide",...zr,...C==null?void 0:C.prevButton,children:"❮"}),N=s||r.jsx(i.View,{as:"button","aria-label":"Next slide",...zr,...C==null?void 0:C.nextButton,children:"❯"});return r.jsxs(r.Fragment,{children:[r.jsx(i.View,{position:"absolute",top:"50%",transform:"translateY(-50%)",left:l==="inside"?"10px":"-40px",onClick:z,cursor:!y&&T===0?"not-allowed":"pointer",opacity:!y&&T===0?.5:1,children:O}),r.jsx(i.View,{position:"absolute",top:"50%",transform:"translateY(-50%)",right:l==="inside"?"10px":"-40px",onClick:D,cursor:!y&&T===b.length-1?"not-allowed":"pointer",opacity:!y&&T===b.length-1?.5:1,children:N})]})},L=()=>d?r.jsx(i.Horizontal,{position:"absolute",left:"0",right:"0",justifyContent:"center",...g==="top"?{top:"10px"}:{bottom:"10px"},...C==null?void 0:C.indicators,children:b.map((O,N)=>r.jsx(i.View,{onClick:()=>E(N),cursor:"pointer",...d0[m],...N===T?{...g0[m]}:{},...C==null?void 0:C.indicator,...N===T?C==null?void 0:C.activeIndicator:{},children:m==="number"&&N+1},N))}):null;return h.useMemo(()=>h.Children.toArray(e).some(O=>h.isValidElement(O)&&(O.type===ya||O.type===ua||O.type===ma||O.type===pa)),[e])?r.jsx(ha.Provider,{value:{currentIndex:T,totalSlides:P,goToSlide:E,goToNext:D,goToPrevious:z,canGoNext:I.canGoNext,canGoPrevious:I.canGoPrevious,registerSlide:I.registerSlide,unregisterSlide:I.unregisterSlide,styles:{...Qo(),...C},contentId:I.contentId,infinite:y},children:r.jsx(i.View,{role:"region","aria-roledescription":"carousel","aria-label":"Carousel",position:"relative",width:"100%",height:"100%",overflow:"hidden",...C==null?void 0:C.container,...v,children:e})}):r.jsxs(i.View,{position:"relative",width:"100%",height:"100%",overflow:"hidden",onMouseEnter:A,onMouseLeave:W,onTouchStart:H,onTouchMove:V,onTouchEnd:j,onMouseDown:H,onMouseMove:V,onMouseUp:j,...C==null?void 0:C.container,...v,children:[r.jsx(i.View,{width:"100%",height:"100%",position:"relative",...C==null?void 0:C.slideWrapper,children:b.map((O,N)=>r.jsx(fa,{isActive:N===T,index:N,views:C==null?void 0:C.slide,children:O},N))}),M(),L()]})},$e=e=>r.jsx(h0,{...e});$e.Slide=fa,$e.Content=ya,$e.Item=ua,$e.Previous=ma,$e.Next=pa;const Le={blue:"color-blue-500",green:"color-green-500",purple:"color-purple-500",orange:"color-orange-500",red:"color-red-500",teal:"color-teal-500",pink:"color-pink-500",indigo:"color-indigo-500",yellow:"color-yellow-500",cyan:"color-cyan-500"},ba=[Le.blue,Le.green,Le.purple,Le.orange,Le.red,Le.teal,Le.pink,Le.indigo,Le.yellow,Le.cyan],Mo=ba,f0={width:"100%",height:"100%",position:"relative",display:"flex",flexDirection:"column"},m0={fontSize:"18px",fontWeight:"700",marginBottom:"24px",textAlign:"center",color:"color-gray-900"},p0={display:"flex",flexWrap:"wrap",justifyContent:"flex-start",marginTop:"16px",gap:"12px"},u0={display:"flex",alignItems:"center",padding:"4px 8px",borderRadius:"6px",cursor:"pointer",transition:"background-color 0.2s ease",_hover:{backgroundColor:"color-gray-50"}},y0={width:"10px",height:"10px",borderRadius:"50%",marginRight:"8px"},b0={fontSize:"13px",fontWeight:"500",color:"color-gray-600"},Wr={position:"absolute",backgroundColor:"color-white",padding:"12px 16px",borderRadius:"8px",boxShadow:"0px 12px 24px rgba(15, 23, 42, 0.18)",border:"1px solid color-gray-200",fontSize:"14px",display:"flex",flexDirection:"column",pointerEvents:"none",zIndex:100},xa={stroke:"color-gray-100",strokeWidth:"1px",strokeDasharray:"4 4"},Hr={stroke:"color-gray-200",strokeWidth:"1px"},jr={fontSize:"12px",fill:"color-gray-500",fontWeight:"500"},x0={rx:"4px",ry:"4px",cursor:"pointer",transition:"all 0.3s cubic-bezier(0.4, 0, 0.2, 1)",_hover:{filter:"brightness(1.1)"}},k0={strokeWidth:"3px",fill:"none",strokeLinecap:"round",strokeLinejoin:"round",transition:"stroke-width 0.2s ease"},C0={r:"5px",strokeWidth:"2.5px",stroke:"color-white",cursor:"pointer",transition:"all 0.2s cubic-bezier(0.4, 0, 0.2, 1)",_hover:{r:"7px"}},Pr={strokeWidth:"2px",stroke:"color-white",cursor:"pointer",transition:"all 0.3s ease",_hover:{transform:"scale(1.02)"}},Vt={position:"absolute",top:0,left:0,right:0,bottom:0,display:"flex",alignItems:"center",justifyContent:"center",backgroundColor:"color-white-800",borderRadius:"4px",zIndex:10,padding:"24px",textAlign:"center"},w0={...Vt},S0={...Vt,backgroundColor:"rgba(254, 242, 242, 0.8)",color:"color-red-600"},v0={...Vt,backgroundColor:"rgba(249, 250, 251, 0.8)",color:"color-gray-500"},T0=({data:e,dataPoints:o,animated:t=!0,animationDuration:n=500,showTooltips:a=!0})=>{const[l,c]=h.useState(t?0:1),[s,d]=h.useState({visible:!1,x:0,y:0,content:null}),g=h.useRef(null),m=h.useRef(null);h.useEffect(()=>{if(!t){c(1);return}const S=Date.now(),w=()=>{const v=Date.now()-S,b=Math.min(v/n,1);c(b),b<1&&(g.current=requestAnimationFrame(w))};return g.current=requestAnimationFrame(w),()=>{g.current&&cancelAnimationFrame(g.current)}},[t,n]);const[f,p]=h.useState(new Set),u=h.useCallback(S=>{p(w=>{const v=new Set(w);return v.has(S)?v.delete(S):v.add(S),v})},[]),y=h.useCallback(()=>e?{...e,series:e.series.map((S,w)=>({...S,color:S.color||Mo[w%Mo.length],hidden:f.has(S.name)}))}:o?o.map((S,w)=>({...S,color:S.color||Mo[w%Mo.length],hidden:f.has(S.label)})):null,[e,o,f]),k=h.useCallback((S,w,v)=>{a&&d({visible:!0,x:S,y:w,content:v})},[a]),x=h.useCallback(()=>{d(S=>({...S,visible:!1}))},[]),C=h.useCallback(()=>{if(!m.current)return{width:0,height:0};const{width:S,height:w}=m.current.getBoundingClientRect();return{width:S,height:w}},[]);return{animationProgress:l,tooltip:s,containerRef:m,processedData:y,showTooltip:k,hideTooltip:x,getChartDimensions:C,toggleSeries:u}},I0=({data:e,width:o,height:t,animationProgress:n,showGrid:a=!0,onBarClick:l,showTooltip:c,hideTooltip:s,views:d})=>{const{getColor:g}=i.useTheme(),m={top:20,right:20,bottom:40,left:50},f=o-m.left-m.right,p=t-m.top-m.bottom,u=h.useMemo(()=>{let b=0;return e.series.forEach(I=>{I.data.forEach(T=>{b=Math.max(b,T)})}),b},[e]),y=e.labels.length,k=e.series.length,x=f/y,C=x*.8/k,S=x*.2/(k+1),w=u||10,v=h.useMemo(()=>{const I=[];for(let T=0;T<=5;T++){const P=w/5*T;I.push(P)}return I},[u]);return r.jsxs("svg",{width:o,height:t,children:[r.jsx("defs",{children:e.series.map((b,I)=>{const T=b.color?g(b.color):"black";return r.jsxs("linearGradient",{id:`bar-gradient-${I}`,x1:"0%",y1:"0%",x2:"0%",y2:"100%",children:[r.jsx("stop",{offset:"0%",stopColor:T,stopOpacity:1}),r.jsx("stop",{offset:"100%",stopColor:T,stopOpacity:.7})]},`bar-gradient-${I}`)})}),r.jsx("line",{x1:m.left,y1:t-m.bottom,x2:o-m.right,y2:t-m.bottom,...Hr,...d==null?void 0:d.axis}),r.jsx("line",{x1:m.left,y1:m.top,x2:m.left,y2:t-m.bottom,...Hr,...d==null?void 0:d.axis}),e.labels.map((b,I)=>{const T=m.left+(I+.5)*x,P=t-m.bottom+20;return r.jsx("text",{x:T,y:P,textAnchor:"middle",...jr,...d==null?void 0:d.axisLabel,children:b},`x-label-${I}`)}),v.map((b,I)=>{const T=t-m.bottom-b/w*p;return r.jsxs(h.Fragment,{children:[r.jsx("text",{x:m.left-10,y:T,textAnchor:"end",dominantBaseline:"middle",...jr,...d==null?void 0:d.axisLabel,children:b.toFixed(0)}),a&&r.jsx("line",{x1:m.left,y1:T,x2:o-m.right,y2:T,...xa,...d==null?void 0:d.grid})]},`y-tick-${I}`)}),e.series.map((b,I)=>b.hidden?null:r.jsx(h.Fragment,{children:b.data.map((T,P)=>{const E=T/w*p*n,D=m.left+P*x+S*(I+1)+C*I,z=t-m.bottom-E,A=e.labels[P],W=e.series.reduce((L,_)=>{const O=_.data[P];return L+(typeof O=="number"?O:0)},0),H=W>0?(T/W*100).toFixed(1):null,V=b.color?g(b.color):"black",j=L=>{const _=r.jsxs(i.View,{display:"flex",flexDirection:"column",minWidth:"180px",children:[r.jsxs(i.View,{display:"flex",justifyContent:"space-between",alignItems:"center",children:[r.jsx(i.Text,{fontWeight:"semibold",children:b.name}),r.jsx(i.View,{width:"12px",height:"12px",borderRadius:"2px",backgroundColor:V})]}),r.jsx(i.Text,{marginTop:"4px",color:"color-gray-500",fontSize:"12px",children:A}),r.jsxs(i.View,{marginTop:"8px",display:"flex",flexDirection:"column",children:[r.jsxs(i.View,{display:"flex",justifyContent:"space-between",children:[r.jsx(i.Text,{color:"color-gray-500",children:"Value"}),r.jsx(i.Text,{fontWeight:"medium",children:T.toLocaleString()})]}),H!==null&&r.jsxs(i.View,{marginTop:"4px",display:"flex",justifyContent:"space-between",children:[r.jsx(i.Text,{color:"color-gray-500",children:"Share"}),r.jsx(i.Text,{fontWeight:"medium",children:`${H}%`})]}),r.jsxs(i.View,{marginTop:"4px",display:"flex",justifyContent:"space-between",children:[r.jsx(i.Text,{color:"color-gray-500",children:"Category total"}),r.jsx(i.Text,{fontWeight:"medium",children:W.toLocaleString()})]})]})]}),O=L.currentTarget.getBoundingClientRect(),N=O.left+O.width/2,U=O.top;c(N,U,_)},M=()=>{l&&l(b.name,P)};return r.jsx("rect",{x:D,y:z,width:C,height:E,fill:`url(#bar-gradient-${I})`,onMouseEnter:j,onMouseMove:j,onMouseLeave:s,onClick:M,...x0,...d==null?void 0:d.bar},`bar-${I}-${P}`)})},`series-${I}`))]})},F0=({data:e,width:o,height:t,animationProgress:n,showGrid:a=!0,onPointClick:l,showTooltip:c,hideTooltip:s,views:d})=>{const{getColor:g}=i.useTheme(),m={top:20,right:20,bottom:40,left:40},f=o-m.left-m.right,p=t-m.top-m.bottom,u=h.useMemo(()=>{let S=0;return e.series.forEach(w=>{w.data.forEach(v=>{S=Math.max(S,v)})}),S},[e]),y=u||10,k=h.useMemo(()=>{const w=[];for(let v=0;v<=5;v++){const b=y/5*v;w.push(b)}return w},[u]),x=S=>{if(S.length<2)return"";const w=S.map((b,I)=>({x:m.left+I/(e.labels.length-1)*f,y:t-m.bottom-b/y*p*n}));let v=`M ${w[0].x},${w[0].y}`;for(let b=0;b<w.length-1;b++){const I=w[b===0?b:b-1],T=w[b],P=w[b+1],E=w[b+2===w.length?b+1:b+2],D=T.x+(P.x-I.x)/6,z=T.y+(P.y-I.y)/6,A=P.x-(E.x-T.x)/6,W=P.y-(E.y-T.y)/6;v+=` C ${D},${z} ${A},${W} ${P.x},${P.y}`}return v},C=S=>{if(S.length<2)return"";const w=x(S),v=m.left,b=m.left+f,I=t-m.bottom;return`${w} L ${b},${I} L ${v},${I} Z`};return r.jsxs("svg",{width:o,height:t,children:[r.jsx("defs",{children:e.series.map((S,w)=>{const v=S.color?g(S.color):"black";return r.jsxs("linearGradient",{id:`gradient-${w}`,x1:"0%",y1:"0%",x2:"0%",y2:"100%",children:[r.jsx("stop",{offset:"0%",stopColor:v,stopOpacity:.3}),r.jsx("stop",{offset:"100%",stopColor:v,stopOpacity:0})]},`gradient-${w}`)})}),r.jsx("line",{x1:m.left,y1:t-m.bottom,x2:o-m.right,y2:t-m.bottom,...Hr,...d==null?void 0:d.axis}),r.jsx("line",{x1:m.left,y1:m.top,x2:m.left,y2:t-m.bottom,...Hr,...d==null?void 0:d.axis}),e.labels.map((S,w)=>{const v=m.left+w/(e.labels.length-1)*f,b=t-m.bottom+20;return r.jsx("text",{x:v,y:b,textAnchor:"middle",...jr,...d==null?void 0:d.axisLabel,children:S},`x-label-${w}`)}),k.map((S,w)=>{const v=t-m.bottom-S/y*p;return r.jsxs(h.Fragment,{children:[r.jsx("text",{x:m.left-10,y:v,textAnchor:"end",dominantBaseline:"middle",...jr,...d==null?void 0:d.axisLabel,children:S.toFixed(0)}),a&&r.jsx("line",{x1:m.left,y1:v,x2:o-m.right,y2:v,...xa,...d==null?void 0:d.grid})]},`y-tick-${w}`)}),e.series.map((S,w)=>{if(S.hidden)return null;const v=S.color?g(S.color):"black";return r.jsxs(h.Fragment,{children:[r.jsx("path",{d:C(S.data),fill:`url(#gradient-${w})`,...d==null?void 0:d.area}),r.jsx("path",{d:x(S.data),stroke:v,...k0,...d==null?void 0:d.line}),S.data.map((b,I)=>{const T=m.left+I/(e.labels.length-1)*f,P=t-m.bottom-b/y*p*n,E=e.labels[I],D=e.series.reduce((M,L)=>{const _=L.data[I];return M+(typeof _=="number"?_:0)},0),z=D>0?(b/D*100).toFixed(1):null,A=I>0&&typeof S.data[I-1]=="number"?S.data[I-1]:null,W=typeof A=="number"?b-A:null,H=typeof W=="number"?`${W>=0?"+":""}${W.toLocaleString()}`:null,V=M=>{const L=r.jsxs(i.View,{display:"flex",flexDirection:"column",minWidth:"200px",children:[r.jsxs(i.View,{display:"flex",justifyContent:"space-between",alignItems:"center",children:[r.jsx(i.Text,{fontWeight:"semibold",children:S.name}),r.jsx(i.View,{width:"12px",height:"12px",borderRadius:"2px",backgroundColor:v})]}),r.jsx(i.Text,{marginTop:"4px",color:"color-gray-500",fontSize:"12px",children:E}),r.jsxs(i.View,{marginTop:"8px",display:"flex",flexDirection:"column",children:[r.jsxs(i.View,{display:"flex",justifyContent:"space-between",children:[r.jsx(i.Text,{color:"color-gray-500",children:"Value"}),r.jsx(i.Text,{fontWeight:"medium",children:b.toLocaleString()})]}),H!==null&&r.jsxs(i.View,{marginTop:"4px",display:"flex",justifyContent:"space-between",children:[r.jsx(i.Text,{color:"color-gray-500",children:"Change"}),r.jsx(i.Text,{fontWeight:"medium",children:H})]}),z!==null&&r.jsxs(i.View,{marginTop:"4px",display:"flex",justifyContent:"space-between",children:[r.jsx(i.Text,{color:"color-gray-500",children:"Share"}),r.jsx(i.Text,{fontWeight:"medium",children:`${z}%`})]}),r.jsxs(i.View,{marginTop:"4px",display:"flex",justifyContent:"space-between",children:[r.jsx(i.Text,{color:"color-gray-500",children:"Category total"}),r.jsx(i.Text,{fontWeight:"medium",children:D.toLocaleString()})]})]})]}),_=M.currentTarget.getBoundingClientRect(),O=_.left+_.width/2,N=_.top+_.height/2;c(O,N,L)},j=()=>{l&&l(S.name,I)};return r.jsx("circle",{cx:T,cy:P,fill:v,onMouseEnter:V,onMouseMove:V,onMouseLeave:s,onClick:j,...C0,...d==null?void 0:d.point},`point-${w}-${I}`)})]},`series-${w}`)})]})},z0=({dataPoints:e,width:o,height:t,animationProgress:n,isDonut:a=!1,onSliceClick:l,showTooltip:c,hideTooltip:s,views:d})=>{const{getColor:g}=i.useTheme(),{ref:m,relation:f}=i.useElementPosition({trackChanges:!0,trackOnHover:!0,trackOnScroll:!0,trackOnResize:!0}),p=h.useRef(null);h.useEffect(()=>{p.current&&m&&(m.current=p.current)},[p,m]);const y=Math.min(o,t)/2*.8,k=o/2,x=t/2,C=a?y*.6:0,S=h.useMemo(()=>e.filter(b=>!b.hidden),[e]),w=h.useMemo(()=>S.reduce((b,I)=>b+I.value,0),[S]),v=h.useMemo(()=>{if(w===0)return[{path:a?[`M ${k} ${x-y}`,`A ${y} ${y} 0 1 1 ${k} ${x+y}`,`A ${y} ${y} 0 1 1 ${k} ${x-y}`,`M ${k} ${x-C}`,`A ${C} ${C} 0 1 0 ${k} ${x+C}`,`A ${C} ${C} 0 1 0 ${k} ${x-C}`,"Z"].join(" "):[`M ${k} ${x}`,`M ${k} ${x-y}`,`A ${y} ${y} 0 1 1 ${k} ${x+y}`,`A ${y} ${y} 0 1 1 ${k} ${x-y}`,"Z"].join(" "),color:"#E2E8F0",label:"Total",value:0,percentage:"0%",labelX:k,labelY:x,startAngle:0,endAngle:Math.PI*2,index:-1}];const b=[];let I=-Math.PI/2;for(let T=0;T<S.length;T++){const E=S[T].value/w,D=E*2*Math.PI*n,A=Math.max(0,D-.02),W=I+A,H=k+Math.cos(I)*y,V=x+Math.sin(I)*y,j=k+Math.cos(W)*y,M=x+Math.sin(W)*y,L=k+Math.cos(I)*C,_=x+Math.sin(I)*C,O=k+Math.cos(W)*C,N=x+Math.sin(W)*C,U=A>Math.PI?1:0;let X;a?X=[`M ${H} ${V}`,`A ${y} ${y} 0 ${U} 1 ${j} ${M}`,`L ${O} ${N}`,`A ${C} ${C} 0 ${U} 0 ${L} ${_}`,"Z"].join(" "):X=[`M ${k} ${x}`,`L ${H} ${V}`,`A ${y} ${y} 0 ${U} 1 ${j} ${M}`,"Z"].join(" ");const oe=I+A/2,B=a?(y+C)/2:y*.7,$=k+Math.cos(oe)*B,q=x+Math.sin(oe)*B,J=`${(E*100).toFixed(1)}%`,Y=S[T].color||Mo[T%Mo.length],Z=g(Y);b.push({path:X,color:Z,label:S[T].label,value:S[T].value,percentage:J,labelX:$,labelY:q,startAngle:I,endAngle:W,index:T,originalIndex:e.findIndex(ee=>ee.label===S[T].label)}),I=W}return b},[S,w,y,k,x,C,n,a,e]);return r.jsxs("svg",{ref:p,width:o,height:t,style:{overflow:"visible"},children:[a&&r.jsxs("g",{pointerEvents:"none",children:[r.jsx("circle",{cx:k,cy:x,r:C,fill:"white"}),r.jsx("text",{x:k,y:x-8,textAnchor:"middle",dominantBaseline:"middle",fontSize:"14px",fontWeight:"500",fill:"color-gray-500",children:"Total"}),r.jsx("text",{x:k,y:x+12,textAnchor:"middle",dominantBaseline:"middle",fontSize:"20px",fontWeight:"800",fill:"color-gray-900",children:w.toLocaleString()})]}),v.map((b,I)=>{const T=D=>{const z=w>0?b.value/w*100:0,A=w>0?Math.max(0,100-z):null,W=r.jsxs(i.View,{display:"flex",flexDirection:"column",minWidth:"200px",children:[r.jsxs(i.View,{display:"flex",justifyContent:"space-between",alignItems:"center",children:[r.jsx(i.Text,{fontWeight:"semibold",children:b.label}),r.jsx(i.View,{width:"12px",height:"12px",borderRadius:"2px",backgroundColor:b.color})]}),r.jsxs(i.Text,{marginTop:"4px",color:"color-gray-500",fontSize:"12px",children:["Slice ",b.index+1," of ",S.length]}),r.jsxs(i.View,{marginTop:"8px",display:"flex",flexDirection:"column",children:[r.jsxs(i.View,{display:"flex",justifyContent:"space-between",children:[r.jsx(i.Text,{color:"color-gray-500",children:"Value"}),r.jsx(i.Text,{fontWeight:"medium",children:b.value.toLocaleString()})]}),r.jsxs(i.View,{marginTop:"4px",display:"flex",justifyContent:"space-between",children:[r.jsx(i.Text,{color:"color-gray-500",children:"Share"}),r.jsx(i.Text,{fontWeight:"medium",children:b.percentage})]}),r.jsxs(i.View,{marginTop:"4px",display:"flex",justifyContent:"space-between",children:[r.jsx(i.Text,{color:"color-gray-500",children:"Total"}),r.jsx(i.Text,{fontWeight:"medium",children:w.toLocaleString()})]}),A!==null&&r.jsxs(i.View,{marginTop:"4px",display:"flex",justifyContent:"space-between",children:[r.jsx(i.Text,{color:"color-gray-500",children:"Remaining"}),r.jsx(i.Text,{fontWeight:"medium",children:`${A.toFixed(1)}%`})]})]})]});let H=D.clientX,V=D.clientY;if(p.current){const j=p.current.getBoundingClientRect();H=j.left+b.labelX,V=j.top+b.labelY}c(H,V,W)},P=()=>{b.index!==-1&&l&&l(e[b.index],b.index)},E=b.index===-1;return r.jsxs("g",{children:[r.jsx("path",{d:b.path,fill:b.color,onMouseEnter:E?void 0:T,onMouseMove:E?void 0:T,onMouseLeave:E?void 0:s,onClick:P,...Pr,style:{...Pr==null?void 0:Pr.style,cursor:E?"default":"pointer"},...d==null?void 0:d.pie}),!E&&b.endAngle-b.startAngle>.25&&r.jsx("text",{x:b.labelX,y:b.labelY,textAnchor:"middle",dominantBaseline:"middle",fill:"white",fontSize:"11px",fontWeight:"800",pointerEvents:"none",paintOrder:"stroke",stroke:"rgba(0,0,0,0.2)",strokeWidth:"2px",children:b.percentage})]},`slice-${I}`)})]})},M0=({visible:e,x:o,y:t,content:n,maxDistance:a=100,views:l})=>{const c=h.useRef(null),[s,d]=h.useState({left:0,top:0});return h.useEffect(()=>{if(!e||!c.current||typeof window>"u"||typeof c.current.getBoundingClientRect!="function")return;const m=c.current.getBoundingClientRect(),f=m.width||200,p=m.height||100,u=20,y=16;let k=o-f/2,x=t-p-u;x<y&&(x=t+u),k+f>window.innerWidth-y?k=window.innerWidth-f-y:k<y&&(k=y),x=Math.max(y,Math.min(x,window.innerHeight-p-y)),d({left:k,top:x})},[e,o,t]),e?r.jsx(i.View,{ref:c,position:"fixed",left:`${s.left}px`,top:`${s.top}px`,...Wr,...l==null?void 0:l.tooltip,style:{...Wr==null?void 0:Wr.style,pointerEvents:"none",transition:"all 0.1s ease-out"},children:n}):null},W0=({type:e,data:o,dataPoints:t,title:n,showLegend:a=!0,legendPosition:l="bottom",showGrid:c=!0,showTooltips:s=!0,animated:d=!0,animationDuration:g=500,responsive:m=!0,aspectRatio:f=16/9,width:p=200,height:u=200,views:y,onDataPointClick:k,onSeriesClick:x,isLoading:C=!1,error:S,noData:w,loadingIndicator:v,errorIndicator:b,noDataIndicator:I,"aria-label":T,themeMode:P,...E})=>{const{animationProgress:D,tooltip:z,containerRef:A,processedData:W,showTooltip:H,hideTooltip:V,getChartDimensions:j,toggleSeries:M}=T0({data:o,dataPoints:t,animated:d,animationDuration:g,showTooltips:s}),L=W(),{width:_,height:O}=j(),N=p||_,U=u||(m?_/f:O),X=()=>{if(!a||!L)return null;let Z=[];return e==="pie"||e==="donut"?Array.isArray(L)&&(Z=L):L&&L.series&&(Z=L.series),!Z||Z.length===0?null:r.jsx(i.Horizontal,{flexWrap:"wrap",justifyContent:"flex-start",marginTop:l==="bottom"?"16px":0,marginBottom:l==="top"?"16px":0,...p0,...y==null?void 0:y.legend,children:Z.map((ee,ne)=>{const K=ee.hidden,re=ee.name||ee.label;return r.jsxs(i.View,{...u0,onClick:()=>M(re),opacity:K?.4:1,...y==null?void 0:y.legendItem,children:[r.jsx(i.View,{backgroundColor:ee.color,...y0,opacity:K?.3:1}),r.jsx(i.Text,{...b0,textDecoration:K?"line-through":"none",children:re})]},`legend-${ne}`)})})},oe=()=>{if(!L)return null;switch(e){case"bar":return r.jsx(I0,{data:L,width:N,height:U,animationProgress:D,showGrid:c,onBarClick:x,showTooltip:H,hideTooltip:V,views:y});case"line":case"area":return r.jsx(F0,{data:L,width:N,height:U,animationProgress:D,showGrid:c,onPointClick:x,showTooltip:H,hideTooltip:V,views:y});case"pie":case"donut":return r.jsx(z0,{dataPoints:L,width:N,height:U,animationProgress:D,isDonut:e==="donut",onSliceClick:k,showTooltip:H,hideTooltip:V,views:y});default:return null}},B=()=>C?r.jsx(i.View,{...w0,...y==null?void 0:y.loadingOverlay,children:v||r.jsx(i.Center,{children:r.jsx(eo,{size:"lg"})})}):null,$=()=>S?r.jsx(i.View,{...S0,...y==null?void 0:y.errorOverlay,children:b||r.jsx(i.Text,{fontWeight:"medium",children:typeof S=="string"?S:"An error occurred"})}):null,q=()=>w?r.jsx(i.View,{...v0,...y==null?void 0:y.noDataOverlay,children:I||r.jsx(i.Text,{children:typeof w=="string"?w:"No data available"})}):null,J=T??(typeof n=="string"?n:"Chart"),Y=!S&&!C&&!w;return r.jsxs(i.View,{ref:A,role:"region","aria-label":J,"aria-busy":C,...f0,...y==null?void 0:y.container,...E,children:[n&&r.jsx(i.Text,{...m0,children:n}),Y&&l==="top"&&X(),r.jsxs(i.View,{flex:1,width:"100%",position:"relative",...y==null?void 0:y.chart,children:[Y&&oe(),B(),$(),q(),r.jsx(M0,{visible:s&&z.visible,x:z.x,y:z.y,content:z.content,maxDistance:100,views:y})]}),Y&&l==="bottom"&&X()]})},H0=e=>r.jsx(W0,{...e}),j0=(e=365)=>{const[o,t]=h.useState(!1),[n,a]=h.useState(null),l="app-studio-cookie-consent";h.useEffect(()=>{if(typeof localStorage>"u")return;const g=localStorage.getItem(l);a(g!==null?g==="true":!1)},[]);const c=g=>{if(typeof localStorage<"u"){localStorage.setItem(l,String(g));const m=new Date;m.setDate(m.getDate()+e),localStorage.setItem(`${l}-expires`,m.toISOString())}a(g)};return{isHovered:o,setIsHovered:t,hasConsent:n,acceptCookies:()=>{c(!0)},resetConsent:()=>{typeof localStorage<"u"&&(localStorage.removeItem(l),localStorage.removeItem(`${l}-expires`)),a(!1)}}},P0=e=>({default:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",boxShadow:"0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06)"},content:{color:"color-gray-800"},acceptButton:{backgroundColor:"color-blue-500",color:"color-white",hoverBackgroundColor:"color-blue-600"},customizeButton:{backgroundColor:"transparent",color:"color-gray-600",borderColor:"color-gray-300",hoverBackgroundColor:"color-gray-100"}},info:{container:{backgroundColor:"color-blue-50",borderColor:"color-blue-200",boxShadow:"0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06)"},content:{color:"color-blue-800"},acceptButton:{backgroundColor:"color-blue-500",color:"color-white",hoverBackgroundColor:"color-blue-600"},customizeButton:{backgroundColor:"transparent",color:"color-blue-800",borderColor:"color-blue-300",hoverBackgroundColor:"color-blue-100"}},primary:{container:{backgroundColor:"color-blue-50",borderColor:"color-blue-200",boxShadow:"0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06)"},content:{color:"color-blue-700"},acceptButton:{backgroundColor:"color-blue-500",color:"color-white",hoverBackgroundColor:"color-blue-600"},customizeButton:{backgroundColor:"transparent",color:"color-blue-700",borderColor:"color-blue-300",hoverBackgroundColor:"color-blue-100"}}}),V0=({title:e="Nous utilisons des cookies",description:o="Ce site utilise des cookies pour améliorer votre expérience. En continuant à naviguer sur ce site, vous acceptez notre utilisation des cookies conformément à notre politique de confidentialité.",acceptButtonText:t="Accepter",customizeButtonText:n="Personnaliser",position:a="bottom",variant:l="default",onAccept:c,onCustomize:s,views:d,showCustomizeButton:g=!0,cookieExpiration:m=365,themeMode:f,...p})=>{const{themeMode:u}=i.useTheme(),{hasConsent:y,acceptCookies:k}=j0(m),C=P0()[l];if(y)return null;const S=()=>{k(),c&&c()},w=()=>{s&&s()};return r.jsx(i.View,{style:{position:"fixed",left:16,right:16,zIndex:1e3,...a==="bottom"?{bottom:16}:{top:16}},padding:16,borderWidth:"1px",borderStyle:"solid",borderRadius:8,maxWidth:"800px",marginLeft:"auto",marginRight:"auto",transition:"opacity 0.3s ease, transform 0.3s ease",...C.container,...d==null?void 0:d.container,...p,children:r.jsxs(i.Vertical,{gap:12,maxWidth:1200,marginLeft:"auto",marginRight:"auto",children:[e&&r.jsx(i.Text,{fontWeight:"bold",fontSize:18,color:"color-black",...d==null?void 0:d.title,children:e}),o&&r.jsx(i.Text,{fontSize:14,color:"color-black",...d==null?void 0:d.description,children:o}),r.jsxs(i.Horizontal,{gap:12,justifyContent:"flex-end",marginTop:8,...d==null?void 0:d.buttonGroup,children:[g&&r.jsx(de,{variant:"outline",onClick:w,size:"sm",...d==null?void 0:d.customizeButton,children:n}),r.jsx(de,{variant:"filled",onClick:S,size:"sm",...d==null?void 0:d.acceptButton,children:t})]})]})})},A0=e=>r.jsx(V0,{...e}),E0=e=>{const{size:o,variant:t,onOpenChange:n}=e||{},[a,l]=h.useState(!1),[c,s]=h.useState({x:0,y:0}),[d,g]=h.useState(null),m=h.useRef(null),f=h.useRef(null),p=h.useMemo(()=>ct("contextmenu-content"),[]),u=h.useCallback(k=>{s({x:k.clientX,y:k.clientY}),l(!0),n==null||n(!0)},[n]),y=h.useCallback(()=>{l(!1),g(null),n==null||n(!1)},[n]);return h.useEffect(()=>{const k=S=>{f.current&&!f.current.contains(S.target)&&y()},x=()=>{a&&y()},C=S=>{S.key==="Escape"&&a&&y()};if(!(typeof document>"u"||typeof window>"u"))return document.addEventListener("mousedown",k),window.addEventListener("resize",x),document.addEventListener("keydown",C),()=>{document.removeEventListener("mousedown",k),window.removeEventListener("resize",x),document.removeEventListener("keydown",C)}},[a,y]),{isOpen:a,setIsOpen:l,position:c,setPosition:s,activeSubmenuId:d,setActiveSubmenuId:g,size:o,variant:t,triggerRef:m,contentRef:f,contentId:p,openMenu:u,closeMenu:y}},ka={sm:{padding:"6px 8px",fontSize:"14px",minWidth:"160px"},md:{padding:"8px 12px",fontSize:"16px",minWidth:"180px"},lg:{padding:"10px 16px",fontSize:"18px",minWidth:"200px"}},D0={default:{backgroundColor:"color-white",color:"color-gray-800"},filled:{backgroundColor:"color-gray-100",color:"color-gray-800"},outline:{backgroundColor:"color-white",borderWidth:"1px",borderStyle:"solid",borderColor:"color-gray-200",color:"color-gray-800"}},Ca={hover:{backgroundColor:"color-gray-100"}},wa=h.createContext({isOpen:!1,setIsOpen:()=>{},position:{x:0,y:0},setPosition:()=>{},activeSubmenuId:null,setActiveSubmenuId:()=>{},size:"md",variant:"default",triggerRef:{current:null},contentRef:{current:null},contentId:"contextmenu-content",closeMenu:()=>{},openMenu:()=>{}}),$0=({children:e,value:o})=>r.jsx(wa.Provider,{value:o,children:e}),Vr=()=>{const e=h.useContext(wa);if(!e)throw new Error("useContextMenuContext must be used within a ContextMenuProvider");return e},Sa=({children:e,disableNativeContextMenu:o=!0,asChild:t=!1,isDisabled:n=!1,views:a,...l})=>{const{triggerRef:c,contentId:s,openMenu:d}=Vr(),m={ref:c,onContextMenu:f=>{if(!n)if(o&&f.preventDefault(),d)d(f);else{const{setIsOpen:p,setPosition:u}=Vr();u({x:f.clientX,y:f.clientY}),p(!0)}},"aria-controls":s,"aria-haspopup":"menu","data-disabled":n?"":void 0,...t&&h.isValidElement(e)&&e.props.isDisabled===void 0&&{isDisabled:n},...a==null?void 0:a.container,...l};if(t&&h.isValidElement(e)){const f=h.Children.only(e);return h.cloneElement(f,{...m,...f.props})}return r.jsx(i.View,{...m,children:e})},At=({items:e,children:o,position:t,side:n="right",align:a="start",views:l,style:c,...s})=>{const{isOpen:d,position:g,contentRef:m,contentId:f,variant:p}=Vr(),u=h.useRef(null),y=m||u,{ref:k,relation:x}=i.useElementPosition({}),[C,S]=h.useState({x:0,y:0});if(h.useEffect(()=>{if(d&&y.current){const v=t||g,b=y.current.offsetWidth,I=y.current.offsetHeight,T=window.innerWidth,P=window.innerHeight;let E=v.x,D=v.y;x&&(x.space.horizontal==="left"?E=v.x-b:E=v.x,x.space.vertical==="top"?D=v.y-I:D=v.y),E+b>T&&(E=T-b-8),E<8&&(E=8),D+I>P&&(D=P-I-8),D<8&&(D=8),S({x:E,y:D})}},[d,g,t,n,a,y,x]),!d)return null;const w={position:"fixed",top:`${C.y}px`,left:`${C.x}px`,zIndex:1e3,transformOrigin:"top left"};return r.jsxs(i.View,{id:f||"context-menu",ref:y,role:"menu",tabIndex:-1,borderRadius:4,boxShadow:"0px 2px 8px rgba(0, 0, 0, 0.15)",overflow:"hidden",style:{...w,...c},...D0[p],...l==null?void 0:l.menu,...l==null?void 0:l.content,...s,children:[e&&e.map((v,b)=>v.divider?r.jsx(Ta,{views:l},`divider-${b}`):r.jsx(va,{item:v,views:l},v.id)),o]})},va=({item:e,children:o,onSelect:t,isDisabled:n=!1,views:a,variant:l,shape:c,isLoading:s,loaderProps:d,loaderPosition:g,icon:m,iconPosition:f,isFilled:p,isAuto:u,isIconRounded:y,isHovered:k,shadow:x,ariaLabel:C,animation:S,textColor:w,reversed:v,borderMovingDuration:b,borderMovingGradientColors:I,animatedStrokeAccentColor:T,animatedStrokeTextColor:P,to:E,isExternal:D,config:z,...A})=>{const{activeSubmenuId:W,setActiveSubmenuId:H,size:V,closeMenu:j}=Vr();if(e){const[_,O]=h.useState(!1),N=e.items&&e.items.length>0,U=W===e.id,[X,oe]=h.useState({x:0,y:0}),B=e.disabled||n,$=()=>{O(!0),N&&H(e.id)},q=()=>{O(!1)},J=()=>{B||!N&&e.onClick&&(e.onClick(),j&&j())},{ref:Y,relation:Z}=i.useElementPosition({});return h.useEffect(()=>{if(U&&Y.current){const ee=Y.current.getBoundingClientRect(),ne=window.innerWidth,K=200;let re=!1;if(Z)re=Z.space.horizontal==="left";else{const ie=ne-ee.right,ge=ee.left;re=ie<K&&ge>ie}oe({x:re?ee.left-K:ee.right,y:ee.top})}},[U,e.items,Z]),r.jsxs(i.View,{ref:Y,role:"menuitem",display:"flex",alignItems:"center",cursor:B?"not-allowed":"pointer",opacity:B?.5:1,position:"relative","aria-disabled":B,"data-disabled":B?"":void 0,...ka[V],_hover:B?{}:Ca.hover,backgroundColor:_&&!B?"color-gray-100":"transparent",onMouseEnter:$,onMouseLeave:q,onClick:J,...a==null?void 0:a.item,...A,children:[e.icon&&r.jsx(i.View,{marginRight:8,...a==null?void 0:a.icon,children:e.icon}),r.jsx(i.View,{flexGrow:1,children:e.label}),N&&r.jsx(i.View,{marginLeft:8,...a==null?void 0:a.submenuIndicator,children:r.jsx(he,{orientation:"right",widthHeight:16,color:"currentColor",filled:!0})}),U&&N&&r.jsx(At,{items:e.items||[],position:X,side:"right",align:"start",views:a})]})}const M=_=>{n||(t==null||t(_),j&&j())},L=E?{as:"a",href:E,color:"inherit",textDecoration:"none",...D?{target:"_blank",rel:"noopener noreferrer"}:{}}:{};return r.jsx(i.View,{role:"menuitem",onClick:M,cursor:n?"not-allowed":"pointer",opacity:n?.5:1,"aria-disabled":n,"data-disabled":n?"":void 0,...ka[V],_hover:n?{}:Ca.hover,...L,...a==null?void 0:a.item,...A,children:o})},Ta=({views:e,...o})=>r.jsx(i.View,{height:"1px",backgroundColor:"color-gray-200",margin:"4px 0",role:"separator","aria-orientation":"horizontal",...e==null?void 0:e.divider,...o}),L0=({views:e,...o})=>r.jsx(i.View,{height:"1px",backgroundColor:"color-gray-200",margin:"4px 0",role:"separator","aria-orientation":"horizontal",...e==null?void 0:e.separator,...o}),_0=({children:e,items:o,size:t="md",variant:n="default",disableNativeContextMenu:a=!0,views:l,themeMode:c,onOpenChange:s,...d})=>!o||o.length===0?r.jsx(r.Fragment,{children:e}):r.jsxs(r.Fragment,{children:[r.jsx(Sa,{disableNativeContextMenu:a,views:l,...d,children:e}),r.jsx(At,{items:o,views:l})]}),Wo=({children:e,items:o,size:t="md",variant:n="default",disableNativeContextMenu:a=!0,onOpenChange:l,views:c,...s})=>{const d=E0({size:t,variant:n,onOpenChange:l}),{isOpen:g,setIsOpen:m,position:f,setPosition:p,activeSubmenuId:u,setActiveSubmenuId:y,triggerRef:k,contentRef:x,contentId:C,openMenu:S,closeMenu:w}=d;return r.jsx($0,{value:{isOpen:g,setIsOpen:m,position:f,setPosition:p,activeSubmenuId:u,setActiveSubmenuId:y,size:t,variant:n,triggerRef:k,contentRef:x,contentId:C,openMenu:S,closeMenu:w,styles:c},children:r.jsx(_0,{items:o,size:t,variant:n,disableNativeContextMenu:a,views:c,...s,children:e})})};Wo.Trigger=Sa,Wo.Content=At,Wo.Item=va,Wo.Divider=Ta,Wo.Separator=L0;const B0=({src:e,color:o,views:t,themeMode:n,...a})=>{const{getColor:l,themeMode:c}=i.useTheme(),s=o?{fill:l(o,{themeMode:c}),stroke:l(o,{themeMode:c})}:{};return r.jsx(i.View,{display:"flex",alignItems:"center",justifyContent:"center",...a,...t==null?void 0:t.container,children:r.jsx(i.Image,{...s,content:'url("'+e+'")',width:"100%",height:"100%",...t==null?void 0:t.image})})},O0=({path:e,...o})=>r.jsx(i.Image,{src:e,...o}),Ia=(e,o)=>o?Array.isArray(e)?e:e===""?[]:[e]:Array.isArray(e)?e[0]??"":e,Fa=({placeholder:e,isMulti:o,options:t,value:n,defaultValue:a,id:l})=>{const c=h.useId().replace(/[^a-zA-Z0-9_-]/g,""),s=l??`select-${c}`,d=n!==void 0,[g,m]=h.useState(!1),[f,p]=h.useState(!1),[u,y]=h.useState(()=>a!==void 0?Ia(a,o):o?[]:e?"":Array.isArray(t)&&t.length>0?t[0].value:""),k=d?Ia(n,o):u,x=h.useCallback(b=>{d||y(b)},[d]),[C,S]=h.useState(0),[w,v]=h.useState(!0);return{id:s,value:k,setValue:x,hide:w,setHide:v,isHovered:g,setIsHovered:m,isFocused:f,setIsFocused:p,highlightedIndex:C,setHighlightedIndex:S}},Et=({children:e,views:o={helperText:{}},...t})=>r.jsx(i.Text,{fontSize:"11px",fontWeight:"400",letterSpacing:"-0.01em",lineHeight:"16px",marginVertical:0,marginHorizontal:0,color:"color-gray-500",transition:"color 0.2s ease, opacity 0.2s ease",...o.helperText,...t,children:e}),Ue=h.forwardRef(({children:e,helperText:o,error:t=!1,views:n,...a},l)=>r.jsxs(i.Vertical,{ref:l,gap:4,position:"relative",width:"100%",boxSizing:"border-box",marginVertical:0,...a,...n==null?void 0:n.container,children:[e,!t&&o&&r.jsx(Et,{marginTop:0,...n==null?void 0:n.helperText,children:o}),t&&r.jsx(i.Text,{fontSize:"11px",lineHeight:"16px",marginTop:0,marginHorizontal:0,fontWeight:"500",color:"color-red-500",transition:"color 0.2s ease, opacity 0.2s ease",...n==null?void 0:n.error,children:t})]}));Ue.displayName="FieldContainer";const N0={default:{borderRadius:"8px"},square:{borderRadius:0},rounded:{borderRadius:"8px"},pill:{borderRadius:"9999px"}},q0={xs:"10px",sm:"11px",md:"11px",lg:"12px",xl:"12px"},U0={outline:{borderWidth:"1px",borderStyle:"solid",borderColor:"color-gray-200",backgroundColor:"transparent",color:"inherit",transition:"border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease",_hover:{borderColor:"color-gray-300"},_focus:{borderColor:"theme-primary",outline:"none",boxShadow:"0 0 0 3px theme-primary"},_focusVisible:{borderColor:"theme-primary",outline:"none",boxShadow:"0 0 0 3px theme-primary"}},default:{borderWidth:"1px",borderStyle:"solid",borderColor:"color-gray-200",borderRadius:"8px",backgroundColor:"transparent",color:"inherit",transition:"border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease",_hover:{borderColor:"color-gray-300"},_focus:{borderColor:"theme-primary",outline:"none",boxShadow:"0 0 0 3px theme-primary"},_focusVisible:{borderColor:"theme-primary",outline:"none",boxShadow:"0 0 0 3px theme-primary"}},none:{border:"none",style:{backgroundColor:"transparent"},color:"inherit",transition:"background-color 0.2s ease"}},G0={xs:{minHeight:24,paddingVertical:4,paddingHorizontal:10},sm:{minHeight:32,paddingVertical:7,paddingHorizontal:10},md:{minHeight:40,paddingVertical:9,paddingHorizontal:12},lg:{minHeight:48,paddingVertical:11,paddingHorizontal:14},xl:{minHeight:56,paddingVertical:13,paddingHorizontal:16}},Y0=e=>{const{minHeight:o,paddingVertical:t,paddingHorizontal:n}=G0[e];return{minHeight:`${o}px`,paddingTop:`${t}px`,paddingBottom:`${t}px`,paddingLeft:`${n}px`,paddingRight:`${n}px`}},oo=({label:e,shadow:o,children:t,value:n,size:a="md",shape:l="default",variant:c="default",error:s=!1,showLabel:d=!1,isFocused:g=!1,isHovered:m=!1,isDisabled:f=!1,isReadOnly:p=!1,views:u={pickerBox:{}},...y})=>{const{themeMode:k}=i.useTheme(),x=k==="dark",S=s?"color-red-500":(m||g)&&!f?"theme-primary":"color-gray-200";return r.jsx(i.Horizontal,{gap:8,width:"100%",boxSizing:"border-box",display:"flex",flexWrap:"nowrap",alignItems:"center",justifyContent:"flex-start",borderStyle:"solid",borderColor:S,backgroundColor:x?"color-gray-900":"color-white",fontSize:i.Typography.fontSizes[a],cursor:f?"not-allowed":p?"auto":"text",opacity:f?.7:1,transition:"border-color 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease",...Y0(a),...typeof o=="object"&&o!==null?o:{},...N0[l],...U0[c],...u==null?void 0:u.container,...y,children:t})},Zo=({children:e,...o})=>r.jsx(i.Horizontal,{gap:10,right:10,zIndex:500,flexWrap:"nowrap",alignItems:"center",justifyContent:"flex-end",...o,children:e}),K0={h1:{fontSize:96,letterSpacing:-1.5},h2:{fontSize:60,letterSpacing:-.5},h3:{fontSize:48,letterSpacing:0},h4:{fontSize:34,letterSpacing:.25},h5:{fontSize:24,letterSpacing:0},h6:{fontSize:20,letterSpacing:.15}},X0=({children:e,heading:o,isItalic:t=!1,isUnderlined:n=!1,isStriked:a=!1,weight:l="normal",size:c="sm",dropDown:s,error:d,isDisabled:g,helperText:m,views:f,...p})=>{const u=o?K0[o]:{};return r.jsx(i.Element,{as:"label",width:"100%",fontSize:c,fontStyle:t?"italic":"normal",fontWeight:i.Typography.fontWeights[l],textDecoration:a?"line-through":n?"underline":"none",...d?{color:"color-red-500"}:g?{color:"color-gray-400"}:{},...g?{cursor:"not-allowed"}:{},...u,...p,children:e})},Ro=e=>r.jsx(X0,{...e}),ho=({children:e,size:o="md",error:t=!1,color:n="theme-primary",views:a={label:{}},helperText:l,...c})=>r.jsx(Ro,{position:"static",fontSize:q0[o],letterSpacing:"-0.01em",whiteSpace:"nowrap",fontWeight:500,color:t?"color-red-500":"inherit",transition:"color 0.2s ease",...a.label,...c,children:e}),Ho=({children:e,...o})=>r.jsx(i.Vertical,{display:"flex",flexDirection:"column",gap:4,flex:1,width:"100%",maxWidth:"100%",boxSizing:"border-box",...o,children:e}),za={xs:12,sm:14,md:16,lg:18,xl:20},J0={maxHeight:"280px",overflowY:"auto",zIndex:1e3,backgroundColor:"color-white",borderRadius:12,borderWidth:"1px",borderStyle:"solid",borderColor:"color-gray-200",boxShadow:"0 4px 12px rgba(0, 0, 0, 0.1)"},Q0={enter:{opacity:1,transform:"translateY(0) scale(1)",transition:"all 0.2s ease-in-out"}},Z0={padding:"10px 12px",cursor:"pointer",borderRadius:8,margin:"2px 4px",transition:"all 0.15s ease-in-out"},Ar={default:{},highlighted:{backgroundColor:"color-gray-100"},selected:{backgroundColor:"color-gray-100"},selectedHighlighted:{backgroundColor:"color-gray-200"}},Ma={open:{transform:"rotate(180deg)",transition:"all 0.2s ease-in-out"},closed:{transform:"rotate(0deg)",transition:"all 0.2s ease-in-out"}},R0={padding:"4px 8px",borderRadius:8,backgroundColor:"color-gray-100",fontSize:"12px",fontWeight:"500",color:"color-gray-700",transition:"all 0.15s ease-in-out"},eg={scrollbarWidth:"thin",scrollbarColor:"rgba(0, 0, 0, 0.15) transparent"},og=e=>{if(!e)return{};const{container:o,content:t,...n}=e;return n},rg=({isHovered:e,setIsHovered:o=()=>{},option:t,size:n="md",callback:a=()=>{},style:l,isSelected:c=!1,...s})=>{const d=(f,p)=>{f.stopPropagation(),f.preventDefault(),typeof a=="function"&&a(p)},g=()=>o(!e),m=()=>c&&e?Ar.selectedHighlighted:c?Ar.selected:e?Ar.highlighted:Ar.default;return r.jsxs(i.Element,{as:"li",role:"option","aria-selected":c,display:"flex",alignItems:"center",justifyContent:"space-between",listStyleType:"none",...Z0,...m(),onMouseEnter:g,onMouseLeave:g,onClick:f=>d(f,t.value),...s,children:[r.jsx(i.Text,{fontSize:i.Typography.fontSizes[n],fontWeight:c?"500":"400",lineHeight:"14px",color:c?"color-gray-900":"color-gray-700",...l,children:t.label}),c&&r.jsx(i.Element,{as:"span",color:"theme-primary",fontSize:"14px",marginLeft:8,display:"flex",alignItems:"center",children:"✓"})]})},tg=({size:e="md",views:o={field:{},text:{}},value:t,isDisabled:n,placeholder:a,removeOption:l=()=>{},options:c})=>{const s=(o==null?void 0:o.field)||{},d=(o==null?void 0:o.text)||{},g=Array.isArray(t)&&t.length>0,m={margin:0,width:"95%",height:"100%",border:"none",paddingVertical:0,paddingHorizontal:0,fontSize:i.Typography.fontSizes[e],fontWeight:"400",letterSpacing:"-0.01em",color:n?"color-gray-400":"color-gray-900",cursor:n?"not-allowed":"pointer",transition:"all 0.2s ease-in-out",...g?{}:{maxLines:1,minWidth:0},...s,...d,style:{backgroundColor:"transparent",...s.style,...d.style}},f=c.length>0&&c.find(p=>p.value===t);return r.jsx(i.Text,{...m,children:(t===""||Array.isArray(t)&&t.length===0)&&a?a:r.jsx(r.Fragment,{children:typeof t=="string"?(f&&f.label)??t:Array.isArray(t)&&t.length>0?r.jsx(i.Horizontal,{gap:6,children:t.map(p=>r.jsx(lg,{option:p,removeOption:l},p))}):r.jsx("span",{children:t})})})},ng=({id:e,name:o,value:t,onChange:n,isMulti:a=!1,isDisabled:l=!1,isReadOnly:c=!1,options:s=[],defaultValue:d,...g})=>{const m=f=>{n&&n(a?Array.from(f.target.selectedOptions,p=>p.value):f.target.value)};return r.jsx(i.Element,{id:e,name:o,as:"select",opacity:0,width:1,height:1,overflow:"hidden",position:"absolute",pointerEvents:"none",tabIndex:-1,"aria-hidden":"true",value:t,disabled:l,readOnly:c,onChange:m,multiple:a,...g,children:s.length>0&&s.map(f=>r.jsx("option",{value:f.value,children:f.label},f.value))})},ag=({size:e,views:o={},options:t,callback:n=()=>{},highlightedIndex:a,setHighlightedIndex:l=()=>{},selectedValue:c,listboxId:s,getOptionId:d})=>{const g=f=>n(f),m=f=>Array.isArray(c)?c.includes(f):c===f;return r.jsx(i.Element,{as:"ul",role:"listbox",id:s,display:"flex",flexDirection:"column",margin:0,padding:"4px",...J0,style:eg,...o==null?void 0:o.dropDown,children:t&&t.length>0&&t.map((f,p)=>r.jsx(rg,{id:d?d(p):void 0,size:e,style:o.text,option:f,callback:g,isSelected:m(f.value),isHovered:p===a,setIsHovered:()=>{},onMouseEnter:()=>l(p)},f.value))})},lg=({option:e,size:o="md",removeOption:t=()=>{},...n})=>{const a=()=>t(e);return r.jsxs(i.Horizontal,{gap:6,alignItems:"center",onClick:l=>l.stopPropagation(),...R0,_hover:{backgroundColor:"color-gray-200"},...n,children:[r.jsx(i.Text,{fontSize:i.Typography.fontSizes[o],fontWeight:"500",color:"color-gray-700",children:e}),r.jsx(i.Element,{as:"button",type:"button","aria-label":`Remove ${e}`,onClick:a,display:"flex",alignItems:"center",justifyContent:"center",padding:0,border:"none",backgroundColor:"transparent",color:"color-gray-500",cursor:"pointer",transition:"all 0.2s ease-in-out",_hover:{color:"color-gray-700"},children:r.jsx(He,{color:"inherit",widthHeight:za[o]})})]})},Wa=({id:e,name:o,label:t,value:n,placeholder:a,helperText:l,hide:c=!1,error:s=!1,isMulti:d=!1,isFocused:g=!1,isHovered:m=!1,isDisabled:f=!1,isReadOnly:p=!1,isRequired:u=!1,isAutoFocus:y=!1,options:k=[],shadow:x={},size:C="md",shape:S="default",variant:w="default",views:v={text:{},icon:{},dropDown:{},selectBox:{},label:{},helperText:{}},onChange:b=()=>{},setHide:I=()=>{},setValue:T=()=>{},setIsHovered:P=()=>{},setIsFocused:E=()=>{},setHighlightedIndex:D,highlightedIndex:z,isScrollable:A,"aria-label":W,...H})=>{const V=h.useId(),j=e??`select-${V.replace(/[^a-zA-Z0-9_-]/g,"")}`,M=`${j}-native`,L=`${j}-label`,_=`${j}-listbox`,O=K=>`${j}-option-${K}`,{ref:N,relation:U,updateRelation:X}=i.useElementPosition({trackChanges:!0,trackOnScroll:!0,trackOnResize:!0,throttleMs:10}),oe=h.useRef(null),B=()=>{var ge;if(!N.current)return{};const K=N.current.getBoundingClientRect(),re={position:"fixed",left:K.left,width:K.width,zIndex:1e4};return((ge=U==null?void 0:U.space)==null?void 0:ge.vertical)==="top"?{...re,bottom:window.innerHeight-K.top+8}:{...re,top:K.bottom+8}};h.useEffect(()=>{const K=()=>I(!0);return document.addEventListener("closeAllSelects",K),()=>document.removeEventListener("closeAllSelects",K)},[I]),h.useEffect(()=>{var K;y&&!f&&!p&&((K=N.current)==null||K.focus())},[]),h.useEffect(()=>{const K=re=>{!re.target.closest(`#${j}`)&&!c&&I(!0)};return document.addEventListener("click",K),()=>{document.removeEventListener("click",K)}},[j,c,I]);const $=()=>P(!m),q=()=>E(!0),J=K=>{document.dispatchEvent(new Event("closeAllSelects")),K&&K.stopPropagation&&K.stopPropagation();const re=!c;I(re),E(!re)},Y=h.useCallback(K=>{if(I(!0),document.dispatchEvent(new Event("closeAllSelects")),d&&Array.isArray(n)){if(!n.includes(K)){const re=[...n,K];T(re),b&&b(re)}}else T(K),b&&b(K);E(!0)},[d,n,I,T,b,E]),Z=K=>{if(Array.isArray(n)&&n.includes(K)){const re=n.filter(ie=>ie!==K);T(re),b&&b(re)}},ee=!!t,ne=og(v);return r.jsx(Ue,{ref:N,position:"relative",width:"100%",display:"inline-block",id:j,role:"combobox","aria-haspopup":"listbox","aria-expanded":!c,"aria-labelledby":!W&&ee?L:void 0,"aria-label":W,"aria-controls":_,"aria-activedescendant":!c&&k.length>0?O(z??0):void 0,"aria-disabled":f||void 0,"aria-required":u||void 0,tabIndex:f||p?-1:0,helperText:l,error:s,views:ne,onKeyDown:K=>{if(f||p||K.target!==K.currentTarget)return;if(c){(K.key==="Enter"||K.key===" "||K.key==="ArrowDown")&&(K.preventDefault(),document.dispatchEvent(new Event("closeAllSelects")),I(!1),E(!0));return}const re=z??0;if(K.key==="ArrowDown")K.preventDefault(),D==null||D(Math.min(re+1,k.length-1));else if(K.key==="ArrowUp")K.preventDefault(),D==null||D(Math.max(re-1,0));else if(K.key==="Enter"){K.preventDefault();const ie=k[re];ie&&Y(ie.value)}else K.key==="Escape"&&(K.preventDefault(),I(!0))},onClick:K=>{K.stopPropagation(),f||p||J(K)},children:r.jsxs(oo,{label:t,size:C,error:s,shape:S,views:v,shadow:x,variant:w,value:n,color:"theme-primary",isHovered:m,isDisabled:f,isReadOnly:p,isFocused:g,showLabel:ee,onMouseEnter:$,onMouseLeave:$,position:"relative",...v==null?void 0:v.content,children:[r.jsxs(Ho,{children:[ee&&r.jsx(ho,{id:L,htmlFor:M,color:"theme-primary",error:s,...v==null?void 0:v.label,children:t}),r.jsx(ng,{id:M,name:o,options:k,onChange:b,value:n,isDisabled:f,isReadOnly:p,isMulti:d,required:u||void 0,onFocus:q,...H}),r.jsx(tg,{options:k,size:C,views:v,value:n,isDisabled:f,placeholder:a,removeOption:Z})]}),r.jsx(Zo,{children:!p&&!f&&r.jsx(i.Element,{display:"flex",alignItems:"center",justifyContent:"center",style:c?Ma.closed:Ma.open,children:r.jsx(he,{color:"inherit",widthHeight:za[C],style:v.icon,orientation:"down"})})}),!c&&k.length>0&&r.jsx(ft,{children:r.jsx(i.Element,{ref:oe,onClick:K=>K.stopPropagation(),style:{...B(),...Q0.enter},children:r.jsx(ag,{size:C,views:v,options:k,callback:Y,highlightedIndex:z,setHighlightedIndex:D,selectedValue:n,listboxId:_,getOptionId:O})})})]})})},er=e=>{const o=pe("select",e),t={...o,options:o.options||[]},n=Fa(t);return r.jsx(Wa,{...n,...t,value:n.value,onClick:a=>{a.stopPropagation(),o.onClick&&o.onClick(a)}})},Ha=({isDisabled:e,isChecked:o})=>{const[t,n]=h.useState(!1),[a,l]=h.useState(o||!1),[c,s]=h.useState(o||!1);return h.useEffect(()=>{o!==void 0&&(l(o),s(o))},[o]),{isHovered:t,setIsHovered:n,on:a,setOn:l,value:c,setValue:s}},ja={xs:{height:"10px",width:"10px"},sm:{height:"14px",width:"14px"},md:{height:"18px",width:"18px"},lg:{height:"22px",width:"22px"},xl:{height:"26px",width:"26px"}},ig={xs:{height:"20px",width:"40px"},sm:{height:"24px",width:"48px"},md:{height:"28px",width:"56px"},lg:{height:"32px",width:"64px"},xl:{height:"36px",width:"72px"}},cg={xs:{height:"22px",width:"52px"},sm:{height:"26px",width:"62px"},md:{height:"30px",width:"72px"},lg:{height:"34px",width:"84px"},xl:{height:"38px",width:"96px"}},sg={xs:"9px",sm:"10px",md:"11px",lg:"12px",xl:"13px"},Er={xs:{paddingVertical:5,paddingHorizontal:3},sm:{paddingVertical:5,paddingHorizontal:3},md:{paddingVertical:5,paddingHorizontal:5},lg:{paddingVertical:5,paddingHorizontal:5},xl:{paddingVertical:5,paddingHorizontal:5}},Ge={default:{active:"theme-primary",inactive:"color-gray-300",knob:"color-white",disabled:"color-gray-200"},states:{hover:{active:"theme-primary",inactive:"color-gray-400",activeOpacity:.9},focus:{active:{outline:"none",boxShadow:"0 0 0 2px white, 0 0 0 4px theme-primary"},inactive:{outline:"none",boxShadow:"0 0 0 2px white, 0 0 0 4px color-gray-200"}}}},Pa={slider:{transition:"all 0.2s ease-in-out"},knob:{transition:"all 0.2s ease-in-out"}},dg=e=>r.jsx(i.Input,{type:"checkbox",...e}),Va=({id:e,name:o,label:t,inActiveChild:n,isChecked:a,activeChild:l,labelPosition:c="right",shadow:s={},size:d="sm",value:g=!1,isHovered:m=!1,isDisabled:f=!1,isReadOnly:p=!1,on:u,setOn:y=()=>{},onChange:k,setValue:x=()=>{},setIsHovered:C=()=>{},helperText:S,description:w,views:v={slider:{},circle:{},label:{}},...b})=>{const I=h.useId(),T=e??I,[P,E]=h.useState(!1),D=typeof a=="boolean"?a:g,A=!!(l||n)?cg[d]:ig[d],W=`${Er[d].paddingHorizontal}px`,H=`${Er[d].paddingHorizontal+2}px`,V=`calc(${ja[d].width} + ${Er[d].paddingHorizontal}px + 4px)`,j=sg[d],M=B=>{if(!p&&!f){const $=B.target.checked;x($),y($),k&&k($)}},L=()=>C(!0),_=()=>C(!1),O=B=>{let $=!0;try{$=B.target.matches(":focus-visible")}catch{}E($)},N=()=>E(!1),U=`${T}-description`,X={container:{gap:12,display:"flex",height:"fit-content",width:"fit-content",alignItems:"center",cursor:f?"not-allowed":p?"default":"pointer",opacity:f?.6:1,transition:"all 0.2s ease-in-out",...v.label}},oe=r.jsxs(Ro,{htmlFor:T,onMouseEnter:L,onMouseLeave:_,...X.container,children:[c==="left"&&t&&r.jsx(i.Text,{fontWeight:"500",color:f?"color-gray-400":"inherit",transition:"color 0.2s ease, opacity 0.2s ease",children:t}),r.jsxs(i.View,{display:"flex",alignItems:"center",justifyContent:"center",position:"relative",marginBottom:4,borderRadius:"9999px",backgroundColor:f?Ge.default.disabled:D?m?Ge.states.hover.active:Ge.default.active:m?Ge.states.hover.inactive:Ge.default.inactive,opacity:!f&&D&&m?Ge.states.hover.activeOpacity:1,cursor:"pointer",...Pa.slider,...s,...Er[d],...A,...v.slider,...P?D?Ge.states.focus.active:Ge.states.focus.inactive:{},children:[r.jsx(dg,{id:T,name:o,role:"switch","aria-checked":D,position:"absolute",top:0,left:0,width:"100%",height:"100%",margin:0,opacity:0,zIndex:2,cursor:f?"not-allowed":p?"default":"pointer",checked:D,onChange:M,onFocus:O,onBlur:N,disabled:f,readOnly:p,"aria-describedby":w?U:void 0,...b}),l&&D&&r.jsx(i.View,{marginLeft:H,marginRight:V,transition:"all 0.2s ease-in-out",display:"flex",alignItems:"center",justifyContent:"center",height:"100%",width:"100%",overflow:"hidden",fontSize:j,color:"color-white",fontWeight:600,children:l}),r.jsx(i.View,{position:"absolute",top:"50%",left:D?void 0:W,right:D?W:void 0,borderRadius:"50%",backgroundColor:Ge.default.knob,boxShadow:m?"0 4px 10px rgba(15, 23, 42, 0.18)":"0 1px 3px rgba(15, 23, 42, 0.18)",transform:`translateY(-50%) ${m?"scale(1.05)":"scale(1)"}`,...Pa.knob,zIndex:1,...ja[d],...v.circle}),n&&!D&&r.jsx(i.View,{marginLeft:V,marginRight:H,transition:"all 0.2s ease-in-out",display:"flex",alignItems:"center",justifyContent:"center",height:"100%",width:"100%",overflow:"hidden",fontSize:j,color:"color-white",fontWeight:600,children:n})]}),c==="right"&&t&&r.jsx(i.Text,{fontWeight:"500",color:f?"color-gray-400":"inherit",transition:"all 0.2s ease-in-out",children:t})]});return w?r.jsxs(i.Vertical,{gap:4,width:"fit-content",children:[oe,r.jsx(i.Text,{id:U,color:"color-gray-500",fontSize:"14px",lineHeight:"20px",children:w})]}):oe},Dt=e=>{const o=pe("switch",e),t=Ha(o);return r.jsx(Va,{...t,...o})},Aa=({placeholder:e,isMulti:o,options:t,id:n})=>{const a=h.useId().replace(/[^a-zA-Z0-9_-]/g,""),l=n??`selector-${a}`,c=e?o?[]:"":Array.isArray(t)&&t.length>0?t[0].value:o?[]:"",[s,d]=h.useState(!1),[g,m]=h.useState(!1),[f,p]=h.useState(c),[u,y]=h.useState(!0);return{id:l,value:f,setValue:p,hide:u,setHide:y,isHovered:s,setIsHovered:d,isFocused:g,setIsFocused:m}},Ea=({id:e,name:o,label:t,value:n,views:a={},options:l=[],helperText:c,error:s=!1,isDisabled:d=!1,isReadOnly:g=!1,onChange:m=()=>{},setValue:f=()=>{},hide:p,setHide:u,isHovered:y,setIsHovered:k,isFocused:x,setIsFocused:C,placeholder:S,isMulti:w,shape:v,variant:b,size:I,shadow:T,isScrollable:P,"aria-label":E,...D})=>{const z=h.useId(),A=e??z,W=`${A}-label`,H=`${A}-helper-text`,V=!!c,j=h.useCallback(M=>{d||g||(f(M.value),m&&m(M.value))},[f,m,d,g]);return r.jsxs(Ue,{id:A,width:"100%",views:a,...D,children:[t&&r.jsxs(i.Horizontal,{fontSize:"10px",letterSpacing:"wider",color:"color-black-500",fontWeight:"bold",marginBottom:12,alignItems:"center",gap:6,style:{textTransform:"uppercase"},children:[r.jsx(Re,{widthHeight:14})," ",r.jsx(i.Text,{id:W,children:t})]}),r.jsx(i.Horizontal,{gap:0,role:"radiogroup","aria-labelledby":!E&&t?W:void 0,"aria-label":E,"aria-describedby":V?H:void 0,"aria-readonly":g||void 0,"aria-invalid":s?!0:void 0,children:l.map((M,L,_)=>{const O=n===M.value,N=M.color??"theme-primary",U=O?N:"color-gray-200",X=O?N:"color-gray-500",oe=L===0,B=L===_.length-1,$=B||O;return r.jsx(i.View,{as:"button",type:"button",role:"radio","aria-checked":O,disabled:d,onClick:()=>j(M),flex:1,minWidth:0,whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",textAlign:"center",paddingVertical:6,paddingHorizontal:12,fontSize:"12px",fontWeight:O?"bold":"normal",cursor:d?"not-allowed":g?"default":"pointer",backgroundColor:"transparent",color:X,borderStyle:"solid",borderColor:U,borderTopWidth:1,borderBottomWidth:1,borderLeftWidth:1,borderRightWidth:$?1:0,borderRadius:oe?"6px 0 0 6px":B?"0 6px 6px 0":"0",zIndex:O?1:0,transition:"color 0.15s ease, border-color 0.15s ease, background-color 0.15s ease",...a.item,children:M.label},M.value)})}),r.jsx("input",{type:"hidden",id:`${A}-input`,name:o,value:Array.isArray(n)?n.join(","):n,onChange:()=>{}}),V&&r.jsx(i.Text,{id:H,fontSize:"11px",lineHeight:"16px",marginTop:0,fontWeight:s?"500":"400",color:s?"color-red-500":"color-gray-500",transition:"color 0.2s ease, opacity 0.2s ease",...a.helperText,children:c})]})},gg=e=>{const o={...e,options:e.options||[]},t=Aa(o);return r.jsx(Ea,{...t,...o,onClick:n=>{n.stopPropagation(),e.onClick&&e.onClick(n)}})},Da=({label:e,placeholder:o,value:t})=>{const[n,a]=h.useState(e??o),[l,c]=h.useState(!1),[s,d]=h.useState(t||""),[g,m]=h.useState(!1);return h.useMemo(()=>{a(g&&!s?o??"":e??o)},[s,g,e,o]),{hint:n,setHint:a,isHovered:l,setIsHovered:c,value:s,setValue:d,isFocused:g,setIsFocused:m}},hg=e=>{if(!e)return{};const{container:o,content:t,...n}=e;return n},fg=(e,o)=>{if(o!=="pill")return e;if(typeof e=="number")return Math.min(e,28);if(typeof e=="string"){const t=Number.parseFloat(e);if(Number.isFinite(t)&&e.trim().endsWith("px"))return`${Math.min(t,28)}px`}return"28px"},$a=({id:e,name:o,hint:t,error:n,value:a,label:l,shadow:c,helperText:s,placeholder:d,size:g="sm",shape:m="default",variant:f="default",isHovered:p=!1,isFocused:u=!1,isEditable:y=!0,isReadOnly:k=!1,isDisabled:x=!1,isAutoFocus:C=!1,isRequired:S,required:w,labelProps:v,maxRows:b=3,maxCols:I=30,onBlur:T=()=>{},onChange:P,onFocus:E,setHint:D=()=>{},setValue:z=()=>{},setIsFocused:A=()=>{},setIsHovered:W=()=>{},onChangeText:H,inputRef:V,views:j={label:{},helperText:{}},...M})=>{const L=h.useId(),_=e??L,O=!!l,N={xs:{minHeight:"72px",shellPaddingY:6,shellPaddingX:10,fontSize:12,lineHeight:"16px"},sm:{minHeight:"88px",shellPaddingY:8,shellPaddingX:10,fontSize:12,lineHeight:"16px"},md:{minHeight:"104px",shellPaddingY:10,shellPaddingX:12,fontSize:14,lineHeight:"20px"},lg:{minHeight:"120px",shellPaddingY:12,shellPaddingX:14,fontSize:16,lineHeight:"24px"},xl:{minHeight:"136px",shellPaddingY:14,shellPaddingX:16,fontSize:18,lineHeight:"28px"}},U=(j==null?void 0:j.field)||{},X=(j==null?void 0:j.container)||{},oe=fg(X.borderRadius,m),B={...j,container:{...X,...oe!==void 0?{borderRadius:oe}:{},overflow:"hidden"}},$=hg(j),q={margin:0,paddingVertical:0,paddingHorizontal:0,width:"100%",minHeight:N[g].minHeight,maxHeight:"calc(100vh - 100px)",border:"none",on:{focus:{outline:"none"}},fontSize:N[g].fontSize,letterSpacing:"-0.01em",fontWeight:400,color:x?"color-gray-400":"color-gray-900",cursor:x?"not-allowed":"text",opacity:x?.7:1,transition:"color 0.2s ease, opacity 0.2s ease",...U,style:{backgroundColor:"transparent",...U.style}},J=()=>{A(!0),E&&E()},Y=ee=>{T(ee),A(!1)},Z=ee=>{const ne=typeof ee=="string"?ee:ee.target.value;z(ne),H&&H(ne),P&&P(ne)};return r.jsx(Ue,{helperText:s,error:n,views:$,children:r.jsx(oo,{label:l,size:g,error:n,shape:m,views:B,shadow:c,variant:f,value:a,color:"theme-primary",isHovered:p,isDisabled:x,isReadOnly:k,isFocused:u,showLabel:O,alignItems:"flex-start",minHeight:N[g].minHeight,paddingTop:N[g].shellPaddingY,paddingBottom:N[g].shellPaddingY,paddingLeft:N[g].shellPaddingX,paddingRight:N[g].shellPaddingX,onMouseEnter:()=>W(!0),onMouseLeave:()=>W(!1),...B==null?void 0:B.content,children:r.jsxs(Ho,{...j==null?void 0:j.warper,children:[O&&r.jsx(ho,{htmlFor:_,color:"theme-primary",error:n,...v,...j==null?void 0:j.label,children:l}),r.jsx(i.Element,{ref:V,as:"textarea",id:_,name:o,rows:b,cols:I,value:a,readOnly:k||!y,disabled:x,autoFocus:C,...S??w?{required:!0,"aria-required":!0}:{},placeholder:d||t,onBlur:Y,onFocus:J,onChange:ee=>Z(ee),...q,...M,style:{resize:x||k||!y?"none":"vertical",...q.style,...M.style||{}},...j==null?void 0:j.textarea})]})})})},$t=e=>{const o=pe("textarea",e),t=Da(o);return r.jsx($a,{...t,...o})},Lt=({label:e,placeholder:o,value:t})=>{const[n,a]=h.useState(e??o),[l,c]=h.useState(!1),[s,d]=h.useState(!1),[g,m]=h.useState(t);return h.useMemo(()=>{a(l&&!g?o??"":e??o)},[g,l,e,o]),{hint:n,setHint:a,isFocused:l,setIsFocused:c,isHovered:s,setIsHovered:d,setValue:m,value:g}},or=({id:e,name:o,label:t,hint:n,value:a,onChange:l,left:c,right:s,helperText:d,placeholder:g,onChangeText:m,shadow:f={},views:p={container:{},field:{},label:{},helperText:{},text:{}},size:u="md",shape:y="default",variant:k="default",error:x=!1,isFocused:C=!1,isHovered:S=!1,isDisabled:w=!1,isReadOnly:v=!1,isClearable:b=!0,isAutoFocus:I=!1,isRequired:T,required:P,labelProps:E,leftIcon:D,rightIcon:z,setHint:A=()=>{},setIsFocused:W=()=>{},setIsHovered:H=()=>{},setValue:V=()=>{},onClick:j=()=>{},onFocus:M,onBlur:L=()=>{},themeMode:_,inputRef:O,...N})=>{const U=h.useId(),X=e??U,{getColor:oe,themeMode:B}=i.useTheme(),$=oe(w?"color-gray-400":"color-gray-500",{themeMode:_||B}),q=!!t,J={xs:{minHeight:24,shellPaddingY:6,shellPaddingX:10,fontSize:12,lineHeight:"16px"},sm:{minHeight:32,shellPaddingY:8,shellPaddingX:10,fontSize:12,lineHeight:"16px"},md:{minHeight:40,shellPaddingY:10,shellPaddingX:12,fontSize:14,lineHeight:"20px"},lg:{minHeight:48,shellPaddingY:12,shellPaddingX:14,fontSize:16,lineHeight:"24px"},xl:{minHeight:56,shellPaddingY:14,shellPaddingX:16,fontSize:18,lineHeight:"28px"}},Y=(p==null?void 0:p.field)||{},Z="0 0 0 1000px var(--theme-canvas) inset",ee={margin:0,paddingVertical:0,paddingHorizontal:0,width:"100%",minHeight:"auto",border:"none",backgroundColor:"transparent",fontSize:J[u].fontSize,letterSpacing:"-0.01em",fontWeight:400,color:w?"color-gray-400":"color-gray-900",cursor:w?"not-allowed":"text",opacity:w?.7:1,transition:"color 0.2s ease, opacity 0.2s ease",_focus:{outline:"none",_placeholder:{opacity:.7}},_placeholder:{color:"color-gray-400",opacity:1,transition:"opacity 0.2s ease-out"},_selection:{backgroundColor:"color-mix(in srgb, var(--theme-primary) 20%, transparent)"},_webkitAutofill:{boxShadow:Z,WebkitBoxShadow:Z,WebkitTextFillColor:"var(--theme-text)",transition:"background-color 5000s ease-in-out 0s"},_webkitContactsAutoFillButton:{visibility:"hidden",pointerEvents:"none",position:"absolute",right:0},...Y},ne=()=>{W(!0),M&&M()},K=()=>H(!0),re=()=>H(!1),ie=ce=>{L&&L(ce),W(!1)},ge=ce=>{typeof ce=="string"?(V(ce),m&&m(ce),l&&l(ce)):(V(ce.target.value),m&&m(ce.target.value),l&&l(ce.target.value))},We=()=>{V(""),m&&m(""),l&&l(""),L({target:{name:o}})},{container:le,content:te,...ae}=p||{};return r.jsx(Ue,{helperText:d,error:x,views:ae,children:r.jsxs(oo,{label:t,size:u,error:x,shape:y,views:p,shadow:f,variant:k,value:a,color:"theme-primary",isHovered:S,isDisabled:w,isReadOnly:v,isFocused:C,showLabel:q,onMouseEnter:K,onMouseLeave:re,children:[c,D&&r.jsx(Zo,{children:D}),r.jsxs(Ho,{children:[q&&r.jsx(ho,{htmlFor:X,color:"theme-primary",error:x,...E,...p==null?void 0:p.label,children:t}),r.jsx(i.Input,{ref:O,type:"text",id:X,name:o,readOnly:v,disabled:w,autoFocus:I,...T??P?{required:!0,"aria-required":!0}:{},placeholder:g||n,onFocus:ne,onBlur:ie,autoComplete:"off",...ee,...N,onChange:ge,value:a})]}),b&&a&&!v&&!w&&r.jsx(Zo,{children:r.jsx(He,{size:20,color:$,onClick:We,cursor:"pointer",borderRadius:"50%",transition:"background-color 0.2s ease, transform 0.2s ease",_hover:{backgroundColor:"color-gray-100",transform:"scale(1.05)"},_active:{transform:"scale(0.95)"}})}),z&&r.jsx(Zo,{children:z}),s]})})},je=e=>{const o=pe("input",e),t=Lt(o);return r.jsx(or,{...t,...o})},La=({defaultIsSelected:e=!1})=>{const[o,t]=h.useState(!1),[n,a]=h.useState(e);return{isHovered:o,setIsHovered:t,isSelected:n,setIsSelected:a}},mg={xs:{height:"12px",width:"12px"},sm:{height:"16px",width:"16px"},md:{height:"20px",width:"20px"},lg:{height:"24px",width:"24px"},xl:{height:"28px",width:"28px"}},_a={xs:10,sm:14,md:16,lg:20,xl:24},pg={selected:{backgroundColor:"theme-primary",borderColor:"theme-primary",borderWidth:"2px",borderStyle:"solid",color:"color-white",transition:"background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease"},unselected:{backgroundColor:"transparent",borderWidth:"2px",borderStyle:"solid",borderColor:"color-gray-300",color:"inherit",transition:"all 0.2s ease-in-out"},indeterminate:{backgroundColor:"theme-primary",borderColor:"theme-primary",borderWidth:"2px",borderStyle:"solid",color:"color-white",transition:"background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease"}},Dr={hover:{selected:{opacity:.9},unselected:{borderColor:"color-gray-400",backgroundColor:"color-gray-50"},indeterminate:{opacity:.9}},focus:{selected:{outline:"none",boxShadow:"0 0 0 2px white, 0 0 0 4px theme-primary"},unselected:{outline:"none",boxShadow:"0 0 0 2px white, 0 0 0 4px theme-primary"},indeterminate:{outline:"none",boxShadow:"0 0 0 2px white, 0 0 0 4px theme-primary"}},disabled:{selected:{backgroundColor:"color-gray-300",borderColor:"color-gray-300",opacity:.5,cursor:"not-allowed"},unselected:{borderColor:"color-gray-300",opacity:.5,cursor:"not-allowed"},indeterminate:{backgroundColor:"color-gray-300",borderColor:"color-gray-300",opacity:.5,cursor:"not-allowed"}},error:{selected:{backgroundColor:"color-red-500",borderColor:"color-red-500"},unselected:{borderColor:"color-red-500"},indeterminate:{backgroundColor:"color-red-500",borderColor:"color-red-500"}}},Ba=({id:e,icon:o,name:t,label:n,isChecked:a,onChange:l,onValueChange:c,shadow:s={},labelPosition:d="right",size:g="md",error:m=!1,isSelected:f=!1,isHovered:p=!1,isDisabled:u=!1,isReadOnly:y=!1,isIndeterminate:k=!1,defaultIsSelected:x=!1,setIsSelected:C=()=>{},setIsHovered:S=()=>{},views:w={checkbox:{},label:{}},infoText:v,helperText:b,...I})=>{const T=h.useId(),P=e??T,E=h.useRef(null),[D,z]=h.useState(!1),A=!!(a||f);h.useEffect(()=>{E.current&&(E.current.indeterminate=k)},[k]);const W=()=>S(!p),H=()=>{!y&&!u&&(C&&C(!f),l&&l(!a),c&&c(!a))},V=k?"indeterminate":a||f?"selected":"unselected",j=m?Dr.error[V]:u?Dr.disabled[V]:p?Dr.hover[V]:{},M={container:{gap:8,display:"flex",height:"fit-content",flexDirection:"column",width:"fit-content",color:m?"color-red-600":u?"color-gray-400":"inherit",cursor:u?"not-allowed":y?"default":"pointer",opacity:u?.6:1,transition:"all 0.2s ease-in-out",...w.label},checkbox:{...pg[V],...j,borderRadius:6,...mg[g],transition:"all 0.2s ease-in-out",...s,...w.checkbox}},L=`${P}-info`,_=`${P}-error`,O=[v?L:"",m?_:""].filter(Boolean).join(" ")||void 0;return r.jsxs(i.Vertical,{...M.container,children:[r.jsx(Ro,{htmlFor:P,onMouseEnter:W,onMouseLeave:W,size:i.Typography.fontSizes[g],cursor:"inherit",children:r.jsxs(i.Horizontal,{gap:12,alignItems:"center",children:[" ",d==="left"&&n&&r.jsx(i.Text,{size:g,fontWeight:"500",...w==null?void 0:w.label,children:n}),r.jsxs(i.Center,{position:"relative",...M.checkbox,...D?Dr.focus[V]:{},children:[r.jsx(i.Input,{ref:E,type:"checkbox",id:P,name:t,checked:A,"aria-checked":k?"mixed":void 0,onChange:H,onFocus:()=>z(!0),onBlur:()=>z(!1),disabled:u,readOnly:y,position:"absolute",top:0,left:0,width:"100%",height:"100%",margin:0,opacity:0,zIndex:1,cursor:u?"not-allowed":y?"default":"pointer","aria-describedby":O,...I}),k?r.jsx(Nn,{widthHeight:_a[g],color:"color-white",transition:"opacity 0.2s ease"}):(a||f)&&(o??r.jsx(Xo,{widthHeight:_a[g],color:"color-white",transition:"opacity 0.2s ease"}))]}),d==="right"&&n&&r.jsx(i.Text,{size:g,fontWeight:"500",...w==null?void 0:w.label,children:n})]})}),v&&r.jsx(i.Text,{id:L,marginLeft:d==="left"?0:36,color:"color-gray-500",size:"sm",fontWeight:"400",lineHeight:"20px",...w==null?void 0:w.infoText,children:v}),m&&r.jsx(i.Text,{id:_,size:"xs",marginTop:4,marginHorizontal:0,color:"color-red-500",fontWeight:"500",transition:"all 0.2s ease-in-out",children:m})]})},_t=e=>{const o=pe("checkbox",e),t=La(o);return r.jsx(Ba,{...t,...o})},Oa=({defaultIsSelected:e=!1,isChecked:o})=>{const[t,n]=h.useState(!1),[a,l]=h.useState(o!==void 0?o:e);return h.useEffect(()=>{o!==void 0&&l(o)},[o]),{isHovered:t,setIsHovered:n,isSelected:a,setIsSelected:l}},ug={xs:{height:"16px",width:"16px"},sm:{height:"20px",width:"20px"},md:{height:"24px",width:"24px"},lg:{height:"28px",width:"28px"},xl:{height:"32px",width:"32px"}},yg={xs:{height:"8px",width:"8px"},sm:{height:"10px",width:"10px"},md:{height:"12px",width:"12px"},lg:{height:"14px",width:"14px"},xl:{height:"16px",width:"16px"}},bg={selected:{borderColor:"theme-primary",borderWidth:"2px",borderStyle:"solid"},unselected:{borderWidth:"2px",borderStyle:"solid",borderColor:"color-gray-300",style:{backgroundColor:"transparent"}}},xg={selected:{backgroundColor:"theme-primary"},unselected:{style:{backgroundColor:"transparent"}}},Bt={hover:{selected:{borderColor:"color-blue-600"},unselected:{borderColor:"color-gray-400"}},disabled:{selected:{borderColor:"color-gray-300",opacity:.6},unselected:{borderColor:"color-gray-300",opacity:.6}},error:{selected:{borderColor:"color-red-500"},unselected:{borderColor:"color-red-500"}}},Ot={hover:{selected:{backgroundColor:"color-blue-600"},unselected:{style:{backgroundColor:"transparent"}}},disabled:{selected:{backgroundColor:"color-gray-300",opacity:.6},unselected:{opacity:.6,style:{backgroundColor:"transparent"}}},error:{selected:{backgroundColor:"color-red-500"},unselected:{style:{backgroundColor:"transparent"}}}},Na=({id:e,icon:o,name:t,label:n,value:a,isChecked:l,onChange:c,onValueChange:s,shadow:d={},labelPosition:g="right",size:m="md",error:f=!1,isSelected:p=!1,isHovered:u=!1,isDisabled:y=!1,isReadOnly:k=!1,defaultIsSelected:x=!1,setIsSelected:C=()=>{},setIsHovered:S=()=>{},views:w={radio:{},label:{}},infoText:v,helperText:b,...I})=>{const T=h.useId(),P=e??T,[E,D]=h.useState(!1),z=()=>S(!u),A=()=>{!k&&!y&&(C&&C(!0),c&&c(a??""),s&&s(a??""))},W=l||p?"selected":"unselected",H=f?Bt.error[W]:y?Bt.disabled[W]:u?Bt.hover[W]:{},V=f?Ot.error[W]:y?Ot.disabled[W]:u?Ot.hover[W]:{},j={container:{gap:8,display:"flex",height:"fit-content",flexDirection:"column",width:"fit-content",selected:{borderColor:"theme-primary"},color:f?"color-red-600":y?"color-gray-400":"inherit",cursor:y?"not-allowed":k?"default":"pointer",opacity:y?.6:1,transition:"all 0.2s ease-in-out",...w.label},radio:{...bg[W],...H,borderRadius:"50%",selected:{backgroundColor:"theme-primary"},backgroundColor:"color-white",...ug[m],transition:"all 0.2s ease-in-out",...d,...w.radio},dot:{...xg[W],...V,borderRadius:"50%",...yg[m],transition:"all 0.2s ease-in-out"}},M=`${P}-info`,L=`${P}-error`,_=[v?M:"",f?L:""].filter(Boolean).join(" ")||void 0;return r.jsxs(i.Vertical,{...j.container,children:[r.jsx(Ro,{htmlFor:P,onMouseEnter:z,onMouseLeave:z,size:i.Typography.fontSizes[m],cursor:"inherit",children:r.jsxs(i.Horizontal,{gap:12,alignItems:"center",children:[" ",g==="left"&&n&&r.jsx(i.Text,{size:m,fontWeight:"500",...w==null?void 0:w.label,children:n}),r.jsxs(i.Center,{position:"relative",...j.radio,...E?{outline:"none",boxShadow:"0 0 0 2px white, 0 0 0 4px theme-primary"}:{},children:[r.jsx(i.Input,{type:"radio",id:P,name:t,value:a??"",checked:!!(l||p),onChange:A,onFocus:()=>D(!0),onBlur:()=>D(!1),disabled:y,readOnly:k,position:"absolute",top:0,left:0,width:"100%",height:"100%",margin:0,opacity:0,zIndex:1,cursor:y?"not-allowed":k?"default":"pointer","aria-describedby":_,...I}),(l||p)&&r.jsx(i.View,{...j.dot})]}),g==="right"&&n&&r.jsx(i.Text,{size:m,fontWeight:"500",...w==null?void 0:w.label,children:n})]})}),v&&r.jsx(i.Text,{id:M,marginLeft:g==="left"?0:36,color:"color-gray-500",size:"sm",fontWeight:"400",lineHeight:"20px",...w==null?void 0:w.infoText,children:v}),f&&r.jsx(i.Text,{id:L,size:"xs",marginTop:4,marginHorizontal:0,color:"color-red-500",fontWeight:"500",transition:"color 0.2s ease, opacity 0.2s ease",children:f})]})},Nt=e=>{const o=pe("radio",e),t=Oa(o);return r.jsx(Na,{...t,...o})},kg=({value:e,defaultValue:o="",onChange:t})=>{const[n,a]=h.useState(e!==void 0?e:o);return h.useEffect(()=>{e!==void 0&&a(e)},[e]),{selectedValue:n,setSelectedValue:c=>{e===void 0&&a(c),t&&t(c)}}},Cg=({children:e,name:o,label:t,helperText:n,error:a,selectedValue:l,setSelectedValue:c,direction:s="vertical",spacing:d=8,isDisabled:g=!1,isReadOnly:m=!1,views:f={container:{},label:{},helperText:{}},onChange:p,value:u,defaultValue:y,...k})=>{const x=s==="vertical"?i.Vertical:i.Horizontal,C=h.Children.map(e,I=>{if(h.isValidElement(I)){const T={name:o,isChecked:I.props.value===l,isDisabled:g||I.props.isDisabled,isReadOnly:m||I.props.isReadOnly,onChange:P=>{c(P),I.props.onChange&&I.props.onChange(P)}};return h.cloneElement(I,T)}return I}),S=h.useId(),w=`${S}-label`,v=`${S}-helper`,b=!!(n||a);return r.jsxs(i.Vertical,{gap:d,width:"100%",role:"radiogroup","aria-labelledby":t?w:void 0,"aria-describedby":b?v:void 0,"aria-invalid":a?!0:void 0,...f.container,...k,children:[t&&r.jsx(i.Text,{id:w,fontWeight:"600",fontSize:"14px",color:a?"color-red-600":"inherit",marginBottom:4,...f.label,children:t}),r.jsx(x,{gap:d,children:C}),b&&r.jsx(i.Text,{id:v,fontWeight:a?"500":"400",fontSize:"14px",lineHeight:"20px",color:a?"color-red-500":"color-gray-500",marginTop:4,transition:"color 0.2s ease, opacity 0.2s ease",...f.helperText,children:a||n})]})},wg=e=>{const o=kg(e);return r.jsx(Cg,{...o,...e})},fo=e=>Math.min(255,Math.max(0,Math.round(e))),Sg=e=>{const o=/^#([0-9a-f]{3}|[0-9a-f]{6})$/i.exec(e.trim());if(!o)return null;let t=o[1];return t.length===3&&(t=t.split("").map(n=>n+n).join("")),{r:parseInt(t.slice(0,2),16),g:parseInt(t.slice(2,4),16),b:parseInt(t.slice(4,6),16)}},vg=e=>{const o=/^rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(?:,\s*[\d.]+\s*)?\)$/i.exec(e.trim());return o?{r:fo(Number(o[1])),g:fo(Number(o[2])),b:fo(Number(o[3]))}:null},Tg=(e,o,t)=>{const n=(e%360+360)%360,a=Math.min(100,Math.max(0,o))/100,l=Math.min(100,Math.max(0,t))/100,c=(1-Math.abs(2*l-1))*a,s=c*(1-Math.abs(n/60%2-1)),d=l-c/2;let g;return n<60?g=[c,s,0]:n<120?g=[s,c,0]:n<180?g=[0,c,s]:n<240?g=[0,s,c]:n<300?g=[s,0,c]:g=[c,0,s],{r:fo((g[0]+d)*255),g:fo((g[1]+d)*255),b:fo((g[2]+d)*255)}},Ig=e=>{const o=/^hsla?\(\s*([\d.]+)\s*,\s*([\d.]+)%\s*,\s*([\d.]+)%\s*(?:,\s*[\d.]+\s*)?\)$/i.exec(e.trim());return o?Tg(Number(o[1]),Number(o[2]),Number(o[3])):null},Fg=e=>Sg(e)??vg(e)??Ig(e),zg=({r:e,g:o,b:t})=>{const n=e/255,a=o/255,l=t/255,c=Math.max(n,a,l),s=Math.min(n,a,l),d=c-s,g=(c+s)/2;if(d===0)return{h:0,s:0,l:Math.round(g*100)};const m=d/(1-Math.abs(2*g-1));let f;return c===n?f=(a-l)/d%6:c===a?f=(l-n)/d+2:f=(n-a)/d+4,f=Math.round(f*60),f<0&&(f+=360),{h:f,s:Math.round(m*100),l:Math.round(g*100)}},qt=e=>fo(e).toString(16).padStart(2,"0"),$r=(e,o)=>{if(!o||!e)return e;const t=Fg(e);if(!t)return e;switch(o){case"hex":return`#${qt(t.r)}${qt(t.g)}${qt(t.b)}`;case"rgb":return`rgb(${t.r}, ${t.g}, ${t.b})`;case"hsl":{const{h:n,s:a,l}=zg(t);return`hsl(${n}, ${a}%, ${l}%)`}}},qa=e=>{const{value:o,defaultValue:t="",onChange:n,onChangeComplete:a,onOpen:l,onClose:c,closeOnSelect:s=!0,maxRecentColors:d=8,showRecentColors:g=!0,isAutoFocus:m=!1,colorFormat:f}=e,[p,u]=h.useState(!1),[y,k]=h.useState(o??t),[x,C]=h.useState(""),[S,w]=h.useState([]),[v,b]=h.useState(!1),[I,T]=h.useState(!1),P=h.useRef(null),E=h.useRef(null);h.useEffect(()=>{o!==void 0&&k(o)},[o]),h.useEffect(()=>{if(g&&typeof localStorage<"u")try{const M=localStorage.getItem("colorInput-recentColors");M&&w(JSON.parse(M))}catch(M){console.warn("Failed to load recent colors from localStorage:",M)}},[g]),h.useEffect(()=>{const M=P.current;m&&M&&typeof M.focus=="function"&&M.focus()},[m]),h.useEffect(()=>{if(typeof document>"u")return;const M=L=>{p&&P.current&&E.current&&!P.current.contains(L.target)&&!E.current.contains(L.target)&&V()};return document.addEventListener("mousedown",M),()=>document.removeEventListener("mousedown",M)},[p]);const D=h.useCallback(M=>{g&&w(L=>{const _=L.filter(N=>N!==M),O=[M,..._].slice(0,d);try{typeof localStorage<"u"&&localStorage.setItem("colorInput-recentColors",JSON.stringify(O))}catch(N){console.warn("Failed to save recent colors to localStorage:",N)}return O})},[g,d]),z=h.useCallback(()=>{const M=!p;u(M),M?l==null||l():c==null||c()},[p,l,c]),A=h.useCallback(M=>{k(M),D(M);const L=$r(M,f);n==null||n(L),a==null||a(L),s&&(u(!1),c==null||c())},[n,a,s,c,D,f]),W=h.useCallback(M=>{C(M)},[]),H=h.useCallback(()=>{x&&(A(x),C(""))},[x,A]),V=h.useCallback(()=>{u(!1),c==null||c()},[c]),j=h.useCallback(M=>{k(M),n==null||n($r(M,f))},[n,f]);return{isOpen:p,selectedColor:y,recentColors:S,customColor:x,isFocused:v,isHovered:I,handleToggle:z,handleColorSelect:A,handleCustomColorChange:W,handleCustomColorSubmit:H,handleClose:V,setIsFocused:b,setIsHovered:T,setValue:j,triggerRef:P,dropdownRef:E}},rr={container:{position:"relative",display:"inline-block",width:"fit-content"},trigger:{display:"flex",alignItems:"center",justifyContent:"space-between",cursor:"pointer",transition:"all 0.2s ease-in-out",backgroundColor:"color-white",borderWidth:"1px",borderStyle:"solid",borderColor:"color-gray-300",padding:"8px 12px",borderRadius:8},dropdown:{position:"absolute",top:"calc(100% + 4px)",left:0,right:0,zIndex:1e3,backgroundColor:"color-white",borderRadius:12,borderWidth:"1px",borderStyle:"solid",borderColor:"color-gray-200",boxShadow:"0 4px 12px rgba(0, 0, 0, 0.1)",padding:"16px",minWidth:"280px"},colorGrid:{display:"grid",gridTemplateColumns:"repeat(8, 1fr)",gap:"8px"},recentColors:{display:"flex",gap:"4px",flexWrap:"wrap"}},Mg={xs:{height:"28px",fontSize:"10px",padding:"4px 8px"},sm:{height:"32px",fontSize:"12px",padding:"6px 10px"},md:{height:"40px",fontSize:"14px",padding:"8px 12px"},lg:{height:"48px",fontSize:"16px",padding:"12px 16px"},xl:{height:"56px",fontSize:"20px",padding:"16px 20px"}},Wg={default:{borderRadius:8},square:{borderRadius:0},rounded:{borderRadius:8},pill:{borderRadius:9999}},Hg={default:{backgroundColor:"color-white",borderColor:"color-gray-300",borderWidth:"1px",borderStyle:"solid"},outline:{backgroundColor:"transparent",borderColor:"color-gray-300",borderWidth:"1px",borderStyle:"solid"},none:{backgroundColor:"transparent",borderColor:"transparent",borderWidth:"0px"}},jg=[{name:"Red 500",value:"color-red-500"},{name:"Orange 500",value:"color-orange-500"},{name:"Yellow 500",value:"color-yellow-500"},{name:"Green 500",value:"color-green-500"},{name:"Blue 500",value:"color-blue-500"},{name:"Indigo 500",value:"color-indigo-500"},{name:"Purple 500",value:"color-purple-500"},{name:"Pink 500",value:"color-pink-500"},{name:"Red 300",value:"color-red-300"},{name:"Orange 300",value:"color-orange-300"},{name:"Yellow 300",value:"color-yellow-300"},{name:"Green 300",value:"color-green-300"},{name:"Blue 300",value:"color-blue-300"},{name:"Indigo 300",value:"color-indigo-300"},{name:"Purple 300",value:"color-purple-300"},{name:"Pink 300",value:"color-pink-300"},{name:"Red 700",value:"color-red-700"},{name:"Orange 700",value:"color-orange-700"},{name:"Yellow 700",value:"color-yellow-700"},{name:"Green 700",value:"color-green-700"},{name:"Blue 700",value:"color-blue-700"},{name:"Indigo 700",value:"color-indigo-700"},{name:"Purple 700",value:"color-purple-700"},{name:"Pink 700",value:"color-pink-700"},{name:"Gray 100",value:"color-gray-100"},{name:"Gray 300",value:"color-gray-300"},{name:"Gray 500",value:"color-gray-500"},{name:"Gray 700",value:"color-gray-700"},{name:"Gray 900",value:"color-gray-900"},{name:"White",value:"color-white"},{name:"Black",value:"color-black"},{name:"Transparent",value:"transparent"}],Ua=({id:e,name:o,label:t,placeholder:n="Select a color",helperText:a,views:l={},size:c="md",shape:s="default",variant:d="default",shadow:g,error:m=!1,isDisabled:f=!1,isReadOnly:p=!1,isFocused:u=!1,isHovered:y=!1,predefinedColors:k=jg,showCustomInput:x=!0,showRecentColors:C=!0,isOpen:S=!1,selectedColor:w="",recentColors:v=[],customColor:b="",handleToggle:I=()=>{},handleColorSelect:T=()=>{},handleCustomColorChange:P=()=>{},handleCustomColorSubmit:E=()=>{},handleClose:D,setIsFocused:z=()=>{},setIsHovered:A=()=>{},setValue:W,triggerRef:H,dropdownRef:V,onChange:j,onChangeComplete:M,onBlur:L,onFocus:_,onOpen:O,onClose:N,colorFormat:U,maxRecentColors:X,closeOnSelect:oe,value:B,defaultValue:$,"aria-label":q,...J})=>{const{getColor:Y}=i.useTheme(),Z=h.useId(),ee=e??Z,ne=`${ee}-label`,K=`${ee}-listbox`,re=`${ee}-helper-text`,ie=`${ee}-error-text`,ge=!!m&&typeof m=="string",We=[a?re:null,ge?ie:null].filter(Boolean).join(" ")||void 0,le={...rr.container,...l==null?void 0:l.container},te={...rr.trigger,...Mg[c],...Wg[s],...Hg[d],...m&&{borderColor:"color-red-500"},...f&&{opacity:.6,cursor:"not-allowed"},...u&&{borderColor:"theme-primary",boxShadow:"0 0 0 2px rgba(255, 255, 255, 1), 0 0 0 4px rgba(29, 78, 216, 0.16)"},...y&&!f&&{borderColor:"color-gray-400"},...l==null?void 0:l.trigger,...g&&g},ae={...rr.dropdown,...l==null?void 0:l.dropdown},ce={...rr.colorGrid,...l==null?void 0:l.colorGrid},ye={...rr.recentColors,...l==null?void 0:l.recentColors},Q=w||"color-gray-200";return r.jsxs(i.View,{...le,...J,children:[t&&r.jsx(Ro,{id:ne,htmlFor:ee,size:c,isDisabled:f,error:m,views:l==null?void 0:l.label,children:t}),o&&r.jsx("input",{type:"hidden",name:o,value:$r(w,U)}),r.jsxs(i.View,{ref:H,id:ee,onClick:f||p?void 0:I,onKeyDown:R=>{f||p||(R.key==="Enter"||R.key===" ")&&(R.preventDefault(),I())},onMouseEnter:()=>A(!0),onMouseLeave:()=>A(!1),onFocus:()=>{z(!0),_&&_()},onBlur:R=>{z(!1),L&&L(R)},tabIndex:f?-1:0,role:"button","aria-expanded":S,"aria-haspopup":"listbox","aria-controls":S?K:void 0,"aria-labelledby":!q&&t?ne:void 0,"aria-label":q??(t?void 0:n),"aria-describedby":We,"aria-invalid":m?!0:void 0,width:"fit-content",gap:8,...te,children:[r.jsx(i.View,{width:"20px",height:"20px",borderRadius:"4px",backgroundColor:Q,borderWidth:"1px",borderStyle:"solid",borderColor:"color-gray-300"}),!p&&!f&&r.jsx(he,{widthHeight:16,color:"color-gray-500",orientation:S?"up":"down"})]}),S&&r.jsxs(i.View,{ref:V,...ae,children:[r.jsx(i.View,{id:K,role:"listbox","aria-labelledby":t?ne:void 0,"aria-label":t?void 0:"Color options",...ce,children:k.map((R,be)=>r.jsx(i.View,{role:"option","aria-selected":w===R.value,"aria-label":R.name,tabIndex:0,width:"24px",height:"24px",borderRadius:"8px",backgroundColor:R.value,borderWidth:"2px",borderStyle:"solid",borderColor:w===R.value?"theme-primary":"transparent",cursor:"pointer",transition:"transform 0.2s ease, border-color 0.2s ease",onClick:()=>T(R.value),onKeyDown:Ie=>{(Ie.key==="Enter"||Ie.key===" ")&&(Ie.preventDefault(),T(R.value))},title:R.name,_hover:{transform:"scale(1.05)",borderColor:"color-gray-400"},...l==null?void 0:l.colorSwatch},be))}),C&&v.length>0&&r.jsxs(i.Vertical,{gap:8,marginTop:"16px",children:[r.jsx(i.Text,{fontSize:"12px",fontWeight:"500",color:"color-gray-600",children:"Recent Colors"}),r.jsx(i.Horizontal,{gap:4,flexWrap:"wrap",...ye,children:v.map((R,be)=>r.jsx(i.View,{width:"20px",height:"20px",borderRadius:"8px",backgroundColor:R,borderWidth:"1px",borderStyle:"solid",borderColor:w===R?"theme-primary":"color-gray-300",cursor:"pointer",transition:"transform 0.2s ease, border-color 0.2s ease",onClick:()=>T(R),title:R,_hover:{transform:"scale(1.05)",borderColor:"color-gray-400"}},be))})]}),x&&r.jsxs(i.Vertical,{gap:8,marginTop:"16px",children:[r.jsx(i.Text,{fontSize:"12px",fontWeight:"500",color:"color-gray-600",children:"Custom Color"}),r.jsxs(i.Horizontal,{gap:8,children:[r.jsx(je,{value:b,onChange:P,placeholder:"#000000 or rgb(0,0,0)","aria-label":"Custom color",size:"sm",style:{flex:1},views:l==null?void 0:l.customInput}),r.jsx(i.Element,{as:"button",type:"button",padding:"8px 12px",backgroundColor:"theme-primary",border:"none",borderRadius:"8px",cursor:"pointer",onClick:E,transition:"background-color 0.2s ease, opacity 0.2s ease",_hover:{backgroundColor:"color-blue-700"},children:r.jsx(i.Text,{color:"color-white",fontSize:"12px",fontWeight:"500",children:"Add"})})]})]})]}),a&&r.jsx(i.Text,{id:re,fontSize:"12px",color:m?"color-red-500":"color-gray-600",marginTop:"4px",...l==null?void 0:l.helperText,children:a}),ge&&r.jsx(i.Text,{id:ie,fontSize:"12px",color:"color-red-500",marginTop:"4px",...l==null?void 0:l.error,children:m})]})},Pg=e=>{const o=qa(e);return r.jsx(Ua,{...o,...e})},Ut=[{name:"Afghanistan",dial_code:"+93",emoji:"🇦🇫",code:"AF"},{name:"Aland Islands",dial_code:"+358",emoji:"🇦🇽",code:"AX"},{name:"Albania",dial_code:"+355",emoji:"🇦🇱",code:"AL"},{name:"Algeria",dial_code:"+213",emoji:"🇩🇿",code:"DZ"},{name:"AmericanSamoa",dial_code:"+1684",emoji:"🇦🇸",code:"AS"},{name:"Andorra",dial_code:"+376",emoji:"🇦🇩",code:"AD"},{name:"Angola",dial_code:"+244",emoji:"🇦🇴",code:"AO"},{name:"Anguilla",dial_code:"+1264",emoji:"🇦🇮",code:"AI"},{name:"Antarctica",dial_code:"+672",emoji:"🇦🇶",code:"AQ"},{name:"Antigua and Barbuda",dial_code:"+1268",emoji:"🇦🇬",code:"AG"},{name:"Argentina",dial_code:"+54",emoji:"🇦🇷",code:"AR"},{name:"Armenia",dial_code:"+374",emoji:"🇦🇲",code:"AM"},{name:"Aruba",dial_code:"+297",emoji:"🇦🇼",code:"AW"},{name:"Australia",dial_code:"+61",emoji:"🇦🇺",code:"AU"},{name:"Austria",dial_code:"+43",emoji:"🇦🇹",code:"AT"},{name:"Azerbaijan",dial_code:"+994",emoji:"🇦🇿",code:"AZ"},{name:"Bahamas",dial_code:"+1242",emoji:"🇧🇸",code:"BS"},{name:"Bahrain",dial_code:"+973",emoji:"🇧🇭",code:"BH"},{name:"Bangladesh",dial_code:"+880",emoji:"🇧🇩",code:"BD"},{name:"Barbados",dial_code:"+1246",emoji:"🇧🇧",code:"BB"},{name:"Belarus",dial_code:"+375",emoji:"🇧🇾",code:"BY"},{name:"Belgium",dial_code:"+32",emoji:"🇧🇪",code:"BE"},{name:"Belize",dial_code:"+501",emoji:"🇧🇿",code:"BZ"},{name:"Benin",dial_code:"+229",emoji:"🇧🇯",code:"BJ"},{name:"Bermuda",dial_code:"+1441",emoji:"🇧🇲",code:"BM"},{name:"Bhutan",dial_code:"+975",emoji:"🇧🇹",code:"BT"},{name:"Bolivia, Plurinational State of",dial_code:"+591",emoji:"🇧🇴",code:"BO"},{name:"Bosnia and Herzegovina",dial_code:"+387",emoji:"🇧🇦",code:"BA"},{name:"Botswana",dial_code:"+267",emoji:"🇧🇼",code:"BW"},{name:"Brazil",dial_code:"+55",emoji:"🇧🇷",code:"BR"},{name:"British Indian Ocean Territory",dial_code:"+246",emoji:"🇮🇴",code:"IO"},{name:"Brunei Darussalam",dial_code:"+673",emoji:"🇧🇳",code:"BN"},{name:"Bulgaria",dial_code:"+359",emoji:"🇧🇬",code:"BG"},{name:"Burkina Faso",dial_code:"+226",emoji:"🇧🇫",code:"BF"},{name:"Burundi",dial_code:"+257",emoji:"🇧🇮",code:"BI"},{name:"Cambodia",dial_code:"+855",emoji:"🇰🇭",code:"KH"},{name:"Cameroon",dial_code:"+237",emoji:"🇨🇲",code:"CM"},{name:"Canada",dial_code:"+1",emoji:"🇨🇦",code:"CA"},{name:"Cape Verde",dial_code:"+238",emoji:"🇨🇻",code:"CV"},{name:"Cayman Islands",dial_code:"+345",emoji:"🇰🇾",code:"KY"},{name:"Central African Republic",dial_code:"+236",emoji:"🇨🇫",code:"CF"},{name:"Chad",dial_code:"+235",emoji:"🇹🇩",code:"TD"},{name:"Chile",dial_code:"+56",emoji:"🇨🇱",code:"CL"},{name:"China",dial_code:"+86",emoji:"🇨🇳",code:"CN"},{name:"Christmas Island",dial_code:"+61",emoji:"🇨🇽",code:"CX"},{name:"Cocos (Keeling) Islands",dial_code:"+61",emoji:"🇨🇨",code:"CC"},{name:"Colombia",dial_code:"+57",emoji:"🇨🇴",code:"CO"},{name:"Comoros",dial_code:"+269",emoji:"🇰🇲",code:"KM"},{name:"Congo",dial_code:"+242",emoji:"🇨🇬",code:"CG"},{name:"Congo, The Democratic Republic of the Congo",dial_code:"+243",emoji:"🇨🇩",code:"CD"},{name:"Cook Islands",dial_code:"+682",emoji:"🇨🇰",code:"CK"},{name:"Costa Rica",dial_code:"+506",emoji:"🇨🇷",code:"CR"},{name:"Cote d'Ivoire",dial_code:"+225",emoji:"🇨🇮",code:"CI"},{name:"Croatia",dial_code:"+385",emoji:"🇭🇷",code:"HR"},{name:"Cuba",dial_code:"+53",emoji:"🇨🇺",code:"CU"},{name:"Cyprus",dial_code:"+357",emoji:"🇨🇾",code:"CY"},{name:"Czech Republic",dial_code:"+420",emoji:"🇨🇿",code:"CZ"},{name:"Denmark",dial_code:"+45",emoji:"🇩🇰",code:"DK"},{name:"Djibouti",dial_code:"+253",emoji:"🇩🇯",code:"DJ"},{name:"Dominica",dial_code:"+1767",emoji:"🇩🇲",code:"DM"},{name:"Dominican Republic",dial_code:"+1849",emoji:"🇩🇴",code:"DO"},{name:"Ecuador",dial_code:"+593",emoji:"🇪🇨",code:"EC"},{name:"Egypt",dial_code:"+20",emoji:"🇪🇬",code:"EG"},{name:"El Salvador",dial_code:"+503",emoji:"🇸🇻",code:"SV"},{name:"Equatorial Guinea",dial_code:"+240",emoji:"🇬🇶",code:"GQ"},{name:"Eritrea",dial_code:"+291",emoji:"🇪🇷",code:"ER"},{name:"Estonia",dial_code:"+372",emoji:"🇪🇪",code:"EE"},{name:"Ethiopia",dial_code:"+251",emoji:"🇪🇹",code:"ET"},{name:"Falkland Islands (Malvinas)",dial_code:"+500",emoji:"🇫🇰",code:"FK"},{name:"Faroe Islands",dial_code:"+298",emoji:"🇫🇴",code:"FO"},{name:"Fiji",dial_code:"+679",emoji:"🇫🇯",code:"FJ"},{name:"Finland",dial_code:"+358",emoji:"🇫🇮",code:"FI"},{name:"France",dial_code:"+33",emoji:"🇫🇷",code:"FR"},{name:"French Guiana",dial_code:"+594",emoji:"🇬🇫",code:"GF"},{name:"French Polynesia",dial_code:"+689",emoji:"🇵🇫",code:"PF"},{name:"Gabon",dial_code:"+241",emoji:"🇬🇦",code:"GA"},{name:"Gambia",dial_code:"+220",emoji:"🇬🇲",code:"GM"},{name:"Georgia",dial_code:"+995",emoji:"🇬🇪",code:"GE"},{name:"Germany",dial_code:"+49",emoji:"🇩🇪",code:"DE"},{name:"Ghana",dial_code:"+233",emoji:"🇬🇭",code:"GH"},{name:"Gibraltar",dial_code:"+350",emoji:"🇬🇮",code:"GI"},{name:"Greece",dial_code:"+30",emoji:"🇬🇷",code:"GR"},{name:"Greenland",dial_code:"+299",emoji:"🇬🇱",code:"GL"},{name:"Grenada",dial_code:"+1473",emoji:"🇬🇩",code:"GD"},{name:"Guadeloupe",dial_code:"+590",emoji:"🇬🇵",code:"GP"},{name:"Guam",dial_code:"+1671",emoji:"🇬🇺",code:"GU"},{name:"Guatemala",dial_code:"+502",emoji:"🇬🇹",code:"GT"},{name:"Guernsey",dial_code:"+44",emoji:"🇬🇬",code:"GG"},{name:"Guinea",dial_code:"+224",emoji:"🇬🇳",code:"GN"},{name:"Guinea-Bissau",dial_code:"+245",emoji:"🇬🇼",code:"GW"},{name:"Guyana",dial_code:"+595",emoji:"🇬🇾",code:"GY"},{name:"Haiti",dial_code:"+509",emoji:"🇭🇹",code:"HT"},{name:"Holy See (Vatican City State)",dial_code:"+379",emoji:"🇻🇦",code:"VA"},{name:"Honduras",dial_code:"+504",emoji:"🇭🇳",code:"HN"},{name:"Hong Kong",dial_code:"+852",emoji:"🇭🇰",code:"HK"},{name:"Hungary",dial_code:"+36",emoji:"🇭🇺",code:"HU"},{name:"Iceland",dial_code:"+354",emoji:"🇮🇸",code:"IS"},{name:"India",dial_code:"+91",emoji:"🇮🇳",code:"IN"},{name:"Indonesia",dial_code:"+62",emoji:"🇮🇩",code:"ID"},{name:"Iran, Islamic Republic of Persian Gulf",dial_code:"+98",emoji:"🇮🇷",code:"IR"},{name:"Iraq",dial_code:"+964",emoji:"🇮🇷",code:"IQ"},{name:"Ireland",dial_code:"+353",emoji:"🇮🇪",code:"IE"},{name:"Isle of Man",dial_code:"+44",emoji:"🇮🇲",code:"IM"},{name:"Israel",dial_code:"+972",emoji:"🇮🇱",code:"IL"},{name:"Italy",dial_code:"+39",emoji:"🇮🇹",code:"IT"},{name:"Jamaica",dial_code:"+1876",emoji:"🇯🇲",code:"JM"},{name:"Japan",dial_code:"+81",emoji:"🇯🇵",code:"JP"},{name:"Jersey",dial_code:"+44",emoji:"🇯🇪",code:"JE"},{name:"Jordan",dial_code:"+962",emoji:"🇯🇴",code:"JO"},{name:"Kazakhstan",dial_code:"+77",emoji:"🇰🇿",code:"KZ"},{name:"Kenya",dial_code:"+254",emoji:"🇰🇪",code:"KE"},{name:"Kiribati",dial_code:"+686",emoji:"🇰🇮",code:"KI"},{name:"Korea, Democratic People's Republic of Korea",dial_code:"+850",emoji:"🇰🇵",code:"KP"},{name:"Korea, Republic of South Korea",dial_code:"+82",emoji:"🇰🇷",code:"KR"},{name:"Kuwait",dial_code:"+965",emoji:"🇰🇼",code:"KW"},{name:"Kyrgyzstan",dial_code:"+996",emoji:"🇰🇬",code:"KG"},{name:"Laos",dial_code:"+856",emoji:"🇱🇦",code:"LA"},{name:"Latvia",dial_code:"+371",emoji:"🇱🇻",code:"LV"},{name:"Lebanon",dial_code:"+961",emoji:"🇱🇧",code:"LB"},{name:"Lesotho",dial_code:"+266",emoji:"🇱🇸",code:"LS"},{name:"Liberia",dial_code:"+231",emoji:"🇱🇷",code:"LR"},{name:"Libyan Arab Jamahiriya",dial_code:"+218",emoji:"🇱🇾",code:"LY"},{name:"Liechtenstein",dial_code:"+423",emoji:"🇱🇮",code:"LI"},{name:"Lithuania",dial_code:"+370",emoji:"🇱🇹",code:"LT"},{name:"Luxembourg",dial_code:"+352",emoji:"🇱🇺",code:"LU"},{name:"Macao",dial_code:"+853",emoji:"🇲🇴",code:"MO"},{name:"Macedonia",dial_code:"+389",emoji:"🇲🇰",code:"MK"},{name:"Madagascar",dial_code:"+261",emoji:"🇲🇬",code:"MG"},{name:"Malawi",dial_code:"+265",emoji:"🇲🇼",code:"MW"},{name:"Malaysia",dial_code:"+60",emoji:"🇲🇾",code:"MY"},{name:"Maldives",dial_code:"+960",emoji:"🇲🇻",code:"MV"},{name:"Mali",dial_code:"+223",emoji:"🇲🇱",code:"ML"},{name:"Malta",dial_code:"+356",emoji:"🇲🇹",code:"MT"},{name:"Marshall Islands",dial_code:"+692",emoji:"🇲🇭",code:"MH"},{name:"Martinique",dial_code:"+596",emoji:"🇲🇶",code:"MQ"},{name:"Mauritania",dial_code:"+222",emoji:"🇲🇷",code:"MR"},{name:"Mauritius",dial_code:"+230",emoji:"🇲🇺",code:"MU"},{name:"Mayotte",dial_code:"+262",emoji:"🇾🇹",code:"YT"},{name:"Mexico",dial_code:"+52",emoji:"🇲🇽",code:"MX"},{name:"Micronesia, Federated States of Micronesia",dial_code:"+691",emoji:"🇫🇲",code:"FM"},{name:"Moldova",dial_code:"+373",emoji:"🇲🇩",code:"MD"},{name:"Monaco",dial_code:"+377",emoji:"🇲🇨",code:"MC"},{name:"Mongolia",dial_code:"+976",emoji:"🇲🇳",code:"MN"},{name:"Montenegro",dial_code:"+382",emoji:"🇲🇪",code:"ME"},{name:"Montserrat",dial_code:"+1664",emoji:"🇲🇸",code:"MS"},{name:"Morocco",dial_code:"+212",emoji:"🇲🇦",code:"MA"},{name:"Mozambique",dial_code:"+258",emoji:"🇲🇿",code:"MZ"},{name:"Myanmar",dial_code:"+95",emoji:"🇲🇲",code:"MM"},{name:"Namibia",emoji:"🇳🇦",dial_code:"+264",code:"NA"},{name:"Nauru",dial_code:"+674",emoji:"🇳🇷",code:"NR"},{name:"Nepal",dial_code:"+977",emoji:"🇳🇵",code:"NP"},{name:"Netherlands",dial_code:"+31",emoji:"🇳🇱",code:"NL"},{name:"Netherlands Antilles",dial_code:"+599",emoji:"🇧🇶",code:"AN"},{name:"New Caledonia",dial_code:"+687",emoji:"🇳🇨",code:"NC"},{name:"New Zealand",dial_code:"+64",emoji:"🇳🇿",code:"NZ"},{name:"Nicaragua",dial_code:"+505",emoji:"🇳🇮",code:"NI"},{name:"Niger",dial_code:"+227",emoji:"🇳🇪",code:"NE"},{name:"Nigeria",dial_code:"+234",emoji:"🇳🇬",code:"NG"},{name:"Niue",dial_code:"+683",emoji:"🇳🇺",code:"NU"},{name:"Norfolk Island",dial_code:"+672",emoji:"🇳🇫",code:"NF"},{name:"Northern Mariana Islands",dial_code:"+1670",emoji:"🇲🇵",code:"MP"},{name:"Norway",dial_code:"+47",emoji:"🇳🇴",code:"NO"},{name:"Oman",dial_code:"+968",emoji:"🇴🇲",code:"OM"},{name:"Pakistan",dial_code:"+92",emoji:"🇵🇰",code:"PK"},{name:"Palau",dial_code:"+680",emoji:"🇵🇼",code:"PW"},{name:"Palestinian Territory, Occupied",dial_code:"+970",emoji:"🇵🇸",code:"PS"},{name:"Panama",dial_code:"+507",emoji:"🇵🇦",code:"PA"},{name:"Papua New Guinea",dial_code:"+675",emoji:"🇵🇬",code:"PG"},{name:"Paraguay",dial_code:"+595",emoji:"🇵🇾",code:"PY"},{name:"Peru",dial_code:"+51",emoji:"🇵🇪",code:"PE"},{name:"Philippines",dial_code:"+63",emoji:"🇵🇭",code:"PH"},{name:"Pitcairn",dial_code:"+872",emoji:"🇵🇳",code:"PN"},{name:"Poland",dial_code:"+48",emoji:"🇵🇱",code:"PL"},{name:"Portugal",dial_code:"+351",emoji:"🇵🇹",code:"PT"},{name:"Puerto Rico",dial_code:"+1939",emoji:"🇵🇷",code:"PR"},{name:"Qatar",dial_code:"+974",emoji:"🇶🇦",code:"QA"},{name:"Romania",dial_code:"+40",emoji:"🇷🇴",code:"RO"},{name:"Russia",dial_code:"+7",emoji:"🇷🇺",code:"RU"},{name:"Rwanda",dial_code:"+250",emoji:"🇷🇼",code:"RW"},{name:"Reunion",dial_code:"+262",emoji:"🇷🇪",code:"RE"},{name:"Saint Barthelemy",dial_code:"+590",emoji:"🇧🇱",code:"BL"},{name:"Saint Helena, Ascension and Tristan Da Cunha",dial_code:"+290",emoji:"🇸🇭",code:"SH"},{name:"Saint Kitts and Nevis",dial_code:"+1869",emoji:"🇰🇳",code:"KN"},{name:"Saint Lucia",dial_code:"+1758",emoji:"🇱🇨",code:"LC"},{name:"Saint Martin",dial_code:"+590",emoji:"🇲🇫",code:"MF"},{name:"Saint Pierre and Miquelon",dial_code:"+508",emoji:"🇵🇲",code:"PM"},{name:"Saint Vincent and the Grenadines",dial_code:"+1784",emoji:"🇻🇨",code:"VC"},{name:"Samoa",dial_code:"+685",emoji:"🇼🇸",code:"WS"},{name:"San Marino",dial_code:"+378",emoji:"🇸🇲",code:"SM"},{name:"Sao Tome and Principe",dial_code:"+239",emoji:"🇸🇹",code:"ST"},{name:"Saudi Arabia",dial_code:"+966",emoji:"🇸🇦",code:"SA"},{name:"Senegal",dial_code:"+221",emoji:"🇸🇳",code:"SN"},{name:"Serbia",dial_code:"+381",emoji:"🇷🇸",code:"RS"},{name:"Seychelles",dial_code:"+248",emoji:"🇸🇨",code:"SC"},{name:"Sierra Leone",dial_code:"+232",emoji:"🇸🇱",code:"SL"},{name:"Singapore",dial_code:"+65",emoji:"🇸🇬",code:"SG"},{name:"Slovakia",dial_code:"+421",emoji:"🇸🇰",code:"SK"},{name:"Slovenia",dial_code:"+386",emoji:"🇸🇮",code:"SI"},{name:"Solomon Islands",dial_code:"+677",emoji:"🇸🇧",code:"SB"},{name:"Somalia",dial_code:"+252",emoji:"🇸🇴",code:"SO"},{name:"South Africa",dial_code:"+27",emoji:"🇿🇦",code:"ZA"},{name:"South Sudan",dial_code:"+211",emoji:"🇸🇸",code:"SS"},{name:"South Georgia and the South Sandwich Islands",dial_code:"+500",emoji:"🇬🇸",code:"GS"},{name:"Spain",dial_code:"+34",emoji:"🇪🇸",code:"ES"},{name:"Sri Lanka",dial_code:"+94",emoji:"🇱🇰",code:"LK"},{name:"Sudan",dial_code:"+249",emoji:"🇸🇩",code:"SD"},{name:"Suriname",dial_code:"+597",emoji:"🇸🇷",code:"SR"},{name:"Svalbard and Jan Mayen",dial_code:"+47",emoji:"🇸🇯",code:"SJ"},{name:"Swaziland",dial_code:"+268",emoji:"🇸🇿",code:"SZ"},{name:"Sweden",dial_code:"+46",emoji:"🇸🇪",code:"SE"},{name:"Switzerland",dial_code:"+41",emoji:"🇨🇭",code:"CH"},{name:"Syrian Arab Republic",dial_code:"+963",emoji:"🇸🇾",code:"SY"},{name:"Taiwan",dial_code:"+886",emoji:"🇹🇼",code:"TW"},{name:"Tajikistan",dial_code:"+992",emoji:"🇹🇯",code:"TJ"},{name:"Tanzania, United Republic of Tanzania",dial_code:"+255",emoji:"🇹🇿",code:"TZ"},{name:"Thailand",dial_code:"+66",emoji:"🇹🇭",code:"TH"},{name:"Timor-Leste",dial_code:"+670",emoji:"🇹🇱",code:"TL"},{name:"Togo",dial_code:"+228",emoji:"🇹🇬",code:"TG"},{name:"Tokelau",dial_code:"+690",emoji:"🇹🇰",code:"TK"},{name:"Tonga",dial_code:"+676",emoji:"🇹🇴",code:"TO"},{name:"Trinidad and Tobago",dial_code:"+1868",emoji:"🇹🇹",code:"TT"},{name:"Tunisia",dial_code:"+216",emoji:"🇹🇳",code:"TN"},{name:"Turkey",dial_code:"+90",emoji:"🇹🇷",code:"TR"},{name:"Turkmenistan",dial_code:"+993",emoji:"🇹🇲",code:"TM"},{name:"Turks and Caicos Islands",dial_code:"+1649",emoji:"🇹🇨",code:"TC"},{name:"Tuvalu",dial_code:"+688",emoji:"🇹🇻",code:"TV"},{name:"Uganda",dial_code:"+256",emoji:"🇺🇬",code:"UG"},{name:"Ukraine",dial_code:"+380",emoji:"🇺🇦",code:"UA"},{name:"United Arab Emirates",dial_code:"+971",emoji:"🇦🇪",code:"AE"},{name:"United Kingdom",dial_code:"+44",emoji:"🇬🇧",code:"GB"},{name:"United States",dial_code:"+1",emoji:"🇺🇸",code:"US"},{name:"Uruguay",dial_code:"+598",emoji:"🇺🇾",code:"UY"},{name:"Uzbekistan",dial_code:"+998",emoji:"🇺🇿",code:"UZ"},{name:"Vanuatu",dial_code:"+678",emoji:"🇻🇺",code:"VU"},{name:"Venezuela, Bolivarian Republic of Venezuela",dial_code:"+58",emoji:"🇻🇪",code:"VE"},{name:"Vietnam",dial_code:"+84",emoji:"🇻🇳",code:"VN"},{name:"Virgin Islands, British",dial_code:"+1284",emoji:"🇻🇬",code:"VG"},{name:"Virgin Islands, U.S.",dial_code:"+1340",emoji:"🇻🇮",code:"VI"},{name:"Wallis and Futuna",dial_code:"+681",emoji:"🇼🇫",code:"WF"},{name:"Yemen",dial_code:"+967",emoji:"🇾🇪",code:"YE"},{name:"Zambia",dial_code:"+260",emoji:"🇿🇲",code:"ZM"},{name:"Zimbabwe",dial_code:"+263",emoji:"🇿🇼",code:"ZW"}],Ga=({placeholder:e})=>{const[o,t]=h.useState(Ut),[n,a]=h.useState(e??Ut[0].name),[l,c]=h.useState(!0),[s,d]=h.useState(!1),[g,m]=h.useState(!1);return{hide:l,setHide:c,newOptions:o,setNewOptions:t,isHovered:g,setIsHovered:m,isFocused:s,setIsFocused:d,value:n,setValue:a}},Ya={xs:8,sm:10,md:12,lg:14,xl:16},Vg=({size:e,...o})=>r.jsx(i.Element,{as:"ul",...o}),Ag=e=>r.jsx(i.Input,{type:"text",...e}),Eg=({size:e,...o})=>r.jsx(i.Element,{as:"li",...o}),Dg=({id:e,option:o,size:t="md",isSelected:n=!1,isHighlighted:a=!1,callback:l=()=>{},views:c={text:{}}})=>{const s=d=>{d&&d.stopPropagation&&d.stopPropagation(),l(o??"")};return r.jsx(Eg,{id:e,margin:0,role:"option","aria-selected":n,listStyleType:"none",fontWeight:"normal",paddingVertical:6,paddingHorizontal:12,onClick:s,fontSize:i.Typography.fontSizes[t],backgroundColor:a?"color-gray-100":void 0,_hover:{backgroundColor:"color-gray-100",transition:"all 0.15s ease-in-out"},...c.text,children:o})},$g=({id:e,size:o,views:t={dropDown:{}},options:n=[],selectedOption:a,highlightedIndex:l=-1,callback:c=()=>{}})=>{const s=d=>c(d);return r.jsx(Vg,{id:e,role:"listbox",margin:0,padding:0,top:"100%",width:"100%",display:"flex",zIndex:1e3,overflow:"auto",maxHeight:"300px",borderRadius:12,position:"absolute",flexDirection:"column",backgroundColor:"color-white",borderWidth:"1px",borderStyle:"solid",borderColor:"color-gray-200",boxShadow:"0 4px 12px rgba(0, 0, 0, 0.1)",...t.dropDown,children:n.map((d,g)=>r.jsx(Dg,{id:e?`${e}-option-${g}`:void 0,size:o,option:d.name,isSelected:d.name===a,isHighlighted:g===l,callback:s,...t.text},d.code))})},Ka=({id:e,name:o,label:t,value:n,placeholder:a,helperText:l,hide:c=!1,error:s=!1,isHovered:d=!1,isFocused:g=!1,isAutoFocus:m=!1,isDisabled:f=!1,isReadOnly:p=!1,shadow:u={},newOptions:y=[],size:k="md",variant:x="default",shape:C="default",onChange:S,onBlur:w=()=>{},setHide:v=()=>{},setNewOptions:b=()=>{},setIsHovered:I=()=>{},setIsFocused:T=()=>{},setValue:P=()=>{},selected:E,views:D={text:{},icon:{},label:{},dropDown:{},helperText:{}},themeMode:z,...A})=>{const{getColor:W,themeMode:H}=i.useTheme(),V=h.useId(),j=e??V,M=`${j}-listbox`,[L,_]=h.useState(-1),O=W("color-gray-500",{themeMode:z||H}),N=()=>T(!0),U=Y=>{v(!c),_(-1),P(Y),S&&S(Y)},X=()=>{!f&&!p&&v(!c)},oe=Y=>{const Z=Y.target.value,ee=Ut.filter(ne=>ne.name.toLowerCase().startsWith(Z.toLowerCase()));c&&v(!1),b(ee),_(ee.length>0?0:-1),S&&S(Z)},B=Y=>{f||p||(Y.key==="ArrowDown"?(Y.preventDefault(),c?(v(!1),_(y.length>0?0:-1)):_(Math.min(L+1,y.length-1))):Y.key==="ArrowUp"?c||(Y.preventDefault(),_(Math.max(L-1,0))):Y.key==="Enter"?!c&&L>=0&&y[L]&&(Y.preventDefault(),U(y[L].name)):Y.key==="Escape"&&(c||(v(!0),_(-1))))},$=Y=>{w(Y),T(!1)},q=!!t,J={margin:0,paddingVertical:0,paddingHorizontal:0,width:"100%",height:"100%",border:"none",on:{focus:{outline:"none"}},transition:"all 0.2s ease-in-out",fontSize:i.Typography.fontSizes[k],backgroundColor:"transparent",color:f?"color-gray-400":"color-gray-900",cursor:f?"not-allowed":p?"auto":"pointer",...D.field};return r.jsxs(Ue,{helperText:l,error:s,views:D,onClick:X,children:[r.jsxs(oo,{label:t,size:k,error:s,shape:C,views:D,shadow:u,variant:x,value:n,color:"theme-primary",isDisabled:f,isReadOnly:p,isFocused:g,showLabel:q,_hover:!f&&!s?{borderColor:"theme-primary"}:void 0,children:[r.jsxs(Ho,{children:[q&&r.jsx(ho,{htmlFor:j,color:"theme-primary",error:s,views:D,children:t}),r.jsx(Ag,{id:j,name:o,placeholder:a,readOnly:p,disabled:f,autoFocus:m,role:"combobox","aria-expanded":!c,"aria-controls":c?void 0:M,"aria-autocomplete":"list","aria-haspopup":"listbox","aria-activedescendant":!c&&L>=0?`${M}-option-${L}`:void 0,onBlur:$,onFocus:N,onKeyDown:B,...J,...A,value:n,onChange:oe})]}),r.jsx(Zo,{children:c?r.jsx(he,{orientation:"down",widthHeight:Ya[k],color:O,style:D.icon}):r.jsx(he,{orientation:"up",widthHeight:Ya[k],color:O,style:D.icon})})]}),!c&&r.jsx($g,{id:M,size:k,views:D,options:y,selectedOption:n,highlightedIndex:L,callback:U})]})},Lg=e=>{const o=Ga(e);return r.jsx(Ka,{...o,...e})};function Lr(e){"@babel/helpers - typeof";return Lr=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(o){return typeof o}:function(o){return o&&typeof Symbol=="function"&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o},Lr(e)}function ze(e,o){if(o.length<e)throw new TypeError(e+" argument"+(e>1?"s":"")+" required, but only "+o.length+" present")}function _g(e){return ze(1,arguments),e instanceof Date||Lr(e)==="object"&&Object.prototype.toString.call(e)==="[object Date]"}function Ne(e){ze(1,arguments);var o=Object.prototype.toString.call(e);return e instanceof Date||Lr(e)==="object"&&o==="[object Date]"?new Date(e.getTime()):typeof e=="number"||o==="[object Number]"?new Date(e):((typeof e=="string"||o==="[object String]")&&typeof console<"u"&&(console.warn("Starting with v2.0.0-beta.1 date-fns doesn't accept strings as date arguments. Please use `parseISO` to parse strings. See: https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#string-arguments"),console.warn(new Error().stack)),new Date(NaN))}function Bg(e){if(ze(1,arguments),!_g(e)&&typeof e!="number")return!1;var o=Ne(e);return!isNaN(Number(o))}function mo(e){if(e===null||e===!0||e===!1)return NaN;var o=Number(e);return isNaN(o)?o:o<0?Math.ceil(o):Math.floor(o)}function Og(e,o){ze(2,arguments);var t=Ne(e).getTime(),n=mo(o);return new Date(t+n)}function Ng(e,o){ze(2,arguments);var t=mo(o);return Og(e,-t)}var qg=864e5;function Ug(e){ze(1,arguments);var o=Ne(e),t=o.getTime();o.setUTCMonth(0,1),o.setUTCHours(0,0,0,0);var n=o.getTime(),a=t-n;return Math.floor(a/qg)+1}function _r(e){ze(1,arguments);var o=1,t=Ne(e),n=t.getUTCDay(),a=(n<o?7:0)+n-o;return t.setUTCDate(t.getUTCDate()-a),t.setUTCHours(0,0,0,0),t}function Xa(e){ze(1,arguments);var o=Ne(e),t=o.getUTCFullYear(),n=new Date(0);n.setUTCFullYear(t+1,0,4),n.setUTCHours(0,0,0,0);var a=_r(n),l=new Date(0);l.setUTCFullYear(t,0,4),l.setUTCHours(0,0,0,0);var c=_r(l);return o.getTime()>=a.getTime()?t+1:o.getTime()>=c.getTime()?t:t-1}function Gg(e){ze(1,arguments);var o=Xa(e),t=new Date(0);t.setUTCFullYear(o,0,4),t.setUTCHours(0,0,0,0);var n=_r(t);return n}var Yg=6048e5;function Kg(e){ze(1,arguments);var o=Ne(e),t=_r(o).getTime()-Gg(o).getTime();return Math.round(t/Yg)+1}var Xg={};function Br(){return Xg}function Or(e,o){var t,n,a,l,c,s,d,g;ze(1,arguments);var m=Br(),f=mo((t=(n=(a=(l=o==null?void 0:o.weekStartsOn)!==null&&l!==void 0?l:o==null||(c=o.locale)===null||c===void 0||(s=c.options)===null||s===void 0?void 0:s.weekStartsOn)!==null&&a!==void 0?a:m.weekStartsOn)!==null&&n!==void 0?n:(d=m.locale)===null||d===void 0||(g=d.options)===null||g===void 0?void 0:g.weekStartsOn)!==null&&t!==void 0?t:0);if(!(f>=0&&f<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var p=Ne(e),u=p.getUTCDay(),y=(u<f?7:0)+u-f;return p.setUTCDate(p.getUTCDate()-y),p.setUTCHours(0,0,0,0),p}function Ja(e,o){var t,n,a,l,c,s,d,g;ze(1,arguments);var m=Ne(e),f=m.getUTCFullYear(),p=Br(),u=mo((t=(n=(a=(l=o==null?void 0:o.firstWeekContainsDate)!==null&&l!==void 0?l:o==null||(c=o.locale)===null||c===void 0||(s=c.options)===null||s===void 0?void 0:s.firstWeekContainsDate)!==null&&a!==void 0?a:p.firstWeekContainsDate)!==null&&n!==void 0?n:(d=p.locale)===null||d===void 0||(g=d.options)===null||g===void 0?void 0:g.firstWeekContainsDate)!==null&&t!==void 0?t:1);if(!(u>=1&&u<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var y=new Date(0);y.setUTCFullYear(f+1,0,u),y.setUTCHours(0,0,0,0);var k=Or(y,o),x=new Date(0);x.setUTCFullYear(f,0,u),x.setUTCHours(0,0,0,0);var C=Or(x,o);return m.getTime()>=k.getTime()?f+1:m.getTime()>=C.getTime()?f:f-1}function Jg(e,o){var t,n,a,l,c,s,d,g;ze(1,arguments);var m=Br(),f=mo((t=(n=(a=(l=o==null?void 0:o.firstWeekContainsDate)!==null&&l!==void 0?l:o==null||(c=o.locale)===null||c===void 0||(s=c.options)===null||s===void 0?void 0:s.firstWeekContainsDate)!==null&&a!==void 0?a:m.firstWeekContainsDate)!==null&&n!==void 0?n:(d=m.locale)===null||d===void 0||(g=d.options)===null||g===void 0?void 0:g.firstWeekContainsDate)!==null&&t!==void 0?t:1),p=Ja(e,o),u=new Date(0);u.setUTCFullYear(p,0,f),u.setUTCHours(0,0,0,0);var y=Or(u,o);return y}var Qg=6048e5;function Zg(e,o){ze(1,arguments);var t=Ne(e),n=Or(t,o).getTime()-Jg(t,o).getTime();return Math.round(n/Qg)+1}function se(e,o){for(var t=e<0?"-":"",n=Math.abs(e).toString();n.length<o;)n="0"+n;return t+n}var ro={y:function(o,t){var n=o.getUTCFullYear(),a=n>0?n:1-n;return se(t==="yy"?a%100:a,t.length)},M:function(o,t){var n=o.getUTCMonth();return t==="M"?String(n+1):se(n+1,2)},d:function(o,t){return se(o.getUTCDate(),t.length)},a:function(o,t){var n=o.getUTCHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.toUpperCase();case"aaa":return n;case"aaaaa":return n[0];case"aaaa":default:return n==="am"?"a.m.":"p.m."}},h:function(o,t){return se(o.getUTCHours()%12||12,t.length)},H:function(o,t){return se(o.getUTCHours(),t.length)},m:function(o,t){return se(o.getUTCMinutes(),t.length)},s:function(o,t){return se(o.getUTCSeconds(),t.length)},S:function(o,t){var n=t.length,a=o.getUTCMilliseconds(),l=Math.floor(a*Math.pow(10,n-3));return se(l,t.length)}},jo={midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},Rg={G:function(o,t,n){var a=o.getUTCFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return n.era(a,{width:"abbreviated"});case"GGGGG":return n.era(a,{width:"narrow"});case"GGGG":default:return n.era(a,{width:"wide"})}},y:function(o,t,n){if(t==="yo"){var a=o.getUTCFullYear(),l=a>0?a:1-a;return n.ordinalNumber(l,{unit:"year"})}return ro.y(o,t)},Y:function(o,t,n,a){var l=Ja(o,a),c=l>0?l:1-l;if(t==="YY"){var s=c%100;return se(s,2)}return t==="Yo"?n.ordinalNumber(c,{unit:"year"}):se(c,t.length)},R:function(o,t){var n=Xa(o);return se(n,t.length)},u:function(o,t){var n=o.getUTCFullYear();return se(n,t.length)},Q:function(o,t,n){var a=Math.ceil((o.getUTCMonth()+1)/3);switch(t){case"Q":return String(a);case"QQ":return se(a,2);case"Qo":return n.ordinalNumber(a,{unit:"quarter"});case"QQQ":return n.quarter(a,{width:"abbreviated",context:"formatting"});case"QQQQQ":return n.quarter(a,{width:"narrow",context:"formatting"});case"QQQQ":default:return n.quarter(a,{width:"wide",context:"formatting"})}},q:function(o,t,n){var a=Math.ceil((o.getUTCMonth()+1)/3);switch(t){case"q":return String(a);case"qq":return se(a,2);case"qo":return n.ordinalNumber(a,{unit:"quarter"});case"qqq":return n.quarter(a,{width:"abbreviated",context:"standalone"});case"qqqqq":return n.quarter(a,{width:"narrow",context:"standalone"});case"qqqq":default:return n.quarter(a,{width:"wide",context:"standalone"})}},M:function(o,t,n){var a=o.getUTCMonth();switch(t){case"M":case"MM":return ro.M(o,t);case"Mo":return n.ordinalNumber(a+1,{unit:"month"});case"MMM":return n.month(a,{width:"abbreviated",context:"formatting"});case"MMMMM":return n.month(a,{width:"narrow",context:"formatting"});case"MMMM":default:return n.month(a,{width:"wide",context:"formatting"})}},L:function(o,t,n){var a=o.getUTCMonth();switch(t){case"L":return String(a+1);case"LL":return se(a+1,2);case"Lo":return n.ordinalNumber(a+1,{unit:"month"});case"LLL":return n.month(a,{width:"abbreviated",context:"standalone"});case"LLLLL":return n.month(a,{width:"narrow",context:"standalone"});case"LLLL":default:return n.month(a,{width:"wide",context:"standalone"})}},w:function(o,t,n,a){var l=Zg(o,a);return t==="wo"?n.ordinalNumber(l,{unit:"week"}):se(l,t.length)},I:function(o,t,n){var a=Kg(o);return t==="Io"?n.ordinalNumber(a,{unit:"week"}):se(a,t.length)},d:function(o,t,n){return t==="do"?n.ordinalNumber(o.getUTCDate(),{unit:"date"}):ro.d(o,t)},D:function(o,t,n){var a=Ug(o);return t==="Do"?n.ordinalNumber(a,{unit:"dayOfYear"}):se(a,t.length)},E:function(o,t,n){var a=o.getUTCDay();switch(t){case"E":case"EE":case"EEE":return n.day(a,{width:"abbreviated",context:"formatting"});case"EEEEE":return n.day(a,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(a,{width:"short",context:"formatting"});case"EEEE":default:return n.day(a,{width:"wide",context:"formatting"})}},e:function(o,t,n,a){var l=o.getUTCDay(),c=(l-a.weekStartsOn+8)%7||7;switch(t){case"e":return String(c);case"ee":return se(c,2);case"eo":return n.ordinalNumber(c,{unit:"day"});case"eee":return n.day(l,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(l,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(l,{width:"short",context:"formatting"});case"eeee":default:return n.day(l,{width:"wide",context:"formatting"})}},c:function(o,t,n,a){var l=o.getUTCDay(),c=(l-a.weekStartsOn+8)%7||7;switch(t){case"c":return String(c);case"cc":return se(c,t.length);case"co":return n.ordinalNumber(c,{unit:"day"});case"ccc":return n.day(l,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(l,{width:"narrow",context:"standalone"});case"cccccc":return n.day(l,{width:"short",context:"standalone"});case"cccc":default:return n.day(l,{width:"wide",context:"standalone"})}},i:function(o,t,n){var a=o.getUTCDay(),l=a===0?7:a;switch(t){case"i":return String(l);case"ii":return se(l,t.length);case"io":return n.ordinalNumber(l,{unit:"day"});case"iii":return n.day(a,{width:"abbreviated",context:"formatting"});case"iiiii":return n.day(a,{width:"narrow",context:"formatting"});case"iiiiii":return n.day(a,{width:"short",context:"formatting"});case"iiii":default:return n.day(a,{width:"wide",context:"formatting"})}},a:function(o,t,n){var a=o.getUTCHours(),l=a/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.dayPeriod(l,{width:"abbreviated",context:"formatting"});case"aaa":return n.dayPeriod(l,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return n.dayPeriod(l,{width:"narrow",context:"formatting"});case"aaaa":default:return n.dayPeriod(l,{width:"wide",context:"formatting"})}},b:function(o,t,n){var a=o.getUTCHours(),l;switch(a===12?l=jo.noon:a===0?l=jo.midnight:l=a/12>=1?"pm":"am",t){case"b":case"bb":return n.dayPeriod(l,{width:"abbreviated",context:"formatting"});case"bbb":return n.dayPeriod(l,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return n.dayPeriod(l,{width:"narrow",context:"formatting"});case"bbbb":default:return n.dayPeriod(l,{width:"wide",context:"formatting"})}},B:function(o,t,n){var a=o.getUTCHours(),l;switch(a>=17?l=jo.evening:a>=12?l=jo.afternoon:a>=4?l=jo.morning:l=jo.night,t){case"B":case"BB":case"BBB":return n.dayPeriod(l,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(l,{width:"narrow",context:"formatting"});case"BBBB":default:return n.dayPeriod(l,{width:"wide",context:"formatting"})}},h:function(o,t,n){if(t==="ho"){var a=o.getUTCHours()%12;return a===0&&(a=12),n.ordinalNumber(a,{unit:"hour"})}return ro.h(o,t)},H:function(o,t,n){return t==="Ho"?n.ordinalNumber(o.getUTCHours(),{unit:"hour"}):ro.H(o,t)},K:function(o,t,n){var a=o.getUTCHours()%12;return t==="Ko"?n.ordinalNumber(a,{unit:"hour"}):se(a,t.length)},k:function(o,t,n){var a=o.getUTCHours();return a===0&&(a=24),t==="ko"?n.ordinalNumber(a,{unit:"hour"}):se(a,t.length)},m:function(o,t,n){return t==="mo"?n.ordinalNumber(o.getUTCMinutes(),{unit:"minute"}):ro.m(o,t)},s:function(o,t,n){return t==="so"?n.ordinalNumber(o.getUTCSeconds(),{unit:"second"}):ro.s(o,t)},S:function(o,t){return ro.S(o,t)},X:function(o,t,n,a){var l=a._originalDate||o,c=l.getTimezoneOffset();if(c===0)return"Z";switch(t){case"X":return Za(c);case"XXXX":case"XX":return po(c);case"XXXXX":case"XXX":default:return po(c,":")}},x:function(o,t,n,a){var l=a._originalDate||o,c=l.getTimezoneOffset();switch(t){case"x":return Za(c);case"xxxx":case"xx":return po(c);case"xxxxx":case"xxx":default:return po(c,":")}},O:function(o,t,n,a){var l=a._originalDate||o,c=l.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+Qa(c,":");case"OOOO":default:return"GMT"+po(c,":")}},z:function(o,t,n,a){var l=a._originalDate||o,c=l.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+Qa(c,":");case"zzzz":default:return"GMT"+po(c,":")}},t:function(o,t,n,a){var l=a._originalDate||o,c=Math.floor(l.getTime()/1e3);return se(c,t.length)},T:function(o,t,n,a){var l=a._originalDate||o,c=l.getTime();return se(c,t.length)}};function Qa(e,o){var t=e>0?"-":"+",n=Math.abs(e),a=Math.floor(n/60),l=n%60;if(l===0)return t+String(a);var c=o;return t+String(a)+c+se(l,2)}function Za(e,o){if(e%60===0){var t=e>0?"-":"+";return t+se(Math.abs(e)/60,2)}return po(e,o)}function po(e,o){var t=o||"",n=e>0?"-":"+",a=Math.abs(e),l=se(Math.floor(a/60),2),c=se(a%60,2);return n+l+t+c}var Ra=function(o,t){switch(o){case"P":return t.date({width:"short"});case"PP":return t.date({width:"medium"});case"PPP":return t.date({width:"long"});case"PPPP":default:return t.date({width:"full"})}},el=function(o,t){switch(o){case"p":return t.time({width:"short"});case"pp":return t.time({width:"medium"});case"ppp":return t.time({width:"long"});case"pppp":default:return t.time({width:"full"})}},eh=function(o,t){var n=o.match(/(P+)(p+)?/)||[],a=n[1],l=n[2];if(!l)return Ra(o,t);var c;switch(a){case"P":c=t.dateTime({width:"short"});break;case"PP":c=t.dateTime({width:"medium"});break;case"PPP":c=t.dateTime({width:"long"});break;case"PPPP":default:c=t.dateTime({width:"full"});break}return c.replace("{{date}}",Ra(a,t)).replace("{{time}}",el(l,t))},oh={p:el,P:eh};function rh(e){var o=new Date(Date.UTC(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()));return o.setUTCFullYear(e.getFullYear()),e.getTime()-o.getTime()}var th=["D","DD"],nh=["YY","YYYY"];function ah(e){return th.indexOf(e)!==-1}function lh(e){return nh.indexOf(e)!==-1}function ol(e,o,t){if(e==="YYYY")throw new RangeError("Use `yyyy` instead of `YYYY` (in `".concat(o,"`) for formatting years to the input `").concat(t,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if(e==="YY")throw new RangeError("Use `yy` instead of `YY` (in `".concat(o,"`) for formatting years to the input `").concat(t,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if(e==="D")throw new RangeError("Use `d` instead of `D` (in `".concat(o,"`) for formatting days of the month to the input `").concat(t,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if(e==="DD")throw new RangeError("Use `dd` instead of `DD` (in `".concat(o,"`) for formatting days of the month to the input `").concat(t,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"))}var ih={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},ch=function(o,t,n){var a,l=ih[o];return typeof l=="string"?a=l:t===1?a=l.one:a=l.other.replace("{{count}}",t.toString()),n!=null&&n.addSuffix?n.comparison&&n.comparison>0?"in "+a:a+" ago":a};function Gt(e){return function(){var o=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=o.width?String(o.width):e.defaultWidth,n=e.formats[t]||e.formats[e.defaultWidth];return n}}var sh={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},dh={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},gh={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},hh={date:Gt({formats:sh,defaultWidth:"full"}),time:Gt({formats:dh,defaultWidth:"full"}),dateTime:Gt({formats:gh,defaultWidth:"full"})},fh={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},mh=function(o,t,n,a){return fh[o]};function tr(e){return function(o,t){var n=t!=null&&t.context?String(t.context):"standalone",a;if(n==="formatting"&&e.formattingValues){var l=e.defaultFormattingWidth||e.defaultWidth,c=t!=null&&t.width?String(t.width):l;a=e.formattingValues[c]||e.formattingValues[l]}else{var s=e.defaultWidth,d=t!=null&&t.width?String(t.width):e.defaultWidth;a=e.values[d]||e.values[s]}var g=e.argumentCallback?e.argumentCallback(o):o;return a[g]}}var ph={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},uh={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},yh={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},bh={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},xh={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},kh={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},Ch=function(o,t){var n=Number(o),a=n%100;if(a>20||a<10)switch(a%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},wh={ordinalNumber:Ch,era:tr({values:ph,defaultWidth:"wide"}),quarter:tr({values:uh,defaultWidth:"wide",argumentCallback:function(o){return o-1}}),month:tr({values:yh,defaultWidth:"wide"}),day:tr({values:bh,defaultWidth:"wide"}),dayPeriod:tr({values:xh,defaultWidth:"wide",formattingValues:kh,defaultFormattingWidth:"wide"})};function nr(e){return function(o){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=t.width,a=n&&e.matchPatterns[n]||e.matchPatterns[e.defaultMatchWidth],l=o.match(a);if(!l)return null;var c=l[0],s=n&&e.parsePatterns[n]||e.parsePatterns[e.defaultParseWidth],d=Array.isArray(s)?vh(s,function(f){return f.test(c)}):Sh(s,function(f){return f.test(c)}),g;g=e.valueCallback?e.valueCallback(d):d,g=t.valueCallback?t.valueCallback(g):g;var m=o.slice(c.length);return{value:g,rest:m}}}function Sh(e,o){for(var t in e)if(e.hasOwnProperty(t)&&o(e[t]))return t}function vh(e,o){for(var t=0;t<e.length;t++)if(o(e[t]))return t}function Th(e){return function(o){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=o.match(e.matchPattern);if(!n)return null;var a=n[0],l=o.match(e.parsePattern);if(!l)return null;var c=e.valueCallback?e.valueCallback(l[0]):l[0];c=t.valueCallback?t.valueCallback(c):c;var s=o.slice(a.length);return{value:c,rest:s}}}var Ih=/^(\d+)(th|st|nd|rd)?/i,Fh=/\d+/i,zh={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},Mh={any:[/^b/i,/^(a|c)/i]},Wh={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},Hh={any:[/1/i,/2/i,/3/i,/4/i]},jh={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},Ph={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},Vh={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},Ah={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},Eh={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},Dh={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},$h={ordinalNumber:Th({matchPattern:Ih,parsePattern:Fh,valueCallback:function(o){return parseInt(o,10)}}),era:nr({matchPatterns:zh,defaultMatchWidth:"wide",parsePatterns:Mh,defaultParseWidth:"any"}),quarter:nr({matchPatterns:Wh,defaultMatchWidth:"wide",parsePatterns:Hh,defaultParseWidth:"any",valueCallback:function(o){return o+1}}),month:nr({matchPatterns:jh,defaultMatchWidth:"wide",parsePatterns:Ph,defaultParseWidth:"any"}),day:nr({matchPatterns:Vh,defaultMatchWidth:"wide",parsePatterns:Ah,defaultParseWidth:"any"}),dayPeriod:nr({matchPatterns:Eh,defaultMatchWidth:"any",parsePatterns:Dh,defaultParseWidth:"any"})},Lh={code:"en-US",formatDistance:ch,formatLong:hh,formatRelative:mh,localize:wh,match:$h,options:{weekStartsOn:0,firstWeekContainsDate:1}},_h=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,Bh=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,Oh=/^'([^]*?)'?$/,Nh=/''/g,qh=/[a-zA-Z]/;function Uh(e,o,t){var n,a,l,c,s,d,g,m,f,p,u,y,k,x;ze(2,arguments);var C=String(o),S=Br(),w=(n=(a=void 0)!==null&&a!==void 0?a:S.locale)!==null&&n!==void 0?n:Lh,v=mo((l=(c=(s=(d=void 0)!==null&&d!==void 0?d:void 0)!==null&&s!==void 0?s:S.firstWeekContainsDate)!==null&&c!==void 0?c:(g=S.locale)===null||g===void 0||(m=g.options)===null||m===void 0?void 0:m.firstWeekContainsDate)!==null&&l!==void 0?l:1);if(!(v>=1&&v<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var b=mo((f=(p=(u=(y=void 0)!==null&&y!==void 0?y:void 0)!==null&&u!==void 0?u:S.weekStartsOn)!==null&&p!==void 0?p:(k=S.locale)===null||k===void 0||(x=k.options)===null||x===void 0?void 0:x.weekStartsOn)!==null&&f!==void 0?f:0);if(!(b>=0&&b<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");if(!w.localize)throw new RangeError("locale must contain localize property");if(!w.formatLong)throw new RangeError("locale must contain formatLong property");var I=Ne(e);if(!Bg(I))throw new RangeError("Invalid time value");var T=rh(I),P=Ng(I,T),E={firstWeekContainsDate:v,weekStartsOn:b,locale:w,_originalDate:I},D=C.match(Bh).map(function(z){var A=z[0];if(A==="p"||A==="P"){var W=oh[A];return W(z,w.formatLong)}return z}).join("").match(_h).map(function(z){if(z==="''")return"'";var A=z[0];if(A==="'")return Gh(z);var W=Rg[A];if(W)return lh(z)&&ol(z,o,String(e)),ah(z)&&ol(z,o,String(e)),W(P,z,w.localize,E);if(A.match(qh))throw new RangeError("Format string contains an unescaped latin alphabet character `"+A+"`");return z}).join("");return D}function Gh(e){var o=e.match(Oh);return o?o[1].replace(Nh,"'"):e}const Yt=e=>typeof e=="string"?e:void 0,rl=({value:e,defaultValue:o}={})=>{const[t,n]=h.useState(!1),[a,l]=h.useState(!1),[c,s]=h.useState(()=>Yt(e)??Yt(o)??Uh(new Date,"yyyy-MM-dd")),d=Yt(e);return h.useEffect(()=>{d!==void 0&&s(d)},[d]),{date:c,setDate:s,isHovered:t,setIsHovered:n,isFocused:a,setIsFocused:l}},Yh=e=>r.jsx(i.Input,{type:"date",...e}),tl=({id:e,name:o,label:t,date:n,children:a,helperText:l,shadow:c={},size:s="md",variant:d="default",shape:g="default",views:m={container:{},label:{},helperText:{},text:{},field:{}},error:f=!1,isHovered:p=!1,isFocused:u=!1,isDisabled:y=!1,isReadOnly:k=!1,setDate:x=()=>{},setIsFocused:C=()=>{},setIsHovered:S=()=>{},onChange:w,onChangeText:v,value:b,defaultValue:I,...T})=>{const{themeMode:P}=i.useTheme(),E=h.useId(),D=e??E,z=!!t,A=()=>S(!p),W=()=>C(!0),H=j=>{typeof j=="string"?(x(j),v&&v(j)):(x(j.target.value),w&&w(j.target.value))},V={margin:0,paddingVertical:0,paddingHorizontal:0,width:"100%",height:"100%",border:"none",on:{focus:{outline:"none",backgroundColor:"transparent"}},transition:"all 0.2s ease-in-out",fontSize:i.Typography.fontSizes[s],backgroundColor:"transparent",color:y?"color-gray-400":"color-gray-900",cursor:y?"not-allowed":k?"auto":"pointer",...m.field};return r.jsx(Ue,{helperText:l,error:f,views:m,children:r.jsx(oo,{label:t,size:s,error:f,shape:g,views:m,shadow:c,color:"theme-primary",variant:d,value:n,isHovered:p,isDisabled:y,isReadOnly:k,isFocused:u,showLabel:z,onMouseEnter:A,onMouseLeave:A,children:r.jsxs(Ho,{children:[z&&r.jsx(ho,{htmlFor:D,color:"theme-primary",error:f,views:m,children:t}),r.jsx(Yh,{id:D,name:o,role:"textbox","aria-label":!z&&typeof t=="string"?t:void 0,onFocus:W,disabled:y,readOnly:k,...V,...T,...v&&{onChangeText:H},onChange:H,value:n})]})})})},Kh=e=>{const o=rl(e);return r.jsx(tl,{...o,...e})},nl=e=>{const o=Lt(e),[t,n]=h.useState(!1);return{isVisible:t,setIsVisible:n,...e,...o}},al={xs:14,sm:16,md:16,lg:18,xl:20},Xh=({visibleIcon:e,hiddenIcon:o,...t})=>{const{isVisible:n,setIsVisible:a,...l}=nl(t),c=al[t.size??"md"]??al.md,s=c-2;return r.jsx(or,{...l,type:n?"text":"password",isClearable:!1,right:r.jsx(i.View,{display:"flex",alignItems:"center",justifyContent:"center",width:`${c}px`,height:`${c}px`,minWidth:`${c}px`,color:"color-gray-500",cursor:t.isDisabled?"not-allowed":"pointer",transition:"color 0.2s ease",onClick:()=>{t.isDisabled||a(!n)},children:n?e??r.jsx(kt,{widthHeight:s}):o??r.jsx(xt,{widthHeight:s})})})},ll=(e,o,t)=>{const[n,a]=h.useState(e),[l,c]=h.useState(o?{value:o,label:o}:e[0]),[s,d]=h.useState([]),[g,m]=h.useState(0),[f,p]=h.useState(t??""),[u,y]=h.useState(!1);return{filteredItems:n,setFilteredItems:a,selectedItem:l,setSelectedItem:c,selectedItems:s,setSelectedItems:d,highlightedIndex:g,setHighlightedIndex:m,searchQuery:f,setSearchQuery:p,isDropdownVisible:u,setIsDropdownVisible:y}},Jh={xs:12,sm:14,md:16,lg:20,xl:24},Qh={maxHeight:"280px",overflowY:"auto",zIndex:1e3,backgroundColor:"color-white",borderRadius:12,borderWidth:"1px",borderStyle:"solid",borderColor:"color-gray-200",boxShadow:"0 4px 12px rgba(0, 0, 0, 0.1)"},il={enter:{opacity:1,transform:"translateY(0) scale(1)",transition:"all 0.2s ease-in-out"},initial:{opacity:0,transform:"translateY(-8px) scale(0.96)"}},Zh={padding:"8px",borderBottomWidth:"1px",borderBottomStyle:"solid",borderBottomColor:"color-gray-100",backgroundColor:"color-gray-50",borderTopLeftRadius:10,borderTopRightRadius:10},Rh={padding:"8px 10px",cursor:"pointer",borderRadius:8,margin:"1px 4px",transition:"all 0.15s ease-in-out"},ef={padding:"24px 16px",display:"flex",flexDirection:"column",alignItems:"center",gap:"8px"},cl={open:{transform:"rotate(180deg)",transition:"all 0.2s ease-in-out"},closed:{transform:"rotate(0deg)",transition:"all 0.2s ease-in-out"}},of={display:"inline-flex",alignItems:"center",gap:"4px",padding:"2px 8px",backgroundColor:"color-gray-100",borderRadius:8,fontSize:"12px",fontWeight:"500",color:"color-gray-700",transition:"all 0.15s ease-in-out"},sl=({placeholder:e,items:o,showTick:t=!0,onSelect:n,searchEnabled:a=!0,left:l,right:c,label:s,filteredItems:d,setSelectedItem:g,selectedItem:m,selectedItems:f,setSelectedItems:p,highlightedIndex:u,setHighlightedIndex:y,searchQuery:k,setSearchQuery:x,setFilteredItems:C,views:S,isDropdownVisible:w,setIsDropdownVisible:v,isMulti:b=!1,searchPlaceholder:I,size:T="md",...P})=>{const E=h.useId(),D=P.id??E,z=`${D}-dropdown`,A=`${D}-label`,{ref:W,relation:H}=i.useElementPosition({trackChanges:!0,trackOnScroll:!0,trackOnResize:!0,throttleMs:10}),V=h.useRef(null),[j,M]=h.useState(!1),[L,_]=h.useState(!1),O=()=>{var Y;const B=L?il.enter:il.initial;if(!W.current)return{};const $=W.current.getBoundingClientRect(),q={position:"fixed",left:$.left,width:$.width,zIndex:1e4,...B};return((Y=H==null?void 0:H.space)==null?void 0:Y.vertical)==="top"?{...q,bottom:window.innerHeight-$.top+6}:{...q,top:$.bottom+6}};h.useEffect(()=>{if(w){const B=setTimeout(()=>_(!0),10);return()=>clearTimeout(B)}_(!1)},[w]),h.useEffect(()=>{const B=$=>{!$.composedPath().some(Y=>(Y==null?void 0:Y.id)===z)&&W.current&&!W.current.contains($.target)&&v(!1)};return document.addEventListener("mousedown",B),()=>document.removeEventListener("mousedown",B)},[]);const N=B=>{if(x(B),B==="")C(o);else{const $=o.filter(q=>q.label.toLowerCase().includes(B.toLowerCase()));C($)}y(0)},U=B=>{if(b){const $=f.some(J=>J.value===B.value);let q;$?q=f.filter(J=>J.value!==B.value):q=[...f,B],p(q),n==null||n(q)}else g(B),n==null||n(B),v(!1)},X=(B,$)=>{B.stopPropagation();const q=f.filter(J=>J.value!==$.value);p(q),n==null||n(q)},oe=B=>b?f.some($=>$.value===B.value):B.value===m.value;return r.jsxs(i.Horizontal,{flexWrap:"nowrap",gap:15,alignItems:"center",width:"100%",...P,children:[s&&r.jsx(i.Text,{id:A,views:S==null?void 0:S.label,children:s}),r.jsxs(i.View,{position:"relative",width:"100%",children:[r.jsx("div",{ref:W,role:"combobox",tabIndex:0,"aria-expanded":w,"aria-haspopup":"listbox","aria-controls":w?z:void 0,"aria-labelledby":s?A:void 0,onClick:()=>v(!w),onKeyDown:B=>{B.key==="Enter"||B.key===" "||B.key==="ArrowDown"?(B.preventDefault(),v(!0)):B.key==="Escape"&&v(!1)},style:{width:"100%"},children:r.jsxs(oo,{size:T,isHovered:j,isFocused:w,onMouseEnter:()=>M(!0),onMouseLeave:()=>M(!1),cursor:"pointer",views:{container:S==null?void 0:S.container},children:[r.jsxs(i.Horizontal,{gap:10,alignItems:"center",flex:1,minWidth:0,flexWrap:b?"wrap":"nowrap",...S==null?void 0:S.labelContainer,children:[l,b?f.length>0?r.jsx(i.Horizontal,{gap:6,flexWrap:"wrap",alignItems:"center",children:f.map(B=>r.jsxs(i.Horizontal,{...of,_hover:{backgroundColor:"color-gray-200"},children:[B.icon&&r.jsx(i.View,{flexShrink:0,children:B.icon}),r.jsx(i.Text,{size:"sm",color:"color-gray-700",weight:"medium",children:B.label}),r.jsx(He,{widthHeight:12,color:"color-gray-500",cursor:"pointer",onClick:$=>X($,B)})]},B.value))}):r.jsx(i.Text,{weight:"medium",flexGrow:1,color:"color-gray-500",style:{whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},...S==null?void 0:S.label,children:e}):r.jsxs(r.Fragment,{children:[m.icon&&m.label!==e&&r.jsx(i.View,{children:m.icon}),r.jsx(i.Text,{weight:"medium",flexGrow:1,color:m.label===e?"color-gray-500":"color-gray-800",style:{whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},...S==null?void 0:S.label,children:m.label})]})]}),r.jsxs(i.Horizontal,{gap:8,alignItems:"center",flexShrink:0,children:[c,r.jsx(i.View,{style:w?cl.open:cl.closed,children:r.jsx(he,{widthHeight:Jh[T],orientation:"down",color:w?"color-gray-700":"color-gray-400"})})]})]})}),w&&r.jsx(ft,{children:r.jsxs(i.View,{ref:V,id:z,role:"listbox","aria-labelledby":s?A:void 0,...Qh,style:O(),...S==null?void 0:S.dropdown,children:[a&&r.jsx(i.View,{...Zh,children:r.jsx(or,{id:`${D}-search`,name:`${P.name??D}-search`,width:"100%",type:"search",autoFocus:!0,value:k,onChange:B=>N(B),hint:I||e||"Search...","aria-label":I||"Search",isClearable:!1,left:r.jsx(wr,{widthHeight:14,color:"color-gray-400"}),views:{container:{width:"100%",padding:"0",backgroundColor:"transparent",borderColor:"color-gray-200",...S==null?void 0:S.text},field:{fontSize:"13px"}}})}),d.length>0&&r.jsx(i.View,{margin:0,padding:"4px",children:d.map((B,$)=>{const q=oe(B),J=$===u;return r.jsxs(i.Horizontal,{role:"option","aria-selected":q,justifyContent:"space-between",alignItems:"center",...Rh,backgroundColor:q&&J?"color-blue-100":q?"color-blue-50":J?"color-gray-100":"transparent",onMouseEnter:()=>y($),onClick:()=>U(B),...S==null?void 0:S.item,children:[r.jsxs(i.Horizontal,{gap:8,alignItems:"center",children:[B.icon&&r.jsx(i.View,{flexShrink:0,children:B.icon}),r.jsx(i.Text,{size:"sm",color:q?"theme-primary":"color-gray-800",weight:q?"medium":"normal",children:B.label})]}),q&&t&&r.jsx(Xo,{widthHeight:16,color:"theme-primary"})]},B.value)})}),d.length===0&&r.jsxs(i.Vertical,{...ef,children:[r.jsx(wr,{widthHeight:24,color:"color-gray-300"}),r.jsx(i.Text,{color:"color-gray-500",size:"sm",align:"center",children:"No results found"}),r.jsx(i.Text,{color:"color-gray-400",size:"xs",align:"center",children:"Try a different search term"})]})]})})]})]})},rf=({id:e,name:o,items:t,placeholder:n,searchPlaceholder:a,...l})=>{const c=ll(t,n,a);return r.jsx(sl,{id:e,name:o,items:t,searchPlaceholder:a,...c,...l})},dl=e=>{const{tags:o,defaultTags:t=[],onTagsChange:n,onTagAdd:a,onTagRemove:l,maxTags:c,minTagLength:s=1,maxTagLength:d=50,allowDuplicates:g=!1,separators:m=["enter","comma"],isDisabled:f=!1,isReadOnly:p=!1}=e,[u,y]=h.useState(""),[k,x]=h.useState(()=>(o||t||[]).map((H,V)=>({id:`tag-${V}-${Date.now()}`,value:H}))),[C,S]=h.useState(!1),[w,v]=h.useState(!1),b=o&&Array.isArray(o)?o.map((W,H)=>({id:`tag-${H}-${Date.now()}`,value:W})):k;h.useEffect(()=>{o&&Array.isArray(o)&&x(o.map((W,H)=>({id:`tag-${H}-${Date.now()}`,value:W})))},[o]);const I=h.useCallback(W=>{const H=W.trim();return!(H.length<s||H.length>d||!g&&b.map(j=>j.value.toLowerCase()).includes(H.toLowerCase())||c&&b.length>=c)},[b,s,d,g,c]),T=h.useCallback(W=>{if(f||p)return;const H=W.trim();if(!H||!I(H))return;const V={id:`tag-${Date.now()}-${Math.random()}`,value:H},j=[...b,V],M=j.map(L=>L.value);o||x(j),n==null||n(M),a==null||a(H),y("")},[b,I,n,a,f,p,o]),P=h.useCallback(W=>{if(f||p)return;const H=b[W];if(!H)return;const V=b.filter((M,L)=>L!==W),j=V.map(M=>M.value);o||x(V),n==null||n(j),l==null||l(H.value,W)},[b,n,l,f,p,o]),E=h.useCallback(W=>{if(f||p)return;const H=W.target.value;if(m.includes("comma")&&H.includes(",")){const V=H.split(","),j=V[0],M=V.slice(1).join(",");j.trim()&&T(j),y(M);return}y(H)},[T,m,f,p]),D=h.useCallback(W=>{if(f||p)return;const{key:H}=W;if(m.includes("enter")&&H==="Enter"){W.preventDefault(),u.trim()&&T(u);return}if(m.includes("tab")&&H==="Tab"&&u.trim()){W.preventDefault(),T(u);return}if(m.includes("space")&&H===" "&&u.trim()){W.preventDefault(),T(u);return}if(H==="Backspace"&&!u&&b.length>0){W.preventDefault(),P(b.length-1);return}},[T,P,u,b,m,f,p]),z=h.useCallback(()=>{var W;S(!0),(W=e.onFocus)==null||W.call(e)},[e.onFocus]),A=h.useCallback(()=>{var W;S(!1),u.trim()&&T(u),(W=e.onBlur)==null||W.call(e)},[T,u,e.onBlur]);return{inputValue:u,setInputValue:y,tags:b,setTags:x,isFocused:C,setIsFocused:S,isHovered:w,setIsHovered:v,addTag:T,removeTag:P,handleInputChange:E,handleKeyDown:D,handleFocus:z,handleBlur:A,validateTag:I}},tf=({tag:e,onRemove:o,isRemovable:t,size:n,views:a,isDisabled:l,isReadOnly:c})=>{const[s,d]=h.useState(!1),g={xs:{padding:"2px 8px",fontSize:"10px",iconSize:10},sm:{padding:"4px 10px",fontSize:"12px",iconSize:12},md:{padding:"6px 14px",fontSize:"14px",iconSize:14},lg:{padding:"8px 16px",fontSize:"16px",iconSize:16},xl:{padding:"10px 18px",fontSize:"18px",iconSize:18}}[n]||{padding:"6px 14px",fontSize:"14px",iconSize:14};return r.jsxs(i.Horizontal,{alignItems:"center",gap:6,padding:g.padding,backgroundColor:"theme-primary-100",borderRadius:"9999px",borderWidth:"1px",borderStyle:"solid",borderColor:"theme-primary-250",transition:"all 0.15s ease-in-out",opacity:l?.6:1,maxWidth:"100%",minWidth:0,_hover:!l&&!c?{backgroundColor:"theme-primary-180",borderColor:"theme-primary-400"}:{},...a==null?void 0:a.tag,children:[r.jsx(i.Text,{fontSize:g.fontSize,color:l?"color-gray-400":"theme-primary",maxLines:1,minWidth:0,...a==null?void 0:a.tagText,children:e}),t&&!l&&!c&&r.jsx(i.View,{cursor:"pointer",padding:"2px",borderRadius:"50%",transition:"all 0.15s ease-in-out",backgroundColor:s?"color-red-100":"transparent",opacity:s?1:.7,onMouseEnter:()=>d(!0),onMouseLeave:()=>d(!1),onClick:m=>{m.stopPropagation(),o()},_hover:{backgroundColor:"color-red-100"},...a==null?void 0:a.tagRemove,children:r.jsx(He,{widthHeight:g.iconSize,color:s?"color-red-500":"color-gray-400"})})]})},gl=({id:e,name:o,label:t,placeholder:n="Type and press Enter to add tags...",helperText:a,error:l=!1,inputValue:c="",tags:s=[],left:d,right:g,shadow:m={},views:f={},size:p="md",shape:u="default",variant:y="default",isDisabled:k=!1,isReadOnly:x=!1,isAutoFocus:C=!1,isRemovable:S=!0,isFocused:w=!1,isHovered:v=!1,maxTags:b,handleInputChange:I,handleKeyDown:T,handleFocus:P,handleBlur:E,removeTag:D,setIsHovered:z,onClick:A,setInputValue:W,setIsFocused:H,addTag:V,defaultTags:j,onTagsChange:M,onTagAdd:L,onTagRemove:_,minTagLength:O,maxTagLength:N,allowDuplicates:U,separators:X,menuItems:oe,onMenuItemSelect:B,onFocus:$,onBlur:q,validateTag:J,...Y})=>{const{getColor:Z,themeMode:ee}=i.useTheme(),ne=!!(t&&(w||s.length>0||c)),K=b&&s.length>=b,re={border:"none",outline:"none",backgroundColor:"transparent",fontSize:i.Typography.fontSizes[p],color:k?"color-gray-400":"color-gray-800",flex:1,minWidth:"120px",transition:"all 0.2s ease-in-out",...f==null?void 0:f.input};return r.jsx(Ue,{error:!!l,helperText:typeof l=="string"?l:a,views:f,...Y,children:r.jsxs(oo,{label:t,shadow:m,value:s.length>0||c?"has-content":"",size:p,shape:u,variant:y,error:!!l,showLabel:ne,isFocused:w,isHovered:v,isDisabled:k,isReadOnly:x,views:{...f,container:{...f==null?void 0:f.container,...f==null?void 0:f.inputContainer}},onClick:A,onMouseEnter:()=>z==null?void 0:z(!0),onMouseLeave:()=>z==null?void 0:z(!1),children:[d,r.jsxs(Ho,{children:[t&&r.jsx(ho,{size:p,error:!!l,views:f,children:t}),r.jsxs(i.Horizontal,{alignItems:"center",gap:8,flexWrap:"wrap",width:"100%",minHeight:i.Typography.fontSizes[p],padding:"0",...f==null?void 0:f.tagsContainer,children:[s.map((ie,ge)=>r.jsx(tf,{tag:ie.value,onRemove:()=>D==null?void 0:D(ge),isRemovable:S,size:p,views:f,isDisabled:k,isReadOnly:x},ie.id)),!K&&r.jsx(i.Input,{id:e,name:o,type:"text",value:c,placeholder:s.length===0?n:"",disabled:k,readOnly:x,autoFocus:C,onChange:I,onKeyDown:T,onFocus:P,onBlur:E,autoComplete:"off",...re}),K&&r.jsxs(i.Text,{fontSize:i.Typography.fontSizes[p],color:"color-gray-500",fontStyle:"italic",...f==null?void 0:f.placeholder,children:["Maximum ",b," tags reached"]})]})]}),g]})})},nf=e=>{const o=dl(e),{tags:t,...n}=e,{setTags:a,...l}=o;return r.jsx(gl,{...l,...n})};function af(e){const o=setTimeout(e,0),t=setTimeout(e,10),n=setTimeout(e,50);return[o,t,n]}const hl=({value:e,defaultValue:o="",length:t=6,onChange:n,onChangeText:a,onComplete:l,onKeyDown:c,onKeyPress:s,onBlur:d,onFocus:g,isReadOnly:m,isDisabled:f,pattern:p,stepValues:u,pasteTransformer:y})=>{var oe,B;const k=e!==void 0,x=k?e:o,[C,S]=h.useState(String(x??"").slice(0,t)||""),[w,v]=h.useState(!1),[b,I]=h.useState(!1),[T,P]=h.useState(null),[E,D]=h.useState(null),z=h.useRef(null),A=h.useRef(null),W=h.useRef({value:C,onChange:n||(()=>{}),isIOS:typeof window<"u"&&((B=(oe=window==null?void 0:window.CSS)==null?void 0:oe.supports)==null?void 0:B.call(oe,"-webkit-touch-callout","none"))}),H=h.useRef({prev:[null,null,"none"]}),V=p?typeof p=="string"?new RegExp(p):p:null;h.useEffect(()=>{if(k&&e!==C){const $=String(e??"").slice(0,t)||"";S($)}},[k,e,t,C]);const j=h.useCallback($=>{let q=$;if(u&&u.length>0&&$){const J=parseInt($,10);if(!isNaN(J)){let Y=u[0],Z=Math.abs(J-Y);for(let ee=1;ee<u.length;ee++){const ne=Math.abs(J-u[ee]);ne<Z&&(Z=ne,Y=u[ee])}q=Y.toString()}}S(q),n&&n(q),a&&a(q),l&&q.length===t&&l(q)},[n,a,l,t,u,k]),M=h.useCallback($=>{$&&z.current!==$&&Object.defineProperty(z,"current",{value:$,writable:!0})},[]),L=h.useCallback($=>{var Y,Z,ee,ne;const q=typeof $=="string"?$:((Y=$==null?void 0:$.currentTarget)==null?void 0:Y.value)??((Z=$==null?void 0:$.target)==null?void 0:Z.value)??((ee=$==null?void 0:$.nativeEvent)==null?void 0:ee.text)??"",J=String(q).slice(0,t);if(J.length>0&&V&&!V.test(J)){(ne=$==null?void 0:$.preventDefault)==null||ne.call($);return}j(J),z.current&&(z.current.value=J)},[t,V,j,z]),_=h.useCallback(()=>{const $=z.current;if($&&typeof $.setSelectionRange=="function"){const q=typeof $.value=="string"?$.value.length:0,J=Math.min(q,t-1),Y=q;$.setSelectionRange(J,Y),P(J),D(Y)}v(!0),g&&g()},[t,g]),O=h.useCallback($=>{v(!1),d&&d($)},[d]),N=h.useCallback($=>{c&&c($)},[]),U=h.useCallback($=>{s&&s($)},[]),X=h.useCallback($=>{const q=z.current;if(!$.clipboardData||!q)return;const J=$.clipboardData.getData("text/plain"),Y=y?y(J):J;$.preventDefault();const Z=q.selectionStart||0,ee=q.selectionEnd||0,re=(Z!==ee?C.slice(0,Z)+Y+C.slice(ee):C.slice(0,Z)+Y+C.slice(Z)).slice(0,t);if(re.length>0&&V&&!V.test(re))return;q.value=re,j(re),S(re);const ie=Math.min(re.length,t-1),ge=re.length;q.setSelectionRange(ie,ge),P(ie),D(ge)},[t,y,V,j,C,S]);return h.useEffect(()=>{const $=z.current,q=A.current;if(!$||!q||typeof document>"u")return;W.current.value!==$.value&&W.current.onChange&&W.current.onChange($.value),H.current.prev=[$.selectionStart,$.selectionEnd,$.selectionDirection];function J(){if(document.activeElement!==$){P(null),D(null);return}const K=($==null?void 0:$.selectionStart)??null,re=($==null?void 0:$.selectionEnd)??null,ie=($==null?void 0:$.selectionDirection)??null,ge=($==null?void 0:$.maxLength)??0,We=($==null?void 0:$.value)??"",le=H.current.prev;let te=-1,ae=-1,ce="none";if(We.length!==0&&K!==null&&re!==null){const be=K===re,Ie=K===We.length&&We.length<ge;if(be&&!Ie){const ve=K;if(ve===0)te=0,ae=1,ce="forward";else if(ve===ge)te=ve-1,ae=ve,ce="backward";else if(ge>1&&We.length>1){let Je=0;if(le[0]!==null&&le[1]!==null){ce=ve<le[1]?"backward":"forward";const co=le[0]===le[1]&&le[0]<ge;ce==="backward"&&!co&&(Je=-1)}te=Je+ve,ae=Je+ve+1}}te!==-1&&ae!==-1&&te!==ae&&z.current&&z.current.setSelectionRange(te,ae,ce)}const ye=te!==-1?te:K,Q=ae!==-1?ae:re,R=ce!=="none"?ce:ie;P(ye),D(Q),H.current.prev=[ye,Q,R]}document.addEventListener("selectionchange",J,{capture:!0}),J(),document.activeElement===$&&v(!0);const Y=q,Z=()=>{var K;Y&&typeof((K=Y.style)==null?void 0:K.setProperty)=="function"&&Y.style.setProperty("--root-height",`${$.clientHeight}px`)};Z();const ee=typeof window<"u"?window.ResizeObserver:void 0,ne=typeof ee=="function"?new ee(Z):null;return ne==null||ne.observe($),()=>{document.removeEventListener("selectionchange",J,{capture:!0}),ne==null||ne.disconnect()}},[]),h.useEffect(()=>{if(typeof Event>"u")return;const $=af(()=>{var ee,ne,K;const q=z.current;q&&typeof q.dispatchEvent=="function"&&q.dispatchEvent(new Event("input"));const J=(ee=z.current)==null?void 0:ee.selectionStart,Y=(ne=z.current)==null?void 0:ne.selectionEnd,Z=(K=z.current)==null?void 0:K.selectionDirection;J!==null&&Y!==null&&J!==void 0&&Y!==void 0&&(P(J),D(Y),H.current.prev=[J,Y,Z||"none"])});return()=>$.forEach(clearTimeout)},[C,w]),{value:C,setValue:j,isFocused:w,setIsFocused:v,isHovered:b,setIsHovered:I,inputRef:z,containerRef:A,mirrorSelectionStart:T,mirrorSelectionEnd:E,setMirrorSelectionStart:P,setMirrorSelectionEnd:D,setInputRef:M,handleChange:L,handleFocus:_,handleBlur:O,handleKeyDown:N,handleKeyPress:U,handlePaste:X}},lf=h.createContext({slots:[],isFocused:!1,isHovering:!1}),cf=`
6
+ `,backgroundSize:`200% ${B}px, ${B}px 200%, 200% ${B}px, ${B}px 200%`,backgroundPosition:N,transitionProperty:"background-position",transitionDuration:`${V}s`,transitionTimingFunction:"linear",transitionDelay:oe,_hover:{backgroundPosition:U,transitionDelay:X},width:c?"100%":l?"fit-content":void 0,...f==null?void 0:f.container,...j,children:r.jsx(i.View,{as:t?"div":"button",disabled:!!(n||a),display:"flex",alignItems:"center",justifyContent:"center",borderRadius:Math.max(0,E-3),width:"100%",height:"100%",...p,...u,...y,backgroundColor:(p==null?void 0:p.backgroundColor)||w,color:x,borderWidth:0,cursor:n?"default":"pointer",children:D})})}return r.jsx(i.Element,{ref:k,as:e==="link"&&t?"div":"button",type:e==="link"&&t?void 0:"button",disabled:!!(n||a),...u,...y,display:"inline-flex",alignItems:"center",justifyContent:"center",width:c?"100%":l?"fit-content":void 0,borderRadius:Jo[d],boxShadow:g,transition:"background-color 0.2s ease, opacity 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease",cursor:n?"default":"pointer",onClick:m,...p,...f==null?void 0:f.container,...j,children:D})},n0=h.memo(h.forwardRef(({variant:e="filled",size:o="md",shape:t="rounded",iconPosition:n="left",loaderPosition:a="left",backgroundColor:l,color:c,textColor:s,explicitTextColor:d,reversed:g=!1,isAuto:m=!0,isFilled:f,isDisabled:p,isLoading:u,isIconRounded:y,isIcon:k,isHovered:x,icon:C,leftIcon:S,rightIcon:w,startIcon:v,endIcon:b,children:I,to:T,isExternal:j,shadow:E,onClick:D,views:W={},animation:A,loaderProps:H,config:z,ariaLabel:P,borderMovingDuration:V=2,borderMovingGradientColors:M=["#705CFF","#FF5C97","#FFC75C"],animatedStrokeAccentColor:L="#705CFF",animatedStrokeTextColor:_="color-gray-900",...O},N)=>{const X=p?"theme-disabled":u?"theme-loading":l??c??"theme-primary",oe=d??s??"color-white",{config:B}=br(),$=B==null?void 0:B.theme,q=h.useMemo(()=>{const re=Zd(X,oe,g,$);return z!=null&&z.variants&&Object.keys(z.variants).forEach(ie=>{re[ie]&&(re[ie]=Be(re[ie],z.variants[ie]))}),re},[X,oe,g,$,z==null?void 0:z.variants]),J=q[e]??q.filled,Y=d?{...J,color:d}:J,Z=(Y==null?void 0:Y.color)??oe,ee=r.jsx(Rd,{icon:C,leftIcon:S??v,rightIcon:w??b,isLoading:u,iconPosition:n,loaderPosition:a,size:o,resolvedTextColor:Z,isIconRounded:y,loaderProps:H,views:W,children:I}),ne=da[o],K=y||k?Qd[o]:{};return r.jsx(t0,{variant:e,animation:A,to:T,isDisabled:p,isLoading:u,isAuto:m,isFilled:f,isExternal:j,shape:t,shadow:E,onClick:D,views:W,baseStyles:Y,sizeStyles:ne,iconPad:K,resolvedTextColor:Z,content:ee,size:o,mainTone:X,borderMovingDuration:V,borderMovingGradientColors:M,animatedStrokeAccentColor:L,animatedStrokeTextColor:_,containerRef:N,...P!==void 0?{"aria-label":P}:{},...O})})),de=e=>{const[o,t]=i.useHover(),n=pe("button",e),a=e.textColor??(e.backgroundColor!=null&&e.color!=null?e.color:void 0);return r.jsx(n0,{isHovered:t,...n,explicitTextColor:a})},a0={sm:{padding:"12px"},md:{padding:"16px"},lg:{padding:"24px"}},l0={square:0,rounded:"8px",pill:"24px"},i0=e=>{const o=e==="dark";return{default:{backgroundColor:"color-white",border:"none",transition:"background-color 0.2s ease, box-shadow 0.2s ease"},outlined:{backgroundColor:"color-white",borderWidth:"1px",borderStyle:"solid",borderColor:"color-gray-200",transition:"border-color 0.2s ease, box-shadow 0.2s ease",_hover:{borderColor:"color-gray-300",boxShadow:o?"0px 1px 3px rgba(0, 0, 0, 0.3)":"0px 1px 3px rgba(0, 0, 0, 0.05)"}},elevated:{backgroundColor:"color-white",boxShadow:o?"0px 1px 3px rgba(0, 0, 0, 0.35), 0px 1px 2px rgba(0, 0, 0, 0.3)":"0px 1px 3px rgba(0, 0, 0, 0.08), 0px 1px 2px rgba(0, 0, 0, 0.06)",border:"none",transition:"box-shadow 0.2s ease",_hover:{boxShadow:o?"0px 4px 6px rgba(0, 0, 0, 0.4), 0px 2px 4px rgba(0, 0, 0, 0.35)":"0px 4px 6px rgba(0, 0, 0, 0.08), 0px 2px 4px rgba(0, 0, 0, 0.06)"}}}},Fr=e=>(e.themeMode,{container:{backgroundColor:"color-white",color:"color-gray-900",borderRadius:"8px",overflow:"hidden",transition:"background-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease"},header:{padding:"16px",borderBottom:"1px solid",borderColor:"color-gray-100",color:"theme-primary",fontWeight:600,fontSize:14},content:{padding:"16px",color:"color-gray-600",fontSize:12,lineHeight:"18px"},footer:{padding:"16px",borderTop:"1px solid",borderColor:"color-gray-100",justifyContent:"flex-end",gap:8}}),ga=h.createContext({}),Wt=()=>h.useContext(ga),Ht=({children:e,views:o,style:t,themeMode:n,...a})=>{var g;const l=i.useTheme(),{styles:c}=Wt(),s=Fr(l).header,d={...s,...c==null?void 0:c.header,...a,style:{...s==null?void 0:s.style,...(g=c==null?void 0:c.header)==null?void 0:g.style,...t}};return r.jsx(i.Vertical,{gap:8,...d,children:e})},jt=({children:e,views:o,style:t,themeMode:n,...a})=>{var g;const l=i.useTheme(),{styles:c}=Wt(),s=Fr(l).content,d={...s,...c==null?void 0:c.content,...a,style:{...s==null?void 0:s.style,...(g=c==null?void 0:c.content)==null?void 0:g.style,...t}};return r.jsx(i.Vertical,{gap:12,...d,children:e})},Pt=({children:e,views:o,style:t,themeMode:n,...a})=>{var g;const l=i.useTheme(),{styles:c}=Wt(),s=Fr(l).footer,d={...s,...c==null?void 0:c.footer,...a,style:{...s==null?void 0:s.style,...(g=c==null?void 0:c.footer)==null?void 0:g.style,...t}};return r.jsx(i.Vertical,{gap:8,...d,children:e})},c0=({variant:e="default",size:o="md",shape:t="rounded",children:n,header:a,footer:l,isFullWidth:c=!1,views:s,style:d,themeMode:g,config:m,...f})=>{var b,I;const p=i.useTheme(),u=Fr(p),y=((b=a0[o])==null?void 0:b.padding)||"16px",k=h.useMemo(()=>({styles:{container:{...u.container,borderRadius:l0[t],...s==null?void 0:s.container},header:{...u.header,padding:y,...s==null?void 0:s.header},content:{...u.content,padding:y,...s==null?void 0:s.content},footer:{...u.footer,padding:y,...s==null?void 0:s.footer}}}),[u,s,y,t]),x=h.Children.toArray(n).some(T=>h.isValidElement(T)&&(T.type===Ht||T.type===jt||T.type===Pt)),{themeMode:C}=p,w=i0(g||C)[e],v={width:c?"100%":"auto",overflow:"hidden",...w,...k.styles.container,...f,style:{...(I=k.styles.container)==null?void 0:I.style,...d}};return r.jsx(ga.Provider,{value:k,children:r.jsx(i.View,{...v,children:x?n:r.jsxs(i.Vertical,{width:"100%",children:[a&&r.jsx(Ht,{children:a}),r.jsx(jt,{children:n}),l&&r.jsx(Pt,{children:l})]})})})},we=e=>{const o=pe("card",e);return r.jsx(c0,{...o})};we.Header=Ht,we.Content=jt,we.Footer=Pt;const s0=({defaultActiveIndex:e=0,activeIndex:o,onChange:t,autoPlay:n=!1,autoPlayInterval:a=3e3,pauseOnHover:l=!0,infinite:c=!0,totalSlides:s,stepIndices:d})=>{const g=h.useRef(s||0),[m,f]=h.useState(s||0),p=h.useRef(new Set),u=h.useRef(0),y=h.useMemo(()=>ct("carousel-content"),[]),[k,x]=h.useState(o!==void 0?o:e),[C,S]=h.useState(!1),[w,v]=h.useState(!1),[b,I]=h.useState(0),[T,j]=h.useState(0),E=h.useRef(null);h.useEffect(()=>{o!==void 0&&x(o)},[o]);const D=h.useCallback(U=>{let X=U;c?U<0?X=m-1:U>=m&&(X=0):X=Math.max(0,Math.min(U,m-1)),d&&d.length>0&&(d.includes(X)||(X=d.reduce((B,$)=>Math.abs($-X)<Math.abs(B-X)?$:B))),o===void 0&&x(X),t&&t(X)},[o,c,t,m]),W=h.useCallback(()=>{D(k+1)},[k,D]),A=h.useCallback(()=>{D(k-1)},[k,D]);h.useEffect(()=>(n&&!C&&!w&&(E.current=setInterval(()=>{W()},a)),()=>{E.current&&clearInterval(E.current)}),[n,a,C,w,W,l]);const H=h.useCallback(()=>{l&&S(!0)},[l]),z=h.useCallback(()=>{S(!1)},[]),P=h.useCallback(U=>{v(!0),"touches"in U?(I(U.touches[0].clientX),j(U.touches[0].clientY)):(I(U.clientX),j(U.clientY))},[]),V=h.useCallback(U=>{if(!w)return;let X,oe;"touches"in U?(X=U.touches[0].clientX,oe=U.touches[0].clientY):(X=U.clientX,oe=U.clientY);const B=X-b,$=oe-T;Math.abs(B)>Math.abs($)&&Math.abs(B)>50&&(B>0?A():W(),v(!1))},[w,b,T,W,A]),M=h.useCallback(()=>{v(!1)},[]),L=h.useCallback(()=>{const U=u.current++;p.current.add(U);const X=p.current.size;return g.current=X,f(X),U},[]),_=h.useCallback(U=>{p.current.delete(U);const X=p.current.size;if(g.current=X,f(X),X>0&&k>=X){const oe=Math.max(0,X-1);o===void 0&&x(oe),t&&t(oe)}},[k,o,t]),O=c||k>0,N=c||k<m-1;return{activeIndex:k,totalSlides:m,goToSlide:D,nextSlide:W,prevSlide:A,canGoNext:N,canGoPrevious:O,handleMouseEnter:H,handleMouseLeave:z,handleDragStart:P,handleDragMove:V,handleDragEnd:M,registerSlide:L,unregisterSlide:_,contentId:y,infinite:c}},d0={dot:{width:"10px",height:"10px",borderRadius:"50%",backgroundColor:"color-gray-300",margin:"0 4px",cursor:"pointer",transition:"background-color 0.3s ease"},line:{width:"20px",height:"4px",borderRadius:"2px",backgroundColor:"color-gray-300",margin:"0 4px",cursor:"pointer",transition:"background-color 0.3s ease"},number:{minWidth:"24px",height:"24px",borderRadius:"50%",backgroundColor:"color-gray-300",margin:"0 4px",cursor:"pointer",display:"flex",alignItems:"center",justifyContent:"center",fontSize:"12px",transition:"background-color 0.3s ease"}},g0={dot:{backgroundColor:"theme-primary"},line:{backgroundColor:"theme-primary"},number:{backgroundColor:"theme-primary",color:"color-white"}},zr={width:"40px",height:"40px",borderRadius:"50%",backgroundColor:"color-white",color:"color-gray-800",display:"flex",alignItems:"center",justifyContent:"center",cursor:"pointer",boxShadow:"0 2px 5px rgba(0, 0, 0, 0.1)",zIndex:1,transition:"background-color 0.3s ease",_hover:{backgroundColor:"color-gray-100"}},Qo=()=>({container:{position:"relative",overflow:"hidden"},content:{overflow:"hidden",width:"100%",height:"100%"},innerContainer:{display:"flex",transitionProperty:"transform",transitionDuration:"300ms",transitionTimingFunction:"ease-in-out",height:"100%"},item:{flex:"0 0 100%",minWidth:0,position:"relative",height:"100%"},prevButton:{position:"absolute",top:"50%",left:"16px",transform:"translateY(-50%)",zIndex:10,...zr},nextButton:{position:"absolute",top:"50%",right:"16px",transform:"translateY(-50%)",zIndex:10,...zr}}),ha=h.createContext(null),Mr=()=>{const e=h.useContext(ha);if(!e)throw new Error("Carousel compound components must be used within <Carousel>");return e},fa=({children:e,isActive:o,index:t,views:n,...a})=>r.jsx(i.View,{flexShrink:0,width:"100%",height:"100%",display:o?"block":"none",...n,...a,children:e}),ma=({views:e,children:o,...t})=>{const{goToPrevious:n,canGoPrevious:a,styles:l}=Mr(),s={...Qo().prevButton,...l==null?void 0:l.prevButton,...e==null?void 0:e.prevButton};return r.jsx(de,{"aria-label":"Previous slide",onClick:()=>n(),isDisabled:!a,...s,...t,children:o??r.jsx(he,{orientation:"left",widthHeight:16})})},pa=({views:e,children:o,...t})=>{const{goToNext:n,canGoNext:a,styles:l}=Mr(),s={...Qo().nextButton,...l==null?void 0:l.nextButton,...e==null?void 0:e.nextButton};return r.jsx(de,{"aria-label":"Next slide",onClick:()=>n(),isDisabled:!a,...s,...t,children:o??r.jsx(he,{orientation:"right",widthHeight:16})})},ua=({children:e,views:o,...t})=>{const{registerSlide:n,unregisterSlide:a,styles:l}=Mr(),c=h.useRef(null);h.useEffect(()=>{const g=n();return c.current=g,()=>{c.current!==null&&a(c.current)}},[n,a]);const d={...Qo().item,...l==null?void 0:l.item,...o==null?void 0:o.item};return r.jsx(i.View,{role:"group","aria-roledescription":"slide",...d,...t,children:e})},ya=({children:e,views:o,style:t,...n})=>{const{currentIndex:a,styles:l,contentId:c}=Mr(),s=Qo(),d={...s.content,...l==null?void 0:l.content,...o==null?void 0:o.content},g={...s.innerContainer,...l==null?void 0:l.innerContainer,...o==null?void 0:o.innerContainer},m=`-${a*100}%`;return r.jsx(i.View,{...d,...n,style:{...d==null?void 0:d.style,...t},id:c,"aria-live":"polite",children:r.jsx(i.View,{...g,style:{...g==null?void 0:g.style,transform:`translateX(${m})`},children:e})})},h0=({children:e,defaultActiveIndex:o=0,activeIndex:t,onChange:n,showNavigation:a=!0,navigationPosition:l="inside",prevButton:c,nextButton:s,showIndicators:d=!0,indicatorPosition:g="bottom",indicatorVariant:m="dot",autoPlay:f=!1,autoPlayInterval:p=3e3,pauseOnHover:u=!0,infinite:y=!0,direction:k="horizontal",transitionDuration:x=300,views:C,stepIndices:S,themeMode:w,...v})=>{const b=h.useMemo(()=>h.Children.toArray(e),[e]),I=s0({defaultActiveIndex:o,activeIndex:t,onChange:n,autoPlay:f,autoPlayInterval:p,pauseOnHover:u,infinite:y,totalSlides:b.length}),{activeIndex:T,totalSlides:j,goToSlide:E,nextSlide:D,prevSlide:W,handleMouseEnter:A,handleMouseLeave:H,handleDragStart:z,handleDragMove:P,handleDragEnd:V}=I,M=()=>{if(!a)return null;const O=c||r.jsx(i.View,{as:"button","aria-label":"Previous slide",...zr,...C==null?void 0:C.prevButton,children:"❮"}),N=s||r.jsx(i.View,{as:"button","aria-label":"Next slide",...zr,...C==null?void 0:C.nextButton,children:"❯"});return r.jsxs(r.Fragment,{children:[r.jsx(i.View,{position:"absolute",top:"50%",transform:"translateY(-50%)",left:l==="inside"?"10px":"-40px",onClick:W,cursor:!y&&T===0?"not-allowed":"pointer",opacity:!y&&T===0?.5:1,children:O}),r.jsx(i.View,{position:"absolute",top:"50%",transform:"translateY(-50%)",right:l==="inside"?"10px":"-40px",onClick:D,cursor:!y&&T===b.length-1?"not-allowed":"pointer",opacity:!y&&T===b.length-1?.5:1,children:N})]})},L=()=>d?r.jsx(i.Horizontal,{position:"absolute",left:"0",right:"0",justifyContent:"center",...g==="top"?{top:"10px"}:{bottom:"10px"},...C==null?void 0:C.indicators,children:b.map((O,N)=>r.jsx(i.View,{onClick:()=>E(N),cursor:"pointer",...d0[m],...N===T?{...g0[m]}:{},...C==null?void 0:C.indicator,...N===T?C==null?void 0:C.activeIndicator:{},children:m==="number"&&N+1},N))}):null;return h.useMemo(()=>h.Children.toArray(e).some(O=>h.isValidElement(O)&&(O.type===ya||O.type===ua||O.type===ma||O.type===pa)),[e])?r.jsx(ha.Provider,{value:{currentIndex:T,totalSlides:j,goToSlide:E,goToNext:D,goToPrevious:W,canGoNext:I.canGoNext,canGoPrevious:I.canGoPrevious,registerSlide:I.registerSlide,unregisterSlide:I.unregisterSlide,styles:{...Qo(),...C},contentId:I.contentId,infinite:y},children:r.jsx(i.View,{role:"region","aria-roledescription":"carousel","aria-label":"Carousel",position:"relative",width:"100%",height:"100%",overflow:"hidden",...C==null?void 0:C.container,...v,children:e})}):r.jsxs(i.View,{position:"relative",width:"100%",height:"100%",overflow:"hidden",onMouseEnter:A,onMouseLeave:H,onTouchStart:z,onTouchMove:P,onTouchEnd:V,onMouseDown:z,onMouseMove:P,onMouseUp:V,...C==null?void 0:C.container,...v,children:[r.jsx(i.View,{width:"100%",height:"100%",position:"relative",...C==null?void 0:C.slideWrapper,children:b.map((O,N)=>r.jsx(fa,{isActive:N===T,index:N,views:C==null?void 0:C.slide,children:O},N))}),M(),L()]})},$e=e=>r.jsx(h0,{...e});$e.Slide=fa,$e.Content=ya,$e.Item=ua,$e.Previous=ma,$e.Next=pa;const Le={blue:"color-blue-500",green:"color-green-500",purple:"color-purple-500",orange:"color-orange-500",red:"color-red-500",teal:"color-teal-500",pink:"color-pink-500",indigo:"color-indigo-500",yellow:"color-yellow-500",cyan:"color-cyan-500"},ba=[Le.blue,Le.green,Le.purple,Le.orange,Le.red,Le.teal,Le.pink,Le.indigo,Le.yellow,Le.cyan],Mo=ba,f0={width:"100%",height:"100%",position:"relative",display:"flex",flexDirection:"column"},m0={fontSize:"18px",fontWeight:"700",marginBottom:"24px",textAlign:"center",color:"color-gray-900"},p0={display:"flex",flexWrap:"wrap",justifyContent:"flex-start",marginTop:"16px",gap:"12px"},u0={display:"flex",alignItems:"center",padding:"4px 8px",borderRadius:"6px",cursor:"pointer",transition:"background-color 0.2s ease",_hover:{backgroundColor:"color-gray-50"}},y0={width:"10px",height:"10px",borderRadius:"50%",marginRight:"8px"},b0={fontSize:"13px",fontWeight:"500",color:"color-gray-600"},Wr={position:"absolute",backgroundColor:"color-white",padding:"12px 16px",borderRadius:"8px",boxShadow:"0px 12px 24px rgba(15, 23, 42, 0.18)",border:"1px solid color-gray-200",fontSize:"14px",display:"flex",flexDirection:"column",pointerEvents:"none",zIndex:100},xa={stroke:"color-gray-100",strokeWidth:"1px",strokeDasharray:"4 4"},Hr={stroke:"color-gray-200",strokeWidth:"1px"},jr={fontSize:"12px",fill:"color-gray-500",fontWeight:"500"},x0={rx:"4px",ry:"4px",cursor:"pointer",transition:"all 0.3s cubic-bezier(0.4, 0, 0.2, 1)",_hover:{filter:"brightness(1.1)"}},k0={strokeWidth:"3px",fill:"none",strokeLinecap:"round",strokeLinejoin:"round",transition:"stroke-width 0.2s ease"},C0={r:"5px",strokeWidth:"2.5px",stroke:"color-white",cursor:"pointer",transition:"all 0.2s cubic-bezier(0.4, 0, 0.2, 1)",_hover:{r:"7px"}},Pr={strokeWidth:"2px",stroke:"color-white",cursor:"pointer",transition:"all 0.3s ease",_hover:{transform:"scale(1.02)"}},Vt={position:"absolute",top:0,left:0,right:0,bottom:0,display:"flex",alignItems:"center",justifyContent:"center",backgroundColor:"color-white-800",borderRadius:"4px",zIndex:10,padding:"24px",textAlign:"center"},w0={...Vt},S0={...Vt,backgroundColor:"rgba(254, 242, 242, 0.8)",color:"color-red-600"},v0={...Vt,backgroundColor:"rgba(249, 250, 251, 0.8)",color:"color-gray-500"},T0=({data:e,dataPoints:o,animated:t=!0,animationDuration:n=500,showTooltips:a=!0})=>{const[l,c]=h.useState(t?0:1),[s,d]=h.useState({visible:!1,x:0,y:0,content:null}),g=h.useRef(null),m=h.useRef(null);h.useEffect(()=>{if(!t){c(1);return}const S=Date.now(),w=()=>{const v=Date.now()-S,b=Math.min(v/n,1);c(b),b<1&&(g.current=requestAnimationFrame(w))};return g.current=requestAnimationFrame(w),()=>{g.current&&cancelAnimationFrame(g.current)}},[t,n]);const[f,p]=h.useState(new Set),u=h.useCallback(S=>{p(w=>{const v=new Set(w);return v.has(S)?v.delete(S):v.add(S),v})},[]),y=h.useCallback(()=>e?{...e,series:e.series.map((S,w)=>({...S,color:S.color||Mo[w%Mo.length],hidden:f.has(S.name)}))}:o?o.map((S,w)=>({...S,color:S.color||Mo[w%Mo.length],hidden:f.has(S.label)})):null,[e,o,f]),k=h.useCallback((S,w,v)=>{a&&d({visible:!0,x:S,y:w,content:v})},[a]),x=h.useCallback(()=>{d(S=>({...S,visible:!1}))},[]),C=h.useCallback(()=>{if(!m.current)return{width:0,height:0};const{width:S,height:w}=m.current.getBoundingClientRect();return{width:S,height:w}},[]);return{animationProgress:l,tooltip:s,containerRef:m,processedData:y,showTooltip:k,hideTooltip:x,getChartDimensions:C,toggleSeries:u}},I0=({data:e,width:o,height:t,animationProgress:n,showGrid:a=!0,onBarClick:l,showTooltip:c,hideTooltip:s,views:d})=>{const{getColor:g}=i.useTheme(),m={top:20,right:20,bottom:40,left:50},f=o-m.left-m.right,p=t-m.top-m.bottom,u=h.useMemo(()=>{let b=0;return e.series.forEach(I=>{I.data.forEach(T=>{b=Math.max(b,T)})}),b},[e]),y=e.labels.length,k=e.series.length,x=f/y,C=x*.8/k,S=x*.2/(k+1),w=u||10,v=h.useMemo(()=>{const I=[];for(let T=0;T<=5;T++){const j=w/5*T;I.push(j)}return I},[u]);return r.jsxs("svg",{width:o,height:t,children:[r.jsx("defs",{children:e.series.map((b,I)=>{const T=b.color?g(b.color):"black";return r.jsxs("linearGradient",{id:`bar-gradient-${I}`,x1:"0%",y1:"0%",x2:"0%",y2:"100%",children:[r.jsx("stop",{offset:"0%",stopColor:T,stopOpacity:1}),r.jsx("stop",{offset:"100%",stopColor:T,stopOpacity:.7})]},`bar-gradient-${I}`)})}),r.jsx("line",{x1:m.left,y1:t-m.bottom,x2:o-m.right,y2:t-m.bottom,...Hr,...d==null?void 0:d.axis}),r.jsx("line",{x1:m.left,y1:m.top,x2:m.left,y2:t-m.bottom,...Hr,...d==null?void 0:d.axis}),e.labels.map((b,I)=>{const T=m.left+(I+.5)*x,j=t-m.bottom+20;return r.jsx("text",{x:T,y:j,textAnchor:"middle",...jr,...d==null?void 0:d.axisLabel,children:b},`x-label-${I}`)}),v.map((b,I)=>{const T=t-m.bottom-b/w*p;return r.jsxs(h.Fragment,{children:[r.jsx("text",{x:m.left-10,y:T,textAnchor:"end",dominantBaseline:"middle",...jr,...d==null?void 0:d.axisLabel,children:b.toFixed(0)}),a&&r.jsx("line",{x1:m.left,y1:T,x2:o-m.right,y2:T,...xa,...d==null?void 0:d.grid})]},`y-tick-${I}`)}),e.series.map((b,I)=>b.hidden?null:r.jsx(h.Fragment,{children:b.data.map((T,j)=>{const E=T/w*p*n,D=m.left+j*x+S*(I+1)+C*I,W=t-m.bottom-E,A=e.labels[j],H=e.series.reduce((L,_)=>{const O=_.data[j];return L+(typeof O=="number"?O:0)},0),z=H>0?(T/H*100).toFixed(1):null,P=b.color?g(b.color):"black",V=L=>{const _=r.jsxs(i.View,{display:"flex",flexDirection:"column",minWidth:"180px",children:[r.jsxs(i.View,{display:"flex",justifyContent:"space-between",alignItems:"center",children:[r.jsx(i.Text,{fontWeight:"semibold",children:b.name}),r.jsx(i.View,{width:"12px",height:"12px",borderRadius:"2px",backgroundColor:P})]}),r.jsx(i.Text,{marginTop:"4px",color:"color-gray-500",fontSize:"12px",children:A}),r.jsxs(i.View,{marginTop:"8px",display:"flex",flexDirection:"column",children:[r.jsxs(i.View,{display:"flex",justifyContent:"space-between",children:[r.jsx(i.Text,{color:"color-gray-500",children:"Value"}),r.jsx(i.Text,{fontWeight:"medium",children:T.toLocaleString()})]}),z!==null&&r.jsxs(i.View,{marginTop:"4px",display:"flex",justifyContent:"space-between",children:[r.jsx(i.Text,{color:"color-gray-500",children:"Share"}),r.jsx(i.Text,{fontWeight:"medium",children:`${z}%`})]}),r.jsxs(i.View,{marginTop:"4px",display:"flex",justifyContent:"space-between",children:[r.jsx(i.Text,{color:"color-gray-500",children:"Category total"}),r.jsx(i.Text,{fontWeight:"medium",children:H.toLocaleString()})]})]})]}),O=L.currentTarget.getBoundingClientRect(),N=O.left+O.width/2,U=O.top;c(N,U,_)},M=()=>{l&&l(b.name,j)};return r.jsx("rect",{x:D,y:W,width:C,height:E,fill:`url(#bar-gradient-${I})`,onMouseEnter:V,onMouseMove:V,onMouseLeave:s,onClick:M,...x0,...d==null?void 0:d.bar},`bar-${I}-${j}`)})},`series-${I}`))]})},F0=({data:e,width:o,height:t,animationProgress:n,showGrid:a=!0,onPointClick:l,showTooltip:c,hideTooltip:s,views:d})=>{const{getColor:g}=i.useTheme(),m={top:20,right:20,bottom:40,left:40},f=o-m.left-m.right,p=t-m.top-m.bottom,u=h.useMemo(()=>{let S=0;return e.series.forEach(w=>{w.data.forEach(v=>{S=Math.max(S,v)})}),S},[e]),y=u||10,k=h.useMemo(()=>{const w=[];for(let v=0;v<=5;v++){const b=y/5*v;w.push(b)}return w},[u]),x=S=>{if(S.length<2)return"";const w=S.map((b,I)=>({x:m.left+I/(e.labels.length-1)*f,y:t-m.bottom-b/y*p*n}));let v=`M ${w[0].x},${w[0].y}`;for(let b=0;b<w.length-1;b++){const I=w[b===0?b:b-1],T=w[b],j=w[b+1],E=w[b+2===w.length?b+1:b+2],D=T.x+(j.x-I.x)/6,W=T.y+(j.y-I.y)/6,A=j.x-(E.x-T.x)/6,H=j.y-(E.y-T.y)/6;v+=` C ${D},${W} ${A},${H} ${j.x},${j.y}`}return v},C=S=>{if(S.length<2)return"";const w=x(S),v=m.left,b=m.left+f,I=t-m.bottom;return`${w} L ${b},${I} L ${v},${I} Z`};return r.jsxs("svg",{width:o,height:t,children:[r.jsx("defs",{children:e.series.map((S,w)=>{const v=S.color?g(S.color):"black";return r.jsxs("linearGradient",{id:`gradient-${w}`,x1:"0%",y1:"0%",x2:"0%",y2:"100%",children:[r.jsx("stop",{offset:"0%",stopColor:v,stopOpacity:.3}),r.jsx("stop",{offset:"100%",stopColor:v,stopOpacity:0})]},`gradient-${w}`)})}),r.jsx("line",{x1:m.left,y1:t-m.bottom,x2:o-m.right,y2:t-m.bottom,...Hr,...d==null?void 0:d.axis}),r.jsx("line",{x1:m.left,y1:m.top,x2:m.left,y2:t-m.bottom,...Hr,...d==null?void 0:d.axis}),e.labels.map((S,w)=>{const v=m.left+w/(e.labels.length-1)*f,b=t-m.bottom+20;return r.jsx("text",{x:v,y:b,textAnchor:"middle",...jr,...d==null?void 0:d.axisLabel,children:S},`x-label-${w}`)}),k.map((S,w)=>{const v=t-m.bottom-S/y*p;return r.jsxs(h.Fragment,{children:[r.jsx("text",{x:m.left-10,y:v,textAnchor:"end",dominantBaseline:"middle",...jr,...d==null?void 0:d.axisLabel,children:S.toFixed(0)}),a&&r.jsx("line",{x1:m.left,y1:v,x2:o-m.right,y2:v,...xa,...d==null?void 0:d.grid})]},`y-tick-${w}`)}),e.series.map((S,w)=>{if(S.hidden)return null;const v=S.color?g(S.color):"black";return r.jsxs(h.Fragment,{children:[r.jsx("path",{d:C(S.data),fill:`url(#gradient-${w})`,...d==null?void 0:d.area}),r.jsx("path",{d:x(S.data),stroke:v,...k0,...d==null?void 0:d.line}),S.data.map((b,I)=>{const T=m.left+I/(e.labels.length-1)*f,j=t-m.bottom-b/y*p*n,E=e.labels[I],D=e.series.reduce((M,L)=>{const _=L.data[I];return M+(typeof _=="number"?_:0)},0),W=D>0?(b/D*100).toFixed(1):null,A=I>0&&typeof S.data[I-1]=="number"?S.data[I-1]:null,H=typeof A=="number"?b-A:null,z=typeof H=="number"?`${H>=0?"+":""}${H.toLocaleString()}`:null,P=M=>{const L=r.jsxs(i.View,{display:"flex",flexDirection:"column",minWidth:"200px",children:[r.jsxs(i.View,{display:"flex",justifyContent:"space-between",alignItems:"center",children:[r.jsx(i.Text,{fontWeight:"semibold",children:S.name}),r.jsx(i.View,{width:"12px",height:"12px",borderRadius:"2px",backgroundColor:v})]}),r.jsx(i.Text,{marginTop:"4px",color:"color-gray-500",fontSize:"12px",children:E}),r.jsxs(i.View,{marginTop:"8px",display:"flex",flexDirection:"column",children:[r.jsxs(i.View,{display:"flex",justifyContent:"space-between",children:[r.jsx(i.Text,{color:"color-gray-500",children:"Value"}),r.jsx(i.Text,{fontWeight:"medium",children:b.toLocaleString()})]}),z!==null&&r.jsxs(i.View,{marginTop:"4px",display:"flex",justifyContent:"space-between",children:[r.jsx(i.Text,{color:"color-gray-500",children:"Change"}),r.jsx(i.Text,{fontWeight:"medium",children:z})]}),W!==null&&r.jsxs(i.View,{marginTop:"4px",display:"flex",justifyContent:"space-between",children:[r.jsx(i.Text,{color:"color-gray-500",children:"Share"}),r.jsx(i.Text,{fontWeight:"medium",children:`${W}%`})]}),r.jsxs(i.View,{marginTop:"4px",display:"flex",justifyContent:"space-between",children:[r.jsx(i.Text,{color:"color-gray-500",children:"Category total"}),r.jsx(i.Text,{fontWeight:"medium",children:D.toLocaleString()})]})]})]}),_=M.currentTarget.getBoundingClientRect(),O=_.left+_.width/2,N=_.top+_.height/2;c(O,N,L)},V=()=>{l&&l(S.name,I)};return r.jsx("circle",{cx:T,cy:j,fill:v,onMouseEnter:P,onMouseMove:P,onMouseLeave:s,onClick:V,...C0,...d==null?void 0:d.point},`point-${w}-${I}`)})]},`series-${w}`)})]})},z0=({dataPoints:e,width:o,height:t,animationProgress:n,isDonut:a=!1,onSliceClick:l,showTooltip:c,hideTooltip:s,views:d})=>{const{getColor:g}=i.useTheme(),{ref:m,relation:f}=i.useElementPosition({trackChanges:!0,trackOnHover:!0,trackOnScroll:!0,trackOnResize:!0}),p=h.useRef(null);h.useEffect(()=>{p.current&&m&&(m.current=p.current)},[p,m]);const y=Math.min(o,t)/2*.8,k=o/2,x=t/2,C=a?y*.6:0,S=h.useMemo(()=>e.filter(b=>!b.hidden),[e]),w=h.useMemo(()=>S.reduce((b,I)=>b+I.value,0),[S]),v=h.useMemo(()=>{if(w===0)return[{path:a?[`M ${k} ${x-y}`,`A ${y} ${y} 0 1 1 ${k} ${x+y}`,`A ${y} ${y} 0 1 1 ${k} ${x-y}`,`M ${k} ${x-C}`,`A ${C} ${C} 0 1 0 ${k} ${x+C}`,`A ${C} ${C} 0 1 0 ${k} ${x-C}`,"Z"].join(" "):[`M ${k} ${x}`,`M ${k} ${x-y}`,`A ${y} ${y} 0 1 1 ${k} ${x+y}`,`A ${y} ${y} 0 1 1 ${k} ${x-y}`,"Z"].join(" "),color:"#E2E8F0",label:"Total",value:0,percentage:"0%",labelX:k,labelY:x,startAngle:0,endAngle:Math.PI*2,index:-1}];const b=[];let I=-Math.PI/2;for(let T=0;T<S.length;T++){const E=S[T].value/w,D=E*2*Math.PI*n,A=Math.max(0,D-.02),H=I+A,z=k+Math.cos(I)*y,P=x+Math.sin(I)*y,V=k+Math.cos(H)*y,M=x+Math.sin(H)*y,L=k+Math.cos(I)*C,_=x+Math.sin(I)*C,O=k+Math.cos(H)*C,N=x+Math.sin(H)*C,U=A>Math.PI?1:0;let X;a?X=[`M ${z} ${P}`,`A ${y} ${y} 0 ${U} 1 ${V} ${M}`,`L ${O} ${N}`,`A ${C} ${C} 0 ${U} 0 ${L} ${_}`,"Z"].join(" "):X=[`M ${k} ${x}`,`L ${z} ${P}`,`A ${y} ${y} 0 ${U} 1 ${V} ${M}`,"Z"].join(" ");const oe=I+A/2,B=a?(y+C)/2:y*.7,$=k+Math.cos(oe)*B,q=x+Math.sin(oe)*B,J=`${(E*100).toFixed(1)}%`,Y=S[T].color||Mo[T%Mo.length],Z=g(Y);b.push({path:X,color:Z,label:S[T].label,value:S[T].value,percentage:J,labelX:$,labelY:q,startAngle:I,endAngle:H,index:T,originalIndex:e.findIndex(ee=>ee.label===S[T].label)}),I=H}return b},[S,w,y,k,x,C,n,a,e]);return r.jsxs("svg",{ref:p,width:o,height:t,style:{overflow:"visible"},children:[a&&r.jsxs("g",{pointerEvents:"none",children:[r.jsx("circle",{cx:k,cy:x,r:C,fill:"white"}),r.jsx("text",{x:k,y:x-8,textAnchor:"middle",dominantBaseline:"middle",fontSize:"14px",fontWeight:"500",fill:"color-gray-500",children:"Total"}),r.jsx("text",{x:k,y:x+12,textAnchor:"middle",dominantBaseline:"middle",fontSize:"20px",fontWeight:"800",fill:"color-gray-900",children:w.toLocaleString()})]}),v.map((b,I)=>{const T=D=>{const W=w>0?b.value/w*100:0,A=w>0?Math.max(0,100-W):null,H=r.jsxs(i.View,{display:"flex",flexDirection:"column",minWidth:"200px",children:[r.jsxs(i.View,{display:"flex",justifyContent:"space-between",alignItems:"center",children:[r.jsx(i.Text,{fontWeight:"semibold",children:b.label}),r.jsx(i.View,{width:"12px",height:"12px",borderRadius:"2px",backgroundColor:b.color})]}),r.jsxs(i.Text,{marginTop:"4px",color:"color-gray-500",fontSize:"12px",children:["Slice ",b.index+1," of ",S.length]}),r.jsxs(i.View,{marginTop:"8px",display:"flex",flexDirection:"column",children:[r.jsxs(i.View,{display:"flex",justifyContent:"space-between",children:[r.jsx(i.Text,{color:"color-gray-500",children:"Value"}),r.jsx(i.Text,{fontWeight:"medium",children:b.value.toLocaleString()})]}),r.jsxs(i.View,{marginTop:"4px",display:"flex",justifyContent:"space-between",children:[r.jsx(i.Text,{color:"color-gray-500",children:"Share"}),r.jsx(i.Text,{fontWeight:"medium",children:b.percentage})]}),r.jsxs(i.View,{marginTop:"4px",display:"flex",justifyContent:"space-between",children:[r.jsx(i.Text,{color:"color-gray-500",children:"Total"}),r.jsx(i.Text,{fontWeight:"medium",children:w.toLocaleString()})]}),A!==null&&r.jsxs(i.View,{marginTop:"4px",display:"flex",justifyContent:"space-between",children:[r.jsx(i.Text,{color:"color-gray-500",children:"Remaining"}),r.jsx(i.Text,{fontWeight:"medium",children:`${A.toFixed(1)}%`})]})]})]});let z=D.clientX,P=D.clientY;if(p.current){const V=p.current.getBoundingClientRect();z=V.left+b.labelX,P=V.top+b.labelY}c(z,P,H)},j=()=>{b.index!==-1&&l&&l(e[b.index],b.index)},E=b.index===-1;return r.jsxs("g",{children:[r.jsx("path",{d:b.path,fill:b.color,onMouseEnter:E?void 0:T,onMouseMove:E?void 0:T,onMouseLeave:E?void 0:s,onClick:j,...Pr,style:{...Pr==null?void 0:Pr.style,cursor:E?"default":"pointer"},...d==null?void 0:d.pie}),!E&&b.endAngle-b.startAngle>.25&&r.jsx("text",{x:b.labelX,y:b.labelY,textAnchor:"middle",dominantBaseline:"middle",fill:"white",fontSize:"11px",fontWeight:"800",pointerEvents:"none",paintOrder:"stroke",stroke:"rgba(0,0,0,0.2)",strokeWidth:"2px",children:b.percentage})]},`slice-${I}`)})]})},M0=({visible:e,x:o,y:t,content:n,maxDistance:a=100,views:l})=>{const c=h.useRef(null),[s,d]=h.useState({left:0,top:0});return h.useEffect(()=>{if(!e||!c.current||typeof window>"u"||typeof c.current.getBoundingClientRect!="function")return;const m=c.current.getBoundingClientRect(),f=m.width||200,p=m.height||100,u=20,y=16;let k=o-f/2,x=t-p-u;x<y&&(x=t+u),k+f>window.innerWidth-y?k=window.innerWidth-f-y:k<y&&(k=y),x=Math.max(y,Math.min(x,window.innerHeight-p-y)),d({left:k,top:x})},[e,o,t]),e?r.jsx(i.View,{ref:c,position:"fixed",left:`${s.left}px`,top:`${s.top}px`,...Wr,...l==null?void 0:l.tooltip,style:{...Wr==null?void 0:Wr.style,pointerEvents:"none",transition:"all 0.1s ease-out"},children:n}):null},W0=({type:e,data:o,dataPoints:t,title:n,showLegend:a=!0,legendPosition:l="bottom",showGrid:c=!0,showTooltips:s=!0,animated:d=!0,animationDuration:g=500,responsive:m=!0,aspectRatio:f=16/9,width:p=200,height:u=200,views:y,onDataPointClick:k,onSeriesClick:x,isLoading:C=!1,error:S,noData:w,loadingIndicator:v,errorIndicator:b,noDataIndicator:I,"aria-label":T,themeMode:j,...E})=>{const{animationProgress:D,tooltip:W,containerRef:A,processedData:H,showTooltip:z,hideTooltip:P,getChartDimensions:V,toggleSeries:M}=T0({data:o,dataPoints:t,animated:d,animationDuration:g,showTooltips:s}),L=H(),{width:_,height:O}=V(),N=p||_,U=u||(m?_/f:O),X=()=>{if(!a||!L)return null;let Z=[];return e==="pie"||e==="donut"?Array.isArray(L)&&(Z=L):L&&L.series&&(Z=L.series),!Z||Z.length===0?null:r.jsx(i.Horizontal,{flexWrap:"wrap",justifyContent:"flex-start",marginTop:l==="bottom"?"16px":0,marginBottom:l==="top"?"16px":0,...p0,...y==null?void 0:y.legend,children:Z.map((ee,ne)=>{const K=ee.hidden,re=ee.name||ee.label;return r.jsxs(i.View,{...u0,onClick:()=>M(re),opacity:K?.4:1,...y==null?void 0:y.legendItem,children:[r.jsx(i.View,{backgroundColor:ee.color,...y0,opacity:K?.3:1}),r.jsx(i.Text,{...b0,textDecoration:K?"line-through":"none",children:re})]},`legend-${ne}`)})})},oe=()=>{if(!L)return null;switch(e){case"bar":return r.jsx(I0,{data:L,width:N,height:U,animationProgress:D,showGrid:c,onBarClick:x,showTooltip:z,hideTooltip:P,views:y});case"line":case"area":return r.jsx(F0,{data:L,width:N,height:U,animationProgress:D,showGrid:c,onPointClick:x,showTooltip:z,hideTooltip:P,views:y});case"pie":case"donut":return r.jsx(z0,{dataPoints:L,width:N,height:U,animationProgress:D,isDonut:e==="donut",onSliceClick:k,showTooltip:z,hideTooltip:P,views:y});default:return null}},B=()=>C?r.jsx(i.View,{...w0,...y==null?void 0:y.loadingOverlay,children:v||r.jsx(i.Center,{children:r.jsx(eo,{size:"lg"})})}):null,$=()=>S?r.jsx(i.View,{...S0,...y==null?void 0:y.errorOverlay,children:b||r.jsx(i.Text,{fontWeight:"medium",children:typeof S=="string"?S:"An error occurred"})}):null,q=()=>w?r.jsx(i.View,{...v0,...y==null?void 0:y.noDataOverlay,children:I||r.jsx(i.Text,{children:typeof w=="string"?w:"No data available"})}):null,J=T??(typeof n=="string"?n:"Chart"),Y=!S&&!C&&!w;return r.jsxs(i.View,{ref:A,role:"region","aria-label":J,"aria-busy":C,...f0,...y==null?void 0:y.container,...E,children:[n&&r.jsx(i.Text,{...m0,children:n}),Y&&l==="top"&&X(),r.jsxs(i.View,{flex:1,width:"100%",position:"relative",...y==null?void 0:y.chart,children:[Y&&oe(),B(),$(),q(),r.jsx(M0,{visible:s&&W.visible,x:W.x,y:W.y,content:W.content,maxDistance:100,views:y})]}),Y&&l==="bottom"&&X()]})},H0=e=>r.jsx(W0,{...e}),j0=(e=365)=>{const[o,t]=h.useState(!1),[n,a]=h.useState(null),l="app-studio-cookie-consent";h.useEffect(()=>{if(typeof localStorage>"u")return;const g=localStorage.getItem(l);a(g!==null?g==="true":!1)},[]);const c=g=>{if(typeof localStorage<"u"){localStorage.setItem(l,String(g));const m=new Date;m.setDate(m.getDate()+e),localStorage.setItem(`${l}-expires`,m.toISOString())}a(g)};return{isHovered:o,setIsHovered:t,hasConsent:n,acceptCookies:()=>{c(!0)},resetConsent:()=>{typeof localStorage<"u"&&(localStorage.removeItem(l),localStorage.removeItem(`${l}-expires`)),a(!1)}}},P0=e=>({default:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",boxShadow:"0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06)"},content:{color:"color-gray-800"},acceptButton:{backgroundColor:"color-blue-500",color:"color-white",hoverBackgroundColor:"color-blue-600"},customizeButton:{backgroundColor:"transparent",color:"color-gray-600",borderColor:"color-gray-300",hoverBackgroundColor:"color-gray-100"}},info:{container:{backgroundColor:"color-blue-50",borderColor:"color-blue-200",boxShadow:"0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06)"},content:{color:"color-blue-800"},acceptButton:{backgroundColor:"color-blue-500",color:"color-white",hoverBackgroundColor:"color-blue-600"},customizeButton:{backgroundColor:"transparent",color:"color-blue-800",borderColor:"color-blue-300",hoverBackgroundColor:"color-blue-100"}},primary:{container:{backgroundColor:"color-blue-50",borderColor:"color-blue-200",boxShadow:"0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06)"},content:{color:"color-blue-700"},acceptButton:{backgroundColor:"color-blue-500",color:"color-white",hoverBackgroundColor:"color-blue-600"},customizeButton:{backgroundColor:"transparent",color:"color-blue-700",borderColor:"color-blue-300",hoverBackgroundColor:"color-blue-100"}}}),V0=({title:e="Nous utilisons des cookies",description:o="Ce site utilise des cookies pour améliorer votre expérience. En continuant à naviguer sur ce site, vous acceptez notre utilisation des cookies conformément à notre politique de confidentialité.",acceptButtonText:t="Accepter",customizeButtonText:n="Personnaliser",position:a="bottom",variant:l="default",onAccept:c,onCustomize:s,views:d,showCustomizeButton:g=!0,cookieExpiration:m=365,themeMode:f,...p})=>{const{themeMode:u}=i.useTheme(),{hasConsent:y,acceptCookies:k}=j0(m),C=P0()[l];if(y)return null;const S=()=>{k(),c&&c()},w=()=>{s&&s()};return r.jsx(i.View,{style:{position:"fixed",left:16,right:16,zIndex:1e3,...a==="bottom"?{bottom:16}:{top:16}},padding:16,borderWidth:"1px",borderStyle:"solid",borderRadius:8,maxWidth:"800px",marginLeft:"auto",marginRight:"auto",transition:"opacity 0.3s ease, transform 0.3s ease",...C.container,...d==null?void 0:d.container,...p,children:r.jsxs(i.Vertical,{gap:12,maxWidth:1200,marginLeft:"auto",marginRight:"auto",children:[e&&r.jsx(i.Text,{fontWeight:"bold",fontSize:18,color:"color-black",...d==null?void 0:d.title,children:e}),o&&r.jsx(i.Text,{fontSize:14,color:"color-black",...d==null?void 0:d.description,children:o}),r.jsxs(i.Horizontal,{gap:12,justifyContent:"flex-end",marginTop:8,...d==null?void 0:d.buttonGroup,children:[g&&r.jsx(de,{variant:"outline",onClick:w,size:"sm",...d==null?void 0:d.customizeButton,children:n}),r.jsx(de,{variant:"filled",onClick:S,size:"sm",...d==null?void 0:d.acceptButton,children:t})]})]})})},A0=e=>r.jsx(V0,{...e}),E0=e=>{const{size:o,variant:t,onOpenChange:n}=e||{},[a,l]=h.useState(!1),[c,s]=h.useState({x:0,y:0}),[d,g]=h.useState(null),m=h.useRef(null),f=h.useRef(null),p=h.useMemo(()=>ct("contextmenu-content"),[]),u=h.useCallback(k=>{s({x:k.clientX,y:k.clientY}),l(!0),n==null||n(!0)},[n]),y=h.useCallback(()=>{l(!1),g(null),n==null||n(!1)},[n]);return h.useEffect(()=>{const k=S=>{f.current&&!f.current.contains(S.target)&&y()},x=()=>{a&&y()},C=S=>{S.key==="Escape"&&a&&y()};if(!(typeof document>"u"||typeof window>"u"))return document.addEventListener("mousedown",k),window.addEventListener("resize",x),document.addEventListener("keydown",C),()=>{document.removeEventListener("mousedown",k),window.removeEventListener("resize",x),document.removeEventListener("keydown",C)}},[a,y]),{isOpen:a,setIsOpen:l,position:c,setPosition:s,activeSubmenuId:d,setActiveSubmenuId:g,size:o,variant:t,triggerRef:m,contentRef:f,contentId:p,openMenu:u,closeMenu:y}},ka={sm:{padding:"6px 8px",fontSize:"14px",minWidth:"160px"},md:{padding:"8px 12px",fontSize:"16px",minWidth:"180px"},lg:{padding:"10px 16px",fontSize:"18px",minWidth:"200px"}},D0={default:{backgroundColor:"color-white",color:"color-gray-800"},filled:{backgroundColor:"color-gray-100",color:"color-gray-800"},outline:{backgroundColor:"color-white",borderWidth:"1px",borderStyle:"solid",borderColor:"color-gray-200",color:"color-gray-800"}},Ca={hover:{backgroundColor:"color-gray-100"}},wa=h.createContext({isOpen:!1,setIsOpen:()=>{},position:{x:0,y:0},setPosition:()=>{},activeSubmenuId:null,setActiveSubmenuId:()=>{},size:"md",variant:"default",triggerRef:{current:null},contentRef:{current:null},contentId:"contextmenu-content",closeMenu:()=>{},openMenu:()=>{}}),$0=({children:e,value:o})=>r.jsx(wa.Provider,{value:o,children:e}),Vr=()=>{const e=h.useContext(wa);if(!e)throw new Error("useContextMenuContext must be used within a ContextMenuProvider");return e},Sa=({children:e,disableNativeContextMenu:o=!0,asChild:t=!1,isDisabled:n=!1,views:a,...l})=>{const{triggerRef:c,contentId:s,openMenu:d}=Vr(),m={ref:c,onContextMenu:f=>{if(!n)if(o&&f.preventDefault(),d)d(f);else{const{setIsOpen:p,setPosition:u}=Vr();u({x:f.clientX,y:f.clientY}),p(!0)}},"aria-controls":s,"aria-haspopup":"menu","data-disabled":n?"":void 0,...t&&h.isValidElement(e)&&e.props.isDisabled===void 0&&{isDisabled:n},...a==null?void 0:a.container,...l};if(t&&h.isValidElement(e)){const f=h.Children.only(e);return h.cloneElement(f,{...m,...f.props})}return r.jsx(i.View,{...m,children:e})},At=({items:e,children:o,position:t,side:n="right",align:a="start",views:l,style:c,...s})=>{const{isOpen:d,position:g,contentRef:m,contentId:f,variant:p}=Vr(),u=h.useRef(null),y=m||u,{ref:k,relation:x}=i.useElementPosition({}),[C,S]=h.useState({x:0,y:0});if(h.useEffect(()=>{if(d&&y.current){const v=t||g,b=y.current.offsetWidth,I=y.current.offsetHeight,T=window.innerWidth,j=window.innerHeight;let E=v.x,D=v.y;x&&(x.space.horizontal==="left"?E=v.x-b:E=v.x,x.space.vertical==="top"?D=v.y-I:D=v.y),E+b>T&&(E=T-b-8),E<8&&(E=8),D+I>j&&(D=j-I-8),D<8&&(D=8),S({x:E,y:D})}},[d,g,t,n,a,y,x]),!d)return null;const w={position:"fixed",top:`${C.y}px`,left:`${C.x}px`,zIndex:1e3,transformOrigin:"top left"};return r.jsxs(i.View,{id:f||"context-menu",ref:y,role:"menu",tabIndex:-1,borderRadius:4,boxShadow:"0px 2px 8px rgba(0, 0, 0, 0.15)",overflow:"hidden",style:{...w,...c},...D0[p],...l==null?void 0:l.menu,...l==null?void 0:l.content,...s,children:[e&&e.map((v,b)=>v.divider?r.jsx(Ta,{views:l},`divider-${b}`):r.jsx(va,{item:v,views:l},v.id)),o]})},va=({item:e,children:o,onSelect:t,isDisabled:n=!1,views:a,variant:l,shape:c,isLoading:s,loaderProps:d,loaderPosition:g,icon:m,iconPosition:f,isFilled:p,isAuto:u,isIconRounded:y,isHovered:k,shadow:x,ariaLabel:C,animation:S,textColor:w,reversed:v,borderMovingDuration:b,borderMovingGradientColors:I,animatedStrokeAccentColor:T,animatedStrokeTextColor:j,to:E,isExternal:D,config:W,...A})=>{const{activeSubmenuId:H,setActiveSubmenuId:z,size:P,closeMenu:V}=Vr();if(e){const[_,O]=h.useState(!1),N=e.items&&e.items.length>0,U=H===e.id,[X,oe]=h.useState({x:0,y:0}),B=e.disabled||n,$=()=>{O(!0),N&&z(e.id)},q=()=>{O(!1)},J=()=>{B||!N&&e.onClick&&(e.onClick(),V&&V())},{ref:Y,relation:Z}=i.useElementPosition({});return h.useEffect(()=>{if(U&&Y.current){const ee=Y.current.getBoundingClientRect(),ne=window.innerWidth,K=200;let re=!1;if(Z)re=Z.space.horizontal==="left";else{const ie=ne-ee.right,ge=ee.left;re=ie<K&&ge>ie}oe({x:re?ee.left-K:ee.right,y:ee.top})}},[U,e.items,Z]),r.jsxs(i.View,{ref:Y,role:"menuitem",display:"flex",alignItems:"center",cursor:B?"not-allowed":"pointer",opacity:B?.5:1,position:"relative","aria-disabled":B,"data-disabled":B?"":void 0,...ka[P],_hover:B?{}:Ca.hover,backgroundColor:_&&!B?"color-gray-100":"transparent",onMouseEnter:$,onMouseLeave:q,onClick:J,...a==null?void 0:a.item,...A,children:[e.icon&&r.jsx(i.View,{marginRight:8,...a==null?void 0:a.icon,children:e.icon}),r.jsx(i.View,{flexGrow:1,children:e.label}),N&&r.jsx(i.View,{marginLeft:8,...a==null?void 0:a.submenuIndicator,children:r.jsx(he,{orientation:"right",widthHeight:16,color:"currentColor",filled:!0})}),U&&N&&r.jsx(At,{items:e.items||[],position:X,side:"right",align:"start",views:a})]})}const M=_=>{n||(t==null||t(_),V&&V())},L=E?{as:"a",href:E,color:"inherit",textDecoration:"none",...D?{target:"_blank",rel:"noopener noreferrer"}:{}}:{};return r.jsx(i.View,{role:"menuitem",onClick:M,cursor:n?"not-allowed":"pointer",opacity:n?.5:1,"aria-disabled":n,"data-disabled":n?"":void 0,...ka[P],_hover:n?{}:Ca.hover,...L,...a==null?void 0:a.item,...A,children:o})},Ta=({views:e,...o})=>r.jsx(i.View,{height:"1px",backgroundColor:"color-gray-200",margin:"4px 0",role:"separator","aria-orientation":"horizontal",...e==null?void 0:e.divider,...o}),L0=({views:e,...o})=>r.jsx(i.View,{height:"1px",backgroundColor:"color-gray-200",margin:"4px 0",role:"separator","aria-orientation":"horizontal",...e==null?void 0:e.separator,...o}),_0=({children:e,items:o,size:t="md",variant:n="default",disableNativeContextMenu:a=!0,views:l,themeMode:c,onOpenChange:s,...d})=>!o||o.length===0?r.jsx(r.Fragment,{children:e}):r.jsxs(r.Fragment,{children:[r.jsx(Sa,{disableNativeContextMenu:a,views:l,...d,children:e}),r.jsx(At,{items:o,views:l})]}),Wo=({children:e,items:o,size:t="md",variant:n="default",disableNativeContextMenu:a=!0,onOpenChange:l,views:c,...s})=>{const d=E0({size:t,variant:n,onOpenChange:l}),{isOpen:g,setIsOpen:m,position:f,setPosition:p,activeSubmenuId:u,setActiveSubmenuId:y,triggerRef:k,contentRef:x,contentId:C,openMenu:S,closeMenu:w}=d;return r.jsx($0,{value:{isOpen:g,setIsOpen:m,position:f,setPosition:p,activeSubmenuId:u,setActiveSubmenuId:y,size:t,variant:n,triggerRef:k,contentRef:x,contentId:C,openMenu:S,closeMenu:w,styles:c},children:r.jsx(_0,{items:o,size:t,variant:n,disableNativeContextMenu:a,views:c,...s,children:e})})};Wo.Trigger=Sa,Wo.Content=At,Wo.Item=va,Wo.Divider=Ta,Wo.Separator=L0;const B0=({src:e,color:o,views:t,themeMode:n,...a})=>{const{getColor:l,themeMode:c}=i.useTheme(),s=o?{fill:l(o,{themeMode:c}),stroke:l(o,{themeMode:c})}:{};return r.jsx(i.View,{display:"flex",alignItems:"center",justifyContent:"center",...a,...t==null?void 0:t.container,children:r.jsx(i.Image,{...s,content:'url("'+e+'")',width:"100%",height:"100%",...t==null?void 0:t.image})})},O0=({path:e,...o})=>r.jsx(i.Image,{src:e,...o}),Ia=(e,o)=>o?Array.isArray(e)?e:e===""?[]:[e]:Array.isArray(e)?e[0]??"":e,Fa=({placeholder:e,isMulti:o,options:t,value:n,defaultValue:a,id:l})=>{const c=h.useId().replace(/[^a-zA-Z0-9_-]/g,""),s=l??`select-${c}`,d=n!==void 0,[g,m]=h.useState(!1),[f,p]=h.useState(!1),[u,y]=h.useState(()=>a!==void 0?Ia(a,o):o?[]:e?"":Array.isArray(t)&&t.length>0?t[0].value:""),k=d?Ia(n,o):u,x=h.useCallback(b=>{d||y(b)},[d]),[C,S]=h.useState(0),[w,v]=h.useState(!0);return{id:s,value:k,setValue:x,hide:w,setHide:v,isHovered:g,setIsHovered:m,isFocused:f,setIsFocused:p,highlightedIndex:C,setHighlightedIndex:S}},Et=({children:e,views:o={helperText:{}},...t})=>r.jsx(i.Text,{fontSize:"11px",fontWeight:"400",letterSpacing:"-0.01em",lineHeight:"16px",marginVertical:0,marginHorizontal:0,color:"color-gray-500",transition:"color 0.2s ease, opacity 0.2s ease",...o.helperText,...t,children:e}),Ue=h.forwardRef(({children:e,helperText:o,error:t=!1,views:n,...a},l)=>r.jsxs(i.Vertical,{ref:l,gap:4,position:"relative",width:"100%",boxSizing:"border-box",marginVertical:0,...a,...n==null?void 0:n.container,children:[e,!t&&o&&r.jsx(Et,{marginTop:0,...n==null?void 0:n.helperText,children:o}),t&&r.jsx(i.Text,{fontSize:"11px",lineHeight:"16px",marginTop:0,marginHorizontal:0,fontWeight:"500",color:"color-red-500",transition:"color 0.2s ease, opacity 0.2s ease",...n==null?void 0:n.error,children:t})]}));Ue.displayName="FieldContainer";const N0={default:{borderRadius:"8px"},square:{borderRadius:0},rounded:{borderRadius:"8px"},pill:{borderRadius:"9999px"}},q0={xs:"10px",sm:"11px",md:"11px",lg:"12px",xl:"12px"},U0={outline:{borderWidth:"1px",borderStyle:"solid",borderColor:"color-gray-200",backgroundColor:"transparent",color:"inherit",transition:"border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease",_hover:{borderColor:"color-gray-300"},_focus:{borderColor:"theme-primary",outline:"none",boxShadow:"0 0 0 3px theme-primary"},_focusVisible:{borderColor:"theme-primary",outline:"none",boxShadow:"0 0 0 3px theme-primary"}},default:{borderWidth:"1px",borderStyle:"solid",borderColor:"color-gray-200",borderRadius:"8px",backgroundColor:"transparent",color:"inherit",transition:"border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease",_hover:{borderColor:"color-gray-300"},_focus:{borderColor:"theme-primary",outline:"none",boxShadow:"0 0 0 3px theme-primary"},_focusVisible:{borderColor:"theme-primary",outline:"none",boxShadow:"0 0 0 3px theme-primary"}},none:{border:"none",style:{backgroundColor:"transparent"},color:"inherit",transition:"background-color 0.2s ease"}},G0={xs:{minHeight:24,paddingVertical:4,paddingHorizontal:10},sm:{minHeight:32,paddingVertical:7,paddingHorizontal:10},md:{minHeight:40,paddingVertical:9,paddingHorizontal:12},lg:{minHeight:48,paddingVertical:11,paddingHorizontal:14},xl:{minHeight:56,paddingVertical:13,paddingHorizontal:16}},Y0=e=>{const{minHeight:o,paddingVertical:t,paddingHorizontal:n}=G0[e];return{minHeight:`${o}px`,paddingTop:`${t}px`,paddingBottom:`${t}px`,paddingLeft:`${n}px`,paddingRight:`${n}px`}},oo=({label:e,shadow:o,children:t,value:n,size:a="md",shape:l="default",variant:c="default",error:s=!1,showLabel:d=!1,isFocused:g=!1,isHovered:m=!1,isDisabled:f=!1,isReadOnly:p=!1,views:u={pickerBox:{}},...y})=>{const{themeMode:k}=i.useTheme(),x=k==="dark",S=s?"color-red-500":(m||g)&&!f?"theme-primary":"color-gray-200";return r.jsx(i.Horizontal,{gap:8,width:"100%",boxSizing:"border-box",display:"flex",flexWrap:"nowrap",alignItems:"center",justifyContent:"flex-start",borderStyle:"solid",borderColor:S,backgroundColor:x?"color-gray-900":"color-white",fontSize:i.Typography.fontSizes[a],cursor:f?"not-allowed":p?"auto":"text",opacity:f?.7:1,transition:"border-color 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease",...Y0(a),...typeof o=="object"&&o!==null?o:{},...N0[l],...U0[c],...u==null?void 0:u.container,...y,children:t})},Zo=({children:e,...o})=>r.jsx(i.Horizontal,{gap:10,right:10,zIndex:500,flexWrap:"nowrap",alignItems:"center",justifyContent:"flex-end",...o,children:e}),K0={h1:{fontSize:96,letterSpacing:-1.5},h2:{fontSize:60,letterSpacing:-.5},h3:{fontSize:48,letterSpacing:0},h4:{fontSize:34,letterSpacing:.25},h5:{fontSize:24,letterSpacing:0},h6:{fontSize:20,letterSpacing:.15}},X0=({children:e,heading:o,isItalic:t=!1,isUnderlined:n=!1,isStriked:a=!1,weight:l="normal",size:c="sm",dropDown:s,error:d,isDisabled:g,helperText:m,views:f,...p})=>{const u=o?K0[o]:{};return r.jsx(i.Element,{as:"label",width:"100%",fontSize:c,fontStyle:t?"italic":"normal",fontWeight:i.Typography.fontWeights[l],textDecoration:a?"line-through":n?"underline":"none",...d?{color:"color-red-500"}:g?{color:"color-gray-400"}:{},...g?{cursor:"not-allowed"}:{},...u,...p,children:e})},Ro=e=>r.jsx(X0,{...e}),ho=({children:e,size:o="md",error:t=!1,color:n="theme-primary",views:a={label:{}},helperText:l,...c})=>r.jsx(Ro,{position:"static",fontSize:q0[o],letterSpacing:"-0.01em",whiteSpace:"nowrap",fontWeight:500,color:t?"color-red-500":"inherit",transition:"color 0.2s ease",...a.label,...c,children:e}),Ho=({children:e,...o})=>r.jsx(i.Vertical,{display:"flex",flexDirection:"column",gap:4,flex:1,width:"100%",maxWidth:"100%",boxSizing:"border-box",...o,children:e}),za={xs:12,sm:14,md:16,lg:18,xl:20},J0={maxHeight:"280px",overflowY:"auto",zIndex:1e3,backgroundColor:"color-white",borderRadius:12,borderWidth:"1px",borderStyle:"solid",borderColor:"color-gray-200",boxShadow:"0 4px 12px rgba(0, 0, 0, 0.1)"},Q0={enter:{opacity:1,transform:"translateY(0) scale(1)",transition:"all 0.2s ease-in-out"}},Z0={padding:"10px 12px",cursor:"pointer",borderRadius:8,margin:"2px 4px",transition:"all 0.15s ease-in-out"},Ar={default:{},highlighted:{backgroundColor:"color-gray-100"},selected:{backgroundColor:"color-gray-100"},selectedHighlighted:{backgroundColor:"color-gray-200"}},Ma={open:{transform:"rotate(180deg)",transition:"all 0.2s ease-in-out"},closed:{transform:"rotate(0deg)",transition:"all 0.2s ease-in-out"}},R0={padding:"4px 8px",borderRadius:8,backgroundColor:"color-gray-100",fontSize:"12px",fontWeight:"500",color:"color-gray-700",transition:"all 0.15s ease-in-out"},eg={scrollbarWidth:"thin",scrollbarColor:"rgba(0, 0, 0, 0.15) transparent"},og=e=>{if(!e)return{};const{container:o,content:t,...n}=e;return n},rg=({isHovered:e,setIsHovered:o=()=>{},option:t,size:n="md",callback:a=()=>{},style:l,isSelected:c=!1,...s})=>{const d=(f,p)=>{f.stopPropagation(),f.preventDefault(),typeof a=="function"&&a(p)},g=()=>o(!e),m=()=>c&&e?Ar.selectedHighlighted:c?Ar.selected:e?Ar.highlighted:Ar.default;return r.jsxs(i.Element,{as:"li",role:"option","aria-selected":c,display:"flex",alignItems:"center",justifyContent:"space-between",listStyleType:"none",...Z0,...m(),onMouseEnter:g,onMouseLeave:g,onClick:f=>d(f,t.value),...s,children:[r.jsx(i.Text,{fontSize:i.Typography.fontSizes[n],fontWeight:c?"500":"400",lineHeight:"14px",color:c?"color-gray-900":"color-gray-700",...l,children:t.label}),c&&r.jsx(i.Element,{as:"span",color:"theme-primary",fontSize:"14px",marginLeft:8,display:"flex",alignItems:"center",children:"✓"})]})},tg=({size:e="md",views:o={field:{},text:{}},value:t,isDisabled:n,placeholder:a,removeOption:l=()=>{},options:c})=>{const s=(o==null?void 0:o.field)||{},d=(o==null?void 0:o.text)||{},g=Array.isArray(t)&&t.length>0,m={margin:0,width:"95%",height:"100%",border:"none",paddingVertical:0,paddingHorizontal:0,fontSize:i.Typography.fontSizes[e],fontWeight:"400",letterSpacing:"-0.01em",color:n?"color-gray-400":"color-gray-900",cursor:n?"not-allowed":"pointer",transition:"all 0.2s ease-in-out",...g?{}:{maxLines:1,minWidth:0},...s,...d,style:{backgroundColor:"transparent",...s.style,...d.style}},f=c.length>0&&c.find(p=>p.value===t);return r.jsx(i.Text,{...m,children:(t===""||Array.isArray(t)&&t.length===0)&&a?a:r.jsx(r.Fragment,{children:typeof t=="string"?(f&&f.label)??t:Array.isArray(t)&&t.length>0?r.jsx(i.Horizontal,{gap:6,children:t.map(p=>r.jsx(lg,{option:p,removeOption:l},p))}):r.jsx("span",{children:t})})})},ng=({id:e,name:o,value:t,onChange:n,isMulti:a=!1,isDisabled:l=!1,isReadOnly:c=!1,options:s=[],defaultValue:d,...g})=>{const m=f=>{n&&n(a?Array.from(f.target.selectedOptions,p=>p.value):f.target.value)};return r.jsx(i.Element,{id:e,name:o,as:"select",opacity:0,width:1,height:1,overflow:"hidden",position:"absolute",pointerEvents:"none",tabIndex:-1,"aria-hidden":"true",value:t,disabled:l,readOnly:c,onChange:m,multiple:a,...g,children:s.length>0&&s.map(f=>r.jsx("option",{value:f.value,children:f.label},f.value))})},ag=({size:e,views:o={},options:t,callback:n=()=>{},highlightedIndex:a,setHighlightedIndex:l=()=>{},selectedValue:c,listboxId:s,getOptionId:d})=>{const g=f=>n(f),m=f=>Array.isArray(c)?c.includes(f):c===f;return r.jsx(i.Element,{as:"ul",role:"listbox",id:s,display:"flex",flexDirection:"column",margin:0,padding:"4px",...J0,style:eg,...o==null?void 0:o.dropDown,children:t&&t.length>0&&t.map((f,p)=>r.jsx(rg,{id:d?d(p):void 0,size:e,style:o.text,option:f,callback:g,isSelected:m(f.value),isHovered:p===a,setIsHovered:()=>{},onMouseEnter:()=>l(p)},f.value))})},lg=({option:e,size:o="md",removeOption:t=()=>{},...n})=>{const a=()=>t(e);return r.jsxs(i.Horizontal,{gap:6,alignItems:"center",onClick:l=>l.stopPropagation(),...R0,_hover:{backgroundColor:"color-gray-200"},...n,children:[r.jsx(i.Text,{fontSize:i.Typography.fontSizes[o],fontWeight:"500",color:"color-gray-700",children:e}),r.jsx(i.Element,{as:"button",type:"button","aria-label":`Remove ${e}`,onClick:a,display:"flex",alignItems:"center",justifyContent:"center",padding:0,border:"none",backgroundColor:"transparent",color:"color-gray-500",cursor:"pointer",transition:"all 0.2s ease-in-out",_hover:{color:"color-gray-700"},children:r.jsx(He,{color:"inherit",widthHeight:za[o]})})]})},Wa=({id:e,name:o,label:t,value:n,placeholder:a,helperText:l,hide:c=!1,error:s=!1,isMulti:d=!1,isFocused:g=!1,isHovered:m=!1,isDisabled:f=!1,isReadOnly:p=!1,isRequired:u=!1,isAutoFocus:y=!1,options:k=[],shadow:x={},size:C="md",shape:S="default",variant:w="default",views:v={text:{},icon:{},dropDown:{},selectBox:{},label:{},helperText:{}},onChange:b=()=>{},setHide:I=()=>{},setValue:T=()=>{},setIsHovered:j=()=>{},setIsFocused:E=()=>{},setHighlightedIndex:D,highlightedIndex:W,isScrollable:A,"aria-label":H,...z})=>{const P=h.useId(),V=e??`select-${P.replace(/[^a-zA-Z0-9_-]/g,"")}`,M=`${V}-native`,L=`${V}-label`,_=`${V}-listbox`,O=K=>`${V}-option-${K}`,{ref:N,relation:U,updateRelation:X}=i.useElementPosition({trackChanges:!0,trackOnScroll:!0,trackOnResize:!0,throttleMs:10}),oe=h.useRef(null),B=()=>{var ge;if(!N.current)return{};const K=N.current.getBoundingClientRect(),re={position:"fixed",left:K.left,width:K.width,zIndex:1e4};return((ge=U==null?void 0:U.space)==null?void 0:ge.vertical)==="top"?{...re,bottom:window.innerHeight-K.top+8}:{...re,top:K.bottom+8}};h.useEffect(()=>{const K=()=>I(!0);return document.addEventListener("closeAllSelects",K),()=>document.removeEventListener("closeAllSelects",K)},[I]),h.useEffect(()=>{var K;y&&!f&&!p&&((K=N.current)==null||K.focus())},[]),h.useEffect(()=>{const K=re=>{!re.target.closest(`#${V}`)&&!c&&I(!0)};return document.addEventListener("click",K),()=>{document.removeEventListener("click",K)}},[V,c,I]);const $=()=>j(!m),q=()=>E(!0),J=K=>{document.dispatchEvent(new Event("closeAllSelects")),K&&K.stopPropagation&&K.stopPropagation();const re=!c;I(re),E(!re)},Y=h.useCallback(K=>{if(I(!0),document.dispatchEvent(new Event("closeAllSelects")),d&&Array.isArray(n)){if(!n.includes(K)){const re=[...n,K];T(re),b&&b(re)}}else T(K),b&&b(K);E(!0)},[d,n,I,T,b,E]),Z=K=>{if(Array.isArray(n)&&n.includes(K)){const re=n.filter(ie=>ie!==K);T(re),b&&b(re)}},ee=!!t,ne=og(v);return r.jsx(Ue,{ref:N,position:"relative",width:"100%",display:"inline-block",id:V,role:"combobox","aria-haspopup":"listbox","aria-expanded":!c,"aria-labelledby":!H&&ee?L:void 0,"aria-label":H,"aria-controls":_,"aria-activedescendant":!c&&k.length>0?O(W??0):void 0,"aria-disabled":f||void 0,"aria-required":u||void 0,tabIndex:f||p?-1:0,helperText:l,error:s,views:ne,onKeyDown:K=>{if(f||p||K.target!==K.currentTarget)return;if(c){(K.key==="Enter"||K.key===" "||K.key==="ArrowDown")&&(K.preventDefault(),document.dispatchEvent(new Event("closeAllSelects")),I(!1),E(!0));return}const re=W??0;if(K.key==="ArrowDown")K.preventDefault(),D==null||D(Math.min(re+1,k.length-1));else if(K.key==="ArrowUp")K.preventDefault(),D==null||D(Math.max(re-1,0));else if(K.key==="Enter"){K.preventDefault();const ie=k[re];ie&&Y(ie.value)}else K.key==="Escape"&&(K.preventDefault(),I(!0))},onClick:K=>{K.stopPropagation(),f||p||J(K)},children:r.jsxs(oo,{label:t,size:C,error:s,shape:S,views:v,shadow:x,variant:w,value:n,color:"theme-primary",isHovered:m,isDisabled:f,isReadOnly:p,isFocused:g,showLabel:ee,onMouseEnter:$,onMouseLeave:$,position:"relative",...v==null?void 0:v.content,children:[r.jsxs(Ho,{children:[ee&&r.jsx(ho,{id:L,htmlFor:M,color:"theme-primary",error:s,...v==null?void 0:v.label,children:t}),r.jsx(ng,{id:M,name:o,options:k,onChange:b,value:n,isDisabled:f,isReadOnly:p,isMulti:d,required:u||void 0,onFocus:q,...z}),r.jsx(tg,{options:k,size:C,views:v,value:n,isDisabled:f,placeholder:a,removeOption:Z})]}),r.jsx(Zo,{children:!p&&!f&&r.jsx(i.Element,{display:"flex",alignItems:"center",justifyContent:"center",style:c?Ma.closed:Ma.open,children:r.jsx(he,{color:"inherit",widthHeight:za[C],style:v.icon,orientation:"down"})})}),!c&&k.length>0&&r.jsx(ft,{children:r.jsx(i.Element,{ref:oe,onClick:K=>K.stopPropagation(),style:{...B(),...Q0.enter},children:r.jsx(ag,{size:C,views:v,options:k,callback:Y,highlightedIndex:W,setHighlightedIndex:D,selectedValue:n,listboxId:_,getOptionId:O})})})]})})},er=e=>{const o=pe("select",e),t={...o,options:o.options||[]},n=Fa(t);return r.jsx(Wa,{...n,...t,value:n.value,onClick:a=>{a.stopPropagation(),o.onClick&&o.onClick(a)}})},Ha=({isDisabled:e,isChecked:o})=>{const[t,n]=h.useState(!1),[a,l]=h.useState(o||!1),[c,s]=h.useState(o||!1);return h.useEffect(()=>{o!==void 0&&(l(o),s(o))},[o]),{isHovered:t,setIsHovered:n,on:a,setOn:l,value:c,setValue:s}},ja={xs:{height:"10px",width:"10px"},sm:{height:"14px",width:"14px"},md:{height:"18px",width:"18px"},lg:{height:"22px",width:"22px"},xl:{height:"26px",width:"26px"}},ig={xs:{height:"20px",width:"40px"},sm:{height:"24px",width:"48px"},md:{height:"28px",width:"56px"},lg:{height:"32px",width:"64px"},xl:{height:"36px",width:"72px"}},cg={xs:{height:"22px",width:"52px"},sm:{height:"26px",width:"62px"},md:{height:"30px",width:"72px"},lg:{height:"34px",width:"84px"},xl:{height:"38px",width:"96px"}},sg={xs:"9px",sm:"10px",md:"11px",lg:"12px",xl:"13px"},Er={xs:{paddingVertical:5,paddingHorizontal:3},sm:{paddingVertical:5,paddingHorizontal:3},md:{paddingVertical:5,paddingHorizontal:5},lg:{paddingVertical:5,paddingHorizontal:5},xl:{paddingVertical:5,paddingHorizontal:5}},Ge={default:{active:"theme-primary",inactive:"color-gray-300",knob:"color-white",disabled:"color-gray-200"},states:{hover:{active:"theme-primary",inactive:"color-gray-400",activeOpacity:.9},focus:{active:{outline:"none",boxShadow:"0 0 0 2px white, 0 0 0 4px theme-primary"},inactive:{outline:"none",boxShadow:"0 0 0 2px white, 0 0 0 4px color-gray-200"}}}},Pa={slider:{transition:"all 0.2s ease-in-out"},knob:{transition:"all 0.2s ease-in-out"}},dg=e=>r.jsx(i.Input,{type:"checkbox",...e}),Va=({id:e,name:o,label:t,inActiveChild:n,isChecked:a,activeChild:l,labelPosition:c="right",shadow:s={},size:d="sm",value:g=!1,isHovered:m=!1,isDisabled:f=!1,isReadOnly:p=!1,on:u,setOn:y=()=>{},onChange:k,setValue:x=()=>{},setIsHovered:C=()=>{},helperText:S,description:w,views:v={slider:{},circle:{},label:{}},...b})=>{const I=h.useId(),T=e??I,[j,E]=h.useState(!1),D=typeof a=="boolean"?a:g,A=!!(l||n)?cg[d]:ig[d],H=`${Er[d].paddingHorizontal}px`,z=`${Er[d].paddingHorizontal+2}px`,P=`calc(${ja[d].width} + ${Er[d].paddingHorizontal}px + 4px)`,V=sg[d],M=B=>{if(!p&&!f){const $=B.target.checked;x($),y($),k&&k($)}},L=()=>C(!0),_=()=>C(!1),O=B=>{let $=!0;try{$=B.target.matches(":focus-visible")}catch{}E($)},N=()=>E(!1),U=`${T}-description`,X={container:{gap:12,display:"flex",height:"fit-content",width:"fit-content",alignItems:"center",cursor:f?"not-allowed":p?"default":"pointer",opacity:f?.6:1,transition:"all 0.2s ease-in-out",...v.label}},oe=r.jsxs(Ro,{htmlFor:T,onMouseEnter:L,onMouseLeave:_,...X.container,children:[c==="left"&&t&&r.jsx(i.Text,{fontWeight:"500",color:f?"color-gray-400":"inherit",transition:"color 0.2s ease, opacity 0.2s ease",children:t}),r.jsxs(i.View,{display:"flex",alignItems:"center",justifyContent:"center",position:"relative",marginBottom:4,borderRadius:"9999px",backgroundColor:f?Ge.default.disabled:D?m?Ge.states.hover.active:Ge.default.active:m?Ge.states.hover.inactive:Ge.default.inactive,opacity:!f&&D&&m?Ge.states.hover.activeOpacity:1,cursor:"pointer",...Pa.slider,...s,...Er[d],...A,...v.slider,...j?D?Ge.states.focus.active:Ge.states.focus.inactive:{},children:[r.jsx(dg,{id:T,name:o,role:"switch","aria-checked":D,position:"absolute",top:0,left:0,width:"100%",height:"100%",margin:0,opacity:0,zIndex:2,cursor:f?"not-allowed":p?"default":"pointer",checked:D,onChange:M,onFocus:O,onBlur:N,disabled:f,readOnly:p,"aria-describedby":w?U:void 0,...b}),l&&D&&r.jsx(i.View,{marginLeft:z,marginRight:P,transition:"all 0.2s ease-in-out",display:"flex",alignItems:"center",justifyContent:"center",height:"100%",width:"100%",overflow:"hidden",fontSize:V,color:"color-white",fontWeight:600,children:l}),r.jsx(i.View,{position:"absolute",top:"50%",left:D?void 0:H,right:D?H:void 0,borderRadius:"50%",backgroundColor:Ge.default.knob,boxShadow:m?"0 4px 10px rgba(15, 23, 42, 0.18)":"0 1px 3px rgba(15, 23, 42, 0.18)",transform:`translateY(-50%) ${m?"scale(1.05)":"scale(1)"}`,...Pa.knob,zIndex:1,...ja[d],...v.circle}),n&&!D&&r.jsx(i.View,{marginLeft:P,marginRight:z,transition:"all 0.2s ease-in-out",display:"flex",alignItems:"center",justifyContent:"center",height:"100%",width:"100%",overflow:"hidden",fontSize:V,color:"color-white",fontWeight:600,children:n})]}),c==="right"&&t&&r.jsx(i.Text,{fontWeight:"500",color:f?"color-gray-400":"inherit",transition:"all 0.2s ease-in-out",children:t})]});return w?r.jsxs(i.Vertical,{gap:4,width:"fit-content",children:[oe,r.jsx(i.Text,{id:U,color:"color-gray-500",fontSize:"14px",lineHeight:"20px",children:w})]}):oe},Dt=e=>{const o=pe("switch",e),t=Ha(o);return r.jsx(Va,{...t,...o})},Aa=({placeholder:e,isMulti:o,options:t,id:n})=>{const a=h.useId().replace(/[^a-zA-Z0-9_-]/g,""),l=n??`selector-${a}`,c=e?o?[]:"":Array.isArray(t)&&t.length>0?t[0].value:o?[]:"",[s,d]=h.useState(!1),[g,m]=h.useState(!1),[f,p]=h.useState(c),[u,y]=h.useState(!0);return{id:l,value:f,setValue:p,hide:u,setHide:y,isHovered:s,setIsHovered:d,isFocused:g,setIsFocused:m}},Ea=({id:e,name:o,label:t,value:n,views:a={},options:l=[],helperText:c,error:s=!1,isDisabled:d=!1,isReadOnly:g=!1,onChange:m=()=>{},setValue:f=()=>{},hide:p,setHide:u,isHovered:y,setIsHovered:k,isFocused:x,setIsFocused:C,placeholder:S,isMulti:w,shape:v,variant:b,size:I,shadow:T,isScrollable:j,"aria-label":E,...D})=>{const W=h.useId(),A=e??W,H=`${A}-label`,z=`${A}-helper-text`,P=!!c,V=h.useCallback(M=>{d||g||(f(M.value),m&&m(M.value))},[f,m,d,g]);return r.jsxs(Ue,{id:A,width:"100%",views:a,...D,children:[t&&r.jsxs(i.Horizontal,{fontSize:"10px",letterSpacing:"wider",color:"color-black-500",fontWeight:"bold",marginBottom:12,alignItems:"center",gap:6,style:{textTransform:"uppercase"},children:[r.jsx(Re,{widthHeight:14})," ",r.jsx(i.Text,{id:H,children:t})]}),r.jsx(i.Horizontal,{gap:0,role:"radiogroup","aria-labelledby":!E&&t?H:void 0,"aria-label":E,"aria-describedby":P?z:void 0,"aria-readonly":g||void 0,"aria-invalid":s?!0:void 0,children:l.map((M,L,_)=>{const O=n===M.value,N=M.color??"theme-primary",U=O?N:"color-gray-200",X=O?N:"color-gray-500",oe=L===0,B=L===_.length-1,$=B||O;return r.jsx(i.View,{as:"button",type:"button",role:"radio","aria-checked":O,disabled:d,onClick:()=>V(M),flex:1,minWidth:0,whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",textAlign:"center",paddingVertical:6,paddingHorizontal:12,fontSize:"12px",fontWeight:O?"bold":"normal",cursor:d?"not-allowed":g?"default":"pointer",backgroundColor:"transparent",color:X,borderStyle:"solid",borderColor:U,borderTopWidth:1,borderBottomWidth:1,borderLeftWidth:1,borderRightWidth:$?1:0,borderRadius:oe?"6px 0 0 6px":B?"0 6px 6px 0":"0",zIndex:O?1:0,transition:"color 0.15s ease, border-color 0.15s ease, background-color 0.15s ease",...a.item,children:M.label},M.value)})}),r.jsx("input",{type:"hidden",id:`${A}-input`,name:o,value:Array.isArray(n)?n.join(","):n,onChange:()=>{}}),P&&r.jsx(i.Text,{id:z,fontSize:"11px",lineHeight:"16px",marginTop:0,fontWeight:s?"500":"400",color:s?"color-red-500":"color-gray-500",transition:"color 0.2s ease, opacity 0.2s ease",...a.helperText,children:c})]})},gg=e=>{const o={...e,options:e.options||[]},t=Aa(o);return r.jsx(Ea,{...t,...o,onClick:n=>{n.stopPropagation(),e.onClick&&e.onClick(n)}})},Da=({label:e,placeholder:o,value:t})=>{const[n,a]=h.useState(e??o),[l,c]=h.useState(!1),[s,d]=h.useState(t||""),[g,m]=h.useState(!1);return h.useMemo(()=>{a(g&&!s?o??"":e??o)},[s,g,e,o]),{hint:n,setHint:a,isHovered:l,setIsHovered:c,value:s,setValue:d,isFocused:g,setIsFocused:m}},hg=e=>{if(!e)return{};const{container:o,content:t,...n}=e;return n},fg=(e,o)=>{if(o!=="pill")return e;if(typeof e=="number")return Math.min(e,28);if(typeof e=="string"){const t=Number.parseFloat(e);if(Number.isFinite(t)&&e.trim().endsWith("px"))return`${Math.min(t,28)}px`}return"28px"},$a=({id:e,name:o,hint:t,error:n,value:a,label:l,shadow:c,helperText:s,placeholder:d,size:g="sm",shape:m="default",variant:f="default",isHovered:p=!1,isFocused:u=!1,isEditable:y=!0,isReadOnly:k=!1,isDisabled:x=!1,isAutoFocus:C=!1,isRequired:S,required:w,labelProps:v,maxRows:b=3,maxCols:I=30,onBlur:T=()=>{},onChange:j,onFocus:E,setHint:D=()=>{},setValue:W=()=>{},setIsFocused:A=()=>{},setIsHovered:H=()=>{},onChangeText:z,inputRef:P,views:V={label:{},helperText:{}},...M})=>{const L=h.useId(),_=e??L,O=!!l,N={xs:{minHeight:"72px",shellPaddingY:6,shellPaddingX:10,fontSize:12,lineHeight:"16px"},sm:{minHeight:"88px",shellPaddingY:8,shellPaddingX:10,fontSize:12,lineHeight:"16px"},md:{minHeight:"104px",shellPaddingY:10,shellPaddingX:12,fontSize:14,lineHeight:"20px"},lg:{minHeight:"120px",shellPaddingY:12,shellPaddingX:14,fontSize:16,lineHeight:"24px"},xl:{minHeight:"136px",shellPaddingY:14,shellPaddingX:16,fontSize:18,lineHeight:"28px"}},U=(V==null?void 0:V.field)||{},X=(V==null?void 0:V.container)||{},oe=fg(X.borderRadius,m),B={...V,container:{...X,...oe!==void 0?{borderRadius:oe}:{},overflow:"hidden"}},$=hg(V),q={margin:0,paddingVertical:0,paddingHorizontal:0,width:"100%",minHeight:N[g].minHeight,maxHeight:"calc(100vh - 100px)",border:"none",on:{focus:{outline:"none"}},fontSize:N[g].fontSize,letterSpacing:"-0.01em",fontWeight:400,color:x?"color-gray-400":"color-gray-900",cursor:x?"not-allowed":"text",opacity:x?.7:1,transition:"color 0.2s ease, opacity 0.2s ease",...U,style:{backgroundColor:"transparent",...U.style}},J=()=>{A(!0),E&&E()},Y=ee=>{T(ee),A(!1)},Z=ee=>{const ne=typeof ee=="string"?ee:ee.target.value;W(ne),z&&z(ne),j&&j(ne)};return r.jsx(Ue,{helperText:s,error:n,views:$,children:r.jsx(oo,{label:l,size:g,error:n,shape:m,views:B,shadow:c,variant:f,value:a,color:"theme-primary",isHovered:p,isDisabled:x,isReadOnly:k,isFocused:u,showLabel:O,alignItems:"flex-start",minHeight:N[g].minHeight,paddingTop:N[g].shellPaddingY,paddingBottom:N[g].shellPaddingY,paddingLeft:N[g].shellPaddingX,paddingRight:N[g].shellPaddingX,onMouseEnter:()=>H(!0),onMouseLeave:()=>H(!1),...B==null?void 0:B.content,children:r.jsxs(Ho,{...V==null?void 0:V.warper,children:[O&&r.jsx(ho,{htmlFor:_,color:"theme-primary",error:n,...v,...V==null?void 0:V.label,children:l}),r.jsx(i.Element,{ref:P,as:"textarea",id:_,name:o,rows:b,cols:I,value:a,readOnly:k||!y,disabled:x,autoFocus:C,...S??w?{required:!0,"aria-required":!0}:{},placeholder:d||t,onBlur:Y,onFocus:J,onChange:ee=>Z(ee),...q,...M,style:{resize:x||k||!y?"none":"vertical",...q.style,...M.style||{}},...V==null?void 0:V.textarea})]})})})},$t=e=>{const o=pe("textarea",e),t=Da(o);return r.jsx($a,{...t,...o})},Lt=({label:e,placeholder:o,value:t})=>{const[n,a]=h.useState(e??o),[l,c]=h.useState(!1),[s,d]=h.useState(!1),[g,m]=h.useState(t);return h.useMemo(()=>{a(l&&!g?o??"":e??o)},[g,l,e,o]),{hint:n,setHint:a,isFocused:l,setIsFocused:c,isHovered:s,setIsHovered:d,setValue:m,value:g}},or=({id:e,name:o,label:t,hint:n,value:a,onChange:l,left:c,right:s,helperText:d,placeholder:g,onChangeText:m,shadow:f={},views:p={container:{},field:{},label:{},helperText:{},text:{}},size:u="md",shape:y="default",variant:k="default",error:x=!1,isFocused:C=!1,isHovered:S=!1,isDisabled:w=!1,isReadOnly:v=!1,isClearable:b=!0,isAutoFocus:I=!1,isRequired:T,required:j,labelProps:E,leftIcon:D,rightIcon:W,setHint:A=()=>{},setIsFocused:H=()=>{},setIsHovered:z=()=>{},setValue:P=()=>{},onClick:V=()=>{},onFocus:M,onBlur:L=()=>{},themeMode:_,inputRef:O,...N})=>{const U=h.useId(),X=e??U,{getColor:oe,themeMode:B}=i.useTheme(),$=oe(w?"color-gray-400":"color-gray-500",{themeMode:_||B}),q=!!t,J={xs:{minHeight:24,shellPaddingY:6,shellPaddingX:10,fontSize:12,lineHeight:"16px"},sm:{minHeight:32,shellPaddingY:8,shellPaddingX:10,fontSize:12,lineHeight:"16px"},md:{minHeight:40,shellPaddingY:10,shellPaddingX:12,fontSize:14,lineHeight:"20px"},lg:{minHeight:48,shellPaddingY:12,shellPaddingX:14,fontSize:16,lineHeight:"24px"},xl:{minHeight:56,shellPaddingY:14,shellPaddingX:16,fontSize:18,lineHeight:"28px"}},Y=(p==null?void 0:p.field)||{},Z="0 0 0 1000px var(--theme-canvas) inset",ee={margin:0,paddingVertical:0,paddingHorizontal:0,width:"100%",minHeight:"auto",border:"none",backgroundColor:"transparent",fontSize:J[u].fontSize,letterSpacing:"-0.01em",fontWeight:400,color:w?"color-gray-400":"color-gray-900",cursor:w?"not-allowed":"text",opacity:w?.7:1,transition:"color 0.2s ease, opacity 0.2s ease",_focus:{outline:"none",_placeholder:{opacity:.7}},_placeholder:{color:"color-gray-400",opacity:1,transition:"opacity 0.2s ease-out"},_selection:{backgroundColor:"color-mix(in srgb, var(--theme-primary) 20%, transparent)"},_webkitAutofill:{boxShadow:Z,WebkitBoxShadow:Z,WebkitTextFillColor:"var(--theme-text)",transition:"background-color 5000s ease-in-out 0s"},_webkitContactsAutoFillButton:{visibility:"hidden",pointerEvents:"none",position:"absolute",right:0},...Y},ne=()=>{H(!0),M&&M()},K=()=>z(!0),re=()=>z(!1),ie=ce=>{L&&L(ce),H(!1)},ge=ce=>{typeof ce=="string"?(P(ce),m&&m(ce),l&&l(ce)):(P(ce.target.value),m&&m(ce.target.value),l&&l(ce.target.value))},We=()=>{P(""),m&&m(""),l&&l(""),L({target:{name:o}})},{container:le,content:te,...ae}=p||{};return r.jsx(Ue,{helperText:d,error:x,views:ae,children:r.jsxs(oo,{label:t,size:u,error:x,shape:y,views:p,shadow:f,variant:k,value:a,color:"theme-primary",isHovered:S,isDisabled:w,isReadOnly:v,isFocused:C,showLabel:q,onMouseEnter:K,onMouseLeave:re,children:[c,D&&r.jsx(Zo,{children:D}),r.jsxs(Ho,{children:[q&&r.jsx(ho,{htmlFor:X,color:"theme-primary",error:x,...E,...p==null?void 0:p.label,children:t}),r.jsx(i.Input,{ref:O,type:"text",id:X,name:o,readOnly:v,disabled:w,autoFocus:I,...T??j?{required:!0,"aria-required":!0}:{},placeholder:g||n,onFocus:ne,onBlur:ie,autoComplete:"off",...ee,...N,onChange:ge,value:a})]}),b&&a&&!v&&!w&&r.jsx(Zo,{children:r.jsx(He,{size:20,color:$,onClick:We,cursor:"pointer",borderRadius:"50%",transition:"background-color 0.2s ease, transform 0.2s ease",_hover:{backgroundColor:"color-gray-100",transform:"scale(1.05)"},_active:{transform:"scale(0.95)"}})}),W&&r.jsx(Zo,{children:W}),s]})})},je=e=>{const o=pe("input",e),t=Lt(o);return r.jsx(or,{...t,...o})},La=({defaultIsSelected:e=!1})=>{const[o,t]=h.useState(!1),[n,a]=h.useState(e);return{isHovered:o,setIsHovered:t,isSelected:n,setIsSelected:a}},mg={xs:{height:"12px",width:"12px"},sm:{height:"16px",width:"16px"},md:{height:"20px",width:"20px"},lg:{height:"24px",width:"24px"},xl:{height:"28px",width:"28px"}},_a={xs:10,sm:14,md:16,lg:20,xl:24},pg={selected:{backgroundColor:"theme-primary",borderColor:"theme-primary",borderWidth:"2px",borderStyle:"solid",color:"color-white",transition:"background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease"},unselected:{backgroundColor:"transparent",borderWidth:"2px",borderStyle:"solid",borderColor:"color-gray-300",color:"inherit",transition:"all 0.2s ease-in-out"},indeterminate:{backgroundColor:"theme-primary",borderColor:"theme-primary",borderWidth:"2px",borderStyle:"solid",color:"color-white",transition:"background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease"}},Dr={hover:{selected:{opacity:.9},unselected:{borderColor:"color-gray-400",backgroundColor:"color-gray-50"},indeterminate:{opacity:.9}},focus:{selected:{outline:"none",boxShadow:"0 0 0 2px white, 0 0 0 4px theme-primary"},unselected:{outline:"none",boxShadow:"0 0 0 2px white, 0 0 0 4px theme-primary"},indeterminate:{outline:"none",boxShadow:"0 0 0 2px white, 0 0 0 4px theme-primary"}},disabled:{selected:{backgroundColor:"color-gray-300",borderColor:"color-gray-300",opacity:.5,cursor:"not-allowed"},unselected:{borderColor:"color-gray-300",opacity:.5,cursor:"not-allowed"},indeterminate:{backgroundColor:"color-gray-300",borderColor:"color-gray-300",opacity:.5,cursor:"not-allowed"}},error:{selected:{backgroundColor:"color-red-500",borderColor:"color-red-500"},unselected:{borderColor:"color-red-500"},indeterminate:{backgroundColor:"color-red-500",borderColor:"color-red-500"}}},Ba=({id:e,icon:o,name:t,label:n,isChecked:a,onChange:l,onValueChange:c,shadow:s={},labelPosition:d="right",size:g="md",error:m=!1,isSelected:f=!1,isHovered:p=!1,isDisabled:u=!1,isReadOnly:y=!1,isIndeterminate:k=!1,defaultIsSelected:x=!1,setIsSelected:C=()=>{},setIsHovered:S=()=>{},views:w={checkbox:{},label:{}},infoText:v,helperText:b,...I})=>{const T=h.useId(),j=e??T,E=h.useRef(null),[D,W]=h.useState(!1),A=!!(a||f);h.useEffect(()=>{E.current&&(E.current.indeterminate=k)},[k]);const H=()=>S(!p),z=()=>{!y&&!u&&(C&&C(!f),l&&l(!a),c&&c(!a))},P=k?"indeterminate":a||f?"selected":"unselected",V=m?Dr.error[P]:u?Dr.disabled[P]:p?Dr.hover[P]:{},M={container:{gap:8,display:"flex",height:"fit-content",flexDirection:"column",width:"fit-content",color:m?"color-red-600":u?"color-gray-400":"inherit",cursor:u?"not-allowed":y?"default":"pointer",opacity:u?.6:1,transition:"all 0.2s ease-in-out",...w.label},checkbox:{...pg[P],...V,borderRadius:6,...mg[g],transition:"all 0.2s ease-in-out",...s,...w.checkbox}},L=`${j}-info`,_=`${j}-error`,O=[v?L:"",m?_:""].filter(Boolean).join(" ")||void 0;return r.jsxs(i.Vertical,{...M.container,children:[r.jsx(Ro,{htmlFor:j,onMouseEnter:H,onMouseLeave:H,size:i.Typography.fontSizes[g],cursor:"inherit",children:r.jsxs(i.Horizontal,{gap:12,alignItems:"center",children:[" ",d==="left"&&n&&r.jsx(i.Text,{size:g,fontWeight:"500",...w==null?void 0:w.label,children:n}),r.jsxs(i.Center,{position:"relative",...M.checkbox,...D?Dr.focus[P]:{},children:[r.jsx(i.Input,{ref:E,type:"checkbox",id:j,name:t,checked:A,"aria-checked":k?"mixed":void 0,onChange:z,onFocus:()=>W(!0),onBlur:()=>W(!1),disabled:u,readOnly:y,position:"absolute",top:0,left:0,width:"100%",height:"100%",margin:0,opacity:0,zIndex:1,cursor:u?"not-allowed":y?"default":"pointer","aria-describedby":O,...I}),k?r.jsx(Nn,{widthHeight:_a[g],color:"color-white",transition:"opacity 0.2s ease"}):(a||f)&&(o??r.jsx(Xo,{widthHeight:_a[g],color:"color-white",transition:"opacity 0.2s ease"}))]}),d==="right"&&n&&r.jsx(i.Text,{size:g,fontWeight:"500",...w==null?void 0:w.label,children:n})]})}),v&&r.jsx(i.Text,{id:L,marginLeft:d==="left"?0:36,color:"color-gray-500",size:"sm",fontWeight:"400",lineHeight:"20px",...w==null?void 0:w.infoText,children:v}),m&&r.jsx(i.Text,{id:_,size:"xs",marginTop:4,marginHorizontal:0,color:"color-red-500",fontWeight:"500",transition:"all 0.2s ease-in-out",children:m})]})},_t=e=>{const o=pe("checkbox",e),t=La(o);return r.jsx(Ba,{...t,...o})},Oa=({defaultIsSelected:e=!1,isChecked:o})=>{const[t,n]=h.useState(!1),[a,l]=h.useState(o!==void 0?o:e);return h.useEffect(()=>{o!==void 0&&l(o)},[o]),{isHovered:t,setIsHovered:n,isSelected:a,setIsSelected:l}},ug={xs:{height:"16px",width:"16px"},sm:{height:"20px",width:"20px"},md:{height:"24px",width:"24px"},lg:{height:"28px",width:"28px"},xl:{height:"32px",width:"32px"}},yg={xs:{height:"8px",width:"8px"},sm:{height:"10px",width:"10px"},md:{height:"12px",width:"12px"},lg:{height:"14px",width:"14px"},xl:{height:"16px",width:"16px"}},bg={selected:{borderColor:"theme-primary",borderWidth:"2px",borderStyle:"solid"},unselected:{borderWidth:"2px",borderStyle:"solid",borderColor:"color-gray-300",style:{backgroundColor:"transparent"}}},xg={selected:{backgroundColor:"theme-primary"},unselected:{style:{backgroundColor:"transparent"}}},Bt={hover:{selected:{borderColor:"color-blue-600"},unselected:{borderColor:"color-gray-400"}},disabled:{selected:{borderColor:"color-gray-300",opacity:.6},unselected:{borderColor:"color-gray-300",opacity:.6}},error:{selected:{borderColor:"color-red-500"},unselected:{borderColor:"color-red-500"}}},Ot={hover:{selected:{backgroundColor:"color-blue-600"},unselected:{style:{backgroundColor:"transparent"}}},disabled:{selected:{backgroundColor:"color-gray-300",opacity:.6},unselected:{opacity:.6,style:{backgroundColor:"transparent"}}},error:{selected:{backgroundColor:"color-red-500"},unselected:{style:{backgroundColor:"transparent"}}}},Na=({id:e,icon:o,name:t,label:n,value:a,isChecked:l,onChange:c,onValueChange:s,shadow:d={},labelPosition:g="right",size:m="md",error:f=!1,isSelected:p=!1,isHovered:u=!1,isDisabled:y=!1,isReadOnly:k=!1,defaultIsSelected:x=!1,setIsSelected:C=()=>{},setIsHovered:S=()=>{},views:w={radio:{},label:{}},infoText:v,helperText:b,...I})=>{const T=h.useId(),j=e??T,[E,D]=h.useState(!1),W=()=>S(!u),A=()=>{!k&&!y&&(C&&C(!0),c&&c(a??""),s&&s(a??""))},H=l||p?"selected":"unselected",z=f?Bt.error[H]:y?Bt.disabled[H]:u?Bt.hover[H]:{},P=f?Ot.error[H]:y?Ot.disabled[H]:u?Ot.hover[H]:{},V={container:{gap:8,display:"flex",height:"fit-content",flexDirection:"column",width:"fit-content",selected:{borderColor:"theme-primary"},color:f?"color-red-600":y?"color-gray-400":"inherit",cursor:y?"not-allowed":k?"default":"pointer",opacity:y?.6:1,transition:"all 0.2s ease-in-out",...w.label},radio:{...bg[H],...z,borderRadius:"50%",selected:{backgroundColor:"theme-primary"},backgroundColor:"color-white",...ug[m],transition:"all 0.2s ease-in-out",...d,...w.radio},dot:{...xg[H],...P,borderRadius:"50%",...yg[m],transition:"all 0.2s ease-in-out"}},M=`${j}-info`,L=`${j}-error`,_=[v?M:"",f?L:""].filter(Boolean).join(" ")||void 0;return r.jsxs(i.Vertical,{...V.container,children:[r.jsx(Ro,{htmlFor:j,onMouseEnter:W,onMouseLeave:W,size:i.Typography.fontSizes[m],cursor:"inherit",children:r.jsxs(i.Horizontal,{gap:12,alignItems:"center",children:[" ",g==="left"&&n&&r.jsx(i.Text,{size:m,fontWeight:"500",...w==null?void 0:w.label,children:n}),r.jsxs(i.Center,{position:"relative",...V.radio,...E?{outline:"none",boxShadow:"0 0 0 2px white, 0 0 0 4px theme-primary"}:{},children:[r.jsx(i.Input,{type:"radio",id:j,name:t,value:a??"",checked:!!(l||p),onChange:A,onFocus:()=>D(!0),onBlur:()=>D(!1),disabled:y,readOnly:k,position:"absolute",top:0,left:0,width:"100%",height:"100%",margin:0,opacity:0,zIndex:1,cursor:y?"not-allowed":k?"default":"pointer","aria-describedby":_,...I}),(l||p)&&r.jsx(i.View,{...V.dot})]}),g==="right"&&n&&r.jsx(i.Text,{size:m,fontWeight:"500",...w==null?void 0:w.label,children:n})]})}),v&&r.jsx(i.Text,{id:M,marginLeft:g==="left"?0:36,color:"color-gray-500",size:"sm",fontWeight:"400",lineHeight:"20px",...w==null?void 0:w.infoText,children:v}),f&&r.jsx(i.Text,{id:L,size:"xs",marginTop:4,marginHorizontal:0,color:"color-red-500",fontWeight:"500",transition:"color 0.2s ease, opacity 0.2s ease",children:f})]})},Nt=e=>{const o=pe("radio",e),t=Oa(o);return r.jsx(Na,{...t,...o})},kg=({value:e,defaultValue:o="",onChange:t})=>{const[n,a]=h.useState(e!==void 0?e:o);return h.useEffect(()=>{e!==void 0&&a(e)},[e]),{selectedValue:n,setSelectedValue:c=>{e===void 0&&a(c),t&&t(c)}}},Cg=({children:e,name:o,label:t,helperText:n,error:a,selectedValue:l,setSelectedValue:c,direction:s="vertical",spacing:d=8,isDisabled:g=!1,isReadOnly:m=!1,views:f={container:{},label:{},helperText:{}},onChange:p,value:u,defaultValue:y,...k})=>{const x=s==="vertical"?i.Vertical:i.Horizontal,C=h.Children.map(e,I=>{if(h.isValidElement(I)){const T={name:o,isChecked:I.props.value===l,isDisabled:g||I.props.isDisabled,isReadOnly:m||I.props.isReadOnly,onChange:j=>{c(j),I.props.onChange&&I.props.onChange(j)}};return h.cloneElement(I,T)}return I}),S=h.useId(),w=`${S}-label`,v=`${S}-helper`,b=!!(n||a);return r.jsxs(i.Vertical,{gap:d,width:"100%",role:"radiogroup","aria-labelledby":t?w:void 0,"aria-describedby":b?v:void 0,"aria-invalid":a?!0:void 0,...f.container,...k,children:[t&&r.jsx(i.Text,{id:w,fontWeight:"600",fontSize:"14px",color:a?"color-red-600":"inherit",marginBottom:4,...f.label,children:t}),r.jsx(x,{gap:d,children:C}),b&&r.jsx(i.Text,{id:v,fontWeight:a?"500":"400",fontSize:"14px",lineHeight:"20px",color:a?"color-red-500":"color-gray-500",marginTop:4,transition:"color 0.2s ease, opacity 0.2s ease",...f.helperText,children:a||n})]})},wg=e=>{const o=kg(e);return r.jsx(Cg,{...o,...e})},fo=e=>Math.min(255,Math.max(0,Math.round(e))),Sg=e=>{const o=/^#([0-9a-f]{3}|[0-9a-f]{6})$/i.exec(e.trim());if(!o)return null;let t=o[1];return t.length===3&&(t=t.split("").map(n=>n+n).join("")),{r:parseInt(t.slice(0,2),16),g:parseInt(t.slice(2,4),16),b:parseInt(t.slice(4,6),16)}},vg=e=>{const o=/^rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(?:,\s*[\d.]+\s*)?\)$/i.exec(e.trim());return o?{r:fo(Number(o[1])),g:fo(Number(o[2])),b:fo(Number(o[3]))}:null},Tg=(e,o,t)=>{const n=(e%360+360)%360,a=Math.min(100,Math.max(0,o))/100,l=Math.min(100,Math.max(0,t))/100,c=(1-Math.abs(2*l-1))*a,s=c*(1-Math.abs(n/60%2-1)),d=l-c/2;let g;return n<60?g=[c,s,0]:n<120?g=[s,c,0]:n<180?g=[0,c,s]:n<240?g=[0,s,c]:n<300?g=[s,0,c]:g=[c,0,s],{r:fo((g[0]+d)*255),g:fo((g[1]+d)*255),b:fo((g[2]+d)*255)}},Ig=e=>{const o=/^hsla?\(\s*([\d.]+)\s*,\s*([\d.]+)%\s*,\s*([\d.]+)%\s*(?:,\s*[\d.]+\s*)?\)$/i.exec(e.trim());return o?Tg(Number(o[1]),Number(o[2]),Number(o[3])):null},Fg=e=>Sg(e)??vg(e)??Ig(e),zg=({r:e,g:o,b:t})=>{const n=e/255,a=o/255,l=t/255,c=Math.max(n,a,l),s=Math.min(n,a,l),d=c-s,g=(c+s)/2;if(d===0)return{h:0,s:0,l:Math.round(g*100)};const m=d/(1-Math.abs(2*g-1));let f;return c===n?f=(a-l)/d%6:c===a?f=(l-n)/d+2:f=(n-a)/d+4,f=Math.round(f*60),f<0&&(f+=360),{h:f,s:Math.round(m*100),l:Math.round(g*100)}},qt=e=>fo(e).toString(16).padStart(2,"0"),$r=(e,o)=>{if(!o||!e)return e;const t=Fg(e);if(!t)return e;switch(o){case"hex":return`#${qt(t.r)}${qt(t.g)}${qt(t.b)}`;case"rgb":return`rgb(${t.r}, ${t.g}, ${t.b})`;case"hsl":{const{h:n,s:a,l}=zg(t);return`hsl(${n}, ${a}%, ${l}%)`}}},qa=e=>{const{value:o,defaultValue:t="",onChange:n,onChangeComplete:a,onOpen:l,onClose:c,closeOnSelect:s=!0,maxRecentColors:d=8,showRecentColors:g=!0,isAutoFocus:m=!1,colorFormat:f}=e,[p,u]=h.useState(!1),[y,k]=h.useState(o??t),[x,C]=h.useState(""),[S,w]=h.useState([]),[v,b]=h.useState(!1),[I,T]=h.useState(!1),j=h.useRef(null),E=h.useRef(null);h.useEffect(()=>{o!==void 0&&k(o)},[o]),h.useEffect(()=>{if(g&&typeof localStorage<"u")try{const M=localStorage.getItem("colorInput-recentColors");M&&w(JSON.parse(M))}catch(M){console.warn("Failed to load recent colors from localStorage:",M)}},[g]),h.useEffect(()=>{const M=j.current;m&&M&&typeof M.focus=="function"&&M.focus()},[m]),h.useEffect(()=>{if(typeof document>"u")return;const M=L=>{p&&j.current&&E.current&&!j.current.contains(L.target)&&!E.current.contains(L.target)&&P()};return document.addEventListener("mousedown",M),()=>document.removeEventListener("mousedown",M)},[p]);const D=h.useCallback(M=>{g&&w(L=>{const _=L.filter(N=>N!==M),O=[M,..._].slice(0,d);try{typeof localStorage<"u"&&localStorage.setItem("colorInput-recentColors",JSON.stringify(O))}catch(N){console.warn("Failed to save recent colors to localStorage:",N)}return O})},[g,d]),W=h.useCallback(()=>{const M=!p;u(M),M?l==null||l():c==null||c()},[p,l,c]),A=h.useCallback(M=>{k(M),D(M);const L=$r(M,f);n==null||n(L),a==null||a(L),s&&(u(!1),c==null||c())},[n,a,s,c,D,f]),H=h.useCallback(M=>{C(M)},[]),z=h.useCallback(()=>{x&&(A(x),C(""))},[x,A]),P=h.useCallback(()=>{u(!1),c==null||c()},[c]),V=h.useCallback(M=>{k(M),n==null||n($r(M,f))},[n,f]);return{isOpen:p,selectedColor:y,recentColors:S,customColor:x,isFocused:v,isHovered:I,handleToggle:W,handleColorSelect:A,handleCustomColorChange:H,handleCustomColorSubmit:z,handleClose:P,setIsFocused:b,setIsHovered:T,setValue:V,triggerRef:j,dropdownRef:E}},rr={container:{position:"relative",display:"inline-block",width:"fit-content"},trigger:{display:"flex",alignItems:"center",justifyContent:"space-between",cursor:"pointer",transition:"all 0.2s ease-in-out",backgroundColor:"color-white",borderWidth:"1px",borderStyle:"solid",borderColor:"color-gray-300",padding:"8px 12px",borderRadius:8},dropdown:{position:"absolute",top:"calc(100% + 4px)",left:0,right:0,zIndex:1e3,backgroundColor:"color-white",borderRadius:12,borderWidth:"1px",borderStyle:"solid",borderColor:"color-gray-200",boxShadow:"0 4px 12px rgba(0, 0, 0, 0.1)",padding:"16px",minWidth:"280px"},colorGrid:{display:"grid",gridTemplateColumns:"repeat(8, 1fr)",gap:"8px"},recentColors:{display:"flex",gap:"4px",flexWrap:"wrap"}},Mg={xs:{height:"28px",fontSize:"10px",padding:"4px 8px"},sm:{height:"32px",fontSize:"12px",padding:"6px 10px"},md:{height:"40px",fontSize:"14px",padding:"8px 12px"},lg:{height:"48px",fontSize:"16px",padding:"12px 16px"},xl:{height:"56px",fontSize:"20px",padding:"16px 20px"}},Wg={default:{borderRadius:8},square:{borderRadius:0},rounded:{borderRadius:8},pill:{borderRadius:9999}},Hg={default:{backgroundColor:"color-white",borderColor:"color-gray-300",borderWidth:"1px",borderStyle:"solid"},outline:{backgroundColor:"transparent",borderColor:"color-gray-300",borderWidth:"1px",borderStyle:"solid"},none:{backgroundColor:"transparent",borderColor:"transparent",borderWidth:"0px"}},jg=[{name:"Red 500",value:"color-red-500"},{name:"Orange 500",value:"color-orange-500"},{name:"Yellow 500",value:"color-yellow-500"},{name:"Green 500",value:"color-green-500"},{name:"Blue 500",value:"color-blue-500"},{name:"Indigo 500",value:"color-indigo-500"},{name:"Purple 500",value:"color-purple-500"},{name:"Pink 500",value:"color-pink-500"},{name:"Red 300",value:"color-red-300"},{name:"Orange 300",value:"color-orange-300"},{name:"Yellow 300",value:"color-yellow-300"},{name:"Green 300",value:"color-green-300"},{name:"Blue 300",value:"color-blue-300"},{name:"Indigo 300",value:"color-indigo-300"},{name:"Purple 300",value:"color-purple-300"},{name:"Pink 300",value:"color-pink-300"},{name:"Red 700",value:"color-red-700"},{name:"Orange 700",value:"color-orange-700"},{name:"Yellow 700",value:"color-yellow-700"},{name:"Green 700",value:"color-green-700"},{name:"Blue 700",value:"color-blue-700"},{name:"Indigo 700",value:"color-indigo-700"},{name:"Purple 700",value:"color-purple-700"},{name:"Pink 700",value:"color-pink-700"},{name:"Gray 100",value:"color-gray-100"},{name:"Gray 300",value:"color-gray-300"},{name:"Gray 500",value:"color-gray-500"},{name:"Gray 700",value:"color-gray-700"},{name:"Gray 900",value:"color-gray-900"},{name:"White",value:"color-white"},{name:"Black",value:"color-black"},{name:"Transparent",value:"transparent"}],Ua=({id:e,name:o,label:t,placeholder:n="Select a color",helperText:a,views:l={},size:c="md",shape:s="default",variant:d="default",shadow:g,error:m=!1,isDisabled:f=!1,isReadOnly:p=!1,isFocused:u=!1,isHovered:y=!1,predefinedColors:k=jg,showCustomInput:x=!0,showRecentColors:C=!0,isOpen:S=!1,selectedColor:w="",recentColors:v=[],customColor:b="",handleToggle:I=()=>{},handleColorSelect:T=()=>{},handleCustomColorChange:j=()=>{},handleCustomColorSubmit:E=()=>{},handleClose:D,setIsFocused:W=()=>{},setIsHovered:A=()=>{},setValue:H,triggerRef:z,dropdownRef:P,onChange:V,onChangeComplete:M,onBlur:L,onFocus:_,onOpen:O,onClose:N,colorFormat:U,maxRecentColors:X,closeOnSelect:oe,value:B,defaultValue:$,"aria-label":q,...J})=>{const{getColor:Y}=i.useTheme(),Z=h.useId(),ee=e??Z,ne=`${ee}-label`,K=`${ee}-listbox`,re=`${ee}-helper-text`,ie=`${ee}-error-text`,ge=!!m&&typeof m=="string",We=[a?re:null,ge?ie:null].filter(Boolean).join(" ")||void 0,le={...rr.container,...l==null?void 0:l.container},te={...rr.trigger,...Mg[c],...Wg[s],...Hg[d],...m&&{borderColor:"color-red-500"},...f&&{opacity:.6,cursor:"not-allowed"},...u&&{borderColor:"theme-primary",boxShadow:"0 0 0 2px rgba(255, 255, 255, 1), 0 0 0 4px rgba(29, 78, 216, 0.16)"},...y&&!f&&{borderColor:"color-gray-400"},...l==null?void 0:l.trigger,...g&&g},ae={...rr.dropdown,...l==null?void 0:l.dropdown},ce={...rr.colorGrid,...l==null?void 0:l.colorGrid},ye={...rr.recentColors,...l==null?void 0:l.recentColors},Q=w||"color-gray-200";return r.jsxs(i.View,{...le,...J,children:[t&&r.jsx(Ro,{id:ne,htmlFor:ee,size:c,isDisabled:f,error:m,views:l==null?void 0:l.label,children:t}),o&&r.jsx("input",{type:"hidden",name:o,value:$r(w,U)}),r.jsxs(i.View,{ref:z,id:ee,onClick:f||p?void 0:I,onKeyDown:R=>{f||p||(R.key==="Enter"||R.key===" ")&&(R.preventDefault(),I())},onMouseEnter:()=>A(!0),onMouseLeave:()=>A(!1),onFocus:()=>{W(!0),_&&_()},onBlur:R=>{W(!1),L&&L(R)},tabIndex:f?-1:0,role:"button","aria-expanded":S,"aria-haspopup":"listbox","aria-controls":S?K:void 0,"aria-labelledby":!q&&t?ne:void 0,"aria-label":q??(t?void 0:n),"aria-describedby":We,"aria-invalid":m?!0:void 0,width:"fit-content",gap:8,...te,children:[r.jsx(i.View,{width:"20px",height:"20px",borderRadius:"4px",backgroundColor:Q,borderWidth:"1px",borderStyle:"solid",borderColor:"color-gray-300"}),!p&&!f&&r.jsx(he,{widthHeight:16,color:"color-gray-500",orientation:S?"up":"down"})]}),S&&r.jsxs(i.View,{ref:P,...ae,children:[r.jsx(i.View,{id:K,role:"listbox","aria-labelledby":t?ne:void 0,"aria-label":t?void 0:"Color options",...ce,children:k.map((R,be)=>r.jsx(i.View,{role:"option","aria-selected":w===R.value,"aria-label":R.name,tabIndex:0,width:"24px",height:"24px",borderRadius:"8px",backgroundColor:R.value,borderWidth:"2px",borderStyle:"solid",borderColor:w===R.value?"theme-primary":"transparent",cursor:"pointer",transition:"transform 0.2s ease, border-color 0.2s ease",onClick:()=>T(R.value),onKeyDown:Ie=>{(Ie.key==="Enter"||Ie.key===" ")&&(Ie.preventDefault(),T(R.value))},title:R.name,_hover:{transform:"scale(1.05)",borderColor:"color-gray-400"},...l==null?void 0:l.colorSwatch},be))}),C&&v.length>0&&r.jsxs(i.Vertical,{gap:8,marginTop:"16px",children:[r.jsx(i.Text,{fontSize:"12px",fontWeight:"500",color:"color-gray-600",children:"Recent Colors"}),r.jsx(i.Horizontal,{gap:4,flexWrap:"wrap",...ye,children:v.map((R,be)=>r.jsx(i.View,{width:"20px",height:"20px",borderRadius:"8px",backgroundColor:R,borderWidth:"1px",borderStyle:"solid",borderColor:w===R?"theme-primary":"color-gray-300",cursor:"pointer",transition:"transform 0.2s ease, border-color 0.2s ease",onClick:()=>T(R),title:R,_hover:{transform:"scale(1.05)",borderColor:"color-gray-400"}},be))})]}),x&&r.jsxs(i.Vertical,{gap:8,marginTop:"16px",children:[r.jsx(i.Text,{fontSize:"12px",fontWeight:"500",color:"color-gray-600",children:"Custom Color"}),r.jsxs(i.Horizontal,{gap:8,children:[r.jsx(je,{value:b,onChange:j,placeholder:"#000000 or rgb(0,0,0)","aria-label":"Custom color",size:"sm",style:{flex:1},views:l==null?void 0:l.customInput}),r.jsx(i.Element,{as:"button",type:"button",padding:"8px 12px",backgroundColor:"theme-primary",border:"none",borderRadius:"8px",cursor:"pointer",onClick:E,transition:"background-color 0.2s ease, opacity 0.2s ease",_hover:{backgroundColor:"color-blue-700"},children:r.jsx(i.Text,{color:"color-white",fontSize:"12px",fontWeight:"500",children:"Add"})})]})]})]}),a&&r.jsx(i.Text,{id:re,fontSize:"12px",color:m?"color-red-500":"color-gray-600",marginTop:"4px",...l==null?void 0:l.helperText,children:a}),ge&&r.jsx(i.Text,{id:ie,fontSize:"12px",color:"color-red-500",marginTop:"4px",...l==null?void 0:l.error,children:m})]})},Pg=e=>{const o=qa(e);return r.jsx(Ua,{...o,...e})},Ut=[{name:"Afghanistan",dial_code:"+93",emoji:"🇦🇫",code:"AF"},{name:"Aland Islands",dial_code:"+358",emoji:"🇦🇽",code:"AX"},{name:"Albania",dial_code:"+355",emoji:"🇦🇱",code:"AL"},{name:"Algeria",dial_code:"+213",emoji:"🇩🇿",code:"DZ"},{name:"AmericanSamoa",dial_code:"+1684",emoji:"🇦🇸",code:"AS"},{name:"Andorra",dial_code:"+376",emoji:"🇦🇩",code:"AD"},{name:"Angola",dial_code:"+244",emoji:"🇦🇴",code:"AO"},{name:"Anguilla",dial_code:"+1264",emoji:"🇦🇮",code:"AI"},{name:"Antarctica",dial_code:"+672",emoji:"🇦🇶",code:"AQ"},{name:"Antigua and Barbuda",dial_code:"+1268",emoji:"🇦🇬",code:"AG"},{name:"Argentina",dial_code:"+54",emoji:"🇦🇷",code:"AR"},{name:"Armenia",dial_code:"+374",emoji:"🇦🇲",code:"AM"},{name:"Aruba",dial_code:"+297",emoji:"🇦🇼",code:"AW"},{name:"Australia",dial_code:"+61",emoji:"🇦🇺",code:"AU"},{name:"Austria",dial_code:"+43",emoji:"🇦🇹",code:"AT"},{name:"Azerbaijan",dial_code:"+994",emoji:"🇦🇿",code:"AZ"},{name:"Bahamas",dial_code:"+1242",emoji:"🇧🇸",code:"BS"},{name:"Bahrain",dial_code:"+973",emoji:"🇧🇭",code:"BH"},{name:"Bangladesh",dial_code:"+880",emoji:"🇧🇩",code:"BD"},{name:"Barbados",dial_code:"+1246",emoji:"🇧🇧",code:"BB"},{name:"Belarus",dial_code:"+375",emoji:"🇧🇾",code:"BY"},{name:"Belgium",dial_code:"+32",emoji:"🇧🇪",code:"BE"},{name:"Belize",dial_code:"+501",emoji:"🇧🇿",code:"BZ"},{name:"Benin",dial_code:"+229",emoji:"🇧🇯",code:"BJ"},{name:"Bermuda",dial_code:"+1441",emoji:"🇧🇲",code:"BM"},{name:"Bhutan",dial_code:"+975",emoji:"🇧🇹",code:"BT"},{name:"Bolivia, Plurinational State of",dial_code:"+591",emoji:"🇧🇴",code:"BO"},{name:"Bosnia and Herzegovina",dial_code:"+387",emoji:"🇧🇦",code:"BA"},{name:"Botswana",dial_code:"+267",emoji:"🇧🇼",code:"BW"},{name:"Brazil",dial_code:"+55",emoji:"🇧🇷",code:"BR"},{name:"British Indian Ocean Territory",dial_code:"+246",emoji:"🇮🇴",code:"IO"},{name:"Brunei Darussalam",dial_code:"+673",emoji:"🇧🇳",code:"BN"},{name:"Bulgaria",dial_code:"+359",emoji:"🇧🇬",code:"BG"},{name:"Burkina Faso",dial_code:"+226",emoji:"🇧🇫",code:"BF"},{name:"Burundi",dial_code:"+257",emoji:"🇧🇮",code:"BI"},{name:"Cambodia",dial_code:"+855",emoji:"🇰🇭",code:"KH"},{name:"Cameroon",dial_code:"+237",emoji:"🇨🇲",code:"CM"},{name:"Canada",dial_code:"+1",emoji:"🇨🇦",code:"CA"},{name:"Cape Verde",dial_code:"+238",emoji:"🇨🇻",code:"CV"},{name:"Cayman Islands",dial_code:"+345",emoji:"🇰🇾",code:"KY"},{name:"Central African Republic",dial_code:"+236",emoji:"🇨🇫",code:"CF"},{name:"Chad",dial_code:"+235",emoji:"🇹🇩",code:"TD"},{name:"Chile",dial_code:"+56",emoji:"🇨🇱",code:"CL"},{name:"China",dial_code:"+86",emoji:"🇨🇳",code:"CN"},{name:"Christmas Island",dial_code:"+61",emoji:"🇨🇽",code:"CX"},{name:"Cocos (Keeling) Islands",dial_code:"+61",emoji:"🇨🇨",code:"CC"},{name:"Colombia",dial_code:"+57",emoji:"🇨🇴",code:"CO"},{name:"Comoros",dial_code:"+269",emoji:"🇰🇲",code:"KM"},{name:"Congo",dial_code:"+242",emoji:"🇨🇬",code:"CG"},{name:"Congo, The Democratic Republic of the Congo",dial_code:"+243",emoji:"🇨🇩",code:"CD"},{name:"Cook Islands",dial_code:"+682",emoji:"🇨🇰",code:"CK"},{name:"Costa Rica",dial_code:"+506",emoji:"🇨🇷",code:"CR"},{name:"Cote d'Ivoire",dial_code:"+225",emoji:"🇨🇮",code:"CI"},{name:"Croatia",dial_code:"+385",emoji:"🇭🇷",code:"HR"},{name:"Cuba",dial_code:"+53",emoji:"🇨🇺",code:"CU"},{name:"Cyprus",dial_code:"+357",emoji:"🇨🇾",code:"CY"},{name:"Czech Republic",dial_code:"+420",emoji:"🇨🇿",code:"CZ"},{name:"Denmark",dial_code:"+45",emoji:"🇩🇰",code:"DK"},{name:"Djibouti",dial_code:"+253",emoji:"🇩🇯",code:"DJ"},{name:"Dominica",dial_code:"+1767",emoji:"🇩🇲",code:"DM"},{name:"Dominican Republic",dial_code:"+1849",emoji:"🇩🇴",code:"DO"},{name:"Ecuador",dial_code:"+593",emoji:"🇪🇨",code:"EC"},{name:"Egypt",dial_code:"+20",emoji:"🇪🇬",code:"EG"},{name:"El Salvador",dial_code:"+503",emoji:"🇸🇻",code:"SV"},{name:"Equatorial Guinea",dial_code:"+240",emoji:"🇬🇶",code:"GQ"},{name:"Eritrea",dial_code:"+291",emoji:"🇪🇷",code:"ER"},{name:"Estonia",dial_code:"+372",emoji:"🇪🇪",code:"EE"},{name:"Ethiopia",dial_code:"+251",emoji:"🇪🇹",code:"ET"},{name:"Falkland Islands (Malvinas)",dial_code:"+500",emoji:"🇫🇰",code:"FK"},{name:"Faroe Islands",dial_code:"+298",emoji:"🇫🇴",code:"FO"},{name:"Fiji",dial_code:"+679",emoji:"🇫🇯",code:"FJ"},{name:"Finland",dial_code:"+358",emoji:"🇫🇮",code:"FI"},{name:"France",dial_code:"+33",emoji:"🇫🇷",code:"FR"},{name:"French Guiana",dial_code:"+594",emoji:"🇬🇫",code:"GF"},{name:"French Polynesia",dial_code:"+689",emoji:"🇵🇫",code:"PF"},{name:"Gabon",dial_code:"+241",emoji:"🇬🇦",code:"GA"},{name:"Gambia",dial_code:"+220",emoji:"🇬🇲",code:"GM"},{name:"Georgia",dial_code:"+995",emoji:"🇬🇪",code:"GE"},{name:"Germany",dial_code:"+49",emoji:"🇩🇪",code:"DE"},{name:"Ghana",dial_code:"+233",emoji:"🇬🇭",code:"GH"},{name:"Gibraltar",dial_code:"+350",emoji:"🇬🇮",code:"GI"},{name:"Greece",dial_code:"+30",emoji:"🇬🇷",code:"GR"},{name:"Greenland",dial_code:"+299",emoji:"🇬🇱",code:"GL"},{name:"Grenada",dial_code:"+1473",emoji:"🇬🇩",code:"GD"},{name:"Guadeloupe",dial_code:"+590",emoji:"🇬🇵",code:"GP"},{name:"Guam",dial_code:"+1671",emoji:"🇬🇺",code:"GU"},{name:"Guatemala",dial_code:"+502",emoji:"🇬🇹",code:"GT"},{name:"Guernsey",dial_code:"+44",emoji:"🇬🇬",code:"GG"},{name:"Guinea",dial_code:"+224",emoji:"🇬🇳",code:"GN"},{name:"Guinea-Bissau",dial_code:"+245",emoji:"🇬🇼",code:"GW"},{name:"Guyana",dial_code:"+595",emoji:"🇬🇾",code:"GY"},{name:"Haiti",dial_code:"+509",emoji:"🇭🇹",code:"HT"},{name:"Holy See (Vatican City State)",dial_code:"+379",emoji:"🇻🇦",code:"VA"},{name:"Honduras",dial_code:"+504",emoji:"🇭🇳",code:"HN"},{name:"Hong Kong",dial_code:"+852",emoji:"🇭🇰",code:"HK"},{name:"Hungary",dial_code:"+36",emoji:"🇭🇺",code:"HU"},{name:"Iceland",dial_code:"+354",emoji:"🇮🇸",code:"IS"},{name:"India",dial_code:"+91",emoji:"🇮🇳",code:"IN"},{name:"Indonesia",dial_code:"+62",emoji:"🇮🇩",code:"ID"},{name:"Iran, Islamic Republic of Persian Gulf",dial_code:"+98",emoji:"🇮🇷",code:"IR"},{name:"Iraq",dial_code:"+964",emoji:"🇮🇷",code:"IQ"},{name:"Ireland",dial_code:"+353",emoji:"🇮🇪",code:"IE"},{name:"Isle of Man",dial_code:"+44",emoji:"🇮🇲",code:"IM"},{name:"Israel",dial_code:"+972",emoji:"🇮🇱",code:"IL"},{name:"Italy",dial_code:"+39",emoji:"🇮🇹",code:"IT"},{name:"Jamaica",dial_code:"+1876",emoji:"🇯🇲",code:"JM"},{name:"Japan",dial_code:"+81",emoji:"🇯🇵",code:"JP"},{name:"Jersey",dial_code:"+44",emoji:"🇯🇪",code:"JE"},{name:"Jordan",dial_code:"+962",emoji:"🇯🇴",code:"JO"},{name:"Kazakhstan",dial_code:"+77",emoji:"🇰🇿",code:"KZ"},{name:"Kenya",dial_code:"+254",emoji:"🇰🇪",code:"KE"},{name:"Kiribati",dial_code:"+686",emoji:"🇰🇮",code:"KI"},{name:"Korea, Democratic People's Republic of Korea",dial_code:"+850",emoji:"🇰🇵",code:"KP"},{name:"Korea, Republic of South Korea",dial_code:"+82",emoji:"🇰🇷",code:"KR"},{name:"Kuwait",dial_code:"+965",emoji:"🇰🇼",code:"KW"},{name:"Kyrgyzstan",dial_code:"+996",emoji:"🇰🇬",code:"KG"},{name:"Laos",dial_code:"+856",emoji:"🇱🇦",code:"LA"},{name:"Latvia",dial_code:"+371",emoji:"🇱🇻",code:"LV"},{name:"Lebanon",dial_code:"+961",emoji:"🇱🇧",code:"LB"},{name:"Lesotho",dial_code:"+266",emoji:"🇱🇸",code:"LS"},{name:"Liberia",dial_code:"+231",emoji:"🇱🇷",code:"LR"},{name:"Libyan Arab Jamahiriya",dial_code:"+218",emoji:"🇱🇾",code:"LY"},{name:"Liechtenstein",dial_code:"+423",emoji:"🇱🇮",code:"LI"},{name:"Lithuania",dial_code:"+370",emoji:"🇱🇹",code:"LT"},{name:"Luxembourg",dial_code:"+352",emoji:"🇱🇺",code:"LU"},{name:"Macao",dial_code:"+853",emoji:"🇲🇴",code:"MO"},{name:"Macedonia",dial_code:"+389",emoji:"🇲🇰",code:"MK"},{name:"Madagascar",dial_code:"+261",emoji:"🇲🇬",code:"MG"},{name:"Malawi",dial_code:"+265",emoji:"🇲🇼",code:"MW"},{name:"Malaysia",dial_code:"+60",emoji:"🇲🇾",code:"MY"},{name:"Maldives",dial_code:"+960",emoji:"🇲🇻",code:"MV"},{name:"Mali",dial_code:"+223",emoji:"🇲🇱",code:"ML"},{name:"Malta",dial_code:"+356",emoji:"🇲🇹",code:"MT"},{name:"Marshall Islands",dial_code:"+692",emoji:"🇲🇭",code:"MH"},{name:"Martinique",dial_code:"+596",emoji:"🇲🇶",code:"MQ"},{name:"Mauritania",dial_code:"+222",emoji:"🇲🇷",code:"MR"},{name:"Mauritius",dial_code:"+230",emoji:"🇲🇺",code:"MU"},{name:"Mayotte",dial_code:"+262",emoji:"🇾🇹",code:"YT"},{name:"Mexico",dial_code:"+52",emoji:"🇲🇽",code:"MX"},{name:"Micronesia, Federated States of Micronesia",dial_code:"+691",emoji:"🇫🇲",code:"FM"},{name:"Moldova",dial_code:"+373",emoji:"🇲🇩",code:"MD"},{name:"Monaco",dial_code:"+377",emoji:"🇲🇨",code:"MC"},{name:"Mongolia",dial_code:"+976",emoji:"🇲🇳",code:"MN"},{name:"Montenegro",dial_code:"+382",emoji:"🇲🇪",code:"ME"},{name:"Montserrat",dial_code:"+1664",emoji:"🇲🇸",code:"MS"},{name:"Morocco",dial_code:"+212",emoji:"🇲🇦",code:"MA"},{name:"Mozambique",dial_code:"+258",emoji:"🇲🇿",code:"MZ"},{name:"Myanmar",dial_code:"+95",emoji:"🇲🇲",code:"MM"},{name:"Namibia",emoji:"🇳🇦",dial_code:"+264",code:"NA"},{name:"Nauru",dial_code:"+674",emoji:"🇳🇷",code:"NR"},{name:"Nepal",dial_code:"+977",emoji:"🇳🇵",code:"NP"},{name:"Netherlands",dial_code:"+31",emoji:"🇳🇱",code:"NL"},{name:"Netherlands Antilles",dial_code:"+599",emoji:"🇧🇶",code:"AN"},{name:"New Caledonia",dial_code:"+687",emoji:"🇳🇨",code:"NC"},{name:"New Zealand",dial_code:"+64",emoji:"🇳🇿",code:"NZ"},{name:"Nicaragua",dial_code:"+505",emoji:"🇳🇮",code:"NI"},{name:"Niger",dial_code:"+227",emoji:"🇳🇪",code:"NE"},{name:"Nigeria",dial_code:"+234",emoji:"🇳🇬",code:"NG"},{name:"Niue",dial_code:"+683",emoji:"🇳🇺",code:"NU"},{name:"Norfolk Island",dial_code:"+672",emoji:"🇳🇫",code:"NF"},{name:"Northern Mariana Islands",dial_code:"+1670",emoji:"🇲🇵",code:"MP"},{name:"Norway",dial_code:"+47",emoji:"🇳🇴",code:"NO"},{name:"Oman",dial_code:"+968",emoji:"🇴🇲",code:"OM"},{name:"Pakistan",dial_code:"+92",emoji:"🇵🇰",code:"PK"},{name:"Palau",dial_code:"+680",emoji:"🇵🇼",code:"PW"},{name:"Palestinian Territory, Occupied",dial_code:"+970",emoji:"🇵🇸",code:"PS"},{name:"Panama",dial_code:"+507",emoji:"🇵🇦",code:"PA"},{name:"Papua New Guinea",dial_code:"+675",emoji:"🇵🇬",code:"PG"},{name:"Paraguay",dial_code:"+595",emoji:"🇵🇾",code:"PY"},{name:"Peru",dial_code:"+51",emoji:"🇵🇪",code:"PE"},{name:"Philippines",dial_code:"+63",emoji:"🇵🇭",code:"PH"},{name:"Pitcairn",dial_code:"+872",emoji:"🇵🇳",code:"PN"},{name:"Poland",dial_code:"+48",emoji:"🇵🇱",code:"PL"},{name:"Portugal",dial_code:"+351",emoji:"🇵🇹",code:"PT"},{name:"Puerto Rico",dial_code:"+1939",emoji:"🇵🇷",code:"PR"},{name:"Qatar",dial_code:"+974",emoji:"🇶🇦",code:"QA"},{name:"Romania",dial_code:"+40",emoji:"🇷🇴",code:"RO"},{name:"Russia",dial_code:"+7",emoji:"🇷🇺",code:"RU"},{name:"Rwanda",dial_code:"+250",emoji:"🇷🇼",code:"RW"},{name:"Reunion",dial_code:"+262",emoji:"🇷🇪",code:"RE"},{name:"Saint Barthelemy",dial_code:"+590",emoji:"🇧🇱",code:"BL"},{name:"Saint Helena, Ascension and Tristan Da Cunha",dial_code:"+290",emoji:"🇸🇭",code:"SH"},{name:"Saint Kitts and Nevis",dial_code:"+1869",emoji:"🇰🇳",code:"KN"},{name:"Saint Lucia",dial_code:"+1758",emoji:"🇱🇨",code:"LC"},{name:"Saint Martin",dial_code:"+590",emoji:"🇲🇫",code:"MF"},{name:"Saint Pierre and Miquelon",dial_code:"+508",emoji:"🇵🇲",code:"PM"},{name:"Saint Vincent and the Grenadines",dial_code:"+1784",emoji:"🇻🇨",code:"VC"},{name:"Samoa",dial_code:"+685",emoji:"🇼🇸",code:"WS"},{name:"San Marino",dial_code:"+378",emoji:"🇸🇲",code:"SM"},{name:"Sao Tome and Principe",dial_code:"+239",emoji:"🇸🇹",code:"ST"},{name:"Saudi Arabia",dial_code:"+966",emoji:"🇸🇦",code:"SA"},{name:"Senegal",dial_code:"+221",emoji:"🇸🇳",code:"SN"},{name:"Serbia",dial_code:"+381",emoji:"🇷🇸",code:"RS"},{name:"Seychelles",dial_code:"+248",emoji:"🇸🇨",code:"SC"},{name:"Sierra Leone",dial_code:"+232",emoji:"🇸🇱",code:"SL"},{name:"Singapore",dial_code:"+65",emoji:"🇸🇬",code:"SG"},{name:"Slovakia",dial_code:"+421",emoji:"🇸🇰",code:"SK"},{name:"Slovenia",dial_code:"+386",emoji:"🇸🇮",code:"SI"},{name:"Solomon Islands",dial_code:"+677",emoji:"🇸🇧",code:"SB"},{name:"Somalia",dial_code:"+252",emoji:"🇸🇴",code:"SO"},{name:"South Africa",dial_code:"+27",emoji:"🇿🇦",code:"ZA"},{name:"South Sudan",dial_code:"+211",emoji:"🇸🇸",code:"SS"},{name:"South Georgia and the South Sandwich Islands",dial_code:"+500",emoji:"🇬🇸",code:"GS"},{name:"Spain",dial_code:"+34",emoji:"🇪🇸",code:"ES"},{name:"Sri Lanka",dial_code:"+94",emoji:"🇱🇰",code:"LK"},{name:"Sudan",dial_code:"+249",emoji:"🇸🇩",code:"SD"},{name:"Suriname",dial_code:"+597",emoji:"🇸🇷",code:"SR"},{name:"Svalbard and Jan Mayen",dial_code:"+47",emoji:"🇸🇯",code:"SJ"},{name:"Swaziland",dial_code:"+268",emoji:"🇸🇿",code:"SZ"},{name:"Sweden",dial_code:"+46",emoji:"🇸🇪",code:"SE"},{name:"Switzerland",dial_code:"+41",emoji:"🇨🇭",code:"CH"},{name:"Syrian Arab Republic",dial_code:"+963",emoji:"🇸🇾",code:"SY"},{name:"Taiwan",dial_code:"+886",emoji:"🇹🇼",code:"TW"},{name:"Tajikistan",dial_code:"+992",emoji:"🇹🇯",code:"TJ"},{name:"Tanzania, United Republic of Tanzania",dial_code:"+255",emoji:"🇹🇿",code:"TZ"},{name:"Thailand",dial_code:"+66",emoji:"🇹🇭",code:"TH"},{name:"Timor-Leste",dial_code:"+670",emoji:"🇹🇱",code:"TL"},{name:"Togo",dial_code:"+228",emoji:"🇹🇬",code:"TG"},{name:"Tokelau",dial_code:"+690",emoji:"🇹🇰",code:"TK"},{name:"Tonga",dial_code:"+676",emoji:"🇹🇴",code:"TO"},{name:"Trinidad and Tobago",dial_code:"+1868",emoji:"🇹🇹",code:"TT"},{name:"Tunisia",dial_code:"+216",emoji:"🇹🇳",code:"TN"},{name:"Turkey",dial_code:"+90",emoji:"🇹🇷",code:"TR"},{name:"Turkmenistan",dial_code:"+993",emoji:"🇹🇲",code:"TM"},{name:"Turks and Caicos Islands",dial_code:"+1649",emoji:"🇹🇨",code:"TC"},{name:"Tuvalu",dial_code:"+688",emoji:"🇹🇻",code:"TV"},{name:"Uganda",dial_code:"+256",emoji:"🇺🇬",code:"UG"},{name:"Ukraine",dial_code:"+380",emoji:"🇺🇦",code:"UA"},{name:"United Arab Emirates",dial_code:"+971",emoji:"🇦🇪",code:"AE"},{name:"United Kingdom",dial_code:"+44",emoji:"🇬🇧",code:"GB"},{name:"United States",dial_code:"+1",emoji:"🇺🇸",code:"US"},{name:"Uruguay",dial_code:"+598",emoji:"🇺🇾",code:"UY"},{name:"Uzbekistan",dial_code:"+998",emoji:"🇺🇿",code:"UZ"},{name:"Vanuatu",dial_code:"+678",emoji:"🇻🇺",code:"VU"},{name:"Venezuela, Bolivarian Republic of Venezuela",dial_code:"+58",emoji:"🇻🇪",code:"VE"},{name:"Vietnam",dial_code:"+84",emoji:"🇻🇳",code:"VN"},{name:"Virgin Islands, British",dial_code:"+1284",emoji:"🇻🇬",code:"VG"},{name:"Virgin Islands, U.S.",dial_code:"+1340",emoji:"🇻🇮",code:"VI"},{name:"Wallis and Futuna",dial_code:"+681",emoji:"🇼🇫",code:"WF"},{name:"Yemen",dial_code:"+967",emoji:"🇾🇪",code:"YE"},{name:"Zambia",dial_code:"+260",emoji:"🇿🇲",code:"ZM"},{name:"Zimbabwe",dial_code:"+263",emoji:"🇿🇼",code:"ZW"}],Ga=({placeholder:e})=>{const[o,t]=h.useState(Ut),[n,a]=h.useState(e??Ut[0].name),[l,c]=h.useState(!0),[s,d]=h.useState(!1),[g,m]=h.useState(!1);return{hide:l,setHide:c,newOptions:o,setNewOptions:t,isHovered:g,setIsHovered:m,isFocused:s,setIsFocused:d,value:n,setValue:a}},Ya={xs:8,sm:10,md:12,lg:14,xl:16},Vg=({size:e,...o})=>r.jsx(i.Element,{as:"ul",...o}),Ag=e=>r.jsx(i.Input,{type:"text",...e}),Eg=({size:e,...o})=>r.jsx(i.Element,{as:"li",...o}),Dg=({id:e,option:o,size:t="md",isSelected:n=!1,isHighlighted:a=!1,callback:l=()=>{},views:c={text:{}}})=>{const s=d=>{d&&d.stopPropagation&&d.stopPropagation(),l(o??"")};return r.jsx(Eg,{id:e,margin:0,role:"option","aria-selected":n,listStyleType:"none",fontWeight:"normal",paddingVertical:6,paddingHorizontal:12,onClick:s,fontSize:i.Typography.fontSizes[t],backgroundColor:a?"color-gray-100":void 0,_hover:{backgroundColor:"color-gray-100",transition:"all 0.15s ease-in-out"},...c.text,children:o})},$g=({id:e,size:o,views:t={dropDown:{}},options:n=[],selectedOption:a,highlightedIndex:l=-1,callback:c=()=>{}})=>{const s=d=>c(d);return r.jsx(Vg,{id:e,role:"listbox",margin:0,padding:0,top:"100%",width:"100%",display:"flex",zIndex:1e3,overflow:"auto",maxHeight:"300px",borderRadius:12,position:"absolute",flexDirection:"column",backgroundColor:"color-white",borderWidth:"1px",borderStyle:"solid",borderColor:"color-gray-200",boxShadow:"0 4px 12px rgba(0, 0, 0, 0.1)",...t.dropDown,children:n.map((d,g)=>r.jsx(Dg,{id:e?`${e}-option-${g}`:void 0,size:o,option:d.name,isSelected:d.name===a,isHighlighted:g===l,callback:s,...t.text},d.code))})},Ka=({id:e,name:o,label:t,value:n,placeholder:a,helperText:l,hide:c=!1,error:s=!1,isHovered:d=!1,isFocused:g=!1,isAutoFocus:m=!1,isDisabled:f=!1,isReadOnly:p=!1,shadow:u={},newOptions:y=[],size:k="md",variant:x="default",shape:C="default",onChange:S,onBlur:w=()=>{},setHide:v=()=>{},setNewOptions:b=()=>{},setIsHovered:I=()=>{},setIsFocused:T=()=>{},setValue:j=()=>{},selected:E,views:D={text:{},icon:{},label:{},dropDown:{},helperText:{}},themeMode:W,...A})=>{const{getColor:H,themeMode:z}=i.useTheme(),P=h.useId(),V=e??P,M=`${V}-listbox`,[L,_]=h.useState(-1),O=H("color-gray-500",{themeMode:W||z}),N=()=>T(!0),U=Y=>{v(!c),_(-1),j(Y),S&&S(Y)},X=()=>{!f&&!p&&v(!c)},oe=Y=>{const Z=Y.target.value,ee=Ut.filter(ne=>ne.name.toLowerCase().startsWith(Z.toLowerCase()));c&&v(!1),b(ee),_(ee.length>0?0:-1),S&&S(Z)},B=Y=>{f||p||(Y.key==="ArrowDown"?(Y.preventDefault(),c?(v(!1),_(y.length>0?0:-1)):_(Math.min(L+1,y.length-1))):Y.key==="ArrowUp"?c||(Y.preventDefault(),_(Math.max(L-1,0))):Y.key==="Enter"?!c&&L>=0&&y[L]&&(Y.preventDefault(),U(y[L].name)):Y.key==="Escape"&&(c||(v(!0),_(-1))))},$=Y=>{w(Y),T(!1)},q=!!t,J={margin:0,paddingVertical:0,paddingHorizontal:0,width:"100%",height:"100%",border:"none",on:{focus:{outline:"none"}},transition:"all 0.2s ease-in-out",fontSize:i.Typography.fontSizes[k],backgroundColor:"transparent",color:f?"color-gray-400":"color-gray-900",cursor:f?"not-allowed":p?"auto":"pointer",...D.field};return r.jsxs(Ue,{helperText:l,error:s,views:D,onClick:X,children:[r.jsxs(oo,{label:t,size:k,error:s,shape:C,views:D,shadow:u,variant:x,value:n,color:"theme-primary",isDisabled:f,isReadOnly:p,isFocused:g,showLabel:q,_hover:!f&&!s?{borderColor:"theme-primary"}:void 0,children:[r.jsxs(Ho,{children:[q&&r.jsx(ho,{htmlFor:V,color:"theme-primary",error:s,views:D,children:t}),r.jsx(Ag,{id:V,name:o,placeholder:a,readOnly:p,disabled:f,autoFocus:m,role:"combobox","aria-expanded":!c,"aria-controls":c?void 0:M,"aria-autocomplete":"list","aria-haspopup":"listbox","aria-activedescendant":!c&&L>=0?`${M}-option-${L}`:void 0,onBlur:$,onFocus:N,onKeyDown:B,...J,...A,value:n,onChange:oe})]}),r.jsx(Zo,{children:c?r.jsx(he,{orientation:"down",widthHeight:Ya[k],color:O,style:D.icon}):r.jsx(he,{orientation:"up",widthHeight:Ya[k],color:O,style:D.icon})})]}),!c&&r.jsx($g,{id:M,size:k,views:D,options:y,selectedOption:n,highlightedIndex:L,callback:U})]})},Lg=e=>{const o=Ga(e);return r.jsx(Ka,{...o,...e})};function Lr(e){"@babel/helpers - typeof";return Lr=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(o){return typeof o}:function(o){return o&&typeof Symbol=="function"&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o},Lr(e)}function ze(e,o){if(o.length<e)throw new TypeError(e+" argument"+(e>1?"s":"")+" required, but only "+o.length+" present")}function _g(e){return ze(1,arguments),e instanceof Date||Lr(e)==="object"&&Object.prototype.toString.call(e)==="[object Date]"}function Ne(e){ze(1,arguments);var o=Object.prototype.toString.call(e);return e instanceof Date||Lr(e)==="object"&&o==="[object Date]"?new Date(e.getTime()):typeof e=="number"||o==="[object Number]"?new Date(e):((typeof e=="string"||o==="[object String]")&&typeof console<"u"&&(console.warn("Starting with v2.0.0-beta.1 date-fns doesn't accept strings as date arguments. Please use `parseISO` to parse strings. See: https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#string-arguments"),console.warn(new Error().stack)),new Date(NaN))}function Bg(e){if(ze(1,arguments),!_g(e)&&typeof e!="number")return!1;var o=Ne(e);return!isNaN(Number(o))}function mo(e){if(e===null||e===!0||e===!1)return NaN;var o=Number(e);return isNaN(o)?o:o<0?Math.ceil(o):Math.floor(o)}function Og(e,o){ze(2,arguments);var t=Ne(e).getTime(),n=mo(o);return new Date(t+n)}function Ng(e,o){ze(2,arguments);var t=mo(o);return Og(e,-t)}var qg=864e5;function Ug(e){ze(1,arguments);var o=Ne(e),t=o.getTime();o.setUTCMonth(0,1),o.setUTCHours(0,0,0,0);var n=o.getTime(),a=t-n;return Math.floor(a/qg)+1}function _r(e){ze(1,arguments);var o=1,t=Ne(e),n=t.getUTCDay(),a=(n<o?7:0)+n-o;return t.setUTCDate(t.getUTCDate()-a),t.setUTCHours(0,0,0,0),t}function Xa(e){ze(1,arguments);var o=Ne(e),t=o.getUTCFullYear(),n=new Date(0);n.setUTCFullYear(t+1,0,4),n.setUTCHours(0,0,0,0);var a=_r(n),l=new Date(0);l.setUTCFullYear(t,0,4),l.setUTCHours(0,0,0,0);var c=_r(l);return o.getTime()>=a.getTime()?t+1:o.getTime()>=c.getTime()?t:t-1}function Gg(e){ze(1,arguments);var o=Xa(e),t=new Date(0);t.setUTCFullYear(o,0,4),t.setUTCHours(0,0,0,0);var n=_r(t);return n}var Yg=6048e5;function Kg(e){ze(1,arguments);var o=Ne(e),t=_r(o).getTime()-Gg(o).getTime();return Math.round(t/Yg)+1}var Xg={};function Br(){return Xg}function Or(e,o){var t,n,a,l,c,s,d,g;ze(1,arguments);var m=Br(),f=mo((t=(n=(a=(l=o==null?void 0:o.weekStartsOn)!==null&&l!==void 0?l:o==null||(c=o.locale)===null||c===void 0||(s=c.options)===null||s===void 0?void 0:s.weekStartsOn)!==null&&a!==void 0?a:m.weekStartsOn)!==null&&n!==void 0?n:(d=m.locale)===null||d===void 0||(g=d.options)===null||g===void 0?void 0:g.weekStartsOn)!==null&&t!==void 0?t:0);if(!(f>=0&&f<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var p=Ne(e),u=p.getUTCDay(),y=(u<f?7:0)+u-f;return p.setUTCDate(p.getUTCDate()-y),p.setUTCHours(0,0,0,0),p}function Ja(e,o){var t,n,a,l,c,s,d,g;ze(1,arguments);var m=Ne(e),f=m.getUTCFullYear(),p=Br(),u=mo((t=(n=(a=(l=o==null?void 0:o.firstWeekContainsDate)!==null&&l!==void 0?l:o==null||(c=o.locale)===null||c===void 0||(s=c.options)===null||s===void 0?void 0:s.firstWeekContainsDate)!==null&&a!==void 0?a:p.firstWeekContainsDate)!==null&&n!==void 0?n:(d=p.locale)===null||d===void 0||(g=d.options)===null||g===void 0?void 0:g.firstWeekContainsDate)!==null&&t!==void 0?t:1);if(!(u>=1&&u<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var y=new Date(0);y.setUTCFullYear(f+1,0,u),y.setUTCHours(0,0,0,0);var k=Or(y,o),x=new Date(0);x.setUTCFullYear(f,0,u),x.setUTCHours(0,0,0,0);var C=Or(x,o);return m.getTime()>=k.getTime()?f+1:m.getTime()>=C.getTime()?f:f-1}function Jg(e,o){var t,n,a,l,c,s,d,g;ze(1,arguments);var m=Br(),f=mo((t=(n=(a=(l=o==null?void 0:o.firstWeekContainsDate)!==null&&l!==void 0?l:o==null||(c=o.locale)===null||c===void 0||(s=c.options)===null||s===void 0?void 0:s.firstWeekContainsDate)!==null&&a!==void 0?a:m.firstWeekContainsDate)!==null&&n!==void 0?n:(d=m.locale)===null||d===void 0||(g=d.options)===null||g===void 0?void 0:g.firstWeekContainsDate)!==null&&t!==void 0?t:1),p=Ja(e,o),u=new Date(0);u.setUTCFullYear(p,0,f),u.setUTCHours(0,0,0,0);var y=Or(u,o);return y}var Qg=6048e5;function Zg(e,o){ze(1,arguments);var t=Ne(e),n=Or(t,o).getTime()-Jg(t,o).getTime();return Math.round(n/Qg)+1}function se(e,o){for(var t=e<0?"-":"",n=Math.abs(e).toString();n.length<o;)n="0"+n;return t+n}var ro={y:function(o,t){var n=o.getUTCFullYear(),a=n>0?n:1-n;return se(t==="yy"?a%100:a,t.length)},M:function(o,t){var n=o.getUTCMonth();return t==="M"?String(n+1):se(n+1,2)},d:function(o,t){return se(o.getUTCDate(),t.length)},a:function(o,t){var n=o.getUTCHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.toUpperCase();case"aaa":return n;case"aaaaa":return n[0];case"aaaa":default:return n==="am"?"a.m.":"p.m."}},h:function(o,t){return se(o.getUTCHours()%12||12,t.length)},H:function(o,t){return se(o.getUTCHours(),t.length)},m:function(o,t){return se(o.getUTCMinutes(),t.length)},s:function(o,t){return se(o.getUTCSeconds(),t.length)},S:function(o,t){var n=t.length,a=o.getUTCMilliseconds(),l=Math.floor(a*Math.pow(10,n-3));return se(l,t.length)}},jo={midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},Rg={G:function(o,t,n){var a=o.getUTCFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return n.era(a,{width:"abbreviated"});case"GGGGG":return n.era(a,{width:"narrow"});case"GGGG":default:return n.era(a,{width:"wide"})}},y:function(o,t,n){if(t==="yo"){var a=o.getUTCFullYear(),l=a>0?a:1-a;return n.ordinalNumber(l,{unit:"year"})}return ro.y(o,t)},Y:function(o,t,n,a){var l=Ja(o,a),c=l>0?l:1-l;if(t==="YY"){var s=c%100;return se(s,2)}return t==="Yo"?n.ordinalNumber(c,{unit:"year"}):se(c,t.length)},R:function(o,t){var n=Xa(o);return se(n,t.length)},u:function(o,t){var n=o.getUTCFullYear();return se(n,t.length)},Q:function(o,t,n){var a=Math.ceil((o.getUTCMonth()+1)/3);switch(t){case"Q":return String(a);case"QQ":return se(a,2);case"Qo":return n.ordinalNumber(a,{unit:"quarter"});case"QQQ":return n.quarter(a,{width:"abbreviated",context:"formatting"});case"QQQQQ":return n.quarter(a,{width:"narrow",context:"formatting"});case"QQQQ":default:return n.quarter(a,{width:"wide",context:"formatting"})}},q:function(o,t,n){var a=Math.ceil((o.getUTCMonth()+1)/3);switch(t){case"q":return String(a);case"qq":return se(a,2);case"qo":return n.ordinalNumber(a,{unit:"quarter"});case"qqq":return n.quarter(a,{width:"abbreviated",context:"standalone"});case"qqqqq":return n.quarter(a,{width:"narrow",context:"standalone"});case"qqqq":default:return n.quarter(a,{width:"wide",context:"standalone"})}},M:function(o,t,n){var a=o.getUTCMonth();switch(t){case"M":case"MM":return ro.M(o,t);case"Mo":return n.ordinalNumber(a+1,{unit:"month"});case"MMM":return n.month(a,{width:"abbreviated",context:"formatting"});case"MMMMM":return n.month(a,{width:"narrow",context:"formatting"});case"MMMM":default:return n.month(a,{width:"wide",context:"formatting"})}},L:function(o,t,n){var a=o.getUTCMonth();switch(t){case"L":return String(a+1);case"LL":return se(a+1,2);case"Lo":return n.ordinalNumber(a+1,{unit:"month"});case"LLL":return n.month(a,{width:"abbreviated",context:"standalone"});case"LLLLL":return n.month(a,{width:"narrow",context:"standalone"});case"LLLL":default:return n.month(a,{width:"wide",context:"standalone"})}},w:function(o,t,n,a){var l=Zg(o,a);return t==="wo"?n.ordinalNumber(l,{unit:"week"}):se(l,t.length)},I:function(o,t,n){var a=Kg(o);return t==="Io"?n.ordinalNumber(a,{unit:"week"}):se(a,t.length)},d:function(o,t,n){return t==="do"?n.ordinalNumber(o.getUTCDate(),{unit:"date"}):ro.d(o,t)},D:function(o,t,n){var a=Ug(o);return t==="Do"?n.ordinalNumber(a,{unit:"dayOfYear"}):se(a,t.length)},E:function(o,t,n){var a=o.getUTCDay();switch(t){case"E":case"EE":case"EEE":return n.day(a,{width:"abbreviated",context:"formatting"});case"EEEEE":return n.day(a,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(a,{width:"short",context:"formatting"});case"EEEE":default:return n.day(a,{width:"wide",context:"formatting"})}},e:function(o,t,n,a){var l=o.getUTCDay(),c=(l-a.weekStartsOn+8)%7||7;switch(t){case"e":return String(c);case"ee":return se(c,2);case"eo":return n.ordinalNumber(c,{unit:"day"});case"eee":return n.day(l,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(l,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(l,{width:"short",context:"formatting"});case"eeee":default:return n.day(l,{width:"wide",context:"formatting"})}},c:function(o,t,n,a){var l=o.getUTCDay(),c=(l-a.weekStartsOn+8)%7||7;switch(t){case"c":return String(c);case"cc":return se(c,t.length);case"co":return n.ordinalNumber(c,{unit:"day"});case"ccc":return n.day(l,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(l,{width:"narrow",context:"standalone"});case"cccccc":return n.day(l,{width:"short",context:"standalone"});case"cccc":default:return n.day(l,{width:"wide",context:"standalone"})}},i:function(o,t,n){var a=o.getUTCDay(),l=a===0?7:a;switch(t){case"i":return String(l);case"ii":return se(l,t.length);case"io":return n.ordinalNumber(l,{unit:"day"});case"iii":return n.day(a,{width:"abbreviated",context:"formatting"});case"iiiii":return n.day(a,{width:"narrow",context:"formatting"});case"iiiiii":return n.day(a,{width:"short",context:"formatting"});case"iiii":default:return n.day(a,{width:"wide",context:"formatting"})}},a:function(o,t,n){var a=o.getUTCHours(),l=a/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.dayPeriod(l,{width:"abbreviated",context:"formatting"});case"aaa":return n.dayPeriod(l,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return n.dayPeriod(l,{width:"narrow",context:"formatting"});case"aaaa":default:return n.dayPeriod(l,{width:"wide",context:"formatting"})}},b:function(o,t,n){var a=o.getUTCHours(),l;switch(a===12?l=jo.noon:a===0?l=jo.midnight:l=a/12>=1?"pm":"am",t){case"b":case"bb":return n.dayPeriod(l,{width:"abbreviated",context:"formatting"});case"bbb":return n.dayPeriod(l,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return n.dayPeriod(l,{width:"narrow",context:"formatting"});case"bbbb":default:return n.dayPeriod(l,{width:"wide",context:"formatting"})}},B:function(o,t,n){var a=o.getUTCHours(),l;switch(a>=17?l=jo.evening:a>=12?l=jo.afternoon:a>=4?l=jo.morning:l=jo.night,t){case"B":case"BB":case"BBB":return n.dayPeriod(l,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(l,{width:"narrow",context:"formatting"});case"BBBB":default:return n.dayPeriod(l,{width:"wide",context:"formatting"})}},h:function(o,t,n){if(t==="ho"){var a=o.getUTCHours()%12;return a===0&&(a=12),n.ordinalNumber(a,{unit:"hour"})}return ro.h(o,t)},H:function(o,t,n){return t==="Ho"?n.ordinalNumber(o.getUTCHours(),{unit:"hour"}):ro.H(o,t)},K:function(o,t,n){var a=o.getUTCHours()%12;return t==="Ko"?n.ordinalNumber(a,{unit:"hour"}):se(a,t.length)},k:function(o,t,n){var a=o.getUTCHours();return a===0&&(a=24),t==="ko"?n.ordinalNumber(a,{unit:"hour"}):se(a,t.length)},m:function(o,t,n){return t==="mo"?n.ordinalNumber(o.getUTCMinutes(),{unit:"minute"}):ro.m(o,t)},s:function(o,t,n){return t==="so"?n.ordinalNumber(o.getUTCSeconds(),{unit:"second"}):ro.s(o,t)},S:function(o,t){return ro.S(o,t)},X:function(o,t,n,a){var l=a._originalDate||o,c=l.getTimezoneOffset();if(c===0)return"Z";switch(t){case"X":return Za(c);case"XXXX":case"XX":return po(c);case"XXXXX":case"XXX":default:return po(c,":")}},x:function(o,t,n,a){var l=a._originalDate||o,c=l.getTimezoneOffset();switch(t){case"x":return Za(c);case"xxxx":case"xx":return po(c);case"xxxxx":case"xxx":default:return po(c,":")}},O:function(o,t,n,a){var l=a._originalDate||o,c=l.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+Qa(c,":");case"OOOO":default:return"GMT"+po(c,":")}},z:function(o,t,n,a){var l=a._originalDate||o,c=l.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+Qa(c,":");case"zzzz":default:return"GMT"+po(c,":")}},t:function(o,t,n,a){var l=a._originalDate||o,c=Math.floor(l.getTime()/1e3);return se(c,t.length)},T:function(o,t,n,a){var l=a._originalDate||o,c=l.getTime();return se(c,t.length)}};function Qa(e,o){var t=e>0?"-":"+",n=Math.abs(e),a=Math.floor(n/60),l=n%60;if(l===0)return t+String(a);var c=o;return t+String(a)+c+se(l,2)}function Za(e,o){if(e%60===0){var t=e>0?"-":"+";return t+se(Math.abs(e)/60,2)}return po(e,o)}function po(e,o){var t=o||"",n=e>0?"-":"+",a=Math.abs(e),l=se(Math.floor(a/60),2),c=se(a%60,2);return n+l+t+c}var Ra=function(o,t){switch(o){case"P":return t.date({width:"short"});case"PP":return t.date({width:"medium"});case"PPP":return t.date({width:"long"});case"PPPP":default:return t.date({width:"full"})}},el=function(o,t){switch(o){case"p":return t.time({width:"short"});case"pp":return t.time({width:"medium"});case"ppp":return t.time({width:"long"});case"pppp":default:return t.time({width:"full"})}},eh=function(o,t){var n=o.match(/(P+)(p+)?/)||[],a=n[1],l=n[2];if(!l)return Ra(o,t);var c;switch(a){case"P":c=t.dateTime({width:"short"});break;case"PP":c=t.dateTime({width:"medium"});break;case"PPP":c=t.dateTime({width:"long"});break;case"PPPP":default:c=t.dateTime({width:"full"});break}return c.replace("{{date}}",Ra(a,t)).replace("{{time}}",el(l,t))},oh={p:el,P:eh};function rh(e){var o=new Date(Date.UTC(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()));return o.setUTCFullYear(e.getFullYear()),e.getTime()-o.getTime()}var th=["D","DD"],nh=["YY","YYYY"];function ah(e){return th.indexOf(e)!==-1}function lh(e){return nh.indexOf(e)!==-1}function ol(e,o,t){if(e==="YYYY")throw new RangeError("Use `yyyy` instead of `YYYY` (in `".concat(o,"`) for formatting years to the input `").concat(t,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if(e==="YY")throw new RangeError("Use `yy` instead of `YY` (in `".concat(o,"`) for formatting years to the input `").concat(t,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if(e==="D")throw new RangeError("Use `d` instead of `D` (in `".concat(o,"`) for formatting days of the month to the input `").concat(t,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if(e==="DD")throw new RangeError("Use `dd` instead of `DD` (in `".concat(o,"`) for formatting days of the month to the input `").concat(t,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"))}var ih={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},ch=function(o,t,n){var a,l=ih[o];return typeof l=="string"?a=l:t===1?a=l.one:a=l.other.replace("{{count}}",t.toString()),n!=null&&n.addSuffix?n.comparison&&n.comparison>0?"in "+a:a+" ago":a};function Gt(e){return function(){var o=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=o.width?String(o.width):e.defaultWidth,n=e.formats[t]||e.formats[e.defaultWidth];return n}}var sh={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},dh={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},gh={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},hh={date:Gt({formats:sh,defaultWidth:"full"}),time:Gt({formats:dh,defaultWidth:"full"}),dateTime:Gt({formats:gh,defaultWidth:"full"})},fh={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},mh=function(o,t,n,a){return fh[o]};function tr(e){return function(o,t){var n=t!=null&&t.context?String(t.context):"standalone",a;if(n==="formatting"&&e.formattingValues){var l=e.defaultFormattingWidth||e.defaultWidth,c=t!=null&&t.width?String(t.width):l;a=e.formattingValues[c]||e.formattingValues[l]}else{var s=e.defaultWidth,d=t!=null&&t.width?String(t.width):e.defaultWidth;a=e.values[d]||e.values[s]}var g=e.argumentCallback?e.argumentCallback(o):o;return a[g]}}var ph={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},uh={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},yh={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},bh={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},xh={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},kh={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},Ch=function(o,t){var n=Number(o),a=n%100;if(a>20||a<10)switch(a%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},wh={ordinalNumber:Ch,era:tr({values:ph,defaultWidth:"wide"}),quarter:tr({values:uh,defaultWidth:"wide",argumentCallback:function(o){return o-1}}),month:tr({values:yh,defaultWidth:"wide"}),day:tr({values:bh,defaultWidth:"wide"}),dayPeriod:tr({values:xh,defaultWidth:"wide",formattingValues:kh,defaultFormattingWidth:"wide"})};function nr(e){return function(o){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=t.width,a=n&&e.matchPatterns[n]||e.matchPatterns[e.defaultMatchWidth],l=o.match(a);if(!l)return null;var c=l[0],s=n&&e.parsePatterns[n]||e.parsePatterns[e.defaultParseWidth],d=Array.isArray(s)?vh(s,function(f){return f.test(c)}):Sh(s,function(f){return f.test(c)}),g;g=e.valueCallback?e.valueCallback(d):d,g=t.valueCallback?t.valueCallback(g):g;var m=o.slice(c.length);return{value:g,rest:m}}}function Sh(e,o){for(var t in e)if(e.hasOwnProperty(t)&&o(e[t]))return t}function vh(e,o){for(var t=0;t<e.length;t++)if(o(e[t]))return t}function Th(e){return function(o){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=o.match(e.matchPattern);if(!n)return null;var a=n[0],l=o.match(e.parsePattern);if(!l)return null;var c=e.valueCallback?e.valueCallback(l[0]):l[0];c=t.valueCallback?t.valueCallback(c):c;var s=o.slice(a.length);return{value:c,rest:s}}}var Ih=/^(\d+)(th|st|nd|rd)?/i,Fh=/\d+/i,zh={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},Mh={any:[/^b/i,/^(a|c)/i]},Wh={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},Hh={any:[/1/i,/2/i,/3/i,/4/i]},jh={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},Ph={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},Vh={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},Ah={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},Eh={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},Dh={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},$h={ordinalNumber:Th({matchPattern:Ih,parsePattern:Fh,valueCallback:function(o){return parseInt(o,10)}}),era:nr({matchPatterns:zh,defaultMatchWidth:"wide",parsePatterns:Mh,defaultParseWidth:"any"}),quarter:nr({matchPatterns:Wh,defaultMatchWidth:"wide",parsePatterns:Hh,defaultParseWidth:"any",valueCallback:function(o){return o+1}}),month:nr({matchPatterns:jh,defaultMatchWidth:"wide",parsePatterns:Ph,defaultParseWidth:"any"}),day:nr({matchPatterns:Vh,defaultMatchWidth:"wide",parsePatterns:Ah,defaultParseWidth:"any"}),dayPeriod:nr({matchPatterns:Eh,defaultMatchWidth:"any",parsePatterns:Dh,defaultParseWidth:"any"})},Lh={code:"en-US",formatDistance:ch,formatLong:hh,formatRelative:mh,localize:wh,match:$h,options:{weekStartsOn:0,firstWeekContainsDate:1}},_h=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,Bh=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,Oh=/^'([^]*?)'?$/,Nh=/''/g,qh=/[a-zA-Z]/;function Uh(e,o,t){var n,a,l,c,s,d,g,m,f,p,u,y,k,x;ze(2,arguments);var C=String(o),S=Br(),w=(n=(a=void 0)!==null&&a!==void 0?a:S.locale)!==null&&n!==void 0?n:Lh,v=mo((l=(c=(s=(d=void 0)!==null&&d!==void 0?d:void 0)!==null&&s!==void 0?s:S.firstWeekContainsDate)!==null&&c!==void 0?c:(g=S.locale)===null||g===void 0||(m=g.options)===null||m===void 0?void 0:m.firstWeekContainsDate)!==null&&l!==void 0?l:1);if(!(v>=1&&v<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var b=mo((f=(p=(u=(y=void 0)!==null&&y!==void 0?y:void 0)!==null&&u!==void 0?u:S.weekStartsOn)!==null&&p!==void 0?p:(k=S.locale)===null||k===void 0||(x=k.options)===null||x===void 0?void 0:x.weekStartsOn)!==null&&f!==void 0?f:0);if(!(b>=0&&b<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");if(!w.localize)throw new RangeError("locale must contain localize property");if(!w.formatLong)throw new RangeError("locale must contain formatLong property");var I=Ne(e);if(!Bg(I))throw new RangeError("Invalid time value");var T=rh(I),j=Ng(I,T),E={firstWeekContainsDate:v,weekStartsOn:b,locale:w,_originalDate:I},D=C.match(Bh).map(function(W){var A=W[0];if(A==="p"||A==="P"){var H=oh[A];return H(W,w.formatLong)}return W}).join("").match(_h).map(function(W){if(W==="''")return"'";var A=W[0];if(A==="'")return Gh(W);var H=Rg[A];if(H)return lh(W)&&ol(W,o,String(e)),ah(W)&&ol(W,o,String(e)),H(j,W,w.localize,E);if(A.match(qh))throw new RangeError("Format string contains an unescaped latin alphabet character `"+A+"`");return W}).join("");return D}function Gh(e){var o=e.match(Oh);return o?o[1].replace(Nh,"'"):e}const Yt=e=>typeof e=="string"?e:void 0,rl=({value:e,defaultValue:o}={})=>{const[t,n]=h.useState(!1),[a,l]=h.useState(!1),[c,s]=h.useState(()=>Yt(e)??Yt(o)??Uh(new Date,"yyyy-MM-dd")),d=Yt(e);return h.useEffect(()=>{d!==void 0&&s(d)},[d]),{date:c,setDate:s,isHovered:t,setIsHovered:n,isFocused:a,setIsFocused:l}},Yh=e=>r.jsx(i.Input,{type:"date",...e}),tl=({id:e,name:o,label:t,date:n,children:a,helperText:l,shadow:c={},size:s="md",variant:d="default",shape:g="default",views:m={container:{},label:{},helperText:{},text:{},field:{}},error:f=!1,isHovered:p=!1,isFocused:u=!1,isDisabled:y=!1,isReadOnly:k=!1,setDate:x=()=>{},setIsFocused:C=()=>{},setIsHovered:S=()=>{},onChange:w,onChangeText:v,value:b,defaultValue:I,...T})=>{const{themeMode:j}=i.useTheme(),E=h.useId(),D=e??E,W=!!t,A=()=>S(!p),H=()=>C(!0),z=V=>{typeof V=="string"?(x(V),v&&v(V)):(x(V.target.value),w&&w(V.target.value))},P={margin:0,paddingVertical:0,paddingHorizontal:0,width:"100%",height:"100%",border:"none",on:{focus:{outline:"none",backgroundColor:"transparent"}},transition:"all 0.2s ease-in-out",fontSize:i.Typography.fontSizes[s],backgroundColor:"transparent",color:y?"color-gray-400":"color-gray-900",cursor:y?"not-allowed":k?"auto":"pointer",...m.field};return r.jsx(Ue,{helperText:l,error:f,views:m,children:r.jsx(oo,{label:t,size:s,error:f,shape:g,views:m,shadow:c,color:"theme-primary",variant:d,value:n,isHovered:p,isDisabled:y,isReadOnly:k,isFocused:u,showLabel:W,onMouseEnter:A,onMouseLeave:A,children:r.jsxs(Ho,{children:[W&&r.jsx(ho,{htmlFor:D,color:"theme-primary",error:f,views:m,children:t}),r.jsx(Yh,{id:D,name:o,role:"textbox","aria-label":!W&&typeof t=="string"?t:void 0,onFocus:H,disabled:y,readOnly:k,...P,...T,...v&&{onChangeText:z},onChange:z,value:n})]})})})},Kh=e=>{const o=rl(e);return r.jsx(tl,{...o,...e})},nl=e=>{const o=Lt(e),[t,n]=h.useState(!1);return{isVisible:t,setIsVisible:n,...e,...o}},al={xs:14,sm:16,md:16,lg:18,xl:20},Xh=({visibleIcon:e,hiddenIcon:o,...t})=>{const{isVisible:n,setIsVisible:a,...l}=nl(t),c=al[t.size??"md"]??al.md,s=c-2;return r.jsx(or,{...l,type:n?"text":"password",isClearable:!1,right:r.jsx(i.View,{display:"flex",alignItems:"center",justifyContent:"center",width:`${c}px`,height:`${c}px`,minWidth:`${c}px`,color:"color-gray-500",cursor:t.isDisabled?"not-allowed":"pointer",transition:"color 0.2s ease",onClick:()=>{t.isDisabled||a(!n)},children:n?e??r.jsx(kt,{widthHeight:s}):o??r.jsx(xt,{widthHeight:s})})})},ll=(e,o,t)=>{const[n,a]=h.useState(e),[l,c]=h.useState(o?{value:o,label:o}:e[0]),[s,d]=h.useState([]),[g,m]=h.useState(0),[f,p]=h.useState(t??""),[u,y]=h.useState(!1);return{filteredItems:n,setFilteredItems:a,selectedItem:l,setSelectedItem:c,selectedItems:s,setSelectedItems:d,highlightedIndex:g,setHighlightedIndex:m,searchQuery:f,setSearchQuery:p,isDropdownVisible:u,setIsDropdownVisible:y}},Jh={xs:12,sm:14,md:16,lg:20,xl:24},Qh={maxHeight:"280px",overflowY:"auto",zIndex:1e3,backgroundColor:"color-white",borderRadius:12,borderWidth:"1px",borderStyle:"solid",borderColor:"color-gray-200",boxShadow:"0 4px 12px rgba(0, 0, 0, 0.1)"},il={enter:{opacity:1,transform:"translateY(0) scale(1)",transition:"all 0.2s ease-in-out"},initial:{opacity:0,transform:"translateY(-8px) scale(0.96)"}},Zh={padding:"8px",borderBottomWidth:"1px",borderBottomStyle:"solid",borderBottomColor:"color-gray-100",backgroundColor:"color-gray-50",borderTopLeftRadius:10,borderTopRightRadius:10},Rh={padding:"8px 10px",cursor:"pointer",borderRadius:8,margin:"1px 4px",transition:"all 0.15s ease-in-out"},ef={padding:"24px 16px",display:"flex",flexDirection:"column",alignItems:"center",gap:"8px"},cl={open:{transform:"rotate(180deg)",transition:"all 0.2s ease-in-out"},closed:{transform:"rotate(0deg)",transition:"all 0.2s ease-in-out"}},of={display:"inline-flex",alignItems:"center",gap:"4px",padding:"2px 8px",backgroundColor:"color-gray-100",borderRadius:8,fontSize:"12px",fontWeight:"500",color:"color-gray-700",transition:"all 0.15s ease-in-out"},sl=({placeholder:e,items:o,showTick:t=!0,onSelect:n,searchEnabled:a=!0,left:l,right:c,label:s,filteredItems:d,setSelectedItem:g,selectedItem:m,selectedItems:f,setSelectedItems:p,highlightedIndex:u,setHighlightedIndex:y,searchQuery:k,setSearchQuery:x,setFilteredItems:C,views:S,isDropdownVisible:w,setIsDropdownVisible:v,isMulti:b=!1,searchPlaceholder:I,size:T="md",...j})=>{const E=h.useId(),D=j.id??E,W=`${D}-dropdown`,A=`${D}-label`,{ref:H,relation:z}=i.useElementPosition({trackChanges:!0,trackOnScroll:!0,trackOnResize:!0,throttleMs:10}),P=h.useRef(null),[V,M]=h.useState(!1),[L,_]=h.useState(!1),O=()=>{var Y;const B=L?il.enter:il.initial;if(!H.current)return{};const $=H.current.getBoundingClientRect(),q={position:"fixed",left:$.left,width:$.width,zIndex:1e4,...B};return((Y=z==null?void 0:z.space)==null?void 0:Y.vertical)==="top"?{...q,bottom:window.innerHeight-$.top+6}:{...q,top:$.bottom+6}};h.useEffect(()=>{if(w){const B=setTimeout(()=>_(!0),10);return()=>clearTimeout(B)}_(!1)},[w]),h.useEffect(()=>{const B=$=>{!$.composedPath().some(Y=>(Y==null?void 0:Y.id)===W)&&H.current&&!H.current.contains($.target)&&v(!1)};return document.addEventListener("mousedown",B),()=>document.removeEventListener("mousedown",B)},[]);const N=B=>{if(x(B),B==="")C(o);else{const $=o.filter(q=>q.label.toLowerCase().includes(B.toLowerCase()));C($)}y(0)},U=B=>{if(b){const $=f.some(J=>J.value===B.value);let q;$?q=f.filter(J=>J.value!==B.value):q=[...f,B],p(q),n==null||n(q)}else g(B),n==null||n(B),v(!1)},X=(B,$)=>{B.stopPropagation();const q=f.filter(J=>J.value!==$.value);p(q),n==null||n(q)},oe=B=>b?f.some($=>$.value===B.value):B.value===m.value;return r.jsxs(i.Horizontal,{flexWrap:"nowrap",gap:15,alignItems:"center",width:"100%",...j,children:[s&&r.jsx(i.Text,{id:A,views:S==null?void 0:S.label,children:s}),r.jsxs(i.View,{position:"relative",width:"100%",children:[r.jsx("div",{ref:H,role:"combobox",tabIndex:0,"aria-expanded":w,"aria-haspopup":"listbox","aria-controls":w?W:void 0,"aria-labelledby":s?A:void 0,onClick:()=>v(!w),onKeyDown:B=>{B.key==="Enter"||B.key===" "||B.key==="ArrowDown"?(B.preventDefault(),v(!0)):B.key==="Escape"&&v(!1)},style:{width:"100%"},children:r.jsxs(oo,{size:T,isHovered:V,isFocused:w,onMouseEnter:()=>M(!0),onMouseLeave:()=>M(!1),cursor:"pointer",views:{container:S==null?void 0:S.container},children:[r.jsxs(i.Horizontal,{gap:10,alignItems:"center",flex:1,minWidth:0,flexWrap:b?"wrap":"nowrap",...S==null?void 0:S.labelContainer,children:[l,b?f.length>0?r.jsx(i.Horizontal,{gap:6,flexWrap:"wrap",alignItems:"center",children:f.map(B=>r.jsxs(i.Horizontal,{...of,_hover:{backgroundColor:"color-gray-200"},children:[B.icon&&r.jsx(i.View,{flexShrink:0,children:B.icon}),r.jsx(i.Text,{size:"sm",color:"color-gray-700",weight:"medium",children:B.label}),r.jsx(He,{widthHeight:12,color:"color-gray-500",cursor:"pointer",onClick:$=>X($,B)})]},B.value))}):r.jsx(i.Text,{weight:"medium",flexGrow:1,color:"color-gray-500",style:{whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},...S==null?void 0:S.label,children:e}):r.jsxs(r.Fragment,{children:[m.icon&&m.label!==e&&r.jsx(i.View,{children:m.icon}),r.jsx(i.Text,{weight:"medium",flexGrow:1,color:m.label===e?"color-gray-500":"color-gray-800",style:{whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},...S==null?void 0:S.label,children:m.label})]})]}),r.jsxs(i.Horizontal,{gap:8,alignItems:"center",flexShrink:0,children:[c,r.jsx(i.View,{style:w?cl.open:cl.closed,children:r.jsx(he,{widthHeight:Jh[T],orientation:"down",color:w?"color-gray-700":"color-gray-400"})})]})]})}),w&&r.jsx(ft,{children:r.jsxs(i.View,{ref:P,id:W,role:"listbox","aria-labelledby":s?A:void 0,...Qh,style:O(),...S==null?void 0:S.dropdown,children:[a&&r.jsx(i.View,{...Zh,children:r.jsx(or,{id:`${D}-search`,name:`${j.name??D}-search`,width:"100%",type:"search",autoFocus:!0,value:k,onChange:B=>N(B),hint:I||e||"Search...","aria-label":I||"Search",isClearable:!1,left:r.jsx(wr,{widthHeight:14,color:"color-gray-400"}),views:{container:{width:"100%",padding:"0",backgroundColor:"transparent",borderColor:"color-gray-200",...S==null?void 0:S.text},field:{fontSize:"13px"}}})}),d.length>0&&r.jsx(i.View,{margin:0,padding:"4px",children:d.map((B,$)=>{const q=oe(B),J=$===u;return r.jsxs(i.Horizontal,{role:"option","aria-selected":q,justifyContent:"space-between",alignItems:"center",...Rh,backgroundColor:q&&J?"color-blue-100":q?"color-blue-50":J?"color-gray-100":"transparent",onMouseEnter:()=>y($),onClick:()=>U(B),...S==null?void 0:S.item,children:[r.jsxs(i.Horizontal,{gap:8,alignItems:"center",children:[B.icon&&r.jsx(i.View,{flexShrink:0,children:B.icon}),r.jsx(i.Text,{size:"sm",color:q?"theme-primary":"color-gray-800",weight:q?"medium":"normal",children:B.label})]}),q&&t&&r.jsx(Xo,{widthHeight:16,color:"theme-primary"})]},B.value)})}),d.length===0&&r.jsxs(i.Vertical,{...ef,children:[r.jsx(wr,{widthHeight:24,color:"color-gray-300"}),r.jsx(i.Text,{color:"color-gray-500",size:"sm",align:"center",children:"No results found"}),r.jsx(i.Text,{color:"color-gray-400",size:"xs",align:"center",children:"Try a different search term"})]})]})})]})]})},rf=({id:e,name:o,items:t,placeholder:n,searchPlaceholder:a,...l})=>{const c=ll(t,n,a);return r.jsx(sl,{id:e,name:o,items:t,searchPlaceholder:a,...c,...l})},dl=e=>{const{tags:o,defaultTags:t=[],onTagsChange:n,onTagAdd:a,onTagRemove:l,maxTags:c,minTagLength:s=1,maxTagLength:d=50,allowDuplicates:g=!1,separators:m=["enter","comma"],isDisabled:f=!1,isReadOnly:p=!1}=e,[u,y]=h.useState(""),[k,x]=h.useState(()=>(o||t||[]).map((z,P)=>({id:`tag-${P}-${Date.now()}`,value:z}))),[C,S]=h.useState(!1),[w,v]=h.useState(!1),b=o&&Array.isArray(o)?o.map((H,z)=>({id:`tag-${z}-${Date.now()}`,value:H})):k;h.useEffect(()=>{o&&Array.isArray(o)&&x(o.map((H,z)=>({id:`tag-${z}-${Date.now()}`,value:H})))},[o]);const I=h.useCallback(H=>{const z=H.trim();return!(z.length<s||z.length>d||!g&&b.map(V=>V.value.toLowerCase()).includes(z.toLowerCase())||c&&b.length>=c)},[b,s,d,g,c]),T=h.useCallback(H=>{if(f||p)return;const z=H.trim();if(!z||!I(z))return;const P={id:`tag-${Date.now()}-${Math.random()}`,value:z},V=[...b,P],M=V.map(L=>L.value);o||x(V),n==null||n(M),a==null||a(z),y("")},[b,I,n,a,f,p,o]),j=h.useCallback(H=>{if(f||p)return;const z=b[H];if(!z)return;const P=b.filter((M,L)=>L!==H),V=P.map(M=>M.value);o||x(P),n==null||n(V),l==null||l(z.value,H)},[b,n,l,f,p,o]),E=h.useCallback(H=>{if(f||p)return;const z=H.target.value;if(m.includes("comma")&&z.includes(",")){const P=z.split(","),V=P[0],M=P.slice(1).join(",");V.trim()&&T(V),y(M);return}y(z)},[T,m,f,p]),D=h.useCallback(H=>{if(f||p)return;const{key:z}=H;if(m.includes("enter")&&z==="Enter"){H.preventDefault(),u.trim()&&T(u);return}if(m.includes("tab")&&z==="Tab"&&u.trim()){H.preventDefault(),T(u);return}if(m.includes("space")&&z===" "&&u.trim()){H.preventDefault(),T(u);return}if(z==="Backspace"&&!u&&b.length>0){H.preventDefault(),j(b.length-1);return}},[T,j,u,b,m,f,p]),W=h.useCallback(()=>{var H;S(!0),(H=e.onFocus)==null||H.call(e)},[e.onFocus]),A=h.useCallback(()=>{var H;S(!1),u.trim()&&T(u),(H=e.onBlur)==null||H.call(e)},[T,u,e.onBlur]);return{inputValue:u,setInputValue:y,tags:b,setTags:x,isFocused:C,setIsFocused:S,isHovered:w,setIsHovered:v,addTag:T,removeTag:j,handleInputChange:E,handleKeyDown:D,handleFocus:W,handleBlur:A,validateTag:I}},tf=({tag:e,onRemove:o,isRemovable:t,size:n,views:a,isDisabled:l,isReadOnly:c})=>{const[s,d]=h.useState(!1),g={xs:{padding:"2px 8px",fontSize:"10px",iconSize:10},sm:{padding:"4px 10px",fontSize:"12px",iconSize:12},md:{padding:"6px 14px",fontSize:"14px",iconSize:14},lg:{padding:"8px 16px",fontSize:"16px",iconSize:16},xl:{padding:"10px 18px",fontSize:"18px",iconSize:18}}[n]||{padding:"6px 14px",fontSize:"14px",iconSize:14};return r.jsxs(i.Horizontal,{alignItems:"center",gap:6,padding:g.padding,backgroundColor:"theme-primary-100",borderRadius:"9999px",borderWidth:"1px",borderStyle:"solid",borderColor:"theme-primary-250",transition:"all 0.15s ease-in-out",opacity:l?.6:1,maxWidth:"100%",minWidth:0,_hover:!l&&!c?{backgroundColor:"theme-primary-180",borderColor:"theme-primary-400"}:{},...a==null?void 0:a.tag,children:[r.jsx(i.Text,{fontSize:g.fontSize,color:l?"color-gray-400":"theme-primary",maxLines:1,minWidth:0,...a==null?void 0:a.tagText,children:e}),t&&!l&&!c&&r.jsx(i.View,{cursor:"pointer",padding:"2px",borderRadius:"50%",transition:"all 0.15s ease-in-out",backgroundColor:s?"color-red-100":"transparent",opacity:s?1:.7,onMouseEnter:()=>d(!0),onMouseLeave:()=>d(!1),onClick:m=>{m.stopPropagation(),o()},_hover:{backgroundColor:"color-red-100"},...a==null?void 0:a.tagRemove,children:r.jsx(He,{widthHeight:g.iconSize,color:s?"color-red-500":"color-gray-400"})})]})},gl=({id:e,name:o,label:t,placeholder:n="Type and press Enter to add tags...",helperText:a,error:l=!1,inputValue:c="",tags:s=[],left:d,right:g,shadow:m={},views:f={},size:p="md",shape:u="default",variant:y="default",isDisabled:k=!1,isReadOnly:x=!1,isAutoFocus:C=!1,isRemovable:S=!0,isFocused:w=!1,isHovered:v=!1,maxTags:b,handleInputChange:I,handleKeyDown:T,handleFocus:j,handleBlur:E,removeTag:D,setIsHovered:W,onClick:A,setInputValue:H,setIsFocused:z,addTag:P,defaultTags:V,onTagsChange:M,onTagAdd:L,onTagRemove:_,minTagLength:O,maxTagLength:N,allowDuplicates:U,separators:X,menuItems:oe,onMenuItemSelect:B,onFocus:$,onBlur:q,validateTag:J,...Y})=>{const{getColor:Z,themeMode:ee}=i.useTheme(),ne=!!(t&&(w||s.length>0||c)),K=b&&s.length>=b,re={border:"none",outline:"none",backgroundColor:"transparent",fontSize:i.Typography.fontSizes[p],color:k?"color-gray-400":"color-gray-800",flex:1,minWidth:"120px",transition:"all 0.2s ease-in-out",...f==null?void 0:f.input};return r.jsx(Ue,{error:!!l,helperText:typeof l=="string"?l:a,views:f,...Y,children:r.jsxs(oo,{label:t,shadow:m,value:s.length>0||c?"has-content":"",size:p,shape:u,variant:y,error:!!l,showLabel:ne,isFocused:w,isHovered:v,isDisabled:k,isReadOnly:x,views:{...f,container:{...f==null?void 0:f.container,...f==null?void 0:f.inputContainer}},onClick:A,onMouseEnter:()=>W==null?void 0:W(!0),onMouseLeave:()=>W==null?void 0:W(!1),children:[d,r.jsxs(Ho,{children:[t&&r.jsx(ho,{size:p,error:!!l,views:f,children:t}),r.jsxs(i.Horizontal,{alignItems:"center",gap:8,flexWrap:"wrap",width:"100%",minHeight:i.Typography.fontSizes[p],padding:"0",...f==null?void 0:f.tagsContainer,children:[s.map((ie,ge)=>r.jsx(tf,{tag:ie.value,onRemove:()=>D==null?void 0:D(ge),isRemovable:S,size:p,views:f,isDisabled:k,isReadOnly:x},ie.id)),!K&&r.jsx(i.Input,{id:e,name:o,type:"text",value:c,placeholder:s.length===0?n:"",disabled:k,readOnly:x,autoFocus:C,onChange:I,onKeyDown:T,onFocus:j,onBlur:E,autoComplete:"off",...re}),K&&r.jsxs(i.Text,{fontSize:i.Typography.fontSizes[p],color:"color-gray-500",fontStyle:"italic",...f==null?void 0:f.placeholder,children:["Maximum ",b," tags reached"]})]})]}),g]})})},nf=e=>{const o=dl(e),{tags:t,...n}=e,{setTags:a,...l}=o;return r.jsx(gl,{...l,...n})};function af(e){const o=setTimeout(e,0),t=setTimeout(e,10),n=setTimeout(e,50);return[o,t,n]}const hl=({value:e,defaultValue:o="",length:t=6,onChange:n,onChangeText:a,onComplete:l,onKeyDown:c,onKeyPress:s,onBlur:d,onFocus:g,isReadOnly:m,isDisabled:f,pattern:p,stepValues:u,pasteTransformer:y})=>{var oe,B;const k=e!==void 0,x=k?e:o,[C,S]=h.useState(String(x??"").slice(0,t)||""),[w,v]=h.useState(!1),[b,I]=h.useState(!1),[T,j]=h.useState(null),[E,D]=h.useState(null),W=h.useRef(null),A=h.useRef(null),H=h.useRef({value:C,onChange:n||(()=>{}),isIOS:typeof window<"u"&&((B=(oe=window==null?void 0:window.CSS)==null?void 0:oe.supports)==null?void 0:B.call(oe,"-webkit-touch-callout","none"))}),z=h.useRef({prev:[null,null,"none"]}),P=p?typeof p=="string"?new RegExp(p):p:null;h.useEffect(()=>{if(k&&e!==C){const $=String(e??"").slice(0,t)||"";S($)}},[k,e,t,C]);const V=h.useCallback($=>{let q=$;if(u&&u.length>0&&$){const J=parseInt($,10);if(!isNaN(J)){let Y=u[0],Z=Math.abs(J-Y);for(let ee=1;ee<u.length;ee++){const ne=Math.abs(J-u[ee]);ne<Z&&(Z=ne,Y=u[ee])}q=Y.toString()}}S(q),n&&n(q),a&&a(q),l&&q.length===t&&l(q)},[n,a,l,t,u,k]),M=h.useCallback($=>{$&&W.current!==$&&Object.defineProperty(W,"current",{value:$,writable:!0})},[]),L=h.useCallback($=>{var Y,Z,ee,ne;const q=typeof $=="string"?$:((Y=$==null?void 0:$.currentTarget)==null?void 0:Y.value)??((Z=$==null?void 0:$.target)==null?void 0:Z.value)??((ee=$==null?void 0:$.nativeEvent)==null?void 0:ee.text)??"",J=String(q).slice(0,t);if(J.length>0&&P&&!P.test(J)){(ne=$==null?void 0:$.preventDefault)==null||ne.call($);return}V(J),W.current&&(W.current.value=J)},[t,P,V,W]),_=h.useCallback(()=>{const $=W.current;if($&&typeof $.setSelectionRange=="function"){const q=typeof $.value=="string"?$.value.length:0,J=Math.min(q,t-1),Y=q;$.setSelectionRange(J,Y),j(J),D(Y)}v(!0),g&&g()},[t,g]),O=h.useCallback($=>{v(!1),d&&d($)},[d]),N=h.useCallback($=>{c&&c($)},[]),U=h.useCallback($=>{s&&s($)},[]),X=h.useCallback($=>{const q=W.current;if(!$.clipboardData||!q)return;const J=$.clipboardData.getData("text/plain"),Y=y?y(J):J;$.preventDefault();const Z=q.selectionStart||0,ee=q.selectionEnd||0,re=(Z!==ee?C.slice(0,Z)+Y+C.slice(ee):C.slice(0,Z)+Y+C.slice(Z)).slice(0,t);if(re.length>0&&P&&!P.test(re))return;q.value=re,V(re),S(re);const ie=Math.min(re.length,t-1),ge=re.length;q.setSelectionRange(ie,ge),j(ie),D(ge)},[t,y,P,V,C,S]);return h.useEffect(()=>{const $=W.current,q=A.current;if(!$||!q||typeof document>"u")return;H.current.value!==$.value&&H.current.onChange&&H.current.onChange($.value),z.current.prev=[$.selectionStart,$.selectionEnd,$.selectionDirection];function J(){if(document.activeElement!==$){j(null),D(null);return}const K=($==null?void 0:$.selectionStart)??null,re=($==null?void 0:$.selectionEnd)??null,ie=($==null?void 0:$.selectionDirection)??null,ge=($==null?void 0:$.maxLength)??0,We=($==null?void 0:$.value)??"",le=z.current.prev;let te=-1,ae=-1,ce="none";if(We.length!==0&&K!==null&&re!==null){const be=K===re,Ie=K===We.length&&We.length<ge;if(be&&!Ie){const ve=K;if(ve===0)te=0,ae=1,ce="forward";else if(ve===ge)te=ve-1,ae=ve,ce="backward";else if(ge>1&&We.length>1){let Je=0;if(le[0]!==null&&le[1]!==null){ce=ve<le[1]?"backward":"forward";const co=le[0]===le[1]&&le[0]<ge;ce==="backward"&&!co&&(Je=-1)}te=Je+ve,ae=Je+ve+1}}te!==-1&&ae!==-1&&te!==ae&&W.current&&W.current.setSelectionRange(te,ae,ce)}const ye=te!==-1?te:K,Q=ae!==-1?ae:re,R=ce!=="none"?ce:ie;j(ye),D(Q),z.current.prev=[ye,Q,R]}document.addEventListener("selectionchange",J,{capture:!0}),J(),document.activeElement===$&&v(!0);const Y=q,Z=()=>{var K;Y&&typeof((K=Y.style)==null?void 0:K.setProperty)=="function"&&Y.style.setProperty("--root-height",`${$.clientHeight}px`)};Z();const ee=typeof window<"u"?window.ResizeObserver:void 0,ne=typeof ee=="function"?new ee(Z):null;return ne==null||ne.observe($),()=>{document.removeEventListener("selectionchange",J,{capture:!0}),ne==null||ne.disconnect()}},[]),h.useEffect(()=>{if(typeof Event>"u")return;const $=af(()=>{var ee,ne,K;const q=W.current;q&&typeof q.dispatchEvent=="function"&&q.dispatchEvent(new Event("input"));const J=(ee=W.current)==null?void 0:ee.selectionStart,Y=(ne=W.current)==null?void 0:ne.selectionEnd,Z=(K=W.current)==null?void 0:K.selectionDirection;J!==null&&Y!==null&&J!==void 0&&Y!==void 0&&(j(J),D(Y),z.current.prev=[J,Y,Z||"none"])});return()=>$.forEach(clearTimeout)},[C,w]),{value:C,setValue:V,isFocused:w,setIsFocused:v,isHovered:b,setIsHovered:I,inputRef:W,containerRef:A,mirrorSelectionStart:T,mirrorSelectionEnd:E,setMirrorSelectionStart:j,setMirrorSelectionEnd:D,setInputRef:M,handleChange:L,handleFocus:_,handleBlur:O,handleKeyDown:N,handleKeyPress:U,handlePaste:X}},lf=h.createContext({slots:[],isFocused:!1,isHovering:!1}),cf=`
7
7
  @keyframes blink {
8
8
  0%, 100% { opacity: 1; }
9
9
  50% { opacity: 0; }
@@ -20,10 +20,10 @@
20
20
  border-radius: 4px !important;
21
21
  width: 100% !important;
22
22
  }
23
- `;function Po(e,o){try{e.insertRule(o)}catch{console.error("input-otp could not insert CSS rule:",o)}}const fl=({id:e,name:o,label:t,value:n="",length:a=6,onChange:l,onChangeText:c,onComplete:s,helperText:d,placeholder:g="",shadow:m,views:f={},size:p="md",shape:u="rounded",variant:y="outline",gap:k=8,type:x="text",error:C=!1,isFocused:S=!1,isHovered:w=!1,isDisabled:v=!1,isReadOnly:b=!1,isAutoFocus:I=!1,setValue:T,setIsFocused:P,setIsHovered:E,inputRef:D,containerRef:z,mirrorSelectionStart:A,mirrorSelectionEnd:W,setMirrorSelectionStart:H,setMirrorSelectionEnd:V,handlePaste:j,handleChange:M,handleFocus:L,handleBlur:_,handleKeyDown:O,handleKeyPress:N,secureTextEntry:U,stepValues:X,setInputRef:oe,onBlur:B=()=>{},onClick:$=()=>{},onFocus:q=()=>{},onKeyPress:J,pattern:Y,pasteTransformer:Z,...ee})=>{i.useTheme();const ne=h.useId(),K=e??o??ne,re=!!t,ie=h.useMemo(()=>({slots:Array.from({length:a}).map((le,te)=>{const ae=S&&A!==null&&W!==null&&(A===W&&te===A||te>=A&&te<W),ce=n[te]!==void 0?n[te]:null,ye=n[0]!==void 0?null:(g==null?void 0:g[te])??null;return{char:ce,placeholderChar:ye,isActive:ae,hasFakeCaret:ae&&ce===null}}),isFocused:S,isHovering:!v&&w}),[S,w,v,a,W,A,g,n]);h.useEffect(()=>{I&&D.current&&D.current.focus()},[I,D]),h.useEffect(()=>{if(!document.getElementById("input-otp-style")){const le=document.createElement("style");if(le.id="input-otp-style",document.head.appendChild(le),le.sheet){const te="background: transparent !important; color: transparent !important; border-color: transparent !important; opacity: 0 !important; box-shadow: none !important; -webkit-box-shadow: none !important; -webkit-text-fill-color: transparent !important;";Po(le.sheet,"@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: 0; } }"),Po(le.sheet,"[data-input-otp]::selection { background: transparent !important; color: transparent !important; }"),Po(le.sheet,`[data-input-otp]:autofill { ${te} }`),Po(le.sheet,`[data-input-otp]:-webkit-autofill { ${te} }`),Po(le.sheet,"@supports (-webkit-touch-callout: none) { [data-input-otp] { letter-spacing: -.6em !important; font-weight: 100 !important; font-stretch: ultra-condensed; font-optical-sizing: none !important; left: -1px !important; right: 1px !important; } }"),Po(le.sheet,"[data-input-otp] + * { pointer-events: all !important; }")}}},[]);const ge=()=>r.jsx(i.Horizontal,{gap:k,width:"100%",justifyContent:"center",minHeight:p==="xs"?"32px":p==="sm"?"36px":p==="md"?"40px":p==="lg"?"48px":"56px",...f.container,children:ie.slots.map((le,te)=>r.jsxs(oo,{size:p,error:C,shape:u,views:f,variant:y,value:le.char||"",color:"theme-primary",isHovered:w,isDisabled:v,isReadOnly:b,isFocused:le.isActive,showLabel:!1,onMouseEnter:()=>E(!0),onMouseLeave:()=>E(!1),justifyContent:"center",alignItems:"center",width:"100%",position:"relative",height:p==="xs"?"32px":p==="sm"?"36px":p==="md"?"40px":p==="lg"?"48px":"56px",...f.container,children:[le.char?r.jsx(i.View,{textAlign:"center",fontSize:p==="xs"?"14px":p==="sm"?"16px":p==="md"?"18px":p==="lg"?"20px":"24px",fontWeight:"medium",...f.text,children:x==="password"?"•":le.char}):le.placeholderChar?r.jsx(i.View,{textAlign:"center",fontSize:p==="xs"?"14px":p==="sm"?"16px":p==="md"?"18px":p==="lg"?"20px":"24px",color:"color-gray-400",opacity:.5,...f.text,children:le.placeholderChar}):null,le.hasFakeCaret&&r.jsx(i.View,{position:"absolute",width:"2px",height:"60%",backgroundColor:"theme-primary",animation:"blink 1s step-start infinite",style:{animationName:"blink",animationDuration:"1s",animationIterationCount:"infinite",animationTimingFunction:"step-start"}})]},`${e||o}-${te}`))}),We={position:"absolute",inset:0,width:"100%",height:"100%",display:"flex",textAlign:"center",opacity:"1",color:"transparent",pointerEvents:"all",background:"transparent",caretColor:"transparent",border:"0 solid transparent",outline:"0 solid transparent",boxShadow:"none",letterSpacing:"-.5em",fontSize:"var(--root-height)",fontFamily:"monospace",fontVariantNumeric:"tabular-nums"};return r.jsxs(r.Fragment,{children:[r.jsx("noscript",{children:r.jsx("style",{children:cf})}),r.jsxs(Ue,{helperText:d,error:C,views:f,children:[re&&r.jsx(ho,{htmlFor:K,color:"theme-primary",error:C,...f.label,children:t}),r.jsxs(i.View,{ref:z,"data-input-otp-container":!0,position:"relative",cursor:v?"default":"text",userSelect:"none",pointerEvents:"none",children:[r.jsx(lf.Provider,{value:ie,children:ge()}),r.jsx(i.View,{position:"absolute",inset:0,pointerEvents:"none",children:r.jsx(i.Input,{ref:le=>oe(le),"data-input-otp":!0,"data-input-otp-placeholder-shown":n.length===0||void 0,"data-input-otp-mss":A,"data-input-otp-mse":W,id:K,name:o,type:x==="password"?"password":"text",inputMode:x!=="password"?"numeric":void 0,pattern:"[0-9]*",maxLength:a,readOnly:b,disabled:v,placeholder:g,value:n,onChange:M,onKeyDown:O,onPaste:j,onFocus:L,onBlur:_,onClick:$,onMouseOver:()=>E(!0),onMouseLeave:()=>E(!1),autoComplete:"one-time-code","aria-label":re?void 0:`OTP input with ${a} digits`,style:We,...ee,...f.input})})]})]})]})},sf=e=>{if(e==null)return"";if(typeof e=="string"||typeof e=="number"){const o=String(e);return o==="[object Object]"?"":o}return""},ml=e=>{const{value:o}=e,{value:t,setValue:n,isFocused:a,setIsFocused:l,isHovered:c,setIsHovered:s,inputRef:d,containerRef:g,mirrorSelectionStart:m,mirrorSelectionEnd:f,setMirrorSelectionStart:p,setMirrorSelectionEnd:u,setInputRef:y,handleChange:k,handleFocus:x,handleBlur:C,handleKeyDown:S,handlePaste:w,handleKeyPress:v}=hl(e),I=sf(o!==void 0?o:t);return r.jsx(fl,{...e,value:I,setValue:n,isFocused:a,setIsFocused:l,isHovered:c,setIsHovered:s,inputRef:d,containerRef:g,mirrorSelectionStart:m,mirrorSelectionEnd:f,setMirrorSelectionStart:p,setMirrorSelectionEnd:u,setInputRef:y,handleChange:k,handleFocus:x,handleBlur:C,handleKeyDown:S,handleKeyPress:v,handlePaste:w,stepValues:e.stepValues})},pl=h.createContext({active:!1,focusNextInput:()=>{},setInputRef:()=>{},handleSubmitEditing:()=>{},getReturnKeyType:()=>"next"}),df=()=>h.useContext(pl),gf=({children:e,autoFocus:o=!1,initFocus:t,onChange:n=()=>{},...a})=>{const l=Ee.useFormikContext();h.useEffect(()=>{n(l.values)},[l.values]);const c=h.useRef({}),s=h.useRef([]),d=(u,y)=>{c.current[u]=y,y&&!s.current.includes(u)&&s.current.push(u)},g=u=>{var y,k;if(o){const C=s.current.indexOf(u)+1;C<s.current.length?(y=c.current[s.current[C]])==null||y.focus():(k=l.submitForm)==null||k.call(l)}},m={active:o,focusNextInput:g,setInputRef:d,handleSubmitEditing:g,getReturnKeyType:u=>s.current.indexOf(u)===s.current.length-1?"done":"next"};h.useEffect(()=>{var u,y;o&&(t&&c.current[t]?(u=c.current[t])==null||u.focus():s.current[0]&&((y=c.current[s.current[0]])==null||y.focus()))},[o,t]);const p=typeof document<"u"&&typeof document.createElement=="function"?{onSubmit:l.handleSubmit,onReset:l.handleReset}:{};return r.jsx(pl.Provider,{value:m,children:r.jsx(i.Form,{...a,...p,children:e})})},hf=e=>{switch(e){case"email":return{autoCorrect:"off",inputMode:"email",autoCapitalize:"none"};case"password":return{autoCorrect:"off",secureTextEntry:!0,autoCapitalize:"none"};case"digits":return{inputMode:"tel"};case"numeric":return{inputMode:"numeric"};case"name":return{autoCorrect:"off"};default:return{}}},xe=({name:e,type:o,...t},n={})=>{const a=df(),{touched:l,errors:c,submitCount:s,values:d,setFieldTouched:g,setFieldValue:m}=Ee.useFormikContext(),f=b=>{var I;m(e,b),(I=t.onChangeText)==null||I.call(t,b)},p=b=>{var I;m(e,b),(I=t.onChange)==null||I.call(t,b)},u=()=>{g(e,!0)},y=b=>{b.key==="Enter"&&(b.preventDefault(),a.focusNextInput(e))},k=["text","password","email","digits"].includes(o),x=Ee.getIn(l,e)||s>0?Ee.getIn(c,e):void 0,C=Ee.getIn(d,e),S=typeof document<"u"&&typeof document.createElement=="function",w=!!n.focusable&&a.active,v=w?S?{onKeyPress:y}:{returnKeyType:a.getReturnKeyType(e),onSubmitEditing:()=>a.handleSubmitEditing(e),blurOnSubmit:!1}:{};return{...hf(o),...t,value:C,error:x,onBlur:u,...k?{onChangeText:f}:{onChange:p},...v,...w?{inputRef:b=>a.setInputRef(e,b)}:{}}},ff=e=>{let{value:o,...t}=xe(e);t.isChecked=o;const n=La(e);return r.jsx(Ba,{...n,...t})},mf=e=>{let{value:o,...t}=xe(e);t.isChecked=o===e.value;const n=Oa(e);return r.jsx(Na,{...n,...t})},ul=e=>{const{value:o,onChange:t,onSubmit:n,autoFocus:a=!0,loading:l=!1,disabled:c=!1,isAgentRunning:s=!1,onStopAgent:d,sandboxId:g,onUploadProgress:m,onUploadSuccess:f,onUploadError:p,onFileUpload:u}=e,y=o!==void 0&&t!==void 0,[k,x]=h.useState(""),C=y?o:k,[S,w]=h.useState([]),[v,b]=h.useState([]),[I,T]=h.useState(!1),[P,E]=h.useState(0),[D,z]=h.useState([]),[A,W]=h.useState(!1),H=h.useRef(null),[V,j]=h.useState(!1),[M,L]=h.useState("gpt-4"),[_]=h.useState([{id:"gpt-3.5-turbo",name:"GPT-3.5"},{id:"gpt-4",name:"GPT-4"},{id:"gpt-4-thinking",name:"GPT-4 (Thinking)",isThinking:!0},{id:"claude-3-5-sonnet",name:"Claude 3.5 Sonnet"}]),O=h.useRef(null),N=h.useRef(null),U=h.useRef(null),[X,oe]=h.useState(e.showGuideTip||!1);h.useEffect(()=>{a&&O.current&&O.current.focus()},[a]),h.useEffect(()=>()=>{S.forEach(te=>{})},[S]);const B=te=>{y&&t?t(te):x(te)},$=te=>{const ae=U.current;if(ae&&typeof Event<"u"){ae.value=te,ae.dispatchEvent(new Event("input",{bubbles:!0}));return}B(te)},q=te=>{if(te.preventDefault(),!C.trim()&&S.length===0||l||c&&!s)return;if(s&&d){d();return}let ae=C;if(S.length>0){const Q=S.map(R=>`[Uploaded File: ${URL.createObjectURL(R)}}]`).join(`
23
+ `;function Po(e,o){try{e.insertRule(o)}catch{console.error("input-otp could not insert CSS rule:",o)}}const fl=({id:e,name:o,label:t,value:n="",length:a=6,onChange:l,onChangeText:c,onComplete:s,helperText:d,placeholder:g="",shadow:m,views:f={},size:p="md",shape:u="rounded",variant:y="outline",gap:k=8,type:x="text",error:C=!1,isFocused:S=!1,isHovered:w=!1,isDisabled:v=!1,isReadOnly:b=!1,isAutoFocus:I=!1,setValue:T,setIsFocused:j,setIsHovered:E,inputRef:D,containerRef:W,mirrorSelectionStart:A,mirrorSelectionEnd:H,setMirrorSelectionStart:z,setMirrorSelectionEnd:P,handlePaste:V,handleChange:M,handleFocus:L,handleBlur:_,handleKeyDown:O,handleKeyPress:N,secureTextEntry:U,stepValues:X,setInputRef:oe,onBlur:B=()=>{},onClick:$=()=>{},onFocus:q=()=>{},onKeyPress:J,pattern:Y,pasteTransformer:Z,...ee})=>{i.useTheme();const ne=h.useId(),K=e??o??ne,re=!!t,ie=h.useMemo(()=>({slots:Array.from({length:a}).map((le,te)=>{const ae=S&&A!==null&&H!==null&&(A===H&&te===A||te>=A&&te<H),ce=n[te]!==void 0?n[te]:null,ye=n[0]!==void 0?null:(g==null?void 0:g[te])??null;return{char:ce,placeholderChar:ye,isActive:ae,hasFakeCaret:ae&&ce===null}}),isFocused:S,isHovering:!v&&w}),[S,w,v,a,H,A,g,n]);h.useEffect(()=>{I&&D.current&&D.current.focus()},[I,D]),h.useEffect(()=>{if(!document.getElementById("input-otp-style")){const le=document.createElement("style");if(le.id="input-otp-style",document.head.appendChild(le),le.sheet){const te="background: transparent !important; color: transparent !important; border-color: transparent !important; opacity: 0 !important; box-shadow: none !important; -webkit-box-shadow: none !important; -webkit-text-fill-color: transparent !important;";Po(le.sheet,"@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: 0; } }"),Po(le.sheet,"[data-input-otp]::selection { background: transparent !important; color: transparent !important; }"),Po(le.sheet,`[data-input-otp]:autofill { ${te} }`),Po(le.sheet,`[data-input-otp]:-webkit-autofill { ${te} }`),Po(le.sheet,"@supports (-webkit-touch-callout: none) { [data-input-otp] { letter-spacing: -.6em !important; font-weight: 100 !important; font-stretch: ultra-condensed; font-optical-sizing: none !important; left: -1px !important; right: 1px !important; } }"),Po(le.sheet,"[data-input-otp] + * { pointer-events: all !important; }")}}},[]);const ge=()=>r.jsx(i.Horizontal,{gap:k,width:"100%",justifyContent:"center",minHeight:p==="xs"?"32px":p==="sm"?"36px":p==="md"?"40px":p==="lg"?"48px":"56px",...f.container,children:ie.slots.map((le,te)=>r.jsxs(oo,{size:p,error:C,shape:u,views:f,variant:y,value:le.char||"",color:"theme-primary",isHovered:w,isDisabled:v,isReadOnly:b,isFocused:le.isActive,showLabel:!1,onMouseEnter:()=>E(!0),onMouseLeave:()=>E(!1),justifyContent:"center",alignItems:"center",width:"100%",position:"relative",height:p==="xs"?"32px":p==="sm"?"36px":p==="md"?"40px":p==="lg"?"48px":"56px",...f.container,children:[le.char?r.jsx(i.View,{textAlign:"center",fontSize:p==="xs"?"14px":p==="sm"?"16px":p==="md"?"18px":p==="lg"?"20px":"24px",fontWeight:"medium",...f.text,children:x==="password"?"•":le.char}):le.placeholderChar?r.jsx(i.View,{textAlign:"center",fontSize:p==="xs"?"14px":p==="sm"?"16px":p==="md"?"18px":p==="lg"?"20px":"24px",color:"color-gray-400",opacity:.5,...f.text,children:le.placeholderChar}):null,le.hasFakeCaret&&r.jsx(i.View,{position:"absolute",width:"2px",height:"60%",backgroundColor:"theme-primary",animation:"blink 1s step-start infinite",style:{animationName:"blink",animationDuration:"1s",animationIterationCount:"infinite",animationTimingFunction:"step-start"}})]},`${e||o}-${te}`))}),We={position:"absolute",inset:0,width:"100%",height:"100%",display:"flex",textAlign:"center",opacity:"1",color:"transparent",pointerEvents:"all",background:"transparent",caretColor:"transparent",border:"0 solid transparent",outline:"0 solid transparent",boxShadow:"none",letterSpacing:"-.5em",fontSize:"var(--root-height)",fontFamily:"monospace",fontVariantNumeric:"tabular-nums"};return r.jsxs(r.Fragment,{children:[r.jsx("noscript",{children:r.jsx("style",{children:cf})}),r.jsxs(Ue,{helperText:d,error:C,views:f,children:[re&&r.jsx(ho,{htmlFor:K,color:"theme-primary",error:C,...f.label,children:t}),r.jsxs(i.View,{ref:W,"data-input-otp-container":!0,position:"relative",cursor:v?"default":"text",userSelect:"none",pointerEvents:"none",children:[r.jsx(lf.Provider,{value:ie,children:ge()}),r.jsx(i.View,{position:"absolute",inset:0,pointerEvents:"none",children:r.jsx(i.Input,{ref:le=>oe(le),"data-input-otp":!0,"data-input-otp-placeholder-shown":n.length===0||void 0,"data-input-otp-mss":A,"data-input-otp-mse":H,id:K,name:o,type:x==="password"?"password":"text",inputMode:x!=="password"?"numeric":void 0,pattern:"[0-9]*",maxLength:a,readOnly:b,disabled:v,placeholder:g,value:n,onChange:M,onKeyDown:O,onPaste:V,onFocus:L,onBlur:_,onClick:$,onMouseOver:()=>E(!0),onMouseLeave:()=>E(!1),autoComplete:"one-time-code","aria-label":re?void 0:`OTP input with ${a} digits`,style:We,...ee,...f.input})})]})]})]})},sf=e=>{if(e==null)return"";if(typeof e=="string"||typeof e=="number"){const o=String(e);return o==="[object Object]"?"":o}return""},ml=e=>{const{value:o}=e,{value:t,setValue:n,isFocused:a,setIsFocused:l,isHovered:c,setIsHovered:s,inputRef:d,containerRef:g,mirrorSelectionStart:m,mirrorSelectionEnd:f,setMirrorSelectionStart:p,setMirrorSelectionEnd:u,setInputRef:y,handleChange:k,handleFocus:x,handleBlur:C,handleKeyDown:S,handlePaste:w,handleKeyPress:v}=hl(e),I=sf(o!==void 0?o:t);return r.jsx(fl,{...e,value:I,setValue:n,isFocused:a,setIsFocused:l,isHovered:c,setIsHovered:s,inputRef:d,containerRef:g,mirrorSelectionStart:m,mirrorSelectionEnd:f,setMirrorSelectionStart:p,setMirrorSelectionEnd:u,setInputRef:y,handleChange:k,handleFocus:x,handleBlur:C,handleKeyDown:S,handleKeyPress:v,handlePaste:w,stepValues:e.stepValues})},pl=h.createContext({active:!1,focusNextInput:()=>{},setInputRef:()=>{},handleSubmitEditing:()=>{},getReturnKeyType:()=>"next"}),df=()=>h.useContext(pl),gf=({children:e,autoFocus:o=!1,initFocus:t,onChange:n=()=>{},...a})=>{const l=Ee.useFormikContext();h.useEffect(()=>{n(l.values)},[l.values]);const c=h.useRef({}),s=h.useRef([]),d=(u,y)=>{c.current[u]=y,y&&!s.current.includes(u)&&s.current.push(u)},g=u=>{var y,k;if(o){const C=s.current.indexOf(u)+1;C<s.current.length?(y=c.current[s.current[C]])==null||y.focus():(k=l.submitForm)==null||k.call(l)}},m={active:o,focusNextInput:g,setInputRef:d,handleSubmitEditing:g,getReturnKeyType:u=>s.current.indexOf(u)===s.current.length-1?"done":"next"};h.useEffect(()=>{var u,y;o&&(t&&c.current[t]?(u=c.current[t])==null||u.focus():s.current[0]&&((y=c.current[s.current[0]])==null||y.focus()))},[o,t]);const p=typeof document<"u"&&typeof document.createElement=="function"?{onSubmit:l.handleSubmit,onReset:l.handleReset}:{};return r.jsx(pl.Provider,{value:m,children:r.jsx(i.Form,{...a,...p,children:e})})},hf=e=>{switch(e){case"email":return{autoCorrect:"off",inputMode:"email",autoCapitalize:"none"};case"password":return{autoCorrect:"off",secureTextEntry:!0,autoCapitalize:"none"};case"digits":return{inputMode:"tel"};case"numeric":return{inputMode:"numeric"};case"name":return{autoCorrect:"off"};default:return{}}},xe=({name:e,type:o,...t},n={})=>{const a=df(),{touched:l,errors:c,submitCount:s,values:d,setFieldTouched:g,setFieldValue:m}=Ee.useFormikContext(),f=b=>{var I;m(e,b),(I=t.onChangeText)==null||I.call(t,b)},p=b=>{var I;m(e,b),(I=t.onChange)==null||I.call(t,b)},u=()=>{g(e,!0)},y=b=>{b.key==="Enter"&&(b.preventDefault(),a.focusNextInput(e))},k=["text","password","email","digits"].includes(o),x=Ee.getIn(l,e)||s>0?Ee.getIn(c,e):void 0,C=Ee.getIn(d,e),S=typeof document<"u"&&typeof document.createElement=="function",w=!!n.focusable&&a.active,v=w?S?{onKeyPress:y}:{returnKeyType:a.getReturnKeyType(e),onSubmitEditing:()=>a.handleSubmitEditing(e),blurOnSubmit:!1}:{};return{...hf(o),...t,value:C,error:x,onBlur:u,...k?{onChangeText:f}:{onChange:p},...v,...w?{inputRef:b=>a.setInputRef(e,b)}:{}}},ff=e=>{let{value:o,...t}=xe(e);t.isChecked=o;const n=La(e);return r.jsx(Ba,{...n,...t})},mf=e=>{let{value:o,...t}=xe(e);t.isChecked=o===e.value;const n=Oa(e);return r.jsx(Na,{...n,...t})},ul=e=>{const{value:o,onChange:t,onSubmit:n,autoFocus:a=!0,loading:l=!1,disabled:c=!1,isAgentRunning:s=!1,onStopAgent:d,sandboxId:g,onUploadProgress:m,onUploadSuccess:f,onUploadError:p,onFileUpload:u}=e,y=o!==void 0&&t!==void 0,[k,x]=h.useState(""),C=y?o:k,[S,w]=h.useState([]),[v,b]=h.useState([]),[I,T]=h.useState(!1),[j,E]=h.useState(0),[D,W]=h.useState([]),[A,H]=h.useState(!1),z=h.useRef(null),[P,V]=h.useState(!1),[M,L]=h.useState("gpt-4"),[_]=h.useState([{id:"gpt-3.5-turbo",name:"GPT-3.5"},{id:"gpt-4",name:"GPT-4"},{id:"gpt-4-thinking",name:"GPT-4 (Thinking)",isThinking:!0},{id:"claude-3-5-sonnet",name:"Claude 3.5 Sonnet"}]),O=h.useRef(null),N=h.useRef(null),U=h.useRef(null),[X,oe]=h.useState(e.showGuideTip||!1);h.useEffect(()=>{a&&O.current&&O.current.focus()},[a]),h.useEffect(()=>()=>{S.forEach(te=>{})},[S]);const B=te=>{y&&t?t(te):x(te)},$=te=>{const ae=U.current;if(ae&&typeof Event<"u"){ae.value=te,ae.dispatchEvent(new Event("input",{bubbles:!0}));return}B(te)},q=te=>{if(te.preventDefault(),!C.trim()&&S.length===0||l||c&&!s)return;if(s&&d){d();return}let ae=C;if(S.length>0){const Q=S.map(R=>`[Uploaded File: ${URL.createObjectURL(R)}}]`).join(`
24
24
  `);ae=ae?`${ae}
25
25
 
26
- ${Q}`:Q}let ce=M,ye=!1;M.endsWith("-thinking")&&(ce=M.replace(/-thinking$/,""),ye=!0),n==null||n(ae,{model_name:ce,enable_thinking:ye}),y||x(""),w([]),b([])},J=te=>{w(ae=>ae.filter((ce,ye)=>ye!==te)),!g&&v.length>te&&b(ae=>ae.filter((ce,ye)=>ye!==te))},Y=te=>{te.preventDefault(),te.stopPropagation(),j(!0)},Z=te=>{te.preventDefault(),te.stopPropagation(),j(!1)},ee=h.useCallback(te=>{!te||te.length===0||(b(ae=>[...ae,...te]),w(ae=>[...ae,...te]),z(ae=>[...ae,...te]),T(!0))},[b,w]),ne=h.useCallback(()=>{if(D.length>0&&!A&&u){W(!0);const te=D[0];H.current=te,E(0),m==null||m(0);try{u(te),z(ae=>ae.slice(1)),W(!1),H.current=null,E(100),m==null||m(100),f==null||f({file:te})}catch(ae){z(ce=>ce.slice(1)),W(!1),H.current=null,E(0),T(ce=>D.length-1>0||!1),p==null||p(ae)}}else D.length===0&&I&&(T(!1),E(0))},[D,A,u,I,p,m,f]);h.useEffect(()=>{ne()},[D,A,ne]);const K="active",re=te=>!0,ie=()=>{oe(!1),e.onGuideClose&&e.onGuideClose()},ge=te=>{y&&t?t(te.text):x(te.text),e.onPromptExampleSelect&&e.onPromptExampleSelect(te),O.current&&O.current.focus()},We=h.useCallback(()=>v,[v]),le=h.useCallback(()=>b([]),[]);return{onSubmit:n,getPendingFiles:We,clearPendingFiles:le,value:C,handleChange:B,setValue:$,handleSubmit:q,editableRef:O,fileInputRef:N,hiddenInputRef:U,isUploading:I,uploadProgress:P,isDraggingOver:V,uploadedFiles:S,pendingFiles:v,removeUploadedFile:J,setPendingFiles:b,setUploadedFiles:w,setIsUploading:T,startUpload:ee,selectedModel:M,handleModelChange:L,modelOptions:_,subscriptionStatus:K,canAccessModel:re,handleDragOver:Y,handleDragLeave:Z,isGuideTipShown:X,hideGuideTip:ie,handlePromptExampleSelect:ge}},pf={attachmentRemove:{position:"absolute",top:"2px",right:"2px",width:"20px",height:"20px",borderRadius:"50%",backgroundColor:"color-black-900",color:"white",border:"none",cursor:"pointer",display:"flex",alignItems:"center",justifyContent:"center",fontSize:"12px",zIndex:1}},yl={container:{width:"100%",maxWidth:"100%",borderRadius:"12px",backgroundColor:"color-white",transition:"background-color 0.2s ease, box-shadow 0.2s ease"},content:{width:"100%",padding:"12px",borderRadius:"12px",backgroundColor:"color-white",borderWidth:"1px",borderStyle:"solid",borderColor:"color-gray-200",transition:"background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease"}},uf={default:{borderRadius:"8px"},square:{borderRadius:"0px"},rounded:{borderRadius:"8px"}},yf={xs:{fontSize:"10px",padding:"4px 8px"},sm:{fontSize:"12px",padding:"6px 10px"},md:{fontSize:"14px",padding:"8px 12px"},lg:{fontSize:"16px",padding:"10px 14px"},xl:{fontSize:"20px",padding:"12px 16px"}},bf={default:{backgroundColor:"color-white",borderWidth:"1px",borderStyle:"solid",borderColor:"color-gray-200"},outline:{backgroundColor:"transparent",borderWidth:"1px",borderStyle:"solid",borderColor:"color-gray-300"},none:{backgroundColor:"transparent",border:"none"}},bl=e=>`${e}-${Math.random().toString(36).substring(2,9)}`,xf=({openDelay:e=200,closeDelay:o=300}={})=>{const[t,n]=h.useState(!1),a=h.useRef(null),l=h.useRef(null),c=h.useRef(null),s=h.useRef(null),d=h.useMemo(()=>bl("hovercard-content"),[]),g=h.useMemo(()=>bl("hovercard-trigger"),[]),m=h.useCallback(()=>{a.current&&(clearTimeout(a.current),a.current=null),l.current&&(clearTimeout(l.current),l.current=null)},[]),f=h.useCallback(()=>{m(),t||(a.current=setTimeout(()=>{n(!0)},e))},[t,e,m]),p=h.useCallback(()=>{m(),t&&(l.current=setTimeout(()=>{n(!1)},o))},[t,o,m]),u=h.useCallback(()=>{l.current&&(clearTimeout(l.current),l.current=null)},[]);return h.useEffect(()=>()=>m(),[m]),{isOpen:t,openCard:f,closeCard:p,cancelCloseTimer:u,triggerRef:c,contentRef:s,contentId:d,triggerId:g}},xl=h.createContext({isOpen:!1,openCard:()=>{},closeCard:()=>{},cancelCloseTimer:()=>{},triggerRef:{current:null},contentRef:{current:null},contentId:"",triggerId:""}),kf=({children:e,value:o})=>r.jsx(xl.Provider,{value:o,children:e}),kl=()=>{const e=h.useContext(xl);if(!e)throw new Error("useHoverCardContext must be used within a HoverCardProvider");return e},Cf=({children:e,views:o,asChild:t=!1,...n})=>{const{openCard:a,closeCard:l,triggerRef:c,contentId:s,triggerId:d}=kl(),u={ref:c,onMouseEnter:()=>a(),onMouseLeave:()=>l(),onFocus:()=>a(),onBlur:()=>l(),id:d,"aria-describedby":s,...o==null?void 0:o.container,...n};if(t&&h.isValidElement(e)){const y=h.Children.only(e);return h.cloneElement(y,{...u,...y.props})}return r.jsx(i.View,{position:"relative",display:"inline-block",...u,children:e})},wf=({children:e,views:o,side:t="bottom",align:n="center",sideOffset:a=8,style:l,backgroundColor:c="color-white",borderRadius:s="4px",boxShadow:d="0px 2px 8px rgba(0, 0, 0, 0.15)",padding:g="12px",minWidth:m="50px",maxWidth:f="300px",...p})=>{const{isOpen:u,cancelCloseTimer:y,closeCard:k,contentRef:x,triggerRef:C,contentId:S,triggerId:w}=kl(),{ref:v,relation:b}=i.useElementPosition({trackChanges:!0,trackOnHover:!0,trackOnScroll:!0,trackOnResize:!0});h.useEffect(()=>{C!=null&&C.current&&(v==null?void 0:v.current)!==C.current&&v&&(v.current=C.current)},[C,v,u]);const I=()=>y(),T=()=>k();if(!u)return null;const P=()=>{if(!b||!(C!=null&&C.current))return{position:"absolute",top:0,left:0,zIndex:1e3};const z=C.current.getBoundingClientRect();let A=t;t==="bottom"&&b.space.vertical==="top"?A="top":t==="top"&&b.space.vertical==="bottom"?A="bottom":t==="right"&&b.space.horizontal==="left"?A="left":t==="left"&&b.space.horizontal==="right"&&(A="right");let W=0,H=0;switch(A){case"bottom":W=z.left+z.width/2,H=z.bottom+a;break;case"top":W=z.left+z.width/2,H=z.top-a;break;case"right":W=z.right+a,H=z.top+z.height/2;break;case"left":W=z.left-a,H=z.top+z.height/2;break}return{position:"fixed",left:W,top:H,zIndex:1e3,transform:E(A)}},E=z=>{switch(z){case"bottom":return"translate(-50%, 0)";case"top":return"translate(-50%, -100%)";case"right":return"translate(0, -50%)";case"left":return"translate(-100%, -50%)";default:return"translate(-50%, 0)"}},D=P();return r.jsx(i.View,{ref:x,id:S,role:"tooltip","aria-labelledby":w,onMouseEnter:I,onMouseLeave:T,backgroundColor:c,borderRadius:s,boxShadow:d,padding:g,minWidth:m,maxWidth:f,style:{...D,...l},...o==null?void 0:o.container,...p,children:e})},Me=({children:e,views:o,openDelay:t,closeDelay:n,...a})=>{const l=xf({openDelay:t,closeDelay:n});return r.jsx(kf,{value:l,children:r.jsx(i.View,{position:"relative",display:"inline-block",...o==null?void 0:o.container,...a,children:e})})};Me.Trigger=Cf,Me.Content=wf;const Sf=({files:e,sandboxId:o,onRemove:t,layout:n="inline",maxHeight:a="120px",showPreviews:l=!1,views:c={}})=>{if(e.length===0)return null;const s=h.useCallback(g=>g<1024?`${g} B`:g<1024*1024?`${(g/1024).toFixed(1)} KB`:`${(g/(1024*1024)).toFixed(1)} MB`,[]),d=h.useCallback(g=>g.type.startsWith("image/")?{backgroundColor:"#DBEAFE",color:"#2563EB"}:g.type.startsWith("video/")?{backgroundColor:"#EDE9FE",color:"#7C3AED"}:g.type.startsWith("audio/")?{backgroundColor:"#DCFCE7",color:"#16A34A"}:{backgroundColor:"#E2E8F0",color:"#475569"},[]);return r.jsx(i.View,{display:"flex",flexWrap:"wrap",gap:"8px",padding:"8px 0",maxHeight:a,overflowY:"auto",...c==null?void 0:c.container,children:e.map((g,m)=>{const f=(g==null?void 0:g.path)||(g==null?void 0:g.url)||(l?URL.createObjectURL(g):""),p=g.type.startsWith("image/"),u=g.type.startsWith("video/"),y=g.type.startsWith("audio/"),k=d(g);return l?r.jsx(i.Vertical,{alignItems:"center",gap:"6px",padding:"6px 10px",borderRadius:"8px",border:"1px solid #E2E8F0",backgroundColor:"color-white",animate:{from:{opacity:0,scale:.9},to:{opacity:1,scale:1}},animationDuration:.2,...c==null?void 0:c.item,children:l&&r.jsxs(Me,{children:[r.jsxs(Me.Trigger,{children:[p&&r.jsx(i.Image,{src:f,alt:g.name,width:"60px",height:"60px",borderRadius:"8px",objectFit:"cover"}),u&&r.jsx(i.View,{as:"video",src:f,alt:g.name,controls:!1,muted:!0,width:"60px",height:"60px",borderRadius:"8px",objectFit:"cover"}),y&&r.jsx(i.Center,{width:"60px",height:"60px",borderRadius:"8px",backgroundColor:"color-gray-100",children:r.jsx(Fo,{widthHeight:24,color:"color-black"})}),!p&&!u&&!y&&r.jsx(i.Center,{width:"60px",height:"60px",borderRadius:"8px",backgroundColor:"color-gray-100",children:r.jsx(go,{widthHeight:24,color:"color-black"})}),t&&r.jsx(i.Button,{...pf.attachmentRemove,onClick:x=>{x.stopPropagation(),t(m)},"aria-label":`Remove ${g.name}`,children:"×"})]}),r.jsxs(Me.Content,{children:[p&&r.jsx(i.Image,{src:f,alt:g.name,maxWidth:"100%"}),u&&r.jsx(i.View,{as:"video",src:f,controls:!0,maxWidth:"100%"}),y&&r.jsx(i.View,{as:"audio",src:f,controls:!0,width:"100%"}),r.jsxs(i.Text,{marginTop:"4px",maxLines:1,width:"100%",...c==null?void 0:c.name,children:[g.name," (",s(g.size),")"]})]})]})},m):r.jsxs(i.Horizontal,{alignItems:"center",gap:"8px",padding:"6px 10px 6px 8px",borderRadius:"9999px",border:"1px solid #E2E8F0",backgroundColor:"color-white",maxWidth:"100%",animate:{from:{opacity:0,scale:.96},to:{opacity:1,scale:1}},animationDuration:.2,...c==null?void 0:c.item,children:[r.jsx(i.Center,{width:"22px",height:"22px",minWidth:"22px",borderRadius:"9999px",backgroundColor:k.backgroundColor,color:k.color,children:y?r.jsx(Fo,{widthHeight:12,color:"currentColor"}):r.jsx(go,{widthHeight:12,color:"currentColor"})}),r.jsxs(i.Text,{fontSize:"12px",lineHeight:"16px",color:"color-gray-600",maxLines:1,maxWidth:"220px",...c==null?void 0:c.name,children:[g.name," · ",s(g.size)]}),t&&r.jsx(i.View,{as:"button",type:"button",onClick:()=>t(m),"aria-label":`Remove ${g.name}`,display:"flex",alignItems:"center",justifyContent:"center",width:"16px",height:"16px",minWidth:"16px",border:"none",backgroundColor:"transparent",color:"color-gray-400",padding:0,cursor:"pointer",transition:"color 0.2s ease, opacity 0.2s ease",_hover:{color:"color-gray-600"},children:"×"})]},m)})})},Cl=typeof window<"u"?h.useLayoutEffect:h.useEffect,wl=h.forwardRef(({value:e,onChange:o,placeholder:t="Type your message...",disabled:n=!1,autoFocus:a=!0,suggestions:l=[],onSuggestionSelect:c,showSuggestions:s=!1,mentionData:d=[],mentionTrigger:g="@",onMentionSelect:m,onKeyDown:f,maxHeight:p="200px",minHeight:u="40px",name:y,id:k,hiddenInput:x=!0,hiddenInputRef:C,views:S={}},w)=>{var ce,ye;const v=h.useRef(e),[b,I]=h.useState(-1),[T,P]=h.useState(!e),E=h.useRef(null),[D,z]=h.useState(!1),[A,W]=h.useState(!1),[H,V]=h.useState(""),[j,M]=h.useState(-1),[L,_]=h.useState(-1),[O,N]=h.useState([]),{ref:U,relation:X}=i.useElementPosition({trackChanges:!0,trackOnHover:!0,trackOnScroll:!0,trackOnResize:!0}),[oe,B]=h.useState({x:0,y:0}),[$,q]=h.useState({x:0,y:0}),J=h.useRef(null),Y=h.useCallback(Q=>{J.current=Q,typeof C=="function"?C(Q):C&&(C.current=Q)},[C]),Z=h.useCallback(Q=>{J.current&&J.current.value!==Q&&(J.current.value=Q)},[]);Cl(()=>{const Q=w;Q!=null&&Q.current&&e!==v.current&&(Q.current.textContent=e,v.current=e,P(!e)),Z(e)},[e,w,Z]);const ee=h.useCallback(Q=>{if(Q===v.current)return;const R=w;R!=null&&R.current&&R.current.textContent!==Q&&(R.current.textContent=Q),v.current=Q,P(!Q),Z(Q),o(Q)},[o,w,Z]);Cl(()=>{const Q=J.current;if(!Q)return;const R=()=>ee(Q.value);return Q.addEventListener("input",R),Q.addEventListener("change",R),()=>{Q.removeEventListener("input",R),Q.removeEventListener("change",R)}},[ee,x]),h.useEffect(()=>{a&&w&&typeof w=="object"&&w.current&&w.current.focus()},[a,w]);const ne=()=>{const Q=window.getSelection();if(!Q||Q.rangeCount===0)return-1;const R=Q.getRangeAt(0),be=R.cloneRange();return be.selectNodeContents(w&&typeof w=="object"&&w.current?w.current:document.body),be.setEnd(R.endContainer,R.endOffset),be.toString().length},K=h.useCallback((Q,R)=>{const be=Q.substring(0,R),Ie=be.lastIndexOf(g);if(Ie!==-1){const ve=be.substring(Ie+1);if(!ve.includes(" ")){const co=ve.toLowerCase(),so=d.filter(Qe=>Qe.name.toLowerCase().includes(co));V(co),M(Ie),N(so),W(so.length>0),_(0);const So=re();B(So);return}}W(!1),V(""),M(-1),_(-1)},[d,g]);h.useEffect(()=>{E.current&&U&&(U.current=E.current)},[E,U]);const re=h.useCallback((Q=200)=>{if(!E.current)return{x:0,y:0};const R=E.current.getBoundingClientRect();if(X){const Je=X.space.vertical==="top";return{x:R.left,y:Je?R.top-Q-8:R.bottom+8}}const be=window.innerHeight,Ie={top:R.top,bottom:be-R.bottom},ve=Ie.bottom<Q+8&&Ie.top>Ie.bottom;return{x:R.left,y:ve?R.top-Q-8:R.bottom+8}},[X]),ie=h.useCallback(()=>{z(!0);const Q=re();q(Q)},[re]),ge=h.useCallback(()=>{setTimeout(()=>{z(!1),I(-1)},150)},[]),We=Q=>{const R=Q.currentTarget.textContent||"";if(R!==v.current){o(R),v.current=R,Z(R),P(!R);const be=ne();K(R,be)}},le=h.useCallback(Q=>{if(w&&typeof w=="object"&&w.current){const R=w.current.textContent||"",be=R.substring(0,j),Ie=R.substring(j+g.length+H.length),ve=be+g+Q.name+" "+Ie;o(ve),v.current=ve,Z(ve),w.current.textContent=ve;const Je=be.length+g.length+Q.name.length+1;setTimeout(()=>{var co;if(w.current){const so=document.createRange(),So=window.getSelection(),Qe=w.current.firstChild;Qe&&So&&(so.setStart(Qe,Math.min(Je,((co=Qe.textContent)==null?void 0:co.length)||0)),so.collapse(!0),So.removeAllRanges(),So.addRange(so))}},0)}W(!1),V(""),M(-1),_(-1),m&&m(Q)},[j,g,H,o,m,w,Z]),te=h.useCallback(Q=>{c&&c(Q),I(-1)},[c]),ae=Q=>{if(!(f&&(f(Q),Q.defaultPrevented))){if(A&&O.length>0){if(Q.key==="ArrowDown"){Q.preventDefault(),_(R=>R<O.length-1?R+1:0);return}if(Q.key==="ArrowUp"){Q.preventDefault(),_(R=>R>0?R-1:O.length-1);return}if((Q.key==="Tab"||Q.key==="Enter")&&L>=0){Q.preventDefault(),le(O[L]);return}if(Q.key==="Escape"){W(!1),_(-1);return}}if(s&&l.length>0){if(Q.key==="ArrowDown"){Q.preventDefault(),I(R=>R<l.length-1?R+1:0);return}if(Q.key==="ArrowUp"){Q.preventDefault(),I(R=>R>0?R-1:l.length-1);return}if(Q.key==="Tab"&&b>=0){Q.preventDefault(),te(l[b]);return}if(Q.key==="Escape"){I(-1);return}}}};return r.jsxs(i.View,{ref:E,width:"100%",position:"relative",...S==null?void 0:S.container,children:[r.jsxs(i.View,{width:"100%",minHeight:u,maxHeight:p,overflowY:"auto",position:"relative",children:[T&&r.jsx(i.Text,{position:"absolute",top:"8px",left:"8px",color:"color-gray-400",pointerEvents:"none",fontSize:"14px",zIndex:1,...S==null?void 0:S.placeholder,children:t}),r.jsx(i.View,{as:"div",ref:w,contentEditable:!n,suppressContentEditableWarning:!0,onInput:We,onKeyDown:ae,onFocus:ie,onBlur:ge,role:"textbox","aria-multiline":"true","aria-placeholder":t,width:"100%",minHeight:"24px",padding:"8px",outline:"none",whiteSpace:"pre-wrap",wordBreak:"break-word",fontSize:"14px",color:"color-gray-900",backgroundColor:"transparent",...S==null?void 0:S.input})]}),x&&r.jsx(i.View,{as:"textarea",ref:Y,id:k,name:y,defaultValue:e,disabled:n,tabIndex:-1,"aria-hidden":"true","data-editable-input-mirror":"true",opacity:0,width:1,height:1,padding:0,border:"none",resize:"none",overflow:"hidden",position:"absolute",bottom:0,left:0,pointerEvents:"none",...S==null?void 0:S.hiddenInput}),A&&O.length>0&&r.jsx(i.View,{position:"fixed",left:oe.x,top:oe.y,width:((ce=E.current)==null?void 0:ce.offsetWidth)||300,backgroundColor:"color-white",border:"2px solid",borderColor:"color-blue-300",borderRadius:"8px",boxShadow:"0 8px 24px rgba(0, 0, 0, 0.15)",zIndex:9999,maxHeight:"200px",overflowY:"auto",...S==null?void 0:S.mentionContainer,children:r.jsxs(i.Vertical,{gap:0,children:[O.map((Q,R)=>r.jsx(i.View,{as:"button",type:"button",width:"100%",padding:"12px 16px",backgroundColor:R===L?"color-blue-50":"transparent",border:"none",cursor:"pointer",textAlign:"left",transition:"background-color 0.2s ease",onClick:()=>le(Q),onMouseEnter:()=>_(R),_hover:{backgroundColor:"color-blue-50"},...S==null?void 0:S.mentionItem,children:r.jsxs(i.Vertical,{gap:4,children:[r.jsxs(i.Text,{fontSize:"14px",color:"color-gray-900",fontWeight:"medium",children:[g,Q.name]}),Q.description&&r.jsx(i.Text,{fontSize:"12px",color:"color-gray-600",children:Q.description})]})},Q.id)),process.env.NODE_ENV==="development"&&r.jsxs("div",{style:{fontSize:"8px",opacity:.7,padding:"4px"},children:["Mentions (Trigger: ",g,")",X&&r.jsxs(r.Fragment,{children:[r.jsx("br",{}),"Space: ",X.space.vertical,"-",X.space.horizontal]})]})]})}),s&&l.length>0&&!A&&D&&!e&&r.jsx(i.View,{position:"fixed",left:$.x,top:$.y,width:((ye=E.current)==null?void 0:ye.offsetWidth)||300,backgroundColor:"color-white",border:"2px solid",borderColor:"color-green-300",borderRadius:"8px",boxShadow:"0 8px 24px rgba(0, 0, 0, 0.15)",zIndex:9998,maxHeight:"200px",overflowY:"auto",...S==null?void 0:S.suggestionsContainer,children:r.jsxs(i.Vertical,{gap:0,children:[l.map((Q,R)=>r.jsx(i.View,{as:"button",type:"button",width:"100%",padding:"12px 16px",backgroundColor:R===b?"color-blue-50":"transparent",border:"none",cursor:"pointer",textAlign:"left",transition:"background-color 0.2s ease",onClick:()=>te(Q),onMouseEnter:()=>I(R),_hover:{backgroundColor:"color-blue-50"},...S==null?void 0:S.suggestionItem,children:r.jsxs(i.Vertical,{gap:4,children:[r.jsx(i.Text,{fontSize:"14px",color:"color-gray-900",fontWeight:"medium",children:Q.text}),Q.description&&r.jsx(i.Text,{fontSize:"12px",color:"color-gray-600",children:Q.description})]})},Q.id)),process.env.NODE_ENV==="development"&&r.jsxs("div",{style:{fontSize:"8px",opacity:.7,padding:"4px"},children:["Suggestions (Focus-triggered)",X&&r.jsxs(r.Fragment,{children:[r.jsx("br",{}),"Space: ",X.space.vertical,"-",X.space.horizontal]})]})]})})]})});wl.displayName="EditableInput";const vf=({examples:e,onSelect:o,views:t={}})=>{const{getColor:n}=i.useTheme();return!e||e.length===0?null:r.jsx(i.Horizontal,{gap:8,overflowX:"auto",padding:"8px 0",width:"100%",...t==null?void 0:t.container,children:e.map(a=>r.jsx(i.View,{as:"button",type:"button",padding:"8px 12px",borderRadius:"9999px",backgroundColor:"color-white",border:"1px solid #E2E8F0",cursor:"pointer",transition:"background-color 0.2s ease, border-color 0.2s ease",onClick:()=>o(a),_hover:{backgroundColor:"#F8FAFC",borderColor:"#CBD5E1"},...t==null?void 0:t.item,children:r.jsx(i.Text,{fontSize:"14px",color:"color-gray-700",...t==null?void 0:t.text,children:a.text})},a.id))})},Tf=({onRecordingComplete:e,onRecordingStart:o,views:t={}})=>{const{recording:n,paused:a,audioBlob:l,analyserNode:c,startRecording:s,stopRecording:d}=ta();h.useEffect(()=>{if(l){const m=new File([l],`recording-${Date.now()}.webm`,{type:l.type||"audio/webm;codecs=opus"});e(m)}},[l]);const g=h.useCallback(()=>{s(),o==null||o()},[]);return r.jsxs(i.Horizontal,{alignItems:"center",gap:4,children:[r.jsx(i.View,{minWidth:90,children:n&&c&&r.jsx(vt,{analyserNode:c,isPaused:a})}),r.jsx(i.View,{as:"button",type:"button",onClick:n?d:g,height:"40px",width:"40px",display:"flex",alignItems:"center",justifyContent:"center",backgroundColor:n?"theme-error":"color-gray-100",color:n?"color-white":"color-gray-600",borderRadius:"50%",border:"none",cursor:"pointer",_hover:{backgroundColor:n?"color-red-600":"color-gray-200"},...t.button,children:n?r.jsx(Cr,{widthHeight:16,color:"currentColor",filled:!1}):r.jsx(ut,{widthHeight:16,color:"currentColor",filled:!1})})]})},Sl=h.memo(({onSubmit:e,placeholder:o="Type your message… use @ to mention",loading:t=!1,disabled:n=!1,isDisabled:a,rightElement:l,onKeyDown:c,isAgentRunning:s=!1,enableAudioRecording:d=!1,leftButtons:g,rightButtons:m,onStopAgent:f,loadingText:p="Agent is working...",autoFocus:u=!0,sandboxId:y,hideAttachments:k=!1,attachmentText:x="",promptExamples:C=[],suggestions:S=[],errorMessage:w,size:v="md",shape:b="rounded",variant:I="default",views:T={},mentionData:P=[],mentionTrigger:E="@",onMentionSelect:D,onAudioRecordingStart:z,onAudioRecordingStop:A,showGuideTip:W,guideVideoUrl:H,onGuideClose:V,onFileBrowse:j,onUploadProgress:M,onUploadSuccess:L,onUploadError:_,onFileUpload:O,onPromptExampleSelect:N,name:U,hiddenInput:X=!0,value:oe,handleChange:B,setValue:$,handleSubmit:q,editableRef:J,fileInputRef:Y,hiddenInputRef:Z,isUploading:ee,uploadProgress:ne,isDraggingOver:K,uploadedFiles:re,pendingFiles:ie,getPendingFiles:ge,clearPendingFiles:We,removeUploadedFile:le,setPendingFiles:te,setUploadedFiles:ae,setIsUploading:ce,startUpload:ye,selectedModel:Q,handleModelChange:R,modelOptions:be,subscriptionStatus:Ie,canAccessModel:ve,isGuideTipShown:Je,hideGuideTip:co,handlePromptExampleSelect:so,handleDragOver:So,handleDragLeave:Qe,onChange:Lk,...Sb})=>{i.useTheme();const Hc=h.useMemo(()=>({...yl.container,...uf[b],...T==null?void 0:T.container}),[b,T==null?void 0:T.container]),vb=h.useMemo(()=>({...yl.content,...yf[v],...bf[I],...T==null?void 0:T.content}),[v,I,T==null?void 0:T.content]),yr=((oe==null?void 0:oe.trim().length)??0)>0||re.length>0,Tb=h.useCallback(Ce=>{ye([Ce]),A==null||A(Ce)},[ye,A]),Vn=h.useCallback(Ce=>{const Yo=Ce.filter(jc=>jc.size>52428800?(console.error(`File size exceeds 50MB limit: ${jc.name}`),!1):!0);Yo.length>0&&ye(Yo)},[ye]),Ib=h.useCallback(Ce=>{if(Ce.preventDefault(),Ce.stopPropagation(),Qe(Ce),Ce.dataTransfer.files.length>0){const Yo=Array.from(Ce.dataTransfer.files);Vn(Yo)}},[Qe,Vn]),Fb=h.useMemo(()=>[...P||[],...re.map((Ce,Yo)=>({id:`file-${Yo}`,name:Ce.name}))],[P,re]);return r.jsxs(i.View,{display:"flex",flexDirection:"column",boxSizing:"border-box",...Hc,...Sb,onDragOver:So,onDragLeave:Qe,onDrop:Ib,children:[C.length>0&&r.jsx(vf,{examples:C,onSelect:so,views:{container:T==null?void 0:T.promptExamples,item:T==null?void 0:T.promptExampleItem}}),s&&r.jsxs(i.Horizontal,{justifyContent:"center",alignItems:"center",gap:8,padding:"8px 0",animate:{from:{opacity:0,y:-10},to:{opacity:1,y:0},duration:"0.3s"},...T==null?void 0:T.loadingIndicator,children:[r.jsx(bt,{widthHeight:12,color:"currentColor",filled:!1,style:{animation:"spin 1s linear infinite"}}),r.jsx(i.Text,{color:"color-gray-500",children:p})]}),r.jsx(i.View,{position:"relative",width:"100%",overflow:"visible",children:r.jsxs(i.View,{as:"form",onSubmit:q,overflow:"visible",display:"flex",flexDirection:"column",position:"relative",...vb,...Hc,paddingHorizontal:16,paddingVertical:10,backgroundColor:K?"color-blue-50":void 0,children:[r.jsx(Sf,{files:re,sandboxId:y,onRemove:le,showPreviews:!0,views:{container:T==null?void 0:T.attachments,item:T==null?void 0:T.attachmentItem,name:T==null?void 0:T.attachmentName,size:T==null?void 0:T.attachmentSize,removeButton:T==null?void 0:T.attachmentRemove}}),r.jsx(wl,{ref:J,value:oe||"",onChange:B,placeholder:o,disabled:n&&!s,autoFocus:u,onKeyDown:c,suggestions:S||[],showSuggestions:S&&S.length>0&&!oe,onSuggestionSelect:Ce=>{B(Ce.text)},mentionData:Fb,mentionTrigger:E,onMentionSelect:D,name:U,hiddenInput:X,hiddenInputRef:Z,views:{container:{},input:T==null?void 0:T.editableInput,hiddenInput:T==null?void 0:T.hiddenInput}}),r.jsxs(i.Horizontal,{justifyContent:"space-between",alignItems:"center",marginTop:"8px",children:[r.jsxs(i.Horizontal,{gap:8,alignItems:"center",children:[!k&&r.jsx(i.View,{display:"contents",onClickCapture:j?Ce=>{Ce.target.tagName==="INPUT"&&j()}:void 0,children:r.jsx(Tr,{accept:"*/*",icon:r.jsx(Ko,{widthHeight:16}),maxSize:50*1024*1024,multiple:!0,onMultipleFileSelect:Vn,isLoading:ee,progress:ne||0,text:x,fileType:"file",renderError:({errorMessage:Ce})=>null,views:{container:{height:"36px",cursor:"pointer",_hover:{backgroundColor:"color-gray-100"},...T==null?void 0:T.fileButton}},containerProps:{display:"flex",alignItems:"center",justifyContent:"center",gap:4,borderRadius:b==="rounded"?"50%":4,padding:10},textProps:{fontSize:"14px",color:"color-gray-600"},validateFile:Ce=>Ce.size>50*1024*1024?"File size exceeds 50MB limit":null})}),g]}),r.jsxs(i.Horizontal,{gap:8,alignItems:"center",children:[l,d&&r.jsx(Tf,{onRecordingStart:z,onRecordingComplete:Tb,views:{button:T==null?void 0:T.recordButton}}),r.jsx(i.View,{as:"button",type:"button",onClick:q,height:"40px",width:"40px",display:"flex",alignItems:"center",justifyContent:"center",backgroundColor:s?"theme-error":yr?"theme-primary":"color-gray-300",color:"color-white",borderRadius:b==="rounded"?"50%":4,border:"none",cursor:yr?"pointer":"not-allowed",disabled:!yr||t||n&&!s,transition:"background-color 0.2s ease, opacity 0.2s ease, box-shadow 0.2s ease",_hover:{opacity:yr||s?.9:1},_active:{opacity:yr||s?.95:1},_focusVisible:{outline:"none",boxShadow:"0 0 0 2px white, 0 0 0 4px theme-primary"},...T==null?void 0:T.submitButton,children:s?r.jsx(Cr,{widthHeight:16,color:"currentColor",filled:!1}):t?r.jsx(eo,{type:"quarter",size:16,color:"color-white"}):r.jsx(yt,{widthHeight:16,color:"currentColor",filled:!1})}),m]})]})]})}),w&&r.jsx(i.Text,{color:"theme-error",marginTop:"4px",...T==null?void 0:T.bottomTip,children:w})]})}),If=e=>{const{name:o,onSubmit:t,...n}=e,[a,l]=h.useState([]),c=xe({name:o,type:"text"}),s=p=>{c.onChangeText&&c.onChangeText(p)},d=(p,u)=>{t?t(p,u):s(p)},g=()=>a,m=()=>l([]),f=ul({...n,value:c.value||"",onChange:s,onSubmit:d});return r.jsx(Sl,{...n,...f,name:o,value:c.value||"",onChange:s,onSubmit:d,error:c.error,getPendingFiles:g,clearPendingFiles:m})},Ff=e=>{const o=xe(e),t=qa(o);return r.jsx(Ua,{...t,...o})},zf=e=>{const o=xe(e),t=rl();return r.jsx(tl,{...t,...o})},Mf=e=>{const o=xe(e),t=Ga(e);return r.jsx(Ka,{...t,...o})},Wf=e=>{let o=xe(e);o.selected=o.value;const t=Fa({...e,value:o.value});return r.jsx(Wa,{...o,...t})},Hf=e=>{const o=xe(e),t=Ha(e);return r.jsx(Va,{...t,...o})},jf=e=>{const{name:o,...t}=e,{values:n,errors:a,touched:l,submitCount:c,setFieldValue:s,setFieldTouched:d}=Ee.useFormikContext(),g=Ee.getIn(n,o)||[],m=Ee.getIn(l,o)||c>0?Ee.getIn(a,o):void 0,f=h.useCallback(x=>{var S;const C=Array.isArray(x)?x.filter(w=>typeof w=="string"):[];s(o,C),(S=e.onTagsChange)==null||S.call(e,C)},[o,s,e.onTagsChange]),p=h.useCallback(()=>{var x;d(o,!0),(x=e.onBlur)==null||x.call(e)},[o,d,e.onBlur]),u=dl({...t,tags:g,onTagsChange:f,onBlur:p}),{tags:y,...k}=u;return r.jsx(gl,{...k,...t,tags:y,error:m})},Pf=e=>{const o=xe(e),t=Da(e);return r.jsx($a,{...t,...o})},Vf=e=>{const o=xe(e,{focusable:!0}),{value:t,...n}=Lt(e);return r.jsx(or,{...n,...o})},Af=({visibleIcon:e=r.jsx(kt,{widthHeight:14}),hiddenIcon:o=r.jsx(xt,{widthHeight:14}),...t})=>{const n=xe(t,{focusable:!0}),{isVisible:a,setIsVisible:l,...c}=nl(n);return r.jsx(or,{...c,type:a?"text":"password",isClearable:!1,right:r.jsx(i.View,{onClick:()=>{t.isDisabled||l(!a)},children:a?e:o})})},Ef=({items:e,placeholder:o,searchPlaceholder:t,isMulti:n=!1,...a})=>{const l=xe(a),c=ll(e,o,t);h.useEffect(()=>{if(n&&Array.isArray(l.value))c.setSelectedItems(l.value);else if(!n&&l.value){const d=typeof l.value=="object"?l.value:e.find(g=>g.value===l.value);d&&c.setSelectedItem(d)}},[l.value,n,e]);const s=d=>{l.onChange(d)};return r.jsx(sl,{...c,...l,items:e,placeholder:o,isMulti:n,onSelect:s})},Vo=(e,o,t)=>Math.min(Math.max(e,o),t),Df=(e,o,t,n,a,l,c)=>{const s=n-t;let d;if(l==="horizontal"){const g=o.width,m=e-o.left;d=Vo(m/g,0,1)}else{const g=o.height,m=o.bottom-e;d=Vo(m/g,0,1)}if(c&&c.length>0){const g=t+d*s;let m=c[0],f=Math.abs(g-m);for(let p=1;p<c.length;p++){const u=Math.abs(g-c[p]);u<f&&(f=u,m=c[p])}return m}else{const g=t+d*s,m=Math.round(g/a)*a;return Vo(m,t,n)}},vl=({min:e=0,max:o=100,step:t=1,value:n,defaultValue:a,onChange:l,onDrag:c,orientation:s="horizontal",isDisabled:d=!1,stepValues:g})=>{const m=Vo(n??a??e,e,o),[f,p]=h.useState(m),[u,y]=h.useState(!1),[k,x]=h.useState(!1),C=h.useRef(null),S=h.useRef(null),w=n!==void 0,v=n!==void 0?n:f;h.useEffect(()=>{n!==void 0&&p(Vo(n,e,o))},[n,e,o]);const b=h.useCallback(A=>{const W=Vo(A,e,o);w||p(W),l&&W!==v&&l(W),u&&c&&c(W)},[w,e,o,l,v,u,c]),I=h.useCallback(A=>{if(d||!C.current)return;const W=C.current;if(typeof W.getBoundingClientRect!="function")return;const H=W.getBoundingClientRect();let V;"touches"in A?V=s==="horizontal"?A.touches[0].clientX:A.touches[0].clientY:V=s==="horizontal"?A.clientX:A.clientY;const j=Df(V,H,e,o,t,s,g);b(j)},[e,o,t,s,b,d,g]),T=h.useCallback(A=>{if(d)return;A.preventDefault(),y(!0),I(A);const W=V=>{I(V)},H=()=>{y(!1),document.removeEventListener("mousemove",W),document.removeEventListener("mouseup",H),document.removeEventListener("touchmove",W),document.removeEventListener("touchend",H)};typeof document>"u"||(document.addEventListener("mousemove",W),document.addEventListener("mouseup",H),document.addEventListener("touchmove",W),document.addEventListener("touchend",H))},[I,d]),P=h.useCallback(A=>{const W=S.current;W&&typeof W.contains=="function"&&W.contains(A.target)||T(A)},[T]),E=h.useCallback(A=>{if(d)return;let W=v;switch(A.key){case"ArrowLeft":case"ArrowDown":W=v-t;break;case"ArrowRight":case"ArrowUp":W=v+t;break;case"Home":W=e;break;case"End":W=o;break;default:return}A.preventDefault(),b(W)},[v,e,o,t,b,d]),D=o-e,z=D===0?0:(v-e)/D*100;return{currentValue:v,isDragging:u,isHovered:k,setIsHovered:x,trackRef:C,thumbRef:S,handleThumbMouseDown:T,handleTrackMouseDown:P,handleKeyDown:E,thumbPositionPercent:z}},Tl={xs:{height:4,width:"100%"},sm:{height:6,width:"100%"},md:{height:8,width:"100%"},lg:{height:10,width:"100%"},xl:{height:12,width:"100%"}},Il={xs:{width:12,height:12},sm:{width:16,height:16},md:{width:20,height:20},lg:{width:24,height:24},xl:{width:28,height:28}},Fl={square:0,rounded:4,pill:24},zl=(e=>({default:{backgroundColor:"color-gray-200",transition:"background-color 0.15s ease"},outline:{borderWidth:1,borderStyle:"solid",borderColor:"color-gray-300",style:{backgroundColor:"transparent"},transition:"border-color 0.15s ease"}}))(),$f={xs:{trackCrossAxisSize:4,thumbSize:12},sm:{trackCrossAxisSize:6,thumbSize:16},md:{trackCrossAxisSize:8,thumbSize:20},lg:{trackCrossAxisSize:10,thumbSize:24},xl:{trackCrossAxisSize:12,thumbSize:28}},Lf={horizontal:{width:"100%",minWidth:"120px",height:"auto",flexDirection:"row",paddingVertical:8},vertical:{height:"100%",minHeight:"120px",width:"auto",flexDirection:"column-reverse",paddingHorizontal:8}},_f=e=>typeof e=="string"&&(/^(#|rgb\(|rgba\(|hsl\(|hsla\(|var\()/.test(e)||["black","currentColor","inherit","transparent","white"].includes(e)),ar=(e,o)=>_f(o)?{style:{[e]:o}}:{[e]:o},Ml=h.memo(({min:e=0,max:o=100,step:t=1,currentValue:n,stepValues:a,shape:l="rounded",size:c="md",variant:s="default",orientation:d="horizontal",isDisabled:g=!1,showValue:m=!1,showTooltip:f=!1,backgroundColor:p="theme-primary",label:u,helperText:y,themeMode:k,shadow:x={},isDragging:C,isHovered:S,setIsHovered:w,trackRef:v,thumbRef:b,handleThumbMouseDown:I,handleTrackMouseDown:T,handleKeyDown:P,thumbPositionPercent:E,ariaLabel:D="Slider",views:z={container:{},track:{},progress:{},filledTrack:{},thumb:{},label:{},valueLabel:{},stepMarks:{},tooltip:{}},onChange:A,onDrag:W,value:H,defaultValue:V,...j})=>{var $,q;const M=p,L="theme-disabled",_=zl[s].backgroundColor,O=g?L:M,N=d==="vertical",{trackCrossAxisSize:U,thumbSize:X}=$f[c]||{trackCrossAxisSize:Tl[c].height,thumbSize:Il[c].width||16},oe=r.jsxs(i.Vertical,{width:"100%",gap:8,...z.container,...j,children:[u&&r.jsxs(i.Horizontal,{justifyContent:"space-between",alignItems:"center",children:[r.jsx(i.Text,{fontSize:14,fontWeight:500,...z.label,children:u}),m&&r.jsx(i.Text,{fontSize:14,color:"color-gray-500",...z.valueLabel,children:n})]}),r.jsxs(i.View,{ref:v,position:"relative",cursor:g?"not-allowed":"pointer",opacity:g?.6:1,onMouseDown:T,onMouseEnter:()=>w(!0),onMouseLeave:()=>w(!1),...Tl[c],borderRadius:Fl[l],backgroundColor:_,...zl[s],...x,...z.track,children:[a&&a.length>0&&r.jsx(r.Fragment,{children:a.map(J=>{const Y=(J-e)/(o-e)*100;return r.jsx(i.View,{position:"absolute",top:"50%",left:`${Y}%`,transform:"translate(-50%, -50%)",width:4,height:4,borderRadius:"50%",zIndex:1,...ar("backgroundColor",O),...z.stepMarks},J)})}),r.jsx(i.View,{position:"absolute",top:0,left:0,height:"100%",width:`${E}%`,borderRadius:Fl[l],transition:"width 0.1s ease-in-out",...ar("backgroundColor",O),...z.progress,...z.filledTrack}),r.jsx(i.View,{ref:b,role:"slider",tabIndex:g?-1:0,"aria-valuemin":e,"aria-valuemax":o,"aria-valuenow":n,"aria-orientation":d,"aria-disabled":g,"aria-label":D,position:"absolute",top:"50%",left:`${E}%`,borderRadius:"50%",backgroundColor:"color-white",boxShadow:"0 2px 4px rgba(0, 0, 0, 0.2)",borderWidth:2,borderStyle:"solid",transition:C?"none":"transform 0.1s ease-in-out",...ar("borderColor",O),transform:S?"translate(-50%, -50%) scale(1.1)":"translate(-50%, -50%)",zIndex:2,onMouseDown:I,onTouchStart:I,onKeyDown:P,...Il[c],...z.thumb,children:f&&(S||C)&&r.jsx(i.View,{position:"absolute",bottom:"100%",left:"50%",transform:"translateX(-50%)",marginBottom:8,padding:"4px 8px",backgroundColor:"color-black",color:"color-white",borderRadius:4,fontSize:12,whiteSpace:"nowrap",zIndex:3,...z.tooltip,children:r.jsx(i.Text,{...($=z.tooltip)==null?void 0:$.text,children:n==null?void 0:n.toFixed(t<1?1:0)})})})]}),y&&r.jsx(Et,{children:y})]}),B=r.jsxs(i.Center,{...Lf[d],position:"relative",onMouseEnter:()=>!g&&w(!0),onMouseLeave:()=>!g&&w(!1),...j,...z==null?void 0:z.container,children:[u&&r.jsxs(i.Horizontal,{justifyContent:"space-between",alignItems:"center",marginBottom:8,width:"100%",children:[r.jsx(i.Text,{fontSize:14,fontWeight:500,...z.label,children:u}),m&&r.jsx(i.Text,{fontSize:14,color:"color-gray-500",...z.valueLabel,children:n})]}),r.jsxs(i.View,{ref:v,position:"relative",borderRadius:U/2,backgroundColor:g?L:_,cursor:g?"not-allowed":"pointer",width:N?`${U}px`:"100%",height:N?"100%":`${U}px`,onMouseDown:T,onTouchStart:T,...z==null?void 0:z.track,children:[a&&a.length>0&&r.jsx(r.Fragment,{children:a.map(J=>{const Y=(J-e)/(o-e)*100;return r.jsx(i.View,{position:"absolute",width:4,height:4,borderRadius:"50%",backgroundColor:O,zIndex:1,...N?{bottom:`${Y}%`,left:"50%",transform:"translate(-50%, 50%)"}:{left:`${Y}%`,top:"50%",transform:"translate(-50%, -50%)"},...z.stepMarks},J)})}),r.jsx(i.View,{position:"absolute",borderRadius:U/2,...N?{bottom:0,left:0,width:"100%",height:`${E}%`}:{top:0,left:0,height:"100%",width:`${E}%`},...ar("backgroundColor",O),...z==null?void 0:z.filledTrack,...z==null?void 0:z.progress}),r.jsx(i.View,{ref:b,role:"slider",tabIndex:g?-1:0,"aria-valuemin":e,"aria-valuemax":o,"aria-valuenow":n,"aria-orientation":d,"aria-disabled":g,"aria-label":D,position:"absolute",width:`${X}px`,height:`${X}px`,borderRadius:"50%",borderWidth:2,borderStyle:"solid",borderColor:"color-white",boxShadow:"0 1px 3px rgba(0, 0, 0, 0.2)",cursor:g?"not-allowed":"grab",transform:N?"translateX(-50%)":"translateY(-50%)",zIndex:2,transition:C?"none":"left 0.1s, bottom 0.1s",...ar("backgroundColor",O),...N?{left:"50%",bottom:`${E}%`}:{top:"50%",left:`${E}%`},onMouseDown:I,onTouchStart:I,onKeyDown:P,...z==null?void 0:z.thumb,children:f&&(S||C)&&r.jsx(i.View,{position:"absolute",padding:"4px 8px",backgroundColor:"color-black",color:"color-white",borderRadius:"4px",whiteSpace:"nowrap",zIndex:3,...N?{left:"100%",marginLeft:"8px",bottom:"0",transform:"translateY(50%)"}:{bottom:"100%",left:"50%",marginBottom:"8px",transform:"translateX(-50%)"},...z==null?void 0:z.tooltip,children:r.jsx(i.Text,{...(q=z==null?void 0:z.tooltip)==null?void 0:q.text,children:n==null?void 0:n.toFixed(t<1?1:0)})})})]}),y&&r.jsx(Et,{marginTop:8,children:y})]});return N||f?B:oe}),Bf=e=>{const o=xe(e),t=vl({...e,value:o.value!==void 0?Number(o.value):void 0,onChange:n=>{var a;o.onChange(n),(a=e.onChange)==null||a.call(e,n)}});return r.jsx(Ml,{...e,...t,...o})},Wl=e=>{if(e==null)return"";if(typeof e=="string"||typeof e=="number"){const o=String(e);return o==="[object Object]"?"":o}return""},Kt=(e,o)=>{console.log(`[FormikOTPInput] ${e}`,o)},Of=e=>e==null||typeof e=="string"||typeof e=="number"||typeof e=="boolean"?e:Object.prototype.toString.call(e),Nf=e=>{const o=xe(e),t=Wl(o.value).slice(0,e.length||6);Kt("render",{name:e.name,type:e.type,formValue:Of(o.value),displayValue:t,length:e.length||6,hasFormikOnChange:!!o.onChange,hasFormikOnChangeText:!!o.onChangeText});const{isFocused:n,setIsFocused:a,isHovered:l,setIsHovered:c,inputRef:s,containerRef:d,mirrorSelectionStart:g,mirrorSelectionEnd:m,setMirrorSelectionStart:f,setMirrorSelectionEnd:p,setInputRef:u,handleFocus:y,handleBlur:k,handleKeyDown:x,handlePaste:C}=hl(e),S=h.useCallback(v=>{const b=Wl(v).slice(0,e.length||6);Kt("setValue",{name:e.name,incomingValue:v,nextValue:b,hasFormikOnChange:!!o.onChange,hasFormikOnChangeText:!!o.onChangeText}),o.onChange&&o.onChange(b),o.onChangeText&&o.onChangeText(b),e.onComplete&&b.length===(e.length||6)&&e.onComplete(b),s.current&&(s.current.value=b)},[o,e,s]),w=h.useCallback(v=>{var T,P,E;const b=typeof v=="string"?v:((T=v==null?void 0:v.currentTarget)==null?void 0:T.value)??((P=v==null?void 0:v.target)==null?void 0:P.value)??((E=v==null?void 0:v.nativeEvent)==null?void 0:E.text)??"",I=String(b).slice(0,e.length||6);Kt("handleChange normalized",{name:e.name,raw:b,newValue:I}),S(I),s.current&&(s.current.value=I)},[e.length,S,s]);return r.jsx(fl,{...e,...o,value:t,setValue:S,isFocused:n,setIsFocused:a,isHovered:l,setIsHovered:c,inputRef:s,containerRef:d,mirrorSelectionStart:g,mirrorSelectionEnd:m,setMirrorSelectionStart:f,setMirrorSelectionEnd:p,setInputRef:u,handleChange:w,handleFocus:y,handleBlur:k,handleKeyDown:x,handlePaste:C,stepValues:e.stepValues})},qf=e=>Array.isArray(e)?e:e==null?[]:[e],Hl=({name:e,uploadFile:o,onUploadSuccess:t,onUploadError:n,transformResponse:a,onMultipleFileSelect:l,onFileSelect:c,multiple:s=!0,...d})=>{const{setFieldValue:g,setFieldTouched:m,values:f}=Ee.useFormikContext(),[p,u]=h.useState(!1),[y,k]=h.useState(0),x=h.useCallback(async w=>{if(!w||w.length===0)return;m(e,!0,!0),u(!0);const v=[];for(const b of w){k(0);try{const I=await o(b,P=>{k(P??0)}),T=a?a(I,b):I;v.push(T),t==null||t(b,T)}catch(I){n==null||n(b,I)}}if(v.length>0){const b=qf(Ee.getIn(f,e));g(e,[...b,...v],!0),k(100)}else k(0);u(!1)},[e,n,t,m,g,a,o,f]),C=h.useCallback(async w=>{l==null||l(w),await x(w)},[x,l]),S=h.useCallback(async w=>{c==null||c(w),await x([w])},[x,c]);return r.jsx(Tr,{...d,multiple:s,onMultipleFileSelect:s?C:void 0,onFileSelect:s?void 0:S,isLoading:p,progress:y})};Hl.displayName="FormikUploader";const Uf=e=>{let o=xe(e);o.selected=o.value;const t=Aa(e);return r.jsx(Ea,{...t,...o})},jl=e=>{const[o,t]=h.useState(!1),[n,a]=h.useState(e);return{isHovered:o,setIsHovered:t,isToggle:n,setIsToggled:a}},Gf={square:0,rounded:8,pill:999},Yf=(e,o)=>({outline:{backgroundColor:"color-white",color:e,borderWidth:1,borderStyle:"solid",borderColor:"color-gray-200",_hover:{backgroundColor:"color-gray-50",borderColor:"color-gray-300"},_active:{backgroundColor:"color-gray-100"},transition:"background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease"},ghost:{backgroundColor:"transparent",color:e,borderWidth:0,borderStyle:"none",borderColor:"transparent",_hover:{backgroundColor:"color-gray-50"},_active:{backgroundColor:"color-gray-100"},transition:"background-color 0.2s ease, color 0.2s ease"},link:{backgroundColor:"transparent",color:e,borderWidth:1,borderStyle:"solid",borderColor:"transparent",textDecoration:"underline",textUnderlineOffset:"1px",textDecorationThickness:"1px",_hover:{opacity:.8},_active:{opacity:.9},transition:"opacity 0.2s ease"}}),Pl=h.memo(({children:e,shape:o="rounded",variant:t="ghost",isHovered:n,setIsHovered:a,isDisabled:l,isToggle:c,setIsToggled:s,onToggle:d,views:g,backgroundColor:m,color:f,themeMode:p,...u})=>{const{getColor:y,themeMode:k}=i.useTheme(),x=p??k,S=y(l?"theme-disabled":m??f??"theme-primary",{themeMode:x}),v=h.useMemo(()=>Yf(S),[S,x])[t],b=!!c,I=h.useCallback(()=>a(!0),[a]),T=h.useCallback(()=>{l||s(P=>{const E=!P;return d&&d(E),E})},[l,s,d]);return r.jsx(i.Center,{role:"Toggle",padding:o==="pill"?"8px 12px":"8px",width:"fit-content",cursor:l?"not-allowed":"pointer",borderRadius:Gf[o],onClick:T,onMouseEnter:I,onMouseLeave:()=>a(!1),...v,...b&&{...t==="link"?{backgroundColor:"transparent"}:{backgroundColor:"color-blue-50",borderWidth:1,borderStyle:"solid",borderColor:"color-blue-200"},color:S},...u,...g==null?void 0:g.container,children:e})}),Kf=({children:e,shape:o,variant:t,isDisabled:n,isToggled:a=!1,onToggle:l,...c})=>{const s=xe(c),{isHovered:d,setIsHovered:g,isToggle:m,setIsToggled:f}=jl(s.value??a);h.useEffect(()=>{f(s.value??a)},[s.value,a]);const p=u=>{f(u),s.onChange(u),l==null||l(u)};return r.jsx(Pl,{shape:o,variant:t,isDisabled:n,isHovered:d,setIsHovered:g,isToggle:m,setIsToggled:f,onToggle:p,...c,children:e})},Vl=()=>{const[e,o]=h.useState([]);return{activeToggles:e,setActiveToggles:o}},Xt=({children:e,shape:o,variant:t,isDisabled:n,isToggled:a=!1,onToggle:l,...c})=>{const{isHovered:s,setIsHovered:d,isToggle:g,setIsToggled:m}=jl(a);return h.useEffect(()=>{m(a)},[a]),r.jsx(Pl,{shape:o,variant:t,isDisabled:n,isHovered:s,setIsHovered:d,isToggle:g,setIsToggled:m,onToggle:l,...c,children:e})},Al=({items:e,onToggleChange:o,activeToggles:t,setActiveToggles:n,shape:a="rounded",variant:l="ghost",views:c})=>{const s=h.useCallback((d,g)=>{n(m=>{let f;return g?f=m.includes(d)?m:[...m,d]:f=m.filter(p=>p!==d),o==null||o(f),f})},[o,n]);return r.jsx(i.Horizontal,{role:"ToggleGroup",display:"flex",gap:8,flexWrap:"wrap",...c==null?void 0:c.container,children:e.map(d=>r.jsx(Xt,{role:`toggle-${d.id}`,shape:a,variant:l,isToggled:t.includes(d.id)||d.isActive,onToggle:g=>s(d.id,g),isDisabled:d.isDisabled,views:c==null?void 0:c.toggle,children:d.value},d.id))})},Xf=({items:e,shape:o,variant:t,onToggleChange:n,...a})=>{const l=xe(a),{activeToggles:c,setActiveToggles:s}=Vl();h.useEffect(()=>{Array.isArray(l.value)&&s(l.value)},[l.value]);const d=g=>{s(g),l.onChange(g),n==null||n(g)};return r.jsx(Al,{items:e,shape:o,variant:t,activeToggles:c,setActiveToggles:s,onToggleChange:d,...a})},El=["zoom-out","zoom-in","zap","zap-off","youtube","x","wrench","worm","workflow","wine","wine-off","wind","wind-arrow-down","wifi","wifi-zero","wifi-sync","wifi-pen","wifi-off","wifi-low","wifi-high","wifi-cog","whole-word","wheat","wheat-off","weight","weight-tilde","webhook","webhook-off","webcam","waypoints","waves","waves-ladder","waves-arrow-up","waves-arrow-down","watch","washing-machine","warehouse","wand","wand-sparkles","wallpaper","wallet","wallet-minimal","wallet-cards","vote","volume","volume-x","volume-off","volume-2","volume-1","volleyball","voicemail","view","videotape","video","video-off","vibrate","vibrate-off","venus","venus-and-mars","venetian-mask","vegan","vector-square","vault","variable","van","utility-pole","utensils","utensils-crossed","users","users-round","user","user-x","user-star","user-search","user-round","user-round-x","user-round-search","user-round-plus","user-round-pen","user-round-minus","user-round-cog","user-round-check","user-plus","user-pen","user-minus","user-lock","user-cog","user-check","usb","upload","unplug","unlink","unlink-2","university","ungroup","unfold-vertical","unfold-horizontal","undo","undo-dot","undo-2","underline","umbrella","umbrella-off","type","type-outline","twitter","twitch","tv","tv-minimal","tv-minimal-play","turtle","turntable","turkish-lira","truck","truck-electric","trophy","triangle","triangle-right","triangle-dashed","triangle-alert","trending-up","trending-up-down","trending-down","trello","trees","tree-pine","tree-palm","tree-deciduous","trash","trash-2","transgender","tram-front","train-track","train-front","train-front-tunnel","traffic-cone","tractor","toy-brick","tower-control","touchpad","touchpad-off","torus","tornado","toolbox","tool-case","toilet","toggle-right","toggle-left","timer","timer-reset","timer-off","tickets","tickets-plane","ticket","ticket-x","ticket-slash","ticket-plus","ticket-percent","ticket-minus","ticket-check","thumbs-up","thumbs-down","thermometer","thermometer-sun","thermometer-snowflake","theater","text-wrap","text-select","text-search","text-quote","text-initial","text-cursor","text-cursor-input","text-align-start","text-align-justify","text-align-end","text-align-center","test-tubes","test-tube","test-tube-diagonal","terminal","tent","tent-tree","telescope","target","tangent","tally-5","tally-4","tally-3","tally-2","tally-1","tags","tag","tablets","tablet","tablet-smartphone","table","table-rows-split","table-properties","table-of-contents","table-columns-split","table-cells-split","table-cells-merge","table-2","syringe","swords","sword","switch-camera","swiss-franc","swatch-book","superscript","sunset","sunrise","sun","sun-snow","sun-moon","sun-medium","sun-dim","subscript","strikethrough","stretch-vertical","stretch-horizontal","store","stone","sticky-note","sticker","stethoscope","step-forward","step-back","star","star-off","star-half","stamp","squirrel","squircle","squircle-dashed","squares-unite","squares-subtract","squares-intersect","squares-exclude","square","square-x","square-user","square-user-round","square-terminal","square-stop","square-star","square-stack","square-square","square-split-vertical","square-split-horizontal","square-slash","square-sigma","square-scissors","square-round-corner","square-radical","square-power","square-plus","square-play","square-pilcrow","square-pi","square-percent","square-pen","square-pause","square-parking","square-parking-off","square-mouse-pointer","square-minus","square-menu","square-m","square-library","square-kanban","square-function","square-equal","square-dot","square-divide","square-dashed","square-dashed-top-solid","square-dashed-mouse-pointer","square-dashed-kanban","square-dashed-bottom","square-dashed-bottom-code","square-code","square-chevron-up","square-chevron-right","square-chevron-left","square-chevron-down","square-check","square-check-big","square-chart-gantt","square-bottom-dashed-scissors","square-asterisk","square-arrow-up","square-arrow-up-right","square-arrow-up-left","square-arrow-right","square-arrow-out-up-right","square-arrow-out-up-left","square-arrow-out-down-right","square-arrow-out-down-left","square-arrow-left","square-arrow-down","square-arrow-down-right","square-arrow-down-left","square-activity","sprout","spray-can","spotlight","spool","split","spline","spline-pointer","spell-check","spell-check-2","speech","speaker","sparkles","sparkle","spade","space","soup","solar-panel","sofa","soap-dispenser-droplet","snowflake","snail","smile","smile-plus","smartphone","smartphone-nfc","smartphone-charging","sliders-vertical","sliders-horizontal","slice","slash","slack","skull","skip-forward","skip-back","siren","signpost","signpost-big","signature","signal","signal-zero","signal-medium","signal-low","signal-high","sigma","shuffle","shrub","shrink","shrimp","shredder","shower-head","shovel","shopping-cart","shopping-basket","shopping-bag","shirt","ship","ship-wheel","shield","shield-x","shield-user","shield-question-mark","shield-plus","shield-off","shield-minus","shield-half","shield-ellipsis","shield-check","shield-ban","shield-alert","shell","sheet","share","share-2","shapes","settings","settings-2","server","server-off","server-crash","server-cog","separator-vertical","separator-horizontal","send","send-to-back","send-horizontal","section","search","search-x","search-slash","search-code","search-check","search-alert","scroll","scroll-text","screen-share","screen-share-off","scooter","scissors","scissors-line-dashed","school","scan","scan-text","scan-search","scan-qr-code","scan-line","scan-heart","scan-face","scan-eye","scan-barcode","scaling","scale","scale-3d","save","save-off","save-all","saudi-riyal","satellite","satellite-dish","sandwich","salad","sailboat","russian-ruble","ruler","ruler-dimension-line","rss","rows-4","rows-3","rows-2","router","route","route-off","rotate-cw","rotate-cw-square","rotate-ccw","rotate-ccw-square","rotate-ccw-key","rotate-3d","rose","roller-coaster","rocking-chair","rocket","ribbon","rewind","reply","reply-all","replace","replace-all","repeat","repeat-2","repeat-1","remove-formatting","regex","refrigerator","refresh-cw","refresh-cw-off","refresh-ccw","refresh-ccw-dot","redo","redo-dot","redo-2","recycle","rectangle-vertical","rectangle-horizontal","rectangle-goggles","rectangle-ellipsis","rectangle-circle","receipt","receipt-turkish-lira","receipt-text","receipt-swiss-franc","receipt-russian-ruble","receipt-pound-sterling","receipt-japanese-yen","receipt-indian-rupee","receipt-euro","receipt-cent","ratio","rat","rainbow","rail-symbol","radius","radio","radio-tower","radio-receiver","radical","radiation","radar","rabbit","quote","qr-code","pyramid","puzzle","proportions","projector","printer","printer-check","presentation","power","power-off","pound-sterling","popsicle","popcorn","pointer","pointer-off","podcast","pocket","pocket-knife","plus","plug","plug-zap","plug-2","play","plane","plane-takeoff","plane-landing","pizza","pipette","pin","pin-off","pill","pill-bottle","pilcrow","pilcrow-right","pilcrow-left","piggy-bank","picture-in-picture","picture-in-picture-2","pickaxe","piano","pi","phone","phone-outgoing","phone-off","phone-missed","phone-incoming","phone-forwarded","phone-call","philippine-peso","person-standing","percent","pentagon","pencil","pencil-ruler","pencil-off","pencil-line","pen","pen-tool","pen-off","pen-line","pc-case","paw-print","pause","party-popper","parking-meter","parentheses","paperclip","panels-top-left","panels-right-bottom","panels-left-bottom","panel-top","panel-top-open","panel-top-dashed","panel-top-close","panel-top-bottom-dashed","panel-right","panel-right-open","panel-right-dashed","panel-right-close","panel-left","panel-left-right-dashed","panel-left-open","panel-left-dashed","panel-left-close","panel-bottom","panel-bottom-open","panel-bottom-dashed","panel-bottom-close","panda","palette","paintbrush","paintbrush-vertical","paint-roller","paint-bucket","package","package-x","package-search","package-plus","package-open","package-minus","package-check","package-2","origami","orbit","option","omega","octagon","octagon-x","octagon-pause","octagon-minus","octagon-alert","nut","nut-off","notepad-text","notepad-text-dashed","notebook","notebook-text","notebook-tabs","notebook-pen","non-binary","nfc","newspaper","network","navigation","navigation-off","navigation-2","navigation-2-off","music","music-4","music-3","music-2","move","move-vertical","move-up","move-up-right","move-up-left","move-right","move-left","move-horizontal","move-down","move-down-right","move-down-left","move-diagonal","move-diagonal-2","move-3d","mouse","mouse-pointer","mouse-pointer-click","mouse-pointer-ban","mouse-pointer-2","mouse-pointer-2-off","mouse-off","mountain","mountain-snow","motorbike","moon","moon-star","monitor","monitor-x","monitor-up","monitor-stop","monitor-speaker","monitor-smartphone","monitor-play","monitor-pause","monitor-off","monitor-down","monitor-dot","monitor-cog","monitor-cloud","monitor-check","minus","minimize","minimize-2","milk","milk-off","milestone","microwave","microscope","microchip","mic","mic-vocal","mic-off","messages-square","message-square","message-square-x","message-square-warning","message-square-text","message-square-share","message-square-reply","message-square-quote","message-square-plus","message-square-off","message-square-more","message-square-lock","message-square-heart","message-square-dot","message-square-diff","message-square-dashed","message-square-code","message-circle","message-circle-x","message-circle-warning","message-circle-reply","message-circle-question-mark","message-circle-plus","message-circle-off","message-circle-more","message-circle-heart","message-circle-dashed","message-circle-code","merge","menu","memory-stick","meh","megaphone","megaphone-off","medal","maximize","maximize-2","martini","mars","mars-stroke","map","map-plus","map-pinned","map-pin","map-pin-x","map-pin-x-inside","map-pin-plus","map-pin-plus-inside","map-pin-pen","map-pin-off","map-pin-minus","map-pin-minus-inside","map-pin-house","map-pin-check","map-pin-check-inside","map-minus","mails","mailbox","mail","mail-x","mail-warning","mail-search","mail-question-mark","mail-plus","mail-open","mail-minus","mail-check","magnet","luggage","lollipop","logs","log-out","log-in","lock","lock-open","lock-keyhole","lock-keyhole-open","locate","locate-off","locate-fixed","loader","loader-pinwheel","loader-circle","list","list-x","list-video","list-tree","list-todo","list-start","list-restart","list-plus","list-ordered","list-music","list-minus","list-indent-increase","list-indent-decrease","list-filter","list-filter-plus","list-end","list-collapse","list-chevrons-up-down","list-chevrons-down-up","list-checks","list-check","linkedin","link","link-2","link-2-off","line-squiggle","lightbulb","lightbulb-off","ligature","life-buoy","library","library-big","lectern","leafy-green","leaf","layout-template","layout-panel-top","layout-panel-left","layout-list","layout-grid","layout-dashboard","layers","layers-plus","layers-2","laugh","lasso","lasso-select","laptop","laptop-minimal","laptop-minimal-check","languages","landmark","land-plot","lamp","lamp-wall-up","lamp-wall-down","lamp-floor","lamp-desk","lamp-ceiling","keyboard","keyboard-off","keyboard-music","key","key-square","key-round","kayak","kanban","joystick","japanese-yen","iteration-cw","iteration-ccw","italic","instagram","inspection-panel","info","infinity","indian-rupee","inbox","import","images","image","image-upscale","image-up","image-plus","image-play","image-off","image-minus","image-down","id-card","id-card-lanyard","ice-cream-cone","ice-cream-bowl","house","house-wifi","house-plus","house-plug","house-heart","hourglass","hotel","hospital","hop","hop-off","history","highlighter","hexagon","helicopter","heater","heart","heart-pulse","heart-plus","heart-off","heart-minus","heart-handshake","heart-crack","headset","headphones","headphone-off","heading","heading-6","heading-5","heading-4","heading-3","heading-2","heading-1","hdmi-port","hd","haze","hat-glasses","hash","hard-hat","hard-drive","hard-drive-upload","hard-drive-download","handshake","handbag","hand","hand-platter","hand-metal","hand-helping","hand-heart","hand-grab","hand-fist","hand-coins","hammer","hamburger","ham","guitar","group","grip","grip-vertical","grip-horizontal","grid-3x3","grid-3x2","grid-2x2","grid-2x2-x","grid-2x2-plus","grid-2x2-check","grape","graduation-cap","gpu","goal","globe","globe-lock","glasses","glass-water","gitlab","github","git-pull-request","git-pull-request-draft","git-pull-request-create","git-pull-request-create-arrow","git-pull-request-closed","git-pull-request-arrow","git-merge","git-graph","git-fork","git-compare","git-compare-arrows","git-commit-vertical","git-commit-horizontal","git-branch","git-branch-plus","git-branch-minus","gift","ghost","georgian-lari","gem","gavel","gauge","gamepad","gamepad-directional","gamepad-2","gallery-vertical","gallery-vertical-end","gallery-thumbnails","gallery-horizontal","gallery-horizontal-end","funnel","funnel-x","funnel-plus","fullscreen","fuel","frown","framer","frame","forward","form","forklift","footprints","folders","folder","folder-x","folder-up","folder-tree","folder-sync","folder-symlink","folder-search","folder-search-2","folder-root","folder-plus","folder-pen","folder-output","folder-open","folder-open-dot","folder-minus","folder-lock","folder-key","folder-kanban","folder-input","folder-heart","folder-git","folder-git-2","folder-down","folder-dot","folder-cog","folder-code","folder-closed","folder-clock","folder-check","folder-archive","fold-vertical","fold-horizontal","focus","flower","flower-2","flip-vertical","flip-vertical-2","flip-horizontal","flip-horizontal-2","flask-round","flask-conical","flask-conical-off","flashlight","flashlight-off","flame","flame-kindling","flag","flag-triangle-right","flag-triangle-left","flag-off","fishing-hook","fish","fish-symbol","fish-off","fire-extinguisher","fingerprint-pattern","film","files","file","file-x","file-x-corner","file-volume","file-video-camera","file-user","file-up","file-type","file-type-corner","file-text","file-terminal","file-symlink","file-stack","file-spreadsheet","file-sliders","file-signal","file-search","file-search-corner","file-scan","file-question-mark","file-plus","file-plus-corner","file-play","file-pen","file-pen-line","file-output","file-music","file-minus","file-minus-corner","file-lock","file-key","file-input","file-image","file-heart","file-headphone","file-exclamation-point","file-down","file-digit","file-diff","file-cog","file-code","file-code-corner","file-clock","file-check","file-check-corner","file-chart-pie","file-chart-line","file-chart-column","file-chart-column-increasing","file-braces","file-braces-corner","file-box","file-badge","file-axis-3d","file-archive","figma","ferris-wheel","fence","feather","fast-forward","fan","factory","facebook","eye","eye-off","eye-closed","external-link","expand","ev-charger","euro","ethernet-port","eraser","equal","equal-not","equal-approximately","ellipsis","ellipsis-vertical","egg","egg-off","egg-fried","eclipse","earth","earth-lock","ear","ear-off","dumbbell","drumstick","drum","droplets","droplet","droplet-off","drone","drill","dribbble","drama","drafting-compass","download","dot","door-open","door-closed","door-closed-locked","donut","dollar-sign","dog","dock","dna","dna-off","divide","disc","disc-album","disc-3","disc-2","diff","dices","dice-6","dice-5","dice-4","dice-3","dice-2","dice-1","diamond","diamond-plus","diamond-percent","diamond-minus","diameter","dessert","delete","decimals-arrow-right","decimals-arrow-left","database","database-zap","database-backup","dam","cylinder","currency","cup-soda","cuboid","crown","crosshair","cross","crop","croissant","credit-card","creative-commons","cpu","corner-up-right","corner-up-left","corner-right-up","corner-right-down","corner-left-up","corner-left-down","corner-down-right","corner-down-left","copyright","copyleft","copy","copy-x","copy-slash","copy-plus","copy-minus","copy-check","cooking-pot","cookie","contrast","container","contact","contact-round","construction","cone","concierge-bell","computer","component","compass","command","combine","columns-4","columns-3","columns-3-cog","columns-2","coins","cog","coffee","codesandbox","codepen","code","code-xml","club","clover","cloudy","cloud","cloud-upload","cloud-sync","cloud-sun","cloud-sun-rain","cloud-snow","cloud-rain","cloud-rain-wind","cloud-off","cloud-moon","cloud-moon-rain","cloud-lightning","cloud-hail","cloud-fog","cloud-drizzle","cloud-download","cloud-cog","cloud-check","cloud-backup","cloud-alert","closed-caption","clock","clock-plus","clock-fading","clock-check","clock-arrow-up","clock-arrow-down","clock-alert","clock-9","clock-8","clock-7","clock-6","clock-5","clock-4","clock-3","clock-2","clock-12","clock-11","clock-10","clock-1","clipboard","clipboard-x","clipboard-type","clipboard-plus","clipboard-pen","clipboard-pen-line","clipboard-paste","clipboard-minus","clipboard-list","clipboard-copy","clipboard-clock","clipboard-check","clapperboard","citrus","circuit-board","circle","circle-x","circle-user","circle-user-round","circle-stop","circle-star","circle-small","circle-slash","circle-slash-2","circle-question-mark","circle-power","circle-pound-sterling","circle-plus","circle-play","circle-pile","circle-percent","circle-pause","circle-parking","circle-parking-off","circle-off","circle-minus","circle-gauge","circle-fading-plus","circle-fading-arrow-up","circle-equal","circle-ellipsis","circle-dot","circle-dot-dashed","circle-dollar-sign","circle-divide","circle-dashed","circle-chevron-up","circle-chevron-right","circle-chevron-left","circle-chevron-down","circle-check","circle-check-big","circle-arrow-up","circle-arrow-right","circle-arrow-out-up-right","circle-arrow-out-up-left","circle-arrow-out-down-right","circle-arrow-out-down-left","circle-arrow-left","circle-arrow-down","circle-alert","cigarette","cigarette-off","church","chromium","chevrons-up","chevrons-up-down","chevrons-right","chevrons-right-left","chevrons-left","chevrons-left-right","chevrons-left-right-ellipsis","chevrons-down","chevrons-down-up","chevron-up","chevron-right","chevron-left","chevron-last","chevron-first","chevron-down","chess-rook","chess-queen","chess-pawn","chess-knight","chess-king","chess-bishop","cherry","chef-hat","check","check-line","check-check","chart-spline","chart-scatter","chart-pie","chart-no-axes-gantt","chart-no-axes-combined","chart-no-axes-column","chart-no-axes-column-increasing","chart-no-axes-column-decreasing","chart-network","chart-line","chart-gantt","chart-column","chart-column-stacked","chart-column-increasing","chart-column-decreasing","chart-column-big","chart-candlestick","chart-bar","chart-bar-stacked","chart-bar-increasing","chart-bar-decreasing","chart-bar-big","chart-area","cctv","cat","castle","cast","cassette-tape","case-upper","case-sensitive","case-lower","carrot","card-sim","caravan","car","car-taxi-front","car-front","captions","captions-off","cannabis","cannabis-off","candy","candy-off","candy-cane","camera","camera-off","calendars","calendar","calendar-x","calendar-x-2","calendar-sync","calendar-search","calendar-range","calendar-plus","calendar-plus-2","calendar-off","calendar-minus","calendar-minus-2","calendar-heart","calendar-fold","calendar-days","calendar-cog","calendar-clock","calendar-check","calendar-check-2","calendar-arrow-up","calendar-arrow-down","calendar-1","calculator","cake","cake-slice","cable","cable-car","bus","bus-front","building","building-2","bug","bug-play","bug-off","bubbles","brush","brush-cleaning","bring-to-front","briefcase","briefcase-medical","briefcase-conveyor-belt","briefcase-business","brick-wall","brick-wall-shield","brick-wall-fire","brain","brain-cog","brain-circuit","brackets","braces","boxes","box","bow-arrow","bottle-wine","bot","bot-off","bot-message-square","boom-box","bookmark","bookmark-x","bookmark-plus","bookmark-minus","bookmark-check","book","book-x","book-user","book-up","book-up-2","book-type","book-text","book-search","book-plus","book-open","book-open-text","book-open-check","book-minus","book-marked","book-lock","book-key","book-image","book-heart","book-headphones","book-down","book-dashed","book-copy","book-check","book-audio","book-alert","book-a","bone","bomb","bolt","bold","bluetooth","bluetooth-searching","bluetooth-off","bluetooth-connected","blocks","blinds","blend","bitcoin","birdhouse","bird","biohazard","binoculars","binary","bike","biceps-flexed","between-vertical-start","between-vertical-end","between-horizontal-start","between-horizontal-end","bell","bell-ring","bell-plus","bell-off","bell-minus","bell-electric","bell-dot","beer","beer-off","beef","bed","bed-single","bed-double","bean","bean-off","beaker","battery","battery-warning","battery-plus","battery-medium","battery-low","battery-full","battery-charging","bath","baseline","barrel","barcode","banknote","banknote-x","banknote-arrow-up","banknote-arrow-down","bandage","banana","ban","balloon","baggage-claim","badge","badge-x","badge-turkish-lira","badge-swiss-franc","badge-russian-ruble","badge-question-mark","badge-pound-sterling","badge-plus","badge-percent","badge-minus","badge-japanese-yen","badge-info","badge-indian-rupee","badge-euro","badge-dollar-sign","badge-check","badge-cent","badge-alert","backpack","baby","axis-3d","axe","award","audio-waveform","audio-lines","atom","at-sign","asterisk","arrows-up-from-line","arrow-up","arrow-up-z-a","arrow-up-wide-narrow","arrow-up-to-line","arrow-up-right","arrow-up-narrow-wide","arrow-up-left","arrow-up-from-line","arrow-up-from-dot","arrow-up-down","arrow-up-a-z","arrow-up-1-0","arrow-up-0-1","arrow-right","arrow-right-to-line","arrow-right-left","arrow-right-from-line","arrow-left","arrow-left-to-line","arrow-left-right","arrow-left-from-line","arrow-down","arrow-down-z-a","arrow-down-wide-narrow","arrow-down-up","arrow-down-to-line","arrow-down-to-dot","arrow-down-right","arrow-down-narrow-wide","arrow-down-left","arrow-down-from-line","arrow-down-a-z","arrow-down-1-0","arrow-down-0-1","arrow-big-up","arrow-big-up-dash","arrow-big-right","arrow-big-right-dash","arrow-big-left","arrow-big-left-dash","arrow-big-down","arrow-big-down-dash","armchair","archive","archive-x","archive-restore","apple","app-window","app-window-mac","aperture","anvil","antenna","annoyed","angry","anchor","amphora","ampersands","ampersand","ambulance","align-vertical-space-between","align-vertical-space-around","align-vertical-justify-start","align-vertical-justify-end","align-vertical-justify-center","align-vertical-distribute-start","align-vertical-distribute-end","align-vertical-distribute-center","align-start-vertical","align-start-horizontal","align-horizontal-space-between","align-horizontal-space-around","align-horizontal-justify-start","align-horizontal-justify-end","align-horizontal-justify-center","align-horizontal-distribute-start","align-horizontal-distribute-end","align-horizontal-distribute-center","align-end-vertical","align-end-horizontal","align-center-vertical","align-center-horizontal","album","alarm-smoke","alarm-clock","alarm-clock-plus","alarm-clock-off","alarm-clock-minus","alarm-clock-check","airplay","air-vent","activity","accessibility","a-large-small","a-arrow-up","a-arrow-down"],Dl=e=>{const{value:o,defaultValue:t,onChange:n,isOpen:a,onOpen:l,onClose:c,closeOnSelect:s=!0}=e,[d,g]=h.useState(a??!1),[m,f]=h.useState(o??t),[p,u]=h.useState(""),y=h.useRef(null),k=h.useRef(null);h.useEffect(()=>{o!==void 0&&f(o)},[o]),h.useEffect(()=>{a!==void 0&&g(a)},[a]);const x=h.useMemo(()=>p?El.filter(b=>b.toLowerCase().includes(p.toLowerCase())).slice(0,100):El.slice(0,100),[p]);h.useEffect(()=>{const b=I=>{d&&y.current&&k.current&&!y.current.contains(I.target)&&!k.current.contains(I.target)&&C()};if(!(typeof document>"u"))return document.addEventListener("mousedown",b),()=>document.removeEventListener("mousedown",b)},[d]);const C=h.useCallback(()=>{a===void 0&&g(!1),c&&c()},[c,a]),S=h.useCallback(()=>{const b=!d;a===void 0&&g(b),b?(l&&l(),u("")):c&&c()},[d,l,c,a]),w=h.useCallback(b=>{o===void 0&&f(b),n&&n(b),s&&C()},[n,s,C,o]),v=h.useCallback(b=>{u(b)},[]);return{isOpen:d,selectedIcon:m,searchQuery:p,filteredIcons:x,handleToggle:S,handleIconSelect:w,handleSearchChange:v,handleClose:C,triggerRef:y,dropdownRef:k}},Ao={container:{position:"relative",display:"inline-block",width:"100%"},trigger:{display:"flex",alignItems:"center",justifyContent:"space-between",cursor:"pointer",transition:"all 0.2s ease-in-out"},dropdown:{position:"absolute",mixBlendMode:"normal",top:"calc(100% + 4px)",left:0,right:0,zIndex:1e3,backgroundColor:"color-white",borderRadius:12,borderWidth:"1px",borderStyle:"solid",borderColor:"color-gray-200",boxShadow:"0 4px 12px rgba(0, 0, 0, 0.1)",padding:"16px",minWidth:"280px",maxHeight:"320px",overflow:"hidden",display:"flex",flexDirection:"column"},searchInput:{marginBottom:"12px",flexShrink:0},iconGrid:{display:"grid",gridTemplateColumns:"repeat(6, 1fr)",flexDirection:"row",flexWrap:"wrap",justifyContent:"flex-start",gap:"8px",overflowY:"auto",padding:"4px",color:"color-black",flexGrow:1},iconItem:{width:"32px",height:"32px",display:"flex",alignItems:"center",justifyContent:"center",cursor:"pointer",borderRadius:8,transition:"all 0.2s ease-in-out"}},Jf={xs:{height:"28px",fontSize:"12px",padding:"4px 8px"},sm:{height:"32px",fontSize:"12px",padding:"6px 10px"},md:{height:"40px",fontSize:"14px",padding:"8px 12px"},lg:{height:"48px",fontSize:"14px",padding:"10px 14px"},xl:{height:"56px",fontSize:"16px",padding:"12px 16px"}},Qf={default:{borderRadius:8},square:{borderRadius:0},rounded:{borderRadius:8},pill:{borderRadius:9999}},Zf={default:{backgroundColor:"color-white",borderWidth:"1px",borderStyle:"solid",borderColor:"color-gray-200",color:"color-gray-800"},outline:{backgroundColor:"transparent",borderWidth:"1px",borderStyle:"solid",borderColor:"color-gray-200",color:"color-gray-800"},filled:{backgroundColor:"color-gray-50",borderWidth:"1px",borderStyle:"solid",borderColor:"color-gray-200",color:"color-gray-800"}},$l=({label:e,placeholder:o="Select an icon",helperText:t,views:n={},size:a="md",shape:l="default",variant:c="default",error:s=!1,isDisabled:d=!1,isReadOnly:g=!1,showSearch:m=!0,isOpen:f,selectedIcon:p,searchQuery:u,filteredIcons:y,handleToggle:k,handleIconSelect:x,handleSearchChange:C,triggerRef:S,dropdownRef:w,handleClose:v,onChange:b,value:I,defaultValue:T,onOpen:P,onClose:E,closeOnSelect:D,...z})=>{const{getColor:A}=i.useTheme(),W={...Ao.container,...n==null?void 0:n.container},H={...Ao.trigger,...Jf[a],...Qf[l],...Zf[c],...s&&{borderColor:"color-red-500"},...d&&{opacity:.6,cursor:"not-allowed"},...!d&&!g&&{_hover:{borderColor:"color-gray-300"}},...n==null?void 0:n.trigger},V={...Ao.dropdown,...n==null?void 0:n.dropdown},j={...Ao.iconGrid,...n==null?void 0:n.iconGrid};return r.jsxs(i.View,{...W,...z,children:[e&&r.jsx(i.Text,{fontSize:a==="xs"?"12px":a==="sm"?"14px":"16px",fontWeight:"500",color:"color-gray-700",marginBottom:"4px",...n==null?void 0:n.label,children:e}),r.jsxs(i.View,{ref:S,onClick:d||g?void 0:k,...H,children:[r.jsx(i.Horizontal,{alignItems:"center",gap:8,width:"100%",children:p?r.jsxs(i.Horizontal,{alignItems:"center",gap:8,width:"100%",children:[r.jsx(xr,{name:p,widthHeight:16}),r.jsx(i.Text,{color:"color-gray-800",fontSize:"inherit",style:{flex:1,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:p})]}):r.jsx(i.Text,{color:"color-gray-500",fontSize:"inherit",children:o})}),!g&&!d&&r.jsx(he,{widthHeight:16,color:"color-gray-500",orientation:f?"up":"down"})]}),f&&r.jsxs(i.View,{ref:w,...V,children:[m&&r.jsx(i.View,{...Ao.searchInput,...n==null?void 0:n.searchInput,children:r.jsx(je,{placeholder:"Search icons...",value:u,onChange:M=>C(M),size:"sm",autoFocus:!0})}),r.jsx(i.View,{...j,children:y.length>0?y.map(M=>r.jsx(i.View,{...Ao.iconItem,onClick:()=>x(M),title:M,_hover:{backgroundColor:"color-gray-50",transform:"scale(1.05)"},backgroundColor:p===M?"#EFF6FF":"transparent",borderWidth:p===M?"1px":"0px",borderStyle:"solid",borderColor:p===M?"#BFDBFE":"transparent",...n==null?void 0:n.iconItem,children:r.jsx(xr,{name:M,widthHeight:20})},M)):r.jsx(i.View,{gridColumn:"1 / -1",padding:"20px",textAlign:"center",color:"color-gray-500",children:r.jsx(i.Text,{fontSize:"14px",children:"No icons found"})})})]}),t&&r.jsx(i.Text,{color:s?"color-red-500":"color-gray-600",marginTop:"4px",...n==null?void 0:n.helperText,children:t})]})},Rf=e=>{const o=xe(e),t={...e,value:o.value??e.value??e.defaultValue},n=Dl(t),a=l=>{n.handleIconSelect(l),o.onChange(l)};return r.jsx($l,{...n,...t,handleIconSelect:a})},to={container:{position:"relative",display:"inline-block",width:"100%"},trigger:{display:"flex",alignItems:"center",justifyContent:"space-between",cursor:"pointer",transition:"all 0.2s ease-in-out"},dropdown:{position:"absolute",mixBlendMode:"normal",top:"calc(100% + 4px)",left:0,right:0,zIndex:1e3,backgroundColor:"color-white",borderRadius:12,borderWidth:"1px",borderStyle:"solid",borderColor:"color-gray-200",boxShadow:"0 4px 12px rgba(0, 0, 0, 0.1)",padding:"16px",minWidth:"320px",maxHeight:"400px",overflow:"hidden"},searchInput:{marginBottom:"12px"},categoryTabs:{display:"flex",flexDirection:"row",flexWrap:"wrap",borderBottom:"1px solid color-gray-100",marginBottom:"12px",overflowX:"auto"},categoryTab:{padding:"8px 12px",cursor:"pointer",borderBottom:"2px solid transparent",transition:"all 0.2s ease-in-out",fontSize:"14px",fontWeight:"500",color:"color-gray-600",whiteSpace:"nowrap",borderRadius:"8px 8px 0 0"},emojiGrid:{display:"grid",gridTemplateColumns:"repeat(8, 1fr)",flexDirection:"row",flexWrap:"wrap",justifyContent:"flex-start",gap:"4px",maxHeight:"240px",overflowY:"auto",padding:"4px",color:"color-black"},emoji:{width:"32px",height:"32px",display:"flex",alignItems:"center",justifyContent:"center",cursor:"pointer",borderRadius:6,fontSize:"20px",transition:"all 0.2s ease-in-out"}},em={xs:{height:"28px",fontSize:"12px",padding:"4px 8px"},sm:{height:"32px",fontSize:"12px",padding:"6px 10px"},md:{height:"40px",fontSize:"14px",padding:"8px 12px"},lg:{height:"48px",fontSize:"14px",padding:"10px 14px"},xl:{height:"56px",fontSize:"16px",padding:"12px 16px"}},om={default:{borderRadius:8},square:{borderRadius:0},rounded:{borderRadius:8},pill:{borderRadius:9999}},rm={default:{backgroundColor:"color-white",borderWidth:"1px",borderStyle:"solid",borderColor:"color-gray-200",color:"color-gray-800"},outline:{backgroundColor:"transparent",borderWidth:"1px",borderStyle:"solid",borderColor:"color-gray-200",color:"color-gray-800"},filled:{backgroundColor:"color-gray-50",borderWidth:"1px",borderStyle:"solid",borderColor:"color-gray-200",color:"color-gray-800"}},tm={recent:"🕒",smileys:"😀",people:"👤",animals:"🐶",food:"🍎",activities:"⚽",travel:"🚗",objects:"💡",symbols:"❤️",flags:"🏁"},nm=[{emoji:"😀",name:"grinning face",category:"smileys",keywords:["happy","smile","grin"]},{emoji:"😃",name:"grinning face with big eyes",category:"smileys",keywords:["happy","smile","joy"]},{emoji:"😄",name:"grinning face with smiling eyes",category:"smileys",keywords:["happy","smile","joy"]},{emoji:"😁",name:"beaming face with smiling eyes",category:"smileys",keywords:["happy","smile","grin"]},{emoji:"😆",name:"grinning squinting face",category:"smileys",keywords:["happy","laugh","smile"]},{emoji:"😅",name:"grinning face with sweat",category:"smileys",keywords:["happy","sweat","relief"]},{emoji:"🤣",name:"rolling on the floor laughing",category:"smileys",keywords:["laugh","funny","rofl"]},{emoji:"😂",name:"face with tears of joy",category:"smileys",keywords:["laugh","cry","joy"]},{emoji:"🙂",name:"slightly smiling face",category:"smileys",keywords:["smile","happy"]},{emoji:"🙃",name:"upside-down face",category:"smileys",keywords:["silly","upside down"]},{emoji:"😉",name:"winking face",category:"smileys",keywords:["wink","flirt"]},{emoji:"😊",name:"smiling face with smiling eyes",category:"smileys",keywords:["happy","smile","blush"]},{emoji:"😇",name:"smiling face with halo",category:"smileys",keywords:["angel","innocent"]},{emoji:"🥰",name:"smiling face with hearts",category:"smileys",keywords:["love","hearts","adore"]},{emoji:"😍",name:"smiling face with heart-eyes",category:"smileys",keywords:["love","heart","eyes"]},{emoji:"🤩",name:"star-struck",category:"smileys",keywords:["star","struck","amazed"]},{emoji:"😘",name:"face blowing a kiss",category:"smileys",keywords:["kiss","love","flirt"]},{emoji:"😗",name:"kissing face",category:"smileys",keywords:["kiss","love"]},{emoji:"☺️",name:"smiling face",category:"smileys",keywords:["smile","happy","content"]},{emoji:"😚",name:"kissing face with closed eyes",category:"smileys",keywords:["kiss","love","closed eyes"]},{emoji:"😙",name:"kissing face with smiling eyes",category:"smileys",keywords:["kiss","love","smile"]},{emoji:"🥲",name:"smiling face with tear",category:"smileys",keywords:["happy","cry","tear","bittersweet"]},{emoji:"😋",name:"face savoring food",category:"smileys",keywords:["yum","delicious","food"]},{emoji:"😛",name:"face with tongue",category:"smileys",keywords:["tongue","silly","playful"]},{emoji:"😜",name:"winking face with tongue",category:"smileys",keywords:["wink","tongue","silly"]},{emoji:"🤪",name:"zany face",category:"smileys",keywords:["crazy","silly","wild"]},{emoji:"😝",name:"squinting face with tongue",category:"smileys",keywords:["tongue","silly","playful"]},{emoji:"🤑",name:"money-mouth face",category:"smileys",keywords:["money","rich","greedy"]},{emoji:"🤗",name:"hugging face",category:"smileys",keywords:["hug","love","care"]},{emoji:"🤭",name:"face with hand over mouth",category:"smileys",keywords:["oops","secret","quiet"]},{emoji:"🫢",name:"face with open eyes and hand over mouth",category:"smileys",keywords:["surprise","shock","oops"]},{emoji:"🫣",name:"face with peeking eye",category:"smileys",keywords:["peek","shy","embarrassed"]},{emoji:"🤫",name:"shushing face",category:"smileys",keywords:["quiet","secret","shh"]},{emoji:"🤔",name:"thinking face",category:"smileys",keywords:["think","consider","hmm"]},{emoji:"🫡",name:"saluting face",category:"smileys",keywords:["salute","respect","military"]},{emoji:"🤐",name:"zipper-mouth face",category:"smileys",keywords:["quiet","secret","zip"]},{emoji:"🤨",name:"face with raised eyebrow",category:"smileys",keywords:["suspicious","doubt","skeptical"]},{emoji:"😐",name:"neutral face",category:"smileys",keywords:["neutral","meh","blank"]},{emoji:"😑",name:"expressionless face",category:"smileys",keywords:["blank","deadpan","meh"]},{emoji:"😶",name:"face without mouth",category:"smileys",keywords:["quiet","speechless","silent"]},{emoji:"🫥",name:"dotted line face",category:"smileys",keywords:["invisible","depressed","disappear"]},{emoji:"😏",name:"smirking face",category:"smileys",keywords:["smirk","smug","confident"]},{emoji:"😒",name:"unamused face",category:"smileys",keywords:["unamused","bored","annoyed"]},{emoji:"🙄",name:"face with rolling eyes",category:"smileys",keywords:["eye roll","annoyed","whatever"]},{emoji:"😬",name:"grimacing face",category:"smileys",keywords:["grimace","awkward","oops"]},{emoji:"😮‍💨",name:"face exhaling",category:"smileys",keywords:["sigh","relief","tired"]},{emoji:"🤥",name:"lying face",category:"smileys",keywords:["lie","pinocchio","dishonest"]},{emoji:"😌",name:"relieved face",category:"smileys",keywords:["relief","calm","peaceful"]},{emoji:"😔",name:"pensive face",category:"smileys",keywords:["sad","thoughtful","pensive"]},{emoji:"😪",name:"sleepy face",category:"smileys",keywords:["sleepy","tired","drowsy"]},{emoji:"🤤",name:"drooling face",category:"smileys",keywords:["drool","desire","sleep"]},{emoji:"😴",name:"sleeping face",category:"smileys",keywords:["sleep","tired","zzz"]},{emoji:"😷",name:"face with medical mask",category:"smileys",keywords:["mask","sick","doctor"]},{emoji:"🤒",name:"face with thermometer",category:"smileys",keywords:["sick","fever","ill"]},{emoji:"🤕",name:"face with head-bandage",category:"smileys",keywords:["hurt","injured","bandage"]},{emoji:"🤢",name:"nauseated face",category:"smileys",keywords:["sick","nausea","disgusted"]},{emoji:"🤮",name:"face vomiting",category:"smileys",keywords:["vomit","sick","disgusted"]},{emoji:"🤧",name:"sneezing face",category:"smileys",keywords:["sneeze","sick","gesundheit"]},{emoji:"🥵",name:"hot face",category:"smileys",keywords:["hot","heat","sweat"]},{emoji:"🥶",name:"cold face",category:"smileys",keywords:["cold","freeze","blue"]},{emoji:"🥴",name:"woozy face",category:"smileys",keywords:["dizzy","drunk","confused"]},{emoji:"😵",name:"dizzy face",category:"smileys",keywords:["dizzy","confused","knocked out"]},{emoji:"😵‍💫",name:"face with spiral eyes",category:"smileys",keywords:["dizzy","hypnotized","confused"]},{emoji:"🤯",name:"exploding head",category:"smileys",keywords:["mind blown","shocked","amazed"]},{emoji:"🤠",name:"cowboy hat face",category:"smileys",keywords:["cowboy","hat","western"]},{emoji:"🥳",name:"partying face",category:"smileys",keywords:["party","celebration","birthday"]},{emoji:"🥸",name:"disguised face",category:"smileys",keywords:["disguise","glasses","incognito"]},{emoji:"😎",name:"smiling face with sunglasses",category:"smileys",keywords:["cool","sunglasses","awesome"]},{emoji:"🤓",name:"nerd face",category:"smileys",keywords:["nerd","geek","smart"]},{emoji:"🧐",name:"face with monocle",category:"smileys",keywords:["monocle","fancy","inspection"]},{emoji:"👋",name:"waving hand",category:"people",keywords:["wave","hello","goodbye"]},{emoji:"🤚",name:"raised back of hand",category:"people",keywords:["hand","stop"]},{emoji:"🖐️",name:"hand with fingers splayed",category:"people",keywords:["hand","five"]},{emoji:"✋",name:"raised hand",category:"people",keywords:["hand","stop","high five"]},{emoji:"🖖",name:"vulcan salute",category:"people",keywords:["spock","vulcan"]},{emoji:"👌",name:"OK hand",category:"people",keywords:["ok","perfect"]},{emoji:"🤌",name:"pinched fingers",category:"people",keywords:["italian","chef kiss"]},{emoji:"🤏",name:"pinching hand",category:"people",keywords:["small","tiny"]},{emoji:"✌️",name:"victory hand",category:"people",keywords:["peace","victory"]},{emoji:"🤞",name:"crossed fingers",category:"people",keywords:["luck","hope"]},{emoji:"🤟",name:"love-you gesture",category:"people",keywords:["love","you"]},{emoji:"🤘",name:"sign of the horns",category:"people",keywords:["rock","metal"]},{emoji:"🤙",name:"call me hand",category:"people",keywords:["call","phone"]},{emoji:"👈",name:"backhand index pointing left",category:"people",keywords:["point","left"]},{emoji:"👉",name:"backhand index pointing right",category:"people",keywords:["point","right"]},{emoji:"👆",name:"backhand index pointing up",category:"people",keywords:["point","up"]},{emoji:"🖕",name:"middle finger",category:"people",keywords:["middle finger","rude"]},{emoji:"👇",name:"backhand index pointing down",category:"people",keywords:["point","down"]},{emoji:"☝️",name:"index pointing up",category:"people",keywords:["point","up","one"]},{emoji:"👍",name:"thumbs up",category:"people",keywords:["thumbs up","good","yes"]},{emoji:"👎",name:"thumbs down",category:"people",keywords:["thumbs down","bad","no"]},{emoji:"✊",name:"raised fist",category:"people",keywords:["fist","power","solidarity"]},{emoji:"👊",name:"oncoming fist",category:"people",keywords:["fist","punch","bump"]},{emoji:"🤛",name:"left-facing fist",category:"people",keywords:["fist","bump","left"]},{emoji:"🤜",name:"right-facing fist",category:"people",keywords:["fist","bump","right"]},{emoji:"👏",name:"clapping hands",category:"people",keywords:["clap","applause","bravo"]},{emoji:"🙌",name:"raising hands",category:"people",keywords:["celebration","hooray","praise"]},{emoji:"👐",name:"open hands",category:"people",keywords:["open","hug","jazz hands"]},{emoji:"🤲",name:"palms up together",category:"people",keywords:["prayer","please","hope"]},{emoji:"🤝",name:"handshake",category:"people",keywords:["handshake","deal","agreement"]},{emoji:"🙏",name:"folded hands",category:"people",keywords:["prayer","thanks","please"]},{emoji:"✍️",name:"writing hand",category:"people",keywords:["write","author","signature"]},{emoji:"💅",name:"nail polish",category:"people",keywords:["nails","beauty","manicure"]},{emoji:"🤳",name:"selfie",category:"people",keywords:["selfie","camera","phone"]},{emoji:"💪",name:"flexed biceps",category:"people",keywords:["muscle","strong","flex"]},{emoji:"🦾",name:"mechanical arm",category:"people",keywords:["robot","prosthetic","cyborg"]},{emoji:"🦿",name:"mechanical leg",category:"people",keywords:["robot","prosthetic","cyborg"]},{emoji:"🦵",name:"leg",category:"people",keywords:["leg","limb","kick"]},{emoji:"🦶",name:"foot",category:"people",keywords:["foot","kick","stomp"]},{emoji:"👂",name:"ear",category:"people",keywords:["ear","hear","listen"]},{emoji:"🦻",name:"ear with hearing aid",category:"people",keywords:["hearing aid","deaf","accessibility"]},{emoji:"👃",name:"nose",category:"people",keywords:["nose","smell","sniff"]},{emoji:"🧠",name:"brain",category:"people",keywords:["brain","smart","think"]},{emoji:"🫀",name:"anatomical heart",category:"people",keywords:["heart","organ","love"]},{emoji:"🫁",name:"lungs",category:"people",keywords:["lungs","breathe","organ"]},{emoji:"🦷",name:"tooth",category:"people",keywords:["tooth","dental","smile"]},{emoji:"🦴",name:"bone",category:"people",keywords:["bone","skeleton","dog"]},{emoji:"👀",name:"eyes",category:"people",keywords:["eyes","look","see"]},{emoji:"👁️",name:"eye",category:"people",keywords:["eye","see","watch"]},{emoji:"👅",name:"tongue",category:"people",keywords:["tongue","taste","lick"]},{emoji:"👄",name:"mouth",category:"people",keywords:["mouth","lips","kiss"]},{emoji:"🫦",name:"biting lip",category:"people",keywords:["lip","bite","nervous"]},{emoji:"👶",name:"baby",category:"people",keywords:["baby","infant","child"]},{emoji:"🧒",name:"child",category:"people",keywords:["child","kid","young"]},{emoji:"👦",name:"boy",category:"people",keywords:["boy","child","male"]},{emoji:"👧",name:"girl",category:"people",keywords:["girl","child","female"]},{emoji:"🧑",name:"person",category:"people",keywords:["person","adult","human"]},{emoji:"👱",name:"person: blond hair",category:"people",keywords:["blond","hair","person"]},{emoji:"👨",name:"man",category:"people",keywords:["man","male","adult"]},{emoji:"🧔",name:"person: beard",category:"people",keywords:["beard","man","facial hair"]},{emoji:"👩",name:"woman",category:"people",keywords:["woman","female","adult"]},{emoji:"🧓",name:"older person",category:"people",keywords:["old","elderly","senior"]},{emoji:"👴",name:"old man",category:"people",keywords:["old","man","elderly"]},{emoji:"👵",name:"old woman",category:"people",keywords:["old","woman","elderly"]},{emoji:"🐶",name:"dog face",category:"animals",keywords:["dog","pet","animal"]},{emoji:"🐱",name:"cat face",category:"animals",keywords:["cat","pet","animal"]},{emoji:"🐭",name:"mouse face",category:"animals",keywords:["mouse","animal"]},{emoji:"🐹",name:"hamster",category:"animals",keywords:["hamster","pet"]},{emoji:"🐰",name:"rabbit face",category:"animals",keywords:["rabbit","bunny"]},{emoji:"🦊",name:"fox",category:"animals",keywords:["fox","animal"]},{emoji:"🐻",name:"bear",category:"animals",keywords:["bear","animal"]},{emoji:"🐼",name:"panda",category:"animals",keywords:["panda","bear"]},{emoji:"🐨",name:"koala",category:"animals",keywords:["koala","australia","marsupial"]},{emoji:"🐯",name:"tiger face",category:"animals",keywords:["tiger","cat","wild"]},{emoji:"🦁",name:"lion",category:"animals",keywords:["lion","king","cat"]},{emoji:"🐮",name:"cow face",category:"animals",keywords:["cow","moo","farm"]},{emoji:"🐷",name:"pig face",category:"animals",keywords:["pig","oink","farm"]},{emoji:"🐽",name:"pig nose",category:"animals",keywords:["pig","nose","snout"]},{emoji:"🐸",name:"frog",category:"animals",keywords:["frog","amphibian","green"]},{emoji:"🐵",name:"monkey face",category:"animals",keywords:["monkey","primate","banana"]},{emoji:"🙈",name:"see-no-evil monkey",category:"animals",keywords:["monkey","see no evil","eyes"]},{emoji:"🙉",name:"hear-no-evil monkey",category:"animals",keywords:["monkey","hear no evil","ears"]},{emoji:"🙊",name:"speak-no-evil monkey",category:"animals",keywords:["monkey","speak no evil","mouth"]},{emoji:"🐒",name:"monkey",category:"animals",keywords:["monkey","primate","zoo"]},{emoji:"🦍",name:"gorilla",category:"animals",keywords:["gorilla","ape","strong"]},{emoji:"🦧",name:"orangutan",category:"animals",keywords:["orangutan","ape","orange"]},{emoji:"🐺",name:"wolf",category:"animals",keywords:["wolf","howl","wild"]},{emoji:"🐗",name:"boar",category:"animals",keywords:["boar","pig","wild"]},{emoji:"🐴",name:"horse face",category:"animals",keywords:["horse","neigh","ride"]},{emoji:"🐎",name:"horse",category:"animals",keywords:["horse","racing","gallop"]},{emoji:"🦄",name:"unicorn",category:"animals",keywords:["unicorn","magical","horn"]},{emoji:"🦓",name:"zebra",category:"animals",keywords:["zebra","stripes","africa"]},{emoji:"🦌",name:"deer",category:"animals",keywords:["deer","antlers","forest"]},{emoji:"🦏",name:"rhinoceros",category:"animals",keywords:["rhino","horn","africa"]},{emoji:"🦛",name:"hippopotamus",category:"animals",keywords:["hippo","water","africa"]},{emoji:"🐘",name:"elephant",category:"animals",keywords:["elephant","trunk","memory"]},{emoji:"🦒",name:"giraffe",category:"animals",keywords:["giraffe","tall","neck"]},{emoji:"🦘",name:"kangaroo",category:"animals",keywords:["kangaroo","hop","australia"]},{emoji:"🦥",name:"sloth",category:"animals",keywords:["sloth","slow","lazy"]},{emoji:"🦦",name:"otter",category:"animals",keywords:["otter","water","cute"]},{emoji:"🦨",name:"skunk",category:"animals",keywords:["skunk","smell","stripe"]},{emoji:"🦡",name:"badger",category:"animals",keywords:["badger","honey","dig"]},{emoji:"🐾",name:"paw prints",category:"animals",keywords:["paw","prints","tracks"]},{emoji:"🐔",name:"chicken",category:"animals",keywords:["chicken","rooster","farm"]},{emoji:"🐓",name:"rooster",category:"animals",keywords:["rooster","cock","morning"]},{emoji:"🐣",name:"hatching chick",category:"animals",keywords:["chick","hatching","egg"]},{emoji:"🐤",name:"baby chick",category:"animals",keywords:["chick","baby","yellow"]},{emoji:"🐥",name:"front-facing baby chick",category:"animals",keywords:["chick","baby","cute"]},{emoji:"🦆",name:"duck",category:"animals",keywords:["duck","quack","water"]},{emoji:"🦅",name:"eagle",category:"animals",keywords:["eagle","bird","freedom"]},{emoji:"🦉",name:"owl",category:"animals",keywords:["owl","wise","night"]},{emoji:"🦇",name:"bat",category:"animals",keywords:["bat","vampire","night"]},{emoji:"",name:"bug",category:"animals",keywords:["bug","insect","crawl"]},{emoji:"🦋",name:"butterfly",category:"animals",keywords:["butterfly","beautiful","fly"]},{emoji:"🐌",name:"snail",category:"animals",keywords:["snail","slow","shell"]},{emoji:"🐞",name:"lady beetle",category:"animals",keywords:["ladybug","beetle","red"]},{emoji:"🐜",name:"ant",category:"animals",keywords:["ant","work","colony"]},{emoji:"🦟",name:"mosquito",category:"animals",keywords:["mosquito","bite","buzz"]},{emoji:"🕷️",name:"spider",category:"animals",keywords:["spider","web","eight legs"]},{emoji:"🦂",name:"scorpion",category:"animals",keywords:["scorpion","sting","desert"]},{emoji:"🐢",name:"turtle",category:"animals",keywords:["turtle","slow","shell"]},{emoji:"🐍",name:"snake",category:"animals",keywords:["snake","slither","reptile"]},{emoji:"🦎",name:"lizard",category:"animals",keywords:["lizard","gecko","reptile"]},{emoji:"🐙",name:"octopus",category:"animals",keywords:["octopus","tentacles","sea"]},{emoji:"🦑",name:"squid",category:"animals",keywords:["squid","tentacles","ocean"]},{emoji:"🦐",name:"shrimp",category:"animals",keywords:["shrimp","seafood","small"]},{emoji:"🦞",name:"lobster",category:"animals",keywords:["lobster","claws","red"]},{emoji:"🦀",name:"crab",category:"animals",keywords:["crab","claws","beach"]},{emoji:"🐡",name:"blowfish",category:"animals",keywords:["blowfish","puffer","spiky"]},{emoji:"🐠",name:"tropical fish",category:"animals",keywords:["fish","tropical","colorful"]},{emoji:"🐟",name:"fish",category:"animals",keywords:["fish","swim","water"]},{emoji:"🐬",name:"dolphin",category:"animals",keywords:["dolphin","smart","ocean"]},{emoji:"🐳",name:"spouting whale",category:"animals",keywords:["whale","spout","big"]},{emoji:"🐋",name:"whale",category:"animals",keywords:["whale","ocean","huge"]},{emoji:"🦈",name:"shark",category:"animals",keywords:["shark","teeth","dangerous"]},{emoji:"🐊",name:"crocodile",category:"animals",keywords:["crocodile","teeth","swamp"]},{emoji:"🌸",name:"cherry blossom",category:"animals",keywords:["flower","spring","pink"]},{emoji:"💐",name:"bouquet",category:"animals",keywords:["flowers","bouquet","gift"]},{emoji:"🌺",name:"hibiscus",category:"animals",keywords:["flower","tropical","red"]},{emoji:"🌻",name:"sunflower",category:"animals",keywords:["sunflower","yellow","big"]},{emoji:"🌹",name:"rose",category:"animals",keywords:["rose","love","red"]},{emoji:"🥀",name:"wilted flower",category:"animals",keywords:["flower","wilted","sad"]},{emoji:"🌷",name:"tulip",category:"animals",keywords:["tulip","spring","netherlands"]},{emoji:"🌼",name:"daisy",category:"animals",keywords:["daisy","white","simple"]},{emoji:"🌱",name:"seedling",category:"animals",keywords:["plant","grow","green"]},{emoji:"🌿",name:"herb",category:"animals",keywords:["herb","green","leaf"]},{emoji:"🍀",name:"four leaf clover",category:"animals",keywords:["clover","luck","green"]},{emoji:"🌳",name:"deciduous tree",category:"animals",keywords:["tree","nature","green"]},{emoji:"🌲",name:"evergreen tree",category:"animals",keywords:["tree","pine","christmas"]},{emoji:"🌴",name:"palm tree",category:"animals",keywords:["palm","tropical","beach"]},{emoji:"🌵",name:"cactus",category:"animals",keywords:["cactus","desert","spiky"]},{emoji:"🍎",name:"red apple",category:"food",keywords:["apple","fruit"]},{emoji:"🍊",name:"tangerine",category:"food",keywords:["orange","fruit"]},{emoji:"🍋",name:"lemon",category:"food",keywords:["lemon","fruit"]},{emoji:"🍌",name:"banana",category:"food",keywords:["banana","fruit"]},{emoji:"🍉",name:"watermelon",category:"food",keywords:["watermelon","fruit"]},{emoji:"🍇",name:"grapes",category:"food",keywords:["grapes","fruit"]},{emoji:"🍓",name:"strawberry",category:"food",keywords:["strawberry","fruit"]},{emoji:"🫐",name:"blueberries",category:"food",keywords:["blueberry","fruit"]},{emoji:"🥝",name:"kiwi fruit",category:"food",keywords:["kiwi","fruit","green"]},{emoji:"🍅",name:"tomato",category:"food",keywords:["tomato","red","vegetable"]},{emoji:"🫒",name:"olive",category:"food",keywords:["olive","green","oil"]},{emoji:"🥥",name:"coconut",category:"food",keywords:["coconut","tropical","milk"]},{emoji:"🥑",name:"avocado",category:"food",keywords:["avocado","green","healthy"]},{emoji:"🍆",name:"eggplant",category:"food",keywords:["eggplant","purple","vegetable"]},{emoji:"🥔",name:"potato",category:"food",keywords:["potato","vegetable","starch"]},{emoji:"🥕",name:"carrot",category:"food",keywords:["carrot","orange","vegetable"]},{emoji:"🌽",name:"ear of corn",category:"food",keywords:["corn","yellow","vegetable"]},{emoji:"🌶️",name:"hot pepper",category:"food",keywords:["pepper","hot","spicy"]},{emoji:"🫑",name:"bell pepper",category:"food",keywords:["pepper","bell","vegetable"]},{emoji:"🥒",name:"cucumber",category:"food",keywords:["cucumber","green","vegetable"]},{emoji:"🥬",name:"leafy greens",category:"food",keywords:["lettuce","greens","salad"]},{emoji:"🥦",name:"broccoli",category:"food",keywords:["broccoli","green","vegetable"]},{emoji:"🧄",name:"garlic",category:"food",keywords:["garlic","flavor","cooking"]},{emoji:"🧅",name:"onion",category:"food",keywords:["onion","cry","cooking"]},{emoji:"🍄",name:"mushroom",category:"food",keywords:["mushroom","fungi","cooking"]},{emoji:"🥜",name:"peanuts",category:"food",keywords:["peanuts","nuts","snack"]},{emoji:"🌰",name:"chestnut",category:"food",keywords:["chestnut","nut","autumn"]},{emoji:"🍞",name:"bread",category:"food",keywords:["bread","loaf","carbs"]},{emoji:"🥐",name:"croissant",category:"food",keywords:["croissant","french","pastry"]},{emoji:"🥖",name:"baguette bread",category:"food",keywords:["baguette","french","bread"]},{emoji:"🫓",name:"flatbread",category:"food",keywords:["flatbread","bread","thin"]},{emoji:"🥨",name:"pretzel",category:"food",keywords:["pretzel","twisted","snack"]},{emoji:"🥯",name:"bagel",category:"food",keywords:["bagel","round","breakfast"]},{emoji:"🥞",name:"pancakes",category:"food",keywords:["pancakes","breakfast","syrup"]},{emoji:"🧇",name:"waffle",category:"food",keywords:["waffle","breakfast","squares"]},{emoji:"🧀",name:"cheese wedge",category:"food",keywords:["cheese","dairy","yellow"]},{emoji:"🍖",name:"meat on bone",category:"food",keywords:["meat","bone","protein"]},{emoji:"🍗",name:"poultry leg",category:"food",keywords:["chicken","leg","meat"]},{emoji:"🥩",name:"cut of meat",category:"food",keywords:["steak","meat","red"]},{emoji:"🥓",name:"bacon",category:"food",keywords:["bacon","pork","breakfast"]},{emoji:"🍔",name:"hamburger",category:"food",keywords:["burger","hamburger","fast food"]},{emoji:"🍟",name:"french fries",category:"food",keywords:["fries","potato","fast food"]},{emoji:"🍕",name:"pizza",category:"food",keywords:["pizza","slice","italian"]},{emoji:"🌭",name:"hot dog",category:"food",keywords:["hot dog","sausage","fast food"]},{emoji:"🥪",name:"sandwich",category:"food",keywords:["sandwich","bread","lunch"]},{emoji:"🌮",name:"taco",category:"food",keywords:["taco","mexican","shell"]},{emoji:"🌯",name:"burrito",category:"food",keywords:["burrito","wrap","mexican"]},{emoji:"🫔",name:"tamale",category:"food",keywords:["tamale","mexican","corn"]},{emoji:"🥙",name:"stuffed flatbread",category:"food",keywords:["pita","flatbread","stuffed"]},{emoji:"🧆",name:"falafel",category:"food",keywords:["falafel","middle eastern","chickpea"]},{emoji:"🥚",name:"egg",category:"food",keywords:["egg","protein","breakfast"]},{emoji:"🍳",name:"cooking",category:"food",keywords:["cooking","frying pan","egg"]},{emoji:"🥘",name:"shallow pan of food",category:"food",keywords:["paella","pan","cooking"]},{emoji:"🍲",name:"pot of food",category:"food",keywords:["stew","pot","cooking"]},{emoji:"🫕",name:"fondue",category:"food",keywords:["fondue","cheese","pot"]},{emoji:"🥣",name:"bowl with spoon",category:"food",keywords:["bowl","cereal","soup"]},{emoji:"🥗",name:"green salad",category:"food",keywords:["salad","healthy","greens"]},{emoji:"🍿",name:"popcorn",category:"food",keywords:["popcorn","movie","snack"]},{emoji:"🧈",name:"butter",category:"food",keywords:["butter","dairy","spread"]},{emoji:"🧂",name:"salt",category:"food",keywords:["salt","seasoning","white"]},{emoji:"🥫",name:"canned food",category:"food",keywords:["can","canned","preserved"]},{emoji:"🍱",name:"bento box",category:"food",keywords:["bento","japanese","lunch box"]},{emoji:"🍘",name:"rice cracker",category:"food",keywords:["rice","cracker","japanese"]},{emoji:"🍙",name:"rice ball",category:"food",keywords:["rice ball","onigiri","japanese"]},{emoji:"🍚",name:"cooked rice",category:"food",keywords:["rice","cooked","bowl"]},{emoji:"🍛",name:"curry rice",category:"food",keywords:["curry","rice","spicy"]},{emoji:"🍜",name:"steaming bowl",category:"food",keywords:["ramen","noodles","soup"]},{emoji:"🍝",name:"spaghetti",category:"food",keywords:["spaghetti","pasta","italian"]},{emoji:"🍠",name:"roasted sweet potato",category:"food",keywords:["sweet potato","roasted","orange"]},{emoji:"🍢",name:"oden",category:"food",keywords:["oden","japanese","skewer"]},{emoji:"🍣",name:"sushi",category:"food",keywords:["sushi","japanese","fish"]},{emoji:"🍤",name:"fried shrimp",category:"food",keywords:["shrimp","fried","tempura"]},{emoji:"🍥",name:"fish cake with swirl",category:"food",keywords:["fish cake","japanese","swirl"]},{emoji:"🥮",name:"moon cake",category:"food",keywords:["moon cake","chinese","festival"]},{emoji:"🍡",name:"dango",category:"food",keywords:["dango","japanese","sweet"]},{emoji:"🥟",name:"dumpling",category:"food",keywords:["dumpling","chinese","steamed"]},{emoji:"🥠",name:"fortune cookie",category:"food",keywords:["fortune cookie","chinese","luck"]},{emoji:"🥡",name:"takeout box",category:"food",keywords:["takeout","chinese","box"]},{emoji:"🦀",name:"crab",category:"food",keywords:["crab","seafood","claws"]},{emoji:"🦞",name:"lobster",category:"food",keywords:["lobster","seafood","red"]},{emoji:"🦐",name:"shrimp",category:"food",keywords:["shrimp","seafood","small"]},{emoji:"🦑",name:"squid",category:"food",keywords:["squid","seafood","tentacles"]},{emoji:"🦪",name:"oyster",category:"food",keywords:["oyster","seafood","shell"]},{emoji:"🍦",name:"soft ice cream",category:"food",keywords:["ice cream","soft serve","cone"]},{emoji:"🍧",name:"shaved ice",category:"food",keywords:["shaved ice","snow cone","cold"]},{emoji:"🍨",name:"ice cream",category:"food",keywords:["ice cream","dessert","cold"]},{emoji:"🍩",name:"doughnut",category:"food",keywords:["donut","doughnut","sweet"]},{emoji:"🍪",name:"cookie",category:"food",keywords:["cookie","sweet","baked"]},{emoji:"🎂",name:"birthday cake",category:"food",keywords:["cake","birthday","celebration"]},{emoji:"🍰",name:"shortcake",category:"food",keywords:["cake","slice","dessert"]},{emoji:"🧁",name:"cupcake",category:"food",keywords:["cupcake","muffin","sweet"]},{emoji:"🥧",name:"pie",category:"food",keywords:["pie","dessert","slice"]},{emoji:"🍫",name:"chocolate bar",category:"food",keywords:["chocolate","bar","sweet"]},{emoji:"🍬",name:"candy",category:"food",keywords:["candy","sweet","wrapper"]},{emoji:"🍭",name:"lollipop",category:"food",keywords:["lollipop","candy","stick"]},{emoji:"🍮",name:"custard",category:"food",keywords:["custard","pudding","dessert"]},{emoji:"🍯",name:"honey pot",category:"food",keywords:["honey","sweet","bee"]},{emoji:"🍼",name:"baby bottle",category:"food",keywords:["bottle","baby","milk"]},{emoji:"🥛",name:"glass of milk",category:"food",keywords:["milk","glass","dairy"]},{emoji:"☕",name:"hot beverage",category:"food",keywords:["coffee","tea","hot"]},{emoji:"🫖",name:"teapot",category:"food",keywords:["teapot","tea","hot"]},{emoji:"🍵",name:"teacup without handle",category:"food",keywords:["tea","green tea","cup"]},{emoji:"🍶",name:"sake",category:"food",keywords:["sake","japanese","alcohol"]},{emoji:"🍾",name:"bottle with popping cork",category:"food",keywords:["champagne","celebration","cork"]},{emoji:"🍷",name:"wine glass",category:"food",keywords:["wine","glass","alcohol"]},{emoji:"🍸",name:"cocktail glass",category:"food",keywords:["cocktail","martini","alcohol"]},{emoji:"🍹",name:"tropical drink",category:"food",keywords:["tropical","cocktail","umbrella"]},{emoji:"🍺",name:"beer mug",category:"food",keywords:["beer","mug","alcohol"]},{emoji:"🍻",name:"clinking beer mugs",category:"food",keywords:["beer","cheers","celebration"]},{emoji:"🥂",name:"clinking glasses",category:"food",keywords:["champagne","cheers","celebration"]},{emoji:"🥃",name:"tumbler glass",category:"food",keywords:["whiskey","tumbler","alcohol"]},{emoji:"🫗",name:"pouring liquid",category:"food",keywords:["pour","liquid","drink"]},{emoji:"🥤",name:"cup with straw",category:"food",keywords:["soda","straw","drink"]},{emoji:"🧋",name:"bubble tea",category:"food",keywords:["bubble tea","boba","drink"]},{emoji:"🧃",name:"beverage box",category:"food",keywords:["juice box","drink","straw"]},{emoji:"🧉",name:"mate",category:"food",keywords:["mate","tea","south american"]},{emoji:"🧊",name:"ice",category:"food",keywords:["ice","cold","cube"]},{emoji:"⚽",name:"soccer ball",category:"activities",keywords:["soccer","football","sport"]},{emoji:"🏀",name:"basketball",category:"activities",keywords:["basketball","sport"]},{emoji:"🏈",name:"american football",category:"activities",keywords:["football","sport"]},{emoji:"⚾",name:"baseball",category:"activities",keywords:["baseball","sport"]},{emoji:"🥎",name:"softball",category:"activities",keywords:["softball","sport"]},{emoji:"🎾",name:"tennis",category:"activities",keywords:["tennis","sport"]},{emoji:"🚗",name:"automobile",category:"travel",keywords:["car","vehicle"]},{emoji:"🚕",name:"taxi",category:"travel",keywords:["taxi","car"]},{emoji:"🚙",name:"sport utility vehicle",category:"travel",keywords:["suv","car"]},{emoji:"🚌",name:"bus",category:"travel",keywords:["bus","vehicle"]},{emoji:"🚎",name:"trolleybus",category:"travel",keywords:["trolley","bus"]},{emoji:"🏎️",name:"racing car",category:"travel",keywords:["race","car","fast"]},{emoji:"💡",name:"light bulb",category:"objects",keywords:["idea","light","bulb"]},{emoji:"🔋",name:"battery",category:"objects",keywords:["battery","power"]},{emoji:"🖥️",name:"desktop computer",category:"objects",keywords:["computer","desktop"]},{emoji:"💻",name:"laptop",category:"objects",keywords:["laptop","computer"]},{emoji:"📱",name:"mobile phone",category:"objects",keywords:["phone","mobile"]},{emoji:"☎️",name:"telephone",category:"objects",keywords:["phone","telephone"]},{emoji:"❤️",name:"red heart",category:"symbols",keywords:["love","heart"]},{emoji:"🧡",name:"orange heart",category:"symbols",keywords:["love","heart"]},{emoji:"💛",name:"yellow heart",category:"symbols",keywords:["love","heart"]},{emoji:"💚",name:"green heart",category:"symbols",keywords:["love","heart"]},{emoji:"💙",name:"blue heart",category:"symbols",keywords:["love","heart"]},{emoji:"💜",name:"purple heart",category:"symbols",keywords:["love","heart"]},{emoji:"🖤",name:"black heart",category:"symbols",keywords:["love","heart"]},{emoji:"🤍",name:"white heart",category:"symbols",keywords:["love","heart"]},{emoji:"🏁",name:"chequered flag",category:"flags",keywords:["flag","race","finish"]},{emoji:"🚩",name:"triangular flag",category:"flags",keywords:["flag","warning"]},{emoji:"🏳️",name:"white flag",category:"flags",keywords:["flag","surrender"]},{emoji:"🏴",name:"black flag",category:"flags",keywords:["flag","pirate"]},{emoji:"🏳️‍🌈",name:"rainbow flag",category:"flags",keywords:["flag","rainbow","pride"]}],Ll=e=>{const{value:o,defaultValue:t="",onChange:n,onEmojiSelect:a,isOpen:l,onOpen:c,onClose:s,closeOnSelect:d=!0,maxRecentEmojis:g=16,showRecentEmojis:m=!0,enabledCategories:f=["recent","smileys","people","animals","food","activities","travel","objects","symbols","flags"],customEmojis:p=[]}=e,[u,y]=h.useState(l??!1),[k,x]=h.useState(o??t),[C,S]=h.useState(""),[w,v]=h.useState("smileys"),[b,I]=h.useState([]),T=h.useRef(null),P=h.useRef(null),E=h.useMemo(()=>[...nm,...p],[p]),D=h.useMemo(()=>{let M=E;if(w!=="recent"?M=M.filter(L=>L.category===w):M=b,C){const L=C.toLowerCase();M=M.filter(_=>_.name.toLowerCase().includes(L)||_.keywords.some(O=>O.toLowerCase().includes(L)))}return M},[E,w,b,C]);h.useEffect(()=>{o!==void 0&&x(o)},[o]),h.useEffect(()=>{l!==void 0&&y(l)},[l]),h.useEffect(()=>{if(m&&typeof localStorage<"u"){const M=localStorage.getItem("emojiPicker-recentEmojis");if(M)try{I(JSON.parse(M))}catch{}}},[m]),h.useEffect(()=>{if(typeof document>"u")return;const M=L=>{u&&T.current&&P.current&&!T.current.contains(L.target)&&!P.current.contains(L.target)&&j()};return document.addEventListener("mousedown",M),()=>document.removeEventListener("mousedown",M)},[u]);const z=h.useCallback(M=>{m&&I(L=>{const _=L.filter(N=>N.emoji!==M.emoji),O=[M,..._].slice(0,g);return typeof localStorage<"u"&&localStorage.setItem("emojiPicker-recentEmojis",JSON.stringify(O)),O})},[m,g]),A=h.useCallback(()=>{const M=!u;y(M),M?(c==null||c(),S(""),m&&b.length>0?v("recent"):v("smileys")):s==null||s()},[u,c,s,m,b.length]),W=h.useCallback(M=>{x(M.emoji),z(M),n==null||n(M.emoji),a==null||a(M),d&&(y(!1),s==null||s())},[n,a,d,s,z]),H=h.useCallback(M=>{S(M),M&&w==="recent"&&v("smileys")},[w]),V=h.useCallback(M=>{v(M),S("")},[]),j=h.useCallback(()=>{y(!1),s==null||s()},[s]);return{isOpen:u,selectedEmoji:k,recentEmojis:b,searchQuery:C,activeCategory:w,filteredEmojis:D,handleToggle:A,handleEmojiSelect:W,handleSearchChange:H,handleCategoryChange:V,handleClose:j,triggerRef:T,dropdownRef:P}},_l=({id:e,name:o,label:t,placeholder:n="Select an emoji",helperText:a,views:l={},size:c="md",shape:s="default",variant:d="default",error:g=!1,isDisabled:m=!1,isReadOnly:f=!1,showSearch:p=!0,showCategories:u=!0,showRecentEmojis:y=!0,enabledCategories:k=["recent","smileys","people","animals","food","activities","travel","objects","symbols","flags"],isOpen:x,selectedEmoji:C,recentEmojis:S,searchQuery:w,activeCategory:v,filteredEmojis:b,handleToggle:I,handleEmojiSelect:T,handleSearchChange:P,handleCategoryChange:E,handleClose:D,triggerRef:z,dropdownRef:A,onChange:W,onOpen:H,onClose:V,onEmojiSelect:j,customEmojis:M,closeOnSelect:L,maxRecentEmojis:_,value:O,defaultValue:N,...U})=>{const{getColor:X}=i.useTheme(),oe={...to.container,...l==null?void 0:l.container},B={...to.trigger,...em[c],...om[s],...rm[d],...g&&{borderColor:"color-red-500"},...m&&{opacity:.6,cursor:"not-allowed"},...!m&&!f&&{_hover:{borderColor:"color-gray-300"}},...l==null?void 0:l.trigger},$={...to.dropdown,...l==null?void 0:l.dropdown},q={...to.categoryTabs,...l==null?void 0:l.categoryTabs},J={...to.emojiGrid,...l==null?void 0:l.emojiGrid},Y=k.filter(Z=>Z==="recent"?y&&S.length>0:!0);return r.jsxs(i.View,{id:e,...oe,...U,children:[t&&r.jsx(i.Text,{fontSize:c==="xs"?"12px":c==="sm"?"14px":"16px",fontWeight:"500",color:"color-gray-700",marginBottom:"4px",...l==null?void 0:l.label,children:t}),r.jsxs(i.View,{ref:z,onClick:m||f?void 0:I,...B,children:[r.jsx(i.Horizontal,{alignItems:"center",gap:8,children:r.jsx(i.Text,{color:C?"color-gray-800":"color-gray-500",fontSize:"inherit",children:C||n})}),!f&&!m&&r.jsx(he,{widthHeight:16,color:"color-gray-500",orientation:x?"up":"down"})]}),x&&r.jsxs(i.View,{ref:A,...$,children:[p&&r.jsx(i.View,{...to.searchInput,...l==null?void 0:l.searchInput,children:r.jsx(je,{placeholder:"Search emojis...",value:w,onChange:P,size:"sm"})}),u&&r.jsx(i.View,{...q,children:Y.map(Z=>r.jsx(i.View,{...to.categoryTab,...v===Z&&{borderBottomColor:"theme-primary",color:"theme-primary",backgroundColor:"color-blue-50"},onClick:()=>E(Z),title:Z.charAt(0).toUpperCase()+Z.slice(1),...l==null?void 0:l.categoryTab,children:tm[Z]},Z))}),r.jsx(i.View,{...J,children:b.length>0?b.map((Z,ee)=>r.jsx(i.View,{...to.emoji,onClick:()=>T(Z),title:Z.name,_hover:{backgroundColor:"color-gray-50",transform:"scale(1.05)"},color:"color-gray-800",...l==null?void 0:l.emoji,children:Z.emoji},`${Z.emoji}-${ee}`)):r.jsx(i.View,{gridColumn:"1 / -1",padding:"20px",textAlign:"center",color:"color-gray-500",children:r.jsx(i.Text,{fontSize:"14px",children:w?"No emojis found":"No emojis in this category"})})})]}),a&&r.jsx(i.Text,{color:g?"color-red-500":"color-gray-600",marginTop:"4px",...l==null?void 0:l.helperText,children:a})]})},am=e=>{const o=xe(e),t={...e,value:o.value??e.value??e.defaultValue},n=Ll(t),a=l=>{var c;n.handleEmojiSelect(l),o.onChange(l.emoji),(c=e.onEmojiSelect)==null||c.call(e,l)};return r.jsx(_l,{...n,...t,handleEmojiSelect:a})},lm=({files:e,onRemove:o,maxHeight:t="120px",views:n={}})=>{if(e.length===0)return null;const a=h.useCallback(l=>l<1024?`${l} B`:l<1024*1024?`${(l/1024).toFixed(1)} KB`:`${(l/(1024*1024)).toFixed(1)} MB`,[]);return r.jsx(i.View,{display:"flex",flexWrap:"wrap",gap:"8px",padding:"8px 0",maxHeight:t,overflowY:"auto",...n==null?void 0:n.container,children:e.map((l,c)=>{const s=l.url||"",d=l.type.startsWith("image/"),g=l.type.startsWith("video/"),m=l.type.startsWith("audio/");return r.jsx(i.Vertical,{alignItems:"center",gap:"6px",padding:"6px 10px",borderRadius:"8px",border:"1px solid #E2E8F0",backgroundColor:"color-white",position:"relative",animate:{from:{opacity:0,scale:.9},to:{opacity:1,scale:1}},animationDuration:.2,...n==null?void 0:n.item,children:r.jsxs(Me,{children:[r.jsx(Me.Trigger,{children:r.jsxs(i.View,{position:"relative",children:[d&&s&&r.jsx(i.Image,{src:s,alt:l.name,width:"60px",height:"60px",objectFit:"cover",borderRadius:"8px"}),g&&s&&r.jsx(i.View,{as:"video",src:s,alt:l.name,controls:!1,muted:!0,width:"60px",height:"60px",objectFit:"cover",borderRadius:"8px"}),m&&r.jsx(i.Center,{width:"60px",height:"60px",backgroundColor:"color-gray-100",borderRadius:"8px",children:r.jsx(Fo,{widthHeight:24,color:"color-black"})}),!d&&!g&&!m&&r.jsx(i.Center,{width:"60px",height:"60px",backgroundColor:"color-gray-100",borderRadius:"8px",children:r.jsx(go,{widthHeight:24,color:"color-black"})}),o&&r.jsx(i.Button,{position:"absolute",top:"-4px",right:"-4px",width:"20px",height:"20px",minWidth:"20px",minHeight:"20px",borderRadius:"50%",backgroundColor:"color-red-500",color:"white",fontSize:14,fontWeight:"bold",padding:0,display:"flex",alignItems:"center",justifyContent:"center",cursor:"pointer",border:"2px solid white",transition:"background-color 0.2s ease, opacity 0.2s ease",_hover:{backgroundColor:"#DC2626"},onClick:f=>{f.stopPropagation(),o(c)},"aria-label":`Remove ${l.name}`,children:"×"})]})}),r.jsxs(Me.Content,{children:[d&&s&&r.jsx(i.Image,{src:s,alt:l.name,maxWidth:"300px"}),g&&s&&r.jsx(i.View,{as:"video",src:s,controls:!0,maxWidth:"300px"}),m&&s&&r.jsx(i.View,{as:"audio",src:s,controls:!0,width:"100%"}),r.jsxs(i.Text,{marginTop:"4px",maxLines:1,width:"100%",fontSize:12,...n==null?void 0:n.name,children:[l.name," (",a(l.size),")"]})]})]})},c)})})},Bl=e=>{const o=pe("slider",e),t=vl(o);return r.jsx(Ml,{...o,...t})},im=({url:e,type:o,name:t,onOpen:n})=>{const a=o.toLowerCase(),l=a.startsWith("image"),c=a.startsWith("video"),s=a.startsWith("audio"),d=()=>{n&&n()};return r.jsxs(i.View,{width:"60px",height:"60px",flexShrink:0,borderRadius:"4px",overflow:"hidden",display:"flex",alignItems:"center",justifyContent:"center",backgroundColor:"color-gray-200",cursor:"pointer",onClick:d,children:[l&&r.jsx(i.Image,{src:e,alt:t,width:"100%",height:"100%",objectFit:"cover"}),c&&r.jsx(i.View,{as:"video",src:e,controls:!0,width:"100%",height:"100%",style:{objectFit:"cover"},onClick:g=>g.stopPropagation()}),s&&r.jsx(i.View,{as:"audio",controls:!0,src:e,width:"100%",onClick:g=>g.stopPropagation()}),!l&&!c&&!s&&r.jsx(go,{widthHeight:24,color:"color-gray-600"})]})},no=vo.create(e=>({modals:[],onHide:o=>o,onShow:(o,t)=>({name:o,props:t}),show:(o,t={},n={})=>{e(a=>({...a,modals:[...a.modals,{name:o,props:{...t,isVisible:!0},overlayProps:n}]}))},hide:o=>{e(t=>o?{...t,modals:t.modals.filter(n=>n.name!==o)}:{modals:[]})},setOnHide:o=>{e(t=>({...t,onHide:o}))},setOnShow:o=>{e(t=>({...t,onShow:o}))}})),cm=(e,o={},t={})=>{no.getState().show(e,o,t),no.getState().onShow(e,o)},Jt=e=>{no.getState().onHide(e),no.getState().hide(typeof e=="string"?e:void 0)},sm={square:{borderRadius:0},rounded:{borderRadius:8}},dm={center:{justifyContent:"center",alignItems:"center"},top:{justifyContent:"center",alignItems:"flex-start"},right:{justifyContent:"flex-end",alignItems:"center"},bottom:{justifyContent:"center",alignItems:"flex-end"},left:{justifyContent:"flex-start",alignItems:"center"}},gm={xs:12,sm:16,md:20,lg:24,xl:28},Qt={body:{fontSize:"16px",fontWeight:"400",color:"color-gray-700"}},Ol=h.memo(({children:e,blur:o,isOpen:t=!1,isClosePrevented:n=!1,onClose:a=()=>{},position:l="center",views:c,...s})=>{const d=h.useCallback(()=>{n||a()},[n,a]);return r.jsx(i.Center,{position:"fixed",top:0,left:0,width:"100%",height:"100%",zIndex:1e3,onClick:d,visibility:t?"visible":"hidden",opacity:t?1:0,transition:"opacity 0.2s ease, visibility 0.2s ease",...c==null?void 0:c.container,children:r.jsx(i.View,{position:"absolute",top:0,left:0,zIndex:1e3,width:"100vw",height:"100vh",display:"flex",backgroundColor:"color-dark-50-360",backdropFilter:o?`blur(${o}px)`:void 0,transition:"background-color 0.2s ease, backdrop-filter 0.2s ease",onClick:d,...dm[l],...s,...c==null?void 0:c.view,children:e})})}),hm={boxShadow:"0px 4px 16px rgba(0, 0, 0, 0.15)"},fm={elevation:5,shadowColor:"rgba(0, 0, 0, 0.15)",shadowOffset:{width:0,height:4},shadowOpacity:1,shadowRadius:16},mm=h.memo(({children:e,shadow:o,isFullScreen:t=!1,shape:n="rounded",views:a,isOpen:l=!0,position:c,...s})=>{const d=typeof document!==void 0?hm:fm,g=h.useCallback(m=>{m&&m.stopPropagation&&m.stopPropagation()},[]);return r.jsx(i.Vertical,{cursor:"default",backgroundColor:"color-white",width:t?"100%":600,height:t?"100%":"fit-content",onClick:g,transition:"opacity 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease",opacity:l?1:0,transform:l?"translateY(0)":"translateY(8px)",...o||d,...sm[n],media:{mobile:{width:"90%",maxWidth:"100%",margin:"16px"}},...s,...a==null?void 0:a.container,children:e})}),pm=h.memo(({children:e,buttonColor:o="theme-primary",iconSize:t="md",buttonSize:n,buttonPosition:a="right",views:l,onClose:c,...s})=>{const d=c||Jt,g=r.jsx(i.View,{onClick:()=>d(),children:r.jsx(He,{widthHeight:gm[n??t],color:o})});return r.jsxs(i.Horizontal,{justifyContent:a==="none"?"center":"space-between",alignItems:"center",paddingVertical:16,paddingHorizontal:24,borderBottomWidth:"1px",borderBottomStyle:"solid",borderBottomColor:"color-gray-200",media:{mobile:{paddingVertical:12,paddingHorizontal:16}},...s,...l==null?void 0:l.header,children:[a==="left"&&g,e,a==="right"&&g]})}),um=h.memo(({children:e,views:o,...t})=>r.jsx(i.View,{paddingVertical:16,paddingHorizontal:24,fontSize:Qt.body.fontSize,fontWeight:Qt.body.fontWeight,color:Qt.body.color,media:{mobile:{paddingVertical:12,paddingHorizontal:16,fontSize:"14px"}},...t,...o==null?void 0:o.view,children:e})),ym=h.memo(({children:e,views:o,...t})=>r.jsx(i.Horizontal,{marginTop:"auto",alignItems:"center",justifyContent:"flex-end",paddingVertical:16,paddingHorizontal:24,borderTopWidth:"1px",borderTopStyle:"solid",borderTopColor:"color-gray-200",gap:12,media:{mobile:{paddingVertical:12,paddingHorizontal:16,gap:8}},...t,...o==null?void 0:o.container,children:e})),Zt=({modals:e,onShow:o,onHide:t})=>{const n=no(a=>a.modals);return h.useEffect(()=>{o&&no.getState().setOnShow(o)},[o]),h.useEffect(()=>{t&&no.getState().setOnHide(t)},[t]),n.length===0?null:r.jsx(h.Fragment,{children:n.map((a,l)=>{const c=e[a.name];return c?r.jsx(Ol,{isOpen:a.props.isVisible,onClose:()=>Jt(a.name),blur:5,...a.overlayProps,style:{zIndex:1e3+l},children:r.jsx(c,{...a.props})},l):(console.error(`${a.name} modal doesn't exist`),null)})})},uo=({children:e})=>r.jsx(r.Fragment,{children:e});uo.Overlay=Ol,uo.Container=mm,uo.Header=pm,uo.Body=um,uo.Footer=ym,uo.Layout=Zt;const Nl={xs:"320px",sm:"380px",md:"480px",lg:"640px",xl:"768px",full:"100%"},bm={left:{top:0,left:0,bottom:0,height:"100vh",borderRightWidth:"1px",borderRightStyle:"solid",borderRightColor:"color-gray-200"},right:{top:0,right:0,bottom:0,height:"100vh",borderLeftWidth:"1px",borderLeftStyle:"solid",borderLeftColor:"color-gray-200"},top:{top:0,left:0,right:0,width:"100vw",borderBottomWidth:"1px",borderBottomStyle:"solid",borderBottomColor:"color-gray-200"},bottom:{bottom:0,left:0,right:0,width:"100vw",borderTopWidth:"1px",borderTopStyle:"solid",borderTopColor:"color-gray-200"}},Rt=({isOpen:e,onClose:o,isClosePrevented:t,blur:n,children:a,...l})=>{const c=()=>{t||o()};return h.useEffect(()=>{const s=d=>{d.key==="Escape"&&e&&!t&&o()};return e&&document.addEventListener("keydown",s),()=>{document.removeEventListener("keydown",s)}},[e,t,o]),r.jsx(i.View,{"data-testid":"drawer-overlay",role:"dialog","aria-modal":"true",position:"fixed",top:0,left:0,right:0,bottom:0,zIndex:1e3,visibility:e?"visible":"hidden",onClick:c,opacity:e?1:0,transition:"opacity 0.2s ease, visibility 0.2s ease, background-color 0.2s ease",backgroundColor:e?"color-dark-50-360":"transparent",backdropFilter:n?`blur(${n}px)`:void 0,pointerEvents:e?"auto":"none",...l,children:a})},en=({placement:e="right",size:o="md",isOpen:t=!1,children:n,...a})=>{const l=m=>{m.stopPropagation()},s=e==="top"||e==="bottom"?{height:o==="full"?"100vh":Nl[o]||o,maxHeight:"100vh"}:{width:o==="full"?"100vw":Nl[o]||o,maxWidth:"100vw"},d=e==="left"?"0 12px 12px 0":e==="right"?"12px 0 0 12px":e==="top"?"0 0 12px 12px":"12px 12px 0 0",g=t?"translate3d(0, 0, 0)":e==="left"?"translate3d(-100%, 0, 0)":e==="right"?"translate3d(100%, 0, 0)":e==="top"?"translate3d(0, -100%, 0)":"translate3d(0, 100%, 0)";return r.jsx(i.Vertical,{position:"absolute",backgroundColor:"color-white",borderRadius:d,...bm[e],...s,onClick:l,transform:g,willChange:"transform",transition:"transform 0.24s ease, box-shadow 0.2s ease",boxShadow:"0 12px 32px rgba(15, 23, 42, 0.12)",...a,children:n})},xm=({children:e,onClose:o,buttonPosition:t="right",...n})=>{const a=o&&r.jsx(i.View,{onClick:o,cursor:"pointer",padding:8,children:r.jsx(He,{widthHeight:20,color:"color-gray-500"})});return r.jsxs(i.Horizontal,{paddingHorizontal:24,paddingVertical:16,borderBottomWidth:"1px",borderBottomColor:"color-gray-200",alignItems:"center",justifyContent:t==="none"?"center":"space-between",...n,children:[t==="left"&&a,e,t==="right"&&a]})},km=({children:e,...o})=>r.jsx(i.Vertical,{padding:24,flex:1,overflowY:"auto",...o,children:e}),Cm=({children:e,...o})=>r.jsx(i.Horizontal,{paddingHorizontal:24,paddingVertical:16,borderTopWidth:"1px",borderTopColor:"color-gray-200",alignItems:"center",justifyContent:"flex-end",gap:12,...o,children:e}),ao=vo.create(e=>({drawers:[],onHide:o=>o,onShow:(o,t)=>({name:o,props:t}),show:(o,t={},n={})=>{e(a=>({...a,drawers:[...a.drawers,{name:o,props:{...t,isOpen:!1},overlayProps:n}]}))},hide:o=>{e(t=>o?{...t,drawers:t.drawers.filter(n=>n.name!==o)}:{drawers:[]})},setOnHide:o=>{e(t=>({...t,onHide:o}))},setOnShow:o=>{e(t=>({...t,onShow:o}))}})),wm=(e,o={},t={})=>{const n=ao.getState();n.hide(e),n.show(e,o,t),n.onShow(e,o),queueMicrotask(()=>{ao.setState(a=>({drawers:a.drawers.map(l=>l.name===e?{...l,props:{...l.props,isOpen:!0}}:l)}))})},ql=e=>{ao.getState().onHide(e),ao.getState().hide(typeof e=="string"?e:void 0)},Sm=({drawers:e,onShow:o,onHide:t})=>{const n=ao(a=>a.drawers);return h.useEffect(()=>{o&&ao.getState().setOnShow(o)},[o]),h.useEffect(()=>{t&&ao.getState().setOnHide(t)},[t]),n.length===0?null:r.jsx(h.Fragment,{children:n.map((a,l)=>{var u;const c=e[a.name];if(!c)return console.error(`${a.name} drawer doesn't exist`),null;const{placement:s,size:d,isClosePrevented:g,blur:m,containerProps:f,...p}=a.props||{};return r.jsx(Rt,{isOpen:a.props.isOpen,onClose:()=>ql(a.name),isClosePrevented:g,blur:m,...a.overlayProps,style:{zIndex:1e3+l,...((u=a.overlayProps)==null?void 0:u.style)||{}},children:r.jsx(en,{placement:s,size:d,isOpen:a.props.isOpen,...f||{},children:r.jsx(h.Suspense,{fallback:null,children:r.jsx(c,{...p})})})},l)})})},yo=({isOpen:e,onClose:o,placement:t="right",size:n="md",isClosePrevented:a,children:l,...c})=>r.jsx(Rt,{isOpen:e,onClose:o,isClosePrevented:a,...c,children:r.jsx(en,{placement:t,size:n,isOpen:e,children:l})});yo.Overlay=Rt,yo.Container=en,yo.Header=xm,yo.Body=km,yo.Footer=Cm,yo.Layout=Sm;const Ul=({behavior:e,keyboardVerticalOffset:o,dismissOnTap:t,enabled:n,children:a,...l})=>r.jsx(i.View,{flex:1,width:"100%",...l,children:a}),vm=({header:e,footer:o,children:t,isLoading:n=!1,safe:a=!0,scrollable:l=!0,dismissKeyboardOnTap:c=!0,keyboardVerticalOffset:s=0,views:d={},backgroundColor:g="color-white",...m})=>{const f=a?i.SafeArea:i.View,p=i.isBrowser()?{}:{keyboardShouldPersistTaps:"handled",showsVerticalScrollIndicator:!1,contentContainerStyle:{flexGrow:1}},u=n?r.jsx(i.Center,{flex:1,width:"100%",...d.content,children:r.jsx(eo,{})}):l?r.jsx(i.Scroll,{flex:1,width:"100%",...p,...d.content,children:t}):r.jsx(i.View,{flex:1,width:"100%",...d.content,children:t});return r.jsxs(f,{flex:1,height:"100%",width:"100%",flexDirection:"column",backgroundColor:g,...m,...d.container,children:[e!=null&&r.jsx(i.View,{width:"100%",flexShrink:0,...d.header,children:e}),r.jsxs(Ul,{flexDirection:"column",dismissOnTap:c,keyboardVerticalOffset:s,children:[u,o!=null&&r.jsx(i.View,{width:"100%",flexShrink:0,...d.footer,children:o})]})]})},Nr=vo.create(e=>({started:!1,loaded:!1,setStarted:(o=!0)=>e({started:o}),setLoaded:(o=!0)=>e({loaded:o}),reset:()=>e({started:!1,loaded:!1})})),Tm=(e=!0)=>Nr.getState().setLoaded(e),Im=(e=!0)=>Nr.getState().setStarted(e),Fm=({logo:e,logoSrc:o,loader:t,showLoader:n=!0,duration:a=600,isLoaded:l,onHidden:c,backgroundColor:s="color-white",children:d,...g})=>{const m=Nr(w=>w.loaded),f=l!==void 0?l:m,[p,u]=h.useState(!0),[y,k]=h.useState(!1);if(h.useEffect(()=>{if(!f||y)return;k(!0);const w=setTimeout(()=>{u(!1),c==null||c()},a);return()=>clearTimeout(w)},[f,y,a,c]),!p)return null;const x=i.isBrowser()?"fixed":"absolute",C=y?i.Animation.fadeOut({duration:`${a}ms`}):void 0,S=e??(o?r.jsx(i.Image,{src:o,width:120,height:120,alt:"logo"}):null);return r.jsxs(i.Center,{position:x,top:0,left:0,right:0,bottom:0,zIndex:9999,backgroundColor:s,animate:C,...g,children:[r.jsxs(i.Vertical,{alignItems:"center",gap:24,children:[S,n&&(t??r.jsx(eo,{}))]}),d]})},qe=vo.create((e,o)=>({stack:[{path:"/",params:{}}],index:0,push:(t,n={})=>e(a=>{const l=a.stack.slice(0,a.index+1);return l.push({path:t,params:n}),{stack:l,index:l.length-1}}),replace:(t,n={})=>e(a=>{const l=a.stack.slice();return l[a.index]={path:t,params:n},{stack:l}}),back:()=>{const{index:t}=o();return t<=0?!1:(e({index:t-1}),!0)},go:t=>e(n=>({index:Math.min(Math.max(n.index+t,0),n.stack.length-1)})),reset:(t,n={})=>e({stack:[{path:t,params:n}],index:0})})),zm=(e,o)=>qe.getState().push(e,o),Mm=()=>qe.getState().back(),on=()=>{const e=qe(d=>d.stack),o=qe(d=>d.index),t=qe(d=>d.push),n=qe(d=>d.replace),a=qe(d=>d.back),l=qe(d=>d.go),c=qe(d=>d.reset),s=e[o]||{path:"/",params:{}};return{path:s.path,params:s.params,stack:e,index:o,canGoBack:o>0,push:t,replace:n,back:a,go:l,reset:c,navigate:t}},Gl=(e,o)=>{const t=e.split("/").filter(Boolean),n=o.split("/").filter(Boolean);if(t.length!==n.length)return null;const a={};for(let l=0;l<t.length;l+=1){const c=t[l];if(c.startsWith(":"))a[c.slice(1)]=decodeURIComponent(n[l]);else if(c!==n[l])return null}return a},Wm=e=>Array.isArray(e)?e:Object.entries(e).map(([o,t])=>({path:o,component:t})),Hm=({routes:e,notFound:o})=>{const{path:t,params:n}=on();for(const a of Wm(e)){const l=Gl(a.path,t);if(l){const c=a.component;return r.jsx(c,{...n,...l})}}return o?r.jsx(o,{}):null},jm=({routes:e,notFound:o,initialPath:t,syncBrowserHistory:n=!1})=>{const{path:a,push:l,back:c,reset:s}=on(),d=h.useRef(!1);return i.useMount(()=>{t&&s(t)}),h.useEffect(()=>{if(!(!n||typeof window>"u")){if(d.current){d.current=!1;return}try{window.history.pushState({path:a},"",a)}catch{}}},[a,n]),h.useEffect(()=>{if(!n||typeof window>"u")return;const g=()=>{d.current=!0,c()||(d.current=!1)};return window.addEventListener("popstate",g),()=>window.removeEventListener("popstate",g)},[n,c,l]),r.jsx(Hm,{routes:e,notFound:o})},Pm=(e=null,o=[])=>{const[t,n]=h.useState(e),[a,l]=h.useState(o),c=h.useRef({});return{activeItemId:t,setActiveItemId:n,expandedItemIds:a,toggleExpandedItem:g=>{l(m=>m.includes(g)?m.filter(p=>p!==g):[...m,g])},isItemExpanded:g=>a.includes(g),triggerRefs:c}},rn={sm:{padding:"8px 12px",fontSize:"12px",fontWeight:"500",media:{mobile:{padding:"6px 10px",fontSize:"11px"}}},md:{padding:"10px 14px",fontSize:"14px",fontWeight:"500",media:{mobile:{padding:"8px 12px",fontSize:"12px"}}},lg:{padding:"12px 16px",fontSize:"14px",fontWeight:"600",media:{mobile:{padding:"10px 14px",fontSize:"12px"}}}},tn={default:{color:"color-gray-800",style:{backgroundColor:"transparent"},transition:"background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease"},filled:{backgroundColor:"color-gray-100",color:"color-gray-800",transition:"background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease"},outline:{borderWidth:"1px",borderStyle:"solid",borderColor:"color-gray-200",color:"color-gray-800",style:{backgroundColor:"transparent"},transition:"background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease"}},Yl={horizontal:{flexDirection:"row",gap:"8px",media:{mobile:{flexDirection:"column",gap:"4px"}}},vertical:{flexDirection:"column",gap:"4px"}},Eo={active:{backgroundColor:"color-blue-50",color:"color-blue-700",fontWeight:"600",borderLeft:"3px solid",borderColor:"color-blue-600"},hover:{backgroundColor:"color-gray-100",transition:"background-color 0.2s ease"}},Kl=h.createContext({activeItemId:null,setActiveItemId:()=>{},expandedItemIds:[],toggleExpandedItem:()=>{},isItemExpanded:()=>!1,orientation:"vertical",size:"md",variant:"default",triggerRefs:{current:{}}}),Vm=({children:e,value:o})=>r.jsx(Kl.Provider,{value:o,children:e}),lr=()=>{const e=h.useContext(Kl);if(!e)throw new Error("useNavigationMenuContext must be used within a NavigationMenuProvider");return e},nn=({children:e,views:o})=>{const{orientation:t}=lr(),n=t==="horizontal"?i.Horizontal:i.Vertical;return r.jsx(n,{width:"100%",...Yl[t],transition:"background-color 0.2s ease, border-color 0.2s ease",borderRadius:"8px",...o==null?void 0:o.container,children:e})},Xl=h.createContext({itemValue:null,isDisabled:!1}),Am=()=>{const e=h.useContext(Xl);if(!e)throw new Error("useNavigationMenuItemContext must be used within a NavigationMenuItem");return e},an=({item:e,value:o,isDisabled:t=!1,children:n,views:a})=>{var C;const{activeItemId:l,setActiveItemId:c,orientation:s,size:d,variant:g,onItemActivate:m}=lr(),f=(e==null?void 0:e.id)||o,p=l===f,u=(e==null?void 0:e.items)&&e.items.length>0,y=(e==null?void 0:e.disabled)||t,k=()=>{y||f&&(c(f),m&&m(f))},x=s==="horizontal"?i.Horizontal:i.Vertical;return n?r.jsx(Xl.Provider,{value:{itemValue:f||null,isDisabled:y},children:r.jsx(i.View,{width:"100%",cursor:y?"not-allowed":"pointer",opacity:y?.6:1,borderRadius:"8px",transition:"background-color 0.2s ease, color 0.2s ease, opacity 0.2s ease",...rn[d],...tn[g],...p?Eo.active:{},_hover:y?{}:Eo.hover,...a==null?void 0:a.item,children:n})}):u&&e?r.jsxs(x,{width:"100%",flexDirection:"column",position:"relative",...a==null?void 0:a.item,children:[r.jsxs(Jl,{itemId:e.id,disabled:e.disabled,views:a,children:[e.icon&&r.jsx(i.View,{marginRight:8,...a==null?void 0:a.icon,children:e.icon}),e.label]}),r.jsx(Ql,{itemId:e.id,children:r.jsx(nn,{children:(C=e.items)==null?void 0:C.map(S=>r.jsx(an,{item:S},S.id))})})]}):e?r.jsxs(i.View,{as:e.href?"a":"div",href:e.href,onClick:k,cursor:e.disabled?"not-allowed":"pointer",opacity:e.disabled?.6:1,width:"100%",display:"flex",alignItems:"center",borderRadius:"8px",transition:"background-color 0.2s ease, color 0.2s ease, opacity 0.2s ease",gap:"8px",...rn[d],...tn[g],...p?Eo.active:{},_hover:e.disabled?{}:Eo.hover,...a==null?void 0:a.item,children:[e.icon&&r.jsx(i.View,{marginRight:8,...a==null?void 0:a.icon,children:e.icon}),e.label]}):null},Jl=({children:e,itemId:o,disabled:t,views:n})=>{const{activeItemId:a,toggleExpandedItem:l,isItemExpanded:c,size:s,variant:d,triggerRefs:g}=lr(),m=h.useRef(null),f=a===o,p=c(o);h.useEffect(()=>(m.current&&o&&(g.current[o]=m.current),()=>{o&&delete g.current[o]}),[o,g]);const u=y=>{y.preventDefault(),!t&&l(o)};return r.jsxs(i.View,{ref:m,onClick:u,cursor:t?"not-allowed":"pointer",opacity:t?.5:1,width:"100%",display:"flex",alignItems:"center",justifyContent:"space-between",borderRadius:8,transition:"background-color 0.2s ease",...rn[s],...tn[d],...f?Eo.active:{},_hover:t?{}:Eo.hover,...n==null?void 0:n.trigger,children:[r.jsx(i.View,{display:"flex",alignItems:"center",children:e}),r.jsx(i.View,{transition:"transform 0.2s ease",transform:p?"rotate(180deg)":"rotate(0deg)",...n==null?void 0:n.indicator,children:r.jsx(he,{orientation:"down",widthHeight:16,color:"currentColor",filled:!0})})]})},Ql=({children:e,itemId:o,views:t})=>{const{isItemExpanded:n,orientation:a,triggerRefs:l}=lr(),c=h.useRef(null),[s,d]=h.useState({x:0,y:0,placement:a==="horizontal"?"bottom":"right"}),g=n(o);if(h.useEffect(()=>{if(g&&c.current&&o&&l.current[o]&&a==="horizontal"){const f=c.current.getBoundingClientRect(),p=l.current[o].getBoundingClientRect(),u=Math.max(f.width||200,200),y=Math.max(f.height||150,150),k=window.innerWidth,x=window.innerHeight,C={top:p.top,right:k-p.right,bottom:x-p.bottom,left:p.left},S=a==="horizontal"?[{placement:"bottom",space:C.bottom,fits:C.bottom>=y+8,x:p.left,y:p.bottom+8},{placement:"top",space:C.top,fits:C.top>=y+8,x:p.left,y:p.top-y-8},{placement:"right",space:C.right,fits:C.right>=u+8,x:p.right+8,y:p.top},{placement:"left",space:C.left,fits:C.left>=u+8,x:p.left-u-8,y:p.top}]:[{placement:"right",space:C.right,fits:C.right>=u+8,x:p.right+8,y:p.top},{placement:"left",space:C.left,fits:C.left>=u+8,x:p.left-u-8,y:p.top},{placement:"bottom",space:C.bottom,fits:C.bottom>=y+8,x:p.left,y:p.bottom+8},{placement:"top",space:C.top,fits:C.top>=y+8,x:p.left,y:p.top-y-8}],w=S.find(T=>T.fits);if(w){d({x:w.x,y:w.y,placement:w.placement});return}const v=S.reduce((T,P)=>P.space>T.space?P:T);let b=v.x,I=v.y;b+u>k&&(b=k-u-8),b<8&&(b=8),I+y>x&&(I=x-y-8),I<8&&(I=8),d({x:b,y:I,placement:v.placement})}},[g,a,o,l]),!g)return null;if(a==="vertical")return r.jsx(i.View,{paddingLeft:16,width:"100%",position:"relative",backgroundColor:"transparent",...t==null?void 0:t.container,children:e});const m={position:"fixed",left:s.x,top:s.y,zIndex:1e3};return r.jsx(i.View,{ref:c,role:"menu",minWidth:"200px",backgroundColor:"color-white",borderRadius:4,boxShadow:"0px 2px 8px rgba(0, 0, 0, 0.15)",overflow:"hidden",style:m,...t==null?void 0:t.container,children:e})},Em=({href:e,children:o,views:t,underline:n,isExternal:a,iconSize:l,...c})=>{const{itemValue:s,isDisabled:d}=Am(),{activeItemId:g,setActiveItemId:m,onItemActivate:f}=lr(),p=g===s,u=y=>{if(d){y.preventDefault();return}s&&(m(s),f&&f(s)),c.onClick&&c.onClick(y)};return r.jsx(i.View,{as:"a",href:d?void 0:e,onClick:u,cursor:d?"not-allowed":"pointer",opacity:d?.5:1,width:"100%",display:"flex",alignItems:"center","aria-current":p?"page":void 0,"aria-disabled":d,"data-active":p?"":void 0,"data-disabled":d?"":void 0,...p?{fontWeight:"bold"}:{},...t==null?void 0:t.container,...c,children:o})},Dm=({items:e,orientation:o,views:t,themeMode:n})=>{const a=o==="horizontal"?i.Horizontal:i.Vertical;return!e||e.length===0?null:r.jsx(a,{width:"100%",...Yl[o],...t==null?void 0:t.container,children:r.jsx(nn,{views:t,children:e.map(l=>r.jsx(an,{item:l,views:t},l.id))})})},bo=e=>{const o=pe("navigation",e),{items:t,children:n,orientation:a="vertical",size:l="md",variant:c="default",defaultActiveItemId:s=null,defaultExpandedItemIds:d=[],onItemActivate:g,views:m,...f}=o,{activeItemId:p,setActiveItemId:u,expandedItemIds:y,toggleExpandedItem:k,isItemExpanded:x,triggerRefs:C}=Pm(s,d);return r.jsx(Vm,{value:{activeItemId:p,setActiveItemId:u,expandedItemIds:y,toggleExpandedItem:k,isItemExpanded:x,orientation:a,size:l,variant:c,onItemActivate:g,triggerRefs:C},children:t?r.jsx(Dm,{items:t,orientation:a,size:l,variant:c,views:m,...f}):n})};bo.List=nn,bo.Item=an,bo.Trigger=Jl,bo.Content=Ql,bo.Link=Em;const Zl={},Rl=h.createContext({views:Zl,onRowClick:()=>{}}),$m=({children:e,views:o=Zl,onRowClick:t})=>r.jsx(Rl.Provider,{value:{views:o,onRowClick:t},children:e}),lo=()=>h.useContext(Rl),ke={table:{width:"100%",color:"inherit",borderRadius:"8px",overflow:"hidden",boxShadow:"0px 1px 3px rgba(0, 0, 0, 0.06), 0px 1px 2px rgba(0, 0, 0, 0.04)",border:"1px solid",borderColor:"color-gray-200",transition:"box-shadow 0.2s ease",media:{mobile:{overflowX:"auto",display:"block",borderRadius:"4px"}}},thead:{backgroundColor:"color-gray-50",borderBottom:"1px solid",borderColor:"color-gray-200"},th:{padding:"12px 16px",fontWeight:"600",fontSize:"14px",color:"inherit",opacity:.72,textAlign:"left",flex:1,media:{mobile:{padding:"8px 12px",fontSize:"12px"}}},td:{padding:"12px 16px",fontSize:"14px",borderBottom:"1px solid",borderColor:"color-gray-100",color:"inherit",flex:1,media:{mobile:{padding:"8px 12px",fontSize:"12px"}}},tr:{flexDirection:"row",alignItems:"stretch",width:"100%",transition:"background-color 0.15s ease",_hover:{backgroundColor:"color-gray-50"},_focus:{outline:"none",backgroundColor:"color-gray-100"}},tfoot:{backgroundColor:"color-gray-50",fontWeight:"600",borderTop:"2px solid",borderColor:"color-gray-200"},caption:{margin:"8px 0",color:"inherit",opacity:.62,fontSize:"14px",fontStyle:"italic",media:{mobile:{fontSize:"12px"}}}};({...ke.th},{...ke.td}),{...ke.tr},{...ke.td},{...ke.th},{...ke.table},{...ke.th},{...ke.td},{...ke.tr},{...ke.tfoot},{...ke.caption};const Lm=({children:e})=>r.jsx(i.View,{width:"100%",style:{overflowX:"auto"},children:e}),ei=e=>{const{views:o}=lo();return r.jsx(i.Element,{as:"table",...ke.table,...o==null?void 0:o.table,...e,style:{borderCollapse:"collapse",...e.style||{}}})},oi=e=>{const{views:o}=lo();return r.jsx(i.Element,{as:"thead",textAlign:"left",...ke.thead,...o==null?void 0:o.thead,...e})},ri=e=>{const{views:o}=lo();return r.jsx(i.Element,{as:"th",whiteSpace:"nowrap",...ke.th,...o==null?void 0:o.th,...e})},qr=e=>{const{views:o,onRowClick:t}=lo();return r.jsx(i.Element,{as:"tr",...ke.tr,...o==null?void 0:o.tr,onClick:t,...e})},ln=({isFirstColumn:e,...o})=>{const{views:t}=lo();return r.jsx(i.Element,{as:"td",whiteSpace:"nowrap",fontWeight:e?"500":"400",...ke.td,...t==null?void 0:t.td,...o})},ti=e=>{const{views:o}=lo();return r.jsx(i.Element,{as:"tbody",...ke.tbody,...o==null?void 0:o.tbody,...e})},ni=e=>{const{views:o}=lo();return r.jsx(i.Element,{as:"tfoot",...ke.tfoot,...o==null?void 0:o.tfoot,...e})},ai=e=>{const{views:o}=lo();return r.jsx(i.Element,{as:"caption",...ke.caption,...o==null?void 0:o.caption,...e})},_m=({data:e,columns:o,footer:t,caption:n,themeMode:a})=>{const l=Math.max(o.length*140,320);return r.jsx(Lm,{children:r.jsxs(ei,{role:"Table",minWidth:l,children:[n&&r.jsx(ai,{children:n}),r.jsx(oi,{children:r.jsx(qr,{children:o.map(c=>r.jsx(ri,{children:c.title},c.field))})}),r.jsx(ti,{children:e.map((c,s)=>r.jsx(qr,{children:o.map((d,g)=>r.jsx(ln,{isFirstColumn:g===0,children:c[d.field]},d.field))},s))}),t&&r.jsx(ni,{children:r.jsx(qr,{children:t.map((c,s)=>r.jsx(ln,{...c.props,children:c.value},s))})})]})})},Ve=({children:e,views:o,onClick:t})=>{const n=pe("table",{views:o,onClick:t});return r.jsx($m,{views:n.views,onRowClick:n.onClick,children:e})};Ve.Head=oi,Ve.HeadCell=ri,Ve.Body=ti,Ve.Row=qr,Ve.Cell=ln,Ve.Footer=ni,Ve.Caption=ai,Ve.Container=ei,Ve.Template=_m;const Bm=(e,o,t)=>{const n=g=>g.value!==void 0?g.value:g.title,a=()=>{if(!(!e||e.length===0)){if(o!==void 0){const g=e.find(m=>n(m)===o);if(g)return g}return e[0]}},[l,c]=h.useState(a()),s=t!==void 0?e.find(g=>n(g)===t):l,d=g=>{t===void 0&&c(g)};return h.useEffect(()=>{if(t!==void 0)return;const g=a(),m=l&&e.some(f=>n(f)===n(l));g&&(!m||o!==void 0&&l&&n(l)!==o)?c(g):!g&&l&&c(void 0)},[e,o]),{activeTab:s,setActiveTab:d}},Om=(e,o,t)=>{const[n,a]=h.useState(e||null);return{activeValue:o!==void 0?o:n,setActiveValue:s=>{o===void 0&&a(s),t&&t(s)}}},Nm=h.memo(({tab:e,isActive:o,onClick:t,iconPosition:n="left",tabStyles:a,textStyles:l})=>{const c=()=>{switch(n){case"top":return"column";case"bottom":return"column-reverse";case"right":return"row-reverse";case"left":default:return"row"}},s=()=>["top","bottom"].includes(n)?"4px":"8px",d=e.icon&&h.isValidElement(e.icon)?h.cloneElement(e.icon,{strokeWidth:o?2.5:2}):e.icon;return r.jsxs(i.Element,{as:"div",role:"tab","aria-selected":o,tabIndex:o?0:-1,display:"flex",alignItems:"center",justifyContent:"center",cursor:"pointer",transition:"background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease",...a,flexDirection:c(),gap:s(),onClick:t,"data-state":o?"active":"inactive",children:[d&&r.jsx(i.Element,{children:d},o?"active-icon":"inactive-icon"),r.jsxs(i.Element,{display:"grid",alignItems:"center",justifyContent:"center",children:[r.jsx(i.Text,{...l,fontWeight:"600",visibility:"hidden",gridColumn:"1",gridRow:"1","aria-hidden":"true",children:e.title}),r.jsx(i.Text,{...l,fontWeight:o?"600":"500",gridColumn:"1",gridRow:"1",children:e.title})]})]})}),cn=(e,o)=>{const t=o==="dark";return e==="segmented"?{header:{width:"fit-content",alignSelf:"flex-start",gap:6,padding:6,borderRadius:16,backgroundColor:"color-gray-100"},tab:{minHeight:44,padding:"0 22px",borderRadius:12,color:"color-gray-600",borderWidth:1,borderStyle:"solid",borderColor:"color-gray-100",style:{backgroundColor:"transparent"}},activeTab:{backgroundColor:"color-white",color:"color-gray-900",boxShadow:t?"0 1px 3px rgba(0, 0, 0, 0.35)":"0 1px 2px rgba(0, 0, 0, 0.06)"},text:{fontSize:14,lineHeight:"20px",letterSpacing:"-0.01em"},activeText:{},content:{width:"100%"}}:e==="pill"?{header:{width:"100%",flexWrap:"wrap",gap:12},tab:{minHeight:44,padding:"0 22px",borderRadius:"999px",backgroundColor:"color-white",color:"color-gray-600",borderWidth:1,borderStyle:"solid",borderColor:"color-gray-200"},activeTab:{backgroundColor:"theme-primary",color:"color-white",borderColor:"theme-primary"},text:{fontSize:14,lineHeight:"20px",letterSpacing:"-0.01em",color:"inherit"},activeText:{color:"inherit"},content:{width:"100%"}}:{header:{width:"100%",gap:20,borderBottom:"none"},tab:{minHeight:44,padding:"0 4px",borderRadius:0,color:"color-gray-500",borderBottom:"3px solid",borderColor:"color-white",style:{backgroundColor:"transparent"}},activeTab:{color:"theme-primary",borderColor:"theme-primary"},text:{fontSize:14,lineHeight:"20px",letterSpacing:"-0.01em",color:"inherit"},activeText:{color:"inherit"},content:{width:"100%",paddingTop:12}}},qm=({tabs:e=[],activeTab:o,handleTabClick:t,views:n={},renderTab:a,renderContent:l,variant:c="underline",iconPosition:s="left",keepMounted:d=!1})=>{const{themeMode:g}=i.useTheme(),m=cn(c,g);return o?r.jsxs(i.Vertical,{width:"100%",height:"100%",...n.container,children:[r.jsx(i.Horizontal,{alignItems:"center",...m.header,...n.headerTabs,children:e.map(f=>{const p=(f.value!==void 0?f.value:f.title)===(o.value!==void 0?o.value:o.title),u=()=>t(f);return a?a(f,p,u):r.jsx(Nm,{tab:f,isActive:p,onClick:u,iconPosition:s,tabStyles:{...m.tab,...n.tab,...p?m.activeTab:{},...p?n.activeTab:{}},textStyles:{...m.text,...n.title,...p?m.activeText:{},...p?n.activeText:{}}},f.title)})}),r.jsx(i.View,{height:"100%",...m.content,...n.content,children:l?l(o):d?e.map(f=>{const p=f.value!==void 0?f.value:f.title,u=o.value!==void 0?o.value:o.title;return r.jsx(i.View,{display:p===u?"contents":"none",children:f.content},f.title)}):o.content})]}):null},li=h.createContext(null),sn=()=>{const e=h.useContext(li);if(!e)throw new Error("useTabsContext must be used within a Tabs component");return e},Um=h.memo(({children:e,views:o})=>{var s;const{themeMode:t}=i.useTheme(),{variant:n="underline"}=sn(),a=cn(n,t),l=Io("tabs"),c=Be({container:(s=l.views)==null?void 0:s.headerTabs},o);return r.jsx(i.Horizontal,{alignItems:"center",...a.header,...c==null?void 0:c.container,children:e})}),Gm=h.memo(({value:e,children:o,disabled:t=!1,views:n})=>{var u,y;const{themeMode:a}=i.useTheme(),{activeValue:l,setActiveValue:c,variant:s="underline"}=sn(),d=l===e,g=cn(s,a),m=Io("tabs"),f=Be({trigger:(u=m.views)==null?void 0:u.tab,activeState:(y=m.views)==null?void 0:y.activeTab},n),p=h.useCallback(()=>{t||c(e)},[t,e,c]);return r.jsx(i.View,{cursor:t?"not-allowed":"pointer",opacity:t?.6:1,display:"flex",alignItems:"center",justifyContent:"center",transition:"all 0.2s ease-in-out",...g.tab,...d?g.activeTab:{},_hover:t?{}:s==="underline"?{color:"theme-primary"}:{opacity:.9},onClick:p,...f==null?void 0:f.trigger,...d?f==null?void 0:f.activeState:{},children:r.jsx(i.View,{...g.text,...d?g.activeText:{},children:o})})}),Ym=h.memo(({value:e,children:o,views:t})=>{const{activeValue:n}=sn();return n!==e?null:r.jsx(i.View,{width:"100%",padding:"24px",...t==null?void 0:t.content,children:o})}),Km=e=>{const o=pe("tabs",e),{tabs:t,views:n,defaultValue:a,onTabChange:l,renderTab:c,renderContent:s,variant:d="underline",iconPosition:g="left",keepMounted:m=!1,value:f,onValueChange:p,children:u}=o,y=Om(a,f,p),k=Bm(t||[],a,f);if(u)return r.jsx(li.Provider,{value:{...y,variant:d},children:u});if(t){const x=C=>{const S=w=>w.value!==void 0?w.value:w.title;(!k.activeTab||S(k.activeTab)!==S(C))&&(k.setActiveTab(C),l&&l(C))};return r.jsx(qm,{tabs:t,views:n,activeTab:k.activeTab,handleTabClick:x,renderTab:c,renderContent:s,variant:d,iconPosition:g,keepMounted:m})}return null},Do=h.memo(Km);Do.List=Um,Do.Trigger=Gm,Do.Content=Ym;const Xm=e=>{const{children:o,_isInView:t=!1,alternateHighlightText:n=[],alternateAnimation:a=!1,alternateDuration:l=3e3,highlightText:c,highlightTypewriter:s=!1,highlightSlide:d=!1,highlightSlideDuration:g=500,highlightSlideStagger:m=50,highlightSlideSequential:f=!0}=e,[p,u]=h.useState(o),[y,k]=h.useState(c);return h.useEffect(()=>{if(process.env.NODE_ENV==="production"||typeof o!="string"||!c)return;const x=Array.isArray(c)?c:[c];for(const C of x)typeof C=="string"&&C.length>0&&!o.toLowerCase().includes(C.toLowerCase())&&console.warn(`[Title] highlightText "${C}" is not a substring of \`children\`, so nothing will be highlighted. \`children\` must be the complete sentence including the highlight, e.g. \`<Title highlightText="apps">Build apps fast</Title>\`.`)},[o,c]),h.useEffect(()=>{if(!a||n.length===0||!t||typeof o!="string"||typeof c!="string")return process.env.NODE_ENV!=="production"&&a&&n.length>0&&(typeof o!="string"||typeof c!="string")&&console.warn("[Title] alternateHighlightText requires `children` to be the full sentence as a string and `highlightText` to be the placeholder word inside it. Rotation is disabled."),u(o),k(c),()=>{};const x=o,C=c;if(!x.toLowerCase().includes(C.toLowerCase()))return process.env.NODE_ENV!=="production"&&console.warn(`[Title] \`children\` must contain \`highlightText\` ("${C}") — it is the placeholder the rotating words replace, e.g. \`<Title highlightText="apps" alternateHighlightText={["apps", "sites"]}>Build apps fast</Title>\`. Rotation is disabled.`),u(o),k(c),()=>{};let S=0;const w=b=>{const I=n[b],T=C.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),P=new RegExp(T,"gi"),E=x.replace(P,I);u(E),k(I)};w(S);const v=setInterval(()=>{S=(S+1)%n.length,w(S)},l);return()=>clearInterval(v)},[a,n,l,c,o,t]),{finalDisplayedText:p,activeHighlightTarget:y,highlightTypewriter:s,highlightSlide:d,highlightSlideDuration:g,highlightSlideStagger:m,highlightSlideSequential:f}},Jm={xs:24,sm:32,md:48,lg:96,xl:110},Qm={xl:{media:{mobile:{fontSize:48},tablet:{fontSize:96},desktop:{fontSize:110}}},lg:{media:{mobile:{fontSize:48},tablet:{fontSize:48},desktop:{fontSize:70}}},md:{media:{mobile:{fontSize:32},tablet:{fontSize:40},desktop:{fontSize:56}}},sm:{media:{mobile:{fontSize:20},tablet:{fontSize:24},desktop:{fontSize:32}}},xs:{media:{mobile:{fontSize:14},tablet:{fontSize:18},desktop:{fontSize:20}}}},Zm={underline:e=>({textDecoration:"underline",textDecorationColor:e,textDecorationThickness:"4px",textUnderlineOffset:"4px"}),background:e=>({backgroundColor:e,color:"color-white",padding:"0 8px",borderRadius:"4px"}),gradient:(e,o)=>({background:`linear-gradient(135deg, ${e}, ${o||e})`,backgroundClip:"text",WebkitBackgroundClip:"text !important",WebkitTextFillColor:"transparent",color:"transparent",display:"inline-block",textShadow:"none"}),outline:e=>({WebkitTextStroke:`1px ${e}`,WebkitTextFillColor:"transparent !important",color:"transparent",textShadow:"none"}),glow:e=>({color:e,textShadow:`0 0 10px ${e}80, 0 0 20px ${e}40, 0 0 30px ${e}20`}),solid:e=>({color:e}),default:()=>({})},Rm=({text:e,typingSpeed:o=50,pauseTime:t=500,onComplete:n,showCursor:a=!0,cursorColor:l="currentColor",textStyle:c,textComponent:s,as:d,...g})=>{const m=s||i.Text,f=Array.isArray(e)?e:[e],[p,u]=h.useState(f.map(()=>"")),[y,k]=h.useState(!1),[x,C]=h.useState(0),[S,w]=h.useState(0);h.useEffect(()=>{u(f.map(()=>"")),k(!1),C(0),w(0)},[e]),h.useEffect(()=>{if(y){n&&n();return}const b=f[x];if(S>=b.length){if(x>=f.length-1){k(!0);return}const T=setTimeout(()=>{C(P=>P+1),w(0)},t);return()=>clearTimeout(T)}const I=setTimeout(()=>{u(T=>{const P=[...T];return P[x]=b.substring(0,S+1),P}),w(T=>T+1)},o);return()=>clearTimeout(I)},[f,x,S,y,n,t,o]);const v=b=>{if(!b||typeof b!="string")return b;const I=b.split("|");return I.length===1?b:I.map((T,P)=>r.jsxs(h.Fragment,{children:[T,P<I.length-1&&r.jsx("br",{})]},P))};return r.jsx(r.Fragment,{children:p.map((b,I)=>r.jsxs(h.Fragment,{children:[v(b),a&&I===x&&!y&&r.jsx(m,{as:"span",display:"inline-block",width:"0.1em",height:"1em",backgroundColor:l,animation:"blink 1s step-end infinite",verticalAlign:"text-bottom",marginLeft:"1px",...c})]},I))})},ep=({text:e,duration:o=500,direction:t="up",stagger:n=50,sequential:a=!1,textStyle:l,as:c,wordProps:s,textComponent:d,...g})=>{const[m,f]=h.useState(e),[p,u]=h.useState("entering"),[y,k]=h.useState(0),x=d||i.Text,C=h.useRef(null),S=h.useRef(null);h.useEffect(()=>{e===m&&p==="visible"||e!==m&&(p==="entering"||p==="visible"?(C.current=e,u("exiting")):p==="exiting"&&(C.current=e))},[e,m,p]);const{lines:w,totalWordCount:v}=h.useMemo(()=>{const j=m.split("|").map(L=>L.trim().split(/\s+/).filter(_=>_.length>0)),M=j.reduce((L,_)=>L+_.length,0);return{lines:j,totalWordCount:M}},[m]),b=h.useMemo(()=>a?v*(o+n):(v-1)*n+o,[v,o,n,a]),I=h.useMemo(()=>a?v*(o+n):(v-1)*n+o,[v,o,n,a]);h.useEffect(()=>(S.current&&clearTimeout(S.current),p==="entering"?S.current=setTimeout(()=>{u("visible")},b+50):p==="exiting"&&(S.current=setTimeout(()=>{C.current!==null&&(f(C.current),C.current=null),k(V=>V+1),u("entering")},I+50)),()=>{S.current&&clearTimeout(S.current)}),[p,b,I]);const{style:T,...P}=s||{},E=t==="up",D=V=>a?V*(o+n):V*n,z=h.useMemo(()=>({display:"inline-block",position:"relative",verticalAlign:"bottom",whiteSpace:"nowrap",...l}),[l]),A=h.useMemo(()=>({display:"inline-flex",flexDirection:"column",alignItems:"center"}),[]),W=h.useMemo(()=>({display:"block",whiteSpace:"nowrap"}),[]);let H=0;return r.jsx(i.Element,{as:"span",style:z,...g,children:r.jsx("span",{style:A,children:w.map((V,j)=>r.jsx("span",{style:W,children:V.map((M,L)=>{const _=H++,O=D(_),N=L===V.length-1;let U;const X=`${o}ms`,oe=`${O}ms`;p==="entering"?U=E?i.Animation.slideInUp({duration:X,delay:oe,timingFunction:"ease-out",fillMode:"both"}):i.Animation.slideInDown({duration:X,delay:oe,timingFunction:"ease-out",fillMode:"both"}):p==="exiting"&&(U=E?{from:{transform:"translateY(0)",opacity:1},to:{transform:"translateY(-100%)",opacity:0},duration:X,delay:oe,timingFunction:"ease-in",fillMode:"both"}:{from:{transform:"translateY(0)",opacity:1},to:{transform:"translateY(100%)",opacity:0},duration:X,delay:oe,timingFunction:"ease-in",fillMode:"both"});const B={...T,display:"inline-block",marginRight:N?0:"0.25em",transform:p==="visible"?"translateY(0)":void 0,opacity:p==="visible"?1:void 0};return r.jsx(x,{as:"span",animate:U,...P,...B,children:M},`${y}-${j}-${L}`)})},`line-${j}`))})})};function ii(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}const dn=e=>{if(!e||typeof e!="string")return e;const o=e.split("|");return o.length===1?e:o.map((t,n)=>r.jsxs(h.Fragment,{children:[t,n<o.length-1&&r.jsx("br",{})]},n))},op=({children:e,highlightText:o,highlightStyle:t="solid",highlightColor:n="theme-primary",highlightSecondaryColor:a,size:l="lg",views:c,highlightAnimate:s,animate:d,animationLoop:g=1,highlightAnimationLoop:m=1,highlightTypewriter:f=!1,highlightTypewriterDuration:p=3e3,highlightSlide:u=!1,highlightSlideDuration:y=500,highlightSlideStagger:k=50,highlightSlideSequential:x=!0,centered:C=!1,level:S=1,themeMode:w,responsive:v,alternateHighlightText:b,alternateAnimation:I,alternateDuration:T,_isInView:P,...E})=>{const{ref:D,inView:z}=i.useInView(),{finalDisplayedText:A,activeHighlightTarget:W,highlightTypewriter:H,highlightSlide:V,highlightSlideDuration:j,highlightSlideStagger:M,highlightSlideSequential:L}=Xm({children:e,highlightText:o,_isInView:z,highlightTypewriter:f,highlightSlide:u,highlightSlideDuration:y,highlightSlideStagger:k,highlightSlideSequential:x,alternateHighlightText:b,alternateAnimation:I,alternateDuration:T,...E}),_=Jm[l],O={fontFamily:"Mulish, Inter, Geist, system-ui, sans-serif",fontWeight:l==="xl"?700:600,letterSpacing:l==="xl"?"-1.5px":"-0.01em"},N=Zm[t](n,a),U=(J,Y)=>J&&(Array.isArray(J)?J.map(Z=>({...Z,iterationCount:Y.toString()})):{...J,iterationCount:Y.toString()}),X=U(d,g),oe=U(s,m),B=typeof A=="string"?A:typeof e=="string"?e:"",$={ref:D,animate:z?X:void 0,as:`h${S}`,fontSize:_,...C?{textAlign:"center"}:{},...v?Qm[l]:{},...O},q=J=>!z&&(H||V)?r.jsx("span",{style:{opacity:0},children:J}):H?r.jsx(Rm,{text:J,typingSpeed:Math.max(30,p/(J.length*10)),cursorColor:"currentColor",...N}):V?r.jsx(ep,{text:J,duration:j,stagger:M,sequential:L,direction:"up",wordProps:N}):dn(J);if(typeof B=="string"&&W){const J=Array.isArray(W)?new RegExp(`(${W.map(ne=>ii(String(ne))).join("|")})`,"gi"):new RegExp(`(${ii(String(W))})`,"gi"),Y=[];let Z=0,ee;for(;ee=J.exec(B);)ee.index>Z&&Y.push(B.substring(Z,ee.index)),Y.push({highlight:!0,text:ee[0]}),Z=ee.index+ee[0].length;return Z<B.length&&Y.push(B.substring(Z)),r.jsx(i.Element,{...$,...c==null?void 0:c.container,...E,children:Y.map((ne,K)=>typeof ne=="string"?r.jsx(i.Text,{as:"span",display:"inline",...c==null?void 0:c.text,children:dn(ne)},`text-${K}`):r.jsx(i.Text,{as:"span",display:"inline",animate:z?oe:void 0,...V?{}:N,...c==null?void 0:c.highlight,children:q(ne.text)},`highlight-${K}`))})}return t&&!W?r.jsx(i.Element,{...$,...E,...c==null?void 0:c.container,children:r.jsx(i.Text,{as:"span",display:"inline",animate:z?oe:void 0,...V?{}:N,...c==null?void 0:c.highlight,children:q(B)})}):r.jsx(i.Text,{...$,...E,...c==null?void 0:c.container,...c==null?void 0:c.text,children:dn(B)})},ci=e=>r.jsx(op,{...e}),si=({items:e,shape:o,variant:t,onToggleChange:n})=>{const{activeToggles:a,setActiveToggles:l}=Vl();return r.jsx(Al,{items:e,shape:o,variant:t,activeToggles:a,setActiveToggles:l,onToggleChange:n})},rp=({items:e,onChange:o})=>{const[t,n]=h.useState(e),[a,l]=h.useState(null),[c,s]=h.useState(null),d=h.useRef({x:0,y:0}),g=h.useRef([]),m=h.useCallback((u,y)=>{u.preventDefault(),document.body.style.cursor="grabbing";const k="touches"in u?u.touches[0].clientX:u.clientX,x="touches"in u?u.touches[0].clientY:u.clientY;d.current={x:k,y:x},s(y),l(t[y])},[t]),f=h.useCallback(u=>{if(c===null)return;const y="touches"in u?u.touches[0].clientX:u.clientX,k="touches"in u?u.touches[0].clientY:u.clientY,x=g.current[c];if(!x)return;const C=y-d.current.x,S=k-d.current.y;x.style.transform=`translate(${C}px, ${S}px)`,x.style.zIndex="1000";const w=g.current.findIndex((v,b)=>{if(!v||b===c)return!1;const I=v.getBoundingClientRect();return k>=I.top&&k<=I.bottom});if(w!==-1&&w!==c){const v=[...t],[b]=v.splice(c,1);v.splice(w,0,b),n(v),s(w),o==null||o(v),d.current={x:y,y:k}}},[c,t,o]),p=h.useCallback(()=>{document.body.style.cursor="",g.current.forEach(u=>{u&&(u.style.transform="",u.style.zIndex="")}),s(null),l(null)},[c]);return h.useEffect(()=>{if(!(typeof window>"u"))return c!==null&&(window.addEventListener("mousemove",f),window.addEventListener("touchmove",f),window.addEventListener("mouseup",p),window.addEventListener("touchend",p)),()=>{window.removeEventListener("mousemove",f),window.removeEventListener("touchmove",f),window.removeEventListener("mouseup",p),window.removeEventListener("touchend",p)}},[c,f,p]),{items:t,draggedItem:a,draggedIndex:c,itemRefs:g,handleDragStart:m}},tp=({items:e,renderItem:o,containerProps:t,itemProps:n,draggedIndex:a,itemRefs:l,handleDragStart:c,views:s,themeMode:d})=>r.jsx(i.View,{overflow:"hidden",position:"relative",...t,...s==null?void 0:s.container,children:e.map((g,m)=>r.jsx(i.View,{ref:f=>{l.current[m]=f},onMouseDown:f=>c(f,m),onTouchStart:f=>c(f,m),position:"relative",cursor:"grab",transition:"transform 0.2s",...n,...s==null?void 0:s.item,children:o?o(g,m):g},m))}),di=e=>{const{items:o,draggedIndex:t,itemRefs:n,handleDragStart:a}=rp(e);return r.jsx(tp,{...e,items:o,draggedIndex:t,itemRefs:n,handleDragStart:a})},np=di,ap=({onFileSelect:e,onMultipleFileSelect:o,validateFile:t,accept:n,multiple:a,disabled:l,previewUrl:c})=>{const[s,d]=h.useState(!1),[g,m]=h.useState(null),f=h.useRef(null),p=c!==void 0?c:g;h.useEffect(()=>()=>{g&&URL.revokeObjectURL(g)},[g]);const u=h.useCallback(v=>{v.preventDefault(),v.stopPropagation(),!l&&d(!0)},[l]),y=h.useCallback(v=>{v.preventDefault(),v.stopPropagation(),!l&&d(!1)},[l]),k=h.useCallback(v=>{v.preventDefault(),v.stopPropagation(),!l&&d(!0)},[l]),x=h.useCallback(v=>{if(!v||v.length===0)return;const b=Array.from(v);if(!a&&b.length>0){const I=b[0];if(I.type.startsWith("image/")){const T=URL.createObjectURL(I);m(P=>(P&&URL.revokeObjectURL(P),T))}else m(null)}a?o&&o(b):b.length>0&&e&&e(b[0])},[a,o,e]),C=h.useCallback(v=>{v.preventDefault(),v.stopPropagation(),d(!1),!l&&v.dataTransfer.files&&v.dataTransfer.files.length>0&&(x(v.dataTransfer.files),v.dataTransfer.clearData())},[l,x]),S=h.useCallback(()=>{var v;l||(v=f.current)==null||v.click()},[l]),w=h.useCallback(v=>{x(v.target.files),v.target.value&&(v.target.value="")},[x]);return{isDragActive:s,handleDragEnter:u,handleDragLeave:y,handleDragOver:k,handleDrop:C,handleClick:S,handleFileChange:w,inputRef:f,preview:p}},lp={position:"absolute",top:"-4px",right:"-4px",width:"16px",height:"16px",borderRadius:"50%",backgroundColor:"rgba(0, 0, 0, 0.5)",color:"white",border:"none",padding:0,display:"flex",alignItems:"center",justifyContent:"center",cursor:"pointer",fontSize:"12px",zIndex:10,_hover:{backgroundColor:"rgba(0, 0, 0, 0.7)"}},gi=({files:e,sandboxId:o,onRemove:t,layout:n="inline",maxHeight:a="120px",showPreviews:l=!1,views:c={}})=>{if(e.length===0)return null;const s=h.useCallback(g=>g<1024?`${g} B`:g<1024*1024?`${(g/1024).toFixed(1)} KB`:`${(g/(1024*1024)).toFixed(1)} MB`,[]),d=h.useCallback(g=>g.type.startsWith("image/")?{backgroundColor:"#DBEAFE",color:"#2563EB"}:g.type.startsWith("video/")?{backgroundColor:"#EDE9FE",color:"#7C3AED"}:g.type.startsWith("audio/")?{backgroundColor:"#DCFCE7",color:"#16A34A"}:{backgroundColor:"#E2E8F0",color:"#475569"},[]);return r.jsx(i.View,{display:"flex",flexWrap:"wrap",gap:"8px",padding:"8px 0",maxHeight:a,overflowY:"auto",...c==null?void 0:c.container,children:e.map((g,m)=>{const f=typeof URL<"u"&&typeof URL.createObjectURL=="function"&&typeof Blob<"u"&&g instanceof Blob,p=(g==null?void 0:g.path)||(g==null?void 0:g.url)||(l&&f?URL.createObjectURL(g):""),u=g.type.startsWith("image/"),y=g.type.startsWith("video/"),k=g.type.startsWith("audio/"),x=d(g);return l?r.jsx(i.Vertical,{alignItems:"center",gap:"6px",padding:"6px 10px",borderRadius:"8px",border:"1px solid #E2E8F0",backgroundColor:"color-white",animate:{from:{opacity:0,scale:.9},to:{opacity:1,scale:1}},animationDuration:.2,...c==null?void 0:c.item,children:l&&r.jsxs(Me,{children:[r.jsxs(Me.Trigger,{children:[u&&r.jsx(i.Image,{src:p,alt:g.name,width:"60px",height:"60px",borderRadius:"8px",objectFit:"cover"}),y&&r.jsx(i.View,{as:"video",src:p,alt:g.name,controls:!1,muted:!0,width:"60px",height:"60px",borderRadius:"8px",objectFit:"cover"}),k&&r.jsx(i.Center,{width:"60px",height:"60px",borderRadius:"8px",backgroundColor:"color-gray-100",children:r.jsx(Fo,{widthHeight:24,color:"color-black"})}),!u&&!y&&!k&&r.jsx(i.Center,{width:"60px",height:"60px",borderRadius:"8px",backgroundColor:"color-gray-100",children:r.jsx(go,{widthHeight:24,color:"color-black"})}),t&&r.jsx(i.Button,{...lp,onClick:C=>{C.stopPropagation(),t(m)},"aria-label":`Remove ${g.name}`,children:"×"})]}),r.jsxs(Me.Content,{children:[u&&r.jsx(i.Image,{src:p,alt:g.name,maxWidth:"100%"}),y&&r.jsx(i.View,{as:"video",src:p,controls:!0,maxWidth:"100%"}),k&&r.jsx(i.View,{as:"audio",src:p,controls:!0,width:"100%"}),r.jsxs(i.Text,{marginTop:"4px",maxLines:1,width:"100%",...c==null?void 0:c.name,children:[g.name," (",s(g.size),")"]})]})]})},m):r.jsxs(i.Horizontal,{alignItems:"center",gap:"8px",padding:"6px 10px 6px 8px",borderRadius:"9999px",border:"1px solid #E2E8F0",backgroundColor:"color-white",maxWidth:"100%",animate:{from:{opacity:0,scale:.96},to:{opacity:1,scale:1}},animationDuration:.2,...c==null?void 0:c.item,children:[r.jsx(i.Center,{width:"22px",height:"22px",minWidth:"22px",borderRadius:"9999px",backgroundColor:x.backgroundColor,color:x.color,children:k?r.jsx(Fo,{widthHeight:12,color:"currentColor"}):r.jsx(go,{widthHeight:12,color:"currentColor"})}),r.jsxs(i.Text,{fontSize:"12px",lineHeight:"16px",color:"color-gray-600",maxLines:1,maxWidth:"220px",...c==null?void 0:c.name,children:[g.name," · ",s(g.size)]}),t&&r.jsx(i.View,{as:"button",type:"button",onClick:()=>t(m),"aria-label":`Remove ${g.name}`,display:"flex",alignItems:"center",justifyContent:"center",width:"16px",height:"16px",minWidth:"16px",border:"none",backgroundColor:"transparent",color:"color-gray-400",padding:0,cursor:"pointer",transition:"color 0.2s ease, opacity 0.2s ease",_hover:{color:"color-gray-600"},children:"×"})]},m)})})},ip=({children:e,text:o="Drop files here or click to upload",textProps:t,containerProps:n,disabled:a,accept:l,multiple:c,isDragActive:s,handleDragEnter:d,handleDragLeave:g,handleDragOver:m,handleDrop:f,handleClick:p,handleFileChange:u,inputRef:y,preview:k,imageProps:x,selectedFiles:C,onRemove:S})=>r.jsxs(i.Center,{width:"100%",minHeight:"200px",height:C&&C.length>0?"auto":"200px",borderWidth:2,borderStyle:"dashed",borderColor:s?"theme-primary":"color-gray-300",borderRadius:12,backgroundColor:s?"#EFF6FF":"color-gray-50",flexDirection:"column",cursor:a?"not-allowed":"pointer",opacity:a?.6:1,onClick:p,onDragEnter:d,onDragLeave:g,onDragOver:m,onDrop:f,transition:"background-color 0.2s ease, border-color 0.2s ease, opacity 0.2s ease",overflow:"hidden",position:"relative",padding:16,...n,children:[r.jsx("input",{type:"file",ref:y,onChange:u,accept:l,multiple:c,style:{display:"none"},disabled:a}),k&&!c?r.jsxs(i.View,{width:"100%",height:"200px",position:"relative",children:[r.jsx(i.Image,{src:k,alt:"Preview",width:"100%",height:"100%",objectFit:"contain",...x}),r.jsx(i.Center,{position:"absolute",top:0,left:0,right:0,bottom:0,backgroundColor:"rgba(0,0,0,0.3)",opacity:0,_hover:{opacity:1},transition:"opacity 0.2s",children:r.jsx(i.Text,{color:"white",fontWeight:600,children:"Click to replace"})})]}):r.jsxs(i.View,{flexDirection:"column",alignItems:"center",width:"100%",children:[e||r.jsxs(i.View,{flexDirection:"column",alignItems:"center",width:"100%",children:[r.jsx(wt,{widthHeight:40,color:s?"theme-primary":"color-gray-500"}),r.jsx(i.Text,{marginTop:16,color:s?"theme-primary":"color-gray-600",fontWeight:500,textAlign:"center",...t,children:o})]}),c&&C&&C.length>0&&r.jsx(i.View,{marginTop:16,width:"100%",children:r.jsx(gi,{files:C,onRemove:S||(()=>{}),showPreviews:!0,layout:"inline",maxHeight:"160px"})})]})]}),cp=e=>{const o=ap(e);return r.jsx(ip,{...e,...o})},sp=(e=!1)=>{const[o,t]=h.useState(e),[n,a]=h.useState(null);return h.useEffect(()=>{const l=d=>{!d.composedPath().some(f=>(f==null?void 0:f.id)==="dropdown-menu"||(f==null?void 0:f.id)==="dropdown-trigger")&&o&&(t(!1),a(null))},c=()=>{o&&(t(!1),a(null))},s=d=>{d.key==="Escape"&&o&&(t(!1),a(null))};if(!(typeof document>"u"||typeof window>"u"))return document.addEventListener("mousedown",l),window.addEventListener("resize",c),document.addEventListener("keydown",s),()=>{document.removeEventListener("mousedown",l),window.removeEventListener("resize",c),document.removeEventListener("keydown",s)}},[o]),{isOpen:o,setIsOpen:t,activeSubmenuId:n,setActiveSubmenuId:a}},dp={sm:{padding:"6px 8px",fontSize:"14px",minWidth:"160px"},md:{padding:"8px 12px",fontSize:"16px",minWidth:"180px"},lg:{padding:"10px 16px",fontSize:"18px",minWidth:"200px"}},gp={default:{backgroundColor:"color-white",color:"color-gray-800"},filled:{backgroundColor:"color-gray-100",color:"color-gray-800"},outline:{backgroundColor:"color-white",borderWidth:"1px",borderStyle:"solid",borderColor:"color-gray-200",color:"color-gray-800"}},hp={hover:{backgroundColor:"color-gray-100"}},hi=h.createContext({isOpen:!1,setIsOpen:()=>{},activeSubmenuId:null,setActiveSubmenuId:()=>{},size:"md",variant:"default",triggerRef:{current:null}}),fp=({children:e,value:o})=>r.jsx(hi.Provider,{value:o,children:e}),gn=()=>{const e=h.useContext(hi);if(!e)throw new Error("useDropdownMenuContext must be used within a DropdownMenuProvider");return e},fi=({children:e,views:o,...t})=>{const{isOpen:n,setIsOpen:a,triggerRef:l}=gn(),c=s=>{s.stopPropagation(),a(!n)};return r.jsx(i.View,{ref:l,id:"dropdown-trigger",onClick:c,cursor:"pointer",position:"relative",display:"inline-block",...o==null?void 0:o.container,...t,children:e})},hn=({items:e,side:o="bottom",align:t="start",views:n,...a})=>{const{isOpen:l,variant:c,triggerRef:s}=gn(),d=h.useRef(null),{ref:g,relation:m}=i.useElementPosition({trackChanges:!0,trackOnHover:!0,trackOnScroll:!0,trackOnResize:!0}),[f,p]=h.useState({x:0,y:0,placement:o});if(h.useEffect(()=>{s.current&&g&&(g.current=s.current)},[s,g,l]),h.useEffect(()=>{if(l&&d.current&&s.current){const k=s.current.getBoundingClientRect();let x=o;m&&(o==="bottom"&&m.space.vertical==="top"?x="top":o==="top"&&m.space.vertical==="bottom"?x="bottom":o==="right"&&m.space.horizontal==="left"?x="left":o==="left"&&m.space.horizontal==="right"&&(x="right"));let C=0,S=0;switch(x){case"bottom":C=t==="start"?k.left:t==="end"?k.right-180:k.left+k.width/2-90,S=k.bottom+8;break;case"top":C=t==="start"?k.left:t==="end"?k.right-180:k.left+k.width/2-90,S=k.top-8;break;case"right":C=k.right+8,S=t==="start"?k.top:t==="end"?k.bottom-100:k.top+k.height/2-50;break;case"left":C=k.left-8,S=t==="start"?k.top:t==="end"?k.bottom-100:k.top+k.height/2-50;break}p({x:C,y:S,placement:x})}},[l,o,t,s,m]),!l)return null;const y=(()=>{const k={position:"fixed",left:f.x,top:f.y,zIndex:1e3};switch(f.placement){case"top":return{...k,transform:"translateY(-100%)"};case"left":return{...k,transform:"translateX(-100%)"};case"bottom":case"right":default:return k}})();return r.jsx(i.View,{ref:d,id:"dropdown-menu",borderRadius:4,boxShadow:"0px 2px 8px rgba(0, 0, 0, 0.15)",overflow:"hidden",style:y,...gp[c],...n==null?void 0:n.menu,...a,children:e.map((k,x)=>k.divider?r.jsx(pi,{views:n},`divider-${x}`):r.jsx(mi,{item:k,views:n},k.id))})},mi=({item:e,views:o,...t})=>{const{activeSubmenuId:n,setActiveSubmenuId:a,size:l}=gn(),[c,s]=h.useState(!1),d=e.items&&e.items.length>0,g=n===e.id,m=h.useRef(null),f=()=>{s(!0),d&&a(e.id)},p=()=>{s(!1)},u=y=>{y.stopPropagation(),!e.disabled&&!d&&e.onClick&&e.onClick()};return r.jsxs(i.View,{ref:m,display:"flex",alignItems:"center",cursor:e.disabled?"not-allowed":"pointer",opacity:e.disabled?.5:1,position:"relative",...dp[l],_hover:e.disabled?{}:hp.hover,backgroundColor:c&&!e.disabled?"color-gray-100":"transparent",onMouseEnter:f,onMouseLeave:p,onClick:u,...o==null?void 0:o.item,...t,children:[e.icon&&r.jsx(i.View,{marginRight:8,...o==null?void 0:o.icon,children:e.icon}),r.jsx(i.View,{flexGrow:1,children:e.label}),d&&r.jsx(i.View,{marginLeft:8,...o==null?void 0:o.submenuIndicator,children:r.jsx(he,{orientation:"right",widthHeight:16,color:"currentColor",filled:!0})}),g&&d&&r.jsx(hn,{items:e.items||[],side:"right",align:"start",views:o})]})},pi=({views:e,...o})=>r.jsx(i.View,{height:"1px",backgroundColor:"color-gray-200",margin:"4px 0",...e==null?void 0:e.divider,...o}),mp=({trigger:e,items:o,side:t="bottom",align:n="start",views:a,themeMode:l,...c})=>r.jsxs(i.View,{position:"relative",display:"inline-block",...a==null?void 0:a.container,...c,children:[r.jsx(fi,{views:a,children:e}),r.jsx(hn,{items:o,side:t,align:n,views:a})]}),ir=({trigger:e,items:o,size:t="md",variant:n="default",side:a="bottom",align:l="start",defaultOpen:c=!1,views:s,...d})=>{const{isOpen:g,setIsOpen:m,activeSubmenuId:f,setActiveSubmenuId:p}=sp(c),u=h.useRef(null);return r.jsx(fp,{value:{isOpen:g,setIsOpen:m,activeSubmenuId:f,setActiveSubmenuId:p,size:t,variant:n,triggerRef:u},children:r.jsx(mp,{trigger:e,items:o,side:a,align:l,views:s,...d})})};ir.Trigger=fi,ir.Content=hn,ir.Item=mi,ir.Divider=pi;const pp=e=>{const{value:o,defaultValue:t="",onChange:n,onChangeComplete:a,isOpen:l,onOpen:c,onClose:s,closeOnSelect:d=!0,maxRecentColors:g=8,showRecentColors:m=!0,colorFormat:f}=e,[p,u]=h.useState(l??!1),[y,k]=h.useState(o??t),[x,C]=h.useState(""),[S,w]=h.useState([]),v=h.useRef(null),b=h.useRef(null);h.useEffect(()=>{o!==void 0&&k(o)},[o]),h.useEffect(()=>{l!==void 0&&u(l)},[l]),h.useEffect(()=>{if(m&&typeof localStorage<"u"){const A=localStorage.getItem("colorPicker-recentColors");if(A)try{w(JSON.parse(A))}catch{}}},[m]),h.useEffect(()=>{if(typeof document>"u"||typeof document.addEventListener!="function")return;const A=W=>{p&&v.current&&b.current&&!v.current.contains(W.target)&&!b.current.contains(W.target)&&z()};return document.addEventListener("mousedown",A),()=>document.removeEventListener("mousedown",A)},[p]);const I=h.useCallback(A=>{m&&w(W=>{const H=W.filter(j=>j!==A),V=[A,...H].slice(0,g);return typeof localStorage<"u"&&localStorage.setItem("colorPicker-recentColors",JSON.stringify(V)),V})},[m,g]),T=h.useCallback(()=>{const A=!p;u(A),A?c==null||c():s==null||s()},[p,c,s]),P=h.useCallback(A=>{k(A),I(A);const W=$r(A,f);n==null||n(W),a==null||a(W),d&&(u(!1),s==null||s())},[n,a,d,s,I,f]),E=h.useCallback(A=>{C(A)},[]),D=h.useCallback(()=>{x&&(P(x),C(""))},[x,P]),z=h.useCallback(()=>{u(!1),s==null||s()},[s]);return{isOpen:p,selectedColor:y,recentColors:S,customColor:x,handleToggle:T,handleColorSelect:P,handleCustomColorChange:E,handleCustomColorSubmit:D,handleClose:z,triggerRef:v,dropdownRef:b}},$o={container:{position:"relative",display:"inline-block",width:"100%"},trigger:{display:"flex",alignItems:"center",justifyContent:"space-between",cursor:"pointer",transition:"background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease"},dropdown:{position:"absolute",top:"calc(100% + 8px)",left:0,right:0,zIndex:1e3,backgroundColor:"color-white",borderRadius:12,borderWidth:"1px",borderStyle:"solid",borderColor:"color-gray-200",boxShadow:"0 12px 32px rgba(15, 23, 42, 0.14)",padding:"16px",minWidth:"320px"},colorGrid:{display:"grid",gridTemplateColumns:"repeat(6, 36px)",flexDirection:"row",flexWrap:"wrap",justifyContent:"flex-start",gap:"12px",marginBottom:"16px"},customInput:{marginBottom:"12px"},recentColors:{borderTop:"1px solid color-gray-100",paddingTop:"12px"}},up={xs:{height:"32px",fontSize:"12px",padding:"4px 8px"},sm:{height:"40px",fontSize:"12px",padding:"8px 10px"},md:{height:"44px",fontSize:"14px",padding:"10px 12px"},lg:{height:"48px",fontSize:"16px",padding:"12px 14px"},xl:{height:"56px",fontSize:"18px",padding:"14px 16px"}},yp={default:{borderRadius:8},square:{borderRadius:0},rounded:{borderRadius:8},pill:{borderRadius:9999}},bp={default:{backgroundColor:"color-white",borderWidth:"1px",borderStyle:"solid",borderColor:"color-gray-200",color:"color-gray-900"},outline:{backgroundColor:"color-white",borderWidth:"1px",borderStyle:"solid",borderColor:"color-gray-200",color:"color-gray-900"},filled:{backgroundColor:"color-gray-50",borderWidth:"1px",borderStyle:"solid",borderColor:"color-gray-200",color:"color-gray-900"}},xp=[{name:"Blue",value:"#1D4ED8",category:"primary"},{name:"Purple",value:"#A855F7",category:"primary"},{name:"Green",value:"#22C55E",category:"primary"},{name:"Orange",value:"#F97316",category:"primary"},{name:"Red",value:"#EF4444",category:"primary"},{name:"Ink",value:"#111827",category:"neutral"}],kp=typeof navigator<"u"&&navigator.product!=="ReactNative"&&typeof document<"u"&&typeof document.createElement=="function",Cp=({id:e,name:o,label:t,placeholder:n="Select a color",helperText:a,views:l={},size:c="md",shape:s="default",variant:d="default",error:g=!1,isDisabled:m=!1,isReadOnly:f=!1,predefinedColors:p=xp,showCustomInput:u=!0,showRecentColors:y=!0,isOpen:k,selectedColor:x,recentColors:C,customColor:S,handleToggle:w,handleColorSelect:v,handleCustomColorChange:b,handleCustomColorSubmit:I,handleClose:T,triggerRef:P,dropdownRef:E,onChange:D,onChangeComplete:z,onOpen:A,onClose:W,colorFormat:H,maxRecentColors:V,closeOnSelect:j,defaultValue:M,value:L,..._})=>{const O={...$o.container,...l==null?void 0:l.container},N={...$o.trigger,...up[c],...yp[s],...bp[d],...g&&{borderColor:"color-red-500"},...m&&{opacity:.6,cursor:"not-allowed"},...!m&&!f&&{_hover:{borderColor:"color-gray-400"}},...l==null?void 0:l.trigger},U={...$o.dropdown,...l==null?void 0:l.dropdown},X={...$o.colorGrid,...l==null?void 0:l.colorGrid},oe={...$o.recentColors,...l==null?void 0:l.recentColors},B=x||"color-gray-200";return r.jsxs(i.View,{id:e,...O,..._,children:[t&&r.jsx(i.Text,{fontSize:"12px",lineHeight:"16px",fontWeight:"500",color:"color-gray-600",marginBottom:"6px",...l==null?void 0:l.label,children:t}),r.jsxs(i.View,{ref:P,onClick:m||f?void 0:w,...N,children:[r.jsxs(i.Horizontal,{alignItems:"center",gap:8,children:[r.jsx(i.View,{width:"24px",height:"24px",borderRadius:"8px",backgroundColor:B,borderWidth:"1px",borderStyle:"solid",borderColor:"color-gray-200"}),r.jsx(i.Text,{color:x?"color-gray-900":"color-gray-500",fontSize:"inherit",children:x||n})]}),!f&&!m&&r.jsx(he,{widthHeight:16,color:"color-gray-500",orientation:k?"up":"down"})]}),k&&r.jsxs(i.View,{ref:E,...U,children:[r.jsx(i.View,{...X,children:p.map(($,q)=>r.jsx(i.View,{width:"36px",height:"36px",borderRadius:"8px",backgroundColor:$.value,borderWidth:"1px",borderStyle:"solid",borderColor:x===$.value?"theme-primary":"transparent",cursor:"pointer",onClick:()=>v($.value),title:$.name,_hover:{transform:"scale(1.05)",borderColor:"color-gray-300"},...l==null?void 0:l.colorSwatch},q))}),u&&r.jsxs(i.View,{...$o.customInput,...l==null?void 0:l.customInput,children:[r.jsxs(i.Horizontal,{gap:8,alignItems:"center",marginBottom:"10px",children:[kp&&r.jsx("input",{type:"color",value:S||"#1D4ED8",onChange:$=>{const q=$.target.value;b(q),v(q)},style:{width:"36px",height:"36px",border:"1px solid #E5E7EB",borderRadius:"8px",cursor:"pointer",backgroundColor:"transparent"},title:"Pick a color"}),r.jsx(i.Text,{fontSize:"12px",lineHeight:"16px",color:"color-gray-500",children:"HEX"})]}),r.jsx(je,{placeholder:"#1D4ED8",value:S,onChange:$=>{var q;return b(typeof $=="string"?$:((q=$==null?void 0:$.target)==null?void 0:q.value)??"")},onKeyPress:$=>{$.key==="Enter"&&I()},size:"sm",right:S&&r.jsx(i.View,{width:"18px",height:"18px",borderRadius:"6px",backgroundColor:S,borderWidth:"1px",borderStyle:"solid",borderColor:"color-gray-200",cursor:"pointer",onClick:I})})]}),y&&C.length>0&&r.jsxs(i.View,{...oe,children:[r.jsx(i.Text,{fontSize:"11px",lineHeight:"16px",fontWeight:"500",color:"color-gray-500",marginBottom:"8px",children:"Recent Colors"}),r.jsx(i.Horizontal,{gap:8,flexWrap:"wrap",children:C.map(($,q)=>r.jsx(i.View,{width:"24px",height:"24px",borderRadius:"8px",backgroundColor:$,borderWidth:"1px",borderStyle:"solid",borderColor:"color-gray-200",cursor:"pointer",transition:"transform 0.2s ease, border-color 0.2s ease",onClick:()=>v($),title:$,_hover:{transform:"scale(1.05)",borderColor:"color-gray-300"}},q))})]})]}),a&&r.jsx(i.Text,{fontSize:"11px",lineHeight:"16px",color:g?"color-red-500":"color-gray-500",marginTop:"4px",...l==null?void 0:l.helperText,children:a})]})},ui=e=>{const o=pp(e);return r.jsx(Cp,{...o,...e})},wp=e=>{const o=Ll(e);return r.jsx(_l,{...o,...e})},Sp=e=>{const o=Dl(e);return r.jsx($l,{...o,...e})},yi={"to-right":"to right","to-left":"to left","to-bottom":"to bottom","to-top":"to top","to-top-right":"to top right","to-top-left":"to top left","to-bottom-right":"to bottom right","to-bottom-left":"to bottom left"},Ur={center:"center",top:"top",right:"right",bottom:"bottom",left:"left","top-right":"top right","top-left":"top left","bottom-right":"bottom right","bottom-left":"bottom left"},vp={linear:[{color:"color-blue-500",position:"0%"},{color:"color-purple-500",position:"100%"}],radial:[{color:"color-blue-500",position:"0%"},{color:"color-purple-500",position:"100%"}],conic:[{color:"color-red-500",position:"0deg"},{color:"color-yellow-500",position:"90deg"},{color:"color-green-500",position:"180deg"},{color:"color-blue-500",position:"270deg"},{color:"color-red-500",position:"360deg"}]},Tp=(e,o,t,n,a)=>{const l=o.map(c=>`${c.color} ${c.position||""}`).join(", ");switch(e){case"linear":return`linear-gradient(${t&&yi[t]?yi[t]:t||"to right"}, ${l})`;case"radial":const s=a&&Ur[a]?Ur[a]:a||"center";return`radial-gradient(${n||"circle"} at ${s}, ${l})`;case"conic":return`conic-gradient(from 0deg at ${a&&Ur[a]?Ur[a]:a||"center"}, ${l})`;default:return`linear-gradient(to right, ${l})`}},Ip={linear:{backgroundSize:"200% 200%",transition:"background-position 3s ease-in-out",animate:{from:{backgroundPosition:"0% 50%"},"50%":{backgroundPosition:"100% 50%"},to:{backgroundPosition:"0% 50%"}}},radial:{backgroundSize:"100% 100%",transition:"background-position 3s ease-in-out, background-size 3s ease-in-out",animate:{from:{backgroundPosition:"center",backgroundSize:"100% 100%"},"50%":{backgroundSize:"120% 120%"},to:{backgroundPosition:"center",backgroundSize:"100% 100%"}}},conic:{transition:"transform 3s linear",animate:{from:{transform:"rotate(0deg)"},to:{transform:"rotate(360deg)"}}}},bi={container:{position:"relative",overflow:"hidden",borderRadius:"8px",transition:"border-radius 0.2s ease, opacity 0.2s ease"},content:{position:"relative",zIndex:1,width:"100%",height:"100%",padding:"16px"}},Fp=({type:e="linear",direction:o="to-right",shape:t="circle",position:n="center",from:a,to:l,colors:c,animate:s=!1,animationDuration:d=3,children:g,views:m,themeMode:f,...p})=>{const u=h.useMemo(()=>c&&c.length>0?c:a&&l?[{color:a,position:"0%"},{color:l,position:"100%"}]:vp[e],[c,a,l,e]),y=h.useMemo(()=>{const x=u.map(C=>({...C,color:C.color}));return Tp(e,x,o,t,n)},[e,u,o,t,n]),k=h.useMemo(()=>{if(!s)return{};const x=Ip[e];return{...x,transition:x.transition.replace("3s",`${d}s`),animationDuration:`${d}s`,animationIterationCount:"infinite",animationTimingFunction:e==="conic"?"linear":"ease-in-out"}},[s,d,e]);return r.jsx(i.View,{background:y,...bi.container,...k,...m==null?void 0:m.container,...p,children:g&&r.jsx(i.View,{...bi.content,...m==null?void 0:m.content,children:g})})},xi=e=>r.jsx(Fp,{...e}),zp=(e=null,o=null)=>{const[t,n]=h.useState(e),[a,l]=h.useState(o),c=d=>a===d,s=d=>{l(g=>g===d?null:d)};return h.useEffect(()=>{const d=m=>{!m.composedPath().some(u=>(u==null?void 0:u.id)==="menubar-content"||(u==null?void 0:u.id)==="menubar-trigger")&&a!==null&&l(null)},g=m=>{m.key==="Escape"&&a!==null&&l(null)};if(!(typeof document>"u"))return document.addEventListener("mousedown",d),document.addEventListener("keydown",g),()=>{document.removeEventListener("mousedown",d),document.removeEventListener("keydown",g)}},[a]),{activeMenuId:t,setActiveMenuId:n,openMenuId:a,setOpenMenuId:l,isMenuOpen:c,toggleMenu:s}},ki={sm:{padding:"6px 10px",fontSize:"14px"},md:{padding:"8px 12px",fontSize:"16px"},lg:{padding:"10px 16px",fontSize:"18px"}},Mp={default:{backgroundColor:"transparent",color:"color-gray-800"},filled:{backgroundColor:"color-gray-100",color:"color-gray-800"},outline:{backgroundColor:"transparent",borderWidth:"1px",borderStyle:"solid",borderColor:"color-gray-200",color:"color-gray-800"}},Wp={horizontal:{flexDirection:"row"},vertical:{flexDirection:"column"}},Gr={active:{backgroundColor:"color-gray-200",fontWeight:"bold"},hover:{backgroundColor:"color-gray-100"},disabled:{opacity:.5,cursor:"not-allowed"}},Ci=h.createContext({activeMenuId:null,setActiveMenuId:()=>{},openMenuId:null,setOpenMenuId:()=>{},isMenuOpen:()=>!1,toggleMenu:()=>{},orientation:"horizontal",size:"md",variant:"default",triggerRefs:{current:{}}}),Yr=()=>h.useContext(Ci),Hp=({value:e,children:o})=>r.jsx(Ci.Provider,{value:e,children:o}),wi=({children:e,orientation:o="horizontal",size:t="md",variant:n="default",views:a,...l})=>{const c=o==="horizontal"?i.Horizontal:i.Vertical;return r.jsx(c,{role:"menubar","aria-orientation":o,...Wp[o],...Mp[n],...a==null?void 0:a.container,...l,children:e})},Si=({children:e,id:o,disabled:t=!1,views:n})=>{const{orientation:a}=Yr(),l=a==="horizontal"?i.Horizontal:i.Vertical;return r.jsx(l,{role:"none",position:"relative",opacity:t?.5:1,pointerEvents:t?"none":"auto",...n==null?void 0:n.menu,children:h.Children.map(e,c=>h.isValidElement(c)?h.cloneElement(c,{...c.props,menuId:o}):c)})},vi=({children:e,menuId:o,disabled:t=!1,views:n})=>{const{activeMenuId:a,setActiveMenuId:l,toggleMenu:c,isMenuOpen:s,size:d,triggerRefs:g}=Yr(),m=h.useRef(null),f=a===o,p=s(o);h.useEffect(()=>(m.current&&o&&(g.current[o]=m.current),()=>{o&&delete g.current[o]}),[o,g]);const u=()=>{t||(l(o),c(o))};return r.jsx(i.View,{ref:m,id:"menubar-trigger",role:"menuitem","aria-haspopup":"true","aria-expanded":p,userSelect:"none",display:"flex",alignItems:"center",justifyContent:"space-between",...ki[d],...f?Gr.active:{},...t?Gr.disabled:{},_hover:t?{}:Gr.hover,onClick:u,...n==null?void 0:n.trigger,children:e})},Ti=({children:e,menuId:o,views:t})=>{const{isMenuOpen:n,orientation:a,triggerRefs:l}=Yr(),c=h.useRef(null),[s,d]=h.useState({x:0,y:0,placement:a==="horizontal"?"bottom":"right"}),g=n(o);if(h.useEffect(()=>{if(g&&c.current&&o&&l.current[o]){const f=c.current.getBoundingClientRect(),p=l.current[o].getBoundingClientRect(),u=Math.max(f.width||200,200),y=Math.max(f.height||150,150),k=window.innerWidth,x=window.innerHeight,C={top:p.top,right:k-p.right,bottom:x-p.bottom,left:p.left},S=a==="horizontal"?[{placement:"bottom",space:C.bottom,fits:C.bottom>=y+8,x:p.left,y:p.bottom+8},{placement:"top",space:C.top,fits:C.top>=y+8,x:p.left,y:p.top-y-8},{placement:"right",space:C.right,fits:C.right>=u+8,x:p.right+8,y:p.top},{placement:"left",space:C.left,fits:C.left>=u+8,x:p.left-u-8,y:p.top}]:[{placement:"right",space:C.right,fits:C.right>=u+8,x:p.right+8,y:p.top},{placement:"left",space:C.left,fits:C.left>=u+8,x:p.left-u-8,y:p.top},{placement:"bottom",space:C.bottom,fits:C.bottom>=y+8,x:p.left,y:p.bottom+8},{placement:"top",space:C.top,fits:C.top>=y+8,x:p.left,y:p.top-y-8}],w=S.find(T=>T.fits);if(w){d({x:w.x,y:w.y,placement:w.placement});return}const v=S.reduce((T,P)=>P.space>T.space?P:T);let b=v.x,I=v.y;b+u>k&&(b=k-u-8),b<8&&(b=8),I+y>x&&(I=x-y-8),I<8&&(I=8),d({x:b,y:I,placement:v.placement})}},[g,a,o,l]),!g)return null;const m={position:"fixed",left:s.x,top:s.y,zIndex:1e3};return r.jsx(i.View,{ref:c,id:"menubar-content",role:"menu",minWidth:"200px",backgroundColor:"color-white",borderRadius:4,boxShadow:"0px 2px 8px rgba(0, 0, 0, 0.15)",overflow:"hidden",style:m,...t==null?void 0:t.content,children:e})},Ii=({children:e,icon:o,disabled:t=!1,onClick:n,views:a})=>{const{size:l}=Yr(),c=()=>{t||!n||n()};return r.jsxs(i.View,{role:"menuitem",cursor:t?"not-allowed":"pointer",userSelect:"none",display:"flex",alignItems:"center",opacity:t?.5:1,...ki[l],_hover:t?{}:Gr.hover,onClick:c,...a==null?void 0:a.item,children:[o&&r.jsx(i.View,{marginRight:8,...a==null?void 0:a.icon,children:o}),e]})},Fi=({views:e})=>r.jsx(i.View,{role:"separator",height:"1px",backgroundColor:"color-gray-200",margin:"4px 0",...e==null?void 0:e.separator}),jp=({items:e,orientation:o,size:t,variant:n,views:a,themeMode:l})=>r.jsx(wi,{orientation:o,size:t,variant:n,views:a,children:e.map(c=>r.jsxs(Si,{id:c.id,disabled:c.disabled,views:a,children:[r.jsxs(vi,{menuId:c.id,views:a,children:[c.icon&&r.jsx(i.View,{marginRight:8,...a==null?void 0:a.icon,children:c.icon}),c.label]}),c.items&&c.items.length>0&&r.jsx(Ti,{menuId:c.id,views:a,children:c.items.map((s,d)=>s.separator?r.jsx(Fi,{views:a},`separator-${d}`):r.jsx(Ii,{id:s.id,icon:s.icon,disabled:s.disabled,onClick:s.onClick,views:a,children:s.label},s.id))})]},c.id))}),xo=({items:e,orientation:o="horizontal",size:t="md",variant:n="default",defaultActiveMenuId:a=null,defaultOpenMenuId:l=null,views:c,...s})=>{const{activeMenuId:d,setActiveMenuId:g,openMenuId:m,setOpenMenuId:f,isMenuOpen:p,toggleMenu:u}=zp(a,l),y=h.useRef({});return r.jsx(Hp,{value:{activeMenuId:d,setActiveMenuId:g,openMenuId:m,setOpenMenuId:f,isMenuOpen:p,toggleMenu:u,orientation:o,size:t,variant:n,triggerRefs:y},children:r.jsx(jp,{items:e,orientation:o,size:t,variant:n,views:c,...s})})};xo.Root=wi,xo.Menu=Si,xo.Trigger=vi,xo.Content=Ti,xo.Item=Ii,xo.Separator=Fi;const Pp=(e,o,t)=>{const[n,a]=h.useState([]);return h.useEffect(()=>{a((()=>{const c=[];if(o<=t)for(let s=1;s<=o;s++)c.push(s);else{c.push(1);let s=Math.max(2,e-Math.floor((t-2)/2)),d=Math.min(o-1,s+t-3);d>=o-1&&(d=o-1,s=Math.max(2,d-(t-3))),s>2&&c.push("...");for(let g=s;g<=d;g++)c.push(g);d<o-1&&c.push("..."),c.push(o)}return c})())},[e,o,t]),{visiblePageNumbers:n}},Lo={sm:{fontSize:"12px",padding:"4px 8px",minWidth:"28px",height:"28px",media:{mobile:{fontSize:"11px",padding:"3px 6px",minWidth:"24px",height:"24px"}}},md:{fontSize:"14px",padding:"6px 10px",minWidth:"32px",height:"32px",media:{mobile:{fontSize:"12px",padding:"4px 8px",minWidth:"28px",height:"28px"}}},lg:{fontSize:"14px",padding:"8px 12px",minWidth:"36px",height:"36px",media:{mobile:{fontSize:"12px",padding:"4px 8px",minWidth:"28px",height:"28px"}}}},cr={default:{backgroundColor:"transparent",color:"color-gray-800",borderWidth:"0px",borderStyle:"none",transition:"all 0.2s ease-in-out",_hover:{backgroundColor:"color-gray-100"}},filled:{backgroundColor:"color-gray-100",color:"color-gray-800",borderWidth:"0px",borderStyle:"none",transition:"all 0.2s ease-in-out",_hover:{backgroundColor:"color-gray-200"}},outline:{backgroundColor:"transparent",borderWidth:"1px",borderStyle:"solid",borderColor:"color-gray-200",color:"color-gray-800",transition:"all 0.2s ease-in-out",_hover:{backgroundColor:"color-gray-100"}}},sr={rounded:{borderRadius:8},square:{borderRadius:"0px"},circular:{borderRadius:"50%"}},Vp={backgroundColor:"theme-primary",color:"color-white",transition:"all 0.2s ease-in-out",_hover:{backgroundColor:"theme-primary",opacity:.9}},Kr={opacity:.5,cursor:"not-allowed",transition:"all 0.2s ease-in-out",_hover:{backgroundColor:"transparent"}},Ap=({currentPage:e,totalPages:o,onPageChange:t,pageSize:n=10,pageSizeOptions:a=[{label:"10 / page",value:10},{label:"20 / page",value:20},{label:"50 / page",value:50},{label:"100 / page",value:100}],onPageSizeChange:l,showPageSizeSelector:c=!1,showPageInfo:s=!0,maxPageButtons:d=5,showFirstLastButtons:g=!1,size:m="md",variant:f="default",shape:p="rounded",visiblePageNumbers:u=[],views:y,...k})=>{const x=w=>{w<1||w>o||w===e||t(w)},C=w=>{l&&l(Number(w.target.value))},S=(w,v)=>{if(w==="...")return r.jsx(i.View,{display:"flex",alignItems:"center",justifyContent:"center",...Lo[m],...y==null?void 0:y.ellipsis,children:"..."},`ellipsis-${v}`);const b=w===e;return r.jsx(i.View,{as:"button",display:"flex",alignItems:"center",justifyContent:"center",cursor:b?"default":"pointer",...Lo[m],...cr[f],...sr[p],...b?Vp:{},onClick:()=>x(w),"aria-label":`Page ${w}`,"aria-current":b?"page":void 0,...b?y==null?void 0:y.activePageButton:y==null?void 0:y.pageButton,children:w},`page-${w}`)};return r.jsxs(i.Horizontal,{alignItems:"center",gap:8,...y==null?void 0:y.container,...k,children:[g&&r.jsxs(i.View,{as:"button",display:"flex",alignItems:"center",justifyContent:"center",cursor:e===1?"not-allowed":"pointer",...Lo[m],...cr[f],...sr[p],...e===1?Kr:{},onClick:()=>x(1),"aria-label":"First page",disabled:e===1,...y==null?void 0:y.navigationButton,children:[r.jsx(he,{orientation:"left",widthHeight:16}),r.jsx(he,{orientation:"left",widthHeight:16,marginLeft:"-8px"})]}),r.jsx(i.View,{as:"button",display:"flex",alignItems:"center",justifyContent:"center",cursor:e===1?"not-allowed":"pointer",...Lo[m],...cr[f],...sr[p],...e===1?Kr:{},onClick:()=>x(e-1),"aria-label":"Previous page",disabled:e===1,...y==null?void 0:y.navigationButton,children:r.jsx(he,{orientation:"left",widthHeight:16})}),u.map((w,v)=>S(w,v)),r.jsx(i.View,{as:"button",display:"flex",alignItems:"center",justifyContent:"center",cursor:e===o?"not-allowed":"pointer",...Lo[m],...cr[f],...sr[p],...e===o?Kr:{},onClick:()=>x(e+1),"aria-label":"Next page",disabled:e===o,...y==null?void 0:y.navigationButton,children:r.jsx(he,{orientation:"right",widthHeight:16})}),g&&r.jsxs(i.View,{as:"button",display:"flex",alignItems:"center",justifyContent:"center",cursor:e===o?"not-allowed":"pointer",...Lo[m],...cr[f],...sr[p],...e===o?Kr:{},onClick:()=>x(o),"aria-label":"Last page",disabled:e===o,...y==null?void 0:y.navigationButton,children:[r.jsx(he,{orientation:"right",widthHeight:16}),r.jsx(he,{orientation:"right",widthHeight:16,marginLeft:"-8px"})]}),s&&r.jsxs(i.Text,{marginLeft:16,color:"color-gray-600",...y==null?void 0:y.pageInfo,children:["Page ",e," of ",o]}),c&&l&&r.jsx(i.View,{as:"select",marginLeft:16,padding:"4px 8px",borderRadius:"4px",borderWidth:"1px",borderStyle:"solid",borderColor:"color-gray-200",backgroundColor:"color-white",cursor:"pointer",value:n,onChange:C,...y==null?void 0:y.pageSizeSelector,children:a.map(w=>r.jsx("option",{value:w.value,children:w.label},w.value))})]})},zi=({currentPage:e,totalPages:o,onPageChange:t,pageSize:n=10,pageSizeOptions:a,onPageSizeChange:l,showPageSizeSelector:c=!1,showPageInfo:s=!0,maxPageButtons:d=5,showFirstLastButtons:g=!1,size:m="md",variant:f="default",shape:p="rounded",views:u,...y})=>{const{visiblePageNumbers:k}=Pp(e,o,d);return r.jsx(Ap,{currentPage:e,totalPages:o,onPageChange:t,pageSize:n,pageSizeOptions:a,onPageSizeChange:l,showPageSizeSelector:c,showPageInfo:s,maxPageButtons:d,showFirstLastButtons:g,size:m,variant:f,shape:p,visiblePageNumbers:k,views:u,...y})},Ep=e=>typeof e=="string"&&(/^(#|rgb\(|rgba\(|hsl\(|hsla\(|var\()/.test(e)||["black","currentColor","inherit","transparent","white"].includes(e)),Dp=h.memo(({shape:e="linear",value:o=0,max:t=100,color:n="theme-primary",backgroundColor:a="color-gray-200",height:l,size:c,radius:s=4,strokeWidth:d=10,showLabel:g=!1,labelColor:m="color-black-primary",animated:f=!0,animationDuration:p="0.5s",views:u,themeMode:y,...k})=>{var D;const{getColor:x,themeMode:C}=i.useTheme(),S=y||C,v=Math.min(t,Math.max(0,o))/t*100,b=z=>Ep(z)?z:x(z,{themeMode:S}),I=h.useMemo(()=>b(a),[x,a,S]),T=h.useMemo(()=>b(n),[x,n,S]);if(e==="circle"){const z=c||(typeof l=="number"?l:100),A=(z-d)/2,W=2*Math.PI*A,H=W-v/100*W;return r.jsxs(i.View,{width:z,height:z,position:"relative",display:"flex",alignItems:"center",justifyContent:"center",...u==null?void 0:u.container,...k,children:[r.jsxs("svg",{width:z,height:z,viewBox:`0 0 ${z} ${z}`,style:{transform:"rotate(-90deg)"},children:[r.jsx("circle",{cx:z/2,cy:z/2,r:A,stroke:I,strokeWidth:d,fill:"transparent",...u==null?void 0:u.track}),r.jsx("circle",{cx:z/2,cy:z/2,r:A,stroke:T,strokeWidth:d,strokeDasharray:W,strokeDashoffset:H,strokeLinecap:"round",fill:"transparent",style:{transition:f?`stroke-dashoffset ${p} ease-in-out`:"none"},...u==null?void 0:u.indicator})]}),g&&r.jsx(i.View,{position:"absolute",top:0,left:0,right:0,bottom:0,display:"flex",alignItems:"center",justifyContent:"center",pointerEvents:"none",children:r.jsxs(i.Text,{color:m,fontSize:`${z*.2}px`,fontWeight:"bold",...u==null?void 0:u.text,children:[Math.round(v),"%"]})})]})}const P=l||8,E={backgroundColor:I,...((D=u==null?void 0:u.container)==null?void 0:D.style)||{},...k.style||{}};return r.jsxs(i.View,{role:"progressbar","aria-valuenow":o,"aria-valuemin":0,"aria-valuemax":t,width:"100%",height:P,borderRadius:s,overflow:"hidden",position:"relative",display:"flex",alignItems:"center",justifyContent:"center",...u==null?void 0:u.container,...k,style:E,children:[r.jsx("div",{style:{height:"100%",backgroundColor:T,borderRadius:typeof s=="number"?`${s}px`:s,position:"absolute",left:0,top:0,bottom:0,width:`${v}%`,transition:f?`width ${p} ease-in-out`:"none",...u==null?void 0:u.bar}}),g&&r.jsxs(i.Text,{color:m,fontSize:typeof P=="number"&&P>16?`${P*.6}px`:"10px",fontWeight:"bold",position:"relative",zIndex:1,...u==null?void 0:u.text,children:[Math.round(v),"%"]})]})}),Mi=e=>{const o=pe("progress",e);return r.jsx(Dp,{...o})},$p=(e=>({solid:"solid",dashed:"dashed",dotted:"dotted"}))(),Lp={thin:"1px",medium:"2px",thick:"4px"},dr={container:{transition:"opacity 0.15s ease"},label:{fontSize:"14px",fontWeight:"500",color:"color-gray-600",paddingHorizontal:"8px",backgroundColor:"color-white",transition:"color 0.15s ease"}},_p=e=>typeof e=="string"&&(/^(#|rgb\(|rgba\(|hsl\(|hsla\(|var\()/.test(e)||["black","currentColor","inherit","transparent","white"].includes(e)),Bp=({orientation:e="horizontal",variant:o="solid",thickness:t="thin",color:n,spacing:a="0px",label:l,decorative:c=!1,views:s,themeMode:d,...g})=>{const{themeMode:m}=i.useTheme(),f=n||"color-gray-200",p=$p[o],u=Lp[t],y=c?{"aria-hidden":!0}:{role:"separator","aria-orientation":e},k=_p(f)?{style:{borderColor:f}}:{borderColor:f};return l&&e==="horizontal"?r.jsxs(i.Horizontal,{alignItems:"center",justifyContent:"center",width:"100%",padding:a,...y,...g,children:[r.jsx(i.View,{height:"0px",flexGrow:1,borderTop:`${u} ${p}`,...k,...dr.container,...s==null?void 0:s.container}),r.jsx(i.Text,{...dr.label,...s==null?void 0:s.label,children:l}),r.jsx(i.View,{height:"0px",flexGrow:1,borderTop:`${u} ${p}`,...k,...dr.container,...s==null?void 0:s.container})]}):e==="horizontal"?r.jsx(i.View,{height:"0px",width:"100%",borderTop:`${u} ${p}`,padding:a,...k,...dr.container,...y,...s==null?void 0:s.container,...g}):r.jsx(i.View,{width:"0px",height:"100%",borderLeft:`${u} ${p}`,padding:a,...k,...dr.container,...y,...s==null?void 0:s.container,...g})},Wi=e=>{const o=pe("separator",e);return r.jsx(Bp,{...o})},Xr=Wi,Op=Wi,Np={xs:12,sm:14,md:16,lg:18,xl:20},qp=({isSupported:e,isSharing:o,onShare:t,label:n,children:a,icon:l,size:c,isDisabled:s,isLoading:d,iconPosition:g,disableWhenUnsupported:m=!0,...f})=>{const p=c??"md",u=l??r.jsx(Gn,{widthHeight:Np[p],strokeWidth:1.5,filled:!1}),y=!!s||!e&&m,k=!!d||o;return r.jsx(de,{...f,size:p,icon:u,iconPosition:g??"left",isDisabled:y,isLoading:k,onClick:t,children:a??n??"Share"})},Hi=()=>typeof navigator>"u"?void 0:navigator,Up=(e,o)=>{if(!e||typeof e.share!="function")return!1;if(typeof e.canShare=="function")try{return e.canShare(o)}catch{return!1}return!0},Gp=e=>{if(typeof e=="object"&&e!==null&&"name"in e)return String(e.name)},Yp=e=>{const{shareData:o,onClick:t,onUnsupported:n,onShareStart:a,onShareSuccess:l,onShareCancel:c,onShareError:s}=e,[d,g]=h.useState(!1),m=h.useMemo(()=>Up(Hi(),o),[o]),f=h.useCallback((...p)=>{t==null||t(...p);const u=Hi();if(!u||typeof u.share!="function"){n==null||n();return}if(!d){if(typeof u.canShare=="function")try{if(!u.canShare(o)){n==null||n();return}}catch(y){s==null||s(y);return}g(!0),a==null||a();try{u.share(o).then(()=>{l==null||l()}).catch(y=>{if(Gp(y)==="AbortError"){c==null||c();return}s==null||s(y)}).finally(()=>{g(!1)})}catch(y){g(!1),s==null||s(y)}}},[d,t,c,s,a,l,n,o]);return{isSupported:m,isSharing:d,handleShare:f}},ji=e=>{const{isSupported:o,isSharing:t,handleShare:n}=Yp(e),{shareData:a,onShareStart:l,onShareSuccess:c,onShareCancel:s,onShareError:d,onUnsupported:g,onClick:m,...f}=e;return r.jsx(qp,{...f,isSupported:o,isSharing:t,onShare:n})},Kp=({label:e,status:o="default",views:t,themeMode:n,...a})=>{const{themeMode:l}=i.useTheme(),c=la();return r.jsxs(i.Horizontal,{alignItems:"center",gap:8,role:"status",...t==null?void 0:t.container,...a,children:[r.jsx(i.View,{"data-role":"status-dot","aria-hidden":"true",width:"8px",height:"8px",borderRadius:"50%",...c[o].indicator,...t==null?void 0:t.indicator}),e&&r.jsx(i.Text,{"data-role":"status-label",fontSize:"14px",lineHeight:"20px",...c[o].label,...t==null?void 0:t.label,children:e})]})},Jr=e=>{const o=pe("status",e);return r.jsx(Kp,{...o})},Xp=(e=!0,o,t,n)=>{const{on:a}=i.useResponsive(),l=a("mobile"),[c,s]=h.useState(o!==void 0?o:e);return h.useEffect(()=>{o!==void 0&&s(o)},[o]),{isExpanded:c,toggleExpanded:()=>{const f=!c;s(f),t&&t(f)},expand:()=>{c||(s(!0),t&&t(!0))},collapse:()=>{c&&(s(!1),t&&t(!1))},isMobile:l}},Jp={sm:{expandedWidth:"240px",collapsedWidth:"64px"},md:{expandedWidth:"280px",collapsedWidth:"72px"},lg:{expandedWidth:"320px",collapsedWidth:"80px"},xl:{expandedWidth:"360px",collapsedWidth:"88px"}},Qp=(e=>({default:{backgroundColor:"color-white",color:"color-gray-800",transition:"background-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease"},filled:{backgroundColor:"color-gray-100",color:"color-gray-800",transition:"background-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease"},outline:{backgroundColor:"color-white",borderWidth:"1px",borderStyle:"solid",borderColor:"color-gray-200",color:"color-gray-800",transition:"background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease"},subtle:{backgroundColor:"color-gray-50",color:"color-gray-800",transition:"background-color 0.2s ease, color 0.2s ease"},elevated:{backgroundColor:"color-white",boxShadow:"0 4px 12px rgba(0, 0, 0, 0.1)",color:"color-gray-800",transition:"all 0.2s ease-in-out"}}))(),Zp={left:{left:0,borderRightWidth:"1px",borderRightStyle:"solid",borderRightColor:"color-gray-200"},right:{right:0,borderLeftWidth:"1px",borderLeftStyle:"solid",borderLeftColor:"color-gray-200"}},Rp={none:{},low:{boxShadow:"0 1px 3px rgba(0, 0, 0, 0.1)"},medium:{boxShadow:"0 4px 12px rgba(0, 0, 0, 0.12)"},high:{boxShadow:"0 10px 30px rgba(0, 0, 0, 0.15)"}},eu={fast:"all 0.2s ease-in-out",normal:"all 0.3s ease-in-out",slow:"all 0.5s ease-in-out",bounce:"all 0.3s cubic-bezier(0.68, -0.55, 0.27, 1.55)"},Pi=h.createContext({isExpanded:!0,toggleExpanded:()=>{},expand:()=>{},collapse:()=>{},position:"left",size:"md",variant:"default"}),Qr=()=>h.useContext(Pi),ou=({value:e,children:o})=>r.jsx(Pi.Provider,{value:e,children:o}),ru=({children:e,showToggleButton:o=!0,views:t,...n})=>{const{isExpanded:a,toggleExpanded:l,position:c}=Qr();return r.jsx(i.Horizontal,{width:"100%",padding:"16px",borderBottomWidth:"1px",borderBottomStyle:"solid",borderBottomColor:"color-gray-200",alignItems:"center",justifyContent:"space-between",...t==null?void 0:t.header,...n,children:a?r.jsxs(i.Horizontal,{width:"100%",alignItems:"center",justifyContent:"space-between",children:[e,o&&r.jsx(i.View,{as:"button",display:"flex",alignItems:"center",justifyContent:"center",width:"32px",height:"32px",borderWidth:"1px",borderStyle:"solid",borderColor:"color-gray-200",borderRadius:"4px",backgroundColor:"transparent",cursor:"pointer",_hover:{backgroundColor:"color-gray-100"},onClick:l,"aria-label":a?"Collapse sidebar":"Expand sidebar",...t==null?void 0:t.toggleButton,children:r.jsx(he,{orientation:c==="left"?"left":"right",widthHeight:16,...t==null?void 0:t.toggleButtonIcon})})]}):r.jsx(i.View,{width:"100%",display:"flex",alignItems:"center",justifyContent:"center",children:o&&r.jsx(i.View,{as:"button",display:"flex",alignItems:"center",justifyContent:"center",width:"32px",height:"32px",borderWidth:"1px",borderStyle:"solid",borderColor:"color-gray-200",borderRadius:"4px",backgroundColor:"transparent",cursor:"pointer",_hover:{backgroundColor:"color-gray-100"},onClick:l,"aria-label":a?"Collapse sidebar":"Expand sidebar",...t==null?void 0:t.toggleButton,children:r.jsx(he,{orientation:c==="left"?"right":"left",widthHeight:16,...t==null?void 0:t.toggleButtonIcon})})})})},tu=({children:e,views:o,...t})=>{const{isExpanded:n}=Qr();return r.jsx(i.View,{flex:"1",width:"100%",overflowY:"auto",overflowX:"hidden",padding:n?"16px":"8px",...o==null?void 0:o.content,...t,children:e})},nu=({children:e,views:o,...t})=>{const{isExpanded:n}=Qr();return r.jsx(i.View,{width:"100%",padding:n?"16px":"8px",borderTopWidth:"1px",borderTopStyle:"solid",borderTopColor:"color-gray-200",...o==null?void 0:o.footer,...t,children:e})},au=({children:e,position:o="left",size:t="md",variant:n="default",fixed:a=!1,hasBackdrop:l=!0,expandedWidth:c,collapsedWidth:s,breakpoint:d,breakpointBehavior:g="overlay",elevation:m="none",transitionPreset:f="normal",ariaLabel:p="Sidebar navigation",showToggleButton:u,toggleExpanded:y,expand:k,isExpanded:x,isMobile:C,collapse:S,views:w,themeMode:v,...b})=>{const I=Jp[t],T=x?c||I.expandedWidth:s||I.collapsedWidth,P=!C||C&&g!=="hide",E=a||C&&g==="overlay"?"fixed":"relative",D=l&&C&&x&&g==="overlay";return r.jsxs(r.Fragment,{children:[D&&r.jsx(i.View,{position:"fixed",top:0,left:0,width:"100vw",height:"100vh",backgroundColor:"color-dark-50-360",zIndex:998,onClick:S,...w==null?void 0:w.backdrop}),P&&r.jsx(i.Vertical,{position:E,top:0,height:"100vh",width:T,zIndex:999,transition:eu[f],transform:C&&g==="overlay"&&!x?`translateX(${o==="left"?"-100%":"100%"})`:"translateX(0)",role:"navigation","aria-label":p,...Qp[n],...Zp[o],...Rp[m],...w==null?void 0:w.container,...b,children:h.Children.map(e,z=>z)})]})},gr=({children:e,position:o="left",size:t="md",variant:n="default",defaultExpanded:a=!0,expanded:l,onExpandedChange:c,fixed:s=!1,hasBackdrop:d=!0,showToggleButton:g=!0,expandedWidth:m,collapsedWidth:f,breakpoint:p=768,breakpointBehavior:u="overlay",views:y,...k})=>{const{isExpanded:x,toggleExpanded:C,expand:S,collapse:w,isMobile:v}=Xp(a,l,c);return r.jsx(ou,{value:{isExpanded:x,toggleExpanded:C,expand:S,collapse:w,position:o,size:t,variant:n,views:y},children:r.jsx(au,{position:o,size:t,variant:n,fixed:s,hasBackdrop:d,showToggleButton:g,expandedWidth:m,collapsedWidth:f,breakpoint:p,breakpointBehavior:u,isExpanded:x,isMobile:v,toggleExpanded:C,expand:S,collapse:w,views:y,...k,children:e})})};gr.Header=ru,gr.Content=tu,gr.Footer=nu,gr.useContext=Qr;const lu=()=>({getItem:e=>{try{return typeof localStorage>"u"?null:localStorage.getItem(`resizable-${e}`)}catch(o){return console.warn("Failed to access localStorage:",o),null}},setItem:(e,o)=>{try{if(typeof localStorage>"u")return;localStorage.setItem(`resizable-${e}`,o)}catch(t){console.warn("Failed to write to localStorage:",t)}}}),iu=(e,o,t,n=50,a=1/0,l=!1,c,s,d=10)=>{const[g,m]=h.useState(!1),[f,p]=h.useState([]),u=h.useRef(null),y=h.useRef(null),k=h.useRef(0),x=h.useRef([]),C=h.useRef(s||(typeof window<"u"?lu():null)),S=h.useCallback(()=>u.current?e==="horizontal"?u.current.offsetWidth:u.current.offsetHeight:0,[e]),w=h.useCallback(()=>{if(!c||!C.current)return null;const V=C.current.getItem(c);if(!V)return null;try{const j=JSON.parse(V);return Array.isArray(j.sizes)?j.sizes:null}catch(j){return console.warn("Failed to parse saved panel sizes:",j),null}},[c]),v=h.useCallback(()=>{if(!c||!C.current||f.length===0)return;const V=f.map(j=>({id:j.id,size:j.size,collapsed:j.collapsed||!1}));C.current.setItem(c,JSON.stringify({sizes:V}))},[c,f]),b=h.useCallback((V,j,M,L,_)=>{p(O=>O.some(N=>N.id===V)?O:[...O,{id:V,size:j,minSize:M??n,maxSize:L??a,collapsible:_??l,collapsed:!1}])},[n,a,l]),I=h.useCallback(V=>{p(j=>j.filter(M=>M.id!==V))},[]),T=h.useCallback(V=>{const j=f.find(M=>M.id===V);return j?j.size:0},[f]),P=h.useCallback((V,j)=>{p(M=>M.map(L=>L.id===V?{...L,size:j}:L))},[]),E=h.useCallback(V=>{const j=f.find(M=>M.id===V);return j?!!j.collapsed:!1},[f]),D=h.useCallback(V=>{p(j=>{const M=j.findIndex(N=>N.id===V);if(M===-1)return j;const L=j[M];if(!L.collapsible)return j;const _={...L,collapsed:!L.collapsed},O=[...j];return O[M]=_,O})},[]),z=h.useCallback((V,j)=>{y.current=V,k.current=j,x.current=f.map(M=>M.size),m(!0)},[f]),A=h.useCallback(V=>{if(!g||!y.current)return;const j=y.current,M=V-k.current;let L=-1;const _=j.match(/\d+$/);if(_&&(L=parseInt(_[0],10)-1),L===-1&&f.length>=2&&(L=0),L<0||L>=f.length-1)return;const O=f[L],N=f[L+1];if(O.collapsed||N.collapsed)return;let U=x.current[L]+M,X=x.current[L+1]-M;U=Math.max(O.minSize??n,Math.min(O.maxSize??a,U)),X=Math.max(N.minSize??n,Math.min(N.maxSize??a,X)),p(oe=>oe.map((B,$)=>$===L?{...B,size:U}:$===L+1?{...B,size:X}:B))},[g,f,e,n,a]),W=h.useCallback(()=>{g&&t&&t(f.map(V=>V.size)),y.current=null,m(!1),c&&v()},[g,f,t,c,v]),H=h.useCallback(V=>{if(!g||!y.current)return;const j=y.current;let M=-1;const L=j.match(/\d+$/);if(L&&(M=parseInt(L[0],10)-1),M===-1&&f.length>=2&&(M=0),M<0||M>=f.length-1)return;let _=0;e==="horizontal"?(V.key==="ArrowLeft"&&(_=-d),V.key==="ArrowRight"&&(_=d),V.key==="Home"&&(_=-100),V.key==="End"&&(_=100)):(V.key==="ArrowUp"&&(_=-d),V.key==="ArrowDown"&&(_=d),V.key==="Home"&&(_=-100),V.key==="End"&&(_=100)),_!==0&&(V.preventDefault(),A(k.current+_)),V.key==="Escape"&&(p(O=>O.map((N,U)=>({...N,size:x.current[U]}))),W())},[g,f,e,A,W,d]);return h.useEffect(()=>{if(typeof document>"u")return;const V=L=>{if(!g)return;const _=e==="horizontal"?L.clientX:L.clientY;A(_)},j=L=>{if(!g||L.touches.length===0)return;const _=L.touches[0],O=e==="horizontal"?_.clientX:_.clientY;A(O)},M=()=>{g&&W()};return g&&(document.addEventListener("mousemove",V),document.addEventListener("touchmove",j),document.addEventListener("mouseup",M),document.addEventListener("touchend",M),document.addEventListener("keydown",H),document.body.style.cursor=e==="horizontal"?"col-resize":"row-resize",document.body.style.userSelect="none"),()=>{document.removeEventListener("mousemove",V),document.removeEventListener("touchmove",j),document.removeEventListener("mouseup",M),document.removeEventListener("touchend",M),document.removeEventListener("keydown",H),document.body.style.cursor="",document.body.style.userSelect=""}},[g,e,A,W,H]),h.useEffect(()=>{if(f.length!==0){if(c){const V=w();if(V){p(j=>j.map(M=>{const L=V.find(_=>_.id===M.id);return L?{...M,size:L.size,collapsed:L.collapsed||!1}:M}));return}}if(!o){const j=S()/f.length;p(M=>M.map(L=>({...L,size:j})))}}},[f.length,o,S,c,w]),h.useEffect(()=>{if(!o||o.length===0||f.length===0)return;const V=S(),j=o.map(M=>typeof M=="string"&&M.endsWith("%")?parseFloat(M)/100*V:typeof M=="number"?M:parseFloat(M));p(M=>M.map((L,_)=>({...L,size:_<j.length?j[_]:L.size})))},[o,f.length,S]),h.useEffect(()=>{f.length>0&&c&&!g&&v()},[f,c,g,v]),{isResizing:g,setIsResizing:m,containerRef:u,panels:f,registerPanel:b,unregisterPanel:I,getPanelSize:T,setPanelSize:P,isPanelCollapsed:E,togglePanelCollapse:D,startResize:z,onResize:A,endResize:W}},cu={horizontal:{flexDirection:"row"},vertical:{flexDirection:"column"}},su=(e,o)=>({sm:{width:o==="horizontal"?"4px":"100%",height:o==="vertical"?"4px":"100%"},md:{width:o==="horizontal"?"6px":"100%",height:o==="vertical"?"6px":"100%"},lg:{width:o==="horizontal"?"8px":"100%",height:o==="vertical"?"8px":"100%"}})[e],du=(e=>({default:{backgroundColor:"transparent",_hover:{backgroundColor:"color-gray-200"},_active:{backgroundColor:"color-gray-300"}},subtle:{backgroundColor:"transparent",_hover:{backgroundColor:"color-gray-100"},_active:{backgroundColor:"color-gray-200"}},prominent:{backgroundColor:"color-gray-100",_hover:{backgroundColor:"color-gray-200"},_active:{backgroundColor:"color-gray-300"}}}))(),Zr={horizontal:{width:"2px",height:"20px",backgroundColor:"color-gray-400",margin:"0 1px"},vertical:{width:"20px",height:"2px",backgroundColor:"color-gray-400",margin:"1px 0"}},Vi=h.createContext({orientation:"horizontal",size:"md",variant:"default",isResizing:!1,setIsResizing:()=>{},registerPanel:()=>{},unregisterPanel:()=>{},getPanelSize:()=>0,setPanelSize:()=>{},isPanelCollapsed:()=>!1,togglePanelCollapse:()=>{},startResize:()=>{},onResize:()=>{},endResize:()=>{}}),Ai=()=>h.useContext(Vi),gu=({value:e,children:o})=>r.jsx(Vi.Provider,{value:e,children:o}),hu=({children:e,id:o,defaultSize:t,minSize:n,maxSize:a,collapsible:l,defaultCollapsed:c,onCollapseChange:s,views:d,...g})=>{const{orientation:m,registerPanel:f,unregisterPanel:p,getPanelSize:u,isPanelCollapsed:y,togglePanelCollapse:k}=Ai(),x=typeof t=="string"&&t.endsWith("%")?0:typeof t=="number"?t:0;h.useEffect(()=>(f(o,x,n,a,l),()=>p(o)),[o,x,n,a,l,f,p]);const C=u(o),S=y(o);return h.useEffect(()=>{s&&S!==void 0&&s(S)},[S,s]),h.useEffect(()=>{l&&c&&!S&&k(o)},[o,l,c,S,k]),S?r.jsx(i.View,{flex:"0 0 auto",width:m==="horizontal"?"10px":"100%",height:m==="vertical"?"10px":"100%",backgroundColor:"color-gray-200",cursor:"pointer",onClick:()=>k(o),"aria-label":`Expand panel ${o}`,role:"button",tabIndex:0,...d==null?void 0:d.collapsedPanel,...g}):r.jsx(i.View,{flex:C>0?"0 0 auto":"1",width:m==="horizontal"?`${C}px`:"100%",height:m==="vertical"?`${C}px`:"100%",overflow:"auto",...d==null?void 0:d.panel,...g,children:e})},fu=({id:e,position:o="both",disabled:t=!1,withVisualIndicator:n=!0,withCollapseButton:a=!1,collapseTarget:l,views:c,...s})=>{const{orientation:d,size:g,variant:m,startResize:f,isPanelCollapsed:p,togglePanelCollapse:u}=Ai(),k=(()=>{if(l)return l;const b=e.match(/\d+$/);if(!b)return"";const I=parseInt(b[0],10);return isNaN(I)?"":`panel${I}`})(),x=p(k),C=b=>{if(t)return;b.preventDefault();const I=d==="horizontal"?b.clientX:b.clientY;f(e,I)},S=b=>{if(t||b.touches.length===0)return;b.preventDefault();const I=b.touches[0],T=d==="horizontal"?I.clientX:I.clientY;f(e,T)},w=b=>{t||(b.key==="Enter"||b.key===" ")&&(b.preventDefault(),f(e,0))},v=b=>{b.stopPropagation(),k&&u(k)};return r.jsxs(i.View,{role:"separator","aria-orientation":d,"aria-valuemin":0,"aria-valuemax":100,tabIndex:t?-1:0,cursor:d==="horizontal"?"col-resize":"row-resize",display:"flex",alignItems:"center",justifyContent:"center",position:"relative",...su(g,d),...du[m],onMouseDown:C,onTouchStart:S,onKeyDown:w,opacity:t?.5:1,pointerEvents:t?"none":"auto",...c==null?void 0:c.handle,...s,children:[n&&r.jsx(i.View,{display:"flex",alignItems:"center",justifyContent:"center",width:d==="horizontal"?"100%":"auto",height:d==="vertical"?"100%":"auto",pointerEvents:"none",...c==null?void 0:c.handleIcon,children:d==="horizontal"?r.jsxs(i.Horizontal,{gap:1,children:[r.jsx(i.View,{...Zr.horizontal}),r.jsx(i.View,{...Zr.horizontal})]}):r.jsxs(i.Vertical,{gap:1,children:[r.jsx(i.View,{...Zr.vertical}),r.jsx(i.View,{...Zr.vertical})]})}),a&&k&&r.jsx(i.View,{position:"absolute",top:d==="horizontal"?"-20px":"50%",left:d==="horizontal"?"50%":"-20px",transform:d==="horizontal"?"translateX(-50%)":"translateY(-50%)",width:"16px",height:"16px",borderRadius:"full",backgroundColor:"color-gray-100",border:"1px solid",borderColor:"color-gray-300",display:"flex",alignItems:"center",justifyContent:"center",cursor:"pointer",zIndex:1,onClick:v,"aria-label":x?`Expand panel ${k}`:`Collapse panel ${k}`,role:"button",tabIndex:0,pointerEvents:"auto",_hover:{backgroundColor:"color-gray-200"},...c==null?void 0:c.collapseIcon,children:r.jsx(i.View,{width:"8px",height:"8px",display:"flex",alignItems:"center",justifyContent:"center",children:x?r.jsxs(i.Horizontal,{children:[r.jsx(i.View,{width:"6px",height:"2px",backgroundColor:"color-gray-600"}),r.jsx(i.View,{width:"2px",height:"6px",backgroundColor:"color-gray-600",position:"absolute"})]}):r.jsx(i.View,{width:"6px",height:"2px",backgroundColor:"color-gray-600"})})})]})},mu=({children:e,orientation:o="horizontal",size:t="md",variant:n="default",defaultSizes:a,minSize:l,maxSize:c,collapsible:s=!1,containerRef:d,autoSaveId:g,keyboardResizeBy:m,onLayout:f,views:p,...u})=>{const y=o==="horizontal"?i.Horizontal:i.Vertical;return r.jsx(y,{ref:d,width:"100%",height:"100%",position:"relative",overflow:"hidden",...cu[o],...p==null?void 0:p.container,...u,children:e})},fn=({children:e,orientation:o="horizontal",size:t="md",variant:n="default",defaultSizes:a,onSizesChange:l,minSize:c=50,maxSize:s,collapsible:d=!1,autoSaveId:g,storage:m,keyboardResizeBy:f=10,views:p,...u})=>{const{isResizing:y,setIsResizing:k,containerRef:x,registerPanel:C,unregisterPanel:S,getPanelSize:w,setPanelSize:v,isPanelCollapsed:b,togglePanelCollapse:I,startResize:T,onResize:P,endResize:E}=iu(o,a,l,c,s,d,g,m,f);return r.jsx(gu,{value:{orientation:o,size:t,variant:n,isResizing:y,setIsResizing:k,registerPanel:C,unregisterPanel:S,getPanelSize:w,setPanelSize:v,isPanelCollapsed:b,togglePanelCollapse:I,startResize:T,onResize:P,endResize:E},children:r.jsx(mu,{orientation:o,size:t,variant:n,defaultSizes:a,minSize:c,maxSize:s,collapsible:d,autoSaveId:g,keyboardResizeBy:f,containerRef:x,views:p,...u,children:e})})};fn.Panel=hu,fn.Handle=fu;const Rr={info:{container:{backgroundColor:"color-blue-50",border:"color-blue-300"},content:{color:"color-blue-700"},icon:{color:"color-blue-500"}},success:{container:{backgroundColor:"color-green-50",border:"color-green-300"},content:{color:"color-green-700"},icon:{color:"color-green-500"}},warning:{container:{backgroundColor:"color-orange-50",border:"color-orange-300"},content:{color:"color-orange-700"},icon:{color:"color-orange-500"}},error:{container:{backgroundColor:"color-red-50",border:"color-red-300"},content:{color:"color-red-700"},icon:{color:"color-red-500"}}},pu={top:{top:"16px",left:"50%",transform:"translateX(-50%)"},"top-right":{top:"16px",right:"16px"},"top-left":{top:"16px",left:"16px"},bottom:{bottom:"16px",left:"50%",transform:"translateX(-50%)"},"bottom-right":{bottom:"16px",right:"16px"},"bottom-left":{bottom:"16px",left:"16px"}},uu=()=>Math.random().toString(36).substring(2,9);let _o=new Map;const hr=vo.create(e=>({toasts:[],add:(o,t,n,a={})=>{const l=a.id||uu(),c={id:l,variant:o,title:t,description:n,createdAt:Date.now(),isVisible:!0,...a};if(e(s=>({toasts:[...s.toasts,c]})),a.duration!==0){const s=a.duration||5e3,d=setTimeout(()=>{hr.getState().remove(l)},s);_o.set(l,d)}return l},remove:o=>{e(t=>({toasts:t.toasts.map(n=>n.id===o?{...n,isVisible:!1}:n)})),_o.has(o)&&(clearTimeout(_o.get(o)),_o.delete(o)),setTimeout(()=>{e(t=>({toasts:t.toasts.filter(n=>n.id!==o)}))},300)},removeAll:()=>{_o.forEach(clearTimeout),_o.clear(),e(o=>({toasts:o.toasts.map(t=>({...t,isVisible:!1}))})),setTimeout(()=>{e({toasts:[]})},300)}})),ko=(e,o,t,n)=>hr.getState().add(e,o,t,n),Ei=(e,o,t)=>ko("info",e,o,t),Di=(e,o,t)=>ko("success",e,o,t),$i=(e,o,t)=>ko("warning",e,o,t),Li=(e,o,t)=>ko("error",e,o,t),_i=e=>{hr.getState().remove(e)},Bi=()=>{hr.getState().removeAll()},Oi=({variant:e,title:o,description:t,onClose:n,isClosable:a=!0,action:l,actionText:c,showIcon:s=!0,theme:d,views:g,render:m,icon:f,id:p,isVisible:u=!0,themeMode:y})=>{const k=d??Rr,x=()=>{var v,b;if(f!==void 0)return f;const w=e?(b=(v=Rr[e])==null?void 0:v.icon)==null?void 0:b.color:Rr.info.icon.color;switch(e){case"info":return r.jsx(Re,{widthHeight:20,color:w});case"success":return r.jsx(qn,{widthHeight:20,color:w});case"warning":return r.jsx(Re,{widthHeight:20,color:w,orientation:"down"});case"error":return r.jsx(kr,{widthHeight:20,color:w});default:return r.jsx(Re,{widthHeight:20,color:Rr.info.icon.color})}};if(m)return r.jsx(r.Fragment,{children:m({id:p||"",onClose:n})});const C=e==="error"?"alert":"status",S=e==="error"||e==="warning"?"assertive":"polite";return r.jsxs(i.Horizontal,{role:C,"aria-live":S,"aria-atomic":"true","data-state":u?"open":"closed",gap:12,width:"100%",maxWidth:"380px",borderWidth:"1px",borderStyle:"solid",borderRadius:"12px",padding:"12px 14px",alignItems:"flex-start",position:"relative",backgroundColor:k[e].container.backgroundColor,borderColor:k[e].container.border,boxShadow:"0 12px 32px rgba(15, 23, 42, 0.12)",opacity:u?1:0,transform:u?"translateY(0)":"translateY(4px)",transition:"opacity 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease",...g==null?void 0:g.container,children:[s&&r.jsx(i.View,{marginTop:"2px",...g==null?void 0:g.icon,children:x()}),r.jsxs(i.Vertical,{gap:4,flex:"1",children:[r.jsx(i.Text,{fontSize:"14px",lineHeight:"20px",fontWeight:"600",color:k[e].content.color,backgroundColor:k[e].container.backgroundColor,...g==null?void 0:g.title,children:o}),t&&r.jsx(i.Text,{fontSize:"12px",lineHeight:"18px",color:k[e].content.color,fontWeight:"400",backgroundColor:k[e].container.backgroundColor,...g==null?void 0:g.description,children:t}),l&&c&&r.jsx(i.Text,{fontSize:"14px",fontWeight:"600",marginTop:"6px",cursor:"pointer",color:k[e].content.color,backgroundColor:k[e].container.backgroundColor,onClick:w=>{w.stopPropagation(),l()},_hover:{textDecoration:"underline"},transition:"opacity 0.2s ease, color 0.2s ease",...g==null?void 0:g.actionButton,children:c})]}),a&&r.jsx(i.View,{as:"button","aria-label":"Close toast",backgroundColor:"transparent",border:"none",cursor:"pointer",padding:"4px",marginLeft:"8px",marginTop:"-2px",marginRight:"-4px",borderRadius:"9999px",onClick:w=>{w.stopPropagation(),n()},_hover:{backgroundColor:"color-black-900-60"},transition:"background-color 0.2s ease, opacity 0.2s ease",...g==null?void 0:g.closeButton,children:r.jsx(He,{widthHeight:16,color:k[e].content.color})})]})},yu=({position:e="top-right",gap:o=8,limit:t=5,containerStyle:n})=>{const{toasts:a,remove:l}=hr(),s=h.useMemo(()=>{const d={top:[],"top-right":[],"top-left":[],bottom:[],"bottom-right":[],"bottom-left":[]};return a.forEach(g=>{const m=g.position||e;d[m].push(g)}),Object.keys(d).forEach(g=>{d[g]=d[g].slice(-t)}),d},[a,e,t])[e];return r.jsx(i.View,{position:"fixed",zIndex:9999,display:"flex",flexDirection:e.includes("bottom")?"column-reverse":"column",gap:`${o}px`,width:"fit-content",maxWidth:"100%",pointerEvents:"none",...pu[e],style:n,children:s.map(d=>r.jsx(i.View,{pointerEvents:"auto",animation:e.includes("right")?"slideInRight 0.3s ease-out, fadeIn 0.3s ease-out":e.includes("left")?"slideInLeft 0.3s ease-out, fadeIn 0.3s ease-out":e.includes("top")?"slideInDown 0.3s ease-out, fadeIn 0.3s ease-out":"slideInUp 0.3s ease-out, fadeIn 0.3s ease-out",children:r.jsx(Oi,{id:d.id,variant:d.variant,title:d.title,description:d.description,onClose:()=>l(d.id),isClosable:d.isClosable,action:d.action,actionText:d.actionText,showIcon:d.showIcon,views:d.views,render:d.render,icon:d.icon,isVisible:d.isVisible})},d.id))})},bu=()=>({toast:(e,o,t,n)=>ko(e,o,t,n),info:(e,o,t)=>Ei(e,o,t),success:(e,o,t)=>Di(e,o,t),warning:(e,o,t)=>$i(e,o,t),error:(e,o,t)=>Li(e,o,t),remove:e=>_i(e),removeAll:()=>Bi()}),xu=Object.assign(e=>r.jsx(Oi,{...e}),{Container:e=>r.jsx(yu,{...e}),show:ko,info:Ei,success:Di,warning:$i,error:Li,remove:_i,removeAll:Bi}),ku=bu,Ni=(e,o)=>{var c,s;if(!e)return!0;const t=e.toLowerCase(),n=o.name.toLowerCase().includes(t),a=((c=o.description)==null?void 0:c.toLowerCase().includes(t))||!1,l=((s=o.keywords)==null?void 0:s.some(d=>d.toLowerCase().includes(t)))||!1;return n||a||l},Cu=({open:e,onOpenChange:o,groups:t=[],commands:n=[],filter:a})=>{const[l,c]=h.useState(""),[s,d]=h.useState(0),g=h.useRef(null),m=h.useMemo(()=>a||Ni,[a]),f=h.useMemo(()=>[...t.flatMap(x=>x.commands),...n],[t,n]),p=h.useMemo(()=>l.trim()?f.filter(k=>m(l,k)):f,[f,l,m]),u=h.useMemo(()=>{if(!l)return t;const k=a||Ni;return t.map(x=>({...x,commands:x.commands.filter(C=>k(l,C))})).filter(x=>x.commands.length)},[t,l,a]);h.useEffect(()=>{d(0)},[p.length]);const y=h.useCallback(k=>{if(e)switch(k.key){case"ArrowDown":k.preventDefault(),d(x=>x<p.length-1?x+1:x);break;case"ArrowUp":k.preventDefault(),d(x=>x>0?x-1:x);break;case"Enter":k.preventDefault(),p[s]&&(p[s].onSelect(),o(!1),c(""));break;case"Escape":k.preventDefault(),o(!1),c("");break}},[e,p,s,o]);return h.useEffect(()=>{if(!(typeof document>"u"))return document.addEventListener("keydown",y),()=>{document.removeEventListener("keydown",y)}},[y]),h.useEffect(()=>{const k=g.current;if(k&&typeof k.querySelector=="function"&&e){const x=k.querySelector(`[data-index="${s}"]`);x&&typeof x.scrollIntoView=="function"&&x.scrollIntoView({block:"nearest"})}},[s,e]),h.useEffect(()=>{e?d(0):c("")},[e]),{search:l,setSearch:c,selectedIndex:s,setSelectedIndex:d,filteredCommands:p,filteredGroups:u,listRef:g}},wu=({onClose:e,children:o,...t})=>r.jsx(i.View,{position:"fixed",top:0,left:0,right:0,bottom:0,display:"flex",alignItems:"center",justifyContent:"center",backgroundColor:"color-dark-50-240",zIndex:9999,onClick:n=>{n.target===n.currentTarget&&(e==null||e())},...t,children:o}),qi=h.forwardRef(({value:e,onValueChange:o,...t},n)=>r.jsx(i.Input,{value:e,onChange:a=>{var l,c;return o(typeof a=="string"?a:((l=a==null?void 0:a.target)==null?void 0:l.value)??((c=a==null?void 0:a.nativeEvent)==null?void 0:c.text)??"")},ref:n,...t}));qi.displayName="CommandTextInput";const Su={sm:{width:"400px",maxHeight:"300px"},md:{width:"500px",maxHeight:"400px"},lg:{width:"600px",maxHeight:"500px"}},vu=(e=>({default:{backgroundColor:"color-white",borderWidth:"1px",borderStyle:"solid",borderColor:"color-gray-200",boxShadow:"0px 4px 20px rgba(0, 0, 0, 0.1)"},filled:{backgroundColor:"color-gray-50",borderWidth:"1px",borderStyle:"solid",borderColor:"color-gray-200",boxShadow:"0px 4px 20px rgba(0, 0, 0, 0.1)"},outline:{backgroundColor:"color-white",borderWidth:"2px",borderStyle:"solid",borderColor:"color-gray-300",boxShadow:"0px 4px 20px rgba(0, 0, 0, 0.1)"}}))(),Tu={display:"flex",alignItems:"center",padding:"12px 16px",borderBottomWidth:"1px",borderBottomStyle:"solid",borderBottomColor:"color-gray-200"},Iu={overflow:"auto",padding:"8px 0"},Fu={marginBottom:"8px"},zu={padding:"8px 16px",fontSize:"12px",fontWeight:"bold",color:"color-gray-500",textTransform:"uppercase"},Mu={display:"flex",alignItems:"center",padding:"8px 16px",cursor:"pointer",userSelect:"none",borderRadius:"4px",margin:"0 8px",_hover:{backgroundColor:"color-gray-100"}},Wu={backgroundColor:"color-blue-50",_hover:{backgroundColor:"color-blue-100"}},Hu={opacity:.5,cursor:"not-allowed",_hover:{backgroundColor:"transparent"}},ju={display:"flex",alignItems:"center",justifyContent:"center",marginRight:"12px",color:"color-gray-500"},Pu={display:"flex",flexDirection:"column",flex:1},Vu={fontSize:"14px",fontWeight:"medium"},Au={fontSize:"12px",color:"color-gray-500",marginTop:"2px"},Eu={display:"flex",alignItems:"center",marginLeft:"12px",fontSize:"12px",color:"color-gray-500"},Du={display:"flex",alignItems:"center",justifyContent:"center",padding:"16px",color:"color-gray-500",textAlign:"center"},$u={display:"flex",alignItems:"center",justifyContent:"space-between",padding:"8px 16px",borderTopWidth:"1px",borderTopStyle:"solid",borderTopColor:"color-gray-200",fontSize:"12px",color:"color-gray-500"},Lu=h.createContext({search:"",setSearch:()=>{},selectedIndex:0,setSelectedIndex:()=>{},filteredCommands:[],onSelect:()=>{}}),_u=({value:e,children:o})=>r.jsx(Lu.Provider,{value:e,children:o}),Ui=({value:e,onValueChange:o,placeholder:t="Type a command or search...",views:n,...a})=>{const l=h.useRef(null);return h.useEffect(()=>{l.current&&l.current.focus()},[]),r.jsxs(i.View,{...Tu,...n==null?void 0:n.container,...a,children:[r.jsx(wr,{widthHeight:16,color:"color-gray-400",marginRight:"8px"}),r.jsx(qi,{width:"100%",border:"none",outline:"none",backgroundColor:"transparent",fontSize:"14px",...n==null?void 0:n.input,value:e,onValueChange:o,placeholder:t,ref:l})]})},Bu=({children:e,views:o,...t})=>r.jsx(i.View,{...Iu,...o==null?void 0:o.container,...t,children:e}),Gi=({heading:e,children:o,views:t,...n})=>r.jsxs(i.View,{...Fu,...t==null?void 0:t.container,...n,children:[r.jsx(i.Text,{...zu,...t==null?void 0:t.heading,children:e}),o]}),mn=({item:e,selected:o=!1,onSelect:t,views:n,...a})=>{const l=()=>{!e.disabled&&t&&t()};return r.jsxs(i.Horizontal,{...Mu,...o?Wu:{},...e.disabled?Hu:{},onPress:l,onClick:l,...n==null?void 0:n.container,...a,children:[e.icon&&r.jsx(i.View,{...ju,...n==null?void 0:n.icon,children:e.icon}),r.jsxs(i.Vertical,{...Pu,...n==null?void 0:n.content,children:[r.jsx(i.Text,{...Vu,...n==null?void 0:n.name,children:e.name}),e.description&&r.jsx(i.Text,{...Au,...n==null?void 0:n.description,children:e.description})]}),e.shortcut&&r.jsx(i.Text,{...Eu,...n==null?void 0:n.shortcut,children:e.shortcut})]})},Yi=({children:e="No results found.",views:o,...t})=>r.jsx(i.View,{...Du,...o==null?void 0:o.container,...t,children:e}),Ou=({open:e,onOpenChange:o,groups:t=[],commands:n=[],placeholder:a,size:l="md",variant:c="default",emptyState:s,footer:d,search:g,setSearch:m,selectedIndex:f,setSelectedIndex:p,filteredCommands:u,filteredGroups:y,listRef:k,views:x,filter:C,...S})=>{if(!e)return null;const w=h.useCallback(T=>{T.disabled||(T.onSelect(),o(!1),m(""))},[o,m]);h.useCallback(T=>T.target===T.currentTarget&&o(!1),[o]);const v=h.useMemo(()=>({search:g,setSearch:m,selectedIndex:f,setSelectedIndex:p,filteredCommands:u,onSelect:w}),[g,f,u,w,m,p]),b=t.length>0,I=u.length===0;return r.jsx(wu,{onClose:()=>o(!1),...S,children:r.jsx(_u,{value:v,children:r.jsxs(i.View,{borderRadius:"8px",overflow:"hidden",display:"flex",flexDirection:"column",...Su[l],...vu[c],...x==null?void 0:x.container,onClick:T=>T.stopPropagation(),children:[r.jsx(Ui,{value:g,onValueChange:m,placeholder:a,views:x==null?void 0:x.searchInput}),r.jsx(i.View,{ref:k,flex:1,overflow:"auto",...x==null?void 0:x.list,children:I?s||r.jsx(Yi,{views:x==null?void 0:x.empty}):b?y.map(T=>r.jsx(Gi,{heading:T.name,views:x==null?void 0:x.groupHeading,children:T.commands.map(P=>{const E=u.findIndex(D=>D.id===P.id);return r.jsx(mn,{item:P,selected:E===f,onSelect:()=>w(P),"data-index":E,views:{container:x==null?void 0:x.item,icon:x==null?void 0:x.icon,content:x==null?void 0:x.content,name:x==null?void 0:x.name,description:x==null?void 0:x.description,shortcut:x==null?void 0:x.shortcut}},P.id)})},T.id)):u.map((T,P)=>r.jsx(mn,{item:T,selected:P===f,onSelect:()=>w(T),"data-index":P,views:{container:x==null?void 0:x.item,icon:x==null?void 0:x.icon,content:x==null?void 0:x.content,name:x==null?void 0:x.name,description:x==null?void 0:x.description,shortcut:x==null?void 0:x.shortcut}},T.id))}),d&&r.jsx(i.View,{...$u,...x==null?void 0:x.footer,children:d})]})})})},Bo=({open:e,onOpenChange:o,groups:t=[],commands:n=[],placeholder:a,size:l="md",variant:c="default",filter:s,emptyState:d,footer:g,views:m,...f})=>{const{search:p,setSearch:u,selectedIndex:y,setSelectedIndex:k,filteredCommands:x,filteredGroups:C,listRef:S}=Cu({open:e,onOpenChange:o,groups:t,commands:n,filter:s});return r.jsx(Ou,{open:e,onOpenChange:o,groups:t,commands:n,placeholder:a,size:l,variant:c,emptyState:d,footer:g,search:p,setSearch:u,selectedIndex:y,setSelectedIndex:k,filteredCommands:x,filteredGroups:C,listRef:S,views:m,...f})};Bo.Input=Ui,Bo.List=Bu,Bo.Group=Gi,Bo.Item=mn,Bo.Empty=Yi;const Ki=()=>Math.random().toString(36).substring(2,11),Nu=({defaultOpen:e=!1,openDelay:o=200,closeDelay:t=200,isDisabled:n=!1}={})=>{const[a,l]=h.useState(e),c=h.useRef(null),s=h.useRef(null),d=h.useRef(null),g=h.useRef(null),m=h.useRef(`tooltip-trigger-${Ki()}`).current,f=h.useRef(`tooltip-content-${Ki()}`).current,p=h.useCallback(()=>{n||(g.current&&(clearTimeout(g.current),g.current=null),!a&&!d.current&&(d.current=setTimeout(()=>{l(!0),d.current=null},o)))},[a,o,n]),u=h.useCallback(()=>{d.current&&(clearTimeout(d.current),d.current=null),a&&!g.current&&(g.current=setTimeout(()=>{l(!1),g.current=null},t))},[a,t]),y=h.useCallback(()=>{g.current&&(clearTimeout(g.current),g.current=null)},[]);return h.useEffect(()=>()=>{d.current&&clearTimeout(d.current),g.current&&clearTimeout(g.current)},[]),h.useEffect(()=>{if(typeof document>"u")return;const k=x=>{x.key==="Escape"&&a&&l(!1)};return document.addEventListener("keydown",k),()=>{document.removeEventListener("keydown",k)}},[a]),{isOpen:a,openTooltip:p,closeTooltip:u,cancelCloseTimer:y,triggerRef:c,contentRef:s,triggerId:m,contentId:f}},qu={sm:{padding:"4px 8px",fontSize:"12px",maxWidth:"200px"},md:{padding:"6px 10px",fontSize:"14px",maxWidth:"250px"},lg:{padding:"8px 12px",fontSize:"16px",maxWidth:"300px"}},Uu=(e=>({default:{backgroundColor:"color-gray-900",color:"color-white",borderRadius:"8px",boxShadow:"0px 4px 6px rgba(0, 0, 0, 0.1), 0px 2px 4px rgba(0, 0, 0, 0.06)",transition:"opacity 0.15s ease"},light:{backgroundColor:"color-white",color:"color-gray-800",borderWidth:"1px",borderStyle:"solid",borderColor:"color-gray-200",borderRadius:"8px",boxShadow:"0px 4px 6px rgba(0, 0, 0, 0.08), 0px 2px 4px rgba(0, 0, 0, 0.04)",transition:"opacity 0.15s ease"},dark:{backgroundColor:"color-gray-950",color:"color-white",borderRadius:"8px",boxShadow:"0px 4px 6px rgba(0, 0, 0, 0.2), 0px 2px 4px rgba(0, 0, 0, 0.12)",transition:"opacity 0.15s ease"}}))(),Gu=e=>{const o={position:"absolute",width:"8px",height:"8px",backgroundColor:"inherit",borderStyle:"inherit",borderWidth:"inherit",borderColor:"inherit",transform:"rotate(45deg)"};switch(e){case"top":return{...o,bottom:"-4px",left:"50%",marginLeft:"-4px",borderTop:"none",borderLeft:"none"};case"right":return{...o,left:"-4px",top:"50%",marginTop:"-4px",borderRight:"none",borderTop:"none"};case"bottom":return{...o,top:"-4px",left:"50%",marginLeft:"-4px",borderBottom:"none",borderRight:"none"};case"left":return{...o,right:"-4px",top:"50%",marginTop:"-4px",borderLeft:"none",borderBottom:"none"};default:return o}},Xi=h.createContext({isOpen:!1,openTooltip:()=>{},closeTooltip:()=>{},triggerRef:{current:null},contentRef:{current:null},contentId:"",triggerId:""}),pn=()=>h.useContext(Xi),Yu=({value:e,children:o})=>r.jsx(Xi.Provider,{value:e,children:o}),Ji=h.memo(({children:e,views:o,asChild:t=!1,...n})=>{const{openTooltip:a,closeTooltip:l,triggerRef:c,contentId:s,triggerId:d}=pn(),g=h.useCallback(()=>a(),[a]),m=h.useCallback(()=>l(),[l]),f=h.useCallback(()=>a(),[a]),p=h.useCallback(()=>l(),[l]),u={ref:c,onMouseEnter:g,onMouseLeave:m,onFocus:f,onBlur:p,id:d,"aria-describedby":s,...o==null?void 0:o.container,...n};return t&&h.isValidElement(e)?h.cloneElement(e,u):r.jsx(i.View,{display:"inline-block",...u,children:e})}),Ku=h.memo(({children:e,views:o,...t})=>{const{isOpen:n,contentRef:a,contentId:l,triggerId:c}=pn();return n?r.jsx(i.View,{ref:a,id:l,role:"tooltip","aria-labelledby":c,...o==null?void 0:o.container,...t,children:e}):null}),Xu=({content:e,children:o,position:t="top",align:n="center",size:a="md",variant:l="default",showArrow:c=!0,views:s,themeMode:d,...g})=>{const{isOpen:m,triggerRef:f,contentRef:p,contentId:u,triggerId:y}=pn(),{ref:k,relation:x}=i.useElementPosition({trackChanges:!0,trackOnHover:!0,trackOnScroll:!0,trackOnResize:!0}),[C,S]=h.useState({x:0,y:0,placement:t});h.useEffect(()=>{f!=null&&f.current&&k&&(k.current=f.current)},[f,k,m]),h.useEffect(()=>{if(m&&(p!=null&&p.current)&&(f!=null&&f.current)){const b=f.current.getBoundingClientRect();let I=t;x&&(t==="top"&&x.space.vertical==="bottom"?I="bottom":t==="bottom"&&x.space.vertical==="top"?I="top":t==="right"&&x.space.horizontal==="left"?I="left":t==="left"&&x.space.horizontal==="right"&&(I="right"));let T=0,P=0;switch(I){case"top":T=n==="start"?b.left:n==="end"?b.right-120:b.left+b.width/2-60,P=b.top-8;break;case"bottom":T=n==="start"?b.left:n==="end"?b.right-120:b.left+b.width/2-60,P=b.bottom+8;break;case"right":T=b.right+8,P=n==="start"?b.top:n==="end"?b.bottom-32:b.top+b.height/2-16;break;case"left":T=b.left-8,P=n==="start"?b.top:n==="end"?b.bottom-32:b.top+b.height/2-16;break}S({x:T,y:P,placement:I})}},[m,t,n,f,p,x]);const w=h.useMemo(()=>c?Gu(C.placement):{},[c,C.placement]),v=h.useMemo(()=>{const b={position:"fixed",left:C.x,top:C.y,zIndex:1e3};switch(C.placement){case"top":return{...b,transform:"translateY(-100%)"};case"left":return{...b,transform:"translateX(-100%)"};case"bottom":case"right":default:return b}},[C.x,C.y,C.placement]);return r.jsxs(i.View,{position:"relative",display:"inline-block",...s==null?void 0:s.container,...g,children:[r.jsx(Ji,{children:o}),m&&r.jsxs(i.View,{ref:p,id:u,role:"tooltip","aria-labelledby":y,borderRadius:4,boxShadow:"0px 2px 8px rgba(0, 0, 0, 0.15)",style:v,...qu[a],...Uu[l],...s==null?void 0:s.content,children:[typeof e=="string"?r.jsx(i.Text,{...s==null?void 0:s.text,children:e}):e,c&&r.jsx(i.View,{...w,...s==null?void 0:s.arrow})]})]})},et=({content:e,children:o,position:t="top",align:n="center",size:a="md",variant:l="default",openDelay:c=200,closeDelay:s=200,showArrow:d=!0,defaultOpen:g=!1,isDisabled:m=!1,views:f,...p})=>{const u=Nu({defaultOpen:g,openDelay:c,closeDelay:s,isDisabled:m});return r.jsx(Yu,{value:u,children:r.jsx(Xu,{content:e,position:t,align:n,size:a,variant:l,showArrow:d,views:f,...p,children:o})})};et.Trigger=Ji,et.Content=Ku;const Qi=h.forwardRef((e,o)=>{const t={...e,isAgentRunning:e.isAgentRunning??e.isWorkerRunning,onStopAgent:e.onStopAgent??e.onStopWorker,disabled:e.disabled??e.isDisabled},n=ul(t);return h.useImperativeHandle(o,()=>({getValue:()=>{var a,l;return((a=n.hiddenInputRef.current)==null?void 0:a.value)??((l=n.editableRef.current)==null?void 0:l.textContent)??n.value??""},setValue:n.setValue,clear:()=>n.setValue(""),focus:()=>{var a;return(a=n.editableRef.current)==null?void 0:a.focus()},blur:()=>{var a;return(a=n.editableRef.current)==null?void 0:a.blur()},getElement:()=>n.editableRef.current,getInputElement:()=>n.hiddenInputRef.current})),r.jsx(Sl,{...t,...n})});Qi.displayName="ChatInput";const Ju={container:{position:"relative",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center"}},Zi={container:{position:"relative",display:"flex",flexDirection:"column",height:"100vh",alignItems:"center",justifyContent:"center"},gradient:{position:"absolute",inset:"-10px",opacity:.5,pointerEvents:"none",filter:"blur(10px)",backgroundSize:"300% 200%",backgroundPosition:"50% 50%, 50% 50%"}},un={container:{position:"relative",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",overflow:"hidden"},image:{position:"absolute",top:0,left:0,width:"100%",height:"100%",backgroundSize:"cover",backgroundPosition:"center",backgroundRepeat:"no-repeat",backgroundAttachment:"scroll"},content:{position:"relative",width:"100%",height:"100%",zIndex:2}},yn={container:{position:"relative",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",overflow:"hidden"},video:{position:"absolute",top:0,left:0,width:"100%",height:"100%",objectFit:"cover"},content:{position:"relative",zIndex:2}},Qu=h.createContext({}),Zu=({children:e,showRadialGradient:o=!0,views:t,themeMode:n,...a})=>{const l={white:"rgba(255,255,255,1)",transparent:"rgba(255,255,255,0)"},c=["rgb(59, 130, 246)","rgb(196, 181, 253)","rgb(147, 197, 253)","rgb(221, 214, 254)","rgb(96, 165, 250)"],s={...Zi.gradient,backgroundImage:`
26
+ ${Q}`:Q}let ce=M,ye=!1;M.endsWith("-thinking")&&(ce=M.replace(/-thinking$/,""),ye=!0),n==null||n(ae,{model_name:ce,enable_thinking:ye}),y||x(""),w([]),b([])},J=te=>{w(ae=>ae.filter((ce,ye)=>ye!==te)),!g&&v.length>te&&b(ae=>ae.filter((ce,ye)=>ye!==te))},Y=te=>{te.preventDefault(),te.stopPropagation(),V(!0)},Z=te=>{te.preventDefault(),te.stopPropagation(),V(!1)},ee=h.useCallback(te=>{!te||te.length===0||(b(ae=>[...ae,...te]),w(ae=>[...ae,...te]),W(ae=>[...ae,...te]),T(!0))},[b,w]),ne=h.useCallback(()=>{if(D.length>0&&!A&&u){H(!0);const te=D[0];z.current=te,E(0),m==null||m(0);try{u(te),W(ae=>ae.slice(1)),H(!1),z.current=null,E(100),m==null||m(100),f==null||f({file:te})}catch(ae){W(ce=>ce.slice(1)),H(!1),z.current=null,E(0),T(ce=>D.length-1>0||!1),p==null||p(ae)}}else D.length===0&&I&&(T(!1),E(0))},[D,A,u,I,p,m,f]);h.useEffect(()=>{ne()},[D,A,ne]);const K="active",re=te=>!0,ie=()=>{oe(!1),e.onGuideClose&&e.onGuideClose()},ge=te=>{y&&t?t(te.text):x(te.text),e.onPromptExampleSelect&&e.onPromptExampleSelect(te),O.current&&O.current.focus()},We=h.useCallback(()=>v,[v]),le=h.useCallback(()=>b([]),[]);return{onSubmit:n,getPendingFiles:We,clearPendingFiles:le,value:C,handleChange:B,setValue:$,handleSubmit:q,editableRef:O,fileInputRef:N,hiddenInputRef:U,isUploading:I,uploadProgress:j,isDraggingOver:P,uploadedFiles:S,pendingFiles:v,removeUploadedFile:J,setPendingFiles:b,setUploadedFiles:w,setIsUploading:T,startUpload:ee,selectedModel:M,handleModelChange:L,modelOptions:_,subscriptionStatus:K,canAccessModel:re,handleDragOver:Y,handleDragLeave:Z,isGuideTipShown:X,hideGuideTip:ie,handlePromptExampleSelect:ge}},pf={attachmentRemove:{position:"absolute",top:"2px",right:"2px",width:"20px",height:"20px",borderRadius:"50%",backgroundColor:"color-black-900",color:"white",border:"none",cursor:"pointer",display:"flex",alignItems:"center",justifyContent:"center",fontSize:"12px",zIndex:1}},yl={container:{width:"100%",maxWidth:"100%",borderRadius:"12px",backgroundColor:"color-white",transition:"background-color 0.2s ease, box-shadow 0.2s ease"},content:{width:"100%",padding:"12px",borderRadius:"12px",backgroundColor:"color-white",borderWidth:"1px",borderStyle:"solid",borderColor:"color-gray-200",transition:"background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease"}},uf={default:{borderRadius:"8px"},square:{borderRadius:"0px"},rounded:{borderRadius:"8px"}},yf={xs:{fontSize:"10px",padding:"4px 8px"},sm:{fontSize:"12px",padding:"6px 10px"},md:{fontSize:"14px",padding:"8px 12px"},lg:{fontSize:"16px",padding:"10px 14px"},xl:{fontSize:"20px",padding:"12px 16px"}},bf={default:{backgroundColor:"color-white",borderWidth:"1px",borderStyle:"solid",borderColor:"color-gray-200"},outline:{backgroundColor:"transparent",borderWidth:"1px",borderStyle:"solid",borderColor:"color-gray-300"},none:{backgroundColor:"transparent",border:"none"}},bl=e=>`${e}-${Math.random().toString(36).substring(2,9)}`,xf=({openDelay:e=200,closeDelay:o=300}={})=>{const[t,n]=h.useState(!1),a=h.useRef(null),l=h.useRef(null),c=h.useRef(null),s=h.useRef(null),d=h.useMemo(()=>bl("hovercard-content"),[]),g=h.useMemo(()=>bl("hovercard-trigger"),[]),m=h.useCallback(()=>{a.current&&(clearTimeout(a.current),a.current=null),l.current&&(clearTimeout(l.current),l.current=null)},[]),f=h.useCallback(()=>{m(),t||(a.current=setTimeout(()=>{n(!0)},e))},[t,e,m]),p=h.useCallback(()=>{m(),t&&(l.current=setTimeout(()=>{n(!1)},o))},[t,o,m]),u=h.useCallback(()=>{l.current&&(clearTimeout(l.current),l.current=null)},[]);return h.useEffect(()=>()=>m(),[m]),{isOpen:t,openCard:f,closeCard:p,cancelCloseTimer:u,triggerRef:c,contentRef:s,contentId:d,triggerId:g}},xl=h.createContext({isOpen:!1,openCard:()=>{},closeCard:()=>{},cancelCloseTimer:()=>{},triggerRef:{current:null},contentRef:{current:null},contentId:"",triggerId:""}),kf=({children:e,value:o})=>r.jsx(xl.Provider,{value:o,children:e}),kl=()=>{const e=h.useContext(xl);if(!e)throw new Error("useHoverCardContext must be used within a HoverCardProvider");return e},Cf=({children:e,views:o,asChild:t=!1,...n})=>{const{openCard:a,closeCard:l,triggerRef:c,contentId:s,triggerId:d}=kl(),u={ref:c,onMouseEnter:()=>a(),onMouseLeave:()=>l(),onFocus:()=>a(),onBlur:()=>l(),id:d,"aria-describedby":s,...o==null?void 0:o.container,...n};if(t&&h.isValidElement(e)){const y=h.Children.only(e);return h.cloneElement(y,{...u,...y.props})}return r.jsx(i.View,{position:"relative",display:"inline-block",...u,children:e})},wf=({children:e,views:o,side:t="bottom",align:n="center",sideOffset:a=8,style:l,backgroundColor:c="color-white",borderRadius:s="4px",boxShadow:d="0px 2px 8px rgba(0, 0, 0, 0.15)",padding:g="12px",minWidth:m="50px",maxWidth:f="300px",...p})=>{const{isOpen:u,cancelCloseTimer:y,closeCard:k,contentRef:x,triggerRef:C,contentId:S,triggerId:w}=kl(),{ref:v,relation:b}=i.useElementPosition({trackChanges:!0,trackOnHover:!0,trackOnScroll:!0,trackOnResize:!0});h.useEffect(()=>{C!=null&&C.current&&(v==null?void 0:v.current)!==C.current&&v&&(v.current=C.current)},[C,v,u]);const I=()=>y(),T=()=>k();if(!u)return null;const j=()=>{if(!b||!(C!=null&&C.current))return{position:"absolute",top:0,left:0,zIndex:1e3};const W=C.current.getBoundingClientRect();let A=t;t==="bottom"&&b.space.vertical==="top"?A="top":t==="top"&&b.space.vertical==="bottom"?A="bottom":t==="right"&&b.space.horizontal==="left"?A="left":t==="left"&&b.space.horizontal==="right"&&(A="right");let H=0,z=0;switch(A){case"bottom":H=W.left+W.width/2,z=W.bottom+a;break;case"top":H=W.left+W.width/2,z=W.top-a;break;case"right":H=W.right+a,z=W.top+W.height/2;break;case"left":H=W.left-a,z=W.top+W.height/2;break}return{position:"fixed",left:H,top:z,zIndex:1e3,transform:E(A)}},E=W=>{switch(W){case"bottom":return"translate(-50%, 0)";case"top":return"translate(-50%, -100%)";case"right":return"translate(0, -50%)";case"left":return"translate(-100%, -50%)";default:return"translate(-50%, 0)"}},D=j();return r.jsx(i.View,{ref:x,id:S,role:"tooltip","aria-labelledby":w,onMouseEnter:I,onMouseLeave:T,backgroundColor:c,borderRadius:s,boxShadow:d,padding:g,minWidth:m,maxWidth:f,style:{...D,...l},...o==null?void 0:o.container,...p,children:e})},Me=({children:e,views:o,openDelay:t,closeDelay:n,...a})=>{const l=xf({openDelay:t,closeDelay:n});return r.jsx(kf,{value:l,children:r.jsx(i.View,{position:"relative",display:"inline-block",...o==null?void 0:o.container,...a,children:e})})};Me.Trigger=Cf,Me.Content=wf;const Sf=({files:e,sandboxId:o,onRemove:t,layout:n="inline",maxHeight:a="120px",showPreviews:l=!1,views:c={}})=>{if(e.length===0)return null;const s=h.useCallback(g=>g<1024?`${g} B`:g<1024*1024?`${(g/1024).toFixed(1)} KB`:`${(g/(1024*1024)).toFixed(1)} MB`,[]),d=h.useCallback(g=>g.type.startsWith("image/")?{backgroundColor:"#DBEAFE",color:"#2563EB"}:g.type.startsWith("video/")?{backgroundColor:"#EDE9FE",color:"#7C3AED"}:g.type.startsWith("audio/")?{backgroundColor:"#DCFCE7",color:"#16A34A"}:{backgroundColor:"#E2E8F0",color:"#475569"},[]);return r.jsx(i.View,{display:"flex",flexWrap:"wrap",gap:"8px",padding:"8px 0",maxHeight:a,overflowY:"auto",...c==null?void 0:c.container,children:e.map((g,m)=>{const f=(g==null?void 0:g.path)||(g==null?void 0:g.url)||(l?URL.createObjectURL(g):""),p=g.type.startsWith("image/"),u=g.type.startsWith("video/"),y=g.type.startsWith("audio/"),k=d(g);return l?r.jsx(i.Vertical,{alignItems:"center",gap:"6px",padding:"6px 10px",borderRadius:"8px",border:"1px solid #E2E8F0",backgroundColor:"color-white",animate:{from:{opacity:0,scale:.9},to:{opacity:1,scale:1}},animationDuration:.2,...c==null?void 0:c.item,children:l&&r.jsxs(Me,{children:[r.jsxs(Me.Trigger,{children:[p&&r.jsx(i.Image,{src:f,alt:g.name,width:"60px",height:"60px",borderRadius:"8px",objectFit:"cover"}),u&&r.jsx(i.View,{as:"video",src:f,alt:g.name,controls:!1,muted:!0,width:"60px",height:"60px",borderRadius:"8px",objectFit:"cover"}),y&&r.jsx(i.Center,{width:"60px",height:"60px",borderRadius:"8px",backgroundColor:"color-gray-100",children:r.jsx(Fo,{widthHeight:24,color:"color-black"})}),!p&&!u&&!y&&r.jsx(i.Center,{width:"60px",height:"60px",borderRadius:"8px",backgroundColor:"color-gray-100",children:r.jsx(go,{widthHeight:24,color:"color-black"})}),t&&r.jsx(i.Button,{...pf.attachmentRemove,onClick:x=>{x.stopPropagation(),t(m)},"aria-label":`Remove ${g.name}`,children:"×"})]}),r.jsxs(Me.Content,{children:[p&&r.jsx(i.Image,{src:f,alt:g.name,maxWidth:"100%"}),u&&r.jsx(i.View,{as:"video",src:f,controls:!0,maxWidth:"100%"}),y&&r.jsx(i.View,{as:"audio",src:f,controls:!0,width:"100%"}),r.jsxs(i.Text,{marginTop:"4px",maxLines:1,width:"100%",...c==null?void 0:c.name,children:[g.name," (",s(g.size),")"]})]})]})},m):r.jsxs(i.Horizontal,{alignItems:"center",gap:"8px",padding:"6px 10px 6px 8px",borderRadius:"9999px",border:"1px solid #E2E8F0",backgroundColor:"color-white",maxWidth:"100%",animate:{from:{opacity:0,scale:.96},to:{opacity:1,scale:1}},animationDuration:.2,...c==null?void 0:c.item,children:[r.jsx(i.Center,{width:"22px",height:"22px",minWidth:"22px",borderRadius:"9999px",backgroundColor:k.backgroundColor,color:k.color,children:y?r.jsx(Fo,{widthHeight:12,color:"currentColor"}):r.jsx(go,{widthHeight:12,color:"currentColor"})}),r.jsxs(i.Text,{fontSize:"12px",lineHeight:"16px",color:"color-gray-600",maxLines:1,maxWidth:"220px",...c==null?void 0:c.name,children:[g.name," · ",s(g.size)]}),t&&r.jsx(i.View,{as:"button",type:"button",onClick:()=>t(m),"aria-label":`Remove ${g.name}`,display:"flex",alignItems:"center",justifyContent:"center",width:"16px",height:"16px",minWidth:"16px",border:"none",backgroundColor:"transparent",color:"color-gray-400",padding:0,cursor:"pointer",transition:"color 0.2s ease, opacity 0.2s ease",_hover:{color:"color-gray-600"},children:"×"})]},m)})})},Cl=typeof window<"u"?h.useLayoutEffect:h.useEffect,wl=h.forwardRef(({value:e,onChange:o,placeholder:t="Type your message...",disabled:n=!1,autoFocus:a=!0,suggestions:l=[],onSuggestionSelect:c,showSuggestions:s=!1,mentionData:d=[],mentionTrigger:g="@",onMentionSelect:m,onKeyDown:f,maxHeight:p="200px",minHeight:u="40px",name:y,id:k,hiddenInput:x=!0,hiddenInputRef:C,views:S={}},w)=>{var ce,ye;const v=h.useRef(e),[b,I]=h.useState(-1),[T,j]=h.useState(!e),E=h.useRef(null),[D,W]=h.useState(!1),[A,H]=h.useState(!1),[z,P]=h.useState(""),[V,M]=h.useState(-1),[L,_]=h.useState(-1),[O,N]=h.useState([]),{ref:U,relation:X}=i.useElementPosition({trackChanges:!0,trackOnHover:!0,trackOnScroll:!0,trackOnResize:!0}),[oe,B]=h.useState({x:0,y:0}),[$,q]=h.useState({x:0,y:0}),J=h.useRef(null),Y=h.useCallback(Q=>{J.current=Q,typeof C=="function"?C(Q):C&&(C.current=Q)},[C]),Z=h.useCallback(Q=>{J.current&&J.current.value!==Q&&(J.current.value=Q)},[]);Cl(()=>{const Q=w;Q!=null&&Q.current&&e!==v.current&&(Q.current.textContent=e,v.current=e,j(!e)),Z(e)},[e,w,Z]);const ee=h.useCallback(Q=>{if(Q===v.current)return;const R=w;R!=null&&R.current&&R.current.textContent!==Q&&(R.current.textContent=Q),v.current=Q,j(!Q),Z(Q),o(Q)},[o,w,Z]);Cl(()=>{const Q=J.current;if(!Q)return;const R=()=>ee(Q.value);return Q.addEventListener("input",R),Q.addEventListener("change",R),()=>{Q.removeEventListener("input",R),Q.removeEventListener("change",R)}},[ee,x]),h.useEffect(()=>{a&&w&&typeof w=="object"&&w.current&&w.current.focus()},[a,w]);const ne=()=>{const Q=window.getSelection();if(!Q||Q.rangeCount===0)return-1;const R=Q.getRangeAt(0),be=R.cloneRange();return be.selectNodeContents(w&&typeof w=="object"&&w.current?w.current:document.body),be.setEnd(R.endContainer,R.endOffset),be.toString().length},K=h.useCallback((Q,R)=>{const be=Q.substring(0,R),Ie=be.lastIndexOf(g);if(Ie!==-1){const ve=be.substring(Ie+1);if(!ve.includes(" ")){const co=ve.toLowerCase(),so=d.filter(Qe=>Qe.name.toLowerCase().includes(co));P(co),M(Ie),N(so),H(so.length>0),_(0);const So=re();B(So);return}}H(!1),P(""),M(-1),_(-1)},[d,g]);h.useEffect(()=>{E.current&&U&&(U.current=E.current)},[E,U]);const re=h.useCallback((Q=200)=>{if(!E.current)return{x:0,y:0};const R=E.current.getBoundingClientRect();if(X){const Je=X.space.vertical==="top";return{x:R.left,y:Je?R.top-Q-8:R.bottom+8}}const be=window.innerHeight,Ie={top:R.top,bottom:be-R.bottom},ve=Ie.bottom<Q+8&&Ie.top>Ie.bottom;return{x:R.left,y:ve?R.top-Q-8:R.bottom+8}},[X]),ie=h.useCallback(()=>{W(!0);const Q=re();q(Q)},[re]),ge=h.useCallback(()=>{setTimeout(()=>{W(!1),I(-1)},150)},[]),We=Q=>{const R=Q.currentTarget.textContent||"";if(R!==v.current){o(R),v.current=R,Z(R),j(!R);const be=ne();K(R,be)}},le=h.useCallback(Q=>{if(w&&typeof w=="object"&&w.current){const R=w.current.textContent||"",be=R.substring(0,V),Ie=R.substring(V+g.length+z.length),ve=be+g+Q.name+" "+Ie;o(ve),v.current=ve,Z(ve),w.current.textContent=ve;const Je=be.length+g.length+Q.name.length+1;setTimeout(()=>{var co;if(w.current){const so=document.createRange(),So=window.getSelection(),Qe=w.current.firstChild;Qe&&So&&(so.setStart(Qe,Math.min(Je,((co=Qe.textContent)==null?void 0:co.length)||0)),so.collapse(!0),So.removeAllRanges(),So.addRange(so))}},0)}H(!1),P(""),M(-1),_(-1),m&&m(Q)},[V,g,z,o,m,w,Z]),te=h.useCallback(Q=>{c&&c(Q),I(-1)},[c]),ae=Q=>{if(!(f&&(f(Q),Q.defaultPrevented))){if(A&&O.length>0){if(Q.key==="ArrowDown"){Q.preventDefault(),_(R=>R<O.length-1?R+1:0);return}if(Q.key==="ArrowUp"){Q.preventDefault(),_(R=>R>0?R-1:O.length-1);return}if((Q.key==="Tab"||Q.key==="Enter")&&L>=0){Q.preventDefault(),le(O[L]);return}if(Q.key==="Escape"){H(!1),_(-1);return}}if(s&&l.length>0){if(Q.key==="ArrowDown"){Q.preventDefault(),I(R=>R<l.length-1?R+1:0);return}if(Q.key==="ArrowUp"){Q.preventDefault(),I(R=>R>0?R-1:l.length-1);return}if(Q.key==="Tab"&&b>=0){Q.preventDefault(),te(l[b]);return}if(Q.key==="Escape"){I(-1);return}}}};return r.jsxs(i.View,{ref:E,width:"100%",position:"relative",...S==null?void 0:S.container,children:[r.jsxs(i.View,{width:"100%",minHeight:u,maxHeight:p,overflowY:"auto",position:"relative",children:[T&&r.jsx(i.Text,{position:"absolute",top:"8px",left:"8px",color:"color-gray-400",pointerEvents:"none",fontSize:"14px",zIndex:1,...S==null?void 0:S.placeholder,children:t}),r.jsx(i.View,{as:"div",ref:w,contentEditable:!n,suppressContentEditableWarning:!0,onInput:We,onKeyDown:ae,onFocus:ie,onBlur:ge,role:"textbox","aria-multiline":"true","aria-placeholder":t,width:"100%",minHeight:"24px",padding:"8px",outline:"none",whiteSpace:"pre-wrap",wordBreak:"break-word",fontSize:"14px",color:"color-gray-900",backgroundColor:"transparent",...S==null?void 0:S.input})]}),x&&r.jsx(i.View,{as:"textarea",ref:Y,id:k,name:y,defaultValue:e,disabled:n,tabIndex:-1,"aria-hidden":"true","data-editable-input-mirror":"true",opacity:0,width:1,height:1,padding:0,border:"none",resize:"none",overflow:"hidden",position:"absolute",bottom:0,left:0,pointerEvents:"none",...S==null?void 0:S.hiddenInput}),A&&O.length>0&&r.jsx(i.View,{position:"fixed",left:oe.x,top:oe.y,width:((ce=E.current)==null?void 0:ce.offsetWidth)||300,backgroundColor:"color-white",border:"2px solid",borderColor:"color-blue-300",borderRadius:"8px",boxShadow:"0 8px 24px rgba(0, 0, 0, 0.15)",zIndex:9999,maxHeight:"200px",overflowY:"auto",...S==null?void 0:S.mentionContainer,children:r.jsxs(i.Vertical,{gap:0,children:[O.map((Q,R)=>r.jsx(i.View,{as:"button",type:"button",width:"100%",padding:"12px 16px",backgroundColor:R===L?"color-blue-50":"transparent",border:"none",cursor:"pointer",textAlign:"left",transition:"background-color 0.2s ease",onClick:()=>le(Q),onMouseEnter:()=>_(R),_hover:{backgroundColor:"color-blue-50"},...S==null?void 0:S.mentionItem,children:r.jsxs(i.Vertical,{gap:4,children:[r.jsxs(i.Text,{fontSize:"14px",color:"color-gray-900",fontWeight:"medium",children:[g,Q.name]}),Q.description&&r.jsx(i.Text,{fontSize:"12px",color:"color-gray-600",children:Q.description})]})},Q.id)),process.env.NODE_ENV==="development"&&r.jsxs("div",{style:{fontSize:"8px",opacity:.7,padding:"4px"},children:["Mentions (Trigger: ",g,")",X&&r.jsxs(r.Fragment,{children:[r.jsx("br",{}),"Space: ",X.space.vertical,"-",X.space.horizontal]})]})]})}),s&&l.length>0&&!A&&D&&!e&&r.jsx(i.View,{position:"fixed",left:$.x,top:$.y,width:((ye=E.current)==null?void 0:ye.offsetWidth)||300,backgroundColor:"color-white",border:"2px solid",borderColor:"color-green-300",borderRadius:"8px",boxShadow:"0 8px 24px rgba(0, 0, 0, 0.15)",zIndex:9998,maxHeight:"200px",overflowY:"auto",...S==null?void 0:S.suggestionsContainer,children:r.jsxs(i.Vertical,{gap:0,children:[l.map((Q,R)=>r.jsx(i.View,{as:"button",type:"button",width:"100%",padding:"12px 16px",backgroundColor:R===b?"color-blue-50":"transparent",border:"none",cursor:"pointer",textAlign:"left",transition:"background-color 0.2s ease",onClick:()=>te(Q),onMouseEnter:()=>I(R),_hover:{backgroundColor:"color-blue-50"},...S==null?void 0:S.suggestionItem,children:r.jsxs(i.Vertical,{gap:4,children:[r.jsx(i.Text,{fontSize:"14px",color:"color-gray-900",fontWeight:"medium",children:Q.text}),Q.description&&r.jsx(i.Text,{fontSize:"12px",color:"color-gray-600",children:Q.description})]})},Q.id)),process.env.NODE_ENV==="development"&&r.jsxs("div",{style:{fontSize:"8px",opacity:.7,padding:"4px"},children:["Suggestions (Focus-triggered)",X&&r.jsxs(r.Fragment,{children:[r.jsx("br",{}),"Space: ",X.space.vertical,"-",X.space.horizontal]})]})]})})]})});wl.displayName="EditableInput";const vf=({examples:e,onSelect:o,views:t={}})=>{const{getColor:n}=i.useTheme();return!e||e.length===0?null:r.jsx(i.Horizontal,{gap:8,overflowX:"auto",padding:"8px 0",width:"100%",...t==null?void 0:t.container,children:e.map(a=>r.jsx(i.View,{as:"button",type:"button",padding:"8px 12px",borderRadius:"9999px",backgroundColor:"color-white",border:"1px solid #E2E8F0",cursor:"pointer",transition:"background-color 0.2s ease, border-color 0.2s ease",onClick:()=>o(a),_hover:{backgroundColor:"#F8FAFC",borderColor:"#CBD5E1"},...t==null?void 0:t.item,children:r.jsx(i.Text,{fontSize:"14px",color:"color-gray-700",...t==null?void 0:t.text,children:a.text})},a.id))})},Tf=({onRecordingComplete:e,onRecordingStart:o,views:t={}})=>{const{recording:n,paused:a,audioBlob:l,analyserNode:c,startRecording:s,stopRecording:d}=ta();h.useEffect(()=>{if(l){const m=new File([l],`recording-${Date.now()}.webm`,{type:l.type||"audio/webm;codecs=opus"});e(m)}},[l]);const g=h.useCallback(()=>{s(),o==null||o()},[]);return r.jsxs(i.Horizontal,{alignItems:"center",gap:4,children:[r.jsx(i.View,{minWidth:90,children:n&&c&&r.jsx(vt,{analyserNode:c,isPaused:a})}),r.jsx(i.View,{as:"button",type:"button",onClick:n?d:g,height:"40px",width:"40px",display:"flex",alignItems:"center",justifyContent:"center",backgroundColor:n?"theme-error":"color-gray-100",color:n?"color-white":"color-gray-600",borderRadius:"50%",border:"none",cursor:"pointer",_hover:{backgroundColor:n?"color-red-600":"color-gray-200"},...t.button,children:n?r.jsx(Cr,{widthHeight:16,color:"currentColor",filled:!1}):r.jsx(ut,{widthHeight:16,color:"currentColor",filled:!1})})]})},Sl=h.memo(({onSubmit:e,placeholder:o="Type your message… use @ to mention",loading:t=!1,disabled:n=!1,isDisabled:a,rightElement:l,onKeyDown:c,isAgentRunning:s=!1,enableAudioRecording:d=!1,leftButtons:g,rightButtons:m,onStopAgent:f,loadingText:p="Agent is working...",autoFocus:u=!0,sandboxId:y,hideAttachments:k=!1,attachmentText:x="",promptExamples:C=[],suggestions:S=[],errorMessage:w,size:v="md",shape:b="rounded",variant:I="default",views:T={},mentionData:j=[],mentionTrigger:E="@",onMentionSelect:D,onAudioRecordingStart:W,onAudioRecordingStop:A,showGuideTip:H,guideVideoUrl:z,onGuideClose:P,onFileBrowse:V,onUploadProgress:M,onUploadSuccess:L,onUploadError:_,onFileUpload:O,onPromptExampleSelect:N,name:U,hiddenInput:X=!0,value:oe,handleChange:B,setValue:$,handleSubmit:q,editableRef:J,fileInputRef:Y,hiddenInputRef:Z,isUploading:ee,uploadProgress:ne,isDraggingOver:K,uploadedFiles:re,pendingFiles:ie,getPendingFiles:ge,clearPendingFiles:We,removeUploadedFile:le,setPendingFiles:te,setUploadedFiles:ae,setIsUploading:ce,startUpload:ye,selectedModel:Q,handleModelChange:R,modelOptions:be,subscriptionStatus:Ie,canAccessModel:ve,isGuideTipShown:Je,hideGuideTip:co,handlePromptExampleSelect:so,handleDragOver:So,handleDragLeave:Qe,onChange:Lk,...Sb})=>{i.useTheme();const Hc=h.useMemo(()=>({...yl.container,...uf[b],...T==null?void 0:T.container}),[b,T==null?void 0:T.container]),vb=h.useMemo(()=>({...yl.content,...yf[v],...bf[I],...T==null?void 0:T.content}),[v,I,T==null?void 0:T.content]),yr=((oe==null?void 0:oe.trim().length)??0)>0||re.length>0,Tb=h.useCallback(Ce=>{ye([Ce]),A==null||A(Ce)},[ye,A]),Vn=h.useCallback(Ce=>{const Yo=Ce.filter(jc=>jc.size>52428800?(console.error(`File size exceeds 50MB limit: ${jc.name}`),!1):!0);Yo.length>0&&ye(Yo)},[ye]),Ib=h.useCallback(Ce=>{if(Ce.preventDefault(),Ce.stopPropagation(),Qe(Ce),Ce.dataTransfer.files.length>0){const Yo=Array.from(Ce.dataTransfer.files);Vn(Yo)}},[Qe,Vn]),Fb=h.useMemo(()=>[...j||[],...re.map((Ce,Yo)=>({id:`file-${Yo}`,name:Ce.name}))],[j,re]);return r.jsxs(i.View,{display:"flex",flexDirection:"column",boxSizing:"border-box",...Hc,...Sb,onDragOver:So,onDragLeave:Qe,onDrop:Ib,children:[C.length>0&&r.jsx(vf,{examples:C,onSelect:so,views:{container:T==null?void 0:T.promptExamples,item:T==null?void 0:T.promptExampleItem}}),s&&r.jsxs(i.Horizontal,{justifyContent:"center",alignItems:"center",gap:8,padding:"8px 0",animate:{from:{opacity:0,y:-10},to:{opacity:1,y:0},duration:"0.3s"},...T==null?void 0:T.loadingIndicator,children:[r.jsx(bt,{widthHeight:12,color:"currentColor",filled:!1,style:{animation:"spin 1s linear infinite"}}),r.jsx(i.Text,{color:"color-gray-500",children:p})]}),r.jsx(i.View,{position:"relative",width:"100%",overflow:"visible",children:r.jsxs(i.View,{as:"form",onSubmit:q,overflow:"visible",display:"flex",flexDirection:"column",position:"relative",...vb,...Hc,paddingHorizontal:16,paddingVertical:10,backgroundColor:K?"color-blue-50":void 0,children:[r.jsx(Sf,{files:re,sandboxId:y,onRemove:le,showPreviews:!0,views:{container:T==null?void 0:T.attachments,item:T==null?void 0:T.attachmentItem,name:T==null?void 0:T.attachmentName,size:T==null?void 0:T.attachmentSize,removeButton:T==null?void 0:T.attachmentRemove}}),r.jsx(wl,{ref:J,value:oe||"",onChange:B,placeholder:o,disabled:n&&!s,autoFocus:u,onKeyDown:c,suggestions:S||[],showSuggestions:S&&S.length>0&&!oe,onSuggestionSelect:Ce=>{B(Ce.text)},mentionData:Fb,mentionTrigger:E,onMentionSelect:D,name:U,hiddenInput:X,hiddenInputRef:Z,views:{container:{},input:T==null?void 0:T.editableInput,hiddenInput:T==null?void 0:T.hiddenInput}}),r.jsxs(i.Horizontal,{justifyContent:"space-between",alignItems:"center",marginTop:"8px",children:[r.jsxs(i.Horizontal,{gap:8,alignItems:"center",children:[!k&&r.jsx(i.View,{display:"contents",onClickCapture:V?Ce=>{Ce.target.tagName==="INPUT"&&V()}:void 0,children:r.jsx(Tr,{accept:"*/*",icon:r.jsx(Ko,{widthHeight:16}),maxSize:50*1024*1024,multiple:!0,onMultipleFileSelect:Vn,isLoading:ee,progress:ne||0,text:x,fileType:"file",renderError:({errorMessage:Ce})=>null,views:{container:{height:"36px",cursor:"pointer",_hover:{backgroundColor:"color-gray-100"},...T==null?void 0:T.fileButton}},containerProps:{display:"flex",alignItems:"center",justifyContent:"center",gap:4,borderRadius:b==="rounded"?"50%":4,padding:10},textProps:{fontSize:"14px",color:"color-gray-600"},validateFile:Ce=>Ce.size>50*1024*1024?"File size exceeds 50MB limit":null})}),g]}),r.jsxs(i.Horizontal,{gap:8,alignItems:"center",children:[l,d&&r.jsx(Tf,{onRecordingStart:W,onRecordingComplete:Tb,views:{button:T==null?void 0:T.recordButton}}),r.jsx(i.View,{as:"button",type:"button",onClick:q,height:"40px",width:"40px",display:"flex",alignItems:"center",justifyContent:"center",backgroundColor:s?"theme-error":yr?"theme-primary":"color-gray-300",color:"color-white",borderRadius:b==="rounded"?"50%":4,border:"none",cursor:yr?"pointer":"not-allowed",disabled:!yr||t||n&&!s,transition:"background-color 0.2s ease, opacity 0.2s ease, box-shadow 0.2s ease",_hover:{opacity:yr||s?.9:1},_active:{opacity:yr||s?.95:1},_focusVisible:{outline:"none",boxShadow:"0 0 0 2px white, 0 0 0 4px theme-primary"},...T==null?void 0:T.submitButton,children:s?r.jsx(Cr,{widthHeight:16,color:"currentColor",filled:!1}):t?r.jsx(eo,{type:"quarter",size:16,color:"color-white"}):r.jsx(yt,{widthHeight:16,color:"currentColor",filled:!1})}),m]})]})]})}),w&&r.jsx(i.Text,{color:"theme-error",marginTop:"4px",...T==null?void 0:T.bottomTip,children:w})]})}),If=e=>{const{name:o,onSubmit:t,...n}=e,[a,l]=h.useState([]),c=xe({name:o,type:"text"}),s=p=>{c.onChangeText&&c.onChangeText(p)},d=(p,u)=>{t?t(p,u):s(p)},g=()=>a,m=()=>l([]),f=ul({...n,value:c.value||"",onChange:s,onSubmit:d});return r.jsx(Sl,{...n,...f,name:o,value:c.value||"",onChange:s,onSubmit:d,error:c.error,getPendingFiles:g,clearPendingFiles:m})},Ff=e=>{const o=xe(e),t=qa(o);return r.jsx(Ua,{...t,...o})},zf=e=>{const o=xe(e),t=rl();return r.jsx(tl,{...t,...o})},Mf=e=>{const o=xe(e),t=Ga(e);return r.jsx(Ka,{...t,...o})},Wf=e=>{let o=xe(e);o.selected=o.value;const t=Fa({...e,value:o.value});return r.jsx(Wa,{...o,...t})},Hf=e=>{const o=xe(e),t=Ha(e);return r.jsx(Va,{...t,...o})},jf=e=>{const{name:o,...t}=e,{values:n,errors:a,touched:l,submitCount:c,setFieldValue:s,setFieldTouched:d}=Ee.useFormikContext(),g=Ee.getIn(n,o)||[],m=Ee.getIn(l,o)||c>0?Ee.getIn(a,o):void 0,f=h.useCallback(x=>{var S;const C=Array.isArray(x)?x.filter(w=>typeof w=="string"):[];s(o,C),(S=e.onTagsChange)==null||S.call(e,C)},[o,s,e.onTagsChange]),p=h.useCallback(()=>{var x;d(o,!0),(x=e.onBlur)==null||x.call(e)},[o,d,e.onBlur]),u=dl({...t,tags:g,onTagsChange:f,onBlur:p}),{tags:y,...k}=u;return r.jsx(gl,{...k,...t,tags:y,error:m})},Pf=e=>{const o=xe(e),t=Da(e);return r.jsx($a,{...t,...o})},Vf=e=>{const o=xe(e,{focusable:!0}),{value:t,...n}=Lt(e);return r.jsx(or,{...n,...o})},Af=({visibleIcon:e=r.jsx(kt,{widthHeight:14}),hiddenIcon:o=r.jsx(xt,{widthHeight:14}),...t})=>{const n=xe(t,{focusable:!0}),{isVisible:a,setIsVisible:l,...c}=nl(n);return r.jsx(or,{...c,type:a?"text":"password",isClearable:!1,right:r.jsx(i.View,{onClick:()=>{t.isDisabled||l(!a)},children:a?e:o})})},Ef=({items:e,placeholder:o,searchPlaceholder:t,isMulti:n=!1,...a})=>{const l=xe(a),c=ll(e,o,t);h.useEffect(()=>{if(n&&Array.isArray(l.value))c.setSelectedItems(l.value);else if(!n&&l.value){const d=typeof l.value=="object"?l.value:e.find(g=>g.value===l.value);d&&c.setSelectedItem(d)}},[l.value,n,e]);const s=d=>{l.onChange(d)};return r.jsx(sl,{...c,...l,items:e,placeholder:o,isMulti:n,onSelect:s})},Vo=(e,o,t)=>Math.min(Math.max(e,o),t),Df=(e,o,t,n,a,l,c)=>{const s=n-t;let d;if(l==="horizontal"){const g=o.width,m=e-o.left;d=Vo(m/g,0,1)}else{const g=o.height,m=o.bottom-e;d=Vo(m/g,0,1)}if(c&&c.length>0){const g=t+d*s;let m=c[0],f=Math.abs(g-m);for(let p=1;p<c.length;p++){const u=Math.abs(g-c[p]);u<f&&(f=u,m=c[p])}return m}else{const g=t+d*s,m=Math.round(g/a)*a;return Vo(m,t,n)}},vl=({min:e=0,max:o=100,step:t=1,value:n,defaultValue:a,onChange:l,onDrag:c,orientation:s="horizontal",isDisabled:d=!1,stepValues:g})=>{const m=Vo(n??a??e,e,o),[f,p]=h.useState(m),[u,y]=h.useState(!1),[k,x]=h.useState(!1),C=h.useRef(null),S=h.useRef(null),w=n!==void 0,v=n!==void 0?n:f;h.useEffect(()=>{n!==void 0&&p(Vo(n,e,o))},[n,e,o]);const b=h.useCallback(A=>{const H=Vo(A,e,o);w||p(H),l&&H!==v&&l(H),u&&c&&c(H)},[w,e,o,l,v,u,c]),I=h.useCallback(A=>{if(d||!C.current)return;const H=C.current;if(typeof H.getBoundingClientRect!="function")return;const z=H.getBoundingClientRect();let P;"touches"in A?P=s==="horizontal"?A.touches[0].clientX:A.touches[0].clientY:P=s==="horizontal"?A.clientX:A.clientY;const V=Df(P,z,e,o,t,s,g);b(V)},[e,o,t,s,b,d,g]),T=h.useCallback(A=>{if(d)return;A.preventDefault(),y(!0),I(A);const H=P=>{I(P)},z=()=>{y(!1),document.removeEventListener("mousemove",H),document.removeEventListener("mouseup",z),document.removeEventListener("touchmove",H),document.removeEventListener("touchend",z)};typeof document>"u"||(document.addEventListener("mousemove",H),document.addEventListener("mouseup",z),document.addEventListener("touchmove",H),document.addEventListener("touchend",z))},[I,d]),j=h.useCallback(A=>{const H=S.current;H&&typeof H.contains=="function"&&H.contains(A.target)||T(A)},[T]),E=h.useCallback(A=>{if(d)return;let H=v;switch(A.key){case"ArrowLeft":case"ArrowDown":H=v-t;break;case"ArrowRight":case"ArrowUp":H=v+t;break;case"Home":H=e;break;case"End":H=o;break;default:return}A.preventDefault(),b(H)},[v,e,o,t,b,d]),D=o-e,W=D===0?0:(v-e)/D*100;return{currentValue:v,isDragging:u,isHovered:k,setIsHovered:x,trackRef:C,thumbRef:S,handleThumbMouseDown:T,handleTrackMouseDown:j,handleKeyDown:E,thumbPositionPercent:W}},Tl={xs:{height:4,width:"100%"},sm:{height:6,width:"100%"},md:{height:8,width:"100%"},lg:{height:10,width:"100%"},xl:{height:12,width:"100%"}},Il={xs:{width:12,height:12},sm:{width:16,height:16},md:{width:20,height:20},lg:{width:24,height:24},xl:{width:28,height:28}},Fl={square:0,rounded:4,pill:24},zl=(e=>({default:{backgroundColor:"color-gray-200",transition:"background-color 0.15s ease"},outline:{borderWidth:1,borderStyle:"solid",borderColor:"color-gray-300",style:{backgroundColor:"transparent"},transition:"border-color 0.15s ease"}}))(),$f={xs:{trackCrossAxisSize:4,thumbSize:12},sm:{trackCrossAxisSize:6,thumbSize:16},md:{trackCrossAxisSize:8,thumbSize:20},lg:{trackCrossAxisSize:10,thumbSize:24},xl:{trackCrossAxisSize:12,thumbSize:28}},Lf={horizontal:{width:"100%",minWidth:"120px",height:"auto",flexDirection:"row",paddingVertical:8},vertical:{height:"100%",minHeight:"120px",width:"auto",flexDirection:"column-reverse",paddingHorizontal:8}},_f=e=>typeof e=="string"&&(/^(#|rgb\(|rgba\(|hsl\(|hsla\(|var\()/.test(e)||["black","currentColor","inherit","transparent","white"].includes(e)),ar=(e,o)=>_f(o)?{style:{[e]:o}}:{[e]:o},Ml=h.memo(({min:e=0,max:o=100,step:t=1,currentValue:n,stepValues:a,shape:l="rounded",size:c="md",variant:s="default",orientation:d="horizontal",isDisabled:g=!1,showValue:m=!1,showTooltip:f=!1,backgroundColor:p="theme-primary",label:u,helperText:y,themeMode:k,shadow:x={},isDragging:C,isHovered:S,setIsHovered:w,trackRef:v,thumbRef:b,handleThumbMouseDown:I,handleTrackMouseDown:T,handleKeyDown:j,thumbPositionPercent:E,ariaLabel:D="Slider",views:W={container:{},track:{},progress:{},filledTrack:{},thumb:{},label:{},valueLabel:{},stepMarks:{},tooltip:{}},onChange:A,onDrag:H,value:z,defaultValue:P,...V})=>{var $,q;const M=p,L="theme-disabled",_=zl[s].backgroundColor,O=g?L:M,N=d==="vertical",{trackCrossAxisSize:U,thumbSize:X}=$f[c]||{trackCrossAxisSize:Tl[c].height,thumbSize:Il[c].width||16},oe=r.jsxs(i.Vertical,{width:"100%",gap:8,...W.container,...V,children:[u&&r.jsxs(i.Horizontal,{justifyContent:"space-between",alignItems:"center",children:[r.jsx(i.Text,{fontSize:14,fontWeight:500,...W.label,children:u}),m&&r.jsx(i.Text,{fontSize:14,color:"color-gray-500",...W.valueLabel,children:n})]}),r.jsxs(i.View,{ref:v,position:"relative",cursor:g?"not-allowed":"pointer",opacity:g?.6:1,onMouseDown:T,onMouseEnter:()=>w(!0),onMouseLeave:()=>w(!1),...Tl[c],borderRadius:Fl[l],backgroundColor:_,...zl[s],...x,...W.track,children:[a&&a.length>0&&r.jsx(r.Fragment,{children:a.map(J=>{const Y=(J-e)/(o-e)*100;return r.jsx(i.View,{position:"absolute",top:"50%",left:`${Y}%`,transform:"translate(-50%, -50%)",width:4,height:4,borderRadius:"50%",zIndex:1,...ar("backgroundColor",O),...W.stepMarks},J)})}),r.jsx(i.View,{position:"absolute",top:0,left:0,height:"100%",width:`${E}%`,borderRadius:Fl[l],transition:"width 0.1s ease-in-out",...ar("backgroundColor",O),...W.progress,...W.filledTrack}),r.jsx(i.View,{ref:b,role:"slider",tabIndex:g?-1:0,"aria-valuemin":e,"aria-valuemax":o,"aria-valuenow":n,"aria-orientation":d,"aria-disabled":g,"aria-label":D,position:"absolute",top:"50%",left:`${E}%`,borderRadius:"50%",backgroundColor:"color-white",boxShadow:"0 2px 4px rgba(0, 0, 0, 0.2)",borderWidth:2,borderStyle:"solid",transition:C?"none":"transform 0.1s ease-in-out",...ar("borderColor",O),transform:S?"translate(-50%, -50%) scale(1.1)":"translate(-50%, -50%)",zIndex:2,onMouseDown:I,onTouchStart:I,onKeyDown:j,...Il[c],...W.thumb,children:f&&(S||C)&&r.jsx(i.View,{position:"absolute",bottom:"100%",left:"50%",transform:"translateX(-50%)",marginBottom:8,padding:"4px 8px",backgroundColor:"color-black",color:"color-white",borderRadius:4,fontSize:12,whiteSpace:"nowrap",zIndex:3,...W.tooltip,children:r.jsx(i.Text,{...($=W.tooltip)==null?void 0:$.text,children:n==null?void 0:n.toFixed(t<1?1:0)})})})]}),y&&r.jsx(Et,{children:y})]}),B=r.jsxs(i.Center,{...Lf[d],position:"relative",onMouseEnter:()=>!g&&w(!0),onMouseLeave:()=>!g&&w(!1),...V,...W==null?void 0:W.container,children:[u&&r.jsxs(i.Horizontal,{justifyContent:"space-between",alignItems:"center",marginBottom:8,width:"100%",children:[r.jsx(i.Text,{fontSize:14,fontWeight:500,...W.label,children:u}),m&&r.jsx(i.Text,{fontSize:14,color:"color-gray-500",...W.valueLabel,children:n})]}),r.jsxs(i.View,{ref:v,position:"relative",borderRadius:U/2,backgroundColor:g?L:_,cursor:g?"not-allowed":"pointer",width:N?`${U}px`:"100%",height:N?"100%":`${U}px`,onMouseDown:T,onTouchStart:T,...W==null?void 0:W.track,children:[a&&a.length>0&&r.jsx(r.Fragment,{children:a.map(J=>{const Y=(J-e)/(o-e)*100;return r.jsx(i.View,{position:"absolute",width:4,height:4,borderRadius:"50%",backgroundColor:O,zIndex:1,...N?{bottom:`${Y}%`,left:"50%",transform:"translate(-50%, 50%)"}:{left:`${Y}%`,top:"50%",transform:"translate(-50%, -50%)"},...W.stepMarks},J)})}),r.jsx(i.View,{position:"absolute",borderRadius:U/2,...N?{bottom:0,left:0,width:"100%",height:`${E}%`}:{top:0,left:0,height:"100%",width:`${E}%`},...ar("backgroundColor",O),...W==null?void 0:W.filledTrack,...W==null?void 0:W.progress}),r.jsx(i.View,{ref:b,role:"slider",tabIndex:g?-1:0,"aria-valuemin":e,"aria-valuemax":o,"aria-valuenow":n,"aria-orientation":d,"aria-disabled":g,"aria-label":D,position:"absolute",width:`${X}px`,height:`${X}px`,borderRadius:"50%",borderWidth:2,borderStyle:"solid",borderColor:"color-white",boxShadow:"0 1px 3px rgba(0, 0, 0, 0.2)",cursor:g?"not-allowed":"grab",transform:N?"translateX(-50%)":"translateY(-50%)",zIndex:2,transition:C?"none":"left 0.1s, bottom 0.1s",...ar("backgroundColor",O),...N?{left:"50%",bottom:`${E}%`}:{top:"50%",left:`${E}%`},onMouseDown:I,onTouchStart:I,onKeyDown:j,...W==null?void 0:W.thumb,children:f&&(S||C)&&r.jsx(i.View,{position:"absolute",padding:"4px 8px",backgroundColor:"color-black",color:"color-white",borderRadius:"4px",whiteSpace:"nowrap",zIndex:3,...N?{left:"100%",marginLeft:"8px",bottom:"0",transform:"translateY(50%)"}:{bottom:"100%",left:"50%",marginBottom:"8px",transform:"translateX(-50%)"},...W==null?void 0:W.tooltip,children:r.jsx(i.Text,{...(q=W==null?void 0:W.tooltip)==null?void 0:q.text,children:n==null?void 0:n.toFixed(t<1?1:0)})})})]}),y&&r.jsx(Et,{marginTop:8,children:y})]});return N||f?B:oe}),Bf=e=>{const o=xe(e),t=vl({...e,value:o.value!==void 0?Number(o.value):void 0,onChange:n=>{var a;o.onChange(n),(a=e.onChange)==null||a.call(e,n)}});return r.jsx(Ml,{...e,...t,...o})},Wl=e=>{if(e==null)return"";if(typeof e=="string"||typeof e=="number"){const o=String(e);return o==="[object Object]"?"":o}return""},Kt=(e,o)=>{console.log(`[FormikOTPInput] ${e}`,o)},Of=e=>e==null||typeof e=="string"||typeof e=="number"||typeof e=="boolean"?e:Object.prototype.toString.call(e),Nf=e=>{const o=xe(e),t=Wl(o.value).slice(0,e.length||6);Kt("render",{name:e.name,type:e.type,formValue:Of(o.value),displayValue:t,length:e.length||6,hasFormikOnChange:!!o.onChange,hasFormikOnChangeText:!!o.onChangeText});const{isFocused:n,setIsFocused:a,isHovered:l,setIsHovered:c,inputRef:s,containerRef:d,mirrorSelectionStart:g,mirrorSelectionEnd:m,setMirrorSelectionStart:f,setMirrorSelectionEnd:p,setInputRef:u,handleFocus:y,handleBlur:k,handleKeyDown:x,handlePaste:C}=hl(e),S=h.useCallback(v=>{const b=Wl(v).slice(0,e.length||6);Kt("setValue",{name:e.name,incomingValue:v,nextValue:b,hasFormikOnChange:!!o.onChange,hasFormikOnChangeText:!!o.onChangeText}),o.onChange&&o.onChange(b),o.onChangeText&&o.onChangeText(b),e.onComplete&&b.length===(e.length||6)&&e.onComplete(b),s.current&&(s.current.value=b)},[o,e,s]),w=h.useCallback(v=>{var T,j,E;const b=typeof v=="string"?v:((T=v==null?void 0:v.currentTarget)==null?void 0:T.value)??((j=v==null?void 0:v.target)==null?void 0:j.value)??((E=v==null?void 0:v.nativeEvent)==null?void 0:E.text)??"",I=String(b).slice(0,e.length||6);Kt("handleChange normalized",{name:e.name,raw:b,newValue:I}),S(I),s.current&&(s.current.value=I)},[e.length,S,s]);return r.jsx(fl,{...e,...o,value:t,setValue:S,isFocused:n,setIsFocused:a,isHovered:l,setIsHovered:c,inputRef:s,containerRef:d,mirrorSelectionStart:g,mirrorSelectionEnd:m,setMirrorSelectionStart:f,setMirrorSelectionEnd:p,setInputRef:u,handleChange:w,handleFocus:y,handleBlur:k,handleKeyDown:x,handlePaste:C,stepValues:e.stepValues})},qf=e=>Array.isArray(e)?e:e==null?[]:[e],Hl=({name:e,uploadFile:o,onUploadSuccess:t,onUploadError:n,transformResponse:a,onMultipleFileSelect:l,onFileSelect:c,multiple:s=!0,...d})=>{const{setFieldValue:g,setFieldTouched:m,values:f}=Ee.useFormikContext(),[p,u]=h.useState(!1),[y,k]=h.useState(0),x=h.useCallback(async w=>{if(!w||w.length===0)return;m(e,!0,!0),u(!0);const v=[];for(const b of w){k(0);try{const I=await o(b,j=>{k(j??0)}),T=a?a(I,b):I;v.push(T),t==null||t(b,T)}catch(I){n==null||n(b,I)}}if(v.length>0){const b=qf(Ee.getIn(f,e));g(e,[...b,...v],!0),k(100)}else k(0);u(!1)},[e,n,t,m,g,a,o,f]),C=h.useCallback(async w=>{l==null||l(w),await x(w)},[x,l]),S=h.useCallback(async w=>{c==null||c(w),await x([w])},[x,c]);return r.jsx(Tr,{...d,multiple:s,onMultipleFileSelect:s?C:void 0,onFileSelect:s?void 0:S,isLoading:p,progress:y})};Hl.displayName="FormikUploader";const Uf=e=>{let o=xe(e);o.selected=o.value;const t=Aa(e);return r.jsx(Ea,{...t,...o})},jl=e=>{const[o,t]=h.useState(!1),[n,a]=h.useState(e);return{isHovered:o,setIsHovered:t,isToggle:n,setIsToggled:a}},Gf={square:0,rounded:8,pill:999},Yf=(e,o)=>({outline:{backgroundColor:"color-white",color:e,borderWidth:1,borderStyle:"solid",borderColor:"color-gray-200",_hover:{backgroundColor:"color-gray-50",borderColor:"color-gray-300"},_active:{backgroundColor:"color-gray-100"},transition:"background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease"},ghost:{backgroundColor:"transparent",color:e,borderWidth:0,borderStyle:"none",borderColor:"transparent",_hover:{backgroundColor:"color-gray-50"},_active:{backgroundColor:"color-gray-100"},transition:"background-color 0.2s ease, color 0.2s ease"},link:{backgroundColor:"transparent",color:e,borderWidth:1,borderStyle:"solid",borderColor:"transparent",textDecoration:"underline",textUnderlineOffset:"1px",textDecorationThickness:"1px",_hover:{opacity:.8},_active:{opacity:.9},transition:"opacity 0.2s ease"}}),Pl=h.memo(({children:e,shape:o="rounded",variant:t="ghost",isHovered:n,setIsHovered:a,isDisabled:l,isToggle:c,setIsToggled:s,onToggle:d,views:g,backgroundColor:m,color:f,themeMode:p,...u})=>{const{getColor:y,themeMode:k}=i.useTheme(),x=p??k,S=y(l?"theme-disabled":m??f??"theme-primary",{themeMode:x}),v=h.useMemo(()=>Yf(S),[S,x])[t],b=!!c,I=h.useCallback(()=>a(!0),[a]),T=h.useCallback(()=>{l||s(j=>{const E=!j;return d&&d(E),E})},[l,s,d]);return r.jsx(i.Center,{role:"Toggle",padding:o==="pill"?"8px 12px":"8px",width:"fit-content",cursor:l?"not-allowed":"pointer",borderRadius:Gf[o],onClick:T,onMouseEnter:I,onMouseLeave:()=>a(!1),...v,...b&&{...t==="link"?{backgroundColor:"transparent"}:{backgroundColor:"color-blue-50",borderWidth:1,borderStyle:"solid",borderColor:"color-blue-200"},color:S},...u,...g==null?void 0:g.container,children:e})}),Kf=({children:e,shape:o,variant:t,isDisabled:n,isToggled:a=!1,onToggle:l,...c})=>{const s=xe(c),{isHovered:d,setIsHovered:g,isToggle:m,setIsToggled:f}=jl(s.value??a);h.useEffect(()=>{f(s.value??a)},[s.value,a]);const p=u=>{f(u),s.onChange(u),l==null||l(u)};return r.jsx(Pl,{shape:o,variant:t,isDisabled:n,isHovered:d,setIsHovered:g,isToggle:m,setIsToggled:f,onToggle:p,...c,children:e})},Vl=()=>{const[e,o]=h.useState([]);return{activeToggles:e,setActiveToggles:o}},Xt=({children:e,shape:o,variant:t,isDisabled:n,isToggled:a=!1,onToggle:l,...c})=>{const{isHovered:s,setIsHovered:d,isToggle:g,setIsToggled:m}=jl(a);return h.useEffect(()=>{m(a)},[a]),r.jsx(Pl,{shape:o,variant:t,isDisabled:n,isHovered:s,setIsHovered:d,isToggle:g,setIsToggled:m,onToggle:l,...c,children:e})},Al=({items:e,onToggleChange:o,activeToggles:t,setActiveToggles:n,shape:a="rounded",variant:l="ghost",views:c})=>{const s=h.useCallback((d,g)=>{n(m=>{let f;return g?f=m.includes(d)?m:[...m,d]:f=m.filter(p=>p!==d),o==null||o(f),f})},[o,n]);return r.jsx(i.Horizontal,{role:"ToggleGroup",display:"flex",gap:8,flexWrap:"wrap",...c==null?void 0:c.container,children:e.map(d=>r.jsx(Xt,{role:`toggle-${d.id}`,shape:a,variant:l,isToggled:t.includes(d.id)||d.isActive,onToggle:g=>s(d.id,g),isDisabled:d.isDisabled,views:c==null?void 0:c.toggle,children:d.value},d.id))})},Xf=({items:e,shape:o,variant:t,onToggleChange:n,...a})=>{const l=xe(a),{activeToggles:c,setActiveToggles:s}=Vl();h.useEffect(()=>{Array.isArray(l.value)&&s(l.value)},[l.value]);const d=g=>{s(g),l.onChange(g),n==null||n(g)};return r.jsx(Al,{items:e,shape:o,variant:t,activeToggles:c,setActiveToggles:s,onToggleChange:d,...a})},El=["zoom-out","zoom-in","zap","zap-off","youtube","x","wrench","worm","workflow","wine","wine-off","wind","wind-arrow-down","wifi","wifi-zero","wifi-sync","wifi-pen","wifi-off","wifi-low","wifi-high","wifi-cog","whole-word","wheat","wheat-off","weight","weight-tilde","webhook","webhook-off","webcam","waypoints","waves","waves-ladder","waves-arrow-up","waves-arrow-down","watch","washing-machine","warehouse","wand","wand-sparkles","wallpaper","wallet","wallet-minimal","wallet-cards","vote","volume","volume-x","volume-off","volume-2","volume-1","volleyball","voicemail","view","videotape","video","video-off","vibrate","vibrate-off","venus","venus-and-mars","venetian-mask","vegan","vector-square","vault","variable","van","utility-pole","utensils","utensils-crossed","users","users-round","user","user-x","user-star","user-search","user-round","user-round-x","user-round-search","user-round-plus","user-round-pen","user-round-minus","user-round-cog","user-round-check","user-plus","user-pen","user-minus","user-lock","user-cog","user-check","usb","upload","unplug","unlink","unlink-2","university","ungroup","unfold-vertical","unfold-horizontal","undo","undo-dot","undo-2","underline","umbrella","umbrella-off","type","type-outline","twitter","twitch","tv","tv-minimal","tv-minimal-play","turtle","turntable","turkish-lira","truck","truck-electric","trophy","triangle","triangle-right","triangle-dashed","triangle-alert","trending-up","trending-up-down","trending-down","trello","trees","tree-pine","tree-palm","tree-deciduous","trash","trash-2","transgender","tram-front","train-track","train-front","train-front-tunnel","traffic-cone","tractor","toy-brick","tower-control","touchpad","touchpad-off","torus","tornado","toolbox","tool-case","toilet","toggle-right","toggle-left","timer","timer-reset","timer-off","tickets","tickets-plane","ticket","ticket-x","ticket-slash","ticket-plus","ticket-percent","ticket-minus","ticket-check","thumbs-up","thumbs-down","thermometer","thermometer-sun","thermometer-snowflake","theater","text-wrap","text-select","text-search","text-quote","text-initial","text-cursor","text-cursor-input","text-align-start","text-align-justify","text-align-end","text-align-center","test-tubes","test-tube","test-tube-diagonal","terminal","tent","tent-tree","telescope","target","tangent","tally-5","tally-4","tally-3","tally-2","tally-1","tags","tag","tablets","tablet","tablet-smartphone","table","table-rows-split","table-properties","table-of-contents","table-columns-split","table-cells-split","table-cells-merge","table-2","syringe","swords","sword","switch-camera","swiss-franc","swatch-book","superscript","sunset","sunrise","sun","sun-snow","sun-moon","sun-medium","sun-dim","subscript","strikethrough","stretch-vertical","stretch-horizontal","store","stone","sticky-note","sticker","stethoscope","step-forward","step-back","star","star-off","star-half","stamp","squirrel","squircle","squircle-dashed","squares-unite","squares-subtract","squares-intersect","squares-exclude","square","square-x","square-user","square-user-round","square-terminal","square-stop","square-star","square-stack","square-square","square-split-vertical","square-split-horizontal","square-slash","square-sigma","square-scissors","square-round-corner","square-radical","square-power","square-plus","square-play","square-pilcrow","square-pi","square-percent","square-pen","square-pause","square-parking","square-parking-off","square-mouse-pointer","square-minus","square-menu","square-m","square-library","square-kanban","square-function","square-equal","square-dot","square-divide","square-dashed","square-dashed-top-solid","square-dashed-mouse-pointer","square-dashed-kanban","square-dashed-bottom","square-dashed-bottom-code","square-code","square-chevron-up","square-chevron-right","square-chevron-left","square-chevron-down","square-check","square-check-big","square-chart-gantt","square-bottom-dashed-scissors","square-asterisk","square-arrow-up","square-arrow-up-right","square-arrow-up-left","square-arrow-right","square-arrow-out-up-right","square-arrow-out-up-left","square-arrow-out-down-right","square-arrow-out-down-left","square-arrow-left","square-arrow-down","square-arrow-down-right","square-arrow-down-left","square-activity","sprout","spray-can","spotlight","spool","split","spline","spline-pointer","spell-check","spell-check-2","speech","speaker","sparkles","sparkle","spade","space","soup","solar-panel","sofa","soap-dispenser-droplet","snowflake","snail","smile","smile-plus","smartphone","smartphone-nfc","smartphone-charging","sliders-vertical","sliders-horizontal","slice","slash","slack","skull","skip-forward","skip-back","siren","signpost","signpost-big","signature","signal","signal-zero","signal-medium","signal-low","signal-high","sigma","shuffle","shrub","shrink","shrimp","shredder","shower-head","shovel","shopping-cart","shopping-basket","shopping-bag","shirt","ship","ship-wheel","shield","shield-x","shield-user","shield-question-mark","shield-plus","shield-off","shield-minus","shield-half","shield-ellipsis","shield-check","shield-ban","shield-alert","shell","sheet","share","share-2","shapes","settings","settings-2","server","server-off","server-crash","server-cog","separator-vertical","separator-horizontal","send","send-to-back","send-horizontal","section","search","search-x","search-slash","search-code","search-check","search-alert","scroll","scroll-text","screen-share","screen-share-off","scooter","scissors","scissors-line-dashed","school","scan","scan-text","scan-search","scan-qr-code","scan-line","scan-heart","scan-face","scan-eye","scan-barcode","scaling","scale","scale-3d","save","save-off","save-all","saudi-riyal","satellite","satellite-dish","sandwich","salad","sailboat","russian-ruble","ruler","ruler-dimension-line","rss","rows-4","rows-3","rows-2","router","route","route-off","rotate-cw","rotate-cw-square","rotate-ccw","rotate-ccw-square","rotate-ccw-key","rotate-3d","rose","roller-coaster","rocking-chair","rocket","ribbon","rewind","reply","reply-all","replace","replace-all","repeat","repeat-2","repeat-1","remove-formatting","regex","refrigerator","refresh-cw","refresh-cw-off","refresh-ccw","refresh-ccw-dot","redo","redo-dot","redo-2","recycle","rectangle-vertical","rectangle-horizontal","rectangle-goggles","rectangle-ellipsis","rectangle-circle","receipt","receipt-turkish-lira","receipt-text","receipt-swiss-franc","receipt-russian-ruble","receipt-pound-sterling","receipt-japanese-yen","receipt-indian-rupee","receipt-euro","receipt-cent","ratio","rat","rainbow","rail-symbol","radius","radio","radio-tower","radio-receiver","radical","radiation","radar","rabbit","quote","qr-code","pyramid","puzzle","proportions","projector","printer","printer-check","presentation","power","power-off","pound-sterling","popsicle","popcorn","pointer","pointer-off","podcast","pocket","pocket-knife","plus","plug","plug-zap","plug-2","play","plane","plane-takeoff","plane-landing","pizza","pipette","pin","pin-off","pill","pill-bottle","pilcrow","pilcrow-right","pilcrow-left","piggy-bank","picture-in-picture","picture-in-picture-2","pickaxe","piano","pi","phone","phone-outgoing","phone-off","phone-missed","phone-incoming","phone-forwarded","phone-call","philippine-peso","person-standing","percent","pentagon","pencil","pencil-ruler","pencil-off","pencil-line","pen","pen-tool","pen-off","pen-line","pc-case","paw-print","pause","party-popper","parking-meter","parentheses","paperclip","panels-top-left","panels-right-bottom","panels-left-bottom","panel-top","panel-top-open","panel-top-dashed","panel-top-close","panel-top-bottom-dashed","panel-right","panel-right-open","panel-right-dashed","panel-right-close","panel-left","panel-left-right-dashed","panel-left-open","panel-left-dashed","panel-left-close","panel-bottom","panel-bottom-open","panel-bottom-dashed","panel-bottom-close","panda","palette","paintbrush","paintbrush-vertical","paint-roller","paint-bucket","package","package-x","package-search","package-plus","package-open","package-minus","package-check","package-2","origami","orbit","option","omega","octagon","octagon-x","octagon-pause","octagon-minus","octagon-alert","nut","nut-off","notepad-text","notepad-text-dashed","notebook","notebook-text","notebook-tabs","notebook-pen","non-binary","nfc","newspaper","network","navigation","navigation-off","navigation-2","navigation-2-off","music","music-4","music-3","music-2","move","move-vertical","move-up","move-up-right","move-up-left","move-right","move-left","move-horizontal","move-down","move-down-right","move-down-left","move-diagonal","move-diagonal-2","move-3d","mouse","mouse-pointer","mouse-pointer-click","mouse-pointer-ban","mouse-pointer-2","mouse-pointer-2-off","mouse-off","mountain","mountain-snow","motorbike","moon","moon-star","monitor","monitor-x","monitor-up","monitor-stop","monitor-speaker","monitor-smartphone","monitor-play","monitor-pause","monitor-off","monitor-down","monitor-dot","monitor-cog","monitor-cloud","monitor-check","minus","minimize","minimize-2","milk","milk-off","milestone","microwave","microscope","microchip","mic","mic-vocal","mic-off","messages-square","message-square","message-square-x","message-square-warning","message-square-text","message-square-share","message-square-reply","message-square-quote","message-square-plus","message-square-off","message-square-more","message-square-lock","message-square-heart","message-square-dot","message-square-diff","message-square-dashed","message-square-code","message-circle","message-circle-x","message-circle-warning","message-circle-reply","message-circle-question-mark","message-circle-plus","message-circle-off","message-circle-more","message-circle-heart","message-circle-dashed","message-circle-code","merge","menu","memory-stick","meh","megaphone","megaphone-off","medal","maximize","maximize-2","martini","mars","mars-stroke","map","map-plus","map-pinned","map-pin","map-pin-x","map-pin-x-inside","map-pin-plus","map-pin-plus-inside","map-pin-pen","map-pin-off","map-pin-minus","map-pin-minus-inside","map-pin-house","map-pin-check","map-pin-check-inside","map-minus","mails","mailbox","mail","mail-x","mail-warning","mail-search","mail-question-mark","mail-plus","mail-open","mail-minus","mail-check","magnet","luggage","lollipop","logs","log-out","log-in","lock","lock-open","lock-keyhole","lock-keyhole-open","locate","locate-off","locate-fixed","loader","loader-pinwheel","loader-circle","list","list-x","list-video","list-tree","list-todo","list-start","list-restart","list-plus","list-ordered","list-music","list-minus","list-indent-increase","list-indent-decrease","list-filter","list-filter-plus","list-end","list-collapse","list-chevrons-up-down","list-chevrons-down-up","list-checks","list-check","linkedin","link","link-2","link-2-off","line-squiggle","lightbulb","lightbulb-off","ligature","life-buoy","library","library-big","lectern","leafy-green","leaf","layout-template","layout-panel-top","layout-panel-left","layout-list","layout-grid","layout-dashboard","layers","layers-plus","layers-2","laugh","lasso","lasso-select","laptop","laptop-minimal","laptop-minimal-check","languages","landmark","land-plot","lamp","lamp-wall-up","lamp-wall-down","lamp-floor","lamp-desk","lamp-ceiling","keyboard","keyboard-off","keyboard-music","key","key-square","key-round","kayak","kanban","joystick","japanese-yen","iteration-cw","iteration-ccw","italic","instagram","inspection-panel","info","infinity","indian-rupee","inbox","import","images","image","image-upscale","image-up","image-plus","image-play","image-off","image-minus","image-down","id-card","id-card-lanyard","ice-cream-cone","ice-cream-bowl","house","house-wifi","house-plus","house-plug","house-heart","hourglass","hotel","hospital","hop","hop-off","history","highlighter","hexagon","helicopter","heater","heart","heart-pulse","heart-plus","heart-off","heart-minus","heart-handshake","heart-crack","headset","headphones","headphone-off","heading","heading-6","heading-5","heading-4","heading-3","heading-2","heading-1","hdmi-port","hd","haze","hat-glasses","hash","hard-hat","hard-drive","hard-drive-upload","hard-drive-download","handshake","handbag","hand","hand-platter","hand-metal","hand-helping","hand-heart","hand-grab","hand-fist","hand-coins","hammer","hamburger","ham","guitar","group","grip","grip-vertical","grip-horizontal","grid-3x3","grid-3x2","grid-2x2","grid-2x2-x","grid-2x2-plus","grid-2x2-check","grape","graduation-cap","gpu","goal","globe","globe-lock","glasses","glass-water","gitlab","github","git-pull-request","git-pull-request-draft","git-pull-request-create","git-pull-request-create-arrow","git-pull-request-closed","git-pull-request-arrow","git-merge","git-graph","git-fork","git-compare","git-compare-arrows","git-commit-vertical","git-commit-horizontal","git-branch","git-branch-plus","git-branch-minus","gift","ghost","georgian-lari","gem","gavel","gauge","gamepad","gamepad-directional","gamepad-2","gallery-vertical","gallery-vertical-end","gallery-thumbnails","gallery-horizontal","gallery-horizontal-end","funnel","funnel-x","funnel-plus","fullscreen","fuel","frown","framer","frame","forward","form","forklift","footprints","folders","folder","folder-x","folder-up","folder-tree","folder-sync","folder-symlink","folder-search","folder-search-2","folder-root","folder-plus","folder-pen","folder-output","folder-open","folder-open-dot","folder-minus","folder-lock","folder-key","folder-kanban","folder-input","folder-heart","folder-git","folder-git-2","folder-down","folder-dot","folder-cog","folder-code","folder-closed","folder-clock","folder-check","folder-archive","fold-vertical","fold-horizontal","focus","flower","flower-2","flip-vertical","flip-vertical-2","flip-horizontal","flip-horizontal-2","flask-round","flask-conical","flask-conical-off","flashlight","flashlight-off","flame","flame-kindling","flag","flag-triangle-right","flag-triangle-left","flag-off","fishing-hook","fish","fish-symbol","fish-off","fire-extinguisher","fingerprint-pattern","film","files","file","file-x","file-x-corner","file-volume","file-video-camera","file-user","file-up","file-type","file-type-corner","file-text","file-terminal","file-symlink","file-stack","file-spreadsheet","file-sliders","file-signal","file-search","file-search-corner","file-scan","file-question-mark","file-plus","file-plus-corner","file-play","file-pen","file-pen-line","file-output","file-music","file-minus","file-minus-corner","file-lock","file-key","file-input","file-image","file-heart","file-headphone","file-exclamation-point","file-down","file-digit","file-diff","file-cog","file-code","file-code-corner","file-clock","file-check","file-check-corner","file-chart-pie","file-chart-line","file-chart-column","file-chart-column-increasing","file-braces","file-braces-corner","file-box","file-badge","file-axis-3d","file-archive","figma","ferris-wheel","fence","feather","fast-forward","fan","factory","facebook","eye","eye-off","eye-closed","external-link","expand","ev-charger","euro","ethernet-port","eraser","equal","equal-not","equal-approximately","ellipsis","ellipsis-vertical","egg","egg-off","egg-fried","eclipse","earth","earth-lock","ear","ear-off","dumbbell","drumstick","drum","droplets","droplet","droplet-off","drone","drill","dribbble","drama","drafting-compass","download","dot","door-open","door-closed","door-closed-locked","donut","dollar-sign","dog","dock","dna","dna-off","divide","disc","disc-album","disc-3","disc-2","diff","dices","dice-6","dice-5","dice-4","dice-3","dice-2","dice-1","diamond","diamond-plus","diamond-percent","diamond-minus","diameter","dessert","delete","decimals-arrow-right","decimals-arrow-left","database","database-zap","database-backup","dam","cylinder","currency","cup-soda","cuboid","crown","crosshair","cross","crop","croissant","credit-card","creative-commons","cpu","corner-up-right","corner-up-left","corner-right-up","corner-right-down","corner-left-up","corner-left-down","corner-down-right","corner-down-left","copyright","copyleft","copy","copy-x","copy-slash","copy-plus","copy-minus","copy-check","cooking-pot","cookie","contrast","container","contact","contact-round","construction","cone","concierge-bell","computer","component","compass","command","combine","columns-4","columns-3","columns-3-cog","columns-2","coins","cog","coffee","codesandbox","codepen","code","code-xml","club","clover","cloudy","cloud","cloud-upload","cloud-sync","cloud-sun","cloud-sun-rain","cloud-snow","cloud-rain","cloud-rain-wind","cloud-off","cloud-moon","cloud-moon-rain","cloud-lightning","cloud-hail","cloud-fog","cloud-drizzle","cloud-download","cloud-cog","cloud-check","cloud-backup","cloud-alert","closed-caption","clock","clock-plus","clock-fading","clock-check","clock-arrow-up","clock-arrow-down","clock-alert","clock-9","clock-8","clock-7","clock-6","clock-5","clock-4","clock-3","clock-2","clock-12","clock-11","clock-10","clock-1","clipboard","clipboard-x","clipboard-type","clipboard-plus","clipboard-pen","clipboard-pen-line","clipboard-paste","clipboard-minus","clipboard-list","clipboard-copy","clipboard-clock","clipboard-check","clapperboard","citrus","circuit-board","circle","circle-x","circle-user","circle-user-round","circle-stop","circle-star","circle-small","circle-slash","circle-slash-2","circle-question-mark","circle-power","circle-pound-sterling","circle-plus","circle-play","circle-pile","circle-percent","circle-pause","circle-parking","circle-parking-off","circle-off","circle-minus","circle-gauge","circle-fading-plus","circle-fading-arrow-up","circle-equal","circle-ellipsis","circle-dot","circle-dot-dashed","circle-dollar-sign","circle-divide","circle-dashed","circle-chevron-up","circle-chevron-right","circle-chevron-left","circle-chevron-down","circle-check","circle-check-big","circle-arrow-up","circle-arrow-right","circle-arrow-out-up-right","circle-arrow-out-up-left","circle-arrow-out-down-right","circle-arrow-out-down-left","circle-arrow-left","circle-arrow-down","circle-alert","cigarette","cigarette-off","church","chromium","chevrons-up","chevrons-up-down","chevrons-right","chevrons-right-left","chevrons-left","chevrons-left-right","chevrons-left-right-ellipsis","chevrons-down","chevrons-down-up","chevron-up","chevron-right","chevron-left","chevron-last","chevron-first","chevron-down","chess-rook","chess-queen","chess-pawn","chess-knight","chess-king","chess-bishop","cherry","chef-hat","check","check-line","check-check","chart-spline","chart-scatter","chart-pie","chart-no-axes-gantt","chart-no-axes-combined","chart-no-axes-column","chart-no-axes-column-increasing","chart-no-axes-column-decreasing","chart-network","chart-line","chart-gantt","chart-column","chart-column-stacked","chart-column-increasing","chart-column-decreasing","chart-column-big","chart-candlestick","chart-bar","chart-bar-stacked","chart-bar-increasing","chart-bar-decreasing","chart-bar-big","chart-area","cctv","cat","castle","cast","cassette-tape","case-upper","case-sensitive","case-lower","carrot","card-sim","caravan","car","car-taxi-front","car-front","captions","captions-off","cannabis","cannabis-off","candy","candy-off","candy-cane","camera","camera-off","calendars","calendar","calendar-x","calendar-x-2","calendar-sync","calendar-search","calendar-range","calendar-plus","calendar-plus-2","calendar-off","calendar-minus","calendar-minus-2","calendar-heart","calendar-fold","calendar-days","calendar-cog","calendar-clock","calendar-check","calendar-check-2","calendar-arrow-up","calendar-arrow-down","calendar-1","calculator","cake","cake-slice","cable","cable-car","bus","bus-front","building","building-2","bug","bug-play","bug-off","bubbles","brush","brush-cleaning","bring-to-front","briefcase","briefcase-medical","briefcase-conveyor-belt","briefcase-business","brick-wall","brick-wall-shield","brick-wall-fire","brain","brain-cog","brain-circuit","brackets","braces","boxes","box","bow-arrow","bottle-wine","bot","bot-off","bot-message-square","boom-box","bookmark","bookmark-x","bookmark-plus","bookmark-minus","bookmark-check","book","book-x","book-user","book-up","book-up-2","book-type","book-text","book-search","book-plus","book-open","book-open-text","book-open-check","book-minus","book-marked","book-lock","book-key","book-image","book-heart","book-headphones","book-down","book-dashed","book-copy","book-check","book-audio","book-alert","book-a","bone","bomb","bolt","bold","bluetooth","bluetooth-searching","bluetooth-off","bluetooth-connected","blocks","blinds","blend","bitcoin","birdhouse","bird","biohazard","binoculars","binary","bike","biceps-flexed","between-vertical-start","between-vertical-end","between-horizontal-start","between-horizontal-end","bell","bell-ring","bell-plus","bell-off","bell-minus","bell-electric","bell-dot","beer","beer-off","beef","bed","bed-single","bed-double","bean","bean-off","beaker","battery","battery-warning","battery-plus","battery-medium","battery-low","battery-full","battery-charging","bath","baseline","barrel","barcode","banknote","banknote-x","banknote-arrow-up","banknote-arrow-down","bandage","banana","ban","balloon","baggage-claim","badge","badge-x","badge-turkish-lira","badge-swiss-franc","badge-russian-ruble","badge-question-mark","badge-pound-sterling","badge-plus","badge-percent","badge-minus","badge-japanese-yen","badge-info","badge-indian-rupee","badge-euro","badge-dollar-sign","badge-check","badge-cent","badge-alert","backpack","baby","axis-3d","axe","award","audio-waveform","audio-lines","atom","at-sign","asterisk","arrows-up-from-line","arrow-up","arrow-up-z-a","arrow-up-wide-narrow","arrow-up-to-line","arrow-up-right","arrow-up-narrow-wide","arrow-up-left","arrow-up-from-line","arrow-up-from-dot","arrow-up-down","arrow-up-a-z","arrow-up-1-0","arrow-up-0-1","arrow-right","arrow-right-to-line","arrow-right-left","arrow-right-from-line","arrow-left","arrow-left-to-line","arrow-left-right","arrow-left-from-line","arrow-down","arrow-down-z-a","arrow-down-wide-narrow","arrow-down-up","arrow-down-to-line","arrow-down-to-dot","arrow-down-right","arrow-down-narrow-wide","arrow-down-left","arrow-down-from-line","arrow-down-a-z","arrow-down-1-0","arrow-down-0-1","arrow-big-up","arrow-big-up-dash","arrow-big-right","arrow-big-right-dash","arrow-big-left","arrow-big-left-dash","arrow-big-down","arrow-big-down-dash","armchair","archive","archive-x","archive-restore","apple","app-window","app-window-mac","aperture","anvil","antenna","annoyed","angry","anchor","amphora","ampersands","ampersand","ambulance","align-vertical-space-between","align-vertical-space-around","align-vertical-justify-start","align-vertical-justify-end","align-vertical-justify-center","align-vertical-distribute-start","align-vertical-distribute-end","align-vertical-distribute-center","align-start-vertical","align-start-horizontal","align-horizontal-space-between","align-horizontal-space-around","align-horizontal-justify-start","align-horizontal-justify-end","align-horizontal-justify-center","align-horizontal-distribute-start","align-horizontal-distribute-end","align-horizontal-distribute-center","align-end-vertical","align-end-horizontal","align-center-vertical","align-center-horizontal","album","alarm-smoke","alarm-clock","alarm-clock-plus","alarm-clock-off","alarm-clock-minus","alarm-clock-check","airplay","air-vent","activity","accessibility","a-large-small","a-arrow-up","a-arrow-down"],Dl=e=>{const{value:o,defaultValue:t,onChange:n,isOpen:a,onOpen:l,onClose:c,closeOnSelect:s=!0}=e,[d,g]=h.useState(a??!1),[m,f]=h.useState(o??t),[p,u]=h.useState(""),y=h.useRef(null),k=h.useRef(null);h.useEffect(()=>{o!==void 0&&f(o)},[o]),h.useEffect(()=>{a!==void 0&&g(a)},[a]);const x=h.useMemo(()=>p?El.filter(b=>b.toLowerCase().includes(p.toLowerCase())).slice(0,100):El.slice(0,100),[p]);h.useEffect(()=>{const b=I=>{d&&y.current&&k.current&&!y.current.contains(I.target)&&!k.current.contains(I.target)&&C()};if(!(typeof document>"u"))return document.addEventListener("mousedown",b),()=>document.removeEventListener("mousedown",b)},[d]);const C=h.useCallback(()=>{a===void 0&&g(!1),c&&c()},[c,a]),S=h.useCallback(()=>{const b=!d;a===void 0&&g(b),b?(l&&l(),u("")):c&&c()},[d,l,c,a]),w=h.useCallback(b=>{o===void 0&&f(b),n&&n(b),s&&C()},[n,s,C,o]),v=h.useCallback(b=>{u(b)},[]);return{isOpen:d,selectedIcon:m,searchQuery:p,filteredIcons:x,handleToggle:S,handleIconSelect:w,handleSearchChange:v,handleClose:C,triggerRef:y,dropdownRef:k}},Ao={container:{position:"relative",display:"inline-block",width:"100%"},trigger:{display:"flex",alignItems:"center",justifyContent:"space-between",cursor:"pointer",transition:"all 0.2s ease-in-out"},dropdown:{position:"absolute",mixBlendMode:"normal",top:"calc(100% + 4px)",left:0,right:0,zIndex:1e3,backgroundColor:"color-white",borderRadius:12,borderWidth:"1px",borderStyle:"solid",borderColor:"color-gray-200",boxShadow:"0 4px 12px rgba(0, 0, 0, 0.1)",padding:"16px",minWidth:"280px",maxHeight:"320px",overflow:"hidden",display:"flex",flexDirection:"column"},searchInput:{marginBottom:"12px",flexShrink:0},iconGrid:{display:"grid",gridTemplateColumns:"repeat(6, 1fr)",flexDirection:"row",flexWrap:"wrap",justifyContent:"flex-start",gap:"8px",overflowY:"auto",padding:"4px",color:"color-black",flexGrow:1},iconItem:{width:"32px",height:"32px",display:"flex",alignItems:"center",justifyContent:"center",cursor:"pointer",borderRadius:8,transition:"all 0.2s ease-in-out"}},Jf={xs:{height:"28px",fontSize:"12px",padding:"4px 8px"},sm:{height:"32px",fontSize:"12px",padding:"6px 10px"},md:{height:"40px",fontSize:"14px",padding:"8px 12px"},lg:{height:"48px",fontSize:"14px",padding:"10px 14px"},xl:{height:"56px",fontSize:"16px",padding:"12px 16px"}},Qf={default:{borderRadius:8},square:{borderRadius:0},rounded:{borderRadius:8},pill:{borderRadius:9999}},Zf={default:{backgroundColor:"color-white",borderWidth:"1px",borderStyle:"solid",borderColor:"color-gray-200",color:"color-gray-800"},outline:{backgroundColor:"transparent",borderWidth:"1px",borderStyle:"solid",borderColor:"color-gray-200",color:"color-gray-800"},filled:{backgroundColor:"color-gray-50",borderWidth:"1px",borderStyle:"solid",borderColor:"color-gray-200",color:"color-gray-800"}},$l=({label:e,placeholder:o="Select an icon",helperText:t,views:n={},size:a="md",shape:l="default",variant:c="default",error:s=!1,isDisabled:d=!1,isReadOnly:g=!1,showSearch:m=!0,isOpen:f,selectedIcon:p,searchQuery:u,filteredIcons:y,handleToggle:k,handleIconSelect:x,handleSearchChange:C,triggerRef:S,dropdownRef:w,handleClose:v,onChange:b,value:I,defaultValue:T,onOpen:j,onClose:E,closeOnSelect:D,...W})=>{const{getColor:A}=i.useTheme(),H={...Ao.container,...n==null?void 0:n.container},z={...Ao.trigger,...Jf[a],...Qf[l],...Zf[c],...s&&{borderColor:"color-red-500"},...d&&{opacity:.6,cursor:"not-allowed"},...!d&&!g&&{_hover:{borderColor:"color-gray-300"}},...n==null?void 0:n.trigger},P={...Ao.dropdown,...n==null?void 0:n.dropdown},V={...Ao.iconGrid,...n==null?void 0:n.iconGrid};return r.jsxs(i.View,{...H,...W,children:[e&&r.jsx(i.Text,{fontSize:a==="xs"?"12px":a==="sm"?"14px":"16px",fontWeight:"500",color:"color-gray-700",marginBottom:"4px",...n==null?void 0:n.label,children:e}),r.jsxs(i.View,{ref:S,onClick:d||g?void 0:k,...z,children:[r.jsx(i.Horizontal,{alignItems:"center",gap:8,width:"100%",children:p?r.jsxs(i.Horizontal,{alignItems:"center",gap:8,width:"100%",children:[r.jsx(xr,{name:p,widthHeight:16}),r.jsx(i.Text,{color:"color-gray-800",fontSize:"inherit",style:{flex:1,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:p})]}):r.jsx(i.Text,{color:"color-gray-500",fontSize:"inherit",children:o})}),!g&&!d&&r.jsx(he,{widthHeight:16,color:"color-gray-500",orientation:f?"up":"down"})]}),f&&r.jsxs(i.View,{ref:w,...P,children:[m&&r.jsx(i.View,{...Ao.searchInput,...n==null?void 0:n.searchInput,children:r.jsx(je,{placeholder:"Search icons...",value:u,onChange:M=>C(M),size:"sm",autoFocus:!0})}),r.jsx(i.View,{...V,children:y.length>0?y.map(M=>r.jsx(i.View,{...Ao.iconItem,onClick:()=>x(M),title:M,_hover:{backgroundColor:"color-gray-50",transform:"scale(1.05)"},backgroundColor:p===M?"#EFF6FF":"transparent",borderWidth:p===M?"1px":"0px",borderStyle:"solid",borderColor:p===M?"#BFDBFE":"transparent",...n==null?void 0:n.iconItem,children:r.jsx(xr,{name:M,widthHeight:20})},M)):r.jsx(i.View,{gridColumn:"1 / -1",padding:"20px",textAlign:"center",color:"color-gray-500",children:r.jsx(i.Text,{fontSize:"14px",children:"No icons found"})})})]}),t&&r.jsx(i.Text,{color:s?"color-red-500":"color-gray-600",marginTop:"4px",...n==null?void 0:n.helperText,children:t})]})},Rf=e=>{const o=xe(e),t={...e,value:o.value??e.value??e.defaultValue},n=Dl(t),a=l=>{n.handleIconSelect(l),o.onChange(l)};return r.jsx($l,{...n,...t,handleIconSelect:a})},to={container:{position:"relative",display:"inline-block",width:"100%"},trigger:{display:"flex",alignItems:"center",justifyContent:"space-between",cursor:"pointer",transition:"all 0.2s ease-in-out"},dropdown:{position:"absolute",mixBlendMode:"normal",top:"calc(100% + 4px)",left:0,right:0,zIndex:1e3,backgroundColor:"color-white",borderRadius:12,borderWidth:"1px",borderStyle:"solid",borderColor:"color-gray-200",boxShadow:"0 4px 12px rgba(0, 0, 0, 0.1)",padding:"16px",minWidth:"320px",maxHeight:"400px",overflow:"hidden"},searchInput:{marginBottom:"12px"},categoryTabs:{display:"flex",flexDirection:"row",flexWrap:"wrap",borderBottom:"1px solid color-gray-100",marginBottom:"12px",overflowX:"auto"},categoryTab:{padding:"8px 12px",cursor:"pointer",borderBottom:"2px solid transparent",transition:"all 0.2s ease-in-out",fontSize:"14px",fontWeight:"500",color:"color-gray-600",whiteSpace:"nowrap",borderRadius:"8px 8px 0 0"},emojiGrid:{display:"grid",gridTemplateColumns:"repeat(8, 1fr)",flexDirection:"row",flexWrap:"wrap",justifyContent:"flex-start",gap:"4px",maxHeight:"240px",overflowY:"auto",padding:"4px",color:"color-black"},emoji:{width:"32px",height:"32px",display:"flex",alignItems:"center",justifyContent:"center",cursor:"pointer",borderRadius:6,fontSize:"20px",transition:"all 0.2s ease-in-out"}},em={xs:{height:"28px",fontSize:"12px",padding:"4px 8px"},sm:{height:"32px",fontSize:"12px",padding:"6px 10px"},md:{height:"40px",fontSize:"14px",padding:"8px 12px"},lg:{height:"48px",fontSize:"14px",padding:"10px 14px"},xl:{height:"56px",fontSize:"16px",padding:"12px 16px"}},om={default:{borderRadius:8},square:{borderRadius:0},rounded:{borderRadius:8},pill:{borderRadius:9999}},rm={default:{backgroundColor:"color-white",borderWidth:"1px",borderStyle:"solid",borderColor:"color-gray-200",color:"color-gray-800"},outline:{backgroundColor:"transparent",borderWidth:"1px",borderStyle:"solid",borderColor:"color-gray-200",color:"color-gray-800"},filled:{backgroundColor:"color-gray-50",borderWidth:"1px",borderStyle:"solid",borderColor:"color-gray-200",color:"color-gray-800"}},tm={recent:"🕒",smileys:"😀",people:"👤",animals:"🐶",food:"🍎",activities:"⚽",travel:"🚗",objects:"💡",symbols:"❤️",flags:"🏁"},nm=[{emoji:"😀",name:"grinning face",category:"smileys",keywords:["happy","smile","grin"]},{emoji:"😃",name:"grinning face with big eyes",category:"smileys",keywords:["happy","smile","joy"]},{emoji:"😄",name:"grinning face with smiling eyes",category:"smileys",keywords:["happy","smile","joy"]},{emoji:"😁",name:"beaming face with smiling eyes",category:"smileys",keywords:["happy","smile","grin"]},{emoji:"😆",name:"grinning squinting face",category:"smileys",keywords:["happy","laugh","smile"]},{emoji:"😅",name:"grinning face with sweat",category:"smileys",keywords:["happy","sweat","relief"]},{emoji:"🤣",name:"rolling on the floor laughing",category:"smileys",keywords:["laugh","funny","rofl"]},{emoji:"😂",name:"face with tears of joy",category:"smileys",keywords:["laugh","cry","joy"]},{emoji:"🙂",name:"slightly smiling face",category:"smileys",keywords:["smile","happy"]},{emoji:"🙃",name:"upside-down face",category:"smileys",keywords:["silly","upside down"]},{emoji:"😉",name:"winking face",category:"smileys",keywords:["wink","flirt"]},{emoji:"😊",name:"smiling face with smiling eyes",category:"smileys",keywords:["happy","smile","blush"]},{emoji:"😇",name:"smiling face with halo",category:"smileys",keywords:["angel","innocent"]},{emoji:"🥰",name:"smiling face with hearts",category:"smileys",keywords:["love","hearts","adore"]},{emoji:"😍",name:"smiling face with heart-eyes",category:"smileys",keywords:["love","heart","eyes"]},{emoji:"🤩",name:"star-struck",category:"smileys",keywords:["star","struck","amazed"]},{emoji:"😘",name:"face blowing a kiss",category:"smileys",keywords:["kiss","love","flirt"]},{emoji:"😗",name:"kissing face",category:"smileys",keywords:["kiss","love"]},{emoji:"☺️",name:"smiling face",category:"smileys",keywords:["smile","happy","content"]},{emoji:"😚",name:"kissing face with closed eyes",category:"smileys",keywords:["kiss","love","closed eyes"]},{emoji:"😙",name:"kissing face with smiling eyes",category:"smileys",keywords:["kiss","love","smile"]},{emoji:"🥲",name:"smiling face with tear",category:"smileys",keywords:["happy","cry","tear","bittersweet"]},{emoji:"😋",name:"face savoring food",category:"smileys",keywords:["yum","delicious","food"]},{emoji:"😛",name:"face with tongue",category:"smileys",keywords:["tongue","silly","playful"]},{emoji:"😜",name:"winking face with tongue",category:"smileys",keywords:["wink","tongue","silly"]},{emoji:"🤪",name:"zany face",category:"smileys",keywords:["crazy","silly","wild"]},{emoji:"😝",name:"squinting face with tongue",category:"smileys",keywords:["tongue","silly","playful"]},{emoji:"🤑",name:"money-mouth face",category:"smileys",keywords:["money","rich","greedy"]},{emoji:"🤗",name:"hugging face",category:"smileys",keywords:["hug","love","care"]},{emoji:"🤭",name:"face with hand over mouth",category:"smileys",keywords:["oops","secret","quiet"]},{emoji:"🫢",name:"face with open eyes and hand over mouth",category:"smileys",keywords:["surprise","shock","oops"]},{emoji:"🫣",name:"face with peeking eye",category:"smileys",keywords:["peek","shy","embarrassed"]},{emoji:"🤫",name:"shushing face",category:"smileys",keywords:["quiet","secret","shh"]},{emoji:"🤔",name:"thinking face",category:"smileys",keywords:["think","consider","hmm"]},{emoji:"🫡",name:"saluting face",category:"smileys",keywords:["salute","respect","military"]},{emoji:"🤐",name:"zipper-mouth face",category:"smileys",keywords:["quiet","secret","zip"]},{emoji:"🤨",name:"face with raised eyebrow",category:"smileys",keywords:["suspicious","doubt","skeptical"]},{emoji:"😐",name:"neutral face",category:"smileys",keywords:["neutral","meh","blank"]},{emoji:"😑",name:"expressionless face",category:"smileys",keywords:["blank","deadpan","meh"]},{emoji:"😶",name:"face without mouth",category:"smileys",keywords:["quiet","speechless","silent"]},{emoji:"🫥",name:"dotted line face",category:"smileys",keywords:["invisible","depressed","disappear"]},{emoji:"😏",name:"smirking face",category:"smileys",keywords:["smirk","smug","confident"]},{emoji:"😒",name:"unamused face",category:"smileys",keywords:["unamused","bored","annoyed"]},{emoji:"🙄",name:"face with rolling eyes",category:"smileys",keywords:["eye roll","annoyed","whatever"]},{emoji:"😬",name:"grimacing face",category:"smileys",keywords:["grimace","awkward","oops"]},{emoji:"😮‍💨",name:"face exhaling",category:"smileys",keywords:["sigh","relief","tired"]},{emoji:"🤥",name:"lying face",category:"smileys",keywords:["lie","pinocchio","dishonest"]},{emoji:"😌",name:"relieved face",category:"smileys",keywords:["relief","calm","peaceful"]},{emoji:"😔",name:"pensive face",category:"smileys",keywords:["sad","thoughtful","pensive"]},{emoji:"😪",name:"sleepy face",category:"smileys",keywords:["sleepy","tired","drowsy"]},{emoji:"🤤",name:"drooling face",category:"smileys",keywords:["drool","desire","sleep"]},{emoji:"😴",name:"sleeping face",category:"smileys",keywords:["sleep","tired","zzz"]},{emoji:"😷",name:"face with medical mask",category:"smileys",keywords:["mask","sick","doctor"]},{emoji:"🤒",name:"face with thermometer",category:"smileys",keywords:["sick","fever","ill"]},{emoji:"🤕",name:"face with head-bandage",category:"smileys",keywords:["hurt","injured","bandage"]},{emoji:"🤢",name:"nauseated face",category:"smileys",keywords:["sick","nausea","disgusted"]},{emoji:"🤮",name:"face vomiting",category:"smileys",keywords:["vomit","sick","disgusted"]},{emoji:"🤧",name:"sneezing face",category:"smileys",keywords:["sneeze","sick","gesundheit"]},{emoji:"🥵",name:"hot face",category:"smileys",keywords:["hot","heat","sweat"]},{emoji:"🥶",name:"cold face",category:"smileys",keywords:["cold","freeze","blue"]},{emoji:"🥴",name:"woozy face",category:"smileys",keywords:["dizzy","drunk","confused"]},{emoji:"😵",name:"dizzy face",category:"smileys",keywords:["dizzy","confused","knocked out"]},{emoji:"😵‍💫",name:"face with spiral eyes",category:"smileys",keywords:["dizzy","hypnotized","confused"]},{emoji:"🤯",name:"exploding head",category:"smileys",keywords:["mind blown","shocked","amazed"]},{emoji:"🤠",name:"cowboy hat face",category:"smileys",keywords:["cowboy","hat","western"]},{emoji:"🥳",name:"partying face",category:"smileys",keywords:["party","celebration","birthday"]},{emoji:"🥸",name:"disguised face",category:"smileys",keywords:["disguise","glasses","incognito"]},{emoji:"😎",name:"smiling face with sunglasses",category:"smileys",keywords:["cool","sunglasses","awesome"]},{emoji:"🤓",name:"nerd face",category:"smileys",keywords:["nerd","geek","smart"]},{emoji:"🧐",name:"face with monocle",category:"smileys",keywords:["monocle","fancy","inspection"]},{emoji:"👋",name:"waving hand",category:"people",keywords:["wave","hello","goodbye"]},{emoji:"🤚",name:"raised back of hand",category:"people",keywords:["hand","stop"]},{emoji:"🖐️",name:"hand with fingers splayed",category:"people",keywords:["hand","five"]},{emoji:"✋",name:"raised hand",category:"people",keywords:["hand","stop","high five"]},{emoji:"🖖",name:"vulcan salute",category:"people",keywords:["spock","vulcan"]},{emoji:"👌",name:"OK hand",category:"people",keywords:["ok","perfect"]},{emoji:"🤌",name:"pinched fingers",category:"people",keywords:["italian","chef kiss"]},{emoji:"🤏",name:"pinching hand",category:"people",keywords:["small","tiny"]},{emoji:"✌️",name:"victory hand",category:"people",keywords:["peace","victory"]},{emoji:"🤞",name:"crossed fingers",category:"people",keywords:["luck","hope"]},{emoji:"🤟",name:"love-you gesture",category:"people",keywords:["love","you"]},{emoji:"🤘",name:"sign of the horns",category:"people",keywords:["rock","metal"]},{emoji:"🤙",name:"call me hand",category:"people",keywords:["call","phone"]},{emoji:"👈",name:"backhand index pointing left",category:"people",keywords:["point","left"]},{emoji:"👉",name:"backhand index pointing right",category:"people",keywords:["point","right"]},{emoji:"👆",name:"backhand index pointing up",category:"people",keywords:["point","up"]},{emoji:"🖕",name:"middle finger",category:"people",keywords:["middle finger","rude"]},{emoji:"👇",name:"backhand index pointing down",category:"people",keywords:["point","down"]},{emoji:"☝️",name:"index pointing up",category:"people",keywords:["point","up","one"]},{emoji:"👍",name:"thumbs up",category:"people",keywords:["thumbs up","good","yes"]},{emoji:"👎",name:"thumbs down",category:"people",keywords:["thumbs down","bad","no"]},{emoji:"✊",name:"raised fist",category:"people",keywords:["fist","power","solidarity"]},{emoji:"👊",name:"oncoming fist",category:"people",keywords:["fist","punch","bump"]},{emoji:"🤛",name:"left-facing fist",category:"people",keywords:["fist","bump","left"]},{emoji:"🤜",name:"right-facing fist",category:"people",keywords:["fist","bump","right"]},{emoji:"👏",name:"clapping hands",category:"people",keywords:["clap","applause","bravo"]},{emoji:"🙌",name:"raising hands",category:"people",keywords:["celebration","hooray","praise"]},{emoji:"👐",name:"open hands",category:"people",keywords:["open","hug","jazz hands"]},{emoji:"🤲",name:"palms up together",category:"people",keywords:["prayer","please","hope"]},{emoji:"🤝",name:"handshake",category:"people",keywords:["handshake","deal","agreement"]},{emoji:"🙏",name:"folded hands",category:"people",keywords:["prayer","thanks","please"]},{emoji:"✍️",name:"writing hand",category:"people",keywords:["write","author","signature"]},{emoji:"💅",name:"nail polish",category:"people",keywords:["nails","beauty","manicure"]},{emoji:"🤳",name:"selfie",category:"people",keywords:["selfie","camera","phone"]},{emoji:"💪",name:"flexed biceps",category:"people",keywords:["muscle","strong","flex"]},{emoji:"🦾",name:"mechanical arm",category:"people",keywords:["robot","prosthetic","cyborg"]},{emoji:"🦿",name:"mechanical leg",category:"people",keywords:["robot","prosthetic","cyborg"]},{emoji:"🦵",name:"leg",category:"people",keywords:["leg","limb","kick"]},{emoji:"🦶",name:"foot",category:"people",keywords:["foot","kick","stomp"]},{emoji:"👂",name:"ear",category:"people",keywords:["ear","hear","listen"]},{emoji:"🦻",name:"ear with hearing aid",category:"people",keywords:["hearing aid","deaf","accessibility"]},{emoji:"👃",name:"nose",category:"people",keywords:["nose","smell","sniff"]},{emoji:"🧠",name:"brain",category:"people",keywords:["brain","smart","think"]},{emoji:"🫀",name:"anatomical heart",category:"people",keywords:["heart","organ","love"]},{emoji:"🫁",name:"lungs",category:"people",keywords:["lungs","breathe","organ"]},{emoji:"🦷",name:"tooth",category:"people",keywords:["tooth","dental","smile"]},{emoji:"🦴",name:"bone",category:"people",keywords:["bone","skeleton","dog"]},{emoji:"👀",name:"eyes",category:"people",keywords:["eyes","look","see"]},{emoji:"👁️",name:"eye",category:"people",keywords:["eye","see","watch"]},{emoji:"👅",name:"tongue",category:"people",keywords:["tongue","taste","lick"]},{emoji:"👄",name:"mouth",category:"people",keywords:["mouth","lips","kiss"]},{emoji:"🫦",name:"biting lip",category:"people",keywords:["lip","bite","nervous"]},{emoji:"👶",name:"baby",category:"people",keywords:["baby","infant","child"]},{emoji:"🧒",name:"child",category:"people",keywords:["child","kid","young"]},{emoji:"👦",name:"boy",category:"people",keywords:["boy","child","male"]},{emoji:"👧",name:"girl",category:"people",keywords:["girl","child","female"]},{emoji:"🧑",name:"person",category:"people",keywords:["person","adult","human"]},{emoji:"👱",name:"person: blond hair",category:"people",keywords:["blond","hair","person"]},{emoji:"👨",name:"man",category:"people",keywords:["man","male","adult"]},{emoji:"🧔",name:"person: beard",category:"people",keywords:["beard","man","facial hair"]},{emoji:"👩",name:"woman",category:"people",keywords:["woman","female","adult"]},{emoji:"🧓",name:"older person",category:"people",keywords:["old","elderly","senior"]},{emoji:"👴",name:"old man",category:"people",keywords:["old","man","elderly"]},{emoji:"👵",name:"old woman",category:"people",keywords:["old","woman","elderly"]},{emoji:"🐶",name:"dog face",category:"animals",keywords:["dog","pet","animal"]},{emoji:"🐱",name:"cat face",category:"animals",keywords:["cat","pet","animal"]},{emoji:"🐭",name:"mouse face",category:"animals",keywords:["mouse","animal"]},{emoji:"🐹",name:"hamster",category:"animals",keywords:["hamster","pet"]},{emoji:"🐰",name:"rabbit face",category:"animals",keywords:["rabbit","bunny"]},{emoji:"🦊",name:"fox",category:"animals",keywords:["fox","animal"]},{emoji:"🐻",name:"bear",category:"animals",keywords:["bear","animal"]},{emoji:"🐼",name:"panda",category:"animals",keywords:["panda","bear"]},{emoji:"🐨",name:"koala",category:"animals",keywords:["koala","australia","marsupial"]},{emoji:"🐯",name:"tiger face",category:"animals",keywords:["tiger","cat","wild"]},{emoji:"🦁",name:"lion",category:"animals",keywords:["lion","king","cat"]},{emoji:"🐮",name:"cow face",category:"animals",keywords:["cow","moo","farm"]},{emoji:"🐷",name:"pig face",category:"animals",keywords:["pig","oink","farm"]},{emoji:"🐽",name:"pig nose",category:"animals",keywords:["pig","nose","snout"]},{emoji:"🐸",name:"frog",category:"animals",keywords:["frog","amphibian","green"]},{emoji:"🐵",name:"monkey face",category:"animals",keywords:["monkey","primate","banana"]},{emoji:"🙈",name:"see-no-evil monkey",category:"animals",keywords:["monkey","see no evil","eyes"]},{emoji:"🙉",name:"hear-no-evil monkey",category:"animals",keywords:["monkey","hear no evil","ears"]},{emoji:"🙊",name:"speak-no-evil monkey",category:"animals",keywords:["monkey","speak no evil","mouth"]},{emoji:"🐒",name:"monkey",category:"animals",keywords:["monkey","primate","zoo"]},{emoji:"🦍",name:"gorilla",category:"animals",keywords:["gorilla","ape","strong"]},{emoji:"🦧",name:"orangutan",category:"animals",keywords:["orangutan","ape","orange"]},{emoji:"🐺",name:"wolf",category:"animals",keywords:["wolf","howl","wild"]},{emoji:"🐗",name:"boar",category:"animals",keywords:["boar","pig","wild"]},{emoji:"🐴",name:"horse face",category:"animals",keywords:["horse","neigh","ride"]},{emoji:"🐎",name:"horse",category:"animals",keywords:["horse","racing","gallop"]},{emoji:"🦄",name:"unicorn",category:"animals",keywords:["unicorn","magical","horn"]},{emoji:"🦓",name:"zebra",category:"animals",keywords:["zebra","stripes","africa"]},{emoji:"🦌",name:"deer",category:"animals",keywords:["deer","antlers","forest"]},{emoji:"🦏",name:"rhinoceros",category:"animals",keywords:["rhino","horn","africa"]},{emoji:"🦛",name:"hippopotamus",category:"animals",keywords:["hippo","water","africa"]},{emoji:"🐘",name:"elephant",category:"animals",keywords:["elephant","trunk","memory"]},{emoji:"🦒",name:"giraffe",category:"animals",keywords:["giraffe","tall","neck"]},{emoji:"🦘",name:"kangaroo",category:"animals",keywords:["kangaroo","hop","australia"]},{emoji:"🦥",name:"sloth",category:"animals",keywords:["sloth","slow","lazy"]},{emoji:"🦦",name:"otter",category:"animals",keywords:["otter","water","cute"]},{emoji:"🦨",name:"skunk",category:"animals",keywords:["skunk","smell","stripe"]},{emoji:"🦡",name:"badger",category:"animals",keywords:["badger","honey","dig"]},{emoji:"🐾",name:"paw prints",category:"animals",keywords:["paw","prints","tracks"]},{emoji:"🐔",name:"chicken",category:"animals",keywords:["chicken","rooster","farm"]},{emoji:"🐓",name:"rooster",category:"animals",keywords:["rooster","cock","morning"]},{emoji:"🐣",name:"hatching chick",category:"animals",keywords:["chick","hatching","egg"]},{emoji:"🐤",name:"baby chick",category:"animals",keywords:["chick","baby","yellow"]},{emoji:"🐥",name:"front-facing baby chick",category:"animals",keywords:["chick","baby","cute"]},{emoji:"🦆",name:"duck",category:"animals",keywords:["duck","quack","water"]},{emoji:"🦅",name:"eagle",category:"animals",keywords:["eagle","bird","freedom"]},{emoji:"🦉",name:"owl",category:"animals",keywords:["owl","wise","night"]},{emoji:"🦇",name:"bat",category:"animals",keywords:["bat","vampire","night"]},{emoji:"",name:"bug",category:"animals",keywords:["bug","insect","crawl"]},{emoji:"🦋",name:"butterfly",category:"animals",keywords:["butterfly","beautiful","fly"]},{emoji:"🐌",name:"snail",category:"animals",keywords:["snail","slow","shell"]},{emoji:"🐞",name:"lady beetle",category:"animals",keywords:["ladybug","beetle","red"]},{emoji:"🐜",name:"ant",category:"animals",keywords:["ant","work","colony"]},{emoji:"🦟",name:"mosquito",category:"animals",keywords:["mosquito","bite","buzz"]},{emoji:"🕷️",name:"spider",category:"animals",keywords:["spider","web","eight legs"]},{emoji:"🦂",name:"scorpion",category:"animals",keywords:["scorpion","sting","desert"]},{emoji:"🐢",name:"turtle",category:"animals",keywords:["turtle","slow","shell"]},{emoji:"🐍",name:"snake",category:"animals",keywords:["snake","slither","reptile"]},{emoji:"🦎",name:"lizard",category:"animals",keywords:["lizard","gecko","reptile"]},{emoji:"🐙",name:"octopus",category:"animals",keywords:["octopus","tentacles","sea"]},{emoji:"🦑",name:"squid",category:"animals",keywords:["squid","tentacles","ocean"]},{emoji:"🦐",name:"shrimp",category:"animals",keywords:["shrimp","seafood","small"]},{emoji:"🦞",name:"lobster",category:"animals",keywords:["lobster","claws","red"]},{emoji:"🦀",name:"crab",category:"animals",keywords:["crab","claws","beach"]},{emoji:"🐡",name:"blowfish",category:"animals",keywords:["blowfish","puffer","spiky"]},{emoji:"🐠",name:"tropical fish",category:"animals",keywords:["fish","tropical","colorful"]},{emoji:"🐟",name:"fish",category:"animals",keywords:["fish","swim","water"]},{emoji:"🐬",name:"dolphin",category:"animals",keywords:["dolphin","smart","ocean"]},{emoji:"🐳",name:"spouting whale",category:"animals",keywords:["whale","spout","big"]},{emoji:"🐋",name:"whale",category:"animals",keywords:["whale","ocean","huge"]},{emoji:"🦈",name:"shark",category:"animals",keywords:["shark","teeth","dangerous"]},{emoji:"🐊",name:"crocodile",category:"animals",keywords:["crocodile","teeth","swamp"]},{emoji:"🌸",name:"cherry blossom",category:"animals",keywords:["flower","spring","pink"]},{emoji:"💐",name:"bouquet",category:"animals",keywords:["flowers","bouquet","gift"]},{emoji:"🌺",name:"hibiscus",category:"animals",keywords:["flower","tropical","red"]},{emoji:"🌻",name:"sunflower",category:"animals",keywords:["sunflower","yellow","big"]},{emoji:"🌹",name:"rose",category:"animals",keywords:["rose","love","red"]},{emoji:"🥀",name:"wilted flower",category:"animals",keywords:["flower","wilted","sad"]},{emoji:"🌷",name:"tulip",category:"animals",keywords:["tulip","spring","netherlands"]},{emoji:"🌼",name:"daisy",category:"animals",keywords:["daisy","white","simple"]},{emoji:"🌱",name:"seedling",category:"animals",keywords:["plant","grow","green"]},{emoji:"🌿",name:"herb",category:"animals",keywords:["herb","green","leaf"]},{emoji:"🍀",name:"four leaf clover",category:"animals",keywords:["clover","luck","green"]},{emoji:"🌳",name:"deciduous tree",category:"animals",keywords:["tree","nature","green"]},{emoji:"🌲",name:"evergreen tree",category:"animals",keywords:["tree","pine","christmas"]},{emoji:"🌴",name:"palm tree",category:"animals",keywords:["palm","tropical","beach"]},{emoji:"🌵",name:"cactus",category:"animals",keywords:["cactus","desert","spiky"]},{emoji:"🍎",name:"red apple",category:"food",keywords:["apple","fruit"]},{emoji:"🍊",name:"tangerine",category:"food",keywords:["orange","fruit"]},{emoji:"🍋",name:"lemon",category:"food",keywords:["lemon","fruit"]},{emoji:"🍌",name:"banana",category:"food",keywords:["banana","fruit"]},{emoji:"🍉",name:"watermelon",category:"food",keywords:["watermelon","fruit"]},{emoji:"🍇",name:"grapes",category:"food",keywords:["grapes","fruit"]},{emoji:"🍓",name:"strawberry",category:"food",keywords:["strawberry","fruit"]},{emoji:"🫐",name:"blueberries",category:"food",keywords:["blueberry","fruit"]},{emoji:"🥝",name:"kiwi fruit",category:"food",keywords:["kiwi","fruit","green"]},{emoji:"🍅",name:"tomato",category:"food",keywords:["tomato","red","vegetable"]},{emoji:"🫒",name:"olive",category:"food",keywords:["olive","green","oil"]},{emoji:"🥥",name:"coconut",category:"food",keywords:["coconut","tropical","milk"]},{emoji:"🥑",name:"avocado",category:"food",keywords:["avocado","green","healthy"]},{emoji:"🍆",name:"eggplant",category:"food",keywords:["eggplant","purple","vegetable"]},{emoji:"🥔",name:"potato",category:"food",keywords:["potato","vegetable","starch"]},{emoji:"🥕",name:"carrot",category:"food",keywords:["carrot","orange","vegetable"]},{emoji:"🌽",name:"ear of corn",category:"food",keywords:["corn","yellow","vegetable"]},{emoji:"🌶️",name:"hot pepper",category:"food",keywords:["pepper","hot","spicy"]},{emoji:"🫑",name:"bell pepper",category:"food",keywords:["pepper","bell","vegetable"]},{emoji:"🥒",name:"cucumber",category:"food",keywords:["cucumber","green","vegetable"]},{emoji:"🥬",name:"leafy greens",category:"food",keywords:["lettuce","greens","salad"]},{emoji:"🥦",name:"broccoli",category:"food",keywords:["broccoli","green","vegetable"]},{emoji:"🧄",name:"garlic",category:"food",keywords:["garlic","flavor","cooking"]},{emoji:"🧅",name:"onion",category:"food",keywords:["onion","cry","cooking"]},{emoji:"🍄",name:"mushroom",category:"food",keywords:["mushroom","fungi","cooking"]},{emoji:"🥜",name:"peanuts",category:"food",keywords:["peanuts","nuts","snack"]},{emoji:"🌰",name:"chestnut",category:"food",keywords:["chestnut","nut","autumn"]},{emoji:"🍞",name:"bread",category:"food",keywords:["bread","loaf","carbs"]},{emoji:"🥐",name:"croissant",category:"food",keywords:["croissant","french","pastry"]},{emoji:"🥖",name:"baguette bread",category:"food",keywords:["baguette","french","bread"]},{emoji:"🫓",name:"flatbread",category:"food",keywords:["flatbread","bread","thin"]},{emoji:"🥨",name:"pretzel",category:"food",keywords:["pretzel","twisted","snack"]},{emoji:"🥯",name:"bagel",category:"food",keywords:["bagel","round","breakfast"]},{emoji:"🥞",name:"pancakes",category:"food",keywords:["pancakes","breakfast","syrup"]},{emoji:"🧇",name:"waffle",category:"food",keywords:["waffle","breakfast","squares"]},{emoji:"🧀",name:"cheese wedge",category:"food",keywords:["cheese","dairy","yellow"]},{emoji:"🍖",name:"meat on bone",category:"food",keywords:["meat","bone","protein"]},{emoji:"🍗",name:"poultry leg",category:"food",keywords:["chicken","leg","meat"]},{emoji:"🥩",name:"cut of meat",category:"food",keywords:["steak","meat","red"]},{emoji:"🥓",name:"bacon",category:"food",keywords:["bacon","pork","breakfast"]},{emoji:"🍔",name:"hamburger",category:"food",keywords:["burger","hamburger","fast food"]},{emoji:"🍟",name:"french fries",category:"food",keywords:["fries","potato","fast food"]},{emoji:"🍕",name:"pizza",category:"food",keywords:["pizza","slice","italian"]},{emoji:"🌭",name:"hot dog",category:"food",keywords:["hot dog","sausage","fast food"]},{emoji:"🥪",name:"sandwich",category:"food",keywords:["sandwich","bread","lunch"]},{emoji:"🌮",name:"taco",category:"food",keywords:["taco","mexican","shell"]},{emoji:"🌯",name:"burrito",category:"food",keywords:["burrito","wrap","mexican"]},{emoji:"🫔",name:"tamale",category:"food",keywords:["tamale","mexican","corn"]},{emoji:"🥙",name:"stuffed flatbread",category:"food",keywords:["pita","flatbread","stuffed"]},{emoji:"🧆",name:"falafel",category:"food",keywords:["falafel","middle eastern","chickpea"]},{emoji:"🥚",name:"egg",category:"food",keywords:["egg","protein","breakfast"]},{emoji:"🍳",name:"cooking",category:"food",keywords:["cooking","frying pan","egg"]},{emoji:"🥘",name:"shallow pan of food",category:"food",keywords:["paella","pan","cooking"]},{emoji:"🍲",name:"pot of food",category:"food",keywords:["stew","pot","cooking"]},{emoji:"🫕",name:"fondue",category:"food",keywords:["fondue","cheese","pot"]},{emoji:"🥣",name:"bowl with spoon",category:"food",keywords:["bowl","cereal","soup"]},{emoji:"🥗",name:"green salad",category:"food",keywords:["salad","healthy","greens"]},{emoji:"🍿",name:"popcorn",category:"food",keywords:["popcorn","movie","snack"]},{emoji:"🧈",name:"butter",category:"food",keywords:["butter","dairy","spread"]},{emoji:"🧂",name:"salt",category:"food",keywords:["salt","seasoning","white"]},{emoji:"🥫",name:"canned food",category:"food",keywords:["can","canned","preserved"]},{emoji:"🍱",name:"bento box",category:"food",keywords:["bento","japanese","lunch box"]},{emoji:"🍘",name:"rice cracker",category:"food",keywords:["rice","cracker","japanese"]},{emoji:"🍙",name:"rice ball",category:"food",keywords:["rice ball","onigiri","japanese"]},{emoji:"🍚",name:"cooked rice",category:"food",keywords:["rice","cooked","bowl"]},{emoji:"🍛",name:"curry rice",category:"food",keywords:["curry","rice","spicy"]},{emoji:"🍜",name:"steaming bowl",category:"food",keywords:["ramen","noodles","soup"]},{emoji:"🍝",name:"spaghetti",category:"food",keywords:["spaghetti","pasta","italian"]},{emoji:"🍠",name:"roasted sweet potato",category:"food",keywords:["sweet potato","roasted","orange"]},{emoji:"🍢",name:"oden",category:"food",keywords:["oden","japanese","skewer"]},{emoji:"🍣",name:"sushi",category:"food",keywords:["sushi","japanese","fish"]},{emoji:"🍤",name:"fried shrimp",category:"food",keywords:["shrimp","fried","tempura"]},{emoji:"🍥",name:"fish cake with swirl",category:"food",keywords:["fish cake","japanese","swirl"]},{emoji:"🥮",name:"moon cake",category:"food",keywords:["moon cake","chinese","festival"]},{emoji:"🍡",name:"dango",category:"food",keywords:["dango","japanese","sweet"]},{emoji:"🥟",name:"dumpling",category:"food",keywords:["dumpling","chinese","steamed"]},{emoji:"🥠",name:"fortune cookie",category:"food",keywords:["fortune cookie","chinese","luck"]},{emoji:"🥡",name:"takeout box",category:"food",keywords:["takeout","chinese","box"]},{emoji:"🦀",name:"crab",category:"food",keywords:["crab","seafood","claws"]},{emoji:"🦞",name:"lobster",category:"food",keywords:["lobster","seafood","red"]},{emoji:"🦐",name:"shrimp",category:"food",keywords:["shrimp","seafood","small"]},{emoji:"🦑",name:"squid",category:"food",keywords:["squid","seafood","tentacles"]},{emoji:"🦪",name:"oyster",category:"food",keywords:["oyster","seafood","shell"]},{emoji:"🍦",name:"soft ice cream",category:"food",keywords:["ice cream","soft serve","cone"]},{emoji:"🍧",name:"shaved ice",category:"food",keywords:["shaved ice","snow cone","cold"]},{emoji:"🍨",name:"ice cream",category:"food",keywords:["ice cream","dessert","cold"]},{emoji:"🍩",name:"doughnut",category:"food",keywords:["donut","doughnut","sweet"]},{emoji:"🍪",name:"cookie",category:"food",keywords:["cookie","sweet","baked"]},{emoji:"🎂",name:"birthday cake",category:"food",keywords:["cake","birthday","celebration"]},{emoji:"🍰",name:"shortcake",category:"food",keywords:["cake","slice","dessert"]},{emoji:"🧁",name:"cupcake",category:"food",keywords:["cupcake","muffin","sweet"]},{emoji:"🥧",name:"pie",category:"food",keywords:["pie","dessert","slice"]},{emoji:"🍫",name:"chocolate bar",category:"food",keywords:["chocolate","bar","sweet"]},{emoji:"🍬",name:"candy",category:"food",keywords:["candy","sweet","wrapper"]},{emoji:"🍭",name:"lollipop",category:"food",keywords:["lollipop","candy","stick"]},{emoji:"🍮",name:"custard",category:"food",keywords:["custard","pudding","dessert"]},{emoji:"🍯",name:"honey pot",category:"food",keywords:["honey","sweet","bee"]},{emoji:"🍼",name:"baby bottle",category:"food",keywords:["bottle","baby","milk"]},{emoji:"🥛",name:"glass of milk",category:"food",keywords:["milk","glass","dairy"]},{emoji:"☕",name:"hot beverage",category:"food",keywords:["coffee","tea","hot"]},{emoji:"🫖",name:"teapot",category:"food",keywords:["teapot","tea","hot"]},{emoji:"🍵",name:"teacup without handle",category:"food",keywords:["tea","green tea","cup"]},{emoji:"🍶",name:"sake",category:"food",keywords:["sake","japanese","alcohol"]},{emoji:"🍾",name:"bottle with popping cork",category:"food",keywords:["champagne","celebration","cork"]},{emoji:"🍷",name:"wine glass",category:"food",keywords:["wine","glass","alcohol"]},{emoji:"🍸",name:"cocktail glass",category:"food",keywords:["cocktail","martini","alcohol"]},{emoji:"🍹",name:"tropical drink",category:"food",keywords:["tropical","cocktail","umbrella"]},{emoji:"🍺",name:"beer mug",category:"food",keywords:["beer","mug","alcohol"]},{emoji:"🍻",name:"clinking beer mugs",category:"food",keywords:["beer","cheers","celebration"]},{emoji:"🥂",name:"clinking glasses",category:"food",keywords:["champagne","cheers","celebration"]},{emoji:"🥃",name:"tumbler glass",category:"food",keywords:["whiskey","tumbler","alcohol"]},{emoji:"🫗",name:"pouring liquid",category:"food",keywords:["pour","liquid","drink"]},{emoji:"🥤",name:"cup with straw",category:"food",keywords:["soda","straw","drink"]},{emoji:"🧋",name:"bubble tea",category:"food",keywords:["bubble tea","boba","drink"]},{emoji:"🧃",name:"beverage box",category:"food",keywords:["juice box","drink","straw"]},{emoji:"🧉",name:"mate",category:"food",keywords:["mate","tea","south american"]},{emoji:"🧊",name:"ice",category:"food",keywords:["ice","cold","cube"]},{emoji:"⚽",name:"soccer ball",category:"activities",keywords:["soccer","football","sport"]},{emoji:"🏀",name:"basketball",category:"activities",keywords:["basketball","sport"]},{emoji:"🏈",name:"american football",category:"activities",keywords:["football","sport"]},{emoji:"⚾",name:"baseball",category:"activities",keywords:["baseball","sport"]},{emoji:"🥎",name:"softball",category:"activities",keywords:["softball","sport"]},{emoji:"🎾",name:"tennis",category:"activities",keywords:["tennis","sport"]},{emoji:"🚗",name:"automobile",category:"travel",keywords:["car","vehicle"]},{emoji:"🚕",name:"taxi",category:"travel",keywords:["taxi","car"]},{emoji:"🚙",name:"sport utility vehicle",category:"travel",keywords:["suv","car"]},{emoji:"🚌",name:"bus",category:"travel",keywords:["bus","vehicle"]},{emoji:"🚎",name:"trolleybus",category:"travel",keywords:["trolley","bus"]},{emoji:"🏎️",name:"racing car",category:"travel",keywords:["race","car","fast"]},{emoji:"💡",name:"light bulb",category:"objects",keywords:["idea","light","bulb"]},{emoji:"🔋",name:"battery",category:"objects",keywords:["battery","power"]},{emoji:"🖥️",name:"desktop computer",category:"objects",keywords:["computer","desktop"]},{emoji:"💻",name:"laptop",category:"objects",keywords:["laptop","computer"]},{emoji:"📱",name:"mobile phone",category:"objects",keywords:["phone","mobile"]},{emoji:"☎️",name:"telephone",category:"objects",keywords:["phone","telephone"]},{emoji:"❤️",name:"red heart",category:"symbols",keywords:["love","heart"]},{emoji:"🧡",name:"orange heart",category:"symbols",keywords:["love","heart"]},{emoji:"💛",name:"yellow heart",category:"symbols",keywords:["love","heart"]},{emoji:"💚",name:"green heart",category:"symbols",keywords:["love","heart"]},{emoji:"💙",name:"blue heart",category:"symbols",keywords:["love","heart"]},{emoji:"💜",name:"purple heart",category:"symbols",keywords:["love","heart"]},{emoji:"🖤",name:"black heart",category:"symbols",keywords:["love","heart"]},{emoji:"🤍",name:"white heart",category:"symbols",keywords:["love","heart"]},{emoji:"🏁",name:"chequered flag",category:"flags",keywords:["flag","race","finish"]},{emoji:"🚩",name:"triangular flag",category:"flags",keywords:["flag","warning"]},{emoji:"🏳️",name:"white flag",category:"flags",keywords:["flag","surrender"]},{emoji:"🏴",name:"black flag",category:"flags",keywords:["flag","pirate"]},{emoji:"🏳️‍🌈",name:"rainbow flag",category:"flags",keywords:["flag","rainbow","pride"]}],Ll=e=>{const{value:o,defaultValue:t="",onChange:n,onEmojiSelect:a,isOpen:l,onOpen:c,onClose:s,closeOnSelect:d=!0,maxRecentEmojis:g=16,showRecentEmojis:m=!0,enabledCategories:f=["recent","smileys","people","animals","food","activities","travel","objects","symbols","flags"],customEmojis:p=[]}=e,[u,y]=h.useState(l??!1),[k,x]=h.useState(o??t),[C,S]=h.useState(""),[w,v]=h.useState("smileys"),[b,I]=h.useState([]),T=h.useRef(null),j=h.useRef(null),E=h.useMemo(()=>[...nm,...p],[p]),D=h.useMemo(()=>{let M=E;if(w!=="recent"?M=M.filter(L=>L.category===w):M=b,C){const L=C.toLowerCase();M=M.filter(_=>_.name.toLowerCase().includes(L)||_.keywords.some(O=>O.toLowerCase().includes(L)))}return M},[E,w,b,C]);h.useEffect(()=>{o!==void 0&&x(o)},[o]),h.useEffect(()=>{l!==void 0&&y(l)},[l]),h.useEffect(()=>{if(m&&typeof localStorage<"u"){const M=localStorage.getItem("emojiPicker-recentEmojis");if(M)try{I(JSON.parse(M))}catch{}}},[m]),h.useEffect(()=>{if(typeof document>"u")return;const M=L=>{u&&T.current&&j.current&&!T.current.contains(L.target)&&!j.current.contains(L.target)&&V()};return document.addEventListener("mousedown",M),()=>document.removeEventListener("mousedown",M)},[u]);const W=h.useCallback(M=>{m&&I(L=>{const _=L.filter(N=>N.emoji!==M.emoji),O=[M,..._].slice(0,g);return typeof localStorage<"u"&&localStorage.setItem("emojiPicker-recentEmojis",JSON.stringify(O)),O})},[m,g]),A=h.useCallback(()=>{const M=!u;y(M),M?(c==null||c(),S(""),m&&b.length>0?v("recent"):v("smileys")):s==null||s()},[u,c,s,m,b.length]),H=h.useCallback(M=>{x(M.emoji),W(M),n==null||n(M.emoji),a==null||a(M),d&&(y(!1),s==null||s())},[n,a,d,s,W]),z=h.useCallback(M=>{S(M),M&&w==="recent"&&v("smileys")},[w]),P=h.useCallback(M=>{v(M),S("")},[]),V=h.useCallback(()=>{y(!1),s==null||s()},[s]);return{isOpen:u,selectedEmoji:k,recentEmojis:b,searchQuery:C,activeCategory:w,filteredEmojis:D,handleToggle:A,handleEmojiSelect:H,handleSearchChange:z,handleCategoryChange:P,handleClose:V,triggerRef:T,dropdownRef:j}},_l=({id:e,name:o,label:t,placeholder:n="Select an emoji",helperText:a,views:l={},size:c="md",shape:s="default",variant:d="default",error:g=!1,isDisabled:m=!1,isReadOnly:f=!1,showSearch:p=!0,showCategories:u=!0,showRecentEmojis:y=!0,enabledCategories:k=["recent","smileys","people","animals","food","activities","travel","objects","symbols","flags"],isOpen:x,selectedEmoji:C,recentEmojis:S,searchQuery:w,activeCategory:v,filteredEmojis:b,handleToggle:I,handleEmojiSelect:T,handleSearchChange:j,handleCategoryChange:E,handleClose:D,triggerRef:W,dropdownRef:A,onChange:H,onOpen:z,onClose:P,onEmojiSelect:V,customEmojis:M,closeOnSelect:L,maxRecentEmojis:_,value:O,defaultValue:N,...U})=>{const{getColor:X}=i.useTheme(),oe={...to.container,...l==null?void 0:l.container},B={...to.trigger,...em[c],...om[s],...rm[d],...g&&{borderColor:"color-red-500"},...m&&{opacity:.6,cursor:"not-allowed"},...!m&&!f&&{_hover:{borderColor:"color-gray-300"}},...l==null?void 0:l.trigger},$={...to.dropdown,...l==null?void 0:l.dropdown},q={...to.categoryTabs,...l==null?void 0:l.categoryTabs},J={...to.emojiGrid,...l==null?void 0:l.emojiGrid},Y=k.filter(Z=>Z==="recent"?y&&S.length>0:!0);return r.jsxs(i.View,{id:e,...oe,...U,children:[t&&r.jsx(i.Text,{fontSize:c==="xs"?"12px":c==="sm"?"14px":"16px",fontWeight:"500",color:"color-gray-700",marginBottom:"4px",...l==null?void 0:l.label,children:t}),r.jsxs(i.View,{ref:W,onClick:m||f?void 0:I,...B,children:[r.jsx(i.Horizontal,{alignItems:"center",gap:8,children:r.jsx(i.Text,{color:C?"color-gray-800":"color-gray-500",fontSize:"inherit",children:C||n})}),!f&&!m&&r.jsx(he,{widthHeight:16,color:"color-gray-500",orientation:x?"up":"down"})]}),x&&r.jsxs(i.View,{ref:A,...$,children:[p&&r.jsx(i.View,{...to.searchInput,...l==null?void 0:l.searchInput,children:r.jsx(je,{placeholder:"Search emojis...",value:w,onChange:j,size:"sm"})}),u&&r.jsx(i.View,{...q,children:Y.map(Z=>r.jsx(i.View,{...to.categoryTab,...v===Z&&{borderBottomColor:"theme-primary",color:"theme-primary",backgroundColor:"color-blue-50"},onClick:()=>E(Z),title:Z.charAt(0).toUpperCase()+Z.slice(1),...l==null?void 0:l.categoryTab,children:tm[Z]},Z))}),r.jsx(i.View,{...J,children:b.length>0?b.map((Z,ee)=>r.jsx(i.View,{...to.emoji,onClick:()=>T(Z),title:Z.name,_hover:{backgroundColor:"color-gray-50",transform:"scale(1.05)"},color:"color-gray-800",...l==null?void 0:l.emoji,children:Z.emoji},`${Z.emoji}-${ee}`)):r.jsx(i.View,{gridColumn:"1 / -1",padding:"20px",textAlign:"center",color:"color-gray-500",children:r.jsx(i.Text,{fontSize:"14px",children:w?"No emojis found":"No emojis in this category"})})})]}),a&&r.jsx(i.Text,{color:g?"color-red-500":"color-gray-600",marginTop:"4px",...l==null?void 0:l.helperText,children:a})]})},am=e=>{const o=xe(e),t={...e,value:o.value??e.value??e.defaultValue},n=Ll(t),a=l=>{var c;n.handleEmojiSelect(l),o.onChange(l.emoji),(c=e.onEmojiSelect)==null||c.call(e,l)};return r.jsx(_l,{...n,...t,handleEmojiSelect:a})},lm=({files:e,onRemove:o,maxHeight:t="120px",views:n={}})=>{if(e.length===0)return null;const a=h.useCallback(l=>l<1024?`${l} B`:l<1024*1024?`${(l/1024).toFixed(1)} KB`:`${(l/(1024*1024)).toFixed(1)} MB`,[]);return r.jsx(i.View,{display:"flex",flexWrap:"wrap",gap:"8px",padding:"8px 0",maxHeight:t,overflowY:"auto",...n==null?void 0:n.container,children:e.map((l,c)=>{const s=l.url||"",d=l.type.startsWith("image/"),g=l.type.startsWith("video/"),m=l.type.startsWith("audio/");return r.jsx(i.Vertical,{alignItems:"center",gap:"6px",padding:"6px 10px",borderRadius:"8px",border:"1px solid #E2E8F0",backgroundColor:"color-white",position:"relative",animate:{from:{opacity:0,scale:.9},to:{opacity:1,scale:1}},animationDuration:.2,...n==null?void 0:n.item,children:r.jsxs(Me,{children:[r.jsx(Me.Trigger,{children:r.jsxs(i.View,{position:"relative",children:[d&&s&&r.jsx(i.Image,{src:s,alt:l.name,width:"60px",height:"60px",objectFit:"cover",borderRadius:"8px"}),g&&s&&r.jsx(i.View,{as:"video",src:s,alt:l.name,controls:!1,muted:!0,width:"60px",height:"60px",objectFit:"cover",borderRadius:"8px"}),m&&r.jsx(i.Center,{width:"60px",height:"60px",backgroundColor:"color-gray-100",borderRadius:"8px",children:r.jsx(Fo,{widthHeight:24,color:"color-black"})}),!d&&!g&&!m&&r.jsx(i.Center,{width:"60px",height:"60px",backgroundColor:"color-gray-100",borderRadius:"8px",children:r.jsx(go,{widthHeight:24,color:"color-black"})}),o&&r.jsx(i.Button,{position:"absolute",top:"-4px",right:"-4px",width:"20px",height:"20px",minWidth:"20px",minHeight:"20px",borderRadius:"50%",backgroundColor:"color-red-500",color:"white",fontSize:14,fontWeight:"bold",padding:0,display:"flex",alignItems:"center",justifyContent:"center",cursor:"pointer",border:"2px solid white",transition:"background-color 0.2s ease, opacity 0.2s ease",_hover:{backgroundColor:"#DC2626"},onClick:f=>{f.stopPropagation(),o(c)},"aria-label":`Remove ${l.name}`,children:"×"})]})}),r.jsxs(Me.Content,{children:[d&&s&&r.jsx(i.Image,{src:s,alt:l.name,maxWidth:"300px"}),g&&s&&r.jsx(i.View,{as:"video",src:s,controls:!0,maxWidth:"300px"}),m&&s&&r.jsx(i.View,{as:"audio",src:s,controls:!0,width:"100%"}),r.jsxs(i.Text,{marginTop:"4px",maxLines:1,width:"100%",fontSize:12,...n==null?void 0:n.name,children:[l.name," (",a(l.size),")"]})]})]})},c)})})},Bl=e=>{const o=pe("slider",e),t=vl(o);return r.jsx(Ml,{...o,...t})},im=({url:e,type:o,name:t,onOpen:n})=>{const a=o.toLowerCase(),l=a.startsWith("image"),c=a.startsWith("video"),s=a.startsWith("audio"),d=()=>{n&&n()};return r.jsxs(i.View,{width:"60px",height:"60px",flexShrink:0,borderRadius:"4px",overflow:"hidden",display:"flex",alignItems:"center",justifyContent:"center",backgroundColor:"color-gray-200",cursor:"pointer",onClick:d,children:[l&&r.jsx(i.Image,{src:e,alt:t,width:"100%",height:"100%",objectFit:"cover"}),c&&r.jsx(i.View,{as:"video",src:e,controls:!0,width:"100%",height:"100%",style:{objectFit:"cover"},onClick:g=>g.stopPropagation()}),s&&r.jsx(i.View,{as:"audio",controls:!0,src:e,width:"100%",onClick:g=>g.stopPropagation()}),!l&&!c&&!s&&r.jsx(go,{widthHeight:24,color:"color-gray-600"})]})},no=vo.create(e=>({modals:[],onHide:o=>o,onShow:(o,t)=>({name:o,props:t}),show:(o,t={},n={})=>{e(a=>({...a,modals:[...a.modals,{name:o,props:{...t,isVisible:!0},overlayProps:n}]}))},hide:o=>{e(t=>o?{...t,modals:t.modals.filter(n=>n.name!==o)}:{modals:[]})},setOnHide:o=>{e(t=>({...t,onHide:o}))},setOnShow:o=>{e(t=>({...t,onShow:o}))}})),cm=(e,o={},t={})=>{no.getState().show(e,o,t),no.getState().onShow(e,o)},Jt=e=>{no.getState().onHide(e),no.getState().hide(typeof e=="string"?e:void 0)},sm={square:{borderRadius:0},rounded:{borderRadius:8}},dm={center:{justifyContent:"center",alignItems:"center"},top:{justifyContent:"center",alignItems:"flex-start"},right:{justifyContent:"flex-end",alignItems:"center"},bottom:{justifyContent:"center",alignItems:"flex-end"},left:{justifyContent:"flex-start",alignItems:"center"}},gm={xs:12,sm:16,md:20,lg:24,xl:28},Qt={body:{fontSize:"16px",fontWeight:"400",color:"color-gray-700"}},Ol=h.memo(({children:e,blur:o,isOpen:t=!1,isClosePrevented:n=!1,onClose:a=()=>{},position:l="center",views:c,...s})=>{const d=h.useCallback(()=>{n||a()},[n,a]);return r.jsx(i.Center,{position:"fixed",top:0,left:0,width:"100%",height:"100%",zIndex:1e3,onClick:d,visibility:t?"visible":"hidden",opacity:t?1:0,transition:"opacity 0.2s ease, visibility 0.2s ease",...c==null?void 0:c.container,children:r.jsx(i.View,{position:"absolute",top:0,left:0,zIndex:1e3,width:"100vw",height:"100vh",display:"flex",backgroundColor:"color-dark-50-360",backdropFilter:o?`blur(${o}px)`:void 0,transition:"background-color 0.2s ease, backdrop-filter 0.2s ease",onClick:d,...dm[l],...s,...c==null?void 0:c.view,children:e})})}),hm={boxShadow:"0px 4px 16px rgba(0, 0, 0, 0.15)"},fm={elevation:5,shadowColor:"rgba(0, 0, 0, 0.15)",shadowOffset:{width:0,height:4},shadowOpacity:1,shadowRadius:16},mm=h.memo(({children:e,shadow:o,isFullScreen:t=!1,shape:n="rounded",views:a,isOpen:l=!0,position:c,...s})=>{const d=typeof document!==void 0?hm:fm,g=h.useCallback(m=>{m&&m.stopPropagation&&m.stopPropagation()},[]);return r.jsx(i.Vertical,{cursor:"default",backgroundColor:"color-white",width:t?"100%":600,height:t?"100%":"fit-content",onClick:g,transition:"opacity 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease",opacity:l?1:0,transform:l?"translateY(0)":"translateY(8px)",...o||d,...sm[n],media:{mobile:{width:"90%",maxWidth:"100%",margin:"16px"}},...s,...a==null?void 0:a.container,children:e})}),pm=h.memo(({children:e,buttonColor:o="theme-primary",iconSize:t="md",buttonSize:n,buttonPosition:a="right",views:l,onClose:c,...s})=>{const d=c||Jt,g=r.jsx(i.View,{onClick:()=>d(),children:r.jsx(He,{widthHeight:gm[n??t],color:o})});return r.jsxs(i.Horizontal,{justifyContent:a==="none"?"center":"space-between",alignItems:"center",paddingVertical:16,paddingHorizontal:24,borderBottomWidth:"1px",borderBottomStyle:"solid",borderBottomColor:"color-gray-200",media:{mobile:{paddingVertical:12,paddingHorizontal:16}},...s,...l==null?void 0:l.header,children:[a==="left"&&g,e,a==="right"&&g]})}),um=h.memo(({children:e,views:o,...t})=>r.jsx(i.View,{paddingVertical:16,paddingHorizontal:24,fontSize:Qt.body.fontSize,fontWeight:Qt.body.fontWeight,color:Qt.body.color,media:{mobile:{paddingVertical:12,paddingHorizontal:16,fontSize:"14px"}},...t,...o==null?void 0:o.view,children:e})),ym=h.memo(({children:e,views:o,...t})=>r.jsx(i.Horizontal,{marginTop:"auto",alignItems:"center",justifyContent:"flex-end",paddingVertical:16,paddingHorizontal:24,borderTopWidth:"1px",borderTopStyle:"solid",borderTopColor:"color-gray-200",gap:12,media:{mobile:{paddingVertical:12,paddingHorizontal:16,gap:8}},...t,...o==null?void 0:o.container,children:e})),Zt=({modals:e,onShow:o,onHide:t})=>{const n=no(a=>a.modals);return h.useEffect(()=>{o&&no.getState().setOnShow(o)},[o]),h.useEffect(()=>{t&&no.getState().setOnHide(t)},[t]),n.length===0?null:r.jsx(h.Fragment,{children:n.map((a,l)=>{const c=e[a.name];return c?r.jsx(Ol,{isOpen:a.props.isVisible,onClose:()=>Jt(a.name),blur:5,...a.overlayProps,style:{zIndex:1e3+l},children:r.jsx(c,{...a.props})},l):(console.error(`${a.name} modal doesn't exist`),null)})})},uo=({children:e})=>r.jsx(r.Fragment,{children:e});uo.Overlay=Ol,uo.Container=mm,uo.Header=pm,uo.Body=um,uo.Footer=ym,uo.Layout=Zt;const Nl={xs:"320px",sm:"380px",md:"480px",lg:"640px",xl:"768px",full:"100%"},bm={left:{top:0,left:0,bottom:0,height:"100vh",borderRightWidth:"1px",borderRightStyle:"solid",borderRightColor:"color-gray-200"},right:{top:0,right:0,bottom:0,height:"100vh",borderLeftWidth:"1px",borderLeftStyle:"solid",borderLeftColor:"color-gray-200"},top:{top:0,left:0,right:0,width:"100vw",borderBottomWidth:"1px",borderBottomStyle:"solid",borderBottomColor:"color-gray-200"},bottom:{bottom:0,left:0,right:0,width:"100vw",borderTopWidth:"1px",borderTopStyle:"solid",borderTopColor:"color-gray-200"}},Rt=({isOpen:e,onClose:o,isClosePrevented:t,blur:n,children:a,...l})=>{const c=()=>{t||o()};return h.useEffect(()=>{const s=d=>{d.key==="Escape"&&e&&!t&&o()};return e&&document.addEventListener("keydown",s),()=>{document.removeEventListener("keydown",s)}},[e,t,o]),r.jsx(i.View,{"data-testid":"drawer-overlay",role:"dialog","aria-modal":"true",position:"fixed",top:0,left:0,right:0,bottom:0,zIndex:1e3,visibility:e?"visible":"hidden",onClick:c,opacity:e?1:0,transition:"opacity 0.2s ease, visibility 0.2s ease, background-color 0.2s ease",backgroundColor:e?"color-dark-50-360":"transparent",backdropFilter:n?`blur(${n}px)`:void 0,pointerEvents:e?"auto":"none",...l,children:a})},en=({placement:e="right",size:o="md",isOpen:t=!1,children:n,...a})=>{const l=m=>{m.stopPropagation()},s=e==="top"||e==="bottom"?{height:o==="full"?"100vh":Nl[o]||o,maxHeight:"100vh"}:{width:o==="full"?"100vw":Nl[o]||o,maxWidth:"100vw"},d=e==="left"?"0 12px 12px 0":e==="right"?"12px 0 0 12px":e==="top"?"0 0 12px 12px":"12px 12px 0 0",g=t?"translate3d(0, 0, 0)":e==="left"?"translate3d(-100%, 0, 0)":e==="right"?"translate3d(100%, 0, 0)":e==="top"?"translate3d(0, -100%, 0)":"translate3d(0, 100%, 0)";return r.jsx(i.Vertical,{position:"absolute",backgroundColor:"color-white",borderRadius:d,...bm[e],...s,onClick:l,transform:g,willChange:"transform",transition:"transform 0.24s ease, box-shadow 0.2s ease",boxShadow:"0 12px 32px rgba(15, 23, 42, 0.12)",...a,children:n})},xm=({children:e,onClose:o,buttonPosition:t="right",...n})=>{const a=o&&r.jsx(i.View,{onClick:o,cursor:"pointer",padding:8,children:r.jsx(He,{widthHeight:20,color:"color-gray-500"})});return r.jsxs(i.Horizontal,{paddingHorizontal:24,paddingVertical:16,borderBottomWidth:"1px",borderBottomColor:"color-gray-200",alignItems:"center",justifyContent:t==="none"?"center":"space-between",...n,children:[t==="left"&&a,e,t==="right"&&a]})},km=({children:e,...o})=>r.jsx(i.Vertical,{padding:24,flex:1,overflowY:"auto",...o,children:e}),Cm=({children:e,...o})=>r.jsx(i.Horizontal,{paddingHorizontal:24,paddingVertical:16,borderTopWidth:"1px",borderTopColor:"color-gray-200",alignItems:"center",justifyContent:"flex-end",gap:12,...o,children:e}),ao=vo.create(e=>({drawers:[],onHide:o=>o,onShow:(o,t)=>({name:o,props:t}),show:(o,t={},n={})=>{e(a=>({...a,drawers:[...a.drawers,{name:o,props:{...t,isOpen:!1},overlayProps:n}]}))},hide:o=>{e(t=>o?{...t,drawers:t.drawers.filter(n=>n.name!==o)}:{drawers:[]})},setOnHide:o=>{e(t=>({...t,onHide:o}))},setOnShow:o=>{e(t=>({...t,onShow:o}))}})),wm=(e,o={},t={})=>{const n=ao.getState();n.hide(e),n.show(e,o,t),n.onShow(e,o),queueMicrotask(()=>{ao.setState(a=>({drawers:a.drawers.map(l=>l.name===e?{...l,props:{...l.props,isOpen:!0}}:l)}))})},ql=e=>{ao.getState().onHide(e),ao.getState().hide(typeof e=="string"?e:void 0)},Sm=({drawers:e,onShow:o,onHide:t})=>{const n=ao(a=>a.drawers);return h.useEffect(()=>{o&&ao.getState().setOnShow(o)},[o]),h.useEffect(()=>{t&&ao.getState().setOnHide(t)},[t]),n.length===0?null:r.jsx(h.Fragment,{children:n.map((a,l)=>{var u;const c=e[a.name];if(!c)return console.error(`${a.name} drawer doesn't exist`),null;const{placement:s,size:d,isClosePrevented:g,blur:m,containerProps:f,...p}=a.props||{};return r.jsx(Rt,{isOpen:a.props.isOpen,onClose:()=>ql(a.name),isClosePrevented:g,blur:m,...a.overlayProps,style:{zIndex:1e3+l,...((u=a.overlayProps)==null?void 0:u.style)||{}},children:r.jsx(en,{placement:s,size:d,isOpen:a.props.isOpen,...f||{},children:r.jsx(h.Suspense,{fallback:null,children:r.jsx(c,{...p})})})},l)})})},yo=({isOpen:e,onClose:o,placement:t="right",size:n="md",isClosePrevented:a,children:l,...c})=>r.jsx(Rt,{isOpen:e,onClose:o,isClosePrevented:a,...c,children:r.jsx(en,{placement:t,size:n,isOpen:e,children:l})});yo.Overlay=Rt,yo.Container=en,yo.Header=xm,yo.Body=km,yo.Footer=Cm,yo.Layout=Sm;const Ul=({behavior:e,keyboardVerticalOffset:o,dismissOnTap:t,enabled:n,children:a,...l})=>r.jsx(i.View,{flex:1,width:"100%",...l,children:a}),vm=({header:e,footer:o,children:t,isLoading:n=!1,safe:a=!0,scrollable:l=!0,dismissKeyboardOnTap:c=!0,keyboardVerticalOffset:s=0,views:d={},backgroundColor:g="color-white",...m})=>{const f=a?i.SafeArea:i.View,p=i.isBrowser()?{}:{keyboardShouldPersistTaps:"handled",showsVerticalScrollIndicator:!1,contentContainerStyle:{flexGrow:1}},u=n?r.jsx(i.Center,{flex:1,width:"100%",...d.content,children:r.jsx(eo,{})}):l?r.jsx(i.Scroll,{flex:1,width:"100%",...p,...d.content,children:t}):r.jsx(i.View,{flex:1,width:"100%",...d.content,children:t});return r.jsxs(f,{flex:1,height:"100%",width:"100%",flexDirection:"column",backgroundColor:g,...m,...d.container,children:[e!=null&&r.jsx(i.View,{width:"100%",flexShrink:0,...d.header,children:e}),r.jsxs(Ul,{flexDirection:"column",dismissOnTap:c,keyboardVerticalOffset:s,children:[u,o!=null&&r.jsx(i.View,{width:"100%",flexShrink:0,...d.footer,children:o})]})]})},Nr=vo.create(e=>({started:!1,loaded:!1,setStarted:(o=!0)=>e({started:o}),setLoaded:(o=!0)=>e({loaded:o}),reset:()=>e({started:!1,loaded:!1})})),Tm=(e=!0)=>Nr.getState().setLoaded(e),Im=(e=!0)=>Nr.getState().setStarted(e),Fm=({logo:e,logoSrc:o,loader:t,showLoader:n=!0,duration:a=600,isLoaded:l,onHidden:c,backgroundColor:s="color-white",children:d,...g})=>{const m=Nr(w=>w.loaded),f=l!==void 0?l:m,[p,u]=h.useState(!0),[y,k]=h.useState(!1);if(h.useEffect(()=>{if(!f||y)return;k(!0);const w=setTimeout(()=>{u(!1),c==null||c()},a);return()=>clearTimeout(w)},[f,y,a,c]),!p)return null;const x=i.isBrowser()?"fixed":"absolute",C=y?i.Animation.fadeOut({duration:`${a}ms`}):void 0,S=e??(o?r.jsx(i.Image,{src:o,width:120,height:120,alt:"logo"}):null);return r.jsxs(i.Center,{position:x,top:0,left:0,right:0,bottom:0,zIndex:9999,backgroundColor:s,animate:C,...g,children:[r.jsxs(i.Vertical,{alignItems:"center",gap:24,children:[S,n&&(t??r.jsx(eo,{}))]}),d]})},qe=vo.create((e,o)=>({stack:[{path:"/",params:{}}],index:0,push:(t,n={})=>e(a=>{const l=a.stack.slice(0,a.index+1);return l.push({path:t,params:n}),{stack:l,index:l.length-1}}),replace:(t,n={})=>e(a=>{const l=a.stack.slice();return l[a.index]={path:t,params:n},{stack:l}}),back:()=>{const{index:t}=o();return t<=0?!1:(e({index:t-1}),!0)},go:t=>e(n=>({index:Math.min(Math.max(n.index+t,0),n.stack.length-1)})),reset:(t,n={})=>e({stack:[{path:t,params:n}],index:0})})),zm=(e,o)=>qe.getState().push(e,o),Mm=()=>qe.getState().back(),on=()=>{const e=qe(d=>d.stack),o=qe(d=>d.index),t=qe(d=>d.push),n=qe(d=>d.replace),a=qe(d=>d.back),l=qe(d=>d.go),c=qe(d=>d.reset),s=e[o]||{path:"/",params:{}};return{path:s.path,params:s.params,stack:e,index:o,canGoBack:o>0,push:t,replace:n,back:a,go:l,reset:c,navigate:t}},Gl=(e,o)=>{const t=e.split("/").filter(Boolean),n=o.split("/").filter(Boolean);if(t.length!==n.length)return null;const a={};for(let l=0;l<t.length;l+=1){const c=t[l];if(c.startsWith(":"))a[c.slice(1)]=decodeURIComponent(n[l]);else if(c!==n[l])return null}return a},Wm=e=>Array.isArray(e)?e:Object.entries(e).map(([o,t])=>({path:o,component:t})),Hm=({routes:e,notFound:o})=>{const{path:t,params:n}=on();for(const a of Wm(e)){const l=Gl(a.path,t);if(l){const c=a.component;return r.jsx(c,{...n,...l})}}return o?r.jsx(o,{}):null},jm=({routes:e,notFound:o,initialPath:t,syncBrowserHistory:n=!1})=>{const{path:a,push:l,back:c,reset:s}=on(),d=h.useRef(!1);return i.useMount(()=>{t&&s(t)}),h.useEffect(()=>{if(!(!n||typeof window>"u")){if(d.current){d.current=!1;return}try{window.history.pushState({path:a},"",a)}catch{}}},[a,n]),h.useEffect(()=>{if(!n||typeof window>"u")return;const g=()=>{d.current=!0,c()||(d.current=!1)};return window.addEventListener("popstate",g),()=>window.removeEventListener("popstate",g)},[n,c,l]),r.jsx(Hm,{routes:e,notFound:o})},Pm=(e=null,o=[])=>{const[t,n]=h.useState(e),[a,l]=h.useState(o),c=h.useRef({});return{activeItemId:t,setActiveItemId:n,expandedItemIds:a,toggleExpandedItem:g=>{l(m=>m.includes(g)?m.filter(p=>p!==g):[...m,g])},isItemExpanded:g=>a.includes(g),triggerRefs:c}},rn={sm:{padding:"8px 12px",fontSize:"12px",fontWeight:"500",media:{mobile:{padding:"6px 10px",fontSize:"11px"}}},md:{padding:"10px 14px",fontSize:"14px",fontWeight:"500",media:{mobile:{padding:"8px 12px",fontSize:"12px"}}},lg:{padding:"12px 16px",fontSize:"14px",fontWeight:"600",media:{mobile:{padding:"10px 14px",fontSize:"12px"}}}},tn={default:{color:"color-gray-800",style:{backgroundColor:"transparent"},transition:"background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease"},filled:{backgroundColor:"color-gray-100",color:"color-gray-800",transition:"background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease"},outline:{borderWidth:"1px",borderStyle:"solid",borderColor:"color-gray-200",color:"color-gray-800",style:{backgroundColor:"transparent"},transition:"background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease"}},Yl={horizontal:{flexDirection:"row",gap:"8px",media:{mobile:{flexDirection:"column",gap:"4px"}}},vertical:{flexDirection:"column",gap:"4px"}},Eo={active:{backgroundColor:"color-blue-50",color:"color-blue-700",fontWeight:"600",borderLeft:"3px solid",borderColor:"color-blue-600"},hover:{backgroundColor:"color-gray-100",transition:"background-color 0.2s ease"}},Kl=h.createContext({activeItemId:null,setActiveItemId:()=>{},expandedItemIds:[],toggleExpandedItem:()=>{},isItemExpanded:()=>!1,orientation:"vertical",size:"md",variant:"default",triggerRefs:{current:{}}}),Vm=({children:e,value:o})=>r.jsx(Kl.Provider,{value:o,children:e}),lr=()=>{const e=h.useContext(Kl);if(!e)throw new Error("useNavigationMenuContext must be used within a NavigationMenuProvider");return e},nn=({children:e,views:o})=>{const{orientation:t}=lr(),n=t==="horizontal"?i.Horizontal:i.Vertical;return r.jsx(n,{width:"100%",...Yl[t],transition:"background-color 0.2s ease, border-color 0.2s ease",borderRadius:"8px",...o==null?void 0:o.container,children:e})},Xl=h.createContext({itemValue:null,isDisabled:!1}),Am=()=>{const e=h.useContext(Xl);if(!e)throw new Error("useNavigationMenuItemContext must be used within a NavigationMenuItem");return e},an=({item:e,value:o,isDisabled:t=!1,children:n,views:a})=>{var C;const{activeItemId:l,setActiveItemId:c,orientation:s,size:d,variant:g,onItemActivate:m}=lr(),f=(e==null?void 0:e.id)||o,p=l===f,u=(e==null?void 0:e.items)&&e.items.length>0,y=(e==null?void 0:e.disabled)||t,k=()=>{y||f&&(c(f),m&&m(f))},x=s==="horizontal"?i.Horizontal:i.Vertical;return n?r.jsx(Xl.Provider,{value:{itemValue:f||null,isDisabled:y},children:r.jsx(i.View,{width:"100%",cursor:y?"not-allowed":"pointer",opacity:y?.6:1,borderRadius:"8px",transition:"background-color 0.2s ease, color 0.2s ease, opacity 0.2s ease",...rn[d],...tn[g],...p?Eo.active:{},_hover:y?{}:Eo.hover,...a==null?void 0:a.item,children:n})}):u&&e?r.jsxs(x,{width:"100%",flexDirection:"column",position:"relative",...a==null?void 0:a.item,children:[r.jsxs(Jl,{itemId:e.id,disabled:e.disabled,views:a,children:[e.icon&&r.jsx(i.View,{marginRight:8,...a==null?void 0:a.icon,children:e.icon}),e.label]}),r.jsx(Ql,{itemId:e.id,children:r.jsx(nn,{children:(C=e.items)==null?void 0:C.map(S=>r.jsx(an,{item:S},S.id))})})]}):e?r.jsxs(i.View,{as:e.href?"a":"div",href:e.href,onClick:k,cursor:e.disabled?"not-allowed":"pointer",opacity:e.disabled?.6:1,width:"100%",display:"flex",alignItems:"center",borderRadius:"8px",transition:"background-color 0.2s ease, color 0.2s ease, opacity 0.2s ease",gap:"8px",...rn[d],...tn[g],...p?Eo.active:{},_hover:e.disabled?{}:Eo.hover,...a==null?void 0:a.item,children:[e.icon&&r.jsx(i.View,{marginRight:8,...a==null?void 0:a.icon,children:e.icon}),e.label]}):null},Jl=({children:e,itemId:o,disabled:t,views:n})=>{const{activeItemId:a,toggleExpandedItem:l,isItemExpanded:c,size:s,variant:d,triggerRefs:g}=lr(),m=h.useRef(null),f=a===o,p=c(o);h.useEffect(()=>(m.current&&o&&(g.current[o]=m.current),()=>{o&&delete g.current[o]}),[o,g]);const u=y=>{y.preventDefault(),!t&&l(o)};return r.jsxs(i.View,{ref:m,onClick:u,cursor:t?"not-allowed":"pointer",opacity:t?.5:1,width:"100%",display:"flex",alignItems:"center",justifyContent:"space-between",borderRadius:8,transition:"background-color 0.2s ease",...rn[s],...tn[d],...f?Eo.active:{},_hover:t?{}:Eo.hover,...n==null?void 0:n.trigger,children:[r.jsx(i.View,{display:"flex",alignItems:"center",children:e}),r.jsx(i.View,{transition:"transform 0.2s ease",transform:p?"rotate(180deg)":"rotate(0deg)",...n==null?void 0:n.indicator,children:r.jsx(he,{orientation:"down",widthHeight:16,color:"currentColor",filled:!0})})]})},Ql=({children:e,itemId:o,views:t})=>{const{isItemExpanded:n,orientation:a,triggerRefs:l}=lr(),c=h.useRef(null),[s,d]=h.useState({x:0,y:0,placement:a==="horizontal"?"bottom":"right"}),g=n(o);if(h.useEffect(()=>{if(g&&c.current&&o&&l.current[o]&&a==="horizontal"){const f=c.current.getBoundingClientRect(),p=l.current[o].getBoundingClientRect(),u=Math.max(f.width||200,200),y=Math.max(f.height||150,150),k=window.innerWidth,x=window.innerHeight,C={top:p.top,right:k-p.right,bottom:x-p.bottom,left:p.left},S=a==="horizontal"?[{placement:"bottom",space:C.bottom,fits:C.bottom>=y+8,x:p.left,y:p.bottom+8},{placement:"top",space:C.top,fits:C.top>=y+8,x:p.left,y:p.top-y-8},{placement:"right",space:C.right,fits:C.right>=u+8,x:p.right+8,y:p.top},{placement:"left",space:C.left,fits:C.left>=u+8,x:p.left-u-8,y:p.top}]:[{placement:"right",space:C.right,fits:C.right>=u+8,x:p.right+8,y:p.top},{placement:"left",space:C.left,fits:C.left>=u+8,x:p.left-u-8,y:p.top},{placement:"bottom",space:C.bottom,fits:C.bottom>=y+8,x:p.left,y:p.bottom+8},{placement:"top",space:C.top,fits:C.top>=y+8,x:p.left,y:p.top-y-8}],w=S.find(T=>T.fits);if(w){d({x:w.x,y:w.y,placement:w.placement});return}const v=S.reduce((T,j)=>j.space>T.space?j:T);let b=v.x,I=v.y;b+u>k&&(b=k-u-8),b<8&&(b=8),I+y>x&&(I=x-y-8),I<8&&(I=8),d({x:b,y:I,placement:v.placement})}},[g,a,o,l]),!g)return null;if(a==="vertical")return r.jsx(i.View,{paddingLeft:16,width:"100%",position:"relative",backgroundColor:"transparent",...t==null?void 0:t.container,children:e});const m={position:"fixed",left:s.x,top:s.y,zIndex:1e3};return r.jsx(i.View,{ref:c,role:"menu",minWidth:"200px",backgroundColor:"color-white",borderRadius:4,boxShadow:"0px 2px 8px rgba(0, 0, 0, 0.15)",overflow:"hidden",style:m,...t==null?void 0:t.container,children:e})},Em=({href:e,children:o,views:t,underline:n,isExternal:a,iconSize:l,...c})=>{const{itemValue:s,isDisabled:d}=Am(),{activeItemId:g,setActiveItemId:m,onItemActivate:f}=lr(),p=g===s,u=y=>{if(d){y.preventDefault();return}s&&(m(s),f&&f(s)),c.onClick&&c.onClick(y)};return r.jsx(i.View,{as:"a",href:d?void 0:e,onClick:u,cursor:d?"not-allowed":"pointer",opacity:d?.5:1,width:"100%",display:"flex",alignItems:"center","aria-current":p?"page":void 0,"aria-disabled":d,"data-active":p?"":void 0,"data-disabled":d?"":void 0,...p?{fontWeight:"bold"}:{},...t==null?void 0:t.container,...c,children:o})},Dm=({items:e,orientation:o,views:t,themeMode:n})=>{const a=o==="horizontal"?i.Horizontal:i.Vertical;return!e||e.length===0?null:r.jsx(a,{width:"100%",...Yl[o],...t==null?void 0:t.container,children:r.jsx(nn,{views:t,children:e.map(l=>r.jsx(an,{item:l,views:t},l.id))})})},bo=e=>{const o=pe("navigation",e),{items:t,children:n,orientation:a="vertical",size:l="md",variant:c="default",defaultActiveItemId:s=null,defaultExpandedItemIds:d=[],onItemActivate:g,views:m,...f}=o,{activeItemId:p,setActiveItemId:u,expandedItemIds:y,toggleExpandedItem:k,isItemExpanded:x,triggerRefs:C}=Pm(s,d);return r.jsx(Vm,{value:{activeItemId:p,setActiveItemId:u,expandedItemIds:y,toggleExpandedItem:k,isItemExpanded:x,orientation:a,size:l,variant:c,onItemActivate:g,triggerRefs:C},children:t?r.jsx(Dm,{items:t,orientation:a,size:l,variant:c,views:m,...f}):n})};bo.List=nn,bo.Item=an,bo.Trigger=Jl,bo.Content=Ql,bo.Link=Em;const Zl={},Rl=h.createContext({views:Zl,onRowClick:()=>{}}),$m=({children:e,views:o=Zl,onRowClick:t})=>r.jsx(Rl.Provider,{value:{views:o,onRowClick:t},children:e}),lo=()=>h.useContext(Rl),ke={table:{width:"100%",color:"inherit",borderRadius:"8px",overflow:"hidden",boxShadow:"0px 1px 3px rgba(0, 0, 0, 0.06), 0px 1px 2px rgba(0, 0, 0, 0.04)",border:"1px solid",borderColor:"color-gray-200",transition:"box-shadow 0.2s ease",media:{mobile:{overflowX:"auto",display:"block",borderRadius:"4px"}}},thead:{backgroundColor:"color-gray-50",borderBottom:"1px solid",borderColor:"color-gray-200"},th:{padding:"12px 16px",fontWeight:"600",fontSize:"14px",color:"inherit",opacity:.72,textAlign:"left",flex:1,media:{mobile:{padding:"8px 12px",fontSize:"12px"}}},td:{padding:"12px 16px",fontSize:"14px",borderBottom:"1px solid",borderColor:"color-gray-100",color:"inherit",flex:1,media:{mobile:{padding:"8px 12px",fontSize:"12px"}}},tr:{flexDirection:"row",alignItems:"stretch",width:"100%",transition:"background-color 0.15s ease",_hover:{backgroundColor:"color-gray-50"},_focus:{outline:"none",backgroundColor:"color-gray-100"}},tfoot:{backgroundColor:"color-gray-50",fontWeight:"600",borderTop:"2px solid",borderColor:"color-gray-200"},caption:{margin:"8px 0",color:"inherit",opacity:.62,fontSize:"14px",fontStyle:"italic",media:{mobile:{fontSize:"12px"}}}};({...ke.th},{...ke.td}),{...ke.tr},{...ke.td},{...ke.th},{...ke.table},{...ke.th},{...ke.td},{...ke.tr},{...ke.tfoot},{...ke.caption};const Lm=({children:e})=>r.jsx(i.View,{width:"100%",style:{overflowX:"auto"},children:e}),ei=e=>{const{views:o}=lo();return r.jsx(i.Element,{as:"table",...ke.table,...o==null?void 0:o.table,...e,style:{borderCollapse:"collapse",...e.style||{}}})},oi=e=>{const{views:o}=lo();return r.jsx(i.Element,{as:"thead",textAlign:"left",...ke.thead,...o==null?void 0:o.thead,...e})},ri=e=>{const{views:o}=lo();return r.jsx(i.Element,{as:"th",whiteSpace:"nowrap",...ke.th,...o==null?void 0:o.th,...e})},qr=e=>{const{views:o,onRowClick:t}=lo();return r.jsx(i.Element,{as:"tr",...ke.tr,...o==null?void 0:o.tr,onClick:t,...e})},ln=({isFirstColumn:e,...o})=>{const{views:t}=lo();return r.jsx(i.Element,{as:"td",whiteSpace:"nowrap",fontWeight:e?"500":"400",...ke.td,...t==null?void 0:t.td,...o})},ti=e=>{const{views:o}=lo();return r.jsx(i.Element,{as:"tbody",...ke.tbody,...o==null?void 0:o.tbody,...e})},ni=e=>{const{views:o}=lo();return r.jsx(i.Element,{as:"tfoot",...ke.tfoot,...o==null?void 0:o.tfoot,...e})},ai=e=>{const{views:o}=lo();return r.jsx(i.Element,{as:"caption",...ke.caption,...o==null?void 0:o.caption,...e})},_m=({data:e,columns:o,footer:t,caption:n,themeMode:a})=>{const l=Math.max(o.length*140,320);return r.jsx(Lm,{children:r.jsxs(ei,{role:"Table",minWidth:l,children:[n&&r.jsx(ai,{children:n}),r.jsx(oi,{children:r.jsx(qr,{children:o.map(c=>r.jsx(ri,{children:c.title},c.field))})}),r.jsx(ti,{children:e.map((c,s)=>r.jsx(qr,{children:o.map((d,g)=>r.jsx(ln,{isFirstColumn:g===0,children:c[d.field]},d.field))},s))}),t&&r.jsx(ni,{children:r.jsx(qr,{children:t.map((c,s)=>r.jsx(ln,{...c.props,children:c.value},s))})})]})})},Ve=({children:e,views:o,onClick:t})=>{const n=pe("table",{views:o,onClick:t});return r.jsx($m,{views:n.views,onRowClick:n.onClick,children:e})};Ve.Head=oi,Ve.HeadCell=ri,Ve.Body=ti,Ve.Row=qr,Ve.Cell=ln,Ve.Footer=ni,Ve.Caption=ai,Ve.Container=ei,Ve.Template=_m;const Bm=(e,o,t)=>{const n=g=>g.value!==void 0?g.value:g.title,a=()=>{if(!(!e||e.length===0)){if(o!==void 0){const g=e.find(m=>n(m)===o);if(g)return g}return e[0]}},[l,c]=h.useState(a()),s=t!==void 0?e.find(g=>n(g)===t):l,d=g=>{t===void 0&&c(g)};return h.useEffect(()=>{if(t!==void 0)return;const g=a(),m=l&&e.some(f=>n(f)===n(l));g&&(!m||o!==void 0&&l&&n(l)!==o)?c(g):!g&&l&&c(void 0)},[e,o]),{activeTab:s,setActiveTab:d}},Om=(e,o,t)=>{const[n,a]=h.useState(e||null);return{activeValue:o!==void 0?o:n,setActiveValue:s=>{o===void 0&&a(s),t&&t(s)}}},Nm=h.memo(({tab:e,isActive:o,onClick:t,iconPosition:n="left",tabStyles:a,textStyles:l})=>{const c=()=>{switch(n){case"top":return"column";case"bottom":return"column-reverse";case"right":return"row-reverse";case"left":default:return"row"}},s=()=>["top","bottom"].includes(n)?"4px":"8px",d=e.icon&&h.isValidElement(e.icon)?h.cloneElement(e.icon,{strokeWidth:o?2.5:2}):e.icon;return r.jsxs(i.Element,{as:"div",role:"tab","aria-selected":o,tabIndex:o?0:-1,display:"flex",alignItems:"center",justifyContent:"center",cursor:"pointer",transition:"background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease",...a,flexDirection:c(),gap:s(),onClick:t,"data-state":o?"active":"inactive",children:[d&&r.jsx(i.Element,{children:d},o?"active-icon":"inactive-icon"),r.jsxs(i.Element,{display:"grid",alignItems:"center",justifyContent:"center",children:[r.jsx(i.Text,{...l,fontWeight:"600",visibility:"hidden",gridColumn:"1",gridRow:"1","aria-hidden":"true",children:e.title}),r.jsx(i.Text,{...l,fontWeight:o?"600":"500",gridColumn:"1",gridRow:"1",children:e.title})]})]})}),cn=(e,o)=>{const t=o==="dark";return e==="segmented"?{header:{width:"fit-content",alignSelf:"flex-start",gap:6,padding:6,borderRadius:16,backgroundColor:"color-gray-100"},tab:{minHeight:44,padding:"0 22px",borderRadius:12,color:"color-gray-600",borderWidth:1,borderStyle:"solid",borderColor:"color-gray-100",style:{backgroundColor:"transparent"}},activeTab:{backgroundColor:"color-white",color:"color-gray-900",boxShadow:t?"0 1px 3px rgba(0, 0, 0, 0.35)":"0 1px 2px rgba(0, 0, 0, 0.06)"},text:{fontSize:14,lineHeight:"20px",letterSpacing:"-0.01em"},activeText:{},content:{width:"100%"}}:e==="pill"?{header:{width:"100%",flexWrap:"wrap",gap:12},tab:{minHeight:44,padding:"0 22px",borderRadius:"999px",backgroundColor:"color-white",color:"color-gray-600",borderWidth:1,borderStyle:"solid",borderColor:"color-gray-200"},activeTab:{backgroundColor:"theme-primary",color:"color-white",borderColor:"theme-primary"},text:{fontSize:14,lineHeight:"20px",letterSpacing:"-0.01em",color:"inherit"},activeText:{color:"inherit"},content:{width:"100%"}}:{header:{width:"100%",gap:20,borderBottom:"none"},tab:{minHeight:44,padding:"0 4px",borderRadius:0,color:"color-gray-500",borderBottom:"3px solid",borderColor:"color-white",style:{backgroundColor:"transparent"}},activeTab:{color:"theme-primary",borderColor:"theme-primary"},text:{fontSize:14,lineHeight:"20px",letterSpacing:"-0.01em",color:"inherit"},activeText:{color:"inherit"},content:{width:"100%",paddingTop:12}}},qm=({tabs:e=[],activeTab:o,handleTabClick:t,views:n={},renderTab:a,renderContent:l,variant:c="underline",iconPosition:s="left",keepMounted:d=!1})=>{const{themeMode:g}=i.useTheme(),m=cn(c,g);return o?r.jsxs(i.Vertical,{width:"100%",height:"100%",...n.container,children:[r.jsx(i.Horizontal,{alignItems:"center",...m.header,...n.headerTabs,children:e.map(f=>{const p=(f.value!==void 0?f.value:f.title)===(o.value!==void 0?o.value:o.title),u=()=>t(f);return a?a(f,p,u):r.jsx(Nm,{tab:f,isActive:p,onClick:u,iconPosition:s,tabStyles:{...m.tab,...n.tab,...p?m.activeTab:{},...p?n.activeTab:{}},textStyles:{...m.text,...n.title,...p?m.activeText:{},...p?n.activeText:{}}},f.title)})}),r.jsx(i.View,{height:"100%",...m.content,...n.content,children:l?l(o):d?e.map(f=>{const p=f.value!==void 0?f.value:f.title,u=o.value!==void 0?o.value:o.title;return r.jsx(i.View,{display:p===u?"contents":"none",children:f.content},f.title)}):o.content})]}):null},li=h.createContext(null),sn=()=>{const e=h.useContext(li);if(!e)throw new Error("useTabsContext must be used within a Tabs component");return e},Um=h.memo(({children:e,views:o})=>{var s;const{themeMode:t}=i.useTheme(),{variant:n="underline"}=sn(),a=cn(n,t),l=Io("tabs"),c=Be({container:(s=l.views)==null?void 0:s.headerTabs},o);return r.jsx(i.Horizontal,{alignItems:"center",...a.header,...c==null?void 0:c.container,children:e})}),Gm=h.memo(({value:e,children:o,disabled:t=!1,views:n})=>{var u,y;const{themeMode:a}=i.useTheme(),{activeValue:l,setActiveValue:c,variant:s="underline"}=sn(),d=l===e,g=cn(s,a),m=Io("tabs"),f=Be({trigger:(u=m.views)==null?void 0:u.tab,activeState:(y=m.views)==null?void 0:y.activeTab},n),p=h.useCallback(()=>{t||c(e)},[t,e,c]);return r.jsx(i.View,{cursor:t?"not-allowed":"pointer",opacity:t?.6:1,display:"flex",alignItems:"center",justifyContent:"center",transition:"all 0.2s ease-in-out",...g.tab,...d?g.activeTab:{},_hover:t?{}:s==="underline"?{color:"theme-primary"}:{opacity:.9},onClick:p,...f==null?void 0:f.trigger,...d?f==null?void 0:f.activeState:{},children:r.jsx(i.View,{...g.text,...d?g.activeText:{},children:o})})}),Ym=h.memo(({value:e,children:o,views:t})=>{const{activeValue:n}=sn();return n!==e?null:r.jsx(i.View,{width:"100%",padding:"24px",...t==null?void 0:t.content,children:o})}),Km=e=>{const o=pe("tabs",e),{tabs:t,views:n,defaultValue:a,onTabChange:l,renderTab:c,renderContent:s,variant:d="underline",iconPosition:g="left",keepMounted:m=!1,value:f,onValueChange:p,children:u}=o,y=Om(a,f,p),k=Bm(t||[],a,f);if(u)return r.jsx(li.Provider,{value:{...y,variant:d},children:u});if(t){const x=C=>{const S=w=>w.value!==void 0?w.value:w.title;(!k.activeTab||S(k.activeTab)!==S(C))&&(k.setActiveTab(C),l&&l(C))};return r.jsx(qm,{tabs:t,views:n,activeTab:k.activeTab,handleTabClick:x,renderTab:c,renderContent:s,variant:d,iconPosition:g,keepMounted:m})}return null},Do=h.memo(Km);Do.List=Um,Do.Trigger=Gm,Do.Content=Ym;const Xm=e=>{const{children:o,_isInView:t=!1,alternateHighlightText:n=[],alternateAnimation:a=!1,alternateDuration:l=3e3,highlightText:c,highlightTypewriter:s=!1,highlightSlide:d=!1,highlightSlideDuration:g=500,highlightSlideStagger:m=50,highlightSlideSequential:f=!0}=e,[p,u]=h.useState(o),[y,k]=h.useState(c);return h.useEffect(()=>{if(process.env.NODE_ENV==="production"||typeof o!="string"||!c)return;const x=Array.isArray(c)?c:[c];for(const C of x)typeof C=="string"&&C.length>0&&!o.toLowerCase().includes(C.toLowerCase())&&console.warn(`[Title] highlightText "${C}" is not a substring of \`children\`, so nothing will be highlighted. \`children\` must be the complete sentence including the highlight, e.g. \`<Title highlightText="apps">Build apps fast</Title>\`.`)},[o,c]),h.useEffect(()=>{if(!a||n.length===0||!t||typeof o!="string"||typeof c!="string")return process.env.NODE_ENV!=="production"&&a&&n.length>0&&(typeof o!="string"||typeof c!="string")&&console.warn("[Title] alternateHighlightText requires `children` to be the full sentence as a string and `highlightText` to be the placeholder word inside it. Rotation is disabled."),u(o),k(c),()=>{};const x=o,C=c;if(!x.toLowerCase().includes(C.toLowerCase()))return process.env.NODE_ENV!=="production"&&console.warn(`[Title] \`children\` must contain \`highlightText\` ("${C}") — it is the placeholder the rotating words replace, e.g. \`<Title highlightText="apps" alternateHighlightText={["apps", "sites"]}>Build apps fast</Title>\`. Rotation is disabled.`),u(o),k(c),()=>{};let S=0;const w=b=>{const I=n[b],T=C.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),j=new RegExp(T,"gi"),E=x.replace(j,I);u(E),k(I)};w(S);const v=setInterval(()=>{S=(S+1)%n.length,w(S)},l);return()=>clearInterval(v)},[a,n,l,c,o,t]),{finalDisplayedText:p,activeHighlightTarget:y,highlightTypewriter:s,highlightSlide:d,highlightSlideDuration:g,highlightSlideStagger:m,highlightSlideSequential:f}},Jm={xs:24,sm:32,md:48,lg:96,xl:110},Qm={xl:{media:{mobile:{fontSize:48},tablet:{fontSize:96},desktop:{fontSize:110}}},lg:{media:{mobile:{fontSize:48},tablet:{fontSize:48},desktop:{fontSize:70}}},md:{media:{mobile:{fontSize:32},tablet:{fontSize:40},desktop:{fontSize:56}}},sm:{media:{mobile:{fontSize:20},tablet:{fontSize:24},desktop:{fontSize:32}}},xs:{media:{mobile:{fontSize:14},tablet:{fontSize:18},desktop:{fontSize:20}}}},Zm={underline:e=>({textDecoration:"underline",textDecorationColor:e,textDecorationThickness:"4px",textUnderlineOffset:"4px"}),background:e=>({backgroundColor:e,color:"color-white",padding:"0 8px",borderRadius:"4px"}),gradient:(e,o)=>({background:`linear-gradient(135deg, ${e}, ${o||e})`,backgroundClip:"text",WebkitBackgroundClip:"text !important",WebkitTextFillColor:"transparent",color:"transparent",display:"inline-block",textShadow:"none"}),outline:e=>({WebkitTextStroke:`1px ${e}`,WebkitTextFillColor:"transparent !important",color:"transparent",textShadow:"none"}),glow:e=>({color:e,textShadow:`0 0 10px ${e}80, 0 0 20px ${e}40, 0 0 30px ${e}20`}),solid:e=>({color:e}),default:()=>({})},Rm=({text:e,typingSpeed:o=50,pauseTime:t=500,onComplete:n,showCursor:a=!0,cursorColor:l="currentColor",textStyle:c,textComponent:s,as:d,...g})=>{const m=s||i.Text,f=Array.isArray(e)?e:[e],[p,u]=h.useState(f.map(()=>"")),[y,k]=h.useState(!1),[x,C]=h.useState(0),[S,w]=h.useState(0);h.useEffect(()=>{u(f.map(()=>"")),k(!1),C(0),w(0)},[e]),h.useEffect(()=>{if(y){n&&n();return}const b=f[x];if(S>=b.length){if(x>=f.length-1){k(!0);return}const T=setTimeout(()=>{C(j=>j+1),w(0)},t);return()=>clearTimeout(T)}const I=setTimeout(()=>{u(T=>{const j=[...T];return j[x]=b.substring(0,S+1),j}),w(T=>T+1)},o);return()=>clearTimeout(I)},[f,x,S,y,n,t,o]);const v=b=>{if(!b||typeof b!="string")return b;const I=b.split("|");return I.length===1?b:I.map((T,j)=>r.jsxs(h.Fragment,{children:[T,j<I.length-1&&r.jsx("br",{})]},j))};return r.jsx(r.Fragment,{children:p.map((b,I)=>r.jsxs(h.Fragment,{children:[v(b),a&&I===x&&!y&&r.jsx(m,{as:"span",display:"inline-block",width:"0.1em",height:"1em",backgroundColor:l,animation:"blink 1s step-end infinite",verticalAlign:"text-bottom",marginLeft:"1px",...c})]},I))})},ep=({text:e,duration:o=500,direction:t="up",stagger:n=50,sequential:a=!1,textStyle:l,as:c,wordProps:s,textComponent:d,...g})=>{const[m,f]=h.useState(e),[p,u]=h.useState("entering"),[y,k]=h.useState(0),x=d||i.Text,C=h.useRef(null),S=h.useRef(null);h.useEffect(()=>{e===m&&p==="visible"||e!==m&&(p==="entering"||p==="visible"?(C.current=e,u("exiting")):p==="exiting"&&(C.current=e))},[e,m,p]);const{lines:w,totalWordCount:v}=h.useMemo(()=>{const V=m.split("|").map(L=>L.trim().split(/\s+/).filter(_=>_.length>0)),M=V.reduce((L,_)=>L+_.length,0);return{lines:V,totalWordCount:M}},[m]),b=h.useMemo(()=>a?v*(o+n):(v-1)*n+o,[v,o,n,a]),I=h.useMemo(()=>a?v*(o+n):(v-1)*n+o,[v,o,n,a]);h.useEffect(()=>(S.current&&clearTimeout(S.current),p==="entering"?S.current=setTimeout(()=>{u("visible")},b+50):p==="exiting"&&(S.current=setTimeout(()=>{C.current!==null&&(f(C.current),C.current=null),k(P=>P+1),u("entering")},I+50)),()=>{S.current&&clearTimeout(S.current)}),[p,b,I]);const{style:T,...j}=s||{},E=t==="up",D=P=>a?P*(o+n):P*n,W=h.useMemo(()=>({display:"inline-block",position:"relative",verticalAlign:"bottom",whiteSpace:"nowrap",...l}),[l]),A=h.useMemo(()=>({display:"inline-flex",flexDirection:"column",alignItems:"center"}),[]),H=h.useMemo(()=>({display:"block",whiteSpace:"nowrap"}),[]);let z=0;return r.jsx(i.Element,{as:"span",style:W,...g,children:r.jsx("span",{style:A,children:w.map((P,V)=>r.jsx("span",{style:H,children:P.map((M,L)=>{const _=z++,O=D(_),N=L===P.length-1;let U;const X=`${o}ms`,oe=`${O}ms`;p==="entering"?U=E?i.Animation.slideInUp({duration:X,delay:oe,timingFunction:"ease-out",fillMode:"both"}):i.Animation.slideInDown({duration:X,delay:oe,timingFunction:"ease-out",fillMode:"both"}):p==="exiting"&&(U=E?{from:{transform:"translateY(0)",opacity:1},to:{transform:"translateY(-100%)",opacity:0},duration:X,delay:oe,timingFunction:"ease-in",fillMode:"both"}:{from:{transform:"translateY(0)",opacity:1},to:{transform:"translateY(100%)",opacity:0},duration:X,delay:oe,timingFunction:"ease-in",fillMode:"both"});const B={...T,display:"inline-block",marginRight:N?0:"0.25em",transform:p==="visible"?"translateY(0)":void 0,opacity:p==="visible"?1:void 0};return r.jsx(x,{as:"span",animate:U,...j,...B,children:M},`${y}-${V}-${L}`)})},`line-${V}`))})})};function ii(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}const dn=e=>{if(!e||typeof e!="string")return e;const o=e.split("|");return o.length===1?e:o.map((t,n)=>r.jsxs(h.Fragment,{children:[t,n<o.length-1&&r.jsx("br",{})]},n))},op=({children:e,highlightText:o,highlightStyle:t="solid",highlightColor:n="theme-primary",highlightSecondaryColor:a,size:l="lg",views:c,highlightAnimate:s,animate:d,animationLoop:g=1,highlightAnimationLoop:m=1,highlightTypewriter:f=!1,highlightTypewriterDuration:p=3e3,highlightSlide:u=!1,highlightSlideDuration:y=500,highlightSlideStagger:k=50,highlightSlideSequential:x=!0,centered:C=!1,level:S=1,themeMode:w,responsive:v,alternateHighlightText:b,alternateAnimation:I,alternateDuration:T,_isInView:j,...E})=>{const{ref:D,inView:W}=i.useInView(),{finalDisplayedText:A,activeHighlightTarget:H,highlightTypewriter:z,highlightSlide:P,highlightSlideDuration:V,highlightSlideStagger:M,highlightSlideSequential:L}=Xm({children:e,highlightText:o,_isInView:W,highlightTypewriter:f,highlightSlide:u,highlightSlideDuration:y,highlightSlideStagger:k,highlightSlideSequential:x,alternateHighlightText:b,alternateAnimation:I,alternateDuration:T,...E}),_=Jm[l],O={fontFamily:"Mulish, Inter, Geist, system-ui, sans-serif",fontWeight:l==="xl"?700:600,letterSpacing:l==="xl"?"-1.5px":"-0.01em"},N=Zm[t](n,a),U=(J,Y)=>J&&(Array.isArray(J)?J.map(Z=>({...Z,iterationCount:Y.toString()})):{...J,iterationCount:Y.toString()}),X=U(d,g),oe=U(s,m),B=typeof A=="string"?A:typeof e=="string"?e:"",$={ref:D,animate:W?X:void 0,as:`h${S}`,fontSize:_,...C?{textAlign:"center"}:{},...v?Qm[l]:{},...O},q=J=>!W&&(z||P)?r.jsx("span",{style:{opacity:0},children:J}):z?r.jsx(Rm,{text:J,typingSpeed:Math.max(30,p/(J.length*10)),cursorColor:"currentColor",...N}):P?r.jsx(ep,{text:J,duration:V,stagger:M,sequential:L,direction:"up",wordProps:N}):dn(J);if(typeof B=="string"&&H){const J=Array.isArray(H)?new RegExp(`(${H.map(ne=>ii(String(ne))).join("|")})`,"gi"):new RegExp(`(${ii(String(H))})`,"gi"),Y=[];let Z=0,ee;for(;ee=J.exec(B);)ee.index>Z&&Y.push(B.substring(Z,ee.index)),Y.push({highlight:!0,text:ee[0]}),Z=ee.index+ee[0].length;return Z<B.length&&Y.push(B.substring(Z)),r.jsx(i.Element,{...$,...c==null?void 0:c.container,...E,children:Y.map((ne,K)=>typeof ne=="string"?r.jsx(i.Text,{as:"span",display:"inline",...c==null?void 0:c.text,children:dn(ne)},`text-${K}`):r.jsx(i.Text,{as:"span",display:"inline",animate:W?oe:void 0,...P?{}:N,...c==null?void 0:c.highlight,children:q(ne.text)},`highlight-${K}`))})}return t&&!H?r.jsx(i.Element,{...$,...E,...c==null?void 0:c.container,children:r.jsx(i.Text,{as:"span",display:"inline",animate:W?oe:void 0,...P?{}:N,...c==null?void 0:c.highlight,children:q(B)})}):r.jsx(i.Text,{...$,...E,...c==null?void 0:c.container,...c==null?void 0:c.text,children:dn(B)})},ci=e=>r.jsx(op,{...e}),si=({items:e,shape:o,variant:t,onToggleChange:n})=>{const{activeToggles:a,setActiveToggles:l}=Vl();return r.jsx(Al,{items:e,shape:o,variant:t,activeToggles:a,setActiveToggles:l,onToggleChange:n})},rp=({items:e,onChange:o})=>{const[t,n]=h.useState(e),[a,l]=h.useState(null),[c,s]=h.useState(null),d=h.useRef({x:0,y:0}),g=h.useRef([]),m=h.useCallback((u,y)=>{u.preventDefault(),document.body.style.cursor="grabbing";const k="touches"in u?u.touches[0].clientX:u.clientX,x="touches"in u?u.touches[0].clientY:u.clientY;d.current={x:k,y:x},s(y),l(t[y])},[t]),f=h.useCallback(u=>{if(c===null)return;const y="touches"in u?u.touches[0].clientX:u.clientX,k="touches"in u?u.touches[0].clientY:u.clientY,x=g.current[c];if(!x)return;const C=y-d.current.x,S=k-d.current.y;x.style.transform=`translate(${C}px, ${S}px)`,x.style.zIndex="1000";const w=g.current.findIndex((v,b)=>{if(!v||b===c)return!1;const I=v.getBoundingClientRect();return k>=I.top&&k<=I.bottom});if(w!==-1&&w!==c){const v=[...t],[b]=v.splice(c,1);v.splice(w,0,b),n(v),s(w),o==null||o(v),d.current={x:y,y:k}}},[c,t,o]),p=h.useCallback(()=>{document.body.style.cursor="",g.current.forEach(u=>{u&&(u.style.transform="",u.style.zIndex="")}),s(null),l(null)},[c]);return h.useEffect(()=>{if(!(typeof window>"u"))return c!==null&&(window.addEventListener("mousemove",f),window.addEventListener("touchmove",f),window.addEventListener("mouseup",p),window.addEventListener("touchend",p)),()=>{window.removeEventListener("mousemove",f),window.removeEventListener("touchmove",f),window.removeEventListener("mouseup",p),window.removeEventListener("touchend",p)}},[c,f,p]),{items:t,draggedItem:a,draggedIndex:c,itemRefs:g,handleDragStart:m}},tp=({items:e,renderItem:o,containerProps:t,itemProps:n,draggedIndex:a,itemRefs:l,handleDragStart:c,views:s,themeMode:d})=>r.jsx(i.View,{overflow:"hidden",position:"relative",...t,...s==null?void 0:s.container,children:e.map((g,m)=>r.jsx(i.View,{ref:f=>{l.current[m]=f},onMouseDown:f=>c(f,m),onTouchStart:f=>c(f,m),position:"relative",cursor:"grab",transition:"transform 0.2s",...n,...s==null?void 0:s.item,children:o?o(g,m):g},m))}),di=e=>{const{items:o,draggedIndex:t,itemRefs:n,handleDragStart:a}=rp(e);return r.jsx(tp,{...e,items:o,draggedIndex:t,itemRefs:n,handleDragStart:a})},np=di,ap=({onFileSelect:e,onMultipleFileSelect:o,validateFile:t,accept:n,multiple:a,disabled:l,previewUrl:c})=>{const[s,d]=h.useState(!1),[g,m]=h.useState(null),f=h.useRef(null),p=c!==void 0?c:g;h.useEffect(()=>()=>{g&&URL.revokeObjectURL(g)},[g]);const u=h.useCallback(v=>{v.preventDefault(),v.stopPropagation(),!l&&d(!0)},[l]),y=h.useCallback(v=>{v.preventDefault(),v.stopPropagation(),!l&&d(!1)},[l]),k=h.useCallback(v=>{v.preventDefault(),v.stopPropagation(),!l&&d(!0)},[l]),x=h.useCallback(v=>{if(!v||v.length===0)return;const b=Array.from(v);if(!a&&b.length>0){const I=b[0];if(I.type.startsWith("image/")){const T=URL.createObjectURL(I);m(j=>(j&&URL.revokeObjectURL(j),T))}else m(null)}a?o&&o(b):b.length>0&&e&&e(b[0])},[a,o,e]),C=h.useCallback(v=>{v.preventDefault(),v.stopPropagation(),d(!1),!l&&v.dataTransfer.files&&v.dataTransfer.files.length>0&&(x(v.dataTransfer.files),v.dataTransfer.clearData())},[l,x]),S=h.useCallback(()=>{var v;l||(v=f.current)==null||v.click()},[l]),w=h.useCallback(v=>{x(v.target.files),v.target.value&&(v.target.value="")},[x]);return{isDragActive:s,handleDragEnter:u,handleDragLeave:y,handleDragOver:k,handleDrop:C,handleClick:S,handleFileChange:w,inputRef:f,preview:p}},lp={position:"absolute",top:"-4px",right:"-4px",width:"16px",height:"16px",borderRadius:"50%",backgroundColor:"rgba(0, 0, 0, 0.5)",color:"white",border:"none",padding:0,display:"flex",alignItems:"center",justifyContent:"center",cursor:"pointer",fontSize:"12px",zIndex:10,_hover:{backgroundColor:"rgba(0, 0, 0, 0.7)"}},gi=({files:e,sandboxId:o,onRemove:t,layout:n="inline",maxHeight:a="120px",showPreviews:l=!1,views:c={}})=>{if(e.length===0)return null;const s=h.useCallback(g=>g<1024?`${g} B`:g<1024*1024?`${(g/1024).toFixed(1)} KB`:`${(g/(1024*1024)).toFixed(1)} MB`,[]),d=h.useCallback(g=>g.type.startsWith("image/")?{backgroundColor:"#DBEAFE",color:"#2563EB"}:g.type.startsWith("video/")?{backgroundColor:"#EDE9FE",color:"#7C3AED"}:g.type.startsWith("audio/")?{backgroundColor:"#DCFCE7",color:"#16A34A"}:{backgroundColor:"#E2E8F0",color:"#475569"},[]);return r.jsx(i.View,{display:"flex",flexWrap:"wrap",gap:"8px",padding:"8px 0",maxHeight:a,overflowY:"auto",...c==null?void 0:c.container,children:e.map((g,m)=>{const f=typeof URL<"u"&&typeof URL.createObjectURL=="function"&&typeof Blob<"u"&&g instanceof Blob,p=(g==null?void 0:g.path)||(g==null?void 0:g.url)||(l&&f?URL.createObjectURL(g):""),u=g.type.startsWith("image/"),y=g.type.startsWith("video/"),k=g.type.startsWith("audio/"),x=d(g);return l?r.jsx(i.Vertical,{alignItems:"center",gap:"6px",padding:"6px 10px",borderRadius:"8px",border:"1px solid #E2E8F0",backgroundColor:"color-white",animate:{from:{opacity:0,scale:.9},to:{opacity:1,scale:1}},animationDuration:.2,...c==null?void 0:c.item,children:l&&r.jsxs(Me,{children:[r.jsxs(Me.Trigger,{children:[u&&r.jsx(i.Image,{src:p,alt:g.name,width:"60px",height:"60px",borderRadius:"8px",objectFit:"cover"}),y&&r.jsx(i.View,{as:"video",src:p,alt:g.name,controls:!1,muted:!0,width:"60px",height:"60px",borderRadius:"8px",objectFit:"cover"}),k&&r.jsx(i.Center,{width:"60px",height:"60px",borderRadius:"8px",backgroundColor:"color-gray-100",children:r.jsx(Fo,{widthHeight:24,color:"color-black"})}),!u&&!y&&!k&&r.jsx(i.Center,{width:"60px",height:"60px",borderRadius:"8px",backgroundColor:"color-gray-100",children:r.jsx(go,{widthHeight:24,color:"color-black"})}),t&&r.jsx(i.Button,{...lp,onClick:C=>{C.stopPropagation(),t(m)},"aria-label":`Remove ${g.name}`,children:"×"})]}),r.jsxs(Me.Content,{children:[u&&r.jsx(i.Image,{src:p,alt:g.name,maxWidth:"100%"}),y&&r.jsx(i.View,{as:"video",src:p,controls:!0,maxWidth:"100%"}),k&&r.jsx(i.View,{as:"audio",src:p,controls:!0,width:"100%"}),r.jsxs(i.Text,{marginTop:"4px",maxLines:1,width:"100%",...c==null?void 0:c.name,children:[g.name," (",s(g.size),")"]})]})]})},m):r.jsxs(i.Horizontal,{alignItems:"center",gap:"8px",padding:"6px 10px 6px 8px",borderRadius:"9999px",border:"1px solid #E2E8F0",backgroundColor:"color-white",maxWidth:"100%",animate:{from:{opacity:0,scale:.96},to:{opacity:1,scale:1}},animationDuration:.2,...c==null?void 0:c.item,children:[r.jsx(i.Center,{width:"22px",height:"22px",minWidth:"22px",borderRadius:"9999px",backgroundColor:x.backgroundColor,color:x.color,children:k?r.jsx(Fo,{widthHeight:12,color:"currentColor"}):r.jsx(go,{widthHeight:12,color:"currentColor"})}),r.jsxs(i.Text,{fontSize:"12px",lineHeight:"16px",color:"color-gray-600",maxLines:1,maxWidth:"220px",...c==null?void 0:c.name,children:[g.name," · ",s(g.size)]}),t&&r.jsx(i.View,{as:"button",type:"button",onClick:()=>t(m),"aria-label":`Remove ${g.name}`,display:"flex",alignItems:"center",justifyContent:"center",width:"16px",height:"16px",minWidth:"16px",border:"none",backgroundColor:"transparent",color:"color-gray-400",padding:0,cursor:"pointer",transition:"color 0.2s ease, opacity 0.2s ease",_hover:{color:"color-gray-600"},children:"×"})]},m)})})},ip=({children:e,text:o="Drop files here or click to upload",textProps:t,containerProps:n,disabled:a,accept:l,multiple:c,isDragActive:s,handleDragEnter:d,handleDragLeave:g,handleDragOver:m,handleDrop:f,handleClick:p,handleFileChange:u,inputRef:y,preview:k,imageProps:x,selectedFiles:C,onRemove:S})=>r.jsxs(i.Center,{width:"100%",minHeight:"200px",height:C&&C.length>0?"auto":"200px",borderWidth:2,borderStyle:"dashed",borderColor:s?"theme-primary":"color-gray-300",borderRadius:12,backgroundColor:s?"#EFF6FF":"color-gray-50",flexDirection:"column",cursor:a?"not-allowed":"pointer",opacity:a?.6:1,onClick:p,onDragEnter:d,onDragLeave:g,onDragOver:m,onDrop:f,transition:"background-color 0.2s ease, border-color 0.2s ease, opacity 0.2s ease",overflow:"hidden",position:"relative",padding:16,...n,children:[r.jsx("input",{type:"file",ref:y,onChange:u,accept:l,multiple:c,style:{display:"none"},disabled:a}),k&&!c?r.jsxs(i.View,{width:"100%",height:"200px",position:"relative",children:[r.jsx(i.Image,{src:k,alt:"Preview",width:"100%",height:"100%",objectFit:"contain",...x}),r.jsx(i.Center,{position:"absolute",top:0,left:0,right:0,bottom:0,backgroundColor:"rgba(0,0,0,0.3)",opacity:0,_hover:{opacity:1},transition:"opacity 0.2s",children:r.jsx(i.Text,{color:"white",fontWeight:600,children:"Click to replace"})})]}):r.jsxs(i.View,{flexDirection:"column",alignItems:"center",width:"100%",children:[e||r.jsxs(i.View,{flexDirection:"column",alignItems:"center",width:"100%",children:[r.jsx(wt,{widthHeight:40,color:s?"theme-primary":"color-gray-500"}),r.jsx(i.Text,{marginTop:16,color:s?"theme-primary":"color-gray-600",fontWeight:500,textAlign:"center",...t,children:o})]}),c&&C&&C.length>0&&r.jsx(i.View,{marginTop:16,width:"100%",children:r.jsx(gi,{files:C,onRemove:S||(()=>{}),showPreviews:!0,layout:"inline",maxHeight:"160px"})})]})]}),cp=e=>{const o=ap(e);return r.jsx(ip,{...e,...o})},sp=(e=!1)=>{const[o,t]=h.useState(e),[n,a]=h.useState(null);return h.useEffect(()=>{const l=d=>{!d.composedPath().some(f=>(f==null?void 0:f.id)==="dropdown-menu"||(f==null?void 0:f.id)==="dropdown-trigger")&&o&&(t(!1),a(null))},c=()=>{o&&(t(!1),a(null))},s=d=>{d.key==="Escape"&&o&&(t(!1),a(null))};if(!(typeof document>"u"||typeof window>"u"))return document.addEventListener("mousedown",l),window.addEventListener("resize",c),document.addEventListener("keydown",s),()=>{document.removeEventListener("mousedown",l),window.removeEventListener("resize",c),document.removeEventListener("keydown",s)}},[o]),{isOpen:o,setIsOpen:t,activeSubmenuId:n,setActiveSubmenuId:a}},dp={sm:{padding:"6px 8px",fontSize:"14px",minWidth:"160px"},md:{padding:"8px 12px",fontSize:"16px",minWidth:"180px"},lg:{padding:"10px 16px",fontSize:"18px",minWidth:"200px"}},gp={default:{backgroundColor:"color-white",color:"color-gray-800"},filled:{backgroundColor:"color-gray-100",color:"color-gray-800"},outline:{backgroundColor:"color-white",borderWidth:"1px",borderStyle:"solid",borderColor:"color-gray-200",color:"color-gray-800"}},hp={hover:{backgroundColor:"color-gray-100"}},hi=h.createContext({isOpen:!1,setIsOpen:()=>{},activeSubmenuId:null,setActiveSubmenuId:()=>{},size:"md",variant:"default",triggerRef:{current:null}}),fp=({children:e,value:o})=>r.jsx(hi.Provider,{value:o,children:e}),gn=()=>{const e=h.useContext(hi);if(!e)throw new Error("useDropdownMenuContext must be used within a DropdownMenuProvider");return e},fi=({children:e,views:o,...t})=>{const{isOpen:n,setIsOpen:a,triggerRef:l}=gn(),c=s=>{s.stopPropagation(),a(!n)};return r.jsx(i.View,{ref:l,id:"dropdown-trigger",onClick:c,cursor:"pointer",position:"relative",display:"inline-block",...o==null?void 0:o.container,...t,children:e})},hn=({items:e,side:o="bottom",align:t="start",views:n,...a})=>{const{isOpen:l,variant:c,triggerRef:s}=gn(),d=h.useRef(null),{ref:g,relation:m}=i.useElementPosition({trackChanges:!0,trackOnHover:!0,trackOnScroll:!0,trackOnResize:!0}),[f,p]=h.useState({x:0,y:0,placement:o});if(h.useEffect(()=>{s.current&&g&&(g.current=s.current)},[s,g,l]),h.useEffect(()=>{if(l&&d.current&&s.current){const k=s.current.getBoundingClientRect();let x=o;m&&(o==="bottom"&&m.space.vertical==="top"?x="top":o==="top"&&m.space.vertical==="bottom"?x="bottom":o==="right"&&m.space.horizontal==="left"?x="left":o==="left"&&m.space.horizontal==="right"&&(x="right"));let C=0,S=0;switch(x){case"bottom":C=t==="start"?k.left:t==="end"?k.right-180:k.left+k.width/2-90,S=k.bottom+8;break;case"top":C=t==="start"?k.left:t==="end"?k.right-180:k.left+k.width/2-90,S=k.top-8;break;case"right":C=k.right+8,S=t==="start"?k.top:t==="end"?k.bottom-100:k.top+k.height/2-50;break;case"left":C=k.left-8,S=t==="start"?k.top:t==="end"?k.bottom-100:k.top+k.height/2-50;break}p({x:C,y:S,placement:x})}},[l,o,t,s,m]),!l)return null;const y=(()=>{const k={position:"fixed",left:f.x,top:f.y,zIndex:1e3};switch(f.placement){case"top":return{...k,transform:"translateY(-100%)"};case"left":return{...k,transform:"translateX(-100%)"};case"bottom":case"right":default:return k}})();return r.jsx(i.View,{ref:d,id:"dropdown-menu",borderRadius:4,boxShadow:"0px 2px 8px rgba(0, 0, 0, 0.15)",overflow:"hidden",style:y,...gp[c],...n==null?void 0:n.menu,...a,children:e.map((k,x)=>k.divider?r.jsx(pi,{views:n},`divider-${x}`):r.jsx(mi,{item:k,views:n},k.id))})},mi=({item:e,views:o,...t})=>{const{activeSubmenuId:n,setActiveSubmenuId:a,size:l}=gn(),[c,s]=h.useState(!1),d=e.items&&e.items.length>0,g=n===e.id,m=h.useRef(null),f=()=>{s(!0),d&&a(e.id)},p=()=>{s(!1)},u=y=>{y.stopPropagation(),!e.disabled&&!d&&e.onClick&&e.onClick()};return r.jsxs(i.View,{ref:m,display:"flex",alignItems:"center",cursor:e.disabled?"not-allowed":"pointer",opacity:e.disabled?.5:1,position:"relative",...dp[l],_hover:e.disabled?{}:hp.hover,backgroundColor:c&&!e.disabled?"color-gray-100":"transparent",onMouseEnter:f,onMouseLeave:p,onClick:u,...o==null?void 0:o.item,...t,children:[e.icon&&r.jsx(i.View,{marginRight:8,...o==null?void 0:o.icon,children:e.icon}),r.jsx(i.View,{flexGrow:1,children:e.label}),d&&r.jsx(i.View,{marginLeft:8,...o==null?void 0:o.submenuIndicator,children:r.jsx(he,{orientation:"right",widthHeight:16,color:"currentColor",filled:!0})}),g&&d&&r.jsx(hn,{items:e.items||[],side:"right",align:"start",views:o})]})},pi=({views:e,...o})=>r.jsx(i.View,{height:"1px",backgroundColor:"color-gray-200",margin:"4px 0",...e==null?void 0:e.divider,...o}),mp=({trigger:e,items:o,side:t="bottom",align:n="start",views:a,themeMode:l,...c})=>r.jsxs(i.View,{position:"relative",display:"inline-block",...a==null?void 0:a.container,...c,children:[r.jsx(fi,{views:a,children:e}),r.jsx(hn,{items:o,side:t,align:n,views:a})]}),ir=({trigger:e,items:o,size:t="md",variant:n="default",side:a="bottom",align:l="start",defaultOpen:c=!1,views:s,...d})=>{const{isOpen:g,setIsOpen:m,activeSubmenuId:f,setActiveSubmenuId:p}=sp(c),u=h.useRef(null);return r.jsx(fp,{value:{isOpen:g,setIsOpen:m,activeSubmenuId:f,setActiveSubmenuId:p,size:t,variant:n,triggerRef:u},children:r.jsx(mp,{trigger:e,items:o,side:a,align:l,views:s,...d})})};ir.Trigger=fi,ir.Content=hn,ir.Item=mi,ir.Divider=pi;const pp=e=>{const{value:o,defaultValue:t="",onChange:n,onChangeComplete:a,isOpen:l,onOpen:c,onClose:s,closeOnSelect:d=!0,maxRecentColors:g=8,showRecentColors:m=!0,colorFormat:f}=e,[p,u]=h.useState(l??!1),[y,k]=h.useState(o??t),[x,C]=h.useState(""),[S,w]=h.useState([]),v=h.useRef(null),b=h.useRef(null);h.useEffect(()=>{o!==void 0&&k(o)},[o]),h.useEffect(()=>{l!==void 0&&u(l)},[l]),h.useEffect(()=>{if(m&&typeof localStorage<"u"){const A=localStorage.getItem("colorPicker-recentColors");if(A)try{w(JSON.parse(A))}catch{}}},[m]),h.useEffect(()=>{if(typeof document>"u"||typeof document.addEventListener!="function")return;const A=H=>{p&&v.current&&b.current&&!v.current.contains(H.target)&&!b.current.contains(H.target)&&W()};return document.addEventListener("mousedown",A),()=>document.removeEventListener("mousedown",A)},[p]);const I=h.useCallback(A=>{m&&w(H=>{const z=H.filter(V=>V!==A),P=[A,...z].slice(0,g);return typeof localStorage<"u"&&localStorage.setItem("colorPicker-recentColors",JSON.stringify(P)),P})},[m,g]),T=h.useCallback(()=>{const A=!p;u(A),A?c==null||c():s==null||s()},[p,c,s]),j=h.useCallback(A=>{k(A),I(A);const H=$r(A,f);n==null||n(H),a==null||a(H),d&&(u(!1),s==null||s())},[n,a,d,s,I,f]),E=h.useCallback(A=>{C(A)},[]),D=h.useCallback(()=>{x&&(j(x),C(""))},[x,j]),W=h.useCallback(()=>{u(!1),s==null||s()},[s]);return{isOpen:p,selectedColor:y,recentColors:S,customColor:x,handleToggle:T,handleColorSelect:j,handleCustomColorChange:E,handleCustomColorSubmit:D,handleClose:W,triggerRef:v,dropdownRef:b}},$o={container:{position:"relative",display:"inline-block",width:"100%"},trigger:{display:"flex",alignItems:"center",justifyContent:"space-between",cursor:"pointer",transition:"background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease"},dropdown:{position:"absolute",top:"calc(100% + 8px)",left:0,right:0,zIndex:1e3,backgroundColor:"color-white",borderRadius:12,borderWidth:"1px",borderStyle:"solid",borderColor:"color-gray-200",boxShadow:"0 12px 32px rgba(15, 23, 42, 0.14)",padding:"16px",minWidth:"320px"},colorGrid:{display:"grid",gridTemplateColumns:"repeat(6, 36px)",flexDirection:"row",flexWrap:"wrap",justifyContent:"flex-start",gap:"12px",marginBottom:"16px"},customInput:{marginBottom:"12px"},recentColors:{borderTop:"1px solid color-gray-100",paddingTop:"12px"}},up={xs:{height:"32px",fontSize:"12px",padding:"4px 8px"},sm:{height:"40px",fontSize:"12px",padding:"8px 10px"},md:{height:"44px",fontSize:"14px",padding:"10px 12px"},lg:{height:"48px",fontSize:"16px",padding:"12px 14px"},xl:{height:"56px",fontSize:"18px",padding:"14px 16px"}},yp={default:{borderRadius:8},square:{borderRadius:0},rounded:{borderRadius:8},pill:{borderRadius:9999}},bp={default:{backgroundColor:"color-white",borderWidth:"1px",borderStyle:"solid",borderColor:"color-gray-200",color:"color-gray-900"},outline:{backgroundColor:"color-white",borderWidth:"1px",borderStyle:"solid",borderColor:"color-gray-200",color:"color-gray-900"},filled:{backgroundColor:"color-gray-50",borderWidth:"1px",borderStyle:"solid",borderColor:"color-gray-200",color:"color-gray-900"}},xp=[{name:"Blue",value:"#1D4ED8",category:"primary"},{name:"Purple",value:"#A855F7",category:"primary"},{name:"Green",value:"#22C55E",category:"primary"},{name:"Orange",value:"#F97316",category:"primary"},{name:"Red",value:"#EF4444",category:"primary"},{name:"Ink",value:"#111827",category:"neutral"}],kp=typeof navigator<"u"&&navigator.product!=="ReactNative"&&typeof document<"u"&&typeof document.createElement=="function",Cp=({id:e,name:o,label:t,placeholder:n="Select a color",helperText:a,views:l={},size:c="md",shape:s="default",variant:d="default",error:g=!1,isDisabled:m=!1,isReadOnly:f=!1,predefinedColors:p=xp,showCustomInput:u=!0,showRecentColors:y=!0,isOpen:k,selectedColor:x,recentColors:C,customColor:S,handleToggle:w,handleColorSelect:v,handleCustomColorChange:b,handleCustomColorSubmit:I,handleClose:T,triggerRef:j,dropdownRef:E,onChange:D,onChangeComplete:W,onOpen:A,onClose:H,colorFormat:z,maxRecentColors:P,closeOnSelect:V,defaultValue:M,value:L,..._})=>{const O={...$o.container,...l==null?void 0:l.container},N={...$o.trigger,...up[c],...yp[s],...bp[d],...g&&{borderColor:"color-red-500"},...m&&{opacity:.6,cursor:"not-allowed"},...!m&&!f&&{_hover:{borderColor:"color-gray-400"}},...l==null?void 0:l.trigger},U={...$o.dropdown,...l==null?void 0:l.dropdown},X={...$o.colorGrid,...l==null?void 0:l.colorGrid},oe={...$o.recentColors,...l==null?void 0:l.recentColors},B=x||"color-gray-200";return r.jsxs(i.View,{id:e,...O,..._,children:[t&&r.jsx(i.Text,{fontSize:"12px",lineHeight:"16px",fontWeight:"500",color:"color-gray-600",marginBottom:"6px",...l==null?void 0:l.label,children:t}),r.jsxs(i.View,{ref:j,onClick:m||f?void 0:w,...N,children:[r.jsxs(i.Horizontal,{alignItems:"center",gap:8,children:[r.jsx(i.View,{width:"24px",height:"24px",borderRadius:"8px",backgroundColor:B,borderWidth:"1px",borderStyle:"solid",borderColor:"color-gray-200"}),r.jsx(i.Text,{color:x?"color-gray-900":"color-gray-500",fontSize:"inherit",children:x||n})]}),!f&&!m&&r.jsx(he,{widthHeight:16,color:"color-gray-500",orientation:k?"up":"down"})]}),k&&r.jsxs(i.View,{ref:E,...U,children:[r.jsx(i.View,{...X,children:p.map(($,q)=>r.jsx(i.View,{width:"36px",height:"36px",borderRadius:"8px",backgroundColor:$.value,borderWidth:"1px",borderStyle:"solid",borderColor:x===$.value?"theme-primary":"transparent",cursor:"pointer",onClick:()=>v($.value),title:$.name,_hover:{transform:"scale(1.05)",borderColor:"color-gray-300"},...l==null?void 0:l.colorSwatch},q))}),u&&r.jsxs(i.View,{...$o.customInput,...l==null?void 0:l.customInput,children:[r.jsxs(i.Horizontal,{gap:8,alignItems:"center",marginBottom:"10px",children:[kp&&r.jsx("input",{type:"color",value:S||"#1D4ED8",onChange:$=>{const q=$.target.value;b(q),v(q)},style:{width:"36px",height:"36px",border:"1px solid #E5E7EB",borderRadius:"8px",cursor:"pointer",backgroundColor:"transparent"},title:"Pick a color"}),r.jsx(i.Text,{fontSize:"12px",lineHeight:"16px",color:"color-gray-500",children:"HEX"})]}),r.jsx(je,{placeholder:"#1D4ED8",value:S,onChange:$=>{var q;return b(typeof $=="string"?$:((q=$==null?void 0:$.target)==null?void 0:q.value)??"")},onKeyPress:$=>{$.key==="Enter"&&I()},size:"sm",right:S&&r.jsx(i.View,{width:"18px",height:"18px",borderRadius:"6px",backgroundColor:S,borderWidth:"1px",borderStyle:"solid",borderColor:"color-gray-200",cursor:"pointer",onClick:I})})]}),y&&C.length>0&&r.jsxs(i.View,{...oe,children:[r.jsx(i.Text,{fontSize:"11px",lineHeight:"16px",fontWeight:"500",color:"color-gray-500",marginBottom:"8px",children:"Recent Colors"}),r.jsx(i.Horizontal,{gap:8,flexWrap:"wrap",children:C.map(($,q)=>r.jsx(i.View,{width:"24px",height:"24px",borderRadius:"8px",backgroundColor:$,borderWidth:"1px",borderStyle:"solid",borderColor:"color-gray-200",cursor:"pointer",transition:"transform 0.2s ease, border-color 0.2s ease",onClick:()=>v($),title:$,_hover:{transform:"scale(1.05)",borderColor:"color-gray-300"}},q))})]})]}),a&&r.jsx(i.Text,{fontSize:"11px",lineHeight:"16px",color:g?"color-red-500":"color-gray-500",marginTop:"4px",...l==null?void 0:l.helperText,children:a})]})},ui=e=>{const o=pp(e);return r.jsx(Cp,{...o,...e})},wp=e=>{const o=Ll(e);return r.jsx(_l,{...o,...e})},Sp=e=>{const o=Dl(e);return r.jsx($l,{...o,...e})},yi={"to-right":"to right","to-left":"to left","to-bottom":"to bottom","to-top":"to top","to-top-right":"to top right","to-top-left":"to top left","to-bottom-right":"to bottom right","to-bottom-left":"to bottom left"},Ur={center:"center",top:"top",right:"right",bottom:"bottom",left:"left","top-right":"top right","top-left":"top left","bottom-right":"bottom right","bottom-left":"bottom left"},vp={linear:[{color:"color-blue-500",position:"0%"},{color:"color-purple-500",position:"100%"}],radial:[{color:"color-blue-500",position:"0%"},{color:"color-purple-500",position:"100%"}],conic:[{color:"color-red-500",position:"0deg"},{color:"color-yellow-500",position:"90deg"},{color:"color-green-500",position:"180deg"},{color:"color-blue-500",position:"270deg"},{color:"color-red-500",position:"360deg"}]},Tp=(e,o,t,n,a)=>{const l=o.map(c=>`${c.color} ${c.position||""}`).join(", ");switch(e){case"linear":return`linear-gradient(${t&&yi[t]?yi[t]:t||"to right"}, ${l})`;case"radial":const s=a&&Ur[a]?Ur[a]:a||"center";return`radial-gradient(${n||"circle"} at ${s}, ${l})`;case"conic":return`conic-gradient(from 0deg at ${a&&Ur[a]?Ur[a]:a||"center"}, ${l})`;default:return`linear-gradient(to right, ${l})`}},Ip={linear:{backgroundSize:"200% 200%",transition:"background-position 3s ease-in-out",animate:{from:{backgroundPosition:"0% 50%"},"50%":{backgroundPosition:"100% 50%"},to:{backgroundPosition:"0% 50%"}}},radial:{backgroundSize:"100% 100%",transition:"background-position 3s ease-in-out, background-size 3s ease-in-out",animate:{from:{backgroundPosition:"center",backgroundSize:"100% 100%"},"50%":{backgroundSize:"120% 120%"},to:{backgroundPosition:"center",backgroundSize:"100% 100%"}}},conic:{transition:"transform 3s linear",animate:{from:{transform:"rotate(0deg)"},to:{transform:"rotate(360deg)"}}}},bi={container:{position:"relative",overflow:"hidden",borderRadius:"8px",transition:"border-radius 0.2s ease, opacity 0.2s ease"},content:{position:"relative",zIndex:1,width:"100%",height:"100%",padding:"16px"}},Fp=({type:e="linear",direction:o="to-right",shape:t="circle",position:n="center",from:a,to:l,colors:c,animate:s=!1,animationDuration:d=3,children:g,views:m,themeMode:f,...p})=>{const u=h.useMemo(()=>c&&c.length>0?c:a&&l?[{color:a,position:"0%"},{color:l,position:"100%"}]:vp[e],[c,a,l,e]),y=h.useMemo(()=>{const x=u.map(C=>({...C,color:C.color}));return Tp(e,x,o,t,n)},[e,u,o,t,n]),k=h.useMemo(()=>{if(!s)return{};const x=Ip[e];return{...x,transition:x.transition.replace("3s",`${d}s`),animationDuration:`${d}s`,animationIterationCount:"infinite",animationTimingFunction:e==="conic"?"linear":"ease-in-out"}},[s,d,e]);return r.jsx(i.View,{background:y,...bi.container,...k,...m==null?void 0:m.container,...p,children:g&&r.jsx(i.View,{...bi.content,...m==null?void 0:m.content,children:g})})},xi=e=>r.jsx(Fp,{...e}),zp=(e=null,o=null)=>{const[t,n]=h.useState(e),[a,l]=h.useState(o),c=d=>a===d,s=d=>{l(g=>g===d?null:d)};return h.useEffect(()=>{const d=m=>{!m.composedPath().some(u=>(u==null?void 0:u.id)==="menubar-content"||(u==null?void 0:u.id)==="menubar-trigger")&&a!==null&&l(null)},g=m=>{m.key==="Escape"&&a!==null&&l(null)};if(!(typeof document>"u"))return document.addEventListener("mousedown",d),document.addEventListener("keydown",g),()=>{document.removeEventListener("mousedown",d),document.removeEventListener("keydown",g)}},[a]),{activeMenuId:t,setActiveMenuId:n,openMenuId:a,setOpenMenuId:l,isMenuOpen:c,toggleMenu:s}},ki={sm:{padding:"6px 10px",fontSize:"14px"},md:{padding:"8px 12px",fontSize:"16px"},lg:{padding:"10px 16px",fontSize:"18px"}},Mp={default:{backgroundColor:"transparent",color:"color-gray-800"},filled:{backgroundColor:"color-gray-100",color:"color-gray-800"},outline:{backgroundColor:"transparent",borderWidth:"1px",borderStyle:"solid",borderColor:"color-gray-200",color:"color-gray-800"}},Wp={horizontal:{flexDirection:"row"},vertical:{flexDirection:"column"}},Gr={active:{backgroundColor:"color-gray-200",fontWeight:"bold"},hover:{backgroundColor:"color-gray-100"},disabled:{opacity:.5,cursor:"not-allowed"}},Ci=h.createContext({activeMenuId:null,setActiveMenuId:()=>{},openMenuId:null,setOpenMenuId:()=>{},isMenuOpen:()=>!1,toggleMenu:()=>{},orientation:"horizontal",size:"md",variant:"default",triggerRefs:{current:{}}}),Yr=()=>h.useContext(Ci),Hp=({value:e,children:o})=>r.jsx(Ci.Provider,{value:e,children:o}),wi=({children:e,orientation:o="horizontal",size:t="md",variant:n="default",views:a,...l})=>{const c=o==="horizontal"?i.Horizontal:i.Vertical;return r.jsx(c,{role:"menubar","aria-orientation":o,...Wp[o],...Mp[n],...a==null?void 0:a.container,...l,children:e})},Si=({children:e,id:o,disabled:t=!1,views:n})=>{const{orientation:a}=Yr(),l=a==="horizontal"?i.Horizontal:i.Vertical;return r.jsx(l,{role:"none",position:"relative",opacity:t?.5:1,pointerEvents:t?"none":"auto",...n==null?void 0:n.menu,children:h.Children.map(e,c=>h.isValidElement(c)?h.cloneElement(c,{...c.props,menuId:o}):c)})},vi=({children:e,menuId:o,disabled:t=!1,views:n})=>{const{activeMenuId:a,setActiveMenuId:l,toggleMenu:c,isMenuOpen:s,size:d,triggerRefs:g}=Yr(),m=h.useRef(null),f=a===o,p=s(o);h.useEffect(()=>(m.current&&o&&(g.current[o]=m.current),()=>{o&&delete g.current[o]}),[o,g]);const u=()=>{t||(l(o),c(o))};return r.jsx(i.View,{ref:m,id:"menubar-trigger",role:"menuitem","aria-haspopup":"true","aria-expanded":p,userSelect:"none",display:"flex",alignItems:"center",justifyContent:"space-between",...ki[d],...f?Gr.active:{},...t?Gr.disabled:{},_hover:t?{}:Gr.hover,onClick:u,...n==null?void 0:n.trigger,children:e})},Ti=({children:e,menuId:o,views:t})=>{const{isMenuOpen:n,orientation:a,triggerRefs:l}=Yr(),c=h.useRef(null),[s,d]=h.useState({x:0,y:0,placement:a==="horizontal"?"bottom":"right"}),g=n(o);if(h.useEffect(()=>{if(g&&c.current&&o&&l.current[o]){const f=c.current.getBoundingClientRect(),p=l.current[o].getBoundingClientRect(),u=Math.max(f.width||200,200),y=Math.max(f.height||150,150),k=window.innerWidth,x=window.innerHeight,C={top:p.top,right:k-p.right,bottom:x-p.bottom,left:p.left},S=a==="horizontal"?[{placement:"bottom",space:C.bottom,fits:C.bottom>=y+8,x:p.left,y:p.bottom+8},{placement:"top",space:C.top,fits:C.top>=y+8,x:p.left,y:p.top-y-8},{placement:"right",space:C.right,fits:C.right>=u+8,x:p.right+8,y:p.top},{placement:"left",space:C.left,fits:C.left>=u+8,x:p.left-u-8,y:p.top}]:[{placement:"right",space:C.right,fits:C.right>=u+8,x:p.right+8,y:p.top},{placement:"left",space:C.left,fits:C.left>=u+8,x:p.left-u-8,y:p.top},{placement:"bottom",space:C.bottom,fits:C.bottom>=y+8,x:p.left,y:p.bottom+8},{placement:"top",space:C.top,fits:C.top>=y+8,x:p.left,y:p.top-y-8}],w=S.find(T=>T.fits);if(w){d({x:w.x,y:w.y,placement:w.placement});return}const v=S.reduce((T,j)=>j.space>T.space?j:T);let b=v.x,I=v.y;b+u>k&&(b=k-u-8),b<8&&(b=8),I+y>x&&(I=x-y-8),I<8&&(I=8),d({x:b,y:I,placement:v.placement})}},[g,a,o,l]),!g)return null;const m={position:"fixed",left:s.x,top:s.y,zIndex:1e3};return r.jsx(i.View,{ref:c,id:"menubar-content",role:"menu",minWidth:"200px",backgroundColor:"color-white",borderRadius:4,boxShadow:"0px 2px 8px rgba(0, 0, 0, 0.15)",overflow:"hidden",style:m,...t==null?void 0:t.content,children:e})},Ii=({children:e,icon:o,disabled:t=!1,onClick:n,views:a})=>{const{size:l}=Yr(),c=()=>{t||!n||n()};return r.jsxs(i.View,{role:"menuitem",cursor:t?"not-allowed":"pointer",userSelect:"none",display:"flex",alignItems:"center",opacity:t?.5:1,...ki[l],_hover:t?{}:Gr.hover,onClick:c,...a==null?void 0:a.item,children:[o&&r.jsx(i.View,{marginRight:8,...a==null?void 0:a.icon,children:o}),e]})},Fi=({views:e})=>r.jsx(i.View,{role:"separator",height:"1px",backgroundColor:"color-gray-200",margin:"4px 0",...e==null?void 0:e.separator}),jp=({items:e,orientation:o,size:t,variant:n,views:a,themeMode:l})=>r.jsx(wi,{orientation:o,size:t,variant:n,views:a,children:e.map(c=>r.jsxs(Si,{id:c.id,disabled:c.disabled,views:a,children:[r.jsxs(vi,{menuId:c.id,views:a,children:[c.icon&&r.jsx(i.View,{marginRight:8,...a==null?void 0:a.icon,children:c.icon}),c.label]}),c.items&&c.items.length>0&&r.jsx(Ti,{menuId:c.id,views:a,children:c.items.map((s,d)=>s.separator?r.jsx(Fi,{views:a},`separator-${d}`):r.jsx(Ii,{id:s.id,icon:s.icon,disabled:s.disabled,onClick:s.onClick,views:a,children:s.label},s.id))})]},c.id))}),xo=({items:e,orientation:o="horizontal",size:t="md",variant:n="default",defaultActiveMenuId:a=null,defaultOpenMenuId:l=null,views:c,...s})=>{const{activeMenuId:d,setActiveMenuId:g,openMenuId:m,setOpenMenuId:f,isMenuOpen:p,toggleMenu:u}=zp(a,l),y=h.useRef({});return r.jsx(Hp,{value:{activeMenuId:d,setActiveMenuId:g,openMenuId:m,setOpenMenuId:f,isMenuOpen:p,toggleMenu:u,orientation:o,size:t,variant:n,triggerRefs:y},children:r.jsx(jp,{items:e,orientation:o,size:t,variant:n,views:c,...s})})};xo.Root=wi,xo.Menu=Si,xo.Trigger=vi,xo.Content=Ti,xo.Item=Ii,xo.Separator=Fi;const Pp=(e,o,t)=>{const[n,a]=h.useState([]);return h.useEffect(()=>{a((()=>{const c=[];if(o<=t)for(let s=1;s<=o;s++)c.push(s);else{c.push(1);let s=Math.max(2,e-Math.floor((t-2)/2)),d=Math.min(o-1,s+t-3);d>=o-1&&(d=o-1,s=Math.max(2,d-(t-3))),s>2&&c.push("...");for(let g=s;g<=d;g++)c.push(g);d<o-1&&c.push("..."),c.push(o)}return c})())},[e,o,t]),{visiblePageNumbers:n}},Lo={sm:{fontSize:"12px",padding:"4px 8px",minWidth:"28px",height:"28px",media:{mobile:{fontSize:"11px",padding:"3px 6px",minWidth:"24px",height:"24px"}}},md:{fontSize:"14px",padding:"6px 10px",minWidth:"32px",height:"32px",media:{mobile:{fontSize:"12px",padding:"4px 8px",minWidth:"28px",height:"28px"}}},lg:{fontSize:"14px",padding:"8px 12px",minWidth:"36px",height:"36px",media:{mobile:{fontSize:"12px",padding:"4px 8px",minWidth:"28px",height:"28px"}}}},cr={default:{backgroundColor:"transparent",color:"color-gray-800",borderWidth:"0px",borderStyle:"none",transition:"all 0.2s ease-in-out",_hover:{backgroundColor:"color-gray-100"}},filled:{backgroundColor:"color-gray-100",color:"color-gray-800",borderWidth:"0px",borderStyle:"none",transition:"all 0.2s ease-in-out",_hover:{backgroundColor:"color-gray-200"}},outline:{backgroundColor:"transparent",borderWidth:"1px",borderStyle:"solid",borderColor:"color-gray-200",color:"color-gray-800",transition:"all 0.2s ease-in-out",_hover:{backgroundColor:"color-gray-100"}}},sr={rounded:{borderRadius:8},square:{borderRadius:"0px"},circular:{borderRadius:"50%"}},Vp={backgroundColor:"theme-primary",color:"color-white",transition:"all 0.2s ease-in-out",_hover:{backgroundColor:"theme-primary",opacity:.9}},Kr={opacity:.5,cursor:"not-allowed",transition:"all 0.2s ease-in-out",_hover:{backgroundColor:"transparent"}},Ap=({currentPage:e,totalPages:o,onPageChange:t,pageSize:n=10,pageSizeOptions:a=[{label:"10 / page",value:10},{label:"20 / page",value:20},{label:"50 / page",value:50},{label:"100 / page",value:100}],onPageSizeChange:l,showPageSizeSelector:c=!1,showPageInfo:s=!0,maxPageButtons:d=5,showFirstLastButtons:g=!1,size:m="md",variant:f="default",shape:p="rounded",visiblePageNumbers:u=[],views:y,...k})=>{const x=w=>{w<1||w>o||w===e||t(w)},C=w=>{l&&l(Number(w.target.value))},S=(w,v)=>{if(w==="...")return r.jsx(i.View,{display:"flex",alignItems:"center",justifyContent:"center",...Lo[m],...y==null?void 0:y.ellipsis,children:"..."},`ellipsis-${v}`);const b=w===e;return r.jsx(i.View,{as:"button",display:"flex",alignItems:"center",justifyContent:"center",cursor:b?"default":"pointer",...Lo[m],...cr[f],...sr[p],...b?Vp:{},onClick:()=>x(w),"aria-label":`Page ${w}`,"aria-current":b?"page":void 0,...b?y==null?void 0:y.activePageButton:y==null?void 0:y.pageButton,children:w},`page-${w}`)};return r.jsxs(i.Horizontal,{alignItems:"center",gap:8,...y==null?void 0:y.container,...k,children:[g&&r.jsxs(i.View,{as:"button",display:"flex",alignItems:"center",justifyContent:"center",cursor:e===1?"not-allowed":"pointer",...Lo[m],...cr[f],...sr[p],...e===1?Kr:{},onClick:()=>x(1),"aria-label":"First page",disabled:e===1,...y==null?void 0:y.navigationButton,children:[r.jsx(he,{orientation:"left",widthHeight:16}),r.jsx(he,{orientation:"left",widthHeight:16,marginLeft:"-8px"})]}),r.jsx(i.View,{as:"button",display:"flex",alignItems:"center",justifyContent:"center",cursor:e===1?"not-allowed":"pointer",...Lo[m],...cr[f],...sr[p],...e===1?Kr:{},onClick:()=>x(e-1),"aria-label":"Previous page",disabled:e===1,...y==null?void 0:y.navigationButton,children:r.jsx(he,{orientation:"left",widthHeight:16})}),u.map((w,v)=>S(w,v)),r.jsx(i.View,{as:"button",display:"flex",alignItems:"center",justifyContent:"center",cursor:e===o?"not-allowed":"pointer",...Lo[m],...cr[f],...sr[p],...e===o?Kr:{},onClick:()=>x(e+1),"aria-label":"Next page",disabled:e===o,...y==null?void 0:y.navigationButton,children:r.jsx(he,{orientation:"right",widthHeight:16})}),g&&r.jsxs(i.View,{as:"button",display:"flex",alignItems:"center",justifyContent:"center",cursor:e===o?"not-allowed":"pointer",...Lo[m],...cr[f],...sr[p],...e===o?Kr:{},onClick:()=>x(o),"aria-label":"Last page",disabled:e===o,...y==null?void 0:y.navigationButton,children:[r.jsx(he,{orientation:"right",widthHeight:16}),r.jsx(he,{orientation:"right",widthHeight:16,marginLeft:"-8px"})]}),s&&r.jsxs(i.Text,{marginLeft:16,color:"color-gray-600",...y==null?void 0:y.pageInfo,children:["Page ",e," of ",o]}),c&&l&&r.jsx(i.View,{as:"select",marginLeft:16,padding:"4px 8px",borderRadius:"4px",borderWidth:"1px",borderStyle:"solid",borderColor:"color-gray-200",backgroundColor:"color-white",cursor:"pointer",value:n,onChange:C,...y==null?void 0:y.pageSizeSelector,children:a.map(w=>r.jsx("option",{value:w.value,children:w.label},w.value))})]})},zi=({currentPage:e,totalPages:o,onPageChange:t,pageSize:n=10,pageSizeOptions:a,onPageSizeChange:l,showPageSizeSelector:c=!1,showPageInfo:s=!0,maxPageButtons:d=5,showFirstLastButtons:g=!1,size:m="md",variant:f="default",shape:p="rounded",views:u,...y})=>{const{visiblePageNumbers:k}=Pp(e,o,d);return r.jsx(Ap,{currentPage:e,totalPages:o,onPageChange:t,pageSize:n,pageSizeOptions:a,onPageSizeChange:l,showPageSizeSelector:c,showPageInfo:s,maxPageButtons:d,showFirstLastButtons:g,size:m,variant:f,shape:p,visiblePageNumbers:k,views:u,...y})},Ep=e=>typeof e=="string"&&(/^(#|rgb\(|rgba\(|hsl\(|hsla\(|var\()/.test(e)||["black","currentColor","inherit","transparent","white"].includes(e)),Dp=h.memo(({shape:e="linear",value:o=0,max:t=100,color:n="theme-primary",backgroundColor:a="color-gray-200",height:l,size:c,radius:s=4,strokeWidth:d=10,showLabel:g=!1,labelColor:m="color-black-primary",animated:f=!0,animationDuration:p="0.5s",views:u,themeMode:y,...k})=>{var D;const{getColor:x,themeMode:C}=i.useTheme(),S=y||C,v=Math.min(t,Math.max(0,o))/t*100,b=W=>Ep(W)?W:x(W,{themeMode:S}),I=h.useMemo(()=>b(a),[x,a,S]),T=h.useMemo(()=>b(n),[x,n,S]);if(e==="circle"){const W=c||(typeof l=="number"?l:100),A=(W-d)/2,H=2*Math.PI*A,z=H-v/100*H;return r.jsxs(i.View,{width:W,height:W,position:"relative",display:"flex",alignItems:"center",justifyContent:"center",...u==null?void 0:u.container,...k,children:[r.jsxs("svg",{width:W,height:W,viewBox:`0 0 ${W} ${W}`,style:{transform:"rotate(-90deg)"},children:[r.jsx("circle",{cx:W/2,cy:W/2,r:A,stroke:I,strokeWidth:d,fill:"transparent",...u==null?void 0:u.track}),r.jsx("circle",{cx:W/2,cy:W/2,r:A,stroke:T,strokeWidth:d,strokeDasharray:H,strokeDashoffset:z,strokeLinecap:"round",fill:"transparent",style:{transition:f?`stroke-dashoffset ${p} ease-in-out`:"none"},...u==null?void 0:u.indicator})]}),g&&r.jsx(i.View,{position:"absolute",top:0,left:0,right:0,bottom:0,display:"flex",alignItems:"center",justifyContent:"center",pointerEvents:"none",children:r.jsxs(i.Text,{color:m,fontSize:`${W*.2}px`,fontWeight:"bold",...u==null?void 0:u.text,children:[Math.round(v),"%"]})})]})}const j=l||8,E={backgroundColor:I,...((D=u==null?void 0:u.container)==null?void 0:D.style)||{},...k.style||{}};return r.jsxs(i.View,{role:"progressbar","aria-valuenow":o,"aria-valuemin":0,"aria-valuemax":t,width:"100%",height:j,borderRadius:s,overflow:"hidden",position:"relative",display:"flex",alignItems:"center",justifyContent:"center",...u==null?void 0:u.container,...k,style:E,children:[r.jsx("div",{style:{height:"100%",backgroundColor:T,borderRadius:typeof s=="number"?`${s}px`:s,position:"absolute",left:0,top:0,bottom:0,width:`${v}%`,transition:f?`width ${p} ease-in-out`:"none",...u==null?void 0:u.bar}}),g&&r.jsxs(i.Text,{color:m,fontSize:typeof j=="number"&&j>16?`${j*.6}px`:"10px",fontWeight:"bold",position:"relative",zIndex:1,...u==null?void 0:u.text,children:[Math.round(v),"%"]})]})}),Mi=e=>{const o=pe("progress",e);return r.jsx(Dp,{...o})},$p=(e=>({solid:"solid",dashed:"dashed",dotted:"dotted"}))(),Lp={thin:"1px",medium:"2px",thick:"4px"},dr={container:{transition:"opacity 0.15s ease"},label:{fontSize:"14px",fontWeight:"500",color:"color-gray-600",paddingHorizontal:"8px",backgroundColor:"color-white",transition:"color 0.15s ease"}},_p=e=>typeof e=="string"&&(/^(#|rgb\(|rgba\(|hsl\(|hsla\(|var\()/.test(e)||["black","currentColor","inherit","transparent","white"].includes(e)),Bp=({orientation:e="horizontal",variant:o="solid",thickness:t="thin",color:n,spacing:a="0px",label:l,decorative:c=!1,views:s,themeMode:d,...g})=>{const{themeMode:m}=i.useTheme(),f=n||"color-gray-200",p=$p[o],u=Lp[t],y=c?{"aria-hidden":!0}:{role:"separator","aria-orientation":e},k=_p(f)?{style:{borderColor:f}}:{borderColor:f};return l&&e==="horizontal"?r.jsxs(i.Horizontal,{alignItems:"center",justifyContent:"center",width:"100%",padding:a,...y,...g,children:[r.jsx(i.View,{height:"0px",flexGrow:1,borderTop:`${u} ${p}`,...k,...dr.container,...s==null?void 0:s.container}),r.jsx(i.Text,{...dr.label,...s==null?void 0:s.label,children:l}),r.jsx(i.View,{height:"0px",flexGrow:1,borderTop:`${u} ${p}`,...k,...dr.container,...s==null?void 0:s.container})]}):e==="horizontal"?r.jsx(i.View,{height:"0px",width:"100%",borderTop:`${u} ${p}`,padding:a,...k,...dr.container,...y,...s==null?void 0:s.container,...g}):r.jsx(i.View,{width:"0px",height:"100%",borderLeft:`${u} ${p}`,padding:a,...k,...dr.container,...y,...s==null?void 0:s.container,...g})},Wi=e=>{const o=pe("separator",e);return r.jsx(Bp,{...o})},Xr=Wi,Op=Wi,Np={xs:12,sm:14,md:16,lg:18,xl:20},qp=({isSupported:e,isSharing:o,onShare:t,label:n,children:a,icon:l,size:c,isDisabled:s,isLoading:d,iconPosition:g,disableWhenUnsupported:m=!0,...f})=>{const p=c??"md",u=l??r.jsx(Gn,{widthHeight:Np[p],strokeWidth:1.5,filled:!1}),y=!!s||!e&&m,k=!!d||o;return r.jsx(de,{...f,size:p,icon:u,iconPosition:g??"left",isDisabled:y,isLoading:k,onClick:t,children:a??n??"Share"})},Hi=()=>typeof navigator>"u"?void 0:navigator,Up=(e,o)=>{if(!e||typeof e.share!="function")return!1;if(typeof e.canShare=="function")try{return e.canShare(o)}catch{return!1}return!0},Gp=e=>{if(typeof e=="object"&&e!==null&&"name"in e)return String(e.name)},Yp=e=>{const{shareData:o,onClick:t,onUnsupported:n,onShareStart:a,onShareSuccess:l,onShareCancel:c,onShareError:s}=e,[d,g]=h.useState(!1),m=h.useMemo(()=>Up(Hi(),o),[o]),f=h.useCallback((...p)=>{t==null||t(...p);const u=Hi();if(!u||typeof u.share!="function"){n==null||n();return}if(!d){if(typeof u.canShare=="function")try{if(!u.canShare(o)){n==null||n();return}}catch(y){s==null||s(y);return}g(!0),a==null||a();try{u.share(o).then(()=>{l==null||l()}).catch(y=>{if(Gp(y)==="AbortError"){c==null||c();return}s==null||s(y)}).finally(()=>{g(!1)})}catch(y){g(!1),s==null||s(y)}}},[d,t,c,s,a,l,n,o]);return{isSupported:m,isSharing:d,handleShare:f}},ji=e=>{const{isSupported:o,isSharing:t,handleShare:n}=Yp(e),{shareData:a,onShareStart:l,onShareSuccess:c,onShareCancel:s,onShareError:d,onUnsupported:g,onClick:m,...f}=e;return r.jsx(qp,{...f,isSupported:o,isSharing:t,onShare:n})},Kp=({label:e,status:o="default",views:t,themeMode:n,...a})=>{const{themeMode:l}=i.useTheme(),c=la();return r.jsxs(i.Horizontal,{alignItems:"center",gap:8,role:"status",...t==null?void 0:t.container,...a,children:[r.jsx(i.View,{"data-role":"status-dot","aria-hidden":"true",width:"8px",height:"8px",borderRadius:"50%",...c[o].indicator,...t==null?void 0:t.indicator}),e&&r.jsx(i.Text,{"data-role":"status-label",fontSize:"14px",lineHeight:"20px",...c[o].label,...t==null?void 0:t.label,children:e})]})},Jr=e=>{const o=pe("status",e);return r.jsx(Kp,{...o})},Xp=(e=!0,o,t,n)=>{const{on:a}=i.useResponsive(),l=a("mobile"),[c,s]=h.useState(o!==void 0?o:e);return h.useEffect(()=>{o!==void 0&&s(o)},[o]),{isExpanded:c,toggleExpanded:()=>{const f=!c;s(f),t&&t(f)},expand:()=>{c||(s(!0),t&&t(!0))},collapse:()=>{c&&(s(!1),t&&t(!1))},isMobile:l}},Jp={sm:{expandedWidth:"240px",collapsedWidth:"64px"},md:{expandedWidth:"280px",collapsedWidth:"72px"},lg:{expandedWidth:"320px",collapsedWidth:"80px"},xl:{expandedWidth:"360px",collapsedWidth:"88px"}},Qp=(e=>({default:{backgroundColor:"color-white",color:"color-gray-800",transition:"background-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease"},filled:{backgroundColor:"color-gray-100",color:"color-gray-800",transition:"background-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease"},outline:{backgroundColor:"color-white",borderWidth:"1px",borderStyle:"solid",borderColor:"color-gray-200",color:"color-gray-800",transition:"background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease"},subtle:{backgroundColor:"color-gray-50",color:"color-gray-800",transition:"background-color 0.2s ease, color 0.2s ease"},elevated:{backgroundColor:"color-white",boxShadow:"0 4px 12px rgba(0, 0, 0, 0.1)",color:"color-gray-800",transition:"all 0.2s ease-in-out"}}))(),Zp={left:{left:0,borderRightWidth:"1px",borderRightStyle:"solid",borderRightColor:"color-gray-200"},right:{right:0,borderLeftWidth:"1px",borderLeftStyle:"solid",borderLeftColor:"color-gray-200"}},Rp={none:{},low:{boxShadow:"0 1px 3px rgba(0, 0, 0, 0.1)"},medium:{boxShadow:"0 4px 12px rgba(0, 0, 0, 0.12)"},high:{boxShadow:"0 10px 30px rgba(0, 0, 0, 0.15)"}},eu={fast:"all 0.2s ease-in-out",normal:"all 0.3s ease-in-out",slow:"all 0.5s ease-in-out",bounce:"all 0.3s cubic-bezier(0.68, -0.55, 0.27, 1.55)"},Pi=h.createContext({isExpanded:!0,toggleExpanded:()=>{},expand:()=>{},collapse:()=>{},position:"left",size:"md",variant:"default"}),Qr=()=>h.useContext(Pi),ou=({value:e,children:o})=>r.jsx(Pi.Provider,{value:e,children:o}),ru=({children:e,showToggleButton:o=!0,views:t,...n})=>{const{isExpanded:a,toggleExpanded:l,position:c}=Qr();return r.jsx(i.Horizontal,{width:"100%",padding:"16px",borderBottomWidth:"1px",borderBottomStyle:"solid",borderBottomColor:"color-gray-200",alignItems:"center",justifyContent:"space-between",...t==null?void 0:t.header,...n,children:a?r.jsxs(i.Horizontal,{width:"100%",alignItems:"center",justifyContent:"space-between",children:[e,o&&r.jsx(i.View,{as:"button",display:"flex",alignItems:"center",justifyContent:"center",width:"32px",height:"32px",borderWidth:"1px",borderStyle:"solid",borderColor:"color-gray-200",borderRadius:"4px",backgroundColor:"transparent",cursor:"pointer",_hover:{backgroundColor:"color-gray-100"},onClick:l,"aria-label":a?"Collapse sidebar":"Expand sidebar",...t==null?void 0:t.toggleButton,children:r.jsx(he,{orientation:c==="left"?"left":"right",widthHeight:16,...t==null?void 0:t.toggleButtonIcon})})]}):r.jsx(i.View,{width:"100%",display:"flex",alignItems:"center",justifyContent:"center",children:o&&r.jsx(i.View,{as:"button",display:"flex",alignItems:"center",justifyContent:"center",width:"32px",height:"32px",borderWidth:"1px",borderStyle:"solid",borderColor:"color-gray-200",borderRadius:"4px",backgroundColor:"transparent",cursor:"pointer",_hover:{backgroundColor:"color-gray-100"},onClick:l,"aria-label":a?"Collapse sidebar":"Expand sidebar",...t==null?void 0:t.toggleButton,children:r.jsx(he,{orientation:c==="left"?"right":"left",widthHeight:16,...t==null?void 0:t.toggleButtonIcon})})})})},tu=({children:e,views:o,...t})=>{const{isExpanded:n}=Qr();return r.jsx(i.View,{flex:"1",width:"100%",overflowY:"auto",overflowX:"hidden",padding:n?"16px":"8px",...o==null?void 0:o.content,...t,children:e})},nu=({children:e,views:o,...t})=>{const{isExpanded:n}=Qr();return r.jsx(i.View,{width:"100%",padding:n?"16px":"8px",borderTopWidth:"1px",borderTopStyle:"solid",borderTopColor:"color-gray-200",...o==null?void 0:o.footer,...t,children:e})},au=({children:e,position:o="left",size:t="md",variant:n="default",fixed:a=!1,hasBackdrop:l=!0,expandedWidth:c,collapsedWidth:s,breakpoint:d,breakpointBehavior:g="overlay",elevation:m="none",transitionPreset:f="normal",ariaLabel:p="Sidebar navigation",showToggleButton:u,toggleExpanded:y,expand:k,isExpanded:x,isMobile:C,collapse:S,views:w,themeMode:v,...b})=>{const I=Jp[t],T=x?c||I.expandedWidth:s||I.collapsedWidth,j=!C||C&&g!=="hide",E=a||C&&g==="overlay"?"fixed":"relative",D=l&&C&&x&&g==="overlay";return r.jsxs(r.Fragment,{children:[D&&r.jsx(i.View,{position:"fixed",top:0,left:0,width:"100vw",height:"100vh",backgroundColor:"color-dark-50-360",zIndex:998,onClick:S,...w==null?void 0:w.backdrop}),j&&r.jsx(i.Vertical,{position:E,top:0,height:"100vh",width:T,zIndex:999,transition:eu[f],transform:C&&g==="overlay"&&!x?`translateX(${o==="left"?"-100%":"100%"})`:"translateX(0)",role:"navigation","aria-label":p,...Qp[n],...Zp[o],...Rp[m],...w==null?void 0:w.container,...b,children:h.Children.map(e,W=>W)})]})},gr=({children:e,position:o="left",size:t="md",variant:n="default",defaultExpanded:a=!0,expanded:l,onExpandedChange:c,fixed:s=!1,hasBackdrop:d=!0,showToggleButton:g=!0,expandedWidth:m,collapsedWidth:f,breakpoint:p=768,breakpointBehavior:u="overlay",views:y,...k})=>{const{isExpanded:x,toggleExpanded:C,expand:S,collapse:w,isMobile:v}=Xp(a,l,c);return r.jsx(ou,{value:{isExpanded:x,toggleExpanded:C,expand:S,collapse:w,position:o,size:t,variant:n,views:y},children:r.jsx(au,{position:o,size:t,variant:n,fixed:s,hasBackdrop:d,showToggleButton:g,expandedWidth:m,collapsedWidth:f,breakpoint:p,breakpointBehavior:u,isExpanded:x,isMobile:v,toggleExpanded:C,expand:S,collapse:w,views:y,...k,children:e})})};gr.Header=ru,gr.Content=tu,gr.Footer=nu,gr.useContext=Qr;const lu=()=>({getItem:e=>{try{return typeof localStorage>"u"?null:localStorage.getItem(`resizable-${e}`)}catch(o){return console.warn("Failed to access localStorage:",o),null}},setItem:(e,o)=>{try{if(typeof localStorage>"u")return;localStorage.setItem(`resizable-${e}`,o)}catch(t){console.warn("Failed to write to localStorage:",t)}}}),iu=(e,o,t,n=50,a=1/0,l=!1,c,s,d=10)=>{const[g,m]=h.useState(!1),[f,p]=h.useState([]),u=h.useRef(null),y=h.useRef(null),k=h.useRef(0),x=h.useRef([]),C=h.useRef(s||(typeof window<"u"?lu():null)),S=h.useCallback(()=>u.current?e==="horizontal"?u.current.offsetWidth:u.current.offsetHeight:0,[e]),w=h.useCallback(()=>{if(!c||!C.current)return null;const P=C.current.getItem(c);if(!P)return null;try{const V=JSON.parse(P);return Array.isArray(V.sizes)?V.sizes:null}catch(V){return console.warn("Failed to parse saved panel sizes:",V),null}},[c]),v=h.useCallback(()=>{if(!c||!C.current||f.length===0)return;const P=f.map(V=>({id:V.id,size:V.size,collapsed:V.collapsed||!1}));C.current.setItem(c,JSON.stringify({sizes:P}))},[c,f]),b=h.useCallback((P,V,M,L,_)=>{p(O=>O.some(N=>N.id===P)?O:[...O,{id:P,size:V,minSize:M??n,maxSize:L??a,collapsible:_??l,collapsed:!1}])},[n,a,l]),I=h.useCallback(P=>{p(V=>V.filter(M=>M.id!==P))},[]),T=h.useCallback(P=>{const V=f.find(M=>M.id===P);return V?V.size:0},[f]),j=h.useCallback((P,V)=>{p(M=>M.map(L=>L.id===P?{...L,size:V}:L))},[]),E=h.useCallback(P=>{const V=f.find(M=>M.id===P);return V?!!V.collapsed:!1},[f]),D=h.useCallback(P=>{p(V=>{const M=V.findIndex(N=>N.id===P);if(M===-1)return V;const L=V[M];if(!L.collapsible)return V;const _={...L,collapsed:!L.collapsed},O=[...V];return O[M]=_,O})},[]),W=h.useCallback((P,V)=>{y.current=P,k.current=V,x.current=f.map(M=>M.size),m(!0)},[f]),A=h.useCallback(P=>{if(!g||!y.current)return;const V=y.current,M=P-k.current;let L=-1;const _=V.match(/\d+$/);if(_&&(L=parseInt(_[0],10)-1),L===-1&&f.length>=2&&(L=0),L<0||L>=f.length-1)return;const O=f[L],N=f[L+1];if(O.collapsed||N.collapsed)return;let U=x.current[L]+M,X=x.current[L+1]-M;U=Math.max(O.minSize??n,Math.min(O.maxSize??a,U)),X=Math.max(N.minSize??n,Math.min(N.maxSize??a,X)),p(oe=>oe.map((B,$)=>$===L?{...B,size:U}:$===L+1?{...B,size:X}:B))},[g,f,e,n,a]),H=h.useCallback(()=>{g&&t&&t(f.map(P=>P.size)),y.current=null,m(!1),c&&v()},[g,f,t,c,v]),z=h.useCallback(P=>{if(!g||!y.current)return;const V=y.current;let M=-1;const L=V.match(/\d+$/);if(L&&(M=parseInt(L[0],10)-1),M===-1&&f.length>=2&&(M=0),M<0||M>=f.length-1)return;let _=0;e==="horizontal"?(P.key==="ArrowLeft"&&(_=-d),P.key==="ArrowRight"&&(_=d),P.key==="Home"&&(_=-100),P.key==="End"&&(_=100)):(P.key==="ArrowUp"&&(_=-d),P.key==="ArrowDown"&&(_=d),P.key==="Home"&&(_=-100),P.key==="End"&&(_=100)),_!==0&&(P.preventDefault(),A(k.current+_)),P.key==="Escape"&&(p(O=>O.map((N,U)=>({...N,size:x.current[U]}))),H())},[g,f,e,A,H,d]);return h.useEffect(()=>{if(typeof document>"u")return;const P=L=>{if(!g)return;const _=e==="horizontal"?L.clientX:L.clientY;A(_)},V=L=>{if(!g||L.touches.length===0)return;const _=L.touches[0],O=e==="horizontal"?_.clientX:_.clientY;A(O)},M=()=>{g&&H()};return g&&(document.addEventListener("mousemove",P),document.addEventListener("touchmove",V),document.addEventListener("mouseup",M),document.addEventListener("touchend",M),document.addEventListener("keydown",z),document.body.style.cursor=e==="horizontal"?"col-resize":"row-resize",document.body.style.userSelect="none"),()=>{document.removeEventListener("mousemove",P),document.removeEventListener("touchmove",V),document.removeEventListener("mouseup",M),document.removeEventListener("touchend",M),document.removeEventListener("keydown",z),document.body.style.cursor="",document.body.style.userSelect=""}},[g,e,A,H,z]),h.useEffect(()=>{if(f.length!==0){if(c){const P=w();if(P){p(V=>V.map(M=>{const L=P.find(_=>_.id===M.id);return L?{...M,size:L.size,collapsed:L.collapsed||!1}:M}));return}}if(!o){const V=S()/f.length;p(M=>M.map(L=>({...L,size:V})))}}},[f.length,o,S,c,w]),h.useEffect(()=>{if(!o||o.length===0||f.length===0)return;const P=S(),V=o.map(M=>typeof M=="string"&&M.endsWith("%")?parseFloat(M)/100*P:typeof M=="number"?M:parseFloat(M));p(M=>M.map((L,_)=>({...L,size:_<V.length?V[_]:L.size})))},[o,f.length,S]),h.useEffect(()=>{f.length>0&&c&&!g&&v()},[f,c,g,v]),{isResizing:g,setIsResizing:m,containerRef:u,panels:f,registerPanel:b,unregisterPanel:I,getPanelSize:T,setPanelSize:j,isPanelCollapsed:E,togglePanelCollapse:D,startResize:W,onResize:A,endResize:H}},cu={horizontal:{flexDirection:"row"},vertical:{flexDirection:"column"}},su=(e,o)=>({sm:{width:o==="horizontal"?"4px":"100%",height:o==="vertical"?"4px":"100%"},md:{width:o==="horizontal"?"6px":"100%",height:o==="vertical"?"6px":"100%"},lg:{width:o==="horizontal"?"8px":"100%",height:o==="vertical"?"8px":"100%"}})[e],du=(e=>({default:{backgroundColor:"transparent",_hover:{backgroundColor:"color-gray-200"},_active:{backgroundColor:"color-gray-300"}},subtle:{backgroundColor:"transparent",_hover:{backgroundColor:"color-gray-100"},_active:{backgroundColor:"color-gray-200"}},prominent:{backgroundColor:"color-gray-100",_hover:{backgroundColor:"color-gray-200"},_active:{backgroundColor:"color-gray-300"}}}))(),Zr={horizontal:{width:"2px",height:"20px",backgroundColor:"color-gray-400",margin:"0 1px"},vertical:{width:"20px",height:"2px",backgroundColor:"color-gray-400",margin:"1px 0"}},Vi=h.createContext({orientation:"horizontal",size:"md",variant:"default",isResizing:!1,setIsResizing:()=>{},registerPanel:()=>{},unregisterPanel:()=>{},getPanelSize:()=>0,setPanelSize:()=>{},isPanelCollapsed:()=>!1,togglePanelCollapse:()=>{},startResize:()=>{},onResize:()=>{},endResize:()=>{}}),Ai=()=>h.useContext(Vi),gu=({value:e,children:o})=>r.jsx(Vi.Provider,{value:e,children:o}),hu=({children:e,id:o,defaultSize:t,minSize:n,maxSize:a,collapsible:l,defaultCollapsed:c,onCollapseChange:s,views:d,...g})=>{const{orientation:m,registerPanel:f,unregisterPanel:p,getPanelSize:u,isPanelCollapsed:y,togglePanelCollapse:k}=Ai(),x=typeof t=="string"&&t.endsWith("%")?0:typeof t=="number"?t:0;h.useEffect(()=>(f(o,x,n,a,l),()=>p(o)),[o,x,n,a,l,f,p]);const C=u(o),S=y(o);return h.useEffect(()=>{s&&S!==void 0&&s(S)},[S,s]),h.useEffect(()=>{l&&c&&!S&&k(o)},[o,l,c,S,k]),S?r.jsx(i.View,{flex:"0 0 auto",width:m==="horizontal"?"10px":"100%",height:m==="vertical"?"10px":"100%",backgroundColor:"color-gray-200",cursor:"pointer",onClick:()=>k(o),"aria-label":`Expand panel ${o}`,role:"button",tabIndex:0,...d==null?void 0:d.collapsedPanel,...g}):r.jsx(i.View,{flex:C>0?"0 0 auto":"1",width:m==="horizontal"?`${C}px`:"100%",height:m==="vertical"?`${C}px`:"100%",overflow:"auto",...d==null?void 0:d.panel,...g,children:e})},fu=({id:e,position:o="both",disabled:t=!1,withVisualIndicator:n=!0,withCollapseButton:a=!1,collapseTarget:l,views:c,...s})=>{const{orientation:d,size:g,variant:m,startResize:f,isPanelCollapsed:p,togglePanelCollapse:u}=Ai(),k=(()=>{if(l)return l;const b=e.match(/\d+$/);if(!b)return"";const I=parseInt(b[0],10);return isNaN(I)?"":`panel${I}`})(),x=p(k),C=b=>{if(t)return;b.preventDefault();const I=d==="horizontal"?b.clientX:b.clientY;f(e,I)},S=b=>{if(t||b.touches.length===0)return;b.preventDefault();const I=b.touches[0],T=d==="horizontal"?I.clientX:I.clientY;f(e,T)},w=b=>{t||(b.key==="Enter"||b.key===" ")&&(b.preventDefault(),f(e,0))},v=b=>{b.stopPropagation(),k&&u(k)};return r.jsxs(i.View,{role:"separator","aria-orientation":d,"aria-valuemin":0,"aria-valuemax":100,tabIndex:t?-1:0,cursor:d==="horizontal"?"col-resize":"row-resize",display:"flex",alignItems:"center",justifyContent:"center",position:"relative",...su(g,d),...du[m],onMouseDown:C,onTouchStart:S,onKeyDown:w,opacity:t?.5:1,pointerEvents:t?"none":"auto",...c==null?void 0:c.handle,...s,children:[n&&r.jsx(i.View,{display:"flex",alignItems:"center",justifyContent:"center",width:d==="horizontal"?"100%":"auto",height:d==="vertical"?"100%":"auto",pointerEvents:"none",...c==null?void 0:c.handleIcon,children:d==="horizontal"?r.jsxs(i.Horizontal,{gap:1,children:[r.jsx(i.View,{...Zr.horizontal}),r.jsx(i.View,{...Zr.horizontal})]}):r.jsxs(i.Vertical,{gap:1,children:[r.jsx(i.View,{...Zr.vertical}),r.jsx(i.View,{...Zr.vertical})]})}),a&&k&&r.jsx(i.View,{position:"absolute",top:d==="horizontal"?"-20px":"50%",left:d==="horizontal"?"50%":"-20px",transform:d==="horizontal"?"translateX(-50%)":"translateY(-50%)",width:"16px",height:"16px",borderRadius:"full",backgroundColor:"color-gray-100",border:"1px solid",borderColor:"color-gray-300",display:"flex",alignItems:"center",justifyContent:"center",cursor:"pointer",zIndex:1,onClick:v,"aria-label":x?`Expand panel ${k}`:`Collapse panel ${k}`,role:"button",tabIndex:0,pointerEvents:"auto",_hover:{backgroundColor:"color-gray-200"},...c==null?void 0:c.collapseIcon,children:r.jsx(i.View,{width:"8px",height:"8px",display:"flex",alignItems:"center",justifyContent:"center",children:x?r.jsxs(i.Horizontal,{children:[r.jsx(i.View,{width:"6px",height:"2px",backgroundColor:"color-gray-600"}),r.jsx(i.View,{width:"2px",height:"6px",backgroundColor:"color-gray-600",position:"absolute"})]}):r.jsx(i.View,{width:"6px",height:"2px",backgroundColor:"color-gray-600"})})})]})},mu=({children:e,orientation:o="horizontal",size:t="md",variant:n="default",defaultSizes:a,minSize:l,maxSize:c,collapsible:s=!1,containerRef:d,autoSaveId:g,keyboardResizeBy:m,onLayout:f,views:p,...u})=>{const y=o==="horizontal"?i.Horizontal:i.Vertical;return r.jsx(y,{ref:d,width:"100%",height:"100%",position:"relative",overflow:"hidden",...cu[o],...p==null?void 0:p.container,...u,children:e})},fn=({children:e,orientation:o="horizontal",size:t="md",variant:n="default",defaultSizes:a,onSizesChange:l,minSize:c=50,maxSize:s,collapsible:d=!1,autoSaveId:g,storage:m,keyboardResizeBy:f=10,views:p,...u})=>{const{isResizing:y,setIsResizing:k,containerRef:x,registerPanel:C,unregisterPanel:S,getPanelSize:w,setPanelSize:v,isPanelCollapsed:b,togglePanelCollapse:I,startResize:T,onResize:j,endResize:E}=iu(o,a,l,c,s,d,g,m,f);return r.jsx(gu,{value:{orientation:o,size:t,variant:n,isResizing:y,setIsResizing:k,registerPanel:C,unregisterPanel:S,getPanelSize:w,setPanelSize:v,isPanelCollapsed:b,togglePanelCollapse:I,startResize:T,onResize:j,endResize:E},children:r.jsx(mu,{orientation:o,size:t,variant:n,defaultSizes:a,minSize:c,maxSize:s,collapsible:d,autoSaveId:g,keyboardResizeBy:f,containerRef:x,views:p,...u,children:e})})};fn.Panel=hu,fn.Handle=fu;const Rr={info:{container:{backgroundColor:"color-blue-50",border:"color-blue-300"},content:{color:"color-blue-700"},icon:{color:"color-blue-500"}},success:{container:{backgroundColor:"color-green-50",border:"color-green-300"},content:{color:"color-green-700"},icon:{color:"color-green-500"}},warning:{container:{backgroundColor:"color-orange-50",border:"color-orange-300"},content:{color:"color-orange-700"},icon:{color:"color-orange-500"}},error:{container:{backgroundColor:"color-red-50",border:"color-red-300"},content:{color:"color-red-700"},icon:{color:"color-red-500"}}},pu={top:{top:"16px",left:"50%",transform:"translateX(-50%)"},"top-right":{top:"16px",right:"16px"},"top-left":{top:"16px",left:"16px"},bottom:{bottom:"16px",left:"50%",transform:"translateX(-50%)"},"bottom-right":{bottom:"16px",right:"16px"},"bottom-left":{bottom:"16px",left:"16px"}},uu=()=>Math.random().toString(36).substring(2,9);let _o=new Map;const hr=vo.create(e=>({toasts:[],add:(o,t,n,a={})=>{const l=a.id||uu(),c={id:l,variant:o,title:t,description:n,createdAt:Date.now(),isVisible:!0,...a};if(e(s=>({toasts:[...s.toasts,c]})),a.duration!==0){const s=a.duration||5e3,d=setTimeout(()=>{hr.getState().remove(l)},s);_o.set(l,d)}return l},remove:o=>{e(t=>({toasts:t.toasts.map(n=>n.id===o?{...n,isVisible:!1}:n)})),_o.has(o)&&(clearTimeout(_o.get(o)),_o.delete(o)),setTimeout(()=>{e(t=>({toasts:t.toasts.filter(n=>n.id!==o)}))},300)},removeAll:()=>{_o.forEach(clearTimeout),_o.clear(),e(o=>({toasts:o.toasts.map(t=>({...t,isVisible:!1}))})),setTimeout(()=>{e({toasts:[]})},300)}})),ko=(e,o,t,n)=>hr.getState().add(e,o,t,n),Ei=(e,o,t)=>ko("info",e,o,t),Di=(e,o,t)=>ko("success",e,o,t),$i=(e,o,t)=>ko("warning",e,o,t),Li=(e,o,t)=>ko("error",e,o,t),_i=e=>{hr.getState().remove(e)},Bi=()=>{hr.getState().removeAll()},Oi=({variant:e,title:o,description:t,onClose:n,isClosable:a=!0,action:l,actionText:c,showIcon:s=!0,theme:d,views:g,render:m,icon:f,id:p,isVisible:u=!0,themeMode:y})=>{const k=d??Rr,x=()=>{var v,b;if(f!==void 0)return f;const w=e?(b=(v=Rr[e])==null?void 0:v.icon)==null?void 0:b.color:Rr.info.icon.color;switch(e){case"info":return r.jsx(Re,{widthHeight:20,color:w});case"success":return r.jsx(qn,{widthHeight:20,color:w});case"warning":return r.jsx(Re,{widthHeight:20,color:w,orientation:"down"});case"error":return r.jsx(kr,{widthHeight:20,color:w});default:return r.jsx(Re,{widthHeight:20,color:Rr.info.icon.color})}};if(m)return r.jsx(r.Fragment,{children:m({id:p||"",onClose:n})});const C=e==="error"?"alert":"status",S=e==="error"||e==="warning"?"assertive":"polite";return r.jsxs(i.Horizontal,{role:C,"aria-live":S,"aria-atomic":"true","data-state":u?"open":"closed",gap:12,width:"100%",maxWidth:"380px",borderWidth:"1px",borderStyle:"solid",borderRadius:"12px",padding:"12px 14px",alignItems:"flex-start",position:"relative",backgroundColor:k[e].container.backgroundColor,borderColor:k[e].container.border,boxShadow:"0 12px 32px rgba(15, 23, 42, 0.12)",opacity:u?1:0,transform:u?"translateY(0)":"translateY(4px)",transition:"opacity 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease",...g==null?void 0:g.container,children:[s&&r.jsx(i.View,{marginTop:"2px",...g==null?void 0:g.icon,children:x()}),r.jsxs(i.Vertical,{gap:4,flex:"1",children:[r.jsx(i.Text,{fontSize:"14px",lineHeight:"20px",fontWeight:"600",color:k[e].content.color,backgroundColor:k[e].container.backgroundColor,...g==null?void 0:g.title,children:o}),t&&r.jsx(i.Text,{fontSize:"12px",lineHeight:"18px",color:k[e].content.color,fontWeight:"400",backgroundColor:k[e].container.backgroundColor,...g==null?void 0:g.description,children:t}),l&&c&&r.jsx(i.Text,{fontSize:"14px",fontWeight:"600",marginTop:"6px",cursor:"pointer",color:k[e].content.color,backgroundColor:k[e].container.backgroundColor,onClick:w=>{w.stopPropagation(),l()},_hover:{textDecoration:"underline"},transition:"opacity 0.2s ease, color 0.2s ease",...g==null?void 0:g.actionButton,children:c})]}),a&&r.jsx(i.View,{as:"button","aria-label":"Close toast",backgroundColor:"transparent",border:"none",cursor:"pointer",padding:"4px",marginLeft:"8px",marginTop:"-2px",marginRight:"-4px",borderRadius:"9999px",onClick:w=>{w.stopPropagation(),n()},_hover:{backgroundColor:"color-black-900-60"},transition:"background-color 0.2s ease, opacity 0.2s ease",...g==null?void 0:g.closeButton,children:r.jsx(He,{widthHeight:16,color:k[e].content.color})})]})},yu=({position:e="top-right",gap:o=8,limit:t=5,containerStyle:n})=>{const{toasts:a,remove:l}=hr(),s=h.useMemo(()=>{const d={top:[],"top-right":[],"top-left":[],bottom:[],"bottom-right":[],"bottom-left":[]};return a.forEach(g=>{const m=g.position||e;d[m].push(g)}),Object.keys(d).forEach(g=>{d[g]=d[g].slice(-t)}),d},[a,e,t])[e];return r.jsx(i.View,{position:"fixed",zIndex:9999,display:"flex",flexDirection:e.includes("bottom")?"column-reverse":"column",gap:`${o}px`,width:"fit-content",maxWidth:"100%",pointerEvents:"none",...pu[e],style:n,children:s.map(d=>r.jsx(i.View,{pointerEvents:"auto",animation:e.includes("right")?"slideInRight 0.3s ease-out, fadeIn 0.3s ease-out":e.includes("left")?"slideInLeft 0.3s ease-out, fadeIn 0.3s ease-out":e.includes("top")?"slideInDown 0.3s ease-out, fadeIn 0.3s ease-out":"slideInUp 0.3s ease-out, fadeIn 0.3s ease-out",children:r.jsx(Oi,{id:d.id,variant:d.variant,title:d.title,description:d.description,onClose:()=>l(d.id),isClosable:d.isClosable,action:d.action,actionText:d.actionText,showIcon:d.showIcon,views:d.views,render:d.render,icon:d.icon,isVisible:d.isVisible})},d.id))})},bu=()=>({toast:(e,o,t,n)=>ko(e,o,t,n),info:(e,o,t)=>Ei(e,o,t),success:(e,o,t)=>Di(e,o,t),warning:(e,o,t)=>$i(e,o,t),error:(e,o,t)=>Li(e,o,t),remove:e=>_i(e),removeAll:()=>Bi()}),xu=Object.assign(e=>r.jsx(Oi,{...e}),{Container:e=>r.jsx(yu,{...e}),show:ko,info:Ei,success:Di,warning:$i,error:Li,remove:_i,removeAll:Bi}),ku=bu,Ni=(e,o)=>{var c,s;if(!e)return!0;const t=e.toLowerCase(),n=o.name.toLowerCase().includes(t),a=((c=o.description)==null?void 0:c.toLowerCase().includes(t))||!1,l=((s=o.keywords)==null?void 0:s.some(d=>d.toLowerCase().includes(t)))||!1;return n||a||l},Cu=({open:e,onOpenChange:o,groups:t=[],commands:n=[],filter:a})=>{const[l,c]=h.useState(""),[s,d]=h.useState(0),g=h.useRef(null),m=h.useMemo(()=>a||Ni,[a]),f=h.useMemo(()=>[...t.flatMap(x=>x.commands),...n],[t,n]),p=h.useMemo(()=>l.trim()?f.filter(k=>m(l,k)):f,[f,l,m]),u=h.useMemo(()=>{if(!l)return t;const k=a||Ni;return t.map(x=>({...x,commands:x.commands.filter(C=>k(l,C))})).filter(x=>x.commands.length)},[t,l,a]);h.useEffect(()=>{d(0)},[p.length]);const y=h.useCallback(k=>{if(e)switch(k.key){case"ArrowDown":k.preventDefault(),d(x=>x<p.length-1?x+1:x);break;case"ArrowUp":k.preventDefault(),d(x=>x>0?x-1:x);break;case"Enter":k.preventDefault(),p[s]&&(p[s].onSelect(),o(!1),c(""));break;case"Escape":k.preventDefault(),o(!1),c("");break}},[e,p,s,o]);return h.useEffect(()=>{if(!(typeof document>"u"))return document.addEventListener("keydown",y),()=>{document.removeEventListener("keydown",y)}},[y]),h.useEffect(()=>{const k=g.current;if(k&&typeof k.querySelector=="function"&&e){const x=k.querySelector(`[data-index="${s}"]`);x&&typeof x.scrollIntoView=="function"&&x.scrollIntoView({block:"nearest"})}},[s,e]),h.useEffect(()=>{e?d(0):c("")},[e]),{search:l,setSearch:c,selectedIndex:s,setSelectedIndex:d,filteredCommands:p,filteredGroups:u,listRef:g}},wu=({onClose:e,children:o,...t})=>r.jsx(i.View,{position:"fixed",top:0,left:0,right:0,bottom:0,display:"flex",alignItems:"center",justifyContent:"center",backgroundColor:"color-dark-50-240",zIndex:9999,onClick:n=>{n.target===n.currentTarget&&(e==null||e())},...t,children:o}),qi=h.forwardRef(({value:e,onValueChange:o,...t},n)=>r.jsx(i.Input,{value:e,onChange:a=>{var l,c;return o(typeof a=="string"?a:((l=a==null?void 0:a.target)==null?void 0:l.value)??((c=a==null?void 0:a.nativeEvent)==null?void 0:c.text)??"")},ref:n,...t}));qi.displayName="CommandTextInput";const Su={sm:{width:"400px",maxHeight:"300px"},md:{width:"500px",maxHeight:"400px"},lg:{width:"600px",maxHeight:"500px"}},vu=(e=>({default:{backgroundColor:"color-white",borderWidth:"1px",borderStyle:"solid",borderColor:"color-gray-200",boxShadow:"0px 4px 20px rgba(0, 0, 0, 0.1)"},filled:{backgroundColor:"color-gray-50",borderWidth:"1px",borderStyle:"solid",borderColor:"color-gray-200",boxShadow:"0px 4px 20px rgba(0, 0, 0, 0.1)"},outline:{backgroundColor:"color-white",borderWidth:"2px",borderStyle:"solid",borderColor:"color-gray-300",boxShadow:"0px 4px 20px rgba(0, 0, 0, 0.1)"}}))(),Tu={display:"flex",alignItems:"center",padding:"12px 16px",borderBottomWidth:"1px",borderBottomStyle:"solid",borderBottomColor:"color-gray-200"},Iu={overflow:"auto",padding:"8px 0"},Fu={marginBottom:"8px"},zu={padding:"8px 16px",fontSize:"12px",fontWeight:"bold",color:"color-gray-500",textTransform:"uppercase"},Mu={display:"flex",alignItems:"center",padding:"8px 16px",cursor:"pointer",userSelect:"none",borderRadius:"4px",margin:"0 8px",_hover:{backgroundColor:"color-gray-100"}},Wu={backgroundColor:"color-blue-50",_hover:{backgroundColor:"color-blue-100"}},Hu={opacity:.5,cursor:"not-allowed",_hover:{backgroundColor:"transparent"}},ju={display:"flex",alignItems:"center",justifyContent:"center",marginRight:"12px",color:"color-gray-500"},Pu={display:"flex",flexDirection:"column",flex:1},Vu={fontSize:"14px",fontWeight:"medium"},Au={fontSize:"12px",color:"color-gray-500",marginTop:"2px"},Eu={display:"flex",alignItems:"center",marginLeft:"12px",fontSize:"12px",color:"color-gray-500"},Du={display:"flex",alignItems:"center",justifyContent:"center",padding:"16px",color:"color-gray-500",textAlign:"center"},$u={display:"flex",alignItems:"center",justifyContent:"space-between",padding:"8px 16px",borderTopWidth:"1px",borderTopStyle:"solid",borderTopColor:"color-gray-200",fontSize:"12px",color:"color-gray-500"},Lu=h.createContext({search:"",setSearch:()=>{},selectedIndex:0,setSelectedIndex:()=>{},filteredCommands:[],onSelect:()=>{}}),_u=({value:e,children:o})=>r.jsx(Lu.Provider,{value:e,children:o}),Ui=({value:e,onValueChange:o,placeholder:t="Type a command or search...",views:n,...a})=>{const l=h.useRef(null);return h.useEffect(()=>{l.current&&l.current.focus()},[]),r.jsxs(i.View,{...Tu,...n==null?void 0:n.container,...a,children:[r.jsx(wr,{widthHeight:16,color:"color-gray-400",marginRight:"8px"}),r.jsx(qi,{width:"100%",border:"none",outline:"none",backgroundColor:"transparent",fontSize:"14px",...n==null?void 0:n.input,value:e,onValueChange:o,placeholder:t,ref:l})]})},Bu=({children:e,views:o,...t})=>r.jsx(i.View,{...Iu,...o==null?void 0:o.container,...t,children:e}),Gi=({heading:e,children:o,views:t,...n})=>r.jsxs(i.View,{...Fu,...t==null?void 0:t.container,...n,children:[r.jsx(i.Text,{...zu,...t==null?void 0:t.heading,children:e}),o]}),mn=({item:e,selected:o=!1,onSelect:t,views:n,...a})=>{const l=()=>{!e.disabled&&t&&t()};return r.jsxs(i.Horizontal,{...Mu,...o?Wu:{},...e.disabled?Hu:{},onPress:l,onClick:l,...n==null?void 0:n.container,...a,children:[e.icon&&r.jsx(i.View,{...ju,...n==null?void 0:n.icon,children:e.icon}),r.jsxs(i.Vertical,{...Pu,...n==null?void 0:n.content,children:[r.jsx(i.Text,{...Vu,...n==null?void 0:n.name,children:e.name}),e.description&&r.jsx(i.Text,{...Au,...n==null?void 0:n.description,children:e.description})]}),e.shortcut&&r.jsx(i.Text,{...Eu,...n==null?void 0:n.shortcut,children:e.shortcut})]})},Yi=({children:e="No results found.",views:o,...t})=>r.jsx(i.View,{...Du,...o==null?void 0:o.container,...t,children:e}),Ou=({open:e,onOpenChange:o,groups:t=[],commands:n=[],placeholder:a,size:l="md",variant:c="default",emptyState:s,footer:d,search:g,setSearch:m,selectedIndex:f,setSelectedIndex:p,filteredCommands:u,filteredGroups:y,listRef:k,views:x,filter:C,...S})=>{if(!e)return null;const w=h.useCallback(T=>{T.disabled||(T.onSelect(),o(!1),m(""))},[o,m]);h.useCallback(T=>T.target===T.currentTarget&&o(!1),[o]);const v=h.useMemo(()=>({search:g,setSearch:m,selectedIndex:f,setSelectedIndex:p,filteredCommands:u,onSelect:w}),[g,f,u,w,m,p]),b=t.length>0,I=u.length===0;return r.jsx(wu,{onClose:()=>o(!1),...S,children:r.jsx(_u,{value:v,children:r.jsxs(i.View,{borderRadius:"8px",overflow:"hidden",display:"flex",flexDirection:"column",...Su[l],...vu[c],...x==null?void 0:x.container,onClick:T=>T.stopPropagation(),children:[r.jsx(Ui,{value:g,onValueChange:m,placeholder:a,views:x==null?void 0:x.searchInput}),r.jsx(i.View,{ref:k,flex:1,overflow:"auto",...x==null?void 0:x.list,children:I?s||r.jsx(Yi,{views:x==null?void 0:x.empty}):b?y.map(T=>r.jsx(Gi,{heading:T.name,views:x==null?void 0:x.groupHeading,children:T.commands.map(j=>{const E=u.findIndex(D=>D.id===j.id);return r.jsx(mn,{item:j,selected:E===f,onSelect:()=>w(j),"data-index":E,views:{container:x==null?void 0:x.item,icon:x==null?void 0:x.icon,content:x==null?void 0:x.content,name:x==null?void 0:x.name,description:x==null?void 0:x.description,shortcut:x==null?void 0:x.shortcut}},j.id)})},T.id)):u.map((T,j)=>r.jsx(mn,{item:T,selected:j===f,onSelect:()=>w(T),"data-index":j,views:{container:x==null?void 0:x.item,icon:x==null?void 0:x.icon,content:x==null?void 0:x.content,name:x==null?void 0:x.name,description:x==null?void 0:x.description,shortcut:x==null?void 0:x.shortcut}},T.id))}),d&&r.jsx(i.View,{...$u,...x==null?void 0:x.footer,children:d})]})})})},Bo=({open:e,onOpenChange:o,groups:t=[],commands:n=[],placeholder:a,size:l="md",variant:c="default",filter:s,emptyState:d,footer:g,views:m,...f})=>{const{search:p,setSearch:u,selectedIndex:y,setSelectedIndex:k,filteredCommands:x,filteredGroups:C,listRef:S}=Cu({open:e,onOpenChange:o,groups:t,commands:n,filter:s});return r.jsx(Ou,{open:e,onOpenChange:o,groups:t,commands:n,placeholder:a,size:l,variant:c,emptyState:d,footer:g,search:p,setSearch:u,selectedIndex:y,setSelectedIndex:k,filteredCommands:x,filteredGroups:C,listRef:S,views:m,...f})};Bo.Input=Ui,Bo.List=Bu,Bo.Group=Gi,Bo.Item=mn,Bo.Empty=Yi;const Ki=()=>Math.random().toString(36).substring(2,11),Nu=({defaultOpen:e=!1,openDelay:o=200,closeDelay:t=200,isDisabled:n=!1}={})=>{const[a,l]=h.useState(e),c=h.useRef(null),s=h.useRef(null),d=h.useRef(null),g=h.useRef(null),m=h.useRef(`tooltip-trigger-${Ki()}`).current,f=h.useRef(`tooltip-content-${Ki()}`).current,p=h.useCallback(()=>{n||(g.current&&(clearTimeout(g.current),g.current=null),!a&&!d.current&&(d.current=setTimeout(()=>{l(!0),d.current=null},o)))},[a,o,n]),u=h.useCallback(()=>{d.current&&(clearTimeout(d.current),d.current=null),a&&!g.current&&(g.current=setTimeout(()=>{l(!1),g.current=null},t))},[a,t]),y=h.useCallback(()=>{g.current&&(clearTimeout(g.current),g.current=null)},[]);return h.useEffect(()=>()=>{d.current&&clearTimeout(d.current),g.current&&clearTimeout(g.current)},[]),h.useEffect(()=>{if(typeof document>"u")return;const k=x=>{x.key==="Escape"&&a&&l(!1)};return document.addEventListener("keydown",k),()=>{document.removeEventListener("keydown",k)}},[a]),{isOpen:a,openTooltip:p,closeTooltip:u,cancelCloseTimer:y,triggerRef:c,contentRef:s,triggerId:m,contentId:f}},qu={sm:{padding:"4px 8px",fontSize:"12px",maxWidth:"200px"},md:{padding:"6px 10px",fontSize:"14px",maxWidth:"250px"},lg:{padding:"8px 12px",fontSize:"16px",maxWidth:"300px"}},Uu=(e=>({default:{backgroundColor:"color-gray-900",color:"color-white",borderRadius:"8px",boxShadow:"0px 4px 6px rgba(0, 0, 0, 0.1), 0px 2px 4px rgba(0, 0, 0, 0.06)",transition:"opacity 0.15s ease"},light:{backgroundColor:"color-white",color:"color-gray-800",borderWidth:"1px",borderStyle:"solid",borderColor:"color-gray-200",borderRadius:"8px",boxShadow:"0px 4px 6px rgba(0, 0, 0, 0.08), 0px 2px 4px rgba(0, 0, 0, 0.04)",transition:"opacity 0.15s ease"},dark:{backgroundColor:"color-gray-950",color:"color-white",borderRadius:"8px",boxShadow:"0px 4px 6px rgba(0, 0, 0, 0.2), 0px 2px 4px rgba(0, 0, 0, 0.12)",transition:"opacity 0.15s ease"}}))(),Gu=e=>{const o={position:"absolute",width:"8px",height:"8px",backgroundColor:"inherit",borderStyle:"inherit",borderWidth:"inherit",borderColor:"inherit",transform:"rotate(45deg)"};switch(e){case"top":return{...o,bottom:"-4px",left:"50%",marginLeft:"-4px",borderTop:"none",borderLeft:"none"};case"right":return{...o,left:"-4px",top:"50%",marginTop:"-4px",borderRight:"none",borderTop:"none"};case"bottom":return{...o,top:"-4px",left:"50%",marginLeft:"-4px",borderBottom:"none",borderRight:"none"};case"left":return{...o,right:"-4px",top:"50%",marginTop:"-4px",borderLeft:"none",borderBottom:"none"};default:return o}},Xi=h.createContext({isOpen:!1,openTooltip:()=>{},closeTooltip:()=>{},triggerRef:{current:null},contentRef:{current:null},contentId:"",triggerId:""}),pn=()=>h.useContext(Xi),Yu=({value:e,children:o})=>r.jsx(Xi.Provider,{value:e,children:o}),Ji=h.memo(({children:e,views:o,asChild:t=!1,...n})=>{const{openTooltip:a,closeTooltip:l,triggerRef:c,contentId:s,triggerId:d}=pn(),g=h.useCallback(()=>a(),[a]),m=h.useCallback(()=>l(),[l]),f=h.useCallback(()=>a(),[a]),p=h.useCallback(()=>l(),[l]),u={ref:c,onMouseEnter:g,onMouseLeave:m,onFocus:f,onBlur:p,id:d,"aria-describedby":s,...o==null?void 0:o.container,...n};return t&&h.isValidElement(e)?h.cloneElement(e,u):r.jsx(i.View,{display:"inline-block",...u,children:e})}),Ku=h.memo(({children:e,views:o,...t})=>{const{isOpen:n,contentRef:a,contentId:l,triggerId:c}=pn();return n?r.jsx(i.View,{ref:a,id:l,role:"tooltip","aria-labelledby":c,...o==null?void 0:o.container,...t,children:e}):null}),Xu=({content:e,children:o,position:t="top",align:n="center",size:a="md",variant:l="default",showArrow:c=!0,views:s,themeMode:d,...g})=>{const{isOpen:m,triggerRef:f,contentRef:p,contentId:u,triggerId:y}=pn(),{ref:k,relation:x}=i.useElementPosition({trackChanges:!0,trackOnHover:!0,trackOnScroll:!0,trackOnResize:!0}),[C,S]=h.useState({x:0,y:0,placement:t});h.useEffect(()=>{f!=null&&f.current&&k&&(k.current=f.current)},[f,k,m]),h.useEffect(()=>{if(m&&(p!=null&&p.current)&&(f!=null&&f.current)){const b=f.current.getBoundingClientRect();let I=t;x&&(t==="top"&&x.space.vertical==="bottom"?I="bottom":t==="bottom"&&x.space.vertical==="top"?I="top":t==="right"&&x.space.horizontal==="left"?I="left":t==="left"&&x.space.horizontal==="right"&&(I="right"));let T=0,j=0;switch(I){case"top":T=n==="start"?b.left:n==="end"?b.right-120:b.left+b.width/2-60,j=b.top-8;break;case"bottom":T=n==="start"?b.left:n==="end"?b.right-120:b.left+b.width/2-60,j=b.bottom+8;break;case"right":T=b.right+8,j=n==="start"?b.top:n==="end"?b.bottom-32:b.top+b.height/2-16;break;case"left":T=b.left-8,j=n==="start"?b.top:n==="end"?b.bottom-32:b.top+b.height/2-16;break}S({x:T,y:j,placement:I})}},[m,t,n,f,p,x]);const w=h.useMemo(()=>c?Gu(C.placement):{},[c,C.placement]),v=h.useMemo(()=>{const b={position:"fixed",left:C.x,top:C.y,zIndex:1e3};switch(C.placement){case"top":return{...b,transform:"translateY(-100%)"};case"left":return{...b,transform:"translateX(-100%)"};case"bottom":case"right":default:return b}},[C.x,C.y,C.placement]);return r.jsxs(i.View,{position:"relative",display:"inline-block",...s==null?void 0:s.container,...g,children:[r.jsx(Ji,{children:o}),m&&r.jsxs(i.View,{ref:p,id:u,role:"tooltip","aria-labelledby":y,borderRadius:4,boxShadow:"0px 2px 8px rgba(0, 0, 0, 0.15)",style:v,...qu[a],...Uu[l],...s==null?void 0:s.content,children:[typeof e=="string"?r.jsx(i.Text,{...s==null?void 0:s.text,children:e}):e,c&&r.jsx(i.View,{...w,...s==null?void 0:s.arrow})]})]})},et=({content:e,children:o,position:t="top",align:n="center",size:a="md",variant:l="default",openDelay:c=200,closeDelay:s=200,showArrow:d=!0,defaultOpen:g=!1,isDisabled:m=!1,views:f,...p})=>{const u=Nu({defaultOpen:g,openDelay:c,closeDelay:s,isDisabled:m});return r.jsx(Yu,{value:u,children:r.jsx(Xu,{content:e,position:t,align:n,size:a,variant:l,showArrow:d,views:f,...p,children:o})})};et.Trigger=Ji,et.Content=Ku;const Qi=h.forwardRef((e,o)=>{const t={...e,isAgentRunning:e.isAgentRunning??e.isWorkerRunning,onStopAgent:e.onStopAgent??e.onStopWorker,disabled:e.disabled??e.isDisabled},n=ul(t);return h.useImperativeHandle(o,()=>({getValue:()=>{var a,l;return((a=n.hiddenInputRef.current)==null?void 0:a.value)??((l=n.editableRef.current)==null?void 0:l.textContent)??n.value??""},setValue:n.setValue,clear:()=>n.setValue(""),focus:()=>{var a;return(a=n.editableRef.current)==null?void 0:a.focus()},blur:()=>{var a;return(a=n.editableRef.current)==null?void 0:a.blur()},getElement:()=>n.editableRef.current,getInputElement:()=>n.hiddenInputRef.current})),r.jsx(Sl,{...t,...n})});Qi.displayName="ChatInput";const Ju={container:{position:"relative",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center"}},Zi={container:{position:"relative",display:"flex",flexDirection:"column",height:"100vh",alignItems:"center",justifyContent:"center"},gradient:{position:"absolute",inset:"-10px",opacity:.5,pointerEvents:"none",filter:"blur(10px)",backgroundSize:"300% 200%",backgroundPosition:"50% 50%, 50% 50%"}},un={container:{position:"relative",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",overflow:"hidden"},image:{position:"absolute",top:0,left:0,width:"100%",height:"100%",backgroundSize:"cover",backgroundPosition:"center",backgroundRepeat:"no-repeat",backgroundAttachment:"scroll"},content:{position:"relative",width:"100%",height:"100%",zIndex:2}},yn={container:{position:"relative",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",overflow:"hidden"},video:{position:"absolute",top:0,left:0,width:"100%",height:"100%",objectFit:"cover"},content:{position:"relative",zIndex:2}},Qu=h.createContext({}),Zu=({children:e,showRadialGradient:o=!0,views:t,themeMode:n,...a})=>{const l={white:"rgba(255,255,255,1)",transparent:"rgba(255,255,255,0)"},c=["rgb(59, 130, 246)","rgb(196, 181, 253)","rgb(147, 197, 253)","rgb(221, 214, 254)","rgb(96, 165, 250)"],s={...Zi.gradient,backgroundImage:`
27
27
  repeating-linear-gradient(100deg, ${c.join(", ")}),
28
28
  repeating-linear-gradient(100deg, ${l.white} 0%, ${l.white} 7%, ${l.transparent} 10%, ${l.transparent} 12%, ${l.white} 16%)
29
29
  `,animation:"aurora 4s ease infinite",...o?{maskImage:"radial-gradient(ellipse at 100% 0%, black 10%, transparent 70%)"}:{}};return r.jsxs(i.View,{...Zi.container,...t==null?void 0:t.container,...a,children:[r.jsx(i.View,{style:s}),e,r.jsx("style",{children:`
@@ -32,5 +32,5 @@ ${Q}`:Q}let ce=M,ye=!1;M.endsWith("-thinking")&&(ce=M.replace(/-thinking$/,""),y
32
32
  50% { background-position: 100% 50%; }
33
33
  100% { background-position: 0% 50%; }
34
34
  }
35
- `})]})},Ru=({number:e=20,children:o,...t})=>{const n=Array.from({length:e},(a,l)=>l);return r.jsxs(i.View,{width:"100%",height:"100%",backgroundColor:"black",position:"relative",overflow:"hidden",...t,children:[n.map(a=>{const l=a*37%200-100+"px",c=.2+a*13%6*.1+"s",s=(1+a*7%9)/2+"s",d=300+a*17%100+"px";return r.jsx(i.View,{position:"absolute",top:"0px",left:l,width:"2px",height:"2px",borderRadius:"9999px",backgroundColor:"white",boxShadow:"0 0 0 1px rgba(255, 255, 255, 0.1)",transform:"rotate(215deg)",zIndex:0,animate:{from:{transform:"translateX(-100%) translateY(-100%)"},to:{transform:`translateX(${d}) translateY(${d})`},iterationCount:"infinite",timingFunction:"linear",fillMode:"forwards",duration:s,delay:c},children:r.jsx(i.View,{position:"absolute",top:"-1px",left:"-1px",width:"1px",height:"1px",borderRadius:"9999px",backgroundColor:"white",boxShadow:"0 10px 0 1px rgba(255, 255, 255, 0.1)"})},a)}),o&&r.jsx(i.View,{position:"relative",zIndex:1,width:"100%",height:"100%",children:o})]})},Ri=["rgb(186, 230, 253)","rgb(249, 168, 212)","rgb(134, 239, 172)","rgb(253, 224, 71)","rgb(252, 165, 165)","rgb(216, 180, 254)","rgb(147, 197, 253)","rgb(165, 180, 252)","rgb(196, 181, 253)"],ey=()=>Ri[Math.floor(Math.random()*Ri.length)],oy=({rows:e=15,cols:o=10,squareSize:t=40,...n})=>{const a=Array(e).fill(1),l=Array(o).fill(1);return r.jsx(i.View,{padding:16,width:400,height:300,position:"relative",overflow:"hidden",backgroundColor:"color-gray-50",zIndex:0,transform:"skewX(-48deg) skewY(14deg) scale(0.675) rotate(0deg) translateZ(0)",...n,children:a.map((c,s)=>r.jsx(i.Horizontal,{gap:0,children:l.map((d,g)=>r.jsx(i.View,{height:t/3,width:t,borderStyle:"solid",borderColor:"color-gray-200",borderWidth:.5,backgroundColor:"transparent",cursor:"pointer",on:{hover:{backgroundColor:ey(),transition:"background-color 0.2s ease"}}},`col-${g}`))},`row-${s}`))})},ry=["rgb(59, 130, 246)","rgb(147, 51, 234)","rgb(236, 72, 153)","rgb(34, 197, 94)","rgb(251, 146, 60)","rgb(168, 85, 247)"],ty=({count:e=50,colors:o=ry,speed:t="medium",shapes:n=["circle"],...a})=>{const l=Array.from({length:e},(g,m)=>m),c=()=>{switch(t){case"slow":return .5;case"fast":return 2;default:return 1}},s=()=>n[Math.floor(Math.random()*n.length)],d=()=>o[Math.floor(Math.random()*o.length)];return r.jsx(i.View,{width:400,height:300,position:"relative",overflow:"hidden",backgroundColor:"color-gray-900",...a,children:l.map(g=>{const m=Math.random()*8+4,f=Math.random()*400,p=Math.random()*300,u=Math.random()*400,y=Math.random()*300,k=(Math.random()*10+5)/c(),x=Math.random()*5,C=s(),S=d(),w={circle:{borderRadius:"50%"},square:{borderRadius:"2px"},triangle:{borderRadius:"0",clipPath:"polygon(50% 0%, 0% 100%, 100% 100%)"}};return r.jsx(i.View,{position:"absolute",width:m,height:m,backgroundColor:S,opacity:.7,style:{left:f,top:p,...w[C]},animate:{from:{transform:"translate(0px, 0px) scale(0.5)",opacity:0},to:{transform:`translate(${u-f}px, ${y-p}px) scale(1)`,opacity:.7},iterationCount:"infinite",direction:"alternate",timingFunction:"ease-in-out",duration:`${k}s`,delay:`${x}s`}},g)})})},ny=({gridSize:e=30,lineColor:o="rgba(59, 130, 246, 0.3)",pulseColor:t="rgba(59, 130, 246, 0.8)",animationSpeed:n="medium",...a})=>{const l=()=>{switch(n){case"slow":return 4;case"fast":return 1;default:return 2}},c=Math.floor(400/e),s=Math.floor(300/e),d=c*s,g=Array.from({length:d},(m,f)=>f);return r.jsxs(i.View,{width:400,height:300,position:"relative",overflow:"hidden",backgroundColor:"color-gray-900",...a,children:[Array.from({length:c+1},(m,f)=>r.jsx(i.View,{position:"absolute",left:f*e,top:0,width:1,height:"100%",backgroundColor:o},`v-line-${f}`)),Array.from({length:s+1},(m,f)=>r.jsx(i.View,{position:"absolute",left:0,top:f*e,width:"100%",height:1,backgroundColor:o},`h-line-${f}`)),g.map(m=>{const f=m%c,p=Math.floor(m/c),u=(f+p)*.1;return r.jsx(i.View,{position:"absolute",left:f*e+1,top:p*e+1,width:e-2,height:e-2,backgroundColor:"transparent",animate:{from:{backgroundColor:"transparent"},to:{backgroundColor:t},iterationCount:"infinite",direction:"alternate",timingFunction:"ease-in-out",duration:`${l()}s`,delay:`${u}s`}},m)})]})},ay=["rgba(59, 130, 246, 0.6)","rgba(147, 51, 234, 0.6)","rgba(236, 72, 153, 0.6)","rgba(34, 197, 94, 0.6)"],ly=({rippleCount:e=5,colors:o=ay,maxSize:t=200,frequency:n=3,...a})=>{const l=Array.from({length:e},(c,s)=>({id:s,x:Math.random()*400,y:Math.random()*300,color:o[s%o.length],delay:s*(n/e),duration:3+Math.random()*2}));return r.jsxs(i.View,{width:400,height:300,position:"relative",overflow:"hidden",backgroundColor:"color-gray-100",...a,children:[l.map(c=>r.jsx(i.View,{position:"absolute",width:20,height:20,borderRadius:"50%",style:{left:c.x-10,top:c.y-10,border:`2px solid ${c.color}`,backgroundColor:"transparent"},animate:{from:{transform:"scale(0)",opacity:1},to:{transform:`scale(${t/20})`,opacity:0},iterationCount:"infinite",timingFunction:"ease-out",duration:`${c.duration}s`,delay:`${c.delay}s`}},c.id)),l.map(c=>r.jsx(i.View,{position:"absolute",width:10,height:10,borderRadius:"50%",style:{left:c.x-5,top:c.y-5,backgroundColor:c.color},animate:{from:{transform:"scale(1)",opacity:.8},to:{transform:`scale(${t/40})`,opacity:0},iterationCount:"infinite",timingFunction:"ease-out",duration:`${c.duration*1.2}s`,delay:`${c.delay+.5}s`}},`secondary-${c.id}`))]})},iy=({children:e,src:o,backgroundSize:t="cover",backgroundPosition:n="center",backgroundRepeat:a="no-repeat",backgroundAttachment:l="scroll",imageOpacity:c=1,overlay:s=null,blendMode:d="normal",views:g,themeMode:m,...f})=>{const p={...un.image,backgroundImage:`url(${o})`,backgroundSize:t,backgroundPosition:n,backgroundRepeat:a,backgroundAttachment:l,opacity:c,mixBlendMode:d};return r.jsxs(i.View,{...un.container,...g==null?void 0:g.container,...f,children:[r.jsx(i.View,{style:p,...g==null?void 0:g.image}),s,e&&r.jsx(i.View,{...un.content,...g==null?void 0:g.content,children:e})]})},cy=({children:e,src:o,autoPlay:t=!0,loop:n=!0,muted:a=!0,playsInline:l=!0,overlay:c=null,blendMode:s="normal",views:d,themeMode:g,...m})=>r.jsxs(i.View,{...yn.container,...d==null?void 0:d.container,...m,children:[r.jsx(i.View,{as:"video",src:o,autoPlay:t,loop:n,muted:a,playsInline:l,style:{...yn.video,mixBlendMode:s},...d==null?void 0:d.video}),c,e&&r.jsx(i.View,{...yn.content,...d==null?void 0:d.content,children:e})]}),sy=({children:e,...o})=>r.jsx(xi,{...o,children:e}),dy=/^(color|theme|light|dark)-/,gy=e=>{const o=e.split("-"),t=parseInt(o[o.length-1],10),n=e.startsWith("theme-")?3:4;return o.length>=n&&!isNaN(t)&&t>=0&&t<=1e3?o.slice(0,-1).join("-"):e},hy=({contentPosition:e,backgroundColor:o="color-black-900",...t})=>{const n=dy.test(o),a=n?gy(o):o,c=(()=>{let s=`${a}-100`,d=`${a}-900`,g=`${a}-600`,m=`${a}-400`;switch(n||(s=`color-mix(in srgb, ${a} 10%, transparent)`,d=`color-mix(in srgb, ${a} 90%, transparent)`,g=`color-mix(in srgb, ${a} 70%, transparent)`,m=`color-mix(in srgb, ${a} 50%, transparent)`),e){case"left":return`radial-gradient(circle at 70% 50%, ${s} 0%, ${s} 100%), linear-gradient(to right, ${d} 0%, ${g} 65%, ${s} 100%)`;case"right":return`radial-gradient(circle at 30% 50%, ${s} 0%, ${s} 100%), linear-gradient(to left, ${d} 0%, ${g} 65%, ${s} 100%)`;case"top":return`radial-gradient(circle at 50% 40%, ${s} 0%, ${s} 100%), linear-gradient(to bottom, ${d} 0%, ${g} 60%, ${s} 100%)`;case"bottom":return`radial-gradient(circle at 50% 60%, ${s} 0%, ${s} 100%), linear-gradient(to top, ${d} 0%, ${g} 60%, ${s} 100%)`;case"center":return`radial-gradient(circle at 50% 70%, ${d} 0%, ${s} 100%)`;default:return m}})();return r.jsx(i.View,{position:"absolute",top:0,left:0,width:"100%",height:"100%",background:c,pointerEvents:"none",zIndex:1,...t})},fy=({children:e,views:o,...t})=>r.jsx(Qu.Provider,{value:{},children:r.jsx(i.View,{...Ju.container,...o==null?void 0:o.container,...t,children:e})}),ec=h.forwardRef(({children:e,shape:o="rounded",decorationRotation:t=5,decorationScale:n=1,decorationOpacity:a=.8,views:l,...c},s)=>{const g=(k=>{switch(k){case"square":return"0px";case"pill":return"9999px";case"rounded":default:return"16px"}})(o),m=Math.abs(t)*(Math.PI/180),f=Math.sin(m)*100,p=(n-1)*100/2,u=Math.ceil(f+p),y=c.backgroundColor??"theme-primary";return r.jsx(i.View,{...c,ref:s,backgroundColor:"transparent",position:"relative",overflow:"visible",...l==null?void 0:l.container,children:r.jsxs(i.View,{padding:c.padding??`${96+u}px ${u}px`,position:"relative",overflow:"visible",children:[r.jsx(i.View,{position:"absolute",top:u,left:u,right:u,bottom:u,backgroundColor:y,borderRadius:g,opacity:a/1.5,transform:`scale(${n})`,pointerEvents:"none",zIndex:1,...l==null?void 0:l.back}),r.jsx(i.View,{position:"absolute",top:u,left:u,right:u,bottom:u,transform:`rotate(${t}deg) scale(${n})`,opacity:a/1.2,backgroundColor:y,borderRadius:g,pointerEvents:"none",zIndex:2,...l==null?void 0:l.front}),r.jsx(i.View,{margin:"0 auto",position:"relative",zIndex:3,...l==null?void 0:l.content,children:e})]})})});ec.displayName="Background.Layout";const fe=fy;fe.Aurora=Zu,fe.Meteors=Ru,fe.Wall=oy,fe.Particles=ty,fe.Grid=ny,fe.Ripples=ly,fe.Image=iy,fe.Video=cy,fe.Gradient=sy,fe.Overlay=hy,fe.Layout=ec;const oc=h.forwardRef((e,o)=>r.jsx(fe,{...e,ref:o}));oc.displayName="Background";const rc=Object.assign(oc,{Layout:fe.Layout,Aurora:fe.Aurora,Meteors:fe.Meteors,Wall:fe.Wall,Particles:fe.Particles,Grid:fe.Grid,Ripples:fe.Ripples,Image:fe.Image,Video:fe.Video,Gradient:fe.Gradient,Overlay:fe.Overlay});rc.displayName="Background";function my(e){const{inputValue:o,onInputChange:t,onSubmit:n,messages:a=[]}=e,[l,c]=h.useState(""),s=h.useRef(null),d=h.useRef(null),g=o!==void 0,m=o!==void 0?o:l,f=h.useCallback(u=>{g?t==null||t(u):c(u)},[g,t]),p=h.useCallback(u=>{u&&u.preventDefault();const y=m.trim();y&&n&&(n(y),g||c(""),s.current&&(s.current.style.height="auto"))},[m,n,g]);return h.useEffect(()=>{d.current&&(d.current.scrollTop=d.current.scrollHeight)},[a.length]),{internalInputValue:m,handleInputChange:f,handleSubmit:p,inputRef:s,messagesRef:d}}const py={sm:{fontSize:"12px",padding:"8px"},md:{fontSize:"14px",padding:"10px"},lg:{fontSize:"14px",padding:"12px"}},uy={default:{backgroundColor:"color-white",border:"1px solid color-gray-200",borderRadius:"12px",boxShadow:"0 12px 32px rgba(15, 23, 42, 0.08)"},glassy:{backgroundColor:"color-white-900",backdropFilter:"blur(10px)",border:"1px solid rgba(226, 232, 240, 0.9)",borderRadius:"12px",boxShadow:"0 12px 32px rgba(15, 23, 42, 0.08)"},minimal:{backgroundColor:"color-white",border:"1px solid color-gray-200",borderRadius:"12px"}},yy={sm:{fontSize:"12px",padding:"8px 10px",borderRadius:"12px"},md:{fontSize:"14px",padding:"10px 12px",borderRadius:"12px"},lg:{fontSize:"14px",padding:"12px 14px",borderRadius:"14px"}},by={backgroundColor:"theme-primary",color:"color-white",alignSelf:"flex-end",borderBottomRightRadius:"4px"},xy={backgroundColor:"color-white",color:"color-gray-900",alignSelf:"flex-start",borderBottomLeftRadius:"4px",border:"1px solid color-gray-200"},Ye={container:{display:"flex",flexDirection:"column",width:"100%",height:"100%",overflow:"hidden"},messagesContainer:{flex:1,overflowY:"auto",display:"flex",flexDirection:"column",gap:"12px",padding:"16px",backgroundColor:"color-gray-50"},inputContainer:{position:"relative",backgroundColor:"color-white",borderTop:"1px solid color-gray-200",padding:"12px",display:"flex",alignItems:"flex-end",gap:"8px",transition:"background-color 0.2s ease, border-color 0.2s ease"},bubble:{maxWidth:"80%",position:"relative",wordWrap:"break-word",animation:"chatBubbleAppear 0.25s ease-out"},timestamp:{position:"absolute",top:"-24px",fontSize:"12px",color:"color-gray-500",backgroundColor:"color-white-900",padding:"2px 8px",borderRadius:"9999px",opacity:0,transition:"opacity 0.15s ease-out",border:"1px solid color-gray-200"},input:{flex:1,border:"none",outline:"none",backgroundColor:"transparent",resize:"none",fontFamily:"inherit",fontSize:"14px",minHeight:"24px",maxHeight:"120px"},sendButton:{width:"36px",height:"36px",borderRadius:"10px",border:"none",cursor:"pointer",display:"flex",alignItems:"center",justifyContent:"center",transition:"background-color 0.2s ease, opacity 0.2s ease",flexShrink:0},attachmentButton:{width:"36px",height:"36px",borderRadius:"10px",border:"none",cursor:"pointer",display:"flex",alignItems:"center",justifyContent:"center",backgroundColor:"transparent",transition:"background-color 0.2s ease",flexShrink:0}},ky=({messages:e=[],inputPlaceholder:o="Type a message...",disableInput:t=!1,variant:n="default",size:a="md",showTimestamps:l=!0,enableAttachments:c=!1,enableContextPicker:s=!1,selectedContextElements:d=[],onContextPickerClick:g,onRemoveContextElement:m,isLoading:f=!1,loadingText:p="Loading...",styles:u={},maxHeight:y="600px",internalInputValue:k,handleInputChange:x,handleSubmit:C,inputRef:S,messagesRef:w,inputValue:v,onInputChange:b,...I})=>{var j;const T={...Ye.container,...uy[n],...u.container},P={...Ye.messagesContainer,maxHeight:y,...u.messagesContainer},E={...Ye.inputContainer,...u.inputContainer},D={...Ye.input,...py[a],...u.input},z=h.useCallback(M=>{x(M.target.value),M.target.style.height="auto",M.target.style.height=`${M.target.scrollHeight}px`},[x]),A=h.useCallback(M=>{M.key==="Enter"&&!M.shiftKey&&(M.preventDefault(),C())},[C]),W=k.trim().length>0,{onSubmit:H,...V}=I;return r.jsxs(i.View,{...T,...V,children:[r.jsxs(i.View,{ref:w,...P,children:[e.length===0?r.jsx(i.View,{display:"flex",alignItems:"center",justifyContent:"center",flex:1,color:"color-gray-500",children:r.jsx(i.Text,{fontSize:"14px",children:"No messages yet. Start a conversation."})}):e.map(M=>r.jsx(Cy,{message:M,size:a,showTimestamp:l,styles:{bubble:u.bubble,userBubble:u.userBubble,assistantBubble:u.assistantBubble,timestamp:u.timestamp,reasoningContainer:u.reasoningContainer,reasoningContent:u.reasoningContent,errorMessage:u.errorMessage,systemMessage:u.systemMessage,toolMessage:u.toolMessage}},M.id)),f&&r.jsxs(i.Horizontal,{justifyContent:"flex-start",alignItems:"center",gap:8,marginTop:"8px",...u.loadingIndicator,children:[r.jsx(bt,{widthHeight:12,color:"currentColor",filled:!1,style:{animation:"spin 1s linear infinite"}}),r.jsx(i.Text,{color:"color-gray-500",fontSize:"14px",children:p})]})]}),r.jsxs(i.View,{children:[d.length>0&&r.jsx(i.Horizontal,{gap:8,marginBottom:"8px",flexWrap:"wrap",padding:"0 12px 8px",...u.contextChipsContainer,children:d.map(M=>r.jsxs(i.Horizontal,{backgroundColor:"color-blue-50",borderWidth:1,borderStyle:"solid",borderColor:"color-blue-200",borderRadius:"9999px",padding:"6px 10px",alignItems:"center",gap:6,children:[r.jsx(i.Text,{fontSize:"12px",color:"color-blue-700",fontWeight:"500",children:M.name}),r.jsx(i.View,{as:"button",type:"button",onClick:()=>m==null?void 0:m(M.id),cursor:"pointer",border:"none",backgroundColor:"transparent",display:"flex",alignItems:"center",children:r.jsx(He,{widthHeight:12,color:"color-blue-700"})})]},M.id))}),r.jsxs(i.View,{as:"form",onSubmit:C,...E,children:[c&&r.jsx(i.View,{as:"button",type:"button",...Ye.attachmentButton,...u.attachmentButton,_hover:{backgroundColor:"color-gray-100"},children:r.jsx(Ko,{widthHeight:16,color:"color-gray-600"})}),r.jsx(i.View,{as:"textarea",ref:S,value:k,onChange:z,onKeyDown:A,placeholder:o,disabled:t||f,...D,style:{...D,opacity:t||f?.5:1}}),r.jsxs(i.Vertical,{gap:4,alignItems:"center",children:[s&&r.jsx(i.View,{as:"button",type:"button",onClick:g,...Ye.attachmentButton,...u.contextPickerButton,_hover:{backgroundColor:"color-gray-100",...(j=u.contextPickerButton)==null?void 0:j._hover},title:"Select element from page",children:r.jsx(Xn,{widthHeight:16,color:"color-gray-600"})}),r.jsx(i.View,{as:"button",type:"submit",disabled:!W||t||f,...Ye.sendButton,backgroundColor:W?"theme-primary":"color-gray-300",_hover:{backgroundColor:W?"theme-primary":"color-gray-300"},...u.sendButton,style:{cursor:W?"pointer":"not-allowed",opacity:!W||t||f?.6:1},children:r.jsx(yt,{widthHeight:16,color:"color-white",filled:!1})})]})]})]})]})},Cy=({message:e,size:o,showTimestamp:t,styles:n})=>{const[a,l]=h.useState(!1),[c,s]=h.useState(!1),d=e.role==="user",g=e.messageType==="system",m=e.messageType==="error",f=e.messageType==="tool";if(g)return r.jsx(i.View,{display:"flex",justifyContent:"center",padding:"8px",width:"100%",...n.systemMessage,children:r.jsxs(i.Horizontal,{gap:6,alignItems:"center",opacity:.7,children:[r.jsx(Re,{widthHeight:12,color:"color-gray-600"}),r.jsx(i.Text,{fontSize:"12px",color:"color-gray-600",fontStyle:"italic",children:e.content})]})});if(f)return r.jsx(i.View,{display:"flex",justifyContent:"flex-start",padding:"8px 16px",width:"100%",...n.toolMessage,children:r.jsxs(i.Horizontal,{gap:8,alignItems:"center",backgroundColor:"color-gray-50",padding:"8px 10px",borderRadius:"8px",width:"100%",borderWidth:1,borderStyle:"solid",borderColor:"color-gray-200",children:[r.jsx(Un,{widthHeight:14,color:"color-gray-600"}),r.jsxs(i.Vertical,{gap:2,children:[r.jsx(i.Text,{fontSize:"11px",fontWeight:"600",color:"color-gray-700",children:"Tool Usage"}),r.jsx(i.Text,{fontSize:"12px",color:"color-gray-600",fontFamily:"monospace",children:e.content})]})]})});const p={...Ye.bubble,...yy[o],...d?by:xy,...m?{backgroundColor:"color-red-50",borderWidth:1,borderStyle:"solid",borderColor:"color-red-200",color:"color-red-700"}:{},...n.bubble,...d?n.userBubble:n.assistantBubble,...m?n.errorMessage:{}},u={...Ye.timestamp,[d?"right":"left"]:"8px",opacity:a?1:0,...n.timestamp};return r.jsx(i.View,{position:"relative",onMouseEnter:()=>l(!0),onMouseLeave:()=>l(!1),display:"flex",justifyContent:d?"flex-end":"flex-start",children:r.jsxs(i.View,{...p,children:[t&&r.jsx(i.View,{...u,children:e.timestamp.toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"})}),m&&r.jsxs(i.Horizontal,{gap:6,marginBottom:"4px",alignItems:"center",children:[r.jsx(Sr,{widthHeight:14,color:"color-red-700"}),r.jsx(i.Text,{fontWeight:"600",fontSize:"12px",children:"Error"})]}),e.reasoning&&r.jsxs(i.View,{marginBottom:"8px",borderBottomWidth:1,borderBottomStyle:"solid",borderBottomColor:"color-gray-200",paddingBottom:"8px",...n.reasoningContainer,children:[r.jsxs(i.Horizontal,{as:"button",onClick:()=>s(!c),cursor:"pointer",gap:4,alignItems:"center",backgroundColor:"transparent",border:"none",padding:0,children:[r.jsx(i.Text,{fontSize:"11px",color:"color-gray-500",fontWeight:"600",children:"Thinking Process"}),r.jsx(he,{orientation:c?"down":"right",widthHeight:10,color:"color-gray-500"})]}),c&&r.jsx(i.View,{padding:"8px",backgroundColor:"color-gray-50",borderRadius:"8px",marginTop:"4px",borderWidth:1,borderStyle:"solid",borderColor:"color-gray-200",...n.reasoningContent,children:r.jsx(i.Text,{fontSize:"12px",color:"color-gray-600",fontStyle:"italic",children:e.reasoning})})]}),r.jsx(i.View,{whiteSpace:"pre-wrap",wordBreak:"break-word",children:e.content}),e.attachments&&e.attachments.length>0&&r.jsx(i.Vertical,{gap:4,marginTop:"8px",children:e.attachments.map(y=>r.jsxs(i.Horizontal,{gap:6,padding:"6px 8px",backgroundColor:"color-gray-50",borderRadius:"8px",fontSize:"12px",borderWidth:1,borderStyle:"solid",borderColor:"color-gray-200",children:[r.jsx(Ko,{widthHeight:14}),r.jsx(i.Text,{children:y.name})]},y.id))}),e.contextElements&&e.contextElements.length>0&&r.jsxs(i.Vertical,{gap:4,marginTop:"8px",children:[r.jsx(i.Text,{fontSize:"11px",color:"color-black-500",fontWeight:"600",children:"Context:"}),e.contextElements.map(y=>r.jsx(i.Horizontal,{gap:6,padding:"6px 10px",backgroundColor:"color-blue-50",borderRadius:"9999px",fontSize:"11px",borderWidth:1,borderStyle:"solid",borderColor:"color-blue-200",children:r.jsx(i.Text,{color:"color-blue-700",fontWeight:"500",children:y.name})},y.id))]})]})})},bn=e=>{const o=my(e);return r.jsx(ky,{...e,...o})};bn.displayName="ChatWidget";const tc=bn;function wy({onSelect:e,onCancel:o,active:t}){const[n,a]=h.useState(null);h.useRef(null);const l=h.useCallback(d=>{var u;if(!t)return;const g=document.elementFromPoint(d.clientX,d.clientY);if(!g||g===document.body||g.closest('[data-chatwidget-ignore="true"]')||g.closest("#chatwidget-overlay")){a(null);return}const m=g.getBoundingClientRect();let f=g.tagName.toLowerCase();if(g.id)f+=`#${g.id}`;else if(g.className&&typeof g.className=="string"){const y=g.className.split(" ")[0];y&&(f+=`.${y}`)}const p=(u=g.innerText)==null?void 0:u.slice(0,20);p&&(f+=` ("${p}...")`),a({id:g.id||`el-${Date.now()}`,name:f,tagName:g.tagName.toLowerCase(),rect:m})},[t]),c=h.useCallback(d=>{!t||d.target.closest('[data-chatwidget-ignore="true"]')||(d.preventDefault(),d.stopPropagation(),n&&e(n))},[t,n,e]),s=h.useCallback(d=>{t&&d.key==="Escape"&&o()},[t,o]);return h.useEffect(()=>{if(!(typeof document>"u"))return t?(document.addEventListener("mousemove",l),document.addEventListener("click",c,!0),document.addEventListener("keydown",s),document.body.style.cursor="crosshair"):(a(null),document.removeEventListener("mousemove",l),document.removeEventListener("click",c,!0),document.removeEventListener("keydown",s),document.body.style.cursor=""),()=>{document.removeEventListener("mousemove",l),document.removeEventListener("click",c,!0),document.removeEventListener("keydown",s),document.body.style.cursor=""}},[t,l,c,s]),{highlightedElement:n}}function Sy({element:e}){return e?r.jsx("div",{id:"chatwidget-overlay",style:{position:"fixed",top:e.rect.top,left:e.rect.left,width:e.rect.width,height:e.rect.height,border:"2px solid #1D4ED8",backgroundColor:"rgba(29, 78, 216, 0.08)",pointerEvents:"none",zIndex:99999,transition:"top 0.1s ease-out, left 0.1s ease-out, width 0.1s ease-out, height 0.1s ease-out",borderRadius:"8px"},children:r.jsx("div",{style:{position:"absolute",top:"-24px",left:"0",backgroundColor:"#1D4ED8",color:"white",padding:"2px 8px",borderRadius:"9999px",fontSize:"12px",fontWeight:"bold",whiteSpace:"nowrap"},children:e.name})}):null}const vy=({initialMessages:e=[],onSendMessage:o,bubbleSize:t="md"})=>{const[n,a]=h.useState(!1),[l,c]=h.useState(!1),[s,d]=h.useState(e),[g,m]=h.useState([]),{highlightedElement:f}=wy({active:l,onSelect:x=>{m(C=>[...C,x]),c(!1),a(!0)},onCancel:()=>{c(!1),a(!0)}}),p=()=>a(!n),u=()=>{c(!0),a(!1)},y=x=>{m(C=>C.filter(S=>S.id!==x))},k=x=>{const C={id:Date.now().toString(),role:"user",content:x,timestamp:new Date,contextElements:[...g]};d(S=>[...S,C]),o==null||o(x,g),m([]),setTimeout(()=>{var b;const S=Math.random()>.7,w=Math.random()>.4,v={id:(Date.now()+1).toString(),role:"assistant",timestamp:new Date,content:S?"I will highlight the selected element.":`I received your message regarding: ${((b=C.contextElements)==null?void 0:b.map(I=>I.name).join(", "))||"general context"}. How can I assist you further?`,messageType:S?"tool":"text",reasoning:w?"Analyzing the user input and context... The user seems to be asking about specific elements. I should tailor my response to the selected context.":void 0};d(I=>[...I,v]),S&&setTimeout(()=>{d(I=>[...I,{id:(Date.now()+2).toString(),role:"assistant",messageType:"system",content:'Tool "highlightElement" executed successfully.',timestamp:new Date}])},800)},1e3)};return r.jsxs(i.View,{position:"fixed",bottom:24,right:24,zIndex:9999,children:[r.jsx(Sy,{element:f}),l&&r.jsx(i.View,{position:"fixed",top:24,left:"50%",transform:"translateX(-50%)",backgroundColor:"rgba(0,0,0,0.8)",color:"white",padding:"8px 16px",borderRadius:"24px",zIndex:1e4,boxShadow:"0 4px 6px rgba(0,0,0,0.1)",children:r.jsx(i.Text,{fontWeight:"600",fontSize:"14px",children:"Click an element to select it. Press ESC to cancel."})}),n&&r.jsxs(i.View,{position:"absolute",bottom:60,right:0,width:"400px",height:"600px",marginBottom:"16px",backgroundColor:"rgba(255, 255, 255, 0.8)",backdropFilter:"blur(20px)",borderRadius:"24px",border:"1px solid rgba(255, 255, 255, 0.4)",boxShadow:"0 25px 50px -12px rgba(0, 0, 0, 0.25)",overflow:"hidden",animation:"slideUp 0.3s ease-out",style:{animation:"fadeIn 0.2s ease-out",transformOrigin:"bottom right"},children:[r.jsxs(i.View,{padding:"16px",borderBottom:"1px solid rgba(0,0,0,0.05)",display:"flex",justifyContent:"space-between",alignItems:"center",children:[r.jsx(i.Text,{fontWeight:"bold",color:"color-gray-800",children:"ChatWidget Assistant"}),r.jsx(i.View,{as:"button",onClick:()=>a(!1),cursor:"pointer",padding:"4px",borderRadius:"50%",border:"none",backgroundColor:"transparent",_hover:{backgroundColor:"rgba(0,0,0,0.05)"},children:r.jsx(He,{widthHeight:16,color:"color-gray-500"})})]}),r.jsx(tc,{messages:s,onSubmit:k,size:t,variant:"minimal",enableContextPicker:!0,selectedContextElements:g,onContextPickerClick:u,onRemoveContextElement:y,styles:{container:{height:"calc(100% - 60px)",backgroundColor:"transparent"},inputContainer:{backgroundColor:"white",margin:"0 16px 16px 16px",boxShadow:"0 4px 6px -1px rgba(0, 0, 0, 0.1)"}}})]}),!l&&r.jsx(i.View,{as:"button",onClick:p,width:"56px",height:"56px",borderRadius:"50%",backgroundColor:"theme-primary",border:"none",boxShadow:"0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06)",cursor:"pointer",display:"flex",alignItems:"center",justifyContent:"center",transition:"transform 0.2s ease",_hover:{transform:"scale(1.05)"},_active:{transform:"scale(0.95)"},"data-chatwidget-ignore":"true",children:n?r.jsx(He,{widthHeight:24,color:"white"}):r.jsx(Kn,{widthHeight:24,color:"white"})})]})};function xn(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Ty=typeof Element<"u",Iy=typeof Map=="function",Fy=typeof Set=="function",zy=typeof ArrayBuffer=="function"&&!!ArrayBuffer.isView;function ot(e,o){if(e===o)return!0;if(e&&o&&typeof e=="object"&&typeof o=="object"){if(e.constructor!==o.constructor)return!1;var t,n,a;if(Array.isArray(e)){if(t=e.length,t!=o.length)return!1;for(n=t;n--!==0;)if(!ot(e[n],o[n]))return!1;return!0}var l;if(Iy&&e instanceof Map&&o instanceof Map){if(e.size!==o.size)return!1;for(l=e.entries();!(n=l.next()).done;)if(!o.has(n.value[0]))return!1;for(l=e.entries();!(n=l.next()).done;)if(!ot(n.value[1],o.get(n.value[0])))return!1;return!0}if(Fy&&e instanceof Set&&o instanceof Set){if(e.size!==o.size)return!1;for(l=e.entries();!(n=l.next()).done;)if(!o.has(n.value[0]))return!1;return!0}if(zy&&ArrayBuffer.isView(e)&&ArrayBuffer.isView(o)){if(t=e.length,t!=o.length)return!1;for(n=t;n--!==0;)if(e[n]!==o[n])return!1;return!0}if(e.constructor===RegExp)return e.source===o.source&&e.flags===o.flags;if(e.valueOf!==Object.prototype.valueOf&&typeof e.valueOf=="function"&&typeof o.valueOf=="function")return e.valueOf()===o.valueOf();if(e.toString!==Object.prototype.toString&&typeof e.toString=="function"&&typeof o.toString=="function")return e.toString()===o.toString();if(a=Object.keys(e),t=a.length,t!==Object.keys(o).length)return!1;for(n=t;n--!==0;)if(!Object.prototype.hasOwnProperty.call(o,a[n]))return!1;if(Ty&&e instanceof Element)return!1;for(n=t;n--!==0;)if(!((a[n]==="_owner"||a[n]==="__v"||a[n]==="__o")&&e.$$typeof)&&!ot(e[a[n]],o[a[n]]))return!1;return!0}return e!==e&&o!==o}var My=function(o,t){try{return ot(o,t)}catch(n){if((n.message||"").match(/stack|recursion/i))return console.warn("react-fast-compare cannot handle circular refs"),!1;throw n}};const Wy=xn(My);var Hy=function(e,o,t,n,a,l,c,s){if(process.env.NODE_ENV!=="production"&&o===void 0)throw new Error("invariant requires an error message argument");if(!e){var d;if(o===void 0)d=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var g=[t,n,a,l,c,s],m=0;d=new Error(o.replace(/%s/g,function(){return g[m++]})),d.name="Invariant Violation"}throw d.framesToPop=1,d}},jy=Hy;const nc=xn(jy);var Py=function(o,t,n,a){var l=n?n.call(a,o,t):void 0;if(l!==void 0)return!!l;if(o===t)return!0;if(typeof o!="object"||!o||typeof t!="object"||!t)return!1;var c=Object.keys(o),s=Object.keys(t);if(c.length!==s.length)return!1;for(var d=Object.prototype.hasOwnProperty.bind(t),g=0;g<c.length;g++){var m=c[g];if(!d(m))return!1;var f=o[m],p=t[m];if(l=n?n.call(a,f,p,m):void 0,l===!1||l===void 0&&f!==p)return!1}return!0};const Vy=xn(Py);var ac=(e=>(e.BASE="base",e.BODY="body",e.HEAD="head",e.HTML="html",e.LINK="link",e.META="meta",e.NOSCRIPT="noscript",e.SCRIPT="script",e.STYLE="style",e.TITLE="title",e.FRAGMENT="Symbol(react.fragment)",e))(ac||{}),kn={link:{rel:["amphtml","canonical","alternate"]},script:{type:["application/ld+json"]},meta:{charset:"",name:["generator","robots","description"],property:["og:type","og:title","og:url","og:image","og:image:alt","og:description","twitter:url","twitter:title","twitter:description","twitter:image","twitter:image:alt","twitter:card","twitter:site"]}},lc=Object.values(ac),rt={accesskey:"accessKey",charset:"charSet",class:"className",contenteditable:"contentEditable",contextmenu:"contextMenu","http-equiv":"httpEquiv",itemprop:"itemProp",tabindex:"tabIndex"},ic=Object.entries(rt).reduce((e,[o,t])=>(e[t]=o,e),{}),_e="data-rh",Oo={DEFAULT_TITLE:"defaultTitle",DEFER:"defer",ENCODE_SPECIAL_CHARACTERS:"encodeSpecialCharacters",ON_CHANGE_CLIENT_STATE:"onChangeClientState",TITLE_TEMPLATE:"titleTemplate",PRIORITIZE_SEO_TAGS:"prioritizeSeoTags"},No=(e,o)=>{for(let t=e.length-1;t>=0;t-=1){const n=e[t];if(Object.prototype.hasOwnProperty.call(n,o))return n[o]}return null},Ay=e=>{let o=No(e,"title");const t=No(e,Oo.TITLE_TEMPLATE);if(Array.isArray(o)&&(o=o.join("")),t&&o)return t.replace(/%s/g,()=>o);const n=No(e,Oo.DEFAULT_TITLE);return o||n||void 0},Ey=e=>No(e,Oo.ON_CHANGE_CLIENT_STATE)||(()=>{}),Cn=(e,o)=>o.filter(t=>typeof t[e]<"u").map(t=>t[e]).reduce((t,n)=>({...t,...n}),{}),Dy=(e,o)=>o.filter(t=>typeof t.base<"u").map(t=>t.base).reverse().reduce((t,n)=>{if(!t.length){const a=Object.keys(n);for(let l=0;l<a.length;l+=1){const s=a[l].toLowerCase();if(e.indexOf(s)!==-1&&n[s])return t.concat(n)}}return t},[]),$y=e=>console&&typeof console.warn=="function"&&console.warn(e),fr=(e,o,t)=>{const n={};return t.filter(a=>Array.isArray(a[e])?!0:(typeof a[e]<"u"&&$y(`Helmet: ${e} should be of type "Array". Instead found type "${typeof a[e]}"`),!1)).map(a=>a[e]).reverse().reduce((a,l)=>{const c={};l.filter(d=>{let g;const m=Object.keys(d);for(let p=0;p<m.length;p+=1){const u=m[p],y=u.toLowerCase();o.indexOf(y)!==-1&&!(g==="rel"&&d[g].toLowerCase()==="canonical")&&!(y==="rel"&&d[y].toLowerCase()==="stylesheet")&&(g=y),o.indexOf(u)!==-1&&(u==="innerHTML"||u==="cssText"||u==="itemprop")&&(g=u)}if(!g||!d[g])return!1;const f=d[g].toLowerCase();return n[g]||(n[g]={}),c[g]||(c[g]={}),n[g][f]?!1:(c[g][f]=!0,!0)}).reverse().forEach(d=>a.push(d));const s=Object.keys(c);for(let d=0;d<s.length;d+=1){const g=s[d],m={...n[g],...c[g]};n[g]=m}return a},[]).reverse()},Ly=(e,o)=>{if(Array.isArray(e)&&e.length){for(let t=0;t<e.length;t+=1)if(e[t][o])return!0}return!1},_y=e=>({baseTag:Dy(["href"],e),bodyAttributes:Cn("bodyAttributes",e),defer:No(e,Oo.DEFER),encode:No(e,Oo.ENCODE_SPECIAL_CHARACTERS),htmlAttributes:Cn("htmlAttributes",e),linkTags:fr("link",["rel","href"],e),metaTags:fr("meta",["name","charset","http-equiv","property","itemprop"],e),noscriptTags:fr("noscript",["innerHTML"],e),onChangeClientState:Ey(e),scriptTags:fr("script",["src","innerHTML"],e),styleTags:fr("style",["cssText"],e),title:Ay(e),titleAttributes:Cn("titleAttributes",e),prioritizeSeoTags:Ly(e,Oo.PRIORITIZE_SEO_TAGS)}),cc=e=>Array.isArray(e)?e.join(""):e,By=(e,o)=>{const t=Object.keys(e);for(let n=0;n<t.length;n+=1)if(o[t[n]]&&o[t[n]].includes(e[t[n]]))return!0;return!1},wn=(e,o)=>Array.isArray(e)?e.reduce((t,n)=>(By(n,o)?t.priority.push(n):t.default.push(n),t),{priority:[],default:[]}):{default:e,priority:[]},sc=(e,o)=>({...e,[o]:void 0}),Oy=["noscript","script","style"],Sn=(e,o=!0)=>o===!1?String(e):String(e).replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#x27;"),dc=e=>Object.keys(e).reduce((o,t)=>{const n=typeof e[t]<"u"?`${t}="${e[t]}"`:`${t}`;return o?`${o} ${n}`:n},""),Ny=(e,o,t,n)=>{const a=dc(t),l=cc(o);return a?`<${e} ${_e}="true" ${a}>${Sn(l,n)}</${e}>`:`<${e} ${_e}="true">${Sn(l,n)}</${e}>`},qy=(e,o,t=!0)=>o.reduce((n,a)=>{const l=a,c=Object.keys(l).filter(g=>!(g==="innerHTML"||g==="cssText")).reduce((g,m)=>{const f=typeof l[m]>"u"?m:`${m}="${Sn(l[m],t)}"`;return g?`${g} ${f}`:f},""),s=l.innerHTML||l.cssText||"",d=Oy.indexOf(e)===-1;return`${n}<${e} ${_e}="true" ${c}${d?"/>":`>${s}</${e}>`}`},""),gc=(e,o={})=>Object.keys(e).reduce((t,n)=>{const a=rt[n];return t[a||n]=e[n],t},o),Uy=(e,o,t)=>{const n={key:o,[_e]:!0},a=gc(t,n);return[h.createElement("title",a,o)]},tt=(e,o)=>o.map((t,n)=>{const a={key:n,[_e]:!0};return Object.keys(t).forEach(l=>{const s=rt[l]||l;if(s==="innerHTML"||s==="cssText"){const d=t.innerHTML||t.cssText;a.dangerouslySetInnerHTML={__html:d}}else a[s]=t[l]}),h.createElement(e,a)}),Ae=(e,o,t=!0)=>{switch(e){case"title":return{toComponent:()=>Uy(e,o.title,o.titleAttributes),toString:()=>Ny(e,o.title,o.titleAttributes,t)};case"bodyAttributes":case"htmlAttributes":return{toComponent:()=>gc(o),toString:()=>dc(o)};default:return{toComponent:()=>tt(e,o),toString:()=>qy(e,o,t)}}},Gy=({metaTags:e,linkTags:o,scriptTags:t,encode:n})=>{const a=wn(e,kn.meta),l=wn(o,kn.link),c=wn(t,kn.script);return{priorityMethods:{toComponent:()=>[...tt("meta",a.priority),...tt("link",l.priority),...tt("script",c.priority)],toString:()=>`${Ae("meta",a.priority,n)} ${Ae("link",l.priority,n)} ${Ae("script",c.priority,n)}`},metaTags:a.default,linkTags:l.default,scriptTags:c.default}},Yy=e=>{const{baseTag:o,bodyAttributes:t,encode:n=!0,htmlAttributes:a,noscriptTags:l,styleTags:c,title:s="",titleAttributes:d,prioritizeSeoTags:g}=e;let{linkTags:m,metaTags:f,scriptTags:p}=e,u={toComponent:()=>[],toString:()=>""};return g&&({priorityMethods:u,linkTags:m,metaTags:f,scriptTags:p}=Gy(e)),{priority:u,base:Ae("base",o,n),bodyAttributes:Ae("bodyAttributes",t,n),htmlAttributes:Ae("htmlAttributes",a,n),link:Ae("link",m,n),meta:Ae("meta",f,n),noscript:Ae("noscript",l,n),script:Ae("script",p,n),style:Ae("style",c,n),title:Ae("title",{title:s,titleAttributes:d},n)}},vn=Yy,nt=[],Tn=!!(typeof window<"u"&&window.document&&window.document.createElement),In=class{constructor(e,o){Ze(this,"instances",[]);Ze(this,"canUseDOM",Tn);Ze(this,"context");Ze(this,"value",{setHelmet:e=>{this.context.helmet=e},helmetInstances:{get:()=>this.canUseDOM?nt:this.instances,add:e=>{(this.canUseDOM?nt:this.instances).push(e)},remove:e=>{const o=(this.canUseDOM?nt:this.instances).indexOf(e);(this.canUseDOM?nt:this.instances).splice(o,1)}}});this.context=e,this.canUseDOM=o||!1,o||(e.helmet=vn({baseTag:[],bodyAttributes:{},htmlAttributes:{},linkTags:[],metaTags:[],noscriptTags:[],scriptTags:[],styleTags:[],title:"",titleAttributes:{}}))}},Ky=parseInt(h.version.split(".")[0],10),Fn=Ky>=19,Xy={},hc=h.createContext(Xy),Jy=(wo=class extends h.Component{constructor(t){super(t);Ze(this,"helmetData");Fn?this.helmetData=null:this.helmetData=new In(this.props.context||{},wo.canUseDOM)}render(){return Fn?h.createElement(h.Fragment,null,this.props.children):h.createElement(hc.Provider,{value:this.helmetData.value},this.props.children)}},Ze(wo,"canUseDOM",Tn),wo),qo=(e,o)=>{const t=document.head||document.querySelector("head"),n=t.querySelectorAll(`${e}[${_e}]`),a=[].slice.call(n),l=[];let c;return o&&o.length&&o.forEach(s=>{const d=document.createElement(e);for(const g in s)if(Object.prototype.hasOwnProperty.call(s,g))if(g==="innerHTML")d.innerHTML=s.innerHTML;else if(g==="cssText"){const m=s.cssText;d.appendChild(document.createTextNode(m))}else{const m=g,f=typeof s[m]>"u"?"":s[m];d.setAttribute(g,f)}d.setAttribute(_e,"true"),a.some((g,m)=>(c=m,d.isEqualNode(g)))?a.splice(c,1):l.push(d)}),a.forEach(s=>{var d;return(d=s.parentNode)==null?void 0:d.removeChild(s)}),l.forEach(s=>t.appendChild(s)),{oldTags:a,newTags:l}},zn=(e,o)=>{const t=document.getElementsByTagName(e)[0];if(!t)return;const n=t.getAttribute(_e),a=n?n.split(","):[],l=[...a],c=Object.keys(o);for(const s of c){const d=o[s]||"";t.getAttribute(s)!==d&&t.setAttribute(s,d),a.indexOf(s)===-1&&a.push(s);const g=l.indexOf(s);g!==-1&&l.splice(g,1)}for(let s=l.length-1;s>=0;s-=1)t.removeAttribute(l[s]);a.length===l.length?t.removeAttribute(_e):t.getAttribute(_e)!==c.join(",")&&t.setAttribute(_e,c.join(","))},Qy=(e,o)=>{typeof e<"u"&&document.title!==e&&(document.title=cc(e)),zn("title",o)},fc=(e,o)=>{const{baseTag:t,bodyAttributes:n,htmlAttributes:a,linkTags:l,metaTags:c,noscriptTags:s,onChangeClientState:d,scriptTags:g,styleTags:m,title:f,titleAttributes:p}=e;zn("body",n),zn("html",a),Qy(f,p);const u={baseTag:qo("base",t),linkTags:qo("link",l),metaTags:qo("meta",c),noscriptTags:qo("noscript",s),scriptTags:qo("script",g),styleTags:qo("style",m)},y={},k={};Object.keys(u).forEach(x=>{const{newTags:C,oldTags:S}=u[x];C.length&&(y[x]=C),S.length&&(k[x]=u[x].oldTags)}),o&&o(),d(e,y,k)},mr=null,Zy=e=>{mr&&cancelAnimationFrame(mr),e.defer?mr=requestAnimationFrame(()=>{fc(e,()=>{mr=null})}):(fc(e),mr=null)},Ry=Zy,mc=class extends h.Component{constructor(){super(...arguments);Ze(this,"rendered",!1)}shouldComponentUpdate(o){return!Vy(o,this.props)}componentDidUpdate(){this.emitChange()}componentWillUnmount(){const{helmetInstances:o}=this.props.context;o.remove(this),this.emitChange()}emitChange(){const{helmetInstances:o,setHelmet:t}=this.props.context;let n=null;const a=_y(o.get().map(l=>{const{context:c,...s}=l.props;return s}));Jy.canUseDOM?Ry(a):vn&&(n=vn(a)),t(n)}init(){if(this.rendered)return;this.rendered=!0;const{helmetInstances:o}=this.props.context;o.add(this),this.emitChange()}render(){return this.init(),null}},at=[],pc=e=>{const o={};for(const t of Object.keys(e))o[ic[t]||t]=e[t];return o},Co=e=>{const o={};for(const t of Object.keys(e)){const n=rt[t];o[n||t]=e[t]}return o},uc=(e,o)=>{if(!Tn)return;const t=document.getElementsByTagName(e)[0];if(!t)return;const n="data-rh-managed",a=t.getAttribute(n),l=a?a.split(","):[],c=Object.keys(o);for(const s of l)c.includes(s)||t.removeAttribute(s);for(const s of c){const d=o[s];d==null||d===!1?t.removeAttribute(s):d===!0?t.setAttribute(s,""):t.setAttribute(s,String(d))}c.length>0?t.setAttribute(n,c.join(",")):t.removeAttribute(n)},Mn=()=>{const e={},o={};for(const t of at){const{htmlAttributes:n,bodyAttributes:a}=t.props;n&&Object.assign(e,pc(n)),a&&Object.assign(o,pc(a))}uc("html",e),uc("body",o)},eb=class extends h.Component{componentDidMount(){at.push(this),Mn()}componentDidUpdate(){Mn()}componentWillUnmount(){const e=at.indexOf(this);e!==-1&&at.splice(e,1),Mn()}resolveTitle(){const{title:e,titleTemplate:o,defaultTitle:t}=this.props;return e&&o?o.replace(/%s/g,()=>Array.isArray(e)?e.join(""):e):e||t||void 0}renderTitle(){const e=this.resolveTitle();if(e===void 0)return null;const o=this.props.titleAttributes||{};return h.createElement("title",Co(o),e)}renderBase(){const{base:e}=this.props;return e?h.createElement("base",Co(e)):null}renderMeta(){const{meta:e}=this.props;return!e||!Array.isArray(e)?null:e.map((o,t)=>h.createElement("meta",{key:t,...Co(o)}))}renderLink(){const{link:e}=this.props;return!e||!Array.isArray(e)?null:e.map((o,t)=>h.createElement("link",{key:t,...Co(o)}))}renderScript(){const{script:e}=this.props;return!e||!Array.isArray(e)?null:e.map((o,t)=>{const{innerHTML:n,...a}=o,l=Co(a);return n&&(l.dangerouslySetInnerHTML={__html:n}),h.createElement("script",{key:t,...l})})}renderStyle(){const{style:e}=this.props;return!e||!Array.isArray(e)?null:e.map((o,t)=>{const{cssText:n,...a}=o,l=Co(a);return n&&(l.dangerouslySetInnerHTML={__html:n}),h.createElement("style",{key:t,...l})})}renderNoscript(){const{noscript:e}=this.props;return!e||!Array.isArray(e)?null:e.map((o,t)=>{const{innerHTML:n,...a}=o,l=Co(a);return n&&(l.dangerouslySetInnerHTML={__html:n}),h.createElement("noscript",{key:t,...l})})}render(){return h.createElement(h.Fragment,null,this.renderTitle(),this.renderBase(),this.renderMeta(),this.renderLink(),this.renderScript(),this.renderStyle(),this.renderNoscript())}},ob=(Pn=class extends h.Component{shouldComponentUpdate(e){return!Wy(sc(this.props,"helmetData"),sc(e,"helmetData"))}mapNestedChildrenToProps(e,o){if(!o)return null;switch(e.type){case"script":case"noscript":return{innerHTML:o};case"style":return{cssText:o};default:throw new Error(`<${e.type} /> elements are self-closing and can not contain children. Refer to our API for more information.`)}}flattenArrayTypeChildren(e,o,t,n){return{...o,[e.type]:[...o[e.type]||[],{...t,...this.mapNestedChildrenToProps(e,n)}]}}mapObjectTypeChildren(e,o,t,n){switch(e.type){case"title":return{...o,[e.type]:n,titleAttributes:{...t}};case"body":return{...o,bodyAttributes:{...t}};case"html":return{...o,htmlAttributes:{...t}};default:return{...o,[e.type]:{...t}}}}mapArrayTypeChildrenToProps(e,o){let t={...o};return Object.keys(e).forEach(n=>{t={...t,[n]:e[n]}}),t}warnOnInvalidChildren(e,o){return nc(lc.some(t=>e.type===t),typeof e.type=="function"?"You may be attempting to nest <Helmet> components within each other, which is not allowed. Refer to our API for more information.":`Only elements types ${lc.join(", ")} are allowed. Helmet does not support rendering <${e.type}> elements. Refer to our API for more information.`),nc(!o||typeof o=="string"||Array.isArray(o)&&!o.some(t=>typeof t!="string"),`Helmet expects a string as a child of <${e.type}>. Did you forget to wrap your children in braces? ( <${e.type}>{\`\`}</${e.type}> ) Refer to our API for more information.`),!0}mapChildrenToProps(e,o){let t={};return h.Children.forEach(e,n=>{if(!n||!n.props)return;const{children:a,...l}=n.props,c=Object.keys(l).reduce((d,g)=>(d[ic[g]||g]=l[g],d),{});let{type:s}=n;switch(typeof s=="symbol"?s=s.toString():this.warnOnInvalidChildren(n,a),s){case"Symbol(react.fragment)":o=this.mapChildrenToProps(a,o);break;case"link":case"meta":case"noscript":case"script":case"style":t=this.flattenArrayTypeChildren(n,t,c,a);break;default:o=this.mapObjectTypeChildren(n,o,c,a);break}}),this.mapArrayTypeChildrenToProps(t,o)}render(){const{children:e,...o}=this.props;let t={...o},{helmetData:n}=o;if(e&&(t=this.mapChildrenToProps(e,t)),n&&!(n instanceof In)){const a=n;n=new In(a.context,!0),delete t.helmetData}return Fn?h.createElement(eb,{...t}):n?h.createElement(mc,{...t,context:n.value}):h.createElement(hc.Consumer,null,a=>h.createElement(mc,{...t,context:a}))}},Ze(Pn,"defaultProps",{defer:!0,encodeSpecialCharacters:!0,prioritizeSeoTags:!1}),Pn);const rb={airbnb:{highlightStyle:"background",fontWeight:700,letterSpacing:"-0.02em"},apple:{highlightStyle:"solid",fontWeight:600,letterSpacing:"-0.03em"},coinbase:{highlightStyle:"solid",fontWeight:600,letterSpacing:"-0.02em"},figma:{highlightStyle:"underline",fontWeight:600,letterSpacing:"-0.01em",highlightFontWeight:700},linear:{highlightStyle:"gradient",fontWeight:600,letterSpacing:"-0.03em"},nike:{highlightStyle:"underline",fontWeight:800,letterSpacing:"0.02em",textTransform:"uppercase",highlightFontStyle:"italic",highlightFontWeight:900},notion:{highlightStyle:"underline",fontWeight:600,letterSpacing:"-0.01em",highlightFontStyle:"italic"},revolut:{highlightStyle:"gradient",fontWeight:700,letterSpacing:"-0.03em"},shopify:{highlightStyle:"background",fontWeight:700,letterSpacing:"-0.02em"},spacex:{highlightStyle:"glow",fontWeight:700,letterSpacing:"0.04em",textTransform:"uppercase",highlightLetterSpacing:"0.06em"},spotify:{highlightStyle:"background",fontWeight:800,letterSpacing:"-0.03em"},stripe:{highlightStyle:"gradient",fontWeight:700,letterSpacing:"-0.03em"},tesla:{highlightStyle:"solid",fontWeight:500,letterSpacing:"-0.01em",textTransform:"uppercase"},uber:{highlightStyle:"underline",fontWeight:700,letterSpacing:"-0.02em"},vercel:{highlightStyle:"outline",fontWeight:700,letterSpacing:"-0.04em"}},tb={highlightStyle:"background",fontWeight:700,letterSpacing:"-0.02em"},nb=e=>rb[e.metadata.id]??tb,yc=(e,o)=>{const t=e.theme;return{canvas:Te(t.canvas),surface:Te(t.surface),text:Te(t.text),muted:Te(t.muted),border:Te(t.border),primary:Te(t.primary),secondary:Te(t.secondary),success:Te(t.success),warning:Te(t.warning),error:Te(t.error),onPrimary:Te(t.onPrimary),appearance:o}},ab=e=>yc(e,"light"),lb=e=>yc(e,"dark"),me=({palette:e,label:o,config:t,children:n})=>r.jsxs(i.Vertical,{gap:10,flex:"1 1 320px",minWidth:0,children:[r.jsxs(i.Horizontal,{gap:8,alignItems:"center",children:[r.jsx(i.View,{width:10,height:10,borderRadius:9999,backgroundColor:e.appearance==="dark"?"#111111":"#ffffff",borderWidth:1,borderStyle:"solid",borderColor:"rgba(0,0,0,0.15)"}),r.jsx(i.Text,{fontSize:11,fontWeight:"700",letterSpacing:"0.08em",textTransform:"uppercase",children:o})]}),r.jsx(ht,{config:t,mode:e.appearance,children:r.jsx(i.View,{padding:20,borderRadius:16,borderWidth:1,borderStyle:"solid",backgroundColor:"color-white",borderColor:"color-gray-200",color:"color-black",children:n})})]}),Te=e=>!e||typeof e!="string"?e:/^(color|theme|light|dark)-/.test(e)?`var(--${e})`:e,Ke=(e,o)=>`color-mix(in srgb, ${Te(e)} ${o}%, transparent)`,ib=e=>e&&e.startsWith("var(--")?e.slice(6,-1):e,cb={cornerStyle:"soft",typeWeight:"bold",typeCase:"normal",typeStyle:"normal",letterSpacing:"-0.01em",accentTreatment:"flat",signatureMotif:"●",density:"comfortable",surfaceTone:"paper",cardRadius:12,pillRadius:9999,badgeRadius:6,voice:"neutral"},sb=e=>e.personality||cb,Xe=(e,o="normal")=>{let n={light:300,regular:400,bold:700,black:800}[e.typeWeight];return o==="light"&&(n=Math.max(300,n-200)),o==="heavy"&&(n=Math.min(900,n+100)),n},pr=e=>{switch(e.density){case"tight":return{padding:16,gap:10,large:20};case"spacious":return{padding:28,gap:18,large:36};case"comfortable":default:return{padding:22,gap:14,large:28}}},db=e=>e.typeCase==="uppercase"?"uppercase":"none",lt=(e,o)=>{switch(e.surfaceTone){case"glass":return{backgroundColor:o.appearance==="dark"?"rgba(255,255,255,0.04)":"rgba(255,255,255,0.65)",backdropFilter:"blur(14px)"};case"mono":return{backgroundColor:o.appearance==="dark"?"#0a0a0a":Te(o.surface)};case"matte":return{backgroundColor:o.appearance==="dark"?"#181818":"#f4f4f4"};case"paper":default:return{backgroundColor:Te(o.surface)}}},Uo=(e,o)=>{const t=Te(o.primary),n=Te(o.secondary||o.primary);switch(e.accentTreatment){case"gradient":return`linear-gradient(135deg, ${t} 0%, ${n} 100%)`;case"glow":return t;case"stripe":return`repeating-linear-gradient(45deg, ${t} 0 8px, ${n} 8px 16px)`;case"halftone":return`radial-gradient(circle at 30% 30%, ${t} 0%, ${n} 70%)`;case"flat":default:return t}},Go=(e,o)=>{if(e.accentTreatment==="glow")return`0 0 24px ${Ke(o.primary,40)}, 0 0 4px ${Te(o.primary)}`},io=e=>({letterSpacing:e.letterSpacing,textTransform:db(e),fontStyle:e.typeStyle,fontWeight:Xe(e,"heavy")}),Se=e=>({letterSpacing:e.typeCase==="uppercase"?"0.12em":"0.06em",textTransform:"uppercase",fontStyle:e.typeStyle,fontWeight:Xe(e,"normal")}),gb=(e,o)=>{var n,a,l;const t=(n=e.components)==null?void 0:n[o];return(l=(a=t==null?void 0:t.views)==null?void 0:a.container)==null?void 0:l.borderRadius},hb=e=>{const o=e.tokens.rawCssVars||{},t=e.theme.border,n=e.theme.surface,a=e.theme.primary,l=o["shadow-ring"]||"rgba(0,0,0,0.08) 0px 0px 0px 1px",c=o["shadow-ring-light"]||`${t} 0px 0px 0px 1px`,s=o["shadow-card"]||`rgba(0,0,0,0.08) 0px 0px 0px 1px, rgba(0,0,0,0.04) 0px 2px 2px 0px, ${n} 0px 0px 0px 1px`,d=o["shadow-card-full"]||`rgba(0,0,0,0.08) 0px 0px 0px 1px, rgba(0,0,0,0.04) 0px 2px 2px 0px, rgba(0,0,0,0.04) 0px 8px 8px -8px, ${n} 0px 0px 0px 1px`;return[{name:"Level 0",label:"Flat",description:"No shadow",shadow:"none"},{name:"Level 1",label:"Ring",description:"Shadow-as-border",shadow:l},{name:"Level 1b",label:"Light Ring",description:"Lighter ring",shadow:c},{name:"Level 2",label:"Card",description:"Ring + subtle lift",shadow:s},{name:"Level 3",label:"Full Card",description:"Ring + lift + ambient + glow",shadow:d},{name:"Focus",label:"Accessibility ring",description:"Focus state — 2px ring",shadow:`0 0 0 2px ${a}`}]},ur=(e,o)=>{const n={accordion:["accordion","card","alert"],tabs:["tabs","button"],panel:["card","alert"]}[o]??[o];for(const a of n){const l=gb(e,a);if(l!==void 0)return l}return"12px"},Wn=({glyph:e,badge:o})=>r.jsxs(i.View,{position:"relative",display:"inline-flex",children:[r.jsx(i.View,{width:32,height:32,borderRadius:"50%",display:"inline-flex",alignItems:"center",justifyContent:"center",style:{backgroundColor:"rgba(0,0,0,0.06)",fontSize:18,lineHeight:"20px"},children:e}),o?r.jsx(i.View,{position:"absolute",top:-10,right:-18,paddingHorizontal:6,paddingVertical:2,borderRadius:9999,style:{backgroundColor:"#ffffff",color:"#222222",fontSize:9,fontWeight:700,letterSpacing:"0.04em",boxShadow:"0 1px 3px rgba(0,0,0,0.18)"},children:o}):null]}),fb=[{title:"Homes",value:"homes",icon:r.jsx(Wn,{glyph:"🏠"}),content:r.jsx(i.Text,{fontSize:14,lineHeight:"20px",children:"Tokens, inputs, and feedback components share the active config."})},{title:"Experiences",value:"experiences",icon:r.jsx(Wn,{glyph:"🎈",badge:"NEW"}),content:r.jsx(i.Text,{fontSize:14,lineHeight:"20px",children:"Explicit props still override the config defaults."})},{title:"Services",value:"services",icon:r.jsx(Wn,{glyph:"🛎️",badge:"NEW"}),content:r.jsx(i.Text,{fontSize:14,lineHeight:"20px",children:"Each tab carries an icon. Active tab uses the theme primary underline."})}],mb=[{title:"Token",field:"token"},{title:"Value",field:"value"},{title:"Role",field:"role"}],pb=[{id:"overview",label:"Overview",href:"#"},{id:"components",label:"Components",href:"#"},{id:"tokens",label:"Tokens",href:"#"}],ub=({color:e,name:o,role:t,border:n})=>r.jsxs(i.View,{borderWidth:1,borderStyle:"solid",borderRadius:8,overflow:"hidden",minWidth:0,borderColor:n,children:[r.jsx(i.View,{height:76,backgroundColor:e}),r.jsxs(i.Vertical,{gap:4,padding:12,children:[r.jsx(i.Text,{fontSize:13,lineHeight:"18px",fontWeight:"700",children:o}),r.jsx(i.Text,{fontSize:12,lineHeight:"16px",opacity:.7,children:e}),r.jsx(i.Text,{fontSize:12,lineHeight:"16px",opacity:.72,children:t})]})]}),ue=({title:e,children:o,config:t})=>r.jsxs(i.Vertical,{gap:18,padding:24,borderWidth:1,borderStyle:"solid",borderRadius:12,backgroundColor:t.theme.canvas,borderColor:t.theme.border,children:[r.jsx(i.Text,{fontSize:18,lineHeight:"24px",fontWeight:"700",color:t.theme.text,children:e}),o]}),yb=({config:e})=>{const o=nb(e),t=o.highlightStyle==="background"?e.theme.onPrimary:e.theme.primary;return r.jsx(i.View,{width:"100%",borderRadius:20,overflow:"hidden",borderWidth:1,borderStyle:"solid",borderColor:e.theme.border,backgroundColor:e.theme.surface,children:r.jsxs(i.Horizontal,{width:"100%",flexWrap:"wrap",alignItems:"stretch",gap:0,children:[r.jsxs(i.Vertical,{flex:"1 1 360px",minWidth:0,padding:36,gap:20,justifyContent:"center",children:[r.jsx(Fe,{variant:"outline",content:`${e.metadata.label} hero`}),r.jsx(ci,{size:"xl",responsive:!0,highlightText:"design system",highlightStyle:o.highlightStyle,highlightColor:e.theme.primary,highlightSecondaryColor:o.highlightStyle==="gradient"?e.theme.secondary:e.theme.onPrimary,views:{container:{color:e.theme.text},text:{color:e.theme.text,fontFamily:e.tokens.typography.fontFamily,fontWeight:o.fontWeight,style:{letterSpacing:o.letterSpacing,fontStyle:o.fontStyle??"normal",textTransform:o.textTransform??"none"}},highlight:{color:t,fontWeight:o.highlightFontWeight??o.fontWeight,style:{fontStyle:o.highlightFontStyle??o.fontStyle??"normal",letterSpacing:o.highlightLetterSpacing??o.letterSpacing,textTransform:o.textTransform??"none"}}},children:"Build a beautiful design system in minutes"},`${e.metadata.id}-${o.highlightStyle}`),r.jsxs(i.Text,{color:e.theme.muted,fontFamily:e.tokens.typography.fontFamily,style:{fontSize:16,lineHeight:"24px",maxWidth:520},children:["Each brand defines its own highlight treatment —"," ",r.jsx(i.Text,{as:"span",color:e.theme.primary,fontWeight:"700",children:o.highlightStyle})," ","with weight"," ",r.jsx(i.Text,{as:"span",fontWeight:"700",children:o.fontWeight}),o.highlightFontStyle==="italic"||o.fontStyle==="italic"?", italic":"",o.textTransform==="uppercase"?", uppercase":"","."]}),r.jsxs(i.Horizontal,{gap:12,flexWrap:"wrap",children:[r.jsx(de,{color:"theme-primary",size:"md",children:"Get started"}),r.jsx(de,{variant:"outline",color:"theme-primary",size:"md",children:"View docs"})]})]}),r.jsxs(i.View,{flex:"1 1 320px",minWidth:0,minHeight:260,position:"relative",overflow:"hidden",style:{backgroundImage:`linear-gradient(135deg, ${e.theme.primary}, ${e.theme.secondary||e.theme.primary})`},children:[r.jsx(i.View,{position:"absolute",top:"50%",left:"50%",width:180,height:180,borderRadius:9999,style:{transform:"translate(-50%, -50%)",backgroundColor:"rgba(255,255,255,0.18)",filter:"blur(40px)"}}),r.jsxs(i.Vertical,{width:"100%",height:"100%",minHeight:260,padding:32,justifyContent:"flex-end",alignItems:"flex-start",gap:12,children:[r.jsx(i.Text,{fontWeight:"700",fontFamily:e.tokens.typography.fontFamily,style:{color:e.theme.onPrimary,fontSize:13,letterSpacing:"0.08em",textTransform:"uppercase"},children:e.metadata.label}),r.jsx(i.Text,{fontWeight:"700",fontFamily:e.tokens.typography.fontFamily,style:{color:e.theme.onPrimary,fontSize:28,lineHeight:"32px",letterSpacing:"-0.02em"},children:e.theme.primary})]})]})]})})},bb=({config:e})=>{var t,n;const o=e.tokens.colors.slice(0,5).map(a=>({token:a.name,value:a.value,role:a.role}));return r.jsxs(i.Vertical,{gap:24,children:[r.jsx(ue,{title:"Color",config:e,children:r.jsx(i.View,{display:"grid",gridTemplateColumns:"repeat(auto-fit, minmax(150px, 1fr))",gap:12,children:e.tokens.colors.slice(0,12).map(a=>r.jsx(ub,{color:a.value,name:a.name,role:a.role,text:e.theme.text,border:e.theme.border},a.name))})}),r.jsx(ue,{title:"Typography",config:e,children:r.jsxs(i.Vertical,{gap:24,children:[r.jsxs(i.Vertical,{gap:4,children:[r.jsx(i.Text,{fontFamily:e.tokens.typography.fontFamily,fontSize:48,lineHeight:"1.0",fontWeight:"700",letterSpacing:"0.96px",textTransform:"uppercase",children:"Making Life Multiplanetary"}),r.jsx(i.Text,{fontSize:10,color:e.theme.muted,children:"Display — 48px / Bold / 1.00 / Uppercase"})]}),r.jsxs(i.Vertical,{gap:4,children:[r.jsx(i.Text,{fontFamily:e.tokens.typography.fontFamily,fontSize:16,lineHeight:"1.7",fontWeight:"400",children:"SpaceX designs, manufactures and launches advanced rockets and spacecraft. The company was founded to revolutionize space technology."}),r.jsx(i.Text,{fontSize:10,color:e.theme.muted,children:"Body — 16px / 400 / 1.70"})]}),r.jsxs(i.Vertical,{gap:4,children:[r.jsx(i.Text,{fontFamily:e.tokens.typography.fontFamily,fontSize:13,lineHeight:"0.94",fontWeight:"700",letterSpacing:"1.17px",textTransform:"uppercase",children:"Falcon 9 · Starship · Dragon"}),r.jsx(i.Text,{fontSize:10,color:e.theme.muted,children:"Nav Bold — 13px / 700 / 0.94 / Uppercase"})]}),r.jsxs(i.Vertical,{gap:4,children:[r.jsx(i.Text,{fontFamily:e.tokens.typography.fontFamily,fontSize:12,lineHeight:"1.0",fontWeight:"400",letterSpacing:"1px",textTransform:"uppercase",children:"Mission Overview"}),r.jsx(i.Text,{fontSize:10,color:e.theme.muted,children:"Caption — 12px / 400 / 1.00 / Uppercase"})]}),r.jsxs(i.Vertical,{gap:4,children:[r.jsx(i.Text,{fontFamily:e.tokens.typography.fontFamily,fontSize:10,lineHeight:"0.94",fontWeight:"400",letterSpacing:"1px",textTransform:"uppercase",children:"Launch Date: 2026-04-15"}),r.jsx(i.Text,{fontSize:10,color:e.theme.muted,children:"Micro — 10px / 400 / 0.94 / Uppercase"})]}),r.jsx(i.Horizontal,{gap:10,flexWrap:"wrap",marginTop:12,children:e.tokens.typography.fontSizes.map(a=>r.jsx(Fe,{variant:"outline",content:a},a))})]})}),r.jsx(ue,{title:"Spacing, Radius, Shadow",config:e,children:r.jsxs(i.Vertical,{gap:18,children:[r.jsx(i.Horizontal,{gap:12,flexWrap:"wrap",alignItems:"flex-end",children:e.tokens.spacing.slice(0,10).map(a=>r.jsxs(i.Vertical,{gap:8,alignItems:"center",children:[r.jsx(i.View,{width:a,minWidth:4,height:24,borderRadius:2,backgroundColor:e.theme.primary}),r.jsx(i.Text,{fontSize:11,color:e.theme.muted,children:a})]},a))}),r.jsx(i.Horizontal,{gap:12,flexWrap:"wrap",children:e.tokens.radii.slice(0,6).map(a=>r.jsxs(i.Vertical,{gap:8,alignItems:"center",children:[r.jsx(i.View,{width:64,height:64,borderRadius:a,borderWidth:1,borderStyle:"solid",backgroundColor:e.theme.surface,borderColor:e.theme.border}),r.jsx(i.Text,{fontSize:11,color:e.theme.muted,children:a})]},a))}),r.jsx(i.View,{width:"100%",maxWidth:"100%",overflowX:"auto",style:{WebkitOverflowScrolling:"touch",color:e.theme.text},children:r.jsx(Ve,{views:(n=(t=e.components)==null?void 0:t.table)==null?void 0:n.views,children:r.jsx(Ve.Template,{caption:"First extracted color tokens",columns:mb,data:o})})})]})})]})},bc=({palette:e})=>r.jsxs(we,{width:"min(100%, 420px)",views:{container:{backgroundColor:e.surface,color:e.text,borderWidth:1,borderStyle:"solid",borderColor:e.border},header:{color:e.text,borderColor:e.border},content:{color:e.text},footer:{borderColor:e.border}},children:[r.jsx(we.Header,{children:r.jsxs(i.Horizontal,{alignItems:"center",justifyContent:"space-between",gap:12,flexWrap:"wrap",children:[r.jsxs(i.Horizontal,{alignItems:"baseline",gap:6,children:[r.jsx(i.Text,{fontSize:24,fontWeight:"800",color:e.text,children:"$182"}),r.jsx(i.Text,{fontSize:14,color:e.muted,children:"night"})]}),r.jsx(Fe,{variant:"filled",content:"Best value"})]})}),r.jsx(we.Content,{children:r.jsxs(i.Vertical,{gap:12,children:[r.jsxs(i.Horizontal,{gap:0,borderRadius:10,borderWidth:1,borderStyle:"solid",borderColor:e.border,overflow:"hidden",children:[r.jsxs(i.Vertical,{flex:1,padding:10,gap:2,borderRightWidth:1,borderRightStyle:"solid",borderColor:e.border,children:[r.jsx(i.Text,{fontSize:10,fontWeight:"700",letterSpacing:"0.06em",color:e.text,children:"CHECK-IN"}),r.jsx(i.Text,{fontSize:14,color:e.text,children:"Mar 12, 2026"})]}),r.jsxs(i.Vertical,{flex:1,padding:10,gap:2,children:[r.jsx(i.Text,{fontSize:10,fontWeight:"700",letterSpacing:"0.06em",color:e.text,children:"CHECKOUT"}),r.jsx(i.Text,{fontSize:14,color:e.text,children:"Mar 18, 2026"})]})]}),r.jsxs(i.Vertical,{padding:10,gap:2,borderRadius:10,borderWidth:1,borderStyle:"solid",borderColor:e.border,children:[r.jsx(i.Text,{fontSize:10,fontWeight:"700",letterSpacing:"0.06em",color:e.text,children:"GUESTS"}),r.jsx(i.Text,{fontSize:14,color:e.text,children:"2 adults"})]}),r.jsx(de,{isFilled:!0,size:"lg",children:"Reserve"}),r.jsx(Xr,{}),r.jsxs(i.Vertical,{gap:6,children:[r.jsxs(i.Horizontal,{justifyContent:"space-between",children:[r.jsx(i.Text,{fontSize:14,color:e.text,children:"$182 × 6 nights"}),r.jsx(i.Text,{fontSize:14,color:e.text,children:"$1,092"})]}),r.jsxs(i.Horizontal,{justifyContent:"space-between",children:[r.jsx(i.Text,{fontSize:14,color:e.text,children:"Cleaning fee"}),r.jsx(i.Text,{fontSize:14,color:e.text,children:"$48"})]}),r.jsxs(i.Horizontal,{justifyContent:"space-between",children:[r.jsx(i.Text,{fontSize:14,color:e.text,children:"Service fee"}),r.jsx(i.Text,{fontSize:14,color:e.text,children:"$165"})]})]}),r.jsx(Xr,{}),r.jsxs(i.Horizontal,{justifyContent:"space-between",children:[r.jsx(i.Text,{fontSize:15,fontWeight:"700",color:e.text,children:"Total before taxes"}),r.jsx(i.Text,{fontSize:15,fontWeight:"700",color:e.text,children:"$1,305"})]})]})})]}),xc=[{name:"Starter",tagline:"For solo makers shipping their first project.",price:"$0",period:"/ month",features:["1 workspace","Up to 3 projects","Community support"],ctaLabel:"Get started"},{name:"Pro",tagline:"For growing teams that need more room to build.",price:"$24",period:"/ month",features:["Unlimited projects","Advanced analytics","Priority email support","Custom domains"],ctaLabel:"Start free trial",featured:!0},{name:"Enterprise",tagline:"For organizations with security and scale needs.",price:"Custom",period:"",features:["SSO & SCIM","Audit logs","Dedicated success manager","99.99% uptime SLA"],ctaLabel:"Contact sales"}],kc=({palette:e,tier:o,personality:t})=>{const n=pr(t),a=lt(t,e),l=Uo(t,e),c=Go(t,e);return r.jsx(i.View,{width:"min(100%, 280px)",borderRadius:t.cardRadius,overflow:"hidden",borderWidth:o.featured?0:1,borderStyle:"solid",style:{...o.featured?{background:l,boxShadow:c}:a,borderColor:e.border,color:o.featured?e.onPrimary:e.text},children:r.jsxs(i.Vertical,{gap:n.gap,padding:n.padding,children:[r.jsxs(i.Vertical,{gap:6,children:[r.jsxs(i.Horizontal,{alignItems:"center",justifyContent:"space-between",children:[r.jsx(i.Text,{fontSize:13,color:o.featured?e.onPrimary:e.text,style:Se(t),children:o.name}),o.featured?r.jsx(i.View,{paddingHorizontal:10,paddingVertical:4,borderRadius:t.badgeRadius,backgroundColor:Ke(e.onPrimary,22),children:r.jsxs(i.Horizontal,{gap:4,alignItems:"center",children:[r.jsx(i.Text,{fontSize:11,color:e.onPrimary,style:{lineHeight:1},children:t.signatureMotif}),r.jsx(i.Text,{fontSize:10,color:e.onPrimary,style:Se(t),children:t.voice.includes("mission")?"PRIORITY":"POPULAR"})]})}):null]}),r.jsx(i.Text,{fontSize:13,lineHeight:"18px",color:o.featured?Ke(e.onPrimary,85):e.muted,style:{fontStyle:t.typeStyle},children:o.tagline})]}),r.jsxs(i.Horizontal,{alignItems:"baseline",gap:4,children:[r.jsx(i.Text,{fontSize:n.large+8,color:o.featured?e.onPrimary:e.text,style:io(t),children:o.price}),o.period?r.jsx(i.Text,{fontSize:14,color:o.featured?Ke(e.onPrimary,85):e.muted,style:{fontStyle:t.typeStyle},children:o.period}):null]}),r.jsx(i.Vertical,{gap:8,children:o.features.map(s=>r.jsxs(i.Horizontal,{gap:8,alignItems:"center",children:[r.jsx(i.View,{width:18,height:18,borderRadius:t.cornerStyle==="sharp"?2:9999,backgroundColor:o.featured?Ke(e.onPrimary,22):e.primary,alignItems:"center",justifyContent:"center",style:{display:"flex",flexShrink:0},children:r.jsx(i.Text,{fontSize:11,color:e.onPrimary,style:{lineHeight:1,fontWeight:Xe(t,"heavy")},children:t.cornerStyle==="sharp"?"+":"✓"})}),r.jsx(i.Text,{fontSize:13,color:o.featured?e.onPrimary:e.text,style:{textTransform:t.typeCase==="uppercase"?"uppercase":"none",letterSpacing:t.typeCase==="uppercase"?"0.04em":"normal",fontStyle:t.typeStyle},children:s})]},s))}),r.jsx(i.View,{alignSelf:"stretch",paddingHorizontal:20,paddingVertical:12,borderRadius:t.pillRadius,alignItems:"center",justifyContent:"center",style:{display:"flex",cursor:"pointer",backgroundColor:o.featured?e.onPrimary:e.text},children:r.jsx(i.Text,{fontSize:14,color:o.featured?e.primary:e.canvas,style:{...Se(t),letterSpacing:t.typeCase==="uppercase"?"0.08em":"0.02em"},children:o.ctaLabel})})]})})},Cc=({palette:e,personality:o})=>{const t=pr(o),n=lt(o,e),a=o.voice.includes("athletic")||o.voice.includes("motion")?"Aero Runner GT":o.voice.includes("mission")||o.voice.includes("futurist")?"Module-04 Insulated Jacket":"Linen Throw Pillow",l=o.voice.includes("athletic")||o.voice.includes("motion")?"Court Black · Mens":o.voice.includes("mission")||o.voice.includes("futurist")?"Carbon · Standard fit":"Stonewashed · Sand";return r.jsx(i.View,{width:"min(100%, 320px)",borderRadius:o.cardRadius,overflow:"hidden",borderWidth:1,borderStyle:"solid",style:{...n,borderColor:e.border,color:e.text},children:r.jsxs(i.Vertical,{gap:t.gap,padding:t.padding,children:[r.jsx(i.View,{height:120,borderRadius:o.cardRadius,style:{background:o.accentTreatment==="gradient"?`linear-gradient(135deg, ${Ke(e.primary,20)} 0%, ${Ke(e.secondary||e.primary,20)} 100%)`:e.appearance==="dark"?"rgba(255,255,255,0.06)":"rgba(0,0,0,0.04)"}}),r.jsxs(i.Vertical,{gap:4,children:[r.jsxs(i.Horizontal,{alignItems:"center",justifyContent:"space-between",children:[r.jsx(i.Text,{fontSize:15,color:e.text,style:io(o),children:a}),r.jsx(i.View,{paddingHorizontal:10,paddingVertical:3,borderRadius:o.badgeRadius,style:{backgroundColor:e.appearance==="dark"?"rgba(255,255,255,0.08)":"rgba(0,0,0,0.06)"},children:r.jsx(i.Text,{fontSize:10,color:e.text,style:Se(o),children:"IN STOCK"})})]}),r.jsx(i.Text,{fontSize:12,color:e.muted,style:{fontStyle:o.typeStyle,textTransform:o.typeCase==="uppercase"?"uppercase":"none",letterSpacing:o.typeCase==="uppercase"?"0.04em":"normal"},children:l})]}),r.jsxs(i.Horizontal,{alignItems:"baseline",justifyContent:"space-between",children:[r.jsxs(i.Horizontal,{alignItems:"baseline",gap:6,children:[r.jsx(i.Text,{fontSize:24,color:e.text,style:io(o),children:"$42"}),r.jsx(i.Text,{fontSize:13,color:e.muted,style:{textDecoration:"line-through"},children:"$56"})]}),r.jsx(i.Text,{fontSize:12,color:e.success||e.muted,style:Se(o),children:"FREE SHIPPING"})]}),r.jsx(i.View,{alignSelf:"stretch",paddingHorizontal:20,paddingVertical:12,borderRadius:o.pillRadius,alignItems:"center",justifyContent:"center",style:{display:"flex",cursor:"pointer",background:Uo(o,e),boxShadow:Go(o,e)},children:r.jsx(i.Text,{fontSize:14,color:e.onPrimary,style:{...Se(o),letterSpacing:o.typeCase==="uppercase"?"0.08em":"0.02em"},children:"Add to cart"})})]})})},wc=({palette:e,personality:o})=>{const t=pr(o),n=lt(o,e),a=o.signatureMotif,l=o.voice.includes("athletic")?"★":o.voice.includes("mission")||o.voice.includes("futurist")?"◉":"♥",c=o.voice.includes("athletic")?"Velocity AirFlow 7":o.voice.includes("mission")||o.voice.includes("futurist")?"Sentinel Pro Headset":o.voice.includes("refined")?"Pulse Studio Monitor":"Aurora Wireless Headphones",s=o.voice.includes("athletic")?"Lightweight knit · 280g":o.voice.includes("mission")||o.voice.includes("futurist")?"Mil-spec audio · 60h endurance":"Active noise cancelling · 40h battery",d=o.voice.includes("mission")?"MISSION PICK":o.voice.includes("athletic")?"TEAM PICK":o.voice.includes("futurist")?"SIGNATURE":"BEST SELLER";return r.jsxs(i.View,{position:"relative",width:"min(100%, 320px)",children:[r.jsx(i.View,{position:"absolute",top:-10,left:16,paddingHorizontal:12,paddingVertical:6,borderRadius:o.badgeRadius,zIndex:2,style:{background:Uo(o,e),boxShadow:Go(o,e)||(e.appearance==="dark"?"0 6px 14px rgba(0,0,0,0.5)":"0 6px 14px rgba(0,0,0,0.12)")},children:r.jsxs(i.Horizontal,{gap:6,alignItems:"center",children:[r.jsx(i.Text,{fontSize:11,color:e.onPrimary,style:{lineHeight:1,fontWeight:Xe(o,"heavy")},children:a}),r.jsx(i.Text,{fontSize:10,color:e.onPrimary,style:Se(o),children:d})]})}),r.jsx(i.View,{position:"absolute",top:12,right:12,width:36,height:36,borderRadius:o.cornerStyle==="sharp"?4:9999,borderWidth:1,borderStyle:"solid",zIndex:2,alignItems:"center",justifyContent:"center",style:{display:"flex",cursor:"pointer",backgroundColor:e.appearance==="dark"?"rgba(0,0,0,0.45)":"rgba(255,255,255,0.92)",borderColor:e.border,backdropFilter:"blur(6px)"},children:r.jsx(i.Text,{fontSize:16,color:l==="♥"&&e.error||e.primary,style:{lineHeight:1},children:l})}),r.jsx(i.View,{width:"100%",borderRadius:o.cardRadius,overflow:"hidden",borderWidth:1,borderStyle:"solid",style:{...n,borderColor:e.border,color:e.text},children:r.jsxs(i.Vertical,{gap:t.gap,padding:t.padding,children:[r.jsx(i.View,{height:140,borderRadius:o.cardRadius,style:{background:o.accentTreatment==="gradient"?`linear-gradient(135deg, ${Ke(e.primary,20)} 0%, ${Ke(e.secondary||e.primary,20)} 100%)`:e.appearance==="dark"?"rgba(255,255,255,0.06)":"rgba(0,0,0,0.04)"}}),r.jsxs(i.Vertical,{gap:6,children:[r.jsxs(i.Horizontal,{gap:6,alignItems:"center",children:[r.jsx(i.Text,{fontSize:13,color:e.warning||e.primary,style:{lineHeight:1},children:"★★★★★"}),r.jsx(i.Text,{fontSize:12,color:e.muted,children:"4.9 · 1,284 reviews"})]}),r.jsx(i.Text,{fontSize:18,color:e.text,style:io(o),children:c}),r.jsx(i.Text,{fontSize:12,color:e.muted,style:{fontStyle:o.typeStyle,textTransform:o.typeCase==="uppercase"?"uppercase":"none",letterSpacing:o.typeCase==="uppercase"?"0.04em":"normal"},children:s})]}),r.jsxs(i.Horizontal,{alignItems:"baseline",justifyContent:"space-between",children:[r.jsxs(i.Horizontal,{alignItems:"baseline",gap:6,children:[r.jsx(i.Text,{fontSize:26,color:e.text,style:io(o),children:"$189"}),r.jsx(i.Text,{fontSize:13,color:e.muted,style:{textDecoration:"line-through"},children:"$249"})]}),r.jsx(i.View,{paddingHorizontal:8,paddingVertical:3,borderRadius:o.badgeRadius,style:{backgroundColor:e.appearance==="dark"?"rgba(255,255,255,0.08)":"rgba(0,0,0,0.06)"},children:r.jsx(i.Text,{fontSize:10,color:e.text,style:Se(o),children:"–24%"})})]}),r.jsxs(i.Horizontal,{gap:8,children:[r.jsx(i.View,{flex:1,paddingHorizontal:16,paddingVertical:12,borderRadius:o.pillRadius,alignItems:"center",justifyContent:"center",style:{display:"flex",cursor:"pointer",background:Uo(o,e),boxShadow:Go(o,e)},children:r.jsx(i.Text,{fontSize:13,color:e.onPrimary,style:{...Se(o),letterSpacing:o.typeCase==="uppercase"?"0.08em":"0.02em"},children:"Buy now"})}),r.jsx(i.View,{paddingHorizontal:16,paddingVertical:12,borderRadius:o.pillRadius,borderWidth:1,borderStyle:"solid",alignItems:"center",justifyContent:"center",style:{display:"flex",cursor:"pointer",borderColor:e.border},children:r.jsx(i.Text,{fontSize:13,color:e.text,style:{...Se(o),letterSpacing:o.typeCase==="uppercase"?"0.08em":"0.02em"},children:"Add to cart"})})]})]})})]})},xb=[{slug:"PRIMARY-TINT",source:"primary",intensity:"tint",heading:"Bring everyone together with systems that scale",body:"Signature primary ground for systems, FAQ, and the contact form.",cta:"Get started"},{slug:"SECONDARY-TINT",source:"secondary",intensity:"tint",heading:"A faster, more efficient way of working",body:"Secondary ground for hero moments and supporting narrative.",cta:"Explore"},{slug:"WARNING-TINT",source:"warning",intensity:"tint",heading:"Designed for the way ideas actually move",body:"Warm tint for product storytelling and brand moments.",cta:"See the story"},{slug:"SUCCESS-TINT",source:"success",intensity:"tint",heading:"Ship with confidence, every single release",body:"Cool tint for changelogs, releases, and reliability notes.",cta:"Read changelog"},{slug:"ERROR-TINT",source:"error",intensity:"tint",heading:"Built for teams who care about the details",body:"Saturated tint for community stories and testimonials.",cta:"Meet the makers"},{slug:"INK-INVERTED",source:"ink",intensity:"inverted",heading:"Go deeper. Go further. Go all-in.",body:"Inverted ground for premium tiers and developer surfaces.",cta:"Open the docs"}],Hn=(e,o)=>{const t=e.replace("#","").padEnd(6,"0").slice(0,6),n=parseInt(t.slice(0,2),16),a=parseInt(t.slice(2,4),16),l=parseInt(t.slice(4,6),16);return[n,a,l].some(Number.isNaN)?e:`rgba(${n}, ${a}, ${l}, ${o})`},jn=e=>typeof e=="string"&&/^#([0-9a-f]{3}){1,2}$/i.test(e),Pe=(e,o,t)=>jn(e)?Hn(e,o):e.startsWith("rgba")||e.startsWith("rgb")?e.replace(/rgba?\(([^)]+)\)/,(n,a)=>`rgba(${a.split(",").slice(0,3).map(c=>c.trim()).join(", ")}, ${o})`):t==="dark"?`rgba(255,255,255,${o})`:`rgba(0,0,0,${o})`,kb=({block:e,palette:o,personality:t})=>{const n=pr(t);let a,l;if(e.source==="ink")a=o.text,l=o.canvas;else{const m=o[e.source]||o.primary;e.intensity==="solid"?(a=m,l=o.onPrimary):(a=Pe(m,.32,o.appearance),l=(o.appearance==="dark",o.text))}if(t.accentTreatment==="gradient"&&e.intensity==="tint"){const m=o[e.source],f=o.secondary;jn(m)&&jn(f)&&(a=`linear-gradient(135deg, ${Hn(m,.32)} 0%, ${Hn(f,.32)} 100%)`)}if(t.accentTreatment==="stripe"&&e.intensity==="tint"){const m=Pe(o[e.source],.32,o.appearance),f=Pe(o.secondary,.18,o.appearance);a=`repeating-linear-gradient(135deg, ${m} 0 18px, ${f} 18px 36px)`}const c=Pe(l,.72,o.appearance),s=Pe(l,.55,o.appearance),d=l,g=l===o.canvas?o.text:o.canvas;return r.jsx(i.View,{width:"min(100%, 460px)",borderRadius:t.cardRadius*2,padding:n.large,style:{background:a},children:r.jsxs(i.Vertical,{gap:n.gap+6,children:[r.jsxs(i.Text,{fontSize:11,color:s,style:{...Se(t),letterSpacing:"0.12em",fontFamily:"ui-monospace, SFMono-Regular, Menlo, monospace"},children:[t.signatureMotif," ",e.slug]}),r.jsxs(i.Vertical,{gap:14,children:[r.jsx(i.Text,{fontSize:32,lineHeight:"36px",color:l,style:io(t),children:e.heading}),r.jsx(i.Text,{fontSize:16,lineHeight:"22px",color:c,style:{fontStyle:t.typeStyle},children:e.body})]}),r.jsx(i.View,{alignSelf:"flex-start",paddingHorizontal:28,paddingVertical:14,borderRadius:t.pillRadius,style:{backgroundColor:d,cursor:"pointer"},children:r.jsx(i.Text,{fontSize:15,color:g,style:{...Se(t),letterSpacing:t.typeCase==="uppercase"?"0.08em":"0.01em",textTransform:t.typeCase==="uppercase"?"uppercase":"none"},children:e.cta})})]})})},Sc=[{id:"design-tokens",badge:"NEW",badgeTone:"success",favorite:"♥",category:"Design systems",title:"Design tokens that survive a redesign",excerpt:"Why semantic naming beats raw values — and how to migrate a token set without breaking every consumer.",author:"Léa Martin",meta:"6 min read · Mar 10",imageTone:"warm"},{id:"shipping-faster",badge:"FEATURED",badgeTone:"primary",favorite:"★",category:"Engineering",title:"Shipping faster without skipping review",excerpt:"Three async patterns we use to keep PR cycle time under 24h while still catching the regressions that matter.",author:"Jordan Reyes",meta:"9 min read · Mar 04",imageTone:"cool"},{id:"a11y-audit",badge:"TRENDING",badgeTone:"warning",favorite:"⛉",category:"Accessibility",title:"The accessibility audit nobody asked for",excerpt:"A walkthrough of the 12 issues we found on our own marketing site — and the four-week fix plan that followed.",author:"Ines Okafor",meta:"12 min read · Feb 27",imageTone:"mono"}],vc=({palette:e,article:o,personality:t})=>{const n=pr(t),a=lt(t,e),l=e[o.badgeTone]||e.primary,c=e.secondary||e.primary,s=t.accentTreatment==="gradient"?`linear-gradient(135deg, ${Pe(l,.55,e.appearance)} 0%, ${Pe(c,.55,e.appearance)} 100%)`:t.accentTreatment==="stripe"?`repeating-linear-gradient(45deg, ${Pe(l,.45,e.appearance)} 0 16px, ${Pe(c,.25,e.appearance)} 16px 32px)`:t.accentTreatment==="halftone"?`radial-gradient(circle at 30% 30%, ${Pe(l,.55,e.appearance)} 0%, ${Pe(c,.35,e.appearance)} 70%)`:t.accentTreatment==="glow"?`radial-gradient(circle at 50% 60%, ${Pe(l,.45,e.appearance)} 0%, ${e.appearance==="dark"?"#050505":"#0a0a0a"} 100%)`:Pe(l,.32,e.appearance),d=t.voice.includes("mission")||t.voice.includes("futurist")?"◉":o.favorite,g=d==="♥"?e.error||e.primary:d==="★"&&e.warning||e.primary;return r.jsx(i.View,{width:"min(100%, 320px)",borderRadius:t.cardRadius,overflow:"hidden",borderWidth:1,borderStyle:"solid",style:{...a,borderColor:e.border,color:e.text},children:r.jsxs(i.Vertical,{gap:n.gap,padding:n.padding,children:[r.jsxs(i.View,{position:"relative",height:160,borderRadius:t.cardRadius,overflow:"hidden",style:{background:s},children:[r.jsx(i.View,{position:"absolute",top:12,left:12,paddingHorizontal:10,paddingVertical:4,borderRadius:t.badgeRadius,style:{background:Uo(t,{...e,primary:l}),boxShadow:Go(t,e)},children:r.jsxs(i.Horizontal,{gap:4,alignItems:"center",children:[r.jsx(i.Text,{fontSize:10,color:e.onPrimary,style:{lineHeight:1,fontWeight:Xe(t,"heavy")},children:t.signatureMotif}),r.jsx(i.Text,{fontSize:10,color:e.onPrimary,style:Se(t),children:o.badge})]})}),r.jsx(i.View,{position:"absolute",top:10,right:10,width:36,height:36,borderRadius:t.cornerStyle==="sharp"?4:9999,borderWidth:1,borderStyle:"solid",alignItems:"center",justifyContent:"center",style:{display:"flex",cursor:"pointer",backgroundColor:e.appearance==="dark"?"rgba(0,0,0,0.45)":"rgba(255,255,255,0.92)",borderColor:e.border,backdropFilter:"blur(6px)"},children:r.jsx(i.Text,{fontSize:16,color:g,style:{lineHeight:1},children:d})})]}),r.jsxs(i.Vertical,{gap:8,children:[r.jsx(i.Text,{fontSize:11,color:e.muted,style:Se(t),children:o.category}),r.jsx(i.Text,{fontSize:18,lineHeight:"24px",color:e.text,style:io(t),children:o.title}),r.jsx(i.Text,{fontSize:13,lineHeight:"18px",color:e.muted,style:{fontStyle:t.typeStyle},children:o.excerpt})]}),r.jsxs(i.Horizontal,{gap:10,alignItems:"center",children:[r.jsx(i.View,{width:28,height:28,borderRadius:t.cornerStyle==="sharp"?4:9999,style:{backgroundColor:e.appearance==="dark"?"rgba(255,255,255,0.12)":"rgba(0,0,0,0.08)"}}),r.jsxs(i.Vertical,{gap:0,children:[r.jsx(i.Text,{fontSize:12,color:e.text,style:{fontWeight:Xe(t,"normal"),fontStyle:t.typeStyle},children:o.author}),r.jsx(i.Text,{fontSize:11,color:e.muted,children:o.meta})]})]})]})})},Tc=({palette:e,personality:o,config:t})=>{var f,p,u,y;const n=o.signatureMotif,a=e.primary,l=Uo(o,e),c=Go(o,e),s=((p=(f=t.tokens)==null?void 0:f.typography)==null?void 0:p.fontFamily)||((y=(u=t.tokens)==null?void 0:u.rawCssVars)==null?void 0:y.display)||"inherit",d=o.voice.includes("mission")?"MAKING LIFE MULTIPLANETARY":o.voice.includes("athletic")?"JUST DO IT":o.voice.includes("refined")?"A new standard in payments":o.voice.includes("speed")?"Built for the makers":o.voice.includes("rhythmic")?"Music for everyone":o.voice.includes("thoughtful")?"The connected workspace":o.voice.includes("warm")?"Belong anywhere":o.voice.includes("minimal")?"Think different":o.voice.includes("commerce")?"The platform commerce is built on":o.voice.includes("bold-fintech")?"Money for the next generation":o.voice.includes("trustworthy")?"The future of money":o.voice.includes("playful")?"Nothing great is made alone":o.voice.includes("motion")?"Get there":o.voice.includes("deploy")?"Develop. Preview. Ship.":o.voice.includes("futurist")?"Accelerating the world to sustainable energy":`${t.metadata.label}`,g=o.typeCase==="uppercase"?"EXPLORE":"Get started",m=o.typeCase==="uppercase"?"LEARN MORE":"Learn more";return r.jsxs(i.View,{width:"100%",borderRadius:o.cardRadius*2,padding:o.density==="spacious"?56:o.density==="tight"?28:40,style:{backgroundColor:e.canvas,color:e.text,fontFamily:s,position:"relative",overflow:"hidden"},children:[o.accentTreatment==="glow"&&r.jsx(i.View,{position:"absolute",top:-120,right:-80,width:360,height:360,borderRadius:9999,style:{background:`radial-gradient(circle, ${a}40 0%, transparent 70%)`,pointerEvents:"none"}}),o.accentTreatment==="halftone"&&r.jsx(i.View,{position:"absolute",top:0,right:0,width:300,height:300,style:{background:`radial-gradient(circle at 70% 30%, ${a}30 0%, transparent 60%)`,pointerEvents:"none"}}),r.jsxs(i.Vertical,{gap:24,style:{position:"relative"},children:[r.jsxs(i.Horizontal,{gap:10,alignItems:"center",children:[r.jsx(i.View,{width:32,height:32,borderRadius:o.cornerStyle==="pill"?9999:o.cornerStyle==="sharp"?0:8,alignItems:"center",justifyContent:"center",style:{display:"flex",background:l,boxShadow:c},children:r.jsx(i.Text,{fontSize:16,color:e.onPrimary,style:{lineHeight:1,fontWeight:Xe(o,"heavy")},children:n})}),r.jsx(i.Text,{fontSize:13,color:e.muted,style:{...Se(o),letterSpacing:o.typeCase==="uppercase"?"0.18em":"0.06em"},children:t.metadata.label})]}),r.jsx(i.Text,{fontSize:o.density==="spacious"?56:o.density==="tight"?40:48,lineHeight:o.density==="spacious"?"60px":o.density==="tight"?"44px":"52px",color:e.text,style:{...io(o),letterSpacing:o.typeCase==="uppercase"?"0.06em":o.letterSpacing,maxWidth:580,fontFamily:s},children:d}),r.jsxs(i.Horizontal,{gap:12,flexWrap:"wrap",alignItems:"center",children:[r.jsx(i.View,{paddingHorizontal:o.density==="spacious"?32:24,paddingVertical:o.density==="spacious"?16:14,borderRadius:o.pillRadius,style:{display:"flex",cursor:"pointer",background:l,boxShadow:c},children:r.jsx(i.Text,{fontSize:15,color:e.onPrimary,style:{...Se(o),letterSpacing:o.typeCase==="uppercase"?"0.14em":"0.02em",fontWeight:Xe(o,"heavy"),fontFamily:s},children:g})}),r.jsx(i.View,{paddingHorizontal:24,paddingVertical:14,borderRadius:o.pillRadius,borderWidth:1,borderStyle:"solid",style:{display:"flex",cursor:"pointer",borderColor:e.text},children:r.jsx(i.Text,{fontSize:15,color:e.text,style:{...Se(o),letterSpacing:o.typeCase==="uppercase"?"0.14em":"0.02em",fontWeight:Xe(o,"heavy"),fontFamily:s},children:m})})]}),r.jsx(i.Horizontal,{gap:20,flexWrap:"wrap",alignItems:"center",marginTop:8,children:[{label:"Primary",value:e.primary},{label:"Surface",value:e.surface},{label:"Text",value:e.text},{label:"Success",value:e.success}].map(k=>r.jsxs(i.Horizontal,{gap:8,alignItems:"center",children:[r.jsx(i.View,{width:20,height:20,borderRadius:o.cornerStyle==="sharp"?0:o.cornerStyle==="pill"?9999:4,borderWidth:1,borderStyle:"solid",style:{backgroundColor:k.value,borderColor:e.border}}),r.jsxs(i.Vertical,{gap:0,children:[r.jsx(i.Text,{fontSize:11,color:e.muted,style:Se(o),children:k.label}),r.jsx(i.Text,{fontSize:11,color:e.text,style:{fontFamily:"ui-monospace, SFMono-Regular, Menlo, monospace"},children:ib(k.value)})]})]},k.label))})]})]})},Ic=({palette:e,config:o})=>r.jsxs(i.Vertical,{gap:20,padding:36,alignItems:"center",borderRadius:16,style:{backgroundColor:e.surface},children:[r.jsx(Fe,{variant:"outline",content:"New release"}),r.jsxs(i.Vertical,{gap:8,alignItems:"center",children:[r.jsxs(i.Text,{fontSize:36,lineHeight:"40px",fontWeight:"800",textAlign:"center",color:e.text,children:[o.metadata.label," Pro"]}),r.jsx(i.Text,{fontSize:18,lineHeight:"24px",color:e.muted,textAlign:"center",children:"Pro. Beyond."})]}),r.jsxs(i.Horizontal,{gap:12,flexWrap:"wrap",justifyContent:"center",children:[r.jsx(de,{shape:"pill",size:"md",children:"Learn more"}),r.jsx(de,{shape:"pill",size:"md",variant:"outline",children:"Buy"})]}),r.jsx(i.View,{width:220,height:140,borderRadius:20,backgroundColor:e.appearance==="dark"?e.canvas:e.text,opacity:.85})]}),Fc=({palette:e,config:o})=>r.jsxs(we,{width:"min(100%, 320px)",views:{container:{backgroundColor:e.surface,color:e.text,borderWidth:1,borderStyle:"solid",borderColor:e.border},header:{color:e.text,borderColor:e.border},content:{color:e.text},footer:{borderColor:e.border}},children:[r.jsx(we.Header,{children:r.jsxs(i.Horizontal,{alignItems:"center",justifyContent:"space-between",gap:12,flexWrap:"wrap",children:[r.jsx(i.Text,{color:e.text,fontWeight:"700",children:o.metadata.id==="spacex"?"Falcon 9":"Product Card"}),r.jsx(Fe,{variant:"filled",content:"New"})]})}),r.jsx(we.Content,{children:r.jsx(i.Text,{fontSize:14,lineHeight:"20px",color:e.text,children:o.metadata.id==="spacex"?"The world's first orbital-class reusable rocket. Designed for reliable and safe transport of people and payloads.":"Card surfaces, borders, typography, and shadows come from the active JSON config."})}),r.jsx(we.Footer,{children:r.jsx(de,{size:"sm",children:o.metadata.id==="spacex"?"Explore":"Review"})})]}),zc=({palette:e})=>r.jsxs(i.Vertical,{gap:14,children:[r.jsxs(i.Horizontal,{gap:12,flexWrap:"wrap",alignItems:"center",children:[r.jsx(de,{color:"theme-primary",children:"Primary"}),r.jsx(de,{color:"theme-secondary",children:"Secondary"}),r.jsx(de,{color:"color-black",children:"Black"}),r.jsx(de,{color:"color-white",textColor:"color-black",children:"White"})]}),r.jsxs(i.Horizontal,{gap:12,flexWrap:"wrap",alignItems:"center",children:[r.jsx(de,{variant:"outline",color:"theme-primary",children:"Primary"}),r.jsx(de,{variant:"outline",color:"theme-secondary",children:"Secondary"}),r.jsx(de,{variant:"outline",color:"color-black",children:"Black"}),r.jsx(de,{variant:"outline",color:"color-white",children:"White"})]}),r.jsxs(i.Horizontal,{gap:12,flexWrap:"wrap",alignItems:"center",children:[r.jsx(de,{variant:"ghost",views:{container:{color:e.text}},children:"Ghost"}),r.jsx(de,{variant:"link",views:{container:{color:e.primary}},children:"Link"}),r.jsx(de,{isDisabled:!0,children:"Disabled"}),r.jsx(de,{isLoading:!0,children:"Loading"})]})]}),Mc=({palette:e,config:o})=>r.jsx(i.View,{style:{color:e.text},children:r.jsxs(i.Vertical,{gap:14,children:[r.jsxs(i.Horizontal,{gap:10,flexWrap:"wrap",alignItems:"center",children:[r.jsx(Fe,{content:"Badge"}),r.jsx(Fe,{variant:"outline",content:"Outline"}),r.jsx(Fe,{content:"Primary",views:{container:{backgroundColor:e.primary,color:e.onPrimary,borderColor:e.primary}}}),r.jsx(Fe,{content:"Success",views:{container:{backgroundColor:e.success,color:e.onPrimary,borderColor:e.success}}}),r.jsx(Fe,{content:"Warning",views:{container:{backgroundColor:e.warning,color:e.onPrimary,borderColor:e.warning}}}),r.jsx(Fe,{content:"Error",views:{container:{backgroundColor:e.error,color:e.onPrimary,borderColor:e.error}}})]}),r.jsxs(i.Horizontal,{gap:16,flexWrap:"wrap",alignItems:"center",children:[r.jsx(Jr,{status:"success",label:"Operational"}),r.jsx(Jr,{status:"warning",label:"Degraded"}),r.jsx(Jr,{status:"error",label:"Outage"}),r.jsx(eo,{size:"sm",loaderColor:o.theme.primary})]}),r.jsx(St,{title:"Heads up",description:"Brand styling cascades through every alert.",variant:"info",views:{container:{backgroundColor:e.surface,borderColor:e.border,color:e.text},title:{color:e.text},description:{color:e.muted}}}),r.jsx(Mi,{value:64,height:10,showLabel:!0,color:e.primary,backgroundColor:e.border,views:{container:{backgroundColor:e.border},bar:{backgroundColor:e.primary}}})]})}),Wc=({palette:e,config:o,mode:t})=>{const n={container:{backgroundColor:e.surface,borderColor:e.border,color:e.text},field:{color:e.text}};return r.jsx(i.View,{style:{color:e.text},children:r.jsxs(i.Vertical,{gap:16,children:[r.jsxs(i.View,{display:"grid",gridTemplateColumns:"repeat(auto-fit, minmax(220px, 1fr))",gap:16,alignItems:"start",children:[r.jsx(je,{size:"md",label:"Name",placeholder:"Ada Lovelace",views:n}),r.jsx(er,{id:`forms-${o.metadata.id}-${t}`,size:"md",label:"Plan",placeholder:"Select plan",options:[{label:"Starter",value:"starter"},{label:"Team",value:"team"},{label:"Enterprise",value:"enterprise"}],views:{container:n.container,field:{fontSize:14,lineHeight:"20px",color:e.text},text:{fontSize:14,lineHeight:"20px",color:e.text}}}),r.jsx($t,{label:"Notes",placeholder:"Add implementation notes",views:n})]}),r.jsxs(i.Horizontal,{gap:16,flexWrap:"wrap",alignItems:"center",children:[r.jsx(_t,{label:"Email updates",defaultIsSelected:!0}),r.jsx(Nt,{label:"Standard",value:"standard",defaultIsSelected:!0}),r.jsx(Dt,{label:"Enabled",isChecked:!0})]})]})})},Cb=({config:e})=>{const[o,t]=h.useState(1),n=ab(e),a=lb(e),l=sb(e);return r.jsxs(i.Vertical,{gap:24,children:[r.jsx(ue,{title:"Brand Snapshot (Light & Dark)",config:e,children:r.jsxs(i.Vertical,{gap:20,children:[r.jsx(me,{config:e,palette:n,label:"On light surface",children:r.jsx(Tc,{palette:n,personality:l,config:e})}),r.jsx(me,{config:e,palette:a,label:"On dark surface",children:r.jsx(Tc,{palette:a,personality:l,config:e})})]})}),r.jsx(ue,{title:"Buttons — Light & Dark",config:e,children:r.jsxs(i.Horizontal,{gap:20,flexWrap:"wrap",alignItems:"flex-start",children:[r.jsx(me,{config:e,palette:n,label:"On light surface",children:r.jsx(zc,{palette:n})}),r.jsx(me,{config:e,palette:a,label:"On dark surface",children:r.jsx(zc,{palette:a})})]})}),r.jsx(ue,{title:"Status & Feedback — Light & Dark",config:e,children:r.jsxs(i.Horizontal,{gap:20,flexWrap:"wrap",alignItems:"flex-start",children:[r.jsx(me,{config:e,palette:n,label:"On light surface",children:r.jsx(Mc,{palette:n,config:e})}),r.jsx(me,{config:e,palette:a,label:"On dark surface",children:r.jsx(Mc,{palette:a,config:e})})]})}),r.jsx(ue,{title:"Forms — Light & Dark",config:e,children:r.jsxs(i.Horizontal,{gap:20,flexWrap:"wrap",alignItems:"flex-start",children:[r.jsx(me,{config:e,palette:n,label:"On light surface",children:r.jsx(Wc,{palette:n,config:e,mode:"light"})}),r.jsx(me,{config:e,palette:a,label:"On dark surface",children:r.jsx(Wc,{palette:a,config:e,mode:"dark"})})]})}),r.jsx(ue,{title:"Forms (legacy preview)",config:e,children:r.jsxs(i.View,{display:"grid",gridTemplateColumns:"repeat(auto-fit, minmax(220px, 1fr))",alignItems:"start",gap:16,children:[r.jsx(je,{size:"md",label:"Name",placeholder:"Ada Lovelace"}),r.jsx(er,{id:`design-system-select-${e.metadata.id}`,size:"md",label:"Plan",placeholder:"Select plan",options:[{label:"Starter",value:"starter"},{label:"Team",value:"team"},{label:"Enterprise",value:"enterprise"}],views:{field:{fontSize:14,lineHeight:"20px"},text:{fontSize:14,lineHeight:"20px"}}}),r.jsx($t,{label:"Notes",placeholder:"Add implementation notes"}),r.jsxs(i.Vertical,{gap:12,children:[r.jsx(_t,{label:"Email updates",defaultIsSelected:!0}),r.jsx(Nt,{label:"Standard",value:"standard",defaultIsSelected:!0}),r.jsx(Dt,{label:"Enabled",isChecked:!0}),r.jsx(Bl,{defaultValue:58,showValue:!0}),r.jsx(ml,{length:6,label:"Verification Code"})]})]})}),r.jsx(ue,{title:"Form States",config:e,children:r.jsxs(i.View,{display:"grid",gridTemplateColumns:"repeat(auto-fit, minmax(220px, 1fr))",gap:16,alignItems:"start",children:[r.jsx(je,{size:"md",label:"Default",placeholder:"Type here",helperText:"Resting state"}),r.jsx(je,{size:"md",label:"Filled",defaultValue:"Ada Lovelace",helperText:"Has value"}),r.jsx(je,{size:"md",label:"With helper",placeholder:"user@example.com",helperText:"We'll never share your email"}),r.jsx(je,{size:"md",label:"Error",defaultValue:"invalid@",error:"Please enter a valid email"}),r.jsx(je,{size:"md",label:"Disabled",isDisabled:!0,defaultValue:"Cannot edit",helperText:"Field locked"}),r.jsx(je,{size:"md",label:"Read only",defaultValue:"Read-only value",isReadOnly:!0,helperText:"View only"}),r.jsx(er,{id:`design-system-select-error-${e.metadata.id}`,size:"md",label:"Select error",placeholder:"Pick one",error:!0,helperText:"Selection required",options:[{label:"Option A",value:"a"},{label:"Option B",value:"b"}],views:{field:{fontSize:14,lineHeight:"20px"},text:{fontSize:14,lineHeight:"20px"}}}),r.jsx(er,{id:`design-system-select-disabled-${e.metadata.id}`,size:"md",label:"Select disabled",placeholder:"Disabled",isDisabled:!0,options:[{label:"Option A",value:"a"},{label:"Option B",value:"b"}],views:{field:{fontSize:14,lineHeight:"20px"},text:{fontSize:14,lineHeight:"20px"}}})]})}),r.jsx(ue,{title:"Elevation & Depth",config:e,children:r.jsx(i.View,{display:"grid",gridTemplateColumns:"repeat(auto-fit, minmax(200px, 1fr))",gap:20,children:hb(e).map(c=>r.jsxs(i.Vertical,{gap:12,children:[r.jsx(i.View,{height:120,borderRadius:12,backgroundColor:e.theme.canvas,style:{boxShadow:c.shadow}}),r.jsxs(i.Vertical,{gap:4,children:[r.jsxs(i.Horizontal,{gap:8,alignItems:"baseline",flexWrap:"wrap",children:[r.jsx(i.Text,{fontSize:12,fontWeight:"700",children:c.name}),r.jsx(i.Text,{fontSize:11,fontWeight:"600",color:e.theme.primary,children:c.label})]}),r.jsx(i.Text,{fontSize:11,color:e.theme.muted,children:c.description}),r.jsx(i.Text,{fontSize:10,color:e.theme.muted,style:{wordBreak:"break-word",opacity:.8},children:c.shadow})]})]},c.name))})}),r.jsx(ue,{title:"Color Blocks",config:e,children:r.jsx(i.View,{display:"grid",gridTemplateColumns:"repeat(auto-fit, minmax(160px, 1fr))",gap:12,children:[["primary","Primary",e.theme.onPrimary],["secondary","Secondary",e.theme.onPrimary],["success","Success","#ffffff"],["warning","Warning","#ffffff"],["error","Error","#ffffff"],["canvas","Canvas",e.theme.text],["surface","Surface",e.theme.text],["text","Text",e.theme.canvas],["muted","Muted",e.theme.canvas],["border","Border",e.theme.text],["onPrimary","On primary",e.theme.text]].map(([c,s,d])=>{const g=e.theme[c];return r.jsxs(i.Vertical,{gap:0,borderRadius:12,overflow:"hidden",borderWidth:1,borderStyle:"solid",borderColor:e.theme.border,children:[r.jsx(i.View,{height:88,backgroundColor:g}),r.jsxs(i.Vertical,{gap:4,padding:12,backgroundColor:e.theme.surface,children:[r.jsx(i.Text,{fontSize:13,fontWeight:"700",children:s}),r.jsxs(i.Text,{fontSize:11,color:e.theme.muted,children:["theme.",c]}),r.jsx(i.Text,{fontSize:11,color:e.theme.muted,children:g})]})]},c)})})}),r.jsx(ue,{title:"Pricing — Booking (Light & Dark)",config:e,children:r.jsxs(i.Horizontal,{gap:20,flexWrap:"wrap",alignItems:"flex-start",children:[r.jsx(me,{config:e,palette:n,label:"On light surface",children:r.jsx(bc,{palette:n})}),r.jsx(me,{config:e,palette:a,label:"On dark surface",children:r.jsx(bc,{palette:a})})]})}),r.jsx(ue,{title:"Pricing — SaaS Tiers (Light & Dark)",config:e,children:r.jsxs(i.Vertical,{gap:20,children:[r.jsx(me,{config:e,palette:n,label:"On light surface",children:r.jsx(i.Horizontal,{gap:16,flexWrap:"wrap",alignItems:"stretch",children:xc.map(c=>r.jsx(kc,{palette:n,tier:c,personality:l},c.name))})}),r.jsx(me,{config:e,palette:a,label:"On dark surface",children:r.jsx(i.Horizontal,{gap:16,flexWrap:"wrap",alignItems:"stretch",children:xc.map(c=>r.jsx(kc,{palette:a,tier:c,personality:l},c.name))})})]})}),r.jsx(ue,{title:"Pricing — Product (Light & Dark)",config:e,children:r.jsxs(i.Horizontal,{gap:20,flexWrap:"wrap",alignItems:"flex-start",children:[r.jsx(me,{config:e,palette:n,label:"On light surface",children:r.jsx(Cc,{palette:n,personality:l})}),r.jsx(me,{config:e,palette:a,label:"On dark surface",children:r.jsx(Cc,{palette:a,personality:l})})]})}),r.jsx(ue,{title:"Pricing — Featured w/ Badge & Favorite (Light & Dark)",config:e,children:r.jsxs(i.Horizontal,{gap:20,flexWrap:"wrap",alignItems:"flex-start",children:[r.jsx(me,{config:e,palette:n,label:"On light surface",children:r.jsx(wc,{palette:n,personality:l})}),r.jsx(me,{config:e,palette:a,label:"On dark surface",children:r.jsx(wc,{palette:a,personality:l})})]})}),r.jsx(ue,{title:"Content — Color Block Cards",config:e,children:r.jsx(i.Horizontal,{gap:20,flexWrap:"wrap",alignItems:"flex-start",children:xb.map(c=>r.jsx(kb,{block:c,palette:n,personality:l},c.slug))})}),r.jsx(ue,{title:"Content — Article Cards w/ Badge & Favorite (Light & Dark)",config:e,children:r.jsxs(i.Vertical,{gap:20,children:[r.jsx(me,{config:e,palette:n,label:"On light surface",children:r.jsx(i.Horizontal,{gap:16,flexWrap:"wrap",alignItems:"stretch",children:Sc.map(c=>r.jsx(vc,{palette:n,article:c,personality:l},c.id))})}),r.jsx(me,{config:e,palette:a,label:"On dark surface",children:r.jsx(i.Horizontal,{gap:16,flexWrap:"wrap",alignItems:"stretch",children:Sc.map(c=>r.jsx(vc,{palette:a,article:c,personality:l},c.id))})})]})}),r.jsx(ue,{title:"CTA Card — Light & Dark",config:e,children:r.jsxs(i.Horizontal,{gap:20,flexWrap:"wrap",alignItems:"flex-start",children:[r.jsx(me,{config:e,palette:n,label:"On light surface",children:r.jsx(Ic,{palette:n,config:e})}),r.jsx(me,{config:e,palette:a,label:"On dark surface",children:r.jsx(Ic,{palette:a,config:e})})]})}),r.jsx(ue,{title:"Product Card — Light & Dark",config:e,children:r.jsxs(i.Horizontal,{gap:20,flexWrap:"wrap",alignItems:"flex-start",children:[r.jsx(me,{config:e,palette:n,label:"On light surface",children:r.jsx(Fc,{palette:n,config:e})}),r.jsx(me,{config:e,palette:a,label:"On dark surface",children:r.jsx(Fc,{palette:a,config:e})})]})}),r.jsx(ue,{title:"Content & Layout",config:e,children:r.jsxs(i.Vertical,{gap:24,children:[r.jsxs(i.Horizontal,{gap:16,flexWrap:"wrap",alignItems:"stretch",children:[r.jsxs(we,{width:"min(100%, 320px)",children:[r.jsx(we.Header,{children:r.jsxs(i.Horizontal,{alignItems:"center",justifyContent:"space-between",gap:12,flexWrap:"wrap",children:[r.jsx(i.Text,{fontWeight:"700",children:e.metadata.id==="spacex"?"Falcon 9":"Product Card"}),r.jsx(Fe,{variant:"filled",content:"New"})]})}),r.jsx(we.Content,{children:r.jsx(i.Text,{fontSize:14,lineHeight:"20px",children:e.metadata.id==="spacex"?"The world's first orbital-class reusable rocket. Designed for reliable and safe transport of people and payloads.":"Card surfaces, borders, typography, and shadows come from the active JSON config."})}),r.jsx(we.Footer,{children:r.jsx(de,{size:"sm",children:e.metadata.id==="spacex"?"Explore":"Review"})})]}),r.jsxs(we,{width:"min(100%, 320px)",children:[r.jsx(we.Header,{children:r.jsxs(i.Horizontal,{gap:12,alignItems:"center",justifyContent:"space-between",flexWrap:"wrap",children:[r.jsxs(i.Horizontal,{gap:12,alignItems:"center",children:[r.jsx(na,{fallback:e.metadata.label.slice(0,2)}),r.jsxs(i.Vertical,{gap:2,children:[r.jsx(i.Text,{fontWeight:"700",children:e.metadata.id==="spacex"?"Starship":e.metadata.label}),r.jsx(i.Text,{fontSize:12,color:e.theme.muted,children:e.metadata.id==="spacex"?"Multiplanetary mission":"Config-driven preview"})]})]}),r.jsx(Fe,{variant:"outline",content:"Active"})]})}),r.jsx(we.Content,{children:e.metadata.id==="spacex"?r.jsx(i.Text,{fontSize:14,lineHeight:"20px",children:"The most powerful launch vehicle ever developed. Designed to carry crew and cargo to Mars and beyond."}):r.jsx(St,{variant:"info",title:"Config active",description:"This alert is rendered by the shared component."})})]})]}),r.jsx(yb,{config:e}),r.jsx(Rn,{ratio:16/9,borderRadius:12,overflow:"hidden",children:r.jsx(i.View,{width:"100%",height:"100%",backgroundColor:e.theme.primary,children:r.jsxs(i.Vertical,{height:"100%",alignItems:"center",justifyContent:"center",gap:8,children:[r.jsx(i.Text,{fontWeight:"700",color:e.theme.onPrimary,children:"16:9 Aspect Ratio"}),r.jsx(Fe,{content:"Config primary color"})]})})}),r.jsxs($e,{children:[r.jsx($e.Content,{children:[1,2,3].map(c=>r.jsx($e.Item,{children:r.jsx(i.View,{height:200,borderRadius:12,alignItems:"center",justifyContent:"center",backgroundColor:e.theme.surface,borderColor:e.theme.border,borderWidth:1,borderStyle:"solid",children:r.jsxs(i.Text,{fontSize:24,fontWeight:"700",children:["Slide ",c]})})},c))}),r.jsxs(i.Horizontal,{gap:12,marginTop:12,justifyContent:"center",children:[r.jsx($e.Previous,{}),r.jsx($e.Next,{})]})]})]})}),r.jsx(ue,{title:"Navigation & Interactive",config:e,children:r.jsxs(i.Vertical,{gap:18,children:[r.jsxs(i.Vertical,{gap:20,children:[r.jsxs(i.Vertical,{gap:8,children:[r.jsx(i.Text,{fontSize:12,fontWeight:"700",color:e.theme.muted,children:"With icons"}),r.jsx(Do,{tabs:fb,defaultValue:"homes",views:{tab:{borderRadius:ur(e,"tabs")},activeTab:{borderRadius:ur(e,"tabs")}}})]}),r.jsxs(i.Vertical,{gap:8,children:[r.jsx(i.Text,{fontSize:12,fontWeight:"700",color:e.theme.muted,children:"Without icons"}),r.jsx(Do,{defaultValue:"overview",views:{tab:{borderRadius:ur(e,"tabs")},activeTab:{borderRadius:ur(e,"tabs")}},tabs:[{title:"Overview",value:"overview",content:r.jsx(i.Text,{fontSize:14,lineHeight:"20px",children:"Tokens and components share the active config."})},{title:"Usage",value:"usage",content:r.jsx(i.Text,{fontSize:14,lineHeight:"20px",children:"Explicit props still override the config defaults."})},{title:"Audit",value:"audit",content:r.jsx(i.Text,{fontSize:14,lineHeight:"20px",children:"Plain text tabs without icons."})}]})]})]}),r.jsx(bo,{items:pb,orientation:"horizontal",defaultActiveItemId:"components"}),(()=>{const c=ur(e,"accordion"),s={borderWidth:0,borderTopWidth:0,borderBottomWidth:0,borderLeftWidth:0,borderRightWidth:0,marginBottom:0,borderRadius:0},d={...s,borderTopWidth:1,borderTopStyle:"solid",borderTopColor:e.theme.border};return r.jsxs(De,{defaultValue:"tokens",collapsible:!0,shape:"rounded",views:{container:{borderRadius:c,overflow:"hidden",borderWidth:1,borderStyle:"solid",borderColor:e.theme.border}},children:[r.jsxs(De.Item,{value:"tokens",...s,views:{item:s,trigger:{borderRadius:0}},children:[r.jsx(De.Trigger,{children:"Token extraction"}),r.jsx(De.Content,{children:r.jsxs(i.Text,{color:e.theme.muted,children:[Object.keys(e.tokens.rawCssVars).length," raw CSS variables were extracted from ",e.metadata.sourcePath,"."]})})]}),r.jsxs(De.Item,{value:"overrides",...d,views:{item:d,trigger:{borderRadius:0}},children:[r.jsx(De.Trigger,{children:"Override behavior"}),r.jsx(De.Content,{children:r.jsx(i.Text,{color:e.theme.muted,children:"Props passed directly to components override the design-system defaults."})})]})]})})(),r.jsx(Xr,{label:"advanced tools"}),r.jsxs(i.Horizontal,{gap:16,flexWrap:"wrap",alignItems:"center",children:[r.jsx(Xt,{color:e.theme.primary,children:"Toggle Button"}),r.jsx(si,{color:e.theme.primary,items:[{id:"left",value:"Left"},{id:"center",value:"Center"},{id:"right",value:"Right"}]}),r.jsx(et,{content:"Tooltip message",children:r.jsx(de,{variant:"outline",children:"Hover for Tooltip"})}),r.jsxs(Me,{children:[r.jsx(Me.Trigger,{children:r.jsx(de,{variant:"ghost",children:"Hover Card"})}),r.jsx(Me.Content,{children:r.jsxs(i.Vertical,{gap:4,padding:12,children:[r.jsx(i.Text,{fontWeight:"700",children:"Detailed Info"}),r.jsx(i.Text,{fontSize:12,opacity:.8,children:"Hover cards provide more context."})]})})]}),r.jsx(ui,{value:e.theme.primary}),r.jsx(ji,{shareData:{url:"https://example.com",title:"Example"}}),r.jsx(Ft,{to:"#",children:"Inline Link component"})]}),r.jsx(i.Horizontal,{gap:16,flexWrap:"wrap",alignItems:"center",children:r.jsx(zi,{currentPage:o,totalPages:10,onPageChange:t})})]})})]})},wb=({config:e})=>{var o;return r.jsxs(ht,{config:e,children:[r.jsx(ob,{children:(o=e.metadata.googleFontLinks)==null?void 0:o.map(t=>r.jsx("link",{rel:"stylesheet",href:t},t))}),r.jsx(i.View,{minHeight:"100vh",padding:28,fontFamily:e.tokens.typography.fontFamily,backgroundColor:e.theme.canvas,color:e.theme.text,style:{textTransform:e.metadata.id==="spacex"?"uppercase":"none"},children:r.jsxs(i.Vertical,{gap:28,children:[r.jsxs(i.Vertical,{gap:12,maxWidth:900,children:[r.jsxs(i.Text,{as:"h1",fontSize:44,lineHeight:"48px",fontWeight:"800",fontFamily:e.tokens.typography.fontFamily,children:[e.metadata.label," Design System"]}),r.jsxs(i.Text,{fontSize:16,lineHeight:"24px",color:e.theme.muted,fontFamily:e.tokens.typography.fontFamily,children:["Live App Studio components rendered with the"," ",e.metadata.label," config defaults."]})]}),r.jsxs(i.Vertical,{gap:28,children:[r.jsx(bb,{config:e}),r.jsx(Cb,{config:e})]})]})})]})};F.Accordion=De,F.ActionSheet=md,F.Alert=St,F.ArrowIcon=ad,F.AspectRatio=Rn,F.AttachmentGroup=gi,F.AttachmentIcon=Ko,F.AttachmentPreview=lm,F.AudioIcon=Fo,F.AudioInput=Md,F.AudioWaveform=vt,F.Avatar=na,F.BackIcon=Ms,F.Background=rc,F.Badge=Fe,F.BatteryIcon=fs,F.BluetoothIcon=od,F.BoldArrowIcon=nd,F.BookmarkIcon=ms,F.Button=de,F.CHART_COLORS=Le,F.CalendarIcon=Us,F.CameraIcon=ed,F.Card=we,F.Carousel=$e,F.Chart=H0,F.ChartIcon=Is,F.ChatInput=Qi,F.ChatWidget=tc,F.ChatWidgetComponent=bn,F.ChatWidgetWidget=vy,F.CheckIcon=zs,F.Checkbox=_t,F.ChevronIcon=he,F.ClockIcon=Gs,F.CloseEyeIcon=xt,F.CloseIcon=He,F.CloudIcon=ps,F.ColorInput=Pg,F.ColorPicker=ui,F.ComboBox=rf,F.Command=Bo,F.ContextMenu=Wo,F.CookieConsent=A0,F.CopyIcon=us,F.CountryPicker=Lg,F.CreditCardIcon=Bs,F.CropIcon=cd,F.DEFAULT_CHART_COLORS=ba,F.DatePicker=Kh,F.DeleteIcon=ys,F.DesignSystem=wb,F.DesignSystemProvider=ht,F.Divider=Op,F.DocumentIcon=Ts,F.DownloadIcon=ks,F.DragAndDrop=np,F.DragAndDropComponent=di,F.DragHandleIcon=Zc,F.DragHandleLinesIcon=dd,F.Drawer=yo,F.DropZone=cp,F.DropdownMenu=ir,F.DustBinIcon=kr,F.EditIcon=bs,F.EmojiPicker=wp,F.ErrorIcon=Sr,F.ExternalLinkIcon=Yn,F.FacebookIcon=ls,F.FileIcon=go,F.FileImage=O0,F.FileSVG=B0,F.FilterIcon=qs,F.FolderIcon=Qc,F.FormikChatInput=If,F.FormikCheckbox=ff,F.FormikColorInput=Ff,F.FormikComboBox=Ef,F.FormikCountryPicker=Mf,F.FormikDatePicker=zf,F.FormikEmojiPicker=am,F.FormikForm=gf,F.FormikIconPicker=Rf,F.FormikOTPInput=Nf,F.FormikPassword=Af,F.FormikRadio=mf,F.FormikSelect=Wf,F.FormikSelector=Uf,F.FormikSlider=Bf,F.FormikSwitch=Hf,F.FormikTagInput=jf,F.FormikTextArea=Pf,F.FormikTextField=Vf,F.FormikToggle=Kf,F.FormikToggleGroup=Xf,F.FormikUploader=Hl,F.GiftIcon=Vs,F.Gradient=xi,F.HeartIcon=ds,F.HelpIcon=Jc,F.HomeIcon=xs,F.HoverCard=Me,F.Icon=xr,F.IconPicker=Sp,F.ImageIcon=es,F.InfoIcon=Re,F.InstagramIcon=ns,F.KeyboardAvoidingView=Ul,F.LayoutIcon=Ls,F.LikeIcon=Rs,F.Link=Ft,F.LinkIcon=$s,F.LinkedinIcon=is,F.Loader=eo,F.LoadingSpinnerIcon=bt,F.LockIcon=ws,F.LogoutIcon=Es,F.MagicWandIcon=Qs,F.MapPinIcon=Ys,F.MediaPreview=im,F.MenuIcon=Ks,F.Menubar=xo,F.MessageLayout=wd,F.MessageView=ra,F.MicrophoneIcon=ut,F.MinusIcon=Nn,F.Modal=uo,F.ModalLayout=Zt,F.ModalRouter=Zt,F.MoonIcon=Fs,F.MoreIcon=Os,F.MousePointerIcon=Xn,F.NavigationMenu=bo,F.NotificationIcon=vs,F.OTPInput=ml,F.OpenEyeIcon=kt,F.PageLayout=vm,F.Pagination=zi,F.PanelIcon=Kn,F.Password=Xh,F.PauseIcon=ss,F.PlayIcon=qn,F.PlusIcon=Cs,F.PowerOffIcon=Ds,F.PrintIcon=Js,F.ProfileIcon=Ss,F.ProgressBar=Mi,F.Radio=Nt,F.RadioGroup=wg,F.RefreshIcon=Xs,F.Resizable=fn,F.RotateIcon=Ps,F.Router=jm,F.SaveIcon=hs,F.SearchIcon=wr,F.Select=er,F.Selector=gg,F.SendIcon=yt,F.Separator=Xr,F.SettingsIcon=Un,F.ShapeIcon=js,F.ShareButton=ji,F.ShareIcon=Gn,F.ShieldIcon=As,F.Sidebar=gr,F.Slider=Bl,F.SliderIcon=id,F.SpinnerIcon=ld,F.SplashScreen=Fm,F.StarIcon=gs,F.StatusIndicator=Jr,F.StopIcon=Cr,F.SuccessIcon=Ct,F.Switch=Dt,F.Table=Ve,F.Tabs=Do,F.TagInput=nf,F.TextArea=$t,F.TextField=je,F.TextIcon=Hs,F.ThreadsIcon=cs,F.TickIcon=Xo,F.Title=ci,F.Toast=xu,F.Toggle=Xt,F.ToggleGroup=si,F.Tooltip=et,F.TrashIcon=Ns,F.TwitchIcon=ts,F.TwitterIcon=os,F.UnLikeIcon=Zs,F.UnlockIcon=rd,F.UploadIcon=wt,F.Uploader=Tr,F.UserIcon=Xc,F.VideoIcon=Rc,F.WarningIcon=pt,F.WifiIcon=td,F.XIcon=rs,F.YoutubeIcon=as,F.ZapIcon=_s,F.ZoomInIcon=sd,F.ZoomOutIcon=Ws,F.deepMerge=Be,F.defaultDesignSystemConfig=An,F.designSystemConfigList=$c,F.designSystemConfigs=st,F.getDesignSystemComponentProps=gt,F.goBack=Mm,F.hideDrawer=ql,F.hideMessage=oa,F.hideModal=Jt,F.matchPath=Gl,F.mergeDesignSystemComponentProps=$n,F.navigate=zm,F.normalizeDesignSystemComponentProps=dt,F.setSplashLoaded=Tm,F.setSplashStarted=Im,F.showDrawer=wm,F.showMessage=ea,F.showModal=cm,F.showToast=ko,F.useDesignSystem=br,F.useDesignSystemComponentProps=Io,F.useDrawerStore=ao,F.useHistory=on,F.useMergedDesignSystemComponentProps=pe,F.useMessageStore=vr,F.useModalStore=no,F.useRouterStore=qe,F.useSplashStore=Nr,F.useToast=ku,Object.defineProperty(F,Symbol.toStringTag,{value:"Module"})});
35
+ `})]})},Ru=({number:e=20,children:o,...t})=>{const n=Array.from({length:e},(a,l)=>l);return r.jsxs(i.View,{width:"100%",height:"100%",backgroundColor:"black",position:"relative",overflow:"hidden",...t,children:[n.map(a=>{const l=a*37%200-100+"px",c=.2+a*13%6*.1+"s",s=(1+a*7%9)/2+"s",d=300+a*17%100+"px";return r.jsx(i.View,{position:"absolute",top:"0px",left:l,width:"2px",height:"2px",borderRadius:"9999px",backgroundColor:"white",boxShadow:"0 0 0 1px rgba(255, 255, 255, 0.1)",transform:"rotate(215deg)",zIndex:0,animate:{from:{transform:"translateX(-100%) translateY(-100%)"},to:{transform:`translateX(${d}) translateY(${d})`},iterationCount:"infinite",timingFunction:"linear",fillMode:"forwards",duration:s,delay:c},children:r.jsx(i.View,{position:"absolute",top:"-1px",left:"-1px",width:"1px",height:"1px",borderRadius:"9999px",backgroundColor:"white",boxShadow:"0 10px 0 1px rgba(255, 255, 255, 0.1)"})},a)}),o&&r.jsx(i.View,{position:"relative",zIndex:1,width:"100%",height:"100%",children:o})]})},Ri=["rgb(186, 230, 253)","rgb(249, 168, 212)","rgb(134, 239, 172)","rgb(253, 224, 71)","rgb(252, 165, 165)","rgb(216, 180, 254)","rgb(147, 197, 253)","rgb(165, 180, 252)","rgb(196, 181, 253)"],ey=()=>Ri[Math.floor(Math.random()*Ri.length)],oy=({rows:e=15,cols:o=10,squareSize:t=40,...n})=>{const a=Array(e).fill(1),l=Array(o).fill(1);return r.jsx(i.View,{padding:16,width:400,height:300,position:"relative",overflow:"hidden",backgroundColor:"color-gray-50",zIndex:0,transform:"skewX(-48deg) skewY(14deg) scale(0.675) rotate(0deg) translateZ(0)",...n,children:a.map((c,s)=>r.jsx(i.Horizontal,{gap:0,children:l.map((d,g)=>r.jsx(i.View,{height:t/3,width:t,borderStyle:"solid",borderColor:"color-gray-200",borderWidth:.5,backgroundColor:"transparent",cursor:"pointer",on:{hover:{backgroundColor:ey(),transition:"background-color 0.2s ease"}}},`col-${g}`))},`row-${s}`))})},ry=["rgb(59, 130, 246)","rgb(147, 51, 234)","rgb(236, 72, 153)","rgb(34, 197, 94)","rgb(251, 146, 60)","rgb(168, 85, 247)"],ty=({count:e=50,colors:o=ry,speed:t="medium",shapes:n=["circle"],...a})=>{const l=Array.from({length:e},(g,m)=>m),c=()=>{switch(t){case"slow":return .5;case"fast":return 2;default:return 1}},s=()=>n[Math.floor(Math.random()*n.length)],d=()=>o[Math.floor(Math.random()*o.length)];return r.jsx(i.View,{width:400,height:300,position:"relative",overflow:"hidden",backgroundColor:"color-gray-900",...a,children:l.map(g=>{const m=Math.random()*8+4,f=Math.random()*400,p=Math.random()*300,u=Math.random()*400,y=Math.random()*300,k=(Math.random()*10+5)/c(),x=Math.random()*5,C=s(),S=d(),w={circle:{borderRadius:"50%"},square:{borderRadius:"2px"},triangle:{borderRadius:"0",clipPath:"polygon(50% 0%, 0% 100%, 100% 100%)"}};return r.jsx(i.View,{position:"absolute",width:m,height:m,backgroundColor:S,opacity:.7,style:{left:f,top:p,...w[C]},animate:{from:{transform:"translate(0px, 0px) scale(0.5)",opacity:0},to:{transform:`translate(${u-f}px, ${y-p}px) scale(1)`,opacity:.7},iterationCount:"infinite",direction:"alternate",timingFunction:"ease-in-out",duration:`${k}s`,delay:`${x}s`}},g)})})},ny=({gridSize:e=30,lineColor:o="rgba(59, 130, 246, 0.3)",pulseColor:t="rgba(59, 130, 246, 0.8)",animationSpeed:n="medium",...a})=>{const l=()=>{switch(n){case"slow":return 4;case"fast":return 1;default:return 2}},c=Math.floor(400/e),s=Math.floor(300/e),d=c*s,g=Array.from({length:d},(m,f)=>f);return r.jsxs(i.View,{width:400,height:300,position:"relative",overflow:"hidden",backgroundColor:"color-gray-900",...a,children:[Array.from({length:c+1},(m,f)=>r.jsx(i.View,{position:"absolute",left:f*e,top:0,width:1,height:"100%",backgroundColor:o},`v-line-${f}`)),Array.from({length:s+1},(m,f)=>r.jsx(i.View,{position:"absolute",left:0,top:f*e,width:"100%",height:1,backgroundColor:o},`h-line-${f}`)),g.map(m=>{const f=m%c,p=Math.floor(m/c),u=(f+p)*.1;return r.jsx(i.View,{position:"absolute",left:f*e+1,top:p*e+1,width:e-2,height:e-2,backgroundColor:"transparent",animate:{from:{backgroundColor:"transparent"},to:{backgroundColor:t},iterationCount:"infinite",direction:"alternate",timingFunction:"ease-in-out",duration:`${l()}s`,delay:`${u}s`}},m)})]})},ay=["rgba(59, 130, 246, 0.6)","rgba(147, 51, 234, 0.6)","rgba(236, 72, 153, 0.6)","rgba(34, 197, 94, 0.6)"],ly=({rippleCount:e=5,colors:o=ay,maxSize:t=200,frequency:n=3,...a})=>{const l=Array.from({length:e},(c,s)=>({id:s,x:Math.random()*400,y:Math.random()*300,color:o[s%o.length],delay:s*(n/e),duration:3+Math.random()*2}));return r.jsxs(i.View,{width:400,height:300,position:"relative",overflow:"hidden",backgroundColor:"color-gray-100",...a,children:[l.map(c=>r.jsx(i.View,{position:"absolute",width:20,height:20,borderRadius:"50%",style:{left:c.x-10,top:c.y-10,border:`2px solid ${c.color}`,backgroundColor:"transparent"},animate:{from:{transform:"scale(0)",opacity:1},to:{transform:`scale(${t/20})`,opacity:0},iterationCount:"infinite",timingFunction:"ease-out",duration:`${c.duration}s`,delay:`${c.delay}s`}},c.id)),l.map(c=>r.jsx(i.View,{position:"absolute",width:10,height:10,borderRadius:"50%",style:{left:c.x-5,top:c.y-5,backgroundColor:c.color},animate:{from:{transform:"scale(1)",opacity:.8},to:{transform:`scale(${t/40})`,opacity:0},iterationCount:"infinite",timingFunction:"ease-out",duration:`${c.duration*1.2}s`,delay:`${c.delay+.5}s`}},`secondary-${c.id}`))]})},iy=({children:e,src:o,backgroundSize:t="cover",backgroundPosition:n="center",backgroundRepeat:a="no-repeat",backgroundAttachment:l="scroll",imageOpacity:c=1,overlay:s=null,blendMode:d="normal",views:g,themeMode:m,...f})=>{const p={...un.image,backgroundImage:`url(${o})`,backgroundSize:t,backgroundPosition:n,backgroundRepeat:a,backgroundAttachment:l,opacity:c,mixBlendMode:d};return r.jsxs(i.View,{...un.container,...g==null?void 0:g.container,...f,children:[r.jsx(i.View,{style:p,...g==null?void 0:g.image}),s,e&&r.jsx(i.View,{...un.content,...g==null?void 0:g.content,children:e})]})},cy=({children:e,src:o,autoPlay:t=!0,loop:n=!0,muted:a=!0,playsInline:l=!0,overlay:c=null,blendMode:s="normal",views:d,themeMode:g,...m})=>r.jsxs(i.View,{...yn.container,...d==null?void 0:d.container,...m,children:[r.jsx(i.View,{as:"video",src:o,autoPlay:t,loop:n,muted:a,playsInline:l,style:{...yn.video,mixBlendMode:s},...d==null?void 0:d.video}),c,e&&r.jsx(i.View,{...yn.content,...d==null?void 0:d.content,children:e})]}),sy=({children:e,...o})=>r.jsx(xi,{...o,children:e}),dy=/^(color|theme|light|dark)-/,gy=e=>{const o=e.split("-"),t=parseInt(o[o.length-1],10),n=e.startsWith("theme-")?3:4;return o.length>=n&&!isNaN(t)&&t>=0&&t<=1e3?o.slice(0,-1).join("-"):e},hy=({contentPosition:e,backgroundColor:o="color-black-900",...t})=>{const n=dy.test(o),a=n?gy(o):o,c=(()=>{let s=`${a}-100`,d=`${a}-900`,g=`${a}-600`,m=`${a}-400`;switch(n||(s=`color-mix(in srgb, ${a} 10%, transparent)`,d=`color-mix(in srgb, ${a} 90%, transparent)`,g=`color-mix(in srgb, ${a} 70%, transparent)`,m=`color-mix(in srgb, ${a} 50%, transparent)`),e){case"left":return`radial-gradient(circle at 70% 50%, ${s} 0%, ${s} 100%), linear-gradient(to right, ${d} 0%, ${g} 65%, ${s} 100%)`;case"right":return`radial-gradient(circle at 30% 50%, ${s} 0%, ${s} 100%), linear-gradient(to left, ${d} 0%, ${g} 65%, ${s} 100%)`;case"top":return`radial-gradient(circle at 50% 40%, ${s} 0%, ${s} 100%), linear-gradient(to bottom, ${d} 0%, ${g} 60%, ${s} 100%)`;case"bottom":return`radial-gradient(circle at 50% 60%, ${s} 0%, ${s} 100%), linear-gradient(to top, ${d} 0%, ${g} 60%, ${s} 100%)`;case"center":return`radial-gradient(circle at 50% 70%, ${d} 0%, ${s} 100%)`;default:return m}})();return r.jsx(i.View,{position:"absolute",top:0,left:0,width:"100%",height:"100%",background:c,pointerEvents:"none",zIndex:1,...t})},fy=({children:e,views:o,...t})=>r.jsx(Qu.Provider,{value:{},children:r.jsx(i.View,{...Ju.container,...o==null?void 0:o.container,...t,children:e})}),ec=h.forwardRef(({children:e,shape:o="rounded",decorationRotation:t=5,decorationScale:n=1,decorationOpacity:a=.8,views:l,...c},s)=>{const g=(k=>{switch(k){case"square":return"0px";case"pill":return"9999px";case"rounded":default:return"16px"}})(o),m=Math.abs(t)*(Math.PI/180),f=Math.sin(m)*100,p=(n-1)*100/2,u=Math.ceil(f+p),y=c.backgroundColor??"theme-primary";return r.jsx(i.View,{...c,ref:s,backgroundColor:"transparent",position:"relative",overflow:"visible",...l==null?void 0:l.container,children:r.jsxs(i.View,{padding:c.padding??`${96+u}px ${u}px`,position:"relative",overflow:"visible",children:[r.jsx(i.View,{position:"absolute",top:u,left:u,right:u,bottom:u,backgroundColor:y,borderRadius:g,opacity:a/1.5,transform:`scale(${n})`,pointerEvents:"none",zIndex:1,...l==null?void 0:l.back}),r.jsx(i.View,{position:"absolute",top:u,left:u,right:u,bottom:u,transform:`rotate(${t}deg) scale(${n})`,opacity:a/1.2,backgroundColor:y,borderRadius:g,pointerEvents:"none",zIndex:2,...l==null?void 0:l.front}),r.jsx(i.View,{margin:"0 auto",position:"relative",zIndex:3,...l==null?void 0:l.content,children:e})]})})});ec.displayName="Background.Layout";const fe=fy;fe.Aurora=Zu,fe.Meteors=Ru,fe.Wall=oy,fe.Particles=ty,fe.Grid=ny,fe.Ripples=ly,fe.Image=iy,fe.Video=cy,fe.Gradient=sy,fe.Overlay=hy,fe.Layout=ec;const oc=h.forwardRef((e,o)=>r.jsx(fe,{...e,ref:o}));oc.displayName="Background";const rc=Object.assign(oc,{Layout:fe.Layout,Aurora:fe.Aurora,Meteors:fe.Meteors,Wall:fe.Wall,Particles:fe.Particles,Grid:fe.Grid,Ripples:fe.Ripples,Image:fe.Image,Video:fe.Video,Gradient:fe.Gradient,Overlay:fe.Overlay});rc.displayName="Background";function my(e){const{inputValue:o,onInputChange:t,onSubmit:n,messages:a=[]}=e,[l,c]=h.useState(""),s=h.useRef(null),d=h.useRef(null),g=o!==void 0,m=o!==void 0?o:l,f=h.useCallback(u=>{g?t==null||t(u):c(u)},[g,t]),p=h.useCallback(u=>{u&&u.preventDefault();const y=m.trim();y&&n&&(n(y),g||c(""),s.current&&(s.current.style.height="auto"))},[m,n,g]);return h.useEffect(()=>{d.current&&(d.current.scrollTop=d.current.scrollHeight)},[a.length]),{internalInputValue:m,handleInputChange:f,handleSubmit:p,inputRef:s,messagesRef:d}}const py={sm:{fontSize:"12px",padding:"8px"},md:{fontSize:"14px",padding:"10px"},lg:{fontSize:"14px",padding:"12px"}},uy={default:{backgroundColor:"color-white",border:"1px solid color-gray-200",borderRadius:"12px",boxShadow:"0 12px 32px rgba(15, 23, 42, 0.08)"},glassy:{backgroundColor:"color-white-900",backdropFilter:"blur(10px)",border:"1px solid rgba(226, 232, 240, 0.9)",borderRadius:"12px",boxShadow:"0 12px 32px rgba(15, 23, 42, 0.08)"},minimal:{backgroundColor:"color-white",border:"1px solid color-gray-200",borderRadius:"12px"}},yy={sm:{fontSize:"12px",padding:"8px 10px",borderRadius:"12px"},md:{fontSize:"14px",padding:"10px 12px",borderRadius:"12px"},lg:{fontSize:"14px",padding:"12px 14px",borderRadius:"14px"}},by={backgroundColor:"theme-primary",color:"color-white",alignSelf:"flex-end",borderBottomRightRadius:"4px"},xy={backgroundColor:"color-white",color:"color-gray-900",alignSelf:"flex-start",borderBottomLeftRadius:"4px",border:"1px solid color-gray-200"},Ye={container:{display:"flex",flexDirection:"column",width:"100%",height:"100%",overflow:"hidden"},messagesContainer:{flex:1,overflowY:"auto",display:"flex",flexDirection:"column",gap:"12px",padding:"16px",backgroundColor:"color-gray-50"},inputContainer:{position:"relative",backgroundColor:"color-white",borderTop:"1px solid color-gray-200",padding:"12px",display:"flex",alignItems:"flex-end",gap:"8px",transition:"background-color 0.2s ease, border-color 0.2s ease"},bubble:{maxWidth:"80%",position:"relative",wordWrap:"break-word",animation:"chatBubbleAppear 0.25s ease-out"},timestamp:{position:"absolute",top:"-24px",fontSize:"12px",color:"color-gray-500",backgroundColor:"color-white-900",padding:"2px 8px",borderRadius:"9999px",opacity:0,transition:"opacity 0.15s ease-out",border:"1px solid color-gray-200"},input:{flex:1,border:"none",outline:"none",backgroundColor:"transparent",resize:"none",fontFamily:"inherit",fontSize:"14px",minHeight:"24px",maxHeight:"120px"},sendButton:{width:"36px",height:"36px",borderRadius:"10px",border:"none",cursor:"pointer",display:"flex",alignItems:"center",justifyContent:"center",transition:"background-color 0.2s ease, opacity 0.2s ease",flexShrink:0},attachmentButton:{width:"36px",height:"36px",borderRadius:"10px",border:"none",cursor:"pointer",display:"flex",alignItems:"center",justifyContent:"center",backgroundColor:"transparent",transition:"background-color 0.2s ease",flexShrink:0}},ky=({messages:e=[],inputPlaceholder:o="Type a message...",disableInput:t=!1,variant:n="default",size:a="md",showTimestamps:l=!0,enableAttachments:c=!1,enableContextPicker:s=!1,selectedContextElements:d=[],onContextPickerClick:g,onRemoveContextElement:m,isLoading:f=!1,loadingText:p="Loading...",styles:u={},maxHeight:y="600px",internalInputValue:k,handleInputChange:x,handleSubmit:C,inputRef:S,messagesRef:w,inputValue:v,onInputChange:b,...I})=>{var V;const T={...Ye.container,...uy[n],...u.container},j={...Ye.messagesContainer,maxHeight:y,...u.messagesContainer},E={...Ye.inputContainer,...u.inputContainer},D={...Ye.input,...py[a],...u.input},W=h.useCallback(M=>{x(M.target.value),M.target.style.height="auto",M.target.style.height=`${M.target.scrollHeight}px`},[x]),A=h.useCallback(M=>{M.key==="Enter"&&!M.shiftKey&&(M.preventDefault(),C())},[C]),H=k.trim().length>0,{onSubmit:z,...P}=I;return r.jsxs(i.View,{...T,...P,children:[r.jsxs(i.View,{ref:w,...j,children:[e.length===0?r.jsx(i.View,{display:"flex",alignItems:"center",justifyContent:"center",flex:1,color:"color-gray-500",children:r.jsx(i.Text,{fontSize:"14px",children:"No messages yet. Start a conversation."})}):e.map(M=>r.jsx(Cy,{message:M,size:a,showTimestamp:l,styles:{bubble:u.bubble,userBubble:u.userBubble,assistantBubble:u.assistantBubble,timestamp:u.timestamp,reasoningContainer:u.reasoningContainer,reasoningContent:u.reasoningContent,errorMessage:u.errorMessage,systemMessage:u.systemMessage,toolMessage:u.toolMessage}},M.id)),f&&r.jsxs(i.Horizontal,{justifyContent:"flex-start",alignItems:"center",gap:8,marginTop:"8px",...u.loadingIndicator,children:[r.jsx(bt,{widthHeight:12,color:"currentColor",filled:!1,style:{animation:"spin 1s linear infinite"}}),r.jsx(i.Text,{color:"color-gray-500",fontSize:"14px",children:p})]})]}),r.jsxs(i.View,{children:[d.length>0&&r.jsx(i.Horizontal,{gap:8,marginBottom:"8px",flexWrap:"wrap",padding:"0 12px 8px",...u.contextChipsContainer,children:d.map(M=>r.jsxs(i.Horizontal,{backgroundColor:"color-blue-50",borderWidth:1,borderStyle:"solid",borderColor:"color-blue-200",borderRadius:"9999px",padding:"6px 10px",alignItems:"center",gap:6,children:[r.jsx(i.Text,{fontSize:"12px",color:"color-blue-700",fontWeight:"500",children:M.name}),r.jsx(i.View,{as:"button",type:"button",onClick:()=>m==null?void 0:m(M.id),cursor:"pointer",border:"none",backgroundColor:"transparent",display:"flex",alignItems:"center",children:r.jsx(He,{widthHeight:12,color:"color-blue-700"})})]},M.id))}),r.jsxs(i.View,{as:"form",onSubmit:C,...E,children:[c&&r.jsx(i.View,{as:"button",type:"button",...Ye.attachmentButton,...u.attachmentButton,_hover:{backgroundColor:"color-gray-100"},children:r.jsx(Ko,{widthHeight:16,color:"color-gray-600"})}),r.jsx(i.View,{as:"textarea",ref:S,value:k,onChange:W,onKeyDown:A,placeholder:o,disabled:t||f,...D,style:{...D,opacity:t||f?.5:1}}),r.jsxs(i.Vertical,{gap:4,alignItems:"center",children:[s&&r.jsx(i.View,{as:"button",type:"button",onClick:g,...Ye.attachmentButton,...u.contextPickerButton,_hover:{backgroundColor:"color-gray-100",...(V=u.contextPickerButton)==null?void 0:V._hover},title:"Select element from page",children:r.jsx(Xn,{widthHeight:16,color:"color-gray-600"})}),r.jsx(i.View,{as:"button",type:"submit",disabled:!H||t||f,...Ye.sendButton,backgroundColor:H?"theme-primary":"color-gray-300",_hover:{backgroundColor:H?"theme-primary":"color-gray-300"},...u.sendButton,style:{cursor:H?"pointer":"not-allowed",opacity:!H||t||f?.6:1},children:r.jsx(yt,{widthHeight:16,color:"color-white",filled:!1})})]})]})]})]})},Cy=({message:e,size:o,showTimestamp:t,styles:n})=>{const[a,l]=h.useState(!1),[c,s]=h.useState(!1),d=e.role==="user",g=e.messageType==="system",m=e.messageType==="error",f=e.messageType==="tool";if(g)return r.jsx(i.View,{display:"flex",justifyContent:"center",padding:"8px",width:"100%",...n.systemMessage,children:r.jsxs(i.Horizontal,{gap:6,alignItems:"center",opacity:.7,children:[r.jsx(Re,{widthHeight:12,color:"color-gray-600"}),r.jsx(i.Text,{fontSize:"12px",color:"color-gray-600",fontStyle:"italic",children:e.content})]})});if(f)return r.jsx(i.View,{display:"flex",justifyContent:"flex-start",padding:"8px 16px",width:"100%",...n.toolMessage,children:r.jsxs(i.Horizontal,{gap:8,alignItems:"center",backgroundColor:"color-gray-50",padding:"8px 10px",borderRadius:"8px",width:"100%",borderWidth:1,borderStyle:"solid",borderColor:"color-gray-200",children:[r.jsx(Un,{widthHeight:14,color:"color-gray-600"}),r.jsxs(i.Vertical,{gap:2,children:[r.jsx(i.Text,{fontSize:"11px",fontWeight:"600",color:"color-gray-700",children:"Tool Usage"}),r.jsx(i.Text,{fontSize:"12px",color:"color-gray-600",fontFamily:"monospace",children:e.content})]})]})});const p={...Ye.bubble,...yy[o],...d?by:xy,...m?{backgroundColor:"color-red-50",borderWidth:1,borderStyle:"solid",borderColor:"color-red-200",color:"color-red-700"}:{},...n.bubble,...d?n.userBubble:n.assistantBubble,...m?n.errorMessage:{}},u={...Ye.timestamp,[d?"right":"left"]:"8px",opacity:a?1:0,...n.timestamp};return r.jsx(i.View,{position:"relative",onMouseEnter:()=>l(!0),onMouseLeave:()=>l(!1),display:"flex",justifyContent:d?"flex-end":"flex-start",children:r.jsxs(i.View,{...p,children:[t&&r.jsx(i.View,{...u,children:e.timestamp.toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"})}),m&&r.jsxs(i.Horizontal,{gap:6,marginBottom:"4px",alignItems:"center",children:[r.jsx(Sr,{widthHeight:14,color:"color-red-700"}),r.jsx(i.Text,{fontWeight:"600",fontSize:"12px",children:"Error"})]}),e.reasoning&&r.jsxs(i.View,{marginBottom:"8px",borderBottomWidth:1,borderBottomStyle:"solid",borderBottomColor:"color-gray-200",paddingBottom:"8px",...n.reasoningContainer,children:[r.jsxs(i.Horizontal,{as:"button",onClick:()=>s(!c),cursor:"pointer",gap:4,alignItems:"center",backgroundColor:"transparent",border:"none",padding:0,children:[r.jsx(i.Text,{fontSize:"11px",color:"color-gray-500",fontWeight:"600",children:"Thinking Process"}),r.jsx(he,{orientation:c?"down":"right",widthHeight:10,color:"color-gray-500"})]}),c&&r.jsx(i.View,{padding:"8px",backgroundColor:"color-gray-50",borderRadius:"8px",marginTop:"4px",borderWidth:1,borderStyle:"solid",borderColor:"color-gray-200",...n.reasoningContent,children:r.jsx(i.Text,{fontSize:"12px",color:"color-gray-600",fontStyle:"italic",children:e.reasoning})})]}),r.jsx(i.View,{whiteSpace:"pre-wrap",wordBreak:"break-word",children:e.content}),e.attachments&&e.attachments.length>0&&r.jsx(i.Vertical,{gap:4,marginTop:"8px",children:e.attachments.map(y=>r.jsxs(i.Horizontal,{gap:6,padding:"6px 8px",backgroundColor:"color-gray-50",borderRadius:"8px",fontSize:"12px",borderWidth:1,borderStyle:"solid",borderColor:"color-gray-200",children:[r.jsx(Ko,{widthHeight:14}),r.jsx(i.Text,{children:y.name})]},y.id))}),e.contextElements&&e.contextElements.length>0&&r.jsxs(i.Vertical,{gap:4,marginTop:"8px",children:[r.jsx(i.Text,{fontSize:"11px",color:"color-black-500",fontWeight:"600",children:"Context:"}),e.contextElements.map(y=>r.jsx(i.Horizontal,{gap:6,padding:"6px 10px",backgroundColor:"color-blue-50",borderRadius:"9999px",fontSize:"11px",borderWidth:1,borderStyle:"solid",borderColor:"color-blue-200",children:r.jsx(i.Text,{color:"color-blue-700",fontWeight:"500",children:y.name})},y.id))]})]})})},bn=e=>{const o=my(e);return r.jsx(ky,{...e,...o})};bn.displayName="ChatWidget";const tc=bn;function wy({onSelect:e,onCancel:o,active:t}){const[n,a]=h.useState(null);h.useRef(null);const l=h.useCallback(d=>{var u;if(!t)return;const g=document.elementFromPoint(d.clientX,d.clientY);if(!g||g===document.body||g.closest('[data-chatwidget-ignore="true"]')||g.closest("#chatwidget-overlay")){a(null);return}const m=g.getBoundingClientRect();let f=g.tagName.toLowerCase();if(g.id)f+=`#${g.id}`;else if(g.className&&typeof g.className=="string"){const y=g.className.split(" ")[0];y&&(f+=`.${y}`)}const p=(u=g.innerText)==null?void 0:u.slice(0,20);p&&(f+=` ("${p}...")`),a({id:g.id||`el-${Date.now()}`,name:f,tagName:g.tagName.toLowerCase(),rect:m})},[t]),c=h.useCallback(d=>{!t||d.target.closest('[data-chatwidget-ignore="true"]')||(d.preventDefault(),d.stopPropagation(),n&&e(n))},[t,n,e]),s=h.useCallback(d=>{t&&d.key==="Escape"&&o()},[t,o]);return h.useEffect(()=>{if(!(typeof document>"u"))return t?(document.addEventListener("mousemove",l),document.addEventListener("click",c,!0),document.addEventListener("keydown",s),document.body.style.cursor="crosshair"):(a(null),document.removeEventListener("mousemove",l),document.removeEventListener("click",c,!0),document.removeEventListener("keydown",s),document.body.style.cursor=""),()=>{document.removeEventListener("mousemove",l),document.removeEventListener("click",c,!0),document.removeEventListener("keydown",s),document.body.style.cursor=""}},[t,l,c,s]),{highlightedElement:n}}function Sy({element:e}){return e?r.jsx("div",{id:"chatwidget-overlay",style:{position:"fixed",top:e.rect.top,left:e.rect.left,width:e.rect.width,height:e.rect.height,border:"2px solid #1D4ED8",backgroundColor:"rgba(29, 78, 216, 0.08)",pointerEvents:"none",zIndex:99999,transition:"top 0.1s ease-out, left 0.1s ease-out, width 0.1s ease-out, height 0.1s ease-out",borderRadius:"8px"},children:r.jsx("div",{style:{position:"absolute",top:"-24px",left:"0",backgroundColor:"#1D4ED8",color:"white",padding:"2px 8px",borderRadius:"9999px",fontSize:"12px",fontWeight:"bold",whiteSpace:"nowrap"},children:e.name})}):null}const vy=({initialMessages:e=[],onSendMessage:o,bubbleSize:t="md"})=>{const[n,a]=h.useState(!1),[l,c]=h.useState(!1),[s,d]=h.useState(e),[g,m]=h.useState([]),{highlightedElement:f}=wy({active:l,onSelect:x=>{m(C=>[...C,x]),c(!1),a(!0)},onCancel:()=>{c(!1),a(!0)}}),p=()=>a(!n),u=()=>{c(!0),a(!1)},y=x=>{m(C=>C.filter(S=>S.id!==x))},k=x=>{const C={id:Date.now().toString(),role:"user",content:x,timestamp:new Date,contextElements:[...g]};d(S=>[...S,C]),o==null||o(x,g),m([]),setTimeout(()=>{var b;const S=Math.random()>.7,w=Math.random()>.4,v={id:(Date.now()+1).toString(),role:"assistant",timestamp:new Date,content:S?"I will highlight the selected element.":`I received your message regarding: ${((b=C.contextElements)==null?void 0:b.map(I=>I.name).join(", "))||"general context"}. How can I assist you further?`,messageType:S?"tool":"text",reasoning:w?"Analyzing the user input and context... The user seems to be asking about specific elements. I should tailor my response to the selected context.":void 0};d(I=>[...I,v]),S&&setTimeout(()=>{d(I=>[...I,{id:(Date.now()+2).toString(),role:"assistant",messageType:"system",content:'Tool "highlightElement" executed successfully.',timestamp:new Date}])},800)},1e3)};return r.jsxs(i.View,{position:"fixed",bottom:24,right:24,zIndex:9999,children:[r.jsx(Sy,{element:f}),l&&r.jsx(i.View,{position:"fixed",top:24,left:"50%",transform:"translateX(-50%)",backgroundColor:"rgba(0,0,0,0.8)",color:"white",padding:"8px 16px",borderRadius:"24px",zIndex:1e4,boxShadow:"0 4px 6px rgba(0,0,0,0.1)",children:r.jsx(i.Text,{fontWeight:"600",fontSize:"14px",children:"Click an element to select it. Press ESC to cancel."})}),n&&r.jsxs(i.View,{position:"absolute",bottom:60,right:0,width:"400px",height:"600px",marginBottom:"16px",backgroundColor:"rgba(255, 255, 255, 0.8)",backdropFilter:"blur(20px)",borderRadius:"24px",border:"1px solid rgba(255, 255, 255, 0.4)",boxShadow:"0 25px 50px -12px rgba(0, 0, 0, 0.25)",overflow:"hidden",animation:"slideUp 0.3s ease-out",style:{animation:"fadeIn 0.2s ease-out",transformOrigin:"bottom right"},children:[r.jsxs(i.View,{padding:"16px",borderBottom:"1px solid rgba(0,0,0,0.05)",display:"flex",justifyContent:"space-between",alignItems:"center",children:[r.jsx(i.Text,{fontWeight:"bold",color:"color-gray-800",children:"ChatWidget Assistant"}),r.jsx(i.View,{as:"button",onClick:()=>a(!1),cursor:"pointer",padding:"4px",borderRadius:"50%",border:"none",backgroundColor:"transparent",_hover:{backgroundColor:"rgba(0,0,0,0.05)"},children:r.jsx(He,{widthHeight:16,color:"color-gray-500"})})]}),r.jsx(tc,{messages:s,onSubmit:k,size:t,variant:"minimal",enableContextPicker:!0,selectedContextElements:g,onContextPickerClick:u,onRemoveContextElement:y,styles:{container:{height:"calc(100% - 60px)",backgroundColor:"transparent"},inputContainer:{backgroundColor:"white",margin:"0 16px 16px 16px",boxShadow:"0 4px 6px -1px rgba(0, 0, 0, 0.1)"}}})]}),!l&&r.jsx(i.View,{as:"button",onClick:p,width:"56px",height:"56px",borderRadius:"50%",backgroundColor:"theme-primary",border:"none",boxShadow:"0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06)",cursor:"pointer",display:"flex",alignItems:"center",justifyContent:"center",transition:"transform 0.2s ease",_hover:{transform:"scale(1.05)"},_active:{transform:"scale(0.95)"},"data-chatwidget-ignore":"true",children:n?r.jsx(He,{widthHeight:24,color:"white"}):r.jsx(Kn,{widthHeight:24,color:"white"})})]})};function xn(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Ty=typeof Element<"u",Iy=typeof Map=="function",Fy=typeof Set=="function",zy=typeof ArrayBuffer=="function"&&!!ArrayBuffer.isView;function ot(e,o){if(e===o)return!0;if(e&&o&&typeof e=="object"&&typeof o=="object"){if(e.constructor!==o.constructor)return!1;var t,n,a;if(Array.isArray(e)){if(t=e.length,t!=o.length)return!1;for(n=t;n--!==0;)if(!ot(e[n],o[n]))return!1;return!0}var l;if(Iy&&e instanceof Map&&o instanceof Map){if(e.size!==o.size)return!1;for(l=e.entries();!(n=l.next()).done;)if(!o.has(n.value[0]))return!1;for(l=e.entries();!(n=l.next()).done;)if(!ot(n.value[1],o.get(n.value[0])))return!1;return!0}if(Fy&&e instanceof Set&&o instanceof Set){if(e.size!==o.size)return!1;for(l=e.entries();!(n=l.next()).done;)if(!o.has(n.value[0]))return!1;return!0}if(zy&&ArrayBuffer.isView(e)&&ArrayBuffer.isView(o)){if(t=e.length,t!=o.length)return!1;for(n=t;n--!==0;)if(e[n]!==o[n])return!1;return!0}if(e.constructor===RegExp)return e.source===o.source&&e.flags===o.flags;if(e.valueOf!==Object.prototype.valueOf&&typeof e.valueOf=="function"&&typeof o.valueOf=="function")return e.valueOf()===o.valueOf();if(e.toString!==Object.prototype.toString&&typeof e.toString=="function"&&typeof o.toString=="function")return e.toString()===o.toString();if(a=Object.keys(e),t=a.length,t!==Object.keys(o).length)return!1;for(n=t;n--!==0;)if(!Object.prototype.hasOwnProperty.call(o,a[n]))return!1;if(Ty&&e instanceof Element)return!1;for(n=t;n--!==0;)if(!((a[n]==="_owner"||a[n]==="__v"||a[n]==="__o")&&e.$$typeof)&&!ot(e[a[n]],o[a[n]]))return!1;return!0}return e!==e&&o!==o}var My=function(o,t){try{return ot(o,t)}catch(n){if((n.message||"").match(/stack|recursion/i))return console.warn("react-fast-compare cannot handle circular refs"),!1;throw n}};const Wy=xn(My);var Hy=function(e,o,t,n,a,l,c,s){if(process.env.NODE_ENV!=="production"&&o===void 0)throw new Error("invariant requires an error message argument");if(!e){var d;if(o===void 0)d=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var g=[t,n,a,l,c,s],m=0;d=new Error(o.replace(/%s/g,function(){return g[m++]})),d.name="Invariant Violation"}throw d.framesToPop=1,d}},jy=Hy;const nc=xn(jy);var Py=function(o,t,n,a){var l=n?n.call(a,o,t):void 0;if(l!==void 0)return!!l;if(o===t)return!0;if(typeof o!="object"||!o||typeof t!="object"||!t)return!1;var c=Object.keys(o),s=Object.keys(t);if(c.length!==s.length)return!1;for(var d=Object.prototype.hasOwnProperty.bind(t),g=0;g<c.length;g++){var m=c[g];if(!d(m))return!1;var f=o[m],p=t[m];if(l=n?n.call(a,f,p,m):void 0,l===!1||l===void 0&&f!==p)return!1}return!0};const Vy=xn(Py);var ac=(e=>(e.BASE="base",e.BODY="body",e.HEAD="head",e.HTML="html",e.LINK="link",e.META="meta",e.NOSCRIPT="noscript",e.SCRIPT="script",e.STYLE="style",e.TITLE="title",e.FRAGMENT="Symbol(react.fragment)",e))(ac||{}),kn={link:{rel:["amphtml","canonical","alternate"]},script:{type:["application/ld+json"]},meta:{charset:"",name:["generator","robots","description"],property:["og:type","og:title","og:url","og:image","og:image:alt","og:description","twitter:url","twitter:title","twitter:description","twitter:image","twitter:image:alt","twitter:card","twitter:site"]}},lc=Object.values(ac),rt={accesskey:"accessKey",charset:"charSet",class:"className",contenteditable:"contentEditable",contextmenu:"contextMenu","http-equiv":"httpEquiv",itemprop:"itemProp",tabindex:"tabIndex"},ic=Object.entries(rt).reduce((e,[o,t])=>(e[t]=o,e),{}),_e="data-rh",Oo={DEFAULT_TITLE:"defaultTitle",DEFER:"defer",ENCODE_SPECIAL_CHARACTERS:"encodeSpecialCharacters",ON_CHANGE_CLIENT_STATE:"onChangeClientState",TITLE_TEMPLATE:"titleTemplate",PRIORITIZE_SEO_TAGS:"prioritizeSeoTags"},No=(e,o)=>{for(let t=e.length-1;t>=0;t-=1){const n=e[t];if(Object.prototype.hasOwnProperty.call(n,o))return n[o]}return null},Ay=e=>{let o=No(e,"title");const t=No(e,Oo.TITLE_TEMPLATE);if(Array.isArray(o)&&(o=o.join("")),t&&o)return t.replace(/%s/g,()=>o);const n=No(e,Oo.DEFAULT_TITLE);return o||n||void 0},Ey=e=>No(e,Oo.ON_CHANGE_CLIENT_STATE)||(()=>{}),Cn=(e,o)=>o.filter(t=>typeof t[e]<"u").map(t=>t[e]).reduce((t,n)=>({...t,...n}),{}),Dy=(e,o)=>o.filter(t=>typeof t.base<"u").map(t=>t.base).reverse().reduce((t,n)=>{if(!t.length){const a=Object.keys(n);for(let l=0;l<a.length;l+=1){const s=a[l].toLowerCase();if(e.indexOf(s)!==-1&&n[s])return t.concat(n)}}return t},[]),$y=e=>console&&typeof console.warn=="function"&&console.warn(e),fr=(e,o,t)=>{const n={};return t.filter(a=>Array.isArray(a[e])?!0:(typeof a[e]<"u"&&$y(`Helmet: ${e} should be of type "Array". Instead found type "${typeof a[e]}"`),!1)).map(a=>a[e]).reverse().reduce((a,l)=>{const c={};l.filter(d=>{let g;const m=Object.keys(d);for(let p=0;p<m.length;p+=1){const u=m[p],y=u.toLowerCase();o.indexOf(y)!==-1&&!(g==="rel"&&d[g].toLowerCase()==="canonical")&&!(y==="rel"&&d[y].toLowerCase()==="stylesheet")&&(g=y),o.indexOf(u)!==-1&&(u==="innerHTML"||u==="cssText"||u==="itemprop")&&(g=u)}if(!g||!d[g])return!1;const f=d[g].toLowerCase();return n[g]||(n[g]={}),c[g]||(c[g]={}),n[g][f]?!1:(c[g][f]=!0,!0)}).reverse().forEach(d=>a.push(d));const s=Object.keys(c);for(let d=0;d<s.length;d+=1){const g=s[d],m={...n[g],...c[g]};n[g]=m}return a},[]).reverse()},Ly=(e,o)=>{if(Array.isArray(e)&&e.length){for(let t=0;t<e.length;t+=1)if(e[t][o])return!0}return!1},_y=e=>({baseTag:Dy(["href"],e),bodyAttributes:Cn("bodyAttributes",e),defer:No(e,Oo.DEFER),encode:No(e,Oo.ENCODE_SPECIAL_CHARACTERS),htmlAttributes:Cn("htmlAttributes",e),linkTags:fr("link",["rel","href"],e),metaTags:fr("meta",["name","charset","http-equiv","property","itemprop"],e),noscriptTags:fr("noscript",["innerHTML"],e),onChangeClientState:Ey(e),scriptTags:fr("script",["src","innerHTML"],e),styleTags:fr("style",["cssText"],e),title:Ay(e),titleAttributes:Cn("titleAttributes",e),prioritizeSeoTags:Ly(e,Oo.PRIORITIZE_SEO_TAGS)}),cc=e=>Array.isArray(e)?e.join(""):e,By=(e,o)=>{const t=Object.keys(e);for(let n=0;n<t.length;n+=1)if(o[t[n]]&&o[t[n]].includes(e[t[n]]))return!0;return!1},wn=(e,o)=>Array.isArray(e)?e.reduce((t,n)=>(By(n,o)?t.priority.push(n):t.default.push(n),t),{priority:[],default:[]}):{default:e,priority:[]},sc=(e,o)=>({...e,[o]:void 0}),Oy=["noscript","script","style"],Sn=(e,o=!0)=>o===!1?String(e):String(e).replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#x27;"),dc=e=>Object.keys(e).reduce((o,t)=>{const n=typeof e[t]<"u"?`${t}="${e[t]}"`:`${t}`;return o?`${o} ${n}`:n},""),Ny=(e,o,t,n)=>{const a=dc(t),l=cc(o);return a?`<${e} ${_e}="true" ${a}>${Sn(l,n)}</${e}>`:`<${e} ${_e}="true">${Sn(l,n)}</${e}>`},qy=(e,o,t=!0)=>o.reduce((n,a)=>{const l=a,c=Object.keys(l).filter(g=>!(g==="innerHTML"||g==="cssText")).reduce((g,m)=>{const f=typeof l[m]>"u"?m:`${m}="${Sn(l[m],t)}"`;return g?`${g} ${f}`:f},""),s=l.innerHTML||l.cssText||"",d=Oy.indexOf(e)===-1;return`${n}<${e} ${_e}="true" ${c}${d?"/>":`>${s}</${e}>`}`},""),gc=(e,o={})=>Object.keys(e).reduce((t,n)=>{const a=rt[n];return t[a||n]=e[n],t},o),Uy=(e,o,t)=>{const n={key:o,[_e]:!0},a=gc(t,n);return[h.createElement("title",a,o)]},tt=(e,o)=>o.map((t,n)=>{const a={key:n,[_e]:!0};return Object.keys(t).forEach(l=>{const s=rt[l]||l;if(s==="innerHTML"||s==="cssText"){const d=t.innerHTML||t.cssText;a.dangerouslySetInnerHTML={__html:d}}else a[s]=t[l]}),h.createElement(e,a)}),Ae=(e,o,t=!0)=>{switch(e){case"title":return{toComponent:()=>Uy(e,o.title,o.titleAttributes),toString:()=>Ny(e,o.title,o.titleAttributes,t)};case"bodyAttributes":case"htmlAttributes":return{toComponent:()=>gc(o),toString:()=>dc(o)};default:return{toComponent:()=>tt(e,o),toString:()=>qy(e,o,t)}}},Gy=({metaTags:e,linkTags:o,scriptTags:t,encode:n})=>{const a=wn(e,kn.meta),l=wn(o,kn.link),c=wn(t,kn.script);return{priorityMethods:{toComponent:()=>[...tt("meta",a.priority),...tt("link",l.priority),...tt("script",c.priority)],toString:()=>`${Ae("meta",a.priority,n)} ${Ae("link",l.priority,n)} ${Ae("script",c.priority,n)}`},metaTags:a.default,linkTags:l.default,scriptTags:c.default}},Yy=e=>{const{baseTag:o,bodyAttributes:t,encode:n=!0,htmlAttributes:a,noscriptTags:l,styleTags:c,title:s="",titleAttributes:d,prioritizeSeoTags:g}=e;let{linkTags:m,metaTags:f,scriptTags:p}=e,u={toComponent:()=>[],toString:()=>""};return g&&({priorityMethods:u,linkTags:m,metaTags:f,scriptTags:p}=Gy(e)),{priority:u,base:Ae("base",o,n),bodyAttributes:Ae("bodyAttributes",t,n),htmlAttributes:Ae("htmlAttributes",a,n),link:Ae("link",m,n),meta:Ae("meta",f,n),noscript:Ae("noscript",l,n),script:Ae("script",p,n),style:Ae("style",c,n),title:Ae("title",{title:s,titleAttributes:d},n)}},vn=Yy,nt=[],Tn=!!(typeof window<"u"&&window.document&&window.document.createElement),In=class{constructor(e,o){Ze(this,"instances",[]);Ze(this,"canUseDOM",Tn);Ze(this,"context");Ze(this,"value",{setHelmet:e=>{this.context.helmet=e},helmetInstances:{get:()=>this.canUseDOM?nt:this.instances,add:e=>{(this.canUseDOM?nt:this.instances).push(e)},remove:e=>{const o=(this.canUseDOM?nt:this.instances).indexOf(e);(this.canUseDOM?nt:this.instances).splice(o,1)}}});this.context=e,this.canUseDOM=o||!1,o||(e.helmet=vn({baseTag:[],bodyAttributes:{},htmlAttributes:{},linkTags:[],metaTags:[],noscriptTags:[],scriptTags:[],styleTags:[],title:"",titleAttributes:{}}))}},Ky=parseInt(h.version.split(".")[0],10),Fn=Ky>=19,Xy={},hc=h.createContext(Xy),Jy=(wo=class extends h.Component{constructor(t){super(t);Ze(this,"helmetData");Fn?this.helmetData=null:this.helmetData=new In(this.props.context||{},wo.canUseDOM)}render(){return Fn?h.createElement(h.Fragment,null,this.props.children):h.createElement(hc.Provider,{value:this.helmetData.value},this.props.children)}},Ze(wo,"canUseDOM",Tn),wo),qo=(e,o)=>{const t=document.head||document.querySelector("head"),n=t.querySelectorAll(`${e}[${_e}]`),a=[].slice.call(n),l=[];let c;return o&&o.length&&o.forEach(s=>{const d=document.createElement(e);for(const g in s)if(Object.prototype.hasOwnProperty.call(s,g))if(g==="innerHTML")d.innerHTML=s.innerHTML;else if(g==="cssText"){const m=s.cssText;d.appendChild(document.createTextNode(m))}else{const m=g,f=typeof s[m]>"u"?"":s[m];d.setAttribute(g,f)}d.setAttribute(_e,"true"),a.some((g,m)=>(c=m,d.isEqualNode(g)))?a.splice(c,1):l.push(d)}),a.forEach(s=>{var d;return(d=s.parentNode)==null?void 0:d.removeChild(s)}),l.forEach(s=>t.appendChild(s)),{oldTags:a,newTags:l}},zn=(e,o)=>{const t=document.getElementsByTagName(e)[0];if(!t)return;const n=t.getAttribute(_e),a=n?n.split(","):[],l=[...a],c=Object.keys(o);for(const s of c){const d=o[s]||"";t.getAttribute(s)!==d&&t.setAttribute(s,d),a.indexOf(s)===-1&&a.push(s);const g=l.indexOf(s);g!==-1&&l.splice(g,1)}for(let s=l.length-1;s>=0;s-=1)t.removeAttribute(l[s]);a.length===l.length?t.removeAttribute(_e):t.getAttribute(_e)!==c.join(",")&&t.setAttribute(_e,c.join(","))},Qy=(e,o)=>{typeof e<"u"&&document.title!==e&&(document.title=cc(e)),zn("title",o)},fc=(e,o)=>{const{baseTag:t,bodyAttributes:n,htmlAttributes:a,linkTags:l,metaTags:c,noscriptTags:s,onChangeClientState:d,scriptTags:g,styleTags:m,title:f,titleAttributes:p}=e;zn("body",n),zn("html",a),Qy(f,p);const u={baseTag:qo("base",t),linkTags:qo("link",l),metaTags:qo("meta",c),noscriptTags:qo("noscript",s),scriptTags:qo("script",g),styleTags:qo("style",m)},y={},k={};Object.keys(u).forEach(x=>{const{newTags:C,oldTags:S}=u[x];C.length&&(y[x]=C),S.length&&(k[x]=u[x].oldTags)}),o&&o(),d(e,y,k)},mr=null,Zy=e=>{mr&&cancelAnimationFrame(mr),e.defer?mr=requestAnimationFrame(()=>{fc(e,()=>{mr=null})}):(fc(e),mr=null)},Ry=Zy,mc=class extends h.Component{constructor(){super(...arguments);Ze(this,"rendered",!1)}shouldComponentUpdate(o){return!Vy(o,this.props)}componentDidUpdate(){this.emitChange()}componentWillUnmount(){const{helmetInstances:o}=this.props.context;o.remove(this),this.emitChange()}emitChange(){const{helmetInstances:o,setHelmet:t}=this.props.context;let n=null;const a=_y(o.get().map(l=>{const{context:c,...s}=l.props;return s}));Jy.canUseDOM?Ry(a):vn&&(n=vn(a)),t(n)}init(){if(this.rendered)return;this.rendered=!0;const{helmetInstances:o}=this.props.context;o.add(this),this.emitChange()}render(){return this.init(),null}},at=[],pc=e=>{const o={};for(const t of Object.keys(e))o[ic[t]||t]=e[t];return o},Co=e=>{const o={};for(const t of Object.keys(e)){const n=rt[t];o[n||t]=e[t]}return o},uc=(e,o)=>{if(!Tn)return;const t=document.getElementsByTagName(e)[0];if(!t)return;const n="data-rh-managed",a=t.getAttribute(n),l=a?a.split(","):[],c=Object.keys(o);for(const s of l)c.includes(s)||t.removeAttribute(s);for(const s of c){const d=o[s];d==null||d===!1?t.removeAttribute(s):d===!0?t.setAttribute(s,""):t.setAttribute(s,String(d))}c.length>0?t.setAttribute(n,c.join(",")):t.removeAttribute(n)},Mn=()=>{const e={},o={};for(const t of at){const{htmlAttributes:n,bodyAttributes:a}=t.props;n&&Object.assign(e,pc(n)),a&&Object.assign(o,pc(a))}uc("html",e),uc("body",o)},eb=class extends h.Component{componentDidMount(){at.push(this),Mn()}componentDidUpdate(){Mn()}componentWillUnmount(){const e=at.indexOf(this);e!==-1&&at.splice(e,1),Mn()}resolveTitle(){const{title:e,titleTemplate:o,defaultTitle:t}=this.props;return e&&o?o.replace(/%s/g,()=>Array.isArray(e)?e.join(""):e):e||t||void 0}renderTitle(){const e=this.resolveTitle();if(e===void 0)return null;const o=this.props.titleAttributes||{};return h.createElement("title",Co(o),e)}renderBase(){const{base:e}=this.props;return e?h.createElement("base",Co(e)):null}renderMeta(){const{meta:e}=this.props;return!e||!Array.isArray(e)?null:e.map((o,t)=>h.createElement("meta",{key:t,...Co(o)}))}renderLink(){const{link:e}=this.props;return!e||!Array.isArray(e)?null:e.map((o,t)=>h.createElement("link",{key:t,...Co(o)}))}renderScript(){const{script:e}=this.props;return!e||!Array.isArray(e)?null:e.map((o,t)=>{const{innerHTML:n,...a}=o,l=Co(a);return n&&(l.dangerouslySetInnerHTML={__html:n}),h.createElement("script",{key:t,...l})})}renderStyle(){const{style:e}=this.props;return!e||!Array.isArray(e)?null:e.map((o,t)=>{const{cssText:n,...a}=o,l=Co(a);return n&&(l.dangerouslySetInnerHTML={__html:n}),h.createElement("style",{key:t,...l})})}renderNoscript(){const{noscript:e}=this.props;return!e||!Array.isArray(e)?null:e.map((o,t)=>{const{innerHTML:n,...a}=o,l=Co(a);return n&&(l.dangerouslySetInnerHTML={__html:n}),h.createElement("noscript",{key:t,...l})})}render(){return h.createElement(h.Fragment,null,this.renderTitle(),this.renderBase(),this.renderMeta(),this.renderLink(),this.renderScript(),this.renderStyle(),this.renderNoscript())}},ob=(Pn=class extends h.Component{shouldComponentUpdate(e){return!Wy(sc(this.props,"helmetData"),sc(e,"helmetData"))}mapNestedChildrenToProps(e,o){if(!o)return null;switch(e.type){case"script":case"noscript":return{innerHTML:o};case"style":return{cssText:o};default:throw new Error(`<${e.type} /> elements are self-closing and can not contain children. Refer to our API for more information.`)}}flattenArrayTypeChildren(e,o,t,n){return{...o,[e.type]:[...o[e.type]||[],{...t,...this.mapNestedChildrenToProps(e,n)}]}}mapObjectTypeChildren(e,o,t,n){switch(e.type){case"title":return{...o,[e.type]:n,titleAttributes:{...t}};case"body":return{...o,bodyAttributes:{...t}};case"html":return{...o,htmlAttributes:{...t}};default:return{...o,[e.type]:{...t}}}}mapArrayTypeChildrenToProps(e,o){let t={...o};return Object.keys(e).forEach(n=>{t={...t,[n]:e[n]}}),t}warnOnInvalidChildren(e,o){return nc(lc.some(t=>e.type===t),typeof e.type=="function"?"You may be attempting to nest <Helmet> components within each other, which is not allowed. Refer to our API for more information.":`Only elements types ${lc.join(", ")} are allowed. Helmet does not support rendering <${e.type}> elements. Refer to our API for more information.`),nc(!o||typeof o=="string"||Array.isArray(o)&&!o.some(t=>typeof t!="string"),`Helmet expects a string as a child of <${e.type}>. Did you forget to wrap your children in braces? ( <${e.type}>{\`\`}</${e.type}> ) Refer to our API for more information.`),!0}mapChildrenToProps(e,o){let t={};return h.Children.forEach(e,n=>{if(!n||!n.props)return;const{children:a,...l}=n.props,c=Object.keys(l).reduce((d,g)=>(d[ic[g]||g]=l[g],d),{});let{type:s}=n;switch(typeof s=="symbol"?s=s.toString():this.warnOnInvalidChildren(n,a),s){case"Symbol(react.fragment)":o=this.mapChildrenToProps(a,o);break;case"link":case"meta":case"noscript":case"script":case"style":t=this.flattenArrayTypeChildren(n,t,c,a);break;default:o=this.mapObjectTypeChildren(n,o,c,a);break}}),this.mapArrayTypeChildrenToProps(t,o)}render(){const{children:e,...o}=this.props;let t={...o},{helmetData:n}=o;if(e&&(t=this.mapChildrenToProps(e,t)),n&&!(n instanceof In)){const a=n;n=new In(a.context,!0),delete t.helmetData}return Fn?h.createElement(eb,{...t}):n?h.createElement(mc,{...t,context:n.value}):h.createElement(hc.Consumer,null,a=>h.createElement(mc,{...t,context:a}))}},Ze(Pn,"defaultProps",{defer:!0,encodeSpecialCharacters:!0,prioritizeSeoTags:!1}),Pn);const rb={airbnb:{highlightStyle:"background",fontWeight:700,letterSpacing:"-0.02em"},apple:{highlightStyle:"solid",fontWeight:600,letterSpacing:"-0.03em"},coinbase:{highlightStyle:"solid",fontWeight:600,letterSpacing:"-0.02em"},figma:{highlightStyle:"underline",fontWeight:600,letterSpacing:"-0.01em",highlightFontWeight:700},linear:{highlightStyle:"gradient",fontWeight:600,letterSpacing:"-0.03em"},nike:{highlightStyle:"underline",fontWeight:800,letterSpacing:"0.02em",textTransform:"uppercase",highlightFontStyle:"italic",highlightFontWeight:900},notion:{highlightStyle:"underline",fontWeight:600,letterSpacing:"-0.01em",highlightFontStyle:"italic"},revolut:{highlightStyle:"gradient",fontWeight:700,letterSpacing:"-0.03em"},shopify:{highlightStyle:"background",fontWeight:700,letterSpacing:"-0.02em"},spacex:{highlightStyle:"glow",fontWeight:700,letterSpacing:"0.04em",textTransform:"uppercase",highlightLetterSpacing:"0.06em"},spotify:{highlightStyle:"background",fontWeight:800,letterSpacing:"-0.03em"},stripe:{highlightStyle:"gradient",fontWeight:700,letterSpacing:"-0.03em"},tesla:{highlightStyle:"solid",fontWeight:500,letterSpacing:"-0.01em",textTransform:"uppercase"},uber:{highlightStyle:"underline",fontWeight:700,letterSpacing:"-0.02em"},vercel:{highlightStyle:"outline",fontWeight:700,letterSpacing:"-0.04em"}},tb={highlightStyle:"background",fontWeight:700,letterSpacing:"-0.02em"},nb=e=>rb[e.metadata.id]??tb,yc=(e,o)=>{const t=e.theme;return{canvas:Te(t.canvas),surface:Te(t.surface),text:Te(t.text),muted:Te(t.muted),border:Te(t.border),primary:Te(t.primary),secondary:Te(t.secondary),success:Te(t.success),warning:Te(t.warning),error:Te(t.error),onPrimary:Te(t.onPrimary),appearance:o}},ab=e=>yc(e,"light"),lb=e=>yc(e,"dark"),me=({palette:e,label:o,config:t,children:n})=>r.jsxs(i.Vertical,{gap:10,flex:"1 1 320px",minWidth:0,children:[r.jsxs(i.Horizontal,{gap:8,alignItems:"center",children:[r.jsx(i.View,{width:10,height:10,borderRadius:9999,backgroundColor:e.appearance==="dark"?"#111111":"#ffffff",borderWidth:1,borderStyle:"solid",borderColor:"rgba(0,0,0,0.15)"}),r.jsx(i.Text,{fontSize:11,fontWeight:"700",letterSpacing:"0.08em",textTransform:"uppercase",children:o})]}),r.jsx(ht,{config:t,mode:e.appearance,children:r.jsx(i.View,{padding:20,borderRadius:16,borderWidth:1,borderStyle:"solid",backgroundColor:"color-white",borderColor:"color-gray-200",color:"color-black",children:n})})]}),Te=e=>!e||typeof e!="string"?e:/^(color|theme|light|dark)-/.test(e)?`var(--${e})`:e,Ke=(e,o)=>`color-mix(in srgb, ${Te(e)} ${o}%, transparent)`,ib=e=>e&&e.startsWith("var(--")?e.slice(6,-1):e,cb={cornerStyle:"soft",typeWeight:"bold",typeCase:"normal",typeStyle:"normal",letterSpacing:"-0.01em",accentTreatment:"flat",signatureMotif:"●",density:"comfortable",surfaceTone:"paper",cardRadius:12,pillRadius:9999,badgeRadius:6,voice:"neutral"},sb=e=>e.personality||cb,Xe=(e,o="normal")=>{let n={light:300,regular:400,bold:700,black:800}[e.typeWeight];return o==="light"&&(n=Math.max(300,n-200)),o==="heavy"&&(n=Math.min(900,n+100)),n},pr=e=>{switch(e.density){case"tight":return{padding:16,gap:10,large:20};case"spacious":return{padding:28,gap:18,large:36};case"comfortable":default:return{padding:22,gap:14,large:28}}},db=e=>e.typeCase==="uppercase"?"uppercase":"none",lt=(e,o)=>{switch(e.surfaceTone){case"glass":return{backgroundColor:o.appearance==="dark"?"rgba(255,255,255,0.04)":"rgba(255,255,255,0.65)",backdropFilter:"blur(14px)"};case"mono":return{backgroundColor:o.appearance==="dark"?"#0a0a0a":Te(o.surface)};case"matte":return{backgroundColor:o.appearance==="dark"?"#181818":"#f4f4f4"};case"paper":default:return{backgroundColor:Te(o.surface)}}},Uo=(e,o)=>{const t=Te(o.primary),n=Te(o.secondary||o.primary);switch(e.accentTreatment){case"gradient":return`linear-gradient(135deg, ${t} 0%, ${n} 100%)`;case"glow":return t;case"stripe":return`repeating-linear-gradient(45deg, ${t} 0 8px, ${n} 8px 16px)`;case"halftone":return`radial-gradient(circle at 30% 30%, ${t} 0%, ${n} 70%)`;case"flat":default:return t}},Go=(e,o)=>{if(e.accentTreatment==="glow")return`0 0 24px ${Ke(o.primary,40)}, 0 0 4px ${Te(o.primary)}`},io=e=>({letterSpacing:e.letterSpacing,textTransform:db(e),fontStyle:e.typeStyle,fontWeight:Xe(e,"heavy")}),Se=e=>({letterSpacing:e.typeCase==="uppercase"?"0.12em":"0.06em",textTransform:"uppercase",fontStyle:e.typeStyle,fontWeight:Xe(e,"normal")}),gb=(e,o)=>{var n,a,l;const t=(n=e.components)==null?void 0:n[o];return(l=(a=t==null?void 0:t.views)==null?void 0:a.container)==null?void 0:l.borderRadius},hb=e=>{const o=e.tokens.rawCssVars||{},t=e.theme.border,n=e.theme.surface,a=e.theme.primary,l=o["shadow-ring"]||"rgba(0,0,0,0.08) 0px 0px 0px 1px",c=o["shadow-ring-light"]||`${t} 0px 0px 0px 1px`,s=o["shadow-card"]||`rgba(0,0,0,0.08) 0px 0px 0px 1px, rgba(0,0,0,0.04) 0px 2px 2px 0px, ${n} 0px 0px 0px 1px`,d=o["shadow-card-full"]||`rgba(0,0,0,0.08) 0px 0px 0px 1px, rgba(0,0,0,0.04) 0px 2px 2px 0px, rgba(0,0,0,0.04) 0px 8px 8px -8px, ${n} 0px 0px 0px 1px`;return[{name:"Level 0",label:"Flat",description:"No shadow",shadow:"none"},{name:"Level 1",label:"Ring",description:"Shadow-as-border",shadow:l},{name:"Level 1b",label:"Light Ring",description:"Lighter ring",shadow:c},{name:"Level 2",label:"Card",description:"Ring + subtle lift",shadow:s},{name:"Level 3",label:"Full Card",description:"Ring + lift + ambient + glow",shadow:d},{name:"Focus",label:"Accessibility ring",description:"Focus state — 2px ring",shadow:`0 0 0 2px ${a}`}]},ur=(e,o)=>{const n={accordion:["accordion","card","alert"],tabs:["tabs","button"],panel:["card","alert"]}[o]??[o];for(const a of n){const l=gb(e,a);if(l!==void 0)return l}return"12px"},Wn=({glyph:e,badge:o})=>r.jsxs(i.View,{position:"relative",display:"inline-flex",children:[r.jsx(i.View,{width:32,height:32,borderRadius:"50%",display:"inline-flex",alignItems:"center",justifyContent:"center",style:{backgroundColor:"rgba(0,0,0,0.06)",fontSize:18,lineHeight:"20px"},children:e}),o?r.jsx(i.View,{position:"absolute",top:-10,right:-18,paddingHorizontal:6,paddingVertical:2,borderRadius:9999,style:{backgroundColor:"#ffffff",color:"#222222",fontSize:9,fontWeight:700,letterSpacing:"0.04em",boxShadow:"0 1px 3px rgba(0,0,0,0.18)"},children:o}):null]}),fb=[{title:"Homes",value:"homes",icon:r.jsx(Wn,{glyph:"🏠"}),content:r.jsx(i.Text,{fontSize:14,lineHeight:"20px",children:"Tokens, inputs, and feedback components share the active config."})},{title:"Experiences",value:"experiences",icon:r.jsx(Wn,{glyph:"🎈",badge:"NEW"}),content:r.jsx(i.Text,{fontSize:14,lineHeight:"20px",children:"Explicit props still override the config defaults."})},{title:"Services",value:"services",icon:r.jsx(Wn,{glyph:"🛎️",badge:"NEW"}),content:r.jsx(i.Text,{fontSize:14,lineHeight:"20px",children:"Each tab carries an icon. Active tab uses the theme primary underline."})}],mb=[{title:"Token",field:"token"},{title:"Value",field:"value"},{title:"Role",field:"role"}],pb=[{id:"overview",label:"Overview",href:"#"},{id:"components",label:"Components",href:"#"},{id:"tokens",label:"Tokens",href:"#"}],ub=({color:e,name:o,role:t,border:n})=>r.jsxs(i.View,{borderWidth:1,borderStyle:"solid",borderRadius:8,overflow:"hidden",minWidth:0,borderColor:n,children:[r.jsx(i.View,{height:76,backgroundColor:e}),r.jsxs(i.Vertical,{gap:4,padding:12,children:[r.jsx(i.Text,{fontSize:13,lineHeight:"18px",fontWeight:"700",children:o}),r.jsx(i.Text,{fontSize:12,lineHeight:"16px",opacity:.7,children:e}),r.jsx(i.Text,{fontSize:12,lineHeight:"16px",opacity:.72,children:t})]})]}),ue=({title:e,children:o,config:t})=>r.jsxs(i.Vertical,{gap:18,padding:24,borderWidth:1,borderStyle:"solid",borderRadius:12,backgroundColor:t.theme.canvas,borderColor:t.theme.border,children:[r.jsx(i.Text,{fontSize:18,lineHeight:"24px",fontWeight:"700",color:t.theme.text,children:e}),o]}),yb=({config:e})=>{const o=nb(e),t=o.highlightStyle==="background"?e.theme.onPrimary:e.theme.primary;return r.jsx(i.View,{width:"100%",borderRadius:20,overflow:"hidden",borderWidth:1,borderStyle:"solid",borderColor:e.theme.border,backgroundColor:e.theme.surface,children:r.jsxs(i.Horizontal,{width:"100%",flexWrap:"wrap",alignItems:"stretch",gap:0,children:[r.jsxs(i.Vertical,{flex:"1 1 360px",minWidth:0,padding:36,gap:20,justifyContent:"center",children:[r.jsx(Fe,{variant:"outline",content:`${e.metadata.label} hero`}),r.jsx(ci,{size:"xl",responsive:!0,highlightText:"design system",highlightStyle:o.highlightStyle,highlightColor:e.theme.primary,highlightSecondaryColor:o.highlightStyle==="gradient"?e.theme.secondary:e.theme.onPrimary,views:{container:{color:e.theme.text},text:{color:e.theme.text,fontFamily:e.tokens.typography.fontFamily,fontWeight:o.fontWeight,style:{letterSpacing:o.letterSpacing,fontStyle:o.fontStyle??"normal",textTransform:o.textTransform??"none"}},highlight:{color:t,fontWeight:o.highlightFontWeight??o.fontWeight,style:{fontStyle:o.highlightFontStyle??o.fontStyle??"normal",letterSpacing:o.highlightLetterSpacing??o.letterSpacing,textTransform:o.textTransform??"none"}}},children:"Build a beautiful design system in minutes"},`${e.metadata.id}-${o.highlightStyle}`),r.jsxs(i.Text,{color:e.theme.muted,fontFamily:e.tokens.typography.fontFamily,style:{fontSize:16,lineHeight:"24px",maxWidth:520},children:["Each brand defines its own highlight treatment —"," ",r.jsx(i.Text,{as:"span",color:e.theme.primary,fontWeight:"700",children:o.highlightStyle})," ","with weight"," ",r.jsx(i.Text,{as:"span",fontWeight:"700",children:o.fontWeight}),o.highlightFontStyle==="italic"||o.fontStyle==="italic"?", italic":"",o.textTransform==="uppercase"?", uppercase":"","."]}),r.jsxs(i.Horizontal,{gap:12,flexWrap:"wrap",children:[r.jsx(de,{color:"theme-primary",size:"md",children:"Get started"}),r.jsx(de,{variant:"outline",color:"theme-primary",size:"md",children:"View docs"})]})]}),r.jsxs(i.View,{flex:"1 1 320px",minWidth:0,minHeight:260,position:"relative",overflow:"hidden",style:{backgroundImage:`linear-gradient(135deg, ${e.theme.primary}, ${e.theme.secondary||e.theme.primary})`},children:[r.jsx(i.View,{position:"absolute",top:"50%",left:"50%",width:180,height:180,borderRadius:9999,style:{transform:"translate(-50%, -50%)",backgroundColor:"rgba(255,255,255,0.18)",filter:"blur(40px)"}}),r.jsxs(i.Vertical,{width:"100%",height:"100%",minHeight:260,padding:32,justifyContent:"flex-end",alignItems:"flex-start",gap:12,children:[r.jsx(i.Text,{fontWeight:"700",fontFamily:e.tokens.typography.fontFamily,style:{color:e.theme.onPrimary,fontSize:13,letterSpacing:"0.08em",textTransform:"uppercase"},children:e.metadata.label}),r.jsx(i.Text,{fontWeight:"700",fontFamily:e.tokens.typography.fontFamily,style:{color:e.theme.onPrimary,fontSize:28,lineHeight:"32px",letterSpacing:"-0.02em"},children:e.theme.primary})]})]})]})})},bb=({config:e})=>{var t,n;const o=e.tokens.colors.slice(0,5).map(a=>({token:a.name,value:a.value,role:a.role}));return r.jsxs(i.Vertical,{gap:24,children:[r.jsx(ue,{title:"Color",config:e,children:r.jsx(i.View,{display:"grid",gridTemplateColumns:"repeat(auto-fit, minmax(150px, 1fr))",gap:12,children:e.tokens.colors.slice(0,12).map(a=>r.jsx(ub,{color:a.value,name:a.name,role:a.role,text:e.theme.text,border:e.theme.border},a.name))})}),r.jsx(ue,{title:"Typography",config:e,children:r.jsxs(i.Vertical,{gap:24,children:[r.jsxs(i.Vertical,{gap:4,children:[r.jsx(i.Text,{fontFamily:e.tokens.typography.fontFamily,fontSize:48,lineHeight:"1.0",fontWeight:"700",letterSpacing:"0.96px",textTransform:"uppercase",children:"Making Life Multiplanetary"}),r.jsx(i.Text,{fontSize:10,color:e.theme.muted,children:"Display — 48px / Bold / 1.00 / Uppercase"})]}),r.jsxs(i.Vertical,{gap:4,children:[r.jsx(i.Text,{fontFamily:e.tokens.typography.fontFamily,fontSize:16,lineHeight:"1.7",fontWeight:"400",children:"SpaceX designs, manufactures and launches advanced rockets and spacecraft. The company was founded to revolutionize space technology."}),r.jsx(i.Text,{fontSize:10,color:e.theme.muted,children:"Body — 16px / 400 / 1.70"})]}),r.jsxs(i.Vertical,{gap:4,children:[r.jsx(i.Text,{fontFamily:e.tokens.typography.fontFamily,fontSize:13,lineHeight:"0.94",fontWeight:"700",letterSpacing:"1.17px",textTransform:"uppercase",children:"Falcon 9 · Starship · Dragon"}),r.jsx(i.Text,{fontSize:10,color:e.theme.muted,children:"Nav Bold — 13px / 700 / 0.94 / Uppercase"})]}),r.jsxs(i.Vertical,{gap:4,children:[r.jsx(i.Text,{fontFamily:e.tokens.typography.fontFamily,fontSize:12,lineHeight:"1.0",fontWeight:"400",letterSpacing:"1px",textTransform:"uppercase",children:"Mission Overview"}),r.jsx(i.Text,{fontSize:10,color:e.theme.muted,children:"Caption — 12px / 400 / 1.00 / Uppercase"})]}),r.jsxs(i.Vertical,{gap:4,children:[r.jsx(i.Text,{fontFamily:e.tokens.typography.fontFamily,fontSize:10,lineHeight:"0.94",fontWeight:"400",letterSpacing:"1px",textTransform:"uppercase",children:"Launch Date: 2026-04-15"}),r.jsx(i.Text,{fontSize:10,color:e.theme.muted,children:"Micro — 10px / 400 / 0.94 / Uppercase"})]}),r.jsx(i.Horizontal,{gap:10,flexWrap:"wrap",marginTop:12,children:e.tokens.typography.fontSizes.map(a=>r.jsx(Fe,{variant:"outline",content:a},a))})]})}),r.jsx(ue,{title:"Spacing, Radius, Shadow",config:e,children:r.jsxs(i.Vertical,{gap:18,children:[r.jsx(i.Horizontal,{gap:12,flexWrap:"wrap",alignItems:"flex-end",children:e.tokens.spacing.slice(0,10).map(a=>r.jsxs(i.Vertical,{gap:8,alignItems:"center",children:[r.jsx(i.View,{width:a,minWidth:4,height:24,borderRadius:2,backgroundColor:e.theme.primary}),r.jsx(i.Text,{fontSize:11,color:e.theme.muted,children:a})]},a))}),r.jsx(i.Horizontal,{gap:12,flexWrap:"wrap",children:e.tokens.radii.slice(0,6).map(a=>r.jsxs(i.Vertical,{gap:8,alignItems:"center",children:[r.jsx(i.View,{width:64,height:64,borderRadius:a,borderWidth:1,borderStyle:"solid",backgroundColor:e.theme.surface,borderColor:e.theme.border}),r.jsx(i.Text,{fontSize:11,color:e.theme.muted,children:a})]},a))}),r.jsx(i.View,{width:"100%",maxWidth:"100%",overflowX:"auto",style:{WebkitOverflowScrolling:"touch",color:e.theme.text},children:r.jsx(Ve,{views:(n=(t=e.components)==null?void 0:t.table)==null?void 0:n.views,children:r.jsx(Ve.Template,{caption:"First extracted color tokens",columns:mb,data:o})})})]})})]})},bc=({palette:e})=>r.jsxs(we,{width:"min(100%, 420px)",views:{container:{backgroundColor:e.surface,color:e.text,borderWidth:1,borderStyle:"solid",borderColor:e.border},header:{color:e.text,borderColor:e.border},content:{color:e.text},footer:{borderColor:e.border}},children:[r.jsx(we.Header,{children:r.jsxs(i.Horizontal,{alignItems:"center",justifyContent:"space-between",gap:12,flexWrap:"wrap",children:[r.jsxs(i.Horizontal,{alignItems:"baseline",gap:6,children:[r.jsx(i.Text,{fontSize:24,fontWeight:"800",color:e.text,children:"$182"}),r.jsx(i.Text,{fontSize:14,color:e.muted,children:"night"})]}),r.jsx(Fe,{variant:"filled",content:"Best value"})]})}),r.jsx(we.Content,{children:r.jsxs(i.Vertical,{gap:12,children:[r.jsxs(i.Horizontal,{gap:0,borderRadius:10,borderWidth:1,borderStyle:"solid",borderColor:e.border,overflow:"hidden",children:[r.jsxs(i.Vertical,{flex:1,padding:10,gap:2,borderRightWidth:1,borderRightStyle:"solid",borderColor:e.border,children:[r.jsx(i.Text,{fontSize:10,fontWeight:"700",letterSpacing:"0.06em",color:e.text,children:"CHECK-IN"}),r.jsx(i.Text,{fontSize:14,color:e.text,children:"Mar 12, 2026"})]}),r.jsxs(i.Vertical,{flex:1,padding:10,gap:2,children:[r.jsx(i.Text,{fontSize:10,fontWeight:"700",letterSpacing:"0.06em",color:e.text,children:"CHECKOUT"}),r.jsx(i.Text,{fontSize:14,color:e.text,children:"Mar 18, 2026"})]})]}),r.jsxs(i.Vertical,{padding:10,gap:2,borderRadius:10,borderWidth:1,borderStyle:"solid",borderColor:e.border,children:[r.jsx(i.Text,{fontSize:10,fontWeight:"700",letterSpacing:"0.06em",color:e.text,children:"GUESTS"}),r.jsx(i.Text,{fontSize:14,color:e.text,children:"2 adults"})]}),r.jsx(de,{isFilled:!0,size:"lg",children:"Reserve"}),r.jsx(Xr,{}),r.jsxs(i.Vertical,{gap:6,children:[r.jsxs(i.Horizontal,{justifyContent:"space-between",children:[r.jsx(i.Text,{fontSize:14,color:e.text,children:"$182 × 6 nights"}),r.jsx(i.Text,{fontSize:14,color:e.text,children:"$1,092"})]}),r.jsxs(i.Horizontal,{justifyContent:"space-between",children:[r.jsx(i.Text,{fontSize:14,color:e.text,children:"Cleaning fee"}),r.jsx(i.Text,{fontSize:14,color:e.text,children:"$48"})]}),r.jsxs(i.Horizontal,{justifyContent:"space-between",children:[r.jsx(i.Text,{fontSize:14,color:e.text,children:"Service fee"}),r.jsx(i.Text,{fontSize:14,color:e.text,children:"$165"})]})]}),r.jsx(Xr,{}),r.jsxs(i.Horizontal,{justifyContent:"space-between",children:[r.jsx(i.Text,{fontSize:15,fontWeight:"700",color:e.text,children:"Total before taxes"}),r.jsx(i.Text,{fontSize:15,fontWeight:"700",color:e.text,children:"$1,305"})]})]})})]}),xc=[{name:"Starter",tagline:"For solo makers shipping their first project.",price:"$0",period:"/ month",features:["1 workspace","Up to 3 projects","Community support"],ctaLabel:"Get started"},{name:"Pro",tagline:"For growing teams that need more room to build.",price:"$24",period:"/ month",features:["Unlimited projects","Advanced analytics","Priority email support","Custom domains"],ctaLabel:"Start free trial",featured:!0},{name:"Enterprise",tagline:"For organizations with security and scale needs.",price:"Custom",period:"",features:["SSO & SCIM","Audit logs","Dedicated success manager","99.99% uptime SLA"],ctaLabel:"Contact sales"}],kc=({palette:e,tier:o,personality:t})=>{const n=pr(t),a=lt(t,e),l=Uo(t,e),c=Go(t,e);return r.jsx(i.View,{width:"min(100%, 280px)",borderRadius:t.cardRadius,overflow:"hidden",borderWidth:o.featured?0:1,borderStyle:"solid",style:{...o.featured?{background:l,boxShadow:c}:a,borderColor:e.border,color:o.featured?e.onPrimary:e.text},children:r.jsxs(i.Vertical,{gap:n.gap,padding:n.padding,children:[r.jsxs(i.Vertical,{gap:6,children:[r.jsxs(i.Horizontal,{alignItems:"center",justifyContent:"space-between",children:[r.jsx(i.Text,{fontSize:13,color:o.featured?e.onPrimary:e.text,style:Se(t),children:o.name}),o.featured?r.jsx(i.View,{paddingHorizontal:10,paddingVertical:4,borderRadius:t.badgeRadius,backgroundColor:Ke(e.onPrimary,22),children:r.jsxs(i.Horizontal,{gap:4,alignItems:"center",children:[r.jsx(i.Text,{fontSize:11,color:e.onPrimary,style:{lineHeight:1},children:t.signatureMotif}),r.jsx(i.Text,{fontSize:10,color:e.onPrimary,style:Se(t),children:t.voice.includes("mission")?"PRIORITY":"POPULAR"})]})}):null]}),r.jsx(i.Text,{fontSize:13,lineHeight:"18px",color:o.featured?Ke(e.onPrimary,85):e.muted,style:{fontStyle:t.typeStyle},children:o.tagline})]}),r.jsxs(i.Horizontal,{alignItems:"baseline",gap:4,children:[r.jsx(i.Text,{fontSize:n.large+8,color:o.featured?e.onPrimary:e.text,style:io(t),children:o.price}),o.period?r.jsx(i.Text,{fontSize:14,color:o.featured?Ke(e.onPrimary,85):e.muted,style:{fontStyle:t.typeStyle},children:o.period}):null]}),r.jsx(i.Vertical,{gap:8,children:o.features.map(s=>r.jsxs(i.Horizontal,{gap:8,alignItems:"center",children:[r.jsx(i.View,{width:18,height:18,borderRadius:t.cornerStyle==="sharp"?2:9999,backgroundColor:o.featured?Ke(e.onPrimary,22):e.primary,alignItems:"center",justifyContent:"center",style:{display:"flex",flexShrink:0},children:r.jsx(i.Text,{fontSize:11,color:e.onPrimary,style:{lineHeight:1,fontWeight:Xe(t,"heavy")},children:t.cornerStyle==="sharp"?"+":"✓"})}),r.jsx(i.Text,{fontSize:13,color:o.featured?e.onPrimary:e.text,style:{textTransform:t.typeCase==="uppercase"?"uppercase":"none",letterSpacing:t.typeCase==="uppercase"?"0.04em":"normal",fontStyle:t.typeStyle},children:s})]},s))}),r.jsx(i.View,{alignSelf:"stretch",paddingHorizontal:20,paddingVertical:12,borderRadius:t.pillRadius,alignItems:"center",justifyContent:"center",style:{display:"flex",cursor:"pointer",backgroundColor:o.featured?e.onPrimary:e.text},children:r.jsx(i.Text,{fontSize:14,color:o.featured?e.primary:e.canvas,style:{...Se(t),letterSpacing:t.typeCase==="uppercase"?"0.08em":"0.02em"},children:o.ctaLabel})})]})})},Cc=({palette:e,personality:o})=>{const t=pr(o),n=lt(o,e),a=o.voice.includes("athletic")||o.voice.includes("motion")?"Aero Runner GT":o.voice.includes("mission")||o.voice.includes("futurist")?"Module-04 Insulated Jacket":"Linen Throw Pillow",l=o.voice.includes("athletic")||o.voice.includes("motion")?"Court Black · Mens":o.voice.includes("mission")||o.voice.includes("futurist")?"Carbon · Standard fit":"Stonewashed · Sand";return r.jsx(i.View,{width:"min(100%, 320px)",borderRadius:o.cardRadius,overflow:"hidden",borderWidth:1,borderStyle:"solid",style:{...n,borderColor:e.border,color:e.text},children:r.jsxs(i.Vertical,{gap:t.gap,padding:t.padding,children:[r.jsx(i.View,{height:120,borderRadius:o.cardRadius,style:{background:o.accentTreatment==="gradient"?`linear-gradient(135deg, ${Ke(e.primary,20)} 0%, ${Ke(e.secondary||e.primary,20)} 100%)`:e.appearance==="dark"?"rgba(255,255,255,0.06)":"rgba(0,0,0,0.04)"}}),r.jsxs(i.Vertical,{gap:4,children:[r.jsxs(i.Horizontal,{alignItems:"center",justifyContent:"space-between",children:[r.jsx(i.Text,{fontSize:15,color:e.text,style:io(o),children:a}),r.jsx(i.View,{paddingHorizontal:10,paddingVertical:3,borderRadius:o.badgeRadius,style:{backgroundColor:e.appearance==="dark"?"rgba(255,255,255,0.08)":"rgba(0,0,0,0.06)"},children:r.jsx(i.Text,{fontSize:10,color:e.text,style:Se(o),children:"IN STOCK"})})]}),r.jsx(i.Text,{fontSize:12,color:e.muted,style:{fontStyle:o.typeStyle,textTransform:o.typeCase==="uppercase"?"uppercase":"none",letterSpacing:o.typeCase==="uppercase"?"0.04em":"normal"},children:l})]}),r.jsxs(i.Horizontal,{alignItems:"baseline",justifyContent:"space-between",children:[r.jsxs(i.Horizontal,{alignItems:"baseline",gap:6,children:[r.jsx(i.Text,{fontSize:24,color:e.text,style:io(o),children:"$42"}),r.jsx(i.Text,{fontSize:13,color:e.muted,style:{textDecoration:"line-through"},children:"$56"})]}),r.jsx(i.Text,{fontSize:12,color:e.success||e.muted,style:Se(o),children:"FREE SHIPPING"})]}),r.jsx(i.View,{alignSelf:"stretch",paddingHorizontal:20,paddingVertical:12,borderRadius:o.pillRadius,alignItems:"center",justifyContent:"center",style:{display:"flex",cursor:"pointer",background:Uo(o,e),boxShadow:Go(o,e)},children:r.jsx(i.Text,{fontSize:14,color:e.onPrimary,style:{...Se(o),letterSpacing:o.typeCase==="uppercase"?"0.08em":"0.02em"},children:"Add to cart"})})]})})},wc=({palette:e,personality:o})=>{const t=pr(o),n=lt(o,e),a=o.signatureMotif,l=o.voice.includes("athletic")?"★":o.voice.includes("mission")||o.voice.includes("futurist")?"◉":"♥",c=o.voice.includes("athletic")?"Velocity AirFlow 7":o.voice.includes("mission")||o.voice.includes("futurist")?"Sentinel Pro Headset":o.voice.includes("refined")?"Pulse Studio Monitor":"Aurora Wireless Headphones",s=o.voice.includes("athletic")?"Lightweight knit · 280g":o.voice.includes("mission")||o.voice.includes("futurist")?"Mil-spec audio · 60h endurance":"Active noise cancelling · 40h battery",d=o.voice.includes("mission")?"MISSION PICK":o.voice.includes("athletic")?"TEAM PICK":o.voice.includes("futurist")?"SIGNATURE":"BEST SELLER";return r.jsxs(i.View,{position:"relative",width:"min(100%, 320px)",children:[r.jsx(i.View,{position:"absolute",top:-10,left:16,paddingHorizontal:12,paddingVertical:6,borderRadius:o.badgeRadius,zIndex:2,style:{background:Uo(o,e),boxShadow:Go(o,e)||(e.appearance==="dark"?"0 6px 14px rgba(0,0,0,0.5)":"0 6px 14px rgba(0,0,0,0.12)")},children:r.jsxs(i.Horizontal,{gap:6,alignItems:"center",children:[r.jsx(i.Text,{fontSize:11,color:e.onPrimary,style:{lineHeight:1,fontWeight:Xe(o,"heavy")},children:a}),r.jsx(i.Text,{fontSize:10,color:e.onPrimary,style:Se(o),children:d})]})}),r.jsx(i.View,{position:"absolute",top:12,right:12,width:36,height:36,borderRadius:o.cornerStyle==="sharp"?4:9999,borderWidth:1,borderStyle:"solid",zIndex:2,alignItems:"center",justifyContent:"center",style:{display:"flex",cursor:"pointer",backgroundColor:e.appearance==="dark"?"rgba(0,0,0,0.45)":"rgba(255,255,255,0.92)",borderColor:e.border,backdropFilter:"blur(6px)"},children:r.jsx(i.Text,{fontSize:16,color:l==="♥"&&e.error||e.primary,style:{lineHeight:1},children:l})}),r.jsx(i.View,{width:"100%",borderRadius:o.cardRadius,overflow:"hidden",borderWidth:1,borderStyle:"solid",style:{...n,borderColor:e.border,color:e.text},children:r.jsxs(i.Vertical,{gap:t.gap,padding:t.padding,children:[r.jsx(i.View,{height:140,borderRadius:o.cardRadius,style:{background:o.accentTreatment==="gradient"?`linear-gradient(135deg, ${Ke(e.primary,20)} 0%, ${Ke(e.secondary||e.primary,20)} 100%)`:e.appearance==="dark"?"rgba(255,255,255,0.06)":"rgba(0,0,0,0.04)"}}),r.jsxs(i.Vertical,{gap:6,children:[r.jsxs(i.Horizontal,{gap:6,alignItems:"center",children:[r.jsx(i.Text,{fontSize:13,color:e.warning||e.primary,style:{lineHeight:1},children:"★★★★★"}),r.jsx(i.Text,{fontSize:12,color:e.muted,children:"4.9 · 1,284 reviews"})]}),r.jsx(i.Text,{fontSize:18,color:e.text,style:io(o),children:c}),r.jsx(i.Text,{fontSize:12,color:e.muted,style:{fontStyle:o.typeStyle,textTransform:o.typeCase==="uppercase"?"uppercase":"none",letterSpacing:o.typeCase==="uppercase"?"0.04em":"normal"},children:s})]}),r.jsxs(i.Horizontal,{alignItems:"baseline",justifyContent:"space-between",children:[r.jsxs(i.Horizontal,{alignItems:"baseline",gap:6,children:[r.jsx(i.Text,{fontSize:26,color:e.text,style:io(o),children:"$189"}),r.jsx(i.Text,{fontSize:13,color:e.muted,style:{textDecoration:"line-through"},children:"$249"})]}),r.jsx(i.View,{paddingHorizontal:8,paddingVertical:3,borderRadius:o.badgeRadius,style:{backgroundColor:e.appearance==="dark"?"rgba(255,255,255,0.08)":"rgba(0,0,0,0.06)"},children:r.jsx(i.Text,{fontSize:10,color:e.text,style:Se(o),children:"–24%"})})]}),r.jsxs(i.Horizontal,{gap:8,children:[r.jsx(i.View,{flex:1,paddingHorizontal:16,paddingVertical:12,borderRadius:o.pillRadius,alignItems:"center",justifyContent:"center",style:{display:"flex",cursor:"pointer",background:Uo(o,e),boxShadow:Go(o,e)},children:r.jsx(i.Text,{fontSize:13,color:e.onPrimary,style:{...Se(o),letterSpacing:o.typeCase==="uppercase"?"0.08em":"0.02em"},children:"Buy now"})}),r.jsx(i.View,{paddingHorizontal:16,paddingVertical:12,borderRadius:o.pillRadius,borderWidth:1,borderStyle:"solid",alignItems:"center",justifyContent:"center",style:{display:"flex",cursor:"pointer",borderColor:e.border},children:r.jsx(i.Text,{fontSize:13,color:e.text,style:{...Se(o),letterSpacing:o.typeCase==="uppercase"?"0.08em":"0.02em"},children:"Add to cart"})})]})]})})]})},xb=[{slug:"PRIMARY-TINT",source:"primary",intensity:"tint",heading:"Bring everyone together with systems that scale",body:"Signature primary ground for systems, FAQ, and the contact form.",cta:"Get started"},{slug:"SECONDARY-TINT",source:"secondary",intensity:"tint",heading:"A faster, more efficient way of working",body:"Secondary ground for hero moments and supporting narrative.",cta:"Explore"},{slug:"WARNING-TINT",source:"warning",intensity:"tint",heading:"Designed for the way ideas actually move",body:"Warm tint for product storytelling and brand moments.",cta:"See the story"},{slug:"SUCCESS-TINT",source:"success",intensity:"tint",heading:"Ship with confidence, every single release",body:"Cool tint for changelogs, releases, and reliability notes.",cta:"Read changelog"},{slug:"ERROR-TINT",source:"error",intensity:"tint",heading:"Built for teams who care about the details",body:"Saturated tint for community stories and testimonials.",cta:"Meet the makers"},{slug:"INK-INVERTED",source:"ink",intensity:"inverted",heading:"Go deeper. Go further. Go all-in.",body:"Inverted ground for premium tiers and developer surfaces.",cta:"Open the docs"}],Hn=(e,o)=>{const t=e.replace("#","").padEnd(6,"0").slice(0,6),n=parseInt(t.slice(0,2),16),a=parseInt(t.slice(2,4),16),l=parseInt(t.slice(4,6),16);return[n,a,l].some(Number.isNaN)?e:`rgba(${n}, ${a}, ${l}, ${o})`},jn=e=>typeof e=="string"&&/^#([0-9a-f]{3}){1,2}$/i.test(e),Pe=(e,o,t)=>jn(e)?Hn(e,o):e.startsWith("rgba")||e.startsWith("rgb")?e.replace(/rgba?\(([^)]+)\)/,(n,a)=>`rgba(${a.split(",").slice(0,3).map(c=>c.trim()).join(", ")}, ${o})`):t==="dark"?`rgba(255,255,255,${o})`:`rgba(0,0,0,${o})`,kb=({block:e,palette:o,personality:t})=>{const n=pr(t);let a,l;if(e.source==="ink")a=o.text,l=o.canvas;else{const m=o[e.source]||o.primary;e.intensity==="solid"?(a=m,l=o.onPrimary):(a=Pe(m,.32,o.appearance),l=(o.appearance==="dark",o.text))}if(t.accentTreatment==="gradient"&&e.intensity==="tint"){const m=o[e.source],f=o.secondary;jn(m)&&jn(f)&&(a=`linear-gradient(135deg, ${Hn(m,.32)} 0%, ${Hn(f,.32)} 100%)`)}if(t.accentTreatment==="stripe"&&e.intensity==="tint"){const m=Pe(o[e.source],.32,o.appearance),f=Pe(o.secondary,.18,o.appearance);a=`repeating-linear-gradient(135deg, ${m} 0 18px, ${f} 18px 36px)`}const c=Pe(l,.72,o.appearance),s=Pe(l,.55,o.appearance),d=l,g=l===o.canvas?o.text:o.canvas;return r.jsx(i.View,{width:"min(100%, 460px)",borderRadius:t.cardRadius*2,padding:n.large,style:{background:a},children:r.jsxs(i.Vertical,{gap:n.gap+6,children:[r.jsxs(i.Text,{fontSize:11,color:s,style:{...Se(t),letterSpacing:"0.12em",fontFamily:"ui-monospace, SFMono-Regular, Menlo, monospace"},children:[t.signatureMotif," ",e.slug]}),r.jsxs(i.Vertical,{gap:14,children:[r.jsx(i.Text,{fontSize:32,lineHeight:"36px",color:l,style:io(t),children:e.heading}),r.jsx(i.Text,{fontSize:16,lineHeight:"22px",color:c,style:{fontStyle:t.typeStyle},children:e.body})]}),r.jsx(i.View,{alignSelf:"flex-start",paddingHorizontal:28,paddingVertical:14,borderRadius:t.pillRadius,style:{backgroundColor:d,cursor:"pointer"},children:r.jsx(i.Text,{fontSize:15,color:g,style:{...Se(t),letterSpacing:t.typeCase==="uppercase"?"0.08em":"0.01em",textTransform:t.typeCase==="uppercase"?"uppercase":"none"},children:e.cta})})]})})},Sc=[{id:"design-tokens",badge:"NEW",badgeTone:"success",favorite:"♥",category:"Design systems",title:"Design tokens that survive a redesign",excerpt:"Why semantic naming beats raw values — and how to migrate a token set without breaking every consumer.",author:"Léa Martin",meta:"6 min read · Mar 10",imageTone:"warm"},{id:"shipping-faster",badge:"FEATURED",badgeTone:"primary",favorite:"★",category:"Engineering",title:"Shipping faster without skipping review",excerpt:"Three async patterns we use to keep PR cycle time under 24h while still catching the regressions that matter.",author:"Jordan Reyes",meta:"9 min read · Mar 04",imageTone:"cool"},{id:"a11y-audit",badge:"TRENDING",badgeTone:"warning",favorite:"⛉",category:"Accessibility",title:"The accessibility audit nobody asked for",excerpt:"A walkthrough of the 12 issues we found on our own marketing site — and the four-week fix plan that followed.",author:"Ines Okafor",meta:"12 min read · Feb 27",imageTone:"mono"}],vc=({palette:e,article:o,personality:t})=>{const n=pr(t),a=lt(t,e),l=e[o.badgeTone]||e.primary,c=e.secondary||e.primary,s=t.accentTreatment==="gradient"?`linear-gradient(135deg, ${Pe(l,.55,e.appearance)} 0%, ${Pe(c,.55,e.appearance)} 100%)`:t.accentTreatment==="stripe"?`repeating-linear-gradient(45deg, ${Pe(l,.45,e.appearance)} 0 16px, ${Pe(c,.25,e.appearance)} 16px 32px)`:t.accentTreatment==="halftone"?`radial-gradient(circle at 30% 30%, ${Pe(l,.55,e.appearance)} 0%, ${Pe(c,.35,e.appearance)} 70%)`:t.accentTreatment==="glow"?`radial-gradient(circle at 50% 60%, ${Pe(l,.45,e.appearance)} 0%, ${e.appearance==="dark"?"#050505":"#0a0a0a"} 100%)`:Pe(l,.32,e.appearance),d=t.voice.includes("mission")||t.voice.includes("futurist")?"◉":o.favorite,g=d==="♥"?e.error||e.primary:d==="★"&&e.warning||e.primary;return r.jsx(i.View,{width:"min(100%, 320px)",borderRadius:t.cardRadius,overflow:"hidden",borderWidth:1,borderStyle:"solid",style:{...a,borderColor:e.border,color:e.text},children:r.jsxs(i.Vertical,{gap:n.gap,padding:n.padding,children:[r.jsxs(i.View,{position:"relative",height:160,borderRadius:t.cardRadius,overflow:"hidden",style:{background:s},children:[r.jsx(i.View,{position:"absolute",top:12,left:12,paddingHorizontal:10,paddingVertical:4,borderRadius:t.badgeRadius,style:{background:Uo(t,{...e,primary:l}),boxShadow:Go(t,e)},children:r.jsxs(i.Horizontal,{gap:4,alignItems:"center",children:[r.jsx(i.Text,{fontSize:10,color:e.onPrimary,style:{lineHeight:1,fontWeight:Xe(t,"heavy")},children:t.signatureMotif}),r.jsx(i.Text,{fontSize:10,color:e.onPrimary,style:Se(t),children:o.badge})]})}),r.jsx(i.View,{position:"absolute",top:10,right:10,width:36,height:36,borderRadius:t.cornerStyle==="sharp"?4:9999,borderWidth:1,borderStyle:"solid",alignItems:"center",justifyContent:"center",style:{display:"flex",cursor:"pointer",backgroundColor:e.appearance==="dark"?"rgba(0,0,0,0.45)":"rgba(255,255,255,0.92)",borderColor:e.border,backdropFilter:"blur(6px)"},children:r.jsx(i.Text,{fontSize:16,color:g,style:{lineHeight:1},children:d})})]}),r.jsxs(i.Vertical,{gap:8,children:[r.jsx(i.Text,{fontSize:11,color:e.muted,style:Se(t),children:o.category}),r.jsx(i.Text,{fontSize:18,lineHeight:"24px",color:e.text,style:io(t),children:o.title}),r.jsx(i.Text,{fontSize:13,lineHeight:"18px",color:e.muted,style:{fontStyle:t.typeStyle},children:o.excerpt})]}),r.jsxs(i.Horizontal,{gap:10,alignItems:"center",children:[r.jsx(i.View,{width:28,height:28,borderRadius:t.cornerStyle==="sharp"?4:9999,style:{backgroundColor:e.appearance==="dark"?"rgba(255,255,255,0.12)":"rgba(0,0,0,0.08)"}}),r.jsxs(i.Vertical,{gap:0,children:[r.jsx(i.Text,{fontSize:12,color:e.text,style:{fontWeight:Xe(t,"normal"),fontStyle:t.typeStyle},children:o.author}),r.jsx(i.Text,{fontSize:11,color:e.muted,children:o.meta})]})]})]})})},Tc=({palette:e,personality:o,config:t})=>{var f,p,u,y;const n=o.signatureMotif,a=e.primary,l=Uo(o,e),c=Go(o,e),s=((p=(f=t.tokens)==null?void 0:f.typography)==null?void 0:p.fontFamily)||((y=(u=t.tokens)==null?void 0:u.rawCssVars)==null?void 0:y.display)||"inherit",d=o.voice.includes("mission")?"MAKING LIFE MULTIPLANETARY":o.voice.includes("athletic")?"JUST DO IT":o.voice.includes("refined")?"A new standard in payments":o.voice.includes("speed")?"Built for the makers":o.voice.includes("rhythmic")?"Music for everyone":o.voice.includes("thoughtful")?"The connected workspace":o.voice.includes("warm")?"Belong anywhere":o.voice.includes("minimal")?"Think different":o.voice.includes("commerce")?"The platform commerce is built on":o.voice.includes("bold-fintech")?"Money for the next generation":o.voice.includes("trustworthy")?"The future of money":o.voice.includes("playful")?"Nothing great is made alone":o.voice.includes("motion")?"Get there":o.voice.includes("deploy")?"Develop. Preview. Ship.":o.voice.includes("futurist")?"Accelerating the world to sustainable energy":`${t.metadata.label}`,g=o.typeCase==="uppercase"?"EXPLORE":"Get started",m=o.typeCase==="uppercase"?"LEARN MORE":"Learn more";return r.jsxs(i.View,{width:"100%",borderRadius:o.cardRadius*2,padding:o.density==="spacious"?56:o.density==="tight"?28:40,style:{backgroundColor:e.canvas,color:e.text,fontFamily:s,position:"relative",overflow:"hidden"},children:[o.accentTreatment==="glow"&&r.jsx(i.View,{position:"absolute",top:-120,right:-80,width:360,height:360,borderRadius:9999,style:{background:`radial-gradient(circle, ${a}40 0%, transparent 70%)`,pointerEvents:"none"}}),o.accentTreatment==="halftone"&&r.jsx(i.View,{position:"absolute",top:0,right:0,width:300,height:300,style:{background:`radial-gradient(circle at 70% 30%, ${a}30 0%, transparent 60%)`,pointerEvents:"none"}}),r.jsxs(i.Vertical,{gap:24,style:{position:"relative"},children:[r.jsxs(i.Horizontal,{gap:10,alignItems:"center",children:[r.jsx(i.View,{width:32,height:32,borderRadius:o.cornerStyle==="pill"?9999:o.cornerStyle==="sharp"?0:8,alignItems:"center",justifyContent:"center",style:{display:"flex",background:l,boxShadow:c},children:r.jsx(i.Text,{fontSize:16,color:e.onPrimary,style:{lineHeight:1,fontWeight:Xe(o,"heavy")},children:n})}),r.jsx(i.Text,{fontSize:13,color:e.muted,style:{...Se(o),letterSpacing:o.typeCase==="uppercase"?"0.18em":"0.06em"},children:t.metadata.label})]}),r.jsx(i.Text,{fontSize:o.density==="spacious"?56:o.density==="tight"?40:48,lineHeight:o.density==="spacious"?"60px":o.density==="tight"?"44px":"52px",color:e.text,style:{...io(o),letterSpacing:o.typeCase==="uppercase"?"0.06em":o.letterSpacing,maxWidth:580,fontFamily:s},children:d}),r.jsxs(i.Horizontal,{gap:12,flexWrap:"wrap",alignItems:"center",children:[r.jsx(i.View,{paddingHorizontal:o.density==="spacious"?32:24,paddingVertical:o.density==="spacious"?16:14,borderRadius:o.pillRadius,style:{display:"flex",cursor:"pointer",background:l,boxShadow:c},children:r.jsx(i.Text,{fontSize:15,color:e.onPrimary,style:{...Se(o),letterSpacing:o.typeCase==="uppercase"?"0.14em":"0.02em",fontWeight:Xe(o,"heavy"),fontFamily:s},children:g})}),r.jsx(i.View,{paddingHorizontal:24,paddingVertical:14,borderRadius:o.pillRadius,borderWidth:1,borderStyle:"solid",style:{display:"flex",cursor:"pointer",borderColor:e.text},children:r.jsx(i.Text,{fontSize:15,color:e.text,style:{...Se(o),letterSpacing:o.typeCase==="uppercase"?"0.14em":"0.02em",fontWeight:Xe(o,"heavy"),fontFamily:s},children:m})})]}),r.jsx(i.Horizontal,{gap:20,flexWrap:"wrap",alignItems:"center",marginTop:8,children:[{label:"Primary",value:e.primary},{label:"Surface",value:e.surface},{label:"Text",value:e.text},{label:"Success",value:e.success}].map(k=>r.jsxs(i.Horizontal,{gap:8,alignItems:"center",children:[r.jsx(i.View,{width:20,height:20,borderRadius:o.cornerStyle==="sharp"?0:o.cornerStyle==="pill"?9999:4,borderWidth:1,borderStyle:"solid",style:{backgroundColor:k.value,borderColor:e.border}}),r.jsxs(i.Vertical,{gap:0,children:[r.jsx(i.Text,{fontSize:11,color:e.muted,style:Se(o),children:k.label}),r.jsx(i.Text,{fontSize:11,color:e.text,style:{fontFamily:"ui-monospace, SFMono-Regular, Menlo, monospace"},children:ib(k.value)})]})]},k.label))})]})]})},Ic=({palette:e,config:o})=>r.jsxs(i.Vertical,{gap:20,padding:36,alignItems:"center",borderRadius:16,style:{backgroundColor:e.surface},children:[r.jsx(Fe,{variant:"outline",content:"New release"}),r.jsxs(i.Vertical,{gap:8,alignItems:"center",children:[r.jsxs(i.Text,{fontSize:36,lineHeight:"40px",fontWeight:"800",textAlign:"center",color:e.text,children:[o.metadata.label," Pro"]}),r.jsx(i.Text,{fontSize:18,lineHeight:"24px",color:e.muted,textAlign:"center",children:"Pro. Beyond."})]}),r.jsxs(i.Horizontal,{gap:12,flexWrap:"wrap",justifyContent:"center",children:[r.jsx(de,{shape:"pill",size:"md",children:"Learn more"}),r.jsx(de,{shape:"pill",size:"md",variant:"outline",children:"Buy"})]}),r.jsx(i.View,{width:220,height:140,borderRadius:20,backgroundColor:e.appearance==="dark"?e.canvas:e.text,opacity:.85})]}),Fc=({palette:e,config:o})=>r.jsxs(we,{width:"min(100%, 320px)",views:{container:{backgroundColor:e.surface,color:e.text,borderWidth:1,borderStyle:"solid",borderColor:e.border},header:{color:e.text,borderColor:e.border},content:{color:e.text},footer:{borderColor:e.border}},children:[r.jsx(we.Header,{children:r.jsxs(i.Horizontal,{alignItems:"center",justifyContent:"space-between",gap:12,flexWrap:"wrap",children:[r.jsx(i.Text,{color:e.text,fontWeight:"700",children:o.metadata.id==="spacex"?"Falcon 9":"Product Card"}),r.jsx(Fe,{variant:"filled",content:"New"})]})}),r.jsx(we.Content,{children:r.jsx(i.Text,{fontSize:14,lineHeight:"20px",color:e.text,children:o.metadata.id==="spacex"?"The world's first orbital-class reusable rocket. Designed for reliable and safe transport of people and payloads.":"Card surfaces, borders, typography, and shadows come from the active JSON config."})}),r.jsx(we.Footer,{children:r.jsx(de,{size:"sm",children:o.metadata.id==="spacex"?"Explore":"Review"})})]}),zc=({palette:e})=>r.jsxs(i.Vertical,{gap:14,children:[r.jsxs(i.Horizontal,{gap:12,flexWrap:"wrap",alignItems:"center",children:[r.jsx(de,{color:"theme-primary",children:"Primary"}),r.jsx(de,{color:"theme-secondary",children:"Secondary"}),r.jsx(de,{color:"color-black",children:"Black"}),r.jsx(de,{color:"color-white",textColor:"color-black",children:"White"})]}),r.jsxs(i.Horizontal,{gap:12,flexWrap:"wrap",alignItems:"center",children:[r.jsx(de,{variant:"outline",color:"theme-primary",children:"Primary"}),r.jsx(de,{variant:"outline",color:"theme-secondary",children:"Secondary"}),r.jsx(de,{variant:"outline",color:"color-black",children:"Black"}),r.jsx(de,{variant:"outline",color:"color-white",children:"White"})]}),r.jsxs(i.Horizontal,{gap:12,flexWrap:"wrap",alignItems:"center",children:[r.jsx(de,{variant:"ghost",views:{container:{color:e.text}},children:"Ghost"}),r.jsx(de,{variant:"link",views:{container:{color:e.primary}},children:"Link"}),r.jsx(de,{isDisabled:!0,children:"Disabled"}),r.jsx(de,{isLoading:!0,children:"Loading"})]})]}),Mc=({palette:e,config:o})=>r.jsx(i.View,{style:{color:e.text},children:r.jsxs(i.Vertical,{gap:14,children:[r.jsxs(i.Horizontal,{gap:10,flexWrap:"wrap",alignItems:"center",children:[r.jsx(Fe,{content:"Badge"}),r.jsx(Fe,{variant:"outline",content:"Outline"}),r.jsx(Fe,{content:"Primary",views:{container:{backgroundColor:e.primary,color:e.onPrimary,borderColor:e.primary}}}),r.jsx(Fe,{content:"Success",views:{container:{backgroundColor:e.success,color:e.onPrimary,borderColor:e.success}}}),r.jsx(Fe,{content:"Warning",views:{container:{backgroundColor:e.warning,color:e.onPrimary,borderColor:e.warning}}}),r.jsx(Fe,{content:"Error",views:{container:{backgroundColor:e.error,color:e.onPrimary,borderColor:e.error}}})]}),r.jsxs(i.Horizontal,{gap:16,flexWrap:"wrap",alignItems:"center",children:[r.jsx(Jr,{status:"success",label:"Operational"}),r.jsx(Jr,{status:"warning",label:"Degraded"}),r.jsx(Jr,{status:"error",label:"Outage"}),r.jsx(eo,{size:"sm",loaderColor:o.theme.primary})]}),r.jsx(St,{title:"Heads up",description:"Brand styling cascades through every alert.",variant:"info",views:{container:{backgroundColor:e.surface,borderColor:e.border,color:e.text},title:{color:e.text},description:{color:e.muted}}}),r.jsx(Mi,{value:64,height:10,showLabel:!0,color:e.primary,backgroundColor:e.border,views:{container:{backgroundColor:e.border},bar:{backgroundColor:e.primary}}})]})}),Wc=({palette:e,config:o,mode:t})=>{const n={container:{backgroundColor:e.surface,borderColor:e.border,color:e.text},field:{color:e.text}};return r.jsx(i.View,{style:{color:e.text},children:r.jsxs(i.Vertical,{gap:16,children:[r.jsxs(i.View,{display:"grid",gridTemplateColumns:"repeat(auto-fit, minmax(220px, 1fr))",gap:16,alignItems:"start",children:[r.jsx(je,{size:"md",label:"Name",placeholder:"Ada Lovelace",views:n}),r.jsx(er,{id:`forms-${o.metadata.id}-${t}`,size:"md",label:"Plan",placeholder:"Select plan",options:[{label:"Starter",value:"starter"},{label:"Team",value:"team"},{label:"Enterprise",value:"enterprise"}],views:{container:n.container,field:{fontSize:14,lineHeight:"20px",color:e.text},text:{fontSize:14,lineHeight:"20px",color:e.text}}}),r.jsx($t,{label:"Notes",placeholder:"Add implementation notes",views:n})]}),r.jsxs(i.Horizontal,{gap:16,flexWrap:"wrap",alignItems:"center",children:[r.jsx(_t,{label:"Email updates",defaultIsSelected:!0}),r.jsx(Nt,{label:"Standard",value:"standard",defaultIsSelected:!0}),r.jsx(Dt,{label:"Enabled",isChecked:!0})]})]})})},Cb=({config:e})=>{const[o,t]=h.useState(1),n=ab(e),a=lb(e),l=sb(e);return r.jsxs(i.Vertical,{gap:24,children:[r.jsx(ue,{title:"Brand Snapshot (Light & Dark)",config:e,children:r.jsxs(i.Vertical,{gap:20,children:[r.jsx(me,{config:e,palette:n,label:"On light surface",children:r.jsx(Tc,{palette:n,personality:l,config:e})}),r.jsx(me,{config:e,palette:a,label:"On dark surface",children:r.jsx(Tc,{palette:a,personality:l,config:e})})]})}),r.jsx(ue,{title:"Buttons — Light & Dark",config:e,children:r.jsxs(i.Horizontal,{gap:20,flexWrap:"wrap",alignItems:"flex-start",children:[r.jsx(me,{config:e,palette:n,label:"On light surface",children:r.jsx(zc,{palette:n})}),r.jsx(me,{config:e,palette:a,label:"On dark surface",children:r.jsx(zc,{palette:a})})]})}),r.jsx(ue,{title:"Status & Feedback — Light & Dark",config:e,children:r.jsxs(i.Horizontal,{gap:20,flexWrap:"wrap",alignItems:"flex-start",children:[r.jsx(me,{config:e,palette:n,label:"On light surface",children:r.jsx(Mc,{palette:n,config:e})}),r.jsx(me,{config:e,palette:a,label:"On dark surface",children:r.jsx(Mc,{palette:a,config:e})})]})}),r.jsx(ue,{title:"Forms — Light & Dark",config:e,children:r.jsxs(i.Horizontal,{gap:20,flexWrap:"wrap",alignItems:"flex-start",children:[r.jsx(me,{config:e,palette:n,label:"On light surface",children:r.jsx(Wc,{palette:n,config:e,mode:"light"})}),r.jsx(me,{config:e,palette:a,label:"On dark surface",children:r.jsx(Wc,{palette:a,config:e,mode:"dark"})})]})}),r.jsx(ue,{title:"Forms (legacy preview)",config:e,children:r.jsxs(i.View,{display:"grid",gridTemplateColumns:"repeat(auto-fit, minmax(220px, 1fr))",alignItems:"start",gap:16,children:[r.jsx(je,{size:"md",label:"Name",placeholder:"Ada Lovelace"}),r.jsx(er,{id:`design-system-select-${e.metadata.id}`,size:"md",label:"Plan",placeholder:"Select plan",options:[{label:"Starter",value:"starter"},{label:"Team",value:"team"},{label:"Enterprise",value:"enterprise"}],views:{field:{fontSize:14,lineHeight:"20px"},text:{fontSize:14,lineHeight:"20px"}}}),r.jsx($t,{label:"Notes",placeholder:"Add implementation notes"}),r.jsxs(i.Vertical,{gap:12,children:[r.jsx(_t,{label:"Email updates",defaultIsSelected:!0}),r.jsx(Nt,{label:"Standard",value:"standard",defaultIsSelected:!0}),r.jsx(Dt,{label:"Enabled",isChecked:!0}),r.jsx(Bl,{defaultValue:58,showValue:!0}),r.jsx(ml,{length:6,label:"Verification Code"})]})]})}),r.jsx(ue,{title:"Form States",config:e,children:r.jsxs(i.View,{display:"grid",gridTemplateColumns:"repeat(auto-fit, minmax(220px, 1fr))",gap:16,alignItems:"start",children:[r.jsx(je,{size:"md",label:"Default",placeholder:"Type here",helperText:"Resting state"}),r.jsx(je,{size:"md",label:"Filled",defaultValue:"Ada Lovelace",helperText:"Has value"}),r.jsx(je,{size:"md",label:"With helper",placeholder:"user@example.com",helperText:"We'll never share your email"}),r.jsx(je,{size:"md",label:"Error",defaultValue:"invalid@",error:"Please enter a valid email"}),r.jsx(je,{size:"md",label:"Disabled",isDisabled:!0,defaultValue:"Cannot edit",helperText:"Field locked"}),r.jsx(je,{size:"md",label:"Read only",defaultValue:"Read-only value",isReadOnly:!0,helperText:"View only"}),r.jsx(er,{id:`design-system-select-error-${e.metadata.id}`,size:"md",label:"Select error",placeholder:"Pick one",error:!0,helperText:"Selection required",options:[{label:"Option A",value:"a"},{label:"Option B",value:"b"}],views:{field:{fontSize:14,lineHeight:"20px"},text:{fontSize:14,lineHeight:"20px"}}}),r.jsx(er,{id:`design-system-select-disabled-${e.metadata.id}`,size:"md",label:"Select disabled",placeholder:"Disabled",isDisabled:!0,options:[{label:"Option A",value:"a"},{label:"Option B",value:"b"}],views:{field:{fontSize:14,lineHeight:"20px"},text:{fontSize:14,lineHeight:"20px"}}})]})}),r.jsx(ue,{title:"Elevation & Depth",config:e,children:r.jsx(i.View,{display:"grid",gridTemplateColumns:"repeat(auto-fit, minmax(200px, 1fr))",gap:20,children:hb(e).map(c=>r.jsxs(i.Vertical,{gap:12,children:[r.jsx(i.View,{height:120,borderRadius:12,backgroundColor:e.theme.canvas,style:{boxShadow:c.shadow}}),r.jsxs(i.Vertical,{gap:4,children:[r.jsxs(i.Horizontal,{gap:8,alignItems:"baseline",flexWrap:"wrap",children:[r.jsx(i.Text,{fontSize:12,fontWeight:"700",children:c.name}),r.jsx(i.Text,{fontSize:11,fontWeight:"600",color:e.theme.primary,children:c.label})]}),r.jsx(i.Text,{fontSize:11,color:e.theme.muted,children:c.description}),r.jsx(i.Text,{fontSize:10,color:e.theme.muted,style:{wordBreak:"break-word",opacity:.8},children:c.shadow})]})]},c.name))})}),r.jsx(ue,{title:"Color Blocks",config:e,children:r.jsx(i.View,{display:"grid",gridTemplateColumns:"repeat(auto-fit, minmax(160px, 1fr))",gap:12,children:[["primary","Primary",e.theme.onPrimary],["secondary","Secondary",e.theme.onPrimary],["success","Success","#ffffff"],["warning","Warning","#ffffff"],["error","Error","#ffffff"],["canvas","Canvas",e.theme.text],["surface","Surface",e.theme.text],["text","Text",e.theme.canvas],["muted","Muted",e.theme.canvas],["border","Border",e.theme.text],["onPrimary","On primary",e.theme.text]].map(([c,s,d])=>{const g=e.theme[c];return r.jsxs(i.Vertical,{gap:0,borderRadius:12,overflow:"hidden",borderWidth:1,borderStyle:"solid",borderColor:e.theme.border,children:[r.jsx(i.View,{height:88,backgroundColor:g}),r.jsxs(i.Vertical,{gap:4,padding:12,backgroundColor:e.theme.surface,children:[r.jsx(i.Text,{fontSize:13,fontWeight:"700",children:s}),r.jsxs(i.Text,{fontSize:11,color:e.theme.muted,children:["theme.",c]}),r.jsx(i.Text,{fontSize:11,color:e.theme.muted,children:g})]})]},c)})})}),r.jsx(ue,{title:"Pricing — Booking (Light & Dark)",config:e,children:r.jsxs(i.Horizontal,{gap:20,flexWrap:"wrap",alignItems:"flex-start",children:[r.jsx(me,{config:e,palette:n,label:"On light surface",children:r.jsx(bc,{palette:n})}),r.jsx(me,{config:e,palette:a,label:"On dark surface",children:r.jsx(bc,{palette:a})})]})}),r.jsx(ue,{title:"Pricing — SaaS Tiers (Light & Dark)",config:e,children:r.jsxs(i.Vertical,{gap:20,children:[r.jsx(me,{config:e,palette:n,label:"On light surface",children:r.jsx(i.Horizontal,{gap:16,flexWrap:"wrap",alignItems:"stretch",children:xc.map(c=>r.jsx(kc,{palette:n,tier:c,personality:l},c.name))})}),r.jsx(me,{config:e,palette:a,label:"On dark surface",children:r.jsx(i.Horizontal,{gap:16,flexWrap:"wrap",alignItems:"stretch",children:xc.map(c=>r.jsx(kc,{palette:a,tier:c,personality:l},c.name))})})]})}),r.jsx(ue,{title:"Pricing — Product (Light & Dark)",config:e,children:r.jsxs(i.Horizontal,{gap:20,flexWrap:"wrap",alignItems:"flex-start",children:[r.jsx(me,{config:e,palette:n,label:"On light surface",children:r.jsx(Cc,{palette:n,personality:l})}),r.jsx(me,{config:e,palette:a,label:"On dark surface",children:r.jsx(Cc,{palette:a,personality:l})})]})}),r.jsx(ue,{title:"Pricing — Featured w/ Badge & Favorite (Light & Dark)",config:e,children:r.jsxs(i.Horizontal,{gap:20,flexWrap:"wrap",alignItems:"flex-start",children:[r.jsx(me,{config:e,palette:n,label:"On light surface",children:r.jsx(wc,{palette:n,personality:l})}),r.jsx(me,{config:e,palette:a,label:"On dark surface",children:r.jsx(wc,{palette:a,personality:l})})]})}),r.jsx(ue,{title:"Content — Color Block Cards",config:e,children:r.jsx(i.Horizontal,{gap:20,flexWrap:"wrap",alignItems:"flex-start",children:xb.map(c=>r.jsx(kb,{block:c,palette:n,personality:l},c.slug))})}),r.jsx(ue,{title:"Content — Article Cards w/ Badge & Favorite (Light & Dark)",config:e,children:r.jsxs(i.Vertical,{gap:20,children:[r.jsx(me,{config:e,palette:n,label:"On light surface",children:r.jsx(i.Horizontal,{gap:16,flexWrap:"wrap",alignItems:"stretch",children:Sc.map(c=>r.jsx(vc,{palette:n,article:c,personality:l},c.id))})}),r.jsx(me,{config:e,palette:a,label:"On dark surface",children:r.jsx(i.Horizontal,{gap:16,flexWrap:"wrap",alignItems:"stretch",children:Sc.map(c=>r.jsx(vc,{palette:a,article:c,personality:l},c.id))})})]})}),r.jsx(ue,{title:"CTA Card — Light & Dark",config:e,children:r.jsxs(i.Horizontal,{gap:20,flexWrap:"wrap",alignItems:"flex-start",children:[r.jsx(me,{config:e,palette:n,label:"On light surface",children:r.jsx(Ic,{palette:n,config:e})}),r.jsx(me,{config:e,palette:a,label:"On dark surface",children:r.jsx(Ic,{palette:a,config:e})})]})}),r.jsx(ue,{title:"Product Card — Light & Dark",config:e,children:r.jsxs(i.Horizontal,{gap:20,flexWrap:"wrap",alignItems:"flex-start",children:[r.jsx(me,{config:e,palette:n,label:"On light surface",children:r.jsx(Fc,{palette:n,config:e})}),r.jsx(me,{config:e,palette:a,label:"On dark surface",children:r.jsx(Fc,{palette:a,config:e})})]})}),r.jsx(ue,{title:"Content & Layout",config:e,children:r.jsxs(i.Vertical,{gap:24,children:[r.jsxs(i.Horizontal,{gap:16,flexWrap:"wrap",alignItems:"stretch",children:[r.jsxs(we,{width:"min(100%, 320px)",children:[r.jsx(we.Header,{children:r.jsxs(i.Horizontal,{alignItems:"center",justifyContent:"space-between",gap:12,flexWrap:"wrap",children:[r.jsx(i.Text,{fontWeight:"700",children:e.metadata.id==="spacex"?"Falcon 9":"Product Card"}),r.jsx(Fe,{variant:"filled",content:"New"})]})}),r.jsx(we.Content,{children:r.jsx(i.Text,{fontSize:14,lineHeight:"20px",children:e.metadata.id==="spacex"?"The world's first orbital-class reusable rocket. Designed for reliable and safe transport of people and payloads.":"Card surfaces, borders, typography, and shadows come from the active JSON config."})}),r.jsx(we.Footer,{children:r.jsx(de,{size:"sm",children:e.metadata.id==="spacex"?"Explore":"Review"})})]}),r.jsxs(we,{width:"min(100%, 320px)",children:[r.jsx(we.Header,{children:r.jsxs(i.Horizontal,{gap:12,alignItems:"center",justifyContent:"space-between",flexWrap:"wrap",children:[r.jsxs(i.Horizontal,{gap:12,alignItems:"center",children:[r.jsx(na,{fallback:e.metadata.label.slice(0,2)}),r.jsxs(i.Vertical,{gap:2,children:[r.jsx(i.Text,{fontWeight:"700",children:e.metadata.id==="spacex"?"Starship":e.metadata.label}),r.jsx(i.Text,{fontSize:12,color:e.theme.muted,children:e.metadata.id==="spacex"?"Multiplanetary mission":"Config-driven preview"})]})]}),r.jsx(Fe,{variant:"outline",content:"Active"})]})}),r.jsx(we.Content,{children:e.metadata.id==="spacex"?r.jsx(i.Text,{fontSize:14,lineHeight:"20px",children:"The most powerful launch vehicle ever developed. Designed to carry crew and cargo to Mars and beyond."}):r.jsx(St,{variant:"info",title:"Config active",description:"This alert is rendered by the shared component."})})]})]}),r.jsx(yb,{config:e}),r.jsx(Rn,{ratio:16/9,borderRadius:12,overflow:"hidden",children:r.jsx(i.View,{width:"100%",height:"100%",backgroundColor:e.theme.primary,children:r.jsxs(i.Vertical,{height:"100%",alignItems:"center",justifyContent:"center",gap:8,children:[r.jsx(i.Text,{fontWeight:"700",color:e.theme.onPrimary,children:"16:9 Aspect Ratio"}),r.jsx(Fe,{content:"Config primary color"})]})})}),r.jsxs($e,{children:[r.jsx($e.Content,{children:[1,2,3].map(c=>r.jsx($e.Item,{children:r.jsx(i.View,{height:200,borderRadius:12,alignItems:"center",justifyContent:"center",backgroundColor:e.theme.surface,borderColor:e.theme.border,borderWidth:1,borderStyle:"solid",children:r.jsxs(i.Text,{fontSize:24,fontWeight:"700",children:["Slide ",c]})})},c))}),r.jsxs(i.Horizontal,{gap:12,marginTop:12,justifyContent:"center",children:[r.jsx($e.Previous,{}),r.jsx($e.Next,{})]})]})]})}),r.jsx(ue,{title:"Navigation & Interactive",config:e,children:r.jsxs(i.Vertical,{gap:18,children:[r.jsxs(i.Vertical,{gap:20,children:[r.jsxs(i.Vertical,{gap:8,children:[r.jsx(i.Text,{fontSize:12,fontWeight:"700",color:e.theme.muted,children:"With icons"}),r.jsx(Do,{tabs:fb,defaultValue:"homes",views:{tab:{borderRadius:ur(e,"tabs")},activeTab:{borderRadius:ur(e,"tabs")}}})]}),r.jsxs(i.Vertical,{gap:8,children:[r.jsx(i.Text,{fontSize:12,fontWeight:"700",color:e.theme.muted,children:"Without icons"}),r.jsx(Do,{defaultValue:"overview",views:{tab:{borderRadius:ur(e,"tabs")},activeTab:{borderRadius:ur(e,"tabs")}},tabs:[{title:"Overview",value:"overview",content:r.jsx(i.Text,{fontSize:14,lineHeight:"20px",children:"Tokens and components share the active config."})},{title:"Usage",value:"usage",content:r.jsx(i.Text,{fontSize:14,lineHeight:"20px",children:"Explicit props still override the config defaults."})},{title:"Audit",value:"audit",content:r.jsx(i.Text,{fontSize:14,lineHeight:"20px",children:"Plain text tabs without icons."})}]})]})]}),r.jsx(bo,{items:pb,orientation:"horizontal",defaultActiveItemId:"components"}),(()=>{const c=ur(e,"accordion"),s={borderWidth:0,borderTopWidth:0,borderBottomWidth:0,borderLeftWidth:0,borderRightWidth:0,marginBottom:0,borderRadius:0},d={...s,borderTopWidth:1,borderTopStyle:"solid",borderTopColor:e.theme.border};return r.jsxs(De,{defaultValue:"tokens",collapsible:!0,shape:"rounded",views:{container:{borderRadius:c,overflow:"hidden",borderWidth:1,borderStyle:"solid",borderColor:e.theme.border}},children:[r.jsxs(De.Item,{value:"tokens",...s,views:{item:s,trigger:{borderRadius:0}},children:[r.jsx(De.Trigger,{children:"Token extraction"}),r.jsx(De.Content,{children:r.jsxs(i.Text,{color:e.theme.muted,children:[Object.keys(e.tokens.rawCssVars).length," raw CSS variables were extracted from ",e.metadata.sourcePath,"."]})})]}),r.jsxs(De.Item,{value:"overrides",...d,views:{item:d,trigger:{borderRadius:0}},children:[r.jsx(De.Trigger,{children:"Override behavior"}),r.jsx(De.Content,{children:r.jsx(i.Text,{color:e.theme.muted,children:"Props passed directly to components override the design-system defaults."})})]})]})})(),r.jsx(Xr,{label:"advanced tools"}),r.jsxs(i.Horizontal,{gap:16,flexWrap:"wrap",alignItems:"center",children:[r.jsx(Xt,{color:e.theme.primary,children:"Toggle Button"}),r.jsx(si,{color:e.theme.primary,items:[{id:"left",value:"Left"},{id:"center",value:"Center"},{id:"right",value:"Right"}]}),r.jsx(et,{content:"Tooltip message",children:r.jsx(de,{variant:"outline",children:"Hover for Tooltip"})}),r.jsxs(Me,{children:[r.jsx(Me.Trigger,{children:r.jsx(de,{variant:"ghost",children:"Hover Card"})}),r.jsx(Me.Content,{children:r.jsxs(i.Vertical,{gap:4,padding:12,children:[r.jsx(i.Text,{fontWeight:"700",children:"Detailed Info"}),r.jsx(i.Text,{fontSize:12,opacity:.8,children:"Hover cards provide more context."})]})})]}),r.jsx(ui,{value:e.theme.primary}),r.jsx(ji,{shareData:{url:"https://example.com",title:"Example"}}),r.jsx(Ft,{to:"#",children:"Inline Link component"})]}),r.jsx(i.Horizontal,{gap:16,flexWrap:"wrap",alignItems:"center",children:r.jsx(zi,{currentPage:o,totalPages:10,onPageChange:t})})]})})]})},wb=({config:e})=>{var o;return r.jsxs(ht,{config:e,children:[r.jsx(ob,{children:(o=e.metadata.googleFontLinks)==null?void 0:o.map(t=>r.jsx("link",{rel:"stylesheet",href:t},t))}),r.jsx(i.View,{minHeight:"100vh",padding:28,fontFamily:e.tokens.typography.fontFamily,backgroundColor:e.theme.canvas,color:e.theme.text,style:{textTransform:e.metadata.id==="spacex"?"uppercase":"none"},children:r.jsxs(i.Vertical,{gap:28,children:[r.jsxs(i.Vertical,{gap:12,maxWidth:900,children:[r.jsxs(i.Text,{as:"h1",fontSize:44,lineHeight:"48px",fontWeight:"800",fontFamily:e.tokens.typography.fontFamily,children:[e.metadata.label," Design System"]}),r.jsxs(i.Text,{fontSize:16,lineHeight:"24px",color:e.theme.muted,fontFamily:e.tokens.typography.fontFamily,children:["Live App Studio components rendered with the"," ",e.metadata.label," config defaults."]})]}),r.jsxs(i.Vertical,{gap:28,children:[r.jsx(bb,{config:e}),r.jsx(Cb,{config:e})]})]})})]})};F.Accordion=De,F.ActionSheet=md,F.Alert=St,F.ArrowIcon=ad,F.AspectRatio=Rn,F.AttachmentGroup=gi,F.AttachmentIcon=Ko,F.AttachmentPreview=lm,F.AudioIcon=Fo,F.AudioInput=Md,F.AudioWaveform=vt,F.Avatar=na,F.BackIcon=Ms,F.Background=rc,F.Badge=Fe,F.BatteryIcon=fs,F.BluetoothIcon=od,F.BoldArrowIcon=nd,F.BookmarkIcon=ms,F.Button=de,F.CHART_COLORS=Le,F.CalendarIcon=Us,F.CameraIcon=ed,F.Card=we,F.Carousel=$e,F.Chart=H0,F.ChartIcon=Is,F.ChatInput=Qi,F.ChatWidget=tc,F.ChatWidgetComponent=bn,F.ChatWidgetWidget=vy,F.CheckIcon=zs,F.Checkbox=_t,F.ChevronIcon=he,F.ClockIcon=Gs,F.CloseEyeIcon=xt,F.CloseIcon=He,F.CloudIcon=ps,F.ColorInput=Pg,F.ColorPicker=ui,F.ComboBox=rf,F.Command=Bo,F.ContextMenu=Wo,F.CookieConsent=A0,F.CopyIcon=us,F.CountryPicker=Lg,F.CreditCardIcon=Bs,F.CropIcon=cd,F.DEFAULT_CHART_COLORS=ba,F.DatePicker=Kh,F.DeleteIcon=ys,F.DesignSystem=wb,F.DesignSystemProvider=ht,F.Divider=Op,F.DocumentIcon=Ts,F.DownloadIcon=ks,F.DragAndDrop=np,F.DragAndDropComponent=di,F.DragHandleIcon=Zc,F.DragHandleLinesIcon=dd,F.Drawer=yo,F.DropZone=cp,F.DropdownMenu=ir,F.DustBinIcon=kr,F.EditIcon=bs,F.EmojiPicker=wp,F.ErrorIcon=Sr,F.ExternalLinkIcon=Yn,F.FacebookIcon=ls,F.FileIcon=go,F.FileImage=O0,F.FileSVG=B0,F.FilterIcon=qs,F.FolderIcon=Qc,F.FormikChatInput=If,F.FormikCheckbox=ff,F.FormikColorInput=Ff,F.FormikComboBox=Ef,F.FormikCountryPicker=Mf,F.FormikDatePicker=zf,F.FormikEmojiPicker=am,F.FormikForm=gf,F.FormikIconPicker=Rf,F.FormikOTPInput=Nf,F.FormikPassword=Af,F.FormikRadio=mf,F.FormikSelect=Wf,F.FormikSelector=Uf,F.FormikSlider=Bf,F.FormikSwitch=Hf,F.FormikTagInput=jf,F.FormikTextArea=Pf,F.FormikTextField=Vf,F.FormikToggle=Kf,F.FormikToggleGroup=Xf,F.FormikUploader=Hl,F.GiftIcon=Vs,F.Gradient=xi,F.HeartIcon=ds,F.HelpIcon=Jc,F.HomeIcon=xs,F.HoverCard=Me,F.Icon=xr,F.IconPicker=Sp,F.ImageIcon=es,F.InfoIcon=Re,F.InstagramIcon=ns,F.KeyboardAvoidingView=Ul,F.LayoutIcon=Ls,F.LikeIcon=Rs,F.Link=Ft,F.LinkIcon=$s,F.LinkedinIcon=is,F.Loader=eo,F.LoadingSpinnerIcon=bt,F.LockIcon=ws,F.LogoutIcon=Es,F.MagicWandIcon=Qs,F.MapPinIcon=Ys,F.MediaPreview=im,F.MenuIcon=Ks,F.Menubar=xo,F.MessageLayout=wd,F.MessageView=ra,F.MicrophoneIcon=ut,F.MinusIcon=Nn,F.Modal=uo,F.ModalLayout=Zt,F.ModalRouter=Zt,F.MoonIcon=Fs,F.MoreIcon=Os,F.MousePointerIcon=Xn,F.NavigationMenu=bo,F.NotificationIcon=vs,F.OTPInput=ml,F.OpenEyeIcon=kt,F.PageLayout=vm,F.Pagination=zi,F.PanelIcon=Kn,F.Password=Xh,F.PauseIcon=ss,F.PlayIcon=qn,F.PlusIcon=Cs,F.PowerOffIcon=Ds,F.PrintIcon=Js,F.ProfileIcon=Ss,F.ProgressBar=Mi,F.Radio=Nt,F.RadioGroup=wg,F.RefreshIcon=Xs,F.Resizable=fn,F.RotateIcon=Ps,F.Router=jm,F.SaveIcon=hs,F.SearchIcon=wr,F.Select=er,F.Selector=gg,F.SendIcon=yt,F.Separator=Xr,F.SettingsIcon=Un,F.ShapeIcon=js,F.ShareButton=ji,F.ShareIcon=Gn,F.ShieldIcon=As,F.Sidebar=gr,F.Slider=Bl,F.SliderIcon=id,F.SpinnerIcon=ld,F.SplashScreen=Fm,F.StarIcon=gs,F.StatusIndicator=Jr,F.StopIcon=Cr,F.SuccessIcon=Ct,F.Switch=Dt,F.Table=Ve,F.Tabs=Do,F.TagInput=nf,F.TextArea=$t,F.TextField=je,F.TextIcon=Hs,F.ThreadsIcon=cs,F.TickIcon=Xo,F.Title=ci,F.Toast=xu,F.Toggle=Xt,F.ToggleGroup=si,F.Tooltip=et,F.TrashIcon=Ns,F.TwitchIcon=ts,F.TwitterIcon=os,F.UnLikeIcon=Zs,F.UnlockIcon=rd,F.UploadIcon=wt,F.Uploader=Tr,F.UserIcon=Xc,F.VideoIcon=Rc,F.WarningIcon=pt,F.WifiIcon=td,F.XIcon=rs,F.YoutubeIcon=as,F.ZapIcon=_s,F.ZoomInIcon=sd,F.ZoomOutIcon=Ws,F.deepMerge=Be,F.defaultDesignSystemConfig=An,F.designSystemConfigList=$c,F.designSystemConfigs=st,F.getDesignSystemComponentProps=gt,F.goBack=Mm,F.hideDrawer=ql,F.hideMessage=oa,F.hideModal=Jt,F.matchPath=Gl,F.mergeDesignSystemComponentProps=$n,F.navigate=zm,F.normalizeDesignSystemComponentProps=dt,F.setSplashLoaded=Tm,F.setSplashStarted=Im,F.showDrawer=wm,F.showMessage=ea,F.showModal=cm,F.showToast=ko,F.useDesignSystem=br,F.useDesignSystemComponentProps=Io,F.useDrawerStore=ao,F.useHistory=on,F.useMergedDesignSystemComponentProps=pe,F.useMessageStore=vr,F.useModalStore=no,F.useRouterStore=qe,F.useSplashStore=Nr,F.useToast=ku,Object.defineProperty(F,Symbol.toStringTag,{value:"Module"})});
36
36
  //# sourceMappingURL=web.umd.js.map