ivt 0.0.2 → 0.0.3

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 (124) hide show
  1. package/dist/accordion/index.d.ts +13 -0
  2. package/dist/accordion/index.mjs +2 -0
  3. package/dist/accordion/index.mjs.map +1 -0
  4. package/dist/badge/index.d.ts +13 -0
  5. package/dist/badge/index.mjs +2 -0
  6. package/dist/badge/index.mjs.map +1 -0
  7. package/dist/base/index.d.ts +15 -0
  8. package/dist/base/index.mjs +2 -0
  9. package/dist/base/index.mjs.map +1 -0
  10. package/dist/button/index.mjs +1 -1
  11. package/dist/checkbox/index.mjs +1 -1
  12. package/dist/checkbox/index.mjs.map +1 -1
  13. package/dist/chunks/TextWrap-B2WOcyfj.mjs +2 -0
  14. package/dist/chunks/TextWrap-B2WOcyfj.mjs.map +1 -0
  15. package/dist/chunks/accordion-CEMX6Rna.mjs +2 -0
  16. package/dist/chunks/accordion-CEMX6Rna.mjs.map +1 -0
  17. package/dist/chunks/{bundle-mjs-i8Dy217m.mjs → bundle-mjs-HknDzN6Z.mjs} +1 -1
  18. package/dist/chunks/{bundle-mjs-i8Dy217m.mjs.map → bundle-mjs-HknDzN6Z.mjs.map} +1 -1
  19. package/dist/chunks/{button-wdTQzPzE.mjs → button-DR1cWE8S.mjs} +2 -2
  20. package/dist/chunks/{button-wdTQzPzE.mjs.map → button-DR1cWE8S.mjs.map} +1 -1
  21. package/dist/chunks/check-wZkDbgjO.mjs +2 -0
  22. package/dist/chunks/{check-C0vjuPKS.mjs.map → check-wZkDbgjO.mjs.map} +1 -1
  23. package/dist/chunks/chevron-down-BbjHXP7j.mjs +2 -0
  24. package/dist/chunks/chevron-down-BbjHXP7j.mjs.map +1 -0
  25. package/dist/chunks/chevron-right-NuCkf5RR.mjs +2 -0
  26. package/dist/chunks/chevron-right-NuCkf5RR.mjs.map +1 -0
  27. package/dist/chunks/command-BvsI_sq9.mjs +2 -0
  28. package/dist/chunks/command-BvsI_sq9.mjs.map +1 -0
  29. package/dist/chunks/{createLucideIcon-CaVwnuel.mjs → createLucideIcon-DHet3kMe.mjs} +1 -1
  30. package/dist/chunks/{createLucideIcon-CaVwnuel.mjs.map → createLucideIcon-DHet3kMe.mjs.map} +1 -1
  31. package/dist/chunks/dialog-B7nAaDwF.mjs +2 -0
  32. package/dist/chunks/dialog-B7nAaDwF.mjs.map +1 -0
  33. package/dist/chunks/index-B25rp7IZ.mjs +2 -0
  34. package/dist/chunks/index-B25rp7IZ.mjs.map +1 -0
  35. package/dist/chunks/index-BESNMrh8.mjs +2 -0
  36. package/dist/chunks/index-BESNMrh8.mjs.map +1 -0
  37. package/dist/chunks/index-BsTRBWyW.mjs +2 -0
  38. package/dist/chunks/index-BsTRBWyW.mjs.map +1 -0
  39. package/dist/chunks/index-CJMeIDw8.mjs +2 -0
  40. package/dist/chunks/index-CJMeIDw8.mjs.map +1 -0
  41. package/dist/chunks/{index-BFS8ltTk.mjs → index-CjcSvOxo.mjs} +2 -2
  42. package/dist/chunks/{index-BFS8ltTk.mjs.map → index-CjcSvOxo.mjs.map} +1 -1
  43. package/dist/chunks/{index-BYh8JZrY.mjs → index-Cv2row07.mjs} +1 -1
  44. package/dist/chunks/{index-BYh8JZrY.mjs.map → index-Cv2row07.mjs.map} +1 -1
  45. package/dist/chunks/index-D5hJSEl1.mjs +2 -0
  46. package/dist/chunks/index-D5hJSEl1.mjs.map +1 -0
  47. package/dist/chunks/index-D6Orj-nf.mjs +2 -0
  48. package/dist/chunks/index-D6Orj-nf.mjs.map +1 -0
  49. package/dist/chunks/index-EftYm3Nj.mjs +2 -0
  50. package/dist/chunks/index-EftYm3Nj.mjs.map +1 -0
  51. package/dist/chunks/index-ew5utTUc.mjs +2 -0
  52. package/dist/chunks/index-ew5utTUc.mjs.map +1 -0
  53. package/dist/chunks/input-B2w6lnoj.mjs +2 -0
  54. package/dist/chunks/input-B2w6lnoj.mjs.map +1 -0
  55. package/dist/chunks/label-DXr1d22R.mjs +2 -0
  56. package/dist/chunks/label-DXr1d22R.mjs.map +1 -0
  57. package/dist/chunks/pagination-Cgu8tTUI.mjs +2 -0
  58. package/dist/chunks/pagination-Cgu8tTUI.mjs.map +1 -0
  59. package/dist/chunks/popover-BDcGFNWg.mjs +2 -0
  60. package/dist/chunks/popover-BDcGFNWg.mjs.map +1 -0
  61. package/dist/chunks/scroll-area-BEfzUuiC.mjs +2 -0
  62. package/dist/chunks/scroll-area-BEfzUuiC.mjs.map +1 -0
  63. package/dist/chunks/select-ByQjLEt1.mjs +2 -0
  64. package/dist/chunks/select-ByQjLEt1.mjs.map +1 -0
  65. package/dist/chunks/skeleton-BiE2soDg.mjs +2 -0
  66. package/dist/chunks/skeleton-BiE2soDg.mjs.map +1 -0
  67. package/dist/chunks/table-yo_IkKny.mjs +2 -0
  68. package/dist/chunks/table-yo_IkKny.mjs.map +1 -0
  69. package/dist/chunks/{utils-BxzjgHWL.mjs → utils-BpbSpG2q.mjs} +2 -2
  70. package/dist/chunks/{utils-BxzjgHWL.mjs.map → utils-BpbSpG2q.mjs.map} +1 -1
  71. package/dist/command/index.mjs +1 -1
  72. package/dist/command/index.mjs.map +1 -1
  73. package/dist/data-table/index.d.ts +108 -0
  74. package/dist/data-table/index.mjs +2 -0
  75. package/dist/data-table/index.mjs.map +1 -0
  76. package/dist/dialog/index.mjs +1 -1
  77. package/dist/dropdown-menu/index.d.ts +28 -0
  78. package/dist/dropdown-menu/index.mjs +2 -0
  79. package/dist/dropdown-menu/index.mjs.map +1 -0
  80. package/dist/form/index.d.ts +28 -0
  81. package/dist/form/index.mjs +2 -0
  82. package/dist/form/index.mjs.map +1 -0
  83. package/dist/icon/index.mjs +1 -1
  84. package/dist/index/index.d.ts +2 -8
  85. package/dist/index/index.mjs +1 -1
  86. package/dist/index.css +2 -2
  87. package/dist/input/index.mjs +1 -1
  88. package/dist/input/index.mjs.map +1 -1
  89. package/dist/label/index.mjs +1 -1
  90. package/dist/label/index.mjs.map +1 -1
  91. package/dist/pagination/index.d.ts +18 -0
  92. package/dist/pagination/index.mjs +2 -0
  93. package/dist/pagination/index.mjs.map +1 -0
  94. package/dist/popover/index.mjs +1 -1
  95. package/dist/popover/index.mjs.map +1 -1
  96. package/dist/scroll-area/index.d.ts +8 -0
  97. package/dist/scroll-area/index.mjs +2 -0
  98. package/dist/scroll-area/index.mjs.map +1 -0
  99. package/dist/select/index.mjs +1 -1
  100. package/dist/separator/index.d.ts +7 -0
  101. package/dist/separator/index.mjs +2 -0
  102. package/dist/separator/index.mjs.map +1 -0
  103. package/dist/sheet/index.d.ts +16 -0
  104. package/dist/sheet/index.mjs +2 -0
  105. package/dist/sheet/index.mjs.map +1 -0
  106. package/dist/skeleton/index.d.ts +6 -0
  107. package/dist/skeleton/index.mjs +2 -0
  108. package/dist/skeleton/index.mjs.map +1 -0
  109. package/dist/table/index.d.ts +13 -0
  110. package/dist/table/index.mjs +2 -0
  111. package/dist/table/index.mjs.map +1 -0
  112. package/dist/tooltip/index.d.ts +10 -0
  113. package/dist/tooltip/index.mjs +2 -0
  114. package/dist/tooltip/index.mjs.map +1 -0
  115. package/package.json +74 -11
  116. package/dist/chunks/check-C0vjuPKS.mjs +0 -2
  117. package/dist/chunks/dialog-D3SFDLse.mjs +0 -2
  118. package/dist/chunks/dialog-D3SFDLse.mjs.map +0 -1
  119. package/dist/chunks/index-CcK8TqAW.mjs +0 -2
  120. package/dist/chunks/index-CcK8TqAW.mjs.map +0 -1
  121. package/dist/chunks/index-KqnDJftu.mjs +0 -2
  122. package/dist/chunks/index-KqnDJftu.mjs.map +0 -1
  123. package/dist/chunks/select-CS-g8TjD.mjs +0 -2
  124. package/dist/chunks/select-CS-g8TjD.mjs.map +0 -1
@@ -1,2 +1,2 @@
1
1
  import*as r from"react";import*as i from"react-dom";import{Slot as o}from"@radix-ui/react-slot";import{jsx as t}from"react/jsx-runtime";var a=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"].reduce(((i,a)=>{const e=r.forwardRef(((r,i)=>{const{asChild:e,...n}=r,m=e?o:a;return"undefined"!=typeof window&&(window[Symbol.for("radix-ui")]=!0),t(m,{...n,ref:i})}));return e.displayName=`Primitive.${a}`,{...i,[a]:e}}),{});function e(r,o){r&&i.flushSync((()=>r.dispatchEvent(o)))}export{a as P,e as d};
2
- //# sourceMappingURL=index-BYh8JZrY.mjs.map
2
+ //# sourceMappingURL=index-Cv2row07.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"index-BYh8JZrY.mjs","sources":["../../node_modules/@radix-ui/react-primitive/dist/index.mjs"],"sourcesContent":["// packages/react/primitive/src/primitive.tsx\nimport * as React from \"react\";\nimport * as ReactDOM from \"react-dom\";\nimport { Slot } from \"@radix-ui/react-slot\";\nimport { jsx } from \"react/jsx-runtime\";\nvar NODES = [\n \"a\",\n \"button\",\n \"div\",\n \"form\",\n \"h2\",\n \"h3\",\n \"img\",\n \"input\",\n \"label\",\n \"li\",\n \"nav\",\n \"ol\",\n \"p\",\n \"span\",\n \"svg\",\n \"ul\"\n];\nvar Primitive = NODES.reduce((primitive, node) => {\n const Node = React.forwardRef((props, forwardedRef) => {\n const { asChild, ...primitiveProps } = props;\n const Comp = asChild ? Slot : node;\n if (typeof window !== \"undefined\") {\n window[Symbol.for(\"radix-ui\")] = true;\n }\n return /* @__PURE__ */ jsx(Comp, { ...primitiveProps, ref: forwardedRef });\n });\n Node.displayName = `Primitive.${node}`;\n return { ...primitive, [node]: Node };\n}, {});\nfunction dispatchDiscreteCustomEvent(target, event) {\n if (target) ReactDOM.flushSync(() => target.dispatchEvent(event));\n}\nvar Root = Primitive;\nexport {\n Primitive,\n Root,\n dispatchDiscreteCustomEvent\n};\n//# sourceMappingURL=index.mjs.map\n"],"names":["Primitive","reduce","primitive","node","Node","React","forwardRef","props","forwardedRef","asChild","primitiveProps","Comp","Slot","window","Symbol","for","jsx","ref","displayName","dispatchDiscreteCustomEvent","target","event","ReactDOM","flushSync","dispatchEvent"],"mappings":"wIAIA,IA+BMA,EA/BQ,CACZ,IACA,SACA,MACA,OACA,KACA,KACA,MACA,QACA,QACA,KACA,MACA,KACA,IACA,OACA,MACA,MAesBC,QAAO,CAACC,EAAWC,KACzC,MAAMC,EAAaC,EAAAC,YAAW,CAACC,EAA2CC,KACxE,MAAMC,QAAEA,KAAYC,GAAmBH,EACjCI,EAAYF,EAAUG,EAAOT,EAMnC,MAJsB,oBAAXU,SACRA,OAAeC,OAAOC,IAAI,cAAe,GAGrCC,EAACL,EAAA,IAASD,EAAgBO,IAAKT,GAAc,IAKtD,OAFAJ,EAAKc,YAAc,aAAaf,IAEzB,IAAKD,EAAWC,CAACA,GAAOC,EAAK,GACnC,CAAgB,GA2CnB,SAASe,EAAmDC,EAAqBC,GAC3ED,GAAiBE,EAAAC,WAAU,IAAMH,EAAOI,cAAcH,IAC5D","x_google_ignoreList":[0]}
1
+ {"version":3,"file":"index-Cv2row07.mjs","sources":["../../node_modules/@radix-ui/react-primitive/dist/index.mjs"],"sourcesContent":["// packages/react/primitive/src/primitive.tsx\nimport * as React from \"react\";\nimport * as ReactDOM from \"react-dom\";\nimport { Slot } from \"@radix-ui/react-slot\";\nimport { jsx } from \"react/jsx-runtime\";\nvar NODES = [\n \"a\",\n \"button\",\n \"div\",\n \"form\",\n \"h2\",\n \"h3\",\n \"img\",\n \"input\",\n \"label\",\n \"li\",\n \"nav\",\n \"ol\",\n \"p\",\n \"span\",\n \"svg\",\n \"ul\"\n];\nvar Primitive = NODES.reduce((primitive, node) => {\n const Node = React.forwardRef((props, forwardedRef) => {\n const { asChild, ...primitiveProps } = props;\n const Comp = asChild ? Slot : node;\n if (typeof window !== \"undefined\") {\n window[Symbol.for(\"radix-ui\")] = true;\n }\n return /* @__PURE__ */ jsx(Comp, { ...primitiveProps, ref: forwardedRef });\n });\n Node.displayName = `Primitive.${node}`;\n return { ...primitive, [node]: Node };\n}, {});\nfunction dispatchDiscreteCustomEvent(target, event) {\n if (target) ReactDOM.flushSync(() => target.dispatchEvent(event));\n}\nvar Root = Primitive;\nexport {\n Primitive,\n Root,\n dispatchDiscreteCustomEvent\n};\n//# sourceMappingURL=index.mjs.map\n"],"names":["Primitive","reduce","primitive","node","Node","React","forwardRef","props","forwardedRef","asChild","primitiveProps","Comp","Slot","window","Symbol","for","jsx","ref","displayName","dispatchDiscreteCustomEvent","target","event","ReactDOM","flushSync","dispatchEvent"],"mappings":"wIAIA,IA+BMA,EA/BQ,CACZ,IACA,SACA,MACA,OACA,KACA,KACA,MACA,QACA,QACA,KACA,MACA,KACA,IACA,OACA,MACA,MAesBC,QAAO,CAACC,EAAWC,KACzC,MAAMC,EAAaC,EAAAC,YAAW,CAACC,EAA2CC,KACxE,MAAMC,QAAEA,KAAYC,GAAmBH,EACjCI,EAAYF,EAAUG,EAAOT,EAMnC,MAJsB,oBAAXU,SACRA,OAAeC,OAAOC,IAAI,cAAe,GAGrCC,EAACL,EAAA,IAASD,EAAgBO,IAAKT,GAAc,IAKtD,OAFAJ,EAAKc,YAAc,aAAaf,IAEzB,IAAKD,EAAWC,CAACA,GAAOC,EAAK,GACnC,CAAgB,GA2CnB,SAASe,EAAmDC,EAAqBC,GAC3ED,GAAiBE,EAAAC,WAAU,IAAMH,EAAOI,cAAcH,IAC5D","x_google_ignoreList":[0]}
@@ -0,0 +1,2 @@
1
+ import{c as e}from"./createLucideIcon-DHet3kMe.mjs";import*as o from"react";import{c as t,d as n,P as r,b as a,e as i}from"./index-ew5utTUc.mjs";import{u as s}from"./index-BsTRBWyW.mjs";import{u as c}from"./index-CJMeIDw8.mjs";import{P as l,D as d}from"./index-D6Orj-nf.mjs";import{h as u,R as p,u as f,F as m}from"./index-BESNMrh8.mjs";import{P as g}from"./index-Cv2row07.mjs";import{Slot as D}from"@radix-ui/react-slot";import{jsx as h,jsxs as v,Fragment as R}from"react/jsx-runtime";const _=e("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);var y="Dialog",[b,C]=t(y),[I,w]=b(y),O=e=>{const{__scopeDialog:t,children:n,open:r,defaultOpen:a,onOpenChange:i,modal:l=!0}=e,d=o.useRef(null),u=o.useRef(null),[p=!1,f]=c({prop:r,defaultProp:a,onChange:i});return h(I,{scope:t,triggerRef:d,contentRef:u,contentId:s(),titleId:s(),descriptionId:s(),open:p,onOpenChange:f,onOpenToggle:o.useCallback((()=>f((e=>!e))),[f]),modal:l,children:n})};O.displayName=y;var F="DialogTrigger",N=o.forwardRef(((e,o)=>{const{__scopeDialog:t,...r}=e,i=w(F,t),s=a(o,i.triggerRef);return h(g.button,{type:"button","aria-haspopup":"dialog","aria-expanded":i.open,"aria-controls":i.contentId,"data-state":X(i.open),...r,ref:s,onClick:n(e.onClick,i.onOpenToggle)})}));N.displayName=F;var P="DialogPortal",[x,E]=b(P,{forceMount:void 0}),M=e=>{const{__scopeDialog:t,forceMount:n,children:a,container:i}=e,s=w(P,t);return h(x,{scope:t,forceMount:n,children:o.Children.map(a,(e=>h(r,{present:n||s.open,children:h(l,{asChild:!0,container:i,children:e})})))})};M.displayName=P;var A="DialogOverlay",j=o.forwardRef(((e,o)=>{const t=E(A,e.__scopeDialog),{forceMount:n=t.forceMount,...a}=e,i=w(A,e.__scopeDialog);return i.modal?h(r,{present:n||i.open,children:h(k,{...a,ref:o})}):null}));j.displayName=A;var k=o.forwardRef(((e,o)=>{const{__scopeDialog:t,...n}=e,r=w(A,t);return h(p,{as:D,allowPinchZoom:!0,shards:[r.contentRef],children:h(g.div,{"data-state":X(r.open),...n,ref:o,style:{pointerEvents:"auto",...n.style}})})})),T="DialogContent",$=o.forwardRef(((e,o)=>{const t=E(T,e.__scopeDialog),{forceMount:n=t.forceMount,...a}=e,i=w(T,e.__scopeDialog);return h(r,{present:n||i.open,children:i.modal?h(W,{...a,ref:o}):h(B,{...a,ref:o})})}));$.displayName=T;var W=o.forwardRef(((e,t)=>{const r=w(T,e.__scopeDialog),i=o.useRef(null),s=a(t,r.contentRef,i);return o.useEffect((()=>{const e=i.current;if(e)return u(e)}),[]),h(S,{...e,ref:s,trapFocus:r.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:n(e.onCloseAutoFocus,(e=>{e.preventDefault(),r.triggerRef.current?.focus()})),onPointerDownOutside:n(e.onPointerDownOutside,(e=>{const o=e.detail.originalEvent,t=0===o.button&&!0===o.ctrlKey;(2===o.button||t)&&e.preventDefault()})),onFocusOutside:n(e.onFocusOutside,(e=>e.preventDefault()))})})),B=o.forwardRef(((e,t)=>{const n=w(T,e.__scopeDialog),r=o.useRef(!1),a=o.useRef(!1);return h(S,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:o=>{e.onCloseAutoFocus?.(o),o.defaultPrevented||(r.current||n.triggerRef.current?.focus(),o.preventDefault()),r.current=!1,a.current=!1},onInteractOutside:o=>{e.onInteractOutside?.(o),o.defaultPrevented||(r.current=!0,"pointerdown"===o.detail.originalEvent.type&&(a.current=!0));const t=o.target,i=n.triggerRef.current?.contains(t);i&&o.preventDefault(),"focusin"===o.detail.originalEvent.type&&a.current&&o.preventDefault()}})})),S=o.forwardRef(((e,t)=>{const{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:i,onCloseAutoFocus:s,...c}=e,l=w(T,n),u=o.useRef(null),p=a(t,u);return f(),v(R,{children:[h(m,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:i,onUnmountAutoFocus:s,children:h(d,{role:"dialog",id:l.contentId,"aria-describedby":l.descriptionId,"aria-labelledby":l.titleId,"data-state":X(l.open),...c,ref:p,onDismiss:()=>l.onOpenChange(!1)})}),v(R,{children:[h(J,{titleId:l.titleId}),h(Q,{contentRef:u,descriptionId:l.descriptionId})]})]})})),q="DialogTitle",H=o.forwardRef(((e,o)=>{const{__scopeDialog:t,...n}=e,r=w(q,t);return h(g.h2,{id:r.titleId,...n,ref:o})}));H.displayName=q;var K="DialogDescription",L=o.forwardRef(((e,o)=>{const{__scopeDialog:t,...n}=e,r=w(K,t);return h(g.p,{id:r.descriptionId,...n,ref:o})}));L.displayName=K;var U="DialogClose",V=o.forwardRef(((e,o)=>{const{__scopeDialog:t,...r}=e,a=w(U,t);return h(g.button,{type:"button",...r,ref:o,onClick:n(e.onClick,(()=>a.onOpenChange(!1)))})}));function X(e){return e?"open":"closed"}V.displayName=U;var Z="DialogTitleWarning",[z,G]=i(Z,{contentName:T,titleName:q,docsSlug:"dialog"}),J=({titleId:e})=>{const t=G(Z),n=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.\n\nIf you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.\n\nFor more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return o.useEffect((()=>{if(e){document.getElementById(e)||console.error(n)}}),[n,e]),null},Q=({contentRef:e,descriptionId:t})=>{const n=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${G("DialogDescriptionWarning").contentName}}.`;return o.useEffect((()=>{const o=e.current?.getAttribute("aria-describedby");if(t&&o){document.getElementById(t)||console.warn(n)}}),[n,e,t]),null},Y=O,ee=N,oe=M,te=j,ne=$,re=H,ae=L,ie=V;export{ie as C,ae as D,te as O,oe as P,Y as R,re as T,_ as X,ne as a,ee as b};
2
+ //# sourceMappingURL=index-D5hJSEl1.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index-D5hJSEl1.mjs","sources":["../../node_modules/lucide-react/dist/esm/icons/x.js","../../node_modules/@radix-ui/react-dialog/dist/index.mjs"],"sourcesContent":["/**\n * @license lucide-react v0.479.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nimport createLucideIcon from '../createLucideIcon.js';\n\nconst __iconNode = [\n [\"path\", { d: \"M18 6 6 18\", key: \"1bl5f8\" }],\n [\"path\", { d: \"m6 6 12 12\", key: \"d8bk6v\" }]\n];\nconst X = createLucideIcon(\"X\", __iconNode);\n\nexport { __iconNode, X as default };\n//# sourceMappingURL=x.js.map\n","\"use client\";\n\n// packages/react/dialog/src/dialog.tsx\nimport * as React from \"react\";\nimport { composeEventHandlers } from \"@radix-ui/primitive\";\nimport { useComposedRefs } from \"@radix-ui/react-compose-refs\";\nimport { createContext, createContextScope } from \"@radix-ui/react-context\";\nimport { useId } from \"@radix-ui/react-id\";\nimport { useControllableState } from \"@radix-ui/react-use-controllable-state\";\nimport { DismissableLayer } from \"@radix-ui/react-dismissable-layer\";\nimport { FocusScope } from \"@radix-ui/react-focus-scope\";\nimport { Portal as PortalPrimitive } from \"@radix-ui/react-portal\";\nimport { Presence } from \"@radix-ui/react-presence\";\nimport { Primitive } from \"@radix-ui/react-primitive\";\nimport { useFocusGuards } from \"@radix-ui/react-focus-guards\";\nimport { RemoveScroll } from \"react-remove-scroll\";\nimport { hideOthers } from \"aria-hidden\";\nimport { Slot } from \"@radix-ui/react-slot\";\nimport { Fragment, jsx, jsxs } from \"react/jsx-runtime\";\nvar DIALOG_NAME = \"Dialog\";\nvar [createDialogContext, createDialogScope] = createContextScope(DIALOG_NAME);\nvar [DialogProvider, useDialogContext] = createDialogContext(DIALOG_NAME);\nvar Dialog = (props) => {\n const {\n __scopeDialog,\n children,\n open: openProp,\n defaultOpen,\n onOpenChange,\n modal = true\n } = props;\n const triggerRef = React.useRef(null);\n const contentRef = React.useRef(null);\n const [open = false, setOpen] = useControllableState({\n prop: openProp,\n defaultProp: defaultOpen,\n onChange: onOpenChange\n });\n return /* @__PURE__ */ jsx(\n DialogProvider,\n {\n scope: __scopeDialog,\n triggerRef,\n contentRef,\n contentId: useId(),\n titleId: useId(),\n descriptionId: useId(),\n open,\n onOpenChange: setOpen,\n onOpenToggle: React.useCallback(() => setOpen((prevOpen) => !prevOpen), [setOpen]),\n modal,\n children\n }\n );\n};\nDialog.displayName = DIALOG_NAME;\nvar TRIGGER_NAME = \"DialogTrigger\";\nvar DialogTrigger = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopeDialog, ...triggerProps } = props;\n const context = useDialogContext(TRIGGER_NAME, __scopeDialog);\n const composedTriggerRef = useComposedRefs(forwardedRef, context.triggerRef);\n return /* @__PURE__ */ jsx(\n Primitive.button,\n {\n type: \"button\",\n \"aria-haspopup\": \"dialog\",\n \"aria-expanded\": context.open,\n \"aria-controls\": context.contentId,\n \"data-state\": getState(context.open),\n ...triggerProps,\n ref: composedTriggerRef,\n onClick: composeEventHandlers(props.onClick, context.onOpenToggle)\n }\n );\n }\n);\nDialogTrigger.displayName = TRIGGER_NAME;\nvar PORTAL_NAME = \"DialogPortal\";\nvar [PortalProvider, usePortalContext] = createDialogContext(PORTAL_NAME, {\n forceMount: void 0\n});\nvar DialogPortal = (props) => {\n const { __scopeDialog, forceMount, children, container } = props;\n const context = useDialogContext(PORTAL_NAME, __scopeDialog);\n return /* @__PURE__ */ jsx(PortalProvider, { scope: __scopeDialog, forceMount, children: React.Children.map(children, (child) => /* @__PURE__ */ jsx(Presence, { present: forceMount || context.open, children: /* @__PURE__ */ jsx(PortalPrimitive, { asChild: true, container, children: child }) })) });\n};\nDialogPortal.displayName = PORTAL_NAME;\nvar OVERLAY_NAME = \"DialogOverlay\";\nvar DialogOverlay = React.forwardRef(\n (props, forwardedRef) => {\n const portalContext = usePortalContext(OVERLAY_NAME, props.__scopeDialog);\n const { forceMount = portalContext.forceMount, ...overlayProps } = props;\n const context = useDialogContext(OVERLAY_NAME, props.__scopeDialog);\n return context.modal ? /* @__PURE__ */ jsx(Presence, { present: forceMount || context.open, children: /* @__PURE__ */ jsx(DialogOverlayImpl, { ...overlayProps, ref: forwardedRef }) }) : null;\n }\n);\nDialogOverlay.displayName = OVERLAY_NAME;\nvar DialogOverlayImpl = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopeDialog, ...overlayProps } = props;\n const context = useDialogContext(OVERLAY_NAME, __scopeDialog);\n return (\n // Make sure `Content` is scrollable even when it doesn't live inside `RemoveScroll`\n // ie. when `Overlay` and `Content` are siblings\n /* @__PURE__ */ jsx(RemoveScroll, { as: Slot, allowPinchZoom: true, shards: [context.contentRef], children: /* @__PURE__ */ jsx(\n Primitive.div,\n {\n \"data-state\": getState(context.open),\n ...overlayProps,\n ref: forwardedRef,\n style: { pointerEvents: \"auto\", ...overlayProps.style }\n }\n ) })\n );\n }\n);\nvar CONTENT_NAME = \"DialogContent\";\nvar DialogContent = React.forwardRef(\n (props, forwardedRef) => {\n const portalContext = usePortalContext(CONTENT_NAME, props.__scopeDialog);\n const { forceMount = portalContext.forceMount, ...contentProps } = props;\n const context = useDialogContext(CONTENT_NAME, props.__scopeDialog);\n return /* @__PURE__ */ jsx(Presence, { present: forceMount || context.open, children: context.modal ? /* @__PURE__ */ jsx(DialogContentModal, { ...contentProps, ref: forwardedRef }) : /* @__PURE__ */ jsx(DialogContentNonModal, { ...contentProps, ref: forwardedRef }) });\n }\n);\nDialogContent.displayName = CONTENT_NAME;\nvar DialogContentModal = React.forwardRef(\n (props, forwardedRef) => {\n const context = useDialogContext(CONTENT_NAME, props.__scopeDialog);\n const contentRef = React.useRef(null);\n const composedRefs = useComposedRefs(forwardedRef, context.contentRef, contentRef);\n React.useEffect(() => {\n const content = contentRef.current;\n if (content) return hideOthers(content);\n }, []);\n return /* @__PURE__ */ jsx(\n DialogContentImpl,\n {\n ...props,\n ref: composedRefs,\n trapFocus: context.open,\n disableOutsidePointerEvents: true,\n onCloseAutoFocus: composeEventHandlers(props.onCloseAutoFocus, (event) => {\n event.preventDefault();\n context.triggerRef.current?.focus();\n }),\n onPointerDownOutside: composeEventHandlers(props.onPointerDownOutside, (event) => {\n const originalEvent = event.detail.originalEvent;\n const ctrlLeftClick = originalEvent.button === 0 && originalEvent.ctrlKey === true;\n const isRightClick = originalEvent.button === 2 || ctrlLeftClick;\n if (isRightClick) event.preventDefault();\n }),\n onFocusOutside: composeEventHandlers(\n props.onFocusOutside,\n (event) => event.preventDefault()\n )\n }\n );\n }\n);\nvar DialogContentNonModal = React.forwardRef(\n (props, forwardedRef) => {\n const context = useDialogContext(CONTENT_NAME, props.__scopeDialog);\n const hasInteractedOutsideRef = React.useRef(false);\n const hasPointerDownOutsideRef = React.useRef(false);\n return /* @__PURE__ */ jsx(\n DialogContentImpl,\n {\n ...props,\n ref: forwardedRef,\n trapFocus: false,\n disableOutsidePointerEvents: false,\n onCloseAutoFocus: (event) => {\n props.onCloseAutoFocus?.(event);\n if (!event.defaultPrevented) {\n if (!hasInteractedOutsideRef.current) context.triggerRef.current?.focus();\n event.preventDefault();\n }\n hasInteractedOutsideRef.current = false;\n hasPointerDownOutsideRef.current = false;\n },\n onInteractOutside: (event) => {\n props.onInteractOutside?.(event);\n if (!event.defaultPrevented) {\n hasInteractedOutsideRef.current = true;\n if (event.detail.originalEvent.type === \"pointerdown\") {\n hasPointerDownOutsideRef.current = true;\n }\n }\n const target = event.target;\n const targetIsTrigger = context.triggerRef.current?.contains(target);\n if (targetIsTrigger) event.preventDefault();\n if (event.detail.originalEvent.type === \"focusin\" && hasPointerDownOutsideRef.current) {\n event.preventDefault();\n }\n }\n }\n );\n }\n);\nvar DialogContentImpl = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopeDialog, trapFocus, onOpenAutoFocus, onCloseAutoFocus, ...contentProps } = props;\n const context = useDialogContext(CONTENT_NAME, __scopeDialog);\n const contentRef = React.useRef(null);\n const composedRefs = useComposedRefs(forwardedRef, contentRef);\n useFocusGuards();\n return /* @__PURE__ */ jsxs(Fragment, { children: [\n /* @__PURE__ */ jsx(\n FocusScope,\n {\n asChild: true,\n loop: true,\n trapped: trapFocus,\n onMountAutoFocus: onOpenAutoFocus,\n onUnmountAutoFocus: onCloseAutoFocus,\n children: /* @__PURE__ */ jsx(\n DismissableLayer,\n {\n role: \"dialog\",\n id: context.contentId,\n \"aria-describedby\": context.descriptionId,\n \"aria-labelledby\": context.titleId,\n \"data-state\": getState(context.open),\n ...contentProps,\n ref: composedRefs,\n onDismiss: () => context.onOpenChange(false)\n }\n )\n }\n ),\n /* @__PURE__ */ jsxs(Fragment, { children: [\n /* @__PURE__ */ jsx(TitleWarning, { titleId: context.titleId }),\n /* @__PURE__ */ jsx(DescriptionWarning, { contentRef, descriptionId: context.descriptionId })\n ] })\n ] });\n }\n);\nvar TITLE_NAME = \"DialogTitle\";\nvar DialogTitle = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopeDialog, ...titleProps } = props;\n const context = useDialogContext(TITLE_NAME, __scopeDialog);\n return /* @__PURE__ */ jsx(Primitive.h2, { id: context.titleId, ...titleProps, ref: forwardedRef });\n }\n);\nDialogTitle.displayName = TITLE_NAME;\nvar DESCRIPTION_NAME = \"DialogDescription\";\nvar DialogDescription = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopeDialog, ...descriptionProps } = props;\n const context = useDialogContext(DESCRIPTION_NAME, __scopeDialog);\n return /* @__PURE__ */ jsx(Primitive.p, { id: context.descriptionId, ...descriptionProps, ref: forwardedRef });\n }\n);\nDialogDescription.displayName = DESCRIPTION_NAME;\nvar CLOSE_NAME = \"DialogClose\";\nvar DialogClose = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopeDialog, ...closeProps } = props;\n const context = useDialogContext(CLOSE_NAME, __scopeDialog);\n return /* @__PURE__ */ jsx(\n Primitive.button,\n {\n type: \"button\",\n ...closeProps,\n ref: forwardedRef,\n onClick: composeEventHandlers(props.onClick, () => context.onOpenChange(false))\n }\n );\n }\n);\nDialogClose.displayName = CLOSE_NAME;\nfunction getState(open) {\n return open ? \"open\" : \"closed\";\n}\nvar TITLE_WARNING_NAME = \"DialogTitleWarning\";\nvar [WarningProvider, useWarningContext] = createContext(TITLE_WARNING_NAME, {\n contentName: CONTENT_NAME,\n titleName: TITLE_NAME,\n docsSlug: \"dialog\"\n});\nvar TitleWarning = ({ titleId }) => {\n const titleWarningContext = useWarningContext(TITLE_WARNING_NAME);\n const MESSAGE = `\\`${titleWarningContext.contentName}\\` requires a \\`${titleWarningContext.titleName}\\` for the component to be accessible for screen reader users.\n\nIf you want to hide the \\`${titleWarningContext.titleName}\\`, you can wrap it with our VisuallyHidden component.\n\nFor more information, see https://radix-ui.com/primitives/docs/components/${titleWarningContext.docsSlug}`;\n React.useEffect(() => {\n if (titleId) {\n const hasTitle = document.getElementById(titleId);\n if (!hasTitle) console.error(MESSAGE);\n }\n }, [MESSAGE, titleId]);\n return null;\n};\nvar DESCRIPTION_WARNING_NAME = \"DialogDescriptionWarning\";\nvar DescriptionWarning = ({ contentRef, descriptionId }) => {\n const descriptionWarningContext = useWarningContext(DESCRIPTION_WARNING_NAME);\n const MESSAGE = `Warning: Missing \\`Description\\` or \\`aria-describedby={undefined}\\` for {${descriptionWarningContext.contentName}}.`;\n React.useEffect(() => {\n const describedById = contentRef.current?.getAttribute(\"aria-describedby\");\n if (descriptionId && describedById) {\n const hasDescription = document.getElementById(descriptionId);\n if (!hasDescription) console.warn(MESSAGE);\n }\n }, [MESSAGE, contentRef, descriptionId]);\n return null;\n};\nvar Root = Dialog;\nvar Trigger = DialogTrigger;\nvar Portal = DialogPortal;\nvar Overlay = DialogOverlay;\nvar Content = DialogContent;\nvar Title = DialogTitle;\nvar Description = DialogDescription;\nvar Close = DialogClose;\nexport {\n Close,\n Content,\n Description,\n Dialog,\n DialogClose,\n DialogContent,\n DialogDescription,\n DialogOverlay,\n DialogPortal,\n DialogTitle,\n DialogTrigger,\n Overlay,\n Portal,\n Root,\n Title,\n Trigger,\n WarningProvider,\n createDialogScope\n};\n//# sourceMappingURL=index.mjs.map\n"],"names":["X","createLucideIcon","d","key","DIALOG_NAME","createDialogContext","createDialogScope","createContextScope","DialogProvider","useDialogContext","Dialog","props","__scopeDialog","children","open","openProp","defaultOpen","onOpenChange","modal","triggerRef","React","useRef","contentRef","setOpen","useControllableState","prop","defaultProp","onChange","jsx","scope","contentId","useId","titleId","descriptionId","onOpenToggle","useCallback","prevOpen","displayName","TRIGGER_NAME","DialogTrigger","forwardRef","forwardedRef","triggerProps","context","composedTriggerRef","useComposedRefs","Primitive","button","type","getState","ref","onClick","composeEventHandlers","PORTAL_NAME","PortalProvider","usePortalContext","forceMount","DialogPortal","container","Children","map","child","Presence","present","PortalPrimitive","asChild","OVERLAY_NAME","DialogOverlay","portalContext","overlayProps","DialogOverlayImpl","RemoveScroll","as","Slot","allowPinchZoom","shards","div","style","pointerEvents","CONTENT_NAME","DialogContent","contentProps","DialogContentModal","DialogContentNonModal","composedRefs","useEffect","content","current","hideOthers","DialogContentImpl","trapFocus","disableOutsidePointerEvents","onCloseAutoFocus","event","preventDefault","focus","onPointerDownOutside","originalEvent","detail","ctrlLeftClick","ctrlKey","onFocusOutside","hasInteractedOutsideRef","hasPointerDownOutsideRef","defaultPrevented","onInteractOutside","target","targetIsTrigger","contains","onOpenAutoFocus","useFocusGuards","jsxs","Fragment","FocusScope","loop","trapped","onMountAutoFocus","onUnmountAutoFocus","DismissableLayer","role","id","onDismiss","TitleWarning","DescriptionWarning","TITLE_NAME","DialogTitle","titleProps","h2","DESCRIPTION_NAME","DialogDescription","descriptionProps","p","CLOSE_NAME","DialogClose","closeProps","TITLE_WARNING_NAME","WarningProvider","useWarningContext","createContext","contentName","titleName","docsSlug","titleWarningContext","MESSAGE","document","getElementById","console","error","describedById","getAttribute","warn","Root","Trigger","Portal","Overlay","Content","Title","Description","Close"],"mappings":"seAGO,MAgBDA,EAAIC,EAAiB,IAhBS,CAClC,CAAC,OAAQ,CAAEC,EAAG,aAAcC,IAAK,WACjC,CAAC,OAAQ,CAAED,EAAG,aAAcC,IAAK,aCiBnC,IAAMC,EAAc,UAGbC,EAAqBC,GAAqBC,EAAmBH,IAc7DI,EAAgBC,GAAoBJ,EAAwCD,GAU7EM,EAAiCC,IACrC,MAAMC,cACJA,EAAAC,SACAA,EACAC,KAAMC,EAAAC,YACNA,EAAAC,aACAA,EAAAC,MACAA,GAAQ,GACNP,EACEQ,EAAmBC,EAAAC,OAA0B,MAC7CC,EAAmBF,EAAAC,OAA6B,OAC/CP,GAAO,EAAOS,GAAWC,EAAqB,CACnDC,KAAMV,EACNW,YAAaV,EACbW,SAAUV,IAGZ,OACE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from"./index-ew5utTUc.mjs";import{P as o,d as i}from"./index-Cv2row07.mjs";import{jsx as a}from"react/jsx-runtime";import u from"react-dom";var c,d="dismissableLayer.update",l="dismissableLayer.pointerDownOutside",f="dismissableLayer.focusOutside",v=e.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),m=e.forwardRef(((s,i)=>{const{disableOutsidePointerEvents:u=!1,onEscapeKeyDown:m,onPointerDownOutside:y,onFocusOutside:b,onInteractOutside:w,onDismiss:h,...D}=s,P=e.useContext(v),[L,C]=e.useState(null),O=L?.ownerDocument??globalThis?.document,[,g]=e.useState({}),x=n(i,(e=>C(e))),T=Array.from(P.layers),[k]=[...P.layersWithOutsidePointerEventsDisabled].slice(-1),R=T.indexOf(k),W=L?T.indexOf(L):-1,S=P.layersWithOutsidePointerEventsDisabled.size>0,B=W>=R,F=function(n,r=globalThis?.document){const s=t(n),o=e.useRef(!1),i=e.useRef((()=>{}));return e.useEffect((()=>{const e=e=>{if(e.target&&!o.current){let t=function(){p(l,s,n,{discrete:!0})};const n={originalEvent:e};"touch"===e.pointerType?(r.removeEventListener("click",i.current),i.current=t,r.addEventListener("click",i.current,{once:!0})):t()}else r.removeEventListener("click",i.current);o.current=!1},t=window.setTimeout((()=>{r.addEventListener("pointerdown",e)}),0);return()=>{window.clearTimeout(t),r.removeEventListener("pointerdown",e),r.removeEventListener("click",i.current)}}),[r,s]),{onPointerDownCapture:()=>o.current=!0}}((e=>{const t=e.target,n=[...P.branches].some((e=>e.contains(t)));B&&!n&&(y?.(e),w?.(e),e.defaultPrevented||h?.())}),O),z=function(n,r=globalThis?.document){const s=t(n),o=e.useRef(!1);return e.useEffect((()=>{const e=e=>{if(e.target&&!o.current){p(f,s,{originalEvent:e},{discrete:!1})}};return r.addEventListener("focusin",e),()=>r.removeEventListener("focusin",e)}),[r,s]),{onFocusCapture:()=>o.current=!0,onBlurCapture:()=>o.current=!1}}((e=>{const t=e.target;[...P.branches].some((e=>e.contains(t)))||(b?.(e),w?.(e),e.defaultPrevented||h?.())}),O);return function(n,r=globalThis?.document){const s=t(n);e.useEffect((()=>{const e=e=>{"Escape"===e.key&&s(e)};return r.addEventListener("keydown",e,{capture:!0}),()=>r.removeEventListener("keydown",e,{capture:!0})}),[s,r])}((e=>{W===P.layers.size-1&&(m?.(e),!e.defaultPrevented&&h&&(e.preventDefault(),h()))}),O),e.useEffect((()=>{if(L)return u&&(0===P.layersWithOutsidePointerEventsDisabled.size&&(c=O.body.style.pointerEvents,O.body.style.pointerEvents="none"),P.layersWithOutsidePointerEventsDisabled.add(L)),P.layers.add(L),E(),()=>{u&&1===P.layersWithOutsidePointerEventsDisabled.size&&(O.body.style.pointerEvents=c)}}),[L,O,u,P]),e.useEffect((()=>()=>{L&&(P.layers.delete(L),P.layersWithOutsidePointerEventsDisabled.delete(L),E())}),[L,P]),e.useEffect((()=>{const e=()=>g({});return document.addEventListener(d,e),()=>document.removeEventListener(d,e)}),[]),a(o.div,{...D,ref:x,style:{pointerEvents:S?B?"auto":"none":void 0,...s.style},onFocusCapture:r(s.onFocusCapture,z.onFocusCapture),onBlurCapture:r(s.onBlurCapture,z.onBlurCapture),onPointerDownCapture:r(s.onPointerDownCapture,F.onPointerDownCapture)})}));m.displayName="DismissableLayer";function E(){const e=new CustomEvent(d);document.dispatchEvent(e)}function p(e,t,n,{discrete:r}){const s=n.originalEvent.target,o=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&s.addEventListener(e,t,{once:!0}),r?i(s,o):s.dispatchEvent(o)}e.forwardRef(((t,r)=>{const s=e.useContext(v),i=e.useRef(null),u=n(r,i);return e.useEffect((()=>{const e=i.current;if(e)return s.branches.add(e),()=>{s.branches.delete(e)}}),[s.branches]),a(o.div,{...t,ref:u})})).displayName="DismissableLayerBranch";var y=e.forwardRef(((t,n)=>{const{container:r,...i}=t,[c,d]=e.useState(!1);s((()=>d(!0)),[]);const l=r||c&&globalThis?.document?.body;return l?u.createPortal(a(o.div,{...i,ref:n}),l):null}));y.displayName="Portal";export{m as D,y as P};
2
+ //# sourceMappingURL=index-D6Orj-nf.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index-D6Orj-nf.mjs","sources":["../../node_modules/@radix-ui/react-dismissable-layer/dist/index.mjs","../../node_modules/@radix-ui/react-use-escape-keydown/dist/index.mjs","../../node_modules/@radix-ui/react-portal/dist/index.mjs"],"sourcesContent":["\"use client\";\n\n// packages/react/dismissable-layer/src/dismissable-layer.tsx\nimport * as React from \"react\";\nimport { composeEventHandlers } from \"@radix-ui/primitive\";\nimport { Primitive, dispatchDiscreteCustomEvent } from \"@radix-ui/react-primitive\";\nimport { useComposedRefs } from \"@radix-ui/react-compose-refs\";\nimport { useCallbackRef } from \"@radix-ui/react-use-callback-ref\";\nimport { useEscapeKeydown } from \"@radix-ui/react-use-escape-keydown\";\nimport { jsx } from \"react/jsx-runtime\";\nvar DISMISSABLE_LAYER_NAME = \"DismissableLayer\";\nvar CONTEXT_UPDATE = \"dismissableLayer.update\";\nvar POINTER_DOWN_OUTSIDE = \"dismissableLayer.pointerDownOutside\";\nvar FOCUS_OUTSIDE = \"dismissableLayer.focusOutside\";\nvar originalBodyPointerEvents;\nvar DismissableLayerContext = React.createContext({\n layers: /* @__PURE__ */ new Set(),\n layersWithOutsidePointerEventsDisabled: /* @__PURE__ */ new Set(),\n branches: /* @__PURE__ */ new Set()\n});\nvar DismissableLayer = React.forwardRef(\n (props, forwardedRef) => {\n const {\n disableOutsidePointerEvents = false,\n onEscapeKeyDown,\n onPointerDownOutside,\n onFocusOutside,\n onInteractOutside,\n onDismiss,\n ...layerProps\n } = props;\n const context = React.useContext(DismissableLayerContext);\n const [node, setNode] = React.useState(null);\n const ownerDocument = node?.ownerDocument ?? globalThis?.document;\n const [, force] = React.useState({});\n const composedRefs = useComposedRefs(forwardedRef, (node2) => setNode(node2));\n const layers = Array.from(context.layers);\n const [highestLayerWithOutsidePointerEventsDisabled] = [...context.layersWithOutsidePointerEventsDisabled].slice(-1);\n const highestLayerWithOutsidePointerEventsDisabledIndex = layers.indexOf(highestLayerWithOutsidePointerEventsDisabled);\n const index = node ? layers.indexOf(node) : -1;\n const isBodyPointerEventsDisabled = context.layersWithOutsidePointerEventsDisabled.size > 0;\n const isPointerEventsEnabled = index >= highestLayerWithOutsidePointerEventsDisabledIndex;\n const pointerDownOutside = usePointerDownOutside((event) => {\n const target = event.target;\n const isPointerDownOnBranch = [...context.branches].some((branch) => branch.contains(target));\n if (!isPointerEventsEnabled || isPointerDownOnBranch) return;\n onPointerDownOutside?.(event);\n onInteractOutside?.(event);\n if (!event.defaultPrevented) onDismiss?.();\n }, ownerDocument);\n const focusOutside = useFocusOutside((event) => {\n const target = event.target;\n const isFocusInBranch = [...context.branches].some((branch) => branch.contains(target));\n if (isFocusInBranch) return;\n onFocusOutside?.(event);\n onInteractOutside?.(event);\n if (!event.defaultPrevented) onDismiss?.();\n }, ownerDocument);\n useEscapeKeydown((event) => {\n const isHighestLayer = index === context.layers.size - 1;\n if (!isHighestLayer) return;\n onEscapeKeyDown?.(event);\n if (!event.defaultPrevented && onDismiss) {\n event.preventDefault();\n onDismiss();\n }\n }, ownerDocument);\n React.useEffect(() => {\n if (!node) return;\n if (disableOutsidePointerEvents) {\n if (context.layersWithOutsidePointerEventsDisabled.size === 0) {\n originalBodyPointerEvents = ownerDocument.body.style.pointerEvents;\n ownerDocument.body.style.pointerEvents = \"none\";\n }\n context.layersWithOutsidePointerEventsDisabled.add(node);\n }\n context.layers.add(node);\n dispatchUpdate();\n return () => {\n if (disableOutsidePointerEvents && context.layersWithOutsidePointerEventsDisabled.size === 1) {\n ownerDocument.body.style.pointerEvents = originalBodyPointerEvents;\n }\n };\n }, [node, ownerDocument, disableOutsidePointerEvents, context]);\n React.useEffect(() => {\n return () => {\n if (!node) return;\n context.layers.delete(node);\n context.layersWithOutsidePointerEventsDisabled.delete(node);\n dispatchUpdate();\n };\n }, [node, context]);\n React.useEffect(() => {\n const handleUpdate = () => force({});\n document.addEventListener(CONTEXT_UPDATE, handleUpdate);\n return () => document.removeEventListener(CONTEXT_UPDATE, handleUpdate);\n }, []);\n return /* @__PURE__ */ jsx(\n Primitive.div,\n {\n ...layerProps,\n ref: composedRefs,\n style: {\n pointerEvents: isBodyPointerEventsDisabled ? isPointerEventsEnabled ? \"auto\" : \"none\" : void 0,\n ...props.style\n },\n onFocusCapture: composeEventHandlers(props.onFocusCapture, focusOutside.onFocusCapture),\n onBlurCapture: composeEventHandlers(props.onBlurCapture, focusOutside.onBlurCapture),\n onPointerDownCapture: composeEventHandlers(\n props.onPointerDownCapture,\n pointerDownOutside.onPointerDownCapture\n )\n }\n );\n }\n);\nDismissableLayer.displayName = DISMISSABLE_LAYER_NAME;\nvar BRANCH_NAME = \"DismissableLayerBranch\";\nvar DismissableLayerBranch = React.forwardRef((props, forwardedRef) => {\n const context = React.useContext(DismissableLayerContext);\n const ref = React.useRef(null);\n const composedRefs = useComposedRefs(forwardedRef, ref);\n React.useEffect(() => {\n const node = ref.current;\n if (node) {\n context.branches.add(node);\n return () => {\n context.branches.delete(node);\n };\n }\n }, [context.branches]);\n return /* @__PURE__ */ jsx(Primitive.div, { ...props, ref: composedRefs });\n});\nDismissableLayerBranch.displayName = BRANCH_NAME;\nfunction usePointerDownOutside(onPointerDownOutside, ownerDocument = globalThis?.document) {\n const handlePointerDownOutside = useCallbackRef(onPointerDownOutside);\n const isPointerInsideReactTreeRef = React.useRef(false);\n const handleClickRef = React.useRef(() => {\n });\n React.useEffect(() => {\n const handlePointerDown = (event) => {\n if (event.target && !isPointerInsideReactTreeRef.current) {\n let handleAndDispatchPointerDownOutsideEvent2 = function() {\n handleAndDispatchCustomEvent(\n POINTER_DOWN_OUTSIDE,\n handlePointerDownOutside,\n eventDetail,\n { discrete: true }\n );\n };\n var handleAndDispatchPointerDownOutsideEvent = handleAndDispatchPointerDownOutsideEvent2;\n const eventDetail = { originalEvent: event };\n if (event.pointerType === \"touch\") {\n ownerDocument.removeEventListener(\"click\", handleClickRef.current);\n handleClickRef.current = handleAndDispatchPointerDownOutsideEvent2;\n ownerDocument.addEventListener(\"click\", handleClickRef.current, { once: true });\n } else {\n handleAndDispatchPointerDownOutsideEvent2();\n }\n } else {\n ownerDocument.removeEventListener(\"click\", handleClickRef.current);\n }\n isPointerInsideReactTreeRef.current = false;\n };\n const timerId = window.setTimeout(() => {\n ownerDocument.addEventListener(\"pointerdown\", handlePointerDown);\n }, 0);\n return () => {\n window.clearTimeout(timerId);\n ownerDocument.removeEventListener(\"pointerdown\", handlePointerDown);\n ownerDocument.removeEventListener(\"click\", handleClickRef.current);\n };\n }, [ownerDocument, handlePointerDownOutside]);\n return {\n // ensures we check React component tree (not just DOM tree)\n onPointerDownCapture: () => isPointerInsideReactTreeRef.current = true\n };\n}\nfunction useFocusOutside(onFocusOutside, ownerDocument = globalThis?.document) {\n const handleFocusOutside = useCallbackRef(onFocusOutside);\n const isFocusInsideReactTreeRef = React.useRef(false);\n React.useEffect(() => {\n const handleFocus = (event) => {\n if (event.target && !isFocusInsideReactTreeRef.current) {\n const eventDetail = { originalEvent: event };\n handleAndDispatchCustomEvent(FOCUS_OUTSIDE, handleFocusOutside, eventDetail, {\n discrete: false\n });\n }\n };\n ownerDocument.addEventListener(\"focusin\", handleFocus);\n return () => ownerDocument.removeEventListener(\"focusin\", handleFocus);\n }, [ownerDocument, handleFocusOutside]);\n return {\n onFocusCapture: () => isFocusInsideReactTreeRef.current = true,\n onBlurCapture: () => isFocusInsideReactTreeRef.current = false\n };\n}\nfunction dispatchUpdate() {\n const event = new CustomEvent(CONTEXT_UPDATE);\n document.dispatchEvent(event);\n}\nfunction handleAndDispatchCustomEvent(name, handler, detail, { discrete }) {\n const target = detail.originalEvent.target;\n const event = new CustomEvent(name, { bubbles: false, cancelable: true, detail });\n if (handler) target.addEventListener(name, handler, { once: true });\n if (discrete) {\n dispatchDiscreteCustomEvent(target, event);\n } else {\n target.dispatchEvent(event);\n }\n}\nvar Root = DismissableLayer;\nvar Branch = DismissableLayerBranch;\nexport {\n Branch,\n DismissableLayer,\n DismissableLayerBranch,\n Root\n};\n//# sourceMappingURL=index.mjs.map\n","// packages/react/use-escape-keydown/src/useEscapeKeydown.tsx\nimport * as React from \"react\";\nimport { useCallbackRef } from \"@radix-ui/react-use-callback-ref\";\nfunction useEscapeKeydown(onEscapeKeyDownProp, ownerDocument = globalThis?.document) {\n const onEscapeKeyDown = useCallbackRef(onEscapeKeyDownProp);\n React.useEffect(() => {\n const handleKeyDown = (event) => {\n if (event.key === \"Escape\") {\n onEscapeKeyDown(event);\n }\n };\n ownerDocument.addEventListener(\"keydown\", handleKeyDown, { capture: true });\n return () => ownerDocument.removeEventListener(\"keydown\", handleKeyDown, { capture: true });\n }, [onEscapeKeyDown, ownerDocument]);\n}\nexport {\n useEscapeKeydown\n};\n//# sourceMappingURL=index.mjs.map\n","\"use client\";\n\n// packages/react/portal/src/portal.tsx\nimport * as React from \"react\";\nimport ReactDOM from \"react-dom\";\nimport { Primitive } from \"@radix-ui/react-primitive\";\nimport { useLayoutEffect } from \"@radix-ui/react-use-layout-effect\";\nimport { jsx } from \"react/jsx-runtime\";\nvar PORTAL_NAME = \"Portal\";\nvar Portal = React.forwardRef((props, forwardedRef) => {\n const { container: containerProp, ...portalProps } = props;\n const [mounted, setMounted] = React.useState(false);\n useLayoutEffect(() => setMounted(true), []);\n const container = containerProp || mounted && globalThis?.document?.body;\n return container ? ReactDOM.createPortal(/* @__PURE__ */ jsx(Primitive.div, { ...portalProps, ref: forwardedRef }), container) : null;\n});\nPortal.displayName = PORTAL_NAME;\nvar Root = Portal;\nexport {\n Portal,\n Root\n};\n//# sourceMappingURL=index.mjs.map\n"],"names":["originalBodyPointerEvents","CONTEXT_UPDATE","POINTER_DOWN_OUTSIDE","FOCUS_OUTSIDE","DismissableLayerContext","React","createContext","layers","Set","layersWithOutsidePointerEventsDisabled","branches","DismissableLayer","forwardRef","props","forwardedRef","disableOutsidePointerEvents","onEscapeKeyDown","onPointerDownOutside","onFocusOutside","onInteractOutside","onDismiss","layerProps","context","useContext","node","setNode","useState","ownerDocument","globalThis","document","force","composedRefs","useComposedRefs","Array","from","highestLayerWithOutsidePointerEventsDisabled","slice","highestLayerWithOutsidePointerEventsDisabledIndex","indexOf","index","isBodyPointerEventsDisabled","size","isPointerEventsEnabled","pointerDownOutside","handlePointerDownOutside","useCallbackRef","isPointerInsideReactTreeRef","useRef","handleClickRef","useEffect","handlePointerDown","event","target","current","handleAndDispatchPointerDownOutsideEvent","handleAndDispatchCustomEvent","eventDetail","discrete","originalEvent","pointerType","removeEventListener","addEventListener","once","timerId","window","setTimeout","clearTimeout","onPointerDownCapture","usePointerDownOutside","isPointerDownOnBranch","some","branch","contains","defaultPrevented","focusOutside","handleFocusOutside","isFocusInsideReactTreeRef","handleFocus","onFocusCapture","onBlurCapture","useFocusOutside","onEscapeKeyDownProp","handleKeyDown","key","capture","useEscapeKeydown","preventDefault","body","style","pointerEvents","add","dispatchUpdate","delete","handleUpdate","jsx","Primitive","div","ref","composeEventHandlers","displayName","CustomEvent","dispatchEvent","name","handler","detail","bubbles","cancelable","dispatchDiscreteCustomEvent","Portal","container","containerProp","portalProps","mounted","setMounted","useLayoutEffect","ReactDOM","createPortal"],"mappings":"uMAWA,IAKIA,EAJEC,EAAiB,0BACjBC,EAAuB,sCACvBC,EAAgB,gCAIhBC,EAAgCC,EAAAC,cAAc,CAClDC,OAAQ,IAAIC,IACZC,uCAAwC,IAAID,IAC5CE,SAAU,IAAIF,MAuCVG,EAAyBN,EAAAO,YAC7B,CAACC,EAAOC,KACN,MAAMC,4BACJA,GAA8B,EAAAC,gBAC9BA,EAAAC,qBACAA,EAAAC,eACAA,EAAAC,kBACAA,EAAAC,UACAA,KACGC,GACDR,EACES,EAAgBjB,EAAAkB,WAAWnB,IAC1BoB,EAAMC,GAAiBpB,EAAAqB,SAAyC,MACjEC,EAAgBH,GAAMG,eAAiBC,YAAYC,UAChD,CAAAC,GAAezB,EAAAqB,SAAS,CAAA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CC,EAAOiD,cAAclD,EAEzB,CAhKqC9C,EAAAO,YAGnC,CAACC,EAAOC,KACR,MAAMQ,EAAgBjB,EAAAkB,WAAWnB,GAC3B6F,EAAY5F,EAAA0C,OAAsC,MAClDhB,EAAeC,EAAgBlB,EAAcmF,GAYnD,OAVM5F,EAAA4C,WAAU,KACd,MAAMzB,EAAOyE,EAAI5C,QACjB,GAAI7B,EAEF,OADAF,EAAQZ,SAASgF,IAAIlE,GACd,KACLF,EAAQZ,SAASkF,OAAOpE,EAAI,CAEhC,GACC,CAACF,EAAQZ,WAELoF,EAACC,EAAUC,IAAV,IAAkBnF,EAAOoF,IAAKlE,GAAc,IAG/BoE,YA1BH,yBE7KpB,IAWMS,EAAevG,EAAAO,YAAuC,CAACC,EAAOC,KAClE,MAAQ+F,UAAWC,KAAkBC,GAAgBlG,GAC9CmG,EAASC,GAAoB5G,EAAAqB,UAAS,GAC7CwF,GAAgB,IAAMD,GAAW,IAAO,IACxC,MAAMJ,EAAYC,GAAkBE,GAAWpF,YAAYC,UAAU0D,KACrE,OAAOsB,EACHM,EAASC,aAAatB,EAACC,EAAUC,IAAV,IAAkBe,EAAad,IAAKnF,IAAkB+F,GAC7E,IAAA,IAGND,EAAOT,YArBa","x_google_ignoreList":[0,1,2]}
@@ -0,0 +1,2 @@
1
+ import*as t from"react";import{useLayoutEffect as e,useEffect as n}from"react";import*as r from"react-dom";import{P as o}from"./index-Cv2row07.mjs";import{jsx as i}from"react/jsx-runtime";import{c as l,b as a,a as s,u as c}from"./index-ew5utTUc.mjs";import{u as f}from"./index-CjcSvOxo.mjs";const u=["top","right","bottom","left"],d=Math.min,p=Math.max,m=Math.round,h=Math.floor,g=t=>({x:t,y:t}),y={left:"right",right:"left",bottom:"top",top:"bottom"},w={start:"end",end:"start"};function x(t,e,n){return p(t,d(e,n))}function v(t,e){return"function"==typeof t?t(e):t}function b(t){return t.split("-")[0]}function R(t){return t.split("-")[1]}function A(t){return"x"===t?"y":"x"}function P(t){return"y"===t?"height":"width"}function S(t){return["top","bottom"].includes(b(t))?"y":"x"}function O(t){return A(S(t))}function T(t){return t.replace(/start|end/g,(t=>w[t]))}function L(t){return t.replace(/left|right|bottom|top/g,(t=>y[t]))}function C(t){return"number"!=typeof t?function(t){return{top:0,right:0,bottom:0,left:0,...t}}(t):{top:t,right:t,bottom:t,left:t}}function E(t){const{x:e,y:n,width:r,height:o}=t;return{width:r,height:o,top:n,left:e,right:e+r,bottom:n+o,x:e,y:n}}function D(t,e,n){let{reference:r,floating:o}=t;const i=S(e),l=O(e),a=P(l),s=b(e),c="y"===i,f=r.x+r.width/2-o.width/2,u=r.y+r.height/2-o.height/2,d=r[a]/2-o[a]/2;let p;switch(s){case"top":p={x:f,y:r.y-o.height};break;case"bottom":p={x:f,y:r.y+r.height};break;case"right":p={x:r.x+r.width,y:u};break;case"left":p={x:r.x-o.width,y:u};break;default:p={x:r.x,y:r.y}}switch(R(e)){case"start":p[l]-=d*(n&&c?-1:1);break;case"end":p[l]+=d*(n&&c?-1:1)}return p}async function H(t,e){var n;void 0===e&&(e={});const{x:r,y:o,platform:i,rects:l,elements:a,strategy:s}=t,{boundary:c="clippingAncestors",rootBoundary:f="viewport",elementContext:u="floating",altBoundary:d=!1,padding:p=0}=v(e,t),m=C(p),h=a[d?"floating"===u?"reference":"floating":u],g=E(await i.getClippingRect({element:null==(n=await(null==i.isElement?void 0:i.isElement(h)))||n?h:h.contextElement||await(null==i.getDocumentElement?void 0:i.getDocumentElement(a.floating)),boundary:c,rootBoundary:f,strategy:s})),y="floating"===u?{x:r,y:o,width:l.floating.width,height:l.floating.height}:l.reference,w=await(null==i.getOffsetParent?void 0:i.getOffsetParent(a.floating)),x=await(null==i.isElement?void 0:i.isElement(w))&&await(null==i.getScale?void 0:i.getScale(w))||{x:1,y:1},b=E(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:y,offsetParent:w,strategy:s}):y);return{top:(g.top-b.top+m.top)/x.y,bottom:(b.bottom-g.bottom+m.bottom)/x.y,left:(g.left-b.left+m.left)/x.x,right:(b.right-g.right+m.right)/x.x}}function k(t,e){return{top:t.top-e.height,right:t.right-e.width,bottom:t.bottom-e.height,left:t.left-e.width}}function F(t){return u.some((e=>t[e]>=0))}function W(){return"undefined"!=typeof window}function B(t){return N(t)?(t.nodeName||"").toLowerCase():"#document"}function M(t){var e;return(null==t||null==(e=t.ownerDocument)?void 0:e.defaultView)||window}function $(t){var e;return null==(e=(N(t)?t.ownerDocument:t.document)||window.document)?void 0:e.documentElement}function N(t){return!!W()&&(t instanceof Node||t instanceof M(t).Node)}function _(t){return!!W()&&(t instanceof Element||t instanceof M(t).Element)}function j(t){return!!W()&&(t instanceof HTMLElement||t instanceof M(t).HTMLElement)}function z(t){return!(!W()||"undefined"==typeof ShadowRoot)&&(t instanceof ShadowRoot||t instanceof M(t).ShadowRoot)}function V(t){const{overflow:e,overflowX:n,overflowY:r,display:o}=J(t);return/auto|scroll|overlay|hidden|clip/.test(e+r+n)&&!["inline","contents"].includes(o)}function Y(t){return["table","td","th"].includes(B(t))}function X(t){return[":popover-open",":modal"].some((e=>{try{return t.matches(e)}catch(t){return!1}}))}function I(t){const e=q(),n=_(t)?J(t):t;return["transform","translate","scale","rotate","perspective"].some((t=>!!n[t]&&"none"!==n[t]))||!!n.containerType&&"normal"!==n.containerType||!e&&!!n.backdropFilter&&"none"!==n.backdropFilter||!e&&!!n.filter&&"none"!==n.filter||["transform","translate","scale","rotate","perspective","filter"].some((t=>(n.willChange||"").includes(t)))||["paint","layout","strict","content"].some((t=>(n.contain||"").includes(t)))}function q(){return!("undefined"==typeof CSS||!CSS.supports)&&CSS.supports("-webkit-backdrop-filter","none")}function G(t){return["html","body","#document"].includes(B(t))}function J(t){return M(t).getComputedStyle(t)}function K(t){return _(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.scrollX,scrollTop:t.scrollY}}function Q(t){if("html"===B(t))return t;const e=t.assignedSlot||t.parentNode||z(t)&&t.host||$(t);return z(e)?e.host:e}function U(t){const e=Q(t);return G(e)?t.ownerDocument?t.ownerDocument.body:t.body:j(e)&&V(e)?e:U(e)}function Z(t,e,n){var r;void 0===e&&(e=[]),void 0===n&&(n=!0);const o=U(t),i=o===(null==(r=t.ownerDocument)?void 0:r.body),l=M(o);if(i){const t=tt(l);return e.concat(l,l.visualViewport||[],V(o)?o:[],t&&n?Z(t):[])}return e.concat(o,Z(o,[],n))}function tt(t){return t.parent&&Object.getPrototypeOf(t.parent)?t.frameElement:null}function et(t){const e=J(t);let n=parseFloat(e.width)||0,r=parseFloat(e.height)||0;const o=j(t),i=o?t.offsetWidth:n,l=o?t.offsetHeight:r,a=m(n)!==i||m(r)!==l;return a&&(n=i,r=l),{width:n,height:r,$:a}}function nt(t){return _(t)?t:t.contextElement}function rt(t){const e=nt(t);if(!j(e))return g(1);const n=e.getBoundingClientRect(),{width:r,height:o,$:i}=et(e);let l=(i?m(n.width):n.width)/r,a=(i?m(n.height):n.height)/o;return l&&Number.isFinite(l)||(l=1),a&&Number.isFinite(a)||(a=1),{x:l,y:a}}const ot=g(0);function it(t){const e=M(t);return q()&&e.visualViewport?{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}:ot}function lt(t,e,n,r){void 0===e&&(e=!1),void 0===n&&(n=!1);const o=t.getBoundingClientRect(),i=nt(t);let l=g(1);e&&(r?_(r)&&(l=rt(r)):l=rt(t));const a=function(t,e,n){return void 0===e&&(e=!1),!(!n||e&&n!==M(t))&&e}(i,n,r)?it(i):g(0);let s=(o.left+a.x)/l.x,c=(o.top+a.y)/l.y,f=o.width/l.x,u=o.height/l.y;if(i){const t=M(i),e=r&&_(r)?M(r):r;let n=t,o=tt(n);for(;o&&r&&e!==n;){const t=rt(o),e=o.getBoundingClientRect(),r=J(o),i=e.left+(o.clientLeft+parseFloat(r.paddingLeft))*t.x,l=e.top+(o.clientTop+parseFloat(r.paddingTop))*t.y;s*=t.x,c*=t.y,f*=t.x,u*=t.y,s+=i,c+=l,n=M(o),o=tt(n)}}return E({width:f,height:u,x:s,y:c})}function at(t,e){const n=K(t).scrollLeft;return e?e.left+n:lt($(t)).left+n}function st(t,e,n){void 0===n&&(n=!1);const r=t.getBoundingClientRect();return{x:r.left+e.scrollLeft-(n?0:at(t,r)),y:r.top+e.scrollTop}}function ct(t,e,n){let r;if("viewport"===e)r=function(t,e){const n=M(t),r=$(t),o=n.visualViewport;let i=r.clientWidth,l=r.clientHeight,a=0,s=0;if(o){i=o.width,l=o.height;const t=q();(!t||t&&"fixed"===e)&&(a=o.offsetLeft,s=o.offsetTop)}return{width:i,height:l,x:a,y:s}}(t,n);else if("document"===e)r=function(t){const e=$(t),n=K(t),r=t.ownerDocument.body,o=p(e.scrollWidth,e.clientWidth,r.scrollWidth,r.clientWidth),i=p(e.scrollHeight,e.clientHeight,r.scrollHeight,r.clientHeight);let l=-n.scrollLeft+at(t);const a=-n.scrollTop;return"rtl"===J(r).direction&&(l+=p(e.clientWidth,r.clientWidth)-o),{width:o,height:i,x:l,y:a}}($(t));else if(_(e))r=function(t,e){const n=lt(t,!0,"fixed"===e),r=n.top+t.clientTop,o=n.left+t.clientLeft,i=j(t)?rt(t):g(1);return{width:t.clientWidth*i.x,height:t.clientHeight*i.y,x:o*i.x,y:r*i.y}}(e,n);else{const n=it(t);r={x:e.x-n.x,y:e.y-n.y,width:e.width,height:e.height}}return E(r)}function ft(t,e){const n=Q(t);return!(n===e||!_(n)||G(n))&&("fixed"===J(n).position||ft(n,e))}function ut(t,e,n){const r=j(e),o=$(e),i="fixed"===n,l=lt(t,!0,i,e);let a={scrollLeft:0,scrollTop:0};const s=g(0);if(r||!r&&!i)if(("body"!==B(e)||V(o))&&(a=K(e)),r){const t=lt(e,!0,i,e);s.x=t.x+e.clientLeft,s.y=t.y+e.clientTop}else o&&(s.x=at(o));const c=!o||r||i?g(0):st(o,a);return{x:l.left+a.scrollLeft-s.x-c.x,y:l.top+a.scrollTop-s.y-c.y,width:l.width,height:l.height}}function dt(t){return"static"===J(t).position}function pt(t,e){if(!j(t)||"fixed"===J(t).position)return null;if(e)return e(t);let n=t.offsetParent;return $(t)===n&&(n=n.ownerDocument.body),n}function mt(t,e){const n=M(t);if(X(t))return n;if(!j(t)){let e=Q(t);for(;e&&!G(e);){if(_(e)&&!dt(e))return e;e=Q(e)}return n}let r=pt(t,e);for(;r&&Y(r)&&dt(r);)r=pt(r,e);return r&&G(r)&&dt(r)&&!I(r)?n:r||function(t){let e=Q(t);for(;j(e)&&!G(e);){if(I(e))return e;if(X(e))return null;e=Q(e)}return null}(t)||n}const ht={convertOffsetParentRelativeRectToViewportRelativeRect:function(t){let{elements:e,rect:n,offsetParent:r,strategy:o}=t;const i="fixed"===o,l=$(r),a=!!e&&X(e.floating);if(r===l||a&&i)return n;let s={scrollLeft:0,scrollTop:0},c=g(1);const f=g(0),u=j(r);if((u||!u&&!i)&&(("body"!==B(r)||V(l))&&(s=K(r)),j(r))){const t=lt(r);c=rt(r),f.x=t.x+r.clientLeft,f.y=t.y+r.clientTop}const d=!l||u||i?g(0):st(l,s,!0);return{width:n.width*c.x,height:n.height*c.y,x:n.x*c.x-s.scrollLeft*c.x+f.x+d.x,y:n.y*c.y-s.scrollTop*c.y+f.y+d.y}},getDocumentElement:$,getClippingRect:function(t){let{element:e,boundary:n,rootBoundary:r,strategy:o}=t;const i=[..."clippingAncestors"===n?X(e)?[]:function(t,e){const n=e.get(t);if(n)return n;let r=Z(t,[],!1).filter((t=>_(t)&&"body"!==B(t))),o=null;const i="fixed"===J(t).position;let l=i?Q(t):t;for(;_(l)&&!G(l);){const e=J(l),n=I(l);n||"fixed"!==e.position||(o=null),(i?!n&&!o:!n&&"static"===e.position&&o&&["absolute","fixed"].includes(o.position)||V(l)&&!n&&ft(t,l))?r=r.filter((t=>t!==l)):o=e,l=Q(l)}return e.set(t,r),r}(e,this._c):[].concat(n),r],l=i[0],a=i.reduce(((t,n)=>{const r=ct(e,n,o);return t.top=p(r.top,t.top),t.right=d(r.right,t.right),t.bottom=d(r.bottom,t.bottom),t.left=p(r.left,t.left),t}),ct(e,l,o));return{width:a.right-a.left,height:a.bottom-a.top,x:a.left,y:a.top}},getOffsetParent:mt,getElementRects:async function(t){const e=this.getOffsetParent||mt,n=this.getDimensions,r=await n(t.floating);return{reference:ut(t.reference,await e(t.floating),t.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}},getClientRects:function(t){return Array.from(t.getClientRects())},getDimensions:function(t){const{width:e,height:n}=et(t);return{width:e,height:n}},getScale:rt,isElement:_,isRTL:function(t){return"rtl"===J(t).direction}};function gt(t,e){return t.x===e.x&&t.y===e.y&&t.width===e.width&&t.height===e.height}function yt(t,e,n,r){void 0===r&&(r={});const{ancestorScroll:o=!0,ancestorResize:i=!0,elementResize:l="function"==typeof ResizeObserver,layoutShift:a="function"==typeof IntersectionObserver,animationFrame:s=!1}=r,c=nt(t),f=o||i?[...c?Z(c):[],...Z(e)]:[];f.forEach((t=>{o&&t.addEventListener("scroll",n,{passive:!0}),i&&t.addEventListener("resize",n)}));const u=c&&a?function(t,e){let n,r=null;const o=$(t);function i(){var t;clearTimeout(n),null==(t=r)||t.disconnect(),r=null}return function l(a,s){void 0===a&&(a=!1),void 0===s&&(s=1),i();const c=t.getBoundingClientRect(),{left:f,top:u,width:m,height:g}=c;if(a||e(),!m||!g)return;const y={rootMargin:-h(u)+"px "+-h(o.clientWidth-(f+m))+"px "+-h(o.clientHeight-(u+g))+"px "+-h(f)+"px",threshold:p(0,d(1,s))||1};let w=!0;function x(e){const r=e[0].intersectionRatio;if(r!==s){if(!w)return l();r?l(!1,r):n=setTimeout((()=>{l(!1,1e-7)}),1e3)}1!==r||gt(c,t.getBoundingClientRect())||l(),w=!1}try{r=new IntersectionObserver(x,{...y,root:o.ownerDocument})}catch(t){r=new IntersectionObserver(x,y)}r.observe(t)}(!0),i}(c,n):null;let m,g=-1,y=null;l&&(y=new ResizeObserver((t=>{let[r]=t;r&&r.target===c&&y&&(y.unobserve(e),cancelAnimationFrame(g),g=requestAnimationFrame((()=>{var t;null==(t=y)||t.observe(e)}))),n()})),c&&!s&&y.observe(c),y.observe(e));let w=s?lt(t):null;return s&&function e(){const r=lt(t);w&&!gt(w,r)&&n();w=r,m=requestAnimationFrame(e)}(),n(),()=>{var t;f.forEach((t=>{o&&t.removeEventListener("scroll",n),i&&t.removeEventListener("resize",n)})),null==u||u(),null==(t=y)||t.disconnect(),y=null,s&&cancelAnimationFrame(m)}}const wt=function(t){return void 0===t&&(t=0),{name:"offset",options:t,async fn(e){var n,r;const{x:o,y:i,placement:l,middlewareData:a}=e,s=await async function(t,e){const{placement:n,platform:r,elements:o}=t,i=await(null==r.isRTL?void 0:r.isRTL(o.floating)),l=b(n),a=R(n),s="y"===S(n),c=["left","top"].includes(l)?-1:1,f=i&&s?-1:1,u=v(e,t);let{mainAxis:d,crossAxis:p,alignmentAxis:m}="number"==typeof u?{mainAxis:u,crossAxis:0,alignmentAxis:null}:{mainAxis:u.mainAxis||0,crossAxis:u.crossAxis||0,alignmentAxis:u.alignmentAxis};return a&&"number"==typeof m&&(p="end"===a?-1*m:m),s?{x:p*f,y:d*c}:{x:d*c,y:p*f}}(e,t);return l===(null==(n=a.offset)?void 0:n.placement)&&null!=(r=a.arrow)&&r.alignmentOffset?{}:{x:o+s.x,y:i+s.y,data:{...s,placement:l}}}}},xt=function(t){return void 0===t&&(t={}),{name:"shift",options:t,async fn(e){const{x:n,y:r,placement:o}=e,{mainAxis:i=!0,crossAxis:l=!1,limiter:a={fn:t=>{let{x:e,y:n}=t;return{x:e,y:n}}},...s}=v(t,e),c={x:n,y:r},f=await H(e,s),u=S(b(o)),d=A(u);let p=c[d],m=c[u];if(i){const t="y"===d?"bottom":"right";p=x(p+f["y"===d?"top":"left"],p,p-f[t])}if(l){const t="y"===u?"bottom":"right";m=x(m+f["y"===u?"top":"left"],m,m-f[t])}const h=a.fn({...e,[d]:p,[u]:m});return{...h,data:{x:h.x-n,y:h.y-r,enabled:{[d]:i,[u]:l}}}}}},vt=function(t){return void 0===t&&(t={}),{name:"flip",options:t,async fn(e){var n,r;const{placement:o,middlewareData:i,rects:l,initialPlacement:a,platform:s,elements:c}=e,{mainAxis:f=!0,crossAxis:u=!0,fallbackPlacements:d,fallbackStrategy:p="bestFit",fallbackAxisSideDirection:m="none",flipAlignment:h=!0,...g}=v(t,e);if(null!=(n=i.arrow)&&n.alignmentOffset)return{};const y=b(o),w=S(a),x=b(a)===a,A=await(null==s.isRTL?void 0:s.isRTL(c.floating)),C=d||(x||!h?[L(a)]:function(t){const e=L(t);return[T(t),e,T(e)]}(a)),E="none"!==m;!d&&E&&C.push(...function(t,e,n,r){const o=R(t);let i=function(t,e,n){const r=["left","right"],o=["right","left"],i=["top","bottom"],l=["bottom","top"];switch(t){case"top":case"bottom":return n?e?o:r:e?r:o;case"left":case"right":return e?i:l;default:return[]}}(b(t),"start"===n,r);return o&&(i=i.map((t=>t+"-"+o)),e&&(i=i.concat(i.map(T)))),i}(a,h,m,A));const D=[a,...C],k=await H(e,g),F=[];let W=(null==(r=i.flip)?void 0:r.overflows)||[];if(f&&F.push(k[y]),u){const t=function(t,e,n){void 0===n&&(n=!1);const r=R(t),o=O(t),i=P(o);let l="x"===o?r===(n?"end":"start")?"right":"left":"start"===r?"bottom":"top";return e.reference[i]>e.floating[i]&&(l=L(l)),[l,L(l)]}(o,l,A);F.push(k[t[0]],k[t[1]])}if(W=[...W,{placement:o,overflows:F}],!F.every((t=>t<=0))){var B,M;const t=((null==(B=i.flip)?void 0:B.index)||0)+1,e=D[t];if(e)return{data:{index:t,overflows:W},reset:{placement:e}};let n=null==(M=W.filter((t=>t.overflows[0]<=0)).sort(((t,e)=>t.overflows[1]-e.overflows[1]))[0])?void 0:M.placement;if(!n)switch(p){case"bestFit":{var $;const t=null==($=W.filter((t=>{if(E){const e=S(t.placement);return e===w||"y"===e}return!0})).map((t=>[t.placement,t.overflows.filter((t=>t>0)).reduce(((t,e)=>t+e),0)])).sort(((t,e)=>t[1]-e[1]))[0])?void 0:$[0];t&&(n=t);break}case"initialPlacement":n=a}if(o!==n)return{reset:{placement:n}}}return{}}}},bt=function(t){return void 0===t&&(t={}),{name:"size",options:t,async fn(e){var n,r;const{placement:o,rects:i,platform:l,elements:a}=e,{apply:s=()=>{},...c}=v(t,e),f=await H(e,c),u=b(o),m=R(o),h="y"===S(o),{width:g,height:y}=i.floating;let w,x;"top"===u||"bottom"===u?(w=u,x=m===(await(null==l.isRTL?void 0:l.isRTL(a.floating))?"start":"end")?"left":"right"):(x=u,w="end"===m?"top":"bottom");const A=y-f.top-f.bottom,P=g-f.left-f.right,O=d(y-f[w],A),T=d(g-f[x],P),L=!e.middlewareData.shift;let C=O,E=T;if(null!=(n=e.middlewareData.shift)&&n.enabled.x&&(E=P),null!=(r=e.middlewareData.shift)&&r.enabled.y&&(C=A),L&&!m){const t=p(f.left,0),e=p(f.right,0),n=p(f.top,0),r=p(f.bottom,0);h?E=g-2*(0!==t||0!==e?t+e:p(f.left,f.right)):C=y-2*(0!==n||0!==r?n+r:p(f.top,f.bottom))}await s({...e,availableWidth:E,availableHeight:C});const D=await l.getDimensions(a.floating);return g!==D.width||y!==D.height?{reset:{rects:!0}}:{}}}},Rt=function(t){return void 0===t&&(t={}),{name:"hide",options:t,async fn(e){const{rects:n}=e,{strategy:r="referenceHidden",...o}=v(t,e);switch(r){case"referenceHidden":{const t=k(await H(e,{...o,elementContext:"reference"}),n.reference);return{data:{referenceHiddenOffsets:t,referenceHidden:F(t)}}}case"escaped":{const t=k(await H(e,{...o,altBoundary:!0}),n.floating);return{data:{escapedOffsets:t,escaped:F(t)}}}default:return{}}}}},At=t=>({name:"arrow",options:t,async fn(e){const{x:n,y:r,placement:o,rects:i,platform:l,elements:a,middlewareData:s}=e,{element:c,padding:f=0}=v(t,e)||{};if(null==c)return{};const u=C(f),p={x:n,y:r},m=O(o),h=P(m),g=await l.getDimensions(c),y="y"===m,w=y?"top":"left",b=y?"bottom":"right",A=y?"clientHeight":"clientWidth",S=i.reference[h]+i.reference[m]-p[m]-i.floating[h],T=p[m]-i.reference[m],L=await(null==l.getOffsetParent?void 0:l.getOffsetParent(c));let E=L?L[A]:0;E&&await(null==l.isElement?void 0:l.isElement(L))||(E=a.floating[A]||i.floating[h]);const D=S/2-T/2,H=E/2-g[h]/2-1,k=d(u[w],H),F=d(u[b],H),W=k,B=E-g[h]-F,M=E/2-g[h]/2+D,$=x(W,M,B),N=!s.arrow&&null!=R(o)&&M!==$&&i.reference[h]/2-(M<W?k:F)-g[h]/2<0,_=N?M<W?M-W:M-B:0;return{[m]:p[m]+_,data:{[m]:$,centerOffset:M-$-_,...N&&{alignmentOffset:_}},reset:N}}}),Pt=function(t){return void 0===t&&(t={}),{options:t,fn(e){const{x:n,y:r,placement:o,rects:i,middlewareData:l}=e,{offset:a=0,mainAxis:s=!0,crossAxis:c=!0}=v(t,e),f={x:n,y:r},u=S(o),d=A(u);let p=f[d],m=f[u];const h=v(a,e),g="number"==typeof h?{mainAxis:h,crossAxis:0}:{mainAxis:0,crossAxis:0,...h};if(s){const t="y"===d?"height":"width",e=i.reference[d]-i.floating[t]+g.mainAxis,n=i.reference[d]+i.reference[t]-g.mainAxis;p<e?p=e:p>n&&(p=n)}if(c){var y,w;const t="y"===d?"width":"height",e=["top","left"].includes(b(o)),n=i.reference[u]-i.floating[t]+(e&&(null==(y=l.offset)?void 0:y[u])||0)+(e?0:g.crossAxis),r=i.reference[u]+i.reference[t]+(e?0:(null==(w=l.offset)?void 0:w[u])||0)-(e?g.crossAxis:0);m<n?m=n:m>r&&(m=r)}return{[d]:p,[u]:m}}}},St=(t,e,n)=>{const r=new Map,o={platform:ht,...n},i={...o.platform,_c:r};return(async(t,e,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:i=[],platform:l}=n,a=i.filter(Boolean),s=await(null==l.isRTL?void 0:l.isRTL(e));let c=await l.getElementRects({reference:t,floating:e,strategy:o}),{x:f,y:u}=D(c,r,s),d=r,p={},m=0;for(let n=0;n<a.length;n++){const{name:i,fn:h}=a[n],{x:g,y:y,data:w,reset:x}=await h({x:f,y:u,initialPlacement:r,placement:d,strategy:o,middlewareData:p,rects:c,platform:l,elements:{reference:t,floating:e}});f=null!=g?g:f,u=null!=y?y:u,p={...p,[i]:{...p[i],...w}},x&&m<=50&&(m++,"object"==typeof x&&(x.placement&&(d=x.placement),x.rects&&(c=!0===x.rects?await l.getElementRects({reference:t,floating:e,strategy:o}):x.rects),({x:f,y:u}=D(c,d,s))),n=-1)}return{x:f,y:u,placement:d,strategy:o,middlewareData:p}})(t,e,{...o,platform:i})};var Ot="undefined"!=typeof document?e:n;function Tt(t,e){if(t===e)return!0;if(typeof t!=typeof e)return!1;if("function"==typeof t&&t.toString()===e.toString())return!0;let n,r,o;if(t&&e&&"object"==typeof t){if(Array.isArray(t)){if(n=t.length,n!==e.length)return!1;for(r=n;0!=r--;)if(!Tt(t[r],e[r]))return!1;return!0}if(o=Object.keys(t),n=o.length,n!==Object.keys(e).length)return!1;for(r=n;0!=r--;)if(!{}.hasOwnProperty.call(e,o[r]))return!1;for(r=n;0!=r--;){const n=o[r];if(("_owner"!==n||!t.$$typeof)&&!Tt(t[n],e[n]))return!1}return!0}return t!=t&&e!=e}function Lt(t){if("undefined"==typeof window)return 1;return(t.ownerDocument.defaultView||window).devicePixelRatio||1}function Ct(t,e){const n=Lt(t);return Math.round(e*n)/n}function Et(e){const n=t.useRef(e);return Ot((()=>{n.current=e})),n}const Dt=t=>({name:"arrow",options:t,fn(e){const{element:n,padding:r}="function"==typeof t?t(e):t;return n&&(o=n,{}.hasOwnProperty.call(o,"current"))?null!=n.current?At({element:n.current,padding:r}).fn(e):{}:n?At({element:n,padding:r}).fn(e):{};var o}}),Ht=(t,e)=>({...xt(t),options:[t,e]}),kt=(t,e)=>({...Pt(t),options:[t,e]}),Ft=(t,e)=>({...vt(t),options:[t,e]}),Wt=(t,e)=>({...bt(t),options:[t,e]}),Bt=(t,e)=>({...Rt(t),options:[t,e]}),Mt=(t,e)=>({...Dt(t),options:[t,e]});var $t=t.forwardRef(((t,e)=>{const{children:n,width:r=10,height:l=5,...a}=t;return i(o.svg,{...a,ref:e,width:r,height:l,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:t.asChild?n:i("polygon",{points:"0,0 30,0 15,10"})})}));$t.displayName="Arrow";var Nt=$t,_t="Popper",[jt,zt]=l(_t),[Vt,Yt]=jt(_t),Xt=e=>{const{__scopePopper:n,children:r}=e,[o,l]=t.useState(null);return i(Vt,{scope:n,anchor:o,onAnchorChange:l,children:r})};Xt.displayName=_t;var It="PopperAnchor",qt=t.forwardRef(((e,n)=>{const{__scopePopper:r,virtualRef:l,...s}=e,c=Yt(It,r),f=t.useRef(null),u=a(n,f);return t.useEffect((()=>{c.onAnchorChange(l?.current||f.current)})),l?null:i(o.div,{...s,ref:u})}));qt.displayName=It;var Gt="PopperContent",[Jt,Kt]=jt(Gt),Qt=t.forwardRef(((e,n)=>{const{__scopePopper:l,side:u="bottom",sideOffset:d=0,align:p="center",alignOffset:m=0,arrowPadding:h=0,avoidCollisions:g=!0,collisionBoundary:y=[],collisionPadding:w=0,sticky:x="partial",hideWhenDetached:v=!1,updatePositionStrategy:b="optimized",onPlaced:R,...A}=e,P=Yt(Gt,l),[S,O]=t.useState(null),T=a(n,(t=>O(t))),[L,C]=t.useState(null),E=f(L),D=E?.width??0,H=E?.height??0,k=u+("center"!==p?"-"+p:""),F="number"==typeof w?w:{top:0,right:0,bottom:0,left:0,...w},W=Array.isArray(y)?y:[y],B=W.length>0,M={padding:F,boundary:W.filter(ee),altBoundary:B},{refs:$,floatingStyles:N,placement:_,isPositioned:j,middlewareData:z}=function(e){void 0===e&&(e={});const{placement:n="bottom",strategy:o="absolute",middleware:i=[],platform:l,elements:{reference:a,floating:s}={},transform:c=!0,whileElementsMounted:f,open:u}=e,[d,p]=t.useState({x:0,y:0,strategy:o,placement:n,middlewareData:{},isPositioned:!1}),[m,h]=t.useState(i);Tt(m,i)||h(i);const[g,y]=t.useState(null),[w,x]=t.useState(null),v=t.useCallback((t=>{t!==P.current&&(P.current=t,y(t))}),[]),b=t.useCallback((t=>{t!==S.current&&(S.current=t,x(t))}),[]),R=a||g,A=s||w,P=t.useRef(null),S=t.useRef(null),O=t.useRef(d),T=null!=f,L=Et(f),C=Et(l),E=Et(u),D=t.useCallback((()=>{if(!P.current||!S.current)return;const t={placement:n,strategy:o,middleware:m};C.current&&(t.platform=C.current),St(P.current,S.current,t).then((t=>{const e={...t,isPositioned:!1!==E.current};H.current&&!Tt(O.current,e)&&(O.current=e,r.flushSync((()=>{p(e)})))}))}),[m,n,o,C,E]);Ot((()=>{!1===u&&O.current.isPositioned&&(O.current.isPositioned=!1,p((t=>({...t,isPositioned:!1}))))}),[u]);const H=t.useRef(!1);Ot((()=>(H.current=!0,()=>{H.current=!1})),[]),Ot((()=>{if(R&&(P.current=R),A&&(S.current=A),R&&A){if(L.current)return L.current(R,A,D);D()}}),[R,A,D,L,T]);const k=t.useMemo((()=>({reference:P,floating:S,setReference:v,setFloating:b})),[v,b]),F=t.useMemo((()=>({reference:R,floating:A})),[R,A]),W=t.useMemo((()=>{const t={position:o,left:0,top:0};if(!F.floating)return t;const e=Ct(F.floating,d.x),n=Ct(F.floating,d.y);return c?{...t,transform:"translate("+e+"px, "+n+"px)",...Lt(F.floating)>=1.5&&{willChange:"transform"}}:{position:o,left:e,top:n}}),[o,c,F.floating,d.x,d.y]);return t.useMemo((()=>({...d,update:D,refs:k,elements:F,floatingStyles:W})),[d,D,k,F,W])}({strategy:"fixed",placement:k,whileElementsMounted:(...t)=>yt(...t,{animationFrame:"always"===b}),elements:{reference:P.anchor},middleware:[(V={mainAxis:d+H,alignmentAxis:m},{...wt(V),options:[V,Y]}),g&&Ht({mainAxis:!0,crossAxis:!1,limiter:"partial"===x?kt():void 0,...M}),g&&Ft({...M}),Wt({...M,apply:({elements:t,rects:e,availableWidth:n,availableHeight:r})=>{const{width:o,height:i}=e.reference,l=t.floating.style;l.setProperty("--radix-popper-available-width",`${n}px`),l.setProperty("--radix-popper-available-height",`${r}px`),l.setProperty("--radix-popper-anchor-width",`${o}px`),l.setProperty("--radix-popper-anchor-height",`${i}px`)}}),L&&Mt({element:L,padding:h}),ne({arrowWidth:D,arrowHeight:H}),v&&Bt({strategy:"referenceHidden",...M})]});var V,Y;const[X,I]=re(_),q=s(R);c((()=>{j&&q?.()}),[j,q]);const G=z.arrow?.x,J=z.arrow?.y,K=0!==z.arrow?.centerOffset,[Q,U]=t.useState();return c((()=>{S&&U(window.getComputedStyle(S).zIndex)}),[S]),i("div",{ref:$.setFloating,"data-radix-popper-content-wrapper":"",style:{...N,transform:j?N.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:Q,"--radix-popper-transform-origin":[z.transformOrigin?.x,z.transformOrigin?.y].join(" "),...z.hide?.referenceHidden&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:i(Jt,{scope:l,placedSide:X,onArrowChange:C,arrowX:G,arrowY:J,shouldHideArrow:K,children:i(o.div,{"data-side":X,"data-align":I,...A,ref:T,style:{...A.style,animation:j?void 0:"none"}})})})}));Qt.displayName=Gt;var Ut="PopperArrow",Zt={top:"bottom",right:"left",bottom:"top",left:"right"},te=t.forwardRef((function(t,e){const{__scopePopper:n,...r}=t,o=Kt(Ut,n),l=Zt[o.placedSide];return i("span",{ref:o.onArrowChange,style:{position:"absolute",left:o.arrowX,top:o.arrowY,[l]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[o.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[o.placedSide],visibility:o.shouldHideArrow?"hidden":void 0},children:i(Nt,{...r,ref:e,style:{...r.style,display:"block"}})})}));function ee(t){return null!==t}te.displayName=Ut;var ne=t=>({name:"transformOrigin",options:t,fn(e){const{placement:n,rects:r,middlewareData:o}=e,i=0!==o.arrow?.centerOffset,l=i?0:t.arrowWidth,a=i?0:t.arrowHeight,[s,c]=re(n),f={start:"0%",center:"50%",end:"100%"}[c],u=(o.arrow?.x??0)+l/2,d=(o.arrow?.y??0)+a/2;let p="",m="";return"bottom"===s?(p=i?f:`${u}px`,m=-a+"px"):"top"===s?(p=i?f:`${u}px`,m=`${r.floating.height+a}px`):"right"===s?(p=-a+"px",m=i?f:`${d}px`):"left"===s&&(p=`${r.floating.width+a}px`,m=i?f:`${d}px`),{data:{x:p,y:m}}}});function re(t){const[e,n="center"]=t.split("-");return[e,n]}var oe=Xt,ie=qt,le=Qt,ae=te;export{ie as A,le as C,oe as R,ae as a,zt as c};
2
+ //# sourceMappingURL=index-EftYm3Nj.mjs.map