@twilio-paste/modal-dialog-primitive
Advanced tools
Comparing version 0.1.2 to 0.1.3
@@ -6,2 +6,10 @@ # Change Log | ||
## [0.1.3](https://github.com/twilio-labs/paste/compare/@twilio-paste/modal-dialog-primitive@0.1.2...@twilio-paste/modal-dialog-primitive@0.1.3) (2020-05-01) | ||
**Note:** Version bump only for package @twilio-paste/modal-dialog-primitive | ||
## [0.1.2](https://github.com/twilio-labs/paste/compare/@twilio-paste/modal-dialog-primitive@0.1.1...@twilio-paste/modal-dialog-primitive@0.1.2) (2020-03-17) | ||
@@ -8,0 +16,0 @@ |
@@ -1,3 +0,3 @@ | ||
import e,{useMemo as n,useRef as t,useState as r,createElement as o,useCallback as i,PureComponent as a,forwardRef as u,Fragment as c,cloneElement as l,Children as s,useEffect as f}from"react";import{createPortal as d}from"react-dom";process.env.NODE_ENV;var p=b()?e.useLayoutEffect:e.useEffect,v={},y=function(e){};if("production"!==process.env.NODE_ENV){var m=("undefined"!=typeof process?process:{env:{NODE_ENV:"development"}}).env;y=function(e){v[e]||(v[e]=!0,"test"!==m.NODE_ENV&&1!==parseInt(window.getComputedStyle(document.body).getPropertyValue("--reach-"+e),10)&&console.warn("@reach/"+e+' styles not found. If you are using a bundler like webpack or parcel include this in the entry file of your app before any of your own styles:\n\n import "@reach/'+e+'/styles.css";\n\n Otherwise you\'ll need to include them some other way:\n\n <link rel="stylesheet" type="text/css" href="node_modules/@reach/'+e+'/styles.css" />\n\n For more information visit https://ui.reach.tech/styling.\n '))}}function h(e,n){if(null!=e)if(function(e){return!(!e||"[object Function]"!={}.toString.call(e))}(e))e(n);else try{e.current=n}catch(t){throw new Error('Cannot assign value "'+n+'" to ref "'+e+'"')}}function b(){return"undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement}function g(){}function w(e,n){return function(t){if(e&&e(t),!t.defaultPrevented)return n(t)}}var E=function(n){var o=n.children,i=n.type,a=void 0===i?"reach-portal":i,u=t(null),c=t(null),l=r()[1];return p((function(){var e=u.current.ownerDocument;return c.current=null==e?void 0:e.createElement(a),e.body.appendChild(c.current),l({}),function(){c.current&&c.current.ownerDocument&&c.current.ownerDocument.body.removeChild(c.current)}}),[a]),c.current?d(o,c.current):e.createElement("span",{ref:u})};function O(){return(O=Object.assign||function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])}return e}).apply(this,arguments)}function S(e,n){return e(n={exports:{}},n.exports),n.exports | ||
/** @license React v16.13.0 | ||
import e,{useMemo as n,useRef as t,useState as r,createElement as o,Fragment as i,forwardRef as a,useCallback as u,useEffect as c,PureComponent as l,cloneElement as s,Children as f}from"react";import{createPortal as d}from"react-dom";process.env.NODE_ENV;var p=b()?e.useLayoutEffect:e.useEffect,v={},y=function(e){};if("production"!==process.env.NODE_ENV){var m=("undefined"!=typeof process?process:{env:{NODE_ENV:"development"}}).env;y=function(e){v[e]||(v[e]=!0,"test"!==m.NODE_ENV&&1!==parseInt(window.getComputedStyle(document.body).getPropertyValue("--reach-"+e),10)&&console.warn("@reach/"+e+' styles not found. If you are using a bundler like webpack or parcel include this in the entry file of your app before any of your own styles:\n\n import "@reach/'+e+'/styles.css";\n\n Otherwise you\'ll need to include them some other way:\n\n <link rel="stylesheet" type="text/css" href="node_modules/@reach/'+e+'/styles.css" />\n\n For more information visit https://ui.reach.tech/styling.\n '))}}function h(e,n){if(null!=e)if(function(e){return!(!e||"[object Function]"!={}.toString.call(e))}(e))e(n);else try{e.current=n}catch(t){throw new Error('Cannot assign value "'+n+'" to ref "'+e+'"')}}function b(){return"undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement}function g(){}function w(e,n){return function(t){if(e&&e(t),!t.defaultPrevented)return n(t)}}var E=function(n){var o=n.children,i=n.type,a=void 0===i?"reach-portal":i,u=t(null),c=t(null),l=r()[1];return p((function(){var e=u.current.ownerDocument;return c.current=null==e?void 0:e.createElement(a),e.body.appendChild(c.current),l({}),function(){c.current&&c.current.ownerDocument&&c.current.ownerDocument.body.removeChild(c.current)}}),[a]),c.current?d(o,c.current):e.createElement("span",{ref:u})};function O(){return(O=Object.assign||function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])}return e}).apply(this,arguments)}function S(e,n){return e(n={exports:{}},n.exports),n.exports | ||
/** @license React v16.13.1 | ||
* react-is.production.min.js | ||
@@ -9,3 +9,3 @@ * | ||
* LICENSE file in the root directory of this source tree. | ||
*/}"production"!==process.env.NODE_ENV&&(E.displayName="Portal");var x="function"==typeof Symbol&&Symbol.for,N=x?Symbol.for("react.element"):60103,P=x?Symbol.for("react.portal"):60106,C=x?Symbol.for("react.fragment"):60107,T=x?Symbol.for("react.strict_mode"):60108,k=x?Symbol.for("react.profiler"):60114,j=x?Symbol.for("react.provider"):60109,D=x?Symbol.for("react.context"):60110,I=x?Symbol.for("react.async_mode"):60111,M=x?Symbol.for("react.concurrent_mode"):60111,_=x?Symbol.for("react.forward_ref"):60112,F=x?Symbol.for("react.suspense"):60113,A=x?Symbol.for("react.suspense_list"):60120,$=x?Symbol.for("react.memo"):60115,R=x?Symbol.for("react.lazy"):60116,L=x?Symbol.for("react.block"):60121,V=x?Symbol.for("react.fundamental"):60117,B=x?Symbol.for("react.responder"):60118,W=x?Symbol.for("react.scope"):60119;function q(e){if("object"==typeof e&&null!==e){var n=e.$$typeof;switch(n){case N:switch(e=e.type){case I:case M:case C:case k:case T:case F:return e;default:switch(e=e&&e.$$typeof){case D:case _:case R:case $:case j:return e;default:return n}}case P:return n}}}function Y(e){return q(e)===M}var z={AsyncMode:I,ConcurrentMode:M,ContextConsumer:D,ContextProvider:j,Element:N,ForwardRef:_,Fragment:C,Lazy:R,Memo:$,Portal:P,Profiler:k,StrictMode:T,Suspense:F,isAsyncMode:function(e){return Y(e)||q(e)===I},isConcurrentMode:Y,isContextConsumer:function(e){return q(e)===D},isContextProvider:function(e){return q(e)===j},isElement:function(e){return"object"==typeof e&&null!==e&&e.$$typeof===N},isForwardRef:function(e){return q(e)===_},isFragment:function(e){return q(e)===C},isLazy:function(e){return q(e)===R},isMemo:function(e){return q(e)===$},isPortal:function(e){return q(e)===P},isProfiler:function(e){return q(e)===k},isStrictMode:function(e){return q(e)===T},isSuspense:function(e){return q(e)===F},isValidElementType:function(e){return"string"==typeof e||"function"==typeof e||e===C||e===M||e===k||e===T||e===F||e===A||"object"==typeof e&&null!==e&&(e.$$typeof===R||e.$$typeof===$||e.$$typeof===j||e.$$typeof===D||e.$$typeof===_||e.$$typeof===V||e.$$typeof===B||e.$$typeof===W||e.$$typeof===L)},typeOf:q},U=S((function(e,n){"production"!==process.env.NODE_ENV&&function(){var e="function"==typeof Symbol&&Symbol.for,t=e?Symbol.for("react.element"):60103,r=e?Symbol.for("react.portal"):60106,o=e?Symbol.for("react.fragment"):60107,i=e?Symbol.for("react.strict_mode"):60108,a=e?Symbol.for("react.profiler"):60114,u=e?Symbol.for("react.provider"):60109,c=e?Symbol.for("react.context"):60110,l=e?Symbol.for("react.async_mode"):60111,s=e?Symbol.for("react.concurrent_mode"):60111,f=e?Symbol.for("react.forward_ref"):60112,d=e?Symbol.for("react.suspense"):60113,p=e?Symbol.for("react.suspense_list"):60120,v=e?Symbol.for("react.memo"):60115,y=e?Symbol.for("react.lazy"):60116,m=e?Symbol.for("react.block"):60121,h=e?Symbol.for("react.fundamental"):60117,b=e?Symbol.for("react.responder"):60118,g=e?Symbol.for("react.scope"):60119;function w(e){if("object"==typeof e&&null!==e){var n=e.$$typeof;switch(n){case t:var p=e.type;switch(p){case l:case s:case o:case a:case i:case d:return p;default:var m=p&&p.$$typeof;switch(m){case c:case f:case y:case v:case u:return m;default:return n}}case r:return n}}}var E=l,O=s,S=c,x=u,N=t,P=f,C=o,T=y,k=v,j=r,D=a,I=i,M=d,_=!1;function F(e){return w(e)===s}n.AsyncMode=E,n.ConcurrentMode=O,n.ContextConsumer=S,n.ContextProvider=x,n.Element=N,n.ForwardRef=P,n.Fragment=C,n.Lazy=T,n.Memo=k,n.Portal=j,n.Profiler=D,n.StrictMode=I,n.Suspense=M,n.isAsyncMode=function(e){return _||(_=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")),F(e)||w(e)===l},n.isConcurrentMode=F,n.isContextConsumer=function(e){return w(e)===c},n.isContextProvider=function(e){return w(e)===u},n.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===t},n.isForwardRef=function(e){return w(e)===f},n.isFragment=function(e){return w(e)===o},n.isLazy=function(e){return w(e)===y},n.isMemo=function(e){return w(e)===v},n.isPortal=function(e){return w(e)===r},n.isProfiler=function(e){return w(e)===a},n.isStrictMode=function(e){return w(e)===i},n.isSuspense=function(e){return w(e)===d},n.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===o||e===s||e===a||e===i||e===d||e===p||"object"==typeof e&&null!==e&&(e.$$typeof===y||e.$$typeof===v||e.$$typeof===u||e.$$typeof===c||e.$$typeof===f||e.$$typeof===h||e.$$typeof===b||e.$$typeof===g||e.$$typeof===m)},n.typeOf=w}()})),G=(U.AsyncMode,U.ConcurrentMode,U.ContextConsumer,U.ContextProvider,U.Element,U.ForwardRef,U.Fragment,U.Lazy,U.Memo,U.Portal,U.Profiler,U.StrictMode,U.Suspense,U.isAsyncMode,U.isConcurrentMode,U.isContextConsumer,U.isContextProvider,U.isElement,U.isForwardRef,U.isFragment,U.isLazy,U.isMemo,U.isPortal,U.isProfiler,U.isStrictMode,U.isSuspense,U.isValidElementType,U.typeOf,S((function(e){"production"===process.env.NODE_ENV?e.exports=z:e.exports=U}))),X=Object.getOwnPropertySymbols,Z=Object.prototype.hasOwnProperty,H=Object.prototype.propertyIsEnumerable;function K(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}var J=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 n={},t=0;t<10;t++)n["_"+String.fromCharCode(t)]=t;if("0123456789"!==Object.getOwnPropertyNames(n).map((function(e){return n[e]})).join(""))return!1;var r={};return"abcdefghijklmnopqrst".split("").forEach((function(e){r[e]=e})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},r)).join("")}catch(e){return!1}}()?Object.assign:function(e,n){for(var t,r,o=K(e),i=1;i<arguments.length;i++){for(var a in t=Object(arguments[i]))Z.call(t,a)&&(o[a]=t[a]);if(X){r=X(t);for(var u=0;u<r.length;u++)H.call(t,r[u])&&(o[r[u]]=t[r[u]])}}return o},Q="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",ee=function(){};if("production"!==process.env.NODE_ENV){var ne=Q,te={},re=Function.call.bind(Object.prototype.hasOwnProperty);ee=function(e){var n="Warning: "+e;"undefined"!=typeof console&&console.error(n);try{throw new Error(n)}catch(e){}}}function oe(e,n,t,r,o){if("production"!==process.env.NODE_ENV)for(var i in e)if(re(e,i)){var a;try{if("function"!=typeof e[i]){var u=Error((r||"React class")+": "+t+" type `"+i+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof e[i]+"`.");throw u.name="Invariant Violation",u}a=e[i](n,i,r,t,null,ne)}catch(e){a=e}if(!a||a instanceof Error||ee((r||"React class")+": type specification of "+t+" `"+i+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof a+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),a instanceof Error&&!(a.message in te)){te[a.message]=!0;var c=o?o():"";ee("Failed "+t+" type: "+a.message+(null!=c?c:""))}}}oe.resetWarningCache=function(){"production"!==process.env.NODE_ENV&&(te={})};var ie=oe,ae=Function.call.bind(Object.prototype.hasOwnProperty),ue=function(){};function ce(){return null}"production"!==process.env.NODE_ENV&&(ue=function(e){var n="Warning: "+e;"undefined"!=typeof console&&console.error(n);try{throw new Error(n)}catch(e){}});var le=function(e,n){var t="function"==typeof Symbol&&Symbol.iterator;var r={array:u("array"),bool:u("boolean"),func:u("function"),number:u("number"),object:u("object"),string:u("string"),symbol:u("symbol"),any:a(ce),arrayOf:function(e){return a((function(n,t,r,o,a){if("function"!=typeof e)return new i("Property `"+a+"` of component `"+r+"` has invalid PropType notation inside arrayOf.");var u=n[t];if(!Array.isArray(u))return new i("Invalid "+o+" `"+a+"` of type `"+l(u)+"` supplied to `"+r+"`, expected an array.");for(var c=0;c<u.length;c++){var s=e(u,c,r,o,a+"["+c+"]",Q);if(s instanceof Error)return s}return null}))},element:a((function(n,t,r,o,a){var u=n[t];return e(u)?null:new i("Invalid "+o+" `"+a+"` of type `"+l(u)+"` supplied to `"+r+"`, expected a single ReactElement.")})),elementType:a((function(e,n,t,r,o){var a=e[n];return G.isValidElementType(a)?null:new i("Invalid "+r+" `"+o+"` of type `"+l(a)+"` supplied to `"+t+"`, expected a single ReactElement type.")})),instanceOf:function(e){return a((function(n,t,r,o,a){if(!(n[t]instanceof e)){var u=e.name||"<<anonymous>>";return new i("Invalid "+o+" `"+a+"` of type `"+function(e){if(!e.constructor||!e.constructor.name)return"<<anonymous>>";return e.constructor.name}(n[t])+"` supplied to `"+r+"`, expected instance of `"+u+"`.")}return null}))},node:a((function(e,n,t,r,o){return c(e[n])?null:new i("Invalid "+r+" `"+o+"` supplied to `"+t+"`, expected a ReactNode.")})),objectOf:function(e){return a((function(n,t,r,o,a){if("function"!=typeof e)return new i("Property `"+a+"` of component `"+r+"` has invalid PropType notation inside objectOf.");var u=n[t],c=l(u);if("object"!==c)return new i("Invalid "+o+" `"+a+"` of type `"+c+"` supplied to `"+r+"`, expected an object.");for(var s in u)if(ae(u,s)){var f=e(u,s,r,o,a+"."+s,Q);if(f instanceof Error)return f}return null}))},oneOf:function(e){if(!Array.isArray(e))return"production"!==process.env.NODE_ENV&&(arguments.length>1?ue("Invalid arguments supplied to oneOf, expected an array, got "+arguments.length+" arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z])."):ue("Invalid argument supplied to oneOf, expected an array.")),ce;function n(n,t,r,a,u){for(var c=n[t],l=0;l<e.length;l++)if(o(c,e[l]))return null;var f=JSON.stringify(e,(function(e,n){return"symbol"===s(n)?String(n):n}));return new i("Invalid "+a+" `"+u+"` of value `"+String(c)+"` supplied to `"+r+"`, expected one of "+f+".")}return a(n)},oneOfType:function(e){if(!Array.isArray(e))return"production"!==process.env.NODE_ENV&&ue("Invalid argument supplied to oneOfType, expected an instance of array."),ce;for(var n=0;n<e.length;n++){var t=e[n];if("function"!=typeof t)return ue("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+f(t)+" at index "+n+"."),ce}return a((function(n,t,r,o,a){for(var u=0;u<e.length;u++){if(null==(0,e[u])(n,t,r,o,a,Q))return null}return new i("Invalid "+o+" `"+a+"` supplied to `"+r+"`.")}))},shape:function(e){return a((function(n,t,r,o,a){var u=n[t],c=l(u);if("object"!==c)return new i("Invalid "+o+" `"+a+"` of type `"+c+"` supplied to `"+r+"`, expected `object`.");for(var s in e){var f=e[s];if(f){var d=f(u,s,r,o,a+"."+s,Q);if(d)return d}}return null}))},exact:function(e){return a((function(n,t,r,o,a){var u=n[t],c=l(u);if("object"!==c)return new i("Invalid "+o+" `"+a+"` of type `"+c+"` supplied to `"+r+"`, expected `object`.");var s=J({},n[t],e);for(var f in s){var d=e[f];if(!d)return new i("Invalid "+o+" `"+a+"` key `"+f+"` supplied to `"+r+"`.\nBad object: "+JSON.stringify(n[t],null," ")+"\nValid keys: "+JSON.stringify(Object.keys(e),null," "));var p=d(u,f,r,o,a+"."+f,Q);if(p)return p}return null}))}};function o(e,n){return e===n?0!==e||1/e==1/n:e!=e&&n!=n}function i(e){this.message=e,this.stack=""}function a(e){if("production"!==process.env.NODE_ENV)var t={},r=0;function o(o,a,u,c,l,s,f){if(c=c||"<<anonymous>>",s=s||u,f!==Q){if(n){var d=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types");throw d.name="Invariant Violation",d}if("production"!==process.env.NODE_ENV&&"undefined"!=typeof console){var p=c+":"+u;!t[p]&&r<3&&(ue("You are manually calling a React.PropTypes validation function for the `"+s+"` prop on `"+c+"`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."),t[p]=!0,r++)}}return null==a[u]?o?null===a[u]?new i("The "+l+" `"+s+"` is marked as required in `"+c+"`, but its value is `null`."):new i("The "+l+" `"+s+"` is marked as required in `"+c+"`, but its value is `undefined`."):null:e(a,u,c,l,s)}var a=o.bind(null,!1);return a.isRequired=o.bind(null,!0),a}function u(e){return a((function(n,t,r,o,a,u){var c=n[t];return l(c)!==e?new i("Invalid "+o+" `"+a+"` of type `"+s(c)+"` supplied to `"+r+"`, expected `"+e+"`."):null}))}function c(n){switch(typeof n){case"number":case"string":case"undefined":return!0;case"boolean":return!n;case"object":if(Array.isArray(n))return n.every(c);if(null===n||e(n))return!0;var r=function(e){var n=e&&(t&&e[t]||e["@@iterator"]);if("function"==typeof n)return n}(n);if(!r)return!1;var o,i=r.call(n);if(r!==n.entries){for(;!(o=i.next()).done;)if(!c(o.value))return!1}else for(;!(o=i.next()).done;){var a=o.value;if(a&&!c(a[1]))return!1}return!0;default:return!1}}function l(e){var n=typeof e;return Array.isArray(e)?"array":e instanceof RegExp?"object":function(e,n){return"symbol"===e||!!n&&("Symbol"===n["@@toStringTag"]||"function"==typeof Symbol&&n instanceof Symbol)}(n,e)?"symbol":n}function s(e){if(null==e)return""+e;var n=l(e);if("object"===n){if(e instanceof Date)return"date";if(e instanceof RegExp)return"regexp"}return n}function f(e){var n=s(e);switch(n){case"array":case"object":return"an "+n;case"boolean":case"date":case"regexp":return"a "+n;default:return n}}return i.prototype=Error.prototype,r.checkPropTypes=ie,r.resetWarningCache=ie.resetWarningCache,r.PropTypes=r,r};function se(){}function fe(){}fe.resetWarningCache=se;var de=S((function(e){if("production"!==process.env.NODE_ENV){var n=G;e.exports=le(n.isElement,!0)}else e.exports=function(){function e(e,n,t,r,o,i){if(i!==Q){var a=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw a.name="Invariant Violation",a}}function n(){return e}e.isRequired=e;var t={array:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:n,element:e,elementType:e,instanceOf:n,node:e,objectOf:n,oneOf:n,oneOfType:n,shape:n,exact:n,checkPropTypes:fe,resetWarningCache:se};return t.PropTypes=t,t}()})),pe=(de.array,de.bool),ve=de.func,ye=(de.number,de.object),me=de.string,he=(de.symbol,de.any),be=de.node,ge=(de.element,de.elementType,de.instanceOf,de.oneOf,de.oneOfType),we=de.arrayOf;de.objectOf,de.shape,de.exact;function Ee(e,n){return t=n,o=function(n){return e.forEach((function(e){return function(e,n){return"function"==typeof e?e(n):null!=e&&(e.current=n),e}(e,n)}))},(i=r((function(){return{value:t,callback:o,facade:{get current(){return i.value},set current(e){var n=i.value;n!==e&&(i.value=e,i.callback(e,n))}}}}))[0]).callback=o,i.facade;var t,o,i}var Oe={width:"1px",height:"0px",padding:0,overflow:"hidden",position:"fixed",top:"1px",left:"1px"},Se=function(n){var t=n.children;return e.createElement(e.Fragment,null,e.createElement("div",{key:"guard-first","data-focus-guard":!0,"data-focus-auto-guard":!0,style:Oe}),t,t&&e.createElement("div",{key:"guard-last","data-focus-guard":!0,"data-focus-auto-guard":!0,style:Oe}))};Se.propTypes="production"!==process.env.NODE_ENV?{children:de.node}:{},Se.defaultProps={children:null}; | ||
*/}"production"!==process.env.NODE_ENV&&(E.displayName="Portal");var x="function"==typeof Symbol&&Symbol.for,N=x?Symbol.for("react.element"):60103,P=x?Symbol.for("react.portal"):60106,C=x?Symbol.for("react.fragment"):60107,T=x?Symbol.for("react.strict_mode"):60108,k=x?Symbol.for("react.profiler"):60114,j=x?Symbol.for("react.provider"):60109,D=x?Symbol.for("react.context"):60110,_=x?Symbol.for("react.async_mode"):60111,I=x?Symbol.for("react.concurrent_mode"):60111,M=x?Symbol.for("react.forward_ref"):60112,F=x?Symbol.for("react.suspense"):60113,A=x?Symbol.for("react.suspense_list"):60120,$=x?Symbol.for("react.memo"):60115,R=x?Symbol.for("react.lazy"):60116,L=x?Symbol.for("react.block"):60121,V=x?Symbol.for("react.fundamental"):60117,B=x?Symbol.for("react.responder"):60118,W=x?Symbol.for("react.scope"):60119;function q(e){if("object"==typeof e&&null!==e){var n=e.$$typeof;switch(n){case N:switch(e=e.type){case _:case I:case C:case k:case T:case F:return e;default:switch(e=e&&e.$$typeof){case D:case M:case R:case $:case j:return e;default:return n}}case P:return n}}}function Y(e){return q(e)===I}var z={AsyncMode:_,ConcurrentMode:I,ContextConsumer:D,ContextProvider:j,Element:N,ForwardRef:M,Fragment:C,Lazy:R,Memo:$,Portal:P,Profiler:k,StrictMode:T,Suspense:F,isAsyncMode:function(e){return Y(e)||q(e)===_},isConcurrentMode:Y,isContextConsumer:function(e){return q(e)===D},isContextProvider:function(e){return q(e)===j},isElement:function(e){return"object"==typeof e&&null!==e&&e.$$typeof===N},isForwardRef:function(e){return q(e)===M},isFragment:function(e){return q(e)===C},isLazy:function(e){return q(e)===R},isMemo:function(e){return q(e)===$},isPortal:function(e){return q(e)===P},isProfiler:function(e){return q(e)===k},isStrictMode:function(e){return q(e)===T},isSuspense:function(e){return q(e)===F},isValidElementType:function(e){return"string"==typeof e||"function"==typeof e||e===C||e===I||e===k||e===T||e===F||e===A||"object"==typeof e&&null!==e&&(e.$$typeof===R||e.$$typeof===$||e.$$typeof===j||e.$$typeof===D||e.$$typeof===M||e.$$typeof===V||e.$$typeof===B||e.$$typeof===W||e.$$typeof===L)},typeOf:q},U=S((function(e,n){"production"!==process.env.NODE_ENV&&function(){var e="function"==typeof Symbol&&Symbol.for,t=e?Symbol.for("react.element"):60103,r=e?Symbol.for("react.portal"):60106,o=e?Symbol.for("react.fragment"):60107,i=e?Symbol.for("react.strict_mode"):60108,a=e?Symbol.for("react.profiler"):60114,u=e?Symbol.for("react.provider"):60109,c=e?Symbol.for("react.context"):60110,l=e?Symbol.for("react.async_mode"):60111,s=e?Symbol.for("react.concurrent_mode"):60111,f=e?Symbol.for("react.forward_ref"):60112,d=e?Symbol.for("react.suspense"):60113,p=e?Symbol.for("react.suspense_list"):60120,v=e?Symbol.for("react.memo"):60115,y=e?Symbol.for("react.lazy"):60116,m=e?Symbol.for("react.block"):60121,h=e?Symbol.for("react.fundamental"):60117,b=e?Symbol.for("react.responder"):60118,g=e?Symbol.for("react.scope"):60119;function w(e){if("object"==typeof e&&null!==e){var n=e.$$typeof;switch(n){case t:var p=e.type;switch(p){case l:case s:case o:case a:case i:case d:return p;default:var m=p&&p.$$typeof;switch(m){case c:case f:case y:case v:case u:return m;default:return n}}case r:return n}}}var E=l,O=s,S=c,x=u,N=t,P=f,C=o,T=y,k=v,j=r,D=a,_=i,I=d,M=!1;function F(e){return w(e)===s}n.AsyncMode=E,n.ConcurrentMode=O,n.ContextConsumer=S,n.ContextProvider=x,n.Element=N,n.ForwardRef=P,n.Fragment=C,n.Lazy=T,n.Memo=k,n.Portal=j,n.Profiler=D,n.StrictMode=_,n.Suspense=I,n.isAsyncMode=function(e){return M||(M=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")),F(e)||w(e)===l},n.isConcurrentMode=F,n.isContextConsumer=function(e){return w(e)===c},n.isContextProvider=function(e){return w(e)===u},n.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===t},n.isForwardRef=function(e){return w(e)===f},n.isFragment=function(e){return w(e)===o},n.isLazy=function(e){return w(e)===y},n.isMemo=function(e){return w(e)===v},n.isPortal=function(e){return w(e)===r},n.isProfiler=function(e){return w(e)===a},n.isStrictMode=function(e){return w(e)===i},n.isSuspense=function(e){return w(e)===d},n.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===o||e===s||e===a||e===i||e===d||e===p||"object"==typeof e&&null!==e&&(e.$$typeof===y||e.$$typeof===v||e.$$typeof===u||e.$$typeof===c||e.$$typeof===f||e.$$typeof===h||e.$$typeof===b||e.$$typeof===g||e.$$typeof===m)},n.typeOf=w}()})),G=(U.AsyncMode,U.ConcurrentMode,U.ContextConsumer,U.ContextProvider,U.Element,U.ForwardRef,U.Fragment,U.Lazy,U.Memo,U.Portal,U.Profiler,U.StrictMode,U.Suspense,U.isAsyncMode,U.isConcurrentMode,U.isContextConsumer,U.isContextProvider,U.isElement,U.isForwardRef,U.isFragment,U.isLazy,U.isMemo,U.isPortal,U.isProfiler,U.isStrictMode,U.isSuspense,U.isValidElementType,U.typeOf,S((function(e){"production"===process.env.NODE_ENV?e.exports=z:e.exports=U}))),X=Object.getOwnPropertySymbols,Z=Object.prototype.hasOwnProperty,H=Object.prototype.propertyIsEnumerable;function K(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}var J=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 n={},t=0;t<10;t++)n["_"+String.fromCharCode(t)]=t;if("0123456789"!==Object.getOwnPropertyNames(n).map((function(e){return n[e]})).join(""))return!1;var r={};return"abcdefghijklmnopqrst".split("").forEach((function(e){r[e]=e})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},r)).join("")}catch(e){return!1}}()?Object.assign:function(e,n){for(var t,r,o=K(e),i=1;i<arguments.length;i++){for(var a in t=Object(arguments[i]))Z.call(t,a)&&(o[a]=t[a]);if(X){r=X(t);for(var u=0;u<r.length;u++)H.call(t,r[u])&&(o[r[u]]=t[r[u]])}}return o},Q="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",ee=function(){};if("production"!==process.env.NODE_ENV){var ne=Q,te={},re=Function.call.bind(Object.prototype.hasOwnProperty);ee=function(e){var n="Warning: "+e;"undefined"!=typeof console&&console.error(n);try{throw new Error(n)}catch(e){}}}function oe(e,n,t,r,o){if("production"!==process.env.NODE_ENV)for(var i in e)if(re(e,i)){var a;try{if("function"!=typeof e[i]){var u=Error((r||"React class")+": "+t+" type `"+i+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof e[i]+"`.");throw u.name="Invariant Violation",u}a=e[i](n,i,r,t,null,ne)}catch(e){a=e}if(!a||a instanceof Error||ee((r||"React class")+": type specification of "+t+" `"+i+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof a+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),a instanceof Error&&!(a.message in te)){te[a.message]=!0;var c=o?o():"";ee("Failed "+t+" type: "+a.message+(null!=c?c:""))}}}oe.resetWarningCache=function(){"production"!==process.env.NODE_ENV&&(te={})};var ie=oe,ae=Function.call.bind(Object.prototype.hasOwnProperty),ue=function(){};function ce(){return null}"production"!==process.env.NODE_ENV&&(ue=function(e){var n="Warning: "+e;"undefined"!=typeof console&&console.error(n);try{throw new Error(n)}catch(e){}});var le=function(e,n){var t="function"==typeof Symbol&&Symbol.iterator;var r={array:u("array"),bool:u("boolean"),func:u("function"),number:u("number"),object:u("object"),string:u("string"),symbol:u("symbol"),any:a(ce),arrayOf:function(e){return a((function(n,t,r,o,a){if("function"!=typeof e)return new i("Property `"+a+"` of component `"+r+"` has invalid PropType notation inside arrayOf.");var u=n[t];if(!Array.isArray(u))return new i("Invalid "+o+" `"+a+"` of type `"+l(u)+"` supplied to `"+r+"`, expected an array.");for(var c=0;c<u.length;c++){var s=e(u,c,r,o,a+"["+c+"]",Q);if(s instanceof Error)return s}return null}))},element:a((function(n,t,r,o,a){var u=n[t];return e(u)?null:new i("Invalid "+o+" `"+a+"` of type `"+l(u)+"` supplied to `"+r+"`, expected a single ReactElement.")})),elementType:a((function(e,n,t,r,o){var a=e[n];return G.isValidElementType(a)?null:new i("Invalid "+r+" `"+o+"` of type `"+l(a)+"` supplied to `"+t+"`, expected a single ReactElement type.")})),instanceOf:function(e){return a((function(n,t,r,o,a){if(!(n[t]instanceof e)){var u=e.name||"<<anonymous>>";return new i("Invalid "+o+" `"+a+"` of type `"+function(e){if(!e.constructor||!e.constructor.name)return"<<anonymous>>";return e.constructor.name}(n[t])+"` supplied to `"+r+"`, expected instance of `"+u+"`.")}return null}))},node:a((function(e,n,t,r,o){return c(e[n])?null:new i("Invalid "+r+" `"+o+"` supplied to `"+t+"`, expected a ReactNode.")})),objectOf:function(e){return a((function(n,t,r,o,a){if("function"!=typeof e)return new i("Property `"+a+"` of component `"+r+"` has invalid PropType notation inside objectOf.");var u=n[t],c=l(u);if("object"!==c)return new i("Invalid "+o+" `"+a+"` of type `"+c+"` supplied to `"+r+"`, expected an object.");for(var s in u)if(ae(u,s)){var f=e(u,s,r,o,a+"."+s,Q);if(f instanceof Error)return f}return null}))},oneOf:function(e){if(!Array.isArray(e))return"production"!==process.env.NODE_ENV&&(arguments.length>1?ue("Invalid arguments supplied to oneOf, expected an array, got "+arguments.length+" arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z])."):ue("Invalid argument supplied to oneOf, expected an array.")),ce;function n(n,t,r,a,u){for(var c=n[t],l=0;l<e.length;l++)if(o(c,e[l]))return null;var f=JSON.stringify(e,(function(e,n){return"symbol"===s(n)?String(n):n}));return new i("Invalid "+a+" `"+u+"` of value `"+String(c)+"` supplied to `"+r+"`, expected one of "+f+".")}return a(n)},oneOfType:function(e){if(!Array.isArray(e))return"production"!==process.env.NODE_ENV&&ue("Invalid argument supplied to oneOfType, expected an instance of array."),ce;for(var n=0;n<e.length;n++){var t=e[n];if("function"!=typeof t)return ue("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+f(t)+" at index "+n+"."),ce}return a((function(n,t,r,o,a){for(var u=0;u<e.length;u++){if(null==(0,e[u])(n,t,r,o,a,Q))return null}return new i("Invalid "+o+" `"+a+"` supplied to `"+r+"`.")}))},shape:function(e){return a((function(n,t,r,o,a){var u=n[t],c=l(u);if("object"!==c)return new i("Invalid "+o+" `"+a+"` of type `"+c+"` supplied to `"+r+"`, expected `object`.");for(var s in e){var f=e[s];if(f){var d=f(u,s,r,o,a+"."+s,Q);if(d)return d}}return null}))},exact:function(e){return a((function(n,t,r,o,a){var u=n[t],c=l(u);if("object"!==c)return new i("Invalid "+o+" `"+a+"` of type `"+c+"` supplied to `"+r+"`, expected `object`.");var s=J({},n[t],e);for(var f in s){var d=e[f];if(!d)return new i("Invalid "+o+" `"+a+"` key `"+f+"` supplied to `"+r+"`.\nBad object: "+JSON.stringify(n[t],null," ")+"\nValid keys: "+JSON.stringify(Object.keys(e),null," "));var p=d(u,f,r,o,a+"."+f,Q);if(p)return p}return null}))}};function o(e,n){return e===n?0!==e||1/e==1/n:e!=e&&n!=n}function i(e){this.message=e,this.stack=""}function a(e){if("production"!==process.env.NODE_ENV)var t={},r=0;function o(o,a,u,c,l,s,f){if(c=c||"<<anonymous>>",s=s||u,f!==Q){if(n){var d=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types");throw d.name="Invariant Violation",d}if("production"!==process.env.NODE_ENV&&"undefined"!=typeof console){var p=c+":"+u;!t[p]&&r<3&&(ue("You are manually calling a React.PropTypes validation function for the `"+s+"` prop on `"+c+"`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."),t[p]=!0,r++)}}return null==a[u]?o?null===a[u]?new i("The "+l+" `"+s+"` is marked as required in `"+c+"`, but its value is `null`."):new i("The "+l+" `"+s+"` is marked as required in `"+c+"`, but its value is `undefined`."):null:e(a,u,c,l,s)}var a=o.bind(null,!1);return a.isRequired=o.bind(null,!0),a}function u(e){return a((function(n,t,r,o,a,u){var c=n[t];return l(c)!==e?new i("Invalid "+o+" `"+a+"` of type `"+s(c)+"` supplied to `"+r+"`, expected `"+e+"`."):null}))}function c(n){switch(typeof n){case"number":case"string":case"undefined":return!0;case"boolean":return!n;case"object":if(Array.isArray(n))return n.every(c);if(null===n||e(n))return!0;var r=function(e){var n=e&&(t&&e[t]||e["@@iterator"]);if("function"==typeof n)return n}(n);if(!r)return!1;var o,i=r.call(n);if(r!==n.entries){for(;!(o=i.next()).done;)if(!c(o.value))return!1}else for(;!(o=i.next()).done;){var a=o.value;if(a&&!c(a[1]))return!1}return!0;default:return!1}}function l(e){var n=typeof e;return Array.isArray(e)?"array":e instanceof RegExp?"object":function(e,n){return"symbol"===e||!!n&&("Symbol"===n["@@toStringTag"]||"function"==typeof Symbol&&n instanceof Symbol)}(n,e)?"symbol":n}function s(e){if(null==e)return""+e;var n=l(e);if("object"===n){if(e instanceof Date)return"date";if(e instanceof RegExp)return"regexp"}return n}function f(e){var n=s(e);switch(n){case"array":case"object":return"an "+n;case"boolean":case"date":case"regexp":return"a "+n;default:return n}}return i.prototype=Error.prototype,r.checkPropTypes=ie,r.resetWarningCache=ie.resetWarningCache,r.PropTypes=r,r};function se(){}function fe(){}fe.resetWarningCache=se;var de=S((function(e){if("production"!==process.env.NODE_ENV){var n=G;e.exports=le(n.isElement,!0)}else e.exports=function(){function e(e,n,t,r,o,i){if(i!==Q){var a=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw a.name="Invariant Violation",a}}function n(){return e}e.isRequired=e;var t={array:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:n,element:e,elementType:e,instanceOf:n,node:e,objectOf:n,oneOf:n,oneOfType:n,shape:n,exact:n,checkPropTypes:fe,resetWarningCache:se};return t.PropTypes=t,t}()})),pe=(de.array,de.bool),ve=de.func,ye=(de.number,de.object),me=de.string,he=(de.symbol,de.any),be=de.node,ge=(de.element,de.elementType,de.instanceOf,de.oneOf,de.oneOfType),we=de.arrayOf;de.objectOf,de.shape,de.exact;function Ee(e,n){return t=n,o=function(n){return e.forEach((function(e){return function(e,n){return"function"==typeof e?e(n):e&&(e.current=n),e}(e,n)}))},(i=r((function(){return{value:t,callback:o,facade:{get current(){return i.value},set current(e){var n=i.value;n!==e&&(i.value=e,i.callback(e,n))}}}}))[0]).callback=o,i.facade;var t,o,i}var Oe={width:"1px",height:"0px",padding:0,overflow:"hidden",position:"fixed",top:"1px",left:"1px"},Se=function(e){var n=e.children;return o(i,null,o("div",{key:"guard-first","data-focus-guard":!0,"data-focus-auto-guard":!0,style:Oe}),n,n&&o("div",{key:"guard-last","data-focus-guard":!0,"data-focus-auto-guard":!0,style:Oe}))};Se.propTypes="production"!==process.env.NODE_ENV?{children:de.node}:{},Se.defaultProps={children:null}; | ||
/*! ***************************************************************************** | ||
@@ -25,2 +25,2 @@ Copyright (c) Microsoft Corporation. All rights reserved. | ||
***************************************************************************** */ | ||
var xe=function(){return(xe=Object.assign||function(e){for(var n,t=1,r=arguments.length;t<r;t++)for(var o in n=arguments[t])Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o]);return e}).apply(this,arguments)};function Ne(e,n){var t={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&n.indexOf(r)<0&&(t[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)n.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(t[r[o]]=e[r[o]])}return t}function Pe(e){return e}function Ce(e,n){void 0===n&&(n=Pe);var t=[],r=!1;return{read:function(){if(r)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return t.length?t[t.length-1]:e},useMedium:function(e){var o=n(e,r);return t.push(o),function(){t=t.filter((function(e){return e!==o}))}},assignSyncMedium:function(e){for(r=!0;t.length;){var n=t;t=[],n.forEach(e)}t={push:function(n){return e(n)},filter:function(){return t}}},assignMedium:function(e){r=!0;var n=[];if(t.length){var o=t;t=[],o.forEach(e),n=t}var i=function(){var t=n;n=[],t.forEach(e)},a=function(){return Promise.resolve().then(i)};a(),t={push:function(e){n.push(e),a()},filter:function(e){return n=n.filter(e),t}}}}}function Te(e,n){return void 0===n&&(n=Pe),Ce(e,n)}function ke(e){void 0===e&&(e={});var n=Ce(null);return n.options=xe({async:!0,ssr:!1},e),n}var je=function(e){var n=e.sideCar,t=Ne(e,["sideCar"]);if(!n)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var r=n.read();if(!r)throw new Error("Sidecar medium not found");return o(r,xe({},t))};je.isSideCarExport=!0;var De=Te({},(function(e){return{target:e.target,currentTarget:e.currentTarget}})),Ie=Te(),Me=Te(),_e=ke({async:!0}),Fe=[],Ae=e.forwardRef((function(n,o){var a,u=r(),c=u[0],l=u[1],s=t(),f=t(!1),d=t(null),p=n.children,v=n.disabled,y=n.noFocusGuards,m=n.persistentFocus,h=n.autoFocus,b=n.allowTextSelection,g=n.group,w=n.className,E=n.whiteList,S=n.shards,x=void 0===S?Fe:S,N=n.as,P=void 0===N?"div":N,C=n.lockProps,T=void 0===C?{}:C,k=n.sideCar,j=n.returnFocus,D=n.onActivation,I=n.onDeactivation,M=r({})[0],_=i((function(){d.current=d.current||document&&document.activeElement,s.current&&D&&D(s.current),f.current=!0}),[D]),F=i((function(){f.current=!1,I&&I(s.current)}),[I]),A=i((function(e){var n=d.current;if(Boolean(j)&&n&&n.focus){var t="object"==typeof j?j:void 0;d.current=null,e?Promise.resolve().then((function(){return n.focus(t)})):n.focus(t)}}),[j]),$=i((function(e){f.current&&De.useMedium(e)}),[]),R=Ie.useMedium,L=i((function(e){s.current!==e&&(s.current=e,l(e))}),[]);"production"!==process.env.NODE_ENV&&(void 0!==b&&console.warn("React-Focus-Lock: allowTextSelection is deprecated and enabled by default"),e.useEffect((function(){s.current||console.error("FocusLock: could not obtain ref to internal node")}),[]));var V=O(((a={})["data-focus-lock-disabled"]=v&&"disabled",a["data-focus-lock"]=g,a),T),B=!0!==y,W=B&&"tail"!==y,q=Ee([o,L]);return e.createElement(e.Fragment,null,B&&[e.createElement("div",{key:"guard-first","data-focus-guard":!0,tabIndex:v?-1:0,style:Oe}),e.createElement("div",{key:"guard-nearest","data-focus-guard":!0,tabIndex:v?-1:1,style:Oe})],!v&&e.createElement(k,{id:M,sideCar:_e,observed:c,disabled:v,persistentFocus:m,autoFocus:h,whiteList:E,shards:x,onActivation:_,onDeactivation:F,returnFocus:A}),e.createElement(P,O({ref:q},V,{className:w,onBlur:R,onFocus:$}),p),W&&e.createElement("div",{"data-focus-guard":!0,tabIndex:v?-1:0,style:Oe}))}));Ae.propTypes="production"!==process.env.NODE_ENV?{children:be,disabled:pe,returnFocus:ge([pe,ye]),noFocusGuards:pe,allowTextSelection:pe,autoFocus:pe,persistentFocus:pe,group:me,className:me,whiteList:ve,shards:we(he),as:ge([me,ve,ye]),lockProps:ye,onActivation:ve,onDeactivation:ve,sideCar:he.isRequired}:{},Ae.defaultProps={children:void 0,disabled:!1,returnFocus:!1,noFocusGuards:!1,autoFocus:!0,persistentFocus:!1,allowTextSelection:void 0,group:void 0,className:void 0,whiteList:void 0,shards:void 0,as:"div",lockProps:{},onActivation:void 0,onDeactivation:void 0};var $e=function(e){for(var n=Array(e.length),t=0;t<e.length;++t)n[t]=e[t];return n},Re=function(e){return Array.isArray(e)?e:[e]},Le=function(e,n){var t=e.tabIndex-n.tabIndex,r=e.index-n.index;if(t){if(!e.tabIndex)return 1;if(!n.tabIndex)return-1}return t||r},Ve=function(e,n,t){return $e(e).map((function(e,n){return{node:e,index:n,tabIndex:t&&-1===e.tabIndex?(e.dataset||{}).focusGuard?0:-1:e.tabIndex}})).filter((function(e){return!n||e.tabIndex>=0})).sort(Le)},Be=["button:enabled:not([readonly])","select:enabled:not([readonly])","textarea:enabled:not([readonly])","input:enabled:not([readonly])","a[href]","area[href]","iframe","object","embed","[tabindex]","[contenteditable]","[autofocus]"],We=Be.join(","),qe=We+", [data-focus-guard]",Ye=function(e,n){return e.reduce((function(e,t){return e.concat($e(t.querySelectorAll(n?qe:We)),t.parentNode?$e(t.parentNode.querySelectorAll(Be.join(","))).filter((function(e){return e===t})):[])}),[])},ze=function e(n){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return t.push(n),n.parentNode&&e(n.parentNode,t),t},Ue=function(e,n){for(var t=ze(e),r=ze(n),o=0;o<t.length;o+=1){var i=t[o];if(r.indexOf(i)>=0)return i}return!1},Ge=function(e){return $e(e).filter((function(e){return function e(n){return!n||n===document||n.nodeType===Node.DOCUMENT_NODE||!((t=window.getComputedStyle(n,null))&&t.getPropertyValue&&("none"===t.getPropertyValue("display")||"hidden"===t.getPropertyValue("visibility")))&&e(n.parentNode);var t}(e)})).filter((function(e){return function(e){return!(("INPUT"===e.tagName||"BUTTON"===e.tagName)&&("hidden"===e.type||e.disabled))}(e)}))},Xe=function(e,n){return Ve(Ge(Ye(e,n)),!0,n)},Ze=function(e){return Ge((n=e.querySelectorAll("[data-autofocus-inside]"),$e(n).map((function(e){return Ye([e])})).reduce((function(e,n){return e.concat(n)}),[])));var n},He=function(e){return"INPUT"===e.tagName&&"radio"===e.type},Ke=function(e){return e[0]&&e.length>1&&He(e[0])&&e[0].name?function(e,n){return n.filter(He).filter((function(n){return n.name===e.name})).filter((function(e){return e.checked}))[0]||e}(e[0],e):e[0]},Je="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Qe=function(e){return Re(e).filter(Boolean).reduce((function(e,n){var t=n.getAttribute("data-focus-lock");return e.push.apply(e,t?function e(n){for(var t=n.length,r=0;r<t;r+=1)for(var o=function(t){if(r!==t&&n[r].contains(n[t]))return{v:e(n.filter((function(e){return e!==n[t]})))}},i=0;i<t;i+=1){var a=o(i);if("object"===(void 0===a?"undefined":Je(a)))return a.v}return n}($e(function e(n){return n.parentNode?e(n.parentNode):n}(n).querySelectorAll('[data-focus-lock="'+t+'"]:not([data-focus-lock-disabled="disabled"])'))):[n]),e}),[])},en=function(e){return e.dataset&&e.dataset.focusGuard},nn=function(e){return!en(e)},tn=function(e,n,t){var r=Re(e),o=Re(n),i=r[0],a=null;return o.filter(Boolean).forEach((function(e){a=Ue(a||e,e)||a,t.filter(Boolean).forEach((function(e){var n=Ue(i,e);n&&(a=!a||n.contains(a)?n:Ue(n,a))}))})),a},rn=function(e,n){var t=document&&document.activeElement,r=Qe(e).filter(nn),o=tn(t||e,e,r),i=Xe(r).filter((function(e){var n=e.node;return nn(n)}));if(i[0]||(i=(a=r,Ve(Ge(Ye(a)),!1)).filter((function(e){var n=e.node;return nn(n)})))[0]){var a,u,c,l,s,f=Xe([o]).map((function(e){return e.node})),d=(u=f,c=i,l=new Map,c.forEach((function(e){return l.set(e.node,e)})),u.map((function(e){return l.get(e)})).filter(Boolean)),p=d.map((function(e){return e.node})),v=function(e,n,t,r,o){var i=e.length,a=e[0],u=e[i-1];if(!(e.indexOf(t)>=0)){var c=n.indexOf(t),l=n.indexOf(r||c),s=e.indexOf(r),f=c-l,d=n.indexOf(a),p=n.indexOf(u);return-1===c||-1===s?e.indexOf(o.length?Ke(o):Ke(e)):!f&&s>=0?s:c<=d&&en(t)&&Math.abs(f)>1?0:f&&Math.abs(f)>1?s:c<=d?i-1:c>p?0:f?Math.abs(f)>1?s:(i+s+f)%i:void 0}}(p,f,t,n,p.filter((s=function(e){return e.reduce((function(e,n){return e.concat(Ze(n))}),[])}(r),function(e){return!!e.autofocus||e.dataset&&!!e.dataset.autofocus||s.indexOf(e)>=0})));return void 0===v?v:d[v]}},on=function(e){return e===document.activeElement},an=function(e){var n=document&&document.activeElement;return!(!n||n.dataset&&n.dataset.focusGuard)&&Qe(e).reduce((function(e,t){return e||t.contains(n)||function(e){return n=$e(e.querySelectorAll("iframe")),t=on,!!n.filter((function(e){return e===t}))[0];var n,t}(t)}),!1)},un=0,cn=!1,ln=function(e,n){var t,r=rn(e,n);if(!cn&&r){if(un>2)return console.error("FocusLock: focus-fighting detected. Only one focus management system could be active. See https://github.com/theKashey/focus-lock/#focus-fighting"),cn=!0,void setTimeout((function(){cn=!1}),1);un++,(t=r.node).focus(),t.contentWindow&&t.contentWindow.focus(),un--}};function sn(e){var n=window.setImmediate;void 0!==n?n(e):setTimeout(e,1)}var fn=function(){return document&&document.activeElement===document.body||document&&$e(document.querySelectorAll("[data-no-focus-lock]")).some((function(e){return e.contains(document.activeElement)}))},dn=null,pn=null,vn=null,yn=!1,mn=function(){return!0};function hn(e,n,t,r){var o=null,i=e;do{var a=r[i];if(a.guard)a.node.dataset.focusAutoGuard&&(o=a);else{if(!a.lockItem)break;if(i!==e)return;o=null}}while((i+=t)!==n);o&&(o.node.tabIndex=0)}var bn=function(e){return e&&"current"in e?e.current:e},gn=function(){var e,n,t,r,o,i,a=!1;if(dn){var u=dn,c=u.observed,l=u.persistentFocus,s=u.autoFocus,f=u.shards,d=c||vn&&vn.portaledElement,p=document&&document.activeElement;if(d){var v=[d].concat(f.map(bn).filter(Boolean));if(p&&!function(e){return(dn.whiteList||mn)(e)}(p)||(l||yn||!fn()||!pn&&s)&&(!d||an(v)||(i=p,vn&&vn.portaledElement===i)||(document&&!pn&&p&&!s?(p.blur(),document.body.focus()):(a=ln(v,pn),vn={})),yn=!1,pn=document&&document.activeElement),document){var y=document&&document.activeElement,m=(n=Qe(e=v).filter(nn),t=tn(e,e,n),r=Xe([t],!0),o=Xe(n).filter((function(e){var n=e.node;return nn(n)})).map((function(e){return e.node})),r.map((function(e){var n=e.node;return{node:n,index:e.index,lockItem:o.indexOf(n)>=0,guard:en(n)}}))),h=m.find((function(e){return e.node===y}));if(h){m.filter((function(e){var n=e.guard,t=e.node;return n&&t.dataset.focusAutoGuard})).forEach((function(e){return e.node.removeAttribute("tabIndex")}));var b=m.indexOf(h);hn(b,m.length,1,m),hn(b,-1,-1,m)}}}}return a},wn=function(e){gn()&&e&&(e.stopPropagation(),e.preventDefault())},En=function(){return sn(gn)},On=function(e){var n=e.target,t=e.currentTarget;t.contains(n)||(vn={observerNode:t,portaledElement:n})};"production"!==process.env.NODE_ENV&&de.node.isRequired;var Sn=function(){yn=!0};De.assignSyncMedium(On),Ie.assignMedium(En),Me.assignMedium((function(e){return e({moveFocusInside:ln,focusInside:an})}));var xn=function(n,t){if("production"!==process.env.NODE_ENV){if("function"!=typeof n)throw new Error("Expected reducePropsToState to be a function.");if("function"!=typeof t)throw new Error("Expected handleStateChangeOnClient to be a function.")}return function(r){if("production"!==process.env.NODE_ENV&&"function"!=typeof r)throw new Error("Expected WrappedComponent to be a React component.");var o,i=[];function u(){o=n(i.map((function(e){return e.props}))),t(o)}var c,l,s,f=function(n){var t,a;function c(){return n.apply(this,arguments)||this}a=n,(t=c).prototype=Object.create(a.prototype),t.prototype.constructor=t,t.__proto__=a,c.peek=function(){return o};var l=c.prototype;return l.componentDidMount=function(){i.push(this),u()},l.componentDidUpdate=function(){u()},l.componentWillUnmount=function(){var e=i.indexOf(this);i.splice(e,1),u()},l.render=function(){return e.createElement(r,this.props)},c}(a);return c=f,l="displayName",s="SideEffect("+function(e){return e.displayName||e.name||"Component"}(r)+")",l in c?Object.defineProperty(c,l,{value:s,enumerable:!0,configurable:!0,writable:!0}):c[l]=s,f}}((function(e){return e.filter((function(e){return!e.disabled}))}),(function(e){var n=e.slice(-1)[0];n&&!dn&&(document.addEventListener("focusin",wn,!0),document.addEventListener("focusout",En),window.addEventListener("blur",Sn));var t=dn,r=t&&n&&n.id===t.id;dn=n,t&&!r&&(t.onDeactivation(),e.filter((function(e){return e.id===t.id})).length||t.returnFocus(!n)),n?(pn=null,r&&t.observed===n.observed||n.onActivation(),gn(),sn(gn)):(document.removeEventListener("focusin",wn,!0),document.removeEventListener("focusout",En),window.removeEventListener("blur",Sn),pn=null)}))((function(){return null})),Nn=e.forwardRef((function(n,t){return e.createElement(Ae,O({sideCar:xn,ref:t},n))})),Pn=Ae.propTypes||{},Cn=(Pn.sideCar,function(e,n){if(null==e)return{};var t,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)t=i[r],n.indexOf(t)>=0||(o[t]=e[t]);return o}(Pn,["sideCar"]));Nn.propTypes=Cn;var Tn=ke(),kn=function(){},jn=u((function(e,n){var i=t(null),a=r({onScrollCapture:kn,onWheelCapture:kn,onTouchMoveCapture:kn}),u=a[0],f=a[1],d=e.forwardProps,p=e.children,v=e.className,y=e.removeScrollBar,m=e.enabled,h=e.shards,b=e.sideCar,g=e.noIsolation,w=e.inert,E=e.allowPinchZoom,O=Ne(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom"]),S=b,x=xe({ref:Ee([i,n])},O,u);return o(c,null,m&&o(S,{sideCar:Tn,removeScrollBar:y,shards:h,noIsolation:g,inert:w,setCallbacks:f,allowPinchZoom:!!E,lockRef:i}),d?l(s.only(p),x):o("div",xe({},x,{className:v}),p))}));jn.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},jn.classNames={fullWidth:"width-before-scroll-bar",zeroRight:"right-scroll-bar-position"};var Dn=function(){var e=0,n=null;return{add:function(t){var r,o;0==e&&(n=function(){if(!document)return null;var e=document.createElement("style");return e.type="text/css",e}())&&(o=t,(r=n).styleSheet?r.styleSheet.cssText=o:r.appendChild(document.createTextNode(o)),function(e){(document.head||document.getElementsByTagName("head")[0]).appendChild(e)}(n)),e++},remove:function(){!--e&&n&&(n.parentNode&&n.parentNode.removeChild(n),n=null)}}},In=function(){var e,n=(e=Dn(),function(n){f((function(){return e.add(n),function(){e.remove()}}),[])});return function(e){var t=e.styles;return n(t),null}},Mn={left:0,top:0,right:0,gap:0},_n=function(e){return parseInt(e||"",10)||0},Fn=function(e){if(void 0===e&&(e="margin"),"undefined"==typeof window)return Mn;var n=function(e){var n=window.getComputedStyle(document.body),t=n["padding"===e?"paddingLeft":"marginLeft"],r=n["padding"===e?"paddingTop":"marginTop"],o=n["padding"===e?"paddingRight":"marginRight"];return[_n(t),_n(r),_n(o)]}(e),t=document.documentElement.clientWidth,r=window.innerWidth;return{left:n[0],top:n[1],right:n[2],gap:Math.max(0,r-t+n[2]-n[0])}},An=In(),$n=function(e,n,t,r){var o=e.left,i=e.top,a=e.right,u=e.gap;return void 0===t&&(t="margin"),"\n .with-scroll-bars-hidden {\n overflow: hidden "+r+";\n padding-right: "+u+"px "+r+";\n }\n body {\n overflow: hidden "+r+";\n "+[n&&"position: relative "+r+";","margin"===t&&"\n padding-left: "+o+"px;\n padding-top: "+i+"px;\n padding-right: "+a+"px;\n margin-left:0;\n margin-top:0;\n margin-right: "+u+"px "+r+";\n ","padding"===t&&"padding-right: "+u+"px "+r+";"].filter(Boolean).join("")+"\n }\n \n .right-scroll-bar-position {\n right: "+u+"px "+r+";\n }\n \n .width-before-scroll-bar {\n margin-right: "+u+"px "+r+";\n }\n \n .right-scroll-bar-position .right-scroll-bar-position {\n right: 0 "+r+";\n }\n \n .width-before-scroll-bar .width-before-scroll-bar {\n margin-right: 0 "+r+";\n }\n"},Rn=function(e){var n=r(Fn(e.gapMode)),t=n[0],i=n[1];f((function(){i(Fn(e.gapMode))}),[e.gapMode]);var a=e.noRelative,u=e.noImportant,c=e.gapMode;return o(An,{styles:$n(t,!a,void 0===c?"margin":c,u?"":"!important")})},Ln=function(e,n){var t=n;do{if(Vn(e,t)){var r=Bn(e,t);if(r[1]>r[2])return!0}t=t.parentNode}while(t&&t!==document.body);return!1},Vn=function(e,n){return"v"===e?function(e){var n=window.getComputedStyle(e);return"hidden"!==n.overflowY&&!(n.overflowY===n.overflowX&&"visible"===n.overflowY)}(n):function(e){var n=window.getComputedStyle(e);return"hidden"!==n.overflowX&&!(n.overflowY===n.overflowX&&"visible"===n.overflowX)}(n)},Bn=function(e,n){return"v"===e?[(t=n).scrollTop,t.scrollHeight,t.clientHeight]:function(e){return[e.scrollLeft,e.scrollWidth,e.clientWidth]}(n);var t},Wn=!1;if("undefined"!=typeof window)try{var qn=Object.defineProperty({},"passive",{get:function(){return Wn=!0,!0}});window.addEventListener("test",qn,qn),window.removeEventListener("test",qn,qn)}catch(e){Wn=!1}var Yn=!!Wn&&{passive:!1},zn=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},Un=function(e){return[e.deltaX,e.deltaY]},Gn=function(e){return e&&"current"in e?e.current:e},Xn=function(e){return"\n .block-interactivity-"+e+" {pointer-events: none;}\n .allow-interactivity-"+e+" {pointer-events: all;}\n"},Zn=0,Hn=[];var Kn,Jn=(Kn=function(e){var n=t([]),a=t([0,0]),u=t(),l=r(Zn++)[0],s=r((function(){return In()}))[0],d=t(e);f((function(){d.current=e}),[e]),f((function(){if(e.inert){document.body.classList.add("block-interactivity-"+l);var n=[e.lockRef.current].concat((e.shards||[]).map(Gn)).filter(Boolean);return n.forEach((function(e){return e.classList.add("allow-interactivity-"+l)})),function(){document.body.classList.remove("block-interactivity-"+l),n.forEach((function(e){return e.classList.remove("allow-interactivity-"+l)}))}}}),[e.inert,e.lockRef.current,e.shards]);var p=i((function(e,n){if("touches"in e&&2===e.touches.length)return!d.current.allowPinchZoom;var t,r=zn(e),o=a.current,i="deltaX"in e?e.deltaX:o[0]-r[0],c="deltaY"in e?e.deltaY:o[1]-r[1],l=e.target,s=Math.abs(i)>Math.abs(c)?"h":"v",f=Ln(s,l);if(!f)return!0;if(f?t=s:(t="v"===s?"h":"v",f=Ln(s,l)),!f)return!1;if(!u.current&&"changedTouches"in e&&(i||c)&&(u.current=t),!t)return!0;var p=u.current||t;return function(e,n,t,r,o){var i=r,a=t.target,u=n.contains(a),c=!1,l=i>0,s=0,f=0;do{var d=Bn(e,a),p=d[0],v=d[1]-d[2]-p;(p||v)&&Vn(e,a)&&(s+=v,f+=p),a=a.parentNode}while(!u&&a!==document.body||u&&(n.contains(a)||n===a));return(l&&(o&&0===s||!o&&i>s)||!l&&(o&&0===f||!o&&-i>f))&&(c=!0),c}(p,n,e,"h"==p?i:c,!0)}),[]),v=i((function(e){var t=e;if(Hn.length&&Hn[Hn.length-1]===s){var r="deltaY"in t?Un(t):zn(t),o=n.current.filter((function(e){return e.name===t.type&&e.target===t.target&&function(e,n){return e[0]===n[0]&&e[1]===n[1]}(e.delta,r)}))[0];if(o&&o.should)t.preventDefault();else if(!o){var i=(d.current.shards||[]).map(Gn).filter(Boolean).filter((function(e){return e.contains(t.target)}));(i.length>0?p(t,i[0]):!d.current.noIsolation)&&t.preventDefault()}}}),[]),y=i((function(e,t,r,o){var i={name:e,delta:t,target:r,should:o};n.current.push(i),setTimeout((function(){n.current=n.current.filter((function(e){return e!==i}))}),1)}),[]),m=i((function(e){a.current=zn(e),u.current=void 0}),[]),h=i((function(n){y(n.type,Un(n),n.target,p(n,e.lockRef.current))}),[]),b=i((function(n){y(n.type,zn(n),n.target,p(n,e.lockRef.current))}),[]);f((function(){return Hn.push(s),e.setCallbacks({onScrollCapture:h,onWheelCapture:h,onTouchMoveCapture:b}),document.addEventListener("wheel",v,Yn),document.addEventListener("touchmove",v,Yn),document.addEventListener("touchstart",m,Yn),function(){Hn=Hn.filter((function(e){return e!==s})),document.removeEventListener("wheel",v,Yn),document.removeEventListener("touchmove",v,Yn),document.removeEventListener("touchstart",m,Yn)}}),[]);var g=e.removeScrollBar,w=e.inert;return o(c,null,w?o(s,{styles:Xn(l)}):null,g?o(Rn,{gapMode:"margin"}):null)},Tn.useMedium(Kn),je),Qn=u((function(e,n){return o(jn,xe({},e,{ref:n,sideCar:Jn}))}));function et(){return(et=Object.assign||function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])}return e}).apply(this,arguments)}function nt(e,n){if(null==e)return{};var t,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)t=i[r],n.indexOf(t)>=0||(o[t]=e[t]);return o}Qn.classNames=jn.classNames;var tt={initialFocusRef:function(){return null},allowPinchZoom:de.bool,onDismiss:de.func},rt=u((function(n,t){var r=n.isOpen,o=void 0===r||r,i=nt(n,["isOpen"]);return f((function(){return y("dialog")}),[]),o?e.createElement(E,{"data-reach-dialog-wrapper":""},e.createElement(ot,Object.assign({ref:t},i))):null}));"production"!==process.env.NODE_ENV&&(rt.displayName="DialogOverlay",rt.propTypes=et({},tt,{isOpen:de.bool}));var ot=u((function(r,o){var a=r.allowPinchZoom,u=r.initialFocusRef,c=r.onClick,l=r.onDismiss,s=void 0===l?g:l,d=r.onMouseDown,p=r.onKeyDown,v=nt(r,["allowPinchZoom","initialFocusRef","onClick","onDismiss","onMouseDown","onKeyDown"]),y=t(null),m=t(null),E=function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return n((function(){return t.every((function(e){return null==e}))?null:function(e){t.forEach((function(n){h(n,e)}))}}),t)}(m,o),O=i((function(){u&&u.current&&u.current.focus()}),[u]);return f((function(){return m.current?function(e){var n=[],t=[],r=(o=e,(o&&o.ownerDocument?o.ownerDocument:b()?document:null)||document);var o;if(!e)return"production"!==process.env.NODE_ENV&&console.warn("A ref has not yet been attached to a dialog node when attempting to call `createAriaHider`."),g;return Array.prototype.forEach.call(r.querySelectorAll("body > *"),(function(r){var o,i;if(r!==(null===(o=e.parentNode)||void 0===o||null===(i=o.parentNode)||void 0===i?void 0:i.parentNode)){var a=r.getAttribute("aria-hidden");null!==a&&"false"!==a||(n.push(a),t.push(r),r.setAttribute("aria-hidden","true"))}})),function(){t.forEach((function(e,t){var r=n[t];null===r?e.removeAttribute("aria-hidden"):e.setAttribute("aria-hidden",r)}))}}(m.current):void 0}),[]),e.createElement(Nn,{autoFocus:!0,returnFocus:!0,onActivation:O},e.createElement(Qn,{allowPinchZoom:a},e.createElement("div",Object.assign({},v,{ref:E,"data-reach-dialog-overlay":"",onClick:w(c,(function(e){y.current===e.target&&(e.stopPropagation(),s(e))})),onKeyDown:w(p,(function(e){"Escape"===e.key&&(e.stopPropagation(),s(e))})),onMouseDown:w(d,(function(e){y.current=e.target}))}))))}));"production"!==process.env.NODE_ENV&&(rt.displayName="DialogOverlay",rt.propTypes=et({},tt));var it=u((function(n,t){var r=n.onClick,o=nt(n,["onClick","onKeyDown"]);return e.createElement("div",Object.assign({"aria-modal":"true",role:"dialog",tabIndex:-1},o,{ref:t,"data-reach-dialog-content":"",onClick:w(r,(function(e){e.stopPropagation()}))}))}));"production"!==process.env.NODE_ENV&&(it.displayName="DialogContent",it.propTypes={"aria-label":ut,"aria-labelledby":ut});var at=u((function(n,t){var r=n.isOpen,o=n.onDismiss,i=void 0===o?g:o,a=n.initialFocusRef,u=nt(n,["isOpen","onDismiss","initialFocusRef"]);return e.createElement(rt,{initialFocusRef:a,isOpen:r,onDismiss:i},e.createElement(it,Object.assign({ref:t},u)))}));function ut(e,n,t,r,o){var i="\nSee https://www.w3.org/TR/wai-aria/#aria-label for details.";return e["aria-label"]||e["aria-labelledby"]?e["aria-label"]&&e["aria-labelledby"]?new Error("You provided both `aria-label` and `aria-labelledby` props to a <"+t+">. If the a label for this component is visible on the screen, that label's component should be given a unique ID prop, and that ID should be passed as the `aria-labelledby` prop into <"+t+">. If the label cannot be determined programmatically from the content of the element, an alternative label should be provided as the `aria-label` prop, which will be used as an `aria-label` on the HTML tag."+i):null!=e[n]&&"string"!=typeof e[n]?new Error("Invalid prop `"+n+"` supplied to `"+t+"`. Expected `string`, received `"+(Array.isArray(o)?"array":typeof o)+"`."):null:new Error("A <"+t+"> must have either an `aria-label` or `aria-labelledby` prop.\n "+i)}"production"!==process.env.NODE_ENV&&(at.displayName="Dialog",at.propTypes={isOpen:de.bool,onDismiss:de.func,"aria-label":ut,"aria-labelledby":ut});export{it as ModalDialogPrimitiveContent,rt as ModalDialogPrimitiveOverlay}; | ||
var xe=function(){return(xe=Object.assign||function(e){for(var n,t=1,r=arguments.length;t<r;t++)for(var o in n=arguments[t])Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o]);return e}).apply(this,arguments)};function Ne(e,n){var t={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&n.indexOf(r)<0&&(t[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)n.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(t[r[o]]=e[r[o]])}return t}function Pe(e){return e}function Ce(e,n){void 0===n&&(n=Pe);var t=[],r=!1;return{read:function(){if(r)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return t.length?t[t.length-1]:e},useMedium:function(e){var o=n(e,r);return t.push(o),function(){t=t.filter((function(e){return e!==o}))}},assignSyncMedium:function(e){for(r=!0;t.length;){var n=t;t=[],n.forEach(e)}t={push:function(n){return e(n)},filter:function(){return t}}},assignMedium:function(e){r=!0;var n=[];if(t.length){var o=t;t=[],o.forEach(e),n=t}var i=function(){var t=n;n=[],t.forEach(e)},a=function(){return Promise.resolve().then(i)};a(),t={push:function(e){n.push(e),a()},filter:function(e){return n=n.filter(e),t}}}}}function Te(e,n){return void 0===n&&(n=Pe),Ce(e,n)}function ke(e){void 0===e&&(e={});var n=Ce(null);return n.options=xe({async:!0,ssr:!1},e),n}var je=function(e){var n=e.sideCar,t=Ne(e,["sideCar"]);if(!n)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var r=n.read();if(!r)throw new Error("Sidecar medium not found");return o(r,xe({},t))};je.isSideCarExport=!0;var De=Te({},(function(e){return{target:e.target,currentTarget:e.currentTarget}})),_e=Te(),Ie=Te(),Me=ke({async:!0}),Fe=[],Ae=a((function(e,n){var a,l=r(),s=l[0],f=l[1],d=t(),p=t(!1),v=t(null),y=e.children,m=e.disabled,h=e.noFocusGuards,b=e.persistentFocus,g=e.crossFrame,w=e.autoFocus,E=e.allowTextSelection,S=e.group,x=e.className,N=e.whiteList,P=e.shards,C=void 0===P?Fe:P,T=e.as,k=void 0===T?"div":T,j=e.lockProps,D=void 0===j?{}:j,_=e.sideCar,I=e.returnFocus,M=e.onActivation,F=e.onDeactivation,A=r({})[0],$=u((function(){v.current=v.current||document&&document.activeElement,d.current&&M&&M(d.current),p.current=!0}),[M]),R=u((function(){p.current=!1,F&&F(d.current)}),[F]),L=u((function(e){var n=v.current;if(Boolean(I)&&n&&n.focus){var t="object"==typeof I?I:void 0;v.current=null,e?Promise.resolve().then((function(){return n.focus(t)})):n.focus(t)}}),[I]),V=u((function(e){p.current&&De.useMedium(e)}),[]),B=_e.useMedium,W=u((function(e){d.current!==e&&(d.current=e,f(e))}),[]);"production"!==process.env.NODE_ENV&&(void 0!==E&&console.warn("React-Focus-Lock: allowTextSelection is deprecated and enabled by default"),c((function(){d.current||console.error("FocusLock: could not obtain ref to internal node")}),[]));var q=O(((a={})["data-focus-lock-disabled"]=m&&"disabled",a["data-focus-lock"]=S,a),D),Y=!0!==h,z=Y&&"tail"!==h,U=Ee([n,W]);return o(i,null,Y&&[o("div",{key:"guard-first","data-focus-guard":!0,tabIndex:m?-1:0,style:Oe}),o("div",{key:"guard-nearest","data-focus-guard":!0,tabIndex:m?-1:1,style:Oe})],!m&&o(_,{id:A,sideCar:Me,observed:s,disabled:m,persistentFocus:b,crossFrame:g,autoFocus:w,whiteList:N,shards:C,onActivation:$,onDeactivation:R,returnFocus:L}),o(k,O({ref:U},q,{className:x,onBlur:B,onFocus:V}),y),z&&o("div",{"data-focus-guard":!0,tabIndex:m?-1:0,style:Oe}))}));Ae.propTypes="production"!==process.env.NODE_ENV?{children:be,disabled:pe,returnFocus:ge([pe,ye]),noFocusGuards:pe,allowTextSelection:pe,autoFocus:pe,persistentFocus:pe,crossFrame:pe,group:me,className:me,whiteList:ve,shards:we(he),as:ge([me,ve,ye]),lockProps:ye,onActivation:ve,onDeactivation:ve,sideCar:he.isRequired}:{},Ae.defaultProps={children:void 0,disabled:!1,returnFocus:!1,noFocusGuards:!1,autoFocus:!0,persistentFocus:!1,crossFrame:!0,allowTextSelection:void 0,group:void 0,className:void 0,whiteList:void 0,shards:void 0,as:"div",lockProps:{},onActivation:void 0,onDeactivation:void 0};var $e=function(e){for(var n=Array(e.length),t=0;t<e.length;++t)n[t]=e[t];return n},Re=function(e){return Array.isArray(e)?e:[e]},Le=function(e,n){var t=e.tabIndex-n.tabIndex,r=e.index-n.index;if(t){if(!e.tabIndex)return 1;if(!n.tabIndex)return-1}return t||r},Ve=function(e,n,t){return $e(e).map((function(e,n){return{node:e,index:n,tabIndex:t&&-1===e.tabIndex?(e.dataset||{}).focusGuard?0:-1:e.tabIndex}})).filter((function(e){return!n||e.tabIndex>=0})).sort(Le)},Be=["button:enabled:not([readonly])","select:enabled:not([readonly])","textarea:enabled:not([readonly])","input:enabled:not([readonly])","a[href]","area[href]","iframe","object","embed","[tabindex]","[contenteditable]","[autofocus]"],We=Be.join(","),qe=We+", [data-focus-guard]",Ye=function(e,n){return e.reduce((function(e,t){return e.concat($e(t.querySelectorAll(n?qe:We)),t.parentNode?$e(t.parentNode.querySelectorAll(Be.join(","))).filter((function(e){return e===t})):[])}),[])},ze=function e(n){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return t.push(n),n.parentNode&&e(n.parentNode,t),t},Ue=function(e,n){for(var t=ze(e),r=ze(n),o=0;o<t.length;o+=1){var i=t[o];if(r.indexOf(i)>=0)return i}return!1},Ge=function(e){return $e(e).filter((function(e){return function e(n){return!n||n===document||n.nodeType===Node.DOCUMENT_NODE||!((t=window.getComputedStyle(n,null))&&t.getPropertyValue&&("none"===t.getPropertyValue("display")||"hidden"===t.getPropertyValue("visibility")))&&e(n.parentNode);var t}(e)})).filter((function(e){return function(e){return!(("INPUT"===e.tagName||"BUTTON"===e.tagName)&&("hidden"===e.type||e.disabled))}(e)}))},Xe=function(e,n){return Ve(Ge(Ye(e,n)),!0,n)},Ze=function(e){return Ge((n=e.querySelectorAll("[data-autofocus-inside]"),$e(n).map((function(e){return Ye([e])})).reduce((function(e,n){return e.concat(n)}),[])));var n},He=function(e){return"INPUT"===e.tagName&&"radio"===e.type},Ke=function(e,n){return n.filter(He).filter((function(n){return n.name===e.name})).filter((function(e){return e.checked}))[0]||e},Je=function(e){return e[0]&&e.length>1&&He(e[0])&&e[0].name?Ke(e[0],e):e[0]},Qe=function(e,n){return e.length>1&&He(e[n])&&e[n].name?e.indexOf(Ke(e[n],e)):n},en="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},nn=function(e){return Re(e).filter(Boolean).reduce((function(e,n){var t=n.getAttribute("data-focus-lock");return e.push.apply(e,t?function e(n){for(var t=n.length,r=0;r<t;r+=1)for(var o=function(t){if(r!==t&&n[r].contains(n[t]))return{v:e(n.filter((function(e){return e!==n[t]})))}},i=0;i<t;i+=1){var a=o(i);if("object"===(void 0===a?"undefined":en(a)))return a.v}return n}($e(function e(n){return n.parentNode?e(n.parentNode):n}(n).querySelectorAll('[data-focus-lock="'+t+'"]:not([data-focus-lock-disabled="disabled"])'))):[n]),e}),[])},tn=function(e){return e&&e.dataset&&e.dataset.focusGuard},rn=function(e){return!tn(e)},on=function(e,n,t){var r=Re(e),o=Re(n),i=r[0],a=null;return o.filter(Boolean).forEach((function(e){a=Ue(a||e,e)||a,t.filter(Boolean).forEach((function(e){var n=Ue(i,e);n&&(a=!a||n.contains(a)?n:Ue(n,a))}))})),a},an=function(e,n){var t=document&&document.activeElement,r=nn(e).filter(rn),o=on(t||e,e,r),i=Xe(r).filter((function(e){var n=e.node;return rn(n)}));if(i[0]||(i=(a=r,Ve(Ge(Ye(a)),!1)).filter((function(e){var n=e.node;return rn(n)})))[0]){var a,u,c,l,s,f=Xe([o]).map((function(e){return e.node})),d=(u=f,c=i,l=new Map,c.forEach((function(e){return l.set(e.node,e)})),u.map((function(e){return l.get(e)})).filter(Boolean)),p=d.map((function(e){return e.node})),v=function(e,n,t,r,o){var i=e.length,a=e[0],u=e[i-1],c=tn(t);if(!(e.indexOf(t)>=0)){var l=n.indexOf(t),s=n.indexOf(r||l),f=e.indexOf(r),d=l-s,p=n.indexOf(a),v=n.indexOf(u),y=Qe(e,0),m=Qe(e,i-1);return-1===l||-1===f?e.indexOf(o&&o.length?Je(o):Je(e)):!d&&f>=0?f:l<=p&&c&&Math.abs(d)>1?m:l>=p&&c&&Math.abs(d)>1?y:d&&Math.abs(d)>1?f:l<=p?m:l>v?y:d?Math.abs(d)>1?f:(i+f+d)%i:void 0}}(p,f,t,n,p.filter((s=function(e){return e.reduce((function(e,n){return e.concat(Ze(n))}),[])}(r),function(e){return!!e.autofocus||e.dataset&&!!e.dataset.autofocus||s.indexOf(e)>=0})));return void 0===v?v:d[v]}},un=function(e){return e===document.activeElement},cn=function(e){var n=document&&document.activeElement;return!(!n||n.dataset&&n.dataset.focusGuard)&&nn(e).reduce((function(e,t){return e||t.contains(n)||function(e){return n=$e(e.querySelectorAll("iframe")),t=un,!!n.filter((function(e){return e===t}))[0];var n,t}(t)}),!1)},ln=0,sn=!1,fn=function(e,n){var t,r=an(e,n);if(!sn&&r){if(ln>2)return console.error("FocusLock: focus-fighting detected. Only one focus management system could be active. See https://github.com/theKashey/focus-lock/#focus-fighting"),sn=!0,void setTimeout((function(){sn=!1}),1);ln++,(t=r.node).focus(),t.contentWindow&&t.contentWindow.focus(),ln--}};function dn(e){var n=window.setImmediate;void 0!==n?n(e):setTimeout(e,1)}var pn=function(){return document&&document.activeElement===document.body||document&&$e(document.querySelectorAll("[data-no-focus-lock]")).some((function(e){return e.contains(document.activeElement)}))},vn=null,yn=null,mn=null,hn=!1,bn=function(){return!0};function gn(e,n,t,r){var o=null,i=e;do{var a=r[i];if(a.guard)a.node.dataset.focusAutoGuard&&(o=a);else{if(!a.lockItem)break;if(i!==e)return;o=null}}while((i+=t)!==n);o&&(o.node.tabIndex=0)}var wn=function(e){return e&&"current"in e?e.current:e},En=function(){var e,n,t,r,o,i,a=!1;if(vn){var u=vn,c=u.observed,l=u.persistentFocus,s=u.autoFocus,f=u.shards,d=u.crossFrame,p=c||mn&&mn.portaledElement,v=document&&document.activeElement;if(p){var y=[p].concat(f.map(wn).filter(Boolean));if(v&&!function(e){return(vn.whiteList||bn)(e)}(v)||(l||(d?Boolean(hn):"meanwhile"===hn)||!pn()||!yn&&s)&&(!p||cn(y)||(i=v,mn&&mn.portaledElement===i)||(document&&!yn&&v&&!s?(v.blur(),document.body.focus()):(a=fn(y,yn),mn={})),hn=!1,yn=document&&document.activeElement),document){var m=document&&document.activeElement,h=(n=nn(e=y).filter(rn),t=on(e,e,n),r=Xe([t],!0),o=Xe(n).filter((function(e){var n=e.node;return rn(n)})).map((function(e){return e.node})),r.map((function(e){var n=e.node;return{node:n,index:e.index,lockItem:o.indexOf(n)>=0,guard:tn(n)}}))),b=h.find((function(e){return e.node===m}));if(b){h.filter((function(e){var n=e.guard,t=e.node;return n&&t.dataset.focusAutoGuard})).forEach((function(e){return e.node.removeAttribute("tabIndex")}));var g=h.indexOf(b);gn(g,h.length,1,h),gn(g,-1,-1,h)}}}}return a},On=function(e){En()&&e&&(e.stopPropagation(),e.preventDefault())},Sn=function(){return dn(En)},xn=function(e){var n=e.target,t=e.currentTarget;t.contains(n)||(mn={observerNode:t,portaledElement:n})};"production"!==process.env.NODE_ENV&&de.node.isRequired;var Nn=function(){hn="just",setTimeout((function(){hn="meanwhile"}),0)};De.assignSyncMedium(xn),_e.assignMedium(Sn),Ie.assignMedium((function(e){return e({moveFocusInside:fn,focusInside:cn})}));var Pn=function(n,t){if("production"!==process.env.NODE_ENV){if("function"!=typeof n)throw new Error("Expected reducePropsToState to be a function.");if("function"!=typeof t)throw new Error("Expected handleStateChangeOnClient to be a function.")}return function(r){if("production"!==process.env.NODE_ENV&&"function"!=typeof r)throw new Error("Expected WrappedComponent to be a React component.");var o,i=[];function a(){o=n(i.map((function(e){return e.props}))),t(o)}var u,c,s,f=function(n){var t,u;function c(){return n.apply(this,arguments)||this}u=n,(t=c).prototype=Object.create(u.prototype),t.prototype.constructor=t,t.__proto__=u,c.peek=function(){return o};var l=c.prototype;return l.componentDidMount=function(){i.push(this),a()},l.componentDidUpdate=function(){a()},l.componentWillUnmount=function(){var e=i.indexOf(this);i.splice(e,1),a()},l.render=function(){return e.createElement(r,this.props)},c}(l);return u=f,c="displayName",s="SideEffect("+function(e){return e.displayName||e.name||"Component"}(r)+")",c in u?Object.defineProperty(u,c,{value:s,enumerable:!0,configurable:!0,writable:!0}):u[c]=s,f}}((function(e){return e.filter((function(e){return!e.disabled}))}),(function(e){var n=e.slice(-1)[0];n&&!vn&&(document.addEventListener("focusin",On,!0),document.addEventListener("focusout",Sn),window.addEventListener("blur",Nn));var t=vn,r=t&&n&&n.id===t.id;vn=n,t&&!r&&(t.onDeactivation(),e.filter((function(e){return e.id===t.id})).length||t.returnFocus(!n)),n?(yn=null,r&&t.observed===n.observed||n.onActivation(),En(),dn(En)):(document.removeEventListener("focusin",On,!0),document.removeEventListener("focusout",Sn),window.removeEventListener("blur",Nn),yn=null)}))((function(){return null})),Cn=a((function(e,n){return o(Ae,O({sideCar:Pn,ref:n},e))})),Tn=Ae.propTypes||{},kn=(Tn.sideCar,function(e,n){if(null==e)return{};var t,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)t=i[r],n.indexOf(t)>=0||(o[t]=e[t]);return o}(Tn,["sideCar"]));Cn.propTypes=kn;var jn=ke(),Dn=function(){},_n=a((function(e,n){var a=t(null),u=r({onScrollCapture:Dn,onWheelCapture:Dn,onTouchMoveCapture:Dn}),c=u[0],l=u[1],d=e.forwardProps,p=e.children,v=e.className,y=e.removeScrollBar,m=e.enabled,h=e.shards,b=e.sideCar,g=e.noIsolation,w=e.inert,E=e.allowPinchZoom,O=Ne(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom"]),S=b,x=xe({ref:Ee([a,n])},O,c);return o(i,null,m&&o(S,{sideCar:jn,removeScrollBar:y,shards:h,noIsolation:g,inert:w,setCallbacks:l,allowPinchZoom:!!E,lockRef:a}),d?s(f.only(p),x):o("div",xe({},x,{className:v}),p))}));_n.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},_n.classNames={fullWidth:"width-before-scroll-bar",zeroRight:"right-scroll-bar-position"};function In(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var n=function(){if("undefined"!=typeof __webpack_nonce__)return __webpack_nonce__}();return n&&e.setAttribute("nonce",n),e}var Mn=function(){var e=0,n=null;return{add:function(t){var r,o;0==e&&(n=In())&&(o=t,(r=n).styleSheet?r.styleSheet.cssText=o:r.appendChild(document.createTextNode(o)),function(e){(document.head||document.getElementsByTagName("head")[0]).appendChild(e)}(n)),e++},remove:function(){!--e&&n&&(n.parentNode&&n.parentNode.removeChild(n),n=null)}}},Fn=function(){var e,n=(e=Mn(),function(n){c((function(){return e.add(n),function(){e.remove()}}),[])});return function(e){var t=e.styles;return n(t),null}},An={left:0,top:0,right:0,gap:0},$n=function(e){return parseInt(e||"",10)||0},Rn=function(e){if(void 0===e&&(e="margin"),"undefined"==typeof window)return An;var n=function(e){var n=window.getComputedStyle(document.body),t=n["padding"===e?"paddingLeft":"marginLeft"],r=n["padding"===e?"paddingTop":"marginTop"],o=n["padding"===e?"paddingRight":"marginRight"];return[$n(t),$n(r),$n(o)]}(e),t=document.documentElement.clientWidth,r=window.innerWidth;return{left:n[0],top:n[1],right:n[2],gap:Math.max(0,r-t+n[2]-n[0])}},Ln=Fn(),Vn=function(e,n,t,r){var o=e.left,i=e.top,a=e.right,u=e.gap;return void 0===t&&(t="margin"),"\n .with-scroll-bars-hidden {\n overflow: hidden "+r+";\n padding-right: "+u+"px "+r+";\n }\n body {\n overflow: hidden "+r+";\n "+[n&&"position: relative "+r+";","margin"===t&&"\n padding-left: "+o+"px;\n padding-top: "+i+"px;\n padding-right: "+a+"px;\n margin-left:0;\n margin-top:0;\n margin-right: "+u+"px "+r+";\n ","padding"===t&&"padding-right: "+u+"px "+r+";"].filter(Boolean).join("")+"\n }\n \n .right-scroll-bar-position {\n right: "+u+"px "+r+";\n }\n \n .width-before-scroll-bar {\n margin-right: "+u+"px "+r+";\n }\n \n .right-scroll-bar-position .right-scroll-bar-position {\n right: 0 "+r+";\n }\n \n .width-before-scroll-bar .width-before-scroll-bar {\n margin-right: 0 "+r+";\n }\n"},Bn=function(e){var n=r(Rn(e.gapMode)),t=n[0],i=n[1];c((function(){i(Rn(e.gapMode))}),[e.gapMode]);var a=e.noRelative,u=e.noImportant,l=e.gapMode;return o(Ln,{styles:Vn(t,!a,void 0===l?"margin":l,u?"":"!important")})},Wn=function(e,n){var t=n;do{if(qn(e,t)){var r=Yn(e,t);if(r[1]>r[2])return!0}t=t.parentNode}while(t&&t!==document.body);return!1},qn=function(e,n){return"v"===e?function(e){var n=window.getComputedStyle(e);return"hidden"!==n.overflowY&&!(n.overflowY===n.overflowX&&"visible"===n.overflowY)}(n):function(e){var n=window.getComputedStyle(e);return"hidden"!==n.overflowX&&!(n.overflowY===n.overflowX&&"visible"===n.overflowX)}(n)},Yn=function(e,n){return"v"===e?[(t=n).scrollTop,t.scrollHeight,t.clientHeight]:function(e){return[e.scrollLeft,e.scrollWidth,e.clientWidth]}(n);var t},zn=!1;if("undefined"!=typeof window)try{var Un=Object.defineProperty({},"passive",{get:function(){return zn=!0,!0}});window.addEventListener("test",Un,Un),window.removeEventListener("test",Un,Un)}catch(e){zn=!1}var Gn=!!zn&&{passive:!1},Xn=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},Zn=function(e){return[e.deltaX,e.deltaY]},Hn=function(e){return e&&"current"in e?e.current:e},Kn=function(e){return"\n .block-interactivity-"+e+" {pointer-events: none;}\n .allow-interactivity-"+e+" {pointer-events: all;}\n"},Jn=0,Qn=[];var et,nt=(et=function(e){var n=t([]),a=t([0,0]),l=t(),s=r(Jn++)[0],f=r((function(){return Fn()}))[0],d=t(e);c((function(){d.current=e}),[e]),c((function(){if(e.inert){document.body.classList.add("block-interactivity-"+s);var n=[e.lockRef.current].concat((e.shards||[]).map(Hn)).filter(Boolean);return n.forEach((function(e){return e.classList.add("allow-interactivity-"+s)})),function(){document.body.classList.remove("block-interactivity-"+s),n.forEach((function(e){return e.classList.remove("allow-interactivity-"+s)}))}}}),[e.inert,e.lockRef.current,e.shards]);var p=u((function(e,n){if("touches"in e&&2===e.touches.length)return!d.current.allowPinchZoom;var t,r=Xn(e),o=a.current,i="deltaX"in e?e.deltaX:o[0]-r[0],u="deltaY"in e?e.deltaY:o[1]-r[1],c=e.target,s=Math.abs(i)>Math.abs(u)?"h":"v",f=Wn(s,c);if(!f)return!0;if(f?t=s:(t="v"===s?"h":"v",f=Wn(s,c)),!f)return!1;if(!l.current&&"changedTouches"in e&&(i||u)&&(l.current=t),!t)return!0;var p=l.current||t;return function(e,n,t,r,o){var i=r,a=t.target,u=n.contains(a),c=!1,l=i>0,s=0,f=0;do{var d=Yn(e,a),p=d[0],v=d[1]-d[2]-p;(p||v)&&qn(e,a)&&(s+=v,f+=p),a=a.parentNode}while(!u&&a!==document.body||u&&(n.contains(a)||n===a));return(l&&(o&&0===s||!o&&i>s)||!l&&(o&&0===f||!o&&-i>f))&&(c=!0),c}(p,n,e,"h"==p?i:u,!0)}),[]),v=u((function(e){var t=e;if(Qn.length&&Qn[Qn.length-1]===f){var r="deltaY"in t?Zn(t):Xn(t),o=n.current.filter((function(e){return e.name===t.type&&e.target===t.target&&function(e,n){return e[0]===n[0]&&e[1]===n[1]}(e.delta,r)}))[0];if(o&&o.should)t.preventDefault();else if(!o){var i=(d.current.shards||[]).map(Hn).filter(Boolean).filter((function(e){return e.contains(t.target)}));(i.length>0?p(t,i[0]):!d.current.noIsolation)&&t.preventDefault()}}}),[]),y=u((function(e,t,r,o){var i={name:e,delta:t,target:r,should:o};n.current.push(i),setTimeout((function(){n.current=n.current.filter((function(e){return e!==i}))}),1)}),[]),m=u((function(e){a.current=Xn(e),l.current=void 0}),[]),h=u((function(n){y(n.type,Zn(n),n.target,p(n,e.lockRef.current))}),[]),b=u((function(n){y(n.type,Xn(n),n.target,p(n,e.lockRef.current))}),[]);c((function(){return Qn.push(f),e.setCallbacks({onScrollCapture:h,onWheelCapture:h,onTouchMoveCapture:b}),document.addEventListener("wheel",v,Gn),document.addEventListener("touchmove",v,Gn),document.addEventListener("touchstart",m,Gn),function(){Qn=Qn.filter((function(e){return e!==f})),document.removeEventListener("wheel",v,Gn),document.removeEventListener("touchmove",v,Gn),document.removeEventListener("touchstart",m,Gn)}}),[]);var g=e.removeScrollBar,w=e.inert;return o(i,null,w?o(f,{styles:Kn(s)}):null,g?o(Bn,{gapMode:"margin"}):null)},jn.useMedium(et),je),tt=a((function(e,n){return o(_n,xe({},e,{ref:n,sideCar:nt}))}));function rt(){return(rt=Object.assign||function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])}return e}).apply(this,arguments)}function ot(e,n){if(null==e)return{};var t,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)t=i[r],n.indexOf(t)>=0||(o[t]=e[t]);return o}tt.classNames=_n.classNames;var it={initialFocusRef:function(){return null},allowPinchZoom:de.bool,onDismiss:de.func},at=a((function(n,t){var r=n.isOpen,o=void 0===r||r,i=ot(n,["isOpen"]);return c((function(){return y("dialog")}),[]),o?e.createElement(E,{"data-reach-dialog-wrapper":""},e.createElement(ut,Object.assign({ref:t},i))):null}));"production"!==process.env.NODE_ENV&&(at.displayName="DialogOverlay",at.propTypes=rt({},it,{isOpen:de.bool}));var ut=a((function(r,o){var i=r.allowPinchZoom,a=r.initialFocusRef,l=r.onClick,s=r.onDismiss,f=void 0===s?g:s,d=r.onMouseDown,p=r.onKeyDown,v=ot(r,["allowPinchZoom","initialFocusRef","onClick","onDismiss","onMouseDown","onKeyDown"]),y=t(null),m=t(null),E=function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return n((function(){return t.every((function(e){return null==e}))?null:function(e){t.forEach((function(n){h(n,e)}))}}),t)}(m,o),O=u((function(){a&&a.current&&a.current.focus()}),[a]);return c((function(){return m.current?function(e){var n=[],t=[],r=(o=e,(o&&o.ownerDocument?o.ownerDocument:b()?document:null)||document);var o;if(!e)return"production"!==process.env.NODE_ENV&&console.warn("A ref has not yet been attached to a dialog node when attempting to call `createAriaHider`."),g;return Array.prototype.forEach.call(r.querySelectorAll("body > *"),(function(r){var o,i;if(r!==(null===(o=e.parentNode)||void 0===o||null===(i=o.parentNode)||void 0===i?void 0:i.parentNode)){var a=r.getAttribute("aria-hidden");null!==a&&"false"!==a||(n.push(a),t.push(r),r.setAttribute("aria-hidden","true"))}})),function(){t.forEach((function(e,t){var r=n[t];null===r?e.removeAttribute("aria-hidden"):e.setAttribute("aria-hidden",r)}))}}(m.current):void 0}),[]),e.createElement(Cn,{autoFocus:!0,returnFocus:!0,onActivation:O},e.createElement(tt,{allowPinchZoom:i},e.createElement("div",Object.assign({},v,{ref:E,"data-reach-dialog-overlay":"",onClick:w(l,(function(e){y.current===e.target&&(e.stopPropagation(),f(e))})),onKeyDown:w(p,(function(e){"Escape"===e.key&&(e.stopPropagation(),f(e))})),onMouseDown:w(d,(function(e){y.current=e.target}))}))))}));"production"!==process.env.NODE_ENV&&(at.displayName="DialogOverlay",at.propTypes=rt({},it));var ct=a((function(n,t){var r=n.onClick,o=ot(n,["onClick","onKeyDown"]);return e.createElement("div",Object.assign({"aria-modal":"true",role:"dialog",tabIndex:-1},o,{ref:t,"data-reach-dialog-content":"",onClick:w(r,(function(e){e.stopPropagation()}))}))}));"production"!==process.env.NODE_ENV&&(ct.displayName="DialogContent",ct.propTypes={"aria-label":st,"aria-labelledby":st});var lt=a((function(n,t){var r=n.isOpen,o=n.onDismiss,i=void 0===o?g:o,a=n.initialFocusRef,u=ot(n,["isOpen","onDismiss","initialFocusRef"]);return e.createElement(at,{initialFocusRef:a,isOpen:r,onDismiss:i},e.createElement(ct,Object.assign({ref:t},u)))}));function st(e,n,t,r,o){var i="\nSee https://www.w3.org/TR/wai-aria/#aria-label for details.";return e["aria-label"]||e["aria-labelledby"]?e["aria-label"]&&e["aria-labelledby"]?new Error("You provided both `aria-label` and `aria-labelledby` props to a <"+t+">. If the a label for this component is visible on the screen, that label's component should be given a unique ID prop, and that ID should be passed as the `aria-labelledby` prop into <"+t+">. If the label cannot be determined programmatically from the content of the element, an alternative label should be provided as the `aria-label` prop, which will be used as an `aria-label` on the HTML tag."+i):null!=e[n]&&"string"!=typeof e[n]?new Error("Invalid prop `"+n+"` supplied to `"+t+"`. Expected `string`, received `"+(Array.isArray(o)?"array":typeof o)+"`."):null:new Error("A <"+t+"> must have either an `aria-label` or `aria-labelledby` prop.\n "+i)}"production"!==process.env.NODE_ENV&&(lt.displayName="Dialog",lt.propTypes={isOpen:de.bool,onDismiss:de.func,"aria-label":st,"aria-labelledby":st});export{ct as ModalDialogPrimitiveContent,at as ModalDialogPrimitiveOverlay}; |
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e,n=require("react"),t=(e=n)&&"object"==typeof e&&"default"in e?e.default:e,r=require("react-dom"),o=(process.env.NODE_ENV,l()?t.useLayoutEffect:t.useEffect),a={},i=function(e){};if("production"!==process.env.NODE_ENV){var u=("undefined"!=typeof process?process:{env:{NODE_ENV:"development"}}).env;i=function(e){a[e]||(a[e]=!0,"test"!==u.NODE_ENV&&1!==parseInt(window.getComputedStyle(document.body).getPropertyValue("--reach-"+e),10)&&console.warn("@reach/"+e+' styles not found. If you are using a bundler like webpack or parcel include this in the entry file of your app before any of your own styles:\n\n import "@reach/'+e+'/styles.css";\n\n Otherwise you\'ll need to include them some other way:\n\n <link rel="stylesheet" type="text/css" href="node_modules/@reach/'+e+'/styles.css" />\n\n For more information visit https://ui.reach.tech/styling.\n '))}}function c(e,n){if(null!=e)if(function(e){return!(!e||"[object Function]"!={}.toString.call(e))}(e))e(n);else try{e.current=n}catch(t){throw new Error('Cannot assign value "'+n+'" to ref "'+e+'"')}}function l(){return"undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement}function s(){}function f(e,n){return function(t){if(e&&e(t),!t.defaultPrevented)return n(t)}}var d=function(e){var a=e.children,i=e.type,u=void 0===i?"reach-portal":i,c=n.useRef(null),l=n.useRef(null),s=n.useState()[1];return o((function(){var e=c.current.ownerDocument;return l.current=null==e?void 0:e.createElement(u),e.body.appendChild(l.current),s({}),function(){l.current&&l.current.ownerDocument&&l.current.ownerDocument.body.removeChild(l.current)}}),[u]),l.current?r.createPortal(a,l.current):t.createElement("span",{ref:c})};function p(){return(p=Object.assign||function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])}return e}).apply(this,arguments)}function v(e,n){return e(n={exports:{}},n.exports),n.exports | ||
/** @license React v16.13.0 | ||
/** @license React v16.13.1 | ||
* react-is.production.min.js | ||
@@ -9,3 +9,3 @@ * | ||
* LICENSE file in the root directory of this source tree. | ||
*/}"production"!==process.env.NODE_ENV&&(d.displayName="Portal");var m="function"==typeof Symbol&&Symbol.for,y=m?Symbol.for("react.element"):60103,h=m?Symbol.for("react.portal"):60106,b=m?Symbol.for("react.fragment"):60107,g=m?Symbol.for("react.strict_mode"):60108,w=m?Symbol.for("react.profiler"):60114,E=m?Symbol.for("react.provider"):60109,O=m?Symbol.for("react.context"):60110,S=m?Symbol.for("react.async_mode"):60111,x=m?Symbol.for("react.concurrent_mode"):60111,N=m?Symbol.for("react.forward_ref"):60112,C=m?Symbol.for("react.suspense"):60113,P=m?Symbol.for("react.suspense_list"):60120,k=m?Symbol.for("react.memo"):60115,T=m?Symbol.for("react.lazy"):60116,j=m?Symbol.for("react.block"):60121,D=m?Symbol.for("react.fundamental"):60117,R=m?Symbol.for("react.responder"):60118,I=m?Symbol.for("react.scope"):60119;function M(e){if("object"==typeof e&&null!==e){var n=e.$$typeof;switch(n){case y:switch(e=e.type){case S:case x:case b:case w:case g:case C:return e;default:switch(e=e&&e.$$typeof){case O:case N:case T:case k:case E:return e;default:return n}}case h:return n}}}function _(e){return M(e)===x}var F={AsyncMode:S,ConcurrentMode:x,ContextConsumer:O,ContextProvider:E,Element:y,ForwardRef:N,Fragment:b,Lazy:T,Memo:k,Portal:h,Profiler:w,StrictMode:g,Suspense:C,isAsyncMode:function(e){return _(e)||M(e)===S},isConcurrentMode:_,isContextConsumer:function(e){return M(e)===O},isContextProvider:function(e){return M(e)===E},isElement:function(e){return"object"==typeof e&&null!==e&&e.$$typeof===y},isForwardRef:function(e){return M(e)===N},isFragment:function(e){return M(e)===b},isLazy:function(e){return M(e)===T},isMemo:function(e){return M(e)===k},isPortal:function(e){return M(e)===h},isProfiler:function(e){return M(e)===w},isStrictMode:function(e){return M(e)===g},isSuspense:function(e){return M(e)===C},isValidElementType:function(e){return"string"==typeof e||"function"==typeof e||e===b||e===x||e===w||e===g||e===C||e===P||"object"==typeof e&&null!==e&&(e.$$typeof===T||e.$$typeof===k||e.$$typeof===E||e.$$typeof===O||e.$$typeof===N||e.$$typeof===D||e.$$typeof===R||e.$$typeof===I||e.$$typeof===j)},typeOf:M},A=v((function(e,n){"production"!==process.env.NODE_ENV&&function(){var e="function"==typeof Symbol&&Symbol.for,t=e?Symbol.for("react.element"):60103,r=e?Symbol.for("react.portal"):60106,o=e?Symbol.for("react.fragment"):60107,a=e?Symbol.for("react.strict_mode"):60108,i=e?Symbol.for("react.profiler"):60114,u=e?Symbol.for("react.provider"):60109,c=e?Symbol.for("react.context"):60110,l=e?Symbol.for("react.async_mode"):60111,s=e?Symbol.for("react.concurrent_mode"):60111,f=e?Symbol.for("react.forward_ref"):60112,d=e?Symbol.for("react.suspense"):60113,p=e?Symbol.for("react.suspense_list"):60120,v=e?Symbol.for("react.memo"):60115,m=e?Symbol.for("react.lazy"):60116,y=e?Symbol.for("react.block"):60121,h=e?Symbol.for("react.fundamental"):60117,b=e?Symbol.for("react.responder"):60118,g=e?Symbol.for("react.scope"):60119;function w(e){if("object"==typeof e&&null!==e){var n=e.$$typeof;switch(n){case t:var p=e.type;switch(p){case l:case s:case o:case i:case a:case d:return p;default:var y=p&&p.$$typeof;switch(y){case c:case f:case m:case v:case u:return y;default:return n}}case r:return n}}}var E=l,O=s,S=c,x=u,N=t,C=f,P=o,k=m,T=v,j=r,D=i,R=a,I=d,M=!1;function _(e){return w(e)===s}n.AsyncMode=E,n.ConcurrentMode=O,n.ContextConsumer=S,n.ContextProvider=x,n.Element=N,n.ForwardRef=C,n.Fragment=P,n.Lazy=k,n.Memo=T,n.Portal=j,n.Profiler=D,n.StrictMode=R,n.Suspense=I,n.isAsyncMode=function(e){return M||(M=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")),_(e)||w(e)===l},n.isConcurrentMode=_,n.isContextConsumer=function(e){return w(e)===c},n.isContextProvider=function(e){return w(e)===u},n.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===t},n.isForwardRef=function(e){return w(e)===f},n.isFragment=function(e){return w(e)===o},n.isLazy=function(e){return w(e)===m},n.isMemo=function(e){return w(e)===v},n.isPortal=function(e){return w(e)===r},n.isProfiler=function(e){return w(e)===i},n.isStrictMode=function(e){return w(e)===a},n.isSuspense=function(e){return w(e)===d},n.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===o||e===s||e===i||e===a||e===d||e===p||"object"==typeof e&&null!==e&&(e.$$typeof===m||e.$$typeof===v||e.$$typeof===u||e.$$typeof===c||e.$$typeof===f||e.$$typeof===h||e.$$typeof===b||e.$$typeof===g||e.$$typeof===y)},n.typeOf=w}()})),$=(A.AsyncMode,A.ConcurrentMode,A.ContextConsumer,A.ContextProvider,A.Element,A.ForwardRef,A.Fragment,A.Lazy,A.Memo,A.Portal,A.Profiler,A.StrictMode,A.Suspense,A.isAsyncMode,A.isConcurrentMode,A.isContextConsumer,A.isContextProvider,A.isElement,A.isForwardRef,A.isFragment,A.isLazy,A.isMemo,A.isPortal,A.isProfiler,A.isStrictMode,A.isSuspense,A.isValidElementType,A.typeOf,v((function(e){"production"===process.env.NODE_ENV?e.exports=F:e.exports=A}))),L=Object.getOwnPropertySymbols,V=Object.prototype.hasOwnProperty,q=Object.prototype.propertyIsEnumerable;function B(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}var W=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 n={},t=0;t<10;t++)n["_"+String.fromCharCode(t)]=t;if("0123456789"!==Object.getOwnPropertyNames(n).map((function(e){return n[e]})).join(""))return!1;var r={};return"abcdefghijklmnopqrst".split("").forEach((function(e){r[e]=e})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},r)).join("")}catch(e){return!1}}()?Object.assign:function(e,n){for(var t,r,o=B(e),a=1;a<arguments.length;a++){for(var i in t=Object(arguments[a]))V.call(t,i)&&(o[i]=t[i]);if(L){r=L(t);for(var u=0;u<r.length;u++)q.call(t,r[u])&&(o[r[u]]=t[r[u]])}}return o},Y="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",z=function(){};if("production"!==process.env.NODE_ENV){var U=Y,G={},X=Function.call.bind(Object.prototype.hasOwnProperty);z=function(e){var n="Warning: "+e;"undefined"!=typeof console&&console.error(n);try{throw new Error(n)}catch(e){}}}function Z(e,n,t,r,o){if("production"!==process.env.NODE_ENV)for(var a in e)if(X(e,a)){var i;try{if("function"!=typeof e[a]){var u=Error((r||"React class")+": "+t+" type `"+a+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof e[a]+"`.");throw u.name="Invariant Violation",u}i=e[a](n,a,r,t,null,U)}catch(e){i=e}if(!i||i instanceof Error||z((r||"React class")+": type specification of "+t+" `"+a+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof i+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),i instanceof Error&&!(i.message in G)){G[i.message]=!0;var c=o?o():"";z("Failed "+t+" type: "+i.message+(null!=c?c:""))}}}Z.resetWarningCache=function(){"production"!==process.env.NODE_ENV&&(G={})};var H=Z,K=Function.call.bind(Object.prototype.hasOwnProperty),J=function(){};function Q(){return null}"production"!==process.env.NODE_ENV&&(J=function(e){var n="Warning: "+e;"undefined"!=typeof console&&console.error(n);try{throw new Error(n)}catch(e){}});var ee=function(e,n){var t="function"==typeof Symbol&&Symbol.iterator;var r={array:u("array"),bool:u("boolean"),func:u("function"),number:u("number"),object:u("object"),string:u("string"),symbol:u("symbol"),any:i(Q),arrayOf:function(e){return i((function(n,t,r,o,i){if("function"!=typeof e)return new a("Property `"+i+"` of component `"+r+"` has invalid PropType notation inside arrayOf.");var u=n[t];if(!Array.isArray(u))return new a("Invalid "+o+" `"+i+"` of type `"+l(u)+"` supplied to `"+r+"`, expected an array.");for(var c=0;c<u.length;c++){var s=e(u,c,r,o,i+"["+c+"]",Y);if(s instanceof Error)return s}return null}))},element:i((function(n,t,r,o,i){var u=n[t];return e(u)?null:new a("Invalid "+o+" `"+i+"` of type `"+l(u)+"` supplied to `"+r+"`, expected a single ReactElement.")})),elementType:i((function(e,n,t,r,o){var i=e[n];return $.isValidElementType(i)?null:new a("Invalid "+r+" `"+o+"` of type `"+l(i)+"` supplied to `"+t+"`, expected a single ReactElement type.")})),instanceOf:function(e){return i((function(n,t,r,o,i){if(!(n[t]instanceof e)){var u=e.name||"<<anonymous>>";return new a("Invalid "+o+" `"+i+"` of type `"+function(e){if(!e.constructor||!e.constructor.name)return"<<anonymous>>";return e.constructor.name}(n[t])+"` supplied to `"+r+"`, expected instance of `"+u+"`.")}return null}))},node:i((function(e,n,t,r,o){return c(e[n])?null:new a("Invalid "+r+" `"+o+"` supplied to `"+t+"`, expected a ReactNode.")})),objectOf:function(e){return i((function(n,t,r,o,i){if("function"!=typeof e)return new a("Property `"+i+"` of component `"+r+"` has invalid PropType notation inside objectOf.");var u=n[t],c=l(u);if("object"!==c)return new a("Invalid "+o+" `"+i+"` of type `"+c+"` supplied to `"+r+"`, expected an object.");for(var s in u)if(K(u,s)){var f=e(u,s,r,o,i+"."+s,Y);if(f instanceof Error)return f}return null}))},oneOf:function(e){if(!Array.isArray(e))return"production"!==process.env.NODE_ENV&&(arguments.length>1?J("Invalid arguments supplied to oneOf, expected an array, got "+arguments.length+" arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z])."):J("Invalid argument supplied to oneOf, expected an array.")),Q;function n(n,t,r,i,u){for(var c=n[t],l=0;l<e.length;l++)if(o(c,e[l]))return null;var f=JSON.stringify(e,(function(e,n){return"symbol"===s(n)?String(n):n}));return new a("Invalid "+i+" `"+u+"` of value `"+String(c)+"` supplied to `"+r+"`, expected one of "+f+".")}return i(n)},oneOfType:function(e){if(!Array.isArray(e))return"production"!==process.env.NODE_ENV&&J("Invalid argument supplied to oneOfType, expected an instance of array."),Q;for(var n=0;n<e.length;n++){var t=e[n];if("function"!=typeof t)return J("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+f(t)+" at index "+n+"."),Q}return i((function(n,t,r,o,i){for(var u=0;u<e.length;u++){if(null==(0,e[u])(n,t,r,o,i,Y))return null}return new a("Invalid "+o+" `"+i+"` supplied to `"+r+"`.")}))},shape:function(e){return i((function(n,t,r,o,i){var u=n[t],c=l(u);if("object"!==c)return new a("Invalid "+o+" `"+i+"` of type `"+c+"` supplied to `"+r+"`, expected `object`.");for(var s in e){var f=e[s];if(f){var d=f(u,s,r,o,i+"."+s,Y);if(d)return d}}return null}))},exact:function(e){return i((function(n,t,r,o,i){var u=n[t],c=l(u);if("object"!==c)return new a("Invalid "+o+" `"+i+"` of type `"+c+"` supplied to `"+r+"`, expected `object`.");var s=W({},n[t],e);for(var f in s){var d=e[f];if(!d)return new a("Invalid "+o+" `"+i+"` key `"+f+"` supplied to `"+r+"`.\nBad object: "+JSON.stringify(n[t],null," ")+"\nValid keys: "+JSON.stringify(Object.keys(e),null," "));var p=d(u,f,r,o,i+"."+f,Y);if(p)return p}return null}))}};function o(e,n){return e===n?0!==e||1/e==1/n:e!=e&&n!=n}function a(e){this.message=e,this.stack=""}function i(e){if("production"!==process.env.NODE_ENV)var t={},r=0;function o(o,i,u,c,l,s,f){if(c=c||"<<anonymous>>",s=s||u,f!==Y){if(n){var d=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types");throw d.name="Invariant Violation",d}if("production"!==process.env.NODE_ENV&&"undefined"!=typeof console){var p=c+":"+u;!t[p]&&r<3&&(J("You are manually calling a React.PropTypes validation function for the `"+s+"` prop on `"+c+"`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."),t[p]=!0,r++)}}return null==i[u]?o?null===i[u]?new a("The "+l+" `"+s+"` is marked as required in `"+c+"`, but its value is `null`."):new a("The "+l+" `"+s+"` is marked as required in `"+c+"`, but its value is `undefined`."):null:e(i,u,c,l,s)}var i=o.bind(null,!1);return i.isRequired=o.bind(null,!0),i}function u(e){return i((function(n,t,r,o,i,u){var c=n[t];return l(c)!==e?new a("Invalid "+o+" `"+i+"` of type `"+s(c)+"` supplied to `"+r+"`, expected `"+e+"`."):null}))}function c(n){switch(typeof n){case"number":case"string":case"undefined":return!0;case"boolean":return!n;case"object":if(Array.isArray(n))return n.every(c);if(null===n||e(n))return!0;var r=function(e){var n=e&&(t&&e[t]||e["@@iterator"]);if("function"==typeof n)return n}(n);if(!r)return!1;var o,a=r.call(n);if(r!==n.entries){for(;!(o=a.next()).done;)if(!c(o.value))return!1}else for(;!(o=a.next()).done;){var i=o.value;if(i&&!c(i[1]))return!1}return!0;default:return!1}}function l(e){var n=typeof e;return Array.isArray(e)?"array":e instanceof RegExp?"object":function(e,n){return"symbol"===e||!!n&&("Symbol"===n["@@toStringTag"]||"function"==typeof Symbol&&n instanceof Symbol)}(n,e)?"symbol":n}function s(e){if(null==e)return""+e;var n=l(e);if("object"===n){if(e instanceof Date)return"date";if(e instanceof RegExp)return"regexp"}return n}function f(e){var n=s(e);switch(n){case"array":case"object":return"an "+n;case"boolean":case"date":case"regexp":return"a "+n;default:return n}}return a.prototype=Error.prototype,r.checkPropTypes=H,r.resetWarningCache=H.resetWarningCache,r.PropTypes=r,r};function ne(){}function te(){}te.resetWarningCache=ne;var re=v((function(e){if("production"!==process.env.NODE_ENV){var n=$;e.exports=ee(n.isElement,!0)}else e.exports=function(){function e(e,n,t,r,o,a){if(a!==Y){var i=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw i.name="Invariant Violation",i}}function n(){return e}e.isRequired=e;var t={array:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:n,element:e,elementType:e,instanceOf:n,node:e,objectOf:n,oneOf:n,oneOfType:n,shape:n,exact:n,checkPropTypes:te,resetWarningCache:ne};return t.PropTypes=t,t}()})),oe=(re.array,re.bool),ae=re.func,ie=(re.number,re.object),ue=re.string,ce=(re.symbol,re.any),le=re.node,se=(re.element,re.elementType,re.instanceOf,re.oneOf,re.oneOfType),fe=re.arrayOf;re.objectOf,re.shape,re.exact;function de(e,t){return r=t,o=function(n){return e.forEach((function(e){return function(e,n){return"function"==typeof e?e(n):null!=e&&(e.current=n),e}(e,n)}))},(a=n.useState((function(){return{value:r,callback:o,facade:{get current(){return a.value},set current(e){var n=a.value;n!==e&&(a.value=e,a.callback(e,n))}}}}))[0]).callback=o,a.facade;var r,o,a}var pe={width:"1px",height:"0px",padding:0,overflow:"hidden",position:"fixed",top:"1px",left:"1px"},ve=function(e){var n=e.children;return t.createElement(t.Fragment,null,t.createElement("div",{key:"guard-first","data-focus-guard":!0,"data-focus-auto-guard":!0,style:pe}),n,n&&t.createElement("div",{key:"guard-last","data-focus-guard":!0,"data-focus-auto-guard":!0,style:pe}))};ve.propTypes="production"!==process.env.NODE_ENV?{children:re.node}:{},ve.defaultProps={children:null}; | ||
*/}"production"!==process.env.NODE_ENV&&(d.displayName="Portal");var m="function"==typeof Symbol&&Symbol.for,y=m?Symbol.for("react.element"):60103,h=m?Symbol.for("react.portal"):60106,b=m?Symbol.for("react.fragment"):60107,g=m?Symbol.for("react.strict_mode"):60108,w=m?Symbol.for("react.profiler"):60114,E=m?Symbol.for("react.provider"):60109,O=m?Symbol.for("react.context"):60110,S=m?Symbol.for("react.async_mode"):60111,x=m?Symbol.for("react.concurrent_mode"):60111,N=m?Symbol.for("react.forward_ref"):60112,C=m?Symbol.for("react.suspense"):60113,k=m?Symbol.for("react.suspense_list"):60120,P=m?Symbol.for("react.memo"):60115,T=m?Symbol.for("react.lazy"):60116,j=m?Symbol.for("react.block"):60121,D=m?Symbol.for("react.fundamental"):60117,_=m?Symbol.for("react.responder"):60118,R=m?Symbol.for("react.scope"):60119;function I(e){if("object"==typeof e&&null!==e){var n=e.$$typeof;switch(n){case y:switch(e=e.type){case S:case x:case b:case w:case g:case C:return e;default:switch(e=e&&e.$$typeof){case O:case N:case T:case P:case E:return e;default:return n}}case h:return n}}}function M(e){return I(e)===x}var F={AsyncMode:S,ConcurrentMode:x,ContextConsumer:O,ContextProvider:E,Element:y,ForwardRef:N,Fragment:b,Lazy:T,Memo:P,Portal:h,Profiler:w,StrictMode:g,Suspense:C,isAsyncMode:function(e){return M(e)||I(e)===S},isConcurrentMode:M,isContextConsumer:function(e){return I(e)===O},isContextProvider:function(e){return I(e)===E},isElement:function(e){return"object"==typeof e&&null!==e&&e.$$typeof===y},isForwardRef:function(e){return I(e)===N},isFragment:function(e){return I(e)===b},isLazy:function(e){return I(e)===T},isMemo:function(e){return I(e)===P},isPortal:function(e){return I(e)===h},isProfiler:function(e){return I(e)===w},isStrictMode:function(e){return I(e)===g},isSuspense:function(e){return I(e)===C},isValidElementType:function(e){return"string"==typeof e||"function"==typeof e||e===b||e===x||e===w||e===g||e===C||e===k||"object"==typeof e&&null!==e&&(e.$$typeof===T||e.$$typeof===P||e.$$typeof===E||e.$$typeof===O||e.$$typeof===N||e.$$typeof===D||e.$$typeof===_||e.$$typeof===R||e.$$typeof===j)},typeOf:I},A=v((function(e,n){"production"!==process.env.NODE_ENV&&function(){var e="function"==typeof Symbol&&Symbol.for,t=e?Symbol.for("react.element"):60103,r=e?Symbol.for("react.portal"):60106,o=e?Symbol.for("react.fragment"):60107,a=e?Symbol.for("react.strict_mode"):60108,i=e?Symbol.for("react.profiler"):60114,u=e?Symbol.for("react.provider"):60109,c=e?Symbol.for("react.context"):60110,l=e?Symbol.for("react.async_mode"):60111,s=e?Symbol.for("react.concurrent_mode"):60111,f=e?Symbol.for("react.forward_ref"):60112,d=e?Symbol.for("react.suspense"):60113,p=e?Symbol.for("react.suspense_list"):60120,v=e?Symbol.for("react.memo"):60115,m=e?Symbol.for("react.lazy"):60116,y=e?Symbol.for("react.block"):60121,h=e?Symbol.for("react.fundamental"):60117,b=e?Symbol.for("react.responder"):60118,g=e?Symbol.for("react.scope"):60119;function w(e){if("object"==typeof e&&null!==e){var n=e.$$typeof;switch(n){case t:var p=e.type;switch(p){case l:case s:case o:case i:case a:case d:return p;default:var y=p&&p.$$typeof;switch(y){case c:case f:case m:case v:case u:return y;default:return n}}case r:return n}}}var E=l,O=s,S=c,x=u,N=t,C=f,k=o,P=m,T=v,j=r,D=i,_=a,R=d,I=!1;function M(e){return w(e)===s}n.AsyncMode=E,n.ConcurrentMode=O,n.ContextConsumer=S,n.ContextProvider=x,n.Element=N,n.ForwardRef=C,n.Fragment=k,n.Lazy=P,n.Memo=T,n.Portal=j,n.Profiler=D,n.StrictMode=_,n.Suspense=R,n.isAsyncMode=function(e){return I||(I=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")),M(e)||w(e)===l},n.isConcurrentMode=M,n.isContextConsumer=function(e){return w(e)===c},n.isContextProvider=function(e){return w(e)===u},n.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===t},n.isForwardRef=function(e){return w(e)===f},n.isFragment=function(e){return w(e)===o},n.isLazy=function(e){return w(e)===m},n.isMemo=function(e){return w(e)===v},n.isPortal=function(e){return w(e)===r},n.isProfiler=function(e){return w(e)===i},n.isStrictMode=function(e){return w(e)===a},n.isSuspense=function(e){return w(e)===d},n.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===o||e===s||e===i||e===a||e===d||e===p||"object"==typeof e&&null!==e&&(e.$$typeof===m||e.$$typeof===v||e.$$typeof===u||e.$$typeof===c||e.$$typeof===f||e.$$typeof===h||e.$$typeof===b||e.$$typeof===g||e.$$typeof===y)},n.typeOf=w}()})),$=(A.AsyncMode,A.ConcurrentMode,A.ContextConsumer,A.ContextProvider,A.Element,A.ForwardRef,A.Fragment,A.Lazy,A.Memo,A.Portal,A.Profiler,A.StrictMode,A.Suspense,A.isAsyncMode,A.isConcurrentMode,A.isContextConsumer,A.isContextProvider,A.isElement,A.isForwardRef,A.isFragment,A.isLazy,A.isMemo,A.isPortal,A.isProfiler,A.isStrictMode,A.isSuspense,A.isValidElementType,A.typeOf,v((function(e){"production"===process.env.NODE_ENV?e.exports=F:e.exports=A}))),L=Object.getOwnPropertySymbols,V=Object.prototype.hasOwnProperty,B=Object.prototype.propertyIsEnumerable;function q(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}var W=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 n={},t=0;t<10;t++)n["_"+String.fromCharCode(t)]=t;if("0123456789"!==Object.getOwnPropertyNames(n).map((function(e){return n[e]})).join(""))return!1;var r={};return"abcdefghijklmnopqrst".split("").forEach((function(e){r[e]=e})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},r)).join("")}catch(e){return!1}}()?Object.assign:function(e,n){for(var t,r,o=q(e),a=1;a<arguments.length;a++){for(var i in t=Object(arguments[a]))V.call(t,i)&&(o[i]=t[i]);if(L){r=L(t);for(var u=0;u<r.length;u++)B.call(t,r[u])&&(o[r[u]]=t[r[u]])}}return o},Y="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",z=function(){};if("production"!==process.env.NODE_ENV){var U=Y,G={},X=Function.call.bind(Object.prototype.hasOwnProperty);z=function(e){var n="Warning: "+e;"undefined"!=typeof console&&console.error(n);try{throw new Error(n)}catch(e){}}}function Z(e,n,t,r,o){if("production"!==process.env.NODE_ENV)for(var a in e)if(X(e,a)){var i;try{if("function"!=typeof e[a]){var u=Error((r||"React class")+": "+t+" type `"+a+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof e[a]+"`.");throw u.name="Invariant Violation",u}i=e[a](n,a,r,t,null,U)}catch(e){i=e}if(!i||i instanceof Error||z((r||"React class")+": type specification of "+t+" `"+a+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof i+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),i instanceof Error&&!(i.message in G)){G[i.message]=!0;var c=o?o():"";z("Failed "+t+" type: "+i.message+(null!=c?c:""))}}}Z.resetWarningCache=function(){"production"!==process.env.NODE_ENV&&(G={})};var H=Z,K=Function.call.bind(Object.prototype.hasOwnProperty),J=function(){};function Q(){return null}"production"!==process.env.NODE_ENV&&(J=function(e){var n="Warning: "+e;"undefined"!=typeof console&&console.error(n);try{throw new Error(n)}catch(e){}});var ee=function(e,n){var t="function"==typeof Symbol&&Symbol.iterator;var r={array:u("array"),bool:u("boolean"),func:u("function"),number:u("number"),object:u("object"),string:u("string"),symbol:u("symbol"),any:i(Q),arrayOf:function(e){return i((function(n,t,r,o,i){if("function"!=typeof e)return new a("Property `"+i+"` of component `"+r+"` has invalid PropType notation inside arrayOf.");var u=n[t];if(!Array.isArray(u))return new a("Invalid "+o+" `"+i+"` of type `"+l(u)+"` supplied to `"+r+"`, expected an array.");for(var c=0;c<u.length;c++){var s=e(u,c,r,o,i+"["+c+"]",Y);if(s instanceof Error)return s}return null}))},element:i((function(n,t,r,o,i){var u=n[t];return e(u)?null:new a("Invalid "+o+" `"+i+"` of type `"+l(u)+"` supplied to `"+r+"`, expected a single ReactElement.")})),elementType:i((function(e,n,t,r,o){var i=e[n];return $.isValidElementType(i)?null:new a("Invalid "+r+" `"+o+"` of type `"+l(i)+"` supplied to `"+t+"`, expected a single ReactElement type.")})),instanceOf:function(e){return i((function(n,t,r,o,i){if(!(n[t]instanceof e)){var u=e.name||"<<anonymous>>";return new a("Invalid "+o+" `"+i+"` of type `"+function(e){if(!e.constructor||!e.constructor.name)return"<<anonymous>>";return e.constructor.name}(n[t])+"` supplied to `"+r+"`, expected instance of `"+u+"`.")}return null}))},node:i((function(e,n,t,r,o){return c(e[n])?null:new a("Invalid "+r+" `"+o+"` supplied to `"+t+"`, expected a ReactNode.")})),objectOf:function(e){return i((function(n,t,r,o,i){if("function"!=typeof e)return new a("Property `"+i+"` of component `"+r+"` has invalid PropType notation inside objectOf.");var u=n[t],c=l(u);if("object"!==c)return new a("Invalid "+o+" `"+i+"` of type `"+c+"` supplied to `"+r+"`, expected an object.");for(var s in u)if(K(u,s)){var f=e(u,s,r,o,i+"."+s,Y);if(f instanceof Error)return f}return null}))},oneOf:function(e){if(!Array.isArray(e))return"production"!==process.env.NODE_ENV&&(arguments.length>1?J("Invalid arguments supplied to oneOf, expected an array, got "+arguments.length+" arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z])."):J("Invalid argument supplied to oneOf, expected an array.")),Q;function n(n,t,r,i,u){for(var c=n[t],l=0;l<e.length;l++)if(o(c,e[l]))return null;var f=JSON.stringify(e,(function(e,n){return"symbol"===s(n)?String(n):n}));return new a("Invalid "+i+" `"+u+"` of value `"+String(c)+"` supplied to `"+r+"`, expected one of "+f+".")}return i(n)},oneOfType:function(e){if(!Array.isArray(e))return"production"!==process.env.NODE_ENV&&J("Invalid argument supplied to oneOfType, expected an instance of array."),Q;for(var n=0;n<e.length;n++){var t=e[n];if("function"!=typeof t)return J("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+f(t)+" at index "+n+"."),Q}return i((function(n,t,r,o,i){for(var u=0;u<e.length;u++){if(null==(0,e[u])(n,t,r,o,i,Y))return null}return new a("Invalid "+o+" `"+i+"` supplied to `"+r+"`.")}))},shape:function(e){return i((function(n,t,r,o,i){var u=n[t],c=l(u);if("object"!==c)return new a("Invalid "+o+" `"+i+"` of type `"+c+"` supplied to `"+r+"`, expected `object`.");for(var s in e){var f=e[s];if(f){var d=f(u,s,r,o,i+"."+s,Y);if(d)return d}}return null}))},exact:function(e){return i((function(n,t,r,o,i){var u=n[t],c=l(u);if("object"!==c)return new a("Invalid "+o+" `"+i+"` of type `"+c+"` supplied to `"+r+"`, expected `object`.");var s=W({},n[t],e);for(var f in s){var d=e[f];if(!d)return new a("Invalid "+o+" `"+i+"` key `"+f+"` supplied to `"+r+"`.\nBad object: "+JSON.stringify(n[t],null," ")+"\nValid keys: "+JSON.stringify(Object.keys(e),null," "));var p=d(u,f,r,o,i+"."+f,Y);if(p)return p}return null}))}};function o(e,n){return e===n?0!==e||1/e==1/n:e!=e&&n!=n}function a(e){this.message=e,this.stack=""}function i(e){if("production"!==process.env.NODE_ENV)var t={},r=0;function o(o,i,u,c,l,s,f){if(c=c||"<<anonymous>>",s=s||u,f!==Y){if(n){var d=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types");throw d.name="Invariant Violation",d}if("production"!==process.env.NODE_ENV&&"undefined"!=typeof console){var p=c+":"+u;!t[p]&&r<3&&(J("You are manually calling a React.PropTypes validation function for the `"+s+"` prop on `"+c+"`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."),t[p]=!0,r++)}}return null==i[u]?o?null===i[u]?new a("The "+l+" `"+s+"` is marked as required in `"+c+"`, but its value is `null`."):new a("The "+l+" `"+s+"` is marked as required in `"+c+"`, but its value is `undefined`."):null:e(i,u,c,l,s)}var i=o.bind(null,!1);return i.isRequired=o.bind(null,!0),i}function u(e){return i((function(n,t,r,o,i,u){var c=n[t];return l(c)!==e?new a("Invalid "+o+" `"+i+"` of type `"+s(c)+"` supplied to `"+r+"`, expected `"+e+"`."):null}))}function c(n){switch(typeof n){case"number":case"string":case"undefined":return!0;case"boolean":return!n;case"object":if(Array.isArray(n))return n.every(c);if(null===n||e(n))return!0;var r=function(e){var n=e&&(t&&e[t]||e["@@iterator"]);if("function"==typeof n)return n}(n);if(!r)return!1;var o,a=r.call(n);if(r!==n.entries){for(;!(o=a.next()).done;)if(!c(o.value))return!1}else for(;!(o=a.next()).done;){var i=o.value;if(i&&!c(i[1]))return!1}return!0;default:return!1}}function l(e){var n=typeof e;return Array.isArray(e)?"array":e instanceof RegExp?"object":function(e,n){return"symbol"===e||!!n&&("Symbol"===n["@@toStringTag"]||"function"==typeof Symbol&&n instanceof Symbol)}(n,e)?"symbol":n}function s(e){if(null==e)return""+e;var n=l(e);if("object"===n){if(e instanceof Date)return"date";if(e instanceof RegExp)return"regexp"}return n}function f(e){var n=s(e);switch(n){case"array":case"object":return"an "+n;case"boolean":case"date":case"regexp":return"a "+n;default:return n}}return a.prototype=Error.prototype,r.checkPropTypes=H,r.resetWarningCache=H.resetWarningCache,r.PropTypes=r,r};function ne(){}function te(){}te.resetWarningCache=ne;var re=v((function(e){if("production"!==process.env.NODE_ENV){var n=$;e.exports=ee(n.isElement,!0)}else e.exports=function(){function e(e,n,t,r,o,a){if(a!==Y){var i=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw i.name="Invariant Violation",i}}function n(){return e}e.isRequired=e;var t={array:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:n,element:e,elementType:e,instanceOf:n,node:e,objectOf:n,oneOf:n,oneOfType:n,shape:n,exact:n,checkPropTypes:te,resetWarningCache:ne};return t.PropTypes=t,t}()})),oe=(re.array,re.bool),ae=re.func,ie=(re.number,re.object),ue=re.string,ce=(re.symbol,re.any),le=re.node,se=(re.element,re.elementType,re.instanceOf,re.oneOf,re.oneOfType),fe=re.arrayOf;re.objectOf,re.shape,re.exact;function de(e,t){return r=t,o=function(n){return e.forEach((function(e){return function(e,n){return"function"==typeof e?e(n):e&&(e.current=n),e}(e,n)}))},(a=n.useState((function(){return{value:r,callback:o,facade:{get current(){return a.value},set current(e){var n=a.value;n!==e&&(a.value=e,a.callback(e,n))}}}}))[0]).callback=o,a.facade;var r,o,a}var pe={width:"1px",height:"0px",padding:0,overflow:"hidden",position:"fixed",top:"1px",left:"1px"},ve=function(e){var t=e.children;return n.createElement(n.Fragment,null,n.createElement("div",{key:"guard-first","data-focus-guard":!0,"data-focus-auto-guard":!0,style:pe}),t,t&&n.createElement("div",{key:"guard-last","data-focus-guard":!0,"data-focus-auto-guard":!0,style:pe}))};ve.propTypes="production"!==process.env.NODE_ENV?{children:re.node}:{},ve.defaultProps={children:null}; | ||
/*! ***************************************************************************** | ||
@@ -25,2 +25,2 @@ Copyright (c) Microsoft Corporation. All rights reserved. | ||
***************************************************************************** */ | ||
var me=function(){return(me=Object.assign||function(e){for(var n,t=1,r=arguments.length;t<r;t++)for(var o in n=arguments[t])Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o]);return e}).apply(this,arguments)};function ye(e,n){var t={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&n.indexOf(r)<0&&(t[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)n.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(t[r[o]]=e[r[o]])}return t}function he(e){return e}function be(e,n){void 0===n&&(n=he);var t=[],r=!1;return{read:function(){if(r)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return t.length?t[t.length-1]:e},useMedium:function(e){var o=n(e,r);return t.push(o),function(){t=t.filter((function(e){return e!==o}))}},assignSyncMedium:function(e){for(r=!0;t.length;){var n=t;t=[],n.forEach(e)}t={push:function(n){return e(n)},filter:function(){return t}}},assignMedium:function(e){r=!0;var n=[];if(t.length){var o=t;t=[],o.forEach(e),n=t}var a=function(){var t=n;n=[],t.forEach(e)},i=function(){return Promise.resolve().then(a)};i(),t={push:function(e){n.push(e),i()},filter:function(e){return n=n.filter(e),t}}}}}function ge(e,n){return void 0===n&&(n=he),be(e,n)}function we(e){void 0===e&&(e={});var n=be(null);return n.options=me({async:!0,ssr:!1},e),n}var Ee=function(e){var t=e.sideCar,r=ye(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var o=t.read();if(!o)throw new Error("Sidecar medium not found");return n.createElement(o,me({},r))};Ee.isSideCarExport=!0;var Oe=ge({},(function(e){return{target:e.target,currentTarget:e.currentTarget}})),Se=ge(),xe=ge(),Ne=we({async:!0}),Ce=[],Pe=t.forwardRef((function(e,r){var o,a=n.useState(),i=a[0],u=a[1],c=n.useRef(),l=n.useRef(!1),s=n.useRef(null),f=e.children,d=e.disabled,v=e.noFocusGuards,m=e.persistentFocus,y=e.autoFocus,h=e.allowTextSelection,b=e.group,g=e.className,w=e.whiteList,E=e.shards,O=void 0===E?Ce:E,S=e.as,x=void 0===S?"div":S,N=e.lockProps,C=void 0===N?{}:N,P=e.sideCar,k=e.returnFocus,T=e.onActivation,j=e.onDeactivation,D=n.useState({})[0],R=n.useCallback((function(){s.current=s.current||document&&document.activeElement,c.current&&T&&T(c.current),l.current=!0}),[T]),I=n.useCallback((function(){l.current=!1,j&&j(c.current)}),[j]),M=n.useCallback((function(e){var n=s.current;if(Boolean(k)&&n&&n.focus){var t="object"==typeof k?k:void 0;s.current=null,e?Promise.resolve().then((function(){return n.focus(t)})):n.focus(t)}}),[k]),_=n.useCallback((function(e){l.current&&Oe.useMedium(e)}),[]),F=Se.useMedium,A=n.useCallback((function(e){c.current!==e&&(c.current=e,u(e))}),[]);"production"!==process.env.NODE_ENV&&(void 0!==h&&console.warn("React-Focus-Lock: allowTextSelection is deprecated and enabled by default"),t.useEffect((function(){c.current||console.error("FocusLock: could not obtain ref to internal node")}),[]));var $=p(((o={})["data-focus-lock-disabled"]=d&&"disabled",o["data-focus-lock"]=b,o),C),L=!0!==v,V=L&&"tail"!==v,q=de([r,A]);return t.createElement(t.Fragment,null,L&&[t.createElement("div",{key:"guard-first","data-focus-guard":!0,tabIndex:d?-1:0,style:pe}),t.createElement("div",{key:"guard-nearest","data-focus-guard":!0,tabIndex:d?-1:1,style:pe})],!d&&t.createElement(P,{id:D,sideCar:Ne,observed:i,disabled:d,persistentFocus:m,autoFocus:y,whiteList:w,shards:O,onActivation:R,onDeactivation:I,returnFocus:M}),t.createElement(x,p({ref:q},$,{className:g,onBlur:F,onFocus:_}),f),V&&t.createElement("div",{"data-focus-guard":!0,tabIndex:d?-1:0,style:pe}))}));Pe.propTypes="production"!==process.env.NODE_ENV?{children:le,disabled:oe,returnFocus:se([oe,ie]),noFocusGuards:oe,allowTextSelection:oe,autoFocus:oe,persistentFocus:oe,group:ue,className:ue,whiteList:ae,shards:fe(ce),as:se([ue,ae,ie]),lockProps:ie,onActivation:ae,onDeactivation:ae,sideCar:ce.isRequired}:{},Pe.defaultProps={children:void 0,disabled:!1,returnFocus:!1,noFocusGuards:!1,autoFocus:!0,persistentFocus:!1,allowTextSelection:void 0,group:void 0,className:void 0,whiteList:void 0,shards:void 0,as:"div",lockProps:{},onActivation:void 0,onDeactivation:void 0};var ke=function(e){for(var n=Array(e.length),t=0;t<e.length;++t)n[t]=e[t];return n},Te=function(e){return Array.isArray(e)?e:[e]},je=function(e,n){var t=e.tabIndex-n.tabIndex,r=e.index-n.index;if(t){if(!e.tabIndex)return 1;if(!n.tabIndex)return-1}return t||r},De=function(e,n,t){return ke(e).map((function(e,n){return{node:e,index:n,tabIndex:t&&-1===e.tabIndex?(e.dataset||{}).focusGuard?0:-1:e.tabIndex}})).filter((function(e){return!n||e.tabIndex>=0})).sort(je)},Re=["button:enabled:not([readonly])","select:enabled:not([readonly])","textarea:enabled:not([readonly])","input:enabled:not([readonly])","a[href]","area[href]","iframe","object","embed","[tabindex]","[contenteditable]","[autofocus]"],Ie=Re.join(","),Me=Ie+", [data-focus-guard]",_e=function(e,n){return e.reduce((function(e,t){return e.concat(ke(t.querySelectorAll(n?Me:Ie)),t.parentNode?ke(t.parentNode.querySelectorAll(Re.join(","))).filter((function(e){return e===t})):[])}),[])},Fe=function e(n){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return t.push(n),n.parentNode&&e(n.parentNode,t),t},Ae=function(e,n){for(var t=Fe(e),r=Fe(n),o=0;o<t.length;o+=1){var a=t[o];if(r.indexOf(a)>=0)return a}return!1},$e=function(e){return ke(e).filter((function(e){return function e(n){return!n||n===document||n.nodeType===Node.DOCUMENT_NODE||!((t=window.getComputedStyle(n,null))&&t.getPropertyValue&&("none"===t.getPropertyValue("display")||"hidden"===t.getPropertyValue("visibility")))&&e(n.parentNode);var t}(e)})).filter((function(e){return function(e){return!(("INPUT"===e.tagName||"BUTTON"===e.tagName)&&("hidden"===e.type||e.disabled))}(e)}))},Le=function(e,n){return De($e(_e(e,n)),!0,n)},Ve=function(e){return $e((n=e.querySelectorAll("[data-autofocus-inside]"),ke(n).map((function(e){return _e([e])})).reduce((function(e,n){return e.concat(n)}),[])));var n},qe=function(e){return"INPUT"===e.tagName&&"radio"===e.type},Be=function(e){return e[0]&&e.length>1&&qe(e[0])&&e[0].name?function(e,n){return n.filter(qe).filter((function(n){return n.name===e.name})).filter((function(e){return e.checked}))[0]||e}(e[0],e):e[0]},We="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ye=function(e){return Te(e).filter(Boolean).reduce((function(e,n){var t=n.getAttribute("data-focus-lock");return e.push.apply(e,t?function e(n){for(var t=n.length,r=0;r<t;r+=1)for(var o=function(t){if(r!==t&&n[r].contains(n[t]))return{v:e(n.filter((function(e){return e!==n[t]})))}},a=0;a<t;a+=1){var i=o(a);if("object"===(void 0===i?"undefined":We(i)))return i.v}return n}(ke(function e(n){return n.parentNode?e(n.parentNode):n}(n).querySelectorAll('[data-focus-lock="'+t+'"]:not([data-focus-lock-disabled="disabled"])'))):[n]),e}),[])},ze=function(e){return e.dataset&&e.dataset.focusGuard},Ue=function(e){return!ze(e)},Ge=function(e,n,t){var r=Te(e),o=Te(n),a=r[0],i=null;return o.filter(Boolean).forEach((function(e){i=Ae(i||e,e)||i,t.filter(Boolean).forEach((function(e){var n=Ae(a,e);n&&(i=!i||n.contains(i)?n:Ae(n,i))}))})),i},Xe=function(e,n){var t=document&&document.activeElement,r=Ye(e).filter(Ue),o=Ge(t||e,e,r),a=Le(r).filter((function(e){var n=e.node;return Ue(n)}));if(a[0]||(a=(i=r,De($e(_e(i)),!1)).filter((function(e){var n=e.node;return Ue(n)})))[0]){var i,u,c,l,s,f=Le([o]).map((function(e){return e.node})),d=(u=f,c=a,l=new Map,c.forEach((function(e){return l.set(e.node,e)})),u.map((function(e){return l.get(e)})).filter(Boolean)),p=d.map((function(e){return e.node})),v=function(e,n,t,r,o){var a=e.length,i=e[0],u=e[a-1];if(!(e.indexOf(t)>=0)){var c=n.indexOf(t),l=n.indexOf(r||c),s=e.indexOf(r),f=c-l,d=n.indexOf(i),p=n.indexOf(u);return-1===c||-1===s?e.indexOf(o.length?Be(o):Be(e)):!f&&s>=0?s:c<=d&&ze(t)&&Math.abs(f)>1?0:f&&Math.abs(f)>1?s:c<=d?a-1:c>p?0:f?Math.abs(f)>1?s:(a+s+f)%a:void 0}}(p,f,t,n,p.filter((s=function(e){return e.reduce((function(e,n){return e.concat(Ve(n))}),[])}(r),function(e){return!!e.autofocus||e.dataset&&!!e.dataset.autofocus||s.indexOf(e)>=0})));return void 0===v?v:d[v]}},Ze=function(e){return e===document.activeElement},He=function(e){var n=document&&document.activeElement;return!(!n||n.dataset&&n.dataset.focusGuard)&&Ye(e).reduce((function(e,t){return e||t.contains(n)||function(e){return n=ke(e.querySelectorAll("iframe")),t=Ze,!!n.filter((function(e){return e===t}))[0];var n,t}(t)}),!1)},Ke=0,Je=!1,Qe=function(e,n){var t,r=Xe(e,n);if(!Je&&r){if(Ke>2)return console.error("FocusLock: focus-fighting detected. Only one focus management system could be active. See https://github.com/theKashey/focus-lock/#focus-fighting"),Je=!0,void setTimeout((function(){Je=!1}),1);Ke++,(t=r.node).focus(),t.contentWindow&&t.contentWindow.focus(),Ke--}};function en(e){var n=window.setImmediate;void 0!==n?n(e):setTimeout(e,1)}var nn=function(){return document&&document.activeElement===document.body||document&&ke(document.querySelectorAll("[data-no-focus-lock]")).some((function(e){return e.contains(document.activeElement)}))},tn=null,rn=null,on=null,an=!1,un=function(){return!0};function cn(e,n,t,r){var o=null,a=e;do{var i=r[a];if(i.guard)i.node.dataset.focusAutoGuard&&(o=i);else{if(!i.lockItem)break;if(a!==e)return;o=null}}while((a+=t)!==n);o&&(o.node.tabIndex=0)}var ln=function(e){return e&&"current"in e?e.current:e},sn=function(){var e,n,t,r,o,a,i=!1;if(tn){var u=tn,c=u.observed,l=u.persistentFocus,s=u.autoFocus,f=u.shards,d=c||on&&on.portaledElement,p=document&&document.activeElement;if(d){var v=[d].concat(f.map(ln).filter(Boolean));if(p&&!function(e){return(tn.whiteList||un)(e)}(p)||(l||an||!nn()||!rn&&s)&&(!d||He(v)||(a=p,on&&on.portaledElement===a)||(document&&!rn&&p&&!s?(p.blur(),document.body.focus()):(i=Qe(v,rn),on={})),an=!1,rn=document&&document.activeElement),document){var m=document&&document.activeElement,y=(n=Ye(e=v).filter(Ue),t=Ge(e,e,n),r=Le([t],!0),o=Le(n).filter((function(e){var n=e.node;return Ue(n)})).map((function(e){return e.node})),r.map((function(e){var n=e.node;return{node:n,index:e.index,lockItem:o.indexOf(n)>=0,guard:ze(n)}}))),h=y.find((function(e){return e.node===m}));if(h){y.filter((function(e){var n=e.guard,t=e.node;return n&&t.dataset.focusAutoGuard})).forEach((function(e){return e.node.removeAttribute("tabIndex")}));var b=y.indexOf(h);cn(b,y.length,1,y),cn(b,-1,-1,y)}}}}return i},fn=function(e){sn()&&e&&(e.stopPropagation(),e.preventDefault())},dn=function(){return en(sn)},pn=function(e){var n=e.target,t=e.currentTarget;t.contains(n)||(on={observerNode:t,portaledElement:n})};"production"!==process.env.NODE_ENV&&re.node.isRequired;var vn=function(){an=!0};Oe.assignSyncMedium(pn),Se.assignMedium(dn),xe.assignMedium((function(e){return e({moveFocusInside:Qe,focusInside:He})}));var mn=function(e,r){if("production"!==process.env.NODE_ENV){if("function"!=typeof e)throw new Error("Expected reducePropsToState to be a function.");if("function"!=typeof r)throw new Error("Expected handleStateChangeOnClient to be a function.")}return function(o){if("production"!==process.env.NODE_ENV&&"function"!=typeof o)throw new Error("Expected WrappedComponent to be a React component.");var a,i=[];function u(){a=e(i.map((function(e){return e.props}))),r(a)}var c,l,s,f=function(e){var n,r;function c(){return e.apply(this,arguments)||this}r=e,(n=c).prototype=Object.create(r.prototype),n.prototype.constructor=n,n.__proto__=r,c.peek=function(){return a};var l=c.prototype;return l.componentDidMount=function(){i.push(this),u()},l.componentDidUpdate=function(){u()},l.componentWillUnmount=function(){var e=i.indexOf(this);i.splice(e,1),u()},l.render=function(){return t.createElement(o,this.props)},c}(n.PureComponent);return c=f,l="displayName",s="SideEffect("+function(e){return e.displayName||e.name||"Component"}(o)+")",l in c?Object.defineProperty(c,l,{value:s,enumerable:!0,configurable:!0,writable:!0}):c[l]=s,f}}((function(e){return e.filter((function(e){return!e.disabled}))}),(function(e){var n=e.slice(-1)[0];n&&!tn&&(document.addEventListener("focusin",fn,!0),document.addEventListener("focusout",dn),window.addEventListener("blur",vn));var t=tn,r=t&&n&&n.id===t.id;tn=n,t&&!r&&(t.onDeactivation(),e.filter((function(e){return e.id===t.id})).length||t.returnFocus(!n)),n?(rn=null,r&&t.observed===n.observed||n.onActivation(),sn(),en(sn)):(document.removeEventListener("focusin",fn,!0),document.removeEventListener("focusout",dn),window.removeEventListener("blur",vn),rn=null)}))((function(){return null})),yn=t.forwardRef((function(e,n){return t.createElement(Pe,p({sideCar:mn,ref:n},e))})),hn=Pe.propTypes||{},bn=(hn.sideCar,function(e,n){if(null==e)return{};var t,r,o={},a=Object.keys(e);for(r=0;r<a.length;r++)t=a[r],n.indexOf(t)>=0||(o[t]=e[t]);return o}(hn,["sideCar"]));yn.propTypes=bn;var gn=we(),wn=function(){},En=n.forwardRef((function(e,t){var r=n.useRef(null),o=n.useState({onScrollCapture:wn,onWheelCapture:wn,onTouchMoveCapture:wn}),a=o[0],i=o[1],u=e.forwardProps,c=e.children,l=e.className,s=e.removeScrollBar,f=e.enabled,d=e.shards,p=e.sideCar,v=e.noIsolation,m=e.inert,y=e.allowPinchZoom,h=ye(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom"]),b=p,g=me({ref:de([r,t])},h,a);return n.createElement(n.Fragment,null,f&&n.createElement(b,{sideCar:gn,removeScrollBar:s,shards:d,noIsolation:v,inert:m,setCallbacks:i,allowPinchZoom:!!y,lockRef:r}),u?n.cloneElement(n.Children.only(c),g):n.createElement("div",me({},g,{className:l}),c))}));En.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},En.classNames={fullWidth:"width-before-scroll-bar",zeroRight:"right-scroll-bar-position"};var On=function(){var e=0,n=null;return{add:function(t){var r,o;0==e&&(n=function(){if(!document)return null;var e=document.createElement("style");return e.type="text/css",e}())&&(o=t,(r=n).styleSheet?r.styleSheet.cssText=o:r.appendChild(document.createTextNode(o)),function(e){(document.head||document.getElementsByTagName("head")[0]).appendChild(e)}(n)),e++},remove:function(){!--e&&n&&(n.parentNode&&n.parentNode.removeChild(n),n=null)}}},Sn=function(){var e,t=(e=On(),function(t){n.useEffect((function(){return e.add(t),function(){e.remove()}}),[])});return function(e){var n=e.styles;return t(n),null}},xn={left:0,top:0,right:0,gap:0},Nn=function(e){return parseInt(e||"",10)||0},Cn=function(e){if(void 0===e&&(e="margin"),"undefined"==typeof window)return xn;var n=function(e){var n=window.getComputedStyle(document.body),t=n["padding"===e?"paddingLeft":"marginLeft"],r=n["padding"===e?"paddingTop":"marginTop"],o=n["padding"===e?"paddingRight":"marginRight"];return[Nn(t),Nn(r),Nn(o)]}(e),t=document.documentElement.clientWidth,r=window.innerWidth;return{left:n[0],top:n[1],right:n[2],gap:Math.max(0,r-t+n[2]-n[0])}},Pn=Sn(),kn=function(e,n,t,r){var o=e.left,a=e.top,i=e.right,u=e.gap;return void 0===t&&(t="margin"),"\n .with-scroll-bars-hidden {\n overflow: hidden "+r+";\n padding-right: "+u+"px "+r+";\n }\n body {\n overflow: hidden "+r+";\n "+[n&&"position: relative "+r+";","margin"===t&&"\n padding-left: "+o+"px;\n padding-top: "+a+"px;\n padding-right: "+i+"px;\n margin-left:0;\n margin-top:0;\n margin-right: "+u+"px "+r+";\n ","padding"===t&&"padding-right: "+u+"px "+r+";"].filter(Boolean).join("")+"\n }\n \n .right-scroll-bar-position {\n right: "+u+"px "+r+";\n }\n \n .width-before-scroll-bar {\n margin-right: "+u+"px "+r+";\n }\n \n .right-scroll-bar-position .right-scroll-bar-position {\n right: 0 "+r+";\n }\n \n .width-before-scroll-bar .width-before-scroll-bar {\n margin-right: 0 "+r+";\n }\n"},Tn=function(e){var t=n.useState(Cn(e.gapMode)),r=t[0],o=t[1];n.useEffect((function(){o(Cn(e.gapMode))}),[e.gapMode]);var a=e.noRelative,i=e.noImportant,u=e.gapMode,c=void 0===u?"margin":u;return n.createElement(Pn,{styles:kn(r,!a,c,i?"":"!important")})},jn=function(e,n){var t=n;do{if(Dn(e,t)){var r=Rn(e,t);if(r[1]>r[2])return!0}t=t.parentNode}while(t&&t!==document.body);return!1},Dn=function(e,n){return"v"===e?function(e){var n=window.getComputedStyle(e);return"hidden"!==n.overflowY&&!(n.overflowY===n.overflowX&&"visible"===n.overflowY)}(n):function(e){var n=window.getComputedStyle(e);return"hidden"!==n.overflowX&&!(n.overflowY===n.overflowX&&"visible"===n.overflowX)}(n)},Rn=function(e,n){return"v"===e?[(t=n).scrollTop,t.scrollHeight,t.clientHeight]:function(e){return[e.scrollLeft,e.scrollWidth,e.clientWidth]}(n);var t},In=!1;if("undefined"!=typeof window)try{var Mn=Object.defineProperty({},"passive",{get:function(){return In=!0,!0}});window.addEventListener("test",Mn,Mn),window.removeEventListener("test",Mn,Mn)}catch(e){In=!1}var _n=!!In&&{passive:!1},Fn=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},An=function(e){return[e.deltaX,e.deltaY]},$n=function(e){return e&&"current"in e?e.current:e},Ln=function(e){return"\n .block-interactivity-"+e+" {pointer-events: none;}\n .allow-interactivity-"+e+" {pointer-events: all;}\n"},Vn=0,qn=[];var Bn,Wn=(Bn=function(e){var t=n.useRef([]),r=n.useRef([0,0]),o=n.useRef(),a=n.useState(Vn++)[0],i=n.useState((function(){return Sn()}))[0],u=n.useRef(e);n.useEffect((function(){u.current=e}),[e]),n.useEffect((function(){if(e.inert){document.body.classList.add("block-interactivity-"+a);var n=[e.lockRef.current].concat((e.shards||[]).map($n)).filter(Boolean);return n.forEach((function(e){return e.classList.add("allow-interactivity-"+a)})),function(){document.body.classList.remove("block-interactivity-"+a),n.forEach((function(e){return e.classList.remove("allow-interactivity-"+a)}))}}}),[e.inert,e.lockRef.current,e.shards]);var c=n.useCallback((function(e,n){if("touches"in e&&2===e.touches.length)return!u.current.allowPinchZoom;var t,a=Fn(e),i=r.current,c="deltaX"in e?e.deltaX:i[0]-a[0],l="deltaY"in e?e.deltaY:i[1]-a[1],s=e.target,f=Math.abs(c)>Math.abs(l)?"h":"v",d=jn(f,s);if(!d)return!0;if(d?t=f:(t="v"===f?"h":"v",d=jn(f,s)),!d)return!1;if(!o.current&&"changedTouches"in e&&(c||l)&&(o.current=t),!t)return!0;var p=o.current||t;return function(e,n,t,r,o){var a=r,i=t.target,u=n.contains(i),c=!1,l=a>0,s=0,f=0;do{var d=Rn(e,i),p=d[0],v=d[1]-d[2]-p;(p||v)&&Dn(e,i)&&(s+=v,f+=p),i=i.parentNode}while(!u&&i!==document.body||u&&(n.contains(i)||n===i));return(l&&(o&&0===s||!o&&a>s)||!l&&(o&&0===f||!o&&-a>f))&&(c=!0),c}(p,n,e,"h"==p?c:l,!0)}),[]),l=n.useCallback((function(e){var n=e;if(qn.length&&qn[qn.length-1]===i){var r="deltaY"in n?An(n):Fn(n),o=t.current.filter((function(e){return e.name===n.type&&e.target===n.target&&function(e,n){return e[0]===n[0]&&e[1]===n[1]}(e.delta,r)}))[0];if(o&&o.should)n.preventDefault();else if(!o){var a=(u.current.shards||[]).map($n).filter(Boolean).filter((function(e){return e.contains(n.target)}));(a.length>0?c(n,a[0]):!u.current.noIsolation)&&n.preventDefault()}}}),[]),s=n.useCallback((function(e,n,r,o){var a={name:e,delta:n,target:r,should:o};t.current.push(a),setTimeout((function(){t.current=t.current.filter((function(e){return e!==a}))}),1)}),[]),f=n.useCallback((function(e){r.current=Fn(e),o.current=void 0}),[]),d=n.useCallback((function(n){s(n.type,An(n),n.target,c(n,e.lockRef.current))}),[]),p=n.useCallback((function(n){s(n.type,Fn(n),n.target,c(n,e.lockRef.current))}),[]);n.useEffect((function(){return qn.push(i),e.setCallbacks({onScrollCapture:d,onWheelCapture:d,onTouchMoveCapture:p}),document.addEventListener("wheel",l,_n),document.addEventListener("touchmove",l,_n),document.addEventListener("touchstart",f,_n),function(){qn=qn.filter((function(e){return e!==i})),document.removeEventListener("wheel",l,_n),document.removeEventListener("touchmove",l,_n),document.removeEventListener("touchstart",f,_n)}}),[]);var v=e.removeScrollBar,m=e.inert;return n.createElement(n.Fragment,null,m?n.createElement(i,{styles:Ln(a)}):null,v?n.createElement(Tn,{gapMode:"margin"}):null)},gn.useMedium(Bn),Ee),Yn=n.forwardRef((function(e,t){return n.createElement(En,me({},e,{ref:t,sideCar:Wn}))}));function zn(){return(zn=Object.assign||function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])}return e}).apply(this,arguments)}function Un(e,n){if(null==e)return{};var t,r,o={},a=Object.keys(e);for(r=0;r<a.length;r++)t=a[r],n.indexOf(t)>=0||(o[t]=e[t]);return o}Yn.classNames=En.classNames;var Gn={initialFocusRef:function(){return null},allowPinchZoom:re.bool,onDismiss:re.func},Xn=n.forwardRef((function(e,r){var o=e.isOpen,a=void 0===o||o,u=Un(e,["isOpen"]);return n.useEffect((function(){return i("dialog")}),[]),a?t.createElement(d,{"data-reach-dialog-wrapper":""},t.createElement(Zn,Object.assign({ref:r},u))):null}));"production"!==process.env.NODE_ENV&&(Xn.displayName="DialogOverlay",Xn.propTypes=zn({},Gn,{isOpen:re.bool}));var Zn=n.forwardRef((function(e,r){var o=e.allowPinchZoom,a=e.initialFocusRef,i=e.onClick,u=e.onDismiss,d=void 0===u?s:u,p=e.onMouseDown,v=e.onKeyDown,m=Un(e,["allowPinchZoom","initialFocusRef","onClick","onDismiss","onMouseDown","onKeyDown"]),y=n.useRef(null),h=n.useRef(null),b=function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return n.useMemo((function(){return t.every((function(e){return null==e}))?null:function(e){t.forEach((function(n){c(n,e)}))}}),t)}(h,r),g=n.useCallback((function(){a&&a.current&&a.current.focus()}),[a]);return n.useEffect((function(){return h.current?function(e){var n=[],t=[],r=(o=e,(o&&o.ownerDocument?o.ownerDocument:l()?document:null)||document);var o;if(!e)return"production"!==process.env.NODE_ENV&&console.warn("A ref has not yet been attached to a dialog node when attempting to call `createAriaHider`."),s;return Array.prototype.forEach.call(r.querySelectorAll("body > *"),(function(r){var o,a;if(r!==(null===(o=e.parentNode)||void 0===o||null===(a=o.parentNode)||void 0===a?void 0:a.parentNode)){var i=r.getAttribute("aria-hidden");null!==i&&"false"!==i||(n.push(i),t.push(r),r.setAttribute("aria-hidden","true"))}})),function(){t.forEach((function(e,t){var r=n[t];null===r?e.removeAttribute("aria-hidden"):e.setAttribute("aria-hidden",r)}))}}(h.current):void 0}),[]),t.createElement(yn,{autoFocus:!0,returnFocus:!0,onActivation:g},t.createElement(Yn,{allowPinchZoom:o},t.createElement("div",Object.assign({},m,{ref:b,"data-reach-dialog-overlay":"",onClick:f(i,(function(e){y.current===e.target&&(e.stopPropagation(),d(e))})),onKeyDown:f(v,(function(e){"Escape"===e.key&&(e.stopPropagation(),d(e))})),onMouseDown:f(p,(function(e){y.current=e.target}))}))))}));"production"!==process.env.NODE_ENV&&(Xn.displayName="DialogOverlay",Xn.propTypes=zn({},Gn));var Hn=n.forwardRef((function(e,n){var r=e.onClick,o=Un(e,["onClick","onKeyDown"]);return t.createElement("div",Object.assign({"aria-modal":"true",role:"dialog",tabIndex:-1},o,{ref:n,"data-reach-dialog-content":"",onClick:f(r,(function(e){e.stopPropagation()}))}))}));"production"!==process.env.NODE_ENV&&(Hn.displayName="DialogContent",Hn.propTypes={"aria-label":Jn,"aria-labelledby":Jn});var Kn=n.forwardRef((function(e,n){var r=e.isOpen,o=e.onDismiss,a=void 0===o?s:o,i=e.initialFocusRef,u=Un(e,["isOpen","onDismiss","initialFocusRef"]);return t.createElement(Xn,{initialFocusRef:i,isOpen:r,onDismiss:a},t.createElement(Hn,Object.assign({ref:n},u)))}));function Jn(e,n,t,r,o){var a="\nSee https://www.w3.org/TR/wai-aria/#aria-label for details.";return e["aria-label"]||e["aria-labelledby"]?e["aria-label"]&&e["aria-labelledby"]?new Error("You provided both `aria-label` and `aria-labelledby` props to a <"+t+">. If the a label for this component is visible on the screen, that label's component should be given a unique ID prop, and that ID should be passed as the `aria-labelledby` prop into <"+t+">. If the label cannot be determined programmatically from the content of the element, an alternative label should be provided as the `aria-label` prop, which will be used as an `aria-label` on the HTML tag."+a):null!=e[n]&&"string"!=typeof e[n]?new Error("Invalid prop `"+n+"` supplied to `"+t+"`. Expected `string`, received `"+(Array.isArray(o)?"array":typeof o)+"`."):null:new Error("A <"+t+"> must have either an `aria-label` or `aria-labelledby` prop.\n "+a)}"production"!==process.env.NODE_ENV&&(Kn.displayName="Dialog",Kn.propTypes={isOpen:re.bool,onDismiss:re.func,"aria-label":Jn,"aria-labelledby":Jn}),exports.ModalDialogPrimitiveContent=Hn,exports.ModalDialogPrimitiveOverlay=Xn; | ||
var me=function(){return(me=Object.assign||function(e){for(var n,t=1,r=arguments.length;t<r;t++)for(var o in n=arguments[t])Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o]);return e}).apply(this,arguments)};function ye(e,n){var t={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&n.indexOf(r)<0&&(t[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)n.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(t[r[o]]=e[r[o]])}return t}function he(e){return e}function be(e,n){void 0===n&&(n=he);var t=[],r=!1;return{read:function(){if(r)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return t.length?t[t.length-1]:e},useMedium:function(e){var o=n(e,r);return t.push(o),function(){t=t.filter((function(e){return e!==o}))}},assignSyncMedium:function(e){for(r=!0;t.length;){var n=t;t=[],n.forEach(e)}t={push:function(n){return e(n)},filter:function(){return t}}},assignMedium:function(e){r=!0;var n=[];if(t.length){var o=t;t=[],o.forEach(e),n=t}var a=function(){var t=n;n=[],t.forEach(e)},i=function(){return Promise.resolve().then(a)};i(),t={push:function(e){n.push(e),i()},filter:function(e){return n=n.filter(e),t}}}}}function ge(e,n){return void 0===n&&(n=he),be(e,n)}function we(e){void 0===e&&(e={});var n=be(null);return n.options=me({async:!0,ssr:!1},e),n}var Ee=function(e){var t=e.sideCar,r=ye(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var o=t.read();if(!o)throw new Error("Sidecar medium not found");return n.createElement(o,me({},r))};Ee.isSideCarExport=!0;var Oe=ge({},(function(e){return{target:e.target,currentTarget:e.currentTarget}})),Se=ge(),xe=ge(),Ne=we({async:!0}),Ce=[],ke=n.forwardRef((function(e,t){var r,o=n.useState(),a=o[0],i=o[1],u=n.useRef(),c=n.useRef(!1),l=n.useRef(null),s=e.children,f=e.disabled,d=e.noFocusGuards,v=e.persistentFocus,m=e.crossFrame,y=e.autoFocus,h=e.allowTextSelection,b=e.group,g=e.className,w=e.whiteList,E=e.shards,O=void 0===E?Ce:E,S=e.as,x=void 0===S?"div":S,N=e.lockProps,C=void 0===N?{}:N,k=e.sideCar,P=e.returnFocus,T=e.onActivation,j=e.onDeactivation,D=n.useState({})[0],_=n.useCallback((function(){l.current=l.current||document&&document.activeElement,u.current&&T&&T(u.current),c.current=!0}),[T]),R=n.useCallback((function(){c.current=!1,j&&j(u.current)}),[j]),I=n.useCallback((function(e){var n=l.current;if(Boolean(P)&&n&&n.focus){var t="object"==typeof P?P:void 0;l.current=null,e?Promise.resolve().then((function(){return n.focus(t)})):n.focus(t)}}),[P]),M=n.useCallback((function(e){c.current&&Oe.useMedium(e)}),[]),F=Se.useMedium,A=n.useCallback((function(e){u.current!==e&&(u.current=e,i(e))}),[]);"production"!==process.env.NODE_ENV&&(void 0!==h&&console.warn("React-Focus-Lock: allowTextSelection is deprecated and enabled by default"),n.useEffect((function(){u.current||console.error("FocusLock: could not obtain ref to internal node")}),[]));var $=p(((r={})["data-focus-lock-disabled"]=f&&"disabled",r["data-focus-lock"]=b,r),C),L=!0!==d,V=L&&"tail"!==d,B=de([t,A]);return n.createElement(n.Fragment,null,L&&[n.createElement("div",{key:"guard-first","data-focus-guard":!0,tabIndex:f?-1:0,style:pe}),n.createElement("div",{key:"guard-nearest","data-focus-guard":!0,tabIndex:f?-1:1,style:pe})],!f&&n.createElement(k,{id:D,sideCar:Ne,observed:a,disabled:f,persistentFocus:v,crossFrame:m,autoFocus:y,whiteList:w,shards:O,onActivation:_,onDeactivation:R,returnFocus:I}),n.createElement(x,p({ref:B},$,{className:g,onBlur:F,onFocus:M}),s),V&&n.createElement("div",{"data-focus-guard":!0,tabIndex:f?-1:0,style:pe}))}));ke.propTypes="production"!==process.env.NODE_ENV?{children:le,disabled:oe,returnFocus:se([oe,ie]),noFocusGuards:oe,allowTextSelection:oe,autoFocus:oe,persistentFocus:oe,crossFrame:oe,group:ue,className:ue,whiteList:ae,shards:fe(ce),as:se([ue,ae,ie]),lockProps:ie,onActivation:ae,onDeactivation:ae,sideCar:ce.isRequired}:{},ke.defaultProps={children:void 0,disabled:!1,returnFocus:!1,noFocusGuards:!1,autoFocus:!0,persistentFocus:!1,crossFrame:!0,allowTextSelection:void 0,group:void 0,className:void 0,whiteList:void 0,shards:void 0,as:"div",lockProps:{},onActivation:void 0,onDeactivation:void 0};var Pe=function(e){for(var n=Array(e.length),t=0;t<e.length;++t)n[t]=e[t];return n},Te=function(e){return Array.isArray(e)?e:[e]},je=function(e,n){var t=e.tabIndex-n.tabIndex,r=e.index-n.index;if(t){if(!e.tabIndex)return 1;if(!n.tabIndex)return-1}return t||r},De=function(e,n,t){return Pe(e).map((function(e,n){return{node:e,index:n,tabIndex:t&&-1===e.tabIndex?(e.dataset||{}).focusGuard?0:-1:e.tabIndex}})).filter((function(e){return!n||e.tabIndex>=0})).sort(je)},_e=["button:enabled:not([readonly])","select:enabled:not([readonly])","textarea:enabled:not([readonly])","input:enabled:not([readonly])","a[href]","area[href]","iframe","object","embed","[tabindex]","[contenteditable]","[autofocus]"],Re=_e.join(","),Ie=Re+", [data-focus-guard]",Me=function(e,n){return e.reduce((function(e,t){return e.concat(Pe(t.querySelectorAll(n?Ie:Re)),t.parentNode?Pe(t.parentNode.querySelectorAll(_e.join(","))).filter((function(e){return e===t})):[])}),[])},Fe=function e(n){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return t.push(n),n.parentNode&&e(n.parentNode,t),t},Ae=function(e,n){for(var t=Fe(e),r=Fe(n),o=0;o<t.length;o+=1){var a=t[o];if(r.indexOf(a)>=0)return a}return!1},$e=function(e){return Pe(e).filter((function(e){return function e(n){return!n||n===document||n.nodeType===Node.DOCUMENT_NODE||!((t=window.getComputedStyle(n,null))&&t.getPropertyValue&&("none"===t.getPropertyValue("display")||"hidden"===t.getPropertyValue("visibility")))&&e(n.parentNode);var t}(e)})).filter((function(e){return function(e){return!(("INPUT"===e.tagName||"BUTTON"===e.tagName)&&("hidden"===e.type||e.disabled))}(e)}))},Le=function(e,n){return De($e(Me(e,n)),!0,n)},Ve=function(e){return $e((n=e.querySelectorAll("[data-autofocus-inside]"),Pe(n).map((function(e){return Me([e])})).reduce((function(e,n){return e.concat(n)}),[])));var n},Be=function(e){return"INPUT"===e.tagName&&"radio"===e.type},qe=function(e,n){return n.filter(Be).filter((function(n){return n.name===e.name})).filter((function(e){return e.checked}))[0]||e},We=function(e){return e[0]&&e.length>1&&Be(e[0])&&e[0].name?qe(e[0],e):e[0]},Ye=function(e,n){return e.length>1&&Be(e[n])&&e[n].name?e.indexOf(qe(e[n],e)):n},ze="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ue=function(e){return Te(e).filter(Boolean).reduce((function(e,n){var t=n.getAttribute("data-focus-lock");return e.push.apply(e,t?function e(n){for(var t=n.length,r=0;r<t;r+=1)for(var o=function(t){if(r!==t&&n[r].contains(n[t]))return{v:e(n.filter((function(e){return e!==n[t]})))}},a=0;a<t;a+=1){var i=o(a);if("object"===(void 0===i?"undefined":ze(i)))return i.v}return n}(Pe(function e(n){return n.parentNode?e(n.parentNode):n}(n).querySelectorAll('[data-focus-lock="'+t+'"]:not([data-focus-lock-disabled="disabled"])'))):[n]),e}),[])},Ge=function(e){return e&&e.dataset&&e.dataset.focusGuard},Xe=function(e){return!Ge(e)},Ze=function(e,n,t){var r=Te(e),o=Te(n),a=r[0],i=null;return o.filter(Boolean).forEach((function(e){i=Ae(i||e,e)||i,t.filter(Boolean).forEach((function(e){var n=Ae(a,e);n&&(i=!i||n.contains(i)?n:Ae(n,i))}))})),i},He=function(e,n){var t=document&&document.activeElement,r=Ue(e).filter(Xe),o=Ze(t||e,e,r),a=Le(r).filter((function(e){var n=e.node;return Xe(n)}));if(a[0]||(a=(i=r,De($e(Me(i)),!1)).filter((function(e){var n=e.node;return Xe(n)})))[0]){var i,u,c,l,s,f=Le([o]).map((function(e){return e.node})),d=(u=f,c=a,l=new Map,c.forEach((function(e){return l.set(e.node,e)})),u.map((function(e){return l.get(e)})).filter(Boolean)),p=d.map((function(e){return e.node})),v=function(e,n,t,r,o){var a=e.length,i=e[0],u=e[a-1],c=Ge(t);if(!(e.indexOf(t)>=0)){var l=n.indexOf(t),s=n.indexOf(r||l),f=e.indexOf(r),d=l-s,p=n.indexOf(i),v=n.indexOf(u),m=Ye(e,0),y=Ye(e,a-1);return-1===l||-1===f?e.indexOf(o&&o.length?We(o):We(e)):!d&&f>=0?f:l<=p&&c&&Math.abs(d)>1?y:l>=p&&c&&Math.abs(d)>1?m:d&&Math.abs(d)>1?f:l<=p?y:l>v?m:d?Math.abs(d)>1?f:(a+f+d)%a:void 0}}(p,f,t,n,p.filter((s=function(e){return e.reduce((function(e,n){return e.concat(Ve(n))}),[])}(r),function(e){return!!e.autofocus||e.dataset&&!!e.dataset.autofocus||s.indexOf(e)>=0})));return void 0===v?v:d[v]}},Ke=function(e){return e===document.activeElement},Je=function(e){var n=document&&document.activeElement;return!(!n||n.dataset&&n.dataset.focusGuard)&&Ue(e).reduce((function(e,t){return e||t.contains(n)||function(e){return n=Pe(e.querySelectorAll("iframe")),t=Ke,!!n.filter((function(e){return e===t}))[0];var n,t}(t)}),!1)},Qe=0,en=!1,nn=function(e,n){var t,r=He(e,n);if(!en&&r){if(Qe>2)return console.error("FocusLock: focus-fighting detected. Only one focus management system could be active. See https://github.com/theKashey/focus-lock/#focus-fighting"),en=!0,void setTimeout((function(){en=!1}),1);Qe++,(t=r.node).focus(),t.contentWindow&&t.contentWindow.focus(),Qe--}};function tn(e){var n=window.setImmediate;void 0!==n?n(e):setTimeout(e,1)}var rn=function(){return document&&document.activeElement===document.body||document&&Pe(document.querySelectorAll("[data-no-focus-lock]")).some((function(e){return e.contains(document.activeElement)}))},on=null,an=null,un=null,cn=!1,ln=function(){return!0};function sn(e,n,t,r){var o=null,a=e;do{var i=r[a];if(i.guard)i.node.dataset.focusAutoGuard&&(o=i);else{if(!i.lockItem)break;if(a!==e)return;o=null}}while((a+=t)!==n);o&&(o.node.tabIndex=0)}var fn=function(e){return e&&"current"in e?e.current:e},dn=function(){var e,n,t,r,o,a,i=!1;if(on){var u=on,c=u.observed,l=u.persistentFocus,s=u.autoFocus,f=u.shards,d=u.crossFrame,p=c||un&&un.portaledElement,v=document&&document.activeElement;if(p){var m=[p].concat(f.map(fn).filter(Boolean));if(v&&!function(e){return(on.whiteList||ln)(e)}(v)||(l||(d?Boolean(cn):"meanwhile"===cn)||!rn()||!an&&s)&&(!p||Je(m)||(a=v,un&&un.portaledElement===a)||(document&&!an&&v&&!s?(v.blur(),document.body.focus()):(i=nn(m,an),un={})),cn=!1,an=document&&document.activeElement),document){var y=document&&document.activeElement,h=(n=Ue(e=m).filter(Xe),t=Ze(e,e,n),r=Le([t],!0),o=Le(n).filter((function(e){var n=e.node;return Xe(n)})).map((function(e){return e.node})),r.map((function(e){var n=e.node;return{node:n,index:e.index,lockItem:o.indexOf(n)>=0,guard:Ge(n)}}))),b=h.find((function(e){return e.node===y}));if(b){h.filter((function(e){var n=e.guard,t=e.node;return n&&t.dataset.focusAutoGuard})).forEach((function(e){return e.node.removeAttribute("tabIndex")}));var g=h.indexOf(b);sn(g,h.length,1,h),sn(g,-1,-1,h)}}}}return i},pn=function(e){dn()&&e&&(e.stopPropagation(),e.preventDefault())},vn=function(){return tn(dn)},mn=function(e){var n=e.target,t=e.currentTarget;t.contains(n)||(un={observerNode:t,portaledElement:n})};"production"!==process.env.NODE_ENV&&re.node.isRequired;var yn=function(){cn="just",setTimeout((function(){cn="meanwhile"}),0)};Oe.assignSyncMedium(mn),Se.assignMedium(vn),xe.assignMedium((function(e){return e({moveFocusInside:nn,focusInside:Je})}));var hn=function(e,r){if("production"!==process.env.NODE_ENV){if("function"!=typeof e)throw new Error("Expected reducePropsToState to be a function.");if("function"!=typeof r)throw new Error("Expected handleStateChangeOnClient to be a function.")}return function(o){if("production"!==process.env.NODE_ENV&&"function"!=typeof o)throw new Error("Expected WrappedComponent to be a React component.");var a,i=[];function u(){a=e(i.map((function(e){return e.props}))),r(a)}var c,l,s,f=function(e){var n,r;function c(){return e.apply(this,arguments)||this}r=e,(n=c).prototype=Object.create(r.prototype),n.prototype.constructor=n,n.__proto__=r,c.peek=function(){return a};var l=c.prototype;return l.componentDidMount=function(){i.push(this),u()},l.componentDidUpdate=function(){u()},l.componentWillUnmount=function(){var e=i.indexOf(this);i.splice(e,1),u()},l.render=function(){return t.createElement(o,this.props)},c}(n.PureComponent);return c=f,l="displayName",s="SideEffect("+function(e){return e.displayName||e.name||"Component"}(o)+")",l in c?Object.defineProperty(c,l,{value:s,enumerable:!0,configurable:!0,writable:!0}):c[l]=s,f}}((function(e){return e.filter((function(e){return!e.disabled}))}),(function(e){var n=e.slice(-1)[0];n&&!on&&(document.addEventListener("focusin",pn,!0),document.addEventListener("focusout",vn),window.addEventListener("blur",yn));var t=on,r=t&&n&&n.id===t.id;on=n,t&&!r&&(t.onDeactivation(),e.filter((function(e){return e.id===t.id})).length||t.returnFocus(!n)),n?(an=null,r&&t.observed===n.observed||n.onActivation(),dn(),tn(dn)):(document.removeEventListener("focusin",pn,!0),document.removeEventListener("focusout",vn),window.removeEventListener("blur",yn),an=null)}))((function(){return null})),bn=n.forwardRef((function(e,t){return n.createElement(ke,p({sideCar:hn,ref:t},e))})),gn=ke.propTypes||{},wn=(gn.sideCar,function(e,n){if(null==e)return{};var t,r,o={},a=Object.keys(e);for(r=0;r<a.length;r++)t=a[r],n.indexOf(t)>=0||(o[t]=e[t]);return o}(gn,["sideCar"]));bn.propTypes=wn;var En=we(),On=function(){},Sn=n.forwardRef((function(e,t){var r=n.useRef(null),o=n.useState({onScrollCapture:On,onWheelCapture:On,onTouchMoveCapture:On}),a=o[0],i=o[1],u=e.forwardProps,c=e.children,l=e.className,s=e.removeScrollBar,f=e.enabled,d=e.shards,p=e.sideCar,v=e.noIsolation,m=e.inert,y=e.allowPinchZoom,h=ye(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom"]),b=p,g=me({ref:de([r,t])},h,a);return n.createElement(n.Fragment,null,f&&n.createElement(b,{sideCar:En,removeScrollBar:s,shards:d,noIsolation:v,inert:m,setCallbacks:i,allowPinchZoom:!!y,lockRef:r}),u?n.cloneElement(n.Children.only(c),g):n.createElement("div",me({},g,{className:l}),c))}));Sn.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},Sn.classNames={fullWidth:"width-before-scroll-bar",zeroRight:"right-scroll-bar-position"};function xn(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var n=function(){if("undefined"!=typeof __webpack_nonce__)return __webpack_nonce__}();return n&&e.setAttribute("nonce",n),e}var Nn=function(){var e=0,n=null;return{add:function(t){var r,o;0==e&&(n=xn())&&(o=t,(r=n).styleSheet?r.styleSheet.cssText=o:r.appendChild(document.createTextNode(o)),function(e){(document.head||document.getElementsByTagName("head")[0]).appendChild(e)}(n)),e++},remove:function(){!--e&&n&&(n.parentNode&&n.parentNode.removeChild(n),n=null)}}},Cn=function(){var e,t=(e=Nn(),function(t){n.useEffect((function(){return e.add(t),function(){e.remove()}}),[])});return function(e){var n=e.styles;return t(n),null}},kn={left:0,top:0,right:0,gap:0},Pn=function(e){return parseInt(e||"",10)||0},Tn=function(e){if(void 0===e&&(e="margin"),"undefined"==typeof window)return kn;var n=function(e){var n=window.getComputedStyle(document.body),t=n["padding"===e?"paddingLeft":"marginLeft"],r=n["padding"===e?"paddingTop":"marginTop"],o=n["padding"===e?"paddingRight":"marginRight"];return[Pn(t),Pn(r),Pn(o)]}(e),t=document.documentElement.clientWidth,r=window.innerWidth;return{left:n[0],top:n[1],right:n[2],gap:Math.max(0,r-t+n[2]-n[0])}},jn=Cn(),Dn=function(e,n,t,r){var o=e.left,a=e.top,i=e.right,u=e.gap;return void 0===t&&(t="margin"),"\n .with-scroll-bars-hidden {\n overflow: hidden "+r+";\n padding-right: "+u+"px "+r+";\n }\n body {\n overflow: hidden "+r+";\n "+[n&&"position: relative "+r+";","margin"===t&&"\n padding-left: "+o+"px;\n padding-top: "+a+"px;\n padding-right: "+i+"px;\n margin-left:0;\n margin-top:0;\n margin-right: "+u+"px "+r+";\n ","padding"===t&&"padding-right: "+u+"px "+r+";"].filter(Boolean).join("")+"\n }\n \n .right-scroll-bar-position {\n right: "+u+"px "+r+";\n }\n \n .width-before-scroll-bar {\n margin-right: "+u+"px "+r+";\n }\n \n .right-scroll-bar-position .right-scroll-bar-position {\n right: 0 "+r+";\n }\n \n .width-before-scroll-bar .width-before-scroll-bar {\n margin-right: 0 "+r+";\n }\n"},_n=function(e){var t=n.useState(Tn(e.gapMode)),r=t[0],o=t[1];n.useEffect((function(){o(Tn(e.gapMode))}),[e.gapMode]);var a=e.noRelative,i=e.noImportant,u=e.gapMode,c=void 0===u?"margin":u;return n.createElement(jn,{styles:Dn(r,!a,c,i?"":"!important")})},Rn=function(e,n){var t=n;do{if(In(e,t)){var r=Mn(e,t);if(r[1]>r[2])return!0}t=t.parentNode}while(t&&t!==document.body);return!1},In=function(e,n){return"v"===e?function(e){var n=window.getComputedStyle(e);return"hidden"!==n.overflowY&&!(n.overflowY===n.overflowX&&"visible"===n.overflowY)}(n):function(e){var n=window.getComputedStyle(e);return"hidden"!==n.overflowX&&!(n.overflowY===n.overflowX&&"visible"===n.overflowX)}(n)},Mn=function(e,n){return"v"===e?[(t=n).scrollTop,t.scrollHeight,t.clientHeight]:function(e){return[e.scrollLeft,e.scrollWidth,e.clientWidth]}(n);var t},Fn=!1;if("undefined"!=typeof window)try{var An=Object.defineProperty({},"passive",{get:function(){return Fn=!0,!0}});window.addEventListener("test",An,An),window.removeEventListener("test",An,An)}catch(e){Fn=!1}var $n=!!Fn&&{passive:!1},Ln=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},Vn=function(e){return[e.deltaX,e.deltaY]},Bn=function(e){return e&&"current"in e?e.current:e},qn=function(e){return"\n .block-interactivity-"+e+" {pointer-events: none;}\n .allow-interactivity-"+e+" {pointer-events: all;}\n"},Wn=0,Yn=[];var zn,Un=(zn=function(e){var t=n.useRef([]),r=n.useRef([0,0]),o=n.useRef(),a=n.useState(Wn++)[0],i=n.useState((function(){return Cn()}))[0],u=n.useRef(e);n.useEffect((function(){u.current=e}),[e]),n.useEffect((function(){if(e.inert){document.body.classList.add("block-interactivity-"+a);var n=[e.lockRef.current].concat((e.shards||[]).map(Bn)).filter(Boolean);return n.forEach((function(e){return e.classList.add("allow-interactivity-"+a)})),function(){document.body.classList.remove("block-interactivity-"+a),n.forEach((function(e){return e.classList.remove("allow-interactivity-"+a)}))}}}),[e.inert,e.lockRef.current,e.shards]);var c=n.useCallback((function(e,n){if("touches"in e&&2===e.touches.length)return!u.current.allowPinchZoom;var t,a=Ln(e),i=r.current,c="deltaX"in e?e.deltaX:i[0]-a[0],l="deltaY"in e?e.deltaY:i[1]-a[1],s=e.target,f=Math.abs(c)>Math.abs(l)?"h":"v",d=Rn(f,s);if(!d)return!0;if(d?t=f:(t="v"===f?"h":"v",d=Rn(f,s)),!d)return!1;if(!o.current&&"changedTouches"in e&&(c||l)&&(o.current=t),!t)return!0;var p=o.current||t;return function(e,n,t,r,o){var a=r,i=t.target,u=n.contains(i),c=!1,l=a>0,s=0,f=0;do{var d=Mn(e,i),p=d[0],v=d[1]-d[2]-p;(p||v)&&In(e,i)&&(s+=v,f+=p),i=i.parentNode}while(!u&&i!==document.body||u&&(n.contains(i)||n===i));return(l&&(o&&0===s||!o&&a>s)||!l&&(o&&0===f||!o&&-a>f))&&(c=!0),c}(p,n,e,"h"==p?c:l,!0)}),[]),l=n.useCallback((function(e){var n=e;if(Yn.length&&Yn[Yn.length-1]===i){var r="deltaY"in n?Vn(n):Ln(n),o=t.current.filter((function(e){return e.name===n.type&&e.target===n.target&&function(e,n){return e[0]===n[0]&&e[1]===n[1]}(e.delta,r)}))[0];if(o&&o.should)n.preventDefault();else if(!o){var a=(u.current.shards||[]).map(Bn).filter(Boolean).filter((function(e){return e.contains(n.target)}));(a.length>0?c(n,a[0]):!u.current.noIsolation)&&n.preventDefault()}}}),[]),s=n.useCallback((function(e,n,r,o){var a={name:e,delta:n,target:r,should:o};t.current.push(a),setTimeout((function(){t.current=t.current.filter((function(e){return e!==a}))}),1)}),[]),f=n.useCallback((function(e){r.current=Ln(e),o.current=void 0}),[]),d=n.useCallback((function(n){s(n.type,Vn(n),n.target,c(n,e.lockRef.current))}),[]),p=n.useCallback((function(n){s(n.type,Ln(n),n.target,c(n,e.lockRef.current))}),[]);n.useEffect((function(){return Yn.push(i),e.setCallbacks({onScrollCapture:d,onWheelCapture:d,onTouchMoveCapture:p}),document.addEventListener("wheel",l,$n),document.addEventListener("touchmove",l,$n),document.addEventListener("touchstart",f,$n),function(){Yn=Yn.filter((function(e){return e!==i})),document.removeEventListener("wheel",l,$n),document.removeEventListener("touchmove",l,$n),document.removeEventListener("touchstart",f,$n)}}),[]);var v=e.removeScrollBar,m=e.inert;return n.createElement(n.Fragment,null,m?n.createElement(i,{styles:qn(a)}):null,v?n.createElement(_n,{gapMode:"margin"}):null)},En.useMedium(zn),Ee),Gn=n.forwardRef((function(e,t){return n.createElement(Sn,me({},e,{ref:t,sideCar:Un}))}));function Xn(){return(Xn=Object.assign||function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])}return e}).apply(this,arguments)}function Zn(e,n){if(null==e)return{};var t,r,o={},a=Object.keys(e);for(r=0;r<a.length;r++)t=a[r],n.indexOf(t)>=0||(o[t]=e[t]);return o}Gn.classNames=Sn.classNames;var Hn={initialFocusRef:function(){return null},allowPinchZoom:re.bool,onDismiss:re.func},Kn=n.forwardRef((function(e,r){var o=e.isOpen,a=void 0===o||o,u=Zn(e,["isOpen"]);return n.useEffect((function(){return i("dialog")}),[]),a?t.createElement(d,{"data-reach-dialog-wrapper":""},t.createElement(Jn,Object.assign({ref:r},u))):null}));"production"!==process.env.NODE_ENV&&(Kn.displayName="DialogOverlay",Kn.propTypes=Xn({},Hn,{isOpen:re.bool}));var Jn=n.forwardRef((function(e,r){var o=e.allowPinchZoom,a=e.initialFocusRef,i=e.onClick,u=e.onDismiss,d=void 0===u?s:u,p=e.onMouseDown,v=e.onKeyDown,m=Zn(e,["allowPinchZoom","initialFocusRef","onClick","onDismiss","onMouseDown","onKeyDown"]),y=n.useRef(null),h=n.useRef(null),b=function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return n.useMemo((function(){return t.every((function(e){return null==e}))?null:function(e){t.forEach((function(n){c(n,e)}))}}),t)}(h,r),g=n.useCallback((function(){a&&a.current&&a.current.focus()}),[a]);return n.useEffect((function(){return h.current?function(e){var n=[],t=[],r=(o=e,(o&&o.ownerDocument?o.ownerDocument:l()?document:null)||document);var o;if(!e)return"production"!==process.env.NODE_ENV&&console.warn("A ref has not yet been attached to a dialog node when attempting to call `createAriaHider`."),s;return Array.prototype.forEach.call(r.querySelectorAll("body > *"),(function(r){var o,a;if(r!==(null===(o=e.parentNode)||void 0===o||null===(a=o.parentNode)||void 0===a?void 0:a.parentNode)){var i=r.getAttribute("aria-hidden");null!==i&&"false"!==i||(n.push(i),t.push(r),r.setAttribute("aria-hidden","true"))}})),function(){t.forEach((function(e,t){var r=n[t];null===r?e.removeAttribute("aria-hidden"):e.setAttribute("aria-hidden",r)}))}}(h.current):void 0}),[]),t.createElement(bn,{autoFocus:!0,returnFocus:!0,onActivation:g},t.createElement(Gn,{allowPinchZoom:o},t.createElement("div",Object.assign({},m,{ref:b,"data-reach-dialog-overlay":"",onClick:f(i,(function(e){y.current===e.target&&(e.stopPropagation(),d(e))})),onKeyDown:f(v,(function(e){"Escape"===e.key&&(e.stopPropagation(),d(e))})),onMouseDown:f(p,(function(e){y.current=e.target}))}))))}));"production"!==process.env.NODE_ENV&&(Kn.displayName="DialogOverlay",Kn.propTypes=Xn({},Hn));var Qn=n.forwardRef((function(e,n){var r=e.onClick,o=Zn(e,["onClick","onKeyDown"]);return t.createElement("div",Object.assign({"aria-modal":"true",role:"dialog",tabIndex:-1},o,{ref:n,"data-reach-dialog-content":"",onClick:f(r,(function(e){e.stopPropagation()}))}))}));"production"!==process.env.NODE_ENV&&(Qn.displayName="DialogContent",Qn.propTypes={"aria-label":nt,"aria-labelledby":nt});var et=n.forwardRef((function(e,n){var r=e.isOpen,o=e.onDismiss,a=void 0===o?s:o,i=e.initialFocusRef,u=Zn(e,["isOpen","onDismiss","initialFocusRef"]);return t.createElement(Kn,{initialFocusRef:i,isOpen:r,onDismiss:a},t.createElement(Qn,Object.assign({ref:n},u)))}));function nt(e,n,t,r,o){var a="\nSee https://www.w3.org/TR/wai-aria/#aria-label for details.";return e["aria-label"]||e["aria-labelledby"]?e["aria-label"]&&e["aria-labelledby"]?new Error("You provided both `aria-label` and `aria-labelledby` props to a <"+t+">. If the a label for this component is visible on the screen, that label's component should be given a unique ID prop, and that ID should be passed as the `aria-labelledby` prop into <"+t+">. If the label cannot be determined programmatically from the content of the element, an alternative label should be provided as the `aria-label` prop, which will be used as an `aria-label` on the HTML tag."+a):null!=e[n]&&"string"!=typeof e[n]?new Error("Invalid prop `"+n+"` supplied to `"+t+"`. Expected `string`, received `"+(Array.isArray(o)?"array":typeof o)+"`."):null:new Error("A <"+t+"> must have either an `aria-label` or `aria-labelledby` prop.\n "+a)}"production"!==process.env.NODE_ENV&&(et.displayName="Dialog",et.propTypes={isOpen:re.bool,onDismiss:re.func,"aria-label":nt,"aria-labelledby":nt}),exports.ModalDialogPrimitiveContent=Qn,exports.ModalDialogPrimitiveOverlay=Kn; |
{ | ||
"name": "@twilio-paste/modal-dialog-primitive", | ||
"version": "0.1.2", | ||
"version": "0.1.3", | ||
"category": "overlay", | ||
@@ -37,14 +37,3 @@ "status": "beta", | ||
}, | ||
"devDependencies": { | ||
"@babel/core": "^7.8.4", | ||
"@rollup/plugin-commonjs": "^11.0.2", | ||
"@rollup/plugin-node-resolve": "^7.1.1", | ||
"rollup": "^1.16.2", | ||
"rollup-plugin-babel": "^4.3.3", | ||
"rollup-plugin-terser": "^5.0.0", | ||
"rollup-plugin-typescript2": "^0.21.2", | ||
"typedoc": "^0.16.9", | ||
"typescript": "3.7.5" | ||
}, | ||
"gitHead": "16be21f00814952f3e8f816fff75437a7390d15f" | ||
"gitHead": "a1830c49ff3ac591db800a6b8b8ba9463b1bcd25" | ||
} |
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
90826
0