UNPKG

@patternfly/react-core

Version:

This library provides a set of common React components for use with the PatternFly reference implementation.

11 lines • 546 kB
!function(e,n){"object"==typeof exports&&"undefined"!=typeof module?n(exports,require("react"),require("react-dom")):"function"==typeof define&&define.amd?define(["exports","react","react-dom"],n):n((e="undefined"!=typeof globalThis?globalThis:e||self).PatternFlyReact={},e.React,e.ReactDOM)}(this,(function(e,n,t){"use strict";function a(e){var n=Object.create(null);return e&&Object.keys(e).forEach((function(t){if("default"!==t){var a=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(n,t,a.get?a:{enumerable:!0,get:function(){return e[t]}})}})),n.default=e,Object.freeze(n)}var i=a(t);function l(e,n){var t={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&n.indexOf(a)<0&&(t[a]=e[a]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(a=Object.getOwnPropertySymbols(e);i<a.length;i++)n.indexOf(a[i])<0&&Object.prototype.propertyIsEnumerable.call(e,a[i])&&(t[a[i]]=e[a[i]])}return t}function s(e,n,t,a){return new(t||(t=Promise))((function(i,l){function s(e){try{r(a.next(e))}catch(e){l(e)}}function o(e){try{r(a.throw(e))}catch(e){l(e)}}function r(e){var n;e.done?i(e.value):(n=e.value,n instanceof t?n:new t((function(e){e(n)}))).then(s,o)}r((a=a.apply(e,n||[])).next())}))}function o(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}"function"==typeof SuppressedError&&SuppressedError;var r={exports:{}},c={},d=n,p=Symbol.for("react.element"),m=Symbol.for("react.fragment"),f=Object.prototype.hasOwnProperty,u=d.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,g={key:!0,ref:!0,__self:!0,__source:!0};function h(e,n,t){var a,i={},l=null,s=null;for(a in void 0!==t&&(l=""+t),void 0!==n.key&&(l=""+n.key),void 0!==n.ref&&(s=n.ref),n)f.call(n,a)&&!g.hasOwnProperty(a)&&(i[a]=n[a]);if(e&&e.defaultProps)for(a in n=e.defaultProps)void 0===i[a]&&(i[a]=n[a]);return{$$typeof:p,type:e,key:l,ref:s,props:i,_owner:u.current}}c.Fragment=m,c.jsx=h,c.jsxs=h,r.exports=c;var x=r.exports;function v(...e){const n=[],t={}.hasOwnProperty;return e.filter(Boolean).forEach((e=>{const a=typeof e;if("string"===a||"number"===a)n.push(e);else if(Array.isArray(e)&&e.length){const t=v(...e);t&&n.push(t)}else if("object"===a)for(const a in e)t.call(e,a)&&e[a]&&n.push(a)})),n.join(" ")}const b="--pf-v6-c-about-modal-box--BackgroundImage";var y="pf-v6-c-about-modal-box",O="pf-v6-c-about-modal-box__brand",w="pf-v6-c-about-modal-box__brand-image",j="pf-v6-c-about-modal-box__close",N="pf-v6-c-about-modal-box__content",C="pf-v6-c-about-modal-box__header",S="pf-v6-c-about-modal-box__strapline",_="pf-v6-c-content",k="pf-v6-c-content--a",L="pf-v6-c-content--blockquote",I="pf-v6-c-content--dd",T="pf-v6-c-content--dl",E="pf-v6-c-content--dt",R="pf-v6-c-content--h1",D="pf-v6-c-content--h2",M="pf-v6-c-content--h3",P="pf-v6-c-content--h4",B="pf-v6-c-content--h5",A="pf-v6-c-content--h6",F="pf-v6-c-content--hr",z="pf-v6-c-content--li",G="pf-v6-c-content--ol",V="pf-v6-c-content--p",X="pf-v6-c-content--pre",H="pf-v6-c-content--small",$="pf-v6-c-content--ul",W={editorial:"pf-m-editorial",visited:"pf-m-visited",plain:"pf-m-plain"};const q=e=>{var{children:n,trademark:t,hasNoContentContainer:a=!1}=e,i=l(e,["children","trademark","hasNoContentContainer"]);return x.jsxs("div",Object.assign({className:v(N)},i,{children:[x.jsx("div",{className:v(`${y}__body`),children:a?n:x.jsx("div",{className:v(_),children:n})}),x.jsx("p",{className:v(S),children:t})]}))};q.displayName="AboutModalBoxContent";var U={modifiers:{"4xl":"pf-m-4xl","3xl":"pf-m-3xl","2xl":"pf-m-2xl",xl:"pf-m-xl",lg:"pf-m-lg",md:"pf-m-md",h1:"pf-m-h1",h2:"pf-m-h2",h3:"pf-m-h3",h4:"pf-m-h4",h5:"pf-m-h5",h6:"pf-m-h6",pageTitle:"pf-m-page-title"},title:"pf-v6-c-title"};const K="48rem",Y="62rem",Z="75rem",J="90.625rem";let Q=0;function ee({name:e,xOffset:t=0,yOffset:a=0,width:i,height:s,svgPath:o}){var r;return r=class extends n.Component{constructor(){super(...arguments),this.id="icon-title-"+Q++}render(){const e=this.props,{title:n,className:r}=e,c=l(e,["title","className"]),d=r?`pf-v6-svg ${r}`:"pf-v6-svg",p=Boolean(n),m=[t,a,i,s].join(" ");return x.jsxs("svg",Object.assign({className:d,viewBox:m,fill:"currentColor","aria-labelledby":p?this.id:null,"aria-hidden":!p||null,role:"img",width:"1em",height:"1em"},c,{children:[p&&x.jsx("title",{id:this.id,children:n}),x.jsx("path",{d:o})]}))}},r.displayName=e,r}const ne=ee({name:"CheckCircleIcon",height:512,width:512,svgPath:"M504 256c0 136.967-111.033 248-248 248S8 392.967 8 256 119.033 8 256 8s248 111.033 248 248zM227.314 387.314l184-184c6.248-6.248 6.248-16.379 0-22.627l-22.627-22.627c-6.248-6.249-16.379-6.249-22.628 0L216 308.118l-70.059-70.059c-6.248-6.248-16.379-6.248-22.628 0l-22.627 22.627c-6.248 6.248-6.248 16.379 0 22.627l104 104c6.249 6.249 16.379 6.249 22.628.001z",yOffset:0,xOffset:0}),te=ee({name:"ExclamationCircleIcon",height:512,width:512,svgPath:"M504 256c0 136.997-111.043 248-248 248S8 392.997 8 256C8 119.083 119.043 8 256 8s248 111.083 248 248zm-248 50c-25.405 0-46 20.595-46 46s20.595 46 46 46 46-20.595 46-46-20.595-46-46-46zm-43.673-165.346l7.418 136c.347 6.364 5.609 11.346 11.982 11.346h48.546c6.373 0 11.635-4.982 11.982-11.346l7.418-136c.375-6.874-5.098-12.654-11.982-12.654h-63.383c-6.884 0-12.356 5.78-11.981 12.654z",yOffset:0,xOffset:0}),ae=ee({name:"ExclamationTriangleIcon",height:512,width:576,svgPath:"M569.517 440.013C587.975 472.007 564.806 512 527.94 512H48.054c-36.937 0-59.999-40.055-41.577-71.987L246.423 23.985c18.467-32.009 64.72-31.951 83.154 0l239.94 416.028zM288 354c-25.405 0-46 20.595-46 46s20.595 46 46 46 46-20.595 46-46-20.595-46-46-46zm-43.673-165.346l7.418 136c.347 6.364 5.609 11.346 11.982 11.346h48.546c6.373 0 11.635-4.982 11.982-11.346l7.418-136c.375-6.874-5.098-12.654-11.982-12.654h-63.383c-6.884 0-12.356 5.78-11.981 12.654z",yOffset:0,xOffset:0}),ie=ee({name:"InfoCircleIcon",height:512,width:512,svgPath:"M256 8C119.043 8 8 119.083 8 256c0 136.997 111.043 248 248 248s248-111.003 248-248C504 119.083 392.957 8 256 8zm0 110c23.196 0 42 18.804 42 42s-18.804 42-42 42-42-18.804-42-42 18.804-42 42-42zm56 254c0 6.627-5.373 12-12 12h-88c-6.627 0-12-5.373-12-12v-24c0-6.627 5.373-12 12-12h12v-64h-12c-6.627 0-12-5.373-12-12v-24c0-6.627 5.373-12 12-12h64c6.627 0 12 5.373 12 12v100h12c6.627 0 12 5.373 12 12v24z",yOffset:0,xOffset:0}),le=ee({name:"BellIcon",height:1024,width:896,svgPath:"M448,0 C465.333333,0 480.333333,6.33333333 493,19 C505.666667,31.6666667 512,46.6666667 512,64 L512,106 L514.23,106.45 C587.89,121.39 648.48,157.24 696,214 C744,271.333333 768,338.666667 768,416 C768,500 780,568.666667 804,622 C818.666667,652.666667 841.333333,684 872,716 C873.773676,718.829136 875.780658,721.505113 878,724 C890,737.333333 896,752.333333 896,769 C896,785.666667 890,800.333333 878,813 C866,825.666667 850.666667,832 832,832 L63.3,832 C44.9533333,831.84 29.8533333,825.506667 18,813 C6,800.333333 0,785.666667 0,769 C0,752.333333 6,737.333333 18,724 L24,716 L25.06,714.9 C55.1933333,683.28 77.5066667,652.313333 92,622 C116,568.666667 128,500 128,416 C128,338.666667 152,271.333333 200,214 C248,156.666667 309.333333,120.666667 384,106 L384,63.31 C384.166667,46.27 390.5,31.5 403,19 C415.666667,6.33333333 430.666667,0 448,0 Z M576,896 L576,897.08 C575.74,932.6 563.073333,962.573333 538,987 C512.666667,1011.66667 482.666667,1024 448,1024 C413.333333,1024 383.333333,1011.66667 358,987 C332.666667,962.333333 320,932 320,896 L576,896 Z",yOffset:0,xOffset:0}),se={RIGHT:"right",LEFT:"left",BOTH:"both",NONE:"none"};var oe;e.ValidatedOptions=void 0,(oe=e.ValidatedOptions||(e.ValidatedOptions={})).success="success",oe.error="error",oe.warning="warning",oe.default="default";const re={Tab:"Tab",Space:" ",Escape:"Escape",Enter:"Enter",ArrowUp:"ArrowUp",ArrowDown:"ArrowDown",ArrowLeft:"ArrowLeft",ArrowRight:"ArrowRight"},ce={sm:16*parseInt("36rem"),md:16*parseInt(K),lg:16*parseInt(Y),xl:16*parseInt(Z),"2xl":16*parseInt(J)},de={sm:16*parseInt("0rem"),md:16*parseInt("40rem"),lg:16*parseInt("48rem"),xl:16*parseInt("60rem"),"2xl":16*parseInt("80rem")},pe={success:ne,danger:te,warning:ae,info:ie,custom:le}; /*! * tabbable 6.2.0 * @license MIT, https://github.com/focus-trap/tabbable/blob/master/LICENSE */ var me=["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])"],fe=me.join(","),ue="undefined"==typeof Element,ge=ue?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,he=!ue&&Element.prototype.getRootNode?function(e){var n;return null==e||null===(n=e.getRootNode)||void 0===n?void 0:n.call(e)}:function(e){return null==e?void 0:e.ownerDocument},xe=function e(n,t){var a;void 0===t&&(t=!0);var i=null==n||null===(a=n.getAttribute)||void 0===a?void 0:a.call(n,"inert");return""===i||"true"===i||t&&n&&e(n.parentNode)},ve=function(e,n,t){if(xe(e))return[];var a=Array.prototype.slice.apply(e.querySelectorAll(fe));return n&&ge.call(e,fe)&&a.unshift(e),a=a.filter(t)},be=function e(n,t,a){for(var i=[],l=Array.from(n);l.length;){var s=l.shift();if(!xe(s,!1))if("SLOT"===s.tagName){var o=s.assignedElements(),r=e(o.length?o:s.children,!0,a);a.flatten?i.push.apply(i,r):i.push({scopeParent:s,candidates:r})}else{ge.call(s,fe)&&a.filter(s)&&(t||!n.includes(s))&&i.push(s);var c=s.shadowRoot||"function"==typeof a.getShadowRoot&&a.getShadowRoot(s),d=!xe(c,!1)&&(!a.shadowRootFilter||a.shadowRootFilter(s));if(c&&d){var p=e(!0===c?s.children:c.children,!0,a);a.flatten?i.push.apply(i,p):i.push({scopeParent:s,candidates:p})}else l.unshift.apply(l,s.children)}}return i},ye=function(e){return!isNaN(parseInt(e.getAttribute("tabindex"),10))},Oe=function(e){if(!e)throw new Error("No node provided");return e.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(e.tagName)||function(e){var n,t=null==e||null===(n=e.getAttribute)||void 0===n?void 0:n.call(e,"contenteditable");return""===t||"true"===t}(e))&&!ye(e)?0:e.tabIndex},we=function(e,n){return e.tabIndex===n.tabIndex?e.documentOrder-n.documentOrder:e.tabIndex-n.tabIndex},je=function(e){return"INPUT"===e.tagName},Ne=function(e){return function(e){return je(e)&&"radio"===e.type}(e)&&!function(e){if(!e.name)return!0;var n,t=e.form||he(e),a=function(e){return t.querySelectorAll('input[type="radio"][name="'+e+'"]')};if("undefined"!=typeof window&&void 0!==window.CSS&&"function"==typeof window.CSS.escape)n=a(window.CSS.escape(e.name));else try{n=a(e.name)}catch(e){return console.error("Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s",e.message),!1}var i=function(e,n){for(var t=0;t<e.length;t++)if(e[t].checked&&e[t].form===n)return e[t]}(n,e.form);return!i||i===e}(e)},Ce=function(e){var n=e.getBoundingClientRect(),t=n.width,a=n.height;return 0===t&&0===a},Se=function(e,n){var t=n.displayCheck,a=n.getShadowRoot;if("hidden"===getComputedStyle(e).visibility)return!0;var i=ge.call(e,"details>summary:first-of-type")?e.parentElement:e;if(ge.call(i,"details:not([open]) *"))return!0;if(t&&"full"!==t&&"legacy-full"!==t){if("non-zero-area"===t)return Ce(e)}else{if("function"==typeof a){for(var l=e;e;){var s=e.parentElement,o=he(e);if(s&&!s.shadowRoot&&!0===a(s))return Ce(e);e=e.assignedSlot?e.assignedSlot:s||o===e.ownerDocument?s:o.host}e=l}if(function(e){var n,t,a,i,l=e&&he(e),s=null===(n=l)||void 0===n?void 0:n.host,o=!1;if(l&&l!==e)for(o=!!(null!==(t=s)&&void 0!==t&&null!==(a=t.ownerDocument)&&void 0!==a&&a.contains(s)||null!=e&&null!==(i=e.ownerDocument)&&void 0!==i&&i.contains(e));!o&&s;){var r,c,d;o=!(null===(c=s=null===(r=l=he(s))||void 0===r?void 0:r.host)||void 0===c||null===(d=c.ownerDocument)||void 0===d||!d.contains(s))}return o}(e))return!e.getClientRects().length;if("legacy-full"!==t)return!0}return!1},_e=function(e,n){return!(n.disabled||xe(n)||function(e){return je(e)&&"hidden"===e.type}(n)||Se(n,e)||function(e){return"DETAILS"===e.tagName&&Array.prototype.slice.apply(e.children).some((function(e){return"SUMMARY"===e.tagName}))}(n)||function(e){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(e.tagName))for(var n=e.parentElement;n;){if("FIELDSET"===n.tagName&&n.disabled){for(var t=0;t<n.children.length;t++){var a=n.children.item(t);if("LEGEND"===a.tagName)return!!ge.call(n,"fieldset[disabled] *")||!a.contains(e)}return!0}n=n.parentElement}return!1}(n))},ke=function(e,n){return!(Ne(n)||Oe(n)<0||!_e(e,n))},Le=function(e){var n=parseInt(e.getAttribute("tabindex"),10);return!!(isNaN(n)||n>=0)},Ie=function e(n){var t=[],a=[];return n.forEach((function(n,i){var l=!!n.scopeParent,s=l?n.scopeParent:n,o=function(e,n){var t=Oe(e);return t<0&&n&&!ye(e)?0:t}(s,l),r=l?e(n.candidates):s;0===o?l?t.push.apply(t,r):t.push(s):a.push({documentOrder:i,tabIndex:o,item:n,isScope:l,content:r})})),a.sort(we).reduce((function(e,n){return n.isScope?e.push.apply(e,n.content):e.push(n.content),e}),[]).concat(t)},Te=function(e,n){if(n=n||{},!e)throw new Error("No node provided");return!1!==ge.call(e,fe)&&ke(n,e)},Ee=me.concat("iframe").join(","),Re=function(e,n){if(n=n||{},!e)throw new Error("No node provided");return!1!==ge.call(e,Ee)&&_e(n,e)}; /*! * focus-trap 7.6.4 * @license MIT, https://github.com/focus-trap/focus-trap/blob/master/LICENSE */ function De(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,a=Array(n);t<n;t++)a[t]=e[t];return a}function Me(e,n,t){return(n=function(e){var n=function(e,n){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var a=t.call(e,n);if("object"!=typeof a)return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===n?String:Number)(e)}(e,"string");return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function Pe(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,a)}return t}function Be(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?Pe(Object(t),!0).forEach((function(n){Me(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):Pe(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}function Ae(e){return function(e){if(Array.isArray(e))return De(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,n){if(e){if("string"==typeof e)return De(e,n);var t={}.toString.call(e).slice(8,-1);return"Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t?Array.from(e):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?De(e,n):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var Fe=function(e,n){if(e.length>0){var t=e[e.length-1];t!==n&&t._setPausedState(!0)}var a=e.indexOf(n);-1===a||e.splice(a,1),e.push(n)},ze=function(e,n){var t=e.indexOf(n);-1!==t&&e.splice(t,1),e.length>0&&!e[e.length-1]._isManuallyPaused()&&e[e.length-1]._setPausedState(!1)},Ge=function(e){return"Tab"===(null==e?void 0:e.key)||9===(null==e?void 0:e.keyCode)},Ve=function(e){return Ge(e)&&!e.shiftKey},Xe=function(e){return Ge(e)&&e.shiftKey},He=function(e){return setTimeout(e,0)},$e=function(e){for(var n=arguments.length,t=new Array(n>1?n-1:0),a=1;a<n;a++)t[a-1]=arguments[a];return"function"==typeof e?e.apply(void 0,t):e},We=function(e){return e.target.shadowRoot&&"function"==typeof e.composedPath?e.composedPath()[0]:e.target},qe=[],Ue=function(e,n){var t,a=(null==n?void 0:n.document)||document,i=(null==n?void 0:n.trapStack)||qe,l=Be({returnFocusOnDeactivate:!0,escapeDeactivates:!0,delayInitialFocus:!0,isKeyForward:Ve,isKeyBackward:Xe},n),s={containers:[],containerGroups:[],tabbableGroups:[],nodeFocusedBeforeActivation:null,mostRecentlyFocusedNode:null,active:!1,paused:!1,manuallyPaused:!1,delayInitialFocusTimer:void 0,recentNavEvent:void 0},o=function(e,n,t){return e&&void 0!==e[n]?e[n]:l[t||n]},r=function(e,n){var t="function"==typeof(null==n?void 0:n.composedPath)?n.composedPath():void 0;return s.containerGroups.findIndex((function(n){var a=n.container,i=n.tabbableNodes;return a.contains(e)||(null==t?void 0:t.includes(a))||i.find((function(n){return n===e}))}))},c=function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},t=n.hasFallback,i=void 0!==t&&t,s=n.params,o=void 0===s?[]:s,r=l[e];if("function"==typeof r&&(r=r.apply(void 0,Ae(o))),!0===r&&(r=void 0),!r){if(void 0===r||!1===r)return r;throw new Error("`".concat(e,"` was specified but was not a node, or did not return a node"))}var c=r;if("string"==typeof r){try{c=a.querySelector(r)}catch(n){throw new Error("`".concat(e,'` appears to be an invalid selector; error="').concat(n.message,'"'))}if(!c&&!i)throw new Error("`".concat(e,"` as selector refers to no known node"))}return c},d=function(){var e=c("initialFocus",{hasFallback:!0});if(!1===e)return!1;if(void 0===e||e&&!Re(e,l.tabbableOptions))if(r(a.activeElement)>=0)e=a.activeElement;else{var n=s.tabbableGroups[0];e=n&&n.firstTabbableNode||c("fallbackFocus")}else null===e&&(e=c("fallbackFocus"));if(!e)throw new Error("Your focus-trap needs to have at least one focusable element");return e},p=function(){if(s.containerGroups=s.containers.map((function(e){var n=function(e,n){var t;return t=(n=n||{}).getShadowRoot?be([e],n.includeContainer,{filter:ke.bind(null,n),flatten:!1,getShadowRoot:n.getShadowRoot,shadowRootFilter:Le}):ve(e,n.includeContainer,ke.bind(null,n)),Ie(t)}(e,l.tabbableOptions),t=function(e,n){return(n=n||{}).getShadowRoot?be([e],n.includeContainer,{filter:_e.bind(null,n),flatten:!0,getShadowRoot:n.getShadowRoot}):ve(e,n.includeContainer,_e.bind(null,n))}(e,l.tabbableOptions),a=n.length>0?n[0]:void 0,i=n.length>0?n[n.length-1]:void 0,s=t.find((function(e){return Te(e)})),o=t.slice().reverse().find((function(e){return Te(e)})),r=!!n.find((function(e){return Oe(e)>0}));return{container:e,tabbableNodes:n,focusableNodes:t,posTabIndexesFound:r,firstTabbableNode:a,lastTabbableNode:i,firstDomTabbableNode:s,lastDomTabbableNode:o,nextTabbableNode:function(e){var a=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],i=n.indexOf(e);return i<0?a?t.slice(t.indexOf(e)+1).find((function(e){return Te(e)})):t.slice(0,t.indexOf(e)).reverse().find((function(e){return Te(e)})):n[i+(a?1:-1)]}}})),s.tabbableGroups=s.containerGroups.filter((function(e){return e.tabbableNodes.length>0})),s.tabbableGroups.length<=0&&!c("fallbackFocus"))throw new Error("Your focus-trap must have at least one container with at least one tabbable node in it at all times");if(s.containerGroups.find((function(e){return e.posTabIndexesFound}))&&s.containerGroups.length>1)throw new Error("At least one node with a positive tabindex was found in one of your focus-trap's multiple containers. Positive tabindexes are only supported in single-container focus-traps.")},m=function(e){var n=e.activeElement;if(n)return n.shadowRoot&&null!==n.shadowRoot.activeElement?m(n.shadowRoot):n},f=function(e){!1!==e&&e!==m(document)&&(e&&e.focus?(e.focus({preventScroll:!!l.preventScroll}),s.mostRecentlyFocusedNode=e,function(e){return e.tagName&&"input"===e.tagName.toLowerCase()&&"function"==typeof e.select}(e)&&e.select()):f(d()))},u=function(e){var n=c("setReturnFocus",{params:[e]});return n||!1!==n&&e},g=function(e){var n=e.target,t=e.event,a=e.isBackward,i=void 0!==a&&a;n=n||We(t),p();var o=null;if(s.tabbableGroups.length>0){var d=r(n,t),m=d>=0?s.containerGroups[d]:void 0;if(d<0)o=i?s.tabbableGroups[s.tabbableGroups.length-1].lastTabbableNode:s.tabbableGroups[0].firstTabbableNode;else if(i){var f=s.tabbableGroups.findIndex((function(e){var t=e.firstTabbableNode;return n===t}));if(f<0&&(m.container===n||Re(n,l.tabbableOptions)&&!Te(n,l.tabbableOptions)&&!m.nextTabbableNode(n,!1))&&(f=d),f>=0){var u=0===f?s.tabbableGroups.length-1:f-1,g=s.tabbableGroups[u];o=Oe(n)>=0?g.lastTabbableNode:g.lastDomTabbableNode}else Ge(t)||(o=m.nextTabbableNode(n,!1))}else{var h=s.tabbableGroups.findIndex((function(e){var t=e.lastTabbableNode;return n===t}));if(h<0&&(m.container===n||Re(n,l.tabbableOptions)&&!Te(n,l.tabbableOptions)&&!m.nextTabbableNode(n))&&(h=d),h>=0){var x=h===s.tabbableGroups.length-1?0:h+1,v=s.tabbableGroups[x];o=Oe(n)>=0?v.firstTabbableNode:v.firstDomTabbableNode}else Ge(t)||(o=m.nextTabbableNode(n))}}else o=c("fallbackFocus");return o},h=function(e){var n=We(e);r(n,e)>=0||($e(l.clickOutsideDeactivates,e)?t.deactivate({returnFocus:l.returnFocusOnDeactivate}):$e(l.allowOutsideClick,e)||e.preventDefault())},x=function(e){var n=We(e),t=r(n,e)>=0;if(t||n instanceof Document)t&&(s.mostRecentlyFocusedNode=n);else{var a;e.stopImmediatePropagation();var i=!0;if(s.mostRecentlyFocusedNode)if(Oe(s.mostRecentlyFocusedNode)>0){var o=r(s.mostRecentlyFocusedNode),c=s.containerGroups[o].tabbableNodes;if(c.length>0){var p=c.findIndex((function(e){return e===s.mostRecentlyFocusedNode}));p>=0&&(l.isKeyForward(s.recentNavEvent)?p+1<c.length&&(a=c[p+1],i=!1):p-1>=0&&(a=c[p-1],i=!1))}}else s.containerGroups.some((function(e){return e.tabbableNodes.some((function(e){return Oe(e)>0}))}))||(i=!1);else i=!1;i&&(a=g({target:s.mostRecentlyFocusedNode,isBackward:l.isKeyBackward(s.recentNavEvent)})),f(a||(s.mostRecentlyFocusedNode||d()))}s.recentNavEvent=void 0},v=function(e){(l.isKeyForward(e)||l.isKeyBackward(e))&&function(e){var n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];s.recentNavEvent=e;var t=g({event:e,isBackward:n});t&&(Ge(e)&&e.preventDefault(),f(t))}(e,l.isKeyBackward(e))},b=function(e){var n;"Escape"!==(null==(n=e)?void 0:n.key)&&"Esc"!==(null==n?void 0:n.key)&&27!==(null==n?void 0:n.keyCode)||!1===$e(l.escapeDeactivates,e)||(e.preventDefault(),t.deactivate())},y=function(e){var n=We(e);r(n,e)>=0||$e(l.clickOutsideDeactivates,e)||$e(l.allowOutsideClick,e)||(e.preventDefault(),e.stopImmediatePropagation())},O=function(){if(s.active)return Fe(i,t),s.delayInitialFocusTimer=l.delayInitialFocus?He((function(){f(d())})):f(d()),a.addEventListener("focusin",x,!0),a.addEventListener("mousedown",h,{capture:!0,passive:!1}),a.addEventListener("touchstart",h,{capture:!0,passive:!1}),a.addEventListener("click",y,{capture:!0,passive:!1}),a.addEventListener("keydown",v,{capture:!0,passive:!1}),a.addEventListener("keydown",b),t},w=function(){if(s.active)return a.removeEventListener("focusin",x,!0),a.removeEventListener("mousedown",h,!0),a.removeEventListener("touchstart",h,!0),a.removeEventListener("click",y,!0),a.removeEventListener("keydown",v,!0),a.removeEventListener("keydown",b),t},j="undefined"!=typeof window&&"MutationObserver"in window?new MutationObserver((function(e){e.some((function(e){return Array.from(e.removedNodes).some((function(e){return e===s.mostRecentlyFocusedNode}))}))&&f(d())})):void 0,N=function(){j&&(j.disconnect(),s.active&&!s.paused&&s.containers.map((function(e){j.observe(e,{subtree:!0,childList:!0})})))};return t={get active(){return s.active},get paused(){return s.paused},activate:function(e){if(s.active)return this;var n=o(e,"onActivate"),t=o(e,"onPostActivate"),i=o(e,"checkCanFocusTrap");i||p(),s.active=!0,s.paused=!1,s.nodeFocusedBeforeActivation=a.activeElement,null==n||n();var l=function(){i&&p(),O(),N(),null==t||t()};return i?(i(s.containers.concat()).then(l,l),this):(l(),this)},deactivate:function(e){if(!s.active)return this;var n=Be({onDeactivate:l.onDeactivate,onPostDeactivate:l.onPostDeactivate,checkCanReturnFocus:l.checkCanReturnFocus},e);clearTimeout(s.delayInitialFocusTimer),s.delayInitialFocusTimer=void 0,w(),s.active=!1,s.paused=!1,N(),ze(i,t);var a=o(n,"onDeactivate"),r=o(n,"onPostDeactivate"),c=o(n,"checkCanReturnFocus"),d=o(n,"returnFocus","returnFocusOnDeactivate");null==a||a();var p=function(){He((function(){d&&f(u(s.nodeFocusedBeforeActivation)),null==r||r()}))};return d&&c?(c(u(s.nodeFocusedBeforeActivation)).then(p,p),this):(p(),this)},pause:function(e){return s.active?(s.manuallyPaused=!0,this._setPausedState(!0,e)):this},unpause:function(e){return s.active?(s.manuallyPaused=!1,i[i.length-1]!==this?this:this._setPausedState(!1,e)):this},updateContainerElements:function(e){var n=[].concat(e).filter(Boolean);return s.containers=n.map((function(e){return"string"==typeof e?a.querySelector(e):e})),s.active&&p(),N(),this}},Object.defineProperties(t,{_isManuallyPaused:{value:function(){return s.manuallyPaused}},_setPausedState:{value:function(e,n){if(s.paused===e)return this;if(s.paused=e,e){var t=o(n,"onPause"),a=o(n,"onPostPause");null==t||t(),w(),N(),null==a||a()}else{var i=o(n,"onUnpause"),l=o(n,"onPostUnpause");null==i||i(),p(),O(),N(),null==l||l()}return this}}}),t.updateContainerElements(e),t};const Ke=n.forwardRef((function(e,t){var{active:a=!0,paused:i=!1,focusTrapOptions:s={},preventScrollOnDeactivate:o=!1}=e,r=l(e,["active","paused","focusTrapOptions","preventScrollOnDeactivate"]);const c=n.useRef(null);n.useImperativeHandle(t,(()=>c.current));const d=n.useRef(null);n.useEffect((()=>{const e=Ue(c.current,Object.assign(Object.assign({},s),{returnFocusOnDeactivate:!1}));return d.current=e,()=>{e.deactivate()}}),[]),n.useEffect((()=>{const e=d.current;a?null==e||e.activate():null==e||e.deactivate()}),[a]),n.useEffect((()=>{const e=d.current;i?null==e||e.pause():null==e||e.unpause()}),[i]);const p=n.useRef("undefined"!=typeof document?document.activeElement:null);return function(e){const t=n.useRef(e);t.current=e,n.useEffect((()=>()=>{t.current()}),[])}((()=>{!1!==s.returnFocusOnDeactivate&&p.current instanceof HTMLElement&&p.current.focus({preventScroll:o})})),x.jsx("div",Object.assign({ref:c},r))}));function Ye(e){return e[0].toUpperCase()+e.substring(1)}function Ze(e="pf"){return`${e}-${(new Date).getTime()+Math.random().toString(36).slice(2)}`}function Je(e,n){let t;return(...a)=>{clearTimeout(t),t=setTimeout((()=>e.apply(this,a)),n)}}function Qe(e,n,t,a=!1){if(!e||!n)return!1;const i=e.getBoundingClientRect(),l=n.getBoundingClientRect(),s=Math.ceil(i.left),o=Math.floor(i.right),r=Math.ceil(l.left),c=Math.floor(l.right),d=r>=s&&c<=o,p=(t||!a&&i.width<l.width)&&(r<s&&c>s||c>o&&r<o);return d||p}function en(e,n){return e.replace(/\${(.*?)}/g,((e,t)=>n[t]||""))}function nn(e,n,t){return t||(t=`${n}s`),`${e||0} ${1===e?n:t}`}Ke.displayName="FocusTrap";const tn=(e,n)=>Object.entries(e||{}).reduce(((e,[t,a])=>"default"===t?Object.assign(Object.assign({},e),{[n]:a}):Object.assign(Object.assign({},e),{[`${n}-on-${t}`]:a})),{}),an=(e,n,t="",a,i)=>{if(!e)return"";if(a&&!i){if(a in e)return n.modifiers[rn(`${t}${e[a]}`)];const i=["2xl","xl","lg","md","sm","default"];for(let l=i.indexOf(a);l<i.length;l++)if(i[l]in e)return n.modifiers[rn(`${t}${e[i[l]]}`)];return""}return Object.entries(e||{}).map((([e,n])=>`${t}${n}${"default"!==e?`-on-${e}`:""}${i&&"default"!==e?"-height":""}`)).map(rn).map((e=>e.replace(/-?(\dxl)/gi,((e,n)=>`_${n}`)))).map((e=>n.modifiers[e])).filter(Boolean).join(" ")},ln=e=>null===e?null:e>=de["2xl"]?"2xl":e>=de.xl?"xl":e>=de.lg?"lg":e>=de.md?"md":e>=de.sm?"sm":"default",sn=e=>null===e?null:e>=ce["2xl"]?"2xl":e>=ce.xl?"xl":e>=ce.lg?"lg":e>=ce.md?"md":e>=ce.sm?"sm":"default",on=e=>e.toUpperCase().replace("-","").replace("_",""),rn=e=>e.replace(/([-_][a-z])/gi,on),cn=!("undefined"==typeof window||!window.document||!window.document.createElement),dn=(e,n)=>{const t=getComputedStyle(n),a=document.createElement("canvas").getContext("2d");return a.font=t.font||(()=>{let e="";const n={"50%":"ultra-condensed","62.5%":"extra-condensed","75%":"condensed","87.5%":"semi-condensed","100%":"normal","112.5%":"semi-expanded","125%":"expanded","150%":"extra-expanded","200%":"ultra-expanded"};let a;return a=t.fontStretch in n?n[t.fontStretch]:"normal",e=t.fontStyle+" "+t.fontVariant+" "+t.fontWeight+" "+a+" "+t.fontSize+"/"+t.lineHeight+" "+t.fontFamily,e})(),a.measureText(e).width},pn=e=>{const n=getComputedStyle(e);let t=e.clientWidth,a=e.clientHeight;return a-=parseFloat(n.paddingTop)+parseFloat(n.paddingBottom),t-=parseFloat(n.paddingLeft)+parseFloat(n.paddingRight),{height:a,width:t}},mn=(e,n)=>{const t=pn(e).width;let a=n;if(dn(n,e)>t){for(;dn(`...${a}`,e)>t;)a=a.substring(1);e.value?e.value=`...${a}`:e.innerText=`...${a}`}else e.value?e.value=n:e.innerText=n},fn=e=>{e.forEach((e=>{e.current&&clearTimeout(e.current)}))},un=(e,n="ltr")=>{if(!e)return n;const t=getComputedStyle(e).getPropertyValue("direction");return["ltr","rtl"].includes(t)?t:n};let gn=0;class hn extends n.Component{constructor(){super(...arguments),this.uniqueElement=this.props.isRandom?"undefined"!=typeof crypto&&crypto.randomUUID?crypto.randomUUID():Ze():gn++,this.id=`${this.props.prefix}${this.uniqueElement}`}render(){return this.props.children(this.id)}}hn.displayName="GenerateId",hn.defaultProps={prefix:"pf-random-id-",isRandom:!1};let xn=0;const vn="OUIA-Generated-",bn={};function yn(e,n,t=!0){return{"data-ouia-component-type":`PF6/${e}`,"data-ouia-safe":t,"data-ouia-component-id":n}}const On=(e,n,t=!0,a)=>({"data-ouia-component-type":`PF6/${e}`,"data-ouia-safe":t,"data-ouia-component-id":wn(e,n,a)}),wn=(e,t,a)=>{const i=n.useMemo((()=>jn(e,a)),[e,a]);return null!=t?t:i};function jn(e,n){try{let t;return t="undefined"!=typeof window?`${window.location.href}-${e}-${n||""}`:`${e}-${n||""}`,bn[t]||(bn[t]=0),`${vn}${e}-${n?`${n}-`:""}${++bn[t]}`}catch(t){return`${vn}${e}-${n?`${n}-`:""}${++xn}`}}function Nn(e){const n=e.getBoundingClientRect();return{width:n.width,height:n.height,top:n.top,right:n.right,bottom:n.bottom,left:n.left,x:n.left,y:n.top}}function Cn(e){if("[object Window]"!==e.toString()){const n=e.ownerDocument;return n?n.defaultView:window}return e}function Sn(e){const n=Cn(e);return{scrollLeft:n.pageXOffset,scrollTop:n.pageYOffset}}function _n(e){return e instanceof Cn(e).Element||e instanceof Element}function kn(e){return e instanceof Cn(e).HTMLElement||e instanceof HTMLElement}function Ln(e){return e?(e.nodeName||"").toLowerCase():null}function In(e){return(_n(e)?e.ownerDocument:e.document).documentElement}function Tn(e){return Nn(In(e)).left+Sn(e).scrollLeft}function En(e){return Cn(e).getComputedStyle(e)}function Rn(e){const{overflow:n,overflowX:t,overflowY:a}=En(e);return/auto|scroll|overlay|hidden/.test(n+a+t)}function Dn(e,n,t=!1){const a=In(n),i=Nn(e),l=kn(n);let s={scrollLeft:0,scrollTop:0},o={x:0,y:0};var r,c;return(l||!l&&!t)&&(("body"!==Ln(n)||Rn(a))&&(s=(r=n)!==Cn(r)&&kn(r)?{scrollLeft:(c=r).scrollLeft,scrollTop:c.scrollTop}:Sn(r)),kn(n)?(o=Nn(n),o.x+=n.clientLeft,o.y+=n.clientTop):a&&(o.x=Tn(a))),{x:i.left+s.scrollLeft-o.x,y:i.top+s.scrollTop-o.y,width:i.width,height:i.height}}function Mn(e){return{x:e.offsetLeft,y:e.offsetTop,width:e.offsetWidth,height:e.offsetHeight}}function Pn(e){return"html"===Ln(e)?e:e.assignedSlot||e.parentNode||e.host||In(e)}function Bn(e){return["html","body","#document"].indexOf(Ln(e))>=0?e.ownerDocument.body:kn(e)&&Rn(e)?e:Bn(Pn(e))}function An(e,n=[]){const t=Bn(e),a="body"===Ln(t),i=Cn(t),l=a?[i].concat(i.visualViewport||[],Rn(t)?t:[]):t,s=n.concat(l);return a?s:s.concat(An(Pn(l)))}function Fn(e){return["table","td","th"].indexOf(Ln(e))>=0}function zn(e){if(!kn(e)||"fixed"===En(e).position)return null;const n=e.offsetParent;if(n){const e=In(n);if("body"===Ln(n)&&"static"===En(n).position&&"static"!==En(e).position)return e}return n}function Gn(e){const n=Cn(e);let t=zn(e);for(;t&&Fn(t)&&"static"===En(t).position;)t=zn(t);return t&&"body"===Ln(t)&&"static"===En(t).position?n:t||function(e){let n=Pn(e);for(;kn(n)&&["html","body"].indexOf(Ln(n))<0;){const e=En(n);if("none"!==e.transform||"none"!==e.perspective||e.willChange&&"auto"!==e.willChange)return n;n=n.parentNode}return null}(e)||n}const Vn="top",Xn="bottom",Hn="right",$n="left",Wn="auto",qn=[Vn,Xn,Hn,$n],Un="start",Kn="end",Yn="clippingParents",Zn="viewport",Jn="popper",Qn="reference",et=qn.reduce(((e,n)=>e.concat([`${n}-${Un}`,`${n}-${Kn}`])),[]),nt=[...qn,Wn].reduce(((e,n)=>e.concat([n,`${n}-${Un}`,`${n}-${Kn}`])),[]),tt=["beforeRead","read","afterRead","beforeMain","main","afterMain","beforeWrite","write","afterWrite"];function at(e){const n=new Map,t=new Set,a=[];function i(e){t.add(e.name);[...e.requires||[],...e.requiresIfExists||[]].forEach((e=>{if(!t.has(e)){const t=n.get(e);t&&i(t)}})),a.push(e)}return e.forEach((e=>{n.set(e.name,e)})),e.forEach((e=>{t.has(e.name)||i(e)})),a}function it(e){let n;return()=>(n||(n=new Promise((t=>{Promise.resolve().then((()=>{n=void 0,t(e())}))}))),n)}function lt(e){return e.split("-")[0]}function st(e,n){const t=Boolean(n.getRootNode&&n.getRootNode().host);if(e.contains(n))return!0;if(t){let t=n;do{if(t&&e.isSameNode(t))return!0;t=t.parentNode||t.host}while(t)}return!1}function ot(e){return Object.assign(Object.assign({},e),{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function rt(e,n){return n===Zn?ot(function(e){const n=Cn(e),t=In(e),a=n.visualViewport;let i=t.clientWidth,l=t.clientHeight,s=0,o=0;return a&&(i=a.width,l=a.height,/^((?!chrome|android).)*safari/i.test(navigator.userAgent)||(s=a.offsetLeft,o=a.offsetTop)),{width:i,height:l,x:s+Tn(e),y:o}}(e)):kn(n)?function(e){const n=Nn(e);return n.top=n.top+e.clientTop,n.left=n.left+e.clientLeft,n.bottom=n.top+e.clientHeight,n.right=n.left+e.clientWidth,n.width=e.clientWidth,n.height=e.clientHeight,n.x=n.left,n.y=n.top,n}(n):ot(function(e){const n=In(e),t=Sn(e),a=e.ownerDocument.body,i=Math.max(n.scrollWidth,n.clientWidth,a?a.scrollWidth:0,a?a.clientWidth:0),l=Math.max(n.scrollHeight,n.clientHeight,a?a.scrollHeight:0,a?a.clientHeight:0);let s=-t.scrollLeft+Tn(e);const o=-t.scrollTop;return"rtl"===En(a||n).direction&&(s+=Math.max(n.clientWidth,a?a.clientWidth:0)-i),{width:i,height:l,x:s,y:o}}(In(e)))}function ct(e,n,t){const a="clippingParents"===n?function(e){const n=An(Pn(e)),t=["absolute","fixed"].indexOf(En(e).position)>=0&&kn(e)?Gn(e):e;return _n(t)?n.filter((e=>_n(e)&&st(e,t)&&"body"!==Ln(e))):[]}(e):[].concat(n),i=[...a,t],l=i[0],s=i.reduce(((n,t)=>{const a=rt(e,t);return n.top=Math.max(a.top,n.top),n.right=Math.min(a.right,n.right),n.bottom=Math.min(a.bottom,n.bottom),n.left=Math.max(a.left,n.left),n}),rt(e,l));return s.width=s.right-s.left,s.height=s.bottom-s.top,s.x=s.left,s.y=s.top,s}function dt(e){return e.split("-")[1]}function pt(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function mt({reference:e,element:n,placement:t}){const a=t?lt(t):null,i=t?dt(t):null,l=e.x+e.width/2-n.width/2,s=e.y+e.height/2-n.height/2;let o;switch(a){case Vn:o={x:l,y:e.y-n.height};break;case Xn:o={x:l,y:e.y+e.height};break;case Hn:o={x:e.x+e.width,y:s};break;case $n:o={x:e.x-n.width,y:s};break;default:o={x:e.x,y:e.y}}const r=a?pt(a):null;if(null!=r){const t="y"===r?"height":"width";switch(i){case Un:o[r]=Math.floor(o[r])-Math.floor(e[t]/2-n[t]/2);break;case Kn:o[r]=Math.floor(o[r])+Math.ceil(e[t]/2-n[t]/2)}}return o}function ft(e){return Object.assign(Object.assign({},{top:0,right:0,bottom:0,left:0}),e)}function ut(e,n){return n.reduce(((n,t)=>(n[t]=e,n)),{})}function gt(e,n={}){const{placement:t=e.placement,boundary:a=Yn,rootBoundary:i=Zn,elementContext:l=Jn,altBoundary:s=!1,padding:o=0}=n,r=ft("number"!=typeof o?o:ut(o,qn)),c=l===Jn?Qn:Jn,d=e.elements.reference,p=e.rects.popper,m=e.elements[s?c:l],f=ct(_n(m)?m:m.contextElement||In(e.elements.popper),a,i),u=Nn(d),g=mt({reference:u,element:p,placement:t}),h=ot(Object.assign(Object.assign({},p),g)),x=l===Jn?h:u,v={top:f.top-x.top+r.top,bottom:x.bottom-f.bottom+r.bottom,left:f.left-x.left+r.left,right:x.right-f.right+r.right},b=e.modifiersData.offset;if(l===Jn&&b){const e=b[t];Object.keys(v).forEach((n=>{const t=[Hn,Xn].indexOf(n)>=0?1:-1,a=[Vn,Xn].indexOf(n)>=0?"y":"x";v[n]+=e[a]*t}))}return v}const ht={placement:"bottom",modifiers:[],strategy:"absolute"};function xt(...e){return!e.some((e=>!(e&&"function"==typeof e.getBoundingClientRect)))}function vt(e={}){const{defaultModifiers:n=[],defaultOptions:t=ht}=e;return function(e,a,i=t){let l={placement:"bottom",orderedModifiers:[],options:Object.assign(Object.assign({},ht),t),modifiersData:{},elements:{reference:e,popper:a},attributes:{},styles:{}},s=[],o=!1;const r={state:l,setOptions(i){c(),l.options=Object.assign(Object.assign(Object.assign({},t),l.options),i),l.scrollParents={reference:_n(e)?An(e):e.contextElement?An(e.contextElement):[],popper:An(a)};const o=function(e){const n=at(e);return tt.reduce(((e,t)=>e.concat(n.filter((e=>e.phase===t)))),[])}(function(e){const n=e.reduce(((e,n)=>{const t=e[n.name];return e[n.name]=t?Object.assign(Object.assign(Object.assign({},t),n),{options:Object.assign(Object.assign({},t.options),n.options),data:Object.assign(Object.assign({},t.data),n.data)}):n,e}),{});return Object.keys(n).map((e=>n[e]))}([...n,...l.options.modifiers]));return l.orderedModifiers=o.filter((e=>e.enabled)),l.orderedModifiers.forEach((({name:e,options:n={},effect:t})=>{if("function"==typeof t){const a=t({state:l,name:e,instance:r,options:n}),i=()=>{};s.push(a||i)}})),r.update()},forceUpdate(){if(o)return;const{reference:e,popper:n}=l.elements;if(xt(e,n)){l.rects={reference:Dn(e,Gn(n),"fixed"===l.options.strategy),popper:Mn(n)},l.reset=!1,l.placement=l.options.placement,l.orderedModifiers.forEach((e=>l.modifiersData[e.name]=Object.assign({},e.data)));for(let e=0;e<l.orderedModifiers.length;e++){if(!0===l.reset){l.reset=!1,e=-1;continue}const{fn:n,options:t={},name:a}=l.orderedModifiers[e];"function"==typeof n&&(l=n({state:l,options:t,name:a,instance:r})||l)}}},update:it((()=>new Promise((e=>{r.forceUpdate(),e(l)})))),destroy(){c(),o=!0}};if(!xt(e,a))return r;function c(){s.forEach((e=>e())),s=[]}return r.setOptions(i).then((e=>{!o&&i.onFirstUpdate&&i.onFirstUpdate(e)})),r}}vt();const bt={passive:!0};const yt={top:"auto",right:"auto",bottom:"auto",left:"auto"};function Ot({popper:e,popperRect:n,placement:t,offsets:a,position:i,gpuAcceleration:l,adaptive:s}){let{x:o,y:r}=function({x:e,y:n}){const t=window.devicePixelRatio||1;return{x:Math.round(e*t)/t||0,y:Math.round(n*t)/t||0}}(a);const c=a.hasOwnProperty("x"),d=a.hasOwnProperty("y");let p=$n,m=Vn;const f=window;if(s){let a=Gn(e);a===Cn(e)&&(a=In(e)),t===Vn&&(m=Xn,r-=a.clientHeight-n.height,r*=l?1:-1),t===$n&&(p=Hn,o-=a.clientWidth-n.width,o*=l?1:-1)}const u=Object.assign({position:i},s&&yt);return l?Object.assign(Object.assign({},u),{[m]:d?"0":"",[p]:c?"0":"",transform:(f.devicePixelRatio||1)<2?`translate(${o}px, ${r}px)`:`translate3d(${o}px, ${r}px, 0)`}):Object.assign(Object.assign({},u),{[m]:d?`${r}px`:"",[p]:c?`${o}px`:"",transform:""})}var wt={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:function({state:e,options:n,name:t}){const{offset:a=[0,0]}=n,i=nt.reduce(((n,t)=>(n[t]=function(e,n,t){const a=lt(e),i=[$n,Vn].indexOf(a)>=0?-1:1;let[l,s]="function"==typeof t?t(Object.assign(Object.assign({},n),{placement:e})):t;return l=l||0,s=(s||0)*i,[$n,Hn].indexOf(a)>=0?{x:s,y:l}:{x:l,y:s}}(t,e.rects,a),n)),{}),{x:l,y:s}=i[e.placement];null!=e.modifiersData.popperOffsets&&(e.modifiersData.popperOffsets.x+=l,e.modifiersData.popperOffsets.y+=s),e.modifiersData[t]=i}};const jt={left:"right",right:"left",bottom:"top",top:"bottom"};function Nt(e){return e.replace(/left|right|bottom|top/g,(e=>jt[e]))}const Ct={start:"end",end:"start"};function St(e){return e.replace(/start|end/g,(e=>Ct[e]))}function _t(e,n={}){const{placement:t,boundary:a,rootBoundary:i,padding:l,flipVariations:s,allowedAutoPlacements:o=nt}=n,r=dt(t),c=r?s?et:et.filter((e=>dt(e)===r)):qn;let d=c.filter((e=>o.indexOf(e)>=0));0===d.length&&(d=c);const p=d.reduce(((n,t)=>(n[t]=gt(e,{placement:t,boundary:a,rootBoundary:i,padding:l})[lt(t)],n)),{});return Object.keys(p).sort(((e,n)=>p[e]-p[n]))}var kt={name:"flip",enabled:!0,phase:"main",fn:function({state:e,options:n,name:t}){if(e.modifiersData[t]._skip)return;const{mainAxis:a=!0,altAxis:i=!0,fallbackPlacements:l,padding:s,boundary:o,rootBoundary:r,altBoundary:c,flipVariations:d=!0,allowedAutoPlacements:p}=n,m=e.options.placement,f=lt(m),u=[m,...l||(f===m||!d?[Nt(m)]:function(e){if(lt(e)===Wn)return[];const n=Nt(e);return[St(e),n,St(n)]}(m))].reduce(((n,t)=>n.concat(lt(t)===Wn?_t(e,{placement:t,boundary:o,rootBoundary:r,padding:s,flipVariations:d,allowedAutoPlacements:p}):t)),[]),g=e.rects.reference,h=e.rects.popper,x=new Map;let v=!0,b=u[0];for(let n=0;n<u.length;n++){const t=u[n],l=lt(t),d=dt(t)===Un,p=[Vn,Xn].indexOf(l)>=0,m=p?"width":"height",f=gt(e,{placement:t,boundary:o,rootBoundary:r,altBoundary:c,padding:s});let y=p?d?Hn:$n:d?Xn:Vn;g[m]>h[m]&&(y=Nt(y));const O=Nt(y),w=[];if(a&&w.push(f[l]<=0),i&&w.push(f[y]<=0,f[O]<=0),w.every((e=>e))){b=t,v=!1;break}x.set(t,w)}if(v){for(let e=d?3:1;e>0;e--){const n=u.find((n=>{const t=x.get(n);if(t)return t.slice(0,e).every((e=>e))}));if(n){b=n;break}}}e.placement!==b&&(e.modifiersData[t]._skip=!0,e.placement=b,e.reset=!0)},requiresIfExists:["offset"],data:{_skip:!1}};function Lt(e,n,t){return Math.max(e,Math.min(n,t))}var It={name:"preventOverflow",enabled:!0,phase:"main",fn:function({state:e,options:n,name:t}){const{mainAxis:a=!0,altAxis:i=!1,boundary:l,rootBoundary:s,altBoundary:o,padding:r,tether:c=!0,tetherOffset:d=0}=n,p=gt(e,{boundary:l,rootBoundary:s,padding:r,altBoundary:o}),m=lt(e.placement),f=dt(e.placement),u=!f,g=pt(m),h="x"===g?"y":"x",x=e.modifiersData.popperOffsets,v=e.rects.reference,b=e.rects.popper,y="function"==typeof d?d(Object.assign(Object.assign({},e.rects),{placement:e.placement})):d,O={x:0,y:0};if(x){if(a){const n="y"===g?Vn:$n,t="y"===g?Xn:Hn,a="y"===g?"height":"width",i=x[g],l=x[g]+p[n],s=x[g]-p[t],o=c?-b[a]/2:0,r=f===Un?v[a]:b[a],d=f===Un?-b[a]:-v[a],m=e.elements.arrow,h=c&&m?Mn(m):{width:0,height:0},w=e.modifiersData["arrow#persistent"]?e.modifiersData["arrow#persistent"].padding:{top:0,right:0,bottom:0,left:0},j=w[n],N=w[t],C=Lt(0,v[a],h[a]),S=u?v[a]/2-o-C-j-y:r-C-j-y,_=u?-v[a]/2+o+C+N+y:d+C+N+y,k=e.elements.arrow&&Gn(e.elements.arrow),L=k?"y"===g?k.clientTop||0:k.clientLeft||0:0,I=e.modifiersData.offset?e.modifiersData.offset[e.placement][g]:0,T=x[g]+S-I-L,E=x[g]+_-I,R=Lt(c?Math.min(l,T):l,i,c?Math.max(s,E):s);x[g]=R,O[g]=R-i}if(i){const e="x"===g?Vn:$n,n="x"===g?Xn:Hn,t=x[h],a=Lt(t+p[e],t,t-p[n]);x[h]=a,O[h]=a-t}e.modifiersData[t]=O}},requiresIfExists:["offset"]};var Tt={name:"arrow",enabled:!0,phase:"main",fn:function({state:e,name:n}){const t=e.elements.arrow,a=e.modifiersData.popperOffsets,i=lt(e.placement),l=pt(i),s=[$n,Hn].indexOf(i)>=0?"height":"width";if(!t||!a)return;const o=e.modifiersData[`${n}#persistent`].padding,r=Mn(t),c="y"===l?Vn:$n,d="y"===l?Xn:Hn,p=e.rects.reference[s]+e.rects.reference[l]-a[l]-e.rects.popper[s],m=a[l]-e.rects.reference[l],f=Gn(t),u=f?"y"===l?f.clientHeight||0:f.clientWidth||0:0,g=p/2-m/2,h=o[c],x=u-r[s]-o[d],v=u/2-r[s]/2+g,b=Lt(h,v,x),y=l;e.modifiersData[n]={[y]:b,centerOffset:b-v}},effect:function({state:e,options:n,name:t}){let{element:a="[data-popper-arrow]",padding:i=0}=n;null!=a&&("string"!=typeof a||(a=e.elements.popper.querySelector(a),a))&&st(e.elements.popper,a)&&(e.elements.arrow=a,e.modifiersData[`${t}#persistent`]={padding:ft("number"!=typeof i?i:ut(i,qn))})},requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function Et(e,n,t={x:0,y:0}){return{top:e.top-n.height-t.y,right:e.right-n.width+t.x,bottom:e.bottom-n.height+t.y,left:e.left-n.width-t.x}}function Rt(e){return[Vn,Hn,Xn,$n].some((n=>e[n]>=0))}const Dt=vt({defaultModifiers:[{name:"eventListeners",enabled:!0,phase:"write",fn:()=>{},effect:function({state:e,instance:n,options:t}){const{scroll:a=!0,resize:i=!0}=t,l=Cn(e.elements.popper),s=[...e.scrollParents.reference,...e.scrollParents.popper];return a&&s.forEach((e=>{e.addEventListener("scroll",n.update,bt)})),i&&l.addEventListener("resize",n.update,bt),()=>{a&&s.forEach((e=>{e.removeEventListener("scroll",n.update,bt)})),i&&l.removeEventListener("resize",n.update,bt)}},data:{}},{name:"popperOffsets",enabled:!0,phase:"read",fn:function({state:e,name:n}){e.modifiersData[n]=mt({reference:e.rects.reference,element:e.rects.popper,placement:e.placement})},data:{}},{name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:function({state:e,options:n}){const{gpuAcceleration:t=!0,adaptive:a=!0}=n,i={placement:lt(e.placement),popper:e.elements.popper,popperRect:e.rects.popper,gpuAcceleration:t};null!=e.modifiersData.popperOffsets&&(e.styles.popper=Object.assign(Object.assign({},e.styles.popper),Ot(Object.assign(Object.assign({},i),{offsets:e.modifiersData.popperOffsets,position:e.options.strategy,adaptive:a})))),null!=e.modifiersData.arrow&&(e.styles.arrow=Object.assign(Object.assign({},e.styles.arrow),Ot(Object.assign(Object.assign({},i),{offsets:e.modifiersData.arrow,position:"absolute",adaptive:!1})))),e.attributes.popper=Object.assign(Object.assign({},e.attributes.popper),{"data-popper-placement":e.placement})},data:{}},{name:"applyStyles",enabled:!0,phase:"write",fn:function({state:e}){Object.keys(e.elements).forEach((n=>{const t=e.styles[n]||{},a=e.attributes[n]||{},i=e.elements[n];kn(i)&&Ln(i)&&(Object.assign(i.style,t),Object.keys(a).forEach((e=>{const n=a[e];!1===n?i.removeAttribute(e):i.setAttribute(e,!0===n?"":n)})))}))},effect:function({state:e}){const n={popper:{position:e.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(e.elements.popper.style,n.popper),e.elements.arrow&&Object.assign(e.elements.arrow.style,n.arrow),()=>{Object.keys(e.elements).forEach((t=>{const a=e.elements[t],i=e.attributes[t]||{},l=Object.keys(e.styles.hasOwnProperty(t)?e.styles[t]:n[t]).reduce(((e,n)=>(e[n]="",e)),{});kn(a)&&Ln(a)&&(Object.assign(a.style,l),Object.keys(i).forEach((e=>{a.removeAttribute(e)})))}))}},requires:["computeStyles"]},wt,kt,It,Tt,{name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:function({state:e,name:n}){const t=e.rects.reference,a=e.rects.popper,i=e.modifiersData.preventOverflow,l=gt(e,{elementContext:"reference"}),s=gt(e,{altBoundary:!0}),o=Et(l,t),r=Et(s,a,i),c=Rt(o),d=Rt(r);e.modifiersData[n]={referenceClippingOffsets:o,popperEscapeOffsets:r,isReferenceHidden:c,hasPopperEscaped:d},e.attributes.popper=Object.assign(Object.assign({},e.attributes.popper),{"data-popper-reference-hidden":c,"data-popper-escaped":d})}}]}),Mt=cn?n.useLayoutEffect:n.useEffect,Pt=e=>e.reduce(((e,[n,t])=>(e[n]=t,e)),{}),Bt=[],At=(e,t,a={})=>{const i=n.useRef(null),l={onFirstUpdate:a.onFirstUpdate,placement:a.placement||"bottom",strategy:a.strategy||"absolute",modifiers:a.modifiers||Bt},[s,o]=n.useState({styles:{popper:{position:l.strategy,left:"0",top:"0"}},attributes:{}}),r=n.useMemo((()=>({name:"updateState",enabled:!0,phase:"write",fn:({state:e})=>{const n=Object.keys(e.elements);o({styles:Pt(n.map((n=>[n,e.styles[n]||{}]))),attributes:Pt(n.map((n=>[n,e.attributes[n]])))})},requires:["computeStyles"]})),[]),c=n.useMemo((()=>{const e={onFirstUpdate:l.onFirstUpdate,placement:l.placement,strategy:l.strategy,modifiers:[...l.modifiers,r,{name:"applyStyles",enabled:!1}]};return n=i.current,t=e,JSON.stringify(n)===JSON.stringify(t)?i.current||e:(i.current=e,e);var n,t}),[l.onFirstUpdate,l.placement,l.strategy,l.modifiers,r]),d=n.useRef(void 0);return Mt((()=>{d&&d.current&&d.current.setOptions(c)}),[c]),Mt((()=>{if(null==e||null==t)return;const n=(a.createPopper||Dt)(e,t,c);return d.current=n,()=>{n.destroy(),d.current=null}}),[e,t,a.createPopper]),{state:d.current?d.current.state:null,styles:s.styles,attributes:s.attributes,update:d.current?d.current.update:null,forceUpdate:d.current?d.current.forceUpdate:null}},Ft={left:"right",right:"left",bottom:"top",top:"bottom","top-start":"bottom-end","top-end":"bottom-start","bottom-start":"top-end","bottom-end":"top-start","left-start":"right-end","left-end":"right-start","right-start":"left-end","right-end":"left-start"},zt=e=>`opacity ${e}ms cubic-bezier(.54, 1.5, .38, 1.11)`,Gt=({trigger:e,popper:t,direction:a="down",position:l="start",placement:s,width:o,minWidth:r="trigger",maxWidth:c,appendTo:d=(()=>document.body),zIndex:p=9999,isVisible:m=!0,positionModifiers:f,distance:u=0,onMouseEnter:g,onMouseLeave:h,onFocus:b,onBlur:y,onDocumentClick:O,onTriggerClick:w,onTriggerEnter:j,onPopperClick:N,onPopperMouseEnter:C,onPopperMouseLeave:S,onDocumentKeyDown:_,enableFlip:k=!0,flipBehavior:L="flip",triggerRef:I,popperRef:T,animationDuration:E=0,entryDelay:R=0,exitDelay:D=0,onHidden:M=(()=>{}),onHide:P=(()=>{}),onMount:B=(()=>{}),onShow:A=(()=>{}),onShown:F=(()=>{}),preventOverflow:z=!1})=>{var G;const[V,X]=n.useState(null),[H,$]=n.useState(null),[W,q]=n.useState(null),[U,K]=n.useState(null),[Y,Z]=n.useState(!1),[J,Q]=n.useState(0),[ee,ne]=n.useState(m),te=n.useRef(null),ae=n.useRef(null),ie=n.useRef(null),le=n.useRef(void 0),se=H||V,oe=m||ee,re=null===(G=(null==I?void 0:I.current)||V)||void 0===G?void 0:G.parentElement,ce=un(re),de=n.useMemo((()=>{const e={left:"left",right:"right",center:"center"};return{ltr:Object.assign({start:"left",end:"right"},e),rtl:Object.assign({start:"right",end:"left"},e)}[ce][l]}),[l,ce]),pe=n.useCallback((e=>O(e,se,W)),[oe,V,H,W,O]);n.useEffect((()=>{Z(!0),B()}),[]),n.useEffect((()=>()=>{fn([te,ie,ae])}),[]),n.useEffect((()=>{I&&(I.current?$(I.current):"function"==typeof I&&$(I()))}),[I,e]),n.useEffect((()=>{T&&(T.current?q(T.current):"function"==typeof T&&q(T()))}),[oe,T]),n.useEffect((()=>{const e=new MutationObserver((()=>{ye&&ye()}));return W&&e.observe(W,{attributes:!0,childList:!0,subtree:!0}),()=>{e.disconnect()}}),[W]);const me=(e,n,t,a=!1)=>{e&&n&&n.addEventListener(t,e,{capture:a})},fe=(e,n,t,a=!1)=>{e&&n&&n.removeEventListener(t,e,{capture:a})};n.useEffect((()=>(me(g,se,"mouseenter"),me(h,se,"mouseleave"),me(b,se,"focus"),me(y,se,"blur"),me(w,se,"click"),me(j,se,"keydown