randmarcomps 1.447.0 → 1.448.0

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.
@@ -8608,7 +8608,16 @@ const DropdownMenuShortcut = ({
8608
8608
  DropdownMenuShortcut.displayName = "DropdownMenuShortcut";
8609
8609
  function ProductInventoryGrid({ inventory: e, showBinLocation: t, className: n }) {
8610
8610
  const o = (F, z, Q = !1, V = !0) => {
8611
- const j = F.WarehouseType === "Fulfillment Center", te = j ? "bg-white" : "bg-white/70 text-gray-600", ne = V && z > 0 ? "border-t" : "", ae = Q ? "border-r" : "", Oe = F.Status ?? "Unknown", se = !(Oe === "Active");
8611
+ const j = F.WarehouseType === "Fulfillment Center", te = j ? "bg-white" : "bg-white/70 text-gray-600", ne = V && z > 0 ? "border-t" : "", ae = Q ? "border-r" : "", Oe = F.Status ?? "Unknown", ge = Oe === "Active";
8612
+ let se = j ? "bg-emerald-100 text-emerald-800 ring-1 ring-emerald-200" : "bg-gray-100 text-gray-700";
8613
+ switch (Oe) {
8614
+ case "Closing":
8615
+ se = "bg-yellow-100 text-yellow-800 ring-1 ring-yellow-200";
8616
+ break;
8617
+ case "Closed":
8618
+ se = "bg-red-100 text-red-800 ring-1 ring-red-200";
8619
+ break;
8620
+ }
8612
8621
  return /* @__PURE__ */ jsxs(
8613
8622
  "article",
8614
8623
  {
@@ -8621,13 +8630,13 @@ function ProductInventoryGrid({ inventory: e, showBinLocation: t, className: n }
8621
8630
  /* @__PURE__ */ jsxs(
8622
8631
  "span",
8623
8632
  {
8624
- className: `inline-flex items-center gap-2 rounded-full px-2 py-0.5 text-xs font-semibold ${se ? "bg-yellow-100 text-yellow-800 ring-1 ring-yellow-200" : j ? "bg-emerald-100 text-emerald-800 ring-1 ring-emerald-200" : "bg-gray-100 text-gray-700"}`,
8633
+ className: `inline-flex items-center gap-2 rounded-full px-2 py-0.5 text-xs font-semibold ${se}`,
8625
8634
  "aria-hidden": "false",
8626
- title: se ? `Status: ${Oe}` : j ? "Fulfillment Center" : "Satellite Warehouse",
8635
+ title: ge ? j ? "Fulfillment Center" : "Satellite Warehouse" : `Status: ${Oe}`,
8627
8636
  children: [
8628
- j ? /* @__PURE__ */ jsx(Warehouse, { className: "h-3 w-3", "aria-hidden": "true" }) : /* @__PURE__ */ jsx(Truck, { className: `h-3 w-3 ${se ? "opacity-95" : "opacity-80"}`, "aria-hidden": "true" }),
8629
- /* @__PURE__ */ jsx("span", { className: "sr-only", children: se ? `Status: ${Oe}` : F.WarehouseType ? `${F.WarehouseType} warehouse` : "Warehouse" }),
8630
- /* @__PURE__ */ jsx("span", { "aria-hidden": "true", children: se ? Oe : F.WarehouseType || (j ? "Fulfillment Center" : "Satellite") })
8637
+ j ? /* @__PURE__ */ jsx(Warehouse, { className: "h-3 w-3", "aria-hidden": "true" }) : /* @__PURE__ */ jsx(Truck, { className: `h-3 w-3 ${ge ? "opacity-80" : "opacity-95"}`, "aria-hidden": "true" }),
8638
+ /* @__PURE__ */ jsx("span", { className: "sr-only", children: ge ? F.WarehouseType ? `${F.WarehouseType} warehouse` : "Warehouse" : `Status: ${Oe}` }),
8639
+ /* @__PURE__ */ jsx("span", { "aria-hidden": "true", children: ge ? F.WarehouseType || (j ? "Fulfillment Center" : "Satellite") : Oe })
8631
8640
  ]
8632
8641
  }
8633
8642
  )
@@ -506,7 +506,7 @@
506
506
 
507
507
  If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.
508
508
 
509
- For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return React__namespace.useEffect(()=>{e&&(document.getElementById(e)||console.error(n))},[n,e]),null},DESCRIPTION_WARNING_NAME="DialogDescriptionWarning",DescriptionWarning$1=({contentRef:e,descriptionId:t})=>{const o=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${useWarningContext(DESCRIPTION_WARNING_NAME).contentName}}.`;return React__namespace.useEffect(()=>{var d;const l=(d=e.current)==null?void 0:d.getAttribute("aria-describedby");t&&l&&(document.getElementById(t)||console.warn(o))},[o,e,t]),null},Root$a=Dialog$1,Trigger$6=DialogTrigger$1,Portal$4=DialogPortal$1,Overlay=DialogOverlay$1,Content$3=DialogContent$1,Title$1=DialogTitle$1,Description$1=DialogDescription$1,Close$1=DialogClose$1;const Dialog=({modal:e=!1,...t})=>jsxRuntime.jsx(Root$a,{modal:e,...t});Dialog.displayName=Root$a.displayName;const DialogTrigger=Trigger$6,DialogPortal=Portal$4,DialogClose=Close$1,DialogOverlay=React__namespace.forwardRef(({className:e,...t},n)=>jsxRuntime.jsx(Overlay,{ref:n,className:cn("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t}));DialogOverlay.displayName=Overlay.displayName;const DialogContent=React__namespace.forwardRef(({className:e,children:t,animateExit:n=!0,...o},l)=>jsxRuntime.jsxs(DialogPortal,{forceMount:o.forceMount,children:[jsxRuntime.jsx(DialogOverlay,{}),jsxRuntime.jsxs(Content$3,{ref:l,className:cn("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-2xl shadow-primary duration-200 data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95 data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",n&&"data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%]",e),...o,children:[t,jsxRuntime.jsxs(Close$1,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-hidden focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground",children:[jsxRuntime.jsx(X$1,{className:"h-4 w-4"}),jsxRuntime.jsx("span",{className:"sr-only",children:"Close"})]})]})]}));DialogContent.displayName=Content$3.displayName;const DialogHeader=({className:e,...t})=>jsxRuntime.jsx("div",{className:cn("flex flex-col space-y-1.5 text-center sm:text-left",e),...t});DialogHeader.displayName="DialogHeader";const DialogFooter=({className:e,...t})=>jsxRuntime.jsx("div",{className:cn("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});DialogFooter.displayName="DialogFooter";const DialogTitle=React__namespace.forwardRef(({className:e,...t},n)=>jsxRuntime.jsx(Title$1,{ref:n,className:cn("text-lg font-semibold leading-none tracking-tight",e),...t}));DialogTitle.displayName=Title$1.displayName;const DialogDescription=React__namespace.forwardRef(({className:e,...t},n)=>jsxRuntime.jsx(Description$1,{ref:n,className:cn("text-sm text-muted-foreground",e),...t}));DialogDescription.displayName=Description$1.displayName;const sides=["top","right","bottom","left"],min$4=Math.min,max$4=Math.max,round$1=Math.round,floor=Math.floor,createCoords=e=>({x:e,y:e}),oppositeSideMap={left:"right",right:"left",bottom:"top",top:"bottom"},oppositeAlignmentMap={start:"end",end:"start"};function clamp$1(e,t,n){return max$4(e,min$4(t,n))}function evaluate(e,t){return typeof e=="function"?e(t):e}function getSide$1(e){return e.split("-")[0]}function getAlignment(e){return e.split("-")[1]}function getOppositeAxis(e){return e==="x"?"y":"x"}function getAxisLength(e){return e==="y"?"height":"width"}const yAxisSides=new Set(["top","bottom"]);function getSideAxis(e){return yAxisSides.has(getSide$1(e))?"y":"x"}function getAlignmentAxis(e){return getOppositeAxis(getSideAxis(e))}function getAlignmentSides(e,t,n){n===void 0&&(n=!1);const o=getAlignment(e),l=getAlignmentAxis(e),d=getAxisLength(l);let f=l==="x"?o===(n?"end":"start")?"right":"left":o==="start"?"bottom":"top";return t.reference[d]>t.floating[d]&&(f=getOppositePlacement(f)),[f,getOppositePlacement(f)]}function getExpandedPlacements(e){const t=getOppositePlacement(e);return[getOppositeAlignmentPlacement(e),t,getOppositeAlignmentPlacement(t)]}function getOppositeAlignmentPlacement(e){return e.replace(/start|end/g,t=>oppositeAlignmentMap[t])}const lrPlacement=["left","right"],rlPlacement=["right","left"],tbPlacement=["top","bottom"],btPlacement=["bottom","top"];function getSideList(e,t,n){switch(e){case"top":case"bottom":return n?t?rlPlacement:lrPlacement:t?lrPlacement:rlPlacement;case"left":case"right":return t?tbPlacement:btPlacement;default:return[]}}function getOppositeAxisPlacements(e,t,n,o){const l=getAlignment(e);let d=getSideList(getSide$1(e),n==="start",o);return l&&(d=d.map(f=>f+"-"+l),t&&(d=d.concat(d.map(getOppositeAlignmentPlacement)))),d}function getOppositePlacement(e){return e.replace(/left|right|bottom|top/g,t=>oppositeSideMap[t])}function expandPaddingObject(e){return{top:0,right:0,bottom:0,left:0,...e}}function getPaddingObject(e){return typeof e!="number"?expandPaddingObject(e):{top:e,right:e,bottom:e,left:e}}function rectToClientRect(e){const{x:t,y:n,width:o,height:l}=e;return{width:o,height:l,top:n,left:t,right:t+o,bottom:n+l,x:t,y:n}}function computeCoordsFromPlacement(e,t,n){let{reference:o,floating:l}=e;const d=getSideAxis(t),f=getAlignmentAxis(t),g=getAxisLength(f),b=getSide$1(t),_=d==="y",S=o.x+o.width/2-l.width/2,R=o.y+o.height/2-l.height/2,C=o[g]/2-l[g]/2;let E;switch(b){case"top":E={x:S,y:o.y-l.height};break;case"bottom":E={x:S,y:o.y+o.height};break;case"right":E={x:o.x+o.width,y:R};break;case"left":E={x:o.x-l.width,y:R};break;default:E={x:o.x,y:o.y}}switch(getAlignment(t)){case"start":E[f]-=C*(n&&_?-1:1);break;case"end":E[f]+=C*(n&&_?-1:1);break}return E}const computePosition$1=async(e,t,n)=>{const{placement:o="bottom",strategy:l="absolute",middleware:d=[],platform:f}=n,g=d.filter(Boolean),b=await(f.isRTL==null?void 0:f.isRTL(t));let _=await f.getElementRects({reference:e,floating:t,strategy:l}),{x:S,y:R}=computeCoordsFromPlacement(_,o,b),C=o,E={},A=0;for(let M=0;M<g.length;M++){const{name:I,fn:j}=g[M],{x:F,y:z,data:Q,reset:O}=await j({x:S,y:R,initialPlacement:o,placement:C,strategy:l,middlewareData:E,rects:_,platform:f,elements:{reference:e,floating:t}});S=F??S,R=z??R,E={...E,[I]:{...E[I],...Q}},O&&A<=50&&(A++,typeof O=="object"&&(O.placement&&(C=O.placement),O.rects&&(_=O.rects===!0?await f.getElementRects({reference:e,floating:t,strategy:l}):O.rects),{x:S,y:R}=computeCoordsFromPlacement(_,C,b)),M=-1)}return{x:S,y:R,placement:C,strategy:l,middlewareData:E}};async function detectOverflow(e,t){var n;t===void 0&&(t={});const{x:o,y:l,platform:d,rects:f,elements:g,strategy:b}=e,{boundary:_="clippingAncestors",rootBoundary:S="viewport",elementContext:R="floating",altBoundary:C=!1,padding:E=0}=evaluate(t,e),A=getPaddingObject(E),I=g[C?R==="floating"?"reference":"floating":R],j=rectToClientRect(await d.getClippingRect({element:(n=await(d.isElement==null?void 0:d.isElement(I)))==null||n?I:I.contextElement||await(d.getDocumentElement==null?void 0:d.getDocumentElement(g.floating)),boundary:_,rootBoundary:S,strategy:b})),F=R==="floating"?{x:o,y:l,width:f.floating.width,height:f.floating.height}:f.reference,z=await(d.getOffsetParent==null?void 0:d.getOffsetParent(g.floating)),Q=await(d.isElement==null?void 0:d.isElement(z))?await(d.getScale==null?void 0:d.getScale(z))||{x:1,y:1}:{x:1,y:1},O=rectToClientRect(d.convertOffsetParentRelativeRectToViewportRelativeRect?await d.convertOffsetParentRelativeRectToViewportRelativeRect({elements:g,rect:F,offsetParent:z,strategy:b}):F);return{top:(j.top-O.top+A.top)/Q.y,bottom:(O.bottom-j.bottom+A.bottom)/Q.y,left:(j.left-O.left+A.left)/Q.x,right:(O.right-j.right+A.right)/Q.x}}const arrow$4=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:o,placement:l,rects:d,platform:f,elements:g,middlewareData:b}=t,{element:_,padding:S=0}=evaluate(e,t)||{};if(_==null)return{};const R=getPaddingObject(S),C={x:n,y:o},E=getAlignmentAxis(l),A=getAxisLength(E),M=await f.getDimensions(_),I=E==="y",j=I?"top":"left",F=I?"bottom":"right",z=I?"clientHeight":"clientWidth",Q=d.reference[A]+d.reference[E]-C[E]-d.floating[A],O=C[E]-d.reference[E],V=await(f.getOffsetParent==null?void 0:f.getOffsetParent(_));let te=V?V[z]:0;(!te||!await(f.isElement==null?void 0:f.isElement(V)))&&(te=g.floating[z]||d.floating[A]);const ne=Q/2-O/2,ae=te/2-M[A]/2-1,$e=min$4(R[j],ae),ge=min$4(R[F],ae),se=$e,je=te-M[A]-ge,Ae=te/2-M[A]/2+ne,Ne=clamp$1(se,Ae,je),Ve=!b.arrow&&getAlignment(l)!=null&&Ae!==Ne&&d.reference[A]/2-(Ae<se?$e:ge)-M[A]/2<0,Fe=Ve?Ae<se?Ae-se:Ae-je:0;return{[E]:C[E]+Fe,data:{[E]:Ne,centerOffset:Ae-Ne-Fe,...Ve&&{alignmentOffset:Fe}},reset:Ve}}}),flip$2=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,o;const{placement:l,middlewareData:d,rects:f,initialPlacement:g,platform:b,elements:_}=t,{mainAxis:S=!0,crossAxis:R=!0,fallbackPlacements:C,fallbackStrategy:E="bestFit",fallbackAxisSideDirection:A="none",flipAlignment:M=!0,...I}=evaluate(e,t);if((n=d.arrow)!=null&&n.alignmentOffset)return{};const j=getSide$1(l),F=getSideAxis(g),z=getSide$1(g)===g,Q=await(b.isRTL==null?void 0:b.isRTL(_.floating)),O=C||(z||!M?[getOppositePlacement(g)]:getExpandedPlacements(g)),V=A!=="none";!C&&V&&O.push(...getOppositeAxisPlacements(g,M,A,Q));const te=[g,...O],ne=await detectOverflow(t,I),ae=[];let $e=((o=d.flip)==null?void 0:o.overflows)||[];if(S&&ae.push(ne[j]),R){const Ae=getAlignmentSides(l,f,Q);ae.push(ne[Ae[0]],ne[Ae[1]])}if($e=[...$e,{placement:l,overflows:ae}],!ae.every(Ae=>Ae<=0)){var ge,se;const Ae=(((ge=d.flip)==null?void 0:ge.index)||0)+1,Ne=te[Ae];if(Ne&&(!(R==="alignment"?F!==getSideAxis(Ne):!1)||$e.every(Oe=>getSideAxis(Oe.placement)===F?Oe.overflows[0]>0:!0)))return{data:{index:Ae,overflows:$e},reset:{placement:Ne}};let Ve=(se=$e.filter(Fe=>Fe.overflows[0]<=0).sort((Fe,Oe)=>Fe.overflows[1]-Oe.overflows[1])[0])==null?void 0:se.placement;if(!Ve)switch(E){case"bestFit":{var je;const Fe=(je=$e.filter(Oe=>{if(V){const Be=getSideAxis(Oe.placement);return Be===F||Be==="y"}return!0}).map(Oe=>[Oe.placement,Oe.overflows.filter(Be=>Be>0).reduce((Be,Ue)=>Be+Ue,0)]).sort((Oe,Be)=>Oe[1]-Be[1])[0])==null?void 0:je[0];Fe&&(Ve=Fe);break}case"initialPlacement":Ve=g;break}if(l!==Ve)return{reset:{placement:Ve}}}return{}}}};function getSideOffsets(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function isAnySideFullyClipped(e){return sides.some(t=>e[t]>=0)}const hide$2=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:o="referenceHidden",...l}=evaluate(e,t);switch(o){case"referenceHidden":{const d=await detectOverflow(t,{...l,elementContext:"reference"}),f=getSideOffsets(d,n.reference);return{data:{referenceHiddenOffsets:f,referenceHidden:isAnySideFullyClipped(f)}}}case"escaped":{const d=await detectOverflow(t,{...l,altBoundary:!0}),f=getSideOffsets(d,n.floating);return{data:{escapedOffsets:f,escaped:isAnySideFullyClipped(f)}}}default:return{}}}}},originSides=new Set(["left","top"]);async function convertValueToCoords(e,t){const{placement:n,platform:o,elements:l}=e,d=await(o.isRTL==null?void 0:o.isRTL(l.floating)),f=getSide$1(n),g=getAlignment(n),b=getSideAxis(n)==="y",_=originSides.has(f)?-1:1,S=d&&b?-1:1,R=evaluate(t,e);let{mainAxis:C,crossAxis:E,alignmentAxis:A}=typeof R=="number"?{mainAxis:R,crossAxis:0,alignmentAxis:null}:{mainAxis:R.mainAxis||0,crossAxis:R.crossAxis||0,alignmentAxis:R.alignmentAxis};return g&&typeof A=="number"&&(E=g==="end"?A*-1:A),b?{x:E*S,y:C*_}:{x:C*_,y:E*S}}const offset$2=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,o;const{x:l,y:d,placement:f,middlewareData:g}=t,b=await convertValueToCoords(t,e);return f===((n=g.offset)==null?void 0:n.placement)&&(o=g.arrow)!=null&&o.alignmentOffset?{}:{x:l+b.x,y:d+b.y,data:{...b,placement:f}}}}},shift$3=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:o,placement:l}=t,{mainAxis:d=!0,crossAxis:f=!1,limiter:g={fn:I=>{let{x:j,y:F}=I;return{x:j,y:F}}},...b}=evaluate(e,t),_={x:n,y:o},S=await detectOverflow(t,b),R=getSideAxis(getSide$1(l)),C=getOppositeAxis(R);let E=_[C],A=_[R];if(d){const I=C==="y"?"top":"left",j=C==="y"?"bottom":"right",F=E+S[I],z=E-S[j];E=clamp$1(F,E,z)}if(f){const I=R==="y"?"top":"left",j=R==="y"?"bottom":"right",F=A+S[I],z=A-S[j];A=clamp$1(F,A,z)}const M=g.fn({...t,[C]:E,[R]:A});return{...M,data:{x:M.x-n,y:M.y-o,enabled:{[C]:d,[R]:f}}}}}},limitShift$2=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:o,placement:l,rects:d,middlewareData:f}=t,{offset:g=0,mainAxis:b=!0,crossAxis:_=!0}=evaluate(e,t),S={x:n,y:o},R=getSideAxis(l),C=getOppositeAxis(R);let E=S[C],A=S[R];const M=evaluate(g,t),I=typeof M=="number"?{mainAxis:M,crossAxis:0}:{mainAxis:0,crossAxis:0,...M};if(b){const z=C==="y"?"height":"width",Q=d.reference[C]-d.floating[z]+I.mainAxis,O=d.reference[C]+d.reference[z]-I.mainAxis;E<Q?E=Q:E>O&&(E=O)}if(_){var j,F;const z=C==="y"?"width":"height",Q=originSides.has(getSide$1(l)),O=d.reference[R]-d.floating[z]+(Q&&((j=f.offset)==null?void 0:j[R])||0)+(Q?0:I.crossAxis),V=d.reference[R]+d.reference[z]+(Q?0:((F=f.offset)==null?void 0:F[R])||0)-(Q?I.crossAxis:0);A<O?A=O:A>V&&(A=V)}return{[C]:E,[R]:A}}}},size$2=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,o;const{placement:l,rects:d,platform:f,elements:g}=t,{apply:b=()=>{},..._}=evaluate(e,t),S=await detectOverflow(t,_),R=getSide$1(l),C=getAlignment(l),E=getSideAxis(l)==="y",{width:A,height:M}=d.floating;let I,j;R==="top"||R==="bottom"?(I=R,j=C===(await(f.isRTL==null?void 0:f.isRTL(g.floating))?"start":"end")?"left":"right"):(j=R,I=C==="end"?"top":"bottom");const F=M-S.top-S.bottom,z=A-S.left-S.right,Q=min$4(M-S[I],F),O=min$4(A-S[j],z),V=!t.middlewareData.shift;let te=Q,ne=O;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(ne=z),(o=t.middlewareData.shift)!=null&&o.enabled.y&&(te=F),V&&!C){const $e=max$4(S.left,0),ge=max$4(S.right,0),se=max$4(S.top,0),je=max$4(S.bottom,0);E?ne=A-2*($e!==0||ge!==0?$e+ge:max$4(S.left,S.right)):te=M-2*(se!==0||je!==0?se+je:max$4(S.top,S.bottom))}await b({...t,availableWidth:ne,availableHeight:te});const ae=await f.getDimensions(g.floating);return A!==ae.width||M!==ae.height?{reset:{rects:!0}}:{}}}};function hasWindow(){return typeof window<"u"}function getNodeName(e){return isNode(e)?(e.nodeName||"").toLowerCase():"#document"}function getWindow(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function getDocumentElement(e){var t;return(t=(isNode(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function isNode(e){return hasWindow()?e instanceof Node||e instanceof getWindow(e).Node:!1}function isElement(e){return hasWindow()?e instanceof Element||e instanceof getWindow(e).Element:!1}function isHTMLElement$2(e){return hasWindow()?e instanceof HTMLElement||e instanceof getWindow(e).HTMLElement:!1}function isShadowRoot(e){return!hasWindow()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof getWindow(e).ShadowRoot}const invalidOverflowDisplayValues=new Set(["inline","contents"]);function isOverflowElement(e){const{overflow:t,overflowX:n,overflowY:o,display:l}=getComputedStyle$1(e);return/auto|scroll|overlay|hidden|clip/.test(t+o+n)&&!invalidOverflowDisplayValues.has(l)}const tableElements=new Set(["table","td","th"]);function isTableElement(e){return tableElements.has(getNodeName(e))}const topLayerSelectors=[":popover-open",":modal"];function isTopLayer(e){return topLayerSelectors.some(t=>{try{return e.matches(t)}catch{return!1}})}const transformProperties=["transform","translate","scale","rotate","perspective"],willChangeValues=["transform","translate","scale","rotate","perspective","filter"],containValues=["paint","layout","strict","content"];function isContainingBlock(e){const t=isWebKit(),n=isElement(e)?getComputedStyle$1(e):e;return transformProperties.some(o=>n[o]?n[o]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||willChangeValues.some(o=>(n.willChange||"").includes(o))||containValues.some(o=>(n.contain||"").includes(o))}function getContainingBlock(e){let t=getParentNode(e);for(;isHTMLElement$2(t)&&!isLastTraversableNode(t);){if(isContainingBlock(t))return t;if(isTopLayer(t))return null;t=getParentNode(t)}return null}function isWebKit(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const lastTraversableNodeNames=new Set(["html","body","#document"]);function isLastTraversableNode(e){return lastTraversableNodeNames.has(getNodeName(e))}function getComputedStyle$1(e){return getWindow(e).getComputedStyle(e)}function getNodeScroll(e){return isElement(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function getParentNode(e){if(getNodeName(e)==="html")return e;const t=e.assignedSlot||e.parentNode||isShadowRoot(e)&&e.host||getDocumentElement(e);return isShadowRoot(t)?t.host:t}function getNearestOverflowAncestor(e){const t=getParentNode(e);return isLastTraversableNode(t)?e.ownerDocument?e.ownerDocument.body:e.body:isHTMLElement$2(t)&&isOverflowElement(t)?t:getNearestOverflowAncestor(t)}function getOverflowAncestors(e,t,n){var o;t===void 0&&(t=[]),n===void 0&&(n=!0);const l=getNearestOverflowAncestor(e),d=l===((o=e.ownerDocument)==null?void 0:o.body),f=getWindow(l);if(d){const g=getFrameElement(f);return t.concat(f,f.visualViewport||[],isOverflowElement(l)?l:[],g&&n?getOverflowAncestors(g):[])}return t.concat(l,getOverflowAncestors(l,[],n))}function getFrameElement(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function getCssDimensions(e){const t=getComputedStyle$1(e);let n=parseFloat(t.width)||0,o=parseFloat(t.height)||0;const l=isHTMLElement$2(e),d=l?e.offsetWidth:n,f=l?e.offsetHeight:o,g=round$1(n)!==d||round$1(o)!==f;return g&&(n=d,o=f),{width:n,height:o,$:g}}function unwrapElement(e){return isElement(e)?e:e.contextElement}function getScale(e){const t=unwrapElement(e);if(!isHTMLElement$2(t))return createCoords(1);const n=t.getBoundingClientRect(),{width:o,height:l,$:d}=getCssDimensions(t);let f=(d?round$1(n.width):n.width)/o,g=(d?round$1(n.height):n.height)/l;return(!f||!Number.isFinite(f))&&(f=1),(!g||!Number.isFinite(g))&&(g=1),{x:f,y:g}}const noOffsets=createCoords(0);function getVisualOffsets(e){const t=getWindow(e);return!isWebKit()||!t.visualViewport?noOffsets:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function shouldAddVisualOffsets(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==getWindow(e)?!1:t}function getBoundingClientRect(e,t,n,o){t===void 0&&(t=!1),n===void 0&&(n=!1);const l=e.getBoundingClientRect(),d=unwrapElement(e);let f=createCoords(1);t&&(o?isElement(o)&&(f=getScale(o)):f=getScale(e));const g=shouldAddVisualOffsets(d,n,o)?getVisualOffsets(d):createCoords(0);let b=(l.left+g.x)/f.x,_=(l.top+g.y)/f.y,S=l.width/f.x,R=l.height/f.y;if(d){const C=getWindow(d),E=o&&isElement(o)?getWindow(o):o;let A=C,M=getFrameElement(A);for(;M&&o&&E!==A;){const I=getScale(M),j=M.getBoundingClientRect(),F=getComputedStyle$1(M),z=j.left+(M.clientLeft+parseFloat(F.paddingLeft))*I.x,Q=j.top+(M.clientTop+parseFloat(F.paddingTop))*I.y;b*=I.x,_*=I.y,S*=I.x,R*=I.y,b+=z,_+=Q,A=getWindow(M),M=getFrameElement(A)}}return rectToClientRect({width:S,height:R,x:b,y:_})}function getWindowScrollBarX(e,t){const n=getNodeScroll(e).scrollLeft;return t?t.left+n:getBoundingClientRect(getDocumentElement(e)).left+n}function getHTMLOffset(e,t){const n=e.getBoundingClientRect(),o=n.left+t.scrollLeft-getWindowScrollBarX(e,n),l=n.top+t.scrollTop;return{x:o,y:l}}function convertOffsetParentRelativeRectToViewportRelativeRect(e){let{elements:t,rect:n,offsetParent:o,strategy:l}=e;const d=l==="fixed",f=getDocumentElement(o),g=t?isTopLayer(t.floating):!1;if(o===f||g&&d)return n;let b={scrollLeft:0,scrollTop:0},_=createCoords(1);const S=createCoords(0),R=isHTMLElement$2(o);if((R||!R&&!d)&&((getNodeName(o)!=="body"||isOverflowElement(f))&&(b=getNodeScroll(o)),isHTMLElement$2(o))){const E=getBoundingClientRect(o);_=getScale(o),S.x=E.x+o.clientLeft,S.y=E.y+o.clientTop}const C=f&&!R&&!d?getHTMLOffset(f,b):createCoords(0);return{width:n.width*_.x,height:n.height*_.y,x:n.x*_.x-b.scrollLeft*_.x+S.x+C.x,y:n.y*_.y-b.scrollTop*_.y+S.y+C.y}}function getClientRects(e){return Array.from(e.getClientRects())}function getDocumentRect(e){const t=getDocumentElement(e),n=getNodeScroll(e),o=e.ownerDocument.body,l=max$4(t.scrollWidth,t.clientWidth,o.scrollWidth,o.clientWidth),d=max$4(t.scrollHeight,t.clientHeight,o.scrollHeight,o.clientHeight);let f=-n.scrollLeft+getWindowScrollBarX(e);const g=-n.scrollTop;return getComputedStyle$1(o).direction==="rtl"&&(f+=max$4(t.clientWidth,o.clientWidth)-l),{width:l,height:d,x:f,y:g}}const SCROLLBAR_MAX=25;function getViewportRect(e,t){const n=getWindow(e),o=getDocumentElement(e),l=n.visualViewport;let d=o.clientWidth,f=o.clientHeight,g=0,b=0;if(l){d=l.width,f=l.height;const S=isWebKit();(!S||S&&t==="fixed")&&(g=l.offsetLeft,b=l.offsetTop)}const _=getWindowScrollBarX(o);if(_<=0){const S=o.ownerDocument,R=S.body,C=getComputedStyle(R),E=S.compatMode==="CSS1Compat"&&parseFloat(C.marginLeft)+parseFloat(C.marginRight)||0,A=Math.abs(o.clientWidth-R.clientWidth-E);A<=SCROLLBAR_MAX&&(d-=A)}else _<=SCROLLBAR_MAX&&(d+=_);return{width:d,height:f,x:g,y:b}}const absoluteOrFixed=new Set(["absolute","fixed"]);function getInnerBoundingClientRect(e,t){const n=getBoundingClientRect(e,!0,t==="fixed"),o=n.top+e.clientTop,l=n.left+e.clientLeft,d=isHTMLElement$2(e)?getScale(e):createCoords(1),f=e.clientWidth*d.x,g=e.clientHeight*d.y,b=l*d.x,_=o*d.y;return{width:f,height:g,x:b,y:_}}function getClientRectFromClippingAncestor(e,t,n){let o;if(t==="viewport")o=getViewportRect(e,n);else if(t==="document")o=getDocumentRect(getDocumentElement(e));else if(isElement(t))o=getInnerBoundingClientRect(t,n);else{const l=getVisualOffsets(e);o={x:t.x-l.x,y:t.y-l.y,width:t.width,height:t.height}}return rectToClientRect(o)}function hasFixedPositionAncestor(e,t){const n=getParentNode(e);return n===t||!isElement(n)||isLastTraversableNode(n)?!1:getComputedStyle$1(n).position==="fixed"||hasFixedPositionAncestor(n,t)}function getClippingElementAncestors(e,t){const n=t.get(e);if(n)return n;let o=getOverflowAncestors(e,[],!1).filter(g=>isElement(g)&&getNodeName(g)!=="body"),l=null;const d=getComputedStyle$1(e).position==="fixed";let f=d?getParentNode(e):e;for(;isElement(f)&&!isLastTraversableNode(f);){const g=getComputedStyle$1(f),b=isContainingBlock(f);!b&&g.position==="fixed"&&(l=null),(d?!b&&!l:!b&&g.position==="static"&&!!l&&absoluteOrFixed.has(l.position)||isOverflowElement(f)&&!b&&hasFixedPositionAncestor(e,f))?o=o.filter(S=>S!==f):l=g,f=getParentNode(f)}return t.set(e,o),o}function getClippingRect(e){let{element:t,boundary:n,rootBoundary:o,strategy:l}=e;const f=[...n==="clippingAncestors"?isTopLayer(t)?[]:getClippingElementAncestors(t,this._c):[].concat(n),o],g=f[0],b=f.reduce((_,S)=>{const R=getClientRectFromClippingAncestor(t,S,l);return _.top=max$4(R.top,_.top),_.right=min$4(R.right,_.right),_.bottom=min$4(R.bottom,_.bottom),_.left=max$4(R.left,_.left),_},getClientRectFromClippingAncestor(t,g,l));return{width:b.right-b.left,height:b.bottom-b.top,x:b.left,y:b.top}}function getDimensions(e){const{width:t,height:n}=getCssDimensions(e);return{width:t,height:n}}function getRectRelativeToOffsetParent(e,t,n){const o=isHTMLElement$2(t),l=getDocumentElement(t),d=n==="fixed",f=getBoundingClientRect(e,!0,d,t);let g={scrollLeft:0,scrollTop:0};const b=createCoords(0);function _(){b.x=getWindowScrollBarX(l)}if(o||!o&&!d)if((getNodeName(t)!=="body"||isOverflowElement(l))&&(g=getNodeScroll(t)),o){const E=getBoundingClientRect(t,!0,d,t);b.x=E.x+t.clientLeft,b.y=E.y+t.clientTop}else l&&_();d&&!o&&l&&_();const S=l&&!o&&!d?getHTMLOffset(l,g):createCoords(0),R=f.left+g.scrollLeft-b.x-S.x,C=f.top+g.scrollTop-b.y-S.y;return{x:R,y:C,width:f.width,height:f.height}}function isStaticPositioned(e){return getComputedStyle$1(e).position==="static"}function getTrueOffsetParent(e,t){if(!isHTMLElement$2(e)||getComputedStyle$1(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return getDocumentElement(e)===n&&(n=n.ownerDocument.body),n}function getOffsetParent(e,t){const n=getWindow(e);if(isTopLayer(e))return n;if(!isHTMLElement$2(e)){let l=getParentNode(e);for(;l&&!isLastTraversableNode(l);){if(isElement(l)&&!isStaticPositioned(l))return l;l=getParentNode(l)}return n}let o=getTrueOffsetParent(e,t);for(;o&&isTableElement(o)&&isStaticPositioned(o);)o=getTrueOffsetParent(o,t);return o&&isLastTraversableNode(o)&&isStaticPositioned(o)&&!isContainingBlock(o)?n:o||getContainingBlock(e)||n}const getElementRects=async function(e){const t=this.getOffsetParent||getOffsetParent,n=this.getDimensions,o=await n(e.floating);return{reference:getRectRelativeToOffsetParent(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:o.width,height:o.height}}};function isRTL(e){return getComputedStyle$1(e).direction==="rtl"}const platform={convertOffsetParentRelativeRectToViewportRelativeRect,getDocumentElement,getClippingRect,getOffsetParent,getElementRects,getClientRects,getDimensions,getScale,isElement,isRTL};function rectsAreEqual(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function observeMove(e,t){let n=null,o;const l=getDocumentElement(e);function d(){var g;clearTimeout(o),(g=n)==null||g.disconnect(),n=null}function f(g,b){g===void 0&&(g=!1),b===void 0&&(b=1),d();const _=e.getBoundingClientRect(),{left:S,top:R,width:C,height:E}=_;if(g||t(),!C||!E)return;const A=floor(R),M=floor(l.clientWidth-(S+C)),I=floor(l.clientHeight-(R+E)),j=floor(S),z={rootMargin:-A+"px "+-M+"px "+-I+"px "+-j+"px",threshold:max$4(0,min$4(1,b))||1};let Q=!0;function O(V){const te=V[0].intersectionRatio;if(te!==b){if(!Q)return f();te?f(!1,te):o=setTimeout(()=>{f(!1,1e-7)},1e3)}te===1&&!rectsAreEqual(_,e.getBoundingClientRect())&&f(),Q=!1}try{n=new IntersectionObserver(O,{...z,root:l.ownerDocument})}catch{n=new IntersectionObserver(O,z)}n.observe(e)}return f(!0),d}function autoUpdate(e,t,n,o){o===void 0&&(o={});const{ancestorScroll:l=!0,ancestorResize:d=!0,elementResize:f=typeof ResizeObserver=="function",layoutShift:g=typeof IntersectionObserver=="function",animationFrame:b=!1}=o,_=unwrapElement(e),S=l||d?[..._?getOverflowAncestors(_):[],...getOverflowAncestors(t)]:[];S.forEach(j=>{l&&j.addEventListener("scroll",n,{passive:!0}),d&&j.addEventListener("resize",n)});const R=_&&g?observeMove(_,n):null;let C=-1,E=null;f&&(E=new ResizeObserver(j=>{let[F]=j;F&&F.target===_&&E&&(E.unobserve(t),cancelAnimationFrame(C),C=requestAnimationFrame(()=>{var z;(z=E)==null||z.observe(t)})),n()}),_&&!b&&E.observe(_),E.observe(t));let A,M=b?getBoundingClientRect(e):null;b&&I();function I(){const j=getBoundingClientRect(e);M&&!rectsAreEqual(M,j)&&n(),M=j,A=requestAnimationFrame(I)}return n(),()=>{var j;S.forEach(F=>{l&&F.removeEventListener("scroll",n),d&&F.removeEventListener("resize",n)}),R==null||R(),(j=E)==null||j.disconnect(),E=null,b&&cancelAnimationFrame(A)}}const offset$1=offset$2,shift$2=shift$3,flip$1=flip$2,size$1=size$2,hide$1=hide$2,arrow$3=arrow$4,limitShift$1=limitShift$2,computePosition=(e,t,n)=>{const o=new Map,l={platform,...n},d={...l.platform,_c:o};return computePosition$1(e,t,{...l,platform:d})};var isClient=typeof document<"u",noop$2=function(){},index=isClient?React.useLayoutEffect:noop$2;function deepEqual$3(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,o,l;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(o=n;o--!==0;)if(!deepEqual$3(e[o],t[o]))return!1;return!0}if(l=Object.keys(e),n=l.length,n!==Object.keys(t).length)return!1;for(o=n;o--!==0;)if(!{}.hasOwnProperty.call(t,l[o]))return!1;for(o=n;o--!==0;){const d=l[o];if(!(d==="_owner"&&e.$$typeof)&&!deepEqual$3(e[d],t[d]))return!1}return!0}return e!==e&&t!==t}function getDPR(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function roundByDPR(e,t){const n=getDPR(e);return Math.round(t*n)/n}function useLatestRef(e){const t=React__namespace.useRef(e);return index(()=>{t.current=e}),t}function useFloating(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:o=[],platform:l,elements:{reference:d,floating:f}={},transform:g=!0,whileElementsMounted:b,open:_}=e,[S,R]=React__namespace.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[C,E]=React__namespace.useState(o);deepEqual$3(C,o)||E(o);const[A,M]=React__namespace.useState(null),[I,j]=React__namespace.useState(null),F=React__namespace.useCallback(Oe=>{Oe!==V.current&&(V.current=Oe,M(Oe))},[]),z=React__namespace.useCallback(Oe=>{Oe!==te.current&&(te.current=Oe,j(Oe))},[]),Q=d||A,O=f||I,V=React__namespace.useRef(null),te=React__namespace.useRef(null),ne=React__namespace.useRef(S),ae=b!=null,$e=useLatestRef(b),ge=useLatestRef(l),se=useLatestRef(_),je=React__namespace.useCallback(()=>{if(!V.current||!te.current)return;const Oe={placement:t,strategy:n,middleware:C};ge.current&&(Oe.platform=ge.current),computePosition(V.current,te.current,Oe).then(Be=>{const Ue={...Be,isPositioned:se.current!==!1};Ae.current&&!deepEqual$3(ne.current,Ue)&&(ne.current=Ue,ReactDOM__namespace.flushSync(()=>{R(Ue)}))})},[C,t,n,ge,se]);index(()=>{_===!1&&ne.current.isPositioned&&(ne.current.isPositioned=!1,R(Oe=>({...Oe,isPositioned:!1})))},[_]);const Ae=React__namespace.useRef(!1);index(()=>(Ae.current=!0,()=>{Ae.current=!1}),[]),index(()=>{if(Q&&(V.current=Q),O&&(te.current=O),Q&&O){if($e.current)return $e.current(Q,O,je);je()}},[Q,O,je,$e,ae]);const Ne=React__namespace.useMemo(()=>({reference:V,floating:te,setReference:F,setFloating:z}),[F,z]),Ve=React__namespace.useMemo(()=>({reference:Q,floating:O}),[Q,O]),Fe=React__namespace.useMemo(()=>{const Oe={position:n,left:0,top:0};if(!Ve.floating)return Oe;const Be=roundByDPR(Ve.floating,S.x),Ue=roundByDPR(Ve.floating,S.y);return g?{...Oe,transform:"translate("+Be+"px, "+Ue+"px)",...getDPR(Ve.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:Be,top:Ue}},[n,g,Ve.floating,S.x,S.y]);return React__namespace.useMemo(()=>({...S,update:je,refs:Ne,elements:Ve,floatingStyles:Fe}),[S,je,Ne,Ve,Fe])}const arrow$1=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:o,padding:l}=typeof e=="function"?e(n):e;return o&&t(o)?o.current!=null?arrow$3({element:o.current,padding:l}).fn(n):{}:o?arrow$3({element:o,padding:l}).fn(n):{}}}},offset=(e,t)=>({...offset$1(e),options:[e,t]}),shift$1=(e,t)=>({...shift$2(e),options:[e,t]}),limitShift=(e,t)=>({...limitShift$1(e),options:[e,t]}),flip=(e,t)=>({...flip$1(e),options:[e,t]}),size=(e,t)=>({...size$1(e),options:[e,t]}),hide=(e,t)=>({...hide$1(e),options:[e,t]}),arrow$2=(e,t)=>({...arrow$1(e),options:[e,t]});var NAME$3="Arrow",Arrow$1=React__namespace.forwardRef((e,t)=>{const{children:n,width:o=10,height:l=5,...d}=e;return jsxRuntime.jsx(Primitive$4.svg,{...d,ref:t,width:o,height:l,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:jsxRuntime.jsx("polygon",{points:"0,0 30,0 15,10"})})});Arrow$1.displayName=NAME$3;var Root$9=Arrow$1,POPPER_NAME="Popper",[createPopperContext,createPopperScope]=createContextScope$2(POPPER_NAME),[PopperProvider,usePopperContext]=createPopperContext(POPPER_NAME),Popper=e=>{const{__scopePopper:t,children:n}=e,[o,l]=React__namespace.useState(null);return jsxRuntime.jsx(PopperProvider,{scope:t,anchor:o,onAnchorChange:l,children:n})};Popper.displayName=POPPER_NAME;var ANCHOR_NAME$2="PopperAnchor",PopperAnchor=React__namespace.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:o,...l}=e,d=usePopperContext(ANCHOR_NAME$2,n),f=React__namespace.useRef(null),g=useComposedRefs(t,f),b=React__namespace.useRef(null);return React__namespace.useEffect(()=>{const _=b.current;b.current=(o==null?void 0:o.current)||f.current,_!==b.current&&d.onAnchorChange(b.current)}),o?null:jsxRuntime.jsx(Primitive$4.div,{...l,ref:g})});PopperAnchor.displayName=ANCHOR_NAME$2;var CONTENT_NAME$9="PopperContent",[PopperContentProvider,useContentContext]=createPopperContext(CONTENT_NAME$9),PopperContent=React__namespace.forwardRef((e,t)=>{var Ke,at,rt,st,lt,Ge;const{__scopePopper:n,side:o="bottom",sideOffset:l=0,align:d="center",alignOffset:f=0,arrowPadding:g=0,avoidCollisions:b=!0,collisionBoundary:_=[],collisionPadding:S=0,sticky:R="partial",hideWhenDetached:C=!1,updatePositionStrategy:E="optimized",onPlaced:A,...M}=e,I=usePopperContext(CONTENT_NAME$9,n),[j,F]=React__namespace.useState(null),z=useComposedRefs(t,Ct=>F(Ct)),[Q,O]=React__namespace.useState(null),V=useSize(Q),te=(V==null?void 0:V.width)??0,ne=(V==null?void 0:V.height)??0,ae=o+(d!=="center"?"-"+d:""),$e=typeof S=="number"?S:{top:0,right:0,bottom:0,left:0,...S},ge=Array.isArray(_)?_:[_],se=ge.length>0,je={padding:$e,boundary:ge.filter(isNotNull),altBoundary:se},{refs:Ae,floatingStyles:Ne,placement:Ve,isPositioned:Fe,middlewareData:Oe}=useFloating({strategy:"fixed",placement:ae,whileElementsMounted:(...Ct)=>autoUpdate(...Ct,{animationFrame:E==="always"}),elements:{reference:I.anchor},middleware:[offset({mainAxis:l+ne,alignmentAxis:f}),b&&shift$1({mainAxis:!0,crossAxis:!1,limiter:R==="partial"?limitShift():void 0,...je}),b&&flip({...je}),size({...je,apply:({elements:Ct,rects:tt,availableWidth:yt,availableHeight:ct})=>{const{width:Rt,height:Mt}=tt.reference,It=Ct.floating.style;It.setProperty("--radix-popper-available-width",`${yt}px`),It.setProperty("--radix-popper-available-height",`${ct}px`),It.setProperty("--radix-popper-anchor-width",`${Rt}px`),It.setProperty("--radix-popper-anchor-height",`${Mt}px`)}}),Q&&arrow$2({element:Q,padding:g}),transformOrigin({arrowWidth:te,arrowHeight:ne}),C&&hide({strategy:"referenceHidden",...je})]}),[Be,Ue]=getSideAndAlignFromPlacement(Ve),ze=useCallbackRef$1(A);useLayoutEffect2(()=>{Fe&&(ze==null||ze())},[Fe,ze]);const He=(Ke=Oe.arrow)==null?void 0:Ke.x,Qe=(at=Oe.arrow)==null?void 0:at.y,et=((rt=Oe.arrow)==null?void 0:rt.centerOffset)!==0,[Je,Ze]=React__namespace.useState();return useLayoutEffect2(()=>{j&&Ze(window.getComputedStyle(j).zIndex)},[j]),jsxRuntime.jsx("div",{ref:Ae.setFloating,"data-radix-popper-content-wrapper":"",style:{...Ne,transform:Fe?Ne.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:Je,"--radix-popper-transform-origin":[(st=Oe.transformOrigin)==null?void 0:st.x,(lt=Oe.transformOrigin)==null?void 0:lt.y].join(" "),...((Ge=Oe.hide)==null?void 0:Ge.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:jsxRuntime.jsx(PopperContentProvider,{scope:n,placedSide:Be,onArrowChange:O,arrowX:He,arrowY:Qe,shouldHideArrow:et,children:jsxRuntime.jsx(Primitive$4.div,{"data-side":Be,"data-align":Ue,...M,ref:z,style:{...M.style,animation:Fe?void 0:"none"}})})})});PopperContent.displayName=CONTENT_NAME$9;var ARROW_NAME$5="PopperArrow",OPPOSITE_SIDE={top:"bottom",right:"left",bottom:"top",left:"right"},PopperArrow=React__namespace.forwardRef(function(t,n){const{__scopePopper:o,...l}=t,d=useContentContext(ARROW_NAME$5,o),f=OPPOSITE_SIDE[d.placedSide];return jsxRuntime.jsx("span",{ref:d.onArrowChange,style:{position:"absolute",left:d.arrowX,top:d.arrowY,[f]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[d.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[d.placedSide],visibility:d.shouldHideArrow?"hidden":void 0},children:jsxRuntime.jsx(Root$9,{...l,ref:n,style:{...l.style,display:"block"}})})});PopperArrow.displayName=ARROW_NAME$5;function isNotNull(e){return e!==null}var transformOrigin=e=>({name:"transformOrigin",options:e,fn(t){var I,j,F;const{placement:n,rects:o,middlewareData:l}=t,f=((I=l.arrow)==null?void 0:I.centerOffset)!==0,g=f?0:e.arrowWidth,b=f?0:e.arrowHeight,[_,S]=getSideAndAlignFromPlacement(n),R={start:"0%",center:"50%",end:"100%"}[S],C=(((j=l.arrow)==null?void 0:j.x)??0)+g/2,E=(((F=l.arrow)==null?void 0:F.y)??0)+b/2;let A="",M="";return _==="bottom"?(A=f?R:`${C}px`,M=`${-b}px`):_==="top"?(A=f?R:`${C}px`,M=`${o.floating.height+b}px`):_==="right"?(A=`${-b}px`,M=f?R:`${E}px`):_==="left"&&(A=`${o.floating.width+b}px`,M=f?R:`${E}px`),{data:{x:A,y:M}}}});function getSideAndAlignFromPlacement(e){const[t,n="center"]=e.split("-");return[t,n]}var Root2$7=Popper,Anchor=PopperAnchor,Content$2=PopperContent,Arrow=PopperArrow;function createSlot$3(e){const t=createSlotClone$3(e),n=React__namespace.forwardRef((o,l)=>{const{children:d,...f}=o,g=React__namespace.Children.toArray(d),b=g.find(isSlottable$3);if(b){const _=b.props.children,S=g.map(R=>R===b?React__namespace.Children.count(_)>1?React__namespace.Children.only(null):React__namespace.isValidElement(_)?_.props.children:null:R);return jsxRuntime.jsx(t,{...f,ref:l,children:React__namespace.isValidElement(_)?React__namespace.cloneElement(_,void 0,S):null})}return jsxRuntime.jsx(t,{...f,ref:l,children:d})});return n.displayName=`${e}.Slot`,n}function createSlotClone$3(e){const t=React__namespace.forwardRef((n,o)=>{const{children:l,...d}=n;if(React__namespace.isValidElement(l)){const f=getElementRef$3(l),g=mergeProps$3(d,l.props);return l.type!==React__namespace.Fragment&&(g.ref=o?composeRefs(o,f):f),React__namespace.cloneElement(l,g)}return React__namespace.Children.count(l)>1?React__namespace.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var SLOTTABLE_IDENTIFIER$5=Symbol("radix.slottable");function isSlottable$3(e){return React__namespace.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===SLOTTABLE_IDENTIFIER$5}function mergeProps$3(e,t){const n={...t};for(const o in t){const l=e[o],d=t[o];/^on[A-Z]/.test(o)?l&&d?n[o]=(...g)=>{const b=d(...g);return l(...g),b}:l&&(n[o]=l):o==="style"?n[o]={...l,...d}:o==="className"&&(n[o]=[l,d].filter(Boolean).join(" "))}return{...e,...n}}function getElementRef$3(e){var o,l;let t=(o=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(l=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:l.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var SELECTION_KEYS$1=["Enter"," "],FIRST_KEYS=["ArrowDown","PageUp","Home"],LAST_KEYS=["ArrowUp","PageDown","End"],FIRST_LAST_KEYS=[...FIRST_KEYS,...LAST_KEYS],SUB_OPEN_KEYS={ltr:[...SELECTION_KEYS$1,"ArrowRight"],rtl:[...SELECTION_KEYS$1,"ArrowLeft"]},SUB_CLOSE_KEYS={ltr:["ArrowLeft"],rtl:["ArrowRight"]},MENU_NAME="Menu",[Collection$3,useCollection$3,createCollectionScope$3]=createCollection(MENU_NAME),[createMenuContext,createMenuScope]=createContextScope$2(MENU_NAME,[createCollectionScope$3,createPopperScope,createRovingFocusGroupScope]),usePopperScope$3=createPopperScope(),useRovingFocusGroupScope$1=createRovingFocusGroupScope(),[MenuProvider,useMenuContext]=createMenuContext(MENU_NAME),[MenuRootProvider,useMenuRootContext]=createMenuContext(MENU_NAME),Menu=e=>{const{__scopeMenu:t,open:n=!1,children:o,dir:l,onOpenChange:d,modal:f=!0}=e,g=usePopperScope$3(t),[b,_]=React__namespace.useState(null),S=React__namespace.useRef(!1),R=useCallbackRef$1(d),C=useDirection(l);return React__namespace.useEffect(()=>{const E=()=>{S.current=!0,document.addEventListener("pointerdown",A,{capture:!0,once:!0}),document.addEventListener("pointermove",A,{capture:!0,once:!0})},A=()=>S.current=!1;return document.addEventListener("keydown",E,{capture:!0}),()=>{document.removeEventListener("keydown",E,{capture:!0}),document.removeEventListener("pointerdown",A,{capture:!0}),document.removeEventListener("pointermove",A,{capture:!0})}},[]),jsxRuntime.jsx(Root2$7,{...g,children:jsxRuntime.jsx(MenuProvider,{scope:t,open:n,onOpenChange:R,content:b,onContentChange:_,children:jsxRuntime.jsx(MenuRootProvider,{scope:t,onClose:React__namespace.useCallback(()=>R(!1),[R]),isUsingKeyboardRef:S,dir:C,modal:f,children:o})})})};Menu.displayName=MENU_NAME;var ANCHOR_NAME$1="MenuAnchor",MenuAnchor=React__namespace.forwardRef((e,t)=>{const{__scopeMenu:n,...o}=e,l=usePopperScope$3(n);return jsxRuntime.jsx(Anchor,{...l,...o,ref:t})});MenuAnchor.displayName=ANCHOR_NAME$1;var PORTAL_NAME$5="MenuPortal",[PortalProvider$2,usePortalContext$2]=createMenuContext(PORTAL_NAME$5,{forceMount:void 0}),MenuPortal=e=>{const{__scopeMenu:t,forceMount:n,children:o,container:l}=e,d=useMenuContext(PORTAL_NAME$5,t);return jsxRuntime.jsx(PortalProvider$2,{scope:t,forceMount:n,children:jsxRuntime.jsx(Presence,{present:n||d.open,children:jsxRuntime.jsx(Portal$5,{asChild:!0,container:l,children:o})})})};MenuPortal.displayName=PORTAL_NAME$5;var CONTENT_NAME$8="MenuContent",[MenuContentProvider,useMenuContentContext]=createMenuContext(CONTENT_NAME$8),MenuContent=React__namespace.forwardRef((e,t)=>{const n=usePortalContext$2(CONTENT_NAME$8,e.__scopeMenu),{forceMount:o=n.forceMount,...l}=e,d=useMenuContext(CONTENT_NAME$8,e.__scopeMenu),f=useMenuRootContext(CONTENT_NAME$8,e.__scopeMenu);return jsxRuntime.jsx(Collection$3.Provider,{scope:e.__scopeMenu,children:jsxRuntime.jsx(Presence,{present:o||d.open,children:jsxRuntime.jsx(Collection$3.Slot,{scope:e.__scopeMenu,children:f.modal?jsxRuntime.jsx(MenuRootContentModal,{...l,ref:t}):jsxRuntime.jsx(MenuRootContentNonModal,{...l,ref:t})})})})}),MenuRootContentModal=React__namespace.forwardRef((e,t)=>{const n=useMenuContext(CONTENT_NAME$8,e.__scopeMenu),o=React__namespace.useRef(null),l=useComposedRefs(t,o);return React__namespace.useEffect(()=>{const d=o.current;if(d)return hideOthers(d)},[]),jsxRuntime.jsx(MenuContentImpl,{...e,ref:l,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:composeEventHandlers(e.onFocusOutside,d=>d.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)})}),MenuRootContentNonModal=React__namespace.forwardRef((e,t)=>{const n=useMenuContext(CONTENT_NAME$8,e.__scopeMenu);return jsxRuntime.jsx(MenuContentImpl,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)})}),Slot$3=createSlot$3("MenuContent.ScrollLock"),MenuContentImpl=React__namespace.forwardRef((e,t)=>{const{__scopeMenu:n,loop:o=!1,trapFocus:l,onOpenAutoFocus:d,onCloseAutoFocus:f,disableOutsidePointerEvents:g,onEntryFocus:b,onEscapeKeyDown:_,onPointerDownOutside:S,onFocusOutside:R,onInteractOutside:C,onDismiss:E,disableOutsideScroll:A,...M}=e,I=useMenuContext(CONTENT_NAME$8,n),j=useMenuRootContext(CONTENT_NAME$8,n),F=usePopperScope$3(n),z=useRovingFocusGroupScope$1(n),Q=useCollection$3(n),[O,V]=React__namespace.useState(null),te=React__namespace.useRef(null),ne=useComposedRefs(t,te,I.onContentChange),ae=React__namespace.useRef(0),$e=React__namespace.useRef(""),ge=React__namespace.useRef(0),se=React__namespace.useRef(null),je=React__namespace.useRef("right"),Ae=React__namespace.useRef(0),Ne=A?ReactRemoveScroll:React__namespace.Fragment,Ve=A?{as:Slot$3,allowPinchZoom:!0}:void 0,Fe=Be=>{var Ke,at;const Ue=$e.current+Be,ze=Q().filter(rt=>!rt.disabled),He=document.activeElement,Qe=(Ke=ze.find(rt=>rt.ref.current===He))==null?void 0:Ke.textValue,et=ze.map(rt=>rt.textValue),Je=getNextMatch(et,Ue,Qe),Ze=(at=ze.find(rt=>rt.textValue===Je))==null?void 0:at.ref.current;(function rt(st){$e.current=st,window.clearTimeout(ae.current),st!==""&&(ae.current=window.setTimeout(()=>rt(""),1e3))})(Ue),Ze&&setTimeout(()=>Ze.focus())};React__namespace.useEffect(()=>()=>window.clearTimeout(ae.current),[]),useFocusGuards();const Oe=React__namespace.useCallback(Be=>{var ze,He;return je.current===((ze=se.current)==null?void 0:ze.side)&&isPointerInGraceArea(Be,(He=se.current)==null?void 0:He.area)},[]);return jsxRuntime.jsx(MenuContentProvider,{scope:n,searchRef:$e,onItemEnter:React__namespace.useCallback(Be=>{Oe(Be)&&Be.preventDefault()},[Oe]),onItemLeave:React__namespace.useCallback(Be=>{var Ue;Oe(Be)||((Ue=te.current)==null||Ue.focus(),V(null))},[Oe]),onTriggerLeave:React__namespace.useCallback(Be=>{Oe(Be)&&Be.preventDefault()},[Oe]),pointerGraceTimerRef:ge,onPointerGraceIntentChange:React__namespace.useCallback(Be=>{se.current=Be},[]),children:jsxRuntime.jsx(Ne,{...Ve,children:jsxRuntime.jsx(FocusScope,{asChild:!0,trapped:l,onMountAutoFocus:composeEventHandlers(d,Be=>{var Ue;Be.preventDefault(),(Ue=te.current)==null||Ue.focus({preventScroll:!0})}),onUnmountAutoFocus:f,children:jsxRuntime.jsx(DismissableLayer,{asChild:!0,disableOutsidePointerEvents:g,onEscapeKeyDown:_,onPointerDownOutside:S,onFocusOutside:R,onInteractOutside:C,onDismiss:E,children:jsxRuntime.jsx(Root$c,{asChild:!0,...z,dir:j.dir,orientation:"vertical",loop:o,currentTabStopId:O,onCurrentTabStopIdChange:V,onEntryFocus:composeEventHandlers(b,Be=>{j.isUsingKeyboardRef.current||Be.preventDefault()}),preventScrollOnEntryFocus:!0,children:jsxRuntime.jsx(Content$2,{role:"menu","aria-orientation":"vertical","data-state":getOpenState(I.open),"data-radix-menu-content":"",dir:j.dir,...F,...M,ref:ne,style:{outline:"none",...M.style},onKeyDown:composeEventHandlers(M.onKeyDown,Be=>{const ze=Be.target.closest("[data-radix-menu-content]")===Be.currentTarget,He=Be.ctrlKey||Be.altKey||Be.metaKey,Qe=Be.key.length===1;ze&&(Be.key==="Tab"&&Be.preventDefault(),!He&&Qe&&Fe(Be.key));const et=te.current;if(Be.target!==et||!FIRST_LAST_KEYS.includes(Be.key))return;Be.preventDefault();const Ze=Q().filter(Ke=>!Ke.disabled).map(Ke=>Ke.ref.current);LAST_KEYS.includes(Be.key)&&Ze.reverse(),focusFirst$1(Ze)}),onBlur:composeEventHandlers(e.onBlur,Be=>{Be.currentTarget.contains(Be.target)||(window.clearTimeout(ae.current),$e.current="")}),onPointerMove:composeEventHandlers(e.onPointerMove,whenMouse(Be=>{const Ue=Be.target,ze=Ae.current!==Be.clientX;if(Be.currentTarget.contains(Ue)&&ze){const He=Be.clientX>Ae.current?"right":"left";je.current=He,Ae.current=Be.clientX}}))})})})})})})});MenuContent.displayName=CONTENT_NAME$8;var GROUP_NAME$2="MenuGroup",MenuGroup=React__namespace.forwardRef((e,t)=>{const{__scopeMenu:n,...o}=e;return jsxRuntime.jsx(Primitive$4.div,{role:"group",...o,ref:t})});MenuGroup.displayName=GROUP_NAME$2;var LABEL_NAME$2="MenuLabel",MenuLabel=React__namespace.forwardRef((e,t)=>{const{__scopeMenu:n,...o}=e;return jsxRuntime.jsx(Primitive$4.div,{...o,ref:t})});MenuLabel.displayName=LABEL_NAME$2;var ITEM_NAME$3="MenuItem",ITEM_SELECT="menu.itemSelect",MenuItem=React__namespace.forwardRef((e,t)=>{const{disabled:n=!1,onSelect:o,...l}=e,d=React__namespace.useRef(null),f=useMenuRootContext(ITEM_NAME$3,e.__scopeMenu),g=useMenuContentContext(ITEM_NAME$3,e.__scopeMenu),b=useComposedRefs(t,d),_=React__namespace.useRef(!1),S=()=>{const R=d.current;if(!n&&R){const C=new CustomEvent(ITEM_SELECT,{bubbles:!0,cancelable:!0});R.addEventListener(ITEM_SELECT,E=>o==null?void 0:o(E),{once:!0}),dispatchDiscreteCustomEvent(R,C),C.defaultPrevented?_.current=!1:f.onClose()}};return jsxRuntime.jsx(MenuItemImpl,{...l,ref:b,disabled:n,onClick:composeEventHandlers(e.onClick,S),onPointerDown:R=>{var C;(C=e.onPointerDown)==null||C.call(e,R),_.current=!0},onPointerUp:composeEventHandlers(e.onPointerUp,R=>{var C;_.current||(C=R.currentTarget)==null||C.click()}),onKeyDown:composeEventHandlers(e.onKeyDown,R=>{const C=g.searchRef.current!=="";n||C&&R.key===" "||SELECTION_KEYS$1.includes(R.key)&&(R.currentTarget.click(),R.preventDefault())})})});MenuItem.displayName=ITEM_NAME$3;var MenuItemImpl=React__namespace.forwardRef((e,t)=>{const{__scopeMenu:n,disabled:o=!1,textValue:l,...d}=e,f=useMenuContentContext(ITEM_NAME$3,n),g=useRovingFocusGroupScope$1(n),b=React__namespace.useRef(null),_=useComposedRefs(t,b),[S,R]=React__namespace.useState(!1),[C,E]=React__namespace.useState("");return React__namespace.useEffect(()=>{const A=b.current;A&&E((A.textContent??"").trim())},[d.children]),jsxRuntime.jsx(Collection$3.ItemSlot,{scope:n,disabled:o,textValue:l??C,children:jsxRuntime.jsx(Item$3,{asChild:!0,...g,focusable:!o,children:jsxRuntime.jsx(Primitive$4.div,{role:"menuitem","data-highlighted":S?"":void 0,"aria-disabled":o||void 0,"data-disabled":o?"":void 0,...d,ref:_,onPointerMove:composeEventHandlers(e.onPointerMove,whenMouse(A=>{o?f.onItemLeave(A):(f.onItemEnter(A),A.defaultPrevented||A.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:composeEventHandlers(e.onPointerLeave,whenMouse(A=>f.onItemLeave(A))),onFocus:composeEventHandlers(e.onFocus,()=>R(!0)),onBlur:composeEventHandlers(e.onBlur,()=>R(!1))})})})}),CHECKBOX_ITEM_NAME$1="MenuCheckboxItem",MenuCheckboxItem=React__namespace.forwardRef((e,t)=>{const{checked:n=!1,onCheckedChange:o,...l}=e;return jsxRuntime.jsx(ItemIndicatorProvider,{scope:e.__scopeMenu,checked:n,children:jsxRuntime.jsx(MenuItem,{role:"menuitemcheckbox","aria-checked":isIndeterminate$1(n)?"mixed":n,...l,ref:t,"data-state":getCheckedState(n),onSelect:composeEventHandlers(l.onSelect,()=>o==null?void 0:o(isIndeterminate$1(n)?!0:!n),{checkForDefaultPrevented:!1})})})});MenuCheckboxItem.displayName=CHECKBOX_ITEM_NAME$1;var RADIO_GROUP_NAME$1="MenuRadioGroup",[RadioGroupProvider,useRadioGroupContext]=createMenuContext(RADIO_GROUP_NAME$1,{value:void 0,onValueChange:()=>{}}),MenuRadioGroup=React__namespace.forwardRef((e,t)=>{const{value:n,onValueChange:o,...l}=e,d=useCallbackRef$1(o);return jsxRuntime.jsx(RadioGroupProvider,{scope:e.__scopeMenu,value:n,onValueChange:d,children:jsxRuntime.jsx(MenuGroup,{...l,ref:t})})});MenuRadioGroup.displayName=RADIO_GROUP_NAME$1;var RADIO_ITEM_NAME$1="MenuRadioItem",MenuRadioItem=React__namespace.forwardRef((e,t)=>{const{value:n,...o}=e,l=useRadioGroupContext(RADIO_ITEM_NAME$1,e.__scopeMenu),d=n===l.value;return jsxRuntime.jsx(ItemIndicatorProvider,{scope:e.__scopeMenu,checked:d,children:jsxRuntime.jsx(MenuItem,{role:"menuitemradio","aria-checked":d,...o,ref:t,"data-state":getCheckedState(d),onSelect:composeEventHandlers(o.onSelect,()=>{var f;return(f=l.onValueChange)==null?void 0:f.call(l,n)},{checkForDefaultPrevented:!1})})})});MenuRadioItem.displayName=RADIO_ITEM_NAME$1;var ITEM_INDICATOR_NAME$1="MenuItemIndicator",[ItemIndicatorProvider,useItemIndicatorContext]=createMenuContext(ITEM_INDICATOR_NAME$1,{checked:!1}),MenuItemIndicator=React__namespace.forwardRef((e,t)=>{const{__scopeMenu:n,forceMount:o,...l}=e,d=useItemIndicatorContext(ITEM_INDICATOR_NAME$1,n);return jsxRuntime.jsx(Presence,{present:o||isIndeterminate$1(d.checked)||d.checked===!0,children:jsxRuntime.jsx(Primitive$4.span,{...l,ref:t,"data-state":getCheckedState(d.checked)})})});MenuItemIndicator.displayName=ITEM_INDICATOR_NAME$1;var SEPARATOR_NAME$2="MenuSeparator",MenuSeparator=React__namespace.forwardRef((e,t)=>{const{__scopeMenu:n,...o}=e;return jsxRuntime.jsx(Primitive$4.div,{role:"separator","aria-orientation":"horizontal",...o,ref:t})});MenuSeparator.displayName=SEPARATOR_NAME$2;var ARROW_NAME$4="MenuArrow",MenuArrow=React__namespace.forwardRef((e,t)=>{const{__scopeMenu:n,...o}=e,l=usePopperScope$3(n);return jsxRuntime.jsx(Arrow,{...l,...o,ref:t})});MenuArrow.displayName=ARROW_NAME$4;var SUB_NAME="MenuSub",[MenuSubProvider,useMenuSubContext]=createMenuContext(SUB_NAME),MenuSub=e=>{const{__scopeMenu:t,children:n,open:o=!1,onOpenChange:l}=e,d=useMenuContext(SUB_NAME,t),f=usePopperScope$3(t),[g,b]=React__namespace.useState(null),[_,S]=React__namespace.useState(null),R=useCallbackRef$1(l);return React__namespace.useEffect(()=>(d.open===!1&&R(!1),()=>R(!1)),[d.open,R]),jsxRuntime.jsx(Root2$7,{...f,children:jsxRuntime.jsx(MenuProvider,{scope:t,open:o,onOpenChange:R,content:_,onContentChange:S,children:jsxRuntime.jsx(MenuSubProvider,{scope:t,contentId:useId(),triggerId:useId(),trigger:g,onTriggerChange:b,children:n})})})};MenuSub.displayName=SUB_NAME;var SUB_TRIGGER_NAME$1="MenuSubTrigger",MenuSubTrigger=React__namespace.forwardRef((e,t)=>{const n=useMenuContext(SUB_TRIGGER_NAME$1,e.__scopeMenu),o=useMenuRootContext(SUB_TRIGGER_NAME$1,e.__scopeMenu),l=useMenuSubContext(SUB_TRIGGER_NAME$1,e.__scopeMenu),d=useMenuContentContext(SUB_TRIGGER_NAME$1,e.__scopeMenu),f=React__namespace.useRef(null),{pointerGraceTimerRef:g,onPointerGraceIntentChange:b}=d,_={__scopeMenu:e.__scopeMenu},S=React__namespace.useCallback(()=>{f.current&&window.clearTimeout(f.current),f.current=null},[]);return React__namespace.useEffect(()=>S,[S]),React__namespace.useEffect(()=>{const R=g.current;return()=>{window.clearTimeout(R),b(null)}},[g,b]),jsxRuntime.jsx(MenuAnchor,{asChild:!0,..._,children:jsxRuntime.jsx(MenuItemImpl,{id:l.triggerId,"aria-haspopup":"menu","aria-expanded":n.open,"aria-controls":l.contentId,"data-state":getOpenState(n.open),...e,ref:composeRefs(t,l.onTriggerChange),onClick:R=>{var C;(C=e.onClick)==null||C.call(e,R),!(e.disabled||R.defaultPrevented)&&(R.currentTarget.focus(),n.open||n.onOpenChange(!0))},onPointerMove:composeEventHandlers(e.onPointerMove,whenMouse(R=>{d.onItemEnter(R),!R.defaultPrevented&&!e.disabled&&!n.open&&!f.current&&(d.onPointerGraceIntentChange(null),f.current=window.setTimeout(()=>{n.onOpenChange(!0),S()},100))})),onPointerLeave:composeEventHandlers(e.onPointerLeave,whenMouse(R=>{var E,A;S();const C=(E=n.content)==null?void 0:E.getBoundingClientRect();if(C){const M=(A=n.content)==null?void 0:A.dataset.side,I=M==="right",j=I?-5:5,F=C[I?"left":"right"],z=C[I?"right":"left"];d.onPointerGraceIntentChange({area:[{x:R.clientX+j,y:R.clientY},{x:F,y:C.top},{x:z,y:C.top},{x:z,y:C.bottom},{x:F,y:C.bottom}],side:M}),window.clearTimeout(g.current),g.current=window.setTimeout(()=>d.onPointerGraceIntentChange(null),300)}else{if(d.onTriggerLeave(R),R.defaultPrevented)return;d.onPointerGraceIntentChange(null)}})),onKeyDown:composeEventHandlers(e.onKeyDown,R=>{var E;const C=d.searchRef.current!=="";e.disabled||C&&R.key===" "||SUB_OPEN_KEYS[o.dir].includes(R.key)&&(n.onOpenChange(!0),(E=n.content)==null||E.focus(),R.preventDefault())})})})});MenuSubTrigger.displayName=SUB_TRIGGER_NAME$1;var SUB_CONTENT_NAME$1="MenuSubContent",MenuSubContent=React__namespace.forwardRef((e,t)=>{const n=usePortalContext$2(CONTENT_NAME$8,e.__scopeMenu),{forceMount:o=n.forceMount,...l}=e,d=useMenuContext(CONTENT_NAME$8,e.__scopeMenu),f=useMenuRootContext(CONTENT_NAME$8,e.__scopeMenu),g=useMenuSubContext(SUB_CONTENT_NAME$1,e.__scopeMenu),b=React__namespace.useRef(null),_=useComposedRefs(t,b);return jsxRuntime.jsx(Collection$3.Provider,{scope:e.__scopeMenu,children:jsxRuntime.jsx(Presence,{present:o||d.open,children:jsxRuntime.jsx(Collection$3.Slot,{scope:e.__scopeMenu,children:jsxRuntime.jsx(MenuContentImpl,{id:g.contentId,"aria-labelledby":g.triggerId,...l,ref:_,align:"start",side:f.dir==="rtl"?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:S=>{var R;f.isUsingKeyboardRef.current&&((R=b.current)==null||R.focus()),S.preventDefault()},onCloseAutoFocus:S=>S.preventDefault(),onFocusOutside:composeEventHandlers(e.onFocusOutside,S=>{S.target!==g.trigger&&d.onOpenChange(!1)}),onEscapeKeyDown:composeEventHandlers(e.onEscapeKeyDown,S=>{f.onClose(),S.preventDefault()}),onKeyDown:composeEventHandlers(e.onKeyDown,S=>{var E;const R=S.currentTarget.contains(S.target),C=SUB_CLOSE_KEYS[f.dir].includes(S.key);R&&C&&(d.onOpenChange(!1),(E=g.trigger)==null||E.focus(),S.preventDefault())})})})})})});MenuSubContent.displayName=SUB_CONTENT_NAME$1;function getOpenState(e){return e?"open":"closed"}function isIndeterminate$1(e){return e==="indeterminate"}function getCheckedState(e){return isIndeterminate$1(e)?"indeterminate":e?"checked":"unchecked"}function focusFirst$1(e){const t=document.activeElement;for(const n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function wrapArray$1(e,t){return e.map((n,o)=>e[(t+o)%e.length])}function getNextMatch(e,t,n){const l=t.length>1&&Array.from(t).every(_=>_===t[0])?t[0]:t,d=n?e.indexOf(n):-1;let f=wrapArray$1(e,Math.max(d,0));l.length===1&&(f=f.filter(_=>_!==n));const b=f.find(_=>_.toLowerCase().startsWith(l.toLowerCase()));return b!==n?b:void 0}function isPointInPolygon$1(e,t){const{x:n,y:o}=e;let l=!1;for(let d=0,f=t.length-1;d<t.length;f=d++){const g=t[d],b=t[f],_=g.x,S=g.y,R=b.x,C=b.y;S>o!=C>o&&n<(R-_)*(o-S)/(C-S)+_&&(l=!l)}return l}function isPointerInGraceArea(e,t){if(!t)return!1;const n={x:e.clientX,y:e.clientY};return isPointInPolygon$1(n,t)}function whenMouse(e){return t=>t.pointerType==="mouse"?e(t):void 0}var Root3$1=Menu,Anchor2$1=MenuAnchor,Portal$3=MenuPortal,Content2$6=MenuContent,Group$1=MenuGroup,Label$4=MenuLabel,Item2$1=MenuItem,CheckboxItem=MenuCheckboxItem,RadioGroup=MenuRadioGroup,RadioItem=MenuRadioItem,ItemIndicator$1=MenuItemIndicator,Separator$3=MenuSeparator,Arrow2=MenuArrow,Sub=MenuSub,SubTrigger=MenuSubTrigger,SubContent=MenuSubContent,DROPDOWN_MENU_NAME="DropdownMenu",[createDropdownMenuContext]=createContextScope$2(DROPDOWN_MENU_NAME,[createMenuScope]),useMenuScope=createMenuScope(),[DropdownMenuProvider,useDropdownMenuContext]=createDropdownMenuContext(DROPDOWN_MENU_NAME),DropdownMenu$1=e=>{const{__scopeDropdownMenu:t,children:n,dir:o,open:l,defaultOpen:d,onOpenChange:f,modal:g=!0}=e,b=useMenuScope(t),_=React__namespace.useRef(null),[S,R]=useControllableState({prop:l,defaultProp:d??!1,onChange:f,caller:DROPDOWN_MENU_NAME});return jsxRuntime.jsx(DropdownMenuProvider,{scope:t,triggerId:useId(),triggerRef:_,contentId:useId(),open:S,onOpenChange:R,onOpenToggle:React__namespace.useCallback(()=>R(C=>!C),[R]),modal:g,children:jsxRuntime.jsx(Root3$1,{...b,open:S,onOpenChange:R,dir:o,modal:g,children:n})})};DropdownMenu$1.displayName=DROPDOWN_MENU_NAME;var TRIGGER_NAME$8="DropdownMenuTrigger",DropdownMenuTrigger$1=React__namespace.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,disabled:o=!1,...l}=e,d=useDropdownMenuContext(TRIGGER_NAME$8,n),f=useMenuScope(n);return jsxRuntime.jsx(Anchor2$1,{asChild:!0,...f,children:jsxRuntime.jsx(Primitive$4.button,{type:"button",id:d.triggerId,"aria-haspopup":"menu","aria-expanded":d.open,"aria-controls":d.open?d.contentId:void 0,"data-state":d.open?"open":"closed","data-disabled":o?"":void 0,disabled:o,...l,ref:composeRefs(t,d.triggerRef),onPointerDown:composeEventHandlers(e.onPointerDown,g=>{!o&&g.button===0&&g.ctrlKey===!1&&(d.onOpenToggle(),d.open||g.preventDefault())}),onKeyDown:composeEventHandlers(e.onKeyDown,g=>{o||(["Enter"," "].includes(g.key)&&d.onOpenToggle(),g.key==="ArrowDown"&&d.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(g.key)&&g.preventDefault())})})})});DropdownMenuTrigger$1.displayName=TRIGGER_NAME$8;var PORTAL_NAME$4="DropdownMenuPortal",DropdownMenuPortal$1=e=>{const{__scopeDropdownMenu:t,...n}=e,o=useMenuScope(t);return jsxRuntime.jsx(Portal$3,{...o,...n})};DropdownMenuPortal$1.displayName=PORTAL_NAME$4;var CONTENT_NAME$7="DropdownMenuContent",DropdownMenuContent$1=React__namespace.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,l=useDropdownMenuContext(CONTENT_NAME$7,n),d=useMenuScope(n),f=React__namespace.useRef(!1);return jsxRuntime.jsx(Content2$6,{id:l.contentId,"aria-labelledby":l.triggerId,...d,...o,ref:t,onCloseAutoFocus:composeEventHandlers(e.onCloseAutoFocus,g=>{var b;f.current||(b=l.triggerRef.current)==null||b.focus(),f.current=!1,g.preventDefault()}),onInteractOutside:composeEventHandlers(e.onInteractOutside,g=>{const b=g.detail.originalEvent,_=b.button===0&&b.ctrlKey===!0,S=b.button===2||_;(!l.modal||S)&&(f.current=!0)}),style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});DropdownMenuContent$1.displayName=CONTENT_NAME$7;var GROUP_NAME$1="DropdownMenuGroup",DropdownMenuGroup$1=React__namespace.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,l=useMenuScope(n);return jsxRuntime.jsx(Group$1,{...l,...o,ref:t})});DropdownMenuGroup$1.displayName=GROUP_NAME$1;var LABEL_NAME$1="DropdownMenuLabel",DropdownMenuLabel$1=React__namespace.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,l=useMenuScope(n);return jsxRuntime.jsx(Label$4,{...l,...o,ref:t})});DropdownMenuLabel$1.displayName=LABEL_NAME$1;var ITEM_NAME$2="DropdownMenuItem",DropdownMenuItem$1=React__namespace.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,l=useMenuScope(n);return jsxRuntime.jsx(Item2$1,{...l,...o,ref:t})});DropdownMenuItem$1.displayName=ITEM_NAME$2;var CHECKBOX_ITEM_NAME="DropdownMenuCheckboxItem",DropdownMenuCheckboxItem$1=React__namespace.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,l=useMenuScope(n);return jsxRuntime.jsx(CheckboxItem,{...l,...o,ref:t})});DropdownMenuCheckboxItem$1.displayName=CHECKBOX_ITEM_NAME;var RADIO_GROUP_NAME="DropdownMenuRadioGroup",DropdownMenuRadioGroup$1=React__namespace.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,l=useMenuScope(n);return jsxRuntime.jsx(RadioGroup,{...l,...o,ref:t})});DropdownMenuRadioGroup$1.displayName=RADIO_GROUP_NAME;var RADIO_ITEM_NAME="DropdownMenuRadioItem",DropdownMenuRadioItem$1=React__namespace.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,l=useMenuScope(n);return jsxRuntime.jsx(RadioItem,{...l,...o,ref:t})});DropdownMenuRadioItem$1.displayName=RADIO_ITEM_NAME;var INDICATOR_NAME$2="DropdownMenuItemIndicator",DropdownMenuItemIndicator=React__namespace.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,l=useMenuScope(n);return jsxRuntime.jsx(ItemIndicator$1,{...l,...o,ref:t})});DropdownMenuItemIndicator.displayName=INDICATOR_NAME$2;var SEPARATOR_NAME$1="DropdownMenuSeparator",DropdownMenuSeparator$1=React__namespace.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,l=useMenuScope(n);return jsxRuntime.jsx(Separator$3,{...l,...o,ref:t})});DropdownMenuSeparator$1.displayName=SEPARATOR_NAME$1;var ARROW_NAME$3="DropdownMenuArrow",DropdownMenuArrow=React__namespace.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,l=useMenuScope(n);return jsxRuntime.jsx(Arrow2,{...l,...o,ref:t})});DropdownMenuArrow.displayName=ARROW_NAME$3;var DropdownMenuSub$1=e=>{const{__scopeDropdownMenu:t,children:n,open:o,onOpenChange:l,defaultOpen:d}=e,f=useMenuScope(t),[g,b]=useControllableState({prop:o,defaultProp:d??!1,onChange:l,caller:"DropdownMenuSub"});return jsxRuntime.jsx(Sub,{...f,open:g,onOpenChange:b,children:n})},SUB_TRIGGER_NAME="DropdownMenuSubTrigger",DropdownMenuSubTrigger$1=React__namespace.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,l=useMenuScope(n);return jsxRuntime.jsx(SubTrigger,{...l,...o,ref:t})});DropdownMenuSubTrigger$1.displayName=SUB_TRIGGER_NAME;var SUB_CONTENT_NAME="DropdownMenuSubContent",DropdownMenuSubContent$1=React__namespace.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,l=useMenuScope(n);return jsxRuntime.jsx(SubContent,{...l,...o,ref:t,style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});DropdownMenuSubContent$1.displayName=SUB_CONTENT_NAME;var Root2$6=DropdownMenu$1,Trigger$5=DropdownMenuTrigger$1,Portal2$1=DropdownMenuPortal$1,Content2$5=DropdownMenuContent$1,Group2=DropdownMenuGroup$1,Label2=DropdownMenuLabel$1,Item2=DropdownMenuItem$1,CheckboxItem2=DropdownMenuCheckboxItem$1,RadioGroup2=DropdownMenuRadioGroup$1,RadioItem2=DropdownMenuRadioItem$1,ItemIndicator2=DropdownMenuItemIndicator,Separator2=DropdownMenuSeparator$1,Sub2=DropdownMenuSub$1,SubTrigger2=DropdownMenuSubTrigger$1,SubContent2=DropdownMenuSubContent$1;const DropdownMenu=Root2$6,DropdownMenuTrigger=Trigger$5,DropdownMenuGroup=Group2,DropdownMenuPortal=Portal2$1,DropdownMenuSub=Sub2,DropdownMenuRadioGroup=RadioGroup2,DropdownMenuSubTrigger=React__namespace.forwardRef(({className:e,inset:t,children:n,...o},l)=>jsxRuntime.jsxs(SubTrigger2,{ref:l,className:cn("flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent data-[state=open]:bg-accent [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",t&&"pl-8",e),...o,children:[n,jsxRuntime.jsx(ChevronRight,{className:"ml-auto"})]}));DropdownMenuSubTrigger.displayName=SubTrigger2.displayName;const DropdownMenuSubContent=React__namespace.forwardRef(({className:e,...t},n)=>jsxRuntime.jsx(SubContent2,{ref:n,className:cn("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 origin-[--radix-dropdown-menu-content-transform-origin]",e),...t}));DropdownMenuSubContent.displayName=SubContent2.displayName;const DropdownMenuContent=React__namespace.forwardRef(({className:e,sideOffset:t=4,...n},o)=>jsxRuntime.jsx(Portal2$1,{children:jsxRuntime.jsx(Content2$5,{ref:o,sideOffset:t,className:cn("z-50 max-h-[var(--radix-dropdown-menu-content-available-height)] min-w-[8rem] overflow-y-auto overflow-x-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md","data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 origin-[--radix-dropdown-menu-content-transform-origin]",e),...n})}));DropdownMenuContent.displayName=Content2$5.displayName;const DropdownMenuItem=React__namespace.forwardRef(({className:e,inset:t,...n},o)=>jsxRuntime.jsx(Item2,{ref:o,className:cn("relative flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&>svg]:size-4 [&>svg]:shrink-0",t&&"pl-8",e),...n}));DropdownMenuItem.displayName=Item2.displayName;const DropdownMenuCheckboxItem=React__namespace.forwardRef(({className:e,children:t,checked:n,...o},l)=>jsxRuntime.jsxs(CheckboxItem2,{ref:l,className:cn("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),checked:n,...o,children:[jsxRuntime.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:jsxRuntime.jsx(ItemIndicator2,{children:jsxRuntime.jsx(Check,{className:"h-4 w-4"})})}),t]}));DropdownMenuCheckboxItem.displayName=CheckboxItem2.displayName;const DropdownMenuRadioItem=React__namespace.forwardRef(({className:e,children:t,...n},o)=>jsxRuntime.jsxs(RadioItem2,{ref:o,className:cn("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...n,children:[jsxRuntime.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:jsxRuntime.jsx(ItemIndicator2,{children:jsxRuntime.jsx(Circle,{className:"h-2 w-2 fill-current"})})}),t]}));DropdownMenuRadioItem.displayName=RadioItem2.displayName;const DropdownMenuLabel=React__namespace.forwardRef(({className:e,inset:t,...n},o)=>jsxRuntime.jsx(Label2,{ref:o,className:cn("px-2 py-1.5 text-sm font-semibold",t&&"pl-8",e),...n}));DropdownMenuLabel.displayName=Label2.displayName;const DropdownMenuSeparator=React__namespace.forwardRef(({className:e,...t},n)=>jsxRuntime.jsx(Separator2,{ref:n,className:cn("-mx-1 my-1 h-px bg-muted",e),...t}));DropdownMenuSeparator.displayName=Separator2.displayName;const DropdownMenuShortcut=({className:e,...t})=>jsxRuntime.jsx("span",{className:cn("ml-auto text-xs tracking-widest opacity-60",e),...t});DropdownMenuShortcut.displayName="DropdownMenuShortcut";function ProductInventoryGrid({inventory:e,showBinLocation:t,className:n}){const o=(F,z,Q=!1,O=!0)=>{const V=F.WarehouseType==="Fulfillment Center",te=V?"bg-white":"bg-white/70 text-gray-600",ne=O&&z>0?"border-t":"",ae=Q?"border-r":"",$e=F.Status??"Unknown",se=!($e==="Active");return jsxRuntime.jsxs("article",{"aria-labelledby":`wh-${F.WarehouseId}-name`,className:`p-3 text-sm ${ne} ${ae} ${te}`,children:[jsxRuntime.jsxs("div",{className:"flex items-start justify-between",children:[jsxRuntime.jsxs("div",{className:"flex items-center gap-3",children:[jsxRuntime.jsx("h3",{id:`wh-${F.WarehouseId}-name`,className:`text-sm font-medium ${V?"text-gray-900":"text-gray-800"}`,children:F.Name}),jsxRuntime.jsxs("span",{className:`inline-flex items-center gap-2 rounded-full px-2 py-0.5 text-xs font-semibold ${se?"bg-yellow-100 text-yellow-800 ring-1 ring-yellow-200":V?"bg-emerald-100 text-emerald-800 ring-1 ring-emerald-200":"bg-gray-100 text-gray-700"}`,"aria-hidden":"false",title:se?`Status: ${$e}`:V?"Fulfillment Center":"Satellite Warehouse",children:[V?jsxRuntime.jsx(Warehouse,{className:"h-3 w-3","aria-hidden":"true"}):jsxRuntime.jsx(Truck,{className:`h-3 w-3 ${se?"opacity-95":"opacity-80"}`,"aria-hidden":"true"}),jsxRuntime.jsx("span",{className:"sr-only",children:se?`Status: ${$e}`:F.WarehouseType?`${F.WarehouseType} warehouse`:"Warehouse"}),jsxRuntime.jsx("span",{"aria-hidden":"true",children:se?$e:F.WarehouseType||(V?"Fulfillment Center":"Satellite")})]})]}),jsxRuntime.jsx("div",{className:"text-right",children:jsxRuntime.jsx("div",{className:"text-sm font-medium",children:formatNumber(F.AvailableQuantity??0)})})]}),jsxRuntime.jsxs("div",{className:"flex justify-between mt-1 text-xs text-gray-600",children:[jsxRuntime.jsx("span",{children:"Expecting"}),jsxRuntime.jsx("span",{children:F.PurchaseOrderQuantity?formatNumber(F.PurchaseOrderQuantity):"—"})]}),t&&jsxRuntime.jsxs("div",{className:"flex justify-between mt-1 text-xs text-gray-600",children:[jsxRuntime.jsx("span",{children:"Bin Location"}),jsxRuntime.jsx("span",{children:F.BinLocation||"—"})]})]},`warehouse-${F.WarehouseId}`)},l=["MTL","TOR"],d=["VAN","EDM"],f=[...e].sort((F,z)=>(F.Name||"").localeCompare(z.Name||"")),g=f.filter(F=>F.Country==="US"),b=f.filter(F=>F.Country==="CA"),_=f.filter(F=>d.includes(F.WarehouseId||"")),S=f.filter(F=>l.includes(F.WarehouseId||"")),R=b.filter(F=>!l.includes(F.WarehouseId||"")&&!d.includes(F.WarehouseId||"")),C=F=>F.reduce((z,Q)=>z+(Q.AvailableQuantity||0),0),E=C(b),A=C(S),M=C(_),I=C(g),j=E+I;return jsxRuntime.jsxs("div",{className:`border rounded-md overflow-hidden ${n??""}`,children:[b.length>0&&g.length>0&&jsxRuntime.jsxs("div",{className:"grid grid-cols-2 border-b",children:[jsxRuntime.jsxs("div",{className:"p-3 font-semibold text-sm flex justify-between",children:[jsxRuntime.jsx("span",{children:"Total"}),jsxRuntime.jsx("span",{children:j})]}),jsxRuntime.jsx("div",{className:"p-3"})]}),b.length>0&&jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsxs("div",{className:"grid grid-cols-2 border-b bg-gray-50",children:[jsxRuntime.jsxs("div",{className:"p-3 font-semibold text-sm flex justify-between",children:[jsxRuntime.jsx("span",{children:"Canada"}),jsxRuntime.jsx("span",{children:formatNumber(E)})]}),jsxRuntime.jsx("div",{className:"p-3"})]}),jsxRuntime.jsxs("div",{className:"grid grid-cols-2",children:[jsxRuntime.jsxs("div",{className:"border-r",children:[jsxRuntime.jsxs("div",{className:"p-3 font-semibold text-sm flex justify-between",children:[jsxRuntime.jsx("span",{children:"West"}),jsxRuntime.jsx("span",{children:formatNumber(M)})]}),_.map((F,z)=>o(F,z))]}),jsxRuntime.jsxs("div",{children:[jsxRuntime.jsxs("div",{className:"p-3 font-semibold text-sm flex justify-between",children:[jsxRuntime.jsx("span",{children:"East"}),jsxRuntime.jsx("span",{children:formatNumber(A)})]}),S.map((F,z)=>o(F,z))]})]}),R.length>0&&jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx("div",{className:"border-t p-3 font-semibold text-sm",children:jsxRuntime.jsx("span",{children:"Other"})}),jsxRuntime.jsx("div",{className:"grid grid-cols-2",children:R.map((F,z)=>o(F,z,z%2===0,!0))})]})]}),g.length>0&&jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsxs("div",{className:"grid grid-cols-2 border-t bg-gray-50",children:[jsxRuntime.jsxs("div",{className:"p-3 font-semibold text-sm flex justify-between",children:[jsxRuntime.jsx("span",{children:"United States"}),jsxRuntime.jsx("span",{children:formatNumber(I)})]}),jsxRuntime.jsx("div",{className:"p-3"})]}),jsxRuntime.jsx("div",{className:"grid grid-cols-2",children:g.map((F,z)=>o(F,z,z%2===0,!0))})]}),e.length===0&&jsxRuntime.jsx("div",{className:"p-6 text-center text-gray-500",children:"No inventory information available"})]})}var REACT_LAZY_TYPE=Symbol.for("react.lazy"),use=React__namespace[" use ".trim().toString()];function isPromiseLike(e){return typeof e=="object"&&e!==null&&"then"in e}function isLazyComponent(e){return e!=null&&typeof e=="object"&&"$$typeof"in e&&e.$$typeof===REACT_LAZY_TYPE&&"_payload"in e&&isPromiseLike(e._payload)}function createSlot$2(e){const t=createSlotClone$2(e),n=React__namespace.forwardRef((o,l)=>{let{children:d,...f}=o;isLazyComponent(d)&&typeof use=="function"&&(d=use(d._payload));const g=React__namespace.Children.toArray(d),b=g.find(isSlottable$2);if(b){const _=b.props.children,S=g.map(R=>R===b?React__namespace.Children.count(_)>1?React__namespace.Children.only(null):React__namespace.isValidElement(_)?_.props.children:null:R);return jsxRuntime.jsx(t,{...f,ref:l,children:React__namespace.isValidElement(_)?React__namespace.cloneElement(_,void 0,S):null})}return jsxRuntime.jsx(t,{...f,ref:l,children:d})});return n.displayName=`${e}.Slot`,n}var Slot$2=createSlot$2("Slot");function createSlotClone$2(e){const t=React__namespace.forwardRef((n,o)=>{let{children:l,...d}=n;if(isLazyComponent(l)&&typeof use=="function"&&(l=use(l._payload)),React__namespace.isValidElement(l)){const f=getElementRef$2(l),g=mergeProps$2(d,l.props);return l.type!==React__namespace.Fragment&&(g.ref=o?composeRefs(o,f):f),React__namespace.cloneElement(l,g)}return React__namespace.Children.count(l)>1?React__namespace.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var SLOTTABLE_IDENTIFIER$4=Symbol("radix.slottable");function isSlottable$2(e){return React__namespace.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===SLOTTABLE_IDENTIFIER$4}function mergeProps$2(e,t){const n={...t};for(const o in t){const l=e[o],d=t[o];/^on[A-Z]/.test(o)?l&&d?n[o]=(...g)=>{const b=d(...g);return l(...g),b}:l&&(n[o]=l):o==="style"?n[o]={...l,...d}:o==="className"&&(n[o]=[l,d].filter(Boolean).join(" "))}return{...e,...n}}function getElementRef$2(e){var o,l;let t=(o=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(l=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:l.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}const falsyToString=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,cx=clsx,cva=(e,t)=>n=>{var o;if((t==null?void 0:t.variants)==null)return cx(e,n==null?void 0:n.class,n==null?void 0:n.className);const{variants:l,defaultVariants:d}=t,f=Object.keys(l).map(_=>{const S=n==null?void 0:n[_],R=d==null?void 0:d[_];if(S===null)return null;const C=falsyToString(S)||falsyToString(R);return l[_][C]}),g=n&&Object.entries(n).reduce((_,S)=>{let[R,C]=S;return C===void 0||(_[R]=C),_},{}),b=t==null||(o=t.compoundVariants)===null||o===void 0?void 0:o.reduce((_,S)=>{let{class:R,className:C,...E}=S;return Object.entries(E).every(A=>{let[M,I]=A;return Array.isArray(I)?I.includes({...d,...g}[M]):{...d,...g}[M]===I})?[..._,R,C]:_},[]);return cx(e,f,b,n==null?void 0:n.class,n==null?void 0:n.className)},buttonVariants=cva("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-hidden focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0 cursor-pointer",{variants:{variant:{default:"bg-primary text-primary-foreground shadow-sm hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground shadow-xs hover:bg-destructive/90",outline:"border border-input text-foreground bg-background shadow-xs hover:bg-accent hover:text-accent-foreground",defaultOutline:"border border-red-600/30 text-red-600 bg-background shadow-xs hover:bg-red-600/5 ",secondary:"bg-secondary text-secondary-foreground shadow-xs hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline",blue:"bg-randmar-blue text-gray-100 shadow-sm hover:bg-randmar-blue/90",red:"bg-randmar-red text-gray-100 shadow-sm hover:bg-randmar-red/90",purple:"bg-randmar-purple text-gray-100 shadow-sm hover:bg-randmar-purple/90",none:""},size:{default:"h-9 px-4 py-2",sm:"h-8 rounded-md px-3 text-xs",lg:"h-10 rounded-md px-8",icon:"h-9 w-9"}},defaultVariants:{variant:"default",size:"default"}}),Button$1=React__namespace.forwardRef(({className:e,variant:t,size:n,asChild:o=!1,confirmationDialog:l,onClick:d,...f},g)=>{const b=o?Slot$2:"button";if(!l)return jsxRuntime.jsx(b,{className:cn(buttonVariants({variant:t,size:n,className:e})),ref:g,onClick:d,...f});d&&console.warn("Button: You provided both onClick and confirmationDialog props. The onClick prop will be ignored. Use the onConfirm callback in confirmationDialog instead.");const{title:_,content:S,onConfirm:R,confirmText:C="Confirm",cancelText:E="Cancel"}=l,A=()=>{R()};return jsxRuntime.jsxs(Dialog,{children:[jsxRuntime.jsx(DialogTrigger,{asChild:!0,children:jsxRuntime.jsx(b,{className:cn(buttonVariants({variant:t,size:n,className:e})),ref:g,...f})}),jsxRuntime.jsxs(DialogContent,{children:[jsxRuntime.jsxs(DialogHeader,{children:[jsxRuntime.jsx(DialogTitle,{children:_}),jsxRuntime.jsx(DialogDescription,{children:S})]}),jsxRuntime.jsxs(DialogFooter,{className:"flex justify-end gap-2 pt-4",children:[jsxRuntime.jsx(DialogClose,{asChild:!0,children:jsxRuntime.jsx(Button$1,{variant:"outline",children:E})}),jsxRuntime.jsx(DialogClose,{asChild:!0,children:jsxRuntime.jsx(Button$1,{onClick:A,children:C})})]})]})]})});Button$1.displayName="Button";var SLOTTABLE_IDENTIFIER$3=Symbol("radix.slottable");function createSlottable$1(e){const t=({children:n})=>jsxRuntime.jsx(jsxRuntime.Fragment,{children:n});return t.displayName=`${e}.Slottable`,t.__radixId=SLOTTABLE_IDENTIFIER$3,t}var VISUALLY_HIDDEN_STYLES=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),NAME$2="VisuallyHidden",VisuallyHidden=React__namespace.forwardRef((e,t)=>jsxRuntime.jsx(Primitive$4.span,{...e,ref:t,style:{...VISUALLY_HIDDEN_STYLES,...e.style}}));VisuallyHidden.displayName=NAME$2;var Root$8=VisuallyHidden,[createTooltipContext]=createContextScope$2("Tooltip",[createPopperScope]),usePopperScope$2=createPopperScope(),PROVIDER_NAME$1="TooltipProvider",DEFAULT_DELAY_DURATION=700,TOOLTIP_OPEN="tooltip.open",[TooltipProviderContextProvider,useTooltipProviderContext]=createTooltipContext(PROVIDER_NAME$1),TooltipProvider$1=e=>{const{__scopeTooltip:t,delayDuration:n=DEFAULT_DELAY_DURATION,skipDelayDuration:o=300,disableHoverableContent:l=!1,children:d}=e,f=React__namespace.useRef(!0),g=React__namespace.useRef(!1),b=React__namespace.useRef(0);return React__namespace.useEffect(()=>{const _=b.current;return()=>window.clearTimeout(_)},[]),jsxRuntime.jsx(TooltipProviderContextProvider,{scope:t,isOpenDelayedRef:f,delayDuration:n,onOpen:React__namespace.useCallback(()=>{window.clearTimeout(b.current),f.current=!1},[]),onClose:React__namespace.useCallback(()=>{window.clearTimeout(b.current),b.current=window.setTimeout(()=>f.current=!0,o)},[o]),isPointerInTransitRef:g,onPointerInTransitChange:React__namespace.useCallback(_=>{g.current=_},[]),disableHoverableContent:l,children:d})};TooltipProvider$1.displayName=PROVIDER_NAME$1;var TOOLTIP_NAME="Tooltip",[TooltipContextProvider,useTooltipContext]=createTooltipContext(TOOLTIP_NAME),Tooltip$2=e=>{const{__scopeTooltip:t,children:n,open:o,defaultOpen:l,onOpenChange:d,disableHoverableContent:f,delayDuration:g}=e,b=useTooltipProviderContext(TOOLTIP_NAME,e.__scopeTooltip),_=usePopperScope$2(t),[S,R]=React__namespace.useState(null),C=useId(),E=React__namespace.useRef(0),A=f??b.disableHoverableContent,M=g??b.delayDuration,I=React__namespace.useRef(!1),[j,F]=useControllableState({prop:o,defaultProp:l??!1,onChange:te=>{te?(b.onOpen(),document.dispatchEvent(new CustomEvent(TOOLTIP_OPEN))):b.onClose(),d==null||d(te)},caller:TOOLTIP_NAME}),z=React__namespace.useMemo(()=>j?I.current?"delayed-open":"instant-open":"closed",[j]),Q=React__namespace.useCallback(()=>{window.clearTimeout(E.current),E.current=0,I.current=!1,F(!0)},[F]),O=React__namespace.useCallback(()=>{window.clearTimeout(E.current),E.current=0,F(!1)},[F]),V=React__namespace.useCallback(()=>{window.clearTimeout(E.current),E.current=window.setTimeout(()=>{I.current=!0,F(!0),E.current=0},M)},[M,F]);return React__namespace.useEffect(()=>()=>{E.current&&(window.clearTimeout(E.current),E.current=0)},[]),jsxRuntime.jsx(Root2$7,{..._,children:jsxRuntime.jsx(TooltipContextProvider,{scope:t,contentId:C,open:j,stateAttribute:z,trigger:S,onTriggerChange:R,onTriggerEnter:React__namespace.useCallback(()=>{b.isOpenDelayedRef.current?V():Q()},[b.isOpenDelayedRef,V,Q]),onTriggerLeave:React__namespace.useCallback(()=>{A?O():(window.clearTimeout(E.current),E.current=0)},[O,A]),onOpen:Q,onClose:O,disableHoverableContent:A,children:n})})};Tooltip$2.displayName=TOOLTIP_NAME;var TRIGGER_NAME$7="TooltipTrigger",TooltipTrigger$1=React__namespace.forwardRef((e,t)=>{const{__scopeTooltip:n,...o}=e,l=useTooltipContext(TRIGGER_NAME$7,n),d=useTooltipProviderContext(TRIGGER_NAME$7,n),f=usePopperScope$2(n),g=React__namespace.useRef(null),b=useComposedRefs(t,g,l.onTriggerChange),_=React__namespace.useRef(!1),S=React__namespace.useRef(!1),R=React__namespace.useCallback(()=>_.current=!1,[]);return React__namespace.useEffect(()=>()=>document.removeEventListener("pointerup",R),[R]),jsxRuntime.jsx(Anchor,{asChild:!0,...f,children:jsxRuntime.jsx(Primitive$4.button,{"aria-describedby":l.open?l.contentId:void 0,"data-state":l.stateAttribute,...o,ref:b,onPointerMove:composeEventHandlers(e.onPointerMove,C=>{C.pointerType!=="touch"&&!S.current&&!d.isPointerInTransitRef.current&&(l.onTriggerEnter(),S.current=!0)}),onPointerLeave:composeEventHandlers(e.onPointerLeave,()=>{l.onTriggerLeave(),S.current=!1}),onPointerDown:composeEventHandlers(e.onPointerDown,()=>{l.open&&l.onClose(),_.current=!0,document.addEventListener("pointerup",R,{once:!0})}),onFocus:composeEventHandlers(e.onFocus,()=>{_.current||l.onOpen()}),onBlur:composeEventHandlers(e.onBlur,l.onClose),onClick:composeEventHandlers(e.onClick,l.onClose)})})});TooltipTrigger$1.displayName=TRIGGER_NAME$7;var PORTAL_NAME$3="TooltipPortal",[PortalProvider$1,usePortalContext$1]=createTooltipContext(PORTAL_NAME$3,{forceMount:void 0}),TooltipPortal=e=>{const{__scopeTooltip:t,forceMount:n,children:o,container:l}=e,d=useTooltipContext(PORTAL_NAME$3,t);return jsxRuntime.jsx(PortalProvider$1,{scope:t,forceMount:n,children:jsxRuntime.jsx(Presence,{present:n||d.open,children:jsxRuntime.jsx(Portal$5,{asChild:!0,container:l,children:o})})})};TooltipPortal.displayName=PORTAL_NAME$3;var CONTENT_NAME$6="TooltipContent",TooltipContent$1=React__namespace.forwardRef((e,t)=>{const n=usePortalContext$1(CONTENT_NAME$6,e.__scopeTooltip),{forceMount:o=n.forceMount,side:l="top",...d}=e,f=useTooltipContext(CONTENT_NAME$6,e.__scopeTooltip);return jsxRuntime.jsx(Presence,{present:o||f.open,children:f.disableHoverableContent?jsxRuntime.jsx(TooltipContentImpl,{side:l,...d,ref:t}):jsxRuntime.jsx(TooltipContentHoverable,{side:l,...d,ref:t})})}),TooltipContentHoverable=React__namespace.forwardRef((e,t)=>{const n=useTooltipContext(CONTENT_NAME$6,e.__scopeTooltip),o=useTooltipProviderContext(CONTENT_NAME$6,e.__scopeTooltip),l=React__namespace.useRef(null),d=useComposedRefs(t,l),[f,g]=React__namespace.useState(null),{trigger:b,onClose:_}=n,S=l.current,{onPointerInTransitChange:R}=o,C=React__namespace.useCallback(()=>{g(null),R(!1)},[R]),E=React__namespace.useCallback((A,M)=>{const I=A.currentTarget,j={x:A.clientX,y:A.clientY},F=getExitSideFromRect(j,I.getBoundingClientRect()),z=getPaddedExitPoints(j,F),Q=getPointsFromRect(M.getBoundingClientRect()),O=getHull([...z,...Q]);g(O),R(!0)},[R]);return React__namespace.useEffect(()=>()=>C(),[C]),React__namespace.useEffect(()=>{if(b&&S){const A=I=>E(I,S),M=I=>E(I,b);return b.addEventListener("pointerleave",A),S.addEventListener("pointerleave",M),()=>{b.removeEventListener("pointerleave",A),S.removeEventListener("pointerleave",M)}}},[b,S,E,C]),React__namespace.useEffect(()=>{if(f){const A=M=>{const I=M.target,j={x:M.clientX,y:M.clientY},F=(b==null?void 0:b.contains(I))||(S==null?void 0:S.contains(I)),z=!isPointInPolygon(j,f);F?C():z&&(C(),_())};return document.addEventListener("pointermove",A),()=>document.removeEventListener("pointermove",A)}},[b,S,f,_,C]),jsxRuntime.jsx(TooltipContentImpl,{...e,ref:d})}),[VisuallyHiddenContentContextProvider,useVisuallyHiddenContentContext]=createTooltipContext(TOOLTIP_NAME,{isInside:!1}),Slottable$1=createSlottable$1("TooltipContent"),TooltipContentImpl=React__namespace.forwardRef((e,t)=>{const{__scopeTooltip:n,children:o,"aria-label":l,onEscapeKeyDown:d,onPointerDownOutside:f,...g}=e,b=useTooltipContext(CONTENT_NAME$6,n),_=usePopperScope$2(n),{onClose:S}=b;return React__namespace.useEffect(()=>(document.addEventListener(TOOLTIP_OPEN,S),()=>document.removeEventListener(TOOLTIP_OPEN,S)),[S]),React__namespace.useEffect(()=>{if(b.trigger){const R=C=>{const E=C.target;E!=null&&E.contains(b.trigger)&&S()};return window.addEventListener("scroll",R,{capture:!0}),()=>window.removeEventListener("scroll",R,{capture:!0})}},[b.trigger,S]),jsxRuntime.jsx(DismissableLayer,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:d,onPointerDownOutside:f,onFocusOutside:R=>R.preventDefault(),onDismiss:S,children:jsxRuntime.jsxs(Content$2,{"data-state":b.stateAttribute,..._,...g,ref:t,style:{...g.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[jsxRuntime.jsx(Slottable$1,{children:o}),jsxRuntime.jsx(VisuallyHiddenContentContextProvider,{scope:n,isInside:!0,children:jsxRuntime.jsx(Root$8,{id:b.contentId,role:"tooltip",children:l||o})})]})})});TooltipContent$1.displayName=CONTENT_NAME$6;var ARROW_NAME$2="TooltipArrow",TooltipArrow=React__namespace.forwardRef((e,t)=>{const{__scopeTooltip:n,...o}=e,l=usePopperScope$2(n);return useVisuallyHiddenContentContext(ARROW_NAME$2,n).isInside?null:jsxRuntime.jsx(Arrow,{...l,...o,ref:t})});TooltipArrow.displayName=ARROW_NAME$2;function getExitSideFromRect(e,t){const n=Math.abs(t.top-e.y),o=Math.abs(t.bottom-e.y),l=Math.abs(t.right-e.x),d=Math.abs(t.left-e.x);switch(Math.min(n,o,l,d)){case d:return"left";case l:return"right";case n:return"top";case o:return"bottom";default:throw new Error("unreachable")}}function getPaddedExitPoints(e,t,n=5){const o=[];switch(t){case"top":o.push({x:e.x-n,y:e.y+n},{x:e.x+n,y:e.y+n});break;case"bottom":o.push({x:e.x-n,y:e.y-n},{x:e.x+n,y:e.y-n});break;case"left":o.push({x:e.x+n,y:e.y-n},{x:e.x+n,y:e.y+n});break;case"right":o.push({x:e.x-n,y:e.y-n},{x:e.x-n,y:e.y+n});break}return o}function getPointsFromRect(e){const{top:t,right:n,bottom:o,left:l}=e;return[{x:l,y:t},{x:n,y:t},{x:n,y:o},{x:l,y:o}]}function isPointInPolygon(e,t){const{x:n,y:o}=e;let l=!1;for(let d=0,f=t.length-1;d<t.length;f=d++){const g=t[d],b=t[f],_=g.x,S=g.y,R=b.x,C=b.y;S>o!=C>o&&n<(R-_)*(o-S)/(C-S)+_&&(l=!l)}return l}function getHull(e){const t=e.slice();return t.sort((n,o)=>n.x<o.x?-1:n.x>o.x?1:n.y<o.y?-1:n.y>o.y?1:0),getHullPresorted(t)}function getHullPresorted(e){if(e.length<=1)return e.slice();const t=[];for(let o=0;o<e.length;o++){const l=e[o];for(;t.length>=2;){const d=t[t.length-1],f=t[t.length-2];if((d.x-f.x)*(l.y-f.y)>=(d.y-f.y)*(l.x-f.x))t.pop();else break}t.push(l)}t.pop();const n=[];for(let o=e.length-1;o>=0;o--){const l=e[o];for(;n.length>=2;){const d=n[n.length-1],f=n[n.length-2];if((d.x-f.x)*(l.y-f.y)>=(d.y-f.y)*(l.x-f.x))n.pop();else break}n.push(l)}return n.pop(),t.length===1&&n.length===1&&t[0].x===n[0].x&&t[0].y===n[0].y?t:t.concat(n)}var Provider$1=TooltipProvider$1,Root3=Tooltip$2,Trigger$4=TooltipTrigger$1,Portal$2=TooltipPortal,Content2$4=TooltipContent$1;const TooltipProvider=Provider$1,Tooltip$1=Root3,TooltipTrigger=Trigger$4,TooltipContent=React__namespace.forwardRef(({className:e,sideOffset:t=4,...n},o)=>jsxRuntime.jsx(Portal$2,{children:jsxRuntime.jsx(Content2$4,{ref:o,sideOffset:t,className:cn("z-50 overflow-hidden rounded-md bg-primary px-3 py-1.5 text-xs text-primary-foreground animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...n})}));TooltipContent.displayName=Content2$4.displayName;const Input=React__namespace.forwardRef(({className:e,type:t,mask:n,onChange:o,placeholder:l,...d},f)=>{const[g,b]=React__namespace.useState(!1),_=React__namespace.useRef(null),R=l||(n==="phone"?"(999) 999-9999":n==="postal-code-ca"?"A9A 9A9":n==="zip-code-us"?"99999":""),C=()=>n==="phone"?"Only enter numbers. Formatting will be added automatically.":n==="postal-code-ca"?"Enter letters and numbers only. Spacing will be applied automatically.":n==="zip-code-us"?"Only enter numbers. Formatting will be added automatically.":"",E=()=>{b(!0),_.current&&clearTimeout(_.current),_.current=setTimeout(()=>{b(!1)},3e3)};React__namespace.useEffect(()=>()=>{_.current&&clearTimeout(_.current)},[]);const A=M=>{if(n){const I=M.target.value;let j=I;if(I.length>0){const F=I[I.length-1];/[^a-zA-Z0-9]/.test(F)&&(console.log("Non-alphanumeric detected:",F),E())}if(n==="phone"){const F=I.replace(/\D/g,"");F.length<=3?j=F:F.length<=6?j=`(${F.slice(0,3)}) ${F.slice(3)}`:j=`(${F.slice(0,3)}) ${F.slice(3,6)}-${F.slice(6,10)}`}else if(n==="postal-code-ca"){const F=I.replace(/[^a-zA-Z0-9]/g,"").toUpperCase();let z="";for(let Q=0;Q<Math.min(F.length,6);Q++){const O=F[Q];Q===0||Q===2||Q===4?/[A-Z]/.test(O)&&(z+=O):(Q===1||Q===3||Q===5)&&/[0-9]/.test(O)&&(z+=O)}z.length<=3?j=z:j=`${z.slice(0,3)} ${z.slice(3,6)}`}else if(n==="zip-code-us"){const F=I.replace(/\D/g,"");F.length<=5?j=F:j=`${F.slice(0,5)}-${F.slice(5,9)}`}M.target.value=j}o==null||o(M)};return jsxRuntime.jsx(TooltipProvider,{children:jsxRuntime.jsxs(Tooltip$1,{open:g&&!!n,children:[jsxRuntime.jsx(TooltipTrigger,{asChild:!0,children:jsxRuntime.jsx("input",{type:t,className:cn("flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-base shadow-xs transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-hidden focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",e),onChange:A,placeholder:R,ref:f,...d})}),jsxRuntime.jsx(TooltipContent,{side:"top",className:"bg-sidebar text-sidebar-foreground",children:C()})]})})});Input.displayName="Input";var NODES$3=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Primitive$3=NODES$3.reduce((e,t)=>{const n=createSlot$2(`Primitive.${t}`),o=React__namespace.forwardRef((l,d)=>{const{asChild:f,...g}=l,b=f?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),jsxRuntime.jsx(b,{...g,ref:d})});return o.displayName=`Primitive.${t}`,{...e,[t]:o}},{}),NAME$1="Separator",DEFAULT_ORIENTATION="horizontal",ORIENTATIONS=["horizontal","vertical"],Separator$2=React__namespace.forwardRef((e,t)=>{const{decorative:n,orientation:o=DEFAULT_ORIENTATION,...l}=e,d=isValidOrientation(o)?o:DEFAULT_ORIENTATION,g=n?{role:"none"}:{"aria-orientation":d==="vertical"?d:void 0,role:"separator"};return jsxRuntime.jsx(Primitive$3.div,{"data-orientation":d,...g,...l,ref:t})});Separator$2.displayName=NAME$1;function isValidOrientation(e){return ORIENTATIONS.includes(e)}var Root$7=Separator$2;const Separator$1=React__namespace.forwardRef(({className:e,orientation:t="horizontal",decorative:n=!0,...o},l)=>jsxRuntime.jsx(Root$7,{ref:l,decorative:n,orientation:t,className:cn("shrink-0 bg-border",t==="horizontal"?"h-[1px] w-full":"h-full w-[1px]",e),...o}));Separator$1.displayName=Root$7.displayName;const Sheet=Root$a,SheetTrigger=Trigger$6,SheetClose=Close$1,SheetPortal=Portal$4,SheetOverlay=React__namespace.forwardRef(({className:e,...t},n)=>jsxRuntime.jsx(Overlay,{className:cn("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t,ref:n}));SheetOverlay.displayName=Overlay.displayName;const sheetVariants=cva("fixed z-50 gap-4 bg-background p-6 shadow-lg transition ease-in-out data-[state=closed]:duration-300 data-[state=open]:duration-500 data-[state=open]:animate-in data-[state=closed]:animate-out",{variants:{side:{top:"inset-x-0 top-0 border-b data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top",bottom:"inset-x-0 bottom-0 border-t data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom",left:"inset-y-0 left-0 h-full w-3/4 border-r data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left sm:max-w-sm",right:"inset-y-0 right-0 h-full w-3/4 border-l data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right sm:max-w-sm"}},defaultVariants:{side:"right"}}),SheetContent=React__namespace.forwardRef(({side:e="right",className:t,children:n,...o},l)=>jsxRuntime.jsxs(SheetPortal,{children:[jsxRuntime.jsx(SheetOverlay,{}),jsxRuntime.jsxs(Content$3,{ref:l,className:cn(sheetVariants({side:e}),t),...o,children:[jsxRuntime.jsxs(Close$1,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-hidden focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-secondary",children:[jsxRuntime.jsx(X$1,{className:"h-4 w-4"}),jsxRuntime.jsx("span",{className:"sr-only",children:"Close"})]}),n]})]}));SheetContent.displayName=Content$3.displayName;const SheetHeader=({className:e,...t})=>jsxRuntime.jsx("div",{className:cn("flex flex-col space-y-2 text-center sm:text-left",e),...t});SheetHeader.displayName="SheetHeader";const SheetFooter=({className:e,...t})=>jsxRuntime.jsx("div",{className:cn("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});SheetFooter.displayName="SheetFooter";const SheetTitle=React__namespace.forwardRef(({className:e,...t},n)=>jsxRuntime.jsx(Title$1,{ref:n,className:cn("text-lg font-semibold text-foreground",e),...t}));SheetTitle.displayName=Title$1.displayName;const SheetDescription=React__namespace.forwardRef(({className:e,...t},n)=>jsxRuntime.jsx(Description$1,{ref:n,className:cn("text-sm text-muted-foreground",e),...t}));SheetDescription.displayName=Description$1.displayName;function useIntersectionObserver({elementRef:e,threshold:t=0,rootMargin:n="0px",freezeOnceVisible:o=!1}){const[l,d]=React.useState(!1);return React.useEffect(()=>{const f=e.current;if(!f){d(!1);return}const g=new IntersectionObserver(([b])=>{const _=b.isIntersecting;o&&_?(d(!0),g.unobserve(f)):d(_)},{threshold:t,rootMargin:n});return g.observe(f),()=>{g.unobserve(f)}},[e,t,n,o]),l}function formatProdErrorMessage$1(e){return`Minified Redux error #${e}; visit https://redux.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}var randomString=()=>Math.random().toString(36).substring(7).split("").join("."),ActionTypes={INIT:`@@redux/INIT${randomString()}`,REPLACE:`@@redux/REPLACE${randomString()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${randomString()}`},actionTypes_default=ActionTypes;function isPlainObject$4(e){if(typeof e!="object"||e===null)return!1;let t=e;for(;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t||Object.getPrototypeOf(e)===null}function miniKindOf(e){if(e===void 0)return"undefined";if(e===null)return"null";const t=typeof e;switch(t){case"boolean":case"string":case"number":case"symbol":case"function":return t}if(Array.isArray(e))return"array";if(isDate$1(e))return"date";if(isError(e))return"error";const n=ctorName(e);switch(n){case"Symbol":case"Promise":case"WeakMap":case"WeakSet":case"Map":case"Set":return n}return Object.prototype.toString.call(e).slice(8,-1).toLowerCase().replace(/\s/g,"")}function ctorName(e){return typeof e.constructor=="function"?e.constructor.name:null}function isError(e){return e instanceof Error||typeof e.message=="string"&&e.constructor&&typeof e.constructor.stackTraceLimit=="number"}function isDate$1(e){return e instanceof Date?!0:typeof e.toDateString=="function"&&typeof e.getDate=="function"&&typeof e.setDate=="function"}function kindOf(e){let t=typeof e;return process.env.NODE_ENV!=="production"&&(t=miniKindOf(e)),t}function warning(e){typeof console<"u"&&typeof console.error=="function"&&console.error(e);try{throw new Error(e)}catch{}}function getUnexpectedStateShapeWarningMessage(e,t,n,o){const l=Object.keys(t),d=n&&n.type===actionTypes_default.INIT?"preloadedState argument passed to createStore":"previous state received by the reducer";if(l.length===0)return"Store does not have a valid reducer. Make sure the argument passed to combineReducers is an object whose values are reducers.";if(!isPlainObject$4(e))return`The ${d} has unexpected type of "${kindOf(e)}". Expected argument to be an object with the following keys: "${l.join('", "')}"`;const f=Object.keys(e).filter(g=>!t.hasOwnProperty(g)&&!o[g]);if(f.forEach(g=>{o[g]=!0}),!(n&&n.type===actionTypes_default.REPLACE)&&f.length>0)return`Unexpected ${f.length>1?"keys":"key"} "${f.join('", "')}" found in ${d}. Expected to find one of the known reducer keys instead: "${l.join('", "')}". Unexpected keys will be ignored.`}function assertReducerShape(e){Object.keys(e).forEach(t=>{const n=e[t];if(typeof n(void 0,{type:actionTypes_default.INIT})>"u")throw new Error(process.env.NODE_ENV==="production"?formatProdErrorMessage$1(12):`The slice reducer for key "${t}" returned undefined during initialization. If the state passed to the reducer is undefined, you must explicitly return the initial state. The initial state may not be undefined. If you don't want to set a value for this reducer, you can use null instead of undefined.`);if(typeof n(void 0,{type:actionTypes_default.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(process.env.NODE_ENV==="production"?formatProdErrorMessage$1(13):`The slice reducer for key "${t}" returned undefined when probed with a random type. Don't try to handle '${actionTypes_default.INIT}' or other actions in "redux/*" namespace. They are considered private. Instead, you must return the current state for any unknown actions, unless it is undefined, in which case you must return the initial state, regardless of the action type. The initial state may not be undefined, but can be null.`)})}function combineReducers(e){const t=Object.keys(e),n={};for(let f=0;f<t.length;f++){const g=t[f];process.env.NODE_ENV!=="production"&&typeof e[g]>"u"&&warning(`No reducer provided for key "${g}"`),typeof e[g]=="function"&&(n[g]=e[g])}const o=Object.keys(n);let l;process.env.NODE_ENV!=="production"&&(l={});let d;try{assertReducerShape(n)}catch(f){d=f}return function(g={},b){if(d)throw d;if(process.env.NODE_ENV!=="production"){const R=getUnexpectedStateShapeWarningMessage(g,n,b,l);R&&warning(R)}let _=!1;const S={};for(let R=0;R<o.length;R++){const C=o[R],E=n[C],A=g[C],M=E(A,b);if(typeof M>"u"){const I=b&&b.type;throw new Error(process.env.NODE_ENV==="production"?formatProdErrorMessage$1(14):`When called with an action of type ${I?`"${String(I)}"`:"(unknown type)"}, the slice reducer for key "${C}" returned undefined. To ignore an action, you must explicitly return the previous state. If you want this reducer to hold no value, you can return null instead of undefined.`)}S[C]=M,_=_||M!==A}return _=_||o.length!==Object.keys(g).length,_?S:g}}function isAction(e){return isPlainObject$4(e)&&"type"in e&&typeof e.type=="string"}var NOTHING=Symbol.for("immer-nothing"),DRAFTABLE=Symbol.for("immer-draftable"),DRAFT_STATE=Symbol.for("immer-state"),errors=process.env.NODE_ENV!=="production"?[function(e){return`The plugin for '${e}' has not been loaded into Immer. To enable the plugin, import and call \`enable${e}()\` when initializing your application.`},function(e){return`produce can only be called on things that are draftable: plain objects, arrays, Map, Set or classes that are marked with '[immerable]: true'. Got '${e}'`},"This object has been frozen and should not be mutated",function(e){return"Cannot use a proxy that has been revoked. Did you pass an object from inside an immer function to an async process? "+e},"An immer producer returned a new value *and* modified its draft. Either return a new value *or* modify the draft.","Immer forbids circular references","The first or second argument to `produce` must be a function","The third argument to `produce` must be a function or undefined","First argument to `createDraft` must be a plain object, an array, or an immerable object","First argument to `finishDraft` must be a draft returned by `createDraft`",function(e){return`'current' expects a draft, got: ${e}`},"Object.defineProperty() cannot be used on an Immer draft","Object.setPrototypeOf() cannot be used on an Immer draft","Immer only supports deleting array indices","Immer only supports setting array indices and the 'length' property",function(e){return`'original' expects a draft, got: ${e}`}]:[];function die(e,...t){if(process.env.NODE_ENV!=="production"){const n=errors[e],o=typeof n=="function"?n.apply(null,t):n;throw new Error(`[Immer] ${o}`)}throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var getPrototypeOf$1=Object.getPrototypeOf;function isDraft(e){return!!e&&!!e[DRAFT_STATE]}function isDraftable(e){var t;return e?isPlainObject$3(e)||Array.isArray(e)||!!e[DRAFTABLE]||!!((t=e.constructor)!=null&&t[DRAFTABLE])||isMap(e)||isSet(e):!1}var objectCtorString=Object.prototype.constructor.toString(),cachedCtorStrings=new WeakMap;function isPlainObject$3(e){if(!e||typeof e!="object")return!1;const t=Object.getPrototypeOf(e);if(t===null||t===Object.prototype)return!0;const n=Object.hasOwnProperty.call(t,"constructor")&&t.constructor;if(n===Object)return!0;if(typeof n!="function")return!1;let o=cachedCtorStrings.get(n);return o===void 0&&(o=Function.toString.call(n),cachedCtorStrings.set(n,o)),o===objectCtorString}function original(e){return isDraft(e)||die(15,e),e[DRAFT_STATE].base_}function each(e,t,n=!0){getArchtype(e)===0?(n?Reflect.ownKeys(e):Object.keys(e)).forEach(l=>{t(l,e[l],e)}):e.forEach((o,l)=>t(l,o,e))}function getArchtype(e){const t=e[DRAFT_STATE];return t?t.type_:Array.isArray(e)?1:isMap(e)?2:isSet(e)?3:0}function has$1(e,t){return getArchtype(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function get$3(e,t){return getArchtype(e)===2?e.get(t):e[t]}function set$2(e,t,n){const o=getArchtype(e);o===2?e.set(t,n):o===3?e.add(n):e[t]=n}function is$1(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}function isMap(e){return e instanceof Map}function isSet(e){return e instanceof Set}function latest(e){return e.copy_||e.base_}function shallowCopy(e,t){if(isMap(e))return new Map(e);if(isSet(e))return new Set(e);if(Array.isArray(e))return Array.prototype.slice.call(e);const n=isPlainObject$3(e);if(t===!0||t==="class_only"&&!n){const o=Object.getOwnPropertyDescriptors(e);delete o[DRAFT_STATE];let l=Reflect.ownKeys(o);for(let d=0;d<l.length;d++){const f=l[d],g=o[f];g.writable===!1&&(g.writable=!0,g.configurable=!0),(g.get||g.set)&&(o[f]={configurable:!0,writable:!0,enumerable:g.enumerable,value:e[f]})}return Object.create(getPrototypeOf$1(e),o)}else{const o=getPrototypeOf$1(e);if(o!==null&&n)return{...e};const l=Object.create(o);return Object.assign(l,e)}}function freeze$1(e,t=!1){return isFrozen$1(e)||isDraft(e)||!isDraftable(e)||(getArchtype(e)>1&&Object.defineProperties(e,{set:dontMutateMethodOverride,add:dontMutateMethodOverride,clear:dontMutateMethodOverride,delete:dontMutateMethodOverride}),Object.freeze(e),t&&Object.values(e).forEach(n=>freeze$1(n,!0))),e}function dontMutateFrozenCollections(){die(2)}var dontMutateMethodOverride={value:dontMutateFrozenCollections};function isFrozen$1(e){return e===null||typeof e!="object"?!0:Object.isFrozen(e)}var plugins={};function getPlugin(e){const t=plugins[e];return t||die(0,e),t}function loadPlugin(e,t){plugins[e]||(plugins[e]=t)}var currentScope;function getCurrentScope(){return currentScope}function createScope(e,t){return{drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function usePatchesInScope(e,t){t&&(getPlugin("Patches"),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function revokeScope(e){leaveScope(e),e.drafts_.forEach(revokeDraft),e.drafts_=null}function leaveScope(e){e===currentScope&&(currentScope=e.parent_)}function enterScope(e){return currentScope=createScope(currentScope,e)}function revokeDraft(e){const t=e[DRAFT_STATE];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function processResult(e,t){t.unfinalizedDrafts_=t.drafts_.length;const n=t.drafts_[0];return e!==void 0&&e!==n?(n[DRAFT_STATE].modified_&&(revokeScope(t),die(4)),isDraftable(e)&&(e=finalize(t,e),t.parent_||maybeFreeze(t,e)),t.patches_&&getPlugin("Patches").generateReplacementPatches_(n[DRAFT_STATE].base_,e,t.patches_,t.inversePatches_)):e=finalize(t,n,[]),revokeScope(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==NOTHING?e:void 0}function finalize(e,t,n){if(isFrozen$1(t))return t;const o=e.immer_.shouldUseStrictIteration(),l=t[DRAFT_STATE];if(!l)return each(t,(d,f)=>finalizeProperty(e,l,t,d,f,n),o),t;if(l.scope_!==e)return t;if(!l.modified_)return maybeFreeze(e,l.base_,!0),l.base_;if(!l.finalized_){l.finalized_=!0,l.scope_.unfinalizedDrafts_--;const d=l.copy_;let f=d,g=!1;l.type_===3&&(f=new Set(d),d.clear(),g=!0),each(f,(b,_)=>finalizeProperty(e,l,d,b,_,n,g),o),maybeFreeze(e,d,!1),n&&e.patches_&&getPlugin("Patches").generatePatches_(l,n,e.patches_,e.inversePatches_)}return l.copy_}function finalizeProperty(e,t,n,o,l,d,f){if(l==null||typeof l!="object"&&!f)return;const g=isFrozen$1(l);if(!(g&&!f)){if(process.env.NODE_ENV!=="production"&&l===n&&die(5),isDraft(l)){const b=d&&t&&t.type_!==3&&!has$1(t.assigned_,o)?d.concat(o):void 0,_=finalize(e,l,b);if(set$2(n,o,_),isDraft(_))e.canAutoFreeze_=!1;else return}else f&&n.add(l);if(isDraftable(l)&&!g){if(!e.immer_.autoFreeze_&&e.unfinalizedDrafts_<1||t&&t.base_&&t.base_[o]===l&&g)return;finalize(e,l),(!t||!t.scope_.parent_)&&typeof o!="symbol"&&(isMap(n)?n.has(o):Object.prototype.propertyIsEnumerable.call(n,o))&&maybeFreeze(e,l)}}}function maybeFreeze(e,t,n=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&freeze$1(t,n)}function createProxyProxy(e,t){const n=Array.isArray(e),o={type_:n?1:0,scope_:t?t.scope_:getCurrentScope(),modified_:!1,finalized_:!1,assigned_:{},parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1};let l=o,d=objectTraps;n&&(l=[o],d=arrayTraps);const{revoke:f,proxy:g}=Proxy.revocable(l,d);return o.draft_=g,o.revoke_=f,g}var objectTraps={get(e,t){if(t===DRAFT_STATE)return e;const n=latest(e);if(!has$1(n,t))return readPropFromProto(e,n,t);const o=n[t];return e.finalized_||!isDraftable(o)?o:o===peek(e.base_,t)?(prepareCopy(e),e.copy_[t]=createProxy(o,e)):o},has(e,t){return t in latest(e)},ownKeys(e){return Reflect.ownKeys(latest(e))},set(e,t,n){const o=getDescriptorFromProto(latest(e),t);if(o!=null&&o.set)return o.set.call(e.draft_,n),!0;if(!e.modified_){const l=peek(latest(e),t),d=l==null?void 0:l[DRAFT_STATE];if(d&&d.base_===n)return e.copy_[t]=n,e.assigned_[t]=!1,!0;if(is$1(n,l)&&(n!==void 0||has$1(e.base_,t)))return!0;prepareCopy(e),markChanged(e)}return e.copy_[t]===n&&(n!==void 0||t in e.copy_)||Number.isNaN(n)&&Number.isNaN(e.copy_[t])||(e.copy_[t]=n,e.assigned_[t]=!0),!0},deleteProperty(e,t){return peek(e.base_,t)!==void 0||t in e.base_?(e.assigned_[t]=!1,prepareCopy(e),markChanged(e)):delete e.assigned_[t],e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){const n=latest(e),o=Reflect.getOwnPropertyDescriptor(n,t);return o&&{writable:!0,configurable:e.type_!==1||t!=="length",enumerable:o.enumerable,value:n[t]}},defineProperty(){die(11)},getPrototypeOf(e){return getPrototypeOf$1(e.base_)},setPrototypeOf(){die(12)}},arrayTraps={};each(objectTraps,(e,t)=>{arrayTraps[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}}),arrayTraps.deleteProperty=function(e,t){return process.env.NODE_ENV!=="production"&&isNaN(parseInt(t))&&die(13),arrayTraps.set.call(this,e,t,void 0)},arrayTraps.set=function(e,t,n){return process.env.NODE_ENV!=="production"&&t!=="length"&&isNaN(parseInt(t))&&die(14),objectTraps.set.call(this,e[0],t,n,e[0])};function peek(e,t){const n=e[DRAFT_STATE];return(n?latest(n):e)[t]}function readPropFromProto(e,t,n){var l;const o=getDescriptorFromProto(t,n);return o?"value"in o?o.value:(l=o.get)==null?void 0:l.call(e.draft_):void 0}function getDescriptorFromProto(e,t){if(!(t in e))return;let n=getPrototypeOf$1(e);for(;n;){const o=Object.getOwnPropertyDescriptor(n,t);if(o)return o;n=getPrototypeOf$1(n)}}function markChanged(e){e.modified_||(e.modified_=!0,e.parent_&&markChanged(e.parent_))}function prepareCopy(e){e.copy_||(e.copy_=shallowCopy(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var Immer2=class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.useStrictIteration_=!0,this.produce=(t,n,o)=>{if(typeof t=="function"&&typeof n!="function"){const d=n;n=t;const f=this;return function(b=d,..._){return f.produce(b,S=>n.call(this,S,..._))}}typeof n!="function"&&die(6),o!==void 0&&typeof o!="function"&&die(7);let l;if(isDraftable(t)){const d=enterScope(this),f=createProxy(t,void 0);let g=!0;try{l=n(f),g=!1}finally{g?revokeScope(d):leaveScope(d)}return usePatchesInScope(d,o),processResult(l,d)}else if(!t||typeof t!="object"){if(l=n(t),l===void 0&&(l=t),l===NOTHING&&(l=void 0),this.autoFreeze_&&freeze$1(l,!0),o){const d=[],f=[];getPlugin("Patches").generateReplacementPatches_(t,l,d,f),o(d,f)}return l}else die(1,t)},this.produceWithPatches=(t,n)=>{if(typeof t=="function")return(f,...g)=>this.produceWithPatches(f,b=>t(b,...g));let o,l;return[this.produce(t,n,(f,g)=>{o=f,l=g}),o,l]},typeof(e==null?void 0:e.autoFreeze)=="boolean"&&this.setAutoFreeze(e.autoFreeze),typeof(e==null?void 0:e.useStrictShallowCopy)=="boolean"&&this.setUseStrictShallowCopy(e.useStrictShallowCopy),typeof(e==null?void 0:e.useStrictIteration)=="boolean"&&this.setUseStrictIteration(e.useStrictIteration)}createDraft(e){isDraftable(e)||die(8),isDraft(e)&&(e=current(e));const t=enterScope(this),n=createProxy(e,void 0);return n[DRAFT_STATE].isManual_=!0,leaveScope(t),n}finishDraft(e,t){const n=e&&e[DRAFT_STATE];(!n||!n.isManual_)&&die(9);const{scope_:o}=n;return usePatchesInScope(o,t),processResult(void 0,o)}setAutoFreeze(e){this.autoFreeze_=e}setUseStrictShallowCopy(e){this.useStrictShallowCopy_=e}setUseStrictIteration(e){this.useStrictIteration_=e}shouldUseStrictIteration(){return this.useStrictIteration_}applyPatches(e,t){let n;for(n=t.length-1;n>=0;n--){const l=t[n];if(l.path.length===0&&l.op==="replace"){e=l.value;break}}n>-1&&(t=t.slice(n+1));const o=getPlugin("Patches").applyPatches_;return isDraft(e)?o(e,t):this.produce(e,l=>o(l,t))}};function createProxy(e,t){const n=isMap(e)?getPlugin("MapSet").proxyMap_(e,t):isSet(e)?getPlugin("MapSet").proxySet_(e,t):createProxyProxy(e,t);return(t?t.scope_:getCurrentScope()).drafts_.push(n),n}function current(e){return isDraft(e)||die(10,e),currentImpl(e)}function currentImpl(e){if(!isDraftable(e)||isFrozen$1(e))return e;const t=e[DRAFT_STATE];let n,o=!0;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,n=shallowCopy(e,t.scope_.immer_.useStrictShallowCopy_),o=t.scope_.immer_.shouldUseStrictIteration()}else n=shallowCopy(e,!0);return each(n,(l,d)=>{set$2(n,l,currentImpl(d))},o),t&&(t.finalized_=!1),n}function enablePatches(){process.env.NODE_ENV!=="production"&&errors.push('Sets cannot have "replace" patches.',function(C){return"Unsupported patch operation: "+C},function(C){return"Cannot apply patch, path doesn't resolve: "+C},"Patching reserved attributes like __proto__, prototype and constructor is not allowed");const t="replace",n="add",o="remove";function l(C,E,A,M){switch(C.type_){case 0:case 2:return f(C,E,A,M);case 1:return d(C,E,A,M);case 3:return g(C,E,A,M)}}function d(C,E,A,M){let{base_:I,assigned_:j}=C,F=C.copy_;F.length<I.length&&([I,F]=[F,I],[A,M]=[M,A]);for(let z=0;z<I.length;z++)if(j[z]&&F[z]!==I[z]){const Q=E.concat([z]);A.push({op:t,path:Q,value:R(F[z])}),M.push({op:t,path:Q,value:R(I[z])})}for(let z=I.length;z<F.length;z++){const Q=E.concat([z]);A.push({op:n,path:Q,value:R(F[z])})}for(let z=F.length-1;I.length<=z;--z){const Q=E.concat([z]);M.push({op:o,path:Q})}}function f(C,E,A,M){const{base_:I,copy_:j}=C;each(C.assigned_,(F,z)=>{const Q=get$3(I,F),O=get$3(j,F),V=z?has$1(I,F)?t:n:o;if(Q===O&&V===t)return;const te=E.concat(F);A.push(V===o?{op:V,path:te}:{op:V,path:te,value:O}),M.push(V===n?{op:o,path:te}:V===o?{op:n,path:te,value:R(Q)}:{op:t,path:te,value:R(Q)})})}function g(C,E,A,M){let{base_:I,copy_:j}=C,F=0;I.forEach(z=>{if(!j.has(z)){const Q=E.concat([F]);A.push({op:o,path:Q,value:z}),M.unshift({op:n,path:Q,value:z})}F++}),F=0,j.forEach(z=>{if(!I.has(z)){const Q=E.concat([F]);A.push({op:n,path:Q,value:z}),M.unshift({op:o,path:Q,value:z})}F++})}function b(C,E,A,M){A.push({op:t,path:[],value:E===NOTHING?void 0:E}),M.push({op:t,path:[],value:C})}function _(C,E){return E.forEach(A=>{const{path:M,op:I}=A;let j=C;for(let O=0;O<M.length-1;O++){const V=getArchtype(j);let te=M[O];typeof te!="string"&&typeof te!="number"&&(te=""+te),(V===0||V===1)&&(te==="__proto__"||te==="constructor")&&die(19),typeof j=="function"&&te==="prototype"&&die(19),j=get$3(j,te),typeof j!="object"&&die(18,M.join("/"))}const F=getArchtype(j),z=S(A.value),Q=M[M.length-1];switch(I){case t:switch(F){case 2:return j.set(Q,z);case 3:die(16);default:return j[Q]=z}case n:switch(F){case 1:return Q==="-"?j.push(z):j.splice(Q,0,z);case 2:return j.set(Q,z);case 3:return j.add(z);default:return j[Q]=z}case o:switch(F){case 1:return j.splice(Q,1);case 2:return j.delete(Q);case 3:return j.delete(A.value);default:return delete j[Q]}default:die(17,I)}}),C}function S(C){if(!isDraftable(C))return C;if(Array.isArray(C))return C.map(S);if(isMap(C))return new Map(Array.from(C.entries()).map(([A,M])=>[A,S(M)]));if(isSet(C))return new Set(Array.from(C).map(S));const E=Object.create(getPrototypeOf$1(C));for(const A in C)E[A]=S(C[A]);return has$1(C,DRAFTABLE)&&(E[DRAFTABLE]=C[DRAFTABLE]),E}function R(C){return isDraft(C)?S(C):C}loadPlugin("Patches",{applyPatches_:_,generatePatches_:l,generateReplacementPatches_:b})}var immer=new Immer2,produce=immer.produce,produceWithPatches=immer.produceWithPatches.bind(immer),setUseStrictIteration=immer.setUseStrictIteration.bind(immer),applyPatches=immer.applyPatches.bind(immer),runIdentityFunctionCheck=(e,t,n)=>{if(t.length===1&&t[0]===n){let o=!1;try{const l={};e(l)===l&&(o=!0)}catch{}if(o){let l;try{throw new Error}catch(d){({stack:l}=d)}console.warn(`The result function returned its own inputs without modification. e.g
509
+ For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return React__namespace.useEffect(()=>{e&&(document.getElementById(e)||console.error(n))},[n,e]),null},DESCRIPTION_WARNING_NAME="DialogDescriptionWarning",DescriptionWarning$1=({contentRef:e,descriptionId:t})=>{const o=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${useWarningContext(DESCRIPTION_WARNING_NAME).contentName}}.`;return React__namespace.useEffect(()=>{var d;const l=(d=e.current)==null?void 0:d.getAttribute("aria-describedby");t&&l&&(document.getElementById(t)||console.warn(o))},[o,e,t]),null},Root$a=Dialog$1,Trigger$6=DialogTrigger$1,Portal$4=DialogPortal$1,Overlay=DialogOverlay$1,Content$3=DialogContent$1,Title$1=DialogTitle$1,Description$1=DialogDescription$1,Close$1=DialogClose$1;const Dialog=({modal:e=!1,...t})=>jsxRuntime.jsx(Root$a,{modal:e,...t});Dialog.displayName=Root$a.displayName;const DialogTrigger=Trigger$6,DialogPortal=Portal$4,DialogClose=Close$1,DialogOverlay=React__namespace.forwardRef(({className:e,...t},n)=>jsxRuntime.jsx(Overlay,{ref:n,className:cn("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t}));DialogOverlay.displayName=Overlay.displayName;const DialogContent=React__namespace.forwardRef(({className:e,children:t,animateExit:n=!0,...o},l)=>jsxRuntime.jsxs(DialogPortal,{forceMount:o.forceMount,children:[jsxRuntime.jsx(DialogOverlay,{}),jsxRuntime.jsxs(Content$3,{ref:l,className:cn("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-2xl shadow-primary duration-200 data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95 data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",n&&"data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%]",e),...o,children:[t,jsxRuntime.jsxs(Close$1,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-hidden focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground",children:[jsxRuntime.jsx(X$1,{className:"h-4 w-4"}),jsxRuntime.jsx("span",{className:"sr-only",children:"Close"})]})]})]}));DialogContent.displayName=Content$3.displayName;const DialogHeader=({className:e,...t})=>jsxRuntime.jsx("div",{className:cn("flex flex-col space-y-1.5 text-center sm:text-left",e),...t});DialogHeader.displayName="DialogHeader";const DialogFooter=({className:e,...t})=>jsxRuntime.jsx("div",{className:cn("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});DialogFooter.displayName="DialogFooter";const DialogTitle=React__namespace.forwardRef(({className:e,...t},n)=>jsxRuntime.jsx(Title$1,{ref:n,className:cn("text-lg font-semibold leading-none tracking-tight",e),...t}));DialogTitle.displayName=Title$1.displayName;const DialogDescription=React__namespace.forwardRef(({className:e,...t},n)=>jsxRuntime.jsx(Description$1,{ref:n,className:cn("text-sm text-muted-foreground",e),...t}));DialogDescription.displayName=Description$1.displayName;const sides=["top","right","bottom","left"],min$4=Math.min,max$4=Math.max,round$1=Math.round,floor=Math.floor,createCoords=e=>({x:e,y:e}),oppositeSideMap={left:"right",right:"left",bottom:"top",top:"bottom"},oppositeAlignmentMap={start:"end",end:"start"};function clamp$1(e,t,n){return max$4(e,min$4(t,n))}function evaluate(e,t){return typeof e=="function"?e(t):e}function getSide$1(e){return e.split("-")[0]}function getAlignment(e){return e.split("-")[1]}function getOppositeAxis(e){return e==="x"?"y":"x"}function getAxisLength(e){return e==="y"?"height":"width"}const yAxisSides=new Set(["top","bottom"]);function getSideAxis(e){return yAxisSides.has(getSide$1(e))?"y":"x"}function getAlignmentAxis(e){return getOppositeAxis(getSideAxis(e))}function getAlignmentSides(e,t,n){n===void 0&&(n=!1);const o=getAlignment(e),l=getAlignmentAxis(e),d=getAxisLength(l);let f=l==="x"?o===(n?"end":"start")?"right":"left":o==="start"?"bottom":"top";return t.reference[d]>t.floating[d]&&(f=getOppositePlacement(f)),[f,getOppositePlacement(f)]}function getExpandedPlacements(e){const t=getOppositePlacement(e);return[getOppositeAlignmentPlacement(e),t,getOppositeAlignmentPlacement(t)]}function getOppositeAlignmentPlacement(e){return e.replace(/start|end/g,t=>oppositeAlignmentMap[t])}const lrPlacement=["left","right"],rlPlacement=["right","left"],tbPlacement=["top","bottom"],btPlacement=["bottom","top"];function getSideList(e,t,n){switch(e){case"top":case"bottom":return n?t?rlPlacement:lrPlacement:t?lrPlacement:rlPlacement;case"left":case"right":return t?tbPlacement:btPlacement;default:return[]}}function getOppositeAxisPlacements(e,t,n,o){const l=getAlignment(e);let d=getSideList(getSide$1(e),n==="start",o);return l&&(d=d.map(f=>f+"-"+l),t&&(d=d.concat(d.map(getOppositeAlignmentPlacement)))),d}function getOppositePlacement(e){return e.replace(/left|right|bottom|top/g,t=>oppositeSideMap[t])}function expandPaddingObject(e){return{top:0,right:0,bottom:0,left:0,...e}}function getPaddingObject(e){return typeof e!="number"?expandPaddingObject(e):{top:e,right:e,bottom:e,left:e}}function rectToClientRect(e){const{x:t,y:n,width:o,height:l}=e;return{width:o,height:l,top:n,left:t,right:t+o,bottom:n+l,x:t,y:n}}function computeCoordsFromPlacement(e,t,n){let{reference:o,floating:l}=e;const d=getSideAxis(t),f=getAlignmentAxis(t),g=getAxisLength(f),b=getSide$1(t),_=d==="y",S=o.x+o.width/2-l.width/2,R=o.y+o.height/2-l.height/2,C=o[g]/2-l[g]/2;let E;switch(b){case"top":E={x:S,y:o.y-l.height};break;case"bottom":E={x:S,y:o.y+o.height};break;case"right":E={x:o.x+o.width,y:R};break;case"left":E={x:o.x-l.width,y:R};break;default:E={x:o.x,y:o.y}}switch(getAlignment(t)){case"start":E[f]-=C*(n&&_?-1:1);break;case"end":E[f]+=C*(n&&_?-1:1);break}return E}const computePosition$1=async(e,t,n)=>{const{placement:o="bottom",strategy:l="absolute",middleware:d=[],platform:f}=n,g=d.filter(Boolean),b=await(f.isRTL==null?void 0:f.isRTL(t));let _=await f.getElementRects({reference:e,floating:t,strategy:l}),{x:S,y:R}=computeCoordsFromPlacement(_,o,b),C=o,E={},A=0;for(let M=0;M<g.length;M++){const{name:I,fn:j}=g[M],{x:F,y:z,data:Q,reset:O}=await j({x:S,y:R,initialPlacement:o,placement:C,strategy:l,middlewareData:E,rects:_,platform:f,elements:{reference:e,floating:t}});S=F??S,R=z??R,E={...E,[I]:{...E[I],...Q}},O&&A<=50&&(A++,typeof O=="object"&&(O.placement&&(C=O.placement),O.rects&&(_=O.rects===!0?await f.getElementRects({reference:e,floating:t,strategy:l}):O.rects),{x:S,y:R}=computeCoordsFromPlacement(_,C,b)),M=-1)}return{x:S,y:R,placement:C,strategy:l,middlewareData:E}};async function detectOverflow(e,t){var n;t===void 0&&(t={});const{x:o,y:l,platform:d,rects:f,elements:g,strategy:b}=e,{boundary:_="clippingAncestors",rootBoundary:S="viewport",elementContext:R="floating",altBoundary:C=!1,padding:E=0}=evaluate(t,e),A=getPaddingObject(E),I=g[C?R==="floating"?"reference":"floating":R],j=rectToClientRect(await d.getClippingRect({element:(n=await(d.isElement==null?void 0:d.isElement(I)))==null||n?I:I.contextElement||await(d.getDocumentElement==null?void 0:d.getDocumentElement(g.floating)),boundary:_,rootBoundary:S,strategy:b})),F=R==="floating"?{x:o,y:l,width:f.floating.width,height:f.floating.height}:f.reference,z=await(d.getOffsetParent==null?void 0:d.getOffsetParent(g.floating)),Q=await(d.isElement==null?void 0:d.isElement(z))?await(d.getScale==null?void 0:d.getScale(z))||{x:1,y:1}:{x:1,y:1},O=rectToClientRect(d.convertOffsetParentRelativeRectToViewportRelativeRect?await d.convertOffsetParentRelativeRectToViewportRelativeRect({elements:g,rect:F,offsetParent:z,strategy:b}):F);return{top:(j.top-O.top+A.top)/Q.y,bottom:(O.bottom-j.bottom+A.bottom)/Q.y,left:(j.left-O.left+A.left)/Q.x,right:(O.right-j.right+A.right)/Q.x}}const arrow$4=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:o,placement:l,rects:d,platform:f,elements:g,middlewareData:b}=t,{element:_,padding:S=0}=evaluate(e,t)||{};if(_==null)return{};const R=getPaddingObject(S),C={x:n,y:o},E=getAlignmentAxis(l),A=getAxisLength(E),M=await f.getDimensions(_),I=E==="y",j=I?"top":"left",F=I?"bottom":"right",z=I?"clientHeight":"clientWidth",Q=d.reference[A]+d.reference[E]-C[E]-d.floating[A],O=C[E]-d.reference[E],V=await(f.getOffsetParent==null?void 0:f.getOffsetParent(_));let te=V?V[z]:0;(!te||!await(f.isElement==null?void 0:f.isElement(V)))&&(te=g.floating[z]||d.floating[A]);const ne=Q/2-O/2,ae=te/2-M[A]/2-1,$e=min$4(R[j],ae),ge=min$4(R[F],ae),se=$e,je=te-M[A]-ge,Ae=te/2-M[A]/2+ne,Ne=clamp$1(se,Ae,je),Ve=!b.arrow&&getAlignment(l)!=null&&Ae!==Ne&&d.reference[A]/2-(Ae<se?$e:ge)-M[A]/2<0,Fe=Ve?Ae<se?Ae-se:Ae-je:0;return{[E]:C[E]+Fe,data:{[E]:Ne,centerOffset:Ae-Ne-Fe,...Ve&&{alignmentOffset:Fe}},reset:Ve}}}),flip$2=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,o;const{placement:l,middlewareData:d,rects:f,initialPlacement:g,platform:b,elements:_}=t,{mainAxis:S=!0,crossAxis:R=!0,fallbackPlacements:C,fallbackStrategy:E="bestFit",fallbackAxisSideDirection:A="none",flipAlignment:M=!0,...I}=evaluate(e,t);if((n=d.arrow)!=null&&n.alignmentOffset)return{};const j=getSide$1(l),F=getSideAxis(g),z=getSide$1(g)===g,Q=await(b.isRTL==null?void 0:b.isRTL(_.floating)),O=C||(z||!M?[getOppositePlacement(g)]:getExpandedPlacements(g)),V=A!=="none";!C&&V&&O.push(...getOppositeAxisPlacements(g,M,A,Q));const te=[g,...O],ne=await detectOverflow(t,I),ae=[];let $e=((o=d.flip)==null?void 0:o.overflows)||[];if(S&&ae.push(ne[j]),R){const Ae=getAlignmentSides(l,f,Q);ae.push(ne[Ae[0]],ne[Ae[1]])}if($e=[...$e,{placement:l,overflows:ae}],!ae.every(Ae=>Ae<=0)){var ge,se;const Ae=(((ge=d.flip)==null?void 0:ge.index)||0)+1,Ne=te[Ae];if(Ne&&(!(R==="alignment"?F!==getSideAxis(Ne):!1)||$e.every(Oe=>getSideAxis(Oe.placement)===F?Oe.overflows[0]>0:!0)))return{data:{index:Ae,overflows:$e},reset:{placement:Ne}};let Ve=(se=$e.filter(Fe=>Fe.overflows[0]<=0).sort((Fe,Oe)=>Fe.overflows[1]-Oe.overflows[1])[0])==null?void 0:se.placement;if(!Ve)switch(E){case"bestFit":{var je;const Fe=(je=$e.filter(Oe=>{if(V){const Be=getSideAxis(Oe.placement);return Be===F||Be==="y"}return!0}).map(Oe=>[Oe.placement,Oe.overflows.filter(Be=>Be>0).reduce((Be,Ue)=>Be+Ue,0)]).sort((Oe,Be)=>Oe[1]-Be[1])[0])==null?void 0:je[0];Fe&&(Ve=Fe);break}case"initialPlacement":Ve=g;break}if(l!==Ve)return{reset:{placement:Ve}}}return{}}}};function getSideOffsets(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function isAnySideFullyClipped(e){return sides.some(t=>e[t]>=0)}const hide$2=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:o="referenceHidden",...l}=evaluate(e,t);switch(o){case"referenceHidden":{const d=await detectOverflow(t,{...l,elementContext:"reference"}),f=getSideOffsets(d,n.reference);return{data:{referenceHiddenOffsets:f,referenceHidden:isAnySideFullyClipped(f)}}}case"escaped":{const d=await detectOverflow(t,{...l,altBoundary:!0}),f=getSideOffsets(d,n.floating);return{data:{escapedOffsets:f,escaped:isAnySideFullyClipped(f)}}}default:return{}}}}},originSides=new Set(["left","top"]);async function convertValueToCoords(e,t){const{placement:n,platform:o,elements:l}=e,d=await(o.isRTL==null?void 0:o.isRTL(l.floating)),f=getSide$1(n),g=getAlignment(n),b=getSideAxis(n)==="y",_=originSides.has(f)?-1:1,S=d&&b?-1:1,R=evaluate(t,e);let{mainAxis:C,crossAxis:E,alignmentAxis:A}=typeof R=="number"?{mainAxis:R,crossAxis:0,alignmentAxis:null}:{mainAxis:R.mainAxis||0,crossAxis:R.crossAxis||0,alignmentAxis:R.alignmentAxis};return g&&typeof A=="number"&&(E=g==="end"?A*-1:A),b?{x:E*S,y:C*_}:{x:C*_,y:E*S}}const offset$2=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,o;const{x:l,y:d,placement:f,middlewareData:g}=t,b=await convertValueToCoords(t,e);return f===((n=g.offset)==null?void 0:n.placement)&&(o=g.arrow)!=null&&o.alignmentOffset?{}:{x:l+b.x,y:d+b.y,data:{...b,placement:f}}}}},shift$3=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:o,placement:l}=t,{mainAxis:d=!0,crossAxis:f=!1,limiter:g={fn:I=>{let{x:j,y:F}=I;return{x:j,y:F}}},...b}=evaluate(e,t),_={x:n,y:o},S=await detectOverflow(t,b),R=getSideAxis(getSide$1(l)),C=getOppositeAxis(R);let E=_[C],A=_[R];if(d){const I=C==="y"?"top":"left",j=C==="y"?"bottom":"right",F=E+S[I],z=E-S[j];E=clamp$1(F,E,z)}if(f){const I=R==="y"?"top":"left",j=R==="y"?"bottom":"right",F=A+S[I],z=A-S[j];A=clamp$1(F,A,z)}const M=g.fn({...t,[C]:E,[R]:A});return{...M,data:{x:M.x-n,y:M.y-o,enabled:{[C]:d,[R]:f}}}}}},limitShift$2=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:o,placement:l,rects:d,middlewareData:f}=t,{offset:g=0,mainAxis:b=!0,crossAxis:_=!0}=evaluate(e,t),S={x:n,y:o},R=getSideAxis(l),C=getOppositeAxis(R);let E=S[C],A=S[R];const M=evaluate(g,t),I=typeof M=="number"?{mainAxis:M,crossAxis:0}:{mainAxis:0,crossAxis:0,...M};if(b){const z=C==="y"?"height":"width",Q=d.reference[C]-d.floating[z]+I.mainAxis,O=d.reference[C]+d.reference[z]-I.mainAxis;E<Q?E=Q:E>O&&(E=O)}if(_){var j,F;const z=C==="y"?"width":"height",Q=originSides.has(getSide$1(l)),O=d.reference[R]-d.floating[z]+(Q&&((j=f.offset)==null?void 0:j[R])||0)+(Q?0:I.crossAxis),V=d.reference[R]+d.reference[z]+(Q?0:((F=f.offset)==null?void 0:F[R])||0)-(Q?I.crossAxis:0);A<O?A=O:A>V&&(A=V)}return{[C]:E,[R]:A}}}},size$2=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,o;const{placement:l,rects:d,platform:f,elements:g}=t,{apply:b=()=>{},..._}=evaluate(e,t),S=await detectOverflow(t,_),R=getSide$1(l),C=getAlignment(l),E=getSideAxis(l)==="y",{width:A,height:M}=d.floating;let I,j;R==="top"||R==="bottom"?(I=R,j=C===(await(f.isRTL==null?void 0:f.isRTL(g.floating))?"start":"end")?"left":"right"):(j=R,I=C==="end"?"top":"bottom");const F=M-S.top-S.bottom,z=A-S.left-S.right,Q=min$4(M-S[I],F),O=min$4(A-S[j],z),V=!t.middlewareData.shift;let te=Q,ne=O;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(ne=z),(o=t.middlewareData.shift)!=null&&o.enabled.y&&(te=F),V&&!C){const $e=max$4(S.left,0),ge=max$4(S.right,0),se=max$4(S.top,0),je=max$4(S.bottom,0);E?ne=A-2*($e!==0||ge!==0?$e+ge:max$4(S.left,S.right)):te=M-2*(se!==0||je!==0?se+je:max$4(S.top,S.bottom))}await b({...t,availableWidth:ne,availableHeight:te});const ae=await f.getDimensions(g.floating);return A!==ae.width||M!==ae.height?{reset:{rects:!0}}:{}}}};function hasWindow(){return typeof window<"u"}function getNodeName(e){return isNode(e)?(e.nodeName||"").toLowerCase():"#document"}function getWindow(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function getDocumentElement(e){var t;return(t=(isNode(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function isNode(e){return hasWindow()?e instanceof Node||e instanceof getWindow(e).Node:!1}function isElement(e){return hasWindow()?e instanceof Element||e instanceof getWindow(e).Element:!1}function isHTMLElement$2(e){return hasWindow()?e instanceof HTMLElement||e instanceof getWindow(e).HTMLElement:!1}function isShadowRoot(e){return!hasWindow()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof getWindow(e).ShadowRoot}const invalidOverflowDisplayValues=new Set(["inline","contents"]);function isOverflowElement(e){const{overflow:t,overflowX:n,overflowY:o,display:l}=getComputedStyle$1(e);return/auto|scroll|overlay|hidden|clip/.test(t+o+n)&&!invalidOverflowDisplayValues.has(l)}const tableElements=new Set(["table","td","th"]);function isTableElement(e){return tableElements.has(getNodeName(e))}const topLayerSelectors=[":popover-open",":modal"];function isTopLayer(e){return topLayerSelectors.some(t=>{try{return e.matches(t)}catch{return!1}})}const transformProperties=["transform","translate","scale","rotate","perspective"],willChangeValues=["transform","translate","scale","rotate","perspective","filter"],containValues=["paint","layout","strict","content"];function isContainingBlock(e){const t=isWebKit(),n=isElement(e)?getComputedStyle$1(e):e;return transformProperties.some(o=>n[o]?n[o]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||willChangeValues.some(o=>(n.willChange||"").includes(o))||containValues.some(o=>(n.contain||"").includes(o))}function getContainingBlock(e){let t=getParentNode(e);for(;isHTMLElement$2(t)&&!isLastTraversableNode(t);){if(isContainingBlock(t))return t;if(isTopLayer(t))return null;t=getParentNode(t)}return null}function isWebKit(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const lastTraversableNodeNames=new Set(["html","body","#document"]);function isLastTraversableNode(e){return lastTraversableNodeNames.has(getNodeName(e))}function getComputedStyle$1(e){return getWindow(e).getComputedStyle(e)}function getNodeScroll(e){return isElement(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function getParentNode(e){if(getNodeName(e)==="html")return e;const t=e.assignedSlot||e.parentNode||isShadowRoot(e)&&e.host||getDocumentElement(e);return isShadowRoot(t)?t.host:t}function getNearestOverflowAncestor(e){const t=getParentNode(e);return isLastTraversableNode(t)?e.ownerDocument?e.ownerDocument.body:e.body:isHTMLElement$2(t)&&isOverflowElement(t)?t:getNearestOverflowAncestor(t)}function getOverflowAncestors(e,t,n){var o;t===void 0&&(t=[]),n===void 0&&(n=!0);const l=getNearestOverflowAncestor(e),d=l===((o=e.ownerDocument)==null?void 0:o.body),f=getWindow(l);if(d){const g=getFrameElement(f);return t.concat(f,f.visualViewport||[],isOverflowElement(l)?l:[],g&&n?getOverflowAncestors(g):[])}return t.concat(l,getOverflowAncestors(l,[],n))}function getFrameElement(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function getCssDimensions(e){const t=getComputedStyle$1(e);let n=parseFloat(t.width)||0,o=parseFloat(t.height)||0;const l=isHTMLElement$2(e),d=l?e.offsetWidth:n,f=l?e.offsetHeight:o,g=round$1(n)!==d||round$1(o)!==f;return g&&(n=d,o=f),{width:n,height:o,$:g}}function unwrapElement(e){return isElement(e)?e:e.contextElement}function getScale(e){const t=unwrapElement(e);if(!isHTMLElement$2(t))return createCoords(1);const n=t.getBoundingClientRect(),{width:o,height:l,$:d}=getCssDimensions(t);let f=(d?round$1(n.width):n.width)/o,g=(d?round$1(n.height):n.height)/l;return(!f||!Number.isFinite(f))&&(f=1),(!g||!Number.isFinite(g))&&(g=1),{x:f,y:g}}const noOffsets=createCoords(0);function getVisualOffsets(e){const t=getWindow(e);return!isWebKit()||!t.visualViewport?noOffsets:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function shouldAddVisualOffsets(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==getWindow(e)?!1:t}function getBoundingClientRect(e,t,n,o){t===void 0&&(t=!1),n===void 0&&(n=!1);const l=e.getBoundingClientRect(),d=unwrapElement(e);let f=createCoords(1);t&&(o?isElement(o)&&(f=getScale(o)):f=getScale(e));const g=shouldAddVisualOffsets(d,n,o)?getVisualOffsets(d):createCoords(0);let b=(l.left+g.x)/f.x,_=(l.top+g.y)/f.y,S=l.width/f.x,R=l.height/f.y;if(d){const C=getWindow(d),E=o&&isElement(o)?getWindow(o):o;let A=C,M=getFrameElement(A);for(;M&&o&&E!==A;){const I=getScale(M),j=M.getBoundingClientRect(),F=getComputedStyle$1(M),z=j.left+(M.clientLeft+parseFloat(F.paddingLeft))*I.x,Q=j.top+(M.clientTop+parseFloat(F.paddingTop))*I.y;b*=I.x,_*=I.y,S*=I.x,R*=I.y,b+=z,_+=Q,A=getWindow(M),M=getFrameElement(A)}}return rectToClientRect({width:S,height:R,x:b,y:_})}function getWindowScrollBarX(e,t){const n=getNodeScroll(e).scrollLeft;return t?t.left+n:getBoundingClientRect(getDocumentElement(e)).left+n}function getHTMLOffset(e,t){const n=e.getBoundingClientRect(),o=n.left+t.scrollLeft-getWindowScrollBarX(e,n),l=n.top+t.scrollTop;return{x:o,y:l}}function convertOffsetParentRelativeRectToViewportRelativeRect(e){let{elements:t,rect:n,offsetParent:o,strategy:l}=e;const d=l==="fixed",f=getDocumentElement(o),g=t?isTopLayer(t.floating):!1;if(o===f||g&&d)return n;let b={scrollLeft:0,scrollTop:0},_=createCoords(1);const S=createCoords(0),R=isHTMLElement$2(o);if((R||!R&&!d)&&((getNodeName(o)!=="body"||isOverflowElement(f))&&(b=getNodeScroll(o)),isHTMLElement$2(o))){const E=getBoundingClientRect(o);_=getScale(o),S.x=E.x+o.clientLeft,S.y=E.y+o.clientTop}const C=f&&!R&&!d?getHTMLOffset(f,b):createCoords(0);return{width:n.width*_.x,height:n.height*_.y,x:n.x*_.x-b.scrollLeft*_.x+S.x+C.x,y:n.y*_.y-b.scrollTop*_.y+S.y+C.y}}function getClientRects(e){return Array.from(e.getClientRects())}function getDocumentRect(e){const t=getDocumentElement(e),n=getNodeScroll(e),o=e.ownerDocument.body,l=max$4(t.scrollWidth,t.clientWidth,o.scrollWidth,o.clientWidth),d=max$4(t.scrollHeight,t.clientHeight,o.scrollHeight,o.clientHeight);let f=-n.scrollLeft+getWindowScrollBarX(e);const g=-n.scrollTop;return getComputedStyle$1(o).direction==="rtl"&&(f+=max$4(t.clientWidth,o.clientWidth)-l),{width:l,height:d,x:f,y:g}}const SCROLLBAR_MAX=25;function getViewportRect(e,t){const n=getWindow(e),o=getDocumentElement(e),l=n.visualViewport;let d=o.clientWidth,f=o.clientHeight,g=0,b=0;if(l){d=l.width,f=l.height;const S=isWebKit();(!S||S&&t==="fixed")&&(g=l.offsetLeft,b=l.offsetTop)}const _=getWindowScrollBarX(o);if(_<=0){const S=o.ownerDocument,R=S.body,C=getComputedStyle(R),E=S.compatMode==="CSS1Compat"&&parseFloat(C.marginLeft)+parseFloat(C.marginRight)||0,A=Math.abs(o.clientWidth-R.clientWidth-E);A<=SCROLLBAR_MAX&&(d-=A)}else _<=SCROLLBAR_MAX&&(d+=_);return{width:d,height:f,x:g,y:b}}const absoluteOrFixed=new Set(["absolute","fixed"]);function getInnerBoundingClientRect(e,t){const n=getBoundingClientRect(e,!0,t==="fixed"),o=n.top+e.clientTop,l=n.left+e.clientLeft,d=isHTMLElement$2(e)?getScale(e):createCoords(1),f=e.clientWidth*d.x,g=e.clientHeight*d.y,b=l*d.x,_=o*d.y;return{width:f,height:g,x:b,y:_}}function getClientRectFromClippingAncestor(e,t,n){let o;if(t==="viewport")o=getViewportRect(e,n);else if(t==="document")o=getDocumentRect(getDocumentElement(e));else if(isElement(t))o=getInnerBoundingClientRect(t,n);else{const l=getVisualOffsets(e);o={x:t.x-l.x,y:t.y-l.y,width:t.width,height:t.height}}return rectToClientRect(o)}function hasFixedPositionAncestor(e,t){const n=getParentNode(e);return n===t||!isElement(n)||isLastTraversableNode(n)?!1:getComputedStyle$1(n).position==="fixed"||hasFixedPositionAncestor(n,t)}function getClippingElementAncestors(e,t){const n=t.get(e);if(n)return n;let o=getOverflowAncestors(e,[],!1).filter(g=>isElement(g)&&getNodeName(g)!=="body"),l=null;const d=getComputedStyle$1(e).position==="fixed";let f=d?getParentNode(e):e;for(;isElement(f)&&!isLastTraversableNode(f);){const g=getComputedStyle$1(f),b=isContainingBlock(f);!b&&g.position==="fixed"&&(l=null),(d?!b&&!l:!b&&g.position==="static"&&!!l&&absoluteOrFixed.has(l.position)||isOverflowElement(f)&&!b&&hasFixedPositionAncestor(e,f))?o=o.filter(S=>S!==f):l=g,f=getParentNode(f)}return t.set(e,o),o}function getClippingRect(e){let{element:t,boundary:n,rootBoundary:o,strategy:l}=e;const f=[...n==="clippingAncestors"?isTopLayer(t)?[]:getClippingElementAncestors(t,this._c):[].concat(n),o],g=f[0],b=f.reduce((_,S)=>{const R=getClientRectFromClippingAncestor(t,S,l);return _.top=max$4(R.top,_.top),_.right=min$4(R.right,_.right),_.bottom=min$4(R.bottom,_.bottom),_.left=max$4(R.left,_.left),_},getClientRectFromClippingAncestor(t,g,l));return{width:b.right-b.left,height:b.bottom-b.top,x:b.left,y:b.top}}function getDimensions(e){const{width:t,height:n}=getCssDimensions(e);return{width:t,height:n}}function getRectRelativeToOffsetParent(e,t,n){const o=isHTMLElement$2(t),l=getDocumentElement(t),d=n==="fixed",f=getBoundingClientRect(e,!0,d,t);let g={scrollLeft:0,scrollTop:0};const b=createCoords(0);function _(){b.x=getWindowScrollBarX(l)}if(o||!o&&!d)if((getNodeName(t)!=="body"||isOverflowElement(l))&&(g=getNodeScroll(t)),o){const E=getBoundingClientRect(t,!0,d,t);b.x=E.x+t.clientLeft,b.y=E.y+t.clientTop}else l&&_();d&&!o&&l&&_();const S=l&&!o&&!d?getHTMLOffset(l,g):createCoords(0),R=f.left+g.scrollLeft-b.x-S.x,C=f.top+g.scrollTop-b.y-S.y;return{x:R,y:C,width:f.width,height:f.height}}function isStaticPositioned(e){return getComputedStyle$1(e).position==="static"}function getTrueOffsetParent(e,t){if(!isHTMLElement$2(e)||getComputedStyle$1(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return getDocumentElement(e)===n&&(n=n.ownerDocument.body),n}function getOffsetParent(e,t){const n=getWindow(e);if(isTopLayer(e))return n;if(!isHTMLElement$2(e)){let l=getParentNode(e);for(;l&&!isLastTraversableNode(l);){if(isElement(l)&&!isStaticPositioned(l))return l;l=getParentNode(l)}return n}let o=getTrueOffsetParent(e,t);for(;o&&isTableElement(o)&&isStaticPositioned(o);)o=getTrueOffsetParent(o,t);return o&&isLastTraversableNode(o)&&isStaticPositioned(o)&&!isContainingBlock(o)?n:o||getContainingBlock(e)||n}const getElementRects=async function(e){const t=this.getOffsetParent||getOffsetParent,n=this.getDimensions,o=await n(e.floating);return{reference:getRectRelativeToOffsetParent(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:o.width,height:o.height}}};function isRTL(e){return getComputedStyle$1(e).direction==="rtl"}const platform={convertOffsetParentRelativeRectToViewportRelativeRect,getDocumentElement,getClippingRect,getOffsetParent,getElementRects,getClientRects,getDimensions,getScale,isElement,isRTL};function rectsAreEqual(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function observeMove(e,t){let n=null,o;const l=getDocumentElement(e);function d(){var g;clearTimeout(o),(g=n)==null||g.disconnect(),n=null}function f(g,b){g===void 0&&(g=!1),b===void 0&&(b=1),d();const _=e.getBoundingClientRect(),{left:S,top:R,width:C,height:E}=_;if(g||t(),!C||!E)return;const A=floor(R),M=floor(l.clientWidth-(S+C)),I=floor(l.clientHeight-(R+E)),j=floor(S),z={rootMargin:-A+"px "+-M+"px "+-I+"px "+-j+"px",threshold:max$4(0,min$4(1,b))||1};let Q=!0;function O(V){const te=V[0].intersectionRatio;if(te!==b){if(!Q)return f();te?f(!1,te):o=setTimeout(()=>{f(!1,1e-7)},1e3)}te===1&&!rectsAreEqual(_,e.getBoundingClientRect())&&f(),Q=!1}try{n=new IntersectionObserver(O,{...z,root:l.ownerDocument})}catch{n=new IntersectionObserver(O,z)}n.observe(e)}return f(!0),d}function autoUpdate(e,t,n,o){o===void 0&&(o={});const{ancestorScroll:l=!0,ancestorResize:d=!0,elementResize:f=typeof ResizeObserver=="function",layoutShift:g=typeof IntersectionObserver=="function",animationFrame:b=!1}=o,_=unwrapElement(e),S=l||d?[..._?getOverflowAncestors(_):[],...getOverflowAncestors(t)]:[];S.forEach(j=>{l&&j.addEventListener("scroll",n,{passive:!0}),d&&j.addEventListener("resize",n)});const R=_&&g?observeMove(_,n):null;let C=-1,E=null;f&&(E=new ResizeObserver(j=>{let[F]=j;F&&F.target===_&&E&&(E.unobserve(t),cancelAnimationFrame(C),C=requestAnimationFrame(()=>{var z;(z=E)==null||z.observe(t)})),n()}),_&&!b&&E.observe(_),E.observe(t));let A,M=b?getBoundingClientRect(e):null;b&&I();function I(){const j=getBoundingClientRect(e);M&&!rectsAreEqual(M,j)&&n(),M=j,A=requestAnimationFrame(I)}return n(),()=>{var j;S.forEach(F=>{l&&F.removeEventListener("scroll",n),d&&F.removeEventListener("resize",n)}),R==null||R(),(j=E)==null||j.disconnect(),E=null,b&&cancelAnimationFrame(A)}}const offset$1=offset$2,shift$2=shift$3,flip$1=flip$2,size$1=size$2,hide$1=hide$2,arrow$3=arrow$4,limitShift$1=limitShift$2,computePosition=(e,t,n)=>{const o=new Map,l={platform,...n},d={...l.platform,_c:o};return computePosition$1(e,t,{...l,platform:d})};var isClient=typeof document<"u",noop$2=function(){},index=isClient?React.useLayoutEffect:noop$2;function deepEqual$3(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,o,l;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(o=n;o--!==0;)if(!deepEqual$3(e[o],t[o]))return!1;return!0}if(l=Object.keys(e),n=l.length,n!==Object.keys(t).length)return!1;for(o=n;o--!==0;)if(!{}.hasOwnProperty.call(t,l[o]))return!1;for(o=n;o--!==0;){const d=l[o];if(!(d==="_owner"&&e.$$typeof)&&!deepEqual$3(e[d],t[d]))return!1}return!0}return e!==e&&t!==t}function getDPR(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function roundByDPR(e,t){const n=getDPR(e);return Math.round(t*n)/n}function useLatestRef(e){const t=React__namespace.useRef(e);return index(()=>{t.current=e}),t}function useFloating(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:o=[],platform:l,elements:{reference:d,floating:f}={},transform:g=!0,whileElementsMounted:b,open:_}=e,[S,R]=React__namespace.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[C,E]=React__namespace.useState(o);deepEqual$3(C,o)||E(o);const[A,M]=React__namespace.useState(null),[I,j]=React__namespace.useState(null),F=React__namespace.useCallback(Oe=>{Oe!==V.current&&(V.current=Oe,M(Oe))},[]),z=React__namespace.useCallback(Oe=>{Oe!==te.current&&(te.current=Oe,j(Oe))},[]),Q=d||A,O=f||I,V=React__namespace.useRef(null),te=React__namespace.useRef(null),ne=React__namespace.useRef(S),ae=b!=null,$e=useLatestRef(b),ge=useLatestRef(l),se=useLatestRef(_),je=React__namespace.useCallback(()=>{if(!V.current||!te.current)return;const Oe={placement:t,strategy:n,middleware:C};ge.current&&(Oe.platform=ge.current),computePosition(V.current,te.current,Oe).then(Be=>{const Ue={...Be,isPositioned:se.current!==!1};Ae.current&&!deepEqual$3(ne.current,Ue)&&(ne.current=Ue,ReactDOM__namespace.flushSync(()=>{R(Ue)}))})},[C,t,n,ge,se]);index(()=>{_===!1&&ne.current.isPositioned&&(ne.current.isPositioned=!1,R(Oe=>({...Oe,isPositioned:!1})))},[_]);const Ae=React__namespace.useRef(!1);index(()=>(Ae.current=!0,()=>{Ae.current=!1}),[]),index(()=>{if(Q&&(V.current=Q),O&&(te.current=O),Q&&O){if($e.current)return $e.current(Q,O,je);je()}},[Q,O,je,$e,ae]);const Ne=React__namespace.useMemo(()=>({reference:V,floating:te,setReference:F,setFloating:z}),[F,z]),Ve=React__namespace.useMemo(()=>({reference:Q,floating:O}),[Q,O]),Fe=React__namespace.useMemo(()=>{const Oe={position:n,left:0,top:0};if(!Ve.floating)return Oe;const Be=roundByDPR(Ve.floating,S.x),Ue=roundByDPR(Ve.floating,S.y);return g?{...Oe,transform:"translate("+Be+"px, "+Ue+"px)",...getDPR(Ve.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:Be,top:Ue}},[n,g,Ve.floating,S.x,S.y]);return React__namespace.useMemo(()=>({...S,update:je,refs:Ne,elements:Ve,floatingStyles:Fe}),[S,je,Ne,Ve,Fe])}const arrow$1=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:o,padding:l}=typeof e=="function"?e(n):e;return o&&t(o)?o.current!=null?arrow$3({element:o.current,padding:l}).fn(n):{}:o?arrow$3({element:o,padding:l}).fn(n):{}}}},offset=(e,t)=>({...offset$1(e),options:[e,t]}),shift$1=(e,t)=>({...shift$2(e),options:[e,t]}),limitShift=(e,t)=>({...limitShift$1(e),options:[e,t]}),flip=(e,t)=>({...flip$1(e),options:[e,t]}),size=(e,t)=>({...size$1(e),options:[e,t]}),hide=(e,t)=>({...hide$1(e),options:[e,t]}),arrow$2=(e,t)=>({...arrow$1(e),options:[e,t]});var NAME$3="Arrow",Arrow$1=React__namespace.forwardRef((e,t)=>{const{children:n,width:o=10,height:l=5,...d}=e;return jsxRuntime.jsx(Primitive$4.svg,{...d,ref:t,width:o,height:l,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:jsxRuntime.jsx("polygon",{points:"0,0 30,0 15,10"})})});Arrow$1.displayName=NAME$3;var Root$9=Arrow$1,POPPER_NAME="Popper",[createPopperContext,createPopperScope]=createContextScope$2(POPPER_NAME),[PopperProvider,usePopperContext]=createPopperContext(POPPER_NAME),Popper=e=>{const{__scopePopper:t,children:n}=e,[o,l]=React__namespace.useState(null);return jsxRuntime.jsx(PopperProvider,{scope:t,anchor:o,onAnchorChange:l,children:n})};Popper.displayName=POPPER_NAME;var ANCHOR_NAME$2="PopperAnchor",PopperAnchor=React__namespace.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:o,...l}=e,d=usePopperContext(ANCHOR_NAME$2,n),f=React__namespace.useRef(null),g=useComposedRefs(t,f),b=React__namespace.useRef(null);return React__namespace.useEffect(()=>{const _=b.current;b.current=(o==null?void 0:o.current)||f.current,_!==b.current&&d.onAnchorChange(b.current)}),o?null:jsxRuntime.jsx(Primitive$4.div,{...l,ref:g})});PopperAnchor.displayName=ANCHOR_NAME$2;var CONTENT_NAME$9="PopperContent",[PopperContentProvider,useContentContext]=createPopperContext(CONTENT_NAME$9),PopperContent=React__namespace.forwardRef((e,t)=>{var Ke,at,rt,st,lt,Ge;const{__scopePopper:n,side:o="bottom",sideOffset:l=0,align:d="center",alignOffset:f=0,arrowPadding:g=0,avoidCollisions:b=!0,collisionBoundary:_=[],collisionPadding:S=0,sticky:R="partial",hideWhenDetached:C=!1,updatePositionStrategy:E="optimized",onPlaced:A,...M}=e,I=usePopperContext(CONTENT_NAME$9,n),[j,F]=React__namespace.useState(null),z=useComposedRefs(t,Ct=>F(Ct)),[Q,O]=React__namespace.useState(null),V=useSize(Q),te=(V==null?void 0:V.width)??0,ne=(V==null?void 0:V.height)??0,ae=o+(d!=="center"?"-"+d:""),$e=typeof S=="number"?S:{top:0,right:0,bottom:0,left:0,...S},ge=Array.isArray(_)?_:[_],se=ge.length>0,je={padding:$e,boundary:ge.filter(isNotNull),altBoundary:se},{refs:Ae,floatingStyles:Ne,placement:Ve,isPositioned:Fe,middlewareData:Oe}=useFloating({strategy:"fixed",placement:ae,whileElementsMounted:(...Ct)=>autoUpdate(...Ct,{animationFrame:E==="always"}),elements:{reference:I.anchor},middleware:[offset({mainAxis:l+ne,alignmentAxis:f}),b&&shift$1({mainAxis:!0,crossAxis:!1,limiter:R==="partial"?limitShift():void 0,...je}),b&&flip({...je}),size({...je,apply:({elements:Ct,rects:tt,availableWidth:yt,availableHeight:ct})=>{const{width:Rt,height:Mt}=tt.reference,It=Ct.floating.style;It.setProperty("--radix-popper-available-width",`${yt}px`),It.setProperty("--radix-popper-available-height",`${ct}px`),It.setProperty("--radix-popper-anchor-width",`${Rt}px`),It.setProperty("--radix-popper-anchor-height",`${Mt}px`)}}),Q&&arrow$2({element:Q,padding:g}),transformOrigin({arrowWidth:te,arrowHeight:ne}),C&&hide({strategy:"referenceHidden",...je})]}),[Be,Ue]=getSideAndAlignFromPlacement(Ve),ze=useCallbackRef$1(A);useLayoutEffect2(()=>{Fe&&(ze==null||ze())},[Fe,ze]);const He=(Ke=Oe.arrow)==null?void 0:Ke.x,Qe=(at=Oe.arrow)==null?void 0:at.y,et=((rt=Oe.arrow)==null?void 0:rt.centerOffset)!==0,[Je,Ze]=React__namespace.useState();return useLayoutEffect2(()=>{j&&Ze(window.getComputedStyle(j).zIndex)},[j]),jsxRuntime.jsx("div",{ref:Ae.setFloating,"data-radix-popper-content-wrapper":"",style:{...Ne,transform:Fe?Ne.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:Je,"--radix-popper-transform-origin":[(st=Oe.transformOrigin)==null?void 0:st.x,(lt=Oe.transformOrigin)==null?void 0:lt.y].join(" "),...((Ge=Oe.hide)==null?void 0:Ge.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:jsxRuntime.jsx(PopperContentProvider,{scope:n,placedSide:Be,onArrowChange:O,arrowX:He,arrowY:Qe,shouldHideArrow:et,children:jsxRuntime.jsx(Primitive$4.div,{"data-side":Be,"data-align":Ue,...M,ref:z,style:{...M.style,animation:Fe?void 0:"none"}})})})});PopperContent.displayName=CONTENT_NAME$9;var ARROW_NAME$5="PopperArrow",OPPOSITE_SIDE={top:"bottom",right:"left",bottom:"top",left:"right"},PopperArrow=React__namespace.forwardRef(function(t,n){const{__scopePopper:o,...l}=t,d=useContentContext(ARROW_NAME$5,o),f=OPPOSITE_SIDE[d.placedSide];return jsxRuntime.jsx("span",{ref:d.onArrowChange,style:{position:"absolute",left:d.arrowX,top:d.arrowY,[f]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[d.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[d.placedSide],visibility:d.shouldHideArrow?"hidden":void 0},children:jsxRuntime.jsx(Root$9,{...l,ref:n,style:{...l.style,display:"block"}})})});PopperArrow.displayName=ARROW_NAME$5;function isNotNull(e){return e!==null}var transformOrigin=e=>({name:"transformOrigin",options:e,fn(t){var I,j,F;const{placement:n,rects:o,middlewareData:l}=t,f=((I=l.arrow)==null?void 0:I.centerOffset)!==0,g=f?0:e.arrowWidth,b=f?0:e.arrowHeight,[_,S]=getSideAndAlignFromPlacement(n),R={start:"0%",center:"50%",end:"100%"}[S],C=(((j=l.arrow)==null?void 0:j.x)??0)+g/2,E=(((F=l.arrow)==null?void 0:F.y)??0)+b/2;let A="",M="";return _==="bottom"?(A=f?R:`${C}px`,M=`${-b}px`):_==="top"?(A=f?R:`${C}px`,M=`${o.floating.height+b}px`):_==="right"?(A=`${-b}px`,M=f?R:`${E}px`):_==="left"&&(A=`${o.floating.width+b}px`,M=f?R:`${E}px`),{data:{x:A,y:M}}}});function getSideAndAlignFromPlacement(e){const[t,n="center"]=e.split("-");return[t,n]}var Root2$7=Popper,Anchor=PopperAnchor,Content$2=PopperContent,Arrow=PopperArrow;function createSlot$3(e){const t=createSlotClone$3(e),n=React__namespace.forwardRef((o,l)=>{const{children:d,...f}=o,g=React__namespace.Children.toArray(d),b=g.find(isSlottable$3);if(b){const _=b.props.children,S=g.map(R=>R===b?React__namespace.Children.count(_)>1?React__namespace.Children.only(null):React__namespace.isValidElement(_)?_.props.children:null:R);return jsxRuntime.jsx(t,{...f,ref:l,children:React__namespace.isValidElement(_)?React__namespace.cloneElement(_,void 0,S):null})}return jsxRuntime.jsx(t,{...f,ref:l,children:d})});return n.displayName=`${e}.Slot`,n}function createSlotClone$3(e){const t=React__namespace.forwardRef((n,o)=>{const{children:l,...d}=n;if(React__namespace.isValidElement(l)){const f=getElementRef$3(l),g=mergeProps$3(d,l.props);return l.type!==React__namespace.Fragment&&(g.ref=o?composeRefs(o,f):f),React__namespace.cloneElement(l,g)}return React__namespace.Children.count(l)>1?React__namespace.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var SLOTTABLE_IDENTIFIER$5=Symbol("radix.slottable");function isSlottable$3(e){return React__namespace.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===SLOTTABLE_IDENTIFIER$5}function mergeProps$3(e,t){const n={...t};for(const o in t){const l=e[o],d=t[o];/^on[A-Z]/.test(o)?l&&d?n[o]=(...g)=>{const b=d(...g);return l(...g),b}:l&&(n[o]=l):o==="style"?n[o]={...l,...d}:o==="className"&&(n[o]=[l,d].filter(Boolean).join(" "))}return{...e,...n}}function getElementRef$3(e){var o,l;let t=(o=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(l=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:l.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var SELECTION_KEYS$1=["Enter"," "],FIRST_KEYS=["ArrowDown","PageUp","Home"],LAST_KEYS=["ArrowUp","PageDown","End"],FIRST_LAST_KEYS=[...FIRST_KEYS,...LAST_KEYS],SUB_OPEN_KEYS={ltr:[...SELECTION_KEYS$1,"ArrowRight"],rtl:[...SELECTION_KEYS$1,"ArrowLeft"]},SUB_CLOSE_KEYS={ltr:["ArrowLeft"],rtl:["ArrowRight"]},MENU_NAME="Menu",[Collection$3,useCollection$3,createCollectionScope$3]=createCollection(MENU_NAME),[createMenuContext,createMenuScope]=createContextScope$2(MENU_NAME,[createCollectionScope$3,createPopperScope,createRovingFocusGroupScope]),usePopperScope$3=createPopperScope(),useRovingFocusGroupScope$1=createRovingFocusGroupScope(),[MenuProvider,useMenuContext]=createMenuContext(MENU_NAME),[MenuRootProvider,useMenuRootContext]=createMenuContext(MENU_NAME),Menu=e=>{const{__scopeMenu:t,open:n=!1,children:o,dir:l,onOpenChange:d,modal:f=!0}=e,g=usePopperScope$3(t),[b,_]=React__namespace.useState(null),S=React__namespace.useRef(!1),R=useCallbackRef$1(d),C=useDirection(l);return React__namespace.useEffect(()=>{const E=()=>{S.current=!0,document.addEventListener("pointerdown",A,{capture:!0,once:!0}),document.addEventListener("pointermove",A,{capture:!0,once:!0})},A=()=>S.current=!1;return document.addEventListener("keydown",E,{capture:!0}),()=>{document.removeEventListener("keydown",E,{capture:!0}),document.removeEventListener("pointerdown",A,{capture:!0}),document.removeEventListener("pointermove",A,{capture:!0})}},[]),jsxRuntime.jsx(Root2$7,{...g,children:jsxRuntime.jsx(MenuProvider,{scope:t,open:n,onOpenChange:R,content:b,onContentChange:_,children:jsxRuntime.jsx(MenuRootProvider,{scope:t,onClose:React__namespace.useCallback(()=>R(!1),[R]),isUsingKeyboardRef:S,dir:C,modal:f,children:o})})})};Menu.displayName=MENU_NAME;var ANCHOR_NAME$1="MenuAnchor",MenuAnchor=React__namespace.forwardRef((e,t)=>{const{__scopeMenu:n,...o}=e,l=usePopperScope$3(n);return jsxRuntime.jsx(Anchor,{...l,...o,ref:t})});MenuAnchor.displayName=ANCHOR_NAME$1;var PORTAL_NAME$5="MenuPortal",[PortalProvider$2,usePortalContext$2]=createMenuContext(PORTAL_NAME$5,{forceMount:void 0}),MenuPortal=e=>{const{__scopeMenu:t,forceMount:n,children:o,container:l}=e,d=useMenuContext(PORTAL_NAME$5,t);return jsxRuntime.jsx(PortalProvider$2,{scope:t,forceMount:n,children:jsxRuntime.jsx(Presence,{present:n||d.open,children:jsxRuntime.jsx(Portal$5,{asChild:!0,container:l,children:o})})})};MenuPortal.displayName=PORTAL_NAME$5;var CONTENT_NAME$8="MenuContent",[MenuContentProvider,useMenuContentContext]=createMenuContext(CONTENT_NAME$8),MenuContent=React__namespace.forwardRef((e,t)=>{const n=usePortalContext$2(CONTENT_NAME$8,e.__scopeMenu),{forceMount:o=n.forceMount,...l}=e,d=useMenuContext(CONTENT_NAME$8,e.__scopeMenu),f=useMenuRootContext(CONTENT_NAME$8,e.__scopeMenu);return jsxRuntime.jsx(Collection$3.Provider,{scope:e.__scopeMenu,children:jsxRuntime.jsx(Presence,{present:o||d.open,children:jsxRuntime.jsx(Collection$3.Slot,{scope:e.__scopeMenu,children:f.modal?jsxRuntime.jsx(MenuRootContentModal,{...l,ref:t}):jsxRuntime.jsx(MenuRootContentNonModal,{...l,ref:t})})})})}),MenuRootContentModal=React__namespace.forwardRef((e,t)=>{const n=useMenuContext(CONTENT_NAME$8,e.__scopeMenu),o=React__namespace.useRef(null),l=useComposedRefs(t,o);return React__namespace.useEffect(()=>{const d=o.current;if(d)return hideOthers(d)},[]),jsxRuntime.jsx(MenuContentImpl,{...e,ref:l,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:composeEventHandlers(e.onFocusOutside,d=>d.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)})}),MenuRootContentNonModal=React__namespace.forwardRef((e,t)=>{const n=useMenuContext(CONTENT_NAME$8,e.__scopeMenu);return jsxRuntime.jsx(MenuContentImpl,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)})}),Slot$3=createSlot$3("MenuContent.ScrollLock"),MenuContentImpl=React__namespace.forwardRef((e,t)=>{const{__scopeMenu:n,loop:o=!1,trapFocus:l,onOpenAutoFocus:d,onCloseAutoFocus:f,disableOutsidePointerEvents:g,onEntryFocus:b,onEscapeKeyDown:_,onPointerDownOutside:S,onFocusOutside:R,onInteractOutside:C,onDismiss:E,disableOutsideScroll:A,...M}=e,I=useMenuContext(CONTENT_NAME$8,n),j=useMenuRootContext(CONTENT_NAME$8,n),F=usePopperScope$3(n),z=useRovingFocusGroupScope$1(n),Q=useCollection$3(n),[O,V]=React__namespace.useState(null),te=React__namespace.useRef(null),ne=useComposedRefs(t,te,I.onContentChange),ae=React__namespace.useRef(0),$e=React__namespace.useRef(""),ge=React__namespace.useRef(0),se=React__namespace.useRef(null),je=React__namespace.useRef("right"),Ae=React__namespace.useRef(0),Ne=A?ReactRemoveScroll:React__namespace.Fragment,Ve=A?{as:Slot$3,allowPinchZoom:!0}:void 0,Fe=Be=>{var Ke,at;const Ue=$e.current+Be,ze=Q().filter(rt=>!rt.disabled),He=document.activeElement,Qe=(Ke=ze.find(rt=>rt.ref.current===He))==null?void 0:Ke.textValue,et=ze.map(rt=>rt.textValue),Je=getNextMatch(et,Ue,Qe),Ze=(at=ze.find(rt=>rt.textValue===Je))==null?void 0:at.ref.current;(function rt(st){$e.current=st,window.clearTimeout(ae.current),st!==""&&(ae.current=window.setTimeout(()=>rt(""),1e3))})(Ue),Ze&&setTimeout(()=>Ze.focus())};React__namespace.useEffect(()=>()=>window.clearTimeout(ae.current),[]),useFocusGuards();const Oe=React__namespace.useCallback(Be=>{var ze,He;return je.current===((ze=se.current)==null?void 0:ze.side)&&isPointerInGraceArea(Be,(He=se.current)==null?void 0:He.area)},[]);return jsxRuntime.jsx(MenuContentProvider,{scope:n,searchRef:$e,onItemEnter:React__namespace.useCallback(Be=>{Oe(Be)&&Be.preventDefault()},[Oe]),onItemLeave:React__namespace.useCallback(Be=>{var Ue;Oe(Be)||((Ue=te.current)==null||Ue.focus(),V(null))},[Oe]),onTriggerLeave:React__namespace.useCallback(Be=>{Oe(Be)&&Be.preventDefault()},[Oe]),pointerGraceTimerRef:ge,onPointerGraceIntentChange:React__namespace.useCallback(Be=>{se.current=Be},[]),children:jsxRuntime.jsx(Ne,{...Ve,children:jsxRuntime.jsx(FocusScope,{asChild:!0,trapped:l,onMountAutoFocus:composeEventHandlers(d,Be=>{var Ue;Be.preventDefault(),(Ue=te.current)==null||Ue.focus({preventScroll:!0})}),onUnmountAutoFocus:f,children:jsxRuntime.jsx(DismissableLayer,{asChild:!0,disableOutsidePointerEvents:g,onEscapeKeyDown:_,onPointerDownOutside:S,onFocusOutside:R,onInteractOutside:C,onDismiss:E,children:jsxRuntime.jsx(Root$c,{asChild:!0,...z,dir:j.dir,orientation:"vertical",loop:o,currentTabStopId:O,onCurrentTabStopIdChange:V,onEntryFocus:composeEventHandlers(b,Be=>{j.isUsingKeyboardRef.current||Be.preventDefault()}),preventScrollOnEntryFocus:!0,children:jsxRuntime.jsx(Content$2,{role:"menu","aria-orientation":"vertical","data-state":getOpenState(I.open),"data-radix-menu-content":"",dir:j.dir,...F,...M,ref:ne,style:{outline:"none",...M.style},onKeyDown:composeEventHandlers(M.onKeyDown,Be=>{const ze=Be.target.closest("[data-radix-menu-content]")===Be.currentTarget,He=Be.ctrlKey||Be.altKey||Be.metaKey,Qe=Be.key.length===1;ze&&(Be.key==="Tab"&&Be.preventDefault(),!He&&Qe&&Fe(Be.key));const et=te.current;if(Be.target!==et||!FIRST_LAST_KEYS.includes(Be.key))return;Be.preventDefault();const Ze=Q().filter(Ke=>!Ke.disabled).map(Ke=>Ke.ref.current);LAST_KEYS.includes(Be.key)&&Ze.reverse(),focusFirst$1(Ze)}),onBlur:composeEventHandlers(e.onBlur,Be=>{Be.currentTarget.contains(Be.target)||(window.clearTimeout(ae.current),$e.current="")}),onPointerMove:composeEventHandlers(e.onPointerMove,whenMouse(Be=>{const Ue=Be.target,ze=Ae.current!==Be.clientX;if(Be.currentTarget.contains(Ue)&&ze){const He=Be.clientX>Ae.current?"right":"left";je.current=He,Ae.current=Be.clientX}}))})})})})})})});MenuContent.displayName=CONTENT_NAME$8;var GROUP_NAME$2="MenuGroup",MenuGroup=React__namespace.forwardRef((e,t)=>{const{__scopeMenu:n,...o}=e;return jsxRuntime.jsx(Primitive$4.div,{role:"group",...o,ref:t})});MenuGroup.displayName=GROUP_NAME$2;var LABEL_NAME$2="MenuLabel",MenuLabel=React__namespace.forwardRef((e,t)=>{const{__scopeMenu:n,...o}=e;return jsxRuntime.jsx(Primitive$4.div,{...o,ref:t})});MenuLabel.displayName=LABEL_NAME$2;var ITEM_NAME$3="MenuItem",ITEM_SELECT="menu.itemSelect",MenuItem=React__namespace.forwardRef((e,t)=>{const{disabled:n=!1,onSelect:o,...l}=e,d=React__namespace.useRef(null),f=useMenuRootContext(ITEM_NAME$3,e.__scopeMenu),g=useMenuContentContext(ITEM_NAME$3,e.__scopeMenu),b=useComposedRefs(t,d),_=React__namespace.useRef(!1),S=()=>{const R=d.current;if(!n&&R){const C=new CustomEvent(ITEM_SELECT,{bubbles:!0,cancelable:!0});R.addEventListener(ITEM_SELECT,E=>o==null?void 0:o(E),{once:!0}),dispatchDiscreteCustomEvent(R,C),C.defaultPrevented?_.current=!1:f.onClose()}};return jsxRuntime.jsx(MenuItemImpl,{...l,ref:b,disabled:n,onClick:composeEventHandlers(e.onClick,S),onPointerDown:R=>{var C;(C=e.onPointerDown)==null||C.call(e,R),_.current=!0},onPointerUp:composeEventHandlers(e.onPointerUp,R=>{var C;_.current||(C=R.currentTarget)==null||C.click()}),onKeyDown:composeEventHandlers(e.onKeyDown,R=>{const C=g.searchRef.current!=="";n||C&&R.key===" "||SELECTION_KEYS$1.includes(R.key)&&(R.currentTarget.click(),R.preventDefault())})})});MenuItem.displayName=ITEM_NAME$3;var MenuItemImpl=React__namespace.forwardRef((e,t)=>{const{__scopeMenu:n,disabled:o=!1,textValue:l,...d}=e,f=useMenuContentContext(ITEM_NAME$3,n),g=useRovingFocusGroupScope$1(n),b=React__namespace.useRef(null),_=useComposedRefs(t,b),[S,R]=React__namespace.useState(!1),[C,E]=React__namespace.useState("");return React__namespace.useEffect(()=>{const A=b.current;A&&E((A.textContent??"").trim())},[d.children]),jsxRuntime.jsx(Collection$3.ItemSlot,{scope:n,disabled:o,textValue:l??C,children:jsxRuntime.jsx(Item$3,{asChild:!0,...g,focusable:!o,children:jsxRuntime.jsx(Primitive$4.div,{role:"menuitem","data-highlighted":S?"":void 0,"aria-disabled":o||void 0,"data-disabled":o?"":void 0,...d,ref:_,onPointerMove:composeEventHandlers(e.onPointerMove,whenMouse(A=>{o?f.onItemLeave(A):(f.onItemEnter(A),A.defaultPrevented||A.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:composeEventHandlers(e.onPointerLeave,whenMouse(A=>f.onItemLeave(A))),onFocus:composeEventHandlers(e.onFocus,()=>R(!0)),onBlur:composeEventHandlers(e.onBlur,()=>R(!1))})})})}),CHECKBOX_ITEM_NAME$1="MenuCheckboxItem",MenuCheckboxItem=React__namespace.forwardRef((e,t)=>{const{checked:n=!1,onCheckedChange:o,...l}=e;return jsxRuntime.jsx(ItemIndicatorProvider,{scope:e.__scopeMenu,checked:n,children:jsxRuntime.jsx(MenuItem,{role:"menuitemcheckbox","aria-checked":isIndeterminate$1(n)?"mixed":n,...l,ref:t,"data-state":getCheckedState(n),onSelect:composeEventHandlers(l.onSelect,()=>o==null?void 0:o(isIndeterminate$1(n)?!0:!n),{checkForDefaultPrevented:!1})})})});MenuCheckboxItem.displayName=CHECKBOX_ITEM_NAME$1;var RADIO_GROUP_NAME$1="MenuRadioGroup",[RadioGroupProvider,useRadioGroupContext]=createMenuContext(RADIO_GROUP_NAME$1,{value:void 0,onValueChange:()=>{}}),MenuRadioGroup=React__namespace.forwardRef((e,t)=>{const{value:n,onValueChange:o,...l}=e,d=useCallbackRef$1(o);return jsxRuntime.jsx(RadioGroupProvider,{scope:e.__scopeMenu,value:n,onValueChange:d,children:jsxRuntime.jsx(MenuGroup,{...l,ref:t})})});MenuRadioGroup.displayName=RADIO_GROUP_NAME$1;var RADIO_ITEM_NAME$1="MenuRadioItem",MenuRadioItem=React__namespace.forwardRef((e,t)=>{const{value:n,...o}=e,l=useRadioGroupContext(RADIO_ITEM_NAME$1,e.__scopeMenu),d=n===l.value;return jsxRuntime.jsx(ItemIndicatorProvider,{scope:e.__scopeMenu,checked:d,children:jsxRuntime.jsx(MenuItem,{role:"menuitemradio","aria-checked":d,...o,ref:t,"data-state":getCheckedState(d),onSelect:composeEventHandlers(o.onSelect,()=>{var f;return(f=l.onValueChange)==null?void 0:f.call(l,n)},{checkForDefaultPrevented:!1})})})});MenuRadioItem.displayName=RADIO_ITEM_NAME$1;var ITEM_INDICATOR_NAME$1="MenuItemIndicator",[ItemIndicatorProvider,useItemIndicatorContext]=createMenuContext(ITEM_INDICATOR_NAME$1,{checked:!1}),MenuItemIndicator=React__namespace.forwardRef((e,t)=>{const{__scopeMenu:n,forceMount:o,...l}=e,d=useItemIndicatorContext(ITEM_INDICATOR_NAME$1,n);return jsxRuntime.jsx(Presence,{present:o||isIndeterminate$1(d.checked)||d.checked===!0,children:jsxRuntime.jsx(Primitive$4.span,{...l,ref:t,"data-state":getCheckedState(d.checked)})})});MenuItemIndicator.displayName=ITEM_INDICATOR_NAME$1;var SEPARATOR_NAME$2="MenuSeparator",MenuSeparator=React__namespace.forwardRef((e,t)=>{const{__scopeMenu:n,...o}=e;return jsxRuntime.jsx(Primitive$4.div,{role:"separator","aria-orientation":"horizontal",...o,ref:t})});MenuSeparator.displayName=SEPARATOR_NAME$2;var ARROW_NAME$4="MenuArrow",MenuArrow=React__namespace.forwardRef((e,t)=>{const{__scopeMenu:n,...o}=e,l=usePopperScope$3(n);return jsxRuntime.jsx(Arrow,{...l,...o,ref:t})});MenuArrow.displayName=ARROW_NAME$4;var SUB_NAME="MenuSub",[MenuSubProvider,useMenuSubContext]=createMenuContext(SUB_NAME),MenuSub=e=>{const{__scopeMenu:t,children:n,open:o=!1,onOpenChange:l}=e,d=useMenuContext(SUB_NAME,t),f=usePopperScope$3(t),[g,b]=React__namespace.useState(null),[_,S]=React__namespace.useState(null),R=useCallbackRef$1(l);return React__namespace.useEffect(()=>(d.open===!1&&R(!1),()=>R(!1)),[d.open,R]),jsxRuntime.jsx(Root2$7,{...f,children:jsxRuntime.jsx(MenuProvider,{scope:t,open:o,onOpenChange:R,content:_,onContentChange:S,children:jsxRuntime.jsx(MenuSubProvider,{scope:t,contentId:useId(),triggerId:useId(),trigger:g,onTriggerChange:b,children:n})})})};MenuSub.displayName=SUB_NAME;var SUB_TRIGGER_NAME$1="MenuSubTrigger",MenuSubTrigger=React__namespace.forwardRef((e,t)=>{const n=useMenuContext(SUB_TRIGGER_NAME$1,e.__scopeMenu),o=useMenuRootContext(SUB_TRIGGER_NAME$1,e.__scopeMenu),l=useMenuSubContext(SUB_TRIGGER_NAME$1,e.__scopeMenu),d=useMenuContentContext(SUB_TRIGGER_NAME$1,e.__scopeMenu),f=React__namespace.useRef(null),{pointerGraceTimerRef:g,onPointerGraceIntentChange:b}=d,_={__scopeMenu:e.__scopeMenu},S=React__namespace.useCallback(()=>{f.current&&window.clearTimeout(f.current),f.current=null},[]);return React__namespace.useEffect(()=>S,[S]),React__namespace.useEffect(()=>{const R=g.current;return()=>{window.clearTimeout(R),b(null)}},[g,b]),jsxRuntime.jsx(MenuAnchor,{asChild:!0,..._,children:jsxRuntime.jsx(MenuItemImpl,{id:l.triggerId,"aria-haspopup":"menu","aria-expanded":n.open,"aria-controls":l.contentId,"data-state":getOpenState(n.open),...e,ref:composeRefs(t,l.onTriggerChange),onClick:R=>{var C;(C=e.onClick)==null||C.call(e,R),!(e.disabled||R.defaultPrevented)&&(R.currentTarget.focus(),n.open||n.onOpenChange(!0))},onPointerMove:composeEventHandlers(e.onPointerMove,whenMouse(R=>{d.onItemEnter(R),!R.defaultPrevented&&!e.disabled&&!n.open&&!f.current&&(d.onPointerGraceIntentChange(null),f.current=window.setTimeout(()=>{n.onOpenChange(!0),S()},100))})),onPointerLeave:composeEventHandlers(e.onPointerLeave,whenMouse(R=>{var E,A;S();const C=(E=n.content)==null?void 0:E.getBoundingClientRect();if(C){const M=(A=n.content)==null?void 0:A.dataset.side,I=M==="right",j=I?-5:5,F=C[I?"left":"right"],z=C[I?"right":"left"];d.onPointerGraceIntentChange({area:[{x:R.clientX+j,y:R.clientY},{x:F,y:C.top},{x:z,y:C.top},{x:z,y:C.bottom},{x:F,y:C.bottom}],side:M}),window.clearTimeout(g.current),g.current=window.setTimeout(()=>d.onPointerGraceIntentChange(null),300)}else{if(d.onTriggerLeave(R),R.defaultPrevented)return;d.onPointerGraceIntentChange(null)}})),onKeyDown:composeEventHandlers(e.onKeyDown,R=>{var E;const C=d.searchRef.current!=="";e.disabled||C&&R.key===" "||SUB_OPEN_KEYS[o.dir].includes(R.key)&&(n.onOpenChange(!0),(E=n.content)==null||E.focus(),R.preventDefault())})})})});MenuSubTrigger.displayName=SUB_TRIGGER_NAME$1;var SUB_CONTENT_NAME$1="MenuSubContent",MenuSubContent=React__namespace.forwardRef((e,t)=>{const n=usePortalContext$2(CONTENT_NAME$8,e.__scopeMenu),{forceMount:o=n.forceMount,...l}=e,d=useMenuContext(CONTENT_NAME$8,e.__scopeMenu),f=useMenuRootContext(CONTENT_NAME$8,e.__scopeMenu),g=useMenuSubContext(SUB_CONTENT_NAME$1,e.__scopeMenu),b=React__namespace.useRef(null),_=useComposedRefs(t,b);return jsxRuntime.jsx(Collection$3.Provider,{scope:e.__scopeMenu,children:jsxRuntime.jsx(Presence,{present:o||d.open,children:jsxRuntime.jsx(Collection$3.Slot,{scope:e.__scopeMenu,children:jsxRuntime.jsx(MenuContentImpl,{id:g.contentId,"aria-labelledby":g.triggerId,...l,ref:_,align:"start",side:f.dir==="rtl"?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:S=>{var R;f.isUsingKeyboardRef.current&&((R=b.current)==null||R.focus()),S.preventDefault()},onCloseAutoFocus:S=>S.preventDefault(),onFocusOutside:composeEventHandlers(e.onFocusOutside,S=>{S.target!==g.trigger&&d.onOpenChange(!1)}),onEscapeKeyDown:composeEventHandlers(e.onEscapeKeyDown,S=>{f.onClose(),S.preventDefault()}),onKeyDown:composeEventHandlers(e.onKeyDown,S=>{var E;const R=S.currentTarget.contains(S.target),C=SUB_CLOSE_KEYS[f.dir].includes(S.key);R&&C&&(d.onOpenChange(!1),(E=g.trigger)==null||E.focus(),S.preventDefault())})})})})})});MenuSubContent.displayName=SUB_CONTENT_NAME$1;function getOpenState(e){return e?"open":"closed"}function isIndeterminate$1(e){return e==="indeterminate"}function getCheckedState(e){return isIndeterminate$1(e)?"indeterminate":e?"checked":"unchecked"}function focusFirst$1(e){const t=document.activeElement;for(const n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function wrapArray$1(e,t){return e.map((n,o)=>e[(t+o)%e.length])}function getNextMatch(e,t,n){const l=t.length>1&&Array.from(t).every(_=>_===t[0])?t[0]:t,d=n?e.indexOf(n):-1;let f=wrapArray$1(e,Math.max(d,0));l.length===1&&(f=f.filter(_=>_!==n));const b=f.find(_=>_.toLowerCase().startsWith(l.toLowerCase()));return b!==n?b:void 0}function isPointInPolygon$1(e,t){const{x:n,y:o}=e;let l=!1;for(let d=0,f=t.length-1;d<t.length;f=d++){const g=t[d],b=t[f],_=g.x,S=g.y,R=b.x,C=b.y;S>o!=C>o&&n<(R-_)*(o-S)/(C-S)+_&&(l=!l)}return l}function isPointerInGraceArea(e,t){if(!t)return!1;const n={x:e.clientX,y:e.clientY};return isPointInPolygon$1(n,t)}function whenMouse(e){return t=>t.pointerType==="mouse"?e(t):void 0}var Root3$1=Menu,Anchor2$1=MenuAnchor,Portal$3=MenuPortal,Content2$6=MenuContent,Group$1=MenuGroup,Label$4=MenuLabel,Item2$1=MenuItem,CheckboxItem=MenuCheckboxItem,RadioGroup=MenuRadioGroup,RadioItem=MenuRadioItem,ItemIndicator$1=MenuItemIndicator,Separator$3=MenuSeparator,Arrow2=MenuArrow,Sub=MenuSub,SubTrigger=MenuSubTrigger,SubContent=MenuSubContent,DROPDOWN_MENU_NAME="DropdownMenu",[createDropdownMenuContext]=createContextScope$2(DROPDOWN_MENU_NAME,[createMenuScope]),useMenuScope=createMenuScope(),[DropdownMenuProvider,useDropdownMenuContext]=createDropdownMenuContext(DROPDOWN_MENU_NAME),DropdownMenu$1=e=>{const{__scopeDropdownMenu:t,children:n,dir:o,open:l,defaultOpen:d,onOpenChange:f,modal:g=!0}=e,b=useMenuScope(t),_=React__namespace.useRef(null),[S,R]=useControllableState({prop:l,defaultProp:d??!1,onChange:f,caller:DROPDOWN_MENU_NAME});return jsxRuntime.jsx(DropdownMenuProvider,{scope:t,triggerId:useId(),triggerRef:_,contentId:useId(),open:S,onOpenChange:R,onOpenToggle:React__namespace.useCallback(()=>R(C=>!C),[R]),modal:g,children:jsxRuntime.jsx(Root3$1,{...b,open:S,onOpenChange:R,dir:o,modal:g,children:n})})};DropdownMenu$1.displayName=DROPDOWN_MENU_NAME;var TRIGGER_NAME$8="DropdownMenuTrigger",DropdownMenuTrigger$1=React__namespace.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,disabled:o=!1,...l}=e,d=useDropdownMenuContext(TRIGGER_NAME$8,n),f=useMenuScope(n);return jsxRuntime.jsx(Anchor2$1,{asChild:!0,...f,children:jsxRuntime.jsx(Primitive$4.button,{type:"button",id:d.triggerId,"aria-haspopup":"menu","aria-expanded":d.open,"aria-controls":d.open?d.contentId:void 0,"data-state":d.open?"open":"closed","data-disabled":o?"":void 0,disabled:o,...l,ref:composeRefs(t,d.triggerRef),onPointerDown:composeEventHandlers(e.onPointerDown,g=>{!o&&g.button===0&&g.ctrlKey===!1&&(d.onOpenToggle(),d.open||g.preventDefault())}),onKeyDown:composeEventHandlers(e.onKeyDown,g=>{o||(["Enter"," "].includes(g.key)&&d.onOpenToggle(),g.key==="ArrowDown"&&d.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(g.key)&&g.preventDefault())})})})});DropdownMenuTrigger$1.displayName=TRIGGER_NAME$8;var PORTAL_NAME$4="DropdownMenuPortal",DropdownMenuPortal$1=e=>{const{__scopeDropdownMenu:t,...n}=e,o=useMenuScope(t);return jsxRuntime.jsx(Portal$3,{...o,...n})};DropdownMenuPortal$1.displayName=PORTAL_NAME$4;var CONTENT_NAME$7="DropdownMenuContent",DropdownMenuContent$1=React__namespace.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,l=useDropdownMenuContext(CONTENT_NAME$7,n),d=useMenuScope(n),f=React__namespace.useRef(!1);return jsxRuntime.jsx(Content2$6,{id:l.contentId,"aria-labelledby":l.triggerId,...d,...o,ref:t,onCloseAutoFocus:composeEventHandlers(e.onCloseAutoFocus,g=>{var b;f.current||(b=l.triggerRef.current)==null||b.focus(),f.current=!1,g.preventDefault()}),onInteractOutside:composeEventHandlers(e.onInteractOutside,g=>{const b=g.detail.originalEvent,_=b.button===0&&b.ctrlKey===!0,S=b.button===2||_;(!l.modal||S)&&(f.current=!0)}),style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});DropdownMenuContent$1.displayName=CONTENT_NAME$7;var GROUP_NAME$1="DropdownMenuGroup",DropdownMenuGroup$1=React__namespace.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,l=useMenuScope(n);return jsxRuntime.jsx(Group$1,{...l,...o,ref:t})});DropdownMenuGroup$1.displayName=GROUP_NAME$1;var LABEL_NAME$1="DropdownMenuLabel",DropdownMenuLabel$1=React__namespace.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,l=useMenuScope(n);return jsxRuntime.jsx(Label$4,{...l,...o,ref:t})});DropdownMenuLabel$1.displayName=LABEL_NAME$1;var ITEM_NAME$2="DropdownMenuItem",DropdownMenuItem$1=React__namespace.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,l=useMenuScope(n);return jsxRuntime.jsx(Item2$1,{...l,...o,ref:t})});DropdownMenuItem$1.displayName=ITEM_NAME$2;var CHECKBOX_ITEM_NAME="DropdownMenuCheckboxItem",DropdownMenuCheckboxItem$1=React__namespace.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,l=useMenuScope(n);return jsxRuntime.jsx(CheckboxItem,{...l,...o,ref:t})});DropdownMenuCheckboxItem$1.displayName=CHECKBOX_ITEM_NAME;var RADIO_GROUP_NAME="DropdownMenuRadioGroup",DropdownMenuRadioGroup$1=React__namespace.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,l=useMenuScope(n);return jsxRuntime.jsx(RadioGroup,{...l,...o,ref:t})});DropdownMenuRadioGroup$1.displayName=RADIO_GROUP_NAME;var RADIO_ITEM_NAME="DropdownMenuRadioItem",DropdownMenuRadioItem$1=React__namespace.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,l=useMenuScope(n);return jsxRuntime.jsx(RadioItem,{...l,...o,ref:t})});DropdownMenuRadioItem$1.displayName=RADIO_ITEM_NAME;var INDICATOR_NAME$2="DropdownMenuItemIndicator",DropdownMenuItemIndicator=React__namespace.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,l=useMenuScope(n);return jsxRuntime.jsx(ItemIndicator$1,{...l,...o,ref:t})});DropdownMenuItemIndicator.displayName=INDICATOR_NAME$2;var SEPARATOR_NAME$1="DropdownMenuSeparator",DropdownMenuSeparator$1=React__namespace.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,l=useMenuScope(n);return jsxRuntime.jsx(Separator$3,{...l,...o,ref:t})});DropdownMenuSeparator$1.displayName=SEPARATOR_NAME$1;var ARROW_NAME$3="DropdownMenuArrow",DropdownMenuArrow=React__namespace.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,l=useMenuScope(n);return jsxRuntime.jsx(Arrow2,{...l,...o,ref:t})});DropdownMenuArrow.displayName=ARROW_NAME$3;var DropdownMenuSub$1=e=>{const{__scopeDropdownMenu:t,children:n,open:o,onOpenChange:l,defaultOpen:d}=e,f=useMenuScope(t),[g,b]=useControllableState({prop:o,defaultProp:d??!1,onChange:l,caller:"DropdownMenuSub"});return jsxRuntime.jsx(Sub,{...f,open:g,onOpenChange:b,children:n})},SUB_TRIGGER_NAME="DropdownMenuSubTrigger",DropdownMenuSubTrigger$1=React__namespace.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,l=useMenuScope(n);return jsxRuntime.jsx(SubTrigger,{...l,...o,ref:t})});DropdownMenuSubTrigger$1.displayName=SUB_TRIGGER_NAME;var SUB_CONTENT_NAME="DropdownMenuSubContent",DropdownMenuSubContent$1=React__namespace.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,l=useMenuScope(n);return jsxRuntime.jsx(SubContent,{...l,...o,ref:t,style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});DropdownMenuSubContent$1.displayName=SUB_CONTENT_NAME;var Root2$6=DropdownMenu$1,Trigger$5=DropdownMenuTrigger$1,Portal2$1=DropdownMenuPortal$1,Content2$5=DropdownMenuContent$1,Group2=DropdownMenuGroup$1,Label2=DropdownMenuLabel$1,Item2=DropdownMenuItem$1,CheckboxItem2=DropdownMenuCheckboxItem$1,RadioGroup2=DropdownMenuRadioGroup$1,RadioItem2=DropdownMenuRadioItem$1,ItemIndicator2=DropdownMenuItemIndicator,Separator2=DropdownMenuSeparator$1,Sub2=DropdownMenuSub$1,SubTrigger2=DropdownMenuSubTrigger$1,SubContent2=DropdownMenuSubContent$1;const DropdownMenu=Root2$6,DropdownMenuTrigger=Trigger$5,DropdownMenuGroup=Group2,DropdownMenuPortal=Portal2$1,DropdownMenuSub=Sub2,DropdownMenuRadioGroup=RadioGroup2,DropdownMenuSubTrigger=React__namespace.forwardRef(({className:e,inset:t,children:n,...o},l)=>jsxRuntime.jsxs(SubTrigger2,{ref:l,className:cn("flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent data-[state=open]:bg-accent [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",t&&"pl-8",e),...o,children:[n,jsxRuntime.jsx(ChevronRight,{className:"ml-auto"})]}));DropdownMenuSubTrigger.displayName=SubTrigger2.displayName;const DropdownMenuSubContent=React__namespace.forwardRef(({className:e,...t},n)=>jsxRuntime.jsx(SubContent2,{ref:n,className:cn("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 origin-[--radix-dropdown-menu-content-transform-origin]",e),...t}));DropdownMenuSubContent.displayName=SubContent2.displayName;const DropdownMenuContent=React__namespace.forwardRef(({className:e,sideOffset:t=4,...n},o)=>jsxRuntime.jsx(Portal2$1,{children:jsxRuntime.jsx(Content2$5,{ref:o,sideOffset:t,className:cn("z-50 max-h-[var(--radix-dropdown-menu-content-available-height)] min-w-[8rem] overflow-y-auto overflow-x-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md","data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 origin-[--radix-dropdown-menu-content-transform-origin]",e),...n})}));DropdownMenuContent.displayName=Content2$5.displayName;const DropdownMenuItem=React__namespace.forwardRef(({className:e,inset:t,...n},o)=>jsxRuntime.jsx(Item2,{ref:o,className:cn("relative flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&>svg]:size-4 [&>svg]:shrink-0",t&&"pl-8",e),...n}));DropdownMenuItem.displayName=Item2.displayName;const DropdownMenuCheckboxItem=React__namespace.forwardRef(({className:e,children:t,checked:n,...o},l)=>jsxRuntime.jsxs(CheckboxItem2,{ref:l,className:cn("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),checked:n,...o,children:[jsxRuntime.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:jsxRuntime.jsx(ItemIndicator2,{children:jsxRuntime.jsx(Check,{className:"h-4 w-4"})})}),t]}));DropdownMenuCheckboxItem.displayName=CheckboxItem2.displayName;const DropdownMenuRadioItem=React__namespace.forwardRef(({className:e,children:t,...n},o)=>jsxRuntime.jsxs(RadioItem2,{ref:o,className:cn("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...n,children:[jsxRuntime.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:jsxRuntime.jsx(ItemIndicator2,{children:jsxRuntime.jsx(Circle,{className:"h-2 w-2 fill-current"})})}),t]}));DropdownMenuRadioItem.displayName=RadioItem2.displayName;const DropdownMenuLabel=React__namespace.forwardRef(({className:e,inset:t,...n},o)=>jsxRuntime.jsx(Label2,{ref:o,className:cn("px-2 py-1.5 text-sm font-semibold",t&&"pl-8",e),...n}));DropdownMenuLabel.displayName=Label2.displayName;const DropdownMenuSeparator=React__namespace.forwardRef(({className:e,...t},n)=>jsxRuntime.jsx(Separator2,{ref:n,className:cn("-mx-1 my-1 h-px bg-muted",e),...t}));DropdownMenuSeparator.displayName=Separator2.displayName;const DropdownMenuShortcut=({className:e,...t})=>jsxRuntime.jsx("span",{className:cn("ml-auto text-xs tracking-widest opacity-60",e),...t});DropdownMenuShortcut.displayName="DropdownMenuShortcut";function ProductInventoryGrid({inventory:e,showBinLocation:t,className:n}){const o=(F,z,Q=!1,O=!0)=>{const V=F.WarehouseType==="Fulfillment Center",te=V?"bg-white":"bg-white/70 text-gray-600",ne=O&&z>0?"border-t":"",ae=Q?"border-r":"",$e=F.Status??"Unknown",ge=$e==="Active";let se=V?"bg-emerald-100 text-emerald-800 ring-1 ring-emerald-200":"bg-gray-100 text-gray-700";switch($e){case"Closing":se="bg-yellow-100 text-yellow-800 ring-1 ring-yellow-200";break;case"Closed":se="bg-red-100 text-red-800 ring-1 ring-red-200";break}return jsxRuntime.jsxs("article",{"aria-labelledby":`wh-${F.WarehouseId}-name`,className:`p-3 text-sm ${ne} ${ae} ${te}`,children:[jsxRuntime.jsxs("div",{className:"flex items-start justify-between",children:[jsxRuntime.jsxs("div",{className:"flex items-center gap-3",children:[jsxRuntime.jsx("h3",{id:`wh-${F.WarehouseId}-name`,className:`text-sm font-medium ${V?"text-gray-900":"text-gray-800"}`,children:F.Name}),jsxRuntime.jsxs("span",{className:`inline-flex items-center gap-2 rounded-full px-2 py-0.5 text-xs font-semibold ${se}`,"aria-hidden":"false",title:ge?V?"Fulfillment Center":"Satellite Warehouse":`Status: ${$e}`,children:[V?jsxRuntime.jsx(Warehouse,{className:"h-3 w-3","aria-hidden":"true"}):jsxRuntime.jsx(Truck,{className:`h-3 w-3 ${ge?"opacity-80":"opacity-95"}`,"aria-hidden":"true"}),jsxRuntime.jsx("span",{className:"sr-only",children:ge?F.WarehouseType?`${F.WarehouseType} warehouse`:"Warehouse":`Status: ${$e}`}),jsxRuntime.jsx("span",{"aria-hidden":"true",children:ge?F.WarehouseType||(V?"Fulfillment Center":"Satellite"):$e})]})]}),jsxRuntime.jsx("div",{className:"text-right",children:jsxRuntime.jsx("div",{className:"text-sm font-medium",children:formatNumber(F.AvailableQuantity??0)})})]}),jsxRuntime.jsxs("div",{className:"flex justify-between mt-1 text-xs text-gray-600",children:[jsxRuntime.jsx("span",{children:"Expecting"}),jsxRuntime.jsx("span",{children:F.PurchaseOrderQuantity?formatNumber(F.PurchaseOrderQuantity):"—"})]}),t&&jsxRuntime.jsxs("div",{className:"flex justify-between mt-1 text-xs text-gray-600",children:[jsxRuntime.jsx("span",{children:"Bin Location"}),jsxRuntime.jsx("span",{children:F.BinLocation||"—"})]})]},`warehouse-${F.WarehouseId}`)},l=["MTL","TOR"],d=["VAN","EDM"],f=[...e].sort((F,z)=>(F.Name||"").localeCompare(z.Name||"")),g=f.filter(F=>F.Country==="US"),b=f.filter(F=>F.Country==="CA"),_=f.filter(F=>d.includes(F.WarehouseId||"")),S=f.filter(F=>l.includes(F.WarehouseId||"")),R=b.filter(F=>!l.includes(F.WarehouseId||"")&&!d.includes(F.WarehouseId||"")),C=F=>F.reduce((z,Q)=>z+(Q.AvailableQuantity||0),0),E=C(b),A=C(S),M=C(_),I=C(g),j=E+I;return jsxRuntime.jsxs("div",{className:`border rounded-md overflow-hidden ${n??""}`,children:[b.length>0&&g.length>0&&jsxRuntime.jsxs("div",{className:"grid grid-cols-2 border-b",children:[jsxRuntime.jsxs("div",{className:"p-3 font-semibold text-sm flex justify-between",children:[jsxRuntime.jsx("span",{children:"Total"}),jsxRuntime.jsx("span",{children:j})]}),jsxRuntime.jsx("div",{className:"p-3"})]}),b.length>0&&jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsxs("div",{className:"grid grid-cols-2 border-b bg-gray-50",children:[jsxRuntime.jsxs("div",{className:"p-3 font-semibold text-sm flex justify-between",children:[jsxRuntime.jsx("span",{children:"Canada"}),jsxRuntime.jsx("span",{children:formatNumber(E)})]}),jsxRuntime.jsx("div",{className:"p-3"})]}),jsxRuntime.jsxs("div",{className:"grid grid-cols-2",children:[jsxRuntime.jsxs("div",{className:"border-r",children:[jsxRuntime.jsxs("div",{className:"p-3 font-semibold text-sm flex justify-between",children:[jsxRuntime.jsx("span",{children:"West"}),jsxRuntime.jsx("span",{children:formatNumber(M)})]}),_.map((F,z)=>o(F,z))]}),jsxRuntime.jsxs("div",{children:[jsxRuntime.jsxs("div",{className:"p-3 font-semibold text-sm flex justify-between",children:[jsxRuntime.jsx("span",{children:"East"}),jsxRuntime.jsx("span",{children:formatNumber(A)})]}),S.map((F,z)=>o(F,z))]})]}),R.length>0&&jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx("div",{className:"border-t p-3 font-semibold text-sm",children:jsxRuntime.jsx("span",{children:"Other"})}),jsxRuntime.jsx("div",{className:"grid grid-cols-2",children:R.map((F,z)=>o(F,z,z%2===0,!0))})]})]}),g.length>0&&jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsxs("div",{className:"grid grid-cols-2 border-t bg-gray-50",children:[jsxRuntime.jsxs("div",{className:"p-3 font-semibold text-sm flex justify-between",children:[jsxRuntime.jsx("span",{children:"United States"}),jsxRuntime.jsx("span",{children:formatNumber(I)})]}),jsxRuntime.jsx("div",{className:"p-3"})]}),jsxRuntime.jsx("div",{className:"grid grid-cols-2",children:g.map((F,z)=>o(F,z,z%2===0,!0))})]}),e.length===0&&jsxRuntime.jsx("div",{className:"p-6 text-center text-gray-500",children:"No inventory information available"})]})}var REACT_LAZY_TYPE=Symbol.for("react.lazy"),use=React__namespace[" use ".trim().toString()];function isPromiseLike(e){return typeof e=="object"&&e!==null&&"then"in e}function isLazyComponent(e){return e!=null&&typeof e=="object"&&"$$typeof"in e&&e.$$typeof===REACT_LAZY_TYPE&&"_payload"in e&&isPromiseLike(e._payload)}function createSlot$2(e){const t=createSlotClone$2(e),n=React__namespace.forwardRef((o,l)=>{let{children:d,...f}=o;isLazyComponent(d)&&typeof use=="function"&&(d=use(d._payload));const g=React__namespace.Children.toArray(d),b=g.find(isSlottable$2);if(b){const _=b.props.children,S=g.map(R=>R===b?React__namespace.Children.count(_)>1?React__namespace.Children.only(null):React__namespace.isValidElement(_)?_.props.children:null:R);return jsxRuntime.jsx(t,{...f,ref:l,children:React__namespace.isValidElement(_)?React__namespace.cloneElement(_,void 0,S):null})}return jsxRuntime.jsx(t,{...f,ref:l,children:d})});return n.displayName=`${e}.Slot`,n}var Slot$2=createSlot$2("Slot");function createSlotClone$2(e){const t=React__namespace.forwardRef((n,o)=>{let{children:l,...d}=n;if(isLazyComponent(l)&&typeof use=="function"&&(l=use(l._payload)),React__namespace.isValidElement(l)){const f=getElementRef$2(l),g=mergeProps$2(d,l.props);return l.type!==React__namespace.Fragment&&(g.ref=o?composeRefs(o,f):f),React__namespace.cloneElement(l,g)}return React__namespace.Children.count(l)>1?React__namespace.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var SLOTTABLE_IDENTIFIER$4=Symbol("radix.slottable");function isSlottable$2(e){return React__namespace.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===SLOTTABLE_IDENTIFIER$4}function mergeProps$2(e,t){const n={...t};for(const o in t){const l=e[o],d=t[o];/^on[A-Z]/.test(o)?l&&d?n[o]=(...g)=>{const b=d(...g);return l(...g),b}:l&&(n[o]=l):o==="style"?n[o]={...l,...d}:o==="className"&&(n[o]=[l,d].filter(Boolean).join(" "))}return{...e,...n}}function getElementRef$2(e){var o,l;let t=(o=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(l=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:l.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}const falsyToString=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,cx=clsx,cva=(e,t)=>n=>{var o;if((t==null?void 0:t.variants)==null)return cx(e,n==null?void 0:n.class,n==null?void 0:n.className);const{variants:l,defaultVariants:d}=t,f=Object.keys(l).map(_=>{const S=n==null?void 0:n[_],R=d==null?void 0:d[_];if(S===null)return null;const C=falsyToString(S)||falsyToString(R);return l[_][C]}),g=n&&Object.entries(n).reduce((_,S)=>{let[R,C]=S;return C===void 0||(_[R]=C),_},{}),b=t==null||(o=t.compoundVariants)===null||o===void 0?void 0:o.reduce((_,S)=>{let{class:R,className:C,...E}=S;return Object.entries(E).every(A=>{let[M,I]=A;return Array.isArray(I)?I.includes({...d,...g}[M]):{...d,...g}[M]===I})?[..._,R,C]:_},[]);return cx(e,f,b,n==null?void 0:n.class,n==null?void 0:n.className)},buttonVariants=cva("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-hidden focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0 cursor-pointer",{variants:{variant:{default:"bg-primary text-primary-foreground shadow-sm hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground shadow-xs hover:bg-destructive/90",outline:"border border-input text-foreground bg-background shadow-xs hover:bg-accent hover:text-accent-foreground",defaultOutline:"border border-red-600/30 text-red-600 bg-background shadow-xs hover:bg-red-600/5 ",secondary:"bg-secondary text-secondary-foreground shadow-xs hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline",blue:"bg-randmar-blue text-gray-100 shadow-sm hover:bg-randmar-blue/90",red:"bg-randmar-red text-gray-100 shadow-sm hover:bg-randmar-red/90",purple:"bg-randmar-purple text-gray-100 shadow-sm hover:bg-randmar-purple/90",none:""},size:{default:"h-9 px-4 py-2",sm:"h-8 rounded-md px-3 text-xs",lg:"h-10 rounded-md px-8",icon:"h-9 w-9"}},defaultVariants:{variant:"default",size:"default"}}),Button$1=React__namespace.forwardRef(({className:e,variant:t,size:n,asChild:o=!1,confirmationDialog:l,onClick:d,...f},g)=>{const b=o?Slot$2:"button";if(!l)return jsxRuntime.jsx(b,{className:cn(buttonVariants({variant:t,size:n,className:e})),ref:g,onClick:d,...f});d&&console.warn("Button: You provided both onClick and confirmationDialog props. The onClick prop will be ignored. Use the onConfirm callback in confirmationDialog instead.");const{title:_,content:S,onConfirm:R,confirmText:C="Confirm",cancelText:E="Cancel"}=l,A=()=>{R()};return jsxRuntime.jsxs(Dialog,{children:[jsxRuntime.jsx(DialogTrigger,{asChild:!0,children:jsxRuntime.jsx(b,{className:cn(buttonVariants({variant:t,size:n,className:e})),ref:g,...f})}),jsxRuntime.jsxs(DialogContent,{children:[jsxRuntime.jsxs(DialogHeader,{children:[jsxRuntime.jsx(DialogTitle,{children:_}),jsxRuntime.jsx(DialogDescription,{children:S})]}),jsxRuntime.jsxs(DialogFooter,{className:"flex justify-end gap-2 pt-4",children:[jsxRuntime.jsx(DialogClose,{asChild:!0,children:jsxRuntime.jsx(Button$1,{variant:"outline",children:E})}),jsxRuntime.jsx(DialogClose,{asChild:!0,children:jsxRuntime.jsx(Button$1,{onClick:A,children:C})})]})]})]})});Button$1.displayName="Button";var SLOTTABLE_IDENTIFIER$3=Symbol("radix.slottable");function createSlottable$1(e){const t=({children:n})=>jsxRuntime.jsx(jsxRuntime.Fragment,{children:n});return t.displayName=`${e}.Slottable`,t.__radixId=SLOTTABLE_IDENTIFIER$3,t}var VISUALLY_HIDDEN_STYLES=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),NAME$2="VisuallyHidden",VisuallyHidden=React__namespace.forwardRef((e,t)=>jsxRuntime.jsx(Primitive$4.span,{...e,ref:t,style:{...VISUALLY_HIDDEN_STYLES,...e.style}}));VisuallyHidden.displayName=NAME$2;var Root$8=VisuallyHidden,[createTooltipContext]=createContextScope$2("Tooltip",[createPopperScope]),usePopperScope$2=createPopperScope(),PROVIDER_NAME$1="TooltipProvider",DEFAULT_DELAY_DURATION=700,TOOLTIP_OPEN="tooltip.open",[TooltipProviderContextProvider,useTooltipProviderContext]=createTooltipContext(PROVIDER_NAME$1),TooltipProvider$1=e=>{const{__scopeTooltip:t,delayDuration:n=DEFAULT_DELAY_DURATION,skipDelayDuration:o=300,disableHoverableContent:l=!1,children:d}=e,f=React__namespace.useRef(!0),g=React__namespace.useRef(!1),b=React__namespace.useRef(0);return React__namespace.useEffect(()=>{const _=b.current;return()=>window.clearTimeout(_)},[]),jsxRuntime.jsx(TooltipProviderContextProvider,{scope:t,isOpenDelayedRef:f,delayDuration:n,onOpen:React__namespace.useCallback(()=>{window.clearTimeout(b.current),f.current=!1},[]),onClose:React__namespace.useCallback(()=>{window.clearTimeout(b.current),b.current=window.setTimeout(()=>f.current=!0,o)},[o]),isPointerInTransitRef:g,onPointerInTransitChange:React__namespace.useCallback(_=>{g.current=_},[]),disableHoverableContent:l,children:d})};TooltipProvider$1.displayName=PROVIDER_NAME$1;var TOOLTIP_NAME="Tooltip",[TooltipContextProvider,useTooltipContext]=createTooltipContext(TOOLTIP_NAME),Tooltip$2=e=>{const{__scopeTooltip:t,children:n,open:o,defaultOpen:l,onOpenChange:d,disableHoverableContent:f,delayDuration:g}=e,b=useTooltipProviderContext(TOOLTIP_NAME,e.__scopeTooltip),_=usePopperScope$2(t),[S,R]=React__namespace.useState(null),C=useId(),E=React__namespace.useRef(0),A=f??b.disableHoverableContent,M=g??b.delayDuration,I=React__namespace.useRef(!1),[j,F]=useControllableState({prop:o,defaultProp:l??!1,onChange:te=>{te?(b.onOpen(),document.dispatchEvent(new CustomEvent(TOOLTIP_OPEN))):b.onClose(),d==null||d(te)},caller:TOOLTIP_NAME}),z=React__namespace.useMemo(()=>j?I.current?"delayed-open":"instant-open":"closed",[j]),Q=React__namespace.useCallback(()=>{window.clearTimeout(E.current),E.current=0,I.current=!1,F(!0)},[F]),O=React__namespace.useCallback(()=>{window.clearTimeout(E.current),E.current=0,F(!1)},[F]),V=React__namespace.useCallback(()=>{window.clearTimeout(E.current),E.current=window.setTimeout(()=>{I.current=!0,F(!0),E.current=0},M)},[M,F]);return React__namespace.useEffect(()=>()=>{E.current&&(window.clearTimeout(E.current),E.current=0)},[]),jsxRuntime.jsx(Root2$7,{..._,children:jsxRuntime.jsx(TooltipContextProvider,{scope:t,contentId:C,open:j,stateAttribute:z,trigger:S,onTriggerChange:R,onTriggerEnter:React__namespace.useCallback(()=>{b.isOpenDelayedRef.current?V():Q()},[b.isOpenDelayedRef,V,Q]),onTriggerLeave:React__namespace.useCallback(()=>{A?O():(window.clearTimeout(E.current),E.current=0)},[O,A]),onOpen:Q,onClose:O,disableHoverableContent:A,children:n})})};Tooltip$2.displayName=TOOLTIP_NAME;var TRIGGER_NAME$7="TooltipTrigger",TooltipTrigger$1=React__namespace.forwardRef((e,t)=>{const{__scopeTooltip:n,...o}=e,l=useTooltipContext(TRIGGER_NAME$7,n),d=useTooltipProviderContext(TRIGGER_NAME$7,n),f=usePopperScope$2(n),g=React__namespace.useRef(null),b=useComposedRefs(t,g,l.onTriggerChange),_=React__namespace.useRef(!1),S=React__namespace.useRef(!1),R=React__namespace.useCallback(()=>_.current=!1,[]);return React__namespace.useEffect(()=>()=>document.removeEventListener("pointerup",R),[R]),jsxRuntime.jsx(Anchor,{asChild:!0,...f,children:jsxRuntime.jsx(Primitive$4.button,{"aria-describedby":l.open?l.contentId:void 0,"data-state":l.stateAttribute,...o,ref:b,onPointerMove:composeEventHandlers(e.onPointerMove,C=>{C.pointerType!=="touch"&&!S.current&&!d.isPointerInTransitRef.current&&(l.onTriggerEnter(),S.current=!0)}),onPointerLeave:composeEventHandlers(e.onPointerLeave,()=>{l.onTriggerLeave(),S.current=!1}),onPointerDown:composeEventHandlers(e.onPointerDown,()=>{l.open&&l.onClose(),_.current=!0,document.addEventListener("pointerup",R,{once:!0})}),onFocus:composeEventHandlers(e.onFocus,()=>{_.current||l.onOpen()}),onBlur:composeEventHandlers(e.onBlur,l.onClose),onClick:composeEventHandlers(e.onClick,l.onClose)})})});TooltipTrigger$1.displayName=TRIGGER_NAME$7;var PORTAL_NAME$3="TooltipPortal",[PortalProvider$1,usePortalContext$1]=createTooltipContext(PORTAL_NAME$3,{forceMount:void 0}),TooltipPortal=e=>{const{__scopeTooltip:t,forceMount:n,children:o,container:l}=e,d=useTooltipContext(PORTAL_NAME$3,t);return jsxRuntime.jsx(PortalProvider$1,{scope:t,forceMount:n,children:jsxRuntime.jsx(Presence,{present:n||d.open,children:jsxRuntime.jsx(Portal$5,{asChild:!0,container:l,children:o})})})};TooltipPortal.displayName=PORTAL_NAME$3;var CONTENT_NAME$6="TooltipContent",TooltipContent$1=React__namespace.forwardRef((e,t)=>{const n=usePortalContext$1(CONTENT_NAME$6,e.__scopeTooltip),{forceMount:o=n.forceMount,side:l="top",...d}=e,f=useTooltipContext(CONTENT_NAME$6,e.__scopeTooltip);return jsxRuntime.jsx(Presence,{present:o||f.open,children:f.disableHoverableContent?jsxRuntime.jsx(TooltipContentImpl,{side:l,...d,ref:t}):jsxRuntime.jsx(TooltipContentHoverable,{side:l,...d,ref:t})})}),TooltipContentHoverable=React__namespace.forwardRef((e,t)=>{const n=useTooltipContext(CONTENT_NAME$6,e.__scopeTooltip),o=useTooltipProviderContext(CONTENT_NAME$6,e.__scopeTooltip),l=React__namespace.useRef(null),d=useComposedRefs(t,l),[f,g]=React__namespace.useState(null),{trigger:b,onClose:_}=n,S=l.current,{onPointerInTransitChange:R}=o,C=React__namespace.useCallback(()=>{g(null),R(!1)},[R]),E=React__namespace.useCallback((A,M)=>{const I=A.currentTarget,j={x:A.clientX,y:A.clientY},F=getExitSideFromRect(j,I.getBoundingClientRect()),z=getPaddedExitPoints(j,F),Q=getPointsFromRect(M.getBoundingClientRect()),O=getHull([...z,...Q]);g(O),R(!0)},[R]);return React__namespace.useEffect(()=>()=>C(),[C]),React__namespace.useEffect(()=>{if(b&&S){const A=I=>E(I,S),M=I=>E(I,b);return b.addEventListener("pointerleave",A),S.addEventListener("pointerleave",M),()=>{b.removeEventListener("pointerleave",A),S.removeEventListener("pointerleave",M)}}},[b,S,E,C]),React__namespace.useEffect(()=>{if(f){const A=M=>{const I=M.target,j={x:M.clientX,y:M.clientY},F=(b==null?void 0:b.contains(I))||(S==null?void 0:S.contains(I)),z=!isPointInPolygon(j,f);F?C():z&&(C(),_())};return document.addEventListener("pointermove",A),()=>document.removeEventListener("pointermove",A)}},[b,S,f,_,C]),jsxRuntime.jsx(TooltipContentImpl,{...e,ref:d})}),[VisuallyHiddenContentContextProvider,useVisuallyHiddenContentContext]=createTooltipContext(TOOLTIP_NAME,{isInside:!1}),Slottable$1=createSlottable$1("TooltipContent"),TooltipContentImpl=React__namespace.forwardRef((e,t)=>{const{__scopeTooltip:n,children:o,"aria-label":l,onEscapeKeyDown:d,onPointerDownOutside:f,...g}=e,b=useTooltipContext(CONTENT_NAME$6,n),_=usePopperScope$2(n),{onClose:S}=b;return React__namespace.useEffect(()=>(document.addEventListener(TOOLTIP_OPEN,S),()=>document.removeEventListener(TOOLTIP_OPEN,S)),[S]),React__namespace.useEffect(()=>{if(b.trigger){const R=C=>{const E=C.target;E!=null&&E.contains(b.trigger)&&S()};return window.addEventListener("scroll",R,{capture:!0}),()=>window.removeEventListener("scroll",R,{capture:!0})}},[b.trigger,S]),jsxRuntime.jsx(DismissableLayer,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:d,onPointerDownOutside:f,onFocusOutside:R=>R.preventDefault(),onDismiss:S,children:jsxRuntime.jsxs(Content$2,{"data-state":b.stateAttribute,..._,...g,ref:t,style:{...g.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[jsxRuntime.jsx(Slottable$1,{children:o}),jsxRuntime.jsx(VisuallyHiddenContentContextProvider,{scope:n,isInside:!0,children:jsxRuntime.jsx(Root$8,{id:b.contentId,role:"tooltip",children:l||o})})]})})});TooltipContent$1.displayName=CONTENT_NAME$6;var ARROW_NAME$2="TooltipArrow",TooltipArrow=React__namespace.forwardRef((e,t)=>{const{__scopeTooltip:n,...o}=e,l=usePopperScope$2(n);return useVisuallyHiddenContentContext(ARROW_NAME$2,n).isInside?null:jsxRuntime.jsx(Arrow,{...l,...o,ref:t})});TooltipArrow.displayName=ARROW_NAME$2;function getExitSideFromRect(e,t){const n=Math.abs(t.top-e.y),o=Math.abs(t.bottom-e.y),l=Math.abs(t.right-e.x),d=Math.abs(t.left-e.x);switch(Math.min(n,o,l,d)){case d:return"left";case l:return"right";case n:return"top";case o:return"bottom";default:throw new Error("unreachable")}}function getPaddedExitPoints(e,t,n=5){const o=[];switch(t){case"top":o.push({x:e.x-n,y:e.y+n},{x:e.x+n,y:e.y+n});break;case"bottom":o.push({x:e.x-n,y:e.y-n},{x:e.x+n,y:e.y-n});break;case"left":o.push({x:e.x+n,y:e.y-n},{x:e.x+n,y:e.y+n});break;case"right":o.push({x:e.x-n,y:e.y-n},{x:e.x-n,y:e.y+n});break}return o}function getPointsFromRect(e){const{top:t,right:n,bottom:o,left:l}=e;return[{x:l,y:t},{x:n,y:t},{x:n,y:o},{x:l,y:o}]}function isPointInPolygon(e,t){const{x:n,y:o}=e;let l=!1;for(let d=0,f=t.length-1;d<t.length;f=d++){const g=t[d],b=t[f],_=g.x,S=g.y,R=b.x,C=b.y;S>o!=C>o&&n<(R-_)*(o-S)/(C-S)+_&&(l=!l)}return l}function getHull(e){const t=e.slice();return t.sort((n,o)=>n.x<o.x?-1:n.x>o.x?1:n.y<o.y?-1:n.y>o.y?1:0),getHullPresorted(t)}function getHullPresorted(e){if(e.length<=1)return e.slice();const t=[];for(let o=0;o<e.length;o++){const l=e[o];for(;t.length>=2;){const d=t[t.length-1],f=t[t.length-2];if((d.x-f.x)*(l.y-f.y)>=(d.y-f.y)*(l.x-f.x))t.pop();else break}t.push(l)}t.pop();const n=[];for(let o=e.length-1;o>=0;o--){const l=e[o];for(;n.length>=2;){const d=n[n.length-1],f=n[n.length-2];if((d.x-f.x)*(l.y-f.y)>=(d.y-f.y)*(l.x-f.x))n.pop();else break}n.push(l)}return n.pop(),t.length===1&&n.length===1&&t[0].x===n[0].x&&t[0].y===n[0].y?t:t.concat(n)}var Provider$1=TooltipProvider$1,Root3=Tooltip$2,Trigger$4=TooltipTrigger$1,Portal$2=TooltipPortal,Content2$4=TooltipContent$1;const TooltipProvider=Provider$1,Tooltip$1=Root3,TooltipTrigger=Trigger$4,TooltipContent=React__namespace.forwardRef(({className:e,sideOffset:t=4,...n},o)=>jsxRuntime.jsx(Portal$2,{children:jsxRuntime.jsx(Content2$4,{ref:o,sideOffset:t,className:cn("z-50 overflow-hidden rounded-md bg-primary px-3 py-1.5 text-xs text-primary-foreground animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...n})}));TooltipContent.displayName=Content2$4.displayName;const Input=React__namespace.forwardRef(({className:e,type:t,mask:n,onChange:o,placeholder:l,...d},f)=>{const[g,b]=React__namespace.useState(!1),_=React__namespace.useRef(null),R=l||(n==="phone"?"(999) 999-9999":n==="postal-code-ca"?"A9A 9A9":n==="zip-code-us"?"99999":""),C=()=>n==="phone"?"Only enter numbers. Formatting will be added automatically.":n==="postal-code-ca"?"Enter letters and numbers only. Spacing will be applied automatically.":n==="zip-code-us"?"Only enter numbers. Formatting will be added automatically.":"",E=()=>{b(!0),_.current&&clearTimeout(_.current),_.current=setTimeout(()=>{b(!1)},3e3)};React__namespace.useEffect(()=>()=>{_.current&&clearTimeout(_.current)},[]);const A=M=>{if(n){const I=M.target.value;let j=I;if(I.length>0){const F=I[I.length-1];/[^a-zA-Z0-9]/.test(F)&&(console.log("Non-alphanumeric detected:",F),E())}if(n==="phone"){const F=I.replace(/\D/g,"");F.length<=3?j=F:F.length<=6?j=`(${F.slice(0,3)}) ${F.slice(3)}`:j=`(${F.slice(0,3)}) ${F.slice(3,6)}-${F.slice(6,10)}`}else if(n==="postal-code-ca"){const F=I.replace(/[^a-zA-Z0-9]/g,"").toUpperCase();let z="";for(let Q=0;Q<Math.min(F.length,6);Q++){const O=F[Q];Q===0||Q===2||Q===4?/[A-Z]/.test(O)&&(z+=O):(Q===1||Q===3||Q===5)&&/[0-9]/.test(O)&&(z+=O)}z.length<=3?j=z:j=`${z.slice(0,3)} ${z.slice(3,6)}`}else if(n==="zip-code-us"){const F=I.replace(/\D/g,"");F.length<=5?j=F:j=`${F.slice(0,5)}-${F.slice(5,9)}`}M.target.value=j}o==null||o(M)};return jsxRuntime.jsx(TooltipProvider,{children:jsxRuntime.jsxs(Tooltip$1,{open:g&&!!n,children:[jsxRuntime.jsx(TooltipTrigger,{asChild:!0,children:jsxRuntime.jsx("input",{type:t,className:cn("flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-base shadow-xs transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-hidden focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",e),onChange:A,placeholder:R,ref:f,...d})}),jsxRuntime.jsx(TooltipContent,{side:"top",className:"bg-sidebar text-sidebar-foreground",children:C()})]})})});Input.displayName="Input";var NODES$3=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Primitive$3=NODES$3.reduce((e,t)=>{const n=createSlot$2(`Primitive.${t}`),o=React__namespace.forwardRef((l,d)=>{const{asChild:f,...g}=l,b=f?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),jsxRuntime.jsx(b,{...g,ref:d})});return o.displayName=`Primitive.${t}`,{...e,[t]:o}},{}),NAME$1="Separator",DEFAULT_ORIENTATION="horizontal",ORIENTATIONS=["horizontal","vertical"],Separator$2=React__namespace.forwardRef((e,t)=>{const{decorative:n,orientation:o=DEFAULT_ORIENTATION,...l}=e,d=isValidOrientation(o)?o:DEFAULT_ORIENTATION,g=n?{role:"none"}:{"aria-orientation":d==="vertical"?d:void 0,role:"separator"};return jsxRuntime.jsx(Primitive$3.div,{"data-orientation":d,...g,...l,ref:t})});Separator$2.displayName=NAME$1;function isValidOrientation(e){return ORIENTATIONS.includes(e)}var Root$7=Separator$2;const Separator$1=React__namespace.forwardRef(({className:e,orientation:t="horizontal",decorative:n=!0,...o},l)=>jsxRuntime.jsx(Root$7,{ref:l,decorative:n,orientation:t,className:cn("shrink-0 bg-border",t==="horizontal"?"h-[1px] w-full":"h-full w-[1px]",e),...o}));Separator$1.displayName=Root$7.displayName;const Sheet=Root$a,SheetTrigger=Trigger$6,SheetClose=Close$1,SheetPortal=Portal$4,SheetOverlay=React__namespace.forwardRef(({className:e,...t},n)=>jsxRuntime.jsx(Overlay,{className:cn("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t,ref:n}));SheetOverlay.displayName=Overlay.displayName;const sheetVariants=cva("fixed z-50 gap-4 bg-background p-6 shadow-lg transition ease-in-out data-[state=closed]:duration-300 data-[state=open]:duration-500 data-[state=open]:animate-in data-[state=closed]:animate-out",{variants:{side:{top:"inset-x-0 top-0 border-b data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top",bottom:"inset-x-0 bottom-0 border-t data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom",left:"inset-y-0 left-0 h-full w-3/4 border-r data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left sm:max-w-sm",right:"inset-y-0 right-0 h-full w-3/4 border-l data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right sm:max-w-sm"}},defaultVariants:{side:"right"}}),SheetContent=React__namespace.forwardRef(({side:e="right",className:t,children:n,...o},l)=>jsxRuntime.jsxs(SheetPortal,{children:[jsxRuntime.jsx(SheetOverlay,{}),jsxRuntime.jsxs(Content$3,{ref:l,className:cn(sheetVariants({side:e}),t),...o,children:[jsxRuntime.jsxs(Close$1,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-hidden focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-secondary",children:[jsxRuntime.jsx(X$1,{className:"h-4 w-4"}),jsxRuntime.jsx("span",{className:"sr-only",children:"Close"})]}),n]})]}));SheetContent.displayName=Content$3.displayName;const SheetHeader=({className:e,...t})=>jsxRuntime.jsx("div",{className:cn("flex flex-col space-y-2 text-center sm:text-left",e),...t});SheetHeader.displayName="SheetHeader";const SheetFooter=({className:e,...t})=>jsxRuntime.jsx("div",{className:cn("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});SheetFooter.displayName="SheetFooter";const SheetTitle=React__namespace.forwardRef(({className:e,...t},n)=>jsxRuntime.jsx(Title$1,{ref:n,className:cn("text-lg font-semibold text-foreground",e),...t}));SheetTitle.displayName=Title$1.displayName;const SheetDescription=React__namespace.forwardRef(({className:e,...t},n)=>jsxRuntime.jsx(Description$1,{ref:n,className:cn("text-sm text-muted-foreground",e),...t}));SheetDescription.displayName=Description$1.displayName;function useIntersectionObserver({elementRef:e,threshold:t=0,rootMargin:n="0px",freezeOnceVisible:o=!1}){const[l,d]=React.useState(!1);return React.useEffect(()=>{const f=e.current;if(!f){d(!1);return}const g=new IntersectionObserver(([b])=>{const _=b.isIntersecting;o&&_?(d(!0),g.unobserve(f)):d(_)},{threshold:t,rootMargin:n});return g.observe(f),()=>{g.unobserve(f)}},[e,t,n,o]),l}function formatProdErrorMessage$1(e){return`Minified Redux error #${e}; visit https://redux.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}var randomString=()=>Math.random().toString(36).substring(7).split("").join("."),ActionTypes={INIT:`@@redux/INIT${randomString()}`,REPLACE:`@@redux/REPLACE${randomString()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${randomString()}`},actionTypes_default=ActionTypes;function isPlainObject$4(e){if(typeof e!="object"||e===null)return!1;let t=e;for(;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t||Object.getPrototypeOf(e)===null}function miniKindOf(e){if(e===void 0)return"undefined";if(e===null)return"null";const t=typeof e;switch(t){case"boolean":case"string":case"number":case"symbol":case"function":return t}if(Array.isArray(e))return"array";if(isDate$1(e))return"date";if(isError(e))return"error";const n=ctorName(e);switch(n){case"Symbol":case"Promise":case"WeakMap":case"WeakSet":case"Map":case"Set":return n}return Object.prototype.toString.call(e).slice(8,-1).toLowerCase().replace(/\s/g,"")}function ctorName(e){return typeof e.constructor=="function"?e.constructor.name:null}function isError(e){return e instanceof Error||typeof e.message=="string"&&e.constructor&&typeof e.constructor.stackTraceLimit=="number"}function isDate$1(e){return e instanceof Date?!0:typeof e.toDateString=="function"&&typeof e.getDate=="function"&&typeof e.setDate=="function"}function kindOf(e){let t=typeof e;return process.env.NODE_ENV!=="production"&&(t=miniKindOf(e)),t}function warning(e){typeof console<"u"&&typeof console.error=="function"&&console.error(e);try{throw new Error(e)}catch{}}function getUnexpectedStateShapeWarningMessage(e,t,n,o){const l=Object.keys(t),d=n&&n.type===actionTypes_default.INIT?"preloadedState argument passed to createStore":"previous state received by the reducer";if(l.length===0)return"Store does not have a valid reducer. Make sure the argument passed to combineReducers is an object whose values are reducers.";if(!isPlainObject$4(e))return`The ${d} has unexpected type of "${kindOf(e)}". Expected argument to be an object with the following keys: "${l.join('", "')}"`;const f=Object.keys(e).filter(g=>!t.hasOwnProperty(g)&&!o[g]);if(f.forEach(g=>{o[g]=!0}),!(n&&n.type===actionTypes_default.REPLACE)&&f.length>0)return`Unexpected ${f.length>1?"keys":"key"} "${f.join('", "')}" found in ${d}. Expected to find one of the known reducer keys instead: "${l.join('", "')}". Unexpected keys will be ignored.`}function assertReducerShape(e){Object.keys(e).forEach(t=>{const n=e[t];if(typeof n(void 0,{type:actionTypes_default.INIT})>"u")throw new Error(process.env.NODE_ENV==="production"?formatProdErrorMessage$1(12):`The slice reducer for key "${t}" returned undefined during initialization. If the state passed to the reducer is undefined, you must explicitly return the initial state. The initial state may not be undefined. If you don't want to set a value for this reducer, you can use null instead of undefined.`);if(typeof n(void 0,{type:actionTypes_default.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(process.env.NODE_ENV==="production"?formatProdErrorMessage$1(13):`The slice reducer for key "${t}" returned undefined when probed with a random type. Don't try to handle '${actionTypes_default.INIT}' or other actions in "redux/*" namespace. They are considered private. Instead, you must return the current state for any unknown actions, unless it is undefined, in which case you must return the initial state, regardless of the action type. The initial state may not be undefined, but can be null.`)})}function combineReducers(e){const t=Object.keys(e),n={};for(let f=0;f<t.length;f++){const g=t[f];process.env.NODE_ENV!=="production"&&typeof e[g]>"u"&&warning(`No reducer provided for key "${g}"`),typeof e[g]=="function"&&(n[g]=e[g])}const o=Object.keys(n);let l;process.env.NODE_ENV!=="production"&&(l={});let d;try{assertReducerShape(n)}catch(f){d=f}return function(g={},b){if(d)throw d;if(process.env.NODE_ENV!=="production"){const R=getUnexpectedStateShapeWarningMessage(g,n,b,l);R&&warning(R)}let _=!1;const S={};for(let R=0;R<o.length;R++){const C=o[R],E=n[C],A=g[C],M=E(A,b);if(typeof M>"u"){const I=b&&b.type;throw new Error(process.env.NODE_ENV==="production"?formatProdErrorMessage$1(14):`When called with an action of type ${I?`"${String(I)}"`:"(unknown type)"}, the slice reducer for key "${C}" returned undefined. To ignore an action, you must explicitly return the previous state. If you want this reducer to hold no value, you can return null instead of undefined.`)}S[C]=M,_=_||M!==A}return _=_||o.length!==Object.keys(g).length,_?S:g}}function isAction(e){return isPlainObject$4(e)&&"type"in e&&typeof e.type=="string"}var NOTHING=Symbol.for("immer-nothing"),DRAFTABLE=Symbol.for("immer-draftable"),DRAFT_STATE=Symbol.for("immer-state"),errors=process.env.NODE_ENV!=="production"?[function(e){return`The plugin for '${e}' has not been loaded into Immer. To enable the plugin, import and call \`enable${e}()\` when initializing your application.`},function(e){return`produce can only be called on things that are draftable: plain objects, arrays, Map, Set or classes that are marked with '[immerable]: true'. Got '${e}'`},"This object has been frozen and should not be mutated",function(e){return"Cannot use a proxy that has been revoked. Did you pass an object from inside an immer function to an async process? "+e},"An immer producer returned a new value *and* modified its draft. Either return a new value *or* modify the draft.","Immer forbids circular references","The first or second argument to `produce` must be a function","The third argument to `produce` must be a function or undefined","First argument to `createDraft` must be a plain object, an array, or an immerable object","First argument to `finishDraft` must be a draft returned by `createDraft`",function(e){return`'current' expects a draft, got: ${e}`},"Object.defineProperty() cannot be used on an Immer draft","Object.setPrototypeOf() cannot be used on an Immer draft","Immer only supports deleting array indices","Immer only supports setting array indices and the 'length' property",function(e){return`'original' expects a draft, got: ${e}`}]:[];function die(e,...t){if(process.env.NODE_ENV!=="production"){const n=errors[e],o=typeof n=="function"?n.apply(null,t):n;throw new Error(`[Immer] ${o}`)}throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var getPrototypeOf$1=Object.getPrototypeOf;function isDraft(e){return!!e&&!!e[DRAFT_STATE]}function isDraftable(e){var t;return e?isPlainObject$3(e)||Array.isArray(e)||!!e[DRAFTABLE]||!!((t=e.constructor)!=null&&t[DRAFTABLE])||isMap(e)||isSet(e):!1}var objectCtorString=Object.prototype.constructor.toString(),cachedCtorStrings=new WeakMap;function isPlainObject$3(e){if(!e||typeof e!="object")return!1;const t=Object.getPrototypeOf(e);if(t===null||t===Object.prototype)return!0;const n=Object.hasOwnProperty.call(t,"constructor")&&t.constructor;if(n===Object)return!0;if(typeof n!="function")return!1;let o=cachedCtorStrings.get(n);return o===void 0&&(o=Function.toString.call(n),cachedCtorStrings.set(n,o)),o===objectCtorString}function original(e){return isDraft(e)||die(15,e),e[DRAFT_STATE].base_}function each(e,t,n=!0){getArchtype(e)===0?(n?Reflect.ownKeys(e):Object.keys(e)).forEach(l=>{t(l,e[l],e)}):e.forEach((o,l)=>t(l,o,e))}function getArchtype(e){const t=e[DRAFT_STATE];return t?t.type_:Array.isArray(e)?1:isMap(e)?2:isSet(e)?3:0}function has$1(e,t){return getArchtype(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function get$3(e,t){return getArchtype(e)===2?e.get(t):e[t]}function set$2(e,t,n){const o=getArchtype(e);o===2?e.set(t,n):o===3?e.add(n):e[t]=n}function is$1(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}function isMap(e){return e instanceof Map}function isSet(e){return e instanceof Set}function latest(e){return e.copy_||e.base_}function shallowCopy(e,t){if(isMap(e))return new Map(e);if(isSet(e))return new Set(e);if(Array.isArray(e))return Array.prototype.slice.call(e);const n=isPlainObject$3(e);if(t===!0||t==="class_only"&&!n){const o=Object.getOwnPropertyDescriptors(e);delete o[DRAFT_STATE];let l=Reflect.ownKeys(o);for(let d=0;d<l.length;d++){const f=l[d],g=o[f];g.writable===!1&&(g.writable=!0,g.configurable=!0),(g.get||g.set)&&(o[f]={configurable:!0,writable:!0,enumerable:g.enumerable,value:e[f]})}return Object.create(getPrototypeOf$1(e),o)}else{const o=getPrototypeOf$1(e);if(o!==null&&n)return{...e};const l=Object.create(o);return Object.assign(l,e)}}function freeze$1(e,t=!1){return isFrozen$1(e)||isDraft(e)||!isDraftable(e)||(getArchtype(e)>1&&Object.defineProperties(e,{set:dontMutateMethodOverride,add:dontMutateMethodOverride,clear:dontMutateMethodOverride,delete:dontMutateMethodOverride}),Object.freeze(e),t&&Object.values(e).forEach(n=>freeze$1(n,!0))),e}function dontMutateFrozenCollections(){die(2)}var dontMutateMethodOverride={value:dontMutateFrozenCollections};function isFrozen$1(e){return e===null||typeof e!="object"?!0:Object.isFrozen(e)}var plugins={};function getPlugin(e){const t=plugins[e];return t||die(0,e),t}function loadPlugin(e,t){plugins[e]||(plugins[e]=t)}var currentScope;function getCurrentScope(){return currentScope}function createScope(e,t){return{drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function usePatchesInScope(e,t){t&&(getPlugin("Patches"),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function revokeScope(e){leaveScope(e),e.drafts_.forEach(revokeDraft),e.drafts_=null}function leaveScope(e){e===currentScope&&(currentScope=e.parent_)}function enterScope(e){return currentScope=createScope(currentScope,e)}function revokeDraft(e){const t=e[DRAFT_STATE];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function processResult(e,t){t.unfinalizedDrafts_=t.drafts_.length;const n=t.drafts_[0];return e!==void 0&&e!==n?(n[DRAFT_STATE].modified_&&(revokeScope(t),die(4)),isDraftable(e)&&(e=finalize(t,e),t.parent_||maybeFreeze(t,e)),t.patches_&&getPlugin("Patches").generateReplacementPatches_(n[DRAFT_STATE].base_,e,t.patches_,t.inversePatches_)):e=finalize(t,n,[]),revokeScope(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==NOTHING?e:void 0}function finalize(e,t,n){if(isFrozen$1(t))return t;const o=e.immer_.shouldUseStrictIteration(),l=t[DRAFT_STATE];if(!l)return each(t,(d,f)=>finalizeProperty(e,l,t,d,f,n),o),t;if(l.scope_!==e)return t;if(!l.modified_)return maybeFreeze(e,l.base_,!0),l.base_;if(!l.finalized_){l.finalized_=!0,l.scope_.unfinalizedDrafts_--;const d=l.copy_;let f=d,g=!1;l.type_===3&&(f=new Set(d),d.clear(),g=!0),each(f,(b,_)=>finalizeProperty(e,l,d,b,_,n,g),o),maybeFreeze(e,d,!1),n&&e.patches_&&getPlugin("Patches").generatePatches_(l,n,e.patches_,e.inversePatches_)}return l.copy_}function finalizeProperty(e,t,n,o,l,d,f){if(l==null||typeof l!="object"&&!f)return;const g=isFrozen$1(l);if(!(g&&!f)){if(process.env.NODE_ENV!=="production"&&l===n&&die(5),isDraft(l)){const b=d&&t&&t.type_!==3&&!has$1(t.assigned_,o)?d.concat(o):void 0,_=finalize(e,l,b);if(set$2(n,o,_),isDraft(_))e.canAutoFreeze_=!1;else return}else f&&n.add(l);if(isDraftable(l)&&!g){if(!e.immer_.autoFreeze_&&e.unfinalizedDrafts_<1||t&&t.base_&&t.base_[o]===l&&g)return;finalize(e,l),(!t||!t.scope_.parent_)&&typeof o!="symbol"&&(isMap(n)?n.has(o):Object.prototype.propertyIsEnumerable.call(n,o))&&maybeFreeze(e,l)}}}function maybeFreeze(e,t,n=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&freeze$1(t,n)}function createProxyProxy(e,t){const n=Array.isArray(e),o={type_:n?1:0,scope_:t?t.scope_:getCurrentScope(),modified_:!1,finalized_:!1,assigned_:{},parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1};let l=o,d=objectTraps;n&&(l=[o],d=arrayTraps);const{revoke:f,proxy:g}=Proxy.revocable(l,d);return o.draft_=g,o.revoke_=f,g}var objectTraps={get(e,t){if(t===DRAFT_STATE)return e;const n=latest(e);if(!has$1(n,t))return readPropFromProto(e,n,t);const o=n[t];return e.finalized_||!isDraftable(o)?o:o===peek(e.base_,t)?(prepareCopy(e),e.copy_[t]=createProxy(o,e)):o},has(e,t){return t in latest(e)},ownKeys(e){return Reflect.ownKeys(latest(e))},set(e,t,n){const o=getDescriptorFromProto(latest(e),t);if(o!=null&&o.set)return o.set.call(e.draft_,n),!0;if(!e.modified_){const l=peek(latest(e),t),d=l==null?void 0:l[DRAFT_STATE];if(d&&d.base_===n)return e.copy_[t]=n,e.assigned_[t]=!1,!0;if(is$1(n,l)&&(n!==void 0||has$1(e.base_,t)))return!0;prepareCopy(e),markChanged(e)}return e.copy_[t]===n&&(n!==void 0||t in e.copy_)||Number.isNaN(n)&&Number.isNaN(e.copy_[t])||(e.copy_[t]=n,e.assigned_[t]=!0),!0},deleteProperty(e,t){return peek(e.base_,t)!==void 0||t in e.base_?(e.assigned_[t]=!1,prepareCopy(e),markChanged(e)):delete e.assigned_[t],e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){const n=latest(e),o=Reflect.getOwnPropertyDescriptor(n,t);return o&&{writable:!0,configurable:e.type_!==1||t!=="length",enumerable:o.enumerable,value:n[t]}},defineProperty(){die(11)},getPrototypeOf(e){return getPrototypeOf$1(e.base_)},setPrototypeOf(){die(12)}},arrayTraps={};each(objectTraps,(e,t)=>{arrayTraps[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}}),arrayTraps.deleteProperty=function(e,t){return process.env.NODE_ENV!=="production"&&isNaN(parseInt(t))&&die(13),arrayTraps.set.call(this,e,t,void 0)},arrayTraps.set=function(e,t,n){return process.env.NODE_ENV!=="production"&&t!=="length"&&isNaN(parseInt(t))&&die(14),objectTraps.set.call(this,e[0],t,n,e[0])};function peek(e,t){const n=e[DRAFT_STATE];return(n?latest(n):e)[t]}function readPropFromProto(e,t,n){var l;const o=getDescriptorFromProto(t,n);return o?"value"in o?o.value:(l=o.get)==null?void 0:l.call(e.draft_):void 0}function getDescriptorFromProto(e,t){if(!(t in e))return;let n=getPrototypeOf$1(e);for(;n;){const o=Object.getOwnPropertyDescriptor(n,t);if(o)return o;n=getPrototypeOf$1(n)}}function markChanged(e){e.modified_||(e.modified_=!0,e.parent_&&markChanged(e.parent_))}function prepareCopy(e){e.copy_||(e.copy_=shallowCopy(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var Immer2=class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.useStrictIteration_=!0,this.produce=(t,n,o)=>{if(typeof t=="function"&&typeof n!="function"){const d=n;n=t;const f=this;return function(b=d,..._){return f.produce(b,S=>n.call(this,S,..._))}}typeof n!="function"&&die(6),o!==void 0&&typeof o!="function"&&die(7);let l;if(isDraftable(t)){const d=enterScope(this),f=createProxy(t,void 0);let g=!0;try{l=n(f),g=!1}finally{g?revokeScope(d):leaveScope(d)}return usePatchesInScope(d,o),processResult(l,d)}else if(!t||typeof t!="object"){if(l=n(t),l===void 0&&(l=t),l===NOTHING&&(l=void 0),this.autoFreeze_&&freeze$1(l,!0),o){const d=[],f=[];getPlugin("Patches").generateReplacementPatches_(t,l,d,f),o(d,f)}return l}else die(1,t)},this.produceWithPatches=(t,n)=>{if(typeof t=="function")return(f,...g)=>this.produceWithPatches(f,b=>t(b,...g));let o,l;return[this.produce(t,n,(f,g)=>{o=f,l=g}),o,l]},typeof(e==null?void 0:e.autoFreeze)=="boolean"&&this.setAutoFreeze(e.autoFreeze),typeof(e==null?void 0:e.useStrictShallowCopy)=="boolean"&&this.setUseStrictShallowCopy(e.useStrictShallowCopy),typeof(e==null?void 0:e.useStrictIteration)=="boolean"&&this.setUseStrictIteration(e.useStrictIteration)}createDraft(e){isDraftable(e)||die(8),isDraft(e)&&(e=current(e));const t=enterScope(this),n=createProxy(e,void 0);return n[DRAFT_STATE].isManual_=!0,leaveScope(t),n}finishDraft(e,t){const n=e&&e[DRAFT_STATE];(!n||!n.isManual_)&&die(9);const{scope_:o}=n;return usePatchesInScope(o,t),processResult(void 0,o)}setAutoFreeze(e){this.autoFreeze_=e}setUseStrictShallowCopy(e){this.useStrictShallowCopy_=e}setUseStrictIteration(e){this.useStrictIteration_=e}shouldUseStrictIteration(){return this.useStrictIteration_}applyPatches(e,t){let n;for(n=t.length-1;n>=0;n--){const l=t[n];if(l.path.length===0&&l.op==="replace"){e=l.value;break}}n>-1&&(t=t.slice(n+1));const o=getPlugin("Patches").applyPatches_;return isDraft(e)?o(e,t):this.produce(e,l=>o(l,t))}};function createProxy(e,t){const n=isMap(e)?getPlugin("MapSet").proxyMap_(e,t):isSet(e)?getPlugin("MapSet").proxySet_(e,t):createProxyProxy(e,t);return(t?t.scope_:getCurrentScope()).drafts_.push(n),n}function current(e){return isDraft(e)||die(10,e),currentImpl(e)}function currentImpl(e){if(!isDraftable(e)||isFrozen$1(e))return e;const t=e[DRAFT_STATE];let n,o=!0;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,n=shallowCopy(e,t.scope_.immer_.useStrictShallowCopy_),o=t.scope_.immer_.shouldUseStrictIteration()}else n=shallowCopy(e,!0);return each(n,(l,d)=>{set$2(n,l,currentImpl(d))},o),t&&(t.finalized_=!1),n}function enablePatches(){process.env.NODE_ENV!=="production"&&errors.push('Sets cannot have "replace" patches.',function(C){return"Unsupported patch operation: "+C},function(C){return"Cannot apply patch, path doesn't resolve: "+C},"Patching reserved attributes like __proto__, prototype and constructor is not allowed");const t="replace",n="add",o="remove";function l(C,E,A,M){switch(C.type_){case 0:case 2:return f(C,E,A,M);case 1:return d(C,E,A,M);case 3:return g(C,E,A,M)}}function d(C,E,A,M){let{base_:I,assigned_:j}=C,F=C.copy_;F.length<I.length&&([I,F]=[F,I],[A,M]=[M,A]);for(let z=0;z<I.length;z++)if(j[z]&&F[z]!==I[z]){const Q=E.concat([z]);A.push({op:t,path:Q,value:R(F[z])}),M.push({op:t,path:Q,value:R(I[z])})}for(let z=I.length;z<F.length;z++){const Q=E.concat([z]);A.push({op:n,path:Q,value:R(F[z])})}for(let z=F.length-1;I.length<=z;--z){const Q=E.concat([z]);M.push({op:o,path:Q})}}function f(C,E,A,M){const{base_:I,copy_:j}=C;each(C.assigned_,(F,z)=>{const Q=get$3(I,F),O=get$3(j,F),V=z?has$1(I,F)?t:n:o;if(Q===O&&V===t)return;const te=E.concat(F);A.push(V===o?{op:V,path:te}:{op:V,path:te,value:O}),M.push(V===n?{op:o,path:te}:V===o?{op:n,path:te,value:R(Q)}:{op:t,path:te,value:R(Q)})})}function g(C,E,A,M){let{base_:I,copy_:j}=C,F=0;I.forEach(z=>{if(!j.has(z)){const Q=E.concat([F]);A.push({op:o,path:Q,value:z}),M.unshift({op:n,path:Q,value:z})}F++}),F=0,j.forEach(z=>{if(!I.has(z)){const Q=E.concat([F]);A.push({op:n,path:Q,value:z}),M.unshift({op:o,path:Q,value:z})}F++})}function b(C,E,A,M){A.push({op:t,path:[],value:E===NOTHING?void 0:E}),M.push({op:t,path:[],value:C})}function _(C,E){return E.forEach(A=>{const{path:M,op:I}=A;let j=C;for(let O=0;O<M.length-1;O++){const V=getArchtype(j);let te=M[O];typeof te!="string"&&typeof te!="number"&&(te=""+te),(V===0||V===1)&&(te==="__proto__"||te==="constructor")&&die(19),typeof j=="function"&&te==="prototype"&&die(19),j=get$3(j,te),typeof j!="object"&&die(18,M.join("/"))}const F=getArchtype(j),z=S(A.value),Q=M[M.length-1];switch(I){case t:switch(F){case 2:return j.set(Q,z);case 3:die(16);default:return j[Q]=z}case n:switch(F){case 1:return Q==="-"?j.push(z):j.splice(Q,0,z);case 2:return j.set(Q,z);case 3:return j.add(z);default:return j[Q]=z}case o:switch(F){case 1:return j.splice(Q,1);case 2:return j.delete(Q);case 3:return j.delete(A.value);default:return delete j[Q]}default:die(17,I)}}),C}function S(C){if(!isDraftable(C))return C;if(Array.isArray(C))return C.map(S);if(isMap(C))return new Map(Array.from(C.entries()).map(([A,M])=>[A,S(M)]));if(isSet(C))return new Set(Array.from(C).map(S));const E=Object.create(getPrototypeOf$1(C));for(const A in C)E[A]=S(C[A]);return has$1(C,DRAFTABLE)&&(E[DRAFTABLE]=C[DRAFTABLE]),E}function R(C){return isDraft(C)?S(C):C}loadPlugin("Patches",{applyPatches_:_,generatePatches_:l,generateReplacementPatches_:b})}var immer=new Immer2,produce=immer.produce,produceWithPatches=immer.produceWithPatches.bind(immer),setUseStrictIteration=immer.setUseStrictIteration.bind(immer),applyPatches=immer.applyPatches.bind(immer),runIdentityFunctionCheck=(e,t,n)=>{if(t.length===1&&t[0]===n){let o=!1;try{const l={};e(l)===l&&(o=!0)}catch{}if(o){let l;try{throw new Error}catch(d){({stack:l}=d)}console.warn(`The result function returned its own inputs without modification. e.g
510
510
  \`createSelector([state => state.todos], todos => todos)\`
511
511
  This could lead to inefficient memoization and unnecessary re-renders.
512
512
  Ensure transformation logic is in the result function, and extraction logic is in the input selectors.`,{stack:l})}}},runInputStabilityCheck=(e,t,n)=>{const{memoize:o,memoizeOptions:l}=t,{inputSelectorResults:d,inputSelectorResultsCopy:f}=e,g=o(()=>({}),...l);if(!(g.apply(null,d)===g.apply(null,f))){let _;try{throw new Error}catch(S){({stack:_}=S)}console.warn(`An input selector returned a different result when passed same arguments.
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "randmarcomps",
3
3
  "private": false,
4
- "version": "1.447.0",
4
+ "version": "1.448.0",
5
5
  "description": "The UI library enabling speed and consistency in Randmar frontends.",
6
6
  "type": "module",
7
7
  "files": [