@app-studio/components 0.10.17 → 0.10.18
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +41 -0
- package/dist/native/components/Alert/Alert/Alert.style.js +20 -20
- package/dist/native/components/Alert/Alert/Alert.style.js.map +1 -1
- package/dist/native/components/Alert/Alert/Alert.view.native.js.map +1 -1
- package/dist/native/components/AudioInput/AudioInput/AudioInput.view.js +7 -4
- package/dist/native/components/AudioInput/AudioInput/AudioInput.view.js.map +1 -1
- package/dist/native/components/Background/Background/Background.view.native.js.map +1 -1
- package/dist/native/components/Badge/Badge/Badge.style.js +7 -11
- package/dist/native/components/Badge/Badge/Badge.style.js.map +1 -1
- package/dist/native/components/Badge/Badge/Badge.view.js +2 -6
- package/dist/native/components/Badge/Badge/Badge.view.js.map +1 -1
- package/dist/native/components/Button/Button/Button.view.js +2 -2
- package/dist/native/components/Button/Button/Button.view.js.map +1 -1
- package/dist/native/components/Button/Button/Button.view.native.js.map +1 -1
- package/dist/native/components/Card/Card/Card.style.js +10 -10
- package/dist/native/components/Card/Card/Card.style.js.map +1 -1
- package/dist/native/components/Carousel/Carousel/Carousel.view.native.js +10 -6
- package/dist/native/components/Carousel/Carousel/Carousel.view.native.js.map +1 -1
- package/dist/native/components/Chart/Chart/Chart.style.js +3 -3
- package/dist/native/components/Chart/Chart/Chart.style.js.map +1 -1
- package/dist/native/components/ChatInput/ChatInput/ChatInput.style.js +1 -1
- package/dist/native/components/ChatInput/ChatInput/ChatInput.style.js.map +1 -1
- package/dist/native/components/ChatWidget/ChatWidget/ChatWidget.style.js +16 -16
- package/dist/native/components/ChatWidget/ChatWidget/ChatWidget.style.js.map +1 -1
- package/dist/native/components/ChatWidget/ChatWidget/ChatWidget.view.js +2 -2
- package/dist/native/components/ChatWidget/ChatWidget/ChatWidget.view.js.map +1 -1
- package/dist/native/components/ColorPicker/ColorPicker/ColorPicker.style.js +6 -6
- package/dist/native/components/ColorPicker/ColorPicker/ColorPicker.style.js.map +1 -1
- package/dist/native/components/ColorPicker/ColorPicker/ColorPicker.view.js +1 -1
- package/dist/native/components/ColorPicker/ColorPicker/ColorPicker.view.js.map +1 -1
- package/dist/native/components/ContextMenu/ContextMenu/ContextMenu.view.native.js +4 -4
- package/dist/native/components/ContextMenu/ContextMenu/ContextMenu.view.native.js.map +1 -1
- package/dist/native/components/CookieConsent/CookieConsent/CookieConsent.style.js +18 -20
- package/dist/native/components/CookieConsent/CookieConsent/CookieConsent.style.js.map +1 -1
- package/dist/native/components/DropZone/DropZone/DropZone.view.js +3 -3
- package/dist/native/components/DropZone/DropZone/DropZone.view.js.map +1 -1
- package/dist/native/components/DropdownMenu/DropdownMenu/DropdownMenu.view.native.js +4 -4
- package/dist/native/components/DropdownMenu/DropdownMenu/DropdownMenu.view.native.js.map +1 -1
- package/dist/native/components/EditComponent/EditPanel.js.map +1 -1
- package/dist/native/components/EmojiPicker/EmojiPicker/EmojiPicker.view.js +3 -3
- package/dist/native/components/EmojiPicker/EmojiPicker/EmojiPicker.view.js.map +1 -1
- package/dist/native/components/Form/Checkbox/Checkbox/Checkbox.view.native.js +1 -5
- package/dist/native/components/Form/Checkbox/Checkbox/Checkbox.view.native.js.map +1 -1
- package/dist/native/components/Form/CountryPicker/CountryPicker/CountryPicker.view.js +2 -8
- package/dist/native/components/Form/CountryPicker/CountryPicker/CountryPicker.view.js.map +1 -1
- package/dist/native/components/Form/DatePicker/DatePicker/DatePicker.view.js +1 -7
- package/dist/native/components/Form/DatePicker/DatePicker/DatePicker.view.js.map +1 -1
- package/dist/native/components/Form/Radio/Radio/Radio.view.native.js +1 -5
- package/dist/native/components/Form/Radio/Radio/Radio.view.native.js.map +1 -1
- package/dist/native/components/Form/Select/Select/Select.view.native.js +3 -9
- package/dist/native/components/Form/Select/Select/Select.view.native.js.map +1 -1
- package/dist/native/components/Form/TextArea/TextArea/TextArea.view.native.js.map +1 -1
- package/dist/native/components/Form/TextField/TextField/TextField.view.native.js.map +1 -1
- package/dist/native/components/Gradient/Gradient/Gradient.view.native.js +2 -6
- package/dist/native/components/Gradient/Gradient/Gradient.view.native.js.map +1 -1
- package/dist/native/components/HoverCard/HoverCard/HoverCard.view.js +1 -1
- package/dist/native/components/HoverCard/HoverCard/HoverCard.view.js.map +1 -1
- package/dist/native/components/HoverCard/HoverCard/HoverCard.view.native.js.map +1 -1
- package/dist/native/components/Icon/Icon.js.map +1 -1
- package/dist/native/components/Icon/Icon.native.js.map +1 -1
- package/dist/native/components/IconPicker/IconPicker/IconPicker.view.js +2 -2
- package/dist/native/components/IconPicker/IconPicker/IconPicker.view.js.map +1 -1
- package/dist/native/components/Input/FieldLayout/FieldLayout.js +1 -1
- package/dist/native/components/Input/FieldLayout/FieldLayout.js.map +1 -1
- package/dist/native/components/Link/Link/Link.view.native.js +1 -3
- package/dist/native/components/Link/Link/Link.view.native.js.map +1 -1
- package/dist/native/components/Loader/Loader/Loader.view.native.js +4 -4
- package/dist/native/components/Loader/Loader/Loader.view.native.js.map +1 -1
- package/dist/native/components/Menubar/Menubar/Menubar.view.native.js +2 -2
- package/dist/native/components/Menubar/Menubar/Menubar.view.native.js.map +1 -1
- package/dist/native/components/Message/Message/Message.view.js +1 -1
- package/dist/native/components/Message/Message/Message.view.js.map +1 -1
- package/dist/native/components/Modal/Modal/Modal.style.js +1 -1
- package/dist/native/components/Modal/Modal/Modal.style.js.map +1 -1
- package/dist/native/components/NavigationMenu/NavigationMenu/NavigationMenu.view.native.js +2 -2
- package/dist/native/components/NavigationMenu/NavigationMenu/NavigationMenu.view.native.js.map +1 -1
- package/dist/native/components/OTPInput/OTPInput/OTPInput.view.native.js +18 -2
- package/dist/native/components/OTPInput/OTPInput/OTPInput.view.native.js.map +1 -1
- package/dist/native/components/ProgressBar/ProgressBar/ProgressBar.view.js +2 -2
- package/dist/native/components/ProgressBar/ProgressBar/ProgressBar.view.js.map +1 -1
- package/dist/native/components/ProgressBar/ProgressBar/ProgressBar.view.native.js +6 -3
- package/dist/native/components/ProgressBar/ProgressBar/ProgressBar.view.native.js.map +1 -1
- package/dist/native/components/Resizable/Resizable/Resizable.view.native.js +9 -1
- package/dist/native/components/Resizable/Resizable/Resizable.view.native.js.map +1 -1
- package/dist/native/components/Sidebar/Sidebar/Sidebar.style.js +11 -11
- package/dist/native/components/Sidebar/Sidebar/Sidebar.style.js.map +1 -1
- package/dist/native/components/Sidebar/Sidebar/Sidebar.view.native.js.map +1 -1
- package/dist/native/components/Slider/Slider/Slider.view.native.js +3 -1
- package/dist/native/components/Slider/Slider/Slider.view.native.js.map +1 -1
- package/dist/native/components/Tabs/Tabs/Tabs.view.js +10 -10
- package/dist/native/components/Tabs/Tabs/Tabs.view.js.map +1 -1
- package/dist/native/components/Tabs/Tabs/Tabs.view.native.js +2 -2
- package/dist/native/components/Tabs/Tabs/Tabs.view.native.js.map +1 -1
- package/dist/native/components/Title/Title/Title.view.native.js.map +1 -1
- package/dist/native/components/Title/Title/TypewriterEffect.native.js +1 -3
- package/dist/native/components/Title/Title/TypewriterEffect.native.js.map +1 -1
- package/dist/native/components/Toast/Toast/Toast.view.native.js.map +1 -1
- package/dist/native/components/Toggle/Toggle/Toggle.style.js +7 -7
- package/dist/native/components/Toggle/Toggle/Toggle.style.js.map +1 -1
- package/dist/native/components/Toggle/Toggle/Toggle.view.js +2 -2
- package/dist/native/components/Toggle/Toggle/Toggle.view.js.map +1 -1
- package/dist/native/components/Toggle/Toggle/Toggle.view.native.js +3 -1
- package/dist/native/components/Toggle/Toggle/Toggle.view.native.js.map +1 -1
- package/dist/native/components/Uploader/Uploader/Uploader.view.js +2 -2
- package/dist/native/design-system/DesignSystemProvider.d.ts +8 -1
- package/dist/native/design-system/DesignSystemProvider.js +10 -4
- package/dist/native/design-system/DesignSystemProvider.js.map +1 -1
- package/dist/native/design-system/configs/airbnb.json +87 -87
- package/dist/native/design-system/configs/apple.json +89 -89
- package/dist/native/design-system/configs/coinbase.json +89 -89
- package/dist/native/design-system/configs/default.json +556 -0
- package/dist/native/design-system/configs/figma.json +63 -63
- package/dist/native/design-system/configs/index.d.ts +6 -0
- package/dist/native/design-system/configs/index.js +8 -1
- package/dist/native/design-system/configs/index.js.map +1 -1
- package/dist/native/design-system/configs/linear.json +86 -86
- package/dist/native/design-system/configs/nike.json +60 -60
- package/dist/native/design-system/configs/notion.json +88 -88
- package/dist/native/design-system/configs/revolut.json +89 -89
- package/dist/native/design-system/configs/shopify.json +76 -76
- package/dist/native/design-system/configs/spacex.json +68 -68
- package/dist/native/design-system/configs/spotify.json +89 -89
- package/dist/native/design-system/configs/stripe.json +88 -88
- package/dist/native/design-system/configs/tesla.json +75 -75
- package/dist/native/design-system/configs/uber.json +41 -41
- package/dist/native/design-system/configs/vercel.json +65 -65
- package/dist/native/design-system/types.d.ts +28 -0
- package/dist/native/pages/designSystem.page.js +103 -85
- package/dist/native/pages/designSystem.page.js.map +1 -1
- package/dist/web.cjs.js +8 -8
- package/dist/web.cjs.js.map +1 -1
- package/dist/web.esm.js +11786 -10987
- package/dist/web.esm.js.map +1 -1
- package/dist/web.umd.js +10 -10
- package/dist/web.umd.js.map +1 -1
- package/docs/README.md +1 -0
- package/docs/app-studio/Theming.md +7 -0
- package/docs/design-system/component-library.md +78 -42
- package/docs/design-system/llm-design-system.md +426 -0
- package/docs/design-system/theming.md +73 -13
- package/package.json +4 -4
package/dist/web.cjs.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
"use strict";var as=Object.create;var Yt=Object.defineProperty;var is=Object.getOwnPropertyDescriptor;var ls=Object.getOwnPropertyNames;var ss=Object.getPrototypeOf,cs=Object.prototype.hasOwnProperty;var ds=(e,o,r)=>o in e?Yt(e,o,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[o]=r;var ms=(e,o,r,n)=>{if(o&&typeof o=="object"||typeof o=="function")for(let a of ls(o))!cs.call(e,a)&&a!==r&&Yt(e,a,{get:()=>o[a],enumerable:!(n=is(o,a))||n.enumerable});return e};var us=(e,o,r)=>(r=e!=null?as(ss(e)):{},ms(o||!e||!e.__esModule?Yt(r,"default",{value:e,enumerable:!0}):r,e));var $e=(e,o,r)=>ds(e,typeof o!="symbol"?o+"":o,r);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("react/jsx-runtime"),u=require("react"),l=require("app-studio"),Ft=require("zustand"),ps=require("react-router-dom"),hs=require("react-dom"),We=require("formik"),Ir=(e="id")=>`${e}-${Math.random().toString(36).substring(2,9)}`,fs=({type:e="single",value:o,defaultValue:r,onValueChange:n,collapsible:a=!1})=>{const i=o!==void 0,s=o??r,m=()=>e==="multiple"?Array.isArray(s)?s:s?[s]:[]:Array.isArray(s)?s[0]:s,[d,c]=u.useState(m()),p=u.useMemo(()=>Ir("accordion"),[]),h=i?o:d,f=u.useMemo(()=>h===void 0?[]:Array.isArray(h)?h:[h],[h]);u.useEffect(()=>{i&&(e==="multiple"&&!Array.isArray(o)?(console.warn('Accordion with type="multiple" received non-array value:',o),c(o?[String(o)]:[])):e==="single"&&Array.isArray(o)?(console.warn('Accordion with type="single" received array value:',o),c(o.length>0?o[0]:void 0)):c(o))},[o,i,e]);const g=u.useCallback(b=>{let y;if(e==="single")h===b&&a?y=void 0:h!==b?y=b:y=h;else{const k=Array.isArray(h)?h:[];k.includes(b)?y=k.filter(S=>S!==b):y=[...k,b],Array.isArray(y)&&y.length===0&&(y=[])}i||c(y),n&&n(y)},[e,h,a,i,n]),x=u.useCallback(b=>f.includes(b),[f]);return{expandedItems:f,toggleItem:g,isItemExpanded:x,type:e,collapsible:a,baseId:p}},gs={square:{borderRadius:0},rounded:{borderRadius:8}},xs={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"}}},bs={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"]},ys={primary:"#ff385c",secondary:"#222222",success:"#428bff",warning:"#460479",error:"#c13515",canvas:"#ffffff",surface:"#f7f7f7",text:"#222222",muted:"#6a6a6a",border:"#dddddd",onPrimary:"#ffffff"},ks={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)"]},Cs={button:{variant:"filled",size:"md",shape:"rounded",color:"theme-primary",textColor:"theme-canvas",views:{container:{borderRadius:9999,fontFamily:"'Inter', 'Airbnb Cereal VF', Circular, -apple-system, system-ui, Roboto, 'Helvetica Neue', sans-serif",fontWeight:700,borderColor:"theme-primary",letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal",backgroundColor:null},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:"theme-surface",borderColor:"theme-border",color:"theme-secondary",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:"theme-secondary",fontFamily:"'Inter', 'Airbnb Cereal VF', Circular, -apple-system, system-ui, Roboto, 'Helvetica Neue', sans-serif",fontWeight:600,borderColor:"theme-border"},content:{color:"theme-muted",fontFamily:"'Inter', 'Airbnb Cereal VF', Circular, -apple-system, system-ui, Roboto, 'Helvetica Neue', sans-serif"},footer:{borderColor:"theme-border"}}},input:{size:"md",shape:"default",variant:"default",views:{container:{backgroundColor:"theme-canvas",borderColor:"theme-border",color:"theme-secondary",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:"theme-secondary",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:"theme-canvas",borderColor:"theme-border",color:"theme-secondary",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:"theme-secondary",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:"theme-canvas",borderColor:"theme-border",color:"theme-secondary",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:"theme-secondary",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:"theme-border",backgroundColor:"theme-canvas",_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:"theme-muted"},container:{borderRadius:4}}},radio:{size:"md",views:{radio:{borderColor:"theme-border",backgroundColor:"theme-canvas"},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:"theme-muted"},container:{borderRadius:"50%"}}},switch:{size:"sm",views:{slider:{backgroundColor:"theme-border"},circle:{backgroundColor:"theme-canvas"},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:"theme-border"},progress:{backgroundColor:"theme-primary"},filledTrack:{backgroundColor:"theme-primary"},thumb:{borderColor:"theme-primary",backgroundColor:"theme-canvas"},label:{color:"theme-secondary"},valueLabel:{color:"theme-muted"}}},tabs:{variant:"underline",views:{headerTabs:{borderColor:"theme-border"},tab:{color:"theme-muted",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:"theme-secondary"},container:{borderRadius:"8px"}}},accordion:{views:{container:{borderColor:"theme-border",backgroundColor:"theme-surface",color:"theme-secondary",borderRadius:"14px"},trigger:{color:"theme-secondary",fontFamily:"'Inter', 'Airbnb Cereal VF', Circular, -apple-system, system-ui, Roboto, 'Helvetica Neue', sans-serif"},content:{color:"theme-muted"}}},table:{views:{table:{backgroundColor:"theme-canvas",color:"theme-secondary",borderColor:"theme-border",borderRadius:16},thead:{backgroundColor:"theme-surface",color:"theme-secondary"},th:{color:"theme-muted",borderColor:"theme-border",fontFamily:"ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},tr:{borderColor:"theme-border"},td:{color:"theme-secondary",borderColor:"theme-border",letterSpacing:"-0.01em",fontStyle:"normal"},caption:{color:"theme-muted",fontStyle:"italic",letterSpacing:"-0.01em"}}},avatar:{views:{container:{backgroundColor:"theme-surface",borderColor:"theme-border",color:"theme-secondary",borderRadius:"50%"},fallback:{color:"theme-secondary",fontFamily:"'Inter', 'Airbnb Cereal VF', Circular, -apple-system, system-ui, Roboto, 'Helvetica Neue', sans-serif"}}},alert:{views:{container:{backgroundColor:"theme-surface",borderColor:"theme-border",borderRadius:16},title:{color:"theme-secondary",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:"theme-muted",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:"theme-secondary",fontFamily:"'Inter', 'Airbnb Cereal VF', Circular, -apple-system, system-ui, Roboto, 'Helvetica Neue', sans-serif"}}},progress:{color:"theme-primary",backgroundColor:"theme-border",radius:"14px",views:{container:{backgroundColor:"theme-border",borderRadius:"9999px"},bar:{backgroundColor:"theme-primary"},text:{color:"theme-secondary"}}},loader:{color:"theme-primary"},separator:{color:"theme-border",views:{container:{borderColor:"theme-border"},label:{color:"theme-muted",fontFamily:"'Inter', 'Airbnb Cereal VF', Circular, -apple-system, system-ui, Roboto, 'Helvetica Neue', sans-serif"}}},navigation:{views:{container:{backgroundColor:"theme-canvas",borderColor:"theme-border",color:"theme-secondary",borderRadius:"14px"},item:{color:"theme-muted"},activeItem:{color:"theme-primary",borderColor:"theme-primary"}}},hero:{views:{container:{backgroundColor:"theme-canvas",color:"theme-secondary",fontFamily:"'Inter', 'Airbnb Cereal VF', Circular, -apple-system, system-ui, Roboto, 'Helvetica Neue', sans-serif"},eyebrow:{color:"theme-muted"},title:{color:"theme-secondary",fontFamily:"'Inter', 'Airbnb Cereal VF', Circular, -apple-system, system-ui, Roboto, 'Helvetica Neue', sans-serif"},description:{color:"theme-muted"}}},page:{views:{container:{backgroundColor:"theme-canvas",color:"theme-secondary",fontFamily:"'Inter', 'Airbnb Cereal VF', Circular, -apple-system, system-ui, Roboto, 'Helvetica Neue', sans-serif"},section:{backgroundColor:"theme-canvas",borderColor:"theme-border"},surface:{backgroundColor:"theme-surface",borderColor:"theme-border",color:"theme-secondary"}}}},Ss={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"},js={metadata:bs,theme:ys,tokens:ks,components:Cs,personality:Ss},ws={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"]},vs={primary:"#0071E3",secondary:"#1d1d1f",success:"#0071e3",warning:"#272729",error:"#2997ff",canvas:"#ffffff",surface:"#f5f5f7",text:"#1d1d1f",muted:"#7a7a7a",border:"#e0e0e0",onPrimary:"#ffffff"},Ts={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)"]},Is={button:{variant:"filled",size:"md",shape:"rounded",color:"theme-primary",textColor:"theme-canvas",views:{container:{borderRadius:9999,fontFamily:"-apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Inter', system-ui, sans-serif",fontWeight:300,borderColor:"theme-primary",letterSpacing:"-0.022em",textTransform:"none",fontStyle:"normal",backgroundColor:null},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:"theme-canvas",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:"theme-surface",borderColor:"theme-border",color:"theme-secondary",borderRadius:18,borderWidth:"1px",borderStyle:"solid",boxShadow:"0 5px 30px rgba(0, 0, 0, 0.22)"},header:{color:"theme-secondary",fontFamily:"-apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Inter', system-ui, sans-serif",fontWeight:600,borderColor:"theme-border"},content:{color:"theme-muted",fontFamily:"-apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Inter', system-ui, sans-serif"},footer:{borderColor:"theme-border"}}},input:{size:"md",shape:"default",variant:"default",views:{container:{backgroundColor:"theme-canvas",borderColor:"theme-border",color:"theme-secondary",borderRadius:10,borderWidth:"1px",borderStyle:"solid",boxShadow:"none"},field:{color:"theme-secondary",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:"theme-canvas",borderColor:"theme-border",color:"theme-secondary",borderRadius:10,borderWidth:"1px",borderStyle:"solid",boxShadow:"none"},field:{color:"theme-secondary",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:"theme-canvas",borderColor:"theme-border",color:"theme-secondary",borderRadius:10,borderWidth:"1px",borderStyle:"solid",boxShadow:"none"},field:{color:"theme-secondary",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:"theme-border",backgroundColor:"theme-canvas",_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:"theme-muted"},container:{borderRadius:4}}},radio:{size:"md",views:{radio:{borderColor:"theme-border",backgroundColor:"theme-canvas"},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:"theme-muted"},container:{borderRadius:"50%"}}},switch:{size:"sm",views:{slider:{backgroundColor:"theme-border"},circle:{backgroundColor:"theme-canvas"},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:"theme-border"},progress:{backgroundColor:"theme-primary"},filledTrack:{backgroundColor:"theme-primary"},thumb:{borderColor:"theme-primary",backgroundColor:"theme-canvas"},label:{color:"theme-secondary"},valueLabel:{color:"theme-muted"}}},tabs:{variant:"pill",views:{headerTabs:{borderColor:"theme-border"},tab:{color:"theme-muted",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:"theme-canvas"},content:{color:"theme-secondary"},container:{borderRadius:"9999px"}}},accordion:{views:{container:{borderColor:"theme-border",backgroundColor:"theme-surface",color:"theme-secondary",borderRadius:"18px"},trigger:{color:"theme-secondary",fontFamily:"-apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Inter', system-ui, sans-serif"},content:{color:"theme-muted"}}},table:{views:{table:{backgroundColor:"theme-canvas",color:"theme-secondary",borderColor:"theme-border",borderRadius:18},thead:{backgroundColor:"theme-surface",color:"theme-secondary"},th:{color:"theme-muted",borderColor:"theme-border",fontFamily:"ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace",fontWeight:300,letterSpacing:"-0.022em",textTransform:"none",fontStyle:"normal"},tr:{borderColor:"theme-border"},td:{color:"theme-secondary",borderColor:"theme-border",letterSpacing:"-0.022em",fontStyle:"normal"},caption:{color:"theme-muted",fontStyle:"italic",letterSpacing:"-0.022em"}}},avatar:{views:{container:{backgroundColor:"theme-surface",borderColor:"theme-border",color:"theme-secondary",borderRadius:"50%"},fallback:{color:"theme-secondary",fontFamily:"-apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Inter', system-ui, sans-serif"}}},alert:{views:{container:{backgroundColor:"theme-surface",borderColor:"theme-border",borderRadius:18},title:{color:"theme-secondary",fontFamily:"-apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Inter', system-ui, sans-serif",fontWeight:300,letterSpacing:"-0.022em",textTransform:"none",fontStyle:"normal"},description:{color:"theme-muted",fontFamily:"-apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Inter', system-ui, sans-serif"},icon:{color:"theme-primary"}}},status:{views:{indicator:{backgroundColor:"theme-success"},label:{color:"theme-secondary",fontFamily:"-apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Inter', system-ui, sans-serif"}}},progress:{color:"theme-primary",backgroundColor:"theme-border",radius:"18px",views:{container:{backgroundColor:"theme-border",borderRadius:"9999px"},bar:{backgroundColor:"theme-primary"},text:{color:"theme-secondary"}}},loader:{color:"theme-primary"},separator:{color:"theme-border",views:{container:{borderColor:"theme-border"},label:{color:"theme-muted",fontFamily:"-apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Inter', system-ui, sans-serif"}}},navigation:{views:{container:{backgroundColor:"theme-canvas",borderColor:"theme-border",color:"theme-secondary",borderRadius:"18px"},item:{color:"theme-muted"},activeItem:{color:"theme-primary",borderColor:"theme-primary"}}},hero:{views:{container:{backgroundColor:"theme-canvas",color:"theme-secondary",fontFamily:"-apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Inter', system-ui, sans-serif"},eyebrow:{color:"theme-muted"},title:{color:"theme-secondary",fontFamily:"-apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Inter', system-ui, sans-serif"},description:{color:"theme-muted"}}},page:{views:{container:{backgroundColor:"theme-canvas",color:"theme-secondary",fontFamily:"-apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Inter', system-ui, sans-serif"},section:{backgroundColor:"theme-canvas",borderColor:"theme-border"},surface:{backgroundColor:"theme-surface",borderColor:"theme-border",color:"theme-secondary"}}}},Fs={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"},Rs={metadata:ws,theme:vs,tokens:Ts,components:Is,personality:Fs},zs={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"]},Ms={primary:"#0052ff",secondary:"#0a0b0d",success:"#16a34a",warning:"#003ecc",error:"#dc2626",canvas:"#ffffff",surface:"#f7f7f7",text:"#0a0b0d",muted:"#5b616e",border:"#dee1e6",onPrimary:"#ffffff"},Ws={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)"]},Hs={button:{variant:"filled",size:"md",shape:"rounded",color:"theme-primary",textColor:"theme-canvas",views:{container:{borderRadius:9999,fontFamily:"'Inter', 'Coinbase Display', -apple-system, system-ui, sans-serif",fontWeight:700,borderColor:"theme-primary",letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal",backgroundColor:null},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:"theme-canvas",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:"theme-surface",borderColor:"theme-border",color:"theme-secondary",borderRadius:12,borderWidth:"1px",borderStyle:"solid",boxShadow:"0 16px 40px rgba(0,0,0,0.5)"},header:{color:"theme-secondary",fontFamily:"'Inter', 'Coinbase Display', -apple-system, system-ui, sans-serif",fontWeight:600,borderColor:"theme-border"},content:{color:"theme-muted",fontFamily:"'Inter', 'Coinbase Display', -apple-system, system-ui, sans-serif"},footer:{borderColor:"theme-border"}}},input:{size:"md",shape:"default",variant:"default",views:{container:{backgroundColor:"theme-canvas",borderColor:"theme-border",color:"theme-secondary",borderRadius:10,borderWidth:"1px",borderStyle:"solid",boxShadow:"none"},field:{color:"theme-secondary",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:"theme-canvas",borderColor:"theme-border",color:"theme-secondary",borderRadius:10,borderWidth:"1px",borderStyle:"solid",boxShadow:"none"},field:{color:"theme-secondary",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:"theme-canvas",borderColor:"theme-border",color:"theme-secondary",borderRadius:10,borderWidth:"1px",borderStyle:"solid",boxShadow:"none"},field:{color:"theme-secondary",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:"theme-border",backgroundColor:"theme-canvas",_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:"theme-muted"},container:{borderRadius:4}}},radio:{size:"md",views:{radio:{borderColor:"theme-border",backgroundColor:"theme-canvas"},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:"theme-muted"},container:{borderRadius:"50%"}}},switch:{size:"sm",views:{slider:{backgroundColor:"theme-border"},circle:{backgroundColor:"theme-canvas"},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:"theme-border"},progress:{backgroundColor:"theme-primary"},filledTrack:{backgroundColor:"theme-primary"},thumb:{borderColor:"theme-primary",backgroundColor:"theme-canvas"},label:{color:"theme-secondary"},valueLabel:{color:"theme-muted"}}},tabs:{variant:"pill",views:{headerTabs:{borderColor:"theme-border"},tab:{color:"theme-muted",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:"theme-canvas"},content:{color:"theme-secondary"},container:{borderRadius:"9999px"}}},accordion:{views:{container:{borderColor:"theme-border",backgroundColor:"theme-surface",color:"theme-secondary",borderRadius:"16px"},trigger:{color:"theme-secondary",fontFamily:"'Inter', 'Coinbase Display', -apple-system, system-ui, sans-serif"},content:{color:"theme-muted"}}},table:{views:{table:{backgroundColor:"theme-canvas",color:"theme-secondary",borderColor:"theme-border",borderRadius:12},thead:{backgroundColor:"theme-surface",color:"theme-secondary"},th:{color:"theme-muted",borderColor:"theme-border",fontFamily:"'JetBrains Mono', 'Coinbase Mono', monospace",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},tr:{borderColor:"theme-border"},td:{color:"theme-secondary",borderColor:"theme-border",letterSpacing:"-0.01em",fontStyle:"normal"},caption:{color:"theme-muted",fontStyle:"italic",letterSpacing:"-0.01em"}}},avatar:{views:{container:{backgroundColor:"theme-surface",borderColor:"theme-border",color:"theme-secondary",borderRadius:"50%"},fallback:{color:"theme-secondary",fontFamily:"'Inter', 'Coinbase Display', -apple-system, system-ui, sans-serif"}}},alert:{views:{container:{backgroundColor:"theme-surface",borderColor:"theme-border",borderRadius:12},title:{color:"theme-secondary",fontFamily:"'Inter', 'Coinbase Display', -apple-system, system-ui, sans-serif",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},description:{color:"theme-muted",fontFamily:"'Inter', 'Coinbase Display', -apple-system, system-ui, sans-serif"},icon:{color:"theme-primary"}}},status:{views:{indicator:{backgroundColor:"theme-success"},label:{color:"theme-secondary",fontFamily:"'Inter', 'Coinbase Display', -apple-system, system-ui, sans-serif"}}},progress:{color:"theme-primary",backgroundColor:"theme-border",radius:"16px",views:{container:{backgroundColor:"theme-border",borderRadius:"9999px"},bar:{backgroundColor:"theme-primary"},text:{color:"theme-secondary"}}},loader:{color:"theme-primary"},separator:{color:"theme-border",views:{container:{borderColor:"theme-border"},label:{color:"theme-muted",fontFamily:"'Inter', 'Coinbase Display', -apple-system, system-ui, sans-serif"}}},navigation:{views:{container:{backgroundColor:"theme-canvas",borderColor:"theme-border",color:"theme-secondary",borderRadius:"16px"},item:{color:"theme-muted"},activeItem:{color:"theme-primary",borderColor:"theme-primary"}}},hero:{views:{container:{backgroundColor:"theme-canvas",color:"theme-secondary",fontFamily:"'Inter', 'Coinbase Display', -apple-system, system-ui, sans-serif"},eyebrow:{color:"theme-muted"},title:{color:"theme-secondary",fontFamily:"'Inter', 'Coinbase Display', -apple-system, system-ui, sans-serif"},description:{color:"theme-muted"}}},page:{views:{container:{backgroundColor:"theme-canvas",color:"theme-secondary",fontFamily:"'Inter', 'Coinbase Display', -apple-system, system-ui, sans-serif"},section:{backgroundColor:"theme-canvas",borderColor:"theme-border"},surface:{backgroundColor:"theme-surface",borderColor:"theme-border",color:"theme-secondary"}}}},Ps={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"},As={metadata:zs,theme:Ms,tokens:Ws,components:Hs,personality:Ps},Es={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"]},Vs={primary:"#F24E1E",secondary:"#A259FF",success:"#0ACF83",warning:"#FFC700",error:"#FF7262",canvas:"#ffffff",surface:"#f7f7f5",text:"#000000",muted:"#6b7280",border:"#e6e6e6",onPrimary:"#ffffff"},Ds={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)"]},$s={button:{variant:"filled",size:"md",shape:"rounded",color:"theme-primary",textColor:"theme-canvas",views:{container:{borderRadius:9999,fontFamily:"'Inter', 'SF Pro Display', system-ui, -apple-system, Helvetica, sans-serif",fontWeight:700,borderColor:"theme-primary",letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal",backgroundColor:null},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:"theme-canvas",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:"theme-surface",borderColor:"theme-border",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:"theme-border"},content:{color:"theme-muted",fontFamily:"'Inter', 'SF Pro Display', system-ui, -apple-system, Helvetica, sans-serif"},footer:{borderColor:"theme-border"}}},input:{size:"md",shape:"default",variant:"default",views:{container:{backgroundColor:"theme-canvas",borderColor:"theme-border",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:"theme-canvas",borderColor:"theme-border",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:"theme-canvas",borderColor:"theme-border",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:"theme-border",backgroundColor:"theme-canvas",_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:"theme-muted"},container:{borderRadius:4}}},radio:{size:"md",views:{radio:{borderColor:"theme-border",backgroundColor:"theme-canvas"},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:"theme-muted"},container:{borderRadius:"50%"}}},switch:{size:"sm",views:{slider:{backgroundColor:"theme-border"},circle:{backgroundColor:"theme-canvas"},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:"theme-border"},progress:{backgroundColor:"theme-primary"},filledTrack:{backgroundColor:"theme-primary"},thumb:{borderColor:"theme-primary",backgroundColor:"theme-canvas"},label:{color:"theme-primary"},valueLabel:{color:"theme-muted"}}},tabs:{variant:"underline",views:{headerTabs:{borderColor:"theme-border"},tab:{color:"theme-muted",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:"theme-border",backgroundColor:"theme-surface",color:"theme-primary",borderRadius:"12px"},trigger:{color:"theme-primary",fontFamily:"'Inter', 'SF Pro Display', system-ui, -apple-system, Helvetica, sans-serif"},content:{color:"theme-muted"}}},table:{views:{table:{backgroundColor:"theme-canvas",color:"theme-primary",borderColor:"theme-border",borderRadius:8},thead:{backgroundColor:"theme-surface",color:"theme-primary"},th:{color:"theme-muted",borderColor:"theme-border",fontFamily:"'JetBrains Mono', 'SF Mono', Menlo, monospace",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},tr:{borderColor:"theme-border"},td:{color:"theme-primary",borderColor:"theme-border",letterSpacing:"-0.01em",fontStyle:"normal"},caption:{color:"theme-muted",fontStyle:"italic",letterSpacing:"-0.01em"}}},avatar:{views:{container:{backgroundColor:"theme-surface",borderColor:"theme-border",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:"theme-surface",borderColor:"theme-border",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:"theme-muted",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:"theme-border",radius:"8px",views:{container:{backgroundColor:"theme-border",borderRadius:"9999px"},bar:{backgroundColor:"theme-primary"},text:{color:"theme-primary"}}},loader:{color:"theme-primary"},separator:{color:"theme-border",views:{container:{borderColor:"theme-border"},label:{color:"theme-muted",fontFamily:"'Inter', 'SF Pro Display', system-ui, -apple-system, Helvetica, sans-serif"}}},navigation:{views:{container:{backgroundColor:"theme-canvas",borderColor:"theme-border",color:"theme-primary",borderRadius:"12px"},item:{color:"theme-muted"},activeItem:{color:"theme-primary",borderColor:"theme-primary"}}},hero:{views:{container:{backgroundColor:"theme-canvas",color:"theme-primary",fontFamily:"'Inter', 'SF Pro Display', system-ui, -apple-system, Helvetica, sans-serif"},eyebrow:{color:"theme-muted"},title:{color:"theme-primary",fontFamily:"'Inter', 'SF Pro Display', system-ui, -apple-system, Helvetica, sans-serif"},description:{color:"theme-muted"}}},page:{views:{container:{backgroundColor:"theme-canvas",color:"theme-primary",fontFamily:"'Inter', 'SF Pro Display', system-ui, -apple-system, Helvetica, sans-serif"},section:{backgroundColor:"theme-canvas",borderColor:"theme-border"},surface:{backgroundColor:"theme-surface",borderColor:"theme-border",color:"theme-primary"}}}},Bs={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"},_s={metadata:Es,theme:Vs,tokens:Ds,components:$s,personality:Bs},Ls={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"]},Os={primary:"#5e6ad2",secondary:"#828fff",success:"#27a644",warning:"#5e69d1",error:"#828fff",canvas:"#08090A",surface:"#1C1D1F",text:"#f7f8f8",muted:"#8a8f98",border:"#23252a",onPrimary:"#ffffff"},Ns={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)"]},qs={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,borderColor:"theme-primary",letterSpacing:"-0.025em",textTransform:"none",fontStyle:"normal",backgroundColor:null},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:"theme-surface",borderColor:"theme-border",color:"theme-text",borderRadius:12,borderWidth:"1px",borderStyle:"solid",boxShadow:"rgba(255,255,255,0.05) 0 0.5px 0 0.5px"},header:{color:"theme-text",fontFamily:"'Inter', 'SF Pro Display', system-ui, -apple-system, sans-serif",fontWeight:600,borderColor:"theme-border"},content:{color:"theme-muted",fontFamily:"'Inter', 'SF Pro Display', system-ui, -apple-system, sans-serif"},footer:{borderColor:"theme-border"}}},input:{size:"md",shape:"default",variant:"default",views:{container:{backgroundColor:"theme-canvas",borderColor:"theme-border",color:"theme-text",borderRadius:10,borderWidth:"1px",borderStyle:"solid",boxShadow:"none"},field:{color:"theme-text",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:"theme-canvas",borderColor:"theme-border",color:"theme-text",borderRadius:10,borderWidth:"1px",borderStyle:"solid",boxShadow:"none"},field:{color:"theme-text",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:"theme-canvas",borderColor:"theme-border",color:"theme-text",borderRadius:10,borderWidth:"1px",borderStyle:"solid",boxShadow:"none"},field:{color:"theme-text",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:"theme-border",backgroundColor:"theme-canvas",_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:"theme-muted"},container:{borderRadius:4}}},radio:{size:"md",views:{radio:{borderColor:"theme-border",backgroundColor:"theme-canvas"},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:"theme-muted"},container:{borderRadius:"50%"}}},switch:{size:"sm",views:{slider:{backgroundColor:"theme-border"},circle:{backgroundColor:"theme-canvas"},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:"theme-border"},progress:{backgroundColor:"theme-primary"},filledTrack:{backgroundColor:"theme-primary"},thumb:{borderColor:"theme-primary",backgroundColor:"theme-canvas"},label:{color:"theme-text"},valueLabel:{color:"theme-muted"}}},tabs:{variant:"underline",views:{headerTabs:{borderColor:"theme-border"},tab:{color:"theme-muted",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:"theme-text"},container:{borderRadius:"8px"}}},accordion:{views:{container:{borderColor:"theme-border",backgroundColor:"theme-surface",color:"theme-text",borderRadius:"12px"},trigger:{color:"theme-text",fontFamily:"'Inter', 'SF Pro Display', system-ui, -apple-system, sans-serif"},content:{color:"theme-muted"}}},table:{views:{table:{backgroundColor:"theme-canvas",color:"theme-text",borderColor:"theme-border",borderRadius:12},thead:{backgroundColor:"theme-surface",color:"theme-text"},th:{color:"theme-muted",borderColor:"theme-border",fontFamily:"'JetBrains Mono', ui-monospace, 'SF Mono', menlo, monospace",fontWeight:700,letterSpacing:"-0.025em",textTransform:"none",fontStyle:"normal"},tr:{borderColor:"theme-border"},td:{color:"theme-text",borderColor:"theme-border",letterSpacing:"-0.025em",fontStyle:"normal"},caption:{color:"theme-muted",fontStyle:"italic",letterSpacing:"-0.025em"}}},avatar:{views:{container:{backgroundColor:"theme-surface",borderColor:"theme-border",color:"theme-text",borderRadius:"50%"},fallback:{color:"theme-text",fontFamily:"'Inter', 'SF Pro Display', system-ui, -apple-system, sans-serif"}}},alert:{views:{container:{backgroundColor:"theme-surface",borderColor:"theme-border",borderRadius:12},title:{color:"theme-text",fontFamily:"'Inter', 'SF Pro Display', system-ui, -apple-system, sans-serif",fontWeight:700,letterSpacing:"-0.025em",textTransform:"none",fontStyle:"normal"},description:{color:"theme-muted",fontFamily:"'Inter', 'SF Pro Display', system-ui, -apple-system, sans-serif"},icon:{color:"theme-primary"}}},status:{views:{indicator:{backgroundColor:"theme-success"},label:{color:"theme-text",fontFamily:"'Inter', 'SF Pro Display', system-ui, -apple-system, sans-serif"}}},progress:{color:"theme-primary",backgroundColor:"theme-border",radius:"8px",views:{container:{backgroundColor:"theme-border",borderRadius:"9999px"},bar:{backgroundColor:"theme-primary"},text:{color:"theme-text"}}},loader:{color:"theme-primary"},separator:{color:"theme-border",views:{container:{borderColor:"theme-border"},label:{color:"theme-muted",fontFamily:"'Inter', 'SF Pro Display', system-ui, -apple-system, sans-serif"}}},navigation:{views:{container:{backgroundColor:"theme-canvas",borderColor:"theme-border",color:"theme-text",borderRadius:"12px"},item:{color:"theme-muted"},activeItem:{color:"theme-primary",borderColor:"theme-primary"}}},hero:{views:{container:{backgroundColor:"theme-canvas",color:"theme-text",fontFamily:"'Inter', 'SF Pro Display', system-ui, -apple-system, sans-serif"},eyebrow:{color:"theme-muted"},title:{color:"theme-text",fontFamily:"'Inter', 'SF Pro Display', system-ui, -apple-system, sans-serif"},description:{color:"theme-muted"}}},page:{views:{container:{backgroundColor:"theme-canvas",color:"theme-text",fontFamily:"'Inter', 'SF Pro Display', system-ui, -apple-system, sans-serif"},section:{backgroundColor:"theme-canvas",borderColor:"theme-border"},surface:{backgroundColor:"theme-surface",borderColor:"theme-border",color:"theme-text"}}}},Us={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"},Gs={metadata:Ls,theme:Os,tokens:Ns,components:qs,personality:Us},Ys={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"]},Xs={primary:"#111111",secondary:"#FA5400",success:"#76E0B5",warning:"#1151ff",error:"#d30005",canvas:"#ffffff",surface:"#f5f5f5",text:"#111111",muted:"#707072",border:"#cacacb",onPrimary:"#ffffff"},Ks={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)"]},Js={button:{variant:"filled",size:"md",shape:"square",color:"theme-primary",textColor:"theme-canvas",views:{container:{borderRadius:0,fontFamily:"'Helvetica Now Display', 'Helvetica Neue', 'Inter', Helvetica, Arial, sans-serif",fontWeight:800,borderColor:"theme-primary",letterSpacing:"0.08em",textTransform:"uppercase",fontStyle:"italic",backgroundColor:null},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:"theme-canvas",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:"theme-border",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:"theme-border"},content:{color:"theme-muted",fontFamily:"'Helvetica Now Display', 'Helvetica Neue', 'Inter', Helvetica, Arial, sans-serif"},footer:{borderColor:"theme-border"}}},input:{size:"md",shape:"default",variant:"default",views:{container:{backgroundColor:"theme-canvas",borderColor:"theme-border",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:"theme-canvas",borderColor:"theme-border",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:"theme-canvas",borderColor:"theme-border",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:"theme-border",backgroundColor:"theme-canvas",_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:"theme-muted"},container:{borderRadius:0}}},radio:{size:"md",views:{radio:{borderColor:"theme-border",backgroundColor:"theme-canvas"},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:"theme-muted"},container:{borderRadius:"50%"}}},switch:{size:"sm",views:{slider:{backgroundColor:"theme-border"},circle:{backgroundColor:"theme-canvas"},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:"theme-border"},progress:{backgroundColor:"theme-primary"},filledTrack:{backgroundColor:"theme-primary"},thumb:{borderColor:"theme-primary",backgroundColor:"theme-canvas"},label:{color:"theme-primary"},valueLabel:{color:"theme-muted"}}},tabs:{variant:"pill",views:{headerTabs:{borderColor:"theme-border"},tab:{color:"theme-muted",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:"theme-canvas"},content:{color:"theme-primary"},container:{borderRadius:"9999px"}}},accordion:{views:{container:{borderColor:"theme-border",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:"theme-muted"}}},table:{views:{table:{backgroundColor:"theme-canvas",color:"theme-primary",borderColor:"theme-border",borderRadius:4},thead:{backgroundColor:"theme-secondary",color:"theme-primary"},th:{color:"theme-muted",borderColor:"theme-border",fontFamily:"ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace",fontWeight:800,letterSpacing:"0.02em",textTransform:"uppercase",fontStyle:"italic"},tr:{borderColor:"theme-border"},td:{color:"theme-primary",borderColor:"theme-border",letterSpacing:"0.02em",fontStyle:"italic"},caption:{color:"theme-muted",fontStyle:"italic",letterSpacing:"0.02em"}}},avatar:{views:{container:{backgroundColor:"theme-secondary",borderColor:"theme-border",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:"theme-border",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:"theme-muted",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:"theme-border",radius:0,views:{container:{backgroundColor:"theme-border",borderRadius:"9999px"},bar:{backgroundColor:"theme-primary"},text:{color:"theme-primary"}}},loader:{color:"theme-primary"},separator:{color:"theme-border",views:{container:{borderColor:"theme-border"},label:{color:"theme-muted",fontFamily:"'Helvetica Now Display', 'Helvetica Neue', 'Inter', Helvetica, Arial, sans-serif"}}},navigation:{views:{container:{backgroundColor:"theme-canvas",borderColor:"theme-border",color:"theme-primary",borderRadius:0},item:{color:"theme-muted"},activeItem:{color:"theme-primary",borderColor:"theme-primary"}}},hero:{views:{container:{backgroundColor:"theme-canvas",color:"theme-primary",fontFamily:"'Helvetica Now Display', 'Helvetica Neue', 'Inter', Helvetica, Arial, sans-serif"},eyebrow:{color:"theme-muted"},title:{color:"theme-primary",fontFamily:"'Helvetica Now Display', 'Helvetica Neue', 'Inter', Helvetica, Arial, sans-serif"},description:{color:"theme-muted"}}},page:{views:{container:{backgroundColor:"theme-canvas",color:"theme-primary",fontFamily:"'Helvetica Now Display', 'Helvetica Neue', 'Inter', Helvetica, Arial, sans-serif"},section:{backgroundColor:"theme-canvas",borderColor:"theme-border"},surface:{backgroundColor:"theme-secondary",borderColor:"theme-border",color:"theme-primary"}}}},Qs={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"},Zs={metadata:Ys,theme:Xs,tokens:Ks,components:Js,personality:Qs},ec={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"]},oc={primary:"#5645d4",secondary:"#ff64c8",success:"#1aae39",warning:"#dd5b00",error:"#ff64c8",canvas:"#ffffff",surface:"#fafaf9",text:"#1a1a1a",muted:"#bbb8b1",border:"#e5e3df",onPrimary:"#ffffff"},tc={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"]},rc={button:{variant:"filled",size:"md",shape:"rounded",color:"theme-primary",textColor:"theme-canvas",views:{container:{borderRadius:9999,fontFamily:"'Inter', -apple-system, BlinkMacSystemFont, sans-serif",fontWeight:400,borderColor:"theme-primary",letterSpacing:"0em",textTransform:"none",fontStyle:"normal",backgroundColor:null},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:"theme-canvas",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:"theme-surface",borderColor:"theme-border",color:"theme-text",borderRadius:10,borderWidth:"1px",borderStyle:"solid",boxShadow:"rgba(15, 15, 15, 0.20) 0px 24px 48px -8px"},header:{color:"theme-text",fontFamily:"'Inter', -apple-system, BlinkMacSystemFont, sans-serif",fontWeight:600,borderColor:"theme-border"},content:{color:"theme-muted",fontFamily:"'Inter', -apple-system, BlinkMacSystemFont, sans-serif"},footer:{borderColor:"theme-border"}}},input:{size:"md",shape:"default",variant:"default",views:{container:{backgroundColor:"theme-canvas",borderColor:"theme-border",color:"theme-text",borderRadius:10,borderWidth:"1px",borderStyle:"solid",boxShadow:"none"},field:{color:"theme-text",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:"theme-canvas",borderColor:"theme-border",color:"theme-text",borderRadius:10,borderWidth:"1px",borderStyle:"solid",boxShadow:"none"},field:{color:"theme-text",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:"theme-canvas",borderColor:"theme-border",color:"theme-text",borderRadius:10,borderWidth:"1px",borderStyle:"solid",boxShadow:"none"},field:{color:"theme-text",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:"theme-border",backgroundColor:"theme-canvas",_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:"theme-muted"},container:{borderRadius:4}}},radio:{size:"md",views:{radio:{borderColor:"theme-border",backgroundColor:"theme-canvas"},dot:{backgroundColor:"theme-primary"},label:{fontFamily:"'Inter', -apple-system, BlinkMacSystemFont, sans-serif",fontWeight:400,letterSpacing:"0em",textTransform:"none",fontStyle:"normal"},infoText:{color:"theme-muted"},container:{borderRadius:"50%"}}},switch:{size:"sm",views:{slider:{backgroundColor:"theme-border"},circle:{backgroundColor:"theme-canvas"},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:"theme-border"},progress:{backgroundColor:"theme-primary"},filledTrack:{backgroundColor:"theme-primary"},thumb:{borderColor:"theme-primary",backgroundColor:"theme-canvas"},label:{color:"theme-text"},valueLabel:{color:"theme-muted"}}},tabs:{variant:"underline",views:{headerTabs:{borderColor:"theme-border"},tab:{color:"theme-muted",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:"theme-text"},container:{borderRadius:"8px"}}},accordion:{views:{container:{borderColor:"theme-border",backgroundColor:"theme-surface",color:"theme-text",borderRadius:"12px"},trigger:{color:"theme-text",fontFamily:"'Inter', -apple-system, BlinkMacSystemFont, sans-serif"},content:{color:"theme-muted"}}},table:{views:{table:{backgroundColor:"theme-canvas",color:"theme-text",borderColor:"theme-border",borderRadius:10},thead:{backgroundColor:"theme-surface",color:"theme-text"},th:{color:"theme-muted",borderColor:"theme-border",fontFamily:"ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace",fontWeight:400,letterSpacing:"0em",textTransform:"none",fontStyle:"normal"},tr:{borderColor:"theme-border"},td:{color:"theme-text",borderColor:"theme-border",letterSpacing:"0em",fontStyle:"normal"},caption:{color:"theme-muted",fontStyle:"italic",letterSpacing:"0em"}}},avatar:{views:{container:{backgroundColor:"theme-surface",borderColor:"theme-border",color:"theme-text",borderRadius:"50%"},fallback:{color:"theme-text",fontFamily:"'Inter', -apple-system, BlinkMacSystemFont, sans-serif"}}},alert:{views:{container:{backgroundColor:"theme-surface",borderColor:"theme-border",borderRadius:10},title:{color:"theme-text",fontFamily:"'Inter', -apple-system, BlinkMacSystemFont, sans-serif",fontWeight:400,letterSpacing:"0em",textTransform:"none",fontStyle:"normal"},description:{color:"theme-muted",fontFamily:"'Inter', -apple-system, BlinkMacSystemFont, sans-serif"},icon:{color:"theme-primary"}}},status:{views:{indicator:{backgroundColor:"theme-success"},label:{color:"theme-text",fontFamily:"'Inter', -apple-system, BlinkMacSystemFont, sans-serif"}}},progress:{color:"theme-primary",backgroundColor:"theme-border",radius:"8px",views:{container:{backgroundColor:"theme-border",borderRadius:"9999px"},bar:{backgroundColor:"theme-primary"},text:{color:"theme-text"}}},loader:{color:"theme-primary"},separator:{color:"theme-border",views:{container:{borderColor:"theme-border"},label:{color:"theme-muted",fontFamily:"'Inter', -apple-system, BlinkMacSystemFont, sans-serif"}}},navigation:{views:{container:{backgroundColor:"theme-canvas",borderColor:"theme-border",color:"theme-text",borderRadius:"12px"},item:{color:"theme-muted"},activeItem:{color:"theme-primary",borderColor:"theme-primary"}}},hero:{views:{container:{backgroundColor:"theme-canvas",color:"theme-text",fontFamily:"'Inter', -apple-system, BlinkMacSystemFont, sans-serif"},eyebrow:{color:"theme-muted"},title:{color:"theme-text",fontFamily:"'Inter', -apple-system, BlinkMacSystemFont, sans-serif"},description:{color:"theme-muted"}}},page:{views:{container:{backgroundColor:"theme-canvas",color:"theme-text",fontFamily:"'Inter', -apple-system, BlinkMacSystemFont, sans-serif"},section:{backgroundColor:"theme-canvas",borderColor:"theme-border"},surface:{backgroundColor:"theme-surface",borderColor:"theme-border",color:"theme-text"}}}},nc={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"},ac={metadata:ec,theme:oc,tokens:tc,components:rc,personality:nc},ic={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"]},lc={primary:"#1361F0",secondary:"#101D31",success:"#16a34a",warning:"#d97706",error:"#e61e49",canvas:"#ffffff",surface:"#f4f4f4",text:"#191c1f",muted:"#505a63",border:"#e5e7eb",onPrimary:"#ffffff"},sc={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:[]},cc={button:{variant:"filled",size:"md",shape:"pill",color:"theme-primary",textColor:"theme-canvas",views:{container:{borderRadius:9999,fontFamily:"'Aeonik Pro', 'Inter', system-ui, -apple-system, sans-serif",fontWeight:700,borderColor:"theme-primary",letterSpacing:"-0.02em",textTransform:"none",fontStyle:"normal",backgroundColor:null},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:"theme-canvas",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:"theme-surface",borderColor:"theme-border",color:"theme-text",borderRadius:20,borderWidth:"1px",borderStyle:"solid",boxShadow:"0 1px 3px rgba(0, 0, 0, 0.08)"},header:{color:"theme-text",fontFamily:"'Aeonik Pro', 'Inter', system-ui, -apple-system, sans-serif",fontWeight:600,borderColor:"theme-border"},content:{color:"theme-muted",fontFamily:"'Aeonik Pro', 'Inter', system-ui, -apple-system, sans-serif"},footer:{borderColor:"theme-border"}}},input:{size:"md",shape:"default",variant:"default",views:{container:{backgroundColor:"theme-canvas",borderColor:"theme-border",color:"theme-text",borderRadius:16,borderWidth:"1px",borderStyle:"solid",boxShadow:"none"},field:{color:"theme-text",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:"theme-canvas",borderColor:"theme-border",color:"theme-text",borderRadius:16,borderWidth:"1px",borderStyle:"solid",boxShadow:"none"},field:{color:"theme-text",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:"theme-canvas",borderColor:"theme-border",color:"theme-text",borderRadius:16,borderWidth:"1px",borderStyle:"solid",boxShadow:"none"},field:{color:"theme-text",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:"theme-border",backgroundColor:"theme-canvas",_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:"theme-muted"},container:{borderRadius:9999}}},radio:{size:"md",views:{radio:{borderColor:"theme-border",backgroundColor:"theme-canvas"},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:"theme-muted"},container:{borderRadius:"50%"}}},switch:{size:"sm",views:{slider:{backgroundColor:"theme-border"},circle:{backgroundColor:"theme-canvas"},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:"theme-border"},progress:{backgroundColor:"theme-primary"},filledTrack:{backgroundColor:"theme-primary"},thumb:{borderColor:"theme-primary",backgroundColor:"theme-canvas"},label:{color:"theme-text"},valueLabel:{color:"theme-muted"}}},tabs:{variant:"pill",views:{headerTabs:{borderColor:"theme-border"},tab:{color:"theme-muted",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:"theme-canvas"},content:{color:"theme-text"},container:{borderRadius:"9999px"}}},accordion:{views:{container:{borderColor:"theme-border",backgroundColor:"theme-surface",color:"theme-text",borderRadius:"24px"},trigger:{color:"theme-text",fontFamily:"'Aeonik Pro', 'Inter', system-ui, -apple-system, sans-serif"},content:{color:"theme-muted"}}},table:{views:{table:{backgroundColor:"theme-canvas",color:"theme-text",borderColor:"theme-border",borderRadius:20},thead:{backgroundColor:"theme-surface",color:"theme-text"},th:{color:"theme-muted",borderColor:"theme-border",fontFamily:"ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace",fontWeight:700,letterSpacing:"-0.02em",textTransform:"none",fontStyle:"normal"},tr:{borderColor:"theme-border"},td:{color:"theme-text",borderColor:"theme-border",letterSpacing:"-0.02em",fontStyle:"normal"},caption:{color:"theme-muted",fontStyle:"italic",letterSpacing:"-0.02em"}}},avatar:{views:{container:{backgroundColor:"theme-surface",borderColor:"theme-border",color:"theme-text",borderRadius:"50%"},fallback:{color:"theme-text",fontFamily:"'Aeonik Pro', 'Inter', system-ui, -apple-system, sans-serif"}}},alert:{views:{container:{backgroundColor:"theme-surface",borderColor:"theme-border",borderRadius:20},title:{color:"theme-text",fontFamily:"'Aeonik Pro', 'Inter', system-ui, -apple-system, sans-serif",fontWeight:700,letterSpacing:"-0.02em",textTransform:"none",fontStyle:"normal"},description:{color:"theme-muted",fontFamily:"'Aeonik Pro', 'Inter', system-ui, -apple-system, sans-serif"},icon:{color:"theme-primary"}}},status:{views:{indicator:{backgroundColor:"theme-success"},label:{color:"theme-text",fontFamily:"'Aeonik Pro', 'Inter', system-ui, -apple-system, sans-serif"}}},progress:{color:"theme-primary",backgroundColor:"theme-border",radius:"24px",views:{container:{backgroundColor:"theme-border",borderRadius:"9999px"},bar:{backgroundColor:"theme-primary"},text:{color:"theme-text"}}},loader:{color:"theme-primary"},separator:{color:"theme-border",views:{container:{borderColor:"theme-border"},label:{color:"theme-muted",fontFamily:"'Aeonik Pro', 'Inter', system-ui, -apple-system, sans-serif"}}},navigation:{views:{container:{backgroundColor:"theme-canvas",borderColor:"theme-border",color:"theme-text",borderRadius:"24px"},item:{color:"theme-muted"},activeItem:{color:"theme-primary",borderColor:"theme-primary"}}},hero:{views:{container:{backgroundColor:"theme-canvas",color:"theme-text",fontFamily:"'Aeonik Pro', 'Inter', system-ui, -apple-system, sans-serif"},eyebrow:{color:"theme-muted"},title:{color:"theme-text",fontFamily:"'Aeonik Pro', 'Inter', system-ui, -apple-system, sans-serif"},description:{color:"theme-muted"}}},page:{views:{container:{backgroundColor:"theme-canvas",color:"theme-text",fontFamily:"'Aeonik Pro', 'Inter', system-ui, -apple-system, sans-serif"},section:{backgroundColor:"theme-canvas",borderColor:"theme-border"},surface:{backgroundColor:"theme-surface",borderColor:"theme-border",color:"theme-text"}}}},dc={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"},mc={metadata:ic,theme:lc,tokens:sc,components:cc,personality:dc},uc={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"]},pc={primary:"#008060",secondary:"#202223",success:"#008060",warning:"#FFC453",error:"#D72C0D",canvas:"#FFFFFF",surface:"#F6F6F7",text:"#202223",muted:"#6D7175",border:"#E1E3E5",onPrimary:"#FFFFFF"},hc={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"]},fc={button:{variant:"filled",size:"md",shape:"rounded",color:"theme-primary",textColor:"theme-canvas",views:{container:{borderRadius:9999,fontFamily:"'Inter', Helvetica, Arial, sans-serif",fontWeight:700,borderColor:"theme-primary",letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal",backgroundColor:null},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:"theme-canvas",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:"theme-canvas",borderColor:"theme-border",color:"theme-secondary",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:"theme-secondary",fontFamily:"'Inter', Helvetica, Arial, sans-serif",fontWeight:600,borderColor:"theme-border"},content:{color:"color-muted",fontFamily:"'Inter', Helvetica, Arial, sans-serif"},footer:{borderColor:"theme-border"}}},input:{size:"md",shape:"default",variant:"default",views:{container:{backgroundColor:"theme-canvas",borderColor:"theme-border",color:"theme-secondary",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:"theme-secondary",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:"theme-canvas",borderColor:"theme-border",color:"theme-secondary",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:"theme-secondary",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:"theme-canvas",borderColor:"theme-border",color:"theme-secondary",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:"theme-secondary",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:"theme-border",backgroundColor:"theme-canvas",_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:"theme-border",backgroundColor:"theme-canvas"},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:"theme-border"},circle:{backgroundColor:"theme-canvas"},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:"theme-border"},progress:{backgroundColor:"theme-primary"},filledTrack:{backgroundColor:"theme-primary"},thumb:{borderColor:"theme-primary",backgroundColor:"theme-canvas"},label:{color:"theme-secondary"},valueLabel:{color:"color-muted"}}},tabs:{variant:"pill",views:{headerTabs:{borderColor:"theme-border"},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:"theme-canvas"},content:{color:"theme-secondary"},container:{borderRadius:"9999px"}}},accordion:{views:{container:{borderColor:"theme-border",backgroundColor:"theme-canvas",color:"theme-secondary",borderRadius:"24px"},trigger:{color:"theme-secondary",fontFamily:"'Inter', Helvetica, Arial, sans-serif"},content:{color:"color-muted"}}},table:{views:{table:{backgroundColor:"theme-canvas",color:"theme-secondary",borderColor:"theme-border",borderRadius:12},thead:{backgroundColor:"theme-canvas",color:"theme-secondary"},th:{color:"color-muted",borderColor:"theme-border",fontFamily:"ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},tr:{borderColor:"theme-border"},td:{color:"theme-secondary",borderColor:"theme-border",letterSpacing:"-0.01em",fontStyle:"normal"},caption:{color:"color-muted",fontStyle:"italic",letterSpacing:"-0.01em"}}},avatar:{views:{container:{backgroundColor:"theme-canvas",borderColor:"theme-border",color:"theme-secondary",borderRadius:"50%"},fallback:{color:"theme-secondary",fontFamily:"'Inter', Helvetica, Arial, sans-serif"}}},alert:{views:{container:{backgroundColor:"theme-canvas",borderColor:"theme-border",borderRadius:12},title:{color:"theme-secondary",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:"theme-secondary",fontFamily:"'Inter', Helvetica, Arial, sans-serif"}}},progress:{color:"theme-primary",backgroundColor:"theme-border",radius:"16px",views:{container:{backgroundColor:"theme-border",borderRadius:"9999px"},bar:{backgroundColor:"theme-primary"},text:{color:"theme-secondary"}}},loader:{color:"theme-primary"},separator:{color:"theme-border",views:{container:{borderColor:"theme-border"},label:{color:"color-muted",fontFamily:"'Inter', Helvetica, Arial, sans-serif"}}},navigation:{views:{container:{backgroundColor:"theme-canvas",borderColor:"theme-border",color:"theme-secondary",borderRadius:"24px"},item:{color:"color-muted"},activeItem:{color:"theme-primary",borderColor:"theme-primary"}}},hero:{views:{container:{backgroundColor:"theme-canvas",color:"theme-secondary",fontFamily:"'Inter', Helvetica, Arial, sans-serif"},eyebrow:{color:"color-muted"},title:{color:"theme-secondary",fontFamily:"'Inter', Helvetica, Arial, sans-serif"},description:{color:"color-muted"}}},page:{views:{container:{backgroundColor:"theme-canvas",color:"theme-secondary",fontFamily:"'Inter', Helvetica, Arial, sans-serif"},section:{backgroundColor:"theme-canvas",borderColor:"theme-border"},surface:{backgroundColor:"theme-canvas",borderColor:"theme-border",color:"theme-secondary"}}}},gc={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"},xc={metadata:uc,theme:pc,tokens:hc,components:fc,personality:gc},bc={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"]},yc={primary:"#f0f0fa",secondary:"#a3a3a3",success:"#4ade80",warning:"#fbbf24",error:"#ef4444",canvas:"#000000",surface:"#0c0c12",text:"#f0f0fa",muted:"#7a7a8a",border:"#2a2a32",onPrimary:"#000000"},kc={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:[]},Cc={button:{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,borderColor:"theme-border",backgroundColor:"theme-surface",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:"theme-surface",color:"theme-canvas",borderColor:"theme-surface",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:"theme-surface",borderColor:"theme-border",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:"theme-border"},content:{color:"theme-border",fontFamily:"'Share Tech', Arial, Verdana, sans-serif"},footer:{borderColor:"theme-border"}}},input:{size:"md",shape:"default",variant:"default",views:{container:{backgroundColor:"theme-canvas",borderColor:"theme-border",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:"theme-canvas",borderColor:"theme-border",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:"theme-canvas",borderColor:"theme-border",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:"theme-border",backgroundColor:"theme-canvas",_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:"theme-border"},container:{borderRadius:0}}},radio:{size:"md",views:{radio:{borderColor:"theme-border",backgroundColor:"theme-canvas"},dot:{backgroundColor:"theme-primary"},label:{fontFamily:"'Share Tech', Arial, Verdana, sans-serif",fontWeight:800,letterSpacing:"0.06em",textTransform:"uppercase",fontStyle:"normal"},infoText:{color:"theme-border"},container:{borderRadius:"50%"}}},switch:{size:"sm",views:{slider:{backgroundColor:"theme-border"},circle:{backgroundColor:"theme-canvas"},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:"theme-border"},progress:{backgroundColor:"theme-primary"},filledTrack:{backgroundColor:"theme-primary"},thumb:{borderColor:"theme-primary",backgroundColor:"theme-canvas"},label:{color:"theme-primary"},valueLabel:{color:"theme-border"}}},tabs:{variant:"underline",views:{headerTabs:{borderColor:"theme-border"},tab:{color:"theme-border",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:"theme-border",backgroundColor:"theme-surface",color:"theme-primary",borderRadius:0},trigger:{color:"theme-primary",fontFamily:"'Share Tech', Arial, Verdana, sans-serif"},content:{color:"theme-border"}}},table:{views:{table:{backgroundColor:"theme-canvas",color:"theme-primary",borderColor:"theme-border",borderRadius:2},thead:{backgroundColor:"theme-surface",color:"theme-primary"},th:{color:"theme-border",borderColor:"theme-border",fontFamily:"ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace",fontWeight:800,letterSpacing:"0.06em",textTransform:"uppercase",fontStyle:"normal"},tr:{borderColor:"theme-border"},td:{color:"theme-primary",borderColor:"theme-border",letterSpacing:"0.06em",fontStyle:"normal"},caption:{color:"theme-border",fontStyle:"italic",letterSpacing:"0.06em"}}},avatar:{views:{container:{backgroundColor:"theme-surface",borderColor:"theme-border",color:"theme-primary",borderRadius:"50%"},fallback:{color:"theme-primary",fontFamily:"'Share Tech', Arial, Verdana, sans-serif"}}},alert:{views:{container:{backgroundColor:"theme-surface",borderColor:"theme-border",borderRadius:2},title:{color:"theme-primary",fontFamily:"'Share Tech', Arial, Verdana, sans-serif",fontWeight:800,letterSpacing:"0.06em",textTransform:"uppercase",fontStyle:"normal"},description:{color:"theme-border",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:"theme-border",radius:0,views:{container:{backgroundColor:"theme-border",borderRadius:"9999px"},bar:{backgroundColor:"theme-primary"},text:{color:"theme-primary"}}},loader:{color:"theme-primary"},separator:{color:"theme-border",views:{container:{borderColor:"theme-border"},label:{color:"theme-border",fontFamily:"'Share Tech', Arial, Verdana, sans-serif"}}},navigation:{views:{container:{backgroundColor:"theme-canvas",borderColor:"theme-border",color:"theme-primary",borderRadius:0},item:{color:"theme-border"},activeItem:{color:"theme-primary",borderColor:"theme-primary"}}},hero:{views:{container:{backgroundColor:"theme-canvas",color:"theme-primary",fontFamily:"'Share Tech', Arial, Verdana, sans-serif"},eyebrow:{color:"theme-border"},title:{color:"theme-primary",fontFamily:"'Share Tech', Arial, Verdana, sans-serif"},description:{color:"theme-border"}}},page:{views:{container:{backgroundColor:"theme-canvas",color:"theme-primary",fontFamily:"'Share Tech', Arial, Verdana, sans-serif"},section:{backgroundColor:"theme-canvas",borderColor:"theme-border"},surface:{backgroundColor:"theme-surface",borderColor:"theme-border",color:"theme-primary"}}}},Sc={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"},jc={metadata:bc,theme:yc,tokens:kc,components:Cc,personality:Sc},wc={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"]},vc={primary:"#1DB954",secondary:"#C1FBD4",success:"#1DB954",warning:"#D4F9E0",error:"#D4D4D8",canvas:"#000000",surface:"#121212",text:"#FFFFFF",muted:"#A1A1AA",border:"#1E2C31",onPrimary:"#000000"},Tc={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"]},Ic={button:{variant:"filled",size:"md",shape:"pill",color:"theme-primary",textColor:"theme-canvas",views:{container:{borderRadius:9999,fontFamily:"'Inter', Helvetica, Arial, sans-serif",fontWeight:800,borderColor:"theme-primary",letterSpacing:"-0.02em",textTransform:"none",fontStyle:"normal",backgroundColor:null},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:"theme-canvas",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:"theme-surface",borderColor:"theme-border",color:"theme-text",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:"theme-text",fontFamily:"'Inter', Helvetica, Arial, sans-serif",fontWeight:600,borderColor:"theme-border"},content:{color:"theme-muted",fontFamily:"'Inter', Helvetica, Arial, sans-serif"},footer:{borderColor:"theme-border"}}},input:{size:"md",shape:"default",variant:"default",views:{container:{backgroundColor:"theme-canvas",borderColor:"theme-border",color:"theme-text",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:"theme-text",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:"theme-canvas",borderColor:"theme-border",color:"theme-text",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:"theme-text",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:"theme-canvas",borderColor:"theme-border",color:"theme-text",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:"theme-text",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:"theme-border",backgroundColor:"theme-canvas",_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:"theme-muted"},container:{borderRadius:9999}}},radio:{size:"md",views:{radio:{borderColor:"theme-border",backgroundColor:"theme-canvas"},dot:{backgroundColor:"theme-primary"},label:{fontFamily:"'Inter', Helvetica, Arial, sans-serif",fontWeight:800,letterSpacing:"-0.02em",textTransform:"none",fontStyle:"normal"},infoText:{color:"theme-muted"},container:{borderRadius:"50%"}}},switch:{size:"sm",views:{slider:{backgroundColor:"theme-border"},circle:{backgroundColor:"theme-canvas"},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:"theme-border"},progress:{backgroundColor:"theme-primary"},filledTrack:{backgroundColor:"theme-primary"},thumb:{borderColor:"theme-primary",backgroundColor:"theme-canvas"},label:{color:"theme-text"},valueLabel:{color:"theme-muted"}}},tabs:{variant:"pill",views:{headerTabs:{borderColor:"theme-border"},tab:{color:"theme-muted",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:"theme-canvas"},content:{color:"theme-text"},container:{borderRadius:"9999px"}}},accordion:{views:{container:{borderColor:"theme-border",backgroundColor:"theme-surface",color:"theme-text",borderRadius:"24px"},trigger:{color:"theme-text",fontFamily:"'Inter', Helvetica, Arial, sans-serif"},content:{color:"theme-muted"}}},table:{views:{table:{backgroundColor:"theme-canvas",color:"theme-text",borderColor:"theme-border",borderRadius:8},thead:{backgroundColor:"theme-surface",color:"theme-text"},th:{color:"theme-muted",borderColor:"theme-border",fontFamily:"ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace",fontWeight:800,letterSpacing:"-0.02em",textTransform:"none",fontStyle:"normal"},tr:{borderColor:"theme-border"},td:{color:"theme-text",borderColor:"theme-border",letterSpacing:"-0.02em",fontStyle:"normal"},caption:{color:"theme-muted",fontStyle:"italic",letterSpacing:"-0.02em"}}},avatar:{views:{container:{backgroundColor:"theme-surface",borderColor:"theme-border",color:"theme-text",borderRadius:"50%"},fallback:{color:"theme-text",fontFamily:"'Inter', Helvetica, Arial, sans-serif"}}},alert:{views:{container:{backgroundColor:"theme-surface",borderColor:"theme-border",borderRadius:8},title:{color:"theme-text",fontFamily:"'Inter', Helvetica, Arial, sans-serif",fontWeight:800,letterSpacing:"-0.02em",textTransform:"none",fontStyle:"normal"},description:{color:"theme-muted",fontFamily:"'Inter', Helvetica, Arial, sans-serif"},icon:{color:"theme-primary"}}},status:{views:{indicator:{backgroundColor:"theme-primary"},label:{color:"theme-text",fontFamily:"'Inter', Helvetica, Arial, sans-serif"}}},progress:{color:"theme-primary",backgroundColor:"theme-border",radius:"16px",views:{container:{backgroundColor:"theme-border",borderRadius:"9999px"},bar:{backgroundColor:"theme-primary"},text:{color:"theme-text"}}},loader:{color:"theme-primary"},separator:{color:"theme-border",views:{container:{borderColor:"theme-border"},label:{color:"theme-muted",fontFamily:"'Inter', Helvetica, Arial, sans-serif"}}},navigation:{views:{container:{backgroundColor:"theme-canvas",borderColor:"theme-border",color:"theme-text",borderRadius:"24px"},item:{color:"theme-muted"},activeItem:{color:"theme-primary",borderColor:"theme-primary"}}},hero:{views:{container:{backgroundColor:"theme-canvas",color:"theme-text",fontFamily:"'Inter', Helvetica, Arial, sans-serif"},eyebrow:{color:"theme-muted"},title:{color:"theme-text",fontFamily:"'Inter', Helvetica, Arial, sans-serif"},description:{color:"theme-muted"}}},page:{views:{container:{backgroundColor:"theme-canvas",color:"theme-text",fontFamily:"'Inter', Helvetica, Arial, sans-serif"},section:{backgroundColor:"theme-canvas",borderColor:"theme-border"},surface:{backgroundColor:"theme-surface",borderColor:"theme-border",color:"theme-text"}}}},Fc={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"},Rc={metadata:wc,theme:vc,tokens:Tc,components:Ic,personality:Fc},zc={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"]},Mc={primary:"#635BFF",secondary:"#f96bee",success:"#15be53",warning:"#9b6829",error:"#ea2261",canvas:"#ffffff",surface:"#ffffff",text:"#061b31",muted:"#64748d",border:"#e5edf5",onPrimary:"#ffffff"},Wc={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)"]},Hc={button:{variant:"filled",size:"md",shape:"rounded",color:"theme-primary",textColor:"theme-canvas",views:{container:{borderRadius:9999,fontFamily:"'sohne-var', 'SF Pro Display', -apple-system, system-ui, sans-serif",fontWeight:700,borderColor:"theme-primary",letterSpacing:"-0.022em",textTransform:"none",fontStyle:"normal",backgroundColor:null},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:"theme-canvas",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:"theme-canvas",borderColor:"theme-border",color:"theme-text",borderRadius:12,borderWidth:"1px",borderStyle:"solid",boxShadow:"rgba(23,23,23,0.06) 0px 3px 6px 0px"},header:{color:"theme-text",fontFamily:"'sohne-var', 'SF Pro Display', -apple-system, system-ui, sans-serif",fontWeight:600,borderColor:"theme-border"},content:{color:"theme-muted",fontFamily:"'sohne-var', 'SF Pro Display', -apple-system, system-ui, sans-serif"},footer:{borderColor:"theme-border"}}},input:{size:"md",shape:"default",variant:"default",views:{container:{backgroundColor:"theme-canvas",borderColor:"theme-border",color:"theme-text",borderRadius:10,borderWidth:"1px",borderStyle:"solid",boxShadow:"0 0 0 1px theme-primary"},field:{color:"theme-text",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:"theme-canvas",borderColor:"theme-border",color:"theme-text",borderRadius:10,borderWidth:"1px",borderStyle:"solid",boxShadow:"0 0 0 1px theme-primary"},field:{color:"theme-text",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:"theme-canvas",borderColor:"theme-border",color:"theme-text",borderRadius:10,borderWidth:"1px",borderStyle:"solid",boxShadow:"0 0 0 1px theme-primary"},field:{color:"theme-text",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:"theme-border",backgroundColor:"theme-canvas",_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:"theme-muted"},container:{borderRadius:4}}},radio:{size:"md",views:{radio:{borderColor:"theme-border",backgroundColor:"theme-canvas"},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:"theme-muted"},container:{borderRadius:"50%"}}},switch:{size:"sm",views:{slider:{backgroundColor:"theme-border"},circle:{backgroundColor:"theme-canvas"},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:"theme-border"},progress:{backgroundColor:"theme-primary"},filledTrack:{backgroundColor:"theme-primary"},thumb:{borderColor:"theme-primary",backgroundColor:"theme-canvas"},label:{color:"theme-text"},valueLabel:{color:"theme-muted"}}},tabs:{variant:"underline",views:{headerTabs:{borderColor:"theme-border"},tab:{color:"theme-muted",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:"theme-text"},container:{borderRadius:"4px"}}},accordion:{views:{container:{borderColor:"theme-border",backgroundColor:"theme-canvas",color:"theme-text",borderRadius:"6px"},trigger:{color:"theme-text",fontFamily:"'sohne-var', 'SF Pro Display', -apple-system, system-ui, sans-serif"},content:{color:"theme-muted"}}},table:{views:{table:{backgroundColor:"theme-canvas",color:"theme-text",borderColor:"theme-border",borderRadius:12},thead:{backgroundColor:"theme-canvas",color:"theme-text"},th:{color:"theme-muted",borderColor:"theme-border",fontFamily:"'Source Code Pro', SFMono-Regular, ui-monospace, Menlo, monospace",fontWeight:700,letterSpacing:"-0.022em",textTransform:"none",fontStyle:"normal"},tr:{borderColor:"theme-border"},td:{color:"theme-text",borderColor:"theme-border",letterSpacing:"-0.022em",fontStyle:"normal"},caption:{color:"theme-muted",fontStyle:"italic",letterSpacing:"-0.022em"}}},avatar:{views:{container:{backgroundColor:"theme-canvas",borderColor:"theme-border",color:"theme-text",borderRadius:"50%"},fallback:{color:"theme-text",fontFamily:"'sohne-var', 'SF Pro Display', -apple-system, system-ui, sans-serif"}}},alert:{views:{container:{backgroundColor:"theme-canvas",borderColor:"theme-border",borderRadius:12},title:{color:"theme-text",fontFamily:"'sohne-var', 'SF Pro Display', -apple-system, system-ui, sans-serif",fontWeight:700,letterSpacing:"-0.022em",textTransform:"none",fontStyle:"normal"},description:{color:"theme-muted",fontFamily:"'sohne-var', 'SF Pro Display', -apple-system, system-ui, sans-serif"},icon:{color:"theme-primary"}}},status:{views:{indicator:{backgroundColor:"theme-success"},label:{color:"theme-text",fontFamily:"'sohne-var', 'SF Pro Display', -apple-system, system-ui, sans-serif"}}},progress:{color:"theme-primary",backgroundColor:"theme-border",radius:"6px",views:{container:{backgroundColor:"theme-border",borderRadius:"9999px"},bar:{backgroundColor:"theme-primary"},text:{color:"theme-text"}}},loader:{color:"theme-primary"},separator:{color:"theme-border",views:{container:{borderColor:"theme-border"},label:{color:"theme-muted",fontFamily:"'sohne-var', 'SF Pro Display', -apple-system, system-ui, sans-serif"}}},navigation:{views:{container:{backgroundColor:"theme-canvas",borderColor:"theme-border",color:"theme-text",borderRadius:"6px"},item:{color:"theme-muted"},activeItem:{color:"theme-primary",borderColor:"theme-primary"}}},hero:{views:{container:{backgroundColor:"theme-canvas",color:"theme-text",fontFamily:"'sohne-var', 'SF Pro Display', -apple-system, system-ui, sans-serif"},eyebrow:{color:"theme-muted"},title:{color:"theme-text",fontFamily:"'sohne-var', 'SF Pro Display', -apple-system, system-ui, sans-serif"},description:{color:"theme-muted"}}},page:{views:{container:{backgroundColor:"theme-canvas",color:"theme-text",fontFamily:"'sohne-var', 'SF Pro Display', -apple-system, system-ui, sans-serif"},section:{backgroundColor:"theme-canvas",borderColor:"theme-border"},surface:{backgroundColor:"theme-canvas",borderColor:"theme-border",color:"theme-text"}}}},Pc={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"},Ac={metadata:zc,theme:Mc,tokens:Wc,components:Hc,personality:Pc},Ec={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"]},Vc={primary:"#3E6AE1",secondary:"#171A20",success:"#3E6AE1",warning:"#5C5E62",error:"#171A20",canvas:"#FFFFFF",surface:"#F4F4F4",text:"#171A20",muted:"#5C5E62",border:"#D0D1D2",onPrimary:"#FFFFFF"},Dc={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)"]},$c={button:{variant:"filled",size:"md",shape:"square",color:"theme-primary",textColor:"theme-canvas",views:{container:{borderRadius:0,fontFamily:"'Inter', -apple-system, Arial, sans-serif",fontWeight:300,borderColor:"theme-primary",letterSpacing:"0.08em",textTransform:"uppercase",fontStyle:"normal",backgroundColor:null},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:"theme-canvas",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:"theme-surface",borderColor:"theme-border",color:"theme-secondary",borderRadius:0,borderWidth:"1px",borderStyle:"solid",boxShadow:"rgba(0,0,0,0.05)"},header:{color:"theme-secondary",fontFamily:"'Inter', -apple-system, Arial, sans-serif",fontWeight:600,borderColor:"theme-border"},content:{color:"theme-warning",fontFamily:"'Inter', -apple-system, Arial, sans-serif"},footer:{borderColor:"theme-border"}}},input:{size:"md",shape:"default",variant:"default",views:{container:{backgroundColor:"theme-canvas",borderColor:"theme-border",color:"theme-secondary",borderRadius:2,borderWidth:"1px",borderStyle:"solid",boxShadow:"none"},field:{color:"theme-secondary",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:"theme-canvas",borderColor:"theme-border",color:"theme-secondary",borderRadius:2,borderWidth:"1px",borderStyle:"solid",boxShadow:"none"},field:{color:"theme-secondary",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:"theme-canvas",borderColor:"theme-border",color:"theme-secondary",borderRadius:2,borderWidth:"1px",borderStyle:"solid",boxShadow:"none"},field:{color:"theme-secondary",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:"theme-border",backgroundColor:"theme-canvas",_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:"theme-border",backgroundColor:"theme-canvas"},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:"theme-border"},circle:{backgroundColor:"theme-canvas"},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:"theme-border"},progress:{backgroundColor:"theme-primary"},filledTrack:{backgroundColor:"theme-primary"},thumb:{borderColor:"theme-primary",backgroundColor:"theme-canvas"},label:{color:"theme-secondary"},valueLabel:{color:"theme-warning"}}},tabs:{variant:"underline",views:{headerTabs:{borderColor:"theme-border"},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:"theme-secondary"},container:{borderRadius:"4px"}}},accordion:{views:{container:{borderColor:"theme-border",backgroundColor:"theme-surface",color:"theme-secondary",borderRadius:0},trigger:{color:"theme-secondary",fontFamily:"'Inter', -apple-system, Arial, sans-serif"},content:{color:"theme-warning"}}},table:{views:{table:{backgroundColor:"theme-canvas",color:"theme-secondary",borderColor:"theme-border",borderRadius:0},thead:{backgroundColor:"theme-surface",color:"theme-secondary"},th:{color:"theme-warning",borderColor:"theme-border",fontFamily:"ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace",fontWeight:300,letterSpacing:"0.02em",textTransform:"uppercase",fontStyle:"normal"},tr:{borderColor:"theme-border"},td:{color:"theme-secondary",borderColor:"theme-border",letterSpacing:"0.02em",fontStyle:"normal"},caption:{color:"theme-warning",fontStyle:"italic",letterSpacing:"0.02em"}}},avatar:{views:{container:{backgroundColor:"theme-surface",borderColor:"theme-border",color:"theme-secondary",borderRadius:"50%"},fallback:{color:"theme-secondary",fontFamily:"'Inter', -apple-system, Arial, sans-serif"}}},alert:{views:{container:{backgroundColor:"theme-surface",borderColor:"theme-border",borderRadius:0},title:{color:"theme-secondary",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:"theme-secondary",fontFamily:"'Inter', -apple-system, Arial, sans-serif"}}},progress:{color:"theme-primary",backgroundColor:"theme-border",radius:"4px",views:{container:{backgroundColor:"theme-border",borderRadius:"9999px"},bar:{backgroundColor:"theme-primary"},text:{color:"theme-secondary"}}},loader:{color:"theme-primary"},separator:{color:"theme-border",views:{container:{borderColor:"theme-border"},label:{color:"theme-warning",fontFamily:"'Inter', -apple-system, Arial, sans-serif"}}},navigation:{views:{container:{backgroundColor:"theme-canvas",borderColor:"theme-border",color:"theme-secondary",borderRadius:0},item:{color:"theme-warning"},activeItem:{color:"theme-primary",borderColor:"theme-primary"}}},hero:{views:{container:{backgroundColor:"theme-canvas",color:"theme-secondary",fontFamily:"'Inter', -apple-system, Arial, sans-serif"},eyebrow:{color:"theme-warning"},title:{color:"theme-secondary",fontFamily:"'Inter', -apple-system, Arial, sans-serif"},description:{color:"theme-warning"}}},page:{views:{container:{backgroundColor:"theme-canvas",color:"theme-secondary",fontFamily:"'Inter', -apple-system, Arial, sans-serif"},section:{backgroundColor:"theme-canvas",borderColor:"theme-border"},surface:{backgroundColor:"theme-surface",borderColor:"theme-border",color:"theme-secondary"}}}},Bc={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"},_c={metadata:Ec,theme:Vc,tokens:Dc,components:$c,personality:Bc},Lc={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"]},Oc={primary:"#000000",secondary:"#efefef",success:"#06C167",warning:"#e2e2e2",error:"#000000",canvas:"#ffffff",surface:"#ffffff",text:"#000000",muted:"#4b4b4b",border:"#e2e2e2",onPrimary:"#ffffff"},Nc={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"]},qc={button:{variant:"filled",size:"md",shape:"square",color:"theme-primary",textColor:"theme-canvas",views:{container:{borderRadius:0,fontFamily:"'DM Sans', system-ui, -apple-system, 'Helvetica Neue', Helvetica, Arial, sans-serif",fontWeight:700,borderColor:"theme-primary",letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal",backgroundColor:null},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:"theme-canvas",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:"theme-canvas",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:"theme-muted",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:"theme-canvas",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:"theme-canvas",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:"theme-canvas",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:"theme-canvas",_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:"theme-muted"},container:{borderRadius:0}}},radio:{size:"md",views:{radio:{borderColor:"theme-warning",backgroundColor:"theme-canvas"},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:"theme-muted"},container:{borderRadius:"50%"}}},switch:{size:"sm",views:{slider:{backgroundColor:"theme-warning"},circle:{backgroundColor:"theme-canvas"},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:"theme-canvas"},label:{color:"theme-primary"},valueLabel:{color:"theme-muted"}}},tabs:{variant:"pill",views:{headerTabs:{borderColor:"theme-warning"},tab:{color:"theme-muted",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:"theme-canvas"},content:{color:"theme-primary"},container:{borderRadius:"9999px"}}},accordion:{views:{container:{borderColor:"theme-warning",backgroundColor:"theme-canvas",color:"theme-primary",borderRadius:0},trigger:{color:"theme-primary",fontFamily:"'DM Sans', system-ui, -apple-system, 'Helvetica Neue', Helvetica, Arial, sans-serif"},content:{color:"theme-muted"}}},table:{views:{table:{backgroundColor:"theme-canvas",color:"theme-primary",borderColor:"theme-warning",borderRadius:4},thead:{backgroundColor:"theme-canvas",color:"theme-primary"},th:{color:"theme-muted",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:"theme-muted",fontStyle:"italic",letterSpacing:"-0.01em"}}},avatar:{views:{container:{backgroundColor:"theme-canvas",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:"theme-canvas",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:"theme-muted",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:"theme-muted",fontFamily:"'DM Sans', system-ui, -apple-system, 'Helvetica Neue', Helvetica, Arial, sans-serif"}}},navigation:{views:{container:{backgroundColor:"theme-canvas",borderColor:"theme-warning",color:"theme-primary",borderRadius:0},item:{color:"theme-muted"},activeItem:{color:"theme-primary",borderColor:"theme-primary"}}},hero:{views:{container:{backgroundColor:"theme-canvas",color:"theme-primary",fontFamily:"'DM Sans', system-ui, -apple-system, 'Helvetica Neue', Helvetica, Arial, sans-serif"},eyebrow:{color:"theme-muted"},title:{color:"theme-primary",fontFamily:"'DM Sans', system-ui, -apple-system, 'Helvetica Neue', Helvetica, Arial, sans-serif"},description:{color:"theme-muted"}}},page:{views:{container:{backgroundColor:"theme-canvas",color:"theme-primary",fontFamily:"'DM Sans', system-ui, -apple-system, 'Helvetica Neue', Helvetica, Arial, sans-serif"},section:{backgroundColor:"theme-canvas",borderColor:"theme-warning"},surface:{backgroundColor:"theme-canvas",borderColor:"theme-warning",color:"theme-primary"}}}},Uc={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"},Gc={metadata:Lc,theme:Oc,tokens:Nc,components:qc,personality:Uc},Yc={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"]},Xc={primary:"#000000",secondary:"#0072f5",success:"#0a72ef",warning:"#de1d8d",error:"#ff5b4f",canvas:"#ffffff",surface:"#fafafa",text:"#000000",muted:"#666666",border:"#ebebeb",onPrimary:"#ffffff"},Kc={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)"]},Jc={button:{variant:"filled",size:"md",shape:"square",color:"theme-primary",textColor:"theme-canvas",views:{container:{borderRadius:4,fontFamily:"var(--font-sans)",fontWeight:700,borderColor:"theme-primary",letterSpacing:"-0.04em",textTransform:"none",fontStyle:"normal",backgroundColor:null},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:"theme-canvas",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:"theme-surface",borderColor:"theme-border",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:"theme-border"},content:{color:"theme-muted",fontFamily:"var(--font-sans)"},footer:{borderColor:"theme-border"}}},input:{size:"md",shape:"default",variant:"default",views:{container:{backgroundColor:"theme-canvas",borderColor:"theme-border",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:"theme-canvas",borderColor:"theme-border",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:"theme-canvas",borderColor:"theme-border",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:"theme-border",backgroundColor:"theme-canvas",_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:"theme-muted"},container:{borderRadius:0}}},radio:{size:"md",views:{radio:{borderColor:"theme-border",backgroundColor:"theme-canvas"},dot:{backgroundColor:"theme-primary"},label:{fontFamily:"var(--font-sans)",fontWeight:700,letterSpacing:"-0.04em",textTransform:"none",fontStyle:"normal"},infoText:{color:"theme-muted"},container:{borderRadius:"50%"}}},switch:{size:"sm",views:{slider:{backgroundColor:"theme-border"},circle:{backgroundColor:"theme-canvas"},label:{fontFamily:"var(--font-sans)",fontWeight:700,letterSpacing:"-0.04em",textTransform:"none",fontStyle:"normal"},container:{borderRadius:"9999px"}}},slider:{backgroundColor:"theme-primary",views:{track:{backgroundColor:"theme-border"},progress:{backgroundColor:"theme-primary"},filledTrack:{backgroundColor:"theme-primary"},thumb:{borderColor:"theme-primary",backgroundColor:"theme-canvas"},label:{color:"theme-primary"},valueLabel:{color:"theme-muted"}}},tabs:{variant:"underline",views:{headerTabs:{borderColor:"theme-border"},tab:{color:"theme-muted",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:"theme-border",backgroundColor:"theme-surface",color:"theme-primary",borderRadius:"6px"},trigger:{color:"theme-primary",fontFamily:"var(--font-sans)"},content:{color:"theme-muted"}}},table:{views:{table:{backgroundColor:"theme-canvas",color:"theme-primary",borderColor:"theme-border",borderRadius:4},thead:{backgroundColor:"theme-surface",color:"theme-primary"},th:{color:"theme-muted",borderColor:"theme-border",fontFamily:"'Geist Mono', ui-monospace, SFMono-Regular, 'Roboto Mono', Menlo, monospace",fontWeight:700,letterSpacing:"-0.04em",textTransform:"none",fontStyle:"normal"},tr:{borderColor:"theme-border"},td:{color:"theme-primary",borderColor:"theme-border",letterSpacing:"-0.04em",fontStyle:"normal"},caption:{color:"theme-muted",fontStyle:"italic",letterSpacing:"-0.04em"}}},avatar:{views:{container:{backgroundColor:"theme-surface",borderColor:"theme-border",color:"theme-primary",borderRadius:"50%"},fallback:{color:"theme-primary",fontFamily:"var(--font-sans)"}}},alert:{views:{container:{backgroundColor:"theme-surface",borderColor:"theme-border",borderRadius:4},title:{color:"theme-primary",fontFamily:"var(--font-sans)",fontWeight:700,letterSpacing:"-0.04em",textTransform:"none",fontStyle:"normal"},description:{color:"theme-muted",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:"theme-border",radius:"6px",views:{container:{backgroundColor:"theme-border",borderRadius:"9999px"},bar:{backgroundColor:"theme-primary"},text:{color:"theme-primary"}}},loader:{color:"theme-primary"},separator:{color:"theme-border",views:{container:{borderColor:"theme-border"},label:{color:"theme-muted",fontFamily:"var(--font-sans)"}}},navigation:{views:{container:{backgroundColor:"theme-canvas",borderColor:"theme-border",color:"theme-primary",borderRadius:"6px"},item:{color:"theme-muted"},activeItem:{color:"theme-primary",borderColor:"theme-primary"}}},hero:{views:{container:{backgroundColor:"theme-canvas",color:"theme-primary",fontFamily:"var(--font-sans)"},eyebrow:{color:"theme-muted"},title:{color:"theme-primary",fontFamily:"var(--font-sans)"},description:{color:"theme-muted"}}},page:{views:{container:{backgroundColor:"theme-canvas",color:"theme-primary",fontFamily:"var(--font-sans)"},section:{backgroundColor:"theme-canvas",borderColor:"theme-border"},surface:{backgroundColor:"theme-surface",borderColor:"theme-border",color:"theme-primary"}}}},Qc={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"},Zc={metadata:Yc,theme:Xc,tokens:Kc,components:Jc,personality:Qc},Rt={airbnb:js,apple:Rs,coinbase:As,figma:_s,linear:Gs,nike:Zs,notion:ac,revolut:mc,shopify:xc,spacex:jc,spotify:Rc,stripe:Ac,tesla:_c,uber:Gc,vercel:Zc},ed=Object.values(Rt),ua=Rt.airbnb,No=e=>!!e&&typeof e=="object"&&!Array.isArray(e)&&Object.prototype.toString.call(e)==="[object Object]",Fr=e=>e,Ee=(...e)=>{const o={};return e.forEach(r=>{No(r)&&Object.entries(r).forEach(([n,a])=>{if(a!=null){if(No(a)&&No(o[n])){o[n]=Ee(o[n],a);return}o[n]=a}})}),o},pa=e=>{if(Array.isArray(e)||!No(e))return e;const o={};for(const[r,n]of Object.entries(e))n!==null&&(o[r]=No(n)?pa(n):n);return o},Rr=(e,o)=>{if(!o)return{};const r=o.components[e]||{};return Fr(pa(r))},ha=(e,o,r)=>{const{config:n,...a}=o,i=Rr(e,r),s=Ee(i,n||{});return Fr(Ee(s,a))},fa=u.createContext({isEnabled:!1}),ga=({children:e,config:o,configId:r})=>{const n=o||(r?Rt[r]:null)||ua,a=u.useMemo(()=>({config:n,configId:n.metadata.id,isEnabled:!0}),[n]);return t.jsx(fa.Provider,{value:a,children:t.jsx(l.ThemeProvider,{theme:n.theme,mode:n.metadata.defaultAppearance,transparentWrapper:!0,children:t.jsx("div",{"data-design-system":n.metadata.id,"data-appearance":n.metadata.defaultAppearance,style:{display:"contents"},children:e})})})},zt=()=>u.useContext(fa),Fo=e=>{const{config:o}=zt();return Rr(e,o)},pe=(e,o)=>{const{config:r}=zt();return ha(e,o,r)},xa=u.createContext({expandedItems:[],toggleItem:()=>{},isItemExpanded:()=>!1,type:"single",collapsible:!1,baseId:""}),od=({children:e,value:o})=>t.jsx(xa.Provider,{value:o,children:e}),ba=()=>{const e=u.useContext(xa);if(!e)throw new Error("useAccordionContext must be used within an AccordionProvider");return e},td=({value:e,children:o,isDisabled:r=!1,views:n,...a})=>{var f;const{isItemExpanded:i,baseId:s}=ba(),m=Fo("accordion"),d=Ee({item:(f=m.views)==null?void 0:f.container},n),c=i(e),p=`${s}-trigger-${e}`,h=`${s}-content-${e}`;return t.jsx(l.View,{borderWidth:1,borderStyle:"solid",borderColor:"color-gray-200",overflow:"hidden",opacity:r?.5:1,pointerEvents:r?"none":"auto","data-state":c?"open":"closed","data-disabled":r?"":void 0,...d==null?void 0:d.item,...a,children:u.Children.map(o,g=>u.isValidElement(g)?u.cloneElement(g,{...g.props,value:e,isExpanded:c,isDisabled:r,triggerId:p,contentId:h}):g)})},rd=({children:e,value:o,isExpanded:r,isDisabled:n,triggerId:a,contentId:i,views:s,asChild:m=!1,...d})=>{var x;const{toggleItem:c}=ba(),p=Fo("accordion"),h=Ee({container:(x=p.views)==null?void 0:x.trigger},s),g={id:a,"aria-expanded":r,"aria-controls":i,"aria-disabled":n,"data-state":r?"open":"closed","data-disabled":n?"":void 0,onClick:()=>{o&&!n&&c(o)},padding:16,cursor:n?"not-allowed":"pointer",alignItems:"center",justifyContent:"space-between",width:"100%",style:{backgroundColor:"transparent"},...h==null?void 0:h.container,...d};if(m&&u.isValidElement(e)){const b=u.Children.only(e);return u.cloneElement(b,{...g,...b.props})}return t.jsxs(l.Horizontal,{...g,children:[e,t.jsx(l.View,{width:24,height:24,display:"flex",alignItems:"center",justifyContent:"center",transition:"transform 0.2s ease",transform:r?"rotate(180deg)":"rotate(0deg)",...h==null?void 0:h.icon,children:t.jsx("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:t.jsx("path",{d:"M16.59 8.59L12 13.17L7.41 8.59L6 10L12 16L18 10L16.59 8.59Z",fill:"currentColor"})})})]})},nd=({children:e,isExpanded:o,isDisabled:r,triggerId:n,contentId:a,views:i,...s})=>{var S;const m=Fo("accordion"),d=Ee({container:(S=m.views)==null?void 0:S.content},i),c=260,p=u.useRef(null),h=u.useRef(null),[f,g]=u.useState(!!o),[x,b]=u.useState(o?"none":"0px"),[y,k]=u.useState(o?1:0);return u.useEffect(()=>()=>{h.current&&clearTimeout(h.current)},[]),u.useEffect(()=>{var C;if(h.current&&(clearTimeout(h.current),h.current=null),o){g(!0),requestAnimationFrame(()=>{var v;const j=((v=p.current)==null?void 0:v.scrollHeight)??0;b(`${j}px`),k(1)});return}const w=((C=p.current)==null?void 0:C.scrollHeight)??0;b(`${w}px`),k(1),requestAnimationFrame(()=>{b("0px"),k(0)}),h.current=setTimeout(()=>{g(!1)},c)},[o,e]),u.useEffect(()=>{var C;if(!o||!f)return;const w=((C=p.current)==null?void 0:C.scrollHeight)??0;b(`${w}px`)},[e,o,f]),f?t.jsx(l.View,{id:a,role:"region","aria-labelledby":n,overflow:"hidden",maxHeight:x,opacity:y,transition:`max-height ${c}ms cubic-bezier(0.22, 1, 0.36, 1), opacity ${c}ms ease`,"data-state":o?"open":"closed","data-disabled":r?"":void 0,style:{backgroundColor:"transparent"},...d==null?void 0:d.container,...s,children:t.jsx(l.View,{ref:p,padding:16,children:e})}):null},ad=({children:e,shape:o="rounded",variant:r="default",views:n,baseId:a,type:i,collapsible:s,themeMode:m,...d})=>t.jsx(l.Vertical,{width:"100%","data-orientation":"vertical",...gs[o],...xs[r],...n==null?void 0:n.container,...d,children:e}),id=e=>{const o=pe("accordion",e),{children:r,type:n="single",value:a,defaultValue:i,onValueChange:s,collapsible:m=!1,shape:d="rounded",variant:c="default",views:p,...h}=o,f=Array.isArray(i)?i:i?[i]:void 0,g=fs({type:n,value:a,defaultValue:i??f,onValueChange:s,collapsible:m});return t.jsx(od,{value:{expandedItems:g.expandedItems,toggleItem:g.toggleItem,isItemExpanded:g.isItemExpanded,type:g.type,collapsible:g.collapsible,baseId:g.baseId},children:t.jsx(ad,{shape:d,variant:c,views:p,baseId:g.baseId,type:g.type,collapsible:g.collapsible,...h,children:r})})},ze=id;ze.Item=td;ze.Trigger=rd;ze.Content=nd;const Xt=new Map,ld=(e,o,r)=>(Xt.has(e)||Xt.set(e,u.lazy(()=>import("lucide-react/dynamicIconImports").then(n=>{const a=n.default[e];return a?a():{default:()=>t.jsx(t.Fragment,{children:o||r})}}))),Xt.get(e)),fn=u.memo(({widthHeight:e,color:o="currentColor",transform:r,orientation:n="up",children:a,...i})=>t.jsx(l.View,{widthHeight:e,color:o,display:"flex",alignItems:"center",justifyContent:"center",transform:r||(n==="left"?"rotate(-90deg)":n==="right"?"rotate(90deg)":n==="up"?"rotate(0deg)":n==="down"?"rotate(180deg)":"none"),...i,children:a})),bt=u.memo(({name:e="circle",widthHeight:o=24,color:r="currentColor",filled:n=!1,strokeWidth:a=1,size:i,children:s,fallback:m,...d})=>{const{getColor:c}=l.useTheme(),p=i||o,h=u.useMemo(()=>{const x=c(r);return{fill:n?x:"none",stroke:x,strokeWidth:a,strokeLinecap:"round",strokeLinejoin:"round"}},[n,r,a,c]);if(!e)return t.jsx(fn,{widthHeight:o,color:r,...d,children:s});const f=e.toLowerCase().replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase(),g=ld(f,m,s);return t.jsx(fn,{widthHeight:p,color:r,...d,children:t.jsx(u.Suspense,{fallback:m||null,children:t.jsx(g,{size:p,...h})})})}),N=(e,o={})=>{const r=n=>t.jsx(bt,{name:e,...o,...n});return r.displayName=`${e}Icon`,r},sd=N("user",{filled:!1}),cd=N("circle-help",{filled:!1}),dd=N("folder",{filled:!1}),se=N("chevron-up",{filled:!1}),md=N("grip-vertical",{filled:!1}),oo=N("file",{filled:!1}),ud=N("video",{filled:!1}),pd=N("image",{filled:!1}),jo=N("volume",{filled:!1}),hd=N("twitter",{filled:!1}),fd=N("x",{filled:!1}),gd=N("twitch",{filled:!1}),ve=N("x",{filled:!1,strokeWidth:2}),xd=N("instagram",{filled:!1}),bd=N("youtube",{filled:!1}),yd=N("facebook",{filled:!1}),kd=N("linkedin",{filled:!1}),Cd=N("at-sign",{filled:!1}),ya=N("minus",{filled:!1}),qe=N("info",{filled:!1}),ka=N("play",{filled:!1}),Sd=N("pause",{filled:!1}),jd=N("heart",{filled:!1}),wd=N("star",{filled:!1}),vd=N("save",{filled:!1}),zr=N("triangle-alert",{filled:!1}),Td=N("battery",{filled:!1}),Id=N("bookmark",{filled:!1}),Fd=N("cloud",{filled:!1}),Rd=N("copy",{filled:!1}),Mt=N("trash",{filled:!1}),zd=Mt,Md=N("edit",{filled:!1}),Mr=N("mic",{filled:!1}),Wt=N("square",{filled:!1}),Wr=N("send",{filled:!1}),Hr=N("loader",{filled:!1}),Go=N("paperclip",{filled:!1}),yt=N("search",{filled:!1}),Wd=N("home",{filled:!1}),Ca=N("settings",{filled:!1}),Hd=N("download",{filled:!1}),Sa=N("share",{filled:!1}),Ht=N("check",{filled:!1}),Pd=N("plus",{filled:!1}),Pr=N("eye-off",{filled:!1}),Ar=N("eye",{filled:!1}),Ad=N("lock",{filled:!1}),Ed=N("user",{filled:!1}),ja=N("external-link",{filled:!1}),Er=N("check-circle",{filled:!1}),Pt=N("alert-circle",{filled:!1}),Vd=N("bell",{filled:!1}),Dd=N("file-text",{filled:!1}),$d=N("bar-chart",{filled:!1}),Bd=N("moon",{filled:!1}),wa=N("panel-left",{filled:!1}),Vr=N("upload",{filled:!1}),_d=Ht,Ld=e=>t.jsx(se,{orientation:"left",...e}),Od=N("zoom-out",{filled:!1}),Nd=N("type",{filled:!1}),qd=N("shapes",{filled:!1}),Ud=N("rotate-cw",{filled:!1}),Gd=N("gift",{filled:!1}),Yd=N("shield",{filled:!1}),Xd=N("log-out",{filled:!1}),Kd=N("power",{filled:!1}),Jd=N("link",{filled:!1}),Qd=N("layout",{filled:!1}),Zd=N("zap",{filled:!1}),em=N("credit-card",{filled:!1}),om=N("more-horizontal",{filled:!1}),tm=Mt,rm=N("filter",{filled:!1}),nm=N("calendar",{filled:!1}),am=N("clock",{filled:!1}),im=N("map-pin",{filled:!1}),lm=N("menu",{filled:!1}),sm=N("refresh-cw",{filled:!1}),cm=N("printer",{filled:!1}),dm=N("wand",{filled:!1}),mm=N("thumbs-down",{filled:!1}),um=N("thumbs-up",{filled:!1}),pm=N("camera",{filled:!1}),hm=N("bluetooth",{filled:!1}),fm=N("unlock",{filled:!1}),gm=N("wifi",{filled:!1}),xm=N("arrow-right",{filled:!1}),bm=N("arrow-up",{filled:!1}),ym=N("loader",{filled:!1}),km=N("sliders-horizontal",{filled:!1}),Cm=N("crop",{filled:!1}),Sm=N("zoom-in",{filled:!1}),jm=N("grip-horizontal",{filled:!1}),va=N("mouse-pointer-2",{filled:!1}),wm=e=>{const o=e==="dark";return{default:{container:{backgroundColor:o?"color-gray-900":"color-gray-50",borderColor:o?"color-gray-700":"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:o?"color-gray-200":"color-gray-700"},icon:{color:o?"color-gray-400":"color-gray-500"}},info:{container:{backgroundColor:o?"color-blue-950":"color-blue-50",borderColor:o?"color-blue-800":"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:o?"color-blue-200":"color-blue-700"},icon:{color:o?"color-blue-300":"color-blue-500"}},success:{container:{backgroundColor:o?"color-green-950":"color-green-50",borderColor:o?"color-green-800":"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:o?"color-green-200":"color-green-700"},icon:{color:o?"color-green-300":"color-green-500"}},error:{container:{backgroundColor:o?"color-red-950":"color-red-50",borderColor:o?"color-red-800":"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:o?"color-red-200":"color-red-700"},icon:{color:o?"color-red-300":"color-red-500"}},warning:{container:{backgroundColor:o?"color-orange-950":"color-orange-50",borderColor:o?"color-orange-800":"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:o?"color-orange-200":"color-orange-700"},icon:{color:o?"color-orange-300":"color-orange-500"}}}},vm=u.memo(({icon:e,title:o="",views:r,description:n="",variant:a="default",themeMode:i,children:s,...m})=>{const{themeMode:d}=l.useTheme(),c=i||d,p=u.useMemo(()=>wm(c),[c]),h=()=>{var x;if(e)return e;const g={size:20,color:((x=r==null?void 0:r.icon)==null?void 0:x.color)??p[a].icon.color};switch(a){case"info":return t.jsx(qe,{...g});case"success":return t.jsx(Er,{...g});case"error":return t.jsx(Pt,{...g});case"warning":default:return t.jsx(zr,{...g})}};return t.jsxs(l.Horizontal,{gap:12,padding:"12px 16px",flexWrap:"nowrap",alignItems:"flex-start",borderRadius:"8px",borderWidth:"1px",borderStyle:"solid",borderColor:p[a].container.borderColor,backgroundColor:p[a].container.backgroundColor,boxShadow:p[a].container.boxShadow,transition:"background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease",...r==null?void 0:r.container,...m,children:[t.jsx(l.View,{alignSelf:"flex-start",marginTop:"2px",...r==null?void 0:r.icon,children:h()}),t.jsxs(l.Vertical,{gap:4,children:[o?t.jsx(l.Text,{fontSize:"14px",fontWeight:"600",lineHeight:"20px",color:p[a].content.color,...r==null?void 0:r.title,children:o}):null,t.jsx(l.Text,{fontSize:"12px",fontWeight:"400",lineHeight:"16px",color:p[a].content.color,...r==null?void 0:r.description,children:n||s})]})]})}),Tm=e=>{const o=pe("alert",e);return t.jsx(vm,{...o})},Dr=Tm,Im=({ratio:e=16/9,children:o,views:r,...n})=>t.jsx(l.View,{width:"100%",position:"relative",overflow:"hidden",paddingTop:`${1/e*100}%`,borderRadius:8,...n,...r==null?void 0:r.center,children:t.jsx(l.View,{position:"absolute",top:0,right:0,bottom:0,left:0,...r==null?void 0:r.view,children:o})}),Fm=({ratio:e,children:o,...r})=>t.jsx(Im,{ratio:e,...r,children:o}),Ta=Fm;function Rm(e,o,r){return Math.min(Math.max(e,o),r)}const zm=({bars:e,isPaused:o,...r})=>{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 t.jsx(l.Horizontal,{alignItems:"center",minWidth:120,gap:2,height:24,width:"100%",maxWidth:"100%",...r,children:e.map((i,s)=>t.jsx(l.View,{width:3,borderRadius:2,backgroundColor:o?"color-gray-300":i>=0?"theme-primary":"color-gray-300",style:{height:`${i>=0?Rm(i*300,6,24):a[s%a.length]}px`}},s))})},$r=({analyserNode:e,isPaused:o,...r})=>{const n=u.useRef(null),a=60,i=32,[s,m]=u.useState([]);return u.useEffect(()=>{if(!e){m(Array(a).fill(-1));return}const d=e.frequencyBinCount,c=new Uint8Array(d),p=()=>{e.getByteTimeDomainData(c);let h=0;for(let g=0;g<d;g++){const x=(c[g]-128)/128;h+=x*x}const f=Math.sqrt(h/d);u.startTransition(()=>{m(g=>{const b=[...g,f].slice(-a);return b.length<a?[...Array(a-b.length).fill(-1),...b]:b})})};return n.current=setInterval(p,i),()=>{n.current&&clearInterval(n.current)}},[e]),t.jsx(zm,{bars:s,isPaused:o,...r})},At=Ft.create(e=>({visible:!1,title:"",subtitle:"",variant:"info",isClosable:!1,views:{},action:()=>{},actionText:"",showIcon:!1,timeout:3e3,show:(o,r="",n="",a,i,s,m,d,c)=>e({visible:!0,variant:o,title:r,subtitle:n,isClosable:a,views:i,action:s,actionText:m,showIcon:d,timeout:c}),hide:()=>e({visible:!1})})),Ia=(e,o,r,n)=>{At.getState().show(e,o,r,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)},Fa=()=>{At.getState().hide()},Mm={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:r,subtitle:n,theme:a,action:i,actionText:s,showIcon:m=!1,isClosable:d=!1,timeout:c=3e3,views:p})=>{var k,S;u.useEffect(()=>{if(c&&!d){const w=setTimeout(()=>{o()},c);return()=>{clearTimeout(w)}}},[]);const h=a??Mm,f=!!(i&&s),g={borderWidth:1,borderStyle:"solid",borderRadius:12,borderColor:`${h[e].container.border}`,boxShadow:"0 8px 24px rgba(15, 23, 42, 0.06)"},x={info:"#3b82f6",success:"#4ade80",warning:"#f97316",error:"#ef4444"}[e],b={info:t.jsx(qe,{widthHeight:24,color:x,...p==null?void 0:p.icon}),success:t.jsx(Er,{widthHeight:24,color:x,...p==null?void 0:p.icon}),warning:t.jsx(zr,{widthHeight:24,color:x,...p==null?void 0:p.icon}),error:t.jsx(Pt,{widthHeight:24,color:x,...p==null?void 0:p.icon})}[e],y=m&&b;return t.jsxs(l.Horizontal,{role:"messageContent",gap:12,width:"100%",maxWidth:520,flexWrap:"nowrap",position:"relative",alignItems:"flex-start",padding:"12px 14px",color:`${h[e].content.color}`,backgroundColor:`${h[e].container.backgroundColor}`,onClick:d?()=>{}:()=>{o()},...g,transition:"background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease",...p==null?void 0:p.container,children:[y&&b,t.jsxs(l.Vertical,{gap:4,width:"100%",children:[t.jsx(l.Text,{size:"md",weight:"semiBold",...p==null?void 0:p.title,children:r}),n&&t.jsx(l.Text,{size:"sm",lineHeight:"20px",color:h[e].content.color,...p==null?void 0:p.subtitle,children:n})]}),f&&t.jsx(l.View,{as:"button",type:"button",onClick:i,backgroundColor:"rgba(255, 255, 255, 0.9)",borderWidth:"1px",borderStyle:"solid",borderColor:h[e].container.border,borderRadius:"9999px",padding:"6px 12px",cursor:"pointer",transition:"background-color 0.2s ease, border-color 0.2s ease",...p==null?void 0:p.actionText,children:t.jsx(l.Text,{whiteSpace:"nowrap",size:"sm",weight:"semiBold",color:h[e].content.color,children:s})}),d&&t.jsx(l.View,{position:"absolute",zIndex:1e4,right:8,top:8,onClick:()=>{o()},cursor:"pointer",padding:"4px",borderRadius:"9999px",transition:"background-color 0.2s ease",...(k=p==null?void 0:p.closingIcon)==null?void 0:k.container,children:t.jsx(ve,{widthHeight:16,color:h[e].close.color,...(S=p==null?void 0:p.closingIcon)==null?void 0:S.icon})})]})},Wm=({container:e,theme:o,position:r="topRight"})=>{const{visible:n,title:a,variant:i,subtitle:s,isClosable:m,views:d,action:c,actionText:p,showIcon:h,timeout:f}=At(),g={topLeft:{top:6,left:8},topRight:{top:6,right:8},bottomLeft:{bottom:8,left:6},bottomRight:{bottom:8,right:6}}[r],x=()=>t.jsx(Ra,{variant:i,subtitle:s,show:n,title:a,theme:o,isClosable:m,views:d,action:c,actionText:p,showIcon:h,timeout:f,hide:()=>Fa()}),b=e?u.cloneElement(e,{},x()):t.jsx(l.View,{position:"absolute",zIndex:1e4,...g,children:x()});return n?b:null},Hm=(e,o)=>{const r=document.createElement("video");r.preload="metadata",r.onloadedmetadata=()=>{r.currentTime=1},r.oncanplay=()=>{const n=document.createElement("canvas");n.width=r.videoWidth,n.height=r.videoHeight;const a=n.getContext("2d");if(a){a.drawImage(r,0,0,n.width,n.height);const i=n.toDataURL("image/jpeg");o(i)}URL.revokeObjectURL(r.src)},r.src=URL.createObjectURL(e)},Pm=({maxSize:e=100*1024*1024,onFileSelect:o,onMultipleFileSelect:r,validateFile:n,thumbnail:a,multiple:i=!1,onError:s=m=>{Ia("error","Error",m)}})=>{const m=u.useRef(null),d=u.useRef(null),[c,p]=u.useState(null),[h,f]=u.useState([]),[g,x]=u.useState(null),[b,y]=u.useState(null),[k,S]=u.useState(a||null),w=u.useCallback(j=>{const v=j.target.files;if(x(null),!v||v.length===0){s("No file selected"),x("No file selected");return}if(i){const I=Array.from(v),F=[];for(const W of I){if(W.size>e){s(`File ${W.name} exceeds ${Math.round(e/(1024*1024))}MB.`),x(`File ${W.name} exceeds ${Math.round(e/(1024*1024))}MB.`);continue}if(n){const E=n(W);if(E){s(`${W.name}: ${E}`),x(`${W.name}: ${E}`);continue}}F.push(W)}F.length>0&&(f(F),r&&r(F))}else{const I=v[0];if(I.size>e){s(`File exceeds ${Math.round(e/(1024*1024))}MB.`),x(`File exceeds ${Math.round(e/(1024*1024))}MB.`);return}if(n){const F=n(I);if(F){s(F),x(F);return}}y(URL.createObjectURL(I)),I.type.startsWith("video/")&&Hm(I,S),o&&(p(I),o(I))}},[e,o,r,n,i]),C=()=>{var j;return(j=m.current)==null?void 0:j.click()};return u.useEffect(()=>()=>{b&&URL.revokeObjectURL(b),k&&URL.revokeObjectURL(k)},[b,k]),{previewUrl:b,thumbnailUrl:k,errorMessage:g,fileInputRef:m,videoRef:d,selectedFile:c,selectedFiles:h,handleFileChange:w,handleClick:C}},Am=({accept:e,isLoading:o=!1,progress:r=0,icon:n,text:a,previewUrl:i,thumbnailUrl:s,errorMessage:m,fileInputRef:d,videoRef:c,selectedFile:p,selectedFiles:h,handleFileChange:f,handleClick:g,multiple:x=!1,containerProps:b,errorMessageProps:y,progressProps:k,videoProps:S,imageProps:w,iconProps:C,textProps:j,fileType:v,previewUrl:I,renderError:F=({errorMessage:R,errorMessageProps:H,themeMode:M})=>t.jsx(l.Text,{color:"red",fontSize:12,marginTop:8,...H,...z==null?void 0:z.text,children:R}),renderText:W=({text:R,textProps:H})=>t.jsx(l.Text,{marginTop:8,...H,...z==null?void 0:z.text,children:R}),renderFile:E=({selectedFile:R,textProps:H})=>R?t.jsxs(l.Center,{marginTop:8,gap:10,flexDirection:"column",...z==null?void 0:z.container,children:[t.jsx(l.Text,{maxLines:2,...H,...z==null?void 0:z.text,children:R.name}),t.jsxs(l.Text,{...H,...z==null?void 0:z.text,children:["(",Math.round(R.size/1024)," KB)"]})]}):null,renderVideo:T=({selectedFile:R,videoRef:H,videoProps:M})=>t.jsx(l.View,{width:"100%",height:"100%",position:"relative",...z==null?void 0:z.view,children:t.jsx(l.View,{as:"video",width:"100%",height:"100%",src:R?URL.createObjectURL(R):void 0,style:{objectFit:"cover"},ref:H,...M,...z==null?void 0:z.view})}),renderImage:A=({previewUrl:R,imageProps:H})=>(console.log("Rendering image with URL:",R),t.jsx(l.View,{width:"100%",height:"100%",position:"relative",...z==null?void 0:z.view,children:t.jsx(l.Image,{src:R,alt:"Preview",width:"100%",height:"100%",objectFit:"cover",style:{maxHeight:"100%",maxWidth:"100%"},...H,...z==null?void 0:z.image})})),renderProgress:P=({progress:R,progressProps:H})=>t.jsxs(l.Horizontal,{gap:8,alignItems:"center",...H,...z==null?void 0:z.horizontal,children:[t.jsx(l.View,{height:4,backgroundColor:"rgba(0,0,0,0.1)",width:"100%",borderRadius:2,...z==null?void 0:z.view,children:t.jsx(l.View,{height:4,width:`${R}%`,borderRadius:2,backgroundColor:"color-dark-50",...z==null?void 0:z.view})}),t.jsxs(l.Text,{fontSize:12,...z==null?void 0:z.text,children:[R,"%"]})]}),views:z={}})=>{const R=I||i;return t.jsxs(l.Center,{onClick:g,cursor:"pointer",border:"1px solid rgba(0,0,0,0.1)",borderRadius:8,padding:16,flexDirection:"column",overflow:"hidden",position:"relative",height:p&&r===100?"200px":"auto",...b,...z==null?void 0:z.container,children:[r===100&&v==="image"&&R&&A({previewUrl:R,imageProps:w}),r===100&&v==="video"&&s&&T({selectedFile:p,thumbnailUrl:s,videoRef:c,videoProps:S,imageProps:w}),r===100&&v==="file"&&p&&E({selectedFile:p,textProps:j}),r<100&&(n||t.jsx(Vr,{widthHeight:32,...C})),!o&&!p&&a&&W({text:a,textProps:j}),o&&P({progress:r,progressProps:k}),!o&&m&&F({errorMessage:m,errorMessageProps:y}),t.jsx(l.Input,{type:"file",ref:d,onChange:f,accept:e,multiple:x,style:{display:"none"},...z==null?void 0:z.view})]})},Et=({accept:e="*/*",icon:o,text:r,maxSize:n,onFileSelect:a,onMultipleFileSelect:i,validateFile:s,isLoading:m=!1,progress:d=0,fileType:c,multiple:p=!1,...h})=>{const{previewUrl:f,thumbnailUrl:g,errorMessage:x,videoRef:b,fileInputRef:y,selectedFile:k,selectedFiles:S,handleFileChange:w,handleClick:C}=Pm({maxSize:n,onFileSelect:a,onMultipleFileSelect:i,validateFile:s,multiple:p}),v=(()=>{if(c)return c;if(k)return k.type.startsWith("image/")?"image":k.type.startsWith("video/")?"video":"file"})();return t.jsx(Am,{handleClick:C,accept:e,isLoading:m,progress:d,icon:o,text:r,maxSize:n,onFileSelect:a,validateFile:s,errorMessage:x,handleFileChange:w,selectedFile:k,selectedFiles:S,videoRef:b,fileInputRef:y,previewUrl:f,thumbnailUrl:g,fileType:v,multiple:p,...h})};function Em(e){const o=Math.floor(e/60),r=e%60;return`${o}:${r.toString().padStart(2,"0")}`}function Vm({onAudio:e,recording:o,paused:r,audioBlob:n,analyserNode:a,duration:i,error:s,startRecording:m,stopRecording:d,pauseRecording:c,resumeRecording:p,resetRecording:h,handleFileChange:f,...g}){const[x,b]=u.useState(null);u.useEffect(()=>{if(n){const S=URL.createObjectURL(n);return b({url:S,label:`recording-${Date.now()}.webm`}),()=>{URL.revokeObjectURL(S)}}return()=>{}},[n]);const y=()=>{x!=null&&x.url&&URL.revokeObjectURL(x.url),b(null),h()},k=S=>{e(S),x!=null&&x.url&&URL.revokeObjectURL(x.url),b({url:URL.createObjectURL(S),label:S.name})};return t.jsxs(l.Vertical,{gap:"10px",width:"100%",...g,children:[t.jsxs(l.Horizontal,{gap:12,alignItems:"center",padding:"12px 14px",border:"1px solid #E5E7EB",borderRadius:"12px",backgroundColor:"color-white",children:[t.jsx(Et,{accept:"audio/*",icon:t.jsx(Go,{widthHeight:16}),maxSize:100*1024*1024,onFileSelect:k,fileType:"file",multiple:!1,renderError:({errorMessage:S})=>null,views:{container:{width:"36px",height:"36px",cursor:"pointer",border:"1px solid #E5E7EB",borderRadius:"10px",backgroundColor:"color-white",transition:"background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease",_hover:{backgroundColor:"#F8FAFC",borderColor:"#CBD5E1"}}},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"}),t.jsx(l.View,{as:"button",type:"button",onClick:o?d:m,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?t.jsx(Wt,{widthHeight:14,color:"currentColor",filled:!1}):t.jsx(Mr,{widthHeight:18,color:"currentColor",filled:!1})}),t.jsx(l.View,{flex:1,minWidth:120,children:t.jsx($r,{analyserNode:o?a:null,isPaused:!o||r})}),t.jsx(l.Text,{fontSize:"12px",lineHeight:"16px",color:"color-gray-500",whiteSpace:"nowrap",children:Em(i)})]}),x&&!o&&t.jsxs(l.Vertical,{gap:"8px",padding:"12px 14px",border:"1px solid #E5E7EB",borderRadius:"12px",backgroundColor:"color-white",children:[t.jsxs(l.Horizontal,{alignItems:"center",justifyContent:"space-between",gap:8,children:[t.jsx(l.Text,{fontSize:"12px",lineHeight:"16px",color:"color-gray-500",children:x.label}),t.jsx(l.View,{as:"button",type:"button",onClick:y,width:"24px",height:"24px",display:"flex",alignItems:"center",justifyContent:"center",border:"0",backgroundColor:"transparent",color:"color-gray-500",cursor:"pointer",children:t.jsx(ve,{widthHeight:14,color:"currentColor"})})]}),t.jsx(l.View,{as:"audio",controls:!0,src:x.url,width:"100%"})]}),s&&t.jsx(l.Text,{fontSize:"11px",lineHeight:"16px",color:"color-red-500",children:s})]})}function za(){const[e,o]=u.useState(!1),[r,n]=u.useState(!1),[a,i]=u.useState(0),[s,m]=u.useState(null),[d,c]=u.useState(null),[p,h]=u.useState(null),f=u.useRef(null),g=u.useRef(null),x=u.useRef(null),b=u.useRef(null),y=u.useRef([]),k=u.useRef(null),S=typeof MediaRecorder<"u"&&MediaRecorder.isTypeSupported("audio/webm;codecs=opus")?"audio/webm;codecs=opus":"audio/webm",w=u.useCallback(()=>{f.current&&(f.current.state!=="inactive"&&f.current.stop(),f.current=null),b.current&&(b.current.getTracks().forEach(W=>W.stop()),b.current=null),g.current&&(g.current.close(),g.current=null),x.current&&(x.current.disconnect(),x.current=null),c(null),k.current&&(clearInterval(k.current),k.current=null)},[]),C=u.useCallback(async()=>{w(),m(null),i(0),y.current=[];try{const W=await navigator.mediaDevices.getUserMedia({audio:!0});b.current=W;const E=MediaRecorder.isTypeSupported(S)?S:void 0,T=new MediaRecorder(W,E?{mimeType:E}:void 0);f.current=T;const A=new(window.AudioContext||window.webkitAudioContext);g.current=A;const P=A.createMediaStreamSource(W),z=A.createAnalyser();z.fftSize=256,z.smoothingTimeConstant=.8,P.connect(z),x.current=z,c(z),T.ondataavailable=R=>{R.data.size>0&&y.current.push(R.data)},T.onstop=()=>{const R=new Blob(y.current,{type:T.mimeType||S});h(R),w()},T.start(),o(!0),n(!1),k.current=setInterval(()=>{i(R=>R+1)},1e3)}catch{m("Microphone access denied or unavailable."),w()}},[w]),j=u.useCallback(()=>{f.current&&f.current.state!=="inactive"&&f.current.stop(),o(!1),n(!1),k.current&&(clearInterval(k.current),k.current=null)},[]),v=u.useCallback(()=>{f.current&&f.current.state==="recording"&&(f.current.pause(),n(!0),k.current&&(clearInterval(k.current),k.current=null))},[]),I=u.useCallback(()=>{f.current&&f.current.state==="paused"&&(f.current.resume(),n(!1),k.current||(k.current=setInterval(()=>{i(W=>W+1)},1e3)))},[]),F=u.useCallback(()=>{w(),o(!1),n(!1),h(null),i(0),m(null),y.current=[]},[w]);return u.useEffect(()=>()=>w(),[w]),{recording:e,paused:r,audioBlob:p,analyserNode:d,duration:a,error:s,startRecording:C,stopRecording:j,pauseRecording:v,resumeRecording:I,resetRecording:F}}function Dm(e){const{onAudio:o}=e,{recording:r,paused:n,audioBlob:a,analyserNode:i,duration:s,error:m,startRecording:d,stopRecording:c,pauseRecording:p,resumeRecording:h,resetRecording:f}=za();return u.useEffect(()=>{if(a&&o){const x=new File([a],"recording.webm",{type:a.type||"audio/webm;codecs=opus"});o(x)}},[a,o]),{recording:r,paused:n,audioBlob:a,analyserNode:i,duration:s,error:m,startRecording:d,stopRecording:c,pauseRecording:p,resumeRecording:h,resetRecording:f,handleFileChange:x=>{var y;const b=(y=x.target.files)==null?void 0:y[0];b&&o&&o(b)}}}function $m(e){const o=Dm(e);return t.jsx(Vm,{...e,...o})}const Bm=()=>{const[e,o]=u.useState(!1);return{imageError:e,setImageError:o}},_m={xs:24,sm:32,md:44,lg:56,xl:72},Kt={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"}},Lm=({src:e,size:o="md",fallback:r="IM",views:n,imageError:a,setImageError:i,onClick:s=()=>{},children:m})=>{const d=_m[o],c={...Kt.image,...(n==null?void 0:n.image)||{}};return t.jsxs(l.Center,{role:"avatar",width:d,height:d,...Kt.container,borderColor:a?"color-gray-400":"transparent",onClick:s,...n==null?void 0:n.container,children:[!a&&e?t.jsx(l.Image,{alt:"IM",src:e,style:c,width:d,height:d,onError:()=>i(!0)}):t.jsx(l.Text,{size:o,...Kt.fallback,...n==null?void 0:n.fallback,children:r}),m]})},Om=e=>{const o=pe("avatar",e),{src:r,size:n,views:a,fallback:i,onClick:s,children:m}=o,{imageError:d,setImageError:c}=Bm();return t.jsx(Lm,{src:r,size:n,views:a,fallback:i,imageError:d,setImageError:c,onClick:s,children:m})},Ma=Om,Nm={xs:{minWidth:"20px",height:"20px",padding:"0 6px",fontSize:"10px",fontWeight:"600",lineHeight:"12px",letterSpacing:"-0.01em"},sm:{minWidth:"24px",height:"24px",padding:"0 8px",fontSize:"12px",fontWeight:"600",lineHeight:"16px",letterSpacing:"-0.01em"},md:{minWidth:"28px",height:"28px",padding:"0 10px",fontSize:"14px",fontWeight:"600",lineHeight:"20px",letterSpacing:"-0.01em"},lg:{minWidth:"32px",height:"32px",padding:"0 12px",fontSize:"16px",fontWeight:"600",lineHeight:"24px",letterSpacing:"-0.01em"},xl:{minWidth:"36px",height:"36px",padding:"0 14px",fontSize:"20px",fontWeight:"600",lineHeight:"28px",letterSpacing:"-0.01em"}},qm={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"}},Um={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"}},gn={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"}},Gm={square:0,rounded:"8px",pill:"9999px"},Ym={"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"}},Xm=e=>{const o=e==="dark";return{display:"inline-flex",height:"auto",minWidth:"auto",backgroundColor:o?"rgba(39, 39, 42, 0.68)":"rgba(255, 255, 255, 0.6)",color:o?"color-white":"color-gray-900",borderWidth:"1px",borderStyle:"solid",borderColor:o?"rgba(255, 255, 255, 0.16)":"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:o?"rgba(63, 63, 70, 0.76)":"rgba(255, 255, 255, 0.8)",boxShadow:"0 2px 8px rgba(15, 23, 42, 0.1)"}}},Km=e=>{const o=e==="dark";return{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:o?"color-gray-300":"color-gray-500",borderWidth:0,borderStyle:"solid",borderColor:o?"color-gray-300":"color-gray-500",style:{backgroundColor:"transparent"},transition:"background-color 0.2s ease, color 0.2s ease",_hover:{backgroundColor:o?"color-gray-800":"color-gray-100"}}}},Wa=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"}}}),Jm=u.memo(({content:e,children:o,icon:r,pastil:n,pastilContent:a,action:i,position:s,shape:m="pill",variant:d="filled",size:c="md",views:p,themeMode:h,...f})=>{const{themeMode:g}=l.useTheme(),x=h||g,b=u.useMemo(()=>Km(x)[d],[x,d]),y=u.useMemo(()=>Xm(x),[x]),k=u.useMemo(()=>Wa(),[x]),S=a!=null,w=i!=null,C=S||w,j=o??e,v=j!=null,I=u.useMemo(()=>{const W={width:"fit-content",display:"flex",alignItems:"center",justifyContent:"center",gap:"6px",borderRadius:Gm[m],...Nm[c],...b,...C?qm[c]:{},...C?y:{},...s?Ym[s]:{},...p==null?void 0:p.container};return d!=="filled"&&!C&&(b.color!==void 0&&(W.color=b.color),b.borderColor!==void 0&&(W.borderColor=b.borderColor),b.backgroundColor!==void 0&&(W.backgroundColor=b.backgroundColor),b&&b.style&&(W.style={...W.style||{},...b.style})),W},[m,c,d,b,C,y,s,p==null?void 0:p.container]);let F="currentColor";return typeof n=="string"?n in k?F=k[n].indicator.backgroundColor:F=n:n===!0&&(F="color-green-500",d==="filled"&&(F="color-white")),t.jsxs(l.Center,{role:"badge",...I,...f,children:[r&&t.jsx(l.View,{role:"badge-icon",...p==null?void 0:p.icon,children:r}),S&&t.jsx(l.Text,{role:"badge-pastil-content",backgroundColor:x==="dark"?"color-white":"color-gray-900",borderRadius:"9999px",color:x==="dark"?"color-gray-900":"color-white",fontWeight:"700",letterSpacing:0,textTransform:"uppercase",whiteSpace:"nowrap",...Um[c],...p==null?void 0:p.pastilContent,children:a}),n&&t.jsx(l.View,{role:"badge-pastil",width:"6px",height:"6px",borderRadius:"50%",backgroundColor:F,...p==null?void 0:p.pastil}),v&&t.jsx(l.Text,{role:"badgeText",color:C?x==="dark"?"color-gray-50":"color-gray-900":I.color,fontWeight:C?"700":"600",textAlign:"center",letterSpacing:C?0:"0.02em",whiteSpace:C?"nowrap":void 0,...C?gn[c]:{},...p==null?void 0:p.text,children:j}),w&&t.jsx(l.Text,{role:"badge-action",color:"color-gray-400",fontWeight:"500",letterSpacing:0,whiteSpace:"nowrap",...gn[c],...p==null?void 0:p.action,children:i})]})}),ke=e=>{const o=pe("badge",e);return t.jsx(Jm,{...o})},Qm=()=>{const[e,o]=u.useState(!1);return{isHovered:e,setIsHovered:o}},Zm={xs:12,sm:14,md:16,lg:18,xl:20},Ha=u.forwardRef(({children:e,to:o="/",iconSize:r="sm",underline:n="default",isHovered:a=!1,isExternal:i=!1,views:s={icon:{},text:{}},setIsHovered:m=()=>{},...d},c)=>{const p=()=>{n==="hover"&&m(!0)},h=()=>{n==="hover"&&m(!1)},f=()=>n==="underline"||n==="hover"&&a?"underline":"none";return t.jsx(ps.Link,{ref:c,to:o,target:i?"_blank":"_self",style:{textDecoration:"inherit",color:"inherit"},children:t.jsxs(l.Horizontal,{onMouseEnter:p,onMouseLeave:h,gap:3,alignItems:"center",flexWrap:"nowrap",textDecoration:f(),...s.text,...d,children:[e,i&&t.jsx(ja,{widthHeight:Zm[r]})]})})});Ha.displayName="LinkView";const Pa=u.forwardRef((e,o)=>{const r=Qm();return t.jsx(Ha,{ref:o,...r,...e})});Pa.displayName="Link";const Br=Pa,_r={xs:14,sm:18,md:22,lg:26,xl:30},Lr={fast:50,normal:100,slow:300},eu=e=>typeof e=="string"&&(/^(#|rgb\(|rgba\(|hsl\(|hsla\(|var\()/.test(e)||["black","currentColor","inherit","transparent","white"].includes(e)),ou=({size:e="md",speed:o="normal",color:r="theme-loading",themeMode:n,...a})=>{const{getColor:i,themeMode:s}=l.useTheme(),m=i(r,{themeMode:n||s}),d=typeof e=="number"?e:_r[e],[c,p]=u.useState(0);return u.useEffect(()=>{const h=setInterval(()=>{p(f=>f+45)},Lr[o]);return()=>clearInterval(h)},[o]),t.jsxs(l.View,{as:"svg",xmlns:"http://www.w3.org/2000/svg",width:`${d}px`,height:`${d}px`,viewBox:"0 0 24 24",fill:"none",stroke:m,strokeWidth:"1",strokeLinecap:"round",strokeLinejoin:"round",style:{transform:`rotate(${c}deg)`},...a,children:[t.jsx("g",{id:"SVGRepo_bgCarrier",strokeWidth:"0"}),t.jsx("g",{id:"SVGRepo_tracerCarrier",strokeLinecap:"round",strokeLinejoin:"round"}),t.jsx("g",{id:"SVGRepo_iconCarrier",children:t.jsx("path",{d:"M21 12a9 9 0 11-6.219-8.56"})})]})},tu=({size:e="md",speed:o="normal",color:r="theme-loading",themeMode:n,...a})=>{const{getColor:i,themeMode:s}=l.useTheme(),m=i(r,{themeMode:n||s}),d=typeof e=="number"?e:_r[e],[c,p]=u.useState(0);return u.useEffect(()=>{const h=setInterval(()=>{p(f=>f+45)},Lr[o]);return()=>clearInterval(h)},[o]),t.jsxs(l.View,{as:"svg",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 50 50",width:`${d}px`,height:`${d}px`,style:{transform:`rotate(${c}deg)`},...a,children:[t.jsx("circle",{cx:"10",cy:"25",r:"4",fill:m}),t.jsx("circle",{cx:"25",cy:"25",r:"4",fill:m}),t.jsx("circle",{cx:"40",cy:"25",r:"4",fill:m})]})},ru=({size:e="md",speed:o="normal",color:r="theme-loading",themeMode:n,...a})=>{const{getColor:i,themeMode:s}=l.useTheme(),m=i(r,{themeMode:n||s}),d=typeof e=="number"?e:_r[e],[c,p]=u.useState(0);return u.useEffect(()=>{const h=setInterval(()=>{p(f=>f+45)},Lr[o]);return()=>clearInterval(h)},[o]),t.jsx(l.View,{as:"svg",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 50 50",width:`${d}px`,height:`${d}px`,style:{transform:`rotate(${c}deg)`},...a,children:t.jsx("circle",{cx:"25",cy:"25",r:"20",fill:"none",stroke:m,strokeWidth:"5",strokeDasharray:"1,10"})})},nu=({size:e,children:o,textColor:r,loaderColor:n,type:a="default",speed:i="normal",textPosition:s="right",views:m,...d})=>{const{getColor:c}=l.useTheme(),p=g=>eu(g)?g:c(g||"theme-loading");n=p(n||d.color||"theme-loading"),r=p(r||d.color||"theme-loading");const h={size:e,speed:i,color:n},f={default:t.jsx(ou,{...h}),dotted:t.jsx(tu,{...h}),quarter:t.jsx(ru,{...h})};return t.jsxs(l.Center,{gap:10,flexDirection:s==="top"||s==="bottom"?"column":"row",...d,...m==null?void 0:m.container,children:[(s==="left"||s==="top")&&o&&t.jsx(l.View,{color:r,...m==null?void 0:m.text,children:o}),f[a],(s==="right"||s==="bottom")&&o&&t.jsx(l.View,{color:r,...m==null?void 0:m.text,children:o})]})},au=e=>{const o=pe("loader",e);return t.jsx(nu,{...o})},wo=au,Aa={xs:{minHeight:24,paddingHorizontal:12,paddingVertical:6,fontSize:10,fontWeight:500,lineHeight:12,letterSpacing:"-0.01em"},sm:{minHeight:32,paddingHorizontal:16,paddingVertical:8,fontSize:12,fontWeight:500,lineHeight:16,letterSpacing:"-0.01em"},md:{minHeight:40,paddingHorizontal:20,paddingVertical:10,fontSize:14,fontWeight:500,lineHeight:20,letterSpacing:"-0.01em"},lg:{minHeight:48,paddingHorizontal:24,paddingVertical:12,fontSize:16,fontWeight:500,lineHeight:24,letterSpacing:"-0.01em"},xl:{minHeight:56,paddingHorizontal:28,paddingVertical:14,fontSize:20,fontWeight:500,lineHeight:28,letterSpacing:"-0.01em"}},qo={square:0,rounded:8,pill:999},iu={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}},Ae=e=>/^(color|theme|light|dark)-/.test(e)?`var(--${e})`:e,lu=(e,o,r=!1,n)=>{const a=r?o:e,i=r?e:o,s=r?o:e,d=(e==="theme-primary"||n&&e===n.primary)&&(n!=null&&n.onPrimary)?n.onPrimary:i,c=`0 0 0 2px ${Ae("color-white")}, 0 0 0 4px ${Ae(s)}`;return{filled:{backgroundColor:a,color:d,borderWidth:1,borderStyle:"solid",borderColor:a,_hover:{opacity:.92},_active:{opacity:.96},_focusVisible:{outline:"none",boxShadow:c},transition:"background-color 0.2s ease, border-color 0.2s ease, opacity 0.2s ease"},empty:{color:s,borderWidth:1,borderStyle:"solid",borderColor:s,backgroundColor:"transparent",_hover:{opacity:.9},_active:{opacity:.95},_focusVisible:{outline:"none",boxShadow:c},transition:"background-color 0.2s ease, opacity 0.2s ease"},outline:{color:s,borderWidth:1,borderStyle:"solid",borderColor:s,backgroundColor:"transparent",_hover:{opacity:.9},_active:{opacity:.95},_focusVisible:{outline:"none",boxShadow:c},transition:"background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease"},ghost:{color:s,borderWidth:0,borderStyle:"solid",borderColor:s,backgroundColor:"transparent",_hover:{opacity:.86},_active:{opacity:.94},_focusVisible:{outline:"none",boxShadow:c},transition:"background-color 0.2s ease, color 0.2s ease"},link:{color:s,borderWidth:0,borderStyle:"none",borderColor:s,minHeight:"auto",paddingHorizontal:"4px",paddingVertical:"10px",textDecoration:"underline",backgroundColor:"transparent",style:{textUnderlineOffset:"2px",textDecorationThickness:"1px",textDecorationColor:Ae(s)},_hover:{opacity:.8},_active:{opacity:.9},_focusVisible:{outline:"none",boxShadow:c},transition:"opacity 0.2s ease"},subtle:{backgroundColor:`${s}-${r?200:100}`,color:s,borderWidth:1,borderStyle:"solid",borderColor:`${s}-${r?400:250}`,_hover:{backgroundColor:`${s}-${r?300:180}`},_active:{backgroundColor:`${s}-${r?380:240}`},_focusVisible:{outline:"none",boxShadow:c},transition:"background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease"}}},su=u.memo(({children:e,icon:o,isLoading:r,iconPosition:n="left",loaderPosition:a="left",size:i="md",resolvedTextColor:s,isIconRounded:m,views:d})=>{const c=["left","right"].includes(n)?l.Horizontal:l.Vertical,p=Aa[i];return t.jsxs(c,{gap:8,alignItems:"center",justifyContent:"center",fontSize:p.fontSize,fontWeight:p.fontWeight,lineHeight:p.lineHeight,letterSpacing:p.letterSpacing,whiteSpace:"nowrap",color:s,...d==null?void 0:d.content,children:[r&&a==="left"&&t.jsx(wo,{size:i==="xs"||i==="sm"?"sm":"md",color:s,...d==null?void 0:d.loader}),o&&["left","top"].includes(n)&&!r&&t.jsx(l.View,{color:s,...d==null?void 0:d.icon,children:o}),e,o&&["right","bottom"].includes(n)&&!r&&t.jsx(l.View,{color:s,...d==null?void 0:d.icon,children:o}),r&&a==="right"&&t.jsx(wo,{size:i==="xs"||i==="sm"?"sm":"md",color:s,...d==null?void 0:d.loader})]})}),cu=e=>{const o=qo[e];return typeof o=="number"?o:typeof o=="string"&&parseInt(o,10)||0},du=({asComponent:e,isDisabled:o,isLoading:r,isWrapped:n=!1,borderRadius:a,width:i,height:s,baseStyles:m,sizeStyles:d,iconPad:c,mainTone:p,resolvedTextColor:h,children:f,borderWidth:g=0,...x})=>t.jsx(l.Element,{as:e,disabled:!!(o||r),display:n?"flex":"inline-flex",alignItems:"center",justifyContent:"center",borderRadius:a,width:i,height:s,...m,...d,...c,backgroundColor:(m==null?void 0:m.backgroundColor)||(n?p:void 0),color:h,borderWidth:n?0:void 0,cursor:o?"default":"pointer",...x,children:f}),mu=({shape:e,isDisabled:o,onClick:r,shadow:n,borderWidth:a,isAuto:i,isFilled:s,views:m,children:d,...c})=>t.jsx(l.Element,{as:"div",position:"relative",display:"inline-flex",alignItems:"center",justifyContent:"center",borderRadius:qo[e],cursor:o?"default":"pointer",onClick:r,boxShadow:n,padding:a,width:i?"fit-content":s?"100%":void 0,...m==null?void 0:m.container,...c,children:d}),uu=({variant:e,animation:o,to:r,isDisabled:n,isLoading:a,isAuto:i,isFilled:s,isExternal:m,shape:d="rounded",shadow:c,onClick:p,views:h,baseStyles:f,sizeStyles:g,iconPad:x,containerRef:b,resolvedTextColor:y,content:k,size:S,mainTone:w,borderMovingDuration:C=2,borderMovingGradientColors:j=["#705CFF","#FF5C97","#FFC75C"],animatedStrokeAccentColor:v="#705CFF",animatedStrokeTextColor:I="#333333",...F})=>{var A;const W=cu(d),E=r?t.jsx(Br,{to:r,isExternal:m,color:"currentColor",textDecoration:"inherit",_hover:{color:"currentColor"},...h==null?void 0:h.link,children:k}):k,T={isDisabled:n,isLoading:a,baseStyles:f,sizeStyles:g,iconPad:x,resolvedTextColor:y,mainTone:w,children:E};if(o==="borderMoving"&&j){const z={from:{backgroundPosition:"0% 50%"},to:{backgroundPosition:"200% 50%"},duration:`${C}s`,timingFunction:"linear",iterationCount:"infinite"};return t.jsx(mu,{shape:d,isDisabled:n,onClick:p,shadow:c,borderWidth:3,isAuto:i,isFilled:s,views:h,background:`linear-gradient(90deg, ${Ae(j[0])}, ${Ae(j[1])}, ${Ae(j[2])}, ${Ae(j[0])})`,backgroundSize:"200% 100%",animate:z,...F,children:t.jsx(du,{asComponent:r?"div":"button",isWrapped:!0,borderRadius:Math.max(0,W-3),width:"100%",height:"100%",...T})})}if(o==="animatedStroke"){const P=Ae(v),z=Ae(I),R=1e3,H={from:{strokeWidth:"8px",strokeDasharray:`0 ${R}`,strokeDashoffset:-Math.round(R*.63)},to:{strokeWidth:"3px",strokeDasharray:`${R}`,strokeDashoffset:0},duration:"0.9s",timingFunction:"ease-in",fillMode:"forwards"},M=["group",(A=h==null?void 0:h.container)==null?void 0:A.className,F==null?void 0:F.className].filter(Boolean).join(" ");return t.jsxs(l.Element,{ref:b,as:r?"div":"button",type:r?void 0:"button",disabled:!!(!r&&(n||a)),onClick:p,position:"relative",display:"inline-flex",alignItems:"center",justifyContent:"center",width:i?"fit-content":s?"100%":void 0,borderRadius:qo[d],boxShadow:c,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,...h==null?void 0:h.container,...F,className:M,children:[t.jsx(l.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:t.jsx(l.View,{as:"rect",x:"0",y:"0",height:"100%",width:"100%",rx:W,ry:W,fill:"transparent",stroke:P,strokeWidth:"8px",strokeDasharray:`0 ${R}`,strokeDashoffset:-Math.round(R*.63),pathLength:R,on:{groupHover:{animate:H}}})}),t.jsx(l.View,{position:"relative",zIndex:0,children:E})]})}if(o==="borderReveal"){const z=Ae((j==null?void 0:j[0])||w||"#000000"),H=C*.75/4,M=`linear-gradient(90deg, ${z} 50%, transparent 50%)`,D=`linear-gradient(180deg, ${z} 50%, transparent 50%)`,B=`linear-gradient(270deg, ${z} 50%, transparent 50%)`,V=`linear-gradient(0deg, ${z} 50%, transparent 50%)`,L="100% 0, 100% 100%, 0 100%, 0 0",_="0 0, 100% 0, 100% 100%, 0 100%",q=`0s, ${H}s, ${H*2}s, ${H*2}s`,O=`${H*2}s, ${H*2}s, ${H}s, 0s`,Y=4;return t.jsx(l.Element,{ref:b,as:"div",position:"relative",display:"inline-flex",alignItems:"center",justifyContent:"center",borderRadius:qo[d],cursor:n?"default":"pointer",onClick:p,boxShadow:c,padding:3,background:`
|
|
1
|
+
"use strict";var ss=Object.create;var Xr=Object.defineProperty;var cs=Object.getOwnPropertyDescriptor;var ds=Object.getOwnPropertyNames;var us=Object.getPrototypeOf,ps=Object.prototype.hasOwnProperty;var ms=(e,o,t)=>o in e?Xr(e,o,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[o]=t;var gs=(e,o,t,a)=>{if(o&&typeof o=="object"||typeof o=="function")for(let n of ds(o))!ps.call(e,n)&&n!==t&&Xr(e,n,{get:()=>o[n],enumerable:!(a=cs(o,n))||a.enumerable});return e};var hs=(e,o,t)=>(t=e!=null?ss(us(e)):{},gs(o||!e||!e.__esModule?Xr(t,"default",{value:e,enumerable:!0}):t,e));var Le=(e,o,t)=>ms(e,typeof o!="symbol"?o+"":o,t);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("react/jsx-runtime"),p=require("react"),i=require("app-studio"),zr=require("zustand"),fs=require("react-router-dom"),ys=require("react-dom"),He=require("formik"),Ft=(e="id")=>`${e}-${Math.random().toString(36).substring(2,9)}`,xs=({type:e="single",value:o,defaultValue:t,onValueChange:a,collapsible:n=!1})=>{const l=o!==void 0,s=o??t,d=()=>e==="multiple"?Array.isArray(s)?s:s?[s]:[]:Array.isArray(s)?s[0]:s,[u,c]=p.useState(d()),m=p.useMemo(()=>Ft("accordion"),[]),g=l?o:u,h=p.useMemo(()=>g===void 0?[]:Array.isArray(g)?g:[g],[g]);p.useEffect(()=>{l&&(e==="multiple"&&!Array.isArray(o)?(console.warn('Accordion with type="multiple" received non-array value:',o),c(o?[String(o)]:[])):e==="single"&&Array.isArray(o)?(console.warn('Accordion with type="single" received array value:',o),c(o.length>0?o[0]:void 0)):c(o))},[o,l,e]);const f=p.useCallback(x=>{let b;if(e==="single")g===x&&n?b=void 0:g!==x?b=x:b=g;else{const k=Array.isArray(g)?g:[];k.includes(x)?b=k.filter(j=>j!==x):b=[...k,x],Array.isArray(b)&&b.length===0&&(b=[])}l||c(b),a&&a(b)},[e,g,n,l,a]),y=p.useCallback(x=>h.includes(x),[h]);return{expandedItems:h,toggleItem:f,isItemExpanded:y,type:e,collapsible:n,baseId:m}},bs={square:{borderRadius:0},rounded:{borderRadius:8}},ks={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"}}},Cs={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"]},Ss={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"},js={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)"]},ws={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,borderColor:"theme-primary",letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal",backgroundColor:null},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"}}}},vs={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"},Ts={metadata:Cs,theme:Ss,tokens:js,components:ws,personality:vs},Is={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"]},Fs={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"},Rs={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)"]},zs={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,borderColor:"theme-primary",letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal",backgroundColor:null},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"}}}},Ms={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"},Ws={metadata:Is,theme:Fs,tokens:Rs,components:zs,personality:Ms},Hs={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"]},Ps={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"},As={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)"]},Vs={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,borderColor:"theme-primary",letterSpacing:"-0.022em",textTransform:"none",fontStyle:"normal",backgroundColor:null},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"}}}},Es={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"},Ds={metadata:Hs,theme:Ps,tokens:As,components:Vs,personality:Es},$s={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"]},Ls={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"},_s={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)"]},Bs={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,borderColor:"theme-primary",letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal",backgroundColor:null},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"}}}},Os={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"},Ns={metadata:$s,theme:Ls,tokens:_s,components:Bs,personality:Os},qs={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"]},Us={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"},Gs={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)"]},Ys={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,borderColor:"theme-primary",letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal",backgroundColor:null},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"}}}},Xs={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"},Ks={metadata:qs,theme:Us,tokens:Gs,components:Ys,personality:Xs},Js={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"]},Qs={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"},Zs={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)"]},ec={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,borderColor:"theme-primary",letterSpacing:"-0.025em",textTransform:"none",fontStyle:"normal",backgroundColor:null},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"}}}},oc={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"},rc={metadata:Js,theme:Qs,tokens:Zs,components:ec,personality:oc},tc={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"]},ac={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"},nc={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)"]},lc={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,borderColor:"theme-primary",letterSpacing:"0.08em",textTransform:"uppercase",fontStyle:"italic",backgroundColor:null},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"}}}},ic={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"},sc={metadata:tc,theme:ac,tokens:nc,components:lc,personality:ic},cc={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"]},dc={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"},uc={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"]},pc={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,borderColor:"theme-primary",letterSpacing:"0em",textTransform:"none",fontStyle:"normal",backgroundColor:null},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"}}}},mc={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"},gc={metadata:cc,theme:dc,tokens:uc,components:pc,personality:mc},hc={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"]},fc={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"},yc={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:[]},xc={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,borderColor:"theme-primary",letterSpacing:"-0.02em",textTransform:"none",fontStyle:"normal",backgroundColor:null},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"}}}},bc={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"},kc={metadata:hc,theme:fc,tokens:yc,components:xc,personality:bc},Cc={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"]},Sc={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"},jc={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"]},wc={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,borderColor:"theme-primary",letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal",backgroundColor:null},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"}}}},vc={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"},Tc={metadata:Cc,theme:Sc,tokens:jc,components:wc,personality:vc},Ic={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"]},Fc={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"},Rc={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:[]},zc={button:{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,borderColor:"color-gray-200",backgroundColor:"color-gray-50",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"}}}},Mc={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"},Wc={metadata:Ic,theme:Fc,tokens:Rc,components:zc,personality:Mc},Hc={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"]},Pc={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"},Ac={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"]},Vc={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,borderColor:"theme-primary",letterSpacing:"-0.02em",textTransform:"none",fontStyle:"normal",backgroundColor:null},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"}}}},Ec={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"},Dc={metadata:Hc,theme:Pc,tokens:Ac,components:Vc,personality:Ec},$c={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"]},Lc={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"},_c={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)"]},Bc={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,borderColor:"theme-primary",letterSpacing:"-0.022em",textTransform:"none",fontStyle:"normal",backgroundColor:null},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"}}}},Oc={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"},Nc={metadata:$c,theme:Lc,tokens:_c,components:Bc,personality:Oc},qc={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"]},Uc={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"},Gc={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)"]},Yc={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,borderColor:"theme-primary",letterSpacing:"0.08em",textTransform:"uppercase",fontStyle:"normal",backgroundColor:null},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"}}}},Xc={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"},Kc={metadata:qc,theme:Uc,tokens:Gc,components:Yc,personality:Xc},Jc={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"]},Qc={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"},Zc={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"]},ed={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,borderColor:"theme-primary",letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal",backgroundColor:null},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"}}}},od={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"},rd={metadata:Jc,theme:Qc,tokens:Zc,components:ed,personality:od},td={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"]},ad={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"},nd={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)"]},ld={button:{variant:"filled",size:"md",shape:"square",color:"theme-primary",textColor:"theme-onPrimary",views:{container:{borderRadius:4,fontFamily:"var(--font-sans)",fontWeight:700,borderColor:"theme-primary",letterSpacing:"-0.04em",textTransform:"none",fontStyle:"normal",backgroundColor:null},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"}}}},id={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"},sd={metadata:td,theme:ad,tokens:nd,components:ld,personality:id},Rt={airbnb:Ws,apple:Ds,coinbase:Ns,figma:Ks,linear:rc,nike:sc,notion:gc,revolut:kc,shopify:Tc,spacex:Wc,spotify:Dc,stripe:Nc,tesla:Kc,uber:rd,vercel:sd},cd=Object.values(Rt),hn=Ts,Uo=e=>!!e&&typeof e=="object"&&!Array.isArray(e)&&Object.prototype.toString.call(e)==="[object Object]",zt=e=>e,Ee=(...e)=>{const o={};return e.forEach(t=>{Uo(t)&&Object.entries(t).forEach(([a,n])=>{if(n!=null){if(Uo(n)&&Uo(o[a])){o[a]=Ee(o[a],n);return}o[a]=n}})}),o},fn=e=>{if(Array.isArray(e)||!Uo(e))return e;const o={};for(const[t,a]of Object.entries(e))a!==null&&(o[t]=Uo(a)?fn(a):a);return o},Mt=(e,o)=>{if(!o)return{};const t=o.components[e]||{};return zt(fn(t))},yn=(e,o,t)=>{const{config:a,...n}=o,l=Mt(e,t),s=Ee(l,a||{});return zt(Ee(s,n))},xn=p.createContext({isEnabled:!1}),Wt=({children:e,config:o,configId:t,mode:a})=>{const n=o||(t?Rt[t]:null)||hn,{themeMode:l}=i.useTheme(),s=a??l??n.metadata.defaultAppearance,d=p.useMemo(()=>({config:n,configId:n.metadata.id,isEnabled:!0}),[n]);return r.jsx(xn.Provider,{value:d,children:r.jsx(i.ThemeProvider,{theme:n.theme,mode:s,transparentWrapper:!0,children:r.jsx("div",{"data-design-system":n.metadata.id,"data-appearance":s,style:{display:"contents"},children:e})})})},Mr=()=>p.useContext(xn),zo=e=>{const{config:o}=Mr();return Mt(e,o)},me=(e,o)=>{const{config:t}=Mr();return yn(e,o,t)},bn=p.createContext({expandedItems:[],toggleItem:()=>{},isItemExpanded:()=>!1,type:"single",collapsible:!1,baseId:""}),dd=({children:e,value:o})=>r.jsx(bn.Provider,{value:o,children:e}),kn=()=>{const e=p.useContext(bn);if(!e)throw new Error("useAccordionContext must be used within an AccordionProvider");return e},ud=({value:e,children:o,isDisabled:t=!1,views:a,...n})=>{var h;const{isItemExpanded:l,baseId:s}=kn(),d=zo("accordion"),u=Ee({item:(h=d.views)==null?void 0:h.container},a),c=l(e),m=`${s}-trigger-${e}`,g=`${s}-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":c?"open":"closed","data-disabled":t?"":void 0,...u==null?void 0:u.item,...n,children:p.Children.map(o,f=>p.isValidElement(f)?p.cloneElement(f,{...f.props,value:e,isExpanded:c,isDisabled:t,triggerId:m,contentId:g}):f)})},pd=({children:e,value:o,isExpanded:t,isDisabled:a,triggerId:n,contentId:l,views:s,asChild:d=!1,...u})=>{var y;const{toggleItem:c}=kn(),m=zo("accordion"),g=Ee({container:(y=m.views)==null?void 0:y.trigger},s),f={id:n,"aria-expanded":t,"aria-controls":l,"aria-disabled":a,"data-state":t?"open":"closed","data-disabled":a?"":void 0,onClick:()=>{o&&!a&&c(o)},padding:16,cursor:a?"not-allowed":"pointer",alignItems:"center",justifyContent:"space-between",width:"100%",style:{backgroundColor:"transparent"},...g==null?void 0:g.container,...u};if(d&&p.isValidElement(e)){const x=p.Children.only(e);return p.cloneElement(x,{...f,...x.props})}return r.jsxs(i.Horizontal,{...f,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)",...g==null?void 0:g.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"})})})]})},md=({children:e,isExpanded:o,isDisabled:t,triggerId:a,contentId:n,views:l,...s})=>{var j;const d=zo("accordion"),u=Ee({container:(j=d.views)==null?void 0:j.content},l),c=260,m=p.useRef(null),g=p.useRef(null),[h,f]=p.useState(!!o),[y,x]=p.useState(o?"none":"0px"),[b,k]=p.useState(o?1:0);return p.useEffect(()=>()=>{g.current&&clearTimeout(g.current)},[]),p.useEffect(()=>{var C;if(g.current&&(clearTimeout(g.current),g.current=null),o){f(!0),requestAnimationFrame(()=>{var v;const S=((v=m.current)==null?void 0:v.scrollHeight)??0;x(`${S}px`),k(1)});return}const w=((C=m.current)==null?void 0:C.scrollHeight)??0;x(`${w}px`),k(1),requestAnimationFrame(()=>{x("0px"),k(0)}),g.current=setTimeout(()=>{f(!1)},c)},[o,e]),p.useEffect(()=>{var C;if(!o||!h)return;const w=((C=m.current)==null?void 0:C.scrollHeight)??0;x(`${w}px`)},[e,o,h]),h?r.jsx(i.View,{id:n,role:"region","aria-labelledby":a,overflow:"hidden",maxHeight:y,opacity:b,transition:`max-height ${c}ms cubic-bezier(0.22, 1, 0.36, 1), opacity ${c}ms ease`,"data-state":o?"open":"closed","data-disabled":t?"":void 0,style:{backgroundColor:"transparent"},...u==null?void 0:u.container,...s,children:r.jsx(i.View,{ref:m,padding:16,children:e})}):null},gd=({children:e,shape:o="rounded",variant:t="default",views:a,baseId:n,type:l,collapsible:s,themeMode:d,...u})=>r.jsx(i.Vertical,{width:"100%","data-orientation":"vertical",...bs[o],...ks[t],...a==null?void 0:a.container,...u,children:e}),hd=e=>{const o=me("accordion",e),{children:t,type:a="single",value:n,defaultValue:l,onValueChange:s,collapsible:d=!1,shape:u="rounded",variant:c="default",views:m,...g}=o,h=Array.isArray(l)?l:l?[l]:void 0,f=xs({type:a,value:n,defaultValue:l??h,onValueChange:s,collapsible:d});return r.jsx(dd,{value:{expandedItems:f.expandedItems,toggleItem:f.toggleItem,isItemExpanded:f.isItemExpanded,type:f.type,collapsible:f.collapsible,baseId:f.baseId},children:r.jsx(gd,{shape:u,variant:c,views:m,baseId:f.baseId,type:f.type,collapsible:f.collapsible,...g,children:t})})},Me=hd;Me.Item=ud;Me.Trigger=pd;Me.Content=md;const Kr=new Map,fd=(e,o,t)=>(Kr.has(e)||Kr.set(e,p.lazy(()=>import("lucide-react/dynamicIconImports").then(a=>{const n=a.default[e];return n?n():{default:()=>r.jsx(r.Fragment,{children:o||t})}}))),Kr.get(e)),ya=p.memo(({widthHeight:e,color:o="currentColor",transform:t,orientation:a="up",children:n,...l})=>r.jsx(i.View,{widthHeight:e,color:o,display:"flex",alignItems:"center",justifyContent:"center",transform:t||(a==="left"?"rotate(-90deg)":a==="right"?"rotate(90deg)":a==="up"?"rotate(0deg)":a==="down"?"rotate(180deg)":"none"),...l,children:n})),kr=p.memo(({name:e="circle",widthHeight:o=24,color:t="currentColor",filled:a=!1,strokeWidth:n=1,size:l,children:s,fallback:d,...u})=>{const{getColor:c}=i.useTheme(),m=l||o,g=p.useMemo(()=>{const y=c(t);return{fill:a?y:"none",stroke:y,strokeWidth:n,strokeLinecap:"round",strokeLinejoin:"round"}},[a,t,n,c]);if(!e)return r.jsx(ya,{widthHeight:o,color:t,...u,children:s});const h=e.toLowerCase().replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase(),f=fd(h,d,s);return r.jsx(ya,{widthHeight:m,color:t,...u,children:r.jsx(p.Suspense,{fallback:d||null,children:r.jsx(f,{size:m,...g})})})}),N=(e,o={})=>{const t=a=>r.jsx(kr,{name:e,...o,...a});return t.displayName=`${e}Icon`,t},yd=N("user",{filled:!1}),xd=N("circle-help",{filled:!1}),bd=N("folder",{filled:!1}),se=N("chevron-up",{filled:!1}),kd=N("grip-vertical",{filled:!1}),to=N("file",{filled:!1}),Cd=N("video",{filled:!1}),Sd=N("image",{filled:!1}),vo=N("volume",{filled:!1}),jd=N("twitter",{filled:!1}),wd=N("x",{filled:!1}),vd=N("twitch",{filled:!1}),Te=N("x",{filled:!1,strokeWidth:2}),Td=N("instagram",{filled:!1}),Id=N("youtube",{filled:!1}),Fd=N("facebook",{filled:!1}),Rd=N("linkedin",{filled:!1}),zd=N("at-sign",{filled:!1}),Cn=N("minus",{filled:!1}),Ge=N("info",{filled:!1}),Sn=N("play",{filled:!1}),Md=N("pause",{filled:!1}),Wd=N("heart",{filled:!1}),Hd=N("star",{filled:!1}),Pd=N("save",{filled:!1}),Ht=N("triangle-alert",{filled:!1}),Ad=N("battery",{filled:!1}),Vd=N("bookmark",{filled:!1}),Ed=N("cloud",{filled:!1}),Dd=N("copy",{filled:!1}),Wr=N("trash",{filled:!1}),$d=Wr,Ld=N("edit",{filled:!1}),Pt=N("mic",{filled:!1}),Hr=N("square",{filled:!1}),At=N("send",{filled:!1}),Vt=N("loader",{filled:!1}),Xo=N("paperclip",{filled:!1}),Cr=N("search",{filled:!1}),_d=N("home",{filled:!1}),jn=N("settings",{filled:!1}),Bd=N("download",{filled:!1}),wn=N("share",{filled:!1}),Pr=N("check",{filled:!1}),Od=N("plus",{filled:!1}),Et=N("eye-off",{filled:!1}),Dt=N("eye",{filled:!1}),Nd=N("lock",{filled:!1}),qd=N("user",{filled:!1}),vn=N("external-link",{filled:!1}),$t=N("check-circle",{filled:!1}),Ar=N("alert-circle",{filled:!1}),Ud=N("bell",{filled:!1}),Gd=N("file-text",{filled:!1}),Yd=N("bar-chart",{filled:!1}),Xd=N("moon",{filled:!1}),Tn=N("panel-left",{filled:!1}),Lt=N("upload",{filled:!1}),Kd=Pr,Jd=e=>r.jsx(se,{orientation:"left",...e}),Qd=N("zoom-out",{filled:!1}),Zd=N("type",{filled:!1}),eu=N("shapes",{filled:!1}),ou=N("rotate-cw",{filled:!1}),ru=N("gift",{filled:!1}),tu=N("shield",{filled:!1}),au=N("log-out",{filled:!1}),nu=N("power",{filled:!1}),lu=N("link",{filled:!1}),iu=N("layout",{filled:!1}),su=N("zap",{filled:!1}),cu=N("credit-card",{filled:!1}),du=N("more-horizontal",{filled:!1}),uu=Wr,pu=N("filter",{filled:!1}),mu=N("calendar",{filled:!1}),gu=N("clock",{filled:!1}),hu=N("map-pin",{filled:!1}),fu=N("menu",{filled:!1}),yu=N("refresh-cw",{filled:!1}),xu=N("printer",{filled:!1}),bu=N("wand",{filled:!1}),ku=N("thumbs-down",{filled:!1}),Cu=N("thumbs-up",{filled:!1}),Su=N("camera",{filled:!1}),ju=N("bluetooth",{filled:!1}),wu=N("unlock",{filled:!1}),vu=N("wifi",{filled:!1}),Tu=N("arrow-right",{filled:!1}),Iu=N("arrow-up",{filled:!1}),Fu=N("loader",{filled:!1}),Ru=N("sliders-horizontal",{filled:!1}),zu=N("crop",{filled:!1}),Mu=N("zoom-in",{filled:!1}),Wu=N("grip-horizontal",{filled:!1}),In=N("mouse-pointer-2",{filled:!1}),Hu=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"}}}},Pu=p.memo(({icon:e,title:o="",views:t,description:a="",variant:n="default",themeMode:l,children:s,...d})=>{const{themeMode:u}=i.useTheme(),c=l||u,m=p.useMemo(()=>Hu(c),[c]),g=()=>{var y;if(e)return e;const f={size:20,color:((y=t==null?void 0:t.icon)==null?void 0:y.color)??m[n].icon.color};switch(n){case"info":return r.jsx(Ge,{...f});case"success":return r.jsx($t,{...f});case"error":return r.jsx(Ar,{...f});case"warning":default:return r.jsx(Ht,{...f})}};return r.jsxs(i.Horizontal,{gap:12,padding:"12px 16px",flexWrap:"nowrap",alignItems:"flex-start",borderRadius:"8px",borderWidth:"1px",borderStyle:"solid",borderColor:m[n].container.borderColor,backgroundColor:m[n].container.backgroundColor,boxShadow:m[n].container.boxShadow,transition:"background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease",...t==null?void 0:t.container,...d,children:[r.jsx(i.View,{alignSelf:"flex-start",marginTop:"2px",...t==null?void 0:t.icon,children:g()}),r.jsxs(i.Vertical,{gap:4,children:[o?r.jsx(i.Text,{fontSize:"14px",fontWeight:"600",lineHeight:"20px",color:m[n].content.color,...t==null?void 0:t.title,children:o}):null,r.jsx(i.Text,{fontSize:"12px",fontWeight:"400",lineHeight:"16px",color:m[n].content.color,...t==null?void 0:t.description,children:a||s})]})]})}),Au=e=>{const o=me("alert",e);return r.jsx(Pu,{...o})},_t=Au,Vu=({ratio:e=16/9,children:o,views:t,...a})=>r.jsx(i.View,{width:"100%",position:"relative",overflow:"hidden",paddingTop:`${1/e*100}%`,borderRadius:8,...a,...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})}),Eu=({ratio:e,children:o,...t})=>r.jsx(Vu,{ratio:e,...t,children:o}),Fn=Eu;function Du(e,o,t){return Math.min(Math.max(e,o),t)}const $u=({bars:e,isPaused:o,...t})=>{const n=[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,s)=>r.jsx(i.View,{width:3,borderRadius:2,backgroundColor:o?"color-gray-300":l>=0?"theme-primary":"color-gray-300",style:{height:`${l>=0?Du(l*300,6,24):n[s%n.length]}px`}},s))})},Bt=({analyserNode:e,isPaused:o,...t})=>{const a=p.useRef(null),n=60,l=32,[s,d]=p.useState([]);return p.useEffect(()=>{if(!e){d(Array(n).fill(-1));return}const u=e.frequencyBinCount,c=new Uint8Array(u),m=()=>{e.getByteTimeDomainData(c);let g=0;for(let f=0;f<u;f++){const y=(c[f]-128)/128;g+=y*y}const h=Math.sqrt(g/u);p.startTransition(()=>{d(f=>{const x=[...f,h].slice(-n);return x.length<n?[...Array(n-x.length).fill(-1),...x]:x})})};return a.current=setInterval(m,l),()=>{a.current&&clearInterval(a.current)}},[e]),r.jsx($u,{bars:s,isPaused:o,...t})},Vr=zr.create(e=>({visible:!1,title:"",subtitle:"",variant:"info",isClosable:!1,views:{},action:()=>{},actionText:"",showIcon:!1,timeout:3e3,show:(o,t="",a="",n,l,s,d,u,c)=>e({visible:!0,variant:o,title:t,subtitle:a,isClosable:n,views:l,action:s,actionText:d,showIcon:u,timeout:c}),hide:()=>e({visible:!1})})),Rn=(e,o,t,a)=>{Vr.getState().show(e,o,t,a==null?void 0:a.isClosable,a==null?void 0:a.views,a==null?void 0:a.action,a==null?void 0:a.actionText,a==null?void 0:a.showIcon,a==null?void 0:a.timeout)},zn=()=>{Vr.getState().hide()},Lu={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"}}},Mn=({variant:e,hide:o,title:t,subtitle:a,theme:n,action:l,actionText:s,showIcon:d=!1,isClosable:u=!1,timeout:c=3e3,views:m})=>{var k,j;p.useEffect(()=>{if(c&&!u){const w=setTimeout(()=>{o()},c);return()=>{clearTimeout(w)}}},[]);const g=n??Lu,h=!!(l&&s),f={borderWidth:1,borderStyle:"solid",borderRadius:12,borderColor:`${g[e].container.border}`,boxShadow:"0 8px 24px rgba(15, 23, 42, 0.06)"},y={info:"#3b82f6",success:"#4ade80",warning:"#f97316",error:"#ef4444"}[e],x={info:r.jsx(Ge,{widthHeight:24,color:y,...m==null?void 0:m.icon}),success:r.jsx($t,{widthHeight:24,color:y,...m==null?void 0:m.icon}),warning:r.jsx(Ht,{widthHeight:24,color:y,...m==null?void 0:m.icon}),error:r.jsx(Ar,{widthHeight:24,color:y,...m==null?void 0:m.icon})}[e],b=d&&x;return r.jsxs(i.Horizontal,{role:"messageContent",gap:12,width:"100%",maxWidth:520,flexWrap:"nowrap",position:"relative",alignItems:"flex-start",padding:"12px 14px",color:`${g[e].content.color}`,backgroundColor:`${g[e].container.backgroundColor}`,onClick:u?()=>{}:()=>{o()},...f,transition:"background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease",...m==null?void 0:m.container,children:[b&&x,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}),a&&r.jsx(i.Text,{size:"sm",lineHeight:"20px",color:g[e].content.color,...m==null?void 0:m.subtitle,children:a})]}),h&&r.jsx(i.View,{as:"button",type:"button",onClick:l,backgroundColor:"color-white",borderWidth:"1px",borderStyle:"solid",borderColor:g[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:g[e].content.color,children:s})}),u&&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",...(k=m==null?void 0:m.closingIcon)==null?void 0:k.container,children:r.jsx(Te,{widthHeight:16,color:g[e].close.color,...(j=m==null?void 0:m.closingIcon)==null?void 0:j.icon})})]})},_u=({container:e,theme:o,position:t="topRight"})=>{const{visible:a,title:n,variant:l,subtitle:s,isClosable:d,views:u,action:c,actionText:m,showIcon:g,timeout:h}=Vr(),f={topLeft:{top:6,left:8},topRight:{top:6,right:8},bottomLeft:{bottom:8,left:6},bottomRight:{bottom:8,right:6}}[t],y=()=>r.jsx(Mn,{variant:l,subtitle:s,show:a,title:n,theme:o,isClosable:d,views:u,action:c,actionText:m,showIcon:g,timeout:h,hide:()=>zn()}),x=e?p.cloneElement(e,{},y()):r.jsx(i.View,{position:"absolute",zIndex:1e4,...f,children:y()});return a?x:null},Bu=(e,o)=>{const t=document.createElement("video");t.preload="metadata",t.onloadedmetadata=()=>{t.currentTime=1},t.oncanplay=()=>{const a=document.createElement("canvas");a.width=t.videoWidth,a.height=t.videoHeight;const n=a.getContext("2d");if(n){n.drawImage(t,0,0,a.width,a.height);const l=a.toDataURL("image/jpeg");o(l)}URL.revokeObjectURL(t.src)},t.src=URL.createObjectURL(e)},Ou=({maxSize:e=100*1024*1024,onFileSelect:o,onMultipleFileSelect:t,validateFile:a,thumbnail:n,multiple:l=!1,onError:s=d=>{Rn("error","Error",d)}})=>{const d=p.useRef(null),u=p.useRef(null),[c,m]=p.useState(null),[g,h]=p.useState([]),[f,y]=p.useState(null),[x,b]=p.useState(null),[k,j]=p.useState(n||null),w=p.useCallback(S=>{const v=S.target.files;if(y(null),!v||v.length===0){s("No file selected"),y("No file selected");return}if(l){const I=Array.from(v),F=[];for(const W of I){if(W.size>e){s(`File ${W.name} exceeds ${Math.round(e/(1024*1024))}MB.`),y(`File ${W.name} exceeds ${Math.round(e/(1024*1024))}MB.`);continue}if(a){const E=a(W);if(E){s(`${W.name}: ${E}`),y(`${W.name}: ${E}`);continue}}F.push(W)}F.length>0&&(h(F),t&&t(F))}else{const I=v[0];if(I.size>e){s(`File exceeds ${Math.round(e/(1024*1024))}MB.`),y(`File exceeds ${Math.round(e/(1024*1024))}MB.`);return}if(a){const F=a(I);if(F){s(F),y(F);return}}b(URL.createObjectURL(I)),I.type.startsWith("video/")&&Bu(I,j),o&&(m(I),o(I))}},[e,o,t,a,l]),C=()=>{var S;return(S=d.current)==null?void 0:S.click()};return p.useEffect(()=>()=>{x&&URL.revokeObjectURL(x),k&&URL.revokeObjectURL(k)},[x,k]),{previewUrl:x,thumbnailUrl:k,errorMessage:f,fileInputRef:d,videoRef:u,selectedFile:c,selectedFiles:g,handleFileChange:w,handleClick:C}},Nu=({accept:e,isLoading:o=!1,progress:t=0,icon:a,text:n,previewUrl:l,thumbnailUrl:s,errorMessage:d,fileInputRef:u,videoRef:c,selectedFile:m,selectedFiles:g,handleFileChange:h,handleClick:f,multiple:y=!1,containerProps:x,errorMessageProps:b,progressProps:k,videoProps:j,imageProps:w,iconProps:C,textProps:S,fileType:v,previewUrl:I,renderError:F=({errorMessage:R,errorMessageProps:H,themeMode:M})=>r.jsx(i.Text,{color:"red",fontSize:12,marginTop:8,...H,...z==null?void 0:z.text,children:R}),renderText:W=({text:R,textProps:H})=>r.jsx(i.Text,{marginTop:8,...H,...z==null?void 0:z.text,children:R}),renderFile:E=({selectedFile:R,textProps:H})=>R?r.jsxs(i.Center,{marginTop:8,gap:10,flexDirection:"column",...z==null?void 0:z.container,children:[r.jsx(i.Text,{maxLines:2,...H,...z==null?void 0:z.text,children:R.name}),r.jsxs(i.Text,{...H,...z==null?void 0:z.text,children:["(",Math.round(R.size/1024)," KB)"]})]}):null,renderVideo:T=({selectedFile:R,videoRef:H,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:R?URL.createObjectURL(R):void 0,style:{objectFit:"cover"},ref:H,...M,...z==null?void 0:z.view})}),renderImage:A=({previewUrl:R,imageProps:H})=>(console.log("Rendering image with URL:",R),r.jsx(i.View,{width:"100%",height:"100%",position:"relative",...z==null?void 0:z.view,children:r.jsx(i.Image,{src:R,alt:"Preview",width:"100%",height:"100%",objectFit:"cover",style:{maxHeight:"100%",maxWidth:"100%"},...H,...z==null?void 0:z.image})})),renderProgress:P=({progress:R,progressProps:H})=>r.jsxs(i.Horizontal,{gap:8,alignItems:"center",...H,...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:`${R}%`,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:[R,"%"]})]}),views:z={}})=>{const R=I||l;return r.jsxs(i.Center,{onClick:f,cursor:"pointer",border:"1px solid color-black-100",borderRadius:8,padding:16,flexDirection:"column",overflow:"hidden",position:"relative",height:m&&t===100?"200px":"auto",...x,...z==null?void 0:z.container,children:[t===100&&v==="image"&&R&&A({previewUrl:R,imageProps:w}),t===100&&v==="video"&&s&&T({selectedFile:m,thumbnailUrl:s,videoRef:c,videoProps:j,imageProps:w}),t===100&&v==="file"&&m&&E({selectedFile:m,textProps:S}),t<100&&(a||r.jsx(Lt,{widthHeight:32,...C})),!o&&!m&&n&&W({text:n,textProps:S}),o&&P({progress:t,progressProps:k}),!o&&d&&F({errorMessage:d,errorMessageProps:b}),r.jsx(i.Input,{type:"file",ref:u,onChange:h,accept:e,multiple:y,style:{display:"none"},...z==null?void 0:z.view})]})},Er=({accept:e="*/*",icon:o,text:t,maxSize:a,onFileSelect:n,onMultipleFileSelect:l,validateFile:s,isLoading:d=!1,progress:u=0,fileType:c,multiple:m=!1,...g})=>{const{previewUrl:h,thumbnailUrl:f,errorMessage:y,videoRef:x,fileInputRef:b,selectedFile:k,selectedFiles:j,handleFileChange:w,handleClick:C}=Ou({maxSize:a,onFileSelect:n,onMultipleFileSelect:l,validateFile:s,multiple:m}),v=(()=>{if(c)return c;if(k)return k.type.startsWith("image/")?"image":k.type.startsWith("video/")?"video":"file"})();return r.jsx(Nu,{handleClick:C,accept:e,isLoading:d,progress:u,icon:o,text:t,maxSize:a,onFileSelect:n,validateFile:s,errorMessage:y,handleFileChange:w,selectedFile:k,selectedFiles:j,videoRef:x,fileInputRef:b,previewUrl:h,thumbnailUrl:f,fileType:v,multiple:m,...g})};function qu(e){const o=Math.floor(e/60),t=e%60;return`${o}:${t.toString().padStart(2,"0")}`}function Uu({onAudio:e,recording:o,paused:t,audioBlob:a,analyserNode:n,duration:l,error:s,startRecording:d,stopRecording:u,pauseRecording:c,resumeRecording:m,resetRecording:g,handleFileChange:h,...f}){const[y,x]=p.useState(null);p.useEffect(()=>{if(a){const j=URL.createObjectURL(a);return x({url:j,label:`recording-${Date.now()}.webm`}),()=>{URL.revokeObjectURL(j)}}return()=>{}},[a]);const b=()=>{y!=null&&y.url&&URL.revokeObjectURL(y.url),x(null),g()},k=j=>{e(j),y!=null&&y.url&&URL.revokeObjectURL(y.url),x({url:URL.createObjectURL(j),label:j.name})};return r.jsxs(i.Vertical,{gap:"10px",width:"100%",...f,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(Er,{accept:"audio/*",icon:r.jsx(Xo,{widthHeight:16}),maxSize:100*1024*1024,onFileSelect:k,fileType:"file",multiple:!1,renderError:({errorMessage:j})=>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:j=>j.size>100*1024*1024?"File size exceeds 100MB limit":j.type.startsWith("audio/")?null:"Only audio files are allowed"}),r.jsx(i.View,{as:"button",type:"button",onClick:o?u:d,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(Hr,{widthHeight:14,color:"currentColor",filled:!1}):r.jsx(Pt,{widthHeight:18,color:"currentColor",filled:!1})}),r.jsx(i.View,{flex:1,minWidth:120,children:r.jsx(Bt,{analyserNode:o?n:null,isPaused:!o||t})}),r.jsx(i.Text,{fontSize:"12px",lineHeight:"16px",color:"color-gray-500",whiteSpace:"nowrap",children:qu(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:b,width:"24px",height:"24px",display:"flex",alignItems:"center",justifyContent:"center",border:"0",backgroundColor:"transparent",color:"color-gray-500",cursor:"pointer",children:r.jsx(Te,{widthHeight:14,color:"currentColor"})})]}),r.jsx(i.View,{as:"audio",controls:!0,src:y.url,width:"100%"})]}),s&&r.jsx(i.Text,{fontSize:"11px",lineHeight:"16px",color:"color-red-500",children:s})]})}function Wn(){const[e,o]=p.useState(!1),[t,a]=p.useState(!1),[n,l]=p.useState(0),[s,d]=p.useState(null),[u,c]=p.useState(null),[m,g]=p.useState(null),h=p.useRef(null),f=p.useRef(null),y=p.useRef(null),x=p.useRef(null),b=p.useRef([]),k=p.useRef(null),j=typeof MediaRecorder<"u"&&MediaRecorder.isTypeSupported("audio/webm;codecs=opus")?"audio/webm;codecs=opus":"audio/webm",w=p.useCallback(()=>{h.current&&(h.current.state!=="inactive"&&h.current.stop(),h.current=null),x.current&&(x.current.getTracks().forEach(W=>W.stop()),x.current=null),f.current&&(f.current.close(),f.current=null),y.current&&(y.current.disconnect(),y.current=null),c(null),k.current&&(clearInterval(k.current),k.current=null)},[]),C=p.useCallback(async()=>{w(),d(null),l(0),b.current=[];try{const W=await navigator.mediaDevices.getUserMedia({audio:!0});x.current=W;const E=MediaRecorder.isTypeSupported(j)?j:void 0,T=new MediaRecorder(W,E?{mimeType:E}:void 0);h.current=T;const A=new(window.AudioContext||window.webkitAudioContext);f.current=A;const P=A.createMediaStreamSource(W),z=A.createAnalyser();z.fftSize=256,z.smoothingTimeConstant=.8,P.connect(z),y.current=z,c(z),T.ondataavailable=R=>{R.data.size>0&&b.current.push(R.data)},T.onstop=()=>{const R=new Blob(b.current,{type:T.mimeType||j});g(R),w()},T.start(),o(!0),a(!1),k.current=setInterval(()=>{l(R=>R+1)},1e3)}catch{d("Microphone access denied or unavailable."),w()}},[w]),S=p.useCallback(()=>{h.current&&h.current.state!=="inactive"&&h.current.stop(),o(!1),a(!1),k.current&&(clearInterval(k.current),k.current=null)},[]),v=p.useCallback(()=>{h.current&&h.current.state==="recording"&&(h.current.pause(),a(!0),k.current&&(clearInterval(k.current),k.current=null))},[]),I=p.useCallback(()=>{h.current&&h.current.state==="paused"&&(h.current.resume(),a(!1),k.current||(k.current=setInterval(()=>{l(W=>W+1)},1e3)))},[]),F=p.useCallback(()=>{w(),o(!1),a(!1),g(null),l(0),d(null),b.current=[]},[w]);return p.useEffect(()=>()=>w(),[w]),{recording:e,paused:t,audioBlob:m,analyserNode:u,duration:n,error:s,startRecording:C,stopRecording:S,pauseRecording:v,resumeRecording:I,resetRecording:F}}function Gu(e){const{onAudio:o}=e,{recording:t,paused:a,audioBlob:n,analyserNode:l,duration:s,error:d,startRecording:u,stopRecording:c,pauseRecording:m,resumeRecording:g,resetRecording:h}=Wn();return p.useEffect(()=>{if(n&&o){const y=new File([n],"recording.webm",{type:n.type||"audio/webm;codecs=opus"});o(y)}},[n,o]),{recording:t,paused:a,audioBlob:n,analyserNode:l,duration:s,error:d,startRecording:u,stopRecording:c,pauseRecording:m,resumeRecording:g,resetRecording:h,handleFileChange:y=>{var b;const x=(b=y.target.files)==null?void 0:b[0];x&&o&&o(x)}}}function Yu(e){const o=Gu(e);return r.jsx(Uu,{...e,...o})}const Xu=()=>{const[e,o]=p.useState(!1);return{imageError:e,setImageError:o}},Ku={xs:24,sm:32,md:44,lg:56,xl:72},Jr={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"}},Ju=({src:e,size:o="md",fallback:t="IM",views:a,imageError:n,setImageError:l,onClick:s=()=>{},children:d})=>{const u=Ku[o],c={...Jr.image,...(a==null?void 0:a.image)||{}};return r.jsxs(i.Center,{role:"avatar",width:u,height:u,...Jr.container,borderColor:n?"color-gray-400":"transparent",onClick:s,...a==null?void 0:a.container,children:[!n&&e?r.jsx(i.Image,{alt:"IM",src:e,style:c,width:u,height:u,onError:()=>l(!0)}):r.jsx(i.Text,{size:o,...Jr.fallback,...a==null?void 0:a.fallback,children:t}),d]})},Qu=e=>{const o=me("avatar",e),{src:t,size:a,views:n,fallback:l,onClick:s,children:d}=o,{imageError:u,setImageError:c}=Xu();return r.jsx(Ju,{src:t,size:a,views:n,fallback:l,imageError:u,setImageError:c,onClick:s,children:d})},Hn=Qu,Zu={xs:{minWidth:"20px",height:"20px",padding:"0 6px",fontSize:"10px",fontWeight:"600",lineHeight:"12px",letterSpacing:"-0.01em"},sm:{minWidth:"24px",height:"24px",padding:"0 8px",fontSize:"12px",fontWeight:"600",lineHeight:"16px",letterSpacing:"-0.01em"},md:{minWidth:"28px",height:"28px",padding:"0 10px",fontSize:"14px",fontWeight:"600",lineHeight:"20px",letterSpacing:"-0.01em"},lg:{minWidth:"32px",height:"32px",padding:"0 12px",fontSize:"16px",fontWeight:"600",lineHeight:"24px",letterSpacing:"-0.01em"},xl:{minWidth:"36px",height:"36px",padding:"0 14px",fontSize:"20px",fontWeight:"600",lineHeight:"28px",letterSpacing:"-0.01em"}},ep={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"}},op={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"}},xa={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"}},rp={square:0,rounded:"8px",pill:"9999px"},tp={"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"}},ap=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)"}}),np=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"}}}),Pn=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"}}}),lp=p.memo(({content:e,children:o,icon:t,pastil:a,pastilContent:n,action:l,position:s,shape:d="pill",variant:u="filled",size:c="md",views:m,themeMode:g,...h})=>{const{themeMode:f}=i.useTheme(),y=g||f,x=p.useMemo(()=>np()[u],[y,u]),b=p.useMemo(()=>ap(),[y]),k=p.useMemo(()=>Pn(),[y]),j=n!=null,w=l!=null,C=j||w,S=o??e,v=S!=null,I=p.useMemo(()=>{const W={width:"fit-content",display:"flex",alignItems:"center",justifyContent:"center",gap:"6px",borderRadius:rp[d],...Zu[c],...x,...C?ep[c]:{},...C?b:{},...s?tp[s]:{},...m==null?void 0:m.container};return u!=="filled"&&!C&&(x.color!==void 0&&(W.color=x.color),x.borderColor!==void 0&&(W.borderColor=x.borderColor),x.backgroundColor!==void 0&&(W.backgroundColor=x.backgroundColor),x&&x.style&&(W.style={...W.style||{},...x.style})),W},[d,c,u,x,C,b,s,m==null?void 0:m.container]);let F="currentColor";return typeof a=="string"?a in k?F=k[a].indicator.backgroundColor:F=a:a===!0&&(F="color-green-500",u==="filled"&&(F="color-white")),r.jsxs(i.Center,{role:"badge",...I,...h,children:[t&&r.jsx(i.View,{role:"badge-icon",...m==null?void 0:m.icon,children:t}),j&&r.jsx(i.Text,{role:"badge-pastil-content",backgroundColor:"color-gray-900",borderRadius:"9999px",color:"color-white",fontWeight:"700",letterSpacing:0,textTransform:"uppercase",whiteSpace:"nowrap",...op[c],...m==null?void 0:m.pastilContent,children:n}),a&&r.jsx(i.View,{role:"badge-pastil",width:"6px",height:"6px",borderRadius:"50%",backgroundColor:F,...m==null?void 0:m.pastil}),v&&r.jsx(i.Text,{role:"badgeText",color:C?"color-gray-900":I.color,fontWeight:C?"700":"600",textAlign:"center",letterSpacing:C?0:"0.02em",whiteSpace:C?"nowrap":void 0,...C?xa[c]:{},...m==null?void 0:m.text,children:S}),w&&r.jsx(i.Text,{role:"badge-action",color:"color-gray-400",fontWeight:"500",letterSpacing:0,whiteSpace:"nowrap",...xa[c],...m==null?void 0:m.action,children:l})]})}),Ce=e=>{const o=me("badge",e);return r.jsx(lp,{...o})},ip=()=>{const[e,o]=p.useState(!1);return{isHovered:e,setIsHovered:o}},sp={xs:12,sm:14,md:16,lg:18,xl:20},An=p.forwardRef(({children:e,to:o="/",iconSize:t="sm",underline:a="default",isHovered:n=!1,isExternal:l=!1,views:s={icon:{},text:{}},setIsHovered:d=()=>{},...u},c)=>{const m=()=>{a==="hover"&&d(!0)},g=()=>{a==="hover"&&d(!1)},h=()=>a==="underline"||a==="hover"&&n?"underline":"none";return r.jsx(fs.Link,{ref:c,to:o,target:l?"_blank":"_self",style:{textDecoration:"inherit",color:"inherit"},children:r.jsxs(i.Horizontal,{onMouseEnter:m,onMouseLeave:g,gap:3,alignItems:"center",flexWrap:"nowrap",textDecoration:h(),...s.text,...u,children:[e,l&&r.jsx(vn,{widthHeight:sp[t]})]})})});An.displayName="LinkView";const Vn=p.forwardRef((e,o)=>{const t=ip();return r.jsx(An,{ref:o,...t,...e})});Vn.displayName="Link";const Ot=Vn,Nt={xs:14,sm:18,md:22,lg:26,xl:30},qt={fast:50,normal:100,slow:300},cp=e=>typeof e=="string"&&(/^(#|rgb\(|rgba\(|hsl\(|hsla\(|var\()/.test(e)||["black","currentColor","inherit","transparent","white"].includes(e)),dp=({size:e="md",speed:o="normal",color:t="theme-loading",themeMode:a,...n})=>{const{getColor:l,themeMode:s}=i.useTheme(),d=l(t,{themeMode:a||s}),u=typeof e=="number"?e:Nt[e],[c,m]=p.useState(0);return p.useEffect(()=>{const g=setInterval(()=>{m(h=>h+45)},qt[o]);return()=>clearInterval(g)},[o]),r.jsxs(i.View,{as:"svg",xmlns:"http://www.w3.org/2000/svg",width:`${u}px`,height:`${u}px`,viewBox:"0 0 24 24",fill:"none",stroke:d,strokeWidth:"1",strokeLinecap:"round",strokeLinejoin:"round",style:{transform:`rotate(${c}deg)`},...n,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"})})]})},up=({size:e="md",speed:o="normal",color:t="theme-loading",themeMode:a,...n})=>{const{getColor:l,themeMode:s}=i.useTheme(),d=l(t,{themeMode:a||s}),u=typeof e=="number"?e:Nt[e],[c,m]=p.useState(0);return p.useEffect(()=>{const g=setInterval(()=>{m(h=>h+45)},qt[o]);return()=>clearInterval(g)},[o]),r.jsxs(i.View,{as:"svg",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 50 50",width:`${u}px`,height:`${u}px`,style:{transform:`rotate(${c}deg)`},...n,children:[r.jsx("circle",{cx:"10",cy:"25",r:"4",fill:d}),r.jsx("circle",{cx:"25",cy:"25",r:"4",fill:d}),r.jsx("circle",{cx:"40",cy:"25",r:"4",fill:d})]})},pp=({size:e="md",speed:o="normal",color:t="theme-loading",themeMode:a,...n})=>{const{getColor:l,themeMode:s}=i.useTheme(),d=l(t,{themeMode:a||s}),u=typeof e=="number"?e:Nt[e],[c,m]=p.useState(0);return p.useEffect(()=>{const g=setInterval(()=>{m(h=>h+45)},qt[o]);return()=>clearInterval(g)},[o]),r.jsx(i.View,{as:"svg",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 50 50",width:`${u}px`,height:`${u}px`,style:{transform:`rotate(${c}deg)`},...n,children:r.jsx("circle",{cx:"25",cy:"25",r:"20",fill:"none",stroke:d,strokeWidth:"5",strokeDasharray:"1,10"})})},mp=({size:e,children:o,textColor:t,loaderColor:a,type:n="default",speed:l="normal",textPosition:s="right",views:d,...u})=>{const{getColor:c}=i.useTheme(),m=f=>cp(f)?f:c(f||"theme-loading");a=m(a||u.color||"theme-loading"),t=m(t||u.color||"theme-loading");const g={size:e,speed:l,color:a},h={default:r.jsx(dp,{...g}),dotted:r.jsx(up,{...g}),quarter:r.jsx(pp,{...g})};return r.jsxs(i.Center,{gap:10,flexDirection:s==="top"||s==="bottom"?"column":"row",...u,...d==null?void 0:d.container,children:[(s==="left"||s==="top")&&o&&r.jsx(i.View,{color:t,...d==null?void 0:d.text,children:o}),h[n],(s==="right"||s==="bottom")&&o&&r.jsx(i.View,{color:t,...d==null?void 0:d.text,children:o})]})},gp=e=>{const o=me("loader",e);return r.jsx(mp,{...o})},To=gp,En={xs:{minHeight:24,paddingHorizontal:12,paddingVertical:6,fontSize:10,fontWeight:500,lineHeight:12,letterSpacing:"-0.01em"},sm:{minHeight:32,paddingHorizontal:16,paddingVertical:8,fontSize:12,fontWeight:500,lineHeight:16,letterSpacing:"-0.01em"},md:{minHeight:40,paddingHorizontal:20,paddingVertical:10,fontSize:14,fontWeight:500,lineHeight:20,letterSpacing:"-0.01em"},lg:{minHeight:48,paddingHorizontal:24,paddingVertical:12,fontSize:16,fontWeight:500,lineHeight:24,letterSpacing:"-0.01em"},xl:{minHeight:56,paddingHorizontal:28,paddingVertical:14,fontSize:20,fontWeight:500,lineHeight:28,letterSpacing:"-0.01em"}},Go={square:0,rounded:8,pill:999},hp={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}},Ve=e=>/^(color|theme|light|dark)-/.test(e)?`var(--${e})`:e,fp=(e,o,t=!1,a)=>{const n=t?o:e,l=t?e:o,s=t?o:e,u=(e==="theme-primary"||a&&e===a.primary)&&(a!=null&&a.onPrimary)?a.onPrimary:l,c=`0 0 0 2px ${Ve("color-white")}, 0 0 0 4px ${Ve(s)}`;return{filled:{backgroundColor:n,color:u,borderWidth:1,borderStyle:"solid",borderColor:n,_hover:{opacity:.92},_active:{opacity:.96},_focusVisible:{outline:"none",boxShadow:c},transition:"background-color 0.2s ease, border-color 0.2s ease, opacity 0.2s ease"},empty:{color:s,borderWidth:1,borderStyle:"solid",borderColor:s,backgroundColor:"transparent",_hover:{opacity:.9},_active:{opacity:.95},_focusVisible:{outline:"none",boxShadow:c},transition:"background-color 0.2s ease, opacity 0.2s ease"},outline:{color:s,borderWidth:1,borderStyle:"solid",borderColor:s,backgroundColor:"transparent",_hover:{opacity:.9},_active:{opacity:.95},_focusVisible:{outline:"none",boxShadow:c},transition:"background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease"},ghost:{color:s,borderWidth:0,borderStyle:"solid",borderColor:s,backgroundColor:"transparent",_hover:{opacity:.86},_active:{opacity:.94},_focusVisible:{outline:"none",boxShadow:c},transition:"background-color 0.2s ease, color 0.2s ease"},link:{color:s,borderWidth:0,borderStyle:"none",borderColor:s,minHeight:"auto",paddingHorizontal:"4px",paddingVertical:"10px",textDecoration:"underline",backgroundColor:"transparent",style:{textUnderlineOffset:"2px",textDecorationThickness:"1px",textDecorationColor:Ve(s)},_hover:{opacity:.8},_active:{opacity:.9},_focusVisible:{outline:"none",boxShadow:c},transition:"opacity 0.2s ease"},subtle:{backgroundColor:`${s}-${t?200:100}`,color:s,borderWidth:1,borderStyle:"solid",borderColor:`${s}-${t?400:250}`,_hover:{backgroundColor:`${s}-${t?300:180}`},_active:{backgroundColor:`${s}-${t?380:240}`},_focusVisible:{outline:"none",boxShadow:c},transition:"background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease"}}},yp=p.memo(({children:e,icon:o,isLoading:t,iconPosition:a="left",loaderPosition:n="left",size:l="md",resolvedTextColor:s,isIconRounded:d,views:u})=>{const c=["left","right"].includes(a)?i.Horizontal:i.Vertical,m=En[l];return r.jsxs(c,{gap:8,alignItems:"center",justifyContent:"center",fontSize:m.fontSize,fontWeight:m.fontWeight,lineHeight:m.lineHeight,letterSpacing:m.letterSpacing,whiteSpace:"nowrap",color:s,...u==null?void 0:u.content,children:[t&&n==="left"&&r.jsx(To,{size:l==="xs"||l==="sm"?"sm":"md",color:s,...u==null?void 0:u.loader}),o&&["left","top"].includes(a)&&!t&&r.jsx(i.View,{color:s,...u==null?void 0:u.icon,children:o}),e,o&&["right","bottom"].includes(a)&&!t&&r.jsx(i.View,{color:s,...u==null?void 0:u.icon,children:o}),t&&n==="right"&&r.jsx(To,{size:l==="xs"||l==="sm"?"sm":"md",color:s,...u==null?void 0:u.loader})]})}),xp=e=>{const o=Go[e];return typeof o=="number"?o:typeof o=="string"&&parseInt(o,10)||0},bp=({asComponent:e,isDisabled:o,isLoading:t,isWrapped:a=!1,borderRadius:n,width:l,height:s,baseStyles:d,sizeStyles:u,iconPad:c,mainTone:m,resolvedTextColor:g,children:h,borderWidth:f=0,...y})=>r.jsx(i.Element,{as:e,disabled:!!(o||t),display:a?"flex":"inline-flex",alignItems:"center",justifyContent:"center",borderRadius:n,width:l,height:s,...d,...u,...c,backgroundColor:(d==null?void 0:d.backgroundColor)||(a?m:void 0),color:g,borderWidth:a?0:void 0,cursor:o?"default":"pointer",...y,children:h}),kp=({shape:e,isDisabled:o,onClick:t,shadow:a,borderWidth:n,isAuto:l,isFilled:s,views:d,children:u,...c})=>r.jsx(i.Element,{as:"div",position:"relative",display:"inline-flex",alignItems:"center",justifyContent:"center",borderRadius:Go[e],cursor:o?"default":"pointer",onClick:t,boxShadow:a,padding:n,width:l?"fit-content":s?"100%":void 0,...d==null?void 0:d.container,...c,children:u}),Cp=({variant:e,animation:o,to:t,isDisabled:a,isLoading:n,isAuto:l,isFilled:s,isExternal:d,shape:u="rounded",shadow:c,onClick:m,views:g,baseStyles:h,sizeStyles:f,iconPad:y,containerRef:x,resolvedTextColor:b,content:k,size:j,mainTone:w,borderMovingDuration:C=2,borderMovingGradientColors:S=["#705CFF","#FF5C97","#FFC75C"],animatedStrokeAccentColor:v="#705CFF",animatedStrokeTextColor:I="color-gray-900",...F})=>{var A;const W=xp(u),E=t?r.jsx(Ot,{to:t,isExternal:d,color:"currentColor",textDecoration:"inherit",_hover:{color:"currentColor"},...g==null?void 0:g.link,children:k}):k,T={isDisabled:a,isLoading:n,baseStyles:h,sizeStyles:f,iconPad:y,resolvedTextColor:b,mainTone:w,children:E};if(o==="borderMoving"&&S){const z={from:{backgroundPosition:"0% 50%"},to:{backgroundPosition:"200% 50%"},duration:`${C}s`,timingFunction:"linear",iterationCount:"infinite"};return r.jsx(kp,{shape:u,isDisabled:a,onClick:m,shadow:c,borderWidth:3,isAuto:l,isFilled:s,views:g,background:`linear-gradient(90deg, ${Ve(S[0])}, ${Ve(S[1])}, ${Ve(S[2])}, ${Ve(S[0])})`,backgroundSize:"200% 100%",animate:z,...F,children:r.jsx(bp,{asComponent:t?"div":"button",isWrapped:!0,borderRadius:Math.max(0,W-3),width:"100%",height:"100%",...T})})}if(o==="animatedStroke"){const P=Ve(v),z=Ve(I),R=1e3,H={from:{strokeWidth:"8px",strokeDasharray:`0 ${R}`,strokeDashoffset:-Math.round(R*.63)},to:{strokeWidth:"3px",strokeDasharray:`${R}`,strokeDashoffset:0},duration:"0.9s",timingFunction:"ease-in",fillMode:"forwards"},M=["group",(A=g==null?void 0:g.container)==null?void 0:A.className,F==null?void 0:F.className].filter(Boolean).join(" ");return r.jsxs(i.Element,{ref:x,as:t?"div":"button",type:t?void 0:"button",disabled:!!(!t&&(a||n)),onClick:m,position:"relative",display:"inline-flex",alignItems:"center",justifyContent:"center",width:l?"fit-content":s?"100%":void 0,borderRadius:Go[u],boxShadow:c,transition:"background-color 0.2s ease, opacity 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease",cursor:a?"default":"pointer",color:z,backgroundColor:"transparent",borderWidth:0,...g==null?void 0:g.container,...F,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:W,ry:W,fill:"transparent",stroke:P,strokeWidth:"8px",strokeDasharray:`0 ${R}`,strokeDashoffset:-Math.round(R*.63),pathLength:R,on:{groupHover:{animate:H}}})}),r.jsx(i.View,{position:"relative",zIndex:0,children:E})]})}if(o==="borderReveal"){const z=Ve((S==null?void 0:S[0])||w||"#000000"),H=C*.75/4,M=`linear-gradient(90deg, ${z} 50%, transparent 50%)`,D=`linear-gradient(180deg, ${z} 50%, transparent 50%)`,L=`linear-gradient(270deg, ${z} 50%, transparent 50%)`,V=`linear-gradient(0deg, ${z} 50%, transparent 50%)`,O="100% 0, 100% 100%, 0 100%, 0 0",_="0 0, 100% 0, 100% 100%, 0 100%",q=`0s, ${H}s, ${H*2}s, ${H*2}s`,B=`${H*2}s, ${H*2}s, ${H}s, 0s`,X=4;return r.jsx(i.Element,{ref:x,as:"div",position:"relative",display:"inline-flex",alignItems:"center",justifyContent:"center",borderRadius:Go[u],cursor:a?"default":"pointer",onClick:m,boxShadow:c,padding:3,background:`
|
|
2
2
|
${M} no-repeat,
|
|
3
3
|
${D} no-repeat,
|
|
4
|
-
${
|
|
4
|
+
${L} no-repeat,
|
|
5
5
|
${V} no-repeat
|
|
6
|
-
`,backgroundSize:`200% ${Y}px, ${Y}px 200%, 200% ${Y}px, ${Y}px 200%`,backgroundPosition:L,transitionProperty:"background-position",transitionDuration:`${H}s`,transitionTimingFunction:"linear",transitionDelay:O,_hover:{backgroundPosition:_,transitionDelay:q},width:i?"fit-content":s?"100%":void 0,...h==null?void 0:h.container,...F,children:t.jsx(l.View,{as:r?"div":"button",disabled:!!(n||a),display:"flex",alignItems:"center",justifyContent:"center",borderRadius:Math.max(0,W-3),width:"100%",height:"100%",...f,...g,...x,backgroundColor:(f==null?void 0:f.backgroundColor)||w,color:y,borderWidth:0,cursor:n?"default":"pointer",children:E})})}return t.jsx(l.Element,{ref:b,as:e==="link"&&r?"div":"button",type:e==="link"&&r?void 0:"button",disabled:!!(n||a),...g,...x,display:"inline-flex",alignItems:"center",justifyContent:"center",width:i?"fit-content":s?"100%":void 0,borderRadius:qo[d],boxShadow:c,transition:"background-color 0.2s ease, opacity 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease",cursor:n?"default":"pointer",onClick:p,...f,...h==null?void 0:h.container,...F,children:E})},pu=u.memo(u.forwardRef(({variant:e="filled",size:o="md",shape:r="rounded",iconPosition:n="left",loaderPosition:a="left",backgroundColor:i,color:s,textColor:m,reversed:d=!1,isAuto:c=!0,isFilled:p,isDisabled:h,isLoading:f,isIconRounded:g,isHovered:x,icon:b,children:y,to:k,isExternal:S,shadow:w,onClick:C,views:j={},animation:v,loaderProps:I,config:F,ariaLabel:W,borderMovingDuration:E=2,borderMovingGradientColors:T=["#705CFF","#FF5C97","#FFC75C"],animatedStrokeAccentColor:A="#705CFF",animatedStrokeTextColor:P="#333333",...z},R)=>{const M=h?"theme-disabled":f?"theme-loading":i??s??"theme-primary",D=m??"color-white",{config:B}=zt(),V=B==null?void 0:B.theme,_=u.useMemo(()=>{const U=lu(M,D,d,V);return F!=null&&F.variants&&Object.keys(F.variants).forEach(K=>{U[K]&&(U[K]=Ee(U[K],F.variants[K]))}),U},[M,D,d,V,F==null?void 0:F.variants])[e],q=(_==null?void 0:_.color)??D,O=t.jsx(su,{icon:b,isLoading:f,iconPosition:n,loaderPosition:a,size:o,resolvedTextColor:q,isIconRounded:g,views:j,children:y}),Y=Aa[o],$=g?iu[o]:{};return t.jsx(uu,{variant:e,animation:v,to:k,isDisabled:h,isLoading:f,isAuto:c,isFilled:p,isExternal:S,shape:r,shadow:w,onClick:C,views:j,baseStyles:_,sizeStyles:Y,iconPad:$,resolvedTextColor:q,content:O,size:o,mainTone:M,borderMovingDuration:E,borderMovingGradientColors:T,animatedStrokeAccentColor:A,animatedStrokeTextColor:P,containerRef:R,...z})})),hu=e=>{const[o,r]=l.useHover(),n=pe("button",e);return t.jsx(pu,{isHovered:r,...n})},ie=hu,fu={sm:{padding:"12px"},md:{padding:"16px"},lg:{padding:"24px"}},gu={square:0,rounded:"8px",pill:"24px"},xu=e=>{const o=e==="dark";return{default:{backgroundColor:o?"color-gray-900":"color-white",border:"none",transition:"background-color 0.2s ease, box-shadow 0.2s ease"},outlined:{backgroundColor:o?"color-gray-900":"color-white",borderWidth:"1px",borderStyle:"solid",borderColor:o?"color-gray-700":"color-gray-200",transition:"border-color 0.2s ease, box-shadow 0.2s ease",_hover:{borderColor:o?"color-gray-600":"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:o?"color-gray-900":"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)"}}}},Vt=e=>{const o=e.themeMode==="dark";return{container:{backgroundColor:o?"color-gray-900":"color-white",color:o?"color-white":"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:o?"color-gray-800":"color-gray-100",color:"theme-primary",fontWeight:600,fontSize:14},content:{padding:"16px",color:o?"color-gray-300":"color-gray-600",fontSize:12,lineHeight:"18px"},footer:{padding:"16px",borderTop:"1px solid",borderColor:o?"color-gray-800":"color-gray-100",justifyContent:"flex-end",gap:8}}},Ea=u.createContext({}),Or=()=>u.useContext(Ea),mr=({children:e,views:o,style:r,themeMode:n,...a})=>{var c;const i=l.useTheme(),{styles:s}=Or(),m=Vt(i).header,d={...m,...s==null?void 0:s.header,...a,style:{...m==null?void 0:m.style,...(c=s==null?void 0:s.header)==null?void 0:c.style,...r}};return t.jsx(l.Vertical,{gap:8,...d,children:e})},ur=({children:e,views:o,style:r,themeMode:n,...a})=>{var c;const i=l.useTheme(),{styles:s}=Or(),m=Vt(i).content,d={...m,...s==null?void 0:s.content,...a,style:{...m==null?void 0:m.style,...(c=s==null?void 0:s.content)==null?void 0:c.style,...r}};return t.jsx(l.Vertical,{gap:12,...d,children:e})},pr=({children:e,views:o,style:r,themeMode:n,...a})=>{var c;const i=l.useTheme(),{styles:s}=Or(),m=Vt(i).footer,d={...m,...s==null?void 0:s.footer,...a,style:{...m==null?void 0:m.style,...(c=s==null?void 0:s.footer)==null?void 0:c.style,...r}};return t.jsx(l.Vertical,{gap:8,...d,children:e})},bu=({variant:e="default",size:o="md",shape:r="rounded",children:n,header:a,footer:i,isFullWidth:s=!1,views:m,style:d,themeMode:c,config:p,...h})=>{var j,v;const f=l.useTheme(),g=Vt(f),x=((j=fu[o])==null?void 0:j.padding)||"16px",b=u.useMemo(()=>({styles:{container:{...g.container,borderRadius:gu[r],...m==null?void 0:m.container},header:{...g.header,padding:x,...m==null?void 0:m.header},content:{...g.content,padding:x,...m==null?void 0:m.content},footer:{...g.footer,padding:x,...m==null?void 0:m.footer}}}),[g,m,x,r]),y=u.Children.toArray(n).some(I=>u.isValidElement(I)&&(I.type===mr||I.type===ur||I.type===pr)),{themeMode:k}=f,w=xu(c||k)[e],C={width:s?"100%":"auto",overflow:"hidden",...w,...b.styles.container,...h,style:{...(v=b.styles.container)==null?void 0:v.style,...d}};return t.jsx(Ea.Provider,{value:b,children:t.jsx(l.View,{...C,children:y?n:t.jsxs(l.Vertical,{width:"100%",children:[a&&t.jsx(mr,{children:a}),t.jsx(ur,{children:n}),i&&t.jsx(pr,{children:i})]})})})},yu=e=>{const o=pe("card",e);return t.jsx(bu,{...o})},ge=yu;ge.Header=mr;ge.Content=ur;ge.Footer=pr;const ku=({defaultActiveIndex:e=0,activeIndex:o,onChange:r,autoPlay:n=!1,autoPlayInterval:a=3e3,pauseOnHover:i=!0,infinite:s=!0,totalSlides:m,stepIndices:d})=>{const c=u.useRef(m||0),[p,h]=u.useState(m||0),f=u.useRef(new Set),g=u.useRef(0),x=u.useMemo(()=>Ir("carousel-content"),[]),[b,y]=u.useState(o!==void 0?o:e),[k,S]=u.useState(!1),[w,C]=u.useState(!1),[j,v]=u.useState(0),[I,F]=u.useState(0),W=u.useRef(null);u.useEffect(()=>{o!==void 0&&y(o)},[o]);const E=u.useCallback(_=>{let q=_;s?_<0?q=p-1:_>=p&&(q=0):q=Math.max(0,Math.min(_,p-1)),d&&d.length>0&&(d.includes(q)||(q=d.reduce((Y,$)=>Math.abs($-q)<Math.abs(Y-q)?$:Y))),o===void 0&&y(q),r&&r(q)},[o,s,r,p]),T=u.useCallback(()=>{E(b+1)},[b,E]),A=u.useCallback(()=>{E(b-1)},[b,E]);u.useEffect(()=>(n&&!k&&!w&&(W.current=setInterval(()=>{T()},a)),()=>{W.current&&clearInterval(W.current)}),[n,a,k,w,T,i]);const P=u.useCallback(()=>{i&&S(!0)},[i]),z=u.useCallback(()=>{S(!1)},[]),R=u.useCallback(_=>{C(!0),"touches"in _?(v(_.touches[0].clientX),F(_.touches[0].clientY)):(v(_.clientX),F(_.clientY))},[]),H=u.useCallback(_=>{if(!w)return;let q,O;"touches"in _?(q=_.touches[0].clientX,O=_.touches[0].clientY):(q=_.clientX,O=_.clientY);const Y=q-j,$=O-I;Math.abs(Y)>Math.abs($)&&Math.abs(Y)>50&&(Y>0?A():T(),C(!1))},[w,j,I,T,A]),M=u.useCallback(()=>{C(!1)},[]),D=u.useCallback(()=>{const _=g.current++;f.current.add(_);const q=f.current.size;return c.current=q,h(q),_},[]),B=u.useCallback(_=>{f.current.delete(_);const q=f.current.size;if(c.current=q,h(q),q>0&&b>=q){const O=Math.max(0,q-1);o===void 0&&y(O),r&&r(O)}},[b,o,r]),V=s||b>0,L=s||b<p-1;return{activeIndex:b,totalSlides:p,goToSlide:E,nextSlide:T,prevSlide:A,canGoNext:L,canGoPrevious:V,handleMouseEnter:P,handleMouseLeave:z,handleDragStart:R,handleDragMove:H,handleDragEnd:M,registerSlide:D,unregisterSlide:B,contentId:x,infinite:s}},Cu={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"}},Su={dot:{backgroundColor:"theme-primary"},line:{backgroundColor:"theme-primary"},number:{backgroundColor:"theme-primary",color:"color-white"}},kt={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"}},Yo=()=>({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,...kt},nextButton:{position:"absolute",top:"50%",right:"16px",transform:"translateY(-50%)",zIndex:10,...kt}}),Va=u.createContext(null),Dt=()=>{const e=u.useContext(Va);if(!e)throw new Error("Carousel compound components must be used within <Carousel>");return e},Da=({children:e,isActive:o,index:r,views:n,...a})=>t.jsx(l.View,{flexShrink:0,width:"100%",height:"100%",display:o?"block":"none",...n,...a,children:e}),$a=({views:e,children:o,...r})=>{const{goToPrevious:n,canGoPrevious:a,styles:i}=Dt(),m={...Yo().prevButton,...i==null?void 0:i.prevButton,...e==null?void 0:e.prevButton};return t.jsx(ie,{"aria-label":"Previous slide",onClick:()=>n(),isDisabled:!a,...m,...r,children:o??t.jsx(se,{orientation:"left",widthHeight:16})})},Ba=({views:e,children:o,...r})=>{const{goToNext:n,canGoNext:a,styles:i}=Dt(),m={...Yo().nextButton,...i==null?void 0:i.nextButton,...e==null?void 0:e.nextButton};return t.jsx(ie,{"aria-label":"Next slide",onClick:()=>n(),isDisabled:!a,...m,...r,children:o??t.jsx(se,{orientation:"right",widthHeight:16})})},_a=({children:e,views:o,...r})=>{const{registerSlide:n,unregisterSlide:a,styles:i}=Dt(),s=u.useRef(null);u.useEffect(()=>{const c=n();return s.current=c,()=>{s.current!==null&&a(s.current)}},[n,a]);const d={...Yo().item,...i==null?void 0:i.item,...o==null?void 0:o.item};return t.jsx(l.View,{role:"group","aria-roledescription":"slide",...d,...r,children:e})},La=({children:e,views:o,style:r,...n})=>{const{currentIndex:a,styles:i,contentId:s}=Dt(),m=Yo(),d={...m.content,...i==null?void 0:i.content,...o==null?void 0:o.content},c={...m.innerContainer,...i==null?void 0:i.innerContainer,...o==null?void 0:o.innerContainer},p=`-${a*100}%`;return t.jsx(l.View,{...d,...n,style:{...d==null?void 0:d.style,...r},id:s,"aria-live":"polite",children:t.jsx(l.View,{...c,style:{...c==null?void 0:c.style,transform:`translateX(${p})`},children:e})})},ju=({children:e,defaultActiveIndex:o=0,activeIndex:r,onChange:n,showNavigation:a=!0,navigationPosition:i="inside",prevButton:s,nextButton:m,showIndicators:d=!0,indicatorPosition:c="bottom",indicatorVariant:p="dot",autoPlay:h=!1,autoPlayInterval:f=3e3,pauseOnHover:g=!0,infinite:x=!0,direction:b="horizontal",transitionDuration:y=300,views:k,stepIndices:S,themeMode:w,...C})=>{const j=u.useMemo(()=>u.Children.toArray(e),[e]),v=ku({defaultActiveIndex:o,activeIndex:r,onChange:n,autoPlay:h,autoPlayInterval:f,pauseOnHover:g,infinite:x,totalSlides:j.length}),{activeIndex:I,totalSlides:F,goToSlide:W,nextSlide:E,prevSlide:T,handleMouseEnter:A,handleMouseLeave:P,handleDragStart:z,handleDragMove:R,handleDragEnd:H}=v,M=()=>{if(!a)return null;const V=s||t.jsx(l.View,{as:"button","aria-label":"Previous slide",...kt,...k==null?void 0:k.prevButton,children:"❮"}),L=m||t.jsx(l.View,{as:"button","aria-label":"Next slide",...kt,...k==null?void 0:k.nextButton,children:"❯"});return t.jsxs(t.Fragment,{children:[t.jsx(l.View,{position:"absolute",top:"50%",transform:"translateY(-50%)",left:i==="inside"?"10px":"-40px",onClick:T,cursor:!x&&I===0?"not-allowed":"pointer",opacity:!x&&I===0?.5:1,children:V}),t.jsx(l.View,{position:"absolute",top:"50%",transform:"translateY(-50%)",right:i==="inside"?"10px":"-40px",onClick:E,cursor:!x&&I===j.length-1?"not-allowed":"pointer",opacity:!x&&I===j.length-1?.5:1,children:L})]})},D=()=>d?t.jsx(l.Horizontal,{position:"absolute",left:"0",right:"0",justifyContent:"center",...c==="top"?{top:"10px"}:{bottom:"10px"},...k==null?void 0:k.indicators,children:j.map((V,L)=>t.jsx(l.View,{onClick:()=>W(L),cursor:"pointer",...Cu[p],...L===I?{...Su[p]}:{},...k==null?void 0:k.indicator,...L===I?k==null?void 0:k.activeIndicator:{},children:p==="number"&&L+1},L))}):null;return u.useMemo(()=>u.Children.toArray(e).some(V=>u.isValidElement(V)&&(V.type===La||V.type===_a||V.type===$a||V.type===Ba)),[e])?t.jsx(Va.Provider,{value:{currentIndex:I,totalSlides:F,goToSlide:W,goToNext:E,goToPrevious:T,canGoNext:v.canGoNext,canGoPrevious:v.canGoPrevious,registerSlide:v.registerSlide,unregisterSlide:v.unregisterSlide,styles:{...Yo(),...k},contentId:v.contentId,infinite:x},children:t.jsx(l.View,{role:"region","aria-roledescription":"carousel","aria-label":"Carousel",position:"relative",width:"100%",height:"100%",overflow:"hidden",...k==null?void 0:k.container,...C,children:e})}):t.jsxs(l.View,{position:"relative",width:"100%",height:"100%",overflow:"hidden",onMouseEnter:A,onMouseLeave:P,onTouchStart:z,onTouchMove:R,onTouchEnd:H,onMouseDown:z,onMouseMove:R,onMouseUp:H,...k==null?void 0:k.container,...C,children:[t.jsx(l.View,{width:"100%",height:"100%",position:"relative",...k==null?void 0:k.slideWrapper,children:j.map((V,L)=>t.jsx(Da,{isActive:L===I,index:L,views:k==null?void 0:k.slide,children:V},L))}),M(),D()]})},wu=e=>t.jsx(ju,{...e}),Me=wu;Me.Slide=Da;Me.Content=La;Me.Item=_a;Me.Previous=$a;Me.Next=Ba;const Re={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"},Oa=[Re.blue,Re.green,Re.purple,Re.orange,Re.red,Re.teal,Re.pink,Re.indigo,Re.yellow,Re.cyan],bo=Oa,vu={width:"100%",height:"100%",position:"relative",display:"flex",flexDirection:"column"},Tu={fontSize:"18px",fontWeight:"700",marginBottom:"24px",textAlign:"center",color:"color-gray-900"},Iu={display:"flex",flexWrap:"wrap",justifyContent:"flex-start",marginTop:"16px",gap:"12px"},Fu={display:"flex",alignItems:"center",padding:"4px 8px",borderRadius:"6px",cursor:"pointer",transition:"background-color 0.2s ease",_hover:{backgroundColor:"color-gray-50"}},Ru={width:"10px",height:"10px",borderRadius:"50%",marginRight:"8px"},zu={fontSize:"13px",fontWeight:"500",color:"color-gray-600"},rt={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},Na={stroke:"color-gray-100",strokeWidth:"1px",strokeDasharray:"4 4"},Ct={stroke:"color-gray-200",strokeWidth:"1px"},St={fontSize:"12px",fill:"color-gray-500",fontWeight:"500"},Mu={rx:"4px",ry:"4px",cursor:"pointer",transition:"all 0.3s cubic-bezier(0.4, 0, 0.2, 1)",_hover:{filter:"brightness(1.1)"}},Wu={strokeWidth:"3px",fill:"none",strokeLinecap:"round",strokeLinejoin:"round",transition:"stroke-width 0.2s ease"},Hu={r:"5px",strokeWidth:"2.5px",stroke:"white",cursor:"pointer",transition:"all 0.2s cubic-bezier(0.4, 0, 0.2, 1)",_hover:{r:"7px"}},nt={strokeWidth:"2px",stroke:"white",cursor:"pointer",transition:"all 0.3s ease",_hover:{transform:"scale(1.02)"}},Nr={position:"absolute",top:0,left:0,right:0,bottom:0,display:"flex",alignItems:"center",justifyContent:"center",backgroundColor:"rgba(255, 255, 255, 0.8)",borderRadius:"4px",zIndex:10,padding:"24px",textAlign:"center"},Pu={...Nr},Au={...Nr,backgroundColor:"rgba(254, 242, 242, 0.8)",color:"color-red-600"},Eu={...Nr,backgroundColor:"rgba(249, 250, 251, 0.8)",color:"color-gray-500"},Vu=({data:e,dataPoints:o,animated:r=!0,animationDuration:n=500,showTooltips:a=!0})=>{const[i,s]=u.useState(r?0:1),[m,d]=u.useState({visible:!1,x:0,y:0,content:null}),c=u.useRef(null),p=u.useRef(null);u.useEffect(()=>{if(!r){s(1);return}const S=Date.now(),w=()=>{const C=Date.now()-S,j=Math.min(C/n,1);s(j),j<1&&(c.current=requestAnimationFrame(w))};return c.current=requestAnimationFrame(w),()=>{c.current&&cancelAnimationFrame(c.current)}},[r,n]);const[h,f]=u.useState(new Set),g=u.useCallback(S=>{f(w=>{const C=new Set(w);return C.has(S)?C.delete(S):C.add(S),C})},[]),x=u.useCallback(()=>e?{...e,series:e.series.map((S,w)=>({...S,color:S.color||bo[w%bo.length],hidden:h.has(S.name)}))}:o?o.map((S,w)=>({...S,color:S.color||bo[w%bo.length],hidden:h.has(S.label)})):null,[e,o,h]),b=u.useCallback((S,w,C)=>{a&&d({visible:!0,x:S,y:w,content:C})},[a]),y=u.useCallback(()=>{d(S=>({...S,visible:!1}))},[]),k=u.useCallback(()=>{if(!p.current)return{width:0,height:0};const{width:S,height:w}=p.current.getBoundingClientRect();return{width:S,height:w}},[]);return{animationProgress:i,tooltip:m,containerRef:p,processedData:x,showTooltip:b,hideTooltip:y,getChartDimensions:k,toggleSeries:g}},Du=({data:e,width:o,height:r,animationProgress:n,showGrid:a=!0,onBarClick:i,showTooltip:s,hideTooltip:m,views:d})=>{const{getColor:c}=l.useTheme(),p={top:20,right:20,bottom:40,left:50},h=o-p.left-p.right,f=r-p.top-p.bottom,g=u.useMemo(()=>{let j=0;return e.series.forEach(v=>{v.data.forEach(I=>{j=Math.max(j,I)})}),j},[e]),x=e.labels.length,b=e.series.length,y=h/x,k=y*.8/b,S=y*.2/(b+1),w=g||10,C=u.useMemo(()=>{const v=[];for(let I=0;I<=5;I++){const F=w/5*I;v.push(F)}return v},[g]);return t.jsxs("svg",{width:o,height:r,children:[t.jsx("defs",{children:e.series.map((j,v)=>{const I=j.color?c(j.color):"black";return t.jsxs("linearGradient",{id:`bar-gradient-${v}`,x1:"0%",y1:"0%",x2:"0%",y2:"100%",children:[t.jsx("stop",{offset:"0%",stopColor:I,stopOpacity:1}),t.jsx("stop",{offset:"100%",stopColor:I,stopOpacity:.7})]},`bar-gradient-${v}`)})}),t.jsx("line",{x1:p.left,y1:r-p.bottom,x2:o-p.right,y2:r-p.bottom,...Ct,...d==null?void 0:d.axis}),t.jsx("line",{x1:p.left,y1:p.top,x2:p.left,y2:r-p.bottom,...Ct,...d==null?void 0:d.axis}),e.labels.map((j,v)=>{const I=p.left+(v+.5)*y,F=r-p.bottom+20;return t.jsx("text",{x:I,y:F,textAnchor:"middle",...St,...d==null?void 0:d.axisLabel,children:j},`x-label-${v}`)}),C.map((j,v)=>{const I=r-p.bottom-j/w*f;return t.jsxs(u.Fragment,{children:[t.jsx("text",{x:p.left-10,y:I,textAnchor:"end",dominantBaseline:"middle",...St,...d==null?void 0:d.axisLabel,children:j.toFixed(0)}),a&&t.jsx("line",{x1:p.left,y1:I,x2:o-p.right,y2:I,...Na,...d==null?void 0:d.grid})]},`y-tick-${v}`)}),e.series.map((j,v)=>j.hidden?null:t.jsx(u.Fragment,{children:j.data.map((I,F)=>{const W=I/w*f*n,E=p.left+F*y+S*(v+1)+k*v,T=r-p.bottom-W,A=e.labels[F],P=e.series.reduce((D,B)=>{const V=B.data[F];return D+(typeof V=="number"?V:0)},0),z=P>0?(I/P*100).toFixed(1):null,R=j.color?c(j.color):"black",H=D=>{const B=t.jsxs(l.View,{display:"flex",flexDirection:"column",minWidth:"180px",children:[t.jsxs(l.View,{display:"flex",justifyContent:"space-between",alignItems:"center",children:[t.jsx(l.Text,{fontWeight:"semibold",children:j.name}),t.jsx(l.View,{width:"12px",height:"12px",borderRadius:"2px",backgroundColor:R})]}),t.jsx(l.Text,{marginTop:"4px",color:"color-gray-500",fontSize:"12px",children:A}),t.jsxs(l.View,{marginTop:"8px",display:"flex",flexDirection:"column",children:[t.jsxs(l.View,{display:"flex",justifyContent:"space-between",children:[t.jsx(l.Text,{color:"color-gray-500",children:"Value"}),t.jsx(l.Text,{fontWeight:"medium",children:I.toLocaleString()})]}),z!==null&&t.jsxs(l.View,{marginTop:"4px",display:"flex",justifyContent:"space-between",children:[t.jsx(l.Text,{color:"color-gray-500",children:"Share"}),t.jsx(l.Text,{fontWeight:"medium",children:`${z}%`})]}),t.jsxs(l.View,{marginTop:"4px",display:"flex",justifyContent:"space-between",children:[t.jsx(l.Text,{color:"color-gray-500",children:"Category total"}),t.jsx(l.Text,{fontWeight:"medium",children:P.toLocaleString()})]})]})]}),V=D.currentTarget.getBoundingClientRect(),L=V.left+V.width/2,_=V.top;s(L,_,B)},M=()=>{i&&i(j.name,F)};return t.jsx("rect",{x:E,y:T,width:k,height:W,fill:`url(#bar-gradient-${v})`,onMouseEnter:H,onMouseMove:H,onMouseLeave:m,onClick:M,...Mu,...d==null?void 0:d.bar},`bar-${v}-${F}`)})},`series-${v}`))]})},$u=({data:e,width:o,height:r,animationProgress:n,showGrid:a=!0,onPointClick:i,showTooltip:s,hideTooltip:m,views:d})=>{const{getColor:c}=l.useTheme(),p={top:20,right:20,bottom:40,left:40},h=o-p.left-p.right,f=r-p.top-p.bottom,g=u.useMemo(()=>{let S=0;return e.series.forEach(w=>{w.data.forEach(C=>{S=Math.max(S,C)})}),S},[e]),x=g||10,b=u.useMemo(()=>{const w=[];for(let C=0;C<=5;C++){const j=x/5*C;w.push(j)}return w},[g]),y=S=>{if(S.length<2)return"";const w=S.map((j,v)=>({x:p.left+v/(e.labels.length-1)*h,y:r-p.bottom-j/x*f*n}));let C=`M ${w[0].x},${w[0].y}`;for(let j=0;j<w.length-1;j++){const v=w[j===0?j:j-1],I=w[j],F=w[j+1],W=w[j+2===w.length?j+1:j+2],E=I.x+(F.x-v.x)/6,T=I.y+(F.y-v.y)/6,A=F.x-(W.x-I.x)/6,P=F.y-(W.y-I.y)/6;C+=` C ${E},${T} ${A},${P} ${F.x},${F.y}`}return C},k=S=>{if(S.length<2)return"";const w=y(S),C=p.left,j=p.left+h,v=r-p.bottom;return`${w} L ${j},${v} L ${C},${v} Z`};return t.jsxs("svg",{width:o,height:r,children:[t.jsx("defs",{children:e.series.map((S,w)=>{const C=S.color?c(S.color):"black";return t.jsxs("linearGradient",{id:`gradient-${w}`,x1:"0%",y1:"0%",x2:"0%",y2:"100%",children:[t.jsx("stop",{offset:"0%",stopColor:C,stopOpacity:.3}),t.jsx("stop",{offset:"100%",stopColor:C,stopOpacity:0})]},`gradient-${w}`)})}),t.jsx("line",{x1:p.left,y1:r-p.bottom,x2:o-p.right,y2:r-p.bottom,...Ct,...d==null?void 0:d.axis}),t.jsx("line",{x1:p.left,y1:p.top,x2:p.left,y2:r-p.bottom,...Ct,...d==null?void 0:d.axis}),e.labels.map((S,w)=>{const C=p.left+w/(e.labels.length-1)*h,j=r-p.bottom+20;return t.jsx("text",{x:C,y:j,textAnchor:"middle",...St,...d==null?void 0:d.axisLabel,children:S},`x-label-${w}`)}),b.map((S,w)=>{const C=r-p.bottom-S/x*f;return t.jsxs(u.Fragment,{children:[t.jsx("text",{x:p.left-10,y:C,textAnchor:"end",dominantBaseline:"middle",...St,...d==null?void 0:d.axisLabel,children:S.toFixed(0)}),a&&t.jsx("line",{x1:p.left,y1:C,x2:o-p.right,y2:C,...Na,...d==null?void 0:d.grid})]},`y-tick-${w}`)}),e.series.map((S,w)=>{if(S.hidden)return null;const C=S.color?c(S.color):"black";return t.jsxs(u.Fragment,{children:[t.jsx("path",{d:k(S.data),fill:`url(#gradient-${w})`,...d==null?void 0:d.area}),t.jsx("path",{d:y(S.data),stroke:C,...Wu,...d==null?void 0:d.line}),S.data.map((j,v)=>{const I=p.left+v/(e.labels.length-1)*h,F=r-p.bottom-j/x*f*n,W=e.labels[v],E=e.series.reduce((M,D)=>{const B=D.data[v];return M+(typeof B=="number"?B:0)},0),T=E>0?(j/E*100).toFixed(1):null,A=v>0&&typeof S.data[v-1]=="number"?S.data[v-1]:null,P=typeof A=="number"?j-A:null,z=typeof P=="number"?`${P>=0?"+":""}${P.toLocaleString()}`:null,R=M=>{const D=t.jsxs(l.View,{display:"flex",flexDirection:"column",minWidth:"200px",children:[t.jsxs(l.View,{display:"flex",justifyContent:"space-between",alignItems:"center",children:[t.jsx(l.Text,{fontWeight:"semibold",children:S.name}),t.jsx(l.View,{width:"12px",height:"12px",borderRadius:"2px",backgroundColor:C})]}),t.jsx(l.Text,{marginTop:"4px",color:"color-gray-500",fontSize:"12px",children:W}),t.jsxs(l.View,{marginTop:"8px",display:"flex",flexDirection:"column",children:[t.jsxs(l.View,{display:"flex",justifyContent:"space-between",children:[t.jsx(l.Text,{color:"color-gray-500",children:"Value"}),t.jsx(l.Text,{fontWeight:"medium",children:j.toLocaleString()})]}),z!==null&&t.jsxs(l.View,{marginTop:"4px",display:"flex",justifyContent:"space-between",children:[t.jsx(l.Text,{color:"color-gray-500",children:"Change"}),t.jsx(l.Text,{fontWeight:"medium",children:z})]}),T!==null&&t.jsxs(l.View,{marginTop:"4px",display:"flex",justifyContent:"space-between",children:[t.jsx(l.Text,{color:"color-gray-500",children:"Share"}),t.jsx(l.Text,{fontWeight:"medium",children:`${T}%`})]}),t.jsxs(l.View,{marginTop:"4px",display:"flex",justifyContent:"space-between",children:[t.jsx(l.Text,{color:"color-gray-500",children:"Category total"}),t.jsx(l.Text,{fontWeight:"medium",children:E.toLocaleString()})]})]})]}),B=M.currentTarget.getBoundingClientRect(),V=B.left+B.width/2,L=B.top+B.height/2;s(V,L,D)},H=()=>{i&&i(S.name,v)};return t.jsx("circle",{cx:I,cy:F,fill:C,onMouseEnter:R,onMouseMove:R,onMouseLeave:m,onClick:H,...Hu,...d==null?void 0:d.point},`point-${w}-${v}`)})]},`series-${w}`)})]})},Bu=({dataPoints:e,width:o,height:r,animationProgress:n,isDonut:a=!1,onSliceClick:i,showTooltip:s,hideTooltip:m,views:d})=>{const{getColor:c}=l.useTheme(),{ref:p,relation:h}=l.useElementPosition({trackChanges:!0,trackOnHover:!0,trackOnScroll:!0,trackOnResize:!0}),f=u.useRef(null);u.useEffect(()=>{f.current&&p&&(p.current=f.current)},[f,p]);const x=Math.min(o,r)/2*.8,b=o/2,y=r/2,k=a?x*.6:0,S=u.useMemo(()=>e.filter(j=>!j.hidden),[e]),w=u.useMemo(()=>S.reduce((j,v)=>j+v.value,0),[S]),C=u.useMemo(()=>{if(w===0)return[{path:a?[`M ${b} ${y-x}`,`A ${x} ${x} 0 1 1 ${b} ${y+x}`,`A ${x} ${x} 0 1 1 ${b} ${y-x}`,`M ${b} ${y-k}`,`A ${k} ${k} 0 1 0 ${b} ${y+k}`,`A ${k} ${k} 0 1 0 ${b} ${y-k}`,"Z"].join(" "):[`M ${b} ${y}`,`M ${b} ${y-x}`,`A ${x} ${x} 0 1 1 ${b} ${y+x}`,`A ${x} ${x} 0 1 1 ${b} ${y-x}`,"Z"].join(" "),color:"#E2E8F0",label:"Total",value:0,percentage:"0%",labelX:b,labelY:y,startAngle:0,endAngle:Math.PI*2,index:-1}];const j=[];let v=-Math.PI/2;for(let I=0;I<S.length;I++){const W=S[I].value/w,E=W*2*Math.PI*n,A=Math.max(0,E-.02),P=v+A,z=b+Math.cos(v)*x,R=y+Math.sin(v)*x,H=b+Math.cos(P)*x,M=y+Math.sin(P)*x,D=b+Math.cos(v)*k,B=y+Math.sin(v)*k,V=b+Math.cos(P)*k,L=y+Math.sin(P)*k,_=A>Math.PI?1:0;let q;a?q=[`M ${z} ${R}`,`A ${x} ${x} 0 ${_} 1 ${H} ${M}`,`L ${V} ${L}`,`A ${k} ${k} 0 ${_} 0 ${D} ${B}`,"Z"].join(" "):q=[`M ${b} ${y}`,`L ${z} ${R}`,`A ${x} ${x} 0 ${_} 1 ${H} ${M}`,"Z"].join(" ");const O=v+A/2,Y=a?(x+k)/2:x*.7,$=b+Math.cos(O)*Y,U=y+Math.sin(O)*Y,K=`${(W*100).toFixed(1)}%`,ee=S[I].color||bo[I%bo.length],J=c(ee);j.push({path:q,color:J,label:S[I].label,value:S[I].value,percentage:K,labelX:$,labelY:U,startAngle:v,endAngle:P,index:I,originalIndex:e.findIndex(oe=>oe.label===S[I].label)}),v=P}return j},[S,w,x,b,y,k,n,a,e]);return t.jsxs("svg",{ref:f,width:o,height:r,style:{overflow:"visible"},children:[a&&t.jsxs("g",{pointerEvents:"none",children:[t.jsx("circle",{cx:b,cy:y,r:k,fill:"white"}),t.jsx("text",{x:b,y:y-8,textAnchor:"middle",dominantBaseline:"middle",fontSize:"14px",fontWeight:"500",fill:"color-gray-500",children:"Total"}),t.jsx("text",{x:b,y:y+12,textAnchor:"middle",dominantBaseline:"middle",fontSize:"20px",fontWeight:"800",fill:"color-gray-900",children:w.toLocaleString()})]}),C.map((j,v)=>{const I=E=>{const T=w>0?j.value/w*100:0,A=w>0?Math.max(0,100-T):null,P=t.jsxs(l.View,{display:"flex",flexDirection:"column",minWidth:"200px",children:[t.jsxs(l.View,{display:"flex",justifyContent:"space-between",alignItems:"center",children:[t.jsx(l.Text,{fontWeight:"semibold",children:j.label}),t.jsx(l.View,{width:"12px",height:"12px",borderRadius:"2px",backgroundColor:j.color})]}),t.jsxs(l.Text,{marginTop:"4px",color:"color-gray-500",fontSize:"12px",children:["Slice ",j.index+1," of ",S.length]}),t.jsxs(l.View,{marginTop:"8px",display:"flex",flexDirection:"column",children:[t.jsxs(l.View,{display:"flex",justifyContent:"space-between",children:[t.jsx(l.Text,{color:"color-gray-500",children:"Value"}),t.jsx(l.Text,{fontWeight:"medium",children:j.value.toLocaleString()})]}),t.jsxs(l.View,{marginTop:"4px",display:"flex",justifyContent:"space-between",children:[t.jsx(l.Text,{color:"color-gray-500",children:"Share"}),t.jsx(l.Text,{fontWeight:"medium",children:j.percentage})]}),t.jsxs(l.View,{marginTop:"4px",display:"flex",justifyContent:"space-between",children:[t.jsx(l.Text,{color:"color-gray-500",children:"Total"}),t.jsx(l.Text,{fontWeight:"medium",children:w.toLocaleString()})]}),A!==null&&t.jsxs(l.View,{marginTop:"4px",display:"flex",justifyContent:"space-between",children:[t.jsx(l.Text,{color:"color-gray-500",children:"Remaining"}),t.jsx(l.Text,{fontWeight:"medium",children:`${A.toFixed(1)}%`})]})]})]});let z=E.clientX,R=E.clientY;if(f.current){const H=f.current.getBoundingClientRect();z=H.left+j.labelX,R=H.top+j.labelY}s(z,R,P)},F=()=>{j.index!==-1&&i&&i(e[j.index],j.index)},W=j.index===-1;return t.jsxs("g",{children:[t.jsx("path",{d:j.path,fill:j.color,onMouseEnter:W?void 0:I,onMouseMove:W?void 0:I,onMouseLeave:W?void 0:m,onClick:F,...nt,style:{...nt==null?void 0:nt.style,cursor:W?"default":"pointer"},...d==null?void 0:d.pie}),!W&&j.endAngle-j.startAngle>.25&&t.jsx("text",{x:j.labelX,y:j.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:j.percentage})]},`slice-${v}`)})]})},_u=({visible:e,x:o,y:r,content:n,maxDistance:a=100,views:i})=>{const s=u.useRef(null),[m,d]=u.useState({left:0,top:0});return u.useEffect(()=>{if(!e||!s.current)return;const p=s.current.getBoundingClientRect(),h=p.width||200,f=p.height||100,g=20,x=16;let b=o-h/2,y=r-f-g;y<x&&(y=r+g),b+h>window.innerWidth-x?b=window.innerWidth-h-x:b<x&&(b=x),y=Math.max(x,Math.min(y,window.innerHeight-f-x)),d({left:b,top:y})},[e,o,r]),e?t.jsx(l.View,{ref:s,position:"fixed",left:`${m.left}px`,top:`${m.top}px`,...rt,...i==null?void 0:i.tooltip,style:{...rt==null?void 0:rt.style,pointerEvents:"none",transition:"all 0.1s ease-out"},children:n}):null},Lu=({type:e,data:o,dataPoints:r,title:n,showLegend:a=!0,legendPosition:i="bottom",showGrid:s=!0,showTooltips:m=!0,animated:d=!0,animationDuration:c=500,responsive:p=!0,aspectRatio:h=16/9,width:f=200,height:g=200,views:x,onDataPointClick:b,onSeriesClick:y,isLoading:k=!1,error:S,noData:w,loadingIndicator:C,errorIndicator:j,noDataIndicator:v,"aria-label":I,themeMode:F,...W})=>{const{animationProgress:E,tooltip:T,containerRef:A,processedData:P,showTooltip:z,hideTooltip:R,getChartDimensions:H,toggleSeries:M}=Vu({data:o,dataPoints:r,animated:d,animationDuration:c,showTooltips:m}),D=P(),{width:B,height:V}=H(),L=f||B,_=g||(p?B/h:V),q=()=>{if(!a||!D)return null;let J=[];return e==="pie"||e==="donut"?Array.isArray(D)&&(J=D):D&&D.series&&(J=D.series),!J||J.length===0?null:t.jsx(l.Horizontal,{flexWrap:"wrap",justifyContent:"flex-start",marginTop:i==="bottom"?"16px":0,marginBottom:i==="top"?"16px":0,...Iu,...x==null?void 0:x.legend,children:J.map((oe,ae)=>{const te=oe.hidden,G=oe.name||oe.label;return t.jsxs(l.View,{...Fu,onClick:()=>M(G),opacity:te?.4:1,...x==null?void 0:x.legendItem,children:[t.jsx(l.View,{backgroundColor:oe.color,...Ru,opacity:te?.3:1}),t.jsx(l.Text,{...zu,textDecoration:te?"line-through":"none",children:G})]},`legend-${ae}`)})})},O=()=>{if(!D)return null;switch(e){case"bar":return t.jsx(Du,{data:D,width:L,height:_,animationProgress:E,showGrid:s,onBarClick:y,showTooltip:z,hideTooltip:R,views:x});case"line":case"area":return t.jsx($u,{data:D,width:L,height:_,animationProgress:E,showGrid:s,onPointClick:y,showTooltip:z,hideTooltip:R,views:x});case"pie":case"donut":return t.jsx(Bu,{dataPoints:D,width:L,height:_,animationProgress:E,isDonut:e==="donut",onSliceClick:b,showTooltip:z,hideTooltip:R,views:x});default:return null}},Y=()=>k?t.jsx(l.View,{...Pu,...x==null?void 0:x.loadingOverlay,children:C||t.jsx(l.Center,{children:t.jsx(wo,{size:"lg"})})}):null,$=()=>S?t.jsx(l.View,{...Au,...x==null?void 0:x.errorOverlay,children:j||t.jsx(l.Text,{fontWeight:"medium",children:typeof S=="string"?S:"An error occurred"})}):null,U=()=>w?t.jsx(l.View,{...Eu,...x==null?void 0:x.noDataOverlay,children:v||t.jsx(l.Text,{children:typeof w=="string"?w:"No data available"})}):null,K=I??(typeof n=="string"?n:"Chart"),ee=!S&&!k&&!w;return t.jsxs(l.View,{ref:A,role:"region","aria-label":K,"aria-busy":k,...vu,...x==null?void 0:x.container,...W,children:[n&&t.jsx(l.Text,{...Tu,children:n}),ee&&i==="top"&&q(),t.jsxs(l.View,{flex:1,width:"100%",position:"relative",...x==null?void 0:x.chart,children:[ee&&O(),Y(),$(),U(),t.jsx(_u,{visible:m&&T.visible,x:T.x,y:T.y,content:T.content,maxDistance:100,views:x})]}),ee&&i==="bottom"&&q()]})},Ou=e=>t.jsx(Lu,{...e}),Nu=Ou,qu=(e=365)=>{const[o,r]=u.useState(!1),[n,a]=u.useState(null),i="app-studio-cookie-consent";u.useEffect(()=>{const c=localStorage.getItem(i);a(c!==null?c==="true":!1)},[]);const s=c=>{localStorage.setItem(i,String(c));const p=new Date;p.setDate(p.getDate()+e),localStorage.setItem(`${i}-expires`,p.toISOString()),a(c)};return{isHovered:o,setIsHovered:r,hasConsent:n,acceptCookies:()=>{s(!0)},resetConsent:()=>{localStorage.removeItem(i),localStorage.removeItem(`${i}-expires`),a(!1)}}},Uu=e=>{const o=e==="dark";return{default:{container:{backgroundColor:o?"color-gray-800":"color-white",borderColor:o?"color-gray-700":"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:o?"color-gray-200":"color-gray-800"},acceptButton:{backgroundColor:"color-blue-500",color:"color-white",hoverBackgroundColor:"color-blue-600"},customizeButton:{backgroundColor:"transparent",color:o?"color-gray-200":"color-gray-600",borderColor:o?"color-gray-600":"color-gray-300",hoverBackgroundColor:o?"color-gray-700":"color-gray-100"}},info:{container:{backgroundColor:o?"color-blue-900":"color-blue-50",borderColor:o?"color-blue-800":"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:o?"color-blue-200":"color-blue-800"},acceptButton:{backgroundColor:"color-blue-500",color:"color-white",hoverBackgroundColor:"color-blue-600"},customizeButton:{backgroundColor:"transparent",color:o?"color-blue-200":"color-blue-800",borderColor:o?"color-blue-500":"color-blue-300",hoverBackgroundColor:o?"color-blue-800":"color-blue-100"}},primary:{container:{backgroundColor:o?"color-lightBlue-900":"color-lightBlue-50",borderColor:o?"color-lightBlue-700":"color-lightBlue-200",boxShadow:"0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06)"},content:{color:o?"color-lightBlue-200":"color-lightBlue-700"},acceptButton:{backgroundColor:"color-lightBlue-500",color:"color-white",hoverBackgroundColor:"color-lightBlue-600"},customizeButton:{backgroundColor:"transparent",color:o?"color-lightBlue-200":"color-lightBlue-700",borderColor:o?"color-lightBlue-500":"color-lightBlue-300",hoverBackgroundColor:o?"color-lightBlue-700":"color-lightBlue-100"}}}},Gu=({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:r="Accepter",customizeButtonText:n="Personnaliser",position:a="bottom",variant:i="default",onAccept:s,onCustomize:m,views:d,showCustomizeButton:c=!0,cookieExpiration:p=365,themeMode:h,...f})=>{const{themeMode:g}=l.useTheme(),x=h||g||"light",{hasConsent:b,acceptCookies:y}=qu(p),S=Uu(x)[i];if(b)return null;const w=()=>{y(),s&&s()},C=()=>{m&&m()};return t.jsx(l.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",...S.container,...d==null?void 0:d.container,...f,children:t.jsxs(l.Vertical,{gap:12,maxWidth:1200,marginLeft:"auto",marginRight:"auto",children:[e&&t.jsx(l.Text,{fontWeight:"bold",fontSize:18,color:"color-black",...d==null?void 0:d.title,children:e}),o&&t.jsx(l.Text,{fontSize:14,color:"color-black",...d==null?void 0:d.description,children:o}),t.jsxs(l.Horizontal,{gap:12,justifyContent:"flex-end",marginTop:8,...d==null?void 0:d.buttonGroup,children:[c&&t.jsx(ie,{variant:"outline",onClick:C,size:"sm",...d==null?void 0:d.customizeButton,children:n}),t.jsx(ie,{variant:"primary",onClick:w,size:"sm",...d==null?void 0:d.acceptButton,children:r})]})]})})},Yu=e=>t.jsx(Gu,{...e}),Xu=Yu,Ku=e=>{const{size:o,variant:r,onOpenChange:n}=e||{},[a,i]=u.useState(!1),[s,m]=u.useState({x:0,y:0}),[d,c]=u.useState(null),p=u.useRef(null),h=u.useRef(null),f=u.useMemo(()=>Ir("contextmenu-content"),[]),g=u.useCallback(b=>{m({x:b.clientX,y:b.clientY}),i(!0),n==null||n(!0)},[n]),x=u.useCallback(()=>{i(!1),c(null),n==null||n(!1)},[n]);return u.useEffect(()=>{const b=S=>{h.current&&!h.current.contains(S.target)&&x()},y=()=>{a&&x()},k=S=>{S.key==="Escape"&&a&&x()};return document.addEventListener("mousedown",b),window.addEventListener("resize",y),document.addEventListener("keydown",k),()=>{document.removeEventListener("mousedown",b),window.removeEventListener("resize",y),document.removeEventListener("keydown",k)}},[a,x]),{isOpen:a,setIsOpen:i,position:s,setPosition:m,activeSubmenuId:d,setActiveSubmenuId:c,size:o,variant:r,triggerRef:p,contentRef:h,contentId:f,openMenu:g,closeMenu:x}},xn={sm:{padding:"6px 8px",fontSize:"14px",minWidth:"160px"},md:{padding:"8px 12px",fontSize:"16px",minWidth:"180px"},lg:{padding:"10px 16px",fontSize:"18px",minWidth:"200px"}},Ju={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"}},bn={hover:{backgroundColor:"color-gray-100"}},qa=u.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:()=>{}}),Qu=({children:e,value:o})=>t.jsx(qa.Provider,{value:o,children:e}),jt=()=>{const e=u.useContext(qa);if(!e)throw new Error("useContextMenuContext must be used within a ContextMenuProvider");return e},Ua=({children:e,disableNativeContextMenu:o=!0,asChild:r=!1,isDisabled:n=!1,views:a,...i})=>{const{triggerRef:s,contentId:m,openMenu:d}=jt(),p={ref:s,onContextMenu:h=>{if(!n)if(o&&h.preventDefault(),d)d(h);else{const{setIsOpen:f,setPosition:g}=jt();g({x:h.clientX,y:h.clientY}),f(!0)}},"aria-controls":m,"aria-haspopup":"menu","data-disabled":n?"":void 0,...r&&u.isValidElement(e)&&e.props.isDisabled===void 0&&{isDisabled:n},...a==null?void 0:a.container,...i};if(r&&u.isValidElement(e)){const h=u.Children.only(e);return u.cloneElement(h,{...p,...h.props})}return t.jsx(l.View,{...p,children:e})},qr=({items:e,children:o,position:r,side:n="right",align:a="start",views:i,style:s,...m})=>{const{isOpen:d,position:c,contentRef:p,contentId:h,variant:f}=jt(),g=u.useRef(null),x=p||g,{ref:b,relation:y}=l.useElementPosition({}),[k,S]=u.useState({x:0,y:0});if(u.useEffect(()=>{if(d&&x.current){const C=r||c,j=x.current.offsetWidth,v=x.current.offsetHeight,I=window.innerWidth,F=window.innerHeight;let W=C.x,E=C.y;y&&(y.space.horizontal==="left"?W=C.x-j:W=C.x,y.space.vertical==="top"?E=C.y-v:E=C.y),W+j>I&&(W=I-j-8),W<8&&(W=8),E+v>F&&(E=F-v-8),E<8&&(E=8),S({x:W,y:E})}},[d,c,r,n,a,x,y]),!d)return null;const w={position:"fixed",top:`${k.y}px`,left:`${k.x}px`,zIndex:1e3,transformOrigin:"top left"};return t.jsxs(l.View,{id:h||"context-menu",ref:x,role:"menu",tabIndex:-1,borderRadius:4,boxShadow:"0px 2px 8px rgba(0, 0, 0, 0.15)",overflow:"hidden",style:{...w,...s},...Ju[f],...i==null?void 0:i.menu,...i==null?void 0:i.content,...m,children:[e&&e.map((C,j)=>C.divider?t.jsx(Ya,{views:i},`divider-${j}`):t.jsx(Ga,{item:C,views:i},C.id)),o]})},Ga=({item:e,children:o,onSelect:r,isDisabled:n=!1,views:a,variant:i,shape:s,isLoading:m,loaderProps:d,loaderPosition:c,icon:p,iconPosition:h,isFilled:f,isAuto:g,isIconRounded:x,isHovered:b,shadow:y,ariaLabel:k,animation:S,textColor:w,reversed:C,borderMovingDuration:j,borderMovingGradientColors:v,animatedStrokeAccentColor:I,animatedStrokeTextColor:F,to:W,isExternal:E,config:T,...A})=>{const{activeSubmenuId:P,setActiveSubmenuId:z,size:R,closeMenu:H}=jt();if(e){const[D,B]=u.useState(!1),V=e.items&&e.items.length>0,L=P===e.id,[_,q]=u.useState({x:0,y:0}),O=e.disabled||n,Y=()=>{B(!0),V&&z(e.id)},$=()=>{B(!1)},U=()=>{O||!V&&e.onClick&&(e.onClick(),H&&H())},{ref:K,relation:ee}=l.useElementPosition({});return u.useEffect(()=>{if(L&&K.current){const J=K.current.getBoundingClientRect(),oe=window.innerWidth,ae=200;let te=!1;if(ee)te=ee.space.horizontal==="left";else{const G=oe-J.right,Q=J.left;te=G<ae&&Q>G}q({x:te?J.left-ae:J.right,y:J.top})}},[L,e.items,ee]),t.jsxs(l.View,{ref:K,role:"menuitem",display:"flex",alignItems:"center",cursor:O?"not-allowed":"pointer",opacity:O?.5:1,position:"relative","aria-disabled":O,"data-disabled":O?"":void 0,...xn[R],_hover:O?{}:bn.hover,backgroundColor:D&&!O?"color-gray-100":"transparent",onMouseEnter:Y,onMouseLeave:$,onClick:U,...a==null?void 0:a.item,...A,children:[e.icon&&t.jsx(l.View,{marginRight:8,...a==null?void 0:a.icon,children:e.icon}),t.jsx(l.View,{flexGrow:1,children:e.label}),V&&t.jsx(l.View,{marginLeft:8,...a==null?void 0:a.submenuIndicator,children:t.jsx(se,{orientation:"right",widthHeight:16,color:"currentColor",filled:!0})}),L&&V&&t.jsx(qr,{items:e.items||[],position:_,side:"right",align:"start",views:a})]})}const M=D=>{n||(r==null||r(D),H&&H())};return t.jsx(l.View,{role:"menuitem",onClick:M,cursor:n?"not-allowed":"pointer",opacity:n?.5:1,"aria-disabled":n,"data-disabled":n?"":void 0,...xn[R],_hover:n?{}:bn.hover,...a==null?void 0:a.item,...A,children:o})},Ya=({views:e,...o})=>t.jsx(l.View,{height:"1px",backgroundColor:"color-gray-200",margin:"4px 0",role:"separator","aria-orientation":"horizontal",...e==null?void 0:e.divider,...o}),Zu=({views:e,...o})=>t.jsx(l.View,{height:"1px",backgroundColor:"color-gray-200",margin:"4px 0",role:"separator","aria-orientation":"horizontal",...e==null?void 0:e.separator,...o}),ep=({children:e,items:o,size:r="md",variant:n="default",disableNativeContextMenu:a=!0,views:i,themeMode:s,onOpenChange:m,...d})=>!o||o.length===0?t.jsx(t.Fragment,{children:e}):t.jsxs(t.Fragment,{children:[t.jsx(Ua,{disableNativeContextMenu:a,views:i,...d,children:e}),t.jsx(qr,{items:o,views:i})]}),op=({children:e,items:o,size:r="md",variant:n="default",disableNativeContextMenu:a=!0,onOpenChange:i,views:s,...m})=>{const d=Ku({size:r,variant:n,onOpenChange:i}),{isOpen:c,setIsOpen:p,position:h,setPosition:f,activeSubmenuId:g,setActiveSubmenuId:x,triggerRef:b,contentRef:y,contentId:k,openMenu:S,closeMenu:w}=d;return t.jsx(Qu,{value:{isOpen:c,setIsOpen:p,position:h,setPosition:f,activeSubmenuId:g,setActiveSubmenuId:x,size:r,variant:n,triggerRef:b,contentRef:y,contentId:k,openMenu:S,closeMenu:w,styles:s},children:t.jsx(ep,{items:o,size:r,variant:n,disableNativeContextMenu:a,views:s,...m,children:e})})},Ro=op;Ro.Trigger=Ua;Ro.Content=qr;Ro.Item=Ga;Ro.Divider=Ya;Ro.Separator=Zu;const tp=({src:e,color:o,views:r,themeMode:n,...a})=>{const{getColor:i,themeMode:s}=l.useTheme(),m=o?{fill:i(o,{themeMode:s}),stroke:i(o,{themeMode:s})}:{};return t.jsx(l.View,{display:"flex",alignItems:"center",justifyContent:"center",...a,...r==null?void 0:r.container,children:t.jsx(l.Image,{...m,content:'url("'+e+'")',width:"100%",height:"100%",...r==null?void 0:r.image})})},rp=({path:e,...o})=>t.jsx(l.Image,{src:e,...o}),Xa=({placeholder:e,isMulti:o,options:r,id:n=`select-${Math.random().toString(36).substr(2,9)}`})=>{const a=e?o?[]:"":Array.isArray(r)&&r.length>0?r[0].value:o?[]:"",[i,s]=u.useState(!1),[m,d]=u.useState(!1),[c,p]=u.useState(a),[h,f]=u.useState(0),[g,x]=u.useState(!0);return{id:n,value:c,setValue:p,hide:g,setHide:x,isHovered:i,setIsHovered:s,isFocused:m,setIsFocused:d,highlightedIndex:h,setHighlightedIndex:f}},Ka=({children:e,containerId:o="portal-root"})=>{const[r,n]=u.useState(null);return u.useEffect(()=>{let a=document.getElementById(o),i=!1;return a||(i=!0,a=document.createElement("div"),a.setAttribute("id",o),document.body.appendChild(a)),n(a),()=>{i&&a&&a.parentNode&&a.childNodes.length===0&&a.parentNode.removeChild(a)}},[o]),r?hs.createPortal(e,r):null},hr=({children:e,views:o={helperText:{}},...r})=>t.jsx(l.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,...r,children:e}),Le=u.forwardRef(({children:e,helperText:o,error:r=!1,views:n,...a},i)=>t.jsxs(l.Vertical,{ref:i,gap:4,position:"relative",width:"100%",marginVertical:0,...a,...n==null?void 0:n.container,children:[e,!r&&o&&t.jsx(hr,{marginTop:0,...n==null?void 0:n.helperText,children:o}),r&&t.jsx(l.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:r})]}));Le.displayName="FieldContainer";const np={default:{borderRadius:"8px"},square:{borderRadius:0},rounded:{borderRadius:"8px"},pill:{borderRadius:"9999px"}},ap={xs:"10px",sm:"11px",md:"11px",lg:"12px",xl:"12px"},ip={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"}},lp={paddingTop:"10px",paddingBottom:"10px",paddingLeft:"12px",paddingRight:"12px",media:{mobile:{paddingTop:"10px",paddingBottom:"10px",paddingLeft:"12px",paddingRight:"12px"}}},sp={paddingTop:"10px",paddingBottom:"10px",paddingLeft:"12px",paddingRight:"12px",media:{mobile:{paddingTop:"10px",paddingBottom:"10px",paddingLeft:"12px",paddingRight:"12px"}}},Xe=({label:e,shadow:o,children:r,value:n,size:a="md",shape:i="default",variant:s="default",error:m=!1,showLabel:d=!1,isFocused:c=!1,isHovered:p=!1,isDisabled:h=!1,isReadOnly:f=!1,views:g={pickerBox:{}},...x})=>{const{themeMode:b}=l.useTheme(),y=b==="dark",S=m?"color-red-500":(p||c)&&!h?"theme-primary":"color-gray-200";return t.jsx(l.Horizontal,{gap:8,width:"100%",display:"flex",flexWrap:"nowrap",alignItems:"center",justifyContent:"flex-start",borderStyle:"solid",borderColor:S,backgroundColor:y?"color-gray-900":"color-white",fontSize:l.Typography.fontSizes[a],cursor:h?"not-allowed":f?"auto":"text",opacity:h?.7:1,transition:"border-color 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease",...d?lp:sp,...typeof o=="object"&&o!==null?o:{},...np[i],...ip[s],...g==null?void 0:g.container,...x,children:r})},Ur=({children:e,...o})=>t.jsx(l.Horizontal,{gap:10,right:10,zIndex:500,flexWrap:"nowrap",alignItems:"center",justifyContent:"flex-end",...o,children:e}),cp={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}},dp=({children:e,heading:o,isItalic:r=!1,isUnderlined:n=!1,isStriked:a=!1,weight:i="normal",size:s="sm",dropDown:m,error:d,isDisabled:c,helperText:p,views:h,...f})=>{const g=o?cp[o]:{};return t.jsx(l.Element,{as:"label",width:"100%",fontSize:s,fontStyle:r?"italic":"normal",fontWeight:l.Typography.fontWeights[i],textDecoration:a?"line-through":n?"underline":"none",...g,...f,children:e})},mp=e=>t.jsx(dp,{...e}),Xo=mp,ro=({children:e,size:o="md",error:r=!1,color:n="theme-primary",views:a={label:{}},helperText:i,...s})=>t.jsx(Xo,{position:"static",fontSize:ap[o],letterSpacing:"-0.01em",whiteSpace:"nowrap",fontWeight:500,opacity:r?1:.72,color:r?"color-red-500":"inherit",transition:"color 0.2s ease",...a.label,...s,children:e}),zo=({children:e,...o})=>t.jsx(l.Vertical,{display:"flex",flexDirection:"column",gap:4,flex:1,width:"100%",maxWidth:"100%",...o,children:e}),Ja={xs:12,sm:14,md:16,lg:18,xl:20},up={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)"},pp={enter:{opacity:1,transform:"translateY(0) scale(1)",transition:"all 0.2s ease-in-out"}},hp={padding:"10px 12px",cursor:"pointer",borderRadius:8,margin:"2px 4px",transition:"all 0.15s ease-in-out"},at={default:{},highlighted:{backgroundColor:"color-gray-100"},selected:{backgroundColor:"color-gray-100"},selectedHighlighted:{backgroundColor:"color-gray-200"}},yn={open:{transform:"rotate(180deg)",transition:"all 0.2s ease-in-out"},closed:{transform:"rotate(0deg)",transition:"all 0.2s ease-in-out"}},fp={padding:"4px 8px",borderRadius:8,backgroundColor:"color-gray-100",fontSize:"12px",fontWeight:"500",color:"color-gray-700",transition:"all 0.15s ease-in-out"},gp={scrollbarWidth:"thin",scrollbarColor:"rgba(0, 0, 0, 0.15) transparent"},xp=e=>{if(!e)return{};const{container:o,content:r,...n}=e;return n},Ho={xs:{minHeight:24,shellPaddingY:6,shellPaddingX:10},sm:{minHeight:32,shellPaddingY:8,shellPaddingX:10},md:{minHeight:40,shellPaddingY:10,shellPaddingX:12},lg:{minHeight:48,shellPaddingY:12,shellPaddingX:14},xl:{minHeight:56,shellPaddingY:14,shellPaddingX:16}},bp=({isHovered:e,setIsHovered:o=()=>{},option:r,size:n="md",callback:a=()=>{},style:i,isSelected:s=!1,...m})=>{const d=(h,f)=>{h.stopPropagation(),h.preventDefault(),typeof a=="function"&&a(f)},c=()=>o(!e),p=()=>s&&e?at.selectedHighlighted:s?at.selected:e?at.highlighted:at.default;return t.jsxs(l.Element,{as:"li",display:"flex",alignItems:"center",justifyContent:"space-between",listStyleType:"none",...hp,...p(),onMouseEnter:c,onMouseLeave:c,onClick:h=>d(h,r.value),...m,children:[t.jsx(l.Text,{fontSize:l.Typography.fontSizes[n],fontWeight:s?"500":"400",lineHeight:"14px",color:s?"color-gray-900":"color-gray-700",...i,children:r.label}),s&&t.jsx(l.Element,{as:"span",color:"theme-primary",fontSize:"14px",marginLeft:8,display:"flex",alignItems:"center",children:"✓"})]})},yp=({size:e="md",views:o={field:{},text:{}},value:r,isDisabled:n,placeholder:a,removeOption:i=()=>{},options:s})=>{const m=(o==null?void 0:o.field)||{},d=(o==null?void 0:o.text)||{},c={margin:0,width:"95%",height:"100%",border:"none",paddingVertical:4,paddingHorizontal:0,fontSize:l.Typography.fontSizes[e],fontWeight:"400",lineHeight:"20px",letterSpacing:"-0.01em",color:n?"color-gray-400":"color-gray-900",cursor:n?"not-allowed":"pointer",transition:"all 0.2s ease-in-out",...m,...d,style:{backgroundColor:"transparent",...m.style,...d.style}},p=s.length>0&&s.find(h=>h.value===r);return t.jsx(l.Text,{...c,children:(r===""||Array.isArray(r)&&r.length===0)&&a?a:t.jsx(t.Fragment,{children:typeof r=="string"?(p&&p.label)??r:Array.isArray(r)&&r.length>0?t.jsx(l.Horizontal,{gap:6,children:r.map(h=>t.jsx(Sp,{option:h,removeOption:i},h))}):t.jsx("span",{children:r})})})},kp=({id:e,name:o,value:r,onChange:n,isMulti:a=!1,isDisabled:i=!1,isReadOnly:s=!1,options:m=[],...d})=>{const c=p=>{n&&n(p)};return t.jsx(l.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:r,disabled:i,readOnly:s,onChange:c,multiple:a,...d,children:m.length>0&&m.map(p=>t.jsx("option",{value:p.value,children:p.label},p.value))})},Cp=({size:e,views:o={},options:r,callback:n=()=>{},highlightedIndex:a,setHighlightedIndex:i=()=>{},selectedValue:s})=>{const m=c=>n(c),d=c=>Array.isArray(s)?s.includes(c):s===c;return t.jsx(l.Element,{as:"ul",role:"listbox",display:"flex",flexDirection:"column",margin:0,padding:"4px",...up,style:gp,...o==null?void 0:o.dropDown,children:r&&r.length>0&&r.map((c,p)=>t.jsx(bp,{size:e,style:o.text,option:c,callback:m,isSelected:d(c.value),isHovered:p===a,setIsHovered:()=>{},onMouseEnter:()=>i(p)},c.value))})},Sp=({option:e,size:o="md",removeOption:r=()=>{},...n})=>{const a=()=>r(e);return t.jsxs(l.Horizontal,{gap:6,alignItems:"center",onClick:i=>i.stopPropagation(),...fp,_hover:{backgroundColor:"color-gray-200"},...n,children:[t.jsx(l.Text,{fontSize:l.Typography.fontSizes[o],fontWeight:"500",color:"color-gray-700",children:e}),t.jsx(ve,{role:"close-button",color:"color-gray-500",widthHeight:Ja[o],onClick:a,cursor:"pointer",transition:"all 0.2s ease-in-out",_hover:{color:"color-gray-700"}})]})},Qa=({id:e,name:o,label:r,value:n,placeholder:a,helperText:i,hide:s=!1,error:m=!1,isMulti:d=!1,isFocused:c=!1,isHovered:p=!1,isDisabled:h=!1,isReadOnly:f=!1,options:g=[],shadow:x={},size:b="md",shape:y="default",variant:k="default",views:S={text:{},icon:{},dropDown:{},selectBox:{},label:{},helperText:{}},onChange:w=()=>{},setHide:C=()=>{},setValue:j=()=>{},setIsHovered:v=()=>{},setIsFocused:I=()=>{},setHighlightedIndex:F,highlightedIndex:W,isScrollable:E,...T})=>{const{ref:A,relation:P,updateRelation:z}=l.useElementPosition({trackChanges:!0,trackOnScroll:!0,trackOnResize:!0,throttleMs:10}),R=u.useRef(null),H=()=>{var U;if(!A.current)return{};const O=A.current.getBoundingClientRect(),Y={position:"fixed",left:O.left,width:O.width,zIndex:1e4};return((U=P==null?void 0:P.space)==null?void 0:U.vertical)==="top"?{...Y,bottom:window.innerHeight-O.top+8}:{...Y,top:O.bottom+8}};u.useEffect(()=>{const O=()=>C(!0);return document.addEventListener("closeAllSelects",O),()=>document.removeEventListener("closeAllSelects",O)},[C]),u.useEffect(()=>{const O=Y=>{!Y.target.closest(`#${e}`)&&!s&&C(!0)};return document.addEventListener("click",O),()=>{document.removeEventListener("click",O)}},[e,s,C]);const M=()=>v(!p),D=()=>I(!0),B=O=>{document.dispatchEvent(new Event("closeAllSelects")),O&&O.stopPropagation&&O.stopPropagation();const Y=!s;C(Y),I(!Y)},V=u.useCallback(O=>{if(C(!0),document.dispatchEvent(new Event("closeAllSelects")),d&&Array.isArray(n)){if(!n.includes(O)){const Y=[...n,O];j(Y),w&&w(O)}}else j(O),w&&w(O);I(!0)},[d,n,C,j,w,I]),L=O=>{if(Array.isArray(n)&&n.includes(O)){const Y=n.filter($=>$!==O);j(Y.length===0?[]:Y)}},_=!!r,q=xp(S);return t.jsx(Le,{ref:A,position:"relative",width:"100%",display:"inline-block",id:e,role:"SelectBox",helperText:i,error:m,views:q,onClick:O=>{O.stopPropagation(),h||f||B(O)},children:t.jsxs(Xe,{label:r,size:b,error:m,shape:y,views:S,shadow:x,variant:k,value:n,color:"theme-primary",isHovered:p,isDisabled:h,isReadOnly:f,isFocused:c,showLabel:_,minHeight:`${Ho[b].minHeight}px`,paddingTop:Ho[b].shellPaddingY,paddingBottom:Ho[b].shellPaddingY,paddingLeft:Ho[b].shellPaddingX,paddingRight:Ho[b].shellPaddingX,onMouseEnter:M,onMouseLeave:M,position:"relative",...S==null?void 0:S.content,children:[t.jsxs(zo,{children:[_&&t.jsx(ro,{htmlFor:e,color:"theme-primary",error:m,...S==null?void 0:S.label,children:r}),t.jsx(kp,{id:e,name:o,options:g,onChange:w,value:n,isDisabled:h,isReadOnly:f,isMulti:d,onFocus:D,...T}),t.jsx(yp,{options:g,size:b,views:S,value:n,isDisabled:h,placeholder:a,removeOption:L})]}),t.jsx(Ur,{children:!f&&!h&&t.jsx(l.Element,{display:"flex",alignItems:"center",justifyContent:"center",style:s?yn.closed:yn.open,children:t.jsx(se,{color:"inherit",widthHeight:Ja[b],style:S.icon,orientation:"down"})})}),!s&&g.length>0&&t.jsx(Ka,{children:t.jsx(l.Element,{ref:R,onClick:O=>O.stopPropagation(),style:{...H(),...pp.enter},children:t.jsx(Cp,{size:b,views:S,options:g,callback:V,highlightedIndex:W,setHighlightedIndex:F,selectedValue:n})})})]})})},jp=e=>{const o=pe("select",e),r={...o,options:o.options||[]},n=Xa(r);return t.jsx(Qa,{...n,...r,onClick:a=>{a.stopPropagation(),o.onClick&&o.onClick(a)}})},Uo=jp,Za=({isDisabled:e,isChecked:o})=>{const[r,n]=u.useState(!1),[a,i]=u.useState(o||!1),[s,m]=u.useState(o||!1);return u.useEffect(()=>{o!==void 0&&(i(o),m(o))},[o]),{isHovered:r,setIsHovered:n,on:a,setOn:i,value:s,setValue:m}},kn={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"}},wp={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"}},vp={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"}},Tp={xs:"9px",sm:"10px",md:"11px",lg:"12px",xl:"13px"},it={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}},Je={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}}},Cn={slider:{transition:"all 0.2s ease-in-out"},knob:{transition:"all 0.2s ease-in-out"}},Ip=e=>t.jsx(l.Input,{type:"checkbox",...e}),ei=({id:e,name:o,label:r,inActiveChild:n,isChecked:a,activeChild:i,labelPosition:s="right",shadow:m={},size:d="sm",value:c=!1,isHovered:p=!1,isDisabled:h=!1,isReadOnly:f=!1,on:g,setOn:x=()=>{},onChange:b,setValue:y=()=>{},setIsHovered:k=()=>{},helperText:S,views:w={slider:{},circle:{},label:{}},...C})=>{const j=typeof a=="boolean"?a:c,I=!!(i||n)?vp[d]:wp[d],F=`${it[d].paddingHorizontal}px`,W=`${it[d].paddingHorizontal+2}px`,E=`calc(${kn[d].width} + ${it[d].paddingHorizontal}px + 4px)`,T=Tp[d],A=H=>{if(!f&&!h){const M=H.target.checked;y(M),x(M),b&&b(M)}},P=()=>k(!0),z=()=>k(!1),R={container:{gap:12,display:"flex",height:"fit-content",width:"fit-content",alignItems:"center",cursor:h?"not-allowed":f?"default":"pointer",opacity:h?.6:1,transition:"all 0.2s ease-in-out",...w.label}};return t.jsxs(Xo,{htmlFor:e,onMouseEnter:P,onMouseLeave:z,...R.container,...C,children:[t.jsx(Ip,{id:e,name:o,opacity:0,width:0,height:0,checked:j,onChange:A,disabled:h,readOnly:f,...C}),s==="left"&&r&&t.jsx(l.Text,{fontWeight:"500",color:h?"color-gray-400":"inherit",transition:"color 0.2s ease, opacity 0.2s ease",children:r}),t.jsxs(l.View,{display:"flex",alignItems:"center",justifyContent:"center",position:"relative",marginBottom:4,borderRadius:"9999px",backgroundColor:h?Je.default.disabled:j?p?Je.states.hover.active:Je.default.active:p?Je.states.hover.inactive:Je.default.inactive,opacity:!h&&j&&p?Je.states.hover.activeOpacity:1,cursor:"pointer",...Cn.slider,...m,...it[d],...I,...w.slider,children:[i&&j&&t.jsx(l.View,{marginLeft:W,marginRight:E,transition:"all 0.2s ease-in-out",display:"flex",alignItems:"center",justifyContent:"center",height:"100%",width:"100%",overflow:"hidden",fontSize:T,lineHeight:1,color:"color-white",fontWeight:600,children:i}),t.jsx(l.View,{position:"absolute",top:"50%",left:j?void 0:F,right:j?F:void 0,borderRadius:"50%",backgroundColor:Je.default.knob,boxShadow:p?"0 4px 10px rgba(15, 23, 42, 0.18)":"0 1px 3px rgba(15, 23, 42, 0.18)",transform:`translateY(-50%) ${p?"scale(1.05)":"scale(1)"}`,...Cn.knob,zIndex:1,...kn[d],...w.circle}),n&&!j&&t.jsx(l.View,{marginLeft:E,marginRight:W,transition:"all 0.2s ease-in-out",display:"flex",alignItems:"center",justifyContent:"center",height:"100%",width:"100%",overflow:"hidden",fontSize:T,lineHeight:1,color:"color-white",fontWeight:600,children:n})]}),s==="right"&&r&&t.jsx(l.Text,{fontWeight:"500",color:h?"color-gray-400":"inherit",transition:"all 0.2s ease-in-out",children:r})]})},Fp=e=>{const o=pe("switch",e),r=Za(o);return t.jsx(ei,{...r,...o})},Gr=Fp,oi=({placeholder:e,isMulti:o,options:r,id:n=`selector-${Math.random().toString(36).substr(2,9)}`})=>{const a=e?o?[]:"":Array.isArray(r)&&r.length>0?r[0].value:o?[]:"",[i,s]=u.useState(!1),[m,d]=u.useState(!1),[c,p]=u.useState(a),[h,f]=u.useState(0),[g,x]=u.useState(!0);return{id:n,value:c,setValue:p,hide:g,setHide:x,isHovered:i,setIsHovered:s,isFocused:m,setIsFocused:d,highlightedIndex:h,setHighlightedIndex:f}},ti=({id:e,name:o,label:r,value:n,views:a={},options:i=[],onChange:s=()=>{},setValue:m=()=>{}})=>{const d=u.useCallback(c=>{m(c.value),s&&s(c.value)},[m,s]);return t.jsxs(Le,{id:e,width:"100%",views:a,children:[r&&t.jsxs(l.Horizontal,{fontSize:"10px",letterSpacing:"wider",color:"color-black-500",fontWeight:"bold",marginBottom:12,alignItems:"center",gap:6,style:{textTransform:"uppercase"},children:[t.jsx(qe,{widthHeight:14})," ",t.jsx(l.Text,{children:r})]}),t.jsx(l.Horizontal,{gap:0,children:i.map((c,p,h)=>{const f=n===c.value,g=c.color??"theme-primary",x=f?g:"color-gray-200",b=f?g:"color-gray-500",y=p===0,k=p===h.length-1,S=k||f;return t.jsx(l.View,{as:"button",type:"button",onClick:()=>d(c),flex:1,paddingVertical:6,paddingHorizontal:12,fontSize:"12px",fontWeight:f?"bold":"normal",cursor:"pointer",backgroundColor:"transparent",color:b,borderStyle:"solid",borderColor:x,borderTopWidth:1,borderBottomWidth:1,borderLeftWidth:1,borderRightWidth:S?1:0,borderRadius:y?"6px 0 0 6px":k?"0 6px 6px 0":"0",zIndex:f?1:0,transition:"color 0.15s ease, border-color 0.15s ease, background-color 0.15s ease",...a.item,children:c.label},c.value)})}),t.jsx("input",{type:"hidden",id:e,name:o,value:Array.isArray(n)?n.join(","):n,onChange:()=>{}})]})},Rp=e=>{const o={...e,options:e.options||[]},r=oi(o);return t.jsx(ti,{...r,...o,onClick:n=>{n.stopPropagation(),e.onClick&&e.onClick(n)}})},zp=Rp,ri=({label:e,placeholder:o,value:r})=>{const[n,a]=u.useState(e??o),[i,s]=u.useState(!1),[m,d]=u.useState(r||""),[c,p]=u.useState(!1);return u.useMemo(()=>{a(c&&!m?o??"":e??o)},[m,c,e,o]),{hint:n,setHint:a,isHovered:i,setIsHovered:s,value:m,setValue:d,isFocused:c,setIsFocused:p}},Mp=e=>{if(!e)return{};const{container:o,content:r,...n}=e;return n},Wp=(e,o)=>{if(o!=="pill")return e;if(typeof e=="number")return Math.min(e,28);if(typeof e=="string"){const r=Number.parseFloat(e);if(Number.isFinite(r)&&e.trim().endsWith("px"))return`${Math.min(r,28)}px`}return"28px"},ni=({id:e,name:o,hint:r,error:n,value:a,label:i,shadow:s,helperText:m,placeholder:d,size:c="sm",shape:p="default",variant:h="default",isHovered:f=!1,isFocused:g=!1,isEditable:x=!1,isReadOnly:b=!1,isDisabled:y=!1,isAutoFocus:k=!1,isMultiline:S=!1,maxRows:w=3,maxCols:C=30,onBlur:j=()=>{},onChange:v,onFocus:I,setHint:F=()=>{},setValue:W=()=>{},setIsFocused:E=()=>{},setIsHovered:T=()=>{},onChangeText:A,onSubmit:P,isWorkerRunning:z,views:R={label:{},helperText:{}},...H})=>{const M=!!i,D={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"}},B=(R==null?void 0:R.field)||{},V=(R==null?void 0:R.container)||{},L=Wp(V.borderRadius,p),_={...R,container:{...V,...L!==void 0?{borderRadius:L}:{},overflow:"hidden"}},q=Mp(R),O={margin:0,paddingVertical:0,paddingHorizontal:0,width:"100%",minHeight:D[c].minHeight,maxHeight:"calc(100vh - 100px)",border:"none",on:{focus:{outline:"none"}},fontSize:D[c].fontSize,letterSpacing:"-0.01em",fontWeight:400,color:y?"color-gray-400":"color-gray-900",cursor:y?"not-allowed":"text",opacity:y?.7:1,transition:"color 0.2s ease, opacity 0.2s ease",...B,style:{backgroundColor:"transparent",...B.style}},Y=()=>{E(!0),I&&I()},$=K=>{j(K),E(!1)},U=K=>{typeof K=="string"?(W(K),v&&v(K)):(W(K.target.value),v&&v(K.target.value))};return t.jsx(Le,{helperText:m,error:n,views:q,children:t.jsx(Xe,{label:i,size:c,error:n,shape:p,views:_,shadow:s,variant:h,value:a,color:"theme-primary",isHovered:f,isDisabled:y,isReadOnly:b,isFocused:g,showLabel:M,alignItems:"flex-start",minHeight:D[c].minHeight,paddingTop:D[c].shellPaddingY,paddingBottom:D[c].shellPaddingY,paddingLeft:D[c].shellPaddingX,paddingRight:D[c].shellPaddingX,onMouseEnter:()=>T(!0),onMouseLeave:()=>T(!1),..._==null?void 0:_.content,children:t.jsxs(zo,{...R==null?void 0:R.warper,children:[M&&t.jsx(ro,{htmlFor:e,color:"theme-primary",error:n,...R==null?void 0:R.label,children:i}),t.jsx(l.Element,{as:"textarea",id:e,name:o,rows:w,cols:C,value:a,readOnly:b,disabled:y,autoFocus:k,placeholder:d||r,onBlur:$,onFocus:Y,onChange:K=>U(K),...O,...H,style:{resize:y||b?"none":"vertical",...O.style,...H.style||{}},...R==null?void 0:R.textarea})]})})})},Hp=e=>{const o=pe("textarea",e),r=ri(o);return t.jsx(ni,{...r,...o})},Yr=Hp,Xr=({label:e,placeholder:o,value:r})=>{const[n,a]=u.useState(e??o),[i,s]=u.useState(!1),[m,d]=u.useState(!1),[c,p]=u.useState(r);return u.useMemo(()=>{a(i&&!c?o??"":e??o)},[c,i,e,o]),{hint:n,setHint:a,isFocused:i,setIsFocused:s,isHovered:m,setIsHovered:d,setValue:p,value:c}},Ko=({id:e,name:o,label:r,hint:n,value:a,onChange:i,left:s,right:m,helperText:d,placeholder:c,onChangeText:p,shadow:h={},views:f={container:{},field:{},label:{},helperText:{},text:{}},size:g="md",shape:x="default",variant:b="default",error:y=!1,isFocused:k=!1,isHovered:S=!1,isDisabled:w=!1,isReadOnly:C=!1,isClearable:j=!0,isAutoFocus:v=!1,setHint:I=()=>{},setIsFocused:F=()=>{},setIsHovered:W=()=>{},setValue:E=()=>{},onClick:T=()=>{},onFocus:A,onBlur:P=()=>{},themeMode:z,...R})=>{const{getColor:H,themeMode:M}=l.useTheme(),D=H(w?"color-gray-400":"color-gray-500",{themeMode:z||M}),B=!!r,V={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"}},L=(f==null?void 0:f.field)||{},_="0 0 0 1000px var(--theme-canvas) inset",q={margin:0,paddingVertical:0,paddingHorizontal:0,width:"100%",minHeight:"auto",border:"none",backgroundColor:"transparent",fontSize:V[g].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:_,WebkitBoxShadow:_,WebkitTextFillColor:"var(--theme-text)",transition:"background-color 5000s ease-in-out 0s"},_webkitContactsAutoFillButton:{visibility:"hidden",pointerEvents:"none",position:"absolute",right:0},...L},O=()=>{F(!0),A&&A()},Y=()=>W(!0),$=()=>W(!1),U=te=>{P&&P(te),F(!1)},K=te=>{typeof te=="string"?(E(te),p&&p(te),i&&i(te)):(E(te.target.value),p&&p(te.target.value),i&&i(te.target.value))},ee=()=>{E(""),i&&(P({target:{name:o}}),p&&p(""),i&&i("")),typeof document>"u"&&p&&p("")},{container:J,content:oe,...ae}=f||{};return t.jsx(Le,{helperText:d,error:y,views:ae,children:t.jsxs(Xe,{label:r,size:g,error:y,shape:x,views:f,shadow:h,variant:b,value:a,color:"theme-primary",isHovered:S,isDisabled:w,isReadOnly:C,isFocused:k,showLabel:B,minHeight:`${V[g].minHeight}px`,paddingTop:V[g].shellPaddingY,paddingBottom:V[g].shellPaddingY,paddingLeft:V[g].shellPaddingX,paddingRight:V[g].shellPaddingX,onMouseEnter:Y,onMouseLeave:$,children:[s,t.jsxs(zo,{children:[B&&t.jsx(ro,{htmlFor:e,color:"theme-primary",error:y,...f==null?void 0:f.label,children:r}),t.jsx(l.Input,{type:"text",id:e,name:o,readOnly:C,disabled:w,autoFocus:v,placeholder:c||n,onFocus:O,onBlur:U,autoComplete:"off",...q,...R,onChange:K,value:a})]}),j&&a&&!C&&!w&&t.jsx(Ur,{children:t.jsx(ve,{size:20,color:D,onClick:ee,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)"}})}),m]})})},Pp=e=>{const o=pe("input",e),r=Xr(o);return t.jsx(Ko,{...r,...o})},we=Pp,ai=({defaultIsSelected:e=!1})=>{const[o,r]=u.useState(!1),[n,a]=u.useState(e);return{isHovered:o,setIsHovered:r,isSelected:n,setIsSelected:a}},Ap={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"}},Sn={xs:10,sm:14,md:16,lg:20,xl:24},Ep={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"}},Jt={hover:{selected:{opacity:.9},unselected:{borderColor:"color-gray-400",backgroundColor:"color-gray-50"},indeterminate:{opacity:.9}},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"}}},ii=({id:e,icon:o,name:r,label:n,isChecked:a,onChange:i,onValueChange:s,shadow:m={},labelPosition:d="right",size:c="md",error:p=!1,isSelected:h=!1,isHovered:f=!1,isDisabled:g=!1,isReadOnly:x=!1,isIndeterminate:b=!1,defaultIsSelected:y=!1,setIsSelected:k=()=>{},setIsHovered:S=()=>{},setIsChecked:w,views:C={checkbox:{},label:{}},infoText:j,helperText:v,...I})=>{const F=()=>S(!f),W=()=>{!x&&!g&&(k&&k(!h),i&&i(!a),s&&s(!a))},E=b?"indeterminate":a||h?"selected":"unselected",T=p?Jt.error[E]:g?Jt.disabled[E]:f?Jt.hover[E]:{},A={container:{gap:8,display:"flex",height:"fit-content",flexDirection:"column",width:"fit-content",color:p?"color-red-600":g?"color-gray-400":"inherit",cursor:g?"not-allowed":x?"default":"pointer",opacity:g?.6:1,transition:"all 0.2s ease-in-out",...C.label},checkbox:{...Ep[E],...T,borderRadius:6,...Ap[c],transition:"all 0.2s ease-in-out",...m,...C.checkbox}};return t.jsxs(Xo,{htmlFor:e,as:"div",onClick:W,onMouseEnter:F,onMouseLeave:F,size:l.Typography.fontSizes[c],...A.container,...I,children:[t.jsxs(l.Vertical,{gap:8,children:[" ",t.jsxs(l.Horizontal,{gap:12,alignItems:"center",children:[" ",d==="left"&&n&&t.jsx(l.Text,{size:c,fontWeight:"500",...C==null?void 0:C.label,children:n}),t.jsx(l.Center,{...A.checkbox,children:b?t.jsx(ya,{widthHeight:Sn[c],color:"color-white",transition:"opacity 0.2s ease"}):(a||h)&&(o??t.jsx(Ht,{widthHeight:Sn[c],color:"color-white",transition:"opacity 0.2s ease"}))}),d==="right"&&n&&t.jsx(l.Text,{size:c,fontWeight:"500",...C==null?void 0:C.label,children:n})]}),j&&t.jsx(l.Text,{marginLeft:d==="left"?0:36,color:"color-gray-500",size:"sm",fontWeight:"400",lineHeight:"20px",...C==null?void 0:C.infoText,children:j})]}),p&&t.jsx(l.Text,{size:"xs",marginTop:4,marginHorizontal:0,color:"color-red-500",fontWeight:"500",transition:"all 0.2s ease-in-out",children:p})]})},Vp=e=>{const o=pe("checkbox",e),r=ai(o);return t.jsx(ii,{...r,...o})},Kr=Vp,li=e=>{const{value:o,defaultValue:r="",onChange:n,onChangeComplete:a,onOpen:i,onClose:s,closeOnSelect:m=!0,maxRecentColors:d=8,showRecentColors:c=!0,isAutoFocus:p=!1}=e,[h,f]=u.useState(!1),[g,x]=u.useState(o??r),[b,y]=u.useState(""),[k,S]=u.useState([]),[w,C]=u.useState(!1),[j,v]=u.useState(!1),I=u.useRef(null),F=u.useRef(null);u.useEffect(()=>{o!==void 0&&x(o)},[o]),u.useEffect(()=>{if(c)try{const H=localStorage.getItem("colorInput-recentColors");H&&S(JSON.parse(H))}catch(H){console.warn("Failed to load recent colors from localStorage:",H)}},[c]),u.useEffect(()=>{p&&I.current&&I.current.focus()},[p]),u.useEffect(()=>{const H=M=>{h&&I.current&&F.current&&!I.current.contains(M.target)&&!F.current.contains(M.target)&&z()};return document.addEventListener("mousedown",H),()=>document.removeEventListener("mousedown",H)},[h]);const W=u.useCallback(H=>{c&&S(M=>{const D=M.filter(V=>V!==H),B=[H,...D].slice(0,d);try{localStorage.setItem("colorInput-recentColors",JSON.stringify(B))}catch(V){console.warn("Failed to save recent colors to localStorage:",V)}return B})},[c,d]),E=u.useCallback(()=>{const H=!h;f(H),H?i==null||i():s==null||s()},[h,i,s]),T=u.useCallback(H=>{x(H),W(H),n==null||n(H),a==null||a(H),m&&(f(!1),s==null||s())},[n,a,m,s,W]),A=u.useCallback(H=>{y(H)},[]),P=u.useCallback(()=>{b&&(T(b),y(""))},[b,T]),z=u.useCallback(()=>{f(!1),s==null||s()},[s]),R=u.useCallback(H=>{x(H),n==null||n(H)},[n]);return{isOpen:h,selectedColor:g,recentColors:k,customColor:b,isFocused:w,isHovered:j,handleToggle:E,handleColorSelect:T,handleCustomColorChange:A,handleCustomColorSubmit:P,handleClose:z,setIsFocused:C,setIsHovered:v,setValue:R,triggerRef:I,dropdownRef:F}},Po={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"}},Dp={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"}},$p={default:{borderRadius:8},square:{borderRadius:0},rounded:{borderRadius:8},pill:{borderRadius:9999}},Bp={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"}},_p=[{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"}],si=({id:e,name:o,label:r,placeholder:n="Select a color",helperText:a,views:i={},size:s="md",shape:m="default",variant:d="default",shadow:c,error:p=!1,isDisabled:h=!1,isReadOnly:f=!1,isFocused:g=!1,isHovered:x=!1,predefinedColors:b=_p,showCustomInput:y=!0,showRecentColors:k=!0,isOpen:S=!1,selectedColor:w="",recentColors:C=[],customColor:j="",handleToggle:v=()=>{},handleColorSelect:I=()=>{},handleCustomColorChange:F=()=>{},handleCustomColorSubmit:W=()=>{},handleClose:E,setIsFocused:T=()=>{},setIsHovered:A=()=>{},setValue:P,triggerRef:z,dropdownRef:R,onChange:H,onChangeComplete:M,onOpen:D,onClose:B,colorFormat:V,maxRecentColors:L,closeOnSelect:_,value:q,defaultValue:O,...Y})=>{const{getColor:$}=l.useTheme(),U={...Po.container,...i==null?void 0:i.container},K={...Po.trigger,...Dp[s],...$p[m],...Bp[d],...p&&{borderColor:"color-red-500"},...h&&{opacity:.6,cursor:"not-allowed"},...g&&{borderColor:"theme-primary",boxShadow:"0 0 0 2px rgba(255, 255, 255, 1), 0 0 0 4px rgba(29, 78, 216, 0.16)"},...x&&!h&&{borderColor:"color-gray-400"},...i==null?void 0:i.trigger,...c&&c},ee={...Po.dropdown,...i==null?void 0:i.dropdown},J={...Po.colorGrid,...i==null?void 0:i.colorGrid},oe={...Po.recentColors,...i==null?void 0:i.recentColors},ae=w||"color-gray-200";return t.jsxs(l.View,{...U,...Y,children:[r&&t.jsx(Xo,{htmlFor:e,size:s,isDisabled:h,error:p,views:i==null?void 0:i.label,children:r}),t.jsxs(l.View,{ref:z,onClick:h||f?void 0:v,onMouseEnter:()=>A(!0),onMouseLeave:()=>A(!1),onFocus:()=>T(!0),onBlur:()=>T(!1),tabIndex:h?-1:0,role:"button","aria-expanded":S,"aria-haspopup":"listbox","aria-label":r||n,width:"fit-content",gap:8,...K,children:[t.jsx(l.View,{width:"20px",height:"20px",borderRadius:"4px",backgroundColor:ae,borderWidth:"1px",borderStyle:"solid",borderColor:"color-gray-300"}),!f&&!h&&t.jsx(se,{widthHeight:16,color:"color-gray-500",orientation:S?"up":"down"})]}),S&&t.jsxs(l.View,{ref:R,...ee,children:[t.jsx(l.View,{...J,children:b.map((te,G)=>t.jsx(l.View,{width:"24px",height:"24px",borderRadius:"8px",backgroundColor:te.value,borderWidth:"2px",borderStyle:"solid",borderColor:w===te.value?"theme-primary":"transparent",cursor:"pointer",transition:"transform 0.2s ease, border-color 0.2s ease",onClick:()=>I(te.value),title:te.name,_hover:{transform:"scale(1.05)",borderColor:"color-gray-400"},...i==null?void 0:i.colorSwatch},G))}),k&&C.length>0&&t.jsxs(l.Vertical,{gap:8,marginTop:"16px",children:[t.jsx(l.Text,{fontSize:"12px",fontWeight:"500",color:"color-gray-600",children:"Recent Colors"}),t.jsx(l.Horizontal,{gap:4,flexWrap:"wrap",...oe,children:C.map((te,G)=>t.jsx(l.View,{width:"20px",height:"20px",borderRadius:"8px",backgroundColor:te,borderWidth:"1px",borderStyle:"solid",borderColor:w===te?"theme-primary":"color-gray-300",cursor:"pointer",transition:"transform 0.2s ease, border-color 0.2s ease",onClick:()=>I(te),title:te,_hover:{transform:"scale(1.05)",borderColor:"color-gray-400"}},G))})]}),y&&t.jsxs(l.Vertical,{gap:8,marginTop:"16px",children:[t.jsx(l.Text,{fontSize:"12px",fontWeight:"500",color:"color-gray-600",children:"Custom Color"}),t.jsxs(l.Horizontal,{gap:8,children:[t.jsx(we,{value:j,onChange:te=>F(te.target.value),placeholder:"#000000 or rgb(0,0,0)",size:"sm",style:{flex:1},views:i==null?void 0:i.customInput}),t.jsx(l.View,{padding:"8px 12px",backgroundColor:"theme-primary",borderRadius:"8px",cursor:"pointer",onClick:W,transition:"background-color 0.2s ease, opacity 0.2s ease",_hover:{backgroundColor:"color-blue-700"},children:t.jsx(l.Text,{color:"color-white",fontSize:"12px",fontWeight:"500",children:"Add"})})]})]})]}),a&&t.jsx(l.Text,{fontSize:"12px",color:p?"color-red-500":"color-gray-600",marginTop:"4px",...i==null?void 0:i.helperText,children:a}),p&&typeof p=="string"&&t.jsx(l.Text,{fontSize:"12px",color:"color-red-500",marginTop:"4px",...i==null?void 0:i.error,children:p})]})},Lp=e=>{const o=li(e);return t.jsx(si,{...o,...e})},Op=Lp,fr=[{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"}],ci=({placeholder:e})=>{const[o,r]=u.useState(fr),[n,a]=u.useState(e??fr[0].name),[i,s]=u.useState(!0),[m,d]=u.useState(!1),[c,p]=u.useState(!1);return{hide:i,setHide:s,newOptions:o,setNewOptions:r,isHovered:c,setIsHovered:p,isFocused:m,setIsFocused:d,value:n,setValue:a}},jn={xs:8,sm:10,md:12,lg:14,xl:16},Np=({size:e,...o})=>t.jsx(l.Element,{as:"ul",...o}),qp=e=>t.jsx(l.Input,{type:"country",...e}),Up=({size:e,...o})=>t.jsx(l.Element,{as:"li",...o}),Gp=({option:e,size:o="md",callback:r=()=>{},views:n={text:{}}})=>{const a=i=>{i&&i.stopPropagation&&i.stopPropagation(),r(e)};return t.jsx(Up,{margin:0,role:"DropDownItem",listStyleType:"none",fontWeight:"normal",paddingVertical:6,paddingHorizontal:12,onClick:a,fontSize:l.Typography.fontSizes[o],_hover:{backgroundColor:"color-gray-100",transition:"all 0.15s ease-in-out"},...n.text,children:e})},Yp=({size:e,views:o={dropDown:{}},options:r=[],callback:n=()=>{}})=>{const a=i=>n(i);return t.jsx(Np,{role:"dropDown",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)",...o.dropDown,children:r.map(i=>t.jsx(Gp,{size:e,option:i.name,callback:a,...o.text},i.code))})},di=({id:e,name:o,label:r,value:n,placeholder:a,helperText:i,hide:s=!1,error:m=!1,isHovered:d=!1,isFocused:c=!1,isAutoFocus:p=!1,isDisabled:h=!1,isReadOnly:f=!1,shadow:g={},newOptions:x=[],size:b="md",variant:y="default",shape:k="default",onChange:S,onBlur:w=()=>{},setHide:C=()=>{},setNewOptions:j=()=>{},setIsHovered:v=()=>{},setIsFocused:I=()=>{},setValue:F=()=>{},selected:W,setSelected:E,views:T={text:{},icon:{},label:{},dropDown:{},helperText:{}},themeMode:A,...P})=>{const{getColor:z,themeMode:R}=l.useTheme(),H=(A||R)==="dark",M=z(H?"color-gray-400":"color-gray-500",{themeMode:A||R}),D=()=>I(!0),B=Y=>{C(!s),F(Y),S&&S(Y)},V=()=>{!h&&!f&&C(!s)},L=Y=>{const $=Y.target.value,U=fr.filter(K=>K.name.toLowerCase().startsWith($.toLowerCase()));s&&C(!1),j(U),S&&S($)},_=Y=>{w(Y),I(!1)},q=!!(r&&(c||n)),O={margin:0,paddingVertical:8,paddingHorizontal:0,width:"100%",heigth:"100%",border:"none",on:{focus:{outline:"none"}},transition:"all 0.2s ease-in-out",fontSize:l.Typography.fontSizes[b],backgroundColor:"transparent",color:h?H?"color-gray-500":"color-gray-400":H?"color-gray-100":"color-gray-900",cursor:h?"not-allowed":f?"auto":"pointer",...T.field};return t.jsxs(Le,{helperText:i,error:m,views:T,onClick:V,children:[t.jsxs(Xe,{label:r,size:b,error:m,shape:k,views:T,shadow:g,variant:y,value:n,color:"theme-primary",isDisabled:h,isReadOnly:f,isFocused:c,showLabel:q,_hover:!h&&!m?{borderColor:"theme-primary"}:void 0,children:[t.jsxs(zo,{children:[q&&t.jsx(ro,{htmlFor:e,color:"theme-primary",error:m,views:T,children:r}),t.jsx(qp,{id:e,name:o,placeholder:a,readOnly:f,disabled:h,autoFocus:p,onBlur:_,onFocus:D,...O,...P,value:n,onChange:L})]}),t.jsx(Ur,{children:s?t.jsx(se,{orientation:"down",widthHeight:jn[b],color:M,style:T.icon}):t.jsx(se,{orientation:"up",widthHeight:jn[b],color:M,style:T.icon})})]}),!s&&t.jsx(Yp,{size:b,views:T,options:x,callback:B})]})},Xp=e=>{const o=ci(e);return t.jsx(di,{...o,...e})},Kp=Xp;function wt(e){"@babel/helpers - typeof";return wt=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},wt(e)}function Se(e,o){if(o.length<e)throw new TypeError(e+" argument"+(e>1?"s":"")+" required, but only "+o.length+" present")}function Jp(e){return Se(1,arguments),e instanceof Date||wt(e)==="object"&&Object.prototype.toString.call(e)==="[object Date]"}function Ve(e){Se(1,arguments);var o=Object.prototype.toString.call(e);return e instanceof Date||wt(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 Qp(e){if(Se(1,arguments),!Jp(e)&&typeof e!="number")return!1;var o=Ve(e);return!isNaN(Number(o))}function to(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 Zp(e,o){Se(2,arguments);var r=Ve(e).getTime(),n=to(o);return new Date(r+n)}function eh(e,o){Se(2,arguments);var r=to(o);return Zp(e,-r)}var oh=864e5;function th(e){Se(1,arguments);var o=Ve(e),r=o.getTime();o.setUTCMonth(0,1),o.setUTCHours(0,0,0,0);var n=o.getTime(),a=r-n;return Math.floor(a/oh)+1}function vt(e){Se(1,arguments);var o=1,r=Ve(e),n=r.getUTCDay(),a=(n<o?7:0)+n-o;return r.setUTCDate(r.getUTCDate()-a),r.setUTCHours(0,0,0,0),r}function mi(e){Se(1,arguments);var o=Ve(e),r=o.getUTCFullYear(),n=new Date(0);n.setUTCFullYear(r+1,0,4),n.setUTCHours(0,0,0,0);var a=vt(n),i=new Date(0);i.setUTCFullYear(r,0,4),i.setUTCHours(0,0,0,0);var s=vt(i);return o.getTime()>=a.getTime()?r+1:o.getTime()>=s.getTime()?r:r-1}function rh(e){Se(1,arguments);var o=mi(e),r=new Date(0);r.setUTCFullYear(o,0,4),r.setUTCHours(0,0,0,0);var n=vt(r);return n}var nh=6048e5;function ah(e){Se(1,arguments);var o=Ve(e),r=vt(o).getTime()-rh(o).getTime();return Math.round(r/nh)+1}var ih={};function $t(){return ih}function Tt(e,o){var r,n,a,i,s,m,d,c;Se(1,arguments);var p=$t(),h=to((r=(n=(a=(i=o==null?void 0:o.weekStartsOn)!==null&&i!==void 0?i:o==null||(s=o.locale)===null||s===void 0||(m=s.options)===null||m===void 0?void 0:m.weekStartsOn)!==null&&a!==void 0?a:p.weekStartsOn)!==null&&n!==void 0?n:(d=p.locale)===null||d===void 0||(c=d.options)===null||c===void 0?void 0:c.weekStartsOn)!==null&&r!==void 0?r:0);if(!(h>=0&&h<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var f=Ve(e),g=f.getUTCDay(),x=(g<h?7:0)+g-h;return f.setUTCDate(f.getUTCDate()-x),f.setUTCHours(0,0,0,0),f}function ui(e,o){var r,n,a,i,s,m,d,c;Se(1,arguments);var p=Ve(e),h=p.getUTCFullYear(),f=$t(),g=to((r=(n=(a=(i=o==null?void 0:o.firstWeekContainsDate)!==null&&i!==void 0?i:o==null||(s=o.locale)===null||s===void 0||(m=s.options)===null||m===void 0?void 0:m.firstWeekContainsDate)!==null&&a!==void 0?a:f.firstWeekContainsDate)!==null&&n!==void 0?n:(d=f.locale)===null||d===void 0||(c=d.options)===null||c===void 0?void 0:c.firstWeekContainsDate)!==null&&r!==void 0?r:1);if(!(g>=1&&g<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var x=new Date(0);x.setUTCFullYear(h+1,0,g),x.setUTCHours(0,0,0,0);var b=Tt(x,o),y=new Date(0);y.setUTCFullYear(h,0,g),y.setUTCHours(0,0,0,0);var k=Tt(y,o);return p.getTime()>=b.getTime()?h+1:p.getTime()>=k.getTime()?h:h-1}function lh(e,o){var r,n,a,i,s,m,d,c;Se(1,arguments);var p=$t(),h=to((r=(n=(a=(i=o==null?void 0:o.firstWeekContainsDate)!==null&&i!==void 0?i:o==null||(s=o.locale)===null||s===void 0||(m=s.options)===null||m===void 0?void 0:m.firstWeekContainsDate)!==null&&a!==void 0?a:p.firstWeekContainsDate)!==null&&n!==void 0?n:(d=p.locale)===null||d===void 0||(c=d.options)===null||c===void 0?void 0:c.firstWeekContainsDate)!==null&&r!==void 0?r:1),f=ui(e,o),g=new Date(0);g.setUTCFullYear(f,0,h),g.setUTCHours(0,0,0,0);var x=Tt(g,o);return x}var sh=6048e5;function ch(e,o){Se(1,arguments);var r=Ve(e),n=Tt(r,o).getTime()-lh(r,o).getTime();return Math.round(n/sh)+1}function ne(e,o){for(var r=e<0?"-":"",n=Math.abs(e).toString();n.length<o;)n="0"+n;return r+n}var Oe={y:function(o,r){var n=o.getUTCFullYear(),a=n>0?n:1-n;return ne(r==="yy"?a%100:a,r.length)},M:function(o,r){var n=o.getUTCMonth();return r==="M"?String(n+1):ne(n+1,2)},d:function(o,r){return ne(o.getUTCDate(),r.length)},a:function(o,r){var n=o.getUTCHours()/12>=1?"pm":"am";switch(r){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,r){return ne(o.getUTCHours()%12||12,r.length)},H:function(o,r){return ne(o.getUTCHours(),r.length)},m:function(o,r){return ne(o.getUTCMinutes(),r.length)},s:function(o,r){return ne(o.getUTCSeconds(),r.length)},S:function(o,r){var n=r.length,a=o.getUTCMilliseconds(),i=Math.floor(a*Math.pow(10,n-3));return ne(i,r.length)}},mo={midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},dh={G:function(o,r,n){var a=o.getUTCFullYear()>0?1:0;switch(r){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,r,n){if(r==="yo"){var a=o.getUTCFullYear(),i=a>0?a:1-a;return n.ordinalNumber(i,{unit:"year"})}return Oe.y(o,r)},Y:function(o,r,n,a){var i=ui(o,a),s=i>0?i:1-i;if(r==="YY"){var m=s%100;return ne(m,2)}return r==="Yo"?n.ordinalNumber(s,{unit:"year"}):ne(s,r.length)},R:function(o,r){var n=mi(o);return ne(n,r.length)},u:function(o,r){var n=o.getUTCFullYear();return ne(n,r.length)},Q:function(o,r,n){var a=Math.ceil((o.getUTCMonth()+1)/3);switch(r){case"Q":return String(a);case"QQ":return ne(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,r,n){var a=Math.ceil((o.getUTCMonth()+1)/3);switch(r){case"q":return String(a);case"qq":return ne(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,r,n){var a=o.getUTCMonth();switch(r){case"M":case"MM":return Oe.M(o,r);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,r,n){var a=o.getUTCMonth();switch(r){case"L":return String(a+1);case"LL":return ne(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,r,n,a){var i=ch(o,a);return r==="wo"?n.ordinalNumber(i,{unit:"week"}):ne(i,r.length)},I:function(o,r,n){var a=ah(o);return r==="Io"?n.ordinalNumber(a,{unit:"week"}):ne(a,r.length)},d:function(o,r,n){return r==="do"?n.ordinalNumber(o.getUTCDate(),{unit:"date"}):Oe.d(o,r)},D:function(o,r,n){var a=th(o);return r==="Do"?n.ordinalNumber(a,{unit:"dayOfYear"}):ne(a,r.length)},E:function(o,r,n){var a=o.getUTCDay();switch(r){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,r,n,a){var i=o.getUTCDay(),s=(i-a.weekStartsOn+8)%7||7;switch(r){case"e":return String(s);case"ee":return ne(s,2);case"eo":return n.ordinalNumber(s,{unit:"day"});case"eee":return n.day(i,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(i,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(i,{width:"short",context:"formatting"});case"eeee":default:return n.day(i,{width:"wide",context:"formatting"})}},c:function(o,r,n,a){var i=o.getUTCDay(),s=(i-a.weekStartsOn+8)%7||7;switch(r){case"c":return String(s);case"cc":return ne(s,r.length);case"co":return n.ordinalNumber(s,{unit:"day"});case"ccc":return n.day(i,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(i,{width:"narrow",context:"standalone"});case"cccccc":return n.day(i,{width:"short",context:"standalone"});case"cccc":default:return n.day(i,{width:"wide",context:"standalone"})}},i:function(o,r,n){var a=o.getUTCDay(),i=a===0?7:a;switch(r){case"i":return String(i);case"ii":return ne(i,r.length);case"io":return n.ordinalNumber(i,{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,r,n){var a=o.getUTCHours(),i=a/12>=1?"pm":"am";switch(r){case"a":case"aa":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"aaa":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return n.dayPeriod(i,{width:"narrow",context:"formatting"});case"aaaa":default:return n.dayPeriod(i,{width:"wide",context:"formatting"})}},b:function(o,r,n){var a=o.getUTCHours(),i;switch(a===12?i=mo.noon:a===0?i=mo.midnight:i=a/12>=1?"pm":"am",r){case"b":case"bb":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"bbb":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return n.dayPeriod(i,{width:"narrow",context:"formatting"});case"bbbb":default:return n.dayPeriod(i,{width:"wide",context:"formatting"})}},B:function(o,r,n){var a=o.getUTCHours(),i;switch(a>=17?i=mo.evening:a>=12?i=mo.afternoon:a>=4?i=mo.morning:i=mo.night,r){case"B":case"BB":case"BBB":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(i,{width:"narrow",context:"formatting"});case"BBBB":default:return n.dayPeriod(i,{width:"wide",context:"formatting"})}},h:function(o,r,n){if(r==="ho"){var a=o.getUTCHours()%12;return a===0&&(a=12),n.ordinalNumber(a,{unit:"hour"})}return Oe.h(o,r)},H:function(o,r,n){return r==="Ho"?n.ordinalNumber(o.getUTCHours(),{unit:"hour"}):Oe.H(o,r)},K:function(o,r,n){var a=o.getUTCHours()%12;return r==="Ko"?n.ordinalNumber(a,{unit:"hour"}):ne(a,r.length)},k:function(o,r,n){var a=o.getUTCHours();return a===0&&(a=24),r==="ko"?n.ordinalNumber(a,{unit:"hour"}):ne(a,r.length)},m:function(o,r,n){return r==="mo"?n.ordinalNumber(o.getUTCMinutes(),{unit:"minute"}):Oe.m(o,r)},s:function(o,r,n){return r==="so"?n.ordinalNumber(o.getUTCSeconds(),{unit:"second"}):Oe.s(o,r)},S:function(o,r){return Oe.S(o,r)},X:function(o,r,n,a){var i=a._originalDate||o,s=i.getTimezoneOffset();if(s===0)return"Z";switch(r){case"X":return vn(s);case"XXXX":case"XX":return Ze(s);case"XXXXX":case"XXX":default:return Ze(s,":")}},x:function(o,r,n,a){var i=a._originalDate||o,s=i.getTimezoneOffset();switch(r){case"x":return vn(s);case"xxxx":case"xx":return Ze(s);case"xxxxx":case"xxx":default:return Ze(s,":")}},O:function(o,r,n,a){var i=a._originalDate||o,s=i.getTimezoneOffset();switch(r){case"O":case"OO":case"OOO":return"GMT"+wn(s,":");case"OOOO":default:return"GMT"+Ze(s,":")}},z:function(o,r,n,a){var i=a._originalDate||o,s=i.getTimezoneOffset();switch(r){case"z":case"zz":case"zzz":return"GMT"+wn(s,":");case"zzzz":default:return"GMT"+Ze(s,":")}},t:function(o,r,n,a){var i=a._originalDate||o,s=Math.floor(i.getTime()/1e3);return ne(s,r.length)},T:function(o,r,n,a){var i=a._originalDate||o,s=i.getTime();return ne(s,r.length)}};function wn(e,o){var r=e>0?"-":"+",n=Math.abs(e),a=Math.floor(n/60),i=n%60;if(i===0)return r+String(a);var s=o;return r+String(a)+s+ne(i,2)}function vn(e,o){if(e%60===0){var r=e>0?"-":"+";return r+ne(Math.abs(e)/60,2)}return Ze(e,o)}function Ze(e,o){var r=o||"",n=e>0?"-":"+",a=Math.abs(e),i=ne(Math.floor(a/60),2),s=ne(a%60,2);return n+i+r+s}var Tn=function(o,r){switch(o){case"P":return r.date({width:"short"});case"PP":return r.date({width:"medium"});case"PPP":return r.date({width:"long"});case"PPPP":default:return r.date({width:"full"})}},pi=function(o,r){switch(o){case"p":return r.time({width:"short"});case"pp":return r.time({width:"medium"});case"ppp":return r.time({width:"long"});case"pppp":default:return r.time({width:"full"})}},mh=function(o,r){var n=o.match(/(P+)(p+)?/)||[],a=n[1],i=n[2];if(!i)return Tn(o,r);var s;switch(a){case"P":s=r.dateTime({width:"short"});break;case"PP":s=r.dateTime({width:"medium"});break;case"PPP":s=r.dateTime({width:"long"});break;case"PPPP":default:s=r.dateTime({width:"full"});break}return s.replace("{{date}}",Tn(a,r)).replace("{{time}}",pi(i,r))},uh={p:pi,P:mh};function ph(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 hh=["D","DD"],fh=["YY","YYYY"];function gh(e){return hh.indexOf(e)!==-1}function xh(e){return fh.indexOf(e)!==-1}function In(e,o,r){if(e==="YYYY")throw new RangeError("Use `yyyy` instead of `YYYY` (in `".concat(o,"`) for formatting years to the input `").concat(r,"`; 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(r,"`; 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(r,"`; 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(r,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"))}var bh={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"}},yh=function(o,r,n){var a,i=bh[o];return typeof i=="string"?a=i:r===1?a=i.one:a=i.other.replace("{{count}}",r.toString()),n!=null&&n.addSuffix?n.comparison&&n.comparison>0?"in "+a:a+" ago":a};function Qt(e){return function(){var o=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},r=o.width?String(o.width):e.defaultWidth,n=e.formats[r]||e.formats[e.defaultWidth];return n}}var kh={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},Ch={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},Sh={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},jh={date:Qt({formats:kh,defaultWidth:"full"}),time:Qt({formats:Ch,defaultWidth:"full"}),dateTime:Qt({formats:Sh,defaultWidth:"full"})},wh={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},vh=function(o,r,n,a){return wh[o]};function Ao(e){return function(o,r){var n=r!=null&&r.context?String(r.context):"standalone",a;if(n==="formatting"&&e.formattingValues){var i=e.defaultFormattingWidth||e.defaultWidth,s=r!=null&&r.width?String(r.width):i;a=e.formattingValues[s]||e.formattingValues[i]}else{var m=e.defaultWidth,d=r!=null&&r.width?String(r.width):e.defaultWidth;a=e.values[d]||e.values[m]}var c=e.argumentCallback?e.argumentCallback(o):o;return a[c]}}var Th={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},Ih={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},Fh={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"]},Rh={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"]},zh={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"}},Mh={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"}},Wh=function(o,r){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"},Hh={ordinalNumber:Wh,era:Ao({values:Th,defaultWidth:"wide"}),quarter:Ao({values:Ih,defaultWidth:"wide",argumentCallback:function(o){return o-1}}),month:Ao({values:Fh,defaultWidth:"wide"}),day:Ao({values:Rh,defaultWidth:"wide"}),dayPeriod:Ao({values:zh,defaultWidth:"wide",formattingValues:Mh,defaultFormattingWidth:"wide"})};function Eo(e){return function(o){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=r.width,a=n&&e.matchPatterns[n]||e.matchPatterns[e.defaultMatchWidth],i=o.match(a);if(!i)return null;var s=i[0],m=n&&e.parsePatterns[n]||e.parsePatterns[e.defaultParseWidth],d=Array.isArray(m)?Ah(m,function(h){return h.test(s)}):Ph(m,function(h){return h.test(s)}),c;c=e.valueCallback?e.valueCallback(d):d,c=r.valueCallback?r.valueCallback(c):c;var p=o.slice(s.length);return{value:c,rest:p}}}function Ph(e,o){for(var r in e)if(e.hasOwnProperty(r)&&o(e[r]))return r}function Ah(e,o){for(var r=0;r<e.length;r++)if(o(e[r]))return r}function Eh(e){return function(o){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=o.match(e.matchPattern);if(!n)return null;var a=n[0],i=o.match(e.parsePattern);if(!i)return null;var s=e.valueCallback?e.valueCallback(i[0]):i[0];s=r.valueCallback?r.valueCallback(s):s;var m=o.slice(a.length);return{value:s,rest:m}}}var Vh=/^(\d+)(th|st|nd|rd)?/i,Dh=/\d+/i,$h={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},Bh={any:[/^b/i,/^(a|c)/i]},_h={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},Lh={any:[/1/i,/2/i,/3/i,/4/i]},Oh={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},Nh={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]},qh={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},Uh={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]},Gh={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},Yh={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}},Xh={ordinalNumber:Eh({matchPattern:Vh,parsePattern:Dh,valueCallback:function(o){return parseInt(o,10)}}),era:Eo({matchPatterns:$h,defaultMatchWidth:"wide",parsePatterns:Bh,defaultParseWidth:"any"}),quarter:Eo({matchPatterns:_h,defaultMatchWidth:"wide",parsePatterns:Lh,defaultParseWidth:"any",valueCallback:function(o){return o+1}}),month:Eo({matchPatterns:Oh,defaultMatchWidth:"wide",parsePatterns:Nh,defaultParseWidth:"any"}),day:Eo({matchPatterns:qh,defaultMatchWidth:"wide",parsePatterns:Uh,defaultParseWidth:"any"}),dayPeriod:Eo({matchPatterns:Gh,defaultMatchWidth:"any",parsePatterns:Yh,defaultParseWidth:"any"})},Kh={code:"en-US",formatDistance:yh,formatLong:jh,formatRelative:vh,localize:Hh,match:Xh,options:{weekStartsOn:0,firstWeekContainsDate:1}},Jh=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,Qh=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,Zh=/^'([^]*?)'?$/,e0=/''/g,o0=/[a-zA-Z]/;function t0(e,o,r){var n,a,i,s,m,d,c,p,h,f,g,x,b,y;Se(2,arguments);var k=String(o),S=$t(),w=(n=(a=void 0)!==null&&a!==void 0?a:S.locale)!==null&&n!==void 0?n:Kh,C=to((i=(s=(m=(d=void 0)!==null&&d!==void 0?d:void 0)!==null&&m!==void 0?m:S.firstWeekContainsDate)!==null&&s!==void 0?s:(c=S.locale)===null||c===void 0||(p=c.options)===null||p===void 0?void 0:p.firstWeekContainsDate)!==null&&i!==void 0?i:1);if(!(C>=1&&C<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var j=to((h=(f=(g=(x=void 0)!==null&&x!==void 0?x:void 0)!==null&&g!==void 0?g:S.weekStartsOn)!==null&&f!==void 0?f:(b=S.locale)===null||b===void 0||(y=b.options)===null||y===void 0?void 0:y.weekStartsOn)!==null&&h!==void 0?h:0);if(!(j>=0&&j<=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 v=Ve(e);if(!Qp(v))throw new RangeError("Invalid time value");var I=ph(v),F=eh(v,I),W={firstWeekContainsDate:C,weekStartsOn:j,locale:w,_originalDate:v},E=k.match(Qh).map(function(T){var A=T[0];if(A==="p"||A==="P"){var P=uh[A];return P(T,w.formatLong)}return T}).join("").match(Jh).map(function(T){if(T==="''")return"'";var A=T[0];if(A==="'")return r0(T);var P=dh[A];if(P)return xh(T)&&In(T,o,String(e)),gh(T)&&In(T,o,String(e)),P(F,T,w.localize,W);if(A.match(o0))throw new RangeError("Format string contains an unescaped latin alphabet character `"+A+"`");return T}).join("");return E}function r0(e){var o=e.match(Zh);return o?o[1].replace(e0,"'"):e}const hi=()=>{const[e,o]=u.useState(!1),[r,n]=u.useState(!1),[a,i]=u.useState(t0(new Date,"yyyy-MM-dd"));return{date:a,setDate:i,isHovered:e,setIsHovered:o,isFocused:r,setIsFocused:n}},n0=e=>t.jsx(l.Input,{type:"date",...e}),fi=({id:e,icon:o,name:r,label:n,date:a,children:i,helperText:s,shadow:m={},size:d="md",variant:c="default",shape:p="default",views:h={container:{},label:{},helperText:{},text:{},field:{}},error:f=!1,isHovered:g=!1,isFocused:x=!1,isDisabled:b=!1,isReadOnly:y=!1,setDate:k=()=>{},setIsFocused:S=()=>{},setIsHovered:w=()=>{},onChange:C,onChangeText:j,...v})=>{const{themeMode:I}=l.useTheme(),F=I==="dark",W=!!(x&&n),E=()=>w(!g),T=()=>S(!0),A=z=>{typeof z=="string"?(k(z),j&&j(z)):(k(z.target.value),C&&C(z.target.value))},P={margin:0,paddingVertical:8,paddingHorizontal:0,width:"100%",heigth:"100%",border:"none",on:{focus:{outline:"none",backgroundColor:"transparent"}},transition:"all 0.2s ease-in-out",fontSize:l.Typography.fontSizes[d],backgroundColor:"transparent",color:b?F?"color-gray-500":"color-gray-400":F?"color-gray-100":"color-gray-900",cursor:b?"not-allowed":y?"auto":"pointer",...h.field};return t.jsx(Le,{helperText:s,error:f,views:h,children:t.jsx(Xe,{label:n,size:d,error:f,shape:p,views:h,shadow:m,color:"theme-primary",variant:c,value:a,isHovered:g,isDisabled:b,isReadOnly:y,isFocused:x,showLabel:W,onMouseEnter:E,onMouseLeave:E,children:t.jsxs(zo,{children:[W&&t.jsx(ro,{htmlFor:e,color:"theme-primary",error:f,views:h,children:n}),t.jsx(n0,{id:e,name:r,onFocus:T,disabled:b,readOnly:y,...P,...v,...j&&{onChangeText:A},onChange:A})]})})})},a0=e=>{const o=hi();return t.jsx(fi,{...o,...e})},i0=a0,gi=e=>{const o=Xr(e),[r,n]=u.useState(!1);return{isVisible:r,setIsVisible:n,...e,...o}},l0=({visibleIcon:e=t.jsx(Ar,{widthHeight:14}),hiddenIcon:o=t.jsx(Pr,{widthHeight:14}),...r})=>{const{isVisible:n,setIsVisible:a,...i}=gi(r);return t.jsx(Ko,{...i,type:n?"text":"password",isClearable:!1,right:t.jsx(l.View,{display:"flex",alignItems:"center",justifyContent:"center",width:"16px",height:"16px",minWidth:"16px",color:"color-gray-500",cursor:r.isDisabled?"not-allowed":"pointer",transition:"color 0.2s ease",onClick:()=>{r.isDisabled||a(!n)},children:n?e:o})})},s0=l0,xi=(e,o,r)=>{const[n,a]=u.useState(e),[i,s]=u.useState(o?{value:o,label:o}:e[0]),[m,d]=u.useState([]),[c,p]=u.useState(0),[h,f]=u.useState(r??""),[g,x]=u.useState(!1);return{filteredItems:n,setFilteredItems:a,selectedItem:i,setSelectedItem:s,selectedItems:m,setSelectedItems:d,highlightedIndex:c,setHighlightedIndex:p,searchQuery:h,setSearchQuery:f,isDropdownVisible:g,setIsDropdownVisible:x}},c0={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)"},Fn={enter:{opacity:1,transform:"translateY(0) scale(1)",transition:"all 0.2s ease-in-out"},initial:{opacity:0,transform:"translateY(-8px) scale(0.96)"}},d0={padding:"8px",borderBottomWidth:"1px",borderBottomStyle:"solid",borderBottomColor:"color-gray-100",backgroundColor:"color-gray-50",borderTopLeftRadius:10,borderTopRightRadius:10},m0={padding:"8px 10px",cursor:"pointer",borderRadius:8,margin:"1px 4px",transition:"all 0.15s ease-in-out"},u0={padding:"24px 16px",display:"flex",flexDirection:"column",alignItems:"center",gap:"8px"},Rn={open:{transform:"rotate(180deg)",transition:"all 0.2s ease-in-out"},closed:{transform:"rotate(0deg)",transition:"all 0.2s ease-in-out"}},p0={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"},bi=({placeholder:e,items:o,showTick:r=!0,onSelect:n,searchEnabled:a=!0,left:i,right:s,label:m,filteredItems:d,setSelectedItem:c,selectedItem:p,selectedItems:h,setSelectedItems:f,highlightedIndex:g,setHighlightedIndex:x,searchQuery:b,setSearchQuery:y,setFilteredItems:k,views:S,isDropdownVisible:w,setIsDropdownVisible:C,isMulti:j=!1,searchPlaceholder:v,...I})=>{const{ref:F,relation:W}=l.useElementPosition({trackChanges:!0,trackOnScroll:!0,trackOnResize:!0,throttleMs:10}),E=u.useRef(null),[T,A]=u.useState(!1),[P,z]=u.useState(!1),R=()=>{var O;const V=P?Fn.enter:Fn.initial;if(!F.current)return{};const L=F.current.getBoundingClientRect(),_={position:"fixed",left:L.left,width:L.width,zIndex:1e4,...V};return((O=W==null?void 0:W.space)==null?void 0:O.vertical)==="top"?{..._,bottom:window.innerHeight-L.top+6}:{..._,top:L.bottom+6}};u.useEffect(()=>{if(w){const V=setTimeout(()=>z(!0),10);return()=>clearTimeout(V)}z(!1)},[w]),u.useEffect(()=>{const V=L=>{!L.composedPath().some(O=>(O==null?void 0:O.id)==="combobox-dropdown")&&F.current&&!F.current.contains(L.target)&&C(!1)};return document.addEventListener("mousedown",V),()=>document.removeEventListener("mousedown",V)},[]);const H=V=>{if(y(V),V==="")k(o);else{const L=o.filter(_=>_.label.toLowerCase().includes(V.toLowerCase()));k(L)}x(0)},M=V=>{if(j){const L=h.some(q=>q.value===V.value);let _;L?_=h.filter(q=>q.value!==V.value):_=[...h,V],f(_),n==null||n(_)}else c(V),n==null||n(V),C(!1)},D=(V,L)=>{V.stopPropagation();const _=h.filter(q=>q.value!==L.value);f(_),n==null||n(_)},B=V=>j?h.some(L=>L.value===V.value):V.value===p.value;return t.jsxs(l.Horizontal,{role:"combobox",flexWrap:"nowrap",gap:15,alignItems:"center",width:"100%",...I,children:[m&&t.jsx(l.Text,{views:S==null?void 0:S.label,htmlFor:I.id,children:m}),t.jsxs(l.View,{position:"relative",width:"100%",children:[t.jsx("div",{ref:F,onClick:()=>C(!w),style:{width:"100%"},children:t.jsxs(Xe,{isHovered:T,isFocused:w,onMouseEnter:()=>A(!0),onMouseLeave:()=>A(!1),cursor:"pointer",views:{container:S==null?void 0:S.container},children:[t.jsxs(l.Horizontal,{gap:10,alignItems:"center",width:"100%",flexWrap:j?"wrap":"nowrap",...S==null?void 0:S.labelContainer,children:[i,j?h.length>0?t.jsx(l.Horizontal,{gap:6,flexWrap:"wrap",alignItems:"center",children:h.map(V=>t.jsxs(l.Horizontal,{...p0,_hover:{backgroundColor:"color-gray-200"},children:[V.icon&&t.jsx(l.View,{flexShrink:0,children:V.icon}),t.jsx(l.Text,{size:"sm",color:"color-gray-700",weight:"medium",children:V.label}),t.jsx(ve,{widthHeight:12,color:"color-gray-500",cursor:"pointer",onClick:L=>D(L,V)})]},V.value))}):t.jsx(l.Text,{weight:"medium",flexGrow:1,color:"color-gray-500",style:{whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},...S==null?void 0:S.label,children:e}):t.jsxs(t.Fragment,{children:[p.icon&&p.label!==e&&t.jsx(l.View,{children:p.icon}),t.jsx(l.Text,{weight:"medium",flexGrow:1,color:p.label===e?"color-gray-500":"color-gray-800",style:{whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},...S==null?void 0:S.label,children:p.label})]})]}),t.jsxs(l.Horizontal,{gap:8,alignItems:"center",children:[s,t.jsx(l.View,{style:w?Rn.open:Rn.closed,children:t.jsx(se,{widthHeight:16,orientation:"down",color:w?"color-gray-700":"color-gray-400"})})]})]})}),w&&t.jsx(Ka,{children:t.jsxs(l.View,{ref:E,id:"combobox-dropdown",role:"listbox","aria-labelledby":I.id,...c0,style:R(),...S==null?void 0:S.dropdown,children:[a&&t.jsx(l.View,{...d0,children:t.jsx(Ko,{id:`${I.id}-search`,name:`${I.name}-search`,width:"100%",type:"search",autoFocus:!0,value:b,onChange:V=>H(V),hint:e||"Search...",isClearable:!1,left:t.jsx(yt,{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&&t.jsx(l.View,{margin:0,padding:"4px",children:d.map((V,L)=>{const _=B(V),q=L===g;return t.jsxs(l.Horizontal,{role:"option","aria-selected":_,justifyContent:"space-between",alignItems:"center",...m0,backgroundColor:_&&q?"color-blue-100":_?"color-blue-50":q?"color-gray-100":"transparent",onMouseEnter:()=>x(L),onClick:()=>M(V),...S==null?void 0:S.item,children:[t.jsxs(l.Horizontal,{gap:8,alignItems:"center",children:[V.icon&&t.jsx(l.View,{flexShrink:0,children:V.icon}),t.jsx(l.Text,{size:"sm",color:_?"theme-primary":"color-gray-800",weight:_?"medium":"normal",children:V.label})]}),_&&r&&t.jsx(Ht,{widthHeight:16,color:"theme-primary"})]},V.value)})}),d.length===0&&t.jsxs(l.Vertical,{...u0,children:[t.jsx(yt,{widthHeight:24,color:"color-gray-300"}),t.jsx(l.Text,{color:"color-gray-500",size:"sm",align:"center",children:"No results found"}),t.jsx(l.Text,{color:"color-gray-400",size:"xs",align:"center",children:"Try a different search term"})]})]})})]})]})},h0=({id:e,name:o,items:r,placeholder:n,searchPlaceholder:a,...i})=>{const s=xi(r,n,a);return t.jsx(bi,{id:e,name:o,items:r,...s,...i})},f0=h0,yi=e=>{const{tags:o,defaultTags:r=[],onTagsChange:n,onTagAdd:a,onTagRemove:i,maxTags:s,minTagLength:m=1,maxTagLength:d=50,allowDuplicates:c=!1,separators:p=["enter","comma"],isDisabled:h=!1,isReadOnly:f=!1}=e,[g,x]=u.useState(""),[b,y]=u.useState(()=>(o||r||[]).map((z,R)=>({id:`tag-${R}-${Date.now()}`,value:z}))),[k,S]=u.useState(!1),[w,C]=u.useState(!1),j=o&&Array.isArray(o)?o.map((P,z)=>({id:`tag-${z}-${Date.now()}`,value:P})):b;u.useEffect(()=>{o&&Array.isArray(o)&&y(o.map((P,z)=>({id:`tag-${z}-${Date.now()}`,value:P})))},[o]);const v=u.useCallback(P=>{const z=P.trim();return!(z.length<m||z.length>d||!c&&j.map(H=>H.value.toLowerCase()).includes(z.toLowerCase())||s&&j.length>=s)},[j,m,d,c,s]),I=u.useCallback(P=>{if(h||f)return;const z=P.trim();if(!z||!v(z))return;const R={id:`tag-${Date.now()}-${Math.random()}`,value:z},H=[...j,R],M=H.map(D=>D.value);o||y(H),n==null||n(M),a==null||a(z),x("")},[j,v,n,a,h,f,o]),F=u.useCallback(P=>{if(h||f)return;const z=j[P];if(!z)return;const R=j.filter((M,D)=>D!==P),H=R.map(M=>M.value);o||y(R),n==null||n(H),i==null||i(z.value,P)},[j,n,i,h,f,o]),W=u.useCallback(P=>{if(h||f)return;const z=P.target.value;if(p.includes("comma")&&z.includes(",")){const R=z.split(","),H=R[0],M=R.slice(1).join(",");H.trim()&&I(H),x(M);return}x(z)},[I,p,h,f]),E=u.useCallback(P=>{if(h||f)return;const{key:z}=P;if(p.includes("enter")&&z==="Enter"){P.preventDefault(),g.trim()&&I(g);return}if(p.includes("tab")&&z==="Tab"&&g.trim()){P.preventDefault(),I(g);return}if(p.includes("space")&&z===" "&&g.trim()){P.preventDefault(),I(g);return}if(z==="Backspace"&&!g&&j.length>0){P.preventDefault(),F(j.length-1);return}},[I,F,g,j,p,h,f]),T=u.useCallback(()=>{var P;S(!0),(P=e.onFocus)==null||P.call(e)},[e.onFocus]),A=u.useCallback(()=>{var P;S(!1),g.trim()&&I(g),(P=e.onBlur)==null||P.call(e)},[I,g,e.onBlur]);return{inputValue:g,setInputValue:x,tags:j,setTags:y,isFocused:k,setIsFocused:S,isHovered:w,setIsHovered:C,addTag:I,removeTag:F,handleInputChange:W,handleKeyDown:E,handleFocus:T,handleBlur:A,validateTag:v}},g0=({tag:e,onRemove:o,isRemovable:r,size:n,views:a,isDisabled:i,isReadOnly:s})=>{const[m,d]=u.useState(!1),c={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 t.jsxs(l.Horizontal,{alignItems:"center",gap:6,padding:c.padding,backgroundColor:"theme-primary-100",borderRadius:"9999px",borderWidth:"1px",borderStyle:"solid",borderColor:"theme-primary-250",transition:"all 0.15s ease-in-out",opacity:i?.6:1,_hover:!i&&!s?{backgroundColor:"theme-primary-180",borderColor:"theme-primary-400"}:{},...a==null?void 0:a.tag,children:[t.jsx(l.Text,{fontSize:c.fontSize,color:i?"color-gray-400":"theme-primary",whiteSpace:"nowrap",...a==null?void 0:a.tagText,children:e}),r&&!i&&!s&&t.jsx(l.View,{cursor:"pointer",padding:"2px",borderRadius:"50%",transition:"all 0.15s ease-in-out",backgroundColor:m?"color-red-100":"transparent",opacity:m?1:.7,onMouseEnter:()=>d(!0),onMouseLeave:()=>d(!1),onClick:p=>{p.stopPropagation(),o()},_hover:{backgroundColor:"color-red-100"},...a==null?void 0:a.tagRemove,children:t.jsx(ve,{widthHeight:c.iconSize,color:m?"color-red-500":"color-gray-400"})})]})},ki=({id:e,name:o,label:r,placeholder:n="Type and press Enter to add tags...",helperText:a,error:i=!1,inputValue:s="",tags:m=[],left:d,right:c,shadow:p={},views:h={},size:f="md",shape:g="default",variant:x="default",isDisabled:b=!1,isReadOnly:y=!1,isAutoFocus:k=!1,isRemovable:S=!0,isFocused:w=!1,isHovered:C=!1,maxTags:j,handleInputChange:v,handleKeyDown:I,handleFocus:F,handleBlur:W,removeTag:E,setIsHovered:T,onClick:A,setInputValue:P,setTags:z,setIsFocused:R,addTag:H,filteredItems:M,activeItemIndex:D,isMenuOpen:B,handleMenuItemSelect:V,defaultTags:L,onTagsChange:_,onTagAdd:q,onTagRemove:O,minTagLength:Y,maxTagLength:$,allowDuplicates:U,separators:K,menuItems:ee,onMenuItemSelect:J,onFocus:oe,onBlur:ae,validateTag:te,...G})=>{const{getColor:Q,themeMode:re}=l.useTheme(),X=!!(r&&(w||m.length>0||s)),Z=j&&m.length>=j,le={border:"none",outline:"none",backgroundColor:"transparent",fontSize:l.Typography.fontSizes[f],color:b?"color-gray-400":"color-gray-800",flex:1,minWidth:"120px",transition:"all 0.2s ease-in-out",...h==null?void 0:h.input};return t.jsx(Le,{error:!!i,helperText:typeof i=="string"?i:a,views:h,...G,children:t.jsxs(Xe,{label:r,shadow:p,value:m.length>0||s?"has-content":"",size:f,shape:g,variant:x,error:!!i,showLabel:X,isFocused:w,isHovered:C,isDisabled:b,isReadOnly:y,views:{...h,container:{...h==null?void 0:h.container,...h==null?void 0:h.inputContainer}},onClick:A,onMouseEnter:()=>T==null?void 0:T(!0),onMouseLeave:()=>T==null?void 0:T(!1),children:[d,t.jsxs(zo,{children:[r&&t.jsx(ro,{size:f,error:!!i,views:h,children:r}),t.jsxs(l.Horizontal,{alignItems:"center",gap:8,flexWrap:"wrap",width:"100%",minHeight:l.Typography.fontSizes[f],padding:"8px 0",...h==null?void 0:h.tagsContainer,children:[m.map((de,be)=>t.jsx(g0,{tag:de.value,onRemove:()=>E==null?void 0:E(be),isRemovable:S,size:f,views:h,isDisabled:b,isReadOnly:y},de.id)),!Z&&t.jsx(l.Input,{id:e,name:o,type:"text",value:s,placeholder:m.length===0?n:"",disabled:b,readOnly:y,autoFocus:k,onChange:v,onKeyDown:I,onFocus:F,onBlur:W,autoComplete:"off",...le}),Z&&t.jsxs(l.Text,{fontSize:l.Typography.fontSizes[f],color:"color-gray-500",fontStyle:"italic",...h==null?void 0:h.placeholder,children:["Maximum ",j," tags reached"]})]})]}),c]})})},x0=e=>{const o=yi(e),{tags:r,...n}=e;return t.jsx(ki,{...o,...n})},b0=x0;function y0(e){const o=setTimeout(e,0),r=setTimeout(e,10),n=setTimeout(e,50);return[o,r,n]}const Ci=({value:e,defaultValue:o="",length:r=6,onChange:n,onChangeText:a,onComplete:i,onKeyDown:s,onKeyPress:m,onBlur:d,onFocus:c,isReadOnly:p,isDisabled:h,pattern:f,stepValues:g,pasteTransformer:x})=>{var O,Y;const b=e!==void 0,y=b?e:o,[k,S]=u.useState(String(y??"").slice(0,r)||""),[w,C]=u.useState(!1),[j,v]=u.useState(!1),[I,F]=u.useState(null),[W,E]=u.useState(null),T=u.useRef(null),A=u.useRef(null),P=u.useRef({value:k,onChange:n||(()=>{}),isIOS:typeof window<"u"&&((Y=(O=window==null?void 0:window.CSS)==null?void 0:O.supports)==null?void 0:Y.call(O,"-webkit-touch-callout","none"))}),z=u.useRef({prev:[null,null,"none"]}),R=f?typeof f=="string"?new RegExp(f):f:null;u.useEffect(()=>{b&&e!==k&&S(String(e??"").slice(0,r)||"")},[b,e,r,k]);const H=u.useCallback($=>{let U=$;if(g&&g.length>0&&$){const K=parseInt($,10);if(!isNaN(K)){let ee=g[0],J=Math.abs(K-ee);for(let oe=1;oe<g.length;oe++){const ae=Math.abs(K-g[oe]);ae<J&&(J=ae,ee=g[oe])}U=ee.toString()}}S(U),n&&n(U),a&&a(U),i&&U.length===r&&i(U)},[n,a,i,r,g]),M=u.useCallback($=>{$&&T.current!==$&&Object.defineProperty(T,"current",{value:$,writable:!0})},[]),D=u.useCallback($=>{const U=$.currentTarget.value.slice(0,r);if(U.length>0&&R&&!R.test(U)){$.preventDefault();return}H(U),T.current&&(T.current.value=U)},[r,R,H,T]),B=u.useCallback(()=>{var $;if(T.current){const U=Math.min(T.current.value.length,r-1),K=T.current.value.length;($=T.current)==null||$.setSelectionRange(U,K),F(U),E(K)}C(!0)},[r]),V=u.useCallback(()=>{C(!1)},[]),L=u.useCallback($=>{s&&s($)},[]),_=u.useCallback($=>{m&&m($)},[]),q=u.useCallback($=>{const U=T.current;if(!$.clipboardData||!U)return;const K=$.clipboardData.getData("text/plain"),ee=x?x(K):K;$.preventDefault();const J=U.selectionStart||0,oe=U.selectionEnd||0,G=(J!==oe?k.slice(0,J)+ee+k.slice(oe):k.slice(0,J)+ee+k.slice(J)).slice(0,r);if(G.length>0&&R&&!R.test(G))return;U.value=G,H(G),S(G);const Q=Math.min(G.length,r-1),re=G.length;U.setSelectionRange(Q,re),F(Q),E(re)},[r,x,R,H,k,S]);return u.useEffect(()=>{const $=T.current,U=A.current;if(!$||!U)return;P.current.value!==$.value&&P.current.onChange&&P.current.onChange($.value),z.current.prev=[$.selectionStart,$.selectionEnd,$.selectionDirection];function K(){if(document.activeElement!==$){F(null),E(null);return}const oe=($==null?void 0:$.selectionStart)??null,ae=($==null?void 0:$.selectionEnd)??null,te=($==null?void 0:$.selectionDirection)??null,G=($==null?void 0:$.maxLength)??0,Q=($==null?void 0:$.value)??"",re=z.current.prev;let X=-1,Z=-1,le="none";if(Q.length!==0&&oe!==null&&ae!==null){const De=oe===ae,qt=oe===Q.length&&Q.length<G;if(De&&!qt){const Fe=oe;if(Fe===0)X=0,Z=1,le="forward";else if(Fe===G)X=Fe-1,Z=Fe,le="backward";else if(G>1&&Q.length>1){let tt=0;if(re[0]!==null&&re[1]!==null){le=Fe<re[1]?"backward":"forward";const Ut=re[0]===re[1]&&re[0]<G;le==="backward"&&!Ut&&(tt=-1)}X=tt+Fe,Z=tt+Fe+1}}X!==-1&&Z!==-1&&X!==Z&&T.current&&T.current.setSelectionRange(X,Z,le)}const de=X!==-1?X:oe,be=Z!==-1?Z:ae,Pe=le!=="none"?le:te;F(de),E(be),z.current.prev=[de,be,Pe]}document.addEventListener("selectionchange",K,{capture:!0}),K(),document.activeElement===$&&C(!0);const ee=()=>{U&&U.style.setProperty("--root-height",`${$.clientHeight}px`)};ee();const J=new window.ResizeObserver(ee);return J.observe($),()=>{document.removeEventListener("selectionchange",K,{capture:!0}),J.disconnect()}},[]),u.useEffect(()=>{y0(()=>{var ee,J,oe,ae;(ee=T.current)==null||ee.dispatchEvent(new Event("input"));const $=(J=T.current)==null?void 0:J.selectionStart,U=(oe=T.current)==null?void 0:oe.selectionEnd,K=(ae=T.current)==null?void 0:ae.selectionDirection;$!==null&&U!==null&&$!==void 0&&U!==void 0&&(F($),E(U),z.current.prev=[$,U,K||"none"])})},[k,w]),{value:k,setValue:H,isFocused:w,setIsFocused:C,isHovered:j,setIsHovered:v,inputRef:T,containerRef:A,mirrorSelectionStart:I,mirrorSelectionEnd:W,setMirrorSelectionStart:F,setMirrorSelectionEnd:E,setInputRef:M,handleChange:D,handleFocus:B,handleBlur:V,handleKeyDown:L,handleKeyPress:_,handlePaste:q}},k0=u.createContext({slots:[],isFocused:!1,isHovering:!1}),C0=`
|
|
6
|
+
`,backgroundSize:`200% ${X}px, ${X}px 200%, 200% ${X}px, ${X}px 200%`,backgroundPosition:O,transitionProperty:"background-position",transitionDuration:`${H}s`,transitionTimingFunction:"linear",transitionDelay:B,_hover:{backgroundPosition:_,transitionDelay:q},width:l?"fit-content":s?"100%":void 0,...g==null?void 0:g.container,...F,children:r.jsx(i.View,{as:t?"div":"button",disabled:!!(a||n),display:"flex",alignItems:"center",justifyContent:"center",borderRadius:Math.max(0,W-3),width:"100%",height:"100%",...h,...f,...y,backgroundColor:(h==null?void 0:h.backgroundColor)||w,color:b,borderWidth:0,cursor:a?"default":"pointer",children:E})})}return r.jsx(i.Element,{ref:x,as:e==="link"&&t?"div":"button",type:e==="link"&&t?void 0:"button",disabled:!!(a||n),...f,...y,display:"inline-flex",alignItems:"center",justifyContent:"center",width:l?"fit-content":s?"100%":void 0,borderRadius:Go[u],boxShadow:c,transition:"background-color 0.2s ease, opacity 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease",cursor:a?"default":"pointer",onClick:m,...h,...g==null?void 0:g.container,...F,children:E})},Sp=p.memo(p.forwardRef(({variant:e="filled",size:o="md",shape:t="rounded",iconPosition:a="left",loaderPosition:n="left",backgroundColor:l,color:s,textColor:d,reversed:u=!1,isAuto:c=!0,isFilled:m,isDisabled:g,isLoading:h,isIconRounded:f,isHovered:y,icon:x,children:b,to:k,isExternal:j,shadow:w,onClick:C,views:S={},animation:v,loaderProps:I,config:F,ariaLabel:W,borderMovingDuration:E=2,borderMovingGradientColors:T=["#705CFF","#FF5C97","#FFC75C"],animatedStrokeAccentColor:A="#705CFF",animatedStrokeTextColor:P="color-gray-900",...z},R)=>{const M=g?"theme-disabled":h?"theme-loading":l??s??"theme-primary",D=d??"color-white",{config:L}=Mr(),V=L==null?void 0:L.theme,_=p.useMemo(()=>{const U=fp(M,D,u,V);return F!=null&&F.variants&&Object.keys(F.variants).forEach(K=>{U[K]&&(U[K]=Ee(U[K],F.variants[K]))}),U},[M,D,u,V,F==null?void 0:F.variants])[e],q=(_==null?void 0:_.color)??D,B=r.jsx(yp,{icon:x,isLoading:h,iconPosition:a,loaderPosition:n,size:o,resolvedTextColor:q,isIconRounded:f,views:S,children:b}),X=En[o],$=f?hp[o]:{};return r.jsx(Cp,{variant:e,animation:v,to:k,isDisabled:g,isLoading:h,isAuto:c,isFilled:m,isExternal:j,shape:t,shadow:w,onClick:C,views:S,baseStyles:_,sizeStyles:X,iconPad:$,resolvedTextColor:q,content:B,size:o,mainTone:M,borderMovingDuration:E,borderMovingGradientColors:T,animatedStrokeAccentColor:A,animatedStrokeTextColor:P,containerRef:R,...z})})),jp=e=>{const[o,t]=i.useHover(),a=me("button",e);return r.jsx(Sp,{isHovered:t,...a})},le=jp,wp={sm:{padding:"12px"},md:{padding:"16px"},lg:{padding:"24px"}},vp={square:0,rounded:"8px",pill:"24px"},Tp=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)"}}}},Dr=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}}),Dn=p.createContext({}),Ut=()=>p.useContext(Dn),pt=({children:e,views:o,style:t,themeMode:a,...n})=>{var c;const l=i.useTheme(),{styles:s}=Ut(),d=Dr(l).header,u={...d,...s==null?void 0:s.header,...n,style:{...d==null?void 0:d.style,...(c=s==null?void 0:s.header)==null?void 0:c.style,...t}};return r.jsx(i.Vertical,{gap:8,...u,children:e})},mt=({children:e,views:o,style:t,themeMode:a,...n})=>{var c;const l=i.useTheme(),{styles:s}=Ut(),d=Dr(l).content,u={...d,...s==null?void 0:s.content,...n,style:{...d==null?void 0:d.style,...(c=s==null?void 0:s.content)==null?void 0:c.style,...t}};return r.jsx(i.Vertical,{gap:12,...u,children:e})},gt=({children:e,views:o,style:t,themeMode:a,...n})=>{var c;const l=i.useTheme(),{styles:s}=Ut(),d=Dr(l).footer,u={...d,...s==null?void 0:s.footer,...n,style:{...d==null?void 0:d.style,...(c=s==null?void 0:s.footer)==null?void 0:c.style,...t}};return r.jsx(i.Vertical,{gap:8,...u,children:e})},Ip=({variant:e="default",size:o="md",shape:t="rounded",children:a,header:n,footer:l,isFullWidth:s=!1,views:d,style:u,themeMode:c,config:m,...g})=>{var S,v;const h=i.useTheme(),f=Dr(h),y=((S=wp[o])==null?void 0:S.padding)||"16px",x=p.useMemo(()=>({styles:{container:{...f.container,borderRadius:vp[t],...d==null?void 0:d.container},header:{...f.header,padding:y,...d==null?void 0:d.header},content:{...f.content,padding:y,...d==null?void 0:d.content},footer:{...f.footer,padding:y,...d==null?void 0:d.footer}}}),[f,d,y,t]),b=p.Children.toArray(a).some(I=>p.isValidElement(I)&&(I.type===pt||I.type===mt||I.type===gt)),{themeMode:k}=h,w=Tp(c||k)[e],C={width:s?"100%":"auto",overflow:"hidden",...w,...x.styles.container,...g,style:{...(v=x.styles.container)==null?void 0:v.style,...u}};return r.jsx(Dn.Provider,{value:x,children:r.jsx(i.View,{...C,children:b?a:r.jsxs(i.Vertical,{width:"100%",children:[n&&r.jsx(pt,{children:n}),r.jsx(mt,{children:a}),l&&r.jsx(gt,{children:l})]})})})},Fp=e=>{const o=me("card",e);return r.jsx(Ip,{...o})},fe=Fp;fe.Header=pt;fe.Content=mt;fe.Footer=gt;const Rp=({defaultActiveIndex:e=0,activeIndex:o,onChange:t,autoPlay:a=!1,autoPlayInterval:n=3e3,pauseOnHover:l=!0,infinite:s=!0,totalSlides:d,stepIndices:u})=>{const c=p.useRef(d||0),[m,g]=p.useState(d||0),h=p.useRef(new Set),f=p.useRef(0),y=p.useMemo(()=>Ft("carousel-content"),[]),[x,b]=p.useState(o!==void 0?o:e),[k,j]=p.useState(!1),[w,C]=p.useState(!1),[S,v]=p.useState(0),[I,F]=p.useState(0),W=p.useRef(null);p.useEffect(()=>{o!==void 0&&b(o)},[o]);const E=p.useCallback(_=>{let q=_;s?_<0?q=m-1:_>=m&&(q=0):q=Math.max(0,Math.min(_,m-1)),u&&u.length>0&&(u.includes(q)||(q=u.reduce((X,$)=>Math.abs($-q)<Math.abs(X-q)?$:X))),o===void 0&&b(q),t&&t(q)},[o,s,t,m]),T=p.useCallback(()=>{E(x+1)},[x,E]),A=p.useCallback(()=>{E(x-1)},[x,E]);p.useEffect(()=>(a&&!k&&!w&&(W.current=setInterval(()=>{T()},n)),()=>{W.current&&clearInterval(W.current)}),[a,n,k,w,T,l]);const P=p.useCallback(()=>{l&&j(!0)},[l]),z=p.useCallback(()=>{j(!1)},[]),R=p.useCallback(_=>{C(!0),"touches"in _?(v(_.touches[0].clientX),F(_.touches[0].clientY)):(v(_.clientX),F(_.clientY))},[]),H=p.useCallback(_=>{if(!w)return;let q,B;"touches"in _?(q=_.touches[0].clientX,B=_.touches[0].clientY):(q=_.clientX,B=_.clientY);const X=q-S,$=B-I;Math.abs(X)>Math.abs($)&&Math.abs(X)>50&&(X>0?A():T(),C(!1))},[w,S,I,T,A]),M=p.useCallback(()=>{C(!1)},[]),D=p.useCallback(()=>{const _=f.current++;h.current.add(_);const q=h.current.size;return c.current=q,g(q),_},[]),L=p.useCallback(_=>{h.current.delete(_);const q=h.current.size;if(c.current=q,g(q),q>0&&x>=q){const B=Math.max(0,q-1);o===void 0&&b(B),t&&t(B)}},[x,o,t]),V=s||x>0,O=s||x<m-1;return{activeIndex:x,totalSlides:m,goToSlide:E,nextSlide:T,prevSlide:A,canGoNext:O,canGoPrevious:V,handleMouseEnter:P,handleMouseLeave:z,handleDragStart:R,handleDragMove:H,handleDragEnd:M,registerSlide:D,unregisterSlide:L,contentId:y,infinite:s}},zp={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"}},Mp={dot:{backgroundColor:"theme-primary"},line:{backgroundColor:"theme-primary"},number:{backgroundColor:"theme-primary",color:"color-white"}},Sr={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"}},Ko=()=>({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,...Sr},nextButton:{position:"absolute",top:"50%",right:"16px",transform:"translateY(-50%)",zIndex:10,...Sr}}),$n=p.createContext(null),$r=()=>{const e=p.useContext($n);if(!e)throw new Error("Carousel compound components must be used within <Carousel>");return e},Ln=({children:e,isActive:o,index:t,views:a,...n})=>r.jsx(i.View,{flexShrink:0,width:"100%",height:"100%",display:o?"block":"none",...a,...n,children:e}),_n=({views:e,children:o,...t})=>{const{goToPrevious:a,canGoPrevious:n,styles:l}=$r(),d={...Ko().prevButton,...l==null?void 0:l.prevButton,...e==null?void 0:e.prevButton};return r.jsx(le,{"aria-label":"Previous slide",onClick:()=>a(),isDisabled:!n,...d,...t,children:o??r.jsx(se,{orientation:"left",widthHeight:16})})},Bn=({views:e,children:o,...t})=>{const{goToNext:a,canGoNext:n,styles:l}=$r(),d={...Ko().nextButton,...l==null?void 0:l.nextButton,...e==null?void 0:e.nextButton};return r.jsx(le,{"aria-label":"Next slide",onClick:()=>a(),isDisabled:!n,...d,...t,children:o??r.jsx(se,{orientation:"right",widthHeight:16})})},On=({children:e,views:o,...t})=>{const{registerSlide:a,unregisterSlide:n,styles:l}=$r(),s=p.useRef(null);p.useEffect(()=>{const c=a();return s.current=c,()=>{s.current!==null&&n(s.current)}},[a,n]);const u={...Ko().item,...l==null?void 0:l.item,...o==null?void 0:o.item};return r.jsx(i.View,{role:"group","aria-roledescription":"slide",...u,...t,children:e})},Nn=({children:e,views:o,style:t,...a})=>{const{currentIndex:n,styles:l,contentId:s}=$r(),d=Ko(),u={...d.content,...l==null?void 0:l.content,...o==null?void 0:o.content},c={...d.innerContainer,...l==null?void 0:l.innerContainer,...o==null?void 0:o.innerContainer},m=`-${n*100}%`;return r.jsx(i.View,{...u,...a,style:{...u==null?void 0:u.style,...t},id:s,"aria-live":"polite",children:r.jsx(i.View,{...c,style:{...c==null?void 0:c.style,transform:`translateX(${m})`},children:e})})},Wp=({children:e,defaultActiveIndex:o=0,activeIndex:t,onChange:a,showNavigation:n=!0,navigationPosition:l="inside",prevButton:s,nextButton:d,showIndicators:u=!0,indicatorPosition:c="bottom",indicatorVariant:m="dot",autoPlay:g=!1,autoPlayInterval:h=3e3,pauseOnHover:f=!0,infinite:y=!0,direction:x="horizontal",transitionDuration:b=300,views:k,stepIndices:j,themeMode:w,...C})=>{const S=p.useMemo(()=>p.Children.toArray(e),[e]),v=Rp({defaultActiveIndex:o,activeIndex:t,onChange:a,autoPlay:g,autoPlayInterval:h,pauseOnHover:f,infinite:y,totalSlides:S.length}),{activeIndex:I,totalSlides:F,goToSlide:W,nextSlide:E,prevSlide:T,handleMouseEnter:A,handleMouseLeave:P,handleDragStart:z,handleDragMove:R,handleDragEnd:H}=v,M=()=>{if(!n)return null;const V=s||r.jsx(i.View,{as:"button","aria-label":"Previous slide",...Sr,...k==null?void 0:k.prevButton,children:"❮"}),O=d||r.jsx(i.View,{as:"button","aria-label":"Next slide",...Sr,...k==null?void 0:k.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:T,cursor:!y&&I===0?"not-allowed":"pointer",opacity:!y&&I===0?.5:1,children:V}),r.jsx(i.View,{position:"absolute",top:"50%",transform:"translateY(-50%)",right:l==="inside"?"10px":"-40px",onClick:E,cursor:!y&&I===S.length-1?"not-allowed":"pointer",opacity:!y&&I===S.length-1?.5:1,children:O})]})},D=()=>u?r.jsx(i.Horizontal,{position:"absolute",left:"0",right:"0",justifyContent:"center",...c==="top"?{top:"10px"}:{bottom:"10px"},...k==null?void 0:k.indicators,children:S.map((V,O)=>r.jsx(i.View,{onClick:()=>W(O),cursor:"pointer",...zp[m],...O===I?{...Mp[m]}:{},...k==null?void 0:k.indicator,...O===I?k==null?void 0:k.activeIndicator:{},children:m==="number"&&O+1},O))}):null;return p.useMemo(()=>p.Children.toArray(e).some(V=>p.isValidElement(V)&&(V.type===Nn||V.type===On||V.type===_n||V.type===Bn)),[e])?r.jsx($n.Provider,{value:{currentIndex:I,totalSlides:F,goToSlide:W,goToNext:E,goToPrevious:T,canGoNext:v.canGoNext,canGoPrevious:v.canGoPrevious,registerSlide:v.registerSlide,unregisterSlide:v.unregisterSlide,styles:{...Ko(),...k},contentId:v.contentId,infinite:y},children:r.jsx(i.View,{role:"region","aria-roledescription":"carousel","aria-label":"Carousel",position:"relative",width:"100%",height:"100%",overflow:"hidden",...k==null?void 0:k.container,...C,children:e})}):r.jsxs(i.View,{position:"relative",width:"100%",height:"100%",overflow:"hidden",onMouseEnter:A,onMouseLeave:P,onTouchStart:z,onTouchMove:R,onTouchEnd:H,onMouseDown:z,onMouseMove:R,onMouseUp:H,...k==null?void 0:k.container,...C,children:[r.jsx(i.View,{width:"100%",height:"100%",position:"relative",...k==null?void 0:k.slideWrapper,children:S.map((V,O)=>r.jsx(Ln,{isActive:O===I,index:O,views:k==null?void 0:k.slide,children:V},O))}),M(),D()]})},Hp=e=>r.jsx(Wp,{...e}),We=Hp;We.Slide=Ln;We.Content=Nn;We.Item=On;We.Previous=_n;We.Next=Bn;const ze={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"},qn=[ze.blue,ze.green,ze.purple,ze.orange,ze.red,ze.teal,ze.pink,ze.indigo,ze.yellow,ze.cyan],ko=qn,Pp={width:"100%",height:"100%",position:"relative",display:"flex",flexDirection:"column"},Ap={fontSize:"18px",fontWeight:"700",marginBottom:"24px",textAlign:"center",color:"color-gray-900"},Vp={display:"flex",flexWrap:"wrap",justifyContent:"flex-start",marginTop:"16px",gap:"12px"},Ep={display:"flex",alignItems:"center",padding:"4px 8px",borderRadius:"6px",cursor:"pointer",transition:"background-color 0.2s ease",_hover:{backgroundColor:"color-gray-50"}},Dp={width:"10px",height:"10px",borderRadius:"50%",marginRight:"8px"},$p={fontSize:"13px",fontWeight:"500",color:"color-gray-600"},nr={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},Un={stroke:"color-gray-100",strokeWidth:"1px",strokeDasharray:"4 4"},jr={stroke:"color-gray-200",strokeWidth:"1px"},wr={fontSize:"12px",fill:"color-gray-500",fontWeight:"500"},Lp={rx:"4px",ry:"4px",cursor:"pointer",transition:"all 0.3s cubic-bezier(0.4, 0, 0.2, 1)",_hover:{filter:"brightness(1.1)"}},_p={strokeWidth:"3px",fill:"none",strokeLinecap:"round",strokeLinejoin:"round",transition:"stroke-width 0.2s ease"},Bp={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"}},lr={strokeWidth:"2px",stroke:"color-white",cursor:"pointer",transition:"all 0.3s ease",_hover:{transform:"scale(1.02)"}},Gt={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"},Op={...Gt},Np={...Gt,backgroundColor:"rgba(254, 242, 242, 0.8)",color:"color-red-600"},qp={...Gt,backgroundColor:"rgba(249, 250, 251, 0.8)",color:"color-gray-500"},Up=({data:e,dataPoints:o,animated:t=!0,animationDuration:a=500,showTooltips:n=!0})=>{const[l,s]=p.useState(t?0:1),[d,u]=p.useState({visible:!1,x:0,y:0,content:null}),c=p.useRef(null),m=p.useRef(null);p.useEffect(()=>{if(!t){s(1);return}const j=Date.now(),w=()=>{const C=Date.now()-j,S=Math.min(C/a,1);s(S),S<1&&(c.current=requestAnimationFrame(w))};return c.current=requestAnimationFrame(w),()=>{c.current&&cancelAnimationFrame(c.current)}},[t,a]);const[g,h]=p.useState(new Set),f=p.useCallback(j=>{h(w=>{const C=new Set(w);return C.has(j)?C.delete(j):C.add(j),C})},[]),y=p.useCallback(()=>e?{...e,series:e.series.map((j,w)=>({...j,color:j.color||ko[w%ko.length],hidden:g.has(j.name)}))}:o?o.map((j,w)=>({...j,color:j.color||ko[w%ko.length],hidden:g.has(j.label)})):null,[e,o,g]),x=p.useCallback((j,w,C)=>{n&&u({visible:!0,x:j,y:w,content:C})},[n]),b=p.useCallback(()=>{u(j=>({...j,visible:!1}))},[]),k=p.useCallback(()=>{if(!m.current)return{width:0,height:0};const{width:j,height:w}=m.current.getBoundingClientRect();return{width:j,height:w}},[]);return{animationProgress:l,tooltip:d,containerRef:m,processedData:y,showTooltip:x,hideTooltip:b,getChartDimensions:k,toggleSeries:f}},Gp=({data:e,width:o,height:t,animationProgress:a,showGrid:n=!0,onBarClick:l,showTooltip:s,hideTooltip:d,views:u})=>{const{getColor:c}=i.useTheme(),m={top:20,right:20,bottom:40,left:50},g=o-m.left-m.right,h=t-m.top-m.bottom,f=p.useMemo(()=>{let S=0;return e.series.forEach(v=>{v.data.forEach(I=>{S=Math.max(S,I)})}),S},[e]),y=e.labels.length,x=e.series.length,b=g/y,k=b*.8/x,j=b*.2/(x+1),w=f||10,C=p.useMemo(()=>{const v=[];for(let I=0;I<=5;I++){const F=w/5*I;v.push(F)}return v},[f]);return r.jsxs("svg",{width:o,height:t,children:[r.jsx("defs",{children:e.series.map((S,v)=>{const I=S.color?c(S.color):"black";return r.jsxs("linearGradient",{id:`bar-gradient-${v}`,x1:"0%",y1:"0%",x2:"0%",y2:"100%",children:[r.jsx("stop",{offset:"0%",stopColor:I,stopOpacity:1}),r.jsx("stop",{offset:"100%",stopColor:I,stopOpacity:.7})]},`bar-gradient-${v}`)})}),r.jsx("line",{x1:m.left,y1:t-m.bottom,x2:o-m.right,y2:t-m.bottom,...jr,...u==null?void 0:u.axis}),r.jsx("line",{x1:m.left,y1:m.top,x2:m.left,y2:t-m.bottom,...jr,...u==null?void 0:u.axis}),e.labels.map((S,v)=>{const I=m.left+(v+.5)*b,F=t-m.bottom+20;return r.jsx("text",{x:I,y:F,textAnchor:"middle",...wr,...u==null?void 0:u.axisLabel,children:S},`x-label-${v}`)}),C.map((S,v)=>{const I=t-m.bottom-S/w*h;return r.jsxs(p.Fragment,{children:[r.jsx("text",{x:m.left-10,y:I,textAnchor:"end",dominantBaseline:"middle",...wr,...u==null?void 0:u.axisLabel,children:S.toFixed(0)}),n&&r.jsx("line",{x1:m.left,y1:I,x2:o-m.right,y2:I,...Un,...u==null?void 0:u.grid})]},`y-tick-${v}`)}),e.series.map((S,v)=>S.hidden?null:r.jsx(p.Fragment,{children:S.data.map((I,F)=>{const W=I/w*h*a,E=m.left+F*b+j*(v+1)+k*v,T=t-m.bottom-W,A=e.labels[F],P=e.series.reduce((D,L)=>{const V=L.data[F];return D+(typeof V=="number"?V:0)},0),z=P>0?(I/P*100).toFixed(1):null,R=S.color?c(S.color):"black",H=D=>{const L=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:S.name}),r.jsx(i.View,{width:"12px",height:"12px",borderRadius:"2px",backgroundColor:R})]}),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:I.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:P.toLocaleString()})]})]})]}),V=D.currentTarget.getBoundingClientRect(),O=V.left+V.width/2,_=V.top;s(O,_,L)},M=()=>{l&&l(S.name,F)};return r.jsx("rect",{x:E,y:T,width:k,height:W,fill:`url(#bar-gradient-${v})`,onMouseEnter:H,onMouseMove:H,onMouseLeave:d,onClick:M,...Lp,...u==null?void 0:u.bar},`bar-${v}-${F}`)})},`series-${v}`))]})},Yp=({data:e,width:o,height:t,animationProgress:a,showGrid:n=!0,onPointClick:l,showTooltip:s,hideTooltip:d,views:u})=>{const{getColor:c}=i.useTheme(),m={top:20,right:20,bottom:40,left:40},g=o-m.left-m.right,h=t-m.top-m.bottom,f=p.useMemo(()=>{let j=0;return e.series.forEach(w=>{w.data.forEach(C=>{j=Math.max(j,C)})}),j},[e]),y=f||10,x=p.useMemo(()=>{const w=[];for(let C=0;C<=5;C++){const S=y/5*C;w.push(S)}return w},[f]),b=j=>{if(j.length<2)return"";const w=j.map((S,v)=>({x:m.left+v/(e.labels.length-1)*g,y:t-m.bottom-S/y*h*a}));let C=`M ${w[0].x},${w[0].y}`;for(let S=0;S<w.length-1;S++){const v=w[S===0?S:S-1],I=w[S],F=w[S+1],W=w[S+2===w.length?S+1:S+2],E=I.x+(F.x-v.x)/6,T=I.y+(F.y-v.y)/6,A=F.x-(W.x-I.x)/6,P=F.y-(W.y-I.y)/6;C+=` C ${E},${T} ${A},${P} ${F.x},${F.y}`}return C},k=j=>{if(j.length<2)return"";const w=b(j),C=m.left,S=m.left+g,v=t-m.bottom;return`${w} L ${S},${v} L ${C},${v} Z`};return r.jsxs("svg",{width:o,height:t,children:[r.jsx("defs",{children:e.series.map((j,w)=>{const C=j.color?c(j.color):"black";return r.jsxs("linearGradient",{id:`gradient-${w}`,x1:"0%",y1:"0%",x2:"0%",y2:"100%",children:[r.jsx("stop",{offset:"0%",stopColor:C,stopOpacity:.3}),r.jsx("stop",{offset:"100%",stopColor:C,stopOpacity:0})]},`gradient-${w}`)})}),r.jsx("line",{x1:m.left,y1:t-m.bottom,x2:o-m.right,y2:t-m.bottom,...jr,...u==null?void 0:u.axis}),r.jsx("line",{x1:m.left,y1:m.top,x2:m.left,y2:t-m.bottom,...jr,...u==null?void 0:u.axis}),e.labels.map((j,w)=>{const C=m.left+w/(e.labels.length-1)*g,S=t-m.bottom+20;return r.jsx("text",{x:C,y:S,textAnchor:"middle",...wr,...u==null?void 0:u.axisLabel,children:j},`x-label-${w}`)}),x.map((j,w)=>{const C=t-m.bottom-j/y*h;return r.jsxs(p.Fragment,{children:[r.jsx("text",{x:m.left-10,y:C,textAnchor:"end",dominantBaseline:"middle",...wr,...u==null?void 0:u.axisLabel,children:j.toFixed(0)}),n&&r.jsx("line",{x1:m.left,y1:C,x2:o-m.right,y2:C,...Un,...u==null?void 0:u.grid})]},`y-tick-${w}`)}),e.series.map((j,w)=>{if(j.hidden)return null;const C=j.color?c(j.color):"black";return r.jsxs(p.Fragment,{children:[r.jsx("path",{d:k(j.data),fill:`url(#gradient-${w})`,...u==null?void 0:u.area}),r.jsx("path",{d:b(j.data),stroke:C,..._p,...u==null?void 0:u.line}),j.data.map((S,v)=>{const I=m.left+v/(e.labels.length-1)*g,F=t-m.bottom-S/y*h*a,W=e.labels[v],E=e.series.reduce((M,D)=>{const L=D.data[v];return M+(typeof L=="number"?L:0)},0),T=E>0?(S/E*100).toFixed(1):null,A=v>0&&typeof j.data[v-1]=="number"?j.data[v-1]:null,P=typeof A=="number"?S-A:null,z=typeof P=="number"?`${P>=0?"+":""}${P.toLocaleString()}`:null,R=M=>{const D=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:j.name}),r.jsx(i.View,{width:"12px",height:"12px",borderRadius:"2px",backgroundColor:C})]}),r.jsx(i.Text,{marginTop:"4px",color:"color-gray-500",fontSize:"12px",children:W}),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:S.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})]}),T!==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:`${T}%`})]}),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:E.toLocaleString()})]})]})]}),L=M.currentTarget.getBoundingClientRect(),V=L.left+L.width/2,O=L.top+L.height/2;s(V,O,D)},H=()=>{l&&l(j.name,v)};return r.jsx("circle",{cx:I,cy:F,fill:C,onMouseEnter:R,onMouseMove:R,onMouseLeave:d,onClick:H,...Bp,...u==null?void 0:u.point},`point-${w}-${v}`)})]},`series-${w}`)})]})},Xp=({dataPoints:e,width:o,height:t,animationProgress:a,isDonut:n=!1,onSliceClick:l,showTooltip:s,hideTooltip:d,views:u})=>{const{getColor:c}=i.useTheme(),{ref:m,relation:g}=i.useElementPosition({trackChanges:!0,trackOnHover:!0,trackOnScroll:!0,trackOnResize:!0}),h=p.useRef(null);p.useEffect(()=>{h.current&&m&&(m.current=h.current)},[h,m]);const y=Math.min(o,t)/2*.8,x=o/2,b=t/2,k=n?y*.6:0,j=p.useMemo(()=>e.filter(S=>!S.hidden),[e]),w=p.useMemo(()=>j.reduce((S,v)=>S+v.value,0),[j]),C=p.useMemo(()=>{if(w===0)return[{path:n?[`M ${x} ${b-y}`,`A ${y} ${y} 0 1 1 ${x} ${b+y}`,`A ${y} ${y} 0 1 1 ${x} ${b-y}`,`M ${x} ${b-k}`,`A ${k} ${k} 0 1 0 ${x} ${b+k}`,`A ${k} ${k} 0 1 0 ${x} ${b-k}`,"Z"].join(" "):[`M ${x} ${b}`,`M ${x} ${b-y}`,`A ${y} ${y} 0 1 1 ${x} ${b+y}`,`A ${y} ${y} 0 1 1 ${x} ${b-y}`,"Z"].join(" "),color:"#E2E8F0",label:"Total",value:0,percentage:"0%",labelX:x,labelY:b,startAngle:0,endAngle:Math.PI*2,index:-1}];const S=[];let v=-Math.PI/2;for(let I=0;I<j.length;I++){const W=j[I].value/w,E=W*2*Math.PI*a,A=Math.max(0,E-.02),P=v+A,z=x+Math.cos(v)*y,R=b+Math.sin(v)*y,H=x+Math.cos(P)*y,M=b+Math.sin(P)*y,D=x+Math.cos(v)*k,L=b+Math.sin(v)*k,V=x+Math.cos(P)*k,O=b+Math.sin(P)*k,_=A>Math.PI?1:0;let q;n?q=[`M ${z} ${R}`,`A ${y} ${y} 0 ${_} 1 ${H} ${M}`,`L ${V} ${O}`,`A ${k} ${k} 0 ${_} 0 ${D} ${L}`,"Z"].join(" "):q=[`M ${x} ${b}`,`L ${z} ${R}`,`A ${y} ${y} 0 ${_} 1 ${H} ${M}`,"Z"].join(" ");const B=v+A/2,X=n?(y+k)/2:y*.7,$=x+Math.cos(B)*X,U=b+Math.sin(B)*X,K=`${(W*100).toFixed(1)}%`,ee=j[I].color||ko[I%ko.length],J=c(ee);S.push({path:q,color:J,label:j[I].label,value:j[I].value,percentage:K,labelX:$,labelY:U,startAngle:v,endAngle:P,index:I,originalIndex:e.findIndex(oe=>oe.label===j[I].label)}),v=P}return S},[j,w,y,x,b,k,a,n,e]);return r.jsxs("svg",{ref:h,width:o,height:t,style:{overflow:"visible"},children:[n&&r.jsxs("g",{pointerEvents:"none",children:[r.jsx("circle",{cx:x,cy:b,r:k,fill:"white"}),r.jsx("text",{x,y:b-8,textAnchor:"middle",dominantBaseline:"middle",fontSize:"14px",fontWeight:"500",fill:"color-gray-500",children:"Total"}),r.jsx("text",{x,y:b+12,textAnchor:"middle",dominantBaseline:"middle",fontSize:"20px",fontWeight:"800",fill:"color-gray-900",children:w.toLocaleString()})]}),C.map((S,v)=>{const I=E=>{const T=w>0?S.value/w*100:0,A=w>0?Math.max(0,100-T):null,P=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.label}),r.jsx(i.View,{width:"12px",height:"12px",borderRadius:"2px",backgroundColor:S.color})]}),r.jsxs(i.Text,{marginTop:"4px",color:"color-gray-500",fontSize:"12px",children:["Slice ",S.index+1," of ",j.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:S.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:S.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=E.clientX,R=E.clientY;if(h.current){const H=h.current.getBoundingClientRect();z=H.left+S.labelX,R=H.top+S.labelY}s(z,R,P)},F=()=>{S.index!==-1&&l&&l(e[S.index],S.index)},W=S.index===-1;return r.jsxs("g",{children:[r.jsx("path",{d:S.path,fill:S.color,onMouseEnter:W?void 0:I,onMouseMove:W?void 0:I,onMouseLeave:W?void 0:d,onClick:F,...lr,style:{...lr==null?void 0:lr.style,cursor:W?"default":"pointer"},...u==null?void 0:u.pie}),!W&&S.endAngle-S.startAngle>.25&&r.jsx("text",{x:S.labelX,y:S.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:S.percentage})]},`slice-${v}`)})]})},Kp=({visible:e,x:o,y:t,content:a,maxDistance:n=100,views:l})=>{const s=p.useRef(null),[d,u]=p.useState({left:0,top:0});return p.useEffect(()=>{if(!e||!s.current)return;const m=s.current.getBoundingClientRect(),g=m.width||200,h=m.height||100,f=20,y=16;let x=o-g/2,b=t-h-f;b<y&&(b=t+f),x+g>window.innerWidth-y?x=window.innerWidth-g-y:x<y&&(x=y),b=Math.max(y,Math.min(b,window.innerHeight-h-y)),u({left:x,top:b})},[e,o,t]),e?r.jsx(i.View,{ref:s,position:"fixed",left:`${d.left}px`,top:`${d.top}px`,...nr,...l==null?void 0:l.tooltip,style:{...nr==null?void 0:nr.style,pointerEvents:"none",transition:"all 0.1s ease-out"},children:a}):null},Jp=({type:e,data:o,dataPoints:t,title:a,showLegend:n=!0,legendPosition:l="bottom",showGrid:s=!0,showTooltips:d=!0,animated:u=!0,animationDuration:c=500,responsive:m=!0,aspectRatio:g=16/9,width:h=200,height:f=200,views:y,onDataPointClick:x,onSeriesClick:b,isLoading:k=!1,error:j,noData:w,loadingIndicator:C,errorIndicator:S,noDataIndicator:v,"aria-label":I,themeMode:F,...W})=>{const{animationProgress:E,tooltip:T,containerRef:A,processedData:P,showTooltip:z,hideTooltip:R,getChartDimensions:H,toggleSeries:M}=Up({data:o,dataPoints:t,animated:u,animationDuration:c,showTooltips:d}),D=P(),{width:L,height:V}=H(),O=h||L,_=f||(m?L/g:V),q=()=>{if(!n||!D)return null;let J=[];return e==="pie"||e==="donut"?Array.isArray(D)&&(J=D):D&&D.series&&(J=D.series),!J||J.length===0?null:r.jsx(i.Horizontal,{flexWrap:"wrap",justifyContent:"flex-start",marginTop:l==="bottom"?"16px":0,marginBottom:l==="top"?"16px":0,...Vp,...y==null?void 0:y.legend,children:J.map((oe,ne)=>{const re=oe.hidden,G=oe.name||oe.label;return r.jsxs(i.View,{...Ep,onClick:()=>M(G),opacity:re?.4:1,...y==null?void 0:y.legendItem,children:[r.jsx(i.View,{backgroundColor:oe.color,...Dp,opacity:re?.3:1}),r.jsx(i.Text,{...$p,textDecoration:re?"line-through":"none",children:G})]},`legend-${ne}`)})})},B=()=>{if(!D)return null;switch(e){case"bar":return r.jsx(Gp,{data:D,width:O,height:_,animationProgress:E,showGrid:s,onBarClick:b,showTooltip:z,hideTooltip:R,views:y});case"line":case"area":return r.jsx(Yp,{data:D,width:O,height:_,animationProgress:E,showGrid:s,onPointClick:b,showTooltip:z,hideTooltip:R,views:y});case"pie":case"donut":return r.jsx(Xp,{dataPoints:D,width:O,height:_,animationProgress:E,isDonut:e==="donut",onSliceClick:x,showTooltip:z,hideTooltip:R,views:y});default:return null}},X=()=>k?r.jsx(i.View,{...Op,...y==null?void 0:y.loadingOverlay,children:C||r.jsx(i.Center,{children:r.jsx(To,{size:"lg"})})}):null,$=()=>j?r.jsx(i.View,{...Np,...y==null?void 0:y.errorOverlay,children:S||r.jsx(i.Text,{fontWeight:"medium",children:typeof j=="string"?j:"An error occurred"})}):null,U=()=>w?r.jsx(i.View,{...qp,...y==null?void 0:y.noDataOverlay,children:v||r.jsx(i.Text,{children:typeof w=="string"?w:"No data available"})}):null,K=I??(typeof a=="string"?a:"Chart"),ee=!j&&!k&&!w;return r.jsxs(i.View,{ref:A,role:"region","aria-label":K,"aria-busy":k,...Pp,...y==null?void 0:y.container,...W,children:[a&&r.jsx(i.Text,{...Ap,children:a}),ee&&l==="top"&&q(),r.jsxs(i.View,{flex:1,width:"100%",position:"relative",...y==null?void 0:y.chart,children:[ee&&B(),X(),$(),U(),r.jsx(Kp,{visible:d&&T.visible,x:T.x,y:T.y,content:T.content,maxDistance:100,views:y})]}),ee&&l==="bottom"&&q()]})},Qp=e=>r.jsx(Jp,{...e}),Zp=Qp,em=(e=365)=>{const[o,t]=p.useState(!1),[a,n]=p.useState(null),l="app-studio-cookie-consent";p.useEffect(()=>{const c=localStorage.getItem(l);n(c!==null?c==="true":!1)},[]);const s=c=>{localStorage.setItem(l,String(c));const m=new Date;m.setDate(m.getDate()+e),localStorage.setItem(`${l}-expires`,m.toISOString()),n(c)};return{isHovered:o,setIsHovered:t,hasConsent:a,acceptCookies:()=>{s(!0)},resetConsent:()=>{localStorage.removeItem(l),localStorage.removeItem(`${l}-expires`),n(!1)}}},om=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-lightBlue-50",borderColor:"color-lightBlue-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-lightBlue-700"},acceptButton:{backgroundColor:"color-lightBlue-500",color:"color-white",hoverBackgroundColor:"color-lightBlue-600"},customizeButton:{backgroundColor:"transparent",color:"color-lightBlue-700",borderColor:"color-lightBlue-300",hoverBackgroundColor:"color-lightBlue-100"}}}),rm=({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:a="Personnaliser",position:n="bottom",variant:l="default",onAccept:s,onCustomize:d,views:u,showCustomizeButton:c=!0,cookieExpiration:m=365,themeMode:g,...h})=>{const{themeMode:f}=i.useTheme(),{hasConsent:y,acceptCookies:x}=em(m),k=om()[l];if(y)return null;const j=()=>{x(),s&&s()},w=()=>{d&&d()};return r.jsx(i.View,{style:{position:"fixed",left:16,right:16,zIndex:1e3,...n==="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",...k.container,...u==null?void 0:u.container,...h,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",...u==null?void 0:u.title,children:e}),o&&r.jsx(i.Text,{fontSize:14,color:"color-black",...u==null?void 0:u.description,children:o}),r.jsxs(i.Horizontal,{gap:12,justifyContent:"flex-end",marginTop:8,...u==null?void 0:u.buttonGroup,children:[c&&r.jsx(le,{variant:"outline",onClick:w,size:"sm",...u==null?void 0:u.customizeButton,children:a}),r.jsx(le,{variant:"primary",onClick:j,size:"sm",...u==null?void 0:u.acceptButton,children:t})]})]})})},tm=e=>r.jsx(rm,{...e}),am=tm,nm=e=>{const{size:o,variant:t,onOpenChange:a}=e||{},[n,l]=p.useState(!1),[s,d]=p.useState({x:0,y:0}),[u,c]=p.useState(null),m=p.useRef(null),g=p.useRef(null),h=p.useMemo(()=>Ft("contextmenu-content"),[]),f=p.useCallback(x=>{d({x:x.clientX,y:x.clientY}),l(!0),a==null||a(!0)},[a]),y=p.useCallback(()=>{l(!1),c(null),a==null||a(!1)},[a]);return p.useEffect(()=>{const x=j=>{g.current&&!g.current.contains(j.target)&&y()},b=()=>{n&&y()},k=j=>{j.key==="Escape"&&n&&y()};return document.addEventListener("mousedown",x),window.addEventListener("resize",b),document.addEventListener("keydown",k),()=>{document.removeEventListener("mousedown",x),window.removeEventListener("resize",b),document.removeEventListener("keydown",k)}},[n,y]),{isOpen:n,setIsOpen:l,position:s,setPosition:d,activeSubmenuId:u,setActiveSubmenuId:c,size:o,variant:t,triggerRef:m,contentRef:g,contentId:h,openMenu:f,closeMenu:y}},ba={sm:{padding:"6px 8px",fontSize:"14px",minWidth:"160px"},md:{padding:"8px 12px",fontSize:"16px",minWidth:"180px"},lg:{padding:"10px 16px",fontSize:"18px",minWidth:"200px"}},lm={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"}},ka={hover:{backgroundColor:"color-gray-100"}},Gn=p.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:()=>{}}),im=({children:e,value:o})=>r.jsx(Gn.Provider,{value:o,children:e}),vr=()=>{const e=p.useContext(Gn);if(!e)throw new Error("useContextMenuContext must be used within a ContextMenuProvider");return e},Yn=({children:e,disableNativeContextMenu:o=!0,asChild:t=!1,isDisabled:a=!1,views:n,...l})=>{const{triggerRef:s,contentId:d,openMenu:u}=vr(),m={ref:s,onContextMenu:g=>{if(!a)if(o&&g.preventDefault(),u)u(g);else{const{setIsOpen:h,setPosition:f}=vr();f({x:g.clientX,y:g.clientY}),h(!0)}},"aria-controls":d,"aria-haspopup":"menu","data-disabled":a?"":void 0,...t&&p.isValidElement(e)&&e.props.isDisabled===void 0&&{isDisabled:a},...n==null?void 0:n.container,...l};if(t&&p.isValidElement(e)){const g=p.Children.only(e);return p.cloneElement(g,{...m,...g.props})}return r.jsx(i.View,{...m,children:e})},Yt=({items:e,children:o,position:t,side:a="right",align:n="start",views:l,style:s,...d})=>{const{isOpen:u,position:c,contentRef:m,contentId:g,variant:h}=vr(),f=p.useRef(null),y=m||f,{ref:x,relation:b}=i.useElementPosition({}),[k,j]=p.useState({x:0,y:0});if(p.useEffect(()=>{if(u&&y.current){const C=t||c,S=y.current.offsetWidth,v=y.current.offsetHeight,I=window.innerWidth,F=window.innerHeight;let W=C.x,E=C.y;b&&(b.space.horizontal==="left"?W=C.x-S:W=C.x,b.space.vertical==="top"?E=C.y-v:E=C.y),W+S>I&&(W=I-S-8),W<8&&(W=8),E+v>F&&(E=F-v-8),E<8&&(E=8),j({x:W,y:E})}},[u,c,t,a,n,y,b]),!u)return null;const w={position:"fixed",top:`${k.y}px`,left:`${k.x}px`,zIndex:1e3,transformOrigin:"top left"};return r.jsxs(i.View,{id:g||"context-menu",ref:y,role:"menu",tabIndex:-1,borderRadius:4,boxShadow:"0px 2px 8px rgba(0, 0, 0, 0.15)",overflow:"hidden",style:{...w,...s},...lm[h],...l==null?void 0:l.menu,...l==null?void 0:l.content,...d,children:[e&&e.map((C,S)=>C.divider?r.jsx(Kn,{views:l},`divider-${S}`):r.jsx(Xn,{item:C,views:l},C.id)),o]})},Xn=({item:e,children:o,onSelect:t,isDisabled:a=!1,views:n,variant:l,shape:s,isLoading:d,loaderProps:u,loaderPosition:c,icon:m,iconPosition:g,isFilled:h,isAuto:f,isIconRounded:y,isHovered:x,shadow:b,ariaLabel:k,animation:j,textColor:w,reversed:C,borderMovingDuration:S,borderMovingGradientColors:v,animatedStrokeAccentColor:I,animatedStrokeTextColor:F,to:W,isExternal:E,config:T,...A})=>{const{activeSubmenuId:P,setActiveSubmenuId:z,size:R,closeMenu:H}=vr();if(e){const[D,L]=p.useState(!1),V=e.items&&e.items.length>0,O=P===e.id,[_,q]=p.useState({x:0,y:0}),B=e.disabled||a,X=()=>{L(!0),V&&z(e.id)},$=()=>{L(!1)},U=()=>{B||!V&&e.onClick&&(e.onClick(),H&&H())},{ref:K,relation:ee}=i.useElementPosition({});return p.useEffect(()=>{if(O&&K.current){const J=K.current.getBoundingClientRect(),oe=window.innerWidth,ne=200;let re=!1;if(ee)re=ee.space.horizontal==="left";else{const G=oe-J.right,Q=J.left;re=G<ne&&Q>G}q({x:re?J.left-ne:J.right,y:J.top})}},[O,e.items,ee]),r.jsxs(i.View,{ref:K,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,...ba[R],_hover:B?{}:ka.hover,backgroundColor:D&&!B?"color-gray-100":"transparent",onMouseEnter:X,onMouseLeave:$,onClick:U,...n==null?void 0:n.item,...A,children:[e.icon&&r.jsx(i.View,{marginRight:8,...n==null?void 0:n.icon,children:e.icon}),r.jsx(i.View,{flexGrow:1,children:e.label}),V&&r.jsx(i.View,{marginLeft:8,...n==null?void 0:n.submenuIndicator,children:r.jsx(se,{orientation:"right",widthHeight:16,color:"currentColor",filled:!0})}),O&&V&&r.jsx(Yt,{items:e.items||[],position:_,side:"right",align:"start",views:n})]})}const M=D=>{a||(t==null||t(D),H&&H())};return r.jsx(i.View,{role:"menuitem",onClick:M,cursor:a?"not-allowed":"pointer",opacity:a?.5:1,"aria-disabled":a,"data-disabled":a?"":void 0,...ba[R],_hover:a?{}:ka.hover,...n==null?void 0:n.item,...A,children:o})},Kn=({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}),sm=({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}),cm=({children:e,items:o,size:t="md",variant:a="default",disableNativeContextMenu:n=!0,views:l,themeMode:s,onOpenChange:d,...u})=>!o||o.length===0?r.jsx(r.Fragment,{children:e}):r.jsxs(r.Fragment,{children:[r.jsx(Yn,{disableNativeContextMenu:n,views:l,...u,children:e}),r.jsx(Yt,{items:o,views:l})]}),dm=({children:e,items:o,size:t="md",variant:a="default",disableNativeContextMenu:n=!0,onOpenChange:l,views:s,...d})=>{const u=nm({size:t,variant:a,onOpenChange:l}),{isOpen:c,setIsOpen:m,position:g,setPosition:h,activeSubmenuId:f,setActiveSubmenuId:y,triggerRef:x,contentRef:b,contentId:k,openMenu:j,closeMenu:w}=u;return r.jsx(im,{value:{isOpen:c,setIsOpen:m,position:g,setPosition:h,activeSubmenuId:f,setActiveSubmenuId:y,size:t,variant:a,triggerRef:x,contentRef:b,contentId:k,openMenu:j,closeMenu:w,styles:s},children:r.jsx(cm,{items:o,size:t,variant:a,disableNativeContextMenu:n,views:s,...d,children:e})})},Mo=dm;Mo.Trigger=Yn;Mo.Content=Yt;Mo.Item=Xn;Mo.Divider=Kn;Mo.Separator=sm;const um=({src:e,color:o,views:t,themeMode:a,...n})=>{const{getColor:l,themeMode:s}=i.useTheme(),d=o?{fill:l(o,{themeMode:s}),stroke:l(o,{themeMode:s})}:{};return r.jsx(i.View,{display:"flex",alignItems:"center",justifyContent:"center",...n,...t==null?void 0:t.container,children:r.jsx(i.Image,{...d,content:'url("'+e+'")',width:"100%",height:"100%",...t==null?void 0:t.image})})},pm=({path:e,...o})=>r.jsx(i.Image,{src:e,...o}),Jn=({placeholder:e,isMulti:o,options:t,id:a=`select-${Math.random().toString(36).substr(2,9)}`})=>{const n=e?o?[]:"":Array.isArray(t)&&t.length>0?t[0].value:o?[]:"",[l,s]=p.useState(!1),[d,u]=p.useState(!1),[c,m]=p.useState(n),[g,h]=p.useState(0),[f,y]=p.useState(!0);return{id:a,value:c,setValue:m,hide:f,setHide:y,isHovered:l,setIsHovered:s,isFocused:d,setIsFocused:u,highlightedIndex:g,setHighlightedIndex:h}},Qn=({children:e,containerId:o="portal-root"})=>{const[t,a]=p.useState(null);return p.useEffect(()=>{let n=document.getElementById(o),l=!1;return n||(l=!0,n=document.createElement("div"),n.setAttribute("id",o),document.body.appendChild(n)),a(n),()=>{l&&n&&n.parentNode&&n.childNodes.length===0&&n.parentNode.removeChild(n)}},[o]),t?ys.createPortal(e,t):null},ht=({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}),Ne=p.forwardRef(({children:e,helperText:o,error:t=!1,views:a,...n},l)=>r.jsxs(i.Vertical,{ref:l,gap:4,position:"relative",width:"100%",marginVertical:0,...n,...a==null?void 0:a.container,children:[e,!t&&o&&r.jsx(ht,{marginTop:0,...a==null?void 0:a.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",...a==null?void 0:a.error,children:t})]}));Ne.displayName="FieldContainer";const mm={default:{borderRadius:"8px"},square:{borderRadius:0},rounded:{borderRadius:"8px"},pill:{borderRadius:"9999px"}},gm={xs:"10px",sm:"11px",md:"11px",lg:"12px",xl:"12px"},hm={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"}},fm={paddingTop:"10px",paddingBottom:"10px",paddingLeft:"12px",paddingRight:"12px",media:{mobile:{paddingTop:"10px",paddingBottom:"10px",paddingLeft:"12px",paddingRight:"12px"}}},ym={paddingTop:"10px",paddingBottom:"10px",paddingLeft:"12px",paddingRight:"12px",media:{mobile:{paddingTop:"10px",paddingBottom:"10px",paddingLeft:"12px",paddingRight:"12px"}}},Je=({label:e,shadow:o,children:t,value:a,size:n="md",shape:l="default",variant:s="default",error:d=!1,showLabel:u=!1,isFocused:c=!1,isHovered:m=!1,isDisabled:g=!1,isReadOnly:h=!1,views:f={pickerBox:{}},...y})=>{const{themeMode:x}=i.useTheme(),b=x==="dark",j=d?"color-red-500":(m||c)&&!g?"theme-primary":"color-gray-200";return r.jsx(i.Horizontal,{gap:8,width:"100%",display:"flex",flexWrap:"nowrap",alignItems:"center",justifyContent:"flex-start",borderStyle:"solid",borderColor:j,backgroundColor:b?"color-gray-900":"color-white",fontSize:i.Typography.fontSizes[n],cursor:g?"not-allowed":h?"auto":"text",opacity:g?.7:1,transition:"border-color 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease",...u?fm:ym,...typeof o=="object"&&o!==null?o:{},...mm[l],...hm[s],...f==null?void 0:f.container,...y,children:t})},Xt=({children:e,...o})=>r.jsx(i.Horizontal,{gap:10,right:10,zIndex:500,flexWrap:"nowrap",alignItems:"center",justifyContent:"flex-end",...o,children:e}),xm={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}},bm=({children:e,heading:o,isItalic:t=!1,isUnderlined:a=!1,isStriked:n=!1,weight:l="normal",size:s="sm",dropDown:d,error:u,isDisabled:c,helperText:m,views:g,...h})=>{const f=o?xm[o]:{};return r.jsx(i.Element,{as:"label",width:"100%",fontSize:s,fontStyle:t?"italic":"normal",fontWeight:i.Typography.fontWeights[l],textDecoration:n?"line-through":a?"underline":"none",...f,...h,children:e})},km=e=>r.jsx(bm,{...e}),Jo=km,no=({children:e,size:o="md",error:t=!1,color:a="theme-primary",views:n={label:{}},helperText:l,...s})=>r.jsx(Jo,{position:"static",fontSize:gm[o],letterSpacing:"-0.01em",whiteSpace:"nowrap",fontWeight:500,opacity:t?1:.72,color:t?"color-red-500":"inherit",transition:"color 0.2s ease",...n.label,...s,children:e}),Wo=({children:e,...o})=>r.jsx(i.Vertical,{display:"flex",flexDirection:"column",gap:4,flex:1,width:"100%",maxWidth:"100%",...o,children:e}),Zn={xs:12,sm:14,md:16,lg:18,xl:20},Cm={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)"},Sm={enter:{opacity:1,transform:"translateY(0) scale(1)",transition:"all 0.2s ease-in-out"}},jm={padding:"10px 12px",cursor:"pointer",borderRadius:8,margin:"2px 4px",transition:"all 0.15s ease-in-out"},ir={default:{},highlighted:{backgroundColor:"color-gray-100"},selected:{backgroundColor:"color-gray-100"},selectedHighlighted:{backgroundColor:"color-gray-200"}},Ca={open:{transform:"rotate(180deg)",transition:"all 0.2s ease-in-out"},closed:{transform:"rotate(0deg)",transition:"all 0.2s ease-in-out"}},wm={padding:"4px 8px",borderRadius:8,backgroundColor:"color-gray-100",fontSize:"12px",fontWeight:"500",color:"color-gray-700",transition:"all 0.15s ease-in-out"},vm={scrollbarWidth:"thin",scrollbarColor:"rgba(0, 0, 0, 0.15) transparent"},Tm=e=>{if(!e)return{};const{container:o,content:t,...a}=e;return a},Ao={xs:{minHeight:24,shellPaddingY:6,shellPaddingX:10},sm:{minHeight:32,shellPaddingY:8,shellPaddingX:10},md:{minHeight:40,shellPaddingY:10,shellPaddingX:12},lg:{minHeight:48,shellPaddingY:12,shellPaddingX:14},xl:{minHeight:56,shellPaddingY:14,shellPaddingX:16}},Im=({isHovered:e,setIsHovered:o=()=>{},option:t,size:a="md",callback:n=()=>{},style:l,isSelected:s=!1,...d})=>{const u=(g,h)=>{g.stopPropagation(),g.preventDefault(),typeof n=="function"&&n(h)},c=()=>o(!e),m=()=>s&&e?ir.selectedHighlighted:s?ir.selected:e?ir.highlighted:ir.default;return r.jsxs(i.Element,{as:"li",display:"flex",alignItems:"center",justifyContent:"space-between",listStyleType:"none",...jm,...m(),onMouseEnter:c,onMouseLeave:c,onClick:g=>u(g,t.value),...d,children:[r.jsx(i.Text,{fontSize:i.Typography.fontSizes[a],fontWeight:s?"500":"400",lineHeight:"14px",color:s?"color-gray-900":"color-gray-700",...l,children:t.label}),s&&r.jsx(i.Element,{as:"span",color:"theme-primary",fontSize:"14px",marginLeft:8,display:"flex",alignItems:"center",children:"✓"})]})},Fm=({size:e="md",views:o={field:{},text:{}},value:t,isDisabled:a,placeholder:n,removeOption:l=()=>{},options:s})=>{const d=(o==null?void 0:o.field)||{},u=(o==null?void 0:o.text)||{},c={margin:0,width:"95%",height:"100%",border:"none",paddingVertical:4,paddingHorizontal:0,fontSize:i.Typography.fontSizes[e],fontWeight:"400",lineHeight:"20px",letterSpacing:"-0.01em",color:a?"color-gray-400":"color-gray-900",cursor:a?"not-allowed":"pointer",transition:"all 0.2s ease-in-out",...d,...u,style:{backgroundColor:"transparent",...d.style,...u.style}},m=s.length>0&&s.find(g=>g.value===t);return r.jsx(i.Text,{...c,children:(t===""||Array.isArray(t)&&t.length===0)&&n?n:r.jsx(r.Fragment,{children:typeof t=="string"?(m&&m.label)??t:Array.isArray(t)&&t.length>0?r.jsx(i.Horizontal,{gap:6,children:t.map(g=>r.jsx(Mm,{option:g,removeOption:l},g))}):r.jsx("span",{children:t})})})},Rm=({id:e,name:o,value:t,onChange:a,isMulti:n=!1,isDisabled:l=!1,isReadOnly:s=!1,options:d=[],...u})=>{const c=m=>{a&&a(m)};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:s,onChange:c,multiple:n,...u,children:d.length>0&&d.map(m=>r.jsx("option",{value:m.value,children:m.label},m.value))})},zm=({size:e,views:o={},options:t,callback:a=()=>{},highlightedIndex:n,setHighlightedIndex:l=()=>{},selectedValue:s})=>{const d=c=>a(c),u=c=>Array.isArray(s)?s.includes(c):s===c;return r.jsx(i.Element,{as:"ul",role:"listbox",display:"flex",flexDirection:"column",margin:0,padding:"4px",...Cm,style:vm,...o==null?void 0:o.dropDown,children:t&&t.length>0&&t.map((c,m)=>r.jsx(Im,{size:e,style:o.text,option:c,callback:d,isSelected:u(c.value),isHovered:m===n,setIsHovered:()=>{},onMouseEnter:()=>l(m)},c.value))})},Mm=({option:e,size:o="md",removeOption:t=()=>{},...a})=>{const n=()=>t(e);return r.jsxs(i.Horizontal,{gap:6,alignItems:"center",onClick:l=>l.stopPropagation(),...wm,_hover:{backgroundColor:"color-gray-200"},...a,children:[r.jsx(i.Text,{fontSize:i.Typography.fontSizes[o],fontWeight:"500",color:"color-gray-700",children:e}),r.jsx(Te,{role:"close-button",color:"color-gray-500",widthHeight:Zn[o],onClick:n,cursor:"pointer",transition:"all 0.2s ease-in-out",_hover:{color:"color-gray-700"}})]})},el=({id:e,name:o,label:t,value:a,placeholder:n,helperText:l,hide:s=!1,error:d=!1,isMulti:u=!1,isFocused:c=!1,isHovered:m=!1,isDisabled:g=!1,isReadOnly:h=!1,options:f=[],shadow:y={},size:x="md",shape:b="default",variant:k="default",views:j={text:{},icon:{},dropDown:{},selectBox:{},label:{},helperText:{}},onChange:w=()=>{},setHide:C=()=>{},setValue:S=()=>{},setIsHovered:v=()=>{},setIsFocused:I=()=>{},setHighlightedIndex:F,highlightedIndex:W,isScrollable:E,...T})=>{const{ref:A,relation:P,updateRelation:z}=i.useElementPosition({trackChanges:!0,trackOnScroll:!0,trackOnResize:!0,throttleMs:10}),R=p.useRef(null),H=()=>{var U;if(!A.current)return{};const B=A.current.getBoundingClientRect(),X={position:"fixed",left:B.left,width:B.width,zIndex:1e4};return((U=P==null?void 0:P.space)==null?void 0:U.vertical)==="top"?{...X,bottom:window.innerHeight-B.top+8}:{...X,top:B.bottom+8}};p.useEffect(()=>{const B=()=>C(!0);return document.addEventListener("closeAllSelects",B),()=>document.removeEventListener("closeAllSelects",B)},[C]),p.useEffect(()=>{const B=X=>{!X.target.closest(`#${e}`)&&!s&&C(!0)};return document.addEventListener("click",B),()=>{document.removeEventListener("click",B)}},[e,s,C]);const M=()=>v(!m),D=()=>I(!0),L=B=>{document.dispatchEvent(new Event("closeAllSelects")),B&&B.stopPropagation&&B.stopPropagation();const X=!s;C(X),I(!X)},V=p.useCallback(B=>{if(C(!0),document.dispatchEvent(new Event("closeAllSelects")),u&&Array.isArray(a)){if(!a.includes(B)){const X=[...a,B];S(X),w&&w(B)}}else S(B),w&&w(B);I(!0)},[u,a,C,S,w,I]),O=B=>{if(Array.isArray(a)&&a.includes(B)){const X=a.filter($=>$!==B);S(X.length===0?[]:X)}},_=!!t,q=Tm(j);return r.jsx(Ne,{ref:A,position:"relative",width:"100%",display:"inline-block",id:e,role:"SelectBox",helperText:l,error:d,views:q,onClick:B=>{B.stopPropagation(),g||h||L(B)},children:r.jsxs(Je,{label:t,size:x,error:d,shape:b,views:j,shadow:y,variant:k,value:a,color:"theme-primary",isHovered:m,isDisabled:g,isReadOnly:h,isFocused:c,showLabel:_,minHeight:`${Ao[x].minHeight}px`,paddingTop:Ao[x].shellPaddingY,paddingBottom:Ao[x].shellPaddingY,paddingLeft:Ao[x].shellPaddingX,paddingRight:Ao[x].shellPaddingX,onMouseEnter:M,onMouseLeave:M,position:"relative",...j==null?void 0:j.content,children:[r.jsxs(Wo,{children:[_&&r.jsx(no,{htmlFor:e,color:"theme-primary",error:d,...j==null?void 0:j.label,children:t}),r.jsx(Rm,{id:e,name:o,options:f,onChange:w,value:a,isDisabled:g,isReadOnly:h,isMulti:u,onFocus:D,...T}),r.jsx(Fm,{options:f,size:x,views:j,value:a,isDisabled:g,placeholder:n,removeOption:O})]}),r.jsx(Xt,{children:!h&&!g&&r.jsx(i.Element,{display:"flex",alignItems:"center",justifyContent:"center",style:s?Ca.closed:Ca.open,children:r.jsx(se,{color:"inherit",widthHeight:Zn[x],style:j.icon,orientation:"down"})})}),!s&&f.length>0&&r.jsx(Qn,{children:r.jsx(i.Element,{ref:R,onClick:B=>B.stopPropagation(),style:{...H(),...Sm.enter},children:r.jsx(zm,{size:x,views:j,options:f,callback:V,highlightedIndex:W,setHighlightedIndex:F,selectedValue:a})})})]})})},Wm=e=>{const o=me("select",e),t={...o,options:o.options||[]},a=Jn(t);return r.jsx(el,{...a,...t,onClick:n=>{n.stopPropagation(),o.onClick&&o.onClick(n)}})},Yo=Wm,ol=({isDisabled:e,isChecked:o})=>{const[t,a]=p.useState(!1),[n,l]=p.useState(o||!1),[s,d]=p.useState(o||!1);return p.useEffect(()=>{o!==void 0&&(l(o),d(o))},[o]),{isHovered:t,setIsHovered:a,on:n,setOn:l,value:s,setValue:d}},Sa={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"}},Hm={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"}},Pm={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"}},Am={xs:"9px",sm:"10px",md:"11px",lg:"12px",xl:"13px"},sr={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}},Ze={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}}},ja={slider:{transition:"all 0.2s ease-in-out"},knob:{transition:"all 0.2s ease-in-out"}},Vm=e=>r.jsx(i.Input,{type:"checkbox",...e}),rl=({id:e,name:o,label:t,inActiveChild:a,isChecked:n,activeChild:l,labelPosition:s="right",shadow:d={},size:u="sm",value:c=!1,isHovered:m=!1,isDisabled:g=!1,isReadOnly:h=!1,on:f,setOn:y=()=>{},onChange:x,setValue:b=()=>{},setIsHovered:k=()=>{},helperText:j,views:w={slider:{},circle:{},label:{}},...C})=>{const S=typeof n=="boolean"?n:c,I=!!(l||a)?Pm[u]:Hm[u],F=`${sr[u].paddingHorizontal}px`,W=`${sr[u].paddingHorizontal+2}px`,E=`calc(${Sa[u].width} + ${sr[u].paddingHorizontal}px + 4px)`,T=Am[u],A=H=>{if(!h&&!g){const M=H.target.checked;b(M),y(M),x&&x(M)}},P=()=>k(!0),z=()=>k(!1),R={container:{gap:12,display:"flex",height:"fit-content",width:"fit-content",alignItems:"center",cursor:g?"not-allowed":h?"default":"pointer",opacity:g?.6:1,transition:"all 0.2s ease-in-out",...w.label}};return r.jsxs(Jo,{htmlFor:e,onMouseEnter:P,onMouseLeave:z,...R.container,...C,children:[r.jsx(Vm,{id:e,name:o,opacity:0,width:0,height:0,checked:S,onChange:A,disabled:g,readOnly:h,...C}),s==="left"&&t&&r.jsx(i.Text,{fontWeight:"500",color:g?"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:g?Ze.default.disabled:S?m?Ze.states.hover.active:Ze.default.active:m?Ze.states.hover.inactive:Ze.default.inactive,opacity:!g&&S&&m?Ze.states.hover.activeOpacity:1,cursor:"pointer",...ja.slider,...d,...sr[u],...I,...w.slider,children:[l&&S&&r.jsx(i.View,{marginLeft:W,marginRight:E,transition:"all 0.2s ease-in-out",display:"flex",alignItems:"center",justifyContent:"center",height:"100%",width:"100%",overflow:"hidden",fontSize:T,lineHeight:1,color:"color-white",fontWeight:600,children:l}),r.jsx(i.View,{position:"absolute",top:"50%",left:S?void 0:F,right:S?F:void 0,borderRadius:"50%",backgroundColor:Ze.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)"}`,...ja.knob,zIndex:1,...Sa[u],...w.circle}),a&&!S&&r.jsx(i.View,{marginLeft:E,marginRight:W,transition:"all 0.2s ease-in-out",display:"flex",alignItems:"center",justifyContent:"center",height:"100%",width:"100%",overflow:"hidden",fontSize:T,lineHeight:1,color:"color-white",fontWeight:600,children:a})]}),s==="right"&&t&&r.jsx(i.Text,{fontWeight:"500",color:g?"color-gray-400":"inherit",transition:"all 0.2s ease-in-out",children:t})]})},Em=e=>{const o=me("switch",e),t=ol(o);return r.jsx(rl,{...t,...o})},Kt=Em,tl=({placeholder:e,isMulti:o,options:t,id:a=`selector-${Math.random().toString(36).substr(2,9)}`})=>{const n=e?o?[]:"":Array.isArray(t)&&t.length>0?t[0].value:o?[]:"",[l,s]=p.useState(!1),[d,u]=p.useState(!1),[c,m]=p.useState(n),[g,h]=p.useState(0),[f,y]=p.useState(!0);return{id:a,value:c,setValue:m,hide:f,setHide:y,isHovered:l,setIsHovered:s,isFocused:d,setIsFocused:u,highlightedIndex:g,setHighlightedIndex:h}},al=({id:e,name:o,label:t,value:a,views:n={},options:l=[],onChange:s=()=>{},setValue:d=()=>{}})=>{const u=p.useCallback(c=>{d(c.value),s&&s(c.value)},[d,s]);return r.jsxs(Ne,{id:e,width:"100%",views:n,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(Ge,{widthHeight:14})," ",r.jsx(i.Text,{children:t})]}),r.jsx(i.Horizontal,{gap:0,children:l.map((c,m,g)=>{const h=a===c.value,f=c.color??"theme-primary",y=h?f:"color-gray-200",x=h?f:"color-gray-500",b=m===0,k=m===g.length-1,j=k||h;return r.jsx(i.View,{as:"button",type:"button",onClick:()=>u(c),flex:1,paddingVertical:6,paddingHorizontal:12,fontSize:"12px",fontWeight:h?"bold":"normal",cursor:"pointer",backgroundColor:"transparent",color:x,borderStyle:"solid",borderColor:y,borderTopWidth:1,borderBottomWidth:1,borderLeftWidth:1,borderRightWidth:j?1:0,borderRadius:b?"6px 0 0 6px":k?"0 6px 6px 0":"0",zIndex:h?1:0,transition:"color 0.15s ease, border-color 0.15s ease, background-color 0.15s ease",...n.item,children:c.label},c.value)})}),r.jsx("input",{type:"hidden",id:e,name:o,value:Array.isArray(a)?a.join(","):a,onChange:()=>{}})]})},Dm=e=>{const o={...e,options:e.options||[]},t=tl(o);return r.jsx(al,{...t,...o,onClick:a=>{a.stopPropagation(),e.onClick&&e.onClick(a)}})},$m=Dm,nl=({label:e,placeholder:o,value:t})=>{const[a,n]=p.useState(e??o),[l,s]=p.useState(!1),[d,u]=p.useState(t||""),[c,m]=p.useState(!1);return p.useMemo(()=>{n(c&&!d?o??"":e??o)},[d,c,e,o]),{hint:a,setHint:n,isHovered:l,setIsHovered:s,value:d,setValue:u,isFocused:c,setIsFocused:m}},Lm=e=>{if(!e)return{};const{container:o,content:t,...a}=e;return a},_m=(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"},ll=({id:e,name:o,hint:t,error:a,value:n,label:l,shadow:s,helperText:d,placeholder:u,size:c="sm",shape:m="default",variant:g="default",isHovered:h=!1,isFocused:f=!1,isEditable:y=!1,isReadOnly:x=!1,isDisabled:b=!1,isAutoFocus:k=!1,isMultiline:j=!1,maxRows:w=3,maxCols:C=30,onBlur:S=()=>{},onChange:v,onFocus:I,setHint:F=()=>{},setValue:W=()=>{},setIsFocused:E=()=>{},setIsHovered:T=()=>{},onChangeText:A,onSubmit:P,isWorkerRunning:z,views:R={label:{},helperText:{}},...H})=>{const M=!!l,D={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"}},L=(R==null?void 0:R.field)||{},V=(R==null?void 0:R.container)||{},O=_m(V.borderRadius,m),_={...R,container:{...V,...O!==void 0?{borderRadius:O}:{},overflow:"hidden"}},q=Lm(R),B={margin:0,paddingVertical:0,paddingHorizontal:0,width:"100%",minHeight:D[c].minHeight,maxHeight:"calc(100vh - 100px)",border:"none",on:{focus:{outline:"none"}},fontSize:D[c].fontSize,letterSpacing:"-0.01em",fontWeight:400,color:b?"color-gray-400":"color-gray-900",cursor:b?"not-allowed":"text",opacity:b?.7:1,transition:"color 0.2s ease, opacity 0.2s ease",...L,style:{backgroundColor:"transparent",...L.style}},X=()=>{E(!0),I&&I()},$=K=>{S(K),E(!1)},U=K=>{typeof K=="string"?(W(K),v&&v(K)):(W(K.target.value),v&&v(K.target.value))};return r.jsx(Ne,{helperText:d,error:a,views:q,children:r.jsx(Je,{label:l,size:c,error:a,shape:m,views:_,shadow:s,variant:g,value:n,color:"theme-primary",isHovered:h,isDisabled:b,isReadOnly:x,isFocused:f,showLabel:M,alignItems:"flex-start",minHeight:D[c].minHeight,paddingTop:D[c].shellPaddingY,paddingBottom:D[c].shellPaddingY,paddingLeft:D[c].shellPaddingX,paddingRight:D[c].shellPaddingX,onMouseEnter:()=>T(!0),onMouseLeave:()=>T(!1),..._==null?void 0:_.content,children:r.jsxs(Wo,{...R==null?void 0:R.warper,children:[M&&r.jsx(no,{htmlFor:e,color:"theme-primary",error:a,...R==null?void 0:R.label,children:l}),r.jsx(i.Element,{as:"textarea",id:e,name:o,rows:w,cols:C,value:n,readOnly:x,disabled:b,autoFocus:k,placeholder:u||t,onBlur:$,onFocus:X,onChange:K=>U(K),...B,...H,style:{resize:b||x?"none":"vertical",...B.style,...H.style||{}},...R==null?void 0:R.textarea})]})})})},Bm=e=>{const o=me("textarea",e),t=nl(o);return r.jsx(ll,{...t,...o})},Jt=Bm,Qt=({label:e,placeholder:o,value:t})=>{const[a,n]=p.useState(e??o),[l,s]=p.useState(!1),[d,u]=p.useState(!1),[c,m]=p.useState(t);return p.useMemo(()=>{n(l&&!c?o??"":e??o)},[c,l,e,o]),{hint:a,setHint:n,isFocused:l,setIsFocused:s,isHovered:d,setIsHovered:u,setValue:m,value:c}},Qo=({id:e,name:o,label:t,hint:a,value:n,onChange:l,left:s,right:d,helperText:u,placeholder:c,onChangeText:m,shadow:g={},views:h={container:{},field:{},label:{},helperText:{},text:{}},size:f="md",shape:y="default",variant:x="default",error:b=!1,isFocused:k=!1,isHovered:j=!1,isDisabled:w=!1,isReadOnly:C=!1,isClearable:S=!0,isAutoFocus:v=!1,setHint:I=()=>{},setIsFocused:F=()=>{},setIsHovered:W=()=>{},setValue:E=()=>{},onClick:T=()=>{},onFocus:A,onBlur:P=()=>{},themeMode:z,...R})=>{const{getColor:H,themeMode:M}=i.useTheme(),D=H(w?"color-gray-400":"color-gray-500",{themeMode:z||M}),L=!!t,V={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"}},O=(h==null?void 0:h.field)||{},_="0 0 0 1000px var(--theme-canvas) inset",q={margin:0,paddingVertical:0,paddingHorizontal:0,width:"100%",minHeight:"auto",border:"none",backgroundColor:"transparent",fontSize:V[f].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:_,WebkitBoxShadow:_,WebkitTextFillColor:"var(--theme-text)",transition:"background-color 5000s ease-in-out 0s"},_webkitContactsAutoFillButton:{visibility:"hidden",pointerEvents:"none",position:"absolute",right:0},...O},B=()=>{F(!0),A&&A()},X=()=>W(!0),$=()=>W(!1),U=re=>{P&&P(re),F(!1)},K=re=>{typeof re=="string"?(E(re),m&&m(re),l&&l(re)):(E(re.target.value),m&&m(re.target.value),l&&l(re.target.value))},ee=()=>{E(""),l&&(P({target:{name:o}}),m&&m(""),l&&l("")),typeof document>"u"&&m&&m("")},{container:J,content:oe,...ne}=h||{};return r.jsx(Ne,{helperText:u,error:b,views:ne,children:r.jsxs(Je,{label:t,size:f,error:b,shape:y,views:h,shadow:g,variant:x,value:n,color:"theme-primary",isHovered:j,isDisabled:w,isReadOnly:C,isFocused:k,showLabel:L,minHeight:`${V[f].minHeight}px`,paddingTop:V[f].shellPaddingY,paddingBottom:V[f].shellPaddingY,paddingLeft:V[f].shellPaddingX,paddingRight:V[f].shellPaddingX,onMouseEnter:X,onMouseLeave:$,children:[s,r.jsxs(Wo,{children:[L&&r.jsx(no,{htmlFor:e,color:"theme-primary",error:b,...h==null?void 0:h.label,children:t}),r.jsx(i.Input,{type:"text",id:e,name:o,readOnly:C,disabled:w,autoFocus:v,placeholder:c||a,onFocus:B,onBlur:U,autoComplete:"off",...q,...R,onChange:K,value:n})]}),S&&n&&!C&&!w&&r.jsx(Xt,{children:r.jsx(Te,{size:20,color:D,onClick:ee,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)"}})}),d]})})},Om=e=>{const o=me("input",e),t=Qt(o);return r.jsx(Qo,{...t,...o})},ve=Om,il=({defaultIsSelected:e=!1})=>{const[o,t]=p.useState(!1),[a,n]=p.useState(e);return{isHovered:o,setIsHovered:t,isSelected:a,setIsSelected:n}},Nm={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"}},wa={xs:10,sm:14,md:16,lg:20,xl:24},qm={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"}},Qr={hover:{selected:{opacity:.9},unselected:{borderColor:"color-gray-400",backgroundColor:"color-gray-50"},indeterminate:{opacity:.9}},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"}}},sl=({id:e,icon:o,name:t,label:a,isChecked:n,onChange:l,onValueChange:s,shadow:d={},labelPosition:u="right",size:c="md",error:m=!1,isSelected:g=!1,isHovered:h=!1,isDisabled:f=!1,isReadOnly:y=!1,isIndeterminate:x=!1,defaultIsSelected:b=!1,setIsSelected:k=()=>{},setIsHovered:j=()=>{},setIsChecked:w,views:C={checkbox:{},label:{}},infoText:S,helperText:v,...I})=>{const F=()=>j(!h),W=()=>{!y&&!f&&(k&&k(!g),l&&l(!n),s&&s(!n))},E=x?"indeterminate":n||g?"selected":"unselected",T=m?Qr.error[E]:f?Qr.disabled[E]:h?Qr.hover[E]:{},A={container:{gap:8,display:"flex",height:"fit-content",flexDirection:"column",width:"fit-content",color:m?"color-red-600":f?"color-gray-400":"inherit",cursor:f?"not-allowed":y?"default":"pointer",opacity:f?.6:1,transition:"all 0.2s ease-in-out",...C.label},checkbox:{...qm[E],...T,borderRadius:6,...Nm[c],transition:"all 0.2s ease-in-out",...d,...C.checkbox}};return r.jsxs(Jo,{htmlFor:e,as:"div",onClick:W,onMouseEnter:F,onMouseLeave:F,size:i.Typography.fontSizes[c],...A.container,...I,children:[r.jsxs(i.Vertical,{gap:8,children:[" ",r.jsxs(i.Horizontal,{gap:12,alignItems:"center",children:[" ",u==="left"&&a&&r.jsx(i.Text,{size:c,fontWeight:"500",...C==null?void 0:C.label,children:a}),r.jsx(i.Center,{...A.checkbox,children:x?r.jsx(Cn,{widthHeight:wa[c],color:"color-white",transition:"opacity 0.2s ease"}):(n||g)&&(o??r.jsx(Pr,{widthHeight:wa[c],color:"color-white",transition:"opacity 0.2s ease"}))}),u==="right"&&a&&r.jsx(i.Text,{size:c,fontWeight:"500",...C==null?void 0:C.label,children:a})]}),S&&r.jsx(i.Text,{marginLeft:u==="left"?0:36,color:"color-gray-500",size:"sm",fontWeight:"400",lineHeight:"20px",...C==null?void 0:C.infoText,children:S})]}),m&&r.jsx(i.Text,{size:"xs",marginTop:4,marginHorizontal:0,color:"color-red-500",fontWeight:"500",transition:"all 0.2s ease-in-out",children:m})]})},Um=e=>{const o=me("checkbox",e),t=il(o);return r.jsx(sl,{...t,...o})},Zt=Um,cl=e=>{const{value:o,defaultValue:t="",onChange:a,onChangeComplete:n,onOpen:l,onClose:s,closeOnSelect:d=!0,maxRecentColors:u=8,showRecentColors:c=!0,isAutoFocus:m=!1}=e,[g,h]=p.useState(!1),[f,y]=p.useState(o??t),[x,b]=p.useState(""),[k,j]=p.useState([]),[w,C]=p.useState(!1),[S,v]=p.useState(!1),I=p.useRef(null),F=p.useRef(null);p.useEffect(()=>{o!==void 0&&y(o)},[o]),p.useEffect(()=>{if(c)try{const H=localStorage.getItem("colorInput-recentColors");H&&j(JSON.parse(H))}catch(H){console.warn("Failed to load recent colors from localStorage:",H)}},[c]),p.useEffect(()=>{m&&I.current&&I.current.focus()},[m]),p.useEffect(()=>{const H=M=>{g&&I.current&&F.current&&!I.current.contains(M.target)&&!F.current.contains(M.target)&&z()};return document.addEventListener("mousedown",H),()=>document.removeEventListener("mousedown",H)},[g]);const W=p.useCallback(H=>{c&&j(M=>{const D=M.filter(V=>V!==H),L=[H,...D].slice(0,u);try{localStorage.setItem("colorInput-recentColors",JSON.stringify(L))}catch(V){console.warn("Failed to save recent colors to localStorage:",V)}return L})},[c,u]),E=p.useCallback(()=>{const H=!g;h(H),H?l==null||l():s==null||s()},[g,l,s]),T=p.useCallback(H=>{y(H),W(H),a==null||a(H),n==null||n(H),d&&(h(!1),s==null||s())},[a,n,d,s,W]),A=p.useCallback(H=>{b(H)},[]),P=p.useCallback(()=>{x&&(T(x),b(""))},[x,T]),z=p.useCallback(()=>{h(!1),s==null||s()},[s]),R=p.useCallback(H=>{y(H),a==null||a(H)},[a]);return{isOpen:g,selectedColor:f,recentColors:k,customColor:x,isFocused:w,isHovered:S,handleToggle:E,handleColorSelect:T,handleCustomColorChange:A,handleCustomColorSubmit:P,handleClose:z,setIsFocused:C,setIsHovered:v,setValue:R,triggerRef:I,dropdownRef:F}},Vo={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"}},Gm={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"}},Ym={default:{borderRadius:8},square:{borderRadius:0},rounded:{borderRadius:8},pill:{borderRadius:9999}},Xm={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"}},Km=[{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"}],dl=({id:e,name:o,label:t,placeholder:a="Select a color",helperText:n,views:l={},size:s="md",shape:d="default",variant:u="default",shadow:c,error:m=!1,isDisabled:g=!1,isReadOnly:h=!1,isFocused:f=!1,isHovered:y=!1,predefinedColors:x=Km,showCustomInput:b=!0,showRecentColors:k=!0,isOpen:j=!1,selectedColor:w="",recentColors:C=[],customColor:S="",handleToggle:v=()=>{},handleColorSelect:I=()=>{},handleCustomColorChange:F=()=>{},handleCustomColorSubmit:W=()=>{},handleClose:E,setIsFocused:T=()=>{},setIsHovered:A=()=>{},setValue:P,triggerRef:z,dropdownRef:R,onChange:H,onChangeComplete:M,onOpen:D,onClose:L,colorFormat:V,maxRecentColors:O,closeOnSelect:_,value:q,defaultValue:B,...X})=>{const{getColor:$}=i.useTheme(),U={...Vo.container,...l==null?void 0:l.container},K={...Vo.trigger,...Gm[s],...Ym[d],...Xm[u],...m&&{borderColor:"color-red-500"},...g&&{opacity:.6,cursor:"not-allowed"},...f&&{borderColor:"theme-primary",boxShadow:"0 0 0 2px rgba(255, 255, 255, 1), 0 0 0 4px rgba(29, 78, 216, 0.16)"},...y&&!g&&{borderColor:"color-gray-400"},...l==null?void 0:l.trigger,...c&&c},ee={...Vo.dropdown,...l==null?void 0:l.dropdown},J={...Vo.colorGrid,...l==null?void 0:l.colorGrid},oe={...Vo.recentColors,...l==null?void 0:l.recentColors},ne=w||"color-gray-200";return r.jsxs(i.View,{...U,...X,children:[t&&r.jsx(Jo,{htmlFor:e,size:s,isDisabled:g,error:m,views:l==null?void 0:l.label,children:t}),r.jsxs(i.View,{ref:z,onClick:g||h?void 0:v,onMouseEnter:()=>A(!0),onMouseLeave:()=>A(!1),onFocus:()=>T(!0),onBlur:()=>T(!1),tabIndex:g?-1:0,role:"button","aria-expanded":j,"aria-haspopup":"listbox","aria-label":t||a,width:"fit-content",gap:8,...K,children:[r.jsx(i.View,{width:"20px",height:"20px",borderRadius:"4px",backgroundColor:ne,borderWidth:"1px",borderStyle:"solid",borderColor:"color-gray-300"}),!h&&!g&&r.jsx(se,{widthHeight:16,color:"color-gray-500",orientation:j?"up":"down"})]}),j&&r.jsxs(i.View,{ref:R,...ee,children:[r.jsx(i.View,{...J,children:x.map((re,G)=>r.jsx(i.View,{width:"24px",height:"24px",borderRadius:"8px",backgroundColor:re.value,borderWidth:"2px",borderStyle:"solid",borderColor:w===re.value?"theme-primary":"transparent",cursor:"pointer",transition:"transform 0.2s ease, border-color 0.2s ease",onClick:()=>I(re.value),title:re.name,_hover:{transform:"scale(1.05)",borderColor:"color-gray-400"},...l==null?void 0:l.colorSwatch},G))}),k&&C.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",...oe,children:C.map((re,G)=>r.jsx(i.View,{width:"20px",height:"20px",borderRadius:"8px",backgroundColor:re,borderWidth:"1px",borderStyle:"solid",borderColor:w===re?"theme-primary":"color-gray-300",cursor:"pointer",transition:"transform 0.2s ease, border-color 0.2s ease",onClick:()=>I(re),title:re,_hover:{transform:"scale(1.05)",borderColor:"color-gray-400"}},G))})]}),b&&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(ve,{value:S,onChange:re=>F(re.target.value),placeholder:"#000000 or rgb(0,0,0)",size:"sm",style:{flex:1},views:l==null?void 0:l.customInput}),r.jsx(i.View,{padding:"8px 12px",backgroundColor:"theme-primary",borderRadius:"8px",cursor:"pointer",onClick:W,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"})})]})]})]}),n&&r.jsx(i.Text,{fontSize:"12px",color:m?"color-red-500":"color-gray-600",marginTop:"4px",...l==null?void 0:l.helperText,children:n}),m&&typeof m=="string"&&r.jsx(i.Text,{fontSize:"12px",color:"color-red-500",marginTop:"4px",...l==null?void 0:l.error,children:m})]})},Jm=e=>{const o=cl(e);return r.jsx(dl,{...o,...e})},Qm=Jm,ft=[{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"}],ul=({placeholder:e})=>{const[o,t]=p.useState(ft),[a,n]=p.useState(e??ft[0].name),[l,s]=p.useState(!0),[d,u]=p.useState(!1),[c,m]=p.useState(!1);return{hide:l,setHide:s,newOptions:o,setNewOptions:t,isHovered:c,setIsHovered:m,isFocused:d,setIsFocused:u,value:a,setValue:n}},va={xs:8,sm:10,md:12,lg:14,xl:16},Zm=({size:e,...o})=>r.jsx(i.Element,{as:"ul",...o}),e0=e=>r.jsx(i.Input,{type:"country",...e}),o0=({size:e,...o})=>r.jsx(i.Element,{as:"li",...o}),r0=({option:e,size:o="md",callback:t=()=>{},views:a={text:{}}})=>{const n=l=>{l&&l.stopPropagation&&l.stopPropagation(),t(e)};return r.jsx(o0,{margin:0,role:"DropDownItem",listStyleType:"none",fontWeight:"normal",paddingVertical:6,paddingHorizontal:12,onClick:n,fontSize:i.Typography.fontSizes[o],_hover:{backgroundColor:"color-gray-100",transition:"all 0.15s ease-in-out"},...a.text,children:e})},t0=({size:e,views:o={dropDown:{}},options:t=[],callback:a=()=>{}})=>{const n=l=>a(l);return r.jsx(Zm,{role:"dropDown",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)",...o.dropDown,children:t.map(l=>r.jsx(r0,{size:e,option:l.name,callback:n,...o.text},l.code))})},pl=({id:e,name:o,label:t,value:a,placeholder:n,helperText:l,hide:s=!1,error:d=!1,isHovered:u=!1,isFocused:c=!1,isAutoFocus:m=!1,isDisabled:g=!1,isReadOnly:h=!1,shadow:f={},newOptions:y=[],size:x="md",variant:b="default",shape:k="default",onChange:j,onBlur:w=()=>{},setHide:C=()=>{},setNewOptions:S=()=>{},setIsHovered:v=()=>{},setIsFocused:I=()=>{},setValue:F=()=>{},selected:W,setSelected:E,views:T={text:{},icon:{},label:{},dropDown:{},helperText:{}},themeMode:A,...P})=>{const{getColor:z,themeMode:R}=i.useTheme(),H=z("color-gray-500",{themeMode:A||R}),M=()=>I(!0),D=B=>{C(!s),F(B),j&&j(B)},L=()=>{!g&&!h&&C(!s)},V=B=>{const X=B.target.value,$=ft.filter(U=>U.name.toLowerCase().startsWith(X.toLowerCase()));s&&C(!1),S($),j&&j(X)},O=B=>{w(B),I(!1)},_=!!(t&&(c||a)),q={margin:0,paddingVertical:8,paddingHorizontal:0,width:"100%",heigth:"100%",border:"none",on:{focus:{outline:"none"}},transition:"all 0.2s ease-in-out",fontSize:i.Typography.fontSizes[x],backgroundColor:"transparent",color:g?"color-gray-400":"color-gray-900",cursor:g?"not-allowed":h?"auto":"pointer",...T.field};return r.jsxs(Ne,{helperText:l,error:d,views:T,onClick:L,children:[r.jsxs(Je,{label:t,size:x,error:d,shape:k,views:T,shadow:f,variant:b,value:a,color:"theme-primary",isDisabled:g,isReadOnly:h,isFocused:c,showLabel:_,_hover:!g&&!d?{borderColor:"theme-primary"}:void 0,children:[r.jsxs(Wo,{children:[_&&r.jsx(no,{htmlFor:e,color:"theme-primary",error:d,views:T,children:t}),r.jsx(e0,{id:e,name:o,placeholder:n,readOnly:h,disabled:g,autoFocus:m,onBlur:O,onFocus:M,...q,...P,value:a,onChange:V})]}),r.jsx(Xt,{children:s?r.jsx(se,{orientation:"down",widthHeight:va[x],color:H,style:T.icon}):r.jsx(se,{orientation:"up",widthHeight:va[x],color:H,style:T.icon})})]}),!s&&r.jsx(t0,{size:x,views:T,options:y,callback:D})]})},a0=e=>{const o=ul(e);return r.jsx(pl,{...o,...e})},n0=a0;function Tr(e){"@babel/helpers - typeof";return Tr=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},Tr(e)}function je(e,o){if(o.length<e)throw new TypeError(e+" argument"+(e>1?"s":"")+" required, but only "+o.length+" present")}function l0(e){return je(1,arguments),e instanceof Date||Tr(e)==="object"&&Object.prototype.toString.call(e)==="[object Date]"}function De(e){je(1,arguments);var o=Object.prototype.toString.call(e);return e instanceof Date||Tr(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 i0(e){if(je(1,arguments),!l0(e)&&typeof e!="number")return!1;var o=De(e);return!isNaN(Number(o))}function ao(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 s0(e,o){je(2,arguments);var t=De(e).getTime(),a=ao(o);return new Date(t+a)}function c0(e,o){je(2,arguments);var t=ao(o);return s0(e,-t)}var d0=864e5;function u0(e){je(1,arguments);var o=De(e),t=o.getTime();o.setUTCMonth(0,1),o.setUTCHours(0,0,0,0);var a=o.getTime(),n=t-a;return Math.floor(n/d0)+1}function Ir(e){je(1,arguments);var o=1,t=De(e),a=t.getUTCDay(),n=(a<o?7:0)+a-o;return t.setUTCDate(t.getUTCDate()-n),t.setUTCHours(0,0,0,0),t}function ml(e){je(1,arguments);var o=De(e),t=o.getUTCFullYear(),a=new Date(0);a.setUTCFullYear(t+1,0,4),a.setUTCHours(0,0,0,0);var n=Ir(a),l=new Date(0);l.setUTCFullYear(t,0,4),l.setUTCHours(0,0,0,0);var s=Ir(l);return o.getTime()>=n.getTime()?t+1:o.getTime()>=s.getTime()?t:t-1}function p0(e){je(1,arguments);var o=ml(e),t=new Date(0);t.setUTCFullYear(o,0,4),t.setUTCHours(0,0,0,0);var a=Ir(t);return a}var m0=6048e5;function g0(e){je(1,arguments);var o=De(e),t=Ir(o).getTime()-p0(o).getTime();return Math.round(t/m0)+1}var h0={};function Lr(){return h0}function Fr(e,o){var t,a,n,l,s,d,u,c;je(1,arguments);var m=Lr(),g=ao((t=(a=(n=(l=o==null?void 0:o.weekStartsOn)!==null&&l!==void 0?l:o==null||(s=o.locale)===null||s===void 0||(d=s.options)===null||d===void 0?void 0:d.weekStartsOn)!==null&&n!==void 0?n:m.weekStartsOn)!==null&&a!==void 0?a:(u=m.locale)===null||u===void 0||(c=u.options)===null||c===void 0?void 0:c.weekStartsOn)!==null&&t!==void 0?t:0);if(!(g>=0&&g<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var h=De(e),f=h.getUTCDay(),y=(f<g?7:0)+f-g;return h.setUTCDate(h.getUTCDate()-y),h.setUTCHours(0,0,0,0),h}function gl(e,o){var t,a,n,l,s,d,u,c;je(1,arguments);var m=De(e),g=m.getUTCFullYear(),h=Lr(),f=ao((t=(a=(n=(l=o==null?void 0:o.firstWeekContainsDate)!==null&&l!==void 0?l:o==null||(s=o.locale)===null||s===void 0||(d=s.options)===null||d===void 0?void 0:d.firstWeekContainsDate)!==null&&n!==void 0?n:h.firstWeekContainsDate)!==null&&a!==void 0?a:(u=h.locale)===null||u===void 0||(c=u.options)===null||c===void 0?void 0:c.firstWeekContainsDate)!==null&&t!==void 0?t:1);if(!(f>=1&&f<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var y=new Date(0);y.setUTCFullYear(g+1,0,f),y.setUTCHours(0,0,0,0);var x=Fr(y,o),b=new Date(0);b.setUTCFullYear(g,0,f),b.setUTCHours(0,0,0,0);var k=Fr(b,o);return m.getTime()>=x.getTime()?g+1:m.getTime()>=k.getTime()?g:g-1}function f0(e,o){var t,a,n,l,s,d,u,c;je(1,arguments);var m=Lr(),g=ao((t=(a=(n=(l=o==null?void 0:o.firstWeekContainsDate)!==null&&l!==void 0?l:o==null||(s=o.locale)===null||s===void 0||(d=s.options)===null||d===void 0?void 0:d.firstWeekContainsDate)!==null&&n!==void 0?n:m.firstWeekContainsDate)!==null&&a!==void 0?a:(u=m.locale)===null||u===void 0||(c=u.options)===null||c===void 0?void 0:c.firstWeekContainsDate)!==null&&t!==void 0?t:1),h=gl(e,o),f=new Date(0);f.setUTCFullYear(h,0,g),f.setUTCHours(0,0,0,0);var y=Fr(f,o);return y}var y0=6048e5;function x0(e,o){je(1,arguments);var t=De(e),a=Fr(t,o).getTime()-f0(t,o).getTime();return Math.round(a/y0)+1}function ae(e,o){for(var t=e<0?"-":"",a=Math.abs(e).toString();a.length<o;)a="0"+a;return t+a}var qe={y:function(o,t){var a=o.getUTCFullYear(),n=a>0?a:1-a;return ae(t==="yy"?n%100:n,t.length)},M:function(o,t){var a=o.getUTCMonth();return t==="M"?String(a+1):ae(a+1,2)},d:function(o,t){return ae(o.getUTCDate(),t.length)},a:function(o,t){var a=o.getUTCHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return a.toUpperCase();case"aaa":return a;case"aaaaa":return a[0];case"aaaa":default:return a==="am"?"a.m.":"p.m."}},h:function(o,t){return ae(o.getUTCHours()%12||12,t.length)},H:function(o,t){return ae(o.getUTCHours(),t.length)},m:function(o,t){return ae(o.getUTCMinutes(),t.length)},s:function(o,t){return ae(o.getUTCSeconds(),t.length)},S:function(o,t){var a=t.length,n=o.getUTCMilliseconds(),l=Math.floor(n*Math.pow(10,a-3));return ae(l,t.length)}},mo={midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},b0={G:function(o,t,a){var n=o.getUTCFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return a.era(n,{width:"abbreviated"});case"GGGGG":return a.era(n,{width:"narrow"});case"GGGG":default:return a.era(n,{width:"wide"})}},y:function(o,t,a){if(t==="yo"){var n=o.getUTCFullYear(),l=n>0?n:1-n;return a.ordinalNumber(l,{unit:"year"})}return qe.y(o,t)},Y:function(o,t,a,n){var l=gl(o,n),s=l>0?l:1-l;if(t==="YY"){var d=s%100;return ae(d,2)}return t==="Yo"?a.ordinalNumber(s,{unit:"year"}):ae(s,t.length)},R:function(o,t){var a=ml(o);return ae(a,t.length)},u:function(o,t){var a=o.getUTCFullYear();return ae(a,t.length)},Q:function(o,t,a){var n=Math.ceil((o.getUTCMonth()+1)/3);switch(t){case"Q":return String(n);case"QQ":return ae(n,2);case"Qo":return a.ordinalNumber(n,{unit:"quarter"});case"QQQ":return a.quarter(n,{width:"abbreviated",context:"formatting"});case"QQQQQ":return a.quarter(n,{width:"narrow",context:"formatting"});case"QQQQ":default:return a.quarter(n,{width:"wide",context:"formatting"})}},q:function(o,t,a){var n=Math.ceil((o.getUTCMonth()+1)/3);switch(t){case"q":return String(n);case"qq":return ae(n,2);case"qo":return a.ordinalNumber(n,{unit:"quarter"});case"qqq":return a.quarter(n,{width:"abbreviated",context:"standalone"});case"qqqqq":return a.quarter(n,{width:"narrow",context:"standalone"});case"qqqq":default:return a.quarter(n,{width:"wide",context:"standalone"})}},M:function(o,t,a){var n=o.getUTCMonth();switch(t){case"M":case"MM":return qe.M(o,t);case"Mo":return a.ordinalNumber(n+1,{unit:"month"});case"MMM":return a.month(n,{width:"abbreviated",context:"formatting"});case"MMMMM":return a.month(n,{width:"narrow",context:"formatting"});case"MMMM":default:return a.month(n,{width:"wide",context:"formatting"})}},L:function(o,t,a){var n=o.getUTCMonth();switch(t){case"L":return String(n+1);case"LL":return ae(n+1,2);case"Lo":return a.ordinalNumber(n+1,{unit:"month"});case"LLL":return a.month(n,{width:"abbreviated",context:"standalone"});case"LLLLL":return a.month(n,{width:"narrow",context:"standalone"});case"LLLL":default:return a.month(n,{width:"wide",context:"standalone"})}},w:function(o,t,a,n){var l=x0(o,n);return t==="wo"?a.ordinalNumber(l,{unit:"week"}):ae(l,t.length)},I:function(o,t,a){var n=g0(o);return t==="Io"?a.ordinalNumber(n,{unit:"week"}):ae(n,t.length)},d:function(o,t,a){return t==="do"?a.ordinalNumber(o.getUTCDate(),{unit:"date"}):qe.d(o,t)},D:function(o,t,a){var n=u0(o);return t==="Do"?a.ordinalNumber(n,{unit:"dayOfYear"}):ae(n,t.length)},E:function(o,t,a){var n=o.getUTCDay();switch(t){case"E":case"EE":case"EEE":return a.day(n,{width:"abbreviated",context:"formatting"});case"EEEEE":return a.day(n,{width:"narrow",context:"formatting"});case"EEEEEE":return a.day(n,{width:"short",context:"formatting"});case"EEEE":default:return a.day(n,{width:"wide",context:"formatting"})}},e:function(o,t,a,n){var l=o.getUTCDay(),s=(l-n.weekStartsOn+8)%7||7;switch(t){case"e":return String(s);case"ee":return ae(s,2);case"eo":return a.ordinalNumber(s,{unit:"day"});case"eee":return a.day(l,{width:"abbreviated",context:"formatting"});case"eeeee":return a.day(l,{width:"narrow",context:"formatting"});case"eeeeee":return a.day(l,{width:"short",context:"formatting"});case"eeee":default:return a.day(l,{width:"wide",context:"formatting"})}},c:function(o,t,a,n){var l=o.getUTCDay(),s=(l-n.weekStartsOn+8)%7||7;switch(t){case"c":return String(s);case"cc":return ae(s,t.length);case"co":return a.ordinalNumber(s,{unit:"day"});case"ccc":return a.day(l,{width:"abbreviated",context:"standalone"});case"ccccc":return a.day(l,{width:"narrow",context:"standalone"});case"cccccc":return a.day(l,{width:"short",context:"standalone"});case"cccc":default:return a.day(l,{width:"wide",context:"standalone"})}},i:function(o,t,a){var n=o.getUTCDay(),l=n===0?7:n;switch(t){case"i":return String(l);case"ii":return ae(l,t.length);case"io":return a.ordinalNumber(l,{unit:"day"});case"iii":return a.day(n,{width:"abbreviated",context:"formatting"});case"iiiii":return a.day(n,{width:"narrow",context:"formatting"});case"iiiiii":return a.day(n,{width:"short",context:"formatting"});case"iiii":default:return a.day(n,{width:"wide",context:"formatting"})}},a:function(o,t,a){var n=o.getUTCHours(),l=n/12>=1?"pm":"am";switch(t){case"a":case"aa":return a.dayPeriod(l,{width:"abbreviated",context:"formatting"});case"aaa":return a.dayPeriod(l,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return a.dayPeriod(l,{width:"narrow",context:"formatting"});case"aaaa":default:return a.dayPeriod(l,{width:"wide",context:"formatting"})}},b:function(o,t,a){var n=o.getUTCHours(),l;switch(n===12?l=mo.noon:n===0?l=mo.midnight:l=n/12>=1?"pm":"am",t){case"b":case"bb":return a.dayPeriod(l,{width:"abbreviated",context:"formatting"});case"bbb":return a.dayPeriod(l,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return a.dayPeriod(l,{width:"narrow",context:"formatting"});case"bbbb":default:return a.dayPeriod(l,{width:"wide",context:"formatting"})}},B:function(o,t,a){var n=o.getUTCHours(),l;switch(n>=17?l=mo.evening:n>=12?l=mo.afternoon:n>=4?l=mo.morning:l=mo.night,t){case"B":case"BB":case"BBB":return a.dayPeriod(l,{width:"abbreviated",context:"formatting"});case"BBBBB":return a.dayPeriod(l,{width:"narrow",context:"formatting"});case"BBBB":default:return a.dayPeriod(l,{width:"wide",context:"formatting"})}},h:function(o,t,a){if(t==="ho"){var n=o.getUTCHours()%12;return n===0&&(n=12),a.ordinalNumber(n,{unit:"hour"})}return qe.h(o,t)},H:function(o,t,a){return t==="Ho"?a.ordinalNumber(o.getUTCHours(),{unit:"hour"}):qe.H(o,t)},K:function(o,t,a){var n=o.getUTCHours()%12;return t==="Ko"?a.ordinalNumber(n,{unit:"hour"}):ae(n,t.length)},k:function(o,t,a){var n=o.getUTCHours();return n===0&&(n=24),t==="ko"?a.ordinalNumber(n,{unit:"hour"}):ae(n,t.length)},m:function(o,t,a){return t==="mo"?a.ordinalNumber(o.getUTCMinutes(),{unit:"minute"}):qe.m(o,t)},s:function(o,t,a){return t==="so"?a.ordinalNumber(o.getUTCSeconds(),{unit:"second"}):qe.s(o,t)},S:function(o,t){return qe.S(o,t)},X:function(o,t,a,n){var l=n._originalDate||o,s=l.getTimezoneOffset();if(s===0)return"Z";switch(t){case"X":return Ia(s);case"XXXX":case"XX":return oo(s);case"XXXXX":case"XXX":default:return oo(s,":")}},x:function(o,t,a,n){var l=n._originalDate||o,s=l.getTimezoneOffset();switch(t){case"x":return Ia(s);case"xxxx":case"xx":return oo(s);case"xxxxx":case"xxx":default:return oo(s,":")}},O:function(o,t,a,n){var l=n._originalDate||o,s=l.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+Ta(s,":");case"OOOO":default:return"GMT"+oo(s,":")}},z:function(o,t,a,n){var l=n._originalDate||o,s=l.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+Ta(s,":");case"zzzz":default:return"GMT"+oo(s,":")}},t:function(o,t,a,n){var l=n._originalDate||o,s=Math.floor(l.getTime()/1e3);return ae(s,t.length)},T:function(o,t,a,n){var l=n._originalDate||o,s=l.getTime();return ae(s,t.length)}};function Ta(e,o){var t=e>0?"-":"+",a=Math.abs(e),n=Math.floor(a/60),l=a%60;if(l===0)return t+String(n);var s=o;return t+String(n)+s+ae(l,2)}function Ia(e,o){if(e%60===0){var t=e>0?"-":"+";return t+ae(Math.abs(e)/60,2)}return oo(e,o)}function oo(e,o){var t=o||"",a=e>0?"-":"+",n=Math.abs(e),l=ae(Math.floor(n/60),2),s=ae(n%60,2);return a+l+t+s}var Fa=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"})}},hl=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"})}},k0=function(o,t){var a=o.match(/(P+)(p+)?/)||[],n=a[1],l=a[2];if(!l)return Fa(o,t);var s;switch(n){case"P":s=t.dateTime({width:"short"});break;case"PP":s=t.dateTime({width:"medium"});break;case"PPP":s=t.dateTime({width:"long"});break;case"PPPP":default:s=t.dateTime({width:"full"});break}return s.replace("{{date}}",Fa(n,t)).replace("{{time}}",hl(l,t))},C0={p:hl,P:k0};function S0(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 j0=["D","DD"],w0=["YY","YYYY"];function v0(e){return j0.indexOf(e)!==-1}function T0(e){return w0.indexOf(e)!==-1}function Ra(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 I0={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"}},F0=function(o,t,a){var n,l=I0[o];return typeof l=="string"?n=l:t===1?n=l.one:n=l.other.replace("{{count}}",t.toString()),a!=null&&a.addSuffix?a.comparison&&a.comparison>0?"in "+n:n+" ago":n};function Zr(e){return function(){var o=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=o.width?String(o.width):e.defaultWidth,a=e.formats[t]||e.formats[e.defaultWidth];return a}}var R0={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},z0={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},M0={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},W0={date:Zr({formats:R0,defaultWidth:"full"}),time:Zr({formats:z0,defaultWidth:"full"}),dateTime:Zr({formats:M0,defaultWidth:"full"})},H0={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},P0=function(o,t,a,n){return H0[o]};function Eo(e){return function(o,t){var a=t!=null&&t.context?String(t.context):"standalone",n;if(a==="formatting"&&e.formattingValues){var l=e.defaultFormattingWidth||e.defaultWidth,s=t!=null&&t.width?String(t.width):l;n=e.formattingValues[s]||e.formattingValues[l]}else{var d=e.defaultWidth,u=t!=null&&t.width?String(t.width):e.defaultWidth;n=e.values[u]||e.values[d]}var c=e.argumentCallback?e.argumentCallback(o):o;return n[c]}}var A0={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},V0={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},E0={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"]},D0={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"]},$0={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"}},L0={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"}},_0=function(o,t){var a=Number(o),n=a%100;if(n>20||n<10)switch(n%10){case 1:return a+"st";case 2:return a+"nd";case 3:return a+"rd"}return a+"th"},B0={ordinalNumber:_0,era:Eo({values:A0,defaultWidth:"wide"}),quarter:Eo({values:V0,defaultWidth:"wide",argumentCallback:function(o){return o-1}}),month:Eo({values:E0,defaultWidth:"wide"}),day:Eo({values:D0,defaultWidth:"wide"}),dayPeriod:Eo({values:$0,defaultWidth:"wide",formattingValues:L0,defaultFormattingWidth:"wide"})};function Do(e){return function(o){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},a=t.width,n=a&&e.matchPatterns[a]||e.matchPatterns[e.defaultMatchWidth],l=o.match(n);if(!l)return null;var s=l[0],d=a&&e.parsePatterns[a]||e.parsePatterns[e.defaultParseWidth],u=Array.isArray(d)?N0(d,function(g){return g.test(s)}):O0(d,function(g){return g.test(s)}),c;c=e.valueCallback?e.valueCallback(u):u,c=t.valueCallback?t.valueCallback(c):c;var m=o.slice(s.length);return{value:c,rest:m}}}function O0(e,o){for(var t in e)if(e.hasOwnProperty(t)&&o(e[t]))return t}function N0(e,o){for(var t=0;t<e.length;t++)if(o(e[t]))return t}function q0(e){return function(o){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},a=o.match(e.matchPattern);if(!a)return null;var n=a[0],l=o.match(e.parsePattern);if(!l)return null;var s=e.valueCallback?e.valueCallback(l[0]):l[0];s=t.valueCallback?t.valueCallback(s):s;var d=o.slice(n.length);return{value:s,rest:d}}}var U0=/^(\d+)(th|st|nd|rd)?/i,G0=/\d+/i,Y0={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},X0={any:[/^b/i,/^(a|c)/i]},K0={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},J0={any:[/1/i,/2/i,/3/i,/4/i]},Q0={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},Z0={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]},eg={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},og={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]},rg={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},tg={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}},ag={ordinalNumber:q0({matchPattern:U0,parsePattern:G0,valueCallback:function(o){return parseInt(o,10)}}),era:Do({matchPatterns:Y0,defaultMatchWidth:"wide",parsePatterns:X0,defaultParseWidth:"any"}),quarter:Do({matchPatterns:K0,defaultMatchWidth:"wide",parsePatterns:J0,defaultParseWidth:"any",valueCallback:function(o){return o+1}}),month:Do({matchPatterns:Q0,defaultMatchWidth:"wide",parsePatterns:Z0,defaultParseWidth:"any"}),day:Do({matchPatterns:eg,defaultMatchWidth:"wide",parsePatterns:og,defaultParseWidth:"any"}),dayPeriod:Do({matchPatterns:rg,defaultMatchWidth:"any",parsePatterns:tg,defaultParseWidth:"any"})},ng={code:"en-US",formatDistance:F0,formatLong:W0,formatRelative:P0,localize:B0,match:ag,options:{weekStartsOn:0,firstWeekContainsDate:1}},lg=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,ig=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,sg=/^'([^]*?)'?$/,cg=/''/g,dg=/[a-zA-Z]/;function ug(e,o,t){var a,n,l,s,d,u,c,m,g,h,f,y,x,b;je(2,arguments);var k=String(o),j=Lr(),w=(a=(n=void 0)!==null&&n!==void 0?n:j.locale)!==null&&a!==void 0?a:ng,C=ao((l=(s=(d=(u=void 0)!==null&&u!==void 0?u:void 0)!==null&&d!==void 0?d:j.firstWeekContainsDate)!==null&&s!==void 0?s:(c=j.locale)===null||c===void 0||(m=c.options)===null||m===void 0?void 0:m.firstWeekContainsDate)!==null&&l!==void 0?l:1);if(!(C>=1&&C<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var S=ao((g=(h=(f=(y=void 0)!==null&&y!==void 0?y:void 0)!==null&&f!==void 0?f:j.weekStartsOn)!==null&&h!==void 0?h:(x=j.locale)===null||x===void 0||(b=x.options)===null||b===void 0?void 0:b.weekStartsOn)!==null&&g!==void 0?g:0);if(!(S>=0&&S<=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 v=De(e);if(!i0(v))throw new RangeError("Invalid time value");var I=S0(v),F=c0(v,I),W={firstWeekContainsDate:C,weekStartsOn:S,locale:w,_originalDate:v},E=k.match(ig).map(function(T){var A=T[0];if(A==="p"||A==="P"){var P=C0[A];return P(T,w.formatLong)}return T}).join("").match(lg).map(function(T){if(T==="''")return"'";var A=T[0];if(A==="'")return pg(T);var P=b0[A];if(P)return T0(T)&&Ra(T,o,String(e)),v0(T)&&Ra(T,o,String(e)),P(F,T,w.localize,W);if(A.match(dg))throw new RangeError("Format string contains an unescaped latin alphabet character `"+A+"`");return T}).join("");return E}function pg(e){var o=e.match(sg);return o?o[1].replace(cg,"'"):e}const fl=()=>{const[e,o]=p.useState(!1),[t,a]=p.useState(!1),[n,l]=p.useState(ug(new Date,"yyyy-MM-dd"));return{date:n,setDate:l,isHovered:e,setIsHovered:o,isFocused:t,setIsFocused:a}},mg=e=>r.jsx(i.Input,{type:"date",...e}),yl=({id:e,icon:o,name:t,label:a,date:n,children:l,helperText:s,shadow:d={},size:u="md",variant:c="default",shape:m="default",views:g={container:{},label:{},helperText:{},text:{},field:{}},error:h=!1,isHovered:f=!1,isFocused:y=!1,isDisabled:x=!1,isReadOnly:b=!1,setDate:k=()=>{},setIsFocused:j=()=>{},setIsHovered:w=()=>{},onChange:C,onChangeText:S,...v})=>{const{themeMode:I}=i.useTheme(),F=!!(y&&a),W=()=>w(!f),E=()=>j(!0),T=P=>{typeof P=="string"?(k(P),S&&S(P)):(k(P.target.value),C&&C(P.target.value))},A={margin:0,paddingVertical:8,paddingHorizontal:0,width:"100%",heigth:"100%",border:"none",on:{focus:{outline:"none",backgroundColor:"transparent"}},transition:"all 0.2s ease-in-out",fontSize:i.Typography.fontSizes[u],backgroundColor:"transparent",color:x?"color-gray-400":"color-gray-900",cursor:x?"not-allowed":b?"auto":"pointer",...g.field};return r.jsx(Ne,{helperText:s,error:h,views:g,children:r.jsx(Je,{label:a,size:u,error:h,shape:m,views:g,shadow:d,color:"theme-primary",variant:c,value:n,isHovered:f,isDisabled:x,isReadOnly:b,isFocused:y,showLabel:F,onMouseEnter:W,onMouseLeave:W,children:r.jsxs(Wo,{children:[F&&r.jsx(no,{htmlFor:e,color:"theme-primary",error:h,views:g,children:a}),r.jsx(mg,{id:e,name:t,onFocus:E,disabled:x,readOnly:b,...A,...v,...S&&{onChangeText:T},onChange:T})]})})})},gg=e=>{const o=fl();return r.jsx(yl,{...o,...e})},hg=gg,xl=e=>{const o=Qt(e),[t,a]=p.useState(!1);return{isVisible:t,setIsVisible:a,...e,...o}},fg=({visibleIcon:e=r.jsx(Dt,{widthHeight:14}),hiddenIcon:o=r.jsx(Et,{widthHeight:14}),...t})=>{const{isVisible:a,setIsVisible:n,...l}=xl(t);return r.jsx(Qo,{...l,type:a?"text":"password",isClearable:!1,right:r.jsx(i.View,{display:"flex",alignItems:"center",justifyContent:"center",width:"16px",height:"16px",minWidth:"16px",color:"color-gray-500",cursor:t.isDisabled?"not-allowed":"pointer",transition:"color 0.2s ease",onClick:()=>{t.isDisabled||n(!a)},children:a?e:o})})},yg=fg,bl=(e,o,t)=>{const[a,n]=p.useState(e),[l,s]=p.useState(o?{value:o,label:o}:e[0]),[d,u]=p.useState([]),[c,m]=p.useState(0),[g,h]=p.useState(t??""),[f,y]=p.useState(!1);return{filteredItems:a,setFilteredItems:n,selectedItem:l,setSelectedItem:s,selectedItems:d,setSelectedItems:u,highlightedIndex:c,setHighlightedIndex:m,searchQuery:g,setSearchQuery:h,isDropdownVisible:f,setIsDropdownVisible:y}},xg={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)"},za={enter:{opacity:1,transform:"translateY(0) scale(1)",transition:"all 0.2s ease-in-out"},initial:{opacity:0,transform:"translateY(-8px) scale(0.96)"}},bg={padding:"8px",borderBottomWidth:"1px",borderBottomStyle:"solid",borderBottomColor:"color-gray-100",backgroundColor:"color-gray-50",borderTopLeftRadius:10,borderTopRightRadius:10},kg={padding:"8px 10px",cursor:"pointer",borderRadius:8,margin:"1px 4px",transition:"all 0.15s ease-in-out"},Cg={padding:"24px 16px",display:"flex",flexDirection:"column",alignItems:"center",gap:"8px"},Ma={open:{transform:"rotate(180deg)",transition:"all 0.2s ease-in-out"},closed:{transform:"rotate(0deg)",transition:"all 0.2s ease-in-out"}},Sg={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"},kl=({placeholder:e,items:o,showTick:t=!0,onSelect:a,searchEnabled:n=!0,left:l,right:s,label:d,filteredItems:u,setSelectedItem:c,selectedItem:m,selectedItems:g,setSelectedItems:h,highlightedIndex:f,setHighlightedIndex:y,searchQuery:x,setSearchQuery:b,setFilteredItems:k,views:j,isDropdownVisible:w,setIsDropdownVisible:C,isMulti:S=!1,searchPlaceholder:v,...I})=>{const{ref:F,relation:W}=i.useElementPosition({trackChanges:!0,trackOnScroll:!0,trackOnResize:!0,throttleMs:10}),E=p.useRef(null),[T,A]=p.useState(!1),[P,z]=p.useState(!1),R=()=>{var B;const V=P?za.enter:za.initial;if(!F.current)return{};const O=F.current.getBoundingClientRect(),_={position:"fixed",left:O.left,width:O.width,zIndex:1e4,...V};return((B=W==null?void 0:W.space)==null?void 0:B.vertical)==="top"?{..._,bottom:window.innerHeight-O.top+6}:{..._,top:O.bottom+6}};p.useEffect(()=>{if(w){const V=setTimeout(()=>z(!0),10);return()=>clearTimeout(V)}z(!1)},[w]),p.useEffect(()=>{const V=O=>{!O.composedPath().some(B=>(B==null?void 0:B.id)==="combobox-dropdown")&&F.current&&!F.current.contains(O.target)&&C(!1)};return document.addEventListener("mousedown",V),()=>document.removeEventListener("mousedown",V)},[]);const H=V=>{if(b(V),V==="")k(o);else{const O=o.filter(_=>_.label.toLowerCase().includes(V.toLowerCase()));k(O)}y(0)},M=V=>{if(S){const O=g.some(q=>q.value===V.value);let _;O?_=g.filter(q=>q.value!==V.value):_=[...g,V],h(_),a==null||a(_)}else c(V),a==null||a(V),C(!1)},D=(V,O)=>{V.stopPropagation();const _=g.filter(q=>q.value!==O.value);h(_),a==null||a(_)},L=V=>S?g.some(O=>O.value===V.value):V.value===m.value;return r.jsxs(i.Horizontal,{role:"combobox",flexWrap:"nowrap",gap:15,alignItems:"center",width:"100%",...I,children:[d&&r.jsx(i.Text,{views:j==null?void 0:j.label,htmlFor:I.id,children:d}),r.jsxs(i.View,{position:"relative",width:"100%",children:[r.jsx("div",{ref:F,onClick:()=>C(!w),style:{width:"100%"},children:r.jsxs(Je,{isHovered:T,isFocused:w,onMouseEnter:()=>A(!0),onMouseLeave:()=>A(!1),cursor:"pointer",views:{container:j==null?void 0:j.container},children:[r.jsxs(i.Horizontal,{gap:10,alignItems:"center",width:"100%",flexWrap:S?"wrap":"nowrap",...j==null?void 0:j.labelContainer,children:[l,S?g.length>0?r.jsx(i.Horizontal,{gap:6,flexWrap:"wrap",alignItems:"center",children:g.map(V=>r.jsxs(i.Horizontal,{...Sg,_hover:{backgroundColor:"color-gray-200"},children:[V.icon&&r.jsx(i.View,{flexShrink:0,children:V.icon}),r.jsx(i.Text,{size:"sm",color:"color-gray-700",weight:"medium",children:V.label}),r.jsx(Te,{widthHeight:12,color:"color-gray-500",cursor:"pointer",onClick:O=>D(O,V)})]},V.value))}):r.jsx(i.Text,{weight:"medium",flexGrow:1,color:"color-gray-500",style:{whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},...j==null?void 0:j.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"},...j==null?void 0:j.label,children:m.label})]})]}),r.jsxs(i.Horizontal,{gap:8,alignItems:"center",children:[s,r.jsx(i.View,{style:w?Ma.open:Ma.closed,children:r.jsx(se,{widthHeight:16,orientation:"down",color:w?"color-gray-700":"color-gray-400"})})]})]})}),w&&r.jsx(Qn,{children:r.jsxs(i.View,{ref:E,id:"combobox-dropdown",role:"listbox","aria-labelledby":I.id,...xg,style:R(),...j==null?void 0:j.dropdown,children:[n&&r.jsx(i.View,{...bg,children:r.jsx(Qo,{id:`${I.id}-search`,name:`${I.name}-search`,width:"100%",type:"search",autoFocus:!0,value:x,onChange:V=>H(V),hint:e||"Search...",isClearable:!1,left:r.jsx(Cr,{widthHeight:14,color:"color-gray-400"}),views:{container:{width:"100%",padding:"0",backgroundColor:"transparent",borderColor:"color-gray-200",...j==null?void 0:j.text},field:{fontSize:"13px"}}})}),u.length>0&&r.jsx(i.View,{margin:0,padding:"4px",children:u.map((V,O)=>{const _=L(V),q=O===f;return r.jsxs(i.Horizontal,{role:"option","aria-selected":_,justifyContent:"space-between",alignItems:"center",...kg,backgroundColor:_&&q?"color-blue-100":_?"color-blue-50":q?"color-gray-100":"transparent",onMouseEnter:()=>y(O),onClick:()=>M(V),...j==null?void 0:j.item,children:[r.jsxs(i.Horizontal,{gap:8,alignItems:"center",children:[V.icon&&r.jsx(i.View,{flexShrink:0,children:V.icon}),r.jsx(i.Text,{size:"sm",color:_?"theme-primary":"color-gray-800",weight:_?"medium":"normal",children:V.label})]}),_&&t&&r.jsx(Pr,{widthHeight:16,color:"theme-primary"})]},V.value)})}),u.length===0&&r.jsxs(i.Vertical,{...Cg,children:[r.jsx(Cr,{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"})]})]})})]})]})},jg=({id:e,name:o,items:t,placeholder:a,searchPlaceholder:n,...l})=>{const s=bl(t,a,n);return r.jsx(kl,{id:e,name:o,items:t,...s,...l})},wg=jg,Cl=e=>{const{tags:o,defaultTags:t=[],onTagsChange:a,onTagAdd:n,onTagRemove:l,maxTags:s,minTagLength:d=1,maxTagLength:u=50,allowDuplicates:c=!1,separators:m=["enter","comma"],isDisabled:g=!1,isReadOnly:h=!1}=e,[f,y]=p.useState(""),[x,b]=p.useState(()=>(o||t||[]).map((z,R)=>({id:`tag-${R}-${Date.now()}`,value:z}))),[k,j]=p.useState(!1),[w,C]=p.useState(!1),S=o&&Array.isArray(o)?o.map((P,z)=>({id:`tag-${z}-${Date.now()}`,value:P})):x;p.useEffect(()=>{o&&Array.isArray(o)&&b(o.map((P,z)=>({id:`tag-${z}-${Date.now()}`,value:P})))},[o]);const v=p.useCallback(P=>{const z=P.trim();return!(z.length<d||z.length>u||!c&&S.map(H=>H.value.toLowerCase()).includes(z.toLowerCase())||s&&S.length>=s)},[S,d,u,c,s]),I=p.useCallback(P=>{if(g||h)return;const z=P.trim();if(!z||!v(z))return;const R={id:`tag-${Date.now()}-${Math.random()}`,value:z},H=[...S,R],M=H.map(D=>D.value);o||b(H),a==null||a(M),n==null||n(z),y("")},[S,v,a,n,g,h,o]),F=p.useCallback(P=>{if(g||h)return;const z=S[P];if(!z)return;const R=S.filter((M,D)=>D!==P),H=R.map(M=>M.value);o||b(R),a==null||a(H),l==null||l(z.value,P)},[S,a,l,g,h,o]),W=p.useCallback(P=>{if(g||h)return;const z=P.target.value;if(m.includes("comma")&&z.includes(",")){const R=z.split(","),H=R[0],M=R.slice(1).join(",");H.trim()&&I(H),y(M);return}y(z)},[I,m,g,h]),E=p.useCallback(P=>{if(g||h)return;const{key:z}=P;if(m.includes("enter")&&z==="Enter"){P.preventDefault(),f.trim()&&I(f);return}if(m.includes("tab")&&z==="Tab"&&f.trim()){P.preventDefault(),I(f);return}if(m.includes("space")&&z===" "&&f.trim()){P.preventDefault(),I(f);return}if(z==="Backspace"&&!f&&S.length>0){P.preventDefault(),F(S.length-1);return}},[I,F,f,S,m,g,h]),T=p.useCallback(()=>{var P;j(!0),(P=e.onFocus)==null||P.call(e)},[e.onFocus]),A=p.useCallback(()=>{var P;j(!1),f.trim()&&I(f),(P=e.onBlur)==null||P.call(e)},[I,f,e.onBlur]);return{inputValue:f,setInputValue:y,tags:S,setTags:b,isFocused:k,setIsFocused:j,isHovered:w,setIsHovered:C,addTag:I,removeTag:F,handleInputChange:W,handleKeyDown:E,handleFocus:T,handleBlur:A,validateTag:v}},vg=({tag:e,onRemove:o,isRemovable:t,size:a,views:n,isDisabled:l,isReadOnly:s})=>{const[d,u]=p.useState(!1),c={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}}[a]||{padding:"6px 14px",fontSize:"14px",iconSize:14};return r.jsxs(i.Horizontal,{alignItems:"center",gap:6,padding:c.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,_hover:!l&&!s?{backgroundColor:"theme-primary-180",borderColor:"theme-primary-400"}:{},...n==null?void 0:n.tag,children:[r.jsx(i.Text,{fontSize:c.fontSize,color:l?"color-gray-400":"theme-primary",whiteSpace:"nowrap",...n==null?void 0:n.tagText,children:e}),t&&!l&&!s&&r.jsx(i.View,{cursor:"pointer",padding:"2px",borderRadius:"50%",transition:"all 0.15s ease-in-out",backgroundColor:d?"color-red-100":"transparent",opacity:d?1:.7,onMouseEnter:()=>u(!0),onMouseLeave:()=>u(!1),onClick:m=>{m.stopPropagation(),o()},_hover:{backgroundColor:"color-red-100"},...n==null?void 0:n.tagRemove,children:r.jsx(Te,{widthHeight:c.iconSize,color:d?"color-red-500":"color-gray-400"})})]})},Sl=({id:e,name:o,label:t,placeholder:a="Type and press Enter to add tags...",helperText:n,error:l=!1,inputValue:s="",tags:d=[],left:u,right:c,shadow:m={},views:g={},size:h="md",shape:f="default",variant:y="default",isDisabled:x=!1,isReadOnly:b=!1,isAutoFocus:k=!1,isRemovable:j=!0,isFocused:w=!1,isHovered:C=!1,maxTags:S,handleInputChange:v,handleKeyDown:I,handleFocus:F,handleBlur:W,removeTag:E,setIsHovered:T,onClick:A,setInputValue:P,setTags:z,setIsFocused:R,addTag:H,filteredItems:M,activeItemIndex:D,isMenuOpen:L,handleMenuItemSelect:V,defaultTags:O,onTagsChange:_,onTagAdd:q,onTagRemove:B,minTagLength:X,maxTagLength:$,allowDuplicates:U,separators:K,menuItems:ee,onMenuItemSelect:J,onFocus:oe,onBlur:ne,validateTag:re,...G})=>{const{getColor:Q,themeMode:te}=i.useTheme(),Y=!!(t&&(w||d.length>0||s)),Z=S&&d.length>=S,ie={border:"none",outline:"none",backgroundColor:"transparent",fontSize:i.Typography.fontSizes[h],color:x?"color-gray-400":"color-gray-800",flex:1,minWidth:"120px",transition:"all 0.2s ease-in-out",...g==null?void 0:g.input};return r.jsx(Ne,{error:!!l,helperText:typeof l=="string"?l:n,views:g,...G,children:r.jsxs(Je,{label:t,shadow:m,value:d.length>0||s?"has-content":"",size:h,shape:f,variant:y,error:!!l,showLabel:Y,isFocused:w,isHovered:C,isDisabled:x,isReadOnly:b,views:{...g,container:{...g==null?void 0:g.container,...g==null?void 0:g.inputContainer}},onClick:A,onMouseEnter:()=>T==null?void 0:T(!0),onMouseLeave:()=>T==null?void 0:T(!1),children:[u,r.jsxs(Wo,{children:[t&&r.jsx(no,{size:h,error:!!l,views:g,children:t}),r.jsxs(i.Horizontal,{alignItems:"center",gap:8,flexWrap:"wrap",width:"100%",minHeight:i.Typography.fontSizes[h],padding:"8px 0",...g==null?void 0:g.tagsContainer,children:[d.map((de,xe)=>r.jsx(vg,{tag:de.value,onRemove:()=>E==null?void 0:E(xe),isRemovable:j,size:h,views:g,isDisabled:x,isReadOnly:b},de.id)),!Z&&r.jsx(i.Input,{id:e,name:o,type:"text",value:s,placeholder:d.length===0?a:"",disabled:x,readOnly:b,autoFocus:k,onChange:v,onKeyDown:I,onFocus:F,onBlur:W,autoComplete:"off",...ie}),Z&&r.jsxs(i.Text,{fontSize:i.Typography.fontSizes[h],color:"color-gray-500",fontStyle:"italic",...g==null?void 0:g.placeholder,children:["Maximum ",S," tags reached"]})]})]}),c]})})},Tg=e=>{const o=Cl(e),{tags:t,...a}=e;return r.jsx(Sl,{...o,...a})},Ig=Tg;function Fg(e){const o=setTimeout(e,0),t=setTimeout(e,10),a=setTimeout(e,50);return[o,t,a]}const jl=({value:e,defaultValue:o="",length:t=6,onChange:a,onChangeText:n,onComplete:l,onKeyDown:s,onKeyPress:d,onBlur:u,onFocus:c,isReadOnly:m,isDisabled:g,pattern:h,stepValues:f,pasteTransformer:y})=>{var B,X;const x=e!==void 0,b=x?e:o,[k,j]=p.useState(String(b??"").slice(0,t)||""),[w,C]=p.useState(!1),[S,v]=p.useState(!1),[I,F]=p.useState(null),[W,E]=p.useState(null),T=p.useRef(null),A=p.useRef(null),P=p.useRef({value:k,onChange:a||(()=>{}),isIOS:typeof window<"u"&&((X=(B=window==null?void 0:window.CSS)==null?void 0:B.supports)==null?void 0:X.call(B,"-webkit-touch-callout","none"))}),z=p.useRef({prev:[null,null,"none"]}),R=h?typeof h=="string"?new RegExp(h):h:null;p.useEffect(()=>{x&&e!==k&&j(String(e??"").slice(0,t)||"")},[x,e,t,k]);const H=p.useCallback($=>{let U=$;if(f&&f.length>0&&$){const K=parseInt($,10);if(!isNaN(K)){let ee=f[0],J=Math.abs(K-ee);for(let oe=1;oe<f.length;oe++){const ne=Math.abs(K-f[oe]);ne<J&&(J=ne,ee=f[oe])}U=ee.toString()}}j(U),a&&a(U),n&&n(U),l&&U.length===t&&l(U)},[a,n,l,t,f]),M=p.useCallback($=>{$&&T.current!==$&&Object.defineProperty(T,"current",{value:$,writable:!0})},[]),D=p.useCallback($=>{const U=$.currentTarget.value.slice(0,t);if(U.length>0&&R&&!R.test(U)){$.preventDefault();return}H(U),T.current&&(T.current.value=U)},[t,R,H,T]),L=p.useCallback(()=>{var $;if(T.current){const U=Math.min(T.current.value.length,t-1),K=T.current.value.length;($=T.current)==null||$.setSelectionRange(U,K),F(U),E(K)}C(!0)},[t]),V=p.useCallback(()=>{C(!1)},[]),O=p.useCallback($=>{s&&s($)},[]),_=p.useCallback($=>{d&&d($)},[]),q=p.useCallback($=>{const U=T.current;if(!$.clipboardData||!U)return;const K=$.clipboardData.getData("text/plain"),ee=y?y(K):K;$.preventDefault();const J=U.selectionStart||0,oe=U.selectionEnd||0,G=(J!==oe?k.slice(0,J)+ee+k.slice(oe):k.slice(0,J)+ee+k.slice(J)).slice(0,t);if(G.length>0&&R&&!R.test(G))return;U.value=G,H(G),j(G);const Q=Math.min(G.length,t-1),te=G.length;U.setSelectionRange(Q,te),F(Q),E(te)},[t,y,R,H,k,j]);return p.useEffect(()=>{const $=T.current,U=A.current;if(!$||!U)return;P.current.value!==$.value&&P.current.onChange&&P.current.onChange($.value),z.current.prev=[$.selectionStart,$.selectionEnd,$.selectionDirection];function K(){if(document.activeElement!==$){F(null),E(null);return}const oe=($==null?void 0:$.selectionStart)??null,ne=($==null?void 0:$.selectionEnd)??null,re=($==null?void 0:$.selectionDirection)??null,G=($==null?void 0:$.maxLength)??0,Q=($==null?void 0:$.value)??"",te=z.current.prev;let Y=-1,Z=-1,ie="none";if(Q.length!==0&&oe!==null&&ne!==null){const $e=oe===ne,Ur=oe===Q.length&&Q.length<G;if($e&&!Ur){const Re=oe;if(Re===0)Y=0,Z=1,ie="forward";else if(Re===G)Y=Re-1,Z=Re,ie="backward";else if(G>1&&Q.length>1){let ar=0;if(te[0]!==null&&te[1]!==null){ie=Re<te[1]?"backward":"forward";const Gr=te[0]===te[1]&&te[0]<G;ie==="backward"&&!Gr&&(ar=-1)}Y=ar+Re,Z=ar+Re+1}}Y!==-1&&Z!==-1&&Y!==Z&&T.current&&T.current.setSelectionRange(Y,Z,ie)}const de=Y!==-1?Y:oe,xe=Z!==-1?Z:ne,Ae=ie!=="none"?ie:re;F(de),E(xe),z.current.prev=[de,xe,Ae]}document.addEventListener("selectionchange",K,{capture:!0}),K(),document.activeElement===$&&C(!0);const ee=()=>{U&&U.style.setProperty("--root-height",`${$.clientHeight}px`)};ee();const J=new window.ResizeObserver(ee);return J.observe($),()=>{document.removeEventListener("selectionchange",K,{capture:!0}),J.disconnect()}},[]),p.useEffect(()=>{Fg(()=>{var ee,J,oe,ne;(ee=T.current)==null||ee.dispatchEvent(new Event("input"));const $=(J=T.current)==null?void 0:J.selectionStart,U=(oe=T.current)==null?void 0:oe.selectionEnd,K=(ne=T.current)==null?void 0:ne.selectionDirection;$!==null&&U!==null&&$!==void 0&&U!==void 0&&(F($),E(U),z.current.prev=[$,U,K||"none"])})},[k,w]),{value:k,setValue:H,isFocused:w,setIsFocused:C,isHovered:S,setIsHovered:v,inputRef:T,containerRef:A,mirrorSelectionStart:I,mirrorSelectionEnd:W,setMirrorSelectionStart:F,setMirrorSelectionEnd:E,setInputRef:M,handleChange:D,handleFocus:L,handleBlur:V,handleKeyDown:O,handleKeyPress:_,handlePaste:q}},Rg=p.createContext({slots:[],isFocused:!1,isHovering:!1}),zg=`
|
|
7
7
|
@keyframes blink {
|
|
8
8
|
0%, 100% { opacity: 1; }
|
|
9
9
|
50% { opacity: 0; }
|
|
@@ -20,17 +20,17 @@
|
|
|
20
20
|
border-radius: 4px !important;
|
|
21
21
|
width: 100% !important;
|
|
22
22
|
}
|
|
23
|
-
`;function uo(e,o){try{e.insertRule(o)}catch{console.error("input-otp could not insert CSS rule:",o)}}const Si=({id:e,name:o,label:r,value:n="",length:a=6,onChange:i,onChangeText:s,onComplete:m,helperText:d,placeholder:c="",shadow:p,views:h={},size:f="md",shape:g="rounded",variant:x="outline",gap:b=8,type:y="text",error:k=!1,isFocused:S=!1,isHovered:w=!1,isDisabled:C=!1,isReadOnly:j=!1,isAutoFocus:v=!1,setValue:I,setIsFocused:F,setIsHovered:W,inputRef:E,containerRef:T,mirrorSelectionStart:A,mirrorSelectionEnd:P,setMirrorSelectionStart:z,setMirrorSelectionEnd:R,handlePaste:H,handleChange:M,handleFocus:D,handleBlur:B,handleKeyDown:V,handleKeyPress:L,secureTextEntry:_,isFirstColumn:q,stepValues:O,setInputRef:Y,onBlur:$=()=>{},onClick:U=()=>{},onFocus:K=()=>{},onKeyPress:ee,pattern:J,pasteTransformer:oe,...ae})=>{l.useTheme();const te=!!r,G=u.useMemo(()=>({slots:Array.from({length:a}).map((X,Z)=>{const le=S&&A!==null&&P!==null&&(A===P&&Z===A||Z>=A&&Z<P),de=n[Z]!==void 0?n[Z]:null,be=n[0]!==void 0?null:(c==null?void 0:c[Z])??null;return{char:de,placeholderChar:be,isActive:le,hasFakeCaret:le&&de===null}}),isFocused:S,isHovering:!C&&w}),[S,w,C,a,P,A,c,n]);u.useEffect(()=>{v&&E.current&&E.current.focus()},[v,E]),u.useEffect(()=>{if(!document.getElementById("input-otp-style")){const X=document.createElement("style");if(X.id="input-otp-style",document.head.appendChild(X),X.sheet){const Z="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;";uo(X.sheet,"@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: 0; } }"),uo(X.sheet,"[data-input-otp]::selection { background: transparent !important; color: transparent !important; }"),uo(X.sheet,`[data-input-otp]:autofill { ${Z} }`),uo(X.sheet,`[data-input-otp]:-webkit-autofill { ${Z} }`),uo(X.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; } }"),uo(X.sheet,"[data-input-otp] + * { pointer-events: all !important; }")}}},[]);const Q=()=>t.jsx(l.Horizontal,{gap:b,width:"100%",justifyContent:"center",minHeight:f==="xs"?"32px":f==="sm"?"36px":f==="md"?"40px":f==="lg"?"48px":"56px",...h.container,children:G.slots.map((X,Z)=>t.jsxs(Xe,{size:f,error:k,shape:g,views:h,variant:x,value:X.char||"",color:"theme-primary",isHovered:w,isDisabled:C,isReadOnly:j,isFocused:X.isActive,showLabel:!1,onMouseEnter:()=>W(!0),onMouseLeave:()=>W(!1),justifyContent:"center",alignItems:"center",width:"100%",position:"relative",height:f==="xs"?"32px":f==="sm"?"36px":f==="md"?"40px":f==="lg"?"48px":"56px",...h.container,children:[X.char?t.jsx(l.View,{textAlign:"center",fontSize:f==="xs"?"14px":f==="sm"?"16px":f==="md"?"18px":f==="lg"?"20px":"24px",fontWeight:"medium",...h.text,children:y==="password"?"•":X.char}):X.placeholderChar?t.jsx(l.View,{textAlign:"center",fontSize:f==="xs"?"14px":f==="sm"?"16px":f==="md"?"18px":f==="lg"?"20px":"24px",color:"color-gray-400",opacity:.5,...h.text,children:X.placeholderChar}):null,X.hasFakeCaret&&t.jsx(l.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}-${Z}`))}),re={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 t.jsxs(t.Fragment,{children:[t.jsx("noscript",{children:t.jsx("style",{children:C0})}),t.jsxs(Le,{helperText:d,error:k,views:h,...ae,children:[te&&t.jsx(ro,{htmlFor:e,color:"theme-primary",error:k,...h.label,children:r}),t.jsxs(l.View,{ref:T,"data-input-otp-container":!0,position:"relative",cursor:C?"default":"text",userSelect:"none",pointerEvents:"none",children:[t.jsx(k0.Provider,{value:G,children:Q()}),t.jsx(l.View,{position:"absolute",inset:0,pointerEvents:"none",children:t.jsx(l.Input,{ref:X=>Y(X),"data-input-otp":!0,"data-input-otp-placeholder-shown":n.length===0||void 0,"data-input-otp-mss":A,"data-input-otp-mse":P,id:e||o,name:o,type:y==="password"?"password":"text",inputMode:y!=="password"?"numeric":void 0,pattern:"[0-9]*",maxLength:a,readOnly:j,disabled:C,placeholder:c,value:n,onChange:M,onKeyDown:V,onPaste:H,onFocus:D,onBlur:B,onClick:U,onMouseOver:()=>W(!0),onMouseLeave:()=>W(!1),autoComplete:"one-time-code","aria-label":`OTP input with ${a} digits`,style:re,...h.input})})]})]})]})},S0=e=>{const{value:o}=e,{value:r,setValue:n,isFocused:a,setIsFocused:i,isHovered:s,setIsHovered:m,inputRef:d,containerRef:c,mirrorSelectionStart:p,mirrorSelectionEnd:h,setMirrorSelectionStart:f,setMirrorSelectionEnd:g,setInputRef:x,handleChange:b,handleFocus:y,handleBlur:k,handleKeyDown:S,handlePaste:w,handleKeyPress:C}=Ci(e),j=o!==void 0?o:r;return t.jsx(Si,{...e,value:String(j??""),setValue:n,isFocused:a,setIsFocused:i,isHovered:s,setIsHovered:m,inputRef:d,containerRef:c,mirrorSelectionStart:p,mirrorSelectionEnd:h,setMirrorSelectionStart:f,setMirrorSelectionEnd:g,setInputRef:x,handleChange:b,handleFocus:y,handleBlur:k,handleKeyDown:S,handleKeyPress:C,handlePaste:w,stepValues:e.stepValues})},ji=S0,wi=u.createContext({active:!1,focusNextInput:()=>{},setInputRef:()=>{},handleSubmitEditing:()=>{},getReturnKeyType:()=>"next"}),j0=()=>u.useContext(wi),w0=({children:e,autoFocus:o=!1,initFocus:r,onChange:n=()=>{},...a})=>{const i=We.useFormikContext();u.useEffect(()=>{n(i.values)},[i.values]);const s=u.useRef({}),m=u.useRef([]),d=(h,f)=>{s.current[h]=f,m.current.includes(h)||m.current.push(h)},c=h=>{var f;if(o){const x=m.current.indexOf(h)+1;x<m.current.length?(f=s.current[m.current[x]])==null||f.focus():i.onSubmit&&i.onSubmit(i.values)}},p={active:o,focusNextInput:c,setInputRef:d,handleSubmitEditing:c,getReturnKeyType:h=>m.current.indexOf(h)===m.current.length-1?"done":"next"};return u.useEffect(()=>{var h,f;o&&(r&&s.current[r]?(h=s.current[r])==null||h.focus():m.current[0]&&((f=s.current[m.current[0]])==null||f.focus()))},[o,r]),t.jsx(wi.Provider,{value:p,children:t.jsx(l.Form,{...a,children:e})})},v0=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{}}},fe=({name:e,type:o,...r})=>{const n=j0(),{touched:a,errors:i,submitCount:s,values:m,setFieldTouched:d,setFieldValue:c}=We.useFormikContext(),p=k=>{var S;c(e,k),(S=r.onChangeText)==null||S.call(r,k)},h=k=>{var S;c(e,k),(S=r.onChange)==null||S.call(r,k)},f=()=>{d(e,!0)},g=k=>{k.key==="Enter"&&(k.preventDefault(),n.focusNextInput(e))},x=["text","password","email","digits"].includes(o),b=We.getIn(a,e)||s>0?We.getIn(i,e):void 0,y=We.getIn(m,e);return{...v0(o),...r,value:y,error:b,onBlur:f,onKeyPress:g,...x?{onChangeText:p}:{onChange:h},...n.active?{handleKeyPress:g}:{}}},T0=e=>{let{value:o,...r}=fe(e);r.isChecked=o;const n=ai(e);return t.jsx(ii,{...n,...r})},I0=T0,vi=({defaultIsSelected:e=!1,isChecked:o})=>{const[r,n]=u.useState(!1),[a,i]=u.useState(o!==void 0?o:e);return u.useEffect(()=>{o!==void 0&&i(o)},[o]),{isHovered:r,setIsHovered:n,isSelected:a,setIsSelected:i}},F0={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"}},R0={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"}},z0={selected:{borderColor:"theme-primary",borderWidth:"2px",borderStyle:"solid"},unselected:{borderWidth:"2px",borderStyle:"solid",borderColor:"color-gray-300",style:{backgroundColor:"transparent"}}},M0={selected:{backgroundColor:"theme-primary"},unselected:{style:{backgroundColor:"transparent"}}},Zt={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"}}},er={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"}}}},Ti=({id:e,icon:o,name:r,label:n,value:a,isChecked:i,onChange:s,onValueChange:m,shadow:d={},labelPosition:c="right",size:p="md",error:h=!1,isSelected:f=!1,isHovered:g=!1,isDisabled:x=!1,isReadOnly:b=!1,defaultIsSelected:y=!1,setIsSelected:k=()=>{},setIsHovered:S=()=>{},views:w={radio:{},label:{}},infoText:C,helperText:j,...v})=>{const I=()=>S(!g),F=()=>{!b&&!x&&(k&&k(!0),s&&s(a),m&&m(a))},W=i||f?"selected":"unselected",E=h?Zt.error[W]:x?Zt.disabled[W]:g?Zt.hover[W]:{},T=h?er.error[W]:x?er.disabled[W]:g?er.hover[W]:{},A={container:{gap:8,display:"flex",height:"fit-content",flexDirection:"column",width:"fit-content",selected:{borderColor:"theme-primary"},color:h?"color-red-600":x?"color-gray-400":"inherit",cursor:x?"not-allowed":b?"default":"pointer",opacity:x?.6:1,transition:"all 0.2s ease-in-out",...w.label},radio:{...z0[W],...E,borderRadius:"50%",selected:{backgroundColor:"theme-primary"},backgroundColor:"color-white",...F0[p],transition:"all 0.2s ease-in-out",...d,...w.radio},dot:{...M0[W],...T,borderRadius:"50%",...R0[p],transition:"all 0.2s ease-in-out"}};return t.jsxs(Xo,{htmlFor:e,as:"div",onClick:F,onMouseEnter:I,onMouseLeave:I,size:l.Typography.fontSizes[p],...A.container,...v,children:[t.jsxs(l.Vertical,{gap:8,children:[" ",t.jsxs(l.Horizontal,{gap:12,alignItems:"center",children:[" ",c==="left"&&n&&t.jsx(l.Text,{size:p,fontWeight:"500",...w==null?void 0:w.label,children:n}),t.jsx(l.Center,{...A.radio,children:(i||f)&&t.jsx(l.View,{...A.dot})}),c==="right"&&n&&t.jsx(l.Text,{size:p,fontWeight:"500",...w==null?void 0:w.label,children:n})]}),C&&t.jsx(l.Text,{marginLeft:c==="left"?0:36,color:"color-gray-500",size:"sm",fontWeight:"400",lineHeight:"20px",...w==null?void 0:w.infoText,children:C})]}),h&&t.jsx(l.Text,{size:"xs",marginTop:4,marginHorizontal:0,color:"color-red-500",fontWeight:"500",transition:"color 0.2s ease, opacity 0.2s ease",children:h})]})},W0=e=>{let{value:o,...r}=fe(e);r.isChecked=o===e.value;const n=vi(e);return t.jsx(Ti,{...n,...r})},H0=W0,Ii=e=>{const{value:o,onChange:r,onSubmit:n,autoFocus:a=!0,loading:i=!1,disabled:s=!1,isAgentRunning:m=!1,onStopAgent:d,sandboxId:c,onUploadProgress:p,onUploadSuccess:h,onUploadError:f,onFileUpload:g}=e,x=o!==void 0&&r!==void 0,[b,y]=u.useState(""),k=x?o:b,[S,w]=u.useState([]),[C,j]=u.useState([]),[v,I]=u.useState(!1),[F,W]=u.useState(0),[E,T]=u.useState([]),[A,P]=u.useState(!1),z=u.useRef(null),[R,H]=u.useState(!1),[M,D]=u.useState("gpt-4"),[B]=u.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"}]),V=u.useRef(null),L=u.useRef(null),[_,q]=u.useState(e.showGuideTip||!1);u.useEffect(()=>{a&&V.current&&V.current.focus()},[a]),u.useEffect(()=>()=>{S.forEach(X=>{})},[S]);const O=X=>{x&&r?r(X):y(X)},Y=X=>{if(X.preventDefault(),!k.trim()&&S.length===0||i||s&&!m)return;if(m&&d){d();return}let Z=k;if(S.length>0){const be=S.map(Pe=>`[Uploaded File: ${URL.createObjectURL(Pe)}}]`).join(`
|
|
23
|
+
`;function go(e,o){try{e.insertRule(o)}catch{console.error("input-otp could not insert CSS rule:",o)}}const wl=({id:e,name:o,label:t,value:a="",length:n=6,onChange:l,onChangeText:s,onComplete:d,helperText:u,placeholder:c="",shadow:m,views:g={},size:h="md",shape:f="rounded",variant:y="outline",gap:x=8,type:b="text",error:k=!1,isFocused:j=!1,isHovered:w=!1,isDisabled:C=!1,isReadOnly:S=!1,isAutoFocus:v=!1,setValue:I,setIsFocused:F,setIsHovered:W,inputRef:E,containerRef:T,mirrorSelectionStart:A,mirrorSelectionEnd:P,setMirrorSelectionStart:z,setMirrorSelectionEnd:R,handlePaste:H,handleChange:M,handleFocus:D,handleBlur:L,handleKeyDown:V,handleKeyPress:O,secureTextEntry:_,isFirstColumn:q,stepValues:B,setInputRef:X,onBlur:$=()=>{},onClick:U=()=>{},onFocus:K=()=>{},onKeyPress:ee,pattern:J,pasteTransformer:oe,...ne})=>{i.useTheme();const re=!!t,G=p.useMemo(()=>({slots:Array.from({length:n}).map((Y,Z)=>{const ie=j&&A!==null&&P!==null&&(A===P&&Z===A||Z>=A&&Z<P),de=a[Z]!==void 0?a[Z]:null,xe=a[0]!==void 0?null:(c==null?void 0:c[Z])??null;return{char:de,placeholderChar:xe,isActive:ie,hasFakeCaret:ie&&de===null}}),isFocused:j,isHovering:!C&&w}),[j,w,C,n,P,A,c,a]);p.useEffect(()=>{v&&E.current&&E.current.focus()},[v,E]),p.useEffect(()=>{if(!document.getElementById("input-otp-style")){const Y=document.createElement("style");if(Y.id="input-otp-style",document.head.appendChild(Y),Y.sheet){const Z="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;";go(Y.sheet,"@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: 0; } }"),go(Y.sheet,"[data-input-otp]::selection { background: transparent !important; color: transparent !important; }"),go(Y.sheet,`[data-input-otp]:autofill { ${Z} }`),go(Y.sheet,`[data-input-otp]:-webkit-autofill { ${Z} }`),go(Y.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; } }"),go(Y.sheet,"[data-input-otp] + * { pointer-events: all !important; }")}}},[]);const Q=()=>r.jsx(i.Horizontal,{gap:x,width:"100%",justifyContent:"center",minHeight:h==="xs"?"32px":h==="sm"?"36px":h==="md"?"40px":h==="lg"?"48px":"56px",...g.container,children:G.slots.map((Y,Z)=>r.jsxs(Je,{size:h,error:k,shape:f,views:g,variant:y,value:Y.char||"",color:"theme-primary",isHovered:w,isDisabled:C,isReadOnly:S,isFocused:Y.isActive,showLabel:!1,onMouseEnter:()=>W(!0),onMouseLeave:()=>W(!1),justifyContent:"center",alignItems:"center",width:"100%",position:"relative",height:h==="xs"?"32px":h==="sm"?"36px":h==="md"?"40px":h==="lg"?"48px":"56px",...g.container,children:[Y.char?r.jsx(i.View,{textAlign:"center",fontSize:h==="xs"?"14px":h==="sm"?"16px":h==="md"?"18px":h==="lg"?"20px":"24px",fontWeight:"medium",...g.text,children:b==="password"?"•":Y.char}):Y.placeholderChar?r.jsx(i.View,{textAlign:"center",fontSize:h==="xs"?"14px":h==="sm"?"16px":h==="md"?"18px":h==="lg"?"20px":"24px",color:"color-gray-400",opacity:.5,...g.text,children:Y.placeholderChar}):null,Y.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}-${Z}`))}),te={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:zg})}),r.jsxs(Ne,{helperText:u,error:k,views:g,...ne,children:[re&&r.jsx(no,{htmlFor:e,color:"theme-primary",error:k,...g.label,children:t}),r.jsxs(i.View,{ref:T,"data-input-otp-container":!0,position:"relative",cursor:C?"default":"text",userSelect:"none",pointerEvents:"none",children:[r.jsx(Rg.Provider,{value:G,children:Q()}),r.jsx(i.View,{position:"absolute",inset:0,pointerEvents:"none",children:r.jsx(i.Input,{ref:Y=>X(Y),"data-input-otp":!0,"data-input-otp-placeholder-shown":a.length===0||void 0,"data-input-otp-mss":A,"data-input-otp-mse":P,id:e||o,name:o,type:b==="password"?"password":"text",inputMode:b!=="password"?"numeric":void 0,pattern:"[0-9]*",maxLength:n,readOnly:S,disabled:C,placeholder:c,value:a,onChange:M,onKeyDown:V,onPaste:H,onFocus:D,onBlur:L,onClick:U,onMouseOver:()=>W(!0),onMouseLeave:()=>W(!1),autoComplete:"one-time-code","aria-label":`OTP input with ${n} digits`,style:te,...g.input})})]})]})]})},Mg=e=>{const{value:o}=e,{value:t,setValue:a,isFocused:n,setIsFocused:l,isHovered:s,setIsHovered:d,inputRef:u,containerRef:c,mirrorSelectionStart:m,mirrorSelectionEnd:g,setMirrorSelectionStart:h,setMirrorSelectionEnd:f,setInputRef:y,handleChange:x,handleFocus:b,handleBlur:k,handleKeyDown:j,handlePaste:w,handleKeyPress:C}=jl(e),S=o!==void 0?o:t;return r.jsx(wl,{...e,value:String(S??""),setValue:a,isFocused:n,setIsFocused:l,isHovered:s,setIsHovered:d,inputRef:u,containerRef:c,mirrorSelectionStart:m,mirrorSelectionEnd:g,setMirrorSelectionStart:h,setMirrorSelectionEnd:f,setInputRef:y,handleChange:x,handleFocus:b,handleBlur:k,handleKeyDown:j,handleKeyPress:C,handlePaste:w,stepValues:e.stepValues})},vl=Mg,Tl=p.createContext({active:!1,focusNextInput:()=>{},setInputRef:()=>{},handleSubmitEditing:()=>{},getReturnKeyType:()=>"next"}),Wg=()=>p.useContext(Tl),Hg=({children:e,autoFocus:o=!1,initFocus:t,onChange:a=()=>{},...n})=>{const l=He.useFormikContext();p.useEffect(()=>{a(l.values)},[l.values]);const s=p.useRef({}),d=p.useRef([]),u=(g,h)=>{s.current[g]=h,d.current.includes(g)||d.current.push(g)},c=g=>{var h;if(o){const y=d.current.indexOf(g)+1;y<d.current.length?(h=s.current[d.current[y]])==null||h.focus():l.onSubmit&&l.onSubmit(l.values)}},m={active:o,focusNextInput:c,setInputRef:u,handleSubmitEditing:c,getReturnKeyType:g=>d.current.indexOf(g)===d.current.length-1?"done":"next"};return p.useEffect(()=>{var g,h;o&&(t&&s.current[t]?(g=s.current[t])==null||g.focus():d.current[0]&&((h=s.current[d.current[0]])==null||h.focus()))},[o,t]),r.jsx(Tl.Provider,{value:m,children:r.jsx(i.Form,{...n,children:e})})},Pg=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{}}},he=({name:e,type:o,...t})=>{const a=Wg(),{touched:n,errors:l,submitCount:s,values:d,setFieldTouched:u,setFieldValue:c}=He.useFormikContext(),m=k=>{var j;c(e,k),(j=t.onChangeText)==null||j.call(t,k)},g=k=>{var j;c(e,k),(j=t.onChange)==null||j.call(t,k)},h=()=>{u(e,!0)},f=k=>{k.key==="Enter"&&(k.preventDefault(),a.focusNextInput(e))},y=["text","password","email","digits"].includes(o),x=He.getIn(n,e)||s>0?He.getIn(l,e):void 0,b=He.getIn(d,e);return{...Pg(o),...t,value:b,error:x,onBlur:h,onKeyPress:f,...y?{onChangeText:m}:{onChange:g},...a.active?{handleKeyPress:f}:{}}},Ag=e=>{let{value:o,...t}=he(e);t.isChecked=o;const a=il(e);return r.jsx(sl,{...a,...t})},Vg=Ag,Il=({defaultIsSelected:e=!1,isChecked:o})=>{const[t,a]=p.useState(!1),[n,l]=p.useState(o!==void 0?o:e);return p.useEffect(()=>{o!==void 0&&l(o)},[o]),{isHovered:t,setIsHovered:a,isSelected:n,setIsSelected:l}},Eg={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"}},Dg={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"}},$g={selected:{borderColor:"theme-primary",borderWidth:"2px",borderStyle:"solid"},unselected:{borderWidth:"2px",borderStyle:"solid",borderColor:"color-gray-300",style:{backgroundColor:"transparent"}}},Lg={selected:{backgroundColor:"theme-primary"},unselected:{style:{backgroundColor:"transparent"}}},et={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"}}}},Fl=({id:e,icon:o,name:t,label:a,value:n,isChecked:l,onChange:s,onValueChange:d,shadow:u={},labelPosition:c="right",size:m="md",error:g=!1,isSelected:h=!1,isHovered:f=!1,isDisabled:y=!1,isReadOnly:x=!1,defaultIsSelected:b=!1,setIsSelected:k=()=>{},setIsHovered:j=()=>{},views:w={radio:{},label:{}},infoText:C,helperText:S,...v})=>{const I=()=>j(!f),F=()=>{!x&&!y&&(k&&k(!0),s&&s(n),d&&d(n))},W=l||h?"selected":"unselected",E=g?et.error[W]:y?et.disabled[W]:f?et.hover[W]:{},T=g?ot.error[W]:y?ot.disabled[W]:f?ot.hover[W]:{},A={container:{gap:8,display:"flex",height:"fit-content",flexDirection:"column",width:"fit-content",selected:{borderColor:"theme-primary"},color:g?"color-red-600":y?"color-gray-400":"inherit",cursor:y?"not-allowed":x?"default":"pointer",opacity:y?.6:1,transition:"all 0.2s ease-in-out",...w.label},radio:{...$g[W],...E,borderRadius:"50%",selected:{backgroundColor:"theme-primary"},backgroundColor:"color-white",...Eg[m],transition:"all 0.2s ease-in-out",...u,...w.radio},dot:{...Lg[W],...T,borderRadius:"50%",...Dg[m],transition:"all 0.2s ease-in-out"}};return r.jsxs(Jo,{htmlFor:e,as:"div",onClick:F,onMouseEnter:I,onMouseLeave:I,size:i.Typography.fontSizes[m],...A.container,...v,children:[r.jsxs(i.Vertical,{gap:8,children:[" ",r.jsxs(i.Horizontal,{gap:12,alignItems:"center",children:[" ",c==="left"&&a&&r.jsx(i.Text,{size:m,fontWeight:"500",...w==null?void 0:w.label,children:a}),r.jsx(i.Center,{...A.radio,children:(l||h)&&r.jsx(i.View,{...A.dot})}),c==="right"&&a&&r.jsx(i.Text,{size:m,fontWeight:"500",...w==null?void 0:w.label,children:a})]}),C&&r.jsx(i.Text,{marginLeft:c==="left"?0:36,color:"color-gray-500",size:"sm",fontWeight:"400",lineHeight:"20px",...w==null?void 0:w.infoText,children:C})]}),g&&r.jsx(i.Text,{size:"xs",marginTop:4,marginHorizontal:0,color:"color-red-500",fontWeight:"500",transition:"color 0.2s ease, opacity 0.2s ease",children:g})]})},_g=e=>{let{value:o,...t}=he(e);t.isChecked=o===e.value;const a=Il(e);return r.jsx(Fl,{...a,...t})},Bg=_g,Rl=e=>{const{value:o,onChange:t,onSubmit:a,autoFocus:n=!0,loading:l=!1,disabled:s=!1,isAgentRunning:d=!1,onStopAgent:u,sandboxId:c,onUploadProgress:m,onUploadSuccess:g,onUploadError:h,onFileUpload:f}=e,y=o!==void 0&&t!==void 0,[x,b]=p.useState(""),k=y?o:x,[j,w]=p.useState([]),[C,S]=p.useState([]),[v,I]=p.useState(!1),[F,W]=p.useState(0),[E,T]=p.useState([]),[A,P]=p.useState(!1),z=p.useRef(null),[R,H]=p.useState(!1),[M,D]=p.useState("gpt-4"),[L]=p.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"}]),V=p.useRef(null),O=p.useRef(null),[_,q]=p.useState(e.showGuideTip||!1);p.useEffect(()=>{n&&V.current&&V.current.focus()},[n]),p.useEffect(()=>()=>{j.forEach(Y=>{})},[j]);const B=Y=>{y&&t?t(Y):b(Y)},X=Y=>{if(Y.preventDefault(),!k.trim()&&j.length===0||l||s&&!d)return;if(d&&u){u();return}let Z=k;if(j.length>0){const xe=j.map(Ae=>`[Uploaded File: ${URL.createObjectURL(Ae)}}]`).join(`
|
|
24
24
|
`);Z=Z?`${Z}
|
|
25
25
|
|
|
26
|
-
${be}`:be}let le=M,de=!1;M.endsWith("-thinking")&&(le=M.replace(/-thinking$/,""),de=!0),n==null||n(Z,{model_name:le,enable_thinking:de}),x||y(""),w([]),j([])},$=X=>{w(Z=>Z.filter((le,de)=>de!==X)),!c&&C.length>X&&j(Z=>Z.filter((le,de)=>de!==X))},U=X=>{X.preventDefault(),X.stopPropagation(),H(!0)},K=X=>{X.preventDefault(),X.stopPropagation(),H(!1)},ee=u.useCallback(X=>{!X||X.length===0||(j(Z=>[...Z,...X]),w(Z=>[...Z,...X]),T(Z=>[...Z,...X]),I(!0))},[j,w]),J=u.useCallback(()=>{if(E.length>0&&!A&&g){P(!0);const X=E[0];z.current=X,W(0);try{g(X)}catch(Z){T(le=>le.slice(1)),P(!1),z.current=null,W(0),I(le=>E.length-1>0||!1),f==null||f(Z)}}else E.length===0&&v&&(I(!1),W(0))},[E,A,g,v,f]);u.useEffect(()=>{J()},[E,A,J]);const oe="active",ae=X=>!0,te=()=>{q(!1),e.onGuideClose&&e.onGuideClose()},G=X=>{x&&r?r(X.text):y(X.text),e.onPromptExampleSelect&&e.onPromptExampleSelect(X),V.current&&V.current.focus()},Q=u.useCallback(()=>C,[C]),re=u.useCallback(()=>j([]),[]);return{onSubmit:n,getPendingFiles:Q,clearPendingFiles:re,value:k,handleChange:O,handleSubmit:Y,editableRef:V,fileInputRef:L,isUploading:v,uploadProgress:F,isDraggingOver:R,uploadedFiles:S,pendingFiles:C,removeUploadedFile:$,setPendingFiles:j,setUploadedFiles:w,setIsUploading:I,startUpload:ee,selectedModel:M,handleModelChange:D,modelOptions:B,subscriptionStatus:oe,canAccessModel:ae,handleDragOver:U,handleDragLeave:K,isGuideTipShown:_,hideGuideTip:te,handlePromptExampleSelect:G}},P0={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}},zn={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"}},A0={default:{borderRadius:"8px"},square:{borderRadius:"0px"},rounded:{borderRadius:"8px"}},E0={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"}},V0={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"}},Mn=e=>`${e}-${Math.random().toString(36).substring(2,9)}`,D0=({openDelay:e=200,closeDelay:o=300}={})=>{const[r,n]=u.useState(!1),a=u.useRef(null),i=u.useRef(null),s=u.useRef(null),m=u.useRef(null),d=u.useMemo(()=>Mn("hovercard-content"),[]),c=u.useMemo(()=>Mn("hovercard-trigger"),[]),p=u.useCallback(()=>{a.current&&(clearTimeout(a.current),a.current=null),i.current&&(clearTimeout(i.current),i.current=null)},[]),h=u.useCallback(()=>{p(),r||(a.current=setTimeout(()=>{n(!0)},e))},[r,e,p]),f=u.useCallback(()=>{p(),r&&(i.current=setTimeout(()=>{n(!1)},o))},[r,o,p]),g=u.useCallback(()=>{i.current&&(clearTimeout(i.current),i.current=null)},[]);return u.useEffect(()=>()=>p(),[p]),{isOpen:r,openCard:h,closeCard:f,cancelCloseTimer:g,triggerRef:s,contentRef:m,contentId:d,triggerId:c}},Fi=u.createContext({isOpen:!1,openCard:()=>{},closeCard:()=>{},cancelCloseTimer:()=>{},triggerRef:{current:null},contentRef:{current:null},contentId:"",triggerId:""}),$0=({children:e,value:o})=>t.jsx(Fi.Provider,{value:o,children:e}),Ri=()=>{const e=u.useContext(Fi);if(!e)throw new Error("useHoverCardContext must be used within a HoverCardProvider");return e},B0=({children:e,views:o,asChild:r=!1,...n})=>{const{openCard:a,closeCard:i,triggerRef:s,contentId:m,triggerId:d}=Ri(),g={ref:s,onMouseEnter:()=>a(),onMouseLeave:()=>i(),onFocus:()=>a(),onBlur:()=>i(),id:d,"aria-describedby":m,...o==null?void 0:o.container,...n};if(r&&u.isValidElement(e)){const x=u.Children.only(e);return u.cloneElement(x,{...g,...x.props})}return t.jsx(l.View,{position:"relative",display:"inline-block",...g,children:e})},_0=({children:e,views:o,side:r="bottom",align:n="center",sideOffset:a=8,style:i,backgroundColor:s="white",borderRadius:m="4px",boxShadow:d="0px 2px 8px rgba(0, 0, 0, 0.15)",padding:c="12px",minWidth:p="50px",maxWidth:h="300px",...f})=>{const{isOpen:g,cancelCloseTimer:x,closeCard:b,contentRef:y,triggerRef:k,contentId:S,triggerId:w}=Ri(),{ref:C,relation:j}=l.useElementPosition({trackChanges:!0,trackOnHover:!0,trackOnScroll:!0,trackOnResize:!0});u.useEffect(()=>{k!=null&&k.current&&(C==null?void 0:C.current)!==k.current&&C&&(C.current=k.current)},[k,C,g]);const v=()=>x(),I=()=>b();if(!g)return null;const F=()=>{if(!j||!(k!=null&&k.current))return{position:"absolute",top:0,left:0,zIndex:1e3};const T=k.current.getBoundingClientRect();let A=r;r==="bottom"&&j.space.vertical==="top"?A="top":r==="top"&&j.space.vertical==="bottom"?A="bottom":r==="right"&&j.space.horizontal==="left"?A="left":r==="left"&&j.space.horizontal==="right"&&(A="right");let P=0,z=0;switch(A){case"bottom":P=T.left+T.width/2,z=T.bottom+a;break;case"top":P=T.left+T.width/2,z=T.top-a;break;case"right":P=T.right+a,z=T.top+T.height/2;break;case"left":P=T.left-a,z=T.top+T.height/2;break}return{position:"fixed",left:P,top:z,zIndex:1e3,transform:W(A)}},W=T=>{switch(T){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)"}},E=F();return t.jsx(l.View,{ref:y,id:S,role:"tooltip","aria-labelledby":w,onMouseEnter:v,onMouseLeave:I,backgroundColor:s,borderRadius:m,boxShadow:d,padding:c,minWidth:p,maxWidth:h,style:{...E,...i},...o==null?void 0:o.container,...f,children:e})},L0=({children:e,views:o,openDelay:r,closeDelay:n,...a})=>{const i=D0({openDelay:r,closeDelay:n});return t.jsx($0,{value:i,children:t.jsx(l.View,{position:"relative",display:"inline-block",...o==null?void 0:o.container,...a,children:e})})},Ce=L0;Ce.Trigger=B0;Ce.Content=_0;const O0=({files:e,sandboxId:o,onRemove:r,layout:n="inline",maxHeight:a="120px",showPreviews:i=!1,views:s={}})=>{if(e.length===0)return null;const m=u.useCallback(c=>c<1024?`${c} B`:c<1024*1024?`${(c/1024).toFixed(1)} KB`:`${(c/(1024*1024)).toFixed(1)} MB`,[]),d=u.useCallback(c=>c.type.startsWith("image/")?{backgroundColor:"#DBEAFE",color:"#2563EB"}:c.type.startsWith("video/")?{backgroundColor:"#EDE9FE",color:"#7C3AED"}:c.type.startsWith("audio/")?{backgroundColor:"#DCFCE7",color:"#16A34A"}:{backgroundColor:"#E2E8F0",color:"#475569"},[]);return t.jsx(l.View,{display:"flex",flexWrap:"wrap",gap:"8px",padding:"8px 0",maxHeight:a,overflowY:"auto",...s==null?void 0:s.container,children:e.map((c,p)=>{const h=(c==null?void 0:c.path)||(c==null?void 0:c.url)||(i?URL.createObjectURL(c):""),f=c.type.startsWith("image/"),g=c.type.startsWith("video/"),x=c.type.startsWith("audio/"),b=d(c);return i?t.jsx(l.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,...s==null?void 0:s.item,children:i&&t.jsxs(Ce,{children:[t.jsxs(Ce.Trigger,{children:[f&&t.jsx(l.Image,{src:h,alt:c.name,width:"60px",height:"60px",borderRadius:"8px",objectFit:"cover"}),g&&t.jsx(l.View,{as:"video",src:h,alt:c.name,controls:!1,muted:!0,width:"60px",height:"60px",borderRadius:"8px",objectFit:"cover"}),x&&t.jsx(l.Center,{width:"60px",height:"60px",borderRadius:"8px",backgroundColor:"color-gray-100",children:t.jsx(jo,{widthHeight:24,color:"color-black"})}),!f&&!g&&!x&&t.jsx(l.Center,{width:"60px",height:"60px",borderRadius:"8px",backgroundColor:"color-gray-100",children:t.jsx(oo,{widthHeight:24,color:"color-black"})}),r&&t.jsx(l.Button,{...P0.attachmentRemove,onClick:y=>{y.stopPropagation(),r(p)},"aria-label":`Remove ${c.name}`,children:"×"})]}),t.jsxs(Ce.Content,{children:[f&&t.jsx(l.Image,{src:h,alt:c.name,maxWidth:"100%"}),g&&t.jsx(l.View,{as:"video",src:h,controls:!0,maxWidth:"100%"}),x&&t.jsx(l.View,{as:"audio",src:h,controls:!0,width:"100%"}),t.jsxs(l.Text,{marginTop:"4px",maxLines:1,width:"100%",...s==null?void 0:s.name,children:[c.name," (",m(c.size),")"]})]})]})},p):t.jsxs(l.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,...s==null?void 0:s.item,children:[t.jsx(l.Center,{width:"22px",height:"22px",minWidth:"22px",borderRadius:"9999px",backgroundColor:b.backgroundColor,color:b.color,children:x?t.jsx(jo,{widthHeight:12,color:"currentColor"}):t.jsx(oo,{widthHeight:12,color:"currentColor"})}),t.jsxs(l.Text,{fontSize:"12px",lineHeight:"16px",color:"color-gray-600",maxLines:1,maxWidth:"220px",...s==null?void 0:s.name,children:[c.name," · ",m(c.size)]}),r&&t.jsx(l.View,{as:"button",type:"button",onClick:()=>r(p),"aria-label":`Remove ${c.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:"×"})]},p)})})},zi=u.forwardRef(({value:e,onChange:o,placeholder:r="Type your message...",disabled:n=!1,autoFocus:a=!0,suggestions:i=[],onSuggestionSelect:s,showSuggestions:m=!1,mentionData:d=[],mentionTrigger:c="@",onMentionSelect:p,maxHeight:h="200px",minHeight:f="40px",views:g={}},x)=>{var ae,te;const b=u.useRef(e),[y,k]=u.useState(-1),[S,w]=u.useState(!e),C=u.useRef(null),[j,v]=u.useState(!1),[I,F]=u.useState(!1),[W,E]=u.useState(""),[T,A]=u.useState(-1),[P,z]=u.useState(-1),[R,H]=u.useState([]),{ref:M,relation:D}=l.useElementPosition({trackChanges:!0,trackOnHover:!0,trackOnScroll:!0,trackOnResize:!0}),[B,V]=u.useState({x:0,y:0}),[L,_]=u.useState({x:0,y:0});u.useEffect(()=>{const G=x;G.current&&e!==b.current&&(G.current.textContent=e,b.current=e,w(!e))},[e,x]),u.useEffect(()=>{a&&x&&typeof x=="object"&&x.current&&x.current.focus()},[a,x]);const q=()=>{const G=window.getSelection();if(!G||G.rangeCount===0)return-1;const Q=G.getRangeAt(0),re=Q.cloneRange();return re.selectNodeContents(x&&typeof x=="object"&&x.current?x.current:document.body),re.setEnd(Q.endContainer,Q.endOffset),re.toString().length},O=u.useCallback((G,Q)=>{const re=G.substring(0,Q),X=re.lastIndexOf(c);if(X!==-1){const Z=re.substring(X+1);if(!Z.includes(" ")){const de=Z.toLowerCase(),be=d.filter(De=>De.name.toLowerCase().includes(de));E(de),A(X),H(be),F(be.length>0),z(0);const Pe=Y();V(Pe);return}}F(!1),E(""),A(-1),z(-1)},[d,c]);u.useEffect(()=>{C.current&&M&&(M.current=C.current)},[C,M]);const Y=u.useCallback((G=200)=>{if(!C.current)return{x:0,y:0};const Q=C.current.getBoundingClientRect();if(D){const le=D.space.vertical==="top";return{x:Q.left,y:le?Q.top-G-8:Q.bottom+8}}const re=window.innerHeight,X={top:Q.top,bottom:re-Q.bottom},Z=X.bottom<G+8&&X.top>X.bottom;return{x:Q.left,y:Z?Q.top-G-8:Q.bottom+8}},[D]),$=u.useCallback(()=>{v(!0);const G=Y();_(G)},[Y]),U=u.useCallback(()=>{setTimeout(()=>{v(!1),k(-1)},150)},[]),K=G=>{const Q=G.currentTarget.textContent||"";if(Q!==b.current){o(Q),b.current=Q,w(!Q);const re=q();O(Q,re)}},ee=u.useCallback(G=>{if(x&&typeof x=="object"&&x.current){const Q=x.current.textContent||"",re=Q.substring(0,T),X=Q.substring(T+c.length+W.length),Z=re+c+G.name+" "+X;o(Z),b.current=Z,x.current.textContent=Z;const le=re.length+c.length+G.name.length+1;setTimeout(()=>{var de;if(x.current){const be=document.createRange(),Pe=window.getSelection(),De=x.current.firstChild;De&&Pe&&(be.setStart(De,Math.min(le,((de=De.textContent)==null?void 0:de.length)||0)),be.collapse(!0),Pe.removeAllRanges(),Pe.addRange(be))}},0)}F(!1),E(""),A(-1),z(-1),p&&p(G)},[T,c,W,o,p,x]),J=u.useCallback(G=>{s&&s(G),k(-1)},[s]),oe=G=>{if(I&&R.length>0){if(G.key==="ArrowDown"){G.preventDefault(),z(Q=>Q<R.length-1?Q+1:0);return}if(G.key==="ArrowUp"){G.preventDefault(),z(Q=>Q>0?Q-1:R.length-1);return}if((G.key==="Tab"||G.key==="Enter")&&P>=0){G.preventDefault(),ee(R[P]);return}if(G.key==="Escape"){F(!1),z(-1);return}}if(m&&i.length>0){if(G.key==="ArrowDown"){G.preventDefault(),k(Q=>Q<i.length-1?Q+1:0);return}if(G.key==="ArrowUp"){G.preventDefault(),k(Q=>Q>0?Q-1:i.length-1);return}if(G.key==="Tab"&&y>=0){G.preventDefault(),J(i[y]);return}if(G.key==="Escape"){k(-1);return}}};return t.jsxs(l.View,{ref:C,width:"100%",position:"relative",...g==null?void 0:g.container,children:[t.jsxs(l.View,{width:"100%",minHeight:f,maxHeight:h,overflowY:"auto",position:"relative",children:[S&&t.jsx(l.Text,{position:"absolute",top:"8px",left:"8px",color:"color-gray-400",pointerEvents:"none",fontSize:"14px",zIndex:1,...g==null?void 0:g.placeholder,children:r}),t.jsx(l.View,{as:"div",ref:x,contentEditable:!n,suppressContentEditableWarning:!0,onInput:K,onKeyDown:oe,onFocus:$,onBlur:U,role:"textbox","aria-multiline":"true","aria-placeholder":r,width:"100%",minHeight:"24px",padding:"8px",outline:"none",whiteSpace:"pre-wrap",wordBreak:"break-word",fontSize:"14px",color:"color-gray-900",backgroundColor:"transparent",...g==null?void 0:g.input})]}),I&&R.length>0&&t.jsx(l.View,{position:"fixed",left:B.x,top:B.y,width:((ae=C.current)==null?void 0:ae.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",...g==null?void 0:g.mentionContainer,children:t.jsxs(l.Vertical,{gap:0,children:[R.map((G,Q)=>t.jsx(l.View,{as:"button",type:"button",width:"100%",padding:"12px 16px",backgroundColor:Q===P?"color-blue-50":"transparent",border:"none",cursor:"pointer",textAlign:"left",transition:"background-color 0.2s ease",onClick:()=>ee(G),onMouseEnter:()=>z(Q),_hover:{backgroundColor:"color-blue-50"},...g==null?void 0:g.mentionItem,children:t.jsxs(l.Vertical,{gap:4,children:[t.jsxs(l.Text,{fontSize:"14px",color:"color-gray-900",fontWeight:"medium",children:[c,G.name]}),G.description&&t.jsx(l.Text,{fontSize:"12px",color:"color-gray-600",children:G.description})]})},G.id)),process.env.NODE_ENV==="development"&&t.jsxs("div",{style:{fontSize:"8px",opacity:.7,padding:"4px"},children:["Mentions (Trigger: ",c,")",D&&t.jsxs(t.Fragment,{children:[t.jsx("br",{}),"Space: ",D.space.vertical,"-",D.space.horizontal]})]})]})}),m&&i.length>0&&!I&&j&&!e&&t.jsx(l.View,{position:"fixed",left:L.x,top:L.y,width:((te=C.current)==null?void 0:te.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",...g==null?void 0:g.suggestionsContainer,children:t.jsxs(l.Vertical,{gap:0,children:[i.map((G,Q)=>t.jsx(l.View,{as:"button",type:"button",width:"100%",padding:"12px 16px",backgroundColor:Q===y?"color-blue-50":"transparent",border:"none",cursor:"pointer",textAlign:"left",transition:"background-color 0.2s ease",onClick:()=>J(G),onMouseEnter:()=>k(Q),_hover:{backgroundColor:"color-blue-50"},...g==null?void 0:g.suggestionItem,children:t.jsxs(l.Vertical,{gap:4,children:[t.jsx(l.Text,{fontSize:"14px",color:"color-gray-900",fontWeight:"medium",children:G.text}),G.description&&t.jsx(l.Text,{fontSize:"12px",color:"color-gray-600",children:G.description})]})},G.id)),process.env.NODE_ENV==="development"&&t.jsxs("div",{style:{fontSize:"8px",opacity:.7,padding:"4px"},children:["Suggestions (Focus-triggered)",D&&t.jsxs(t.Fragment,{children:[t.jsx("br",{}),"Space: ",D.space.vertical,"-",D.space.horizontal]})]})]})})]})});zi.displayName="EditableInput";const N0=({examples:e,onSelect:o,views:r={}})=>{const{getColor:n}=l.useTheme();return!e||e.length===0?null:t.jsx(l.Horizontal,{gap:8,overflowX:"auto",padding:"8px 0",width:"100%",...r==null?void 0:r.container,children:e.map(a=>t.jsx(l.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"},...r==null?void 0:r.item,children:t.jsx(l.Text,{fontSize:"14px",color:"color-gray-700",...r==null?void 0:r.text,children:a.text})},a.id))})},q0=({onRecordingComplete:e,onRecordingStart:o,views:r={}})=>{const{recording:n,paused:a,audioBlob:i,analyserNode:s,startRecording:m,stopRecording:d}=za();u.useEffect(()=>{if(i){const p=new File([i],`recording-${Date.now()}.webm`,{type:i.type||"audio/webm;codecs=opus"});e(p)}},[i]);const c=u.useCallback(()=>{m(),o==null||o()},[]);return t.jsxs(l.Horizontal,{alignItems:"center",gap:4,children:[t.jsx(l.View,{minWidth:90,children:n&&s&&t.jsx($r,{analyserNode:s,isPaused:a})}),t.jsx(l.View,{as:"button",type:"button",onClick:n?d:c,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"},...r.button,children:n?t.jsx(Wt,{widthHeight:16,color:"currentColor",filled:!1}):t.jsx(Mr,{widthHeight:16,color:"currentColor",filled:!1})})]})},Mi=u.memo(({onSubmit:e,placeholder:o="Type your message… use @ to mention",loading:r=!1,disabled:n=!1,isAgentRunning:a=!1,enableAudioRecording:i=!1,leftButtons:s,rightButtons:m,onStopAgent:d,loadingText:c="Agent is working...",autoFocus:p=!0,sandboxId:h,hideAttachments:f=!1,attachmentText:g="",promptExamples:x=[],suggestions:b=[],errorMessage:y,size:k="md",shape:S="rounded",variant:w="default",views:C={},mentionData:j=[],mentionTrigger:v="@",onMentionSelect:I,onAudioRecordingStart:F,onAudioRecordingStop:W,showGuideTip:E,guideVideoUrl:T,onGuideClose:A,onFileBrowse:P,onUploadProgress:z,onUploadSuccess:R,onUploadError:H,onFileUpload:M,onPromptExampleSelect:D,value:B,handleChange:V,handleSubmit:L,editableRef:_,fileInputRef:q,isUploading:O,uploadProgress:Y,isDraggingOver:$,uploadedFiles:U,pendingFiles:K,getPendingFiles:ee,clearPendingFiles:J,removeUploadedFile:oe,setPendingFiles:ae,setUploadedFiles:te,setIsUploading:G,startUpload:Q,selectedModel:re,handleModelChange:X,modelOptions:Z,subscriptionStatus:le,canAccessModel:de,isGuideTipShown:be,hideGuideTip:Pe,handlePromptExampleSelect:De,handleDragOver:qt,handleDragLeave:Fe,onChange:tt,...Ut})=>{l.useTheme();const pn=u.useMemo(()=>({...zn.container,...A0[S],...C==null?void 0:C.container}),[S,C==null?void 0:C.container]),os=u.useMemo(()=>({...zn.content,...E0[k],...V0[w],...C==null?void 0:C.content}),[k,w,C==null?void 0:C.content]),Wo=((B==null?void 0:B.trim().length)??0)>0||U.length>0,ts=u.useCallback(ye=>{Q([ye]),W==null||W(ye)},[Q,W]),Gt=u.useCallback(ye=>{const co=ye.filter(hn=>hn.size>52428800?(console.error(`File size exceeds 50MB limit: ${hn.name}`),!1):!0);co.length>0&&Q(co)},[Q]),rs=u.useCallback(ye=>{if(ye.preventDefault(),ye.stopPropagation(),Fe(ye),ye.dataTransfer.files.length>0){const co=Array.from(ye.dataTransfer.files);Gt(co)}},[Fe,Gt]),ns=u.useMemo(()=>[...j||[],...U.map((ye,co)=>({id:`file-${co}`,name:ye.name}))],[j,U]);return t.jsxs(l.View,{display:"flex",flexDirection:"column",boxSizing:"border-box",...pn,...Ut,onDragOver:qt,onDragLeave:Fe,onDrop:rs,children:[x.length>0&&t.jsx(N0,{examples:x,onSelect:De,views:{container:C==null?void 0:C.promptExamples,item:C==null?void 0:C.promptExampleItem}}),a&&t.jsxs(l.Horizontal,{justifyContent:"center",alignItems:"center",gap:8,padding:"8px 0",animate:{from:{opacity:0,y:-10},to:{opacity:1,y:0},duration:"0.3s"},...C==null?void 0:C.loadingIndicator,children:[t.jsx(Hr,{widthHeight:12,color:"currentColor",filled:!1,style:{animation:"spin 1s linear infinite"}}),t.jsx(l.Text,{color:"color-gray-500",children:c})]}),t.jsx(l.View,{position:"relative",width:"100%",overflow:"visible",children:t.jsxs(l.View,{as:"form",onSubmit:L,overflow:"visible",display:"flex",flexDirection:"column",position:"relative",...os,...pn,paddingHorizontal:16,paddingVertical:10,backgroundColor:$?"color-blue-50":void 0,children:[t.jsx(O0,{files:U,sandboxId:h,onRemove:oe,showPreviews:!0,views:{container:C==null?void 0:C.attachments,item:C==null?void 0:C.attachmentItem,name:C==null?void 0:C.attachmentName,size:C==null?void 0:C.attachmentSize,removeButton:C==null?void 0:C.attachmentRemove}}),t.jsx(zi,{ref:_,value:B||"",onChange:V,placeholder:o,disabled:n&&!a,autoFocus:p,suggestions:b||[],showSuggestions:b&&b.length>0&&!B,onSuggestionSelect:ye=>{V(ye.text)},mentionData:ns,mentionTrigger:v,onMentionSelect:I,views:{container:{},input:C==null?void 0:C.editableInput}}),t.jsxs(l.Horizontal,{justifyContent:"space-between",alignItems:"center",marginTop:"8px",children:[t.jsxs(l.Horizontal,{gap:8,alignItems:"center",children:[!f&&t.jsx(Et,{accept:"*/*",icon:t.jsx(Go,{widthHeight:16}),maxSize:50*1024*1024,multiple:!0,onMultipleFileSelect:Gt,isLoading:O,progress:Y||0,text:g,fileType:"file",renderError:({errorMessage:ye})=>null,views:{container:{height:"36px",cursor:"pointer",_hover:{backgroundColor:"color-gray-100"},...C==null?void 0:C.fileButton}},containerProps:{display:"flex",alignItems:"center",justifyContent:"center",gap:4,borderRadius:S==="rounded"?"50%":4,padding:10},textProps:{fontSize:"14px",color:"color-gray-600"},validateFile:ye=>ye.size>50*1024*1024?"File size exceeds 50MB limit":null}),s]}),t.jsxs(l.Horizontal,{gap:8,alignItems:"center",children:[i&&t.jsx(q0,{onRecordingStart:F,onRecordingComplete:ts,views:{button:C==null?void 0:C.recordButton}}),t.jsx(l.View,{as:"button",type:"button",onClick:L,height:"40px",width:"40px",display:"flex",alignItems:"center",justifyContent:"center",backgroundColor:a?"theme-error":Wo?"theme-primary":"color-gray-300",color:"color-white",borderRadius:S==="rounded"?"50%":4,border:"none",cursor:Wo?"pointer":"not-allowed",disabled:!Wo||r||n&&!a,transition:"background-color 0.2s ease, opacity 0.2s ease, box-shadow 0.2s ease",_hover:{opacity:Wo||a?.9:1},_active:{opacity:Wo||a?.95:1},_focusVisible:{outline:"none",boxShadow:"0 0 0 2px white, 0 0 0 4px theme-primary"},...C==null?void 0:C.submitButton,children:a?t.jsx(Wt,{widthHeight:16,color:"currentColor",filled:!1}):r?t.jsx(wo,{type:"quarter",size:16,color:"color-white"}):t.jsx(Wr,{widthHeight:16,color:"currentColor",filled:!1})}),m]})]})]})}),y&&t.jsx(l.Text,{color:"theme-error",marginTop:"4px",...C==null?void 0:C.bottomTip,children:y})]})}),U0=e=>{const{name:o,onSubmit:r,...n}=e,[a,i]=u.useState([]),s=fe({name:o,type:"text"}),m=f=>{s.onChangeText&&s.onChangeText(f)},d=(f,g)=>{r?r(f,g):m(f)},c=()=>a,p=()=>i([]),h=Ii({...n,value:s.value||"",onChange:m,onSubmit:d});return t.jsx(Mi,{...n,...h,value:s.value||"",onChange:m,onSubmit:d,error:s.error,getPendingFiles:c,clearPendingFiles:p})},G0=U0,Y0=e=>{const o=fe(e),r=li(o);return t.jsx(si,{...r,...o})},X0=Y0,K0=e=>{const o=fe(e),r=hi();return t.jsx(fi,{...r,...o})},J0=K0,Q0=e=>{const o=fe(e),r=ci(e);return t.jsx(di,{...r,...o})},Z0=Q0,ef=e=>{let o=fe(e);o.selected=o.value;const r=Xa(e);return t.jsx(Qa,{...r,...o})},of=ef,tf=e=>{const o=fe(e),r=Za(e);return t.jsx(ei,{...r,...o})},rf=tf,nf=e=>{const{name:o,...r}=e,{values:n,errors:a,touched:i,submitCount:s,setFieldValue:m,setFieldTouched:d}=We.useFormikContext(),c=We.getIn(n,o)||[],p=We.getIn(i,o)||s>0?We.getIn(a,o):void 0,h=u.useCallback(y=>{var S;const k=Array.isArray(y)?y.filter(w=>typeof w=="string"):[];m(o,k),(S=e.onTagsChange)==null||S.call(e,k)},[o,m,e.onTagsChange]),f=u.useCallback(()=>{var y;d(o,!0),(y=e.onBlur)==null||y.call(e)},[o,d,e.onBlur]),g=yi({...r,tags:c,onTagsChange:h,onBlur:f}),{tags:x,...b}=g;return t.jsx(ki,{...b,...r,tags:x,error:p})},af=nf,lf=e=>{const o=fe(e),r=ri(e);return t.jsx(ni,{...r,...o})},sf=lf,cf=e=>{const o=fe(e),{value:r,...n}=Xr(e);return t.jsx(Ko,{...n,...o})},df=cf,mf=({visibleIcon:e=t.jsx(Ar,{widthHeight:14}),hiddenIcon:o=t.jsx(Pr,{widthHeight:14}),...r})=>{const n=fe(r),{isVisible:a,setIsVisible:i,...s}=gi(n);return t.jsx(Ko,{...s,type:a?"text":"password",isClearable:!1,right:t.jsx(l.View,{onClick:()=>{r.isDisabled||i(!a)},children:a?e:o})})},uf=mf,pf=({items:e,placeholder:o,searchPlaceholder:r,isMulti:n=!1,...a})=>{const i=fe(a),s=xi(e,o,r);u.useEffect(()=>{if(n&&Array.isArray(i.value))s.setSelectedItems(i.value);else if(!n&&i.value){const d=typeof i.value=="object"?i.value:e.find(c=>c.value===i.value);d&&s.setSelectedItem(d)}},[i.value,n,e]);const m=d=>{i.onChange(d)};return t.jsx(bi,{...s,...i,items:e,placeholder:o,isMulti:n,onSelect:m})},hf=pf,ko=(e,o,r)=>Math.min(Math.max(e,o),r),ff=(e,o,r,n,a,i,s)=>{const m=n-r;let d;if(i==="horizontal"){const c=o.width,p=e-o.left;d=ko(p/c,0,1)}else{const c=o.height,p=o.bottom-e;d=ko(p/c,0,1)}if(s&&s.length>0){const c=r+d*m;let p=s[0],h=Math.abs(c-p);for(let f=1;f<s.length;f++){const g=Math.abs(c-s[f]);g<h&&(h=g,p=s[f])}return p}else{const c=r+d*m,p=Math.round(c/a)*a;return ko(p,r,n)}},Wi=({min:e=0,max:o=100,step:r=1,value:n=0,defaultValue:a,onChange:i,onDrag:s,orientation:m="horizontal",isDisabled:d=!1,stepValues:c})=>{const p=ko(n??a??e,e,o),[h,f]=u.useState(p),[g,x]=u.useState(!1),[b,y]=u.useState(!1),k=u.useRef(null),S=u.useRef(null),w=n!==void 0,C=w?n:h;u.useEffect(()=>{w&&f(ko(n,e,o))},[n,w,e,o]);const j=u.useCallback(A=>{const P=ko(A,e,o);w||f(P),i&&P!==C&&i(P),g&&s&&s(P)},[w,e,o,i,C,g,s]),v=u.useCallback(A=>{if(d||!k.current)return;const P=k.current.getBoundingClientRect();let z;"touches"in A?z=m==="horizontal"?A.touches[0].clientX:A.touches[0].clientY:z=m==="horizontal"?A.clientX:A.clientY;const R=ff(z,P,e,o,r,m,c);j(R)},[e,o,r,m,j,d,c]),I=u.useCallback(A=>{if(d)return;A.preventDefault(),x(!0),v(A);const P=R=>{v(R)},z=()=>{x(!1),document.removeEventListener("mousemove",P),document.removeEventListener("mouseup",z),document.removeEventListener("touchmove",P),document.removeEventListener("touchend",z)};document.addEventListener("mousemove",P),document.addEventListener("mouseup",z),document.addEventListener("touchmove",P),document.addEventListener("touchend",z)},[v,d]),F=u.useCallback(A=>{S.current&&S.current.contains(A.target)||I(A)},[I]),W=u.useCallback(A=>{if(d)return;let P=C;switch(A.key){case"ArrowLeft":case"ArrowDown":P=C-r;break;case"ArrowRight":case"ArrowUp":P=C+r;break;case"Home":P=e;break;case"End":P=o;break;default:return}A.preventDefault(),j(P)},[C,e,o,r,j,d]),E=o-e,T=E===0?0:(C-e)/E*100;return{currentValue:C,isDragging:g,isHovered:b,setIsHovered:y,trackRef:k,thumbRef:S,handleThumbMouseDown:I,handleTrackMouseDown:F,handleKeyDown:W,thumbPositionPercent:T}},Wn={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%"}},Hn={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}},Pn={square:0,rounded:4,pill:24},gf=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"}}),An=gf(),xf={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}},bf={horizontal:{width:"100%",minWidth:"120px",height:"auto",flexDirection:"row",paddingVertical:8},vertical:{height:"100%",minHeight:"120px",width:"auto",flexDirection:"column-reverse",paddingHorizontal:8}},yf=e=>typeof e=="string"&&(/^(#|rgb\(|rgba\(|hsl\(|hsla\(|var\()/.test(e)||["black","currentColor","inherit","transparent","white"].includes(e)),Vo=(e,o)=>yf(o)?{style:{[e]:o}}:{[e]:o},Hi=u.memo(({min:e=0,max:o=100,step:r=1,currentValue:n,stepValues:a,shape:i="rounded",size:s="md",variant:m="default",orientation:d="horizontal",isDisabled:c=!1,showValue:p=!1,showTooltip:h=!1,backgroundColor:f="theme-primary",label:g,helperText:x,themeMode:b,shadow:y={},isDragging:k,isHovered:S,setIsHovered:w,trackRef:C,thumbRef:j,handleThumbMouseDown:v,handleTrackMouseDown:I,handleKeyDown:F,thumbPositionPercent:W,ariaLabel:E="Slider",views:T={container:{},track:{},progress:{},filledTrack:{},thumb:{},label:{},valueLabel:{},stepMarks:{},tooltip:{}},onChange:A,onDrag:P,value:z,defaultValue:R,...H})=>{var $,U;const M=f,D="theme-disabled",B=An[m].backgroundColor,V=c?D:M,L=d==="vertical",{trackCrossAxisSize:_,thumbSize:q}=xf[s]||{trackCrossAxisSize:Wn[s].height,thumbSize:Hn[s].width||16},O=t.jsxs(l.Vertical,{width:"100%",gap:8,...T.container,...H,children:[g&&t.jsxs(l.Horizontal,{justifyContent:"space-between",alignItems:"center",children:[t.jsx(l.Text,{fontSize:14,fontWeight:500,...T.label,children:g}),p&&t.jsx(l.Text,{fontSize:14,color:"color-gray-500",...T.valueLabel,children:n})]}),t.jsxs(l.View,{ref:C,position:"relative",cursor:c?"not-allowed":"pointer",opacity:c?.6:1,onMouseDown:I,onMouseEnter:()=>w(!0),onMouseLeave:()=>w(!1),...Wn[s],borderRadius:Pn[i],backgroundColor:B,...An[m],...y,...T.track,children:[a&&a.length>0&&t.jsx(t.Fragment,{children:a.map(K=>{const ee=(K-e)/(o-e)*100;return t.jsx(l.View,{position:"absolute",top:"50%",left:`${ee}%`,transform:"translate(-50%, -50%)",width:4,height:4,borderRadius:"50%",zIndex:1,...Vo("backgroundColor",V),...T.stepMarks},K)})}),t.jsx(l.View,{position:"absolute",top:0,left:0,height:"100%",width:`${W}%`,borderRadius:Pn[i],transition:"width 0.1s ease-in-out",...Vo("backgroundColor",V),...T.progress,...T.filledTrack}),t.jsx(l.View,{ref:j,role:"slider",tabIndex:c?-1:0,"aria-valuemin":e,"aria-valuemax":o,"aria-valuenow":n,"aria-orientation":d,"aria-disabled":c,"aria-label":E,position:"absolute",top:"50%",left:`${W}%`,borderRadius:"50%",backgroundColor:"color-white",boxShadow:"0 2px 4px rgba(0, 0, 0, 0.2)",borderWidth:2,borderStyle:"solid",transition:k?"none":"transform 0.1s ease-in-out",...Vo("borderColor",V),transform:S?"translate(-50%, -50%) scale(1.1)":"translate(-50%, -50%)",zIndex:2,onMouseDown:v,onTouchStart:v,onKeyDown:F,...Hn[s],...T.thumb,children:h&&(S||k)&&t.jsx(l.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,...T.tooltip,children:t.jsx(l.Text,{...($=T.tooltip)==null?void 0:$.text,children:n==null?void 0:n.toFixed(r<1?1:0)})})})]}),x&&t.jsx(hr,{children:x})]}),Y=t.jsxs(l.Center,{...bf[d],position:"relative",onMouseEnter:()=>!c&&w(!0),onMouseLeave:()=>!c&&w(!1),...H,...T==null?void 0:T.container,children:[g&&t.jsxs(l.Horizontal,{justifyContent:"space-between",alignItems:"center",marginBottom:8,width:"100%",children:[t.jsx(l.Text,{fontSize:14,fontWeight:500,...T.label,children:g}),p&&t.jsx(l.Text,{fontSize:14,color:"color-gray-500",...T.valueLabel,children:n})]}),t.jsxs(l.View,{ref:C,position:"relative",borderRadius:_/2,backgroundColor:c?D:B,cursor:c?"not-allowed":"pointer",width:L?`${_}px`:"100%",height:L?"100%":`${_}px`,onMouseDown:I,onTouchStart:I,...T==null?void 0:T.track,children:[a&&a.length>0&&t.jsx(t.Fragment,{children:a.map(K=>{const ee=(K-e)/(o-e)*100;return t.jsx(l.View,{position:"absolute",width:4,height:4,borderRadius:"50%",backgroundColor:V,zIndex:1,...L?{bottom:`${ee}%`,left:"50%",transform:"translate(-50%, 50%)"}:{left:`${ee}%`,top:"50%",transform:"translate(-50%, -50%)"},...T.stepMarks},K)})}),t.jsx(l.View,{position:"absolute",borderRadius:_/2,...L?{bottom:0,left:0,width:"100%",height:`${W}%`}:{top:0,left:0,height:"100%",width:`${W}%`},...Vo("backgroundColor",V),...T==null?void 0:T.filledTrack,...T==null?void 0:T.progress}),t.jsx(l.View,{ref:j,role:"slider",tabIndex:c?-1:0,"aria-valuemin":e,"aria-valuemax":o,"aria-valuenow":n,"aria-orientation":d,"aria-disabled":c,"aria-label":E,position:"absolute",width:`${q}px`,height:`${q}px`,borderRadius:"50%",borderWidth:2,borderStyle:"solid",borderColor:"color-white",boxShadow:"0 1px 3px rgba(0, 0, 0, 0.2)",cursor:c?"not-allowed":"grab",transform:L?"translateX(-50%)":"translateY(-50%)",zIndex:2,transition:k?"none":"left 0.1s, bottom 0.1s",...Vo("backgroundColor",V),...L?{left:"50%",bottom:`${W}%`}:{top:"50%",left:`${W}%`},onMouseDown:v,onTouchStart:v,onKeyDown:F,...T==null?void 0:T.thumb,children:h&&(S||k)&&t.jsx(l.View,{position:"absolute",padding:"4px 8px",backgroundColor:"color-black",color:"color-white",borderRadius:"4px",whiteSpace:"nowrap",zIndex:3,...L?{left:"100%",marginLeft:"8px",bottom:"0",transform:"translateY(50%)"}:{bottom:"100%",left:"50%",marginBottom:"8px",transform:"translateX(-50%)"},...T==null?void 0:T.tooltip,children:t.jsx(l.Text,{...(U=T==null?void 0:T.tooltip)==null?void 0:U.text,children:n==null?void 0:n.toFixed(r<1?1:0)})})})]}),x&&t.jsx(hr,{marginTop:8,children:x})]});return L||h?Y:O}),kf=e=>{const o=fe(e),r=Wi({...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 t.jsx(Hi,{...e,...r,...o})},Cf=kf,Sf=e=>{const o=fe(e),{isFocused:r,setIsFocused:n,isHovered:a,setIsHovered:i,inputRef:s,containerRef:m,mirrorSelectionStart:d,mirrorSelectionEnd:c,setMirrorSelectionStart:p,setMirrorSelectionEnd:h,setInputRef:f,handleFocus:g,handleBlur:x,handleKeyDown:b,handlePaste:y}=Ci(e),k=u.useCallback(w=>{o.onChange&&o.onChange(w),e.onComplete&&w.length===(e.length||6)&&e.onComplete(w),s.current&&(s.current.value=w)},[o,e,s]),S=u.useCallback(w=>{const C=w.currentTarget.value.slice(0,e.length||6);k(C),s.current&&(s.current.value=C)},[e.length,k,s]);return t.jsx(Si,{...e,...o,setValue:k,isFocused:r,setIsFocused:n,isHovered:a,setIsHovered:i,inputRef:s,containerRef:m,mirrorSelectionStart:d,mirrorSelectionEnd:c,setMirrorSelectionStart:p,setMirrorSelectionEnd:h,setInputRef:f,handleChange:S,handleFocus:g,handleBlur:x,handleKeyDown:b,handlePaste:y,stepValues:e.stepValues})},jf=Sf,wf=e=>Array.isArray(e)?e:e==null?[]:[e],Pi=({name:e,uploadFile:o,onUploadSuccess:r,onUploadError:n,transformResponse:a,onMultipleFileSelect:i,onFileSelect:s,multiple:m=!0,...d})=>{const{setFieldValue:c,setFieldTouched:p,values:h}=We.useFormikContext(),[f,g]=u.useState(!1),[x,b]=u.useState(0),y=u.useCallback(async w=>{if(!w||w.length===0)return;p(e,!0,!0),g(!0);const C=[];for(const j of w){b(0);try{const v=await o(j,F=>{b(F??0)}),I=a?a(v,j):v;C.push(I),r==null||r(j,I)}catch(v){n==null||n(j,v)}}if(C.length>0){const j=wf(We.getIn(h,e));c(e,[...j,...C],!0),b(100)}else b(0);g(!1)},[e,n,r,p,c,a,o,h]),k=u.useCallback(async w=>{i==null||i(w),await y(w)},[y,i]),S=u.useCallback(async w=>{s==null||s(w),await y([w])},[y,s]);return t.jsx(Et,{...d,multiple:m,onMultipleFileSelect:m?k:void 0,onFileSelect:m?void 0:S,isLoading:f,progress:x})};Pi.displayName="FormikUploader";const vf=e=>{let o=fe(e);o.selected=o.value;const r=oi(e);return t.jsx(ti,{...r,...o})},Tf=vf,Ai=e=>{const[o,r]=u.useState(!1),[n,a]=u.useState(e);return{isHovered:o,setIsHovered:r,isToggle:n,setIsToggled:a}},If={square:0,rounded:8,pill:999},Ff=(e,o)=>({outline:{backgroundColor:o?"color-white":"color-gray-900",color:e,borderWidth:1,borderStyle:"solid",borderColor:o?"color-gray-200":"color-gray-600",_hover:{backgroundColor:o?"color-gray-50":"color-gray-800",borderColor:o?"color-gray-300":"color-gray-500"},_active:{backgroundColor:o?"color-gray-100":"color-gray-800"},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:o?"color-gray-50":"color-gray-800"},_active:{backgroundColor:o?"color-gray-100":"color-gray-800"},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"}}),Ei=u.memo(({children:e,shape:o="rounded",variant:r="ghost",isHovered:n,setIsHovered:a,isDisabled:i,isToggle:s,setIsToggled:m,onToggle:d,views:c,backgroundColor:p,color:h,themeMode:f,...g})=>{const{getColor:x,themeMode:b}=l.useTheme(),y=f??b,S=x(i?"theme-disabled":p??h??"theme-primary",{themeMode:y}),C=u.useMemo(()=>Ff(S,y==="light"),[S,y])[r],j=!!s,v=u.useCallback(()=>a(!0),[a]),I=u.useCallback(()=>{i||m(F=>{const W=!F;return d&&d(W),W})},[i,m,d]);return t.jsx(l.Center,{role:"Toggle",padding:o==="pill"?"8px 12px":"8px",width:"fit-content",cursor:i?"not-allowed":"pointer",borderRadius:If[o],onClick:I,onMouseEnter:v,onMouseLeave:()=>a(!1),...C,...j&&{...r==="link"?{backgroundColor:"transparent"}:{backgroundColor:y==="light"?"color-blue-50":"color-blue-100",borderWidth:1,borderStyle:"solid",borderColor:y==="light"?"color-blue-200":S},color:S},...g,...c==null?void 0:c.container,children:e})}),Rf=({children:e,shape:o,variant:r,isDisabled:n,isToggled:a=!1,onToggle:i,...s})=>{const m=fe(s),{isHovered:d,setIsHovered:c,isToggle:p,setIsToggled:h}=Ai(m.value??a);u.useEffect(()=>{h(m.value??a)},[m.value,a]);const f=g=>{h(g),m.onChange(g),i==null||i(g)};return t.jsx(Ei,{shape:o,variant:r,isDisabled:n,isHovered:d,setIsHovered:c,isToggle:p,setIsToggled:h,onToggle:f,...s,children:e})},zf=Rf,Vi=()=>{const[e,o]=u.useState([]);return{activeToggles:e,setActiveToggles:o}},Mf=({children:e,shape:o,variant:r,isDisabled:n,isToggled:a=!1,onToggle:i,...s})=>{const{isHovered:m,setIsHovered:d,isToggle:c,setIsToggled:p}=Ai(a);return u.useEffect(()=>{p(a)},[a]),t.jsx(Ei,{shape:o,variant:r,isDisabled:n,isHovered:m,setIsHovered:d,isToggle:c,setIsToggled:p,onToggle:i,...s,children:e})},Jr=Mf,Di=({items:e,onToggleChange:o,activeToggles:r,setActiveToggles:n,shape:a="rounded",variant:i="ghost",views:s})=>{const m=u.useCallback((d,c)=>{n(p=>{let h;return c?h=p.includes(d)?p:[...p,d]:h=p.filter(f=>f!==d),o==null||o(h),h})},[o,n]);return t.jsx(l.Horizontal,{role:"ToggleGroup",display:"flex",gap:8,flexWrap:"wrap",...s==null?void 0:s.container,children:e.map(d=>t.jsx(Jr,{role:`toggle-${d.id}`,shape:a,variant:i,isToggled:r.includes(d.id)||d.isActive,onToggle:c=>m(d.id,c),isDisabled:d.isDisabled,views:s==null?void 0:s.toggle,children:d.value},d.id))})},Wf=({items:e,shape:o,variant:r,onToggleChange:n,...a})=>{const i=fe(a),{activeToggles:s,setActiveToggles:m}=Vi();u.useEffect(()=>{Array.isArray(i.value)&&m(i.value)},[i.value]);const d=c=>{m(c),i.onChange(c),n==null||n(c)};return t.jsx(Di,{items:e,shape:o,variant:r,activeToggles:s,setActiveToggles:m,onToggleChange:d,...a})},Hf=Wf,En=["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"],$i=e=>{const{value:o,defaultValue:r,onChange:n,isOpen:a,onOpen:i,onClose:s,closeOnSelect:m=!0}=e,[d,c]=u.useState(a??!1),[p,h]=u.useState(o??r),[f,g]=u.useState(""),x=u.useRef(null),b=u.useRef(null);u.useEffect(()=>{o!==void 0&&h(o)},[o]),u.useEffect(()=>{a!==void 0&&c(a)},[a]);const y=u.useMemo(()=>f?En.filter(j=>j.toLowerCase().includes(f.toLowerCase())).slice(0,100):En.slice(0,100),[f]);u.useEffect(()=>{const j=v=>{d&&x.current&&b.current&&!x.current.contains(v.target)&&!b.current.contains(v.target)&&k()};return document.addEventListener("mousedown",j),()=>document.removeEventListener("mousedown",j)},[d]);const k=u.useCallback(()=>{a===void 0&&c(!1),s&&s()},[s,a]),S=u.useCallback(()=>{const j=!d;a===void 0&&c(j),j?(i&&i(),g("")):s&&s()},[d,i,s,a]),w=u.useCallback(j=>{o===void 0&&h(j),n&&n(j),m&&k()},[n,m,k,o]),C=u.useCallback(j=>{g(j)},[]);return{isOpen:d,selectedIcon:p,searchQuery:f,filteredIcons:y,handleToggle:S,handleIconSelect:w,handleSearchChange:C,handleClose:k,triggerRef:x,dropdownRef:b}},po={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)",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"}},Pf={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"}},Af={default:{borderRadius:8},square:{borderRadius:0},rounded:{borderRadius:8},pill:{borderRadius:9999}},Ef={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"}},Bi=({label:e,placeholder:o="Select an icon",helperText:r,views:n={},size:a="md",shape:i="default",variant:s="default",error:m=!1,isDisabled:d=!1,isReadOnly:c=!1,showSearch:p=!0,isOpen:h,selectedIcon:f,searchQuery:g,filteredIcons:x,handleToggle:b,handleIconSelect:y,handleSearchChange:k,triggerRef:S,dropdownRef:w,handleClose:C,onChange:j,value:v,defaultValue:I,onOpen:F,onClose:W,closeOnSelect:E,...T})=>{const{getColor:A}=l.useTheme(),P={...po.container,...n==null?void 0:n.container},z={...po.trigger,...Pf[a],...Af[i],...Ef[s],...m&&{borderColor:"color-red-500"},...d&&{opacity:.6,cursor:"not-allowed"},...!d&&!c&&{_hover:{borderColor:"rgba(148, 163, 184, 0.9)"}},...n==null?void 0:n.trigger},R={...po.dropdown,...n==null?void 0:n.dropdown},H={...po.iconGrid,...n==null?void 0:n.iconGrid};return t.jsxs(l.View,{...P,...T,children:[e&&t.jsx(l.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}),t.jsxs(l.View,{ref:S,onClick:d||c?void 0:b,...z,children:[t.jsx(l.Horizontal,{alignItems:"center",gap:8,width:"100%",children:f?t.jsxs(l.Horizontal,{alignItems:"center",gap:8,width:"100%",children:[t.jsx(bt,{name:f,widthHeight:16}),t.jsx(l.Text,{color:"color-gray-800",fontSize:"inherit",style:{flex:1,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:f})]}):t.jsx(l.Text,{color:"color-gray-500",fontSize:"inherit",children:o})}),!c&&!d&&t.jsx(se,{widthHeight:16,color:"color-gray-500",orientation:h?"up":"down"})]}),h&&t.jsxs(l.View,{ref:w,...R,children:[p&&t.jsx(l.View,{...po.searchInput,...n==null?void 0:n.searchInput,children:t.jsx(we,{placeholder:"Search icons...",value:g,onChange:M=>k(M),size:"sm",autoFocus:!0})}),t.jsx(l.View,{...H,children:x.length>0?x.map(M=>t.jsx(l.View,{...po.iconItem,onClick:()=>y(M),title:M,_hover:{backgroundColor:"#F8FAFC",transform:"scale(1.05)"},backgroundColor:f===M?"#EFF6FF":"transparent",borderWidth:f===M?"1px":"0px",borderStyle:"solid",borderColor:f===M?"#BFDBFE":"transparent",...n==null?void 0:n.iconItem,children:t.jsx(bt,{name:M,widthHeight:20})},M)):t.jsx(l.View,{gridColumn:"1 / -1",padding:"20px",textAlign:"center",color:"color-gray-500",children:t.jsx(l.Text,{fontSize:"14px",children:"No icons found"})})})]}),r&&t.jsx(l.Text,{color:m?"color-red-500":"color-gray-600",marginTop:"4px",...n==null?void 0:n.helperText,children:r})]})},Vf=e=>{const o=fe(e),r={...e,value:o.value??e.value??e.defaultValue},n=$i(r),a=i=>{n.handleIconSelect(i),o.onChange(i)};return t.jsx(Bi,{...n,...r,handleIconSelect:a})},Df=Vf,Ne={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",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)",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"}},$f={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"}},Bf={default:{borderRadius:8},square:{borderRadius:0},rounded:{borderRadius:8},pill:{borderRadius:9999}},_f={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"}},Lf={recent:"🕒",smileys:"😀",people:"👤",animals:"🐶",food:"🍎",activities:"⚽",travel:"🚗",objects:"💡",symbols:"❤️",flags:"🏁"},Of=[{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"]}],_i=e=>{const{value:o,defaultValue:r="",onChange:n,onEmojiSelect:a,isOpen:i,onOpen:s,onClose:m,closeOnSelect:d=!0,maxRecentEmojis:c=16,showRecentEmojis:p=!0,enabledCategories:h=["recent","smileys","people","animals","food","activities","travel","objects","symbols","flags"],customEmojis:f=[]}=e,[g,x]=u.useState(i??!1),[b,y]=u.useState(o??r),[k,S]=u.useState(""),[w,C]=u.useState("smileys"),[j,v]=u.useState([]),I=u.useRef(null),F=u.useRef(null),W=u.useMemo(()=>[...Of,...f],[f]),E=u.useMemo(()=>{let M=W;if(w!=="recent"?M=M.filter(D=>D.category===w):M=j,k){const D=k.toLowerCase();M=M.filter(B=>B.name.toLowerCase().includes(D)||B.keywords.some(V=>V.toLowerCase().includes(D)))}return M},[W,w,j,k]);u.useEffect(()=>{o!==void 0&&y(o)},[o]),u.useEffect(()=>{i!==void 0&&x(i)},[i]),u.useEffect(()=>{if(p){const M=localStorage.getItem("emojiPicker-recentEmojis");if(M)try{v(JSON.parse(M))}catch{}}},[p]),u.useEffect(()=>{const M=D=>{g&&I.current&&F.current&&!I.current.contains(D.target)&&!F.current.contains(D.target)&&H()};return document.addEventListener("mousedown",M),()=>document.removeEventListener("mousedown",M)},[g]);const T=u.useCallback(M=>{p&&v(D=>{const B=D.filter(L=>L.emoji!==M.emoji),V=[M,...B].slice(0,c);return localStorage.setItem("emojiPicker-recentEmojis",JSON.stringify(V)),V})},[p,c]),A=u.useCallback(()=>{const M=!g;x(M),M?(s==null||s(),S(""),p&&j.length>0?C("recent"):C("smileys")):m==null||m()},[g,s,m,p,j.length]),P=u.useCallback(M=>{y(M.emoji),T(M),n==null||n(M.emoji),a==null||a(M),d&&(x(!1),m==null||m())},[n,a,d,m,T]),z=u.useCallback(M=>{S(M),M&&w==="recent"&&C("smileys")},[w]),R=u.useCallback(M=>{C(M),S("")},[]),H=u.useCallback(()=>{x(!1),m==null||m()},[m]);return{isOpen:g,selectedEmoji:b,recentEmojis:j,searchQuery:k,activeCategory:w,filteredEmojis:E,handleToggle:A,handleEmojiSelect:P,handleSearchChange:z,handleCategoryChange:R,handleClose:H,triggerRef:I,dropdownRef:F}},Li=({id:e,name:o,label:r,placeholder:n="Select an emoji",helperText:a,views:i={},size:s="md",shape:m="default",variant:d="default",error:c=!1,isDisabled:p=!1,isReadOnly:h=!1,showSearch:f=!0,showCategories:g=!0,showRecentEmojis:x=!0,enabledCategories:b=["recent","smileys","people","animals","food","activities","travel","objects","symbols","flags"],isOpen:y,selectedEmoji:k,recentEmojis:S,searchQuery:w,activeCategory:C,filteredEmojis:j,handleToggle:v,handleEmojiSelect:I,handleSearchChange:F,handleCategoryChange:W,handleClose:E,triggerRef:T,dropdownRef:A,onChange:P,onOpen:z,onClose:R,onEmojiSelect:H,customEmojis:M,closeOnSelect:D,maxRecentEmojis:B,value:V,defaultValue:L,..._})=>{const{getColor:q}=l.useTheme(),O={...Ne.container,...i==null?void 0:i.container},Y={...Ne.trigger,...$f[s],...Bf[m],..._f[d],...c&&{borderColor:"color-red-500"},...p&&{opacity:.6,cursor:"not-allowed"},...!p&&!h&&{_hover:{borderColor:"rgba(148, 163, 184, 0.9)"}},...i==null?void 0:i.trigger},$={...Ne.dropdown,...i==null?void 0:i.dropdown},U={...Ne.categoryTabs,...i==null?void 0:i.categoryTabs},K={...Ne.emojiGrid,...i==null?void 0:i.emojiGrid},ee=b.filter(J=>J==="recent"?x&&S.length>0:!0);return t.jsxs(l.View,{...O,..._,children:[r&&t.jsx(l.Text,{fontSize:s==="xs"?"12px":s==="sm"?"14px":"16px",fontWeight:"500",color:"color-gray-700",marginBottom:"4px",...i==null?void 0:i.label,children:r}),t.jsxs(l.View,{ref:T,onClick:p||h?void 0:v,...Y,children:[t.jsx(l.Horizontal,{alignItems:"center",gap:8,children:t.jsx(l.Text,{color:k?"color-gray-800":"color-gray-500",fontSize:"inherit",children:k||n})}),!h&&!p&&t.jsx(se,{widthHeight:16,color:"color-gray-500",orientation:y?"up":"down"})]}),y&&t.jsxs(l.View,{ref:A,...$,children:[f&&t.jsx(l.View,{...Ne.searchInput,...i==null?void 0:i.searchInput,children:t.jsx(we,{placeholder:"Search emojis...",value:w,onChange:J=>F(J.target.value),size:"sm"})}),g&&t.jsx(l.View,{...U,children:ee.map(J=>t.jsx(l.View,{...Ne.categoryTab,...C===J&&{borderBottomColor:"theme-primary",color:"theme-primary",backgroundColor:"#EFF6FF"},onClick:()=>W(J),title:J.charAt(0).toUpperCase()+J.slice(1),...i==null?void 0:i.categoryTab,children:Lf[J]},J))}),t.jsx(l.View,{...K,children:j.length>0?j.map((J,oe)=>t.jsx(l.View,{...Ne.emoji,onClick:()=>I(J),title:J.name,_hover:{backgroundColor:"#F8FAFC",transform:"scale(1.05)"},color:"color-gray-800",...i==null?void 0:i.emoji,children:J.emoji},`${J.emoji}-${oe}`)):t.jsx(l.View,{gridColumn:"1 / -1",padding:"20px",textAlign:"center",color:"color-gray-500",children:t.jsx(l.Text,{fontSize:"14px",children:w?"No emojis found":"No emojis in this category"})})})]}),a&&t.jsx(l.Text,{color:c?"color-red-500":"color-gray-600",marginTop:"4px",...i==null?void 0:i.helperText,children:a})]})},Nf=e=>{const o=fe(e),r={...e,value:o.value??e.value??e.defaultValue},n=_i(r),a=i=>{var s;n.handleEmojiSelect(i),o.onChange(i.emoji),(s=e.onEmojiSelect)==null||s.call(e,i)};return t.jsx(Li,{...n,...r,handleEmojiSelect:a})},qf=Nf,Uf=({files:e,onRemove:o,maxHeight:r="120px",views:n={}})=>{if(e.length===0)return null;const a=u.useCallback(i=>i<1024?`${i} B`:i<1024*1024?`${(i/1024).toFixed(1)} KB`:`${(i/(1024*1024)).toFixed(1)} MB`,[]);return t.jsx(l.View,{display:"flex",flexWrap:"wrap",gap:"8px",padding:"8px 0",maxHeight:r,overflowY:"auto",...n==null?void 0:n.container,children:e.map((i,s)=>{const m=i.url||"",d=i.type.startsWith("image/"),c=i.type.startsWith("video/"),p=i.type.startsWith("audio/");return t.jsx(l.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:t.jsxs(Ce,{children:[t.jsx(Ce.Trigger,{children:t.jsxs(l.View,{position:"relative",children:[d&&m&&t.jsx(l.Image,{src:m,alt:i.name,width:"60px",height:"60px",objectFit:"cover",borderRadius:"8px"}),c&&m&&t.jsx(l.View,{as:"video",src:m,alt:i.name,controls:!1,muted:!0,width:"60px",height:"60px",objectFit:"cover",borderRadius:"8px"}),p&&t.jsx(l.Center,{width:"60px",height:"60px",backgroundColor:"color-gray-100",borderRadius:"8px",children:t.jsx(jo,{widthHeight:24,color:"color-black"})}),!d&&!c&&!p&&t.jsx(l.Center,{width:"60px",height:"60px",backgroundColor:"color-gray-100",borderRadius:"8px",children:t.jsx(oo,{widthHeight:24,color:"color-black"})}),o&&t.jsx(l.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:h=>{h.stopPropagation(),o(s)},"aria-label":`Remove ${i.name}`,children:"×"})]})}),t.jsxs(Ce.Content,{children:[d&&m&&t.jsx(l.Image,{src:m,alt:i.name,maxWidth:"300px"}),c&&m&&t.jsx(l.View,{as:"video",src:m,controls:!0,maxWidth:"300px"}),p&&m&&t.jsx(l.View,{as:"audio",src:m,controls:!0,width:"100%"}),t.jsxs(l.Text,{marginTop:"4px",maxLines:1,width:"100%",fontSize:12,...n==null?void 0:n.name,children:[i.name," (",a(i.size),")"]})]})]})},s)})})},Gf=e=>{const o=pe("slider",e),r=Wi(o);return t.jsx(Hi,{...o,...r})},Oi=Gf,Yf=({url:e,type:o,name:r,onOpen:n})=>{const a=o.toLowerCase(),i=a.startsWith("image"),s=a.startsWith("video"),m=a.startsWith("audio"),d=()=>{n&&n()};return t.jsxs(l.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:[i&&t.jsx(l.Image,{src:e,alt:r,width:"100%",height:"100%",objectFit:"cover"}),s&&t.jsx(l.View,{as:"video",src:e,controls:!0,width:"100%",height:"100%",style:{objectFit:"cover"},onClick:c=>c.stopPropagation()}),m&&t.jsx(l.View,{as:"audio",controls:!0,src:e,width:"100%",onClick:c=>c.stopPropagation()}),!i&&!s&&!m&&t.jsx(oo,{widthHeight:24,color:"color-gray-600"})]})},Ue=Ft.create(e=>({modals:[],onHide:o=>o,onShow:(o,r)=>({name:o,props:r}),show:(o,r={},n={})=>{e(a=>({...a,modals:[...a.modals,{name:o,props:{...r,isVisible:!0},overlayProps:n}]}))},hide:o=>{e(r=>o?{...r,modals:r.modals.filter(n=>n.name!==o)}:{modals:[]})},setOnHide:o=>{e(r=>({...r,onHide:o}))},setOnShow:o=>{e(r=>({...r,onShow:o}))}})),Xf=(e,o={},r={})=>{Ue.getState().show(e,o,r),Ue.getState().onShow(e,o)},Qr=e=>{console.log("hideModal",e),Ue.getState().onHide(e),Ue.getState().hide(typeof e=="string"?e:void 0)},Kf={square:{borderRadius:0},rounded:{borderRadius:8}},Jf={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"}},Qf={xs:12,sm:16,md:20,lg:24,xl:28},or={body:{fontSize:"16px",fontWeight:"400",color:"color-gray-700"}},Ni=u.memo(({children:e,blur:o,isOpen:r=!1,isClosePrevented:n=!1,onClose:a=()=>{},position:i="center",views:s,...m})=>{const d=u.useCallback(()=>{n||a()},[n,a]);return t.jsx(l.Center,{position:"fixed",top:0,left:0,width:"100%",height:"100%",zIndex:1e3,onClick:d,visibility:r?"visible":"hidden",opacity:r?1:0,transition:"opacity 0.2s ease, visibility 0.2s ease",...s==null?void 0:s.container,children:t.jsx(l.View,{position:"absolute",top:0,left:0,zIndex:1e3,width:"100vw",height:"100vh",display:"flex",backgroundColor:"color-blackAlpha-500",backdropFilter:o?`blur(${o}px)`:void 0,transition:"background-color 0.2s ease, backdrop-filter 0.2s ease",onClick:d,...Jf[i],...m,...s==null?void 0:s.view,children:e})})}),Zf={boxShadow:"0px 4px 16px rgba(0, 0, 0, 0.15)"},eg={elevation:5,shadowColor:"rgba(0, 0, 0, 0.15)",shadowOffset:{width:0,height:4},shadowOpacity:1,shadowRadius:16},og=u.memo(({children:e,shadow:o,isFullScreen:r=!1,shape:n="rounded",views:a,isOpen:i=!0,position:s,...m})=>{const d=typeof document!==void 0?Zf:eg,c=u.useCallback(p=>{p&&p.stopPropagation&&p.stopPropagation()},[]);return t.jsx(l.Vertical,{cursor:"default",backgroundColor:"color-white",width:r?"100%":600,height:r?"100%":"fit-content",onClick:c,transition:"opacity 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease",opacity:i?1:0,transform:i?"translateY(0)":"translateY(8px)",...o||d,...Kf[n],media:{mobile:{width:"90%",maxWidth:"100%",margin:"16px"}},...m,...a==null?void 0:a.container,children:e})}),tg=u.memo(({children:e,buttonColor:o="theme-primary",iconSize:r="md",buttonPosition:n="right",views:a,onClose:i,...s})=>{const m=i||Qr,d=t.jsx(l.View,{onClick:m,children:t.jsx(ve,{widthHeight:Qf[r],color:o})});return t.jsxs(l.Horizontal,{justifyContent:n==="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,...a==null?void 0:a.header,children:[n==="left"&&d,e,n==="right"&&d]})}),rg=u.memo(({children:e,views:o,...r})=>t.jsx(l.View,{paddingVertical:16,paddingHorizontal:24,fontSize:or.body.fontSize,fontWeight:or.body.fontWeight,color:or.body.color,media:{mobile:{paddingVertical:12,paddingHorizontal:16,fontSize:"14px"}},...r,...o==null?void 0:o.view,children:e})),ng=u.memo(({children:e,views:o,...r})=>t.jsx(l.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}},...r,...o==null?void 0:o.container,children:e})),ag=({modals:e,onShow:o,onHide:r})=>{const n=Ue(a=>a.modals);return u.useEffect(()=>{o&&Ue.getState().setOnShow(o)},[o]),u.useEffect(()=>{r&&Ue.getState().setOnHide(r)},[r]),n.length===0?null:t.jsx(u.Fragment,{children:n.map((a,i)=>{const s=e[a.name];return s?t.jsx(Ni,{isOpen:a.props.isVisible,onClose:()=>Qr(a.name),blur:5,...a.overlayProps,style:{zIndex:1e3+i},children:t.jsx(s,{...a.props})},i):(console.error(`${a.name} modal doesn't exist`),null)})})},no=({children:e})=>t.jsx(t.Fragment,{children:e});no.Overlay=Ni;no.Container=og;no.Header=tg;no.Body=rg;no.Footer=ng;no.Layout=ag;const Vn={xs:"320px",sm:"380px",md:"480px",lg:"640px",xl:"768px",full:"100%"},ig={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"}},Zr=({isOpen:e,onClose:o,isClosePrevented:r,blur:n,children:a,...i})=>{const s=()=>{r||o()};return u.useEffect(()=>{const m=d=>{d.key==="Escape"&&e&&!r&&o()};return e&&document.addEventListener("keydown",m),()=>{document.removeEventListener("keydown",m)}},[e,r,o]),t.jsx(l.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:s,opacity:e?1:0,transition:"opacity 0.2s ease, visibility 0.2s ease, background-color 0.2s ease",backgroundColor:e?"color-blackAlpha-500":"transparent",backdropFilter:n?`blur(${n}px)`:void 0,pointerEvents:e?"auto":"none",...i,children:a})},en=({placement:e="right",size:o="md",isOpen:r=!1,children:n,...a})=>{const i=p=>{p.stopPropagation()},m=e==="top"||e==="bottom"?{height:o==="full"?"100vh":Vn[o]||o,maxHeight:"100vh"}:{width:o==="full"?"100vw":Vn[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",c=r?"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 t.jsx(l.Vertical,{position:"absolute",backgroundColor:"color-white",borderRadius:d,...ig[e],...m,onClick:i,transform:c,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})},lg=({children:e,onClose:o,buttonPosition:r="right",...n})=>{const a=o&&t.jsx(l.View,{onClick:o,cursor:"pointer",padding:8,children:t.jsx(ve,{widthHeight:20,color:"color-gray-500"})});return t.jsxs(l.Horizontal,{paddingHorizontal:24,paddingVertical:16,borderBottomWidth:"1px",borderBottomColor:"color-gray-200",alignItems:"center",justifyContent:r==="none"?"center":"space-between",...n,children:[r==="left"&&a,e,r==="right"&&a]})},sg=({children:e,...o})=>t.jsx(l.Vertical,{padding:24,flex:1,overflowY:"auto",...o,children:e}),cg=({children:e,...o})=>t.jsx(l.Horizontal,{paddingHorizontal:24,paddingVertical:16,borderTopWidth:"1px",borderTopColor:"color-gray-200",alignItems:"center",justifyContent:"flex-end",gap:12,...o,children:e}),Ge=Ft.create(e=>({drawers:[],onHide:o=>o,onShow:(o,r)=>({name:o,props:r}),show:(o,r={},n={})=>{e(a=>({...a,drawers:[...a.drawers,{name:o,props:{...r,isOpen:!1},overlayProps:n}]}))},hide:o=>{e(r=>o?{...r,drawers:r.drawers.filter(n=>n.name!==o)}:{drawers:[]})},setOnHide:o=>{e(r=>({...r,onHide:o}))},setOnShow:o=>{e(r=>({...r,onShow:o}))}})),dg=(e,o={},r={})=>{const n=Ge.getState();n.hide(e),n.show(e,o,r),n.onShow(e,o),queueMicrotask(()=>{Ge.setState(a=>({drawers:a.drawers.map(i=>i.name===e?{...i,props:{...i.props,isOpen:!0}}:i)}))})},qi=e=>{Ge.getState().onHide(e),Ge.getState().hide(typeof e=="string"?e:void 0)},mg=({drawers:e,onShow:o,onHide:r})=>{const n=Ge(a=>a.drawers);return u.useEffect(()=>{o&&Ge.getState().setOnShow(o)},[o]),u.useEffect(()=>{r&&Ge.getState().setOnHide(r)},[r]),n.length===0?null:t.jsx(u.Fragment,{children:n.map((a,i)=>{var g;const s=e[a.name];if(!s)return console.error(`${a.name} drawer doesn't exist`),null;const{placement:m,size:d,isClosePrevented:c,blur:p,containerProps:h,...f}=a.props||{};return t.jsx(Zr,{isOpen:a.props.isOpen,onClose:()=>qi(a.name),isClosePrevented:c,blur:p,...a.overlayProps,style:{zIndex:1e3+i,...((g=a.overlayProps)==null?void 0:g.style)||{}},children:t.jsx(en,{placement:m,size:d,isOpen:a.props.isOpen,...h||{},children:t.jsx(u.Suspense,{fallback:null,children:t.jsx(s,{...f})})})},i)})})},ug=({isOpen:e,onClose:o,placement:r="right",size:n="md",isClosePrevented:a,children:i,...s})=>t.jsx(Zr,{isOpen:e,onClose:o,isClosePrevented:a,...s,children:t.jsx(en,{placement:r,size:n,isOpen:e,children:i})}),ao=ug;ao.Overlay=Zr;ao.Container=en;ao.Header=lg;ao.Body=sg;ao.Footer=cg;ao.Layout=mg;const pg=(e=null,o=[])=>{const[r,n]=u.useState(e),[a,i]=u.useState(o),s=u.useRef({});return{activeItemId:r,setActiveItemId:n,expandedItemIds:a,toggleExpandedItem:c=>{i(p=>p.includes(c)?p.filter(f=>f!==c):[...p,c])},isItemExpanded:c=>a.includes(c),triggerRefs:s}},gr={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"}}}},xr={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"}},Ui={horizontal:{flexDirection:"row",gap:"8px",media:{mobile:{flexDirection:"column",gap:"4px"}}},vertical:{flexDirection:"column",gap:"4px"}},yo={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"}},Gi=u.createContext({activeItemId:null,setActiveItemId:()=>{},expandedItemIds:[],toggleExpandedItem:()=>{},isItemExpanded:()=>!1,orientation:"vertical",size:"md",variant:"default",triggerRefs:{current:{}}}),hg=({children:e,value:o})=>t.jsx(Gi.Provider,{value:o,children:e}),Jo=()=>{const e=u.useContext(Gi);if(!e)throw new Error("useNavigationMenuContext must be used within a NavigationMenuProvider");return e},on=({children:e,views:o})=>{const{orientation:r}=Jo(),n=r==="horizontal"?l.Horizontal:l.Vertical;return t.jsx(n,{width:"100%",...Ui[r],transition:"background-color 0.2s ease, border-color 0.2s ease",borderRadius:"8px",...o==null?void 0:o.container,children:e})},Yi=u.createContext({itemValue:null,isDisabled:!1}),fg=()=>{const e=u.useContext(Yi);if(!e)throw new Error("useNavigationMenuItemContext must be used within a NavigationMenuItem");return e},tn=({item:e,value:o,isDisabled:r=!1,children:n,views:a})=>{var k;const{activeItemId:i,setActiveItemId:s,orientation:m,size:d,variant:c,onItemActivate:p}=Jo(),h=(e==null?void 0:e.id)||o,f=i===h,g=(e==null?void 0:e.items)&&e.items.length>0,x=(e==null?void 0:e.disabled)||r,b=()=>{x||h&&(s(h),p&&p(h))},y=m==="horizontal"?l.Horizontal:l.Vertical;return n?t.jsx(Yi.Provider,{value:{itemValue:h||null,isDisabled:x},children:t.jsx(l.View,{width:"100%",cursor:x?"not-allowed":"pointer",opacity:x?.6:1,borderRadius:"8px",transition:"background-color 0.2s ease, color 0.2s ease, opacity 0.2s ease",...gr[d],...xr[c],...f?yo.active:{},_hover:x?{}:yo.hover,...a==null?void 0:a.item,children:n})}):g&&e?t.jsxs(y,{width:"100%",flexDirection:"column",position:"relative",...a==null?void 0:a.item,children:[t.jsxs(Xi,{itemId:e.id,disabled:e.disabled,views:a,children:[e.icon&&t.jsx(l.View,{marginRight:8,...a==null?void 0:a.icon,children:e.icon}),e.label]}),t.jsx(Ki,{itemId:e.id,children:t.jsx(on,{children:(k=e.items)==null?void 0:k.map(S=>t.jsx(tn,{item:S},S.id))})})]}):e?t.jsxs(l.View,{as:e.href?"a":"div",href:e.href,onClick:b,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",...gr[d],...xr[c],...f?yo.active:{},_hover:e.disabled?{}:yo.hover,...a==null?void 0:a.item,children:[e.icon&&t.jsx(l.View,{marginRight:8,...a==null?void 0:a.icon,children:e.icon}),e.label]}):null},Xi=({children:e,itemId:o,disabled:r,views:n})=>{const{activeItemId:a,toggleExpandedItem:i,isItemExpanded:s,size:m,variant:d,triggerRefs:c}=Jo(),p=u.useRef(null),h=a===o,f=s(o);u.useEffect(()=>(p.current&&o&&(c.current[o]=p.current),()=>{o&&delete c.current[o]}),[o,c]);const g=x=>{x.preventDefault(),!r&&i(o)};return t.jsxs(l.View,{ref:p,onClick:g,cursor:r?"not-allowed":"pointer",opacity:r?.5:1,width:"100%",display:"flex",alignItems:"center",justifyContent:"space-between",borderRadius:8,transition:"background-color 0.2s ease",...gr[m],...xr[d],...h?yo.active:{},_hover:r?{}:yo.hover,...n==null?void 0:n.trigger,children:[t.jsx(l.View,{display:"flex",alignItems:"center",children:e}),t.jsx(l.View,{transition:"transform 0.2s ease",transform:f?"rotate(180deg)":"rotate(0deg)",...n==null?void 0:n.indicator,children:t.jsx(se,{orientation:"down",widthHeight:16,color:"currentColor",filled:!0})})]})},Ki=({children:e,itemId:o,views:r})=>{const{isItemExpanded:n,orientation:a,triggerRefs:i}=Jo(),s=u.useRef(null),[m,d]=u.useState({x:0,y:0,placement:a==="horizontal"?"bottom":"right"}),c=n(o);if(u.useEffect(()=>{if(c&&s.current&&o&&i.current[o]&&a==="horizontal"){const h=s.current.getBoundingClientRect(),f=i.current[o].getBoundingClientRect(),g=Math.max(h.width||200,200),x=Math.max(h.height||150,150),b=window.innerWidth,y=window.innerHeight,k={top:f.top,right:b-f.right,bottom:y-f.bottom,left:f.left},S=a==="horizontal"?[{placement:"bottom",space:k.bottom,fits:k.bottom>=x+8,x:f.left,y:f.bottom+8},{placement:"top",space:k.top,fits:k.top>=x+8,x:f.left,y:f.top-x-8},{placement:"right",space:k.right,fits:k.right>=g+8,x:f.right+8,y:f.top},{placement:"left",space:k.left,fits:k.left>=g+8,x:f.left-g-8,y:f.top}]:[{placement:"right",space:k.right,fits:k.right>=g+8,x:f.right+8,y:f.top},{placement:"left",space:k.left,fits:k.left>=g+8,x:f.left-g-8,y:f.top},{placement:"bottom",space:k.bottom,fits:k.bottom>=x+8,x:f.left,y:f.bottom+8},{placement:"top",space:k.top,fits:k.top>=x+8,x:f.left,y:f.top-x-8}],w=S.find(I=>I.fits);if(w){d({x:w.x,y:w.y,placement:w.placement});return}const C=S.reduce((I,F)=>F.space>I.space?F:I);let j=C.x,v=C.y;j+g>b&&(j=b-g-8),j<8&&(j=8),v+x>y&&(v=y-x-8),v<8&&(v=8),d({x:j,y:v,placement:C.placement})}},[c,a,o,i]),!c)return null;if(a==="vertical")return t.jsx(l.View,{paddingLeft:16,width:"100%",position:"relative",backgroundColor:"transparent",...r==null?void 0:r.container,children:e});const p={position:"fixed",left:m.x,top:m.y,zIndex:1e3};return t.jsx(l.View,{ref:s,role:"menu",minWidth:"200px",backgroundColor:"color-white",borderRadius:4,boxShadow:"0px 2px 8px rgba(0, 0, 0, 0.15)",overflow:"hidden",style:p,...r==null?void 0:r.container,children:e})},gg=({href:e,children:o,views:r,underline:n,isExternal:a,iconSize:i,...s})=>{const{itemValue:m,isDisabled:d}=fg(),{activeItemId:c,setActiveItemId:p,onItemActivate:h}=Jo(),f=c===m,g=x=>{if(d){x.preventDefault();return}m&&(p(m),h&&h(m)),s.onClick&&s.onClick(x)};return t.jsx(l.View,{as:"a",href:d?void 0:e,onClick:g,cursor:d?"not-allowed":"pointer",opacity:d?.5:1,width:"100%",display:"flex",alignItems:"center","aria-current":f?"page":void 0,"aria-disabled":d,"data-active":f?"":void 0,"data-disabled":d?"":void 0,...f?{fontWeight:"bold"}:{},...r==null?void 0:r.container,...s,children:o})},xg=({items:e,orientation:o,views:r,themeMode:n})=>{const a=o==="horizontal"?l.Horizontal:l.Vertical;return!e||e.length===0?null:t.jsx(a,{width:"100%",...Ui[o],...r==null?void 0:r.container,children:t.jsx(on,{views:r,children:e.map(i=>t.jsx(tn,{item:i,views:r},i.id))})})},bg=e=>{const o=pe("navigation",e),{items:r,children:n,orientation:a="vertical",size:i="md",variant:s="default",defaultActiveItemId:m=null,defaultExpandedItemIds:d=[],onItemActivate:c,views:p,...h}=o,{activeItemId:f,setActiveItemId:g,expandedItemIds:x,toggleExpandedItem:b,isItemExpanded:y,triggerRefs:k}=pg(m,d);return t.jsx(hg,{value:{activeItemId:f,setActiveItemId:g,expandedItemIds:x,toggleExpandedItem:b,isItemExpanded:y,orientation:a,size:i,variant:s,onItemActivate:c,triggerRefs:k},children:r?t.jsx(xg,{items:r,orientation:a,size:i,variant:s,views:p,...h}):n})},io=bg;io.List=on;io.Item=tn;io.Trigger=Xi;io.Content=Ki;io.Link=gg;const Ji={},Qi=u.createContext({views:Ji,onRowClick:()=>{}}),yg=({children:e,views:o=Ji,onRowClick:r})=>t.jsx(Qi.Provider,{value:{views:o,onRowClick:r},children:e}),Ke=()=>u.useContext(Qi),he={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",media:{mobile:{padding:"8px 12px",fontSize:"12px"}}},td:{padding:"12px 16px",fontSize:"14px",borderBottom:"1px solid",borderColor:"color-gray-100",color:"inherit",media:{mobile:{padding:"8px 12px",fontSize:"12px"}}},tr:{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"}}}};({...he.th},{...he.td});({...he.tr});({...he.td},{...he.th});({...he.table},{...he.th}),{...he.td},{...he.tr},{...he.tfoot},{...he.caption};const Zi=e=>{const{views:o}=Ke();return t.jsx(l.Element,{as:"table",...he.table,...o==null?void 0:o.table,...e,style:{borderCollapse:"collapse",...e.style||{}}})},el=e=>{const{views:o}=Ke();return t.jsx(l.Element,{as:"thead",textAlign:"left",...he.thead,...o==null?void 0:o.thead,...e})},ol=e=>{const{views:o}=Ke();return t.jsx(l.Element,{as:"th",whiteSpace:"nowrap",...he.th,...o==null?void 0:o.th,...e})},ut=e=>{const{views:o,onRowClick:r}=Ke();return t.jsx(l.Element,{as:"tr",...he.tr,...o==null?void 0:o.tr,onClick:r,...e})},br=({isFirstColumn:e,...o})=>{const{views:r}=Ke();return t.jsx(l.Element,{as:"td",whiteSpace:"nowrap",fontWeight:e?"500":"400",...he.td,...r==null?void 0:r.td,...o})},tl=e=>{const{views:o}=Ke();return t.jsx(l.Element,{as:"tbody",...he.tbody,...o==null?void 0:o.tbody,...e})},rl=e=>{const{views:o}=Ke();return t.jsx(l.Element,{as:"tfoot",...he.tfoot,...o==null?void 0:o.tfoot,...e})},nl=e=>{const{views:o}=Ke();return t.jsx(l.Element,{as:"caption",...he.caption,...o==null?void 0:o.caption,...e})},kg=({data:e,columns:o,footer:r,caption:n,themeMode:a})=>t.jsxs(Zi,{role:"Table",children:[n&&t.jsx(nl,{children:n}),t.jsx(el,{children:t.jsx(ut,{children:o.map(i=>t.jsx(ol,{children:i.title},i.field))})}),t.jsx(tl,{children:e.map((i,s)=>t.jsx(ut,{children:o.map((m,d)=>t.jsx(br,{isFirstColumn:d===0,children:i[m.field]},m.field))},s))}),r&&t.jsx(rl,{children:t.jsx(ut,{children:r.map((i,s)=>t.jsx(br,{...i.props,children:i.value},s))})})]}),Ie=({children:e,views:o,onClick:r})=>{const n=pe("table",{views:o,onClick:r});return t.jsx(yg,{views:n.views,onRowClick:n.onClick,children:e})};Ie.Head=el;Ie.HeadCell=ol;Ie.Body=tl;Ie.Row=ut;Ie.Cell=br;Ie.Footer=rl;Ie.Caption=nl;Ie.Container=Zi;Ie.Template=kg;const Cg=(e,o,r)=>{const n=c=>c.value!==void 0?c.value:c.title,a=()=>{if(!(!e||e.length===0)){if(o!==void 0){const c=e.find(p=>n(p)===o);if(c)return c}return e[0]}},[i,s]=u.useState(a()),m=r!==void 0?e.find(c=>n(c)===r):i,d=c=>{r===void 0&&s(c)};return u.useEffect(()=>{if(r!==void 0)return;const c=a(),p=i&&e.some(h=>n(h)===n(i));c&&(!p||o!==void 0&&i&&n(i)!==o)?s(c):!c&&i&&s(void 0)},[e,o]),{activeTab:m,setActiveTab:d}},Sg=(e,o,r)=>{const[n,a]=u.useState(e||null);return{activeValue:o!==void 0?o:n,setActiveValue:m=>{o===void 0&&a(m),r&&r(m)}}},jg=u.memo(({tab:e,isActive:o,onClick:r,iconPosition:n="left",tabStyles:a,textStyles:i})=>{const s=()=>{switch(n){case"top":return"column";case"bottom":return"column-reverse";case"right":return"row-reverse";case"left":default:return"row"}},m=()=>["top","bottom"].includes(n)?"4px":"8px",d=e.icon&&u.isValidElement(e.icon)?u.cloneElement(e.icon,{strokeWidth:o?2.5:2}):e.icon;return t.jsxs(l.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:s(),gap:m(),onClick:r,"data-state":o?"active":"inactive",children:[d&&t.jsx(l.Element,{children:d},o?"active-icon":"inactive-icon"),t.jsxs(l.Element,{display:"grid",alignItems:"center",justifyContent:"center",children:[t.jsx(l.Text,{...i,fontWeight:"600",visibility:"hidden",gridColumn:"1",gridRow:"1","aria-hidden":"true",children:e.title}),t.jsx(l.Text,{...i,fontWeight:o?"600":"500",gridColumn:"1",gridRow:"1",children:e.title})]})]})}),rn=(e,o)=>{const r=o==="dark";return e==="segmented"?{header:{width:"fit-content",alignSelf:"flex-start",gap:6,padding:6,borderRadius:16,backgroundColor:r?"color-gray-800":"color-gray-100"},tab:{minHeight:44,padding:"0 22px",borderRadius:12,color:r?"color-gray-300":"color-gray-600",borderWidth:1,borderStyle:"solid",borderColor:r?"color-gray-800":"color-gray-100",style:{backgroundColor:"transparent"}},activeTab:{backgroundColor:r?"color-gray-700":"color-white",color:r?"color-white":"color-gray-900",boxShadow:r?"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:r?"color-gray-900":"color-white",color:r?"color-gray-200":"color-gray-600",borderWidth:1,borderStyle:"solid",borderColor:r?"color-gray-700":"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:r?"color-gray-400":"color-gray-500",borderBottom:"3px solid",borderColor:r?"color-gray-900":"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}}},wg=({tabs:e=[],activeTab:o,handleTabClick:r,views:n={},renderTab:a,renderContent:i,variant:s="underline",iconPosition:m="left"})=>{const{themeMode:d}=l.useTheme(),c=rn(s,d);return o?t.jsxs(l.Vertical,{width:"100%",height:"100%",...n.container,children:[t.jsx(l.Horizontal,{alignItems:"center",...c.header,...n.headerTabs,children:e.map(p=>{const h=(p.value!==void 0?p.value:p.title)===(o.value!==void 0?o.value:o.title),f=()=>r(p);return a?a(p,h,f):t.jsx(jg,{tab:p,isActive:h,onClick:f,iconPosition:m,tabStyles:{...c.tab,...n.tab,...h?c.activeTab:{},...h?n.activeTab:{}},textStyles:{...c.text,...n.title,...h?c.activeText:{},...h?n.activeText:{}}},p.title)})}),t.jsx(l.View,{height:"100%",...c.content,...n.content,children:i?i(o):o.content})]}):null},al=u.createContext(null),nn=()=>{const e=u.useContext(al);if(!e)throw new Error("useTabsContext must be used within a Tabs component");return e},vg=u.memo(({children:e,views:o})=>{var m;const{themeMode:r}=l.useTheme(),{variant:n="underline"}=nn(),a=rn(n,r),i=Fo("tabs"),s=Ee({container:(m=i.views)==null?void 0:m.headerTabs},o);return t.jsx(l.Horizontal,{alignItems:"center",...a.header,...s==null?void 0:s.container,children:e})}),Tg=u.memo(({value:e,children:o,disabled:r=!1,views:n})=>{var g,x;const{themeMode:a}=l.useTheme(),{activeValue:i,setActiveValue:s,variant:m="underline"}=nn(),d=i===e,c=rn(m,a),p=Fo("tabs"),h=Ee({trigger:(g=p.views)==null?void 0:g.tab,activeState:(x=p.views)==null?void 0:x.activeTab},n),f=u.useCallback(()=>{r||s(e)},[r,e,s]);return t.jsx(l.View,{cursor:r?"not-allowed":"pointer",opacity:r?.6:1,display:"flex",alignItems:"center",justifyContent:"center",transition:"all 0.2s ease-in-out",...c.tab,...d?c.activeTab:{},_hover:r?{}:m==="underline"?{color:"theme-primary"}:{opacity:.9},onClick:f,...h==null?void 0:h.trigger,...d?h==null?void 0:h.activeState:{},children:t.jsx(l.View,{...c.text,...d?c.activeText:{},children:o})})}),Ig=u.memo(({value:e,children:o,views:r})=>{const{activeValue:n}=nn();return n!==e?null:t.jsx(l.View,{width:"100%",padding:"24px",...r==null?void 0:r.content,children:o})}),Fg=e=>{const o=pe("tabs",e),{tabs:r,views:n,defaultValue:a,onTabChange:i,renderTab:s,renderContent:m,variant:d="underline",iconPosition:c="left",value:p,onValueChange:h,children:f}=o,g=Sg(a,p,h),x=Cg(r||[],a,p);if(f)return t.jsx(al.Provider,{value:{...g,variant:d},children:f});if(r){const b=y=>{const k=S=>S.value!==void 0?S.value:S.title;(!x.activeTab||k(x.activeTab)!==k(y))&&(x.setActiveTab(y),i&&i(y))};return t.jsx(wg,{tabs:r,views:n,activeTab:x.activeTab,handleTabClick:b,renderTab:s,renderContent:m,variant:d,iconPosition:c})}return null},Rg=u.memo(Fg),vo=Rg;vo.List=vg;vo.Trigger=Tg;vo.Content=Ig;const zg=e=>{const{children:o,_isInView:r=!1,alternateHighlightText:n=[],alternateAnimation:a=!1,alternateDuration:i=3e3,highlightText:s,highlightTypewriter:m=!1,highlightSlide:d=!1,highlightSlideDuration:c=500,highlightSlideStagger:p=50,highlightSlideSequential:h=!0}=e,[f,g]=u.useState(o),[x,b]=u.useState(s);return u.useEffect(()=>{if(!a||n.length===0||!r||typeof o!="string"||typeof s!="string")return g(o),b(s),()=>{};const y=o,k=s;let S=0;const w=j=>{const v=n[j],I=k.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),F=new RegExp(I,"gi"),W=y.replace(F,v);g(W),b(v)};w(S);const C=setInterval(()=>{S=(S+1)%n.length,w(S)},i);return()=>clearInterval(C)},[a,n,i,s,o,r]),{finalDisplayedText:f,activeHighlightTarget:x,highlightTypewriter:m,highlightSlide:d,highlightSlideDuration:c,highlightSlideStagger:p,highlightSlideSequential:h}},Mg={xs:24,sm:32,md:48,lg:96,xl:110},Wg={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}}}},Hg={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:()=>({})},Pg=({text:e,typingSpeed:o=50,pauseTime:r=500,onComplete:n,showCursor:a=!0,cursorColor:i="currentColor",textStyle:s,textComponent:m,as:d,...c})=>{const p=m||l.Text,h=Array.isArray(e)?e:[e],[f,g]=u.useState(h.map(()=>"")),[x,b]=u.useState(!1),[y,k]=u.useState(0),[S,w]=u.useState(0);u.useEffect(()=>{g(h.map(()=>"")),b(!1),k(0),w(0)},[e]),u.useEffect(()=>{if(x){n&&n();return}const j=h[y];if(S>=j.length){if(y>=h.length-1){b(!0);return}const I=setTimeout(()=>{k(F=>F+1),w(0)},r);return()=>clearTimeout(I)}const v=setTimeout(()=>{g(I=>{const F=[...I];return F[y]=j.substring(0,S+1),F}),w(I=>I+1)},o);return()=>clearTimeout(v)},[h,y,S,x,n,r,o]);const C=j=>{if(!j||typeof j!="string")return j;const v=j.split("|");return v.length===1?j:v.map((I,F)=>t.jsxs(u.Fragment,{children:[I,F<v.length-1&&t.jsx("br",{})]},F))};return t.jsx(t.Fragment,{children:f.map((j,v)=>t.jsxs(u.Fragment,{children:[C(j),a&&v===y&&!x&&t.jsx(p,{as:"span",display:"inline-block",width:"0.1em",height:"1em",backgroundColor:i,animation:"blink 1s step-end infinite",verticalAlign:"text-bottom",marginLeft:"1px",...s})]},v))})},Ag=({text:e,duration:o=500,direction:r="up",stagger:n=50,sequential:a=!1,textStyle:i,as:s,wordProps:m,textComponent:d,...c})=>{const[p,h]=u.useState(e),[f,g]=u.useState("entering"),[x,b]=u.useState(0),y=d||l.Text,k=u.useRef(null),S=u.useRef(null);u.useEffect(()=>{e===p&&f==="visible"||e!==p&&(f==="entering"||f==="visible"?(k.current=e,g("exiting")):f==="exiting"&&(k.current=e))},[e,p,f]);const{lines:w,totalWordCount:C}=u.useMemo(()=>{const H=p.split("|").map(D=>D.trim().split(/\s+/).filter(B=>B.length>0)),M=H.reduce((D,B)=>D+B.length,0);return{lines:H,totalWordCount:M}},[p]),j=u.useMemo(()=>a?C*(o+n):(C-1)*n+o,[C,o,n,a]),v=u.useMemo(()=>a?C*(o+n):(C-1)*n+o,[C,o,n,a]);u.useEffect(()=>(S.current&&clearTimeout(S.current),f==="entering"?S.current=setTimeout(()=>{g("visible")},j+50):f==="exiting"&&(S.current=setTimeout(()=>{k.current!==null&&(h(k.current),k.current=null),b(R=>R+1),g("entering")},v+50)),()=>{S.current&&clearTimeout(S.current)}),[f,j,v]);const{style:I,...F}=m||{},W=r==="up",E=R=>a?R*(o+n):R*n,T=u.useMemo(()=>({display:"inline-block",position:"relative",verticalAlign:"bottom",whiteSpace:"nowrap",...i}),[i]),A=u.useMemo(()=>({display:"inline-flex",flexDirection:"column",alignItems:"center"}),[]),P=u.useMemo(()=>({display:"block",whiteSpace:"nowrap"}),[]);let z=0;return t.jsx(l.Element,{as:"span",style:T,...c,children:t.jsx("span",{style:A,children:w.map((R,H)=>t.jsx("span",{style:P,children:R.map((M,D)=>{const B=z++,V=E(B),L=D===R.length-1;let _;const q=`${o}ms`,O=`${V}ms`;f==="entering"?_=W?l.Animation.slideInUp({duration:q,delay:O,timingFunction:"ease-out",fillMode:"both"}):l.Animation.slideInDown({duration:q,delay:O,timingFunction:"ease-out",fillMode:"both"}):f==="exiting"&&(_=W?{from:{transform:"translateY(0)",opacity:1},to:{transform:"translateY(-100%)",opacity:0},duration:q,delay:O,timingFunction:"ease-in",fillMode:"both"}:{from:{transform:"translateY(0)",opacity:1},to:{transform:"translateY(100%)",opacity:0},duration:q,delay:O,timingFunction:"ease-in",fillMode:"both"});const Y={...I,display:"inline-block",marginRight:L?0:"0.25em",transform:f==="visible"?"translateY(0)":void 0,opacity:f==="visible"?1:void 0};return t.jsx(y,{as:"span",animate:_,...F,...Y,children:M},`${x}-${H}-${D}`)})},`line-${H}`))})})};function Dn(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}const tr=e=>{if(!e||typeof e!="string")return e;const o=e.split("|");return o.length===1?e:o.map((r,n)=>t.jsxs(u.Fragment,{children:[r,n<o.length-1&&t.jsx("br",{})]},n))},Eg=({children:e,highlightText:o,highlightStyle:r="solid",highlightColor:n="theme-primary",highlightSecondaryColor:a,size:i="lg",views:s,highlightAnimate:m,animate:d,animationLoop:c=1,highlightAnimationLoop:p=1,highlightTypewriter:h=!1,highlightTypewriterDuration:f=3e3,highlightSlide:g=!1,highlightSlideDuration:x=500,highlightSlideStagger:b=50,highlightSlideSequential:y=!0,themeMode:k,responsive:S,alternateHighlightText:w,alternateAnimation:C,alternateDuration:j,_isInView:v,...I})=>{const{ref:F,inView:W}=l.useInView(),{finalDisplayedText:E,activeHighlightTarget:T,highlightTypewriter:A,highlightSlide:P,highlightSlideDuration:z,highlightSlideStagger:R,highlightSlideSequential:H}=zg({children:e,highlightText:o,_isInView:W,highlightTypewriter:h,highlightSlide:g,highlightSlideDuration:x,highlightSlideStagger:b,highlightSlideSequential:y,alternateHighlightText:w,alternateAnimation:C,alternateDuration:j,...I}),M=Mg[i],D={fontFamily:"Mulish, Inter, Geist, system-ui, sans-serif",fontWeight:i==="xl"?700:600,letterSpacing:i==="xl"?"-1.5px":"-0.01em"},B=Hg[r](n,a),V=($,U)=>$&&(Array.isArray($)?$.map(K=>({...K,iterationCount:U.toString()})):{...$,iterationCount:U.toString()}),L=V(d,c),_=V(m,p),q=typeof E=="string"?E:typeof e=="string"?e:"",O={ref:F,animate:W?L:void 0,as:"h1",fontSize:M,...S?Wg[i]:{},...D},Y=$=>!W&&(A||P)?t.jsx("span",{style:{opacity:0},children:$}):A?t.jsx(Pg,{text:$,typingSpeed:Math.max(30,f/($.length*10)),cursorColor:"currentColor",...B}):P?t.jsx(Ag,{text:$,duration:z,stagger:R,sequential:H,direction:"up",wordProps:B}):tr($);if(typeof q=="string"&&T){const $=Array.isArray(T)?new RegExp(`(${T.map(J=>Dn(String(J))).join("|")})`,"gi"):new RegExp(`(${Dn(String(T))})`,"gi"),U=[];let K=0,ee;for(;ee=$.exec(q);)ee.index>K&&U.push(q.substring(K,ee.index)),U.push({highlight:!0,text:ee[0]}),K=ee.index+ee[0].length;return K<q.length&&U.push(q.substring(K)),t.jsx(l.Element,{...O,...s==null?void 0:s.container,...I,children:U.map((J,oe)=>typeof J=="string"?t.jsx(l.Text,{as:"span",display:"inline",...s==null?void 0:s.text,children:tr(J)},`text-${oe}`):t.jsx(l.Text,{as:"span",display:"inline",animate:W?_:void 0,...P?{}:B,...s==null?void 0:s.highlight,children:Y(J.text)},`highlight-${oe}`))})}return r&&!T?t.jsx(l.Element,{...O,...I,...s==null?void 0:s.container,children:t.jsx(l.Text,{as:"span",display:"inline",animate:W?_:void 0,...P?{}:B,...s==null?void 0:s.highlight,children:Y(q)})}):t.jsx(l.Text,{...O,...I,...s==null?void 0:s.container,...s==null?void 0:s.text,children:tr(q)})},Vg=e=>t.jsx(Eg,{...e}),il=Vg,Dg=({items:e,shape:o,variant:r,onToggleChange:n})=>{const{activeToggles:a,setActiveToggles:i}=Vi();return t.jsx(Di,{items:e,shape:o,variant:r,activeToggles:a,setActiveToggles:i,onToggleChange:n})},ll=Dg,$g=({items:e,onChange:o})=>{const[r,n]=u.useState(e),[a,i]=u.useState(null),[s,m]=u.useState(null),d=u.useRef({x:0,y:0}),c=u.useRef([]),p=u.useCallback((g,x)=>{g.preventDefault(),document.body.style.cursor="grabbing";const b="touches"in g?g.touches[0].clientX:g.clientX,y="touches"in g?g.touches[0].clientY:g.clientY;d.current={x:b,y},m(x),i(r[x])},[r]),h=u.useCallback(g=>{if(s===null)return;const x="touches"in g?g.touches[0].clientX:g.clientX,b="touches"in g?g.touches[0].clientY:g.clientY,y=c.current[s];if(!y)return;const k=x-d.current.x,S=b-d.current.y;y.style.transform=`translate(${k}px, ${S}px)`,y.style.zIndex="1000";const w=c.current.findIndex((C,j)=>{if(!C||j===s)return!1;const v=C.getBoundingClientRect();return b>=v.top&&b<=v.bottom});if(w!==-1&&w!==s){const C=[...r],[j]=C.splice(s,1);C.splice(w,0,j),n(C),m(w),o==null||o(C),d.current={x,y:b}}},[s,r,o]),f=u.useCallback(()=>{document.body.style.cursor="",c.current.forEach(g=>{g&&(g.style.transform="",g.style.zIndex="")}),m(null),i(null)},[s]);return u.useEffect(()=>(s!==null&&(window.addEventListener("mousemove",h),window.addEventListener("touchmove",h),window.addEventListener("mouseup",f),window.addEventListener("touchend",f)),()=>{window.removeEventListener("mousemove",h),window.removeEventListener("touchmove",h),window.removeEventListener("mouseup",f),window.removeEventListener("touchend",f)}),[s,h,f]),{items:r,draggedItem:a,draggedIndex:s,itemRefs:c,handleDragStart:p}},Bg=({items:e,renderItem:o,containerProps:r,itemProps:n,draggedIndex:a,itemRefs:i,handleDragStart:s,views:m,themeMode:d})=>t.jsx(l.View,{overflow:"hidden",position:"relative",...r,...m==null?void 0:m.container,children:e.map((c,p)=>t.jsx(l.View,{ref:h=>{i.current[p]=h},onMouseDown:h=>s(h,p),onTouchStart:h=>s(h,p),position:"relative",cursor:"grab",transition:"transform 0.2s",...n,...m==null?void 0:m.item,children:o?o(c,p):c},p))}),sl=e=>{const{items:o,draggedIndex:r,itemRefs:n,handleDragStart:a}=$g(e);return t.jsx(Bg,{...e,items:o,draggedIndex:r,itemRefs:n,handleDragStart:a})},_g=sl,Lg=({onFileSelect:e,onMultipleFileSelect:o,validateFile:r,accept:n,multiple:a,disabled:i,previewUrl:s})=>{const[m,d]=u.useState(!1),[c,p]=u.useState(null),h=u.useRef(null),f=s!==void 0?s:c;u.useEffect(()=>()=>{c&&URL.revokeObjectURL(c)},[c]);const g=u.useCallback(C=>{C.preventDefault(),C.stopPropagation(),!i&&d(!0)},[i]),x=u.useCallback(C=>{C.preventDefault(),C.stopPropagation(),!i&&d(!1)},[i]),b=u.useCallback(C=>{C.preventDefault(),C.stopPropagation(),!i&&d(!0)},[i]),y=u.useCallback(C=>{if(!C||C.length===0)return;const j=Array.from(C);if(!a&&j.length>0){const v=j[0];if(v.type.startsWith("image/")){const I=URL.createObjectURL(v);p(F=>(F&&URL.revokeObjectURL(F),I))}else p(null)}a?o&&o(j):j.length>0&&e&&e(j[0])},[a,o,e]),k=u.useCallback(C=>{C.preventDefault(),C.stopPropagation(),d(!1),!i&&C.dataTransfer.files&&C.dataTransfer.files.length>0&&(y(C.dataTransfer.files),C.dataTransfer.clearData())},[i,y]),S=u.useCallback(()=>{var C;i||(C=h.current)==null||C.click()},[i]),w=u.useCallback(C=>{y(C.target.files),C.target.value&&(C.target.value="")},[y]);return{isDragActive:m,handleDragEnter:g,handleDragLeave:x,handleDragOver:b,handleDrop:k,handleClick:S,handleFileChange:w,inputRef:h,preview:f}},Og={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)"}},cl=({files:e,sandboxId:o,onRemove:r,layout:n="inline",maxHeight:a="120px",showPreviews:i=!1,views:s={}})=>{if(e.length===0)return null;const m=u.useCallback(c=>c<1024?`${c} B`:c<1024*1024?`${(c/1024).toFixed(1)} KB`:`${(c/(1024*1024)).toFixed(1)} MB`,[]),d=u.useCallback(c=>c.type.startsWith("image/")?{backgroundColor:"#DBEAFE",color:"#2563EB"}:c.type.startsWith("video/")?{backgroundColor:"#EDE9FE",color:"#7C3AED"}:c.type.startsWith("audio/")?{backgroundColor:"#DCFCE7",color:"#16A34A"}:{backgroundColor:"#E2E8F0",color:"#475569"},[]);return t.jsx(l.View,{display:"flex",flexWrap:"wrap",gap:"8px",padding:"8px 0",maxHeight:a,overflowY:"auto",...s==null?void 0:s.container,children:e.map((c,p)=>{const h=(c==null?void 0:c.path)||(c==null?void 0:c.url)||(i?URL.createObjectURL(c):""),f=c.type.startsWith("image/"),g=c.type.startsWith("video/"),x=c.type.startsWith("audio/"),b=d(c);return i?t.jsx(l.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,...s==null?void 0:s.item,children:i&&t.jsxs(Ce,{children:[t.jsxs(Ce.Trigger,{children:[f&&t.jsx(l.Image,{src:h,alt:c.name,width:"60px",height:"60px",borderRadius:"8px",objectFit:"cover"}),g&&t.jsx(l.View,{as:"video",src:h,alt:c.name,controls:!1,muted:!0,width:"60px",height:"60px",borderRadius:"8px",objectFit:"cover"}),x&&t.jsx(l.Center,{width:"60px",height:"60px",borderRadius:"8px",backgroundColor:"color-gray-100",children:t.jsx(jo,{widthHeight:24,color:"color-black"})}),!f&&!g&&!x&&t.jsx(l.Center,{width:"60px",height:"60px",borderRadius:"8px",backgroundColor:"color-gray-100",children:t.jsx(oo,{widthHeight:24,color:"color-black"})}),r&&t.jsx(l.Button,{...Og,onClick:y=>{y.stopPropagation(),r(p)},"aria-label":`Remove ${c.name}`,children:"×"})]}),t.jsxs(Ce.Content,{children:[f&&t.jsx(l.Image,{src:h,alt:c.name,maxWidth:"100%"}),g&&t.jsx(l.View,{as:"video",src:h,controls:!0,maxWidth:"100%"}),x&&t.jsx(l.View,{as:"audio",src:h,controls:!0,width:"100%"}),t.jsxs(l.Text,{marginTop:"4px",maxLines:1,width:"100%",...s==null?void 0:s.name,children:[c.name," (",m(c.size),")"]})]})]})},p):t.jsxs(l.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,...s==null?void 0:s.item,children:[t.jsx(l.Center,{width:"22px",height:"22px",minWidth:"22px",borderRadius:"9999px",backgroundColor:b.backgroundColor,color:b.color,children:x?t.jsx(jo,{widthHeight:12,color:"currentColor"}):t.jsx(oo,{widthHeight:12,color:"currentColor"})}),t.jsxs(l.Text,{fontSize:"12px",lineHeight:"16px",color:"color-gray-600",maxLines:1,maxWidth:"220px",...s==null?void 0:s.name,children:[c.name," · ",m(c.size)]}),r&&t.jsx(l.View,{as:"button",type:"button",onClick:()=>r(p),"aria-label":`Remove ${c.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:"×"})]},p)})})},Ng=({children:e,text:o="Drop files here or click to upload",textProps:r,containerProps:n,disabled:a,accept:i,multiple:s,isDragActive:m,handleDragEnter:d,handleDragLeave:c,handleDragOver:p,handleDrop:h,handleClick:f,handleFileChange:g,inputRef:x,preview:b,imageProps:y,selectedFiles:k,onRemove:S})=>t.jsxs(l.Center,{width:"100%",minHeight:"200px",height:k&&k.length>0?"auto":"200px",borderWidth:2,borderStyle:"dashed",borderColor:m?"theme-primary":"rgba(203, 213, 225, 0.95)",borderRadius:12,backgroundColor:m?"#EFF6FF":"#F8FAFC",flexDirection:"column",cursor:a?"not-allowed":"pointer",opacity:a?.6:1,onClick:f,onDragEnter:d,onDragLeave:c,onDragOver:p,onDrop:h,transition:"background-color 0.2s ease, border-color 0.2s ease, opacity 0.2s ease",overflow:"hidden",position:"relative",padding:16,...n,children:[t.jsx("input",{type:"file",ref:x,onChange:g,accept:i,multiple:s,style:{display:"none"},disabled:a}),b&&!s?t.jsxs(l.View,{width:"100%",height:"200px",position:"relative",children:[t.jsx(l.Image,{src:b,alt:"Preview",width:"100%",height:"100%",objectFit:"contain",...y}),t.jsx(l.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:t.jsx(l.Text,{color:"white",fontWeight:600,children:"Click to replace"})})]}):t.jsxs(l.View,{flexDirection:"column",alignItems:"center",width:"100%",children:[e||t.jsxs(l.View,{flexDirection:"column",alignItems:"center",width:"100%",children:[t.jsx(Vr,{widthHeight:40,color:m?"theme-primary":"rgba(100, 116, 139, 0.9)"}),t.jsx(l.Text,{marginTop:16,color:m?"theme-primary":"rgba(71, 85, 105, 0.95)",fontWeight:500,textAlign:"center",...r,children:o})]}),s&&k&&k.length>0&&t.jsx(l.View,{marginTop:16,width:"100%",children:t.jsx(cl,{files:k,onRemove:S||(()=>{}),showPreviews:!0,layout:"inline",maxHeight:"160px"})})]})]}),qg=e=>{const o=Lg(e);return t.jsx(Ng,{...e,...o})},Ug=(e=!1)=>{const[o,r]=u.useState(e),[n,a]=u.useState(null);return u.useEffect(()=>{const i=d=>{!d.composedPath().some(h=>(h==null?void 0:h.id)==="dropdown-menu"||(h==null?void 0:h.id)==="dropdown-trigger")&&o&&(r(!1),a(null))},s=()=>{o&&(r(!1),a(null))},m=d=>{d.key==="Escape"&&o&&(r(!1),a(null))};return document.addEventListener("mousedown",i),window.addEventListener("resize",s),document.addEventListener("keydown",m),()=>{document.removeEventListener("mousedown",i),window.removeEventListener("resize",s),document.removeEventListener("keydown",m)}},[o]),{isOpen:o,setIsOpen:r,activeSubmenuId:n,setActiveSubmenuId:a}},Gg={sm:{padding:"6px 8px",fontSize:"14px",minWidth:"160px"},md:{padding:"8px 12px",fontSize:"16px",minWidth:"180px"},lg:{padding:"10px 16px",fontSize:"18px",minWidth:"200px"}},Yg={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"}},Xg={hover:{backgroundColor:"color-gray-100"}},dl=u.createContext({isOpen:!1,setIsOpen:()=>{},activeSubmenuId:null,setActiveSubmenuId:()=>{},size:"md",variant:"default",triggerRef:{current:null}}),Kg=({children:e,value:o})=>t.jsx(dl.Provider,{value:o,children:e}),an=()=>{const e=u.useContext(dl);if(!e)throw new Error("useDropdownMenuContext must be used within a DropdownMenuProvider");return e},ml=({children:e,views:o,...r})=>{const{isOpen:n,setIsOpen:a,triggerRef:i}=an(),s=m=>{m.stopPropagation(),a(!n)};return t.jsx(l.View,{ref:i,id:"dropdown-trigger",onClick:s,cursor:"pointer",position:"relative",display:"inline-block",...o==null?void 0:o.container,...r,children:e})},ln=({items:e,side:o="bottom",align:r="start",views:n,...a})=>{const{isOpen:i,variant:s,triggerRef:m}=an(),d=u.useRef(null),{ref:c,relation:p}=l.useElementPosition({trackChanges:!0,trackOnHover:!0,trackOnScroll:!0,trackOnResize:!0}),[h,f]=u.useState({x:0,y:0,placement:o});if(u.useEffect(()=>{m.current&&c&&(c.current=m.current)},[m,c,i]),u.useEffect(()=>{if(i&&d.current&&m.current){const b=m.current.getBoundingClientRect();let y=o;p&&(o==="bottom"&&p.space.vertical==="top"?y="top":o==="top"&&p.space.vertical==="bottom"?y="bottom":o==="right"&&p.space.horizontal==="left"?y="left":o==="left"&&p.space.horizontal==="right"&&(y="right"));let k=0,S=0;switch(y){case"bottom":k=r==="start"?b.left:r==="end"?b.right-180:b.left+b.width/2-90,S=b.bottom+8;break;case"top":k=r==="start"?b.left:r==="end"?b.right-180:b.left+b.width/2-90,S=b.top-8;break;case"right":k=b.right+8,S=r==="start"?b.top:r==="end"?b.bottom-100:b.top+b.height/2-50;break;case"left":k=b.left-8,S=r==="start"?b.top:r==="end"?b.bottom-100:b.top+b.height/2-50;break}f({x:k,y:S,placement:y})}},[i,o,r,m,p]),!i)return null;const x=(()=>{const b={position:"fixed",left:h.x,top:h.y,zIndex:1e3};switch(h.placement){case"top":return{...b,transform:"translateY(-100%)"};case"left":return{...b,transform:"translateX(-100%)"};case"bottom":case"right":default:return b}})();return t.jsx(l.View,{ref:d,id:"dropdown-menu",borderRadius:4,boxShadow:"0px 2px 8px rgba(0, 0, 0, 0.15)",overflow:"hidden",style:x,...Yg[s],...n==null?void 0:n.menu,...a,children:e.map((b,y)=>b.divider?t.jsx(pl,{views:n},`divider-${y}`):t.jsx(ul,{item:b,views:n},b.id))})},ul=({item:e,views:o,...r})=>{const{activeSubmenuId:n,setActiveSubmenuId:a,size:i}=an(),[s,m]=u.useState(!1),d=e.items&&e.items.length>0,c=n===e.id,p=u.useRef(null),h=()=>{m(!0),d&&a(e.id)},f=()=>{m(!1)},g=x=>{x.stopPropagation(),!e.disabled&&!d&&e.onClick&&e.onClick()};return t.jsxs(l.View,{ref:p,display:"flex",alignItems:"center",cursor:e.disabled?"not-allowed":"pointer",opacity:e.disabled?.5:1,position:"relative",...Gg[i],_hover:e.disabled?{}:Xg.hover,backgroundColor:s&&!e.disabled?"color-gray-100":"transparent",onMouseEnter:h,onMouseLeave:f,onClick:g,...o==null?void 0:o.item,...r,children:[e.icon&&t.jsx(l.View,{marginRight:8,...o==null?void 0:o.icon,children:e.icon}),t.jsx(l.View,{flexGrow:1,children:e.label}),d&&t.jsx(l.View,{marginLeft:8,...o==null?void 0:o.submenuIndicator,children:t.jsx(se,{orientation:"right",widthHeight:16,color:"currentColor",filled:!0})}),c&&d&&t.jsx(ln,{items:e.items||[],side:"right",align:"start",views:o})]})},pl=({views:e,...o})=>t.jsx(l.View,{height:"1px",backgroundColor:"color-gray-200",margin:"4px 0",...e==null?void 0:e.divider,...o}),Jg=({trigger:e,items:o,side:r="bottom",align:n="start",views:a,themeMode:i,...s})=>t.jsxs(l.View,{position:"relative",display:"inline-block",...a==null?void 0:a.container,...s,children:[t.jsx(ml,{views:a,children:e}),t.jsx(ln,{items:o,side:r,align:n,views:a})]}),Qg=({trigger:e,items:o,size:r="md",variant:n="default",side:a="bottom",align:i="start",defaultOpen:s=!1,views:m,...d})=>{const{isOpen:c,setIsOpen:p,activeSubmenuId:h,setActiveSubmenuId:f}=Ug(s),g=u.useRef(null);return t.jsx(Kg,{value:{isOpen:c,setIsOpen:p,activeSubmenuId:h,setActiveSubmenuId:f,size:r,variant:n,triggerRef:g},children:t.jsx(Jg,{trigger:e,items:o,side:a,align:i,views:m,...d})})},Qo=Qg;Qo.Trigger=ml;Qo.Content=ln;Qo.Item=ul;Qo.Divider=pl;const Zg=e=>{const{value:o,defaultValue:r="",onChange:n,onChangeComplete:a,isOpen:i,onOpen:s,onClose:m,closeOnSelect:d=!0,maxRecentColors:c=8,showRecentColors:p=!0}=e,[h,f]=u.useState(i??!1),[g,x]=u.useState(o??r),[b,y]=u.useState(""),[k,S]=u.useState([]),w=u.useRef(null),C=u.useRef(null);u.useEffect(()=>{o!==void 0&&x(o)},[o]),u.useEffect(()=>{i!==void 0&&f(i)},[i]),u.useEffect(()=>{if(p){const T=localStorage.getItem("colorPicker-recentColors");if(T)try{S(JSON.parse(T))}catch{}}},[p]),u.useEffect(()=>{const T=A=>{h&&w.current&&C.current&&!w.current.contains(A.target)&&!C.current.contains(A.target)&&E()};return document.addEventListener("mousedown",T),()=>document.removeEventListener("mousedown",T)},[h]);const j=u.useCallback(T=>{p&&S(A=>{const P=A.filter(R=>R!==T),z=[T,...P].slice(0,c);return localStorage.setItem("colorPicker-recentColors",JSON.stringify(z)),z})},[p,c]),v=u.useCallback(()=>{const T=!h;f(T),T?s==null||s():m==null||m()},[h,s,m]),I=u.useCallback(T=>{x(T),j(T),n==null||n(T),a==null||a(T),d&&(f(!1),m==null||m())},[n,a,d,m,j]),F=u.useCallback(T=>{y(T)},[]),W=u.useCallback(()=>{b&&(I(b),y(""))},[b,I]),E=u.useCallback(()=>{f(!1),m==null||m()},[m]);return{isOpen:h,selectedColor:g,recentColors:k,customColor:b,handleToggle:v,handleColorSelect:I,handleCustomColorChange:F,handleCustomColorSubmit:W,handleClose:E,triggerRef:w,dropdownRef:C}},ho={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:"#E5E7EB",boxShadow:"0 12px 32px rgba(15, 23, 42, 0.14)",padding:"16px",minWidth:"320px"},colorGrid:{display:"grid",gridTemplateColumns:"repeat(6, 36px)",gap:"12px",marginBottom:"16px"},customInput:{marginBottom:"12px"},recentColors:{borderTop:"1px solid #F3F4F6",paddingTop:"12px"}},ex={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"}},ox={default:{borderRadius:8},square:{borderRadius:0},rounded:{borderRadius:8},pill:{borderRadius:9999}},tx={default:{backgroundColor:"color-white",borderWidth:"1px",borderStyle:"solid",borderColor:"#E5E7EB",color:"color-gray-900"},outline:{backgroundColor:"color-white",borderWidth:"1px",borderStyle:"solid",borderColor:"#E5E7EB",color:"color-gray-900"},filled:{backgroundColor:"#F8FAFC",borderWidth:"1px",borderStyle:"solid",borderColor:"#E5E7EB",color:"color-gray-900"}},rx=[{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"}],nx=({id:e,name:o,label:r,placeholder:n="Select a color",helperText:a,views:i={},size:s="md",shape:m="default",variant:d="default",error:c=!1,isDisabled:p=!1,isReadOnly:h=!1,predefinedColors:f=rx,showCustomInput:g=!0,showRecentColors:x=!0,isOpen:b,selectedColor:y,recentColors:k,customColor:S,handleToggle:w,handleColorSelect:C,handleCustomColorChange:j,handleCustomColorSubmit:v,handleClose:I,triggerRef:F,dropdownRef:W,onChange:E,onChangeComplete:T,onOpen:A,onClose:P,colorFormat:z,maxRecentColors:R,closeOnSelect:H,defaultValue:M,value:D,...B})=>{const V={...ho.container,...i==null?void 0:i.container},L={...ho.trigger,...ex[s],...ox[m],...tx[d],...c&&{borderColor:"color-red-500"},...p&&{opacity:.6,cursor:"not-allowed"},...!p&&!h&&{_hover:{borderColor:"rgba(148, 163, 184, 0.9)"}},...i==null?void 0:i.trigger},_={...ho.dropdown,...i==null?void 0:i.dropdown},q={...ho.colorGrid,...i==null?void 0:i.colorGrid},O={...ho.recentColors,...i==null?void 0:i.recentColors},Y=y||"color-gray-200";return t.jsxs(l.View,{...V,...B,children:[r&&t.jsx(l.Text,{fontSize:"12px",lineHeight:"16px",fontWeight:"500",color:"color-gray-600",marginBottom:"6px",...i==null?void 0:i.label,children:r}),t.jsxs(l.View,{ref:F,onClick:p||h?void 0:w,...L,children:[t.jsxs(l.Horizontal,{alignItems:"center",gap:8,children:[t.jsx(l.View,{width:"24px",height:"24px",borderRadius:"8px",backgroundColor:Y,borderWidth:"1px",borderStyle:"solid",borderColor:"color-gray-200"}),t.jsx(l.Text,{color:y?"color-gray-900":"color-gray-500",fontSize:"inherit",children:y||n})]}),!h&&!p&&t.jsx(se,{widthHeight:16,color:"color-gray-500",orientation:b?"up":"down"})]}),b&&t.jsxs(l.View,{ref:W,..._,children:[t.jsx(l.View,{...q,children:f.map(($,U)=>t.jsx(l.View,{width:"36px",height:"36px",borderRadius:"8px",backgroundColor:$.value,borderWidth:"1px",borderStyle:"solid",borderColor:y===$.value?"theme-primary":"transparent",cursor:"pointer",onClick:()=>C($.value),title:$.name,_hover:{transform:"scale(1.05)",borderColor:"color-gray-300"},...i==null?void 0:i.colorSwatch},U))}),g&&t.jsxs(l.View,{...ho.customInput,...i==null?void 0:i.customInput,children:[t.jsxs(l.Horizontal,{gap:8,alignItems:"center",marginBottom:"10px",children:[t.jsx("input",{type:"color",value:S||"#1D4ED8",onChange:$=>{const U=$.target.value;j(U),C(U)},style:{width:"36px",height:"36px",border:"1px solid #E5E7EB",borderRadius:"8px",cursor:"pointer",backgroundColor:"transparent"},title:"Pick a color"}),t.jsx(l.Text,{fontSize:"12px",lineHeight:"16px",color:"color-gray-500",children:"HEX"})]}),t.jsx(we,{placeholder:"#1D4ED8",value:S,onChange:$=>j($.target.value),onKeyPress:$=>{$.key==="Enter"&&v()},size:"sm",right:S&&t.jsx(l.View,{width:"18px",height:"18px",borderRadius:"6px",backgroundColor:S,borderWidth:"1px",borderStyle:"solid",borderColor:"color-gray-200",cursor:"pointer",onClick:v})})]}),x&&k.length>0&&t.jsxs(l.View,{...O,children:[t.jsx(l.Text,{fontSize:"11px",lineHeight:"16px",fontWeight:"500",color:"color-gray-500",marginBottom:"8px",children:"Recent Colors"}),t.jsx(l.Horizontal,{gap:8,flexWrap:"wrap",children:k.map(($,U)=>t.jsx(l.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:()=>C($),title:$,_hover:{transform:"scale(1.05)",borderColor:"color-gray-300"}},U))})]})]}),a&&t.jsx(l.Text,{fontSize:"11px",lineHeight:"16px",color:c?"color-red-500":"color-gray-500",marginTop:"4px",...i==null?void 0:i.helperText,children:a})]})},ax=e=>{const o=Zg(e);return t.jsx(nx,{...o,...e})},hl=ax,ix=e=>{const o=_i(e);return t.jsx(Li,{...o,...e})},lx=ix,sx=e=>{const o=$i(e);return t.jsx(Bi,{...o,...e})},cx=sx,$n={"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"},lt={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"},dx={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"}]},mx=(e,o,r,n,a)=>{const i=o.map(s=>`${s.color} ${s.position||""}`).join(", ");switch(e){case"linear":return`linear-gradient(${r&&$n[r]?$n[r]:r||"to right"}, ${i})`;case"radial":const m=a&<[a]?lt[a]:a||"center";return`radial-gradient(${n||"circle"} at ${m}, ${i})`;case"conic":return`conic-gradient(from 0deg at ${a&<[a]?lt[a]:a||"center"}, ${i})`;default:return`linear-gradient(to right, ${i})`}},ux={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)"}}}},Bn={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"}},px=({type:e="linear",direction:o="to-right",shape:r="circle",position:n="center",from:a,to:i,colors:s,animate:m=!1,animationDuration:d=3,children:c,views:p,themeMode:h,...f})=>{const g=u.useMemo(()=>s&&s.length>0?s:a&&i?[{color:a,position:"0%"},{color:i,position:"100%"}]:dx[e],[s,a,i,e]),x=u.useMemo(()=>{const y=g.map(k=>({...k,color:k.color}));return mx(e,y,o,r,n)},[e,g,o,r,n]),b=u.useMemo(()=>{if(!m)return{};const y=ux[e];return{...y,transition:y.transition.replace("3s",`${d}s`),animationDuration:`${d}s`,animationIterationCount:"infinite",animationTimingFunction:e==="conic"?"linear":"ease-in-out"}},[m,d,e]);return t.jsx(l.View,{background:x,...Bn.container,...b,...p==null?void 0:p.container,...f,children:c&&t.jsx(l.View,{...Bn.content,...p==null?void 0:p.content,children:c})})},fl=e=>t.jsx(px,{...e}),hx=(e=null,o=null)=>{const[r,n]=u.useState(e),[a,i]=u.useState(o),s=d=>a===d,m=d=>{i(c=>c===d?null:d)};return u.useEffect(()=>{const d=p=>{!p.composedPath().some(g=>(g==null?void 0:g.id)==="menubar-content"||(g==null?void 0:g.id)==="menubar-trigger")&&a!==null&&i(null)},c=p=>{p.key==="Escape"&&a!==null&&i(null)};return document.addEventListener("mousedown",d),document.addEventListener("keydown",c),()=>{document.removeEventListener("mousedown",d),document.removeEventListener("keydown",c)}},[a]),{activeMenuId:r,setActiveMenuId:n,openMenuId:a,setOpenMenuId:i,isMenuOpen:s,toggleMenu:m}},gl={sm:{padding:"6px 10px",fontSize:"14px"},md:{padding:"8px 12px",fontSize:"16px"},lg:{padding:"10px 16px",fontSize:"18px"}},fx={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"}},gx={horizontal:{flexDirection:"row"},vertical:{flexDirection:"column"}},pt={active:{backgroundColor:"color-gray-200",fontWeight:"bold"},hover:{backgroundColor:"color-gray-100"},disabled:{opacity:.5,cursor:"not-allowed"}},xl=u.createContext({activeMenuId:null,setActiveMenuId:()=>{},openMenuId:null,setOpenMenuId:()=>{},isMenuOpen:()=>!1,toggleMenu:()=>{},orientation:"horizontal",size:"md",variant:"default",triggerRefs:{current:{}}}),Bt=()=>u.useContext(xl),xx=({value:e,children:o})=>t.jsx(xl.Provider,{value:e,children:o}),bl=({children:e,orientation:o="horizontal",size:r="md",variant:n="default",views:a,...i})=>{const s=o==="horizontal"?l.Horizontal:l.Vertical;return t.jsx(s,{role:"menubar","aria-orientation":o,...gx[o],...fx[n],...a==null?void 0:a.container,...i,children:e})},yl=({children:e,id:o,disabled:r=!1,views:n})=>{const{orientation:a}=Bt(),i=a==="horizontal"?l.Horizontal:l.Vertical;return t.jsx(i,{role:"none",position:"relative",opacity:r?.5:1,pointerEvents:r?"none":"auto",...n==null?void 0:n.menu,children:u.Children.map(e,s=>u.isValidElement(s)?u.cloneElement(s,{...s.props,menuId:o}):s)})},kl=({children:e,menuId:o,disabled:r=!1,views:n})=>{const{activeMenuId:a,setActiveMenuId:i,toggleMenu:s,isMenuOpen:m,size:d,triggerRefs:c}=Bt(),p=u.useRef(null),h=a===o,f=m(o);u.useEffect(()=>(p.current&&o&&(c.current[o]=p.current),()=>{o&&delete c.current[o]}),[o,c]);const g=()=>{r||(i(o),s(o))};return t.jsx(l.View,{ref:p,id:"menubar-trigger",role:"menuitem","aria-haspopup":"true","aria-expanded":f,userSelect:"none",display:"flex",alignItems:"center",justifyContent:"space-between",...gl[d],...h?pt.active:{},...r?pt.disabled:{},_hover:r?{}:pt.hover,onClick:g,...n==null?void 0:n.trigger,children:e})},Cl=({children:e,menuId:o,views:r})=>{const{isMenuOpen:n,orientation:a,triggerRefs:i}=Bt(),s=u.useRef(null),[m,d]=u.useState({x:0,y:0,placement:a==="horizontal"?"bottom":"right"}),c=n(o);if(u.useEffect(()=>{if(c&&s.current&&o&&i.current[o]){const h=s.current.getBoundingClientRect(),f=i.current[o].getBoundingClientRect(),g=Math.max(h.width||200,200),x=Math.max(h.height||150,150),b=window.innerWidth,y=window.innerHeight,k={top:f.top,right:b-f.right,bottom:y-f.bottom,left:f.left},S=a==="horizontal"?[{placement:"bottom",space:k.bottom,fits:k.bottom>=x+8,x:f.left,y:f.bottom+8},{placement:"top",space:k.top,fits:k.top>=x+8,x:f.left,y:f.top-x-8},{placement:"right",space:k.right,fits:k.right>=g+8,x:f.right+8,y:f.top},{placement:"left",space:k.left,fits:k.left>=g+8,x:f.left-g-8,y:f.top}]:[{placement:"right",space:k.right,fits:k.right>=g+8,x:f.right+8,y:f.top},{placement:"left",space:k.left,fits:k.left>=g+8,x:f.left-g-8,y:f.top},{placement:"bottom",space:k.bottom,fits:k.bottom>=x+8,x:f.left,y:f.bottom+8},{placement:"top",space:k.top,fits:k.top>=x+8,x:f.left,y:f.top-x-8}],w=S.find(I=>I.fits);if(w){d({x:w.x,y:w.y,placement:w.placement});return}const C=S.reduce((I,F)=>F.space>I.space?F:I);let j=C.x,v=C.y;j+g>b&&(j=b-g-8),j<8&&(j=8),v+x>y&&(v=y-x-8),v<8&&(v=8),d({x:j,y:v,placement:C.placement})}},[c,a,o,i]),!c)return null;const p={position:"fixed",left:m.x,top:m.y,zIndex:1e3};return t.jsx(l.View,{ref:s,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:p,...r==null?void 0:r.content,children:e})},Sl=({children:e,icon:o,disabled:r=!1,onClick:n,views:a})=>{const{size:i}=Bt(),s=()=>{r||!n||n()};return t.jsxs(l.View,{role:"menuitem",cursor:r?"not-allowed":"pointer",userSelect:"none",display:"flex",alignItems:"center",opacity:r?.5:1,...gl[i],_hover:r?{}:pt.hover,onClick:s,...a==null?void 0:a.item,children:[o&&t.jsx(l.View,{marginRight:8,...a==null?void 0:a.icon,children:o}),e]})},jl=({views:e})=>t.jsx(l.View,{role:"separator",height:"1px",backgroundColor:"color-gray-200",margin:"4px 0",...e==null?void 0:e.separator}),bx=({items:e,orientation:o,size:r,variant:n,views:a,themeMode:i})=>t.jsx(bl,{orientation:o,size:r,variant:n,views:a,children:e.map(s=>t.jsxs(yl,{id:s.id,disabled:s.disabled,views:a,children:[t.jsxs(kl,{menuId:s.id,views:a,children:[s.icon&&t.jsx(l.View,{marginRight:8,...a==null?void 0:a.icon,children:s.icon}),s.label]}),s.items&&s.items.length>0&&t.jsx(Cl,{menuId:s.id,views:a,children:s.items.map((m,d)=>m.separator?t.jsx(jl,{views:a},`separator-${d}`):t.jsx(Sl,{id:m.id,icon:m.icon,disabled:m.disabled,onClick:m.onClick,views:a,children:m.label},m.id))})]},s.id))}),yx=({items:e,orientation:o="horizontal",size:r="md",variant:n="default",defaultActiveMenuId:a=null,defaultOpenMenuId:i=null,views:s,...m})=>{const{activeMenuId:d,setActiveMenuId:c,openMenuId:p,setOpenMenuId:h,isMenuOpen:f,toggleMenu:g}=hx(a,i),x=u.useRef({});return t.jsx(xx,{value:{activeMenuId:d,setActiveMenuId:c,openMenuId:p,setOpenMenuId:h,isMenuOpen:f,toggleMenu:g,orientation:o,size:r,variant:n,triggerRefs:x},children:t.jsx(bx,{items:e,orientation:o,size:r,variant:n,views:s,...m})})},lo=yx;lo.Root=bl;lo.Menu=yl;lo.Trigger=kl;lo.Content=Cl;lo.Item=Sl;lo.Separator=jl;const kx=(e,o,r)=>{const[n,a]=u.useState([]);return u.useEffect(()=>{a((()=>{const s=[];if(o<=r)for(let m=1;m<=o;m++)s.push(m);else{s.push(1);let m=Math.max(2,e-Math.floor((r-2)/2)),d=Math.min(o-1,m+r-3);d>=o-1&&(d=o-1,m=Math.max(2,d-(r-3))),m>2&&s.push("...");for(let c=m;c<=d;c++)s.push(c);d<o-1&&s.push("..."),s.push(o)}return s})())},[e,o,r]),{visiblePageNumbers:n}},fo={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"}}}},Do={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"}}},$o={rounded:{borderRadius:8},square:{borderRadius:"0px"},circular:{borderRadius:"50%"}},Cx={backgroundColor:"theme-primary",color:"color-white",transition:"all 0.2s ease-in-out",_hover:{backgroundColor:"theme-primary",opacity:.9}},st={opacity:.5,cursor:"not-allowed",transition:"all 0.2s ease-in-out",_hover:{backgroundColor:"transparent"}},Sx=({currentPage:e,totalPages:o,onPageChange:r,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:i,showPageSizeSelector:s=!1,showPageInfo:m=!0,maxPageButtons:d=5,showFirstLastButtons:c=!1,size:p="md",variant:h="default",shape:f="rounded",visiblePageNumbers:g=[],views:x,...b})=>{const y=w=>{w<1||w>o||w===e||r(w)},k=w=>{i&&i(Number(w.target.value))},S=(w,C)=>{if(w==="...")return t.jsx(l.View,{display:"flex",alignItems:"center",justifyContent:"center",...fo[p],...x==null?void 0:x.ellipsis,children:"..."},`ellipsis-${C}`);const j=w===e;return t.jsx(l.View,{as:"button",display:"flex",alignItems:"center",justifyContent:"center",cursor:j?"default":"pointer",...fo[p],...Do[h],...$o[f],...j?Cx:{},onClick:()=>y(w),"aria-label":`Page ${w}`,"aria-current":j?"page":void 0,...j?x==null?void 0:x.activePageButton:x==null?void 0:x.pageButton,children:w},`page-${w}`)};return t.jsxs(l.Horizontal,{alignItems:"center",gap:8,...x==null?void 0:x.container,...b,children:[c&&t.jsxs(l.View,{as:"button",display:"flex",alignItems:"center",justifyContent:"center",cursor:e===1?"not-allowed":"pointer",...fo[p],...Do[h],...$o[f],...e===1?st:{},onClick:()=>y(1),"aria-label":"First page",disabled:e===1,...x==null?void 0:x.navigationButton,children:[t.jsx(se,{orientation:"left",widthHeight:16}),t.jsx(se,{orientation:"left",widthHeight:16,marginLeft:"-8px"})]}),t.jsx(l.View,{as:"button",display:"flex",alignItems:"center",justifyContent:"center",cursor:e===1?"not-allowed":"pointer",...fo[p],...Do[h],...$o[f],...e===1?st:{},onClick:()=>y(e-1),"aria-label":"Previous page",disabled:e===1,...x==null?void 0:x.navigationButton,children:t.jsx(se,{orientation:"left",widthHeight:16})}),g.map((w,C)=>S(w,C)),t.jsx(l.View,{as:"button",display:"flex",alignItems:"center",justifyContent:"center",cursor:e===o?"not-allowed":"pointer",...fo[p],...Do[h],...$o[f],...e===o?st:{},onClick:()=>y(e+1),"aria-label":"Next page",disabled:e===o,...x==null?void 0:x.navigationButton,children:t.jsx(se,{orientation:"right",widthHeight:16})}),c&&t.jsxs(l.View,{as:"button",display:"flex",alignItems:"center",justifyContent:"center",cursor:e===o?"not-allowed":"pointer",...fo[p],...Do[h],...$o[f],...e===o?st:{},onClick:()=>y(o),"aria-label":"Last page",disabled:e===o,...x==null?void 0:x.navigationButton,children:[t.jsx(se,{orientation:"right",widthHeight:16}),t.jsx(se,{orientation:"right",widthHeight:16,marginLeft:"-8px"})]}),m&&t.jsxs(l.Text,{marginLeft:16,color:"color-gray-600",...x==null?void 0:x.pageInfo,children:["Page ",e," of ",o]}),s&&i&&t.jsx(l.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:k,...x==null?void 0:x.pageSizeSelector,children:a.map(w=>t.jsx("option",{value:w.value,children:w.label},w.value))})]})},jx=({currentPage:e,totalPages:o,onPageChange:r,pageSize:n=10,pageSizeOptions:a,onPageSizeChange:i,showPageSizeSelector:s=!1,showPageInfo:m=!0,maxPageButtons:d=5,showFirstLastButtons:c=!1,size:p="md",variant:h="default",shape:f="rounded",views:g,...x})=>{const{visiblePageNumbers:b}=kx(e,o,d);return t.jsx(Sx,{currentPage:e,totalPages:o,onPageChange:r,pageSize:n,pageSizeOptions:a,onPageSizeChange:i,showPageSizeSelector:s,showPageInfo:m,maxPageButtons:d,showFirstLastButtons:c,size:p,variant:h,shape:f,visiblePageNumbers:b,views:g,...x})},wl=jx,wx=e=>typeof e=="string"&&(/^(#|rgb\(|rgba\(|hsl\(|hsla\(|var\()/.test(e)||["black","currentColor","inherit","transparent","white"].includes(e)),vx=u.memo(({shape:e="linear",value:o=0,max:r=100,color:n="theme-primary",backgroundColor:a="color-gray-200",height:i,size:s,radius:m=4,strokeWidth:d=10,showLabel:c=!1,labelColor:p="theme-text-primary",animated:h=!0,animationDuration:f="0.5s",views:g,themeMode:x,...b})=>{var E;const{getColor:y,themeMode:k}=l.useTheme(),S=x||k,C=Math.min(r,Math.max(0,o))/r*100,j=T=>wx(T)?T:y(T,{themeMode:S}),v=u.useMemo(()=>j(a),[y,a,S]),I=u.useMemo(()=>j(n),[y,n,S]);if(e==="circle"){const T=s||(typeof i=="number"?i:100),A=(T-d)/2,P=2*Math.PI*A,z=P-C/100*P;return t.jsxs(l.View,{width:T,height:T,position:"relative",display:"flex",alignItems:"center",justifyContent:"center",...g==null?void 0:g.container,...b,children:[t.jsxs("svg",{width:T,height:T,viewBox:`0 0 ${T} ${T}`,style:{transform:"rotate(-90deg)"},children:[t.jsx("circle",{cx:T/2,cy:T/2,r:A,stroke:v,strokeWidth:d,fill:"transparent",...g==null?void 0:g.track}),t.jsx("circle",{cx:T/2,cy:T/2,r:A,stroke:I,strokeWidth:d,strokeDasharray:P,strokeDashoffset:z,strokeLinecap:"round",fill:"transparent",style:{transition:h?`stroke-dashoffset ${f} ease-in-out`:"none"},...g==null?void 0:g.indicator})]}),c&&t.jsx(l.View,{position:"absolute",top:0,left:0,right:0,bottom:0,display:"flex",alignItems:"center",justifyContent:"center",pointerEvents:"none",children:t.jsxs(l.Text,{color:p,fontSize:`${T*.2}px`,fontWeight:"bold",...g==null?void 0:g.text,children:[Math.round(C),"%"]})})]})}const F=i||8,W={backgroundColor:v,...((E=g==null?void 0:g.container)==null?void 0:E.style)||{},...b.style||{}};return t.jsxs(l.View,{role:"progressbar","aria-valuenow":o,"aria-valuemin":0,"aria-valuemax":r,width:"100%",height:F,borderRadius:m,overflow:"hidden",position:"relative",display:"flex",alignItems:"center",justifyContent:"center",...g==null?void 0:g.container,...b,style:W,children:[t.jsx("div",{style:{height:"100%",backgroundColor:I,borderRadius:typeof m=="number"?`${m}px`:m,position:"absolute",left:0,top:0,bottom:0,width:`${C}%`,transition:h?`width ${f} ease-in-out`:"none",...g==null?void 0:g.bar}}),c&&t.jsxs(l.Text,{color:p,fontSize:typeof F=="number"&&F>16?`${F*.6}px`:"10px",fontWeight:"bold",position:"relative",zIndex:1,...g==null?void 0:g.text,children:[Math.round(C),"%"]})]})}),Tx=e=>{const o=pe("progress",e);return t.jsx(vx,{...o})},vl=Tx,Ix=e=>({solid:"solid",dashed:"dashed",dotted:"dotted"}),Fx=Ix(),Rx={thin:"1px",medium:"2px",thick:"4px"},Bo={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"}},zx=e=>typeof e=="string"&&(/^(#|rgb\(|rgba\(|hsl\(|hsla\(|var\()/.test(e)||["black","currentColor","inherit","transparent","white"].includes(e)),Mx=({orientation:e="horizontal",variant:o="solid",thickness:r="thin",color:n,spacing:a="0px",label:i,decorative:s=!1,views:m,themeMode:d,...c})=>{const{themeMode:p}=l.useTheme(),h=n||"color-gray-200",f=Fx[o],g=Rx[r],x=s?{"aria-hidden":!0}:{role:"separator","aria-orientation":e},b=zx(h)?{style:{borderColor:h}}:{borderColor:h};return i&&e==="horizontal"?t.jsxs(l.Horizontal,{alignItems:"center",justifyContent:"center",width:"100%",padding:a,...x,...c,children:[t.jsx(l.View,{height:"0px",flexGrow:1,borderTop:`${g} ${f}`,...b,...Bo.container,...m==null?void 0:m.container}),t.jsx(l.Text,{...Bo.label,...m==null?void 0:m.label,children:i}),t.jsx(l.View,{height:"0px",flexGrow:1,borderTop:`${g} ${f}`,...b,...Bo.container,...m==null?void 0:m.container})]}):e==="horizontal"?t.jsx(l.View,{height:"0px",width:"100%",borderTop:`${g} ${f}`,padding:a,...b,...Bo.container,...x,...m==null?void 0:m.container,...c}):t.jsx(l.View,{width:"0px",height:"100%",borderLeft:`${g} ${f}`,padding:a,...b,...Bo.container,...x,...m==null?void 0:m.container,...c})},Tl=e=>{const o=pe("separator",e);return t.jsx(Mx,{...o})},It=Tl,Wx=Tl,Hx={xs:12,sm:14,md:16,lg:18,xl:20},Px=({isSupported:e,isSharing:o,onShare:r,label:n,children:a,icon:i,size:s,isDisabled:m,isLoading:d,iconPosition:c,disableWhenUnsupported:p=!0,...h})=>{const f=s??"md",g=i??t.jsx(Sa,{widthHeight:Hx[f],strokeWidth:1.5,filled:!1}),x=!!m||!e&&p,b=!!d||o;return t.jsx(ie,{...h,size:f,icon:g,iconPosition:c??"left",isDisabled:x,isLoading:b,onClick:r,children:a??n??"Share"})},_n=()=>typeof navigator>"u"?void 0:navigator,Ax=(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},Ex=e=>{if(typeof e=="object"&&e!==null&&"name"in e)return String(e.name)},Vx=e=>{const{shareData:o,onClick:r,onUnsupported:n,onShareStart:a,onShareSuccess:i,onShareCancel:s,onShareError:m}=e,[d,c]=u.useState(!1),p=u.useMemo(()=>Ax(_n(),o),[o]),h=u.useCallback((...f)=>{r==null||r(...f);const g=_n();if(!g||typeof g.share!="function"){n==null||n();return}if(!d){if(typeof g.canShare=="function")try{if(!g.canShare(o)){n==null||n();return}}catch(x){m==null||m(x);return}c(!0),a==null||a();try{g.share(o).then(()=>{i==null||i()}).catch(x=>{if(Ex(x)==="AbortError"){s==null||s();return}m==null||m(x)}).finally(()=>{c(!1)})}catch(x){c(!1),m==null||m(x)}}},[d,r,s,m,a,i,n,o]);return{isSupported:p,isSharing:d,handleShare:h}},Dx=e=>{const{isSupported:o,isSharing:r,handleShare:n}=Vx(e),{shareData:a,onShareStart:i,onShareSuccess:s,onShareCancel:m,onShareError:d,onUnsupported:c,onClick:p,...h}=e;return t.jsx(Px,{...h,isSupported:o,isSharing:r,onShare:n})},Il=Dx,$x=({label:e,status:o="default",views:r,themeMode:n,...a})=>{const{themeMode:i}=l.useTheme(),s=Wa();return t.jsxs(l.Horizontal,{alignItems:"center",gap:8,role:"status-indicator",...r==null?void 0:r.container,...a,children:[t.jsx(l.View,{role:"status-dot",width:"8px",height:"8px",borderRadius:"50%",...s[o].indicator,...r==null?void 0:r.indicator}),e&&t.jsx(l.Text,{role:"status-label",fontSize:"14px",lineHeight:"20px",...s[o].label,...r==null?void 0:r.label,children:e})]})},ht=e=>{const o=pe("status",e);return t.jsx($x,{...o})},Bx=(e=!0,o,r,n)=>{const{on:a}=l.useResponsive(),i=a("mobile"),[s,m]=u.useState(o!==void 0?o:e);return u.useEffect(()=>{o!==void 0&&m(o)},[o]),{isExpanded:s,toggleExpanded:()=>{const h=!s;m(h),r&&r(h)},expand:()=>{s||(m(!0),r&&r(!0))},collapse:()=>{s&&(m(!1),r&&r(!1))},isMobile:i}},_x={sm:{expandedWidth:"240px",collapsedWidth:"64px"},md:{expandedWidth:"280px",collapsedWidth:"72px"},lg:{expandedWidth:"320px",collapsedWidth:"80px"},xl:{expandedWidth:"360px",collapsedWidth:"88px"}},Lx=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"}}),Ox=Lx(),Nx={left:{left:0,borderRightWidth:"1px",borderRightStyle:"solid",borderRightColor:"color-gray-200"},right:{right:0,borderLeftWidth:"1px",borderLeftStyle:"solid",borderLeftColor:"color-gray-200"}},qx={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)"}},Ux={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)"},Fl=u.createContext({isExpanded:!0,toggleExpanded:()=>{},expand:()=>{},collapse:()=>{},position:"left",size:"md",variant:"default"}),_t=()=>u.useContext(Fl),Gx=({value:e,children:o})=>t.jsx(Fl.Provider,{value:e,children:o}),Yx=({children:e,showToggleButton:o=!0,views:r,...n})=>{const{isExpanded:a,toggleExpanded:i,position:s}=_t();return t.jsx(l.Horizontal,{width:"100%",padding:"16px",borderBottomWidth:"1px",borderBottomStyle:"solid",borderBottomColor:"color-gray-200",alignItems:"center",justifyContent:"space-between",...r==null?void 0:r.header,...n,children:a?t.jsxs(l.Horizontal,{width:"100%",alignItems:"center",justifyContent:"space-between",children:[e,o&&t.jsx(l.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:i,"aria-label":a?"Collapse sidebar":"Expand sidebar",...r==null?void 0:r.toggleButton,children:t.jsx(se,{orientation:s==="left"?"left":"right",widthHeight:16,...r==null?void 0:r.toggleButtonIcon})})]}):t.jsx(l.View,{width:"100%",display:"flex",alignItems:"center",justifyContent:"center",children:o&&t.jsx(l.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:i,"aria-label":a?"Collapse sidebar":"Expand sidebar",...r==null?void 0:r.toggleButton,children:t.jsx(se,{orientation:s==="left"?"right":"left",widthHeight:16,...r==null?void 0:r.toggleButtonIcon})})})})},Xx=({children:e,views:o,...r})=>{const{isExpanded:n}=_t();return t.jsx(l.View,{flex:"1",width:"100%",overflowY:"auto",overflowX:"hidden",padding:n?"16px":"8px",...o==null?void 0:o.content,...r,children:e})},Kx=({children:e,views:o,...r})=>{const{isExpanded:n}=_t();return t.jsx(l.View,{width:"100%",padding:"16px",borderTopWidth:"1px",borderTopStyle:"solid",borderTopColor:"color-gray-200",...o==null?void 0:o.footer,...r,children:n?e:null})},Jx=({children:e,position:o="left",size:r="md",variant:n="default",fixed:a=!1,hasBackdrop:i=!0,expandedWidth:s,collapsedWidth:m,breakpoint:d,breakpointBehavior:c="overlay",elevation:p="none",transitionPreset:h="normal",ariaLabel:f="Sidebar navigation",showToggleButton:g,toggleExpanded:x,expand:b,isExpanded:y,isMobile:k,collapse:S,views:w,themeMode:C,...j})=>{const v=_x[r],I=y?s||v.expandedWidth:m||v.collapsedWidth,F=!k||k&&c!=="hide",W=a||k&&c==="overlay"?"fixed":"relative",E=i&&k&&y&&c==="overlay";return t.jsxs(t.Fragment,{children:[E&&t.jsx(l.View,{position:"fixed",top:0,left:0,width:"100vw",height:"100vh",backgroundColor:"color-blackAlpha-500",zIndex:998,onClick:S,...w==null?void 0:w.backdrop}),F&&t.jsx(l.Vertical,{position:W,top:0,height:"100vh",width:I,zIndex:999,transition:Ux[h],transform:k&&c==="overlay"&&!y?`translateX(${o==="left"?"-100%":"100%"})`:"translateX(0)",role:"navigation","aria-label":f,...Ox[n],...Nx[o],...qx[p],...w==null?void 0:w.container,...j,children:u.Children.map(e,T=>T)})]})},Qx=({children:e,position:o="left",size:r="md",variant:n="default",defaultExpanded:a=!0,expanded:i,onExpandedChange:s,fixed:m=!1,hasBackdrop:d=!0,showToggleButton:c=!0,expandedWidth:p,collapsedWidth:h,breakpoint:f=768,breakpointBehavior:g="overlay",views:x,...b})=>{const{isExpanded:y,toggleExpanded:k,expand:S,collapse:w,isMobile:C}=Bx(a,i,s);return t.jsx(Gx,{value:{isExpanded:y,toggleExpanded:k,expand:S,collapse:w,position:o,size:r,variant:n,views:x},children:t.jsx(Jx,{position:o,size:r,variant:n,fixed:m,hasBackdrop:d,showToggleButton:c,expandedWidth:p,collapsedWidth:h,breakpoint:f,breakpointBehavior:g,isExpanded:y,isMobile:C,toggleExpanded:k,expand:S,collapse:w,views:x,...b,children:e})})},Zo=Qx;Zo.Header=Yx;Zo.Content=Xx;Zo.Footer=Kx;Zo.useContext=_t;const Zx=()=>({getItem:e=>{try{return localStorage.getItem(`resizable-${e}`)}catch(o){return console.warn("Failed to access localStorage:",o),null}},setItem:(e,o)=>{try{localStorage.setItem(`resizable-${e}`,o)}catch(r){console.warn("Failed to write to localStorage:",r)}}}),eb=(e,o,r,n=50,a=1/0,i=!1,s,m,d=10)=>{const[c,p]=u.useState(!1),[h,f]=u.useState([]),g=u.useRef(null),x=u.useRef(null),b=u.useRef(0),y=u.useRef([]),k=u.useRef(m||(typeof window<"u"?Zx():null)),S=u.useCallback(()=>g.current?e==="horizontal"?g.current.offsetWidth:g.current.offsetHeight:0,[e]),w=u.useCallback(()=>{if(!s||!k.current)return null;const R=k.current.getItem(s);if(!R)return null;try{const H=JSON.parse(R);return Array.isArray(H.sizes)?H.sizes:null}catch(H){return console.warn("Failed to parse saved panel sizes:",H),null}},[s]),C=u.useCallback(()=>{if(!s||!k.current||h.length===0)return;const R=h.map(H=>({id:H.id,size:H.size,collapsed:H.collapsed||!1}));k.current.setItem(s,JSON.stringify({sizes:R}))},[s,h]),j=u.useCallback((R,H,M,D,B)=>{f(V=>V.some(L=>L.id===R)?V:[...V,{id:R,size:H,minSize:M??n,maxSize:D??a,collapsible:B??i,collapsed:!1}])},[n,a,i]),v=u.useCallback(R=>{f(H=>H.filter(M=>M.id!==R))},[]),I=u.useCallback(R=>{const H=h.find(M=>M.id===R);return H?H.size:0},[h]),F=u.useCallback((R,H)=>{f(M=>M.map(D=>D.id===R?{...D,size:H}:D))},[]),W=u.useCallback(R=>{const H=h.find(M=>M.id===R);return H?!!H.collapsed:!1},[h]),E=u.useCallback(R=>{f(H=>{const M=H.findIndex(L=>L.id===R);if(M===-1)return H;const D=H[M];if(!D.collapsible)return H;const B={...D,collapsed:!D.collapsed},V=[...H];return V[M]=B,V})},[]),T=u.useCallback((R,H)=>{x.current=R,b.current=H,y.current=h.map(M=>M.size),p(!0)},[h]),A=u.useCallback(R=>{if(!c||!x.current)return;const H=x.current,M=R-b.current;let D=-1;const B=H.match(/\d+$/);if(B&&(D=parseInt(B[0],10)-1),D===-1&&h.length>=2&&(D=0),D<0||D>=h.length-1)return;const V=h[D],L=h[D+1];if(V.collapsed||L.collapsed)return;let _=y.current[D]+M,q=y.current[D+1]-M;_=Math.max(V.minSize??n,Math.min(V.maxSize??a,_)),q=Math.max(L.minSize??n,Math.min(L.maxSize??a,q)),f(O=>O.map((Y,$)=>$===D?{...Y,size:_}:$===D+1?{...Y,size:q}:Y))},[c,h,e,n,a]),P=u.useCallback(()=>{c&&r&&r(h.map(R=>R.size)),x.current=null,p(!1),s&&C()},[c,h,r,s,C]),z=u.useCallback(R=>{if(!c||!x.current)return;const H=x.current;let M=-1;const D=H.match(/\d+$/);if(D&&(M=parseInt(D[0],10)-1),M===-1&&h.length>=2&&(M=0),M<0||M>=h.length-1)return;let B=0;e==="horizontal"?(R.key==="ArrowLeft"&&(B=-d),R.key==="ArrowRight"&&(B=d),R.key==="Home"&&(B=-100),R.key==="End"&&(B=100)):(R.key==="ArrowUp"&&(B=-d),R.key==="ArrowDown"&&(B=d),R.key==="Home"&&(B=-100),R.key==="End"&&(B=100)),B!==0&&(R.preventDefault(),A(b.current+B)),R.key==="Escape"&&(f(V=>V.map((L,_)=>({...L,size:y.current[_]}))),P())},[c,h,e,A,P,d]);return u.useEffect(()=>{const R=D=>{if(!c)return;const B=e==="horizontal"?D.clientX:D.clientY;A(B)},H=D=>{if(!c||D.touches.length===0)return;const B=D.touches[0],V=e==="horizontal"?B.clientX:B.clientY;A(V)},M=()=>{c&&P()};return c&&(document.addEventListener("mousemove",R),document.addEventListener("touchmove",H),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",R),document.removeEventListener("touchmove",H),document.removeEventListener("mouseup",M),document.removeEventListener("touchend",M),document.removeEventListener("keydown",z),document.body.style.cursor="",document.body.style.userSelect=""}},[c,e,A,P,z]),u.useEffect(()=>{if(h.length!==0){if(s){const R=w();if(R){f(H=>H.map(M=>{const D=R.find(B=>B.id===M.id);return D?{...M,size:D.size,collapsed:D.collapsed||!1}:M}));return}}if(!o){const H=S()/h.length;f(M=>M.map(D=>({...D,size:H})))}}},[h.length,o,S,s,w]),u.useEffect(()=>{if(!o||o.length===0||h.length===0)return;const R=S(),H=o.map(M=>typeof M=="string"&&M.endsWith("%")?parseFloat(M)/100*R:typeof M=="number"?M:parseFloat(M));f(M=>M.map((D,B)=>({...D,size:B<H.length?H[B]:D.size})))},[o,h.length,S]),u.useEffect(()=>{h.length>0&&s&&!c&&C()},[h,s,c,C]),{isResizing:c,setIsResizing:p,containerRef:g,panels:h,registerPanel:j,unregisterPanel:v,getPanelSize:I,setPanelSize:F,isPanelCollapsed:W,togglePanelCollapse:E,startResize:T,onResize:A,endResize:P}},ob={horizontal:{flexDirection:"row"},vertical:{flexDirection:"column"}},tb=(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],rb=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"}}}),nb=rb(),ct={horizontal:{width:"2px",height:"20px",backgroundColor:"color-gray-400",margin:"0 1px"},vertical:{width:"20px",height:"2px",backgroundColor:"color-gray-400",margin:"1px 0"}},Rl=u.createContext({orientation:"horizontal",size:"md",variant:"default",isResizing:!1,setIsResizing:()=>{},registerPanel:()=>{},unregisterPanel:()=>{},getPanelSize:()=>0,setPanelSize:()=>{},isPanelCollapsed:()=>!1,togglePanelCollapse:()=>{},startResize:()=>{},onResize:()=>{},endResize:()=>{}}),zl=()=>u.useContext(Rl),ab=({value:e,children:o})=>t.jsx(Rl.Provider,{value:e,children:o}),ib=({children:e,id:o,defaultSize:r,minSize:n,maxSize:a,collapsible:i,defaultCollapsed:s,onCollapseChange:m,views:d,...c})=>{const{orientation:p,registerPanel:h,unregisterPanel:f,getPanelSize:g,isPanelCollapsed:x,togglePanelCollapse:b}=zl(),y=typeof r=="string"&&r.endsWith("%")?0:typeof r=="number"?r:0;u.useEffect(()=>(h(o,y,n,a,i),()=>f(o)),[o,y,n,a,i,h,f]);const k=g(o),S=x(o);return u.useEffect(()=>{m&&S!==void 0&&m(S)},[S,m]),u.useEffect(()=>{i&&s&&!S&&b(o)},[o,i,s,S,b]),S?t.jsx(l.View,{flex:"0 0 auto",width:p==="horizontal"?"10px":"100%",height:p==="vertical"?"10px":"100%",backgroundColor:"color-gray-200",cursor:"pointer",onClick:()=>b(o),"aria-label":`Expand panel ${o}`,role:"button",tabIndex:0,...d==null?void 0:d.collapsedPanel,...c}):t.jsx(l.View,{flex:k>0?"0 0 auto":"1",width:p==="horizontal"?`${k}px`:"100%",height:p==="vertical"?`${k}px`:"100%",overflow:"auto",...d==null?void 0:d.panel,...c,children:e})},lb=({id:e,position:o="both",disabled:r=!1,withVisualIndicator:n=!0,withCollapseButton:a=!1,collapseTarget:i,views:s,...m})=>{const{orientation:d,size:c,variant:p,startResize:h,isPanelCollapsed:f,togglePanelCollapse:g}=zl(),b=(()=>{if(i)return i;const j=e.match(/\d+$/);if(!j)return"";const v=parseInt(j[0],10);return isNaN(v)?"":`panel${v}`})(),y=f(b),k=j=>{if(r)return;j.preventDefault();const v=d==="horizontal"?j.clientX:j.clientY;h(e,v)},S=j=>{if(r||j.touches.length===0)return;j.preventDefault();const v=j.touches[0],I=d==="horizontal"?v.clientX:v.clientY;h(e,I)},w=j=>{r||(j.key==="Enter"||j.key===" ")&&(j.preventDefault(),h(e,0))},C=j=>{j.stopPropagation(),b&&g(b)};return t.jsxs(l.View,{role:"separator","aria-orientation":d,"aria-valuemin":0,"aria-valuemax":100,tabIndex:r?-1:0,cursor:d==="horizontal"?"col-resize":"row-resize",display:"flex",alignItems:"center",justifyContent:"center",position:"relative",...tb(c,d),...nb[p],onMouseDown:k,onTouchStart:S,onKeyDown:w,opacity:r?.5:1,pointerEvents:r?"none":"auto",...s==null?void 0:s.handle,...m,children:[n&&t.jsx(l.View,{display:"flex",alignItems:"center",justifyContent:"center",width:d==="horizontal"?"100%":"auto",height:d==="vertical"?"100%":"auto",pointerEvents:"none",...s==null?void 0:s.handleIcon,children:d==="horizontal"?t.jsxs(l.Horizontal,{gap:1,children:[t.jsx(l.View,{...ct.horizontal}),t.jsx(l.View,{...ct.horizontal})]}):t.jsxs(l.Vertical,{gap:1,children:[t.jsx(l.View,{...ct.vertical}),t.jsx(l.View,{...ct.vertical})]})}),a&&b&&t.jsx(l.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:C,"aria-label":y?`Expand panel ${b}`:`Collapse panel ${b}`,role:"button",tabIndex:0,pointerEvents:"auto",_hover:{backgroundColor:"color-gray-200"},...s==null?void 0:s.collapseIcon,children:t.jsx(l.View,{width:"8px",height:"8px",display:"flex",alignItems:"center",justifyContent:"center",children:y?t.jsxs(l.Horizontal,{children:[t.jsx(l.View,{width:"6px",height:"2px",backgroundColor:"color-gray-600"}),t.jsx(l.View,{width:"2px",height:"6px",backgroundColor:"color-gray-600",position:"absolute"})]}):t.jsx(l.View,{width:"6px",height:"2px",backgroundColor:"color-gray-600"})})})]})},sb=({children:e,orientation:o="horizontal",size:r="md",variant:n="default",defaultSizes:a,minSize:i,maxSize:s,collapsible:m=!1,containerRef:d,autoSaveId:c,keyboardResizeBy:p,onLayout:h,views:f,...g})=>{const x=o==="horizontal"?l.Horizontal:l.Vertical;return t.jsx(x,{ref:d,width:"100%",height:"100%",position:"relative",overflow:"hidden",...ob[o],...f==null?void 0:f.container,...g,children:e})},cb=({children:e,orientation:o="horizontal",size:r="md",variant:n="default",defaultSizes:a,onSizesChange:i,minSize:s=50,maxSize:m,collapsible:d=!1,autoSaveId:c,storage:p,keyboardResizeBy:h=10,views:f,...g})=>{const{isResizing:x,setIsResizing:b,containerRef:y,registerPanel:k,unregisterPanel:S,getPanelSize:w,setPanelSize:C,isPanelCollapsed:j,togglePanelCollapse:v,startResize:I,onResize:F,endResize:W}=eb(o,a,i,s,m,d,c,p,h);return t.jsx(ab,{value:{orientation:o,size:r,variant:n,isResizing:x,setIsResizing:b,registerPanel:k,unregisterPanel:S,getPanelSize:w,setPanelSize:C,isPanelCollapsed:j,togglePanelCollapse:v,startResize:I,onResize:F,endResize:W},children:t.jsx(sb,{orientation:o,size:r,variant:n,defaultSizes:a,minSize:s,maxSize:m,collapsible:d,autoSaveId:c,keyboardResizeBy:h,containerRef:y,views:f,...g,children:e})})},sn=cb;sn.Panel=ib;sn.Handle=lb;const dt={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"}}},db={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"}},mb=()=>Math.random().toString(36).substring(2,9);let go=new Map;const et=Ft.create(e=>({toasts:[],add:(o,r,n,a={})=>{const i=a.id||mb(),s={id:i,variant:o,title:r,description:n,createdAt:Date.now(),isVisible:!0,...a};if(e(m=>({toasts:[...m.toasts,s]})),a.duration!==0){const m=a.duration||5e3,d=setTimeout(()=>{et.getState().remove(i)},m);go.set(i,d)}return i},remove:o=>{e(r=>({toasts:r.toasts.map(n=>n.id===o?{...n,isVisible:!1}:n)})),go.has(o)&&(clearTimeout(go.get(o)),go.delete(o)),setTimeout(()=>{e(r=>({toasts:r.toasts.filter(n=>n.id!==o)}))},300)},removeAll:()=>{go.forEach(clearTimeout),go.clear(),e(o=>({toasts:o.toasts.map(r=>({...r,isVisible:!1}))})),setTimeout(()=>{e({toasts:[]})},300)}})),so=(e,o,r,n)=>et.getState().add(e,o,r,n),Ml=(e,o,r)=>so("info",e,o,r),Wl=(e,o,r)=>so("success",e,o,r),Hl=(e,o,r)=>so("warning",e,o,r),Pl=(e,o,r)=>so("error",e,o,r),Al=e=>{et.getState().remove(e)},El=()=>{et.getState().removeAll()},Vl=({variant:e,title:o,description:r,onClose:n,isClosable:a=!0,action:i,actionText:s,showIcon:m=!0,theme:d,views:c,render:p,icon:h,id:f,isVisible:g=!0,themeMode:x})=>{const b=d??dt,y=()=>{var C,j;if(h!==void 0)return h;const w=e?(j=(C=dt[e])==null?void 0:C.icon)==null?void 0:j.color:dt.info.icon.color;switch(e){case"info":return t.jsx(qe,{widthHeight:20,color:w});case"success":return t.jsx(ka,{widthHeight:20,color:w});case"warning":return t.jsx(qe,{widthHeight:20,color:w,orientation:"down"});case"error":return t.jsx(Mt,{widthHeight:20,color:w});default:return t.jsx(qe,{widthHeight:20,color:dt.info.icon.color})}};if(p)return t.jsx(t.Fragment,{children:p({id:f||"",onClose:n})});const k=e==="error"?"alert":"status",S=e==="error"||e==="warning"?"assertive":"polite";return t.jsxs(l.Horizontal,{role:k,"aria-live":S,"aria-atomic":"true","data-state":g?"open":"closed",gap:12,width:"100%",maxWidth:"380px",borderWidth:"1px",borderStyle:"solid",borderRadius:"12px",padding:"12px 14px",alignItems:"flex-start",position:"relative",backgroundColor:b[e].container.backgroundColor,borderColor:b[e].container.border,boxShadow:"0 12px 32px rgba(15, 23, 42, 0.12)",opacity:g?1:0,transform:g?"translateY(0)":"translateY(4px)",transition:"opacity 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease",...c==null?void 0:c.container,children:[m&&t.jsx(l.View,{marginTop:"2px",...c==null?void 0:c.icon,children:y()}),t.jsxs(l.Vertical,{gap:4,flex:"1",children:[t.jsx(l.Text,{size:"sm",lineHeight:"20px",fontWeight:"600",color:b[e].content.color,backgroundColor:b[e].container.backgroundColor,...c==null?void 0:c.title,children:o}),r&&t.jsx(l.Text,{size:"xs",lineHeight:"18px",color:b[e].content.color,fontWeight:"400",backgroundColor:b[e].container.backgroundColor,...c==null?void 0:c.description,children:r}),i&&s&&t.jsx(l.Text,{size:"sm",fontWeight:"600",marginTop:"6px",cursor:"pointer",color:b[e].content.color,backgroundColor:b[e].container.backgroundColor,onClick:w=>{w.stopPropagation(),i()},_hover:{textDecoration:"underline"},transition:"opacity 0.2s ease, color 0.2s ease",...c==null?void 0:c.actionButton,children:s})]}),a&&t.jsx(l.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-blackAlpha-100"},transition:"background-color 0.2s ease, opacity 0.2s ease",...c==null?void 0:c.closeButton,children:t.jsx(ve,{widthHeight:16,color:b[e].content.color})})]})},ub=({position:e="top-right",gap:o=8,limit:r=5,containerStyle:n})=>{const{toasts:a,remove:i}=et(),m=u.useMemo(()=>{const d={top:[],"top-right":[],"top-left":[],bottom:[],"bottom-right":[],"bottom-left":[]};return a.forEach(c=>{const p=c.position||e;d[p].push(c)}),Object.keys(d).forEach(c=>{d[c]=d[c].slice(-r)}),d},[a,e,r])[e];return t.jsx(l.View,{position:"fixed",zIndex:9999,display:"flex",flexDirection:e.includes("bottom")?"column-reverse":"column",gap:`${o}px`,width:"fit-content",maxWidth:"100%",pointerEvents:"none",...db[e],style:n,children:m.map(d=>t.jsx(l.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:t.jsx(Vl,{id:d.id,variant:d.variant,title:d.title,description:d.description,onClose:()=>i(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))})},pb=()=>({toast:(e,o,r,n)=>so(e,o,r,n),info:(e,o,r)=>Ml(e,o,r),success:(e,o,r)=>Wl(e,o,r),warning:(e,o,r)=>Hl(e,o,r),error:(e,o,r)=>Pl(e,o,r),remove:e=>Al(e),removeAll:()=>El()}),hb=e=>t.jsx(Vl,{...e}),fb=Object.assign(hb,{Container:e=>t.jsx(ub,{...e}),show:so,info:Ml,success:Wl,warning:Hl,error:Pl,remove:Al,removeAll:El}),gb=pb,Ln=(e,o)=>{var s,m;if(!e)return!0;const r=e.toLowerCase(),n=o.name.toLowerCase().includes(r),a=((s=o.description)==null?void 0:s.toLowerCase().includes(r))||!1,i=((m=o.keywords)==null?void 0:m.some(d=>d.toLowerCase().includes(r)))||!1;return n||a||i},xb=({open:e,onOpenChange:o,groups:r=[],commands:n=[],filter:a})=>{const[i,s]=u.useState(""),[m,d]=u.useState(0),c=u.useRef(null),p=u.useMemo(()=>a||Ln,[a]),h=u.useMemo(()=>[...r.flatMap(y=>y.commands),...n],[r,n]),f=u.useMemo(()=>i.trim()?h.filter(b=>p(i,b)):h,[h,i,p]),g=u.useMemo(()=>{if(!i)return r;const b=a||Ln;return r.map(y=>({...y,commands:y.commands.filter(k=>b(i,k))})).filter(y=>y.commands.length)},[r,i,a]);u.useEffect(()=>{d(0)},[f.length]);const x=u.useCallback(b=>{if(e)switch(b.key){case"ArrowDown":b.preventDefault(),d(y=>y<f.length-1?y+1:y);break;case"ArrowUp":b.preventDefault(),d(y=>y>0?y-1:y);break;case"Enter":b.preventDefault(),f[m]&&(f[m].onSelect(),o(!1),s(""));break;case"Escape":b.preventDefault(),o(!1),s("");break}},[e,f,m,o]);return u.useEffect(()=>(document.addEventListener("keydown",x),()=>{document.removeEventListener("keydown",x)}),[x]),u.useEffect(()=>{if(c.current&&e){const b=c.current.querySelector(`[data-index="${m}"]`);b&&b.scrollIntoView({block:"nearest"})}},[m,e]),u.useEffect(()=>{e?d(0):s("")},[e]),{search:i,setSearch:s,selectedIndex:m,setSelectedIndex:d,filteredCommands:f,filteredGroups:g,listRef:c}},bb={sm:{width:"400px",maxHeight:"300px"},md:{width:"500px",maxHeight:"400px"},lg:{width:"600px",maxHeight:"500px"}},yb=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)"}}),kb=yb(),Cb={display:"flex",alignItems:"center",padding:"12px 16px",borderBottomWidth:"1px",borderBottomStyle:"solid",borderBottomColor:"color-gray-200"},Sb={overflow:"auto",padding:"8px 0"},jb={marginBottom:"8px"},wb={padding:"8px 16px",fontSize:"12px",fontWeight:"bold",color:"color-gray-500",textTransform:"uppercase"},vb={display:"flex",alignItems:"center",padding:"8px 16px",cursor:"pointer",userSelect:"none",borderRadius:"4px",margin:"0 8px",_hover:{backgroundColor:"color-gray-100"}},Tb={backgroundColor:"color-blue-50",_hover:{backgroundColor:"color-blue-100"}},Ib={opacity:.5,cursor:"not-allowed",_hover:{backgroundColor:"transparent"}},Fb={display:"flex",alignItems:"center",justifyContent:"center",marginRight:"12px",color:"color-gray-500"},Rb={display:"flex",flexDirection:"column",flex:1},zb={fontSize:"14px",fontWeight:"medium"},Mb={fontSize:"12px",color:"color-gray-500",marginTop:"2px"},Wb={display:"flex",alignItems:"center",marginLeft:"12px",fontSize:"12px",color:"color-gray-500"},Hb={display:"flex",alignItems:"center",justifyContent:"center",padding:"16px",color:"color-gray-500",textAlign:"center"},Pb={display:"flex",alignItems:"center",justifyContent:"space-between",padding:"8px 16px",borderTopWidth:"1px",borderTopStyle:"solid",borderTopColor:"color-gray-200",fontSize:"12px",color:"color-gray-500"},Ab=u.createContext({search:"",setSearch:()=>{},selectedIndex:0,setSelectedIndex:()=>{},filteredCommands:[],onSelect:()=>{}}),Eb=({value:e,children:o})=>t.jsx(Ab.Provider,{value:e,children:o}),Dl=({value:e,onValueChange:o,placeholder:r="Type a command or search...",views:n,...a})=>{const i=u.useRef(null);return u.useEffect(()=>{i.current&&i.current.focus()},[]),t.jsxs(l.View,{...Cb,...n==null?void 0:n.container,...a,children:[t.jsx(yt,{widthHeight:16,color:"color-gray-400",marginRight:"8px"}),t.jsx(l.View,{as:"input",type:"text",value:e,onChange:s=>o(s.target.value),placeholder:r,width:"100%",border:"none",outline:"none",backgroundColor:"transparent",fontSize:"14px",ref:i,...n==null?void 0:n.input})]})},Vb=({children:e,views:o,...r})=>t.jsx(l.View,{...Sb,...o==null?void 0:o.container,...r,children:e}),$l=({heading:e,children:o,views:r,...n})=>t.jsxs(l.View,{...jb,...r==null?void 0:r.container,...n,children:[t.jsx(l.Text,{...wb,...r==null?void 0:r.heading,children:e}),o]}),yr=({item:e,selected:o=!1,onSelect:r,views:n,...a})=>{const i=()=>{!e.disabled&&r&&r()};return t.jsxs(l.Horizontal,{...vb,...o?Tb:{},...e.disabled?Ib:{},onClick:i,...n==null?void 0:n.container,...a,children:[e.icon&&t.jsx(l.View,{...Fb,...n==null?void 0:n.icon,children:e.icon}),t.jsxs(l.Vertical,{...Rb,...n==null?void 0:n.content,children:[t.jsx(l.Text,{...zb,...n==null?void 0:n.name,children:e.name}),e.description&&t.jsx(l.Text,{...Mb,...n==null?void 0:n.description,children:e.description})]}),e.shortcut&&t.jsx(l.Text,{...Wb,...n==null?void 0:n.shortcut,children:e.shortcut})]})},Bl=({children:e="No results found.",views:o,...r})=>t.jsx(l.View,{...Hb,...o==null?void 0:o.container,...r,children:e}),Db=({open:e,onOpenChange:o,groups:r=[],commands:n=[],placeholder:a,size:i="md",variant:s="default",emptyState:m,footer:d,search:c,setSearch:p,selectedIndex:h,setSelectedIndex:f,filteredCommands:g,filteredGroups:x,listRef:b,views:y,filter:k,...S})=>{if(!e)return null;const w=u.useCallback(F=>{F.disabled||(F.onSelect(),o(!1),p(""))},[o,p]),C=u.useCallback(F=>F.target===F.currentTarget&&o(!1),[o]),j=u.useMemo(()=>({search:c,setSearch:p,selectedIndex:h,setSelectedIndex:f,filteredCommands:g,onSelect:w}),[c,h,g,w,p,f]),v=r.length>0,I=g.length===0;return t.jsx(l.View,{position:"fixed",top:0,left:0,right:0,bottom:0,display:"flex",alignItems:"center",justifyContent:"center",backgroundColor:"color-blackAlpha-400",zIndex:9999,onClick:C,...S,children:t.jsx(Eb,{value:j,children:t.jsxs(l.View,{borderRadius:"8px",overflow:"hidden",display:"flex",flexDirection:"column",...bb[i],...kb[s],...y==null?void 0:y.container,onClick:F=>F.stopPropagation(),children:[t.jsx(Dl,{value:c,onValueChange:p,placeholder:a,views:y==null?void 0:y.searchInput}),t.jsx(l.View,{ref:b,flex:1,overflow:"auto",...y==null?void 0:y.list,children:I?m||t.jsx(Bl,{views:y==null?void 0:y.empty}):v?x.map(F=>t.jsx($l,{heading:F.name,views:y==null?void 0:y.groupHeading,children:F.commands.map(W=>{const E=g.findIndex(T=>T.id===W.id);return t.jsx(yr,{item:W,selected:E===h,onSelect:()=>w(W),"data-index":E,views:{container:y==null?void 0:y.item,icon:y==null?void 0:y.icon,content:y==null?void 0:y.content,name:y==null?void 0:y.name,description:y==null?void 0:y.description,shortcut:y==null?void 0:y.shortcut}},W.id)})},F.id)):g.map((F,W)=>t.jsx(yr,{item:F,selected:W===h,onSelect:()=>w(F),"data-index":W,views:{container:y==null?void 0:y.item,icon:y==null?void 0:y.icon,content:y==null?void 0:y.content,name:y==null?void 0:y.name,description:y==null?void 0:y.description,shortcut:y==null?void 0:y.shortcut}},F.id))}),d&&t.jsx(l.View,{...Pb,...y==null?void 0:y.footer,children:d})]})})})},$b=({open:e,onOpenChange:o,groups:r=[],commands:n=[],placeholder:a,size:i="md",variant:s="default",filter:m,emptyState:d,footer:c,views:p,...h})=>{const{search:f,setSearch:g,selectedIndex:x,setSelectedIndex:b,filteredCommands:y,filteredGroups:k,listRef:S}=xb({open:e,onOpenChange:o,groups:r,commands:n,filter:m});return t.jsx(Db,{open:e,onOpenChange:o,groups:r,commands:n,placeholder:a,size:i,variant:s,emptyState:d,footer:c,search:f,setSearch:g,selectedIndex:x,setSelectedIndex:b,filteredCommands:y,filteredGroups:k,listRef:S,views:p,...h})},Mo=$b;Mo.Input=Dl;Mo.List=Vb;Mo.Group=$l;Mo.Item=yr;Mo.Empty=Bl;const On=()=>Math.random().toString(36).substring(2,11),Bb=({defaultOpen:e=!1,openDelay:o=200,closeDelay:r=200,isDisabled:n=!1}={})=>{const[a,i]=u.useState(e),s=u.useRef(null),m=u.useRef(null),d=u.useRef(null),c=u.useRef(null),p=u.useRef(`tooltip-trigger-${On()}`).current,h=u.useRef(`tooltip-content-${On()}`).current,f=u.useCallback(()=>{n||(c.current&&(clearTimeout(c.current),c.current=null),!a&&!d.current&&(d.current=setTimeout(()=>{i(!0),d.current=null},o)))},[a,o,n]),g=u.useCallback(()=>{d.current&&(clearTimeout(d.current),d.current=null),a&&!c.current&&(c.current=setTimeout(()=>{i(!1),c.current=null},r))},[a,r]),x=u.useCallback(()=>{c.current&&(clearTimeout(c.current),c.current=null)},[]);return u.useEffect(()=>()=>{d.current&&clearTimeout(d.current),c.current&&clearTimeout(c.current)},[]),u.useEffect(()=>{const b=y=>{y.key==="Escape"&&a&&i(!1)};return document.addEventListener("keydown",b),()=>{document.removeEventListener("keydown",b)}},[a]),{isOpen:a,openTooltip:f,closeTooltip:g,cancelCloseTimer:x,triggerRef:s,contentRef:m,triggerId:p,contentId:h}},_b={sm:{padding:"4px 8px",fontSize:"12px",maxWidth:"200px"},md:{padding:"6px 10px",fontSize:"14px",maxWidth:"250px"},lg:{padding:"8px 12px",fontSize:"16px",maxWidth:"300px"}},Lb=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"}}),Ob=Lb(),Nb=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}},_l=u.createContext({isOpen:!1,openTooltip:()=>{},closeTooltip:()=>{},triggerRef:{current:null},contentRef:{current:null},contentId:"",triggerId:""}),cn=()=>u.useContext(_l),qb=({value:e,children:o})=>t.jsx(_l.Provider,{value:e,children:o}),Ll=u.memo(({children:e,views:o,asChild:r=!1,...n})=>{const{openTooltip:a,closeTooltip:i,triggerRef:s,contentId:m,triggerId:d}=cn(),c=u.useCallback(()=>a(),[a]),p=u.useCallback(()=>i(),[i]),h=u.useCallback(()=>a(),[a]),f=u.useCallback(()=>i(),[i]),g={ref:s,onMouseEnter:c,onMouseLeave:p,onFocus:h,onBlur:f,id:d,"aria-describedby":m,...o==null?void 0:o.container,...n};return r&&u.isValidElement(e)?u.cloneElement(e,g):t.jsx(l.View,{display:"inline-block",...g,children:e})}),Ub=u.memo(({children:e,views:o,...r})=>{const{isOpen:n,contentRef:a,contentId:i,triggerId:s}=cn();return n?t.jsx(l.View,{ref:a,id:i,role:"tooltip","aria-labelledby":s,...o==null?void 0:o.container,...r,children:e}):null}),Gb=({content:e,children:o,position:r="top",align:n="center",size:a="md",variant:i="default",showArrow:s=!0,views:m,themeMode:d,...c})=>{const{isOpen:p,triggerRef:h,contentRef:f,contentId:g,triggerId:x}=cn(),{ref:b,relation:y}=l.useElementPosition({trackChanges:!0,trackOnHover:!0,trackOnScroll:!0,trackOnResize:!0}),[k,S]=u.useState({x:0,y:0,placement:r});u.useEffect(()=>{h!=null&&h.current&&b&&(b.current=h.current)},[h,b,p]),u.useEffect(()=>{if(p&&(f!=null&&f.current)&&(h!=null&&h.current)){const j=h.current.getBoundingClientRect();let v=r;y&&(r==="top"&&y.space.vertical==="bottom"?v="bottom":r==="bottom"&&y.space.vertical==="top"?v="top":r==="right"&&y.space.horizontal==="left"?v="left":r==="left"&&y.space.horizontal==="right"&&(v="right"));let I=0,F=0;switch(v){case"top":I=n==="start"?j.left:n==="end"?j.right-120:j.left+j.width/2-60,F=j.top-8;break;case"bottom":I=n==="start"?j.left:n==="end"?j.right-120:j.left+j.width/2-60,F=j.bottom+8;break;case"right":I=j.right+8,F=n==="start"?j.top:n==="end"?j.bottom-32:j.top+j.height/2-16;break;case"left":I=j.left-8,F=n==="start"?j.top:n==="end"?j.bottom-32:j.top+j.height/2-16;break}S({x:I,y:F,placement:v})}},[p,r,n,h,f,y]);const w=u.useMemo(()=>s?Nb(k.placement):{},[s,k.placement]),C=u.useMemo(()=>{const j={position:"fixed",left:k.x,top:k.y,zIndex:1e3};switch(k.placement){case"top":return{...j,transform:"translateY(-100%)"};case"left":return{...j,transform:"translateX(-100%)"};case"bottom":case"right":default:return j}},[k.x,k.y,k.placement]);return t.jsxs(l.View,{position:"relative",display:"inline-block",...m==null?void 0:m.container,...c,children:[t.jsx(Ll,{children:o}),p&&t.jsxs(l.View,{ref:f,id:g,role:"tooltip","aria-labelledby":x,borderRadius:4,boxShadow:"0px 2px 8px rgba(0, 0, 0, 0.15)",style:C,..._b[a],...Ob[i],...m==null?void 0:m.content,children:[typeof e=="string"?t.jsx(l.Text,{...m==null?void 0:m.text,children:e}):e,s&&t.jsx(l.View,{...w,...m==null?void 0:m.arrow})]})]})},Yb=({content:e,children:o,position:r="top",align:n="center",size:a="md",variant:i="default",openDelay:s=200,closeDelay:m=200,showArrow:d=!0,defaultOpen:c=!1,isDisabled:p=!1,views:h,...f})=>{const g=Bb({defaultOpen:c,openDelay:s,closeDelay:m,isDisabled:p});return t.jsx(qb,{value:g,children:t.jsx(Gb,{content:e,position:r,align:n,size:a,variant:i,showArrow:d,views:h,...f,children:o})})},Lt=Yb;Lt.Trigger=Ll;Lt.Content=Ub;const Ol=u.forwardRef((e,o)=>{const r=Ii(e);return t.jsx(Mi,{...e,...r})});Ol.displayName="ChatInput";const Xb={container:{position:"relative",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center"}},Nn={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%"}},rr={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}},nr={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}},Kb=u.createContext({}),Jb=({children:e,showRadialGradient:o=!0,views:r,themeMode:n,...a})=>{const i={white:"rgba(255,255,255,1)",transparent:"rgba(255,255,255,0)"},s=["rgb(59, 130, 246)","rgb(196, 181, 253)","rgb(147, 197, 253)","rgb(221, 214, 254)","rgb(96, 165, 250)"],m={...Nn.gradient,backgroundImage:`
|
|
26
|
+
${xe}`:xe}let ie=M,de=!1;M.endsWith("-thinking")&&(ie=M.replace(/-thinking$/,""),de=!0),a==null||a(Z,{model_name:ie,enable_thinking:de}),y||b(""),w([]),S([])},$=Y=>{w(Z=>Z.filter((ie,de)=>de!==Y)),!c&&C.length>Y&&S(Z=>Z.filter((ie,de)=>de!==Y))},U=Y=>{Y.preventDefault(),Y.stopPropagation(),H(!0)},K=Y=>{Y.preventDefault(),Y.stopPropagation(),H(!1)},ee=p.useCallback(Y=>{!Y||Y.length===0||(S(Z=>[...Z,...Y]),w(Z=>[...Z,...Y]),T(Z=>[...Z,...Y]),I(!0))},[S,w]),J=p.useCallback(()=>{if(E.length>0&&!A&&f){P(!0);const Y=E[0];z.current=Y,W(0);try{f(Y)}catch(Z){T(ie=>ie.slice(1)),P(!1),z.current=null,W(0),I(ie=>E.length-1>0||!1),h==null||h(Z)}}else E.length===0&&v&&(I(!1),W(0))},[E,A,f,v,h]);p.useEffect(()=>{J()},[E,A,J]);const oe="active",ne=Y=>!0,re=()=>{q(!1),e.onGuideClose&&e.onGuideClose()},G=Y=>{y&&t?t(Y.text):b(Y.text),e.onPromptExampleSelect&&e.onPromptExampleSelect(Y),V.current&&V.current.focus()},Q=p.useCallback(()=>C,[C]),te=p.useCallback(()=>S([]),[]);return{onSubmit:a,getPendingFiles:Q,clearPendingFiles:te,value:k,handleChange:B,handleSubmit:X,editableRef:V,fileInputRef:O,isUploading:v,uploadProgress:F,isDraggingOver:R,uploadedFiles:j,pendingFiles:C,removeUploadedFile:$,setPendingFiles:S,setUploadedFiles:w,setIsUploading:I,startUpload:ee,selectedModel:M,handleModelChange:D,modelOptions:L,subscriptionStatus:oe,canAccessModel:ne,handleDragOver:U,handleDragLeave:K,isGuideTipShown:_,hideGuideTip:re,handlePromptExampleSelect:G}},Og={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}},Wa={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"}},Ng={default:{borderRadius:"8px"},square:{borderRadius:"0px"},rounded:{borderRadius:"8px"}},qg={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"}},Ug={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"}},Ha=e=>`${e}-${Math.random().toString(36).substring(2,9)}`,Gg=({openDelay:e=200,closeDelay:o=300}={})=>{const[t,a]=p.useState(!1),n=p.useRef(null),l=p.useRef(null),s=p.useRef(null),d=p.useRef(null),u=p.useMemo(()=>Ha("hovercard-content"),[]),c=p.useMemo(()=>Ha("hovercard-trigger"),[]),m=p.useCallback(()=>{n.current&&(clearTimeout(n.current),n.current=null),l.current&&(clearTimeout(l.current),l.current=null)},[]),g=p.useCallback(()=>{m(),t||(n.current=setTimeout(()=>{a(!0)},e))},[t,e,m]),h=p.useCallback(()=>{m(),t&&(l.current=setTimeout(()=>{a(!1)},o))},[t,o,m]),f=p.useCallback(()=>{l.current&&(clearTimeout(l.current),l.current=null)},[]);return p.useEffect(()=>()=>m(),[m]),{isOpen:t,openCard:g,closeCard:h,cancelCloseTimer:f,triggerRef:s,contentRef:d,contentId:u,triggerId:c}},zl=p.createContext({isOpen:!1,openCard:()=>{},closeCard:()=>{},cancelCloseTimer:()=>{},triggerRef:{current:null},contentRef:{current:null},contentId:"",triggerId:""}),Yg=({children:e,value:o})=>r.jsx(zl.Provider,{value:o,children:e}),Ml=()=>{const e=p.useContext(zl);if(!e)throw new Error("useHoverCardContext must be used within a HoverCardProvider");return e},Xg=({children:e,views:o,asChild:t=!1,...a})=>{const{openCard:n,closeCard:l,triggerRef:s,contentId:d,triggerId:u}=Ml(),f={ref:s,onMouseEnter:()=>n(),onMouseLeave:()=>l(),onFocus:()=>n(),onBlur:()=>l(),id:u,"aria-describedby":d,...o==null?void 0:o.container,...a};if(t&&p.isValidElement(e)){const y=p.Children.only(e);return p.cloneElement(y,{...f,...y.props})}return r.jsx(i.View,{position:"relative",display:"inline-block",...f,children:e})},Kg=({children:e,views:o,side:t="bottom",align:a="center",sideOffset:n=8,style:l,backgroundColor:s="color-white",borderRadius:d="4px",boxShadow:u="0px 2px 8px rgba(0, 0, 0, 0.15)",padding:c="12px",minWidth:m="50px",maxWidth:g="300px",...h})=>{const{isOpen:f,cancelCloseTimer:y,closeCard:x,contentRef:b,triggerRef:k,contentId:j,triggerId:w}=Ml(),{ref:C,relation:S}=i.useElementPosition({trackChanges:!0,trackOnHover:!0,trackOnScroll:!0,trackOnResize:!0});p.useEffect(()=>{k!=null&&k.current&&(C==null?void 0:C.current)!==k.current&&C&&(C.current=k.current)},[k,C,f]);const v=()=>y(),I=()=>x();if(!f)return null;const F=()=>{if(!S||!(k!=null&&k.current))return{position:"absolute",top:0,left:0,zIndex:1e3};const T=k.current.getBoundingClientRect();let A=t;t==="bottom"&&S.space.vertical==="top"?A="top":t==="top"&&S.space.vertical==="bottom"?A="bottom":t==="right"&&S.space.horizontal==="left"?A="left":t==="left"&&S.space.horizontal==="right"&&(A="right");let P=0,z=0;switch(A){case"bottom":P=T.left+T.width/2,z=T.bottom+n;break;case"top":P=T.left+T.width/2,z=T.top-n;break;case"right":P=T.right+n,z=T.top+T.height/2;break;case"left":P=T.left-n,z=T.top+T.height/2;break}return{position:"fixed",left:P,top:z,zIndex:1e3,transform:W(A)}},W=T=>{switch(T){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)"}},E=F();return r.jsx(i.View,{ref:b,id:j,role:"tooltip","aria-labelledby":w,onMouseEnter:v,onMouseLeave:I,backgroundColor:s,borderRadius:d,boxShadow:u,padding:c,minWidth:m,maxWidth:g,style:{...E,...l},...o==null?void 0:o.container,...h,children:e})},Jg=({children:e,views:o,openDelay:t,closeDelay:a,...n})=>{const l=Gg({openDelay:t,closeDelay:a});return r.jsx(Yg,{value:l,children:r.jsx(i.View,{position:"relative",display:"inline-block",...o==null?void 0:o.container,...n,children:e})})},Se=Jg;Se.Trigger=Xg;Se.Content=Kg;const Qg=({files:e,sandboxId:o,onRemove:t,layout:a="inline",maxHeight:n="120px",showPreviews:l=!1,views:s={}})=>{if(e.length===0)return null;const d=p.useCallback(c=>c<1024?`${c} B`:c<1024*1024?`${(c/1024).toFixed(1)} KB`:`${(c/(1024*1024)).toFixed(1)} MB`,[]),u=p.useCallback(c=>c.type.startsWith("image/")?{backgroundColor:"#DBEAFE",color:"#2563EB"}:c.type.startsWith("video/")?{backgroundColor:"#EDE9FE",color:"#7C3AED"}:c.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:n,overflowY:"auto",...s==null?void 0:s.container,children:e.map((c,m)=>{const g=(c==null?void 0:c.path)||(c==null?void 0:c.url)||(l?URL.createObjectURL(c):""),h=c.type.startsWith("image/"),f=c.type.startsWith("video/"),y=c.type.startsWith("audio/"),x=u(c);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,...s==null?void 0:s.item,children:l&&r.jsxs(Se,{children:[r.jsxs(Se.Trigger,{children:[h&&r.jsx(i.Image,{src:g,alt:c.name,width:"60px",height:"60px",borderRadius:"8px",objectFit:"cover"}),f&&r.jsx(i.View,{as:"video",src:g,alt:c.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(vo,{widthHeight:24,color:"color-black"})}),!h&&!f&&!y&&r.jsx(i.Center,{width:"60px",height:"60px",borderRadius:"8px",backgroundColor:"color-gray-100",children:r.jsx(to,{widthHeight:24,color:"color-black"})}),t&&r.jsx(i.Button,{...Og.attachmentRemove,onClick:b=>{b.stopPropagation(),t(m)},"aria-label":`Remove ${c.name}`,children:"×"})]}),r.jsxs(Se.Content,{children:[h&&r.jsx(i.Image,{src:g,alt:c.name,maxWidth:"100%"}),f&&r.jsx(i.View,{as:"video",src:g,controls:!0,maxWidth:"100%"}),y&&r.jsx(i.View,{as:"audio",src:g,controls:!0,width:"100%"}),r.jsxs(i.Text,{marginTop:"4px",maxLines:1,width:"100%",...s==null?void 0:s.name,children:[c.name," (",d(c.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,...s==null?void 0:s.item,children:[r.jsx(i.Center,{width:"22px",height:"22px",minWidth:"22px",borderRadius:"9999px",backgroundColor:x.backgroundColor,color:x.color,children:y?r.jsx(vo,{widthHeight:12,color:"currentColor"}):r.jsx(to,{widthHeight:12,color:"currentColor"})}),r.jsxs(i.Text,{fontSize:"12px",lineHeight:"16px",color:"color-gray-600",maxLines:1,maxWidth:"220px",...s==null?void 0:s.name,children:[c.name," · ",d(c.size)]}),t&&r.jsx(i.View,{as:"button",type:"button",onClick:()=>t(m),"aria-label":`Remove ${c.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)})})},Wl=p.forwardRef(({value:e,onChange:o,placeholder:t="Type your message...",disabled:a=!1,autoFocus:n=!0,suggestions:l=[],onSuggestionSelect:s,showSuggestions:d=!1,mentionData:u=[],mentionTrigger:c="@",onMentionSelect:m,maxHeight:g="200px",minHeight:h="40px",views:f={}},y)=>{var ne,re;const x=p.useRef(e),[b,k]=p.useState(-1),[j,w]=p.useState(!e),C=p.useRef(null),[S,v]=p.useState(!1),[I,F]=p.useState(!1),[W,E]=p.useState(""),[T,A]=p.useState(-1),[P,z]=p.useState(-1),[R,H]=p.useState([]),{ref:M,relation:D}=i.useElementPosition({trackChanges:!0,trackOnHover:!0,trackOnScroll:!0,trackOnResize:!0}),[L,V]=p.useState({x:0,y:0}),[O,_]=p.useState({x:0,y:0});p.useEffect(()=>{const G=y;G.current&&e!==x.current&&(G.current.textContent=e,x.current=e,w(!e))},[e,y]),p.useEffect(()=>{n&&y&&typeof y=="object"&&y.current&&y.current.focus()},[n,y]);const q=()=>{const G=window.getSelection();if(!G||G.rangeCount===0)return-1;const Q=G.getRangeAt(0),te=Q.cloneRange();return te.selectNodeContents(y&&typeof y=="object"&&y.current?y.current:document.body),te.setEnd(Q.endContainer,Q.endOffset),te.toString().length},B=p.useCallback((G,Q)=>{const te=G.substring(0,Q),Y=te.lastIndexOf(c);if(Y!==-1){const Z=te.substring(Y+1);if(!Z.includes(" ")){const de=Z.toLowerCase(),xe=u.filter($e=>$e.name.toLowerCase().includes(de));E(de),A(Y),H(xe),F(xe.length>0),z(0);const Ae=X();V(Ae);return}}F(!1),E(""),A(-1),z(-1)},[u,c]);p.useEffect(()=>{C.current&&M&&(M.current=C.current)},[C,M]);const X=p.useCallback((G=200)=>{if(!C.current)return{x:0,y:0};const Q=C.current.getBoundingClientRect();if(D){const ie=D.space.vertical==="top";return{x:Q.left,y:ie?Q.top-G-8:Q.bottom+8}}const te=window.innerHeight,Y={top:Q.top,bottom:te-Q.bottom},Z=Y.bottom<G+8&&Y.top>Y.bottom;return{x:Q.left,y:Z?Q.top-G-8:Q.bottom+8}},[D]),$=p.useCallback(()=>{v(!0);const G=X();_(G)},[X]),U=p.useCallback(()=>{setTimeout(()=>{v(!1),k(-1)},150)},[]),K=G=>{const Q=G.currentTarget.textContent||"";if(Q!==x.current){o(Q),x.current=Q,w(!Q);const te=q();B(Q,te)}},ee=p.useCallback(G=>{if(y&&typeof y=="object"&&y.current){const Q=y.current.textContent||"",te=Q.substring(0,T),Y=Q.substring(T+c.length+W.length),Z=te+c+G.name+" "+Y;o(Z),x.current=Z,y.current.textContent=Z;const ie=te.length+c.length+G.name.length+1;setTimeout(()=>{var de;if(y.current){const xe=document.createRange(),Ae=window.getSelection(),$e=y.current.firstChild;$e&&Ae&&(xe.setStart($e,Math.min(ie,((de=$e.textContent)==null?void 0:de.length)||0)),xe.collapse(!0),Ae.removeAllRanges(),Ae.addRange(xe))}},0)}F(!1),E(""),A(-1),z(-1),m&&m(G)},[T,c,W,o,m,y]),J=p.useCallback(G=>{s&&s(G),k(-1)},[s]),oe=G=>{if(I&&R.length>0){if(G.key==="ArrowDown"){G.preventDefault(),z(Q=>Q<R.length-1?Q+1:0);return}if(G.key==="ArrowUp"){G.preventDefault(),z(Q=>Q>0?Q-1:R.length-1);return}if((G.key==="Tab"||G.key==="Enter")&&P>=0){G.preventDefault(),ee(R[P]);return}if(G.key==="Escape"){F(!1),z(-1);return}}if(d&&l.length>0){if(G.key==="ArrowDown"){G.preventDefault(),k(Q=>Q<l.length-1?Q+1:0);return}if(G.key==="ArrowUp"){G.preventDefault(),k(Q=>Q>0?Q-1:l.length-1);return}if(G.key==="Tab"&&b>=0){G.preventDefault(),J(l[b]);return}if(G.key==="Escape"){k(-1);return}}};return r.jsxs(i.View,{ref:C,width:"100%",position:"relative",...f==null?void 0:f.container,children:[r.jsxs(i.View,{width:"100%",minHeight:h,maxHeight:g,overflowY:"auto",position:"relative",children:[j&&r.jsx(i.Text,{position:"absolute",top:"8px",left:"8px",color:"color-gray-400",pointerEvents:"none",fontSize:"14px",zIndex:1,...f==null?void 0:f.placeholder,children:t}),r.jsx(i.View,{as:"div",ref:y,contentEditable:!a,suppressContentEditableWarning:!0,onInput:K,onKeyDown:oe,onFocus:$,onBlur:U,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",...f==null?void 0:f.input})]}),I&&R.length>0&&r.jsx(i.View,{position:"fixed",left:L.x,top:L.y,width:((ne=C.current)==null?void 0:ne.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",...f==null?void 0:f.mentionContainer,children:r.jsxs(i.Vertical,{gap:0,children:[R.map((G,Q)=>r.jsx(i.View,{as:"button",type:"button",width:"100%",padding:"12px 16px",backgroundColor:Q===P?"color-blue-50":"transparent",border:"none",cursor:"pointer",textAlign:"left",transition:"background-color 0.2s ease",onClick:()=>ee(G),onMouseEnter:()=>z(Q),_hover:{backgroundColor:"color-blue-50"},...f==null?void 0:f.mentionItem,children:r.jsxs(i.Vertical,{gap:4,children:[r.jsxs(i.Text,{fontSize:"14px",color:"color-gray-900",fontWeight:"medium",children:[c,G.name]}),G.description&&r.jsx(i.Text,{fontSize:"12px",color:"color-gray-600",children:G.description})]})},G.id)),process.env.NODE_ENV==="development"&&r.jsxs("div",{style:{fontSize:"8px",opacity:.7,padding:"4px"},children:["Mentions (Trigger: ",c,")",D&&r.jsxs(r.Fragment,{children:[r.jsx("br",{}),"Space: ",D.space.vertical,"-",D.space.horizontal]})]})]})}),d&&l.length>0&&!I&&S&&!e&&r.jsx(i.View,{position:"fixed",left:O.x,top:O.y,width:((re=C.current)==null?void 0:re.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",...f==null?void 0:f.suggestionsContainer,children:r.jsxs(i.Vertical,{gap:0,children:[l.map((G,Q)=>r.jsx(i.View,{as:"button",type:"button",width:"100%",padding:"12px 16px",backgroundColor:Q===b?"color-blue-50":"transparent",border:"none",cursor:"pointer",textAlign:"left",transition:"background-color 0.2s ease",onClick:()=>J(G),onMouseEnter:()=>k(Q),_hover:{backgroundColor:"color-blue-50"},...f==null?void 0:f.suggestionItem,children:r.jsxs(i.Vertical,{gap:4,children:[r.jsx(i.Text,{fontSize:"14px",color:"color-gray-900",fontWeight:"medium",children:G.text}),G.description&&r.jsx(i.Text,{fontSize:"12px",color:"color-gray-600",children:G.description})]})},G.id)),process.env.NODE_ENV==="development"&&r.jsxs("div",{style:{fontSize:"8px",opacity:.7,padding:"4px"},children:["Suggestions (Focus-triggered)",D&&r.jsxs(r.Fragment,{children:[r.jsx("br",{}),"Space: ",D.space.vertical,"-",D.space.horizontal]})]})]})})]})});Wl.displayName="EditableInput";const Zg=({examples:e,onSelect:o,views:t={}})=>{const{getColor:a}=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(n=>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(n),_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:n.text})},n.id))})},eh=({onRecordingComplete:e,onRecordingStart:o,views:t={}})=>{const{recording:a,paused:n,audioBlob:l,analyserNode:s,startRecording:d,stopRecording:u}=Wn();p.useEffect(()=>{if(l){const m=new File([l],`recording-${Date.now()}.webm`,{type:l.type||"audio/webm;codecs=opus"});e(m)}},[l]);const c=p.useCallback(()=>{d(),o==null||o()},[]);return r.jsxs(i.Horizontal,{alignItems:"center",gap:4,children:[r.jsx(i.View,{minWidth:90,children:a&&s&&r.jsx(Bt,{analyserNode:s,isPaused:n})}),r.jsx(i.View,{as:"button",type:"button",onClick:a?u:c,height:"40px",width:"40px",display:"flex",alignItems:"center",justifyContent:"center",backgroundColor:a?"theme-error":"color-gray-100",color:a?"color-white":"color-gray-600",borderRadius:"50%",border:"none",cursor:"pointer",_hover:{backgroundColor:a?"color-red-600":"color-gray-200"},...t.button,children:a?r.jsx(Hr,{widthHeight:16,color:"currentColor",filled:!1}):r.jsx(Pt,{widthHeight:16,color:"currentColor",filled:!1})})]})},Hl=p.memo(({onSubmit:e,placeholder:o="Type your message… use @ to mention",loading:t=!1,disabled:a=!1,isAgentRunning:n=!1,enableAudioRecording:l=!1,leftButtons:s,rightButtons:d,onStopAgent:u,loadingText:c="Agent is working...",autoFocus:m=!0,sandboxId:g,hideAttachments:h=!1,attachmentText:f="",promptExamples:y=[],suggestions:x=[],errorMessage:b,size:k="md",shape:j="rounded",variant:w="default",views:C={},mentionData:S=[],mentionTrigger:v="@",onMentionSelect:I,onAudioRecordingStart:F,onAudioRecordingStop:W,showGuideTip:E,guideVideoUrl:T,onGuideClose:A,onFileBrowse:P,onUploadProgress:z,onUploadSuccess:R,onUploadError:H,onFileUpload:M,onPromptExampleSelect:D,value:L,handleChange:V,handleSubmit:O,editableRef:_,fileInputRef:q,isUploading:B,uploadProgress:X,isDraggingOver:$,uploadedFiles:U,pendingFiles:K,getPendingFiles:ee,clearPendingFiles:J,removeUploadedFile:oe,setPendingFiles:ne,setUploadedFiles:re,setIsUploading:G,startUpload:Q,selectedModel:te,handleModelChange:Y,modelOptions:Z,subscriptionStatus:ie,canAccessModel:de,isGuideTipShown:xe,hideGuideTip:Ae,handlePromptExampleSelect:$e,handleDragOver:Ur,handleDragLeave:Re,onChange:ar,...Gr})=>{i.useTheme();const ha=p.useMemo(()=>({...Wa.container,...Ng[j],...C==null?void 0:C.container}),[j,C==null?void 0:C.container]),as=p.useMemo(()=>({...Wa.content,...qg[k],...Ug[w],...C==null?void 0:C.content}),[k,w,C==null?void 0:C.content]),Po=((L==null?void 0:L.trim().length)??0)>0||U.length>0,ns=p.useCallback(be=>{Q([be]),W==null||W(be)},[Q,W]),Yr=p.useCallback(be=>{const po=be.filter(fa=>fa.size>52428800?(console.error(`File size exceeds 50MB limit: ${fa.name}`),!1):!0);po.length>0&&Q(po)},[Q]),ls=p.useCallback(be=>{if(be.preventDefault(),be.stopPropagation(),Re(be),be.dataTransfer.files.length>0){const po=Array.from(be.dataTransfer.files);Yr(po)}},[Re,Yr]),is=p.useMemo(()=>[...S||[],...U.map((be,po)=>({id:`file-${po}`,name:be.name}))],[S,U]);return r.jsxs(i.View,{display:"flex",flexDirection:"column",boxSizing:"border-box",...ha,...Gr,onDragOver:Ur,onDragLeave:Re,onDrop:ls,children:[y.length>0&&r.jsx(Zg,{examples:y,onSelect:$e,views:{container:C==null?void 0:C.promptExamples,item:C==null?void 0:C.promptExampleItem}}),n&&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"},...C==null?void 0:C.loadingIndicator,children:[r.jsx(Vt,{widthHeight:12,color:"currentColor",filled:!1,style:{animation:"spin 1s linear infinite"}}),r.jsx(i.Text,{color:"color-gray-500",children:c})]}),r.jsx(i.View,{position:"relative",width:"100%",overflow:"visible",children:r.jsxs(i.View,{as:"form",onSubmit:O,overflow:"visible",display:"flex",flexDirection:"column",position:"relative",...as,...ha,paddingHorizontal:16,paddingVertical:10,backgroundColor:$?"color-blue-50":void 0,children:[r.jsx(Qg,{files:U,sandboxId:g,onRemove:oe,showPreviews:!0,views:{container:C==null?void 0:C.attachments,item:C==null?void 0:C.attachmentItem,name:C==null?void 0:C.attachmentName,size:C==null?void 0:C.attachmentSize,removeButton:C==null?void 0:C.attachmentRemove}}),r.jsx(Wl,{ref:_,value:L||"",onChange:V,placeholder:o,disabled:a&&!n,autoFocus:m,suggestions:x||[],showSuggestions:x&&x.length>0&&!L,onSuggestionSelect:be=>{V(be.text)},mentionData:is,mentionTrigger:v,onMentionSelect:I,views:{container:{},input:C==null?void 0:C.editableInput}}),r.jsxs(i.Horizontal,{justifyContent:"space-between",alignItems:"center",marginTop:"8px",children:[r.jsxs(i.Horizontal,{gap:8,alignItems:"center",children:[!h&&r.jsx(Er,{accept:"*/*",icon:r.jsx(Xo,{widthHeight:16}),maxSize:50*1024*1024,multiple:!0,onMultipleFileSelect:Yr,isLoading:B,progress:X||0,text:f,fileType:"file",renderError:({errorMessage:be})=>null,views:{container:{height:"36px",cursor:"pointer",_hover:{backgroundColor:"color-gray-100"},...C==null?void 0:C.fileButton}},containerProps:{display:"flex",alignItems:"center",justifyContent:"center",gap:4,borderRadius:j==="rounded"?"50%":4,padding:10},textProps:{fontSize:"14px",color:"color-gray-600"},validateFile:be=>be.size>50*1024*1024?"File size exceeds 50MB limit":null}),s]}),r.jsxs(i.Horizontal,{gap:8,alignItems:"center",children:[l&&r.jsx(eh,{onRecordingStart:F,onRecordingComplete:ns,views:{button:C==null?void 0:C.recordButton}}),r.jsx(i.View,{as:"button",type:"button",onClick:O,height:"40px",width:"40px",display:"flex",alignItems:"center",justifyContent:"center",backgroundColor:n?"theme-error":Po?"theme-primary":"color-gray-300",color:"color-white",borderRadius:j==="rounded"?"50%":4,border:"none",cursor:Po?"pointer":"not-allowed",disabled:!Po||t||a&&!n,transition:"background-color 0.2s ease, opacity 0.2s ease, box-shadow 0.2s ease",_hover:{opacity:Po||n?.9:1},_active:{opacity:Po||n?.95:1},_focusVisible:{outline:"none",boxShadow:"0 0 0 2px white, 0 0 0 4px theme-primary"},...C==null?void 0:C.submitButton,children:n?r.jsx(Hr,{widthHeight:16,color:"currentColor",filled:!1}):t?r.jsx(To,{type:"quarter",size:16,color:"color-white"}):r.jsx(At,{widthHeight:16,color:"currentColor",filled:!1})}),d]})]})]})}),b&&r.jsx(i.Text,{color:"theme-error",marginTop:"4px",...C==null?void 0:C.bottomTip,children:b})]})}),oh=e=>{const{name:o,onSubmit:t,...a}=e,[n,l]=p.useState([]),s=he({name:o,type:"text"}),d=h=>{s.onChangeText&&s.onChangeText(h)},u=(h,f)=>{t?t(h,f):d(h)},c=()=>n,m=()=>l([]),g=Rl({...a,value:s.value||"",onChange:d,onSubmit:u});return r.jsx(Hl,{...a,...g,value:s.value||"",onChange:d,onSubmit:u,error:s.error,getPendingFiles:c,clearPendingFiles:m})},rh=oh,th=e=>{const o=he(e),t=cl(o);return r.jsx(dl,{...t,...o})},ah=th,nh=e=>{const o=he(e),t=fl();return r.jsx(yl,{...t,...o})},lh=nh,ih=e=>{const o=he(e),t=ul(e);return r.jsx(pl,{...t,...o})},sh=ih,ch=e=>{let o=he(e);o.selected=o.value;const t=Jn(e);return r.jsx(el,{...t,...o})},dh=ch,uh=e=>{const o=he(e),t=ol(e);return r.jsx(rl,{...t,...o})},ph=uh,mh=e=>{const{name:o,...t}=e,{values:a,errors:n,touched:l,submitCount:s,setFieldValue:d,setFieldTouched:u}=He.useFormikContext(),c=He.getIn(a,o)||[],m=He.getIn(l,o)||s>0?He.getIn(n,o):void 0,g=p.useCallback(b=>{var j;const k=Array.isArray(b)?b.filter(w=>typeof w=="string"):[];d(o,k),(j=e.onTagsChange)==null||j.call(e,k)},[o,d,e.onTagsChange]),h=p.useCallback(()=>{var b;u(o,!0),(b=e.onBlur)==null||b.call(e)},[o,u,e.onBlur]),f=Cl({...t,tags:c,onTagsChange:g,onBlur:h}),{tags:y,...x}=f;return r.jsx(Sl,{...x,...t,tags:y,error:m})},gh=mh,hh=e=>{const o=he(e),t=nl(e);return r.jsx(ll,{...t,...o})},fh=hh,yh=e=>{const o=he(e),{value:t,...a}=Qt(e);return r.jsx(Qo,{...a,...o})},xh=yh,bh=({visibleIcon:e=r.jsx(Dt,{widthHeight:14}),hiddenIcon:o=r.jsx(Et,{widthHeight:14}),...t})=>{const a=he(t),{isVisible:n,setIsVisible:l,...s}=xl(a);return r.jsx(Qo,{...s,type:n?"text":"password",isClearable:!1,right:r.jsx(i.View,{onClick:()=>{t.isDisabled||l(!n)},children:n?e:o})})},kh=bh,Ch=({items:e,placeholder:o,searchPlaceholder:t,isMulti:a=!1,...n})=>{const l=he(n),s=bl(e,o,t);p.useEffect(()=>{if(a&&Array.isArray(l.value))s.setSelectedItems(l.value);else if(!a&&l.value){const u=typeof l.value=="object"?l.value:e.find(c=>c.value===l.value);u&&s.setSelectedItem(u)}},[l.value,a,e]);const d=u=>{l.onChange(u)};return r.jsx(kl,{...s,...l,items:e,placeholder:o,isMulti:a,onSelect:d})},Sh=Ch,So=(e,o,t)=>Math.min(Math.max(e,o),t),jh=(e,o,t,a,n,l,s)=>{const d=a-t;let u;if(l==="horizontal"){const c=o.width,m=e-o.left;u=So(m/c,0,1)}else{const c=o.height,m=o.bottom-e;u=So(m/c,0,1)}if(s&&s.length>0){const c=t+u*d;let m=s[0],g=Math.abs(c-m);for(let h=1;h<s.length;h++){const f=Math.abs(c-s[h]);f<g&&(g=f,m=s[h])}return m}else{const c=t+u*d,m=Math.round(c/n)*n;return So(m,t,a)}},Pl=({min:e=0,max:o=100,step:t=1,value:a=0,defaultValue:n,onChange:l,onDrag:s,orientation:d="horizontal",isDisabled:u=!1,stepValues:c})=>{const m=So(a??n??e,e,o),[g,h]=p.useState(m),[f,y]=p.useState(!1),[x,b]=p.useState(!1),k=p.useRef(null),j=p.useRef(null),w=a!==void 0,C=w?a:g;p.useEffect(()=>{w&&h(So(a,e,o))},[a,w,e,o]);const S=p.useCallback(A=>{const P=So(A,e,o);w||h(P),l&&P!==C&&l(P),f&&s&&s(P)},[w,e,o,l,C,f,s]),v=p.useCallback(A=>{if(u||!k.current)return;const P=k.current.getBoundingClientRect();let z;"touches"in A?z=d==="horizontal"?A.touches[0].clientX:A.touches[0].clientY:z=d==="horizontal"?A.clientX:A.clientY;const R=jh(z,P,e,o,t,d,c);S(R)},[e,o,t,d,S,u,c]),I=p.useCallback(A=>{if(u)return;A.preventDefault(),y(!0),v(A);const P=R=>{v(R)},z=()=>{y(!1),document.removeEventListener("mousemove",P),document.removeEventListener("mouseup",z),document.removeEventListener("touchmove",P),document.removeEventListener("touchend",z)};document.addEventListener("mousemove",P),document.addEventListener("mouseup",z),document.addEventListener("touchmove",P),document.addEventListener("touchend",z)},[v,u]),F=p.useCallback(A=>{j.current&&j.current.contains(A.target)||I(A)},[I]),W=p.useCallback(A=>{if(u)return;let P=C;switch(A.key){case"ArrowLeft":case"ArrowDown":P=C-t;break;case"ArrowRight":case"ArrowUp":P=C+t;break;case"Home":P=e;break;case"End":P=o;break;default:return}A.preventDefault(),S(P)},[C,e,o,t,S,u]),E=o-e,T=E===0?0:(C-e)/E*100;return{currentValue:C,isDragging:f,isHovered:x,setIsHovered:b,trackRef:k,thumbRef:j,handleThumbMouseDown:I,handleTrackMouseDown:F,handleKeyDown:W,thumbPositionPercent:T}},Pa={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%"}},Aa={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}},Va={square:0,rounded:4,pill:24},wh=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"}}),Ea=wh(),vh={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}},Th={horizontal:{width:"100%",minWidth:"120px",height:"auto",flexDirection:"row",paddingVertical:8},vertical:{height:"100%",minHeight:"120px",width:"auto",flexDirection:"column-reverse",paddingHorizontal:8}},Ih=e=>typeof e=="string"&&(/^(#|rgb\(|rgba\(|hsl\(|hsla\(|var\()/.test(e)||["black","currentColor","inherit","transparent","white"].includes(e)),$o=(e,o)=>Ih(o)?{style:{[e]:o}}:{[e]:o},Al=p.memo(({min:e=0,max:o=100,step:t=1,currentValue:a,stepValues:n,shape:l="rounded",size:s="md",variant:d="default",orientation:u="horizontal",isDisabled:c=!1,showValue:m=!1,showTooltip:g=!1,backgroundColor:h="theme-primary",label:f,helperText:y,themeMode:x,shadow:b={},isDragging:k,isHovered:j,setIsHovered:w,trackRef:C,thumbRef:S,handleThumbMouseDown:v,handleTrackMouseDown:I,handleKeyDown:F,thumbPositionPercent:W,ariaLabel:E="Slider",views:T={container:{},track:{},progress:{},filledTrack:{},thumb:{},label:{},valueLabel:{},stepMarks:{},tooltip:{}},onChange:A,onDrag:P,value:z,defaultValue:R,...H})=>{var $,U;const M=h,D="theme-disabled",L=Ea[d].backgroundColor,V=c?D:M,O=u==="vertical",{trackCrossAxisSize:_,thumbSize:q}=vh[s]||{trackCrossAxisSize:Pa[s].height,thumbSize:Aa[s].width||16},B=r.jsxs(i.Vertical,{width:"100%",gap:8,...T.container,...H,children:[f&&r.jsxs(i.Horizontal,{justifyContent:"space-between",alignItems:"center",children:[r.jsx(i.Text,{fontSize:14,fontWeight:500,...T.label,children:f}),m&&r.jsx(i.Text,{fontSize:14,color:"color-gray-500",...T.valueLabel,children:a})]}),r.jsxs(i.View,{ref:C,position:"relative",cursor:c?"not-allowed":"pointer",opacity:c?.6:1,onMouseDown:I,onMouseEnter:()=>w(!0),onMouseLeave:()=>w(!1),...Pa[s],borderRadius:Va[l],backgroundColor:L,...Ea[d],...b,...T.track,children:[n&&n.length>0&&r.jsx(r.Fragment,{children:n.map(K=>{const ee=(K-e)/(o-e)*100;return r.jsx(i.View,{position:"absolute",top:"50%",left:`${ee}%`,transform:"translate(-50%, -50%)",width:4,height:4,borderRadius:"50%",zIndex:1,...$o("backgroundColor",V),...T.stepMarks},K)})}),r.jsx(i.View,{position:"absolute",top:0,left:0,height:"100%",width:`${W}%`,borderRadius:Va[l],transition:"width 0.1s ease-in-out",...$o("backgroundColor",V),...T.progress,...T.filledTrack}),r.jsx(i.View,{ref:S,role:"slider",tabIndex:c?-1:0,"aria-valuemin":e,"aria-valuemax":o,"aria-valuenow":a,"aria-orientation":u,"aria-disabled":c,"aria-label":E,position:"absolute",top:"50%",left:`${W}%`,borderRadius:"50%",backgroundColor:"color-white",boxShadow:"0 2px 4px rgba(0, 0, 0, 0.2)",borderWidth:2,borderStyle:"solid",transition:k?"none":"transform 0.1s ease-in-out",...$o("borderColor",V),transform:j?"translate(-50%, -50%) scale(1.1)":"translate(-50%, -50%)",zIndex:2,onMouseDown:v,onTouchStart:v,onKeyDown:F,...Aa[s],...T.thumb,children:g&&(j||k)&&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,...T.tooltip,children:r.jsx(i.Text,{...($=T.tooltip)==null?void 0:$.text,children:a==null?void 0:a.toFixed(t<1?1:0)})})})]}),y&&r.jsx(ht,{children:y})]}),X=r.jsxs(i.Center,{...Th[u],position:"relative",onMouseEnter:()=>!c&&w(!0),onMouseLeave:()=>!c&&w(!1),...H,...T==null?void 0:T.container,children:[f&&r.jsxs(i.Horizontal,{justifyContent:"space-between",alignItems:"center",marginBottom:8,width:"100%",children:[r.jsx(i.Text,{fontSize:14,fontWeight:500,...T.label,children:f}),m&&r.jsx(i.Text,{fontSize:14,color:"color-gray-500",...T.valueLabel,children:a})]}),r.jsxs(i.View,{ref:C,position:"relative",borderRadius:_/2,backgroundColor:c?D:L,cursor:c?"not-allowed":"pointer",width:O?`${_}px`:"100%",height:O?"100%":`${_}px`,onMouseDown:I,onTouchStart:I,...T==null?void 0:T.track,children:[n&&n.length>0&&r.jsx(r.Fragment,{children:n.map(K=>{const ee=(K-e)/(o-e)*100;return r.jsx(i.View,{position:"absolute",width:4,height:4,borderRadius:"50%",backgroundColor:V,zIndex:1,...O?{bottom:`${ee}%`,left:"50%",transform:"translate(-50%, 50%)"}:{left:`${ee}%`,top:"50%",transform:"translate(-50%, -50%)"},...T.stepMarks},K)})}),r.jsx(i.View,{position:"absolute",borderRadius:_/2,...O?{bottom:0,left:0,width:"100%",height:`${W}%`}:{top:0,left:0,height:"100%",width:`${W}%`},...$o("backgroundColor",V),...T==null?void 0:T.filledTrack,...T==null?void 0:T.progress}),r.jsx(i.View,{ref:S,role:"slider",tabIndex:c?-1:0,"aria-valuemin":e,"aria-valuemax":o,"aria-valuenow":a,"aria-orientation":u,"aria-disabled":c,"aria-label":E,position:"absolute",width:`${q}px`,height:`${q}px`,borderRadius:"50%",borderWidth:2,borderStyle:"solid",borderColor:"color-white",boxShadow:"0 1px 3px rgba(0, 0, 0, 0.2)",cursor:c?"not-allowed":"grab",transform:O?"translateX(-50%)":"translateY(-50%)",zIndex:2,transition:k?"none":"left 0.1s, bottom 0.1s",...$o("backgroundColor",V),...O?{left:"50%",bottom:`${W}%`}:{top:"50%",left:`${W}%`},onMouseDown:v,onTouchStart:v,onKeyDown:F,...T==null?void 0:T.thumb,children:g&&(j||k)&&r.jsx(i.View,{position:"absolute",padding:"4px 8px",backgroundColor:"color-black",color:"color-white",borderRadius:"4px",whiteSpace:"nowrap",zIndex:3,...O?{left:"100%",marginLeft:"8px",bottom:"0",transform:"translateY(50%)"}:{bottom:"100%",left:"50%",marginBottom:"8px",transform:"translateX(-50%)"},...T==null?void 0:T.tooltip,children:r.jsx(i.Text,{...(U=T==null?void 0:T.tooltip)==null?void 0:U.text,children:a==null?void 0:a.toFixed(t<1?1:0)})})})]}),y&&r.jsx(ht,{marginTop:8,children:y})]});return O||g?X:B}),Fh=e=>{const o=he(e),t=Pl({...e,value:o.value!==void 0?Number(o.value):void 0,onChange:a=>{var n;o.onChange(a),(n=e.onChange)==null||n.call(e,a)}});return r.jsx(Al,{...e,...t,...o})},Rh=Fh,zh=e=>{const o=he(e),{isFocused:t,setIsFocused:a,isHovered:n,setIsHovered:l,inputRef:s,containerRef:d,mirrorSelectionStart:u,mirrorSelectionEnd:c,setMirrorSelectionStart:m,setMirrorSelectionEnd:g,setInputRef:h,handleFocus:f,handleBlur:y,handleKeyDown:x,handlePaste:b}=jl(e),k=p.useCallback(w=>{o.onChange&&o.onChange(w),e.onComplete&&w.length===(e.length||6)&&e.onComplete(w),s.current&&(s.current.value=w)},[o,e,s]),j=p.useCallback(w=>{const C=w.currentTarget.value.slice(0,e.length||6);k(C),s.current&&(s.current.value=C)},[e.length,k,s]);return r.jsx(wl,{...e,...o,setValue:k,isFocused:t,setIsFocused:a,isHovered:n,setIsHovered:l,inputRef:s,containerRef:d,mirrorSelectionStart:u,mirrorSelectionEnd:c,setMirrorSelectionStart:m,setMirrorSelectionEnd:g,setInputRef:h,handleChange:j,handleFocus:f,handleBlur:y,handleKeyDown:x,handlePaste:b,stepValues:e.stepValues})},Mh=zh,Wh=e=>Array.isArray(e)?e:e==null?[]:[e],Vl=({name:e,uploadFile:o,onUploadSuccess:t,onUploadError:a,transformResponse:n,onMultipleFileSelect:l,onFileSelect:s,multiple:d=!0,...u})=>{const{setFieldValue:c,setFieldTouched:m,values:g}=He.useFormikContext(),[h,f]=p.useState(!1),[y,x]=p.useState(0),b=p.useCallback(async w=>{if(!w||w.length===0)return;m(e,!0,!0),f(!0);const C=[];for(const S of w){x(0);try{const v=await o(S,F=>{x(F??0)}),I=n?n(v,S):v;C.push(I),t==null||t(S,I)}catch(v){a==null||a(S,v)}}if(C.length>0){const S=Wh(He.getIn(g,e));c(e,[...S,...C],!0),x(100)}else x(0);f(!1)},[e,a,t,m,c,n,o,g]),k=p.useCallback(async w=>{l==null||l(w),await b(w)},[b,l]),j=p.useCallback(async w=>{s==null||s(w),await b([w])},[b,s]);return r.jsx(Er,{...u,multiple:d,onMultipleFileSelect:d?k:void 0,onFileSelect:d?void 0:j,isLoading:h,progress:y})};Vl.displayName="FormikUploader";const Hh=e=>{let o=he(e);o.selected=o.value;const t=tl(e);return r.jsx(al,{...t,...o})},Ph=Hh,El=e=>{const[o,t]=p.useState(!1),[a,n]=p.useState(e);return{isHovered:o,setIsHovered:t,isToggle:a,setIsToggled:n}},Ah={square:0,rounded:8,pill:999},Vh=(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"}}),Dl=p.memo(({children:e,shape:o="rounded",variant:t="ghost",isHovered:a,setIsHovered:n,isDisabled:l,isToggle:s,setIsToggled:d,onToggle:u,views:c,backgroundColor:m,color:g,themeMode:h,...f})=>{const{getColor:y,themeMode:x}=i.useTheme(),b=h??x,j=y(l?"theme-disabled":m??g??"theme-primary",{themeMode:b}),C=p.useMemo(()=>Vh(j),[j,b])[t],S=!!s,v=p.useCallback(()=>n(!0),[n]),I=p.useCallback(()=>{l||d(F=>{const W=!F;return u&&u(W),W})},[l,d,u]);return r.jsx(i.Center,{role:"Toggle",padding:o==="pill"?"8px 12px":"8px",width:"fit-content",cursor:l?"not-allowed":"pointer",borderRadius:Ah[o],onClick:I,onMouseEnter:v,onMouseLeave:()=>n(!1),...C,...S&&{...t==="link"?{backgroundColor:"transparent"}:{backgroundColor:"color-blue-50",borderWidth:1,borderStyle:"solid",borderColor:"color-blue-200"},color:j},...f,...c==null?void 0:c.container,children:e})}),Eh=({children:e,shape:o,variant:t,isDisabled:a,isToggled:n=!1,onToggle:l,...s})=>{const d=he(s),{isHovered:u,setIsHovered:c,isToggle:m,setIsToggled:g}=El(d.value??n);p.useEffect(()=>{g(d.value??n)},[d.value,n]);const h=f=>{g(f),d.onChange(f),l==null||l(f)};return r.jsx(Dl,{shape:o,variant:t,isDisabled:a,isHovered:u,setIsHovered:c,isToggle:m,setIsToggled:g,onToggle:h,...s,children:e})},Dh=Eh,$l=()=>{const[e,o]=p.useState([]);return{activeToggles:e,setActiveToggles:o}},$h=({children:e,shape:o,variant:t,isDisabled:a,isToggled:n=!1,onToggle:l,...s})=>{const{isHovered:d,setIsHovered:u,isToggle:c,setIsToggled:m}=El(n);return p.useEffect(()=>{m(n)},[n]),r.jsx(Dl,{shape:o,variant:t,isDisabled:a,isHovered:d,setIsHovered:u,isToggle:c,setIsToggled:m,onToggle:l,...s,children:e})},ea=$h,Ll=({items:e,onToggleChange:o,activeToggles:t,setActiveToggles:a,shape:n="rounded",variant:l="ghost",views:s})=>{const d=p.useCallback((u,c)=>{a(m=>{let g;return c?g=m.includes(u)?m:[...m,u]:g=m.filter(h=>h!==u),o==null||o(g),g})},[o,a]);return r.jsx(i.Horizontal,{role:"ToggleGroup",display:"flex",gap:8,flexWrap:"wrap",...s==null?void 0:s.container,children:e.map(u=>r.jsx(ea,{role:`toggle-${u.id}`,shape:n,variant:l,isToggled:t.includes(u.id)||u.isActive,onToggle:c=>d(u.id,c),isDisabled:u.isDisabled,views:s==null?void 0:s.toggle,children:u.value},u.id))})},Lh=({items:e,shape:o,variant:t,onToggleChange:a,...n})=>{const l=he(n),{activeToggles:s,setActiveToggles:d}=$l();p.useEffect(()=>{Array.isArray(l.value)&&d(l.value)},[l.value]);const u=c=>{d(c),l.onChange(c),a==null||a(c)};return r.jsx(Ll,{items:e,shape:o,variant:t,activeToggles:s,setActiveToggles:d,onToggleChange:u,...n})},_h=Lh,Da=["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"],_l=e=>{const{value:o,defaultValue:t,onChange:a,isOpen:n,onOpen:l,onClose:s,closeOnSelect:d=!0}=e,[u,c]=p.useState(n??!1),[m,g]=p.useState(o??t),[h,f]=p.useState(""),y=p.useRef(null),x=p.useRef(null);p.useEffect(()=>{o!==void 0&&g(o)},[o]),p.useEffect(()=>{n!==void 0&&c(n)},[n]);const b=p.useMemo(()=>h?Da.filter(S=>S.toLowerCase().includes(h.toLowerCase())).slice(0,100):Da.slice(0,100),[h]);p.useEffect(()=>{const S=v=>{u&&y.current&&x.current&&!y.current.contains(v.target)&&!x.current.contains(v.target)&&k()};return document.addEventListener("mousedown",S),()=>document.removeEventListener("mousedown",S)},[u]);const k=p.useCallback(()=>{n===void 0&&c(!1),s&&s()},[s,n]),j=p.useCallback(()=>{const S=!u;n===void 0&&c(S),S?(l&&l(),f("")):s&&s()},[u,l,s,n]),w=p.useCallback(S=>{o===void 0&&g(S),a&&a(S),d&&k()},[a,d,k,o]),C=p.useCallback(S=>{f(S)},[]);return{isOpen:u,selectedIcon:m,searchQuery:h,filteredIcons:b,handleToggle:j,handleIconSelect:w,handleSearchChange:C,handleClose:k,triggerRef:y,dropdownRef:x}},ho={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)",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"}},Bh={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"}},Oh={default:{borderRadius:8},square:{borderRadius:0},rounded:{borderRadius:8},pill:{borderRadius:9999}},Nh={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"}},Bl=({label:e,placeholder:o="Select an icon",helperText:t,views:a={},size:n="md",shape:l="default",variant:s="default",error:d=!1,isDisabled:u=!1,isReadOnly:c=!1,showSearch:m=!0,isOpen:g,selectedIcon:h,searchQuery:f,filteredIcons:y,handleToggle:x,handleIconSelect:b,handleSearchChange:k,triggerRef:j,dropdownRef:w,handleClose:C,onChange:S,value:v,defaultValue:I,onOpen:F,onClose:W,closeOnSelect:E,...T})=>{const{getColor:A}=i.useTheme(),P={...ho.container,...a==null?void 0:a.container},z={...ho.trigger,...Bh[n],...Oh[l],...Nh[s],...d&&{borderColor:"color-red-500"},...u&&{opacity:.6,cursor:"not-allowed"},...!u&&!c&&{_hover:{borderColor:"color-gray-300"}},...a==null?void 0:a.trigger},R={...ho.dropdown,...a==null?void 0:a.dropdown},H={...ho.iconGrid,...a==null?void 0:a.iconGrid};return r.jsxs(i.View,{...P,...T,children:[e&&r.jsx(i.Text,{fontSize:n==="xs"?"12px":n==="sm"?"14px":"16px",fontWeight:"500",color:"color-gray-700",marginBottom:"4px",...a==null?void 0:a.label,children:e}),r.jsxs(i.View,{ref:j,onClick:u||c?void 0:x,...z,children:[r.jsx(i.Horizontal,{alignItems:"center",gap:8,width:"100%",children:h?r.jsxs(i.Horizontal,{alignItems:"center",gap:8,width:"100%",children:[r.jsx(kr,{name:h,widthHeight:16}),r.jsx(i.Text,{color:"color-gray-800",fontSize:"inherit",style:{flex:1,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:h})]}):r.jsx(i.Text,{color:"color-gray-500",fontSize:"inherit",children:o})}),!c&&!u&&r.jsx(se,{widthHeight:16,color:"color-gray-500",orientation:g?"up":"down"})]}),g&&r.jsxs(i.View,{ref:w,...R,children:[m&&r.jsx(i.View,{...ho.searchInput,...a==null?void 0:a.searchInput,children:r.jsx(ve,{placeholder:"Search icons...",value:f,onChange:M=>k(M),size:"sm",autoFocus:!0})}),r.jsx(i.View,{...H,children:y.length>0?y.map(M=>r.jsx(i.View,{...ho.iconItem,onClick:()=>b(M),title:M,_hover:{backgroundColor:"color-gray-50",transform:"scale(1.05)"},backgroundColor:h===M?"#EFF6FF":"transparent",borderWidth:h===M?"1px":"0px",borderStyle:"solid",borderColor:h===M?"#BFDBFE":"transparent",...a==null?void 0:a.iconItem,children:r.jsx(kr,{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:d?"color-red-500":"color-gray-600",marginTop:"4px",...a==null?void 0:a.helperText,children:t})]})},qh=e=>{const o=he(e),t={...e,value:o.value??e.value??e.defaultValue},a=_l(t),n=l=>{a.handleIconSelect(l),o.onChange(l)};return r.jsx(Bl,{...a,...t,handleIconSelect:n})},Uh=qh,Ue={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",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)",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"}},Gh={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"}},Yh={default:{borderRadius:8},square:{borderRadius:0},rounded:{borderRadius:8},pill:{borderRadius:9999}},Xh={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"}},Kh={recent:"🕒",smileys:"😀",people:"👤",animals:"🐶",food:"🍎",activities:"⚽",travel:"🚗",objects:"💡",symbols:"❤️",flags:"🏁"},Jh=[{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"]}],Ol=e=>{const{value:o,defaultValue:t="",onChange:a,onEmojiSelect:n,isOpen:l,onOpen:s,onClose:d,closeOnSelect:u=!0,maxRecentEmojis:c=16,showRecentEmojis:m=!0,enabledCategories:g=["recent","smileys","people","animals","food","activities","travel","objects","symbols","flags"],customEmojis:h=[]}=e,[f,y]=p.useState(l??!1),[x,b]=p.useState(o??t),[k,j]=p.useState(""),[w,C]=p.useState("smileys"),[S,v]=p.useState([]),I=p.useRef(null),F=p.useRef(null),W=p.useMemo(()=>[...Jh,...h],[h]),E=p.useMemo(()=>{let M=W;if(w!=="recent"?M=M.filter(D=>D.category===w):M=S,k){const D=k.toLowerCase();M=M.filter(L=>L.name.toLowerCase().includes(D)||L.keywords.some(V=>V.toLowerCase().includes(D)))}return M},[W,w,S,k]);p.useEffect(()=>{o!==void 0&&b(o)},[o]),p.useEffect(()=>{l!==void 0&&y(l)},[l]),p.useEffect(()=>{if(m){const M=localStorage.getItem("emojiPicker-recentEmojis");if(M)try{v(JSON.parse(M))}catch{}}},[m]),p.useEffect(()=>{const M=D=>{f&&I.current&&F.current&&!I.current.contains(D.target)&&!F.current.contains(D.target)&&H()};return document.addEventListener("mousedown",M),()=>document.removeEventListener("mousedown",M)},[f]);const T=p.useCallback(M=>{m&&v(D=>{const L=D.filter(O=>O.emoji!==M.emoji),V=[M,...L].slice(0,c);return localStorage.setItem("emojiPicker-recentEmojis",JSON.stringify(V)),V})},[m,c]),A=p.useCallback(()=>{const M=!f;y(M),M?(s==null||s(),j(""),m&&S.length>0?C("recent"):C("smileys")):d==null||d()},[f,s,d,m,S.length]),P=p.useCallback(M=>{b(M.emoji),T(M),a==null||a(M.emoji),n==null||n(M),u&&(y(!1),d==null||d())},[a,n,u,d,T]),z=p.useCallback(M=>{j(M),M&&w==="recent"&&C("smileys")},[w]),R=p.useCallback(M=>{C(M),j("")},[]),H=p.useCallback(()=>{y(!1),d==null||d()},[d]);return{isOpen:f,selectedEmoji:x,recentEmojis:S,searchQuery:k,activeCategory:w,filteredEmojis:E,handleToggle:A,handleEmojiSelect:P,handleSearchChange:z,handleCategoryChange:R,handleClose:H,triggerRef:I,dropdownRef:F}},Nl=({id:e,name:o,label:t,placeholder:a="Select an emoji",helperText:n,views:l={},size:s="md",shape:d="default",variant:u="default",error:c=!1,isDisabled:m=!1,isReadOnly:g=!1,showSearch:h=!0,showCategories:f=!0,showRecentEmojis:y=!0,enabledCategories:x=["recent","smileys","people","animals","food","activities","travel","objects","symbols","flags"],isOpen:b,selectedEmoji:k,recentEmojis:j,searchQuery:w,activeCategory:C,filteredEmojis:S,handleToggle:v,handleEmojiSelect:I,handleSearchChange:F,handleCategoryChange:W,handleClose:E,triggerRef:T,dropdownRef:A,onChange:P,onOpen:z,onClose:R,onEmojiSelect:H,customEmojis:M,closeOnSelect:D,maxRecentEmojis:L,value:V,defaultValue:O,..._})=>{const{getColor:q}=i.useTheme(),B={...Ue.container,...l==null?void 0:l.container},X={...Ue.trigger,...Gh[s],...Yh[d],...Xh[u],...c&&{borderColor:"color-red-500"},...m&&{opacity:.6,cursor:"not-allowed"},...!m&&!g&&{_hover:{borderColor:"color-gray-300"}},...l==null?void 0:l.trigger},$={...Ue.dropdown,...l==null?void 0:l.dropdown},U={...Ue.categoryTabs,...l==null?void 0:l.categoryTabs},K={...Ue.emojiGrid,...l==null?void 0:l.emojiGrid},ee=x.filter(J=>J==="recent"?y&&j.length>0:!0);return r.jsxs(i.View,{...B,..._,children:[t&&r.jsx(i.Text,{fontSize:s==="xs"?"12px":s==="sm"?"14px":"16px",fontWeight:"500",color:"color-gray-700",marginBottom:"4px",...l==null?void 0:l.label,children:t}),r.jsxs(i.View,{ref:T,onClick:m||g?void 0:v,...X,children:[r.jsx(i.Horizontal,{alignItems:"center",gap:8,children:r.jsx(i.Text,{color:k?"color-gray-800":"color-gray-500",fontSize:"inherit",children:k||a})}),!g&&!m&&r.jsx(se,{widthHeight:16,color:"color-gray-500",orientation:b?"up":"down"})]}),b&&r.jsxs(i.View,{ref:A,...$,children:[h&&r.jsx(i.View,{...Ue.searchInput,...l==null?void 0:l.searchInput,children:r.jsx(ve,{placeholder:"Search emojis...",value:w,onChange:J=>F(J.target.value),size:"sm"})}),f&&r.jsx(i.View,{...U,children:ee.map(J=>r.jsx(i.View,{...Ue.categoryTab,...C===J&&{borderBottomColor:"theme-primary",color:"theme-primary",backgroundColor:"color-blue-50"},onClick:()=>W(J),title:J.charAt(0).toUpperCase()+J.slice(1),...l==null?void 0:l.categoryTab,children:Kh[J]},J))}),r.jsx(i.View,{...K,children:S.length>0?S.map((J,oe)=>r.jsx(i.View,{...Ue.emoji,onClick:()=>I(J),title:J.name,_hover:{backgroundColor:"color-gray-50",transform:"scale(1.05)"},color:"color-gray-800",...l==null?void 0:l.emoji,children:J.emoji},`${J.emoji}-${oe}`)):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"})})})]}),n&&r.jsx(i.Text,{color:c?"color-red-500":"color-gray-600",marginTop:"4px",...l==null?void 0:l.helperText,children:n})]})},Qh=e=>{const o=he(e),t={...e,value:o.value??e.value??e.defaultValue},a=Ol(t),n=l=>{var s;a.handleEmojiSelect(l),o.onChange(l.emoji),(s=e.onEmojiSelect)==null||s.call(e,l)};return r.jsx(Nl,{...a,...t,handleEmojiSelect:n})},Zh=Qh,ef=({files:e,onRemove:o,maxHeight:t="120px",views:a={}})=>{if(e.length===0)return null;const n=p.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",...a==null?void 0:a.container,children:e.map((l,s)=>{const d=l.url||"",u=l.type.startsWith("image/"),c=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,...a==null?void 0:a.item,children:r.jsxs(Se,{children:[r.jsx(Se.Trigger,{children:r.jsxs(i.View,{position:"relative",children:[u&&d&&r.jsx(i.Image,{src:d,alt:l.name,width:"60px",height:"60px",objectFit:"cover",borderRadius:"8px"}),c&&d&&r.jsx(i.View,{as:"video",src:d,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(vo,{widthHeight:24,color:"color-black"})}),!u&&!c&&!m&&r.jsx(i.Center,{width:"60px",height:"60px",backgroundColor:"color-gray-100",borderRadius:"8px",children:r.jsx(to,{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:g=>{g.stopPropagation(),o(s)},"aria-label":`Remove ${l.name}`,children:"×"})]})}),r.jsxs(Se.Content,{children:[u&&d&&r.jsx(i.Image,{src:d,alt:l.name,maxWidth:"300px"}),c&&d&&r.jsx(i.View,{as:"video",src:d,controls:!0,maxWidth:"300px"}),m&&d&&r.jsx(i.View,{as:"audio",src:d,controls:!0,width:"100%"}),r.jsxs(i.Text,{marginTop:"4px",maxLines:1,width:"100%",fontSize:12,...a==null?void 0:a.name,children:[l.name," (",n(l.size),")"]})]})]})},s)})})},of=e=>{const o=me("slider",e),t=Pl(o);return r.jsx(Al,{...o,...t})},ql=of,rf=({url:e,type:o,name:t,onOpen:a})=>{const n=o.toLowerCase(),l=n.startsWith("image"),s=n.startsWith("video"),d=n.startsWith("audio"),u=()=>{a&&a()};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:u,children:[l&&r.jsx(i.Image,{src:e,alt:t,width:"100%",height:"100%",objectFit:"cover"}),s&&r.jsx(i.View,{as:"video",src:e,controls:!0,width:"100%",height:"100%",style:{objectFit:"cover"},onClick:c=>c.stopPropagation()}),d&&r.jsx(i.View,{as:"audio",controls:!0,src:e,width:"100%",onClick:c=>c.stopPropagation()}),!l&&!s&&!d&&r.jsx(to,{widthHeight:24,color:"color-gray-600"})]})},Ye=zr.create(e=>({modals:[],onHide:o=>o,onShow:(o,t)=>({name:o,props:t}),show:(o,t={},a={})=>{e(n=>({...n,modals:[...n.modals,{name:o,props:{...t,isVisible:!0},overlayProps:a}]}))},hide:o=>{e(t=>o?{...t,modals:t.modals.filter(a=>a.name!==o)}:{modals:[]})},setOnHide:o=>{e(t=>({...t,onHide:o}))},setOnShow:o=>{e(t=>({...t,onShow:o}))}})),tf=(e,o={},t={})=>{Ye.getState().show(e,o,t),Ye.getState().onShow(e,o)},oa=e=>{console.log("hideModal",e),Ye.getState().onHide(e),Ye.getState().hide(typeof e=="string"?e:void 0)},af={square:{borderRadius:0},rounded:{borderRadius:8}},nf={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"}},lf={xs:12,sm:16,md:20,lg:24,xl:28},rt={body:{fontSize:"16px",fontWeight:"400",color:"color-gray-700"}},Ul=p.memo(({children:e,blur:o,isOpen:t=!1,isClosePrevented:a=!1,onClose:n=()=>{},position:l="center",views:s,...d})=>{const u=p.useCallback(()=>{a||n()},[a,n]);return r.jsx(i.Center,{position:"fixed",top:0,left:0,width:"100%",height:"100%",zIndex:1e3,onClick:u,visibility:t?"visible":"hidden",opacity:t?1:0,transition:"opacity 0.2s ease, visibility 0.2s ease",...s==null?void 0:s.container,children:r.jsx(i.View,{position:"absolute",top:0,left:0,zIndex:1e3,width:"100vw",height:"100vh",display:"flex",backgroundColor:"color-blackAlpha-500",backdropFilter:o?`blur(${o}px)`:void 0,transition:"background-color 0.2s ease, backdrop-filter 0.2s ease",onClick:u,...nf[l],...d,...s==null?void 0:s.view,children:e})})}),sf={boxShadow:"0px 4px 16px rgba(0, 0, 0, 0.15)"},cf={elevation:5,shadowColor:"rgba(0, 0, 0, 0.15)",shadowOffset:{width:0,height:4},shadowOpacity:1,shadowRadius:16},df=p.memo(({children:e,shadow:o,isFullScreen:t=!1,shape:a="rounded",views:n,isOpen:l=!0,position:s,...d})=>{const u=typeof document!==void 0?sf:cf,c=p.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:c,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||u,...af[a],media:{mobile:{width:"90%",maxWidth:"100%",margin:"16px"}},...d,...n==null?void 0:n.container,children:e})}),uf=p.memo(({children:e,buttonColor:o="theme-primary",iconSize:t="md",buttonPosition:a="right",views:n,onClose:l,...s})=>{const d=l||oa,u=r.jsx(i.View,{onClick:d,children:r.jsx(Te,{widthHeight:lf[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,...n==null?void 0:n.header,children:[a==="left"&&u,e,a==="right"&&u]})}),pf=p.memo(({children:e,views:o,...t})=>r.jsx(i.View,{paddingVertical:16,paddingHorizontal:24,fontSize:rt.body.fontSize,fontWeight:rt.body.fontWeight,color:rt.body.color,media:{mobile:{paddingVertical:12,paddingHorizontal:16,fontSize:"14px"}},...t,...o==null?void 0:o.view,children:e})),mf=p.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})),gf=({modals:e,onShow:o,onHide:t})=>{const a=Ye(n=>n.modals);return p.useEffect(()=>{o&&Ye.getState().setOnShow(o)},[o]),p.useEffect(()=>{t&&Ye.getState().setOnHide(t)},[t]),a.length===0?null:r.jsx(p.Fragment,{children:a.map((n,l)=>{const s=e[n.name];return s?r.jsx(Ul,{isOpen:n.props.isVisible,onClose:()=>oa(n.name),blur:5,...n.overlayProps,style:{zIndex:1e3+l},children:r.jsx(s,{...n.props})},l):(console.error(`${n.name} modal doesn't exist`),null)})})},lo=({children:e})=>r.jsx(r.Fragment,{children:e});lo.Overlay=Ul;lo.Container=df;lo.Header=uf;lo.Body=pf;lo.Footer=mf;lo.Layout=gf;const $a={xs:"320px",sm:"380px",md:"480px",lg:"640px",xl:"768px",full:"100%"},hf={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"}},ra=({isOpen:e,onClose:o,isClosePrevented:t,blur:a,children:n,...l})=>{const s=()=>{t||o()};return p.useEffect(()=>{const d=u=>{u.key==="Escape"&&e&&!t&&o()};return e&&document.addEventListener("keydown",d),()=>{document.removeEventListener("keydown",d)}},[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:s,opacity:e?1:0,transition:"opacity 0.2s ease, visibility 0.2s ease, background-color 0.2s ease",backgroundColor:e?"color-blackAlpha-500":"transparent",backdropFilter:a?`blur(${a}px)`:void 0,pointerEvents:e?"auto":"none",...l,children:n})},ta=({placement:e="right",size:o="md",isOpen:t=!1,children:a,...n})=>{const l=m=>{m.stopPropagation()},d=e==="top"||e==="bottom"?{height:o==="full"?"100vh":$a[o]||o,maxHeight:"100vh"}:{width:o==="full"?"100vw":$a[o]||o,maxWidth:"100vw"},u=e==="left"?"0 12px 12px 0":e==="right"?"12px 0 0 12px":e==="top"?"0 0 12px 12px":"12px 12px 0 0",c=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:u,...hf[e],...d,onClick:l,transform:c,willChange:"transform",transition:"transform 0.24s ease, box-shadow 0.2s ease",boxShadow:"0 12px 32px rgba(15, 23, 42, 0.12)",...n,children:a})},ff=({children:e,onClose:o,buttonPosition:t="right",...a})=>{const n=o&&r.jsx(i.View,{onClick:o,cursor:"pointer",padding:8,children:r.jsx(Te,{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",...a,children:[t==="left"&&n,e,t==="right"&&n]})},yf=({children:e,...o})=>r.jsx(i.Vertical,{padding:24,flex:1,overflowY:"auto",...o,children:e}),xf=({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}),Xe=zr.create(e=>({drawers:[],onHide:o=>o,onShow:(o,t)=>({name:o,props:t}),show:(o,t={},a={})=>{e(n=>({...n,drawers:[...n.drawers,{name:o,props:{...t,isOpen:!1},overlayProps:a}]}))},hide:o=>{e(t=>o?{...t,drawers:t.drawers.filter(a=>a.name!==o)}:{drawers:[]})},setOnHide:o=>{e(t=>({...t,onHide:o}))},setOnShow:o=>{e(t=>({...t,onShow:o}))}})),bf=(e,o={},t={})=>{const a=Xe.getState();a.hide(e),a.show(e,o,t),a.onShow(e,o),queueMicrotask(()=>{Xe.setState(n=>({drawers:n.drawers.map(l=>l.name===e?{...l,props:{...l.props,isOpen:!0}}:l)}))})},Gl=e=>{Xe.getState().onHide(e),Xe.getState().hide(typeof e=="string"?e:void 0)},kf=({drawers:e,onShow:o,onHide:t})=>{const a=Xe(n=>n.drawers);return p.useEffect(()=>{o&&Xe.getState().setOnShow(o)},[o]),p.useEffect(()=>{t&&Xe.getState().setOnHide(t)},[t]),a.length===0?null:r.jsx(p.Fragment,{children:a.map((n,l)=>{var f;const s=e[n.name];if(!s)return console.error(`${n.name} drawer doesn't exist`),null;const{placement:d,size:u,isClosePrevented:c,blur:m,containerProps:g,...h}=n.props||{};return r.jsx(ra,{isOpen:n.props.isOpen,onClose:()=>Gl(n.name),isClosePrevented:c,blur:m,...n.overlayProps,style:{zIndex:1e3+l,...((f=n.overlayProps)==null?void 0:f.style)||{}},children:r.jsx(ta,{placement:d,size:u,isOpen:n.props.isOpen,...g||{},children:r.jsx(p.Suspense,{fallback:null,children:r.jsx(s,{...h})})})},l)})})},Cf=({isOpen:e,onClose:o,placement:t="right",size:a="md",isClosePrevented:n,children:l,...s})=>r.jsx(ra,{isOpen:e,onClose:o,isClosePrevented:n,...s,children:r.jsx(ta,{placement:t,size:a,isOpen:e,children:l})}),io=Cf;io.Overlay=ra;io.Container=ta;io.Header=ff;io.Body=yf;io.Footer=xf;io.Layout=kf;const Sf=(e=null,o=[])=>{const[t,a]=p.useState(e),[n,l]=p.useState(o),s=p.useRef({});return{activeItemId:t,setActiveItemId:a,expandedItemIds:n,toggleExpandedItem:c=>{l(m=>m.includes(c)?m.filter(h=>h!==c):[...m,c])},isItemExpanded:c=>n.includes(c),triggerRefs:s}},yt={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"}}}},xt={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"}},Co={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"}},Xl=p.createContext({activeItemId:null,setActiveItemId:()=>{},expandedItemIds:[],toggleExpandedItem:()=>{},isItemExpanded:()=>!1,orientation:"vertical",size:"md",variant:"default",triggerRefs:{current:{}}}),jf=({children:e,value:o})=>r.jsx(Xl.Provider,{value:o,children:e}),Zo=()=>{const e=p.useContext(Xl);if(!e)throw new Error("useNavigationMenuContext must be used within a NavigationMenuProvider");return e},aa=({children:e,views:o})=>{const{orientation:t}=Zo(),a=t==="horizontal"?i.Horizontal:i.Vertical;return r.jsx(a,{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})},Kl=p.createContext({itemValue:null,isDisabled:!1}),wf=()=>{const e=p.useContext(Kl);if(!e)throw new Error("useNavigationMenuItemContext must be used within a NavigationMenuItem");return e},na=({item:e,value:o,isDisabled:t=!1,children:a,views:n})=>{var k;const{activeItemId:l,setActiveItemId:s,orientation:d,size:u,variant:c,onItemActivate:m}=Zo(),g=(e==null?void 0:e.id)||o,h=l===g,f=(e==null?void 0:e.items)&&e.items.length>0,y=(e==null?void 0:e.disabled)||t,x=()=>{y||g&&(s(g),m&&m(g))},b=d==="horizontal"?i.Horizontal:i.Vertical;return a?r.jsx(Kl.Provider,{value:{itemValue:g||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",...yt[u],...xt[c],...h?Co.active:{},_hover:y?{}:Co.hover,...n==null?void 0:n.item,children:a})}):f&&e?r.jsxs(b,{width:"100%",flexDirection:"column",position:"relative",...n==null?void 0:n.item,children:[r.jsxs(Jl,{itemId:e.id,disabled:e.disabled,views:n,children:[e.icon&&r.jsx(i.View,{marginRight:8,...n==null?void 0:n.icon,children:e.icon}),e.label]}),r.jsx(Ql,{itemId:e.id,children:r.jsx(aa,{children:(k=e.items)==null?void 0:k.map(j=>r.jsx(na,{item:j},j.id))})})]}):e?r.jsxs(i.View,{as:e.href?"a":"div",href:e.href,onClick:x,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",...yt[u],...xt[c],...h?Co.active:{},_hover:e.disabled?{}:Co.hover,...n==null?void 0:n.item,children:[e.icon&&r.jsx(i.View,{marginRight:8,...n==null?void 0:n.icon,children:e.icon}),e.label]}):null},Jl=({children:e,itemId:o,disabled:t,views:a})=>{const{activeItemId:n,toggleExpandedItem:l,isItemExpanded:s,size:d,variant:u,triggerRefs:c}=Zo(),m=p.useRef(null),g=n===o,h=s(o);p.useEffect(()=>(m.current&&o&&(c.current[o]=m.current),()=>{o&&delete c.current[o]}),[o,c]);const f=y=>{y.preventDefault(),!t&&l(o)};return r.jsxs(i.View,{ref:m,onClick:f,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",...yt[d],...xt[u],...g?Co.active:{},_hover:t?{}:Co.hover,...a==null?void 0:a.trigger,children:[r.jsx(i.View,{display:"flex",alignItems:"center",children:e}),r.jsx(i.View,{transition:"transform 0.2s ease",transform:h?"rotate(180deg)":"rotate(0deg)",...a==null?void 0:a.indicator,children:r.jsx(se,{orientation:"down",widthHeight:16,color:"currentColor",filled:!0})})]})},Ql=({children:e,itemId:o,views:t})=>{const{isItemExpanded:a,orientation:n,triggerRefs:l}=Zo(),s=p.useRef(null),[d,u]=p.useState({x:0,y:0,placement:n==="horizontal"?"bottom":"right"}),c=a(o);if(p.useEffect(()=>{if(c&&s.current&&o&&l.current[o]&&n==="horizontal"){const g=s.current.getBoundingClientRect(),h=l.current[o].getBoundingClientRect(),f=Math.max(g.width||200,200),y=Math.max(g.height||150,150),x=window.innerWidth,b=window.innerHeight,k={top:h.top,right:x-h.right,bottom:b-h.bottom,left:h.left},j=n==="horizontal"?[{placement:"bottom",space:k.bottom,fits:k.bottom>=y+8,x:h.left,y:h.bottom+8},{placement:"top",space:k.top,fits:k.top>=y+8,x:h.left,y:h.top-y-8},{placement:"right",space:k.right,fits:k.right>=f+8,x:h.right+8,y:h.top},{placement:"left",space:k.left,fits:k.left>=f+8,x:h.left-f-8,y:h.top}]:[{placement:"right",space:k.right,fits:k.right>=f+8,x:h.right+8,y:h.top},{placement:"left",space:k.left,fits:k.left>=f+8,x:h.left-f-8,y:h.top},{placement:"bottom",space:k.bottom,fits:k.bottom>=y+8,x:h.left,y:h.bottom+8},{placement:"top",space:k.top,fits:k.top>=y+8,x:h.left,y:h.top-y-8}],w=j.find(I=>I.fits);if(w){u({x:w.x,y:w.y,placement:w.placement});return}const C=j.reduce((I,F)=>F.space>I.space?F:I);let S=C.x,v=C.y;S+f>x&&(S=x-f-8),S<8&&(S=8),v+y>b&&(v=b-y-8),v<8&&(v=8),u({x:S,y:v,placement:C.placement})}},[c,n,o,l]),!c)return null;if(n==="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:d.x,top:d.y,zIndex:1e3};return r.jsx(i.View,{ref:s,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})},vf=({href:e,children:o,views:t,underline:a,isExternal:n,iconSize:l,...s})=>{const{itemValue:d,isDisabled:u}=wf(),{activeItemId:c,setActiveItemId:m,onItemActivate:g}=Zo(),h=c===d,f=y=>{if(u){y.preventDefault();return}d&&(m(d),g&&g(d)),s.onClick&&s.onClick(y)};return r.jsx(i.View,{as:"a",href:u?void 0:e,onClick:f,cursor:u?"not-allowed":"pointer",opacity:u?.5:1,width:"100%",display:"flex",alignItems:"center","aria-current":h?"page":void 0,"aria-disabled":u,"data-active":h?"":void 0,"data-disabled":u?"":void 0,...h?{fontWeight:"bold"}:{},...t==null?void 0:t.container,...s,children:o})},Tf=({items:e,orientation:o,views:t,themeMode:a})=>{const n=o==="horizontal"?i.Horizontal:i.Vertical;return!e||e.length===0?null:r.jsx(n,{width:"100%",...Yl[o],...t==null?void 0:t.container,children:r.jsx(aa,{views:t,children:e.map(l=>r.jsx(na,{item:l,views:t},l.id))})})},If=e=>{const o=me("navigation",e),{items:t,children:a,orientation:n="vertical",size:l="md",variant:s="default",defaultActiveItemId:d=null,defaultExpandedItemIds:u=[],onItemActivate:c,views:m,...g}=o,{activeItemId:h,setActiveItemId:f,expandedItemIds:y,toggleExpandedItem:x,isItemExpanded:b,triggerRefs:k}=Sf(d,u);return r.jsx(jf,{value:{activeItemId:h,setActiveItemId:f,expandedItemIds:y,toggleExpandedItem:x,isItemExpanded:b,orientation:n,size:l,variant:s,onItemActivate:c,triggerRefs:k},children:t?r.jsx(Tf,{items:t,orientation:n,size:l,variant:s,views:m,...g}):a})},so=If;so.List=aa;so.Item=na;so.Trigger=Jl;so.Content=Ql;so.Link=vf;const Zl={},ei=p.createContext({views:Zl,onRowClick:()=>{}}),Ff=({children:e,views:o=Zl,onRowClick:t})=>r.jsx(ei.Provider,{value:{views:o,onRowClick:t},children:e}),Qe=()=>p.useContext(ei),ge={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",media:{mobile:{padding:"8px 12px",fontSize:"12px"}}},td:{padding:"12px 16px",fontSize:"14px",borderBottom:"1px solid",borderColor:"color-gray-100",color:"inherit",media:{mobile:{padding:"8px 12px",fontSize:"12px"}}},tr:{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"}}}};({...ge.th},{...ge.td});({...ge.tr});({...ge.td},{...ge.th});({...ge.table},{...ge.th}),{...ge.td},{...ge.tr},{...ge.tfoot},{...ge.caption};const oi=e=>{const{views:o}=Qe();return r.jsx(i.Element,{as:"table",...ge.table,...o==null?void 0:o.table,...e,style:{borderCollapse:"collapse",...e.style||{}}})},ri=e=>{const{views:o}=Qe();return r.jsx(i.Element,{as:"thead",textAlign:"left",...ge.thead,...o==null?void 0:o.thead,...e})},ti=e=>{const{views:o}=Qe();return r.jsx(i.Element,{as:"th",whiteSpace:"nowrap",...ge.th,...o==null?void 0:o.th,...e})},gr=e=>{const{views:o,onRowClick:t}=Qe();return r.jsx(i.Element,{as:"tr",...ge.tr,...o==null?void 0:o.tr,onClick:t,...e})},bt=({isFirstColumn:e,...o})=>{const{views:t}=Qe();return r.jsx(i.Element,{as:"td",whiteSpace:"nowrap",fontWeight:e?"500":"400",...ge.td,...t==null?void 0:t.td,...o})},ai=e=>{const{views:o}=Qe();return r.jsx(i.Element,{as:"tbody",...ge.tbody,...o==null?void 0:o.tbody,...e})},ni=e=>{const{views:o}=Qe();return r.jsx(i.Element,{as:"tfoot",...ge.tfoot,...o==null?void 0:o.tfoot,...e})},li=e=>{const{views:o}=Qe();return r.jsx(i.Element,{as:"caption",...ge.caption,...o==null?void 0:o.caption,...e})},Rf=({data:e,columns:o,footer:t,caption:a,themeMode:n})=>r.jsxs(oi,{role:"Table",children:[a&&r.jsx(li,{children:a}),r.jsx(ri,{children:r.jsx(gr,{children:o.map(l=>r.jsx(ti,{children:l.title},l.field))})}),r.jsx(ai,{children:e.map((l,s)=>r.jsx(gr,{children:o.map((d,u)=>r.jsx(bt,{isFirstColumn:u===0,children:l[d.field]},d.field))},s))}),t&&r.jsx(ni,{children:r.jsx(gr,{children:t.map((l,s)=>r.jsx(bt,{...l.props,children:l.value},s))})})]}),Fe=({children:e,views:o,onClick:t})=>{const a=me("table",{views:o,onClick:t});return r.jsx(Ff,{views:a.views,onRowClick:a.onClick,children:e})};Fe.Head=ri;Fe.HeadCell=ti;Fe.Body=ai;Fe.Row=gr;Fe.Cell=bt;Fe.Footer=ni;Fe.Caption=li;Fe.Container=oi;Fe.Template=Rf;const zf=(e,o,t)=>{const a=c=>c.value!==void 0?c.value:c.title,n=()=>{if(!(!e||e.length===0)){if(o!==void 0){const c=e.find(m=>a(m)===o);if(c)return c}return e[0]}},[l,s]=p.useState(n()),d=t!==void 0?e.find(c=>a(c)===t):l,u=c=>{t===void 0&&s(c)};return p.useEffect(()=>{if(t!==void 0)return;const c=n(),m=l&&e.some(g=>a(g)===a(l));c&&(!m||o!==void 0&&l&&a(l)!==o)?s(c):!c&&l&&s(void 0)},[e,o]),{activeTab:d,setActiveTab:u}},Mf=(e,o,t)=>{const[a,n]=p.useState(e||null);return{activeValue:o!==void 0?o:a,setActiveValue:d=>{o===void 0&&n(d),t&&t(d)}}},Wf=p.memo(({tab:e,isActive:o,onClick:t,iconPosition:a="left",tabStyles:n,textStyles:l})=>{const s=()=>{switch(a){case"top":return"column";case"bottom":return"column-reverse";case"right":return"row-reverse";case"left":default:return"row"}},d=()=>["top","bottom"].includes(a)?"4px":"8px",u=e.icon&&p.isValidElement(e.icon)?p.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",...n,flexDirection:s(),gap:d(),onClick:t,"data-state":o?"active":"inactive",children:[u&&r.jsx(i.Element,{children:u},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})]})]})}),la=(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}}},Hf=({tabs:e=[],activeTab:o,handleTabClick:t,views:a={},renderTab:n,renderContent:l,variant:s="underline",iconPosition:d="left"})=>{const{themeMode:u}=i.useTheme(),c=la(s,u);return o?r.jsxs(i.Vertical,{width:"100%",height:"100%",...a.container,children:[r.jsx(i.Horizontal,{alignItems:"center",...c.header,...a.headerTabs,children:e.map(m=>{const g=(m.value!==void 0?m.value:m.title)===(o.value!==void 0?o.value:o.title),h=()=>t(m);return n?n(m,g,h):r.jsx(Wf,{tab:m,isActive:g,onClick:h,iconPosition:d,tabStyles:{...c.tab,...a.tab,...g?c.activeTab:{},...g?a.activeTab:{}},textStyles:{...c.text,...a.title,...g?c.activeText:{},...g?a.activeText:{}}},m.title)})}),r.jsx(i.View,{height:"100%",...c.content,...a.content,children:l?l(o):o.content})]}):null},ii=p.createContext(null),ia=()=>{const e=p.useContext(ii);if(!e)throw new Error("useTabsContext must be used within a Tabs component");return e},Pf=p.memo(({children:e,views:o})=>{var d;const{themeMode:t}=i.useTheme(),{variant:a="underline"}=ia(),n=la(a,t),l=zo("tabs"),s=Ee({container:(d=l.views)==null?void 0:d.headerTabs},o);return r.jsx(i.Horizontal,{alignItems:"center",...n.header,...s==null?void 0:s.container,children:e})}),Af=p.memo(({value:e,children:o,disabled:t=!1,views:a})=>{var f,y;const{themeMode:n}=i.useTheme(),{activeValue:l,setActiveValue:s,variant:d="underline"}=ia(),u=l===e,c=la(d,n),m=zo("tabs"),g=Ee({trigger:(f=m.views)==null?void 0:f.tab,activeState:(y=m.views)==null?void 0:y.activeTab},a),h=p.useCallback(()=>{t||s(e)},[t,e,s]);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",...c.tab,...u?c.activeTab:{},_hover:t?{}:d==="underline"?{color:"theme-primary"}:{opacity:.9},onClick:h,...g==null?void 0:g.trigger,...u?g==null?void 0:g.activeState:{},children:r.jsx(i.View,{...c.text,...u?c.activeText:{},children:o})})}),Vf=p.memo(({value:e,children:o,views:t})=>{const{activeValue:a}=ia();return a!==e?null:r.jsx(i.View,{width:"100%",padding:"24px",...t==null?void 0:t.content,children:o})}),Ef=e=>{const o=me("tabs",e),{tabs:t,views:a,defaultValue:n,onTabChange:l,renderTab:s,renderContent:d,variant:u="underline",iconPosition:c="left",value:m,onValueChange:g,children:h}=o,f=Mf(n,m,g),y=zf(t||[],n,m);if(h)return r.jsx(ii.Provider,{value:{...f,variant:u},children:h});if(t){const x=b=>{const k=j=>j.value!==void 0?j.value:j.title;(!y.activeTab||k(y.activeTab)!==k(b))&&(y.setActiveTab(b),l&&l(b))};return r.jsx(Hf,{tabs:t,views:a,activeTab:y.activeTab,handleTabClick:x,renderTab:s,renderContent:d,variant:u,iconPosition:c})}return null},Df=p.memo(Ef),Io=Df;Io.List=Pf;Io.Trigger=Af;Io.Content=Vf;const $f=e=>{const{children:o,_isInView:t=!1,alternateHighlightText:a=[],alternateAnimation:n=!1,alternateDuration:l=3e3,highlightText:s,highlightTypewriter:d=!1,highlightSlide:u=!1,highlightSlideDuration:c=500,highlightSlideStagger:m=50,highlightSlideSequential:g=!0}=e,[h,f]=p.useState(o),[y,x]=p.useState(s);return p.useEffect(()=>{if(!n||a.length===0||!t||typeof o!="string"||typeof s!="string")return f(o),x(s),()=>{};const b=o,k=s;let j=0;const w=S=>{const v=a[S],I=k.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),F=new RegExp(I,"gi"),W=b.replace(F,v);f(W),x(v)};w(j);const C=setInterval(()=>{j=(j+1)%a.length,w(j)},l);return()=>clearInterval(C)},[n,a,l,s,o,t]),{finalDisplayedText:h,activeHighlightTarget:y,highlightTypewriter:d,highlightSlide:u,highlightSlideDuration:c,highlightSlideStagger:m,highlightSlideSequential:g}},Lf={xs:24,sm:32,md:48,lg:96,xl:110},_f={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}}}},Bf={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:()=>({})},Of=({text:e,typingSpeed:o=50,pauseTime:t=500,onComplete:a,showCursor:n=!0,cursorColor:l="currentColor",textStyle:s,textComponent:d,as:u,...c})=>{const m=d||i.Text,g=Array.isArray(e)?e:[e],[h,f]=p.useState(g.map(()=>"")),[y,x]=p.useState(!1),[b,k]=p.useState(0),[j,w]=p.useState(0);p.useEffect(()=>{f(g.map(()=>"")),x(!1),k(0),w(0)},[e]),p.useEffect(()=>{if(y){a&&a();return}const S=g[b];if(j>=S.length){if(b>=g.length-1){x(!0);return}const I=setTimeout(()=>{k(F=>F+1),w(0)},t);return()=>clearTimeout(I)}const v=setTimeout(()=>{f(I=>{const F=[...I];return F[b]=S.substring(0,j+1),F}),w(I=>I+1)},o);return()=>clearTimeout(v)},[g,b,j,y,a,t,o]);const C=S=>{if(!S||typeof S!="string")return S;const v=S.split("|");return v.length===1?S:v.map((I,F)=>r.jsxs(p.Fragment,{children:[I,F<v.length-1&&r.jsx("br",{})]},F))};return r.jsx(r.Fragment,{children:h.map((S,v)=>r.jsxs(p.Fragment,{children:[C(S),n&&v===b&&!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",...s})]},v))})},Nf=({text:e,duration:o=500,direction:t="up",stagger:a=50,sequential:n=!1,textStyle:l,as:s,wordProps:d,textComponent:u,...c})=>{const[m,g]=p.useState(e),[h,f]=p.useState("entering"),[y,x]=p.useState(0),b=u||i.Text,k=p.useRef(null),j=p.useRef(null);p.useEffect(()=>{e===m&&h==="visible"||e!==m&&(h==="entering"||h==="visible"?(k.current=e,f("exiting")):h==="exiting"&&(k.current=e))},[e,m,h]);const{lines:w,totalWordCount:C}=p.useMemo(()=>{const H=m.split("|").map(D=>D.trim().split(/\s+/).filter(L=>L.length>0)),M=H.reduce((D,L)=>D+L.length,0);return{lines:H,totalWordCount:M}},[m]),S=p.useMemo(()=>n?C*(o+a):(C-1)*a+o,[C,o,a,n]),v=p.useMemo(()=>n?C*(o+a):(C-1)*a+o,[C,o,a,n]);p.useEffect(()=>(j.current&&clearTimeout(j.current),h==="entering"?j.current=setTimeout(()=>{f("visible")},S+50):h==="exiting"&&(j.current=setTimeout(()=>{k.current!==null&&(g(k.current),k.current=null),x(R=>R+1),f("entering")},v+50)),()=>{j.current&&clearTimeout(j.current)}),[h,S,v]);const{style:I,...F}=d||{},W=t==="up",E=R=>n?R*(o+a):R*a,T=p.useMemo(()=>({display:"inline-block",position:"relative",verticalAlign:"bottom",whiteSpace:"nowrap",...l}),[l]),A=p.useMemo(()=>({display:"inline-flex",flexDirection:"column",alignItems:"center"}),[]),P=p.useMemo(()=>({display:"block",whiteSpace:"nowrap"}),[]);let z=0;return r.jsx(i.Element,{as:"span",style:T,...c,children:r.jsx("span",{style:A,children:w.map((R,H)=>r.jsx("span",{style:P,children:R.map((M,D)=>{const L=z++,V=E(L),O=D===R.length-1;let _;const q=`${o}ms`,B=`${V}ms`;h==="entering"?_=W?i.Animation.slideInUp({duration:q,delay:B,timingFunction:"ease-out",fillMode:"both"}):i.Animation.slideInDown({duration:q,delay:B,timingFunction:"ease-out",fillMode:"both"}):h==="exiting"&&(_=W?{from:{transform:"translateY(0)",opacity:1},to:{transform:"translateY(-100%)",opacity:0},duration:q,delay:B,timingFunction:"ease-in",fillMode:"both"}:{from:{transform:"translateY(0)",opacity:1},to:{transform:"translateY(100%)",opacity:0},duration:q,delay:B,timingFunction:"ease-in",fillMode:"both"});const X={...I,display:"inline-block",marginRight:O?0:"0.25em",transform:h==="visible"?"translateY(0)":void 0,opacity:h==="visible"?1:void 0};return r.jsx(b,{as:"span",animate:_,...F,...X,children:M},`${y}-${H}-${D}`)})},`line-${H}`))})})};function La(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}const tt=e=>{if(!e||typeof e!="string")return e;const o=e.split("|");return o.length===1?e:o.map((t,a)=>r.jsxs(p.Fragment,{children:[t,a<o.length-1&&r.jsx("br",{})]},a))},qf=({children:e,highlightText:o,highlightStyle:t="solid",highlightColor:a="theme-primary",highlightSecondaryColor:n,size:l="lg",views:s,highlightAnimate:d,animate:u,animationLoop:c=1,highlightAnimationLoop:m=1,highlightTypewriter:g=!1,highlightTypewriterDuration:h=3e3,highlightSlide:f=!1,highlightSlideDuration:y=500,highlightSlideStagger:x=50,highlightSlideSequential:b=!0,themeMode:k,responsive:j,alternateHighlightText:w,alternateAnimation:C,alternateDuration:S,_isInView:v,...I})=>{const{ref:F,inView:W}=i.useInView(),{finalDisplayedText:E,activeHighlightTarget:T,highlightTypewriter:A,highlightSlide:P,highlightSlideDuration:z,highlightSlideStagger:R,highlightSlideSequential:H}=$f({children:e,highlightText:o,_isInView:W,highlightTypewriter:g,highlightSlide:f,highlightSlideDuration:y,highlightSlideStagger:x,highlightSlideSequential:b,alternateHighlightText:w,alternateAnimation:C,alternateDuration:S,...I}),M=Lf[l],D={fontFamily:"Mulish, Inter, Geist, system-ui, sans-serif",fontWeight:l==="xl"?700:600,letterSpacing:l==="xl"?"-1.5px":"-0.01em"},L=Bf[t](a,n),V=($,U)=>$&&(Array.isArray($)?$.map(K=>({...K,iterationCount:U.toString()})):{...$,iterationCount:U.toString()}),O=V(u,c),_=V(d,m),q=typeof E=="string"?E:typeof e=="string"?e:"",B={ref:F,animate:W?O:void 0,as:"h1",fontSize:M,...j?_f[l]:{},...D},X=$=>!W&&(A||P)?r.jsx("span",{style:{opacity:0},children:$}):A?r.jsx(Of,{text:$,typingSpeed:Math.max(30,h/($.length*10)),cursorColor:"currentColor",...L}):P?r.jsx(Nf,{text:$,duration:z,stagger:R,sequential:H,direction:"up",wordProps:L}):tt($);if(typeof q=="string"&&T){const $=Array.isArray(T)?new RegExp(`(${T.map(J=>La(String(J))).join("|")})`,"gi"):new RegExp(`(${La(String(T))})`,"gi"),U=[];let K=0,ee;for(;ee=$.exec(q);)ee.index>K&&U.push(q.substring(K,ee.index)),U.push({highlight:!0,text:ee[0]}),K=ee.index+ee[0].length;return K<q.length&&U.push(q.substring(K)),r.jsx(i.Element,{...B,...s==null?void 0:s.container,...I,children:U.map((J,oe)=>typeof J=="string"?r.jsx(i.Text,{as:"span",display:"inline",...s==null?void 0:s.text,children:tt(J)},`text-${oe}`):r.jsx(i.Text,{as:"span",display:"inline",animate:W?_:void 0,...P?{}:L,...s==null?void 0:s.highlight,children:X(J.text)},`highlight-${oe}`))})}return t&&!T?r.jsx(i.Element,{...B,...I,...s==null?void 0:s.container,children:r.jsx(i.Text,{as:"span",display:"inline",animate:W?_:void 0,...P?{}:L,...s==null?void 0:s.highlight,children:X(q)})}):r.jsx(i.Text,{...B,...I,...s==null?void 0:s.container,...s==null?void 0:s.text,children:tt(q)})},Uf=e=>r.jsx(qf,{...e}),si=Uf,Gf=({items:e,shape:o,variant:t,onToggleChange:a})=>{const{activeToggles:n,setActiveToggles:l}=$l();return r.jsx(Ll,{items:e,shape:o,variant:t,activeToggles:n,setActiveToggles:l,onToggleChange:a})},ci=Gf,Yf=({items:e,onChange:o})=>{const[t,a]=p.useState(e),[n,l]=p.useState(null),[s,d]=p.useState(null),u=p.useRef({x:0,y:0}),c=p.useRef([]),m=p.useCallback((f,y)=>{f.preventDefault(),document.body.style.cursor="grabbing";const x="touches"in f?f.touches[0].clientX:f.clientX,b="touches"in f?f.touches[0].clientY:f.clientY;u.current={x,y:b},d(y),l(t[y])},[t]),g=p.useCallback(f=>{if(s===null)return;const y="touches"in f?f.touches[0].clientX:f.clientX,x="touches"in f?f.touches[0].clientY:f.clientY,b=c.current[s];if(!b)return;const k=y-u.current.x,j=x-u.current.y;b.style.transform=`translate(${k}px, ${j}px)`,b.style.zIndex="1000";const w=c.current.findIndex((C,S)=>{if(!C||S===s)return!1;const v=C.getBoundingClientRect();return x>=v.top&&x<=v.bottom});if(w!==-1&&w!==s){const C=[...t],[S]=C.splice(s,1);C.splice(w,0,S),a(C),d(w),o==null||o(C),u.current={x:y,y:x}}},[s,t,o]),h=p.useCallback(()=>{document.body.style.cursor="",c.current.forEach(f=>{f&&(f.style.transform="",f.style.zIndex="")}),d(null),l(null)},[s]);return p.useEffect(()=>(s!==null&&(window.addEventListener("mousemove",g),window.addEventListener("touchmove",g),window.addEventListener("mouseup",h),window.addEventListener("touchend",h)),()=>{window.removeEventListener("mousemove",g),window.removeEventListener("touchmove",g),window.removeEventListener("mouseup",h),window.removeEventListener("touchend",h)}),[s,g,h]),{items:t,draggedItem:n,draggedIndex:s,itemRefs:c,handleDragStart:m}},Xf=({items:e,renderItem:o,containerProps:t,itemProps:a,draggedIndex:n,itemRefs:l,handleDragStart:s,views:d,themeMode:u})=>r.jsx(i.View,{overflow:"hidden",position:"relative",...t,...d==null?void 0:d.container,children:e.map((c,m)=>r.jsx(i.View,{ref:g=>{l.current[m]=g},onMouseDown:g=>s(g,m),onTouchStart:g=>s(g,m),position:"relative",cursor:"grab",transition:"transform 0.2s",...a,...d==null?void 0:d.item,children:o?o(c,m):c},m))}),di=e=>{const{items:o,draggedIndex:t,itemRefs:a,handleDragStart:n}=Yf(e);return r.jsx(Xf,{...e,items:o,draggedIndex:t,itemRefs:a,handleDragStart:n})},Kf=di,Jf=({onFileSelect:e,onMultipleFileSelect:o,validateFile:t,accept:a,multiple:n,disabled:l,previewUrl:s})=>{const[d,u]=p.useState(!1),[c,m]=p.useState(null),g=p.useRef(null),h=s!==void 0?s:c;p.useEffect(()=>()=>{c&&URL.revokeObjectURL(c)},[c]);const f=p.useCallback(C=>{C.preventDefault(),C.stopPropagation(),!l&&u(!0)},[l]),y=p.useCallback(C=>{C.preventDefault(),C.stopPropagation(),!l&&u(!1)},[l]),x=p.useCallback(C=>{C.preventDefault(),C.stopPropagation(),!l&&u(!0)},[l]),b=p.useCallback(C=>{if(!C||C.length===0)return;const S=Array.from(C);if(!n&&S.length>0){const v=S[0];if(v.type.startsWith("image/")){const I=URL.createObjectURL(v);m(F=>(F&&URL.revokeObjectURL(F),I))}else m(null)}n?o&&o(S):S.length>0&&e&&e(S[0])},[n,o,e]),k=p.useCallback(C=>{C.preventDefault(),C.stopPropagation(),u(!1),!l&&C.dataTransfer.files&&C.dataTransfer.files.length>0&&(b(C.dataTransfer.files),C.dataTransfer.clearData())},[l,b]),j=p.useCallback(()=>{var C;l||(C=g.current)==null||C.click()},[l]),w=p.useCallback(C=>{b(C.target.files),C.target.value&&(C.target.value="")},[b]);return{isDragActive:d,handleDragEnter:f,handleDragLeave:y,handleDragOver:x,handleDrop:k,handleClick:j,handleFileChange:w,inputRef:g,preview:h}},Qf={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)"}},ui=({files:e,sandboxId:o,onRemove:t,layout:a="inline",maxHeight:n="120px",showPreviews:l=!1,views:s={}})=>{if(e.length===0)return null;const d=p.useCallback(c=>c<1024?`${c} B`:c<1024*1024?`${(c/1024).toFixed(1)} KB`:`${(c/(1024*1024)).toFixed(1)} MB`,[]),u=p.useCallback(c=>c.type.startsWith("image/")?{backgroundColor:"#DBEAFE",color:"#2563EB"}:c.type.startsWith("video/")?{backgroundColor:"#EDE9FE",color:"#7C3AED"}:c.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:n,overflowY:"auto",...s==null?void 0:s.container,children:e.map((c,m)=>{const g=(c==null?void 0:c.path)||(c==null?void 0:c.url)||(l?URL.createObjectURL(c):""),h=c.type.startsWith("image/"),f=c.type.startsWith("video/"),y=c.type.startsWith("audio/"),x=u(c);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,...s==null?void 0:s.item,children:l&&r.jsxs(Se,{children:[r.jsxs(Se.Trigger,{children:[h&&r.jsx(i.Image,{src:g,alt:c.name,width:"60px",height:"60px",borderRadius:"8px",objectFit:"cover"}),f&&r.jsx(i.View,{as:"video",src:g,alt:c.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(vo,{widthHeight:24,color:"color-black"})}),!h&&!f&&!y&&r.jsx(i.Center,{width:"60px",height:"60px",borderRadius:"8px",backgroundColor:"color-gray-100",children:r.jsx(to,{widthHeight:24,color:"color-black"})}),t&&r.jsx(i.Button,{...Qf,onClick:b=>{b.stopPropagation(),t(m)},"aria-label":`Remove ${c.name}`,children:"×"})]}),r.jsxs(Se.Content,{children:[h&&r.jsx(i.Image,{src:g,alt:c.name,maxWidth:"100%"}),f&&r.jsx(i.View,{as:"video",src:g,controls:!0,maxWidth:"100%"}),y&&r.jsx(i.View,{as:"audio",src:g,controls:!0,width:"100%"}),r.jsxs(i.Text,{marginTop:"4px",maxLines:1,width:"100%",...s==null?void 0:s.name,children:[c.name," (",d(c.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,...s==null?void 0:s.item,children:[r.jsx(i.Center,{width:"22px",height:"22px",minWidth:"22px",borderRadius:"9999px",backgroundColor:x.backgroundColor,color:x.color,children:y?r.jsx(vo,{widthHeight:12,color:"currentColor"}):r.jsx(to,{widthHeight:12,color:"currentColor"})}),r.jsxs(i.Text,{fontSize:"12px",lineHeight:"16px",color:"color-gray-600",maxLines:1,maxWidth:"220px",...s==null?void 0:s.name,children:[c.name," · ",d(c.size)]}),t&&r.jsx(i.View,{as:"button",type:"button",onClick:()=>t(m),"aria-label":`Remove ${c.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)})})},Zf=({children:e,text:o="Drop files here or click to upload",textProps:t,containerProps:a,disabled:n,accept:l,multiple:s,isDragActive:d,handleDragEnter:u,handleDragLeave:c,handleDragOver:m,handleDrop:g,handleClick:h,handleFileChange:f,inputRef:y,preview:x,imageProps:b,selectedFiles:k,onRemove:j})=>r.jsxs(i.Center,{width:"100%",minHeight:"200px",height:k&&k.length>0?"auto":"200px",borderWidth:2,borderStyle:"dashed",borderColor:d?"theme-primary":"color-gray-300",borderRadius:12,backgroundColor:d?"#EFF6FF":"color-gray-50",flexDirection:"column",cursor:n?"not-allowed":"pointer",opacity:n?.6:1,onClick:h,onDragEnter:u,onDragLeave:c,onDragOver:m,onDrop:g,transition:"background-color 0.2s ease, border-color 0.2s ease, opacity 0.2s ease",overflow:"hidden",position:"relative",padding:16,...a,children:[r.jsx("input",{type:"file",ref:y,onChange:f,accept:l,multiple:s,style:{display:"none"},disabled:n}),x&&!s?r.jsxs(i.View,{width:"100%",height:"200px",position:"relative",children:[r.jsx(i.Image,{src:x,alt:"Preview",width:"100%",height:"100%",objectFit:"contain",...b}),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(Lt,{widthHeight:40,color:d?"theme-primary":"color-gray-500"}),r.jsx(i.Text,{marginTop:16,color:d?"theme-primary":"color-gray-600",fontWeight:500,textAlign:"center",...t,children:o})]}),s&&k&&k.length>0&&r.jsx(i.View,{marginTop:16,width:"100%",children:r.jsx(ui,{files:k,onRemove:j||(()=>{}),showPreviews:!0,layout:"inline",maxHeight:"160px"})})]})]}),ey=e=>{const o=Jf(e);return r.jsx(Zf,{...e,...o})},oy=(e=!1)=>{const[o,t]=p.useState(e),[a,n]=p.useState(null);return p.useEffect(()=>{const l=u=>{!u.composedPath().some(g=>(g==null?void 0:g.id)==="dropdown-menu"||(g==null?void 0:g.id)==="dropdown-trigger")&&o&&(t(!1),n(null))},s=()=>{o&&(t(!1),n(null))},d=u=>{u.key==="Escape"&&o&&(t(!1),n(null))};return document.addEventListener("mousedown",l),window.addEventListener("resize",s),document.addEventListener("keydown",d),()=>{document.removeEventListener("mousedown",l),window.removeEventListener("resize",s),document.removeEventListener("keydown",d)}},[o]),{isOpen:o,setIsOpen:t,activeSubmenuId:a,setActiveSubmenuId:n}},ry={sm:{padding:"6px 8px",fontSize:"14px",minWidth:"160px"},md:{padding:"8px 12px",fontSize:"16px",minWidth:"180px"},lg:{padding:"10px 16px",fontSize:"18px",minWidth:"200px"}},ty={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"}},ay={hover:{backgroundColor:"color-gray-100"}},pi=p.createContext({isOpen:!1,setIsOpen:()=>{},activeSubmenuId:null,setActiveSubmenuId:()=>{},size:"md",variant:"default",triggerRef:{current:null}}),ny=({children:e,value:o})=>r.jsx(pi.Provider,{value:o,children:e}),sa=()=>{const e=p.useContext(pi);if(!e)throw new Error("useDropdownMenuContext must be used within a DropdownMenuProvider");return e},mi=({children:e,views:o,...t})=>{const{isOpen:a,setIsOpen:n,triggerRef:l}=sa(),s=d=>{d.stopPropagation(),n(!a)};return r.jsx(i.View,{ref:l,id:"dropdown-trigger",onClick:s,cursor:"pointer",position:"relative",display:"inline-block",...o==null?void 0:o.container,...t,children:e})},ca=({items:e,side:o="bottom",align:t="start",views:a,...n})=>{const{isOpen:l,variant:s,triggerRef:d}=sa(),u=p.useRef(null),{ref:c,relation:m}=i.useElementPosition({trackChanges:!0,trackOnHover:!0,trackOnScroll:!0,trackOnResize:!0}),[g,h]=p.useState({x:0,y:0,placement:o});if(p.useEffect(()=>{d.current&&c&&(c.current=d.current)},[d,c,l]),p.useEffect(()=>{if(l&&u.current&&d.current){const x=d.current.getBoundingClientRect();let b=o;m&&(o==="bottom"&&m.space.vertical==="top"?b="top":o==="top"&&m.space.vertical==="bottom"?b="bottom":o==="right"&&m.space.horizontal==="left"?b="left":o==="left"&&m.space.horizontal==="right"&&(b="right"));let k=0,j=0;switch(b){case"bottom":k=t==="start"?x.left:t==="end"?x.right-180:x.left+x.width/2-90,j=x.bottom+8;break;case"top":k=t==="start"?x.left:t==="end"?x.right-180:x.left+x.width/2-90,j=x.top-8;break;case"right":k=x.right+8,j=t==="start"?x.top:t==="end"?x.bottom-100:x.top+x.height/2-50;break;case"left":k=x.left-8,j=t==="start"?x.top:t==="end"?x.bottom-100:x.top+x.height/2-50;break}h({x:k,y:j,placement:b})}},[l,o,t,d,m]),!l)return null;const y=(()=>{const x={position:"fixed",left:g.x,top:g.y,zIndex:1e3};switch(g.placement){case"top":return{...x,transform:"translateY(-100%)"};case"left":return{...x,transform:"translateX(-100%)"};case"bottom":case"right":default:return x}})();return r.jsx(i.View,{ref:u,id:"dropdown-menu",borderRadius:4,boxShadow:"0px 2px 8px rgba(0, 0, 0, 0.15)",overflow:"hidden",style:y,...ty[s],...a==null?void 0:a.menu,...n,children:e.map((x,b)=>x.divider?r.jsx(hi,{views:a},`divider-${b}`):r.jsx(gi,{item:x,views:a},x.id))})},gi=({item:e,views:o,...t})=>{const{activeSubmenuId:a,setActiveSubmenuId:n,size:l}=sa(),[s,d]=p.useState(!1),u=e.items&&e.items.length>0,c=a===e.id,m=p.useRef(null),g=()=>{d(!0),u&&n(e.id)},h=()=>{d(!1)},f=y=>{y.stopPropagation(),!e.disabled&&!u&&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",...ry[l],_hover:e.disabled?{}:ay.hover,backgroundColor:s&&!e.disabled?"color-gray-100":"transparent",onMouseEnter:g,onMouseLeave:h,onClick:f,...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}),u&&r.jsx(i.View,{marginLeft:8,...o==null?void 0:o.submenuIndicator,children:r.jsx(se,{orientation:"right",widthHeight:16,color:"currentColor",filled:!0})}),c&&u&&r.jsx(ca,{items:e.items||[],side:"right",align:"start",views:o})]})},hi=({views:e,...o})=>r.jsx(i.View,{height:"1px",backgroundColor:"color-gray-200",margin:"4px 0",...e==null?void 0:e.divider,...o}),ly=({trigger:e,items:o,side:t="bottom",align:a="start",views:n,themeMode:l,...s})=>r.jsxs(i.View,{position:"relative",display:"inline-block",...n==null?void 0:n.container,...s,children:[r.jsx(mi,{views:n,children:e}),r.jsx(ca,{items:o,side:t,align:a,views:n})]}),iy=({trigger:e,items:o,size:t="md",variant:a="default",side:n="bottom",align:l="start",defaultOpen:s=!1,views:d,...u})=>{const{isOpen:c,setIsOpen:m,activeSubmenuId:g,setActiveSubmenuId:h}=oy(s),f=p.useRef(null);return r.jsx(ny,{value:{isOpen:c,setIsOpen:m,activeSubmenuId:g,setActiveSubmenuId:h,size:t,variant:a,triggerRef:f},children:r.jsx(ly,{trigger:e,items:o,side:n,align:l,views:d,...u})})},er=iy;er.Trigger=mi;er.Content=ca;er.Item=gi;er.Divider=hi;const sy=e=>{const{value:o,defaultValue:t="",onChange:a,onChangeComplete:n,isOpen:l,onOpen:s,onClose:d,closeOnSelect:u=!0,maxRecentColors:c=8,showRecentColors:m=!0}=e,[g,h]=p.useState(l??!1),[f,y]=p.useState(o??t),[x,b]=p.useState(""),[k,j]=p.useState([]),w=p.useRef(null),C=p.useRef(null);p.useEffect(()=>{o!==void 0&&y(o)},[o]),p.useEffect(()=>{l!==void 0&&h(l)},[l]),p.useEffect(()=>{if(m){const T=localStorage.getItem("colorPicker-recentColors");if(T)try{j(JSON.parse(T))}catch{}}},[m]),p.useEffect(()=>{const T=A=>{g&&w.current&&C.current&&!w.current.contains(A.target)&&!C.current.contains(A.target)&&E()};return document.addEventListener("mousedown",T),()=>document.removeEventListener("mousedown",T)},[g]);const S=p.useCallback(T=>{m&&j(A=>{const P=A.filter(R=>R!==T),z=[T,...P].slice(0,c);return localStorage.setItem("colorPicker-recentColors",JSON.stringify(z)),z})},[m,c]),v=p.useCallback(()=>{const T=!g;h(T),T?s==null||s():d==null||d()},[g,s,d]),I=p.useCallback(T=>{y(T),S(T),a==null||a(T),n==null||n(T),u&&(h(!1),d==null||d())},[a,n,u,d,S]),F=p.useCallback(T=>{b(T)},[]),W=p.useCallback(()=>{x&&(I(x),b(""))},[x,I]),E=p.useCallback(()=>{h(!1),d==null||d()},[d]);return{isOpen:g,selectedColor:f,recentColors:k,customColor:x,handleToggle:v,handleColorSelect:I,handleCustomColorChange:F,handleCustomColorSubmit:W,handleClose:E,triggerRef:w,dropdownRef:C}},fo={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)",gap:"12px",marginBottom:"16px"},customInput:{marginBottom:"12px"},recentColors:{borderTop:"1px solid color-gray-100",paddingTop:"12px"}},cy={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"}},dy={default:{borderRadius:8},square:{borderRadius:0},rounded:{borderRadius:8},pill:{borderRadius:9999}},uy={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"}},py=[{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"}],my=({id:e,name:o,label:t,placeholder:a="Select a color",helperText:n,views:l={},size:s="md",shape:d="default",variant:u="default",error:c=!1,isDisabled:m=!1,isReadOnly:g=!1,predefinedColors:h=py,showCustomInput:f=!0,showRecentColors:y=!0,isOpen:x,selectedColor:b,recentColors:k,customColor:j,handleToggle:w,handleColorSelect:C,handleCustomColorChange:S,handleCustomColorSubmit:v,handleClose:I,triggerRef:F,dropdownRef:W,onChange:E,onChangeComplete:T,onOpen:A,onClose:P,colorFormat:z,maxRecentColors:R,closeOnSelect:H,defaultValue:M,value:D,...L})=>{const V={...fo.container,...l==null?void 0:l.container},O={...fo.trigger,...cy[s],...dy[d],...uy[u],...c&&{borderColor:"color-red-500"},...m&&{opacity:.6,cursor:"not-allowed"},...!m&&!g&&{_hover:{borderColor:"color-gray-400"}},...l==null?void 0:l.trigger},_={...fo.dropdown,...l==null?void 0:l.dropdown},q={...fo.colorGrid,...l==null?void 0:l.colorGrid},B={...fo.recentColors,...l==null?void 0:l.recentColors},X=b||"color-gray-200";return r.jsxs(i.View,{...V,...L,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:F,onClick:m||g?void 0:w,...O,children:[r.jsxs(i.Horizontal,{alignItems:"center",gap:8,children:[r.jsx(i.View,{width:"24px",height:"24px",borderRadius:"8px",backgroundColor:X,borderWidth:"1px",borderStyle:"solid",borderColor:"color-gray-200"}),r.jsx(i.Text,{color:b?"color-gray-900":"color-gray-500",fontSize:"inherit",children:b||a})]}),!g&&!m&&r.jsx(se,{widthHeight:16,color:"color-gray-500",orientation:x?"up":"down"})]}),x&&r.jsxs(i.View,{ref:W,..._,children:[r.jsx(i.View,{...q,children:h.map(($,U)=>r.jsx(i.View,{width:"36px",height:"36px",borderRadius:"8px",backgroundColor:$.value,borderWidth:"1px",borderStyle:"solid",borderColor:b===$.value?"theme-primary":"transparent",cursor:"pointer",onClick:()=>C($.value),title:$.name,_hover:{transform:"scale(1.05)",borderColor:"color-gray-300"},...l==null?void 0:l.colorSwatch},U))}),f&&r.jsxs(i.View,{...fo.customInput,...l==null?void 0:l.customInput,children:[r.jsxs(i.Horizontal,{gap:8,alignItems:"center",marginBottom:"10px",children:[r.jsx("input",{type:"color",value:j||"#1D4ED8",onChange:$=>{const U=$.target.value;S(U),C(U)},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(ve,{placeholder:"#1D4ED8",value:j,onChange:$=>S($.target.value),onKeyPress:$=>{$.key==="Enter"&&v()},size:"sm",right:j&&r.jsx(i.View,{width:"18px",height:"18px",borderRadius:"6px",backgroundColor:j,borderWidth:"1px",borderStyle:"solid",borderColor:"color-gray-200",cursor:"pointer",onClick:v})})]}),y&&k.length>0&&r.jsxs(i.View,{...B,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:k.map(($,U)=>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:()=>C($),title:$,_hover:{transform:"scale(1.05)",borderColor:"color-gray-300"}},U))})]})]}),n&&r.jsx(i.Text,{fontSize:"11px",lineHeight:"16px",color:c?"color-red-500":"color-gray-500",marginTop:"4px",...l==null?void 0:l.helperText,children:n})]})},gy=e=>{const o=sy(e);return r.jsx(my,{...o,...e})},fi=gy,hy=e=>{const o=Ol(e);return r.jsx(Nl,{...o,...e})},fy=hy,yy=e=>{const o=_l(e);return r.jsx(Bl,{...o,...e})},xy=yy,_a={"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"},cr={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"},by={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"}]},ky=(e,o,t,a,n)=>{const l=o.map(s=>`${s.color} ${s.position||""}`).join(", ");switch(e){case"linear":return`linear-gradient(${t&&_a[t]?_a[t]:t||"to right"}, ${l})`;case"radial":const d=n&&cr[n]?cr[n]:n||"center";return`radial-gradient(${a||"circle"} at ${d}, ${l})`;case"conic":return`conic-gradient(from 0deg at ${n&&cr[n]?cr[n]:n||"center"}, ${l})`;default:return`linear-gradient(to right, ${l})`}},Cy={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)"}}}},Ba={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"}},Sy=({type:e="linear",direction:o="to-right",shape:t="circle",position:a="center",from:n,to:l,colors:s,animate:d=!1,animationDuration:u=3,children:c,views:m,themeMode:g,...h})=>{const f=p.useMemo(()=>s&&s.length>0?s:n&&l?[{color:n,position:"0%"},{color:l,position:"100%"}]:by[e],[s,n,l,e]),y=p.useMemo(()=>{const b=f.map(k=>({...k,color:k.color}));return ky(e,b,o,t,a)},[e,f,o,t,a]),x=p.useMemo(()=>{if(!d)return{};const b=Cy[e];return{...b,transition:b.transition.replace("3s",`${u}s`),animationDuration:`${u}s`,animationIterationCount:"infinite",animationTimingFunction:e==="conic"?"linear":"ease-in-out"}},[d,u,e]);return r.jsx(i.View,{background:y,...Ba.container,...x,...m==null?void 0:m.container,...h,children:c&&r.jsx(i.View,{...Ba.content,...m==null?void 0:m.content,children:c})})},yi=e=>r.jsx(Sy,{...e}),jy=(e=null,o=null)=>{const[t,a]=p.useState(e),[n,l]=p.useState(o),s=u=>n===u,d=u=>{l(c=>c===u?null:u)};return p.useEffect(()=>{const u=m=>{!m.composedPath().some(f=>(f==null?void 0:f.id)==="menubar-content"||(f==null?void 0:f.id)==="menubar-trigger")&&n!==null&&l(null)},c=m=>{m.key==="Escape"&&n!==null&&l(null)};return document.addEventListener("mousedown",u),document.addEventListener("keydown",c),()=>{document.removeEventListener("mousedown",u),document.removeEventListener("keydown",c)}},[n]),{activeMenuId:t,setActiveMenuId:a,openMenuId:n,setOpenMenuId:l,isMenuOpen:s,toggleMenu:d}},xi={sm:{padding:"6px 10px",fontSize:"14px"},md:{padding:"8px 12px",fontSize:"16px"},lg:{padding:"10px 16px",fontSize:"18px"}},wy={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"}},vy={horizontal:{flexDirection:"row"},vertical:{flexDirection:"column"}},hr={active:{backgroundColor:"color-gray-200",fontWeight:"bold"},hover:{backgroundColor:"color-gray-100"},disabled:{opacity:.5,cursor:"not-allowed"}},bi=p.createContext({activeMenuId:null,setActiveMenuId:()=>{},openMenuId:null,setOpenMenuId:()=>{},isMenuOpen:()=>!1,toggleMenu:()=>{},orientation:"horizontal",size:"md",variant:"default",triggerRefs:{current:{}}}),_r=()=>p.useContext(bi),Ty=({value:e,children:o})=>r.jsx(bi.Provider,{value:e,children:o}),ki=({children:e,orientation:o="horizontal",size:t="md",variant:a="default",views:n,...l})=>{const s=o==="horizontal"?i.Horizontal:i.Vertical;return r.jsx(s,{role:"menubar","aria-orientation":o,...vy[o],...wy[a],...n==null?void 0:n.container,...l,children:e})},Ci=({children:e,id:o,disabled:t=!1,views:a})=>{const{orientation:n}=_r(),l=n==="horizontal"?i.Horizontal:i.Vertical;return r.jsx(l,{role:"none",position:"relative",opacity:t?.5:1,pointerEvents:t?"none":"auto",...a==null?void 0:a.menu,children:p.Children.map(e,s=>p.isValidElement(s)?p.cloneElement(s,{...s.props,menuId:o}):s)})},Si=({children:e,menuId:o,disabled:t=!1,views:a})=>{const{activeMenuId:n,setActiveMenuId:l,toggleMenu:s,isMenuOpen:d,size:u,triggerRefs:c}=_r(),m=p.useRef(null),g=n===o,h=d(o);p.useEffect(()=>(m.current&&o&&(c.current[o]=m.current),()=>{o&&delete c.current[o]}),[o,c]);const f=()=>{t||(l(o),s(o))};return r.jsx(i.View,{ref:m,id:"menubar-trigger",role:"menuitem","aria-haspopup":"true","aria-expanded":h,userSelect:"none",display:"flex",alignItems:"center",justifyContent:"space-between",...xi[u],...g?hr.active:{},...t?hr.disabled:{},_hover:t?{}:hr.hover,onClick:f,...a==null?void 0:a.trigger,children:e})},ji=({children:e,menuId:o,views:t})=>{const{isMenuOpen:a,orientation:n,triggerRefs:l}=_r(),s=p.useRef(null),[d,u]=p.useState({x:0,y:0,placement:n==="horizontal"?"bottom":"right"}),c=a(o);if(p.useEffect(()=>{if(c&&s.current&&o&&l.current[o]){const g=s.current.getBoundingClientRect(),h=l.current[o].getBoundingClientRect(),f=Math.max(g.width||200,200),y=Math.max(g.height||150,150),x=window.innerWidth,b=window.innerHeight,k={top:h.top,right:x-h.right,bottom:b-h.bottom,left:h.left},j=n==="horizontal"?[{placement:"bottom",space:k.bottom,fits:k.bottom>=y+8,x:h.left,y:h.bottom+8},{placement:"top",space:k.top,fits:k.top>=y+8,x:h.left,y:h.top-y-8},{placement:"right",space:k.right,fits:k.right>=f+8,x:h.right+8,y:h.top},{placement:"left",space:k.left,fits:k.left>=f+8,x:h.left-f-8,y:h.top}]:[{placement:"right",space:k.right,fits:k.right>=f+8,x:h.right+8,y:h.top},{placement:"left",space:k.left,fits:k.left>=f+8,x:h.left-f-8,y:h.top},{placement:"bottom",space:k.bottom,fits:k.bottom>=y+8,x:h.left,y:h.bottom+8},{placement:"top",space:k.top,fits:k.top>=y+8,x:h.left,y:h.top-y-8}],w=j.find(I=>I.fits);if(w){u({x:w.x,y:w.y,placement:w.placement});return}const C=j.reduce((I,F)=>F.space>I.space?F:I);let S=C.x,v=C.y;S+f>x&&(S=x-f-8),S<8&&(S=8),v+y>b&&(v=b-y-8),v<8&&(v=8),u({x:S,y:v,placement:C.placement})}},[c,n,o,l]),!c)return null;const m={position:"fixed",left:d.x,top:d.y,zIndex:1e3};return r.jsx(i.View,{ref:s,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})},wi=({children:e,icon:o,disabled:t=!1,onClick:a,views:n})=>{const{size:l}=_r(),s=()=>{t||!a||a()};return r.jsxs(i.View,{role:"menuitem",cursor:t?"not-allowed":"pointer",userSelect:"none",display:"flex",alignItems:"center",opacity:t?.5:1,...xi[l],_hover:t?{}:hr.hover,onClick:s,...n==null?void 0:n.item,children:[o&&r.jsx(i.View,{marginRight:8,...n==null?void 0:n.icon,children:o}),e]})},vi=({views:e})=>r.jsx(i.View,{role:"separator",height:"1px",backgroundColor:"color-gray-200",margin:"4px 0",...e==null?void 0:e.separator}),Iy=({items:e,orientation:o,size:t,variant:a,views:n,themeMode:l})=>r.jsx(ki,{orientation:o,size:t,variant:a,views:n,children:e.map(s=>r.jsxs(Ci,{id:s.id,disabled:s.disabled,views:n,children:[r.jsxs(Si,{menuId:s.id,views:n,children:[s.icon&&r.jsx(i.View,{marginRight:8,...n==null?void 0:n.icon,children:s.icon}),s.label]}),s.items&&s.items.length>0&&r.jsx(ji,{menuId:s.id,views:n,children:s.items.map((d,u)=>d.separator?r.jsx(vi,{views:n},`separator-${u}`):r.jsx(wi,{id:d.id,icon:d.icon,disabled:d.disabled,onClick:d.onClick,views:n,children:d.label},d.id))})]},s.id))}),Fy=({items:e,orientation:o="horizontal",size:t="md",variant:a="default",defaultActiveMenuId:n=null,defaultOpenMenuId:l=null,views:s,...d})=>{const{activeMenuId:u,setActiveMenuId:c,openMenuId:m,setOpenMenuId:g,isMenuOpen:h,toggleMenu:f}=jy(n,l),y=p.useRef({});return r.jsx(Ty,{value:{activeMenuId:u,setActiveMenuId:c,openMenuId:m,setOpenMenuId:g,isMenuOpen:h,toggleMenu:f,orientation:o,size:t,variant:a,triggerRefs:y},children:r.jsx(Iy,{items:e,orientation:o,size:t,variant:a,views:s,...d})})},co=Fy;co.Root=ki;co.Menu=Ci;co.Trigger=Si;co.Content=ji;co.Item=wi;co.Separator=vi;const Ry=(e,o,t)=>{const[a,n]=p.useState([]);return p.useEffect(()=>{n((()=>{const s=[];if(o<=t)for(let d=1;d<=o;d++)s.push(d);else{s.push(1);let d=Math.max(2,e-Math.floor((t-2)/2)),u=Math.min(o-1,d+t-3);u>=o-1&&(u=o-1,d=Math.max(2,u-(t-3))),d>2&&s.push("...");for(let c=d;c<=u;c++)s.push(c);u<o-1&&s.push("..."),s.push(o)}return s})())},[e,o,t]),{visiblePageNumbers:a}},yo={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"}}}},Lo={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"}}},_o={rounded:{borderRadius:8},square:{borderRadius:"0px"},circular:{borderRadius:"50%"}},zy={backgroundColor:"theme-primary",color:"color-white",transition:"all 0.2s ease-in-out",_hover:{backgroundColor:"theme-primary",opacity:.9}},dr={opacity:.5,cursor:"not-allowed",transition:"all 0.2s ease-in-out",_hover:{backgroundColor:"transparent"}},My=({currentPage:e,totalPages:o,onPageChange:t,pageSize:a=10,pageSizeOptions:n=[{label:"10 / page",value:10},{label:"20 / page",value:20},{label:"50 / page",value:50},{label:"100 / page",value:100}],onPageSizeChange:l,showPageSizeSelector:s=!1,showPageInfo:d=!0,maxPageButtons:u=5,showFirstLastButtons:c=!1,size:m="md",variant:g="default",shape:h="rounded",visiblePageNumbers:f=[],views:y,...x})=>{const b=w=>{w<1||w>o||w===e||t(w)},k=w=>{l&&l(Number(w.target.value))},j=(w,C)=>{if(w==="...")return r.jsx(i.View,{display:"flex",alignItems:"center",justifyContent:"center",...yo[m],...y==null?void 0:y.ellipsis,children:"..."},`ellipsis-${C}`);const S=w===e;return r.jsx(i.View,{as:"button",display:"flex",alignItems:"center",justifyContent:"center",cursor:S?"default":"pointer",...yo[m],...Lo[g],..._o[h],...S?zy:{},onClick:()=>b(w),"aria-label":`Page ${w}`,"aria-current":S?"page":void 0,...S?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,...x,children:[c&&r.jsxs(i.View,{as:"button",display:"flex",alignItems:"center",justifyContent:"center",cursor:e===1?"not-allowed":"pointer",...yo[m],...Lo[g],..._o[h],...e===1?dr:{},onClick:()=>b(1),"aria-label":"First page",disabled:e===1,...y==null?void 0:y.navigationButton,children:[r.jsx(se,{orientation:"left",widthHeight:16}),r.jsx(se,{orientation:"left",widthHeight:16,marginLeft:"-8px"})]}),r.jsx(i.View,{as:"button",display:"flex",alignItems:"center",justifyContent:"center",cursor:e===1?"not-allowed":"pointer",...yo[m],...Lo[g],..._o[h],...e===1?dr:{},onClick:()=>b(e-1),"aria-label":"Previous page",disabled:e===1,...y==null?void 0:y.navigationButton,children:r.jsx(se,{orientation:"left",widthHeight:16})}),f.map((w,C)=>j(w,C)),r.jsx(i.View,{as:"button",display:"flex",alignItems:"center",justifyContent:"center",cursor:e===o?"not-allowed":"pointer",...yo[m],...Lo[g],..._o[h],...e===o?dr:{},onClick:()=>b(e+1),"aria-label":"Next page",disabled:e===o,...y==null?void 0:y.navigationButton,children:r.jsx(se,{orientation:"right",widthHeight:16})}),c&&r.jsxs(i.View,{as:"button",display:"flex",alignItems:"center",justifyContent:"center",cursor:e===o?"not-allowed":"pointer",...yo[m],...Lo[g],..._o[h],...e===o?dr:{},onClick:()=>b(o),"aria-label":"Last page",disabled:e===o,...y==null?void 0:y.navigationButton,children:[r.jsx(se,{orientation:"right",widthHeight:16}),r.jsx(se,{orientation:"right",widthHeight:16,marginLeft:"-8px"})]}),d&&r.jsxs(i.Text,{marginLeft:16,color:"color-gray-600",...y==null?void 0:y.pageInfo,children:["Page ",e," of ",o]}),s&&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:a,onChange:k,...y==null?void 0:y.pageSizeSelector,children:n.map(w=>r.jsx("option",{value:w.value,children:w.label},w.value))})]})},Wy=({currentPage:e,totalPages:o,onPageChange:t,pageSize:a=10,pageSizeOptions:n,onPageSizeChange:l,showPageSizeSelector:s=!1,showPageInfo:d=!0,maxPageButtons:u=5,showFirstLastButtons:c=!1,size:m="md",variant:g="default",shape:h="rounded",views:f,...y})=>{const{visiblePageNumbers:x}=Ry(e,o,u);return r.jsx(My,{currentPage:e,totalPages:o,onPageChange:t,pageSize:a,pageSizeOptions:n,onPageSizeChange:l,showPageSizeSelector:s,showPageInfo:d,maxPageButtons:u,showFirstLastButtons:c,size:m,variant:g,shape:h,visiblePageNumbers:x,views:f,...y})},Ti=Wy,Hy=e=>typeof e=="string"&&(/^(#|rgb\(|rgba\(|hsl\(|hsla\(|var\()/.test(e)||["black","currentColor","inherit","transparent","white"].includes(e)),Py=p.memo(({shape:e="linear",value:o=0,max:t=100,color:a="theme-primary",backgroundColor:n="color-gray-200",height:l,size:s,radius:d=4,strokeWidth:u=10,showLabel:c=!1,labelColor:m="color-black-primary",animated:g=!0,animationDuration:h="0.5s",views:f,themeMode:y,...x})=>{var E;const{getColor:b,themeMode:k}=i.useTheme(),j=y||k,C=Math.min(t,Math.max(0,o))/t*100,S=T=>Hy(T)?T:b(T,{themeMode:j}),v=p.useMemo(()=>S(n),[b,n,j]),I=p.useMemo(()=>S(a),[b,a,j]);if(e==="circle"){const T=s||(typeof l=="number"?l:100),A=(T-u)/2,P=2*Math.PI*A,z=P-C/100*P;return r.jsxs(i.View,{width:T,height:T,position:"relative",display:"flex",alignItems:"center",justifyContent:"center",...f==null?void 0:f.container,...x,children:[r.jsxs("svg",{width:T,height:T,viewBox:`0 0 ${T} ${T}`,style:{transform:"rotate(-90deg)"},children:[r.jsx("circle",{cx:T/2,cy:T/2,r:A,stroke:v,strokeWidth:u,fill:"transparent",...f==null?void 0:f.track}),r.jsx("circle",{cx:T/2,cy:T/2,r:A,stroke:I,strokeWidth:u,strokeDasharray:P,strokeDashoffset:z,strokeLinecap:"round",fill:"transparent",style:{transition:g?`stroke-dashoffset ${h} ease-in-out`:"none"},...f==null?void 0:f.indicator})]}),c&&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:`${T*.2}px`,fontWeight:"bold",...f==null?void 0:f.text,children:[Math.round(C),"%"]})})]})}const F=l||8,W={backgroundColor:v,...((E=f==null?void 0:f.container)==null?void 0:E.style)||{},...x.style||{}};return r.jsxs(i.View,{role:"progressbar","aria-valuenow":o,"aria-valuemin":0,"aria-valuemax":t,width:"100%",height:F,borderRadius:d,overflow:"hidden",position:"relative",display:"flex",alignItems:"center",justifyContent:"center",...f==null?void 0:f.container,...x,style:W,children:[r.jsx("div",{style:{height:"100%",backgroundColor:I,borderRadius:typeof d=="number"?`${d}px`:d,position:"absolute",left:0,top:0,bottom:0,width:`${C}%`,transition:g?`width ${h} ease-in-out`:"none",...f==null?void 0:f.bar}}),c&&r.jsxs(i.Text,{color:m,fontSize:typeof F=="number"&&F>16?`${F*.6}px`:"10px",fontWeight:"bold",position:"relative",zIndex:1,...f==null?void 0:f.text,children:[Math.round(C),"%"]})]})}),Ay=e=>{const o=me("progress",e);return r.jsx(Py,{...o})},Ii=Ay,Vy=e=>({solid:"solid",dashed:"dashed",dotted:"dotted"}),Ey=Vy(),Dy={thin:"1px",medium:"2px",thick:"4px"},Bo={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"}},$y=e=>typeof e=="string"&&(/^(#|rgb\(|rgba\(|hsl\(|hsla\(|var\()/.test(e)||["black","currentColor","inherit","transparent","white"].includes(e)),Ly=({orientation:e="horizontal",variant:o="solid",thickness:t="thin",color:a,spacing:n="0px",label:l,decorative:s=!1,views:d,themeMode:u,...c})=>{const{themeMode:m}=i.useTheme(),g=a||"color-gray-200",h=Ey[o],f=Dy[t],y=s?{"aria-hidden":!0}:{role:"separator","aria-orientation":e},x=$y(g)?{style:{borderColor:g}}:{borderColor:g};return l&&e==="horizontal"?r.jsxs(i.Horizontal,{alignItems:"center",justifyContent:"center",width:"100%",padding:n,...y,...c,children:[r.jsx(i.View,{height:"0px",flexGrow:1,borderTop:`${f} ${h}`,...x,...Bo.container,...d==null?void 0:d.container}),r.jsx(i.Text,{...Bo.label,...d==null?void 0:d.label,children:l}),r.jsx(i.View,{height:"0px",flexGrow:1,borderTop:`${f} ${h}`,...x,...Bo.container,...d==null?void 0:d.container})]}):e==="horizontal"?r.jsx(i.View,{height:"0px",width:"100%",borderTop:`${f} ${h}`,padding:n,...x,...Bo.container,...y,...d==null?void 0:d.container,...c}):r.jsx(i.View,{width:"0px",height:"100%",borderLeft:`${f} ${h}`,padding:n,...x,...Bo.container,...y,...d==null?void 0:d.container,...c})},Fi=e=>{const o=me("separator",e);return r.jsx(Ly,{...o})},Rr=Fi,_y=Fi,By={xs:12,sm:14,md:16,lg:18,xl:20},Oy=({isSupported:e,isSharing:o,onShare:t,label:a,children:n,icon:l,size:s,isDisabled:d,isLoading:u,iconPosition:c,disableWhenUnsupported:m=!0,...g})=>{const h=s??"md",f=l??r.jsx(wn,{widthHeight:By[h],strokeWidth:1.5,filled:!1}),y=!!d||!e&&m,x=!!u||o;return r.jsx(le,{...g,size:h,icon:f,iconPosition:c??"left",isDisabled:y,isLoading:x,onClick:t,children:n??a??"Share"})},Oa=()=>typeof navigator>"u"?void 0:navigator,Ny=(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},qy=e=>{if(typeof e=="object"&&e!==null&&"name"in e)return String(e.name)},Uy=e=>{const{shareData:o,onClick:t,onUnsupported:a,onShareStart:n,onShareSuccess:l,onShareCancel:s,onShareError:d}=e,[u,c]=p.useState(!1),m=p.useMemo(()=>Ny(Oa(),o),[o]),g=p.useCallback((...h)=>{t==null||t(...h);const f=Oa();if(!f||typeof f.share!="function"){a==null||a();return}if(!u){if(typeof f.canShare=="function")try{if(!f.canShare(o)){a==null||a();return}}catch(y){d==null||d(y);return}c(!0),n==null||n();try{f.share(o).then(()=>{l==null||l()}).catch(y=>{if(qy(y)==="AbortError"){s==null||s();return}d==null||d(y)}).finally(()=>{c(!1)})}catch(y){c(!1),d==null||d(y)}}},[u,t,s,d,n,l,a,o]);return{isSupported:m,isSharing:u,handleShare:g}},Gy=e=>{const{isSupported:o,isSharing:t,handleShare:a}=Uy(e),{shareData:n,onShareStart:l,onShareSuccess:s,onShareCancel:d,onShareError:u,onUnsupported:c,onClick:m,...g}=e;return r.jsx(Oy,{...g,isSupported:o,isSharing:t,onShare:a})},Ri=Gy,Yy=({label:e,status:o="default",views:t,themeMode:a,...n})=>{const{themeMode:l}=i.useTheme(),s=Pn();return r.jsxs(i.Horizontal,{alignItems:"center",gap:8,role:"status-indicator",...t==null?void 0:t.container,...n,children:[r.jsx(i.View,{role:"status-dot",width:"8px",height:"8px",borderRadius:"50%",...s[o].indicator,...t==null?void 0:t.indicator}),e&&r.jsx(i.Text,{role:"status-label",fontSize:"14px",lineHeight:"20px",...s[o].label,...t==null?void 0:t.label,children:e})]})},fr=e=>{const o=me("status",e);return r.jsx(Yy,{...o})},Xy=(e=!0,o,t,a)=>{const{on:n}=i.useResponsive(),l=n("mobile"),[s,d]=p.useState(o!==void 0?o:e);return p.useEffect(()=>{o!==void 0&&d(o)},[o]),{isExpanded:s,toggleExpanded:()=>{const g=!s;d(g),t&&t(g)},expand:()=>{s||(d(!0),t&&t(!0))},collapse:()=>{s&&(d(!1),t&&t(!1))},isMobile:l}},Ky={sm:{expandedWidth:"240px",collapsedWidth:"64px"},md:{expandedWidth:"280px",collapsedWidth:"72px"},lg:{expandedWidth:"320px",collapsedWidth:"80px"},xl:{expandedWidth:"360px",collapsedWidth:"88px"}},Jy=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"}}),Qy=Jy(),Zy={left:{left:0,borderRightWidth:"1px",borderRightStyle:"solid",borderRightColor:"color-gray-200"},right:{right:0,borderLeftWidth:"1px",borderLeftStyle:"solid",borderLeftColor:"color-gray-200"}},ex={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)"}},ox={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)"},zi=p.createContext({isExpanded:!0,toggleExpanded:()=>{},expand:()=>{},collapse:()=>{},position:"left",size:"md",variant:"default"}),Br=()=>p.useContext(zi),rx=({value:e,children:o})=>r.jsx(zi.Provider,{value:e,children:o}),tx=({children:e,showToggleButton:o=!0,views:t,...a})=>{const{isExpanded:n,toggleExpanded:l,position:s}=Br();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,...a,children:n?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":n?"Collapse sidebar":"Expand sidebar",...t==null?void 0:t.toggleButton,children:r.jsx(se,{orientation:s==="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":n?"Collapse sidebar":"Expand sidebar",...t==null?void 0:t.toggleButton,children:r.jsx(se,{orientation:s==="left"?"right":"left",widthHeight:16,...t==null?void 0:t.toggleButtonIcon})})})})},ax=({children:e,views:o,...t})=>{const{isExpanded:a}=Br();return r.jsx(i.View,{flex:"1",width:"100%",overflowY:"auto",overflowX:"hidden",padding:a?"16px":"8px",...o==null?void 0:o.content,...t,children:e})},nx=({children:e,views:o,...t})=>{const{isExpanded:a}=Br();return r.jsx(i.View,{width:"100%",padding:"16px",borderTopWidth:"1px",borderTopStyle:"solid",borderTopColor:"color-gray-200",...o==null?void 0:o.footer,...t,children:a?e:null})},lx=({children:e,position:o="left",size:t="md",variant:a="default",fixed:n=!1,hasBackdrop:l=!0,expandedWidth:s,collapsedWidth:d,breakpoint:u,breakpointBehavior:c="overlay",elevation:m="none",transitionPreset:g="normal",ariaLabel:h="Sidebar navigation",showToggleButton:f,toggleExpanded:y,expand:x,isExpanded:b,isMobile:k,collapse:j,views:w,themeMode:C,...S})=>{const v=Ky[t],I=b?s||v.expandedWidth:d||v.collapsedWidth,F=!k||k&&c!=="hide",W=n||k&&c==="overlay"?"fixed":"relative",E=l&&k&&b&&c==="overlay";return r.jsxs(r.Fragment,{children:[E&&r.jsx(i.View,{position:"fixed",top:0,left:0,width:"100vw",height:"100vh",backgroundColor:"color-blackAlpha-500",zIndex:998,onClick:j,...w==null?void 0:w.backdrop}),F&&r.jsx(i.Vertical,{position:W,top:0,height:"100vh",width:I,zIndex:999,transition:ox[g],transform:k&&c==="overlay"&&!b?`translateX(${o==="left"?"-100%":"100%"})`:"translateX(0)",role:"navigation","aria-label":h,...Qy[a],...Zy[o],...ex[m],...w==null?void 0:w.container,...S,children:p.Children.map(e,T=>T)})]})},ix=({children:e,position:o="left",size:t="md",variant:a="default",defaultExpanded:n=!0,expanded:l,onExpandedChange:s,fixed:d=!1,hasBackdrop:u=!0,showToggleButton:c=!0,expandedWidth:m,collapsedWidth:g,breakpoint:h=768,breakpointBehavior:f="overlay",views:y,...x})=>{const{isExpanded:b,toggleExpanded:k,expand:j,collapse:w,isMobile:C}=Xy(n,l,s);return r.jsx(rx,{value:{isExpanded:b,toggleExpanded:k,expand:j,collapse:w,position:o,size:t,variant:a,views:y},children:r.jsx(lx,{position:o,size:t,variant:a,fixed:d,hasBackdrop:u,showToggleButton:c,expandedWidth:m,collapsedWidth:g,breakpoint:h,breakpointBehavior:f,isExpanded:b,isMobile:C,toggleExpanded:k,expand:j,collapse:w,views:y,...x,children:e})})},or=ix;or.Header=tx;or.Content=ax;or.Footer=nx;or.useContext=Br;const sx=()=>({getItem:e=>{try{return localStorage.getItem(`resizable-${e}`)}catch(o){return console.warn("Failed to access localStorage:",o),null}},setItem:(e,o)=>{try{localStorage.setItem(`resizable-${e}`,o)}catch(t){console.warn("Failed to write to localStorage:",t)}}}),cx=(e,o,t,a=50,n=1/0,l=!1,s,d,u=10)=>{const[c,m]=p.useState(!1),[g,h]=p.useState([]),f=p.useRef(null),y=p.useRef(null),x=p.useRef(0),b=p.useRef([]),k=p.useRef(d||(typeof window<"u"?sx():null)),j=p.useCallback(()=>f.current?e==="horizontal"?f.current.offsetWidth:f.current.offsetHeight:0,[e]),w=p.useCallback(()=>{if(!s||!k.current)return null;const R=k.current.getItem(s);if(!R)return null;try{const H=JSON.parse(R);return Array.isArray(H.sizes)?H.sizes:null}catch(H){return console.warn("Failed to parse saved panel sizes:",H),null}},[s]),C=p.useCallback(()=>{if(!s||!k.current||g.length===0)return;const R=g.map(H=>({id:H.id,size:H.size,collapsed:H.collapsed||!1}));k.current.setItem(s,JSON.stringify({sizes:R}))},[s,g]),S=p.useCallback((R,H,M,D,L)=>{h(V=>V.some(O=>O.id===R)?V:[...V,{id:R,size:H,minSize:M??a,maxSize:D??n,collapsible:L??l,collapsed:!1}])},[a,n,l]),v=p.useCallback(R=>{h(H=>H.filter(M=>M.id!==R))},[]),I=p.useCallback(R=>{const H=g.find(M=>M.id===R);return H?H.size:0},[g]),F=p.useCallback((R,H)=>{h(M=>M.map(D=>D.id===R?{...D,size:H}:D))},[]),W=p.useCallback(R=>{const H=g.find(M=>M.id===R);return H?!!H.collapsed:!1},[g]),E=p.useCallback(R=>{h(H=>{const M=H.findIndex(O=>O.id===R);if(M===-1)return H;const D=H[M];if(!D.collapsible)return H;const L={...D,collapsed:!D.collapsed},V=[...H];return V[M]=L,V})},[]),T=p.useCallback((R,H)=>{y.current=R,x.current=H,b.current=g.map(M=>M.size),m(!0)},[g]),A=p.useCallback(R=>{if(!c||!y.current)return;const H=y.current,M=R-x.current;let D=-1;const L=H.match(/\d+$/);if(L&&(D=parseInt(L[0],10)-1),D===-1&&g.length>=2&&(D=0),D<0||D>=g.length-1)return;const V=g[D],O=g[D+1];if(V.collapsed||O.collapsed)return;let _=b.current[D]+M,q=b.current[D+1]-M;_=Math.max(V.minSize??a,Math.min(V.maxSize??n,_)),q=Math.max(O.minSize??a,Math.min(O.maxSize??n,q)),h(B=>B.map((X,$)=>$===D?{...X,size:_}:$===D+1?{...X,size:q}:X))},[c,g,e,a,n]),P=p.useCallback(()=>{c&&t&&t(g.map(R=>R.size)),y.current=null,m(!1),s&&C()},[c,g,t,s,C]),z=p.useCallback(R=>{if(!c||!y.current)return;const H=y.current;let M=-1;const D=H.match(/\d+$/);if(D&&(M=parseInt(D[0],10)-1),M===-1&&g.length>=2&&(M=0),M<0||M>=g.length-1)return;let L=0;e==="horizontal"?(R.key==="ArrowLeft"&&(L=-u),R.key==="ArrowRight"&&(L=u),R.key==="Home"&&(L=-100),R.key==="End"&&(L=100)):(R.key==="ArrowUp"&&(L=-u),R.key==="ArrowDown"&&(L=u),R.key==="Home"&&(L=-100),R.key==="End"&&(L=100)),L!==0&&(R.preventDefault(),A(x.current+L)),R.key==="Escape"&&(h(V=>V.map((O,_)=>({...O,size:b.current[_]}))),P())},[c,g,e,A,P,u]);return p.useEffect(()=>{const R=D=>{if(!c)return;const L=e==="horizontal"?D.clientX:D.clientY;A(L)},H=D=>{if(!c||D.touches.length===0)return;const L=D.touches[0],V=e==="horizontal"?L.clientX:L.clientY;A(V)},M=()=>{c&&P()};return c&&(document.addEventListener("mousemove",R),document.addEventListener("touchmove",H),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",R),document.removeEventListener("touchmove",H),document.removeEventListener("mouseup",M),document.removeEventListener("touchend",M),document.removeEventListener("keydown",z),document.body.style.cursor="",document.body.style.userSelect=""}},[c,e,A,P,z]),p.useEffect(()=>{if(g.length!==0){if(s){const R=w();if(R){h(H=>H.map(M=>{const D=R.find(L=>L.id===M.id);return D?{...M,size:D.size,collapsed:D.collapsed||!1}:M}));return}}if(!o){const H=j()/g.length;h(M=>M.map(D=>({...D,size:H})))}}},[g.length,o,j,s,w]),p.useEffect(()=>{if(!o||o.length===0||g.length===0)return;const R=j(),H=o.map(M=>typeof M=="string"&&M.endsWith("%")?parseFloat(M)/100*R:typeof M=="number"?M:parseFloat(M));h(M=>M.map((D,L)=>({...D,size:L<H.length?H[L]:D.size})))},[o,g.length,j]),p.useEffect(()=>{g.length>0&&s&&!c&&C()},[g,s,c,C]),{isResizing:c,setIsResizing:m,containerRef:f,panels:g,registerPanel:S,unregisterPanel:v,getPanelSize:I,setPanelSize:F,isPanelCollapsed:W,togglePanelCollapse:E,startResize:T,onResize:A,endResize:P}},dx={horizontal:{flexDirection:"row"},vertical:{flexDirection:"column"}},ux=(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],px=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"}}}),mx=px(),ur={horizontal:{width:"2px",height:"20px",backgroundColor:"color-gray-400",margin:"0 1px"},vertical:{width:"20px",height:"2px",backgroundColor:"color-gray-400",margin:"1px 0"}},Mi=p.createContext({orientation:"horizontal",size:"md",variant:"default",isResizing:!1,setIsResizing:()=>{},registerPanel:()=>{},unregisterPanel:()=>{},getPanelSize:()=>0,setPanelSize:()=>{},isPanelCollapsed:()=>!1,togglePanelCollapse:()=>{},startResize:()=>{},onResize:()=>{},endResize:()=>{}}),Wi=()=>p.useContext(Mi),gx=({value:e,children:o})=>r.jsx(Mi.Provider,{value:e,children:o}),hx=({children:e,id:o,defaultSize:t,minSize:a,maxSize:n,collapsible:l,defaultCollapsed:s,onCollapseChange:d,views:u,...c})=>{const{orientation:m,registerPanel:g,unregisterPanel:h,getPanelSize:f,isPanelCollapsed:y,togglePanelCollapse:x}=Wi(),b=typeof t=="string"&&t.endsWith("%")?0:typeof t=="number"?t:0;p.useEffect(()=>(g(o,b,a,n,l),()=>h(o)),[o,b,a,n,l,g,h]);const k=f(o),j=y(o);return p.useEffect(()=>{d&&j!==void 0&&d(j)},[j,d]),p.useEffect(()=>{l&&s&&!j&&x(o)},[o,l,s,j,x]),j?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:()=>x(o),"aria-label":`Expand panel ${o}`,role:"button",tabIndex:0,...u==null?void 0:u.collapsedPanel,...c}):r.jsx(i.View,{flex:k>0?"0 0 auto":"1",width:m==="horizontal"?`${k}px`:"100%",height:m==="vertical"?`${k}px`:"100%",overflow:"auto",...u==null?void 0:u.panel,...c,children:e})},fx=({id:e,position:o="both",disabled:t=!1,withVisualIndicator:a=!0,withCollapseButton:n=!1,collapseTarget:l,views:s,...d})=>{const{orientation:u,size:c,variant:m,startResize:g,isPanelCollapsed:h,togglePanelCollapse:f}=Wi(),x=(()=>{if(l)return l;const S=e.match(/\d+$/);if(!S)return"";const v=parseInt(S[0],10);return isNaN(v)?"":`panel${v}`})(),b=h(x),k=S=>{if(t)return;S.preventDefault();const v=u==="horizontal"?S.clientX:S.clientY;g(e,v)},j=S=>{if(t||S.touches.length===0)return;S.preventDefault();const v=S.touches[0],I=u==="horizontal"?v.clientX:v.clientY;g(e,I)},w=S=>{t||(S.key==="Enter"||S.key===" ")&&(S.preventDefault(),g(e,0))},C=S=>{S.stopPropagation(),x&&f(x)};return r.jsxs(i.View,{role:"separator","aria-orientation":u,"aria-valuemin":0,"aria-valuemax":100,tabIndex:t?-1:0,cursor:u==="horizontal"?"col-resize":"row-resize",display:"flex",alignItems:"center",justifyContent:"center",position:"relative",...ux(c,u),...mx[m],onMouseDown:k,onTouchStart:j,onKeyDown:w,opacity:t?.5:1,pointerEvents:t?"none":"auto",...s==null?void 0:s.handle,...d,children:[a&&r.jsx(i.View,{display:"flex",alignItems:"center",justifyContent:"center",width:u==="horizontal"?"100%":"auto",height:u==="vertical"?"100%":"auto",pointerEvents:"none",...s==null?void 0:s.handleIcon,children:u==="horizontal"?r.jsxs(i.Horizontal,{gap:1,children:[r.jsx(i.View,{...ur.horizontal}),r.jsx(i.View,{...ur.horizontal})]}):r.jsxs(i.Vertical,{gap:1,children:[r.jsx(i.View,{...ur.vertical}),r.jsx(i.View,{...ur.vertical})]})}),n&&x&&r.jsx(i.View,{position:"absolute",top:u==="horizontal"?"-20px":"50%",left:u==="horizontal"?"50%":"-20px",transform:u==="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:C,"aria-label":b?`Expand panel ${x}`:`Collapse panel ${x}`,role:"button",tabIndex:0,pointerEvents:"auto",_hover:{backgroundColor:"color-gray-200"},...s==null?void 0:s.collapseIcon,children:r.jsx(i.View,{width:"8px",height:"8px",display:"flex",alignItems:"center",justifyContent:"center",children:b?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"})})})]})},yx=({children:e,orientation:o="horizontal",size:t="md",variant:a="default",defaultSizes:n,minSize:l,maxSize:s,collapsible:d=!1,containerRef:u,autoSaveId:c,keyboardResizeBy:m,onLayout:g,views:h,...f})=>{const y=o==="horizontal"?i.Horizontal:i.Vertical;return r.jsx(y,{ref:u,width:"100%",height:"100%",position:"relative",overflow:"hidden",...dx[o],...h==null?void 0:h.container,...f,children:e})},xx=({children:e,orientation:o="horizontal",size:t="md",variant:a="default",defaultSizes:n,onSizesChange:l,minSize:s=50,maxSize:d,collapsible:u=!1,autoSaveId:c,storage:m,keyboardResizeBy:g=10,views:h,...f})=>{const{isResizing:y,setIsResizing:x,containerRef:b,registerPanel:k,unregisterPanel:j,getPanelSize:w,setPanelSize:C,isPanelCollapsed:S,togglePanelCollapse:v,startResize:I,onResize:F,endResize:W}=cx(o,n,l,s,d,u,c,m,g);return r.jsx(gx,{value:{orientation:o,size:t,variant:a,isResizing:y,setIsResizing:x,registerPanel:k,unregisterPanel:j,getPanelSize:w,setPanelSize:C,isPanelCollapsed:S,togglePanelCollapse:v,startResize:I,onResize:F,endResize:W},children:r.jsx(yx,{orientation:o,size:t,variant:a,defaultSizes:n,minSize:s,maxSize:d,collapsible:u,autoSaveId:c,keyboardResizeBy:g,containerRef:b,views:h,...f,children:e})})},da=xx;da.Panel=hx;da.Handle=fx;const pr={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"}}},bx={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"}},kx=()=>Math.random().toString(36).substring(2,9);let xo=new Map;const rr=zr.create(e=>({toasts:[],add:(o,t,a,n={})=>{const l=n.id||kx(),s={id:l,variant:o,title:t,description:a,createdAt:Date.now(),isVisible:!0,...n};if(e(d=>({toasts:[...d.toasts,s]})),n.duration!==0){const d=n.duration||5e3,u=setTimeout(()=>{rr.getState().remove(l)},d);xo.set(l,u)}return l},remove:o=>{e(t=>({toasts:t.toasts.map(a=>a.id===o?{...a,isVisible:!1}:a)})),xo.has(o)&&(clearTimeout(xo.get(o)),xo.delete(o)),setTimeout(()=>{e(t=>({toasts:t.toasts.filter(a=>a.id!==o)}))},300)},removeAll:()=>{xo.forEach(clearTimeout),xo.clear(),e(o=>({toasts:o.toasts.map(t=>({...t,isVisible:!1}))})),setTimeout(()=>{e({toasts:[]})},300)}})),uo=(e,o,t,a)=>rr.getState().add(e,o,t,a),Hi=(e,o,t)=>uo("info",e,o,t),Pi=(e,o,t)=>uo("success",e,o,t),Ai=(e,o,t)=>uo("warning",e,o,t),Vi=(e,o,t)=>uo("error",e,o,t),Ei=e=>{rr.getState().remove(e)},Di=()=>{rr.getState().removeAll()},$i=({variant:e,title:o,description:t,onClose:a,isClosable:n=!0,action:l,actionText:s,showIcon:d=!0,theme:u,views:c,render:m,icon:g,id:h,isVisible:f=!0,themeMode:y})=>{const x=u??pr,b=()=>{var C,S;if(g!==void 0)return g;const w=e?(S=(C=pr[e])==null?void 0:C.icon)==null?void 0:S.color:pr.info.icon.color;switch(e){case"info":return r.jsx(Ge,{widthHeight:20,color:w});case"success":return r.jsx(Sn,{widthHeight:20,color:w});case"warning":return r.jsx(Ge,{widthHeight:20,color:w,orientation:"down"});case"error":return r.jsx(Wr,{widthHeight:20,color:w});default:return r.jsx(Ge,{widthHeight:20,color:pr.info.icon.color})}};if(m)return r.jsx(r.Fragment,{children:m({id:h||"",onClose:a})});const k=e==="error"?"alert":"status",j=e==="error"||e==="warning"?"assertive":"polite";return r.jsxs(i.Horizontal,{role:k,"aria-live":j,"aria-atomic":"true","data-state":f?"open":"closed",gap:12,width:"100%",maxWidth:"380px",borderWidth:"1px",borderStyle:"solid",borderRadius:"12px",padding:"12px 14px",alignItems:"flex-start",position:"relative",backgroundColor:x[e].container.backgroundColor,borderColor:x[e].container.border,boxShadow:"0 12px 32px rgba(15, 23, 42, 0.12)",opacity:f?1:0,transform:f?"translateY(0)":"translateY(4px)",transition:"opacity 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease",...c==null?void 0:c.container,children:[d&&r.jsx(i.View,{marginTop:"2px",...c==null?void 0:c.icon,children:b()}),r.jsxs(i.Vertical,{gap:4,flex:"1",children:[r.jsx(i.Text,{size:"sm",lineHeight:"20px",fontWeight:"600",color:x[e].content.color,backgroundColor:x[e].container.backgroundColor,...c==null?void 0:c.title,children:o}),t&&r.jsx(i.Text,{size:"xs",lineHeight:"18px",color:x[e].content.color,fontWeight:"400",backgroundColor:x[e].container.backgroundColor,...c==null?void 0:c.description,children:t}),l&&s&&r.jsx(i.Text,{size:"sm",fontWeight:"600",marginTop:"6px",cursor:"pointer",color:x[e].content.color,backgroundColor:x[e].container.backgroundColor,onClick:w=>{w.stopPropagation(),l()},_hover:{textDecoration:"underline"},transition:"opacity 0.2s ease, color 0.2s ease",...c==null?void 0:c.actionButton,children:s})]}),n&&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(),a()},_hover:{backgroundColor:"color-blackAlpha-100"},transition:"background-color 0.2s ease, opacity 0.2s ease",...c==null?void 0:c.closeButton,children:r.jsx(Te,{widthHeight:16,color:x[e].content.color})})]})},Cx=({position:e="top-right",gap:o=8,limit:t=5,containerStyle:a})=>{const{toasts:n,remove:l}=rr(),d=p.useMemo(()=>{const u={top:[],"top-right":[],"top-left":[],bottom:[],"bottom-right":[],"bottom-left":[]};return n.forEach(c=>{const m=c.position||e;u[m].push(c)}),Object.keys(u).forEach(c=>{u[c]=u[c].slice(-t)}),u},[n,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",...bx[e],style:a,children:d.map(u=>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($i,{id:u.id,variant:u.variant,title:u.title,description:u.description,onClose:()=>l(u.id),isClosable:u.isClosable,action:u.action,actionText:u.actionText,showIcon:u.showIcon,views:u.views,render:u.render,icon:u.icon,isVisible:u.isVisible})},u.id))})},Sx=()=>({toast:(e,o,t,a)=>uo(e,o,t,a),info:(e,o,t)=>Hi(e,o,t),success:(e,o,t)=>Pi(e,o,t),warning:(e,o,t)=>Ai(e,o,t),error:(e,o,t)=>Vi(e,o,t),remove:e=>Ei(e),removeAll:()=>Di()}),jx=e=>r.jsx($i,{...e}),wx=Object.assign(jx,{Container:e=>r.jsx(Cx,{...e}),show:uo,info:Hi,success:Pi,warning:Ai,error:Vi,remove:Ei,removeAll:Di}),vx=Sx,Na=(e,o)=>{var s,d;if(!e)return!0;const t=e.toLowerCase(),a=o.name.toLowerCase().includes(t),n=((s=o.description)==null?void 0:s.toLowerCase().includes(t))||!1,l=((d=o.keywords)==null?void 0:d.some(u=>u.toLowerCase().includes(t)))||!1;return a||n||l},Tx=({open:e,onOpenChange:o,groups:t=[],commands:a=[],filter:n})=>{const[l,s]=p.useState(""),[d,u]=p.useState(0),c=p.useRef(null),m=p.useMemo(()=>n||Na,[n]),g=p.useMemo(()=>[...t.flatMap(b=>b.commands),...a],[t,a]),h=p.useMemo(()=>l.trim()?g.filter(x=>m(l,x)):g,[g,l,m]),f=p.useMemo(()=>{if(!l)return t;const x=n||Na;return t.map(b=>({...b,commands:b.commands.filter(k=>x(l,k))})).filter(b=>b.commands.length)},[t,l,n]);p.useEffect(()=>{u(0)},[h.length]);const y=p.useCallback(x=>{if(e)switch(x.key){case"ArrowDown":x.preventDefault(),u(b=>b<h.length-1?b+1:b);break;case"ArrowUp":x.preventDefault(),u(b=>b>0?b-1:b);break;case"Enter":x.preventDefault(),h[d]&&(h[d].onSelect(),o(!1),s(""));break;case"Escape":x.preventDefault(),o(!1),s("");break}},[e,h,d,o]);return p.useEffect(()=>(document.addEventListener("keydown",y),()=>{document.removeEventListener("keydown",y)}),[y]),p.useEffect(()=>{if(c.current&&e){const x=c.current.querySelector(`[data-index="${d}"]`);x&&x.scrollIntoView({block:"nearest"})}},[d,e]),p.useEffect(()=>{e?u(0):s("")},[e]),{search:l,setSearch:s,selectedIndex:d,setSelectedIndex:u,filteredCommands:h,filteredGroups:f,listRef:c}},Ix={sm:{width:"400px",maxHeight:"300px"},md:{width:"500px",maxHeight:"400px"},lg:{width:"600px",maxHeight:"500px"}},Fx=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)"}}),Rx=Fx(),zx={display:"flex",alignItems:"center",padding:"12px 16px",borderBottomWidth:"1px",borderBottomStyle:"solid",borderBottomColor:"color-gray-200"},Mx={overflow:"auto",padding:"8px 0"},Wx={marginBottom:"8px"},Hx={padding:"8px 16px",fontSize:"12px",fontWeight:"bold",color:"color-gray-500",textTransform:"uppercase"},Px={display:"flex",alignItems:"center",padding:"8px 16px",cursor:"pointer",userSelect:"none",borderRadius:"4px",margin:"0 8px",_hover:{backgroundColor:"color-gray-100"}},Ax={backgroundColor:"color-blue-50",_hover:{backgroundColor:"color-blue-100"}},Vx={opacity:.5,cursor:"not-allowed",_hover:{backgroundColor:"transparent"}},Ex={display:"flex",alignItems:"center",justifyContent:"center",marginRight:"12px",color:"color-gray-500"},Dx={display:"flex",flexDirection:"column",flex:1},$x={fontSize:"14px",fontWeight:"medium"},Lx={fontSize:"12px",color:"color-gray-500",marginTop:"2px"},_x={display:"flex",alignItems:"center",marginLeft:"12px",fontSize:"12px",color:"color-gray-500"},Bx={display:"flex",alignItems:"center",justifyContent:"center",padding:"16px",color:"color-gray-500",textAlign:"center"},Ox={display:"flex",alignItems:"center",justifyContent:"space-between",padding:"8px 16px",borderTopWidth:"1px",borderTopStyle:"solid",borderTopColor:"color-gray-200",fontSize:"12px",color:"color-gray-500"},Nx=p.createContext({search:"",setSearch:()=>{},selectedIndex:0,setSelectedIndex:()=>{},filteredCommands:[],onSelect:()=>{}}),qx=({value:e,children:o})=>r.jsx(Nx.Provider,{value:e,children:o}),Li=({value:e,onValueChange:o,placeholder:t="Type a command or search...",views:a,...n})=>{const l=p.useRef(null);return p.useEffect(()=>{l.current&&l.current.focus()},[]),r.jsxs(i.View,{...zx,...a==null?void 0:a.container,...n,children:[r.jsx(Cr,{widthHeight:16,color:"color-gray-400",marginRight:"8px"}),r.jsx(i.View,{as:"input",type:"text",value:e,onChange:s=>o(s.target.value),placeholder:t,width:"100%",border:"none",outline:"none",backgroundColor:"transparent",fontSize:"14px",ref:l,...a==null?void 0:a.input})]})},Ux=({children:e,views:o,...t})=>r.jsx(i.View,{...Mx,...o==null?void 0:o.container,...t,children:e}),_i=({heading:e,children:o,views:t,...a})=>r.jsxs(i.View,{...Wx,...t==null?void 0:t.container,...a,children:[r.jsx(i.Text,{...Hx,...t==null?void 0:t.heading,children:e}),o]}),kt=({item:e,selected:o=!1,onSelect:t,views:a,...n})=>{const l=()=>{!e.disabled&&t&&t()};return r.jsxs(i.Horizontal,{...Px,...o?Ax:{},...e.disabled?Vx:{},onClick:l,...a==null?void 0:a.container,...n,children:[e.icon&&r.jsx(i.View,{...Ex,...a==null?void 0:a.icon,children:e.icon}),r.jsxs(i.Vertical,{...Dx,...a==null?void 0:a.content,children:[r.jsx(i.Text,{...$x,...a==null?void 0:a.name,children:e.name}),e.description&&r.jsx(i.Text,{...Lx,...a==null?void 0:a.description,children:e.description})]}),e.shortcut&&r.jsx(i.Text,{..._x,...a==null?void 0:a.shortcut,children:e.shortcut})]})},Bi=({children:e="No results found.",views:o,...t})=>r.jsx(i.View,{...Bx,...o==null?void 0:o.container,...t,children:e}),Gx=({open:e,onOpenChange:o,groups:t=[],commands:a=[],placeholder:n,size:l="md",variant:s="default",emptyState:d,footer:u,search:c,setSearch:m,selectedIndex:g,setSelectedIndex:h,filteredCommands:f,filteredGroups:y,listRef:x,views:b,filter:k,...j})=>{if(!e)return null;const w=p.useCallback(F=>{F.disabled||(F.onSelect(),o(!1),m(""))},[o,m]),C=p.useCallback(F=>F.target===F.currentTarget&&o(!1),[o]),S=p.useMemo(()=>({search:c,setSearch:m,selectedIndex:g,setSelectedIndex:h,filteredCommands:f,onSelect:w}),[c,g,f,w,m,h]),v=t.length>0,I=f.length===0;return r.jsx(i.View,{position:"fixed",top:0,left:0,right:0,bottom:0,display:"flex",alignItems:"center",justifyContent:"center",backgroundColor:"color-blackAlpha-400",zIndex:9999,onClick:C,...j,children:r.jsx(qx,{value:S,children:r.jsxs(i.View,{borderRadius:"8px",overflow:"hidden",display:"flex",flexDirection:"column",...Ix[l],...Rx[s],...b==null?void 0:b.container,onClick:F=>F.stopPropagation(),children:[r.jsx(Li,{value:c,onValueChange:m,placeholder:n,views:b==null?void 0:b.searchInput}),r.jsx(i.View,{ref:x,flex:1,overflow:"auto",...b==null?void 0:b.list,children:I?d||r.jsx(Bi,{views:b==null?void 0:b.empty}):v?y.map(F=>r.jsx(_i,{heading:F.name,views:b==null?void 0:b.groupHeading,children:F.commands.map(W=>{const E=f.findIndex(T=>T.id===W.id);return r.jsx(kt,{item:W,selected:E===g,onSelect:()=>w(W),"data-index":E,views:{container:b==null?void 0:b.item,icon:b==null?void 0:b.icon,content:b==null?void 0:b.content,name:b==null?void 0:b.name,description:b==null?void 0:b.description,shortcut:b==null?void 0:b.shortcut}},W.id)})},F.id)):f.map((F,W)=>r.jsx(kt,{item:F,selected:W===g,onSelect:()=>w(F),"data-index":W,views:{container:b==null?void 0:b.item,icon:b==null?void 0:b.icon,content:b==null?void 0:b.content,name:b==null?void 0:b.name,description:b==null?void 0:b.description,shortcut:b==null?void 0:b.shortcut}},F.id))}),u&&r.jsx(i.View,{...Ox,...b==null?void 0:b.footer,children:u})]})})})},Yx=({open:e,onOpenChange:o,groups:t=[],commands:a=[],placeholder:n,size:l="md",variant:s="default",filter:d,emptyState:u,footer:c,views:m,...g})=>{const{search:h,setSearch:f,selectedIndex:y,setSelectedIndex:x,filteredCommands:b,filteredGroups:k,listRef:j}=Tx({open:e,onOpenChange:o,groups:t,commands:a,filter:d});return r.jsx(Gx,{open:e,onOpenChange:o,groups:t,commands:a,placeholder:n,size:l,variant:s,emptyState:u,footer:c,search:h,setSearch:f,selectedIndex:y,setSelectedIndex:x,filteredCommands:b,filteredGroups:k,listRef:j,views:m,...g})},Ho=Yx;Ho.Input=Li;Ho.List=Ux;Ho.Group=_i;Ho.Item=kt;Ho.Empty=Bi;const qa=()=>Math.random().toString(36).substring(2,11),Xx=({defaultOpen:e=!1,openDelay:o=200,closeDelay:t=200,isDisabled:a=!1}={})=>{const[n,l]=p.useState(e),s=p.useRef(null),d=p.useRef(null),u=p.useRef(null),c=p.useRef(null),m=p.useRef(`tooltip-trigger-${qa()}`).current,g=p.useRef(`tooltip-content-${qa()}`).current,h=p.useCallback(()=>{a||(c.current&&(clearTimeout(c.current),c.current=null),!n&&!u.current&&(u.current=setTimeout(()=>{l(!0),u.current=null},o)))},[n,o,a]),f=p.useCallback(()=>{u.current&&(clearTimeout(u.current),u.current=null),n&&!c.current&&(c.current=setTimeout(()=>{l(!1),c.current=null},t))},[n,t]),y=p.useCallback(()=>{c.current&&(clearTimeout(c.current),c.current=null)},[]);return p.useEffect(()=>()=>{u.current&&clearTimeout(u.current),c.current&&clearTimeout(c.current)},[]),p.useEffect(()=>{const x=b=>{b.key==="Escape"&&n&&l(!1)};return document.addEventListener("keydown",x),()=>{document.removeEventListener("keydown",x)}},[n]),{isOpen:n,openTooltip:h,closeTooltip:f,cancelCloseTimer:y,triggerRef:s,contentRef:d,triggerId:m,contentId:g}},Kx={sm:{padding:"4px 8px",fontSize:"12px",maxWidth:"200px"},md:{padding:"6px 10px",fontSize:"14px",maxWidth:"250px"},lg:{padding:"8px 12px",fontSize:"16px",maxWidth:"300px"}},Jx=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"}}),Qx=Jx(),Zx=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}},Oi=p.createContext({isOpen:!1,openTooltip:()=>{},closeTooltip:()=>{},triggerRef:{current:null},contentRef:{current:null},contentId:"",triggerId:""}),ua=()=>p.useContext(Oi),eb=({value:e,children:o})=>r.jsx(Oi.Provider,{value:e,children:o}),Ni=p.memo(({children:e,views:o,asChild:t=!1,...a})=>{const{openTooltip:n,closeTooltip:l,triggerRef:s,contentId:d,triggerId:u}=ua(),c=p.useCallback(()=>n(),[n]),m=p.useCallback(()=>l(),[l]),g=p.useCallback(()=>n(),[n]),h=p.useCallback(()=>l(),[l]),f={ref:s,onMouseEnter:c,onMouseLeave:m,onFocus:g,onBlur:h,id:u,"aria-describedby":d,...o==null?void 0:o.container,...a};return t&&p.isValidElement(e)?p.cloneElement(e,f):r.jsx(i.View,{display:"inline-block",...f,children:e})}),ob=p.memo(({children:e,views:o,...t})=>{const{isOpen:a,contentRef:n,contentId:l,triggerId:s}=ua();return a?r.jsx(i.View,{ref:n,id:l,role:"tooltip","aria-labelledby":s,...o==null?void 0:o.container,...t,children:e}):null}),rb=({content:e,children:o,position:t="top",align:a="center",size:n="md",variant:l="default",showArrow:s=!0,views:d,themeMode:u,...c})=>{const{isOpen:m,triggerRef:g,contentRef:h,contentId:f,triggerId:y}=ua(),{ref:x,relation:b}=i.useElementPosition({trackChanges:!0,trackOnHover:!0,trackOnScroll:!0,trackOnResize:!0}),[k,j]=p.useState({x:0,y:0,placement:t});p.useEffect(()=>{g!=null&&g.current&&x&&(x.current=g.current)},[g,x,m]),p.useEffect(()=>{if(m&&(h!=null&&h.current)&&(g!=null&&g.current)){const S=g.current.getBoundingClientRect();let v=t;b&&(t==="top"&&b.space.vertical==="bottom"?v="bottom":t==="bottom"&&b.space.vertical==="top"?v="top":t==="right"&&b.space.horizontal==="left"?v="left":t==="left"&&b.space.horizontal==="right"&&(v="right"));let I=0,F=0;switch(v){case"top":I=a==="start"?S.left:a==="end"?S.right-120:S.left+S.width/2-60,F=S.top-8;break;case"bottom":I=a==="start"?S.left:a==="end"?S.right-120:S.left+S.width/2-60,F=S.bottom+8;break;case"right":I=S.right+8,F=a==="start"?S.top:a==="end"?S.bottom-32:S.top+S.height/2-16;break;case"left":I=S.left-8,F=a==="start"?S.top:a==="end"?S.bottom-32:S.top+S.height/2-16;break}j({x:I,y:F,placement:v})}},[m,t,a,g,h,b]);const w=p.useMemo(()=>s?Zx(k.placement):{},[s,k.placement]),C=p.useMemo(()=>{const S={position:"fixed",left:k.x,top:k.y,zIndex:1e3};switch(k.placement){case"top":return{...S,transform:"translateY(-100%)"};case"left":return{...S,transform:"translateX(-100%)"};case"bottom":case"right":default:return S}},[k.x,k.y,k.placement]);return r.jsxs(i.View,{position:"relative",display:"inline-block",...d==null?void 0:d.container,...c,children:[r.jsx(Ni,{children:o}),m&&r.jsxs(i.View,{ref:h,id:f,role:"tooltip","aria-labelledby":y,borderRadius:4,boxShadow:"0px 2px 8px rgba(0, 0, 0, 0.15)",style:C,...Kx[n],...Qx[l],...d==null?void 0:d.content,children:[typeof e=="string"?r.jsx(i.Text,{...d==null?void 0:d.text,children:e}):e,s&&r.jsx(i.View,{...w,...d==null?void 0:d.arrow})]})]})},tb=({content:e,children:o,position:t="top",align:a="center",size:n="md",variant:l="default",openDelay:s=200,closeDelay:d=200,showArrow:u=!0,defaultOpen:c=!1,isDisabled:m=!1,views:g,...h})=>{const f=Xx({defaultOpen:c,openDelay:s,closeDelay:d,isDisabled:m});return r.jsx(eb,{value:f,children:r.jsx(rb,{content:e,position:t,align:a,size:n,variant:l,showArrow:u,views:g,...h,children:o})})},Or=tb;Or.Trigger=Ni;Or.Content=ob;const qi=p.forwardRef((e,o)=>{const t=Rl(e);return r.jsx(Hl,{...e,...t})});qi.displayName="ChatInput";const ab={container:{position:"relative",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center"}},Ua={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%"}},at={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}},nt={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}},nb=p.createContext({}),lb=({children:e,showRadialGradient:o=!0,views:t,themeMode:a,...n})=>{const l={white:"rgba(255,255,255,1)",transparent:"rgba(255,255,255,0)"},s=["rgb(59, 130, 246)","rgb(196, 181, 253)","rgb(147, 197, 253)","rgb(221, 214, 254)","rgb(96, 165, 250)"],d={...Ua.gradient,backgroundImage:`
|
|
27
27
|
repeating-linear-gradient(100deg, ${s.join(", ")}),
|
|
28
|
-
repeating-linear-gradient(100deg, ${
|
|
29
|
-
`,animation:"aurora 4s ease infinite",...o?{maskImage:"radial-gradient(ellipse at 100% 0%, black 10%, transparent 70%)"}:{}};return
|
|
28
|
+
repeating-linear-gradient(100deg, ${l.white} 0%, ${l.white} 7%, ${l.transparent} 10%, ${l.transparent} 12%, ${l.white} 16%)
|
|
29
|
+
`,animation:"aurora 4s ease infinite",...o?{maskImage:"radial-gradient(ellipse at 100% 0%, black 10%, transparent 70%)"}:{}};return r.jsxs(i.View,{...Ua.container,...t==null?void 0:t.container,...n,children:[r.jsx(i.View,{style:d}),e,r.jsx("style",{children:`
|
|
30
30
|
@keyframes aurora {
|
|
31
31
|
0% { background-position: 0% 50%; }
|
|
32
32
|
50% { background-position: 100% 50%; }
|
|
33
33
|
100% { background-position: 0% 50%; }
|
|
34
34
|
}
|
|
35
|
-
`})]})},Qb=({number:e=20,children:o,...r})=>{const n=Array.from({length:e},(a,i)=>i);return t.jsxs(l.View,{width:"100%",height:"100%",backgroundColor:"black",position:"relative",overflow:"hidden",...r,children:[n.map(a=>{const i=a*37%200-100+"px",s=.2+a*13%6*.1+"s",m=(1+a*7%9)/2+"s",d=300+a*17%100+"px";return t.jsx(l.View,{position:"absolute",top:"0px",left:i,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:m,delay:s},children:t.jsx(l.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&&t.jsx(l.View,{position:"relative",zIndex:1,width:"100%",height:"100%",children:o})]})},qn=["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)"],Zb=()=>qn[Math.floor(Math.random()*qn.length)],ey=({rows:e=15,cols:o=10,squareSize:r=40,...n})=>{const a=Array(e).fill(1),i=Array(o).fill(1);return t.jsx(l.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((s,m)=>t.jsx(l.Horizontal,{gap:0,children:i.map((d,c)=>t.jsx(l.View,{height:r/3,width:r,borderStyle:"solid",borderColor:"color-gray-200",borderWidth:.5,backgroundColor:"transparent",cursor:"pointer",on:{hover:{backgroundColor:Zb(),transition:"background-color 0.2s ease"}}},`col-${c}`))},`row-${m}`))})},oy=["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=oy,speed:r="medium",shapes:n=["circle"],...a})=>{const i=Array.from({length:e},(c,p)=>p),s=()=>{switch(r){case"slow":return .5;case"fast":return 2;default:return 1}},m=()=>n[Math.floor(Math.random()*n.length)],d=()=>o[Math.floor(Math.random()*o.length)];return t.jsx(l.View,{width:400,height:300,position:"relative",overflow:"hidden",backgroundColor:"color-gray-900",...a,children:i.map(c=>{const p=Math.random()*8+4,h=Math.random()*400,f=Math.random()*300,g=Math.random()*400,x=Math.random()*300,b=(Math.random()*10+5)/s(),y=Math.random()*5,k=m(),S=d(),w={circle:{borderRadius:"50%"},square:{borderRadius:"2px"},triangle:{borderRadius:"0",clipPath:"polygon(50% 0%, 0% 100%, 100% 100%)"}};return t.jsx(l.View,{position:"absolute",width:p,height:p,backgroundColor:S,opacity:.7,style:{left:h,top:f,...w[k]},animate:{from:{transform:"translate(0px, 0px) scale(0.5)",opacity:0},to:{transform:`translate(${g-h}px, ${x-f}px) scale(1)`,opacity:.7},iterationCount:"infinite",direction:"alternate",timingFunction:"ease-in-out",duration:`${b}s`,delay:`${y}s`}},c)})})},ry=({gridSize:e=30,lineColor:o="rgba(59, 130, 246, 0.3)",pulseColor:r="rgba(59, 130, 246, 0.8)",animationSpeed:n="medium",...a})=>{const i=()=>{switch(n){case"slow":return 4;case"fast":return 1;default:return 2}},s=Math.floor(400/e),m=Math.floor(300/e),d=s*m,c=Array.from({length:d},(p,h)=>h);return t.jsxs(l.View,{width:400,height:300,position:"relative",overflow:"hidden",backgroundColor:"color-gray-900",...a,children:[Array.from({length:s+1},(p,h)=>t.jsx(l.View,{position:"absolute",left:h*e,top:0,width:1,height:"100%",backgroundColor:o},`v-line-${h}`)),Array.from({length:m+1},(p,h)=>t.jsx(l.View,{position:"absolute",left:0,top:h*e,width:"100%",height:1,backgroundColor:o},`h-line-${h}`)),c.map(p=>{const h=p%s,f=Math.floor(p/s),g=(h+f)*.1;return t.jsx(l.View,{position:"absolute",left:h*e+1,top:f*e+1,width:e-2,height:e-2,backgroundColor:"transparent",animate:{from:{backgroundColor:"transparent"},to:{backgroundColor:r},iterationCount:"infinite",direction:"alternate",timingFunction:"ease-in-out",duration:`${i()}s`,delay:`${g}s`}},p)})]})},ny=["rgba(59, 130, 246, 0.6)","rgba(147, 51, 234, 0.6)","rgba(236, 72, 153, 0.6)","rgba(34, 197, 94, 0.6)"],ay=({rippleCount:e=5,colors:o=ny,maxSize:r=200,frequency:n=3,...a})=>{const i=Array.from({length:e},(s,m)=>({id:m,x:Math.random()*400,y:Math.random()*300,color:o[m%o.length],delay:m*(n/e),duration:3+Math.random()*2}));return t.jsxs(l.View,{width:400,height:300,position:"relative",overflow:"hidden",backgroundColor:"color-gray-100",...a,children:[i.map(s=>t.jsx(l.View,{position:"absolute",width:20,height:20,borderRadius:"50%",style:{left:s.x-10,top:s.y-10,border:`2px solid ${s.color}`,backgroundColor:"transparent"},animate:{from:{transform:"scale(0)",opacity:1},to:{transform:`scale(${r/20})`,opacity:0},iterationCount:"infinite",timingFunction:"ease-out",duration:`${s.duration}s`,delay:`${s.delay}s`}},s.id)),i.map(s=>t.jsx(l.View,{position:"absolute",width:10,height:10,borderRadius:"50%",style:{left:s.x-5,top:s.y-5,backgroundColor:s.color},animate:{from:{transform:"scale(1)",opacity:.8},to:{transform:`scale(${r/40})`,opacity:0},iterationCount:"infinite",timingFunction:"ease-out",duration:`${s.duration*1.2}s`,delay:`${s.delay+.5}s`}},`secondary-${s.id}`))]})},iy=({children:e,src:o,backgroundSize:r="cover",backgroundPosition:n="center",backgroundRepeat:a="no-repeat",backgroundAttachment:i="scroll",imageOpacity:s=1,overlay:m=null,blendMode:d="normal",views:c,themeMode:p,...h})=>{const f={...rr.image,backgroundImage:`url(${o})`,backgroundSize:r,backgroundPosition:n,backgroundRepeat:a,backgroundAttachment:i,opacity:s};return t.jsxs(l.View,{...rr.container,...c==null?void 0:c.container,...h,children:[t.jsx(l.View,{style:f,...c==null?void 0:c.image}),m,e&&t.jsx(l.View,{...rr.content,...c==null?void 0:c.content,children:e})]})},ly=({children:e,src:o,autoPlay:r=!0,loop:n=!0,muted:a=!0,playsInline:i=!0,overlay:s=null,blendMode:m="normal",views:d,themeMode:c,...p})=>t.jsxs(l.View,{...nr.container,...d==null?void 0:d.container,...p,children:[t.jsx(l.View,{as:"video",src:o,autoPlay:r,loop:n,muted:a,playsInline:i,style:nr.video,...d==null?void 0:d.video}),s,e&&t.jsx(l.View,{...nr.content,...d==null?void 0:d.content,children:e})]}),sy=({children:e,...o})=>t.jsx(fl,{...o,children:e}),cy=({contentPosition:e,backgroundColor:o="color-black-900",...r})=>{const a=(()=>{let i=`${o}-100`,s=`${o}-900`,m=`${o}-600`,d=`${o}-400`;switch(o.indexOf("-")===-1&&(i=`color-mix(in srgb, ${o} 10%, transparent)`,s=`color-mix(in srgb, ${o} 90%, transparent)`,m=`color-mix(in srgb, ${o} 70%, transparent)`,d=`color-mix(in srgb, ${o} 50%, transparent)`),e){case"left":return`radial-gradient(circle at 70% 50%, ${i} 0%, ${i} 100%), linear-gradient(to right, ${s} 0%, ${m} 65%, ${i} 100%)`;case"right":return`radial-gradient(circle at 30% 50%, ${i} 0%, ${i} 100%), linear-gradient(to left, ${s} 0%, ${m} 65%, ${i} 100%)`;case"top":return`radial-gradient(circle at 50% 40%, ${i} 0%, ${i} 100%), linear-gradient(to bottom, ${s} 0%, ${m} 60%, ${i} 100%)`;case"bottom":return`radial-gradient(circle at 50% 60%, ${i} 0%, ${i} 100%), linear-gradient(to top, ${s} 0%, ${m} 60%, ${i} 100%)`;case"center":return`radial-gradient(circle at 50% 70%, ${s} 0%, ${i} 100%)`;default:return d}})();return t.jsx(l.View,{position:"absolute",top:0,left:0,width:"100%",height:"100%",background:a,pointerEvents:"none",zIndex:1,...r})},dy=({children:e,views:o,...r})=>t.jsx(Kb.Provider,{value:{},children:t.jsx(l.View,{...Xb.container,...o==null?void 0:o.container,...r,children:e})}),Nl=u.forwardRef(({children:e,designProps:o,shape:r="rounded",decorationRotation:n=5,decorationScale:a=1,decorationOpacity:i=.8,views:s,...m},d)=>{const p=(y=>{switch(y){case"square":return"0px";case"pill":return"9999px";case"rounded":default:return"16px"}})(r),h=Math.abs(n)*(Math.PI/180),f=Math.sin(h)*100,g=(a-1)*100/2,x=Math.ceil(f+g),b=m.backgroundColor??"theme-primary";return t.jsx(l.View,{...m,ref:d,backgroundColor:"transparent",position:"relative",overflow:"visible",...s==null?void 0:s.container,children:t.jsxs(l.View,{padding:m.padding??`${96+x}px ${x}px`,position:"relative",overflow:"visible",children:[t.jsx(l.View,{position:"absolute",top:x,left:x,right:x,bottom:x,backgroundColor:b,borderRadius:p,opacity:i/1.5,transform:`scale(${a})`,pointerEvents:"none",zIndex:1,...s==null?void 0:s.back}),t.jsx(l.View,{position:"absolute",top:x,left:x,right:x,bottom:x,transform:`rotate(${n}deg) scale(${a})`,opacity:i/1.2,backgroundColor:b,borderRadius:p,pointerEvents:"none",zIndex:2,...s==null?void 0:s.front}),t.jsx(l.View,{margin:"0 auto",position:"relative",zIndex:3,...s==null?void 0:s.content,children:e})]})})});Nl.displayName="Background.Layout";const ce=dy;ce.Aurora=Jb;ce.Meteors=Qb;ce.Wall=ey;ce.Particles=ty;ce.Grid=ry;ce.Ripples=ay;ce.Image=iy;ce.Video=ly;ce.Gradient=sy;ce.Overlay=cy;ce.Layout=Nl;const ql=u.forwardRef((e,o)=>t.jsx(ce,{...e,ref:o}));ql.displayName="Background";const Ul=Object.assign(ql,{Layout:ce.Layout,Aurora:ce.Aurora,Meteors:ce.Meteors,Wall:ce.Wall,Particles:ce.Particles,Grid:ce.Grid,Ripples:ce.Ripples,Image:ce.Image,Video:ce.Video,Gradient:ce.Gradient,Overlay:ce.Overlay});Ul.displayName="Background";function my(e){const{inputValue:o,onInputChange:r,onSubmit:n,messages:a=[]}=e,[i,s]=u.useState(""),m=u.useRef(null),d=u.useRef(null),c=o!==void 0,p=o!==void 0?o:i,h=u.useCallback(g=>{c?r==null||r(g):s(g)},[c,r]),f=u.useCallback(g=>{g&&g.preventDefault();const x=p.trim();x&&n&&(n(x),c||s(""),m.current&&(m.current.style.height="auto"))},[p,n,c]);return u.useEffect(()=>{d.current&&(d.current.scrollTop=d.current.scrollHeight)},[a.length]),{internalInputValue:p,handleInputChange:h,handleSubmit:f,inputRef:m,messagesRef:d}}const uy={sm:{fontSize:"12px",padding:"8px"},md:{fontSize:"14px",padding:"10px"},lg:{fontSize:"14px",padding:"12px"}},py={default:{backgroundColor:"#ffffff",border:"1px solid #e2e8f0",borderRadius:"12px",boxShadow:"0 12px 32px rgba(15, 23, 42, 0.08)"},glassy:{backgroundColor:"rgba(255, 255, 255, 0.92)",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:"#ffffff",border:"1px solid #e2e8f0",borderRadius:"12px"}},hy={sm:{fontSize:"12px",padding:"8px 10px",borderRadius:"12px"},md:{fontSize:"14px",padding:"10px 12px",borderRadius:"12px"},lg:{fontSize:"14px",padding:"12px 14px",borderRadius:"14px"}},fy={backgroundColor:"#1D4ED8",color:"#ffffff",alignSelf:"flex-end",borderBottomRightRadius:"4px"},gy={backgroundColor:"#ffffff",color:"#0F172A",alignSelf:"flex-start",borderBottomLeftRadius:"4px",border:"1px solid #E2E8F0"},xy={position:"relative",backgroundColor:"#ffffff",borderTop:"1px solid #E2E8F0",padding:"12px",display:"flex",alignItems:"flex-end",gap:"8px",transition:"background-color 0.2s ease, border-color 0.2s ease"},Be={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:"#F8FAFC"},inputContainer:xy,bubble:{maxWidth:"80%",position:"relative",wordWrap:"break-word",animation:"chatBubbleAppear 0.25s ease-out"},timestamp:{position:"absolute",top:"-24px",fontSize:"12px",color:"#64748B",backgroundColor:"rgba(255, 255, 255, 0.96)",padding:"2px 8px",borderRadius:"9999px",opacity:0,transition:"opacity 0.15s ease-out",border:"1px solid #E2E8F0"},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}},by=({messages:e=[],inputPlaceholder:o="Type a message...",disableInput:r=!1,variant:n="default",size:a="md",showTimestamps:i=!0,enableAttachments:s=!1,enableContextPicker:m=!1,selectedContextElements:d=[],onContextPickerClick:c,onRemoveContextElement:p,isLoading:h=!1,loadingText:f="Loading...",styles:g={},maxHeight:x="600px",internalInputValue:b,handleInputChange:y,handleSubmit:k,inputRef:S,messagesRef:w,inputValue:C,onInputChange:j,...v})=>{var H;const I={...Be.container,...py[n],...g.container},F={...Be.messagesContainer,maxHeight:x,...g.messagesContainer},W={...Be.inputContainer,...g.inputContainer},E={...Be.input,...uy[a],...g.input},T=u.useCallback(M=>{y(M.target.value),M.target.style.height="auto",M.target.style.height=`${M.target.scrollHeight}px`},[y]),A=u.useCallback(M=>{M.key==="Enter"&&!M.shiftKey&&(M.preventDefault(),k())},[k]),P=b.trim().length>0,{onSubmit:z,...R}=v;return t.jsxs(l.View,{...I,...R,children:[t.jsxs(l.View,{ref:w,...F,children:[e.length===0?t.jsx(l.View,{display:"flex",alignItems:"center",justifyContent:"center",flex:1,color:"color-gray-500",children:t.jsx(l.Text,{fontSize:"14px",children:"No messages yet. Start a conversation."})}):e.map(M=>t.jsx(yy,{message:M,size:a,showTimestamp:i,styles:{bubble:g.bubble,userBubble:g.userBubble,assistantBubble:g.assistantBubble,timestamp:g.timestamp,reasoningContainer:g.reasoningContainer,reasoningContent:g.reasoningContent,errorMessage:g.errorMessage,systemMessage:g.systemMessage,toolMessage:g.toolMessage}},M.id)),h&&t.jsxs(l.Horizontal,{justifyContent:"flex-start",alignItems:"center",gap:8,marginTop:"8px",...g.loadingIndicator,children:[t.jsx(Hr,{widthHeight:12,color:"currentColor",filled:!1,style:{animation:"spin 1s linear infinite"}}),t.jsx(l.Text,{color:"color-gray-500",fontSize:"14px",children:f})]})]}),t.jsxs(l.View,{children:[d.length>0&&t.jsx(l.Horizontal,{gap:8,marginBottom:"8px",flexWrap:"wrap",padding:"0 12px 8px",...g.contextChipsContainer,children:d.map(M=>t.jsxs(l.Horizontal,{backgroundColor:"color-blue-50",borderWidth:1,borderStyle:"solid",borderColor:"color-blue-200",borderRadius:"9999px",padding:"6px 10px",alignItems:"center",gap:6,children:[t.jsx(l.Text,{fontSize:"12px",color:"color-blue-700",fontWeight:"500",children:M.name}),t.jsx(l.View,{as:"button",type:"button",onClick:()=>p==null?void 0:p(M.id),cursor:"pointer",border:"none",backgroundColor:"transparent",display:"flex",alignItems:"center",children:t.jsx(ve,{widthHeight:12,color:"color-blue-700"})})]},M.id))}),t.jsxs(l.View,{as:"form",onSubmit:k,...W,children:[s&&t.jsx(l.View,{as:"button",type:"button",...Be.attachmentButton,...g.attachmentButton,_hover:{backgroundColor:"color-gray-100"},children:t.jsx(Go,{widthHeight:16,color:"color-gray-600"})}),t.jsx(l.View,{as:"textarea",ref:S,value:b,onChange:T,onKeyDown:A,placeholder:o,disabled:r||h,...E,style:{...E,opacity:r||h?.5:1}}),t.jsxs(l.Vertical,{gap:4,alignItems:"center",children:[m&&t.jsx(l.View,{as:"button",type:"button",onClick:c,...Be.attachmentButton,...g.contextPickerButton,_hover:{backgroundColor:"#F1F5F9",...(H=g.contextPickerButton)==null?void 0:H._hover},title:"Select element from page",children:t.jsx(va,{widthHeight:16,color:"color-gray-600"})}),t.jsx(l.View,{as:"button",type:"submit",disabled:!P||r||h,...Be.sendButton,backgroundColor:P?"theme-primary":"color-gray-300",_hover:{backgroundColor:P?"#1D4ED8":"color-gray-300"},...g.sendButton,style:{cursor:P?"pointer":"not-allowed",opacity:!P||r||h?.6:1},children:t.jsx(Wr,{widthHeight:16,color:"color-white",filled:!1})})]})]})]})]})},yy=({message:e,size:o,showTimestamp:r,styles:n})=>{const[a,i]=u.useState(!1),[s,m]=u.useState(!1),d=e.role==="user",c=e.messageType==="system",p=e.messageType==="error",h=e.messageType==="tool";if(c)return t.jsx(l.View,{display:"flex",justifyContent:"center",padding:"8px",width:"100%",...n.systemMessage,children:t.jsxs(l.Horizontal,{gap:6,alignItems:"center",opacity:.7,children:[t.jsx(qe,{widthHeight:12,color:"color-gray-600"}),t.jsx(l.Text,{fontSize:"12px",color:"color-gray-600",fontStyle:"italic",children:e.content})]})});if(h)return t.jsx(l.View,{display:"flex",justifyContent:"flex-start",padding:"8px 16px",width:"100%",...n.toolMessage,children:t.jsxs(l.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:[t.jsx(Ca,{widthHeight:14,color:"color-gray-600"}),t.jsxs(l.Vertical,{gap:2,children:[t.jsx(l.Text,{fontSize:"11px",fontWeight:"600",color:"color-gray-700",children:"Tool Usage"}),t.jsx(l.Text,{fontSize:"12px",color:"color-gray-600",fontFamily:"monospace",children:e.content})]})]})});const f={...Be.bubble,...hy[o],...d?fy:gy,...p?{backgroundColor:"color-red-50",borderWidth:1,borderStyle:"solid",borderColor:"color-red-200",color:"color-red-700"}:{},...n.bubble,...d?n.userBubble:n.assistantBubble,...p?n.errorMessage:{}},g={...Be.timestamp,[d?"right":"left"]:"8px",opacity:a?1:0,...n.timestamp};return t.jsx(l.View,{position:"relative",onMouseEnter:()=>i(!0),onMouseLeave:()=>i(!1),display:"flex",justifyContent:d?"flex-end":"flex-start",children:t.jsxs(l.View,{...f,children:[r&&t.jsx(l.View,{...g,children:e.timestamp.toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"})}),p&&t.jsxs(l.Horizontal,{gap:6,marginBottom:"4px",alignItems:"center",children:[t.jsx(Pt,{widthHeight:14,color:"color-red-700"}),t.jsx(l.Text,{fontWeight:"600",fontSize:"12px",children:"Error"})]}),e.reasoning&&t.jsxs(l.View,{marginBottom:"8px",borderBottomWidth:1,borderBottomStyle:"solid",borderBottomColor:"color-gray-200",paddingBottom:"8px",...n.reasoningContainer,children:[t.jsxs(l.Horizontal,{as:"button",onClick:()=>m(!s),cursor:"pointer",gap:4,alignItems:"center",backgroundColor:"transparent",border:"none",padding:0,children:[t.jsx(l.Text,{fontSize:"11px",color:"color-gray-500",fontWeight:"600",children:"Thinking Process"}),t.jsx(se,{orientation:s?"down":"right",widthHeight:10,color:"color-gray-500"})]}),s&&t.jsx(l.View,{padding:"8px",backgroundColor:"color-gray-50",borderRadius:"8px",marginTop:"4px",borderWidth:1,borderStyle:"solid",borderColor:"color-gray-200",...n.reasoningContent,children:t.jsx(l.Text,{fontSize:"12px",color:"color-gray-600",fontStyle:"italic",children:e.reasoning})})]}),t.jsx(l.View,{whiteSpace:"pre-wrap",wordBreak:"break-word",children:e.content}),e.attachments&&e.attachments.length>0&&t.jsx(l.Vertical,{gap:4,marginTop:"8px",children:e.attachments.map(x=>t.jsxs(l.Horizontal,{gap:6,padding:"6px 8px",backgroundColor:"color-gray-50",borderRadius:"8px",fontSize:"12px",borderWidth:1,borderStyle:"solid",borderColor:"color-gray-200",children:[t.jsx(Go,{widthHeight:14}),t.jsx(l.Text,{children:x.name})]},x.id))}),e.contextElements&&e.contextElements.length>0&&t.jsxs(l.Vertical,{gap:4,marginTop:"8px",children:[t.jsx(l.Text,{fontSize:"11px",color:"color-black-500",fontWeight:"600",children:"Context:"}),e.contextElements.map(x=>t.jsx(l.Horizontal,{gap:6,padding:"6px 10px",backgroundColor:"color-blue-50",borderRadius:"9999px",fontSize:"11px",borderWidth:1,borderStyle:"solid",borderColor:"color-blue-200",children:t.jsx(l.Text,{color:"color-blue-700",fontWeight:"500",children:x.name})},x.id))]})]})})},dn=e=>{const o=my(e);return t.jsx(by,{...e,...o})};dn.displayName="ChatWidget";const Gl=dn;function ky({onSelect:e,onCancel:o,active:r}){const[n,a]=u.useState(null);u.useRef(null);const i=u.useCallback(d=>{var g;if(!r)return;const c=document.elementFromPoint(d.clientX,d.clientY);if(!c||c===document.body||c.closest('[data-chatwidget-ignore="true"]')||c.closest("#chatwidget-overlay")){a(null);return}const p=c.getBoundingClientRect();let h=c.tagName.toLowerCase();if(c.id)h+=`#${c.id}`;else if(c.className&&typeof c.className=="string"){const x=c.className.split(" ")[0];x&&(h+=`.${x}`)}const f=(g=c.innerText)==null?void 0:g.slice(0,20);f&&(h+=` ("${f}...")`),a({id:c.id||`el-${Date.now()}`,name:h,tagName:c.tagName.toLowerCase(),rect:p})},[r]),s=u.useCallback(d=>{!r||d.target.closest('[data-chatwidget-ignore="true"]')||(d.preventDefault(),d.stopPropagation(),n&&e(n))},[r,n,e]),m=u.useCallback(d=>{r&&d.key==="Escape"&&o()},[r,o]);return u.useEffect(()=>(r?(document.addEventListener("mousemove",i),document.addEventListener("click",s,!0),document.addEventListener("keydown",m),document.body.style.cursor="crosshair"):(a(null),document.removeEventListener("mousemove",i),document.removeEventListener("click",s,!0),document.removeEventListener("keydown",m),document.body.style.cursor=""),()=>{document.removeEventListener("mousemove",i),document.removeEventListener("click",s,!0),document.removeEventListener("keydown",m),document.body.style.cursor=""}),[r,i,s,m]),{highlightedElement:n}}function Cy({element:e}){return e?t.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:t.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 Sy=({initialMessages:e=[],onSendMessage:o,bubbleSize:r="md"})=>{const[n,a]=u.useState(!1),[i,s]=u.useState(!1),[m,d]=u.useState(e),[c,p]=u.useState([]),{highlightedElement:h}=ky({active:i,onSelect:y=>{p(k=>[...k,y]),s(!1),a(!0)},onCancel:()=>{s(!1),a(!0)}}),f=()=>a(!n),g=()=>{s(!0),a(!1)},x=y=>{p(k=>k.filter(S=>S.id!==y))},b=y=>{const k={id:Date.now().toString(),role:"user",content:y,timestamp:new Date,contextElements:[...c]};d(S=>[...S,k]),o==null||o(y,c),p([]),setTimeout(()=>{var j;const S=Math.random()>.7,w=Math.random()>.4,C={id:(Date.now()+1).toString(),role:"assistant",timestamp:new Date,content:S?"I will highlight the selected element.":`I received your message regarding: ${((j=k.contextElements)==null?void 0:j.map(v=>v.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(v=>[...v,C]),S&&setTimeout(()=>{d(v=>[...v,{id:(Date.now()+2).toString(),role:"assistant",messageType:"system",content:'Tool "highlightElement" executed successfully.',timestamp:new Date}])},800)},1e3)};return t.jsxs(l.View,{position:"fixed",bottom:24,right:24,zIndex:9999,children:[t.jsx(Cy,{element:h}),i&&t.jsx(l.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:t.jsx(l.Text,{fontWeight:"600",fontSize:"14px",children:"Click an element to select it. Press ESC to cancel."})}),n&&t.jsxs(l.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:[t.jsxs(l.View,{padding:"16px",borderBottom:"1px solid rgba(0,0,0,0.05)",display:"flex",justifyContent:"space-between",alignItems:"center",children:[t.jsx(l.Text,{fontWeight:"bold",color:"color-gray-800",children:"ChatWidget Assistant"}),t.jsx(l.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:t.jsx(ve,{widthHeight:16,color:"color-gray-500"})})]}),t.jsx(Gl,{messages:m,onSubmit:b,size:r,variant:"minimal",enableContextPicker:!0,selectedContextElements:c,onContextPickerClick:g,onRemoveContextElement:x,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)"}}})]}),!i&&t.jsx(l.View,{as:"button",onClick:f,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?t.jsx(ve,{widthHeight:24,color:"white"}):t.jsx(wa,{widthHeight:24,color:"white"})})]})},jy=e=>{const o=pe("radio",e),r=vi(o);return t.jsx(Ti,{...r,...o})},Yl=jy;function mn(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var wy=typeof Element<"u",vy=typeof Map=="function",Ty=typeof Set=="function",Iy=typeof ArrayBuffer=="function"&&!!ArrayBuffer.isView;function ft(e,o){if(e===o)return!0;if(e&&o&&typeof e=="object"&&typeof o=="object"){if(e.constructor!==o.constructor)return!1;var r,n,a;if(Array.isArray(e)){if(r=e.length,r!=o.length)return!1;for(n=r;n--!==0;)if(!ft(e[n],o[n]))return!1;return!0}var i;if(vy&&e instanceof Map&&o instanceof Map){if(e.size!==o.size)return!1;for(i=e.entries();!(n=i.next()).done;)if(!o.has(n.value[0]))return!1;for(i=e.entries();!(n=i.next()).done;)if(!ft(n.value[1],o.get(n.value[0])))return!1;return!0}if(Ty&&e instanceof Set&&o instanceof Set){if(e.size!==o.size)return!1;for(i=e.entries();!(n=i.next()).done;)if(!o.has(n.value[0]))return!1;return!0}if(Iy&&ArrayBuffer.isView(e)&&ArrayBuffer.isView(o)){if(r=e.length,r!=o.length)return!1;for(n=r;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),r=a.length,r!==Object.keys(o).length)return!1;for(n=r;n--!==0;)if(!Object.prototype.hasOwnProperty.call(o,a[n]))return!1;if(wy&&e instanceof Element)return!1;for(n=r;n--!==0;)if(!((a[n]==="_owner"||a[n]==="__v"||a[n]==="__o")&&e.$$typeof)&&!ft(e[a[n]],o[a[n]]))return!1;return!0}return e!==e&&o!==o}var Fy=function(o,r){try{return ft(o,r)}catch(n){if((n.message||"").match(/stack|recursion/i))return console.warn("react-fast-compare cannot handle circular refs"),!1;throw n}};const Ry=mn(Fy);var zy=function(e,o,r,n,a,i,s,m){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 c=[r,n,a,i,s,m],p=0;d=new Error(o.replace(/%s/g,function(){return c[p++]})),d.name="Invariant Violation"}throw d.framesToPop=1,d}},My=zy;const Un=mn(My);var Wy=function(o,r,n,a){var i=n?n.call(a,o,r):void 0;if(i!==void 0)return!!i;if(o===r)return!0;if(typeof o!="object"||!o||typeof r!="object"||!r)return!1;var s=Object.keys(o),m=Object.keys(r);if(s.length!==m.length)return!1;for(var d=Object.prototype.hasOwnProperty.bind(r),c=0;c<s.length;c++){var p=s[c];if(!d(p))return!1;var h=o[p],f=r[p];if(i=n?n.call(a,h,f,p):void 0,i===!1||i===void 0&&h!==f)return!1}return!0};const Hy=mn(Wy);var Xl=(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))(Xl||{}),ar={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"]}},Gn=Object.values(Xl),Ot={accesskey:"accessKey",charset:"charSet",class:"className",contenteditable:"contentEditable",contextmenu:"contextMenu","http-equiv":"httpEquiv",itemprop:"itemProp",tabindex:"tabIndex"},Kl=Object.entries(Ot).reduce((e,[o,r])=>(e[r]=o,e),{}),He="data-rh",Co={DEFAULT_TITLE:"defaultTitle",DEFER:"defer",ENCODE_SPECIAL_CHARACTERS:"encodeSpecialCharacters",ON_CHANGE_CLIENT_STATE:"onChangeClientState",TITLE_TEMPLATE:"titleTemplate",PRIORITIZE_SEO_TAGS:"prioritizeSeoTags"},So=(e,o)=>{for(let r=e.length-1;r>=0;r-=1){const n=e[r];if(Object.prototype.hasOwnProperty.call(n,o))return n[o]}return null},Py=e=>{let o=So(e,"title");const r=So(e,Co.TITLE_TEMPLATE);if(Array.isArray(o)&&(o=o.join("")),r&&o)return r.replace(/%s/g,()=>o);const n=So(e,Co.DEFAULT_TITLE);return o||n||void 0},Ay=e=>So(e,Co.ON_CHANGE_CLIENT_STATE)||(()=>{}),ir=(e,o)=>o.filter(r=>typeof r[e]<"u").map(r=>r[e]).reduce((r,n)=>({...r,...n}),{}),Ey=(e,o)=>o.filter(r=>typeof r.base<"u").map(r=>r.base).reverse().reduce((r,n)=>{if(!r.length){const a=Object.keys(n);for(let i=0;i<a.length;i+=1){const m=a[i].toLowerCase();if(e.indexOf(m)!==-1&&n[m])return r.concat(n)}}return r},[]),Vy=e=>console&&typeof console.warn=="function"&&console.warn(e),_o=(e,o,r)=>{const n={};return r.filter(a=>Array.isArray(a[e])?!0:(typeof a[e]<"u"&&Vy(`Helmet: ${e} should be of type "Array". Instead found type "${typeof a[e]}"`),!1)).map(a=>a[e]).reverse().reduce((a,i)=>{const s={};i.filter(d=>{let c;const p=Object.keys(d);for(let f=0;f<p.length;f+=1){const g=p[f],x=g.toLowerCase();o.indexOf(x)!==-1&&!(c==="rel"&&d[c].toLowerCase()==="canonical")&&!(x==="rel"&&d[x].toLowerCase()==="stylesheet")&&(c=x),o.indexOf(g)!==-1&&(g==="innerHTML"||g==="cssText"||g==="itemprop")&&(c=g)}if(!c||!d[c])return!1;const h=d[c].toLowerCase();return n[c]||(n[c]={}),s[c]||(s[c]={}),n[c][h]?!1:(s[c][h]=!0,!0)}).reverse().forEach(d=>a.push(d));const m=Object.keys(s);for(let d=0;d<m.length;d+=1){const c=m[d],p={...n[c],...s[c]};n[c]=p}return a},[]).reverse()},Dy=(e,o)=>{if(Array.isArray(e)&&e.length){for(let r=0;r<e.length;r+=1)if(e[r][o])return!0}return!1},$y=e=>({baseTag:Ey(["href"],e),bodyAttributes:ir("bodyAttributes",e),defer:So(e,Co.DEFER),encode:So(e,Co.ENCODE_SPECIAL_CHARACTERS),htmlAttributes:ir("htmlAttributes",e),linkTags:_o("link",["rel","href"],e),metaTags:_o("meta",["name","charset","http-equiv","property","itemprop"],e),noscriptTags:_o("noscript",["innerHTML"],e),onChangeClientState:Ay(e),scriptTags:_o("script",["src","innerHTML"],e),styleTags:_o("style",["cssText"],e),title:Py(e),titleAttributes:ir("titleAttributes",e),prioritizeSeoTags:Dy(e,Co.PRIORITIZE_SEO_TAGS)}),Jl=e=>Array.isArray(e)?e.join(""):e,By=(e,o)=>{const r=Object.keys(e);for(let n=0;n<r.length;n+=1)if(o[r[n]]&&o[r[n]].includes(e[r[n]]))return!0;return!1},lr=(e,o)=>Array.isArray(e)?e.reduce((r,n)=>(By(n,o)?r.priority.push(n):r.default.push(n),r),{priority:[],default:[]}):{default:e,priority:[]},Yn=(e,o)=>({...e,[o]:void 0}),_y=["noscript","script","style"],kr=(e,o=!0)=>o===!1?String(e):String(e).replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'"),Ql=e=>Object.keys(e).reduce((o,r)=>{const n=typeof e[r]<"u"?`${r}="${e[r]}"`:`${r}`;return o?`${o} ${n}`:n},""),Ly=(e,o,r,n)=>{const a=Ql(r),i=Jl(o);return a?`<${e} ${He}="true" ${a}>${kr(i,n)}</${e}>`:`<${e} ${He}="true">${kr(i,n)}</${e}>`},Oy=(e,o,r=!0)=>o.reduce((n,a)=>{const i=a,s=Object.keys(i).filter(c=>!(c==="innerHTML"||c==="cssText")).reduce((c,p)=>{const h=typeof i[p]>"u"?p:`${p}="${kr(i[p],r)}"`;return c?`${c} ${h}`:h},""),m=i.innerHTML||i.cssText||"",d=_y.indexOf(e)===-1;return`${n}<${e} ${He}="true" ${s}${d?"/>":`>${m}</${e}>`}`},""),Zl=(e,o={})=>Object.keys(e).reduce((r,n)=>{const a=Ot[n];return r[a||n]=e[n],r},o),Ny=(e,o,r)=>{const n={key:o,[He]:!0},a=Zl(r,n);return[u.createElement("title",a,o)]},gt=(e,o)=>o.map((r,n)=>{const a={key:n,[He]:!0};return Object.keys(r).forEach(i=>{const m=Ot[i]||i;if(m==="innerHTML"||m==="cssText"){const d=r.innerHTML||r.cssText;a.dangerouslySetInnerHTML={__html:d}}else a[m]=r[i]}),u.createElement(e,a)}),Te=(e,o,r=!0)=>{switch(e){case"title":return{toComponent:()=>Ny(e,o.title,o.titleAttributes),toString:()=>Ly(e,o.title,o.titleAttributes,r)};case"bodyAttributes":case"htmlAttributes":return{toComponent:()=>Zl(o),toString:()=>Ql(o)};default:return{toComponent:()=>gt(e,o),toString:()=>Oy(e,o,r)}}},qy=({metaTags:e,linkTags:o,scriptTags:r,encode:n})=>{const a=lr(e,ar.meta),i=lr(o,ar.link),s=lr(r,ar.script);return{priorityMethods:{toComponent:()=>[...gt("meta",a.priority),...gt("link",i.priority),...gt("script",s.priority)],toString:()=>`${Te("meta",a.priority,n)} ${Te("link",i.priority,n)} ${Te("script",s.priority,n)}`},metaTags:a.default,linkTags:i.default,scriptTags:s.default}},Uy=e=>{const{baseTag:o,bodyAttributes:r,encode:n=!0,htmlAttributes:a,noscriptTags:i,styleTags:s,title:m="",titleAttributes:d,prioritizeSeoTags:c}=e;let{linkTags:p,metaTags:h,scriptTags:f}=e,g={toComponent:()=>[],toString:()=>""};return c&&({priorityMethods:g,linkTags:p,metaTags:h,scriptTags:f}=qy(e)),{priority:g,base:Te("base",o,n),bodyAttributes:Te("bodyAttributes",r,n),htmlAttributes:Te("htmlAttributes",a,n),link:Te("link",p,n),meta:Te("meta",h,n),noscript:Te("noscript",i,n),script:Te("script",f,n),style:Te("style",s,n),title:Te("title",{title:m,titleAttributes:d},n)}},Cr=Uy,mt=[],un=!!(typeof window<"u"&&window.document&&window.document.createElement),Sr=class{constructor(e,o){$e(this,"instances",[]);$e(this,"canUseDOM",un);$e(this,"context");$e(this,"value",{setHelmet:e=>{this.context.helmet=e},helmetInstances:{get:()=>this.canUseDOM?mt:this.instances,add:e=>{(this.canUseDOM?mt:this.instances).push(e)},remove:e=>{const o=(this.canUseDOM?mt:this.instances).indexOf(e);(this.canUseDOM?mt:this.instances).splice(o,1)}}});this.context=e,this.canUseDOM=o||!1,o||(e.helmet=Cr({baseTag:[],bodyAttributes:{},htmlAttributes:{},linkTags:[],metaTags:[],noscriptTags:[],scriptTags:[],styleTags:[],title:"",titleAttributes:{}}))}},Gy=parseInt(u.version.split(".")[0],10),jr=Gy>=19,Yy={},es=u.createContext(Yy),eo,Xy=(eo=class extends u.Component{constructor(r){super(r);$e(this,"helmetData");jr?this.helmetData=null:this.helmetData=new Sr(this.props.context||{},eo.canUseDOM)}render(){return jr?u.createElement(u.Fragment,null,this.props.children):u.createElement(es.Provider,{value:this.helmetData.value},this.props.children)}},$e(eo,"canUseDOM",un),eo),xo=(e,o)=>{const r=document.head||document.querySelector("head"),n=r.querySelectorAll(`${e}[${He}]`),a=[].slice.call(n),i=[];let s;return o&&o.length&&o.forEach(m=>{const d=document.createElement(e);for(const c in m)if(Object.prototype.hasOwnProperty.call(m,c))if(c==="innerHTML")d.innerHTML=m.innerHTML;else if(c==="cssText"){const p=m.cssText;d.appendChild(document.createTextNode(p))}else{const p=c,h=typeof m[p]>"u"?"":m[p];d.setAttribute(c,h)}d.setAttribute(He,"true"),a.some((c,p)=>(s=p,d.isEqualNode(c)))?a.splice(s,1):i.push(d)}),a.forEach(m=>{var d;return(d=m.parentNode)==null?void 0:d.removeChild(m)}),i.forEach(m=>r.appendChild(m)),{oldTags:a,newTags:i}},wr=(e,o)=>{const r=document.getElementsByTagName(e)[0];if(!r)return;const n=r.getAttribute(He),a=n?n.split(","):[],i=[...a],s=Object.keys(o);for(const m of s){const d=o[m]||"";r.getAttribute(m)!==d&&r.setAttribute(m,d),a.indexOf(m)===-1&&a.push(m);const c=i.indexOf(m);c!==-1&&i.splice(c,1)}for(let m=i.length-1;m>=0;m-=1)r.removeAttribute(i[m]);a.length===i.length?r.removeAttribute(He):r.getAttribute(He)!==s.join(",")&&r.setAttribute(He,s.join(","))},Ky=(e,o)=>{typeof e<"u"&&document.title!==e&&(document.title=Jl(e)),wr("title",o)},Xn=(e,o)=>{const{baseTag:r,bodyAttributes:n,htmlAttributes:a,linkTags:i,metaTags:s,noscriptTags:m,onChangeClientState:d,scriptTags:c,styleTags:p,title:h,titleAttributes:f}=e;wr("body",n),wr("html",a),Ky(h,f);const g={baseTag:xo("base",r),linkTags:xo("link",i),metaTags:xo("meta",s),noscriptTags:xo("noscript",m),scriptTags:xo("script",c),styleTags:xo("style",p)},x={},b={};Object.keys(g).forEach(y=>{const{newTags:k,oldTags:S}=g[y];k.length&&(x[y]=k),S.length&&(b[y]=g[y].oldTags)}),o&&o(),d(e,x,b)},Lo=null,Jy=e=>{Lo&&cancelAnimationFrame(Lo),e.defer?Lo=requestAnimationFrame(()=>{Xn(e,()=>{Lo=null})}):(Xn(e),Lo=null)},Qy=Jy,Kn=class extends u.Component{constructor(){super(...arguments);$e(this,"rendered",!1)}shouldComponentUpdate(o){return!Hy(o,this.props)}componentDidUpdate(){this.emitChange()}componentWillUnmount(){const{helmetInstances:o}=this.props.context;o.remove(this),this.emitChange()}emitChange(){const{helmetInstances:o,setHelmet:r}=this.props.context;let n=null;const a=$y(o.get().map(i=>{const{context:s,...m}=i.props;return m}));Xy.canUseDOM?Qy(a):Cr&&(n=Cr(a)),r(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}},xt=[],Jn=e=>{const o={};for(const r of Object.keys(e))o[Kl[r]||r]=e[r];return o},Qe=e=>{const o={};for(const r of Object.keys(e)){const n=Ot[r];o[n||r]=e[r]}return o},Qn=(e,o)=>{if(!un)return;const r=document.getElementsByTagName(e)[0];if(!r)return;const n="data-rh-managed",a=r.getAttribute(n),i=a?a.split(","):[],s=Object.keys(o);for(const m of i)s.includes(m)||r.removeAttribute(m);for(const m of s){const d=o[m];d==null||d===!1?r.removeAttribute(m):d===!0?r.setAttribute(m,""):r.setAttribute(m,String(d))}s.length>0?r.setAttribute(n,s.join(",")):r.removeAttribute(n)},sr=()=>{const e={},o={};for(const r of xt){const{htmlAttributes:n,bodyAttributes:a}=r.props;n&&Object.assign(e,Jn(n)),a&&Object.assign(o,Jn(a))}Qn("html",e),Qn("body",o)},Zy=class extends u.Component{componentDidMount(){xt.push(this),sr()}componentDidUpdate(){sr()}componentWillUnmount(){const e=xt.indexOf(this);e!==-1&&xt.splice(e,1),sr()}resolveTitle(){const{title:e,titleTemplate:o,defaultTitle:r}=this.props;return e&&o?o.replace(/%s/g,()=>Array.isArray(e)?e.join(""):e):e||r||void 0}renderTitle(){const e=this.resolveTitle();if(e===void 0)return null;const o=this.props.titleAttributes||{};return u.createElement("title",Qe(o),e)}renderBase(){const{base:e}=this.props;return e?u.createElement("base",Qe(e)):null}renderMeta(){const{meta:e}=this.props;return!e||!Array.isArray(e)?null:e.map((o,r)=>u.createElement("meta",{key:r,...Qe(o)}))}renderLink(){const{link:e}=this.props;return!e||!Array.isArray(e)?null:e.map((o,r)=>u.createElement("link",{key:r,...Qe(o)}))}renderScript(){const{script:e}=this.props;return!e||!Array.isArray(e)?null:e.map((o,r)=>{const{innerHTML:n,...a}=o,i=Qe(a);return n&&(i.dangerouslySetInnerHTML={__html:n}),u.createElement("script",{key:r,...i})})}renderStyle(){const{style:e}=this.props;return!e||!Array.isArray(e)?null:e.map((o,r)=>{const{cssText:n,...a}=o,i=Qe(a);return n&&(i.dangerouslySetInnerHTML={__html:n}),u.createElement("style",{key:r,...i})})}renderNoscript(){const{noscript:e}=this.props;return!e||!Array.isArray(e)?null:e.map((o,r)=>{const{innerHTML:n,...a}=o,i=Qe(a);return n&&(i.dangerouslySetInnerHTML={__html:n}),u.createElement("noscript",{key:r,...i})})}render(){return u.createElement(u.Fragment,null,this.renderTitle(),this.renderBase(),this.renderMeta(),this.renderLink(),this.renderScript(),this.renderStyle(),this.renderNoscript())}},dr,e1=(dr=class extends u.Component{shouldComponentUpdate(e){return!Ry(Yn(this.props,"helmetData"),Yn(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,r,n){return{...o,[e.type]:[...o[e.type]||[],{...r,...this.mapNestedChildrenToProps(e,n)}]}}mapObjectTypeChildren(e,o,r,n){switch(e.type){case"title":return{...o,[e.type]:n,titleAttributes:{...r}};case"body":return{...o,bodyAttributes:{...r}};case"html":return{...o,htmlAttributes:{...r}};default:return{...o,[e.type]:{...r}}}}mapArrayTypeChildrenToProps(e,o){let r={...o};return Object.keys(e).forEach(n=>{r={...r,[n]:e[n]}}),r}warnOnInvalidChildren(e,o){return Un(Gn.some(r=>e.type===r),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 ${Gn.join(", ")} are allowed. Helmet does not support rendering <${e.type}> elements. Refer to our API for more information.`),Un(!o||typeof o=="string"||Array.isArray(o)&&!o.some(r=>typeof r!="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 r={};return u.Children.forEach(e,n=>{if(!n||!n.props)return;const{children:a,...i}=n.props,s=Object.keys(i).reduce((d,c)=>(d[Kl[c]||c]=i[c],d),{});let{type:m}=n;switch(typeof m=="symbol"?m=m.toString():this.warnOnInvalidChildren(n,a),m){case"Symbol(react.fragment)":o=this.mapChildrenToProps(a,o);break;case"link":case"meta":case"noscript":case"script":case"style":r=this.flattenArrayTypeChildren(n,r,s,a);break;default:o=this.mapObjectTypeChildren(n,o,s,a);break}}),this.mapArrayTypeChildrenToProps(r,o)}render(){const{children:e,...o}=this.props;let r={...o},{helmetData:n}=o;if(e&&(r=this.mapChildrenToProps(e,r)),n&&!(n instanceof Sr)){const a=n;n=new Sr(a.context,!0),delete r.helmetData}return jr?u.createElement(Zy,{...r}):n?u.createElement(Kn,{...r,context:n.value}):u.createElement(es.Consumer,null,a=>u.createElement(Kn,{...r,context:a}))}},$e(dr,"defaultProps",{defer:!0,encodeSpecialCharacters:!0,prioritizeSeoTags:!1}),dr);const o1={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"}},t1={highlightStyle:"background",fontWeight:700,letterSpacing:"-0.02em"},r1=e=>o1[e.metadata.id]??t1,n1=e=>e.metadata.defaultAppearance==="dark"?{...e.theme,canvas:"#ffffff",surface:"#f5f5f5",text:"#1a1a1a",muted:"rgba(0,0,0,0.6)",border:"rgba(0,0,0,0.1)",appearance:"light"}:{...e.theme,appearance:"light"},a1=e=>e.metadata.defaultAppearance==="dark"?{...e.theme,appearance:"dark"}:{...e.theme,canvas:"#0d0d0d",surface:"#1a1a1a",text:"#ffffff",muted:"rgba(255,255,255,0.62)",border:"rgba(255,255,255,0.14)",appearance:"dark"},me=({palette:e,label:o,children:r})=>t.jsxs(l.Vertical,{gap:10,flex:"1 1 320px",minWidth:0,children:[t.jsxs(l.Horizontal,{gap:8,alignItems:"center",children:[t.jsx(l.View,{width:10,height:10,borderRadius:9999,backgroundColor:e.appearance==="dark"?"#111111":"#ffffff",borderWidth:1,borderStyle:"solid",borderColor:"rgba(0,0,0,0.15)"}),t.jsx(l.Text,{fontSize:11,fontWeight:"700",letterSpacing:"0.08em",textTransform:"uppercase",children:o})]}),t.jsx(l.View,{padding:20,borderRadius:16,borderWidth:1,borderStyle:"solid",style:{backgroundColor:e.canvas,borderColor:e.border,color:e.text},children:r})]}),i1={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"},l1=e=>e.personality||i1,_e=(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},ot=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}}},s1=e=>e.typeCase==="uppercase"?"uppercase":"none",Nt=(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":o.surface};case"matte":return{backgroundColor:o.appearance==="dark"?"#181818":"#f4f4f4"};case"paper":default:return{backgroundColor:o.surface}}},To=(e,o)=>{switch(e.accentTreatment){case"gradient":return`linear-gradient(135deg, ${o.primary} 0%, ${o.secondary||o.primary} 100%)`;case"glow":return o.primary;case"stripe":return`repeating-linear-gradient(45deg, ${o.primary} 0 8px, ${o.secondary||o.primary} 8px 16px)`;case"halftone":return`radial-gradient(circle at 30% 30%, ${o.primary} 0%, ${o.secondary||o.primary} 70%)`;case"flat":default:return o.primary}},Io=(e,o)=>{if(e.accentTreatment==="glow")return`0 0 24px ${o.primary}66, 0 0 4px ${o.primary}`},Ye=e=>({letterSpacing:e.letterSpacing,textTransform:s1(e),fontStyle:e.typeStyle,fontWeight:_e(e,"heavy")}),xe=e=>({letterSpacing:e.typeCase==="uppercase"?"0.12em":"0.06em",textTransform:"uppercase",fontStyle:e.typeStyle,fontWeight:_e(e,"normal")}),c1=(e,o)=>{var n,a,i;const r=(n=e.components)==null?void 0:n[o];return(i=(a=r==null?void 0:r.views)==null?void 0:a.container)==null?void 0:i.borderRadius},d1=e=>{const o=e.tokens.rawCssVars||{},r=e.theme.border,n=e.theme.surface,a=e.theme.primary,i=o["shadow-ring"]||"rgba(0,0,0,0.08) 0px 0px 0px 1px",s=o["shadow-ring-light"]||`${r} 0px 0px 0px 1px`,m=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:i},{name:"Level 1b",label:"Light Ring",description:"Lighter ring",shadow:s},{name:"Level 2",label:"Card",description:"Ring + subtle lift",shadow:m},{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}`}]},Oo=(e,o)=>{const n={accordion:["accordion","card","alert"],tabs:["tabs","button"],panel:["card","alert"]}[o]??[o];for(const a of n){const i=c1(e,a);if(i!==void 0)return i}return"12px"},cr=({glyph:e,badge:o})=>t.jsxs(l.View,{position:"relative",display:"inline-flex",children:[t.jsx(l.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?t.jsx(l.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]}),m1=[{title:"Homes",value:"homes",icon:t.jsx(cr,{glyph:"🏠"}),content:t.jsx(l.Text,{fontSize:14,lineHeight:"20px",children:"Tokens, inputs, and feedback components share the active config."})},{title:"Experiences",value:"experiences",icon:t.jsx(cr,{glyph:"🎈",badge:"NEW"}),content:t.jsx(l.Text,{fontSize:14,lineHeight:"20px",children:"Explicit props still override the config defaults."})},{title:"Services",value:"services",icon:t.jsx(cr,{glyph:"🛎️",badge:"NEW"}),content:t.jsx(l.Text,{fontSize:14,lineHeight:"20px",children:"Each tab carries an icon. Active tab uses the theme primary underline."})}],u1=[{title:"Token",field:"token"},{title:"Value",field:"value"},{title:"Role",field:"role"}],p1=[{id:"overview",label:"Overview",href:"#"},{id:"components",label:"Components",href:"#"},{id:"tokens",label:"Tokens",href:"#"}],h1=({color:e,name:o,role:r,border:n})=>t.jsxs(l.View,{borderWidth:1,borderStyle:"solid",borderRadius:8,overflow:"hidden",minWidth:0,borderColor:n,children:[t.jsx(l.View,{height:76,backgroundColor:e}),t.jsxs(l.Vertical,{gap:4,padding:12,children:[t.jsx(l.Text,{fontSize:13,lineHeight:"18px",fontWeight:"700",children:o}),t.jsx(l.Text,{fontSize:12,lineHeight:"16px",opacity:.7,children:e}),t.jsx(l.Text,{fontSize:12,lineHeight:"16px",opacity:.72,children:r})]})]}),ue=({title:e,children:o,config:r})=>t.jsxs(l.Vertical,{gap:18,padding:24,borderWidth:1,borderStyle:"solid",borderRadius:12,style:{backgroundColor:r.theme.canvas,borderColor:r.theme.border},children:[t.jsx(l.Text,{fontSize:18,lineHeight:"24px",fontWeight:"700",color:r.theme.text,children:e}),o]}),f1=({config:e})=>{const o=r1(e),r=o.highlightStyle==="background"?e.theme.onPrimary:e.theme.primary;return t.jsx(l.View,{width:"100%",borderRadius:20,overflow:"hidden",borderWidth:1,borderStyle:"solid",borderColor:e.theme.border,style:{backgroundColor:e.theme.surface},children:t.jsxs(l.Horizontal,{width:"100%",flexWrap:"wrap",alignItems:"stretch",gap:0,children:[t.jsxs(l.Vertical,{flex:"1 1 360px",minWidth:0,padding:36,gap:20,justifyContent:"center",children:[t.jsx(ke,{variant:"outline",content:`${e.metadata.label} hero`}),t.jsx(il,{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:r,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}`),t.jsxs(l.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 —"," ",t.jsx(l.Text,{as:"span",color:e.theme.primary,fontWeight:"700",children:o.highlightStyle})," ","with weight"," ",t.jsx(l.Text,{as:"span",fontWeight:"700",children:o.fontWeight}),o.highlightFontStyle==="italic"||o.fontStyle==="italic"?", italic":"",o.textTransform==="uppercase"?", uppercase":"","."]}),t.jsxs(l.Horizontal,{gap:12,flexWrap:"wrap",children:[t.jsx(ie,{colorScheme:"primary",size:"md",children:"Get started"}),t.jsx(ie,{variant:"outline",colorScheme:"primary",size:"md",children:"View docs"})]})]}),t.jsxs(l.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:[t.jsx(l.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)"}}),t.jsxs(l.Vertical,{width:"100%",height:"100%",minHeight:260,padding:32,justifyContent:"flex-end",alignItems:"flex-start",gap:12,children:[t.jsx(l.Text,{fontWeight:"700",fontFamily:e.tokens.typography.fontFamily,style:{color:e.theme.onPrimary,fontSize:13,letterSpacing:"0.08em",textTransform:"uppercase"},children:e.metadata.label}),t.jsx(l.Text,{fontWeight:"700",fontFamily:e.tokens.typography.fontFamily,style:{color:e.theme.onPrimary,fontSize:28,lineHeight:"32px",letterSpacing:"-0.02em"},children:e.theme.primary})]})]})]})})},g1=({config:e})=>{var r,n;const o=e.tokens.colors.slice(0,5).map(a=>({token:a.name,value:a.value,role:a.role}));return t.jsxs(l.Vertical,{gap:24,children:[t.jsx(ue,{title:"Color",config:e,children:t.jsx(l.View,{display:"grid",gridTemplateColumns:"repeat(auto-fit, minmax(150px, 1fr))",gap:12,children:e.tokens.colors.slice(0,12).map(a=>t.jsx(h1,{color:a.value,name:a.name,role:a.role,text:e.theme.text,border:e.theme.border},a.name))})}),t.jsx(ue,{title:"Typography",config:e,children:t.jsxs(l.Vertical,{gap:24,children:[t.jsxs(l.Vertical,{gap:4,children:[t.jsx(l.Text,{fontFamily:e.tokens.typography.fontFamily,fontSize:48,lineHeight:"1.0",fontWeight:"700",letterSpacing:"0.96px",textTransform:"uppercase",children:"Making Life Multiplanetary"}),t.jsx(l.Text,{fontSize:10,color:e.theme.muted,children:"Display — 48px / Bold / 1.00 / Uppercase"})]}),t.jsxs(l.Vertical,{gap:4,children:[t.jsx(l.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."}),t.jsx(l.Text,{fontSize:10,color:e.theme.muted,children:"Body — 16px / 400 / 1.70"})]}),t.jsxs(l.Vertical,{gap:4,children:[t.jsx(l.Text,{fontFamily:e.tokens.typography.fontFamily,fontSize:13,lineHeight:"0.94",fontWeight:"700",letterSpacing:"1.17px",textTransform:"uppercase",children:"Falcon 9 · Starship · Dragon"}),t.jsx(l.Text,{fontSize:10,color:e.theme.muted,children:"Nav Bold — 13px / 700 / 0.94 / Uppercase"})]}),t.jsxs(l.Vertical,{gap:4,children:[t.jsx(l.Text,{fontFamily:e.tokens.typography.fontFamily,fontSize:12,lineHeight:"1.0",fontWeight:"400",letterSpacing:"1px",textTransform:"uppercase",children:"Mission Overview"}),t.jsx(l.Text,{fontSize:10,color:e.theme.muted,children:"Caption — 12px / 400 / 1.00 / Uppercase"})]}),t.jsxs(l.Vertical,{gap:4,children:[t.jsx(l.Text,{fontFamily:e.tokens.typography.fontFamily,fontSize:10,lineHeight:"0.94",fontWeight:"400",letterSpacing:"1px",textTransform:"uppercase",children:"Launch Date: 2026-04-15"}),t.jsx(l.Text,{fontSize:10,color:e.theme.muted,children:"Micro — 10px / 400 / 0.94 / Uppercase"})]}),t.jsx(l.Horizontal,{gap:10,flexWrap:"wrap",marginTop:12,children:e.tokens.typography.fontSizes.map(a=>t.jsx(ke,{variant:"outline",content:a},a))})]})}),t.jsx(ue,{title:"Spacing, Radius, Shadow",config:e,children:t.jsxs(l.Vertical,{gap:18,children:[t.jsx(l.Horizontal,{gap:12,flexWrap:"wrap",alignItems:"flex-end",children:e.tokens.spacing.slice(0,10).map(a=>t.jsxs(l.Vertical,{gap:8,alignItems:"center",children:[t.jsx(l.View,{width:a,minWidth:4,height:24,borderRadius:2,backgroundColor:e.theme.primary}),t.jsx(l.Text,{fontSize:11,color:e.theme.muted,children:a})]},a))}),t.jsx(l.Horizontal,{gap:12,flexWrap:"wrap",children:e.tokens.radii.slice(0,6).map(a=>t.jsxs(l.Vertical,{gap:8,alignItems:"center",children:[t.jsx(l.View,{width:64,height:64,borderRadius:a,borderWidth:1,borderStyle:"solid",backgroundColor:e.theme.surface,borderColor:e.theme.border}),t.jsx(l.Text,{fontSize:11,color:e.theme.muted,children:a})]},a))}),t.jsx(l.View,{width:"100%",maxWidth:"100%",overflowX:"auto",style:{WebkitOverflowScrolling:"touch",color:e.theme.text},children:t.jsx(Ie,{views:(n=(r=e.components)==null?void 0:r.table)==null?void 0:n.views,children:t.jsx(Ie.Template,{caption:"First extracted color tokens",columns:u1,data:o})})})]})})]})},Zn=({palette:e})=>t.jsxs(ge,{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:[t.jsx(ge.Header,{children:t.jsxs(l.Horizontal,{alignItems:"center",justifyContent:"space-between",gap:12,flexWrap:"wrap",children:[t.jsxs(l.Horizontal,{alignItems:"baseline",gap:6,children:[t.jsx(l.Text,{fontSize:24,fontWeight:"800",color:e.text,children:"$182"}),t.jsx(l.Text,{fontSize:14,color:e.muted,children:"night"})]}),t.jsx(ke,{variant:"filled",content:"Best value"})]})}),t.jsx(ge.Content,{children:t.jsxs(l.Vertical,{gap:12,children:[t.jsxs(l.Horizontal,{gap:0,borderRadius:10,borderWidth:1,borderStyle:"solid",borderColor:e.border,overflow:"hidden",children:[t.jsxs(l.Vertical,{flex:1,padding:10,gap:2,borderRightWidth:1,borderRightStyle:"solid",borderColor:e.border,children:[t.jsx(l.Text,{fontSize:10,fontWeight:"700",letterSpacing:"0.06em",color:e.text,children:"CHECK-IN"}),t.jsx(l.Text,{fontSize:14,color:e.text,children:"Mar 12, 2026"})]}),t.jsxs(l.Vertical,{flex:1,padding:10,gap:2,children:[t.jsx(l.Text,{fontSize:10,fontWeight:"700",letterSpacing:"0.06em",color:e.text,children:"CHECKOUT"}),t.jsx(l.Text,{fontSize:14,color:e.text,children:"Mar 18, 2026"})]})]}),t.jsxs(l.Vertical,{padding:10,gap:2,borderRadius:10,borderWidth:1,borderStyle:"solid",borderColor:e.border,children:[t.jsx(l.Text,{fontSize:10,fontWeight:"700",letterSpacing:"0.06em",color:e.text,children:"GUESTS"}),t.jsx(l.Text,{fontSize:14,color:e.text,children:"2 adults"})]}),t.jsx(ie,{isFilled:!0,size:"lg",children:"Reserve"}),t.jsx(It,{}),t.jsxs(l.Vertical,{gap:6,children:[t.jsxs(l.Horizontal,{justifyContent:"space-between",children:[t.jsx(l.Text,{fontSize:14,color:e.text,children:"$182 × 6 nights"}),t.jsx(l.Text,{fontSize:14,color:e.text,children:"$1,092"})]}),t.jsxs(l.Horizontal,{justifyContent:"space-between",children:[t.jsx(l.Text,{fontSize:14,color:e.text,children:"Cleaning fee"}),t.jsx(l.Text,{fontSize:14,color:e.text,children:"$48"})]}),t.jsxs(l.Horizontal,{justifyContent:"space-between",children:[t.jsx(l.Text,{fontSize:14,color:e.text,children:"Service fee"}),t.jsx(l.Text,{fontSize:14,color:e.text,children:"$165"})]})]}),t.jsx(It,{}),t.jsxs(l.Horizontal,{justifyContent:"space-between",children:[t.jsx(l.Text,{fontSize:15,fontWeight:"700",color:e.text,children:"Total before taxes"}),t.jsx(l.Text,{fontSize:15,fontWeight:"700",color:e.text,children:"$1,305"})]})]})})]}),ea=[{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"}],oa=({palette:e,tier:o,personality:r})=>{const n=ot(r),a=Nt(r,e),i=To(r,e),s=Io(r,e);return t.jsx(l.View,{width:"min(100%, 280px)",borderRadius:r.cardRadius,overflow:"hidden",borderWidth:o.featured?0:1,borderStyle:"solid",style:{...o.featured?{background:i,boxShadow:s}:a,borderColor:e.border,color:o.featured?e.onPrimary:e.text},children:t.jsxs(l.Vertical,{gap:n.gap,padding:n.padding,children:[t.jsxs(l.Vertical,{gap:6,children:[t.jsxs(l.Horizontal,{alignItems:"center",justifyContent:"space-between",children:[t.jsx(l.Text,{fontSize:13,color:o.featured?e.onPrimary:e.text,style:xe(r),children:o.name}),o.featured?t.jsx(l.View,{paddingHorizontal:10,paddingVertical:4,borderRadius:r.badgeRadius,backgroundColor:"rgba(255,255,255,0.22)",children:t.jsxs(l.Horizontal,{gap:4,alignItems:"center",children:[t.jsx(l.Text,{fontSize:11,color:e.onPrimary,style:{lineHeight:1},children:r.signatureMotif}),t.jsx(l.Text,{fontSize:10,color:e.onPrimary,style:xe(r),children:r.voice.includes("mission")?"PRIORITY":"POPULAR"})]})}):null]}),t.jsx(l.Text,{fontSize:13,lineHeight:"18px",color:o.featured?"rgba(255,255,255,0.85)":e.muted,style:{fontStyle:r.typeStyle},children:o.tagline})]}),t.jsxs(l.Horizontal,{alignItems:"baseline",gap:4,children:[t.jsx(l.Text,{fontSize:n.large+8,color:o.featured?e.onPrimary:e.text,style:Ye(r),children:o.price}),o.period?t.jsx(l.Text,{fontSize:14,color:o.featured?"rgba(255,255,255,0.85)":e.muted,style:{fontStyle:r.typeStyle},children:o.period}):null]}),t.jsx(l.Vertical,{gap:8,children:o.features.map(m=>t.jsxs(l.Horizontal,{gap:8,alignItems:"center",children:[t.jsx(l.View,{width:18,height:18,borderRadius:r.cornerStyle==="sharp"?2:9999,backgroundColor:o.featured?"rgba(255,255,255,0.22)":e.primary,alignItems:"center",justifyContent:"center",style:{display:"flex",flexShrink:0},children:t.jsx(l.Text,{fontSize:11,color:e.onPrimary,style:{lineHeight:1,fontWeight:_e(r,"heavy")},children:r.cornerStyle==="sharp"?"+":"✓"})}),t.jsx(l.Text,{fontSize:13,color:o.featured?e.onPrimary:e.text,style:{textTransform:r.typeCase==="uppercase"?"uppercase":"none",letterSpacing:r.typeCase==="uppercase"?"0.04em":"normal",fontStyle:r.typeStyle},children:m})]},m))}),t.jsx(l.View,{alignSelf:"stretch",paddingHorizontal:20,paddingVertical:12,borderRadius:r.pillRadius,alignItems:"center",justifyContent:"center",style:{display:"flex",cursor:"pointer",backgroundColor:o.featured?"rgba(255,255,255,0.95)":e.text},children:t.jsx(l.Text,{fontSize:14,color:o.featured?e.text:e.canvas,style:{...xe(r),letterSpacing:r.typeCase==="uppercase"?"0.08em":"0.02em"},children:o.ctaLabel})})]})})},ta=({palette:e,personality:o})=>{const r=ot(o),n=Nt(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",i=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 t.jsx(l.View,{width:"min(100%, 320px)",borderRadius:o.cardRadius,overflow:"hidden",borderWidth:1,borderStyle:"solid",style:{...n,borderColor:e.border,color:e.text},children:t.jsxs(l.Vertical,{gap:r.gap,padding:r.padding,children:[t.jsx(l.View,{height:120,borderRadius:o.cardRadius,style:{background:o.accentTreatment==="gradient"?`linear-gradient(135deg, ${e.primary}33 0%, ${e.secondary||e.primary}33 100%)`:e.appearance==="dark"?"rgba(255,255,255,0.06)":"rgba(0,0,0,0.04)"}}),t.jsxs(l.Vertical,{gap:4,children:[t.jsxs(l.Horizontal,{alignItems:"center",justifyContent:"space-between",children:[t.jsx(l.Text,{fontSize:15,color:e.text,style:Ye(o),children:a}),t.jsx(l.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:t.jsx(l.Text,{fontSize:10,color:e.text,style:xe(o),children:"IN STOCK"})})]}),t.jsx(l.Text,{fontSize:12,color:e.muted,style:{fontStyle:o.typeStyle,textTransform:o.typeCase==="uppercase"?"uppercase":"none",letterSpacing:o.typeCase==="uppercase"?"0.04em":"normal"},children:i})]}),t.jsxs(l.Horizontal,{alignItems:"baseline",justifyContent:"space-between",children:[t.jsxs(l.Horizontal,{alignItems:"baseline",gap:6,children:[t.jsx(l.Text,{fontSize:24,color:e.text,style:Ye(o),children:"$42"}),t.jsx(l.Text,{fontSize:13,color:e.muted,style:{textDecoration:"line-through"},children:"$56"})]}),t.jsx(l.Text,{fontSize:12,color:e.success||e.muted,style:xe(o),children:"FREE SHIPPING"})]}),t.jsx(l.View,{alignSelf:"stretch",paddingHorizontal:20,paddingVertical:12,borderRadius:o.pillRadius,alignItems:"center",justifyContent:"center",style:{display:"flex",cursor:"pointer",background:To(o,e),boxShadow:Io(o,e)},children:t.jsx(l.Text,{fontSize:14,color:e.onPrimary,style:{...xe(o),letterSpacing:o.typeCase==="uppercase"?"0.08em":"0.02em"},children:"Add to cart"})})]})})},ra=({palette:e,personality:o})=>{const r=ot(o),n=Nt(o,e),a=o.signatureMotif,i=o.voice.includes("athletic")?"★":o.voice.includes("mission")||o.voice.includes("futurist")?"◉":"♥",s=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",m=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 t.jsxs(l.View,{position:"relative",width:"min(100%, 320px)",children:[t.jsx(l.View,{position:"absolute",top:-10,left:16,paddingHorizontal:12,paddingVertical:6,borderRadius:o.badgeRadius,zIndex:2,style:{background:To(o,e),boxShadow:Io(o,e)||(e.appearance==="dark"?"0 6px 14px rgba(0,0,0,0.5)":"0 6px 14px rgba(0,0,0,0.12)")},children:t.jsxs(l.Horizontal,{gap:6,alignItems:"center",children:[t.jsx(l.Text,{fontSize:11,color:e.onPrimary,style:{lineHeight:1,fontWeight:_e(o,"heavy")},children:a}),t.jsx(l.Text,{fontSize:10,color:e.onPrimary,style:xe(o),children:d})]})}),t.jsx(l.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:t.jsx(l.Text,{fontSize:16,color:i==="♥"&&e.error||e.primary,style:{lineHeight:1},children:i})}),t.jsx(l.View,{width:"100%",borderRadius:o.cardRadius,overflow:"hidden",borderWidth:1,borderStyle:"solid",style:{...n,borderColor:e.border,color:e.text},children:t.jsxs(l.Vertical,{gap:r.gap,padding:r.padding,children:[t.jsx(l.View,{height:140,borderRadius:o.cardRadius,style:{background:o.accentTreatment==="gradient"?`linear-gradient(135deg, ${e.primary}33 0%, ${e.secondary||e.primary}33 100%)`:e.appearance==="dark"?"rgba(255,255,255,0.06)":"rgba(0,0,0,0.04)"}}),t.jsxs(l.Vertical,{gap:6,children:[t.jsxs(l.Horizontal,{gap:6,alignItems:"center",children:[t.jsx(l.Text,{fontSize:13,color:e.warning||e.primary,style:{lineHeight:1},children:"★★★★★"}),t.jsx(l.Text,{fontSize:12,color:e.muted,children:"4.9 · 1,284 reviews"})]}),t.jsx(l.Text,{fontSize:18,color:e.text,style:Ye(o),children:s}),t.jsx(l.Text,{fontSize:12,color:e.muted,style:{fontStyle:o.typeStyle,textTransform:o.typeCase==="uppercase"?"uppercase":"none",letterSpacing:o.typeCase==="uppercase"?"0.04em":"normal"},children:m})]}),t.jsxs(l.Horizontal,{alignItems:"baseline",justifyContent:"space-between",children:[t.jsxs(l.Horizontal,{alignItems:"baseline",gap:6,children:[t.jsx(l.Text,{fontSize:26,color:e.text,style:Ye(o),children:"$189"}),t.jsx(l.Text,{fontSize:13,color:e.muted,style:{textDecoration:"line-through"},children:"$249"})]}),t.jsx(l.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:t.jsx(l.Text,{fontSize:10,color:e.text,style:xe(o),children:"–24%"})})]}),t.jsxs(l.Horizontal,{gap:8,children:[t.jsx(l.View,{flex:1,paddingHorizontal:16,paddingVertical:12,borderRadius:o.pillRadius,alignItems:"center",justifyContent:"center",style:{display:"flex",cursor:"pointer",background:To(o,e),boxShadow:Io(o,e)},children:t.jsx(l.Text,{fontSize:13,color:e.onPrimary,style:{...xe(o),letterSpacing:o.typeCase==="uppercase"?"0.08em":"0.02em"},children:"Buy now"})}),t.jsx(l.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:t.jsx(l.Text,{fontSize:13,color:e.text,style:{...xe(o),letterSpacing:o.typeCase==="uppercase"?"0.08em":"0.02em"},children:"Add to cart"})})]})]})})]})},x1=[{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"}],vr=(e,o)=>{const r=e.replace("#","").padEnd(6,"0").slice(0,6),n=parseInt(r.slice(0,2),16),a=parseInt(r.slice(2,4),16),i=parseInt(r.slice(4,6),16);return[n,a,i].some(Number.isNaN)?e:`rgba(${n}, ${a}, ${i}, ${o})`},Tr=e=>typeof e=="string"&&/^#([0-9a-f]{3}){1,2}$/i.test(e),je=(e,o,r)=>Tr(e)?vr(e,o):e.startsWith("rgba")||e.startsWith("rgb")?e.replace(/rgba?\(([^)]+)\)/,(n,a)=>`rgba(${a.split(",").slice(0,3).map(s=>s.trim()).join(", ")}, ${o})`):r==="dark"?`rgba(255,255,255,${o})`:`rgba(0,0,0,${o})`,b1=({block:e,palette:o,personality:r})=>{const n=ot(r);let a,i;if(e.source==="ink")a=o.text,i=o.canvas;else{const p=o[e.source]||o.primary;e.intensity==="solid"?(a=p,i=o.onPrimary):(a=je(p,.32,o.appearance),i=(o.appearance==="dark",o.text))}if(r.accentTreatment==="gradient"&&e.intensity==="tint"){const p=o[e.source],h=o.secondary;Tr(p)&&Tr(h)&&(a=`linear-gradient(135deg, ${vr(p,.32)} 0%, ${vr(h,.32)} 100%)`)}if(r.accentTreatment==="stripe"&&e.intensity==="tint"){const p=je(o[e.source],.32,o.appearance),h=je(o.secondary,.18,o.appearance);a=`repeating-linear-gradient(135deg, ${p} 0 18px, ${h} 18px 36px)`}const s=je(i,.72,o.appearance),m=je(i,.55,o.appearance),d=i,c=i===o.canvas?o.text:o.canvas;return t.jsx(l.View,{width:"min(100%, 460px)",borderRadius:r.cardRadius*2,padding:n.large,style:{background:a},children:t.jsxs(l.Vertical,{gap:n.gap+6,children:[t.jsxs(l.Text,{fontSize:11,color:m,style:{...xe(r),letterSpacing:"0.12em",fontFamily:"ui-monospace, SFMono-Regular, Menlo, monospace"},children:[r.signatureMotif," ",e.slug]}),t.jsxs(l.Vertical,{gap:14,children:[t.jsx(l.Text,{fontSize:32,lineHeight:"36px",color:i,style:Ye(r),children:e.heading}),t.jsx(l.Text,{fontSize:16,lineHeight:"22px",color:s,style:{fontStyle:r.typeStyle},children:e.body})]}),t.jsx(l.View,{alignSelf:"flex-start",paddingHorizontal:28,paddingVertical:14,borderRadius:r.pillRadius,style:{backgroundColor:d,cursor:"pointer"},children:t.jsx(l.Text,{fontSize:15,color:c,style:{...xe(r),letterSpacing:r.typeCase==="uppercase"?"0.08em":"0.01em",textTransform:r.typeCase==="uppercase"?"uppercase":"none"},children:e.cta})})]})})},na=[{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"}],aa=({palette:e,article:o,personality:r})=>{const n=ot(r),a=Nt(r,e),i=e[o.badgeTone]||e.primary,s=e.secondary||e.primary,m=r.accentTreatment==="gradient"?`linear-gradient(135deg, ${je(i,.55,e.appearance)} 0%, ${je(s,.55,e.appearance)} 100%)`:r.accentTreatment==="stripe"?`repeating-linear-gradient(45deg, ${je(i,.45,e.appearance)} 0 16px, ${je(s,.25,e.appearance)} 16px 32px)`:r.accentTreatment==="halftone"?`radial-gradient(circle at 30% 30%, ${je(i,.55,e.appearance)} 0%, ${je(s,.35,e.appearance)} 70%)`:r.accentTreatment==="glow"?`radial-gradient(circle at 50% 60%, ${je(i,.45,e.appearance)} 0%, ${e.appearance==="dark"?"#050505":"#0a0a0a"} 100%)`:je(i,.32,e.appearance),d=r.voice.includes("mission")||r.voice.includes("futurist")?"◉":o.favorite,c=d==="♥"?e.error||e.primary:d==="★"&&e.warning||e.primary;return t.jsx(l.View,{width:"min(100%, 320px)",borderRadius:r.cardRadius,overflow:"hidden",borderWidth:1,borderStyle:"solid",style:{...a,borderColor:e.border,color:e.text},children:t.jsxs(l.Vertical,{gap:n.gap,padding:n.padding,children:[t.jsxs(l.View,{position:"relative",height:160,borderRadius:r.cardRadius,overflow:"hidden",style:{background:m},children:[t.jsx(l.View,{position:"absolute",top:12,left:12,paddingHorizontal:10,paddingVertical:4,borderRadius:r.badgeRadius,style:{background:To(r,{...e,primary:i}),boxShadow:Io(r,e)},children:t.jsxs(l.Horizontal,{gap:4,alignItems:"center",children:[t.jsx(l.Text,{fontSize:10,color:e.onPrimary,style:{lineHeight:1,fontWeight:_e(r,"heavy")},children:r.signatureMotif}),t.jsx(l.Text,{fontSize:10,color:e.onPrimary,style:xe(r),children:o.badge})]})}),t.jsx(l.View,{position:"absolute",top:10,right:10,width:36,height:36,borderRadius:r.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:t.jsx(l.Text,{fontSize:16,color:c,style:{lineHeight:1},children:d})})]}),t.jsxs(l.Vertical,{gap:8,children:[t.jsx(l.Text,{fontSize:11,color:e.muted,style:xe(r),children:o.category}),t.jsx(l.Text,{fontSize:18,lineHeight:"24px",color:e.text,style:Ye(r),children:o.title}),t.jsx(l.Text,{fontSize:13,lineHeight:"18px",color:e.muted,style:{fontStyle:r.typeStyle},children:o.excerpt})]}),t.jsxs(l.Horizontal,{gap:10,alignItems:"center",children:[t.jsx(l.View,{width:28,height:28,borderRadius:r.cornerStyle==="sharp"?4:9999,style:{backgroundColor:e.appearance==="dark"?"rgba(255,255,255,0.12)":"rgba(0,0,0,0.08)"}}),t.jsxs(l.Vertical,{gap:0,children:[t.jsx(l.Text,{fontSize:12,color:e.text,style:{fontWeight:_e(r,"normal"),fontStyle:r.typeStyle},children:o.author}),t.jsx(l.Text,{fontSize:11,color:e.muted,children:o.meta})]})]})]})})},ia=({palette:e,personality:o,config:r})=>{var h,f,g,x;const n=o.signatureMotif,a=e.primary,i=To(o,e),s=Io(o,e),m=((f=(h=r.tokens)==null?void 0:h.typography)==null?void 0:f.fontFamily)||((x=(g=r.tokens)==null?void 0:g.rawCssVars)==null?void 0:x.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":`${r.metadata.label}`,c=o.typeCase==="uppercase"?"EXPLORE":"Get started",p=o.typeCase==="uppercase"?"LEARN MORE":"Learn more";return t.jsxs(l.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:m,position:"relative",overflow:"hidden"},children:[o.accentTreatment==="glow"&&t.jsx(l.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"&&t.jsx(l.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"}}),t.jsxs(l.Vertical,{gap:24,style:{position:"relative"},children:[t.jsxs(l.Horizontal,{gap:10,alignItems:"center",children:[t.jsx(l.View,{width:32,height:32,borderRadius:o.cornerStyle==="pill"?9999:o.cornerStyle==="sharp"?0:8,alignItems:"center",justifyContent:"center",style:{display:"flex",background:i,boxShadow:s},children:t.jsx(l.Text,{fontSize:16,color:e.onPrimary,style:{lineHeight:1,fontWeight:_e(o,"heavy")},children:n})}),t.jsx(l.Text,{fontSize:13,color:e.muted,style:{...xe(o),letterSpacing:o.typeCase==="uppercase"?"0.18em":"0.06em"},children:r.metadata.label})]}),t.jsx(l.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:{...Ye(o),letterSpacing:o.typeCase==="uppercase"?"0.06em":o.letterSpacing,maxWidth:580,fontFamily:m},children:d}),t.jsxs(l.Horizontal,{gap:12,flexWrap:"wrap",alignItems:"center",children:[t.jsx(l.View,{paddingHorizontal:o.density==="spacious"?32:24,paddingVertical:o.density==="spacious"?16:14,borderRadius:o.pillRadius,style:{display:"flex",cursor:"pointer",background:i,boxShadow:s},children:t.jsx(l.Text,{fontSize:15,color:e.onPrimary,style:{...xe(o),letterSpacing:o.typeCase==="uppercase"?"0.14em":"0.02em",fontWeight:_e(o,"heavy"),fontFamily:m},children:c})}),t.jsx(l.View,{paddingHorizontal:24,paddingVertical:14,borderRadius:o.pillRadius,borderWidth:1,borderStyle:"solid",style:{display:"flex",cursor:"pointer",borderColor:e.text},children:t.jsx(l.Text,{fontSize:15,color:e.text,style:{...xe(o),letterSpacing:o.typeCase==="uppercase"?"0.14em":"0.02em",fontWeight:_e(o,"heavy"),fontFamily:m},children:p})})]}),t.jsx(l.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(b=>t.jsxs(l.Horizontal,{gap:8,alignItems:"center",children:[t.jsx(l.View,{width:20,height:20,borderRadius:o.cornerStyle==="sharp"?0:o.cornerStyle==="pill"?9999:4,borderWidth:1,borderStyle:"solid",style:{backgroundColor:b.value,borderColor:e.border}}),t.jsxs(l.Vertical,{gap:0,children:[t.jsx(l.Text,{fontSize:11,color:e.muted,style:xe(o),children:b.label}),t.jsx(l.Text,{fontSize:11,color:e.text,style:{fontFamily:"ui-monospace, SFMono-Regular, Menlo, monospace"},children:b.value})]})]},b.label))})]})]})},la=({palette:e,config:o})=>t.jsxs(l.Vertical,{gap:20,padding:36,alignItems:"center",borderRadius:16,style:{backgroundColor:e.surface},children:[t.jsx(ke,{variant:"outline",content:"New release"}),t.jsxs(l.Vertical,{gap:8,alignItems:"center",children:[t.jsxs(l.Text,{fontSize:36,lineHeight:"40px",fontWeight:"800",textAlign:"center",color:e.text,children:[o.metadata.label," Pro"]}),t.jsx(l.Text,{fontSize:18,lineHeight:"24px",color:e.muted,textAlign:"center",children:"Pro. Beyond."})]}),t.jsxs(l.Horizontal,{gap:12,flexWrap:"wrap",justifyContent:"center",children:[t.jsx(ie,{shape:"pill",size:"md",children:"Learn more"}),t.jsx(ie,{shape:"pill",size:"md",variant:"outline",children:"Buy"})]}),t.jsx(l.View,{width:220,height:140,borderRadius:20,backgroundColor:e.appearance==="dark"?e.canvas:e.text,opacity:.85})]}),sa=({palette:e,config:o})=>t.jsxs(ge,{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:[t.jsx(ge.Header,{children:t.jsxs(l.Horizontal,{alignItems:"center",justifyContent:"space-between",gap:12,flexWrap:"wrap",children:[t.jsx(l.Text,{color:e.text,fontWeight:"700",children:o.metadata.id==="spacex"?"Falcon 9":"Product Card"}),t.jsx(ke,{variant:"filled",content:"New"})]})}),t.jsx(ge.Content,{children:t.jsx(l.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."})}),t.jsx(ge.Footer,{children:t.jsx(ie,{size:"sm",children:o.metadata.id==="spacex"?"Explore":"Review"})})]}),ca=({palette:e})=>t.jsxs(l.Vertical,{gap:14,children:[t.jsxs(l.Horizontal,{gap:12,flexWrap:"wrap",alignItems:"center",children:[t.jsx(ie,{colorScheme:"primary",children:"Primary"}),t.jsx(ie,{colorScheme:"secondary",children:"Secondary"}),t.jsx(ie,{colorScheme:"black",children:"Black"}),t.jsx(ie,{colorScheme:"white",children:"White"})]}),t.jsxs(l.Horizontal,{gap:12,flexWrap:"wrap",alignItems:"center",children:[t.jsx(ie,{variant:"outline",colorScheme:"primary",children:"Primary"}),t.jsx(ie,{variant:"outline",colorScheme:"secondary",children:"Secondary"}),t.jsx(ie,{variant:"outline",colorScheme:"black",children:"Black"}),t.jsx(ie,{variant:"outline",colorScheme:"white",children:"White"})]}),t.jsxs(l.Horizontal,{gap:12,flexWrap:"wrap",alignItems:"center",children:[t.jsx(ie,{variant:"ghost",views:{container:{color:e.text}},children:"Ghost"}),t.jsx(ie,{variant:"link",views:{container:{color:e.primary}},children:"Link"}),t.jsx(ie,{isDisabled:!0,children:"Disabled"}),t.jsx(ie,{isLoading:!0,children:"Loading"})]})]}),da=({palette:e,config:o})=>t.jsx(l.View,{style:{color:e.text},children:t.jsxs(l.Vertical,{gap:14,children:[t.jsxs(l.Horizontal,{gap:10,flexWrap:"wrap",alignItems:"center",children:[t.jsx(ke,{content:"Badge"}),t.jsx(ke,{variant:"outline",content:"Outline"}),t.jsx(ke,{content:"Primary",views:{container:{backgroundColor:e.primary,color:e.onPrimary,borderColor:e.primary}}}),t.jsx(ke,{content:"Success",views:{container:{backgroundColor:e.success,color:e.onPrimary,borderColor:e.success}}}),t.jsx(ke,{content:"Warning",views:{container:{backgroundColor:e.warning,color:e.onPrimary,borderColor:e.warning}}}),t.jsx(ke,{content:"Error",views:{container:{backgroundColor:e.error,color:e.onPrimary,borderColor:e.error}}})]}),t.jsxs(l.Horizontal,{gap:16,flexWrap:"wrap",alignItems:"center",children:[t.jsx(ht,{status:"success",label:"Operational"}),t.jsx(ht,{status:"warning",label:"Degraded"}),t.jsx(ht,{status:"error",label:"Outage"}),t.jsx(wo,{size:"sm",loaderColor:o.theme.primary})]}),t.jsx(Dr,{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}}}),t.jsx(vl,{value:64,height:10,showLabel:!0,color:e.primary,backgroundColor:e.border,views:{container:{backgroundColor:e.border},bar:{backgroundColor:e.primary}}})]})}),ma=({palette:e,config:o,mode:r})=>{const n={container:{backgroundColor:e.surface,borderColor:e.border,color:e.text},field:{color:e.text}};return t.jsx(l.View,{style:{color:e.text},children:t.jsxs(l.Vertical,{gap:16,children:[t.jsxs(l.View,{display:"grid",gridTemplateColumns:"repeat(auto-fit, minmax(220px, 1fr))",gap:16,alignItems:"start",children:[t.jsx(we,{size:"md",label:"Name",placeholder:"Ada Lovelace",views:n}),t.jsx(Uo,{id:`forms-${o.metadata.id}-${r}`,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}}}),t.jsx(Yr,{label:"Notes",placeholder:"Add implementation notes",views:n})]}),t.jsxs(l.Horizontal,{gap:16,flexWrap:"wrap",alignItems:"center",children:[t.jsx(Kr,{label:"Email updates",defaultIsSelected:!0}),t.jsx(Yl,{label:"Standard",value:"standard",defaultIsSelected:!0}),t.jsx(Gr,{label:"Enabled",isChecked:!0})]})]})})},y1=({config:e})=>{const[o,r]=u.useState(1),n=n1(e),a=a1(e),i=l1(e);return t.jsxs(l.Vertical,{gap:24,children:[t.jsx(ue,{title:"Brand Snapshot (Light & Dark)",config:e,children:t.jsxs(l.Vertical,{gap:20,children:[t.jsx(me,{palette:n,label:"On light surface",children:t.jsx(ia,{palette:n,personality:i,config:e})}),t.jsx(me,{palette:a,label:"On dark surface",children:t.jsx(ia,{palette:a,personality:i,config:e})})]})}),t.jsx(ue,{title:"Buttons — Light & Dark",config:e,children:t.jsxs(l.Horizontal,{gap:20,flexWrap:"wrap",alignItems:"flex-start",children:[t.jsx(me,{palette:n,label:"On light surface",children:t.jsx(ca,{palette:n})}),t.jsx(me,{palette:a,label:"On dark surface",children:t.jsx(ca,{palette:a})})]})}),t.jsx(ue,{title:"Status & Feedback — Light & Dark",config:e,children:t.jsxs(l.Horizontal,{gap:20,flexWrap:"wrap",alignItems:"flex-start",children:[t.jsx(me,{palette:n,label:"On light surface",children:t.jsx(da,{palette:n,config:e})}),t.jsx(me,{palette:a,label:"On dark surface",children:t.jsx(da,{palette:a,config:e})})]})}),t.jsx(ue,{title:"Forms — Light & Dark",config:e,children:t.jsxs(l.Horizontal,{gap:20,flexWrap:"wrap",alignItems:"flex-start",children:[t.jsx(me,{palette:n,label:"On light surface",children:t.jsx(ma,{palette:n,config:e,mode:"light"})}),t.jsx(me,{palette:a,label:"On dark surface",children:t.jsx(ma,{palette:a,config:e,mode:"dark"})})]})}),t.jsx(ue,{title:"Forms (legacy preview)",config:e,children:t.jsxs(l.View,{display:"grid",gridTemplateColumns:"repeat(auto-fit, minmax(220px, 1fr))",alignItems:"start",gap:16,children:[t.jsx(we,{size:"md",label:"Name",placeholder:"Ada Lovelace"}),t.jsx(Uo,{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"}}}),t.jsx(Yr,{label:"Notes",placeholder:"Add implementation notes"}),t.jsxs(l.Vertical,{gap:12,children:[t.jsx(Kr,{label:"Email updates",defaultIsSelected:!0}),t.jsx(Yl,{label:"Standard",value:"standard",defaultIsSelected:!0}),t.jsx(Gr,{label:"Enabled",isChecked:!0}),t.jsx(Oi,{defaultValue:58,showValue:!0}),t.jsx(ji,{length:6,label:"Verification Code"})]})]})}),t.jsx(ue,{title:"Form States",config:e,children:t.jsxs(l.View,{display:"grid",gridTemplateColumns:"repeat(auto-fit, minmax(220px, 1fr))",gap:16,alignItems:"start",children:[t.jsx(we,{size:"md",label:"Default",placeholder:"Type here",helperText:"Resting state"}),t.jsx(we,{size:"md",label:"Filled",defaultValue:"Ada Lovelace",helperText:"Has value"}),t.jsx(we,{size:"md",label:"With helper",placeholder:"user@example.com",helperText:"We'll never share your email"}),t.jsx(we,{size:"md",label:"Error",defaultValue:"invalid@",error:"Please enter a valid email"}),t.jsx(we,{size:"md",label:"Disabled",isDisabled:!0,defaultValue:"Cannot edit",helperText:"Field locked"}),t.jsx(we,{size:"md",label:"Read only",defaultValue:"Read-only value",isReadOnly:!0,helperText:"View only"}),t.jsx(Uo,{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"}}}),t.jsx(Uo,{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"}}})]})}),t.jsx(ue,{title:"Elevation & Depth",config:e,children:t.jsx(l.View,{display:"grid",gridTemplateColumns:"repeat(auto-fit, minmax(200px, 1fr))",gap:20,children:d1(e).map(s=>t.jsxs(l.Vertical,{gap:12,children:[t.jsx(l.View,{height:120,borderRadius:12,backgroundColor:e.theme.canvas,style:{boxShadow:s.shadow}}),t.jsxs(l.Vertical,{gap:4,children:[t.jsxs(l.Horizontal,{gap:8,alignItems:"baseline",flexWrap:"wrap",children:[t.jsx(l.Text,{fontSize:12,fontWeight:"700",children:s.name}),t.jsx(l.Text,{fontSize:11,fontWeight:"600",color:e.theme.primary,children:s.label})]}),t.jsx(l.Text,{fontSize:11,color:e.theme.muted,children:s.description}),t.jsx(l.Text,{fontSize:10,color:e.theme.muted,style:{wordBreak:"break-word",opacity:.8},children:s.shadow})]})]},s.name))})}),t.jsx(ue,{title:"Color Blocks",config:e,children:t.jsx(l.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(([s,m,d])=>{const c=e.theme[s];return t.jsxs(l.Vertical,{gap:0,borderRadius:12,overflow:"hidden",borderWidth:1,borderStyle:"solid",borderColor:e.theme.border,children:[t.jsx(l.View,{height:88,backgroundColor:c}),t.jsxs(l.Vertical,{gap:4,padding:12,backgroundColor:e.theme.surface,children:[t.jsx(l.Text,{fontSize:13,fontWeight:"700",children:m}),t.jsxs(l.Text,{fontSize:11,color:e.theme.muted,children:["theme.",s]}),t.jsx(l.Text,{fontSize:11,color:e.theme.muted,children:c})]})]},s)})})}),t.jsx(ue,{title:"Pricing — Booking (Light & Dark)",config:e,children:t.jsxs(l.Horizontal,{gap:20,flexWrap:"wrap",alignItems:"flex-start",children:[t.jsx(me,{palette:n,label:"On light surface",children:t.jsx(Zn,{palette:n})}),t.jsx(me,{palette:a,label:"On dark surface",children:t.jsx(Zn,{palette:a})})]})}),t.jsx(ue,{title:"Pricing — SaaS Tiers (Light & Dark)",config:e,children:t.jsxs(l.Vertical,{gap:20,children:[t.jsx(me,{palette:n,label:"On light surface",children:t.jsx(l.Horizontal,{gap:16,flexWrap:"wrap",alignItems:"stretch",children:ea.map(s=>t.jsx(oa,{palette:n,tier:s,personality:i},s.name))})}),t.jsx(me,{palette:a,label:"On dark surface",children:t.jsx(l.Horizontal,{gap:16,flexWrap:"wrap",alignItems:"stretch",children:ea.map(s=>t.jsx(oa,{palette:a,tier:s,personality:i},s.name))})})]})}),t.jsx(ue,{title:"Pricing — Product (Light & Dark)",config:e,children:t.jsxs(l.Horizontal,{gap:20,flexWrap:"wrap",alignItems:"flex-start",children:[t.jsx(me,{palette:n,label:"On light surface",children:t.jsx(ta,{palette:n,personality:i})}),t.jsx(me,{palette:a,label:"On dark surface",children:t.jsx(ta,{palette:a,personality:i})})]})}),t.jsx(ue,{title:"Pricing — Featured w/ Badge & Favorite (Light & Dark)",config:e,children:t.jsxs(l.Horizontal,{gap:20,flexWrap:"wrap",alignItems:"flex-start",children:[t.jsx(me,{palette:n,label:"On light surface",children:t.jsx(ra,{palette:n,personality:i})}),t.jsx(me,{palette:a,label:"On dark surface",children:t.jsx(ra,{palette:a,personality:i})})]})}),t.jsx(ue,{title:"Content — Color Block Cards",config:e,children:t.jsx(l.Horizontal,{gap:20,flexWrap:"wrap",alignItems:"flex-start",children:x1.map(s=>t.jsx(b1,{block:s,palette:n,personality:i},s.slug))})}),t.jsx(ue,{title:"Content — Article Cards w/ Badge & Favorite (Light & Dark)",config:e,children:t.jsxs(l.Vertical,{gap:20,children:[t.jsx(me,{palette:n,label:"On light surface",children:t.jsx(l.Horizontal,{gap:16,flexWrap:"wrap",alignItems:"stretch",children:na.map(s=>t.jsx(aa,{palette:n,article:s,personality:i},s.id))})}),t.jsx(me,{palette:a,label:"On dark surface",children:t.jsx(l.Horizontal,{gap:16,flexWrap:"wrap",alignItems:"stretch",children:na.map(s=>t.jsx(aa,{palette:a,article:s,personality:i},s.id))})})]})}),t.jsx(ue,{title:"CTA Card — Light & Dark",config:e,children:t.jsxs(l.Horizontal,{gap:20,flexWrap:"wrap",alignItems:"flex-start",children:[t.jsx(me,{palette:n,label:"On light surface",children:t.jsx(la,{palette:n,config:e})}),t.jsx(me,{palette:a,label:"On dark surface",children:t.jsx(la,{palette:a,config:e})})]})}),t.jsx(ue,{title:"Product Card — Light & Dark",config:e,children:t.jsxs(l.Horizontal,{gap:20,flexWrap:"wrap",alignItems:"flex-start",children:[t.jsx(me,{palette:n,label:"On light surface",children:t.jsx(sa,{palette:n,config:e})}),t.jsx(me,{palette:a,label:"On dark surface",children:t.jsx(sa,{palette:a,config:e})})]})}),t.jsx(ue,{title:"Content & Layout",config:e,children:t.jsxs(l.Vertical,{gap:24,children:[t.jsxs(l.Horizontal,{gap:16,flexWrap:"wrap",alignItems:"stretch",children:[t.jsxs(ge,{width:"min(100%, 320px)",children:[t.jsx(ge.Header,{children:t.jsxs(l.Horizontal,{alignItems:"center",justifyContent:"space-between",gap:12,flexWrap:"wrap",children:[t.jsx(l.Text,{fontWeight:"700",children:e.metadata.id==="spacex"?"Falcon 9":"Product Card"}),t.jsx(ke,{variant:"filled",content:"New"})]})}),t.jsx(ge.Content,{children:t.jsx(l.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."})}),t.jsx(ge.Footer,{children:t.jsx(ie,{size:"sm",children:e.metadata.id==="spacex"?"Explore":"Review"})})]}),t.jsxs(ge,{width:"min(100%, 320px)",children:[t.jsx(ge.Header,{children:t.jsxs(l.Horizontal,{gap:12,alignItems:"center",justifyContent:"space-between",flexWrap:"wrap",children:[t.jsxs(l.Horizontal,{gap:12,alignItems:"center",children:[t.jsx(Ma,{fallback:e.metadata.label.slice(0,2)}),t.jsxs(l.Vertical,{gap:2,children:[t.jsx(l.Text,{fontWeight:"700",children:e.metadata.id==="spacex"?"Starship":e.metadata.label}),t.jsx(l.Text,{fontSize:12,color:e.theme.muted,children:e.metadata.id==="spacex"?"Multiplanetary mission":"Config-driven preview"})]})]}),t.jsx(ke,{variant:"outline",content:"Active"})]})}),t.jsx(ge.Content,{children:e.metadata.id==="spacex"?t.jsx(l.Text,{fontSize:14,lineHeight:"20px",children:"The most powerful launch vehicle ever developed. Designed to carry crew and cargo to Mars and beyond."}):t.jsx(Dr,{variant:"info",title:"Config active",description:"This alert is rendered by the shared component."})})]})]}),t.jsx(f1,{config:e}),t.jsx(Ta,{ratio:16/9,borderRadius:12,overflow:"hidden",children:t.jsx(l.View,{width:"100%",height:"100%",backgroundColor:e.theme.primary,children:t.jsxs(l.Vertical,{height:"100%",alignItems:"center",justifyContent:"center",gap:8,children:[t.jsx(l.Text,{fontWeight:"700",color:e.theme.onPrimary,children:"16:9 Aspect Ratio"}),t.jsx(ke,{content:"Config primary color"})]})})}),t.jsxs(Me,{children:[t.jsx(Me.Content,{children:[1,2,3].map(s=>t.jsx(Me.Item,{children:t.jsx(l.View,{height:200,borderRadius:12,alignItems:"center",justifyContent:"center",backgroundColor:e.theme.surface,borderColor:e.theme.border,borderWidth:1,borderStyle:"solid",children:t.jsxs(l.Text,{fontSize:24,fontWeight:"700",children:["Slide ",s]})})},s))}),t.jsxs(l.Horizontal,{gap:12,marginTop:12,justifyContent:"center",children:[t.jsx(Me.Previous,{}),t.jsx(Me.Next,{})]})]})]})}),t.jsx(ue,{title:"Navigation & Interactive",config:e,children:t.jsxs(l.Vertical,{gap:18,children:[t.jsxs(l.Vertical,{gap:20,children:[t.jsxs(l.Vertical,{gap:8,children:[t.jsx(l.Text,{fontSize:12,fontWeight:"700",color:e.theme.muted,children:"With icons"}),t.jsx(vo,{tabs:m1,defaultValue:"homes",views:{tab:{borderRadius:Oo(e,"tabs")},activeTab:{borderRadius:Oo(e,"tabs")}}})]}),t.jsxs(l.Vertical,{gap:8,children:[t.jsx(l.Text,{fontSize:12,fontWeight:"700",color:e.theme.muted,children:"Without icons"}),t.jsx(vo,{defaultValue:"overview",views:{tab:{borderRadius:Oo(e,"tabs")},activeTab:{borderRadius:Oo(e,"tabs")}},tabs:[{title:"Overview",value:"overview",content:t.jsx(l.Text,{fontSize:14,lineHeight:"20px",children:"Tokens and components share the active config."})},{title:"Usage",value:"usage",content:t.jsx(l.Text,{fontSize:14,lineHeight:"20px",children:"Explicit props still override the config defaults."})},{title:"Audit",value:"audit",content:t.jsx(l.Text,{fontSize:14,lineHeight:"20px",children:"Plain text tabs without icons."})}]})]})]}),t.jsx(io,{items:p1,orientation:"horizontal",defaultActiveItemId:"components"}),(()=>{const s=Oo(e,"accordion"),m={borderWidth:0,borderTopWidth:0,borderBottomWidth:0,borderLeftWidth:0,borderRightWidth:0,marginBottom:0,borderRadius:0},d={...m,borderTopWidth:1,borderTopStyle:"solid",borderTopColor:e.theme.border};return t.jsxs(ze,{defaultValue:"tokens",collapsible:!0,shape:"rounded",views:{container:{borderRadius:s,overflow:"hidden",borderWidth:1,borderStyle:"solid",borderColor:e.theme.border}},children:[t.jsxs(ze.Item,{value:"tokens",...m,views:{item:m,trigger:{borderRadius:0}},children:[t.jsx(ze.Trigger,{children:"Token extraction"}),t.jsx(ze.Content,{children:t.jsxs(l.Text,{color:e.theme.muted,children:[Object.keys(e.tokens.rawCssVars).length," raw CSS variables were extracted from ",e.metadata.sourcePath,"."]})})]}),t.jsxs(ze.Item,{value:"overrides",...d,views:{item:d,trigger:{borderRadius:0}},children:[t.jsx(ze.Trigger,{children:"Override behavior"}),t.jsx(ze.Content,{children:t.jsx(l.Text,{color:e.theme.muted,children:"Props passed directly to components override the design-system defaults."})})]})]})})(),t.jsx(It,{label:"advanced tools"}),t.jsxs(l.Horizontal,{gap:16,flexWrap:"wrap",alignItems:"center",children:[t.jsx(Jr,{color:e.theme.primary,children:"Toggle Button"}),t.jsx(ll,{color:e.theme.primary,items:[{id:"left",value:"Left"},{id:"center",value:"Center"},{id:"right",value:"Right"}]}),t.jsx(Lt,{content:"Tooltip message",children:t.jsx(ie,{variant:"outline",children:"Hover for Tooltip"})}),t.jsxs(Ce,{children:[t.jsx(Ce.Trigger,{children:t.jsx(ie,{variant:"ghost",children:"Hover Card"})}),t.jsx(Ce.Content,{children:t.jsxs(l.Vertical,{gap:4,padding:12,children:[t.jsx(l.Text,{fontWeight:"700",children:"Detailed Info"}),t.jsx(l.Text,{fontSize:12,opacity:.8,children:"Hover cards provide more context."})]})})]}),t.jsx(hl,{value:e.theme.primary}),t.jsx(Il,{shareData:{url:"https://example.com",title:"Example"}}),t.jsx(Br,{to:"#",children:"Inline Link component"})]}),t.jsx(l.Horizontal,{gap:16,flexWrap:"wrap",alignItems:"center",children:t.jsx(wl,{currentPage:o,totalPages:10,onPageChange:r})})]})})]})},k1=({config:e})=>{var o;return t.jsxs(ga,{config:e,children:[t.jsx(e1,{children:(o=e.metadata.googleFontLinks)==null?void 0:o.map(r=>t.jsx("link",{rel:"stylesheet",href:r},r))}),t.jsx(l.View,{minHeight:"100vh",padding:28,fontFamily:e.tokens.typography.fontFamily,style:{backgroundColor:e.theme.canvas,color:e.theme.text,textTransform:e.metadata.id==="spacex"?"uppercase":"none"},children:t.jsxs(l.Vertical,{gap:28,children:[t.jsxs(l.Vertical,{gap:12,maxWidth:900,children:[t.jsxs(l.Text,{as:"h1",fontSize:44,lineHeight:"48px",fontWeight:"800",fontFamily:e.tokens.typography.fontFamily,children:[e.metadata.label," Design System"]}),t.jsxs(l.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."]})]}),t.jsxs(l.Vertical,{gap:28,children:[t.jsx(g1,{config:e}),t.jsx(y1,{config:e})]})]})})]})};exports.Accordion=ze;exports.Alert=Dr;exports.ArrowIcon=bm;exports.AspectRatio=Ta;exports.AttachmentGroup=cl;exports.AttachmentIcon=Go;exports.AttachmentPreview=Uf;exports.AudioIcon=jo;exports.AudioInput=$m;exports.AudioWaveform=$r;exports.Avatar=Ma;exports.BackIcon=Ld;exports.Background=Ul;exports.Badge=ke;exports.BatteryIcon=Td;exports.BluetoothIcon=hm;exports.BoldArrowIcon=xm;exports.BookmarkIcon=Id;exports.Button=ie;exports.CHART_COLORS=Re;exports.CalendarIcon=nm;exports.CameraIcon=pm;exports.Card=ge;exports.Carousel=Me;exports.Chart=Nu;exports.ChartIcon=$d;exports.ChatInput=Ol;exports.ChatWidget=Gl;exports.ChatWidgetComponent=dn;exports.ChatWidgetWidget=Sy;exports.CheckIcon=_d;exports.Checkbox=Kr;exports.ChevronIcon=se;exports.ClockIcon=am;exports.CloseEyeIcon=Pr;exports.CloseIcon=ve;exports.CloudIcon=Fd;exports.ColorInput=Op;exports.ColorPicker=hl;exports.ComboBox=f0;exports.Command=Mo;exports.ContextMenu=Ro;exports.CookieConsent=Xu;exports.CopyIcon=Rd;exports.CountryPicker=Kp;exports.CreditCardIcon=em;exports.CropIcon=Cm;exports.DEFAULT_CHART_COLORS=Oa;exports.DatePicker=i0;exports.DeleteIcon=zd;exports.DesignSystem=k1;exports.DesignSystemProvider=ga;exports.Divider=Wx;exports.DocumentIcon=Dd;exports.DownloadIcon=Hd;exports.DragAndDrop=_g;exports.DragAndDropComponent=sl;exports.DragHandleIcon=md;exports.DragHandleLinesIcon=jm;exports.Drawer=ao;exports.DropZone=qg;exports.DropdownMenu=Qo;exports.DustBinIcon=Mt;exports.EditIcon=Md;exports.EmojiPicker=lx;exports.ErrorIcon=Pt;exports.ExternalLinkIcon=ja;exports.FacebookIcon=yd;exports.FileIcon=oo;exports.FileImage=rp;exports.FileSVG=tp;exports.FilterIcon=rm;exports.FolderIcon=dd;exports.FormikChatInput=G0;exports.FormikCheckbox=I0;exports.FormikColorInput=X0;exports.FormikComboBox=hf;exports.FormikCountryPicker=Z0;exports.FormikDatePicker=J0;exports.FormikEmojiPicker=qf;exports.FormikForm=w0;exports.FormikIconPicker=Df;exports.FormikOTPInput=jf;exports.FormikPassword=uf;exports.FormikRadio=H0;exports.FormikSelect=of;exports.FormikSelector=Tf;exports.FormikSlider=Cf;exports.FormikSwitch=rf;exports.FormikTagInput=af;exports.FormikTextArea=sf;exports.FormikTextField=df;exports.FormikToggle=zf;exports.FormikToggleGroup=Hf;exports.FormikUploader=Pi;exports.GiftIcon=Gd;exports.Gradient=fl;exports.HeartIcon=jd;exports.HelpIcon=cd;exports.HomeIcon=Wd;exports.HoverCard=Ce;exports.Icon=bt;exports.IconPicker=cx;exports.ImageIcon=pd;exports.InfoIcon=qe;exports.InstagramIcon=xd;exports.LayoutIcon=Qd;exports.LikeIcon=um;exports.Link=Br;exports.LinkIcon=Jd;exports.LinkedinIcon=kd;exports.Loader=wo;exports.LoadingSpinnerIcon=Hr;exports.LockIcon=Ad;exports.LogoutIcon=Xd;exports.MagicWandIcon=dm;exports.MapPinIcon=im;exports.MediaPreview=Yf;exports.MenuIcon=lm;exports.Menubar=lo;exports.MessageLayout=Wm;exports.MessageView=Ra;exports.MicrophoneIcon=Mr;exports.MinusIcon=ya;exports.Modal=no;exports.MoonIcon=Bd;exports.MoreIcon=om;exports.MousePointerIcon=va;exports.NavigationMenu=io;exports.NotificationIcon=Vd;exports.OTPInput=ji;exports.OpenEyeIcon=Ar;exports.Pagination=wl;exports.PanelIcon=wa;exports.Password=s0;exports.PauseIcon=Sd;exports.PlayIcon=ka;exports.PlusIcon=Pd;exports.PowerOffIcon=Kd;exports.PrintIcon=cm;exports.ProfileIcon=Ed;exports.ProgressBar=vl;exports.RefreshIcon=sm;exports.Resizable=sn;exports.RotateIcon=Ud;exports.SaveIcon=vd;exports.SearchIcon=yt;exports.Select=Uo;exports.Selector=zp;exports.SendIcon=Wr;exports.Separator=It;exports.SettingsIcon=Ca;exports.ShapeIcon=qd;exports.ShareButton=Il;exports.ShareIcon=Sa;exports.ShieldIcon=Yd;exports.Sidebar=Zo;exports.Slider=Oi;exports.SliderIcon=km;exports.SpinnerIcon=ym;exports.StarIcon=wd;exports.StatusIndicator=ht;exports.StopIcon=Wt;exports.SuccessIcon=Er;exports.Switch=Gr;exports.Table=Ie;exports.Tabs=vo;exports.TagInput=b0;exports.TextArea=Yr;exports.TextField=we;exports.TextIcon=Nd;exports.ThreadsIcon=Cd;exports.TickIcon=Ht;exports.Title=il;exports.Toast=fb;exports.Toggle=Jr;exports.ToggleGroup=ll;exports.Tooltip=Lt;exports.TrashIcon=tm;exports.TwitchIcon=gd;exports.TwitterIcon=hd;exports.UnLikeIcon=mm;exports.UnlockIcon=fm;exports.UploadIcon=Vr;exports.Uploader=Et;exports.UserIcon=sd;exports.VideoIcon=ud;exports.WarningIcon=zr;exports.WifiIcon=gm;exports.XIcon=fd;exports.YoutubeIcon=bd;exports.ZapIcon=Zd;exports.ZoomInIcon=Sm;exports.ZoomOutIcon=Od;exports.deepMerge=Ee;exports.defaultDesignSystemConfig=ua;exports.designSystemConfigList=ed;exports.designSystemConfigs=Rt;exports.getDesignSystemComponentProps=Rr;exports.hideDrawer=qi;exports.hideMessage=Fa;exports.hideModal=Qr;exports.mergeDesignSystemComponentProps=ha;exports.normalizeDesignSystemComponentProps=Fr;exports.showDrawer=dg;exports.showMessage=Ia;exports.showModal=Xf;exports.showToast=so;exports.useDesignSystem=zt;exports.useDesignSystemComponentProps=Fo;exports.useDrawerStore=Ge;exports.useMergedDesignSystemComponentProps=pe;exports.useMessageStore=At;exports.useModalStore=Ue;exports.useToast=gb;
|
|
35
|
+
`})]})},ib=({number:e=20,children:o,...t})=>{const a=Array.from({length:e},(n,l)=>l);return r.jsxs(i.View,{width:"100%",height:"100%",backgroundColor:"black",position:"relative",overflow:"hidden",...t,children:[a.map(n=>{const l=n*37%200-100+"px",s=.2+n*13%6*.1+"s",d=(1+n*7%9)/2+"s",u=300+n*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(${u}) translateY(${u})`},iterationCount:"infinite",timingFunction:"linear",fillMode:"forwards",duration:d,delay:s},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)"})},n)}),o&&r.jsx(i.View,{position:"relative",zIndex:1,width:"100%",height:"100%",children:o})]})},Ga=["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)"],sb=()=>Ga[Math.floor(Math.random()*Ga.length)],cb=({rows:e=15,cols:o=10,squareSize:t=40,...a})=>{const n=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)",...a,children:n.map((s,d)=>r.jsx(i.Horizontal,{gap:0,children:l.map((u,c)=>r.jsx(i.View,{height:t/3,width:t,borderStyle:"solid",borderColor:"color-gray-200",borderWidth:.5,backgroundColor:"transparent",cursor:"pointer",on:{hover:{backgroundColor:sb(),transition:"background-color 0.2s ease"}}},`col-${c}`))},`row-${d}`))})},db=["rgb(59, 130, 246)","rgb(147, 51, 234)","rgb(236, 72, 153)","rgb(34, 197, 94)","rgb(251, 146, 60)","rgb(168, 85, 247)"],ub=({count:e=50,colors:o=db,speed:t="medium",shapes:a=["circle"],...n})=>{const l=Array.from({length:e},(c,m)=>m),s=()=>{switch(t){case"slow":return .5;case"fast":return 2;default:return 1}},d=()=>a[Math.floor(Math.random()*a.length)],u=()=>o[Math.floor(Math.random()*o.length)];return r.jsx(i.View,{width:400,height:300,position:"relative",overflow:"hidden",backgroundColor:"color-gray-900",...n,children:l.map(c=>{const m=Math.random()*8+4,g=Math.random()*400,h=Math.random()*300,f=Math.random()*400,y=Math.random()*300,x=(Math.random()*10+5)/s(),b=Math.random()*5,k=d(),j=u(),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:j,opacity:.7,style:{left:g,top:h,...w[k]},animate:{from:{transform:"translate(0px, 0px) scale(0.5)",opacity:0},to:{transform:`translate(${f-g}px, ${y-h}px) scale(1)`,opacity:.7},iterationCount:"infinite",direction:"alternate",timingFunction:"ease-in-out",duration:`${x}s`,delay:`${b}s`}},c)})})},pb=({gridSize:e=30,lineColor:o="rgba(59, 130, 246, 0.3)",pulseColor:t="rgba(59, 130, 246, 0.8)",animationSpeed:a="medium",...n})=>{const l=()=>{switch(a){case"slow":return 4;case"fast":return 1;default:return 2}},s=Math.floor(400/e),d=Math.floor(300/e),u=s*d,c=Array.from({length:u},(m,g)=>g);return r.jsxs(i.View,{width:400,height:300,position:"relative",overflow:"hidden",backgroundColor:"color-gray-900",...n,children:[Array.from({length:s+1},(m,g)=>r.jsx(i.View,{position:"absolute",left:g*e,top:0,width:1,height:"100%",backgroundColor:o},`v-line-${g}`)),Array.from({length:d+1},(m,g)=>r.jsx(i.View,{position:"absolute",left:0,top:g*e,width:"100%",height:1,backgroundColor:o},`h-line-${g}`)),c.map(m=>{const g=m%s,h=Math.floor(m/s),f=(g+h)*.1;return r.jsx(i.View,{position:"absolute",left:g*e+1,top:h*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:`${f}s`}},m)})]})},mb=["rgba(59, 130, 246, 0.6)","rgba(147, 51, 234, 0.6)","rgba(236, 72, 153, 0.6)","rgba(34, 197, 94, 0.6)"],gb=({rippleCount:e=5,colors:o=mb,maxSize:t=200,frequency:a=3,...n})=>{const l=Array.from({length:e},(s,d)=>({id:d,x:Math.random()*400,y:Math.random()*300,color:o[d%o.length],delay:d*(a/e),duration:3+Math.random()*2}));return r.jsxs(i.View,{width:400,height:300,position:"relative",overflow:"hidden",backgroundColor:"color-gray-100",...n,children:[l.map(s=>r.jsx(i.View,{position:"absolute",width:20,height:20,borderRadius:"50%",style:{left:s.x-10,top:s.y-10,border:`2px solid ${s.color}`,backgroundColor:"transparent"},animate:{from:{transform:"scale(0)",opacity:1},to:{transform:`scale(${t/20})`,opacity:0},iterationCount:"infinite",timingFunction:"ease-out",duration:`${s.duration}s`,delay:`${s.delay}s`}},s.id)),l.map(s=>r.jsx(i.View,{position:"absolute",width:10,height:10,borderRadius:"50%",style:{left:s.x-5,top:s.y-5,backgroundColor:s.color},animate:{from:{transform:"scale(1)",opacity:.8},to:{transform:`scale(${t/40})`,opacity:0},iterationCount:"infinite",timingFunction:"ease-out",duration:`${s.duration*1.2}s`,delay:`${s.delay+.5}s`}},`secondary-${s.id}`))]})},hb=({children:e,src:o,backgroundSize:t="cover",backgroundPosition:a="center",backgroundRepeat:n="no-repeat",backgroundAttachment:l="scroll",imageOpacity:s=1,overlay:d=null,blendMode:u="normal",views:c,themeMode:m,...g})=>{const h={...at.image,backgroundImage:`url(${o})`,backgroundSize:t,backgroundPosition:a,backgroundRepeat:n,backgroundAttachment:l,opacity:s};return r.jsxs(i.View,{...at.container,...c==null?void 0:c.container,...g,children:[r.jsx(i.View,{style:h,...c==null?void 0:c.image}),d,e&&r.jsx(i.View,{...at.content,...c==null?void 0:c.content,children:e})]})},fb=({children:e,src:o,autoPlay:t=!0,loop:a=!0,muted:n=!0,playsInline:l=!0,overlay:s=null,blendMode:d="normal",views:u,themeMode:c,...m})=>r.jsxs(i.View,{...nt.container,...u==null?void 0:u.container,...m,children:[r.jsx(i.View,{as:"video",src:o,autoPlay:t,loop:a,muted:n,playsInline:l,style:nt.video,...u==null?void 0:u.video}),s,e&&r.jsx(i.View,{...nt.content,...u==null?void 0:u.content,children:e})]}),yb=({children:e,...o})=>r.jsx(yi,{...o,children:e}),xb=({contentPosition:e,backgroundColor:o="color-black-900",...t})=>{const n=(()=>{let l=`${o}-100`,s=`${o}-900`,d=`${o}-600`,u=`${o}-400`;switch(o.indexOf("-")===-1&&(l=`color-mix(in srgb, ${o} 10%, transparent)`,s=`color-mix(in srgb, ${o} 90%, transparent)`,d=`color-mix(in srgb, ${o} 70%, transparent)`,u=`color-mix(in srgb, ${o} 50%, transparent)`),e){case"left":return`radial-gradient(circle at 70% 50%, ${l} 0%, ${l} 100%), linear-gradient(to right, ${s} 0%, ${d} 65%, ${l} 100%)`;case"right":return`radial-gradient(circle at 30% 50%, ${l} 0%, ${l} 100%), linear-gradient(to left, ${s} 0%, ${d} 65%, ${l} 100%)`;case"top":return`radial-gradient(circle at 50% 40%, ${l} 0%, ${l} 100%), linear-gradient(to bottom, ${s} 0%, ${d} 60%, ${l} 100%)`;case"bottom":return`radial-gradient(circle at 50% 60%, ${l} 0%, ${l} 100%), linear-gradient(to top, ${s} 0%, ${d} 60%, ${l} 100%)`;case"center":return`radial-gradient(circle at 50% 70%, ${s} 0%, ${l} 100%)`;default:return u}})();return r.jsx(i.View,{position:"absolute",top:0,left:0,width:"100%",height:"100%",background:n,pointerEvents:"none",zIndex:1,...t})},bb=({children:e,views:o,...t})=>r.jsx(nb.Provider,{value:{},children:r.jsx(i.View,{...ab.container,...o==null?void 0:o.container,...t,children:e})}),Ui=p.forwardRef(({children:e,designProps:o,shape:t="rounded",decorationRotation:a=5,decorationScale:n=1,decorationOpacity:l=.8,views:s,...d},u)=>{const m=(b=>{switch(b){case"square":return"0px";case"pill":return"9999px";case"rounded":default:return"16px"}})(t),g=Math.abs(a)*(Math.PI/180),h=Math.sin(g)*100,f=(n-1)*100/2,y=Math.ceil(h+f),x=d.backgroundColor??"theme-primary";return r.jsx(i.View,{...d,ref:u,backgroundColor:"transparent",position:"relative",overflow:"visible",...s==null?void 0:s.container,children:r.jsxs(i.View,{padding:d.padding??`${96+y}px ${y}px`,position:"relative",overflow:"visible",children:[r.jsx(i.View,{position:"absolute",top:y,left:y,right:y,bottom:y,backgroundColor:x,borderRadius:m,opacity:l/1.5,transform:`scale(${n})`,pointerEvents:"none",zIndex:1,...s==null?void 0:s.back}),r.jsx(i.View,{position:"absolute",top:y,left:y,right:y,bottom:y,transform:`rotate(${a}deg) scale(${n})`,opacity:l/1.2,backgroundColor:x,borderRadius:m,pointerEvents:"none",zIndex:2,...s==null?void 0:s.front}),r.jsx(i.View,{margin:"0 auto",position:"relative",zIndex:3,...s==null?void 0:s.content,children:e})]})})});Ui.displayName="Background.Layout";const ce=bb;ce.Aurora=lb;ce.Meteors=ib;ce.Wall=cb;ce.Particles=ub;ce.Grid=pb;ce.Ripples=gb;ce.Image=hb;ce.Video=fb;ce.Gradient=yb;ce.Overlay=xb;ce.Layout=Ui;const Gi=p.forwardRef((e,o)=>r.jsx(ce,{...e,ref:o}));Gi.displayName="Background";const Yi=Object.assign(Gi,{Layout:ce.Layout,Aurora:ce.Aurora,Meteors:ce.Meteors,Wall:ce.Wall,Particles:ce.Particles,Grid:ce.Grid,Ripples:ce.Ripples,Image:ce.Image,Video:ce.Video,Gradient:ce.Gradient,Overlay:ce.Overlay});Yi.displayName="Background";function kb(e){const{inputValue:o,onInputChange:t,onSubmit:a,messages:n=[]}=e,[l,s]=p.useState(""),d=p.useRef(null),u=p.useRef(null),c=o!==void 0,m=o!==void 0?o:l,g=p.useCallback(f=>{c?t==null||t(f):s(f)},[c,t]),h=p.useCallback(f=>{f&&f.preventDefault();const y=m.trim();y&&a&&(a(y),c||s(""),d.current&&(d.current.style.height="auto"))},[m,a,c]);return p.useEffect(()=>{u.current&&(u.current.scrollTop=u.current.scrollHeight)},[n.length]),{internalInputValue:m,handleInputChange:g,handleSubmit:h,inputRef:d,messagesRef:u}}const Cb={sm:{fontSize:"12px",padding:"8px"},md:{fontSize:"14px",padding:"10px"},lg:{fontSize:"14px",padding:"12px"}},Sb={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"}},jb={sm:{fontSize:"12px",padding:"8px 10px",borderRadius:"12px"},md:{fontSize:"14px",padding:"10px 12px",borderRadius:"12px"},lg:{fontSize:"14px",padding:"12px 14px",borderRadius:"14px"}},wb={backgroundColor:"theme-primary",color:"color-white",alignSelf:"flex-end",borderBottomRightRadius:"4px"},vb={backgroundColor:"color-white",color:"color-gray-900",alignSelf:"flex-start",borderBottomLeftRadius:"4px",border:"1px solid color-gray-200"},Tb={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"},_e={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:Tb,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}},Ib=({messages:e=[],inputPlaceholder:o="Type a message...",disableInput:t=!1,variant:a="default",size:n="md",showTimestamps:l=!0,enableAttachments:s=!1,enableContextPicker:d=!1,selectedContextElements:u=[],onContextPickerClick:c,onRemoveContextElement:m,isLoading:g=!1,loadingText:h="Loading...",styles:f={},maxHeight:y="600px",internalInputValue:x,handleInputChange:b,handleSubmit:k,inputRef:j,messagesRef:w,inputValue:C,onInputChange:S,...v})=>{var H;const I={..._e.container,...Sb[a],...f.container},F={..._e.messagesContainer,maxHeight:y,...f.messagesContainer},W={..._e.inputContainer,...f.inputContainer},E={..._e.input,...Cb[n],...f.input},T=p.useCallback(M=>{b(M.target.value),M.target.style.height="auto",M.target.style.height=`${M.target.scrollHeight}px`},[b]),A=p.useCallback(M=>{M.key==="Enter"&&!M.shiftKey&&(M.preventDefault(),k())},[k]),P=x.trim().length>0,{onSubmit:z,...R}=v;return r.jsxs(i.View,{...I,...R,children:[r.jsxs(i.View,{ref:w,...F,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(Fb,{message:M,size:n,showTimestamp:l,styles:{bubble:f.bubble,userBubble:f.userBubble,assistantBubble:f.assistantBubble,timestamp:f.timestamp,reasoningContainer:f.reasoningContainer,reasoningContent:f.reasoningContent,errorMessage:f.errorMessage,systemMessage:f.systemMessage,toolMessage:f.toolMessage}},M.id)),g&&r.jsxs(i.Horizontal,{justifyContent:"flex-start",alignItems:"center",gap:8,marginTop:"8px",...f.loadingIndicator,children:[r.jsx(Vt,{widthHeight:12,color:"currentColor",filled:!1,style:{animation:"spin 1s linear infinite"}}),r.jsx(i.Text,{color:"color-gray-500",fontSize:"14px",children:h})]})]}),r.jsxs(i.View,{children:[u.length>0&&r.jsx(i.Horizontal,{gap:8,marginBottom:"8px",flexWrap:"wrap",padding:"0 12px 8px",...f.contextChipsContainer,children:u.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(Te,{widthHeight:12,color:"color-blue-700"})})]},M.id))}),r.jsxs(i.View,{as:"form",onSubmit:k,...W,children:[s&&r.jsx(i.View,{as:"button",type:"button",..._e.attachmentButton,...f.attachmentButton,_hover:{backgroundColor:"color-gray-100"},children:r.jsx(Xo,{widthHeight:16,color:"color-gray-600"})}),r.jsx(i.View,{as:"textarea",ref:j,value:x,onChange:T,onKeyDown:A,placeholder:o,disabled:t||g,...E,style:{...E,opacity:t||g?.5:1}}),r.jsxs(i.Vertical,{gap:4,alignItems:"center",children:[d&&r.jsx(i.View,{as:"button",type:"button",onClick:c,..._e.attachmentButton,...f.contextPickerButton,_hover:{backgroundColor:"color-gray-100",...(H=f.contextPickerButton)==null?void 0:H._hover},title:"Select element from page",children:r.jsx(In,{widthHeight:16,color:"color-gray-600"})}),r.jsx(i.View,{as:"button",type:"submit",disabled:!P||t||g,..._e.sendButton,backgroundColor:P?"theme-primary":"color-gray-300",_hover:{backgroundColor:P?"theme-primary":"color-gray-300"},...f.sendButton,style:{cursor:P?"pointer":"not-allowed",opacity:!P||t||g?.6:1},children:r.jsx(At,{widthHeight:16,color:"color-white",filled:!1})})]})]})]})]})},Fb=({message:e,size:o,showTimestamp:t,styles:a})=>{const[n,l]=p.useState(!1),[s,d]=p.useState(!1),u=e.role==="user",c=e.messageType==="system",m=e.messageType==="error",g=e.messageType==="tool";if(c)return r.jsx(i.View,{display:"flex",justifyContent:"center",padding:"8px",width:"100%",...a.systemMessage,children:r.jsxs(i.Horizontal,{gap:6,alignItems:"center",opacity:.7,children:[r.jsx(Ge,{widthHeight:12,color:"color-gray-600"}),r.jsx(i.Text,{fontSize:"12px",color:"color-gray-600",fontStyle:"italic",children:e.content})]})});if(g)return r.jsx(i.View,{display:"flex",justifyContent:"flex-start",padding:"8px 16px",width:"100%",...a.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(jn,{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 h={..._e.bubble,...jb[o],...u?wb:vb,...m?{backgroundColor:"color-red-50",borderWidth:1,borderStyle:"solid",borderColor:"color-red-200",color:"color-red-700"}:{},...a.bubble,...u?a.userBubble:a.assistantBubble,...m?a.errorMessage:{}},f={..._e.timestamp,[u?"right":"left"]:"8px",opacity:n?1:0,...a.timestamp};return r.jsx(i.View,{position:"relative",onMouseEnter:()=>l(!0),onMouseLeave:()=>l(!1),display:"flex",justifyContent:u?"flex-end":"flex-start",children:r.jsxs(i.View,{...h,children:[t&&r.jsx(i.View,{...f,children:e.timestamp.toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"})}),m&&r.jsxs(i.Horizontal,{gap:6,marginBottom:"4px",alignItems:"center",children:[r.jsx(Ar,{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",...a.reasoningContainer,children:[r.jsxs(i.Horizontal,{as:"button",onClick:()=>d(!s),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(se,{orientation:s?"down":"right",widthHeight:10,color:"color-gray-500"})]}),s&&r.jsx(i.View,{padding:"8px",backgroundColor:"color-gray-50",borderRadius:"8px",marginTop:"4px",borderWidth:1,borderStyle:"solid",borderColor:"color-gray-200",...a.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(Xo,{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))]})]})})},pa=e=>{const o=kb(e);return r.jsx(Ib,{...e,...o})};pa.displayName="ChatWidget";const Xi=pa;function Rb({onSelect:e,onCancel:o,active:t}){const[a,n]=p.useState(null);p.useRef(null);const l=p.useCallback(u=>{var f;if(!t)return;const c=document.elementFromPoint(u.clientX,u.clientY);if(!c||c===document.body||c.closest('[data-chatwidget-ignore="true"]')||c.closest("#chatwidget-overlay")){n(null);return}const m=c.getBoundingClientRect();let g=c.tagName.toLowerCase();if(c.id)g+=`#${c.id}`;else if(c.className&&typeof c.className=="string"){const y=c.className.split(" ")[0];y&&(g+=`.${y}`)}const h=(f=c.innerText)==null?void 0:f.slice(0,20);h&&(g+=` ("${h}...")`),n({id:c.id||`el-${Date.now()}`,name:g,tagName:c.tagName.toLowerCase(),rect:m})},[t]),s=p.useCallback(u=>{!t||u.target.closest('[data-chatwidget-ignore="true"]')||(u.preventDefault(),u.stopPropagation(),a&&e(a))},[t,a,e]),d=p.useCallback(u=>{t&&u.key==="Escape"&&o()},[t,o]);return p.useEffect(()=>(t?(document.addEventListener("mousemove",l),document.addEventListener("click",s,!0),document.addEventListener("keydown",d),document.body.style.cursor="crosshair"):(n(null),document.removeEventListener("mousemove",l),document.removeEventListener("click",s,!0),document.removeEventListener("keydown",d),document.body.style.cursor=""),()=>{document.removeEventListener("mousemove",l),document.removeEventListener("click",s,!0),document.removeEventListener("keydown",d),document.body.style.cursor=""}),[t,l,s,d]),{highlightedElement:a}}function zb({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 Mb=({initialMessages:e=[],onSendMessage:o,bubbleSize:t="md"})=>{const[a,n]=p.useState(!1),[l,s]=p.useState(!1),[d,u]=p.useState(e),[c,m]=p.useState([]),{highlightedElement:g}=Rb({active:l,onSelect:b=>{m(k=>[...k,b]),s(!1),n(!0)},onCancel:()=>{s(!1),n(!0)}}),h=()=>n(!a),f=()=>{s(!0),n(!1)},y=b=>{m(k=>k.filter(j=>j.id!==b))},x=b=>{const k={id:Date.now().toString(),role:"user",content:b,timestamp:new Date,contextElements:[...c]};u(j=>[...j,k]),o==null||o(b,c),m([]),setTimeout(()=>{var S;const j=Math.random()>.7,w=Math.random()>.4,C={id:(Date.now()+1).toString(),role:"assistant",timestamp:new Date,content:j?"I will highlight the selected element.":`I received your message regarding: ${((S=k.contextElements)==null?void 0:S.map(v=>v.name).join(", "))||"general context"}. How can I assist you further?`,messageType:j?"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};u(v=>[...v,C]),j&&setTimeout(()=>{u(v=>[...v,{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(zb,{element:g}),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."})}),a&&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:()=>n(!1),cursor:"pointer",padding:"4px",borderRadius:"50%",border:"none",backgroundColor:"transparent",_hover:{backgroundColor:"rgba(0,0,0,0.05)"},children:r.jsx(Te,{widthHeight:16,color:"color-gray-500"})})]}),r.jsx(Xi,{messages:d,onSubmit:x,size:t,variant:"minimal",enableContextPicker:!0,selectedContextElements:c,onContextPickerClick:f,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:h,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:a?r.jsx(Te,{widthHeight:24,color:"white"}):r.jsx(Tn,{widthHeight:24,color:"white"})})]})},Wb=e=>{const o=me("radio",e),t=Il(o);return r.jsx(Fl,{...t,...o})},Ki=Wb;function ma(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Hb=typeof Element<"u",Pb=typeof Map=="function",Ab=typeof Set=="function",Vb=typeof ArrayBuffer=="function"&&!!ArrayBuffer.isView;function yr(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,a,n;if(Array.isArray(e)){if(t=e.length,t!=o.length)return!1;for(a=t;a--!==0;)if(!yr(e[a],o[a]))return!1;return!0}var l;if(Pb&&e instanceof Map&&o instanceof Map){if(e.size!==o.size)return!1;for(l=e.entries();!(a=l.next()).done;)if(!o.has(a.value[0]))return!1;for(l=e.entries();!(a=l.next()).done;)if(!yr(a.value[1],o.get(a.value[0])))return!1;return!0}if(Ab&&e instanceof Set&&o instanceof Set){if(e.size!==o.size)return!1;for(l=e.entries();!(a=l.next()).done;)if(!o.has(a.value[0]))return!1;return!0}if(Vb&&ArrayBuffer.isView(e)&&ArrayBuffer.isView(o)){if(t=e.length,t!=o.length)return!1;for(a=t;a--!==0;)if(e[a]!==o[a])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(n=Object.keys(e),t=n.length,t!==Object.keys(o).length)return!1;for(a=t;a--!==0;)if(!Object.prototype.hasOwnProperty.call(o,n[a]))return!1;if(Hb&&e instanceof Element)return!1;for(a=t;a--!==0;)if(!((n[a]==="_owner"||n[a]==="__v"||n[a]==="__o")&&e.$$typeof)&&!yr(e[n[a]],o[n[a]]))return!1;return!0}return e!==e&&o!==o}var Eb=function(o,t){try{return yr(o,t)}catch(a){if((a.message||"").match(/stack|recursion/i))return console.warn("react-fast-compare cannot handle circular refs"),!1;throw a}};const Db=ma(Eb);var $b=function(e,o,t,a,n,l,s,d){if(process.env.NODE_ENV!=="production"&&o===void 0)throw new Error("invariant requires an error message argument");if(!e){var u;if(o===void 0)u=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var c=[t,a,n,l,s,d],m=0;u=new Error(o.replace(/%s/g,function(){return c[m++]})),u.name="Invariant Violation"}throw u.framesToPop=1,u}},Lb=$b;const Ya=ma(Lb);var _b=function(o,t,a,n){var l=a?a.call(n,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 s=Object.keys(o),d=Object.keys(t);if(s.length!==d.length)return!1;for(var u=Object.prototype.hasOwnProperty.bind(t),c=0;c<s.length;c++){var m=s[c];if(!u(m))return!1;var g=o[m],h=t[m];if(l=a?a.call(n,g,h,m):void 0,l===!1||l===void 0&&g!==h)return!1}return!0};const Bb=ma(_b);var Ji=(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))(Ji||{}),lt={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"]}},Xa=Object.values(Ji),Nr={accesskey:"accessKey",charset:"charSet",class:"className",contenteditable:"contentEditable",contextmenu:"contextMenu","http-equiv":"httpEquiv",itemprop:"itemProp",tabindex:"tabIndex"},Qi=Object.entries(Nr).reduce((e,[o,t])=>(e[t]=o,e),{}),Pe="data-rh",jo={DEFAULT_TITLE:"defaultTitle",DEFER:"defer",ENCODE_SPECIAL_CHARACTERS:"encodeSpecialCharacters",ON_CHANGE_CLIENT_STATE:"onChangeClientState",TITLE_TEMPLATE:"titleTemplate",PRIORITIZE_SEO_TAGS:"prioritizeSeoTags"},wo=(e,o)=>{for(let t=e.length-1;t>=0;t-=1){const a=e[t];if(Object.prototype.hasOwnProperty.call(a,o))return a[o]}return null},Ob=e=>{let o=wo(e,"title");const t=wo(e,jo.TITLE_TEMPLATE);if(Array.isArray(o)&&(o=o.join("")),t&&o)return t.replace(/%s/g,()=>o);const a=wo(e,jo.DEFAULT_TITLE);return o||a||void 0},Nb=e=>wo(e,jo.ON_CHANGE_CLIENT_STATE)||(()=>{}),it=(e,o)=>o.filter(t=>typeof t[e]<"u").map(t=>t[e]).reduce((t,a)=>({...t,...a}),{}),qb=(e,o)=>o.filter(t=>typeof t.base<"u").map(t=>t.base).reverse().reduce((t,a)=>{if(!t.length){const n=Object.keys(a);for(let l=0;l<n.length;l+=1){const d=n[l].toLowerCase();if(e.indexOf(d)!==-1&&a[d])return t.concat(a)}}return t},[]),Ub=e=>console&&typeof console.warn=="function"&&console.warn(e),Oo=(e,o,t)=>{const a={};return t.filter(n=>Array.isArray(n[e])?!0:(typeof n[e]<"u"&&Ub(`Helmet: ${e} should be of type "Array". Instead found type "${typeof n[e]}"`),!1)).map(n=>n[e]).reverse().reduce((n,l)=>{const s={};l.filter(u=>{let c;const m=Object.keys(u);for(let h=0;h<m.length;h+=1){const f=m[h],y=f.toLowerCase();o.indexOf(y)!==-1&&!(c==="rel"&&u[c].toLowerCase()==="canonical")&&!(y==="rel"&&u[y].toLowerCase()==="stylesheet")&&(c=y),o.indexOf(f)!==-1&&(f==="innerHTML"||f==="cssText"||f==="itemprop")&&(c=f)}if(!c||!u[c])return!1;const g=u[c].toLowerCase();return a[c]||(a[c]={}),s[c]||(s[c]={}),a[c][g]?!1:(s[c][g]=!0,!0)}).reverse().forEach(u=>n.push(u));const d=Object.keys(s);for(let u=0;u<d.length;u+=1){const c=d[u],m={...a[c],...s[c]};a[c]=m}return n},[]).reverse()},Gb=(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},Yb=e=>({baseTag:qb(["href"],e),bodyAttributes:it("bodyAttributes",e),defer:wo(e,jo.DEFER),encode:wo(e,jo.ENCODE_SPECIAL_CHARACTERS),htmlAttributes:it("htmlAttributes",e),linkTags:Oo("link",["rel","href"],e),metaTags:Oo("meta",["name","charset","http-equiv","property","itemprop"],e),noscriptTags:Oo("noscript",["innerHTML"],e),onChangeClientState:Nb(e),scriptTags:Oo("script",["src","innerHTML"],e),styleTags:Oo("style",["cssText"],e),title:Ob(e),titleAttributes:it("titleAttributes",e),prioritizeSeoTags:Gb(e,jo.PRIORITIZE_SEO_TAGS)}),Zi=e=>Array.isArray(e)?e.join(""):e,Xb=(e,o)=>{const t=Object.keys(e);for(let a=0;a<t.length;a+=1)if(o[t[a]]&&o[t[a]].includes(e[t[a]]))return!0;return!1},st=(e,o)=>Array.isArray(e)?e.reduce((t,a)=>(Xb(a,o)?t.priority.push(a):t.default.push(a),t),{priority:[],default:[]}):{default:e,priority:[]},Ka=(e,o)=>({...e,[o]:void 0}),Kb=["noscript","script","style"],Ct=(e,o=!0)=>o===!1?String(e):String(e).replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'"),es=e=>Object.keys(e).reduce((o,t)=>{const a=typeof e[t]<"u"?`${t}="${e[t]}"`:`${t}`;return o?`${o} ${a}`:a},""),Jb=(e,o,t,a)=>{const n=es(t),l=Zi(o);return n?`<${e} ${Pe}="true" ${n}>${Ct(l,a)}</${e}>`:`<${e} ${Pe}="true">${Ct(l,a)}</${e}>`},Qb=(e,o,t=!0)=>o.reduce((a,n)=>{const l=n,s=Object.keys(l).filter(c=>!(c==="innerHTML"||c==="cssText")).reduce((c,m)=>{const g=typeof l[m]>"u"?m:`${m}="${Ct(l[m],t)}"`;return c?`${c} ${g}`:g},""),d=l.innerHTML||l.cssText||"",u=Kb.indexOf(e)===-1;return`${a}<${e} ${Pe}="true" ${s}${u?"/>":`>${d}</${e}>`}`},""),os=(e,o={})=>Object.keys(e).reduce((t,a)=>{const n=Nr[a];return t[n||a]=e[a],t},o),Zb=(e,o,t)=>{const a={key:o,[Pe]:!0},n=os(t,a);return[p.createElement("title",n,o)]},xr=(e,o)=>o.map((t,a)=>{const n={key:a,[Pe]:!0};return Object.keys(t).forEach(l=>{const d=Nr[l]||l;if(d==="innerHTML"||d==="cssText"){const u=t.innerHTML||t.cssText;n.dangerouslySetInnerHTML={__html:u}}else n[d]=t[l]}),p.createElement(e,n)}),Ie=(e,o,t=!0)=>{switch(e){case"title":return{toComponent:()=>Zb(e,o.title,o.titleAttributes),toString:()=>Jb(e,o.title,o.titleAttributes,t)};case"bodyAttributes":case"htmlAttributes":return{toComponent:()=>os(o),toString:()=>es(o)};default:return{toComponent:()=>xr(e,o),toString:()=>Qb(e,o,t)}}},e1=({metaTags:e,linkTags:o,scriptTags:t,encode:a})=>{const n=st(e,lt.meta),l=st(o,lt.link),s=st(t,lt.script);return{priorityMethods:{toComponent:()=>[...xr("meta",n.priority),...xr("link",l.priority),...xr("script",s.priority)],toString:()=>`${Ie("meta",n.priority,a)} ${Ie("link",l.priority,a)} ${Ie("script",s.priority,a)}`},metaTags:n.default,linkTags:l.default,scriptTags:s.default}},o1=e=>{const{baseTag:o,bodyAttributes:t,encode:a=!0,htmlAttributes:n,noscriptTags:l,styleTags:s,title:d="",titleAttributes:u,prioritizeSeoTags:c}=e;let{linkTags:m,metaTags:g,scriptTags:h}=e,f={toComponent:()=>[],toString:()=>""};return c&&({priorityMethods:f,linkTags:m,metaTags:g,scriptTags:h}=e1(e)),{priority:f,base:Ie("base",o,a),bodyAttributes:Ie("bodyAttributes",t,a),htmlAttributes:Ie("htmlAttributes",n,a),link:Ie("link",m,a),meta:Ie("meta",g,a),noscript:Ie("noscript",l,a),script:Ie("script",h,a),style:Ie("style",s,a),title:Ie("title",{title:d,titleAttributes:u},a)}},St=o1,mr=[],ga=!!(typeof window<"u"&&window.document&&window.document.createElement),jt=class{constructor(e,o){Le(this,"instances",[]);Le(this,"canUseDOM",ga);Le(this,"context");Le(this,"value",{setHelmet:e=>{this.context.helmet=e},helmetInstances:{get:()=>this.canUseDOM?mr:this.instances,add:e=>{(this.canUseDOM?mr:this.instances).push(e)},remove:e=>{const o=(this.canUseDOM?mr:this.instances).indexOf(e);(this.canUseDOM?mr:this.instances).splice(o,1)}}});this.context=e,this.canUseDOM=o||!1,o||(e.helmet=St({baseTag:[],bodyAttributes:{},htmlAttributes:{},linkTags:[],metaTags:[],noscriptTags:[],scriptTags:[],styleTags:[],title:"",titleAttributes:{}}))}},r1=parseInt(p.version.split(".")[0],10),wt=r1>=19,t1={},rs=p.createContext(t1),ro,a1=(ro=class extends p.Component{constructor(t){super(t);Le(this,"helmetData");wt?this.helmetData=null:this.helmetData=new jt(this.props.context||{},ro.canUseDOM)}render(){return wt?p.createElement(p.Fragment,null,this.props.children):p.createElement(rs.Provider,{value:this.helmetData.value},this.props.children)}},Le(ro,"canUseDOM",ga),ro),bo=(e,o)=>{const t=document.head||document.querySelector("head"),a=t.querySelectorAll(`${e}[${Pe}]`),n=[].slice.call(a),l=[];let s;return o&&o.length&&o.forEach(d=>{const u=document.createElement(e);for(const c in d)if(Object.prototype.hasOwnProperty.call(d,c))if(c==="innerHTML")u.innerHTML=d.innerHTML;else if(c==="cssText"){const m=d.cssText;u.appendChild(document.createTextNode(m))}else{const m=c,g=typeof d[m]>"u"?"":d[m];u.setAttribute(c,g)}u.setAttribute(Pe,"true"),n.some((c,m)=>(s=m,u.isEqualNode(c)))?n.splice(s,1):l.push(u)}),n.forEach(d=>{var u;return(u=d.parentNode)==null?void 0:u.removeChild(d)}),l.forEach(d=>t.appendChild(d)),{oldTags:n,newTags:l}},vt=(e,o)=>{const t=document.getElementsByTagName(e)[0];if(!t)return;const a=t.getAttribute(Pe),n=a?a.split(","):[],l=[...n],s=Object.keys(o);for(const d of s){const u=o[d]||"";t.getAttribute(d)!==u&&t.setAttribute(d,u),n.indexOf(d)===-1&&n.push(d);const c=l.indexOf(d);c!==-1&&l.splice(c,1)}for(let d=l.length-1;d>=0;d-=1)t.removeAttribute(l[d]);n.length===l.length?t.removeAttribute(Pe):t.getAttribute(Pe)!==s.join(",")&&t.setAttribute(Pe,s.join(","))},n1=(e,o)=>{typeof e<"u"&&document.title!==e&&(document.title=Zi(e)),vt("title",o)},Ja=(e,o)=>{const{baseTag:t,bodyAttributes:a,htmlAttributes:n,linkTags:l,metaTags:s,noscriptTags:d,onChangeClientState:u,scriptTags:c,styleTags:m,title:g,titleAttributes:h}=e;vt("body",a),vt("html",n),n1(g,h);const f={baseTag:bo("base",t),linkTags:bo("link",l),metaTags:bo("meta",s),noscriptTags:bo("noscript",d),scriptTags:bo("script",c),styleTags:bo("style",m)},y={},x={};Object.keys(f).forEach(b=>{const{newTags:k,oldTags:j}=f[b];k.length&&(y[b]=k),j.length&&(x[b]=f[b].oldTags)}),o&&o(),u(e,y,x)},No=null,l1=e=>{No&&cancelAnimationFrame(No),e.defer?No=requestAnimationFrame(()=>{Ja(e,()=>{No=null})}):(Ja(e),No=null)},i1=l1,Qa=class extends p.Component{constructor(){super(...arguments);Le(this,"rendered",!1)}shouldComponentUpdate(o){return!Bb(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 a=null;const n=Yb(o.get().map(l=>{const{context:s,...d}=l.props;return d}));a1.canUseDOM?i1(n):St&&(a=St(n)),t(a)}init(){if(this.rendered)return;this.rendered=!0;const{helmetInstances:o}=this.props.context;o.add(this),this.emitChange()}render(){return this.init(),null}},br=[],Za=e=>{const o={};for(const t of Object.keys(e))o[Qi[t]||t]=e[t];return o},eo=e=>{const o={};for(const t of Object.keys(e)){const a=Nr[t];o[a||t]=e[t]}return o},en=(e,o)=>{if(!ga)return;const t=document.getElementsByTagName(e)[0];if(!t)return;const a="data-rh-managed",n=t.getAttribute(a),l=n?n.split(","):[],s=Object.keys(o);for(const d of l)s.includes(d)||t.removeAttribute(d);for(const d of s){const u=o[d];u==null||u===!1?t.removeAttribute(d):u===!0?t.setAttribute(d,""):t.setAttribute(d,String(u))}s.length>0?t.setAttribute(a,s.join(",")):t.removeAttribute(a)},ct=()=>{const e={},o={};for(const t of br){const{htmlAttributes:a,bodyAttributes:n}=t.props;a&&Object.assign(e,Za(a)),n&&Object.assign(o,Za(n))}en("html",e),en("body",o)},s1=class extends p.Component{componentDidMount(){br.push(this),ct()}componentDidUpdate(){ct()}componentWillUnmount(){const e=br.indexOf(this);e!==-1&&br.splice(e,1),ct()}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 p.createElement("title",eo(o),e)}renderBase(){const{base:e}=this.props;return e?p.createElement("base",eo(e)):null}renderMeta(){const{meta:e}=this.props;return!e||!Array.isArray(e)?null:e.map((o,t)=>p.createElement("meta",{key:t,...eo(o)}))}renderLink(){const{link:e}=this.props;return!e||!Array.isArray(e)?null:e.map((o,t)=>p.createElement("link",{key:t,...eo(o)}))}renderScript(){const{script:e}=this.props;return!e||!Array.isArray(e)?null:e.map((o,t)=>{const{innerHTML:a,...n}=o,l=eo(n);return a&&(l.dangerouslySetInnerHTML={__html:a}),p.createElement("script",{key:t,...l})})}renderStyle(){const{style:e}=this.props;return!e||!Array.isArray(e)?null:e.map((o,t)=>{const{cssText:a,...n}=o,l=eo(n);return a&&(l.dangerouslySetInnerHTML={__html:a}),p.createElement("style",{key:t,...l})})}renderNoscript(){const{noscript:e}=this.props;return!e||!Array.isArray(e)?null:e.map((o,t)=>{const{innerHTML:a,...n}=o,l=eo(n);return a&&(l.dangerouslySetInnerHTML={__html:a}),p.createElement("noscript",{key:t,...l})})}render(){return p.createElement(p.Fragment,null,this.renderTitle(),this.renderBase(),this.renderMeta(),this.renderLink(),this.renderScript(),this.renderStyle(),this.renderNoscript())}},ut,c1=(ut=class extends p.Component{shouldComponentUpdate(e){return!Db(Ka(this.props,"helmetData"),Ka(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,a){return{...o,[e.type]:[...o[e.type]||[],{...t,...this.mapNestedChildrenToProps(e,a)}]}}mapObjectTypeChildren(e,o,t,a){switch(e.type){case"title":return{...o,[e.type]:a,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(a=>{t={...t,[a]:e[a]}}),t}warnOnInvalidChildren(e,o){return Ya(Xa.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 ${Xa.join(", ")} are allowed. Helmet does not support rendering <${e.type}> elements. Refer to our API for more information.`),Ya(!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 p.Children.forEach(e,a=>{if(!a||!a.props)return;const{children:n,...l}=a.props,s=Object.keys(l).reduce((u,c)=>(u[Qi[c]||c]=l[c],u),{});let{type:d}=a;switch(typeof d=="symbol"?d=d.toString():this.warnOnInvalidChildren(a,n),d){case"Symbol(react.fragment)":o=this.mapChildrenToProps(n,o);break;case"link":case"meta":case"noscript":case"script":case"style":t=this.flattenArrayTypeChildren(a,t,s,n);break;default:o=this.mapObjectTypeChildren(a,o,s,n);break}}),this.mapArrayTypeChildrenToProps(t,o)}render(){const{children:e,...o}=this.props;let t={...o},{helmetData:a}=o;if(e&&(t=this.mapChildrenToProps(e,t)),a&&!(a instanceof jt)){const n=a;a=new jt(n.context,!0),delete t.helmetData}return wt?p.createElement(s1,{...t}):a?p.createElement(Qa,{...t,context:a.value}):p.createElement(rs.Consumer,null,n=>p.createElement(Qa,{...t,context:n}))}},Le(ut,"defaultProps",{defer:!0,encodeSpecialCharacters:!0,prioritizeSeoTags:!1}),ut);const d1={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"}},u1={highlightStyle:"background",fontWeight:700,letterSpacing:"-0.02em"},p1=e=>d1[e.metadata.id]??u1,ts=(e,o)=>{const t=e.theme;return{canvas:ke(t.canvas),surface:ke(t.surface),text:ke(t.text),muted:ke(t.muted),border:ke(t.border),primary:ke(t.primary),secondary:ke(t.secondary),success:ke(t.success),warning:ke(t.warning),error:ke(t.error),onPrimary:ke(t.onPrimary),appearance:o}},m1=e=>ts(e,"light"),g1=e=>ts(e,"dark"),ue=({palette:e,label:o,config:t,children:a})=>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(Wt,{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:a})})]}),ke=e=>!e||typeof e!="string"?e:/^(color|theme|light|dark)-/.test(e)?`var(--${e})`:e,Be=(e,o)=>`color-mix(in srgb, ${ke(e)} ${o}%, transparent)`,h1=e=>e&&e.startsWith("var(--")?e.slice(6,-1):e,f1={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"},y1=e=>e.personality||f1,Oe=(e,o="normal")=>{let a={light:300,regular:400,bold:700,black:800}[e.typeWeight];return o==="light"&&(a=Math.max(300,a-200)),o==="heavy"&&(a=Math.min(900,a+100)),a},tr=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}}},x1=e=>e.typeCase==="uppercase"?"uppercase":"none",qr=(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":ke(o.surface)};case"matte":return{backgroundColor:o.appearance==="dark"?"#181818":"#f4f4f4"};case"paper":default:return{backgroundColor:ke(o.surface)}}},Fo=(e,o)=>{const t=ke(o.primary),a=ke(o.secondary||o.primary);switch(e.accentTreatment){case"gradient":return`linear-gradient(135deg, ${t} 0%, ${a} 100%)`;case"glow":return t;case"stripe":return`repeating-linear-gradient(45deg, ${t} 0 8px, ${a} 8px 16px)`;case"halftone":return`radial-gradient(circle at 30% 30%, ${t} 0%, ${a} 70%)`;case"flat":default:return t}},Ro=(e,o)=>{if(e.accentTreatment==="glow")return`0 0 24px ${Be(o.primary,40)}, 0 0 4px ${ke(o.primary)}`},Ke=e=>({letterSpacing:e.letterSpacing,textTransform:x1(e),fontStyle:e.typeStyle,fontWeight:Oe(e,"heavy")}),ye=e=>({letterSpacing:e.typeCase==="uppercase"?"0.12em":"0.06em",textTransform:"uppercase",fontStyle:e.typeStyle,fontWeight:Oe(e,"normal")}),b1=(e,o)=>{var a,n,l;const t=(a=e.components)==null?void 0:a[o];return(l=(n=t==null?void 0:t.views)==null?void 0:n.container)==null?void 0:l.borderRadius},k1=e=>{const o=e.tokens.rawCssVars||{},t=e.theme.border,a=e.theme.surface,n=e.theme.primary,l=o["shadow-ring"]||"rgba(0,0,0,0.08) 0px 0px 0px 1px",s=o["shadow-ring-light"]||`${t} 0px 0px 0px 1px`,d=o["shadow-card"]||`rgba(0,0,0,0.08) 0px 0px 0px 1px, rgba(0,0,0,0.04) 0px 2px 2px 0px, ${a} 0px 0px 0px 1px`,u=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, ${a} 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:s},{name:"Level 2",label:"Card",description:"Ring + subtle lift",shadow:d},{name:"Level 3",label:"Full Card",description:"Ring + lift + ambient + glow",shadow:u},{name:"Focus",label:"Accessibility ring",description:"Focus state — 2px ring",shadow:`0 0 0 2px ${n}`}]},qo=(e,o)=>{const a={accordion:["accordion","card","alert"],tabs:["tabs","button"],panel:["card","alert"]}[o]??[o];for(const n of a){const l=b1(e,n);if(l!==void 0)return l}return"12px"},dt=({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]}),C1=[{title:"Homes",value:"homes",icon:r.jsx(dt,{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(dt,{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(dt,{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."})}],S1=[{title:"Token",field:"token"},{title:"Value",field:"value"},{title:"Role",field:"role"}],j1=[{id:"overview",label:"Overview",href:"#"},{id:"components",label:"Components",href:"#"},{id:"tokens",label:"Tokens",href:"#"}],w1=({color:e,name:o,role:t,border:a})=>r.jsxs(i.View,{borderWidth:1,borderStyle:"solid",borderRadius:8,overflow:"hidden",minWidth:0,borderColor:a,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})]})]}),pe=({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]}),v1=({config:e})=>{const o=p1(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(Ce,{variant:"outline",content:`${e.metadata.label} hero`}),r.jsx(si,{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(le,{colorScheme:"primary",size:"md",children:"Get started"}),r.jsx(le,{variant:"outline",colorScheme:"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})]})]})]})})},T1=({config:e})=>{var t,a;const o=e.tokens.colors.slice(0,5).map(n=>({token:n.name,value:n.value,role:n.role}));return r.jsxs(i.Vertical,{gap:24,children:[r.jsx(pe,{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(n=>r.jsx(w1,{color:n.value,name:n.name,role:n.role,text:e.theme.text,border:e.theme.border},n.name))})}),r.jsx(pe,{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(n=>r.jsx(Ce,{variant:"outline",content:n},n))})]})}),r.jsx(pe,{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(n=>r.jsxs(i.Vertical,{gap:8,alignItems:"center",children:[r.jsx(i.View,{width:n,minWidth:4,height:24,borderRadius:2,backgroundColor:e.theme.primary}),r.jsx(i.Text,{fontSize:11,color:e.theme.muted,children:n})]},n))}),r.jsx(i.Horizontal,{gap:12,flexWrap:"wrap",children:e.tokens.radii.slice(0,6).map(n=>r.jsxs(i.Vertical,{gap:8,alignItems:"center",children:[r.jsx(i.View,{width:64,height:64,borderRadius:n,borderWidth:1,borderStyle:"solid",backgroundColor:e.theme.surface,borderColor:e.theme.border}),r.jsx(i.Text,{fontSize:11,color:e.theme.muted,children:n})]},n))}),r.jsx(i.View,{width:"100%",maxWidth:"100%",overflowX:"auto",style:{WebkitOverflowScrolling:"touch",color:e.theme.text},children:r.jsx(Fe,{views:(a=(t=e.components)==null?void 0:t.table)==null?void 0:a.views,children:r.jsx(Fe.Template,{caption:"First extracted color tokens",columns:S1,data:o})})})]})})]})},on=({palette:e})=>r.jsxs(fe,{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(fe.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(Ce,{variant:"filled",content:"Best value"})]})}),r.jsx(fe.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(le,{isFilled:!0,size:"lg",children:"Reserve"}),r.jsx(Rr,{}),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(Rr,{}),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"})]})]})})]}),rn=[{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"}],tn=({palette:e,tier:o,personality:t})=>{const a=tr(t),n=qr(t,e),l=Fo(t,e),s=Ro(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:s}:n,borderColor:e.border,color:o.featured?e.onPrimary:e.text},children:r.jsxs(i.Vertical,{gap:a.gap,padding:a.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:ye(t),children:o.name}),o.featured?r.jsx(i.View,{paddingHorizontal:10,paddingVertical:4,borderRadius:t.badgeRadius,backgroundColor:Be(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:ye(t),children:t.voice.includes("mission")?"PRIORITY":"POPULAR"})]})}):null]}),r.jsx(i.Text,{fontSize:13,lineHeight:"18px",color:o.featured?Be(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:a.large+8,color:o.featured?e.onPrimary:e.text,style:Ke(t),children:o.price}),o.period?r.jsx(i.Text,{fontSize:14,color:o.featured?Be(e.onPrimary,85):e.muted,style:{fontStyle:t.typeStyle},children:o.period}):null]}),r.jsx(i.Vertical,{gap:8,children:o.features.map(d=>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?Be(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:Oe(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:d})]},d))}),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:{...ye(t),letterSpacing:t.typeCase==="uppercase"?"0.08em":"0.02em"},children:o.ctaLabel})})]})})},an=({palette:e,personality:o})=>{const t=tr(o),a=qr(o,e),n=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:{...a,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, ${Be(e.primary,20)} 0%, ${Be(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:Ke(o),children:n}),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:ye(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:Ke(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:ye(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:Fo(o,e),boxShadow:Ro(o,e)},children:r.jsx(i.Text,{fontSize:14,color:e.onPrimary,style:{...ye(o),letterSpacing:o.typeCase==="uppercase"?"0.08em":"0.02em"},children:"Add to cart"})})]})})},nn=({palette:e,personality:o})=>{const t=tr(o),a=qr(o,e),n=o.signatureMotif,l=o.voice.includes("athletic")?"★":o.voice.includes("mission")||o.voice.includes("futurist")?"◉":"♥",s=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",d=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",u=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:Fo(o,e),boxShadow:Ro(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:Oe(o,"heavy")},children:n}),r.jsx(i.Text,{fontSize:10,color:e.onPrimary,style:ye(o),children:u})]})}),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:{...a,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, ${Be(e.primary,20)} 0%, ${Be(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:Ke(o),children:s}),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:d})]}),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:Ke(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:ye(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:Fo(o,e),boxShadow:Ro(o,e)},children:r.jsx(i.Text,{fontSize:13,color:e.onPrimary,style:{...ye(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:{...ye(o),letterSpacing:o.typeCase==="uppercase"?"0.08em":"0.02em"},children:"Add to cart"})})]})]})})]})},I1=[{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"}],Tt=(e,o)=>{const t=e.replace("#","").padEnd(6,"0").slice(0,6),a=parseInt(t.slice(0,2),16),n=parseInt(t.slice(2,4),16),l=parseInt(t.slice(4,6),16);return[a,n,l].some(Number.isNaN)?e:`rgba(${a}, ${n}, ${l}, ${o})`},It=e=>typeof e=="string"&&/^#([0-9a-f]{3}){1,2}$/i.test(e),we=(e,o,t)=>It(e)?Tt(e,o):e.startsWith("rgba")||e.startsWith("rgb")?e.replace(/rgba?\(([^)]+)\)/,(a,n)=>`rgba(${n.split(",").slice(0,3).map(s=>s.trim()).join(", ")}, ${o})`):t==="dark"?`rgba(255,255,255,${o})`:`rgba(0,0,0,${o})`,F1=({block:e,palette:o,personality:t})=>{const a=tr(t);let n,l;if(e.source==="ink")n=o.text,l=o.canvas;else{const m=o[e.source]||o.primary;e.intensity==="solid"?(n=m,l=o.onPrimary):(n=we(m,.32,o.appearance),l=(o.appearance==="dark",o.text))}if(t.accentTreatment==="gradient"&&e.intensity==="tint"){const m=o[e.source],g=o.secondary;It(m)&&It(g)&&(n=`linear-gradient(135deg, ${Tt(m,.32)} 0%, ${Tt(g,.32)} 100%)`)}if(t.accentTreatment==="stripe"&&e.intensity==="tint"){const m=we(o[e.source],.32,o.appearance),g=we(o.secondary,.18,o.appearance);n=`repeating-linear-gradient(135deg, ${m} 0 18px, ${g} 18px 36px)`}const s=we(l,.72,o.appearance),d=we(l,.55,o.appearance),u=l,c=l===o.canvas?o.text:o.canvas;return r.jsx(i.View,{width:"min(100%, 460px)",borderRadius:t.cardRadius*2,padding:a.large,style:{background:n},children:r.jsxs(i.Vertical,{gap:a.gap+6,children:[r.jsxs(i.Text,{fontSize:11,color:d,style:{...ye(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:Ke(t),children:e.heading}),r.jsx(i.Text,{fontSize:16,lineHeight:"22px",color:s,style:{fontStyle:t.typeStyle},children:e.body})]}),r.jsx(i.View,{alignSelf:"flex-start",paddingHorizontal:28,paddingVertical:14,borderRadius:t.pillRadius,style:{backgroundColor:u,cursor:"pointer"},children:r.jsx(i.Text,{fontSize:15,color:c,style:{...ye(t),letterSpacing:t.typeCase==="uppercase"?"0.08em":"0.01em",textTransform:t.typeCase==="uppercase"?"uppercase":"none"},children:e.cta})})]})})},ln=[{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"}],sn=({palette:e,article:o,personality:t})=>{const a=tr(t),n=qr(t,e),l=e[o.badgeTone]||e.primary,s=e.secondary||e.primary,d=t.accentTreatment==="gradient"?`linear-gradient(135deg, ${we(l,.55,e.appearance)} 0%, ${we(s,.55,e.appearance)} 100%)`:t.accentTreatment==="stripe"?`repeating-linear-gradient(45deg, ${we(l,.45,e.appearance)} 0 16px, ${we(s,.25,e.appearance)} 16px 32px)`:t.accentTreatment==="halftone"?`radial-gradient(circle at 30% 30%, ${we(l,.55,e.appearance)} 0%, ${we(s,.35,e.appearance)} 70%)`:t.accentTreatment==="glow"?`radial-gradient(circle at 50% 60%, ${we(l,.45,e.appearance)} 0%, ${e.appearance==="dark"?"#050505":"#0a0a0a"} 100%)`:we(l,.32,e.appearance),u=t.voice.includes("mission")||t.voice.includes("futurist")?"◉":o.favorite,c=u==="♥"?e.error||e.primary:u==="★"&&e.warning||e.primary;return r.jsx(i.View,{width:"min(100%, 320px)",borderRadius:t.cardRadius,overflow:"hidden",borderWidth:1,borderStyle:"solid",style:{...n,borderColor:e.border,color:e.text},children:r.jsxs(i.Vertical,{gap:a.gap,padding:a.padding,children:[r.jsxs(i.View,{position:"relative",height:160,borderRadius:t.cardRadius,overflow:"hidden",style:{background:d},children:[r.jsx(i.View,{position:"absolute",top:12,left:12,paddingHorizontal:10,paddingVertical:4,borderRadius:t.badgeRadius,style:{background:Fo(t,{...e,primary:l}),boxShadow:Ro(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:Oe(t,"heavy")},children:t.signatureMotif}),r.jsx(i.Text,{fontSize:10,color:e.onPrimary,style:ye(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:c,style:{lineHeight:1},children:u})})]}),r.jsxs(i.Vertical,{gap:8,children:[r.jsx(i.Text,{fontSize:11,color:e.muted,style:ye(t),children:o.category}),r.jsx(i.Text,{fontSize:18,lineHeight:"24px",color:e.text,style:Ke(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:Oe(t,"normal"),fontStyle:t.typeStyle},children:o.author}),r.jsx(i.Text,{fontSize:11,color:e.muted,children:o.meta})]})]})]})})},cn=({palette:e,personality:o,config:t})=>{var g,h,f,y;const a=o.signatureMotif,n=e.primary,l=Fo(o,e),s=Ro(o,e),d=((h=(g=t.tokens)==null?void 0:g.typography)==null?void 0:h.fontFamily)||((y=(f=t.tokens)==null?void 0:f.rawCssVars)==null?void 0:y.display)||"inherit",u=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}`,c=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:d,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, ${n}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%, ${n}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:s},children:r.jsx(i.Text,{fontSize:16,color:e.onPrimary,style:{lineHeight:1,fontWeight:Oe(o,"heavy")},children:a})}),r.jsx(i.Text,{fontSize:13,color:e.muted,style:{...ye(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:{...Ke(o),letterSpacing:o.typeCase==="uppercase"?"0.06em":o.letterSpacing,maxWidth:580,fontFamily:d},children:u}),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:s},children:r.jsx(i.Text,{fontSize:15,color:e.onPrimary,style:{...ye(o),letterSpacing:o.typeCase==="uppercase"?"0.14em":"0.02em",fontWeight:Oe(o,"heavy"),fontFamily:d},children:c})}),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:{...ye(o),letterSpacing:o.typeCase==="uppercase"?"0.14em":"0.02em",fontWeight:Oe(o,"heavy"),fontFamily:d},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(x=>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:x.value,borderColor:e.border}}),r.jsxs(i.Vertical,{gap:0,children:[r.jsx(i.Text,{fontSize:11,color:e.muted,style:ye(o),children:x.label}),r.jsx(i.Text,{fontSize:11,color:e.text,style:{fontFamily:"ui-monospace, SFMono-Regular, Menlo, monospace"},children:h1(x.value)})]})]},x.label))})]})]})},dn=({palette:e,config:o})=>r.jsxs(i.Vertical,{gap:20,padding:36,alignItems:"center",borderRadius:16,style:{backgroundColor:e.surface},children:[r.jsx(Ce,{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(le,{shape:"pill",size:"md",children:"Learn more"}),r.jsx(le,{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})]}),un=({palette:e,config:o})=>r.jsxs(fe,{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(fe.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(Ce,{variant:"filled",content:"New"})]})}),r.jsx(fe.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(fe.Footer,{children:r.jsx(le,{size:"sm",children:o.metadata.id==="spacex"?"Explore":"Review"})})]}),pn=({palette:e})=>r.jsxs(i.Vertical,{gap:14,children:[r.jsxs(i.Horizontal,{gap:12,flexWrap:"wrap",alignItems:"center",children:[r.jsx(le,{colorScheme:"primary",children:"Primary"}),r.jsx(le,{colorScheme:"secondary",children:"Secondary"}),r.jsx(le,{colorScheme:"black",children:"Black"}),r.jsx(le,{colorScheme:"white",children:"White"})]}),r.jsxs(i.Horizontal,{gap:12,flexWrap:"wrap",alignItems:"center",children:[r.jsx(le,{variant:"outline",colorScheme:"primary",children:"Primary"}),r.jsx(le,{variant:"outline",colorScheme:"secondary",children:"Secondary"}),r.jsx(le,{variant:"outline",colorScheme:"black",children:"Black"}),r.jsx(le,{variant:"outline",colorScheme:"white",children:"White"})]}),r.jsxs(i.Horizontal,{gap:12,flexWrap:"wrap",alignItems:"center",children:[r.jsx(le,{variant:"ghost",views:{container:{color:e.text}},children:"Ghost"}),r.jsx(le,{variant:"link",views:{container:{color:e.primary}},children:"Link"}),r.jsx(le,{isDisabled:!0,children:"Disabled"}),r.jsx(le,{isLoading:!0,children:"Loading"})]})]}),mn=({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(Ce,{content:"Badge"}),r.jsx(Ce,{variant:"outline",content:"Outline"}),r.jsx(Ce,{content:"Primary",views:{container:{backgroundColor:e.primary,color:e.onPrimary,borderColor:e.primary}}}),r.jsx(Ce,{content:"Success",views:{container:{backgroundColor:e.success,color:e.onPrimary,borderColor:e.success}}}),r.jsx(Ce,{content:"Warning",views:{container:{backgroundColor:e.warning,color:e.onPrimary,borderColor:e.warning}}}),r.jsx(Ce,{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(fr,{status:"success",label:"Operational"}),r.jsx(fr,{status:"warning",label:"Degraded"}),r.jsx(fr,{status:"error",label:"Outage"}),r.jsx(To,{size:"sm",loaderColor:o.theme.primary})]}),r.jsx(_t,{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(Ii,{value:64,height:10,showLabel:!0,color:e.primary,backgroundColor:e.border,views:{container:{backgroundColor:e.border},bar:{backgroundColor:e.primary}}})]})}),gn=({palette:e,config:o,mode:t})=>{const a={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(ve,{size:"md",label:"Name",placeholder:"Ada Lovelace",views:a}),r.jsx(Yo,{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:a.container,field:{fontSize:14,lineHeight:"20px",color:e.text},text:{fontSize:14,lineHeight:"20px",color:e.text}}}),r.jsx(Jt,{label:"Notes",placeholder:"Add implementation notes",views:a})]}),r.jsxs(i.Horizontal,{gap:16,flexWrap:"wrap",alignItems:"center",children:[r.jsx(Zt,{label:"Email updates",defaultIsSelected:!0}),r.jsx(Ki,{label:"Standard",value:"standard",defaultIsSelected:!0}),r.jsx(Kt,{label:"Enabled",isChecked:!0})]})]})})},R1=({config:e})=>{const[o,t]=p.useState(1),a=m1(e),n=g1(e),l=y1(e);return r.jsxs(i.Vertical,{gap:24,children:[r.jsx(pe,{title:"Brand Snapshot (Light & Dark)",config:e,children:r.jsxs(i.Vertical,{gap:20,children:[r.jsx(ue,{config:e,palette:a,label:"On light surface",children:r.jsx(cn,{palette:a,personality:l,config:e})}),r.jsx(ue,{config:e,palette:n,label:"On dark surface",children:r.jsx(cn,{palette:n,personality:l,config:e})})]})}),r.jsx(pe,{title:"Buttons — Light & Dark",config:e,children:r.jsxs(i.Horizontal,{gap:20,flexWrap:"wrap",alignItems:"flex-start",children:[r.jsx(ue,{config:e,palette:a,label:"On light surface",children:r.jsx(pn,{palette:a})}),r.jsx(ue,{config:e,palette:n,label:"On dark surface",children:r.jsx(pn,{palette:n})})]})}),r.jsx(pe,{title:"Status & Feedback — Light & Dark",config:e,children:r.jsxs(i.Horizontal,{gap:20,flexWrap:"wrap",alignItems:"flex-start",children:[r.jsx(ue,{config:e,palette:a,label:"On light surface",children:r.jsx(mn,{palette:a,config:e})}),r.jsx(ue,{config:e,palette:n,label:"On dark surface",children:r.jsx(mn,{palette:n,config:e})})]})}),r.jsx(pe,{title:"Forms — Light & Dark",config:e,children:r.jsxs(i.Horizontal,{gap:20,flexWrap:"wrap",alignItems:"flex-start",children:[r.jsx(ue,{config:e,palette:a,label:"On light surface",children:r.jsx(gn,{palette:a,config:e,mode:"light"})}),r.jsx(ue,{config:e,palette:n,label:"On dark surface",children:r.jsx(gn,{palette:n,config:e,mode:"dark"})})]})}),r.jsx(pe,{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(ve,{size:"md",label:"Name",placeholder:"Ada Lovelace"}),r.jsx(Yo,{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(Jt,{label:"Notes",placeholder:"Add implementation notes"}),r.jsxs(i.Vertical,{gap:12,children:[r.jsx(Zt,{label:"Email updates",defaultIsSelected:!0}),r.jsx(Ki,{label:"Standard",value:"standard",defaultIsSelected:!0}),r.jsx(Kt,{label:"Enabled",isChecked:!0}),r.jsx(ql,{defaultValue:58,showValue:!0}),r.jsx(vl,{length:6,label:"Verification Code"})]})]})}),r.jsx(pe,{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(ve,{size:"md",label:"Default",placeholder:"Type here",helperText:"Resting state"}),r.jsx(ve,{size:"md",label:"Filled",defaultValue:"Ada Lovelace",helperText:"Has value"}),r.jsx(ve,{size:"md",label:"With helper",placeholder:"user@example.com",helperText:"We'll never share your email"}),r.jsx(ve,{size:"md",label:"Error",defaultValue:"invalid@",error:"Please enter a valid email"}),r.jsx(ve,{size:"md",label:"Disabled",isDisabled:!0,defaultValue:"Cannot edit",helperText:"Field locked"}),r.jsx(ve,{size:"md",label:"Read only",defaultValue:"Read-only value",isReadOnly:!0,helperText:"View only"}),r.jsx(Yo,{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(Yo,{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(pe,{title:"Elevation & Depth",config:e,children:r.jsx(i.View,{display:"grid",gridTemplateColumns:"repeat(auto-fit, minmax(200px, 1fr))",gap:20,children:k1(e).map(s=>r.jsxs(i.Vertical,{gap:12,children:[r.jsx(i.View,{height:120,borderRadius:12,backgroundColor:e.theme.canvas,style:{boxShadow:s.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:s.name}),r.jsx(i.Text,{fontSize:11,fontWeight:"600",color:e.theme.primary,children:s.label})]}),r.jsx(i.Text,{fontSize:11,color:e.theme.muted,children:s.description}),r.jsx(i.Text,{fontSize:10,color:e.theme.muted,style:{wordBreak:"break-word",opacity:.8},children:s.shadow})]})]},s.name))})}),r.jsx(pe,{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(([s,d,u])=>{const c=e.theme[s];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:c}),r.jsxs(i.Vertical,{gap:4,padding:12,backgroundColor:e.theme.surface,children:[r.jsx(i.Text,{fontSize:13,fontWeight:"700",children:d}),r.jsxs(i.Text,{fontSize:11,color:e.theme.muted,children:["theme.",s]}),r.jsx(i.Text,{fontSize:11,color:e.theme.muted,children:c})]})]},s)})})}),r.jsx(pe,{title:"Pricing — Booking (Light & Dark)",config:e,children:r.jsxs(i.Horizontal,{gap:20,flexWrap:"wrap",alignItems:"flex-start",children:[r.jsx(ue,{config:e,palette:a,label:"On light surface",children:r.jsx(on,{palette:a})}),r.jsx(ue,{config:e,palette:n,label:"On dark surface",children:r.jsx(on,{palette:n})})]})}),r.jsx(pe,{title:"Pricing — SaaS Tiers (Light & Dark)",config:e,children:r.jsxs(i.Vertical,{gap:20,children:[r.jsx(ue,{config:e,palette:a,label:"On light surface",children:r.jsx(i.Horizontal,{gap:16,flexWrap:"wrap",alignItems:"stretch",children:rn.map(s=>r.jsx(tn,{palette:a,tier:s,personality:l},s.name))})}),r.jsx(ue,{config:e,palette:n,label:"On dark surface",children:r.jsx(i.Horizontal,{gap:16,flexWrap:"wrap",alignItems:"stretch",children:rn.map(s=>r.jsx(tn,{palette:n,tier:s,personality:l},s.name))})})]})}),r.jsx(pe,{title:"Pricing — Product (Light & Dark)",config:e,children:r.jsxs(i.Horizontal,{gap:20,flexWrap:"wrap",alignItems:"flex-start",children:[r.jsx(ue,{config:e,palette:a,label:"On light surface",children:r.jsx(an,{palette:a,personality:l})}),r.jsx(ue,{config:e,palette:n,label:"On dark surface",children:r.jsx(an,{palette:n,personality:l})})]})}),r.jsx(pe,{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(ue,{config:e,palette:a,label:"On light surface",children:r.jsx(nn,{palette:a,personality:l})}),r.jsx(ue,{config:e,palette:n,label:"On dark surface",children:r.jsx(nn,{palette:n,personality:l})})]})}),r.jsx(pe,{title:"Content — Color Block Cards",config:e,children:r.jsx(i.Horizontal,{gap:20,flexWrap:"wrap",alignItems:"flex-start",children:I1.map(s=>r.jsx(F1,{block:s,palette:a,personality:l},s.slug))})}),r.jsx(pe,{title:"Content — Article Cards w/ Badge & Favorite (Light & Dark)",config:e,children:r.jsxs(i.Vertical,{gap:20,children:[r.jsx(ue,{config:e,palette:a,label:"On light surface",children:r.jsx(i.Horizontal,{gap:16,flexWrap:"wrap",alignItems:"stretch",children:ln.map(s=>r.jsx(sn,{palette:a,article:s,personality:l},s.id))})}),r.jsx(ue,{config:e,palette:n,label:"On dark surface",children:r.jsx(i.Horizontal,{gap:16,flexWrap:"wrap",alignItems:"stretch",children:ln.map(s=>r.jsx(sn,{palette:n,article:s,personality:l},s.id))})})]})}),r.jsx(pe,{title:"CTA Card — Light & Dark",config:e,children:r.jsxs(i.Horizontal,{gap:20,flexWrap:"wrap",alignItems:"flex-start",children:[r.jsx(ue,{config:e,palette:a,label:"On light surface",children:r.jsx(dn,{palette:a,config:e})}),r.jsx(ue,{config:e,palette:n,label:"On dark surface",children:r.jsx(dn,{palette:n,config:e})})]})}),r.jsx(pe,{title:"Product Card — Light & Dark",config:e,children:r.jsxs(i.Horizontal,{gap:20,flexWrap:"wrap",alignItems:"flex-start",children:[r.jsx(ue,{config:e,palette:a,label:"On light surface",children:r.jsx(un,{palette:a,config:e})}),r.jsx(ue,{config:e,palette:n,label:"On dark surface",children:r.jsx(un,{palette:n,config:e})})]})}),r.jsx(pe,{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(fe,{width:"min(100%, 320px)",children:[r.jsx(fe.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(Ce,{variant:"filled",content:"New"})]})}),r.jsx(fe.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(fe.Footer,{children:r.jsx(le,{size:"sm",children:e.metadata.id==="spacex"?"Explore":"Review"})})]}),r.jsxs(fe,{width:"min(100%, 320px)",children:[r.jsx(fe.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(Hn,{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(Ce,{variant:"outline",content:"Active"})]})}),r.jsx(fe.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(_t,{variant:"info",title:"Config active",description:"This alert is rendered by the shared component."})})]})]}),r.jsx(v1,{config:e}),r.jsx(Fn,{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(Ce,{content:"Config primary color"})]})})}),r.jsxs(We,{children:[r.jsx(We.Content,{children:[1,2,3].map(s=>r.jsx(We.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 ",s]})})},s))}),r.jsxs(i.Horizontal,{gap:12,marginTop:12,justifyContent:"center",children:[r.jsx(We.Previous,{}),r.jsx(We.Next,{})]})]})]})}),r.jsx(pe,{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(Io,{tabs:C1,defaultValue:"homes",views:{tab:{borderRadius:qo(e,"tabs")},activeTab:{borderRadius:qo(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(Io,{defaultValue:"overview",views:{tab:{borderRadius:qo(e,"tabs")},activeTab:{borderRadius:qo(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(so,{items:j1,orientation:"horizontal",defaultActiveItemId:"components"}),(()=>{const s=qo(e,"accordion"),d={borderWidth:0,borderTopWidth:0,borderBottomWidth:0,borderLeftWidth:0,borderRightWidth:0,marginBottom:0,borderRadius:0},u={...d,borderTopWidth:1,borderTopStyle:"solid",borderTopColor:e.theme.border};return r.jsxs(Me,{defaultValue:"tokens",collapsible:!0,shape:"rounded",views:{container:{borderRadius:s,overflow:"hidden",borderWidth:1,borderStyle:"solid",borderColor:e.theme.border}},children:[r.jsxs(Me.Item,{value:"tokens",...d,views:{item:d,trigger:{borderRadius:0}},children:[r.jsx(Me.Trigger,{children:"Token extraction"}),r.jsx(Me.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(Me.Item,{value:"overrides",...u,views:{item:u,trigger:{borderRadius:0}},children:[r.jsx(Me.Trigger,{children:"Override behavior"}),r.jsx(Me.Content,{children:r.jsx(i.Text,{color:e.theme.muted,children:"Props passed directly to components override the design-system defaults."})})]})]})})(),r.jsx(Rr,{label:"advanced tools"}),r.jsxs(i.Horizontal,{gap:16,flexWrap:"wrap",alignItems:"center",children:[r.jsx(ea,{color:e.theme.primary,children:"Toggle Button"}),r.jsx(ci,{color:e.theme.primary,items:[{id:"left",value:"Left"},{id:"center",value:"Center"},{id:"right",value:"Right"}]}),r.jsx(Or,{content:"Tooltip message",children:r.jsx(le,{variant:"outline",children:"Hover for Tooltip"})}),r.jsxs(Se,{children:[r.jsx(Se.Trigger,{children:r.jsx(le,{variant:"ghost",children:"Hover Card"})}),r.jsx(Se.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(fi,{value:e.theme.primary}),r.jsx(Ri,{shareData:{url:"https://example.com",title:"Example"}}),r.jsx(Ot,{to:"#",children:"Inline Link component"})]}),r.jsx(i.Horizontal,{gap:16,flexWrap:"wrap",alignItems:"center",children:r.jsx(Ti,{currentPage:o,totalPages:10,onPageChange:t})})]})})]})},z1=({config:e})=>{var o;return r.jsxs(Wt,{config:e,children:[r.jsx(c1,{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(T1,{config:e}),r.jsx(R1,{config:e})]})]})})]})};exports.Accordion=Me;exports.Alert=_t;exports.ArrowIcon=Iu;exports.AspectRatio=Fn;exports.AttachmentGroup=ui;exports.AttachmentIcon=Xo;exports.AttachmentPreview=ef;exports.AudioIcon=vo;exports.AudioInput=Yu;exports.AudioWaveform=Bt;exports.Avatar=Hn;exports.BackIcon=Jd;exports.Background=Yi;exports.Badge=Ce;exports.BatteryIcon=Ad;exports.BluetoothIcon=ju;exports.BoldArrowIcon=Tu;exports.BookmarkIcon=Vd;exports.Button=le;exports.CHART_COLORS=ze;exports.CalendarIcon=mu;exports.CameraIcon=Su;exports.Card=fe;exports.Carousel=We;exports.Chart=Zp;exports.ChartIcon=Yd;exports.ChatInput=qi;exports.ChatWidget=Xi;exports.ChatWidgetComponent=pa;exports.ChatWidgetWidget=Mb;exports.CheckIcon=Kd;exports.Checkbox=Zt;exports.ChevronIcon=se;exports.ClockIcon=gu;exports.CloseEyeIcon=Et;exports.CloseIcon=Te;exports.CloudIcon=Ed;exports.ColorInput=Qm;exports.ColorPicker=fi;exports.ComboBox=wg;exports.Command=Ho;exports.ContextMenu=Mo;exports.CookieConsent=am;exports.CopyIcon=Dd;exports.CountryPicker=n0;exports.CreditCardIcon=cu;exports.CropIcon=zu;exports.DEFAULT_CHART_COLORS=qn;exports.DatePicker=hg;exports.DeleteIcon=$d;exports.DesignSystem=z1;exports.DesignSystemProvider=Wt;exports.Divider=_y;exports.DocumentIcon=Gd;exports.DownloadIcon=Bd;exports.DragAndDrop=Kf;exports.DragAndDropComponent=di;exports.DragHandleIcon=kd;exports.DragHandleLinesIcon=Wu;exports.Drawer=io;exports.DropZone=ey;exports.DropdownMenu=er;exports.DustBinIcon=Wr;exports.EditIcon=Ld;exports.EmojiPicker=fy;exports.ErrorIcon=Ar;exports.ExternalLinkIcon=vn;exports.FacebookIcon=Fd;exports.FileIcon=to;exports.FileImage=pm;exports.FileSVG=um;exports.FilterIcon=pu;exports.FolderIcon=bd;exports.FormikChatInput=rh;exports.FormikCheckbox=Vg;exports.FormikColorInput=ah;exports.FormikComboBox=Sh;exports.FormikCountryPicker=sh;exports.FormikDatePicker=lh;exports.FormikEmojiPicker=Zh;exports.FormikForm=Hg;exports.FormikIconPicker=Uh;exports.FormikOTPInput=Mh;exports.FormikPassword=kh;exports.FormikRadio=Bg;exports.FormikSelect=dh;exports.FormikSelector=Ph;exports.FormikSlider=Rh;exports.FormikSwitch=ph;exports.FormikTagInput=gh;exports.FormikTextArea=fh;exports.FormikTextField=xh;exports.FormikToggle=Dh;exports.FormikToggleGroup=_h;exports.FormikUploader=Vl;exports.GiftIcon=ru;exports.Gradient=yi;exports.HeartIcon=Wd;exports.HelpIcon=xd;exports.HomeIcon=_d;exports.HoverCard=Se;exports.Icon=kr;exports.IconPicker=xy;exports.ImageIcon=Sd;exports.InfoIcon=Ge;exports.InstagramIcon=Td;exports.LayoutIcon=iu;exports.LikeIcon=Cu;exports.Link=Ot;exports.LinkIcon=lu;exports.LinkedinIcon=Rd;exports.Loader=To;exports.LoadingSpinnerIcon=Vt;exports.LockIcon=Nd;exports.LogoutIcon=au;exports.MagicWandIcon=bu;exports.MapPinIcon=hu;exports.MediaPreview=rf;exports.MenuIcon=fu;exports.Menubar=co;exports.MessageLayout=_u;exports.MessageView=Mn;exports.MicrophoneIcon=Pt;exports.MinusIcon=Cn;exports.Modal=lo;exports.MoonIcon=Xd;exports.MoreIcon=du;exports.MousePointerIcon=In;exports.NavigationMenu=so;exports.NotificationIcon=Ud;exports.OTPInput=vl;exports.OpenEyeIcon=Dt;exports.Pagination=Ti;exports.PanelIcon=Tn;exports.Password=yg;exports.PauseIcon=Md;exports.PlayIcon=Sn;exports.PlusIcon=Od;exports.PowerOffIcon=nu;exports.PrintIcon=xu;exports.ProfileIcon=qd;exports.ProgressBar=Ii;exports.RefreshIcon=yu;exports.Resizable=da;exports.RotateIcon=ou;exports.SaveIcon=Pd;exports.SearchIcon=Cr;exports.Select=Yo;exports.Selector=$m;exports.SendIcon=At;exports.Separator=Rr;exports.SettingsIcon=jn;exports.ShapeIcon=eu;exports.ShareButton=Ri;exports.ShareIcon=wn;exports.ShieldIcon=tu;exports.Sidebar=or;exports.Slider=ql;exports.SliderIcon=Ru;exports.SpinnerIcon=Fu;exports.StarIcon=Hd;exports.StatusIndicator=fr;exports.StopIcon=Hr;exports.SuccessIcon=$t;exports.Switch=Kt;exports.Table=Fe;exports.Tabs=Io;exports.TagInput=Ig;exports.TextArea=Jt;exports.TextField=ve;exports.TextIcon=Zd;exports.ThreadsIcon=zd;exports.TickIcon=Pr;exports.Title=si;exports.Toast=wx;exports.Toggle=ea;exports.ToggleGroup=ci;exports.Tooltip=Or;exports.TrashIcon=uu;exports.TwitchIcon=vd;exports.TwitterIcon=jd;exports.UnLikeIcon=ku;exports.UnlockIcon=wu;exports.UploadIcon=Lt;exports.Uploader=Er;exports.UserIcon=yd;exports.VideoIcon=Cd;exports.WarningIcon=Ht;exports.WifiIcon=vu;exports.XIcon=wd;exports.YoutubeIcon=Id;exports.ZapIcon=su;exports.ZoomInIcon=Mu;exports.ZoomOutIcon=Qd;exports.deepMerge=Ee;exports.defaultDesignSystemConfig=hn;exports.designSystemConfigList=cd;exports.designSystemConfigs=Rt;exports.getDesignSystemComponentProps=Mt;exports.hideDrawer=Gl;exports.hideMessage=zn;exports.hideModal=oa;exports.mergeDesignSystemComponentProps=yn;exports.normalizeDesignSystemComponentProps=zt;exports.showDrawer=bf;exports.showMessage=Rn;exports.showModal=tf;exports.showToast=uo;exports.useDesignSystem=Mr;exports.useDesignSystemComponentProps=zo;exports.useDrawerStore=Xe;exports.useMergedDesignSystemComponentProps=me;exports.useMessageStore=Vr;exports.useModalStore=Ye;exports.useToast=vx;
|
|
36
36
|
//# sourceMappingURL=web.cjs.js.map
|