diff --git a/README.md b/README.md index 479a8be19..295358042 100644 --- a/README.md +++ b/README.md @@ -7,10 +7,6 @@ A visual tool for building the UI portion of a Shiny application that generates The goal of the Shiny Ui Editor is to allow people to build the broad-level UI for their Shiny app without writing code. The editor is intended for those who may not be comfortable with the HTML-style code of Shiny's UI functions or who simply don't want to fiddle with sizes to get things laid out correctly. -## ⚠️ `shinyuieditor` is currently in Alpha. - -It may be unstable, and the API may change. We're excited to hear your feedback, but please don't use it for production applications just yet! - ## Installing While in development the package is only available on github: diff --git a/inst/editor/build/assets/index-f95d252b.js b/inst/editor/build/assets/index-975c0aaf.js similarity index 99% rename from inst/editor/build/assets/index-f95d252b.js rename to inst/editor/build/assets/index-975c0aaf.js index aeb44489a..181bb5ec8 100644 --- a/inst/editor/build/assets/index-f95d252b.js +++ b/inst/editor/build/assets/index-975c0aaf.js @@ -68,7 +68,7 @@ Error generating stack: `+nA.message+` * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */var b$2=Symbol.for("react.element"),c$2=Symbol.for("react.portal"),d$2=Symbol.for("react.fragment"),e$1=Symbol.for("react.strict_mode"),f$2=Symbol.for("react.profiler"),g$2=Symbol.for("react.provider"),h$2=Symbol.for("react.context"),k$2=Symbol.for("react.server_context"),l$2=Symbol.for("react.forward_ref"),m$2=Symbol.for("react.suspense"),n$2=Symbol.for("react.suspense_list"),p$2=Symbol.for("react.memo"),q$2=Symbol.for("react.lazy"),t$2=Symbol.for("react.offscreen"),u$2;u$2=Symbol.for("react.module.reference");function v$2($){if(typeof $=="object"&&$!==null){var rA=$.$$typeof;switch(rA){case b$2:switch($=$.type,$){case d$2:case f$2:case e$1:case m$2:case n$2:return $;default:switch($=$&&$.$$typeof,$){case k$2:case h$2:case l$2:case q$2:case p$2:case g$2:return $;default:return rA}}case c$2:return rA}}}reactIs_production_min$1.ContextConsumer=h$2;reactIs_production_min$1.ContextProvider=g$2;reactIs_production_min$1.Element=b$2;reactIs_production_min$1.ForwardRef=l$2;reactIs_production_min$1.Fragment=d$2;reactIs_production_min$1.Lazy=q$2;reactIs_production_min$1.Memo=p$2;reactIs_production_min$1.Portal=c$2;reactIs_production_min$1.Profiler=f$2;reactIs_production_min$1.StrictMode=e$1;reactIs_production_min$1.Suspense=m$2;reactIs_production_min$1.SuspenseList=n$2;reactIs_production_min$1.isAsyncMode=function(){return!1};reactIs_production_min$1.isConcurrentMode=function(){return!1};reactIs_production_min$1.isContextConsumer=function($){return v$2($)===h$2};reactIs_production_min$1.isContextProvider=function($){return v$2($)===g$2};reactIs_production_min$1.isElement=function($){return typeof $=="object"&&$!==null&&$.$$typeof===b$2};reactIs_production_min$1.isForwardRef=function($){return v$2($)===l$2};reactIs_production_min$1.isFragment=function($){return v$2($)===d$2};reactIs_production_min$1.isLazy=function($){return v$2($)===q$2};reactIs_production_min$1.isMemo=function($){return v$2($)===p$2};reactIs_production_min$1.isPortal=function($){return v$2($)===c$2};reactIs_production_min$1.isProfiler=function($){return v$2($)===f$2};reactIs_production_min$1.isStrictMode=function($){return v$2($)===e$1};reactIs_production_min$1.isSuspense=function($){return v$2($)===m$2};reactIs_production_min$1.isSuspenseList=function($){return v$2($)===n$2};reactIs_production_min$1.isValidElementType=function($){return typeof $=="string"||typeof $=="function"||$===d$2||$===f$2||$===e$1||$===m$2||$===n$2||$===t$2||typeof $=="object"&&$!==null&&($.$$typeof===q$2||$.$$typeof===p$2||$.$$typeof===g$2||$.$$typeof===h$2||$.$$typeof===l$2||$.$$typeof===u$2||$.getModuleId!==void 0)};reactIs_production_min$1.typeOf=v$2;function createListenerCollection(){const $=getBatch();let rA=null,eA=null;return{clear(){rA=null,eA=null},notify(){$(()=>{let AA=rA;for(;AA;)AA.callback(),AA=AA.next})},get(){let AA=[],tA=rA;for(;tA;)AA.push(tA),tA=tA.next;return AA},subscribe(AA){let tA=!0,nA=eA={callback:AA,next:null,prev:eA};return nA.prev?nA.prev.next=nA:rA=nA,function(){!tA||rA===null||(tA=!1,nA.next?nA.next.prev=nA.prev:eA=nA.prev,nA.prev?nA.prev.next=nA.next:rA=nA.next)}}}}const nullListeners={notify(){},get:()=>[]};function createSubscription($,rA){let eA,AA=nullListeners;function tA(sA){return lA(),AA.subscribe(sA)}function nA(){AA.notify()}function oA(){cA.onStateChange&&cA.onStateChange()}function iA(){return!!eA}function lA(){eA||(eA=rA?rA.addNestedSub(oA):$.subscribe(oA),AA=createListenerCollection())}function aA(){eA&&(eA(),eA=void 0,AA.clear(),AA=nullListeners)}const cA={addNestedSub:tA,notifyNestedSubs:nA,handleChangeWrapper:oA,isSubscribed:iA,trySubscribe:lA,tryUnsubscribe:aA,getListeners:()=>AA};return cA}const canUseDOM$2=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",useIsomorphicLayoutEffect=canUseDOM$2?reactExports.useLayoutEffect:reactExports.useEffect;function Provider({store:$,context:rA,children:eA,serverState:AA,stabilityCheck:tA="once",noopCheck:nA="once"}){const oA=reactExports.useMemo(()=>{const aA=createSubscription($);return{store:$,subscription:aA,getServerState:AA?()=>AA:void 0,stabilityCheck:tA,noopCheck:nA}},[$,AA,tA,nA]),iA=reactExports.useMemo(()=>$.getState(),[$]);useIsomorphicLayoutEffect(()=>{const{subscription:aA}=oA;return aA.onStateChange=aA.notifyNestedSubs,aA.trySubscribe(),iA!==$.getState()&&aA.notifyNestedSubs(),()=>{aA.tryUnsubscribe(),aA.onStateChange=void 0}},[oA,iA]);const lA=rA||ReactReduxContext;return reactExports.createElement(lA.Provider,{value:oA},eA)}function createStoreHook($=ReactReduxContext){const rA=$===ReactReduxContext?useReduxContext:createReduxContextHook($);return function(){const{store:AA}=rA();return AA}}const useStore=createStoreHook();function createDispatchHook($=ReactReduxContext){const rA=$===ReactReduxContext?useStore:createStoreHook($);return function(){return rA().dispatch}}const useDispatch=createDispatchHook();initializeUseSelector(withSelectorExports.useSyncExternalStoreWithSelector);setBatch(reactDomExports.unstable_batchedUpdates);const HistoryGoBackwardContext=React.createContext({canGoBackward:!1,goBackward:()=>{throw new Error("No history go backward function provided")}});function HistoryGoBackwardProvider({children:$,goBackward:rA,canGoBackward:eA}){return jsx(HistoryGoBackwardContext.Provider,{value:{goBackward:rA,canGoBackward:eA},children:$})}function useHistoryGoBackward(){return React.useContext(HistoryGoBackwardContext)}const min$1=Math.min,max=Math.max,round=Math.round,floor=Math.floor,createCoords=$=>({x:$,y:$}),oppositeSideMap={left:"right",right:"left",bottom:"top",top:"bottom"},oppositeAlignmentMap={start:"end",end:"start"};function clamp($,rA,eA){return max($,min$1(rA,eA))}function evaluate($,rA){return typeof $=="function"?$(rA):$}function getSide($){return $.split("-")[0]}function getAlignment($){return $.split("-")[1]}function getOppositeAxis($){return $==="x"?"y":"x"}function getAxisLength($){return $==="y"?"height":"width"}function getSideAxis($){return["top","bottom"].includes(getSide($))?"y":"x"}function getAlignmentAxis($){return getOppositeAxis(getSideAxis($))}function getAlignmentSides($,rA,eA){eA===void 0&&(eA=!1);const AA=getAlignment($),tA=getAlignmentAxis($),nA=getAxisLength(tA);let oA=tA==="x"?AA===(eA?"end":"start")?"right":"left":AA==="start"?"bottom":"top";return rA.reference[nA]>rA.floating[nA]&&(oA=getOppositePlacement$1(oA)),[oA,getOppositePlacement$1(oA)]}function getExpandedPlacements($){const rA=getOppositePlacement$1($);return[getOppositeAlignmentPlacement($),rA,getOppositeAlignmentPlacement(rA)]}function getOppositeAlignmentPlacement($){return $.replace(/start|end/g,rA=>oppositeAlignmentMap[rA])}function getSideList($,rA,eA){const AA=["left","right"],tA=["right","left"],nA=["top","bottom"],oA=["bottom","top"];switch($){case"top":case"bottom":return eA?rA?tA:AA:rA?AA:tA;case"left":case"right":return rA?nA:oA;default:return[]}}function getOppositeAxisPlacements($,rA,eA,AA){const tA=getAlignment($);let nA=getSideList(getSide($),eA==="start",AA);return tA&&(nA=nA.map(oA=>oA+"-"+tA),rA&&(nA=nA.concat(nA.map(getOppositeAlignmentPlacement)))),nA}function getOppositePlacement$1($){return $.replace(/left|right|bottom|top/g,rA=>oppositeSideMap[rA])}function expandPaddingObject($){return{top:0,right:0,bottom:0,left:0,...$}}function getPaddingObject($){return typeof $!="number"?expandPaddingObject($):{top:$,right:$,bottom:$,left:$}}function rectToClientRect($){return{...$,top:$.y,left:$.x,right:$.x+$.width,bottom:$.y+$.height}}function computeCoordsFromPlacement($,rA,eA){let{reference:AA,floating:tA}=$;const nA=getSideAxis(rA),oA=getAlignmentAxis(rA),iA=getAxisLength(oA),lA=getSide(rA),aA=nA==="y",cA=AA.x+AA.width/2-tA.width/2,sA=AA.y+AA.height/2-tA.height/2,uA=AA[iA]/2-tA[iA]/2;let pA;switch(lA){case"top":pA={x:cA,y:AA.y-tA.height};break;case"bottom":pA={x:cA,y:AA.y+AA.height};break;case"right":pA={x:AA.x+AA.width,y:sA};break;case"left":pA={x:AA.x-tA.width,y:sA};break;default:pA={x:AA.x,y:AA.y}}switch(getAlignment(rA)){case"start":pA[oA]-=uA*(eA&&aA?-1:1);break;case"end":pA[oA]+=uA*(eA&&aA?-1:1);break}return pA}const computePosition$1=async($,rA,eA)=>{const{placement:AA="bottom",strategy:tA="absolute",middleware:nA=[],platform:oA}=eA,iA=nA.filter(Boolean),lA=await(oA.isRTL==null?void 0:oA.isRTL(rA));let aA=await oA.getElementRects({reference:$,floating:rA,strategy:tA}),{x:cA,y:sA}=computeCoordsFromPlacement(aA,AA,lA),uA=AA,pA={},gA=0;for(let fA=0;fA({name:"arrow",options:$,async fn(rA){const{x:eA,y:AA,placement:tA,rects:nA,platform:oA,elements:iA,middlewareData:lA}=rA,{element:aA,padding:cA=0}=evaluate($,rA)||{};if(aA==null)return{};const sA=getPaddingObject(cA),uA={x:eA,y:AA},pA=getAlignmentAxis(tA),gA=getAxisLength(pA),fA=await oA.getDimensions(aA),wA=pA==="y",BA=wA?"top":"left",EA=wA?"bottom":"right",QA=wA?"clientHeight":"clientWidth",dA=nA.reference[gA]+nA.reference[pA]-uA[pA]-nA.floating[gA],yA=uA[pA]-nA.reference[pA],hA=await(oA.getOffsetParent==null?void 0:oA.getOffsetParent(aA));let vA=hA?hA[QA]:0;(!vA||!await(oA.isElement==null?void 0:oA.isElement(hA)))&&(vA=iA.floating[QA]||nA.floating[gA]);const CA=dA/2-yA/2,OA=vA/2-fA[gA]/2-1,IA=min$1(sA[BA],OA),xA=min$1(sA[EA],OA),PA=IA,$A=vA-fA[gA]-xA,jA=vA/2-fA[gA]/2+CA,MA=clamp(PA,jA,$A),kA=!lA.arrow&&getAlignment(tA)!=null&&jA!=MA&&nA.reference[gA]/2-(jAPA<=0)){var OA,IA;const PA=(((OA=nA.flip)==null?void 0:OA.index)||0)+1,$A=yA[PA];if($A)return{data:{index:PA,overflows:CA},reset:{placement:$A}};let jA=(IA=CA.filter(MA=>MA.overflows[0]<=0).sort((MA,kA)=>MA.overflows[1]-kA.overflows[1])[0])==null?void 0:IA.placement;if(!jA)switch(pA){case"bestFit":{var xA;const MA=(xA=CA.map(kA=>[kA.placement,kA.overflows.filter(zA=>zA>0).reduce((zA,DA)=>zA+DA,0)]).sort((kA,zA)=>kA[1]-zA[1])[0])==null?void 0:xA[0];MA&&(jA=MA);break}case"initialPlacement":jA=iA;break}if(tA!==jA)return{reset:{placement:jA}}}return{}}}};async function convertValueToCoords($,rA){const{placement:eA,platform:AA,elements:tA}=$,nA=await(AA.isRTL==null?void 0:AA.isRTL(tA.floating)),oA=getSide(eA),iA=getAlignment(eA),lA=getSideAxis(eA)==="y",aA=["left","top"].includes(oA)?-1:1,cA=nA&&lA?-1:1,sA=evaluate(rA,$);let{mainAxis:uA,crossAxis:pA,alignmentAxis:gA}=typeof sA=="number"?{mainAxis:sA,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...sA};return iA&&typeof gA=="number"&&(pA=iA==="end"?gA*-1:gA),lA?{x:pA*cA,y:uA*aA}:{x:uA*aA,y:pA*cA}}const offset$1=function($){return $===void 0&&($=0),{name:"offset",options:$,async fn(rA){const{x:eA,y:AA}=rA,tA=await convertValueToCoords(rA,$);return{x:eA+tA.x,y:AA+tA.y,data:tA}}}},shift$1=function($){return $===void 0&&($={}),{name:"shift",options:$,async fn(rA){const{x:eA,y:AA,placement:tA}=rA,{mainAxis:nA=!0,crossAxis:oA=!1,limiter:iA={fn:wA=>{let{x:BA,y:EA}=wA;return{x:BA,y:EA}}},...lA}=evaluate($,rA),aA={x:eA,y:AA},cA=await detectOverflow(rA,lA),sA=getSideAxis(getSide(tA)),uA=getOppositeAxis(sA);let pA=aA[uA],gA=aA[sA];if(nA){const wA=uA==="y"?"top":"left",BA=uA==="y"?"bottom":"right",EA=pA+cA[wA],QA=pA-cA[BA];pA=clamp(EA,pA,QA)}if(oA){const wA=sA==="y"?"top":"left",BA=sA==="y"?"bottom":"right",EA=gA+cA[wA],QA=gA-cA[BA];gA=clamp(EA,gA,QA)}const fA=iA.fn({...rA,[uA]:pA,[sA]:gA});return{...fA,data:{x:fA.x-eA,y:fA.y-AA}}}}},size=function($){return $===void 0&&($={}),{name:"size",options:$,async fn(rA){const{placement:eA,rects:AA,platform:tA,elements:nA}=rA,{apply:oA=()=>{},...iA}=evaluate($,rA),lA=await detectOverflow(rA,iA),aA=getSide(eA),cA=getAlignment(eA),sA=getSideAxis(eA)==="y",{width:uA,height:pA}=AA.floating;let gA,fA;aA==="top"||aA==="bottom"?(gA=aA,fA=cA===(await(tA.isRTL==null?void 0:tA.isRTL(nA.floating))?"start":"end")?"left":"right"):(fA=aA,gA=cA==="end"?"top":"bottom");const wA=pA-lA[gA],BA=uA-lA[fA],EA=!rA.middlewareData.shift;let QA=wA,dA=BA;if(sA){const hA=uA-lA.left-lA.right;dA=cA||EA?min$1(BA,hA):hA}else{const hA=pA-lA.top-lA.bottom;QA=cA||EA?min$1(wA,hA):hA}if(EA&&!cA){const hA=max(lA.left,0),vA=max(lA.right,0),CA=max(lA.top,0),OA=max(lA.bottom,0);sA?dA=uA-2*(hA!==0||vA!==0?hA+vA:max(lA.left,lA.right)):QA=pA-2*(CA!==0||OA!==0?CA+OA:max(lA.top,lA.bottom))}await oA({...rA,availableWidth:dA,availableHeight:QA});const yA=await tA.getDimensions(nA.floating);return uA!==yA.width||pA!==yA.height?{reset:{rects:!0}}:{}}}};function getNodeName($){return isNode($)?($.nodeName||"").toLowerCase():"#document"}function getWindow$2($){var rA;return($==null||(rA=$.ownerDocument)==null?void 0:rA.defaultView)||window}function getDocumentElement($){var rA;return(rA=(isNode($)?$.ownerDocument:$.document)||window.document)==null?void 0:rA.documentElement}function isNode($){return $ instanceof Node||$ instanceof getWindow$2($).Node}function isElement$1($){return $ instanceof Element||$ instanceof getWindow$2($).Element}function isHTMLElement$1($){return $ instanceof HTMLElement||$ instanceof getWindow$2($).HTMLElement}function isShadowRoot$1($){return typeof ShadowRoot>"u"?!1:$ instanceof ShadowRoot||$ instanceof getWindow$2($).ShadowRoot}function isOverflowElement($){const{overflow:rA,overflowX:eA,overflowY:AA,display:tA}=getComputedStyle$1($);return/auto|scroll|overlay|hidden|clip/.test(rA+AA+eA)&&!["inline","contents"].includes(tA)}function isTableElement($){return["table","td","th"].includes(getNodeName($))}function isContainingBlock($){const rA=isWebKit(),eA=getComputedStyle$1($);return eA.transform!=="none"||eA.perspective!=="none"||(eA.containerType?eA.containerType!=="normal":!1)||!rA&&(eA.backdropFilter?eA.backdropFilter!=="none":!1)||!rA&&(eA.filter?eA.filter!=="none":!1)||["transform","perspective","filter"].some(AA=>(eA.willChange||"").includes(AA))||["paint","layout","strict","content"].some(AA=>(eA.contain||"").includes(AA))}function getContainingBlock($){let rA=getParentNode$1($);for(;isHTMLElement$1(rA)&&!isLastTraversableNode(rA);){if(isContainingBlock(rA))return rA;rA=getParentNode$1(rA)}return null}function isWebKit(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function isLastTraversableNode($){return["html","body","#document"].includes(getNodeName($))}function getComputedStyle$1($){return getWindow$2($).getComputedStyle($)}function getNodeScroll($){return isElement$1($)?{scrollLeft:$.scrollLeft,scrollTop:$.scrollTop}:{scrollLeft:$.pageXOffset,scrollTop:$.pageYOffset}}function getParentNode$1($){if(getNodeName($)==="html")return $;const rA=$.assignedSlot||$.parentNode||isShadowRoot$1($)&&$.host||getDocumentElement($);return isShadowRoot$1(rA)?rA.host:rA}function getNearestOverflowAncestor($){const rA=getParentNode$1($);return isLastTraversableNode(rA)?$.ownerDocument?$.ownerDocument.body:$.body:isHTMLElement$1(rA)&&isOverflowElement(rA)?rA:getNearestOverflowAncestor(rA)}function getOverflowAncestors($,rA,eA){var AA;rA===void 0&&(rA=[]),eA===void 0&&(eA=!0);const tA=getNearestOverflowAncestor($),nA=tA===((AA=$.ownerDocument)==null?void 0:AA.body),oA=getWindow$2(tA);return nA?rA.concat(oA,oA.visualViewport||[],isOverflowElement(tA)?tA:[],oA.frameElement&&eA?getOverflowAncestors(oA.frameElement):[]):rA.concat(tA,getOverflowAncestors(tA))}function getCssDimensions($){const rA=getComputedStyle$1($);let eA=parseFloat(rA.width)||0,AA=parseFloat(rA.height)||0;const tA=isHTMLElement$1($),nA=tA?$.offsetWidth:eA,oA=tA?$.offsetHeight:AA,iA=round(eA)!==nA||round(AA)!==oA;return iA&&(eA=nA,AA=oA),{width:eA,height:AA,$:iA}}function unwrapElement($){return isElement$1($)?$:$.contextElement}function getScale($){const rA=unwrapElement($);if(!isHTMLElement$1(rA))return createCoords(1);const eA=rA.getBoundingClientRect(),{width:AA,height:tA,$:nA}=getCssDimensions(rA);let oA=(nA?round(eA.width):eA.width)/AA,iA=(nA?round(eA.height):eA.height)/tA;return(!oA||!Number.isFinite(oA))&&(oA=1),(!iA||!Number.isFinite(iA))&&(iA=1),{x:oA,y:iA}}const noOffsets=createCoords(0);function getVisualOffsets($){const rA=getWindow$2($);return!isWebKit()||!rA.visualViewport?noOffsets:{x:rA.visualViewport.offsetLeft,y:rA.visualViewport.offsetTop}}function shouldAddVisualOffsets($,rA,eA){return rA===void 0&&(rA=!1),!eA||rA&&eA!==getWindow$2($)?!1:rA}function getBoundingClientRect$1($,rA,eA,AA){rA===void 0&&(rA=!1),eA===void 0&&(eA=!1);const tA=$.getBoundingClientRect(),nA=unwrapElement($);let oA=createCoords(1);rA&&(AA?isElement$1(AA)&&(oA=getScale(AA)):oA=getScale($));const iA=shouldAddVisualOffsets(nA,eA,AA)?getVisualOffsets(nA):createCoords(0);let lA=(tA.left+iA.x)/oA.x,aA=(tA.top+iA.y)/oA.y,cA=tA.width/oA.x,sA=tA.height/oA.y;if(nA){const uA=getWindow$2(nA),pA=AA&&isElement$1(AA)?getWindow$2(AA):AA;let gA=uA.frameElement;for(;gA&&AA&&pA!==uA;){const fA=getScale(gA),wA=gA.getBoundingClientRect(),BA=getComputedStyle$1(gA),EA=wA.left+(gA.clientLeft+parseFloat(BA.paddingLeft))*fA.x,QA=wA.top+(gA.clientTop+parseFloat(BA.paddingTop))*fA.y;lA*=fA.x,aA*=fA.y,cA*=fA.x,sA*=fA.y,lA+=EA,aA+=QA,gA=getWindow$2(gA).frameElement}}return rectToClientRect({width:cA,height:sA,x:lA,y:aA})}function convertOffsetParentRelativeRectToViewportRelativeRect($){let{rect:rA,offsetParent:eA,strategy:AA}=$;const tA=isHTMLElement$1(eA),nA=getDocumentElement(eA);if(eA===nA)return rA;let oA={scrollLeft:0,scrollTop:0},iA=createCoords(1);const lA=createCoords(0);if((tA||!tA&&AA!=="fixed")&&((getNodeName(eA)!=="body"||isOverflowElement(nA))&&(oA=getNodeScroll(eA)),isHTMLElement$1(eA))){const aA=getBoundingClientRect$1(eA);iA=getScale(eA),lA.x=aA.x+eA.clientLeft,lA.y=aA.y+eA.clientTop}return{width:rA.width*iA.x,height:rA.height*iA.y,x:rA.x*iA.x-oA.scrollLeft*iA.x+lA.x,y:rA.y*iA.y-oA.scrollTop*iA.y+lA.y}}function getClientRects($){return Array.from($.getClientRects())}function getWindowScrollBarX($){return getBoundingClientRect$1(getDocumentElement($)).left+getNodeScroll($).scrollLeft}function getDocumentRect($){const rA=getDocumentElement($),eA=getNodeScroll($),AA=$.ownerDocument.body,tA=max(rA.scrollWidth,rA.clientWidth,AA.scrollWidth,AA.clientWidth),nA=max(rA.scrollHeight,rA.clientHeight,AA.scrollHeight,AA.clientHeight);let oA=-eA.scrollLeft+getWindowScrollBarX($);const iA=-eA.scrollTop;return getComputedStyle$1(AA).direction==="rtl"&&(oA+=max(rA.clientWidth,AA.clientWidth)-tA),{width:tA,height:nA,x:oA,y:iA}}function getViewportRect($,rA){const eA=getWindow$2($),AA=getDocumentElement($),tA=eA.visualViewport;let nA=AA.clientWidth,oA=AA.clientHeight,iA=0,lA=0;if(tA){nA=tA.width,oA=tA.height;const aA=isWebKit();(!aA||aA&&rA==="fixed")&&(iA=tA.offsetLeft,lA=tA.offsetTop)}return{width:nA,height:oA,x:iA,y:lA}}function getInnerBoundingClientRect($,rA){const eA=getBoundingClientRect$1($,!0,rA==="fixed"),AA=eA.top+$.clientTop,tA=eA.left+$.clientLeft,nA=isHTMLElement$1($)?getScale($):createCoords(1),oA=$.clientWidth*nA.x,iA=$.clientHeight*nA.y,lA=tA*nA.x,aA=AA*nA.y;return{width:oA,height:iA,x:lA,y:aA}}function getClientRectFromClippingAncestor($,rA,eA){let AA;if(rA==="viewport")AA=getViewportRect($,eA);else if(rA==="document")AA=getDocumentRect(getDocumentElement($));else if(isElement$1(rA))AA=getInnerBoundingClientRect(rA,eA);else{const tA=getVisualOffsets($);AA={...rA,x:rA.x-tA.x,y:rA.y-tA.y}}return rectToClientRect(AA)}function hasFixedPositionAncestor($,rA){const eA=getParentNode$1($);return eA===rA||!isElement$1(eA)||isLastTraversableNode(eA)?!1:getComputedStyle$1(eA).position==="fixed"||hasFixedPositionAncestor(eA,rA)}function getClippingElementAncestors($,rA){const eA=rA.get($);if(eA)return eA;let AA=getOverflowAncestors($,[],!1).filter(iA=>isElement$1(iA)&&getNodeName(iA)!=="body"),tA=null;const nA=getComputedStyle$1($).position==="fixed";let oA=nA?getParentNode$1($):$;for(;isElement$1(oA)&&!isLastTraversableNode(oA);){const iA=getComputedStyle$1(oA),lA=isContainingBlock(oA);!lA&&iA.position==="fixed"&&(tA=null),(nA?!lA&&!tA:!lA&&iA.position==="static"&&!!tA&&["absolute","fixed"].includes(tA.position)||isOverflowElement(oA)&&!lA&&hasFixedPositionAncestor($,oA))?AA=AA.filter(cA=>cA!==oA):tA=iA,oA=getParentNode$1(oA)}return rA.set($,AA),AA}function getClippingRect($){let{element:rA,boundary:eA,rootBoundary:AA,strategy:tA}=$;const oA=[...eA==="clippingAncestors"?getClippingElementAncestors(rA,this._c):[].concat(eA),AA],iA=oA[0],lA=oA.reduce((aA,cA)=>{const sA=getClientRectFromClippingAncestor(rA,cA,tA);return aA.top=max(sA.top,aA.top),aA.right=min$1(sA.right,aA.right),aA.bottom=min$1(sA.bottom,aA.bottom),aA.left=max(sA.left,aA.left),aA},getClientRectFromClippingAncestor(rA,iA,tA));return{width:lA.right-lA.left,height:lA.bottom-lA.top,x:lA.left,y:lA.top}}function getDimensions($){return getCssDimensions($)}function getRectRelativeToOffsetParent($,rA,eA){const AA=isHTMLElement$1(rA),tA=getDocumentElement(rA),nA=eA==="fixed",oA=getBoundingClientRect$1($,!0,nA,rA);let iA={scrollLeft:0,scrollTop:0};const lA=createCoords(0);if(AA||!AA&&!nA)if((getNodeName(rA)!=="body"||isOverflowElement(tA))&&(iA=getNodeScroll(rA)),AA){const aA=getBoundingClientRect$1(rA,!0,nA,rA);lA.x=aA.x+rA.clientLeft,lA.y=aA.y+rA.clientTop}else tA&&(lA.x=getWindowScrollBarX(tA));return{x:oA.left+iA.scrollLeft-lA.x,y:oA.top+iA.scrollTop-lA.y,width:oA.width,height:oA.height}}function getTrueOffsetParent($,rA){return!isHTMLElement$1($)||getComputedStyle$1($).position==="fixed"?null:rA?rA($):$.offsetParent}function getOffsetParent$1($,rA){const eA=getWindow$2($);if(!isHTMLElement$1($))return eA;let AA=getTrueOffsetParent($,rA);for(;AA&&isTableElement(AA)&&getComputedStyle$1(AA).position==="static";)AA=getTrueOffsetParent(AA,rA);return AA&&(getNodeName(AA)==="html"||getNodeName(AA)==="body"&&getComputedStyle$1(AA).position==="static"&&!isContainingBlock(AA))?eA:AA||getContainingBlock($)||eA}const getElementRects=async function($){let{reference:rA,floating:eA,strategy:AA}=$;const tA=this.getOffsetParent||getOffsetParent$1,nA=this.getDimensions;return{reference:getRectRelativeToOffsetParent(rA,await tA(eA),AA),floating:{x:0,y:0,...await nA(eA)}}};function isRTL($){return getComputedStyle$1($).direction==="rtl"}const platform={convertOffsetParentRelativeRectToViewportRelativeRect,getDocumentElement,getClippingRect,getOffsetParent:getOffsetParent$1,getElementRects,getClientRects,getDimensions,getScale,isElement:isElement$1,isRTL};function observeMove($,rA){let eA=null,AA;const tA=getDocumentElement($);function nA(){clearTimeout(AA),eA&&eA.disconnect(),eA=null}function oA(iA,lA){iA===void 0&&(iA=!1),lA===void 0&&(lA=1),nA();const{left:aA,top:cA,width:sA,height:uA}=$.getBoundingClientRect();if(iA||rA(),!sA||!uA)return;const pA=floor(cA),gA=floor(tA.clientWidth-(aA+sA)),fA=floor(tA.clientHeight-(cA+uA)),wA=floor(aA),EA={rootMargin:-pA+"px "+-gA+"px "+-fA+"px "+-wA+"px",threshold:max(0,min$1(1,lA))||1};let QA=!0;function dA(yA){const hA=yA[0].intersectionRatio;if(hA!==lA){if(!QA)return oA();hA?oA(!1,hA):AA=setTimeout(()=>{oA(!1,1e-7)},100)}QA=!1}try{eA=new IntersectionObserver(dA,{...EA,root:tA.ownerDocument})}catch{eA=new IntersectionObserver(dA,EA)}eA.observe($)}return oA(!0),nA}function autoUpdate($,rA,eA,AA){AA===void 0&&(AA={});const{ancestorScroll:tA=!0,ancestorResize:nA=!0,elementResize:oA=typeof ResizeObserver=="function",layoutShift:iA=typeof IntersectionObserver=="function",animationFrame:lA=!1}=AA,aA=unwrapElement($),cA=tA||nA?[...aA?getOverflowAncestors(aA):[],...getOverflowAncestors(rA)]:[];cA.forEach(BA=>{tA&&BA.addEventListener("scroll",eA,{passive:!0}),nA&&BA.addEventListener("resize",eA)});const sA=aA&&iA?observeMove(aA,eA):null;let uA=-1,pA=null;oA&&(pA=new ResizeObserver(BA=>{let[EA]=BA;EA&&EA.target===aA&&pA&&(pA.unobserve(rA),cancelAnimationFrame(uA),uA=requestAnimationFrame(()=>{pA&&pA.observe(rA)})),eA()}),aA&&!lA&&pA.observe(aA),pA.observe(rA));let gA,fA=lA?getBoundingClientRect$1($):null;lA&&wA();function wA(){const BA=getBoundingClientRect$1($);fA&&(BA.x!==fA.x||BA.y!==fA.y||BA.width!==fA.width||BA.height!==fA.height)&&eA(),fA=BA,gA=requestAnimationFrame(wA)}return eA(),()=>{cA.forEach(BA=>{tA&&BA.removeEventListener("scroll",eA),nA&&BA.removeEventListener("resize",eA)}),sA&&sA(),pA&&pA.disconnect(),pA=null,lA&&cancelAnimationFrame(gA)}}const computePosition=($,rA,eA)=>{const AA=new Map,tA={platform,...eA},nA={...tA.platform,_c:AA};return computePosition$1($,rA,{...tA,platform:nA})},arrow$1=$=>{const{element:rA,padding:eA}=$;function AA(tA){return Object.prototype.hasOwnProperty.call(tA,"current")}return{name:"arrow",options:$,fn(tA){return AA(rA)?rA.current!=null?arrow$2({element:rA.current,padding:eA}).fn(tA):{}:rA?arrow$2({element:rA,padding:eA}).fn(tA):{}}}};var index$3=typeof document<"u"?reactExports.useLayoutEffect:reactExports.useEffect;function deepEqual($,rA){if($===rA)return!0;if(typeof $!=typeof rA)return!1;if(typeof $=="function"&&$.toString()===rA.toString())return!0;let eA,AA,tA;if($&&rA&&typeof $=="object"){if(Array.isArray($)){if(eA=$.length,eA!=rA.length)return!1;for(AA=eA;AA--!==0;)if(!deepEqual($[AA],rA[AA]))return!1;return!0}if(tA=Object.keys($),eA=tA.length,eA!==Object.keys(rA).length)return!1;for(AA=eA;AA--!==0;)if(!Object.prototype.hasOwnProperty.call(rA,tA[AA]))return!1;for(AA=eA;AA--!==0;){const nA=tA[AA];if(!(nA==="_owner"&&$.$$typeof)&&!deepEqual($[nA],rA[nA]))return!1}return!0}return $!==$&&rA!==rA}function useLatestRef$1($){const rA=reactExports.useRef($);return index$3(()=>{rA.current=$}),rA}function useFloating$1($){$===void 0&&($={});const{placement:rA="bottom",strategy:eA="absolute",middleware:AA=[],platform:tA,whileElementsMounted:nA,open:oA}=$,[iA,lA]=reactExports.useState({x:null,y:null,strategy:eA,placement:rA,middlewareData:{},isPositioned:!1}),[aA,cA]=reactExports.useState(AA);deepEqual(aA,AA)||cA(AA);const sA=reactExports.useRef(null),uA=reactExports.useRef(null),pA=reactExports.useRef(iA),gA=useLatestRef$1(nA),fA=useLatestRef$1(tA),[wA,BA]=reactExports.useState(null),[EA,QA]=reactExports.useState(null),dA=reactExports.useCallback(IA=>{sA.current!==IA&&(sA.current=IA,BA(IA))},[]),yA=reactExports.useCallback(IA=>{uA.current!==IA&&(uA.current=IA,QA(IA))},[]),hA=reactExports.useCallback(()=>{if(!sA.current||!uA.current)return;const IA={placement:rA,strategy:eA,middleware:aA};fA.current&&(IA.platform=fA.current),computePosition(sA.current,uA.current,IA).then(xA=>{const PA={...xA,isPositioned:!0};vA.current&&!deepEqual(pA.current,PA)&&(pA.current=PA,reactDomExports.flushSync(()=>{lA(PA)}))})},[aA,rA,eA,fA]);index$3(()=>{oA===!1&&pA.current.isPositioned&&(pA.current.isPositioned=!1,lA(IA=>({...IA,isPositioned:!1})))},[oA]);const vA=reactExports.useRef(!1);index$3(()=>(vA.current=!0,()=>{vA.current=!1}),[]),index$3(()=>{if(wA&&EA){if(gA.current)return gA.current(wA,EA,hA);hA()}},[wA,EA,hA,gA]);const CA=reactExports.useMemo(()=>({reference:sA,floating:uA,setReference:dA,setFloating:yA}),[dA,yA]),OA=reactExports.useMemo(()=>({reference:wA,floating:EA}),[wA,EA]);return reactExports.useMemo(()=>({...iA,update:hA,refs:CA,elements:OA,reference:dA,floating:yA}),[iA,hA,CA,OA,dA,yA])}var getDefaultParent=function($){if(typeof document>"u")return null;var rA=Array.isArray($)?$[0]:$;return rA.ownerDocument.body},counterMap=new WeakMap,uncontrolledNodes=new WeakMap,markerMap={},lockCount=0,unwrapHost=function($){return $&&($.host||unwrapHost($.parentNode))},correctTargets=function($,rA){return rA.map(function(eA){if($.contains(eA))return eA;var AA=unwrapHost(eA);return AA&&$.contains(AA)?AA:(console.error("aria-hidden",eA,"in not contained inside",$,". Doing nothing"),null)}).filter(function(eA){return!!eA})},applyAttributeToOthers=function($,rA,eA,AA){var tA=correctTargets(rA,Array.isArray($)?$:[$]);markerMap[eA]||(markerMap[eA]=new WeakMap);var nA=markerMap[eA],oA=[],iA=new Set,lA=new Set(tA),aA=function(sA){!sA||iA.has(sA)||(iA.add(sA),aA(sA.parentNode))};tA.forEach(aA);var cA=function(sA){!sA||lA.has(sA)||Array.prototype.forEach.call(sA.children,function(uA){if(iA.has(uA))cA(uA);else{var pA=uA.getAttribute(AA),gA=pA!==null&&pA!=="false",fA=(counterMap.get(uA)||0)+1,wA=(nA.get(uA)||0)+1;counterMap.set(uA,fA),nA.set(uA,wA),oA.push(uA),fA===1&&gA&&uncontrolledNodes.set(uA,!0),wA===1&&uA.setAttribute(eA,"true"),gA||uA.setAttribute(AA,"true")}})};return cA(rA),iA.clear(),lockCount++,function(){oA.forEach(function(sA){var uA=counterMap.get(sA)-1,pA=nA.get(sA)-1;counterMap.set(sA,uA),nA.set(sA,pA),uA||(uncontrolledNodes.has(sA)||sA.removeAttribute(AA),uncontrolledNodes.delete(sA)),pA||sA.removeAttribute(eA)}),lockCount--,lockCount||(counterMap=new WeakMap,counterMap=new WeakMap,uncontrolledNodes=new WeakMap,markerMap={})}},hideOthers=function($,rA,eA){eA===void 0&&(eA="data-aria-hidden");var AA=Array.from(Array.isArray($)?$:[$]),tA=rA||getDefaultParent($);return tA?(AA.push.apply(AA,Array.from(tA.querySelectorAll("[aria-live]"))),applyAttributeToOthers(AA,tA,eA,"aria-hidden")):function(){return null}};/*! + */var b$2=Symbol.for("react.element"),c$2=Symbol.for("react.portal"),d$2=Symbol.for("react.fragment"),e$1=Symbol.for("react.strict_mode"),f$2=Symbol.for("react.profiler"),g$2=Symbol.for("react.provider"),h$2=Symbol.for("react.context"),k$2=Symbol.for("react.server_context"),l$2=Symbol.for("react.forward_ref"),m$2=Symbol.for("react.suspense"),n$2=Symbol.for("react.suspense_list"),p$2=Symbol.for("react.memo"),q$2=Symbol.for("react.lazy"),t$2=Symbol.for("react.offscreen"),u$2;u$2=Symbol.for("react.module.reference");function v$2($){if(typeof $=="object"&&$!==null){var rA=$.$$typeof;switch(rA){case b$2:switch($=$.type,$){case d$2:case f$2:case e$1:case m$2:case n$2:return $;default:switch($=$&&$.$$typeof,$){case k$2:case h$2:case l$2:case q$2:case p$2:case g$2:return $;default:return rA}}case c$2:return rA}}}reactIs_production_min$1.ContextConsumer=h$2;reactIs_production_min$1.ContextProvider=g$2;reactIs_production_min$1.Element=b$2;reactIs_production_min$1.ForwardRef=l$2;reactIs_production_min$1.Fragment=d$2;reactIs_production_min$1.Lazy=q$2;reactIs_production_min$1.Memo=p$2;reactIs_production_min$1.Portal=c$2;reactIs_production_min$1.Profiler=f$2;reactIs_production_min$1.StrictMode=e$1;reactIs_production_min$1.Suspense=m$2;reactIs_production_min$1.SuspenseList=n$2;reactIs_production_min$1.isAsyncMode=function(){return!1};reactIs_production_min$1.isConcurrentMode=function(){return!1};reactIs_production_min$1.isContextConsumer=function($){return v$2($)===h$2};reactIs_production_min$1.isContextProvider=function($){return v$2($)===g$2};reactIs_production_min$1.isElement=function($){return typeof $=="object"&&$!==null&&$.$$typeof===b$2};reactIs_production_min$1.isForwardRef=function($){return v$2($)===l$2};reactIs_production_min$1.isFragment=function($){return v$2($)===d$2};reactIs_production_min$1.isLazy=function($){return v$2($)===q$2};reactIs_production_min$1.isMemo=function($){return v$2($)===p$2};reactIs_production_min$1.isPortal=function($){return v$2($)===c$2};reactIs_production_min$1.isProfiler=function($){return v$2($)===f$2};reactIs_production_min$1.isStrictMode=function($){return v$2($)===e$1};reactIs_production_min$1.isSuspense=function($){return v$2($)===m$2};reactIs_production_min$1.isSuspenseList=function($){return v$2($)===n$2};reactIs_production_min$1.isValidElementType=function($){return typeof $=="string"||typeof $=="function"||$===d$2||$===f$2||$===e$1||$===m$2||$===n$2||$===t$2||typeof $=="object"&&$!==null&&($.$$typeof===q$2||$.$$typeof===p$2||$.$$typeof===g$2||$.$$typeof===h$2||$.$$typeof===l$2||$.$$typeof===u$2||$.getModuleId!==void 0)};reactIs_production_min$1.typeOf=v$2;function createListenerCollection(){const $=getBatch();let rA=null,eA=null;return{clear(){rA=null,eA=null},notify(){$(()=>{let AA=rA;for(;AA;)AA.callback(),AA=AA.next})},get(){let AA=[],tA=rA;for(;tA;)AA.push(tA),tA=tA.next;return AA},subscribe(AA){let tA=!0,nA=eA={callback:AA,next:null,prev:eA};return nA.prev?nA.prev.next=nA:rA=nA,function(){!tA||rA===null||(tA=!1,nA.next?nA.next.prev=nA.prev:eA=nA.prev,nA.prev?nA.prev.next=nA.next:rA=nA.next)}}}}const nullListeners={notify(){},get:()=>[]};function createSubscription($,rA){let eA,AA=nullListeners;function tA(sA){return lA(),AA.subscribe(sA)}function nA(){AA.notify()}function oA(){cA.onStateChange&&cA.onStateChange()}function iA(){return!!eA}function lA(){eA||(eA=rA?rA.addNestedSub(oA):$.subscribe(oA),AA=createListenerCollection())}function aA(){eA&&(eA(),eA=void 0,AA.clear(),AA=nullListeners)}const cA={addNestedSub:tA,notifyNestedSubs:nA,handleChangeWrapper:oA,isSubscribed:iA,trySubscribe:lA,tryUnsubscribe:aA,getListeners:()=>AA};return cA}const canUseDOM$2=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",useIsomorphicLayoutEffect=canUseDOM$2?reactExports.useLayoutEffect:reactExports.useEffect;function Provider({store:$,context:rA,children:eA,serverState:AA,stabilityCheck:tA="once",noopCheck:nA="once"}){const oA=reactExports.useMemo(()=>{const aA=createSubscription($);return{store:$,subscription:aA,getServerState:AA?()=>AA:void 0,stabilityCheck:tA,noopCheck:nA}},[$,AA,tA,nA]),iA=reactExports.useMemo(()=>$.getState(),[$]);useIsomorphicLayoutEffect(()=>{const{subscription:aA}=oA;return aA.onStateChange=aA.notifyNestedSubs,aA.trySubscribe(),iA!==$.getState()&&aA.notifyNestedSubs(),()=>{aA.tryUnsubscribe(),aA.onStateChange=void 0}},[oA,iA]);const lA=rA||ReactReduxContext;return reactExports.createElement(lA.Provider,{value:oA},eA)}function createStoreHook($=ReactReduxContext){const rA=$===ReactReduxContext?useReduxContext:createReduxContextHook($);return function(){const{store:AA}=rA();return AA}}const useStore=createStoreHook();function createDispatchHook($=ReactReduxContext){const rA=$===ReactReduxContext?useStore:createStoreHook($);return function(){return rA().dispatch}}const useDispatch=createDispatchHook();initializeUseSelector(withSelectorExports.useSyncExternalStoreWithSelector);setBatch(reactDomExports.unstable_batchedUpdates);const HistoryGoBackwardContext=React.createContext({canGoBackward:!1,goBackward:()=>{throw new Error("No history go backward function provided")}});function HistoryGoBackwardProvider({children:$,goBackward:rA,canGoBackward:eA}){return jsx(HistoryGoBackwardContext.Provider,{value:{goBackward:rA,canGoBackward:eA},children:$})}function useHistoryGoBackward(){return React.useContext(HistoryGoBackwardContext)}const min$1=Math.min,max=Math.max,round=Math.round,floor=Math.floor,createCoords=$=>({x:$,y:$}),oppositeSideMap={left:"right",right:"left",bottom:"top",top:"bottom"},oppositeAlignmentMap={start:"end",end:"start"};function clamp($,rA,eA){return max($,min$1(rA,eA))}function evaluate($,rA){return typeof $=="function"?$(rA):$}function getSide($){return $.split("-")[0]}function getAlignment($){return $.split("-")[1]}function getOppositeAxis($){return $==="x"?"y":"x"}function getAxisLength($){return $==="y"?"height":"width"}function getSideAxis($){return["top","bottom"].includes(getSide($))?"y":"x"}function getAlignmentAxis($){return getOppositeAxis(getSideAxis($))}function getAlignmentSides($,rA,eA){eA===void 0&&(eA=!1);const AA=getAlignment($),tA=getAlignmentAxis($),nA=getAxisLength(tA);let oA=tA==="x"?AA===(eA?"end":"start")?"right":"left":AA==="start"?"bottom":"top";return rA.reference[nA]>rA.floating[nA]&&(oA=getOppositePlacement$1(oA)),[oA,getOppositePlacement$1(oA)]}function getExpandedPlacements($){const rA=getOppositePlacement$1($);return[getOppositeAlignmentPlacement($),rA,getOppositeAlignmentPlacement(rA)]}function getOppositeAlignmentPlacement($){return $.replace(/start|end/g,rA=>oppositeAlignmentMap[rA])}function getSideList($,rA,eA){const AA=["left","right"],tA=["right","left"],nA=["top","bottom"],oA=["bottom","top"];switch($){case"top":case"bottom":return eA?rA?tA:AA:rA?AA:tA;case"left":case"right":return rA?nA:oA;default:return[]}}function getOppositeAxisPlacements($,rA,eA,AA){const tA=getAlignment($);let nA=getSideList(getSide($),eA==="start",AA);return tA&&(nA=nA.map(oA=>oA+"-"+tA),rA&&(nA=nA.concat(nA.map(getOppositeAlignmentPlacement)))),nA}function getOppositePlacement$1($){return $.replace(/left|right|bottom|top/g,rA=>oppositeSideMap[rA])}function expandPaddingObject($){return{top:0,right:0,bottom:0,left:0,...$}}function getPaddingObject($){return typeof $!="number"?expandPaddingObject($):{top:$,right:$,bottom:$,left:$}}function rectToClientRect($){return{...$,top:$.y,left:$.x,right:$.x+$.width,bottom:$.y+$.height}}function computeCoordsFromPlacement($,rA,eA){let{reference:AA,floating:tA}=$;const nA=getSideAxis(rA),oA=getAlignmentAxis(rA),iA=getAxisLength(oA),lA=getSide(rA),aA=nA==="y",cA=AA.x+AA.width/2-tA.width/2,sA=AA.y+AA.height/2-tA.height/2,uA=AA[iA]/2-tA[iA]/2;let pA;switch(lA){case"top":pA={x:cA,y:AA.y-tA.height};break;case"bottom":pA={x:cA,y:AA.y+AA.height};break;case"right":pA={x:AA.x+AA.width,y:sA};break;case"left":pA={x:AA.x-tA.width,y:sA};break;default:pA={x:AA.x,y:AA.y}}switch(getAlignment(rA)){case"start":pA[oA]-=uA*(eA&&aA?-1:1);break;case"end":pA[oA]+=uA*(eA&&aA?-1:1);break}return pA}const computePosition$1=async($,rA,eA)=>{const{placement:AA="bottom",strategy:tA="absolute",middleware:nA=[],platform:oA}=eA,iA=nA.filter(Boolean),lA=await(oA.isRTL==null?void 0:oA.isRTL(rA));let aA=await oA.getElementRects({reference:$,floating:rA,strategy:tA}),{x:cA,y:sA}=computeCoordsFromPlacement(aA,AA,lA),uA=AA,pA={},gA=0;for(let fA=0;fA({name:"arrow",options:$,async fn(rA){const{x:eA,y:AA,placement:tA,rects:nA,platform:oA,elements:iA,middlewareData:lA}=rA,{element:aA,padding:cA=0}=evaluate($,rA)||{};if(aA==null)return{};const sA=getPaddingObject(cA),uA={x:eA,y:AA},pA=getAlignmentAxis(tA),gA=getAxisLength(pA),fA=await oA.getDimensions(aA),wA=pA==="y",BA=wA?"top":"left",EA=wA?"bottom":"right",QA=wA?"clientHeight":"clientWidth",dA=nA.reference[gA]+nA.reference[pA]-uA[pA]-nA.floating[gA],yA=uA[pA]-nA.reference[pA],hA=await(oA.getOffsetParent==null?void 0:oA.getOffsetParent(aA));let vA=hA?hA[QA]:0;(!vA||!await(oA.isElement==null?void 0:oA.isElement(hA)))&&(vA=iA.floating[QA]||nA.floating[gA]);const CA=dA/2-yA/2,OA=vA/2-fA[gA]/2-1,IA=min$1(sA[BA],OA),xA=min$1(sA[EA],OA),PA=IA,$A=vA-fA[gA]-xA,jA=vA/2-fA[gA]/2+CA,MA=clamp(PA,jA,$A),kA=!lA.arrow&&getAlignment(tA)!=null&&jA!=MA&&nA.reference[gA]/2-(jAPA<=0)){var OA,IA;const PA=(((OA=nA.flip)==null?void 0:OA.index)||0)+1,$A=yA[PA];if($A)return{data:{index:PA,overflows:CA},reset:{placement:$A}};let jA=(IA=CA.filter(MA=>MA.overflows[0]<=0).sort((MA,kA)=>MA.overflows[1]-kA.overflows[1])[0])==null?void 0:IA.placement;if(!jA)switch(pA){case"bestFit":{var xA;const MA=(xA=CA.map(kA=>[kA.placement,kA.overflows.filter(zA=>zA>0).reduce((zA,DA)=>zA+DA,0)]).sort((kA,zA)=>kA[1]-zA[1])[0])==null?void 0:xA[0];MA&&(jA=MA);break}case"initialPlacement":jA=iA;break}if(tA!==jA)return{reset:{placement:jA}}}return{}}}};async function convertValueToCoords($,rA){const{placement:eA,platform:AA,elements:tA}=$,nA=await(AA.isRTL==null?void 0:AA.isRTL(tA.floating)),oA=getSide(eA),iA=getAlignment(eA),lA=getSideAxis(eA)==="y",aA=["left","top"].includes(oA)?-1:1,cA=nA&&lA?-1:1,sA=evaluate(rA,$);let{mainAxis:uA,crossAxis:pA,alignmentAxis:gA}=typeof sA=="number"?{mainAxis:sA,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...sA};return iA&&typeof gA=="number"&&(pA=iA==="end"?gA*-1:gA),lA?{x:pA*cA,y:uA*aA}:{x:uA*aA,y:pA*cA}}const offset$1=function($){return $===void 0&&($=0),{name:"offset",options:$,async fn(rA){const{x:eA,y:AA}=rA,tA=await convertValueToCoords(rA,$);return{x:eA+tA.x,y:AA+tA.y,data:tA}}}},shift$1=function($){return $===void 0&&($={}),{name:"shift",options:$,async fn(rA){const{x:eA,y:AA,placement:tA}=rA,{mainAxis:nA=!0,crossAxis:oA=!1,limiter:iA={fn:wA=>{let{x:BA,y:EA}=wA;return{x:BA,y:EA}}},...lA}=evaluate($,rA),aA={x:eA,y:AA},cA=await detectOverflow(rA,lA),sA=getSideAxis(getSide(tA)),uA=getOppositeAxis(sA);let pA=aA[uA],gA=aA[sA];if(nA){const wA=uA==="y"?"top":"left",BA=uA==="y"?"bottom":"right",EA=pA+cA[wA],QA=pA-cA[BA];pA=clamp(EA,pA,QA)}if(oA){const wA=sA==="y"?"top":"left",BA=sA==="y"?"bottom":"right",EA=gA+cA[wA],QA=gA-cA[BA];gA=clamp(EA,gA,QA)}const fA=iA.fn({...rA,[uA]:pA,[sA]:gA});return{...fA,data:{x:fA.x-eA,y:fA.y-AA}}}}},size=function($){return $===void 0&&($={}),{name:"size",options:$,async fn(rA){const{placement:eA,rects:AA,platform:tA,elements:nA}=rA,{apply:oA=()=>{},...iA}=evaluate($,rA),lA=await detectOverflow(rA,iA),aA=getSide(eA),cA=getAlignment(eA),sA=getSideAxis(eA)==="y",{width:uA,height:pA}=AA.floating;let gA,fA;aA==="top"||aA==="bottom"?(gA=aA,fA=cA===(await(tA.isRTL==null?void 0:tA.isRTL(nA.floating))?"start":"end")?"left":"right"):(fA=aA,gA=cA==="end"?"top":"bottom");const wA=pA-lA[gA],BA=uA-lA[fA],EA=!rA.middlewareData.shift;let QA=wA,dA=BA;if(sA){const hA=uA-lA.left-lA.right;dA=cA||EA?min$1(BA,hA):hA}else{const hA=pA-lA.top-lA.bottom;QA=cA||EA?min$1(wA,hA):hA}if(EA&&!cA){const hA=max(lA.left,0),vA=max(lA.right,0),CA=max(lA.top,0),OA=max(lA.bottom,0);sA?dA=uA-2*(hA!==0||vA!==0?hA+vA:max(lA.left,lA.right)):QA=pA-2*(CA!==0||OA!==0?CA+OA:max(lA.top,lA.bottom))}await oA({...rA,availableWidth:dA,availableHeight:QA});const yA=await tA.getDimensions(nA.floating);return uA!==yA.width||pA!==yA.height?{reset:{rects:!0}}:{}}}};function getNodeName($){return isNode($)?($.nodeName||"").toLowerCase():"#document"}function getWindow$2($){var rA;return($==null||(rA=$.ownerDocument)==null?void 0:rA.defaultView)||window}function getDocumentElement($){var rA;return(rA=(isNode($)?$.ownerDocument:$.document)||window.document)==null?void 0:rA.documentElement}function isNode($){return $ instanceof Node||$ instanceof getWindow$2($).Node}function isElement$1($){return $ instanceof Element||$ instanceof getWindow$2($).Element}function isHTMLElement$1($){return $ instanceof HTMLElement||$ instanceof getWindow$2($).HTMLElement}function isShadowRoot$1($){return typeof ShadowRoot>"u"?!1:$ instanceof ShadowRoot||$ instanceof getWindow$2($).ShadowRoot}function isOverflowElement($){const{overflow:rA,overflowX:eA,overflowY:AA,display:tA}=getComputedStyle$1($);return/auto|scroll|overlay|hidden|clip/.test(rA+AA+eA)&&!["inline","contents"].includes(tA)}function isTableElement($){return["table","td","th"].includes(getNodeName($))}function isContainingBlock($){const rA=isWebKit(),eA=getComputedStyle$1($);return eA.transform!=="none"||eA.perspective!=="none"||(eA.containerType?eA.containerType!=="normal":!1)||!rA&&(eA.backdropFilter?eA.backdropFilter!=="none":!1)||!rA&&(eA.filter?eA.filter!=="none":!1)||["transform","perspective","filter"].some(AA=>(eA.willChange||"").includes(AA))||["paint","layout","strict","content"].some(AA=>(eA.contain||"").includes(AA))}function getContainingBlock($){let rA=getParentNode$1($);for(;isHTMLElement$1(rA)&&!isLastTraversableNode(rA);){if(isContainingBlock(rA))return rA;rA=getParentNode$1(rA)}return null}function isWebKit(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function isLastTraversableNode($){return["html","body","#document"].includes(getNodeName($))}function getComputedStyle$1($){return getWindow$2($).getComputedStyle($)}function getNodeScroll($){return isElement$1($)?{scrollLeft:$.scrollLeft,scrollTop:$.scrollTop}:{scrollLeft:$.pageXOffset,scrollTop:$.pageYOffset}}function getParentNode$1($){if(getNodeName($)==="html")return $;const rA=$.assignedSlot||$.parentNode||isShadowRoot$1($)&&$.host||getDocumentElement($);return isShadowRoot$1(rA)?rA.host:rA}function getNearestOverflowAncestor($){const rA=getParentNode$1($);return isLastTraversableNode(rA)?$.ownerDocument?$.ownerDocument.body:$.body:isHTMLElement$1(rA)&&isOverflowElement(rA)?rA:getNearestOverflowAncestor(rA)}function getOverflowAncestors($,rA,eA){var AA;rA===void 0&&(rA=[]),eA===void 0&&(eA=!0);const tA=getNearestOverflowAncestor($),nA=tA===((AA=$.ownerDocument)==null?void 0:AA.body),oA=getWindow$2(tA);return nA?rA.concat(oA,oA.visualViewport||[],isOverflowElement(tA)?tA:[],oA.frameElement&&eA?getOverflowAncestors(oA.frameElement):[]):rA.concat(tA,getOverflowAncestors(tA,[],eA))}function getCssDimensions($){const rA=getComputedStyle$1($);let eA=parseFloat(rA.width)||0,AA=parseFloat(rA.height)||0;const tA=isHTMLElement$1($),nA=tA?$.offsetWidth:eA,oA=tA?$.offsetHeight:AA,iA=round(eA)!==nA||round(AA)!==oA;return iA&&(eA=nA,AA=oA),{width:eA,height:AA,$:iA}}function unwrapElement($){return isElement$1($)?$:$.contextElement}function getScale($){const rA=unwrapElement($);if(!isHTMLElement$1(rA))return createCoords(1);const eA=rA.getBoundingClientRect(),{width:AA,height:tA,$:nA}=getCssDimensions(rA);let oA=(nA?round(eA.width):eA.width)/AA,iA=(nA?round(eA.height):eA.height)/tA;return(!oA||!Number.isFinite(oA))&&(oA=1),(!iA||!Number.isFinite(iA))&&(iA=1),{x:oA,y:iA}}const noOffsets=createCoords(0);function getVisualOffsets($){const rA=getWindow$2($);return!isWebKit()||!rA.visualViewport?noOffsets:{x:rA.visualViewport.offsetLeft,y:rA.visualViewport.offsetTop}}function shouldAddVisualOffsets($,rA,eA){return rA===void 0&&(rA=!1),!eA||rA&&eA!==getWindow$2($)?!1:rA}function getBoundingClientRect$1($,rA,eA,AA){rA===void 0&&(rA=!1),eA===void 0&&(eA=!1);const tA=$.getBoundingClientRect(),nA=unwrapElement($);let oA=createCoords(1);rA&&(AA?isElement$1(AA)&&(oA=getScale(AA)):oA=getScale($));const iA=shouldAddVisualOffsets(nA,eA,AA)?getVisualOffsets(nA):createCoords(0);let lA=(tA.left+iA.x)/oA.x,aA=(tA.top+iA.y)/oA.y,cA=tA.width/oA.x,sA=tA.height/oA.y;if(nA){const uA=getWindow$2(nA),pA=AA&&isElement$1(AA)?getWindow$2(AA):AA;let gA=uA.frameElement;for(;gA&&AA&&pA!==uA;){const fA=getScale(gA),wA=gA.getBoundingClientRect(),BA=getComputedStyle$1(gA),EA=wA.left+(gA.clientLeft+parseFloat(BA.paddingLeft))*fA.x,QA=wA.top+(gA.clientTop+parseFloat(BA.paddingTop))*fA.y;lA*=fA.x,aA*=fA.y,cA*=fA.x,sA*=fA.y,lA+=EA,aA+=QA,gA=getWindow$2(gA).frameElement}}return rectToClientRect({width:cA,height:sA,x:lA,y:aA})}function convertOffsetParentRelativeRectToViewportRelativeRect($){let{rect:rA,offsetParent:eA,strategy:AA}=$;const tA=isHTMLElement$1(eA),nA=getDocumentElement(eA);if(eA===nA)return rA;let oA={scrollLeft:0,scrollTop:0},iA=createCoords(1);const lA=createCoords(0);if((tA||!tA&&AA!=="fixed")&&((getNodeName(eA)!=="body"||isOverflowElement(nA))&&(oA=getNodeScroll(eA)),isHTMLElement$1(eA))){const aA=getBoundingClientRect$1(eA);iA=getScale(eA),lA.x=aA.x+eA.clientLeft,lA.y=aA.y+eA.clientTop}return{width:rA.width*iA.x,height:rA.height*iA.y,x:rA.x*iA.x-oA.scrollLeft*iA.x+lA.x,y:rA.y*iA.y-oA.scrollTop*iA.y+lA.y}}function getClientRects($){return Array.from($.getClientRects())}function getWindowScrollBarX($){return getBoundingClientRect$1(getDocumentElement($)).left+getNodeScroll($).scrollLeft}function getDocumentRect($){const rA=getDocumentElement($),eA=getNodeScroll($),AA=$.ownerDocument.body,tA=max(rA.scrollWidth,rA.clientWidth,AA.scrollWidth,AA.clientWidth),nA=max(rA.scrollHeight,rA.clientHeight,AA.scrollHeight,AA.clientHeight);let oA=-eA.scrollLeft+getWindowScrollBarX($);const iA=-eA.scrollTop;return getComputedStyle$1(AA).direction==="rtl"&&(oA+=max(rA.clientWidth,AA.clientWidth)-tA),{width:tA,height:nA,x:oA,y:iA}}function getViewportRect($,rA){const eA=getWindow$2($),AA=getDocumentElement($),tA=eA.visualViewport;let nA=AA.clientWidth,oA=AA.clientHeight,iA=0,lA=0;if(tA){nA=tA.width,oA=tA.height;const aA=isWebKit();(!aA||aA&&rA==="fixed")&&(iA=tA.offsetLeft,lA=tA.offsetTop)}return{width:nA,height:oA,x:iA,y:lA}}function getInnerBoundingClientRect($,rA){const eA=getBoundingClientRect$1($,!0,rA==="fixed"),AA=eA.top+$.clientTop,tA=eA.left+$.clientLeft,nA=isHTMLElement$1($)?getScale($):createCoords(1),oA=$.clientWidth*nA.x,iA=$.clientHeight*nA.y,lA=tA*nA.x,aA=AA*nA.y;return{width:oA,height:iA,x:lA,y:aA}}function getClientRectFromClippingAncestor($,rA,eA){let AA;if(rA==="viewport")AA=getViewportRect($,eA);else if(rA==="document")AA=getDocumentRect(getDocumentElement($));else if(isElement$1(rA))AA=getInnerBoundingClientRect(rA,eA);else{const tA=getVisualOffsets($);AA={...rA,x:rA.x-tA.x,y:rA.y-tA.y}}return rectToClientRect(AA)}function hasFixedPositionAncestor($,rA){const eA=getParentNode$1($);return eA===rA||!isElement$1(eA)||isLastTraversableNode(eA)?!1:getComputedStyle$1(eA).position==="fixed"||hasFixedPositionAncestor(eA,rA)}function getClippingElementAncestors($,rA){const eA=rA.get($);if(eA)return eA;let AA=getOverflowAncestors($,[],!1).filter(iA=>isElement$1(iA)&&getNodeName(iA)!=="body"),tA=null;const nA=getComputedStyle$1($).position==="fixed";let oA=nA?getParentNode$1($):$;for(;isElement$1(oA)&&!isLastTraversableNode(oA);){const iA=getComputedStyle$1(oA),lA=isContainingBlock(oA);!lA&&iA.position==="fixed"&&(tA=null),(nA?!lA&&!tA:!lA&&iA.position==="static"&&!!tA&&["absolute","fixed"].includes(tA.position)||isOverflowElement(oA)&&!lA&&hasFixedPositionAncestor($,oA))?AA=AA.filter(cA=>cA!==oA):tA=iA,oA=getParentNode$1(oA)}return rA.set($,AA),AA}function getClippingRect($){let{element:rA,boundary:eA,rootBoundary:AA,strategy:tA}=$;const oA=[...eA==="clippingAncestors"?getClippingElementAncestors(rA,this._c):[].concat(eA),AA],iA=oA[0],lA=oA.reduce((aA,cA)=>{const sA=getClientRectFromClippingAncestor(rA,cA,tA);return aA.top=max(sA.top,aA.top),aA.right=min$1(sA.right,aA.right),aA.bottom=min$1(sA.bottom,aA.bottom),aA.left=max(sA.left,aA.left),aA},getClientRectFromClippingAncestor(rA,iA,tA));return{width:lA.right-lA.left,height:lA.bottom-lA.top,x:lA.left,y:lA.top}}function getDimensions($){return getCssDimensions($)}function getRectRelativeToOffsetParent($,rA,eA){const AA=isHTMLElement$1(rA),tA=getDocumentElement(rA),nA=eA==="fixed",oA=getBoundingClientRect$1($,!0,nA,rA);let iA={scrollLeft:0,scrollTop:0};const lA=createCoords(0);if(AA||!AA&&!nA)if((getNodeName(rA)!=="body"||isOverflowElement(tA))&&(iA=getNodeScroll(rA)),AA){const aA=getBoundingClientRect$1(rA,!0,nA,rA);lA.x=aA.x+rA.clientLeft,lA.y=aA.y+rA.clientTop}else tA&&(lA.x=getWindowScrollBarX(tA));return{x:oA.left+iA.scrollLeft-lA.x,y:oA.top+iA.scrollTop-lA.y,width:oA.width,height:oA.height}}function getTrueOffsetParent($,rA){return!isHTMLElement$1($)||getComputedStyle$1($).position==="fixed"?null:rA?rA($):$.offsetParent}function getOffsetParent$1($,rA){const eA=getWindow$2($);if(!isHTMLElement$1($))return eA;let AA=getTrueOffsetParent($,rA);for(;AA&&isTableElement(AA)&&getComputedStyle$1(AA).position==="static";)AA=getTrueOffsetParent(AA,rA);return AA&&(getNodeName(AA)==="html"||getNodeName(AA)==="body"&&getComputedStyle$1(AA).position==="static"&&!isContainingBlock(AA))?eA:AA||getContainingBlock($)||eA}const getElementRects=async function($){let{reference:rA,floating:eA,strategy:AA}=$;const tA=this.getOffsetParent||getOffsetParent$1,nA=this.getDimensions;return{reference:getRectRelativeToOffsetParent(rA,await tA(eA),AA),floating:{x:0,y:0,...await nA(eA)}}};function isRTL($){return getComputedStyle$1($).direction==="rtl"}const platform={convertOffsetParentRelativeRectToViewportRelativeRect,getDocumentElement,getClippingRect,getOffsetParent:getOffsetParent$1,getElementRects,getClientRects,getDimensions,getScale,isElement:isElement$1,isRTL};function observeMove($,rA){let eA=null,AA;const tA=getDocumentElement($);function nA(){clearTimeout(AA),eA&&eA.disconnect(),eA=null}function oA(iA,lA){iA===void 0&&(iA=!1),lA===void 0&&(lA=1),nA();const{left:aA,top:cA,width:sA,height:uA}=$.getBoundingClientRect();if(iA||rA(),!sA||!uA)return;const pA=floor(cA),gA=floor(tA.clientWidth-(aA+sA)),fA=floor(tA.clientHeight-(cA+uA)),wA=floor(aA),EA={rootMargin:-pA+"px "+-gA+"px "+-fA+"px "+-wA+"px",threshold:max(0,min$1(1,lA))||1};let QA=!0;function dA(yA){const hA=yA[0].intersectionRatio;if(hA!==lA){if(!QA)return oA();hA?oA(!1,hA):AA=setTimeout(()=>{oA(!1,1e-7)},100)}QA=!1}try{eA=new IntersectionObserver(dA,{...EA,root:tA.ownerDocument})}catch{eA=new IntersectionObserver(dA,EA)}eA.observe($)}return oA(!0),nA}function autoUpdate($,rA,eA,AA){AA===void 0&&(AA={});const{ancestorScroll:tA=!0,ancestorResize:nA=!0,elementResize:oA=typeof ResizeObserver=="function",layoutShift:iA=typeof IntersectionObserver=="function",animationFrame:lA=!1}=AA,aA=unwrapElement($),cA=tA||nA?[...aA?getOverflowAncestors(aA):[],...getOverflowAncestors(rA)]:[];cA.forEach(BA=>{tA&&BA.addEventListener("scroll",eA,{passive:!0}),nA&&BA.addEventListener("resize",eA)});const sA=aA&&iA?observeMove(aA,eA):null;let uA=-1,pA=null;oA&&(pA=new ResizeObserver(BA=>{let[EA]=BA;EA&&EA.target===aA&&pA&&(pA.unobserve(rA),cancelAnimationFrame(uA),uA=requestAnimationFrame(()=>{pA&&pA.observe(rA)})),eA()}),aA&&!lA&&pA.observe(aA),pA.observe(rA));let gA,fA=lA?getBoundingClientRect$1($):null;lA&&wA();function wA(){const BA=getBoundingClientRect$1($);fA&&(BA.x!==fA.x||BA.y!==fA.y||BA.width!==fA.width||BA.height!==fA.height)&&eA(),fA=BA,gA=requestAnimationFrame(wA)}return eA(),()=>{cA.forEach(BA=>{tA&&BA.removeEventListener("scroll",eA),nA&&BA.removeEventListener("resize",eA)}),sA&&sA(),pA&&pA.disconnect(),pA=null,lA&&cancelAnimationFrame(gA)}}const computePosition=($,rA,eA)=>{const AA=new Map,tA={platform,...eA},nA={...tA.platform,_c:AA};return computePosition$1($,rA,{...tA,platform:nA})},arrow$1=$=>{const{element:rA,padding:eA}=$;function AA(tA){return Object.prototype.hasOwnProperty.call(tA,"current")}return{name:"arrow",options:$,fn(tA){return AA(rA)?rA.current!=null?arrow$2({element:rA.current,padding:eA}).fn(tA):{}:rA?arrow$2({element:rA,padding:eA}).fn(tA):{}}}};var index$3=typeof document<"u"?reactExports.useLayoutEffect:reactExports.useEffect;function deepEqual($,rA){if($===rA)return!0;if(typeof $!=typeof rA)return!1;if(typeof $=="function"&&$.toString()===rA.toString())return!0;let eA,AA,tA;if($&&rA&&typeof $=="object"){if(Array.isArray($)){if(eA=$.length,eA!=rA.length)return!1;for(AA=eA;AA--!==0;)if(!deepEqual($[AA],rA[AA]))return!1;return!0}if(tA=Object.keys($),eA=tA.length,eA!==Object.keys(rA).length)return!1;for(AA=eA;AA--!==0;)if(!Object.prototype.hasOwnProperty.call(rA,tA[AA]))return!1;for(AA=eA;AA--!==0;){const nA=tA[AA];if(!(nA==="_owner"&&$.$$typeof)&&!deepEqual($[nA],rA[nA]))return!1}return!0}return $!==$&&rA!==rA}function useLatestRef$1($){const rA=reactExports.useRef($);return index$3(()=>{rA.current=$}),rA}function useFloating$1($){$===void 0&&($={});const{placement:rA="bottom",strategy:eA="absolute",middleware:AA=[],platform:tA,whileElementsMounted:nA,open:oA}=$,[iA,lA]=reactExports.useState({x:null,y:null,strategy:eA,placement:rA,middlewareData:{},isPositioned:!1}),[aA,cA]=reactExports.useState(AA);deepEqual(aA,AA)||cA(AA);const sA=reactExports.useRef(null),uA=reactExports.useRef(null),pA=reactExports.useRef(iA),gA=useLatestRef$1(nA),fA=useLatestRef$1(tA),[wA,BA]=reactExports.useState(null),[EA,QA]=reactExports.useState(null),dA=reactExports.useCallback(IA=>{sA.current!==IA&&(sA.current=IA,BA(IA))},[]),yA=reactExports.useCallback(IA=>{uA.current!==IA&&(uA.current=IA,QA(IA))},[]),hA=reactExports.useCallback(()=>{if(!sA.current||!uA.current)return;const IA={placement:rA,strategy:eA,middleware:aA};fA.current&&(IA.platform=fA.current),computePosition(sA.current,uA.current,IA).then(xA=>{const PA={...xA,isPositioned:!0};vA.current&&!deepEqual(pA.current,PA)&&(pA.current=PA,reactDomExports.flushSync(()=>{lA(PA)}))})},[aA,rA,eA,fA]);index$3(()=>{oA===!1&&pA.current.isPositioned&&(pA.current.isPositioned=!1,lA(IA=>({...IA,isPositioned:!1})))},[oA]);const vA=reactExports.useRef(!1);index$3(()=>(vA.current=!0,()=>{vA.current=!1}),[]),index$3(()=>{if(wA&&EA){if(gA.current)return gA.current(wA,EA,hA);hA()}},[wA,EA,hA,gA]);const CA=reactExports.useMemo(()=>({reference:sA,floating:uA,setReference:dA,setFloating:yA}),[dA,yA]),OA=reactExports.useMemo(()=>({reference:wA,floating:EA}),[wA,EA]);return reactExports.useMemo(()=>({...iA,update:hA,refs:CA,elements:OA,reference:dA,floating:yA}),[iA,hA,CA,OA,dA,yA])}var getDefaultParent=function($){if(typeof document>"u")return null;var rA=Array.isArray($)?$[0]:$;return rA.ownerDocument.body},counterMap=new WeakMap,uncontrolledNodes=new WeakMap,markerMap={},lockCount=0,unwrapHost=function($){return $&&($.host||unwrapHost($.parentNode))},correctTargets=function($,rA){return rA.map(function(eA){if($.contains(eA))return eA;var AA=unwrapHost(eA);return AA&&$.contains(AA)?AA:(console.error("aria-hidden",eA,"in not contained inside",$,". Doing nothing"),null)}).filter(function(eA){return!!eA})},applyAttributeToOthers=function($,rA,eA,AA){var tA=correctTargets(rA,Array.isArray($)?$:[$]);markerMap[eA]||(markerMap[eA]=new WeakMap);var nA=markerMap[eA],oA=[],iA=new Set,lA=new Set(tA),aA=function(sA){!sA||iA.has(sA)||(iA.add(sA),aA(sA.parentNode))};tA.forEach(aA);var cA=function(sA){!sA||lA.has(sA)||Array.prototype.forEach.call(sA.children,function(uA){if(iA.has(uA))cA(uA);else{var pA=uA.getAttribute(AA),gA=pA!==null&&pA!=="false",fA=(counterMap.get(uA)||0)+1,wA=(nA.get(uA)||0)+1;counterMap.set(uA,fA),nA.set(uA,wA),oA.push(uA),fA===1&&gA&&uncontrolledNodes.set(uA,!0),wA===1&&uA.setAttribute(eA,"true"),gA||uA.setAttribute(AA,"true")}})};return cA(rA),iA.clear(),lockCount++,function(){oA.forEach(function(sA){var uA=counterMap.get(sA)-1,pA=nA.get(sA)-1;counterMap.set(sA,uA),nA.set(sA,pA),uA||(uncontrolledNodes.has(sA)||sA.removeAttribute(AA),uncontrolledNodes.delete(sA)),pA||sA.removeAttribute(eA)}),lockCount--,lockCount||(counterMap=new WeakMap,counterMap=new WeakMap,uncontrolledNodes=new WeakMap,markerMap={})}},hideOthers=function($,rA,eA){eA===void 0&&(eA="data-aria-hidden");var AA=Array.from(Array.isArray($)?$:[$]),tA=rA||getDefaultParent($);return tA?(AA.push.apply(AA,Array.from(tA.querySelectorAll("[aria-live]"))),applyAttributeToOthers(AA,tA,eA,"aria-hidden")):function(){return null}};/*! * tabbable 6.2.0 * @license MIT, https://github.com/focus-trap/tabbable/blob/master/LICENSE */var candidateSelectors=["input:not([inert])","select:not([inert])","textarea:not([inert])","a[href]:not([inert])","button:not([inert])","[tabindex]:not(slot):not([inert])","audio[controls]:not([inert])","video[controls]:not([inert])",'[contenteditable]:not([contenteditable="false"]):not([inert])',"details>summary:first-of-type:not([inert])","details:not([inert])"],candidateSelector=candidateSelectors.join(","),NoElement=typeof Element>"u",matches$1=NoElement?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,getRootNode=!NoElement&&Element.prototype.getRootNode?function($){var rA;return $==null||(rA=$.getRootNode)===null||rA===void 0?void 0:rA.call($)}:function($){return $==null?void 0:$.ownerDocument},isInert=function $(rA,eA){var AA;eA===void 0&&(eA=!0);var tA=rA==null||(AA=rA.getAttribute)===null||AA===void 0?void 0:AA.call(rA,"inert"),nA=tA===""||tA==="true",oA=nA||eA&&rA&&$(rA.parentNode);return oA},isContentEditable=function(rA){var eA,AA=rA==null||(eA=rA.getAttribute)===null||eA===void 0?void 0:eA.call(rA,"contenteditable");return AA===""||AA==="true"},getCandidates=function(rA,eA,AA){if(isInert(rA))return[];var tA=Array.prototype.slice.apply(rA.querySelectorAll(candidateSelector));return eA&&matches$1.call(rA,candidateSelector)&&tA.unshift(rA),tA=tA.filter(AA),tA},getCandidatesIteratively=function $(rA,eA,AA){for(var tA=[],nA=Array.from(rA);nA.length;){var oA=nA.shift();if(!isInert(oA,!1))if(oA.tagName==="SLOT"){var iA=oA.assignedElements(),lA=iA.length?iA:oA.children,aA=$(lA,!0,AA);AA.flatten?tA.push.apply(tA,aA):tA.push({scopeParent:oA,candidates:aA})}else{var cA=matches$1.call(oA,candidateSelector);cA&&AA.filter(oA)&&(eA||!rA.includes(oA))&&tA.push(oA);var sA=oA.shadowRoot||typeof AA.getShadowRoot=="function"&&AA.getShadowRoot(oA),uA=!isInert(sA,!1)&&(!AA.shadowRootFilter||AA.shadowRootFilter(oA));if(sA&&uA){var pA=$(sA===!0?oA.children:sA.children,!0,AA);AA.flatten?tA.push.apply(tA,pA):tA.push({scopeParent:oA,candidates:pA})}else nA.unshift.apply(nA,oA.children)}}return tA},hasTabIndex=function(rA){return!isNaN(parseInt(rA.getAttribute("tabindex"),10))},getTabIndex=function(rA){if(!rA)throw new Error("No node provided");return rA.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(rA.tagName)||isContentEditable(rA))&&!hasTabIndex(rA)?0:rA.tabIndex},getSortOrderTabIndex=function(rA,eA){var AA=getTabIndex(rA);return AA<0&&eA&&!hasTabIndex(rA)?0:AA},sortOrderedTabbables=function(rA,eA){return rA.tabIndex===eA.tabIndex?rA.documentOrder-eA.documentOrder:rA.tabIndex-eA.tabIndex},isInput=function(rA){return rA.tagName==="INPUT"},isHiddenInput=function(rA){return isInput(rA)&&rA.type==="hidden"},isDetailsWithSummary=function(rA){var eA=rA.tagName==="DETAILS"&&Array.prototype.slice.apply(rA.children).some(function(AA){return AA.tagName==="SUMMARY"});return eA},getCheckedRadio=function(rA,eA){for(var AA=0;AAsummary:first-of-type"),oA=nA?rA.parentElement:rA;if(matches$1.call(oA,"details:not([open]) *"))return!0;if(!AA||AA==="full"||AA==="legacy-full"){if(typeof tA=="function"){for(var iA=rA;rA;){var lA=rA.parentElement,aA=getRootNode(rA);if(lA&&!lA.shadowRoot&&tA(lA)===!0)return isZeroArea(rA);rA.assignedSlot?rA=rA.assignedSlot:!lA&&aA!==rA.ownerDocument?rA=aA.host:rA=lA}rA=iA}if(isNodeAttached(rA))return!rA.getClientRects().length;if(AA!=="legacy-full")return!0}else if(AA==="non-zero-area")return isZeroArea(rA);return!1},isDisabledFromFieldset=function(rA){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(rA.tagName))for(var eA=rA.parentElement;eA;){if(eA.tagName==="FIELDSET"&&eA.disabled){for(var AA=0;AA=0)},sortByOrder=function $(rA){var eA=[],AA=[];return rA.forEach(function(tA,nA){var oA=!!tA.scopeParent,iA=oA?tA.scopeParent:tA,lA=getSortOrderTabIndex(iA,oA),aA=oA?$(tA.candidates):iA;lA===0?oA?eA.push.apply(eA,aA):eA.push(iA):AA.push({documentOrder:nA,tabIndex:lA,item:tA,isScope:oA,content:aA})}),AA.sort(sortOrderedTabbables).reduce(function(tA,nA){return nA.isScope?tA.push.apply(tA,nA.content):tA.push(nA.content),tA},[]).concat(eA)},tabbable=function(rA,eA){eA=eA||{};var AA;return eA.getShadowRoot?AA=getCandidatesIteratively([rA],eA.includeContainer,{filter:isNodeMatchingSelectorTabbable.bind(null,eA),flatten:!1,getShadowRoot:eA.getShadowRoot,shadowRootFilter:isValidShadowRootTabbable}):AA=getCandidates(rA,eA.includeContainer,isNodeMatchingSelectorTabbable.bind(null,eA)),sortByOrder(AA)};function _extends$uA(){return _extends$uA=Object.assign||function($){for(var rA=1;rA"floating-ui-"+count++;function useFloatingId(){const[$,rA]=reactExports.useState(()=>serverHandoffComplete?genId():void 0);return index$2(()=>{$==null&&rA(genId())},[]),reactExports.useEffect(()=>{serverHandoffComplete||(serverHandoffComplete=!0)},[]),$}const useReactId=React$1["useId".toString()],useId=useReactId||useFloatingId,FloatingArrow=reactExports.forwardRef(function(rA,eA){var AA;let{context:{placement:tA,elements:{floating:nA},middlewareData:{arrow:oA}},width:iA=14,height:lA=7,tipRadius:aA=0,strokeWidth:cA=0,staticOffset:sA,stroke:uA,d:pA,...gA}=rA;cA*=2;const fA=cA/2,wA=iA/2*(aA/-8+1),BA=lA/2*aA/4,[EA,QA]=tA.split("-"),dA=nA?platform.isRTL(nA):!1,yA=!!pA,hA=EA==="top"||EA==="bottom",vA=sA&&QA==="end"?"bottom":"top";let CA=sA&&QA==="end"?"right":"left";sA&&dA&&(CA=QA==="end"?"left":"right");const OA=yA?0:fA,IA=(oA==null?void 0:oA.x)!=null?sA||oA.x:"",xA=(oA==null?void 0:oA.y)!=null?sA||oA.y+OA:"",PA=pA||"M0,0"+(" H"+iA)+(" L"+(iA-wA)+","+(lA-BA))+(" Q"+iA/2+","+lA+" "+wA+","+(lA-BA))+" Z",$A={top:yA?"rotate(180deg)":"",left:yA?"rotate(90deg)":"rotate(-90deg)",bottom:yA?"":"rotate(180deg)",right:yA?"rotate(-90deg)":"rotate(90deg)"}[EA],jA=useId();return reactExports.createElement("svg",_extends$uA({},gA,{suppressHydrationWarning:!0,"aria-hidden":!0,ref:eA,width:yA?iA:iA+cA,height:iA,viewBox:"0 0 "+iA+" "+(lA>iA?lA:iA),style:{...gA.style,position:"absolute",pointerEvents:"none",[CA]:IA,[vA]:xA,[EA]:hA||yA?"100%":"calc(100% - "+cA/2+"px)",transform:""+$A+((AA=gA.style)!=null&&AA.transform?" "+gA.style.transform:"")}}),cA>0&&reactExports.createElement("path",{clipPath:"url(#"+jA+")",fill:"none",stroke:uA,strokeWidth:cA+(pA?0:1),d:PA}),reactExports.createElement("path",{stroke:cA&&!pA?gA.fill:"none",d:PA}),reactExports.createElement("clipPath",{id:jA},reactExports.createElement("rect",{x:-fA,y:fA*(yA?-1:1),width:iA+cA,height:iA})))});function createPubSub(){const $=new Map;return{emit(rA,eA){var AA;(AA=$.get(rA))==null||AA.forEach(tA=>tA(eA))},on(rA,eA){$.set(rA,[...$.get(rA)||[],eA])},off(rA,eA){var AA;$.set(rA,((AA=$.get(rA))==null?void 0:AA.filter(tA=>tA!==eA))||[])}}}const FloatingNodeContext=reactExports.createContext(null),FloatingTreeContext=reactExports.createContext(null),useFloatingParentNodeId=()=>{var $;return(($=reactExports.useContext(FloatingNodeContext))==null?void 0:$.id)||null},useFloatingTree=()=>reactExports.useContext(FloatingTreeContext);function getDocument($){return($==null?void 0:$.ownerDocument)||document}function getPlatform(){const $=navigator.userAgentData;return $!=null&&$.platform?$.platform:navigator.platform}function getUserAgent(){const $=navigator.userAgentData;return $&&Array.isArray($.brands)?$.brands.map(rA=>{let{brand:eA,version:AA}=rA;return eA+"/"+AA}).join(" "):navigator.userAgent}function getWindow$1($){return getDocument($).defaultView||window}function isElement($){return $?$ instanceof getWindow$1($).Element:!1}function isHTMLElement($){return $?$ instanceof getWindow$1($).HTMLElement:!1}function isShadowRoot($){if(typeof ShadowRoot>"u")return!1;const rA=getWindow$1($).ShadowRoot;return $ instanceof rA||$ instanceof ShadowRoot}function isVirtualClick($){if($.mozInputSource===0&&$.isTrusted)return!0;const rA=/Android/i;return(rA.test(getPlatform())||rA.test(getUserAgent()))&&$.pointerType?$.type==="click"&&$.buttons===1:$.detail===0&&!$.pointerType}function isVirtualPointerEvent($){return $.width===0&&$.height===0||$.width===1&&$.height===1&&$.pressure===0&&$.detail===0&&$.pointerType!=="mouse"||$.width<1&&$.height<1&&$.pressure===0&&$.detail===0}function isSafari(){return/apple/i.test(navigator.vendor)}function isMac(){return getPlatform().toLowerCase().startsWith("mac")&&!navigator.maxTouchPoints}function isMouseLikePointerType($,rA){const eA=["mouse","pen"];return rA||eA.push("",void 0),eA.includes($)}function contains($,rA){if(!$||!rA)return!1;const eA=rA.getRootNode&&rA.getRootNode();if($.contains(rA))return!0;if(eA&&isShadowRoot(eA)){let AA=rA;for(;AA;){if($===AA)return!0;AA=AA.parentNode||AA.host}}return!1}function useLatestRef($){const rA=reactExports.useRef($);return index$2(()=>{rA.current=$}),rA}const safePolygonIdentifier="data-floating-ui-safe-polygon";function getDelay($,rA,eA){return eA&&!isMouseLikePointerType(eA)?0:typeof $=="number"?$:$==null?void 0:$[rA]}const useHover=function($,rA){rA===void 0&&(rA={});const{open:eA,onOpenChange:AA,dataRef:tA,events:nA,elements:{domReference:oA,floating:iA},refs:lA}=$,{enabled:aA=!0,delay:cA=0,handleClose:sA=null,mouseOnly:uA=!1,restMs:pA=0,move:gA=!0}=rA,fA=useFloatingTree(),wA=useFloatingParentNodeId(),BA=useLatestRef(sA),EA=useLatestRef(cA),QA=reactExports.useRef(),dA=reactExports.useRef(),yA=reactExports.useRef(),hA=reactExports.useRef(),vA=reactExports.useRef(!0),CA=reactExports.useRef(!1),OA=reactExports.useRef(()=>{}),IA=reactExports.useCallback(()=>{var jA;const MA=(jA=tA.current.openEvent)==null?void 0:jA.type;return(MA==null?void 0:MA.includes("mouse"))&&MA!=="mousedown"},[tA]);reactExports.useEffect(()=>{if(!aA)return;function jA(){clearTimeout(dA.current),clearTimeout(hA.current),vA.current=!0}return nA.on("dismiss",jA),()=>{nA.off("dismiss",jA)}},[aA,nA]),reactExports.useEffect(()=>{if(!aA||!BA.current||!eA)return;function jA(){IA()&&AA(!1)}const MA=getDocument(iA).documentElement;return MA.addEventListener("mouseleave",jA),()=>{MA.removeEventListener("mouseleave",jA)}},[iA,eA,AA,aA,BA,tA,IA]);const xA=reactExports.useCallback(function(jA){jA===void 0&&(jA=!0);const MA=getDelay(EA.current,"close",QA.current);MA&&!yA.current?(clearTimeout(dA.current),dA.current=setTimeout(()=>AA(!1),MA)):jA&&(clearTimeout(dA.current),AA(!1))},[EA,AA]),PA=reactExports.useCallback(()=>{OA.current(),yA.current=void 0},[]),$A=reactExports.useCallback(()=>{if(CA.current){const jA=getDocument(lA.floating.current).body;jA.style.pointerEvents="",jA.removeAttribute(safePolygonIdentifier),CA.current=!1}},[lA]);return reactExports.useEffect(()=>{if(!aA)return;function jA(){return tA.current.openEvent?["click","mousedown"].includes(tA.current.openEvent.type):!1}function MA(DA){if(clearTimeout(dA.current),vA.current=!1,uA&&!isMouseLikePointerType(QA.current)||pA>0&&getDelay(EA.current,"open")===0)return;tA.current.openEvent=DA;const RA=getDelay(EA.current,"open",QA.current);RA?dA.current=setTimeout(()=>{AA(!0)},RA):AA(!0)}function kA(DA){if(jA())return;OA.current();const RA=getDocument(iA);if(clearTimeout(hA.current),BA.current){eA||clearTimeout(dA.current),yA.current=BA.current({...$,tree:fA,x:DA.clientX,y:DA.clientY,onClose(){$A(),PA(),xA()}});const HA=yA.current;RA.addEventListener("mousemove",HA),OA.current=()=>{RA.removeEventListener("mousemove",HA)};return}(QA.current==="touch"?!contains(iA,DA.relatedTarget):!0)&&xA()}function zA(DA){jA()||BA.current==null||BA.current({...$,tree:fA,x:DA.clientX,y:DA.clientY,onClose(){$A(),PA(),xA()}})(DA)}if(isElement(oA)){const DA=oA;return eA&&DA.addEventListener("mouseleave",zA),iA==null||iA.addEventListener("mouseleave",zA),gA&&DA.addEventListener("mousemove",MA,{once:!0}),DA.addEventListener("mouseenter",MA),DA.addEventListener("mouseleave",kA),()=>{eA&&DA.removeEventListener("mouseleave",zA),iA==null||iA.removeEventListener("mouseleave",zA),gA&&DA.removeEventListener("mousemove",MA),DA.removeEventListener("mouseenter",MA),DA.removeEventListener("mouseleave",kA)}}},[oA,iA,aA,$,uA,pA,gA,xA,PA,$A,AA,eA,fA,EA,BA,tA]),index$2(()=>{var jA;if(aA&&eA&&(jA=BA.current)!=null&&jA.__options.blockPointerEvents&&IA()){const zA=getDocument(iA).body;if(zA.setAttribute(safePolygonIdentifier,""),zA.style.pointerEvents="none",CA.current=!0,isElement(oA)&&iA){var MA,kA;const DA=oA,RA=fA==null||(MA=fA.nodesRef.current.find(mA=>mA.id===wA))==null||(kA=MA.context)==null?void 0:kA.elements.floating;return RA&&(RA.style.pointerEvents=""),DA.style.pointerEvents="auto",iA.style.pointerEvents="auto",()=>{DA.style.pointerEvents="",iA.style.pointerEvents=""}}}},[aA,eA,wA,iA,oA,fA,BA,tA,IA]),index$2(()=>{eA||(QA.current=void 0,PA(),$A())},[eA,PA,$A]),reactExports.useEffect(()=>()=>{PA(),clearTimeout(dA.current),clearTimeout(hA.current),$A()},[aA,PA,$A]),reactExports.useMemo(()=>{if(!aA)return{};function jA(MA){QA.current=MA.pointerType}return{reference:{onPointerDown:jA,onPointerEnter:jA,onMouseMove(){eA||pA===0||(clearTimeout(hA.current),hA.current=setTimeout(()=>{vA.current||AA(!0)},pA))}},floating:{onMouseEnter(){clearTimeout(dA.current)},onMouseLeave(){nA.emit("dismiss",{type:"mouseLeave",data:{returnFocus:!1}}),xA(!1)}}}},[nA,aA,pA,eA,AA,xA])};function activeElement($){let rA=$.activeElement;for(;((eA=rA)==null||(AA=eA.shadowRoot)==null?void 0:AA.activeElement)!=null;){var eA,AA;rA=rA.shadowRoot.activeElement}return rA}let rafId=0;function enqueueFocus($,rA){rA===void 0&&(rA={});const{preventScroll:eA=!1,cancelPrevious:AA=!0,sync:tA=!1}=rA;AA&&cancelAnimationFrame(rafId);const nA=()=>$==null?void 0:$.focus({preventScroll:eA});tA?nA():rafId=requestAnimationFrame(nA)}function getAncestors($,rA){var eA;let AA=[],tA=(eA=$.find(nA=>nA.id===rA))==null?void 0:eA.parentId;for(;tA;){const nA=$.find(oA=>oA.id===tA);tA=nA==null?void 0:nA.parentId,nA&&(AA=AA.concat(nA))}return AA}function getChildren($,rA){let eA=$.filter(tA=>{var nA;return tA.parentId===rA&&((nA=tA.context)==null?void 0:nA.open)}),AA=eA;for(;AA.length;)AA=$.filter(tA=>{var nA;return(nA=AA)==null?void 0:nA.some(oA=>{var iA;return tA.parentId===oA.id&&((iA=tA.context)==null?void 0:iA.open)})}),eA=eA.concat(AA);return eA}function getTarget($){return"composedPath"in $?$.composedPath()[0]:$.target}const TYPEABLE_SELECTOR="input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])";function isTypeableElement($){return isHTMLElement($)&&$.matches(TYPEABLE_SELECTOR)}function stopEvent($){$.preventDefault(),$.stopPropagation()}const getTabbableOptions=()=>({getShadowRoot:!0,displayCheck:typeof ResizeObserver=="function"&&ResizeObserver.toString().includes("[native code]")?"full":"none"});function getTabbableIn($,rA){const eA=tabbable($,getTabbableOptions());rA==="prev"&&eA.reverse();const AA=eA.indexOf(activeElement(getDocument($)));return eA.slice(AA+1)[0]}function getNextTabbable(){return getTabbableIn(document.body,"next")}function getPreviousTabbable(){return getTabbableIn(document.body,"prev")}function isOutsideEvent($,rA){const eA=rA||$.currentTarget,AA=$.relatedTarget;return!AA||!contains(eA,AA)}function disableFocusInside($){tabbable($,getTabbableOptions()).forEach(eA=>{eA.dataset.tabindex=eA.getAttribute("tabindex")||"",eA.setAttribute("tabindex","-1")})}function enableFocusInside($){$.querySelectorAll("[data-tabindex]").forEach(eA=>{const AA=eA.dataset.tabindex;delete eA.dataset.tabindex,AA?eA.setAttribute("tabindex",AA):eA.removeAttribute("tabindex")})}const HIDDEN_STYLES={border:0,clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"fixed",whiteSpace:"nowrap",width:"1px",top:0,left:0};let timeoutId;function setActiveElementOnTab($){$.key==="Tab"&&($.target,clearTimeout(timeoutId))}const FocusGuard=reactExports.forwardRef(function(rA,eA){const[AA,tA]=reactExports.useState();return index$2(()=>(isSafari()&&tA("button"),document.addEventListener("keydown",setActiveElementOnTab),()=>{document.removeEventListener("keydown",setActiveElementOnTab)}),[]),reactExports.createElement("span",_extends$uA({},rA,{ref:eA,tabIndex:0,role:AA,"aria-hidden":AA?void 0:!0,"data-floating-ui-focus-guard":"",style:HIDDEN_STYLES}))}),PortalContext=reactExports.createContext(null),useFloatingPortalNode=function($){let{id:rA,root:eA}=$===void 0?{}:$;const[AA,tA]=reactExports.useState(null),nA=useId(),oA=usePortalContext();return index$2(()=>{const iA=rA?document.getElementById(rA):null,lA="data-floating-ui-portal";if(iA){const aA=document.createElement("div");return aA.id=nA,aA.setAttribute(lA,""),iA.appendChild(aA),tA(aA),()=>{aA.remove()}}else{let aA=(oA==null?void 0:oA.portalNode)||eA||document.body,cA=null;rA&&(cA=document.createElement("div"),cA.id=rA,aA.appendChild(cA));const sA=document.createElement("div");return sA.id=nA,sA.setAttribute(lA,""),tA(sA),aA=cA||aA,aA.appendChild(sA),()=>{var uA;sA.remove(),(uA=cA)==null||uA.remove()}}},[rA,eA,oA,nA]),AA},FloatingPortal=$=>{let{children:rA,id:eA,root:AA=null,preserveTabOrder:tA=!0}=$;const nA=useFloatingPortalNode({id:eA,root:AA}),[oA,iA]=reactExports.useState(null),lA=reactExports.useRef(null),aA=reactExports.useRef(null),cA=reactExports.useRef(null),sA=reactExports.useRef(null),uA=!!oA&&!oA.modal&&!!(AA||nA)&&tA;return reactExports.useEffect(()=>{if(!nA||!tA||oA!=null&&oA.modal)return;function pA(gA){nA&&isOutsideEvent(gA)&&(gA.type==="focusin"?enableFocusInside:disableFocusInside)(nA)}return nA.addEventListener("focusin",pA,!0),nA.addEventListener("focusout",pA,!0),()=>{nA.removeEventListener("focusin",pA,!0),nA.removeEventListener("focusout",pA,!0)}},[nA,tA,oA==null?void 0:oA.modal]),reactExports.createElement(PortalContext.Provider,{value:reactExports.useMemo(()=>({preserveTabOrder:tA,beforeOutsideRef:lA,afterOutsideRef:aA,beforeInsideRef:cA,afterInsideRef:sA,portalNode:nA,setFocusManagerState:iA}),[tA,nA])},uA&&nA&&reactExports.createElement(FocusGuard,{"data-type":"outside",ref:lA,onFocus:pA=>{if(isOutsideEvent(pA,nA)){var gA;(gA=cA.current)==null||gA.focus()}else{const fA=getPreviousTabbable()||(oA==null?void 0:oA.refs.domReference.current);fA==null||fA.focus()}}}),uA&&nA&&reactExports.createElement("span",{"aria-owns":nA.id,style:HIDDEN_STYLES}),nA&&reactDomExports.createPortal(rA,nA),uA&&nA&&reactExports.createElement(FocusGuard,{"data-type":"outside",ref:aA,onFocus:pA=>{if(isOutsideEvent(pA,nA)){var gA;(gA=sA.current)==null||gA.focus()}else{const fA=getNextTabbable()||(oA==null?void 0:oA.refs.domReference.current);fA==null||fA.focus(),oA!=null&&oA.closeOnFocusOut&&(oA==null||oA.onOpenChange(!1))}}}))},usePortalContext=()=>reactExports.useContext(PortalContext),VisuallyHiddenDismiss=reactExports.forwardRef(function(rA,eA){return reactExports.createElement("button",_extends$uA({},rA,{type:"button",ref:eA,tabIndex:-1,style:HIDDEN_STYLES}))});function FloatingFocusManager($){let{context:rA,children:eA,order:AA=["content"],guards:tA=!0,initialFocus:nA=0,returnFocus:oA=!0,modal:iA=!0,visuallyHiddenDismiss:lA=!1,closeOnFocusOut:aA=!0}=$;const{open:cA,refs:sA,nodeId:uA,onOpenChange:pA,events:gA,dataRef:fA,elements:{domReference:wA,floating:BA}}=rA,EA=useLatestRef(AA),QA=useLatestRef(nA),dA=useLatestRef(oA),yA=useFloatingTree(),hA=usePortalContext(),[vA,CA]=reactExports.useState(null),OA=typeof nA=="number"&&nA<0,IA=reactExports.useRef(null),xA=reactExports.useRef(null),PA=reactExports.useRef(!1),$A=reactExports.useRef(null),jA=reactExports.useRef(!1),MA=hA!=null,kA=wA&&wA.getAttribute("role")==="combobox"&&isTypeableElement(wA),zA=reactExports.useCallback(function(HA){return HA===void 0&&(HA=BA),HA?tabbable(HA,getTabbableOptions()):[]},[BA]),DA=reactExports.useCallback(HA=>{const SA=zA(HA);return EA.current.map(bA=>wA&&bA==="reference"?wA:BA&&bA==="floating"?BA:SA).filter(Boolean).flat()},[wA,BA,EA,zA]);reactExports.useEffect(()=>{if(!iA)return;function HA(bA){if(bA.key==="Tab"){zA().length===0&&!kA&&stopEvent(bA);const FA=DA(),ZA=getTarget(bA);EA.current[0]==="reference"&&ZA===wA&&(stopEvent(bA),bA.shiftKey?enqueueFocus(FA[FA.length-1]):enqueueFocus(FA[1])),EA.current[1]==="floating"&&ZA===BA&&bA.shiftKey&&(stopEvent(bA),enqueueFocus(FA[0]))}}const SA=getDocument(BA);return SA.addEventListener("keydown",HA),()=>{SA.removeEventListener("keydown",HA)}},[wA,BA,iA,EA,sA,kA,zA,DA]),reactExports.useEffect(()=>{if(!aA)return;function HA(){jA.current=!0,setTimeout(()=>{jA.current=!1})}function SA(bA){const FA=bA.relatedTarget;queueMicrotask(()=>{const ZA=!(contains(wA,FA)||contains(BA,FA)||contains(FA,BA)||contains(hA==null?void 0:hA.portalNode,FA)||FA!=null&&FA.hasAttribute("data-floating-ui-focus-guard")||yA&&(getChildren(yA.nodesRef.current,uA).find(JA=>{var LA,GA;return contains((LA=JA.context)==null?void 0:LA.elements.floating,FA)||contains((GA=JA.context)==null?void 0:GA.elements.domReference,FA)})||getAncestors(yA.nodesRef.current,uA).find(JA=>{var LA,GA;return((LA=JA.context)==null?void 0:LA.elements.floating)===FA||((GA=JA.context)==null?void 0:GA.elements.domReference)===FA})));FA&&ZA&&!jA.current&&FA!==$A.current&&(PA.current=!0,pA(!1))})}if(BA&&isHTMLElement(wA))return wA.addEventListener("focusout",SA),wA.addEventListener("pointerdown",HA),!iA&&BA.addEventListener("focusout",SA),()=>{wA.removeEventListener("focusout",SA),wA.removeEventListener("pointerdown",HA),!iA&&BA.removeEventListener("focusout",SA)}},[wA,BA,iA,uA,yA,hA,pA,aA]),reactExports.useEffect(()=>{var HA;const SA=Array.from((hA==null||(HA=hA.portalNode)==null?void 0:HA.querySelectorAll("[data-floating-ui-portal]"))||[]);function bA(){return[IA.current,xA.current].filter(Boolean)}if(BA&&iA){const FA=[BA,...SA,...bA()],ZA=hideOthers(EA.current.includes("reference")||kA?FA.concat(wA||[]):FA);return()=>{ZA()}}},[wA,BA,iA,EA,hA,kA]),reactExports.useEffect(()=>{if(iA&&!tA&&BA){const HA=[],SA=getTabbableOptions(),bA=tabbable(getDocument(BA).body,SA),FA=DA(),ZA=bA.filter(JA=>!FA.includes(JA));return ZA.forEach((JA,LA)=>{HA[LA]=JA.getAttribute("tabindex"),JA.setAttribute("tabindex","-1")}),()=>{ZA.forEach((JA,LA)=>{const GA=HA[LA];GA==null?JA.removeAttribute("tabindex"):JA.setAttribute("tabindex",GA)})}}},[BA,iA,tA,DA]),index$2(()=>{if(!BA)return;let HA=!1;const SA=getDocument(BA),bA=activeElement(SA),FA=fA.current;$A.current=bA,queueMicrotask(()=>{const JA=DA(BA),LA=QA.current,GA=(typeof LA=="number"?JA[LA]:LA.current)||BA,UA=contains(BA,bA);!OA&&!UA&&cA&&enqueueFocus(GA,{preventScroll:GA===BA})});function ZA(JA){if(JA.type==="escapeKey"&&sA.domReference.current&&($A.current=sA.domReference.current),["referencePress","escapeKey"].includes(JA.type))return;const LA=JA.data.returnFocus;typeof LA=="object"?(PA.current=!1,HA=LA.preventScroll):PA.current=!LA}return gA.on("dismiss",ZA),()=>{gA.off("dismiss",ZA);const JA=activeElement(SA);(contains(BA,JA)||yA&&getChildren(yA.nodesRef.current,uA).some(GA=>{var UA;return contains((UA=GA.context)==null?void 0:UA.elements.floating,JA)})||FA.openEvent&&["click","mousedown"].includes(FA.openEvent.type))&&sA.domReference.current&&($A.current=sA.domReference.current),dA.current&&isHTMLElement($A.current)&&!PA.current&&enqueueFocus($A.current,{cancelPrevious:!1,preventScroll:HA})}},[cA,BA,DA,dA,QA,fA,sA,gA,OA,yA,uA]),index$2(()=>{if(hA)return hA.setFocusManagerState({...rA,modal:iA,closeOnFocusOut:aA}),()=>{hA.setFocusManagerState(null)}},[hA,iA,aA,rA]),index$2(()=>{if(OA||!BA)return;function HA(){activeElement(getDocument(BA))!==sA.domReference.current&&CA(zA().length)}if(HA(),typeof MutationObserver=="function"){const SA=new MutationObserver(HA);return SA.observe(BA,{childList:!0,subtree:!0}),()=>{SA.disconnect()}}},[BA,zA,OA,sA]);const RA=tA&&(MA||iA)&&!kA;function mA(HA){return lA&&iA?reactExports.createElement(VisuallyHiddenDismiss,{ref:HA==="start"?IA:xA,onClick:()=>pA(!1)},typeof lA=="string"?lA:"Dismiss"):null}return reactExports.createElement(reactExports.Fragment,null,RA&&reactExports.createElement(FocusGuard,{"data-type":"inside",ref:hA==null?void 0:hA.beforeInsideRef,onFocus:HA=>{if(iA){const bA=DA();enqueueFocus(AA[0]==="reference"?bA[0]:bA[bA.length-1])}else if(hA!=null&&hA.preserveTabOrder&&hA.portalNode)if(PA.current=!1,isOutsideEvent(HA,hA.portalNode)){const bA=getNextTabbable()||wA;bA==null||bA.focus()}else{var SA;(SA=hA.beforeOutsideRef.current)==null||SA.focus()}}}),kA?null:mA("start"),reactExports.cloneElement(eA,vA===0||AA.includes("floating")?{tabIndex:0}:{}),mA("end"),RA&&reactExports.createElement(FocusGuard,{"data-type":"inside",ref:hA==null?void 0:hA.afterInsideRef,onFocus:HA=>{if(iA)enqueueFocus(DA()[0]);else if(hA!=null&&hA.preserveTabOrder&&hA.portalNode)if(aA&&(PA.current=!0),isOutsideEvent(HA,hA.portalNode)){const bA=getPreviousTabbable()||wA;bA==null||bA.focus()}else{var SA;(SA=hA.afterOutsideRef.current)==null||SA.focus()}}}))}const useInsertionEffect=React$1["useInsertionEffect".toString()],useSafeInsertionEffect=useInsertionEffect||($=>$());function useEvent($){const rA=reactExports.useRef(()=>{});return useSafeInsertionEffect(()=>{rA.current=$}),reactExports.useCallback(function(){for(var eA=arguments.length,AA=new Array(eA),tA=0;tA{var rA,eA;return{escapeKeyBubbles:typeof $=="boolean"?$:(rA=$==null?void 0:$.escapeKey)!=null?rA:!1,outsidePressBubbles:typeof $=="boolean"?$:(eA=$==null?void 0:$.outsidePress)!=null?eA:!0}},useDismiss=function($,rA){rA===void 0&&(rA={});const{open:eA,onOpenChange:AA,events:tA,nodeId:nA,elements:{reference:oA,domReference:iA,floating:lA},dataRef:aA}=$,{enabled:cA=!0,escapeKey:sA=!0,outsidePress:uA=!0,outsidePressEvent:pA="pointerdown",referencePress:gA=!1,referencePressEvent:fA="pointerdown",ancestorScroll:wA=!1,bubbles:BA}=rA,EA=useFloatingTree(),QA=useFloatingParentNodeId()!=null,dA=useEvent(typeof uA=="function"?uA:()=>!1),yA=typeof uA=="function"?dA:uA,hA=reactExports.useRef(!1),{escapeKeyBubbles:vA,outsidePressBubbles:CA}=normalizeBubblesProp(BA),OA=useEvent(xA=>{if(!eA||!cA||!sA||xA.key!=="Escape")return;const PA=EA?getChildren(EA.nodesRef.current,nA):[];if(!vA&&(xA.stopPropagation(),PA.length>0)){let $A=!0;if(PA.forEach(jA=>{var MA;if((MA=jA.context)!=null&&MA.open&&!jA.context.dataRef.current.__escapeKeyBubbles){$A=!1;return}}),!$A)return}tA.emit("dismiss",{type:"escapeKey",data:{returnFocus:{preventScroll:!1}}}),AA(!1)}),IA=useEvent(xA=>{const PA=hA.current;if(hA.current=!1,PA||typeof yA=="function"&&!yA(xA))return;const $A=getTarget(xA);if(isHTMLElement($A)&&lA){const kA=$A.clientWidth>0&&$A.scrollWidth>$A.clientWidth,zA=$A.clientHeight>0&&$A.scrollHeight>$A.clientHeight;let DA=zA&&xA.offsetX>$A.clientWidth;if(zA&&getWindow$1(lA).getComputedStyle($A).direction==="rtl"&&(DA=xA.offsetX<=$A.offsetWidth-$A.clientWidth),DA||kA&&xA.offsetY>$A.clientHeight)return}const jA=EA&&getChildren(EA.nodesRef.current,nA).some(kA=>{var zA;return isEventTargetWithin(xA,(zA=kA.context)==null?void 0:zA.elements.floating)});if(isEventTargetWithin(xA,lA)||isEventTargetWithin(xA,iA)||jA)return;const MA=EA?getChildren(EA.nodesRef.current,nA):[];if(MA.length>0){let kA=!0;if(MA.forEach(zA=>{var DA;if((DA=zA.context)!=null&&DA.open&&!zA.context.dataRef.current.__outsidePressBubbles){kA=!1;return}}),!kA)return}tA.emit("dismiss",{type:"outsidePress",data:{returnFocus:QA?{preventScroll:!0}:isVirtualClick(xA)||isVirtualPointerEvent(xA)}}),AA(!1)});return reactExports.useEffect(()=>{if(!eA||!cA)return;aA.current.__escapeKeyBubbles=vA,aA.current.__outsidePressBubbles=CA;function xA(){AA(!1)}const PA=getDocument(lA);sA&&PA.addEventListener("keydown",OA),yA&&PA.addEventListener(pA,IA);let $A=[];return wA&&(isElement(iA)&&($A=getOverflowAncestors(iA)),isElement(lA)&&($A=$A.concat(getOverflowAncestors(lA))),!isElement(oA)&&oA&&oA.contextElement&&($A=$A.concat(getOverflowAncestors(oA.contextElement)))),$A=$A.filter(jA=>{var MA;return jA!==((MA=PA.defaultView)==null?void 0:MA.visualViewport)}),$A.forEach(jA=>{jA.addEventListener("scroll",xA,{passive:!0})}),()=>{sA&&PA.removeEventListener("keydown",OA),yA&&PA.removeEventListener(pA,IA),$A.forEach(jA=>{jA.removeEventListener("scroll",xA)})}},[aA,lA,iA,oA,sA,yA,pA,eA,AA,wA,cA,vA,CA,OA,IA]),reactExports.useEffect(()=>{hA.current=!1},[yA,pA]),reactExports.useMemo(()=>cA?{reference:{onKeyDown:OA,[bubbleHandlerKeys[fA]]:()=>{gA&&(tA.emit("dismiss",{type:"referencePress",data:{returnFocus:!1}}),AA(!1))}},floating:{onKeyDown:OA,[captureHandlerKeys[pA]]:()=>{hA.current=!0}}}:{},[cA,tA,gA,pA,fA,AA,OA])},useFocus=function($,rA){rA===void 0&&(rA={});const{open:eA,onOpenChange:AA,dataRef:tA,events:nA,refs:oA,elements:{floating:iA,domReference:lA}}=$,{enabled:aA=!0,keyboardOnly:cA=!0}=rA,sA=reactExports.useRef(""),uA=reactExports.useRef(!1),pA=reactExports.useRef();return reactExports.useEffect(()=>{if(!aA)return;const fA=getDocument(iA).defaultView||window;function wA(){!eA&&isHTMLElement(lA)&&lA===activeElement(getDocument(lA))&&(uA.current=!0)}return fA.addEventListener("blur",wA),()=>{fA.removeEventListener("blur",wA)}},[iA,lA,eA,aA]),reactExports.useEffect(()=>{if(!aA)return;function gA(fA){(fA.type==="referencePress"||fA.type==="escapeKey")&&(uA.current=!0)}return nA.on("dismiss",gA),()=>{nA.off("dismiss",gA)}},[nA,aA]),reactExports.useEffect(()=>()=>{clearTimeout(pA.current)},[]),reactExports.useMemo(()=>aA?{reference:{onPointerDown(gA){let{pointerType:fA}=gA;sA.current=fA,uA.current=!!(fA&&cA)},onMouseLeave(){uA.current=!1},onFocus(gA){var fA;uA.current||gA.type==="focus"&&((fA=tA.current.openEvent)==null?void 0:fA.type)==="mousedown"&&tA.current.openEvent&&isEventTargetWithin(tA.current.openEvent,lA)||(tA.current.openEvent=gA.nativeEvent,AA(!0))},onBlur(gA){uA.current=!1;const fA=gA.relatedTarget,wA=isElement(fA)&&fA.hasAttribute("data-floating-ui-focus-guard")&&fA.getAttribute("data-type")==="outside";pA.current=setTimeout(()=>{contains(oA.floating.current,fA)||contains(lA,fA)||wA||AA(!1)})}}}:{},[aA,cA,lA,oA,tA,AA])};let isPreventScrollSupported=!1;const ARROW_UP="ArrowUp",ARROW_DOWN="ArrowDown",ARROW_LEFT="ArrowLeft",ARROW_RIGHT="ArrowRight";function isDifferentRow($,rA,eA){return Math.floor($/rA)!==eA}function isIndexOutOfBounds($,rA){return rA<0||rA>=$.current.length}function findNonDisabledIndex($,rA){let{startingIndex:eA=-1,decrement:AA=!1,disabledIndices:tA,amount:nA=1}=rA===void 0?{}:rA;const oA=$.current;let iA=eA;do{var lA,aA;iA=iA+(AA?-nA:nA)}while(iA>=0&&iA<=oA.length-1&&(tA?tA.includes(iA):oA[iA]==null||(lA=oA[iA])!=null&&lA.hasAttribute("disabled")||((aA=oA[iA])==null?void 0:aA.getAttribute("aria-disabled"))==="true"));return iA}function doSwitch($,rA,eA){switch($){case"vertical":return rA;case"horizontal":return eA;default:return rA||eA}}function isMainOrientationKey($,rA){return doSwitch(rA,$===ARROW_UP||$===ARROW_DOWN,$===ARROW_LEFT||$===ARROW_RIGHT)}function isMainOrientationToEndKey($,rA,eA){return doSwitch(rA,$===ARROW_DOWN,eA?$===ARROW_LEFT:$===ARROW_RIGHT)||$==="Enter"||$==" "||$===""}function isCrossOrientationOpenKey($,rA,eA){return doSwitch(rA,eA?$===ARROW_LEFT:$===ARROW_RIGHT,$===ARROW_DOWN)}function isCrossOrientationCloseKey($,rA,eA){return doSwitch(rA,eA?$===ARROW_RIGHT:$===ARROW_LEFT,$===ARROW_UP)}function getMinIndex($,rA){return findNonDisabledIndex($,{disabledIndices:rA})}function getMaxIndex($,rA){return findNonDisabledIndex($,{decrement:!0,startingIndex:$.current.length,disabledIndices:rA})}const useListNavigation=($,rA)=>{const{open:eA,onOpenChange:AA,refs:tA,elements:{domReference:nA,floating:oA}}=$,{listRef:iA,activeIndex:lA,onNavigate:aA=()=>{},enabled:cA=!0,selectedIndex:sA=null,allowEscape:uA=!1,loop:pA=!1,nested:gA=!1,rtl:fA=!1,virtual:wA=!1,focusItemOnOpen:BA="auto",focusItemOnHover:EA=!0,openOnArrowKeyDown:QA=!0,disabledIndices:dA=void 0,orientation:yA="vertical",cols:hA=1,scrollItemIntoView:vA=!0}=rA,CA=useFloatingParentNodeId(),OA=useFloatingTree(),IA=useEvent(aA),xA=reactExports.useRef(BA),PA=reactExports.useRef(sA??-1),$A=reactExports.useRef(null),jA=reactExports.useRef(!0),MA=reactExports.useRef(IA),kA=reactExports.useRef(!!oA),zA=reactExports.useRef(!1),DA=reactExports.useRef(!1),RA=useLatestRef(dA),mA=useLatestRef(eA),HA=useLatestRef(vA),[SA,bA]=reactExports.useState(),FA=useEvent(function(LA,GA,UA){UA===void 0&&(UA=!1);const YA=LA.current[GA.current];YA&&(wA?bA(YA==null?void 0:YA.id):enqueueFocus(YA,{preventScroll:!0,sync:isMac()&&isSafari()?isPreventScrollSupported||zA.current:!1}),requestAnimationFrame(()=>{const tt=HA.current;tt&&YA&&(UA||!jA.current)&&(YA.scrollIntoView==null||YA.scrollIntoView(typeof tt=="boolean"?{block:"nearest",inline:"nearest"}:tt))}))});index$2(()=>{document.createElement("div").focus({get preventScroll(){return isPreventScrollSupported=!0,!1}})},[]),index$2(()=>{cA&&(eA&&oA?xA.current&&sA!=null&&(DA.current=!0,IA(sA)):kA.current&&(PA.current=-1,MA.current(null)))},[cA,eA,oA,sA,IA]),index$2(()=>{if(cA&&eA&&oA)if(lA==null){if(zA.current=!1,sA!=null)return;if(kA.current&&(PA.current=-1,FA(iA,PA)),!kA.current&&xA.current&&($A.current!=null||xA.current===!0&&$A.current==null)){let LA=0;const GA=()=>{iA.current[0]==null?(LA<2&&(LA?requestAnimationFrame:queueMicrotask)(GA),LA++):(PA.current=$A.current==null||isMainOrientationToEndKey($A.current,yA,fA)||gA?getMinIndex(iA,RA.current):getMaxIndex(iA,RA.current),$A.current=null,IA(PA.current))};GA()}}else isIndexOutOfBounds(iA,lA)||(PA.current=lA,FA(iA,PA,DA.current),DA.current=!1)},[cA,eA,oA,lA,sA,gA,iA,yA,fA,IA,FA,RA]),index$2(()=>{if(cA&&kA.current&&!oA&&OA){var LA,GA;const UA=OA.nodesRef.current,YA=(LA=UA.find(_e=>_e.id===CA))==null||(GA=LA.context)==null?void 0:GA.elements.floating,tt=activeElement(getDocument(oA)),WA=UA.some(_e=>_e.context&&contains(_e.context.elements.floating,tt));YA&&!WA&&YA.focus({preventScroll:!0})}},[cA,oA,OA,CA]),index$2(()=>{MA.current=IA,kA.current=!!oA}),index$2(()=>{eA||($A.current=null)},[eA]);const ZA=lA!=null,JA=reactExports.useMemo(()=>{function LA(UA){if(!eA)return;const YA=iA.current.indexOf(UA);YA!==-1&&IA(YA)}return{onFocus(UA){let{currentTarget:YA}=UA;LA(YA)},onClick:UA=>{let{currentTarget:YA}=UA;return YA.focus({preventScroll:!0})},...EA&&{onMouseMove(UA){let{currentTarget:YA}=UA;LA(YA)},onPointerLeave(UA){let{pointerType:YA}=UA;!jA.current||YA==="touch"||(PA.current=-1,FA(iA,PA),IA(null),wA||enqueueFocus(tA.floating.current,{preventScroll:!0}))}}}},[eA,tA,FA,EA,iA,IA,wA]);return reactExports.useMemo(()=>{if(!cA)return{};const LA=RA.current;function GA(WA){if(jA.current=!1,zA.current=!0,!mA.current&&WA.currentTarget===tA.floating.current)return;if(gA&&isCrossOrientationCloseKey(WA.key,yA,fA)){stopEvent(WA),AA(!1),isHTMLElement(nA)&&nA.focus();return}const _e=PA.current,nt=getMinIndex(iA,LA),et=getMaxIndex(iA,LA);if(WA.key==="Home"&&(stopEvent(WA),PA.current=nt,IA(PA.current)),WA.key==="End"&&(stopEvent(WA),PA.current=et,IA(PA.current)),hA>1){const VA=PA.current;if(WA.key===ARROW_UP){if(stopEvent(WA),VA===-1)PA.current=et;else if(PA.current=findNonDisabledIndex(iA,{startingIndex:VA,amount:hA,decrement:!0,disabledIndices:LA}),pA&&(VA-hArt?ut:ut-hA}isIndexOutOfBounds(iA,PA.current)&&(PA.current=VA),IA(PA.current)}if(WA.key===ARROW_DOWN&&(stopEvent(WA),VA===-1?PA.current=nt:(PA.current=findNonDisabledIndex(iA,{startingIndex:VA,amount:hA,disabledIndices:LA}),pA&&VA+hA>et&&(PA.current=findNonDisabledIndex(iA,{startingIndex:VA%hA-hA,amount:hA,disabledIndices:LA}))),isIndexOutOfBounds(iA,PA.current)&&(PA.current=VA),IA(PA.current)),yA==="both"){const rt=Math.floor(VA/hA);WA.key===ARROW_RIGHT&&(stopEvent(WA),VA%hA!==hA-1?(PA.current=findNonDisabledIndex(iA,{startingIndex:VA,disabledIndices:LA}),pA&&isDifferentRow(PA.current,hA,rt)&&(PA.current=findNonDisabledIndex(iA,{startingIndex:VA-VA%hA-1,disabledIndices:LA}))):pA&&(PA.current=findNonDisabledIndex(iA,{startingIndex:VA-VA%hA-1,disabledIndices:LA})),isDifferentRow(PA.current,hA,rt)&&(PA.current=VA)),WA.key===ARROW_LEFT&&(stopEvent(WA),VA%hA!==0?(PA.current=findNonDisabledIndex(iA,{startingIndex:VA,disabledIndices:LA,decrement:!0}),pA&&isDifferentRow(PA.current,hA,rt)&&(PA.current=findNonDisabledIndex(iA,{startingIndex:VA+(hA-VA%hA),decrement:!0,disabledIndices:LA}))):pA&&(PA.current=findNonDisabledIndex(iA,{startingIndex:VA+(hA-VA%hA),decrement:!0,disabledIndices:LA})),isDifferentRow(PA.current,hA,rt)&&(PA.current=VA));const at=Math.floor(et/hA)===rt;isIndexOutOfBounds(iA,PA.current)&&(pA&&at?PA.current=WA.key===ARROW_LEFT?et:findNonDisabledIndex(iA,{startingIndex:VA-VA%hA-1,disabledIndices:LA}):PA.current=VA),IA(PA.current);return}}if(isMainOrientationKey(WA.key,yA)){if(stopEvent(WA),eA&&!wA&&activeElement(WA.currentTarget.ownerDocument)===WA.currentTarget){PA.current=isMainOrientationToEndKey(WA.key,yA,fA)?nt:et,IA(PA.current);return}isMainOrientationToEndKey(WA.key,yA,fA)?pA?PA.current=_e>=et?uA&&_e!==iA.current.length?-1:nt:findNonDisabledIndex(iA,{startingIndex:_e,disabledIndices:LA}):PA.current=Math.min(et,findNonDisabledIndex(iA,{startingIndex:_e,disabledIndices:LA})):pA?PA.current=_e<=nt?uA&&_e!==-1?iA.current.length:et:findNonDisabledIndex(iA,{startingIndex:_e,decrement:!0,disabledIndices:LA}):PA.current=Math.max(nt,findNonDisabledIndex(iA,{startingIndex:_e,decrement:!0,disabledIndices:LA})),isIndexOutOfBounds(iA,PA.current)?IA(null):IA(PA.current)}}function UA(WA){BA==="auto"&&isVirtualClick(WA.nativeEvent)&&(xA.current=!0)}function YA(WA){xA.current=BA,BA==="auto"&&isVirtualPointerEvent(WA.nativeEvent)&&(xA.current=!0)}const tt=wA&&eA&&ZA&&{"aria-activedescendant":SA};return{reference:{...tt,onKeyDown(WA){jA.current=!1;const _e=WA.key.indexOf("Arrow")===0;if(wA&&eA)return GA(WA);if(!eA&&!QA&&_e)return;const nt=_e||WA.key==="Enter"||WA.key.trim()==="",et=isMainOrientationKey(WA.key,yA),VA=isCrossOrientationOpenKey(WA.key,yA,fA);if(nt&&($A.current=gA&&et?null:WA.key),gA){VA&&(stopEvent(WA),eA?(PA.current=getMinIndex(iA,LA),IA(PA.current)):AA(!0));return}et&&(sA!=null&&(PA.current=sA),stopEvent(WA),!eA&&QA?AA(!0):GA(WA),eA&&IA(PA.current))},onFocus(){eA&&IA(null)},onPointerDown:YA,onMouseDown:UA,onClick:UA},floating:{"aria-orientation":yA==="both"?void 0:yA,...tt,onKeyDown:GA,onPointerMove(){jA.current=!0}},item:JA}},[nA,tA,SA,RA,mA,iA,cA,yA,fA,wA,eA,ZA,gA,sA,QA,uA,hA,pA,BA,IA,AA,JA])};function useMergeRefs($){return reactExports.useMemo(()=>$.every(rA=>rA==null)?null:rA=>{$.forEach(eA=>{typeof eA=="function"?eA(rA):eA!=null&&(eA.current=rA)})},$)}const useRole=function($,rA){rA===void 0&&(rA={});const{open:eA,floatingId:AA}=$,{enabled:tA=!0,role:nA="dialog"}=rA,oA=useId();return reactExports.useMemo(()=>{const iA={id:AA,role:nA};return tA?nA==="tooltip"?{reference:{"aria-describedby":eA?AA:void 0},floating:iA}:{reference:{"aria-expanded":eA?"true":"false","aria-haspopup":nA==="alertdialog"?"dialog":nA,"aria-controls":eA?AA:void 0,...nA==="listbox"&&{role:"combobox"},...nA==="menu"&&{id:oA}},floating:{...iA,...nA==="menu"&&{"aria-labelledby":oA}}}:{}},[tA,nA,eA,AA,oA])};function useFloating($){$===void 0&&($={});const{open:rA=!1,onOpenChange:eA,nodeId:AA}=$,tA=useFloating$1($),nA=useFloatingTree(),oA=reactExports.useRef(null),iA=reactExports.useRef({}),lA=reactExports.useState(()=>createPubSub())[0],aA=useId(),[cA,sA]=reactExports.useState(null),uA=reactExports.useCallback(EA=>{const QA=isElement(EA)?{getBoundingClientRect:()=>EA.getBoundingClientRect(),contextElement:EA}:EA;tA.refs.setReference(QA)},[tA.refs]),pA=reactExports.useCallback(EA=>{(isElement(EA)||EA===null)&&(oA.current=EA,sA(EA)),(isElement(tA.refs.reference.current)||tA.refs.reference.current===null||EA!==null&&!isElement(EA))&&tA.refs.setReference(EA)},[tA.refs]),gA=reactExports.useMemo(()=>({...tA.refs,setReference:pA,setPositionReference:uA,domReference:oA}),[tA.refs,pA,uA]),fA=reactExports.useMemo(()=>({...tA.elements,domReference:cA}),[tA.elements,cA]),wA=useEvent(eA),BA=reactExports.useMemo(()=>({...tA,refs:gA,elements:fA,dataRef:iA,nodeId:AA,floatingId:aA,events:lA,open:rA,onOpenChange:wA}),[tA,AA,aA,lA,rA,wA,gA,fA]);return index$2(()=>{const EA=nA==null?void 0:nA.nodesRef.current.find(QA=>QA.id===AA);EA&&(EA.context=BA)}),reactExports.useMemo(()=>({...tA,context:BA,refs:gA,elements:fA,reference:pA,positionReference:uA}),[tA,gA,fA,BA,pA,uA])}function mergeProps($,rA,eA){const AA=new Map;return{...eA==="floating"&&{tabIndex:-1},...$,...rA.map(tA=>tA?tA[eA]:null).concat($).reduce((tA,nA)=>(nA&&Object.entries(nA).forEach(oA=>{let[iA,lA]=oA;if(iA.indexOf("on")===0){if(AA.has(iA)||AA.set(iA,[]),typeof lA=="function"){var aA;(aA=AA.get(iA))==null||aA.push(lA),tA[iA]=function(){for(var cA,sA=arguments.length,uA=new Array(sA),pA=0;pAgA(...uA)).find(gA=>gA!==void 0)}}}else tA[iA]=lA}),tA),{})}}const useInteractions=function($){$===void 0&&($=[]);const rA=$,eA=reactExports.useCallback(nA=>mergeProps(nA,$,"reference"),rA),AA=reactExports.useCallback(nA=>mergeProps(nA,$,"floating"),rA),tA=reactExports.useCallback(nA=>mergeProps(nA,$,"item"),$.map(nA=>nA==null?void 0:nA.item));return reactExports.useMemo(()=>({getReferenceProps:eA,getFloatingProps:AA,getItemProps:tA}),[eA,AA,tA])},protocols=["http","https","mailto","tel"];function uriTransformer($){const rA=($||"").trim(),eA=rA.charAt(0);if(eA==="#"||eA==="/")return rA;const AA=rA.indexOf(":");if(AA===-1)return rA;let tA=-1;for(;++tAtA||(tA=rA.indexOf("#"),tA!==-1&&AA>tA)?rA:"javascript:void(0)"}/*! diff --git a/inst/editor/build/index.html b/inst/editor/build/index.html index 67374856a..a7eb80432 100644 --- a/inst/editor/build/index.html +++ b/inst/editor/build/index.html @@ -26,7 +26,7 @@ Learn how to configure a non-root public URL by running `npm run build`. --> Shiny UI Editor - + diff --git a/inst/vscode-extension/media/build/extension-editor.js b/inst/vscode-extension/media/build/extension-editor.js index 63e8f9542..784400787 100644 --- a/inst/vscode-extension/media/build/extension-editor.js +++ b/inst/vscode-extension/media/build/extension-editor.js @@ -7809,7 +7809,7 @@ function getOverflowAncestors($, rA, eA) { var AA; rA === void 0 && (rA = []), eA === void 0 && (eA = !0); const tA = getNearestOverflowAncestor($), nA = tA === ((AA = $.ownerDocument) == null ? void 0 : AA.body), oA = getWindow$2(tA); - return nA ? rA.concat(oA, oA.visualViewport || [], isOverflowElement(tA) ? tA : [], oA.frameElement && eA ? getOverflowAncestors(oA.frameElement) : []) : rA.concat(tA, getOverflowAncestors(tA)); + return nA ? rA.concat(oA, oA.visualViewport || [], isOverflowElement(tA) ? tA : [], oA.frameElement && eA ? getOverflowAncestors(oA.frameElement) : []) : rA.concat(tA, getOverflowAncestors(tA, [], eA)); } function getCssDimensions($) { const rA = getComputedStyle$1($); diff --git a/inst/vscode-extension/shinyuieditor-0.5.0.vsix b/inst/vscode-extension/shinyuieditor-0.5.0.vsix index 69ecceb64..df42d9308 100644 Binary files a/inst/vscode-extension/shinyuieditor-0.5.0.vsix and b/inst/vscode-extension/shinyuieditor-0.5.0.vsix differ