@maxhub/max-ui 0.8.0 → 0.9.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/BottomSheet/BottomSheet.d.ts.map +1 -1
- package/dist/components/Tooltip/Tooltip.d.ts +10 -0
- package/dist/components/Tooltip/Tooltip.d.ts.map +1 -0
- package/dist/components/Tooltip/index.d.ts +2 -0
- package/dist/components/Tooltip/index.d.ts.map +1 -0
- package/dist/components/index.d.ts +1 -0
- package/dist/components/index.d.ts.map +1 -1
- package/dist/icons/index.d.ts +2 -1
- package/dist/icons/index.d.ts.map +1 -1
- package/dist/index.js +2 -2
- package/dist/index.js.map +1 -1
- package/dist/styles.css +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import{jsx as e,jsxs as t,Fragment as n}from"react/jsx-runtime";import*as r from"react";import{forwardRef as o,createContext as a,useContext as i,Children as l,cloneElement as c,isValidElement as s,useRef as u,useEffect as d,useMemo as _,useState as p,useLayoutEffect as f,useCallback as m,Fragment as v,useId as h}from"react";import*as g from"react-dom";import{createPortal as y}from"react-dom";function b(e){var t,n,r="";if("string"==typeof e||"number"==typeof e)r+=e;else if("object"==typeof e)if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(n=b(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function C(){for(var e,t,n=0,r="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=b(e))&&(r&&(r+=" "),r+=t);return r}var x;function w(){return w=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},w.apply(null,arguments)}var S,T=function(e){return r.createElement("svg",w({xmlns:"http://www.w3.org/2000/svg",width:16,height:16,fill:"none"},e),x||(x=r.createElement("path",{fill:"currentColor",fillRule:"evenodd",d:"M13.28 3.72a.75.75 0 0 1 0 1.06l-6.5 6.5a.75.75 0 0 1-1.06 0l-3-3a.75.75 0 0 1 1.06-1.06l2.47 2.47 5.97-5.97a.75.75 0 0 1 1.06 0",clipRule:"evenodd"})))};function N(){return N=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},N.apply(null,arguments)}var I,E=function(e){return r.createElement("svg",N({xmlns:"http://www.w3.org/2000/svg",width:12,height:16,fill:"none"},e),S||(S=r.createElement("path",{fill:"currentColor",fillRule:"evenodd",d:"M2.934 3.434a.8.8 0 0 1 1.132 0l4 4a.8.8 0 0 1 0 1.132l-4 4a.8.8 0 0 1-1.132-1.132L6.37 8 2.934 4.566a.8.8 0 0 1 0-1.132",clipRule:"evenodd"})))};function R(){return R=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},R.apply(null,arguments)}var k,A=function(e){return r.createElement("svg",R({xmlns:"http://www.w3.org/2000/svg",width:16,height:16,fill:"none"},e),I||(I=r.createElement("path",{fill:"currentColor",fillRule:"evenodd",d:"M8 16A8 8 0 1 0 8 0a8 8 0 0 0 0 16M5.566 4.434a.8.8 0 1 0-1.132 1.132L6.87 8l-2.435 2.434a.8.8 0 0 0 1.132 1.132L8 9.13l2.434 2.435a.8.8 0 0 0 1.132-1.132L9.13 8l2.435-2.434a.8.8 0 0 0-1.132-1.132L8 6.87z",clipRule:"evenodd"})))};function M(){return M=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},M.apply(null,arguments)}var B,L=function(e){return r.createElement("svg",M({xmlns:"http://www.w3.org/2000/svg",width:16,height:16,fill:"none"},e),k||(k=r.createElement("path",{fill:"currentColor",fillRule:"evenodd",d:"M7.242 2.115c-2.605 0-4.677 2.044-4.677 4.517s2.072 4.517 4.677 4.517 4.677-2.044 4.677-4.517-2.072-4.517-4.677-4.517M1 6.632C1 3.252 3.817.55 7.242.55s6.242 2.701 6.242 6.082a5.97 5.97 0 0 1-1.692 4.165l3 3.247a.783.783 0 1 1-1.15 1.062l-3.074-3.326a6.34 6.34 0 0 1-3.326.935C3.817 12.715 1 10.013 1 6.632",clipRule:"evenodd"})))};function P(){return P=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},P.apply(null,arguments)}var O,D,F=function(e){return r.createElement("svg",P({xmlns:"http://www.w3.org/2000/svg",width:20,height:20,fill:"none"},e),B||(B=r.createElement("path",{fill:"currentColor",fillRule:"evenodd",d:"M4.364 4.364a.9.9 0 0 1 1.272 0L10 8.727l4.364-4.363a.9.9 0 0 1 1.272 1.272L11.273 10l4.363 4.364a.9.9 0 0 1-1.272 1.272L10 11.273l-4.364 4.363a.9.9 0 0 1-1.272-1.272L8.727 10 4.364 5.636a.9.9 0 0 1 0-1.272",clipRule:"evenodd"})))};function z(){return z=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},z.apply(null,arguments)}var U,$=function(e){return r.createElement("svg",z({xmlns:"http://www.w3.org/2000/svg",width:20,height:20,fill:"none"},e),O||(O=r.createElement("circle",{cx:10,cy:10,r:10,fill:"currentColor"})),D||(D=r.createElement("path",{fill:"#fff",fillRule:"evenodd",d:"M5.364 5.364a.9.9 0 0 1 1.272 0L10 8.727l3.364-3.363a.9.9 0 0 1 1.272 1.272L11.274 10l3.364 3.364a.9.9 0 1 1-1.273 1.272L10 11.273l-3.364 3.363a.9.9 0 0 1-1.272-1.272L8.727 10 5.364 6.636a.9.9 0 0 1 0-1.272",clipRule:"evenodd"})))};function H(){return H=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},H.apply(null,arguments)}var j=function(e){return r.createElement("svg",H({xmlns:"http://www.w3.org/2000/svg",width:24,height:24,fill:"none"},e),U||(U=r.createElement("path",{fill:"currentColor",fillRule:"evenodd",d:"M6.268 6.268a.915.915 0 0 1 1.294 0L12 10.706l4.438-4.438a.915.915 0 1 1 1.294 1.294L13.294 12l4.438 4.438a.915.915 0 1 1-1.294 1.294L12 13.294l-4.438 4.438a.915.915 0 1 1-1.294-1.294L10.706 12 6.268 7.562a.915.915 0 0 1 0-1.294",clipRule:"evenodd"})))},V=Object.defineProperty,W=(e,t)=>V(e,"name",{value:t,configurable:!0});function K(e,t){if("function"==typeof e)return e(t);null!=e&&(e.current=t)}function Y(...e){return t=>{let n=!1;const r=e.map(e=>{const r=K(e,t);return n||"function"!=typeof r||(n=!0),r});if(n)return()=>{for(let t=0;t<r.length;t++){const n=r[t];"function"==typeof n?n():K(e[t],null)}}}}function q(...e){return r.useCallback(Y(...e),e)}W(K,"setRef"),W(Y,"composeRefs"),W(q,"useComposedRefs");var X=Object.defineProperty,G=(e,t)=>X(e,"name",{value:t,configurable:!0});function Z(e){const t=r.forwardRef((t,n)=>{let{children:o,...a}=t,i=null,l=!1;const c=[];le(o)&&"function"==typeof de&&(o=de(o._payload)),r.Children.forEach(o,e=>{if(ae(e)){l=!0;const t=e;let n="child"in t.props?t.props.child:t.props.children;le(n)&&"function"==typeof de&&(n=de(n._payload)),i=ne(t,n),c.push(i?.props?.children)}else c.push(e)}),i?i=r.cloneElement(i,void 0,c):!l&&1===r.Children.count(o)&&r.isValidElement(o)&&(i=o);const s=i?oe(i):void 0,u=q(n,s);if(!i){if(o||0===o)throw new Error(l?ue(e):se(e));return o}const d=re(a,i.props??{});return i.type!==r.Fragment&&(d.ref=n?u:s),r.cloneElement(i,d)});return t.displayName=`${e}.Slot`,t}G(Z,"createSlot");var J=Z("Slot"),Q=Symbol.for("radix.slottable");function ee(e){const t=G(e=>"child"in e?e.children(e.child):e.children,"Slottable");return t.displayName=`${e}.Slottable`,t.__radixId=Q,t}G(ee,"createSlottable");var te=ee("Slottable"),ne=G((e,t)=>{if("child"in e.props){const t=e.props.child;return r.isValidElement(t)?r.cloneElement(t,void 0,e.props.children(t.props.children)):null}return r.isValidElement(t)?t:null},"getSlottableElementFromSlottable");function re(e,t){const n={...t};for(const r in t){const o=e[r],a=t[r];/^on[A-Z]/.test(r)?o&&a?n[r]=(...e)=>{const t=a(...e);return o(...e),t}:o&&(n[r]=o):"style"===r?n[r]={...o,...a}:"className"===r&&(n[r]=[o,a].filter(Boolean).join(" "))}return{...e,...n}}function oe(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}function ae(e){return r.isValidElement(e)&&"function"==typeof e.type&&"__radixId"in e.type&&e.type.__radixId===Q}G(re,"mergeProps"),G(oe,"getElementRef"),G(ae,"isSlottable");var ie=Symbol.for("react.lazy");function le(e){return null!=e&&"object"==typeof e&&"$$typeof"in e&&e.$$typeof===ie&&"_payload"in e&&ce(e._payload)}function ce(e){return"object"==typeof e&&null!==e&&"then"in e}G(le,"isLazyComponent"),G(ce,"isPromiseLike");var se=G(e=>`${e} failed to slot onto its children. Expected a single React element child or \`Slottable\`.`,"createSlotError"),ue=G(e=>`${e} failed to slot onto its \`Slottable\`. Expected \`Slottable\` to receive a single React element child.`,"createSlottableError"),de=r[" use ".trim().toString()],_e="SvgButton__-Jm";const pe=o((t,n)=>{const{className:r,asChild:o,...a}=t;return e(o?J:"button",{ref:n,className:C(_e,r),...a})});pe.displayName="SvgButton";const fe=a({size:48}),me=()=>i(fe);var ve={};const he=o((t,n)=>{const{className:r,onClick:o,...a}=t,{size:i}=me(),l=(e=>e<40?12:e<54?16:e<72?20:24)(i);return e(pe,{ref:n,className:C(ve.AvatarCloseButton,r),onClick:e=>{e.preventDefault(),o?.(e)},...a,children:e($,{width:l,height:l})})});he.displayName="AvatarCloseButton";const ge=e=>"string"==typeof e?e:`${e}px`,ye=e=>{const{options:t,content:n}=e,{asChild:r,children:o}=t;if(!r)return"function"==typeof n?n(o):n;const a=l.only(o);return c(a,{children:"function"==typeof n?n(a.props.children):n})},be=e=>void 0!==e&&!1!==e&&null!==e&&""!==e,Ce=()=>!!navigator.userAgent.match(/(iPad|iPhone|iPod)/g),xe=(...e)=>{const t=e.filter(Boolean);if(t.length<=1){return t[0]??null}return e=>{for(const n of t)"function"==typeof n?n(e):n&&(n.current=e)}},we=()=>{},Se=[{maxExclusive:40,size:"xs"},{maxExclusive:52,size:"s"},{maxExclusive:72,size:"m"}];var Te={AvatarContainer:"AvatarContainer__7c-",AvatarContainer_form_circle:"AvatarContainer_form_circle__J44",AvatarContainer__content:"AvatarContainer__content__h8v",AvatarContainer_form_squircle:"AvatarContainer_form_squircle__1i0",AvatarContainer__onlineStatus:"AvatarContainer__onlineStatus__cdV",AvatarContainer_onlineStatus_xs:"AvatarContainer_onlineStatus_xs__sy8",AvatarContainer_onlineStatus_s:"AvatarContainer_onlineStatus_s__YBz",AvatarContainer_onlineStatus_m:"AvatarContainer_onlineStatus_m__IU3",AvatarContainer_onlineStatus_l:"AvatarContainer_onlineStatus_l__X3w",AvatarContainer__overlay:"AvatarContainer__overlay__qul",AvatarContainer__rightBottomCorner:"AvatarContainer__rightBottomCorner__kZG",AvatarContainer__rightTopCorner:"AvatarContainer__rightTopCorner__y4y"};const Ne=o((n,r)=>{const{className:o,style:a,children:i,overlay:l,rightTopCorner:c,rightBottomCorner:s,innerClassNames:u,size:d=40,asChild:_,form:p="circle",onlineStatus:f=!1,...m}=n,v=_?J:"div",{normalizedSize:h,hasOnlineStatus:g,onlineStatusSize:y}=(({size:e,onlineStatus:t,isCircle:n})=>{const r=Number.isFinite(e)?Math.min(200,Math.max(16,e)):40;return{normalizedSize:r,hasOnlineStatus:t&&n&&r>=24&&r<=80,onlineStatusSize:(o=r,Se.find(({maxExclusive:e})=>o<e)?.size??"l")};var o})({size:d,onlineStatus:f,isCircle:"circle"===p}),b=!f&&h>24&&be(s),x=C(Te.AvatarContainer,Te[`AvatarContainer_form_${p}`],g&&Te.AvatarContainer_onlineStatus,g&&Te[`AvatarContainer_onlineStatus_${y}`],o);return e(fe.Provider,{value:{size:h},children:t(v,{ref:r,className:x,style:{"--MaxUi-AvatarContainer_size":`${h}px`,...a},...m,children:[e(te,{children:ye({options:{asChild:n.asChild,children:i},content:n=>t("span",{className:C(Te.AvatarContainer__content,u?.content),children:[n,be(l)&&e("span",{className:C(Te.AvatarContainer__overlay,u?.overlay),children:l})]},"subtree-container")})}),g&&e("span",{className:Te.AvatarContainer__onlineStatus,"aria-hidden":"true"}),b&&e("span",{className:C(Te.AvatarContainer__rightBottomCorner,u?.rightBottomCorner),children:s}),be(c)&&e("span",{className:C(Te.AvatarContainer__rightTopCorner,u?.rightTopCorner),children:c})]})})});Ne.displayName="AvatarContainer";var Ie="AvatarIcon__ZUI";const Ee=o((t,n)=>{const{className:r,...o}=t;return e("span",{ref:n,className:C(Ie,r),...o})});Ee.displayName="AvatarIcon";const Re=e=>{const{asChild:t,children:n,rootElement:r,disabled:o,loading:a,onClick:i}=e,l=Boolean(o||a),c=l?e=>{e.preventDefault()}:i;if(!t&&"button"===r){return{disabled:l,onClick:c,...a?{"aria-busy":!0,"aria-disabled":!0}:{}}}if(t&&s(n)){const{type:e}=n;if("a"===e){return{"aria-disabled":l,onClick:c,...a?{"aria-busy":!0}:{},...o?{tabIndex:-1}:{}}}}return{role:"button",tabIndex:o?-1:0,"aria-disabled":l,onClick:c,...a?{"aria-busy":!0}:{}}},ke=e=>{const t=u(e);return d(()=>{t.current=e}),_(()=>(...e)=>t.current?.(...e),[])},Ae=a({platform:"ios",colorScheme:"light"}),Me=()=>i(Ae),Be=()=>{const{colorScheme:e}=Me();return e},Le=({enabled:e,onClose:t,closeThreshold:n=80,moveThreshold:r=5})=>{const[o,a]=p(!1),[i,l]=p(0),c=u(0),s=u(0),d=u(!1),_=u(!1),f=u(!1),m=u(e);m.current=e;const v=u(t);v.current=t;const h=e=>{if(!d.current)return;d.current=!1;const t=s.current;a(!1),_.current&&(f.current=!0),t>n&&v.current(),l(0),e.currentTarget.releasePointerCapture(e.pointerId)};return{dragging:o,dragOffset:i,suppressClickRef:f,handlePointerDown:e=>{m.current&&("mouse"===e.pointerType&&0!==e.button||(c.current=e.clientY,_.current=!1,d.current=!0,s.current=0,a(!0),l(0),e.currentTarget.setPointerCapture(e.pointerId)))},handlePointerMove:e=>{if(!d.current)return;const t=Math.max(0,e.clientY-c.current);s.current=t,t>r&&(_.current=!0),l(t)},handlePointerUp:h,handlePointerCancel:h}},Pe=e=>{const{src:t,referrerPolicy:n}=e,[r,o]=p("idle");return f(()=>{if(!t)return void o("error");let e=!0;const r=new window.Image,a=t=>()=>{e&&o(t)};return o("loading"),r.onload=a("loaded"),r.onerror=a("error"),r.src=t,n&&(r.referrerPolicy=n),()=>{e=!1}},[t,n]),r},Oe=()=>{const{platform:e}=Me();return e},De=a(void 0);function Fe(){const e=i(De);if(!e)throw new Error("useSnackbar must be used within SnackbarProvider");return e}const ze=(e={})=>{const{listenChanges:t}=e,[n,r]=p(window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),o=e=>{r(()=>e.matches?"dark":"light")};return d(()=>{const e=window.matchMedia("(prefers-color-scheme: dark)");return r(()=>e.matches?"dark":"light"),t?(e.addEventListener("change",o),()=>{e.removeEventListener("change",o)}):we},[t]),n};var Ue={AvatarText:"AvatarText__DIj",AvatarText_gradient_red:"AvatarText_gradient_red__bnV",AvatarText_gradient_orange:"AvatarText_gradient_orange__Ngq",AvatarText_gradient_green:"AvatarText_gradient_green__n7Z",AvatarText_gradient_blue:"AvatarText_gradient_blue__gLu",AvatarText_gradient_purple:"AvatarText_gradient_purple__UsS",AvatarText__in:"AvatarText__in__cDg"};const $e=e=>e<20?{fontSize:6}:e<28?{fontSize:8}:e<32?{fontSize:10}:e<36?{fontSize:11}:e<40?{fontSize:13}:e<48?{fontSize:14}:e<54?{fontSize:17}:e<64?{fontSize:18}:e<72?{fontSize:21}:e<88?{fontSize:26}:{fontSize:30},He=o((t,n)=>{const{className:r,children:o,gradient:a="red",...i}=t,{size:l}=me(),c=C(Ue.AvatarText,{[Ue[`AvatarText_gradient_${a}`]]:"custom"!==a},r);return e("span",{ref:n,className:c,...i,children:e("span",{className:Ue.AvatarText__in,style:$e(l),children:o})})});He.displayName="AvatarText";var je="AvatarImage__H7-";const Ve=o((t,n)=>{const{className:r,fallback:o,fallbackGradient:a="red",...i}=t,[l,c]=p("idle"),s=Pe({src:i.src??i.srcSet,referrerPolicy:i.referrerPolicy}),u=ke(e=>{c(e)});return f(()=>{"idle"!==s&&u(s)},[s,u]),"error"===l?e(He,{gradient:a,children:o}):e("img",{ref:n,className:C(je,r),...i})});Ve.displayName="AvatarImage";var We="AvatarOverlay__-nV";const Ke=o((t,n)=>{const{className:r,onClick:o,...a}=t;return e("span",{ref:n,className:C(We,r),onClick:e=>{e.preventDefault(),o?.(e)},...a})});Ke.displayName="AvatarOverlay";const Ye=Object.assign({},{Container:Ne,Image:Ve,Overlay:Ke,Icon:Ee,Text:He,CloseButton:he});var qe={TypographyAction_variant_large:"TypographyAction_variant_large__l5j",TypographyAction_variant_medium:"TypographyAction_variant_medium__9H-",TypographyAction_variant_small:"TypographyAction_variant_small__-LL",TypographyAction_variant_xsmall:"TypographyAction_variant_xsmall__dcP"};const Xe=o((t,n)=>{const{className:r,variant:o="large",asChild:a,...i}=t,l=a?J:"span",c=C(qe.TypographyAction,qe[`TypographyAction_variant_${o}`],r);return e(l,{ref:n,className:c,...i})});Xe.displayName="TypographyAction";var Ge={TypographyBody_variant_large:"TypographyBody_variant_large__vlS","TypographyBody_variant_large-strong":"TypographyBody_variant_large-strong__V9x",TypographyBody_variant_medium:"TypographyBody_variant_medium__9v3","TypographyBody_variant_medium-strong":"TypographyBody_variant_medium-strong__bCQ",TypographyBody_variant_small:"TypographyBody_variant_small__beJ","TypographyBody_variant_small-strong":"TypographyBody_variant_small-strong__mWy"};const Ze=o((t,n)=>{const{className:r,variant:o="large-strong",asChild:a,...i}=t,l=a?J:"span",c=C(Ge.TypographyBody,Ge[`TypographyBody_variant_${o}`],r);return e(l,{ref:n,className:c,...i})});Ze.displayName="TypographyBody";var Je="TypographyDisplay__6MW";const Qe=o((t,n)=>{const{className:r,asChild:o,...a}=t;return e(o?J:"span",{ref:n,className:C(Je,r),...a})});Qe.displayName="TypographyDisplay";var et={"TypographyHeadline_variant_large-strong":"TypographyHeadline_variant_large-strong__mwz",TypographyHeadline_variant_medium:"TypographyHeadline_variant_medium__s92",TypographyHeadline_variant_small:"TypographyHeadline_variant_small__8Ei"};const tt=o((t,n)=>{const{className:r,variant:o="large-strong",asChild:a,...i}=t,l=a?J:"span",c=C(et.TypographyHeadline,et[`TypographyHeadline_variant_${o}`],r);return e(l,{ref:n,className:c,...i})});tt.displayName="TypographyHeadline";var nt={TypographyLabel_variant_large:"TypographyLabel_variant_large__6vr","TypographyLabel_variant_large-strong":"TypographyLabel_variant_large-strong__uCg",TypographyLabel_variant_medium:"TypographyLabel_variant_medium__Xo5","TypographyLabel_variant_medium-strong":"TypographyLabel_variant_medium-strong__Bk8",TypographyLabel_variant_small:"TypographyLabel_variant_small__dGi","TypographyLabel_variant_small-strong":"TypographyLabel_variant_small-strong__qCw"};const rt=o((t,n)=>{const{className:r,variant:o="large",asChild:a,...i}=t,l=a?J:"span",c=C(nt.TypographyLabel,nt[`TypographyLabel_variant_${o}`],r);return e(l,{ref:n,className:c,...i})});rt.displayName="TypographyLabel";var ot={TypographyText_variant_hero:"TypographyText_variant_hero__78f",TypographyText_variant_header:"TypographyText_variant_header__YA-",TypographyText_variant_subheader:"TypographyText_variant_subheader__8tX",TypographyText_variant_title:"TypographyText_variant_title__3HO",TypographyText_variant_body:"TypographyText_variant_body__-U7","TypographyText_variant_body-strong":"TypographyText_variant_body-strong__g4v",TypographyText_variant_detail:"TypographyText_variant_detail__2eL","TypographyText_variant_detail-strong":"TypographyText_variant_detail-strong__-9M",TypographyText_variant_description:"TypographyText_variant_description__FAg","TypographyText_variant_description-strong":"TypographyText_variant_description-strong__GYo",TypographyText_variant_label:"TypographyText_variant_label__s4i","TypographyText_variant_label-strong":"TypographyText_variant_label-strong__hPM",TypographyText_variant_tag:"TypographyText_variant_tag__6CN","TypographyText_variant_tag-strong":"TypographyText_variant_tag-strong__4DW",TypographyText_variant_note:"TypographyText_variant_note__QH-","TypographyText_variant_note-strong":"TypographyText_variant_note-strong__sWX","TypographyText_variant_action-large":"TypographyText_variant_action-large__Pa-","TypographyText_variant_action-medium":"TypographyText_variant_action-medium__Xyt","TypographyText_variant_action-small":"TypographyText_variant_action-small__mna","TypographyText_variant_action-xsmall":"TypographyText_variant_action-xsmall__IX0",TypographyText_color_primary:"TypographyText_color_primary__yhI",TypographyText_color_secondary:"TypographyText_color_secondary__ycW",TypographyText_color_tertiary:"TypographyText_color_tertiary__OTn",TypographyText_color_inherit:"TypographyText_color_inherit__hh5"};const at=o((t,n)=>{const{className:r,variant:o="body",color:a="inherit",asChild:i,...l}=t,c=i?J:"span",s=C(ot.TypographyText,ot[`TypographyText_variant_${o}`],ot[`TypographyText_color_${a}`],r);return e(c,{ref:n,className:s,...l})});at.displayName="TypographyText";var it={"TypographyTitle_variant_large-strong":"TypographyTitle_variant_large-strong__9PL",TypographyTitle_variant_medium:"TypographyTitle_variant_medium__TrJ","TypographyTitle_variant_medium-strong":"TypographyTitle_variant_medium-strong__th0",TypographyTitle_variant_small:"TypographyTitle_variant_small__zJR","TypographyTitle_variant_small-strong":"TypographyTitle_variant_small-strong__BrE"};const lt=o((t,n)=>{const{className:r,variant:o="large-strong",asChild:a,...i}=t,l=a?J:"span",c=C(it.TypographyTitle,it[`TypographyTitle_variant_${o}`],r);return e(l,{ref:n,className:c,...i})});lt.displayName="TypographyTitle";const ct=Object.assign({},{Display:Qe,Headline:tt,Title:lt,Body:Ze,Label:rt,Text:at,Action:Xe});var st="overlay__6xj",ut="overlayClosing__WO6",dt="sheet__FyU",_t="sheet_dragging__1LJ",pt="sheet_exiting__agq",ft="handle__028",mt="header__xaM",vt="content__qc2";const ht=({open:n,title:r,onClose:o,children:a,minHeight:i="auto",innerClassNames:l,enableDrag:c=!0})=>{const[s,u]=p(n?"open":"closed");d(()=>{u(e=>n?"open":"closed"===e?"closed":"exiting")},[n]);d(()=>{if("closed"===s)return;const e=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=e}},[s]),d(()=>{if("closed"===s)return;const e=e=>{"Escape"===e.key&&o()};return document.addEventListener("keydown",e),()=>{document.removeEventListener("keydown",e)}},[s,o]);const{dragging:_,dragOffset:f,suppressClickRef:m,handlePointerDown:v,handlePointerMove:h,handlePointerUp:g,handlePointerCancel:y}=Le({enabled:c&&"open"===s,onClose:()=>{u("exiting"),o()}});if("closed"===s)return null;const b="exiting"===s,x=_?`translateY(${f}px)`:`translateY(${b?100:0}%)`;return e("div",{className:C(st,{[ut]:b},l?.overlay),onClick:()=>{m.current?m.current=!1:o()},children:t("div",{className:C(dt,l?.sheet,{[_t]:_,[pt]:b}),style:{minHeight:i,transform:x},onClick:e=>e.stopPropagation(),onTransitionEnd:e=>{e.target===e.currentTarget&&"transform"===e.propertyName&&u(e=>"exiting"===e?"closed":e)},children:[c&&e("div",{className:C(ft,l?.handle),role:"button",tabIndex:0,"aria-label":"Перетащите вниз, чтобы закрыть",onPointerDown:v,onPointerMove:h,onPointerUp:g,onPointerCancel:y,onKeyDown:e=>{"Enter"!==e.key&&" "!==e.key||(e.preventDefault(),o())}}),r&&e("div",{className:C(mt,l?.header),children:e(ct.Title,{variant:"medium-strong",children:r})}),e("div",{className:vt,children:a})]})})};var gt="ClearableInput__4PN",yt="ClearableInput__button__iUo",bt="ClearableInput__count__K7Z";const Ct=e=>void 0===e||""===e||Array.isArray(e)&&0===e.length,xt=o((n,r)=>{const{className:o,onChange:a,innerClassNames:i,withClearButton:l=!0,disabled:c,count:s,...d}=n,_=u(null),f=void 0!==d.value,[m,v]=p(()=>Ct(d.defaultValue)),h=f?Ct(d.value):m;return t("span",{className:C(gt,o),children:[e("input",{ref:xe(_,r),className:C(i?.input),onChange:e=>{f||v(""===e.currentTarget.value),a?.(e)},disabled:c,...d}),!h&&!c&&!!s&&e("div",{className:C(bt,i?.count),children:s}),!h&&!c&&l&&e(pe,{type:"button",className:C(yt,i?.clearButton),onClick:()=>{_.current&&(e=>{const{el:t,value:n}=e,r=Object.getOwnPropertyDescriptor(HTMLInputElement.prototype,"value")?.set;r?.call(t,n);const o=new Event("input",{bubbles:!0});t.dispatchEvent(o)})({el:_.current,value:""})},"aria-label":"Очистить",children:e(A,{})})]})});xt.displayName="ClearableInput";var wt="Container__yZR",St="Container_fullWidth__2tY";const Tt=o((t,n)=>{const{className:r,asChild:o,fullWidth:a,...i}=t,l=o?J:"div",c=C(wt,{[St]:a},r);return e(l,{ref:n,className:c,...i})});Tt.displayName="Container";var Nt="EllipsisText__DEC",It="EllipsisText_multiline__y4t",Et="EllipsisText_singleLine__Arf";const Rt=o((t,n)=>{const{className:r,maxLines:o=1,style:a,asChild:i,...l}=t,c=i?J:"span",s=C(Nt,{[It]:o>1,[Et]:1===o},r);return e(c,{ref:n,className:s,style:{"--MaxUi-EllipsisText_linesCount":o,...a},...l})});Rt.displayName="EllipsisText";var kt="Flex__pih";const At=o((t,n)=>{const{className:r,display:o="flex",direction:a="row",align:i="flex-start",justify:l="start",asChild:c,wrap:s,style:u,gap:d,gapX:_,gapY:p,...f}=t;return e(c?J:"div",{ref:n,className:C(kt,r),style:{flexDirection:a,justifyContent:l,alignItems:i,flexWrap:s,...u,display:o,"--MaxUi-Flex_gapX":ge(_??d??0),"--MaxUi-Flex_gapY":ge(p??d??0)},...f})});At.displayName="Flex";var Mt="Grid__lFk";const Bt=o((t,n)=>{const{className:r,style:o,display:a="grid",align:i="start",justify:l="start",gap:c,gapX:s,gapY:u,cols:d,rows:_,asChild:p,...f}=t;return e(p?J:"div",{ref:n,className:C(Mt,r),style:{justifyContent:l,alignItems:i,...o,display:a,"--MaxUi-Grid_gapX":ge(s??c??0),"--MaxUi-Grid_gapY":ge(u??c??0),"--MaxUi-Grid_cols":d??0,"--MaxUi-Grid_rows":_??0},...f})});Bt.displayName="Grid";var Lt={Panel:"Panel__XH0",Panel_centeredX:"Panel_centeredX__DG7",Panel_centeredY:"Panel_centeredY__f-k",Panel_mode_primary:"Panel_mode_primary__fNs",Panel_mode_secondary:"Panel_mode_secondary__Tez"};const Pt=o((t,n)=>{const{className:r,mode:o="primary",centeredX:a,centeredY:i,...l}=t,c=C(Lt.Panel,Lt[`Panel_mode_${o}`],{[Lt.Panel_centeredX]:a,[Lt.Panel_centeredY]:i},r);return e("div",{ref:n,className:c,...l})});Pt.displayName="Panel";var Ot="Ripple__dJ9",Dt="Ripple_active__uv5";const Ft=o((t,n)=>{const{className:r,...o}=t,a=u(null),i=u(null),l=e=>{const t=e.currentTarget.getBoundingClientRect();((e,t)=>{null!==i.current&&(i.current.classList.remove(Dt),i.current.style.top=t+"px",i.current.style.left=e+"px",i.current.classList.add(Dt))})(e.clientX-(t.left??0),e.clientY-(t.top??0))};return d(()=>{if(i.current)return a.current=i.current.parentElement,null!==a.current&&a.current.addEventListener("pointerdown",l),()=>{null!==a.current&&a.current?.removeEventListener("pointerdown",l)}},[]),e("span",{ref:xe(n,i),role:"presentation","aria-hidden":!0,className:C(Ot,r),onAnimationEnd:()=>{null!==i.current&&i.current.classList.remove(Dt)},...o})});Ft.displayName="Ripple";var zt="Tappable__O--",Ut="Tappable_interactive__4Uv",$t="Tappable_disabled__0z8",Ht="Tappable_activeMode_ripple__3k-",jt="Tappable_activeMode_highlight__Hs-",Vt="Tappable__ripple__Egr";const Wt=o((n,r)=>{const{className:o,disabled:a,asChild:i,children:l,onClick:c,parentChildren:u,as:d="div",..._}=n,p=i?J:d,f=Oe(),m=Re({asChild:i,children:l,disabled:a,onClick:c,rootElement:d}),v=(({onClick:e,href:t,children:n,asChild:r,parentChildren:o=n})=>r?!(!r||!s(o))&&("href"in o.props||"onClick"in o.props):!!e||!!t)({onClick:c,href:_.href,children:l,asChild:i,parentChildren:u}),h="android"===f&&v&&!a,g=C(zt,{[Ut]:v,[$t]:a,[jt]:!h,[Ht]:h},o);return t(p,{ref:r,className:g,...v?m:{},..._,children:[l,h&&e(Ft,{className:Vt})]})});Wt.displayName="Tappable";var Kt={Spinner:"Spinner__piy",Spinner_appearance_primary:"Spinner_appearance_primary__mxz",Spinner_appearance_themed:"Spinner_appearance_themed__-9S","Spinner_appearance_primary-static":"Spinner_appearance_primary-static__JxW",Spinner_appearance_contrast:"Spinner_appearance_contrast__Mv6","Spinner_appearance_contrast-static":"Spinner_appearance_contrast-static__rM7",Spinner_appearance_negative:"Spinner_appearance_negative__eMf","Spinner_appearance_neutral-themed":"Spinner_appearance_neutral-themed__D8F",androidSpinner:"androidSpinner__w-L",rotation:"rotation__CUP",iosSpinner:"iosSpinner__3q2",bar:"bar__aHj",fade:"fade__2ZD"};const Yt=({size:t})=>e("div",{className:Kt.androidSpinner,style:{width:t,height:t}}),qt=({size:t})=>e("div",{className:Kt.iosSpinner,style:{width:t,height:t},children:Array.from({length:8},(t,n)=>e("div",{className:Kt.bar},n))}),Xt=o((t,n)=>{const{className:r,size:o=20,appearance:a="primary",...i}=t,l=Oe(),c=C(Kt.Spinner,Kt[`Spinner_appearance_${a}`],r);return e("span",{ref:n,role:"status",className:c,...i,children:e("ios"===l?qt:Yt,{size:o})})});Xt.displayName="Spinner";var Gt={Button:"Button__0OJ",Button_loading:"Button_loading__LD-",Button__iconBefore:"Button__iconBefore__BUe",Button__content:"Button__content__vnq",Button__indicator:"Button__indicator__HuA",Button__iconAfter:"Button__iconAfter__VhZ",Button_disabled:"Button_disabled__jkY",Button_stretched:"Button_stretched__mzq",Button_activeMode_ripple:"Button_activeMode_ripple__E5Y",Button_activeMode_highlight:"Button_activeMode_highlight__K3j",Button_size_xsmall:"Button_size_xsmall__QCm",Button_size_small:"Button_size_small__LLG",Button_size_medium:"Button_size_medium__fI9",Button_size_large:"Button_size_large__S2-",Button_variant_primary:"Button_variant_primary__yLL",Button_variant_secondary:"Button_variant_secondary__DR6",Button_variant_ghost:"Button_variant_ghost__EkG","Button_variant_primary-contrast":"Button_variant_primary-contrast__b63","Button_variant_secondary-contrast":"Button_variant_secondary-contrast__cey",Button_variant_overlay:"Button_variant_overlay__keO",Button_variant_destructive:"Button_variant_destructive__2Ug",Button__spinnerContainer:"Button__spinnerContainer__G4I",Button__ripple:"Button__ripple__jw0"},Zt={Counter:"Counter__0Oj",Counter_variant_primary:"Counter_variant_primary__8Mz","Counter_variant_primary-contrast":"Counter_variant_primary-contrast__yFz",Counter_variant_attention:"Counter_variant_attention__IWH","Counter_variant_attention-contrast":"Counter_variant_attention-contrast__LHu",Counter_variant_promo:"Counter_variant_promo__9kD",Counter_variant_static:"Counter_variant_static__d8Y","Counter_variant_static-contrast":"Counter_variant_static-contrast__bAq",Counter_variant_default:"Counter_variant_default__weZ",Counter_variant_mute:"Counter_variant_mute__2SU",Counter_variant_menu:"Counter_variant_menu__qf0"};const Jt=o((t,n)=>{const{className:r,value:o,rounded:a,variant:i="primary",...l}=t,c=C(Zt.Counter,Zt[`Counter_variant_${i}`],r),s=_(()=>a?Intl.NumberFormat("en",{notation:"compact"}).format(o):o,[a,o]);return e("span",{ref:n,className:c,...l,children:s})});Jt.displayName="Counter";const Qt=e=>{switch(e){case"xsmall":return 16;case"small":case"medium":return 20;case"large":return 24}},en=e=>{switch(e){case"primary":case"destructive":case"overlay":return"contrast-static";case"secondary":return"primary";case"ghost":return"themed";case"primary-contrast":case"secondary-contrast":return"primary-static"}},tn=e=>{switch(e){case"primary":return{variant:"primary-contrast"};case"secondary":case"ghost":case"primary-contrast":case"secondary-contrast":return{variant:"static"};case"overlay":return{variant:"static-contrast"};case"destructive":return{variant:"attention-contrast"}}},nn=o((n,r)=>{const{className:o,iconBefore:a,iconAfter:i,indicator:l,children:u,onClick:d,loading:_,disabled:p=!1,asChild:f=!1,innerClassNames:m,stretched:v=!1,size:h="medium",variant:g="primary",...y}=n,b="button",x=f?J:b,w=Oe(),S=Re({asChild:f,children:u,disabled:p,loading:_,onClick:d,rootElement:b}),T=p||_,N="android"===w,I=C(Gt.Button,Gt[`Button_variant_${g}`],Gt[`Button_size_${h}`],{[Gt.Button_loading]:_,[Gt.Button_disabled]:p,[Gt.Button_stretched]:v,[Gt.Button_activeMode_highlight]:!T&&!N,[Gt.Button_activeMode_ripple]:!T&&N},o);return t(x,{ref:r,className:I,...S,...y,children:[be(a)&&e("span",{className:C(Gt.Button__iconBefore,m?.iconBefore),children:a}),_&&e("span",{className:C(Gt.Button__spinnerContainer,m?.spinnerContainer),children:e(Xt,{className:C(m?.spinner),size:Qt(h),appearance:en(g)})}),e(te,{children:ye({options:{asChild:f,children:u},content:t=>e(Rt,{className:C(Gt.Button__content,m?.content),children:t},"subtree-container")})}),be(l)&&e("span",{className:C(Gt.Button__indicator,m?.indicator),children:(E=l,R=g,s(E)&&E.type===Jt?c(E,{...tn(R)}):E)}),be(i)&&e("span",{className:C(Gt.Button__iconAfter,m?.iconAfter),children:i}),N&&!T&&e(Ft,{className:Gt.Button__ripple})]});var E,R});nn.displayName="Button";var rn={CellAction:"CellAction__vzN",CellAction_mode_primary:"CellAction_mode_primary__vZQ",CellAction_disabled:"CellAction_disabled__VZA",CellAction_mode_secondary:"CellAction_mode_secondary__AJk",CellAction_mode_themed:"CellAction_mode_themed__-Gg",CellAction_mode_destructive:"CellAction_mode_destructive__ovY",CellAction_mode_custom:"CellAction_mode_custom__3T8",CellAction_height_compact:"CellAction_height_compact__ysc",CellAction_height_normal:"CellAction_height_normal__ELj",CellAction_surface_island:"CellAction_surface_island__REC",CellAction__before:"CellAction__before__oZm",CellAction__content:"CellAction__content__Uib",CellAction__chevron:"CellAction__chevron__6SI"};const on=o((n,r)=>{const{className:o,before:a,children:i,innerClassNames:l,asChild:c=!1,mode:s="primary",surface:u="default",height:d="normal",showChevron:_=!1,...p}=n,f=C(rn.CellAction,rn[`CellAction_mode_${s}`],rn[`CellAction_height_${d}`],{[rn.CellAction_surface_island]:"island"===u,[rn.CellAction_disabled]:p.disabled},o);return t(Wt,{ref:r,className:f,asChild:c,as:"button",parentChildren:i,...p,children:[be(a)&&e("span",{className:C(rn.CellAction__before,l?.before),children:a}),e(te,{children:ye({options:{asChild:c,children:i},content:t=>e("span",{className:C(rn.CellAction__content,l?.content),children:t},"subtree-container")})}),_&&e(E,{className:C(rn.CellAction__chevron,l?.chevron)})]})});on.displayName="CellAction";var an={CellHeader:"CellHeader__Epf",CellHeader_titleStyle_caps:"CellHeader_titleStyle_caps__nfB",CellHeader__content:"CellHeader__content__El-",CellHeader_titleStyle_normal:"CellHeader_titleStyle_normal__M-p",CellHeader_fullWidth:"CellHeader_fullWidth__h2Y",CellHeader__after:"CellHeader__after__RXN"};const ln=o((n,r)=>{const{className:o,titleStyle:a="caps",fullWidth:i=!1,children:l,after:c,innerClassNames:s,...u}=n,d=C(an.CellHeader,an[`CellHeader_titleStyle_${a}`],{[an.CellHeader_fullWidth]:i},o);return t("div",{ref:r,className:d,...u,children:[be(l)&&e("div",{className:C(an.CellHeader__content,s?.content),children:l}),be(c)&&e("div",{className:C(an.CellHeader__after,s?.after),children:c})]})});ln.displayName="CellHeader";var cn={CellInput:"CellInput__92-",CellInput_disabled:"CellInput_disabled__fZ7",CellInput__input:"CellInput__input__gQ3",CellInput_height_compact:"CellInput_height_compact__Mv2",CellInput_height_normal:"CellInput_height_normal__ovc",CellInput_surface_island:"CellInput_surface_island__cls",CellInput__before:"CellInput__before__Hkm",CellInput__body:"CellInput__body__Egp",CellInput__clearButton:"CellInput__clearButton__znK"};const sn=o((n,r)=>{const{className:o,before:a,innerClassNames:i,disabled:l,height:c="normal",surface:s="default",...u}=n,d=C(cn.CellInput,cn[`CellInput_height_${c}`],{[cn.CellInput_surface_island]:"island"===s,[cn.CellInput_disabled]:l},o);return t("label",{className:d,children:[be(a)&&e(Rt,{className:C(cn.CellInput__before,i?.before),maxLines:1,children:a}),e(xt,{ref:r,className:C(cn.CellInput__body,i?.body),innerClassNames:{input:C(cn.CellInput__input,i?.input),clearButton:C(cn.CellInput__clearButton,i?.clearButton)},type:"text",disabled:l,...u})]})});sn.displayName="CellInput";var un={CellList:"CellList__1ou",CellList_filled:"CellList_filled__ikE",CellList__body:"CellList__body__ouS",CellList_mode_island:"CellList_mode_island__aCu"};const dn=o((n,r)=>{const{className:o,header:a,children:i,mode:l="full-width",filled:c="island"===l,...s}=n,u=C(un.CellList,un[`CellList_mode_${l}`],{[un.CellList_filled]:c},o);return t("div",{ref:r,className:u,...s,children:[be(a)&&e("div",{className:un.CellList__header,children:a}),e("div",{className:un.CellList__body,children:i})]})});dn.displayName="CellList";var _n={CellSimple:"CellSimple__n0z",CellSimple_disabled:"CellSimple_disabled__T-3",CellSimple__title:"CellSimple__title__aYs",CellSimple__overline:"CellSimple__overline__Ncr",CellSimple__link:"CellSimple__link__ie-",CellSimple_subtitle_secondary:"CellSimple_subtitle_secondary__3uL",CellSimple__subtitle:"CellSimple__subtitle__oIF",CellSimple_subtitle_tertiary:"CellSimple_subtitle_tertiary__lz0",CellSimple_height_compact:"CellSimple_height_compact__HUQ",CellSimple_height_normal:"CellSimple_height_normal__pxj",CellSimple_surface_island:"CellSimple_surface_island__GzM",CellSimple__before:"CellSimple__before__5Q9",CellSimple__after:"CellSimple__after__2FK",CellSimple__content:"CellSimple__content__SOk",CellSimple__chevron:"CellSimple__chevron__cSs",CellSimple_separator:"CellSimple_separator__aOX"};const pn=o((n,r)=>{const{link:o,after:a,title:i,before:l,subtitle:c,children:s,overline:u,separator:d,className:_,innerClassNames:p,as:f="div",surface:m="default",height:v="normal",asChild:h=!1,disabled:g=!1,showChevron:y=!1,subtitleMode:b="secondary",...x}=n,w=C(_n.CellSimple,_n[`CellSimple_height_${v}`],_n[`CellSimple_subtitle_${b}`],{[_n.CellSimple_surface_island]:"island"===m,[_n.CellSimple_disabled]:g,[_n.CellSimple_separator]:d},_);return t(Wt,{ref:r,className:w,asChild:h,as:f,disabled:g,parentChildren:s,...x,children:[be(l)&&e("div",{className:C(_n.CellSimple__before,p?.before),children:l}),e(te,{children:ye({options:{asChild:h,children:s},content:n=>t("div",{className:C(_n.CellSimple__content,p?.content),children:[be(u)&&e("div",{className:C(_n.CellSimple__overline,p?.overline),children:u}),be(i)&&e("div",{className:C(_n.CellSimple__title,p?.title),children:i}),be(c)&&e("div",{className:C(_n.CellSimple__subtitle,p?.subtitle),children:c}),n,o&&e("a",{className:C(_n.CellSimple__link,p?.link),href:o,target:"_blank",rel:"noreferrer",children:o})]},"subtree-container")})}),(be(a)||y)&&t("div",{className:C(_n.CellSimple__after,p?.after),children:[a,y&&e(E,{className:C(_n.CellSimple__chevron,p?.chevron)})]})]})});pn.displayName="CellSimple";var fn="Checkbox__ChG",mn="Checkbox__control__FUK",vn="Checkbox__input__ow-",hn="Checkbox__box__svi",gn="Checkbox__icon__Fa7",yn="Checkbox__content__MrQ",bn="Checkbox__label__ZKY",Cn="Checkbox__caption__CRn",xn="Checkbox_animated__cbY",wn="Checkbox_indeterminate__wqC",Sn="Checkbox_disabled__Wvo";const Tn=o((n,r)=>{const{label:o,caption:a,indeterminate:i=!1,disabled:l,className:c,...s}=n,u=be(o),d=be(a),_=u||d,p=_?"label":"span",f=m(e=>{e&&(e.indeterminate=i)},[i]),v=C(fn,xn,{[wn]:i,[Sn]:l},c);return t(p,{className:v,children:[t("span",{className:mn,children:[e("input",{...s,ref:xe(r,f),type:"checkbox",disabled:l,"aria-checked":i?"mixed":void 0,className:vn}),e("span",{className:hn,children:e(T,{className:gn})})]}),_&&t("span",{className:yn,children:[u&&e("span",{className:bn,children:o}),d&&e("span",{className:Cn,children:a})]})]})});function Nn(){return"undefined"!=typeof window}function In(e){return kn(e)?(e.nodeName||"").toLowerCase():"#document"}function En(e){var t;return(null==e||null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function Rn(e){var t;return null==(t=(kn(e)?e.ownerDocument:e.document)||window.document)?void 0:t.documentElement}function kn(e){return!!Nn()&&(e instanceof Node||e instanceof En(e).Node)}function An(e){return!!Nn()&&(e instanceof Element||e instanceof En(e).Element)}function Mn(e){return!!Nn()&&(e instanceof HTMLElement||e instanceof En(e).HTMLElement)}function Bn(e){return!(!Nn()||"undefined"==typeof ShadowRoot)&&(e instanceof ShadowRoot||e instanceof En(e).ShadowRoot)}function Ln(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=Vn(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&"inline"!==o&&"contents"!==o}function Pn(e){return/^(table|td|th)$/.test(In(e))}function On(e){try{if(e.matches(":popover-open"))return!0}catch(e){}try{return e.matches(":modal")}catch(e){return!1}}Tn.displayName="Checkbox";const Dn=/transform|translate|scale|rotate|perspective|filter/,Fn=/paint|layout|strict|content/,zn=e=>!!e&&"none"!==e;let Un;function $n(e){const t=An(e)?Vn(e):e;return zn(t.transform)||zn(t.translate)||zn(t.scale)||zn(t.rotate)||zn(t.perspective)||!Hn()&&(zn(t.backdropFilter)||zn(t.filter))||Dn.test(t.willChange||"")||Fn.test(t.contain||"")}function Hn(){return null==Un&&(Un="undefined"!=typeof CSS&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),Un}function jn(e){return/^(html|body|#document)$/.test(In(e))}function Vn(e){return En(e).getComputedStyle(e)}function Wn(e){return An(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Kn(e){if("html"===In(e))return e;const t=e.assignedSlot||e.parentNode||Bn(e)&&e.host||Rn(e);return Bn(t)?t.host:t}function Yn(e){const t=Kn(e);return jn(t)?(e.ownerDocument||e).body:Mn(t)&&Ln(t)?t:Yn(t)}function qn(e,t,n){var r;void 0===t&&(t=[]),void 0===n&&(n=!0);const o=Yn(e),a=o===(null==(r=e.ownerDocument)?void 0:r.body),i=En(o);if(a){const e=Xn(i);return t.concat(i,i.visualViewport||[],Ln(o)?o:[],e&&n?qn(e):[])}return t.concat(o,qn(o,[],n))}function Xn(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}const Gn=Math.min,Zn=Math.max,Jn=Math.round,Qn=Math.floor,er=e=>({x:e,y:e}),tr={left:"right",right:"left",bottom:"top",top:"bottom"};function nr(e,t){return"function"==typeof e?e(t):e}function rr(e){return e.split("-")[0]}function or(e){return e.split("-")[1]}function ar(e){return"x"===e?"y":"x"}function ir(e){return"y"===e?"height":"width"}function lr(e){const t=e[0];return"t"===t||"b"===t?"y":"x"}function cr(e){return ar(lr(e))}function sr(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}const ur=["left","right"],dr=["right","left"],_r=["top","bottom"],pr=["bottom","top"];function fr(e,t,n,r){const o=or(e);let a=function(e,t,n){switch(e){case"top":case"bottom":return n?t?dr:ur:t?ur:dr;case"left":case"right":return t?_r:pr;default:return[]}}(rr(e),"start"===n,r);return o&&(a=a.map(e=>e+"-"+o),t&&(a=a.concat(a.map(sr)))),a}function mr(e){const t=rr(e);return tr[t]+e.slice(t.length)}function vr(e){const{x:t,y:n,width:r,height:o}=e;return{width:r,height:o,top:n,left:t,right:t+r,bottom:n+o,x:t,y:n}}
|
|
1
|
+
import{jsx as e,jsxs as t,Fragment as n}from"react/jsx-runtime";import*as r from"react";import{forwardRef as o,createContext as a,useContext as i,Children as l,cloneElement as c,isValidElement as s,useRef as u,useEffect as d,useMemo as _,useState as p,useLayoutEffect as f,useCallback as m,Fragment as h,useId as v}from"react";import*as g from"react-dom";import{createPortal as y}from"react-dom";function b(e){var t,n,r="";if("string"==typeof e||"number"==typeof e)r+=e;else if("object"==typeof e)if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(n=b(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function C(){for(var e,t,n=0,r="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=b(e))&&(r&&(r+=" "),r+=t);return r}var x;function w(){return w=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},w.apply(null,arguments)}var S,T=function(e){return r.createElement("svg",w({xmlns:"http://www.w3.org/2000/svg",width:16,height:16,fill:"none"},e),x||(x=r.createElement("path",{fill:"currentColor",fillRule:"evenodd",d:"M13.28 3.72a.75.75 0 0 1 0 1.06l-6.5 6.5a.75.75 0 0 1-1.06 0l-3-3a.75.75 0 0 1 1.06-1.06l2.47 2.47 5.97-5.97a.75.75 0 0 1 1.06 0",clipRule:"evenodd"})))};function N(){return N=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},N.apply(null,arguments)}var I,E=function(e){return r.createElement("svg",N({xmlns:"http://www.w3.org/2000/svg",width:12,height:16,fill:"none"},e),S||(S=r.createElement("path",{fill:"currentColor",fillRule:"evenodd",d:"M2.934 3.434a.8.8 0 0 1 1.132 0l4 4a.8.8 0 0 1 0 1.132l-4 4a.8.8 0 0 1-1.132-1.132L6.37 8 2.934 4.566a.8.8 0 0 1 0-1.132",clipRule:"evenodd"})))};function R(){return R=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},R.apply(null,arguments)}var k,A,M,B=function(e){return r.createElement("svg",R({xmlns:"http://www.w3.org/2000/svg",width:16,height:16,fill:"none"},e),I||(I=r.createElement("path",{fill:"currentColor",fillRule:"evenodd",d:"M8 16A8 8 0 1 0 8 0a8 8 0 0 0 0 16M5.566 4.434a.8.8 0 1 0-1.132 1.132L6.87 8l-2.435 2.434a.8.8 0 0 0 1.132 1.132L8 9.13l2.434 2.435a.8.8 0 0 0 1.132-1.132L9.13 8l2.435-2.434a.8.8 0 0 0-1.132-1.132L8 6.87z",clipRule:"evenodd"})))};function L(){return L=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},L.apply(null,arguments)}var P,O=function(e){return r.createElement("svg",L({xmlns:"http://www.w3.org/2000/svg",width:16,height:16,fill:"none","aria-hidden":"true"},e),k||(k=r.createElement("circle",{cx:8,cy:8,r:7,stroke:"currentColor",strokeWidth:1.5})),A||(A=r.createElement("circle",{cx:8,cy:4.75,r:1,fill:"currentColor"})),M||(M=r.createElement("rect",{width:1.5,height:5,x:7.25,y:6.75,fill:"currentColor",rx:.75})))};function D(){return D=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},D.apply(null,arguments)}var F,z=function(e){return r.createElement("svg",D({xmlns:"http://www.w3.org/2000/svg",width:16,height:16,fill:"none"},e),P||(P=r.createElement("path",{fill:"currentColor",fillRule:"evenodd",d:"M7.242 2.115c-2.605 0-4.677 2.044-4.677 4.517s2.072 4.517 4.677 4.517 4.677-2.044 4.677-4.517-2.072-4.517-4.677-4.517M1 6.632C1 3.252 3.817.55 7.242.55s6.242 2.701 6.242 6.082a5.97 5.97 0 0 1-1.692 4.165l3 3.247a.783.783 0 1 1-1.15 1.062l-3.074-3.326a6.34 6.34 0 0 1-3.326.935C3.817 12.715 1 10.013 1 6.632",clipRule:"evenodd"})))};function $(){return $=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},$.apply(null,arguments)}var U,H,j=function(e){return r.createElement("svg",$({xmlns:"http://www.w3.org/2000/svg",width:20,height:20,fill:"none"},e),F||(F=r.createElement("path",{fill:"currentColor",fillRule:"evenodd",d:"M4.364 4.364a.9.9 0 0 1 1.272 0L10 8.727l4.364-4.363a.9.9 0 0 1 1.272 1.272L11.273 10l4.363 4.364a.9.9 0 0 1-1.272 1.272L10 11.273l-4.364 4.363a.9.9 0 0 1-1.272-1.272L8.727 10 4.364 5.636a.9.9 0 0 1 0-1.272",clipRule:"evenodd"})))};function W(){return W=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},W.apply(null,arguments)}var V,K=function(e){return r.createElement("svg",W({xmlns:"http://www.w3.org/2000/svg",width:20,height:20,fill:"none"},e),U||(U=r.createElement("circle",{cx:10,cy:10,r:10,fill:"currentColor"})),H||(H=r.createElement("path",{fill:"#fff",fillRule:"evenodd",d:"M5.364 5.364a.9.9 0 0 1 1.272 0L10 8.727l3.364-3.363a.9.9 0 0 1 1.272 1.272L11.274 10l3.364 3.364a.9.9 0 1 1-1.273 1.272L10 11.273l-3.364 3.363a.9.9 0 0 1-1.272-1.272L8.727 10 5.364 6.636a.9.9 0 0 1 0-1.272",clipRule:"evenodd"})))};function Y(){return Y=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Y.apply(null,arguments)}var q=function(e){return r.createElement("svg",Y({xmlns:"http://www.w3.org/2000/svg",width:24,height:24,fill:"none"},e),V||(V=r.createElement("path",{fill:"currentColor",fillRule:"evenodd",d:"M6.268 6.268a.915.915 0 0 1 1.294 0L12 10.706l4.438-4.438a.915.915 0 1 1 1.294 1.294L13.294 12l4.438 4.438a.915.915 0 1 1-1.294 1.294L12 13.294l-4.438 4.438a.915.915 0 1 1-1.294-1.294L10.706 12 6.268 7.562a.915.915 0 0 1 0-1.294",clipRule:"evenodd"})))},X=Object.defineProperty,G=(e,t)=>X(e,"name",{value:t,configurable:!0});function Z(e,t){if("function"==typeof e)return e(t);null!=e&&(e.current=t)}function J(...e){return t=>{let n=!1;const r=e.map(e=>{const r=Z(e,t);return n||"function"!=typeof r||(n=!0),r});if(n)return()=>{for(let t=0;t<r.length;t++){const n=r[t];"function"==typeof n?n():Z(e[t],null)}}}}function Q(...e){return r.useCallback(J(...e),e)}G(Z,"setRef"),G(J,"composeRefs"),G(Q,"useComposedRefs");var ee=Object.defineProperty,te=(e,t)=>ee(e,"name",{value:t,configurable:!0});function ne(e){const t=r.forwardRef((t,n)=>{let{children:o,...a}=t,i=null,l=!1;const c=[];_e(o)&&"function"==typeof he&&(o=he(o._payload)),r.Children.forEach(o,e=>{if(ue(e)){l=!0;const t=e;let n="child"in t.props?t.props.child:t.props.children;_e(n)&&"function"==typeof he&&(n=he(n._payload)),i=le(t,n),c.push(i?.props?.children)}else c.push(e)}),i?i=r.cloneElement(i,void 0,c):!l&&1===r.Children.count(o)&&r.isValidElement(o)&&(i=o);const s=i?se(i):void 0,u=Q(n,s);if(!i){if(o||0===o)throw new Error(l?me(e):fe(e));return o}const d=ce(a,i.props??{});return i.type!==r.Fragment&&(d.ref=n?u:s),r.cloneElement(i,d)});return t.displayName=`${e}.Slot`,t}te(ne,"createSlot");var re=ne("Slot"),oe=Symbol.for("radix.slottable");function ae(e){const t=te(e=>"child"in e?e.children(e.child):e.children,"Slottable");return t.displayName=`${e}.Slottable`,t.__radixId=oe,t}te(ae,"createSlottable");var ie=ae("Slottable"),le=te((e,t)=>{if("child"in e.props){const t=e.props.child;return r.isValidElement(t)?r.cloneElement(t,void 0,e.props.children(t.props.children)):null}return r.isValidElement(t)?t:null},"getSlottableElementFromSlottable");function ce(e,t){const n={...t};for(const r in t){const o=e[r],a=t[r];/^on[A-Z]/.test(r)?o&&a?n[r]=(...e)=>{const t=a(...e);return o(...e),t}:o&&(n[r]=o):"style"===r?n[r]={...o,...a}:"className"===r&&(n[r]=[o,a].filter(Boolean).join(" "))}return{...e,...n}}function se(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}function ue(e){return r.isValidElement(e)&&"function"==typeof e.type&&"__radixId"in e.type&&e.type.__radixId===oe}te(ce,"mergeProps"),te(se,"getElementRef"),te(ue,"isSlottable");var de=Symbol.for("react.lazy");function _e(e){return null!=e&&"object"==typeof e&&"$$typeof"in e&&e.$$typeof===de&&"_payload"in e&&pe(e._payload)}function pe(e){return"object"==typeof e&&null!==e&&"then"in e}te(_e,"isLazyComponent"),te(pe,"isPromiseLike");var fe=te(e=>`${e} failed to slot onto its children. Expected a single React element child or \`Slottable\`.`,"createSlotError"),me=te(e=>`${e} failed to slot onto its \`Slottable\`. Expected \`Slottable\` to receive a single React element child.`,"createSlottableError"),he=r[" use ".trim().toString()],ve="SvgButton__-Jm";const ge=o((t,n)=>{const{className:r,asChild:o,...a}=t;return e(o?re:"button",{ref:n,className:C(ve,r),...a})});ge.displayName="SvgButton";const ye=a({size:48}),be=()=>i(ye);var Ce={};const xe=o((t,n)=>{const{className:r,onClick:o,...a}=t,{size:i}=be(),l=(e=>e<40?12:e<54?16:e<72?20:24)(i);return e(ge,{ref:n,className:C(Ce.AvatarCloseButton,r),onClick:e=>{e.preventDefault(),o?.(e)},...a,children:e(K,{width:l,height:l})})});xe.displayName="AvatarCloseButton";const we=e=>"string"==typeof e?e:`${e}px`,Se=e=>{const{options:t,content:n}=e,{asChild:r,children:o}=t;if(!r)return"function"==typeof n?n(o):n;const a=l.only(o);return c(a,{children:"function"==typeof n?n(a.props.children):n})},Te=e=>void 0!==e&&!1!==e&&null!==e&&""!==e,Ne=()=>!!navigator.userAgent.match(/(iPad|iPhone|iPod)/g),Ie=(...e)=>{const t=e.filter(Boolean);if(t.length<=1){return t[0]??null}return e=>{for(const n of t)"function"==typeof n?n(e):n&&(n.current=e)}},Ee=()=>{},Re=[{maxExclusive:40,size:"xs"},{maxExclusive:52,size:"s"},{maxExclusive:72,size:"m"}];var ke={AvatarContainer:"AvatarContainer__7c-",AvatarContainer_form_circle:"AvatarContainer_form_circle__J44",AvatarContainer__content:"AvatarContainer__content__h8v",AvatarContainer_form_squircle:"AvatarContainer_form_squircle__1i0",AvatarContainer__onlineStatus:"AvatarContainer__onlineStatus__cdV",AvatarContainer_onlineStatus_xs:"AvatarContainer_onlineStatus_xs__sy8",AvatarContainer_onlineStatus_s:"AvatarContainer_onlineStatus_s__YBz",AvatarContainer_onlineStatus_m:"AvatarContainer_onlineStatus_m__IU3",AvatarContainer_onlineStatus_l:"AvatarContainer_onlineStatus_l__X3w",AvatarContainer__overlay:"AvatarContainer__overlay__qul",AvatarContainer__rightBottomCorner:"AvatarContainer__rightBottomCorner__kZG",AvatarContainer__rightTopCorner:"AvatarContainer__rightTopCorner__y4y"};const Ae=o((n,r)=>{const{className:o,style:a,children:i,overlay:l,rightTopCorner:c,rightBottomCorner:s,innerClassNames:u,size:d=40,asChild:_,form:p="circle",onlineStatus:f=!1,...m}=n,h=_?re:"div",{normalizedSize:v,hasOnlineStatus:g,onlineStatusSize:y}=(({size:e,onlineStatus:t,isCircle:n})=>{const r=Number.isFinite(e)?Math.min(200,Math.max(16,e)):40;return{normalizedSize:r,hasOnlineStatus:t&&n&&r>=24&&r<=80,onlineStatusSize:(o=r,Re.find(({maxExclusive:e})=>o<e)?.size??"l")};var o})({size:d,onlineStatus:f,isCircle:"circle"===p}),b=!f&&v>24&&Te(s),x=C(ke.AvatarContainer,ke[`AvatarContainer_form_${p}`],g&&ke.AvatarContainer_onlineStatus,g&&ke[`AvatarContainer_onlineStatus_${y}`],o);return e(ye.Provider,{value:{size:v},children:t(h,{ref:r,className:x,style:{"--MaxUi-AvatarContainer_size":`${v}px`,...a},...m,children:[e(ie,{children:Se({options:{asChild:n.asChild,children:i},content:n=>t("span",{className:C(ke.AvatarContainer__content,u?.content),children:[n,Te(l)&&e("span",{className:C(ke.AvatarContainer__overlay,u?.overlay),children:l})]},"subtree-container")})}),g&&e("span",{className:ke.AvatarContainer__onlineStatus,"aria-hidden":"true"}),b&&e("span",{className:C(ke.AvatarContainer__rightBottomCorner,u?.rightBottomCorner),children:s}),Te(c)&&e("span",{className:C(ke.AvatarContainer__rightTopCorner,u?.rightTopCorner),children:c})]})})});Ae.displayName="AvatarContainer";var Me="AvatarIcon__ZUI";const Be=o((t,n)=>{const{className:r,...o}=t;return e("span",{ref:n,className:C(Me,r),...o})});Be.displayName="AvatarIcon";const Le=e=>{const{asChild:t,children:n,rootElement:r,disabled:o,loading:a,onClick:i}=e,l=Boolean(o||a),c=l?e=>{e.preventDefault()}:i;if(!t&&"button"===r){return{disabled:l,onClick:c,...a?{"aria-busy":!0,"aria-disabled":!0}:{}}}if(t&&s(n)){const{type:e}=n;if("a"===e){return{"aria-disabled":l,onClick:c,...a?{"aria-busy":!0}:{},...o?{tabIndex:-1}:{}}}}return{role:"button",tabIndex:o?-1:0,"aria-disabled":l,onClick:c,...a?{"aria-busy":!0}:{}}},Pe=e=>{const t=u(e);return d(()=>{t.current=e}),_(()=>(...e)=>t.current?.(...e),[])},Oe=a({platform:"ios",colorScheme:"light"}),De=()=>i(Oe),Fe=()=>{const{colorScheme:e}=De();return e},ze=({enabled:e,onClose:t,closeThreshold:n=80,moveThreshold:r=5})=>{const[o,a]=p(!1),[i,l]=p(0),c=u(0),s=u(0),d=u(!1),_=u(!1),f=u(!1),m=u(e);m.current=e;const h=u(t);h.current=t;const v=e=>{if(!d.current)return;d.current=!1;const t=s.current;a(!1),_.current&&(f.current=!0),t>n&&h.current(),l(0),e.currentTarget.releasePointerCapture(e.pointerId)};return{dragging:o,dragOffset:i,suppressClickRef:f,handlePointerDown:e=>{m.current&&("mouse"===e.pointerType&&0!==e.button||(c.current=e.clientY,_.current=!1,d.current=!0,s.current=0,a(!0),l(0),e.currentTarget.setPointerCapture(e.pointerId)))},handlePointerMove:e=>{if(!d.current)return;const t=Math.max(0,e.clientY-c.current);s.current=t,t>r&&(_.current=!0),l(t)},handlePointerUp:v,handlePointerCancel:v}},$e=e=>{const{src:t,referrerPolicy:n}=e,[r,o]=p("idle");return f(()=>{if(!t)return void o("error");let e=!0;const r=new window.Image,a=t=>()=>{e&&o(t)};return o("loading"),r.onload=a("loaded"),r.onerror=a("error"),r.src=t,n&&(r.referrerPolicy=n),()=>{e=!1}},[t,n]),r},Ue=()=>{const{platform:e}=De();return e},He=a(void 0);function je(){const e=i(He);if(!e)throw new Error("useSnackbar must be used within SnackbarProvider");return e}const We=(e={})=>{const{listenChanges:t}=e,[n,r]=p(window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),o=e=>{r(()=>e.matches?"dark":"light")};return d(()=>{const e=window.matchMedia("(prefers-color-scheme: dark)");return r(()=>e.matches?"dark":"light"),t?(e.addEventListener("change",o),()=>{e.removeEventListener("change",o)}):Ee},[t]),n};var Ve={AvatarText:"AvatarText__DIj",AvatarText_gradient_red:"AvatarText_gradient_red__bnV",AvatarText_gradient_orange:"AvatarText_gradient_orange__Ngq",AvatarText_gradient_green:"AvatarText_gradient_green__n7Z",AvatarText_gradient_blue:"AvatarText_gradient_blue__gLu",AvatarText_gradient_purple:"AvatarText_gradient_purple__UsS",AvatarText__in:"AvatarText__in__cDg"};const Ke=e=>e<20?{fontSize:6}:e<28?{fontSize:8}:e<32?{fontSize:10}:e<36?{fontSize:11}:e<40?{fontSize:13}:e<48?{fontSize:14}:e<54?{fontSize:17}:e<64?{fontSize:18}:e<72?{fontSize:21}:e<88?{fontSize:26}:{fontSize:30},Ye=o((t,n)=>{const{className:r,children:o,gradient:a="red",...i}=t,{size:l}=be(),c=C(Ve.AvatarText,{[Ve[`AvatarText_gradient_${a}`]]:"custom"!==a},r);return e("span",{ref:n,className:c,...i,children:e("span",{className:Ve.AvatarText__in,style:Ke(l),children:o})})});Ye.displayName="AvatarText";var qe="AvatarImage__H7-";const Xe=o((t,n)=>{const{className:r,fallback:o,fallbackGradient:a="red",...i}=t,[l,c]=p("idle"),s=$e({src:i.src??i.srcSet,referrerPolicy:i.referrerPolicy}),u=Pe(e=>{c(e)});return f(()=>{"idle"!==s&&u(s)},[s,u]),"error"===l?e(Ye,{gradient:a,children:o}):e("img",{ref:n,className:C(qe,r),...i})});Xe.displayName="AvatarImage";var Ge="AvatarOverlay__-nV";const Ze=o((t,n)=>{const{className:r,onClick:o,...a}=t;return e("span",{ref:n,className:C(Ge,r),onClick:e=>{e.preventDefault(),o?.(e)},...a})});Ze.displayName="AvatarOverlay";const Je=Object.assign({},{Container:Ae,Image:Xe,Overlay:Ze,Icon:Be,Text:Ye,CloseButton:xe});var Qe={TypographyAction_variant_large:"TypographyAction_variant_large__l5j",TypographyAction_variant_medium:"TypographyAction_variant_medium__9H-",TypographyAction_variant_small:"TypographyAction_variant_small__-LL",TypographyAction_variant_xsmall:"TypographyAction_variant_xsmall__dcP"};const et=o((t,n)=>{const{className:r,variant:o="large",asChild:a,...i}=t,l=a?re:"span",c=C(Qe.TypographyAction,Qe[`TypographyAction_variant_${o}`],r);return e(l,{ref:n,className:c,...i})});et.displayName="TypographyAction";var tt={TypographyBody_variant_large:"TypographyBody_variant_large__vlS","TypographyBody_variant_large-strong":"TypographyBody_variant_large-strong__V9x",TypographyBody_variant_medium:"TypographyBody_variant_medium__9v3","TypographyBody_variant_medium-strong":"TypographyBody_variant_medium-strong__bCQ",TypographyBody_variant_small:"TypographyBody_variant_small__beJ","TypographyBody_variant_small-strong":"TypographyBody_variant_small-strong__mWy"};const nt=o((t,n)=>{const{className:r,variant:o="large-strong",asChild:a,...i}=t,l=a?re:"span",c=C(tt.TypographyBody,tt[`TypographyBody_variant_${o}`],r);return e(l,{ref:n,className:c,...i})});nt.displayName="TypographyBody";var rt="TypographyDisplay__6MW";const ot=o((t,n)=>{const{className:r,asChild:o,...a}=t;return e(o?re:"span",{ref:n,className:C(rt,r),...a})});ot.displayName="TypographyDisplay";var at={"TypographyHeadline_variant_large-strong":"TypographyHeadline_variant_large-strong__mwz",TypographyHeadline_variant_medium:"TypographyHeadline_variant_medium__s92",TypographyHeadline_variant_small:"TypographyHeadline_variant_small__8Ei"};const it=o((t,n)=>{const{className:r,variant:o="large-strong",asChild:a,...i}=t,l=a?re:"span",c=C(at.TypographyHeadline,at[`TypographyHeadline_variant_${o}`],r);return e(l,{ref:n,className:c,...i})});it.displayName="TypographyHeadline";var lt={TypographyLabel_variant_large:"TypographyLabel_variant_large__6vr","TypographyLabel_variant_large-strong":"TypographyLabel_variant_large-strong__uCg",TypographyLabel_variant_medium:"TypographyLabel_variant_medium__Xo5","TypographyLabel_variant_medium-strong":"TypographyLabel_variant_medium-strong__Bk8",TypographyLabel_variant_small:"TypographyLabel_variant_small__dGi","TypographyLabel_variant_small-strong":"TypographyLabel_variant_small-strong__qCw"};const ct=o((t,n)=>{const{className:r,variant:o="large",asChild:a,...i}=t,l=a?re:"span",c=C(lt.TypographyLabel,lt[`TypographyLabel_variant_${o}`],r);return e(l,{ref:n,className:c,...i})});ct.displayName="TypographyLabel";var st={TypographyText_variant_hero:"TypographyText_variant_hero__78f",TypographyText_variant_header:"TypographyText_variant_header__YA-",TypographyText_variant_subheader:"TypographyText_variant_subheader__8tX",TypographyText_variant_title:"TypographyText_variant_title__3HO",TypographyText_variant_body:"TypographyText_variant_body__-U7","TypographyText_variant_body-strong":"TypographyText_variant_body-strong__g4v",TypographyText_variant_detail:"TypographyText_variant_detail__2eL","TypographyText_variant_detail-strong":"TypographyText_variant_detail-strong__-9M",TypographyText_variant_description:"TypographyText_variant_description__FAg","TypographyText_variant_description-strong":"TypographyText_variant_description-strong__GYo",TypographyText_variant_label:"TypographyText_variant_label__s4i","TypographyText_variant_label-strong":"TypographyText_variant_label-strong__hPM",TypographyText_variant_tag:"TypographyText_variant_tag__6CN","TypographyText_variant_tag-strong":"TypographyText_variant_tag-strong__4DW",TypographyText_variant_note:"TypographyText_variant_note__QH-","TypographyText_variant_note-strong":"TypographyText_variant_note-strong__sWX","TypographyText_variant_action-large":"TypographyText_variant_action-large__Pa-","TypographyText_variant_action-medium":"TypographyText_variant_action-medium__Xyt","TypographyText_variant_action-small":"TypographyText_variant_action-small__mna","TypographyText_variant_action-xsmall":"TypographyText_variant_action-xsmall__IX0",TypographyText_color_primary:"TypographyText_color_primary__yhI",TypographyText_color_secondary:"TypographyText_color_secondary__ycW",TypographyText_color_tertiary:"TypographyText_color_tertiary__OTn",TypographyText_color_inherit:"TypographyText_color_inherit__hh5"};const ut=o((t,n)=>{const{className:r,variant:o="body",color:a="inherit",asChild:i,...l}=t,c=i?re:"span",s=C(st.TypographyText,st[`TypographyText_variant_${o}`],st[`TypographyText_color_${a}`],r);return e(c,{ref:n,className:s,...l})});ut.displayName="TypographyText";var dt={"TypographyTitle_variant_large-strong":"TypographyTitle_variant_large-strong__9PL",TypographyTitle_variant_medium:"TypographyTitle_variant_medium__TrJ","TypographyTitle_variant_medium-strong":"TypographyTitle_variant_medium-strong__th0",TypographyTitle_variant_small:"TypographyTitle_variant_small__zJR","TypographyTitle_variant_small-strong":"TypographyTitle_variant_small-strong__BrE"};const _t=o((t,n)=>{const{className:r,variant:o="large-strong",asChild:a,...i}=t,l=a?re:"span",c=C(dt.TypographyTitle,dt[`TypographyTitle_variant_${o}`],r);return e(l,{ref:n,className:c,...i})});_t.displayName="TypographyTitle";const pt=Object.assign({},{Display:ot,Headline:it,Title:_t,Body:nt,Label:ct,Text:ut,Action:et});var ft="overlay__6xj",mt="overlayClosing__WO6",ht="sheet__FyU",vt="sheet_dragging__1LJ",gt="sheet_exiting__agq",yt="handle__028",bt="header__xaM",Ct="content__qc2";const xt=({open:n,title:r,onClose:o,children:a,minHeight:i="auto",innerClassNames:l,enableDrag:c=!0})=>{const[s,u]=p(n?"open":"closed");d(()=>{u(e=>n?"open":"closed"===e?"closed":"exiting")},[n]);d(()=>{if("closed"===s)return;const e=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=e}},[s]),d(()=>{if("closed"===s)return;const e=e=>{"Escape"===e.key&&o()};return document.addEventListener("keydown",e),()=>{document.removeEventListener("keydown",e)}},[s,o]),d(()=>{if("exiting"!==s)return;const e=setTimeout(()=>u("closed"),300);return()=>clearTimeout(e)},[s]);const{dragging:_,dragOffset:f,suppressClickRef:m,handlePointerDown:h,handlePointerMove:v,handlePointerUp:g,handlePointerCancel:y}=ze({enabled:c&&"open"===s,onClose:()=>{u("exiting"),o()}});if("closed"===s)return null;const b="exiting"===s,x=_?`translateY(${f}px)`:`translateY(${b?100:0}%)`;return e("div",{className:C(ft,{[mt]:b},l?.overlay),onClick:()=>{m.current?m.current=!1:o()},children:t("div",{className:C(ht,l?.sheet,{[vt]:_,[gt]:b}),style:{minHeight:i,transform:x},onClick:e=>e.stopPropagation(),onTransitionEnd:e=>{e.target===e.currentTarget&&"transform"===e.propertyName&&u(e=>"exiting"===e?"closed":e)},children:[c&&e("div",{className:C(yt,l?.handle),role:"button",tabIndex:0,"aria-label":"Перетащите вниз, чтобы закрыть",onPointerDown:h,onPointerMove:v,onPointerUp:g,onPointerCancel:y,onKeyDown:e=>{"Enter"!==e.key&&" "!==e.key||(e.preventDefault(),o())}}),r&&e("div",{className:C(bt,l?.header),children:e(pt.Title,{variant:"medium-strong",children:r})}),e("div",{className:Ct,children:a})]})})};var wt="ClearableInput__4PN",St="ClearableInput__button__iUo",Tt="ClearableInput__count__K7Z";const Nt=e=>void 0===e||""===e||Array.isArray(e)&&0===e.length,It=o((n,r)=>{const{className:o,onChange:a,innerClassNames:i,withClearButton:l=!0,disabled:c,count:s,...d}=n,_=u(null),f=void 0!==d.value,[m,h]=p(()=>Nt(d.defaultValue)),v=f?Nt(d.value):m;return t("span",{className:C(wt,o),children:[e("input",{ref:Ie(_,r),className:C(i?.input),onChange:e=>{f||h(""===e.currentTarget.value),a?.(e)},disabled:c,...d}),!v&&!c&&!!s&&e("div",{className:C(Tt,i?.count),children:s}),!v&&!c&&l&&e(ge,{type:"button",className:C(St,i?.clearButton),onClick:()=>{_.current&&(e=>{const{el:t,value:n}=e,r=Object.getOwnPropertyDescriptor(HTMLInputElement.prototype,"value")?.set;r?.call(t,n);const o=new Event("input",{bubbles:!0});t.dispatchEvent(o)})({el:_.current,value:""})},"aria-label":"Очистить",children:e(B,{})})]})});It.displayName="ClearableInput";var Et="Container__yZR",Rt="Container_fullWidth__2tY";const kt=o((t,n)=>{const{className:r,asChild:o,fullWidth:a,...i}=t,l=o?re:"div",c=C(Et,{[Rt]:a},r);return e(l,{ref:n,className:c,...i})});kt.displayName="Container";var At="EllipsisText__DEC",Mt="EllipsisText_multiline__y4t",Bt="EllipsisText_singleLine__Arf";const Lt=o((t,n)=>{const{className:r,maxLines:o=1,style:a,asChild:i,...l}=t,c=i?re:"span",s=C(At,{[Mt]:o>1,[Bt]:1===o},r);return e(c,{ref:n,className:s,style:{"--MaxUi-EllipsisText_linesCount":o,...a},...l})});Lt.displayName="EllipsisText";var Pt="Flex__pih";const Ot=o((t,n)=>{const{className:r,display:o="flex",direction:a="row",align:i="flex-start",justify:l="start",asChild:c,wrap:s,style:u,gap:d,gapX:_,gapY:p,...f}=t;return e(c?re:"div",{ref:n,className:C(Pt,r),style:{flexDirection:a,justifyContent:l,alignItems:i,flexWrap:s,...u,display:o,"--MaxUi-Flex_gapX":we(_??d??0),"--MaxUi-Flex_gapY":we(p??d??0)},...f})});Ot.displayName="Flex";var Dt="Grid__lFk";const Ft=o((t,n)=>{const{className:r,style:o,display:a="grid",align:i="start",justify:l="start",gap:c,gapX:s,gapY:u,cols:d,rows:_,asChild:p,...f}=t;return e(p?re:"div",{ref:n,className:C(Dt,r),style:{justifyContent:l,alignItems:i,...o,display:a,"--MaxUi-Grid_gapX":we(s??c??0),"--MaxUi-Grid_gapY":we(u??c??0),"--MaxUi-Grid_cols":d??0,"--MaxUi-Grid_rows":_??0},...f})});Ft.displayName="Grid";var zt={Panel:"Panel__XH0",Panel_centeredX:"Panel_centeredX__DG7",Panel_centeredY:"Panel_centeredY__f-k",Panel_mode_primary:"Panel_mode_primary__fNs",Panel_mode_secondary:"Panel_mode_secondary__Tez"};const $t=o((t,n)=>{const{className:r,mode:o="primary",centeredX:a,centeredY:i,...l}=t,c=C(zt.Panel,zt[`Panel_mode_${o}`],{[zt.Panel_centeredX]:a,[zt.Panel_centeredY]:i},r);return e("div",{ref:n,className:c,...l})});$t.displayName="Panel";var Ut="Ripple__dJ9",Ht="Ripple_active__uv5";const jt=o((t,n)=>{const{className:r,...o}=t,a=u(null),i=u(null),l=e=>{const t=e.currentTarget.getBoundingClientRect();((e,t)=>{null!==i.current&&(i.current.classList.remove(Ht),i.current.style.top=t+"px",i.current.style.left=e+"px",i.current.classList.add(Ht))})(e.clientX-(t.left??0),e.clientY-(t.top??0))};return d(()=>{if(i.current)return a.current=i.current.parentElement,null!==a.current&&a.current.addEventListener("pointerdown",l),()=>{null!==a.current&&a.current?.removeEventListener("pointerdown",l)}},[]),e("span",{ref:Ie(n,i),role:"presentation","aria-hidden":!0,className:C(Ut,r),onAnimationEnd:()=>{null!==i.current&&i.current.classList.remove(Ht)},...o})});jt.displayName="Ripple";var Wt="Tappable__O--",Vt="Tappable_interactive__4Uv",Kt="Tappable_disabled__0z8",Yt="Tappable_activeMode_ripple__3k-",qt="Tappable_activeMode_highlight__Hs-",Xt="Tappable__ripple__Egr";const Gt=o((n,r)=>{const{className:o,disabled:a,asChild:i,children:l,onClick:c,parentChildren:u,as:d="div",..._}=n,p=i?re:d,f=Ue(),m=Le({asChild:i,children:l,disabled:a,onClick:c,rootElement:d}),h=(({onClick:e,href:t,children:n,asChild:r,parentChildren:o=n})=>r?!(!r||!s(o))&&("href"in o.props||"onClick"in o.props):!!e||!!t)({onClick:c,href:_.href,children:l,asChild:i,parentChildren:u}),v="android"===f&&h&&!a,g=C(Wt,{[Vt]:h,[Kt]:a,[qt]:!v,[Yt]:v},o);return t(p,{ref:r,className:g,...h?m:{},..._,children:[l,v&&e(jt,{className:Xt})]})});Gt.displayName="Tappable";var Zt={Spinner:"Spinner__piy",Spinner_appearance_primary:"Spinner_appearance_primary__mxz",Spinner_appearance_themed:"Spinner_appearance_themed__-9S","Spinner_appearance_primary-static":"Spinner_appearance_primary-static__JxW",Spinner_appearance_contrast:"Spinner_appearance_contrast__Mv6","Spinner_appearance_contrast-static":"Spinner_appearance_contrast-static__rM7",Spinner_appearance_negative:"Spinner_appearance_negative__eMf","Spinner_appearance_neutral-themed":"Spinner_appearance_neutral-themed__D8F",androidSpinner:"androidSpinner__w-L",rotation:"rotation__CUP",iosSpinner:"iosSpinner__3q2",bar:"bar__aHj",fade:"fade__2ZD"};const Jt=({size:t})=>e("div",{className:Zt.androidSpinner,style:{width:t,height:t}}),Qt=({size:t})=>e("div",{className:Zt.iosSpinner,style:{width:t,height:t},children:Array.from({length:8},(t,n)=>e("div",{className:Zt.bar},n))}),en=o((t,n)=>{const{className:r,size:o=20,appearance:a="primary",...i}=t,l=Ue(),c=C(Zt.Spinner,Zt[`Spinner_appearance_${a}`],r);return e("span",{ref:n,role:"status",className:c,...i,children:e("ios"===l?Qt:Jt,{size:o})})});en.displayName="Spinner";var tn={Button:"Button__0OJ",Button_loading:"Button_loading__LD-",Button__iconBefore:"Button__iconBefore__BUe",Button__content:"Button__content__vnq",Button__indicator:"Button__indicator__HuA",Button__iconAfter:"Button__iconAfter__VhZ",Button_disabled:"Button_disabled__jkY",Button_stretched:"Button_stretched__mzq",Button_activeMode_ripple:"Button_activeMode_ripple__E5Y",Button_activeMode_highlight:"Button_activeMode_highlight__K3j",Button_size_xsmall:"Button_size_xsmall__QCm",Button_size_small:"Button_size_small__LLG",Button_size_medium:"Button_size_medium__fI9",Button_size_large:"Button_size_large__S2-",Button_variant_primary:"Button_variant_primary__yLL",Button_variant_secondary:"Button_variant_secondary__DR6",Button_variant_ghost:"Button_variant_ghost__EkG","Button_variant_primary-contrast":"Button_variant_primary-contrast__b63","Button_variant_secondary-contrast":"Button_variant_secondary-contrast__cey",Button_variant_overlay:"Button_variant_overlay__keO",Button_variant_destructive:"Button_variant_destructive__2Ug",Button__spinnerContainer:"Button__spinnerContainer__G4I",Button__ripple:"Button__ripple__jw0"},nn={Counter:"Counter__0Oj",Counter_variant_primary:"Counter_variant_primary__8Mz","Counter_variant_primary-contrast":"Counter_variant_primary-contrast__yFz",Counter_variant_attention:"Counter_variant_attention__IWH","Counter_variant_attention-contrast":"Counter_variant_attention-contrast__LHu",Counter_variant_promo:"Counter_variant_promo__9kD",Counter_variant_static:"Counter_variant_static__d8Y","Counter_variant_static-contrast":"Counter_variant_static-contrast__bAq",Counter_variant_default:"Counter_variant_default__weZ",Counter_variant_mute:"Counter_variant_mute__2SU",Counter_variant_menu:"Counter_variant_menu__qf0"};const rn=o((t,n)=>{const{className:r,value:o,rounded:a,variant:i="primary",...l}=t,c=C(nn.Counter,nn[`Counter_variant_${i}`],r),s=_(()=>a?Intl.NumberFormat("en",{notation:"compact"}).format(o):o,[a,o]);return e("span",{ref:n,className:c,...l,children:s})});rn.displayName="Counter";const on=e=>{switch(e){case"xsmall":return 16;case"small":case"medium":return 20;case"large":return 24}},an=e=>{switch(e){case"primary":case"destructive":case"overlay":return"contrast-static";case"secondary":return"primary";case"ghost":return"themed";case"primary-contrast":case"secondary-contrast":return"primary-static"}},ln=e=>{switch(e){case"primary":return{variant:"primary-contrast"};case"secondary":case"ghost":case"primary-contrast":case"secondary-contrast":return{variant:"static"};case"overlay":return{variant:"static-contrast"};case"destructive":return{variant:"attention-contrast"}}},cn=o((n,r)=>{const{className:o,iconBefore:a,iconAfter:i,indicator:l,children:u,onClick:d,loading:_,disabled:p=!1,asChild:f=!1,innerClassNames:m,stretched:h=!1,size:v="medium",variant:g="primary",...y}=n,b="button",x=f?re:b,w=Ue(),S=Le({asChild:f,children:u,disabled:p,loading:_,onClick:d,rootElement:b}),T=p||_,N="android"===w,I=C(tn.Button,tn[`Button_variant_${g}`],tn[`Button_size_${v}`],{[tn.Button_loading]:_,[tn.Button_disabled]:p,[tn.Button_stretched]:h,[tn.Button_activeMode_highlight]:!T&&!N,[tn.Button_activeMode_ripple]:!T&&N},o);return t(x,{ref:r,className:I,...S,...y,children:[Te(a)&&e("span",{className:C(tn.Button__iconBefore,m?.iconBefore),children:a}),_&&e("span",{className:C(tn.Button__spinnerContainer,m?.spinnerContainer),children:e(en,{className:C(m?.spinner),size:on(v),appearance:an(g)})}),e(ie,{children:Se({options:{asChild:f,children:u},content:t=>e(Lt,{className:C(tn.Button__content,m?.content),children:t},"subtree-container")})}),Te(l)&&e("span",{className:C(tn.Button__indicator,m?.indicator),children:(E=l,R=g,s(E)&&E.type===rn?c(E,{...ln(R)}):E)}),Te(i)&&e("span",{className:C(tn.Button__iconAfter,m?.iconAfter),children:i}),N&&!T&&e(jt,{className:tn.Button__ripple})]});var E,R});cn.displayName="Button";var sn={CellAction:"CellAction__vzN",CellAction_mode_primary:"CellAction_mode_primary__vZQ",CellAction_disabled:"CellAction_disabled__VZA",CellAction_mode_secondary:"CellAction_mode_secondary__AJk",CellAction_mode_themed:"CellAction_mode_themed__-Gg",CellAction_mode_destructive:"CellAction_mode_destructive__ovY",CellAction_mode_custom:"CellAction_mode_custom__3T8",CellAction_height_compact:"CellAction_height_compact__ysc",CellAction_height_normal:"CellAction_height_normal__ELj",CellAction_surface_island:"CellAction_surface_island__REC",CellAction__before:"CellAction__before__oZm",CellAction__content:"CellAction__content__Uib",CellAction__chevron:"CellAction__chevron__6SI"};const un=o((n,r)=>{const{className:o,before:a,children:i,innerClassNames:l,asChild:c=!1,mode:s="primary",surface:u="default",height:d="normal",showChevron:_=!1,...p}=n,f=C(sn.CellAction,sn[`CellAction_mode_${s}`],sn[`CellAction_height_${d}`],{[sn.CellAction_surface_island]:"island"===u,[sn.CellAction_disabled]:p.disabled},o);return t(Gt,{ref:r,className:f,asChild:c,as:"button",parentChildren:i,...p,children:[Te(a)&&e("span",{className:C(sn.CellAction__before,l?.before),children:a}),e(ie,{children:Se({options:{asChild:c,children:i},content:t=>e("span",{className:C(sn.CellAction__content,l?.content),children:t},"subtree-container")})}),_&&e(E,{className:C(sn.CellAction__chevron,l?.chevron)})]})});un.displayName="CellAction";var dn={CellHeader:"CellHeader__Epf",CellHeader_titleStyle_caps:"CellHeader_titleStyle_caps__nfB",CellHeader__content:"CellHeader__content__El-",CellHeader_titleStyle_normal:"CellHeader_titleStyle_normal__M-p",CellHeader_fullWidth:"CellHeader_fullWidth__h2Y",CellHeader__after:"CellHeader__after__RXN"};const _n=o((n,r)=>{const{className:o,titleStyle:a="caps",fullWidth:i=!1,children:l,after:c,innerClassNames:s,...u}=n,d=C(dn.CellHeader,dn[`CellHeader_titleStyle_${a}`],{[dn.CellHeader_fullWidth]:i},o);return t("div",{ref:r,className:d,...u,children:[Te(l)&&e("div",{className:C(dn.CellHeader__content,s?.content),children:l}),Te(c)&&e("div",{className:C(dn.CellHeader__after,s?.after),children:c})]})});_n.displayName="CellHeader";var pn={CellInput:"CellInput__92-",CellInput_disabled:"CellInput_disabled__fZ7",CellInput__input:"CellInput__input__gQ3",CellInput_height_compact:"CellInput_height_compact__Mv2",CellInput_height_normal:"CellInput_height_normal__ovc",CellInput_surface_island:"CellInput_surface_island__cls",CellInput__before:"CellInput__before__Hkm",CellInput__body:"CellInput__body__Egp",CellInput__clearButton:"CellInput__clearButton__znK"};const fn=o((n,r)=>{const{className:o,before:a,innerClassNames:i,disabled:l,height:c="normal",surface:s="default",...u}=n,d=C(pn.CellInput,pn[`CellInput_height_${c}`],{[pn.CellInput_surface_island]:"island"===s,[pn.CellInput_disabled]:l},o);return t("label",{className:d,children:[Te(a)&&e(Lt,{className:C(pn.CellInput__before,i?.before),maxLines:1,children:a}),e(It,{ref:r,className:C(pn.CellInput__body,i?.body),innerClassNames:{input:C(pn.CellInput__input,i?.input),clearButton:C(pn.CellInput__clearButton,i?.clearButton)},type:"text",disabled:l,...u})]})});fn.displayName="CellInput";var mn={CellList:"CellList__1ou",CellList_filled:"CellList_filled__ikE",CellList__body:"CellList__body__ouS",CellList_mode_island:"CellList_mode_island__aCu"};const hn=o((n,r)=>{const{className:o,header:a,children:i,mode:l="full-width",filled:c="island"===l,...s}=n,u=C(mn.CellList,mn[`CellList_mode_${l}`],{[mn.CellList_filled]:c},o);return t("div",{ref:r,className:u,...s,children:[Te(a)&&e("div",{className:mn.CellList__header,children:a}),e("div",{className:mn.CellList__body,children:i})]})});hn.displayName="CellList";var vn={CellSimple:"CellSimple__n0z",CellSimple_disabled:"CellSimple_disabled__T-3",CellSimple__title:"CellSimple__title__aYs",CellSimple__overline:"CellSimple__overline__Ncr",CellSimple__link:"CellSimple__link__ie-",CellSimple_subtitle_secondary:"CellSimple_subtitle_secondary__3uL",CellSimple__subtitle:"CellSimple__subtitle__oIF",CellSimple_subtitle_tertiary:"CellSimple_subtitle_tertiary__lz0",CellSimple_height_compact:"CellSimple_height_compact__HUQ",CellSimple_height_normal:"CellSimple_height_normal__pxj",CellSimple_surface_island:"CellSimple_surface_island__GzM",CellSimple__before:"CellSimple__before__5Q9",CellSimple__after:"CellSimple__after__2FK",CellSimple__content:"CellSimple__content__SOk",CellSimple__chevron:"CellSimple__chevron__cSs",CellSimple_separator:"CellSimple_separator__aOX"};const gn=o((n,r)=>{const{link:o,after:a,title:i,before:l,subtitle:c,children:s,overline:u,separator:d,className:_,innerClassNames:p,as:f="div",surface:m="default",height:h="normal",asChild:v=!1,disabled:g=!1,showChevron:y=!1,subtitleMode:b="secondary",...x}=n,w=C(vn.CellSimple,vn[`CellSimple_height_${h}`],vn[`CellSimple_subtitle_${b}`],{[vn.CellSimple_surface_island]:"island"===m,[vn.CellSimple_disabled]:g,[vn.CellSimple_separator]:d},_);return t(Gt,{ref:r,className:w,asChild:v,as:f,disabled:g,parentChildren:s,...x,children:[Te(l)&&e("div",{className:C(vn.CellSimple__before,p?.before),children:l}),e(ie,{children:Se({options:{asChild:v,children:s},content:n=>t("div",{className:C(vn.CellSimple__content,p?.content),children:[Te(u)&&e("div",{className:C(vn.CellSimple__overline,p?.overline),children:u}),Te(i)&&e("div",{className:C(vn.CellSimple__title,p?.title),children:i}),Te(c)&&e("div",{className:C(vn.CellSimple__subtitle,p?.subtitle),children:c}),n,o&&e("a",{className:C(vn.CellSimple__link,p?.link),href:o,target:"_blank",rel:"noreferrer",children:o})]},"subtree-container")})}),(Te(a)||y)&&t("div",{className:C(vn.CellSimple__after,p?.after),children:[a,y&&e(E,{className:C(vn.CellSimple__chevron,p?.chevron)})]})]})});gn.displayName="CellSimple";var yn="Checkbox__ChG",bn="Checkbox__control__FUK",Cn="Checkbox__input__ow-",xn="Checkbox__box__svi",wn="Checkbox__icon__Fa7",Sn="Checkbox__content__MrQ",Tn="Checkbox__label__ZKY",Nn="Checkbox__caption__CRn",In="Checkbox_animated__cbY",En="Checkbox_indeterminate__wqC",Rn="Checkbox_disabled__Wvo";const kn=o((n,r)=>{const{label:o,caption:a,indeterminate:i=!1,disabled:l,className:c,...s}=n,u=Te(o),d=Te(a),_=u||d,p=_?"label":"span",f=m(e=>{e&&(e.indeterminate=i)},[i]),h=C(yn,In,{[En]:i,[Rn]:l},c);return t(p,{className:h,children:[t("span",{className:bn,children:[e("input",{...s,ref:Ie(r,f),type:"checkbox",disabled:l,"aria-checked":i?"mixed":void 0,className:Cn}),e("span",{className:xn,children:e(T,{className:wn})})]}),_&&t("span",{className:Sn,children:[u&&e("span",{className:Tn,children:o}),d&&e("span",{className:Nn,children:a})]})]})});function An(){return"undefined"!=typeof window}function Mn(e){return Pn(e)?(e.nodeName||"").toLowerCase():"#document"}function Bn(e){var t;return(null==e||null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function Ln(e){var t;return null==(t=(Pn(e)?e.ownerDocument:e.document)||window.document)?void 0:t.documentElement}function Pn(e){return!!An()&&(e instanceof Node||e instanceof Bn(e).Node)}function On(e){return!!An()&&(e instanceof Element||e instanceof Bn(e).Element)}function Dn(e){return!!An()&&(e instanceof HTMLElement||e instanceof Bn(e).HTMLElement)}function Fn(e){return!(!An()||"undefined"==typeof ShadowRoot)&&(e instanceof ShadowRoot||e instanceof Bn(e).ShadowRoot)}function zn(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=Xn(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&"inline"!==o&&"contents"!==o}function $n(e){return/^(table|td|th)$/.test(Mn(e))}function Un(e){try{if(e.matches(":popover-open"))return!0}catch(e){}try{return e.matches(":modal")}catch(e){return!1}}kn.displayName="Checkbox";const Hn=/transform|translate|scale|rotate|perspective|filter/,jn=/paint|layout|strict|content/,Wn=e=>!!e&&"none"!==e;let Vn;function Kn(e){const t=On(e)?Xn(e):e;return Wn(t.transform)||Wn(t.translate)||Wn(t.scale)||Wn(t.rotate)||Wn(t.perspective)||!Yn()&&(Wn(t.backdropFilter)||Wn(t.filter))||Hn.test(t.willChange||"")||jn.test(t.contain||"")}function Yn(){return null==Vn&&(Vn="undefined"!=typeof CSS&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),Vn}function qn(e){return/^(html|body|#document)$/.test(Mn(e))}function Xn(e){return Bn(e).getComputedStyle(e)}function Gn(e){return On(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Zn(e){if("html"===Mn(e))return e;const t=e.assignedSlot||e.parentNode||Fn(e)&&e.host||Ln(e);return Fn(t)?t.host:t}function Jn(e){const t=Zn(e);return qn(t)?(e.ownerDocument||e).body:Dn(t)&&zn(t)?t:Jn(t)}function Qn(e,t,n){var r;void 0===t&&(t=[]),void 0===n&&(n=!0);const o=Jn(e),a=o===(null==(r=e.ownerDocument)?void 0:r.body),i=Bn(o);if(a){const e=er(i);return t.concat(i,i.visualViewport||[],zn(o)?o:[],e&&n?Qn(e):[])}return t.concat(o,Qn(o,[],n))}function er(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}const tr=Math.min,nr=Math.max,rr=Math.round,or=Math.floor,ar=e=>({x:e,y:e}),ir={left:"right",right:"left",bottom:"top",top:"bottom"};function lr(e,t){return"function"==typeof e?e(t):e}function cr(e){return e.split("-")[0]}function sr(e){return e.split("-")[1]}function ur(e){return"x"===e?"y":"x"}function dr(e){return"y"===e?"height":"width"}function _r(e){const t=e[0];return"t"===t||"b"===t?"y":"x"}function pr(e){return ur(_r(e))}function fr(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}const mr=["left","right"],hr=["right","left"],vr=["top","bottom"],gr=["bottom","top"];function yr(e,t,n,r){const o=sr(e);let a=function(e,t,n){switch(e){case"top":case"bottom":return n?t?hr:mr:t?mr:hr;case"left":case"right":return t?vr:gr;default:return[]}}(cr(e),"start"===n,r);return o&&(a=a.map(e=>e+"-"+o),t&&(a=a.concat(a.map(fr)))),a}function br(e){const t=cr(e);return ir[t]+e.slice(t.length)}function Cr(e){const{x:t,y:n,width:r,height:o}=e;return{width:r,height:o,top:n,left:t,right:t+r,bottom:n+o,x:t,y:n}}
|
|
2
2
|
/*!
|
|
3
3
|
* tabbable 6.5.0
|
|
4
4
|
* @license MIT, https://github.com/focus-trap/tabbable/blob/master/LICENSE
|
|
5
|
-
*/var hr=["input:not([inert]):not([inert] *)","select:not([inert]):not([inert] *)","textarea:not([inert]):not([inert] *)","a[href]:not([inert]):not([inert] *)","area[href]:not([inert]):not([inert] *)","button:not([inert]):not([inert] *)","[tabindex]:not(slot):not([inert]):not([inert] *)","audio[controls]:not([inert]):not([inert] *)","video[controls]:not([inert]):not([inert] *)",'[contenteditable]:not([contenteditable="false"]):not([inert]):not([inert] *)',"details>summary:first-of-type:not([inert]):not([inert] *)","details:not([inert]):not([inert] *)"].join(","),gr="undefined"==typeof Element,yr=gr?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,br=!gr&&Element.prototype.getRootNode?function(e){var t;return null==e||null===(t=e.getRootNode)||void 0===t?void 0:t.call(e)}:function(e){return null==e?void 0:e.ownerDocument},Cr=function(e,t){var n;void 0===t&&(t=!0);var r=null==e||null===(n=e.getAttribute)||void 0===n?void 0:n.call(e,"inert");return""===r||"true"===r||t&&e&&("function"==typeof e.closest?e.closest("[inert]"):Cr(e.parentNode))},xr=function(e,t,n){for(var r=[],o=Array.from(e);o.length;){var a=o.shift();if(!Cr(a,!1))if("SLOT"===a.tagName){var i=a.assignedElements(),l=i.length?i:a.children,c=xr(l,!0,n);n.flatten?r.push.apply(r,c):r.push({scopeParent:a,candidates:c})}else{yr.call(a,hr)&&n.filter(a)&&(t||!e.includes(a))&&r.push(a);var s=a.shadowRoot||"function"==typeof n.getShadowRoot&&n.getShadowRoot(a),u=!Cr(s,!1)&&(!n.shadowRootFilter||n.shadowRootFilter(a));if(s&&u){var d=xr(!0===s?a.children:s.children,!0,n);n.flatten?r.push.apply(r,d):r.push({scopeParent:a,candidates:d})}else o.unshift.apply(o,a.children)}}return r},wr=function(e){return!isNaN(parseInt(e.getAttribute("tabindex"),10))},Sr=function(e){if(!e)throw new Error("No node provided");return e.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(e.tagName)||function(e){var t,n=null==e||null===(t=e.getAttribute)||void 0===t?void 0:t.call(e,"contenteditable");return""===n||"true"===n}(e))&&!wr(e)?0:e.tabIndex},Tr=function(e,t){return e.tabIndex===t.tabIndex?e.documentOrder-t.documentOrder:e.tabIndex-t.tabIndex},Nr=function(e){return"INPUT"===e.tagName},Ir=function(e){return function(e){return Nr(e)&&"radio"===e.type}(e)&&!function(e){if(!e.name)return!0;var t,n=e.form||br(e),r=function(e){return n.querySelectorAll('input[type="radio"][name="'+e+'"]')};if("undefined"!=typeof window&&void 0!==window.CSS&&"function"==typeof window.CSS.escape)t=r(window.CSS.escape(e.name));else try{t=r(e.name)}catch(e){return console.error("Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s",e.message),!1}var o=function(e,t){for(var n=0;n<e.length;n++)if(e[n].checked&&e[n].form===t)return e[n]}(t,e.form);return!o||o===e}(e)},Er=function(e){var t=e.getBoundingClientRect(),n=t.width,r=t.height;return 0===n&&0===r},Rr=function(e,t){var n=t.displayCheck,r=t.getShadowRoot;if("full-native"===n&&"checkVisibility"in e)return!e.checkVisibility({checkOpacity:!1,opacityProperty:!1,contentVisibilityAuto:!0,visibilityProperty:!0,checkVisibilityCSS:!0});var o=getComputedStyle(e).visibility;if("hidden"===o||"collapse"===o)return!0;var a=yr.call(e,"details>summary:first-of-type")?e.parentElement:e;if(yr.call(a,"details:not([open]) *"))return!0;if(n&&"full"!==n&&"full-native"!==n&&"legacy-full"!==n){if("non-zero-area"===n)return Er(e)}else{if("function"==typeof r){for(var i=e;e;){var l=e.parentElement,c=br(e);if(l&&!l.shadowRoot&&!0===r(l))return Er(e);e=e.assignedSlot?e.assignedSlot:l||c===e.ownerDocument?l:c.host}e=i}if(function(e){var t,n,r,o,a=e&&br(e),i=null===(t=a)||void 0===t?void 0:t.host,l=!1;if(a&&a!==e)for(l=!!(null!==(n=i)&&void 0!==n&&null!==(r=n.ownerDocument)&&void 0!==r&&r.contains(i)||null!=e&&null!==(o=e.ownerDocument)&&void 0!==o&&o.contains(e));!l&&i;){var c,s,u;l=!(null===(s=i=null===(c=a=br(i))||void 0===c?void 0:c.host)||void 0===s||null===(u=s.ownerDocument)||void 0===u||!u.contains(i))}return l}(e))return!e.getClientRects().length;if("legacy-full"!==n)return!0}return!1},kr=function(e,t){return!(t.disabled||function(e){return Nr(e)&&"hidden"===e.type}(t)||Rr(t,e)||function(e){return"DETAILS"===e.tagName&&Array.prototype.slice.apply(e.children).some(function(e){return"SUMMARY"===e.tagName})}(t)||function(e){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(e.tagName))for(var t=e.parentElement;t;){if("FIELDSET"===t.tagName&&t.disabled){for(var n=0;n<t.children.length;n++){var r=t.children.item(n);if("LEGEND"===r.tagName)return!!yr.call(t,"fieldset[disabled] *")||!r.contains(e)}return!0}t=t.parentElement}return!1}(t))},Ar=function(e,t){return!(Ir(t)||Sr(t)<0||!kr(e,t))},Mr=function(e){var t=parseInt(e.getAttribute("tabindex"),10);return!!(isNaN(t)||t>=0)},Br=function(e){var t=[],n=[];return e.forEach(function(e,r){var o=!!e.scopeParent,a=o?e.scopeParent:e,i=function(e,t){var n=Sr(e);return n<0&&t&&!wr(e)?0:n}(a,o),l=o?Br(e.candidates):a;0===i?o?t.push.apply(t,l):t.push(a):n.push({documentOrder:r,tabIndex:i,item:e,isScope:o,content:l})}),n.sort(Tr).reduce(function(e,t){return t.isScope?e.push.apply(e,t.content):e.push(t.content),e},[]).concat(t)},Lr=function(e,t){var n;return n=(t=t||{}).getShadowRoot?xr([e],t.includeContainer,{filter:Ar.bind(null,t),flatten:!1,getShadowRoot:t.getShadowRoot,shadowRootFilter:Mr}):function(e,t,n){if(Cr(e))return[];var r=Array.prototype.slice.apply(e.querySelectorAll(hr));return t&&yr.call(e,hr)&&r.unshift(e),r.filter(n)}(e,t.includeContainer,Ar.bind(null,t)),Br(n)};function Pr(){const e=navigator.userAgentData;return e&&Array.isArray(e.brands)?e.brands.map(e=>{let{brand:t,version:n}=e;return t+"/"+n}).join(" "):navigator.userAgent}function Or(){const e=/android/i;return e.test(function(){const e=navigator.userAgentData;return null!=e&&e.platform?e.platform:navigator.platform}())||e.test(Pr())}const Dr="data-floating-ui-focusable",Fr="ArrowLeft",zr="ArrowRight";function Ur(e){let t=e.activeElement;for(;null!=(null==(n=t)||null==(n=n.shadowRoot)?void 0:n.activeElement);){var n;t=t.shadowRoot.activeElement}return t}function $r(e,t){if(!e||!t)return!1;const n=null==t.getRootNode?void 0:t.getRootNode();if(e.contains(t))return!0;if(n&&Bn(n)){let n=t;for(;n;){if(e===n)return!0;n=n.parentNode||n.host}}return!1}function Hr(e){return"composedPath"in e?e.composedPath()[0]:e.target}function jr(e,t){if(null==t)return!1;if("composedPath"in e)return e.composedPath().includes(t);const n=e;return null!=n.target&&t.contains(n.target)}function Vr(e){return(null==e?void 0:e.ownerDocument)||document}function Wr(e){return Mn(e)&&e.matches("input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])")}function Kr(e){return e?e.hasAttribute(Dr)?e:e.querySelector("["+Dr+"]")||e:null}function Yr(e,t,n){void 0===n&&(n=!0);return e.filter(e=>{var r;return e.parentId===t&&(!n||(null==(r=e.context)?void 0:r.open))}).flatMap(t=>[t,...Yr(e,t.id,n)])}function qr(e){e.preventDefault(),e.stopPropagation()}function Xr(e){return!Pr().includes("jsdom/")&&(!Or()&&0===e.width&&0===e.height||Or()&&1===e.width&&1===e.height&&0===e.pressure&&0===e.detail&&"mouse"===e.pointerType||e.width<1&&e.height<1&&0===e.pressure&&0===e.detail&&"touch"===e.pointerType)}function Gr(e,t){const n=["mouse","pen"];return t||n.push("",void 0),n.includes(e)}var Zr="undefined"!=typeof document?f:function(){};function Jr(e){const t=r.useRef(e);return Zr(()=>{t.current=e}),t}const Qr={...r}.useInsertionEffect||(e=>e());function eo(e){const t=r.useRef(()=>{if("production"!==process.env.NODE_ENV)throw new Error("Cannot call an event handler while rendering.")});return Qr(()=>{t.current=e}),r.useCallback(function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return null==t.current?void 0:t.current(...n)},[])}function to(e,t,n){return Math.floor(e/t)!==n}function no(e,t){return t<0||t>=e.current.length}function ro(e,t){return ao(e,{disabledIndices:t})}function oo(e,t){return ao(e,{decrement:!0,startingIndex:e.current.length,disabledIndices:t})}function ao(e,t){let{startingIndex:n=-1,decrement:r=!1,disabledIndices:o,amount:a=1}=void 0===t?{}:t,i=n;do{i+=r?-a:a}while(i>=0&&i<=e.current.length-1&&co(e,i,o));return i}function io(e,t,n,r,o){if(-1===e)return-1;const a=n.indexOf(e),i=t[e];switch(o){case"tl":return a;case"tr":return i?a+i.width-1:a;case"bl":return i?a+(i.height-1)*r:a;case"br":return n.lastIndexOf(e)}}function lo(e,t){return t.flatMap((t,n)=>e.includes(t)?[n]:[])}function co(e,t,n){if("function"==typeof n)return n(t);if(n)return n.includes(t);const r=e.current[t];return null==r||r.hasAttribute("disabled")||"true"===r.getAttribute("aria-disabled")}const so=()=>({getShadowRoot:!0,displayCheck:"function"==typeof ResizeObserver&&ResizeObserver.toString().includes("[native code]")?"full":"none"});function uo(e,t){const n=Lr(e,so()),r=n.length;if(0===r)return;const o=Ur(Vr(e)),a=n.indexOf(o);return n[-1===a?1===t?0:r-1:a+t]}function _o(e,t){const n=t||e.currentTarget,r=e.relatedTarget;return!r||!$r(n,r)}function po(e){Lr(e,so()).forEach(e=>{e.dataset.tabindex=e.getAttribute("tabindex")||"",e.setAttribute("tabindex","-1")})}function fo(e){e.querySelectorAll("[data-tabindex]").forEach(e=>{const t=e.dataset.tabindex;delete e.dataset.tabindex,t?e.setAttribute("tabindex",t):e.removeAttribute("tabindex")})}function mo(e,t,n){let{reference:r,floating:o}=e;const a=lr(t),i=cr(t),l=ir(i),c=rr(t),s="y"===a,u=r.x+r.width/2-o.width/2,d=r.y+r.height/2-o.height/2,_=r[l]/2-o[l]/2;let p;switch(c){case"top":p={x:u,y:r.y-o.height};break;case"bottom":p={x:u,y:r.y+r.height};break;case"right":p={x:r.x+r.width,y:d};break;case"left":p={x:r.x-o.width,y:d};break;default:p={x:r.x,y:r.y}}const f=or(t);return f&&(p[i]+=_*("end"===f?1:-1)*(n&&s?-1:1)),p}async function vo(e,t){var n;void 0===t&&(t={});const{x:r,y:o,platform:a,rects:i,elements:l,strategy:c}=e,{boundary:s="clippingAncestors",rootBoundary:u="viewport",elementContext:d="floating",altBoundary:_=!1,padding:p=0}=nr(t,e),f=function(e){return"number"!=typeof e?function(e){var t,n,r,o;return{top:null!=(t=e.top)?t:0,right:null!=(n=e.right)?n:0,bottom:null!=(r=e.bottom)?r:0,left:null!=(o=e.left)?o:0}}(e):{top:e,right:e,bottom:e,left:e}}(p),m=l[_?"floating"===d?"reference":"floating":d],v=vr(await a.getClippingRect({element:null==(n=await(null==a.isElement?void 0:a.isElement(m)))||n?m:m.contextElement||await(null==a.getDocumentElement?void 0:a.getDocumentElement(l.floating)),boundary:s,rootBoundary:u,strategy:c})),h="floating"===d?{x:r,y:o,width:i.floating.width,height:i.floating.height}:i.reference,g=await(null==a.getOffsetParent?void 0:a.getOffsetParent(l.floating)),y=await(null==a.isElement?void 0:a.isElement(g))&&await(null==a.getScale?void 0:a.getScale(g))||{x:1,y:1},b=vr(a.convertOffsetParentRelativeRectToViewportRelativeRect?await a.convertOffsetParentRelativeRectToViewportRelativeRect({elements:l,rect:h,offsetParent:g,strategy:c}):h);return{top:(v.top-b.top+f.top)/y.y,bottom:(b.bottom-v.bottom+f.bottom)/y.y,left:(v.left-b.left+f.left)/y.x,right:(b.right-v.right+f.right)/y.x}}const ho=new Set(["left","top"]);function go(e){const t=Vn(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=Mn(e),a=o?e.offsetWidth:n,i=o?e.offsetHeight:r,l=Jn(n)!==a||Jn(r)!==i;return l&&(n=a,r=i),{width:n,height:r,$:l}}function yo(e){return An(e)?e:e.contextElement}function bo(e){const t=yo(e);if(!Mn(t))return er(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:a}=go(t);let i=(a?Jn(n.width):n.width)/r,l=(a?Jn(n.height):n.height)/o;return i&&Number.isFinite(i)||(i=1),l&&Number.isFinite(l)||(l=1),{x:i,y:l}}const Co=er(0);function xo(e){const t=En(e);return Hn()&&t.visualViewport?{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}:Co}function wo(e,t,n,r){void 0===t&&(t=!1),void 0===n&&(n=!1);const o=e.getBoundingClientRect(),a=yo(e);let i=er(1);t&&(r?An(r)&&(i=bo(r)):i=bo(e));const l=function(e,t,n){return void 0===t&&(t=!1),!!n&&t&&n===En(e)}(a,n,r)?xo(a):er(0);let c=(o.left+l.x)/i.x,s=(o.top+l.y)/i.y,u=o.width/i.x,d=o.height/i.y;if(a&&r){const e=En(a),t=An(r)?En(r):r;let n=e,o=Xn(n);for(;o&&t!==n;){const e=bo(o),t=o.getBoundingClientRect(),r=Vn(o),a=t.left+(o.clientLeft+parseFloat(r.paddingLeft))*e.x,i=t.top+(o.clientTop+parseFloat(r.paddingTop))*e.y;c*=e.x,s*=e.y,u*=e.x,d*=e.y,c+=a,s+=i,n=En(o),o=Xn(n)}}return vr({width:u,height:d,x:c,y:s})}function So(e,t){const n=Wn(e).scrollLeft;return t?t.left+n:wo(Rn(e)).left+n}function To(e,t){const n=e.getBoundingClientRect();return{x:n.left+t.scrollLeft-So(e,n),y:n.top+t.scrollTop}}function No(e,t,n){let r;if("viewport"===t||"layoutViewport"===t)r=function(e,t,n){void 0===n&&(n="viewport");const r="layoutViewport"===n,o=En(e),a=Rn(e),i=o.visualViewport;let l=a.clientWidth,c=a.clientHeight,s=0,u=0;if(i){const e=!Hn()||"fixed"===t;r?e||(s=-i.offsetLeft,u=-i.offsetTop):(l=i.width,c=i.height,e&&(s=i.offsetLeft,u=i.offsetTop))}if(So(a)<=0){const e=a.ownerDocument,t=e.body,n=getComputedStyle(t),r="CSS1Compat"===e.compatMode&&parseFloat(n.marginLeft)+parseFloat(n.marginRight)||0,o=Math.abs(a.clientWidth-t.clientWidth-r),i="stable both-edges"===getComputedStyle(a).scrollbarGutter?o/2:o;i<=25&&(l-=i)}return{width:l,height:c,x:s,y:u}}(e,n,t);else if("document"===t)r=function(e){const t=Wn(e),n=e.ownerDocument.body,r=Zn(e.scrollWidth,e.clientWidth,n.scrollWidth,n.clientWidth),o=Zn(e.scrollHeight,e.clientHeight,n.scrollHeight,n.clientHeight);let a=-t.scrollLeft+So(e);const i=-t.scrollTop;return"rtl"===Vn(n).direction&&(a+=Zn(e.clientWidth,n.clientWidth)-r),{width:r,height:o,x:a,y:i}}(Rn(e));else if(An(t))r=function(e,t){const n=wo(e,!0,"fixed"===t),r=n.top+e.clientTop,o=n.left+e.clientLeft,a=bo(e);return{width:e.clientWidth*a.x,height:e.clientHeight*a.y,x:o*a.x,y:r*a.y}}(t,n);else{const n=xo(e);r={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return vr(r)}function Io(e,t,n){const r=Mn(t),o=Rn(t),a="fixed"===n,i=wo(e,!0,a,t);let l={scrollLeft:0,scrollTop:0};const c=er(0);if((r||!a)&&(("body"!==In(t)||Ln(o))&&(l=Wn(t)),r)){const e=wo(t,!0,a,t);c.x=e.x+t.clientLeft,c.y=e.y+t.clientTop}!r&&o&&(c.x=So(o));const s=!o||r||a?er(0):To(o,l);return{x:i.left+l.scrollLeft-c.x-s.x,y:i.top+l.scrollTop-c.y-s.y,width:i.width,height:i.height}}function Eo(e){return"static"===Vn(e).position}function Ro(e,t){if(!Mn(e)||"fixed"===Vn(e).position)return null;if(t)return t(e);let n=e.offsetParent;return Rn(e)===n&&(n=n.ownerDocument.body),n}function ko(e,t){const n=En(e);if(On(e))return n;if(!Mn(e)){let t=Kn(e);for(;t&&!jn(t);){if(An(t)&&!Eo(t))return t;t=Kn(t)}return n}let r=Ro(e,t);for(;r&&Pn(r)&&Eo(r);)r=Ro(r,t);return r&&jn(r)&&Eo(r)&&!$n(r)?n:r||function(e){let t=Kn(e);for(;Mn(t)&&!jn(t);){if($n(t))return t;if(On(t))return null;t=Kn(t)}return null}(e)||n}const Ao={convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const a="fixed"===o,i=Rn(r),l=!!t&&On(t.floating);if(r===i||l&&a)return n;let c={scrollLeft:0,scrollTop:0},s=er(1);const u=er(0),d=Mn(r);if((d||!a)&&(("body"!==In(r)||Ln(i))&&(c=Wn(r)),d)){const e=wo(r);s=bo(r),u.x=e.x+r.clientLeft,u.y=e.y+r.clientTop}const _=!i||d||a?er(0):To(i,c);return{width:n.width*s.x,height:n.height*s.y,x:n.x*s.x-c.scrollLeft*s.x+u.x+_.x,y:n.y*s.y-c.scrollTop*s.y+u.y+_.y}},getDocumentElement:Rn,getClippingRect:function(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const a=[..."clippingAncestors"===n?On(t)?[]:function(e,t){const n=t.get(e);if(n)return n;let r=qn(e,[],!1).filter(e=>An(e)&&"body"!==In(e)),o=null;const a="fixed"===Vn(e).position;let i=a?Kn(e):e;for(;An(i)&&!jn(i);){const e=Vn(i),t=$n(i),n=o?o.position:a?"fixed":"";t||"fixed"!==n&&("absolute"!==n||"static"!==e.position)?o=e:r=r.filter(e=>e!==i),i=Kn(i)}return t.set(e,r),r}(t,this._c):[].concat(n),r],i=No(t,a[0],o);let l=i.top,c=i.right,s=i.bottom,u=i.left;for(let e=1;e<a.length;e++){const n=No(t,a[e],o);l=Zn(n.top,l),c=Gn(n.right,c),s=Gn(n.bottom,s),u=Zn(n.left,u)}return{width:c-u,height:s-l,x:u,y:l}},getOffsetParent:ko,getElementRects:async function(e){const t=this.getOffsetParent||ko,n=this.getDimensions,r=await n(e.floating);return{reference:Io(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}},getClientRects:function(e){return e.getClientRects?Array.from(e.getClientRects()):[]},getDimensions:function(e){const{width:t,height:n}=go(e);return{width:t,height:n}},getScale:bo,isElement:An,isRTL:function(e){return"rtl"===Vn(e).direction}};function Mo(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function Bo(e,t,n,r){void 0===r&&(r={});const{ancestorScroll:o=!0,ancestorResize:a=!0,elementResize:i="function"==typeof ResizeObserver,layoutShift:l="function"==typeof IntersectionObserver,animationFrame:c=!1}=r,s=yo(e),u=o||a?[...s?qn(s):[],...t?qn(t):[]]:[];u.forEach(e=>{o&&e.addEventListener("scroll",n),a&&e.addEventListener("resize",n)});const d=s&&l?function(e,t,n){let r,o=null;const a=Rn(e);function i(){var e;clearTimeout(r),null==(e=o)||e.disconnect(),o=null}function l(n,c){void 0===n&&(n=!1),void 0===c&&(c=1),i();const s=e.getBoundingClientRect(),{left:u,top:d,width:_,height:p}=s;if(n||t(),!_||!p)return;const f={rootMargin:-Qn(d)+"px "+-Qn(a.clientWidth-(u+_))+"px "+-Qn(a.clientHeight-(d+p))+"px "+-Qn(u)+"px",threshold:Zn(0,Gn(1,c))||1};let m=!0;function v(t){const n=t[0].intersectionRatio;if(!Mo(s,e.getBoundingClientRect()))return l();if(n!==c){if(!m)return l();n?l(!1,n):r=setTimeout(()=>{l(!1,1e-7)},1e3)}m=!1}try{o=new IntersectionObserver(v,{...f,root:a.ownerDocument})}catch(e){o=new IntersectionObserver(v,f)}o.observe(e)}const c=En(e),s=()=>l(n);return c.addEventListener("resize",s),l(!0),()=>{c.removeEventListener("resize",s),i()}}(s,n,a):null;let _,p=-1,f=null;i&&(f=new ResizeObserver(e=>{let[r]=e;r&&r.target===s&&f&&t&&(f.unobserve(t),cancelAnimationFrame(p),p=requestAnimationFrame(()=>{var e;null==(e=f)||e.observe(t)})),n()}),s&&!c&&f.observe(s),t&&f.observe(t));let m=c?wo(e):null;return c&&function t(){const r=wo(e);m&&!Mo(m,r)&&n();m=r,_=requestAnimationFrame(t)}(),n(),()=>{var e;u.forEach(e=>{o&&e.removeEventListener("scroll",n),a&&e.removeEventListener("resize",n)}),null==d||d(),null==(e=f)||e.disconnect(),f=null,c&&cancelAnimationFrame(_)}}const Lo=function(e){return void 0===e&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:o,y:a,placement:i,middlewareData:l}=t,c=await async function(e,t){const{placement:n,platform:r,elements:o}=e,a=await(null==r.isRTL?void 0:r.isRTL(o.floating)),i=rr(n),l=or(n),c="y"===lr(n),s=ho.has(i)?-1:1,u=a&&c?-1:1,d=nr(t,e);let{mainAxis:_,crossAxis:p,alignmentAxis:f}="number"==typeof d?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return l&&"number"==typeof f&&(p="end"===l?-1*f:f),c?{x:p*u,y:_*s}:{x:_*s,y:p*u}}(t,e);return i===(null==(n=l.offset)?void 0:n.placement)&&null!=(r=l.arrow)&&r.alignmentOffset?{}:{x:o+c.x,y:a+c.y,data:{...c,placement:i}}}}},Po=function(e){return void 0===e&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:o,platform:a}=t,{mainAxis:i=!0,crossAxis:l=!1,limiter:c={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...s}=nr(e,t),u={x:n,y:r},d=await a.detectOverflow(t,s),_=lr(o),p=ar(_);let f=u[p],m=u[_];const v=(e,t)=>{return n=t+d["y"===e?"top":"left"],r=t,o=t-d["y"===e?"bottom":"right"],Zn(n,Gn(r,o));var n,r,o};i&&(f=v(p,f)),l&&(m=v(_,m));const h=c.fn({...t,[p]:f,[_]:m});return{...h,data:{x:h.x-n,y:h.y-r,enabled:{[p]:i,[_]:l}}}}}},Oo=function(e){return void 0===e&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:o,middlewareData:a,rects:i,initialPlacement:l,platform:c,elements:s}=t,{mainAxis:u=!0,crossAxis:d=!0,fallbackPlacements:_,fallbackStrategy:p="bestFit",fallbackAxisSideDirection:f="none",flipAlignment:m=!0,...v}=nr(e,t);if(null!=(n=a.arrow)&&n.alignmentOffset)return{};const h=rr(o),g=lr(l),y=rr(l)===l,b=await(null==c.isRTL?void 0:c.isRTL(s.floating)),C=_||(y||!m?[mr(l)]:function(e){const t=mr(e);return[sr(e),t,sr(t)]}(l)),x="none"!==f;!_&&x&&C.push(...fr(l,m,f,b));const w=[l,...C],S=await c.detectOverflow(t,v),T=[];let N=(null==(r=a.flip)?void 0:r.overflows)||[];if(u&&T.push(S[h]),d){const e=function(e,t,n){void 0===n&&(n=!1);const r=or(e),o=cr(e),a=ir(o);let i="x"===o?r===(n?"end":"start")?"right":"left":"start"===r?"bottom":"top";return t.reference[a]>t.floating[a]&&(i=mr(i)),[i,mr(i)]}(o,i,b);T.push(S[e[0]],S[e[1]])}if(N=[...N,{placement:o,overflows:T}],!T.every(e=>e<=0)){var I,E;const e=((null==(I=a.flip)?void 0:I.index)||0)+1,t=w[e];if(t){if(!("alignment"===d&&g!==lr(t))||N.every(e=>lr(e.placement)!==g||e.overflows[0]>0))return{data:{index:e,overflows:N},reset:{placement:t}}}let n=null==(E=N.filter(e=>e.overflows[0]<=0).sort((e,t)=>e.overflows[1]-t.overflows[1])[0])?void 0:E.placement;if(!n)switch(p){case"bestFit":{var R;const e=null==(R=N.filter(e=>{if(x){const t=lr(e.placement);return t===g||"y"===t}return!0}).map(e=>[e.placement,e.overflows.filter(e=>e>0).reduce((e,t)=>e+t,0)]).sort((e,t)=>e[1]-t[1])[0])?void 0:R[0];e&&(n=e);break}case"initialPlacement":n=l}if(o!==n)return{reset:{placement:n}}}return{}}}},Do=function(e){return void 0===e&&(e={}),{name:"size",options:e,async fn(t){const{placement:n,rects:r,platform:o,elements:a}=t,{apply:i=()=>{},...l}=nr(e,t),c=await o.detectOverflow(t,l),s=rr(n),u=or(n),d="y"===lr(n),{width:_,height:p}=r.floating;let f,m;"top"===s||"bottom"===s?(f=s,m=u===(await(null==o.isRTL?void 0:o.isRTL(a.floating))?"start":"end")?"left":"right"):(m=s,f="end"===u?"top":"bottom");const v=p-c.top-c.bottom,h=_-c.left-c.right,g=Gn(p-c[f],v),y=Gn(_-c[m],h),b=t.middlewareData.shift,C=!b;let x=g,w=y;null!=b&&b.enabled.x&&(w=h),null!=b&&b.enabled.y&&(x=v),C&&!u&&(d?w=_-2*Zn(c.left,c.right):x=p-2*Zn(c.top,c.bottom)),await i({...t,availableWidth:w,availableHeight:x});const S=await o.getDimensions(a.floating);return _!==S.width||p!==S.height?{reset:{rects:!0}}:{}}}},Fo=(e,t,n)=>{const r=new Map,o=null!=n?n:{},a={...Ao,...o.platform,_c:r};return(async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:a=[],platform:i}=n,l=i.detectOverflow?i:{...i,detectOverflow:vo},c=await(null==i.isRTL?void 0:i.isRTL(t));let s=await i.getElementRects({reference:e,floating:t,strategy:o}),{x:u,y:d}=mo(s,r,c),_=r,p=0;const f={};for(let n=0;n<a.length;n++){const m=a[n];if(!m)continue;const{name:v,fn:h}=m,{x:g,y:y,data:b,reset:C}=await h({x:u,y:d,initialPlacement:r,placement:_,strategy:o,middlewareData:f,rects:s,platform:l,elements:{reference:e,floating:t}});u=null!=g?g:u,d=null!=y?y:d,f[v]={...f[v],...b},C&&p<50&&(p++,"object"==typeof C&&(C.placement&&(_=C.placement),C.rects&&(s=!0===C.rects?await i.getElementRects({reference:e,floating:t,strategy:o}):C.rects),({x:u,y:d}=mo(s,_,c))),n=-1)}return{x:u,y:d,placement:_,strategy:o,middlewareData:f}})(e,t,{...o,platform:a})};var zo="undefined"!=typeof document?f:function(){};function Uo(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if("function"==typeof e&&e.toString()===t.toString())return!0;let n,r,o;if(e&&t&&"object"==typeof e){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;0!==r--;)if(!Uo(e[r],t[r]))return!1;return!0}if(o=Object.keys(e),n=o.length,n!==Object.keys(t).length)return!1;for(r=n;0!==r--;)if(!{}.hasOwnProperty.call(t,o[r]))return!1;for(r=n;0!==r--;){const n=o[r];if(("_owner"!==n||!e.$$typeof)&&!Uo(e[n],t[n]))return!1}return!0}return e!=e&&t!=t}function $o(e){if("undefined"==typeof window)return 1;return(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Ho(e,t){const n=$o(e);return Math.round(t*n)/n}function jo(e){const t=r.useRef(e);return zo(()=>{t.current=e}),t}const Vo=(e,t)=>{const n=Lo(e);return{name:n.name,fn:n.fn,options:[e,t]}},Wo=(e,t)=>{const n=Po(e);return{name:n.name,fn:n.fn,options:[e,t]}},Ko=(e,t)=>{const n=Oo(e);return{name:n.name,fn:n.fn,options:[e,t]}},Yo=(e,t)=>{const n=Do(e);return{name:n.name,fn:n.fn,options:[e,t]}};function qo(e,t){const n=e.compareDocumentPosition(t);return n&Node.DOCUMENT_POSITION_FOLLOWING||n&Node.DOCUMENT_POSITION_CONTAINED_BY?-1:n&Node.DOCUMENT_POSITION_PRECEDING||n&Node.DOCUMENT_POSITION_CONTAINS?1:0}const Xo=r.createContext({register:()=>{},unregister:()=>{},map:new Map,elementsRef:{current:[]}});function Go(t){const{children:n,elementsRef:o,labelsRef:a}=t,[i,l]=r.useState(()=>new Set),c=r.useCallback(e=>{l(t=>new Set(t).add(e))},[]),s=r.useCallback(e=>{l(t=>{const n=new Set(t);return n.delete(e),n})},[]),u=r.useMemo(()=>{const e=new Map;return Array.from(i.keys()).sort(qo).forEach((t,n)=>{e.set(t,n)}),e},[i]);return e(Xo.Provider,{value:r.useMemo(()=>({register:c,unregister:s,map:u,elementsRef:o,labelsRef:a}),[c,s,u,o,a]),children:n})}const Zo="data-floating-ui-focusable",Jo="active",Qo="selected",ea="ArrowLeft",ta="ArrowRight",na="ArrowUp",ra="ArrowDown",oa={...r};let aa=!1,ia=0;const la=()=>"floating-ui-"+Math.random().toString(36).slice(2,6)+ia++;const ca=oa.useId||function(){const[e,t]=r.useState(()=>aa?la():void 0);return Zr(()=>{null==e&&t(la())},[]),r.useEffect(()=>{aa=!0},[]),e};let sa;function ua(){for(var e,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];const o="Floating UI: "+n.join(" ");var a;null!=(e=sa)&&e.has(o)||(null==(a=sa)||a.add(o),console.warn(o))}function da(){const e=new Map;return{emit(t,n){var r;null==(r=e.get(t))||r.forEach(e=>e(n))},on(t,n){e.has(t)||e.set(t,new Set),e.get(t).add(n)},off(t,n){var r;null==(r=e.get(t))||r.delete(n)}}}"production"!==process.env.NODE_ENV&&(sa=new Set);const _a=r.createContext(null),pa=r.createContext(null),fa=()=>{var e;return(null==(e=r.useContext(_a))?void 0:e.id)||null},ma=()=>r.useContext(pa);function va(e){const t=ca(),n=ma(),r=fa();return Zr(()=>{if(!t)return;const e={id:t,parentId:r};return null==n||n.addNode(e),()=>{null==n||n.removeNode(e)}},[n,t,r]),t}function ha(t){const{children:n,id:o}=t,a=fa();return e(_a.Provider,{value:r.useMemo(()=>({id:o,parentId:a}),[o,a]),children:n})}function ga(t){const{children:n}=t,o=r.useRef([]),a=r.useCallback(e=>{o.current=[...o.current,e]},[]),i=r.useCallback(e=>{o.current=o.current.filter(t=>t!==e)},[]),[l]=r.useState(()=>da());return e(pa.Provider,{value:r.useMemo(()=>({nodesRef:o,addNode:a,removeNode:i,events:l}),[a,i,l]),children:n})}function ya(e){return"data-floating-ui-"+e}function ba(e){-1!==e.current&&(clearTimeout(e.current),e.current=-1)}const Ca=ya("safe-polygon");function xa(e,t,n){if(n&&!Gr(n))return 0;if("number"==typeof e)return e;if("function"==typeof e){const n=e();return"number"==typeof n?n:null==n?void 0:n[t]}return null==e?void 0:e[t]}function wa(e){return"function"==typeof e?e():e}let Sa=0;const Ta={border:0,clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"fixed",whiteSpace:"nowrap",width:"1px",top:0,left:0},Na=r.forwardRef(function(t,n){const[o,a]=r.useState();Zr(()=>{/apple/i.test(navigator.vendor)&&a("button")},[]);const i={ref:n,tabIndex:0,role:o,"aria-hidden":!o||void 0,[ya("focus-guard")]:"",style:Ta};return e("span",{...t,...i})}),Ia={clipPath:"inset(50%)",position:"fixed",top:0,left:0},Ea=r.createContext(null),Ra=ya("portal");function ka(n){const{children:o,id:a,root:i,preserveTabOrder:l=!0}=n,c=function(e){void 0===e&&(e={});const{id:t,root:n}=e,o=ca(),a=Aa(),[i,l]=r.useState(null),c=r.useRef(null);return Zr(()=>()=>{null==i||i.remove(),queueMicrotask(()=>{c.current=null})},[i]),Zr(()=>{if(!o)return;if(c.current)return;const e=t?document.getElementById(t):null;if(!e)return;const n=document.createElement("div");n.id=o,n.setAttribute(Ra,""),e.appendChild(n),c.current=n,l(n)},[t,o]),Zr(()=>{if(null===n)return;if(!o)return;if(c.current)return;let e=n||(null==a?void 0:a.portalNode);e&&!kn(e)&&(e=e.current),e=e||document.body;let r=null;t&&(r=document.createElement("div"),r.id=t,e.appendChild(r));const i=document.createElement("div");i.id=o,i.setAttribute(Ra,""),e=r||e,e.appendChild(i),c.current=i,l(i)},[t,n,o,a]),i}({id:a,root:i}),[s,u]=r.useState(null),d=r.useRef(null),_=r.useRef(null),p=r.useRef(null),f=r.useRef(null),m=null==s?void 0:s.modal,v=null==s?void 0:s.open,h=!!s&&!s.modal&&s.open&&l&&!(!i&&!c);return r.useEffect(()=>{if(c&&l&&!m)return c.addEventListener("focusin",e,!0),c.addEventListener("focusout",e,!0),()=>{c.removeEventListener("focusin",e,!0),c.removeEventListener("focusout",e,!0)};function e(e){if(c&&_o(e)){("focusin"===e.type?fo:po)(c)}}},[c,l,m]),r.useEffect(()=>{c&&(v||fo(c))},[v,c]),t(Ea.Provider,{value:r.useMemo(()=>({preserveTabOrder:l,beforeOutsideRef:d,afterOutsideRef:_,beforeInsideRef:p,afterInsideRef:f,portalNode:c,setFocusManagerState:u}),[l,c]),children:[h&&c&&e(Na,{"data-type":"outside",ref:d,onFocus:e=>{if(_o(e,c)){var t;null==(t=p.current)||t.focus()}else{const e=s?s.domReference:null,t=uo(Vr(n=e).body,-1)||n;null==t||t.focus()}var n}}),h&&c&&e("span",{"aria-owns":c.id,style:Ia}),c&&g.createPortal(o,c),h&&c&&e(Na,{"data-type":"outside",ref:_,onFocus:e=>{if(_o(e,c)){var t;null==(t=f.current)||t.focus()}else{const t=s?s.domReference:null,r=uo(Vr(n=t).body,1)||n;null==r||r.focus(),(null==s?void 0:s.closeOnFocusOut)&&(null==s||s.onOpenChange(!1,e.nativeEvent,"focus-out"))}var n}})]})}const Aa=()=>r.useContext(Ea);function Ma(e){return Mn(e.target)&&"BUTTON"===e.target.tagName}function Ba(e){return Wr(e)}function La(e,t){void 0===t&&(t={});const{open:n,onOpenChange:o,dataRef:a,elements:{domReference:i}}=e,{enabled:l=!0,event:c="click",toggle:s=!0,ignoreMouse:u=!1,keyboardHandlers:d=!0,stickIfOpen:_=!0}=t,p=r.useRef(),f=r.useRef(!1),m=r.useMemo(()=>({onPointerDown(e){p.current=e.pointerType},onMouseDown(e){const t=p.current;0===e.button&&"click"!==c&&(Gr(t,!0)&&u||(!n||!s||a.current.openEvent&&_&&"mousedown"!==a.current.openEvent.type?(e.preventDefault(),o(!0,e.nativeEvent,"click")):o(!1,e.nativeEvent,"click")))},onClick(e){const t=p.current;"mousedown"===c&&p.current?p.current=void 0:Gr(t,!0)&&u||(!n||!s||a.current.openEvent&&_&&"click"!==a.current.openEvent.type?o(!0,e.nativeEvent,"click"):o(!1,e.nativeEvent,"click"))},onKeyDown(e){p.current=void 0,e.defaultPrevented||!d||Ma(e)||(" "!==e.key||Ba(i)||(e.preventDefault(),f.current=!0),function(e){return Mn(e.target)&&"A"===e.target.tagName}(e)||"Enter"===e.key&&o(!n||!s,e.nativeEvent,"click"))},onKeyUp(e){e.defaultPrevented||!d||Ma(e)||Ba(i)||" "===e.key&&f.current&&(f.current=!1,o(!n||!s,e.nativeEvent,"click"))}}),[a,i,c,u,d,o,n,_,s]);return r.useMemo(()=>l?{reference:m}:{},[l,m])}const Pa={pointerdown:"onPointerDown",mousedown:"onMouseDown",click:"onClick"},Oa={pointerdown:"onPointerDownCapture",mousedown:"onMouseDownCapture",click:"onClickCapture"},Da=e=>{var t,n;return{escapeKey:"boolean"==typeof e?e:null!=(t=null==e?void 0:e.escapeKey)&&t,outsidePress:"boolean"==typeof e?e:null==(n=null==e?void 0:e.outsidePress)||n}};function Fa(e,t){void 0===t&&(t={});const{open:n,onOpenChange:o,elements:a,dataRef:i}=e,{enabled:l=!0,escapeKey:c=!0,outsidePress:s=!0,outsidePressEvent:u="pointerdown",referencePress:d=!1,referencePressEvent:_="pointerdown",ancestorScroll:p=!1,bubbles:f,capture:m}=t,v=ma(),h=eo("function"==typeof s?s:()=>!1),g="function"==typeof s?h:s,y=r.useRef(!1),{escapeKey:b,outsidePress:C}=Da(f),{escapeKey:x,outsidePress:w}=Da(m),S=r.useRef(!1),T=eo(e=>{var t;if(!n||!l||!c||"Escape"!==e.key)return;if(S.current)return;const r=null==(t=i.current.floatingContext)?void 0:t.nodeId,a=v?Yr(v.nodesRef.current,r):[];if(!b&&(e.stopPropagation(),a.length>0)){let e=!0;if(a.forEach(t=>{var n;null==(n=t.context)||!n.open||t.context.dataRef.current.__escapeKeyBubbles||(e=!1)}),!e)return}o(!1,function(e){return"nativeEvent"in e}(e)?e.nativeEvent:e,"escape-key")}),N=eo(e=>{var t;const n=()=>{var t;T(e),null==(t=Hr(e))||t.removeEventListener("keydown",n)};null==(t=Hr(e))||t.addEventListener("keydown",n)}),I=eo(e=>{var t;const n=i.current.insideReactTree;i.current.insideReactTree=!1;const r=y.current;if(y.current=!1,"click"===u&&r)return;if(n)return;if("function"==typeof g&&!g(e))return;const l=Hr(e),c="["+ya("inert")+"]",s=Vr(a.floating).querySelectorAll(c);let d=An(l)?l:null;for(;d&&!jn(d);){const e=Kn(d);if(jn(e)||!An(e))break;d=e}if(s.length&&An(l)&&!l.matches("html,body")&&!$r(l,a.floating)&&Array.from(s).every(e=>!$r(d,e)))return;if(Mn(l)&&k){const t=jn(l),n=Vn(l),r=/auto|scroll/,o=t||r.test(n.overflowX),a=t||r.test(n.overflowY),i=o&&l.clientWidth>0&&l.scrollWidth>l.clientWidth,c=a&&l.clientHeight>0&&l.scrollHeight>l.clientHeight,s="rtl"===n.direction,u=c&&(s?e.offsetX<=l.offsetWidth-l.clientWidth:e.offsetX>l.clientWidth),d=i&&e.offsetY>l.clientHeight;if(u||d)return}const _=null==(t=i.current.floatingContext)?void 0:t.nodeId,p=v&&Yr(v.nodesRef.current,_).some(t=>{var n;return jr(e,null==(n=t.context)?void 0:n.elements.floating)});if(jr(e,a.floating)||jr(e,a.domReference)||p)return;const f=v?Yr(v.nodesRef.current,_):[];if(f.length>0){let e=!0;if(f.forEach(t=>{var n;null==(n=t.context)||!n.open||t.context.dataRef.current.__outsidePressBubbles||(e=!1)}),!e)return}o(!1,e,"outside-press")}),E=eo(e=>{var t;const n=()=>{var t;I(e),null==(t=Hr(e))||t.removeEventListener(u,n)};null==(t=Hr(e))||t.addEventListener(u,n)});r.useEffect(()=>{if(!n||!l)return;i.current.__escapeKeyBubbles=b,i.current.__outsidePressBubbles=C;let e=-1;function t(e){o(!1,e,"ancestor-scroll")}function r(){window.clearTimeout(e),S.current=!0}function s(){e=window.setTimeout(()=>{S.current=!1},Hn()?5:0)}const d=Vr(a.floating);c&&(d.addEventListener("keydown",x?N:T,x),d.addEventListener("compositionstart",r),d.addEventListener("compositionend",s)),g&&d.addEventListener(u,w?E:I,w);let _=[];return p&&(An(a.domReference)&&(_=qn(a.domReference)),An(a.floating)&&(_=_.concat(qn(a.floating))),!An(a.reference)&&a.reference&&a.reference.contextElement&&(_=_.concat(qn(a.reference.contextElement)))),_=_.filter(e=>{var t;return e!==(null==(t=d.defaultView)?void 0:t.visualViewport)}),_.forEach(e=>{e.addEventListener("scroll",t)}),()=>{c&&(d.removeEventListener("keydown",x?N:T,x),d.removeEventListener("compositionstart",r),d.removeEventListener("compositionend",s)),g&&d.removeEventListener(u,w?E:I,w),_.forEach(e=>{e.removeEventListener("scroll",t)}),window.clearTimeout(e)}},[i,a,c,g,u,n,o,p,l,b,C,T,x,N,I,w,E]),r.useEffect(()=>{i.current.insideReactTree=!1},[i,g,u]);const R=r.useMemo(()=>({onKeyDown:T,...d&&{[Pa[_]]:e=>{o(!1,e.nativeEvent,"reference-press")},..."click"!==_&&{onClick(e){o(!1,e.nativeEvent,"reference-press")}}}}),[T,o,d,_]),k=r.useMemo(()=>{function e(e){0===e.button&&(y.current=!0)}return{onKeyDown:T,onMouseDown:e,onMouseUp:e,[Oa[u]]:()=>{i.current.insideReactTree=!0}}},[T,u,i]);return r.useMemo(()=>l?{reference:R,floating:k}:{},[l,R,k])}function za(e){const{open:t=!1,onOpenChange:n,elements:o}=e,a=ca(),i=r.useRef({}),[l]=r.useState(()=>da()),c=null!=fa();if("production"!==process.env.NODE_ENV){const e=o.reference;e&&!An(e)&&function(){for(var e,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];const o="Floating UI: "+n.join(" ");var a;null!=(e=sa)&&e.has(o)||(null==(a=sa)||a.add(o),console.error(o))}("Cannot pass a virtual element to the `elements.reference` option,","as it must be a real DOM element. Use `refs.setPositionReference()`","instead.")}const[s,u]=r.useState(o.reference),d=eo((e,t,r)=>{i.current.openEvent=e?t:void 0,l.emit("openchange",{open:e,event:t,reason:r,nested:c}),null==n||n(e,t,r)}),_=r.useMemo(()=>({setPositionReference:u}),[]),p=r.useMemo(()=>({reference:s||o.reference||null,floating:o.floating||null,domReference:o.reference}),[s,o.reference,o.floating]);return r.useMemo(()=>({dataRef:i,open:t,onOpenChange:d,elements:p,events:l,floatingId:a,refs:_}),[t,d,p,l,a,_])}function Ua(e){var t,n;let{elements:o,...a}=void 0===e?{}:e;const{nodeId:i}=a,l=za({...a,elements:{reference:null!=(t=null==o?void 0:o.reference)?t:null,floating:null!=(n=null==o?void 0:o.floating)?n:null}}),c=a.rootContext||l,s=c.elements,[u,d]=r.useState(null),[_,p]=r.useState(null),f=(null==s?void 0:s.domReference)||u,m=r.useRef(null),v=ma();Zr(()=>{f&&(m.current=f)},[f]);const h=function(e){void 0===e&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:o=[],platform:a,elements:{reference:i,floating:l}={},transform:c=!0,whileElementsMounted:s,open:u}=e,[d,_]=r.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[p,f]=r.useState(o);Uo(p,o)||f(o);const[m,v]=r.useState(null),[h,y]=r.useState(null),b=r.useCallback(e=>{e!==S.current&&(S.current=e,v(e))},[]),C=r.useCallback(e=>{e!==T.current&&(T.current=e,y(e))},[]),x=i||m,w=l||h,S=r.useRef(null),T=r.useRef(null),N=r.useRef(d),I=null!=s,E=jo(s),R=jo(a),k=jo(u),A=r.useCallback(()=>{if(!S.current||!T.current)return;const e={placement:t,strategy:n,middleware:p};R.current&&(e.platform=R.current),Fo(S.current,T.current,e).then(e=>{const t={...e,isPositioned:!1!==k.current};M.current&&!Uo(N.current,t)&&(N.current=t,g.flushSync(()=>{_(t)}))})},[p,t,n,R,k]);zo(()=>{!1===u&&N.current.isPositioned&&(N.current.isPositioned=!1,_(e=>({...e,isPositioned:!1})))},[u]);const M=r.useRef(!1);zo(()=>(M.current=!0,()=>{M.current=!1}),[]),zo(()=>{if(x&&(S.current=x),w&&(T.current=w),x&&w){if(E.current)return E.current(x,w,A);A()}},[x,w,A,E,I]);const B=r.useMemo(()=>({reference:S,floating:T,setReference:b,setFloating:C}),[b,C]),L=r.useMemo(()=>({reference:x,floating:w}),[x,w]),P=r.useMemo(()=>{const e={position:n,left:0,top:0};if(!L.floating)return e;const t=Ho(L.floating,d.x),r=Ho(L.floating,d.y);return c?{...e,transform:"translate("+t+"px, "+r+"px)",...$o(L.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:t,top:r}},[n,c,L.floating,d.x,d.y]);return r.useMemo(()=>({...d,update:A,refs:B,elements:L,floatingStyles:P}),[d,A,B,L,P])}({...a,elements:{...s,..._&&{reference:_}}}),y=r.useCallback(e=>{const t=An(e)?{getBoundingClientRect:()=>e.getBoundingClientRect(),getClientRects:()=>e.getClientRects(),contextElement:e}:e;p(t),h.refs.setReference(t)},[h.refs]),b=r.useCallback(e=>{(An(e)||null===e)&&(m.current=e,d(e)),(An(h.refs.reference.current)||null===h.refs.reference.current||null!==e&&!An(e))&&h.refs.setReference(e)},[h.refs]),C=r.useMemo(()=>({...h.refs,setReference:b,setPositionReference:y,domReference:m}),[h.refs,b,y]),x=r.useMemo(()=>({...h.elements,domReference:f}),[h.elements,f]),w=r.useMemo(()=>({...h,...c,refs:C,elements:x,nodeId:i}),[h,C,x,i,c]);return Zr(()=>{c.dataRef.current.floatingContext=w;const e=null==v?void 0:v.nodesRef.current.find(e=>e.id===i);e&&(e.context=w)}),r.useMemo(()=>({...h,context:w,refs:C,elements:x}),[h,C,x,w])}function $a(e,t,n){const r=new Map,o="item"===n;let a=e;if(o&&e){const{[Jo]:t,[Qo]:n,...r}=e;a=r}return{..."floating"===n&&{tabIndex:-1,[Zo]:""},...a,...t.map(t=>{const r=t?t[n]:null;return"function"==typeof r?e?r(e):null:r}).concat(e).reduce((e,t)=>t?(Object.entries(t).forEach(t=>{let[n,a]=t;var i;o&&[Jo,Qo].includes(n)||(0===n.indexOf("on")?(r.has(n)||r.set(n,[]),"function"==typeof a&&(null==(i=r.get(n))||i.push(a),e[n]=function(){for(var e,t=arguments.length,o=new Array(t),a=0;a<t;a++)o[a]=arguments[a];return null==(e=r.get(n))?void 0:e.map(e=>e(...o)).find(e=>void 0!==e)})):e[n]=a)}),e):e,{})}}function Ha(e){void 0===e&&(e=[]);const t=e.map(e=>null==e?void 0:e.reference),n=e.map(e=>null==e?void 0:e.floating),o=e.map(e=>null==e?void 0:e.item),a=r.useCallback(t=>$a(t,e,"reference"),t),i=r.useCallback(t=>$a(t,e,"floating"),n),l=r.useCallback(t=>$a(t,e,"item"),o);return r.useMemo(()=>({getReferenceProps:a,getFloatingProps:i,getItemProps:l}),[a,i,l])}function ja(e,t,n){switch(e){case"vertical":return t;case"horizontal":return n;default:return t||n}}function Va(e,t){return ja(t,e===na||e===ra,e===ea||e===ta)}function Wa(e,t,n){return ja(t,e===ra,n?e===ea:e===ta)||"Enter"===e||" "===e||""===e}function Ka(e,t,n){return ja(t,n?e===ea:e===ta,e===ra)}function Ya(e,t,n,r){return"both"===t||"horizontal"===t&&r&&r>1?"Escape"===e:ja(t,n?e===ta:e===ea,e===na)}function qa(e,t){const{open:n,onOpenChange:o,elements:a,floatingId:i}=e,{listRef:l,activeIndex:c,onNavigate:s=()=>{},enabled:u=!0,selectedIndex:d=null,allowEscape:_=!1,loop:p=!1,nested:f=!1,rtl:m=!1,virtual:v=!1,focusItemOnOpen:h="auto",focusItemOnHover:g=!0,openOnArrowKeyDown:y=!0,disabledIndices:b,orientation:C="vertical",parentOrientation:x,cols:w=1,scrollItemIntoView:S=!0,virtualItemRef:T,itemSizes:N,dense:I=!1}=t;"production"!==process.env.NODE_ENV&&(_&&(p||ua("`useListNavigation` looping must be enabled to allow escaping."),v||ua("`useListNavigation` must be virtual to allow escaping.")),"vertical"===C&&w>1&&ua("In grid list navigation mode (`cols` > 1), the `orientation` should",'be either "horizontal" or "both".'));const E=Jr(Kr(a.floating)),R=fa(),k=ma();Zr(()=>{e.dataRef.current.orientation=C},[e,C]);const A=eo(()=>{s(-1===P.current?null:P.current)}),M=!!(B=a.domReference)&&"combobox"===B.getAttribute("role")&&Wr(B);var B;const L=r.useRef(h),P=r.useRef(null!=d?d:-1),O=r.useRef(null),D=r.useRef(!0),F=r.useRef(A),z=r.useRef(!!a.floating),U=r.useRef(n),$=r.useRef(!1),H=r.useRef(!1),j=Jr(b),V=Jr(n),W=Jr(S),K=Jr(d),[Y,q]=r.useState(),[X,G]=r.useState(),Z=eo(()=>{function e(e){var t;v?(null!=(t=e.id)&&t.endsWith("-fui-option")&&(e.id=i+"-"+Math.random().toString(16).slice(2,10)),q(e.id),null==k||k.events.emit("virtualfocus",e),T&&(T.current=e)):function(e,t){void 0===t&&(t={});const{preventScroll:n=!1,cancelPrevious:r=!0,sync:o=!1}=t;r&&cancelAnimationFrame(Sa);const a=()=>null==e?void 0:e.focus({preventScroll:n});o?a():Sa=requestAnimationFrame(a)}(e,{sync:$.current,preventScroll:!0})}const t=l.current[P.current],n=H.current;t&&e(t);($.current?e=>e():requestAnimationFrame)(()=>{const r=l.current[P.current]||t;if(!r)return;t||e(r);const o=W.current;o&&Q&&(n||!D.current)&&(null==r.scrollIntoView||r.scrollIntoView("boolean"==typeof o?{block:"nearest",inline:"nearest"}:o))})});Zr(()=>{u&&(n&&a.floating?L.current&&null!=d&&(H.current=!0,P.current=d,A()):z.current&&(P.current=-1,F.current()))},[u,n,a.floating,d,A]),Zr(()=>{if(u&&n&&a.floating)if(null==c){if($.current=!1,null!=K.current)return;if(z.current&&(P.current=-1,Z()),(!U.current||!z.current)&&L.current&&(null!=O.current||!0===L.current&&null==O.current)){let e=0;const t=()=>{if(null==l.current[0]){if(e<2){(e?requestAnimationFrame:queueMicrotask)(t)}e++}else P.current=null==O.current||Wa(O.current,C,m)||f?ro(l,j.current):oo(l,j.current),O.current=null,A()};t()}}else no(l,c)||(P.current=c,Z(),H.current=!1)},[u,n,a.floating,c,K,f,l,C,m,A,Z,j]),Zr(()=>{var e;if(!u||a.floating||!k||v||!z.current)return;const t=k.nodesRef.current,n=null==(e=t.find(e=>e.id===R))||null==(e=e.context)?void 0:e.elements.floating,r=Ur(Vr(a.floating)),o=t.some(e=>e.context&&$r(e.context.elements.floating,r));n&&!o&&D.current&&n.focus({preventScroll:!0})},[u,a.floating,k,R,v]),Zr(()=>{if(u&&k&&v&&!R)return k.events.on("virtualfocus",e),()=>{k.events.off("virtualfocus",e)};function e(e){G(e.id),T&&(T.current=e)}},[u,k,v,R,T]),Zr(()=>{F.current=A,U.current=n,z.current=!!a.floating}),Zr(()=>{n||(O.current=null,L.current=h)},[n,h]);const J=null!=c,Q=r.useMemo(()=>{function e(e){if(!V.current)return;const t=l.current.indexOf(e);-1!==t&&P.current!==t&&(P.current=t,A())}return{onFocus(t){let{currentTarget:n}=t;$.current=!0,e(n)},onClick:e=>{let{currentTarget:t}=e;return t.focus({preventScroll:!0})},onMouseMove(t){let{currentTarget:n}=t;$.current=!0,H.current=!1,g&&e(n)},onPointerLeave(e){let{pointerType:t}=e;var n;D.current&&"touch"!==t&&($.current=!0,g&&(P.current=-1,A(),v||null==(n=E.current)||n.focus({preventScroll:!0})))}}},[V,E,g,l,A,v]),ee=r.useCallback(()=>{var e;return null!=x?x:null==k||null==(e=k.nodesRef.current.find(e=>e.id===R))||null==(e=e.context)||null==(e=e.dataRef)?void 0:e.current.orientation},[R,k,x]),te=eo(e=>{if(D.current=!1,$.current=!0,229===e.which)return;if(!V.current&&e.currentTarget===E.current)return;if(f&&Ya(e.key,C,m,w))return Va(e.key,ee())||qr(e),o(!1,e.nativeEvent,"list-navigation"),void(Mn(a.domReference)&&(v?null==k||k.events.emit("virtualfocus",a.domReference):a.domReference.focus()));const t=P.current,r=ro(l,b),i=oo(l,b);if(M||("Home"===e.key&&(qr(e),P.current=r,A()),"End"===e.key&&(qr(e),P.current=i,A())),w>1){const t=N||Array.from({length:l.current.length},()=>({width:1,height:1})),n=function(e,t,n){const r=[];let o=0;return e.forEach((e,a)=>{let{width:i,height:l}=e;if(i>t&&"production"!==process.env.NODE_ENV)throw new Error("[Floating UI]: Invalid grid - item width at index "+a+" is greater than grid columns");let c=!1;for(n&&(o=0);!c;){const e=[];for(let n=0;n<i;n++)for(let r=0;r<l;r++)e.push(o+n+r*t);o%t+i<=t&&e.every(e=>null==r[e])?(e.forEach(e=>{r[e]=a}),c=!0):o++}}),[...r]}(t,w,I),o=n.findIndex(e=>null!=e&&!co(l,e,b)),a=n.reduce((e,t,n)=>null==t||co(l,t,b)?e:n,-1),c=n[function(e,t){let{event:n,orientation:r,loop:o,rtl:a,cols:i,disabledIndices:l,minIndex:c,maxIndex:s,prevIndex:u,stopEvent:d=!1}=t,_=u;if("ArrowUp"===n.key){if(d&&qr(n),-1===u)_=s;else if(_=ao(e,{startingIndex:_,amount:i,decrement:!0,disabledIndices:l}),o&&(u-i<c||_<0)){const e=u%i,t=s%i,n=s-(t-e);_=t===e?s:t>e?n:n-i}no(e,_)&&(_=u)}if("ArrowDown"===n.key&&(d&&qr(n),-1===u?_=c:(_=ao(e,{startingIndex:u,amount:i,disabledIndices:l}),o&&u+i>s&&(_=ao(e,{startingIndex:u%i-i,amount:i,disabledIndices:l}))),no(e,_)&&(_=u)),"both"===r){const t=Qn(u/i);n.key===(a?Fr:zr)&&(d&&qr(n),u%i!==i-1?(_=ao(e,{startingIndex:u,disabledIndices:l}),o&&to(_,i,t)&&(_=ao(e,{startingIndex:u-u%i-1,disabledIndices:l}))):o&&(_=ao(e,{startingIndex:u-u%i-1,disabledIndices:l})),to(_,i,t)&&(_=u)),n.key===(a?zr:Fr)&&(d&&qr(n),u%i!==0?(_=ao(e,{startingIndex:u,decrement:!0,disabledIndices:l}),o&&to(_,i,t)&&(_=ao(e,{startingIndex:u+(i-u%i),decrement:!0,disabledIndices:l}))):o&&(_=ao(e,{startingIndex:u+(i-u%i),decrement:!0,disabledIndices:l})),to(_,i,t)&&(_=u));const r=Qn(s/i)===t;no(e,_)&&(_=o&&r?n.key===(a?zr:Fr)?s:ao(e,{startingIndex:u-u%i-1,disabledIndices:l}):u)}return _}({current:n.map(e=>null!=e?l.current[e]:null)},{event:e,orientation:C,loop:p,rtl:m,cols:w,disabledIndices:lo([...("function"!=typeof b?b:null)||l.current.map((e,t)=>co(l,t,b)?t:void 0),void 0],n),minIndex:o,maxIndex:a,prevIndex:io(P.current>i?r:P.current,t,n,w,e.key===ra?"bl":e.key===(m?ea:ta)?"tr":"tl"),stopEvent:!0})];if(null!=c&&(P.current=c,A()),"both"===C)return}if(Va(e.key,C)){if(qr(e),n&&!v&&Ur(e.currentTarget.ownerDocument)===e.currentTarget)return P.current=Wa(e.key,C,m)?r:i,void A();Wa(e.key,C,m)?P.current=p?t>=i?_&&t!==l.current.length?-1:r:ao(l,{startingIndex:t,disabledIndices:b}):Math.min(i,ao(l,{startingIndex:t,disabledIndices:b})):P.current=p?t<=r?_&&-1!==t?l.current.length:i:ao(l,{startingIndex:t,decrement:!0,disabledIndices:b}):Math.max(r,ao(l,{startingIndex:t,decrement:!0,disabledIndices:b})),no(l,P.current)&&(P.current=-1),A()}}),ne=r.useMemo(()=>v&&n&&J&&{"aria-activedescendant":X||Y},[v,n,J,X,Y]),re=r.useMemo(()=>({"aria-orientation":"both"===C?void 0:C,...M?{}:ne,onKeyDown:te,onPointerMove(){D.current=!0}}),[ne,te,C,M]),oe=r.useMemo(()=>{function e(e){"auto"===h&&function(e){return!(0!==e.mozInputSource||!e.isTrusted)||(Or()&&e.pointerType?"click"===e.type&&1===e.buttons:0===e.detail&&!e.pointerType)}(e.nativeEvent)&&(L.current=!0)}function t(e){L.current=h,"auto"===h&&Xr(e.nativeEvent)&&(L.current=!0)}return{...ne,onKeyDown(e){D.current=!1;const t=e.key.startsWith("Arrow"),r=["Home","End"].includes(e.key),a=t||r,i=Ka(e.key,C,m),c=Ya(e.key,C,m,w),s=Ka(e.key,ee(),m),u=Va(e.key,C),_=(f?s:u)||"Enter"===e.key||""===e.key.trim();if(v&&n){const t=null==k?void 0:k.nodesRef.current.find(e=>null==e.parentId),n=k&&t?function(e,t){let n,r=-1;return function t(o,a){a>r&&(n=o,r=a),Yr(e,o).forEach(e=>{t(e.id,a+1)})}(t,0),e.find(e=>e.id===n)}(k.nodesRef.current,t.id):null;if(a&&n&&T){const t=new KeyboardEvent("keydown",{key:e.key,bubbles:!0});if(i||c){var p,h;const r=(null==(p=n.context)?void 0:p.elements.domReference)===e.currentTarget,o=c&&!r?null==(h=n.context)?void 0:h.elements.domReference:i?l.current.find(e=>(null==e?void 0:e.id)===Y):null;o&&(qr(e),o.dispatchEvent(t),G(void 0))}var g;if((u||r)&&n.context)if(n.context.open&&n.parentId&&e.currentTarget!==n.context.elements.domReference)return qr(e),void(null==(g=n.context.elements.domReference)||g.dispatchEvent(t))}return te(e)}if(n||y||!t){if(_){const t=Va(e.key,ee());O.current=f&&t?null:e.key}f?s&&(qr(e),n?(P.current=ro(l,j.current),A()):o(!0,e.nativeEvent,"list-navigation")):u&&(null!=d&&(P.current=d),qr(e),!n&&y?o(!0,e.nativeEvent,"list-navigation"):te(e),n&&A())}},onFocus(){n&&!v&&(P.current=-1,A())},onPointerDown:t,onPointerEnter:t,onMouseDown:e,onClick:e}},[Y,ne,w,te,j,h,l,f,A,o,n,y,C,ee,m,d,k,v,T]);return r.useMemo(()=>u?{reference:oe,floating:re,item:Q}:{},[u,oe,re,Q])}const Xa=new Map([["select","listbox"],["combobox","listbox"],["label",!1]]);const Ga=a({mode:"desktop",close:we}),Za=()=>i(Ga),Ja=a({activeIndex:null,getItemProps:e=>({...e})});var Qa="ContextMenu__trigger__bEu";const ei={open:100,close:300},ti=()=>"undefined"!=typeof window&&"function"==typeof window.matchMedia&&window.matchMedia("(pointer: coarse)").matches;var ni="ContextMenuDivider__JLr";const ri=({className:t,...n})=>e("div",{role:"separator",className:C(ni,t),...n});ri.displayName="ContextMenuDivider";var oi="ContextMenuActionBar__Req",ai="ContextMenuActionBar__button__5UF",ii="ContextMenuActionBar__icon__pKA",li="ContextMenuActionBar__label__Dcc";const ci=({buttons:r})=>{const{close:o,innerClassNames:a}=Za(),i=e=>t=>{e.onClick?.(t),o()};return t(n,{children:[e("div",{role:"none",className:C(oi,a?.actionBar),children:r.map(n=>t(Wt,{as:"button",type:"button",disabled:n.disabled,className:C(ai,a?.actionBarButton),onClick:i(n),children:[e("span",{className:C(ii,a?.actionBarButtonIcon),children:n.icon}),be(n.label)&&e("span",{className:C(li,a?.actionBarButtonLabel),children:n.label})]},n.id))}),e(ri,{className:C(a?.divider)})]})};ci.displayName="ContextMenuActionBar";var si={MaxUI:"MaxUI__g7Q",MaxUI_platform_ios:"MaxUI_platform_ios__gAV",MaxUI_platform_android:"MaxUI_platform_android__m3U",MaxUI_colorScheme_light:"MaxUI_colorScheme_light__Woo",MaxUI_colorScheme_dark:"MaxUI_colorScheme_dark__jFq",MaxUI_resetBody:"MaxUI_resetBody__Mwh"},ui="ContextMenuContent__9kf";const di=o((t,n)=>{const{children:r,className:o,...a}=t,{platform:i,colorScheme:l}=Me();return e("div",{ref:n,role:"menu",className:C(si[`MaxUI_colorScheme_${l}`],si[`MaxUI_platform_${i}`],ui,o),...a,children:r})});di.displayName="ContextMenuContent";var _i={ContextMenuRow:"ContextMenuRow__NZL",ContextMenuRow_destructive:"ContextMenuRow_destructive__WNP",ContextMenuRow_disabled:"ContextMenuRow_disabled__VUD",ContextMenuRow_hasSubmenu:"ContextMenuRow_hasSubmenu__ZJ6",ContextMenuRow__before:"ContextMenuRow__before__O8u",ContextMenuRow__label:"ContextMenuRow__label__DaH",ContextMenuRow__hint:"ContextMenuRow__hint__sZV",ContextMenuRow__chevron:"ContextMenuRow__chevron__1jA",ContextMenuRow__chevron_mobile:"ContextMenuRow__chevron_mobile__tKx",ContextMenuRow__chevron_expanded:"ContextMenuRow__chevron_expanded__8wf"};const pi=o((n,o)=>{const{item:a,expanded:l=!1,onClick:c,onMouseEnter:s,onMouseLeave:u,onFocus:d,onSubmenuKeyDown:_,className:p}=n,{mode:f,innerClassNames:m}=Za(),{activeIndex:v,getItemProps:h}=i(Ja),{ref:g,index:y}=function(e){void 0===e&&(e={});const{label:t}=e,{register:n,unregister:o,map:a,elementsRef:i,labelsRef:l}=r.useContext(Xo),[c,s]=r.useState(null),u=r.useRef(null),d=r.useCallback(e=>{if(u.current=e,null!==c&&(i.current[c]=e,l)){var n;const r=void 0!==t;l.current[c]=r?t:null!=(n=null==e?void 0:e.textContent)?n:null}},[c,i,l,t]);return Zr(()=>{const e=u.current;if(e)return n(e),()=>{o(e)}},[n,o]),Zr(()=>{const e=u.current?a.get(u.current):null;null!=e&&s(e)},[a]),r.useMemo(()=>({ref:d,index:null==c?-1:c}),[c,d])}(),b=void 0!==a.items,x=h({onClick:c,onMouseEnter:s,onMouseLeave:u,onFocus:d,onKeyDown:e=>{_?.(e),(e=>{"Enter"===e.key||" "===e.key?(e.preventDefault(),a.disabled||e.currentTarget.click()):"ArrowRight"===e.key?(e.preventDefault(),!a.disabled&&b&&"mobile"===f&&e.currentTarget.click()):"ArrowLeft"===e.key&&e.preventDefault()})(e)}}),w=C(_i.ContextMenuRow,{[_i.ContextMenuRow_destructive]:"destructive"===a.mode,[_i.ContextMenuRow_disabled]:a.disabled,[_i.ContextMenuRow_expanded]:l,[_i.ContextMenuRow_hasSubmenu]:b},m?.row,p);return t(Wt,{ref:xe(o,g),role:"menuitem","aria-haspopup":b?"menu":void 0,"aria-expanded":b?l:void 0,disabled:a.disabled,className:w,tabIndex:a.disabled||v!==y?-1:0,...x,children:[(be(a.before)||a.offset)&&e("span",{className:C(_i.ContextMenuRow__before,m?.before),children:a.before}),e("span",{className:C(_i.ContextMenuRow__label,m?.label),children:a.label}),!b&&be(a.hint)&&e("span",{className:C(_i.ContextMenuRow__hint,m?.hint),children:a.hint}),b&&e(E,{className:C(_i.ContextMenuRow__chevron,_i[`ContextMenuRow__chevron_${f}`],{[_i.ContextMenuRow__chevron_expanded]:l},m?.chevron)})]})});pi.displayName="ContextMenuRow";const fi=n=>{const{item:r,open:o,onOpenChange:a,onClick:i,onRowMouseEnter:l,onRowMouseLeave:c,onPanelMouseEnter:s,onPanelMouseLeave:d,onRowFocus:f,children:m}=n,{innerClassNames:v}=Za(),h=va(),g=u([]),[b,x]=p(null),{refs:w,floatingStyles:S,context:T}=Ua({nodeId:h,open:o,onOpenChange:a,placement:"right-start",strategy:"fixed",middleware:[Vo(16),Ko({fallbackPlacements:["left-start"],padding:8}),Wo({padding:8})],whileElementsMounted:Bo}),N=qa(T,{listRef:g,activeIndex:b,onNavigate:x,nested:!0}),{getFloatingProps:I,getItemProps:E,getReferenceProps:R}=Ha([N]),k=_(()=>({activeIndex:b,getItemProps:E}),[b,E]),A=R().onKeyDown;return t(ha,{id:h,children:[e(pi,{ref:w.setReference,item:r,expanded:o,onClick:i,onMouseEnter:()=>{r.disabled||l(r.id)},onMouseLeave:c,onFocus:f,onSubmenuKeyDown:A}),o&&"undefined"!=typeof document&&y(e(Ja.Provider,{value:k,children:e(di,{ref:w.setFloating,style:S,className:C(v?.content),...I({onMouseEnter:s,onMouseLeave:d}),children:e(Go,{elementsRef:g,children:m})})}),document.body)]})};fi.displayName="ContextMenuSubmenu";var mi="ContextMenuList__I1T",vi="ContextMenuList_nested__dnE",hi="ContextMenuList__accordion__RaX",gi="ContextMenuList__accordion_expanded__uiY",yi="ContextMenuList__accordionContent__8Ka";const bi=({items:n,nested:r=!1})=>{const{mode:o,close:a,innerClassNames:i}=Za(),[l,c]=p(null),s=u(void 0),_=u(void 0),[f,h]=p([]);d(()=>()=>{window.clearTimeout(s.current),window.clearTimeout(_.current)},[]);const g=m(e=>{window.clearTimeout(_.current),window.clearTimeout(s.current),s.current=window.setTimeout(()=>{c(e)},100)},[]),y=m(()=>{window.clearTimeout(s.current),_.current=window.setTimeout(()=>{c(null)},300)},[]),b=m(()=>{window.clearTimeout(_.current)},[]),x=m(e=>{window.clearTimeout(s.current),window.clearTimeout(_.current),c(e)},[]),w=m(e=>{c(t=>t===e?null:t)},[]),S=m(e=>()=>{c(t=>t&&t!==e?null:t)},[]),T=m(e=>{h(t=>t.includes(e)?t.filter(t=>t!==e):[...t,e])},[]),N=m(e=>t=>{e.onClick?.(t),a()},[a]),I=m(e=>t=>{e.onClick?.(t),"mobile"!==o?(window.clearTimeout(s.current),window.clearTimeout(_.current),c(t=>t===e.id?null:e.id)):T(e.id)},[o,T]);return e("div",{role:"none",className:C(mi,{[vi]:r},i?.list),children:n.map((n,r)=>{const a=void 0!==n.items,c=Boolean(n.divider)&&r>0&&e(ri,{className:C(i?.divider)});if(a&&"desktop"===o)return t(v,{children:[c,e(fi,{item:n,open:l===n.id,onClick:I(n),onOpenChange:e=>{e?x(n.id):w(n.id)},onRowMouseEnter:g,onRowMouseLeave:y,onPanelMouseEnter:b,onPanelMouseLeave:y,onRowFocus:S(n.id),children:e(bi,{items:n.items})})]},n.id);const s=a&&"mobile"===o,u=s&&f.includes(n.id);return t(v,{children:[c,e(pi,{item:n,expanded:u,onClick:a?I(n):N(n),onFocus:"desktop"===o?S(n.id):void 0}),s&&e("div",{role:"none",className:C(hi,{[gi]:u},i?.accordion),children:e("div",{className:yi,children:e(bi,{items:n.items,nested:!0})})})]},n.id)})})};bi.displayName="ContextMenuList";const Ci=o((n,o)=>{const{items:a,actionBar:i,children:l,className:c,openOn:s="click",mode:f="auto",placement:v="bottom-start",open:h,defaultOpen:g=!1,onOpenChange:b,asChild:x=!1,innerClassNames:w}=n,[S,T]=p(g),N=void 0!==h,I=N?Boolean(h):S,E=(e=>{const[t,n]=p(ti);return d(()=>{if("auto"!==e||"undefined"==typeof window||"function"!=typeof window.matchMedia)return;const t=window.matchMedia("(pointer: coarse)"),r=e=>{n(e.matches)};return n(t.matches),t.addEventListener("change",r),()=>{t.removeEventListener("change",r)}},[e]),"auto"!==e?e:t?"mobile":"desktop"})(f),R=va(),k=m(e=>{N||T(e),b?.(e)},[N,b]),{refs:A,floatingStyles:M,context:B}=Ua({nodeId:R,open:I,onOpenChange:k,placement:v,strategy:"fixed",middleware:[Vo(4),Ko({padding:8}),Wo({padding:8})],whileElementsMounted:Bo}),L=_(()=>(e=>Array.isArray(e)?e:[e])(s),[s]),P=La(B,{enabled:L.includes("click"),toggle:!0}),O=function(e,t){void 0===t&&(t={});const{open:n,onOpenChange:o,dataRef:a,events:i,elements:l}=e,{enabled:c=!0,delay:s=0,handleClose:u=null,mouseOnly:d=!1,restMs:_=0,move:p=!0}=t,f=ma(),m=fa(),v=Jr(u),h=Jr(s),g=Jr(n),y=Jr(_),b=r.useRef(),C=r.useRef(-1),x=r.useRef(),w=r.useRef(-1),S=r.useRef(!0),T=r.useRef(!1),N=r.useRef(()=>{}),I=r.useRef(!1),E=eo(()=>{var e;const t=null==(e=a.current.openEvent)?void 0:e.type;return(null==t?void 0:t.includes("mouse"))&&"mousedown"!==t});r.useEffect(()=>{if(c)return i.on("openchange",e),()=>{i.off("openchange",e)};function e(e){let{open:t}=e;t||(ba(C),ba(w),S.current=!0,I.current=!1)}},[c,i]),r.useEffect(()=>{if(!c)return;if(!v.current)return;if(!n)return;function e(e){E()&&o(!1,e,"hover")}const t=Vr(l.floating).documentElement;return t.addEventListener("mouseleave",e),()=>{t.removeEventListener("mouseleave",e)}},[l.floating,n,o,c,v,E]);const R=r.useCallback(function(e,t,n){void 0===t&&(t=!0),void 0===n&&(n="hover");const r=xa(h.current,"close",b.current);r&&!x.current?(ba(C),C.current=window.setTimeout(()=>o(!1,e,n),r)):t&&(ba(C),o(!1,e,n))},[h,o]),k=eo(()=>{N.current(),x.current=void 0}),A=eo(()=>{if(T.current){const e=Vr(l.floating).body;e.style.pointerEvents="",e.removeAttribute(Ca),T.current=!1}}),M=eo(()=>!!a.current.openEvent&&["click","mousedown"].includes(a.current.openEvent.type));r.useEffect(()=>{if(c&&An(l.domReference)){const o=l.domReference,a=l.floating;return n&&o.addEventListener("mouseleave",r),p&&o.addEventListener("mousemove",e,{once:!0}),o.addEventListener("mouseenter",e),o.addEventListener("mouseleave",t),a&&(a.addEventListener("mouseleave",r),a.addEventListener("mouseenter",i),a.addEventListener("mouseleave",s)),()=>{n&&o.removeEventListener("mouseleave",r),p&&o.removeEventListener("mousemove",e),o.removeEventListener("mouseenter",e),o.removeEventListener("mouseleave",t),a&&(a.removeEventListener("mouseleave",r),a.removeEventListener("mouseenter",i),a.removeEventListener("mouseleave",s))}}function e(e){if(ba(C),S.current=!1,d&&!Gr(b.current)||wa(y.current)>0&&!xa(h.current,"open"))return;const t=xa(h.current,"open",b.current);t?C.current=window.setTimeout(()=>{g.current||o(!0,e,"hover")},t):n||o(!0,e,"hover")}function t(e){if(M())return void A();N.current();const t=Vr(l.floating);if(ba(w),I.current=!1,v.current&&a.current.floatingContext){n||ba(C),x.current=v.current({...a.current.floatingContext,tree:f,x:e.clientX,y:e.clientY,onClose(){A(),k(),M()||R(e,!0,"safe-polygon")}});const r=x.current;return t.addEventListener("mousemove",r),void(N.current=()=>{t.removeEventListener("mousemove",r)})}("touch"!==b.current||!$r(l.floating,e.relatedTarget))&&R(e)}function r(e){M()||a.current.floatingContext&&(null==v.current||v.current({...a.current.floatingContext,tree:f,x:e.clientX,y:e.clientY,onClose(){A(),k(),M()||R(e)}})(e))}function i(){ba(C)}function s(e){M()||R(e,!1)}},[l,c,e,d,p,R,k,A,o,n,g,f,h,v,a,M,y]),Zr(()=>{var e;if(c&&n&&null!=(e=v.current)&&null!=(e=e.__options)&&e.blockPointerEvents&&E()){T.current=!0;const e=l.floating;if(An(l.domReference)&&e){var t;const n=Vr(l.floating).body;n.setAttribute(Ca,"");const r=l.domReference,o=null==f||null==(t=f.nodesRef.current.find(e=>e.id===m))||null==(t=t.context)?void 0:t.elements.floating;return o&&(o.style.pointerEvents=""),n.style.pointerEvents="none",r.style.pointerEvents="auto",e.style.pointerEvents="auto",()=>{n.style.pointerEvents="",r.style.pointerEvents="",e.style.pointerEvents=""}}}},[c,n,m,l,f,v,E]),Zr(()=>{n||(b.current=void 0,I.current=!1,k(),A())},[n,k,A]),r.useEffect(()=>()=>{k(),ba(C),ba(w),A()},[c,l.domReference,k,A]);const B=r.useMemo(()=>{function e(e){b.current=e.pointerType}return{onPointerDown:e,onPointerEnter:e,onMouseMove(e){const{nativeEvent:t}=e;function r(){S.current||g.current||o(!0,t,"hover")}d&&!Gr(b.current)||n||0===wa(y.current)||I.current&&e.movementX**2+e.movementY**2<2||(ba(w),"touch"===b.current?r():(I.current=!0,w.current=window.setTimeout(r,wa(y.current))))}}},[d,o,n,g,y]);return r.useMemo(()=>c?{reference:B}:{},[c,B])}(B,{enabled:L.includes("hover"),delay:ei}),D=Fa(B),F=function(e,t){var n,o;void 0===t&&(t={});const{open:a,elements:i,floatingId:l}=e,{enabled:c=!0,role:s="dialog"}=t,u=ca(),d=(null==(n=i.domReference)?void 0:n.id)||u,_=r.useMemo(()=>{var e;return(null==(e=Kr(i.floating))?void 0:e.id)||l},[i.floating,l]),p=null!=(o=Xa.get(s))?o:s,f=null!=fa(),m=r.useMemo(()=>"tooltip"===p||"label"===s?{["aria-"+("label"===s?"labelledby":"describedby")]:a?_:void 0}:{"aria-expanded":a?"true":"false","aria-haspopup":"alertdialog"===p?"dialog":p,"aria-controls":a?_:void 0,..."listbox"===p&&{role:"combobox"},..."menu"===p&&{id:d},..."menu"===p&&f&&{role:"menuitem"},..."select"===s&&{"aria-autocomplete":"none"},..."combobox"===s&&{"aria-autocomplete":"list"}},[p,_,f,a,d,s]),v=r.useMemo(()=>{const e={id:_,...p&&{role:p}};return"tooltip"===p||"label"===s?e:{...e,..."menu"===p&&{"aria-labelledby":d}}},[p,_,d,s]),h=r.useCallback(e=>{let{active:t,selected:n}=e;const r={role:"option",...t&&{id:_+"-fui-option"}};switch(s){case"select":case"combobox":return{...r,"aria-selected":n}}return{}},[_,s]);return r.useMemo(()=>c?{reference:m,floating:v,item:h}:{},[c,m,v,h])}(B,{role:"menu"}),z=u([]),[U,$]=p(null),H=qa(B,{listRef:z,activeIndex:U,onNavigate:$}),{getReferenceProps:j,getFloatingProps:V,getItemProps:W}=Ha([P,O,D,F,H]),K=_(()=>({activeIndex:U,getItemProps:W}),[U,W]),Y=m(()=>{k(!1)},[k]),q=u(!1);d(()=>{I?q.current=!0:q.current&&(q.current=!1,"undefined"!=typeof document&&document.activeElement===document.body&&A.domReference.current?.focus())},[I,A]);const X=_(()=>({mode:E,close:Y,innerClassNames:w}),[E,Y,w]);return t(ha,{id:R,children:[e(x?J:"span",{ref:xe(o,A.setReference),className:C(!x&&Qa,c,w?.trigger),tabIndex:x?void 0:0,...j(),children:l}),I&&"undefined"!=typeof document&&y(e(Ga.Provider,{value:X,children:t(di,{ref:A.setFloating,style:M,className:C(w?.content),...V({onKeyDown:e=>{"Tab"===e.key&&Y()}}),children:[i&&e(ci,{buttons:i}),e(Ja.Provider,{value:K,children:e(Go,{elementsRef:z,children:e(bi,{items:a})})})]})}),document.body)]})});Ci.displayName="ContextMenuInner";const xi=o((t,n)=>e(ga,{children:e(Ci,{...t,ref:n})}));xi.displayName="ContextMenu";const wi=e=>{switch(e){case"xsmall":return 16;case"small":case"medium":return 20;case"large":return 24}},Si=e=>{switch(e){case"primary":case"destructive":case"overlay":return"contrast-static";case"secondary":case"ghost":return"primary";case"primary-contrast":case"secondary-contrast":return"primary-static"}};var Ti={IconButton:"IconButton__KCr",IconButton_loading:"IconButton_loading__RxW",IconButton__content:"IconButton__content__dCL",IconButton_disabled:"IconButton_disabled__SZj",IconButton_activeMode_ripple:"IconButton_activeMode_ripple__asi",IconButton_activeMode_highlight:"IconButton_activeMode_highlight__h15",IconButton_size_xsmall:"IconButton_size_xsmall__G5T",IconButton_size_small:"IconButton_size_small__e3f",IconButton_size_medium:"IconButton_size_medium__MQQ",IconButton_size_large:"IconButton_size_large__9oz",IconButton_variant_primary:"IconButton_variant_primary__-4n",IconButton_variant_secondary:"IconButton_variant_secondary__dFi",IconButton_variant_ghost:"IconButton_variant_ghost__jvE","IconButton_variant_primary-contrast":"IconButton_variant_primary-contrast__O-T","IconButton_variant_secondary-contrast":"IconButton_variant_secondary-contrast__uNH",IconButton_variant_overlay:"IconButton_variant_overlay__vJc",IconButton_variant_destructive:"IconButton_variant_destructive__9rk",IconButton__spinnerContainer:"IconButton__spinnerContainer__9--",IconButton__ripple:"IconButton__ripple__l8M"};const Ni=o((n,r)=>{const{children:o,className:a,disabled:i,innerClassNames:l,loading:c,onClick:s,asChild:u=!1,size:d="medium",variant:_="primary",...p}=n,f="button",m=u?J:f,v=Oe(),h=Re({asChild:u,children:o,disabled:i,loading:c,onClick:s,rootElement:f}),g=i||c,y="android"===v,b=C(Ti.IconButton,Ti[`IconButton_variant_${_}`],Ti[`IconButton_size_${d}`],{[Ti.IconButton_loading]:c,[Ti.IconButton_disabled]:i,[Ti.IconButton_activeMode_highlight]:!g&&!y,[Ti.IconButton_activeMode_ripple]:!g&&y},a);return t(m,{ref:r,className:b,...h,...p,children:[c&&e("span",{className:C(Ti.IconButton__spinnerContainer,l?.spinnerContainer),children:e(Xt,{className:C(l?.spinner),size:wi(d),appearance:Si(_)})}),e(te,{children:ye({options:{asChild:u,children:o},content:t=>e("span",{className:C(Ti.IconButton__content,l?.content),children:t},"subtree-container")})}),y&&!g&&e(Ft,{className:Ti.IconButton__ripple})]})});Ni.displayName="IconButton";var Ii={Input:"Input__A3w",Input_disabled:"Input_disabled__mpt",Input__iconBefore:"Input__iconBefore__gxx",Input__iconAfter:"Input__iconAfter__jL1",Input_size_medium:"Input_size_medium__EjC",Input__input:"Input__input__gy5",Input_size_large:"Input_size_large__8OF",Input_mode_default:"Input_mode_default__ncX",Input_mode_contrast:"Input_mode_contrast__EIY",Input__body:"Input__body__sVJ",Input__clearButton:"Input__clearButton__nKe",Input__count:"Input__count__zAz",Input__hint:"Input__hint__dE5",Input__hint_disabled:"Input__hint_disabled__E55"};const Ei=o((n,r)=>{const{className:o,innerClassNames:a,withClearButton:i,iconBefore:l,iconAfter:c,size:s="large",mode:u="default",count:d,hint:_,...p}=n,f=C(Ii.Input,Ii[`Input_mode_${u}`],Ii[`Input_size_${s}`],{[Ii.Input_disabled]:p.disabled},o);return t("div",{className:C(a?.container),children:[t("label",{className:f,children:[be(l)&&e("div",{className:C(Ii.Input__iconBefore,a?.iconBefore),children:l}),e(xt,{ref:r,className:C(Ii.Input__body,a?.body),withClearButton:i,count:d,innerClassNames:{input:C(Ii.Input__input,a?.input),clearButton:C(Ii.Input__clearButton,a?.clearButton),count:C(Ii.Input__count,a?.count)},...p}),be(c)&&e("div",{className:C(Ii.Input__iconAfter,a?.iconAfter),children:c})]}),be(_)&&e("div",{className:C(Ii.Input__hint,{[Ii.Input__hint_disabled]:p.disabled},a?.hint),children:_})]})});Ei.displayName="Input";const Ri=o((t,n)=>{const{children:r,className:o,colorScheme:a,platform:i=(Ce()?"ios":"android"),resetBody:l=!1}=t,c=ze({listenChanges:!a}),s=a??c,u=_(()=>({colorScheme:s,platform:i}),[s,i]);d(()=>{if(l)return document.body.classList.add(si.MaxUI_resetBody),()=>{document.body.classList.remove(si.MaxUI_resetBody)}},[l]);const p=C(si.MaxUI,si[`MaxUI_colorScheme_${s}`],si[`MaxUI_platform_${i}`],o);return e(Ae.Provider,{value:u,children:e("div",{ref:n,className:p,children:r})})});Ri.displayName="MaxUI";var ki="Radio__MT3",Ai="Radio__input__QY4",Mi="Radio__control__T5I",Bi="Radio_animated__XvV";const Li=o((n,r)=>{const{className:o,...a}=n,i=C(ki,Bi,o);return t("span",{className:i,children:[e("input",{...a,ref:r,type:"radio",className:Ai}),e("span",{className:Mi})]})});Li.displayName="Radio";var Pi="segmented__iN0",Oi="segment__-Te",Di="segment_active__85D";const Fi=({items:t,activeItem:n,onClick:r,innerClassNames:o})=>{const a=e=>n=>{const o=t.length-1;let a;switch(n.key){case"ArrowRight":case"ArrowDown":a=e===o?0:e+1;break;case"ArrowLeft":case"ArrowUp":a=0===e?o:e-1;break;case"Home":a=0;break;case"End":a=o;break;case"Enter":case" ":return n.preventDefault(),void r(t[e].id);default:return}n.preventDefault(),r(t[a].id);const i=n.currentTarget.parentElement?.children[a];i?.focus(),i?.scrollIntoView({inline:"nearest",block:"nearest",behavior:"smooth"})},i=e=>e===n;return e("div",{className:C(Pi,o?.list),role:"tablist",children:t.map((t,n)=>{return e("button",{role:"tab",tabIndex:i(t.id)?0:-1,"aria-selected":i(t.id),onKeyDown:a(n),className:C(Oi,o?.item,{[Di]:i(t.id)}),onClick:(l=t.id,e=>{r(l),e.currentTarget.scrollIntoView({inline:"nearest",block:"nearest",behavior:"smooth"})}),type:"button",children:t.title},t.id);var l})})},zi="Ничего не найдено",Ui="Поиск",$i=[],Hi=e=>"string"==typeof e||"number"==typeof e?String(e):"",ji=(e,t)=>(e=>void 0!==e.searchText?e.searchText:`${Hi(e.label)} ${Hi(e.hint)}`.trim()||e.value)(e).toLowerCase().includes(t.trim().toLowerCase()),Vi=(e,t,n)=>{for(let r=t+n;r>=0&&r<e.length;r+=n)if(!e[r].disabled)return r;return-1},Wi=a({multiple:!1,query:"",setQuery:we,isSelected:()=>!1,select:we,close:we,options:$i,listId:"",getOptionId:()=>"",activeIndex:null,setActiveIndex:we,onKeyDown:we,emptyText:zi,loading:!1}),Ki=()=>i(Wi);var Yi="SelectEmpty__sWw";const qi=o((t,n)=>{const{className:r,children:o,...a}=t,{emptyText:i,loading:l,innerClassNames:c}=Ki();return e("div",{ref:n,role:"status","aria-label":l?"Загрузка":void 0,className:C(Yi,l?c?.loading:c?.empty,r),...a,children:l?e(Xt,{size:20,"aria-hidden":!0}):o??i})});qi.displayName="SelectEmpty";var Xi="SelectOptionRow__sXi",Gi="SelectOptionRow_selected__W8R",Zi="SelectOptionRow_active__pZs",Ji="SelectOptionRow_disabled__Xx7",Qi="SelectOptionRow__before__-y2",el="SelectOptionRow__label__cwK",tl="SelectOptionRow__hint__ppH",nl="SelectOptionRow__check__dmb";const rl=o((n,r)=>{const{option:o,index:a,className:i,...l}=n,{multiple:c,isSelected:s,select:_,activeIndex:p,setActiveIndex:f,getOptionId:m,innerClassNames:v}=Ki(),h=u(null),g=u(!1),y=s(o.value),b=void 0!==a&&p===a;d(()=>{b&&!g.current&&h.current?.scrollIntoView({block:"nearest"})},[b]);const x=C(Xi,{[Gi]:y,[Zi]:b,[Ji]:o.disabled},v?.option,i);return t("div",{ref:xe(h,r),id:void 0===a?void 0:m(a),role:"option","aria-selected":y,"aria-disabled":o.disabled||void 0,className:x,onMouseDown:e=>{e.preventDefault()},onMouseMove:()=>{g.current=!0,o.disabled||void 0===a||p===a||f(a)},onMouseLeave:()=>{g.current=!1},onClick:()=>{o.disabled||_(o.value,o)},...l,children:[be(o.before)&&e("span",{className:C(Qi,v?.optionBefore),children:o.before}),e("span",{className:C(el,v?.optionLabel),children:o.label}),be(o.hint)&&e("span",{className:C(tl,v?.optionHint),children:o.hint}),c&&e("span",{className:C(nl,v?.optionCheck),children:y&&e(T,{})})]})});rl.displayName="SelectOptionRow";var ol="SelectSearch__x-k",al="SelectSearch__icon__dxs",il="SelectSearch__input__S13",ll="SelectSearch__clearButton__A9A";const cl=o((n,r)=>{const{className:o,placeholder:a,...i}=n,{query:l,setQuery:c,listId:s,activeIndex:_,getOptionId:p,onKeyDown:f,innerClassNames:m}=Ki(),v=u(null);return d(()=>{window.matchMedia?.("(pointer: coarse)").matches||v.current?.focus({preventScroll:!0})},[]),t("div",{className:C(ol,o,m?.search),children:[e(L,{className:al}),e("input",{ref:xe(v,r),type:"text",role:"searchbox",autoComplete:"off",spellCheck:!1,"aria-autocomplete":"list","aria-label":a,"aria-controls":s,"aria-activedescendant":null===_?void 0:p(_),className:il,placeholder:a,value:l,onChange:e=>{c(e.currentTarget.value)},onKeyDown:f,...i}),""!==l&&e(pe,{type:"button",tabIndex:-1,className:ll,"aria-label":"Очистить поиск",onMouseDown:e=>{e.preventDefault()},onClick:()=>{c("")},children:e(A,{})})]})});cl.displayName="SelectSearch";var sl={SelectContent:"SelectContent__VfR",SelectContent_width_trigger:"SelectContent_width_trigger__JeH",SelectContent_width_auto:"SelectContent_width_auto__7XK",SelectContent__header:"SelectContent__header__1jc",SelectContent__body:"SelectContent__body__2jh"};const ul=o((n,r)=>{const{children:o,className:a,header:i,dropdownWidth:l="trigger",innerClassNames:c,...s}=n,u=(()=>{const{platform:e,colorScheme:t}=Me();return C(si[`MaxUI_colorScheme_${t}`],si[`MaxUI_platform_${e}`])})();return t("div",{ref:r,className:C(u,sl.SelectContent,sl[`SelectContent_width_${l}`],a),...s,children:[i&&e("div",{className:C(sl.SelectContent__header,c?.header),children:i}),e("div",{className:C(sl.SelectContent__body,c?.body),children:o})]})});ul.displayName="SelectContent";var dl={SelectField:"SelectField__vYH",SelectField_disabled:"SelectField_disabled__Zd-",SelectField__iconBefore:"SelectField__iconBefore__jb0",SelectField__chevron:"SelectField__chevron__Co2",SelectField__value:"SelectField__value__jnC",SelectField_size_medium:"SelectField_size_medium__Ai4",SelectField_size_large:"SelectField_size_large__SLs",SelectField_mode_default:"SelectField_mode_default__Hnl",SelectField_mode_contrast:"SelectField_mode_contrast__VUx",SelectField__value_placeholder:"SelectField__value_placeholder__bR7",SelectField__counter:"SelectField__counter__8-T",SelectField__clearButton:"SelectField__clearButton__p7f",SelectField_open:"SelectField_open__yhN",SelectField__chevron_open:"SelectField__chevron_open__xtc"};const _l=o((n,r)=>{const{className:o,mode:a,size:i,open:l,disabled:c,iconBefore:s,valueContent:u,placeholder:d,hiddenCount:_=0,valueId:p,showClearButton:f,onClear:m,innerClassNames:v,...h}=n,g=be(u),y=C(dl.SelectField,dl[`SelectField_mode_${a}`],dl[`SelectField_size_${i}`],{[dl.SelectField_disabled]:c,[dl.SelectField_open]:l},v?.field,o);return t("div",{ref:r,role:"combobox","aria-haspopup":"listbox","aria-expanded":l,"aria-disabled":c||void 0,tabIndex:c?-1:0,className:y,...h,children:[be(s)&&e("div",{className:C(dl.SelectField__iconBefore,v?.iconBefore),children:s}),e(Rt,{id:p,className:C(dl.SelectField__value,{[dl.SelectField__value_placeholder]:!g},v?.value),children:g?u:d}),_>0&&e("span",{className:C(dl.SelectField__counter,v?.counter),children:`+${_}`}),f&&!c&&e(pe,{type:"button",tabIndex:-1,className:C(dl.SelectField__clearButton,v?.clearButton),"aria-label":"Очистить",onMouseDown:e=>{e.preventDefault()},onClick:e=>{e.stopPropagation(),m()},children:e(A,{})}),e(E,{"aria-hidden":!0,className:C(dl.SelectField__chevron,{[dl.SelectField__chevron_open]:l},v?.chevron)})]})});_l.displayName="SelectField";var pl="SelectOptions__0k6";const fl=()=>{const{options:r,listId:o,multiple:a,loading:i,listLabel:l,innerClassNames:c}=Ki();return t(n,{children:[e("div",{id:o,role:"listbox",...l,"aria-multiselectable":a||void 0,"aria-busy":i||void 0,className:C(pl,c?.list),children:r.map((t,n)=>e(rl,{option:t,index:n},t.value))}),(0===r.length||i)&&e(qi,{})]})};fl.displayName="SelectOptions";var ml="Select__Yce",vl="Select__hint__K4l",hl="Select__hint_disabled__k6E";const gl=o((n,r)=>{const{options:o=$i,customDropdownMenu:a,selectedOptions:i,searchable:l=!1,searchPlaceholder:c=Ui,filterOption:s,onSearchChange:f,loading:v=!1,emptyText:g=zi,placeholder:y,disabled:b=!1,mode:x="default",size:w="large",hint:S,iconBefore:T,withClearButton:N=!1,name:I,open:E,defaultOpen:R=!1,onOpenChange:k,placement:A="bottom-start",dropdownWidth:M="trigger",innerClassNames:B,multiple:L,value:P,defaultValue:O,onValueChange:D,onKeyDown:F,onFocus:z,onBlur:U,"aria-label":$,"aria-labelledby":H,"aria-describedby":j,...V}=n,W=Boolean(L),K=h(),Y=`${K}-listbox`,q=`${K}-value`,X=`${K}-hint`,G=V.id??`${K}-field`,Z=m(e=>`${K}-option-${e}`,[K]),J=void 0!==P,[Q,ee]=p(O),te=J?P:Q,ne=_(()=>{return void 0===(e=te)||""===e?[]:Array.isArray(e)?e:[e];var e},[te]),re=u(new Map);for(const e of re.current.keys())ne.includes(e)||re.current.delete(e);for(const e of o)re.current.set(e.value,e);if(i)for(const e of i)re.current.set(e.value,e);const oe=e=>e.map(e=>re.current.get(e)??{value:e,label:e}),[ae,ie]=p(R),le=void 0!==E,ce=!b&&(le?Boolean(E):ae),se=m(e=>{le||ie(e),k?.(e)},[le,k]);d(()=>{b&&(le?E:ae)&&se(!1)},[b]);const[ue,de]=p(""),[_e,pe]=p(null),fe=m(e=>{de(e),f?.(e)},[f]),me=_(()=>void 0!==a?$i:l&&""!==ue.trim()?s?o.filter(e=>s(e,ue)):f?o:o.filter(e=>ji(e,ue)):o,[a,l,ue,o,s,f]),ve=me.map(e=>e.value).join("\0"),he=null!==_e&&me[_e]&&!me[_e].disabled?_e:null,{refs:ge,floatingStyles:ye,context:Ce}=Ua({open:ce,onOpenChange:se,placement:A,strategy:"fixed",middleware:[Vo(4),Ko({padding:8}),Yo({padding:8,apply({rects:e,availableHeight:t,elements:n}){n.floating.style.setProperty("--MaxUi-Select_trigger-width",`${e.reference.width}px`),n.floating.style.setProperty("--MaxUi-Select_available-height",`${t}px`)}}),Wo({padding:8})],whileElementsMounted:Bo}),we=La(Ce,{enabled:!b,toggle:!0,keyboardHandlers:!1}),Se=Fa(Ce),{getReferenceProps:Te,getFloatingProps:Ne}=Ha([we,Se]),Ie=m(()=>{ge.domReference.current?.focus()},[ge]),Ee=m(e=>{se(!1),e&&Ie()},[se,Ie]),Re=u(!1);d(()=>{ce?Re.current=!0:(pe(null),""!==ue&&(de(""),f?.("")),Re.current&&(Re.current=!1,document.activeElement===document.body&&Ie()))},[ce]),d(()=>{if(!ce)return;const e=me.findIndex(e=>!e.disabled&&ne.includes(e.value));pe(-1===e?null:e)},[ce]),d(()=>{if(!ce||""===ue)return;const e=Vi(me,-1,1);pe(-1===e?null:e)},[ue,ve]);const ke=e=>{const t=W?e:e[0]??"";J||ee(t),W?D?.(e,oe(e)):D?.(t,oe(e)[0]??null)},Ae=(e,t)=>{t&&re.current.set(e,t),W?ke(ne.includes(e)?ne.filter(t=>t!==e):[...ne,e]):(ne[0]!==e&&ke([e]),Ee(!0))},Me=e=>ne.includes(e),Be=N&&ne.length>0,Le=()=>{ke([])},Pe=(e=>{const{open:t,options:n,activeIndex:r,setActiveIndex:o,onSelectIndex:a,onOpen:i,onClose:l,onClear:c}=e;return m(e=>{if(e.target!==e.currentTarget)return;if(e.nativeEvent.isComposing)return;const s=e.currentTarget instanceof HTMLInputElement;if(!t)return"ArrowDown"===e.key||"ArrowUp"===e.key||"Enter"===e.key||" "===e.key?(e.preventDefault(),void i()):void("Backspace"!==e.key&&"Delete"!==e.key||!c||(e.preventDefault(),c()));const u=e=>{-1!==e&&o(e)};switch(e.key){case"ArrowDown":e.preventDefault(),u(Vi(n,r??-1,1));break;case"ArrowUp":e.preventDefault(),u(Vi(n,r??n.length,-1));break;case"Home":if(s)break;e.preventDefault(),u(Vi(n,-1,1));break;case"End":if(s)break;e.preventDefault(),u(Vi(n,n.length,-1));break;case"Enter":case" ":{if(" "===e.key&&s)break;const t=null===r?void 0:n[r];null!==r&&t&&!t.disabled?(e.preventDefault(),a(r)):s||(e.preventDefault(),l(!0));break}case"Tab":s&&e.preventDefault(),l(s)}},[t,n,r,o,a,i,l,c])})({open:ce,options:me,activeIndex:he,setActiveIndex:pe,onSelectIndex:e=>{Ae(me[e].value,me[e])},onOpen:()=>{se(!0)},onClose:Ee,onClear:Be?Le:void 0}),Oe=e=>e instanceof Node&&Boolean(ge.floating.current?.contains(e)),De=()=>{Ee(!0)},Fe={multiple:W,query:ue,setQuery:fe,isSelected:Me,select:Ae,close:De,options:me,listId:Y,getOptionId:Z,activeIndex:he,setActiveIndex:pe,onKeyDown:Pe,emptyText:g,loading:v,listLabel:H?{"aria-labelledby":H}:{"aria-label":$??("string"==typeof y?y:void 0)},innerClassNames:B},ze={query:ue,multiple:W,isSelected:Me,select:Ae,close:De},[Ue]=oe(ne),$e=ne.length>0?Ue?.label??ne[0]:void 0,He=void 0!==a,je=l&&!He,Ve=He?"function"==typeof a?a(ze):a:e(fl,{}),We=ce&&!je&&null!==he?Z(he):void 0,Ke=H?`${H} ${q}`:$?`${G} ${q}`:q,Ye=[j,be(S)?X:void 0].filter(Boolean).join(" ")||void 0;return t("div",{className:C(ml,B?.container),children:[e(_l,{ref:xe(r,ge.setReference),id:G,valueId:q,"aria-label":$,"aria-labelledby":Ke,"aria-describedby":Ye,mode:x,size:w,open:ce,disabled:b,iconBefore:T??(W?void 0:Ue?.before),valueContent:$e,placeholder:y,hiddenCount:W?Math.max(ne.length-1,0):0,showClearButton:Be,onClear:Le,innerClassNames:B,"aria-controls":ce&&!He?Y:void 0,"aria-activedescendant":We,...Te({...V,onKeyDown:e=>{F?.(e),e.defaultPrevented||Pe(e)},onFocus:e=>{Oe(e.relatedTarget)||z?.(e)},onBlur:e=>{Oe(e.relatedTarget)||U?.(e)}})}),be(S)&&e("div",{id:X,className:C(vl,{[hl]:b},B?.hint),children:S}),I&&!b&&ne.map(t=>e("input",{type:"hidden",name:I,value:t},t)),ce&&e(ka,{children:e(Wi.Provider,{value:Fe,children:e(ul,{ref:ge.setFloating,style:ye,dropdownWidth:M,className:C(B?.content),header:je?e(cl,{placeholder:c}):void 0,...Ne({onBlur:e=>{const t=e.relatedTarget,n=t instanceof Node&&Boolean(ge.domReference.current?.contains(t));Oe(t)||n||U?.(e)},onMouseDown:e=>{e.target.closest("input, textarea, select, [contenteditable]")||e.preventDefault()}}),children:Ve})})})]})});gl.displayName="Select";var yl={viewport:"viewport__DPJ",topLeft:"topLeft__e-4",topCenter:"topCenter__WCQ",topRight:"topRight__Kqq",bottomLeft:"bottomLeft__-Jr",bottomCenter:"bottomCenter__6BC",bottomRight:"bottomRight__18f",SnackbarItem:"SnackbarItem__wdB",maxSnackbarEnter:"maxSnackbarEnter__qbP","SnackbarItem_placement_top-left":"SnackbarItem_placement_top-left__4gd","SnackbarItem_placement_top-center":"SnackbarItem_placement_top-center__1Ip","SnackbarItem_placement_top-right":"SnackbarItem_placement_top-right__Lx-","SnackbarItem_placement_bottom-left":"SnackbarItem_placement_bottom-left__D1r","SnackbarItem_placement_bottom-center":"SnackbarItem_placement_bottom-center__xy4","SnackbarItem_placement_bottom-right":"SnackbarItem_placement_bottom-right__8AG",SnackbarItem_leaving:"SnackbarItem_leaving__OwP",maxSnackbarExit:"maxSnackbarExit__YWk",before:"before__hVC",after:"after__1BT",textContainer:"textContainer__HNM",text:"text__6Z1",caption:"caption__K-X"};const bl=o((n,r)=>{const{id:o,caption:a,before:i,after:l,text:c,placement:s,leaving:u,onExited:d,..._}=n,p=m(()=>{u&&d?.(o)},[u,d,o]),f=C(yl.SnackbarItem,yl[`SnackbarItem_placement_${s}`],u&&yl.SnackbarItem_leaving);return t("div",{ref:r,className:f,role:"status","data-placement":s,"data-leaving":u||void 0,onAnimationEnd:p,onClick:()=>d?.(o),..._,children:[be(i)&&e("div",{className:yl.before,children:i}),(!!c||!!a)&&t("div",{className:yl.textContainer,children:[!!c&&e(ct.Body,{className:yl.text,variant:"large",children:c}),!!a&&e(ct.Body,{className:yl.caption,variant:"small",children:a})]}),be(l)&&e("div",{className:yl.after,children:l})]})});bl.displayName="SnackbarItem";const Cl=["top-left","top-center","top-right","bottom-left","bottom-center","bottom-right"],xl={"top-left":yl.topLeft,"top-center":yl.topCenter,"top-right":yl.topRight,"bottom-left":yl.bottomLeft,"bottom-center":yl.bottomCenter,"bottom-right":yl.bottomRight},wl=e=>{if(void 0!==e)return"number"==typeof e?`${e}px`:e},Sl=(e,t)=>{if(void 0!==t)return e.startsWith("top-")?{"--snackbar-top-offset":t}:{"--snackbar-bottom-offset":t}};function Tl({queue:t,onExited:r}){const o=(e=>Cl.flatMap(t=>{const n=new Map;for(const r of e){if(r.placement!==t)continue;const e=wl(r.offset),o=`${t}:${void 0===e?"default":`offset:${e}`}`,a=n.get(o);a?a.items.push(r):n.set(o,{key:o,items:[r],offsetValue:e,placement:t})}return[...n.values()]}))(t);return e(n,{children:o.map(({key:t,items:n,offsetValue:o,placement:a})=>e("div",{className:C(yl.viewport,xl[a]),"aria-label":`Уведомления: ${a}`,"aria-live":"polite","data-offset":o,"data-placement":a,role:"region",style:Sl(a,o),children:n.map(t=>e(bl,{...t,onExited:r},t.id))},t))})}let Nl=0;const Il=()=>"function"==typeof globalThis.crypto?.randomUUID?globalThis.crypto.randomUUID():(Nl+=1,`snackbar-${Date.now()}-${Nl}`);function El({children:n,queueSize:r=3,createId:o=Il,defaultPlacement:a="bottom-center"}){const[i,l]=p([]),c=u(new Map),s=m(e=>{const t=e.id??o();l(n=>n.some(e=>e.id===t)?n:[...n,{...e,id:t,placement:e.placement??a,leaving:!1}])},[o,a]),f=m(e=>{const t=c.current.get(e);t&&clearTimeout(t),c.current.delete(e),l(t=>t.map(t=>t.id===e?{...t,leaving:!0}:t))},[]),v=m(()=>{for(const e of c.current.values())clearTimeout(e);c.current.clear(),l([])},[]),h=m(e=>{const t=c.current.get(e);t&&clearTimeout(t),c.current.delete(e),l(t=>t.filter(t=>t.id!==e))},[]),g=_(()=>{const e=new Map,t=Math.max(0,r);return i.filter(n=>{if(n.leaving)return!0;const r=e.get(n.placement)??0;return!(r>=t)&&(e.set(n.placement,r+1),!0)})},[i,r]);d(()=>{const e=new Set(i.map(e=>e.id));for(const[t,n]of c.current)e.has(t)||(clearTimeout(n),c.current.delete(t));for(const e of g){if(e.leaving)continue;if(c.current.has(e.id))continue;const t=setTimeout(()=>f(e.id),e.duration??5e3);c.current.set(e.id,t)}},[f,i,g]),d(()=>()=>{for(const e of c.current.values())clearTimeout(e);c.current.clear()},[]);const y=_(()=>({showSnackbar:s,closeSnackbar:f,clearSnackbars:v}),[f,s,v]);return t(De.Provider,{value:y,children:[n,e(Tl,{queue:g,onExited:h})]})}var Rl="label__ddl",kl="positive__pv1",Al="warning__UrM",Ml="negative__EtT",Bl="neutral__WIV";const Ll=o(({text:t,status:n},r)=>e(ct.Title,{ref:r,className:C(Rl,{[kl]:"positive"===n,[Al]:"warning"===n,[Ml]:"negative"===n,[Bl]:"neutral"===n}),variant:"medium-strong",children:t}));Ll.displayName="StatusBadge";var Pl="Steps__S-N",Ol="Steps__step__i-Y",Dl="Steps__step_active__-Ee";const Fl=o((t,n)=>{const{className:r,count:o,progress:a,...i}=t;return e("div",{ref:n,className:C(Pl,r),...i,children:Array.from({length:o},(t,n)=>e("div",{className:C(Ol,{[Dl]:n<a})},n))})});Fl.displayName="Steps";var zl={Switch:"Switch__-vj",Switch__toggle:"Switch__toggle__WU2",Switch__thumb:"Switch__thumb__jlX",Switch__input:"Switch__input__EDr",Switch_platform_ios:"Switch_platform_ios__B-C",Switch_platform_android:"Switch_platform_android__72T"};const Ul=o((n,r)=>{const{className:o,...a}=n,i=Oe(),l=C(zl.Switch,zl[`Switch_platform_${i}`],o);return t("span",{className:l,children:[e("input",{ref:r,type:"checkbox",role:"switch",className:zl.Switch__input,...a}),e("span",{className:zl.Switch__toggle,children:e("span",{className:zl.Switch__thumb})})]})});Ul.displayName="Switch";var $l="tabs__z-C",Hl="tab__LYq",jl="tab__label__9Dq",Vl="tab_active__6Jq";const Wl=({items:n,activeItem:r,onCancel:o,onClick:a,innerClassNames:i})=>{const l=e=>t=>{t.stopPropagation(),o?.(e)},c=e=>t=>{const r=n.length-1;let o;switch(t.key){case"ArrowRight":case"ArrowDown":o=e===r?0:e+1;break;case"ArrowLeft":case"ArrowUp":o=0===e?r:e-1;break;case"Home":o=0;break;case"End":o=r;break;case"Enter":case" ":return t.preventDefault(),void a(n[e].id);default:return}t.preventDefault(),a(n[o].id);const i=t.currentTarget.parentElement?.children[o];i?.focus(),i?.scrollIntoView({inline:"nearest",block:"nearest",behavior:"smooth"})},s=e=>e===r;return e("div",{className:C($l,i?.list),role:"tablist",children:n.map((n,r)=>{return t("div",{role:"tab",tabIndex:s(n.id)?0:-1,"aria-selected":s(n.id),onKeyDown:c(r),className:C(Hl,i?.item,{[Vl]:s(n.id)}),onClick:(u=n.id,e=>{a(u),e.currentTarget.scrollIntoView({inline:"nearest",block:"nearest",behavior:"smooth"})}),children:[t("button",{type:"button",tabIndex:-1,className:jl,children:[n.title,n.indicator&&e(Jt,{variant:s(n.id)?"primary":"mute",value:n.indicator,className:C(i?.indicator)})]}),!!o&&!n.indicator&&e(pe,{type:"button",tabIndex:-1,className:C(i?.closeButton),onClick:l(n.id),"aria-label":"Close",children:e(A,{})})]},n.id);var u})})};var Kl={Textarea:"Textarea__Sy6",Textarea_disabled:"Textarea_disabled__uY3",Textarea_mode_primary:"Textarea_mode_primary__E7l",Textarea_mode_secondary:"Textarea_mode_secondary__BYw",Textarea__textarea:"Textarea__textarea__Ok-"};const Yl=o((t,n)=>{const{className:r,innerClassNames:o,mode:a="primary",...i}=t,l=C(Kl.Textarea,Kl[`Textarea_mode_${a}`],{[Kl.Textarea_disabled]:i.disabled},r);return e("div",{className:l,children:e("textarea",{ref:n,className:C(Kl.Textarea__textarea,o?.textarea),...i})})});Yl.displayName="Textarea";export{Ye as Avatar,ht as BottomSheet,nn as Button,on as CellAction,ln as CellHeader,sn as CellInput,dn as CellList,pn as CellSimple,Tn as Checkbox,xt as ClearableInput,Tt as Container,xi as ContextMenu,Jt as Counter,Rt as EllipsisText,At as Flex,Bt as Grid,T as Icon16Check,E as Icon16Chevron,A as Icon16CloseIos,L as Icon16SearchOutline,F as Icon20CloseAndroid,$ as Icon20CloseFilled,j as Icon24CloseAndroid,Ni as IconButton,Ei as Input,Ri as MaxUI,Ae as MaxUIContext,Pt as Panel,Li as Radio,Ft as Ripple,Fi as Segmented,gl as Select,qi as SelectEmpty,rl as SelectOptionRow,cl as SelectSearch,J as Slot,te as Slottable,Tl as SnackbarContainer,bl as SnackbarItem,El as SnackbarProvider,Xt as Spinner,Ll as StatusBadge,Fl as Steps,pe as SvgButton,Ul as Switch,Wl as Tabs,Wt as Tappable,Yl as Textarea,ct as Typography,ye as getSubtree,be as hasReactNode,xe as mergeRefs,Me as useAppearance,Re as useButtonLikeProps,ke as useCallbackRef,Be as useColorScheme,Le as useDrag,Pe as useImageLoadingStatus,Oe as usePlatform,Ki as useSelect,Fe as useSnackbar,ze as useSystemColorScheme};
|
|
5
|
+
*/var xr=["input:not([inert]):not([inert] *)","select:not([inert]):not([inert] *)","textarea:not([inert]):not([inert] *)","a[href]:not([inert]):not([inert] *)","area[href]:not([inert]):not([inert] *)","button:not([inert]):not([inert] *)","[tabindex]:not(slot):not([inert]):not([inert] *)","audio[controls]:not([inert]):not([inert] *)","video[controls]:not([inert]):not([inert] *)",'[contenteditable]:not([contenteditable="false"]):not([inert]):not([inert] *)',"details>summary:first-of-type:not([inert]):not([inert] *)","details:not([inert]):not([inert] *)"].join(","),wr="undefined"==typeof Element,Sr=wr?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,Tr=!wr&&Element.prototype.getRootNode?function(e){var t;return null==e||null===(t=e.getRootNode)||void 0===t?void 0:t.call(e)}:function(e){return null==e?void 0:e.ownerDocument},Nr=function(e,t){var n;void 0===t&&(t=!0);var r=null==e||null===(n=e.getAttribute)||void 0===n?void 0:n.call(e,"inert");return""===r||"true"===r||t&&e&&("function"==typeof e.closest?e.closest("[inert]"):Nr(e.parentNode))},Ir=function(e,t,n){for(var r=[],o=Array.from(e);o.length;){var a=o.shift();if(!Nr(a,!1))if("SLOT"===a.tagName){var i=a.assignedElements(),l=i.length?i:a.children,c=Ir(l,!0,n);n.flatten?r.push.apply(r,c):r.push({scopeParent:a,candidates:c})}else{Sr.call(a,xr)&&n.filter(a)&&(t||!e.includes(a))&&r.push(a);var s=a.shadowRoot||"function"==typeof n.getShadowRoot&&n.getShadowRoot(a),u=!Nr(s,!1)&&(!n.shadowRootFilter||n.shadowRootFilter(a));if(s&&u){var d=Ir(!0===s?a.children:s.children,!0,n);n.flatten?r.push.apply(r,d):r.push({scopeParent:a,candidates:d})}else o.unshift.apply(o,a.children)}}return r},Er=function(e){return!isNaN(parseInt(e.getAttribute("tabindex"),10))},Rr=function(e){if(!e)throw new Error("No node provided");return e.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(e.tagName)||function(e){var t,n=null==e||null===(t=e.getAttribute)||void 0===t?void 0:t.call(e,"contenteditable");return""===n||"true"===n}(e))&&!Er(e)?0:e.tabIndex},kr=function(e,t){return e.tabIndex===t.tabIndex?e.documentOrder-t.documentOrder:e.tabIndex-t.tabIndex},Ar=function(e){return"INPUT"===e.tagName},Mr=function(e){return function(e){return Ar(e)&&"radio"===e.type}(e)&&!function(e){if(!e.name)return!0;var t,n=e.form||Tr(e),r=function(e){return n.querySelectorAll('input[type="radio"][name="'+e+'"]')};if("undefined"!=typeof window&&void 0!==window.CSS&&"function"==typeof window.CSS.escape)t=r(window.CSS.escape(e.name));else try{t=r(e.name)}catch(e){return console.error("Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s",e.message),!1}var o=function(e,t){for(var n=0;n<e.length;n++)if(e[n].checked&&e[n].form===t)return e[n]}(t,e.form);return!o||o===e}(e)},Br=function(e){var t=e.getBoundingClientRect(),n=t.width,r=t.height;return 0===n&&0===r},Lr=function(e,t){var n=t.displayCheck,r=t.getShadowRoot;if("full-native"===n&&"checkVisibility"in e)return!e.checkVisibility({checkOpacity:!1,opacityProperty:!1,contentVisibilityAuto:!0,visibilityProperty:!0,checkVisibilityCSS:!0});var o=getComputedStyle(e).visibility;if("hidden"===o||"collapse"===o)return!0;var a=Sr.call(e,"details>summary:first-of-type")?e.parentElement:e;if(Sr.call(a,"details:not([open]) *"))return!0;if(n&&"full"!==n&&"full-native"!==n&&"legacy-full"!==n){if("non-zero-area"===n)return Br(e)}else{if("function"==typeof r){for(var i=e;e;){var l=e.parentElement,c=Tr(e);if(l&&!l.shadowRoot&&!0===r(l))return Br(e);e=e.assignedSlot?e.assignedSlot:l||c===e.ownerDocument?l:c.host}e=i}if(function(e){var t,n,r,o,a=e&&Tr(e),i=null===(t=a)||void 0===t?void 0:t.host,l=!1;if(a&&a!==e)for(l=!!(null!==(n=i)&&void 0!==n&&null!==(r=n.ownerDocument)&&void 0!==r&&r.contains(i)||null!=e&&null!==(o=e.ownerDocument)&&void 0!==o&&o.contains(e));!l&&i;){var c,s,u;l=!(null===(s=i=null===(c=a=Tr(i))||void 0===c?void 0:c.host)||void 0===s||null===(u=s.ownerDocument)||void 0===u||!u.contains(i))}return l}(e))return!e.getClientRects().length;if("legacy-full"!==n)return!0}return!1},Pr=function(e,t){return!(t.disabled||function(e){return Ar(e)&&"hidden"===e.type}(t)||Lr(t,e)||function(e){return"DETAILS"===e.tagName&&Array.prototype.slice.apply(e.children).some(function(e){return"SUMMARY"===e.tagName})}(t)||function(e){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(e.tagName))for(var t=e.parentElement;t;){if("FIELDSET"===t.tagName&&t.disabled){for(var n=0;n<t.children.length;n++){var r=t.children.item(n);if("LEGEND"===r.tagName)return!!Sr.call(t,"fieldset[disabled] *")||!r.contains(e)}return!0}t=t.parentElement}return!1}(t))},Or=function(e,t){return!(Mr(t)||Rr(t)<0||!Pr(e,t))},Dr=function(e){var t=parseInt(e.getAttribute("tabindex"),10);return!!(isNaN(t)||t>=0)},Fr=function(e){var t=[],n=[];return e.forEach(function(e,r){var o=!!e.scopeParent,a=o?e.scopeParent:e,i=function(e,t){var n=Rr(e);return n<0&&t&&!Er(e)?0:n}(a,o),l=o?Fr(e.candidates):a;0===i?o?t.push.apply(t,l):t.push(a):n.push({documentOrder:r,tabIndex:i,item:e,isScope:o,content:l})}),n.sort(kr).reduce(function(e,t){return t.isScope?e.push.apply(e,t.content):e.push(t.content),e},[]).concat(t)},zr=function(e,t){var n;return n=(t=t||{}).getShadowRoot?Ir([e],t.includeContainer,{filter:Or.bind(null,t),flatten:!1,getShadowRoot:t.getShadowRoot,shadowRootFilter:Dr}):function(e,t,n){if(Nr(e))return[];var r=Array.prototype.slice.apply(e.querySelectorAll(xr));return t&&Sr.call(e,xr)&&r.unshift(e),r.filter(n)}(e,t.includeContainer,Or.bind(null,t)),Fr(n)};function $r(){const e=navigator.userAgentData;return e&&Array.isArray(e.brands)?e.brands.map(e=>{let{brand:t,version:n}=e;return t+"/"+n}).join(" "):navigator.userAgent}function Ur(){const e=/android/i;return e.test(function(){const e=navigator.userAgentData;return null!=e&&e.platform?e.platform:navigator.platform}())||e.test($r())}const Hr="data-floating-ui-focusable",jr="ArrowLeft",Wr="ArrowRight";function Vr(e){let t=e.activeElement;for(;null!=(null==(n=t)||null==(n=n.shadowRoot)?void 0:n.activeElement);){var n;t=t.shadowRoot.activeElement}return t}function Kr(e,t){if(!e||!t)return!1;const n=null==t.getRootNode?void 0:t.getRootNode();if(e.contains(t))return!0;if(n&&Fn(n)){let n=t;for(;n;){if(e===n)return!0;n=n.parentNode||n.host}}return!1}function Yr(e){return"composedPath"in e?e.composedPath()[0]:e.target}function qr(e,t){if(null==t)return!1;if("composedPath"in e)return e.composedPath().includes(t);const n=e;return null!=n.target&&t.contains(n.target)}function Xr(e){return(null==e?void 0:e.ownerDocument)||document}function Gr(e){return Dn(e)&&e.matches("input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])")}function Zr(e){return e?e.hasAttribute(Hr)?e:e.querySelector("["+Hr+"]")||e:null}function Jr(e,t,n){void 0===n&&(n=!0);return e.filter(e=>{var r;return e.parentId===t&&(!n||(null==(r=e.context)?void 0:r.open))}).flatMap(t=>[t,...Jr(e,t.id,n)])}function Qr(e){e.preventDefault(),e.stopPropagation()}function eo(e){return!$r().includes("jsdom/")&&(!Ur()&&0===e.width&&0===e.height||Ur()&&1===e.width&&1===e.height&&0===e.pressure&&0===e.detail&&"mouse"===e.pointerType||e.width<1&&e.height<1&&0===e.pressure&&0===e.detail&&"touch"===e.pointerType)}function to(e,t){const n=["mouse","pen"];return t||n.push("",void 0),n.includes(e)}var no="undefined"!=typeof document?f:function(){};function ro(e){const t=r.useRef(e);return no(()=>{t.current=e}),t}const oo={...r}.useInsertionEffect||(e=>e());function ao(e){const t=r.useRef(()=>{if("production"!==process.env.NODE_ENV)throw new Error("Cannot call an event handler while rendering.")});return oo(()=>{t.current=e}),r.useCallback(function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return null==t.current?void 0:t.current(...n)},[])}function io(e,t,n){return Math.floor(e/t)!==n}function lo(e,t){return t<0||t>=e.current.length}function co(e,t){return uo(e,{disabledIndices:t})}function so(e,t){return uo(e,{decrement:!0,startingIndex:e.current.length,disabledIndices:t})}function uo(e,t){let{startingIndex:n=-1,decrement:r=!1,disabledIndices:o,amount:a=1}=void 0===t?{}:t,i=n;do{i+=r?-a:a}while(i>=0&&i<=e.current.length-1&&fo(e,i,o));return i}function _o(e,t,n,r,o){if(-1===e)return-1;const a=n.indexOf(e),i=t[e];switch(o){case"tl":return a;case"tr":return i?a+i.width-1:a;case"bl":return i?a+(i.height-1)*r:a;case"br":return n.lastIndexOf(e)}}function po(e,t){return t.flatMap((t,n)=>e.includes(t)?[n]:[])}function fo(e,t,n){if("function"==typeof n)return n(t);if(n)return n.includes(t);const r=e.current[t];return null==r||r.hasAttribute("disabled")||"true"===r.getAttribute("aria-disabled")}const mo=()=>({getShadowRoot:!0,displayCheck:"function"==typeof ResizeObserver&&ResizeObserver.toString().includes("[native code]")?"full":"none"});function ho(e,t){const n=zr(e,mo()),r=n.length;if(0===r)return;const o=Vr(Xr(e)),a=n.indexOf(o);return n[-1===a?1===t?0:r-1:a+t]}function vo(e,t){const n=t||e.currentTarget,r=e.relatedTarget;return!r||!Kr(n,r)}function go(e){zr(e,mo()).forEach(e=>{e.dataset.tabindex=e.getAttribute("tabindex")||"",e.setAttribute("tabindex","-1")})}function yo(e){e.querySelectorAll("[data-tabindex]").forEach(e=>{const t=e.dataset.tabindex;delete e.dataset.tabindex,t?e.setAttribute("tabindex",t):e.removeAttribute("tabindex")})}function bo(e,t,n){let{reference:r,floating:o}=e;const a=_r(t),i=pr(t),l=dr(i),c=cr(t),s="y"===a,u=r.x+r.width/2-o.width/2,d=r.y+r.height/2-o.height/2,_=r[l]/2-o[l]/2;let p;switch(c){case"top":p={x:u,y:r.y-o.height};break;case"bottom":p={x:u,y:r.y+r.height};break;case"right":p={x:r.x+r.width,y:d};break;case"left":p={x:r.x-o.width,y:d};break;default:p={x:r.x,y:r.y}}const f=sr(t);return f&&(p[i]+=_*("end"===f?1:-1)*(n&&s?-1:1)),p}async function Co(e,t){var n;void 0===t&&(t={});const{x:r,y:o,platform:a,rects:i,elements:l,strategy:c}=e,{boundary:s="clippingAncestors",rootBoundary:u="viewport",elementContext:d="floating",altBoundary:_=!1,padding:p=0}=lr(t,e),f=function(e){return"number"!=typeof e?function(e){var t,n,r,o;return{top:null!=(t=e.top)?t:0,right:null!=(n=e.right)?n:0,bottom:null!=(r=e.bottom)?r:0,left:null!=(o=e.left)?o:0}}(e):{top:e,right:e,bottom:e,left:e}}(p),m=l[_?"floating"===d?"reference":"floating":d],h=Cr(await a.getClippingRect({element:null==(n=await(null==a.isElement?void 0:a.isElement(m)))||n?m:m.contextElement||await(null==a.getDocumentElement?void 0:a.getDocumentElement(l.floating)),boundary:s,rootBoundary:u,strategy:c})),v="floating"===d?{x:r,y:o,width:i.floating.width,height:i.floating.height}:i.reference,g=await(null==a.getOffsetParent?void 0:a.getOffsetParent(l.floating)),y=await(null==a.isElement?void 0:a.isElement(g))&&await(null==a.getScale?void 0:a.getScale(g))||{x:1,y:1},b=Cr(a.convertOffsetParentRelativeRectToViewportRelativeRect?await a.convertOffsetParentRelativeRectToViewportRelativeRect({elements:l,rect:v,offsetParent:g,strategy:c}):v);return{top:(h.top-b.top+f.top)/y.y,bottom:(b.bottom-h.bottom+f.bottom)/y.y,left:(h.left-b.left+f.left)/y.x,right:(b.right-h.right+f.right)/y.x}}const xo=new Set(["left","top"]);function wo(e){const t=Xn(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=Dn(e),a=o?e.offsetWidth:n,i=o?e.offsetHeight:r,l=rr(n)!==a||rr(r)!==i;return l&&(n=a,r=i),{width:n,height:r,$:l}}function So(e){return On(e)?e:e.contextElement}function To(e){const t=So(e);if(!Dn(t))return ar(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:a}=wo(t);let i=(a?rr(n.width):n.width)/r,l=(a?rr(n.height):n.height)/o;return i&&Number.isFinite(i)||(i=1),l&&Number.isFinite(l)||(l=1),{x:i,y:l}}const No=ar(0);function Io(e){const t=Bn(e);return Yn()&&t.visualViewport?{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}:No}function Eo(e,t,n,r){void 0===t&&(t=!1),void 0===n&&(n=!1);const o=e.getBoundingClientRect(),a=So(e);let i=ar(1);t&&(r?On(r)&&(i=To(r)):i=To(e));const l=function(e,t,n){return void 0===t&&(t=!1),!!n&&t&&n===Bn(e)}(a,n,r)?Io(a):ar(0);let c=(o.left+l.x)/i.x,s=(o.top+l.y)/i.y,u=o.width/i.x,d=o.height/i.y;if(a&&r){const e=Bn(a),t=On(r)?Bn(r):r;let n=e,o=er(n);for(;o&&t!==n;){const e=To(o),t=o.getBoundingClientRect(),r=Xn(o),a=t.left+(o.clientLeft+parseFloat(r.paddingLeft))*e.x,i=t.top+(o.clientTop+parseFloat(r.paddingTop))*e.y;c*=e.x,s*=e.y,u*=e.x,d*=e.y,c+=a,s+=i,n=Bn(o),o=er(n)}}return Cr({width:u,height:d,x:c,y:s})}function Ro(e,t){const n=Gn(e).scrollLeft;return t?t.left+n:Eo(Ln(e)).left+n}function ko(e,t){const n=e.getBoundingClientRect();return{x:n.left+t.scrollLeft-Ro(e,n),y:n.top+t.scrollTop}}function Ao(e,t,n){let r;if("viewport"===t||"layoutViewport"===t)r=function(e,t,n){void 0===n&&(n="viewport");const r="layoutViewport"===n,o=Bn(e),a=Ln(e),i=o.visualViewport;let l=a.clientWidth,c=a.clientHeight,s=0,u=0;if(i){const e=!Yn()||"fixed"===t;r?e||(s=-i.offsetLeft,u=-i.offsetTop):(l=i.width,c=i.height,e&&(s=i.offsetLeft,u=i.offsetTop))}if(Ro(a)<=0){const e=a.ownerDocument,t=e.body,n=getComputedStyle(t),r="CSS1Compat"===e.compatMode&&parseFloat(n.marginLeft)+parseFloat(n.marginRight)||0,o=Math.abs(a.clientWidth-t.clientWidth-r),i="stable both-edges"===getComputedStyle(a).scrollbarGutter?o/2:o;i<=25&&(l-=i)}return{width:l,height:c,x:s,y:u}}(e,n,t);else if("document"===t)r=function(e){const t=Gn(e),n=e.ownerDocument.body,r=nr(e.scrollWidth,e.clientWidth,n.scrollWidth,n.clientWidth),o=nr(e.scrollHeight,e.clientHeight,n.scrollHeight,n.clientHeight);let a=-t.scrollLeft+Ro(e);const i=-t.scrollTop;return"rtl"===Xn(n).direction&&(a+=nr(e.clientWidth,n.clientWidth)-r),{width:r,height:o,x:a,y:i}}(Ln(e));else if(On(t))r=function(e,t){const n=Eo(e,!0,"fixed"===t),r=n.top+e.clientTop,o=n.left+e.clientLeft,a=To(e);return{width:e.clientWidth*a.x,height:e.clientHeight*a.y,x:o*a.x,y:r*a.y}}(t,n);else{const n=Io(e);r={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return Cr(r)}function Mo(e,t,n){const r=Dn(t),o=Ln(t),a="fixed"===n,i=Eo(e,!0,a,t);let l={scrollLeft:0,scrollTop:0};const c=ar(0);if((r||!a)&&(("body"!==Mn(t)||zn(o))&&(l=Gn(t)),r)){const e=Eo(t,!0,a,t);c.x=e.x+t.clientLeft,c.y=e.y+t.clientTop}!r&&o&&(c.x=Ro(o));const s=!o||r||a?ar(0):ko(o,l);return{x:i.left+l.scrollLeft-c.x-s.x,y:i.top+l.scrollTop-c.y-s.y,width:i.width,height:i.height}}function Bo(e){return"static"===Xn(e).position}function Lo(e,t){if(!Dn(e)||"fixed"===Xn(e).position)return null;if(t)return t(e);let n=e.offsetParent;return Ln(e)===n&&(n=n.ownerDocument.body),n}function Po(e,t){const n=Bn(e);if(Un(e))return n;if(!Dn(e)){let t=Zn(e);for(;t&&!qn(t);){if(On(t)&&!Bo(t))return t;t=Zn(t)}return n}let r=Lo(e,t);for(;r&&$n(r)&&Bo(r);)r=Lo(r,t);return r&&qn(r)&&Bo(r)&&!Kn(r)?n:r||function(e){let t=Zn(e);for(;Dn(t)&&!qn(t);){if(Kn(t))return t;if(Un(t))return null;t=Zn(t)}return null}(e)||n}const Oo={convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const a="fixed"===o,i=Ln(r),l=!!t&&Un(t.floating);if(r===i||l&&a)return n;let c={scrollLeft:0,scrollTop:0},s=ar(1);const u=ar(0),d=Dn(r);if((d||!a)&&(("body"!==Mn(r)||zn(i))&&(c=Gn(r)),d)){const e=Eo(r);s=To(r),u.x=e.x+r.clientLeft,u.y=e.y+r.clientTop}const _=!i||d||a?ar(0):ko(i,c);return{width:n.width*s.x,height:n.height*s.y,x:n.x*s.x-c.scrollLeft*s.x+u.x+_.x,y:n.y*s.y-c.scrollTop*s.y+u.y+_.y}},getDocumentElement:Ln,getClippingRect:function(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const a=[..."clippingAncestors"===n?Un(t)?[]:function(e,t){const n=t.get(e);if(n)return n;let r=Qn(e,[],!1).filter(e=>On(e)&&"body"!==Mn(e)),o=null;const a="fixed"===Xn(e).position;let i=a?Zn(e):e;for(;On(i)&&!qn(i);){const e=Xn(i),t=Kn(i),n=o?o.position:a?"fixed":"";t||"fixed"!==n&&("absolute"!==n||"static"!==e.position)?o=e:r=r.filter(e=>e!==i),i=Zn(i)}return t.set(e,r),r}(t,this._c):[].concat(n),r],i=Ao(t,a[0],o);let l=i.top,c=i.right,s=i.bottom,u=i.left;for(let e=1;e<a.length;e++){const n=Ao(t,a[e],o);l=nr(n.top,l),c=tr(n.right,c),s=tr(n.bottom,s),u=nr(n.left,u)}return{width:c-u,height:s-l,x:u,y:l}},getOffsetParent:Po,getElementRects:async function(e){const t=this.getOffsetParent||Po,n=this.getDimensions,r=await n(e.floating);return{reference:Mo(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}},getClientRects:function(e){return e.getClientRects?Array.from(e.getClientRects()):[]},getDimensions:function(e){const{width:t,height:n}=wo(e);return{width:t,height:n}},getScale:To,isElement:On,isRTL:function(e){return"rtl"===Xn(e).direction}};function Do(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function Fo(e,t,n,r){void 0===r&&(r={});const{ancestorScroll:o=!0,ancestorResize:a=!0,elementResize:i="function"==typeof ResizeObserver,layoutShift:l="function"==typeof IntersectionObserver,animationFrame:c=!1}=r,s=So(e),u=o||a?[...s?Qn(s):[],...t?Qn(t):[]]:[];u.forEach(e=>{o&&e.addEventListener("scroll",n),a&&e.addEventListener("resize",n)});const d=s&&l?function(e,t,n){let r,o=null;const a=Ln(e);function i(){var e;clearTimeout(r),null==(e=o)||e.disconnect(),o=null}function l(n,c){void 0===n&&(n=!1),void 0===c&&(c=1),i();const s=e.getBoundingClientRect(),{left:u,top:d,width:_,height:p}=s;if(n||t(),!_||!p)return;const f={rootMargin:-or(d)+"px "+-or(a.clientWidth-(u+_))+"px "+-or(a.clientHeight-(d+p))+"px "+-or(u)+"px",threshold:nr(0,tr(1,c))||1};let m=!0;function h(t){const n=t[0].intersectionRatio;if(!Do(s,e.getBoundingClientRect()))return l();if(n!==c){if(!m)return l();n?l(!1,n):r=setTimeout(()=>{l(!1,1e-7)},1e3)}m=!1}try{o=new IntersectionObserver(h,{...f,root:a.ownerDocument})}catch(e){o=new IntersectionObserver(h,f)}o.observe(e)}const c=Bn(e),s=()=>l(n);return c.addEventListener("resize",s),l(!0),()=>{c.removeEventListener("resize",s),i()}}(s,n,a):null;let _,p=-1,f=null;i&&(f=new ResizeObserver(e=>{let[r]=e;r&&r.target===s&&f&&t&&(f.unobserve(t),cancelAnimationFrame(p),p=requestAnimationFrame(()=>{var e;null==(e=f)||e.observe(t)})),n()}),s&&!c&&f.observe(s),t&&f.observe(t));let m=c?Eo(e):null;return c&&function t(){const r=Eo(e);m&&!Do(m,r)&&n();m=r,_=requestAnimationFrame(t)}(),n(),()=>{var e;u.forEach(e=>{o&&e.removeEventListener("scroll",n),a&&e.removeEventListener("resize",n)}),null==d||d(),null==(e=f)||e.disconnect(),f=null,c&&cancelAnimationFrame(_)}}const zo=function(e){return void 0===e&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:o,y:a,placement:i,middlewareData:l}=t,c=await async function(e,t){const{placement:n,platform:r,elements:o}=e,a=await(null==r.isRTL?void 0:r.isRTL(o.floating)),i=cr(n),l=sr(n),c="y"===_r(n),s=xo.has(i)?-1:1,u=a&&c?-1:1,d=lr(t,e);let{mainAxis:_,crossAxis:p,alignmentAxis:f}="number"==typeof d?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return l&&"number"==typeof f&&(p="end"===l?-1*f:f),c?{x:p*u,y:_*s}:{x:_*s,y:p*u}}(t,e);return i===(null==(n=l.offset)?void 0:n.placement)&&null!=(r=l.arrow)&&r.alignmentOffset?{}:{x:o+c.x,y:a+c.y,data:{...c,placement:i}}}}},$o=function(e){return void 0===e&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:o,platform:a}=t,{mainAxis:i=!0,crossAxis:l=!1,limiter:c={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...s}=lr(e,t),u={x:n,y:r},d=await a.detectOverflow(t,s),_=_r(o),p=ur(_);let f=u[p],m=u[_];const h=(e,t)=>{return n=t+d["y"===e?"top":"left"],r=t,o=t-d["y"===e?"bottom":"right"],nr(n,tr(r,o));var n,r,o};i&&(f=h(p,f)),l&&(m=h(_,m));const v=c.fn({...t,[p]:f,[_]:m});return{...v,data:{x:v.x-n,y:v.y-r,enabled:{[p]:i,[_]:l}}}}}},Uo=function(e){return void 0===e&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:o,middlewareData:a,rects:i,initialPlacement:l,platform:c,elements:s}=t,{mainAxis:u=!0,crossAxis:d=!0,fallbackPlacements:_,fallbackStrategy:p="bestFit",fallbackAxisSideDirection:f="none",flipAlignment:m=!0,...h}=lr(e,t);if(null!=(n=a.arrow)&&n.alignmentOffset)return{};const v=cr(o),g=_r(l),y=cr(l)===l,b=await(null==c.isRTL?void 0:c.isRTL(s.floating)),C=_||(y||!m?[br(l)]:function(e){const t=br(e);return[fr(e),t,fr(t)]}(l)),x="none"!==f;!_&&x&&C.push(...yr(l,m,f,b));const w=[l,...C],S=await c.detectOverflow(t,h),T=[];let N=(null==(r=a.flip)?void 0:r.overflows)||[];if(u&&T.push(S[v]),d){const e=function(e,t,n){void 0===n&&(n=!1);const r=sr(e),o=pr(e),a=dr(o);let i="x"===o?r===(n?"end":"start")?"right":"left":"start"===r?"bottom":"top";return t.reference[a]>t.floating[a]&&(i=br(i)),[i,br(i)]}(o,i,b);T.push(S[e[0]],S[e[1]])}if(N=[...N,{placement:o,overflows:T}],!T.every(e=>e<=0)){var I,E;const e=((null==(I=a.flip)?void 0:I.index)||0)+1,t=w[e];if(t){if(!("alignment"===d&&g!==_r(t))||N.every(e=>_r(e.placement)!==g||e.overflows[0]>0))return{data:{index:e,overflows:N},reset:{placement:t}}}let n=null==(E=N.filter(e=>e.overflows[0]<=0).sort((e,t)=>e.overflows[1]-t.overflows[1])[0])?void 0:E.placement;if(!n)switch(p){case"bestFit":{var R;const e=null==(R=N.filter(e=>{if(x){const t=_r(e.placement);return t===g||"y"===t}return!0}).map(e=>[e.placement,e.overflows.filter(e=>e>0).reduce((e,t)=>e+t,0)]).sort((e,t)=>e[1]-t[1])[0])?void 0:R[0];e&&(n=e);break}case"initialPlacement":n=l}if(o!==n)return{reset:{placement:n}}}return{}}}},Ho=function(e){return void 0===e&&(e={}),{name:"size",options:e,async fn(t){const{placement:n,rects:r,platform:o,elements:a}=t,{apply:i=()=>{},...l}=lr(e,t),c=await o.detectOverflow(t,l),s=cr(n),u=sr(n),d="y"===_r(n),{width:_,height:p}=r.floating;let f,m;"top"===s||"bottom"===s?(f=s,m=u===(await(null==o.isRTL?void 0:o.isRTL(a.floating))?"start":"end")?"left":"right"):(m=s,f="end"===u?"top":"bottom");const h=p-c.top-c.bottom,v=_-c.left-c.right,g=tr(p-c[f],h),y=tr(_-c[m],v),b=t.middlewareData.shift,C=!b;let x=g,w=y;null!=b&&b.enabled.x&&(w=v),null!=b&&b.enabled.y&&(x=h),C&&!u&&(d?w=_-2*nr(c.left,c.right):x=p-2*nr(c.top,c.bottom)),await i({...t,availableWidth:w,availableHeight:x});const S=await o.getDimensions(a.floating);return _!==S.width||p!==S.height?{reset:{rects:!0}}:{}}}},jo=(e,t,n)=>{const r=new Map,o=null!=n?n:{},a={...Oo,...o.platform,_c:r};return(async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:a=[],platform:i}=n,l=i.detectOverflow?i:{...i,detectOverflow:Co},c=await(null==i.isRTL?void 0:i.isRTL(t));let s=await i.getElementRects({reference:e,floating:t,strategy:o}),{x:u,y:d}=bo(s,r,c),_=r,p=0;const f={};for(let n=0;n<a.length;n++){const m=a[n];if(!m)continue;const{name:h,fn:v}=m,{x:g,y:y,data:b,reset:C}=await v({x:u,y:d,initialPlacement:r,placement:_,strategy:o,middlewareData:f,rects:s,platform:l,elements:{reference:e,floating:t}});u=null!=g?g:u,d=null!=y?y:d,f[h]={...f[h],...b},C&&p<50&&(p++,"object"==typeof C&&(C.placement&&(_=C.placement),C.rects&&(s=!0===C.rects?await i.getElementRects({reference:e,floating:t,strategy:o}):C.rects),({x:u,y:d}=bo(s,_,c))),n=-1)}return{x:u,y:d,placement:_,strategy:o,middlewareData:f}})(e,t,{...o,platform:a})};var Wo="undefined"!=typeof document?f:function(){};function Vo(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if("function"==typeof e&&e.toString()===t.toString())return!0;let n,r,o;if(e&&t&&"object"==typeof e){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;0!==r--;)if(!Vo(e[r],t[r]))return!1;return!0}if(o=Object.keys(e),n=o.length,n!==Object.keys(t).length)return!1;for(r=n;0!==r--;)if(!{}.hasOwnProperty.call(t,o[r]))return!1;for(r=n;0!==r--;){const n=o[r];if(("_owner"!==n||!e.$$typeof)&&!Vo(e[n],t[n]))return!1}return!0}return e!=e&&t!=t}function Ko(e){if("undefined"==typeof window)return 1;return(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Yo(e,t){const n=Ko(e);return Math.round(t*n)/n}function qo(e){const t=r.useRef(e);return Wo(()=>{t.current=e}),t}const Xo=(e,t)=>{const n=zo(e);return{name:n.name,fn:n.fn,options:[e,t]}},Go=(e,t)=>{const n=$o(e);return{name:n.name,fn:n.fn,options:[e,t]}},Zo=(e,t)=>{const n=Uo(e);return{name:n.name,fn:n.fn,options:[e,t]}},Jo=(e,t)=>{const n=Ho(e);return{name:n.name,fn:n.fn,options:[e,t]}};function Qo(e,t){const n=e.compareDocumentPosition(t);return n&Node.DOCUMENT_POSITION_FOLLOWING||n&Node.DOCUMENT_POSITION_CONTAINED_BY?-1:n&Node.DOCUMENT_POSITION_PRECEDING||n&Node.DOCUMENT_POSITION_CONTAINS?1:0}const ea=r.createContext({register:()=>{},unregister:()=>{},map:new Map,elementsRef:{current:[]}});function ta(t){const{children:n,elementsRef:o,labelsRef:a}=t,[i,l]=r.useState(()=>new Set),c=r.useCallback(e=>{l(t=>new Set(t).add(e))},[]),s=r.useCallback(e=>{l(t=>{const n=new Set(t);return n.delete(e),n})},[]),u=r.useMemo(()=>{const e=new Map;return Array.from(i.keys()).sort(Qo).forEach((t,n)=>{e.set(t,n)}),e},[i]);return e(ea.Provider,{value:r.useMemo(()=>({register:c,unregister:s,map:u,elementsRef:o,labelsRef:a}),[c,s,u,o,a]),children:n})}const na="data-floating-ui-focusable",ra="active",oa="selected",aa="ArrowLeft",ia="ArrowRight",la="ArrowUp",ca="ArrowDown",sa={...r};let ua=!1,da=0;const _a=()=>"floating-ui-"+Math.random().toString(36).slice(2,6)+da++;const pa=sa.useId||function(){const[e,t]=r.useState(()=>ua?_a():void 0);return no(()=>{null==e&&t(_a())},[]),r.useEffect(()=>{ua=!0},[]),e};let fa;function ma(){for(var e,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];const o="Floating UI: "+n.join(" ");var a;null!=(e=fa)&&e.has(o)||(null==(a=fa)||a.add(o),console.warn(o))}function ha(){const e=new Map;return{emit(t,n){var r;null==(r=e.get(t))||r.forEach(e=>e(n))},on(t,n){e.has(t)||e.set(t,new Set),e.get(t).add(n)},off(t,n){var r;null==(r=e.get(t))||r.delete(n)}}}"production"!==process.env.NODE_ENV&&(fa=new Set);const va=r.createContext(null),ga=r.createContext(null),ya=()=>{var e;return(null==(e=r.useContext(va))?void 0:e.id)||null},ba=()=>r.useContext(ga);function Ca(e){const t=pa(),n=ba(),r=ya();return no(()=>{if(!t)return;const e={id:t,parentId:r};return null==n||n.addNode(e),()=>{null==n||n.removeNode(e)}},[n,t,r]),t}function xa(t){const{children:n,id:o}=t,a=ya();return e(va.Provider,{value:r.useMemo(()=>({id:o,parentId:a}),[o,a]),children:n})}function wa(t){const{children:n}=t,o=r.useRef([]),a=r.useCallback(e=>{o.current=[...o.current,e]},[]),i=r.useCallback(e=>{o.current=o.current.filter(t=>t!==e)},[]),[l]=r.useState(()=>ha());return e(ga.Provider,{value:r.useMemo(()=>({nodesRef:o,addNode:a,removeNode:i,events:l}),[a,i,l]),children:n})}function Sa(e){return"data-floating-ui-"+e}function Ta(e){-1!==e.current&&(clearTimeout(e.current),e.current=-1)}const Na=Sa("safe-polygon");function Ia(e,t,n){if(n&&!to(n))return 0;if("number"==typeof e)return e;if("function"==typeof e){const n=e();return"number"==typeof n?n:null==n?void 0:n[t]}return null==e?void 0:e[t]}function Ea(e){return"function"==typeof e?e():e}let Ra=0;const ka={border:0,clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"fixed",whiteSpace:"nowrap",width:"1px",top:0,left:0},Aa=r.forwardRef(function(t,n){const[o,a]=r.useState();no(()=>{/apple/i.test(navigator.vendor)&&a("button")},[]);const i={ref:n,tabIndex:0,role:o,"aria-hidden":!o||void 0,[Sa("focus-guard")]:"",style:ka};return e("span",{...t,...i})}),Ma={clipPath:"inset(50%)",position:"fixed",top:0,left:0},Ba=r.createContext(null),La=Sa("portal");function Pa(n){const{children:o,id:a,root:i,preserveTabOrder:l=!0}=n,c=function(e){void 0===e&&(e={});const{id:t,root:n}=e,o=pa(),a=Oa(),[i,l]=r.useState(null),c=r.useRef(null);return no(()=>()=>{null==i||i.remove(),queueMicrotask(()=>{c.current=null})},[i]),no(()=>{if(!o)return;if(c.current)return;const e=t?document.getElementById(t):null;if(!e)return;const n=document.createElement("div");n.id=o,n.setAttribute(La,""),e.appendChild(n),c.current=n,l(n)},[t,o]),no(()=>{if(null===n)return;if(!o)return;if(c.current)return;let e=n||(null==a?void 0:a.portalNode);e&&!Pn(e)&&(e=e.current),e=e||document.body;let r=null;t&&(r=document.createElement("div"),r.id=t,e.appendChild(r));const i=document.createElement("div");i.id=o,i.setAttribute(La,""),e=r||e,e.appendChild(i),c.current=i,l(i)},[t,n,o,a]),i}({id:a,root:i}),[s,u]=r.useState(null),d=r.useRef(null),_=r.useRef(null),p=r.useRef(null),f=r.useRef(null),m=null==s?void 0:s.modal,h=null==s?void 0:s.open,v=!!s&&!s.modal&&s.open&&l&&!(!i&&!c);return r.useEffect(()=>{if(c&&l&&!m)return c.addEventListener("focusin",e,!0),c.addEventListener("focusout",e,!0),()=>{c.removeEventListener("focusin",e,!0),c.removeEventListener("focusout",e,!0)};function e(e){if(c&&vo(e)){("focusin"===e.type?yo:go)(c)}}},[c,l,m]),r.useEffect(()=>{c&&(h||yo(c))},[h,c]),t(Ba.Provider,{value:r.useMemo(()=>({preserveTabOrder:l,beforeOutsideRef:d,afterOutsideRef:_,beforeInsideRef:p,afterInsideRef:f,portalNode:c,setFocusManagerState:u}),[l,c]),children:[v&&c&&e(Aa,{"data-type":"outside",ref:d,onFocus:e=>{if(vo(e,c)){var t;null==(t=p.current)||t.focus()}else{const e=s?s.domReference:null,t=ho(Xr(n=e).body,-1)||n;null==t||t.focus()}var n}}),v&&c&&e("span",{"aria-owns":c.id,style:Ma}),c&&g.createPortal(o,c),v&&c&&e(Aa,{"data-type":"outside",ref:_,onFocus:e=>{if(vo(e,c)){var t;null==(t=f.current)||t.focus()}else{const t=s?s.domReference:null,r=ho(Xr(n=t).body,1)||n;null==r||r.focus(),(null==s?void 0:s.closeOnFocusOut)&&(null==s||s.onOpenChange(!1,e.nativeEvent,"focus-out"))}var n}})]})}const Oa=()=>r.useContext(Ba);function Da(e){return Dn(e.target)&&"BUTTON"===e.target.tagName}function Fa(e){return Gr(e)}function za(e,t){void 0===t&&(t={});const{open:n,onOpenChange:o,dataRef:a,elements:{domReference:i}}=e,{enabled:l=!0,event:c="click",toggle:s=!0,ignoreMouse:u=!1,keyboardHandlers:d=!0,stickIfOpen:_=!0}=t,p=r.useRef(),f=r.useRef(!1),m=r.useMemo(()=>({onPointerDown(e){p.current=e.pointerType},onMouseDown(e){const t=p.current;0===e.button&&"click"!==c&&(to(t,!0)&&u||(!n||!s||a.current.openEvent&&_&&"mousedown"!==a.current.openEvent.type?(e.preventDefault(),o(!0,e.nativeEvent,"click")):o(!1,e.nativeEvent,"click")))},onClick(e){const t=p.current;"mousedown"===c&&p.current?p.current=void 0:to(t,!0)&&u||(!n||!s||a.current.openEvent&&_&&"click"!==a.current.openEvent.type?o(!0,e.nativeEvent,"click"):o(!1,e.nativeEvent,"click"))},onKeyDown(e){p.current=void 0,e.defaultPrevented||!d||Da(e)||(" "!==e.key||Fa(i)||(e.preventDefault(),f.current=!0),function(e){return Dn(e.target)&&"A"===e.target.tagName}(e)||"Enter"===e.key&&o(!n||!s,e.nativeEvent,"click"))},onKeyUp(e){e.defaultPrevented||!d||Da(e)||Fa(i)||" "===e.key&&f.current&&(f.current=!1,o(!n||!s,e.nativeEvent,"click"))}}),[a,i,c,u,d,o,n,_,s]);return r.useMemo(()=>l?{reference:m}:{},[l,m])}const $a={pointerdown:"onPointerDown",mousedown:"onMouseDown",click:"onClick"},Ua={pointerdown:"onPointerDownCapture",mousedown:"onMouseDownCapture",click:"onClickCapture"},Ha=e=>{var t,n;return{escapeKey:"boolean"==typeof e?e:null!=(t=null==e?void 0:e.escapeKey)&&t,outsidePress:"boolean"==typeof e?e:null==(n=null==e?void 0:e.outsidePress)||n}};function ja(e,t){void 0===t&&(t={});const{open:n,onOpenChange:o,elements:a,dataRef:i}=e,{enabled:l=!0,escapeKey:c=!0,outsidePress:s=!0,outsidePressEvent:u="pointerdown",referencePress:d=!1,referencePressEvent:_="pointerdown",ancestorScroll:p=!1,bubbles:f,capture:m}=t,h=ba(),v=ao("function"==typeof s?s:()=>!1),g="function"==typeof s?v:s,y=r.useRef(!1),{escapeKey:b,outsidePress:C}=Ha(f),{escapeKey:x,outsidePress:w}=Ha(m),S=r.useRef(!1),T=ao(e=>{var t;if(!n||!l||!c||"Escape"!==e.key)return;if(S.current)return;const r=null==(t=i.current.floatingContext)?void 0:t.nodeId,a=h?Jr(h.nodesRef.current,r):[];if(!b&&(e.stopPropagation(),a.length>0)){let e=!0;if(a.forEach(t=>{var n;null==(n=t.context)||!n.open||t.context.dataRef.current.__escapeKeyBubbles||(e=!1)}),!e)return}o(!1,function(e){return"nativeEvent"in e}(e)?e.nativeEvent:e,"escape-key")}),N=ao(e=>{var t;const n=()=>{var t;T(e),null==(t=Yr(e))||t.removeEventListener("keydown",n)};null==(t=Yr(e))||t.addEventListener("keydown",n)}),I=ao(e=>{var t;const n=i.current.insideReactTree;i.current.insideReactTree=!1;const r=y.current;if(y.current=!1,"click"===u&&r)return;if(n)return;if("function"==typeof g&&!g(e))return;const l=Yr(e),c="["+Sa("inert")+"]",s=Xr(a.floating).querySelectorAll(c);let d=On(l)?l:null;for(;d&&!qn(d);){const e=Zn(d);if(qn(e)||!On(e))break;d=e}if(s.length&&On(l)&&!l.matches("html,body")&&!Kr(l,a.floating)&&Array.from(s).every(e=>!Kr(d,e)))return;if(Dn(l)&&k){const t=qn(l),n=Xn(l),r=/auto|scroll/,o=t||r.test(n.overflowX),a=t||r.test(n.overflowY),i=o&&l.clientWidth>0&&l.scrollWidth>l.clientWidth,c=a&&l.clientHeight>0&&l.scrollHeight>l.clientHeight,s="rtl"===n.direction,u=c&&(s?e.offsetX<=l.offsetWidth-l.clientWidth:e.offsetX>l.clientWidth),d=i&&e.offsetY>l.clientHeight;if(u||d)return}const _=null==(t=i.current.floatingContext)?void 0:t.nodeId,p=h&&Jr(h.nodesRef.current,_).some(t=>{var n;return qr(e,null==(n=t.context)?void 0:n.elements.floating)});if(qr(e,a.floating)||qr(e,a.domReference)||p)return;const f=h?Jr(h.nodesRef.current,_):[];if(f.length>0){let e=!0;if(f.forEach(t=>{var n;null==(n=t.context)||!n.open||t.context.dataRef.current.__outsidePressBubbles||(e=!1)}),!e)return}o(!1,e,"outside-press")}),E=ao(e=>{var t;const n=()=>{var t;I(e),null==(t=Yr(e))||t.removeEventListener(u,n)};null==(t=Yr(e))||t.addEventListener(u,n)});r.useEffect(()=>{if(!n||!l)return;i.current.__escapeKeyBubbles=b,i.current.__outsidePressBubbles=C;let e=-1;function t(e){o(!1,e,"ancestor-scroll")}function r(){window.clearTimeout(e),S.current=!0}function s(){e=window.setTimeout(()=>{S.current=!1},Yn()?5:0)}const d=Xr(a.floating);c&&(d.addEventListener("keydown",x?N:T,x),d.addEventListener("compositionstart",r),d.addEventListener("compositionend",s)),g&&d.addEventListener(u,w?E:I,w);let _=[];return p&&(On(a.domReference)&&(_=Qn(a.domReference)),On(a.floating)&&(_=_.concat(Qn(a.floating))),!On(a.reference)&&a.reference&&a.reference.contextElement&&(_=_.concat(Qn(a.reference.contextElement)))),_=_.filter(e=>{var t;return e!==(null==(t=d.defaultView)?void 0:t.visualViewport)}),_.forEach(e=>{e.addEventListener("scroll",t)}),()=>{c&&(d.removeEventListener("keydown",x?N:T,x),d.removeEventListener("compositionstart",r),d.removeEventListener("compositionend",s)),g&&d.removeEventListener(u,w?E:I,w),_.forEach(e=>{e.removeEventListener("scroll",t)}),window.clearTimeout(e)}},[i,a,c,g,u,n,o,p,l,b,C,T,x,N,I,w,E]),r.useEffect(()=>{i.current.insideReactTree=!1},[i,g,u]);const R=r.useMemo(()=>({onKeyDown:T,...d&&{[$a[_]]:e=>{o(!1,e.nativeEvent,"reference-press")},..."click"!==_&&{onClick(e){o(!1,e.nativeEvent,"reference-press")}}}}),[T,o,d,_]),k=r.useMemo(()=>{function e(e){0===e.button&&(y.current=!0)}return{onKeyDown:T,onMouseDown:e,onMouseUp:e,[Ua[u]]:()=>{i.current.insideReactTree=!0}}},[T,u,i]);return r.useMemo(()=>l?{reference:R,floating:k}:{},[l,R,k])}function Wa(e){const{open:t=!1,onOpenChange:n,elements:o}=e,a=pa(),i=r.useRef({}),[l]=r.useState(()=>ha()),c=null!=ya();if("production"!==process.env.NODE_ENV){const e=o.reference;e&&!On(e)&&function(){for(var e,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];const o="Floating UI: "+n.join(" ");var a;null!=(e=fa)&&e.has(o)||(null==(a=fa)||a.add(o),console.error(o))}("Cannot pass a virtual element to the `elements.reference` option,","as it must be a real DOM element. Use `refs.setPositionReference()`","instead.")}const[s,u]=r.useState(o.reference),d=ao((e,t,r)=>{i.current.openEvent=e?t:void 0,l.emit("openchange",{open:e,event:t,reason:r,nested:c}),null==n||n(e,t,r)}),_=r.useMemo(()=>({setPositionReference:u}),[]),p=r.useMemo(()=>({reference:s||o.reference||null,floating:o.floating||null,domReference:o.reference}),[s,o.reference,o.floating]);return r.useMemo(()=>({dataRef:i,open:t,onOpenChange:d,elements:p,events:l,floatingId:a,refs:_}),[t,d,p,l,a,_])}function Va(e){var t,n;let{elements:o,...a}=void 0===e?{}:e;const{nodeId:i}=a,l=Wa({...a,elements:{reference:null!=(t=null==o?void 0:o.reference)?t:null,floating:null!=(n=null==o?void 0:o.floating)?n:null}}),c=a.rootContext||l,s=c.elements,[u,d]=r.useState(null),[_,p]=r.useState(null),f=(null==s?void 0:s.domReference)||u,m=r.useRef(null),h=ba();no(()=>{f&&(m.current=f)},[f]);const v=function(e){void 0===e&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:o=[],platform:a,elements:{reference:i,floating:l}={},transform:c=!0,whileElementsMounted:s,open:u}=e,[d,_]=r.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[p,f]=r.useState(o);Vo(p,o)||f(o);const[m,h]=r.useState(null),[v,y]=r.useState(null),b=r.useCallback(e=>{e!==S.current&&(S.current=e,h(e))},[]),C=r.useCallback(e=>{e!==T.current&&(T.current=e,y(e))},[]),x=i||m,w=l||v,S=r.useRef(null),T=r.useRef(null),N=r.useRef(d),I=null!=s,E=qo(s),R=qo(a),k=qo(u),A=r.useCallback(()=>{if(!S.current||!T.current)return;const e={placement:t,strategy:n,middleware:p};R.current&&(e.platform=R.current),jo(S.current,T.current,e).then(e=>{const t={...e,isPositioned:!1!==k.current};M.current&&!Vo(N.current,t)&&(N.current=t,g.flushSync(()=>{_(t)}))})},[p,t,n,R,k]);Wo(()=>{!1===u&&N.current.isPositioned&&(N.current.isPositioned=!1,_(e=>({...e,isPositioned:!1})))},[u]);const M=r.useRef(!1);Wo(()=>(M.current=!0,()=>{M.current=!1}),[]),Wo(()=>{if(x&&(S.current=x),w&&(T.current=w),x&&w){if(E.current)return E.current(x,w,A);A()}},[x,w,A,E,I]);const B=r.useMemo(()=>({reference:S,floating:T,setReference:b,setFloating:C}),[b,C]),L=r.useMemo(()=>({reference:x,floating:w}),[x,w]),P=r.useMemo(()=>{const e={position:n,left:0,top:0};if(!L.floating)return e;const t=Yo(L.floating,d.x),r=Yo(L.floating,d.y);return c?{...e,transform:"translate("+t+"px, "+r+"px)",...Ko(L.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:t,top:r}},[n,c,L.floating,d.x,d.y]);return r.useMemo(()=>({...d,update:A,refs:B,elements:L,floatingStyles:P}),[d,A,B,L,P])}({...a,elements:{...s,..._&&{reference:_}}}),y=r.useCallback(e=>{const t=On(e)?{getBoundingClientRect:()=>e.getBoundingClientRect(),getClientRects:()=>e.getClientRects(),contextElement:e}:e;p(t),v.refs.setReference(t)},[v.refs]),b=r.useCallback(e=>{(On(e)||null===e)&&(m.current=e,d(e)),(On(v.refs.reference.current)||null===v.refs.reference.current||null!==e&&!On(e))&&v.refs.setReference(e)},[v.refs]),C=r.useMemo(()=>({...v.refs,setReference:b,setPositionReference:y,domReference:m}),[v.refs,b,y]),x=r.useMemo(()=>({...v.elements,domReference:f}),[v.elements,f]),w=r.useMemo(()=>({...v,...c,refs:C,elements:x,nodeId:i}),[v,C,x,i,c]);return no(()=>{c.dataRef.current.floatingContext=w;const e=null==h?void 0:h.nodesRef.current.find(e=>e.id===i);e&&(e.context=w)}),r.useMemo(()=>({...v,context:w,refs:C,elements:x}),[v,C,x,w])}function Ka(e,t,n){const r=new Map,o="item"===n;let a=e;if(o&&e){const{[ra]:t,[oa]:n,...r}=e;a=r}return{..."floating"===n&&{tabIndex:-1,[na]:""},...a,...t.map(t=>{const r=t?t[n]:null;return"function"==typeof r?e?r(e):null:r}).concat(e).reduce((e,t)=>t?(Object.entries(t).forEach(t=>{let[n,a]=t;var i;o&&[ra,oa].includes(n)||(0===n.indexOf("on")?(r.has(n)||r.set(n,[]),"function"==typeof a&&(null==(i=r.get(n))||i.push(a),e[n]=function(){for(var e,t=arguments.length,o=new Array(t),a=0;a<t;a++)o[a]=arguments[a];return null==(e=r.get(n))?void 0:e.map(e=>e(...o)).find(e=>void 0!==e)})):e[n]=a)}),e):e,{})}}function Ya(e){void 0===e&&(e=[]);const t=e.map(e=>null==e?void 0:e.reference),n=e.map(e=>null==e?void 0:e.floating),o=e.map(e=>null==e?void 0:e.item),a=r.useCallback(t=>Ka(t,e,"reference"),t),i=r.useCallback(t=>Ka(t,e,"floating"),n),l=r.useCallback(t=>Ka(t,e,"item"),o);return r.useMemo(()=>({getReferenceProps:a,getFloatingProps:i,getItemProps:l}),[a,i,l])}function qa(e,t,n){switch(e){case"vertical":return t;case"horizontal":return n;default:return t||n}}function Xa(e,t){return qa(t,e===la||e===ca,e===aa||e===ia)}function Ga(e,t,n){return qa(t,e===ca,n?e===aa:e===ia)||"Enter"===e||" "===e||""===e}function Za(e,t,n){return qa(t,n?e===aa:e===ia,e===ca)}function Ja(e,t,n,r){return"both"===t||"horizontal"===t&&r&&r>1?"Escape"===e:qa(t,n?e===ia:e===aa,e===la)}function Qa(e,t){const{open:n,onOpenChange:o,elements:a,floatingId:i}=e,{listRef:l,activeIndex:c,onNavigate:s=()=>{},enabled:u=!0,selectedIndex:d=null,allowEscape:_=!1,loop:p=!1,nested:f=!1,rtl:m=!1,virtual:h=!1,focusItemOnOpen:v="auto",focusItemOnHover:g=!0,openOnArrowKeyDown:y=!0,disabledIndices:b,orientation:C="vertical",parentOrientation:x,cols:w=1,scrollItemIntoView:S=!0,virtualItemRef:T,itemSizes:N,dense:I=!1}=t;"production"!==process.env.NODE_ENV&&(_&&(p||ma("`useListNavigation` looping must be enabled to allow escaping."),h||ma("`useListNavigation` must be virtual to allow escaping.")),"vertical"===C&&w>1&&ma("In grid list navigation mode (`cols` > 1), the `orientation` should",'be either "horizontal" or "both".'));const E=ro(Zr(a.floating)),R=ya(),k=ba();no(()=>{e.dataRef.current.orientation=C},[e,C]);const A=ao(()=>{s(-1===P.current?null:P.current)}),M=!!(B=a.domReference)&&"combobox"===B.getAttribute("role")&&Gr(B);var B;const L=r.useRef(v),P=r.useRef(null!=d?d:-1),O=r.useRef(null),D=r.useRef(!0),F=r.useRef(A),z=r.useRef(!!a.floating),$=r.useRef(n),U=r.useRef(!1),H=r.useRef(!1),j=ro(b),W=ro(n),V=ro(S),K=ro(d),[Y,q]=r.useState(),[X,G]=r.useState(),Z=ao(()=>{function e(e){var t;h?(null!=(t=e.id)&&t.endsWith("-fui-option")&&(e.id=i+"-"+Math.random().toString(16).slice(2,10)),q(e.id),null==k||k.events.emit("virtualfocus",e),T&&(T.current=e)):function(e,t){void 0===t&&(t={});const{preventScroll:n=!1,cancelPrevious:r=!0,sync:o=!1}=t;r&&cancelAnimationFrame(Ra);const a=()=>null==e?void 0:e.focus({preventScroll:n});o?a():Ra=requestAnimationFrame(a)}(e,{sync:U.current,preventScroll:!0})}const t=l.current[P.current],n=H.current;t&&e(t);(U.current?e=>e():requestAnimationFrame)(()=>{const r=l.current[P.current]||t;if(!r)return;t||e(r);const o=V.current;o&&Q&&(n||!D.current)&&(null==r.scrollIntoView||r.scrollIntoView("boolean"==typeof o?{block:"nearest",inline:"nearest"}:o))})});no(()=>{u&&(n&&a.floating?L.current&&null!=d&&(H.current=!0,P.current=d,A()):z.current&&(P.current=-1,F.current()))},[u,n,a.floating,d,A]),no(()=>{if(u&&n&&a.floating)if(null==c){if(U.current=!1,null!=K.current)return;if(z.current&&(P.current=-1,Z()),(!$.current||!z.current)&&L.current&&(null!=O.current||!0===L.current&&null==O.current)){let e=0;const t=()=>{if(null==l.current[0]){if(e<2){(e?requestAnimationFrame:queueMicrotask)(t)}e++}else P.current=null==O.current||Ga(O.current,C,m)||f?co(l,j.current):so(l,j.current),O.current=null,A()};t()}}else lo(l,c)||(P.current=c,Z(),H.current=!1)},[u,n,a.floating,c,K,f,l,C,m,A,Z,j]),no(()=>{var e;if(!u||a.floating||!k||h||!z.current)return;const t=k.nodesRef.current,n=null==(e=t.find(e=>e.id===R))||null==(e=e.context)?void 0:e.elements.floating,r=Vr(Xr(a.floating)),o=t.some(e=>e.context&&Kr(e.context.elements.floating,r));n&&!o&&D.current&&n.focus({preventScroll:!0})},[u,a.floating,k,R,h]),no(()=>{if(u&&k&&h&&!R)return k.events.on("virtualfocus",e),()=>{k.events.off("virtualfocus",e)};function e(e){G(e.id),T&&(T.current=e)}},[u,k,h,R,T]),no(()=>{F.current=A,$.current=n,z.current=!!a.floating}),no(()=>{n||(O.current=null,L.current=v)},[n,v]);const J=null!=c,Q=r.useMemo(()=>{function e(e){if(!W.current)return;const t=l.current.indexOf(e);-1!==t&&P.current!==t&&(P.current=t,A())}return{onFocus(t){let{currentTarget:n}=t;U.current=!0,e(n)},onClick:e=>{let{currentTarget:t}=e;return t.focus({preventScroll:!0})},onMouseMove(t){let{currentTarget:n}=t;U.current=!0,H.current=!1,g&&e(n)},onPointerLeave(e){let{pointerType:t}=e;var n;D.current&&"touch"!==t&&(U.current=!0,g&&(P.current=-1,A(),h||null==(n=E.current)||n.focus({preventScroll:!0})))}}},[W,E,g,l,A,h]),ee=r.useCallback(()=>{var e;return null!=x?x:null==k||null==(e=k.nodesRef.current.find(e=>e.id===R))||null==(e=e.context)||null==(e=e.dataRef)?void 0:e.current.orientation},[R,k,x]),te=ao(e=>{if(D.current=!1,U.current=!0,229===e.which)return;if(!W.current&&e.currentTarget===E.current)return;if(f&&Ja(e.key,C,m,w))return Xa(e.key,ee())||Qr(e),o(!1,e.nativeEvent,"list-navigation"),void(Dn(a.domReference)&&(h?null==k||k.events.emit("virtualfocus",a.domReference):a.domReference.focus()));const t=P.current,r=co(l,b),i=so(l,b);if(M||("Home"===e.key&&(Qr(e),P.current=r,A()),"End"===e.key&&(Qr(e),P.current=i,A())),w>1){const t=N||Array.from({length:l.current.length},()=>({width:1,height:1})),n=function(e,t,n){const r=[];let o=0;return e.forEach((e,a)=>{let{width:i,height:l}=e;if(i>t&&"production"!==process.env.NODE_ENV)throw new Error("[Floating UI]: Invalid grid - item width at index "+a+" is greater than grid columns");let c=!1;for(n&&(o=0);!c;){const e=[];for(let n=0;n<i;n++)for(let r=0;r<l;r++)e.push(o+n+r*t);o%t+i<=t&&e.every(e=>null==r[e])?(e.forEach(e=>{r[e]=a}),c=!0):o++}}),[...r]}(t,w,I),o=n.findIndex(e=>null!=e&&!fo(l,e,b)),a=n.reduce((e,t,n)=>null==t||fo(l,t,b)?e:n,-1),c=n[function(e,t){let{event:n,orientation:r,loop:o,rtl:a,cols:i,disabledIndices:l,minIndex:c,maxIndex:s,prevIndex:u,stopEvent:d=!1}=t,_=u;if("ArrowUp"===n.key){if(d&&Qr(n),-1===u)_=s;else if(_=uo(e,{startingIndex:_,amount:i,decrement:!0,disabledIndices:l}),o&&(u-i<c||_<0)){const e=u%i,t=s%i,n=s-(t-e);_=t===e?s:t>e?n:n-i}lo(e,_)&&(_=u)}if("ArrowDown"===n.key&&(d&&Qr(n),-1===u?_=c:(_=uo(e,{startingIndex:u,amount:i,disabledIndices:l}),o&&u+i>s&&(_=uo(e,{startingIndex:u%i-i,amount:i,disabledIndices:l}))),lo(e,_)&&(_=u)),"both"===r){const t=or(u/i);n.key===(a?jr:Wr)&&(d&&Qr(n),u%i!==i-1?(_=uo(e,{startingIndex:u,disabledIndices:l}),o&&io(_,i,t)&&(_=uo(e,{startingIndex:u-u%i-1,disabledIndices:l}))):o&&(_=uo(e,{startingIndex:u-u%i-1,disabledIndices:l})),io(_,i,t)&&(_=u)),n.key===(a?Wr:jr)&&(d&&Qr(n),u%i!==0?(_=uo(e,{startingIndex:u,decrement:!0,disabledIndices:l}),o&&io(_,i,t)&&(_=uo(e,{startingIndex:u+(i-u%i),decrement:!0,disabledIndices:l}))):o&&(_=uo(e,{startingIndex:u+(i-u%i),decrement:!0,disabledIndices:l})),io(_,i,t)&&(_=u));const r=or(s/i)===t;lo(e,_)&&(_=o&&r?n.key===(a?Wr:jr)?s:uo(e,{startingIndex:u-u%i-1,disabledIndices:l}):u)}return _}({current:n.map(e=>null!=e?l.current[e]:null)},{event:e,orientation:C,loop:p,rtl:m,cols:w,disabledIndices:po([...("function"!=typeof b?b:null)||l.current.map((e,t)=>fo(l,t,b)?t:void 0),void 0],n),minIndex:o,maxIndex:a,prevIndex:_o(P.current>i?r:P.current,t,n,w,e.key===ca?"bl":e.key===(m?aa:ia)?"tr":"tl"),stopEvent:!0})];if(null!=c&&(P.current=c,A()),"both"===C)return}if(Xa(e.key,C)){if(Qr(e),n&&!h&&Vr(e.currentTarget.ownerDocument)===e.currentTarget)return P.current=Ga(e.key,C,m)?r:i,void A();Ga(e.key,C,m)?P.current=p?t>=i?_&&t!==l.current.length?-1:r:uo(l,{startingIndex:t,disabledIndices:b}):Math.min(i,uo(l,{startingIndex:t,disabledIndices:b})):P.current=p?t<=r?_&&-1!==t?l.current.length:i:uo(l,{startingIndex:t,decrement:!0,disabledIndices:b}):Math.max(r,uo(l,{startingIndex:t,decrement:!0,disabledIndices:b})),lo(l,P.current)&&(P.current=-1),A()}}),ne=r.useMemo(()=>h&&n&&J&&{"aria-activedescendant":X||Y},[h,n,J,X,Y]),re=r.useMemo(()=>({"aria-orientation":"both"===C?void 0:C,...M?{}:ne,onKeyDown:te,onPointerMove(){D.current=!0}}),[ne,te,C,M]),oe=r.useMemo(()=>{function e(e){"auto"===v&&function(e){return!(0!==e.mozInputSource||!e.isTrusted)||(Ur()&&e.pointerType?"click"===e.type&&1===e.buttons:0===e.detail&&!e.pointerType)}(e.nativeEvent)&&(L.current=!0)}function t(e){L.current=v,"auto"===v&&eo(e.nativeEvent)&&(L.current=!0)}return{...ne,onKeyDown(e){D.current=!1;const t=e.key.startsWith("Arrow"),r=["Home","End"].includes(e.key),a=t||r,i=Za(e.key,C,m),c=Ja(e.key,C,m,w),s=Za(e.key,ee(),m),u=Xa(e.key,C),_=(f?s:u)||"Enter"===e.key||""===e.key.trim();if(h&&n){const t=null==k?void 0:k.nodesRef.current.find(e=>null==e.parentId),n=k&&t?function(e,t){let n,r=-1;return function t(o,a){a>r&&(n=o,r=a),Jr(e,o).forEach(e=>{t(e.id,a+1)})}(t,0),e.find(e=>e.id===n)}(k.nodesRef.current,t.id):null;if(a&&n&&T){const t=new KeyboardEvent("keydown",{key:e.key,bubbles:!0});if(i||c){var p,v;const r=(null==(p=n.context)?void 0:p.elements.domReference)===e.currentTarget,o=c&&!r?null==(v=n.context)?void 0:v.elements.domReference:i?l.current.find(e=>(null==e?void 0:e.id)===Y):null;o&&(Qr(e),o.dispatchEvent(t),G(void 0))}var g;if((u||r)&&n.context)if(n.context.open&&n.parentId&&e.currentTarget!==n.context.elements.domReference)return Qr(e),void(null==(g=n.context.elements.domReference)||g.dispatchEvent(t))}return te(e)}if(n||y||!t){if(_){const t=Xa(e.key,ee());O.current=f&&t?null:e.key}f?s&&(Qr(e),n?(P.current=co(l,j.current),A()):o(!0,e.nativeEvent,"list-navigation")):u&&(null!=d&&(P.current=d),Qr(e),!n&&y?o(!0,e.nativeEvent,"list-navigation"):te(e),n&&A())}},onFocus(){n&&!h&&(P.current=-1,A())},onPointerDown:t,onPointerEnter:t,onMouseDown:e,onClick:e}},[Y,ne,w,te,j,v,l,f,A,o,n,y,C,ee,m,d,k,h,T]);return r.useMemo(()=>u?{reference:oe,floating:re,item:Q}:{},[u,oe,re,Q])}const ei=new Map([["select","listbox"],["combobox","listbox"],["label",!1]]);const ti=a({mode:"desktop",close:Ee}),ni=()=>i(ti),ri=a({activeIndex:null,getItemProps:e=>({...e})});var oi="ContextMenu__trigger__bEu";const ai={open:100,close:300},ii=()=>"undefined"!=typeof window&&"function"==typeof window.matchMedia&&window.matchMedia("(pointer: coarse)").matches;var li="ContextMenuDivider__JLr";const ci=({className:t,...n})=>e("div",{role:"separator",className:C(li,t),...n});ci.displayName="ContextMenuDivider";var si="ContextMenuActionBar__Req",ui="ContextMenuActionBar__button__5UF",di="ContextMenuActionBar__icon__pKA",_i="ContextMenuActionBar__label__Dcc";const pi=({buttons:r})=>{const{close:o,innerClassNames:a}=ni(),i=e=>t=>{e.onClick?.(t),o()};return t(n,{children:[e("div",{role:"none",className:C(si,a?.actionBar),children:r.map(n=>t(Gt,{as:"button",type:"button",disabled:n.disabled,className:C(ui,a?.actionBarButton),onClick:i(n),children:[e("span",{className:C(di,a?.actionBarButtonIcon),children:n.icon}),Te(n.label)&&e("span",{className:C(_i,a?.actionBarButtonLabel),children:n.label})]},n.id))}),e(ci,{className:C(a?.divider)})]})};pi.displayName="ContextMenuActionBar";var fi={MaxUI:"MaxUI__g7Q",MaxUI_platform_ios:"MaxUI_platform_ios__gAV",MaxUI_platform_android:"MaxUI_platform_android__m3U",MaxUI_colorScheme_light:"MaxUI_colorScheme_light__Woo",MaxUI_colorScheme_dark:"MaxUI_colorScheme_dark__jFq",MaxUI_resetBody:"MaxUI_resetBody__Mwh"},mi="ContextMenuContent__9kf";const hi=o((t,n)=>{const{children:r,className:o,...a}=t,{platform:i,colorScheme:l}=De();return e("div",{ref:n,role:"menu",className:C(fi[`MaxUI_colorScheme_${l}`],fi[`MaxUI_platform_${i}`],mi,o),...a,children:r})});hi.displayName="ContextMenuContent";var vi={ContextMenuRow:"ContextMenuRow__NZL",ContextMenuRow_destructive:"ContextMenuRow_destructive__WNP",ContextMenuRow_disabled:"ContextMenuRow_disabled__VUD",ContextMenuRow_hasSubmenu:"ContextMenuRow_hasSubmenu__ZJ6",ContextMenuRow__before:"ContextMenuRow__before__O8u",ContextMenuRow__label:"ContextMenuRow__label__DaH",ContextMenuRow__hint:"ContextMenuRow__hint__sZV",ContextMenuRow__chevron:"ContextMenuRow__chevron__1jA",ContextMenuRow__chevron_mobile:"ContextMenuRow__chevron_mobile__tKx",ContextMenuRow__chevron_expanded:"ContextMenuRow__chevron_expanded__8wf"};const gi=o((n,o)=>{const{item:a,expanded:l=!1,onClick:c,onMouseEnter:s,onMouseLeave:u,onFocus:d,onSubmenuKeyDown:_,className:p}=n,{mode:f,innerClassNames:m}=ni(),{activeIndex:h,getItemProps:v}=i(ri),{ref:g,index:y}=function(e){void 0===e&&(e={});const{label:t}=e,{register:n,unregister:o,map:a,elementsRef:i,labelsRef:l}=r.useContext(ea),[c,s]=r.useState(null),u=r.useRef(null),d=r.useCallback(e=>{if(u.current=e,null!==c&&(i.current[c]=e,l)){var n;const r=void 0!==t;l.current[c]=r?t:null!=(n=null==e?void 0:e.textContent)?n:null}},[c,i,l,t]);return no(()=>{const e=u.current;if(e)return n(e),()=>{o(e)}},[n,o]),no(()=>{const e=u.current?a.get(u.current):null;null!=e&&s(e)},[a]),r.useMemo(()=>({ref:d,index:null==c?-1:c}),[c,d])}(),b=void 0!==a.items,x=v({onClick:c,onMouseEnter:s,onMouseLeave:u,onFocus:d,onKeyDown:e=>{_?.(e),(e=>{"Enter"===e.key||" "===e.key?(e.preventDefault(),a.disabled||e.currentTarget.click()):"ArrowRight"===e.key?(e.preventDefault(),!a.disabled&&b&&"mobile"===f&&e.currentTarget.click()):"ArrowLeft"===e.key&&e.preventDefault()})(e)}}),w=C(vi.ContextMenuRow,{[vi.ContextMenuRow_destructive]:"destructive"===a.mode,[vi.ContextMenuRow_disabled]:a.disabled,[vi.ContextMenuRow_expanded]:l,[vi.ContextMenuRow_hasSubmenu]:b},m?.row,p);return t(Gt,{ref:Ie(o,g),role:"menuitem","aria-haspopup":b?"menu":void 0,"aria-expanded":b?l:void 0,disabled:a.disabled,className:w,tabIndex:a.disabled||h!==y?-1:0,...x,children:[(Te(a.before)||a.offset)&&e("span",{className:C(vi.ContextMenuRow__before,m?.before),children:a.before}),e("span",{className:C(vi.ContextMenuRow__label,m?.label),children:a.label}),!b&&Te(a.hint)&&e("span",{className:C(vi.ContextMenuRow__hint,m?.hint),children:a.hint}),b&&e(E,{className:C(vi.ContextMenuRow__chevron,vi[`ContextMenuRow__chevron_${f}`],{[vi.ContextMenuRow__chevron_expanded]:l},m?.chevron)})]})});gi.displayName="ContextMenuRow";const yi=n=>{const{item:r,open:o,onOpenChange:a,onClick:i,onRowMouseEnter:l,onRowMouseLeave:c,onPanelMouseEnter:s,onPanelMouseLeave:d,onRowFocus:f,children:m}=n,{innerClassNames:h}=ni(),v=Ca(),g=u([]),[b,x]=p(null),{refs:w,floatingStyles:S,context:T}=Va({nodeId:v,open:o,onOpenChange:a,placement:"right-start",strategy:"fixed",middleware:[Xo(16),Zo({fallbackPlacements:["left-start"],padding:8}),Go({padding:8})],whileElementsMounted:Fo}),N=Qa(T,{listRef:g,activeIndex:b,onNavigate:x,nested:!0}),{getFloatingProps:I,getItemProps:E,getReferenceProps:R}=Ya([N]),k=_(()=>({activeIndex:b,getItemProps:E}),[b,E]),A=R().onKeyDown;return t(xa,{id:v,children:[e(gi,{ref:w.setReference,item:r,expanded:o,onClick:i,onMouseEnter:()=>{r.disabled||l(r.id)},onMouseLeave:c,onFocus:f,onSubmenuKeyDown:A}),o&&"undefined"!=typeof document&&y(e(ri.Provider,{value:k,children:e(hi,{ref:w.setFloating,style:S,className:C(h?.content),...I({onMouseEnter:s,onMouseLeave:d}),children:e(ta,{elementsRef:g,children:m})})}),document.body)]})};yi.displayName="ContextMenuSubmenu";var bi="ContextMenuList__I1T",Ci="ContextMenuList_nested__dnE",xi="ContextMenuList__accordion__RaX",wi="ContextMenuList__accordion_expanded__uiY",Si="ContextMenuList__accordionContent__8Ka";const Ti=({items:n,nested:r=!1})=>{const{mode:o,close:a,innerClassNames:i}=ni(),[l,c]=p(null),s=u(void 0),_=u(void 0),[f,v]=p([]);d(()=>()=>{window.clearTimeout(s.current),window.clearTimeout(_.current)},[]);const g=m(e=>{window.clearTimeout(_.current),window.clearTimeout(s.current),s.current=window.setTimeout(()=>{c(e)},100)},[]),y=m(()=>{window.clearTimeout(s.current),_.current=window.setTimeout(()=>{c(null)},300)},[]),b=m(()=>{window.clearTimeout(_.current)},[]),x=m(e=>{window.clearTimeout(s.current),window.clearTimeout(_.current),c(e)},[]),w=m(e=>{c(t=>t===e?null:t)},[]),S=m(e=>()=>{c(t=>t&&t!==e?null:t)},[]),T=m(e=>{v(t=>t.includes(e)?t.filter(t=>t!==e):[...t,e])},[]),N=m(e=>t=>{e.onClick?.(t),a()},[a]),I=m(e=>t=>{e.onClick?.(t),"mobile"!==o?(window.clearTimeout(s.current),window.clearTimeout(_.current),c(t=>t===e.id?null:e.id)):T(e.id)},[o,T]);return e("div",{role:"none",className:C(bi,{[Ci]:r},i?.list),children:n.map((n,r)=>{const a=void 0!==n.items,c=Boolean(n.divider)&&r>0&&e(ci,{className:C(i?.divider)});if(a&&"desktop"===o)return t(h,{children:[c,e(yi,{item:n,open:l===n.id,onClick:I(n),onOpenChange:e=>{e?x(n.id):w(n.id)},onRowMouseEnter:g,onRowMouseLeave:y,onPanelMouseEnter:b,onPanelMouseLeave:y,onRowFocus:S(n.id),children:e(Ti,{items:n.items})})]},n.id);const s=a&&"mobile"===o,u=s&&f.includes(n.id);return t(h,{children:[c,e(gi,{item:n,expanded:u,onClick:a?I(n):N(n),onFocus:"desktop"===o?S(n.id):void 0}),s&&e("div",{role:"none",className:C(xi,{[wi]:u},i?.accordion),children:e("div",{className:Si,children:e(Ti,{items:n.items,nested:!0})})})]},n.id)})})};Ti.displayName="ContextMenuList";const Ni=o((n,o)=>{const{items:a,actionBar:i,children:l,className:c,openOn:s="click",mode:f="auto",placement:h="bottom-start",open:v,defaultOpen:g=!1,onOpenChange:b,asChild:x=!1,innerClassNames:w}=n,[S,T]=p(g),N=void 0!==v,I=N?Boolean(v):S,E=(e=>{const[t,n]=p(ii);return d(()=>{if("auto"!==e||"undefined"==typeof window||"function"!=typeof window.matchMedia)return;const t=window.matchMedia("(pointer: coarse)"),r=e=>{n(e.matches)};return n(t.matches),t.addEventListener("change",r),()=>{t.removeEventListener("change",r)}},[e]),"auto"!==e?e:t?"mobile":"desktop"})(f),R=Ca(),k=m(e=>{N||T(e),b?.(e)},[N,b]),{refs:A,floatingStyles:M,context:B}=Va({nodeId:R,open:I,onOpenChange:k,placement:h,strategy:"fixed",middleware:[Xo(4),Zo({padding:8}),Go({padding:8})],whileElementsMounted:Fo}),L=_(()=>(e=>Array.isArray(e)?e:[e])(s),[s]),P=za(B,{enabled:L.includes("click"),toggle:!0}),O=function(e,t){void 0===t&&(t={});const{open:n,onOpenChange:o,dataRef:a,events:i,elements:l}=e,{enabled:c=!0,delay:s=0,handleClose:u=null,mouseOnly:d=!1,restMs:_=0,move:p=!0}=t,f=ba(),m=ya(),h=ro(u),v=ro(s),g=ro(n),y=ro(_),b=r.useRef(),C=r.useRef(-1),x=r.useRef(),w=r.useRef(-1),S=r.useRef(!0),T=r.useRef(!1),N=r.useRef(()=>{}),I=r.useRef(!1),E=ao(()=>{var e;const t=null==(e=a.current.openEvent)?void 0:e.type;return(null==t?void 0:t.includes("mouse"))&&"mousedown"!==t});r.useEffect(()=>{if(c)return i.on("openchange",e),()=>{i.off("openchange",e)};function e(e){let{open:t}=e;t||(Ta(C),Ta(w),S.current=!0,I.current=!1)}},[c,i]),r.useEffect(()=>{if(!c)return;if(!h.current)return;if(!n)return;function e(e){E()&&o(!1,e,"hover")}const t=Xr(l.floating).documentElement;return t.addEventListener("mouseleave",e),()=>{t.removeEventListener("mouseleave",e)}},[l.floating,n,o,c,h,E]);const R=r.useCallback(function(e,t,n){void 0===t&&(t=!0),void 0===n&&(n="hover");const r=Ia(v.current,"close",b.current);r&&!x.current?(Ta(C),C.current=window.setTimeout(()=>o(!1,e,n),r)):t&&(Ta(C),o(!1,e,n))},[v,o]),k=ao(()=>{N.current(),x.current=void 0}),A=ao(()=>{if(T.current){const e=Xr(l.floating).body;e.style.pointerEvents="",e.removeAttribute(Na),T.current=!1}}),M=ao(()=>!!a.current.openEvent&&["click","mousedown"].includes(a.current.openEvent.type));r.useEffect(()=>{if(c&&On(l.domReference)){const o=l.domReference,a=l.floating;return n&&o.addEventListener("mouseleave",r),p&&o.addEventListener("mousemove",e,{once:!0}),o.addEventListener("mouseenter",e),o.addEventListener("mouseleave",t),a&&(a.addEventListener("mouseleave",r),a.addEventListener("mouseenter",i),a.addEventListener("mouseleave",s)),()=>{n&&o.removeEventListener("mouseleave",r),p&&o.removeEventListener("mousemove",e),o.removeEventListener("mouseenter",e),o.removeEventListener("mouseleave",t),a&&(a.removeEventListener("mouseleave",r),a.removeEventListener("mouseenter",i),a.removeEventListener("mouseleave",s))}}function e(e){if(Ta(C),S.current=!1,d&&!to(b.current)||Ea(y.current)>0&&!Ia(v.current,"open"))return;const t=Ia(v.current,"open",b.current);t?C.current=window.setTimeout(()=>{g.current||o(!0,e,"hover")},t):n||o(!0,e,"hover")}function t(e){if(M())return void A();N.current();const t=Xr(l.floating);if(Ta(w),I.current=!1,h.current&&a.current.floatingContext){n||Ta(C),x.current=h.current({...a.current.floatingContext,tree:f,x:e.clientX,y:e.clientY,onClose(){A(),k(),M()||R(e,!0,"safe-polygon")}});const r=x.current;return t.addEventListener("mousemove",r),void(N.current=()=>{t.removeEventListener("mousemove",r)})}("touch"!==b.current||!Kr(l.floating,e.relatedTarget))&&R(e)}function r(e){M()||a.current.floatingContext&&(null==h.current||h.current({...a.current.floatingContext,tree:f,x:e.clientX,y:e.clientY,onClose(){A(),k(),M()||R(e)}})(e))}function i(){Ta(C)}function s(e){M()||R(e,!1)}},[l,c,e,d,p,R,k,A,o,n,g,f,v,h,a,M,y]),no(()=>{var e;if(c&&n&&null!=(e=h.current)&&null!=(e=e.__options)&&e.blockPointerEvents&&E()){T.current=!0;const e=l.floating;if(On(l.domReference)&&e){var t;const n=Xr(l.floating).body;n.setAttribute(Na,"");const r=l.domReference,o=null==f||null==(t=f.nodesRef.current.find(e=>e.id===m))||null==(t=t.context)?void 0:t.elements.floating;return o&&(o.style.pointerEvents=""),n.style.pointerEvents="none",r.style.pointerEvents="auto",e.style.pointerEvents="auto",()=>{n.style.pointerEvents="",r.style.pointerEvents="",e.style.pointerEvents=""}}}},[c,n,m,l,f,h,E]),no(()=>{n||(b.current=void 0,I.current=!1,k(),A())},[n,k,A]),r.useEffect(()=>()=>{k(),Ta(C),Ta(w),A()},[c,l.domReference,k,A]);const B=r.useMemo(()=>{function e(e){b.current=e.pointerType}return{onPointerDown:e,onPointerEnter:e,onMouseMove(e){const{nativeEvent:t}=e;function r(){S.current||g.current||o(!0,t,"hover")}d&&!to(b.current)||n||0===Ea(y.current)||I.current&&e.movementX**2+e.movementY**2<2||(Ta(w),"touch"===b.current?r():(I.current=!0,w.current=window.setTimeout(r,Ea(y.current))))}}},[d,o,n,g,y]);return r.useMemo(()=>c?{reference:B}:{},[c,B])}(B,{enabled:L.includes("hover"),delay:ai}),D=ja(B),F=function(e,t){var n,o;void 0===t&&(t={});const{open:a,elements:i,floatingId:l}=e,{enabled:c=!0,role:s="dialog"}=t,u=pa(),d=(null==(n=i.domReference)?void 0:n.id)||u,_=r.useMemo(()=>{var e;return(null==(e=Zr(i.floating))?void 0:e.id)||l},[i.floating,l]),p=null!=(o=ei.get(s))?o:s,f=null!=ya(),m=r.useMemo(()=>"tooltip"===p||"label"===s?{["aria-"+("label"===s?"labelledby":"describedby")]:a?_:void 0}:{"aria-expanded":a?"true":"false","aria-haspopup":"alertdialog"===p?"dialog":p,"aria-controls":a?_:void 0,..."listbox"===p&&{role:"combobox"},..."menu"===p&&{id:d},..."menu"===p&&f&&{role:"menuitem"},..."select"===s&&{"aria-autocomplete":"none"},..."combobox"===s&&{"aria-autocomplete":"list"}},[p,_,f,a,d,s]),h=r.useMemo(()=>{const e={id:_,...p&&{role:p}};return"tooltip"===p||"label"===s?e:{...e,..."menu"===p&&{"aria-labelledby":d}}},[p,_,d,s]),v=r.useCallback(e=>{let{active:t,selected:n}=e;const r={role:"option",...t&&{id:_+"-fui-option"}};switch(s){case"select":case"combobox":return{...r,"aria-selected":n}}return{}},[_,s]);return r.useMemo(()=>c?{reference:m,floating:h,item:v}:{},[c,m,h,v])}(B,{role:"menu"}),z=u([]),[$,U]=p(null),H=Qa(B,{listRef:z,activeIndex:$,onNavigate:U}),{getReferenceProps:j,getFloatingProps:W,getItemProps:V}=Ya([P,O,D,F,H]),K=_(()=>({activeIndex:$,getItemProps:V}),[$,V]),Y=m(()=>{k(!1)},[k]),q=u(!1);d(()=>{I?q.current=!0:q.current&&(q.current=!1,"undefined"!=typeof document&&document.activeElement===document.body&&A.domReference.current?.focus())},[I,A]);const X=_(()=>({mode:E,close:Y,innerClassNames:w}),[E,Y,w]);return t(xa,{id:R,children:[e(x?re:"span",{ref:Ie(o,A.setReference),className:C(!x&&oi,c,w?.trigger),tabIndex:x?void 0:0,...j(),children:l}),I&&"undefined"!=typeof document&&y(e(ti.Provider,{value:X,children:t(hi,{ref:A.setFloating,style:M,className:C(w?.content),...W({onKeyDown:e=>{"Tab"===e.key&&Y()}}),children:[i&&e(pi,{buttons:i}),e(ri.Provider,{value:K,children:e(ta,{elementsRef:z,children:e(Ti,{items:a})})})]})}),document.body)]})});Ni.displayName="ContextMenuInner";const Ii=o((t,n)=>e(wa,{children:e(Ni,{...t,ref:n})}));Ii.displayName="ContextMenu";const Ei=e=>{switch(e){case"xsmall":return 16;case"small":case"medium":return 20;case"large":return 24}},Ri=e=>{switch(e){case"primary":case"destructive":case"overlay":return"contrast-static";case"secondary":case"ghost":return"primary";case"primary-contrast":case"secondary-contrast":return"primary-static"}};var ki={IconButton:"IconButton__KCr",IconButton_loading:"IconButton_loading__RxW",IconButton__content:"IconButton__content__dCL",IconButton_disabled:"IconButton_disabled__SZj",IconButton_activeMode_ripple:"IconButton_activeMode_ripple__asi",IconButton_activeMode_highlight:"IconButton_activeMode_highlight__h15",IconButton_size_xsmall:"IconButton_size_xsmall__G5T",IconButton_size_small:"IconButton_size_small__e3f",IconButton_size_medium:"IconButton_size_medium__MQQ",IconButton_size_large:"IconButton_size_large__9oz",IconButton_variant_primary:"IconButton_variant_primary__-4n",IconButton_variant_secondary:"IconButton_variant_secondary__dFi",IconButton_variant_ghost:"IconButton_variant_ghost__jvE","IconButton_variant_primary-contrast":"IconButton_variant_primary-contrast__O-T","IconButton_variant_secondary-contrast":"IconButton_variant_secondary-contrast__uNH",IconButton_variant_overlay:"IconButton_variant_overlay__vJc",IconButton_variant_destructive:"IconButton_variant_destructive__9rk",IconButton__spinnerContainer:"IconButton__spinnerContainer__9--",IconButton__ripple:"IconButton__ripple__l8M"};const Ai=o((n,r)=>{const{children:o,className:a,disabled:i,innerClassNames:l,loading:c,onClick:s,asChild:u=!1,size:d="medium",variant:_="primary",...p}=n,f="button",m=u?re:f,h=Ue(),v=Le({asChild:u,children:o,disabled:i,loading:c,onClick:s,rootElement:f}),g=i||c,y="android"===h,b=C(ki.IconButton,ki[`IconButton_variant_${_}`],ki[`IconButton_size_${d}`],{[ki.IconButton_loading]:c,[ki.IconButton_disabled]:i,[ki.IconButton_activeMode_highlight]:!g&&!y,[ki.IconButton_activeMode_ripple]:!g&&y},a);return t(m,{ref:r,className:b,...v,...p,children:[c&&e("span",{className:C(ki.IconButton__spinnerContainer,l?.spinnerContainer),children:e(en,{className:C(l?.spinner),size:Ei(d),appearance:Ri(_)})}),e(ie,{children:Se({options:{asChild:u,children:o},content:t=>e("span",{className:C(ki.IconButton__content,l?.content),children:t},"subtree-container")})}),y&&!g&&e(jt,{className:ki.IconButton__ripple})]})});Ai.displayName="IconButton";var Mi={Input:"Input__A3w",Input_disabled:"Input_disabled__mpt",Input__iconBefore:"Input__iconBefore__gxx",Input__iconAfter:"Input__iconAfter__jL1",Input_size_medium:"Input_size_medium__EjC",Input__input:"Input__input__gy5",Input_size_large:"Input_size_large__8OF",Input_mode_default:"Input_mode_default__ncX",Input_mode_contrast:"Input_mode_contrast__EIY",Input__body:"Input__body__sVJ",Input__clearButton:"Input__clearButton__nKe",Input__count:"Input__count__zAz",Input__hint:"Input__hint__dE5",Input__hint_disabled:"Input__hint_disabled__E55"};const Bi=o((n,r)=>{const{className:o,innerClassNames:a,withClearButton:i,iconBefore:l,iconAfter:c,size:s="large",mode:u="default",count:d,hint:_,...p}=n,f=C(Mi.Input,Mi[`Input_mode_${u}`],Mi[`Input_size_${s}`],{[Mi.Input_disabled]:p.disabled},o);return t("div",{className:C(a?.container),children:[t("label",{className:f,children:[Te(l)&&e("div",{className:C(Mi.Input__iconBefore,a?.iconBefore),children:l}),e(It,{ref:r,className:C(Mi.Input__body,a?.body),withClearButton:i,count:d,innerClassNames:{input:C(Mi.Input__input,a?.input),clearButton:C(Mi.Input__clearButton,a?.clearButton),count:C(Mi.Input__count,a?.count)},...p}),Te(c)&&e("div",{className:C(Mi.Input__iconAfter,a?.iconAfter),children:c})]}),Te(_)&&e("div",{className:C(Mi.Input__hint,{[Mi.Input__hint_disabled]:p.disabled},a?.hint),children:_})]})});Bi.displayName="Input";const Li=o((t,n)=>{const{children:r,className:o,colorScheme:a,platform:i=(Ne()?"ios":"android"),resetBody:l=!1}=t,c=We({listenChanges:!a}),s=a??c,u=_(()=>({colorScheme:s,platform:i}),[s,i]);d(()=>{if(l)return document.body.classList.add(fi.MaxUI_resetBody),()=>{document.body.classList.remove(fi.MaxUI_resetBody)}},[l]);const p=C(fi.MaxUI,fi[`MaxUI_colorScheme_${s}`],fi[`MaxUI_platform_${i}`],o);return e(Oe.Provider,{value:u,children:e("div",{ref:n,className:p,children:r})})});Li.displayName="MaxUI";var Pi="Radio__MT3",Oi="Radio__input__QY4",Di="Radio__control__T5I",Fi="Radio_animated__XvV";const zi=o((n,r)=>{const{className:o,...a}=n,i=C(Pi,Fi,o);return t("span",{className:i,children:[e("input",{...a,ref:r,type:"radio",className:Oi}),e("span",{className:Di})]})});zi.displayName="Radio";var $i="segmented__iN0",Ui="segment__-Te",Hi="segment_active__85D";const ji=({items:t,activeItem:n,onClick:r,innerClassNames:o})=>{const a=e=>n=>{const o=t.length-1;let a;switch(n.key){case"ArrowRight":case"ArrowDown":a=e===o?0:e+1;break;case"ArrowLeft":case"ArrowUp":a=0===e?o:e-1;break;case"Home":a=0;break;case"End":a=o;break;case"Enter":case" ":return n.preventDefault(),void r(t[e].id);default:return}n.preventDefault(),r(t[a].id);const i=n.currentTarget.parentElement?.children[a];i?.focus(),i?.scrollIntoView({inline:"nearest",block:"nearest",behavior:"smooth"})},i=e=>e===n;return e("div",{className:C($i,o?.list),role:"tablist",children:t.map((t,n)=>{return e("button",{role:"tab",tabIndex:i(t.id)?0:-1,"aria-selected":i(t.id),onKeyDown:a(n),className:C(Ui,o?.item,{[Hi]:i(t.id)}),onClick:(l=t.id,e=>{r(l),e.currentTarget.scrollIntoView({inline:"nearest",block:"nearest",behavior:"smooth"})}),type:"button",children:t.title},t.id);var l})})},Wi="Ничего не найдено",Vi="Поиск",Ki=[],Yi=e=>"string"==typeof e||"number"==typeof e?String(e):"",qi=(e,t)=>(e=>void 0!==e.searchText?e.searchText:`${Yi(e.label)} ${Yi(e.hint)}`.trim()||e.value)(e).toLowerCase().includes(t.trim().toLowerCase()),Xi=(e,t,n)=>{for(let r=t+n;r>=0&&r<e.length;r+=n)if(!e[r].disabled)return r;return-1},Gi=a({multiple:!1,query:"",setQuery:Ee,isSelected:()=>!1,select:Ee,close:Ee,options:Ki,listId:"",getOptionId:()=>"",activeIndex:null,setActiveIndex:Ee,onKeyDown:Ee,emptyText:Wi,loading:!1}),Zi=()=>i(Gi);var Ji="SelectEmpty__sWw";const Qi=o((t,n)=>{const{className:r,children:o,...a}=t,{emptyText:i,loading:l,innerClassNames:c}=Zi();return e("div",{ref:n,role:"status","aria-label":l?"Загрузка":void 0,className:C(Ji,l?c?.loading:c?.empty,r),...a,children:l?e(en,{size:20,"aria-hidden":!0}):o??i})});Qi.displayName="SelectEmpty";var el="SelectOptionRow__sXi",tl="SelectOptionRow_selected__W8R",nl="SelectOptionRow_active__pZs",rl="SelectOptionRow_disabled__Xx7",ol="SelectOptionRow__before__-y2",al="SelectOptionRow__label__cwK",il="SelectOptionRow__hint__ppH",ll="SelectOptionRow__check__dmb";const cl=o((n,r)=>{const{option:o,index:a,className:i,...l}=n,{multiple:c,isSelected:s,select:_,activeIndex:p,setActiveIndex:f,getOptionId:m,innerClassNames:h}=Zi(),v=u(null),g=u(!1),y=s(o.value),b=void 0!==a&&p===a;d(()=>{b&&!g.current&&v.current?.scrollIntoView({block:"nearest"})},[b]);const x=C(el,{[tl]:y,[nl]:b,[rl]:o.disabled},h?.option,i);return t("div",{ref:Ie(v,r),id:void 0===a?void 0:m(a),role:"option","aria-selected":y,"aria-disabled":o.disabled||void 0,className:x,onMouseDown:e=>{e.preventDefault()},onMouseMove:()=>{g.current=!0,o.disabled||void 0===a||p===a||f(a)},onMouseLeave:()=>{g.current=!1},onClick:()=>{o.disabled||_(o.value,o)},...l,children:[Te(o.before)&&e("span",{className:C(ol,h?.optionBefore),children:o.before}),e("span",{className:C(al,h?.optionLabel),children:o.label}),Te(o.hint)&&e("span",{className:C(il,h?.optionHint),children:o.hint}),c&&e("span",{className:C(ll,h?.optionCheck),children:y&&e(T,{})})]})});cl.displayName="SelectOptionRow";var sl="SelectSearch__x-k",ul="SelectSearch__icon__dxs",dl="SelectSearch__input__S13",_l="SelectSearch__clearButton__A9A";const pl=o((n,r)=>{const{className:o,placeholder:a,...i}=n,{query:l,setQuery:c,listId:s,activeIndex:_,getOptionId:p,onKeyDown:f,innerClassNames:m}=Zi(),h=u(null);return d(()=>{window.matchMedia?.("(pointer: coarse)").matches||h.current?.focus({preventScroll:!0})},[]),t("div",{className:C(sl,o,m?.search),children:[e(z,{className:ul}),e("input",{ref:Ie(h,r),type:"text",role:"searchbox",autoComplete:"off",spellCheck:!1,"aria-autocomplete":"list","aria-label":a,"aria-controls":s,"aria-activedescendant":null===_?void 0:p(_),className:dl,placeholder:a,value:l,onChange:e=>{c(e.currentTarget.value)},onKeyDown:f,...i}),""!==l&&e(ge,{type:"button",tabIndex:-1,className:_l,"aria-label":"Очистить поиск",onMouseDown:e=>{e.preventDefault()},onClick:()=>{c("")},children:e(B,{})})]})});pl.displayName="SelectSearch";var fl={SelectContent:"SelectContent__VfR",SelectContent_width_trigger:"SelectContent_width_trigger__JeH",SelectContent_width_auto:"SelectContent_width_auto__7XK",SelectContent__header:"SelectContent__header__1jc",SelectContent__body:"SelectContent__body__2jh"};const ml=o((n,r)=>{const{children:o,className:a,header:i,dropdownWidth:l="trigger",innerClassNames:c,...s}=n,u=(()=>{const{platform:e,colorScheme:t}=De();return C(fi[`MaxUI_colorScheme_${t}`],fi[`MaxUI_platform_${e}`])})();return t("div",{ref:r,className:C(u,fl.SelectContent,fl[`SelectContent_width_${l}`],a),...s,children:[i&&e("div",{className:C(fl.SelectContent__header,c?.header),children:i}),e("div",{className:C(fl.SelectContent__body,c?.body),children:o})]})});ml.displayName="SelectContent";var hl={SelectField:"SelectField__vYH",SelectField_disabled:"SelectField_disabled__Zd-",SelectField__iconBefore:"SelectField__iconBefore__jb0",SelectField__chevron:"SelectField__chevron__Co2",SelectField__value:"SelectField__value__jnC",SelectField_size_medium:"SelectField_size_medium__Ai4",SelectField_size_large:"SelectField_size_large__SLs",SelectField_mode_default:"SelectField_mode_default__Hnl",SelectField_mode_contrast:"SelectField_mode_contrast__VUx",SelectField__value_placeholder:"SelectField__value_placeholder__bR7",SelectField__counter:"SelectField__counter__8-T",SelectField__clearButton:"SelectField__clearButton__p7f",SelectField_open:"SelectField_open__yhN",SelectField__chevron_open:"SelectField__chevron_open__xtc"};const vl=o((n,r)=>{const{className:o,mode:a,size:i,open:l,disabled:c,iconBefore:s,valueContent:u,placeholder:d,hiddenCount:_=0,valueId:p,showClearButton:f,onClear:m,innerClassNames:h,...v}=n,g=Te(u),y=C(hl.SelectField,hl[`SelectField_mode_${a}`],hl[`SelectField_size_${i}`],{[hl.SelectField_disabled]:c,[hl.SelectField_open]:l},h?.field,o);return t("div",{ref:r,role:"combobox","aria-haspopup":"listbox","aria-expanded":l,"aria-disabled":c||void 0,tabIndex:c?-1:0,className:y,...v,children:[Te(s)&&e("div",{className:C(hl.SelectField__iconBefore,h?.iconBefore),children:s}),e(Lt,{id:p,className:C(hl.SelectField__value,{[hl.SelectField__value_placeholder]:!g},h?.value),children:g?u:d}),_>0&&e("span",{className:C(hl.SelectField__counter,h?.counter),children:`+${_}`}),f&&!c&&e(ge,{type:"button",tabIndex:-1,className:C(hl.SelectField__clearButton,h?.clearButton),"aria-label":"Очистить",onMouseDown:e=>{e.preventDefault()},onClick:e=>{e.stopPropagation(),m()},children:e(B,{})}),e(E,{"aria-hidden":!0,className:C(hl.SelectField__chevron,{[hl.SelectField__chevron_open]:l},h?.chevron)})]})});vl.displayName="SelectField";var gl="SelectOptions__0k6";const yl=()=>{const{options:r,listId:o,multiple:a,loading:i,listLabel:l,innerClassNames:c}=Zi();return t(n,{children:[e("div",{id:o,role:"listbox",...l,"aria-multiselectable":a||void 0,"aria-busy":i||void 0,className:C(gl,c?.list),children:r.map((t,n)=>e(cl,{option:t,index:n},t.value))}),(0===r.length||i)&&e(Qi,{})]})};yl.displayName="SelectOptions";var bl="Select__Yce",Cl="Select__hint__K4l",xl="Select__hint_disabled__k6E";const wl=o((n,r)=>{const{options:o=Ki,customDropdownMenu:a,selectedOptions:i,searchable:l=!1,searchPlaceholder:c=Vi,filterOption:s,onSearchChange:f,loading:h=!1,emptyText:g=Wi,placeholder:y,disabled:b=!1,mode:x="default",size:w="large",hint:S,iconBefore:T,withClearButton:N=!1,name:I,open:E,defaultOpen:R=!1,onOpenChange:k,placement:A="bottom-start",dropdownWidth:M="trigger",innerClassNames:B,multiple:L,value:P,defaultValue:O,onValueChange:D,onKeyDown:F,onFocus:z,onBlur:$,"aria-label":U,"aria-labelledby":H,"aria-describedby":j,...W}=n,V=Boolean(L),K=v(),Y=`${K}-listbox`,q=`${K}-value`,X=`${K}-hint`,G=W.id??`${K}-field`,Z=m(e=>`${K}-option-${e}`,[K]),J=void 0!==P,[Q,ee]=p(O),te=J?P:Q,ne=_(()=>{return void 0===(e=te)||""===e?[]:Array.isArray(e)?e:[e];var e},[te]),re=u(new Map);for(const e of re.current.keys())ne.includes(e)||re.current.delete(e);for(const e of o)re.current.set(e.value,e);if(i)for(const e of i)re.current.set(e.value,e);const oe=e=>e.map(e=>re.current.get(e)??{value:e,label:e}),[ae,ie]=p(R),le=void 0!==E,ce=!b&&(le?Boolean(E):ae),se=m(e=>{le||ie(e),k?.(e)},[le,k]);d(()=>{b&&(le?E:ae)&&se(!1)},[b]);const[ue,de]=p(""),[_e,pe]=p(null),fe=m(e=>{de(e),f?.(e)},[f]),me=_(()=>void 0!==a?Ki:l&&""!==ue.trim()?s?o.filter(e=>s(e,ue)):f?o:o.filter(e=>qi(e,ue)):o,[a,l,ue,o,s,f]),he=me.map(e=>e.value).join("\0"),ve=null!==_e&&me[_e]&&!me[_e].disabled?_e:null,{refs:ge,floatingStyles:ye,context:be}=Va({open:ce,onOpenChange:se,placement:A,strategy:"fixed",middleware:[Xo(4),Zo({padding:8}),Jo({padding:8,apply({rects:e,availableHeight:t,elements:n}){n.floating.style.setProperty("--MaxUi-Select_trigger-width",`${e.reference.width}px`),n.floating.style.setProperty("--MaxUi-Select_available-height",`${t}px`)}}),Go({padding:8})],whileElementsMounted:Fo}),Ce=za(be,{enabled:!b,toggle:!0,keyboardHandlers:!1}),xe=ja(be),{getReferenceProps:we,getFloatingProps:Se}=Ya([Ce,xe]),Ne=m(()=>{ge.domReference.current?.focus()},[ge]),Ee=m(e=>{se(!1),e&&Ne()},[se,Ne]),Re=u(!1);d(()=>{ce?Re.current=!0:(pe(null),""!==ue&&(de(""),f?.("")),Re.current&&(Re.current=!1,document.activeElement===document.body&&Ne()))},[ce]),d(()=>{if(!ce)return;const e=me.findIndex(e=>!e.disabled&&ne.includes(e.value));pe(-1===e?null:e)},[ce]),d(()=>{if(!ce||""===ue)return;const e=Xi(me,-1,1);pe(-1===e?null:e)},[ue,he]);const ke=e=>{const t=V?e:e[0]??"";J||ee(t),V?D?.(e,oe(e)):D?.(t,oe(e)[0]??null)},Ae=(e,t)=>{t&&re.current.set(e,t),V?ke(ne.includes(e)?ne.filter(t=>t!==e):[...ne,e]):(ne[0]!==e&&ke([e]),Ee(!0))},Me=e=>ne.includes(e),Be=N&&ne.length>0,Le=()=>{ke([])},Pe=(e=>{const{open:t,options:n,activeIndex:r,setActiveIndex:o,onSelectIndex:a,onOpen:i,onClose:l,onClear:c}=e;return m(e=>{if(e.target!==e.currentTarget)return;if(e.nativeEvent.isComposing)return;const s=e.currentTarget instanceof HTMLInputElement;if(!t)return"ArrowDown"===e.key||"ArrowUp"===e.key||"Enter"===e.key||" "===e.key?(e.preventDefault(),void i()):void("Backspace"!==e.key&&"Delete"!==e.key||!c||(e.preventDefault(),c()));const u=e=>{-1!==e&&o(e)};switch(e.key){case"ArrowDown":e.preventDefault(),u(Xi(n,r??-1,1));break;case"ArrowUp":e.preventDefault(),u(Xi(n,r??n.length,-1));break;case"Home":if(s)break;e.preventDefault(),u(Xi(n,-1,1));break;case"End":if(s)break;e.preventDefault(),u(Xi(n,n.length,-1));break;case"Enter":case" ":{if(" "===e.key&&s)break;const t=null===r?void 0:n[r];null!==r&&t&&!t.disabled?(e.preventDefault(),a(r)):s||(e.preventDefault(),l(!0));break}case"Tab":s&&e.preventDefault(),l(s)}},[t,n,r,o,a,i,l,c])})({open:ce,options:me,activeIndex:ve,setActiveIndex:pe,onSelectIndex:e=>{Ae(me[e].value,me[e])},onOpen:()=>{se(!0)},onClose:Ee,onClear:Be?Le:void 0}),Oe=e=>e instanceof Node&&Boolean(ge.floating.current?.contains(e)),De=()=>{Ee(!0)},Fe={multiple:V,query:ue,setQuery:fe,isSelected:Me,select:Ae,close:De,options:me,listId:Y,getOptionId:Z,activeIndex:ve,setActiveIndex:pe,onKeyDown:Pe,emptyText:g,loading:h,listLabel:H?{"aria-labelledby":H}:{"aria-label":U??("string"==typeof y?y:void 0)},innerClassNames:B},ze={query:ue,multiple:V,isSelected:Me,select:Ae,close:De},[$e]=oe(ne),Ue=ne.length>0?$e?.label??ne[0]:void 0,He=void 0!==a,je=l&&!He,We=He?"function"==typeof a?a(ze):a:e(yl,{}),Ve=ce&&!je&&null!==ve?Z(ve):void 0,Ke=H?`${H} ${q}`:U?`${G} ${q}`:q,Ye=[j,Te(S)?X:void 0].filter(Boolean).join(" ")||void 0;return t("div",{className:C(bl,B?.container),children:[e(vl,{ref:Ie(r,ge.setReference),id:G,valueId:q,"aria-label":U,"aria-labelledby":Ke,"aria-describedby":Ye,mode:x,size:w,open:ce,disabled:b,iconBefore:T??(V?void 0:$e?.before),valueContent:Ue,placeholder:y,hiddenCount:V?Math.max(ne.length-1,0):0,showClearButton:Be,onClear:Le,innerClassNames:B,"aria-controls":ce&&!He?Y:void 0,"aria-activedescendant":Ve,...we({...W,onKeyDown:e=>{F?.(e),e.defaultPrevented||Pe(e)},onFocus:e=>{Oe(e.relatedTarget)||z?.(e)},onBlur:e=>{Oe(e.relatedTarget)||$?.(e)}})}),Te(S)&&e("div",{id:X,className:C(Cl,{[xl]:b},B?.hint),children:S}),I&&!b&&ne.map(t=>e("input",{type:"hidden",name:I,value:t},t)),ce&&e(Pa,{children:e(Gi.Provider,{value:Fe,children:e(ml,{ref:ge.setFloating,style:ye,dropdownWidth:M,className:C(B?.content),header:je?e(pl,{placeholder:c}):void 0,...Se({onBlur:e=>{const t=e.relatedTarget,n=t instanceof Node&&Boolean(ge.domReference.current?.contains(t));Oe(t)||n||$?.(e)},onMouseDown:e=>{e.target.closest("input, textarea, select, [contenteditable]")||e.preventDefault()}}),children:We})})})]})});wl.displayName="Select";var Sl={viewport:"viewport__DPJ",topLeft:"topLeft__e-4",topCenter:"topCenter__WCQ",topRight:"topRight__Kqq",bottomLeft:"bottomLeft__-Jr",bottomCenter:"bottomCenter__6BC",bottomRight:"bottomRight__18f",SnackbarItem:"SnackbarItem__wdB",maxSnackbarEnter:"maxSnackbarEnter__qbP","SnackbarItem_placement_top-left":"SnackbarItem_placement_top-left__4gd","SnackbarItem_placement_top-center":"SnackbarItem_placement_top-center__1Ip","SnackbarItem_placement_top-right":"SnackbarItem_placement_top-right__Lx-","SnackbarItem_placement_bottom-left":"SnackbarItem_placement_bottom-left__D1r","SnackbarItem_placement_bottom-center":"SnackbarItem_placement_bottom-center__xy4","SnackbarItem_placement_bottom-right":"SnackbarItem_placement_bottom-right__8AG",SnackbarItem_leaving:"SnackbarItem_leaving__OwP",maxSnackbarExit:"maxSnackbarExit__YWk",before:"before__hVC",after:"after__1BT",textContainer:"textContainer__HNM",text:"text__6Z1",caption:"caption__K-X"};const Tl=o((n,r)=>{const{id:o,caption:a,before:i,after:l,text:c,placement:s,leaving:u,onExited:d,..._}=n,p=m(()=>{u&&d?.(o)},[u,d,o]),f=C(Sl.SnackbarItem,Sl[`SnackbarItem_placement_${s}`],u&&Sl.SnackbarItem_leaving);return t("div",{ref:r,className:f,role:"status","data-placement":s,"data-leaving":u||void 0,onAnimationEnd:p,onClick:()=>d?.(o),..._,children:[Te(i)&&e("div",{className:Sl.before,children:i}),(!!c||!!a)&&t("div",{className:Sl.textContainer,children:[!!c&&e(pt.Body,{className:Sl.text,variant:"large",children:c}),!!a&&e(pt.Body,{className:Sl.caption,variant:"small",children:a})]}),Te(l)&&e("div",{className:Sl.after,children:l})]})});Tl.displayName="SnackbarItem";const Nl=["top-left","top-center","top-right","bottom-left","bottom-center","bottom-right"],Il={"top-left":Sl.topLeft,"top-center":Sl.topCenter,"top-right":Sl.topRight,"bottom-left":Sl.bottomLeft,"bottom-center":Sl.bottomCenter,"bottom-right":Sl.bottomRight},El=e=>{if(void 0!==e)return"number"==typeof e?`${e}px`:e},Rl=(e,t)=>{if(void 0!==t)return e.startsWith("top-")?{"--snackbar-top-offset":t}:{"--snackbar-bottom-offset":t}};function kl({queue:t,onExited:r}){const o=(e=>Nl.flatMap(t=>{const n=new Map;for(const r of e){if(r.placement!==t)continue;const e=El(r.offset),o=`${t}:${void 0===e?"default":`offset:${e}`}`,a=n.get(o);a?a.items.push(r):n.set(o,{key:o,items:[r],offsetValue:e,placement:t})}return[...n.values()]}))(t);return e(n,{children:o.map(({key:t,items:n,offsetValue:o,placement:a})=>e("div",{className:C(Sl.viewport,Il[a]),"aria-label":`Уведомления: ${a}`,"aria-live":"polite","data-offset":o,"data-placement":a,role:"region",style:Rl(a,o),children:n.map(t=>e(Tl,{...t,onExited:r},t.id))},t))})}let Al=0;const Ml=()=>"function"==typeof globalThis.crypto?.randomUUID?globalThis.crypto.randomUUID():(Al+=1,`snackbar-${Date.now()}-${Al}`);function Bl({children:n,queueSize:r=3,createId:o=Ml,defaultPlacement:a="bottom-center"}){const[i,l]=p([]),c=u(new Map),s=m(e=>{const t=e.id??o();l(n=>n.some(e=>e.id===t)?n:[...n,{...e,id:t,placement:e.placement??a,leaving:!1}])},[o,a]),f=m(e=>{const t=c.current.get(e);t&&clearTimeout(t),c.current.delete(e),l(t=>t.map(t=>t.id===e?{...t,leaving:!0}:t))},[]),h=m(()=>{for(const e of c.current.values())clearTimeout(e);c.current.clear(),l([])},[]),v=m(e=>{const t=c.current.get(e);t&&clearTimeout(t),c.current.delete(e),l(t=>t.filter(t=>t.id!==e))},[]),g=_(()=>{const e=new Map,t=Math.max(0,r);return i.filter(n=>{if(n.leaving)return!0;const r=e.get(n.placement)??0;return!(r>=t)&&(e.set(n.placement,r+1),!0)})},[i,r]);d(()=>{const e=new Set(i.map(e=>e.id));for(const[t,n]of c.current)e.has(t)||(clearTimeout(n),c.current.delete(t));for(const e of g){if(e.leaving)continue;if(c.current.has(e.id))continue;const t=setTimeout(()=>f(e.id),e.duration??5e3);c.current.set(e.id,t)}},[f,i,g]),d(()=>()=>{for(const e of c.current.values())clearTimeout(e);c.current.clear()},[]);const y=_(()=>({showSnackbar:s,closeSnackbar:f,clearSnackbars:h}),[f,s,h]);return t(He.Provider,{value:y,children:[n,e(kl,{queue:g,onExited:v})]})}var Ll="label__ddl",Pl="positive__pv1",Ol="warning__UrM",Dl="negative__EtT",Fl="neutral__WIV";const zl=o(({text:t,status:n},r)=>e(pt.Title,{ref:r,className:C(Ll,{[Pl]:"positive"===n,[Ol]:"warning"===n,[Dl]:"negative"===n,[Fl]:"neutral"===n}),variant:"medium-strong",children:t}));zl.displayName="StatusBadge";var $l="Steps__S-N",Ul="Steps__step__i-Y",Hl="Steps__step_active__-Ee";const jl=o((t,n)=>{const{className:r,count:o,progress:a,...i}=t;return e("div",{ref:n,className:C($l,r),...i,children:Array.from({length:o},(t,n)=>e("div",{className:C(Ul,{[Hl]:n<a})},n))})});jl.displayName="Steps";var Wl={Switch:"Switch__-vj",Switch__toggle:"Switch__toggle__WU2",Switch__thumb:"Switch__thumb__jlX",Switch__input:"Switch__input__EDr",Switch_platform_ios:"Switch_platform_ios__B-C",Switch_platform_android:"Switch_platform_android__72T"};const Vl=o((n,r)=>{const{className:o,...a}=n,i=Ue(),l=C(Wl.Switch,Wl[`Switch_platform_${i}`],o);return t("span",{className:l,children:[e("input",{ref:r,type:"checkbox",role:"switch",className:Wl.Switch__input,...a}),e("span",{className:Wl.Switch__toggle,children:e("span",{className:Wl.Switch__thumb})})]})});Vl.displayName="Switch";var Kl="tabs__z-C",Yl="tab__LYq",ql="tab__label__9Dq",Xl="tab_active__6Jq";const Gl=({items:n,activeItem:r,onCancel:o,onClick:a,innerClassNames:i})=>{const l=e=>t=>{t.stopPropagation(),o?.(e)},c=e=>t=>{const r=n.length-1;let o;switch(t.key){case"ArrowRight":case"ArrowDown":o=e===r?0:e+1;break;case"ArrowLeft":case"ArrowUp":o=0===e?r:e-1;break;case"Home":o=0;break;case"End":o=r;break;case"Enter":case" ":return t.preventDefault(),void a(n[e].id);default:return}t.preventDefault(),a(n[o].id);const i=t.currentTarget.parentElement?.children[o];i?.focus(),i?.scrollIntoView({inline:"nearest",block:"nearest",behavior:"smooth"})},s=e=>e===r;return e("div",{className:C(Kl,i?.list),role:"tablist",children:n.map((n,r)=>{return t("div",{role:"tab",tabIndex:s(n.id)?0:-1,"aria-selected":s(n.id),onKeyDown:c(r),className:C(Yl,i?.item,{[Xl]:s(n.id)}),onClick:(u=n.id,e=>{a(u),e.currentTarget.scrollIntoView({inline:"nearest",block:"nearest",behavior:"smooth"})}),children:[t("button",{type:"button",tabIndex:-1,className:ql,children:[n.title,n.indicator&&e(rn,{variant:s(n.id)?"primary":"mute",value:n.indicator,className:C(i?.indicator)})]}),!!o&&!n.indicator&&e(ge,{type:"button",tabIndex:-1,className:C(i?.closeButton),onClick:l(n.id),"aria-label":"Close",children:e(B,{})})]},n.id);var u})})};var Zl={Textarea:"Textarea__Sy6",Textarea_disabled:"Textarea_disabled__uY3",Textarea_mode_primary:"Textarea_mode_primary__E7l",Textarea_mode_secondary:"Textarea_mode_secondary__BYw",Textarea__textarea:"Textarea__textarea__Ok-"};const Jl=o((t,n)=>{const{className:r,innerClassNames:o,mode:a="primary",...i}=t,l=C(Zl.Textarea,Zl[`Textarea_mode_${a}`],{[Zl.Textarea_disabled]:i.disabled},r);return e("div",{className:l,children:e("textarea",{ref:n,className:C(Zl.Textarea__textarea,o?.textarea),...i})})});Jl.displayName="Textarea";var Ql={root:"root__-DG",tooltip:"tooltip__LjR",tooltip_open:"tooltip_open__FHJ"};const ec=o(({label:n,text:r,variant:o="ghost"},a)=>{const i=u(null),l=u(null),c=u(void 0),[s,d]=p(!1),_=()=>{window.clearTimeout(c.current),c.current=void 0},m=()=>{_(),d(!1)};return f(()=>{const e=i.current,t=l.current;if(!s||!e||!t)return;const n=e.getBoundingClientRect(),r=Math.min(280,window.innerWidth-32),o=Math.min(Math.max(n.left+n.width/2-r/2,16),window.innerWidth-16-r),a=t.offsetHeight,c=n.bottom+4,u=c+a>window.innerHeight-16?Math.max(n.top-4-a,16):c;t.style.top=`${u}px`,t.style.left=`${o}px`},[s]),t("span",{className:Ql.root,ref:a,onPointerEnter:()=>{d(!0),_()},onPointerLeave:()=>{_(),c.current=window.setTimeout(m,150)},children:[e(Ai,{ref:i,type:"button",size:"xsmall",variant:o,className:Ql.trigger,"aria-label":`Описание: ${n}`,children:e(O,{})}),e("div",{ref:l,role:"tooltip",className:C(Ql.tooltip,{[Ql.tooltip_open]:s}),children:e(pt.Body,{variant:"small",children:r})})]})});ec.displayName="Tooltip";export{Je as Avatar,xt as BottomSheet,cn as Button,un as CellAction,_n as CellHeader,fn as CellInput,hn as CellList,gn as CellSimple,kn as Checkbox,It as ClearableInput,kt as Container,Ii as ContextMenu,rn as Counter,Lt as EllipsisText,Ot as Flex,Ft as Grid,T as Icon16Check,E as Icon16Chevron,B as Icon16CloseIos,O as Icon16Info,z as Icon16SearchOutline,j as Icon20CloseAndroid,K as Icon20CloseFilled,q as Icon24CloseAndroid,Ai as IconButton,Bi as Input,Li as MaxUI,Oe as MaxUIContext,$t as Panel,zi as Radio,jt as Ripple,ji as Segmented,wl as Select,Qi as SelectEmpty,cl as SelectOptionRow,pl as SelectSearch,re as Slot,ie as Slottable,kl as SnackbarContainer,Tl as SnackbarItem,Bl as SnackbarProvider,en as Spinner,zl as StatusBadge,jl as Steps,ge as SvgButton,Vl as Switch,Gl as Tabs,Gt as Tappable,Jl as Textarea,ec as Tooltip,pt as Typography,Se as getSubtree,Te as hasReactNode,Ie as mergeRefs,De as useAppearance,Le as useButtonLikeProps,Pe as useCallbackRef,Fe as useColorScheme,ze as useDrag,$e as useImageLoadingStatus,Ue as usePlatform,Zi as useSelect,je as useSnackbar,We as useSystemColorScheme};
|
|
6
6
|
//# sourceMappingURL=index.js.map
|