@twilio-paste/modal-dialog-primitive
Advanced tools
Comparing version 0.1.9 to 0.2.0
@@ -6,2 +6,13 @@ # Change Log | ||
# [0.2.0](https://github.com/twilio-labs/paste/compare/@twilio-paste/modal-dialog-primitive@0.1.9...@twilio-paste/modal-dialog-primitive@0.2.0) (2021-01-21) | ||
### Features | ||
* ESBuild for builds ([#1084](https://github.com/twilio-labs/paste/issues/1084)) ([0536460](https://github.com/twilio-labs/paste/commit/053646011508be10477d5b732269cdb0419235d7)) | ||
## [0.1.9](https://github.com/twilio-labs/paste/compare/@twilio-paste/modal-dialog-primitive@0.1.8...@twilio-paste/modal-dialog-primitive@0.1.9) (2021-01-15) | ||
@@ -8,0 +19,0 @@ |
@@ -0,3 +1,19 @@ | ||
/** | ||
* If you’re wondering why we wrapped that package into our own, we reasoned that it | ||
* would be best for our consumers’ DX, with reasons such as: | ||
* | ||
* - If we want to migrate the underlying nuts and bolts in the future, Twilio products | ||
* that depend on this primitive would need to replace all occurrences of | ||
* `import … from ‘@reach/dialog’` to `import … from ‘@some-new/package’`. | ||
* By wrapping it in `@twilio-paste/modal-dialog-primitive`, this refactor can be avoided. | ||
* The only change would be a version bump in the package.json file. | ||
* - We can more strictly enforce semver and backwards compatibility than some of | ||
* our dependencies. | ||
* - We can control when to provide an update and which versions we allow, to | ||
* help reduce potential bugs our consumers may face. | ||
* - We can control which APIs we expose. For example, we may chose to enable or | ||
* disable usage of certain undocumented APIs. | ||
*/ | ||
import { DialogContent as ModalDialogPrimitiveContent, DialogOverlay as ModalDialogPrimitiveOverlay } from '@reach/dialog'; | ||
export { ModalDialogPrimitiveContent, ModalDialogPrimitiveOverlay }; | ||
//# sourceMappingURL=index.d.ts.map |
@@ -1,1 +0,50 @@ | ||
import e,{useMemo as n,useCallback as t,useState as r,useRef as o,createElement as i,Fragment as a,forwardRef 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,y={},v=g;if("production"!==process.env.NODE_ENV){var m=("undefined"!=typeof process?process:{env:{NODE_ENV:"development"}}).env;v=function(e){y[e]||(y[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||!window.document||!window.document.createElement)}function g(){}function w(e,n){return function(t){if(e&&e(t),!t.defaultPrevented)return n(t)}}process.env.NODE_ENV,process.env.NODE_ENV,process.env.NODE_ENV;var E=function(n){var i,a=n.children,u=n.type,c=void 0===u?"reach-portal":u,l=o(null),s=o(null),f=(i=r(Object.create(null))[1],t((function(){i(Object.create(null))}),[]));return p((function(){if(l.current){var e=l.current.ownerDocument;return s.current=null==e?void 0:e.createElement(c),e.body.appendChild(s.current),f(),function(){s.current&&s.current.ownerDocument&&s.current.ownerDocument.body.removeChild(s.current)}}}),[c,f]),s.current?d(a,s.current):e.createElement("span",{ref:l})};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}"production"!==process.env.NODE_ENV&&(E.displayName="Portal");var N="function"==typeof Symbol&&Symbol.for,x=N?Symbol.for("react.element"):60103,P=N?Symbol.for("react.portal"):60106,C=N?Symbol.for("react.fragment"):60107,T=N?Symbol.for("react.strict_mode"):60108,k=N?Symbol.for("react.profiler"):60114,j=N?Symbol.for("react.provider"):60109,_=N?Symbol.for("react.context"):60110,D=N?Symbol.for("react.async_mode"):60111,F=N?Symbol.for("react.concurrent_mode"):60111,I=N?Symbol.for("react.forward_ref"):60112,M=N?Symbol.for("react.suspense"):60113,A=N?Symbol.for("react.suspense_list"):60120,L=N?Symbol.for("react.memo"):60115,$=N?Symbol.for("react.lazy"):60116,R=N?Symbol.for("react.block"):60121,V=N?Symbol.for("react.fundamental"):60117,B=N?Symbol.for("react.responder"):60118,W=N?Symbol.for("react.scope"):60119;function q(e){if("object"==typeof e&&null!==e){var n=e.$$typeof;switch(n){case x:switch(e=e.type){case D:case F:case C:case k:case T:case M:return e;default:switch(e=e&&e.$$typeof){case _:case I:case $:case L:case j:return e;default:return n}}case P:return n}}}function Y(e){return q(e)===F}var U={AsyncMode:D,ConcurrentMode:F,ContextConsumer:_,ContextProvider:j,Element:x,ForwardRef:I,Fragment:C,Lazy:$,Memo:L,Portal:P,Profiler:k,StrictMode:T,Suspense:M,isAsyncMode:function(e){return Y(e)||q(e)===D},isConcurrentMode:Y,isContextConsumer:function(e){return q(e)===_},isContextProvider:function(e){return q(e)===j},isElement:function(e){return"object"==typeof e&&null!==e&&e.$$typeof===x},isForwardRef:function(e){return q(e)===I},isFragment:function(e){return q(e)===C},isLazy:function(e){return q(e)===$},isMemo:function(e){return q(e)===L},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)===M},isValidElementType:function(e){return"string"==typeof e||"function"==typeof e||e===C||e===F||e===k||e===T||e===M||e===A||"object"==typeof e&&null!==e&&(e.$$typeof===$||e.$$typeof===L||e.$$typeof===j||e.$$typeof===_||e.$$typeof===I||e.$$typeof===V||e.$$typeof===B||e.$$typeof===W||e.$$typeof===R)},typeOf:q},z=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,y=e?Symbol.for("react.memo"):60115,v=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 v:case y:case u:return m;default:return n}}case r:return n}}}var E=l,O=s,S=c,N=u,x=t,P=f,C=o,T=v,k=y,j=r,_=a,D=i,F=d,I=!1;function M(e){return w(e)===s}n.AsyncMode=E,n.ConcurrentMode=O,n.ContextConsumer=S,n.ContextProvider=N,n.Element=x,n.ForwardRef=P,n.Fragment=C,n.Lazy=T,n.Memo=k,n.Portal=j,n.Profiler=_,n.StrictMode=D,n.Suspense=F,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)===v},n.isMemo=function(e){return w(e)===y},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===v||e.$$typeof===y||e.$$typeof===u||e.$$typeof===c||e.$$typeof===f||e.$$typeof===h||e.$$typeof===b||e.$$typeof===g||e.$$typeof===m)},n.typeOf=w}()})),Z=(z.AsyncMode,z.ConcurrentMode,z.ContextConsumer,z.ContextProvider,z.Element,z.ForwardRef,z.Fragment,z.Lazy,z.Memo,z.Portal,z.Profiler,z.StrictMode,z.Suspense,z.isAsyncMode,z.isConcurrentMode,z.isContextConsumer,z.isContextProvider,z.isElement,z.isForwardRef,z.isFragment,z.isLazy,z.isMemo,z.isPortal,z.isProfiler,z.isStrictMode,z.isSuspense,z.isValidElementType,z.typeOf,S((function(e){"production"===process.env.NODE_ENV?e.exports=U:e.exports=z}))),G=Object.getOwnPropertySymbols,X=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]))X.call(t,a)&&(o[a]=t[a]);if(G){r=G(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 Z.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=Z;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),ye=de.func,ve=(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 i(a,null,i("div",{key:"guard-first","data-focus-guard":!0,"data-focus-auto-guard":!0,style:Oe}),n,n&&i("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};var Ne=function(){return(Ne=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 xe(e){return e}function Pe(e,n){void 0===n&&(n=xe);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 Ce(e,n){return void 0===n&&(n=xe),Pe(e,n)}function Te(e){void 0===e&&(e={});var n=Pe(null);return n.options=Ne({async:!0,ssr:!1},e),n}var ke=function(e){var n=e.sideCar,t=function(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}(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 i(r,Ne({},t))};ke.isSideCarExport=!0;var je=Ce({},(function(e){return{target:e.target,currentTarget:e.currentTarget}})),_e=Ce(),De=Ce(),Fe=Te({async:!0}),Ie=[],Me=u((function(e,n){var u,l=r(),s=l[0],f=l[1],d=o(),p=o(!1),y=o(null),v=e.children,m=e.disabled,h=e.noFocusGuards,b=e.persistentFocus,g=e.crossFrame,w=e.autoFocus,E=e.allowTextSelection,S=e.group,N=e.className,x=e.whiteList,P=e.shards,C=void 0===P?Ie:P,T=e.as,k=void 0===T?"div":T,j=e.lockProps,_=void 0===j?{}:j,D=e.sideCar,F=e.returnFocus,I=e.onActivation,M=e.onDeactivation,A=r({})[0],L=t((function(){y.current=y.current||document&&document.activeElement,d.current&&I&&I(d.current),p.current=!0}),[I]),$=t((function(){p.current=!1,M&&M(d.current)}),[M]),R=t((function(e){var n=y.current;if(Boolean(F)&&n&&n.focus){var t="object"==typeof F?F:void 0;y.current=null,e?Promise.resolve().then((function(){return n.focus(t)})):n.focus(t)}}),[F]),V=t((function(e){p.current&&je.useMedium(e)}),[]),B=_e.useMedium,W=t((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(((u={})["data-focus-lock-disabled"]=m&&"disabled",u["data-focus-lock"]=S,u),_),Y=!0!==h,U=Y&&"tail"!==h,z=Ee([n,W]);return i(a,null,Y&&[i("div",{key:"guard-first","data-focus-guard":!0,tabIndex:m?-1:0,style:Oe}),i("div",{key:"guard-nearest","data-focus-guard":!0,tabIndex:m?-1:1,style:Oe})],!m&&i(D,{id:A,sideCar:Fe,observed:s,disabled:m,persistentFocus:b,crossFrame:g,autoFocus:w,whiteList:x,shards:C,onActivation:L,onDeactivation:$,returnFocus:R}),i(k,O({ref:z},q,{className:N,onBlur:B,onFocus:V}),v),U&&i("div",{"data-focus-guard":!0,tabIndex:m?-1:0,style:Oe}))}));Me.propTypes="production"!==process.env.NODE_ENV?{children:be,disabled:pe,returnFocus:ge([pe,ve]),noFocusGuards:pe,allowTextSelection:pe,autoFocus:pe,persistentFocus:pe,crossFrame:pe,group:me,className:me,whiteList:ye,shards:we(he),as:ge([me,ye,ve]),lockProps:ve,onActivation:ye,onDeactivation:ye,sideCar:he.isRequired}:{},Me.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 Ae=function(e){for(var n=Array(e.length),t=0;t<e.length;++t)n[t]=e[t];return n},Le=function(e){return Array.isArray(e)?e:[e]},$e=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},Re=function(e,n,t){return Ae(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($e)},Ve=["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]"],Be=Ve.join(","),We=Be+", [data-focus-guard]",qe=function(e,n){return e.reduce((function(e,t){return e.concat(Ae(t.querySelectorAll(n?We:Be)),t.parentNode?Ae(t.parentNode.querySelectorAll(Ve.join(","))).filter((function(e){return e===t})):[])}),[])},Ye=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=Ye(e),r=Ye(n),o=0;o<t.length;o+=1){var i=t[o];if(r.indexOf(i)>=0)return i}return!1},ze=function(e){return Ae(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&&n.parentNode.nodeType===n.DOCUMENT_FRAGMENT_NODE?n.parentNode.host:n.parentNode);var t}(e)})).filter((function(e){return function(e){return!(("INPUT"===e.tagName||"BUTTON"===e.tagName)&&("hidden"===e.type||e.disabled))}(e)}))},Ze=function(e,n){return Re(ze(qe(e,n)),!0,n)},Ge=function(e){return Re(ze(qe(e)),!1)},Xe=function(e){return ze((n=e.querySelectorAll("[data-autofocus-inside]"),Ae(n).map((function(e){return qe([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 He(e)&&e.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,n):e},Je=function(e){return e[0]&&e.length>1?Ke(e[0],e):e[0]},Qe=function(e,n){return e.length>1?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 Le(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}(Ae(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,r){var o=e.length,i=e[0],a=e[o-1],u=tn(t);if(!(e.indexOf(t)>=0)){var c,l,s=n.indexOf(t),f=n.indexOf(r||s),d=e.indexOf(r),p=s-f,y=n.indexOf(i),v=n.indexOf(a),m=(c=n,l=new Set,c.forEach((function(e){return l.add(Ke(e,c))})),c.filter((function(e){return l.has(e)}))),h=m.indexOf(t)-m.indexOf(r||s),b=Qe(e,0),g=Qe(e,o-1);return-1===s||-1===d?"NEW_FOCUS":!p&&d>=0?d:s<=y&&u&&Math.abs(p)>1?g:s>=v&&u&&Math.abs(p)>1?b:p&&Math.abs(h)>1?d:s<=y?g:s>v?b:p?Math.abs(p)>1?d:(o+d+p)%o:void 0}},an=function(e,n,t){var r=Le(e),o=Le(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},un=function(e,n){var t=document&&document.activeElement,r=nn(e).filter(rn),o=an(t||e,e,r),i=Ge(r),a=Ze(r).filter((function(e){var n=e.node;return rn(n)}));if(a[0]||(a=i)[0]){var u,c,l,s,f=Ge([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})),y=on(p,f,t,n);if("NEW_FOCUS"===y){var v=i.map((function(e){return e.node})).filter((s=function(e){return e.reduce((function(e,n){return e.concat(Xe(n))}),[])}(r),function(e){return!!e.autofocus||e.dataset&&!!e.dataset.autofocus||s.indexOf(e)>=0}));return{node:v&&v.length?Je(v):Je(p)}}return void 0===y?y:d[y]}},cn=function(e){return e===document.activeElement},ln=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=Ae(e.querySelectorAll("iframe")),t=cn,!!n.filter((function(e){return e===t}))[0];var n,t}(t)}),!1)},sn=0,fn=!1,dn=function(e,n){var t,r=un(e,n);if(!fn&&r){if(sn>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"),fn=!0,void setTimeout((function(){fn=!1}),1);sn++,(t=r.node).focus(),t.contentWindow&&t.contentWindow.focus(),sn--}};function pn(e){var n=window.setImmediate;void 0!==n?n(e):setTimeout(e,1)}var yn=function(){return document&&document.activeElement===document.body||document&&Ae(document.querySelectorAll("[data-no-focus-lock]")).some((function(e){return e.contains(document.activeElement)}))},vn=null,mn=null,hn=null,bn=!1,gn=function(){return!0};function wn(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 En=function(e){return e&&"current"in e?e.current:e},On=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||hn&&hn.portaledElement,y=document&&document.activeElement;if(p){var v=[p].concat(f.map(En).filter(Boolean));if(y&&!function(e){return(vn.whiteList||gn)(e)}(y)||(l||(d?Boolean(bn):"meanwhile"===bn)||!yn()||!mn&&s)&&(!p||ln(v)||(i=y,hn&&hn.portaledElement===i)||(document&&!mn&&y&&!s?(y.blur&&y.blur(),document.body.focus()):(a=dn(v,mn),hn={})),bn=!1,mn=document&&document.activeElement),document){var m=document&&document.activeElement,h=(n=nn(e=v).filter(rn),t=an(e,e,n),r=Ze([t],!0),o=Ze(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.map((function(e){return e.node})).indexOf(m);b>-1&&(h.filter((function(e){var n=e.guard,t=e.node;return n&&t.dataset.focusAutoGuard})).forEach((function(e){return e.node.removeAttribute("tabIndex")})),wn(b,h.length,1,h),wn(b,-1,-1,h))}}}return a},Sn=function(e){On()&&e&&(e.stopPropagation(),e.preventDefault())},Nn=function(){return pn(On)},xn=function(e){var n=e.target,t=e.currentTarget;t.contains(n)||(hn={observerNode:t,portaledElement:n})};"production"!==process.env.NODE_ENV&&de.node.isRequired;var Pn=function(){bn="just",setTimeout((function(){bn="meanwhile"}),0)};je.assignSyncMedium(xn),_e.assignMedium(Nn),De.assignMedium((function(e){return e({moveFocusInside:dn,focusInside:ln})}));var Cn=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",Sn,!0),document.addEventListener("focusout",Nn),window.addEventListener("blur",Pn));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?(mn=null,r&&t.observed===n.observed||n.onActivation(),On(),pn(On)):(document.removeEventListener("focusin",Sn,!0),document.removeEventListener("focusout",Nn),window.removeEventListener("blur",Pn),mn=null)}))((function(){return null})),Tn=u((function(e,n){return i(Me,O({sideCar:Cn,ref:n},e))})),kn=Me.propTypes||{},jn=(kn.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}(kn,["sideCar"]));Tn.propTypes=jn;var _n=function(){return(_n=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)};var Dn=Te(),Fn=function(){},In=u((function(e,n){var t=o(null),u=r({onScrollCapture:Fn,onWheelCapture:Fn,onTouchMoveCapture:Fn}),c=u[0],l=u[1],d=e.forwardProps,p=e.children,y=e.className,v=e.removeScrollBar,m=e.enabled,h=e.shards,b=e.sideCar,g=e.noIsolation,w=e.inert,E=e.allowPinchZoom,O=e.as,S=void 0===O?"div":O,N=function(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}(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as"]),x=b,P=Ee([t,n]),C=_n({},N,c);return i(a,null,m&&i(x,{sideCar:Dn,removeScrollBar:v,shards:h,noIsolation:g,inert:w,setCallbacks:l,allowPinchZoom:!!E,lockRef:t}),d?s(f.only(p),_n({},C,{ref:P})):i(S,_n({},C,{className:y,ref:P}),p))}));In.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},In.classNames={fullWidth:"width-before-scroll-bar",zeroRight:"right-scroll-bar-position"};function Mn(){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 An=function(){var e=0,n=null;return{add:function(t){var r,o;0==e&&(n=Mn())&&(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)}}},Ln=function(){var e,n=(e=An(),function(n){c((function(){return e.add(n),function(){e.remove()}}),[])});return function(e){var t=e.styles;return n(t),null}},$n={left:0,top:0,right:0,gap:0},Rn=function(e){return parseInt(e||"",10)||0},Vn=function(e){if(void 0===e&&(e="margin"),"undefined"==typeof window)return $n;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[Rn(t),Rn(r),Rn(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])}},Bn=Ln(),Wn=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"},qn=function(e){var n=r(Vn(e.gapMode)),t=n[0],o=n[1];c((function(){o(Vn(e.gapMode))}),[e.gapMode]);var a=e.noRelative,u=e.noImportant,l=e.gapMode;return i(Bn,{styles:Wn(t,!a,void 0===l?"margin":l,u?"":"!important")})},Yn=function(e,n){var t=n;do{if(Un(e,t)){var r=zn(e,t);if(r[1]>r[2])return!0}t=t.parentNode}while(t&&t!==document.body);return!1},Un=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)},zn=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 Gn=Object.defineProperty({},"passive",{get:function(){return Zn=!0,!0}});window.addEventListener("test",Gn,Gn),window.removeEventListener("test",Gn,Gn)}catch(e){Zn=!1}var Xn=!!Zn&&{passive:!1},Hn=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},Kn=function(e){return[e.deltaX,e.deltaY]},Jn=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"},et=0,nt=[];var tt,rt=(tt=function(e){var n=o([]),u=o([0,0]),l=o(),s=r(et++)[0],f=r((function(){return Ln()}))[0],d=o(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(Jn)).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=t((function(e,n){if("touches"in e&&2===e.touches.length)return!d.current.allowPinchZoom;var t,r=Hn(e),o=u.current,i="deltaX"in e?e.deltaX:o[0]-r[0],a="deltaY"in e?e.deltaY:o[1]-r[1],c=e.target,s=Math.abs(i)>Math.abs(a)?"h":"v",f=Yn(s,c);if(!f)return!0;if(f?t=s:(t="v"===s?"h":"v",f=Yn(s,c)),!f)return!1;if(!l.current&&"changedTouches"in e&&(i||a)&&(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=zn(e,a),p=d[0],y=d[1]-d[2]-p;(p||y)&&Un(e,a)&&(s+=y,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:a,!0)}),[]),y=t((function(e){var t=e;if(nt.length&&nt[nt.length-1]===f){var r="deltaY"in t?Kn(t):Hn(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(Jn).filter(Boolean).filter((function(e){return e.contains(t.target)}));(i.length>0?p(t,i[0]):!d.current.noIsolation)&&t.preventDefault()}}}),[]),v=t((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=t((function(e){u.current=Hn(e),l.current=void 0}),[]),h=t((function(n){v(n.type,Kn(n),n.target,p(n,e.lockRef.current))}),[]),b=t((function(n){v(n.type,Hn(n),n.target,p(n,e.lockRef.current))}),[]);c((function(){return nt.push(f),e.setCallbacks({onScrollCapture:h,onWheelCapture:h,onTouchMoveCapture:b}),document.addEventListener("wheel",y,Xn),document.addEventListener("touchmove",y,Xn),document.addEventListener("touchstart",m,Xn),function(){nt=nt.filter((function(e){return e!==f})),document.removeEventListener("wheel",y,Xn),document.removeEventListener("touchmove",y,Xn),document.removeEventListener("touchstart",m,Xn)}}),[]);var g=e.removeScrollBar,w=e.inert;return i(a,null,w?i(f,{styles:Qn(s)}):null,g?i(qn,{gapMode:"margin"}):null)},Dn.useMedium(tt),ke),ot=u((function(e,n){return i(In,_n({},e,{ref:n,sideCar:rt}))}));function it(){return(it=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 at(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}ot.classNames=In.classNames;var ut={allowPinchZoom:de.bool,dangerouslyBypassFocusLock:de.bool,dangerouslyBypassScrollLock:de.bool,initialFocusRef:function(){return null},onDismiss:de.func},ct=u((function(n,t){var r=n.isOpen,o=void 0===r||r,i=at(n,["isOpen"]);return c((function(){return v("dialog")}),[]),c((function(){o?window.__REACH_DISABLE_TOOLTIPS=!0:window.requestAnimationFrame((function(){window.__REACH_DISABLE_TOOLTIPS=!1}))}),[o]),o?e.createElement(E,{"data-reach-dialog-wrapper":""},e.createElement(lt,Object.assign({ref:t},i))):null}));"production"!==process.env.NODE_ENV&&(ct.displayName="DialogOverlay",ct.propTypes=it({},ut,{isOpen:de.bool}));var lt=u((function(r,i){var a=r.allowPinchZoom,u=r.dangerouslyBypassFocusLock,l=void 0!==u&&u,s=r.dangerouslyBypassScrollLock,f=void 0!==s&&s,d=r.initialFocusRef,p=r.onClick,y=r.onDismiss,v=void 0===y?g:y,m=r.onKeyDown,E=r.onMouseDown,O=r.unstable_lockFocusAcrossFrames,S=void 0===O||O,N=at(r,["allowPinchZoom","dangerouslyBypassFocusLock","dangerouslyBypassScrollLock","initialFocusRef","onClick","onDismiss","onKeyDown","onMouseDown","unstable_lockFocusAcrossFrames"]),x=o(null),P=o(null),C=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)}))}}),[].concat(t))}(P,i),T=t((function(){d&&d.current&&d.current.focus()}),[d]);return c((function(){return P.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)}))}}(P.current):void 0}),[]),e.createElement(Tn,{autoFocus:!0,returnFocus:!0,onActivation:T,disabled:l,crossFrame:S},e.createElement(ot,{allowPinchZoom:a,enabled:!f},e.createElement("div",Object.assign({},N,{ref:C,"data-reach-dialog-overlay":"",onClick:w(p,(function(e){x.current===e.target&&(e.stopPropagation(),v(e))})),onKeyDown:w(m,(function(e){"Escape"===e.key&&(e.stopPropagation(),v(e))})),onMouseDown:w(E,(function(e){x.current=e.target}))}))))}));"production"!==process.env.NODE_ENV&&(ct.displayName="DialogOverlay",ct.propTypes=it({},ut));var st=u((function(n,t){var r=n.onClick,o=(n.onKeyDown,at(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&&(st.displayName="DialogContent",st.propTypes={"aria-label":dt,"aria-labelledby":dt});var ft=u((function(n,t){var r=n.allowPinchZoom,o=void 0!==r&&r,i=n.initialFocusRef,a=n.isOpen,u=n.onDismiss,c=void 0===u?g:u,l=at(n,["allowPinchZoom","initialFocusRef","isOpen","onDismiss"]);return e.createElement(ct,{allowPinchZoom:o,initialFocusRef:i,isOpen:a,onDismiss:c},e.createElement(st,Object.assign({ref:t},l)))}));function dt(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&&(ft.displayName="Dialog",ft.propTypes={isOpen:de.bool,onDismiss:de.func,"aria-label":dt,"aria-labelledby":dt});export{st as ModalDialogPrimitiveContent,ct as ModalDialogPrimitiveOverlay}; | ||
var Ir=Object.create,Ee=Object.defineProperty,kr=Object.getPrototypeOf,Ar=Object.prototype.hasOwnProperty,Lr=Object.getOwnPropertyNames,Br=Object.getOwnPropertyDescriptor;var Wr=t=>Ee(t,"__esModule",{value:!0});var re=(t,e)=>()=>(e||(e={exports:{}},t(e.exports,e)),e.exports);var jr=(t,e,r)=>{if(Wr(t),e&&typeof e=="object"||typeof e=="function")for(let n of Lr(e))!Ar.call(t,n)&&n!=="default"&&Ee(t,n,{get:()=>e[n],enumerable:!(r=Br(e,n))||r.enumerable});return t},V=t=>t&&t.__esModule?t:jr(Ee(t!=null?Ir(kr(t)):{},"default",{value:t,enumerable:!0}),t);var ct=re((Oo,at)=>{"use strict";var Mr=!1,it=function(){};Mr&&(ut=function(e,r){var n=arguments.length;r=new Array(n>1?n-1:0);for(var o=1;o<n;o++)r[o-1]=arguments[o];var a=0,i="Warning: "+e.replace(/%s/g,function(){return r[a++]});typeof console!="undefined"&&console.error(i);try{throw new Error(i)}catch(u){}},it=function(t,e,r){var n=arguments.length;r=new Array(n>2?n-2:0);for(var o=2;o<n;o++)r[o-2]=arguments[o];if(e===void 0)throw new Error("`warning(condition, format, ...args)` requires a warning message argument");t||ut.apply(null,[e].concat(r))});var ut;at.exports=it});var bt=re((Vo,gt)=>{"use strict";var Kr="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";gt.exports=Kr});var Et=re((Go,wt)=>{"use strict";var zr=bt();function xt(){}function St(){}St.resetWarningCache=xt;wt.exports=function(){function t(n,o,a,i,u,c){if(c!==zr){var l=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 l.name="Invariant Violation",l}}t.isRequired=t;function e(){return t}var r={array:t,bool:t,func:t,number:t,object:t,string:t,symbol:t,any:t,arrayOf:e,element:t,elementType:t,instanceOf:e,node:t,objectOf:e,oneOf:e,oneOfType:e,shape:e,exact:e,checkPropTypes:St,resetWarningCache:xt};return r.PropTypes=r,r}});var U=re((qo,_t)=>{_t.exports=Et()();var Uo,Ho});import M,{forwardRef as et,useEffect as tt,useRef as br,useCallback as So}from"react";import Yr,{useRef as ht}from"react";var Hr=V(ct());import lt,{isValidElement as Fo,cloneElement as No,createContext as To,useRef as Do,useState as Vr,useCallback as Gr,useEffect as Io,useMemo as Ur}from"react";var ft=st()?lt.useLayoutEffect:lt.useEffect;var dt=ne;var ko=typeof window!="undefined"&&window.Math==Math?window:typeof self!="undefined"&&self.Math==Math?self:Function("return this")();function $r(t,e){if(t!=null)if(qr(t))t(e);else try{t.current=e}catch(r){throw new Error('Cannot assign value "'+e+'" to ref "'+t+'"')}}function st(){return!!(typeof window!="undefined"&&window.document&&window.document.createElement)}function pt(t){return t&&t.ownerDocument?t.ownerDocument:st()?document:null}function qr(t){return!!(t&&{}.toString.call(t)=="[object Function]")}function ne(){}function mt(){var t=Vr(Object.create(null)),e=t[1];return Gr(function(){e(Object.create(null))},[])}function vt(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];return Ur(function(){return e.every(function(n){return n==null})?null:function(n){e.forEach(function(o){$r(o,n)})}},[].concat(e))}function G(t,e){return function(r){if(t&&t(r),!r.defaultPrevented)return e(r)}}import{createPortal as Zr}from"react-dom";var Xr=function(e){var r=e.children,n=e.type,o=n===void 0?"reach-portal":n,a=ht(null),i=ht(null),u=mt();return ft(function(){if(!!a.current){var c=a.current.ownerDocument;return i.current=c==null?void 0:c.createElement(o),c.body.appendChild(i.current),u(),function(){i.current&&i.current.ownerDocument&&i.current.ownerDocument.body.removeChild(i.current)}}},[o,u]),i.current?Zr(r,i.current):Yr.createElement("span",{ref:a})},yt=Xr;function _e(t,e){if(t==null)return{};var r={},n=Object.keys(t),o,a;for(a=0;a<n.length;a++)o=n[a],!(e.indexOf(o)>=0)&&(r[o]=t[o]);return r}function R(){return R=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},R.apply(this,arguments)}import{createElement as qn,forwardRef as $n}from"react";var va=V(U());import{Fragment as tn,createElement as k,forwardRef as rn,useCallback as q,useEffect as ma,useRef as Oe,useState as Bt}from"react";var H="data-focus-lock",oe="data-focus-lock-disabled",Rt="data-no-focus-lock",Ot="data-autofocus-inside";function Ct(t,e){return typeof t=="function"?t(e):t&&(t.current=e),t}import{useState as Qr}from"react";function Pt(t,e){var r=Qr(function(){return{value:t,callback:e,facade:{get current(){return r.value},set current(n){var o=r.value;o!==n&&(r.value=n,r.callback(n,o))}}}})[0];return r.callback=e,r.facade}function ae(t,e){return Pt(e,function(r){return t.forEach(function(n){return Ct(n,r)})})}var ta=V(U());import{Fragment as Jr,createElement as Re}from"react";var D={width:"1px",height:"0px",padding:0,overflow:"hidden",position:"fixed",top:"1px",left:"1px"},Ft=function(e){var r=e.children;return Re(Jr,null,Re("div",{key:"guard-first","data-focus-guard":!0,"data-focus-auto-guard":!0,style:D}),r,r&&Re("div",{key:"guard-last","data-focus-guard":!0,"data-focus-auto-guard":!0,style:D}))};Ft.propTypes={};Ft.defaultProps={children:null};var I=function(){return I=Object.assign||function(e){for(var r,n=1,o=arguments.length;n<o;n++){r=arguments[n];for(var a in r)Object.prototype.hasOwnProperty.call(r,a)&&(e[a]=r[a])}return e},I.apply(this,arguments)};function Nt(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]]);return r}function Tt(t){return t}function Dt(t,e){e===void 0&&(e=Tt);var r=[],n=!1,o={read:function(){if(n)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return r.length?r[r.length-1]:t},useMedium:function(a){var i=e(a,n);return r.push(i),function(){r=r.filter(function(u){return u!==i})}},assignSyncMedium:function(a){for(n=!0;r.length;){var i=r;r=[],i.forEach(a)}r={push:function(u){return a(u)},filter:function(){return r}}},assignMedium:function(a){n=!0;var i=[];if(r.length){var u=r;r=[],u.forEach(a),i=r}var c=function(){var f=i;i=[],f.forEach(a)},l=function(){return Promise.resolve().then(c)};l(),r={push:function(f){i.push(f),l()},filter:function(f){return i=i.filter(f),r}}}};return o}function ie(t,e){return e===void 0&&(e=Tt),Dt(t,e)}function ue(t){t===void 0&&(t={});var e=Dt(null);return e.options=I({async:!0,ssr:!1},t),e}import{createElement as en}from"react";var It=function(t){var e=t.sideCar,r=Nt(t,["sideCar"]);if(!e)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var n=e.read();if(!n)throw new Error("Sidecar medium not found");return en(n,I({},r))};It.isSideCarExport=!0;function kt(t,e){return t.useMedium(e),It}var ce=ie({},function(t){var e=t.target,r=t.currentTarget;return{target:e,currentTarget:r}}),le=ie(),At=ie(),Lt=ue({async:!0});var nn=[],Ce=rn(function(t,e){var r,n=Bt(),o=n[0],a=n[1],i=Oe(),u=Oe(!1),c=Oe(null),l=t.children,f=t.disabled,p=t.noFocusGuards,d=t.persistentFocus,v=t.crossFrame,h=t.autoFocus,s=t.allowTextSelection,m=t.group,b=t.className,y=t.whiteList,w=t.shards,S=w===void 0?nn:w,g=t.as,T=g===void 0?"div":g,_=t.lockProps,x=_===void 0?{}:_,J=t.sideCar,ee=t.returnFocus,xe=t.onActivation,Se=t.onDeactivation,Sr=Bt({}),Er=Sr[0],_r=q(function(){c.current=c.current||document&&document.activeElement,i.current&&xe&&xe(i.current),u.current=!0},[xe]),Rr=q(function(){u.current=!1,Se&&Se(i.current)},[Se]),Or=q(function(C){var te=c.current;if(Boolean(ee)&&te&&te.focus){var ot=typeof ee=="object"?ee:void 0;c.current=null,C?Promise.resolve().then(function(){return te.focus(ot)}):te.focus(ot)}},[ee]),Cr=q(function(C){u.current&&ce.useMedium(C)},[]),Pr=le.useMedium,Fr=q(function(C){i.current!==C&&(i.current=C,a(C))},[]),Nr=R((r={},r[oe]=f&&"disabled",r[H]=m,r),x),nt=p!==!0,Tr=nt&&p!=="tail",Dr=ae([e,Fr]);return k(tn,null,nt&&[k("div",{key:"guard-first","data-focus-guard":!0,tabIndex:f?-1:0,style:D}),k("div",{key:"guard-nearest","data-focus-guard":!0,tabIndex:f?-1:1,style:D})],!f&&k(J,{id:Er,sideCar:Lt,observed:o,disabled:f,persistentFocus:d,crossFrame:v,autoFocus:h,whiteList:y,shards:S,onActivation:_r,onDeactivation:Rr,returnFocus:Or}),k(T,R({ref:Dr},Nr,{className:b,onBlur:Pr,onFocus:Cr}),l),Tr&&k("div",{"data-focus-guard":!0,tabIndex:f?-1:0,style:D}))});Ce.propTypes={};Ce.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=Ce;var yi=V(U());import{createElement as Nn}from"react";function Fe(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,t.__proto__=e}function Ne(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}import on,{PureComponent as an}from"react";function un(t,e){function r(n){return n.displayName||n.name||"Component"}return function(o){var a=[],i;function u(){i=t(a.map(function(l){return l.props})),e(i)}var c=function(l){Fe(f,l);function f(){return l.apply(this,arguments)||this}f.peek=function(){return i};var p=f.prototype;return p.componentDidMount=function(){a.push(this),u()},p.componentDidUpdate=function(){u()},p.componentWillUnmount=function(){var v=a.indexOf(this);a.splice(v,1),u()},p.render=function(){return on.createElement(o,this.props)},f}(an);return Ne(c,"displayName","SideEffect("+r(o)+")"),c}}var Wt=un;var E=function(e){for(var r=Array(e.length),n=0;n<e.length;++n)r[n]=e[n];return r},jt=function(e,r){return e.filter(function(n){return n===r})[0]},$=function(e){return Array.isArray(e)?e:[e]};var cn=function(e,r){var n=e.tabIndex-r.tabIndex,o=e.index-r.index;if(n){if(!e.tabIndex)return 1;if(!r.tabIndex)return-1}return n||o},Te=function(e,r,n){return E(e).map(function(o,a){return{node:o,index:a,tabIndex:n&&o.tabIndex===-1?(o.dataset||{}).focusGuard?0:-1:o.tabIndex}}).filter(function(o){return!r||o.tabIndex>=0}).sort(cn)};var De=["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]"];var Mt=De.join(","),ln=Mt+", [data-focus-guard]",se=function(e,r){return e.reduce(function(n,o){return n.concat(E(o.querySelectorAll(r?ln:Mt)),o.parentNode?E(o.parentNode.querySelectorAll(De.join(","))).filter(function(a){return a===o}):[])},[])},Vt=function(e){var r=e.querySelectorAll("["+Ot+"]");return E(r).map(function(n){return se([n])}).reduce(function(n,o){return n.concat(o)},[])};var sn=function(e){return!e||!e.getPropertyValue?!1:e.getPropertyValue("display")==="none"||e.getPropertyValue("visibility")==="hidden"},fn=function t(e){return!e||e===document||e.nodeType===Node.DOCUMENT_NODE||!sn(window.getComputedStyle(e,null))&&t(e.parentNode&&e.parentNode.nodeType===e.DOCUMENT_FRAGMENT_NODE?e.parentNode.host:e.parentNode)},dn=function(e){return!((e.tagName==="INPUT"||e.tagName==="BUTTON")&&(e.type==="hidden"||e.disabled))},Gt=function t(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[];return r.push(e),e.parentNode&&t(e.parentNode,r),r},fe=function(e,r){for(var n=Gt(e),o=Gt(r),a=0;a<n.length;a+=1){var i=n[a];if(o.indexOf(i)>=0)return i}return!1},Ie=function(e){return E(e).filter(function(r){return fn(r)}).filter(function(r){return dn(r)})},de=function(e,r){return Te(Ie(se(e,r)),!0,r)},ke=function(e){return Te(Ie(se(e)),!1)},Ut=function(e){return Ie(Vt(e))};var Ht=function(e){return e.tagName==="INPUT"&&e.type==="radio"},pn=function(e,r){return r.filter(Ht).filter(function(n){return n.name===e.name}).filter(function(n){return n.checked})[0]||e},pe=function(e,r){return Ht(e)&&e.name?pn(e,r):e},qt=function(e){var r=new Set;return e.forEach(function(n){return r.add(pe(n,e))}),e.filter(function(n){return r.has(n)})};var mn=function(e){return e[0]&&e.length>1?pe(e[0],e):e[0]},Ae=function(e,r){return e.length>1?e.indexOf(pe(e[r],e)):r},Le=mn;var vn=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},hn=function t(e){for(var r=e.length,n=0;n<r;n+=1)for(var o=function(c){if(n!==c&&e[n].contains(e[c]))return{v:t(e.filter(function(l){return l!==e[c]}))}},a=0;a<r;a+=1){var i=o(a);if((typeof i=="undefined"?"undefined":vn(i))==="object")return i.v}return e},yn=function t(e){return e.parentNode?t(e.parentNode):e},gn=function(e){var r=$(e);return r.filter(Boolean).reduce(function(n,o){var a=o.getAttribute(H);return n.push.apply(n,a?hn(E(yn(o).querySelectorAll("["+H+'="'+a+'"]:not(['+oe+'="disabled"])'))):[o]),n},[])},Y=gn;var bn=function(e){return function(r){return!!r.autofocus||r.dataset&&!!r.dataset.autofocus||e.indexOf(r)>=0}},Be=function(e){return e&&e.dataset&&e.dataset.focusGuard},me=function(e){return!Be(e)},wn="NEW_FOCUS",xn=function(e,r,n,o){var a=e.length,i=e[0],u=e[a-1],c=Be(n);if(!(e.indexOf(n)>=0)){var l=r.indexOf(n),f=r.indexOf(o||l),p=e.indexOf(o),d=l-f,v=r.indexOf(i),h=r.indexOf(u),s=qt(r),m=s.indexOf(n)-s.indexOf(o||l),b=Ae(e,0),y=Ae(e,a-1);if(l===-1||p===-1)return wn;if(!d&&p>=0)return p;if(l<=v&&c&&Math.abs(d)>1)return y;if(l>=h&&c&&Math.abs(d)>1)return b;if(d&&Math.abs(m)>1)return p;if(l<=v)return y;if(l>h)return b;if(d)return Math.abs(d)>1?p:(a+p+d)%a}},$t=function(e,r,n){var o=$(e),a=$(r),i=o[0],u=null;return a.filter(Boolean).forEach(function(c){u=fe(u||c,c)||u,n.filter(Boolean).forEach(function(l){var f=fe(i,l);f&&(!u||f.contains(u)?u=f:u=fe(f,u))})}),u},Sn=function(e){return e.reduce(function(r,n){return r.concat(Ut(n))},[])},En=function(e,r){var n=new Map;return r.forEach(function(o){return n.set(o.node,o)}),e.map(function(o){return n.get(o)}).filter(Boolean)},Yt=function(e){var r=Y(e).filter(me),n=$t(e,e,r),o=de([n],!0),a=de(r).filter(function(i){var u=i.node;return me(u)}).map(function(i){var u=i.node;return u});return o.map(function(i){var u=i.node,c=i.index;return{node:u,index:c,lockItem:a.indexOf(u)>=0,guard:Be(u)}})},_n=function(e,r){var n=document&&document.activeElement,o=Y(e).filter(me),a=$t(n||e,e,o),i=ke(o),u=de(o).filter(function(v){var h=v.node;return me(h)});if(!(!u[0]&&(u=i,!u[0]))){var c=ke([a]).map(function(v){var h=v.node;return h}),l=En(c,u),f=l.map(function(v){var h=v.node;return h}),p=xn(f,c,n,r);if(p==="NEW_FOCUS"){var d=i.map(function(v){var h=v.node;return h}).filter(bn(Sn(o)));return{node:d&&d.length?Le(d):Le(f)}}return p===void 0?p:l[p]}},Zt=_n;var Rn=function(e){return e===document.activeElement},On=function(e){return!!jt(E(e.querySelectorAll("iframe")),Rn)},Cn=function(e){var r=document&&document.activeElement;return!r||r.dataset&&r.dataset.focusGuard?!1:Y(e).reduce(function(n,o){return n||o.contains(r)||On(o)},!1)},We=Cn;var Pn=function(){return document&&E(document.querySelectorAll("["+Rt+"]")).some(function(e){return e.contains(document.activeElement)})},Xt=Pn;var Fn=function(e){e.focus(),e.contentWindow&&e.contentWindow.focus()},je=0,Me=!1,Kt=function(t,e){var r=Zt(t,e);if(!Me&&r){if(je>2){console.error("FocusLock: focus-fighting detected. Only one focus management system could be active. See https://github.com/theKashey/focus-lock/#focus-fighting"),Me=!0,setTimeout(function(){Me=!1},1);return}je++,Fn(r.node),je--}};var Ve=Kt;function Ge(t){var e=window,r=e.setImmediate;typeof r!="undefined"?r(t):setTimeout(t,1)}var Tn=function(){return document&&document.activeElement===document.body},Dn=function(){return Tn()||Xt()},A=null,L=null,B=null,Z=!1,In=function(){return!0},kn=function(e){return(A.whiteList||In)(e)},An=function(e,r){B={observerNode:e,portaledElement:r}},Ln=function(e){return B&&B.portaledElement===e};function zt(t,e,r,n){var o=null,a=t;do{var i=n[a];if(i.guard)i.node.dataset.focusAutoGuard&&(o=i);else if(i.lockItem){if(a!==t)return;o=null}else break}while((a+=r)!==e);o&&(o.node.tabIndex=0)}var Bn=function(e){return e&&"current"in e?e.current:e},Wn=function(e){return e?Boolean(Z):Z==="meanwhile"},ve=function(){var e=!1;if(A){var r=A,n=r.observed,o=r.persistentFocus,a=r.autoFocus,i=r.shards,u=r.crossFrame,c=n||B&&B.portaledElement,l=document&&document.activeElement;if(c){var f=[c].concat(i.map(Bn).filter(Boolean));if((!l||kn(l))&&(o||Wn(u)||!Dn()||!L&&a)&&(c&&!(We(f)||Ln(l,c))&&(document&&!L&&l&&!a?(l.blur&&l.blur(),document.body.focus()):(e=Ve(f,L),B={})),Z=!1,L=document&&document.activeElement),document){var p=document&&document.activeElement,d=Yt(f),v=d.map(function(h){var s=h.node;return s}).indexOf(p);v>-1&&(d.filter(function(h){var s=h.guard,m=h.node;return s&&m.dataset.focusAutoGuard}).forEach(function(h){var s=h.node;return s.removeAttribute("tabIndex")}),zt(v,d.length,1,d),zt(v,-1,-1,d))}}}return e},Qt=function(e){ve()&&e&&(e.stopPropagation(),e.preventDefault())},he=function(){return Ge(ve)},Jt=function(e){var r=e.target,n=e.currentTarget;n.contains(r)||An(n,r)},jn=function(){return null},Mn=function(e){var r=e.children;return Nn("div",{onBlur:he,onFocus:Jt},r)};Mn.propTypes={};var er=function(){Z="just",setTimeout(function(){Z="meanwhile"},0)},Vn=function(){document.addEventListener("focusin",Qt,!0),document.addEventListener("focusout",he),window.addEventListener("blur",er)},Gn=function(){document.removeEventListener("focusin",Qt,!0),document.removeEventListener("focusout",he),window.removeEventListener("blur",er)};function Un(t){return t.filter(function(e){var r=e.disabled;return!r})}function Hn(t){var e=t.slice(-1)[0];e&&!A&&Vn();var r=A,n=r&&e&&e.id===r.id;A=e,r&&!n&&(r.onDeactivation(),t.filter(function(o){var a=o.id;return a===r.id}).length||r.returnFocus(!e)),e?(L=null,(!n||r.observed!==e.observed)&&e.onActivation(),ve(!0),Ge(ve)):(Gn(),L=null)}ce.assignSyncMedium(Jt);le.assignMedium(he);At.assignMedium(function(t){return t({moveFocusInside:Ve,focusInside:We})});var tr=Wt(Un,Hn)(jn);var rr=$n(function(t,e){return qn(Pe,R({sideCar:tr,ref:e},t))}),nr=Pe.propTypes||{},Fi=nr.sideCar,Yn=_e(nr,["sideCar"]);rr.propTypes=Yn;var or=rr;var ar=or;var O=function(){return O=Object.assign||function(e){for(var r,n=1,o=arguments.length;n<o;n++){r=arguments[n];for(var a in r)Object.prototype.hasOwnProperty.call(r,a)&&(e[a]=r[a])}return e},O.apply(this,arguments)};function ir(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]]);return r}import{createElement as wo,forwardRef as xo}from"react";import{Children as Zn,Fragment as Xn,cloneElement as Kn,createElement as He,forwardRef as zn,useRef as Qn,useState as Jn}from"react";var P="right-scroll-bar-position",F="width-before-scroll-bar",Ue="with-scroll-bars-hidden";var ye=ue();var qe=function(){},X=zn(function(t,e){var r=Qn(null),n=Jn({onScrollCapture:qe,onWheelCapture:qe,onTouchMoveCapture:qe}),o=n[0],a=n[1],i=t.forwardProps,u=t.children,c=t.className,l=t.removeScrollBar,f=t.enabled,p=t.shards,d=t.sideCar,v=t.noIsolation,h=t.inert,s=t.allowPinchZoom,m=t.as,b=m===void 0?"div":m,y=ir(t,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as"]),w=d,S=ae([r,e]),g=O({},y,o);return He(Xn,null,f&&He(w,{sideCar:ye,removeScrollBar:l,shards:p,noIsolation:v,inert:h,setCallbacks:a,allowPinchZoom:!!s,lockRef:r}),i?Kn(Zn.only(u),O({},g,{ref:S})):He(b,O({},g,{className:c,ref:S}),u))});X.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};X.classNames={fullWidth:F,zeroRight:P};import{Fragment as ho,createElement as Qe,useCallback as W,useEffect as Je,useRef as be,useState as dr}from"react";import{createElement as io,useEffect as uo,useState as co}from"react";import{useEffect as no}from"react";var ur;var cr=function(){if(ur)return ur;if(typeof __webpack_nonce__!="undefined")return __webpack_nonce__};function eo(){if(!document)return null;var t=document.createElement("style");t.type="text/css";var e=cr();return e&&t.setAttribute("nonce",e),t}function to(t,e){t.styleSheet?t.styleSheet.cssText=e:t.appendChild(document.createTextNode(e))}function ro(t){var e=document.head||document.getElementsByTagName("head")[0];e.appendChild(t)}var $e=function(){var t=0,e=null;return{add:function(r){t==0&&(e=eo())&&(to(e,r),ro(e)),t++},remove:function(){t--,!t&&e&&(e.parentNode&&e.parentNode.removeChild(e),e=null)}}};var Ye=function(){var t=$e();return function(e){no(function(){return t.add(e),function(){t.remove()}},[])}};var K=function(){var t=Ye(),e=function(r){var n=r.styles;return t(n),null};return e};var oo={left:0,top:0,right:0,gap:0},Ze=function(t){return parseInt(t||"",10)||0},ao=function(t){var e=window.getComputedStyle(document.body),r=e[t==="padding"?"paddingLeft":"marginLeft"],n=e[t==="padding"?"paddingTop":"marginTop"],o=e[t==="padding"?"paddingRight":"marginRight"];return[Ze(r),Ze(n),Ze(o)]},ge=function(t){if(t===void 0&&(t="margin"),typeof window=="undefined")return oo;var e=ao(t),r=document.documentElement.clientWidth,n=window.innerWidth;return{left:e[0],top:e[1],right:e[2],gap:Math.max(0,n-r+e[2]-e[0])}};var lo=K(),so=function(t,e,r,n){var o=t.left,a=t.top,i=t.right,u=t.gap;return r===void 0&&(r="margin"),` | ||
.`+Ue+` { | ||
overflow: hidden `+n+`; | ||
padding-right: `+u+"px "+n+`; | ||
} | ||
body { | ||
overflow: hidden `+n+`; | ||
`+[e&&"position: relative "+n+";",r==="margin"&&` | ||
padding-left: `+o+`px; | ||
padding-top: `+a+`px; | ||
padding-right: `+i+`px; | ||
margin-left:0; | ||
margin-top:0; | ||
margin-right: `+u+"px "+n+`; | ||
`,r==="padding"&&"padding-right: "+u+"px "+n+";"].filter(Boolean).join("")+` | ||
} | ||
.`+P+` { | ||
right: `+u+"px "+n+`; | ||
} | ||
.`+F+` { | ||
margin-right: `+u+"px "+n+`; | ||
} | ||
.`+P+" ."+P+` { | ||
right: 0 `+n+`; | ||
} | ||
.`+F+" ."+F+` { | ||
margin-right: 0 `+n+`; | ||
} | ||
`},Xe=function(t){var e=co(ge(t.gapMode)),r=e[0],n=e[1];uo(function(){n(ge(t.gapMode))},[t.gapMode]);var o=t.noRelative,a=t.noImportant,i=t.gapMode,u=i===void 0?"margin":i;return io(lo,{styles:so(r,!o,u,a?"":"!important")})};var fo=function(t){var e=window.getComputedStyle(t);return e.overflowY!=="hidden"&&!(e.overflowY===e.overflowX&&e.overflowY==="visible")},po=function(t){var e=window.getComputedStyle(t);return e.overflowX!=="hidden"&&!(e.overflowY===e.overflowX&&e.overflowX==="visible")},Ke=function(t,e){var r=e;do{var n=lr(t,r);if(n){var o=sr(t,r),a=o[1],i=o[2];if(a>i)return!0}r=r.parentNode}while(r&&r!==document.body);return!1},mo=function(t){var e=t.scrollTop,r=t.scrollHeight,n=t.clientHeight;return[e,r,n]},vo=function(t){var e=t.scrollLeft,r=t.scrollWidth,n=t.clientWidth;return[e,r,n]},lr=function(t,e){return t==="v"?fo(e):po(e)},sr=function(t,e){return t==="v"?mo(e):vo(e)},fr=function(t,e,r,n,o){var a=n,i=r.target,u=e.contains(i),c=!1,l=a>0,f=0,p=0;do{var d=sr(t,i),v=d[0],h=d[1],s=d[2],m=h-s-v;(v||m)&&lr(t,i)&&(f+=m,p+=v),i=i.parentNode}while(!u&&i!==document.body||u&&(e.contains(i)||e===i));return(l&&(o&&f===0||!o&&a>f)||!l&&(o&&p===0||!o&&-a>p))&&(c=!0),c};var ze=!1;if(typeof window!="undefined")try{z=Object.defineProperty({},"passive",{get:function(){return ze=!0,!0}}),window.addEventListener("test",z,z),window.removeEventListener("test",z,z)}catch(t){ze=!1}var z,N=ze?{passive:!1}:!1;var we=function(t){return"changedTouches"in t?[t.changedTouches[0].clientX,t.changedTouches[0].clientY]:[0,0]},pr=function(t){return[t.deltaX,t.deltaY]},mr=function(t){return t&&"current"in t?t.current:t},yo=function(t,e){return t[0]===e[0]&&t[1]===e[1]},go=function(t){return` | ||
.block-interactivity-`+t+` {pointer-events: none;} | ||
.allow-interactivity-`+t+` {pointer-events: all;} | ||
`},bo=0,j=[];function vr(t){var e=be([]),r=be([0,0]),n=be(),o=dr(bo++)[0],a=dr(function(){return K()})[0],i=be(t);Je(function(){i.current=t},[t]),Je(function(){if(t.inert){document.body.classList.add("block-interactivity-"+o);var s=[t.lockRef.current].concat((t.shards||[]).map(mr)).filter(Boolean);return s.forEach(function(m){return m.classList.add("allow-interactivity-"+o)}),function(){document.body.classList.remove("block-interactivity-"+o),s.forEach(function(m){return m.classList.remove("allow-interactivity-"+o)})}}},[t.inert,t.lockRef.current,t.shards]);var u=W(function(s,m){if("touches"in s&&s.touches.length===2)return!i.current.allowPinchZoom;var b=we(s),y=r.current,w="deltaX"in s?s.deltaX:y[0]-b[0],S="deltaY"in s?s.deltaY:y[1]-b[1],g,T=s.target,_=Math.abs(w)>Math.abs(S)?"h":"v",x=Ke(_,T);if(!x)return!0;if(x?g=_:(g=_==="v"?"h":"v",x=Ke(_,T)),!x)return!1;if(!n.current&&"changedTouches"in s&&(w||S)&&(n.current=g),!g)return!0;var J=n.current||g;return fr(J,m,s,J==="h"?w:S,!0)},[]),c=W(function(s){var m=s;if(!(!j.length||j[j.length-1]!==a)){var b="deltaY"in m?pr(m):we(m),y=e.current.filter(function(g){return g.name===m.type&&g.target===m.target&&yo(g.delta,b)})[0];if(y&&y.should){m.preventDefault();return}if(!y){var w=(i.current.shards||[]).map(mr).filter(Boolean).filter(function(g){return g.contains(m.target)}),S=w.length>0?u(m,w[0]):!i.current.noIsolation;S&&m.preventDefault()}}},[]),l=W(function(s,m,b,y){var w={name:s,delta:m,target:b,should:y};e.current.push(w),setTimeout(function(){e.current=e.current.filter(function(S){return S!==w})},1)},[]),f=W(function(s){r.current=we(s),n.current=void 0},[]),p=W(function(s){l(s.type,pr(s),s.target,u(s,t.lockRef.current))},[]),d=W(function(s){l(s.type,we(s),s.target,u(s,t.lockRef.current))},[]);Je(function(){return j.push(a),t.setCallbacks({onScrollCapture:p,onWheelCapture:p,onTouchMoveCapture:d}),document.addEventListener("wheel",c,N),document.addEventListener("touchmove",c,N),document.addEventListener("touchstart",f,N),function(){j=j.filter(function(s){return s!==a}),document.removeEventListener("wheel",c,N),document.removeEventListener("touchmove",c,N),document.removeEventListener("touchstart",f,N)}},[]);var v=t.removeScrollBar,h=t.inert;return Qe(ho,null,h?Qe(a,{styles:go(o)}):null,v?Qe(Xe,{gapMode:"margin"}):null)}var hr=kt(ye,vr);var yr=xo(function(t,e){return wo(X,O({},t,{ref:e,sideCar:hr}))});yr.classNames=X.classNames;var gr=yr;var Q=V(U());function rt(t,e){if(t==null)return{};var r={},n=Object.keys(t),o,a;for(a=0;a<n.length;a++)o=n[a],!(e.indexOf(o)>=0)&&(r[o]=t[o]);return r}var Au={allowPinchZoom:Q.default.bool,dangerouslyBypassFocusLock:Q.default.bool,dangerouslyBypassScrollLock:Q.default.bool,initialFocusRef:function(){return null},onDismiss:Q.default.func},wr=et(function(e,r){var n=e.isOpen,o=n===void 0?!0:n,a=rt(e,["isOpen"]);return tt(function(){return dt("dialog")},[]),tt(function(){o?window.__REACH_DISABLE_TOOLTIPS=!0:window.requestAnimationFrame(function(){window.__REACH_DISABLE_TOOLTIPS=!1})},[o]),o?M.createElement(yt,{"data-reach-dialog-wrapper":""},M.createElement(Eo,Object.assign({ref:r},a))):null}),Eo=et(function(e,r){var n=e.allowPinchZoom,o=e.dangerouslyBypassFocusLock,a=o===void 0?!1:o,i=e.dangerouslyBypassScrollLock,u=i===void 0?!1:i,c=e.initialFocusRef,l=e.onClick,f=e.onDismiss,p=f===void 0?ne:f,d=e.onKeyDown,v=e.onMouseDown,h=e.unstable_lockFocusAcrossFrames,s=h===void 0?!0:h,m=rt(e,["allowPinchZoom","dangerouslyBypassFocusLock","dangerouslyBypassScrollLock","initialFocusRef","onClick","onDismiss","onKeyDown","onMouseDown","unstable_lockFocusAcrossFrames"]),b=br(null),y=br(null),w=vt(y,r),S=So(function(){c&&c.current&&c.current.focus()},[c]);function g(x){b.current===x.target&&(x.stopPropagation(),p(x))}function T(x){x.key==="Escape"&&(x.stopPropagation(),p(x))}function _(x){b.current=x.target}return tt(function(){return y.current?_o(y.current):void 0},[]),M.createElement(ar,{autoFocus:!0,returnFocus:!0,onActivation:S,disabled:a,crossFrame:s},M.createElement(gr,{allowPinchZoom:n,enabled:!u},M.createElement("div",Object.assign({},m,{ref:w,"data-reach-dialog-overlay":"",onClick:G(l,g),onKeyDown:G(d,T),onMouseDown:G(v,_)}))))}),xr=et(function(e,r){var n=e.onClick,o=e.onKeyDown,a=rt(e,["onClick","onKeyDown"]);return M.createElement("div",Object.assign({"aria-modal":"true",role:"dialog",tabIndex:-1},a,{ref:r,"data-reach-dialog-content":"",onClick:G(n,function(i){i.stopPropagation()})}))});function _o(t){var e=[],r=[],n=pt(t)||document;return t?(Array.prototype.forEach.call(n.querySelectorAll("body > *"),function(o){var a,i,u=(a=t.parentNode)===null||a===void 0||(i=a.parentNode)===null||i===void 0?void 0:i.parentNode;if(o!==u){var c=o.getAttribute("aria-hidden"),l=c!==null&&c!=="false";l||(e.push(c),r.push(o),o.setAttribute("aria-hidden","true"))}}),function(){r.forEach(function(o,a){var i=e[a];i===null?o.removeAttribute("aria-hidden"):o.setAttribute("aria-hidden",i)})}):ne}export{xr as ModalDialogPrimitiveContent,wr as ModalDialogPrimitiveOverlay}; | ||
/*! ***************************************************************************** | ||
Copyright (c) Microsoft Corporation. All rights reserved. | ||
Licensed under the Apache License, Version 2.0 (the "License"); you may not use | ||
this file except in compliance with the License. You may obtain a copy of the | ||
License at http://www.apache.org/licenses/LICENSE-2.0 | ||
THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | ||
KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED | ||
WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE, | ||
MERCHANTABLITY OR NON-INFRINGEMENT. | ||
See the Apache Version 2.0 License for specific language governing permissions | ||
and limitations under the License. | ||
***************************************************************************** */ |
@@ -1,1 +0,50 @@ | ||
"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=s;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||!window.document||!window.document.createElement)}function s(){}function f(e,n){return function(t){if(e&&e(t),!t.defaultPrevented)return n(t)}}process.env.NODE_ENV,process.env.NODE_ENV,process.env.NODE_ENV;var d=function(e){var a,i=e.children,u=e.type,c=void 0===u?"reach-portal":u,l=n.useRef(null),s=n.useRef(null),f=(a=n.useState(Object.create(null))[1],n.useCallback((function(){a(Object.create(null))}),[]));return o((function(){if(l.current){var e=l.current.ownerDocument;return s.current=null==e?void 0:e.createElement(c),e.body.appendChild(s.current),f(),function(){s.current&&s.current.ownerDocument&&s.current.ownerDocument.body.removeChild(s.current)}}}),[c,f]),s.current?r.createPortal(i,s.current):t.createElement("span",{ref:l})};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 y(e,n){return e(n={exports:{}},n.exports),n.exports}"production"!==process.env.NODE_ENV&&(d.displayName="Portal");var m="function"==typeof Symbol&&Symbol.for,v=m?Symbol.for("react.element"):60103,b=m?Symbol.for("react.portal"):60106,h=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,_=m?Symbol.for("react.fundamental"):60117,D=m?Symbol.for("react.responder"):60118,F=m?Symbol.for("react.scope"):60119;function I(e){if("object"==typeof e&&null!==e){var n=e.$$typeof;switch(n){case v:switch(e=e.type){case S:case x:case h: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 b:return n}}}function R(e){return I(e)===x}var M={AsyncMode:S,ConcurrentMode:x,ContextConsumer:O,ContextProvider:E,Element:v,ForwardRef:N,Fragment:h,Lazy:T,Memo:P,Portal:b,Profiler:w,StrictMode:g,Suspense:C,isAsyncMode:function(e){return R(e)||I(e)===S},isConcurrentMode:R,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===v},isForwardRef:function(e){return I(e)===N},isFragment:function(e){return I(e)===h},isLazy:function(e){return I(e)===T},isMemo:function(e){return I(e)===P},isPortal:function(e){return I(e)===b},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===h||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===_||e.$$typeof===D||e.$$typeof===F||e.$$typeof===j)},typeOf:I},A=y((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,y=e?Symbol.for("react.memo"):60115,m=e?Symbol.for("react.lazy"):60116,v=e?Symbol.for("react.block"):60121,b=e?Symbol.for("react.fundamental"):60117,h=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 v=p&&p.$$typeof;switch(v){case c:case f:case m:case y:case u:return v;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=y,j=r,_=i,D=a,F=d,I=!1;function R(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=_,n.StrictMode=D,n.Suspense=F,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.")),R(e)||w(e)===l},n.isConcurrentMode=R,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)===y},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===y||e.$$typeof===u||e.$$typeof===c||e.$$typeof===f||e.$$typeof===b||e.$$typeof===h||e.$$typeof===g||e.$$typeof===v)},n.typeOf=w}()})),L=(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,y((function(e){"production"===process.env.NODE_ENV?e.exports=M:e.exports=A}))),$=Object.getOwnPropertySymbols,V=Object.prototype.hasOwnProperty,B=Object.prototype.propertyIsEnumerable;function W(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}var q=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=W(e),a=1;a<arguments.length;a++){for(var i in t=Object(arguments[a]))V.call(t,i)&&(o[i]=t[i]);if($){r=$(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",U=function(){};if("production"!==process.env.NODE_ENV){var z=Y,Z={},G=Function.call.bind(Object.prototype.hasOwnProperty);U=function(e){var n="Warning: "+e;"undefined"!=typeof console&&console.error(n);try{throw new Error(n)}catch(e){}}}function X(e,n,t,r,o){if("production"!==process.env.NODE_ENV)for(var a in e)if(G(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,z)}catch(e){i=e}if(!i||i instanceof Error||U((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 Z)){Z[i.message]=!0;var c=o?o():"";U("Failed "+t+" type: "+i.message+(null!=c?c:""))}}}X.resetWarningCache=function(){"production"!==process.env.NODE_ENV&&(Z={})};var H=X,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 L.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=q({},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=y((function(e){if("production"!==process.env.NODE_ENV){var n=L;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"},ye=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}))};ye.propTypes="production"!==process.env.NODE_ENV?{children:re.node}:{},ye.defaultProps={children:null};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 ve(e){return e}function be(e,n){void 0===n&&(n=ve);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 he(e,n){return void 0===n&&(n=ve),be(e,n)}function ge(e){void 0===e&&(e={});var n=be(null);return n.options=me({async:!0,ssr:!1},e),n}var we=function(e){var t=e.sideCar,r=function(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}(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))};we.isSideCarExport=!0;var Ee=he({},(function(e){return{target:e.target,currentTarget:e.currentTarget}})),Oe=he(),Se=he(),xe=ge({async:!0}),Ne=[],Ce=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,y=e.persistentFocus,m=e.crossFrame,v=e.autoFocus,b=e.allowTextSelection,h=e.group,g=e.className,w=e.whiteList,E=e.shards,O=void 0===E?Ne: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,_=n.useState({})[0],D=n.useCallback((function(){l.current=l.current||document&&document.activeElement,u.current&&T&&T(u.current),c.current=!0}),[T]),F=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]),R=n.useCallback((function(e){c.current&&Ee.useMedium(e)}),[]),M=Oe.useMedium,A=n.useCallback((function(e){u.current!==e&&(u.current=e,i(e))}),[]);"production"!==process.env.NODE_ENV&&(void 0!==b&&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 L=p(((r={})["data-focus-lock-disabled"]=f&&"disabled",r["data-focus-lock"]=h,r),C),$=!0!==d,V=$&&"tail"!==d,B=de([t,A]);return n.createElement(n.Fragment,null,$&&[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:_,sideCar:xe,observed:a,disabled:f,persistentFocus:y,crossFrame:m,autoFocus:v,whiteList:w,shards:O,onActivation:D,onDeactivation:F,returnFocus:I}),n.createElement(x,p({ref:B},L,{className:g,onBlur:M,onFocus:R}),s),V&&n.createElement("div",{"data-focus-guard":!0,tabIndex:f?-1:0,style:pe}))}));Ce.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}:{},Ce.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 ke=function(e){for(var n=Array(e.length),t=0;t<e.length;++t)n[t]=e[t];return n},Pe=function(e){return Array.isArray(e)?e:[e]},Te=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},je=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(Te)},_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]"],De=_e.join(","),Fe=De+", [data-focus-guard]",Ie=function(e,n){return e.reduce((function(e,t){return e.concat(ke(t.querySelectorAll(n?Fe:De)),t.parentNode?ke(t.parentNode.querySelectorAll(_e.join(","))).filter((function(e){return e===t})):[])}),[])},Re=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},Me=function(e,n){for(var t=Re(e),r=Re(n),o=0;o<t.length;o+=1){var a=t[o];if(r.indexOf(a)>=0)return a}return!1},Ae=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&&n.parentNode.nodeType===n.DOCUMENT_FRAGMENT_NODE?n.parentNode.host: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 je(Ae(Ie(e,n)),!0,n)},$e=function(e){return je(Ae(Ie(e)),!1)},Ve=function(e){return Ae((n=e.querySelectorAll("[data-autofocus-inside]"),ke(n).map((function(e){return Ie([e])})).reduce((function(e,n){return e.concat(n)}),[])));var n},Be=function(e){return"INPUT"===e.tagName&&"radio"===e.type},We=function(e,n){return Be(e)&&e.name?function(e,n){return n.filter(Be).filter((function(n){return n.name===e.name})).filter((function(e){return e.checked}))[0]||e}(e,n):e},qe=function(e){return e[0]&&e.length>1?We(e[0],e):e[0]},Ye=function(e,n){return e.length>1?e.indexOf(We(e[n],e)):n},Ue="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},ze=function(e){return Pe(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":Ue(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&&e.dataset&&e.dataset.focusGuard},Ge=function(e){return!Ze(e)},Xe=function(e,n,t,r){var o=e.length,a=e[0],i=e[o-1],u=Ze(t);if(!(e.indexOf(t)>=0)){var c,l,s=n.indexOf(t),f=n.indexOf(r||s),d=e.indexOf(r),p=s-f,y=n.indexOf(a),m=n.indexOf(i),v=(c=n,l=new Set,c.forEach((function(e){return l.add(We(e,c))})),c.filter((function(e){return l.has(e)}))),b=v.indexOf(t)-v.indexOf(r||s),h=Ye(e,0),g=Ye(e,o-1);return-1===s||-1===d?"NEW_FOCUS":!p&&d>=0?d:s<=y&&u&&Math.abs(p)>1?g:s>=m&&u&&Math.abs(p)>1?h:p&&Math.abs(b)>1?d:s<=y?g:s>m?h:p?Math.abs(p)>1?d:(o+d+p)%o:void 0}},He=function(e,n,t){var r=Pe(e),o=Pe(n),a=r[0],i=null;return o.filter(Boolean).forEach((function(e){i=Me(i||e,e)||i,t.filter(Boolean).forEach((function(e){var n=Me(a,e);n&&(i=!i||n.contains(i)?n:Me(n,i))}))})),i},Ke=function(e,n){var t=document&&document.activeElement,r=ze(e).filter(Ge),o=He(t||e,e,r),a=$e(r),i=Le(r).filter((function(e){var n=e.node;return Ge(n)}));if(i[0]||(i=a)[0]){var u,c,l,s,f=$e([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})),y=Xe(p,f,t,n);if("NEW_FOCUS"===y){var m=a.map((function(e){return e.node})).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{node:m&&m.length?qe(m):qe(p)}}return void 0===y?y:d[y]}},Je=function(e){return e===document.activeElement},Qe=function(e){var n=document&&document.activeElement;return!(!n||n.dataset&&n.dataset.focusGuard)&&ze(e).reduce((function(e,t){return e||t.contains(n)||function(e){return n=ke(e.querySelectorAll("iframe")),t=Je,!!n.filter((function(e){return e===t}))[0];var n,t}(t)}),!1)},en=0,nn=!1,tn=function(e,n){var t,r=Ke(e,n);if(!nn&&r){if(en>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"),nn=!0,void setTimeout((function(){nn=!1}),1);en++,(t=r.node).focus(),t.contentWindow&&t.contentWindow.focus(),en--}};function rn(e){var n=window.setImmediate;void 0!==n?n(e):setTimeout(e,1)}var on=function(){return document&&document.activeElement===document.body||document&&ke(document.querySelectorAll("[data-no-focus-lock]")).some((function(e){return e.contains(document.activeElement)}))},an=null,un=null,cn=null,ln=!1,sn=function(){return!0};function fn(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 dn=function(e){return e&&"current"in e?e.current:e},pn=function(){var e,n,t,r,o,a,i=!1;if(an){var u=an,c=u.observed,l=u.persistentFocus,s=u.autoFocus,f=u.shards,d=u.crossFrame,p=c||cn&&cn.portaledElement,y=document&&document.activeElement;if(p){var m=[p].concat(f.map(dn).filter(Boolean));if(y&&!function(e){return(an.whiteList||sn)(e)}(y)||(l||(d?Boolean(ln):"meanwhile"===ln)||!on()||!un&&s)&&(!p||Qe(m)||(a=y,cn&&cn.portaledElement===a)||(document&&!un&&y&&!s?(y.blur&&y.blur(),document.body.focus()):(i=tn(m,un),cn={})),ln=!1,un=document&&document.activeElement),document){var v=document&&document.activeElement,b=(n=ze(e=m).filter(Ge),t=He(e,e,n),r=Le([t],!0),o=Le(n).filter((function(e){var n=e.node;return Ge(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=b.map((function(e){return e.node})).indexOf(v);h>-1&&(b.filter((function(e){var n=e.guard,t=e.node;return n&&t.dataset.focusAutoGuard})).forEach((function(e){return e.node.removeAttribute("tabIndex")})),fn(h,b.length,1,b),fn(h,-1,-1,b))}}}return i},yn=function(e){pn()&&e&&(e.stopPropagation(),e.preventDefault())},mn=function(){return rn(pn)},vn=function(e){var n=e.target,t=e.currentTarget;t.contains(n)||(cn={observerNode:t,portaledElement:n})};"production"!==process.env.NODE_ENV&&re.node.isRequired;var bn=function(){ln="just",setTimeout((function(){ln="meanwhile"}),0)};Ee.assignSyncMedium(vn),Oe.assignMedium(mn),Se.assignMedium((function(e){return e({moveFocusInside:tn,focusInside:Qe})}));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&&!an&&(document.addEventListener("focusin",yn,!0),document.addEventListener("focusout",mn),window.addEventListener("blur",bn));var t=an,r=t&&n&&n.id===t.id;an=n,t&&!r&&(t.onDeactivation(),e.filter((function(e){return e.id===t.id})).length||t.returnFocus(!n)),n?(un=null,r&&t.observed===n.observed||n.onActivation(),pn(),rn(pn)):(document.removeEventListener("focusin",yn,!0),document.removeEventListener("focusout",mn),window.removeEventListener("blur",bn),un=null)}))((function(){return null})),gn=n.forwardRef((function(e,t){return n.createElement(Ce,p({sideCar:hn,ref:t},e))})),wn=Ce.propTypes||{},En=(wn.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}(wn,["sideCar"]));gn.propTypes=En;var On=function(){return(On=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)};var Sn=ge(),xn=function(){},Nn=n.forwardRef((function(e,t){var r=n.useRef(null),o=n.useState({onScrollCapture:xn,onWheelCapture:xn,onTouchMoveCapture:xn}),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,y=e.noIsolation,m=e.inert,v=e.allowPinchZoom,b=e.as,h=void 0===b?"div":b,g=function(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}(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as"]),w=p,E=de([r,t]),O=On({},g,a);return n.createElement(n.Fragment,null,f&&n.createElement(w,{sideCar:Sn,removeScrollBar:s,shards:d,noIsolation:y,inert:m,setCallbacks:i,allowPinchZoom:!!v,lockRef:r}),u?n.cloneElement(n.Children.only(c),On({},O,{ref:E})):n.createElement(h,On({},O,{className:l,ref:E}),c))}));Nn.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},Nn.classNames={fullWidth:"width-before-scroll-bar",zeroRight:"right-scroll-bar-position"};function Cn(){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 kn=function(){var e=0,n=null;return{add:function(t){var r,o;0==e&&(n=Cn())&&(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)}}},Pn=function(){var e,t=(e=kn(),function(t){n.useEffect((function(){return e.add(t),function(){e.remove()}}),[])});return function(e){var n=e.styles;return t(n),null}},Tn={left:0,top:0,right:0,gap:0},jn=function(e){return parseInt(e||"",10)||0},_n=function(e){if(void 0===e&&(e="margin"),"undefined"==typeof window)return Tn;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[jn(t),jn(r),jn(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])}},Dn=Pn(),Fn=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"},In=function(e){var t=n.useState(_n(e.gapMode)),r=t[0],o=t[1];n.useEffect((function(){o(_n(e.gapMode))}),[e.gapMode]);var a=e.noRelative,i=e.noImportant,u=e.gapMode,c=void 0===u?"margin":u;return n.createElement(Dn,{styles:Fn(r,!a,c,i?"":"!important")})},Rn=function(e,n){var t=n;do{if(Mn(e,t)){var r=An(e,t);if(r[1]>r[2])return!0}t=t.parentNode}while(t&&t!==document.body);return!1},Mn=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)},An=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},Ln=!1;if("undefined"!=typeof window)try{var $n=Object.defineProperty({},"passive",{get:function(){return Ln=!0,!0}});window.addEventListener("test",$n,$n),window.removeEventListener("test",$n,$n)}catch(e){Ln=!1}var Vn=!!Ln&&{passive:!1},Bn=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},Wn=function(e){return[e.deltaX,e.deltaY]},qn=function(e){return e&&"current"in e?e.current:e},Yn=function(e){return"\n .block-interactivity-"+e+" {pointer-events: none;}\n .allow-interactivity-"+e+" {pointer-events: all;}\n"},Un=0,zn=[];var Zn,Gn=(Zn=function(e){var t=n.useRef([]),r=n.useRef([0,0]),o=n.useRef(),a=n.useState(Un++)[0],i=n.useState((function(){return Pn()}))[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(qn)).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=Bn(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=An(e,i),p=d[0],y=d[1]-d[2]-p;(p||y)&&Mn(e,i)&&(s+=y,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(zn.length&&zn[zn.length-1]===i){var r="deltaY"in n?Wn(n):Bn(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(qn).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=Bn(e),o.current=void 0}),[]),d=n.useCallback((function(n){s(n.type,Wn(n),n.target,c(n,e.lockRef.current))}),[]),p=n.useCallback((function(n){s(n.type,Bn(n),n.target,c(n,e.lockRef.current))}),[]);n.useEffect((function(){return zn.push(i),e.setCallbacks({onScrollCapture:d,onWheelCapture:d,onTouchMoveCapture:p}),document.addEventListener("wheel",l,Vn),document.addEventListener("touchmove",l,Vn),document.addEventListener("touchstart",f,Vn),function(){zn=zn.filter((function(e){return e!==i})),document.removeEventListener("wheel",l,Vn),document.removeEventListener("touchmove",l,Vn),document.removeEventListener("touchstart",f,Vn)}}),[]);var y=e.removeScrollBar,m=e.inert;return n.createElement(n.Fragment,null,m?n.createElement(i,{styles:Yn(a)}):null,y?n.createElement(In,{gapMode:"margin"}):null)},Sn.useMedium(Zn),we),Xn=n.forwardRef((function(e,t){return n.createElement(Nn,On({},e,{ref:t,sideCar:Gn}))}));function Hn(){return(Hn=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 Kn(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}Xn.classNames=Nn.classNames;var Jn={allowPinchZoom:re.bool,dangerouslyBypassFocusLock:re.bool,dangerouslyBypassScrollLock:re.bool,initialFocusRef:function(){return null},onDismiss:re.func},Qn=n.forwardRef((function(e,r){var o=e.isOpen,a=void 0===o||o,u=Kn(e,["isOpen"]);return n.useEffect((function(){return i("dialog")}),[]),n.useEffect((function(){a?window.__REACH_DISABLE_TOOLTIPS=!0:window.requestAnimationFrame((function(){window.__REACH_DISABLE_TOOLTIPS=!1}))}),[a]),a?t.createElement(d,{"data-reach-dialog-wrapper":""},t.createElement(et,Object.assign({ref:r},u))):null}));"production"!==process.env.NODE_ENV&&(Qn.displayName="DialogOverlay",Qn.propTypes=Hn({},Jn,{isOpen:re.bool}));var et=n.forwardRef((function(e,r){var o=e.allowPinchZoom,a=e.dangerouslyBypassFocusLock,i=void 0!==a&&a,u=e.dangerouslyBypassScrollLock,d=void 0!==u&&u,p=e.initialFocusRef,y=e.onClick,m=e.onDismiss,v=void 0===m?s:m,b=e.onKeyDown,h=e.onMouseDown,g=e.unstable_lockFocusAcrossFrames,w=void 0===g||g,E=Kn(e,["allowPinchZoom","dangerouslyBypassFocusLock","dangerouslyBypassScrollLock","initialFocusRef","onClick","onDismiss","onKeyDown","onMouseDown","unstable_lockFocusAcrossFrames"]),O=n.useRef(null),S=n.useRef(null),x=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)}))}}),[].concat(t))}(S,r),N=n.useCallback((function(){p&&p.current&&p.current.focus()}),[p]);return n.useEffect((function(){return S.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)}))}}(S.current):void 0}),[]),t.createElement(gn,{autoFocus:!0,returnFocus:!0,onActivation:N,disabled:i,crossFrame:w},t.createElement(Xn,{allowPinchZoom:o,enabled:!d},t.createElement("div",Object.assign({},E,{ref:x,"data-reach-dialog-overlay":"",onClick:f(y,(function(e){O.current===e.target&&(e.stopPropagation(),v(e))})),onKeyDown:f(b,(function(e){"Escape"===e.key&&(e.stopPropagation(),v(e))})),onMouseDown:f(h,(function(e){O.current=e.target}))}))))}));"production"!==process.env.NODE_ENV&&(Qn.displayName="DialogOverlay",Qn.propTypes=Hn({},Jn));var nt=n.forwardRef((function(e,n){var r=e.onClick,o=(e.onKeyDown,Kn(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&&(nt.displayName="DialogContent",nt.propTypes={"aria-label":rt,"aria-labelledby":rt});var tt=n.forwardRef((function(e,n){var r=e.allowPinchZoom,o=void 0!==r&&r,a=e.initialFocusRef,i=e.isOpen,u=e.onDismiss,c=void 0===u?s:u,l=Kn(e,["allowPinchZoom","initialFocusRef","isOpen","onDismiss"]);return t.createElement(Qn,{allowPinchZoom:o,initialFocusRef:a,isOpen:i,onDismiss:c},t.createElement(nt,Object.assign({ref:n},l)))}));function rt(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&&(tt.displayName="Dialog",tt.propTypes={isOpen:re.bool,onDismiss:re.func,"aria-label":rt,"aria-labelledby":rt}),exports.ModalDialogPrimitiveContent=nt,exports.ModalDialogPrimitiveOverlay=Qn; | ||
var Ir=Object.create,ie=Object.defineProperty,kr=Object.getPrototypeOf,Ar=Object.prototype.hasOwnProperty,Lr=Object.getOwnPropertyNames,Br=Object.getOwnPropertyDescriptor;var ot=t=>ie(t,"__esModule",{value:!0});var ue=(t,e)=>()=>(e||(e={exports:{}},t(e.exports,e)),e.exports),Wr=(t,e)=>{ot(t);for(var r in e)ie(t,r,{get:e[r],enumerable:!0})},jr=(t,e,r)=>{if(ot(t),e&&typeof e=="object"||typeof e=="function")for(let n of Lr(e))!Ar.call(t,n)&&n!=="default"&&ie(t,n,{get:()=>e[n],enumerable:!(r=Br(e,n))||r.enumerable});return t},b=t=>t&&t.__esModule?t:jr(ie(t!=null?Ir(kr(t)):{},"default",{value:t,enumerable:!0}),t);var ct=ue((Kn,at)=>{"use strict";var Mr=!1,it=function(){};Mr&&(ut=function(e,r){var n=arguments.length;r=new Array(n>1?n-1:0);for(var o=1;o<n;o++)r[o-1]=arguments[o];var a=0,i="Warning: "+e.replace(/%s/g,function(){return r[a++]});typeof console!="undefined"&&console.error(i);try{throw new Error(i)}catch(u){}},it=function(t,e,r){var n=arguments.length;r=new Array(n>2?n-2:0);for(var o=2;o<n;o++)r[o-2]=arguments[o];if(e===void 0)throw new Error("`warning(condition, format, ...args)` requires a warning message argument");t||ut.apply(null,[e].concat(r))});var ut;at.exports=it});var gt=ue((no,yt)=>{"use strict";var qr="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";yt.exports=qr});var St=ue((oo,bt)=>{"use strict";var $r=gt();function wt(){}function xt(){}xt.resetWarningCache=wt;bt.exports=function(){function t(n,o,a,i,u,c){if(c!==$r){var l=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 l.name="Invariant Violation",l}}t.isRequired=t;function e(){return t}var r={array:t,bool:t,func:t,number:t,object:t,string:t,symbol:t,any:t,arrayOf:e,element:t,elementType:t,instanceOf:e,node:t,objectOf:e,oneOf:e,oneOfType:e,shape:e,exact:e,checkPropTypes:xt,resetWarningCache:wt};return r.PropTypes=r,r}});var Z=ue((uo,Et)=>{Et.exports=St()();var ao,io});Wr(exports,{ModalDialogPrimitiveContent:()=>xr,ModalDialogPrimitiveOverlay:()=>wr});var w=b(require("react"));var Y=b(require("react"));var P=b(require("react")),Vr=b(ct()),st=lt()?P.default.useLayoutEffect:P.default.useEffect;var ft=ce;var Qn=typeof window!="undefined"&&window.Math==Math?window:typeof self!="undefined"&&self.Math==Math?self:Function("return this")();function Ur(t,e){if(t!=null)if(Gr(t))t(e);else try{t.current=e}catch(r){throw new Error('Cannot assign value "'+e+'" to ref "'+t+'"')}}function lt(){return!!(typeof window!="undefined"&&window.document&&window.document.createElement)}function dt(t){return t&&t.ownerDocument?t.ownerDocument:lt()?document:null}function Gr(t){return!!(t&&{}.toString.call(t)=="[object Function]")}function ce(){}function pt(){var t=P.useState(Object.create(null)),e=t[1];return P.useCallback(function(){e(Object.create(null))},[])}function mt(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];return P.useMemo(function(){return e.every(function(n){return n==null})?null:function(n){e.forEach(function(o){Ur(o,n)})}},[].concat(e))}function $(t,e){return function(r){if(t&&t(r),!r.defaultPrevented)return e(r)}}var vt=b(require("react-dom")),Hr=function(e){var r=e.children,n=e.type,o=n===void 0?"reach-portal":n,a=Y.useRef(null),i=Y.useRef(null),u=pt();return st(function(){if(!!a.current){var c=a.current.ownerDocument;return i.current=c==null?void 0:c.createElement(o),c.body.appendChild(i.current),u(),function(){i.current&&i.current.ownerDocument&&i.current.ownerDocument.body.removeChild(i.current)}}},[o,u]),i.current?vt.createPortal(r,i.current):Y.default.createElement("span",{ref:a})},ht=Hr;function Ne(t,e){if(t==null)return{};var r={},n=Object.keys(t),o,a;for(a=0;a<n.length;a++)o=n[a],!(e.indexOf(o)>=0)&&(r[o]=t[o]);return r}function T(){return T=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},T.apply(this,arguments)}var Ee=b(require("react"));var y=b(require("react")),Co=b(Z());var X="data-focus-lock",le="data-focus-lock-disabled",_t="data-no-focus-lock",Rt="data-autofocus-inside";function Ot(t,e){return typeof t=="function"?t(e):t&&(t.current=e),t}var Ct=b(require("react"));function Pt(t,e){var r=Ct.useState(function(){return{value:t,callback:e,facade:{get current(){return r.value},set current(n){var o=r.value;o!==n&&(r.value=n,r.callback(n,o))}}}})[0];return r.callback=e,r.facade}function se(t,e){return Pt(e,function(r){return t.forEach(function(n){return Ot(n,r)})})}var W=b(require("react")),ho=b(Z()),j={width:"1px",height:"0px",padding:0,overflow:"hidden",position:"fixed",top:"1px",left:"1px"},Ft=function(e){var r=e.children;return W.createElement(W.Fragment,null,W.createElement("div",{key:"guard-first","data-focus-guard":!0,"data-focus-auto-guard":!0,style:j}),r,r&&W.createElement("div",{key:"guard-last","data-focus-guard":!0,"data-focus-auto-guard":!0,style:j}))};Ft.propTypes={};Ft.defaultProps={children:null};var M=function(){return M=Object.assign||function(e){for(var r,n=1,o=arguments.length;n<o;n++){r=arguments[n];for(var a in r)Object.prototype.hasOwnProperty.call(r,a)&&(e[a]=r[a])}return e},M.apply(this,arguments)};function Nt(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]]);return r}function Tt(t){return t}function Dt(t,e){e===void 0&&(e=Tt);var r=[],n=!1,o={read:function(){if(n)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return r.length?r[r.length-1]:t},useMedium:function(a){var i=e(a,n);return r.push(i),function(){r=r.filter(function(u){return u!==i})}},assignSyncMedium:function(a){for(n=!0;r.length;){var i=r;r=[],i.forEach(a)}r={push:function(u){return a(u)},filter:function(){return r}}},assignMedium:function(a){n=!0;var i=[];if(r.length){var u=r;r=[],u.forEach(a),i=r}var c=function(){var f=i;i=[],f.forEach(a)},l=function(){return Promise.resolve().then(c)};l(),r={push:function(f){i.push(f),l()},filter:function(f){return i=i.filter(f),r}}}};return o}function fe(t,e){return e===void 0&&(e=Tt),Dt(t,e)}function de(t){t===void 0&&(t={});var e=Dt(null);return e.options=M({async:!0,ssr:!1},t),e}var It=b(require("react")),kt=function(t){var e=t.sideCar,r=Nt(t,["sideCar"]);if(!e)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var n=e.read();if(!n)throw new Error("Sidecar medium not found");return It.createElement(n,M({},r))};kt.isSideCarExport=!0;function At(t,e){return t.useMedium(e),kt}var pe=fe({},function(t){var e=t.target,r=t.currentTarget;return{target:e,currentTarget:r}}),me=fe(),Lt=fe(),Bt=de({async:!0});var Yr=[],Te=y.forwardRef(function(t,e){var r,n=y.useState(),o=n[0],a=n[1],i=y.useRef(),u=y.useRef(!1),c=y.useRef(null),l=t.children,f=t.disabled,p=t.noFocusGuards,d=t.persistentFocus,v=t.crossFrame,h=t.autoFocus,s=t.allowTextSelection,m=t.group,E=t.className,x=t.whiteList,_=t.shards,C=_===void 0?Yr:_,S=t.as,B=S===void 0?"div":S,N=t.lockProps,R=N===void 0?{}:N,ne=t.sideCar,oe=t.returnFocus,Pe=t.onActivation,Fe=t.onDeactivation,Sr=y.useState({}),Er=Sr[0],_r=y.useCallback(function(){c.current=c.current||document&&document.activeElement,i.current&&Pe&&Pe(i.current),u.current=!0},[Pe]),Rr=y.useCallback(function(){u.current=!1,Fe&&Fe(i.current)},[Fe]),Or=y.useCallback(function(I){var ae=c.current;if(Boolean(oe)&&ae&&ae.focus){var nt=typeof oe=="object"?oe:void 0;c.current=null,I?Promise.resolve().then(function(){return ae.focus(nt)}):ae.focus(nt)}},[oe]),Cr=y.useCallback(function(I){u.current&&pe.useMedium(I)},[]),Pr=me.useMedium,Fr=y.useCallback(function(I){i.current!==I&&(i.current=I,a(I))},[]),Nr=T((r={},r[le]=f&&"disabled",r[X]=m,r),R),rt=p!==!0,Tr=rt&&p!=="tail",Dr=se([e,Fr]);return y.createElement(y.Fragment,null,rt&&[y.createElement("div",{key:"guard-first","data-focus-guard":!0,tabIndex:f?-1:0,style:j}),y.createElement("div",{key:"guard-nearest","data-focus-guard":!0,tabIndex:f?-1:1,style:j})],!f&&y.createElement(ne,{id:Er,sideCar:Bt,observed:o,disabled:f,persistentFocus:d,crossFrame:v,autoFocus:h,whiteList:x,shards:C,onActivation:_r,onDeactivation:Rr,returnFocus:Or}),y.createElement(B,T({ref:Dr},Nr,{className:E,onBlur:Pr,onFocus:Cr}),l),Tr&&y.createElement("div",{"data-focus-guard":!0,tabIndex:f?-1:0,style:j}))});Te.propTypes={};Te.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 De=Te;var zt=b(require("react")),Ca=b(Z());function Ie(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,t.__proto__=e}function ke(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var ve=b(require("react"));function Zr(t,e){function r(n){return n.displayName||n.name||"Component"}return function(o){var a=[],i;function u(){i=t(a.map(function(l){return l.props})),e(i)}var c=function(l){Ie(f,l);function f(){return l.apply(this,arguments)||this}f.peek=function(){return i};var p=f.prototype;return p.componentDidMount=function(){a.push(this),u()},p.componentDidUpdate=function(){u()},p.componentWillUnmount=function(){var v=a.indexOf(this);a.splice(v,1),u()},p.render=function(){return ve.default.createElement(o,this.props)},f}(ve.PureComponent);return ke(c,"displayName","SideEffect("+r(o)+")"),c}}var Wt=Zr;var F=function(e){for(var r=Array(e.length),n=0;n<e.length;++n)r[n]=e[n];return r},jt=function(e,r){return e.filter(function(n){return n===r})[0]},K=function(e){return Array.isArray(e)?e:[e]};var Xr=function(e,r){var n=e.tabIndex-r.tabIndex,o=e.index-r.index;if(n){if(!e.tabIndex)return 1;if(!r.tabIndex)return-1}return n||o},Ae=function(e,r,n){return F(e).map(function(o,a){return{node:o,index:a,tabIndex:n&&o.tabIndex===-1?(o.dataset||{}).focusGuard?0:-1:o.tabIndex}}).filter(function(o){return!r||o.tabIndex>=0}).sort(Xr)};var Le=["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]"];var Mt=Le.join(","),Kr=Mt+", [data-focus-guard]",he=function(e,r){return e.reduce(function(n,o){return n.concat(F(o.querySelectorAll(r?Kr:Mt)),o.parentNode?F(o.parentNode.querySelectorAll(Le.join(","))).filter(function(a){return a===o}):[])},[])},Vt=function(e){var r=e.querySelectorAll("["+Rt+"]");return F(r).map(function(n){return he([n])}).reduce(function(n,o){return n.concat(o)},[])};var zr=function(e){return!e||!e.getPropertyValue?!1:e.getPropertyValue("display")==="none"||e.getPropertyValue("visibility")==="hidden"},Qr=function t(e){return!e||e===document||e.nodeType===Node.DOCUMENT_NODE||!zr(window.getComputedStyle(e,null))&&t(e.parentNode&&e.parentNode.nodeType===e.DOCUMENT_FRAGMENT_NODE?e.parentNode.host:e.parentNode)},Jr=function(e){return!((e.tagName==="INPUT"||e.tagName==="BUTTON")&&(e.type==="hidden"||e.disabled))},Gt=function t(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[];return r.push(e),e.parentNode&&t(e.parentNode,r),r},ye=function(e,r){for(var n=Gt(e),o=Gt(r),a=0;a<n.length;a+=1){var i=n[a];if(o.indexOf(i)>=0)return i}return!1},Be=function(e){return F(e).filter(function(r){return Qr(r)}).filter(function(r){return Jr(r)})},ge=function(e,r){return Ae(Be(he(e,r)),!0,r)},We=function(e){return Ae(Be(he(e)),!1)},Ut=function(e){return Be(Vt(e))};var Ht=function(e){return e.tagName==="INPUT"&&e.type==="radio"},en=function(e,r){return r.filter(Ht).filter(function(n){return n.name===e.name}).filter(function(n){return n.checked})[0]||e},be=function(e,r){return Ht(e)&&e.name?en(e,r):e},qt=function(e){var r=new Set;return e.forEach(function(n){return r.add(be(n,e))}),e.filter(function(n){return r.has(n)})};var tn=function(e){return e[0]&&e.length>1?be(e[0],e):e[0]},je=function(e,r){return e.length>1?e.indexOf(be(e[r],e)):r},Me=tn;var rn=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},nn=function t(e){for(var r=e.length,n=0;n<r;n+=1)for(var o=function(c){if(n!==c&&e[n].contains(e[c]))return{v:t(e.filter(function(l){return l!==e[c]}))}},a=0;a<r;a+=1){var i=o(a);if((typeof i=="undefined"?"undefined":rn(i))==="object")return i.v}return e},on=function t(e){return e.parentNode?t(e.parentNode):e},an=function(e){var r=K(e);return r.filter(Boolean).reduce(function(n,o){var a=o.getAttribute(X);return n.push.apply(n,a?nn(F(on(o).querySelectorAll("["+X+'="'+a+'"]:not(['+le+'="disabled"])'))):[o]),n},[])},z=an;var un=function(e){return function(r){return!!r.autofocus||r.dataset&&!!r.dataset.autofocus||e.indexOf(r)>=0}},Ve=function(e){return e&&e.dataset&&e.dataset.focusGuard},we=function(e){return!Ve(e)},cn="NEW_FOCUS",ln=function(e,r,n,o){var a=e.length,i=e[0],u=e[a-1],c=Ve(n);if(!(e.indexOf(n)>=0)){var l=r.indexOf(n),f=r.indexOf(o||l),p=e.indexOf(o),d=l-f,v=r.indexOf(i),h=r.indexOf(u),s=qt(r),m=s.indexOf(n)-s.indexOf(o||l),E=je(e,0),x=je(e,a-1);if(l===-1||p===-1)return cn;if(!d&&p>=0)return p;if(l<=v&&c&&Math.abs(d)>1)return x;if(l>=h&&c&&Math.abs(d)>1)return E;if(d&&Math.abs(m)>1)return p;if(l<=v)return x;if(l>h)return E;if(d)return Math.abs(d)>1?p:(a+p+d)%a}},$t=function(e,r,n){var o=K(e),a=K(r),i=o[0],u=null;return a.filter(Boolean).forEach(function(c){u=ye(u||c,c)||u,n.filter(Boolean).forEach(function(l){var f=ye(i,l);f&&(!u||f.contains(u)?u=f:u=ye(f,u))})}),u},sn=function(e){return e.reduce(function(r,n){return r.concat(Ut(n))},[])},fn=function(e,r){var n=new Map;return r.forEach(function(o){return n.set(o.node,o)}),e.map(function(o){return n.get(o)}).filter(Boolean)},Yt=function(e){var r=z(e).filter(we),n=$t(e,e,r),o=ge([n],!0),a=ge(r).filter(function(i){var u=i.node;return we(u)}).map(function(i){var u=i.node;return u});return o.map(function(i){var u=i.node,c=i.index;return{node:u,index:c,lockItem:a.indexOf(u)>=0,guard:Ve(u)}})},dn=function(e,r){var n=document&&document.activeElement,o=z(e).filter(we),a=$t(n||e,e,o),i=We(o),u=ge(o).filter(function(v){var h=v.node;return we(h)});if(!(!u[0]&&(u=i,!u[0]))){var c=We([a]).map(function(v){var h=v.node;return h}),l=fn(c,u),f=l.map(function(v){var h=v.node;return h}),p=ln(f,c,n,r);if(p==="NEW_FOCUS"){var d=i.map(function(v){var h=v.node;return h}).filter(un(sn(o)));return{node:d&&d.length?Me(d):Me(f)}}return p===void 0?p:l[p]}},Zt=dn;var pn=function(e){return e===document.activeElement},mn=function(e){return!!jt(F(e.querySelectorAll("iframe")),pn)},vn=function(e){var r=document&&document.activeElement;return!r||r.dataset&&r.dataset.focusGuard?!1:z(e).reduce(function(n,o){return n||o.contains(r)||mn(o)},!1)},Ge=vn;var hn=function(){return document&&F(document.querySelectorAll("["+_t+"]")).some(function(e){return e.contains(document.activeElement)})},Xt=hn;var yn=function(e){e.focus(),e.contentWindow&&e.contentWindow.focus()},Ue=0,He=!1,Kt=function(t,e){var r=Zt(t,e);if(!He&&r){if(Ue>2){console.error("FocusLock: focus-fighting detected. Only one focus management system could be active. See https://github.com/theKashey/focus-lock/#focus-fighting"),He=!0,setTimeout(function(){He=!1},1);return}Ue++,yn(r.node),Ue--}};var qe=Kt;function $e(t){var e=window,r=e.setImmediate;typeof r!="undefined"?r(t):setTimeout(t,1)}var gn=function(){return document&&document.activeElement===document.body},bn=function(){return gn()||Xt()},V=null,G=null,U=null,Q=!1,wn=function(){return!0},xn=function(e){return(V.whiteList||wn)(e)},Sn=function(e,r){U={observerNode:e,portaledElement:r}},En=function(e){return U&&U.portaledElement===e};function Qt(t,e,r,n){var o=null,a=t;do{var i=n[a];if(i.guard)i.node.dataset.focusAutoGuard&&(o=i);else if(i.lockItem){if(a!==t)return;o=null}else break}while((a+=r)!==e);o&&(o.node.tabIndex=0)}var _n=function(e){return e&&"current"in e?e.current:e},Rn=function(e){return e?Boolean(Q):Q==="meanwhile"},xe=function(){var e=!1;if(V){var r=V,n=r.observed,o=r.persistentFocus,a=r.autoFocus,i=r.shards,u=r.crossFrame,c=n||U&&U.portaledElement,l=document&&document.activeElement;if(c){var f=[c].concat(i.map(_n).filter(Boolean));if((!l||xn(l))&&(o||Rn(u)||!bn()||!G&&a)&&(c&&!(Ge(f)||En(l,c))&&(document&&!G&&l&&!a?(l.blur&&l.blur(),document.body.focus()):(e=qe(f,G),U={})),Q=!1,G=document&&document.activeElement),document){var p=document&&document.activeElement,d=Yt(f),v=d.map(function(h){var s=h.node;return s}).indexOf(p);v>-1&&(d.filter(function(h){var s=h.guard,m=h.node;return s&&m.dataset.focusAutoGuard}).forEach(function(h){var s=h.node;return s.removeAttribute("tabIndex")}),Qt(v,d.length,1,d),Qt(v,-1,-1,d))}}}return e},Jt=function(e){xe()&&e&&(e.stopPropagation(),e.preventDefault())},Se=function(){return $e(xe)},er=function(e){var r=e.target,n=e.currentTarget;n.contains(r)||Sn(n,r)},On=function(){return null},Cn=function(e){var r=e.children;return zt.createElement("div",{onBlur:Se,onFocus:er},r)};Cn.propTypes={};var tr=function(){Q="just",setTimeout(function(){Q="meanwhile"},0)},Pn=function(){document.addEventListener("focusin",Jt,!0),document.addEventListener("focusout",Se),window.addEventListener("blur",tr)},Fn=function(){document.removeEventListener("focusin",Jt,!0),document.removeEventListener("focusout",Se),window.removeEventListener("blur",tr)};function Nn(t){return t.filter(function(e){var r=e.disabled;return!r})}function Tn(t){var e=t.slice(-1)[0];e&&!V&&Pn();var r=V,n=r&&e&&e.id===r.id;V=e,r&&!n&&(r.onDeactivation(),t.filter(function(o){var a=o.id;return a===r.id}).length||r.returnFocus(!e)),e?(G=null,(!n||r.observed!==e.observed)&&e.onActivation(),xe(!0),$e(xe)):(Fn(),G=null)}pe.assignSyncMedium(er);me.assignMedium(Se);Lt.assignMedium(function(t){return t({moveFocusInside:qe,focusInside:Ge})});var rr=Wt(Nn,Tn)(On);var nr=Ee.forwardRef(function(t,e){return Ee.createElement(De,T({sideCar:rr,ref:e},t))}),or=De.propTypes||{},Wa=or.sideCar,Dn=Ne(or,["sideCar"]);nr.propTypes=Dn;var ar=nr;var ir=ar;var D=function(){return D=Object.assign||function(e){for(var r,n=1,o=arguments.length;n<o;n++){r=arguments[n];for(var a in r)Object.prototype.hasOwnProperty.call(r,a)&&(e[a]=r[a])}return e},D.apply(this,arguments)};function ur(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]]);return r}var Ce=b(require("react"));var O=b(require("react"));var k="right-scroll-bar-position",A="width-before-scroll-bar",Ye="with-scroll-bars-hidden";var _e=de();var Ze=function(){},J=O.forwardRef(function(t,e){var r=O.useRef(null),n=O.useState({onScrollCapture:Ze,onWheelCapture:Ze,onTouchMoveCapture:Ze}),o=n[0],a=n[1],i=t.forwardProps,u=t.children,c=t.className,l=t.removeScrollBar,f=t.enabled,p=t.shards,d=t.sideCar,v=t.noIsolation,h=t.inert,s=t.allowPinchZoom,m=t.as,E=m===void 0?"div":m,x=ur(t,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as"]),_=d,C=se([r,e]),S=D({},x,o);return O.createElement(O.Fragment,null,f&&O.createElement(_,{sideCar:_e,removeScrollBar:l,shards:p,noIsolation:v,inert:h,setCallbacks:a,allowPinchZoom:!!s,lockRef:r}),i?O.cloneElement(O.Children.only(u),D({},S,{ref:C})):O.createElement(E,D({},S,{className:c,ref:C}),u))});J.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};J.classNames={fullWidth:A,zeroRight:k};var g=b(require("react"));var H=b(require("react"));var sr=b(require("react"));var cr;var lr=function(){if(cr)return cr;if(typeof __webpack_nonce__!="undefined")return __webpack_nonce__};function In(){if(!document)return null;var t=document.createElement("style");t.type="text/css";var e=lr();return e&&t.setAttribute("nonce",e),t}function kn(t,e){t.styleSheet?t.styleSheet.cssText=e:t.appendChild(document.createTextNode(e))}function An(t){var e=document.head||document.getElementsByTagName("head")[0];e.appendChild(t)}var Xe=function(){var t=0,e=null;return{add:function(r){t==0&&(e=In())&&(kn(e,r),An(e)),t++},remove:function(){t--,!t&&e&&(e.parentNode&&e.parentNode.removeChild(e),e=null)}}};var Ke=function(){var t=Xe();return function(e){sr.useEffect(function(){return t.add(e),function(){t.remove()}},[])}};var ee=function(){var t=Ke(),e=function(r){var n=r.styles;return t(n),null};return e};var Ln={left:0,top:0,right:0,gap:0},ze=function(t){return parseInt(t||"",10)||0},Bn=function(t){var e=window.getComputedStyle(document.body),r=e[t==="padding"?"paddingLeft":"marginLeft"],n=e[t==="padding"?"paddingTop":"marginTop"],o=e[t==="padding"?"paddingRight":"marginRight"];return[ze(r),ze(n),ze(o)]},Re=function(t){if(t===void 0&&(t="margin"),typeof window=="undefined")return Ln;var e=Bn(t),r=document.documentElement.clientWidth,n=window.innerWidth;return{left:e[0],top:e[1],right:e[2],gap:Math.max(0,n-r+e[2]-e[0])}};var Wn=ee(),jn=function(t,e,r,n){var o=t.left,a=t.top,i=t.right,u=t.gap;return r===void 0&&(r="margin"),` | ||
.`+Ye+` { | ||
overflow: hidden `+n+`; | ||
padding-right: `+u+"px "+n+`; | ||
} | ||
body { | ||
overflow: hidden `+n+`; | ||
`+[e&&"position: relative "+n+";",r==="margin"&&` | ||
padding-left: `+o+`px; | ||
padding-top: `+a+`px; | ||
padding-right: `+i+`px; | ||
margin-left:0; | ||
margin-top:0; | ||
margin-right: `+u+"px "+n+`; | ||
`,r==="padding"&&"padding-right: "+u+"px "+n+";"].filter(Boolean).join("")+` | ||
} | ||
.`+k+` { | ||
right: `+u+"px "+n+`; | ||
} | ||
.`+A+` { | ||
margin-right: `+u+"px "+n+`; | ||
} | ||
.`+k+" ."+k+` { | ||
right: 0 `+n+`; | ||
} | ||
.`+A+" ."+A+` { | ||
margin-right: 0 `+n+`; | ||
} | ||
`},Qe=function(t){var e=H.useState(Re(t.gapMode)),r=e[0],n=e[1];H.useEffect(function(){n(Re(t.gapMode))},[t.gapMode]);var o=t.noRelative,a=t.noImportant,i=t.gapMode,u=i===void 0?"margin":i;return H.createElement(Wn,{styles:jn(r,!o,u,a?"":"!important")})};var Mn=function(t){var e=window.getComputedStyle(t);return e.overflowY!=="hidden"&&!(e.overflowY===e.overflowX&&e.overflowY==="visible")},Vn=function(t){var e=window.getComputedStyle(t);return e.overflowX!=="hidden"&&!(e.overflowY===e.overflowX&&e.overflowX==="visible")},Je=function(t,e){var r=e;do{var n=fr(t,r);if(n){var o=dr(t,r),a=o[1],i=o[2];if(a>i)return!0}r=r.parentNode}while(r&&r!==document.body);return!1},Gn=function(t){var e=t.scrollTop,r=t.scrollHeight,n=t.clientHeight;return[e,r,n]},Un=function(t){var e=t.scrollLeft,r=t.scrollWidth,n=t.clientWidth;return[e,r,n]},fr=function(t,e){return t==="v"?Mn(e):Vn(e)},dr=function(t,e){return t==="v"?Gn(e):Un(e)},pr=function(t,e,r,n,o){var a=n,i=r.target,u=e.contains(i),c=!1,l=a>0,f=0,p=0;do{var d=dr(t,i),v=d[0],h=d[1],s=d[2],m=h-s-v;(v||m)&&fr(t,i)&&(f+=m,p+=v),i=i.parentNode}while(!u&&i!==document.body||u&&(e.contains(i)||e===i));return(l&&(o&&f===0||!o&&a>f)||!l&&(o&&p===0||!o&&-a>p))&&(c=!0),c};var et=!1;if(typeof window!="undefined")try{te=Object.defineProperty({},"passive",{get:function(){return et=!0,!0}}),window.addEventListener("test",te,te),window.removeEventListener("test",te,te)}catch(t){et=!1}var te,L=et?{passive:!1}:!1;var Oe=function(t){return"changedTouches"in t?[t.changedTouches[0].clientX,t.changedTouches[0].clientY]:[0,0]},mr=function(t){return[t.deltaX,t.deltaY]},vr=function(t){return t&&"current"in t?t.current:t},Hn=function(t,e){return t[0]===e[0]&&t[1]===e[1]},qn=function(t){return` | ||
.block-interactivity-`+t+` {pointer-events: none;} | ||
.allow-interactivity-`+t+` {pointer-events: all;} | ||
`},$n=0,q=[];function hr(t){var e=g.useRef([]),r=g.useRef([0,0]),n=g.useRef(),o=g.useState($n++)[0],a=g.useState(function(){return ee()})[0],i=g.useRef(t);g.useEffect(function(){i.current=t},[t]),g.useEffect(function(){if(t.inert){document.body.classList.add("block-interactivity-"+o);var s=[t.lockRef.current].concat((t.shards||[]).map(vr)).filter(Boolean);return s.forEach(function(m){return m.classList.add("allow-interactivity-"+o)}),function(){document.body.classList.remove("block-interactivity-"+o),s.forEach(function(m){return m.classList.remove("allow-interactivity-"+o)})}}},[t.inert,t.lockRef.current,t.shards]);var u=g.useCallback(function(s,m){if("touches"in s&&s.touches.length===2)return!i.current.allowPinchZoom;var E=Oe(s),x=r.current,_="deltaX"in s?s.deltaX:x[0]-E[0],C="deltaY"in s?s.deltaY:x[1]-E[1],S,B=s.target,N=Math.abs(_)>Math.abs(C)?"h":"v",R=Je(N,B);if(!R)return!0;if(R?S=N:(S=N==="v"?"h":"v",R=Je(N,B)),!R)return!1;if(!n.current&&"changedTouches"in s&&(_||C)&&(n.current=S),!S)return!0;var ne=n.current||S;return pr(ne,m,s,ne==="h"?_:C,!0)},[]),c=g.useCallback(function(s){var m=s;if(!(!q.length||q[q.length-1]!==a)){var E="deltaY"in m?mr(m):Oe(m),x=e.current.filter(function(S){return S.name===m.type&&S.target===m.target&&Hn(S.delta,E)})[0];if(x&&x.should){m.preventDefault();return}if(!x){var _=(i.current.shards||[]).map(vr).filter(Boolean).filter(function(S){return S.contains(m.target)}),C=_.length>0?u(m,_[0]):!i.current.noIsolation;C&&m.preventDefault()}}},[]),l=g.useCallback(function(s,m,E,x){var _={name:s,delta:m,target:E,should:x};e.current.push(_),setTimeout(function(){e.current=e.current.filter(function(C){return C!==_})},1)},[]),f=g.useCallback(function(s){r.current=Oe(s),n.current=void 0},[]),p=g.useCallback(function(s){l(s.type,mr(s),s.target,u(s,t.lockRef.current))},[]),d=g.useCallback(function(s){l(s.type,Oe(s),s.target,u(s,t.lockRef.current))},[]);g.useEffect(function(){return q.push(a),t.setCallbacks({onScrollCapture:p,onWheelCapture:p,onTouchMoveCapture:d}),document.addEventListener("wheel",c,L),document.addEventListener("touchmove",c,L),document.addEventListener("touchstart",f,L),function(){q=q.filter(function(s){return s!==a}),document.removeEventListener("wheel",c,L),document.removeEventListener("touchmove",c,L),document.removeEventListener("touchstart",f,L)}},[]);var v=t.removeScrollBar,h=t.inert;return g.createElement(g.Fragment,null,h?g.createElement(a,{styles:qn(o)}):null,v?g.createElement(Qe,{gapMode:"margin"}):null)}var yr=At(_e,hr);var gr=Ce.forwardRef(function(t,e){return Ce.createElement(J,D({},t,{ref:e,sideCar:yr}))});gr.classNames=J.classNames;var br=gr;var re=b(Z());function tt(t,e){if(t==null)return{};var r={},n=Object.keys(t),o,a;for(a=0;a<n.length;a++)o=n[a],!(e.indexOf(o)>=0)&&(r[o]=t[o]);return r}var Wi={allowPinchZoom:re.default.bool,dangerouslyBypassFocusLock:re.default.bool,dangerouslyBypassScrollLock:re.default.bool,initialFocusRef:function(){return null},onDismiss:re.default.func},wr=w.forwardRef(function(e,r){var n=e.isOpen,o=n===void 0?!0:n,a=tt(e,["isOpen"]);return w.useEffect(function(){return ft("dialog")},[]),w.useEffect(function(){o?window.__REACH_DISABLE_TOOLTIPS=!0:window.requestAnimationFrame(function(){window.__REACH_DISABLE_TOOLTIPS=!1})},[o]),o?w.default.createElement(ht,{"data-reach-dialog-wrapper":""},w.default.createElement(Yn,Object.assign({ref:r},a))):null}),Yn=w.forwardRef(function(e,r){var n=e.allowPinchZoom,o=e.dangerouslyBypassFocusLock,a=o===void 0?!1:o,i=e.dangerouslyBypassScrollLock,u=i===void 0?!1:i,c=e.initialFocusRef,l=e.onClick,f=e.onDismiss,p=f===void 0?ce:f,d=e.onKeyDown,v=e.onMouseDown,h=e.unstable_lockFocusAcrossFrames,s=h===void 0?!0:h,m=tt(e,["allowPinchZoom","dangerouslyBypassFocusLock","dangerouslyBypassScrollLock","initialFocusRef","onClick","onDismiss","onKeyDown","onMouseDown","unstable_lockFocusAcrossFrames"]),E=w.useRef(null),x=w.useRef(null),_=mt(x,r),C=w.useCallback(function(){c&&c.current&&c.current.focus()},[c]);function S(R){E.current===R.target&&(R.stopPropagation(),p(R))}function B(R){R.key==="Escape"&&(R.stopPropagation(),p(R))}function N(R){E.current=R.target}return w.useEffect(function(){return x.current?Zn(x.current):void 0},[]),w.default.createElement(ir,{autoFocus:!0,returnFocus:!0,onActivation:C,disabled:a,crossFrame:s},w.default.createElement(br,{allowPinchZoom:n,enabled:!u},w.default.createElement("div",Object.assign({},m,{ref:_,"data-reach-dialog-overlay":"",onClick:$(l,S),onKeyDown:$(d,B),onMouseDown:$(v,N)}))))}),xr=w.forwardRef(function(e,r){var n=e.onClick,o=e.onKeyDown,a=tt(e,["onClick","onKeyDown"]);return w.default.createElement("div",Object.assign({"aria-modal":"true",role:"dialog",tabIndex:-1},a,{ref:r,"data-reach-dialog-content":"",onClick:$(n,function(i){i.stopPropagation()})}))});function Zn(t){var e=[],r=[],n=dt(t)||document;return t?(Array.prototype.forEach.call(n.querySelectorAll("body > *"),function(o){var a,i,u=(a=t.parentNode)===null||a===void 0||(i=a.parentNode)===null||i===void 0?void 0:i.parentNode;if(o!==u){var c=o.getAttribute("aria-hidden"),l=c!==null&&c!=="false";l||(e.push(c),r.push(o),o.setAttribute("aria-hidden","true"))}}),function(){r.forEach(function(o,a){var i=e[a];i===null?o.removeAttribute("aria-hidden"):o.setAttribute("aria-hidden",i)})}):ce} | ||
/*! ***************************************************************************** | ||
Copyright (c) Microsoft Corporation. All rights reserved. | ||
Licensed under the Apache License, Version 2.0 (the "License"); you may not use | ||
this file except in compliance with the License. You may obtain a copy of the | ||
License at http://www.apache.org/licenses/LICENSE-2.0 | ||
THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | ||
KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED | ||
WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE, | ||
MERCHANTABLITY OR NON-INFRINGEMENT. | ||
See the Apache Version 2.0 License for specific language governing permissions | ||
and limitations under the License. | ||
***************************************************************************** */ |
{ | ||
"name": "@twilio-paste/modal-dialog-primitive", | ||
"version": "0.1.9", | ||
"version": "0.2.0", | ||
"category": "overlay", | ||
@@ -21,8 +21,7 @@ "status": "beta", | ||
"scripts": { | ||
"build": "yarn clean && yarn compile", | ||
"build:dev": "yarn clean && yarn compile:dev", | ||
"build": "yarn clean && NODE_ENV=production node build.js && tsc", | ||
"build:js": "NODE_ENV=development node build.js", | ||
"build:props": "typedoc --tsconfig ./tsconfig.json --json ./dist/prop-types.json", | ||
"clean": "rm -rf ./dist && rm -rf tsconfig.build.tsbuildinfo && rm -rf .rpt2_cache", | ||
"compile": "rollup -c --environment NODE_ENV:production", | ||
"compile:dev": "rollup -c --environment NODE_ENV:development" | ||
"clean": "rm -rf ./dist", | ||
"tsc": "tsc" | ||
}, | ||
@@ -40,3 +39,3 @@ "dependencies": { | ||
}, | ||
"gitHead": "c4163904aa7c0cd4b9c4b46ffc40fe4d0db7cfb7" | ||
"gitHead": "1bc07961cc789a6631a75fb663d9d8f5935e3ae7" | ||
} |
Sorry, the diff of this file is not supported yet
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
Uses eval
Supply chain riskPackage uses dynamic code execution (e.g., eval()), which is a dangerous practice. This can prevent the code from running in certain environments and increases the risk that the code may contain exploits or malicious behavior.
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
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 1 instance in 1 package
336620
8
1
319
3