@optiaxiom/web-components 0.1.3 → 0.1.5

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 (223) hide show
  1. package/dist/AlertContext-BEJbcIn4.js +1 -0
  2. package/dist/AlertDialogContext-BsoJml9B.js +1 -0
  3. package/dist/{AnimatePresence-Qi6kCS1R.js → AnimatePresence-DnxHXvp4.js} +1 -1
  4. package/dist/AvatarContext--pK6yT3U.js +1 -0
  5. package/dist/Badge-CJesoYTh.js +1 -0
  6. package/dist/BannerContext-Dui86-Jj.js +1 -0
  7. package/dist/Box-CXEI75eL.js +1 -0
  8. package/dist/Button-2Jtb9RJj.js +1 -0
  9. package/dist/Code-Bkltkj5l.js +1 -0
  10. package/dist/DialogContext-D7LeQI8y.js +1 -0
  11. package/dist/DropdownMenuContext-C4E7VGBu.js +1 -0
  12. package/dist/DropdownMenuSubContext-RWV3TmD-.js +1 -0
  13. package/dist/FieldContext-DXy_uUJN.js +1 -0
  14. package/dist/{Flex-D3trAs54.js → Flex-r6nTGHy4.js} +1 -1
  15. package/dist/{Heading-DCKT4gdX.js → Heading-CcxyXCeR.js} +1 -1
  16. package/dist/{HoverCard-Dzy0pcoE.js → HoverCard-NrCEYh2I.js} +1 -1
  17. package/dist/HoverCardContent-BNLypzen.js +1 -0
  18. package/dist/{HoverCardContext-DF3iHtK2.js → HoverCardContext-B-9FRyvp.js} +1 -1
  19. package/dist/{HoverCardTrigger-gfgjXpQy.js → HoverCardTrigger-MEDDA-vy.js} +1 -1
  20. package/dist/Icon-GFxM-3i0.js +1 -0
  21. package/dist/IconAngleDown-C33so4Us.js +1 -0
  22. package/dist/IconAngleRight-CR45tD1T.js +1 -0
  23. package/dist/{IconTriangleExclamationFilled-BJud6LoZ.js → IconCircleInfoFilled-Cltmg4fE.js} +1 -1
  24. package/dist/{IconEllipsis-BBBG7hHq.js → IconEllipsis-B6JCuJ1t.js} +1 -1
  25. package/dist/IconTriangleExclamationFilled-C1xowDjK.js +1 -0
  26. package/dist/{IconX-Dqm5CLG6.js → IconX-B8mQd8im.js} +1 -1
  27. package/dist/Input-C5zo7Bn-.js +1 -0
  28. package/dist/InputBase-5qvq3ALr.js +1 -0
  29. package/dist/Link-DlsBeOb_.js +1 -0
  30. package/dist/ListboxBase-HJhZ9g4t.js +1 -0
  31. package/dist/MenuButton-6XgnGAOK.js +1 -0
  32. package/dist/PopoverContext--m99gM74.js +1 -0
  33. package/dist/RadioGroupContext-CFSSkRId.js +1 -0
  34. package/dist/Separator-vX8hIkAW.js +1 -0
  35. package/dist/SideNavContext-Dyswhb10.js +1 -0
  36. package/dist/SideNavItem-BHilqu_t.js +1 -0
  37. package/dist/{Spinner-DFLBvP_T.js → Spinner-DwB5ZlTc.js} +1 -1
  38. package/dist/TableRow.css.ts.vanilla-DkygPBaI-DsrScwc0.js +1 -0
  39. package/dist/TabsContext-DmxgYdAl.js +1 -0
  40. package/dist/Text-DCqPcxzA.js +1 -0
  41. package/dist/Toast-CfvJfn1q.js +1 -0
  42. package/dist/{ToastAction-BcmHbd40.js → ToastAction-DenLVwjW.js} +1 -1
  43. package/dist/ToastProvider-DAtvx6bl.js +1 -0
  44. package/dist/{ToastTitle-DnTJGrCY.js → ToastTitle-CdI0XaxO.js} +1 -1
  45. package/dist/ToggleInputLabel-DJfCP23K.js +1 -0
  46. package/dist/{Tooltip-C-JvH5Xz.js → Tooltip-DqE9iIJi.js} +1 -1
  47. package/dist/{TooltipContent-CeCOFoSd.js → TooltipContent-D3z3xcfG.js} +1 -1
  48. package/dist/TooltipContext-CoLtehwe.js +1 -0
  49. package/dist/{TooltipRoot-BPzoM1zW.js → TooltipRoot-D5g9lUD0.js} +1 -1
  50. package/dist/{TooltipTrigger-CxaWOV4V.js → TooltipTrigger-BrGhbs7s.js} +1 -1
  51. package/dist/Transition-CG0u_N0D.js +1 -0
  52. package/dist/components/Alert.js +1 -1
  53. package/dist/components/AlertDescription.js +1 -1
  54. package/dist/components/AlertDialog.js +1 -1
  55. package/dist/components/AlertDialogAction.js +1 -1
  56. package/dist/components/AlertDialogCancel.js +1 -1
  57. package/dist/components/AlertDialogContent.js +1 -1
  58. package/dist/components/AlertDialogDescription.js +1 -1
  59. package/dist/components/AlertDialogFooter.js +1 -1
  60. package/dist/components/AlertDialogTitle.js +1 -1
  61. package/dist/components/AlertDialogTrigger.js +1 -1
  62. package/dist/components/AlertTitle.js +1 -1
  63. package/dist/components/AnimatePresence.js +1 -1
  64. package/dist/components/Avatar.js +1 -1
  65. package/dist/components/AvatarGroup.js +1 -1
  66. package/dist/components/AxiomProvider.js +1 -1
  67. package/dist/components/Badge.js +1 -1
  68. package/dist/components/Banner.js +1 -1
  69. package/dist/components/BannerDescription.js +1 -1
  70. package/dist/components/BannerTitle.js +1 -1
  71. package/dist/components/Box.js +1 -1
  72. package/dist/components/Button.js +1 -1
  73. package/dist/components/ButtonGroup.js +1 -1
  74. package/dist/components/Checkbox.js +1 -1
  75. package/dist/components/Code.js +1 -1
  76. package/dist/components/Dialog.js +1 -1
  77. package/dist/components/DialogBody.js +1 -1
  78. package/dist/components/DialogClose.js +1 -1
  79. package/dist/components/DialogContent.js +1 -1
  80. package/dist/components/DialogDescription.js +1 -1
  81. package/dist/components/DialogFooter.js +1 -1
  82. package/dist/components/DialogTitle.js +1 -1
  83. package/dist/components/DialogTrigger.js +1 -1
  84. package/dist/components/Disclosure.js +1 -1
  85. package/dist/components/DisclosureContent.js +1 -1
  86. package/dist/components/DisclosureTrigger.js +1 -1
  87. package/dist/components/Drawer.js +1 -1
  88. package/dist/components/DrawerBody.js +1 -1
  89. package/dist/components/DrawerFooter.js +1 -1
  90. package/dist/components/DrawerTitle.js +1 -1
  91. package/dist/components/DropdownMenu.js +1 -1
  92. package/dist/components/DropdownMenuContent.js +1 -1
  93. package/dist/components/DropdownMenuGroup.js +1 -0
  94. package/dist/components/DropdownMenuItem.js +1 -1
  95. package/dist/components/DropdownMenuLabel.js +1 -1
  96. package/dist/components/DropdownMenuSeparator.js +1 -1
  97. package/dist/components/DropdownMenuSub.js +1 -1
  98. package/dist/components/DropdownMenuSubContent.js +1 -1
  99. package/dist/components/DropdownMenuTrigger.js +1 -1
  100. package/dist/components/Field.js +1 -1
  101. package/dist/components/Flex.js +1 -1
  102. package/dist/components/Grid.js +1 -1
  103. package/dist/components/Heading.js +1 -1
  104. package/dist/components/HoverCard.js +1 -1
  105. package/dist/components/HoverCardContent.js +1 -1
  106. package/dist/components/HoverCardTrigger.js +1 -1
  107. package/dist/components/Indicator.js +1 -1
  108. package/dist/components/Input.js +1 -1
  109. package/dist/components/Kbd.js +1 -1
  110. package/dist/components/Link.js +1 -1
  111. package/dist/components/MenuButton.js +1 -1
  112. package/dist/components/Pagination.js +1 -1
  113. package/dist/components/Popover.js +1 -1
  114. package/dist/components/PopoverAnchor.js +1 -1
  115. package/dist/components/PopoverContent.js +1 -1
  116. package/dist/components/PopoverTrigger.js +1 -1
  117. package/dist/components/Progress.js +1 -1
  118. package/dist/components/Radio.js +1 -1
  119. package/dist/components/RadioGroup.js +1 -1
  120. package/dist/components/SearchInput.js +1 -1
  121. package/dist/components/SegmentedControl.js +1 -1
  122. package/dist/components/SegmentedControlItem.js +1 -1
  123. package/dist/components/Separator.js +1 -1
  124. package/dist/components/SideNav.js +1 -1
  125. package/dist/components/SideNavAccountItem.js +1 -1
  126. package/dist/components/SideNavItem.js +1 -1
  127. package/dist/components/SideNavToggle.js +1 -1
  128. package/dist/components/Skeleton.js +1 -1
  129. package/dist/components/Spinner.js +1 -1
  130. package/dist/components/Switch.js +1 -1
  131. package/dist/components/Tabs.js +1 -1
  132. package/dist/components/TabsContent.js +1 -1
  133. package/dist/components/TabsList.js +1 -1
  134. package/dist/components/TabsTrigger.js +1 -1
  135. package/dist/components/Text.js +1 -1
  136. package/dist/components/Textarea.js +1 -1
  137. package/dist/components/ThemeProvider.js +1 -1
  138. package/dist/components/Toast.js +1 -1
  139. package/dist/components/ToastAction.js +1 -1
  140. package/dist/components/ToastProvider.js +1 -1
  141. package/dist/components/ToastTitle.js +1 -1
  142. package/dist/components/ToggleButton.js +1 -1
  143. package/dist/components/Tooltip.js +1 -1
  144. package/dist/components/TooltipContent.js +1 -1
  145. package/dist/components/TooltipRoot.js +1 -1
  146. package/dist/components/TooltipTrigger.js +1 -1
  147. package/dist/components/Transition.js +1 -1
  148. package/dist/{fallbackSpan-lZrd3x9z.js → fallbackSpan-B6gLYokc.js} +1 -1
  149. package/dist/{index-BJA4hCZ-.js → index-B01d_1tE.js} +1 -1
  150. package/dist/index-B0XzXBUp.js +1 -0
  151. package/dist/{index-BEtaakOV.js → index-BIypPxZf.js} +1 -1
  152. package/dist/index-BJc8rNYp.js +1 -0
  153. package/dist/{index-CmgtAzv5.js → index-BRahpty3.js} +1 -1
  154. package/dist/{index-wYPNGSjj.js → index-BScxBT_T.js} +1 -1
  155. package/dist/{index-Bkqv0nUy.js → index-BjhOjsck.js} +1 -1
  156. package/dist/{index-Ba8gPSTf.js → index-Bx1qhHnS.js} +1 -1
  157. package/dist/{index-H3J9f5nb.js → index-CFM4fgxE.js} +1 -1
  158. package/dist/{index-CjdYl0jf.js → index-CFZwxXrg.js} +1 -1
  159. package/dist/{index-Dw41znKI.js → index-CRJg9er0.js} +1 -1
  160. package/dist/{index-Dtq-yzv0.js → index-CjM__Gq4.js} +1 -1
  161. package/dist/{index-BChC9S1G.js → index-CkaatyBQ.js} +1 -1
  162. package/dist/{index-CSs6bBeu.js → index-Cm13NS06.js} +1 -1
  163. package/dist/{index-DPt6FkCx.js → index-CtGMni3E.js} +1 -1
  164. package/dist/{index-Dybw2s6v.js → index-D0IhL88-.js} +1 -1
  165. package/dist/{index-NbhHgWKT.js → index-DMAVUQds.js} +1 -1
  166. package/dist/index-DQRZUM8s.js +1 -0
  167. package/dist/{index-BOHqctlu.js → index-DWbDE88V.js} +1 -1
  168. package/dist/index-DvxuEr4t.js +41 -0
  169. package/dist/{index-tYk1eY47.js → index-ZE8l-rYC.js} +1 -1
  170. package/dist/{index-Bp8uU3Mc.js → index-eGz14xHt.js} +1 -1
  171. package/dist/{index-C1VYu6Pq.js → index-g5fgZDhH.js} +1 -1
  172. package/dist/index-lVvG34v2.js +1 -0
  173. package/dist/index-ppAVz1Uk.js +1 -0
  174. package/dist/index.js +1 -1
  175. package/dist/mapping-BFtSdEcj.js +1 -0
  176. package/dist/{reach-auto-id-DBRVAmW0.js → reach-auto-id-Ce2lSBMi.js} +1 -1
  177. package/dist/recipeRuntime-DKU3VUyN.js +1 -0
  178. package/dist/{register-Br_7Z6lg.js → register-4_mVToaL.js} +3 -3
  179. package/dist/{withIcon-DNuryrqG.js → withIcon-CfnanLle.js} +1 -1
  180. package/package.json +3 -2
  181. package/dist/AlertContext-Cv1wXip8.js +0 -1
  182. package/dist/AlertDialogContext-C_Nzhv89.js +0 -1
  183. package/dist/AvatarContext-h42ZJD04.js +0 -1
  184. package/dist/Badge-BjDp93bz.js +0 -1
  185. package/dist/BannerContext-DW4IB5CG.js +0 -1
  186. package/dist/Box-UM_e30U3.js +0 -1
  187. package/dist/Button-BNWcrFEe.js +0 -1
  188. package/dist/Code-BTuURtBO.js +0 -1
  189. package/dist/DialogContext-BB47w-A6.js +0 -1
  190. package/dist/DropdownMenuContext-BC2JWts9.js +0 -1
  191. package/dist/DropdownMenuSubContext-BJSxl1l5.js +0 -1
  192. package/dist/FieldContext-DfU42nCV.js +0 -1
  193. package/dist/HoverCardContent-C28lzwuS.js +0 -1
  194. package/dist/Icon-Dc-6oqlM.js +0 -1
  195. package/dist/IconAngleDown-DjmDQgs1.js +0 -1
  196. package/dist/IconAngleRight-D6jDQrwU.js +0 -1
  197. package/dist/IconTriangleExclamation-BUfkRBG1.js +0 -1
  198. package/dist/Input-B6MpfsbP.js +0 -1
  199. package/dist/InputBase-4weG5Ot2.js +0 -1
  200. package/dist/Link-vX57kLht.js +0 -1
  201. package/dist/MenuButton-EpD57nR8.js +0 -1
  202. package/dist/MenuContentBase-Cy12f_gM.js +0 -1
  203. package/dist/PopoverContext-Dbd0zay2.js +0 -1
  204. package/dist/RadioGroupContext-BCsFtRHm.js +0 -1
  205. package/dist/Separator-Ca6iL8im.js +0 -1
  206. package/dist/SideNavContext-DANohx-n.js +0 -1
  207. package/dist/SideNavItem-BrhbDod9.js +0 -1
  208. package/dist/TableRow.css.ts.vanilla-BMIhB2fq-DCJ85hHH.js +0 -1
  209. package/dist/TabsContext-CEvDzWfV.js +0 -1
  210. package/dist/Text-bK4y5HFb.js +0 -1
  211. package/dist/Toast-DonCR9n9.js +0 -1
  212. package/dist/ToastProvider-BferDoXG.js +0 -1
  213. package/dist/ToggleInputLabel-DSgiSf6r.js +0 -1
  214. package/dist/TooltipContext-B5HQKZ_R.js +0 -1
  215. package/dist/Transition-Dnu4DnBb.js +0 -1
  216. package/dist/index-1oKFsttO.js +0 -1
  217. package/dist/index-B9_2YXmS.js +0 -1
  218. package/dist/index-Bju2xmrM.js +0 -1
  219. package/dist/index-D6Y0-Ywh.js +0 -41
  220. package/dist/index-JwFJbFSA.js +0 -1
  221. package/dist/index-bYmpg7nk.js +0 -1
  222. package/dist/mapping-a1hAK8yD.js +0 -1
  223. package/dist/recipeRuntime-B7O8Q8Ja.js +0 -1
@@ -1 +1 @@
1
- import{h as Y,q as yt,A as J,g as Ae,T as lt,c as Pe,y as Wt,w as at,u as j}from"./register-Br_7Z6lg.js";import{P as vt}from"./index-BChC9S1G.js";import{u as zt}from"./index-CmgtAzv5.js";import{c as Oe}from"./index-C1VYu6Pq.js";import{u as Re}from"./index-BEtaakOV.js";import{u as bt}from"./index-JwFJbFSA.js";const Ce=["top","right","bottom","left"],U=Math.min,N=Math.max,ft=Math.round,ut=Math.floor,B=t=>({x:t,y:t}),Se={left:"right",right:"left",bottom:"top",top:"bottom"},Ee={start:"end",end:"start"};function At(t,e,n){return N(t,U(e,n))}function X(t,e){return typeof t=="function"?t(e):t}function q(t){return t.split("-")[0]}function Q(t){return t.split("-")[1]}function Pt(t){return t==="x"?"y":"x"}function Ot(t){return t==="y"?"height":"width"}function Z(t){return["top","bottom"].includes(q(t))?"y":"x"}function Rt(t){return Pt(Z(t))}function De(t,e,n){n===void 0&&(n=!1);const o=Q(t),i=Rt(t),r=Ot(i);let s=i==="x"?o===(n?"end":"start")?"right":"left":o==="start"?"bottom":"top";return e.reference[r]>e.floating[r]&&(s=dt(s)),[s,dt(s)]}function Te(t){const e=dt(t);return[Ct(t),e,Ct(e)]}function Ct(t){return t.replace(/start|end/g,e=>Ee[e])}function Le(t,e,n){const o=["left","right"],i=["right","left"],r=["top","bottom"],s=["bottom","top"];switch(t){case"top":case"bottom":return n?e?i:o:e?o:i;case"left":case"right":return e?r:s;default:return[]}}function Me(t,e,n,o){const i=Q(t);let r=Le(q(t),n==="start",o);return i&&(r=r.map(s=>s+"-"+i),e&&(r=r.concat(r.map(Ct)))),r}function dt(t){return t.replace(/left|right|bottom|top/g,e=>Se[e])}function $e(t){return{top:0,right:0,bottom:0,left:0,...t}}function _t(t){return typeof t!="number"?$e(t):{top:t,right:t,bottom:t,left:t}}function pt(t){const{x:e,y:n,width:o,height:i}=t;return{width:o,height:i,top:n,left:e,right:e+o,bottom:n+i,x:e,y:n}}function Bt(t,e,n){let{reference:o,floating:i}=t;const r=Z(e),s=Rt(e),c=Ot(s),l=q(e),a=r==="y",f=o.x+o.width/2-i.width/2,u=o.y+o.height/2-i.height/2,h=o[c]/2-i[c]/2;let d;switch(l){case"top":d={x:f,y:o.y-i.height};break;case"bottom":d={x:f,y:o.y+o.height};break;case"right":d={x:o.x+o.width,y:u};break;case"left":d={x:o.x-i.width,y:u};break;default:d={x:o.x,y:o.y}}switch(Q(e)){case"start":d[s]-=h*(n&&a?-1:1);break;case"end":d[s]+=h*(n&&a?-1:1);break}return d}const ke=async(t,e,n)=>{const{placement:o="bottom",strategy:i="absolute",middleware:r=[],platform:s}=n,c=r.filter(Boolean),l=await(s.isRTL==null?void 0:s.isRTL(e));let a=await s.getElementRects({reference:t,floating:e,strategy:i}),{x:f,y:u}=Bt(a,o,l),h=o,d={},p=0;for(let m=0;m<c.length;m++){const{name:w,fn:g}=c[m],{x,y:b,data:y,reset:v}=await g({x:f,y:u,initialPlacement:o,placement:h,strategy:i,middlewareData:d,rects:a,platform:s,elements:{reference:t,floating:e}});f=x??f,u=b??u,d={...d,[w]:{...d[w],...y}},v&&p<=50&&(p++,typeof v=="object"&&(v.placement&&(h=v.placement),v.rects&&(a=v.rects===!0?await s.getElementRects({reference:t,floating:e,strategy:i}):v.rects),{x:f,y:u}=Bt(a,h,l)),m=-1)}return{x:f,y:u,placement:h,strategy:i,middlewareData:d}};async function it(t,e){var n;e===void 0&&(e={});const{x:o,y:i,platform:r,rects:s,elements:c,strategy:l}=t,{boundary:a="clippingAncestors",rootBoundary:f="viewport",elementContext:u="floating",altBoundary:h=!1,padding:d=0}=X(e,t),p=_t(d),w=c[h?u==="floating"?"reference":"floating":u],g=pt(await r.getClippingRect({element:(n=await(r.isElement==null?void 0:r.isElement(w)))==null||n?w:w.contextElement||await(r.getDocumentElement==null?void 0:r.getDocumentElement(c.floating)),boundary:a,rootBoundary:f,strategy:l})),x=u==="floating"?{x:o,y:i,width:s.floating.width,height:s.floating.height}:s.reference,b=await(r.getOffsetParent==null?void 0:r.getOffsetParent(c.floating)),y=await(r.isElement==null?void 0:r.isElement(b))?await(r.getScale==null?void 0:r.getScale(b))||{x:1,y:1}:{x:1,y:1},v=pt(r.convertOffsetParentRelativeRectToViewportRelativeRect?await r.convertOffsetParentRelativeRectToViewportRelativeRect({elements:c,rect:x,offsetParent:b,strategy:l}):x);return{top:(g.top-v.top+p.top)/y.y,bottom:(v.bottom-g.bottom+p.bottom)/y.y,left:(g.left-v.left+p.left)/y.x,right:(v.right-g.right+p.right)/y.x}}const Ne=t=>({name:"arrow",options:t,async fn(e){const{x:n,y:o,placement:i,rects:r,platform:s,elements:c,middlewareData:l}=e,{element:a,padding:f=0}=X(t,e)||{};if(a==null)return{};const u=_t(f),h={x:n,y:o},d=Rt(i),p=Ot(d),m=await s.getDimensions(a),w=d==="y",g=w?"top":"left",x=w?"bottom":"right",b=w?"clientHeight":"clientWidth",y=r.reference[p]+r.reference[d]-h[d]-r.floating[p],v=h[d]-r.reference[d],P=await(s.getOffsetParent==null?void 0:s.getOffsetParent(a));let R=P?P[b]:0;(!R||!await(s.isElement==null?void 0:s.isElement(P)))&&(R=c.floating[b]||r.floating[p]);const D=y/2-v/2,k=R/2-m[p]/2-1,T=U(u[g],k),M=U(u[x],k),$=T,C=R-m[p]-M,O=R/2-m[p]/2+D,H=At($,O,C),S=!l.arrow&&Q(i)!=null&&O!==H&&r.reference[p]/2-(O<$?T:M)-m[p]/2<0,E=S?O<$?O-$:O-C:0;return{[d]:h[d]+E,data:{[d]:H,centerOffset:O-H-E,...S&&{alignmentOffset:E}},reset:S}}}),Fe=function(t){return t===void 0&&(t={}),{name:"flip",options:t,async fn(e){var n,o;const{placement:i,middlewareData:r,rects:s,initialPlacement:c,platform:l,elements:a}=e,{mainAxis:f=!0,crossAxis:u=!0,fallbackPlacements:h,fallbackStrategy:d="bestFit",fallbackAxisSideDirection:p="none",flipAlignment:m=!0,...w}=X(t,e);if((n=r.arrow)!=null&&n.alignmentOffset)return{};const g=q(i),x=Z(c),b=q(c)===c,y=await(l.isRTL==null?void 0:l.isRTL(a.floating)),v=h||(b||!m?[dt(c)]:Te(c)),P=p!=="none";!h&&P&&v.push(...Me(c,m,p,y));const R=[c,...v],D=await it(e,w),k=[];let T=((o=r.flip)==null?void 0:o.overflows)||[];if(f&&k.push(D[g]),u){const O=De(i,s,y);k.push(D[O[0]],D[O[1]])}if(T=[...T,{placement:i,overflows:k}],!k.every(O=>O<=0)){var M,$;const O=(((M=r.flip)==null?void 0:M.index)||0)+1,H=R[O];if(H)return{data:{index:O,overflows:T},reset:{placement:H}};let S=($=T.filter(E=>E.overflows[0]<=0).sort((E,A)=>E.overflows[1]-A.overflows[1])[0])==null?void 0:$.placement;if(!S)switch(d){case"bestFit":{var C;const E=(C=T.filter(A=>{if(P){const L=Z(A.placement);return L===x||L==="y"}return!0}).map(A=>[A.placement,A.overflows.filter(L=>L>0).reduce((L,_)=>L+_,0)]).sort((A,L)=>A[1]-L[1])[0])==null?void 0:C[0];E&&(S=E);break}case"initialPlacement":S=c;break}if(i!==S)return{reset:{placement:S}}}return{}}}};function Vt(t,e){return{top:t.top-e.height,right:t.right-e.width,bottom:t.bottom-e.height,left:t.left-e.width}}function It(t){return Ce.some(e=>t[e]>=0)}const He=function(t){return t===void 0&&(t={}),{name:"hide",options:t,async fn(e){const{rects:n}=e,{strategy:o="referenceHidden",...i}=X(t,e);switch(o){case"referenceHidden":{const r=await it(e,{...i,elementContext:"reference"}),s=Vt(r,n.reference);return{data:{referenceHiddenOffsets:s,referenceHidden:It(s)}}}case"escaped":{const r=await it(e,{...i,altBoundary:!0}),s=Vt(r,n.floating);return{data:{escapedOffsets:s,escaped:It(s)}}}default:return{}}}}};async function We(t,e){const{placement:n,platform:o,elements:i}=t,r=await(o.isRTL==null?void 0:o.isRTL(i.floating)),s=q(n),c=Q(n),l=Z(n)==="y",a=["left","top"].includes(s)?-1:1,f=r&&l?-1:1,u=X(e,t);let{mainAxis:h,crossAxis:d,alignmentAxis:p}=typeof u=="number"?{mainAxis:u,crossAxis:0,alignmentAxis:null}:{mainAxis:u.mainAxis||0,crossAxis:u.crossAxis||0,alignmentAxis:u.alignmentAxis};return c&&typeof p=="number"&&(d=c==="end"?p*-1:p),l?{x:d*f,y:h*a}:{x:h*a,y:d*f}}const ze=function(t){return t===void 0&&(t=0),{name:"offset",options:t,async fn(e){var n,o;const{x:i,y:r,placement:s,middlewareData:c}=e,l=await We(e,t);return s===((n=c.offset)==null?void 0:n.placement)&&(o=c.arrow)!=null&&o.alignmentOffset?{}:{x:i+l.x,y:r+l.y,data:{...l,placement:s}}}}},_e=function(t){return t===void 0&&(t={}),{name:"shift",options:t,async fn(e){const{x:n,y:o,placement:i}=e,{mainAxis:r=!0,crossAxis:s=!1,limiter:c={fn:w=>{let{x:g,y:x}=w;return{x:g,y:x}}},...l}=X(t,e),a={x:n,y:o},f=await it(e,l),u=Z(q(i)),h=Pt(u);let d=a[h],p=a[u];if(r){const w=h==="y"?"top":"left",g=h==="y"?"bottom":"right",x=d+f[w],b=d-f[g];d=At(x,d,b)}if(s){const w=u==="y"?"top":"left",g=u==="y"?"bottom":"right",x=p+f[w],b=p-f[g];p=At(x,p,b)}const m=c.fn({...e,[h]:d,[u]:p});return{...m,data:{x:m.x-n,y:m.y-o,enabled:{[h]:r,[u]:s}}}}}},Be=function(t){return t===void 0&&(t={}),{options:t,fn(e){const{x:n,y:o,placement:i,rects:r,middlewareData:s}=e,{offset:c=0,mainAxis:l=!0,crossAxis:a=!0}=X(t,e),f={x:n,y:o},u=Z(i),h=Pt(u);let d=f[h],p=f[u];const m=X(c,e),w=typeof m=="number"?{mainAxis:m,crossAxis:0}:{mainAxis:0,crossAxis:0,...m};if(l){const b=h==="y"?"height":"width",y=r.reference[h]-r.floating[b]+w.mainAxis,v=r.reference[h]+r.reference[b]-w.mainAxis;d<y?d=y:d>v&&(d=v)}if(a){var g,x;const b=h==="y"?"width":"height",y=["top","left"].includes(q(i)),v=r.reference[u]-r.floating[b]+(y&&((g=s.offset)==null?void 0:g[u])||0)+(y?0:w.crossAxis),P=r.reference[u]+r.reference[b]+(y?0:((x=s.offset)==null?void 0:x[u])||0)-(y?w.crossAxis:0);p<v?p=v:p>P&&(p=P)}return{[h]:d,[u]:p}}}},Ve=function(t){return t===void 0&&(t={}),{name:"size",options:t,async fn(e){var n,o;const{placement:i,rects:r,platform:s,elements:c}=e,{apply:l=()=>{},...a}=X(t,e),f=await it(e,a),u=q(i),h=Q(i),d=Z(i)==="y",{width:p,height:m}=r.floating;let w,g;u==="top"||u==="bottom"?(w=u,g=h===(await(s.isRTL==null?void 0:s.isRTL(c.floating))?"start":"end")?"left":"right"):(g=u,w=h==="end"?"top":"bottom");const x=m-f.top-f.bottom,b=p-f.left-f.right,y=U(m-f[w],x),v=U(p-f[g],b),P=!e.middlewareData.shift;let R=y,D=v;if((n=e.middlewareData.shift)!=null&&n.enabled.x&&(D=b),(o=e.middlewareData.shift)!=null&&o.enabled.y&&(R=x),P&&!h){const T=N(f.left,0),M=N(f.right,0),$=N(f.top,0),C=N(f.bottom,0);d?D=p-2*(T!==0||M!==0?T+M:N(f.left,f.right)):R=m-2*($!==0||C!==0?$+C:N(f.top,f.bottom))}await l({...e,availableWidth:D,availableHeight:R});const k=await s.getDimensions(c.floating);return p!==k.width||m!==k.height?{reset:{rects:!0}}:{}}}};function ht(){return typeof window<"u"}function tt(t){return Yt(t)?(t.nodeName||"").toLowerCase():"#document"}function F(t){var e;return(t==null||(e=t.ownerDocument)==null?void 0:e.defaultView)||window}function V(t){var e;return(e=(Yt(t)?t.ownerDocument:t.document)||window.document)==null?void 0:e.documentElement}function Yt(t){return ht()?t instanceof Node||t instanceof F(t).Node:!1}function W(t){return ht()?t instanceof Element||t instanceof F(t).Element:!1}function I(t){return ht()?t instanceof HTMLElement||t instanceof F(t).HTMLElement:!1}function jt(t){return!ht()||typeof ShadowRoot>"u"?!1:t instanceof ShadowRoot||t instanceof F(t).ShadowRoot}function rt(t){const{overflow:e,overflowX:n,overflowY:o,display:i}=z(t);return/auto|scroll|overlay|hidden|clip/.test(e+o+n)&&!["inline","contents"].includes(i)}function Ie(t){return["table","td","th"].includes(tt(t))}function mt(t){return[":popover-open",":modal"].some(e=>{try{return t.matches(e)}catch{return!1}})}function St(t){const e=Et(),n=W(t)?z(t):t;return n.transform!=="none"||n.perspective!=="none"||(n.containerType?n.containerType!=="normal":!1)||!e&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!e&&(n.filter?n.filter!=="none":!1)||["transform","perspective","filter"].some(o=>(n.willChange||"").includes(o))||["paint","layout","strict","content"].some(o=>(n.contain||"").includes(o))}function Ye(t){let e=K(t);for(;I(e)&&!et(e);){if(St(e))return e;if(mt(e))return null;e=K(e)}return null}function Et(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function et(t){return["html","body","#document"].includes(tt(t))}function z(t){return F(t).getComputedStyle(t)}function gt(t){return W(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.scrollX,scrollTop:t.scrollY}}function K(t){if(tt(t)==="html")return t;const e=t.assignedSlot||t.parentNode||jt(t)&&t.host||V(t);return jt(e)?e.host:e}function Xt(t){const e=K(t);return et(e)?t.ownerDocument?t.ownerDocument.body:t.body:I(e)&&rt(e)?e:Xt(e)}function st(t,e,n){var o;e===void 0&&(e=[]),n===void 0&&(n=!0);const i=Xt(t),r=i===((o=t.ownerDocument)==null?void 0:o.body),s=F(i);if(r){const c=Dt(s);return e.concat(s,s.visualViewport||[],rt(i)?i:[],c&&n?st(c):[])}return e.concat(i,st(i,[],n))}function Dt(t){return t.parent&&Object.getPrototypeOf(t.parent)?t.frameElement:null}function qt(t){const e=z(t);let n=parseFloat(e.width)||0,o=parseFloat(e.height)||0;const i=I(t),r=i?t.offsetWidth:n,s=i?t.offsetHeight:o,c=ft(n)!==r||ft(o)!==s;return c&&(n=r,o=s),{width:n,height:o,$:c}}function Tt(t){return W(t)?t:t.contextElement}function nt(t){const e=Tt(t);if(!I(e))return B(1);const n=e.getBoundingClientRect(),{width:o,height:i,$:r}=qt(e);let s=(r?ft(n.width):n.width)/o,c=(r?ft(n.height):n.height)/i;return(!s||!Number.isFinite(s))&&(s=1),(!c||!Number.isFinite(c))&&(c=1),{x:s,y:c}}const je=B(0);function Ut(t){const e=F(t);return!Et()||!e.visualViewport?je:{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function Xe(t,e,n){return e===void 0&&(e=!1),!n||e&&n!==F(t)?!1:e}function G(t,e,n,o){e===void 0&&(e=!1),n===void 0&&(n=!1);const i=t.getBoundingClientRect(),r=Tt(t);let s=B(1);e&&(o?W(o)&&(s=nt(o)):s=nt(t));const c=Xe(r,n,o)?Ut(r):B(0);let l=(i.left+c.x)/s.x,a=(i.top+c.y)/s.y,f=i.width/s.x,u=i.height/s.y;if(r){const h=F(r),d=o&&W(o)?F(o):o;let p=h,m=Dt(p);for(;m&&o&&d!==p;){const w=nt(m),g=m.getBoundingClientRect(),x=z(m),b=g.left+(m.clientLeft+parseFloat(x.paddingLeft))*w.x,y=g.top+(m.clientTop+parseFloat(x.paddingTop))*w.y;l*=w.x,a*=w.y,f*=w.x,u*=w.y,l+=b,a+=y,p=F(m),m=Dt(p)}}return pt({width:f,height:u,x:l,y:a})}function Lt(t,e){const n=gt(t).scrollLeft;return e?e.left+n:G(V(t)).left+n}function Zt(t,e,n){n===void 0&&(n=!1);const o=t.getBoundingClientRect(),i=o.left+e.scrollLeft-(n?0:Lt(t,o)),r=o.top+e.scrollTop;return{x:i,y:r}}function qe(t){let{elements:e,rect:n,offsetParent:o,strategy:i}=t;const r=i==="fixed",s=V(o),c=e?mt(e.floating):!1;if(o===s||c&&r)return n;let l={scrollLeft:0,scrollTop:0},a=B(1);const f=B(0),u=I(o);if((u||!u&&!r)&&((tt(o)!=="body"||rt(s))&&(l=gt(o)),I(o))){const d=G(o);a=nt(o),f.x=d.x+o.clientLeft,f.y=d.y+o.clientTop}const h=s&&!u&&!r?Zt(s,l,!0):B(0);return{width:n.width*a.x,height:n.height*a.y,x:n.x*a.x-l.scrollLeft*a.x+f.x+h.x,y:n.y*a.y-l.scrollTop*a.y+f.y+h.y}}function Ue(t){return Array.from(t.getClientRects())}function Ze(t){const e=V(t),n=gt(t),o=t.ownerDocument.body,i=N(e.scrollWidth,e.clientWidth,o.scrollWidth,o.clientWidth),r=N(e.scrollHeight,e.clientHeight,o.scrollHeight,o.clientHeight);let s=-n.scrollLeft+Lt(t);const c=-n.scrollTop;return z(o).direction==="rtl"&&(s+=N(e.clientWidth,o.clientWidth)-i),{width:i,height:r,x:s,y:c}}function Ke(t,e){const n=F(t),o=V(t),i=n.visualViewport;let r=o.clientWidth,s=o.clientHeight,c=0,l=0;if(i){r=i.width,s=i.height;const a=Et();(!a||a&&e==="fixed")&&(c=i.offsetLeft,l=i.offsetTop)}return{width:r,height:s,x:c,y:l}}function Ge(t,e){const n=G(t,!0,e==="fixed"),o=n.top+t.clientTop,i=n.left+t.clientLeft,r=I(t)?nt(t):B(1),s=t.clientWidth*r.x,c=t.clientHeight*r.y,l=i*r.x,a=o*r.y;return{width:s,height:c,x:l,y:a}}function Kt(t,e,n){let o;if(e==="viewport")o=Ke(t,n);else if(e==="document")o=Ze(V(t));else if(W(e))o=Ge(e,n);else{const i=Ut(t);o={x:e.x-i.x,y:e.y-i.y,width:e.width,height:e.height}}return pt(o)}function Gt(t,e){const n=K(t);return n===e||!W(n)||et(n)?!1:z(n).position==="fixed"||Gt(n,e)}function Je(t,e){const n=e.get(t);if(n)return n;let o=st(t,[],!1).filter(c=>W(c)&&tt(c)!=="body"),i=null;const r=z(t).position==="fixed";let s=r?K(t):t;for(;W(s)&&!et(s);){const c=z(s),l=St(s);!l&&c.position==="fixed"&&(i=null),(r?!l&&!i:!l&&c.position==="static"&&!!i&&["absolute","fixed"].includes(i.position)||rt(s)&&!l&&Gt(t,s))?o=o.filter(f=>f!==s):i=c,s=K(s)}return e.set(t,o),o}function Qe(t){let{element:e,boundary:n,rootBoundary:o,strategy:i}=t;const s=[...n==="clippingAncestors"?mt(e)?[]:Je(e,this._c):[].concat(n),o],c=s[0],l=s.reduce((a,f)=>{const u=Kt(e,f,i);return a.top=N(u.top,a.top),a.right=U(u.right,a.right),a.bottom=U(u.bottom,a.bottom),a.left=N(u.left,a.left),a},Kt(e,c,i));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function tn(t){const{width:e,height:n}=qt(t);return{width:e,height:n}}function en(t,e,n){const o=I(e),i=V(e),r=n==="fixed",s=G(t,!0,r,e);let c={scrollLeft:0,scrollTop:0};const l=B(0);if(o||!o&&!r)if((tt(e)!=="body"||rt(i))&&(c=gt(e)),o){const h=G(e,!0,r,e);l.x=h.x+e.clientLeft,l.y=h.y+e.clientTop}else i&&(l.x=Lt(i));const a=i&&!o&&!r?Zt(i,c):B(0),f=s.left+c.scrollLeft-l.x-a.x,u=s.top+c.scrollTop-l.y-a.y;return{x:f,y:u,width:s.width,height:s.height}}function Mt(t){return z(t).position==="static"}function Jt(t,e){if(!I(t)||z(t).position==="fixed")return null;if(e)return e(t);let n=t.offsetParent;return V(t)===n&&(n=n.ownerDocument.body),n}function Qt(t,e){const n=F(t);if(mt(t))return n;if(!I(t)){let i=K(t);for(;i&&!et(i);){if(W(i)&&!Mt(i))return i;i=K(i)}return n}let o=Jt(t,e);for(;o&&Ie(o)&&Mt(o);)o=Jt(o,e);return o&&et(o)&&Mt(o)&&!St(o)?n:o||Ye(t)||n}const nn=async function(t){const e=this.getOffsetParent||Qt,n=this.getDimensions,o=await n(t.floating);return{reference:en(t.reference,await e(t.floating),t.strategy),floating:{x:0,y:0,width:o.width,height:o.height}}};function on(t){return z(t).direction==="rtl"}const rn={convertOffsetParentRelativeRectToViewportRelativeRect:qe,getDocumentElement:V,getClippingRect:Qe,getOffsetParent:Qt,getElementRects:nn,getClientRects:Ue,getDimensions:tn,getScale:nt,isElement:W,isRTL:on};function sn(t,e){let n=null,o;const i=V(t);function r(){var c;clearTimeout(o),(c=n)==null||c.disconnect(),n=null}function s(c,l){c===void 0&&(c=!1),l===void 0&&(l=1),r();const{left:a,top:f,width:u,height:h}=t.getBoundingClientRect();if(c||e(),!u||!h)return;const d=ut(f),p=ut(i.clientWidth-(a+u)),m=ut(i.clientHeight-(f+h)),w=ut(a),x={rootMargin:-d+"px "+-p+"px "+-m+"px "+-w+"px",threshold:N(0,U(1,l))||1};let b=!0;function y(v){const P=v[0].intersectionRatio;if(P!==l){if(!b)return s();P?s(!1,P):o=setTimeout(()=>{s(!1,1e-7)},1e3)}b=!1}try{n=new IntersectionObserver(y,{...x,root:i.ownerDocument})}catch{n=new IntersectionObserver(y,x)}n.observe(t)}return s(!0),r}function cn(t,e,n,o){o===void 0&&(o={});const{ancestorScroll:i=!0,ancestorResize:r=!0,elementResize:s=typeof ResizeObserver=="function",layoutShift:c=typeof IntersectionObserver=="function",animationFrame:l=!1}=o,a=Tt(t),f=i||r?[...a?st(a):[],...st(e)]:[];f.forEach(g=>{i&&g.addEventListener("scroll",n,{passive:!0}),r&&g.addEventListener("resize",n)});const u=a&&c?sn(a,n):null;let h=-1,d=null;s&&(d=new ResizeObserver(g=>{let[x]=g;x&&x.target===a&&d&&(d.unobserve(e),cancelAnimationFrame(h),h=requestAnimationFrame(()=>{var b;(b=d)==null||b.observe(e)})),n()}),a&&!l&&d.observe(a),d.observe(e));let p,m=l?G(t):null;l&&w();function w(){const g=G(t);m&&(g.x!==m.x||g.y!==m.y||g.width!==m.width||g.height!==m.height)&&n(),m=g,p=requestAnimationFrame(w)}return n(),()=>{var g;f.forEach(x=>{i&&x.removeEventListener("scroll",n),r&&x.removeEventListener("resize",n)}),u?.(),(g=d)==null||g.disconnect(),d=null,l&&cancelAnimationFrame(p)}}const ln=ze,an=_e,fn=Fe,un=Ve,dn=He,te=Ne,pn=Be,hn=(t,e,n)=>{const o=new Map,i={platform:rn,...n},r={...i.platform,_c:o};return ke(t,e,{...i,platform:r})};var wt=typeof document<"u"?Pe:Wt;function xt(t,e){if(t===e)return!0;if(typeof t!=typeof e)return!1;if(typeof t=="function"&&t.toString()===e.toString())return!0;let n,o,i;if(t&&e&&typeof t=="object"){if(Array.isArray(t)){if(n=t.length,n!==e.length)return!1;for(o=n;o--!==0;)if(!xt(t[o],e[o]))return!1;return!0}if(i=Object.keys(t),n=i.length,n!==Object.keys(e).length)return!1;for(o=n;o--!==0;)if(!{}.hasOwnProperty.call(e,i[o]))return!1;for(o=n;o--!==0;){const r=i[o];if(!(r==="_owner"&&t.$$typeof)&&!xt(t[r],e[r]))return!1}return!0}return t!==t&&e!==e}function ee(t){return typeof window>"u"?1:(t.ownerDocument.defaultView||window).devicePixelRatio||1}function ne(t,e){const n=ee(t);return Math.round(e*n)/n}function $t(t){const e=J(t);return wt(()=>{e.current=t}),e}function mn(t){t===void 0&&(t={});const{placement:e="bottom",strategy:n="absolute",middleware:o=[],platform:i,elements:{reference:r,floating:s}={},transform:c=!0,whileElementsMounted:l,open:a}=t,[f,u]=Y({x:0,y:0,strategy:n,placement:e,middlewareData:{},isPositioned:!1}),[h,d]=Y(o);xt(h,o)||d(o);const[p,m]=Y(null),[w,g]=Y(null),x=yt(A=>{A!==P.current&&(P.current=A,m(A))},[]),b=yt(A=>{A!==R.current&&(R.current=A,g(A))},[]),y=r||p,v=s||w,P=J(null),R=J(null),D=J(f),k=l!=null,T=$t(l),M=$t(i),$=$t(a),C=yt(()=>{if(!P.current||!R.current)return;const A={placement:e,strategy:n,middleware:h};M.current&&(A.platform=M.current),hn(P.current,R.current,A).then(L=>{const _={...L,isPositioned:$.current!==!1};O.current&&!xt(D.current,_)&&(D.current=_,Ae(()=>{u(_)}))})},[h,e,n,M,$]);wt(()=>{a===!1&&D.current.isPositioned&&(D.current.isPositioned=!1,u(A=>({...A,isPositioned:!1})))},[a]);const O=J(!1);wt(()=>(O.current=!0,()=>{O.current=!1}),[]),wt(()=>{if(y&&(P.current=y),v&&(R.current=v),y&&v){if(T.current)return T.current(y,v,C);C()}},[y,v,C,T,k]);const H=lt(()=>({reference:P,floating:R,setReference:x,setFloating:b}),[x,b]),S=lt(()=>({reference:y,floating:v}),[y,v]),E=lt(()=>{const A={position:n,left:0,top:0};if(!S.floating)return A;const L=ne(S.floating,f.x),_=ne(S.floating,f.y);return c?{...A,transform:"translate("+L+"px, "+_+"px)",...ee(S.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:L,top:_}},[n,c,S.floating,f.x,f.y]);return lt(()=>({...f,update:C,refs:H,elements:S,floatingStyles:E}),[f,C,H,S,E])}const gn=t=>{function e(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:t,fn(n){const{element:o,padding:i}=typeof t=="function"?t(n):t;return o&&e(o)?o.current!=null?te({element:o.current,padding:i}).fn(n):{}:o?te({element:o,padding:i}).fn(n):{}}}},wn=(t,e)=>({...ln(t),options:[t,e]}),xn=(t,e)=>({...an(t),options:[t,e]}),yn=(t,e)=>({...pn(t),options:[t,e]}),vn=(t,e)=>({...fn(t),options:[t,e]}),bn=(t,e)=>({...un(t),options:[t,e]}),An=(t,e)=>({...dn(t),options:[t,e]}),Pn=(t,e)=>({...gn(t),options:[t,e]});var On="Arrow",oe=at((t,e)=>{const{children:n,width:o=10,height:i=5,...r}=t;return j(vt.svg,{...r,ref:e,width:o,height:i,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:t.asChild?n:j("polygon",{points:"0,0 30,0 15,10"})})});oe.displayName=On;var Rn=oe;function Cn(t){const[e,n]=Y(void 0);return bt(()=>{if(t){n({width:t.offsetWidth,height:t.offsetHeight});const o=new ResizeObserver(i=>{if(!Array.isArray(i)||!i.length)return;const r=i[0];let s,c;if("borderBoxSize"in r){const l=r.borderBoxSize,a=Array.isArray(l)?l[0]:l;s=a.inlineSize,c=a.blockSize}else s=t.offsetWidth,c=t.offsetHeight;n({width:s,height:c})});return o.observe(t,{box:"border-box"}),()=>o.unobserve(t)}else n(void 0)},[t]),e}var kt="Popper",[ie,Sn]=Oe(kt),[En,re]=ie(kt),se=t=>{const{__scopePopper:e,children:n}=t,[o,i]=Y(null);return j(En,{scope:e,anchor:o,onAnchorChange:i,children:n})};se.displayName=kt;var ce="PopperAnchor",le=at((t,e)=>{const{__scopePopper:n,virtualRef:o,...i}=t,r=re(ce,n),s=J(null),c=zt(e,s);return Wt(()=>{r.onAnchorChange(o?.current||s.current)}),o?null:j(vt.div,{...i,ref:c})});le.displayName=ce;var Nt="PopperContent",[Dn,Tn]=ie(Nt),ae=at((t,e)=>{const{__scopePopper:n,side:o="bottom",sideOffset:i=0,align:r="center",alignOffset:s=0,arrowPadding:c=0,avoidCollisions:l=!0,collisionBoundary:a=[],collisionPadding:f=0,sticky:u="partial",hideWhenDetached:h=!1,updatePositionStrategy:d="optimized",onPlaced:p,...m}=t,w=re(Nt,n),[g,x]=Y(null),b=zt(e,ot=>x(ot)),[y,v]=Y(null),P=Cn(y),R=P?.width??0,D=P?.height??0,k=o+(r!=="center"?"-"+r:""),T=typeof f=="number"?f:{top:0,right:0,bottom:0,left:0,...f},M=Array.isArray(a)?a:[a],$=M.length>0,C={padding:T,boundary:M.filter(Mn),altBoundary:$},{refs:O,floatingStyles:H,placement:S,isPositioned:E,middlewareData:A}=mn({strategy:"fixed",placement:k,whileElementsMounted:(...ot)=>cn(...ot,{animationFrame:d==="always"}),elements:{reference:w.anchor},middleware:[wn({mainAxis:i+D,alignmentAxis:s}),l&&xn({mainAxis:!0,crossAxis:!1,limiter:u==="partial"?yn():void 0,...C}),l&&vn({...C}),bn({...C,apply:({elements:ot,rects:Ht,availableWidth:xe,availableHeight:ye})=>{const{width:ve,height:be}=Ht.reference,ct=ot.floating.style;ct.setProperty("--radix-popper-available-width",`${xe}px`),ct.setProperty("--radix-popper-available-height",`${ye}px`),ct.setProperty("--radix-popper-anchor-width",`${ve}px`),ct.setProperty("--radix-popper-anchor-height",`${be}px`)}}),y&&Pn({element:y,padding:c}),$n({arrowWidth:R,arrowHeight:D}),h&&An({strategy:"referenceHidden",...C})]}),[L,_]=de(S),Ft=Re(p);bt(()=>{E&&Ft?.()},[E,Ft]);const pe=A.arrow?.x,he=A.arrow?.y,me=A.arrow?.centerOffset!==0,[ge,we]=Y();return bt(()=>{g&&we(window.getComputedStyle(g).zIndex)},[g]),j("div",{ref:O.setFloating,"data-radix-popper-content-wrapper":"",style:{...H,transform:E?H.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:ge,["--radix-popper-transform-origin"]:[A.transformOrigin?.x,A.transformOrigin?.y].join(" "),...A.hide?.referenceHidden&&{visibility:"hidden",pointerEvents:"none"}},dir:t.dir,children:j(Dn,{scope:n,placedSide:L,onArrowChange:v,arrowX:pe,arrowY:he,shouldHideArrow:me,children:j(vt.div,{"data-side":L,"data-align":_,...m,ref:b,style:{...m.style,animation:E?void 0:"none"}})})})});ae.displayName=Nt;var fe="PopperArrow",Ln={top:"bottom",right:"left",bottom:"top",left:"right"},ue=at(function(e,n){const{__scopePopper:o,...i}=e,r=Tn(fe,o),s=Ln[r.placedSide];return j("span",{ref:r.onArrowChange,style:{position:"absolute",left:r.arrowX,top:r.arrowY,[s]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[r.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[r.placedSide],visibility:r.shouldHideArrow?"hidden":void 0},children:j(Rn,{...i,ref:n,style:{...i.style,display:"block"}})})});ue.displayName=fe;function Mn(t){return t!==null}var $n=t=>({name:"transformOrigin",options:t,fn(e){const{placement:n,rects:o,middlewareData:i}=e,s=i.arrow?.centerOffset!==0,c=s?0:t.arrowWidth,l=s?0:t.arrowHeight,[a,f]=de(n),u={start:"0%",center:"50%",end:"100%"}[f],h=(i.arrow?.x??0)+c/2,d=(i.arrow?.y??0)+l/2;let p="",m="";return a==="bottom"?(p=s?u:`${h}px`,m=`${-l}px`):a==="top"?(p=s?u:`${h}px`,m=`${o.floating.height+l}px`):a==="right"?(p=`${-l}px`,m=s?u:`${d}px`):a==="left"&&(p=`${o.floating.width+l}px`,m=s?u:`${d}px`),{data:{x:p,y:m}}}});function de(t){const[e,n="center"]=t.split("-");return[e,n]}var kn=se,Nn=le,Fn=ae,Hn=ue;export{Nn as A,Fn as C,kn as R,Hn as a,Sn as c};
1
+ import{h as Y,q as yt,A as J,g as Ae,T as lt,c as Pe,y as Wt,w as at,u as j}from"./register-4_mVToaL.js";import{P as vt}from"./index-CkaatyBQ.js";import{u as zt}from"./index-BRahpty3.js";import{c as Oe}from"./index-g5fgZDhH.js";import{u as Re}from"./index-BIypPxZf.js";import{u as bt}from"./index-DQRZUM8s.js";const Ce=["top","right","bottom","left"],U=Math.min,N=Math.max,ft=Math.round,ut=Math.floor,B=t=>({x:t,y:t}),Se={left:"right",right:"left",bottom:"top",top:"bottom"},Ee={start:"end",end:"start"};function At(t,e,n){return N(t,U(e,n))}function X(t,e){return typeof t=="function"?t(e):t}function q(t){return t.split("-")[0]}function Q(t){return t.split("-")[1]}function Pt(t){return t==="x"?"y":"x"}function Ot(t){return t==="y"?"height":"width"}function Z(t){return["top","bottom"].includes(q(t))?"y":"x"}function Rt(t){return Pt(Z(t))}function De(t,e,n){n===void 0&&(n=!1);const o=Q(t),i=Rt(t),r=Ot(i);let s=i==="x"?o===(n?"end":"start")?"right":"left":o==="start"?"bottom":"top";return e.reference[r]>e.floating[r]&&(s=dt(s)),[s,dt(s)]}function Te(t){const e=dt(t);return[Ct(t),e,Ct(e)]}function Ct(t){return t.replace(/start|end/g,e=>Ee[e])}function Le(t,e,n){const o=["left","right"],i=["right","left"],r=["top","bottom"],s=["bottom","top"];switch(t){case"top":case"bottom":return n?e?i:o:e?o:i;case"left":case"right":return e?r:s;default:return[]}}function Me(t,e,n,o){const i=Q(t);let r=Le(q(t),n==="start",o);return i&&(r=r.map(s=>s+"-"+i),e&&(r=r.concat(r.map(Ct)))),r}function dt(t){return t.replace(/left|right|bottom|top/g,e=>Se[e])}function $e(t){return{top:0,right:0,bottom:0,left:0,...t}}function _t(t){return typeof t!="number"?$e(t):{top:t,right:t,bottom:t,left:t}}function pt(t){const{x:e,y:n,width:o,height:i}=t;return{width:o,height:i,top:n,left:e,right:e+o,bottom:n+i,x:e,y:n}}function Bt(t,e,n){let{reference:o,floating:i}=t;const r=Z(e),s=Rt(e),c=Ot(s),l=q(e),a=r==="y",f=o.x+o.width/2-i.width/2,u=o.y+o.height/2-i.height/2,h=o[c]/2-i[c]/2;let d;switch(l){case"top":d={x:f,y:o.y-i.height};break;case"bottom":d={x:f,y:o.y+o.height};break;case"right":d={x:o.x+o.width,y:u};break;case"left":d={x:o.x-i.width,y:u};break;default:d={x:o.x,y:o.y}}switch(Q(e)){case"start":d[s]-=h*(n&&a?-1:1);break;case"end":d[s]+=h*(n&&a?-1:1);break}return d}const ke=async(t,e,n)=>{const{placement:o="bottom",strategy:i="absolute",middleware:r=[],platform:s}=n,c=r.filter(Boolean),l=await(s.isRTL==null?void 0:s.isRTL(e));let a=await s.getElementRects({reference:t,floating:e,strategy:i}),{x:f,y:u}=Bt(a,o,l),h=o,d={},p=0;for(let m=0;m<c.length;m++){const{name:w,fn:g}=c[m],{x,y:b,data:y,reset:v}=await g({x:f,y:u,initialPlacement:o,placement:h,strategy:i,middlewareData:d,rects:a,platform:s,elements:{reference:t,floating:e}});f=x??f,u=b??u,d={...d,[w]:{...d[w],...y}},v&&p<=50&&(p++,typeof v=="object"&&(v.placement&&(h=v.placement),v.rects&&(a=v.rects===!0?await s.getElementRects({reference:t,floating:e,strategy:i}):v.rects),{x:f,y:u}=Bt(a,h,l)),m=-1)}return{x:f,y:u,placement:h,strategy:i,middlewareData:d}};async function it(t,e){var n;e===void 0&&(e={});const{x:o,y:i,platform:r,rects:s,elements:c,strategy:l}=t,{boundary:a="clippingAncestors",rootBoundary:f="viewport",elementContext:u="floating",altBoundary:h=!1,padding:d=0}=X(e,t),p=_t(d),w=c[h?u==="floating"?"reference":"floating":u],g=pt(await r.getClippingRect({element:(n=await(r.isElement==null?void 0:r.isElement(w)))==null||n?w:w.contextElement||await(r.getDocumentElement==null?void 0:r.getDocumentElement(c.floating)),boundary:a,rootBoundary:f,strategy:l})),x=u==="floating"?{x:o,y:i,width:s.floating.width,height:s.floating.height}:s.reference,b=await(r.getOffsetParent==null?void 0:r.getOffsetParent(c.floating)),y=await(r.isElement==null?void 0:r.isElement(b))?await(r.getScale==null?void 0:r.getScale(b))||{x:1,y:1}:{x:1,y:1},v=pt(r.convertOffsetParentRelativeRectToViewportRelativeRect?await r.convertOffsetParentRelativeRectToViewportRelativeRect({elements:c,rect:x,offsetParent:b,strategy:l}):x);return{top:(g.top-v.top+p.top)/y.y,bottom:(v.bottom-g.bottom+p.bottom)/y.y,left:(g.left-v.left+p.left)/y.x,right:(v.right-g.right+p.right)/y.x}}const Ne=t=>({name:"arrow",options:t,async fn(e){const{x:n,y:o,placement:i,rects:r,platform:s,elements:c,middlewareData:l}=e,{element:a,padding:f=0}=X(t,e)||{};if(a==null)return{};const u=_t(f),h={x:n,y:o},d=Rt(i),p=Ot(d),m=await s.getDimensions(a),w=d==="y",g=w?"top":"left",x=w?"bottom":"right",b=w?"clientHeight":"clientWidth",y=r.reference[p]+r.reference[d]-h[d]-r.floating[p],v=h[d]-r.reference[d],P=await(s.getOffsetParent==null?void 0:s.getOffsetParent(a));let R=P?P[b]:0;(!R||!await(s.isElement==null?void 0:s.isElement(P)))&&(R=c.floating[b]||r.floating[p]);const D=y/2-v/2,k=R/2-m[p]/2-1,T=U(u[g],k),M=U(u[x],k),$=T,C=R-m[p]-M,O=R/2-m[p]/2+D,H=At($,O,C),S=!l.arrow&&Q(i)!=null&&O!==H&&r.reference[p]/2-(O<$?T:M)-m[p]/2<0,E=S?O<$?O-$:O-C:0;return{[d]:h[d]+E,data:{[d]:H,centerOffset:O-H-E,...S&&{alignmentOffset:E}},reset:S}}}),Fe=function(t){return t===void 0&&(t={}),{name:"flip",options:t,async fn(e){var n,o;const{placement:i,middlewareData:r,rects:s,initialPlacement:c,platform:l,elements:a}=e,{mainAxis:f=!0,crossAxis:u=!0,fallbackPlacements:h,fallbackStrategy:d="bestFit",fallbackAxisSideDirection:p="none",flipAlignment:m=!0,...w}=X(t,e);if((n=r.arrow)!=null&&n.alignmentOffset)return{};const g=q(i),x=Z(c),b=q(c)===c,y=await(l.isRTL==null?void 0:l.isRTL(a.floating)),v=h||(b||!m?[dt(c)]:Te(c)),P=p!=="none";!h&&P&&v.push(...Me(c,m,p,y));const R=[c,...v],D=await it(e,w),k=[];let T=((o=r.flip)==null?void 0:o.overflows)||[];if(f&&k.push(D[g]),u){const O=De(i,s,y);k.push(D[O[0]],D[O[1]])}if(T=[...T,{placement:i,overflows:k}],!k.every(O=>O<=0)){var M,$;const O=(((M=r.flip)==null?void 0:M.index)||0)+1,H=R[O];if(H)return{data:{index:O,overflows:T},reset:{placement:H}};let S=($=T.filter(E=>E.overflows[0]<=0).sort((E,A)=>E.overflows[1]-A.overflows[1])[0])==null?void 0:$.placement;if(!S)switch(d){case"bestFit":{var C;const E=(C=T.filter(A=>{if(P){const L=Z(A.placement);return L===x||L==="y"}return!0}).map(A=>[A.placement,A.overflows.filter(L=>L>0).reduce((L,_)=>L+_,0)]).sort((A,L)=>A[1]-L[1])[0])==null?void 0:C[0];E&&(S=E);break}case"initialPlacement":S=c;break}if(i!==S)return{reset:{placement:S}}}return{}}}};function Vt(t,e){return{top:t.top-e.height,right:t.right-e.width,bottom:t.bottom-e.height,left:t.left-e.width}}function It(t){return Ce.some(e=>t[e]>=0)}const He=function(t){return t===void 0&&(t={}),{name:"hide",options:t,async fn(e){const{rects:n}=e,{strategy:o="referenceHidden",...i}=X(t,e);switch(o){case"referenceHidden":{const r=await it(e,{...i,elementContext:"reference"}),s=Vt(r,n.reference);return{data:{referenceHiddenOffsets:s,referenceHidden:It(s)}}}case"escaped":{const r=await it(e,{...i,altBoundary:!0}),s=Vt(r,n.floating);return{data:{escapedOffsets:s,escaped:It(s)}}}default:return{}}}}};async function We(t,e){const{placement:n,platform:o,elements:i}=t,r=await(o.isRTL==null?void 0:o.isRTL(i.floating)),s=q(n),c=Q(n),l=Z(n)==="y",a=["left","top"].includes(s)?-1:1,f=r&&l?-1:1,u=X(e,t);let{mainAxis:h,crossAxis:d,alignmentAxis:p}=typeof u=="number"?{mainAxis:u,crossAxis:0,alignmentAxis:null}:{mainAxis:u.mainAxis||0,crossAxis:u.crossAxis||0,alignmentAxis:u.alignmentAxis};return c&&typeof p=="number"&&(d=c==="end"?p*-1:p),l?{x:d*f,y:h*a}:{x:h*a,y:d*f}}const ze=function(t){return t===void 0&&(t=0),{name:"offset",options:t,async fn(e){var n,o;const{x:i,y:r,placement:s,middlewareData:c}=e,l=await We(e,t);return s===((n=c.offset)==null?void 0:n.placement)&&(o=c.arrow)!=null&&o.alignmentOffset?{}:{x:i+l.x,y:r+l.y,data:{...l,placement:s}}}}},_e=function(t){return t===void 0&&(t={}),{name:"shift",options:t,async fn(e){const{x:n,y:o,placement:i}=e,{mainAxis:r=!0,crossAxis:s=!1,limiter:c={fn:w=>{let{x:g,y:x}=w;return{x:g,y:x}}},...l}=X(t,e),a={x:n,y:o},f=await it(e,l),u=Z(q(i)),h=Pt(u);let d=a[h],p=a[u];if(r){const w=h==="y"?"top":"left",g=h==="y"?"bottom":"right",x=d+f[w],b=d-f[g];d=At(x,d,b)}if(s){const w=u==="y"?"top":"left",g=u==="y"?"bottom":"right",x=p+f[w],b=p-f[g];p=At(x,p,b)}const m=c.fn({...e,[h]:d,[u]:p});return{...m,data:{x:m.x-n,y:m.y-o,enabled:{[h]:r,[u]:s}}}}}},Be=function(t){return t===void 0&&(t={}),{options:t,fn(e){const{x:n,y:o,placement:i,rects:r,middlewareData:s}=e,{offset:c=0,mainAxis:l=!0,crossAxis:a=!0}=X(t,e),f={x:n,y:o},u=Z(i),h=Pt(u);let d=f[h],p=f[u];const m=X(c,e),w=typeof m=="number"?{mainAxis:m,crossAxis:0}:{mainAxis:0,crossAxis:0,...m};if(l){const b=h==="y"?"height":"width",y=r.reference[h]-r.floating[b]+w.mainAxis,v=r.reference[h]+r.reference[b]-w.mainAxis;d<y?d=y:d>v&&(d=v)}if(a){var g,x;const b=h==="y"?"width":"height",y=["top","left"].includes(q(i)),v=r.reference[u]-r.floating[b]+(y&&((g=s.offset)==null?void 0:g[u])||0)+(y?0:w.crossAxis),P=r.reference[u]+r.reference[b]+(y?0:((x=s.offset)==null?void 0:x[u])||0)-(y?w.crossAxis:0);p<v?p=v:p>P&&(p=P)}return{[h]:d,[u]:p}}}},Ve=function(t){return t===void 0&&(t={}),{name:"size",options:t,async fn(e){var n,o;const{placement:i,rects:r,platform:s,elements:c}=e,{apply:l=()=>{},...a}=X(t,e),f=await it(e,a),u=q(i),h=Q(i),d=Z(i)==="y",{width:p,height:m}=r.floating;let w,g;u==="top"||u==="bottom"?(w=u,g=h===(await(s.isRTL==null?void 0:s.isRTL(c.floating))?"start":"end")?"left":"right"):(g=u,w=h==="end"?"top":"bottom");const x=m-f.top-f.bottom,b=p-f.left-f.right,y=U(m-f[w],x),v=U(p-f[g],b),P=!e.middlewareData.shift;let R=y,D=v;if((n=e.middlewareData.shift)!=null&&n.enabled.x&&(D=b),(o=e.middlewareData.shift)!=null&&o.enabled.y&&(R=x),P&&!h){const T=N(f.left,0),M=N(f.right,0),$=N(f.top,0),C=N(f.bottom,0);d?D=p-2*(T!==0||M!==0?T+M:N(f.left,f.right)):R=m-2*($!==0||C!==0?$+C:N(f.top,f.bottom))}await l({...e,availableWidth:D,availableHeight:R});const k=await s.getDimensions(c.floating);return p!==k.width||m!==k.height?{reset:{rects:!0}}:{}}}};function ht(){return typeof window<"u"}function tt(t){return Yt(t)?(t.nodeName||"").toLowerCase():"#document"}function F(t){var e;return(t==null||(e=t.ownerDocument)==null?void 0:e.defaultView)||window}function V(t){var e;return(e=(Yt(t)?t.ownerDocument:t.document)||window.document)==null?void 0:e.documentElement}function Yt(t){return ht()?t instanceof Node||t instanceof F(t).Node:!1}function W(t){return ht()?t instanceof Element||t instanceof F(t).Element:!1}function I(t){return ht()?t instanceof HTMLElement||t instanceof F(t).HTMLElement:!1}function jt(t){return!ht()||typeof ShadowRoot>"u"?!1:t instanceof ShadowRoot||t instanceof F(t).ShadowRoot}function rt(t){const{overflow:e,overflowX:n,overflowY:o,display:i}=z(t);return/auto|scroll|overlay|hidden|clip/.test(e+o+n)&&!["inline","contents"].includes(i)}function Ie(t){return["table","td","th"].includes(tt(t))}function mt(t){return[":popover-open",":modal"].some(e=>{try{return t.matches(e)}catch{return!1}})}function St(t){const e=Et(),n=W(t)?z(t):t;return n.transform!=="none"||n.perspective!=="none"||(n.containerType?n.containerType!=="normal":!1)||!e&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!e&&(n.filter?n.filter!=="none":!1)||["transform","perspective","filter"].some(o=>(n.willChange||"").includes(o))||["paint","layout","strict","content"].some(o=>(n.contain||"").includes(o))}function Ye(t){let e=K(t);for(;I(e)&&!et(e);){if(St(e))return e;if(mt(e))return null;e=K(e)}return null}function Et(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function et(t){return["html","body","#document"].includes(tt(t))}function z(t){return F(t).getComputedStyle(t)}function gt(t){return W(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.scrollX,scrollTop:t.scrollY}}function K(t){if(tt(t)==="html")return t;const e=t.assignedSlot||t.parentNode||jt(t)&&t.host||V(t);return jt(e)?e.host:e}function Xt(t){const e=K(t);return et(e)?t.ownerDocument?t.ownerDocument.body:t.body:I(e)&&rt(e)?e:Xt(e)}function st(t,e,n){var o;e===void 0&&(e=[]),n===void 0&&(n=!0);const i=Xt(t),r=i===((o=t.ownerDocument)==null?void 0:o.body),s=F(i);if(r){const c=Dt(s);return e.concat(s,s.visualViewport||[],rt(i)?i:[],c&&n?st(c):[])}return e.concat(i,st(i,[],n))}function Dt(t){return t.parent&&Object.getPrototypeOf(t.parent)?t.frameElement:null}function qt(t){const e=z(t);let n=parseFloat(e.width)||0,o=parseFloat(e.height)||0;const i=I(t),r=i?t.offsetWidth:n,s=i?t.offsetHeight:o,c=ft(n)!==r||ft(o)!==s;return c&&(n=r,o=s),{width:n,height:o,$:c}}function Tt(t){return W(t)?t:t.contextElement}function nt(t){const e=Tt(t);if(!I(e))return B(1);const n=e.getBoundingClientRect(),{width:o,height:i,$:r}=qt(e);let s=(r?ft(n.width):n.width)/o,c=(r?ft(n.height):n.height)/i;return(!s||!Number.isFinite(s))&&(s=1),(!c||!Number.isFinite(c))&&(c=1),{x:s,y:c}}const je=B(0);function Ut(t){const e=F(t);return!Et()||!e.visualViewport?je:{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function Xe(t,e,n){return e===void 0&&(e=!1),!n||e&&n!==F(t)?!1:e}function G(t,e,n,o){e===void 0&&(e=!1),n===void 0&&(n=!1);const i=t.getBoundingClientRect(),r=Tt(t);let s=B(1);e&&(o?W(o)&&(s=nt(o)):s=nt(t));const c=Xe(r,n,o)?Ut(r):B(0);let l=(i.left+c.x)/s.x,a=(i.top+c.y)/s.y,f=i.width/s.x,u=i.height/s.y;if(r){const h=F(r),d=o&&W(o)?F(o):o;let p=h,m=Dt(p);for(;m&&o&&d!==p;){const w=nt(m),g=m.getBoundingClientRect(),x=z(m),b=g.left+(m.clientLeft+parseFloat(x.paddingLeft))*w.x,y=g.top+(m.clientTop+parseFloat(x.paddingTop))*w.y;l*=w.x,a*=w.y,f*=w.x,u*=w.y,l+=b,a+=y,p=F(m),m=Dt(p)}}return pt({width:f,height:u,x:l,y:a})}function Lt(t,e){const n=gt(t).scrollLeft;return e?e.left+n:G(V(t)).left+n}function Zt(t,e,n){n===void 0&&(n=!1);const o=t.getBoundingClientRect(),i=o.left+e.scrollLeft-(n?0:Lt(t,o)),r=o.top+e.scrollTop;return{x:i,y:r}}function qe(t){let{elements:e,rect:n,offsetParent:o,strategy:i}=t;const r=i==="fixed",s=V(o),c=e?mt(e.floating):!1;if(o===s||c&&r)return n;let l={scrollLeft:0,scrollTop:0},a=B(1);const f=B(0),u=I(o);if((u||!u&&!r)&&((tt(o)!=="body"||rt(s))&&(l=gt(o)),I(o))){const d=G(o);a=nt(o),f.x=d.x+o.clientLeft,f.y=d.y+o.clientTop}const h=s&&!u&&!r?Zt(s,l,!0):B(0);return{width:n.width*a.x,height:n.height*a.y,x:n.x*a.x-l.scrollLeft*a.x+f.x+h.x,y:n.y*a.y-l.scrollTop*a.y+f.y+h.y}}function Ue(t){return Array.from(t.getClientRects())}function Ze(t){const e=V(t),n=gt(t),o=t.ownerDocument.body,i=N(e.scrollWidth,e.clientWidth,o.scrollWidth,o.clientWidth),r=N(e.scrollHeight,e.clientHeight,o.scrollHeight,o.clientHeight);let s=-n.scrollLeft+Lt(t);const c=-n.scrollTop;return z(o).direction==="rtl"&&(s+=N(e.clientWidth,o.clientWidth)-i),{width:i,height:r,x:s,y:c}}function Ke(t,e){const n=F(t),o=V(t),i=n.visualViewport;let r=o.clientWidth,s=o.clientHeight,c=0,l=0;if(i){r=i.width,s=i.height;const a=Et();(!a||a&&e==="fixed")&&(c=i.offsetLeft,l=i.offsetTop)}return{width:r,height:s,x:c,y:l}}function Ge(t,e){const n=G(t,!0,e==="fixed"),o=n.top+t.clientTop,i=n.left+t.clientLeft,r=I(t)?nt(t):B(1),s=t.clientWidth*r.x,c=t.clientHeight*r.y,l=i*r.x,a=o*r.y;return{width:s,height:c,x:l,y:a}}function Kt(t,e,n){let o;if(e==="viewport")o=Ke(t,n);else if(e==="document")o=Ze(V(t));else if(W(e))o=Ge(e,n);else{const i=Ut(t);o={x:e.x-i.x,y:e.y-i.y,width:e.width,height:e.height}}return pt(o)}function Gt(t,e){const n=K(t);return n===e||!W(n)||et(n)?!1:z(n).position==="fixed"||Gt(n,e)}function Je(t,e){const n=e.get(t);if(n)return n;let o=st(t,[],!1).filter(c=>W(c)&&tt(c)!=="body"),i=null;const r=z(t).position==="fixed";let s=r?K(t):t;for(;W(s)&&!et(s);){const c=z(s),l=St(s);!l&&c.position==="fixed"&&(i=null),(r?!l&&!i:!l&&c.position==="static"&&!!i&&["absolute","fixed"].includes(i.position)||rt(s)&&!l&&Gt(t,s))?o=o.filter(f=>f!==s):i=c,s=K(s)}return e.set(t,o),o}function Qe(t){let{element:e,boundary:n,rootBoundary:o,strategy:i}=t;const s=[...n==="clippingAncestors"?mt(e)?[]:Je(e,this._c):[].concat(n),o],c=s[0],l=s.reduce((a,f)=>{const u=Kt(e,f,i);return a.top=N(u.top,a.top),a.right=U(u.right,a.right),a.bottom=U(u.bottom,a.bottom),a.left=N(u.left,a.left),a},Kt(e,c,i));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function tn(t){const{width:e,height:n}=qt(t);return{width:e,height:n}}function en(t,e,n){const o=I(e),i=V(e),r=n==="fixed",s=G(t,!0,r,e);let c={scrollLeft:0,scrollTop:0};const l=B(0);if(o||!o&&!r)if((tt(e)!=="body"||rt(i))&&(c=gt(e)),o){const h=G(e,!0,r,e);l.x=h.x+e.clientLeft,l.y=h.y+e.clientTop}else i&&(l.x=Lt(i));const a=i&&!o&&!r?Zt(i,c):B(0),f=s.left+c.scrollLeft-l.x-a.x,u=s.top+c.scrollTop-l.y-a.y;return{x:f,y:u,width:s.width,height:s.height}}function Mt(t){return z(t).position==="static"}function Jt(t,e){if(!I(t)||z(t).position==="fixed")return null;if(e)return e(t);let n=t.offsetParent;return V(t)===n&&(n=n.ownerDocument.body),n}function Qt(t,e){const n=F(t);if(mt(t))return n;if(!I(t)){let i=K(t);for(;i&&!et(i);){if(W(i)&&!Mt(i))return i;i=K(i)}return n}let o=Jt(t,e);for(;o&&Ie(o)&&Mt(o);)o=Jt(o,e);return o&&et(o)&&Mt(o)&&!St(o)?n:o||Ye(t)||n}const nn=async function(t){const e=this.getOffsetParent||Qt,n=this.getDimensions,o=await n(t.floating);return{reference:en(t.reference,await e(t.floating),t.strategy),floating:{x:0,y:0,width:o.width,height:o.height}}};function on(t){return z(t).direction==="rtl"}const rn={convertOffsetParentRelativeRectToViewportRelativeRect:qe,getDocumentElement:V,getClippingRect:Qe,getOffsetParent:Qt,getElementRects:nn,getClientRects:Ue,getDimensions:tn,getScale:nt,isElement:W,isRTL:on};function sn(t,e){let n=null,o;const i=V(t);function r(){var c;clearTimeout(o),(c=n)==null||c.disconnect(),n=null}function s(c,l){c===void 0&&(c=!1),l===void 0&&(l=1),r();const{left:a,top:f,width:u,height:h}=t.getBoundingClientRect();if(c||e(),!u||!h)return;const d=ut(f),p=ut(i.clientWidth-(a+u)),m=ut(i.clientHeight-(f+h)),w=ut(a),x={rootMargin:-d+"px "+-p+"px "+-m+"px "+-w+"px",threshold:N(0,U(1,l))||1};let b=!0;function y(v){const P=v[0].intersectionRatio;if(P!==l){if(!b)return s();P?s(!1,P):o=setTimeout(()=>{s(!1,1e-7)},1e3)}b=!1}try{n=new IntersectionObserver(y,{...x,root:i.ownerDocument})}catch{n=new IntersectionObserver(y,x)}n.observe(t)}return s(!0),r}function cn(t,e,n,o){o===void 0&&(o={});const{ancestorScroll:i=!0,ancestorResize:r=!0,elementResize:s=typeof ResizeObserver=="function",layoutShift:c=typeof IntersectionObserver=="function",animationFrame:l=!1}=o,a=Tt(t),f=i||r?[...a?st(a):[],...st(e)]:[];f.forEach(g=>{i&&g.addEventListener("scroll",n,{passive:!0}),r&&g.addEventListener("resize",n)});const u=a&&c?sn(a,n):null;let h=-1,d=null;s&&(d=new ResizeObserver(g=>{let[x]=g;x&&x.target===a&&d&&(d.unobserve(e),cancelAnimationFrame(h),h=requestAnimationFrame(()=>{var b;(b=d)==null||b.observe(e)})),n()}),a&&!l&&d.observe(a),d.observe(e));let p,m=l?G(t):null;l&&w();function w(){const g=G(t);m&&(g.x!==m.x||g.y!==m.y||g.width!==m.width||g.height!==m.height)&&n(),m=g,p=requestAnimationFrame(w)}return n(),()=>{var g;f.forEach(x=>{i&&x.removeEventListener("scroll",n),r&&x.removeEventListener("resize",n)}),u?.(),(g=d)==null||g.disconnect(),d=null,l&&cancelAnimationFrame(p)}}const ln=ze,an=_e,fn=Fe,un=Ve,dn=He,te=Ne,pn=Be,hn=(t,e,n)=>{const o=new Map,i={platform:rn,...n},r={...i.platform,_c:o};return ke(t,e,{...i,platform:r})};var wt=typeof document<"u"?Pe:Wt;function xt(t,e){if(t===e)return!0;if(typeof t!=typeof e)return!1;if(typeof t=="function"&&t.toString()===e.toString())return!0;let n,o,i;if(t&&e&&typeof t=="object"){if(Array.isArray(t)){if(n=t.length,n!==e.length)return!1;for(o=n;o--!==0;)if(!xt(t[o],e[o]))return!1;return!0}if(i=Object.keys(t),n=i.length,n!==Object.keys(e).length)return!1;for(o=n;o--!==0;)if(!{}.hasOwnProperty.call(e,i[o]))return!1;for(o=n;o--!==0;){const r=i[o];if(!(r==="_owner"&&t.$$typeof)&&!xt(t[r],e[r]))return!1}return!0}return t!==t&&e!==e}function ee(t){return typeof window>"u"?1:(t.ownerDocument.defaultView||window).devicePixelRatio||1}function ne(t,e){const n=ee(t);return Math.round(e*n)/n}function $t(t){const e=J(t);return wt(()=>{e.current=t}),e}function mn(t){t===void 0&&(t={});const{placement:e="bottom",strategy:n="absolute",middleware:o=[],platform:i,elements:{reference:r,floating:s}={},transform:c=!0,whileElementsMounted:l,open:a}=t,[f,u]=Y({x:0,y:0,strategy:n,placement:e,middlewareData:{},isPositioned:!1}),[h,d]=Y(o);xt(h,o)||d(o);const[p,m]=Y(null),[w,g]=Y(null),x=yt(A=>{A!==P.current&&(P.current=A,m(A))},[]),b=yt(A=>{A!==R.current&&(R.current=A,g(A))},[]),y=r||p,v=s||w,P=J(null),R=J(null),D=J(f),k=l!=null,T=$t(l),M=$t(i),$=$t(a),C=yt(()=>{if(!P.current||!R.current)return;const A={placement:e,strategy:n,middleware:h};M.current&&(A.platform=M.current),hn(P.current,R.current,A).then(L=>{const _={...L,isPositioned:$.current!==!1};O.current&&!xt(D.current,_)&&(D.current=_,Ae(()=>{u(_)}))})},[h,e,n,M,$]);wt(()=>{a===!1&&D.current.isPositioned&&(D.current.isPositioned=!1,u(A=>({...A,isPositioned:!1})))},[a]);const O=J(!1);wt(()=>(O.current=!0,()=>{O.current=!1}),[]),wt(()=>{if(y&&(P.current=y),v&&(R.current=v),y&&v){if(T.current)return T.current(y,v,C);C()}},[y,v,C,T,k]);const H=lt(()=>({reference:P,floating:R,setReference:x,setFloating:b}),[x,b]),S=lt(()=>({reference:y,floating:v}),[y,v]),E=lt(()=>{const A={position:n,left:0,top:0};if(!S.floating)return A;const L=ne(S.floating,f.x),_=ne(S.floating,f.y);return c?{...A,transform:"translate("+L+"px, "+_+"px)",...ee(S.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:L,top:_}},[n,c,S.floating,f.x,f.y]);return lt(()=>({...f,update:C,refs:H,elements:S,floatingStyles:E}),[f,C,H,S,E])}const gn=t=>{function e(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:t,fn(n){const{element:o,padding:i}=typeof t=="function"?t(n):t;return o&&e(o)?o.current!=null?te({element:o.current,padding:i}).fn(n):{}:o?te({element:o,padding:i}).fn(n):{}}}},wn=(t,e)=>({...ln(t),options:[t,e]}),xn=(t,e)=>({...an(t),options:[t,e]}),yn=(t,e)=>({...pn(t),options:[t,e]}),vn=(t,e)=>({...fn(t),options:[t,e]}),bn=(t,e)=>({...un(t),options:[t,e]}),An=(t,e)=>({...dn(t),options:[t,e]}),Pn=(t,e)=>({...gn(t),options:[t,e]});var On="Arrow",oe=at((t,e)=>{const{children:n,width:o=10,height:i=5,...r}=t;return j(vt.svg,{...r,ref:e,width:o,height:i,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:t.asChild?n:j("polygon",{points:"0,0 30,0 15,10"})})});oe.displayName=On;var Rn=oe;function Cn(t){const[e,n]=Y(void 0);return bt(()=>{if(t){n({width:t.offsetWidth,height:t.offsetHeight});const o=new ResizeObserver(i=>{if(!Array.isArray(i)||!i.length)return;const r=i[0];let s,c;if("borderBoxSize"in r){const l=r.borderBoxSize,a=Array.isArray(l)?l[0]:l;s=a.inlineSize,c=a.blockSize}else s=t.offsetWidth,c=t.offsetHeight;n({width:s,height:c})});return o.observe(t,{box:"border-box"}),()=>o.unobserve(t)}else n(void 0)},[t]),e}var kt="Popper",[ie,Sn]=Oe(kt),[En,re]=ie(kt),se=t=>{const{__scopePopper:e,children:n}=t,[o,i]=Y(null);return j(En,{scope:e,anchor:o,onAnchorChange:i,children:n})};se.displayName=kt;var ce="PopperAnchor",le=at((t,e)=>{const{__scopePopper:n,virtualRef:o,...i}=t,r=re(ce,n),s=J(null),c=zt(e,s);return Wt(()=>{r.onAnchorChange(o?.current||s.current)}),o?null:j(vt.div,{...i,ref:c})});le.displayName=ce;var Nt="PopperContent",[Dn,Tn]=ie(Nt),ae=at((t,e)=>{const{__scopePopper:n,side:o="bottom",sideOffset:i=0,align:r="center",alignOffset:s=0,arrowPadding:c=0,avoidCollisions:l=!0,collisionBoundary:a=[],collisionPadding:f=0,sticky:u="partial",hideWhenDetached:h=!1,updatePositionStrategy:d="optimized",onPlaced:p,...m}=t,w=re(Nt,n),[g,x]=Y(null),b=zt(e,ot=>x(ot)),[y,v]=Y(null),P=Cn(y),R=P?.width??0,D=P?.height??0,k=o+(r!=="center"?"-"+r:""),T=typeof f=="number"?f:{top:0,right:0,bottom:0,left:0,...f},M=Array.isArray(a)?a:[a],$=M.length>0,C={padding:T,boundary:M.filter(Mn),altBoundary:$},{refs:O,floatingStyles:H,placement:S,isPositioned:E,middlewareData:A}=mn({strategy:"fixed",placement:k,whileElementsMounted:(...ot)=>cn(...ot,{animationFrame:d==="always"}),elements:{reference:w.anchor},middleware:[wn({mainAxis:i+D,alignmentAxis:s}),l&&xn({mainAxis:!0,crossAxis:!1,limiter:u==="partial"?yn():void 0,...C}),l&&vn({...C}),bn({...C,apply:({elements:ot,rects:Ht,availableWidth:xe,availableHeight:ye})=>{const{width:ve,height:be}=Ht.reference,ct=ot.floating.style;ct.setProperty("--radix-popper-available-width",`${xe}px`),ct.setProperty("--radix-popper-available-height",`${ye}px`),ct.setProperty("--radix-popper-anchor-width",`${ve}px`),ct.setProperty("--radix-popper-anchor-height",`${be}px`)}}),y&&Pn({element:y,padding:c}),$n({arrowWidth:R,arrowHeight:D}),h&&An({strategy:"referenceHidden",...C})]}),[L,_]=de(S),Ft=Re(p);bt(()=>{E&&Ft?.()},[E,Ft]);const pe=A.arrow?.x,he=A.arrow?.y,me=A.arrow?.centerOffset!==0,[ge,we]=Y();return bt(()=>{g&&we(window.getComputedStyle(g).zIndex)},[g]),j("div",{ref:O.setFloating,"data-radix-popper-content-wrapper":"",style:{...H,transform:E?H.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:ge,["--radix-popper-transform-origin"]:[A.transformOrigin?.x,A.transformOrigin?.y].join(" "),...A.hide?.referenceHidden&&{visibility:"hidden",pointerEvents:"none"}},dir:t.dir,children:j(Dn,{scope:n,placedSide:L,onArrowChange:v,arrowX:pe,arrowY:he,shouldHideArrow:me,children:j(vt.div,{"data-side":L,"data-align":_,...m,ref:b,style:{...m.style,animation:E?void 0:"none"}})})})});ae.displayName=Nt;var fe="PopperArrow",Ln={top:"bottom",right:"left",bottom:"top",left:"right"},ue=at(function(e,n){const{__scopePopper:o,...i}=e,r=Tn(fe,o),s=Ln[r.placedSide];return j("span",{ref:r.onArrowChange,style:{position:"absolute",left:r.arrowX,top:r.arrowY,[s]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[r.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[r.placedSide],visibility:r.shouldHideArrow?"hidden":void 0},children:j(Rn,{...i,ref:n,style:{...i.style,display:"block"}})})});ue.displayName=fe;function Mn(t){return t!==null}var $n=t=>({name:"transformOrigin",options:t,fn(e){const{placement:n,rects:o,middlewareData:i}=e,s=i.arrow?.centerOffset!==0,c=s?0:t.arrowWidth,l=s?0:t.arrowHeight,[a,f]=de(n),u={start:"0%",center:"50%",end:"100%"}[f],h=(i.arrow?.x??0)+c/2,d=(i.arrow?.y??0)+l/2;let p="",m="";return a==="bottom"?(p=s?u:`${h}px`,m=`${-l}px`):a==="top"?(p=s?u:`${h}px`,m=`${o.floating.height+l}px`):a==="right"?(p=`${-l}px`,m=s?u:`${d}px`):a==="left"&&(p=`${o.floating.width+l}px`,m=s?u:`${d}px`),{data:{x:p,y:m}}}});function de(t){const[e,n="center"]=t.split("-");return[e,n]}var kn=se,Nn=le,Fn=ae,Hn=ue;export{Nn as A,Fn as C,kn as R,Hn as a,Sn as c};
@@ -0,0 +1 @@
1
+ import{c as o}from"./register-4_mVToaL.js";var a=Boolean(globalThis?.document)?o:()=>{};export{a as u};
@@ -1 +1 @@
1
- import{j as l,u as d}from"./register-Br_7Z6lg.js";import{c as w}from"./index-C1VYu6Pq.js";import{u as y,a as E}from"./index-CmgtAzv5.js";function L(i){const u=i+"CollectionProvider",[N,T]=w(u),[O,a]=N(u,{collectionRef:{current:null},itemMap:new Map}),m=c=>{const{scope:e,children:s}=c,o=l.useRef(null),t=l.useRef(new Map).current;return d(O,{scope:e,itemMap:t,collectionRef:o,children:s})};m.displayName=u;const p=i+"CollectionSlot",C=l.forwardRef((c,e)=>{const{scope:s,children:o}=c,t=a(p,s),n=y(e,t.collectionRef);return d(E,{ref:n,children:o})});C.displayName=p;const R=i+"CollectionItemSlot",S="data-radix-collection-item",M=l.forwardRef((c,e)=>{const{scope:s,children:o,...t}=c,n=l.useRef(null),I=y(e,n),r=a(R,s);return l.useLayoutEffect(()=>(r.itemMap.set(n,{ref:n,...t}),()=>void r.itemMap.delete(n))),d(E,{[S]:"",ref:I,children:o})});M.displayName=R;function _(c){const e=a(i+"CollectionConsumer",c);return l.useCallback(()=>{const o=e.collectionRef.current;if(!o)return[];const t=Array.from(((r,f)=>{const v=r.querySelectorAll("slot"),x=[...r.querySelectorAll(f)];for(const h of v)for(const A of h.assignedElements())x.push(...(A.shadowRoot??A).querySelectorAll(f));return x})(o,`[${S}]`));return Array.from(e.itemMap.values()).sort((r,f)=>t.indexOf(r.ref.current)-t.indexOf(f.ref.current))},[e.collectionRef,e.itemMap])}return[{Provider:m,Slot:C,ItemSlot:M},_,T]}export{L as c};
1
+ import{j as l,u as d}from"./register-4_mVToaL.js";import{c as w}from"./index-g5fgZDhH.js";import{u as y,a as E}from"./index-BRahpty3.js";function L(i){const u=i+"CollectionProvider",[N,T]=w(u),[O,a]=N(u,{collectionRef:{current:null},itemMap:new Map}),m=c=>{const{scope:e,children:s}=c,o=l.useRef(null),t=l.useRef(new Map).current;return d(O,{scope:e,itemMap:t,collectionRef:o,children:s})};m.displayName=u;const p=i+"CollectionSlot",C=l.forwardRef((c,e)=>{const{scope:s,children:o}=c,t=a(p,s),n=y(e,t.collectionRef);return d(E,{ref:n,children:o})});C.displayName=p;const R=i+"CollectionItemSlot",S="data-radix-collection-item",M=l.forwardRef((c,e)=>{const{scope:s,children:o,...t}=c,n=l.useRef(null),I=y(e,n),r=a(R,s);return l.useLayoutEffect(()=>(r.itemMap.set(n,{ref:n,...t}),()=>void r.itemMap.delete(n))),d(E,{[S]:"",ref:I,children:o})});M.displayName=R;function _(c){const e=a(i+"CollectionConsumer",c);return l.useCallback(()=>{const o=e.collectionRef.current;if(!o)return[];const t=Array.from(((r,f)=>{const v=r.querySelectorAll("slot"),x=[...r.querySelectorAll(f)];for(const h of v)for(const A of h.assignedElements())x.push(...(A.shadowRoot??A).querySelectorAll(f));return x})(o,`[${S}]`));return Array.from(e.itemMap.values()).sort((r,f)=>t.indexOf(r.ref.current)-t.indexOf(f.ref.current))},[e.collectionRef,e.itemMap])}return[{Provider:m,Slot:C,ItemSlot:M},_,T]}export{L as c};
@@ -0,0 +1,41 @@
1
+ import{w as j,h as P,A as M,y as C,q as k,u as Se,c as Re,_ as A,s as Ne,I as Ce,b as Q,T as Ae}from"./register-4_mVToaL.js";import{u as Te}from"./index-BRahpty3.js";import{P as Me}from"./index-CkaatyBQ.js";import{u as ee}from"./index-BIypPxZf.js";var Y="focusScope.autoFocusOnMount",X="focusScope.autoFocusOnUnmount",te={bubbles:!1,cancelable:!0},ke="FocusScope",ne=j((e,t)=>{const{loop:r=!1,trapped:n=!1,onMountAutoFocus:a,onUnmountAutoFocus:i,...d}=e,[o,E]=P(null),b=ee(a),y=ee(i),l=M(null),v=Te(t,c=>E(c)),h=M({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;C(()=>{if(n){let c=function(p){if(h.paused||!o)return;const m=p.target;((g,R)=>g.getRootNode()instanceof ShadowRoot?g.getRootNode().host.contains(R):g.contains(R))(o,m)?l.current=p.target.shadowRoot?p.composedPath()[0]:p.target:T(l.current,{select:!0})},s=function(p){if(h.paused||!o)return;const m=p.relatedTarget;m!==null&&(((g,R)=>g.getRootNode()instanceof ShadowRoot?g.getRootNode().host.contains(R):g.contains(R))(o,m)||T(l.current,{select:!0}))},u=function(p){if((()=>{let g=document.activeElement;for(;g?.shadowRoot;)g=g.shadowRoot.activeElement;return g})()===document.body)for(const g of p)g.removedNodes.length>0&&T(o)};const f=o?.getRootNode()??document;f.addEventListener("focusin",c),f.addEventListener("focusout",s);const w=new MutationObserver(u);return o&&w.observe(o,{childList:!0,subtree:!0}),()=>{f.removeEventListener("focusin",c),f.removeEventListener("focusout",s),w.disconnect()}}},[n,o,h.paused]),C(()=>{if(o){ae.add(h);const c=(()=>{let u=document.activeElement;for(;u?.shadowRoot;)u=u.shadowRoot.activeElement;return u})();if(!((u,f)=>u.getRootNode()instanceof ShadowRoot?u.getRootNode().host.contains(f):u.contains(f))(o,c)){const u=new CustomEvent(Y,te);o.addEventListener(Y,b),o.dispatchEvent(u),u.defaultPrevented||(Fe(xe(re(o)),{select:!0}),(()=>{let f=document.activeElement;for(;f?.shadowRoot;)f=f.shadowRoot.activeElement;return f})()===c&&T(o))}return()=>{o.removeEventListener(Y,b),setTimeout(()=>{const u=new CustomEvent(X,te);o.addEventListener(X,y),o.dispatchEvent(u),u.defaultPrevented||T(c??document.body,{select:!0}),o.removeEventListener(X,y),ae.remove(h)},0)}}},[o,b,y,h]);const S=k(c=>{if(!r&&!n||h.paused)return;const s=c.key==="Tab"&&!c.altKey&&!c.ctrlKey&&!c.metaKey,u=(()=>{let f=document.activeElement;for(;f?.shadowRoot;)f=f.shadowRoot.activeElement;return f})();if(s&&u){const f=c.currentTarget,[w,p]=Oe(f);w&&p?!c.shiftKey&&u===p?(c.preventDefault(),r&&T(w,{select:!0})):c.shiftKey&&u===w&&(c.preventDefault(),r&&T(p,{select:!0})):u===f&&c.preventDefault()}},[r,n,h.paused]);return Se(Me.div,{tabIndex:-1,...d,ref:v,onKeyDown:S})});ne.displayName=ke;function Fe(e,{select:t=!1}={}){const r=(()=>{let n=document.activeElement;for(;n?.shadowRoot;)n=n.shadowRoot.activeElement;return n})();for(const n of e)if(T(n,{select:t}),(()=>{let a=document.activeElement;for(;a?.shadowRoot;)a=a.shadowRoot.activeElement;return a})()!==r)return}function Oe(e){const t=re(e),r=oe(t,e),n=oe(t.reverse(),e);return[r,n]}function re(e){const t=[],r=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:n=>{const a=n.tagName==="INPUT"&&n.type==="hidden";return n.disabled||n.hidden||a?NodeFilter.FILTER_SKIP:n.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;r.nextNode();)t.push(r.currentNode);return t}function oe(e,t){for(const r of e)if(!_e(r,{upTo:t}))return r}function _e(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function Le(e){return e instanceof HTMLInputElement&&"select"in e}function T(e,{select:t=!1}={}){if(e&&e.focus){const r=(()=>{let n=document.activeElement;for(;n?.shadowRoot;)n=n.shadowRoot.activeElement;return n})();e.focus({preventScroll:!0}),e!==r&&Le(e)&&t&&e.select()}}var ae=Pe();function Pe(){let e=[];return{add(t){const r=e[0];t!==r&&r?.pause(),e=ce(e,t),e.unshift(t)},remove(t){e=ce(e,t),e[0]?.resume()}}}function ce(e,t){const r=[...e],n=r.indexOf(t);return n!==-1&&r.splice(n,1),r}function xe(e){return e.filter(t=>t.tagName!=="A")}var H=0;function Ie(){C(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??ie()),document.body.insertAdjacentElement("beforeend",e[1]??ie()),H++,()=>{H===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),H--}},[])}function ie(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var N=function(){return N=Object.assign||function(t){for(var r,n=1,a=arguments.length;n<a;n++){r=arguments[n];for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(t[i]=r[i])}return t},N.apply(this,arguments)};function ue(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var a=0,n=Object.getOwnPropertySymbols(e);a<n.length;a++)t.indexOf(n[a])<0&&Object.prototype.propertyIsEnumerable.call(e,n[a])&&(r[n[a]]=e[n[a]]);return r}function We(e,t,r){if(r||arguments.length===2)for(var n=0,a=t.length,i;n<a;n++)(i||!(n in t))&&(i||(i=Array.prototype.slice.call(t,0,n)),i[n]=t[n]);return e.concat(i||Array.prototype.slice.call(t))}typeof SuppressedError=="function"&&SuppressedError;var I="right-scroll-bar-position",W="width-before-scroll-bar",$e="with-scroll-bars-hidden",Be="--removed-body-scroll-bar-size";function q(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function Ue(e,t){var r=P(function(){return{value:e,callback:t,facade:{get current(){return r.value},set current(n){var a=r.value;a!==n&&(r.value=n,r.callback(n,a))}}}})[0];return r.callback=t,r.facade}var De=typeof window<"u"?Re:C,se=new WeakMap;function Ke(e,t){var r=Ue(null,function(n){return e.forEach(function(a){return q(a,n)})});return De(function(){var n=se.get(r);if(n){var a=new Set(n),i=new Set(e),d=r.current;a.forEach(function(o){i.has(o)||q(o,null)}),i.forEach(function(o){a.has(o)||q(o,d)})}se.set(r,e)},[e]),r}function je(e){return e}function Ye(e,t){t===void 0&&(t=je);var r=[],n=!1,a={read:function(){if(n)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return r.length?r[r.length-1]:e},useMedium:function(i){var d=t(i,n);return r.push(d),function(){r=r.filter(function(o){return o!==d})}},assignSyncMedium:function(i){for(n=!0;r.length;){var d=r;r=[],d.forEach(i)}r={push:function(o){return i(o)},filter:function(){return r}}},assignMedium:function(i){n=!0;var d=[];if(r.length){var o=r;r=[],o.forEach(i),d=r}var E=function(){var y=d;d=[],y.forEach(i)},b=function(){return Promise.resolve().then(E)};b(),r={push:function(y){d.push(y),b()},filter:function(y){return d=d.filter(y),r}}}};return a}function Xe(e){e===void 0&&(e={});var t=Ye(null);return t.options=N({async:!0,ssr:!1},e),t}var le=function(e){var t=e.sideCar,r=ue(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var n=t.read();if(!n)throw new Error("Sidecar medium not found");return A(n,N({},r))};le.isSideCarExport=!0;function He(e,t){return e.useMedium(t),le}var de=Xe(),z=function(){},$=j(function(e,t){var r=M(null),n=P({onScrollCapture:z,onWheelCapture:z,onTouchMoveCapture:z}),a=n[0],i=n[1],d=e.forwardProps,o=e.children,E=e.className,b=e.removeScrollBar,y=e.enabled,l=e.shards,v=e.sideCar,h=e.noIsolation,S=e.inert,c=e.allowPinchZoom,s=e.as,u=s===void 0?"div":s,f=e.gapMode,w=ue(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as","gapMode"]),p=v,m=Ke([r,t]),g=N(N({},w),a);return A(Q,null,y&&A(p,{sideCar:de,removeScrollBar:b,shards:l,noIsolation:h,inert:S,setCallbacks:i,allowPinchZoom:!!c,lockRef:r,gapMode:f}),d?Ne(Ce.only(o),N(N({},g),{ref:m})):A(u,N({},g,{className:E,ref:m}),o))});$.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},$.classNames={fullWidth:W,zeroRight:I};var qe=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function ze(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=qe();return t&&e.setAttribute("nonce",t),e}function Ge(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function Ve(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var Ze=function(){var e=0,t=null;return{add:function(r){e==0&&(t=ze())&&(Ge(t,r),Ve(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},Je=function(){var e=Ze();return function(t,r){C(function(){return e.add(t),function(){e.remove()}},[t&&r])}},fe=function(){var e=Je(),t=function(r){var n=r.styles,a=r.dynamic;return e(n,a),null};return t},Qe={left:0,top:0,right:0,gap:0},G=function(e){return parseInt(e||"",10)||0},et=function(e){var t=window.getComputedStyle(document.body),r=t[e==="padding"?"paddingLeft":"marginLeft"],n=t[e==="padding"?"paddingTop":"marginTop"],a=t[e==="padding"?"paddingRight":"marginRight"];return[G(r),G(n),G(a)]},tt=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return Qe;var t=et(e),r=document.documentElement.clientWidth,n=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,n-r+t[2]-t[0])}},nt=fe(),F="data-scroll-locked",rt=function(e,t,r,n){var a=e.left,i=e.top,d=e.right,o=e.gap;return r===void 0&&(r="margin"),`
2
+ .`.concat($e,` {
3
+ overflow: hidden `).concat(n,`;
4
+ padding-right: `).concat(o,"px ").concat(n,`;
5
+ }
6
+ body[`).concat(F,`] {
7
+ overflow: hidden `).concat(n,`;
8
+ overscroll-behavior: contain;
9
+ `).concat([t&&"position: relative ".concat(n,";"),r==="margin"&&`
10
+ padding-left: `.concat(a,`px;
11
+ padding-top: `).concat(i,`px;
12
+ padding-right: `).concat(d,`px;
13
+ margin-left:0;
14
+ margin-top:0;
15
+ margin-right: `).concat(o,"px ").concat(n,`;
16
+ `),r==="padding"&&"padding-right: ".concat(o,"px ").concat(n,";")].filter(Boolean).join(""),`
17
+ }
18
+
19
+ .`).concat(I,` {
20
+ right: `).concat(o,"px ").concat(n,`;
21
+ }
22
+
23
+ .`).concat(W,` {
24
+ margin-right: `).concat(o,"px ").concat(n,`;
25
+ }
26
+
27
+ .`).concat(I," .").concat(I,` {
28
+ right: 0 `).concat(n,`;
29
+ }
30
+
31
+ .`).concat(W," .").concat(W,` {
32
+ margin-right: 0 `).concat(n,`;
33
+ }
34
+
35
+ body[`).concat(F,`] {
36
+ `).concat(Be,": ").concat(o,`px;
37
+ }
38
+ `)},ve=function(){var e=parseInt(document.body.getAttribute(F)||"0",10);return isFinite(e)?e:0},ot=function(){C(function(){return document.body.setAttribute(F,(ve()+1).toString()),function(){var e=ve()-1;e<=0?document.body.removeAttribute(F):document.body.setAttribute(F,e.toString())}},[])},at=function(e){var t=e.noRelative,r=e.noImportant,n=e.gapMode,a=n===void 0?"margin":n;ot();var i=Ae(function(){return tt(a)},[a]);return A(nt,{styles:rt(i,!t,a,r?"":"!important")})},V=!1;if(typeof window<"u")try{var B=Object.defineProperty({},"passive",{get:function(){return V=!0,!0}});window.addEventListener("test",B,B),window.removeEventListener("test",B,B)}catch{V=!1}var O=V?{passive:!1}:!1,ct=function(e){return e.tagName==="TEXTAREA"},he=function(e,t){if(!(e instanceof Element))return!1;var r=window.getComputedStyle(e);return r[t]!=="hidden"&&!(r.overflowY===r.overflowX&&!ct(e)&&r[t]==="visible")},it=function(e){return he(e,"overflowY")},ut=function(e){return he(e,"overflowX")},pe=function(e,t){var r=t.ownerDocument,n=t;do{typeof ShadowRoot<"u"&&n instanceof ShadowRoot&&(n=n.host);var a=me(e,n);if(a){var i=ge(e,n),d=i[1],o=i[2];if(d>o)return!0}n=n.parentNode}while(n&&n!==r.body);return!1},st=function(e){var t=e.scrollTop,r=e.scrollHeight,n=e.clientHeight;return[t,r,n]},lt=function(e){var t=e.scrollLeft,r=e.scrollWidth,n=e.clientWidth;return[t,r,n]},me=function(e,t){return e==="v"?it(t):ut(t)},ge=function(e,t){return e==="v"?st(t):lt(t)},dt=function(e,t){return e==="h"&&t==="rtl"?-1:1},ft=function(e,t,r,n,a){var i=dt(e,window.getComputedStyle(t).direction),d=i*n,o=r.target,E=t.contains(o),b=!1,y=d>0,l=0,v=0;do{var h=ge(e,o),S=h[0],c=h[1],s=h[2],u=c-s-i*S;(S||u)&&me(e,o)&&(l+=u,v+=S),o instanceof ShadowRoot?o=o.host:o=o.parentNode}while(!E&&o!==document.body||E&&(t.contains(o)||t===o));return(y&&(Math.abs(l)<1||!a)||!y&&(Math.abs(v)<1||!a))&&(b=!0),b},U=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},ye=function(e){return[e.deltaX,e.deltaY]},we=function(e){return e&&"current"in e?e.current:e},vt=function(e,t){return e[0]===t[0]&&e[1]===t[1]},ht=function(e){return`
39
+ .block-interactivity-`.concat(e,` {pointer-events: none;}
40
+ .allow-interactivity-`).concat(e,` {pointer-events: all;}
41
+ `)},pt=0,_=[];function mt(e){var t=M([]),r=M([0,0]),n=M(),a=P(pt++)[0],i=P(fe)[0],d=M(e);C(function(){d.current=e},[e]),C(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(a));var c=We([e.lockRef.current],(e.shards||[]).map(we),!0).filter(Boolean);return c.forEach(function(s){return s.classList.add("allow-interactivity-".concat(a))}),function(){document.body.classList.remove("block-interactivity-".concat(a)),c.forEach(function(s){return s.classList.remove("allow-interactivity-".concat(a))})}}},[e.inert,e.lockRef.current,e.shards]);var o=k(function(c,s){if("touches"in c&&c.touches.length===2||c.type==="wheel"&&c.ctrlKey)return!d.current.allowPinchZoom;var u=U(c),f=r.current,w="deltaX"in c?c.deltaX:f[0]-u[0],p="deltaY"in c?c.deltaY:f[1]-u[1],m,g=c.target,R=Math.abs(w)>Math.abs(p)?"h":"v";if("touches"in c&&R==="h"&&g.type==="range")return!1;var x=pe(R,g);if(!x)return!0;if(x?m=R:(m=R==="v"?"h":"v",x=pe(R,g)),!x)return!1;if(!n.current&&"changedTouches"in c&&(w||p)&&(n.current=m),!m)return!0;var J=n.current||m;return ft(J,s,c,J==="h"?w:p,!0)},[]),E=k(function(c){var s=c;if(!(!_.length||_[_.length-1]!==i)){var u="deltaY"in s?ye(s):U(s),f=t.current.filter(function(m){return m.name===s.type&&(m.target===s.target||s.target===m.shadowParent)&&vt(m.delta,u)})[0];if(f&&f.should){s.cancelable&&s.preventDefault();return}if(!f){var w=(d.current.shards||[]).map(we).filter(Boolean).filter(function(m){return m.contains(s.target)}),p=w.length>0?o(s,w[0]):!d.current.noIsolation;p&&s.cancelable&&s.preventDefault()}}},[]),b=k(function(c,s,u,f){var w={name:c,delta:s,target:u,should:f,shadowParent:gt(u)};t.current.push(w),setTimeout(function(){t.current=t.current.filter(function(p){return p!==w})},1)},[]),y=k(function(c){r.current=U(c),n.current=void 0},[]),l=k(function(c){b(c.type,ye(c),c.target,o(c,e.lockRef.current))},[]),v=k(function(c){b(c.type,U(c),c.target,o(c,e.lockRef.current))},[]);C(function(){return _.push(i),e.setCallbacks({onScrollCapture:l,onWheelCapture:l,onTouchMoveCapture:v}),document.addEventListener("wheel",E,O),document.addEventListener("touchmove",E,O),document.addEventListener("touchstart",y,O),function(){_=_.filter(function(c){return c!==i}),document.removeEventListener("wheel",E,O),document.removeEventListener("touchmove",E,O),document.removeEventListener("touchstart",y,O)}},[]);var h=e.removeScrollBar,S=e.inert;return A(Q,null,S?A(i,{styles:ht(a)}):null,h?A(at,{gapMode:e.gapMode}):null)}function gt(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}var yt=He(de,mt),be=j(function(e,t){return A($,N({},e,{ref:t,sideCar:yt}))});be.classNames=$.classNames;var wt=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},L=new WeakMap,D=new WeakMap,K={},Z=0,Ee=function(e){return e&&(e.host||Ee(e.parentNode))},bt=function(e,t){return t.map(function(r){if(((a,i)=>{for(;i.getRootNode()instanceof ShadowRoot;)i=i.getRootNode().host;return a.contains(i)})(e,r))return r;var n=Ee(r);return n&&((a,i)=>{for(;i.getRootNode()instanceof ShadowRoot;)i=i.getRootNode().host;return a.contains(i)})(e,n)?n:(console.error("aria-hidden",r,"in not contained inside",e,". Doing nothing"),null)}).filter(function(r){return Boolean(r)})},Et=function(e,t,r,n){var a=bt(t,Array.isArray(e)?e:[e]);K[r]||(K[r]=new WeakMap);var i=K[r],d=[],o=new Set,E=new Set(a),b=function(l){if(!(!l||o.has(l))){if(o.add(l),l.parentNode instanceof ShadowRoot)for(const v of l.parentNode.querySelectorAll("slot"))for(const h of v.assignedElements())o.add(h);b(l.parentNode instanceof ShadowRoot?l.parentNode.host:l.parentNode)}};a.forEach(b);var y=function(l){!l||E.has(l)||Array.prototype.forEach.call(l.children,function(v){if(o.has(v))y(v);else try{var h=v.getAttribute(n),S=h!==null&&h!=="false",c=(L.get(v)||0)+1,s=(i.get(v)||0)+1;L.set(v,c),i.set(v,s),d.push(v),c===1&&S&&D.set(v,!0),s===1&&v.setAttribute(r,"true"),S||v.setAttribute(n,"true")}catch(u){console.error("aria-hidden: cannot operate on ",v,u)}})};return y(t),o.clear(),Z++,function(){d.forEach(function(l){var v=L.get(l)-1,h=i.get(l)-1;L.set(l,v),i.set(l,h),v||(D.has(l)||l.removeAttribute(n),D.delete(l)),h||l.removeAttribute(r)}),Z--,Z||(L=new WeakMap,L=new WeakMap,D=new WeakMap,K={})}},St=function(e,t,r){r===void 0&&(r="data-aria-hidden");var n=Array.from(Array.isArray(e)?e:[e]),a=t||wt(e);return a?(n.push.apply(n,Array.from(a.querySelectorAll("[aria-live]"))),Et(n,a,r,"aria-hidden")):function(){return null}};export{ne as F,St as h,be as o,Ie as u};
@@ -1 +1 @@
1
- import{w as A,A as C,q as y,y as P,u as c,h as M,T as Q}from"./register-Br_7Z6lg.js";import{c as w}from"./index-CBrz5xtv.js";import{u as B,S as Z}from"./index-CmgtAzv5.js";import{a as ee}from"./index-DPt6FkCx.js";import{D as te,P as oe}from"./index-Dtq-yzv0.js";import{u as re}from"./index-1oKFsttO.js";import{c as j,A as ne,C as se,a as ie,R as ae}from"./index-NbhHgWKT.js";import{P as q}from"./index-CjdYl0jf.js";import{P as le}from"./index-BChC9S1G.js";import{u as ce}from"./index-Dw41znKI.js";import{R as ue}from"./index-wYPNGSjj.js";var[R,qe]=ee("Tooltip",[j]),L=j(),U="TooltipProvider",pe=700,H="tooltip.open",[de,N]=R(U),V=t=>{const{__scopeTooltip:o,delayDuration:e=pe,skipDelayDuration:r=300,disableHoverableContent:n=!1,children:i}=t,[a,d]=M(!0),s=C(!1),u=C(0);return P(()=>{const l=u.current;return()=>window.clearTimeout(l)},[]),c(de,{scope:o,isOpenDelayed:a,delayDuration:e,onOpen:y(()=>{window.clearTimeout(u.current),d(!1)},[]),onClose:y(()=>{window.clearTimeout(u.current),u.current=window.setTimeout(()=>d(!0),r)},[r]),isPointerInTransitRef:s,onPointerInTransitChange:y(l=>{s.current=l},[]),disableHoverableContent:n,children:i})};V.displayName=U;var I="Tooltip",[ve,D]=R(I),Y=t=>{const{__scopeTooltip:o,children:e,open:r,defaultOpen:n=!1,onOpenChange:i,disableHoverableContent:a,delayDuration:d}=t,s=N(I,t.__scopeTooltip),u=L(o),[l,p]=M(null),f=re(),T=C(0),v=a??s.disableHoverableContent,m=d??s.delayDuration,h=C(!1),[x=!1,g]=ce({prop:r,defaultProp:n,onChange:F=>{F?(s.onOpen(),document.dispatchEvent(new CustomEvent(H))):s.onClose(),i?.(F)}}),E=Q(()=>x?h.current?"delayed-open":"instant-open":"closed",[x]),_=y(()=>{window.clearTimeout(T.current),h.current=!1,g(!0)},[g]),O=y(()=>{window.clearTimeout(T.current),g(!1)},[g]),G=y(()=>{window.clearTimeout(T.current),T.current=window.setTimeout(()=>{h.current=!0,g(!0)},m)},[m,g]);return P(()=>()=>window.clearTimeout(T.current),[]),c(ae,{...u,children:c(ve,{scope:o,contentId:f,open:x,stateAttribute:E,trigger:l,onTriggerChange:p,onTriggerEnter:y(()=>{s.isOpenDelayed?G():_()},[s.isOpenDelayed,G,_]),onTriggerLeave:y(()=>{v?O():window.clearTimeout(T.current)},[O,v]),onOpen:_,onClose:O,disableHoverableContent:v,children:e})})};Y.displayName=I;var S="TooltipTrigger",X=A((t,o)=>{const{__scopeTooltip:e,...r}=t,n=D(S,e),i=N(S,e),a=L(e),d=C(null),s=B(o,d,n.onTriggerChange),u=C(!1),l=C(!1),p=y(()=>u.current=!1,[]);return P(()=>()=>document.removeEventListener("pointerup",p),[p]),c(ne,{asChild:!0,...a,children:c(le.button,{"aria-describedby":n.open?n.contentId:void 0,"data-state":n.stateAttribute,...r,ref:s,onPointerMove:w(t.onPointerMove,f=>{f.pointerType!=="touch"&&!l.current&&!i.isPointerInTransitRef.current&&(n.onTriggerEnter(),l.current=!0)}),onPointerLeave:w(t.onPointerLeave,()=>{n.onTriggerLeave(),l.current=!1}),onPointerDown:w(t.onPointerDown,()=>{u.current=!0,document.addEventListener("pointerup",p,{once:!0})}),onFocus:w(t.onFocus,()=>{u.current||n.onOpen()}),onBlur:w(t.onBlur,n.onClose),onClick:w(t.onClick,n.onClose)})})});X.displayName=S;var k="TooltipPortal",[fe,he]=R(k,{forceMount:void 0}),K=t=>{const{__scopeTooltip:o,forceMount:e,children:r,container:n}=t,i=D(k,o);return c(fe,{scope:o,forceMount:e,children:c(q,{present:e||i.open,children:c(oe,{asChild:!0,container:n,children:r})})})};K.displayName=k;var b="TooltipContent",W=A((t,o)=>{const e=he(b,t.__scopeTooltip),{forceMount:r=e.forceMount,side:n="top",...i}=t,a=D(b,t.__scopeTooltip);return c(q,{present:r||a.open,children:a.disableHoverableContent?c($,{side:n,...i,ref:o}):c(Te,{side:n,...i,ref:o})})}),Te=A((t,o)=>{const e=D(b,t.__scopeTooltip),r=N(b,t.__scopeTooltip),n=C(null),i=B(o,n),[a,d]=M(null),{trigger:s,onClose:u}=e,l=n.current,{onPointerInTransitChange:p}=r,f=y(()=>{d(null),p(!1)},[p]),T=y((v,m)=>{const h=v.currentTarget,x={x:v.clientX,y:v.clientY},g=ge(x,h.getBoundingClientRect()),E=xe(x,g),_=Ce(m.getBoundingClientRect()),O=we([...E,..._]);d(O),p(!0)},[p]);return P(()=>()=>f(),[f]),P(()=>{if(s&&l){const v=h=>T(h,l),m=h=>T(h,s);return s.addEventListener("pointerleave",v),l.addEventListener("pointerleave",m),()=>{s.removeEventListener("pointerleave",v),l.removeEventListener("pointerleave",m)}}},[s,l,T,f]),P(()=>{if(a){const v=m=>{const h=m.target,x={x:m.clientX,y:m.clientY},g=s?.contains(h)||l?.contains(h),E=!Pe(x,a);g?f():E&&(f(),u())};return document.addEventListener("pointermove",v),()=>document.removeEventListener("pointermove",v)}},[s,l,a,u,f]),c($,{...t,ref:i})}),[me,ye]=R(I,{isInside:!1}),$=A((t,o)=>{const{__scopeTooltip:e,children:r,"aria-label":n,onEscapeKeyDown:i,onPointerDownOutside:a,...d}=t,s=D(b,e),u=L(e),{onClose:l}=s;return P(()=>(document.addEventListener(H,l),()=>document.removeEventListener(H,l)),[l]),P(()=>{if(s.trigger){const p=f=>{f.target?.contains(s.trigger)&&l()};return window.addEventListener("scroll",p,{capture:!0}),()=>window.removeEventListener("scroll",p,{capture:!0})}},[s.trigger,l]),c(te,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:i,onPointerDownOutside:a,onFocusOutside:p=>p.preventDefault(),onDismiss:l,children:c(se,{"data-state":s.stateAttribute,...u,...d,ref:o,style:{...d.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[c(Z,{children:r}),c(me,{scope:e,isInside:!0,children:c(ue,{id:s.contentId,role:"tooltip",children:n||r})})]})})});W.displayName=b;var z="TooltipArrow",J=A((t,o)=>{const{__scopeTooltip:e,...r}=t,n=L(e);return ye(z,e).isInside?null:c(ie,{...n,...r,ref:o})});J.displayName=z;function ge(t,o){const e=Math.abs(o.top-t.y),r=Math.abs(o.bottom-t.y),n=Math.abs(o.right-t.x),i=Math.abs(o.left-t.x);switch(Math.min(e,r,n,i)){case i:return"left";case n:return"right";case e:return"top";case r:return"bottom";default:throw new Error("unreachable")}}function xe(t,o,e=5){const r=[];switch(o){case"top":r.push({x:t.x-e,y:t.y+e},{x:t.x+e,y:t.y+e});break;case"bottom":r.push({x:t.x-e,y:t.y-e},{x:t.x+e,y:t.y-e});break;case"left":r.push({x:t.x+e,y:t.y-e},{x:t.x+e,y:t.y+e});break;case"right":r.push({x:t.x-e,y:t.y-e},{x:t.x-e,y:t.y+e});break}return r}function Ce(t){const{top:o,right:e,bottom:r,left:n}=t;return[{x:n,y:o},{x:e,y:o},{x:e,y:r},{x:n,y:r}]}function Pe(t,o){const{x:e,y:r}=t;let n=!1;for(let i=0,a=o.length-1;i<o.length;a=i++){const d=o[i].x,s=o[i].y,u=o[a].x,l=o[a].y;s>r!=l>r&&e<(u-d)*(r-s)/(l-s)+d&&(n=!n)}return n}function we(t){const o=t.slice();return o.sort((e,r)=>e.x<r.x?-1:e.x>r.x?1:e.y<r.y?-1:e.y>r.y?1:0),be(o)}function be(t){if(t.length<=1)return t.slice();const o=[];for(let r=0;r<t.length;r++){const n=t[r];for(;o.length>=2;){const i=o[o.length-1],a=o[o.length-2];if((i.x-a.x)*(n.y-a.y)>=(i.y-a.y)*(n.x-a.x))o.pop();else break}o.push(n)}o.pop();const e=[];for(let r=t.length-1;r>=0;r--){const n=t[r];for(;e.length>=2;){const i=e[e.length-1],a=e[e.length-2];if((i.x-a.x)*(n.y-a.y)>=(i.y-a.y)*(n.x-a.x))e.pop();else break}e.push(n)}return e.pop(),o.length===1&&e.length===1&&o[0].x===e[0].x&&o[0].y===e[0].y?o:o.concat(e)}var Ee=V,_e=Y,Oe=X,Ae=K,De=W,Re=J;export{Re as A,De as C,Ee as P,_e as R,Oe as T,Ae as a};
1
+ import{w as A,A as C,q as y,y as P,u as c,h as M,T as Q}from"./register-4_mVToaL.js";import{c as w}from"./index-CBrz5xtv.js";import{u as B,S as Z}from"./index-BRahpty3.js";import{a as ee}from"./index-CtGMni3E.js";import{D as te,P as oe}from"./index-CjM__Gq4.js";import{u as re}from"./index-B0XzXBUp.js";import{c as j,A as ne,C as se,a as ie,R as ae}from"./index-DMAVUQds.js";import{P as q}from"./index-CFZwxXrg.js";import{P as le}from"./index-CkaatyBQ.js";import{u as ce}from"./index-CRJg9er0.js";import{R as ue}from"./index-BScxBT_T.js";var[R,qe]=ee("Tooltip",[j]),L=j(),U="TooltipProvider",pe=700,H="tooltip.open",[de,N]=R(U),V=t=>{const{__scopeTooltip:o,delayDuration:e=pe,skipDelayDuration:r=300,disableHoverableContent:n=!1,children:i}=t,[a,d]=M(!0),s=C(!1),u=C(0);return P(()=>{const l=u.current;return()=>window.clearTimeout(l)},[]),c(de,{scope:o,isOpenDelayed:a,delayDuration:e,onOpen:y(()=>{window.clearTimeout(u.current),d(!1)},[]),onClose:y(()=>{window.clearTimeout(u.current),u.current=window.setTimeout(()=>d(!0),r)},[r]),isPointerInTransitRef:s,onPointerInTransitChange:y(l=>{s.current=l},[]),disableHoverableContent:n,children:i})};V.displayName=U;var I="Tooltip",[ve,D]=R(I),Y=t=>{const{__scopeTooltip:o,children:e,open:r,defaultOpen:n=!1,onOpenChange:i,disableHoverableContent:a,delayDuration:d}=t,s=N(I,t.__scopeTooltip),u=L(o),[l,p]=M(null),f=re(),T=C(0),v=a??s.disableHoverableContent,m=d??s.delayDuration,h=C(!1),[x=!1,g]=ce({prop:r,defaultProp:n,onChange:F=>{F?(s.onOpen(),document.dispatchEvent(new CustomEvent(H))):s.onClose(),i?.(F)}}),E=Q(()=>x?h.current?"delayed-open":"instant-open":"closed",[x]),_=y(()=>{window.clearTimeout(T.current),h.current=!1,g(!0)},[g]),O=y(()=>{window.clearTimeout(T.current),g(!1)},[g]),G=y(()=>{window.clearTimeout(T.current),T.current=window.setTimeout(()=>{h.current=!0,g(!0)},m)},[m,g]);return P(()=>()=>window.clearTimeout(T.current),[]),c(ae,{...u,children:c(ve,{scope:o,contentId:f,open:x,stateAttribute:E,trigger:l,onTriggerChange:p,onTriggerEnter:y(()=>{s.isOpenDelayed?G():_()},[s.isOpenDelayed,G,_]),onTriggerLeave:y(()=>{v?O():window.clearTimeout(T.current)},[O,v]),onOpen:_,onClose:O,disableHoverableContent:v,children:e})})};Y.displayName=I;var S="TooltipTrigger",X=A((t,o)=>{const{__scopeTooltip:e,...r}=t,n=D(S,e),i=N(S,e),a=L(e),d=C(null),s=B(o,d,n.onTriggerChange),u=C(!1),l=C(!1),p=y(()=>u.current=!1,[]);return P(()=>()=>document.removeEventListener("pointerup",p),[p]),c(ne,{asChild:!0,...a,children:c(le.button,{"aria-describedby":n.open?n.contentId:void 0,"data-state":n.stateAttribute,...r,ref:s,onPointerMove:w(t.onPointerMove,f=>{f.pointerType!=="touch"&&!l.current&&!i.isPointerInTransitRef.current&&(n.onTriggerEnter(),l.current=!0)}),onPointerLeave:w(t.onPointerLeave,()=>{n.onTriggerLeave(),l.current=!1}),onPointerDown:w(t.onPointerDown,()=>{u.current=!0,document.addEventListener("pointerup",p,{once:!0})}),onFocus:w(t.onFocus,()=>{u.current||n.onOpen()}),onBlur:w(t.onBlur,n.onClose),onClick:w(t.onClick,n.onClose)})})});X.displayName=S;var k="TooltipPortal",[fe,he]=R(k,{forceMount:void 0}),K=t=>{const{__scopeTooltip:o,forceMount:e,children:r,container:n}=t,i=D(k,o);return c(fe,{scope:o,forceMount:e,children:c(q,{present:e||i.open,children:c(oe,{asChild:!0,container:n,children:r})})})};K.displayName=k;var b="TooltipContent",W=A((t,o)=>{const e=he(b,t.__scopeTooltip),{forceMount:r=e.forceMount,side:n="top",...i}=t,a=D(b,t.__scopeTooltip);return c(q,{present:r||a.open,children:a.disableHoverableContent?c($,{side:n,...i,ref:o}):c(Te,{side:n,...i,ref:o})})}),Te=A((t,o)=>{const e=D(b,t.__scopeTooltip),r=N(b,t.__scopeTooltip),n=C(null),i=B(o,n),[a,d]=M(null),{trigger:s,onClose:u}=e,l=n.current,{onPointerInTransitChange:p}=r,f=y(()=>{d(null),p(!1)},[p]),T=y((v,m)=>{const h=v.currentTarget,x={x:v.clientX,y:v.clientY},g=ge(x,h.getBoundingClientRect()),E=xe(x,g),_=Ce(m.getBoundingClientRect()),O=we([...E,..._]);d(O),p(!0)},[p]);return P(()=>()=>f(),[f]),P(()=>{if(s&&l){const v=h=>T(h,l),m=h=>T(h,s);return s.addEventListener("pointerleave",v),l.addEventListener("pointerleave",m),()=>{s.removeEventListener("pointerleave",v),l.removeEventListener("pointerleave",m)}}},[s,l,T,f]),P(()=>{if(a){const v=m=>{const h=m.target,x={x:m.clientX,y:m.clientY},g=s?.contains(h)||l?.contains(h),E=!Pe(x,a);g?f():E&&(f(),u())};return document.addEventListener("pointermove",v),()=>document.removeEventListener("pointermove",v)}},[s,l,a,u,f]),c($,{...t,ref:i})}),[me,ye]=R(I,{isInside:!1}),$=A((t,o)=>{const{__scopeTooltip:e,children:r,"aria-label":n,onEscapeKeyDown:i,onPointerDownOutside:a,...d}=t,s=D(b,e),u=L(e),{onClose:l}=s;return P(()=>(document.addEventListener(H,l),()=>document.removeEventListener(H,l)),[l]),P(()=>{if(s.trigger){const p=f=>{f.target?.contains(s.trigger)&&l()};return window.addEventListener("scroll",p,{capture:!0}),()=>window.removeEventListener("scroll",p,{capture:!0})}},[s.trigger,l]),c(te,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:i,onPointerDownOutside:a,onFocusOutside:p=>p.preventDefault(),onDismiss:l,children:c(se,{"data-state":s.stateAttribute,...u,...d,ref:o,style:{...d.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[c(Z,{children:r}),c(me,{scope:e,isInside:!0,children:c(ue,{id:s.contentId,role:"tooltip",children:n||r})})]})})});W.displayName=b;var z="TooltipArrow",J=A((t,o)=>{const{__scopeTooltip:e,...r}=t,n=L(e);return ye(z,e).isInside?null:c(ie,{...n,...r,ref:o})});J.displayName=z;function ge(t,o){const e=Math.abs(o.top-t.y),r=Math.abs(o.bottom-t.y),n=Math.abs(o.right-t.x),i=Math.abs(o.left-t.x);switch(Math.min(e,r,n,i)){case i:return"left";case n:return"right";case e:return"top";case r:return"bottom";default:throw new Error("unreachable")}}function xe(t,o,e=5){const r=[];switch(o){case"top":r.push({x:t.x-e,y:t.y+e},{x:t.x+e,y:t.y+e});break;case"bottom":r.push({x:t.x-e,y:t.y-e},{x:t.x+e,y:t.y-e});break;case"left":r.push({x:t.x+e,y:t.y-e},{x:t.x+e,y:t.y+e});break;case"right":r.push({x:t.x-e,y:t.y-e},{x:t.x-e,y:t.y+e});break}return r}function Ce(t){const{top:o,right:e,bottom:r,left:n}=t;return[{x:n,y:o},{x:e,y:o},{x:e,y:r},{x:n,y:r}]}function Pe(t,o){const{x:e,y:r}=t;let n=!1;for(let i=0,a=o.length-1;i<o.length;a=i++){const d=o[i].x,s=o[i].y,u=o[a].x,l=o[a].y;s>r!=l>r&&e<(u-d)*(r-s)/(l-s)+d&&(n=!n)}return n}function we(t){const o=t.slice();return o.sort((e,r)=>e.x<r.x?-1:e.x>r.x?1:e.y<r.y?-1:e.y>r.y?1:0),be(o)}function be(t){if(t.length<=1)return t.slice();const o=[];for(let r=0;r<t.length;r++){const n=t[r];for(;o.length>=2;){const i=o[o.length-1],a=o[o.length-2];if((i.x-a.x)*(n.y-a.y)>=(i.y-a.y)*(n.x-a.x))o.pop();else break}o.push(n)}o.pop();const e=[];for(let r=t.length-1;r>=0;r--){const n=t[r];for(;e.length>=2;){const i=e[e.length-1],a=e[e.length-2];if((i.x-a.x)*(n.y-a.y)>=(i.y-a.y)*(n.x-a.x))e.pop();else break}e.push(n)}return e.pop(),o.length===1&&e.length===1&&o[0].x===e[0].x&&o[0].y===e[0].y?o:o.concat(e)}var Ee=V,_e=Y,Oe=X,Ae=K,De=W,Re=J;export{Re as A,De as C,Ee as P,_e as R,Oe as T,Ae as a};
@@ -1 +1 @@
1
- import{w as n,u as f}from"./register-Br_7Z6lg.js";import{c as m}from"./index-CBrz5xtv.js";import{u as p}from"./index-Dw41znKI.js";import{P as u}from"./index-BChC9S1G.js";var P="Toggle",s=n((e,a)=>{const{pressed:t,defaultPressed:r=!1,onPressedChange:d,...i}=e,[o=!1,l]=p({prop:t,onChange:d,defaultProp:r});return f(u.button,{type:"button","aria-pressed":o,"data-state":o?"on":"off","data-disabled":e.disabled?"":void 0,...i,ref:a,onClick:m(e.onClick,()=>{e.disabled||l(!o)})})});s.displayName=P;var b=s;export{b as R,s as T};
1
+ import{w as n,u as f}from"./register-4_mVToaL.js";import{c as m}from"./index-CBrz5xtv.js";import{u as p}from"./index-CRJg9er0.js";import{P as u}from"./index-CkaatyBQ.js";var P="Toggle",s=n((e,a)=>{const{pressed:t,defaultPressed:r=!1,onPressedChange:d,...i}=e,[o=!1,l]=p({prop:t,onChange:d,defaultProp:r});return f(u.button,{type:"button","aria-pressed":o,"data-state":o?"on":"off","data-disabled":e.disabled?"":void 0,...i,ref:a,onClick:m(e.onClick,()=>{e.disabled||l(!o)})})});s.displayName=P;var b=s;export{b as R,s as T};
@@ -1 +1 @@
1
- import{G as v,T as d,u as h,x as l}from"./register-Br_7Z6lg.js";function P(e,u=[]){let n=[];function a(s,t){const o=v(t),c=n.length;n=[...n,t];function x(p){const{scope:f,children:S,...i}=p,C=f?.[e][c]||o,_=d(()=>i,Object.values(i));return h(C.Provider,{value:_,children:S})}function m(p,f){const S=f?.[e][c]||o,i=l(S);if(i)return i;if(t!==void 0)return t;throw new Error(`\`${p}\` must be used within \`${s}\``)}return x.displayName=s+"Provider",[x,m]}const r=()=>{const s=n.map(t=>v(t));return function(o){const c=o?.[e]||s;return d(()=>({[`__scope${e}`]:{...o,[e]:c}}),[o,c])}};return r.scopeName=e,[a,$(r,...u)]}function $(...e){const u=e[0];if(e.length===1)return u;const n=()=>{const a=e.map(r=>({useScope:r(),scopeName:r.scopeName}));return function(s){const t=a.reduce((o,{useScope:c,scopeName:x})=>{const p=c(s)[`__scope${x}`];return{...o,...p}},{});return d(()=>({[`__scope${u.scopeName}`]:t}),[t])}};return n.scopeName=u.scopeName,n}export{P as c};
1
+ import{G as v,T as d,u as h,x as l}from"./register-4_mVToaL.js";function P(e,u=[]){let n=[];function a(s,t){const o=v(t),c=n.length;n=[...n,t];function x(p){const{scope:f,children:S,...i}=p,C=f?.[e][c]||o,_=d(()=>i,Object.values(i));return h(C.Provider,{value:_,children:S})}function m(p,f){const S=f?.[e][c]||o,i=l(S);if(i)return i;if(t!==void 0)return t;throw new Error(`\`${p}\` must be used within \`${s}\``)}return x.displayName=s+"Provider",[x,m]}const r=()=>{const s=n.map(t=>v(t));return function(o){const c=o?.[e]||s;return d(()=>({[`__scope${e}`]:{...o,[e]:c}}),[o,c])}};return r.scopeName=e,[a,$(r,...u)]}function $(...e){const u=e[0];if(e.length===1)return u;const n=()=>{const a=e.map(r=>({useScope:r(),scopeName:r.scopeName}));return function(s){const t=a.reduce((o,{useScope:c,scopeName:x})=>{const p=c(s)[`__scope${x}`];return{...o,...p}},{});return d(()=>({[`__scope${u.scopeName}`]:t}),[t])}};return n.scopeName=u.scopeName,n}export{P as c};
@@ -0,0 +1 @@
1
+ import{G as Q,x as W,w as _,u as d,A as G,h as N,y as O,q as F}from"./register-4_mVToaL.js";import{c as p}from"./index-CBrz5xtv.js";import{c as X}from"./index-DWbDE88V.js";import{u as Z}from"./index-BRahpty3.js";import{c as $}from"./index-g5fgZDhH.js";import{u as ee}from"./index-B0XzXBUp.js";import{P as K}from"./index-CkaatyBQ.js";import{u as oe}from"./index-BIypPxZf.js";import{u as te}from"./index-CRJg9er0.js";var re=Q(void 0);function M(e){const t=W(re);return e||t||"ltr"}var y="rovingFocusGroup.onEntryFocus",ne={bubbles:!1,cancelable:!0},g="RovingFocusGroup",[D,L,se]=X(g),[ce,ae]=$(g,[se]),[ie,ue]=ce(g),U=_((e,t)=>d(D.Provider,{scope:e.__scopeRovingFocusGroup,children:d(D.Slot,{scope:e.__scopeRovingFocusGroup,children:d(le,{...e,ref:t})})}));U.displayName=g;var le=_((e,t)=>{const{__scopeRovingFocusGroup:s,orientation:o,loop:u=!1,dir:b,currentTabStopId:R,defaultCurrentTabStopId:w,onCurrentTabStopIdChange:m,onEntryFocus:c,preventScrollOnEntryFocus:E=!1,...T}=e,v=G(null),I=Z(t,v),r=M(b),[l=null,h]=te({prop:R,defaultProp:w,onChange:m}),[a,i]=N(!1),C=oe(c),H=L(s),S=G(!1),[V,P]=N(0);return O(()=>{const n=v.current;if(n)return n.addEventListener(y,C),()=>n.removeEventListener(y,C)},[C]),d(ie,{scope:s,orientation:o,dir:r,loop:u,currentTabStopId:l,onItemFocus:F(n=>h(n),[h]),onItemShiftTab:F(()=>i(!0),[]),onFocusableItemAdd:F(()=>P(n=>n+1),[]),onFocusableItemRemove:F(()=>P(n=>n-1),[]),children:d(K.div,{tabIndex:a||V===0?-1:0,"data-orientation":o,...T,ref:I,style:{outline:"none",...e.style},onMouseDown:p(e.onMouseDown,()=>{S.current=!0}),onFocus:p(e.onFocus,n=>{const q=!S.current;if(n.target===n.currentTarget&&q&&!a){const x=new CustomEvent(y,ne);if(n.currentTarget.dispatchEvent(x),!x.defaultPrevented){const A=H().filter(f=>f.focusable),z=A.find(f=>f.active),j=A.find(f=>f.id===l),J=[z,j,...A].filter(Boolean).map(f=>f.ref.current);Y(J,E)}}S.current=!1}),onBlur:p(e.onBlur,()=>i(!1))})})}),B="RovingFocusGroupItem",k=_((e,t)=>{const{__scopeRovingFocusGroup:s,focusable:o=!0,active:u=!1,tabStopId:b,...R}=e,w=ee(),m=b||w,c=ue(B,s),E=c.currentTabStopId===m,T=L(s),{onFocusableItemAdd:v,onFocusableItemRemove:I}=c;return O(()=>{if(o)return v(),()=>I()},[o,v,I]),d(D.ItemSlot,{scope:s,id:m,focusable:o,active:u,children:d(K.span,{tabIndex:E?0:-1,"data-orientation":c.orientation,...R,ref:t,onMouseDown:p(e.onMouseDown,r=>{o?c.onItemFocus(m):r.preventDefault()}),onFocus:p(e.onFocus,()=>c.onItemFocus(m)),onKeyDown:p(e.onKeyDown,r=>{if(r.key==="Tab"&&r.shiftKey){c.onItemShiftTab();return}if(r.target!==r.currentTarget)return;const l=me(r,c.orientation,c.dir);if(l!==void 0){if(r.metaKey||r.ctrlKey||r.altKey||r.shiftKey)return;r.preventDefault();let a=T().filter(i=>i.focusable).map(i=>i.ref.current);if(l==="last")a.reverse();else if(l==="prev"||l==="next"){l==="prev"&&a.reverse();const i=a.indexOf(r.currentTarget);a=c.loop?pe(a,i+1):a.slice(i+1)}setTimeout(()=>Y(a))}})})})});k.displayName=B;var fe={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function de(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function me(e,t,s){const o=de(e.key,s);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(o))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(o)))return fe[o]}function Y(e,t=!1){const s=(()=>{let o=document.activeElement;for(;o?.shadowRoot;)o=o.shadowRoot.activeElement;return o})();for(const o of e)if(o===s||(o.focus({preventScroll:t}),(()=>{let u=document.activeElement;for(;u?.shadowRoot;)u=u.shadowRoot.activeElement;return u})()!==s))return}function pe(e,t){return e.map((s,o)=>e[(t+o)%e.length])}var ve=U,Ie=k;export{Ie as I,ve as R,ae as c,M as u};
@@ -0,0 +1 @@
1
+ import{h as V,A as b,u as c,q as X,w as S,y as F,T as Ce,P as xe,b as re}from"./register-4_mVToaL.js";import{c as g}from"./index-CBrz5xtv.js";import{u as se}from"./index-BRahpty3.js";import{c as be}from"./index-DWbDE88V.js";import{a as Re}from"./index-CtGMni3E.js";import{B as ge,R as Se,P as Ae}from"./index-CjM__Gq4.js";import{P as Ie}from"./index-CFZwxXrg.js";import{P as D,d as _e}from"./index-CkaatyBQ.js";import{u as Y}from"./index-BIypPxZf.js";import{u as Fe}from"./index-CRJg9er0.js";import{u as De}from"./index-DQRZUM8s.js";import{V as ae}from"./index-BScxBT_T.js";var z="ToastProvider",[G,Ne,Le]=be("Toast"),[ie,mt]=Re("Toast",[Le]),[Oe,$]=ie(z),ce=t=>{const{__scopeToast:n,label:o="Notification",duration:e=5e3,swipeDirection:i="right",swipeThreshold:l=50,children:d}=t,[m,w]=V(null),[a,x]=V(0),E=b(!1),N=b(!1);return o.trim()||console.error(`Invalid prop \`label\` supplied to \`${z}\`. Expected non-empty \`string\`.`),c(G.Provider,{scope:n,children:c(Oe,{scope:n,label:o,duration:e,swipeDirection:i,swipeThreshold:l,toastCount:a,viewport:m,onViewportChange:w,onToastAdd:X(()=>x(I=>I+1),[]),onToastRemove:X(()=>x(I=>I-1),[]),isFocusedToastEscapeKeyDownRef:E,isClosePausedRef:N,children:d})})};ce.displayName=z;var ue="ToastViewport",Me=["F8"],J="toast.viewportPause",Q="toast.viewportResume",le=S((t,n)=>{const{__scopeToast:o,hotkey:e=Me,label:i="Notifications ({hotkey})",...l}=t,d=$(ue,o),m=Ne(o),w=b(null),a=b(null),x=b(null),E=b(null),N=se(n,E,d.onViewportChange),I=e.join("+").replace(/Key/g,"").replace(/Digit/g,""),_=d.toastCount>0;F(()=>{const s=y=>{e.length!==0&&e.every(f=>y[f]||y.code===f)&&E.current?.focus()};return document.addEventListener("keydown",s),()=>document.removeEventListener("keydown",s)},[e]),F(()=>{const s=w.current,y=E.current;if(_&&s&&y){const p=()=>{if(!d.isClosePausedRef.current){const T=new CustomEvent(J);y.dispatchEvent(T),d.isClosePausedRef.current=!0}},f=()=>{if(d.isClosePausedRef.current){const T=new CustomEvent(Q);y.dispatchEvent(T),d.isClosePausedRef.current=!1}},h=T=>{!s.contains(T.relatedTarget)&&f()},P=()=>{s.contains((()=>{let R=document.activeElement;for(;R?.shadowRoot;)R=R.shadowRoot.activeElement;return R})())||f()};return s.addEventListener("focusin",p),s.addEventListener("focusout",h),s.addEventListener("pointermove",p),s.addEventListener("pointerleave",P),window.addEventListener("blur",p),window.addEventListener("focus",f),()=>{s.removeEventListener("focusin",p),s.removeEventListener("focusout",h),s.removeEventListener("pointermove",p),s.removeEventListener("pointerleave",P),window.removeEventListener("blur",p),window.removeEventListener("focus",f)}}},[_,d.isClosePausedRef]);const u=X(({tabbingDirection:s})=>{const p=m().map(f=>{const h=f.ref.current,P=[h,...Ge(h)];return s==="forwards"?P:P.reverse()});return(s==="forwards"?p.reverse():p).flat()},[m]);return F(()=>{const s=E.current;if(s){const y=p=>{const f=p.altKey||p.ctrlKey||p.metaKey;if(p.key==="Tab"&&!f){const P=(()=>{let C=document.activeElement;for(;C?.shadowRoot;)C=C.shadowRoot.activeElement;return C})(),T=p.shiftKey;if(p.target===s&&T){a.current?.focus();return}const L=u({tabbingDirection:T?"backwards":"forwards"}),k=L.findIndex(C=>C===P);te(L.slice(k+1))?p.preventDefault():T?a.current?.focus():x.current?.focus()}};return s.addEventListener("keydown",y),()=>s.removeEventListener("keydown",y)}},[m,u]),c(ge,{ref:w,role:"region","aria-label":i.replace("{hotkey}",I),tabIndex:-1,style:{pointerEvents:_?void 0:"none"},children:[_&&c(Z,{ref:a,onFocusFromOutsideViewport:()=>{const s=u({tabbingDirection:"forwards"});te(s)}}),c(G.Slot,{scope:o,children:c(D.ol,{tabIndex:-1,...l,ref:N})}),_&&c(Z,{ref:x,onFocusFromOutsideViewport:()=>{const s=u({tabbingDirection:"backwards"});te(s)}})]})});le.displayName=ue;var de="ToastFocusProxy",Z=S((t,n)=>{const{__scopeToast:o,onFocusFromOutsideViewport:e,...i}=t,l=$(de,o);return c(ae,{"aria-hidden":!0,tabIndex:0,...i,ref:n,style:{position:"fixed"},onFocus:d=>{const m=d.relatedTarget;!l.viewport?.contains(m)&&e()}})});Z.displayName=de;var B="Toast",Ve="toast.swipeStart",Ke="toast.swipeMove",ke="toast.swipeCancel",He="toast.swipeEnd",pe=S((t,n)=>{const{forceMount:o,open:e,defaultOpen:i,onOpenChange:l,...d}=t,[m=!0,w]=Fe({prop:e,defaultProp:i,onChange:l});return c(Ie,{present:o||m,children:c(Xe,{open:m,...d,ref:n,onClose:()=>w(!1),onPause:Y(t.onPause),onResume:Y(t.onResume),onSwipeStart:g(t.onSwipeStart,a=>{a.currentTarget.setAttribute("data-swipe","start")}),onSwipeMove:g(t.onSwipeMove,a=>{const{x,y:E}=a.detail.delta;a.currentTarget.setAttribute("data-swipe","move"),a.currentTarget.style.setProperty("--radix-toast-swipe-move-x",`${x}px`),a.currentTarget.style.setProperty("--radix-toast-swipe-move-y",`${E}px`)}),onSwipeCancel:g(t.onSwipeCancel,a=>{a.currentTarget.setAttribute("data-swipe","cancel"),a.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),a.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),a.currentTarget.style.removeProperty("--radix-toast-swipe-end-x"),a.currentTarget.style.removeProperty("--radix-toast-swipe-end-y")}),onSwipeEnd:g(t.onSwipeEnd,a=>{const{x,y:E}=a.detail.delta;a.currentTarget.setAttribute("data-swipe","end"),a.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),a.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),a.currentTarget.style.setProperty("--radix-toast-swipe-end-x",`${x}px`),a.currentTarget.style.setProperty("--radix-toast-swipe-end-y",`${E}px`),w(!1)})})})});pe.displayName=B;var[We,Ue]=ie(B,{onClose(){}}),Xe=S((t,n)=>{const{__scopeToast:o,type:e="foreground",duration:i,open:l,onClose:d,onEscapeKeyDown:m,onPause:w,onResume:a,onSwipeStart:x,onSwipeMove:E,onSwipeCancel:N,onSwipeEnd:I,..._}=t,u=$(B,o),[s,y]=V(null),p=se(n,r=>y(r)),f=b(null),h=b(null),P=i||u.duration,T=b(0),R=b(P),K=b(0),{onToastAdd:L,onToastRemove:k}=u,C=Y(()=>{s?.contains((()=>{let v=document.activeElement;for(;v?.shadowRoot;)v=v.shadowRoot.activeElement;return v})())&&u.viewport?.focus(),d()}),H=X(r=>{!r||r===1/0||(window.clearTimeout(K.current),T.current=new Date().getTime(),K.current=window.setTimeout(C,r))},[C]);F(()=>{const r=u.viewport;if(r){const v=()=>{H(R.current),a?.()},A=()=>{const O=new Date().getTime()-T.current;R.current=R.current-O,window.clearTimeout(K.current),w?.()};return r.addEventListener(J,A),r.addEventListener(Q,v),()=>{r.removeEventListener(J,A),r.removeEventListener(Q,v)}}},[u.viewport,P,w,a,H]),F(()=>{l&&!u.isClosePausedRef.current&&H(P)},[l,P,u.isClosePausedRef,H]),F(()=>(L(),()=>k()),[L,k]);const oe=Ce(()=>s?Ee(s):null,[s]);return u.viewport?c(re,{children:[oe&&c(Ye,{__scopeToast:o,role:"status","aria-live":e==="foreground"?"assertive":"polite","aria-atomic":!0,children:oe}),c(We,{scope:o,onClose:C,children:xe(c(G.ItemSlot,{scope:o,children:c(Se,{asChild:!0,onEscapeKeyDown:g(m,()=>{u.isFocusedToastEscapeKeyDownRef.current||C(),u.isFocusedToastEscapeKeyDownRef.current=!1}),children:c(D.li,{role:"status","aria-live":"off","aria-atomic":!0,tabIndex:0,"data-state":l?"open":"closed","data-swipe-direction":u.swipeDirection,..._,ref:p,style:{userSelect:"none",touchAction:"none",...t.style},onKeyDown:g(t.onKeyDown,r=>{r.key==="Escape"&&(m?.(r.nativeEvent),r.nativeEvent.defaultPrevented||(u.isFocusedToastEscapeKeyDownRef.current=!0,C()))}),onPointerDown:g(t.onPointerDown,r=>{r.button===0&&(f.current={x:r.clientX,y:r.clientY})}),onPointerMove:g(t.onPointerMove,r=>{if(!f.current)return;const v=r.clientX-f.current.x,A=r.clientY-f.current.y,O=Boolean(h.current),M=["left","right"].includes(u.swipeDirection),W=["left","up"].includes(u.swipeDirection)?Math.min:Math.max,he=M?W(0,v):0,Pe=M?0:W(0,A),j=r.pointerType==="touch"?10:2,U={x:he,y:Pe},ne={originalEvent:r,delta:U};O?(h.current=U,q(Ke,E,ne,{discrete:!1})):ye(U,u.swipeDirection,j)?(h.current=U,q(Ve,x,ne,{discrete:!1}),r.target.setPointerCapture(r.pointerId)):(Math.abs(v)>j||Math.abs(A)>j)&&(f.current=null)}),onPointerUp:g(t.onPointerUp,r=>{const v=h.current,A=r.target;if(A.hasPointerCapture(r.pointerId)&&A.releasePointerCapture(r.pointerId),h.current=null,f.current=null,v){const O=r.currentTarget,M={originalEvent:r,delta:v};ye(v,u.swipeDirection,u.swipeThreshold)?q(He,I,M,{discrete:!0}):q(ke,N,M,{discrete:!0}),O.addEventListener("click",W=>W.preventDefault(),{once:!0})}})})})}),u.viewport)})]}):null}),Ye=t=>{const{__scopeToast:n,children:o,...e}=t,i=$(B,n),[l,d]=V(!1),[m,w]=V(!1);return je(()=>d(!0)),F(()=>{const a=window.setTimeout(()=>w(!0),1e3);return()=>window.clearTimeout(a)},[]),m?null:c(Ae,{asChild:!0,children:c(ae,{...e,children:l&&c(re,{children:[i.label," ",o]})})})},$e="ToastTitle",fe=S((t,n)=>{const{__scopeToast:o,...e}=t;return c(D.div,{...e,ref:n})});fe.displayName=$e;var Be="ToastDescription",qe=S((t,n)=>{const{__scopeToast:o,...e}=t;return c(D.div,{...e,ref:n})});qe.displayName=Be;var me="ToastAction",ve=S((t,n)=>{const{altText:o,...e}=t;return o.trim()?c(Te,{altText:o,asChild:!0,children:c(ee,{...e,ref:n})}):(console.error(`Invalid prop \`altText\` supplied to \`${me}\`. Expected non-empty \`string\`.`),null)});ve.displayName=me;var we="ToastClose",ee=S((t,n)=>{const{__scopeToast:o,...e}=t,i=Ue(we,o);return c(Te,{asChild:!0,children:c(D.button,{type:"button",...e,ref:n,onClick:g(t.onClick,i.onClose)})})});ee.displayName=we;var Te=S((t,n)=>{const{__scopeToast:o,altText:e,...i}=t;return c(D.div,{"data-radix-toast-announce-exclude":"","data-radix-toast-announce-alt":e||void 0,...i,ref:n})});function Ee(t){const n=[];return Array.from(t.childNodes).forEach(e=>{if(e.nodeType===e.TEXT_NODE&&e.textContent&&n.push(e.textContent),ze(e)){const i=e.ariaHidden||e.hidden||e.style.display==="none",l=e.dataset.radixToastAnnounceExclude==="";if(!i)if(l){const d=e.dataset.radixToastAnnounceAlt;d&&n.push(d)}else n.push(...Ee(e))}}),n}function q(t,n,o,{discrete:e}){const i=o.originalEvent.currentTarget,l=new CustomEvent(t,{bubbles:!0,cancelable:!0,detail:o});n&&i.addEventListener(t,n,{once:!0}),e?_e(i,l):i.dispatchEvent(l)}var ye=(t,n,o=0)=>{const e=Math.abs(t.x),i=Math.abs(t.y),l=e>i;return n==="left"||n==="right"?l&&e>o:!l&&i>o};function je(t=()=>{}){const n=Y(t);De(()=>{let o=0,e=0;return o=window.requestAnimationFrame(()=>e=window.requestAnimationFrame(n)),()=>{window.cancelAnimationFrame(o),window.cancelAnimationFrame(e)}},[n])}function ze(t){return t.nodeType===t.ELEMENT_NODE}function Ge(t){const n=[],o=document.createTreeWalker(t,NodeFilter.SHOW_ELEMENT,{acceptNode:e=>{const i=e.tagName==="INPUT"&&e.type==="hidden";return e.disabled||e.hidden||i?NodeFilter.FILTER_SKIP:e.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;o.nextNode();)n.push(o.currentNode);return n}function te(t){const n=(()=>{let o=document.activeElement;for(;o?.shadowRoot;)o=o.shadowRoot.activeElement;return o})();return t.some(o=>o===n?!0:(o.focus(),(()=>{let e=document.activeElement;for(;e?.shadowRoot;)e=e.shadowRoot.activeElement;return e})()!==n))}var Je=le,Qe=pe,Ze=fe,et=ve,tt=ee;export{et as A,tt as C,Qe as R,ce as T,Je as V,Ze as a};
package/dist/index.js CHANGED
@@ -1 +1 @@
1
- import{m as i}from"./mapping-a1hAK8yD.js";for(const[t,s]of Object.entries(i))customElements.get(t)||customElements.define(t,class extends HTMLElement{#i=!1;#t=!1;#s;#e;constructor(){super(),this.#e=import(`./components/${s}.js`).then(e=>{this.#s=e.default(this)})}connectedCallback(){this.#t||(this.style.visibility="hidden",this.#e.then(()=>{this.#t||(this.style.visibility="",this.#s?.connectedCallback(),this.#i=!0,this.classList.add("hydrated"))}))}disconnectedCallback(){if(!this.#i){this.#t=!0;return}this.#e.then(()=>{this.#s?.disconnectedCallback()})}});
1
+ import{m as i}from"./mapping-BFtSdEcj.js";for(const[t,s]of Object.entries(i))customElements.get(t)||customElements.define(t,class extends HTMLElement{#i=!1;#t=!1;#s;#e;constructor(){super(),this.#e=import(`./components/${s}.js`).then(e=>{this.#s=e.default(this)})}connectedCallback(){this.#t||(this.style.visibility="hidden",this.#e.then(()=>{this.#t||(this.style.visibility="",this.#s?.connectedCallback(),this.#i=!0,this.classList.add("hydrated"))}))}disconnectedCallback(){if(!this.#i){this.#t=!0;return}this.#e.then(()=>{this.#s?.disconnectedCallback()})}});
@@ -0,0 +1 @@
1
+ var n={".":"./dist/index.js","./Alert":"./dist/components/Alert.js","./AlertDescription":"./dist/components/AlertDescription.js","./AlertDialog":"./dist/components/AlertDialog.js","./AlertDialogAction":"./dist/components/AlertDialogAction.js","./AlertDialogCancel":"./dist/components/AlertDialogCancel.js","./AlertDialogContent":"./dist/components/AlertDialogContent.js","./AlertDialogDescription":"./dist/components/AlertDialogDescription.js","./AlertDialogFooter":"./dist/components/AlertDialogFooter.js","./AlertDialogTitle":"./dist/components/AlertDialogTitle.js","./AlertDialogTrigger":"./dist/components/AlertDialogTrigger.js","./AlertTitle":"./dist/components/AlertTitle.js","./AnimatePresence":"./dist/components/AnimatePresence.js","./Avatar":"./dist/components/Avatar.js","./AvatarGroup":"./dist/components/AvatarGroup.js","./AxiomProvider":"./dist/components/AxiomProvider.js","./Badge":"./dist/components/Badge.js","./Banner":"./dist/components/Banner.js","./BannerDescription":"./dist/components/BannerDescription.js","./BannerTitle":"./dist/components/BannerTitle.js","./Box":"./dist/components/Box.js","./Button":"./dist/components/Button.js","./ButtonGroup":"./dist/components/ButtonGroup.js","./Checkbox":"./dist/components/Checkbox.js","./Code":"./dist/components/Code.js","./Dialog":"./dist/components/Dialog.js","./DialogBody":"./dist/components/DialogBody.js","./DialogClose":"./dist/components/DialogClose.js","./DialogContent":"./dist/components/DialogContent.js","./DialogDescription":"./dist/components/DialogDescription.js","./DialogFooter":"./dist/components/DialogFooter.js","./DialogTitle":"./dist/components/DialogTitle.js","./DialogTrigger":"./dist/components/DialogTrigger.js","./Disclosure":"./dist/components/Disclosure.js","./DisclosureContent":"./dist/components/DisclosureContent.js","./DisclosureTrigger":"./dist/components/DisclosureTrigger.js","./Drawer":"./dist/components/Drawer.js","./DrawerBody":"./dist/components/DrawerBody.js","./DrawerFooter":"./dist/components/DrawerFooter.js","./DrawerTitle":"./dist/components/DrawerTitle.js","./DropdownMenu":"./dist/components/DropdownMenu.js","./DropdownMenuContent":"./dist/components/DropdownMenuContent.js","./DropdownMenuGroup":"./dist/components/DropdownMenuGroup.js","./DropdownMenuItem":"./dist/components/DropdownMenuItem.js","./DropdownMenuLabel":"./dist/components/DropdownMenuLabel.js","./DropdownMenuSeparator":"./dist/components/DropdownMenuSeparator.js","./DropdownMenuSub":"./dist/components/DropdownMenuSub.js","./DropdownMenuSubContent":"./dist/components/DropdownMenuSubContent.js","./DropdownMenuSubTrigger":"./dist/components/DropdownMenuTrigger.js","./DropdownMenuTrigger":"./dist/components/DropdownMenuTrigger.js","./Field":"./dist/components/Field.js","./Flex":"./dist/components/Flex.js","./Grid":"./dist/components/Grid.js","./Heading":"./dist/components/Heading.js","./HoverCard":"./dist/components/HoverCard.js","./HoverCardContent":"./dist/components/HoverCardContent.js","./HoverCardTrigger":"./dist/components/HoverCardTrigger.js","./Indicator":"./dist/components/Indicator.js","./Input":"./dist/components/Input.js","./Kbd":"./dist/components/Kbd.js","./Link":"./dist/components/Link.js","./MenuButton":"./dist/components/MenuButton.js","./Pagination":"./dist/components/Pagination.js","./Popover":"./dist/components/Popover.js","./PopoverAnchor":"./dist/components/PopoverAnchor.js","./PopoverContent":"./dist/components/PopoverContent.js","./PopoverTrigger":"./dist/components/PopoverTrigger.js","./Progress":"./dist/components/Progress.js","./Radio":"./dist/components/Radio.js","./RadioGroup":"./dist/components/RadioGroup.js","./SearchInput":"./dist/components/SearchInput.js","./SegmentedControl":"./dist/components/SegmentedControl.js","./SegmentedControlItem":"./dist/components/SegmentedControlItem.js","./Separator":"./dist/components/Separator.js","./SideNav":"./dist/components/SideNav.js","./SideNavAccountItem":"./dist/components/SideNavAccountItem.js","./SideNavItem":"./dist/components/SideNavItem.js","./SideNavToggle":"./dist/components/SideNavToggle.js","./Skeleton":"./dist/components/Skeleton.js","./Spinner":"./dist/components/Spinner.js","./Switch":"./dist/components/Switch.js","./Tabs":"./dist/components/Tabs.js","./TabsContent":"./dist/components/TabsContent.js","./TabsList":"./dist/components/TabsList.js","./TabsTrigger":"./dist/components/TabsTrigger.js","./Text":"./dist/components/Text.js","./Textarea":"./dist/components/Textarea.js","./ThemeProvider":"./dist/components/ThemeProvider.js","./Toast":"./dist/components/Toast.js","./ToastAction":"./dist/components/ToastAction.js","./ToastProvider":"./dist/components/ToastProvider.js","./ToastTitle":"./dist/components/ToastTitle.js","./ToggleButton":"./dist/components/ToggleButton.js","./Tooltip":"./dist/components/Tooltip.js","./TooltipContent":"./dist/components/TooltipContent.js","./TooltipRoot":"./dist/components/TooltipRoot.js","./TooltipTrigger":"./dist/components/TooltipTrigger.js","./Transition":"./dist/components/Transition.js"};const s=Object.keys(n).filter(o=>o!==".").map(o=>["ax"+o.slice(2).replace(/[A-Z]/g,t=>"-"+t.toLowerCase()),o.slice(2)]),e=Object.fromEntries(s);export{e as m};
@@ -1,4 +1,4 @@
1
- import{c as f,y as r,h as s,d as c}from"./register-Br_7Z6lg.js";/**
1
+ import{c as f,y as r,h as s,d as c}from"./register-4_mVToaL.js";/**
2
2
  * @reach/utils v0.18.0
3
3
  *
4
4
  * Copyright (c) 2018-2022, React Training LLC
@@ -0,0 +1 @@
1
+ import{i as m}from"./register-4_mVToaL.js";m("@layer optiaxiom, optiaxiom.base, optiaxiom._1fsvo5r, optiaxiom._1uoxjkg;");const y=({base:n={},variants:r,variantsCompounded:e=[]})=>(p,f)=>{const i=p??{},c=f?[f]:[],l={};function a(o){for(const t of Array.isArray(o)?o:[o])if(typeof t=="string")c.push(t);else for(const[s,u]of Object.entries(t))l[s]=u}a(n);for(const o in r){if(i[o]===null||i[o]===void 0)continue;const t=r[o],s=typeof i[o]=="boolean"?i[o]?"true":"false":i[o];String(s)in t&&a(t[s])}for(const{style:o,variants:t}of e)x(t,i)&&a(o);return{...l,className:c.join(" ")}},x=(n,r)=>{for(const e of Object.keys(n))if(n[e]!==r[e])return!1;return!0};export{y};