@chaibuilder/sdk 3.2.8 → 4.0.0-beta.2

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.
Files changed (184) hide show
  1. package/README.md +25 -20
  2. package/dist/2SSKDMRQ-C4VFVd-q.cjs +1 -0
  3. package/dist/2SSKDMRQ-DSnzF_1o.js +42 -0
  4. package/dist/AP7HFJJL-B7YYCY9q.cjs +1228 -0
  5. package/dist/AP7HFJJL-Cxwj01Aq.js +9214 -0
  6. package/dist/IconPicker-C9-ieDWm.cjs +1 -0
  7. package/dist/IconPicker-RqVvq6G2.js +59 -0
  8. package/dist/WDYDFRGG-C7aSUcjs.js +33 -0
  9. package/dist/WDYDFRGG-b3T2SQbz.cjs +1 -0
  10. package/dist/_commonjsHelpers-C6fGbg64.js +6 -0
  11. package/dist/_commonjsHelpers-DwGv2jUC.cjs +1 -0
  12. package/dist/actions-registery-CZ1w0NKa.js +15545 -0
  13. package/dist/actions-registery-YnFmU21O.cjs +418 -0
  14. package/dist/actions.cjs +1 -0
  15. package/dist/actions.d.ts +3202 -0
  16. package/dist/actions.js +216 -0
  17. package/dist/active-in-another-tab-Clng6zpY.cjs +1 -0
  18. package/dist/active-in-another-tab-wb8qolB8.js +34 -0
  19. package/dist/add-new-language-page-C4BuMTaN.cjs +1 -0
  20. package/dist/add-new-language-page-D7NDABl1.js +401 -0
  21. package/dist/add-new-page-B4hc0B-g.js +31 -0
  22. package/dist/add-new-page-BNfwKjRd.cjs +1 -0
  23. package/dist/ai-panel-content-BnbURb7j.js +61 -0
  24. package/dist/ai-panel-content-DPy2jgKw.cjs +1 -0
  25. package/dist/ai-panel-default-lang-3tCHzab5.cjs +3 -0
  26. package/dist/ai-panel-default-lang-oVk4TDeb.js +341 -0
  27. package/dist/ai-panel-other-lang-BBHCCSen.cjs +1 -0
  28. package/dist/ai-panel-other-lang-DmQ3QMDD.js +162 -0
  29. package/dist/ai-prompt-input-DaTyfib-.js +655 -0
  30. package/dist/ai-prompt-input-b5ty81RB.cjs +1 -0
  31. package/dist/ai-translation-prompt-DJPe2O-n.js +28 -0
  32. package/dist/ai-translation-prompt-c0Q3zkT2.cjs +1 -0
  33. package/dist/{apply-binding-DLaiD20q.js → apply-binding-6iwlED02.js} +156 -166
  34. package/dist/apply-binding-KKp5PnpZ.cjs +1 -0
  35. package/dist/{code-display-DuH-UOhl.js → code-display-BzBq5xSn.js} +1 -1
  36. package/dist/code-display-Q3_sK_Ta.cjs +1 -0
  37. package/dist/code-editor-BQZi6-FB.cjs +1 -0
  38. package/dist/code-editor-DWWnphW9.js +50 -0
  39. package/dist/continue-editing-in-this-client-BllU94XG.js +24 -0
  40. package/dist/continue-editing-in-this-client-D9HyD4GP.cjs +1 -0
  41. package/dist/core-BoRDjj4h.cjs +1 -0
  42. package/dist/core-yvI6kCyw.js +56 -0
  43. package/dist/core.cjs +1 -1
  44. package/dist/core.d.ts +2 -393
  45. package/dist/core.js +37 -105
  46. package/dist/css-import-modal-BSMGKA2T.cjs +13 -0
  47. package/dist/{css-import-modal-CFB2YjDT.js → css-import-modal-D72a-16X.js} +39 -38
  48. package/dist/{delete-design-token-BjMakV-b.js → delete-design-token-Cd1ZDtqT.js} +3 -3
  49. package/dist/delete-design-token-D_TLlO3I.cjs +1 -0
  50. package/dist/delete-page-ByQwBupJ.cjs +1 -0
  51. package/dist/delete-page-DC8pzvWW.js +70 -0
  52. package/dist/design-token-usage-BqZeR1sT.cjs +1 -0
  53. package/dist/design-token-usage-DE4XCDdn.js +113 -0
  54. package/dist/digital-asset-manager-BYLKFEYi.cjs +1 -0
  55. package/dist/digital-asset-manager-C_gL_0YY.js +876 -0
  56. package/dist/duplicate-page-BoVhko2q.js +133 -0
  57. package/dist/duplicate-page-vdvwLQLo.cjs +1 -0
  58. package/dist/dynamic-page-selector-CSndg2-y.js +85 -0
  59. package/dist/dynamic-page-selector-DdnbCuQZ.cjs +1 -0
  60. package/dist/fonts-B-Xt29pe.cjs +1 -0
  61. package/dist/fonts-DRly3Wzd.js +78 -0
  62. package/dist/{get-chai-builder-tailwind-config-C6MHaUM0.cjs → get-chai-builder-tailwind-config-B9rCyiQo.cjs} +1 -1
  63. package/dist/{get-chai-builder-tailwind-config-BqaIvg8p.js → get-chai-builder-tailwind-config-DjoVOuAf.js} +13 -10
  64. package/dist/get-chai-builder-theme-BYtp20KD.js +24 -0
  65. package/dist/get-chai-builder-theme-Dl72X7cz.cjs +1 -0
  66. package/dist/get-seo-defaults-9zHebckY.js +65 -0
  67. package/dist/get-seo-defaults-Cw7vFt-B.cjs +1 -0
  68. package/dist/image-compression-DZ9WMmyn.cjs +1 -0
  69. package/dist/image-compression-DsZ1oqpb.js +37 -0
  70. package/dist/image-editor-DTspjj_c.cjs +1 -0
  71. package/dist/image-editor-oypq8asR.js +108 -0
  72. package/dist/index-B-rSiAp_.cjs +1 -0
  73. package/dist/index-BDnwJqMw.js +4732 -0
  74. package/dist/index-CbwxUFy_.cjs +5 -0
  75. package/dist/index-CnSjWE1P.cjs +160 -0
  76. package/dist/index-Dxfyt4d4.js +39 -0
  77. package/dist/index-S8ibZk9Q.js +19069 -0
  78. package/dist/json-diff-viewer-B5dr-Y_L.js +258 -0
  79. package/dist/json-diff-viewer-XX1pgabt.cjs +8 -0
  80. package/dist/lang-panel-BPxex-M2.cjs +1 -0
  81. package/dist/lang-panel-Cn83SRzd.js +215 -0
  82. package/dist/manage-design-tokens-ConiyuPr.cjs +1 -0
  83. package/dist/{manage-design-tokens-DUoMdCBl.js → manage-design-tokens-lP4HLS0P.js} +31 -32
  84. package/dist/mark-as-template-DYRxre1f.cjs +1 -0
  85. package/dist/mark-as-template-jncsjfHm.js +156 -0
  86. package/dist/models-5gOsRC56.cjs +1 -0
  87. package/dist/models-D95ZYr_x.js +70 -0
  88. package/dist/nested-path-selector-content-B-8LqhXI.js +87 -0
  89. package/dist/nested-path-selector-content-BYtLi7mC.cjs +1 -0
  90. package/dist/no-language-page-content-DAbLq0gX.cjs +1 -0
  91. package/dist/no-language-page-content-D_zd9Rb0.js +42 -0
  92. package/dist/no-language-page-dialog-C5Ps6YYL.js +10 -0
  93. package/dist/no-language-page-dialog-fXmbQO7L.cjs +1 -0
  94. package/dist/page-creator-VWIB2VAs.cjs +1 -0
  95. package/dist/page-creator-wCMtlE6Z.js +795 -0
  96. package/dist/page-lock-BPCxfv9J.js +30 -0
  97. package/dist/page-lock-DweiYy1w.cjs +1 -0
  98. package/dist/page-locked-dialog-BlbgvaG2.cjs +1 -0
  99. package/dist/page-locked-dialog-ByGl18_m.js +133 -0
  100. package/dist/page-manager-new-BWFE-S-O.js +394 -0
  101. package/dist/page-manager-new-D0lGfNnS.cjs +1 -0
  102. package/dist/page-manager-search-and-filter-DpGMoOII.cjs +1 -0
  103. package/dist/page-manager-search-and-filter-kNJFWJ86.js +201 -0
  104. package/dist/page-revisions-content-DYxXZqmh.cjs +1 -0
  105. package/dist/page-revisions-content-Ulr8slUN.js +445 -0
  106. package/dist/pages.cjs +1 -0
  107. package/dist/pages.d.ts +492 -0
  108. package/dist/pages.js +27 -0
  109. package/dist/{plugin-BOcGV_IY.js → plugin-3ZKK6RXm.js} +30 -44
  110. package/dist/plugin-C6rgJDNQ.cjs +22 -0
  111. package/dist/publish-pages-content-BTPzt_m4.js +178 -0
  112. package/dist/publish-pages-content-D6g8GAsd.cjs +1 -0
  113. package/dist/register-partial-type-BjtdfKHE.js +36 -0
  114. package/dist/register-partial-type-ig9fUWIJ.cjs +1 -0
  115. package/dist/render.cjs +2 -2
  116. package/dist/render.d.ts +12 -9
  117. package/dist/render.js +97 -99
  118. package/dist/rte-widget-modal-DrMzWWjw.cjs +1 -0
  119. package/dist/rte-widget-modal-Rk_NW3KU.js +38 -0
  120. package/dist/runtime.cjs +1 -1
  121. package/dist/runtime.d.ts +306 -7
  122. package/dist/runtime.js +44 -1
  123. package/dist/save-to-lib-BK3uTFss.js +422 -0
  124. package/dist/save-to-lib-DHHUO12i.cjs +1 -0
  125. package/dist/sdk.css +1 -1
  126. package/dist/selected-block-display-CU3TwIMA.js +319 -0
  127. package/dist/selected-block-display-DSFhddPj.cjs +16 -0
  128. package/dist/seo-panel-Dl0IDV09.cjs +2 -0
  129. package/dist/seo-panel-jbzxFioc.js +798 -0
  130. package/dist/shared-json-ld-BL_dv3_q.js +565 -0
  131. package/dist/shared-json-ld-DPNkqDC1.cjs +1 -0
  132. package/dist/slug-input-1qwKkXhA.js +86 -0
  133. package/dist/slug-input-YVLjtTI3.cjs +1 -0
  134. package/dist/supabase-actions.cjs +1 -0
  135. package/dist/supabase-actions.d.ts +284 -0
  136. package/dist/supabase-actions.js +524 -0
  137. package/dist/take-over-request-DKvKi3mM.js +63 -0
  138. package/dist/take-over-request-DvMIg_cZ.cjs +1 -0
  139. package/dist/theme-panel-footer-BMOaPLWc.cjs +1 -0
  140. package/dist/theme-panel-footer-DbMDLYGI.js +25 -0
  141. package/dist/translation-warning-modal-9wTwIy_9.js +26 -0
  142. package/dist/translation-warning-modal-DjTwz75c.cjs +1 -0
  143. package/dist/unmark-as-template-CdqIJJER.cjs +1 -0
  144. package/dist/unmark-as-template-Dulvf7Zw.js +39 -0
  145. package/dist/unpublish-page-BwSVBf0_.cjs +1 -0
  146. package/dist/unpublish-page-Degu5Cy9.js +27 -0
  147. package/dist/use-page-expand-manager-B6XTvk0E.cjs +1 -0
  148. package/dist/use-page-expand-manager-Cf4MUEJw.js +85 -0
  149. package/dist/utils.cjs +1 -0
  150. package/dist/{tailwind.d.ts → utils.d.ts} +4 -7
  151. package/dist/utils.js +7 -0
  152. package/dist/web-blocks.cjs +1 -1
  153. package/dist/web-blocks.d.ts +0 -6
  154. package/dist/web-blocks.js +48 -47
  155. package/dist/web-preview-DXE4Jnf5.js +73 -0
  156. package/dist/web-preview-YzKxyXft.cjs +1 -0
  157. package/package.json +159 -89
  158. package/dist/IconPicker-6JSublJp.js +0 -64
  159. package/dist/IconPicker-DpQQDK_Q.cjs +0 -1
  160. package/dist/apply-binding-Bn1KC8uC.cjs +0 -1
  161. package/dist/code-display-Dw1tAwiJ.cjs +0 -1
  162. package/dist/code-editor-cnBzYLxk.cjs +0 -1
  163. package/dist/code-editor-vpbOSO05.js +0 -59
  164. package/dist/css-import-modal-bGWZSlqv.cjs +0 -13
  165. package/dist/delete-design-token-Bzxspf8D.cjs +0 -1
  166. package/dist/design-token-usage-BDArZ38H.js +0 -120
  167. package/dist/design-token-usage-CCv4XltM.cjs +0 -1
  168. package/dist/get-chai-builder-theme-B1tr_NJB.cjs +0 -1
  169. package/dist/get-chai-builder-theme-BarMkcGH.js +0 -12
  170. package/dist/index-CuANr9iH.cjs +0 -160
  171. package/dist/index-DvdOXKUE.js +0 -18338
  172. package/dist/manage-design-tokens-DpC46NAy.cjs +0 -1
  173. package/dist/mockServiceWorker.js +0 -349
  174. package/dist/plugin-CSgw-f78.cjs +0 -22
  175. package/dist/rte-widget-modal-CXbmmhcb.js +0 -41
  176. package/dist/rte-widget-modal-DDjf0xui.cjs +0 -1
  177. package/dist/tailwind.cjs +0 -1
  178. package/dist/tailwind.js +0 -8
  179. package/dist/tooltip-Ba1-8jmj.cjs +0 -1
  180. package/dist/tooltip-DUosa-uC.js +0 -1067
  181. package/dist/ui.cjs +0 -1
  182. package/dist/ui.d.ts +0 -415
  183. package/dist/ui.js +0 -129
  184. package/dist/vite.svg +0 -1
@@ -1 +0,0 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),N=require("./index-CuANr9iH.cjs"),Z=require("./apply-binding-Bn1KC8uC.cjs"),i=require("./tooltip-Ba1-8jmj.cjs"),u=require("@radix-ui/react-icons"),$=require("jotai"),U=require("nanoid"),a=require("react"),Q=require("react-i18next"),p=require("sonner"),_=require("tailwind-merge"),B=t=>{const n=t.trim();return n.length===0||n.length>25?!1:/^[a-zA-Z0-9]+(-[a-zA-Z0-9]+)*$/.test(n)},H=(t,n,o,m=!1,l)=>{const x=t.trim();return x.length===0?"":x.length>25?o("Token name must be 25 characters or less"):/^[a-zA-Z0-9]+(-[a-zA-Z0-9]+)*$/.test(x)?Object.entries(n).find(([c,j])=>j.name===x&&(!m||c!==l))?o("Token name already exists"):"":o("Only alphanumeric characters and hyphens allowed")},K=t=>t.replace(/\s+/g,"-"),X=a.lazy(()=>Promise.resolve().then(()=>require("./delete-design-token-Bzxspf8D.cjs"))),J=a.lazy(()=>Promise.resolve().then(()=>require("./design-token-usage-CCv4XltM.cjs"))),Y=({tokenId:t,token:n,isDisabled:o,onEdit:m,onDelete:l})=>e.jsxs("div",{className:"group relative flex items-center justify-between overflow-hidden rounded border p-2 transition-all duration-150 hover:bg-muted/90",children:[e.jsxs("div",{className:"min-w-0 flex-1 overflow-hidden",children:[e.jsx("div",{className:"text-xs font-semibold",children:n.name}),e.jsx("div",{className:"w-full max-w-52 truncate text-[10px] font-light",children:n.value})]}),e.jsxs("div",{className:"absolute right-1 top-1 flex flex-shrink-0 items-center opacity-0 transition-opacity duration-150 group-hover:opacity-100",children:[e.jsx(a.Suspense,{fallback:null,children:e.jsx(J,{tokenId:t,tokenName:n.name,children:e.jsx(i.Button,{variant:"ghost",size:"sm",className:"h-6 w-6 rounded-full p-0 hover:bg-primary/10 hover:text-primary",children:e.jsx(u.EyeOpenIcon,{className:"h-3 w-3"})})})}),e.jsx(i.Button,{variant:"ghost",size:"sm",onClick:()=>m(t),disabled:o,className:"h-6 w-6 rounded-full p-0 hover:bg-primary/10 hover:text-primary",children:e.jsx(u.Pencil1Icon,{className:"h-3 w-3"})}),e.jsx(a.Suspense,{fallback:null,children:e.jsx(X,{tokenName:n.name,tokenValue:n.value,onDelete:()=>l(t),children:e.jsx(i.Button,{variant:"ghost",size:"sm",disabled:o,className:"h-6 w-6 rounded-full p-0 hover:bg-destructive/10",children:e.jsx(u.TrashIcon,{className:"h-3 w-3 text-destructive"})})})})]})]}),ee=({})=>{const{t}=Q.useTranslation(),[n,o]=$.useAtom(N.chaiDesignTokensAtom),m=N.useIncrementActionsCount(),[l,x]=a.useState("view"),[v,k]=a.useState(null),[c,j]=a.useState(""),[h,b]=a.useState(""),[T,y]=a.useState(""),[w,E]=a.useState(""),[z,C]=a.useState(!1),f=a.useRef(null),I=a.useMemo(()=>Object.entries(n).filter(([,s])=>s.name.toLowerCase().includes(w.toLowerCase())||s.value.toLowerCase().includes(w.toLowerCase())),[n,w]);a.useEffect(()=>()=>{f.current&&clearTimeout(f.current)},[]);const S=a.useCallback((s,r)=>{!v||l!=="edit"||!s.trim()||!r.trim()||!B(s)||Object.entries(n).find(([g,W])=>W.name===s.trim()&&g!==v)||(C(!0),f.current&&clearTimeout(f.current),f.current=setTimeout(()=>{const g={...n,[v]:{name:s.trim(),value:r.trim()}};o(g),m(),C(!1)},250))},[v,l,n,o,m]),M=()=>{if(!c.trim()||!h.trim()){p.toast.error(t("Please fill in both token name and classes"));return}if(!B(c)){p.toast.error(t("Invalid design token name format"));return}if(Object.values(n).find(g=>g.name===c.trim())){p.toast.error(t("Token already exists"));return}const r=`${Z.DESIGN_TOKEN_PREFIX}${U.nanoid(12)}`,d={...n,[r]:{name:c.trim(),value:h.trim()}};o(d),m(),p.toast.success(t("Token added successfully")),A()},P=s=>{const r={...n};delete r[s],o(r),m(),p.toast.success(t("Token deleted successfully"))},R=s=>{const r=n[s];r&&(k(s),j(r.name),b(r.value),y(""),x("edit"))},D=()=>{k(null),j(""),b(""),y(""),x("add")},A=()=>{f.current&&clearTimeout(f.current),k(null),j(""),b(""),y(""),C(!1),x("view")},O=s=>{const r=K(s);j(r);const d=H(r,n,t,l==="edit",v||void 0);y(d),l==="edit"&&!d&&S(r,h)},q=s=>{b(s),l==="edit"&&!T&&c.trim()&&S(c,s)},L=s=>{const r=N.orderClassesByBreakpoint(N.removeDuplicateClasses(_.twMerge(h,s)));q(r)},F=s=>{const r=h.split(" ").filter(d=>d!==s).join(" ");q(r)},G=()=>{const s=l==="edit",r=t(s?"Edit Design Token":"Add Design Token"),d=t(s?"Update design token. Auto-saved.":"Create a reusable design token");return e.jsxs("div",{className:"flex h-full flex-col",children:[e.jsxs("div",{className:"mb-3 flex items-center gap-2 rounded-md border border-border/50 bg-muted p-1.5",children:[e.jsx(i.Button,{variant:"ghost",size:"sm",onClick:A,className:"h-6 w-6 rounded-full p-0 hover:bg-muted",children:e.jsx(u.ArrowLeftIcon,{className:"h-3 w-3"})}),e.jsxs("div",{className:"flex-1",children:[e.jsx("h3",{className:"text-xs font-semibold text-foreground",children:r}),e.jsx("p",{className:"text-[10px] text-muted-foreground",children:d})]}),s&&z&&e.jsx("div",{className:"flex items-center gap-1 text-[10px] text-muted-foreground",children:e.jsx("div",{className:"h-1.5 w-1.5 animate-pulse rounded-full bg-primary"})})]}),e.jsxs("div",{className:"flex-1 space-y-3 overflow-y-auto",children:[e.jsxs("div",{className:"space-y-1.5",children:[e.jsx(i.Label,{htmlFor:"token-name",className:"text-xs font-medium",children:t("Token Name")}),e.jsx(i.Input,{id:"token-name",placeholder:"Button-Primary",value:c,onChange:g=>O(g.target.value),className:"h-7 text-xs"}),T?e.jsx("span",{className:"text-[10px] text-destructive",children:T}):e.jsx("span",{className:"text-[10px] font-light text-muted-foreground",children:t("Button-Primary, Card-Header, Text-Large etc.")})]}),e.jsx(N.ManualClasses,{from:"designToken",classFromProps:h,onAddNew:L,onRemove:F}),!s&&e.jsxs("div",{className:"mt-3 flex items-center justify-end gap-2 pt-3",children:[e.jsx(i.Button,{variant:"outline",onClick:A,className:"h-7 text-xs",children:t("Cancel")}),e.jsx(i.Button,{onClick:M,disabled:!c.trim()||!h.trim()||!!T,className:"h-7 text-xs",children:t("Add Token")})]})]})]})},V=()=>e.jsxs(e.Fragment,{children:[Object.entries(n).length>0&&e.jsxs("div",{className:"flex items-center justify-between gap-x-2",children:[e.jsxs("div",{className:"relative flex-1",children:[e.jsx(u.MagnifyingGlassIcon,{className:"absolute left-2 top-1/2 h-3 w-3 -translate-y-1/2 text-muted-foreground"}),e.jsx(i.Input,{placeholder:t("Search tokens"),value:w,onChange:s=>E(s.target.value),className:"h-6 pl-7 text-xs"})]}),e.jsxs(i.Button,{variant:"outline",onClick:D,size:"sm",className:"h-6 border-primary text-xs text-primary hover:bg-primary/10 hover:text-primary",children:[e.jsx(u.PlusIcon,{className:"h-3 w-3"}),t("Add")]})]}),e.jsx("div",{className:"no-scrollbar flex flex-1 flex-col overflow-hidden pt-2",children:e.jsx(i.ScrollArea,{className:"h-full flex-1",children:e.jsxs("div",{className:"space-y-1",children:[Object.entries(n).length===0?e.jsxs("div",{className:"flex flex-col items-center justify-center rounded-lg border border-dashed border-muted bg-muted/20 py-8",children:[e.jsx("div",{className:"mb-2 text-3xl",children:e.jsx(u.TokensIcon,{className:"h-12 w-12 text-muted-foreground"})}),e.jsx("p",{className:"mb-1 text-sm font-medium text-foreground",children:t("No design tokens yet")}),e.jsx("p",{className:"text-center text-xs text-muted-foreground",children:t("Create reusable design tokens to streamline your styling")}),e.jsxs(i.Button,{variant:"default",onClick:D,size:"sm",className:"mt-4 h-7 text-xs leading-tight",children:[e.jsx(u.PlusIcon,{className:"mr-1 h-3 w-3"}),t("Add first design token")]})]}):I.length===0?e.jsxs("div",{className:"flex flex-col items-center justify-center rounded-lg border border-dashed border-muted bg-muted/20 py-8",children:[e.jsx("div",{className:"mb-2",children:e.jsx(u.MagnifyingGlassIcon,{className:"h-10 w-10 text-muted-foreground"})}),e.jsx("p",{className:"mb-1 text-sm font-medium text-foreground",children:t("No tokens found")}),e.jsx("p",{className:"text-center text-xs text-muted-foreground",children:t("No design tokens match your search")})]}):I.map(([s,r])=>e.jsx(Y,{token:r,tokenId:s,onEdit:R,onDelete:P,isDisabled:!1},s)),e.jsx("div",{className:"h-44"})]})})})]});return e.jsx("div",{className:"flex h-full w-full flex-col",children:l==="view"?V():G()})};exports.default=ee;
@@ -1,349 +0,0 @@
1
- /* eslint-disable */
2
- /* tslint:disable */
3
-
4
- /**
5
- * Mock Service Worker.
6
- * @see https://github.com/mswjs/msw
7
- * - Please do NOT modify this file.
8
- */
9
-
10
- const PACKAGE_VERSION = '2.12.4'
11
- const INTEGRITY_CHECKSUM = '4db4a41e972cec1b64cc569c66952d82'
12
- const IS_MOCKED_RESPONSE = Symbol('isMockedResponse')
13
- const activeClientIds = new Set()
14
-
15
- addEventListener('install', function () {
16
- self.skipWaiting()
17
- })
18
-
19
- addEventListener('activate', function (event) {
20
- event.waitUntil(self.clients.claim())
21
- })
22
-
23
- addEventListener('message', async function (event) {
24
- const clientId = Reflect.get(event.source || {}, 'id')
25
-
26
- if (!clientId || !self.clients) {
27
- return
28
- }
29
-
30
- const client = await self.clients.get(clientId)
31
-
32
- if (!client) {
33
- return
34
- }
35
-
36
- const allClients = await self.clients.matchAll({
37
- type: 'window',
38
- })
39
-
40
- switch (event.data) {
41
- case 'KEEPALIVE_REQUEST': {
42
- sendToClient(client, {
43
- type: 'KEEPALIVE_RESPONSE',
44
- })
45
- break
46
- }
47
-
48
- case 'INTEGRITY_CHECK_REQUEST': {
49
- sendToClient(client, {
50
- type: 'INTEGRITY_CHECK_RESPONSE',
51
- payload: {
52
- packageVersion: PACKAGE_VERSION,
53
- checksum: INTEGRITY_CHECKSUM,
54
- },
55
- })
56
- break
57
- }
58
-
59
- case 'MOCK_ACTIVATE': {
60
- activeClientIds.add(clientId)
61
-
62
- sendToClient(client, {
63
- type: 'MOCKING_ENABLED',
64
- payload: {
65
- client: {
66
- id: client.id,
67
- frameType: client.frameType,
68
- },
69
- },
70
- })
71
- break
72
- }
73
-
74
- case 'CLIENT_CLOSED': {
75
- activeClientIds.delete(clientId)
76
-
77
- const remainingClients = allClients.filter((client) => {
78
- return client.id !== clientId
79
- })
80
-
81
- // Unregister itself when there are no more clients
82
- if (remainingClients.length === 0) {
83
- self.registration.unregister()
84
- }
85
-
86
- break
87
- }
88
- }
89
- })
90
-
91
- addEventListener('fetch', function (event) {
92
- const requestInterceptedAt = Date.now()
93
-
94
- // Bypass navigation requests.
95
- if (event.request.mode === 'navigate') {
96
- return
97
- }
98
-
99
- // Opening the DevTools triggers the "only-if-cached" request
100
- // that cannot be handled by the worker. Bypass such requests.
101
- if (
102
- event.request.cache === 'only-if-cached' &&
103
- event.request.mode !== 'same-origin'
104
- ) {
105
- return
106
- }
107
-
108
- // Bypass all requests when there are no active clients.
109
- // Prevents the self-unregistered worked from handling requests
110
- // after it's been terminated (still remains active until the next reload).
111
- if (activeClientIds.size === 0) {
112
- return
113
- }
114
-
115
- const requestId = crypto.randomUUID()
116
- event.respondWith(handleRequest(event, requestId, requestInterceptedAt))
117
- })
118
-
119
- /**
120
- * @param {FetchEvent} event
121
- * @param {string} requestId
122
- * @param {number} requestInterceptedAt
123
- */
124
- async function handleRequest(event, requestId, requestInterceptedAt) {
125
- const client = await resolveMainClient(event)
126
- const requestCloneForEvents = event.request.clone()
127
- const response = await getResponse(
128
- event,
129
- client,
130
- requestId,
131
- requestInterceptedAt,
132
- )
133
-
134
- // Send back the response clone for the "response:*" life-cycle events.
135
- // Ensure MSW is active and ready to handle the message, otherwise
136
- // this message will pend indefinitely.
137
- if (client && activeClientIds.has(client.id)) {
138
- const serializedRequest = await serializeRequest(requestCloneForEvents)
139
-
140
- // Clone the response so both the client and the library could consume it.
141
- const responseClone = response.clone()
142
-
143
- sendToClient(
144
- client,
145
- {
146
- type: 'RESPONSE',
147
- payload: {
148
- isMockedResponse: IS_MOCKED_RESPONSE in response,
149
- request: {
150
- id: requestId,
151
- ...serializedRequest,
152
- },
153
- response: {
154
- type: responseClone.type,
155
- status: responseClone.status,
156
- statusText: responseClone.statusText,
157
- headers: Object.fromEntries(responseClone.headers.entries()),
158
- body: responseClone.body,
159
- },
160
- },
161
- },
162
- responseClone.body ? [serializedRequest.body, responseClone.body] : [],
163
- )
164
- }
165
-
166
- return response
167
- }
168
-
169
- /**
170
- * Resolve the main client for the given event.
171
- * Client that issues a request doesn't necessarily equal the client
172
- * that registered the worker. It's with the latter the worker should
173
- * communicate with during the response resolving phase.
174
- * @param {FetchEvent} event
175
- * @returns {Promise<Client | undefined>}
176
- */
177
- async function resolveMainClient(event) {
178
- const client = await self.clients.get(event.clientId)
179
-
180
- if (activeClientIds.has(event.clientId)) {
181
- return client
182
- }
183
-
184
- if (client?.frameType === 'top-level') {
185
- return client
186
- }
187
-
188
- const allClients = await self.clients.matchAll({
189
- type: 'window',
190
- })
191
-
192
- return allClients
193
- .filter((client) => {
194
- // Get only those clients that are currently visible.
195
- return client.visibilityState === 'visible'
196
- })
197
- .find((client) => {
198
- // Find the client ID that's recorded in the
199
- // set of clients that have registered the worker.
200
- return activeClientIds.has(client.id)
201
- })
202
- }
203
-
204
- /**
205
- * @param {FetchEvent} event
206
- * @param {Client | undefined} client
207
- * @param {string} requestId
208
- * @param {number} requestInterceptedAt
209
- * @returns {Promise<Response>}
210
- */
211
- async function getResponse(event, client, requestId, requestInterceptedAt) {
212
- // Clone the request because it might've been already used
213
- // (i.e. its body has been read and sent to the client).
214
- const requestClone = event.request.clone()
215
-
216
- function passthrough() {
217
- // Cast the request headers to a new Headers instance
218
- // so the headers can be manipulated with.
219
- const headers = new Headers(requestClone.headers)
220
-
221
- // Remove the "accept" header value that marked this request as passthrough.
222
- // This prevents request alteration and also keeps it compliant with the
223
- // user-defined CORS policies.
224
- const acceptHeader = headers.get('accept')
225
- if (acceptHeader) {
226
- const values = acceptHeader.split(',').map((value) => value.trim())
227
- const filteredValues = values.filter(
228
- (value) => value !== 'msw/passthrough',
229
- )
230
-
231
- if (filteredValues.length > 0) {
232
- headers.set('accept', filteredValues.join(', '))
233
- } else {
234
- headers.delete('accept')
235
- }
236
- }
237
-
238
- return fetch(requestClone, { headers })
239
- }
240
-
241
- // Bypass mocking when the client is not active.
242
- if (!client) {
243
- return passthrough()
244
- }
245
-
246
- // Bypass initial page load requests (i.e. static assets).
247
- // The absence of the immediate/parent client in the map of the active clients
248
- // means that MSW hasn't dispatched the "MOCK_ACTIVATE" event yet
249
- // and is not ready to handle requests.
250
- if (!activeClientIds.has(client.id)) {
251
- return passthrough()
252
- }
253
-
254
- // Notify the client that a request has been intercepted.
255
- const serializedRequest = await serializeRequest(event.request)
256
- const clientMessage = await sendToClient(
257
- client,
258
- {
259
- type: 'REQUEST',
260
- payload: {
261
- id: requestId,
262
- interceptedAt: requestInterceptedAt,
263
- ...serializedRequest,
264
- },
265
- },
266
- [serializedRequest.body],
267
- )
268
-
269
- switch (clientMessage.type) {
270
- case 'MOCK_RESPONSE': {
271
- return respondWithMock(clientMessage.data)
272
- }
273
-
274
- case 'PASSTHROUGH': {
275
- return passthrough()
276
- }
277
- }
278
-
279
- return passthrough()
280
- }
281
-
282
- /**
283
- * @param {Client} client
284
- * @param {any} message
285
- * @param {Array<Transferable>} transferrables
286
- * @returns {Promise<any>}
287
- */
288
- function sendToClient(client, message, transferrables = []) {
289
- return new Promise((resolve, reject) => {
290
- const channel = new MessageChannel()
291
-
292
- channel.port1.onmessage = (event) => {
293
- if (event.data && event.data.error) {
294
- return reject(event.data.error)
295
- }
296
-
297
- resolve(event.data)
298
- }
299
-
300
- client.postMessage(message, [
301
- channel.port2,
302
- ...transferrables.filter(Boolean),
303
- ])
304
- })
305
- }
306
-
307
- /**
308
- * @param {Response} response
309
- * @returns {Response}
310
- */
311
- function respondWithMock(response) {
312
- // Setting response status code to 0 is a no-op.
313
- // However, when responding with a "Response.error()", the produced Response
314
- // instance will have status code set to 0. Since it's not possible to create
315
- // a Response instance with status code 0, handle that use-case separately.
316
- if (response.status === 0) {
317
- return Response.error()
318
- }
319
-
320
- const mockedResponse = new Response(response.body, response)
321
-
322
- Reflect.defineProperty(mockedResponse, IS_MOCKED_RESPONSE, {
323
- value: true,
324
- enumerable: true,
325
- })
326
-
327
- return mockedResponse
328
- }
329
-
330
- /**
331
- * @param {Request} request
332
- */
333
- async function serializeRequest(request) {
334
- return {
335
- url: request.url,
336
- mode: request.mode,
337
- method: request.method,
338
- headers: Object.fromEntries(request.headers.entries()),
339
- cache: request.cache,
340
- credentials: request.credentials,
341
- destination: request.destination,
342
- integrity: request.integrity,
343
- redirect: request.redirect,
344
- referrer: request.referrer,
345
- referrerPolicy: request.referrerPolicy,
346
- body: await request.arrayBuffer(),
347
- keepalive: request.keepalive,
348
- }
349
- }
@@ -1,22 +0,0 @@
1
- "use strict";const b=require("@chaibuilder/runtime"),a=require("lodash-es"),B={fontFamily:{"font-heading":"Inter","font-body":"Inter"},borderRadius:"10px",colors:[{group:"Body",items:{background:["#FFFFFF","#121212"],foreground:["#121212","#FFFFFF"]}},{group:"Primary",items:{primary:["#2563EB","#3B82F6"],"primary-foreground":["#FFFFFF","#FFFFFF"]}},{group:"Secondary",items:{secondary:["#F3F4F6","#374151"],"secondary-foreground":["#1F2937","#F9FAFB"]}},{group:"Border, Input & Ring",items:{border:["#E5E7EB","#374151"],input:["#E5E7EB","#374151"],ring:["#2563EB","#3B82F6"]}},{group:"Card",items:{card:["#FFFFFF","#1F2937"],"card-foreground":["#121212","#FFFFFF"]}},{group:"Popover",items:{popover:["#FFFFFF","#1F2937"],"popover-foreground":["#121212","#FFFFFF"]}},{group:"Muted",items:{muted:["#F3F4F6","#374151"],"muted-foreground":["#6B7280","#9CA3AF"]}},{group:"Accent",items:{accent:["#F3F4F6","#374151"],"accent-foreground":["#1F2937","#FFFFFF"]}},{group:"Destructive",items:{destructive:["#DC2626","#EF4444"],"destructive-foreground":["#FFFFFF","#FFFFFF"]}}]},v={fontFamily:{heading:"Inter",body:"Inter"},borderRadius:"6px",colors:{background:["#FFFFFF","#09090B"],foreground:["#09090B","#FFFFFF"],primary:["#2563EB","#3B82F6"],"primary-foreground":["#FFFFFF","#FFFFFF"],secondary:["#F4F4F5","#27272A"],"secondary-foreground":["#09090B","#FFFFFF"],muted:["#F4F4F5","#27272A"],"muted-foreground":["#71717A","#A1A1AA"],accent:["#F4F4F5","#27272A"],"accent-foreground":["#09090B","#FFFFFF"],destructive:["#EF4444","#7F1D1D"],"destructive-foreground":["#FFFFFF","#FFFFFF"],border:["#E4E4E7","#27272A"],input:["#E4E4E7","#27272A"],ring:["#2563EB","#3B82F6"],card:["#FFFFFF","#09090B"],"card-foreground":["#09090B","#FFFFFF"],popover:["#FFFFFF","#09090B"],"popover-foreground":["#09090B","#FFFFFF"]}},_=e=>({fontFamily:e.fontFamily?a.keys(e.fontFamily).reduce((r,n)=>({...r,[n.replace("font-","")]:`var(--${n})`}),{}):{},borderRadius:e.borderRadius?{lg:"var(--radius)",md:"calc(var(--radius) - 2px)",sm:"calc(var(--radius) - 4px)"}:{},colors:e.colors?a.flatten(e.colors.map(r=>Object.entries(r.items))).reduce((r,[n])=>({...r,[n]:`hsl(var(--${n}))`}),{}):{}});function m(e){const t=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(e);let r=parseInt(t[1],16),n=parseInt(t[2],16),F=parseInt(t[3],16);r/=255,n/=255,F/=255;const o=Math.max(r,n,F),u=Math.min(r,n,F);let i,d;const g=(o+u)/2;if(o==u)i=d=0;else{const l=o-u;switch(d=g>.5?l/(2-o-u):l/(o+u),o){case r:i=(n-F)/l+(n<F?6:0);break;case n:i=(F-r)/l+2;break;case F:i=(r-n)/l+4;break}i/=6}return`${Math.round(i*360)} ${Math.round(d*100)}% ${Math.round(g*100)}%`}const E=e=>{const r=b.getAllRegisteredFonts().find(n=>n.family===e);return`"${e}", ${a.get(r,"fallback","")}`},P=e=>`:root {
2
- ${e.fontFamily&&Object.entries(e.fontFamily).map(([t,r])=>`--font-${t}: ${E(r)};`).join(`
3
- `)}
4
- ${e.borderRadius&&`--radius: ${e.borderRadius};`}
5
- ${e.colors&&Object.entries(e.colors).map(([t,r])=>`--${t}: ${m(r[0])};`).join(`
6
- `)}
7
- }
8
- .dark {
9
- ${e.colors&&Object.entries(e.colors).map(([t,r])=>`--${t}: ${m(r[1])};`).join(`
10
- `)}
11
- }`,C=e=>!e||e.length===0?"":a.uniqBy(e,"family").map(t=>`<link rel="stylesheet" href="${t.url}" />`).join(`
12
- `),A=e=>!e||e.length===0?[]:a.uniqBy(e,"family").map(t=>t.url),j=e=>!e||e.length===0?"":a.uniqBy(e,"family").map(t=>`@import url("${t.url}");`).join(`
13
- `),k=e=>!e||e.length===0?"":a.uniqBy(e,"family").map(t=>t.src.map(r=>`@font-face {
14
- font-family: "${t.family}";
15
- src: url("${r.url}") format("${r.format}");
16
- font-display: swap;
17
- ${r.fontWeight?`font-weight: ${r.fontWeight};`:""}
18
- ${r.fontStyle?`font-style: ${r.fontStyle};`:""}
19
- ${r.fontStretch?`font-stretch: ${r.fontStretch};`:""}
20
- }`).join(`
21
- `)).join(`
22
- `);function q(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var s={},c={},p;function M(){return p||(p=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return r}});function t(n,F){return{handler:n,config:F}}t.withOptions=function(n,F=()=>({})){const o=function(u){return{__options:u,handler:n(u),config:F(u)}};return o.__isOptionsFunction=!0,o.__pluginFunction=n,o.__configFunction=F,o};const r=t}(c)),c}var y;function O(){return y||(y=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return n}});const t=r(M());function r(F){return F&&F.__esModule?F:{default:F}}const n=t.default}(s)),s}var f,h;function R(){if(h)return f;h=1;let e=O();return f=(e.__esModule?e:{default:e}).default,f}var I=R();const $=q(I),S=$(function({addBase:e,theme:t}){e({"h1,h2,h3,h4,h5,h6":{fontFamily:t("fontFamily.heading")},body:{fontFamily:t("fontFamily.body"),color:t("colors.foreground"),backgroundColor:t("colors.background")}})});exports.chaiBuilderPlugin=S;exports.defaultThemeOptions=B;exports.defaultThemeValues=v;exports.getChaiThemeCssVariables=P;exports.getChaiThemeOptions=_;exports.getThemeCustomFontFace=k;exports.getThemeFontsCSSImport=j;exports.getThemeFontsLinkMarkup=C;exports.getThemeFontsUrls=A;exports.plugin=$;
@@ -1,41 +0,0 @@
1
- import { jsx as e, jsxs as c } from "react/jsx-runtime";
2
- import { d as N, N as D } from "./index-DvdOXKUE.js";
3
- import { a1 as v, a3 as S, a6 as j, a9 as w, v as y } from "./tooltip-DUosa-uC.js";
4
- import "clsx";
5
- import "tailwind-merge";
6
- const b = ({
7
- isOpen: f,
8
- onClose: l,
9
- editor: t,
10
- rteElement: x
11
- }) => {
12
- const r = N(), p = (s) => {
13
- if (!t) return;
14
- const i = `{{${s}}}`;
15
- t.commands.focus();
16
- const { from: u, to: g } = t.state.selection;
17
- if (u !== g)
18
- t.chain().deleteSelection().insertContent(i).run();
19
- else {
20
- const { state: a } = t, n = a.selection.from, m = a.doc.textBetween(Math.max(0, n - 1), n), o = a.doc.textBetween(n, Math.min(n + 1, a.doc.content.size));
21
- let d = "";
22
- n > 0 && m !== " " && !/[.,!?;:]/.test(m) && (d = " ");
23
- let h = "";
24
- o && o !== " " && !/[.,!?;:]/.test(o) && (h = " "), t.chain().insertContent(d + i + h).run();
25
- }
26
- };
27
- return /* @__PURE__ */ e(v, { open: f, onOpenChange: (s) => !s && l(), children: /* @__PURE__ */ c(S, { className: "max-h-[90vh] overflow-y-auto sm:max-w-[800px]", children: [
28
- /* @__PURE__ */ e(j, { children: /* @__PURE__ */ c(w, { className: "flex items-center justify-between pr-8", children: [
29
- /* @__PURE__ */ e("span", { children: "Rich Text Editor" }),
30
- Object.keys(r).length > 0 && /* @__PURE__ */ c("div", { className: "flex items-center", children: [
31
- /* @__PURE__ */ e("span", { className: "mr-2 text-sm text-muted-foreground", children: "Add field:" }),
32
- /* @__PURE__ */ e("div", { className: "rte-path-selector", children: /* @__PURE__ */ e(D, { data: r, onSelect: p }) })
33
- ] })
34
- ] }) }),
35
- x,
36
- /* @__PURE__ */ e("div", { className: "mt-4 flex justify-end", children: /* @__PURE__ */ e(y, { onClick: l, children: "Done" }) })
37
- ] }) });
38
- };
39
- export {
40
- b as default
41
- };
@@ -1 +0,0 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),u=require("./index-CuANr9iH.cjs"),n=require("./tooltip-Ba1-8jmj.cjs");require("clsx");require("tailwind-merge");const S=({isOpen:m,onClose:l,editor:t,rteElement:f})=>{const r=u.usePageExternalData(),j=o=>{if(!t)return;const i=`{{${o}}}`;t.commands.focus();const{from:p,to:g}=t.state.selection;if(p!==g)t.chain().deleteSelection().insertContent(i).run();else{const{state:c}=t,s=c.selection.from,x=c.doc.textBetween(Math.max(0,s-1),s),a=c.doc.textBetween(s,Math.min(s+1,c.doc.content.size));let d="";s>0&&x!==" "&&!/[.,!?;:]/.test(x)&&(d=" ");let h="";a&&a!==" "&&!/[.,!?;:]/.test(a)&&(h=" "),t.chain().insertContent(d+i+h).run()}};return e.jsx(n.Dialog,{open:m,onOpenChange:o=>!o&&l(),children:e.jsxs(n.DialogContent,{className:"max-h-[90vh] overflow-y-auto sm:max-w-[800px]",children:[e.jsx(n.DialogHeader,{children:e.jsxs(n.DialogTitle,{className:"flex items-center justify-between pr-8",children:[e.jsx("span",{children:"Rich Text Editor"}),Object.keys(r).length>0&&e.jsxs("div",{className:"flex items-center",children:[e.jsx("span",{className:"mr-2 text-sm text-muted-foreground",children:"Add field:"}),e.jsx("div",{className:"rte-path-selector",children:e.jsx(u.NestedPathSelector,{data:r,onSelect:j})})]})]})}),f,e.jsx("div",{className:"mt-4 flex justify-end",children:e.jsx(n.Button,{onClick:l,children:"Done"})})]})})};exports.default=S;
package/dist/tailwind.cjs DELETED
@@ -1 +0,0 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("./plugin-CSgw-f78.cjs"),e=require("./get-chai-builder-tailwind-config-C6MHaUM0.cjs"),r=require("./get-chai-builder-theme-B1tr_NJB.cjs");exports.chaiBuilderPlugin=i.chaiBuilderPlugin;exports.getChaiBuilderTailwindConfig=e.getChaiBuilderTailwindConfig;exports.getChaiBuilderTheme=r.getChaiBuilderTheme;
package/dist/tailwind.js DELETED
@@ -1,8 +0,0 @@
1
- import { c as r } from "./plugin-BOcGV_IY.js";
2
- import { g as o } from "./get-chai-builder-tailwind-config-BqaIvg8p.js";
3
- import { g as l } from "./get-chai-builder-theme-BarMkcGH.js";
4
- export {
5
- r as chaiBuilderPlugin,
6
- o as getChaiBuilderTailwindConfig,
7
- l as getChaiBuilderTheme
8
- };
@@ -1 +0,0 @@
1
- "use strict";const o=require("react/jsx-runtime"),ft=require("@radix-ui/react-dropdown-menu"),f=require("@radix-ui/react-icons"),gt=require("react"),xt=require("@radix-ui/react-accordion"),N=require("class-variance-authority"),bt=require("@radix-ui/react-alert-dialog"),ht=require("@radix-ui/react-slot"),vt=require("@radix-ui/react-avatar"),g=require("cmdk"),yt=require("@radix-ui/react-dialog"),Nt=require("@radix-ui/react-context-menu"),wt=require("@radix-ui/react-hover-card"),Ct=require("@radix-ui/react-label"),jt=require("@radix-ui/react-popover"),St=require("@radix-ui/react-scroll-area"),Rt=require("@radix-ui/react-select"),Dt=require("@radix-ui/react-separator"),Tt=require("@radix-ui/react-slider"),kt=require("@radix-ui/react-switch"),It=require("@radix-ui/react-tabs"),_t=require("@radix-ui/react-toggle"),Mt=require("@radix-ui/react-tooltip"),At=require("clsx"),Pt=require("tailwind-merge");function p(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const a in e)if(a!=="default"){const n=Object.getOwnPropertyDescriptor(e,a);Object.defineProperty(t,a,n.get?n:{enumerable:!0,get:()=>e[a]})}}return t.default=e,Object.freeze(t)}const d=p(ft),s=p(gt),b=p(xt),u=p(bt),w=p(vt),i=p(yt),l=p(Nt),j=p(wt),z=p(Ct),v=p(jt),x=p(St),c=p(Rt),q=p(Dt),C=p(Tt),R=p(kt),h=p(It),L=p(_t),y=p(Mt);function r(...e){return Pt.twMerge(At.clsx(e))}const zt=d.Root,qt=d.Trigger,Lt=d.Group,Ht=d.Portal,Gt=d.Sub,Vt=d.RadioGroup,H=s.forwardRef(({className:e,inset:t,children:a,...n},m)=>o.jsxs(d.SubTrigger,{ref:m,className:r("flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent data-[state=open]:bg-accent [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",t&&"pl-8",e),...n,children:[a,o.jsx(f.ChevronRightIcon,{className:"ml-auto h-4 w-4"})]}));H.displayName=d.SubTrigger.displayName;const G=s.forwardRef(({className:e,...t},a)=>o.jsx(d.SubContent,{ref:a,className:r("z-50 min-w-[8rem] origin-[--radix-dropdown-menu-content-transform-origin] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...t}));G.displayName=d.SubContent.displayName;const V=s.forwardRef(({className:e,sideOffset:t=4,...a},n)=>o.jsx(d.Portal,{children:o.jsx(d.Content,{ref:n,sideOffset:t,className:r("z-50 max-h-[var(--radix-dropdown-menu-content-available-height)] min-w-[8rem] overflow-y-auto overflow-x-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md","origin-[--radix-dropdown-menu-content-transform-origin] data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...a})}));V.displayName=d.Content.displayName;const O=s.forwardRef(({className:e,inset:t,...a},n)=>o.jsx(d.Item,{ref:n,className:r("relative flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&>svg]:size-4 [&>svg]:shrink-0",t&&"pl-8",e),...a}));O.displayName=d.Item.displayName;const F=s.forwardRef(({className:e,children:t,checked:a,...n},m)=>o.jsxs(d.CheckboxItem,{ref:m,className:r("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),checked:a,...n,children:[o.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:o.jsx(d.ItemIndicator,{children:o.jsx(f.CheckIcon,{className:"h-4 w-4"})})}),t]}));F.displayName=d.CheckboxItem.displayName;const B=s.forwardRef(({className:e,children:t,...a},n)=>o.jsxs(d.RadioItem,{ref:n,className:r("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...a,children:[o.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:o.jsx(d.ItemIndicator,{children:o.jsx(f.CircleIcon,{className:"h-2 w-2 fill-current"})})}),t]}));B.displayName=d.RadioItem.displayName;const U=s.forwardRef(({className:e,inset:t,...a},n)=>o.jsx(d.Label,{ref:n,className:r("px-2 py-1.5 text-sm font-semibold",t&&"pl-8",e),...a}));U.displayName=d.Label.displayName;const E=s.forwardRef(({className:e,...t},a)=>o.jsx(d.Separator,{ref:a,className:r("-mx-1 my-1 h-px bg-muted",e),...t}));E.displayName=d.Separator.displayName;const J=({className:e,...t})=>o.jsx("span",{className:r("ml-auto text-xs tracking-widest opacity-60",e),...t});J.displayName="DropdownMenuShortcut";const Ot=b.Root,K=s.forwardRef(({className:e,...t},a)=>o.jsx(b.Item,{ref:a,className:r("border-b",e),...t}));K.displayName="AccordionItem";const Q=s.forwardRef(({className:e,children:t,...a},n)=>o.jsx(b.Header,{className:"flex",children:o.jsxs(b.Trigger,{ref:n,className:r("flex flex-1 items-center justify-between py-4 text-sm font-medium transition-all hover:underline text-left [&[data-state=open]>svg]:rotate-180",e),...a,children:[t,o.jsx(f.ChevronDownIcon,{className:"h-4 w-4 shrink-0 text-muted-foreground transition-transform duration-200"})]})}));Q.displayName=b.Trigger.displayName;const W=s.forwardRef(({className:e,children:t,...a},n)=>o.jsx(b.Content,{ref:n,className:"overflow-hidden text-sm data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down",...a,children:o.jsx("div",{className:r("pb-4 pt-0",e),children:t})}));W.displayName=b.Content.displayName;const Ft=N.cva("relative w-full rounded-lg border px-4 py-3 text-sm [&>svg+div]:translate-y-[-3px] [&>svg]:absolute [&>svg]:left-4 [&>svg]:top-4 [&>svg]:text-foreground [&>svg~*]:pl-7",{variants:{variant:{default:"bg-background text-foreground",destructive:"border-destructive/50 text-destructive dark:border-destructive [&>svg]:text-destructive"}},defaultVariants:{variant:"default"}}),X=s.forwardRef(({className:e,variant:t,...a},n)=>o.jsx("div",{ref:n,role:"alert",className:r(Ft({variant:t}),e),...a}));X.displayName="Alert";const Y=s.forwardRef(({className:e,...t},a)=>o.jsx("h5",{ref:a,className:r("mb-1 font-medium leading-none tracking-tight",e),...t}));Y.displayName="AlertTitle";const Z=s.forwardRef(({className:e,...t},a)=>o.jsx("div",{ref:a,className:r("text-sm [&_p]:leading-relaxed",e),...t}));Z.displayName="AlertDescription";const S=N.cva("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",{variants:{variant:{default:"bg-primary text-primary-foreground shadow hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground shadow-sm hover:bg-destructive/90",outline:"border border-input bg-background shadow-sm hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground shadow-sm hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-9 px-4 py-2",sm:"h-8 rounded-md px-3 text-xs",lg:"h-10 rounded-md px-8",icon:"h-9 w-9"}},defaultVariants:{variant:"default",size:"default"}}),$=s.forwardRef(({className:e,variant:t,size:a,asChild:n=!1,...m},pt)=>{const ut=n?ht.Slot:"button";return o.jsx(ut,{className:r(S({variant:t,size:a,className:e})),ref:pt,...m})});$.displayName="Button";const Bt=u.Root,Ut=u.Trigger,ee=u.Portal,D=s.forwardRef(({className:e,...t},a)=>o.jsx(u.Overlay,{className:r("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t,ref:a}));D.displayName=u.Overlay.displayName;const te=s.forwardRef(({className:e,...t},a)=>o.jsxs(ee,{children:[o.jsx(D,{}),o.jsx(u.Content,{ref:a,className:r("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",e),...t})]}));te.displayName=u.Content.displayName;const ae=({className:e,...t})=>o.jsx("div",{className:r("flex flex-col space-y-2 text-center sm:text-left",e),...t});ae.displayName="AlertDialogHeader";const oe=({className:e,...t})=>o.jsx("div",{className:r("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});oe.displayName="AlertDialogFooter";const re=s.forwardRef(({className:e,...t},a)=>o.jsx(u.Title,{ref:a,className:r("text-lg font-semibold",e),...t}));re.displayName=u.Title.displayName;const se=s.forwardRef(({className:e,...t},a)=>o.jsx(u.Description,{ref:a,className:r("text-sm text-muted-foreground",e),...t}));se.displayName=u.Description.displayName;const ne=s.forwardRef(({className:e,...t},a)=>o.jsx(u.Action,{ref:a,className:r(S(),e),...t}));ne.displayName=u.Action.displayName;const ie=s.forwardRef(({className:e,...t},a)=>o.jsx(u.Cancel,{ref:a,className:r(S({variant:"outline"}),"mt-2 sm:mt-0",e),...t}));ie.displayName=u.Cancel.displayName;const de=s.forwardRef(({className:e,...t},a)=>o.jsx(w.Root,{ref:a,className:r("relative flex h-10 w-10 shrink-0 overflow-hidden rounded-full",e),...t}));de.displayName=w.Root.displayName;const le=s.forwardRef(({className:e,...t},a)=>o.jsx(w.Image,{ref:a,className:r("aspect-square h-full w-full",e),...t}));le.displayName=w.Image.displayName;const ce=s.forwardRef(({className:e,...t},a)=>o.jsx(w.Fallback,{ref:a,className:r("flex h-full w-full items-center justify-center rounded-full bg-muted",e),...t}));ce.displayName=w.Fallback.displayName;const me=N.cva("inline-flex items-center rounded-md border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground shadow hover:bg-primary/80",secondary:"border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80",destructive:"border-transparent bg-destructive text-destructive-foreground shadow hover:bg-destructive/80",outline:"text-foreground"}},defaultVariants:{variant:"default"}});function Et({className:e,variant:t,...a}){return o.jsx("div",{className:r(me({variant:t}),e),...a})}const pe=s.forwardRef(({className:e,...t},a)=>o.jsx("div",{ref:a,className:r("rounded-xl border bg-card text-card-foreground shadow",e),...t}));pe.displayName="Card";const ue=s.forwardRef(({className:e,...t},a)=>o.jsx("div",{ref:a,className:r("flex flex-col space-y-1.5 p-6",e),...t}));ue.displayName="CardHeader";const fe=s.forwardRef(({className:e,...t},a)=>o.jsx("div",{ref:a,className:r("font-semibold leading-none tracking-tight",e),...t}));fe.displayName="CardTitle";const ge=s.forwardRef(({className:e,...t},a)=>o.jsx("div",{ref:a,className:r("text-sm text-muted-foreground",e),...t}));ge.displayName="CardDescription";const xe=s.forwardRef(({className:e,...t},a)=>o.jsx("div",{ref:a,className:r("p-6 pt-0",e),...t}));xe.displayName="CardContent";const be=s.forwardRef(({className:e,...t},a)=>o.jsx("div",{ref:a,className:r("flex items-center p-6 pt-0",e),...t}));be.displayName="CardFooter";const he=i.Root,Jt=i.Trigger,ve=i.Portal,Kt=i.Close,T=s.forwardRef(({className:e,...t},a)=>o.jsx(i.Overlay,{ref:a,className:r("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t}));T.displayName=i.Overlay.displayName;const k=s.forwardRef(({className:e,children:t,...a},n)=>o.jsxs(ve,{children:[o.jsx(T,{}),o.jsxs(i.Content,{ref:n,className:r("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",e),...a,children:[t,o.jsxs(i.Close,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground",children:[o.jsx(f.Cross1Icon,{className:"h-4 w-4"}),o.jsx("span",{className:"sr-only",children:"Close"})]})]})]}));k.displayName=i.Content.displayName;const ye=({className:e,...t})=>o.jsx("div",{className:r("flex flex-col space-y-1.5 text-center sm:text-left",e),...t});ye.displayName="DialogHeader";const Ne=({className:e,...t})=>o.jsx("div",{className:r("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});Ne.displayName="DialogFooter";const we=s.forwardRef(({className:e,...t},a)=>o.jsx(i.Title,{ref:a,className:r("text-lg font-semibold leading-none tracking-tight",e),...t}));we.displayName=i.Title.displayName;const Ce=s.forwardRef(({className:e,...t},a)=>o.jsx(i.Description,{ref:a,className:r("text-sm text-muted-foreground",e),...t}));Ce.displayName=i.Description.displayName;const I=s.forwardRef(({className:e,...t},a)=>o.jsx(g.Command,{ref:a,className:r("flex h-full w-full flex-col overflow-hidden rounded-md bg-popover text-popover-foreground",e),...t}));I.displayName=g.Command.displayName;const Qt=({children:e,...t})=>o.jsx(he,{...t,children:o.jsx(k,{className:"overflow-hidden p-0",children:o.jsx(I,{className:"[&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-group]]:px-2 [&_[cmdk-input-wrapper]_svg]:h-5 [&_[cmdk-input-wrapper]_svg]:w-5 [&_[cmdk-input]]:h-12 [&_[cmdk-item]]:px-2 [&_[cmdk-item]]:py-3 [&_[cmdk-item]_svg]:h-5 [&_[cmdk-item]_svg]:w-5",children:e})})}),je=s.forwardRef(({className:e,...t},a)=>o.jsxs("div",{className:"flex items-center border-b px-3","cmdk-input-wrapper":"",children:[o.jsx(f.MagnifyingGlassIcon,{className:"mr-2 h-4 w-4 shrink-0 opacity-50"}),o.jsx(g.Command.Input,{ref:a,className:r("flex h-10 w-full rounded-md bg-transparent py-3 text-sm outline-none placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50",e),...t})]}));je.displayName=g.Command.Input.displayName;const Se=s.forwardRef(({className:e,...t},a)=>o.jsx(g.Command.List,{ref:a,className:r("max-h-[300px] overflow-y-auto overflow-x-hidden",e),...t}));Se.displayName=g.Command.List.displayName;const Re=s.forwardRef((e,t)=>o.jsx(g.Command.Empty,{ref:t,className:"py-6 text-center text-sm",...e}));Re.displayName=g.Command.Empty.displayName;const De=s.forwardRef(({className:e,...t},a)=>o.jsx(g.Command.Group,{ref:a,className:r("overflow-hidden p-1 text-foreground [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground",e),...t}));De.displayName=g.Command.Group.displayName;const Te=s.forwardRef(({className:e,...t},a)=>o.jsx(g.Command.Separator,{ref:a,className:r("-mx-1 h-px bg-border",e),...t}));Te.displayName=g.Command.Separator.displayName;const ke=s.forwardRef(({className:e,...t},a)=>o.jsx(g.Command.Item,{ref:a,className:r("relative flex cursor-default gap-2 select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none data-[disabled=true]:pointer-events-none data-[selected=true]:bg-accent data-[selected=true]:text-accent-foreground data-[disabled=true]:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",e),...t}));ke.displayName=g.Command.Item.displayName;const Ie=({className:e,...t})=>o.jsx("span",{className:r("ml-auto text-xs tracking-widest text-muted-foreground",e),...t});Ie.displayName="CommandShortcut";const Wt=l.Root,Xt=l.Trigger,Yt=l.Group,Zt=l.Portal,$t=l.Sub,ea=l.RadioGroup,_e=s.forwardRef(({className:e,inset:t,children:a,...n},m)=>o.jsxs(l.SubTrigger,{ref:m,className:r("flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground",t&&"pl-8",e),...n,children:[a,o.jsx(f.ChevronRightIcon,{className:"ml-auto h-4 w-4"})]}));_e.displayName=l.SubTrigger.displayName;const Me=s.forwardRef(({className:e,...t},a)=>o.jsx(l.SubContent,{ref:a,className:r("z-50 min-w-[8rem] origin-[--radix-context-menu-content-transform-origin] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...t}));Me.displayName=l.SubContent.displayName;const Ae=s.forwardRef(({className:e,...t},a)=>o.jsx(l.Portal,{children:o.jsx(l.Content,{ref:a,className:r("z-50 max-h-[--radix-context-menu-content-available-height] min-w-[8rem] origin-[--radix-context-menu-content-transform-origin] overflow-y-auto overflow-x-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...t})}));Ae.displayName=l.Content.displayName;const Pe=s.forwardRef(({className:e,inset:t,...a},n)=>o.jsx(l.Item,{ref:n,className:r("relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",t&&"pl-8",e),...a}));Pe.displayName=l.Item.displayName;const ze=s.forwardRef(({className:e,children:t,checked:a,...n},m)=>o.jsxs(l.CheckboxItem,{ref:m,className:r("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),checked:a,...n,children:[o.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:o.jsx(l.ItemIndicator,{children:o.jsx(f.CheckIcon,{className:"h-4 w-4"})})}),t]}));ze.displayName=l.CheckboxItem.displayName;const qe=s.forwardRef(({className:e,children:t,...a},n)=>o.jsxs(l.RadioItem,{ref:n,className:r("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...a,children:[o.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:o.jsx(l.ItemIndicator,{children:o.jsx(f.CircleIcon,{className:"h-2 w-2 fill-current"})})}),t]}));qe.displayName=l.RadioItem.displayName;const Le=s.forwardRef(({className:e,inset:t,...a},n)=>o.jsx(l.Label,{ref:n,className:r("px-2 py-1.5 text-sm font-semibold text-foreground",t&&"pl-8",e),...a}));Le.displayName=l.Label.displayName;const He=s.forwardRef(({className:e,...t},a)=>o.jsx(l.Separator,{ref:a,className:r("-mx-1 my-1 h-px bg-border",e),...t}));He.displayName=l.Separator.displayName;const Ge=({className:e,...t})=>o.jsx("span",{className:r("ml-auto text-xs tracking-widest text-muted-foreground",e),...t});Ge.displayName="ContextMenuShortcut";const ta=j.Root,aa=j.Trigger,Ve=s.forwardRef(({className:e,align:t="center",sideOffset:a=4,...n},m)=>o.jsx(j.Content,{ref:m,align:t,sideOffset:a,className:r("z-50 w-64 origin-[--radix-hover-card-content-transform-origin] rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...n}));Ve.displayName=j.Content.displayName;const Oe=s.forwardRef(({className:e,type:t,...a},n)=>o.jsx("input",{type:t,className:r("flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-base shadow-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",e),ref:n,...a}));Oe.displayName="Input";const oa=N.cva("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),Fe=s.forwardRef(({className:e,...t},a)=>o.jsx(z.Root,{ref:a,className:r(oa(),e),...t}));Fe.displayName=z.Root.displayName;const ra=v.Root,sa=v.Trigger,na=v.Anchor,Be=s.forwardRef(({className:e,align:t="center",sideOffset:a=4,...n},m)=>o.jsx(v.Portal,{children:o.jsx(v.Content,{ref:m,align:t,sideOffset:a,className:r("z-50 w-72 origin-[--radix-popover-content-transform-origin] rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...n})}));Be.displayName=v.Content.displayName;const Ue=s.forwardRef(({className:e,children:t,...a},n)=>o.jsxs(x.Root,{ref:n,className:r("relative overflow-hidden",e),...a,children:[o.jsx(x.Viewport,{className:"h-full w-full rounded-[inherit]",children:t}),o.jsx(_,{}),o.jsx(x.Corner,{})]}));Ue.displayName=x.Root.displayName;const _=s.forwardRef(({className:e,orientation:t="vertical",...a},n)=>o.jsx(x.ScrollAreaScrollbar,{ref:n,orientation:t,className:r("flex touch-none select-none transition-colors",t==="vertical"&&"h-full w-2.5 border-l border-l-transparent p-[1px]",t==="horizontal"&&"h-2.5 flex-col border-t border-t-transparent p-[1px]",e),...a,children:o.jsx(x.ScrollAreaThumb,{className:"relative flex-1 rounded-full bg-border"})}));_.displayName=x.ScrollAreaScrollbar.displayName;const ia=c.Root,da=c.Group,la=c.Value,Ee=s.forwardRef(({className:e,children:t,...a},n)=>o.jsxs(c.Trigger,{ref:n,className:r("flex h-9 w-full items-center justify-between whitespace-nowrap rounded-md border border-input bg-transparent px-3 py-2 text-sm shadow-sm ring-offset-background focus:outline-none focus:ring-1 focus:ring-ring disabled:cursor-not-allowed disabled:opacity-50 data-[placeholder]:text-muted-foreground [&>span]:line-clamp-1",e),...a,children:[t,o.jsx(c.Icon,{asChild:!0,children:o.jsx(f.ChevronDownIcon,{className:"h-4 w-4 opacity-50"})})]}));Ee.displayName=c.Trigger.displayName;const M=s.forwardRef(({className:e,...t},a)=>o.jsx(c.ScrollUpButton,{ref:a,className:r("flex cursor-default items-center justify-center py-1",e),...t,children:o.jsx(f.ChevronUpIcon,{className:"h-4 w-4"})}));M.displayName=c.ScrollUpButton.displayName;const A=s.forwardRef(({className:e,...t},a)=>o.jsx(c.ScrollDownButton,{ref:a,className:r("flex cursor-default items-center justify-center py-1",e),...t,children:o.jsx(f.ChevronDownIcon,{className:"h-4 w-4"})}));A.displayName=c.ScrollDownButton.displayName;const Je=s.forwardRef(({className:e,children:t,position:a="popper",...n},m)=>o.jsx(c.Portal,{children:o.jsxs(c.Content,{ref:m,className:r("relative z-50 max-h-[--radix-select-content-available-height] min-w-[8rem] origin-[--radix-select-content-transform-origin] overflow-y-auto overflow-x-hidden rounded-md border bg-popover text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",a==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",e),position:a,...n,children:[o.jsx(M,{}),o.jsx(c.Viewport,{className:r("p-1",a==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:t}),o.jsx(A,{})]})}));Je.displayName=c.Content.displayName;const Ke=s.forwardRef(({className:e,...t},a)=>o.jsx(c.Label,{ref:a,className:r("px-2 py-1.5 text-sm font-semibold",e),...t}));Ke.displayName=c.Label.displayName;const Qe=s.forwardRef(({className:e,children:t,...a},n)=>o.jsxs(c.Item,{ref:n,className:r("relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-2 pr-8 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...a,children:[o.jsx("span",{className:"absolute right-2 flex h-3.5 w-3.5 items-center justify-center",children:o.jsx(c.ItemIndicator,{children:o.jsx(f.CheckIcon,{className:"h-4 w-4"})})}),o.jsx(c.ItemText,{children:t})]}));Qe.displayName=c.Item.displayName;const We=s.forwardRef(({className:e,...t},a)=>o.jsx(c.Separator,{ref:a,className:r("-mx-1 my-1 h-px bg-muted",e),...t}));We.displayName=c.Separator.displayName;const Xe=s.forwardRef(({className:e,orientation:t="horizontal",decorative:a=!0,...n},m)=>o.jsx(q.Root,{ref:m,decorative:a,orientation:t,className:r("shrink-0 bg-border",t==="horizontal"?"h-[1px] w-full":"h-full w-[1px]",e),...n}));Xe.displayName=q.Root.displayName;const ca=i.Root,ma=i.Trigger,pa=i.Close,Ye=i.Portal,P=s.forwardRef(({className:e,...t},a)=>o.jsx(i.Overlay,{className:r("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t,ref:a}));P.displayName=i.Overlay.displayName;const ua=N.cva("fixed z-50 gap-4 bg-background p-6 shadow-lg transition ease-in-out data-[state=closed]:duration-300 data-[state=open]:duration-500 data-[state=open]:animate-in data-[state=closed]:animate-out",{variants:{side:{top:"inset-x-0 top-0 border-b data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top",bottom:"inset-x-0 bottom-0 border-t data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom",left:"inset-y-0 left-0 h-full w-3/4 border-r data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left sm:max-w-sm",right:"inset-y-0 right-0 h-full w-3/4 border-l data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right sm:max-w-sm"}},defaultVariants:{side:"right"}}),Ze=s.forwardRef(({side:e="right",className:t,children:a,...n},m)=>o.jsxs(Ye,{children:[o.jsx(P,{}),o.jsxs(i.Content,{ref:m,className:r(ua({side:e}),t),...n,children:[o.jsxs(i.Close,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-secondary",children:[o.jsx(f.Cross1Icon,{className:"h-4 w-4"}),o.jsx("span",{className:"sr-only",children:"Close"})]}),a]})]}));Ze.displayName=i.Content.displayName;const $e=({className:e,...t})=>o.jsx("div",{className:r("flex flex-col space-y-2 text-center sm:text-left",e),...t});$e.displayName="SheetHeader";const et=({className:e,...t})=>o.jsx("div",{className:r("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});et.displayName="SheetFooter";const tt=s.forwardRef(({className:e,...t},a)=>o.jsx(i.Title,{ref:a,className:r("text-lg font-semibold text-foreground",e),...t}));tt.displayName=i.Title.displayName;const at=s.forwardRef(({className:e,...t},a)=>o.jsx(i.Description,{ref:a,className:r("text-sm text-muted-foreground",e),...t}));at.displayName=i.Description.displayName;function fa({className:e,...t}){return o.jsx("div",{className:r("animate-pulse rounded-md bg-primary/10",e),...t})}const ot=s.forwardRef(({className:e,...t},a)=>o.jsxs(C.Root,{ref:a,className:r("relative flex w-full touch-none select-none items-center",e),...t,children:[o.jsx(C.Track,{className:"relative h-1.5 w-full grow overflow-hidden rounded-full bg-neutral-300",children:o.jsx(C.Range,{className:"absolute h-full bg-neutral-900"})}),o.jsx(C.Thumb,{className:"block h-4 w-4 rounded-full border border-neutral-900 bg-neutral-900 shadow transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-neutral-900 disabled:pointer-events-none disabled:opacity-50"})]}));ot.displayName=C.Root.displayName;const rt=s.forwardRef(({className:e,thumbClassName:t,...a},n)=>o.jsx(R.Root,{className:r("peer inline-flex h-5 w-9 shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent shadow-sm transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=unchecked]:bg-input",e),...a,ref:n,children:o.jsx(R.Thumb,{className:r("pointer-events-none block h-4 w-4 rounded-full bg-background shadow-lg ring-0 transition-transform",t,"data-[state=checked]:translate-x-3 data-[state=unchecked]:translate-x-0")})}));rt.displayName=R.Root.displayName;const ga=h.Root,st=s.forwardRef(({className:e,...t},a)=>o.jsx(h.List,{ref:a,className:r("inline-flex h-9 items-center justify-center rounded-lg bg-muted p-1 text-muted-foreground",e),...t}));st.displayName=h.List.displayName;const nt=s.forwardRef(({className:e,...t},a)=>o.jsx(h.Trigger,{ref:a,className:r("inline-flex items-center justify-center whitespace-nowrap rounded-md px-3 py-1 text-sm font-medium ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:bg-background data-[state=active]:text-foreground data-[state=active]:shadow",e),...t}));nt.displayName=h.Trigger.displayName;const it=s.forwardRef(({className:e,...t},a)=>o.jsx(h.Content,{ref:a,className:r("mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",e),...t}));it.displayName=h.Content.displayName;const dt=s.forwardRef(({className:e,...t},a)=>o.jsx("textarea",{className:r("flex min-h-[60px] w-full rounded-md border border-input bg-transparent px-3 py-2 text-base shadow-sm placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",e),ref:a,...t}));dt.displayName="Textarea";const lt=N.cva("inline-flex items-center justify-center gap-2 rounded-md text-sm font-medium transition-colors hover:bg-muted hover:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 data-[state=on]:bg-accent data-[state=on]:text-accent-foreground [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",{variants:{variant:{default:"bg-transparent",outline:"border border-input bg-transparent shadow-sm hover:bg-accent hover:text-accent-foreground"},size:{default:"h-9 px-2 min-w-9",sm:"h-8 px-1.5 min-w-8",lg:"h-10 px-2.5 min-w-10"}},defaultVariants:{variant:"default",size:"default"}}),ct=s.forwardRef(({className:e,variant:t,size:a,...n},m)=>o.jsx(L.Root,{ref:m,className:r(lt({variant:t,size:a,className:e})),...n}));ct.displayName=L.Root.displayName;const xa=y.Provider,ba=y.Root,ha=y.Trigger,mt=s.forwardRef(({className:e,sideOffset:t=4,...a},n)=>o.jsx(y.Portal,{children:o.jsx(y.Content,{ref:n,sideOffset:t,className:r("z-50 origin-[--radix-tooltip-content-transform-origin] overflow-hidden rounded-md bg-primary px-3 py-1.5 text-xs text-primary-foreground animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...a})}));mt.displayName=y.Content.displayName;exports.Accordion=Ot;exports.AccordionContent=W;exports.AccordionItem=K;exports.AccordionTrigger=Q;exports.Alert=X;exports.AlertDescription=Z;exports.AlertDialog=Bt;exports.AlertDialogAction=ne;exports.AlertDialogCancel=ie;exports.AlertDialogContent=te;exports.AlertDialogDescription=se;exports.AlertDialogFooter=oe;exports.AlertDialogHeader=ae;exports.AlertDialogOverlay=D;exports.AlertDialogPortal=ee;exports.AlertDialogTitle=re;exports.AlertDialogTrigger=Ut;exports.AlertTitle=Y;exports.Avatar=de;exports.AvatarFallback=ce;exports.AvatarImage=le;exports.Badge=Et;exports.Button=$;exports.Card=pe;exports.CardContent=xe;exports.CardDescription=ge;exports.CardFooter=be;exports.CardHeader=ue;exports.CardTitle=fe;exports.Command=I;exports.CommandDialog=Qt;exports.CommandEmpty=Re;exports.CommandGroup=De;exports.CommandInput=je;exports.CommandItem=ke;exports.CommandList=Se;exports.CommandSeparator=Te;exports.CommandShortcut=Ie;exports.ContextMenu=Wt;exports.ContextMenuCheckboxItem=ze;exports.ContextMenuContent=Ae;exports.ContextMenuGroup=Yt;exports.ContextMenuItem=Pe;exports.ContextMenuLabel=Le;exports.ContextMenuPortal=Zt;exports.ContextMenuRadioGroup=ea;exports.ContextMenuRadioItem=qe;exports.ContextMenuSeparator=He;exports.ContextMenuShortcut=Ge;exports.ContextMenuSub=$t;exports.ContextMenuSubContent=Me;exports.ContextMenuSubTrigger=_e;exports.ContextMenuTrigger=Xt;exports.Dialog=he;exports.DialogClose=Kt;exports.DialogContent=k;exports.DialogDescription=Ce;exports.DialogFooter=Ne;exports.DialogHeader=ye;exports.DialogOverlay=T;exports.DialogPortal=ve;exports.DialogTitle=we;exports.DialogTrigger=Jt;exports.DropdownMenu=zt;exports.DropdownMenuCheckboxItem=F;exports.DropdownMenuContent=V;exports.DropdownMenuGroup=Lt;exports.DropdownMenuItem=O;exports.DropdownMenuLabel=U;exports.DropdownMenuPortal=Ht;exports.DropdownMenuRadioGroup=Vt;exports.DropdownMenuRadioItem=B;exports.DropdownMenuSeparator=E;exports.DropdownMenuShortcut=J;exports.DropdownMenuSub=Gt;exports.DropdownMenuSubContent=G;exports.DropdownMenuSubTrigger=H;exports.DropdownMenuTrigger=qt;exports.HoverCard=ta;exports.HoverCardContent=Ve;exports.HoverCardTrigger=aa;exports.Input=Oe;exports.Label=Fe;exports.Popover=ra;exports.PopoverAnchor=na;exports.PopoverContent=Be;exports.PopoverTrigger=sa;exports.ScrollArea=Ue;exports.ScrollBar=_;exports.Select=ia;exports.SelectContent=Je;exports.SelectGroup=da;exports.SelectItem=Qe;exports.SelectLabel=Ke;exports.SelectScrollDownButton=A;exports.SelectScrollUpButton=M;exports.SelectSeparator=We;exports.SelectTrigger=Ee;exports.SelectValue=la;exports.Separator=Xe;exports.Sheet=ca;exports.SheetClose=pa;exports.SheetContent=Ze;exports.SheetDescription=at;exports.SheetFooter=et;exports.SheetHeader=$e;exports.SheetOverlay=P;exports.SheetPortal=Ye;exports.SheetTitle=tt;exports.SheetTrigger=ma;exports.Skeleton=fa;exports.Slider=ot;exports.Switch=rt;exports.Tabs=ga;exports.TabsContent=it;exports.TabsList=st;exports.TabsTrigger=nt;exports.Textarea=dt;exports.Toggle=ct;exports.Tooltip=ba;exports.TooltipContent=mt;exports.TooltipProvider=xa;exports.TooltipTrigger=ha;exports.badgeVariants=me;exports.buttonVariants=S;exports.cn=r;exports.toggleVariants=lt;