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