react-md
Version:
This is the full react-md library bundled together for convenience.
15 lines • 705 kB
JavaScript
!function(e,r){"object"==typeof exports&&"undefined"!=typeof module?r(exports,require("react"),require("react-dom"),require("crypto")):"function"==typeof define&&define.amd?define(["exports","react","react-dom","crypto"],r):r((e="undefined"!=typeof globalThis?globalThis:e||self).ReactMD={},e.React,e.ReactDOM,e.crypto)}(this,(function(e,r,t,n){"use strict";function o(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var i=o(r),a=o(n),c={exports:{}},l={};Object.getOwnPropertySymbols,Object.prototype.hasOwnProperty,Object.prototype.propertyIsEnumerable;!function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var r={},t=0;t<10;t++)r["_"+String.fromCharCode(t)]=t;if("0123456789"!==Object.getOwnPropertyNames(r).map((function(e){return r[e]})).join(""))return!1;var n={};return"abcdefghijklmnopqrst".split("").forEach((function(e){n[e]=e})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},n)).join("")}catch(e){return!1}}()||Object.assign;
/** @license React v17.0.2
* react-jsx-runtime.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
var s=i.default,f=60103;if(l.Fragment=60107,"function"==typeof Symbol&&Symbol.for){var u=Symbol.for;f=u("react.element"),l.Fragment=u("react.fragment")}var p=s.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,d=Object.prototype.hasOwnProperty,h={key:!0,ref:!0,__self:!0,__source:!0};function v(e,r,t){var n,o={},i=null,a=null;for(n in void 0!==t&&(i=""+t),void 0!==r.key&&(i=""+r.key),void 0!==r.ref&&(a=r.ref),r)d.call(r,n)&&!h.hasOwnProperty(n)&&(o[n]=r[n]);if(e&&e.defaultProps)for(n in r=e.defaultProps)void 0===o[n]&&(o[n]=r[n]);return{$$typeof:f,type:e,key:i,ref:a,props:o,_owner:p.current}}l.jsx=v,l.jsxs=v,c.exports=l;var y={exports:{}};
/*!
Copyright (c) 2018 Jed Watson.
Licensed under the MIT License (MIT), see
http://jedwatson.github.io/classnames
*/!function(e){!function(){var r={}.hasOwnProperty;function t(){for(var e=[],n=0;n<arguments.length;n++){var o=arguments[n];if(o){var i=typeof o;if("string"===i||"number"===i)e.push(o);else if(Array.isArray(o)){if(o.length){var a=t.apply(null,o);a&&e.push(a)}}else if("object"===i)if(o.toString===Object.prototype.toString)for(var c in o)r.call(o,c)&&o[c]&&e.push(c);else e.push(o.toString())}}return e.join(" ")}e.exports?(t.default=t,e.exports=t):window.classNames=t}()}(y);var b=y.exports;var O=function(e,r){var t="function"==typeof Symbol&&e[Symbol.iterator];if(!t)return e;var n,o,i=t.call(e),a=[];try{for(;(void 0===r||r-- >0)&&!(n=i.next()).done;)a.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(t=i.return)&&t.call(i)}finally{if(o)throw o.error}}return a};function g(e){var n=e.into,o=e.intoId,i=e.children,a=O(r.useState(null),2),c=a[0],l=a[1];return r.useEffect((function(){var e=function(e,r){if("undefined"==typeof document)return null;var t=null;return void 0===e&&void 0===r?t=document.body:"string"==typeof r?t=document.getElementById(r):"string"==typeof e?t=document.querySelector(e):"function"==typeof e?t=e():e&&(t=e),t}(n,o);c!==e&&l(e)}),[n,o,c]),c?t.createPortal(i,c):null}var m=function(){return(m=Object.assign||function(e){for(var r,t=1,n=arguments.length;t<n;t++)for(var o in r=arguments[t])Object.prototype.hasOwnProperty.call(r,o)&&(e[o]=r[o]);return e}).apply(this,arguments)};function j(e){var r=e.portal,t=e.portalInto,n=e.portalIntoId,o=e.children;return r||t||n?c.exports.jsx(g,m({into:t,intoId:n},{children:o}),void 0):c.exports.jsx(c.exports.Fragment,{children:o},void 0)}function x(e,r){r&&("function"==typeof r?r(e):"object"==typeof r&&(r.current=e))}function w(e,r){if(!r)return e;var t=Object.prototype.hasOwnProperty;return Object.keys(r).reduce((function(n,o){return t.call(r,o)&&r[o]&&(n="".concat(n," ").concat(e,"--").concat(o)),n}),e)}function P(e){return function(r,t){return r?"string"!=typeof r?w(e,r):w("".concat(e,"__").concat(r),t):e}}var I=/^#?([a-f\d])([a-f\d])([a-f\d])$/i,R=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i;function F(e){var r=(e=e.replace(I,(function(e,r,t,n){return"".concat(r).concat(r).concat(t).concat(t).concat(n).concat(n)}))).match(R)||[];return[parseInt(r[1]||"",16)||0,parseInt(r[2]||"",16)||0,parseInt(r[3]||"",16)||0]}var S=function(e,r){var t="function"==typeof Symbol&&e[Symbol.iterator];if(!t)return e;var n,o,i=t.call(e),a=[];try{for(;(void 0===r||r-- >0)&&!(n=i.next()).done;)a.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(t=i.return)&&t.call(i)}finally{if(o)throw o.error}}return a};function C(e){return(e/=255)<=.03928?e/12.92:Math.pow((e+.055)/1.055,2.4)}function _(e){var r=S(F(e),3),t=r[0],n=r[1],o=r[2];return.2126*C(t)+.7152*C(n)+.0722*C(o)}function E(e,r){var t=_(e)+.05,n=_(r)+.05;return Math.max(t,n)/Math.min(t,n)}var N=function(e){return function(e){return!!e&&void 0!==e.current}(e)?e.current:e};function T(e,r){return e=N(e),r=N(r),!!(e&&r&&e.contains(r))}var A=function(){return(A=Object.assign||function(e){for(var r,t=1,n=arguments.length;t<n;t++)for(var o in r=arguments[t])Object.prototype.hasOwnProperty.call(r,o)&&(e[o]=r[o]);return e}).apply(this,arguments)};function k(e,r){return Object.keys(r).reduce((function(e,t){return void 0===e[t]&&(e[t]=r[t]),e}),A({},e))}var M=function(){return(M=Object.assign||function(e){for(var r,t=1,n=arguments.length;t<n;t++)for(var o in r=arguments[t])Object.prototype.hasOwnProperty.call(r,o)&&(e[o]=r[o]);return e}).apply(this,arguments)},L=function(e,r){var t={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&r.indexOf(n)<0&&(t[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(e);o<n.length;o++)r.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(t[n[o]]=e[n[o]])}return t},D=function(e,r){var t="function"==typeof Symbol&&e[Symbol.iterator];if(!t)return e;var n,o,i=t.call(e),a=[];try{for(;(void 0===r||r-- >0)&&!(n=i.next()).done;)a.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(t=i.return)&&t.call(i)}finally{if(o)throw o.error}}return a},B=r.createContext({root:!0,dir:"ltr",toggleDir:function(){throw new Error("Tried to toggle the current writing direction without initializing the `Dir` component.")}}),K=B.Provider;function H(){var e=r.useContext(B);return e.root,L(e,["root"])}var V=function(){var e="ltr";"undefined"!=typeof document&&(e="rtl"===document.documentElement.getAttribute("dir")?"rtl":"ltr");return e};function W(e){var t=e.children,n=e.defaultDir,o=void 0===n?V:n,i=r.useContext(B).root,a=D(r.useState(o),2),l=a[0],s=a[1];r.useEffect((function(){if(i&&"undefined"!=typeof document)return document.documentElement.setAttribute("dir",l),function(){document.documentElement.removeAttribute("dir")}}),[l,i]);var f=r.useCallback((function(){s((function(e){return"ltr"===e?"rtl":"ltr"}))}),[]),u=r.useMemo((function(){return{root:!1,dir:l,toggleDir:f}}),[l,f]),p=r.Children.only(t);return i||(p=r.cloneElement(p,{dir:l})),c.exports.jsx(K,M({value:u},{children:p}),void 0)}var z=function(){},U=!1;function q(){if("undefined"==typeof window)return!1;var e=!1,r=Object.defineProperty({},"passive",{get:function(){e=!0}});return window.addEventListener("testSupportsPassive",z,r),window.removeEventListener("testSupportsPassive",z,r),U=e,e}q();var G=Object.freeze({__proto__:null,update:q,get isSupported(){return U}}),X=[];function Y(e,r,t,n){void 0===r&&(r=window),void 0===t&&(t=!1);var o=[],i=function(e,r){var t=!1,n=function(e){return function(){for(var n=0;n<r.length;n+=1)r[n](e);t=!1}};return function(r){e?t||(t=!0,window.requestAnimationFrame(n(r))):n(r)()}}(t,o);return{add:function(t){o.length||r.addEventListener(e,i,n),-1===o.indexOf(t)&&o.push(t)},remove:function(t){var a=o.indexOf(t);a>=0&&(o.splice(a,1),o.length||r.removeEventListener(e,i,n))}}}function J(e,r,t,n){void 0===r&&(r=window),void 0===t&&(t="resize"===e||"scroll"===e);var o=X.findIndex((function(o){return o.type===e&&o.target===r&&o.options===n&&o.throttle===t}));return-1===o&&(X.push({type:e,target:r,options:n,throttle:t,handler:Y(e,r,t,n)}),o=X.length-1),X[o].handler}var Q=function(){return(Q=Object.assign||function(e){for(var r,t=1,n=arguments.length;t<n;t++)for(var o in r=arguments[t])Object.prototype.hasOwnProperty.call(r,o)&&(e[o]=r[o]);return e}).apply(this,arguments)};function Z(e,r,t,n,o,i){void 0===o&&(o=!1),r["".concat(e?"add":"remove","EventListener")]("touch".concat(t),n,U?Q({passive:!0,capture:o},i):o)}function $(e){var t=r.useRef(e);return r.useEffect((function(){t.current=e})),t}function ee(e){var t=e.enabled,n=void 0===t||t,o=e.onScroll,i=e.element,a=e.options,c=void 0===a?!!U&&{passive:!0}:a,l=$(o);r.useEffect((function(){if(n){var e=J("scroll",i||window,!0,c),r=function(e){return l.current(e)};return e.add(r),function(){e.remove(r)}}}),[n,i,c])}function re(e){var r=e.min,t=e.max,n=e.value,o=e.validate;if(void 0===o||o){if(r>=t)throw new RangeError("A range must have the min value less than the max value");if(n>t||n<r)throw new RangeError("A value must be between the min and max values")}var i=(n-r)/(t-r);return Math.max(0,Math.min(Math.abs(i),1))}var te=1e3;function ne(e){var t=r.useRef(e);return r.useEffect((function(){t.current=e})),r.useEffect((function(){return function(){return t.current()}}),[])}var oe=function(){},ie=r.createContext({visibleInTime:te,enableHoverMode:oe,disableHoverMode:oe,startDisableTimer:oe}),ae=ie.Provider;function ce(){return r.useContext(ie)}var le=function(){return(le=Object.assign||function(e){for(var r,t=1,n=arguments.length;t<n;t++)for(var o in r=arguments[t])Object.prototype.hasOwnProperty.call(r,o)&&(e[o]=r[o]);return e}).apply(this,arguments)},se=function(e,r){var t="function"==typeof Symbol&&e[Symbol.iterator];if(!t)return e;var n,o,i=t.call(e),a=[];try{for(;(void 0===r||r-- >0)&&!(n=i.next()).done;)a.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(t=i.return)&&t.call(i)}finally{if(o)throw o.error}}return a};function fe(e){var t=e.children,n=e.disabled,o=void 0!==n&&n,i=e.defaultVisibleInTime,a=void 0===i?te:i,l=e.deactivateTime,s=void 0===l?1e3:l,f=se(r.useState(a),2),u=f[0],p=f[1],d=r.useRef(),h=r.useCallback((function(){o||(window.clearTimeout(d.current),p(0))}),[o]),v=r.useCallback((function(){window.clearTimeout(d.current),p(a)}),[a]),y=r.useCallback((function(){window.clearTimeout(d.current),d.current=window.setTimeout((function(){p(a)}),s)}),[a,s]);r.useEffect((function(){o&&(window.clearTimeout(d.current),p(a))}),[o,a]),ne((function(){window.clearTimeout(d.current)}));var b=r.useMemo((function(){return{visibleInTime:u,enableHoverMode:h,disableHoverMode:v,startDisableTimer:y}}),[v,h,y,u]);return c.exports.jsx(ae,le({value:b},{children:t}),void 0)}var ue="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement?r.useLayoutEffect:r.useEffect,pe=function(e,r){var t="function"==typeof Symbol&&e[Symbol.iterator];if(!t)return e;var n,o,i=t.call(e),a=[];try{for(;(void 0===r||r-- >0)&&!(n=i.next()).done;)a.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(t=i.return)&&t.call(i)}finally{if(o)throw o.error}}return a};var de=function(){return(de=Object.assign||function(e){for(var r,t=1,n=arguments.length;t<n;t++)for(var o in r=arguments[t])Object.prototype.hasOwnProperty.call(r,o)&&(e[o]=r[o]);return e}).apply(this,arguments)},he=r.createContext("mouse"),ve=r.createContext(!1),ye=he.Provider,be=ve.Provider;function Oe(){return r.useContext(he)}function ge(e){return Oe()===e}function me(e){var t=e.children,n=function(){var e=pe(r.useState("mouse"),2),t=e[0],n=e[1],o=r.useRef(0),i=r.useRef(!1);return ue((function(){var e=function(){return n("mouse")},r=function(){return n("keyboard")},a=function(){o.current=Date.now(),i.current=!1,n("touch")},c=function(){i.current||Date.now()-o.current<1200?i.current=!1:e()},l=function(){i.current=!0},s="rmd-utils--".concat(t);return document.body.classList.add(s),window.addEventListener("touchstart",a,!0),"mouse"===t?window.addEventListener("keydown",r,!0):"keyboard"===t?window.addEventListener("mousedown",e,!0):(window.addEventListener("mousemove",c,!0),window.addEventListener("contextmenu",l,!0)),function(){document.body.classList.remove(s),window.removeEventListener("touchstart",a,!0),"mouse"===t?window.removeEventListener("keydown",r,!0):"keyboard"===t?window.removeEventListener("mousedown",e,!0):(window.removeEventListener("mousemove",c,!0),window.removeEventListener("contextmenu",l,!0))}}),[t]),t}();if(r.useContext(ve))throw new Error("Mounted multiple `UserInteractionModeListener` components.");return c.exports.jsx(ye,de({value:n},{children:c.exports.jsx(be,de({value:!0},{children:t}),void 0)}),void 0)}var je=function(){return(je=Object.assign||function(e){for(var r,t=1,n=arguments.length;t<n;t++)for(var o in r=arguments[t])Object.prototype.hasOwnProperty.call(r,o)&&(e[o]=r[o]);return e}).apply(this,arguments)},xe=function(e,r){var t="function"==typeof Symbol&&e[Symbol.iterator];if(!t)return e;var n,o,i=t.call(e),a=[];try{for(;(void 0===r||r-- >0)&&!(n=i.next()).done;)a.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(t=i.return)&&t.call(i)}finally{if(o)throw o.error}}return a};function we(e){var t=void 0===e?{}:e,n=t.disabled,o=void 0!==n&&n,i=t.sticky,a=void 0!==i&&i,c=t.onClick,l=t.onMouseEnter,s=t.onMouseLeave,f=t.defaultVisible,u=void 0!==f&&f,p=t.exitVisibilityDelay,d=void 0===p?a?300:0:p,h=Oe(),v="touch"===h,y=xe(r.useState(u),2),b=y[0],O=y[1],g=xe(r.useState(!1),2),m=g[0],j=g[1],x=r.useRef(),w=r.useRef(u),P=ce(),I=P.visibleInTime,R=P.enableHoverMode,F=P.disableHoverMode,S=P.startDisableTimer,C=0===I;r.useEffect((function(){a&&!b&&j(!1)}),[b,a]),ne((function(){window.clearTimeout(x.current)})),r.useEffect((function(){if(!o){var e=function(){O(!1),F(),window.clearTimeout(x.current)};return w.current||e(),w.current=!1,window.addEventListener("mousedown",e),function(){window.removeEventListener("mousedown",e)}}}),[F,h,o]);var _,E=r.useCallback((function(e){if(null==l||l(e),!(m||o||v||e.isPropagationStopped())){if(window.clearTimeout(x.current),0===I)return R(),void O(!0);x.current=window.setTimeout((function(){R(),O(!0)}),I)}}),[o,R,v,l,m,I]),N=r.useCallback((function(e){null==s||s(e),m||o||v||e.isPropagationStopped()||(S(),window.clearTimeout(x.current),0!==d?x.current=window.setTimeout((function(){O(!1)}),d):O(!1))}),[o,d,v,s,S,m]),T=r.useCallback((function(e){null==c||c(e),e.isPropagationStopped()||o||(S(),window.clearTimeout(x.current))}),[o,c,S]),A=r.useCallback((function(e){null==c||c(e),e.isPropagationStopped()||o||(m?(j(!1),O((function(e){return!e}))):(j(!0),O(!0),F()))}),[F,o,c,m]),k={onClick:T,onMouseEnter:E,onMouseLeave:N};return a&&(_=je(je({},k),{onClick:A})),{active:C,stuck:a?m:void 0,visible:b,setVisible:O,handlers:k,stickyHandlers:_,enableHoverMode:R,disableHoverMode:F,startDisableTimer:S}}var Pe="".concat(64.0625,"em"),Ie="".concat(48,"em"),Re="".concat(64,"em"),Fe="".concat(767/16,"em"),Se="".concat(80,"em"),Ce=function(e,r){var t="function"==typeof Symbol&&e[Symbol.iterator];if(!t)return e;var n,o,i=t.call(e),a=[];try{for(;(void 0===r||r-- >0)&&!(n=i.next()).done;)a.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(t=i.return)&&t.call(i)}finally{if(o)throw o.error}}return a},_e=function(){var e,r=null===(e=window.screen.orientation)||void 0===e?void 0:e.type;if("string"==typeof r)return r;var t=window.screen;return t.availHeight>t.availWidth?"portrait-primary":"landscape-primary"};function Ee(e){var t=Ce(r.useState((function(){return e||("undefined"!=typeof window?_e():"landscape-primary")})),2),n=t[0],o=t[1];return r.useEffect((function(){if("undefined"!=typeof window){var e=function(){o(_e())};return window.addEventListener("orientationchange",e),function(){return window.removeEventListener("orientationchange",e)}}}),[]),n}var Ne=function(e,r){var t="function"==typeof Symbol&&e[Symbol.iterator];if(!t)return e;var n,o,i=t.call(e),a=[];try{for(;(void 0===r||r-- >0)&&!(n=i.next()).done;)a.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(t=i.return)&&t.call(i)}finally{if(o)throw o.error}}return a};function Te(e,t,n,o){void 0===n&&(n=!1),void 0===o&&(o="undefined"!=typeof window);var i=Ne(r.useState((function(){return void 0!==t?t:!(n||!o||"undefined"==typeof window)&&window.matchMedia(e).matches})),2),a=i[0],c=i[1];return r.useEffect((function(){if("undefined"!=typeof window&&!n){var r=window.matchMedia(e),t=function(e){var r=e.matches;return c(r)};return r.addEventListener("change",t),r.matches!==a&&c(r.matches),function(){r.removeEventListener("change",t)}}}),[n,a,e]),a}var Ae=function(e,r){var t=typeof e;if("undefined"===t)return"";var n="number"===t?"".concat(e,"px"):e;return"(".concat(r,"-width: ").concat(n,")")};function ke(e){var t=e.min,n=e.max;return Te(r.useMemo((function(){var e=[Ae(t,"min"),Ae(n,"max")].filter(Boolean).join(" and ");return"screen and ".concat(e)}),[t,n]))}var Me=function(e,r){var t="function"==typeof Symbol&&e[Symbol.iterator];if(!t)return e;var n,o,i=t.call(e),a=[];try{for(;(void 0===r||r-- >0)&&!(n=i.next()).done;)a.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(t=i.return)&&t.call(i)}finally{if(o)throw o.error}}return a},Le={isPhone:!1,isTablet:!1,isDesktop:!0,isLargeDesktop:!1,isLandscape:!0};function De(e){var t=void 0===e?{}:e,n=t.phoneMaxWidth,o=void 0===n?Fe:n,i=t.tabletMinWidth,a=void 0===i?Ie:i,c=t.tabletMaxWidth,l=void 0===c?Re:c,s=t.desktopMinWidth,f=void 0===s?Pe:s,u=t.desktopLargeMinWidth,p=void 0===u?Se:u,d=t.defaultSize,h=void 0===d?Le:d;if("undefined"==typeof window)return h;var v=ke({min:f}),y=ke({min:p}),b=ke({min:a,max:l}),O=ke({max:o}),g=v,m=!v&&b,j=!m&&!g&&O,x=Ee().includes("landscape"),w=y,P=Me(r.useState(h),2),I=P[0],R=P[1];return r.useEffect((function(){I.isPhone===j&&I.isTablet===m&&I.isDesktop===g&&I.isLargeDesktop===w&&I.isLandscape===x||(j||m||g||w)&&R({isPhone:j,isTablet:m,isDesktop:g,isLargeDesktop:w,isLandscape:x})}),[j,m,g,w,x,I]),I}var Be=function(){return(Be=Object.assign||function(e){for(var r,t=1,n=arguments.length;t<n;t++)for(var o in r=arguments[t])Object.prototype.hasOwnProperty.call(r,o)&&(e[o]=r[o]);return e}).apply(this,arguments)},Ke=function(e,r){var t={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&r.indexOf(n)<0&&(t[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(e);o<n.length;o++)r.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(t[n[o]]=e[n[o]])}return t},He=r.createContext(Be(Be({},Le),{__initialized:!1}));function Ve(){var e=r.useContext(He),t=e.__initialized,n=Ke(e,["__initialized"]);if(!t)throw new Error("Unable to get the current `AppSize` from `react-md` because the `AppSizeListener` could not be found when using the `useAppSize` hook. To fix this error, either initialize the `AppSizeListener` component from `@react-md/utils` or the `Configuration` component from `@react-md/layout` near the root of your app.");return n}var We,ze=function(){return(ze=Object.assign||function(e){for(var r,t=1,n=arguments.length;t<n;t++)for(var o in r=arguments[t])Object.prototype.hasOwnProperty.call(r,o)&&(e[o]=r[o]);return e}).apply(this,arguments)},Ue=function(e,r){var t={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&r.indexOf(n)<0&&(t[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(e);o<n.length;o++)r.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(t[n[o]]=e[n[o]])}return t},qe=P("rmd-grid"),Ge=r.forwardRef((function(e,t){var n,o,i,a,l,s,f,u=e.style,p=e.className,d=e.clone,h=e.children,v=e.colSpan,y=e.colStart,O=e.colEnd,g=e.rowSpan,m=e.rowStart,j=e.rowEnd,x=e.phone,w=e.tablet,P=e.desktop,I=e.largeDesktop,R=Ue(e,["style","className","clone","children","colSpan","colStart","colEnd","rowSpan","rowStart","rowEnd","phone","tablet","desktop","largeDesktop"]),F=Ve(),S=F.isPhone,C=F.isTablet,_=F.isDesktop,E=F.isLargeDesktop,N=v,T=y,A=O,k=g,M=m,L=j,D=S&&x||C&&w||E&&I||_&&P;D&&(k=void 0===(n=D.rowSpan)?g:n,M=void 0===(o=D.rowStart)?m:o,L=void 0===(i=D.rowEnd)?j:i,N=void 0===(a=D.colSpan)?v:a,T=void 0===(l=D.colStart)?y:l,A=void 0===(s=D.colEnd)?O:s);var B=ze({gridColumnStart:T,gridColumnEnd:A,gridRowStart:M,gridRowEnd:k?"span ".concat(k):L},u),K=b(qe("cell",((f={})["".concat(N)]=N,f)),p);if(d&&r.isValidElement(h)){var H=r.Children.only(h);return r.cloneElement(H,{style:ze(ze({},H.props.style),B),className:b(K,H.props.className)})}return c.exports.jsx("div",ze({},R,{ref:t,style:B,className:K},{children:h}),void 0)})),Xe=function(){return(Xe=Object.assign||function(e){for(var r,t=1,n=arguments.length;t<n;t++)for(var o in r=arguments[t])Object.prototype.hasOwnProperty.call(r,o)&&(e[o]=r[o]);return e}).apply(this,arguments)},Ye=function(e,r){var t={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&r.indexOf(n)<0&&(t[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(e);o<n.length;o++)r.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(t[n[o]]=e[n[o]])}return t},Je="--rmd-grid-cols",Qe="--rmd-grid-gutter",Ze=P("rmd-grid"),$e=r.forwardRef((function(e,t){var n,o=e.style,i=e.className,a=e.children,l=e.clone,s=void 0!==l&&l,f=e.cloneStyles,u=void 0!==f&&f,p=e.wrapOnly,d=void 0!==p&&p,h=e.columns,v=e.phoneColumns,y=e.tabletColumns,O=e.desktopColumns,g=e.largeDesktopColumns,m=e.padding,j=e.gutter,x=e.minCellWidth,w=Ye(e,["style","className","children","clone","cloneStyles","wrapOnly","columns","phoneColumns","tabletColumns","desktopColumns","largeDesktopColumns","padding","gutter","minCellWidth"]),P=Ve(),I=P.isPhone,R=P.isTablet,F=P.isDesktop,S=P.isLargeDesktop,C=Xe(Xe({padding:0!==m&&m||void 0,gridTemplateColumns:x?"repeat(auto-fill, minmax(".concat(x,", 1fr))"):void 0},o),((n={})[Je]=I&&v||R&&y||S&&g||F&&O||h,n[Qe]=j,n)),_=b(Ze({"no-padding":0===m}),i);if(u&&r.isValidElement(a)){var E=r.Children.only(a);return r.cloneElement(E,{style:Xe(Xe({},C),E.props.style),className:b(_,E.props.className)})}var N=a;return(s||d)&&(N=r.Children.map(a,(function(e){return e&&c.exports.jsx(Ge,Xe({clone:s},{children:e}),void 0)}))),c.exports.jsx("div",Xe({},w,{ref:t,style:C,className:_},{children:N}),void 0)})),er=function(){return(er=Object.assign||function(e){for(var r,t=1,n=arguments.length;t<n;t++)for(var o in r=arguments[t])Object.prototype.hasOwnProperty.call(r,o)&&(e[o]=r[o]);return e}).apply(this,arguments)},rr=function(e,r){var t={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&r.indexOf(n)<0&&(t[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(e);o<n.length;o++)r.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(t[n[o]]=e[n[o]])}return t},tr=P("rmd-grid-list"),nr=r.forwardRef((function(e,t){var n=e.className,o=e.children,i=e.square,a=void 0!==i&&i,l=e.clone,s=void 0!==l&&l,f=rr(e,["className","children","square","clone"]),u=b(tr("cell",{square:a}),n);if(s&&r.isValidElement(o)){var p=r.Children.only(o);return r.cloneElement(p,{className:b(u,p.props.className)})}return c.exports.jsx("div",er({},f,{ref:t,className:u},{children:o}),void 0)})),or=[],ir="ResizeObserver loop completed with undelivered notifications.";!function(e){e.BORDER_BOX="border-box",e.CONTENT_BOX="content-box",e.DEVICE_PIXEL_CONTENT_BOX="device-pixel-content-box"}(We||(We={}));var ar,cr=function(e){return Object.freeze(e)},lr=function(e,r){this.inlineSize=e,this.blockSize=r,cr(this)},sr=function(){function e(e,r,t,n){return this.x=e,this.y=r,this.width=t,this.height=n,this.top=this.y,this.left=this.x,this.bottom=this.top+this.height,this.right=this.left+this.width,cr(this)}return e.prototype.toJSON=function(){var e=this;return{x:e.x,y:e.y,top:e.top,right:e.right,bottom:e.bottom,left:e.left,width:e.width,height:e.height}},e.fromRect=function(r){return new e(r.x,r.y,r.width,r.height)},e}(),fr=function(e){return e instanceof SVGElement&&"getBBox"in e},ur=function(e){if(fr(e)){var r=e.getBBox(),t=r.width,n=r.height;return!t&&!n}var o=e,i=o.offsetWidth,a=o.offsetHeight;return!(i||a||e.getClientRects().length)},pr=function(e){var r,t;if(e instanceof Element)return!0;var n=null===(t=null===(r=e)||void 0===r?void 0:r.ownerDocument)||void 0===t?void 0:t.defaultView;return!!(n&&e instanceof n.Element)},dr="undefined"!=typeof window?window:{},hr=new WeakMap,vr=/auto|scroll/,yr=/^tb|vertical/,br=/msie|trident/i.test(dr.navigator&&dr.navigator.userAgent),Or=function(e){return parseFloat(e||"0")},gr=function(e,r,t){return void 0===e&&(e=0),void 0===r&&(r=0),void 0===t&&(t=!1),new lr((t?r:e)||0,(t?e:r)||0)},mr=cr({devicePixelContentBoxSize:gr(),borderBoxSize:gr(),contentBoxSize:gr(),contentRect:new sr(0,0,0,0)}),jr=function(e,r){if(void 0===r&&(r=!1),hr.has(e)&&!r)return hr.get(e);if(ur(e))return hr.set(e,mr),mr;var t=getComputedStyle(e),n=fr(e)&&e.ownerSVGElement&&e.getBBox(),o=!br&&"border-box"===t.boxSizing,i=yr.test(t.writingMode||""),a=!n&&vr.test(t.overflowY||""),c=!n&&vr.test(t.overflowX||""),l=n?0:Or(t.paddingTop),s=n?0:Or(t.paddingRight),f=n?0:Or(t.paddingBottom),u=n?0:Or(t.paddingLeft),p=n?0:Or(t.borderTopWidth),d=n?0:Or(t.borderRightWidth),h=n?0:Or(t.borderBottomWidth),v=u+s,y=l+f,b=(n?0:Or(t.borderLeftWidth))+d,O=p+h,g=c?e.offsetHeight-O-e.clientHeight:0,m=a?e.offsetWidth-b-e.clientWidth:0,j=o?v+b:0,x=o?y+O:0,w=n?n.width:Or(t.width)-j-m,P=n?n.height:Or(t.height)-x-g,I=w+v+m+b,R=P+y+g+O,F=cr({devicePixelContentBoxSize:gr(Math.round(w*devicePixelRatio),Math.round(P*devicePixelRatio),i),borderBoxSize:gr(I,R,i),contentBoxSize:gr(w,P,i),contentRect:new sr(u,l,w,P)});return hr.set(e,F),F},xr=function(e,r,t){var n=jr(e,t),o=n.borderBoxSize,i=n.contentBoxSize,a=n.devicePixelContentBoxSize;switch(r){case We.DEVICE_PIXEL_CONTENT_BOX:return a;case We.BORDER_BOX:return o;default:return i}},wr=function(e){var r=jr(e);this.target=e,this.contentRect=r.contentRect,this.borderBoxSize=cr([r.borderBoxSize]),this.contentBoxSize=cr([r.contentBoxSize]),this.devicePixelContentBoxSize=cr([r.devicePixelContentBoxSize])},Pr=function(e){if(ur(e))return 1/0;for(var r=0,t=e.parentNode;t;)r+=1,t=t.parentNode;return r},Ir=function(){var e=1/0,r=[];or.forEach((function(t){if(0!==t.activeTargets.length){var n=[];t.activeTargets.forEach((function(r){var t=new wr(r.target),o=Pr(r.target);n.push(t),r.lastReportedSize=xr(r.target,r.observedBox),o<e&&(e=o)})),r.push((function(){t.callback.call(t.observer,n,t.observer)})),t.activeTargets.splice(0,t.activeTargets.length)}}));for(var t=0,n=r;t<n.length;t++){(0,n[t])()}return e},Rr=function(e){or.forEach((function(r){r.activeTargets.splice(0,r.activeTargets.length),r.skippedTargets.splice(0,r.skippedTargets.length),r.observationTargets.forEach((function(t){t.isActive()&&(Pr(t.target)>e?r.activeTargets.push(t):r.skippedTargets.push(t))}))}))},Fr=function(){var e,r=0;for(Rr(r);or.some((function(e){return e.activeTargets.length>0}));)r=Ir(),Rr(r);return or.some((function(e){return e.skippedTargets.length>0}))&&("function"==typeof ErrorEvent?e=new ErrorEvent("error",{message:ir}):((e=document.createEvent("Event")).initEvent("error",!1,!1),e.message=ir),window.dispatchEvent(e)),r>0},Sr=[],Cr=function(e){if(!ar){var r=0,t=document.createTextNode("");new MutationObserver((function(){return Sr.splice(0).forEach((function(e){return e()}))})).observe(t,{characterData:!0}),ar=function(){t.textContent=""+(r?r--:r++)}}Sr.push(e),ar()},_r=0,Er={attributes:!0,characterData:!0,childList:!0,subtree:!0},Nr=["resize","load","transitionend","animationend","animationstart","animationiteration","keyup","keydown","mouseup","mousedown","mouseover","mouseout","blur","focus"],Tr=function(e){return void 0===e&&(e=0),Date.now()+e},Ar=!1,kr=new(function(){function e(){var e=this;this.stopped=!0,this.listener=function(){return e.schedule()}}return e.prototype.run=function(e){var r=this;if(void 0===e&&(e=250),!Ar){Ar=!0;var t,n=Tr(e);t=function(){var t=!1;try{t=Fr()}finally{if(Ar=!1,e=n-Tr(),!_r)return;t?r.run(1e3):e>0?r.run(e):r.start()}},Cr((function(){requestAnimationFrame(t)}))}},e.prototype.schedule=function(){this.stop(),this.run()},e.prototype.observe=function(){var e=this,r=function(){return e.observer&&e.observer.observe(document.body,Er)};document.body?r():dr.addEventListener("DOMContentLoaded",r)},e.prototype.start=function(){var e=this;this.stopped&&(this.stopped=!1,this.observer=new MutationObserver(this.listener),this.observe(),Nr.forEach((function(r){return dr.addEventListener(r,e.listener,!0)})))},e.prototype.stop=function(){var e=this;this.stopped||(this.observer&&this.observer.disconnect(),Nr.forEach((function(r){return dr.removeEventListener(r,e.listener,!0)})),this.stopped=!0)},e}()),Mr=function(e){!_r&&e>0&&kr.start(),!(_r+=e)&&kr.stop()},Lr=function(){function e(e,r){this.target=e,this.observedBox=r||We.CONTENT_BOX,this.lastReportedSize={inlineSize:0,blockSize:0}}return e.prototype.isActive=function(){var e,r=xr(this.target,this.observedBox,!0);return e=this.target,fr(e)||function(e){switch(e.tagName){case"INPUT":if("image"!==e.type)break;case"VIDEO":case"AUDIO":case"EMBED":case"OBJECT":case"CANVAS":case"IFRAME":case"IMG":return!0}return!1}(e)||"inline"!==getComputedStyle(e).display||(this.lastReportedSize=r),this.lastReportedSize.inlineSize!==r.inlineSize||this.lastReportedSize.blockSize!==r.blockSize},e}(),Dr=function(e,r){this.activeTargets=[],this.skippedTargets=[],this.observationTargets=[],this.observer=e,this.callback=r},Br=new WeakMap,Kr=function(e,r){for(var t=0;t<e.length;t+=1)if(e[t].target===r)return t;return-1},Hr=function(){function e(){}return e.connect=function(e,r){var t=new Dr(e,r);Br.set(e,t)},e.observe=function(e,r,t){var n=Br.get(e),o=0===n.observationTargets.length;Kr(n.observationTargets,r)<0&&(o&&or.push(n),n.observationTargets.push(new Lr(r,t&&t.box)),Mr(1),kr.schedule())},e.unobserve=function(e,r){var t=Br.get(e),n=Kr(t.observationTargets,r),o=1===t.observationTargets.length;n>=0&&(o&&or.splice(or.indexOf(t),1),t.observationTargets.splice(n,1),Mr(-1))},e.disconnect=function(e){var r=this,t=Br.get(e);t.observationTargets.slice().forEach((function(t){return r.unobserve(e,t.target)})),t.activeTargets.splice(0,t.activeTargets.length)},e}(),Vr=function(){function e(e){if(0===arguments.length)throw new TypeError("Failed to construct 'ResizeObserver': 1 argument required, but only 0 present.");if("function"!=typeof e)throw new TypeError("Failed to construct 'ResizeObserver': The callback provided as parameter 1 is not a function.");Hr.connect(this,e)}return e.prototype.observe=function(e,r){if(0===arguments.length)throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': 1 argument required, but only 0 present.");if(!pr(e))throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': parameter 1 is not of type 'Element");Hr.observe(this,e,r)},e.prototype.unobserve=function(e){if(0===arguments.length)throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': 1 argument required, but only 0 present.");if(!pr(e))throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': parameter 1 is not of type 'Element");Hr.unobserve(this,e)},e.prototype.disconnect=function(){Hr.disconnect(this)},e.toString=function(){return"function ResizeObserver () { [polyfill code] }"},e}();function Wr(e){var t=r.useRef(null),n=r.useCallback((function(r){x(r,e),t.current=r}),[e]);return[t,n]}var zr,Ur=function(){return(Ur=Object.assign||function(e){for(var r,t=1,n=arguments.length;t<n;t++)for(var o in r=arguments[t])Object.prototype.hasOwnProperty.call(r,o)&&(e[o]=r[o]);return e}).apply(this,arguments)},qr=function(e,r){var t="function"==typeof Symbol&&e[Symbol.iterator];if(!t)return e;var n,o,i=t.call(e),a=[];try{for(;(void 0===r||r-- >0)&&!(n=i.next()).done;)a.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(t=i.return)&&t.call(i)}finally{if(o)throw o.error}}return a};function Gr(e,r){return!e||e.height!==r.height||e.scrollHeight!==r.scrollHeight}function Xr(e,r){return!e||e.width!==r.width||e.scrollWidth!==r.scrollWidth}var Yr=[];function Jr(e,r){void 0===r&&(r={});var t=r.ref,n=r.disableWidth,o=void 0!==n&&n,i=r.disableHeight,a=void 0!==i&&i,c=qr(Wr(t),2),l=c[0],s=c[1];return ue((function(){var r=l.current;if(!(a&&o||!r))return zr||"undefined"==typeof document||(zr=new Vr((function(e){for(var r=function(r){var t=e[r],n=Yr.filter((function(e){return e.target===t.target}));if(!n.length)return{value:void 0};for(var o=t.contentRect,i=o.height,a=o.width,c=t.target,l={height:i,width:a,scrollHeight:c.scrollHeight,scrollWidth:c.scrollWidth},s=0;s<n.length;s+=1){var f=n[s],u=f.handler,p=f.prevSize,d=f.disableHeight,h=f.disableWidth,v=Gr(p,l),y=Xr(p,l);(v&&!d||y&&!h)&&(f.prevSize=l,u(Ur(Ur({},l),{element:t.target})))}},t=0;t<e.length;t+=1){var n=r(t);if("object"==typeof n)return n.value}}))),function(e,r,t,n){var o=Yr.find((function(r){return r.target===e}));Yr.push({target:e,handler:r,disableWidth:n,disableHeight:t,prevSize:void 0}),o||null==zr||zr.observe(e)}(r,e,a,o),function(){!function(e,r,t,n){var o=Yr.findIndex((function(o){return o.target===e&&o.handler===r&&o.disableWidth===n&&o.disableHeight===t}));-1!==o&&Yr.splice(o,1),Yr.some((function(r){return r.target===e}))||null==zr||zr.unobserve(e)}(r,e,a,o)}}),[a,o,e]),[l,s]}var Qr={height:void 0,width:void 0};var Zr=function(){return(Zr=Object.assign||function(e){for(var r,t=1,n=arguments.length;t<n;t++)for(var o in r=arguments[t])Object.prototype.hasOwnProperty.call(r,o)&&(e[o]=r[o]);return e}).apply(this,arguments)},$r=function(e,r){var t="function"==typeof Symbol&&e[Symbol.iterator];if(!t)return e;var n,o,i=t.call(e),a=[];try{for(;(void 0===r||r-- >0)&&!(n=i.next()).done;)a.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(t=i.return)&&t.call(i)}finally{if(o)throw o.error}}return a},et="--rmd-cell-size",rt="--rmd-cell-margin",tt=r.createContext({columns:-1,cellWidth:-1}),nt=tt.Provider;function ot(e){var t,n=void 0===e?{}:e,o=n.ref,i=n.style,a=n.className,c=n.cellMargin,l=n.defaultSize,s=n.maxCellSize,f=void 0===s?150:s,u=n.disableHeight,p=void 0!==u&&u,d=n.disableWidth,h=void 0!==d&&d,v=n.containerPadding,y=void 0===v?16:v,O=$r(Wr(o),2),g=O[0],m=O[1],j=$r(r.useState(l||{columns:-1,cellWidth:f}),2),x=j[0],w=j[1],P=r.useCallback((function(){var e=g.current;if(e){var r=e.getBoundingClientRect().width;r-=y,e.offsetHeight<e.scrollHeight&&(r-=function(e,r){if(void 0===e&&(e="width"),void 0===r&&(r=!1),"undefined"==typeof window)return-1;var t=Qr[e];if(!r&&"number"==typeof t)return t;var n=document.createElement("div");n.style.visibility="hidden",n.style.overflow="scroll",document.body.appendChild(n);var o=document.createElement("div");n.appendChild(o);var i="width"===e?"offsetWidth":"offsetHeight";return t=n[i]-o[i],Qr[e]=t,document.body.removeChild(n),t}("width"));var t=Math.ceil(r/f);w({cellWidth:r/t,columns:t})}}),[y,f,g]),I=$r(Jr(P,{ref:m,disableHeight:p,disableWidth:h}),2)[1],R=Zr(Zr({},i),((t={})[et]="".concat(x.cellWidth,"px"),t));return c&&(R[rt]=c),[{ref:I,style:R,className:b("rmd-grid-list",a)},x]}var it=function(){return(it=Object.assign||function(e){for(var r,t=1,n=arguments.length;t<n;t++)for(var o in r=arguments[t])Object.prototype.hasOwnProperty.call(r,o)&&(e[o]=r[o]);return e}).apply(this,arguments)},at=function(e,r){var t={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&r.indexOf(n)<0&&(t[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(e);o<n.length;o++)r.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(t[n[o]]=e[n[o]])}return t},ct=function(e,r){var t="function"==typeof Symbol&&e[Symbol.iterator];if(!t)return e;var n,o,i=t.call(e),a=[];try{for(;(void 0===r||r-- >0)&&!(n=i.next()).done;)a.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(t=i.return)&&t.call(i)}finally{if(o)throw o.error}}return a},lt=r.forwardRef((function(e,t){var n=e.style,o=e.className,i=e.children,a=e.clone,l=void 0!==a&&a,s=e.wrapOnly,f=void 0!==s&&s,u=e.cellMargin,p=e.defaultSize,d=e.maxCellSize,h=void 0===d?150:d,v=e.containerPadding,y=void 0===v?16:v,b=e.disableHeightObserver,O=void 0!==b&&b,g=e.disableWidthObserver,m=void 0!==g&&g,j=at(e,["style","className","children","clone","wrapOnly","cellMargin","defaultSize","maxCellSize","containerPadding","disableHeightObserver","disableWidthObserver"]),x=ct(ot({ref:t,style:n,className:o,cellMargin:u,defaultSize:p,maxCellSize:h,containerPadding:y,disableHeight:O,disableWidth:m}),2),w=x[0],P=x[1],I=null;return I=function(e){return"function"==typeof e}(i)?i(P):l||f?r.Children.map(i,(function(e){return e&&c.exports.jsx(nr,it({clone:l},{children:e}),void 0)})):i,c.exports.jsx(nt,it({value:P},{children:c.exports.jsx("div",it({},j,w,{children:I}),void 0)}),void 0)}));function st(e){var r=e.value,t=e.min,n=void 0===t?0:t,o=e.max,i=e.increment,a=e.minmax,c=r+(i?1:-1);return void 0!==a&&a?c=Math.min(o,Math.max(n,c)):c>o?c=n:c<n&&(c=o),c}function ft(e,r,t,n,o){void 0===o&&(o=t-r);var i=Math.round((e-r)*n/o)/n,a=Math.min(Math.max(i,0),1),c=o/n,l=Number.isInteger(c)?o%n:c.toString().split(".")[1].length;return Math.min(t,Math.max(r,parseFloat((a*o+r).toFixed(l))))}function ut(e,r){if(!r.length)return e;var t={};for(var n in e)r.includes(n)||(t[n]=e[n]);return t}function pt(e){if(!e)return null;if(/(tree|list)item/.test(e.getAttribute("role")||"")){if(t=e.querySelector(".rmd-tree-item__content, .rmd-item-text"))return t}else if("file"===e.getAttribute("type")){var r=document.querySelector('[for="'.concat(e.id,'"]'));if(r)return r}var t,n=e.getAttribute("data-sizing-selector");if(n&&(t=e.querySelector(n)))return t;return e}function dt(e){var r=document.documentElement||{clientHeight:0,clientWidth:0};return"width"===e?window.innerWidth||r.clientWidth:window.innerHeight||r.clientHeight}function ht(e){return"number"==typeof e?"".concat(e,"px"):""}function vt(e,r){void 0===r&&(r={});var t=e.cloneNode(!0);t.removeAttribute("id"),t.removeAttribute("role"),t.style.position="fixed",t.style.visibility="hidden",t.style.left=ht(r.left),t.style.top=ht(r.top),t.style.right=ht(r.right),t.style.bottom=ht(r.bottom),t.style.webkitTransform="none",t.style.transform="none";var n=e.parentElement||document.body;n.appendChild(t);var o=t.getBoundingClientRect();return n.removeChild(t),o}var yt={x:"center",y:"above"},bt={x:"inner-left",y:"top"},Ot={x:"inner-right",y:"top"},gt={x:"right",y:"top"},mt={x:"left",y:"center"},jt={x:"center",y:"center"},xt={x:"right",y:"center"},wt={x:"center",y:"below"},Pt={x:"inner-right",y:"below"};function It(e){var r=e.xMargin,t=e.elWidth,n=e.initialX,o=e.containerRect;return(null!=n?n:o.left)-t-r}function Rt(e){var r=e.xMargin,t=e.initialX,n=e.containerRect;return(null!=t?t:n.left)+r}function Ft(e){var r=e.xMargin,t=e.elWidth,n=e.initialX,o=e.containerRect;return(null!=n?n:o.left+o.width)-t-r}function St(e){var r=e.xMargin,t=e.initialX,n=e.containerRect;return(null!=t?t:n.left+n.width)+r}function Ct(e){var r=e.yMargin,t=e.initialY,n=e.elHeight,o=e.containerRect;return(null!=t?t:o.top)-n-r}function _t(e){var r=e.yMargin,t=e.initialY,n=e.containerRect;return(null!=t?t:n.top)+r}function Et(e){var r=e.yMargin,t=e.initialY,n=e.elHeight,o=e.containerRect;return(null!=t?t:o.top+o.height)-n-r}function Nt(e){var r=e.yMargin,t=e.initialY,n=e.containerRect;return(null!=t?t:n.top+n.height)+r}function Tt(e){var r=e.x,t=e.vw,n=e.vwMargin,o=e.xMargin,i=e.width,a=e.elWidth,c=e.initialX,l=e.containerRect,s=e.disableSwapping;if("min"===i||"equal"===i)return function(e){var r,t,n=e.x,o=e.vw,i=e.elWidth,a=e.xMargin,c=e.vwMargin,l=e.initialX,s=e.containerRect,f=e.isMinWidth,u=null!=l?l:s.left+a,p=s.width-2*a;return f&&(r=p,p=void 0,u+i>o-c&&(t=c)),{left:u,right:t,width:p,minWidth:r,actualX:n}}({x:r,vw:t,vwMargin:n,xMargin:o,elWidth:a,initialX:c,containerRect:l,isMinWidth:"min"===i});if(a>t-2*n)return{left:n,right:n,actualX:r};var f={vwMargin:n,xMargin:o,elWidth:a,initialX:c,screenRight:t-n,containerRect:l,disableSwapping:s};switch(r){case"left":return function(e){var r=e.vwMargin,t=e.screenRight,n=e.elWidth,o=e.disableSwapping,i=It(e),a="left";if(i>=r)return{actualX:a,left:i};var c=St(e);return o||c+n>t?i=r:(i=c,a="right"),{actualX:a,left:i}}(f);case"inner-left":return function(e){var r=e.vwMargin,t=e.screenRight,n=e.elWidth,o=e.disableSwapping,i=Rt(e),a="inner-left";if(i+n<=t)return{actualX:a,left:i};var c=Ft(e);return o||c<r?i=r:(i=c,a="inner-right"),{actualX:a,left:i}}(f);case"center":return function(e){var r=e.vwMargin,t=e.screenRight,n=e.elWidth,o=function(e){var r=e.elWidth,t=e.initialX,n=e.containerRect,o=n.width/2,i=r/2;return(null!=t?t:n.left+o)-i}(e);return o<r?o=r:(o+n>t||o<r)&&(o=t-n),{actualX:"center",left:o}}(f);case"inner-right":return function(e){var r=e.screenRight,t=e.vwMargin,n=e.elWidth,o=e.disableSwapping,i=Ft(e),a="inner-right";if(i>=t)return{actualX:a,left:i};var c=Rt(e);return o||c+n>r?i=r-n:(i=c,a="inner-left"),{actualX:a,left:i}}(f);case"right":return function(e){var r=e.screenRight,t=e.vwMargin,n=e.elWidth,o=e.disableSwapping,i=St(e),a="right";if(i+n<=r)return{actualX:a,left:i};var c=It(e);return o||c<t?i=r-n:(i=c,a="left"),{actualX:a,left:i}}(f);default:throw new Error("This should never happen")}}function At(e){var r=e.y,t=e.vh,n=e.vhMargin,o=e.yMargin,i=e.elHeight,a=e.initialY,c=e.containerRect,l=e.disableSwapping,s=e.preventOverlap,f=e.disableVHBounds;if(!f&&!s&&i>t-2*n)return{top:n,bottom:n,actualY:"center"};var u={vhMargin:n,yMargin:o,elHeight:i,initialY:a,containerRect:c,screenBottom:t-n,preventOverlap:s,disableSwapping:l,disableVHBounds:f};switch(r){case"above":return function(e){var r=e.yMargin,t=e.vhMargin,n=e.screenBottom,o=e.elHeight,i=e.containerRect,a=e.preventOverlap,c=e.disableSwapping,l=e.disableVHBounds,s=Ct(e),f="above";if(l)return{actualY:f,top:Math.max(0,s)};if(s>t)return{actualY:f,top:s};var u,p=Nt(e);return c||p+o>n?s=t:(f="below",s=p),a&&"above"===f&&s+o>i.top&&(u=window.innerHeight-i.top+r),{actualY:f,top:s,bottom:u}}(u);case"top":return function(e){var r=e.vhMargin,t=e.screenBottom,n=e.elHeight,o=e.disableSwapping,i=e.disableVHBounds,a=_t(e),c="top";if(i||a+n<=t)return{actualY:c,top:a};var l=Et(e);return o||l<r?a=r:(c="bottom",a=l),{actualY:c,top:a}}(u);case"center":return function(e){var r=e.vhMargin,t=e.screenBottom,n=e.elHeight,o=e.disableVHBounds,i=function(e){var r=e.elHeight,t=e.initialY,n=e.containerRect,o=n.height/2,i=r/2;return(null!=t?t:n.top+o)-i}(e),a="center";return o?{actualY:a,top:Math.max(0,i)}:((i=Math.max(r,i))+n>t&&(i=t-n),{actualY:a,top:i})}(u);case"bottom":return function(e){var r=e.vhMargin,t=e.screenBottom,n=e.elHeight,o=e.disableSwapping,i=e.disableVHBounds,a=Et(e),c="bottom";if(i||a>r)return{actualY:c,top:a};var l=_t(e);return o||l+n>t?a=t-n:(c="top",a=l),{actualY:c,top:a}}(u);case"below":return function(e){var r=e.yMargin,t=e.vhMargin,n=e.elHeight,o=e.screenBottom,i=e.containerRect,a=e.preventOverlap,c=e.disableSwapping,l=e.disableVHBounds,s=Nt(e),f="below";if(l||s+n<=o)return{actualY:f,top:s};if(a){var u=i.top-r;return c||u<o-s?{actualY:f,top:s,bottom:t}:{actualY:"above",top:Math.max(t,u-n),bottom:dt("height")-u}}var p=Ct(e);return c||p<t?s=o-n:(f="above",s=p),{actualY:f,top:s}}(u);default:throw new Error("This should never happen")}}function kt(e){var r="0";switch(e.x){case"right":case"inner-left":r="0";break;case"center":r="50%";break;case"left":case"inner-right":r="100%";break;default:r="0"}var t="0";switch(e.y){case"above":case"bottom":t="100%";break;case"center":t="50%";break;case"below":case"top":t="0";break;default:t="0"}return"".concat(r," ").concat(t)}function Mt(e){var r=e.container,t=e.element,n=e.anchor,o=void 0===n?wt:n,i=e.initialX,a=e.initialY,c=e.vwMargin,l=void 0===c?16:c,s=e.vhMargin,f=void 0===s?16:s,u=e.xMargin,p=void 0===u?0:u,d=e.yMargin,h=void 0===d?0:d,v=e.width,y=void 0===v?"auto":v,b=e.preventOverlap,O=void 0!==b&&b,g=e.transformOrigin,m=void 0!==g&&g,j=e.disableSwapping,x=void 0!==j&&j,w=e.disableVHBounds,P=void 0!==w&&w;if(!(r=pt(r))||!t)return{actualX:o.x,actualY:o.y};var I=r.getBoundingClientRect(),R=dt("height"),F=dt("width"),S=vt(t),C=S.height,_=S.width;P&&(t.closest("[role='dialog']")||(a=(null!=a?a:0)+window.scrollY));var E=Tt({x:o.x,vw:F,vwMargin:l,xMargin:p,width:y,elWidth:_,initialX:i,containerRect:I,disableSwapping:x}),N=E.left,T=E.right,A=E.width,k=E.minWidth,M=E.actualX,L=At({y:o.y,vh:R,vhMargin:f,yMargin:h,initialY:a,elHeight:C,containerRect:I,disableSwapping:x,preventOverlap:O,disableVHBounds:P}),D=L.top,B=L.bottom,K=L.actualY;return{actualX:M,actualY:K,style:{left:N,top:D,right:T,bottom:B,width:A,minWidth:k,position:P?"absolute":"fixed",transformOrigin:m?kt({x:M,y:K}):void 0}}}function Lt(e,r){if(r=pt(r),e&&r){var t=r.offsetTop;r.offsetParent!==e&&(t-=e.offsetTop);var n=t+r.offsetHeight;n>e.offsetHeight+e.scrollTop?e.scrollTop=n-e.offsetHeight:t<e.scrollTop&&(e.scrollTop=t)}}function Dt(e,r,t,n){e=e.toUpperCase();for(var o=t;o<n;o+=1){if(0===r[o].toUpperCase().indexOf(e))return o}return-1}function Bt(e,r,t,n){void 0===n&&(n=!0);var o=Dt(e,r,t+1,r.length);-1===o&&(o=Dt(e,r,0,t+(n?1:0)));return o}function Kt(e,r,t,n){return void 0===r&&(r=!1),void 0===t&&(t=!1),void 0===n&&(n=!1),r&&(e=e.toLowerCase()),n?e=e.replace(/\s/g,""):t&&(e=e.trim()),e}function Ht(e,r){switch(void 0===r&&(r="value"),typeof e){case"string":return e;case"number":return Number.isNaN(e)?"":"".concat(e);case"function":return Ht(e(),r);case"object":return e?Ht(e[r],r):"";default:return""}}var Vt=Ht,Wt="value",zt={getItemValue:Vt,valueKey:Wt,trim:true,ignoreWhitespace:false};function Ut(e,r,t){void 0===t&&(t={});var n=k(t,zt),o=n.getItemValue,i=n.valueKey,a=n.trim,c=n.ignoreWhitespace,l=n.startsWith,s=void 0!==l&&l;return(e=Kt(e,!0,a,c))&&r.length?r.filter((function(r){var t=Kt(o(r,i),!0,a,c);return s?0===t.indexOf(e):-1!==t.indexOf(e)})):r}function qt(e){return new RegExp("".concat(e).split("").join("\\w*").replace(/(\(|\||\)|\\(?!w\*)|\[|\|-|\.|\^|\+|\$|\?|^(?!w)\*)/g,"\\$1").replace(/\*\*/g,"*\\*"),"i")}function Gt(e,r,t){void 0===t&&(t={});var n=k(t,zt),o=n.getItemValue,i=n.valueKey,a=n.trim,c=n.ignoreWhitespace;if(e=Kt(e,!1,a,c),!r.length||!e)return r;var l=qt(e);return r.filter((function(e){var r=Kt(o(e,i),!1,a,c);return r.length&&r.match(l)}))}function Xt(e,t){void 0===t&&(t=500);var n=r.useRef(e),o=r.useRef(),i=r.useCallback((function(){window.clearTimeout(o.current),n.current=e}),[e]),a=r.useCallback((function(e){n.current=e,window.clearTimeout(o.current),o.current=window.setTimeout(i,t)}),[t,i]);return[n,a,i]}var Yt=function(e,r){var t="function"==typeof Symbol&&e[Symbol.iterator];if(!t)return e;var n,o,i=t.call(e),a=[];try{for(;(void 0===r||r-- >0)&&!(n=i.next()).done;)a.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(t=i.return)&&t.call(i)}finally{if(o)throw o.error}}return a};function Jt(e){var t=e.items,n=e.onChange,o=e.onKeyDown,i=e.resetTime,a=void 0===i?500:i,c=e.searchIndex,l=e.valueKey,s=void 0===l?Wt:l,f=e.getItemValue,u=void 0===f?Vt:f,p=e.findMatchIndex,d=void 0===p?Bt:p,h=Yt(Xt("",a),2),v=h[0],y=h[1],b=r.useMemo((function(){return t.map((function(e){return u(e,s)}))}),[t,u,s]);return r.useCallback((function(e){o&&o(e);var r=e.key,i=e.altKey,a=e.ctrlKey,l=e.metaKey;if(!(i||a||l||r.length>1||!v.current&&" "===r)){var s=r;v.current!==r&&(s="".concat(v.current).concat(r)),y(s);var f=d(s,b,c,!0);if(f!==c&&-1!==f){var u={index:f,item:t[f],items:t,query:s,target:e.currentTarget};n(u)}}}),[c,d,t,n,o,y,v,b])}var Qt=function(){return(Qt=Object.assign||function(e){for(var r,t=1,n=arguments.length;t<n;t++)for(var o in r=arguments[t])Object.prototype.hasOwnProperty.call(r,o)&&(e[o]=r[o]);return e}).apply(this,arguments)};function Zt(e){var t=e.children,n=e.onChange,o=e.phoneMaxWidth,i=void 0===o?Fe:o,a=e.tabletMinWidth,l=void 0===a?Ie:a,s=e.tabletMaxWidth,f=void 0===s?Re:s,u=e.desktopMinWidth,p=void 0===u?Pe:u,d=e.desktopLargeMinWidth,h=void 0===d?Se:d,v=e.defaultSize,y=void 0===v?Le:v,b=De({phoneMaxWidth:i,tabletMaxWidth:f,tabletMinWidth:l,desktopMinWidth:p,desktopLargeMinWidth:h,defaultSize:y}),O=r.useRef(b);r.useEffect((function(){!n||y.isPhone===b.isPhone&&y.isTablet===b.isTablet&&y.isDesktop===b.isDesktop&&y.isLargeDesktop===b.isLargeDesktop&&y.isLandscape===b.isLandscape||n(b,y)}),[]),r.useEffect((function(){O.current!==b&&(n&&n(b,O.current),O.current=b)}));var g=r.useMemo((function(){return Qt(Qt({},b),{__initialized:!0})}),[b]);return c.exports.jsx(He.Provider,Qt({value:g},{children:t}),void 0)}function $t(e){var t=e.onResize,n=e.options,o=e.immediate,i=e.enabled,a=void 0===i||i,c=$(t);r.useEffect((function(){if(a){var e=J("resize",window,!0,n),r=function(e){return c.current(e)};return e.add(r),o&&"undefined"!=typeof window&&window.dispatchEvent(new UIEvent("resize")),function(){e.remove(r)}}}),[n,a])}var en=function(e,r){var t="function"==typeof Symbol&&e[Symbol.iterator];if(!t)return e;var n,o,i=t.call(e),a=[];try{for(;(void 0===r||r-- >0)&&!(n=i.next()).done;)a.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(t=i.return)&&t.call(i)}finally{if(o)throw o.error}}return a},rn=function(e,r,t){if(t||2===arguments.length)for(var n,o=0,i=r.length;o<i;o++)!n&&o in r||(n||(n=Array.prototype.slice.call(r,0,o)),n[o]=r[o]);return e.concat(n||Array.prototype.slice.call(r))};function tn(e,r){void 0===r&&(r={});var t=r.fontSizeFallback,n=void 0===t?16:t,o=r.element;if("number"==typeof e)return e;var i=parseFloat(e);if(/px$/.test(e))return i;if("undefined"==typeof document)return i*n;var a=/rem$/.test(e),c=document.documentElement;return!a&&o&&(c=o.parentElement||o),i*parseFloat(window.getComputedStyle(c).fontSize||"".concat(n,"px"))}function nn(e){return e?void 0!==e.current?e.current:e:null}function on(e){var t=e.enabled,n=e.element,o=e.onOutsideClick;r.useEffect((function(){if(t)return window.addEventListener("click",e),function(){window.removeEventListener("click",e)};function e(e){var r