@narmi/design_system 6.16.14 → 6.16.15
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +2 -2
- package/dist/index.js.map +1 -1
- package/dist/style.css +1 -1
- package/dist/style.css.map +1 -1
- package/dist/tokens/css/rgbColors.css +1 -1
- package/dist/tokens/css/rgbColors.scss +1 -1
- package/dist/tokens/css/tokens.css +1 -1
- package/dist/tokens/css/tokens.scss +1 -1
- package/dist/tokens/js/colors.esm.js +1 -1
- package/dist/tokens/js/colors.js +1 -1
- package/dist/tokens/js/manifest.esm.js +1 -1
- package/dist/tokens/js/manifest.js +1 -1
- package/dist/tokens/js/reactNativeWeb.js +1 -1
- package/dist/types/hooks/useDropdownLayer/index.d.ts.map +1 -1
- package/dist/types/hooks/useDropdownLayer/useAnchorPolyfill.d.ts +0 -8
- package/dist/types/hooks/useDropdownLayer/useAnchorPolyfill.d.ts.map +1 -1
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/util/viewport.d.ts +49 -0
- package/dist/types/util/viewport.d.ts.map +1 -0
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
(function(e,t){typeof exports==`object`&&typeof module<`u`?t(exports,require("react"),require("react-dom")):typeof define==`function`&&define.amd?define([`exports`,`react`,`react-dom`],t):(e=typeof globalThis<`u`?globalThis:e||self,t(e.NarmiDesignSystem={},e.React,e.ReactDOM))})(this,function(e,t,n){Object.defineProperty(e,Symbol.toStringTag,{value:`Module`});var r=Object.create,i=Object.defineProperty,a=Object.getOwnPropertyDescriptor,o=Object.getOwnPropertyNames,s=Object.getPrototypeOf,c=Object.prototype.hasOwnProperty,l=(e,t)=>()=>(t||(e((t={exports:{}}).exports,t),e=null),t.exports),u=(e,t,n,r)=>{if(t&&typeof t==`object`||typeof t==`function`)for(var s=o(t),l=0,u=s.length,d;l<u;l++)d=s[l],!c.call(e,d)&&d!==n&&i(e,d,{get:(e=>t[e]).bind(null,d),enumerable:!(r=a(t,d))||r.enumerable});return e},d=(e,t,n)=>(n=e==null?{}:r(s(e)),u(t||!e||!e.__esModule?i(n,`default`,{value:e,enumerable:!0}):n,e));let f=d(t,1);t=d(t),n=d(n,1);var p=l((e=>{var t=typeof Symbol==`function`&&Symbol.for,n=t?Symbol.for(`react.element`):60103,r=t?Symbol.for(`react.portal`):60106,i=t?Symbol.for(`react.fragment`):60107,a=t?Symbol.for(`react.strict_mode`):60108,o=t?Symbol.for(`react.profiler`):60114,s=t?Symbol.for(`react.provider`):60109,c=t?Symbol.for(`react.context`):60110,l=t?Symbol.for(`react.async_mode`):60111,u=t?Symbol.for(`react.concurrent_mode`):60111,d=t?Symbol.for(`react.forward_ref`):60112,f=t?Symbol.for(`react.suspense`):60113,p=t?Symbol.for(`react.suspense_list`):60120,m=t?Symbol.for(`react.memo`):60115,h=t?Symbol.for(`react.lazy`):60116,g=t?Symbol.for(`react.block`):60121,_=t?Symbol.for(`react.fundamental`):60117,v=t?Symbol.for(`react.responder`):60118,y=t?Symbol.for(`react.scope`):60119;function b(e){if(typeof e==`object`&&e){var t=e.$$typeof;switch(t){case n:switch(e=e.type,e){case l:case u:case i:case o:case a:case f:return e;default:switch(e=e&&e.$$typeof,e){case c:case d:case h:case m:case s:return e;default:return t}}case r:return t}}}function x(e){return b(e)===u}e.AsyncMode=l,e.ConcurrentMode=u,e.ContextConsumer=c,e.ContextProvider=s,e.Element=n,e.ForwardRef=d,e.Fragment=i,e.Lazy=h,e.Memo=m,e.Portal=r,e.Profiler=o,e.StrictMode=a,e.Suspense=f,e.isAsyncMode=function(e){return x(e)||b(e)===l},e.isConcurrentMode=x,e.isContextConsumer=function(e){return b(e)===c},e.isContextProvider=function(e){return b(e)===s},e.isElement=function(e){return typeof e==`object`&&!!e&&e.$$typeof===n},e.isForwardRef=function(e){return b(e)===d},e.isFragment=function(e){return b(e)===i},e.isLazy=function(e){return b(e)===h},e.isMemo=function(e){return b(e)===m},e.isPortal=function(e){return b(e)===r},e.isProfiler=function(e){return b(e)===o},e.isStrictMode=function(e){return b(e)===a},e.isSuspense=function(e){return b(e)===f},e.isValidElementType=function(e){return typeof e==`string`||typeof e==`function`||e===i||e===u||e===o||e===a||e===f||e===p||typeof e==`object`&&!!e&&(e.$$typeof===h||e.$$typeof===m||e.$$typeof===s||e.$$typeof===c||e.$$typeof===d||e.$$typeof===_||e.$$typeof===v||e.$$typeof===y||e.$$typeof===g)},e.typeOf=b})),m=l((e=>{process.env.NODE_ENV!==`production`&&(function(){"use strict";var t=typeof Symbol==`function`&&Symbol.for,n=t?Symbol.for(`react.element`):60103,r=t?Symbol.for(`react.portal`):60106,i=t?Symbol.for(`react.fragment`):60107,a=t?Symbol.for(`react.strict_mode`):60108,o=t?Symbol.for(`react.profiler`):60114,s=t?Symbol.for(`react.provider`):60109,c=t?Symbol.for(`react.context`):60110,l=t?Symbol.for(`react.async_mode`):60111,u=t?Symbol.for(`react.concurrent_mode`):60111,d=t?Symbol.for(`react.forward_ref`):60112,f=t?Symbol.for(`react.suspense`):60113,p=t?Symbol.for(`react.suspense_list`):60120,m=t?Symbol.for(`react.memo`):60115,h=t?Symbol.for(`react.lazy`):60116,g=t?Symbol.for(`react.block`):60121,_=t?Symbol.for(`react.fundamental`):60117,v=t?Symbol.for(`react.responder`):60118,y=t?Symbol.for(`react.scope`):60119;function b(e){return typeof e==`string`||typeof e==`function`||e===i||e===u||e===o||e===a||e===f||e===p||typeof e==`object`&&!!e&&(e.$$typeof===h||e.$$typeof===m||e.$$typeof===s||e.$$typeof===c||e.$$typeof===d||e.$$typeof===_||e.$$typeof===v||e.$$typeof===y||e.$$typeof===g)}function x(e){if(typeof e==`object`&&e){var t=e.$$typeof;switch(t){case n:var p=e.type;switch(p){case l:case u:case i:case o:case a:case f:return p;default:var g=p&&p.$$typeof;switch(g){case c:case d:case h:case m:case s:return g;default:return t}}case r:return t}}}var S=l,C=u,w=c,T=s,E=n,D=d,O=i,k=h,A=m,j=r,M=o,N=a,P=f,F=!1;function I(e){return F||(F=!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.`)),L(e)||x(e)===l}function L(e){return x(e)===u}function ee(e){return x(e)===c}function te(e){return x(e)===s}function ne(e){return typeof e==`object`&&!!e&&e.$$typeof===n}function re(e){return x(e)===d}function ie(e){return x(e)===i}function ae(e){return x(e)===h}function oe(e){return x(e)===m}function se(e){return x(e)===r}function R(e){return x(e)===o}function ce(e){return x(e)===a}function z(e){return x(e)===f}e.AsyncMode=S,e.ConcurrentMode=C,e.ContextConsumer=w,e.ContextProvider=T,e.Element=E,e.ForwardRef=D,e.Fragment=O,e.Lazy=k,e.Memo=A,e.Portal=j,e.Profiler=M,e.StrictMode=N,e.Suspense=P,e.isAsyncMode=I,e.isConcurrentMode=L,e.isContextConsumer=ee,e.isContextProvider=te,e.isElement=ne,e.isForwardRef=re,e.isFragment=ie,e.isLazy=ae,e.isMemo=oe,e.isPortal=se,e.isProfiler=R,e.isStrictMode=ce,e.isSuspense=z,e.isValidElementType=b,e.typeOf=x})()})),h=l(((e,t)=>{process.env.NODE_ENV===`production`?t.exports=p():t.exports=m()})),g=l(((e,t)=>{var n=Object.getOwnPropertySymbols,r=Object.prototype.hasOwnProperty,i=Object.prototype.propertyIsEnumerable;function a(e){if(e==null)throw TypeError(`Object.assign cannot be called with null or undefined`);return Object(e)}function o(){try{if(!Object.assign)return!1;var e=new String(`abc`);if(e[5]=`de`,Object.getOwnPropertyNames(e)[0]===`5`)return!1;for(var t={},n=0;n<10;n++)t[`_`+String.fromCharCode(n)]=n;if(Object.getOwnPropertyNames(t).map(function(e){return t[e]}).join(``)!==`0123456789`)return!1;var r={};return`abcdefghijklmnopqrst`.split(``).forEach(function(e){r[e]=e}),Object.keys(Object.assign({},r)).join(``)===`abcdefghijklmnopqrst`}catch{return!1}}t.exports=o()?Object.assign:function(e,t){for(var o,s=a(e),c,l=1;l<arguments.length;l++){for(var u in o=Object(arguments[l]),o)r.call(o,u)&&(s[u]=o[u]);if(n){c=n(o);for(var d=0;d<c.length;d++)i.call(o,c[d])&&(s[c[d]]=o[c[d]])}}return s}})),_=l(((e,t)=>{t.exports=`SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED`})),v=l(((e,t)=>{t.exports=Function.call.bind(Object.prototype.hasOwnProperty)})),y=l(((e,t)=>{var n=function(){};if(process.env.NODE_ENV!==`production`){var r=_(),i={},a=v();n=function(e){var t=`Warning: `+e;typeof console<`u`&&console.error(t);try{throw Error(t)}catch{}}}function o(e,t,o,s,c){if(process.env.NODE_ENV!==`production`){for(var l in e)if(a(e,l)){var u;try{if(typeof e[l]!=`function`){var d=Error((s||`React class`)+`: `+o+" type `"+l+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof e[l]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw d.name=`Invariant Violation`,d}u=e[l](t,l,s,o,null,r)}catch(e){u=e}if(u&&!(u instanceof Error)&&n((s||`React class`)+`: type specification of `+o+" `"+l+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof u+`. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).`),u instanceof Error&&!(u.message in i)){i[u.message]=!0;var f=c?c():``;n(`Failed `+o+` type: `+u.message+(f??``))}}}}o.resetWarningCache=function(){process.env.NODE_ENV!==`production`&&(i={})},t.exports=o})),b=l(((e,t)=>{var n=h(),r=g(),i=_(),a=v(),o=y(),s=function(){};process.env.NODE_ENV!==`production`&&(s=function(e){var t=`Warning: `+e;typeof console<`u`&&console.error(t);try{throw Error(t)}catch{}});function c(){return null}t.exports=function(e,t){var l=typeof Symbol==`function`&&Symbol.iterator,u=`@@iterator`;function d(e){var t=e&&(l&&e[l]||e[u]);if(typeof t==`function`)return t}var f=`<<anonymous>>`,p={array:_(`array`),bigint:_(`bigint`),bool:_(`boolean`),func:_(`function`),number:_(`number`),object:_(`object`),string:_(`string`),symbol:_(`symbol`),any:v(),arrayOf:y,element:b(),elementType:x(),instanceOf:S,node:E(),objectOf:w,oneOf:C,oneOfType:T,shape:O,exact:k};function m(e,t){return e===t?e!==0||1/e==1/t:e!==e&&t!==t}function h(e,t){this.message=e,this.data=t&&typeof t==`object`?t:{},this.stack=``}h.prototype=Error.prototype;function g(e){if(process.env.NODE_ENV!==`production`)var n={},r=0;function a(a,o,c,l,u,d,p){if(l=l||f,d=d||c,p!==i){if(t){var m=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 m.name=`Invariant Violation`,m}else if(process.env.NODE_ENV!==`production`&&typeof console<`u`){var g=l+`:`+c;!n[g]&&r<3&&(s("You are manually calling a React.PropTypes validation function for the `"+d+"` prop on `"+l+"`. 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."),n[g]=!0,r++)}}return o[c]==null?a?o[c]===null?new h(`The `+u+" `"+d+"` is marked as required "+("in `"+l+"`, but its value is `null`.")):new h(`The `+u+" `"+d+"` is marked as required in "+("`"+l+"`, but its value is `undefined`.")):null:e(o,c,l,u,d)}var o=a.bind(null,!1);return o.isRequired=a.bind(null,!0),o}function _(e){function t(t,n,r,i,a,o){var s=t[n];if(M(s)!==e){var c=N(s);return new h(`Invalid `+i+" `"+a+"` of type "+("`"+c+"` supplied to `"+r+"`, expected ")+("`"+e+"`."),{expectedType:e})}return null}return g(t)}function v(){return g(c)}function y(e){function t(t,n,r,a,o){if(typeof e!=`function`)return new h("Property `"+o+"` of component `"+r+"` has invalid PropType notation inside arrayOf.");var s=t[n];if(!Array.isArray(s)){var c=M(s);return new h(`Invalid `+a+" `"+o+"` of type "+("`"+c+"` supplied to `"+r+"`, expected an array."))}for(var l=0;l<s.length;l++){var u=e(s,l,r,a,o+`[`+l+`]`,i);if(u instanceof Error)return u}return null}return g(t)}function b(){function t(t,n,r,i,a){var o=t[n];if(!e(o)){var s=M(o);return new h(`Invalid `+i+" `"+a+"` of type "+("`"+s+"` supplied to `"+r+"`, expected a single ReactElement."))}return null}return g(t)}function x(){function e(e,t,r,i,a){var o=e[t];if(!n.isValidElementType(o)){var s=M(o);return new h(`Invalid `+i+" `"+a+"` of type "+("`"+s+"` supplied to `"+r+"`, expected a single ReactElement type."))}return null}return g(e)}function S(e){function t(t,n,r,i,a){if(!(t[n]instanceof e)){var o=e.name||f,s=F(t[n]);return new h(`Invalid `+i+" `"+a+"` of type "+("`"+s+"` supplied to `"+r+"`, expected ")+("instance of `"+o+"`."))}return null}return g(t)}function C(e){if(!Array.isArray(e))return process.env.NODE_ENV!==`production`&&(arguments.length>1?s(`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]).`):s(`Invalid argument supplied to oneOf, expected an array.`)),c;function t(t,n,r,i,a){for(var o=t[n],s=0;s<e.length;s++)if(m(o,e[s]))return null;var c=JSON.stringify(e,function(e,t){return N(t)===`symbol`?String(t):t});return new h(`Invalid `+i+" `"+a+"` of value `"+String(o)+"` "+("supplied to `"+r+"`, expected one of "+c+`.`))}return g(t)}function w(e){function t(t,n,r,o,s){if(typeof e!=`function`)return new h("Property `"+s+"` of component `"+r+"` has invalid PropType notation inside objectOf.");var c=t[n],l=M(c);if(l!==`object`)return new h(`Invalid `+o+" `"+s+"` of type "+("`"+l+"` supplied to `"+r+"`, expected an object."));for(var u in c)if(a(c,u)){var d=e(c,u,r,o,s+`.`+u,i);if(d instanceof Error)return d}return null}return g(t)}function T(e){if(!Array.isArray(e))return process.env.NODE_ENV!==`production`&&s(`Invalid argument supplied to oneOfType, expected an instance of array.`),c;for(var t=0;t<e.length;t++){var n=e[t];if(typeof n!=`function`)return s(`Invalid argument supplied to oneOfType. Expected an array of check functions, but received `+P(n)+` at index `+t+`.`),c}function r(t,n,r,o,s){for(var c=[],l=0;l<e.length;l++){var u=e[l],d=u(t,n,r,o,s,i);if(d==null)return null;d.data&&a(d.data,`expectedType`)&&c.push(d.data.expectedType)}var f=c.length>0?`, expected one of type [`+c.join(`, `)+`]`:``;return new h(`Invalid `+o+" `"+s+"` supplied to "+("`"+r+"`"+f+`.`))}return g(r)}function E(){function e(e,t,n,r,i){return A(e[t])?null:new h(`Invalid `+r+" `"+i+"` supplied to "+("`"+n+"`, expected a ReactNode."))}return g(e)}function D(e,t,n,r,i){return new h((e||`React class`)+`: `+t+" type `"+n+`.`+r+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+i+"`.")}function O(e){function t(t,n,r,a,o){var s=t[n],c=M(s);if(c!==`object`)return new h(`Invalid `+a+" `"+o+"` of type `"+c+"` "+("supplied to `"+r+"`, expected `object`."));for(var l in e){var u=e[l];if(typeof u!=`function`)return D(r,a,o,l,N(u));var d=u(s,l,r,a,o+`.`+l,i);if(d)return d}return null}return g(t)}function k(e){function t(t,n,o,s,c){var l=t[n],u=M(l);if(u!==`object`)return new h(`Invalid `+s+" `"+c+"` of type `"+u+"` "+("supplied to `"+o+"`, expected `object`."));for(var d in r({},t[n],e)){var f=e[d];if(a(e,d)&&typeof f!=`function`)return D(o,s,c,d,N(f));if(!f)return new h(`Invalid `+s+" `"+c+"` key `"+d+"` supplied to `"+o+`\`.
|
|
2
2
|
Bad object: `+JSON.stringify(t[n],null,` `)+`
|
|
3
|
-
Valid keys: `+JSON.stringify(Object.keys(e),null,` `));var p=f(l,d,o,s,c+`.`+d,i);if(p)return p}return null}return g(t)}function A(t){switch(typeof t){case`number`:case`string`:case`undefined`:return!0;case`boolean`:return!t;case`object`:if(Array.isArray(t))return t.every(A);if(t===null||e(t))return!0;var n=d(t);if(n){var r=n.call(t),i;if(n!==t.entries){for(;!(i=r.next()).done;)if(!A(i.value))return!1}else for(;!(i=r.next()).done;){var a=i.value;if(a&&!A(a[1]))return!1}}else return!1;return!0;default:return!1}}function j(e,t){return e===`symbol`?!0:t?t[`@@toStringTag`]===`Symbol`||typeof Symbol==`function`&&t instanceof Symbol:!1}function M(e){var t=typeof e;return Array.isArray(e)?`array`:e instanceof RegExp?`object`:j(t,e)?`symbol`:t}function N(e){if(e==null)return``+e;var t=M(e);if(t===`object`){if(e instanceof Date)return`date`;if(e instanceof RegExp)return`regexp`}return t}function P(e){var t=N(e);switch(t){case`array`:case`object`:return`an `+t;case`boolean`:case`date`:case`regexp`:return`a `+t;default:return t}}function F(e){return!e.constructor||!e.constructor.name?f:e.constructor.name}return p.checkPropTypes=o,p.resetWarningCache=o.resetWarningCache,p.PropTypes=p,p}})),x=l(((e,t)=>{var n=_();function r(){}function i(){}i.resetWarningCache=r,t.exports=function(){function e(e,t,r,i,a,o){if(o!==n){var s=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 s.name=`Invariant Violation`,s}}e.isRequired=e;function t(){return e}var a={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:i,resetWarningCache:r};return a.PropTypes=a,a}})),S=d(l(((e,t)=>{if(process.env.NODE_ENV!==`production`){var n=h();t.exports=b()(n.isElement,!0)}else t.exports=x()()}))()),C=({children:e,value:n})=>t.default.createElement(t.default.Fragment,null,e||n);C.displayName=`Combobox.Item`,C.propTypes={value:S.default.string.isRequired,searchValue:S.default.string.isRequired,children:S.default.oneOfType([S.default.node,S.default.arrayOf(S.default.node)])};function w(e){if(typeof e==`string`||typeof e==`number`)return``+e;let t=``;if(Array.isArray(e))for(let n=0,r;n<e.length;n++)(r=w(e[n]))!==``&&(t+=(t&&` `)+r);else for(let n in e)e[n]&&(t+=(t&&` `)+n);return t}function T(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function E(){return E=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},E.apply(null,arguments)}var D=`data-focus-lock`,O=`data-focus-lock-disabled`,k=`data-no-focus-lock`,A=`data-autofocus-inside`,j=`data-no-autofocus`;function M(e,t){return typeof e==`function`?e(t):e&&(e.current=t),e}function N(e,n){var r=(0,t.useState)(function(){return{value:e,callback:n,facade:{get current(){return r.value},set current(e){var t=r.value;t!==e&&(r.value=e,r.callback(e,t))}}}})[0];return r.callback=n,r.facade}var P=typeof window<`u`?t.useLayoutEffect:t.useEffect,F=new WeakMap;function I(e,t){var n=N(t||null,function(t){return e.forEach(function(e){return M(e,t)})});return P(function(){var t=F.get(n);if(t){var r=new Set(t),i=new Set(e),a=n.current;r.forEach(function(e){i.has(e)||M(e,null)}),i.forEach(function(e){r.has(e)||M(e,a)})}F.set(n,e)},[e]),n}var L={width:`1px`,height:`0px`,padding:0,overflow:`hidden`,position:`fixed`,top:`1px`,left:`1px`},ee=function(e){var n=e.children,r=n===void 0?null:n;return t.default.createElement(t.Fragment,null,t.default.createElement(`div`,{key:`guard-first`,"data-focus-guard":!0,"data-focus-auto-guard":!0,style:L}),r,r&&t.default.createElement(`div`,{key:`guard-last`,"data-focus-guard":!0,"data-focus-auto-guard":!0,style:L}))};ee.propTypes=process.env.NODE_ENV===`production`?{}:{children:S.default.node};var te=function(){return te=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n],t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},te.apply(this,arguments)};function ne(e){return e}function re(e,t){t===void 0&&(t=ne);var n=[],r=!1;return{read:function(){if(r)throw Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(e){var i=t(e,r);return n.push(i),function(){n=n.filter(function(e){return e!==i})}},assignSyncMedium:function(e){for(r=!0;n.length;){var t=n;n=[],t.forEach(e)}n={push:function(t){return e(t)},filter:function(){return n}}},assignMedium:function(e){r=!0;var t=[];if(n.length){var i=n;n=[],i.forEach(e),t=n}var a=function(){var n=t;t=[],n.forEach(e)},o=function(){return Promise.resolve().then(a)};o(),n={push:function(e){t.push(e),o()},filter:function(e){return t=t.filter(e),n}}}}}function ie(e,t){return t===void 0&&(t=ne),re(e,t)}function ae(e){e===void 0&&(e={});var t=re(null);return t.options=te({async:!0,ssr:!1},e),t}var oe=ie({},function(e){return{target:e.target,currentTarget:e.currentTarget}}),se=ie(),R=ie(),ce=ae({async:!0,ssr:typeof document<`u`}),z=(0,t.createContext)(void 0),le=[],B=(0,t.forwardRef)(function(e,n){var r,i=(0,t.useState)(),a=i[0],o=i[1],s=(0,t.useRef)(),c=(0,t.useRef)(!1),l=(0,t.useRef)(null),u=(0,t.useState)({})[1],d=e.children,f=e.disabled,p=f===void 0?!1:f,m=e.noFocusGuards,h=m===void 0?!1:m,g=e.persistentFocus,_=g===void 0?!1:g,v=e.crossFrame,y=v===void 0?!0:v,b=e.autoFocus,x=b===void 0?!0:b,S=e.allowTextSelection,C=e.group,w=e.className,T=e.whiteList,k=e.hasPositiveIndices,A=e.shards,j=A===void 0?le:A,M=e.as,N=M===void 0?`div`:M,P=e.lockProps,F=P===void 0?{}:P,ee=e.sideCar,te=e.returnFocus,ne=te===void 0?!1:te,re=e.focusOptions,ie=e.onActivation,ae=e.onDeactivation,R=(0,t.useState)({})[0],B=(0,t.useCallback)(function(e){var t=e.captureFocusRestore;if(!l.current){var n=document?.activeElement;l.current=n,n!==document.body&&(l.current=t(n))}s.current&&ie&&ie(s.current),c.current=!0,u()},[ie]),ue=(0,t.useCallback)(function(){c.current=!1,ae&&ae(s.current),u()},[ae]),de=(0,t.useCallback)(function(e){var t=l.current;if(t){var n=(typeof t==`function`?t():t)||document.body,r=typeof ne==`function`?ne(n):ne;if(r){var i=typeof r==`object`?r:void 0;l.current=null,e?Promise.resolve().then(function(){return n.focus(i)}):n.focus(i)}}},[ne]),fe=(0,t.useCallback)(function(e){c.current&&oe.useMedium(e)},[]),pe=se.useMedium,me=(0,t.useCallback)(function(e){s.current!==e&&(s.current=e,o(e))},[]);process.env.NODE_ENV!==`production`&&(S!==void 0&&console.warn(`React-Focus-Lock: allowTextSelection is deprecated and enabled by default`),(0,t.useEffect)(function(){!s.current&&typeof N!=`string`&&console.error(`FocusLock: could not obtain ref to internal node`)},[]));var he=E((r={},r[O]=p&&`disabled`,r[D]=C,r),F),ge=h!==!0,_e=ge&&h!==`tail`,ve=I([n,me]),ye=(0,t.useMemo)(function(){return{observed:s,shards:j,enabled:!p,get active(){return c.current}}},[p,c,j,s]);return t.default.createElement(t.Fragment,null,ge&&[t.default.createElement(`div`,{key:`guard-first`,"data-focus-guard":!0,tabIndex:p?-1:0,style:L}),k?t.default.createElement(`div`,{key:`guard-nearest`,"data-focus-guard":!0,tabIndex:p?-1:1,style:L}):null],!p&&t.default.createElement(ee,{id:R,sideCar:ce,observed:a,disabled:p,persistentFocus:_,crossFrame:y,autoFocus:x,whiteList:T,shards:j,onActivation:B,onDeactivation:ue,returnFocus:de,focusOptions:re,noFocusGuards:h}),t.default.createElement(N,E({ref:ve},he,{className:w,onBlur:pe,onFocus:fe}),t.default.createElement(z.Provider,{value:ye},d)),_e&&t.default.createElement(`div`,{"data-focus-guard":!0,tabIndex:p?-1:0,style:L}))});B.propTypes=process.env.NODE_ENV===`production`?{}:{children:S.node,disabled:S.bool,returnFocus:(0,S.oneOfType)([S.bool,S.object,S.func]),focusOptions:S.object,noFocusGuards:S.bool,hasPositiveIndices:S.bool,allowTextSelection:S.bool,autoFocus:S.bool,persistentFocus:S.bool,crossFrame:S.bool,group:S.string,className:S.string,whiteList:S.func,shards:(0,S.arrayOf)(S.any),as:(0,S.oneOfType)([S.string,S.func,S.object]),lockProps:S.object,onActivation:S.func,onDeactivation:S.func,sideCar:S.any.isRequired};function ue(e,t){return ue=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},ue(e,t)}function de(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,ue(e,t)}function fe(e){"@babel/helpers - typeof";return fe=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},fe(e)}function pe(e,t){if(fe(e)!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(fe(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function me(e){var t=pe(e,`string`);return fe(t)==`symbol`?t:t+``}function he(e,t,n){return(t=me(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ge(e,n){if(process.env.NODE_ENV!==`production`){if(typeof e!=`function`)throw Error(`Expected reducePropsToState to be a function.`);if(typeof n!=`function`)throw Error(`Expected handleStateChangeOnClient to be a function.`)}function r(e){return e.displayName||e.name||`Component`}return function(i){if(process.env.NODE_ENV!==`production`&&typeof i!=`function`)throw Error(`Expected WrappedComponent to be a React component.`);var a=[],o;function s(){o=e(a.map(function(e){return e.props})),n(o)}var c=function(e){de(n,e);function n(){return e.apply(this,arguments)||this}n.peek=function(){return o};var r=n.prototype;return r.componentDidMount=function(){a.push(this),s()},r.componentDidUpdate=function(){s()},r.componentWillUnmount=function(){var e=a.indexOf(this);a.splice(e,1),s()},r.render=function(){return t.default.createElement(i,this.props)},n}(t.PureComponent);return he(c,`displayName`,`SideEffect(`+r(i)+`)`),c}}var _e=function(e){for(var t=Array(e.length),n=0;n<e.length;++n)t[n]=e[n];return t},ve=function(e){return Array.isArray(e)?e:[e]},ye=function(e){return Array.isArray(e)?e[0]:e},be=function(e){if(e.nodeType!==Node.ELEMENT_NODE)return!1;var t=window.getComputedStyle(e,null);return!t||!t.getPropertyValue?!1:t.getPropertyValue(`display`)===`none`||t.getPropertyValue(`visibility`)===`hidden`},xe=function(e){return e.parentNode&&e.parentNode.nodeType===Node.DOCUMENT_FRAGMENT_NODE?e.parentNode.host:e.parentNode},Se=function(e){return e===document||e&&e.nodeType===Node.DOCUMENT_NODE},Ce=function(e){return e.hasAttribute(`inert`)},we=function(e,t){return!e||Se(e)||!be(e)&&!Ce(e)&&t(xe(e))},Te=function(e,t){var n=e.get(t);if(n!==void 0)return n;var r=we(t,Te.bind(void 0,e));return e.set(t,r),r},Ee=function(e,t){return e&&!Se(e)?Me(e)?t(xe(e)):!1:!0},De=function(e,t){var n=e.get(t);if(n!==void 0)return n;var r=Ee(t,De.bind(void 0,e));return e.set(t,r),r},Oe=function(e){return e.dataset},ke=function(e){return e.tagName===`BUTTON`},V=function(e){return e.tagName===`INPUT`},Ae=function(e){return V(e)&&e.type===`radio`},je=function(e){return!((V(e)||ke(e))&&(e.type===`hidden`||e.disabled))},Me=function(e){var t=e.getAttribute(j);return![!0,`true`,``].includes(t)},Ne=function(e){return!!(e&&Oe(e)?.focusGuard)},Pe=function(e){return!Ne(e)},Fe=function(e){return!!e},Ie=function(e,t){var n=Math.max(0,e.tabIndex),r=Math.max(0,t.tabIndex),i=n-r,a=e.index-t.index;if(i){if(!n)return 1;if(!r)return-1}return i||a},Le=function(e){return e.tabIndex<0&&!e.hasAttribute(`tabindex`)?0:e.tabIndex},Re=function(e,t,n){return _e(e).map(function(e,t){var r=Le(e);return{node:e,index:t,tabIndex:n&&r===-1?(e.dataset||{}).focusGuard?0:-1:r}}).filter(function(e){return!t||e.tabIndex>=0}).sort(Ie)},ze=[`button:enabled`,`select:enabled`,`textarea:enabled`,`input:enabled`,`a[href]`,`area[href]`,`summary`,`iframe`,`object`,`embed`,`audio[controls]`,`video[controls]`,`[tabindex]`,`[contenteditable]`,`[autofocus]`].join(`,`),Be=`${ze}, [data-focus-guard]`,Ve=function(e,t){return _e((e.shadowRoot||e).children).reduce(function(e,n){return e.concat(n.matches(t?Be:ze)?[n]:[],Ve(n))},[])},He=function(e,t){return e instanceof HTMLIFrameElement&&e.contentDocument?.body?Ue([e.contentDocument.body],t):[e]},Ue=function(e,t){return e.reduce(function(e,n){var r,i=Ve(n,t),a=(r=[]).concat.apply(r,i.map(function(e){return He(e,t)}));return e.concat(a,n.parentNode?_e(n.parentNode.querySelectorAll(ze)).filter(function(e){return e===n}):[])},[])},We=function(e){return _e(e.querySelectorAll(`[${A}]`)).map(function(e){return Ue([e])}).reduce(function(e,t){return e.concat(t)},[])},Ge=function(e,t){return _e(e).filter(function(e){return Te(t,e)}).filter(function(e){return je(e)})},Ke=function(e,t){return t===void 0&&(t=new Map),_e(e).filter(function(e){return De(t,e)})},qe=function(e,t,n){return Re(Ge(Ue(e,n),t),!0,n)},Je=function(e,t){return Re(Ge(Ue(e),t),!1)},Ye=function(e,t){return Ge(We(e),t)},Xe=function(e,t){return e.shadowRoot?Xe(e.shadowRoot,t):Object.getPrototypeOf(e).contains!==void 0&&Object.getPrototypeOf(e).contains.call(e,t)?!0:_e(e.children).some(function(e){if(e instanceof HTMLIFrameElement){var n=e.contentDocument?.body;return n?Xe(n,t):!1}return Xe(e,t)})},Ze=function(e){for(var t=new Set,n=e.length,r=0;r<n;r+=1)for(var i=r+1;i<n;i+=1){var a=e[r].compareDocumentPosition(e[i]);(a&Node.DOCUMENT_POSITION_CONTAINED_BY)>0&&t.add(i),(a&Node.DOCUMENT_POSITION_CONTAINS)>0&&t.add(r)}return e.filter(function(e,n){return!t.has(n)})},H=function(e){return e.parentNode?H(e.parentNode):e},Qe=function(e){return ve(e).filter(Boolean).reduce(function(e,t){var n=t.getAttribute(D);return e.push.apply(e,n?Ze(_e(H(t).querySelectorAll(`[${D}="${n}"]:not([${O}="disabled"])`))):[t]),e},[])},$e=function(e){try{return e()}catch{return}},et=function(e){if(e===void 0&&(e=document),!(!e||!e.activeElement)){var t=e.activeElement;return t.shadowRoot?et(t.shadowRoot):t instanceof HTMLIFrameElement&&$e(function(){return t.contentWindow.document})?et(t.contentWindow.document):t}},tt=function(e,t){return e===t},nt=function(e,t){return!!_e(e.querySelectorAll(`iframe`)).some(function(e){return tt(e,t)})},rt=function(e,t){return t===void 0&&(t=et(ye(e).ownerDocument)),!t||t.dataset&&t.dataset.focusGuard?!1:Qe(e).some(function(e){return Xe(e,t)||nt(e,t)})},it=function(e){e===void 0&&(e=document);var t=et(e);return t?_e(e.querySelectorAll(`[${k}]`)).some(function(e){return Xe(e,t)}):!1},at=function(e,t){return t.filter(Ae).filter(function(t){return t.name===e.name}).filter(function(e){return e.checked})[0]||e},ot=function(e,t){return Ae(e)&&e.name?at(e,t):e},st=function(e){var t=new Set;return e.forEach(function(n){return t.add(ot(n,e))}),e.filter(function(e){return t.has(e)})},ct=function(e){return e[0]&&e.length>1?ot(e[0],e):e[0]},lt=function(e,t){return e.indexOf(ot(t,e))},ut=`NEW_FOCUS`,dt=function(e,t,n,r,i){var a=e.length,o=e[0],s=e[a-1],c=Ne(r);if(!(r&&e.indexOf(r)>=0)){var l=r===void 0?-1:n.indexOf(r),u=i?n.indexOf(i):l,d=i?e.indexOf(i):-1;if(l===-1)return d===-1?ut:d;if(d===-1)return ut;var f=l-u,p=n.indexOf(o),m=n.indexOf(s),h=st(n),g=r===void 0?-1:h.indexOf(r),_=i?h.indexOf(i):g,v=h.filter(function(e){return e.tabIndex>=0}),y=r===void 0?-1:v.indexOf(r),b=i?v.indexOf(i):y,x=y>=0&&b>=0?b-y:_-g;if(!f&&d>=0||t.length===0)return d;var S=lt(e,t[0]),C=lt(e,t[t.length-1]);if(l<=p&&c&&Math.abs(f)>1)return C;if(l>=m&&c&&Math.abs(f)>1)return S;if(f&&Math.abs(x)>1)return d;if(l<=p)return C;if(l>m)return S;if(f)return Math.abs(f)>1?d:(a+d+f)%a}},ft=function(e){return function(t){var n=Oe(t)?.autofocus;return t.autofocus||n!==void 0&&n!==`false`||e.indexOf(t)>=0}},pt=function(e,t,n){var r=Ke(e.map(function(e){return e.node}).filter(ft(n)));return r&&r.length?ct(r):ct(Ke(t))},mt=function(e,t){return t===void 0&&(t=[]),t.push(e),e.parentNode&&mt(e.parentNode.host||e.parentNode,t),t},ht=function(e,t){for(var n=mt(e),r=mt(t),i=0;i<n.length;i+=1){var a=n[i];if(r.indexOf(a)>=0)return a}return!1},gt=function(e,t,n){var r=ve(e),i=ve(t),a=r[0],o=!1;return i.filter(Boolean).forEach(function(e){o=ht(o||e,e)||o,n.filter(Boolean).forEach(function(e){var t=ht(a,e);t&&(o=!o||Xe(t,o)?t:ht(t,o))})}),o},_t=function(e,t){return e.reduce(function(e,n){return e.concat(Ye(n,t))},[])},vt=function(e,t){var n=new Map;return t.forEach(function(e){return n.set(e.node,e)}),e.map(function(e){return n.get(e)}).filter(Fe)},yt=function(e,t){var n=et(ve(e).length>0?document:ye(e).ownerDocument),r=Qe(e).filter(Pe),i=gt(n||e,e,r),a=new Map,o=Je(r,a),s=o.filter(function(e){var t=e.node;return Pe(t)});if(s[0]){var c=Je([i],a).map(function(e){return e.node}),l=vt(c,s),u=l.map(function(e){return e.node}),d=l.filter(function(e){return e.tabIndex>=0}).map(function(e){return e.node}),f=dt(u,d,c,n,t);if(f===`NEW_FOCUS`){var p=pt(o,d,_t(r,a))||pt(o,u,_t(r,a));if(p)return{node:p};console.warn(`focus-lock: cannot find any node to move focus into`);return}return f===void 0?f:l[f]}},bt=function(e){var t=Qe(e).filter(Pe),n=Re(Ue([gt(e,e,t)],!0),!0,!0),r=Ue(t,!1);return n.map(function(e){var t=e.node;return{node:t,index:e.index,lockItem:r.indexOf(t)>=0,guard:Ne(t)}})},xt=function(e,t){e&&(`focus`in e&&e.focus(t),`contentWindow`in e&&e.contentWindow&&e.contentWindow.focus())},St=0,Ct=!1,wt=function(e,t,n){n===void 0&&(n={});var r=yt(e,t);if(!Ct&&r){if(St>2){console.error(`FocusLock: focus-fighting detected. Only one focus management system could be active. See https://github.com/theKashey/focus-lock/#focus-fighting`),Ct=!0,setTimeout(function(){Ct=!1},1);return}St++,xt(r.node,n.focusOptions),St--}};function Tt(e){if(!e)return null;if(typeof WeakRef>`u`)return function(){return e||null};var t=e?new WeakRef(e):null;return function(){return t?.deref()||null}}var Et=function(e){if(!e)return null;for(var t=[],n=e;n&&n!==document.body;)t.push({current:Tt(n),parent:Tt(n.parentElement),left:Tt(n.previousElementSibling),right:Tt(n.nextElementSibling)}),n=n.parentElement;return{element:Tt(e),stack:t,ownerDocument:e.ownerDocument}},Dt=function(e){if(e)for(var t=e.stack,n=e.ownerDocument,r=new Map,i=0,a=t;i<a.length;i++){var o=a[i],s=o.parent?.call(o);if(s&&n.contains(s)){for(var c=o.left?.call(o),l=o.current(),u=s.contains(l)?l:void 0,d=o.right?.call(o),f=qe([s],r),p=u??c?.nextElementSibling??d??c;p;){for(var m=0,h=f;m<h.length;m++){var g=h[m];if(p?.contains(g.node))return g.node}p=p.nextElementSibling}if(f.length)return f[0].node}}},Ot=function(e){var t=Et(e);return function(){return Dt(t)}},kt=function(e,t,n){if(!e||!t)return console.error(`no element or scope given`),{};var r=ve(t);if(r.every(function(t){return!Xe(t,e)}))return console.error(`Active element is not contained in the scope`),{};var i=n?qe(r,new Map):Je(r,new Map),a=i.findIndex(function(t){return t.node===e});if(a!==-1)return{prev:i[a-1],next:i[a+1],first:i[0],last:i[i.length-1]}},At=function(e,t){var n=t?qe(ve(e),new Map):Je(ve(e),new Map);return{first:n[0],last:n[n.length-1]}},jt=function(e){return Object.assign({scope:document.body,cycle:!0,onlyTabbable:!0},e)},Mt=function(e,t,n){t===void 0&&(t={});var r=jt(t),i=kt(e,r.scope,r.onlyTabbable);if(i){var a=n(i,r.cycle);a&&xt(a.node,r.focusOptions)}},Nt=function(e,t){t===void 0&&(t={}),Mt(e,t,function(e,t){var n=e.next,r=e.first;return n||t&&r})},Pt=function(e,t){t===void 0&&(t={}),Mt(e,t,function(e,t){var n=e.prev,r=e.last;return n||t&&r})},Ft=function(e,t,n){var r=At(e,t.onlyTabbable??!0)[n];r&&xt(r.node,t.focusOptions)},It=function(e,t){t===void 0&&(t={}),Ft(e,t,`first`)},Lt=function(e,t){t===void 0&&(t={}),Ft(e,t,`last`)};function Rt(e){setTimeout(e,1)}var zt=function(e){return e&&`current`in e?e.current:e},Bt=function(){return document&&document.activeElement===document.body},Vt=function(){return Bt()||it()},Ht=null,Ut=null,Wt=function(){return null},Gt=null,Kt=!1,qt=!1,Jt=function(){return!0},Yt=function(e){return(Ht.whiteList||Jt)(e)},Xt=function(e,t){Gt={observerNode:e,portaledElement:t}},Zt=function(e){return Gt&&Gt.portaledElement===e};function Qt(e,t,n,r){var i=null,a=e;do{var o=r[a];if(o.guard)o.node.dataset.focusAutoGuard&&(i=o);else if(o.lockItem){if(a!==e)return;i=null}else break}while((a+=n)!==t);i&&(i.node.tabIndex=0)}var $t=function(e){return e?!!Kt:Kt===`meanwhile`},en=function e(t,n,r){return n&&(n.host===t&&(!n.activeElement||r.contains(n.activeElement))||n.parentNode&&e(t,n.parentNode,r))},tn=function(e,t){return t.some(function(t){return en(e,t,t)})},nn=function(e){return Je(e,new Map)},rn=function(e){return!nn([e.parentNode]).some(function(t){return t.node===e})},an=function(){var e=!1;if(Ht){var t=Ht,n=t.observed,r=t.persistentFocus,i=t.autoFocus,a=t.shards,o=t.crossFrame,s=t.focusOptions,c=t.noFocusGuards,l=n||Gt&&Gt.portaledElement;if(Bt()&&Ut&&Ut!==document.body&&(!document.body.contains(Ut)||rn(Ut))){var u=Wt();u&&u.focus()}var d=document&&document.activeElement;if(l){var f=[l].concat(a.map(zt).filter(Boolean));if((!d||Yt(d))&&(r||function(){if(!$t(o)||!c||!Ut||qt)return!1;var e=nn(f),t=e.findIndex(function(e){return e.node===Ut});return t===0||t===e.length-1}()||!Vt()||!Ut&&i)&&(l&&!(rt(f)||d&&tn(d,f)||Zt(d,l))&&(document&&!Ut&&d&&!i?(d.blur&&d.blur(),document.body.focus()):(e=wt(f,Ut,{focusOptions:s}),Gt={})),Ut=document&&document.activeElement,Ut!==document.body&&(Wt=Ot(Ut)),Kt=!1),document&&d!==document.activeElement&&document.querySelector(`[data-focus-auto-guard]`)){var p=document&&document.activeElement,m=bt(f),h=m.map(function(e){return e.node}).indexOf(p);h>-1&&(m.filter(function(e){var t=e.guard,n=e.node;return t&&n.dataset.focusAutoGuard}).forEach(function(e){return e.node.removeAttribute(`tabIndex`)}),Qt(h,m.length,1,m),Qt(h,-1,-1,m))}}}return e},on=function(e){an()&&e&&(e.stopPropagation(),e.preventDefault())},sn=function(){return Rt(an)},cn=function(e){var t=e.target,n=e.currentTarget;n.contains(t)||Xt(n,t)},ln=function(){return null},un=function(e){var n=e.children;return t.default.createElement(`div`,{onBlur:sn,onFocus:cn},n)};un.propTypes=process.env.NODE_ENV===`production`?{}:{children:S.default.node.isRequired};var dn=function(){qt=!0},fn=function(){qt=!1,Kt=`just`,Rt(function(){Kt=`meanwhile`})},pn=function(){document.addEventListener(`focusin`,on),document.addEventListener(`focusout`,sn),window.addEventListener(`focus`,dn),window.addEventListener(`blur`,fn)},mn=function(){document.removeEventListener(`focusin`,on),document.removeEventListener(`focusout`,sn),window.removeEventListener(`focus`,dn),window.removeEventListener(`blur`,fn)};function hn(e){return e.filter(function(e){return!e.disabled})}var gn={moveFocusInside:wt,focusInside:rt,focusNextElement:Nt,focusPrevElement:Pt,focusFirstElement:It,focusLastElement:Lt,captureFocusRestore:Ot};function _n(e){var t=e.slice(-1)[0];t&&!Ht&&pn();var n=Ht,r=n&&t&&t.id===n.id;Ht=t,n&&!r&&(n.onDeactivation(),e.filter(function(e){return e.id===n.id}).length||n.returnFocus(!t)),t?(Ut=null,(!r||n.observed!==t.observed)&&t.onActivation(gn),an(!0),Rt(an)):(mn(),Ut=null)}oe.assignSyncMedium(cn),se.assignMedium(sn),R.assignMedium(function(e){return e(gn)});var vn=ge(hn,_n)(ln),yn=(0,t.forwardRef)(function(e,n){return t.default.createElement(B,E({sideCar:vn,ref:n},e))}),bn=B.propTypes||{};bn.sideCar;var xn=T(bn,[`sideCar`]);yn.propTypes=process.env.NODE_ENV===`production`?{}:xn;var Sn=yn,Cn=()=>typeof CSS>`u`||typeof CSS.supports!=`function`?!1:[CSS.supports(`anchor-name`,`--a`),CSS.supports(`position-anchor`,`--a`),CSS.supports(`position-area`,`bottom center`),CSS.supports(`position-try-fallbacks`,`flip-block`),CSS.supports(`width`,`anchor-size(width)`)].every(Boolean),wn=()=>{if(typeof document>`u`)return!1;let e=document.createElement(`div`);e.style.cssText=`position:fixed;left:-9999px;width:200px;height:50px;overflow:auto;visibility:hidden;pointer-events:none`;let t=document.createElement(`div`);t.style.cssText=`anchor-name:--nds-bug-test;width:100px;height:20px`;let n=document.createElement(`div`);n.style.cssText=`position:fixed;position-anchor:--nds-bug-test;position-area:bottom;width:anchor-size(width);height:10px;margin:0`,e.append(t,n),document.body.appendChild(e);let r=n.getBoundingClientRect().width;return document.body.removeChild(e),r!==100},Tn=Cn(),En=Tn&&wn(),Dn=()=>Tn,On=(e,t)=>{if(typeof document>`u`)return t;let n=getComputedStyle(document.documentElement).getPropertyValue(e).trim(),r=parseFloat(n);return isNaN(r)?t:r},kn=(e,t,n)=>{if(typeof window>`u`)return;let r=e.getBoundingClientRect();if(r.width===0)return;let i=On(`--space-xxs`,4),a=On(`--space-l`,20);t.style.setProperty(`--js-dropdown-top`,`0px`),t.style.removeProperty(`--js-dropdown-bottom`),t.style.setProperty(`--js-dropdown-left`,`0px`);let o=t.getBoundingClientRect(),s=window.innerHeight-r.bottom-i-a;r.top-i-a>s?(t.style.setProperty(`--js-dropdown-bottom`,`${window.innerHeight-r.top+i}px`),t.style.removeProperty(`--js-dropdown-top`),t.style.setProperty(`--js-dropdown-max-height`,`max(0px, calc(100vh - var(--js-dropdown-bottom, 0px) - var(--space-l)))`)):(t.style.setProperty(`--js-dropdown-top`,`${r.bottom-o.top+i}px`),t.style.removeProperty(`--js-dropdown-bottom`),t.style.setProperty(`--js-dropdown-max-height`,`calc(100dvh - var(--js-dropdown-top, 0px) - var(--space-l))`)),t.style.setProperty(`--js-dropdown-left`,`${r.left-o.left}px`),n&&t.style.setProperty(`--js-dropdown-width`,`${r.width}px`)},An=e=>{let t=typeof window<`u`&&(window.visualViewport?.width??window.innerWidth)||0,n=typeof window<`u`&&(window.visualViewport?.height??window.innerHeight)||0,r=Math.floor(e.top),i=Math.floor(e.left),a=Math.floor(t-e.right),o=Math.floor(n-e.bottom);return`${-r}px ${-a}px ${-o}px ${-i}px`},jn=({anchorRef:e,layerRef:n,matchWidth:r=!1,isOpen:i,polyfillScrollBug:a=!1})=>{let o=Dn(),s=a&&En?!1:o;return(0,t.useLayoutEffect)(()=>{if(s||!i)return;let t=!1,a,o=e.current,c=n.current;if(!o||!c)return;let l=[o,c,r],u=()=>{if(t)return;a?.disconnect();let e=o.getBoundingClientRect();if(e.width===0||e.height===0)return;let n=new IntersectionObserver(([e])=>{e.intersectionRatio<1?(c.style.visibility=`hidden`,n.disconnect(),requestAnimationFrame(()=>{t||u()})):(kn(...l),c.style.visibility=``)},{threshold:1,rootMargin:An(e)});n.observe(o),a=n};return kn(...l),c.style.visibility=``,u(),()=>{t=!0,a?.disconnect()}},[s,e,n,r,i]),{isAnchorPositionSupported:s,polyFillLayerStyles:s?{}:{position:`fixed`,top:`var(--js-dropdown-top, auto)`,bottom:`var(--js-dropdown-bottom, auto)`,left:`var(--js-dropdown-left)`,...r?{width:`var(--js-dropdown-width)`,minWidth:`var(--js-dropdown-width)`,maxWidth:`var(--js-dropdown-width)`}:{minWidth:`max-content`}}}},Mn={bottom:{positionArea:`bottom`,positionTryFallbacks:`--nds-dropdown-above, flip-inline`,positionTryOrder:`most-height`,margin:`marginTop`,primaryMaxHeight:`calc(100dvh - anchor(bottom) - var(--space-l) - var(--nds-layer-gap, var(--space-xxs)))`},top:{positionArea:`top`,positionTryFallbacks:`--nds-try-below, flip-inline`,positionTryOrder:`most-height`,margin:`marginBottom`,primaryMaxHeight:`calc(anchor(top) - var(--space-l) - var(--nds-layer-gap, var(--space-xxs)))`},left:{positionArea:`left`,positionTryFallbacks:`--nds-try-right, flip-block`,margin:`marginRight`},right:{positionArea:`right`,positionTryFallbacks:`--nds-try-left, flip-block`,margin:`marginLeft`}},Nn=({isOpen:e,matchWidth:n=!0,isPortalled:r=!1,ariaPopupType:i=`menu`,placement:a=`bottom`,alignment:o,polyfillScrollBug:s=!1})=>{let c=(0,t.useRef)(null),l=(0,t.useRef)(null),u=(0,t.useId)().replaceAll(/:/g,`-`),d=(0,t.useMemo)(()=>`--nds-dropdown-anchor-${u}`,[u]),{isAnchorPositionSupported:f,polyFillLayerStyles:p}=jn({anchorRef:c,layerRef:l,matchWidth:n,isOpen:e,polyfillScrollBug:s});return{anchorProps:(0,t.useMemo)(()=>({ref:c,style:{anchorName:f?d:void 0},"aria-haspopup":i}),[c,f,d,e,i]),layerProps:(0,t.useMemo)(()=>{let t=Mn[a],r={position:`fixed`,positionAnchor:d,positionArea:o?`${t.positionArea} ${o}`:t.positionArea,positionTryFallbacks:o?a===`left`||a===`right`?`flip-inline`:`flip-block`:t.positionTryFallbacks,...t.positionTryOrder&&{positionTryOrder:t.positionTryOrder},...t.primaryMaxHeight&&{maxHeight:t.primaryMaxHeight},marginTop:0,marginBottom:0,marginLeft:0,marginRight:0,[t.margin]:`var(--nds-layer-gap, var(--space-xxs))`,width:n?`anchor-size(width)`:`min(80vw, max-content)`,maxWidth:n?`anchor-size(width)`:`80vw`,minWidth:n?`anchor-size(width)`:`auto`,"--nds-anchor-name":d};return{ref:l,style:{...f?r:p,display:e?`block`:`none`}}},[e,f,r,d,n,a,o,p,l]),isAnchorPositionSupported:f}};function Pn(){return Pn=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Pn.apply(null,arguments)}var Fn=()=>{},In=({side:e=`bottom`,content:n,children:r,renderTrigger:i=()=>t.default.createElement(t.default.Fragment,null),wrapperDisplay:a=`inline-flex`,matchTriggerWidth:o=!1,testId:s,closeOnContentClick:c=!1,isOpen:l,autoFocus:u=!1,hasShadow:d=!0,onUserDismiss:f=Fn,onUserEnable:p=Fn})=>{let m=l===!0||l===!1,h=t.default.Children.count(r)>0,[g,_]=(0,t.useState)(!1),v=m?l:g,y=c?t.default.cloneElement(n,{onClick:()=>{n.onClick&&n.onClick(),_(!1),f()}}):n,b=(0,t.useCallback)(()=>{_(!1),f()},[f]),x=e=>{e.stopPropagation(),m?l?f():p():_(e=>!e)},S=({key:e})=>{e===`Enter`&&(_(!0),p())},{anchorProps:C,layerProps:T}=Nn({isOpen:v,setIsOpen:e=>{e||b()},matchWidth:o,placement:e}),{ref:E,style:D,...O}=C,{ref:k,...A}=T;return(0,t.useEffect)(()=>{if(!v)return;let e=e=>{let t=typeof E==`object`?E?.current:null,n=typeof k==`object`?k?.current:null;t&&!t.contains(e.target)&&n&&!n.contains(e.target)&&b()},t=({key:e})=>{e===`Escape`&&b()};return document.addEventListener(`mousedown`,e),window.addEventListener(`keydown`,t),()=>{document.removeEventListener(`mousedown`,e),window.removeEventListener(`keydown`,t)}},[v,b,E,k]),t.default.createElement(t.default.Fragment,null,t.default.createElement(`div`,Pn({ref:E},O,{style:{...D,display:a},onClick:x,onKeyDown:S,role:`button`,tabIndex:`0`,className:`nds-popover-trigger`,"data-testid":`nds-popover-trigger`,"aria-haspopup":`true`,"aria-expanded":v.toString()}),h?r:i(l)),t.default.createElement(`div`,Pn({ref:k},A,{className:w([`nds-typography nds-popover`,`rounded--all bgColor--white`,{"nds-popover--elevated":d}]),style:A.style,"data-testid":s}),v&&t.default.createElement(`div`,{tabIndex:-1},t.default.createElement(Sn,{autoFocus:u},y))))},Ln=l((e=>{var t=Symbol.for(`react.element`),n=Symbol.for(`react.portal`),r=Symbol.for(`react.fragment`),i=Symbol.for(`react.strict_mode`),a=Symbol.for(`react.profiler`),o=Symbol.for(`react.provider`),s=Symbol.for(`react.context`),c=Symbol.for(`react.server_context`),l=Symbol.for(`react.forward_ref`),u=Symbol.for(`react.suspense`),d=Symbol.for(`react.suspense_list`),f=Symbol.for(`react.memo`),p=Symbol.for(`react.lazy`),m=Symbol.for(`react.offscreen`),h=Symbol.for(`react.module.reference`);function g(e){if(typeof e==`object`&&e){var m=e.$$typeof;switch(m){case t:switch(e=e.type,e){case r:case a:case i:case u:case d:return e;default:switch(e=e&&e.$$typeof,e){case c:case s:case l:case p:case f:case o:return e;default:return m}}case n:return m}}}e.ContextConsumer=s,e.ContextProvider=o,e.Element=t,e.ForwardRef=l,e.Fragment=r,e.Lazy=p,e.Memo=f,e.Portal=n,e.Profiler=a,e.StrictMode=i,e.Suspense=u,e.SuspenseList=d,e.isAsyncMode=function(){return!1},e.isConcurrentMode=function(){return!1},e.isContextConsumer=function(e){return g(e)===s},e.isContextProvider=function(e){return g(e)===o},e.isElement=function(e){return typeof e==`object`&&!!e&&e.$$typeof===t},e.isForwardRef=function(e){return g(e)===l},e.isFragment=function(e){return g(e)===r},e.isLazy=function(e){return g(e)===p},e.isMemo=function(e){return g(e)===f},e.isPortal=function(e){return g(e)===n},e.isProfiler=function(e){return g(e)===a},e.isStrictMode=function(e){return g(e)===i},e.isSuspense=function(e){return g(e)===u},e.isSuspenseList=function(e){return g(e)===d},e.isValidElementType=function(e){return!!(typeof e==`string`||typeof e==`function`||e===r||e===a||e===i||e===u||e===d||e===m||typeof e==`object`&&e&&(e.$$typeof===p||e.$$typeof===f||e.$$typeof===o||e.$$typeof===s||e.$$typeof===l||e.$$typeof===h||e.getModuleId!==void 0))},e.typeOf=g})),Rn=l((e=>{process.env.NODE_ENV!==`production`&&(function(){"use strict";var t=Symbol.for(`react.element`),n=Symbol.for(`react.portal`),r=Symbol.for(`react.fragment`),i=Symbol.for(`react.strict_mode`),a=Symbol.for(`react.profiler`),o=Symbol.for(`react.provider`),s=Symbol.for(`react.context`),c=Symbol.for(`react.server_context`),l=Symbol.for(`react.forward_ref`),u=Symbol.for(`react.suspense`),d=Symbol.for(`react.suspense_list`),f=Symbol.for(`react.memo`),p=Symbol.for(`react.lazy`),m=Symbol.for(`react.offscreen`),h=!1,g=!1,_=!1,v=!1,y=!1,b=Symbol.for(`react.module.reference`);function x(e){return!!(typeof e==`string`||typeof e==`function`||e===r||e===a||y||e===i||e===u||e===d||v||e===m||h||g||_||typeof e==`object`&&e&&(e.$$typeof===p||e.$$typeof===f||e.$$typeof===o||e.$$typeof===s||e.$$typeof===l||e.$$typeof===b||e.getModuleId!==void 0))}function S(e){if(typeof e==`object`&&e){var m=e.$$typeof;switch(m){case t:var h=e.type;switch(h){case r:case a:case i:case u:case d:return h;default:var g=h&&h.$$typeof;switch(g){case c:case s:case l:case p:case f:case o:return g;default:return m}}case n:return m}}}var C=s,w=o,T=t,E=l,D=r,O=p,k=f,A=n,j=a,M=i,N=u,P=d,F=!1,I=!1;function L(e){return F||(F=!0,console.warn(`The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 18+.`)),!1}function ee(e){return I||(I=!0,console.warn(`The ReactIs.isConcurrentMode() alias has been deprecated, and will be removed in React 18+.`)),!1}function te(e){return S(e)===s}function ne(e){return S(e)===o}function re(e){return typeof e==`object`&&!!e&&e.$$typeof===t}function ie(e){return S(e)===l}function ae(e){return S(e)===r}function oe(e){return S(e)===p}function se(e){return S(e)===f}function R(e){return S(e)===n}function ce(e){return S(e)===a}function z(e){return S(e)===i}function le(e){return S(e)===u}function B(e){return S(e)===d}e.ContextConsumer=C,e.ContextProvider=w,e.Element=T,e.ForwardRef=E,e.Fragment=D,e.Lazy=O,e.Memo=k,e.Portal=A,e.Profiler=j,e.StrictMode=M,e.Suspense=N,e.SuspenseList=P,e.isAsyncMode=L,e.isConcurrentMode=ee,e.isContextConsumer=te,e.isContextProvider=ne,e.isElement=re,e.isForwardRef=ie,e.isFragment=ae,e.isLazy=oe,e.isMemo=se,e.isPortal=R,e.isProfiler=ce,e.isStrictMode=z,e.isSuspense=le,e.isSuspenseList=B,e.isValidElementType=x,e.typeOf=S})()})),zn=l(((e,t)=>{process.env.NODE_ENV===`production`?t.exports=Ln():t.exports=Rn()}))(),Bn=e=>typeof e==`object`&&!!e&&e.nodeType===1,Vn=(e,t)=>(!t||e!==`hidden`)&&e!==`visible`&&e!==`clip`,Hn=(e,t)=>{if(e.clientHeight<e.scrollHeight||e.clientWidth<e.scrollWidth){let n=getComputedStyle(e,null);return Vn(n.overflowY,t)||Vn(n.overflowX,t)||(e=>{let t=(e=>{if(!e.ownerDocument||!e.ownerDocument.defaultView)return null;try{return e.ownerDocument.defaultView.frameElement}catch{return null}})(e);return!!t&&(t.clientHeight<e.scrollHeight||t.clientWidth<e.scrollWidth)})(e)}return!1},Un=(e,t,n,r,i,a,o,s)=>a<e&&o>t||a>e&&o<t?0:a<=e&&s<=n||o>=t&&s>=n?a-e-r:o>t&&s<n||a<e&&s>n?o-t+i:0,Wn=e=>e.parentElement??(e.getRootNode().host||null),Gn=(e,t)=>{if(typeof document>`u`)return[];let{scrollMode:n,block:r,inline:i,boundary:a,skipOverflowHiddenElements:o}=t,s=typeof a==`function`?a:e=>e!==a;if(!Bn(e))throw TypeError(`Invalid target`);let c=document.scrollingElement||document.documentElement,l=[],u=e;for(;Bn(u)&&s(u);){if(u=Wn(u),u===c){l.push(u);break}u!=null&&u===document.body&&Hn(u)&&!Hn(document.documentElement)||u!=null&&Hn(u,o)&&l.push(u)}let d=window.visualViewport?.width??innerWidth,f=window.visualViewport?.height??innerHeight,{scrollX:p,scrollY:m}=window,{height:h,width:g,top:_,right:v,bottom:y,left:b}=e.getBoundingClientRect(),{top:x,right:S,bottom:C,left:w}=(e=>{let t=window.getComputedStyle(e);return{top:parseFloat(t.scrollMarginTop)||0,right:parseFloat(t.scrollMarginRight)||0,bottom:parseFloat(t.scrollMarginBottom)||0,left:parseFloat(t.scrollMarginLeft)||0}})(e),T=r===`start`||r===`nearest`?_-x:r===`end`?y+C:_+h/2-x+C,E=i===`center`?b+g/2-w+S:i===`end`?v+S:b-w,D=[];for(let e=0;e<l.length;e++){let t=l[e],{height:a,width:o,top:s,right:u,bottom:x,left:S}=t.getBoundingClientRect();if(n===`if-needed`&&_>=0&&b>=0&&y<=f&&v<=d&&(t===c&&!Hn(t)||_>=s&&y<=x&&b>=S&&v<=u))return D;let C=getComputedStyle(t),w=parseInt(C.borderLeftWidth,10),O=parseInt(C.borderTopWidth,10),k=parseInt(C.borderRightWidth,10),A=parseInt(C.borderBottomWidth,10),j=0,M=0,N=`offsetWidth`in t?t.offsetWidth-t.clientWidth-w-k:0,P=`offsetHeight`in t?t.offsetHeight-t.clientHeight-O-A:0,F=`offsetWidth`in t?t.offsetWidth===0?0:o/t.offsetWidth:0,I=`offsetHeight`in t?t.offsetHeight===0?0:a/t.offsetHeight:0;if(c===t)j=r===`start`?T:r===`end`?T-f:r===`nearest`?Un(m,m+f,f,O,A,m+T,m+T+h,h):T-f/2,M=i===`start`?E:i===`center`?E-d/2:i===`end`?E-d:Un(p,p+d,d,w,k,p+E,p+E+g,g),j=Math.max(0,j+m),M=Math.max(0,M+p);else{j=r===`start`?T-s-O:r===`end`?T-x+A+P:r===`nearest`?Un(s,x,a,O,A+P,T,T+h,h):T-(s+a/2)+P/2,M=i===`start`?E-S-w:i===`center`?E-(S+o/2)+N/2:i===`end`?E-u+k+N:Un(S,u,o,w,k+N,E,E+g,g);let{scrollLeft:e,scrollTop:n}=t;j=I===0?0:Math.max(0,Math.min(n+j/I,t.scrollHeight-a/I+P)),M=F===0?0:Math.max(0,Math.min(e+M/F,t.scrollWidth-o/F+N)),T+=n-j,E+=e-M}D.push({el:t,top:j,left:M})}return D},Kn=process.env.NODE_ENV===`production`?0:`__autocomplete_unknown__`,qn=process.env.NODE_ENV===`production`?1:`__autocomplete_mouseup__`,Jn=process.env.NODE_ENV===`production`?2:`__autocomplete_item_mouseenter__`,Yn=process.env.NODE_ENV===`production`?3:`__autocomplete_keydown_arrow_up__`,Xn=process.env.NODE_ENV===`production`?4:`__autocomplete_keydown_arrow_down__`,Zn=process.env.NODE_ENV===`production`?5:`__autocomplete_keydown_escape__`,Qn=process.env.NODE_ENV===`production`?6:`__autocomplete_keydown_enter__`,$n=process.env.NODE_ENV===`production`?7:`__autocomplete_keydown_home__`,er=process.env.NODE_ENV===`production`?8:`__autocomplete_keydown_end__`,tr=process.env.NODE_ENV===`production`?9:`__autocomplete_click_item__`,nr=process.env.NODE_ENV===`production`?10:`__autocomplete_blur_input__`,rr=process.env.NODE_ENV===`production`?11:`__autocomplete_change_input__`,ir=process.env.NODE_ENV===`production`?12:`__autocomplete_keydown_space_button__`,ar=process.env.NODE_ENV===`production`?13:`__autocomplete_click_button__`,or=process.env.NODE_ENV===`production`?14:`__autocomplete_blur_button__`,sr=process.env.NODE_ENV===`production`?15:`__autocomplete_controlled_prop_updated_selected_item__`,cr=process.env.NODE_ENV===`production`?16:`__autocomplete_touchend__`,lr=Object.freeze({__proto__:null,blurButton:or,blurInput:nr,changeInput:rr,clickButton:ar,clickItem:tr,controlledPropUpdatedSelectedItem:sr,itemMouseEnter:Jn,keyDownArrowDown:Xn,keyDownArrowUp:Yn,keyDownEnd:er,keyDownEnter:Qn,keyDownEscape:Zn,keyDownHome:$n,keyDownSpaceButton:ir,mouseUp:qn,touchEnd:cr,unknown:Kn}),ur=0;function dr(){return String(ur++)}function fr(e){var t=f.useRef(e);return t.current=e,t}function pr(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(e){t.forEach(function(t){typeof t==`function`?t(e):t&&(t.current=e)})}}function U(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(e){for(var n=arguments.length,r=Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];return t.some(function(t){return t&&t.apply(void 0,[e].concat(r)),e.preventDownshiftDefault||e.hasOwnProperty(`nativeEvent`)&&e.nativeEvent.preventDownshiftDefault})}}function mr(e,t){var n;function r(){n&&clearTimeout(n)}function i(){for(var i=arguments.length,a=Array(i),o=0;o<i;o++)a[o]=arguments[o];r(),n=setTimeout(function(){n=null,e.apply(void 0,a)},t)}return i.cancel=r,i}var hr=mr(function(e){gr(e).textContent=``},500);function gr(e){var t=e.getElementById(`a11y-status-message`);return t||(t=e.createElement(`div`),t.setAttribute(`id`,`a11y-status-message`),t.setAttribute(`role`,`status`),t.setAttribute(`aria-live`,`polite`),t.setAttribute(`aria-relevant`,`additions text`),Object.assign(t.style,{border:`0`,clip:`rect(0 0 0 0)`,height:`1px`,margin:`-1px`,overflow:`hidden`,padding:`0`,position:`absolute`,width:`1px`}),e.body.appendChild(t),t)}function _r(e,t){if(!(!e||!t)){var n=gr(t);n.textContent=e,hr(t)}}function vr(e){var t=e?.getElementById(`a11y-status-message`);t&&t.remove()}function yr(){}var br=yr;process.env.NODE_ENV!==`production`&&(br=function(e,t,n){S.default.checkPropTypes(n,e,`prop`,t.name)});function xr(e,t){return t?Object.keys(e).reduce(function(e,n){return t[n]!==void 0&&(e[n]=t[n]),e},E({},e)):e}function Sr(e,t){e&&Gn(e,{boundary:t,block:`nearest`,scrollMode:`if-needed`}).forEach(function(e){var t=e.el,n=e.top,r=e.left;t.scrollTop=n,t.scrollLeft=r})}function Cr(e){var t=e.key,n=e.keyCode;return n>=37&&n<=40&&!t.startsWith(`Arrow`)?`Arrow`+t:t}function wr(e,t,n,r,i){i===void 0&&(i=!1);var a=n.length;if(t){for(var o=e;o>=0;o--)if(!r(n[o],o))return o}else for(var s=e;s<a;s++)if(!r(n[s],s))return s;return i?wr(t?a-1:0,t,n,r):-1}function Tr(e,t,n,r,i){i===void 0&&(i=!1);var a=n.length;if(a===0)return-1;var o=a-1;(typeof e!=`number`||e<0||e>o)&&(e=t>0?-1:o+1);var s=e+t;s<0?s=i?o:0:s>o&&(s=i?0:o);var c=wr(s,t<0,n,r,i);return c===-1?e>=a?-1:e:c}var Er=yr;process.env.NODE_ENV!==`production`&&(Er=function(e,t,n){var r=`This prop should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled Downshift element for the lifetime of the component. More info: https://github.com/downshift-js/downshift#control-props`;Object.keys(e).forEach(function(e){t[e]!==void 0&&n[e]===void 0?console.error(`downshift: A component has changed the controlled prop "`+e+`" to be uncontrolled. `+r):t[e]===void 0&&n[e]!==void 0&&console.error(`downshift: A component has changed the uncontrolled prop "`+e+`" to be controlled. `+r)})});function Dr(e,t,n,r){return r===void 0&&(r=!0),!!n&&t.some(function(t){return t&&(Or(t,e,n)||r&&Or(t,n.document.activeElement,n))})}function Or(e,t,n){return e===t||t instanceof n.Node&&e.contains(t)}function kr(e){return typeof e==`function`?e:yr}function Ar(e){var t=e.isOpen,n=e.resultCount,r=e.previousResultCount;return t?n?n===r?``:n+` result`+(n===1?` is`:`s are`)+` available, use up and down arrow keys to navigate. Press Enter key to select.`:`No results are available.`:``}function jr(e,t){return e=Array.isArray(e)?e[0]:e,!e&&t?t:e}function Mr(e){return typeof e.type==`string`}function Nr(e){return e.props}function Pr(e,t){console.error(`The property "`+t+`" is required in "`+e+`"`)}var Fr=[`highlightedIndex`,`inputValue`,`isOpen`,`selectedItem`,`type`];function Ir(e){e===void 0&&(e={});var t={};return Fr.forEach(function(n){e.hasOwnProperty(n)&&(t[n]=e[n])}),t}function Lr(e){return Object.prototype.toString.call(e)===`[object Object]`}var Rr=[`refKey`,`ref`],zr=[`onClick`,`onPress`,`onKeyDown`,`onKeyUp`,`onBlur`],Br=[`onKeyDown`,`onBlur`,`onChange`,`onInput`,`onChangeText`],Vr=[`refKey`,`ref`],Hr=[`onMouseMove`,`onMouseDown`,`onClick`,`onPress`,`index`,`item`],Ur=function(){var e=function(e){function t(t){var n=e.call(this,t)||this;n.id=n.props.id||`downshift-`+dr(),n.menuId=n.props.menuId||n.id+`-menu`,n.labelId=n.props.labelId||n.id+`-label`,n.inputId=n.props.inputId||n.id+`-input`,n.getItemId=n.props.getItemId||function(e){return n.id+`-item-`+e},n.items=[],n.itemCount=null,n.previousResultCount=0,n.timeoutIds=[],n.internalSetTimeout=function(e,t){var r=setTimeout(function(){n.timeoutIds=n.timeoutIds.filter(function(e){return e!==r}),e()},t);n.timeoutIds.push(r)},n.setItemCount=function(e){n.itemCount=e},n.unsetItemCount=function(){n.itemCount=null},n.isItemDisabled=function(e,t){var r=n.getItemNodeFromIndex(t);return r&&r.hasAttribute(`disabled`)},n.setHighlightedIndex=function(e,t){e===void 0&&(e=n.props.defaultHighlightedIndex),t===void 0&&(t={}),t=Ir(t),n.internalSetState(E({highlightedIndex:e},t))},n.clearSelection=function(e){n.internalSetState({selectedItem:null,inputValue:``,highlightedIndex:n.props.defaultHighlightedIndex,isOpen:n.props.defaultIsOpen},e)},n.selectItem=function(e,t,r){t=Ir(t),n.internalSetState(E({isOpen:n.props.defaultIsOpen,highlightedIndex:n.props.defaultHighlightedIndex,selectedItem:e,inputValue:n.props.itemToString(e)},t),r)},n.selectItemAtIndex=function(e,t,r){var i=n.items[e];i!=null&&n.selectItem(i,t,r)},n.selectHighlightedItem=function(e,t){return n.selectItemAtIndex(n.getState().highlightedIndex,e,t)},n.internalSetState=function(e,t){var r,i,a={},o=typeof e==`function`;return!o&&e.hasOwnProperty(`inputValue`)&&n.props.onInputValueChange(e.inputValue,E({},n.getStateAndHelpers(),e)),n.setState(function(t){var s;t=n.getState(t);var c=o?e(t):e;c=n.props.stateReducer(t,c),r=c.hasOwnProperty(`selectedItem`);var l={};return r&&c.selectedItem!==t.selectedItem&&(i=c.selectedItem),(s=c).type||(s.type=Kn),Object.keys(c).forEach(function(e){t[e]!==c[e]&&(a[e]=c[e]),e!==`type`&&(c[e],n.props[e]===void 0&&(l[e]=c[e]))}),o&&c.hasOwnProperty(`inputValue`)&&n.props.onInputValueChange(c.inputValue,E({},n.getStateAndHelpers(),c)),l},function(){kr(t)(),Object.keys(a).length>1&&n.props.onStateChange(a,n.getStateAndHelpers()),r&&n.props.onSelect(e.selectedItem,n.getStateAndHelpers()),i!==void 0&&n.props.onChange(i,n.getStateAndHelpers()),n.props.onUserAction(a,n.getStateAndHelpers())})},n.rootRef=function(e){return n._rootNode=e},n.getRootProps=function(e,t){var r,i=e===void 0?{}:e,a=i.refKey,o=a===void 0?`ref`:a,s=i.ref,c=T(i,Rr),l=(t===void 0?{}:t).suppressRefError,u=l===void 0?!1:l;n.getRootProps.called=!0,n.getRootProps.refKey=o,n.getRootProps.suppressRefError=u;var d=n.getState().isOpen;return E((r={},r[o]=pr(s,n.rootRef),r.role=`combobox`,r[`aria-expanded`]=d,r[`aria-haspopup`]=`listbox`,r[`aria-owns`]=d?n.menuId:void 0,r[`aria-labelledby`]=n.labelId,r),c)},n.keyDownHandlers={ArrowDown:function(e){var t=this;if(e.preventDefault(),this.getState().isOpen){var n=e.shiftKey?5:1;this.moveHighlightedIndex(n,{type:Xn})}else this.internalSetState({isOpen:!0,type:Xn},function(){var e=t.getItemCount();if(e>0){var n=t.getState().highlightedIndex,r=Tr(n,1,{length:e},t.isItemDisabled,!0);t.setHighlightedIndex(r,{type:Xn})}})},ArrowUp:function(e){var t=this;if(e.preventDefault(),this.getState().isOpen){var n=e.shiftKey?-5:-1;this.moveHighlightedIndex(n,{type:Yn})}else this.internalSetState({isOpen:!0,type:Yn},function(){var e=t.getItemCount();if(e>0){var n=t.getState().highlightedIndex,r=Tr(n,-1,{length:e},t.isItemDisabled,!0);t.setHighlightedIndex(r,{type:Yn})}})},Enter:function(e){if(e.which!==229){var t=this.getState(),n=t.isOpen,r=t.highlightedIndex;if(n&&r!=null){e.preventDefault();var i=this.items[r],a=this.getItemNodeFromIndex(r);if(i==null||a&&a.hasAttribute(`disabled`))return;this.selectHighlightedItem({type:Qn})}}},Escape:function(e){e.preventDefault(),this.reset(E({type:Zn},!this.state.isOpen&&{selectedItem:null,inputValue:``}))}},n.buttonKeyDownHandlers=E({},n.keyDownHandlers,{" ":function(e){e.preventDefault(),this.toggleMenu({type:ir})}}),n.inputKeyDownHandlers=E({},n.keyDownHandlers,{Home:function(e){var t=this.getState().isOpen;if(t){e.preventDefault();var n=this.getItemCount();if(!(n<=0||!t)){var r=wr(0,!1,{length:n},this.isItemDisabled);this.setHighlightedIndex(r,{type:$n})}}},End:function(e){var t=this.getState().isOpen;if(t){e.preventDefault();var n=this.getItemCount();if(!(n<=0||!t)){var r=wr(n-1,!0,{length:n},this.isItemDisabled);this.setHighlightedIndex(r,{type:er})}}}}),n.getToggleButtonProps=function(e){var t=e===void 0?{}:e,r=t.onClick;t.onPress;var i=t.onKeyDown,a=t.onKeyUp,o=t.onBlur,s=T(t,zr),c=n.getState().isOpen,l={onClick:U(r,n.buttonHandleClick),onKeyDown:U(i,n.buttonHandleKeyDown),onKeyUp:U(a,n.buttonHandleKeyUp),onBlur:U(o,n.buttonHandleBlur)},u=s.disabled?{}:l;return E({type:`button`,role:`button`,"aria-label":c?`close menu`:`open menu`,"aria-haspopup":!0,"data-toggle":!0},u,s)},n.buttonHandleKeyUp=function(e){e.preventDefault()},n.buttonHandleKeyDown=function(e){var t=Cr(e);n.buttonKeyDownHandlers[t]&&n.buttonKeyDownHandlers[t].call(n,e)},n.buttonHandleClick=function(e){if(e.preventDefault(),n.props.environment){var t=n.props.environment.document,r=t.body,i=t.activeElement;r&&r===i&&e.target.focus()}process.env.NODE_ENV===`test`?n.toggleMenu({type:ar}):n.internalSetTimeout(function(){return n.toggleMenu({type:ar})})},n.buttonHandleBlur=function(e){var t=e.target;n.internalSetTimeout(function(){if(!(n.isMouseDown||!n.props.environment)){var e=n.props.environment.document.activeElement;(e==null||e.id!==n.inputId)&&e!==t&&n.reset({type:or})}})},n.getLabelProps=function(e){return E({htmlFor:n.inputId,id:n.labelId},e)},n.getInputProps=function(e){var t=e===void 0?{}:e,r=t.onKeyDown,i=t.onBlur,a=t.onChange,o=t.onInput;t.onChangeText;var s=T(t,Br),c,l={};c=`onChange`;var u=n.getState(),d=u.inputValue,f=u.isOpen,p=u.highlightedIndex;if(!s.disabled){var m;l=(m={},m[c]=U(a,o,n.inputHandleChange),m.onKeyDown=U(r,n.inputHandleKeyDown),m.onBlur=U(i,n.inputHandleBlur),m)}return E({"aria-autocomplete":`list`,"aria-activedescendant":f&&typeof p==`number`&&p>=0?n.getItemId(p):void 0,"aria-controls":f?n.menuId:void 0,"aria-labelledby":s&&s[`aria-label`]?void 0:n.labelId,autoComplete:`off`,value:d,id:n.inputId},l,s)},n.inputHandleKeyDown=function(e){var t=Cr(e);t&&n.inputKeyDownHandlers[t]&&n.inputKeyDownHandlers[t].call(n,e)},n.inputHandleChange=function(e){n.internalSetState({type:rr,isOpen:!0,inputValue:e.target.value,highlightedIndex:n.props.defaultHighlightedIndex})},n.inputHandleBlur=function(){n.internalSetTimeout(function(){var e;if(!(n.isMouseDown||!n.props.environment)){var t=n.props.environment.document.activeElement;!(t==null||(e=t.dataset)==null)&&e.toggle&&n._rootNode&&n._rootNode.contains(t)||n.reset({type:nr})}})},n.menuRef=function(e){n._menuNode=e},n.getMenuProps=function(e,t){var r,i=e===void 0?{}:e,a=i.refKey,o=a===void 0?`ref`:a,s=i.ref,c=T(i,Vr),l=(t===void 0?{}:t).suppressRefError,u=l===void 0?!1:l;return n.getMenuProps.called=!0,n.getMenuProps.refKey=o,n.getMenuProps.suppressRefError=u,E((r={},r[o]=pr(s,n.menuRef),r.role=`listbox`,r[`aria-labelledby`]=c&&c[`aria-label`]?void 0:n.labelId,r.id=n.menuId,r),c)},n.getItemProps=function(e){var t,r=e===void 0?{}:e,i=r.onMouseMove,a=r.onMouseDown,o=r.onClick;r.onPress;var s=r.index,c=r.item,l=c===void 0?process.env.NODE_ENV===`production`?void 0:Pr(`getItemProps`,`item`):c,u=T(r,Hr);s===void 0?(n.items.push(l),s=n.items.indexOf(l)):n.items[s]=l;var d=`onClick`,f=o,p=(t={onMouseMove:U(i,function(){s!==n.getState().highlightedIndex&&(n.setHighlightedIndex(s,{type:Jn}),n.avoidScrolling=!0,n.internalSetTimeout(function(){return n.avoidScrolling=!1},250))}),onMouseDown:U(a,function(e){e.preventDefault()})},t[d]=U(f,function(){n.selectItemAtIndex(s,{type:tr})}),t),m=u.disabled?{onMouseDown:p.onMouseDown}:p;return E({id:n.getItemId(s),role:`option`,"aria-selected":n.getState().highlightedIndex===s},m,u)},n.clearItems=function(){n.items=[]},n.reset=function(e,t){e===void 0&&(e={}),e=Ir(e),n.internalSetState(function(t){var r=t.selectedItem;return E({isOpen:n.props.defaultIsOpen,highlightedIndex:n.props.defaultHighlightedIndex,inputValue:n.props.itemToString(r)},e)},t)},n.toggleMenu=function(e,t){e===void 0&&(e={}),e=Ir(e),n.internalSetState(function(t){var r=t.isOpen;return E({isOpen:!r},r&&{highlightedIndex:n.props.defaultHighlightedIndex},e)},function(){var r=n.getState(),i=r.isOpen,a=r.highlightedIndex;i&&n.getItemCount()>0&&typeof a==`number`&&n.setHighlightedIndex(a,e),kr(t)()})},n.openMenu=function(e){n.internalSetState({isOpen:!0},e)},n.closeMenu=function(e){n.internalSetState({isOpen:!1},e)},n.updateStatus=mr(function(){var e;if((e=n.props)!=null&&(e=e.environment)!=null&&e.document){var t=n.getState(),r=n.items[t.highlightedIndex],i=n.getItemCount(),a=n.props.getA11yStatusMessage(E({itemToString:n.props.itemToString,previousResultCount:n.previousResultCount,resultCount:i,highlightedItem:r},t));n.previousResultCount=i,_r(a,n.props.environment.document)}},200);var r=n.props,i=r.defaultHighlightedIndex,a=r.initialHighlightedIndex,o=a===void 0?i:a,s=r.defaultIsOpen,c=r.initialIsOpen,l=c===void 0?s:c,u=r.initialInputValue,d=u===void 0?``:u,f=r.initialSelectedItem,p=f===void 0?null:f,m=n.getState({highlightedIndex:o,isOpen:l,inputValue:d,selectedItem:p});return m.selectedItem!=null&&n.props.initialInputValue===void 0&&(m.inputValue=n.props.itemToString(m.selectedItem)),n.state=m,n}de(t,e);var n=t.prototype;return n.internalClearTimeouts=function(){this.timeoutIds.forEach(function(e){clearTimeout(e)}),this.timeoutIds=[]},n.getState=function(e){return e===void 0&&(e=this.state),xr(e,this.props)},n.getItemCount=function(){var e=this.items.length;return this.itemCount==null?this.props.itemCount!==void 0&&(e=this.props.itemCount):e=this.itemCount,e},n.getItemNodeFromIndex=function(e){return this.props.environment?this.props.environment.document.getElementById(this.getItemId(e)):null},n.scrollHighlightedItemIntoView=function(){var e=this.getItemNodeFromIndex(this.getState().highlightedIndex);this.props.scrollIntoView(e,this._menuNode)},n.moveHighlightedIndex=function(e,t){var n=this.getItemCount(),r=this.getState().highlightedIndex;if(n>0){var i=Tr(r,e,{length:n},this.isItemDisabled,!0);this.setHighlightedIndex(i,t)}},n.getStateAndHelpers=function(){var e=this.getState(),t=e.highlightedIndex,n=e.inputValue,r=e.selectedItem,i=e.isOpen,a=this.props.itemToString,o=this.id,s=this.getRootProps,c=this.getToggleButtonProps,l=this.getLabelProps,u=this.getMenuProps,d=this.getInputProps,f=this.getItemProps,p=this.openMenu,m=this.closeMenu,h=this.toggleMenu,g=this.selectItem,_=this.selectItemAtIndex,v=this.selectHighlightedItem,y=this.setHighlightedIndex,b=this.clearSelection,x=this.clearItems;return{getRootProps:s,getToggleButtonProps:c,getLabelProps:l,getMenuProps:u,getInputProps:d,getItemProps:f,reset:this.reset,openMenu:p,closeMenu:m,toggleMenu:h,selectItem:g,selectItemAtIndex:_,selectHighlightedItem:v,setHighlightedIndex:y,clearSelection:b,clearItems:x,setItemCount:this.setItemCount,unsetItemCount:this.unsetItemCount,setState:this.internalSetState,itemToString:a,id:o,highlightedIndex:t,inputValue:n,isOpen:i,selectedItem:r}},n.componentDidMount=function(){var e=this;if(process.env.NODE_ENV!==`production`&&this.getMenuProps.called&&!this.getMenuProps.suppressRefError&&Wr(this._menuNode,this.getMenuProps),!this.props.environment)this.cleanup=function(){e.internalClearTimeouts()};else{var t=function(){e.isMouseDown=!0},n=function(t){e.isMouseDown=!1,!Dr(t.target,[e._rootNode,e._menuNode],e.props.environment)&&e.getState().isOpen&&e.reset({type:qn},function(){return e.props.onOuterClick(e.getStateAndHelpers())})},r=function(){e.isTouchMove=!1},i=function(){e.isTouchMove=!0},a=function(t){var n=Dr(t.target,[e._rootNode,e._menuNode],e.props.environment,!1);!e.isTouchMove&&!n&&e.getState().isOpen&&e.reset({type:cr},function(){return e.props.onOuterClick(e.getStateAndHelpers())})},o=this.props.environment;o.addEventListener(`mousedown`,t),o.addEventListener(`mouseup`,n),o.addEventListener(`touchstart`,r),o.addEventListener(`touchmove`,i),o.addEventListener(`touchend`,a),this.cleanup=function(){e.internalClearTimeouts(),e.updateStatus.cancel(),o.removeEventListener(`mousedown`,t),o.removeEventListener(`mouseup`,n),o.removeEventListener(`touchstart`,r),o.removeEventListener(`touchmove`,i),o.removeEventListener(`touchend`,a)}}},n.shouldScroll=function(e,t){var n=(this.props.highlightedIndex===void 0?this.getState():this.props).highlightedIndex,r=(t.highlightedIndex===void 0?e:t).highlightedIndex;return n&&this.getState().isOpen&&!e.isOpen||n!==r},n.componentDidUpdate=function(e,t){process.env.NODE_ENV!==`production`&&(Er(this.state,e,this.props),this.getMenuProps.called&&!this.getMenuProps.suppressRefError&&Wr(this._menuNode,this.getMenuProps)),this.props.selectedItem!==void 0&&this.props.selectedItemChanged(e.selectedItem,this.props.selectedItem)&&this.internalSetState({type:sr,inputValue:this.props.itemToString(this.props.selectedItem)}),!this.avoidScrolling&&this.shouldScroll(t,e)&&this.scrollHighlightedItemIntoView(),this.updateStatus()},n.componentWillUnmount=function(){this.cleanup()},n.render=function(){var e=jr(this.props.children,yr);this.clearItems(),this.getRootProps.called=!1,this.getRootProps.refKey=void 0,this.getRootProps.suppressRefError=void 0,this.getMenuProps.called=!1,this.getMenuProps.refKey=void 0,this.getMenuProps.suppressRefError=void 0,this.getLabelProps.called=!1,this.getInputProps.called=!1;var t=jr(e(this.getStateAndHelpers()));if(!t)return null;if(this.getRootProps.called||this.props.suppressRefError)return process.env.NODE_ENV!==`production`&&!this.getRootProps.suppressRefError&&!this.props.suppressRefError&&Gr(t,this.getRootProps),t;if(Mr(t))return(0,f.cloneElement)(t,this.getRootProps(Nr(t)));if(process.env.NODE_ENV!==`production`)throw Error(`downshift: If you return a non-DOM element, you must apply the getRootProps function`)},t}(f.Component);return e.defaultProps={defaultHighlightedIndex:null,defaultIsOpen:!1,getA11yStatusMessage:Ar,itemToString:function(e){return e==null?``:(process.env.NODE_ENV!==`production`&&Lr(e)&&!e.hasOwnProperty(`toString`)&&console.warn("downshift: An object was passed to the default implementation of `itemToString`. You should probably provide your own `itemToString` implementation. Please refer to the `itemToString` API documentation.",`The object that was passed:`,e),String(e))},onStateChange:yr,onInputValueChange:yr,onUserAction:yr,onChange:yr,onSelect:yr,onOuterClick:yr,selectedItemChanged:function(e,t){return e!==t},environment:typeof window>`u`?void 0:window,stateReducer:function(e,t){return t},suppressRefError:!1,scrollIntoView:Sr},e.stateChangeTypes=lr,e}();process.env.NODE_ENV!==`production`&&(Ur.propTypes={children:S.default.func,defaultHighlightedIndex:S.default.number,defaultIsOpen:S.default.bool,initialHighlightedIndex:S.default.number,initialSelectedItem:S.default.any,initialInputValue:S.default.string,initialIsOpen:S.default.bool,getA11yStatusMessage:S.default.func,itemToString:S.default.func,onChange:S.default.func,onSelect:S.default.func,onStateChange:S.default.func,onInputValueChange:S.default.func,onUserAction:S.default.func,onOuterClick:S.default.func,selectedItemChanged:S.default.func,stateReducer:S.default.func,itemCount:S.default.number,id:S.default.string,environment:S.default.shape({addEventListener:S.default.func.isRequired,removeEventListener:S.default.func.isRequired,document:S.default.shape({createElement:S.default.func.isRequired,getElementById:S.default.func.isRequired,activeElement:S.default.any.isRequired,body:S.default.any.isRequired}).isRequired,Node:S.default.func.isRequired}),suppressRefError:S.default.bool,scrollIntoView:S.default.func,selectedItem:S.default.any,isOpen:S.default.bool,inputValue:S.default.string,highlightedIndex:S.default.number,labelId:S.default.string,inputId:S.default.string,menuId:S.default.string,getItemId:S.default.func});function Wr(e,t){var n=t.refKey;e||console.error(`downshift: The ref prop "`+n+`" from getMenuProps was not applied correctly on your menu element.`)}function Gr(e,t){var n=t.refKey,r=n!==`ref`,i=!Mr(e);i&&!r&&!(0,zn.isForwardRef)(e)?console.error(`downshift: You returned a non-DOM element. You must specify a refKey in getRootProps`):!i&&r&&console.error(`downshift: You returned a DOM element. You should not specify a refKey in getRootProps. You specified "`+n+`"`),!(0,zn.isForwardRef)(e)&&!Nr(e)[n]&&console.error(`downshift: You must apply the ref prop "`+n+`" from getRootProps onto your root element.`)}function Kr(e){return``+e.slice(0,1).toUpperCase()+e.slice(1)}function qr(e,t,n,r){for(var i=e.type,a={},o=Object.keys(n),s=0,c=o;s<c.length;s++){var l=c[s];Jr(l,e,t,n,r),r[l]!==n[l]&&(a[l]=r[l])}typeof t.onStateChange==`function`&&Object.keys(a).length&&t.onStateChange(E({type:i},a))}function Jr(e,t,n,r,i){if(i[e]!==r[e]){var a=n[`on`+Kr(e)+`Change`];if(typeof a==`function`){var o=t.type;a(E({type:o},i))}}}function Yr(e,t,n,r){var i=f.useRef({}),a=f.useRef(),o=f.useCallback(function(t,n){a.current=n,t=xr(t,n.props);var r=e(t,n),i=n.props.stateReducer(t,E({},n,{changes:r}));return E({},t,i)},[e]),s=f.useReducer(o,t,n),c=s[0],l=s[1],u=fr(t),d=f.useCallback(function(e){return l(E({},e,{props:u.current}))},[u]),p=a.current;return f.useEffect(function(){var e=xr(i.current,p?.props);p&&!r(e,c)&&qr(p,p.props,e,c),i.current=c},[c,p,r]),[c,d]}function Xr(e,t,n,r){var i=Yr(e,t,n,r),a=i[0],o=i[1];return[xr(a,t),o]}function Zr(e,t,n,r){if(e!==void 0&&t!==void 0)return[e,t];if(e!==void 0){if(n.indexOf(e)<0)throw Error(r);return[e,n.indexOf(e)]}if(t!==void 0){var i=n[t];if(i===void 0)throw Error(r);return[i,t]}throw Error(r)}function Qr(){var e=f.useRef(!0);return f.useEffect(function(){return e.current=!1,function(){e.current=!0}},[]),e.current}var $r={environment:S.default.shape({addEventListener:S.default.func.isRequired,removeEventListener:S.default.func.isRequired,document:S.default.shape({createElement:S.default.func.isRequired,getElementById:S.default.func.isRequired,activeElement:S.default.any.isRequired,body:S.default.any.isRequired}).isRequired,Node:S.default.func.isRequired}),itemToKey:S.default.func,stateReducer:S.default.func};function ei(e,t){return e===void 0?t:e}function ti(e,t,n,r){return e===void 0?t===void 0?n===void 0?r:n:t:e}var ni=mr(function(e,t){_r(e,t)},200);function ri(e,t,n,r){var i=r?.document,a=Qr();f.useEffect(function(){!e||a||!i||ni(e(t),i)},n),f.useEffect(function(){return function(){ni.cancel(),vr(i)}},[i])}var ii=E({},$r,{getA11yStatusMessage:S.default.func,highlightedIndex:S.default.number,defaultHighlightedIndex:S.default.number,initialHighlightedIndex:S.default.number,isOpen:S.default.bool,defaultIsOpen:S.default.bool,initialIsOpen:S.default.bool,selectedItem:S.default.any,initialSelectedItem:S.default.any,defaultSelectedItem:S.default.any,id:S.default.string,labelId:S.default.string,menuId:S.default.string,getItemId:S.default.func,toggleButtonId:S.default.string,onSelectedItemChange:S.default.func,onHighlightedIndexChange:S.default.func,onStateChange:S.default.func,onIsOpenChange:S.default.func,scrollIntoView:S.default.func}),ai={itemToString:function(e){return e?String(e):``},itemToKey:function(e){return e},isItemDisabled:function(e){return!1},stateReducer:function(e,t){return t.changes},scrollIntoView:Sr,environment:typeof window>`u`?void 0:window},oi={highlightedIndex:-1,isOpen:!1,selectedItem:null,inputValue:``},si=E({},f).useId,ci=typeof si==`function`?li:ui;function li(e){var t=e.id,n=e.labelId,r=e.menuId,i=e.getItemId,a=e.toggleButtonId,o=e.inputId,s=`downshift-`+si();return t||(t=s),f.useMemo(function(){return{labelId:n??t+`-label`,menuId:r??t+`-menu`,getItemId:i??function(e){return t+`-item-`+e},toggleButtonId:a??t+`-toggle-button`,inputId:o??t+`-input`}},[i,t,o,n,r,a])}function ui(e){var t=e.id,n=e.labelId,r=e.menuId,i=e.getItemId,a=e.toggleButtonId,o=e.inputId,s=f.useRef(t??`downshift-`+dr()).current;return f.useMemo(function(){return{labelId:n??s+`-label`,menuId:r??s+`-menu`,getItemId:i??function(e){return s+`-item-`+e},toggleButtonId:a??s+`-toggle-button`,inputId:o??s+`-input`}},[i,o,n,r,a,s])}function di(e,t,n){var r=ei(n,oi.highlightedIndex);return e[r]&&t(e[r],r)?-1:r}function fi(e,t,n,r,i,a){return E({isOpen:!1,highlightedIndex:-1},e.length&&i>=0&&E({selectedItem:e[i],isOpen:ei(n,oi.isOpen),highlightedIndex:ei(r,oi.highlightedIndex)},a&&{inputValue:t(e[i])}))}function pi(e,t,n,r,i,a,o,s){return e.length===0?-1:t!==void 0&&o===t&&(t===-1||e[t]!==void 0&&!r(e[t],t))?t:n!==void 0&&(n===-1||e[n]!==void 0&&!r(e[n],n))?n:a?e.findIndex(function(e){return i(a)===i(e)}):s<0&&e[e.length-1]&&!r(e[e.length-1],e.length-1)?e.length-1:s>0&&e[0]&&!r(e[0],0)?0:-1}function mi(e){var t=ti(e.selectedItem,e.initialSelectedItem,e.defaultSelectedItem,oi.selectedItem),n=ti(e.isOpen,e.initialIsOpen,e.defaultIsOpen,oi.isOpen),r=hi(e),i=ti(e.inputValue,e.initialInputValue,e.defaultInputValue,oi.inputValue);return{highlightedIndex:r<0&&t&&n?e.items.findIndex(function(n){return e.itemToKey(n)===e.itemToKey(t)}):r,isOpen:n,selectedItem:t,inputValue:i}}function hi(e){var t=ti(e.highlightedIndex,e.initialHighlightedIndex,e.defaultHighlightedIndex,oi.highlightedIndex);return t>-1&&e.items[t]&&e.isItemDisabled(e.items[t],t)?-1:t}var gi=yr;process.env.NODE_ENV!==`production`&&(gi=function(e){var t=e.props,n=e.state,r=f.useRef(t),i=Qr();f.useEffect(function(){i||(Er(n,r.current,t),r.current=t)},[n,t,i])});function _i(e,t,n){var r=f.useRef({isMouseDown:!1,isTouchMove:!1,isTouchEnd:!1}),i=f.useCallback(function(){return n.map(function(e){return e.current})},[n]);return f.useEffect(function(){if(!e)return yr;function n(){r.current.isTouchEnd=!1,r.current.isMouseDown=!0}function a(n){r.current.isMouseDown=!1,Dr(n.target,i(),e)||t()}function o(){r.current.isTouchEnd=!1,r.current.isTouchMove=!1}function s(){r.current.isTouchMove=!0}function c(n){r.current.isTouchEnd=!0,!r.current.isTouchMove&&!Dr(n.target,i(),e,!1)&&t()}return e.addEventListener(`mousedown`,n),e.addEventListener(`mouseup`,a),e.addEventListener(`touchstart`,o),e.addEventListener(`touchmove`,s),e.addEventListener(`touchend`,c),function(){e.removeEventListener(`mousedown`,n),e.removeEventListener(`mouseup`,a),e.removeEventListener(`touchstart`,o),e.removeEventListener(`touchmove`,s),e.removeEventListener(`touchend`,c)}},[e,i,t]),r.current}var vi=function(){return yr};process.env.NODE_ENV!==`production`&&(vi=function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];var r=f.useRef(t.reduce(function(e,t){return e[t]={},e},{}));return f.useEffect(function(){Object.keys(r.current).forEach(function(e){var t=r.current[e];if(!Object.keys(t).length){console.error(`downshift: You forgot to call the `+e+` getter function on your component / element.`);return}var n=t.suppressRefError,i=t.refKey,a=t.elementRef;n||a!=null&&a.current||console.error(`downshift: The ref prop "`+i+`" from `+e+` was not applied correctly on your element.`)})},[]),f.useCallback(function(e,t,n,i){r.current[e]={suppressRefError:t,refKey:n,elementRef:i}},[])});var yi=typeof window<`u`&&window.document!==void 0&&window.document.createElement!==void 0?f.useLayoutEffect:f.useEffect;function bi(e,t,n,r,i,a){var o=f.useRef(!0);return yi(function(){if(!(t<0||!n||!Object.keys(i).length))if(o.current){var s=i[a(t)];s&&r&&e(s,r)}else o.current=!0},[t]),f.useCallback(function(){o.current=!1},[])}function xi(e,t){return e.isOpen===t.isOpen&&e.inputValue===t.inputValue&&e.highlightedIndex===t.highlightedIndex&&e.selectedItem===t.selectedItem}function Si(e,t,n,r){var i=n.type,a;switch(i){case r.ItemMouseMove:a={highlightedIndex:n.disabled?-1:n.index};break;case r.MenuMouseLeave:a={highlightedIndex:-1};break;case r.ToggleButtonClick:case r.FunctionToggleMenu:a={isOpen:!e.isOpen,highlightedIndex:e.isOpen?-1:pi(t.items,t.initialHighlightedIndex,t.defaultHighlightedIndex,t.isItemDisabled,t.itemToKey,e.selectedItem,e.highlightedIndex,0)};break;case r.FunctionOpenMenu:a={isOpen:!0,highlightedIndex:pi(t.items,t.initialHighlightedIndex,t.defaultHighlightedIndex,t.isItemDisabled,t.itemToKey,e.selectedItem,e.highlightedIndex,0)};break;case r.FunctionCloseMenu:a={isOpen:!1};break;case r.FunctionSetHighlightedIndex:var o=n.highlightedIndex;a={highlightedIndex:t.isItemDisabled(t.items[o],o)?-1:o};break;case r.FunctionSetInputValue:a={inputValue:n.inputValue};break;case r.FunctionReset:a={highlightedIndex:di(t.items,t.isItemDisabled,t.defaultHighlightedIndex),isOpen:ei(t.defaultIsOpen,oi.isOpen),selectedItem:ei(t.defaultSelectedItem,oi.selectedItem),inputValue:ei(t.defaultInputValue,oi.inputValue)};break;default:throw Error(`Reducer called without proper action type.`)}return E({},e,a)}var Ci=E({},ii,{items:S.default.array.isRequired,isItemDisabled:S.default.func});function wi(e){for(var t=e.keysSoFar,n=e.highlightedIndex,r=e.items,i=e.itemToString,a=e.isItemDisabled,o=t.toLowerCase(),s=0;s<r.length;s++){var c=(s+n+ +(t.length<2))%r.length,l=r[c];if(l!==void 0&&i(l).toLowerCase().startsWith(o)&&!a(l,c))return c}return n}var Ti=process.env.NODE_ENV===`production`?0:`__togglebutton_click__`,Ei=process.env.NODE_ENV===`production`?1:`__togglebutton_keydown_arrow_down__`,Di=process.env.NODE_ENV===`production`?2:`__togglebutton_keydown_arrow_up__`,Oi=process.env.NODE_ENV===`production`?3:`__togglebutton_keydown_character__`,ki=process.env.NODE_ENV===`production`?4:`__togglebutton_keydown_escape__`,Ai=process.env.NODE_ENV===`production`?5:`__togglebutton_keydown_home__`,ji=process.env.NODE_ENV===`production`?6:`__togglebutton_keydown_end__`,Mi=process.env.NODE_ENV===`production`?7:`__togglebutton_keydown_enter__`,Ni=process.env.NODE_ENV===`production`?8:`__togglebutton_keydown_space_button__`,Pi=process.env.NODE_ENV===`production`?9:`__togglebutton_keydown_page_up__`,Fi=process.env.NODE_ENV===`production`?10:`__togglebutton_keydown_page_down__`,Ii=process.env.NODE_ENV===`production`?11:`__togglebutton_blur__`,Li=process.env.NODE_ENV===`production`?12:`__menu_mouse_leave__`,Ri=process.env.NODE_ENV===`production`?13:`__item_mouse_move__`,zi=process.env.NODE_ENV===`production`?14:`__item_click__`,Bi=process.env.NODE_ENV===`production`?15:`__function_toggle_menu__`,Vi=process.env.NODE_ENV===`production`?16:`__function_open_menu__`,Hi=process.env.NODE_ENV===`production`?17:`__function_close_menu__`,Ui=process.env.NODE_ENV===`production`?18:`__function_set_highlighted_index__`,Wi=process.env.NODE_ENV===`production`?19:`__function_select_item__`,Gi=process.env.NODE_ENV===`production`?20:`__function_set_input_value__`,Ki=process.env.NODE_ENV===`production`?21:`__function_reset__`,qi=Object.freeze({__proto__:null,FunctionCloseMenu:Hi,FunctionOpenMenu:Vi,FunctionReset:Ki,FunctionSelectItem:Wi,FunctionSetHighlightedIndex:Ui,FunctionSetInputValue:Gi,FunctionToggleMenu:Bi,ItemClick:zi,ItemMouseMove:Ri,MenuMouseLeave:Li,ToggleButtonBlur:Ii,ToggleButtonClick:Ti,ToggleButtonKeyDownArrowDown:Ei,ToggleButtonKeyDownArrowUp:Di,ToggleButtonKeyDownCharacter:Oi,ToggleButtonKeyDownEnd:ji,ToggleButtonKeyDownEnter:Mi,ToggleButtonKeyDownEscape:ki,ToggleButtonKeyDownHome:Ai,ToggleButtonKeyDownPageDown:Fi,ToggleButtonKeyDownPageUp:Pi,ToggleButtonKeyDownSpaceButton:Ni});function Ji(e,t){var n=t.type,r=t.props,i;switch(n){case zi:i={isOpen:ei(r.defaultIsOpen,oi.isOpen),highlightedIndex:di(r.items,r.isItemDisabled,r.defaultHighlightedIndex),selectedItem:r.items[t.index]};break;case Oi:var a=t.key,o=``+e.inputValue+a;i={inputValue:o,highlightedIndex:wi({keysSoFar:o,highlightedIndex:!e.isOpen&&e.selectedItem?r.items.findIndex(function(t){return r.itemToKey(t)===r.itemToKey(e.selectedItem)}):e.highlightedIndex,items:r.items,itemToString:r.itemToString,isItemDisabled:r.isItemDisabled}),isOpen:!0};break;case Ei:var s=t.altKey;i={highlightedIndex:e.isOpen?Tr(e.highlightedIndex,1,r.items,r.isItemDisabled):s&&e.selectedItem==null?-1:pi(r.items,r.initialHighlightedIndex,r.defaultHighlightedIndex,r.isItemDisabled,r.itemToKey,e.selectedItem,e.highlightedIndex,1),isOpen:!0};break;case Di:var c=t.altKey;i=e.isOpen&&c?fi(r.items,r.itemToString,r.defaultIsOpen,r.defaultHighlightedIndex,e.highlightedIndex,!1):{highlightedIndex:e.isOpen?Tr(e.highlightedIndex,-1,r.items,r.isItemDisabled):pi(r.items,r.initialHighlightedIndex,r.defaultHighlightedIndex,r.isItemDisabled,r.itemToKey,e.selectedItem,e.highlightedIndex,-1),isOpen:!0};break;case Mi:case Ni:i=fi(r.items,r.itemToString,r.defaultIsOpen,r.defaultHighlightedIndex,e.highlightedIndex,!1);break;case Ai:i={highlightedIndex:wr(0,!1,r.items,r.isItemDisabled),isOpen:!0};break;case ji:i={highlightedIndex:wr(r.items.length-1,!0,r.items,r.isItemDisabled),isOpen:!0};break;case Pi:i={highlightedIndex:Tr(e.highlightedIndex,-10,r.items,r.isItemDisabled)};break;case Fi:i={highlightedIndex:Tr(e.highlightedIndex,10,r.items,r.isItemDisabled)};break;case ki:i={isOpen:!1,highlightedIndex:-1};break;case Ii:i=E({isOpen:!1,highlightedIndex:-1},e.highlightedIndex>=0&&r.items.length&&{selectedItem:r.items[e.highlightedIndex]});break;case Wi:i={selectedItem:t.selectedItem};break;default:return Si(e,r,t,qi)}return E({},e,i)}var Yi=[`onClick`],Xi=[`onMouseLeave`,`refKey`,`ref`,`aria-label`],Zi=[`onBlur`,`onClick`,`onPress`,`onKeyDown`,`refKey`,`ref`],Qi=[`item`,`index`,`onMouseMove`,`onClick`,`onMouseDown`,`onPress`,`refKey`,`disabled`,`ref`];$i.stateChangeTypes=qi;function $i(e){e===void 0&&(e={}),br(e,$i,Ci);var t=E({},ai,e),n=t.scrollIntoView,r=t.environment,i=t.getA11yStatusMessage,a=Xr(Ji,t,mi,xi),o=a[0],s=a[1],c=o.isOpen,l=o.highlightedIndex,u=o.selectedItem,d=o.inputValue,p=(0,f.useRef)(null),m=(0,f.useRef)(null),h=(0,f.useRef)({}),g=(0,f.useRef)(null),_=ci(t),v=fr({state:o,props:t});ri(i,o,[c,l,u,d],r);var y=bi(n,l,c,m.current,h.current,_.getItemId);(0,f.useEffect)(function(){return g.current=mr(function(e){e({type:Gi,inputValue:``})},500),function(){var e;(e=g.current)==null||e.cancel()}},[]),(0,f.useEffect)(function(){d&&(g.current==null||g.current(s))},[s,d]),gi({props:t,state:o}),(0,f.useEffect)(function(){ti(t.isOpen,t.initialIsOpen,t.defaultIsOpen,oi.isOpen)&&p.current&&p.current.focus()},[]);var b=_i(r,(0,f.useCallback)(function(){v.current.state.isOpen&&s({type:Ii})},[s,v]),(0,f.useMemo)(function(){return[m,p]},[])),x=vi(`getMenuProps`,`getToggleButtonProps`);(0,f.useEffect)(function(){c||(h.current={})},[c]);var S=(0,f.useMemo)(function(){return{ArrowDown:function(e){e.preventDefault(),s({type:Ei,altKey:e.altKey})},ArrowUp:function(e){e.preventDefault(),s({type:Di,altKey:e.altKey})},Home:function(e){e.preventDefault(),s({type:Ai})},End:function(e){e.preventDefault(),s({type:ji})},Escape:function(){v.current.state.isOpen&&s({type:ki})},Enter:function(e){e.preventDefault(),s({type:v.current.state.isOpen?Mi:Ti})},PageUp:function(e){v.current.state.isOpen&&(e.preventDefault(),s({type:Pi}))},PageDown:function(e){v.current.state.isOpen&&(e.preventDefault(),s({type:Fi}))}," ":function(e){e.preventDefault();var t=v.current.state;if(!t.isOpen){s({type:Ti});return}t.inputValue?s({type:Oi,key:` `}):s({type:Ni})}}},[s,v]),C=(0,f.useCallback)(function(e){var t=e??{},n=t.onClick,r=T(t,Yi);return E({id:_.labelId,htmlFor:_.toggleButtonId,onClick:U(n,function(){var e;(e=p.current)==null||e.focus()})},r)},[_]),w=(0,f.useCallback)(function(e,t){var n,r=e??{},i=r.onMouseLeave,a=r.refKey,o=a===void 0?`ref`:a,c=r.ref,l=r[`aria-label`],u=T(r,Xi),d=(t??{}).suppressRefError;return x(`getMenuProps`,d===void 0?!1:d,o,m),E((n={},n[o]=pr(c,function(e){m.current=e}),n.id=_.menuId,n.role=`listbox`,n[`aria-label`]=l,n[`aria-labelledby`]=l?void 0:``+_.labelId,n.onMouseLeave=U(i,function(){s({type:Li})}),n),u)},[s,x,_]),D=(0,f.useCallback)(function(e,t){var n,r=e??{},i=r.onBlur,a=r.onClick;r.onPress;var o=r.onKeyDown,c=r.refKey,l=c===void 0?`ref`:c,u=r.ref,d=T(r,Zi),f=(t??{}).suppressRefError,m=f===void 0?!1:f,h=v.current.state,g=function(){s({type:Ti})},y=function(){h.isOpen&&!b.isMouseDown&&s({type:Ii})},C=function(e){var t=Cr(e);t&&t in S?S[t](e):/^\S{1}$/.test(t)&&s({type:Oi,key:t})},w=E((n={},n[l]=pr(u,function(e){p.current=e}),n[`aria-activedescendant`]=h.isOpen&&h.highlightedIndex>-1?_.getItemId(h.highlightedIndex):``,n[`aria-controls`]=_.menuId,n[`aria-expanded`]=v.current.state.isOpen,n[`aria-haspopup`]=`listbox`,n[`aria-labelledby`]=d[`aria-label`]?void 0:``+_.labelId,n.id=_.toggleButtonId,n.role=`combobox`,n.tabIndex=0,n.onBlur=U(i,y),n),d);return d.disabled||Object.assign(w,{onClick:U(a,g),onKeyDown:U(o,C)}),x(`getToggleButtonProps`,m,l,p),w},[s,_,v,b,x,S]),O=(0,f.useCallback)(function(e){var t,n=e??{},r=n.item,i=n.index,a=n.onMouseMove,o=n.onClick,c=n.onMouseDown;n.onPress;var l=n.refKey,u=l===void 0?`ref`:l,d=n.disabled,f=n.ref,p=T(n,Qi);d!==void 0&&console.warn(`Passing "disabled" as an argument to getItemProps is not supported anymore. Please use the isItemDisabled prop from useSelect.`);var m=v.current,g=m.state,x=m.props,S=Zr(r,i,x.items,`Pass either item or index to getItemProps!`),C=S[0],w=S[1],D=x.isItemDisabled(C,w),O=function(){b.isTouchEnd||w===g.highlightedIndex||(y(),s({type:Ri,index:w,disabled:D}))},k=function(){s({type:zi,index:w})},A=E((t={},t[u]=pr(f,function(e){e&&(h.current[_.getItemId(w)]=e)}),t[`aria-disabled`]=D,t[`aria-selected`]=C===g.selectedItem,t.id=_.getItemId(w),t.role=`option`,t.onMouseMove=U(a,O),t.onMouseDown=U(c,function(e){return e.preventDefault()}),t),p);return D||Object.assign(A,{onClick:U(o,k)}),A},[v,_,b,y,s]),k=(0,f.useCallback)(function(){s({type:Bi})},[s]),A=(0,f.useCallback)(function(){s({type:Hi})},[s]);return{getToggleButtonProps:D,getLabelProps:C,getMenuProps:w,getItemProps:O,toggleMenu:k,openMenu:(0,f.useCallback)(function(){s({type:Vi})},[s]),closeMenu:A,setHighlightedIndex:(0,f.useCallback)(function(e){s({type:Ui,highlightedIndex:e})},[s]),selectItem:(0,f.useCallback)(function(e){s({type:Wi,selectedItem:e})},[s]),reset:(0,f.useCallback)(function(){s({type:Ki})},[s]),setInputValue:(0,f.useCallback)(function(e){s({type:Gi,inputValue:e})},[s]),highlightedIndex:l,isOpen:c,selectedItem:u,inputValue:d}}function ea(e){var t=mi(e),n=t.selectedItem,r=t.inputValue;return r===``&&n&&e.defaultInputValue===void 0&&e.initialInputValue===void 0&&e.inputValue===void 0&&(r=e.itemToString(n)),E({},t,{inputValue:r})}var ta=process.env.NODE_ENV===`production`?0:`__input_keydown_arrow_down__`,na=process.env.NODE_ENV===`production`?1:`__input_keydown_arrow_up__`,ra=process.env.NODE_ENV===`production`?2:`__input_keydown_escape__`,ia=process.env.NODE_ENV===`production`?3:`__input_keydown_home__`,aa=process.env.NODE_ENV===`production`?4:`__input_keydown_end__`,oa=process.env.NODE_ENV===`production`?5:`__input_keydown_page_up__`,sa=process.env.NODE_ENV===`production`?6:`__input_keydown_page_down__`,ca=process.env.NODE_ENV===`production`?7:`__input_keydown_enter__`,la=process.env.NODE_ENV===`production`?8:`__input_change__`,ua=process.env.NODE_ENV===`production`?9:`__input_blur__`,da=process.env.NODE_ENV===`production`?10:`__input_click__`,fa=process.env.NODE_ENV===`production`?11:`__menu_mouse_leave__`,pa=process.env.NODE_ENV===`production`?12:`__item_mouse_move__`,ma=process.env.NODE_ENV===`production`?13:`__item_click__`,ha=process.env.NODE_ENV===`production`?14:`__togglebutton_click__`,ga=process.env.NODE_ENV===`production`?15:`__function_toggle_menu__`,_a=process.env.NODE_ENV===`production`?16:`__function_open_menu__`,va=process.env.NODE_ENV===`production`?17:`__function_close_menu__`,ya=process.env.NODE_ENV===`production`?18:`__function_set_highlighted_index__`,ba=process.env.NODE_ENV===`production`?19:`__function_select_item__`,xa=process.env.NODE_ENV===`production`?20:`__function_set_input_value__`,Sa=process.env.NODE_ENV===`production`?21:`__function_reset__`,Ca=process.env.NODE_ENV===`production`?22:`__controlled_prop_updated_selected_item__`,wa=Object.freeze({__proto__:null,ControlledPropUpdatedSelectedItem:Ca,FunctionCloseMenu:va,FunctionOpenMenu:_a,FunctionReset:Sa,FunctionSelectItem:ba,FunctionSetHighlightedIndex:ya,FunctionSetInputValue:xa,FunctionToggleMenu:ga,InputBlur:ua,InputChange:la,InputClick:da,InputKeyDownArrowDown:ta,InputKeyDownArrowUp:na,InputKeyDownEnd:aa,InputKeyDownEnter:ca,InputKeyDownEscape:ra,InputKeyDownHome:ia,InputKeyDownPageDown:sa,InputKeyDownPageUp:oa,ItemClick:ma,ItemMouseMove:pa,MenuMouseLeave:fa,ToggleButtonClick:ha});function Ta(e,t,n,r){var i=(0,f.useRef)(null),a=Yr(e,t,n,r),o=a[0],s=a[1],c=Qr();return(0,f.useEffect)(function(){t.selectedItem!==void 0&&(c||t.itemToKey(t.selectedItem)!==t.itemToKey(i.current)&&s({type:Ca,inputValue:t.itemToString(t.selectedItem)}),i.current=o.selectedItem===i.current?t.selectedItem:o.selectedItem)},[o.selectedItem,t.selectedItem]),[xr(o,t),s]}var Ea=E({},ii,{items:S.default.array.isRequired,isItemDisabled:S.default.func,inputValue:S.default.string,defaultInputValue:S.default.string,initialInputValue:S.default.string,inputId:S.default.string,onInputValueChange:S.default.func});function Da(e,t){var n=t.type,r=t.props,i;switch(n){case ma:i={isOpen:ei(r.defaultIsOpen,oi.isOpen),highlightedIndex:di(r.items,r.isItemDisabled,r.defaultHighlightedIndex),selectedItem:r.items[t.index],inputValue:r.itemToString(r.items[t.index])};break;case ta:i=e.isOpen?{highlightedIndex:Tr(e.highlightedIndex,1,r.items,r.isItemDisabled,!0)}:{highlightedIndex:t.altKey&&e.selectedItem==null?-1:pi(r.items,r.initialHighlightedIndex,r.defaultHighlightedIndex,r.isItemDisabled,r.itemToKey,e.selectedItem,e.highlightedIndex,1),isOpen:r.items.length>=0};break;case na:i=e.isOpen?t.altKey?fi(r.items,r.itemToString,r.defaultIsOpen,r.defaultHighlightedIndex,e.highlightedIndex,!0):{highlightedIndex:Tr(e.highlightedIndex,-1,r.items,r.isItemDisabled,!0)}:{highlightedIndex:pi(r.items,r.initialHighlightedIndex,r.defaultHighlightedIndex,r.isItemDisabled,r.itemToKey,e.selectedItem,e.highlightedIndex,-1),isOpen:r.items.length>=0};break;case ca:i=fi(r.items,r.itemToString,r.defaultIsOpen,r.defaultHighlightedIndex,e.highlightedIndex,!0);break;case ra:i=E({isOpen:!1,highlightedIndex:-1},!e.isOpen&&{selectedItem:null,inputValue:``});break;case oa:i={highlightedIndex:Tr(e.highlightedIndex,-10,r.items,r.isItemDisabled,!0)};break;case sa:i={highlightedIndex:Tr(e.highlightedIndex,10,r.items,r.isItemDisabled,!0)};break;case ia:i={highlightedIndex:wr(0,!1,r.items,r.isItemDisabled)};break;case aa:i={highlightedIndex:wr(r.items.length-1,!0,r.items,r.isItemDisabled)};break;case ua:i=E({isOpen:!1,highlightedIndex:-1},e.highlightedIndex>=0&&r.items.length&&t.selectItem&&{selectedItem:r.items[e.highlightedIndex],inputValue:r.itemToString(r.items[e.highlightedIndex])});break;case la:i={isOpen:!0,highlightedIndex:di(r.items,r.isItemDisabled,r.defaultHighlightedIndex),inputValue:t.inputValue};break;case da:i={isOpen:!e.isOpen,highlightedIndex:e.isOpen?-1:pi(r.items,r.initialHighlightedIndex,r.defaultHighlightedIndex,r.isItemDisabled,r.itemToKey,e.selectedItem,e.highlightedIndex,0)};break;case ba:i={selectedItem:t.selectedItem,inputValue:r.itemToString(t.selectedItem)};break;case Ca:i={inputValue:t.inputValue};break;default:return Si(e,r,t,wa)}return E({},e,i)}var Oa=[`onMouseLeave`,`refKey`,`ref`,`aria-label`],ka=[`item`,`index`,`refKey`,`ref`,`onMouseMove`,`onMouseDown`,`onClick`,`onPress`,`disabled`],Aa=[`onClick`,`onPress`,`refKey`,`ref`],ja=[`aria-label`,`onKeyDown`,`onChange`,`onInput`,`onBlur`,`onChangeText`,`onClick`,`refKey`,`ref`];Ma.stateChangeTypes=wa;function Ma(e){e===void 0&&(e={}),br(e,Ma,Ea);var t=E({},ai,e),n=t.items,r=t.scrollIntoView,i=t.environment,a=t.getA11yStatusMessage,o=Ta(Da,t,ea,xi),s=o[0],c=o[1],l=s.isOpen,u=s.highlightedIndex,d=s.selectedItem,p=s.inputValue,m=(0,f.useRef)(null),h=(0,f.useRef)({}),g=(0,f.useRef)(null),_=(0,f.useRef)(null),v=Qr(),y=ci(t),b=(0,f.useRef)(),x=fr({state:s,props:t});ri(a,s,[l,u,d,p],i);var S=bi(r,u,l,m.current,h.current,y.getItemId);gi({state:s,props:t}),(0,f.useEffect)(function(){ti(t.isOpen,t.initialIsOpen,t.defaultIsOpen,oi.isOpen)&&g.current&&g.current.focus()},[]),(0,f.useEffect)(function(){v||(b.current=n.length)});var C=_i(i,(0,f.useCallback)(function(){x.current.state.isOpen&&c({type:ua})},[c,x]),(0,f.useMemo)(function(){return[m,_,g]},[])),w=vi(`getInputProps`,`getMenuProps`);(0,f.useEffect)(function(){l||(h.current={})},[l]),(0,f.useEffect)(function(){var e;!l||!(i!=null&&i.document)||!((e=g.current)!=null&&e.focus)||i.document.activeElement!==g.current&&g.current.focus()},[l,i]);var D=(0,f.useMemo)(function(){return{ArrowDown:function(e){e.preventDefault(),c({type:ta,altKey:e.altKey})},ArrowUp:function(e){e.preventDefault(),c({type:na,altKey:e.altKey})},Home:function(e){x.current.state.isOpen&&(e.preventDefault(),c({type:ia}))},End:function(e){x.current.state.isOpen&&(e.preventDefault(),c({type:aa}))},Escape:function(e){var t=x.current.state;(t.isOpen||t.inputValue||t.selectedItem||t.highlightedIndex>-1)&&(e.preventDefault(),c({type:ra}))},Enter:function(e){!x.current.state.isOpen||e.which===229||(e.preventDefault(),c({type:ca}))},PageUp:function(e){x.current.state.isOpen&&(e.preventDefault(),c({type:oa}))},PageDown:function(e){x.current.state.isOpen&&(e.preventDefault(),c({type:sa}))}}},[c,x]),O=(0,f.useCallback)(function(e){return E({id:y.labelId,htmlFor:y.inputId},e)},[y]),k=(0,f.useCallback)(function(e,t){var n,r=e??{},i=r.onMouseLeave,a=r.refKey,o=a===void 0?`ref`:a,s=r.ref,l=r[`aria-label`],u=T(r,Oa),d=(t??{}).suppressRefError;return w(`getMenuProps`,d===void 0?!1:d,o,m),E((n={},n[o]=pr(s,function(e){m.current=e}),n.id=y.menuId,n.role=`listbox`,n[`aria-label`]=l,n[`aria-labelledby`]=l?void 0:``+y.labelId,n.onMouseLeave=U(i,function(){c({type:fa})}),n),u)},[c,w,y]),A=(0,f.useCallback)(function(e){var t,n,r=e??{},i=r.item,a=r.index,o=r.refKey,s=o===void 0?`ref`:o,l=r.ref,u=r.onMouseMove,d=r.onMouseDown,f=r.onClick;r.onPress;var p=r.disabled,m=T(r,ka);p!==void 0&&console.warn(`Passing "disabled" as an argument to getItemProps is not supported anymore. Please use the isItemDisabled prop from useCombobox.`);var g=x.current,_=g.props,v=g.state,b=Zr(i,a,_.items,`Pass either item or index to getItemProps!`),w=b[0],D=b[1],O=_.isItemDisabled(w,D),k=`onClick`,A=f;return E((t={},t[s]=pr(l,function(e){e&&(h.current[y.getItemId(D)]=e)}),t[`aria-disabled`]=O,t[`aria-selected`]=D===v.highlightedIndex,t.id=y.getItemId(D),t.role=`option`,t),!O&&(n={},n[k]=U(A,function(){c({type:ma,index:D})}),n),{onMouseMove:U(u,function(){C.isTouchEnd||D===v.highlightedIndex||(S(),c({type:pa,index:D,disabled:O}))}),onMouseDown:U(d,function(e){return e.preventDefault()})},m)},[c,y,x,C,S]),j=(0,f.useCallback)(function(e){var t,n=e??{},r=n.onClick;n.onPress;var i=n.refKey,a=i===void 0?`ref`:i,o=n.ref,s=T(n,Aa),l=x.current.state;return E((t={},t[a]=pr(o,function(e){_.current=e}),t[`aria-controls`]=y.menuId,t[`aria-expanded`]=l.isOpen,t.id=y.toggleButtonId,t.tabIndex=-1,t),!s.disabled&&E({},{onClick:U(r,function(){c({type:ha})})}),s)},[c,x,y]),M=(0,f.useCallback)(function(e,t){var n,r=e??{},a=r[`aria-label`],o=r.onKeyDown,s=r.onChange,l=r.onInput,u=r.onBlur;r.onChangeText;var d=r.onClick,f=r.refKey,p=f===void 0?`ref`:f,m=r.ref,h=T(r,ja),_=(t??{}).suppressRefError;w(`getInputProps`,_===void 0?!1:_,p,g);var v=x.current.state,b=function(e){var t=Cr(e);t&&t in D&&D[t](e)},S=function(e){c({type:la,inputValue:e.target.value})},O=function(e){i!=null&&i.document&&v.isOpen&&!C.isMouseDown&&c({type:ua,selectItem:!(e.relatedTarget===null&&i.document.activeElement!==i.document.body)})},k=function(){c({type:da})},A=`onChange`,j={};if(!h.disabled){var M;j=(M={},M[A]=U(s,l,S),M.onKeyDown=U(o,b),M.onBlur=U(u,O),M.onClick=U(d,k),M)}return E((n={},n[p]=pr(m,function(e){g.current=e}),n[`aria-activedescendant`]=v.isOpen&&v.highlightedIndex>-1?y.getItemId(v.highlightedIndex):``,n[`aria-autocomplete`]=`list`,n[`aria-controls`]=y.menuId,n[`aria-expanded`]=v.isOpen,n[`aria-labelledby`]=a?void 0:y.labelId,n[`aria-label`]=a,n.autoComplete=`off`,n.id=y.inputId,n.role=`combobox`,n.value=v.inputValue,n),j,h)},[c,y,i,D,x,C,w]),N=(0,f.useCallback)(function(){c({type:ga})},[c]),P=(0,f.useCallback)(function(){c({type:va})},[c]),F=(0,f.useCallback)(function(){c({type:_a})},[c]),I=(0,f.useCallback)(function(e){c({type:ya,highlightedIndex:e})},[c]),L=(0,f.useCallback)(function(e){c({type:ba,selectedItem:e})},[c]);return{getItemProps:A,getLabelProps:O,getMenuProps:k,getInputProps:M,getToggleButtonProps:j,toggleMenu:N,openMenu:F,closeMenu:P,setHighlightedIndex:I,setInputValue:(0,f.useCallback)(function(e){c({type:xa,inputValue:e})},[c]),selectItem:L,reset:(0,f.useCallback)(function(){c({type:Sa})},[c]),highlightedIndex:u,isOpen:l,selectedItem:d,inputValue:p}}var Na={activeIndex:-1,selectedItems:[]};function Pa(e){return{activeIndex:ti(e.activeIndex,e.initialActiveIndex,e.defaultActiveIndex,Na.activeIndex),selectedItems:ti(e.selectedItems,e.initialSelectedItems,e.defaultSelectedItems,Na.selectedItems)}}function Fa(e){if(e.shiftKey||e.metaKey||e.ctrlKey||e.altKey)return!1;var t=e.target;return!(t instanceof HTMLInputElement&&t.value!==``&&(t.selectionStart!==0||t.selectionEnd!==0))}function Ia(e,t){return e.selectedItems===t.selectedItems&&e.activeIndex===t.activeIndex}var La={stateReducer:ii.stateReducer,itemToKey:ii.itemToKey,environment:ii.environment,selectedItems:S.default.array,initialSelectedItems:S.default.array,defaultSelectedItems:S.default.array,getA11yStatusMessage:S.default.func,activeIndex:S.default.number,initialActiveIndex:S.default.number,defaultActiveIndex:S.default.number,onActiveIndexChange:S.default.func,onSelectedItemsChange:S.default.func,keyNavigationNext:S.default.string,keyNavigationPrevious:S.default.string},Ra={itemToKey:ai.itemToKey,stateReducer:ai.stateReducer,environment:ai.environment,keyNavigationNext:`ArrowRight`,keyNavigationPrevious:`ArrowLeft`},za=yr;process.env.NODE_ENV!==`production`&&(za=function(e,t){S.default.checkPropTypes(La,e,`prop`,t.name)});var Ba=process.env.NODE_ENV===`production`?0:`__selected_item_click__`,Va=process.env.NODE_ENV===`production`?1:`__selected_item_keydown_delete__`,Ha=process.env.NODE_ENV===`production`?2:`__selected_item_keydown_backspace__`,Ua=process.env.NODE_ENV===`production`?3:`__selected_item_keydown_navigation_next__`,Wa=process.env.NODE_ENV===`production`?4:`__selected_item_keydown_navigation_previous__`,Ga=process.env.NODE_ENV===`production`?5:`__dropdown_keydown_navigation_previous__`,Ka=process.env.NODE_ENV===`production`?6:`__dropdown_keydown_backspace__`,qa=process.env.NODE_ENV===`production`?7:`__dropdown_click__`,Ja=process.env.NODE_ENV===`production`?8:`__function_add_selected_item__`,Ya=process.env.NODE_ENV===`production`?9:`__function_remove_selected_item__`,Xa=process.env.NODE_ENV===`production`?10:`__function_set_selected_items__`,Za=process.env.NODE_ENV===`production`?11:`__function_set_active_index__`,Qa=process.env.NODE_ENV===`production`?12:`__function_reset__`,$a=Object.freeze({__proto__:null,DropdownClick:qa,DropdownKeyDownBackspace:Ka,DropdownKeyDownNavigationPrevious:Ga,FunctionAddSelectedItem:Ja,FunctionRemoveSelectedItem:Ya,FunctionReset:Qa,FunctionSetActiveIndex:Za,FunctionSetSelectedItems:Xa,SelectedItemClick:Ba,SelectedItemKeyDownBackspace:Ha,SelectedItemKeyDownDelete:Va,SelectedItemKeyDownNavigationNext:Ua,SelectedItemKeyDownNavigationPrevious:Wa});function eo(e,t){var n=t.type,r=t.index,i=t.selectedItem,a=t.props,o=e.activeIndex,s=e.selectedItems,c;switch(n){case Ba:c={activeIndex:r};break;case Wa:c={activeIndex:o-1<0?0:o-1};break;case Ua:c={activeIndex:o+1>=s.length?-1:o+1};break;case Ha:case Va:if(o<0)break;var l=o;s.length===1?l=-1:o===s.length-1&&(l=s.length-2),c=E({selectedItems:[].concat(s.slice(0,o),s.slice(o+1))},{activeIndex:l});break;case Ga:c={activeIndex:s.length-1};break;case Ka:c={selectedItems:s.slice(0,s.length-1)};break;case Ja:c={selectedItems:[].concat(s,[i])};break;case qa:c={activeIndex:-1};break;case Ya:var u=o,d=s.findIndex(function(e){return a.itemToKey(e)===a.itemToKey(i)});if(d<0)break;s.length===1?u=-1:d===s.length-1&&(u=s.length-2),c={selectedItems:[].concat(s.slice(0,d),s.slice(d+1)),activeIndex:u};break;case Xa:c={selectedItems:t.selectedItems};break;case Za:c={activeIndex:t.activeIndex};break;case Qa:c={activeIndex:ei(a.defaultActiveIndex,Na.activeIndex),selectedItems:ei(a.defaultSelectedItems,Na.selectedItems)};break;default:throw Error(`Reducer called without proper action type.`)}return E({},e,c)}var to=[`refKey`,`ref`,`onClick`,`onKeyDown`,`selectedItem`,`index`],no=[`refKey`,`ref`,`onKeyDown`,`onClick`,`preventKeyAction`];ro.stateChangeTypes=$a;function ro(e){e===void 0&&(e={}),za(e,ro);var t=E({},Ra,e),n=t.getA11yStatusMessage,r=t.environment,i=t.keyNavigationNext,a=t.keyNavigationPrevious,o=Xr(eo,t,Pa,Ia),s=o[0],c=o[1],l=s.activeIndex,u=s.selectedItems,d=Qr(),p=(0,f.useRef)(null),m=(0,f.useRef)();m.current=[];var h=fr({state:s,props:t});ri(n,s,[l,u],r),(0,f.useEffect)(function(){d||(l===-1&&p.current?p.current.focus():m.current[l]&&m.current[l].focus())},[l]),gi({props:t,state:s});var g=vi(`getDropdownProps`),_=(0,f.useMemo)(function(){var e;return e={},e[a]=function(){c({type:Wa})},e[i]=function(){c({type:Ua})},e.Delete=function(){c({type:Va})},e.Backspace=function(){c({type:Ha})},e},[c,i,a]),v=(0,f.useMemo)(function(){var e;return e={},e[a]=function(e){Fa(e)&&c({type:Ga})},e.Backspace=function(e){Fa(e)&&c({type:Ka})},e},[c,a]);return{getSelectedItemProps:(0,f.useCallback)(function(e){var t,n=e===void 0?{}:e,r=n.refKey,i=r===void 0?`ref`:r,a=n.ref,o=n.onClick,s=n.onKeyDown,l=n.selectedItem,u=n.index,d=T(n,to),f=h.current.state,p=Zr(l,u,f.selectedItems,`Pass either item or index to getSelectedItemProps!`)[1],g=p>-1&&p===f.activeIndex;return E((t={},t[i]=pr(a,function(e){e&&m.current.push(e)}),t.tabIndex=g?0:-1,t.onClick=U(o,function(){c({type:Ba,index:p})}),t.onKeyDown=U(s,function(e){var t=Cr(e);t&&_[t]&&_[t](e)}),t),d)},[c,h,_]),getDropdownProps:(0,f.useCallback)(function(e,t){var n,r=e===void 0?{}:e,i=r.refKey,a=i===void 0?`ref`:i,o=r.ref,s=r.onKeyDown,l=r.onClick,u=r.preventKeyAction,d=u===void 0?!1:u,f=T(r,no),m=(t===void 0?{}:t).suppressRefError;return g(`getDropdownProps`,m===void 0?!1:m,a,p),E((n={},n[a]=pr(o,function(e){e&&(p.current=e)}),n),!d&&{onKeyDown:U(s,function(e){var t=Cr(e);t&&v[t]&&v[t](e)}),onClick:U(l,function(){c({type:qa})})},f)},[c,v,g]),addSelectedItem:(0,f.useCallback)(function(e){c({type:Ja,selectedItem:e})},[c]),removeSelectedItem:(0,f.useCallback)(function(e){c({type:Ya,selectedItem:e})},[c]),setSelectedItems:(0,f.useCallback)(function(e){c({type:Xa,selectedItems:e})},[c]),setActiveIndex:(0,f.useCallback)(function(e){c({type:Za,activeIndex:e})},[c]),reset:(0,f.useCallback)(function(){c({type:Qa})},[c]),selectedItems:u,activeIndex:l}}var io=process.env.NODE_ENV===`production`?0:`__tag_click__`,ao=process.env.NODE_ENV===`production`?1:`__taggroup_keydown_arrowleft__`,oo=process.env.NODE_ENV===`production`?2:`__taggroup_keydown_arrowright__`,so=process.env.NODE_ENV===`production`?3:`__taggroup_keydown_delete__`,co=process.env.NODE_ENV===`production`?4:`__taggroup_keydown_backspace__`,lo=process.env.NODE_ENV===`production`?5:`__tagremove_click__`,uo=process.env.NODE_ENV===`production`?6:`__function_add_item__`,fo=Object.freeze({__proto__:null,FunctionAddItem:uo,TagClick:io,TagGroupKeyDownArrowLeft:ao,TagGroupKeyDownArrowRight:oo,TagGroupKeyDownBackspace:co,TagGroupKeyDownDelete:so,TagRemoveClick:lo});function po(e,t){var n=t.type,r;switch(n){case io:r={activeIndex:t.index};break;case ao:r={activeIndex:e.activeIndex===0?e.items.length-1:e.activeIndex-1};break;case oo:r={activeIndex:e.activeIndex===e.items.length-1?0:e.activeIndex+1};break;case co:case so:var i=[].concat(e.items.slice(0,e.activeIndex),e.items.slice(e.activeIndex+1)),a=i.length===0?-1:i.length===e.activeIndex?e.activeIndex-1:e.activeIndex;r={items:[].concat(e.items.slice(0,e.activeIndex),e.items.slice(e.activeIndex+1)),activeIndex:a};break;case lo:var o=[].concat(e.items.slice(0,t.index),e.items.slice(t.index+1));r={items:o,activeIndex:o.length===0?-1:o.length===t.index?t.index-1:t.index};break;case uo:var s=[];s=t.index===void 0?[].concat(e.items,[t.item]):[].concat(e.items.slice(0,t.index),[t.item],e.items.slice(t.index));var c=e.activeIndex===-1?s.length-1:e.activeIndex;r={items:s,activeIndex:c};break;default:throw Error(`Invalid useTagGroup reducer action.`)}return E({},e,r)}var mo=E({},f).useId,ho=typeof mo==`function`?go:_o;function go(e){var t=e.id,n=e.tagGroupId,r=e.getTagId,i=`downshift-`+mo();return t||(t=i),f.useMemo(function(){return{tagGroupId:n??t+`-tag-group`,getTagId:r??function(e){return t+`-tag-`+e}}},[r,t,n])}function _o(e){var t=e.id,n=e.getTagId,r=e.tagGroupId,i=f.useRef(t??`downshift-`+dr()).current;return f.useMemo(function(){return{tagGroupId:r??i+`-tag-group`,getTagId:n??function(e){return i+`-tag-`+e}}},[n,i,r])}function vo(e){var t=e.items??e.initialItems??[];return{activeIndex:e.activeIndex??e.initialActiveIndex??(t.length===0?-1:0),items:t}}function yo(e,t){return e.activeIndex===t.activeIndex&&e.items===t.items}var bo=`tag-group-a11y-description`;function xo(e,t){f.useEffect(function(){if(e){var n=e.createElement(`div`);return n.setAttribute(`id`,bo),n.style.display=`none`,n.textContent=t,e.body.appendChild(n),function(){n.remove()}}},[t,e])}function So(e){return E({stateReducer:function(e,t){return t.changes},environment:typeof window>`u`?void 0:window,removeElementDescription:`Press Delete or Backspace to remove tag.`},e)}function Co(e,t,n){var r=f.useRef({}),i=f.useRef(e),a=f.useRef(t);return f.useEffect(function(){if(e!==-1&&i.current!==-1&&e!==i.current||a.current===t+1){var o;(o=r.current[n(e)])==null||o.focus()}i.current=e,a.current=t},[e,n,t]),r}var wo={isItemDisabled:S.default.func},To=[`onKeyDown`],Eo=[`index`,`refKey`,`ref`,`onClick`],Do=[`index`,`onClick`],Oo=function(e){e===void 0&&(e={}),br(e,Oo,wo);var t=So(e),n=Xr(po,t,vo,yo),r=n[0],i=n[1],a=r.activeIndex,o=r.items,s=fr({state:r,props:t}),c=ho({getTagId:t.getTagId,id:t.id,tagGroupId:t.tagGroupId});xo(t.environment?.document,t.removeElementDescription);var l=Co(a,o.length,c.getTagId),u=(0,f.useCallback)(function(e){var t=e??{},n=t.onKeyDown,r=T(t,To);return E({id:c.tagGroupId,"aria-live":`polite`,"aria-atomic":`false`,"aria-relevant":`additions`,role:`listbox`,onKeyDown:U(n,function(e){switch(e.key){case`ArrowLeft`:i({type:ao});break;case`ArrowRight`:i({type:oo});break;case`Delete`:i({type:so});break;case`Backspace`:i({type:co});break}})},r)},[i,c.tagGroupId]),d=(0,f.useCallback)(function(e){var t,n=e.index,r=e.refKey,a=r===void 0?`ref`:r,o=e.ref,u=e.onClick,d=T(e,Eo);if(!Number.isInteger(n)||n<0)throw Error(`Pass correct item index to getTagProps!`);var f=s.current.state,p=function(){i({type:io,index:n})},m=c.getTagId(n);return E((t={"aria-describedby":bo},t[a]=pr(o,function(e){e&&(l.current[m]=e)}),t[`aria-labelledby`]=m,t.role=`option`,t.id=m,t.onClick=U(u,p),t.tabIndex=f.activeIndex===n?0:-1,t),d)},[i,c,s,l]),p=(0,f.useCallback)(function(e){var t=e.index,n=e.onClick,r=T(e,Do);if(!Number.isInteger(t)||t<0)throw Error(`Pass correct item index to getTagRemoveProps!`);var a=function(e){e.stopPropagation(),i({type:lo,index:t})},o=c.getTagId(t),s=o+`-remove`;return E({id:s,tabIndex:-1,"aria-labelledby":s+` `+o,onClick:U(n,a)},r)},[c,i]);return{activeIndex:a,addItem:(0,f.useCallback)(function(e,t){i({type:uo,item:e,index:t})},[i]),getTagGroupProps:u,getTagProps:d,getTagRemoveProps:p,items:o}};Oo.stateChangeTypes=fo;var ko=({errorLine:e,marginTop:n=`xxs`})=>e?t.default.createElement(`div`,{className:`nds-input-error margin--top--${n}`},t.default.createElement(`div`,{className:`fontSize--s margin--right--xxs narmi-icon-x-circle`}),e):null,Ao=({error:e,marginTop:n=`xxs`})=>e?Array.isArray(e)?t.default.createElement(`div`,{className:`nds-input-errorlist`,"aria-live":`polite`},e.map((e,r)=>t.default.createElement(ko,{key:e,errorLine:e,marginTop:r?n:`xxs`}))):t.default.createElement(ko,{errorLine:e,marginTop:n}):null,jo=`bank.loan.logo-remitly.zelle-outline.question.signal.car.check-front.dollar-bill-line.wires.m2m.venmo-logo.face-id.library.profile.hourglass.plane.filter-2.business.profiles.star-filled.car-outline.dining.fingerprint.heart-pulse.paw.receipt.self-care.stroller.security.narmi-fat-security.feed.narmi-feed.activity.airplay.alert-circle.alert-octagon.alert-triangle.align-center.align-justify.align-left.align-right.anchor.aperture.archive.arrow-down.arrow-down-circle.arrow-down-left.arrow-down-right.arrow-left.arrow-left-circle.arrow-right.arrow-right-circle.arrow-up.arrow-up-circle.arrow-up-left.arrow-up-right.arrow-up-down.at-sign.award.bar-chart.bar-chart-2.battery.battery-charging.bell.bell-off.bluetooth.bold.book.book-open.bookmark.box.briefcase.calendar.camera.camera-off.cast.check.check-circle.check-square.chevron-down.chevron-left.chevron-right.chevron-up.chevrons-down.chevrons-left.chevrons-right.chevrons-up.chrome.circle.clipboard.clock.cloud.cloud-drizzle.cloud-lightning.cloud-off.cloud-rain.cloud-snow.code.codepen.codesandbox.coffee.columns.command.compass.copy.corner-down-left.corner-down-right.corner-left-down.corner-left-up.corner-right-down.corner-right-up.corner-up-left.corner-up-right.cpu.credit-card1.crop.crosshair.database.delete.disc.dollar-sign.download.download-cloud.droplet.edit.edit-2.edit-3.external-link.eye.eye-off.facebook.fast-forward.feather.figma.file.file-minus.file-plus.file-text1.film.filter.flag.folder.folder-minus.folder-plus.framer.frown.gift.git-branch.git-commit.git-merge.git-pull-request.github.gitlab.globe.grid.hard-drive.hash.headphones.heart.help-circle.hexagon.home.image.inbox.info.instagram.italic.key.layers.layout.life-buoy.link.link-2.linkedin.list.loader.lock.log-in.log-out.mail.map.map-pin.maximize.maximize-2.meh.menu.message-circle.message-square.mic.mic-off.minimize.minimize-2.minus.minus-circle.minus-square.monitor.moon.more-horizontal.more-vertical.mouse-pointer.move.music.navigation.navigation-2.octagon.package.paperclip.pause.pause-circle.pen-tool.percent.phone.phone-call.phone-forwarded.phone-incoming.phone-missed.phone-off.phone-outgoing.pie-chart.play.play-circle.plus.plus-circle.plus-square.pocket.power.printer.radio.refresh-ccw.refresh-cw.repeat.rewind.rotate-ccw.rotate-cw.rss.save.scissors.search.send.server.settings.share.share-2.shield.shield-off.shopping-bag.shopping-cart.shuffle.sidebar.skip-back.skip-forward.slack.slash.sliders.smartphone.smile.speaker.square.star.stop-circle.sun.sunrise.sunset.tablet.tag.target.terminal.thermometer.thumbs-down.thumbs-up.toggle-left.toggle-right.tool.trash.trash-2.trello.trending-down.trending-up.triangle.truck.tv.twitch.twitter.type.umbrella.underline.unlock.upload.upload-cloud.user.user-check.user-minus.user-plus.user-x.users.video.video-off.voicemail.volume.volume-1.volume-2.volume-x.watch.wifi.wifi-off.wind.x.x-circle.x-octagon.x-square.youtube.zap.zap-off.zoom-in.zoom-out.student.hand-spock.solid-circle.GroupOutlined.LocalAtm.MonetizationOnOutlined.SyncAlt.p2p.check-endorsed.piggy-bank.venmo.folder-open.group.settings-gear.admin-user.transfer-arrows.narmi-transfer.blob.bill.credit-card.admin-user-2.office.file-text.sparkle.filter-3`.split(`.`),Mo=[`http:`,`https:`,`mailto:`,`tel:`],No=e=>{if(e==null)return e;if(typeof e!=`string`)return;let t=e.trim().replace(/[\u0000-\u001F\u007F\s]+/g,``).match(/^([a-zA-Z][a-zA-Z\d+.-]*):/);if(!t)return e;let n=`${t[1].toLowerCase()}:`;return Mo.includes(n)?e:void 0},Po=[`span`,`div`,`ul`,`ol`,`li`,`p`,`nav`,`article`,`section`,`h1`,`h2`,`h3`,`h4`,`h5`,`h6`,`button`,`a`],Fo=({elementType:e=`div`,children:n,...r})=>{let i=Object.prototype.hasOwnProperty.call(r,`href`)?{...r,href:No(r.href)}:r;if(typeof e==`function`||typeof e.type==`function`)return t.default.createElement(e,i,n);let a=`div`;return Po.includes(e)&&(a=e),t.default.createElement(a,i,n)};function Io(){return Io=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Io.apply(null,arguments)}var Lo=({disabled:e=!1,kind:n=`plain`,textSize:r=n===`plain`?`m`:`l`,testId:i=`nds-icon-button`,label:a,name:o,onClick:s=()=>{},type:c,as:l=`button`,...u})=>t.default.createElement(Fo,Io({elementType:l,type:c,onClick:s,className:w([`nds-typography`,`nds-icon-button`,`nds-icon-button--${n}`,`fontSize--${r}`,{"nds-icon-button--disabled":e}]),disabled:e,"aria-label":a,"data-testid":i},u),t.default.createElement(`span`,{"aria-label":o,className:`narmi-icon-${o}`})),Ro=({id:e,label:n,startIconClass:r,endIconClass:i,startContent:a,endContent:o,tailContent:s,showClearButton:c,clearInput:l,disabled:u,multiline:d=!1,decoration:f,error:p,search:m,onClick:h,style:g,renderError:_=!0,children:v,...y})=>{let b=[`nds-input`,u?`disabled`:``,y.multiline?`multiline`:``,p?`error`:``,m?`search`:``].join(` `);return t.default.createElement(`div`,{className:b,onClick:h,style:g},t.default.createElement(`div`,{className:`nds-input-box`},a&&t.default.createElement(`div`,null,a),r&&t.default.createElement(`div`,{className:`nds-input-icon nds-input-icon--faded ${r}`}),t.default.createElement(`div`,{className:`nds-input-column ${!n||r&&!d?`no-label`:``}`},v,f,d?``:t.default.createElement(`label`,{htmlFor:e},n)),i&&t.default.createElement(`div`,{className:`nds-input-icon nds-input-icon--faded ${i}`}),c&&t.default.createElement(Lo,{label:`Clear`,onClick:l,name:`x`,textSize:`l`}),o&&t.default.createElement(`div`,null,o)),t.default.createElement(`div`,{className:`nds-input-subline`},s&&t.default.createElement(`div`,{className:`nds-input-tail margin--top--xxs`},s),_&&t.default.createElement(Ao,{error:p})))};function zo(){return zo=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},zo.apply(null,arguments)}var Bo=t.default.forwardRef((e,n)=>{let{startIcon:r,endIcon:i,startContent:a,endContent:o,showClearButton:s,formatter:c=e=>e,multiline:l=!1,defaultValue:u,onChange:d,onBlur:f,maxLength:p,testId:m,type:h=`text`,error:g,renderError:_=!0,required:v=!1,...y}=e,[b,x]=(0,t.useState)(u||``);function S(e){f&&f(e),x(c(e.target.value))}function C(e){d&&d(e),x(e.target.value)}function w(e){C(e),x(``)}let T=(y?.value||b).length,E=p?t.default.createElement(`div`,{className:`nds-input-character-counter`},T,`/`,p):null,D=g||(p&&b.length>p?`Exceeds character limits.`:void 0);return t.default.createElement(Ro,zo({},e,{error:D,renderError:_,startIconClass:r?`narmi-icon-${r}`:void 0,endIconClass:i?`narmi-icon-${i}`:void 0,startContent:a,endContent:o,showClearButton:s&&b,clearInput:w,tailContent:E}),l?t.default.createElement(`div`,{className:`nds-input-multiline-grid`,"data-textarea-value":b},t.default.createElement(`textarea`,zo({key:`nds-text`,wrap:`soft`,ref:n,value:b,onChange:C,onBlur:S,required:v,placeholder:e.label,"aria-label":e.label,"data-testid":m,"data-error":D},y))):t.default.createElement(`input`,zo({key:`nds-text`,value:b,onChange:C,onBlur:S,ref:n,type:h,required:v,"aria-label":e.label,placeholder:e.label,"data-testid":m,"data-error":D},y)))});Bo.displayName=`TextInput`;var Vo=({shrink:e=!1,as:n=`div`,className:r=``,children:i,testId:a})=>t.default.createElement(Fo,{elementType:n,className:w([r,`nds-row-item`,{"nds-row-item--shrink":e}]),"data-testid":a},i),Ho=(e,t,n)=>{let r={gap:`var(--space-${n})`,alignItems:`flex-start`,justifyContent:t===`center`?t:`flex-${t}`};return n&&n===`none`&&(r.gap=`0`),e!==`top`&&(r.alignItems=e),t===`space-between`&&(r.justifyContent=t),r},W=({alignItems:e=`top`,justifyContent:n=`start`,gapSize:r=`l`,as:i=`div`,className:a=``,children:o,testId:s})=>t.default.createElement(Fo,{elementType:i,className:w([a,`nds-row`]),style:Ho(e,n,r),"data-testid":s},o);W.Item=Vo;function Uo(){return Uo=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Uo.apply(null,arguments)}var Wo=e=>e.props.searchValue||e.props.value||``,Go=(e,t)=>e.filter(e=>Wo(e).toLowerCase().includes(t.toLowerCase())),Ko=({label:e,items:n,selectedItem:r,onChange:i=()=>{},onInputChange:a=()=>{},footerContent:o})=>{let[s,c]=(0,t.useState)(n);(0,t.useEffect)(()=>{c(n)},[c,n]);let{selectedItem:l,highlightedIndex:u,getMenuProps:d,getInputProps:f,getItemProps:p}=Ma({items:s,initialSelectedItem:r,initialInputValue:``,onInputValueChange({inputValue:e}){c(e?.length>0?Go(n,e):n),a(e)},onSelectedItemChange({selectedItem:e}){e&&i(e)},itemToString(e){return Wo(e)}});return t.default.createElement(`div`,{className:w([`nds-autocompleteModal-autocomplete`,`rounded--all`])},t.default.createElement(`div`,{className:`nds-autocompleteModal-input`},t.default.createElement(Bo,Uo({label:e},f()))),t.default.createElement(`ul`,Uo({className:`nds-autocompleteModal-menu list--reset`},d()),s.length===0&&!l&&t.default.createElement(`li`,{className:`nds-autocompleteModal-item padding--x--s padding--y--xs`},`No results found`),s.map((e,n)=>t.default.createElement(`li`,Uo({className:w([`nds-autocompleteModal-item`,`padding--x--s padding--y--xs`,{"nds-autocompleteModal-item--highlighted":u===n}]),key:`${e?.props.value}-${n}`},p({item:e,index:n})),t.default.createElement(W,null,t.default.createElement(W.Item,null,e),l&&l.props.value===e.props.value&&t.default.createElement(W.Item,{as:`span`,shrink:!0},t.default.createElement(`span`,{className:`narmi-icon-check fontSize--xl fontWeight--bold`})))))),o&&t.default.createElement(`div`,{className:`nds-autocompleteModal-footer padding--all--s border--top`},o))},qo=({inputLabel:e,children:n,trigger:r,onChange:i=()=>{},onInputChange:a=()=>{},footerContent:o})=>{let[s,c]=(0,t.useState)(!1),[l,u]=(0,t.useState)(null),d=(0,t.useMemo)(()=>t.default.Children.toArray(n),[n]);return t.default.createElement(In,{isOpen:s,onUserDismiss:()=>{c(!1)},onUserEnable:()=>{c(e=>!e)},alignment:`center`,side:`top`,autoFocus:!0,hasShadow:!1,content:t.default.createElement(`div`,{className:`nds-autocompleteModal-positionedEl`},t.default.createElement(Ko,{items:d,label:e,onChange:e=>{c(!1),u(e),i(e.props.value)},onInputChange:a,footerContent:o,selectedItem:l}))},t.default.createElement(`span`,{style:{cursor:`pointer`}},typeof r==`function`?r(s):r))};qo.Item=C;var Jo=({isOpen:e,children:n,renderSummary:r=()=>void 0,onUserToggle:i=()=>{},testId:a=`nds-accordion`})=>{let[o,s]=(0,t.useState)(e??!1),c=e??o,l=(0,t.useId)(),u=`${l}-button`,d=`${l}-content`;return t.default.createElement(`div`,{className:`nds-accordion`,"data-testid":a},t.default.createElement(`button`,{id:u,className:`nds-accordion-summary-button button--reset`,onClick:()=>{let t=!c;e===void 0&&s(t),i(t)},"aria-expanded":c,"aria-controls":d,type:`button`},r(c)),t.default.createElement(`div`,{id:d,className:`nds-accordion-details`,role:`region`,"aria-hidden":!c,"aria-labelledby":u},n))},Yo=({behavior:e=`exclusive`,children:n,testId:r=`nds-accordionSet`})=>{let[i,a]=(0,t.useState)(null);return t.default.createElement(`div`,{className:`nds-accordionSet`,"data-testid":r},t.default.Children.map(n,(n,r)=>{if(!t.default.isValidElement(n)||n.type!==Jo)return console.warn(`AccordionSet only accepts Accordion children`),null;let o=e===`exclusive`,s=i===r;return t.default.cloneElement(n,{key:n.key??r,...o&&{isOpen:s,onUserToggle:e=>{o&&a(e?r:null),n.props.onUserToggle?.(e)}}})}))},Xo=()=>{},Zo=({isActive:e=!1,isDismissable:n=!0,onUserDismiss:r=Xo,kind:i=`info`,icon:a=null,paddingSize:o=`l`,children:s})=>{let c=Qo(i);return t.default.createElement(`div`,{"aria-live":`polite`},e&&t.default.createElement(`div`,{className:w([`nds-alert`,`nds-alert--${i}`,`rounded--all`,`padding--all--${o}`])},t.default.createElement(W,{gapSize:`s`},t.default.createElement(W.Item,{shrink:!0},t.default.createElement(`span`,{className:`nds-alert-icon narmi-icon-${a||c}`})),t.default.createElement(W.Item,null,s),n&&t.default.createElement(W.Item,{shrink:!0},t.default.createElement(`button`,{className:`nds-alert-close resetButton`,"aria-label":`close`,onClick:r,"data-testid":`nds-alert-close`},t.default.createElement(`span`,{className:`narmi-icon-x`}))))))},Qo=e=>{switch(e){case`success`:return`check`;case`error`:return`alert-circle`;default:return`info`}};l(((e,t)=>{var n=`Expected a function`,r=NaN,i=`[object Symbol]`,a=/^\s+|\s+$/g,o=/^[-+]0x[0-9a-f]+$/i,s=/^0b[01]+$/i,c=/^0o[0-7]+$/i,l=parseInt,u=typeof global==`object`&&global&&global.Object===Object&&global,d=typeof self==`object`&&self&&self.Object===Object&&self,f=u||d||Function(`return this`)(),p=Object.prototype.toString,m=Math.max,h=Math.min,g=function(){return f.Date.now()};function _(e,t,r){var i,a,o,s,c,l,u=0,d=!1,f=!1,p=!0;if(typeof e!=`function`)throw TypeError(n);t=x(t)||0,v(r)&&(d=!!r.leading,f=`maxWait`in r,o=f?m(x(r.maxWait)||0,t):o,p=`trailing`in r?!!r.trailing:p);function _(t){var n=i,r=a;return i=a=void 0,u=t,s=e.apply(r,n),s}function y(e){return u=e,c=setTimeout(C,t),d?_(e):s}function b(e){var n=e-l,r=e-u,i=t-n;return f?h(i,o-r):i}function S(e){var n=e-l,r=e-u;return l===void 0||n>=t||n<0||f&&r>=o}function C(){var e=g();if(S(e))return w(e);c=setTimeout(C,b(e))}function w(e){return c=void 0,p&&i?_(e):(i=a=void 0,s)}function T(){c!==void 0&&clearTimeout(c),u=0,i=l=a=c=void 0}function E(){return c===void 0?s:w(g())}function D(){var e=g(),n=S(e);if(i=arguments,a=this,l=e,n){if(c===void 0)return y(l);if(f)return c=setTimeout(C,t),_(l)}return c===void 0&&(c=setTimeout(C,t)),s}return D.cancel=T,D.flush=E,D}function v(e){var t=typeof e;return!!e&&(t==`object`||t==`function`)}function y(e){return!!e&&typeof e==`object`}function b(e){return typeof e==`symbol`||y(e)&&p.call(e)==i}function x(e){if(typeof e==`number`)return e;if(b(e))return r;if(v(e)){var t=typeof e.valueOf==`function`?e.valueOf():e;e=v(t)?t+``:t}if(typeof e!=`string`)return e===0?e:+e;e=e.replace(a,``);var n=s.test(e);return n||c.test(e)?l(e.slice(2),n?2:8):o.test(e)?r:+e}t.exports=_}))();var $o=typeof window<`u`?f.useLayoutEffect:f.useEffect;function es(e,t,n,r){let i=(0,f.useRef)(t);$o(()=>{i.current=t},[t]),(0,f.useEffect)(()=>{let t=n?.current??window;if(!(t&&t.addEventListener))return;let a=e=>{i.current(e)};return t.addEventListener(e,a,r),()=>{t.removeEventListener(e,a,r)}},[e,n,r])}var ts=typeof window>`u`;function ns(e,{defaultValue:t=!1,initializeWithValue:n=!0}={}){let r=e=>ts?t:window.matchMedia(e).matches,[i,a]=(0,f.useState)(()=>n?r(e):t);function o(){a(r(e))}return $o(()=>{let t=window.matchMedia(e);return o(),t.addListener?t.addListener(o):t.addEventListener(`change`,o),()=>{t.removeListener?t.removeListener(o):t.removeEventListener(`change`,o)}},[e]),i}function rs(e,t,n=`mousedown`,r={}){es(n,n=>{let r=n.target;!r||!r.isConnected||(Array.isArray(e)?e.filter(e=>!!e.current).every(e=>e.current&&!e.current.contains(r)):e.current&&!e.current.contains(r))&&t(n)},void 0,r)}var is=({isOpen:e=!1,onUserDismiss:n=()=>{},renderHeader:r,renderFooter:i,isPortalled:a=!1,children:o,testId:s,trigger:c})=>{let{anchorProps:l,layerProps:u}=Nn({isOpen:e,setIsOpen:n,matchWidth:!1,isPortalled:a,ariaPopupType:`dialog`,alignment:`start`});rs(u.ref,()=>{n()});let d=e=>{e.key===`Escape`&&n()};if((0,t.useEffect)(()=>{if(e)return document.addEventListener(`keydown`,d),()=>{document.removeEventListener(`keydown`,d)}},[e,n]),!e&&!c)return null;let f=c&&t.default.cloneElement(c,{"aria-haspopup":l[`aria-haspopup`],"aria-expanded":l[`aria-expanded`]});return t.default.createElement(t.default.Fragment,null,c&&t.default.createElement(`div`,{ref:l.ref,style:l.style},f),e&&t.default.createElement(`div`,{ref:u.ref,className:`nds-anchoredDialog`,"data-testid":s,style:u.style},t.default.createElement(Sn,{returnFocus:!0,autoFocus:!0,className:`nds-anchoredDialog-inner`},r&&t.default.createElement(`div`,{className:`nds-anchoredDialog-header border--bottom`},r()),t.default.createElement(`div`,{className:`nds-anchoredDialog-content`},o),i&&t.default.createElement(`div`,{className:`nds-anchoredDialog-footer border--top`},i()))))},as=({label:e,size:n=`s`,kind:r=`primary`,initials:i,imgurl:a,linkurl:o})=>{let s=a?{backgroundImage:`url(${a})`,backgroundSize:`cover`}:{},c=!a&&i,l=!a&&!i;return t.default.createElement(Fo,{elementType:o?`a`:`div`,href:o,className:w([`nds-avatar`,`nds-avatar--${n}`,`nds-avatar--${r}`,`alignChild--center--center`]),style:s,"aria-label":e},c&&i,l&&t.default.createElement(`span`,{className:`narmi-icon-user fontSize--heading3`}))},os=({size:e=28,strokeWidth:n=3,color:r=`var(--color-white)`})=>t.default.createElement(`div`,{className:`nds-spinner`,style:{height:e,width:e}},t.default.createElement(`svg`,{xmlns:`http://www.w3.org/2000/svg`,version:`1.1`,xmlnsXlink:`http://www.w3.org/1999/xlink`,height:e,width:e,viewBox:`0 0 ${e} ${e}`},t.default.createElement(`circle`,{fill:`none`,stroke:r,strokeWidth:n,strokeLinecap:`round`,className:`nds-spinner-circle`,cx:`50%`,cy:`50%`,r:`25%`})));function ss(){return ss=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},ss.apply(null,arguments)}var cs=({isLoading:e=!1,disabled:n=!1,kind:r=`primary`,type:i,size:a=`m`,startIcon:o=null,endIcon:s=null,testId:c,children:l,label:u,onClick:d=()=>{},as:f=`button`,ariaLabel:p=null,isFullWidth:m=!1,...h})=>{let g=f===`button`,_=u||l,v=({name:e})=>t.default.createElement(`div`,{className:`alignChild--center--center`},t.default.createElement(`i`,{role:`img`,"aria-label":p||e,className:`narmi-icon-${e}`}));return t.default.createElement(Fo,ss({elementType:f,tabIndex:0,onClick:d,type:i},h,{className:w([`nds-typography`,`nds-button`,`nds-button--${r}`,`nds-button--${a}`,{resetButton:f===`button`,"nds-button--disabled":n,"nds-button--loading":e,"nds-button--fullWidth":m}]),disabled:g&&n||e?!0:void 0,"aria-label":p||_,"data-testid":c||`nds-button`}),t.default.createElement(`div`,{className:`nds-button-content`},e&&t.default.createElement(`div`,{className:`nds-button-spinner`},t.default.createElement(os,{color:r===`primary`?void 0:`var(--color-lightGrey)`})),t.default.createElement(`div`,{style:{visibility:e?`hidden`:`visible`}},t.default.createElement(W,{gapSize:{xs:`xs`,s:`xs`,m:`s`}[a],alignItems:`center`},o&&t.default.createElement(W.Item,{shrink:!0},t.default.createElement(v,{name:o})),t.default.createElement(W.Item,null,t.default.createElement(`span`,{className:`nds-button-label`},_)),s&&t.default.createElement(W.Item,{shrink:!0},t.default.createElement(v,{name:s}))))))};function ls(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function us(e){if(Array.isArray(e))return e}function ds(e,t){var n=e==null?null:typeof Symbol<`u`&&e[Symbol.iterator]||e[`@@iterator`];if(n!=null){var r,i,a,o,s=[],c=!0,l=!1;try{if(a=(n=n.call(e)).next,t!==0)for(;!(c=(r=a.call(n)).done)&&(s.push(r.value),s.length!==t);c=!0);}catch(e){l=!0,i=e}finally{try{if(!c&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(l)throw i}}return s}}function fs(){throw TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
3
|
+
Valid keys: `+JSON.stringify(Object.keys(e),null,` `));var p=f(l,d,o,s,c+`.`+d,i);if(p)return p}return null}return g(t)}function A(t){switch(typeof t){case`number`:case`string`:case`undefined`:return!0;case`boolean`:return!t;case`object`:if(Array.isArray(t))return t.every(A);if(t===null||e(t))return!0;var n=d(t);if(n){var r=n.call(t),i;if(n!==t.entries){for(;!(i=r.next()).done;)if(!A(i.value))return!1}else for(;!(i=r.next()).done;){var a=i.value;if(a&&!A(a[1]))return!1}}else return!1;return!0;default:return!1}}function j(e,t){return e===`symbol`?!0:t?t[`@@toStringTag`]===`Symbol`||typeof Symbol==`function`&&t instanceof Symbol:!1}function M(e){var t=typeof e;return Array.isArray(e)?`array`:e instanceof RegExp?`object`:j(t,e)?`symbol`:t}function N(e){if(e==null)return``+e;var t=M(e);if(t===`object`){if(e instanceof Date)return`date`;if(e instanceof RegExp)return`regexp`}return t}function P(e){var t=N(e);switch(t){case`array`:case`object`:return`an `+t;case`boolean`:case`date`:case`regexp`:return`a `+t;default:return t}}function F(e){return!e.constructor||!e.constructor.name?f:e.constructor.name}return p.checkPropTypes=o,p.resetWarningCache=o.resetWarningCache,p.PropTypes=p,p}})),x=l(((e,t)=>{var n=_();function r(){}function i(){}i.resetWarningCache=r,t.exports=function(){function e(e,t,r,i,a,o){if(o!==n){var s=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 s.name=`Invariant Violation`,s}}e.isRequired=e;function t(){return e}var a={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:i,resetWarningCache:r};return a.PropTypes=a,a}})),S=d(l(((e,t)=>{if(process.env.NODE_ENV!==`production`){var n=h();t.exports=b()(n.isElement,!0)}else t.exports=x()()}))()),C=({children:e,value:n})=>t.default.createElement(t.default.Fragment,null,e||n);C.displayName=`Combobox.Item`,C.propTypes={value:S.default.string.isRequired,searchValue:S.default.string.isRequired,children:S.default.oneOfType([S.default.node,S.default.arrayOf(S.default.node)])};function w(e){if(typeof e==`string`||typeof e==`number`)return``+e;let t=``;if(Array.isArray(e))for(let n=0,r;n<e.length;n++)(r=w(e[n]))!==``&&(t+=(t&&` `)+r);else for(let n in e)e[n]&&(t+=(t&&` `)+n);return t}function T(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function E(){return E=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},E.apply(null,arguments)}var D=`data-focus-lock`,O=`data-focus-lock-disabled`,k=`data-no-focus-lock`,A=`data-autofocus-inside`,j=`data-no-autofocus`;function M(e,t){return typeof e==`function`?e(t):e&&(e.current=t),e}function N(e,n){var r=(0,t.useState)(function(){return{value:e,callback:n,facade:{get current(){return r.value},set current(e){var t=r.value;t!==e&&(r.value=e,r.callback(e,t))}}}})[0];return r.callback=n,r.facade}var P=typeof window<`u`?t.useLayoutEffect:t.useEffect,F=new WeakMap;function I(e,t){var n=N(t||null,function(t){return e.forEach(function(e){return M(e,t)})});return P(function(){var t=F.get(n);if(t){var r=new Set(t),i=new Set(e),a=n.current;r.forEach(function(e){i.has(e)||M(e,null)}),i.forEach(function(e){r.has(e)||M(e,a)})}F.set(n,e)},[e]),n}var L={width:`1px`,height:`0px`,padding:0,overflow:`hidden`,position:`fixed`,top:`1px`,left:`1px`},ee=function(e){var n=e.children,r=n===void 0?null:n;return t.default.createElement(t.Fragment,null,t.default.createElement(`div`,{key:`guard-first`,"data-focus-guard":!0,"data-focus-auto-guard":!0,style:L}),r,r&&t.default.createElement(`div`,{key:`guard-last`,"data-focus-guard":!0,"data-focus-auto-guard":!0,style:L}))};ee.propTypes=process.env.NODE_ENV===`production`?{}:{children:S.default.node};var te=function(){return te=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n],t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},te.apply(this,arguments)};function ne(e){return e}function re(e,t){t===void 0&&(t=ne);var n=[],r=!1;return{read:function(){if(r)throw Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(e){var i=t(e,r);return n.push(i),function(){n=n.filter(function(e){return e!==i})}},assignSyncMedium:function(e){for(r=!0;n.length;){var t=n;n=[],t.forEach(e)}n={push:function(t){return e(t)},filter:function(){return n}}},assignMedium:function(e){r=!0;var t=[];if(n.length){var i=n;n=[],i.forEach(e),t=n}var a=function(){var n=t;t=[],n.forEach(e)},o=function(){return Promise.resolve().then(a)};o(),n={push:function(e){t.push(e),o()},filter:function(e){return t=t.filter(e),n}}}}}function ie(e,t){return t===void 0&&(t=ne),re(e,t)}function ae(e){e===void 0&&(e={});var t=re(null);return t.options=te({async:!0,ssr:!1},e),t}var oe=ie({},function(e){return{target:e.target,currentTarget:e.currentTarget}}),se=ie(),R=ie(),ce=ae({async:!0,ssr:typeof document<`u`}),z=(0,t.createContext)(void 0),le=[],B=(0,t.forwardRef)(function(e,n){var r,i=(0,t.useState)(),a=i[0],o=i[1],s=(0,t.useRef)(),c=(0,t.useRef)(!1),l=(0,t.useRef)(null),u=(0,t.useState)({})[1],d=e.children,f=e.disabled,p=f===void 0?!1:f,m=e.noFocusGuards,h=m===void 0?!1:m,g=e.persistentFocus,_=g===void 0?!1:g,v=e.crossFrame,y=v===void 0?!0:v,b=e.autoFocus,x=b===void 0?!0:b,S=e.allowTextSelection,C=e.group,w=e.className,T=e.whiteList,k=e.hasPositiveIndices,A=e.shards,j=A===void 0?le:A,M=e.as,N=M===void 0?`div`:M,P=e.lockProps,F=P===void 0?{}:P,ee=e.sideCar,te=e.returnFocus,ne=te===void 0?!1:te,re=e.focusOptions,ie=e.onActivation,ae=e.onDeactivation,R=(0,t.useState)({})[0],B=(0,t.useCallback)(function(e){var t=e.captureFocusRestore;if(!l.current){var n=document?.activeElement;l.current=n,n!==document.body&&(l.current=t(n))}s.current&&ie&&ie(s.current),c.current=!0,u()},[ie]),ue=(0,t.useCallback)(function(){c.current=!1,ae&&ae(s.current),u()},[ae]),de=(0,t.useCallback)(function(e){var t=l.current;if(t){var n=(typeof t==`function`?t():t)||document.body,r=typeof ne==`function`?ne(n):ne;if(r){var i=typeof r==`object`?r:void 0;l.current=null,e?Promise.resolve().then(function(){return n.focus(i)}):n.focus(i)}}},[ne]),fe=(0,t.useCallback)(function(e){c.current&&oe.useMedium(e)},[]),pe=se.useMedium,me=(0,t.useCallback)(function(e){s.current!==e&&(s.current=e,o(e))},[]);process.env.NODE_ENV!==`production`&&(S!==void 0&&console.warn(`React-Focus-Lock: allowTextSelection is deprecated and enabled by default`),(0,t.useEffect)(function(){!s.current&&typeof N!=`string`&&console.error(`FocusLock: could not obtain ref to internal node`)},[]));var he=E((r={},r[O]=p&&`disabled`,r[D]=C,r),F),ge=h!==!0,_e=ge&&h!==`tail`,ve=I([n,me]),ye=(0,t.useMemo)(function(){return{observed:s,shards:j,enabled:!p,get active(){return c.current}}},[p,c,j,s]);return t.default.createElement(t.Fragment,null,ge&&[t.default.createElement(`div`,{key:`guard-first`,"data-focus-guard":!0,tabIndex:p?-1:0,style:L}),k?t.default.createElement(`div`,{key:`guard-nearest`,"data-focus-guard":!0,tabIndex:p?-1:1,style:L}):null],!p&&t.default.createElement(ee,{id:R,sideCar:ce,observed:a,disabled:p,persistentFocus:_,crossFrame:y,autoFocus:x,whiteList:T,shards:j,onActivation:B,onDeactivation:ue,returnFocus:de,focusOptions:re,noFocusGuards:h}),t.default.createElement(N,E({ref:ve},he,{className:w,onBlur:pe,onFocus:fe}),t.default.createElement(z.Provider,{value:ye},d)),_e&&t.default.createElement(`div`,{"data-focus-guard":!0,tabIndex:p?-1:0,style:L}))});B.propTypes=process.env.NODE_ENV===`production`?{}:{children:S.node,disabled:S.bool,returnFocus:(0,S.oneOfType)([S.bool,S.object,S.func]),focusOptions:S.object,noFocusGuards:S.bool,hasPositiveIndices:S.bool,allowTextSelection:S.bool,autoFocus:S.bool,persistentFocus:S.bool,crossFrame:S.bool,group:S.string,className:S.string,whiteList:S.func,shards:(0,S.arrayOf)(S.any),as:(0,S.oneOfType)([S.string,S.func,S.object]),lockProps:S.object,onActivation:S.func,onDeactivation:S.func,sideCar:S.any.isRequired};function ue(e,t){return ue=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},ue(e,t)}function de(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,ue(e,t)}function fe(e){"@babel/helpers - typeof";return fe=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},fe(e)}function pe(e,t){if(fe(e)!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(fe(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function me(e){var t=pe(e,`string`);return fe(t)==`symbol`?t:t+``}function he(e,t,n){return(t=me(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ge(e,n){if(process.env.NODE_ENV!==`production`){if(typeof e!=`function`)throw Error(`Expected reducePropsToState to be a function.`);if(typeof n!=`function`)throw Error(`Expected handleStateChangeOnClient to be a function.`)}function r(e){return e.displayName||e.name||`Component`}return function(i){if(process.env.NODE_ENV!==`production`&&typeof i!=`function`)throw Error(`Expected WrappedComponent to be a React component.`);var a=[],o;function s(){o=e(a.map(function(e){return e.props})),n(o)}var c=function(e){de(n,e);function n(){return e.apply(this,arguments)||this}n.peek=function(){return o};var r=n.prototype;return r.componentDidMount=function(){a.push(this),s()},r.componentDidUpdate=function(){s()},r.componentWillUnmount=function(){var e=a.indexOf(this);a.splice(e,1),s()},r.render=function(){return t.default.createElement(i,this.props)},n}(t.PureComponent);return he(c,`displayName`,`SideEffect(`+r(i)+`)`),c}}var _e=function(e){for(var t=Array(e.length),n=0;n<e.length;++n)t[n]=e[n];return t},ve=function(e){return Array.isArray(e)?e:[e]},ye=function(e){return Array.isArray(e)?e[0]:e},be=function(e){if(e.nodeType!==Node.ELEMENT_NODE)return!1;var t=window.getComputedStyle(e,null);return!t||!t.getPropertyValue?!1:t.getPropertyValue(`display`)===`none`||t.getPropertyValue(`visibility`)===`hidden`},xe=function(e){return e.parentNode&&e.parentNode.nodeType===Node.DOCUMENT_FRAGMENT_NODE?e.parentNode.host:e.parentNode},Se=function(e){return e===document||e&&e.nodeType===Node.DOCUMENT_NODE},Ce=function(e){return e.hasAttribute(`inert`)},we=function(e,t){return!e||Se(e)||!be(e)&&!Ce(e)&&t(xe(e))},Te=function(e,t){var n=e.get(t);if(n!==void 0)return n;var r=we(t,Te.bind(void 0,e));return e.set(t,r),r},Ee=function(e,t){return e&&!Se(e)?Me(e)?t(xe(e)):!1:!0},De=function(e,t){var n=e.get(t);if(n!==void 0)return n;var r=Ee(t,De.bind(void 0,e));return e.set(t,r),r},Oe=function(e){return e.dataset},ke=function(e){return e.tagName===`BUTTON`},V=function(e){return e.tagName===`INPUT`},Ae=function(e){return V(e)&&e.type===`radio`},je=function(e){return!((V(e)||ke(e))&&(e.type===`hidden`||e.disabled))},Me=function(e){var t=e.getAttribute(j);return![!0,`true`,``].includes(t)},Ne=function(e){return!!(e&&Oe(e)?.focusGuard)},Pe=function(e){return!Ne(e)},Fe=function(e){return!!e},Ie=function(e,t){var n=Math.max(0,e.tabIndex),r=Math.max(0,t.tabIndex),i=n-r,a=e.index-t.index;if(i){if(!n)return 1;if(!r)return-1}return i||a},Le=function(e){return e.tabIndex<0&&!e.hasAttribute(`tabindex`)?0:e.tabIndex},Re=function(e,t,n){return _e(e).map(function(e,t){var r=Le(e);return{node:e,index:t,tabIndex:n&&r===-1?(e.dataset||{}).focusGuard?0:-1:r}}).filter(function(e){return!t||e.tabIndex>=0}).sort(Ie)},ze=[`button:enabled`,`select:enabled`,`textarea:enabled`,`input:enabled`,`a[href]`,`area[href]`,`summary`,`iframe`,`object`,`embed`,`audio[controls]`,`video[controls]`,`[tabindex]`,`[contenteditable]`,`[autofocus]`].join(`,`),Be=`${ze}, [data-focus-guard]`,Ve=function(e,t){return _e((e.shadowRoot||e).children).reduce(function(e,n){return e.concat(n.matches(t?Be:ze)?[n]:[],Ve(n))},[])},He=function(e,t){return e instanceof HTMLIFrameElement&&e.contentDocument?.body?Ue([e.contentDocument.body],t):[e]},Ue=function(e,t){return e.reduce(function(e,n){var r,i=Ve(n,t),a=(r=[]).concat.apply(r,i.map(function(e){return He(e,t)}));return e.concat(a,n.parentNode?_e(n.parentNode.querySelectorAll(ze)).filter(function(e){return e===n}):[])},[])},We=function(e){return _e(e.querySelectorAll(`[${A}]`)).map(function(e){return Ue([e])}).reduce(function(e,t){return e.concat(t)},[])},Ge=function(e,t){return _e(e).filter(function(e){return Te(t,e)}).filter(function(e){return je(e)})},Ke=function(e,t){return t===void 0&&(t=new Map),_e(e).filter(function(e){return De(t,e)})},qe=function(e,t,n){return Re(Ge(Ue(e,n),t),!0,n)},Je=function(e,t){return Re(Ge(Ue(e),t),!1)},Ye=function(e,t){return Ge(We(e),t)},Xe=function(e,t){return e.shadowRoot?Xe(e.shadowRoot,t):Object.getPrototypeOf(e).contains!==void 0&&Object.getPrototypeOf(e).contains.call(e,t)?!0:_e(e.children).some(function(e){if(e instanceof HTMLIFrameElement){var n=e.contentDocument?.body;return n?Xe(n,t):!1}return Xe(e,t)})},Ze=function(e){for(var t=new Set,n=e.length,r=0;r<n;r+=1)for(var i=r+1;i<n;i+=1){var a=e[r].compareDocumentPosition(e[i]);(a&Node.DOCUMENT_POSITION_CONTAINED_BY)>0&&t.add(i),(a&Node.DOCUMENT_POSITION_CONTAINS)>0&&t.add(r)}return e.filter(function(e,n){return!t.has(n)})},H=function(e){return e.parentNode?H(e.parentNode):e},Qe=function(e){return ve(e).filter(Boolean).reduce(function(e,t){var n=t.getAttribute(D);return e.push.apply(e,n?Ze(_e(H(t).querySelectorAll(`[${D}="${n}"]:not([${O}="disabled"])`))):[t]),e},[])},$e=function(e){try{return e()}catch{return}},et=function(e){if(e===void 0&&(e=document),!(!e||!e.activeElement)){var t=e.activeElement;return t.shadowRoot?et(t.shadowRoot):t instanceof HTMLIFrameElement&&$e(function(){return t.contentWindow.document})?et(t.contentWindow.document):t}},tt=function(e,t){return e===t},nt=function(e,t){return!!_e(e.querySelectorAll(`iframe`)).some(function(e){return tt(e,t)})},rt=function(e,t){return t===void 0&&(t=et(ye(e).ownerDocument)),!t||t.dataset&&t.dataset.focusGuard?!1:Qe(e).some(function(e){return Xe(e,t)||nt(e,t)})},it=function(e){e===void 0&&(e=document);var t=et(e);return t?_e(e.querySelectorAll(`[${k}]`)).some(function(e){return Xe(e,t)}):!1},at=function(e,t){return t.filter(Ae).filter(function(t){return t.name===e.name}).filter(function(e){return e.checked})[0]||e},ot=function(e,t){return Ae(e)&&e.name?at(e,t):e},st=function(e){var t=new Set;return e.forEach(function(n){return t.add(ot(n,e))}),e.filter(function(e){return t.has(e)})},ct=function(e){return e[0]&&e.length>1?ot(e[0],e):e[0]},lt=function(e,t){return e.indexOf(ot(t,e))},ut=`NEW_FOCUS`,dt=function(e,t,n,r,i){var a=e.length,o=e[0],s=e[a-1],c=Ne(r);if(!(r&&e.indexOf(r)>=0)){var l=r===void 0?-1:n.indexOf(r),u=i?n.indexOf(i):l,d=i?e.indexOf(i):-1;if(l===-1)return d===-1?ut:d;if(d===-1)return ut;var f=l-u,p=n.indexOf(o),m=n.indexOf(s),h=st(n),g=r===void 0?-1:h.indexOf(r),_=i?h.indexOf(i):g,v=h.filter(function(e){return e.tabIndex>=0}),y=r===void 0?-1:v.indexOf(r),b=i?v.indexOf(i):y,x=y>=0&&b>=0?b-y:_-g;if(!f&&d>=0||t.length===0)return d;var S=lt(e,t[0]),C=lt(e,t[t.length-1]);if(l<=p&&c&&Math.abs(f)>1)return C;if(l>=m&&c&&Math.abs(f)>1)return S;if(f&&Math.abs(x)>1)return d;if(l<=p)return C;if(l>m)return S;if(f)return Math.abs(f)>1?d:(a+d+f)%a}},ft=function(e){return function(t){var n=Oe(t)?.autofocus;return t.autofocus||n!==void 0&&n!==`false`||e.indexOf(t)>=0}},pt=function(e,t,n){var r=Ke(e.map(function(e){return e.node}).filter(ft(n)));return r&&r.length?ct(r):ct(Ke(t))},mt=function(e,t){return t===void 0&&(t=[]),t.push(e),e.parentNode&&mt(e.parentNode.host||e.parentNode,t),t},ht=function(e,t){for(var n=mt(e),r=mt(t),i=0;i<n.length;i+=1){var a=n[i];if(r.indexOf(a)>=0)return a}return!1},gt=function(e,t,n){var r=ve(e),i=ve(t),a=r[0],o=!1;return i.filter(Boolean).forEach(function(e){o=ht(o||e,e)||o,n.filter(Boolean).forEach(function(e){var t=ht(a,e);t&&(o=!o||Xe(t,o)?t:ht(t,o))})}),o},_t=function(e,t){return e.reduce(function(e,n){return e.concat(Ye(n,t))},[])},vt=function(e,t){var n=new Map;return t.forEach(function(e){return n.set(e.node,e)}),e.map(function(e){return n.get(e)}).filter(Fe)},yt=function(e,t){var n=et(ve(e).length>0?document:ye(e).ownerDocument),r=Qe(e).filter(Pe),i=gt(n||e,e,r),a=new Map,o=Je(r,a),s=o.filter(function(e){var t=e.node;return Pe(t)});if(s[0]){var c=Je([i],a).map(function(e){return e.node}),l=vt(c,s),u=l.map(function(e){return e.node}),d=l.filter(function(e){return e.tabIndex>=0}).map(function(e){return e.node}),f=dt(u,d,c,n,t);if(f===`NEW_FOCUS`){var p=pt(o,d,_t(r,a))||pt(o,u,_t(r,a));if(p)return{node:p};console.warn(`focus-lock: cannot find any node to move focus into`);return}return f===void 0?f:l[f]}},bt=function(e){var t=Qe(e).filter(Pe),n=Re(Ue([gt(e,e,t)],!0),!0,!0),r=Ue(t,!1);return n.map(function(e){var t=e.node;return{node:t,index:e.index,lockItem:r.indexOf(t)>=0,guard:Ne(t)}})},xt=function(e,t){e&&(`focus`in e&&e.focus(t),`contentWindow`in e&&e.contentWindow&&e.contentWindow.focus())},St=0,Ct=!1,wt=function(e,t,n){n===void 0&&(n={});var r=yt(e,t);if(!Ct&&r){if(St>2){console.error(`FocusLock: focus-fighting detected. Only one focus management system could be active. See https://github.com/theKashey/focus-lock/#focus-fighting`),Ct=!0,setTimeout(function(){Ct=!1},1);return}St++,xt(r.node,n.focusOptions),St--}};function Tt(e){if(!e)return null;if(typeof WeakRef>`u`)return function(){return e||null};var t=e?new WeakRef(e):null;return function(){return t?.deref()||null}}var Et=function(e){if(!e)return null;for(var t=[],n=e;n&&n!==document.body;)t.push({current:Tt(n),parent:Tt(n.parentElement),left:Tt(n.previousElementSibling),right:Tt(n.nextElementSibling)}),n=n.parentElement;return{element:Tt(e),stack:t,ownerDocument:e.ownerDocument}},Dt=function(e){if(e)for(var t=e.stack,n=e.ownerDocument,r=new Map,i=0,a=t;i<a.length;i++){var o=a[i],s=o.parent?.call(o);if(s&&n.contains(s)){for(var c=o.left?.call(o),l=o.current(),u=s.contains(l)?l:void 0,d=o.right?.call(o),f=qe([s],r),p=u??c?.nextElementSibling??d??c;p;){for(var m=0,h=f;m<h.length;m++){var g=h[m];if(p?.contains(g.node))return g.node}p=p.nextElementSibling}if(f.length)return f[0].node}}},Ot=function(e){var t=Et(e);return function(){return Dt(t)}},kt=function(e,t,n){if(!e||!t)return console.error(`no element or scope given`),{};var r=ve(t);if(r.every(function(t){return!Xe(t,e)}))return console.error(`Active element is not contained in the scope`),{};var i=n?qe(r,new Map):Je(r,new Map),a=i.findIndex(function(t){return t.node===e});if(a!==-1)return{prev:i[a-1],next:i[a+1],first:i[0],last:i[i.length-1]}},At=function(e,t){var n=t?qe(ve(e),new Map):Je(ve(e),new Map);return{first:n[0],last:n[n.length-1]}},jt=function(e){return Object.assign({scope:document.body,cycle:!0,onlyTabbable:!0},e)},Mt=function(e,t,n){t===void 0&&(t={});var r=jt(t),i=kt(e,r.scope,r.onlyTabbable);if(i){var a=n(i,r.cycle);a&&xt(a.node,r.focusOptions)}},Nt=function(e,t){t===void 0&&(t={}),Mt(e,t,function(e,t){var n=e.next,r=e.first;return n||t&&r})},Pt=function(e,t){t===void 0&&(t={}),Mt(e,t,function(e,t){var n=e.prev,r=e.last;return n||t&&r})},Ft=function(e,t,n){var r=At(e,t.onlyTabbable??!0)[n];r&&xt(r.node,t.focusOptions)},It=function(e,t){t===void 0&&(t={}),Ft(e,t,`first`)},Lt=function(e,t){t===void 0&&(t={}),Ft(e,t,`last`)};function Rt(e){setTimeout(e,1)}var zt=function(e){return e&&`current`in e?e.current:e},Bt=function(){return document&&document.activeElement===document.body},Vt=function(){return Bt()||it()},Ht=null,Ut=null,Wt=function(){return null},Gt=null,Kt=!1,qt=!1,Jt=function(){return!0},Yt=function(e){return(Ht.whiteList||Jt)(e)},Xt=function(e,t){Gt={observerNode:e,portaledElement:t}},Zt=function(e){return Gt&&Gt.portaledElement===e};function Qt(e,t,n,r){var i=null,a=e;do{var o=r[a];if(o.guard)o.node.dataset.focusAutoGuard&&(i=o);else if(o.lockItem){if(a!==e)return;i=null}else break}while((a+=n)!==t);i&&(i.node.tabIndex=0)}var $t=function(e){return e?!!Kt:Kt===`meanwhile`},en=function e(t,n,r){return n&&(n.host===t&&(!n.activeElement||r.contains(n.activeElement))||n.parentNode&&e(t,n.parentNode,r))},tn=function(e,t){return t.some(function(t){return en(e,t,t)})},nn=function(e){return Je(e,new Map)},rn=function(e){return!nn([e.parentNode]).some(function(t){return t.node===e})},an=function(){var e=!1;if(Ht){var t=Ht,n=t.observed,r=t.persistentFocus,i=t.autoFocus,a=t.shards,o=t.crossFrame,s=t.focusOptions,c=t.noFocusGuards,l=n||Gt&&Gt.portaledElement;if(Bt()&&Ut&&Ut!==document.body&&(!document.body.contains(Ut)||rn(Ut))){var u=Wt();u&&u.focus()}var d=document&&document.activeElement;if(l){var f=[l].concat(a.map(zt).filter(Boolean));if((!d||Yt(d))&&(r||function(){if(!$t(o)||!c||!Ut||qt)return!1;var e=nn(f),t=e.findIndex(function(e){return e.node===Ut});return t===0||t===e.length-1}()||!Vt()||!Ut&&i)&&(l&&!(rt(f)||d&&tn(d,f)||Zt(d,l))&&(document&&!Ut&&d&&!i?(d.blur&&d.blur(),document.body.focus()):(e=wt(f,Ut,{focusOptions:s}),Gt={})),Ut=document&&document.activeElement,Ut!==document.body&&(Wt=Ot(Ut)),Kt=!1),document&&d!==document.activeElement&&document.querySelector(`[data-focus-auto-guard]`)){var p=document&&document.activeElement,m=bt(f),h=m.map(function(e){return e.node}).indexOf(p);h>-1&&(m.filter(function(e){var t=e.guard,n=e.node;return t&&n.dataset.focusAutoGuard}).forEach(function(e){return e.node.removeAttribute(`tabIndex`)}),Qt(h,m.length,1,m),Qt(h,-1,-1,m))}}}return e},on=function(e){an()&&e&&(e.stopPropagation(),e.preventDefault())},sn=function(){return Rt(an)},cn=function(e){var t=e.target,n=e.currentTarget;n.contains(t)||Xt(n,t)},ln=function(){return null},un=function(e){var n=e.children;return t.default.createElement(`div`,{onBlur:sn,onFocus:cn},n)};un.propTypes=process.env.NODE_ENV===`production`?{}:{children:S.default.node.isRequired};var dn=function(){qt=!0},fn=function(){qt=!1,Kt=`just`,Rt(function(){Kt=`meanwhile`})},pn=function(){document.addEventListener(`focusin`,on),document.addEventListener(`focusout`,sn),window.addEventListener(`focus`,dn),window.addEventListener(`blur`,fn)},mn=function(){document.removeEventListener(`focusin`,on),document.removeEventListener(`focusout`,sn),window.removeEventListener(`focus`,dn),window.removeEventListener(`blur`,fn)};function hn(e){return e.filter(function(e){return!e.disabled})}var gn={moveFocusInside:wt,focusInside:rt,focusNextElement:Nt,focusPrevElement:Pt,focusFirstElement:It,focusLastElement:Lt,captureFocusRestore:Ot};function _n(e){var t=e.slice(-1)[0];t&&!Ht&&pn();var n=Ht,r=n&&t&&t.id===n.id;Ht=t,n&&!r&&(n.onDeactivation(),e.filter(function(e){return e.id===n.id}).length||n.returnFocus(!t)),t?(Ut=null,(!r||n.observed!==t.observed)&&t.onActivation(gn),an(!0),Rt(an)):(mn(),Ut=null)}oe.assignSyncMedium(cn),se.assignMedium(sn),R.assignMedium(function(e){return e(gn)});var vn=ge(hn,_n)(ln),yn=(0,t.forwardRef)(function(e,n){return t.default.createElement(B,E({sideCar:vn,ref:n},e))}),bn=B.propTypes||{};bn.sideCar;var xn=T(bn,[`sideCar`]);yn.propTypes=process.env.NODE_ENV===`production`?{}:xn;var Sn=yn,Cn=()=>typeof CSS>`u`||typeof CSS.supports!=`function`?!1:[CSS.supports(`anchor-name`,`--a`),CSS.supports(`position-anchor`,`--a`),CSS.supports(`position-area`,`bottom center`),CSS.supports(`position-try-fallbacks`,`flip-block`),CSS.supports(`width`,`anchor-size(width)`)].every(Boolean),wn=()=>{if(typeof document>`u`)return!1;let e=document.createElement(`div`);e.style.cssText=`position:fixed;left:-9999px;width:200px;height:50px;overflow:auto;visibility:hidden;pointer-events:none`;let t=document.createElement(`div`);t.style.cssText=`anchor-name:--nds-bug-test;width:100px;height:20px`;let n=document.createElement(`div`);n.style.cssText=`position:fixed;position-anchor:--nds-bug-test;position-area:bottom;width:anchor-size(width);height:10px;margin:0`,e.append(t,n),document.body.appendChild(e);let r=n.getBoundingClientRect().width;return document.body.removeChild(e),r!==100},Tn=Cn(),En=Tn&&wn(),Dn=()=>Tn,On=(e,t)=>{if(typeof document>`u`)return t;let n=getComputedStyle(document.documentElement).getPropertyValue(e).trim(),r=parseFloat(n);return isNaN(r)?t:r},kn=(e,t,n)=>{if(typeof window>`u`)return;let r=e.getBoundingClientRect();if(r.width===0)return;let i=On(`--space-xxs`,4),a=On(`--space-l`,20);t.style.setProperty(`--js-dropdown-top`,`0px`),t.style.removeProperty(`--js-dropdown-bottom`),t.style.setProperty(`--js-dropdown-left`,`0px`);let o=t.getBoundingClientRect(),s=window.innerHeight-r.bottom-i-a;r.top-i-a>s?(t.style.setProperty(`--js-dropdown-bottom`,`${window.innerHeight-r.top+i}px`),t.style.removeProperty(`--js-dropdown-top`)):(t.style.setProperty(`--js-dropdown-top`,`${r.bottom-o.top+i}px`),t.style.removeProperty(`--js-dropdown-bottom`)),t.style.setProperty(`--js-dropdown-left`,`${r.left-o.left}px`),n&&t.style.setProperty(`--js-dropdown-width`,`${r.width}px`)},An=e=>{let t=typeof window<`u`&&(window.visualViewport?.width??window.innerWidth)||0,n=typeof window<`u`&&(window.visualViewport?.height??window.innerHeight)||0,r=Math.floor(e.top),i=Math.floor(e.left),a=Math.floor(t-e.right),o=Math.floor(n-e.bottom);return`${-r}px ${-a}px ${-o}px ${-i}px`},jn=({anchorRef:e,layerRef:n,matchWidth:r=!1,isOpen:i,polyfillScrollBug:a=!1})=>{let o=Dn(),s=a&&En?!1:o;return(0,t.useLayoutEffect)(()=>{if(s||!i)return;let t=!1,a,o=e.current,c=n.current;if(!o||!c)return;let l=[o,c,r],u=()=>{if(t)return;a?.disconnect();let e=o.getBoundingClientRect();if(e.width===0||e.height===0)return;let n=new IntersectionObserver(([e])=>{e.intersectionRatio<1?(c.style.visibility=`hidden`,n.disconnect(),requestAnimationFrame(()=>{t||u()})):(kn(...l),c.style.visibility=``)},{threshold:1,rootMargin:An(e)});n.observe(o),a=n};return kn(...l),c.style.visibility=``,u(),()=>{t=!0,a?.disconnect()}},[s,e,n,r,i]),{isAnchorPositionSupported:s,polyFillLayerStyles:s?{}:{position:`fixed`,top:`var(--js-dropdown-top, auto)`,bottom:`var(--js-dropdown-bottom, auto)`,left:`var(--js-dropdown-left)`,...r?{width:`var(--js-dropdown-width)`,minWidth:`var(--js-dropdown-width)`,maxWidth:`var(--js-dropdown-width)`}:{minWidth:`max-content`}}}},Mn={bottom:{positionArea:`bottom`,positionTryFallbacks:`--nds-dropdown-above, flip-inline`,positionTryOrder:`most-height`,margin:`marginTop`},top:{positionArea:`top`,positionTryFallbacks:`--nds-try-below, flip-inline`,positionTryOrder:`most-height`,margin:`marginBottom`},left:{positionArea:`left`,positionTryFallbacks:`--nds-try-right, flip-block`,margin:`marginRight`},right:{positionArea:`right`,positionTryFallbacks:`--nds-try-left, flip-block`,margin:`marginLeft`}},Nn=({isOpen:e,matchWidth:n=!0,isPortalled:r=!1,ariaPopupType:i=`menu`,placement:a=`bottom`,alignment:o,polyfillScrollBug:s=!1})=>{let c=(0,t.useRef)(null),l=(0,t.useRef)(null),u=(0,t.useId)().replaceAll(/:/g,`-`),d=(0,t.useMemo)(()=>`--nds-dropdown-anchor-${u}`,[u]),{isAnchorPositionSupported:f,polyFillLayerStyles:p}=jn({anchorRef:c,layerRef:l,matchWidth:n,isOpen:e,polyfillScrollBug:s});return{anchorProps:(0,t.useMemo)(()=>({ref:c,style:{anchorName:f?d:void 0},"aria-haspopup":i}),[c,f,d,e,i]),layerProps:(0,t.useMemo)(()=>{let t=Mn[a],r={position:`fixed`,positionAnchor:d,positionArea:o?`${t.positionArea} ${o}`:t.positionArea,positionTryFallbacks:o?a===`left`||a===`right`?`flip-inline`:`flip-block`:t.positionTryFallbacks,...t.positionTryOrder&&{positionTryOrder:t.positionTryOrder},marginTop:0,marginBottom:0,marginLeft:0,marginRight:0,[t.margin]:`var(--nds-layer-gap, var(--space-xxs))`,width:n?`anchor-size(width)`:`min(80vw, max-content)`,maxWidth:n?`anchor-size(width)`:`80vw`,minWidth:n?`anchor-size(width)`:`auto`,"--nds-anchor-name":d};return{ref:l,style:{...f?r:p,display:e?`block`:`none`}}},[e,f,r,d,n,a,o,p,l]),isAnchorPositionSupported:f}};function Pn(){return Pn=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Pn.apply(null,arguments)}var Fn=()=>{},In=({side:e=`bottom`,content:n,children:r,renderTrigger:i=()=>t.default.createElement(t.default.Fragment,null),wrapperDisplay:a=`inline-flex`,matchTriggerWidth:o=!1,testId:s,closeOnContentClick:c=!1,isOpen:l,autoFocus:u=!1,hasShadow:d=!0,onUserDismiss:f=Fn,onUserEnable:p=Fn})=>{let m=l===!0||l===!1,h=t.default.Children.count(r)>0,[g,_]=(0,t.useState)(!1),v=m?l:g,y=c?t.default.cloneElement(n,{onClick:()=>{n.onClick&&n.onClick(),_(!1),f()}}):n,b=(0,t.useCallback)(()=>{_(!1),f()},[f]),x=e=>{e.stopPropagation(),m?l?f():p():_(e=>!e)},S=({key:e})=>{e===`Enter`&&(_(!0),p())},{anchorProps:C,layerProps:T}=Nn({isOpen:v,setIsOpen:e=>{e||b()},matchWidth:o,placement:e}),{ref:E,style:D,...O}=C,{ref:k,...A}=T;return(0,t.useEffect)(()=>{if(!v)return;let e=e=>{let t=typeof E==`object`?E?.current:null,n=typeof k==`object`?k?.current:null;t&&!t.contains(e.target)&&n&&!n.contains(e.target)&&b()},t=({key:e})=>{e===`Escape`&&b()};return document.addEventListener(`mousedown`,e),window.addEventListener(`keydown`,t),()=>{document.removeEventListener(`mousedown`,e),window.removeEventListener(`keydown`,t)}},[v,b,E,k]),t.default.createElement(t.default.Fragment,null,t.default.createElement(`div`,Pn({ref:E},O,{style:{...D,display:a},onClick:x,onKeyDown:S,role:`button`,tabIndex:`0`,className:`nds-popover-trigger`,"data-testid":`nds-popover-trigger`,"aria-haspopup":`true`,"aria-expanded":v.toString()}),h?r:i(l)),t.default.createElement(`div`,Pn({ref:k},A,{className:w([`nds-typography nds-popover`,`rounded--all bgColor--white`,{"nds-popover--elevated":d}]),style:A.style,"data-testid":s}),v&&t.default.createElement(`div`,{tabIndex:-1},t.default.createElement(Sn,{autoFocus:u},y))))},Ln=l((e=>{var t=Symbol.for(`react.element`),n=Symbol.for(`react.portal`),r=Symbol.for(`react.fragment`),i=Symbol.for(`react.strict_mode`),a=Symbol.for(`react.profiler`),o=Symbol.for(`react.provider`),s=Symbol.for(`react.context`),c=Symbol.for(`react.server_context`),l=Symbol.for(`react.forward_ref`),u=Symbol.for(`react.suspense`),d=Symbol.for(`react.suspense_list`),f=Symbol.for(`react.memo`),p=Symbol.for(`react.lazy`),m=Symbol.for(`react.offscreen`),h=Symbol.for(`react.module.reference`);function g(e){if(typeof e==`object`&&e){var m=e.$$typeof;switch(m){case t:switch(e=e.type,e){case r:case a:case i:case u:case d:return e;default:switch(e=e&&e.$$typeof,e){case c:case s:case l:case p:case f:case o:return e;default:return m}}case n:return m}}}e.ContextConsumer=s,e.ContextProvider=o,e.Element=t,e.ForwardRef=l,e.Fragment=r,e.Lazy=p,e.Memo=f,e.Portal=n,e.Profiler=a,e.StrictMode=i,e.Suspense=u,e.SuspenseList=d,e.isAsyncMode=function(){return!1},e.isConcurrentMode=function(){return!1},e.isContextConsumer=function(e){return g(e)===s},e.isContextProvider=function(e){return g(e)===o},e.isElement=function(e){return typeof e==`object`&&!!e&&e.$$typeof===t},e.isForwardRef=function(e){return g(e)===l},e.isFragment=function(e){return g(e)===r},e.isLazy=function(e){return g(e)===p},e.isMemo=function(e){return g(e)===f},e.isPortal=function(e){return g(e)===n},e.isProfiler=function(e){return g(e)===a},e.isStrictMode=function(e){return g(e)===i},e.isSuspense=function(e){return g(e)===u},e.isSuspenseList=function(e){return g(e)===d},e.isValidElementType=function(e){return!!(typeof e==`string`||typeof e==`function`||e===r||e===a||e===i||e===u||e===d||e===m||typeof e==`object`&&e&&(e.$$typeof===p||e.$$typeof===f||e.$$typeof===o||e.$$typeof===s||e.$$typeof===l||e.$$typeof===h||e.getModuleId!==void 0))},e.typeOf=g})),Rn=l((e=>{process.env.NODE_ENV!==`production`&&(function(){"use strict";var t=Symbol.for(`react.element`),n=Symbol.for(`react.portal`),r=Symbol.for(`react.fragment`),i=Symbol.for(`react.strict_mode`),a=Symbol.for(`react.profiler`),o=Symbol.for(`react.provider`),s=Symbol.for(`react.context`),c=Symbol.for(`react.server_context`),l=Symbol.for(`react.forward_ref`),u=Symbol.for(`react.suspense`),d=Symbol.for(`react.suspense_list`),f=Symbol.for(`react.memo`),p=Symbol.for(`react.lazy`),m=Symbol.for(`react.offscreen`),h=!1,g=!1,_=!1,v=!1,y=!1,b=Symbol.for(`react.module.reference`);function x(e){return!!(typeof e==`string`||typeof e==`function`||e===r||e===a||y||e===i||e===u||e===d||v||e===m||h||g||_||typeof e==`object`&&e&&(e.$$typeof===p||e.$$typeof===f||e.$$typeof===o||e.$$typeof===s||e.$$typeof===l||e.$$typeof===b||e.getModuleId!==void 0))}function S(e){if(typeof e==`object`&&e){var m=e.$$typeof;switch(m){case t:var h=e.type;switch(h){case r:case a:case i:case u:case d:return h;default:var g=h&&h.$$typeof;switch(g){case c:case s:case l:case p:case f:case o:return g;default:return m}}case n:return m}}}var C=s,w=o,T=t,E=l,D=r,O=p,k=f,A=n,j=a,M=i,N=u,P=d,F=!1,I=!1;function L(e){return F||(F=!0,console.warn(`The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 18+.`)),!1}function ee(e){return I||(I=!0,console.warn(`The ReactIs.isConcurrentMode() alias has been deprecated, and will be removed in React 18+.`)),!1}function te(e){return S(e)===s}function ne(e){return S(e)===o}function re(e){return typeof e==`object`&&!!e&&e.$$typeof===t}function ie(e){return S(e)===l}function ae(e){return S(e)===r}function oe(e){return S(e)===p}function se(e){return S(e)===f}function R(e){return S(e)===n}function ce(e){return S(e)===a}function z(e){return S(e)===i}function le(e){return S(e)===u}function B(e){return S(e)===d}e.ContextConsumer=C,e.ContextProvider=w,e.Element=T,e.ForwardRef=E,e.Fragment=D,e.Lazy=O,e.Memo=k,e.Portal=A,e.Profiler=j,e.StrictMode=M,e.Suspense=N,e.SuspenseList=P,e.isAsyncMode=L,e.isConcurrentMode=ee,e.isContextConsumer=te,e.isContextProvider=ne,e.isElement=re,e.isForwardRef=ie,e.isFragment=ae,e.isLazy=oe,e.isMemo=se,e.isPortal=R,e.isProfiler=ce,e.isStrictMode=z,e.isSuspense=le,e.isSuspenseList=B,e.isValidElementType=x,e.typeOf=S})()})),zn=l(((e,t)=>{process.env.NODE_ENV===`production`?t.exports=Ln():t.exports=Rn()}))(),Bn=e=>typeof e==`object`&&!!e&&e.nodeType===1,Vn=(e,t)=>(!t||e!==`hidden`)&&e!==`visible`&&e!==`clip`,Hn=(e,t)=>{if(e.clientHeight<e.scrollHeight||e.clientWidth<e.scrollWidth){let n=getComputedStyle(e,null);return Vn(n.overflowY,t)||Vn(n.overflowX,t)||(e=>{let t=(e=>{if(!e.ownerDocument||!e.ownerDocument.defaultView)return null;try{return e.ownerDocument.defaultView.frameElement}catch{return null}})(e);return!!t&&(t.clientHeight<e.scrollHeight||t.clientWidth<e.scrollWidth)})(e)}return!1},Un=(e,t,n,r,i,a,o,s)=>a<e&&o>t||a>e&&o<t?0:a<=e&&s<=n||o>=t&&s>=n?a-e-r:o>t&&s<n||a<e&&s>n?o-t+i:0,Wn=e=>e.parentElement??(e.getRootNode().host||null),Gn=(e,t)=>{if(typeof document>`u`)return[];let{scrollMode:n,block:r,inline:i,boundary:a,skipOverflowHiddenElements:o}=t,s=typeof a==`function`?a:e=>e!==a;if(!Bn(e))throw TypeError(`Invalid target`);let c=document.scrollingElement||document.documentElement,l=[],u=e;for(;Bn(u)&&s(u);){if(u=Wn(u),u===c){l.push(u);break}u!=null&&u===document.body&&Hn(u)&&!Hn(document.documentElement)||u!=null&&Hn(u,o)&&l.push(u)}let d=window.visualViewport?.width??innerWidth,f=window.visualViewport?.height??innerHeight,{scrollX:p,scrollY:m}=window,{height:h,width:g,top:_,right:v,bottom:y,left:b}=e.getBoundingClientRect(),{top:x,right:S,bottom:C,left:w}=(e=>{let t=window.getComputedStyle(e);return{top:parseFloat(t.scrollMarginTop)||0,right:parseFloat(t.scrollMarginRight)||0,bottom:parseFloat(t.scrollMarginBottom)||0,left:parseFloat(t.scrollMarginLeft)||0}})(e),T=r===`start`||r===`nearest`?_-x:r===`end`?y+C:_+h/2-x+C,E=i===`center`?b+g/2-w+S:i===`end`?v+S:b-w,D=[];for(let e=0;e<l.length;e++){let t=l[e],{height:a,width:o,top:s,right:u,bottom:x,left:S}=t.getBoundingClientRect();if(n===`if-needed`&&_>=0&&b>=0&&y<=f&&v<=d&&(t===c&&!Hn(t)||_>=s&&y<=x&&b>=S&&v<=u))return D;let C=getComputedStyle(t),w=parseInt(C.borderLeftWidth,10),O=parseInt(C.borderTopWidth,10),k=parseInt(C.borderRightWidth,10),A=parseInt(C.borderBottomWidth,10),j=0,M=0,N=`offsetWidth`in t?t.offsetWidth-t.clientWidth-w-k:0,P=`offsetHeight`in t?t.offsetHeight-t.clientHeight-O-A:0,F=`offsetWidth`in t?t.offsetWidth===0?0:o/t.offsetWidth:0,I=`offsetHeight`in t?t.offsetHeight===0?0:a/t.offsetHeight:0;if(c===t)j=r===`start`?T:r===`end`?T-f:r===`nearest`?Un(m,m+f,f,O,A,m+T,m+T+h,h):T-f/2,M=i===`start`?E:i===`center`?E-d/2:i===`end`?E-d:Un(p,p+d,d,w,k,p+E,p+E+g,g),j=Math.max(0,j+m),M=Math.max(0,M+p);else{j=r===`start`?T-s-O:r===`end`?T-x+A+P:r===`nearest`?Un(s,x,a,O,A+P,T,T+h,h):T-(s+a/2)+P/2,M=i===`start`?E-S-w:i===`center`?E-(S+o/2)+N/2:i===`end`?E-u+k+N:Un(S,u,o,w,k+N,E,E+g,g);let{scrollLeft:e,scrollTop:n}=t;j=I===0?0:Math.max(0,Math.min(n+j/I,t.scrollHeight-a/I+P)),M=F===0?0:Math.max(0,Math.min(e+M/F,t.scrollWidth-o/F+N)),T+=n-j,E+=e-M}D.push({el:t,top:j,left:M})}return D},Kn=process.env.NODE_ENV===`production`?0:`__autocomplete_unknown__`,qn=process.env.NODE_ENV===`production`?1:`__autocomplete_mouseup__`,Jn=process.env.NODE_ENV===`production`?2:`__autocomplete_item_mouseenter__`,Yn=process.env.NODE_ENV===`production`?3:`__autocomplete_keydown_arrow_up__`,Xn=process.env.NODE_ENV===`production`?4:`__autocomplete_keydown_arrow_down__`,Zn=process.env.NODE_ENV===`production`?5:`__autocomplete_keydown_escape__`,Qn=process.env.NODE_ENV===`production`?6:`__autocomplete_keydown_enter__`,$n=process.env.NODE_ENV===`production`?7:`__autocomplete_keydown_home__`,er=process.env.NODE_ENV===`production`?8:`__autocomplete_keydown_end__`,tr=process.env.NODE_ENV===`production`?9:`__autocomplete_click_item__`,nr=process.env.NODE_ENV===`production`?10:`__autocomplete_blur_input__`,rr=process.env.NODE_ENV===`production`?11:`__autocomplete_change_input__`,ir=process.env.NODE_ENV===`production`?12:`__autocomplete_keydown_space_button__`,ar=process.env.NODE_ENV===`production`?13:`__autocomplete_click_button__`,or=process.env.NODE_ENV===`production`?14:`__autocomplete_blur_button__`,sr=process.env.NODE_ENV===`production`?15:`__autocomplete_controlled_prop_updated_selected_item__`,cr=process.env.NODE_ENV===`production`?16:`__autocomplete_touchend__`,lr=Object.freeze({__proto__:null,blurButton:or,blurInput:nr,changeInput:rr,clickButton:ar,clickItem:tr,controlledPropUpdatedSelectedItem:sr,itemMouseEnter:Jn,keyDownArrowDown:Xn,keyDownArrowUp:Yn,keyDownEnd:er,keyDownEnter:Qn,keyDownEscape:Zn,keyDownHome:$n,keyDownSpaceButton:ir,mouseUp:qn,touchEnd:cr,unknown:Kn}),ur=0;function dr(){return String(ur++)}function fr(e){var t=f.useRef(e);return t.current=e,t}function pr(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(e){t.forEach(function(t){typeof t==`function`?t(e):t&&(t.current=e)})}}function U(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(e){for(var n=arguments.length,r=Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];return t.some(function(t){return t&&t.apply(void 0,[e].concat(r)),e.preventDownshiftDefault||e.hasOwnProperty(`nativeEvent`)&&e.nativeEvent.preventDownshiftDefault})}}function mr(e,t){var n;function r(){n&&clearTimeout(n)}function i(){for(var i=arguments.length,a=Array(i),o=0;o<i;o++)a[o]=arguments[o];r(),n=setTimeout(function(){n=null,e.apply(void 0,a)},t)}return i.cancel=r,i}var hr=mr(function(e){gr(e).textContent=``},500);function gr(e){var t=e.getElementById(`a11y-status-message`);return t||(t=e.createElement(`div`),t.setAttribute(`id`,`a11y-status-message`),t.setAttribute(`role`,`status`),t.setAttribute(`aria-live`,`polite`),t.setAttribute(`aria-relevant`,`additions text`),Object.assign(t.style,{border:`0`,clip:`rect(0 0 0 0)`,height:`1px`,margin:`-1px`,overflow:`hidden`,padding:`0`,position:`absolute`,width:`1px`}),e.body.appendChild(t),t)}function _r(e,t){if(!(!e||!t)){var n=gr(t);n.textContent=e,hr(t)}}function vr(e){var t=e?.getElementById(`a11y-status-message`);t&&t.remove()}function yr(){}var br=yr;process.env.NODE_ENV!==`production`&&(br=function(e,t,n){S.default.checkPropTypes(n,e,`prop`,t.name)});function xr(e,t){return t?Object.keys(e).reduce(function(e,n){return t[n]!==void 0&&(e[n]=t[n]),e},E({},e)):e}function Sr(e,t){e&&Gn(e,{boundary:t,block:`nearest`,scrollMode:`if-needed`}).forEach(function(e){var t=e.el,n=e.top,r=e.left;t.scrollTop=n,t.scrollLeft=r})}function Cr(e){var t=e.key,n=e.keyCode;return n>=37&&n<=40&&!t.startsWith(`Arrow`)?`Arrow`+t:t}function wr(e,t,n,r,i){i===void 0&&(i=!1);var a=n.length;if(t){for(var o=e;o>=0;o--)if(!r(n[o],o))return o}else for(var s=e;s<a;s++)if(!r(n[s],s))return s;return i?wr(t?a-1:0,t,n,r):-1}function Tr(e,t,n,r,i){i===void 0&&(i=!1);var a=n.length;if(a===0)return-1;var o=a-1;(typeof e!=`number`||e<0||e>o)&&(e=t>0?-1:o+1);var s=e+t;s<0?s=i?o:0:s>o&&(s=i?0:o);var c=wr(s,t<0,n,r,i);return c===-1?e>=a?-1:e:c}var Er=yr;process.env.NODE_ENV!==`production`&&(Er=function(e,t,n){var r=`This prop should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled Downshift element for the lifetime of the component. More info: https://github.com/downshift-js/downshift#control-props`;Object.keys(e).forEach(function(e){t[e]!==void 0&&n[e]===void 0?console.error(`downshift: A component has changed the controlled prop "`+e+`" to be uncontrolled. `+r):t[e]===void 0&&n[e]!==void 0&&console.error(`downshift: A component has changed the uncontrolled prop "`+e+`" to be controlled. `+r)})});function Dr(e,t,n,r){return r===void 0&&(r=!0),!!n&&t.some(function(t){return t&&(Or(t,e,n)||r&&Or(t,n.document.activeElement,n))})}function Or(e,t,n){return e===t||t instanceof n.Node&&e.contains(t)}function kr(e){return typeof e==`function`?e:yr}function Ar(e){var t=e.isOpen,n=e.resultCount,r=e.previousResultCount;return t?n?n===r?``:n+` result`+(n===1?` is`:`s are`)+` available, use up and down arrow keys to navigate. Press Enter key to select.`:`No results are available.`:``}function jr(e,t){return e=Array.isArray(e)?e[0]:e,!e&&t?t:e}function Mr(e){return typeof e.type==`string`}function Nr(e){return e.props}function Pr(e,t){console.error(`The property "`+t+`" is required in "`+e+`"`)}var Fr=[`highlightedIndex`,`inputValue`,`isOpen`,`selectedItem`,`type`];function Ir(e){e===void 0&&(e={});var t={};return Fr.forEach(function(n){e.hasOwnProperty(n)&&(t[n]=e[n])}),t}function Lr(e){return Object.prototype.toString.call(e)===`[object Object]`}var Rr=[`refKey`,`ref`],zr=[`onClick`,`onPress`,`onKeyDown`,`onKeyUp`,`onBlur`],Br=[`onKeyDown`,`onBlur`,`onChange`,`onInput`,`onChangeText`],Vr=[`refKey`,`ref`],Hr=[`onMouseMove`,`onMouseDown`,`onClick`,`onPress`,`index`,`item`],Ur=function(){var e=function(e){function t(t){var n=e.call(this,t)||this;n.id=n.props.id||`downshift-`+dr(),n.menuId=n.props.menuId||n.id+`-menu`,n.labelId=n.props.labelId||n.id+`-label`,n.inputId=n.props.inputId||n.id+`-input`,n.getItemId=n.props.getItemId||function(e){return n.id+`-item-`+e},n.items=[],n.itemCount=null,n.previousResultCount=0,n.timeoutIds=[],n.internalSetTimeout=function(e,t){var r=setTimeout(function(){n.timeoutIds=n.timeoutIds.filter(function(e){return e!==r}),e()},t);n.timeoutIds.push(r)},n.setItemCount=function(e){n.itemCount=e},n.unsetItemCount=function(){n.itemCount=null},n.isItemDisabled=function(e,t){var r=n.getItemNodeFromIndex(t);return r&&r.hasAttribute(`disabled`)},n.setHighlightedIndex=function(e,t){e===void 0&&(e=n.props.defaultHighlightedIndex),t===void 0&&(t={}),t=Ir(t),n.internalSetState(E({highlightedIndex:e},t))},n.clearSelection=function(e){n.internalSetState({selectedItem:null,inputValue:``,highlightedIndex:n.props.defaultHighlightedIndex,isOpen:n.props.defaultIsOpen},e)},n.selectItem=function(e,t,r){t=Ir(t),n.internalSetState(E({isOpen:n.props.defaultIsOpen,highlightedIndex:n.props.defaultHighlightedIndex,selectedItem:e,inputValue:n.props.itemToString(e)},t),r)},n.selectItemAtIndex=function(e,t,r){var i=n.items[e];i!=null&&n.selectItem(i,t,r)},n.selectHighlightedItem=function(e,t){return n.selectItemAtIndex(n.getState().highlightedIndex,e,t)},n.internalSetState=function(e,t){var r,i,a={},o=typeof e==`function`;return!o&&e.hasOwnProperty(`inputValue`)&&n.props.onInputValueChange(e.inputValue,E({},n.getStateAndHelpers(),e)),n.setState(function(t){var s;t=n.getState(t);var c=o?e(t):e;c=n.props.stateReducer(t,c),r=c.hasOwnProperty(`selectedItem`);var l={};return r&&c.selectedItem!==t.selectedItem&&(i=c.selectedItem),(s=c).type||(s.type=Kn),Object.keys(c).forEach(function(e){t[e]!==c[e]&&(a[e]=c[e]),e!==`type`&&(c[e],n.props[e]===void 0&&(l[e]=c[e]))}),o&&c.hasOwnProperty(`inputValue`)&&n.props.onInputValueChange(c.inputValue,E({},n.getStateAndHelpers(),c)),l},function(){kr(t)(),Object.keys(a).length>1&&n.props.onStateChange(a,n.getStateAndHelpers()),r&&n.props.onSelect(e.selectedItem,n.getStateAndHelpers()),i!==void 0&&n.props.onChange(i,n.getStateAndHelpers()),n.props.onUserAction(a,n.getStateAndHelpers())})},n.rootRef=function(e){return n._rootNode=e},n.getRootProps=function(e,t){var r,i=e===void 0?{}:e,a=i.refKey,o=a===void 0?`ref`:a,s=i.ref,c=T(i,Rr),l=(t===void 0?{}:t).suppressRefError,u=l===void 0?!1:l;n.getRootProps.called=!0,n.getRootProps.refKey=o,n.getRootProps.suppressRefError=u;var d=n.getState().isOpen;return E((r={},r[o]=pr(s,n.rootRef),r.role=`combobox`,r[`aria-expanded`]=d,r[`aria-haspopup`]=`listbox`,r[`aria-owns`]=d?n.menuId:void 0,r[`aria-labelledby`]=n.labelId,r),c)},n.keyDownHandlers={ArrowDown:function(e){var t=this;if(e.preventDefault(),this.getState().isOpen){var n=e.shiftKey?5:1;this.moveHighlightedIndex(n,{type:Xn})}else this.internalSetState({isOpen:!0,type:Xn},function(){var e=t.getItemCount();if(e>0){var n=t.getState().highlightedIndex,r=Tr(n,1,{length:e},t.isItemDisabled,!0);t.setHighlightedIndex(r,{type:Xn})}})},ArrowUp:function(e){var t=this;if(e.preventDefault(),this.getState().isOpen){var n=e.shiftKey?-5:-1;this.moveHighlightedIndex(n,{type:Yn})}else this.internalSetState({isOpen:!0,type:Yn},function(){var e=t.getItemCount();if(e>0){var n=t.getState().highlightedIndex,r=Tr(n,-1,{length:e},t.isItemDisabled,!0);t.setHighlightedIndex(r,{type:Yn})}})},Enter:function(e){if(e.which!==229){var t=this.getState(),n=t.isOpen,r=t.highlightedIndex;if(n&&r!=null){e.preventDefault();var i=this.items[r],a=this.getItemNodeFromIndex(r);if(i==null||a&&a.hasAttribute(`disabled`))return;this.selectHighlightedItem({type:Qn})}}},Escape:function(e){e.preventDefault(),this.reset(E({type:Zn},!this.state.isOpen&&{selectedItem:null,inputValue:``}))}},n.buttonKeyDownHandlers=E({},n.keyDownHandlers,{" ":function(e){e.preventDefault(),this.toggleMenu({type:ir})}}),n.inputKeyDownHandlers=E({},n.keyDownHandlers,{Home:function(e){var t=this.getState().isOpen;if(t){e.preventDefault();var n=this.getItemCount();if(!(n<=0||!t)){var r=wr(0,!1,{length:n},this.isItemDisabled);this.setHighlightedIndex(r,{type:$n})}}},End:function(e){var t=this.getState().isOpen;if(t){e.preventDefault();var n=this.getItemCount();if(!(n<=0||!t)){var r=wr(n-1,!0,{length:n},this.isItemDisabled);this.setHighlightedIndex(r,{type:er})}}}}),n.getToggleButtonProps=function(e){var t=e===void 0?{}:e,r=t.onClick;t.onPress;var i=t.onKeyDown,a=t.onKeyUp,o=t.onBlur,s=T(t,zr),c=n.getState().isOpen,l={onClick:U(r,n.buttonHandleClick),onKeyDown:U(i,n.buttonHandleKeyDown),onKeyUp:U(a,n.buttonHandleKeyUp),onBlur:U(o,n.buttonHandleBlur)},u=s.disabled?{}:l;return E({type:`button`,role:`button`,"aria-label":c?`close menu`:`open menu`,"aria-haspopup":!0,"data-toggle":!0},u,s)},n.buttonHandleKeyUp=function(e){e.preventDefault()},n.buttonHandleKeyDown=function(e){var t=Cr(e);n.buttonKeyDownHandlers[t]&&n.buttonKeyDownHandlers[t].call(n,e)},n.buttonHandleClick=function(e){if(e.preventDefault(),n.props.environment){var t=n.props.environment.document,r=t.body,i=t.activeElement;r&&r===i&&e.target.focus()}process.env.NODE_ENV===`test`?n.toggleMenu({type:ar}):n.internalSetTimeout(function(){return n.toggleMenu({type:ar})})},n.buttonHandleBlur=function(e){var t=e.target;n.internalSetTimeout(function(){if(!(n.isMouseDown||!n.props.environment)){var e=n.props.environment.document.activeElement;(e==null||e.id!==n.inputId)&&e!==t&&n.reset({type:or})}})},n.getLabelProps=function(e){return E({htmlFor:n.inputId,id:n.labelId},e)},n.getInputProps=function(e){var t=e===void 0?{}:e,r=t.onKeyDown,i=t.onBlur,a=t.onChange,o=t.onInput;t.onChangeText;var s=T(t,Br),c,l={};c=`onChange`;var u=n.getState(),d=u.inputValue,f=u.isOpen,p=u.highlightedIndex;if(!s.disabled){var m;l=(m={},m[c]=U(a,o,n.inputHandleChange),m.onKeyDown=U(r,n.inputHandleKeyDown),m.onBlur=U(i,n.inputHandleBlur),m)}return E({"aria-autocomplete":`list`,"aria-activedescendant":f&&typeof p==`number`&&p>=0?n.getItemId(p):void 0,"aria-controls":f?n.menuId:void 0,"aria-labelledby":s&&s[`aria-label`]?void 0:n.labelId,autoComplete:`off`,value:d,id:n.inputId},l,s)},n.inputHandleKeyDown=function(e){var t=Cr(e);t&&n.inputKeyDownHandlers[t]&&n.inputKeyDownHandlers[t].call(n,e)},n.inputHandleChange=function(e){n.internalSetState({type:rr,isOpen:!0,inputValue:e.target.value,highlightedIndex:n.props.defaultHighlightedIndex})},n.inputHandleBlur=function(){n.internalSetTimeout(function(){var e;if(!(n.isMouseDown||!n.props.environment)){var t=n.props.environment.document.activeElement;!(t==null||(e=t.dataset)==null)&&e.toggle&&n._rootNode&&n._rootNode.contains(t)||n.reset({type:nr})}})},n.menuRef=function(e){n._menuNode=e},n.getMenuProps=function(e,t){var r,i=e===void 0?{}:e,a=i.refKey,o=a===void 0?`ref`:a,s=i.ref,c=T(i,Vr),l=(t===void 0?{}:t).suppressRefError,u=l===void 0?!1:l;return n.getMenuProps.called=!0,n.getMenuProps.refKey=o,n.getMenuProps.suppressRefError=u,E((r={},r[o]=pr(s,n.menuRef),r.role=`listbox`,r[`aria-labelledby`]=c&&c[`aria-label`]?void 0:n.labelId,r.id=n.menuId,r),c)},n.getItemProps=function(e){var t,r=e===void 0?{}:e,i=r.onMouseMove,a=r.onMouseDown,o=r.onClick;r.onPress;var s=r.index,c=r.item,l=c===void 0?process.env.NODE_ENV===`production`?void 0:Pr(`getItemProps`,`item`):c,u=T(r,Hr);s===void 0?(n.items.push(l),s=n.items.indexOf(l)):n.items[s]=l;var d=`onClick`,f=o,p=(t={onMouseMove:U(i,function(){s!==n.getState().highlightedIndex&&(n.setHighlightedIndex(s,{type:Jn}),n.avoidScrolling=!0,n.internalSetTimeout(function(){return n.avoidScrolling=!1},250))}),onMouseDown:U(a,function(e){e.preventDefault()})},t[d]=U(f,function(){n.selectItemAtIndex(s,{type:tr})}),t),m=u.disabled?{onMouseDown:p.onMouseDown}:p;return E({id:n.getItemId(s),role:`option`,"aria-selected":n.getState().highlightedIndex===s},m,u)},n.clearItems=function(){n.items=[]},n.reset=function(e,t){e===void 0&&(e={}),e=Ir(e),n.internalSetState(function(t){var r=t.selectedItem;return E({isOpen:n.props.defaultIsOpen,highlightedIndex:n.props.defaultHighlightedIndex,inputValue:n.props.itemToString(r)},e)},t)},n.toggleMenu=function(e,t){e===void 0&&(e={}),e=Ir(e),n.internalSetState(function(t){var r=t.isOpen;return E({isOpen:!r},r&&{highlightedIndex:n.props.defaultHighlightedIndex},e)},function(){var r=n.getState(),i=r.isOpen,a=r.highlightedIndex;i&&n.getItemCount()>0&&typeof a==`number`&&n.setHighlightedIndex(a,e),kr(t)()})},n.openMenu=function(e){n.internalSetState({isOpen:!0},e)},n.closeMenu=function(e){n.internalSetState({isOpen:!1},e)},n.updateStatus=mr(function(){var e;if((e=n.props)!=null&&(e=e.environment)!=null&&e.document){var t=n.getState(),r=n.items[t.highlightedIndex],i=n.getItemCount(),a=n.props.getA11yStatusMessage(E({itemToString:n.props.itemToString,previousResultCount:n.previousResultCount,resultCount:i,highlightedItem:r},t));n.previousResultCount=i,_r(a,n.props.environment.document)}},200);var r=n.props,i=r.defaultHighlightedIndex,a=r.initialHighlightedIndex,o=a===void 0?i:a,s=r.defaultIsOpen,c=r.initialIsOpen,l=c===void 0?s:c,u=r.initialInputValue,d=u===void 0?``:u,f=r.initialSelectedItem,p=f===void 0?null:f,m=n.getState({highlightedIndex:o,isOpen:l,inputValue:d,selectedItem:p});return m.selectedItem!=null&&n.props.initialInputValue===void 0&&(m.inputValue=n.props.itemToString(m.selectedItem)),n.state=m,n}de(t,e);var n=t.prototype;return n.internalClearTimeouts=function(){this.timeoutIds.forEach(function(e){clearTimeout(e)}),this.timeoutIds=[]},n.getState=function(e){return e===void 0&&(e=this.state),xr(e,this.props)},n.getItemCount=function(){var e=this.items.length;return this.itemCount==null?this.props.itemCount!==void 0&&(e=this.props.itemCount):e=this.itemCount,e},n.getItemNodeFromIndex=function(e){return this.props.environment?this.props.environment.document.getElementById(this.getItemId(e)):null},n.scrollHighlightedItemIntoView=function(){var e=this.getItemNodeFromIndex(this.getState().highlightedIndex);this.props.scrollIntoView(e,this._menuNode)},n.moveHighlightedIndex=function(e,t){var n=this.getItemCount(),r=this.getState().highlightedIndex;if(n>0){var i=Tr(r,e,{length:n},this.isItemDisabled,!0);this.setHighlightedIndex(i,t)}},n.getStateAndHelpers=function(){var e=this.getState(),t=e.highlightedIndex,n=e.inputValue,r=e.selectedItem,i=e.isOpen,a=this.props.itemToString,o=this.id,s=this.getRootProps,c=this.getToggleButtonProps,l=this.getLabelProps,u=this.getMenuProps,d=this.getInputProps,f=this.getItemProps,p=this.openMenu,m=this.closeMenu,h=this.toggleMenu,g=this.selectItem,_=this.selectItemAtIndex,v=this.selectHighlightedItem,y=this.setHighlightedIndex,b=this.clearSelection,x=this.clearItems;return{getRootProps:s,getToggleButtonProps:c,getLabelProps:l,getMenuProps:u,getInputProps:d,getItemProps:f,reset:this.reset,openMenu:p,closeMenu:m,toggleMenu:h,selectItem:g,selectItemAtIndex:_,selectHighlightedItem:v,setHighlightedIndex:y,clearSelection:b,clearItems:x,setItemCount:this.setItemCount,unsetItemCount:this.unsetItemCount,setState:this.internalSetState,itemToString:a,id:o,highlightedIndex:t,inputValue:n,isOpen:i,selectedItem:r}},n.componentDidMount=function(){var e=this;if(process.env.NODE_ENV!==`production`&&this.getMenuProps.called&&!this.getMenuProps.suppressRefError&&Wr(this._menuNode,this.getMenuProps),!this.props.environment)this.cleanup=function(){e.internalClearTimeouts()};else{var t=function(){e.isMouseDown=!0},n=function(t){e.isMouseDown=!1,!Dr(t.target,[e._rootNode,e._menuNode],e.props.environment)&&e.getState().isOpen&&e.reset({type:qn},function(){return e.props.onOuterClick(e.getStateAndHelpers())})},r=function(){e.isTouchMove=!1},i=function(){e.isTouchMove=!0},a=function(t){var n=Dr(t.target,[e._rootNode,e._menuNode],e.props.environment,!1);!e.isTouchMove&&!n&&e.getState().isOpen&&e.reset({type:cr},function(){return e.props.onOuterClick(e.getStateAndHelpers())})},o=this.props.environment;o.addEventListener(`mousedown`,t),o.addEventListener(`mouseup`,n),o.addEventListener(`touchstart`,r),o.addEventListener(`touchmove`,i),o.addEventListener(`touchend`,a),this.cleanup=function(){e.internalClearTimeouts(),e.updateStatus.cancel(),o.removeEventListener(`mousedown`,t),o.removeEventListener(`mouseup`,n),o.removeEventListener(`touchstart`,r),o.removeEventListener(`touchmove`,i),o.removeEventListener(`touchend`,a)}}},n.shouldScroll=function(e,t){var n=(this.props.highlightedIndex===void 0?this.getState():this.props).highlightedIndex,r=(t.highlightedIndex===void 0?e:t).highlightedIndex;return n&&this.getState().isOpen&&!e.isOpen||n!==r},n.componentDidUpdate=function(e,t){process.env.NODE_ENV!==`production`&&(Er(this.state,e,this.props),this.getMenuProps.called&&!this.getMenuProps.suppressRefError&&Wr(this._menuNode,this.getMenuProps)),this.props.selectedItem!==void 0&&this.props.selectedItemChanged(e.selectedItem,this.props.selectedItem)&&this.internalSetState({type:sr,inputValue:this.props.itemToString(this.props.selectedItem)}),!this.avoidScrolling&&this.shouldScroll(t,e)&&this.scrollHighlightedItemIntoView(),this.updateStatus()},n.componentWillUnmount=function(){this.cleanup()},n.render=function(){var e=jr(this.props.children,yr);this.clearItems(),this.getRootProps.called=!1,this.getRootProps.refKey=void 0,this.getRootProps.suppressRefError=void 0,this.getMenuProps.called=!1,this.getMenuProps.refKey=void 0,this.getMenuProps.suppressRefError=void 0,this.getLabelProps.called=!1,this.getInputProps.called=!1;var t=jr(e(this.getStateAndHelpers()));if(!t)return null;if(this.getRootProps.called||this.props.suppressRefError)return process.env.NODE_ENV!==`production`&&!this.getRootProps.suppressRefError&&!this.props.suppressRefError&&Gr(t,this.getRootProps),t;if(Mr(t))return(0,f.cloneElement)(t,this.getRootProps(Nr(t)));if(process.env.NODE_ENV!==`production`)throw Error(`downshift: If you return a non-DOM element, you must apply the getRootProps function`)},t}(f.Component);return e.defaultProps={defaultHighlightedIndex:null,defaultIsOpen:!1,getA11yStatusMessage:Ar,itemToString:function(e){return e==null?``:(process.env.NODE_ENV!==`production`&&Lr(e)&&!e.hasOwnProperty(`toString`)&&console.warn("downshift: An object was passed to the default implementation of `itemToString`. You should probably provide your own `itemToString` implementation. Please refer to the `itemToString` API documentation.",`The object that was passed:`,e),String(e))},onStateChange:yr,onInputValueChange:yr,onUserAction:yr,onChange:yr,onSelect:yr,onOuterClick:yr,selectedItemChanged:function(e,t){return e!==t},environment:typeof window>`u`?void 0:window,stateReducer:function(e,t){return t},suppressRefError:!1,scrollIntoView:Sr},e.stateChangeTypes=lr,e}();process.env.NODE_ENV!==`production`&&(Ur.propTypes={children:S.default.func,defaultHighlightedIndex:S.default.number,defaultIsOpen:S.default.bool,initialHighlightedIndex:S.default.number,initialSelectedItem:S.default.any,initialInputValue:S.default.string,initialIsOpen:S.default.bool,getA11yStatusMessage:S.default.func,itemToString:S.default.func,onChange:S.default.func,onSelect:S.default.func,onStateChange:S.default.func,onInputValueChange:S.default.func,onUserAction:S.default.func,onOuterClick:S.default.func,selectedItemChanged:S.default.func,stateReducer:S.default.func,itemCount:S.default.number,id:S.default.string,environment:S.default.shape({addEventListener:S.default.func.isRequired,removeEventListener:S.default.func.isRequired,document:S.default.shape({createElement:S.default.func.isRequired,getElementById:S.default.func.isRequired,activeElement:S.default.any.isRequired,body:S.default.any.isRequired}).isRequired,Node:S.default.func.isRequired}),suppressRefError:S.default.bool,scrollIntoView:S.default.func,selectedItem:S.default.any,isOpen:S.default.bool,inputValue:S.default.string,highlightedIndex:S.default.number,labelId:S.default.string,inputId:S.default.string,menuId:S.default.string,getItemId:S.default.func});function Wr(e,t){var n=t.refKey;e||console.error(`downshift: The ref prop "`+n+`" from getMenuProps was not applied correctly on your menu element.`)}function Gr(e,t){var n=t.refKey,r=n!==`ref`,i=!Mr(e);i&&!r&&!(0,zn.isForwardRef)(e)?console.error(`downshift: You returned a non-DOM element. You must specify a refKey in getRootProps`):!i&&r&&console.error(`downshift: You returned a DOM element. You should not specify a refKey in getRootProps. You specified "`+n+`"`),!(0,zn.isForwardRef)(e)&&!Nr(e)[n]&&console.error(`downshift: You must apply the ref prop "`+n+`" from getRootProps onto your root element.`)}function Kr(e){return``+e.slice(0,1).toUpperCase()+e.slice(1)}function qr(e,t,n,r){for(var i=e.type,a={},o=Object.keys(n),s=0,c=o;s<c.length;s++){var l=c[s];Jr(l,e,t,n,r),r[l]!==n[l]&&(a[l]=r[l])}typeof t.onStateChange==`function`&&Object.keys(a).length&&t.onStateChange(E({type:i},a))}function Jr(e,t,n,r,i){if(i[e]!==r[e]){var a=n[`on`+Kr(e)+`Change`];if(typeof a==`function`){var o=t.type;a(E({type:o},i))}}}function Yr(e,t,n,r){var i=f.useRef({}),a=f.useRef(),o=f.useCallback(function(t,n){a.current=n,t=xr(t,n.props);var r=e(t,n),i=n.props.stateReducer(t,E({},n,{changes:r}));return E({},t,i)},[e]),s=f.useReducer(o,t,n),c=s[0],l=s[1],u=fr(t),d=f.useCallback(function(e){return l(E({},e,{props:u.current}))},[u]),p=a.current;return f.useEffect(function(){var e=xr(i.current,p?.props);p&&!r(e,c)&&qr(p,p.props,e,c),i.current=c},[c,p,r]),[c,d]}function Xr(e,t,n,r){var i=Yr(e,t,n,r),a=i[0],o=i[1];return[xr(a,t),o]}function Zr(e,t,n,r){if(e!==void 0&&t!==void 0)return[e,t];if(e!==void 0){if(n.indexOf(e)<0)throw Error(r);return[e,n.indexOf(e)]}if(t!==void 0){var i=n[t];if(i===void 0)throw Error(r);return[i,t]}throw Error(r)}function Qr(){var e=f.useRef(!0);return f.useEffect(function(){return e.current=!1,function(){e.current=!0}},[]),e.current}var $r={environment:S.default.shape({addEventListener:S.default.func.isRequired,removeEventListener:S.default.func.isRequired,document:S.default.shape({createElement:S.default.func.isRequired,getElementById:S.default.func.isRequired,activeElement:S.default.any.isRequired,body:S.default.any.isRequired}).isRequired,Node:S.default.func.isRequired}),itemToKey:S.default.func,stateReducer:S.default.func};function ei(e,t){return e===void 0?t:e}function ti(e,t,n,r){return e===void 0?t===void 0?n===void 0?r:n:t:e}var ni=mr(function(e,t){_r(e,t)},200);function ri(e,t,n,r){var i=r?.document,a=Qr();f.useEffect(function(){!e||a||!i||ni(e(t),i)},n),f.useEffect(function(){return function(){ni.cancel(),vr(i)}},[i])}var ii=E({},$r,{getA11yStatusMessage:S.default.func,highlightedIndex:S.default.number,defaultHighlightedIndex:S.default.number,initialHighlightedIndex:S.default.number,isOpen:S.default.bool,defaultIsOpen:S.default.bool,initialIsOpen:S.default.bool,selectedItem:S.default.any,initialSelectedItem:S.default.any,defaultSelectedItem:S.default.any,id:S.default.string,labelId:S.default.string,menuId:S.default.string,getItemId:S.default.func,toggleButtonId:S.default.string,onSelectedItemChange:S.default.func,onHighlightedIndexChange:S.default.func,onStateChange:S.default.func,onIsOpenChange:S.default.func,scrollIntoView:S.default.func}),ai={itemToString:function(e){return e?String(e):``},itemToKey:function(e){return e},isItemDisabled:function(e){return!1},stateReducer:function(e,t){return t.changes},scrollIntoView:Sr,environment:typeof window>`u`?void 0:window},oi={highlightedIndex:-1,isOpen:!1,selectedItem:null,inputValue:``},si=E({},f).useId,ci=typeof si==`function`?li:ui;function li(e){var t=e.id,n=e.labelId,r=e.menuId,i=e.getItemId,a=e.toggleButtonId,o=e.inputId,s=`downshift-`+si();return t||(t=s),f.useMemo(function(){return{labelId:n??t+`-label`,menuId:r??t+`-menu`,getItemId:i??function(e){return t+`-item-`+e},toggleButtonId:a??t+`-toggle-button`,inputId:o??t+`-input`}},[i,t,o,n,r,a])}function ui(e){var t=e.id,n=e.labelId,r=e.menuId,i=e.getItemId,a=e.toggleButtonId,o=e.inputId,s=f.useRef(t??`downshift-`+dr()).current;return f.useMemo(function(){return{labelId:n??s+`-label`,menuId:r??s+`-menu`,getItemId:i??function(e){return s+`-item-`+e},toggleButtonId:a??s+`-toggle-button`,inputId:o??s+`-input`}},[i,o,n,r,a,s])}function di(e,t,n){var r=ei(n,oi.highlightedIndex);return e[r]&&t(e[r],r)?-1:r}function fi(e,t,n,r,i,a){return E({isOpen:!1,highlightedIndex:-1},e.length&&i>=0&&E({selectedItem:e[i],isOpen:ei(n,oi.isOpen),highlightedIndex:ei(r,oi.highlightedIndex)},a&&{inputValue:t(e[i])}))}function pi(e,t,n,r,i,a,o,s){return e.length===0?-1:t!==void 0&&o===t&&(t===-1||e[t]!==void 0&&!r(e[t],t))?t:n!==void 0&&(n===-1||e[n]!==void 0&&!r(e[n],n))?n:a?e.findIndex(function(e){return i(a)===i(e)}):s<0&&e[e.length-1]&&!r(e[e.length-1],e.length-1)?e.length-1:s>0&&e[0]&&!r(e[0],0)?0:-1}function mi(e){var t=ti(e.selectedItem,e.initialSelectedItem,e.defaultSelectedItem,oi.selectedItem),n=ti(e.isOpen,e.initialIsOpen,e.defaultIsOpen,oi.isOpen),r=hi(e),i=ti(e.inputValue,e.initialInputValue,e.defaultInputValue,oi.inputValue);return{highlightedIndex:r<0&&t&&n?e.items.findIndex(function(n){return e.itemToKey(n)===e.itemToKey(t)}):r,isOpen:n,selectedItem:t,inputValue:i}}function hi(e){var t=ti(e.highlightedIndex,e.initialHighlightedIndex,e.defaultHighlightedIndex,oi.highlightedIndex);return t>-1&&e.items[t]&&e.isItemDisabled(e.items[t],t)?-1:t}var gi=yr;process.env.NODE_ENV!==`production`&&(gi=function(e){var t=e.props,n=e.state,r=f.useRef(t),i=Qr();f.useEffect(function(){i||(Er(n,r.current,t),r.current=t)},[n,t,i])});function _i(e,t,n){var r=f.useRef({isMouseDown:!1,isTouchMove:!1,isTouchEnd:!1}),i=f.useCallback(function(){return n.map(function(e){return e.current})},[n]);return f.useEffect(function(){if(!e)return yr;function n(){r.current.isTouchEnd=!1,r.current.isMouseDown=!0}function a(n){r.current.isMouseDown=!1,Dr(n.target,i(),e)||t()}function o(){r.current.isTouchEnd=!1,r.current.isTouchMove=!1}function s(){r.current.isTouchMove=!0}function c(n){r.current.isTouchEnd=!0,!r.current.isTouchMove&&!Dr(n.target,i(),e,!1)&&t()}return e.addEventListener(`mousedown`,n),e.addEventListener(`mouseup`,a),e.addEventListener(`touchstart`,o),e.addEventListener(`touchmove`,s),e.addEventListener(`touchend`,c),function(){e.removeEventListener(`mousedown`,n),e.removeEventListener(`mouseup`,a),e.removeEventListener(`touchstart`,o),e.removeEventListener(`touchmove`,s),e.removeEventListener(`touchend`,c)}},[e,i,t]),r.current}var vi=function(){return yr};process.env.NODE_ENV!==`production`&&(vi=function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];var r=f.useRef(t.reduce(function(e,t){return e[t]={},e},{}));return f.useEffect(function(){Object.keys(r.current).forEach(function(e){var t=r.current[e];if(!Object.keys(t).length){console.error(`downshift: You forgot to call the `+e+` getter function on your component / element.`);return}var n=t.suppressRefError,i=t.refKey,a=t.elementRef;n||a!=null&&a.current||console.error(`downshift: The ref prop "`+i+`" from `+e+` was not applied correctly on your element.`)})},[]),f.useCallback(function(e,t,n,i){r.current[e]={suppressRefError:t,refKey:n,elementRef:i}},[])});var yi=typeof window<`u`&&window.document!==void 0&&window.document.createElement!==void 0?f.useLayoutEffect:f.useEffect;function bi(e,t,n,r,i,a){var o=f.useRef(!0);return yi(function(){if(!(t<0||!n||!Object.keys(i).length))if(o.current){var s=i[a(t)];s&&r&&e(s,r)}else o.current=!0},[t]),f.useCallback(function(){o.current=!1},[])}function xi(e,t){return e.isOpen===t.isOpen&&e.inputValue===t.inputValue&&e.highlightedIndex===t.highlightedIndex&&e.selectedItem===t.selectedItem}function Si(e,t,n,r){var i=n.type,a;switch(i){case r.ItemMouseMove:a={highlightedIndex:n.disabled?-1:n.index};break;case r.MenuMouseLeave:a={highlightedIndex:-1};break;case r.ToggleButtonClick:case r.FunctionToggleMenu:a={isOpen:!e.isOpen,highlightedIndex:e.isOpen?-1:pi(t.items,t.initialHighlightedIndex,t.defaultHighlightedIndex,t.isItemDisabled,t.itemToKey,e.selectedItem,e.highlightedIndex,0)};break;case r.FunctionOpenMenu:a={isOpen:!0,highlightedIndex:pi(t.items,t.initialHighlightedIndex,t.defaultHighlightedIndex,t.isItemDisabled,t.itemToKey,e.selectedItem,e.highlightedIndex,0)};break;case r.FunctionCloseMenu:a={isOpen:!1};break;case r.FunctionSetHighlightedIndex:var o=n.highlightedIndex;a={highlightedIndex:t.isItemDisabled(t.items[o],o)?-1:o};break;case r.FunctionSetInputValue:a={inputValue:n.inputValue};break;case r.FunctionReset:a={highlightedIndex:di(t.items,t.isItemDisabled,t.defaultHighlightedIndex),isOpen:ei(t.defaultIsOpen,oi.isOpen),selectedItem:ei(t.defaultSelectedItem,oi.selectedItem),inputValue:ei(t.defaultInputValue,oi.inputValue)};break;default:throw Error(`Reducer called without proper action type.`)}return E({},e,a)}var Ci=E({},ii,{items:S.default.array.isRequired,isItemDisabled:S.default.func});function wi(e){for(var t=e.keysSoFar,n=e.highlightedIndex,r=e.items,i=e.itemToString,a=e.isItemDisabled,o=t.toLowerCase(),s=0;s<r.length;s++){var c=(s+n+ +(t.length<2))%r.length,l=r[c];if(l!==void 0&&i(l).toLowerCase().startsWith(o)&&!a(l,c))return c}return n}var Ti=process.env.NODE_ENV===`production`?0:`__togglebutton_click__`,Ei=process.env.NODE_ENV===`production`?1:`__togglebutton_keydown_arrow_down__`,Di=process.env.NODE_ENV===`production`?2:`__togglebutton_keydown_arrow_up__`,Oi=process.env.NODE_ENV===`production`?3:`__togglebutton_keydown_character__`,ki=process.env.NODE_ENV===`production`?4:`__togglebutton_keydown_escape__`,Ai=process.env.NODE_ENV===`production`?5:`__togglebutton_keydown_home__`,ji=process.env.NODE_ENV===`production`?6:`__togglebutton_keydown_end__`,Mi=process.env.NODE_ENV===`production`?7:`__togglebutton_keydown_enter__`,Ni=process.env.NODE_ENV===`production`?8:`__togglebutton_keydown_space_button__`,Pi=process.env.NODE_ENV===`production`?9:`__togglebutton_keydown_page_up__`,Fi=process.env.NODE_ENV===`production`?10:`__togglebutton_keydown_page_down__`,Ii=process.env.NODE_ENV===`production`?11:`__togglebutton_blur__`,Li=process.env.NODE_ENV===`production`?12:`__menu_mouse_leave__`,Ri=process.env.NODE_ENV===`production`?13:`__item_mouse_move__`,zi=process.env.NODE_ENV===`production`?14:`__item_click__`,Bi=process.env.NODE_ENV===`production`?15:`__function_toggle_menu__`,Vi=process.env.NODE_ENV===`production`?16:`__function_open_menu__`,Hi=process.env.NODE_ENV===`production`?17:`__function_close_menu__`,Ui=process.env.NODE_ENV===`production`?18:`__function_set_highlighted_index__`,Wi=process.env.NODE_ENV===`production`?19:`__function_select_item__`,Gi=process.env.NODE_ENV===`production`?20:`__function_set_input_value__`,Ki=process.env.NODE_ENV===`production`?21:`__function_reset__`,qi=Object.freeze({__proto__:null,FunctionCloseMenu:Hi,FunctionOpenMenu:Vi,FunctionReset:Ki,FunctionSelectItem:Wi,FunctionSetHighlightedIndex:Ui,FunctionSetInputValue:Gi,FunctionToggleMenu:Bi,ItemClick:zi,ItemMouseMove:Ri,MenuMouseLeave:Li,ToggleButtonBlur:Ii,ToggleButtonClick:Ti,ToggleButtonKeyDownArrowDown:Ei,ToggleButtonKeyDownArrowUp:Di,ToggleButtonKeyDownCharacter:Oi,ToggleButtonKeyDownEnd:ji,ToggleButtonKeyDownEnter:Mi,ToggleButtonKeyDownEscape:ki,ToggleButtonKeyDownHome:Ai,ToggleButtonKeyDownPageDown:Fi,ToggleButtonKeyDownPageUp:Pi,ToggleButtonKeyDownSpaceButton:Ni});function Ji(e,t){var n=t.type,r=t.props,i;switch(n){case zi:i={isOpen:ei(r.defaultIsOpen,oi.isOpen),highlightedIndex:di(r.items,r.isItemDisabled,r.defaultHighlightedIndex),selectedItem:r.items[t.index]};break;case Oi:var a=t.key,o=``+e.inputValue+a;i={inputValue:o,highlightedIndex:wi({keysSoFar:o,highlightedIndex:!e.isOpen&&e.selectedItem?r.items.findIndex(function(t){return r.itemToKey(t)===r.itemToKey(e.selectedItem)}):e.highlightedIndex,items:r.items,itemToString:r.itemToString,isItemDisabled:r.isItemDisabled}),isOpen:!0};break;case Ei:var s=t.altKey;i={highlightedIndex:e.isOpen?Tr(e.highlightedIndex,1,r.items,r.isItemDisabled):s&&e.selectedItem==null?-1:pi(r.items,r.initialHighlightedIndex,r.defaultHighlightedIndex,r.isItemDisabled,r.itemToKey,e.selectedItem,e.highlightedIndex,1),isOpen:!0};break;case Di:var c=t.altKey;i=e.isOpen&&c?fi(r.items,r.itemToString,r.defaultIsOpen,r.defaultHighlightedIndex,e.highlightedIndex,!1):{highlightedIndex:e.isOpen?Tr(e.highlightedIndex,-1,r.items,r.isItemDisabled):pi(r.items,r.initialHighlightedIndex,r.defaultHighlightedIndex,r.isItemDisabled,r.itemToKey,e.selectedItem,e.highlightedIndex,-1),isOpen:!0};break;case Mi:case Ni:i=fi(r.items,r.itemToString,r.defaultIsOpen,r.defaultHighlightedIndex,e.highlightedIndex,!1);break;case Ai:i={highlightedIndex:wr(0,!1,r.items,r.isItemDisabled),isOpen:!0};break;case ji:i={highlightedIndex:wr(r.items.length-1,!0,r.items,r.isItemDisabled),isOpen:!0};break;case Pi:i={highlightedIndex:Tr(e.highlightedIndex,-10,r.items,r.isItemDisabled)};break;case Fi:i={highlightedIndex:Tr(e.highlightedIndex,10,r.items,r.isItemDisabled)};break;case ki:i={isOpen:!1,highlightedIndex:-1};break;case Ii:i=E({isOpen:!1,highlightedIndex:-1},e.highlightedIndex>=0&&r.items.length&&{selectedItem:r.items[e.highlightedIndex]});break;case Wi:i={selectedItem:t.selectedItem};break;default:return Si(e,r,t,qi)}return E({},e,i)}var Yi=[`onClick`],Xi=[`onMouseLeave`,`refKey`,`ref`,`aria-label`],Zi=[`onBlur`,`onClick`,`onPress`,`onKeyDown`,`refKey`,`ref`],Qi=[`item`,`index`,`onMouseMove`,`onClick`,`onMouseDown`,`onPress`,`refKey`,`disabled`,`ref`];$i.stateChangeTypes=qi;function $i(e){e===void 0&&(e={}),br(e,$i,Ci);var t=E({},ai,e),n=t.scrollIntoView,r=t.environment,i=t.getA11yStatusMessage,a=Xr(Ji,t,mi,xi),o=a[0],s=a[1],c=o.isOpen,l=o.highlightedIndex,u=o.selectedItem,d=o.inputValue,p=(0,f.useRef)(null),m=(0,f.useRef)(null),h=(0,f.useRef)({}),g=(0,f.useRef)(null),_=ci(t),v=fr({state:o,props:t});ri(i,o,[c,l,u,d],r);var y=bi(n,l,c,m.current,h.current,_.getItemId);(0,f.useEffect)(function(){return g.current=mr(function(e){e({type:Gi,inputValue:``})},500),function(){var e;(e=g.current)==null||e.cancel()}},[]),(0,f.useEffect)(function(){d&&(g.current==null||g.current(s))},[s,d]),gi({props:t,state:o}),(0,f.useEffect)(function(){ti(t.isOpen,t.initialIsOpen,t.defaultIsOpen,oi.isOpen)&&p.current&&p.current.focus()},[]);var b=_i(r,(0,f.useCallback)(function(){v.current.state.isOpen&&s({type:Ii})},[s,v]),(0,f.useMemo)(function(){return[m,p]},[])),x=vi(`getMenuProps`,`getToggleButtonProps`);(0,f.useEffect)(function(){c||(h.current={})},[c]);var S=(0,f.useMemo)(function(){return{ArrowDown:function(e){e.preventDefault(),s({type:Ei,altKey:e.altKey})},ArrowUp:function(e){e.preventDefault(),s({type:Di,altKey:e.altKey})},Home:function(e){e.preventDefault(),s({type:Ai})},End:function(e){e.preventDefault(),s({type:ji})},Escape:function(){v.current.state.isOpen&&s({type:ki})},Enter:function(e){e.preventDefault(),s({type:v.current.state.isOpen?Mi:Ti})},PageUp:function(e){v.current.state.isOpen&&(e.preventDefault(),s({type:Pi}))},PageDown:function(e){v.current.state.isOpen&&(e.preventDefault(),s({type:Fi}))}," ":function(e){e.preventDefault();var t=v.current.state;if(!t.isOpen){s({type:Ti});return}t.inputValue?s({type:Oi,key:` `}):s({type:Ni})}}},[s,v]),C=(0,f.useCallback)(function(e){var t=e??{},n=t.onClick,r=T(t,Yi);return E({id:_.labelId,htmlFor:_.toggleButtonId,onClick:U(n,function(){var e;(e=p.current)==null||e.focus()})},r)},[_]),w=(0,f.useCallback)(function(e,t){var n,r=e??{},i=r.onMouseLeave,a=r.refKey,o=a===void 0?`ref`:a,c=r.ref,l=r[`aria-label`],u=T(r,Xi),d=(t??{}).suppressRefError;return x(`getMenuProps`,d===void 0?!1:d,o,m),E((n={},n[o]=pr(c,function(e){m.current=e}),n.id=_.menuId,n.role=`listbox`,n[`aria-label`]=l,n[`aria-labelledby`]=l?void 0:``+_.labelId,n.onMouseLeave=U(i,function(){s({type:Li})}),n),u)},[s,x,_]),D=(0,f.useCallback)(function(e,t){var n,r=e??{},i=r.onBlur,a=r.onClick;r.onPress;var o=r.onKeyDown,c=r.refKey,l=c===void 0?`ref`:c,u=r.ref,d=T(r,Zi),f=(t??{}).suppressRefError,m=f===void 0?!1:f,h=v.current.state,g=function(){s({type:Ti})},y=function(){h.isOpen&&!b.isMouseDown&&s({type:Ii})},C=function(e){var t=Cr(e);t&&t in S?S[t](e):/^\S{1}$/.test(t)&&s({type:Oi,key:t})},w=E((n={},n[l]=pr(u,function(e){p.current=e}),n[`aria-activedescendant`]=h.isOpen&&h.highlightedIndex>-1?_.getItemId(h.highlightedIndex):``,n[`aria-controls`]=_.menuId,n[`aria-expanded`]=v.current.state.isOpen,n[`aria-haspopup`]=`listbox`,n[`aria-labelledby`]=d[`aria-label`]?void 0:``+_.labelId,n.id=_.toggleButtonId,n.role=`combobox`,n.tabIndex=0,n.onBlur=U(i,y),n),d);return d.disabled||Object.assign(w,{onClick:U(a,g),onKeyDown:U(o,C)}),x(`getToggleButtonProps`,m,l,p),w},[s,_,v,b,x,S]),O=(0,f.useCallback)(function(e){var t,n=e??{},r=n.item,i=n.index,a=n.onMouseMove,o=n.onClick,c=n.onMouseDown;n.onPress;var l=n.refKey,u=l===void 0?`ref`:l,d=n.disabled,f=n.ref,p=T(n,Qi);d!==void 0&&console.warn(`Passing "disabled" as an argument to getItemProps is not supported anymore. Please use the isItemDisabled prop from useSelect.`);var m=v.current,g=m.state,x=m.props,S=Zr(r,i,x.items,`Pass either item or index to getItemProps!`),C=S[0],w=S[1],D=x.isItemDisabled(C,w),O=function(){b.isTouchEnd||w===g.highlightedIndex||(y(),s({type:Ri,index:w,disabled:D}))},k=function(){s({type:zi,index:w})},A=E((t={},t[u]=pr(f,function(e){e&&(h.current[_.getItemId(w)]=e)}),t[`aria-disabled`]=D,t[`aria-selected`]=C===g.selectedItem,t.id=_.getItemId(w),t.role=`option`,t.onMouseMove=U(a,O),t.onMouseDown=U(c,function(e){return e.preventDefault()}),t),p);return D||Object.assign(A,{onClick:U(o,k)}),A},[v,_,b,y,s]),k=(0,f.useCallback)(function(){s({type:Bi})},[s]),A=(0,f.useCallback)(function(){s({type:Hi})},[s]);return{getToggleButtonProps:D,getLabelProps:C,getMenuProps:w,getItemProps:O,toggleMenu:k,openMenu:(0,f.useCallback)(function(){s({type:Vi})},[s]),closeMenu:A,setHighlightedIndex:(0,f.useCallback)(function(e){s({type:Ui,highlightedIndex:e})},[s]),selectItem:(0,f.useCallback)(function(e){s({type:Wi,selectedItem:e})},[s]),reset:(0,f.useCallback)(function(){s({type:Ki})},[s]),setInputValue:(0,f.useCallback)(function(e){s({type:Gi,inputValue:e})},[s]),highlightedIndex:l,isOpen:c,selectedItem:u,inputValue:d}}function ea(e){var t=mi(e),n=t.selectedItem,r=t.inputValue;return r===``&&n&&e.defaultInputValue===void 0&&e.initialInputValue===void 0&&e.inputValue===void 0&&(r=e.itemToString(n)),E({},t,{inputValue:r})}var ta=process.env.NODE_ENV===`production`?0:`__input_keydown_arrow_down__`,na=process.env.NODE_ENV===`production`?1:`__input_keydown_arrow_up__`,ra=process.env.NODE_ENV===`production`?2:`__input_keydown_escape__`,ia=process.env.NODE_ENV===`production`?3:`__input_keydown_home__`,aa=process.env.NODE_ENV===`production`?4:`__input_keydown_end__`,oa=process.env.NODE_ENV===`production`?5:`__input_keydown_page_up__`,sa=process.env.NODE_ENV===`production`?6:`__input_keydown_page_down__`,ca=process.env.NODE_ENV===`production`?7:`__input_keydown_enter__`,la=process.env.NODE_ENV===`production`?8:`__input_change__`,ua=process.env.NODE_ENV===`production`?9:`__input_blur__`,da=process.env.NODE_ENV===`production`?10:`__input_click__`,fa=process.env.NODE_ENV===`production`?11:`__menu_mouse_leave__`,pa=process.env.NODE_ENV===`production`?12:`__item_mouse_move__`,ma=process.env.NODE_ENV===`production`?13:`__item_click__`,ha=process.env.NODE_ENV===`production`?14:`__togglebutton_click__`,ga=process.env.NODE_ENV===`production`?15:`__function_toggle_menu__`,_a=process.env.NODE_ENV===`production`?16:`__function_open_menu__`,va=process.env.NODE_ENV===`production`?17:`__function_close_menu__`,ya=process.env.NODE_ENV===`production`?18:`__function_set_highlighted_index__`,ba=process.env.NODE_ENV===`production`?19:`__function_select_item__`,xa=process.env.NODE_ENV===`production`?20:`__function_set_input_value__`,Sa=process.env.NODE_ENV===`production`?21:`__function_reset__`,Ca=process.env.NODE_ENV===`production`?22:`__controlled_prop_updated_selected_item__`,wa=Object.freeze({__proto__:null,ControlledPropUpdatedSelectedItem:Ca,FunctionCloseMenu:va,FunctionOpenMenu:_a,FunctionReset:Sa,FunctionSelectItem:ba,FunctionSetHighlightedIndex:ya,FunctionSetInputValue:xa,FunctionToggleMenu:ga,InputBlur:ua,InputChange:la,InputClick:da,InputKeyDownArrowDown:ta,InputKeyDownArrowUp:na,InputKeyDownEnd:aa,InputKeyDownEnter:ca,InputKeyDownEscape:ra,InputKeyDownHome:ia,InputKeyDownPageDown:sa,InputKeyDownPageUp:oa,ItemClick:ma,ItemMouseMove:pa,MenuMouseLeave:fa,ToggleButtonClick:ha});function Ta(e,t,n,r){var i=(0,f.useRef)(null),a=Yr(e,t,n,r),o=a[0],s=a[1],c=Qr();return(0,f.useEffect)(function(){t.selectedItem!==void 0&&(c||t.itemToKey(t.selectedItem)!==t.itemToKey(i.current)&&s({type:Ca,inputValue:t.itemToString(t.selectedItem)}),i.current=o.selectedItem===i.current?t.selectedItem:o.selectedItem)},[o.selectedItem,t.selectedItem]),[xr(o,t),s]}var Ea=E({},ii,{items:S.default.array.isRequired,isItemDisabled:S.default.func,inputValue:S.default.string,defaultInputValue:S.default.string,initialInputValue:S.default.string,inputId:S.default.string,onInputValueChange:S.default.func});function Da(e,t){var n=t.type,r=t.props,i;switch(n){case ma:i={isOpen:ei(r.defaultIsOpen,oi.isOpen),highlightedIndex:di(r.items,r.isItemDisabled,r.defaultHighlightedIndex),selectedItem:r.items[t.index],inputValue:r.itemToString(r.items[t.index])};break;case ta:i=e.isOpen?{highlightedIndex:Tr(e.highlightedIndex,1,r.items,r.isItemDisabled,!0)}:{highlightedIndex:t.altKey&&e.selectedItem==null?-1:pi(r.items,r.initialHighlightedIndex,r.defaultHighlightedIndex,r.isItemDisabled,r.itemToKey,e.selectedItem,e.highlightedIndex,1),isOpen:r.items.length>=0};break;case na:i=e.isOpen?t.altKey?fi(r.items,r.itemToString,r.defaultIsOpen,r.defaultHighlightedIndex,e.highlightedIndex,!0):{highlightedIndex:Tr(e.highlightedIndex,-1,r.items,r.isItemDisabled,!0)}:{highlightedIndex:pi(r.items,r.initialHighlightedIndex,r.defaultHighlightedIndex,r.isItemDisabled,r.itemToKey,e.selectedItem,e.highlightedIndex,-1),isOpen:r.items.length>=0};break;case ca:i=fi(r.items,r.itemToString,r.defaultIsOpen,r.defaultHighlightedIndex,e.highlightedIndex,!0);break;case ra:i=E({isOpen:!1,highlightedIndex:-1},!e.isOpen&&{selectedItem:null,inputValue:``});break;case oa:i={highlightedIndex:Tr(e.highlightedIndex,-10,r.items,r.isItemDisabled,!0)};break;case sa:i={highlightedIndex:Tr(e.highlightedIndex,10,r.items,r.isItemDisabled,!0)};break;case ia:i={highlightedIndex:wr(0,!1,r.items,r.isItemDisabled)};break;case aa:i={highlightedIndex:wr(r.items.length-1,!0,r.items,r.isItemDisabled)};break;case ua:i=E({isOpen:!1,highlightedIndex:-1},e.highlightedIndex>=0&&r.items.length&&t.selectItem&&{selectedItem:r.items[e.highlightedIndex],inputValue:r.itemToString(r.items[e.highlightedIndex])});break;case la:i={isOpen:!0,highlightedIndex:di(r.items,r.isItemDisabled,r.defaultHighlightedIndex),inputValue:t.inputValue};break;case da:i={isOpen:!e.isOpen,highlightedIndex:e.isOpen?-1:pi(r.items,r.initialHighlightedIndex,r.defaultHighlightedIndex,r.isItemDisabled,r.itemToKey,e.selectedItem,e.highlightedIndex,0)};break;case ba:i={selectedItem:t.selectedItem,inputValue:r.itemToString(t.selectedItem)};break;case Ca:i={inputValue:t.inputValue};break;default:return Si(e,r,t,wa)}return E({},e,i)}var Oa=[`onMouseLeave`,`refKey`,`ref`,`aria-label`],ka=[`item`,`index`,`refKey`,`ref`,`onMouseMove`,`onMouseDown`,`onClick`,`onPress`,`disabled`],Aa=[`onClick`,`onPress`,`refKey`,`ref`],ja=[`aria-label`,`onKeyDown`,`onChange`,`onInput`,`onBlur`,`onChangeText`,`onClick`,`refKey`,`ref`];Ma.stateChangeTypes=wa;function Ma(e){e===void 0&&(e={}),br(e,Ma,Ea);var t=E({},ai,e),n=t.items,r=t.scrollIntoView,i=t.environment,a=t.getA11yStatusMessage,o=Ta(Da,t,ea,xi),s=o[0],c=o[1],l=s.isOpen,u=s.highlightedIndex,d=s.selectedItem,p=s.inputValue,m=(0,f.useRef)(null),h=(0,f.useRef)({}),g=(0,f.useRef)(null),_=(0,f.useRef)(null),v=Qr(),y=ci(t),b=(0,f.useRef)(),x=fr({state:s,props:t});ri(a,s,[l,u,d,p],i);var S=bi(r,u,l,m.current,h.current,y.getItemId);gi({state:s,props:t}),(0,f.useEffect)(function(){ti(t.isOpen,t.initialIsOpen,t.defaultIsOpen,oi.isOpen)&&g.current&&g.current.focus()},[]),(0,f.useEffect)(function(){v||(b.current=n.length)});var C=_i(i,(0,f.useCallback)(function(){x.current.state.isOpen&&c({type:ua})},[c,x]),(0,f.useMemo)(function(){return[m,_,g]},[])),w=vi(`getInputProps`,`getMenuProps`);(0,f.useEffect)(function(){l||(h.current={})},[l]),(0,f.useEffect)(function(){var e;!l||!(i!=null&&i.document)||!((e=g.current)!=null&&e.focus)||i.document.activeElement!==g.current&&g.current.focus()},[l,i]);var D=(0,f.useMemo)(function(){return{ArrowDown:function(e){e.preventDefault(),c({type:ta,altKey:e.altKey})},ArrowUp:function(e){e.preventDefault(),c({type:na,altKey:e.altKey})},Home:function(e){x.current.state.isOpen&&(e.preventDefault(),c({type:ia}))},End:function(e){x.current.state.isOpen&&(e.preventDefault(),c({type:aa}))},Escape:function(e){var t=x.current.state;(t.isOpen||t.inputValue||t.selectedItem||t.highlightedIndex>-1)&&(e.preventDefault(),c({type:ra}))},Enter:function(e){!x.current.state.isOpen||e.which===229||(e.preventDefault(),c({type:ca}))},PageUp:function(e){x.current.state.isOpen&&(e.preventDefault(),c({type:oa}))},PageDown:function(e){x.current.state.isOpen&&(e.preventDefault(),c({type:sa}))}}},[c,x]),O=(0,f.useCallback)(function(e){return E({id:y.labelId,htmlFor:y.inputId},e)},[y]),k=(0,f.useCallback)(function(e,t){var n,r=e??{},i=r.onMouseLeave,a=r.refKey,o=a===void 0?`ref`:a,s=r.ref,l=r[`aria-label`],u=T(r,Oa),d=(t??{}).suppressRefError;return w(`getMenuProps`,d===void 0?!1:d,o,m),E((n={},n[o]=pr(s,function(e){m.current=e}),n.id=y.menuId,n.role=`listbox`,n[`aria-label`]=l,n[`aria-labelledby`]=l?void 0:``+y.labelId,n.onMouseLeave=U(i,function(){c({type:fa})}),n),u)},[c,w,y]),A=(0,f.useCallback)(function(e){var t,n,r=e??{},i=r.item,a=r.index,o=r.refKey,s=o===void 0?`ref`:o,l=r.ref,u=r.onMouseMove,d=r.onMouseDown,f=r.onClick;r.onPress;var p=r.disabled,m=T(r,ka);p!==void 0&&console.warn(`Passing "disabled" as an argument to getItemProps is not supported anymore. Please use the isItemDisabled prop from useCombobox.`);var g=x.current,_=g.props,v=g.state,b=Zr(i,a,_.items,`Pass either item or index to getItemProps!`),w=b[0],D=b[1],O=_.isItemDisabled(w,D),k=`onClick`,A=f;return E((t={},t[s]=pr(l,function(e){e&&(h.current[y.getItemId(D)]=e)}),t[`aria-disabled`]=O,t[`aria-selected`]=D===v.highlightedIndex,t.id=y.getItemId(D),t.role=`option`,t),!O&&(n={},n[k]=U(A,function(){c({type:ma,index:D})}),n),{onMouseMove:U(u,function(){C.isTouchEnd||D===v.highlightedIndex||(S(),c({type:pa,index:D,disabled:O}))}),onMouseDown:U(d,function(e){return e.preventDefault()})},m)},[c,y,x,C,S]),j=(0,f.useCallback)(function(e){var t,n=e??{},r=n.onClick;n.onPress;var i=n.refKey,a=i===void 0?`ref`:i,o=n.ref,s=T(n,Aa),l=x.current.state;return E((t={},t[a]=pr(o,function(e){_.current=e}),t[`aria-controls`]=y.menuId,t[`aria-expanded`]=l.isOpen,t.id=y.toggleButtonId,t.tabIndex=-1,t),!s.disabled&&E({},{onClick:U(r,function(){c({type:ha})})}),s)},[c,x,y]),M=(0,f.useCallback)(function(e,t){var n,r=e??{},a=r[`aria-label`],o=r.onKeyDown,s=r.onChange,l=r.onInput,u=r.onBlur;r.onChangeText;var d=r.onClick,f=r.refKey,p=f===void 0?`ref`:f,m=r.ref,h=T(r,ja),_=(t??{}).suppressRefError;w(`getInputProps`,_===void 0?!1:_,p,g);var v=x.current.state,b=function(e){var t=Cr(e);t&&t in D&&D[t](e)},S=function(e){c({type:la,inputValue:e.target.value})},O=function(e){i!=null&&i.document&&v.isOpen&&!C.isMouseDown&&c({type:ua,selectItem:!(e.relatedTarget===null&&i.document.activeElement!==i.document.body)})},k=function(){c({type:da})},A=`onChange`,j={};if(!h.disabled){var M;j=(M={},M[A]=U(s,l,S),M.onKeyDown=U(o,b),M.onBlur=U(u,O),M.onClick=U(d,k),M)}return E((n={},n[p]=pr(m,function(e){g.current=e}),n[`aria-activedescendant`]=v.isOpen&&v.highlightedIndex>-1?y.getItemId(v.highlightedIndex):``,n[`aria-autocomplete`]=`list`,n[`aria-controls`]=y.menuId,n[`aria-expanded`]=v.isOpen,n[`aria-labelledby`]=a?void 0:y.labelId,n[`aria-label`]=a,n.autoComplete=`off`,n.id=y.inputId,n.role=`combobox`,n.value=v.inputValue,n),j,h)},[c,y,i,D,x,C,w]),N=(0,f.useCallback)(function(){c({type:ga})},[c]),P=(0,f.useCallback)(function(){c({type:va})},[c]),F=(0,f.useCallback)(function(){c({type:_a})},[c]),I=(0,f.useCallback)(function(e){c({type:ya,highlightedIndex:e})},[c]),L=(0,f.useCallback)(function(e){c({type:ba,selectedItem:e})},[c]);return{getItemProps:A,getLabelProps:O,getMenuProps:k,getInputProps:M,getToggleButtonProps:j,toggleMenu:N,openMenu:F,closeMenu:P,setHighlightedIndex:I,setInputValue:(0,f.useCallback)(function(e){c({type:xa,inputValue:e})},[c]),selectItem:L,reset:(0,f.useCallback)(function(){c({type:Sa})},[c]),highlightedIndex:u,isOpen:l,selectedItem:d,inputValue:p}}var Na={activeIndex:-1,selectedItems:[]};function Pa(e){return{activeIndex:ti(e.activeIndex,e.initialActiveIndex,e.defaultActiveIndex,Na.activeIndex),selectedItems:ti(e.selectedItems,e.initialSelectedItems,e.defaultSelectedItems,Na.selectedItems)}}function Fa(e){if(e.shiftKey||e.metaKey||e.ctrlKey||e.altKey)return!1;var t=e.target;return!(t instanceof HTMLInputElement&&t.value!==``&&(t.selectionStart!==0||t.selectionEnd!==0))}function Ia(e,t){return e.selectedItems===t.selectedItems&&e.activeIndex===t.activeIndex}var La={stateReducer:ii.stateReducer,itemToKey:ii.itemToKey,environment:ii.environment,selectedItems:S.default.array,initialSelectedItems:S.default.array,defaultSelectedItems:S.default.array,getA11yStatusMessage:S.default.func,activeIndex:S.default.number,initialActiveIndex:S.default.number,defaultActiveIndex:S.default.number,onActiveIndexChange:S.default.func,onSelectedItemsChange:S.default.func,keyNavigationNext:S.default.string,keyNavigationPrevious:S.default.string},Ra={itemToKey:ai.itemToKey,stateReducer:ai.stateReducer,environment:ai.environment,keyNavigationNext:`ArrowRight`,keyNavigationPrevious:`ArrowLeft`},za=yr;process.env.NODE_ENV!==`production`&&(za=function(e,t){S.default.checkPropTypes(La,e,`prop`,t.name)});var Ba=process.env.NODE_ENV===`production`?0:`__selected_item_click__`,Va=process.env.NODE_ENV===`production`?1:`__selected_item_keydown_delete__`,Ha=process.env.NODE_ENV===`production`?2:`__selected_item_keydown_backspace__`,Ua=process.env.NODE_ENV===`production`?3:`__selected_item_keydown_navigation_next__`,Wa=process.env.NODE_ENV===`production`?4:`__selected_item_keydown_navigation_previous__`,Ga=process.env.NODE_ENV===`production`?5:`__dropdown_keydown_navigation_previous__`,Ka=process.env.NODE_ENV===`production`?6:`__dropdown_keydown_backspace__`,qa=process.env.NODE_ENV===`production`?7:`__dropdown_click__`,Ja=process.env.NODE_ENV===`production`?8:`__function_add_selected_item__`,Ya=process.env.NODE_ENV===`production`?9:`__function_remove_selected_item__`,Xa=process.env.NODE_ENV===`production`?10:`__function_set_selected_items__`,Za=process.env.NODE_ENV===`production`?11:`__function_set_active_index__`,Qa=process.env.NODE_ENV===`production`?12:`__function_reset__`,$a=Object.freeze({__proto__:null,DropdownClick:qa,DropdownKeyDownBackspace:Ka,DropdownKeyDownNavigationPrevious:Ga,FunctionAddSelectedItem:Ja,FunctionRemoveSelectedItem:Ya,FunctionReset:Qa,FunctionSetActiveIndex:Za,FunctionSetSelectedItems:Xa,SelectedItemClick:Ba,SelectedItemKeyDownBackspace:Ha,SelectedItemKeyDownDelete:Va,SelectedItemKeyDownNavigationNext:Ua,SelectedItemKeyDownNavigationPrevious:Wa});function eo(e,t){var n=t.type,r=t.index,i=t.selectedItem,a=t.props,o=e.activeIndex,s=e.selectedItems,c;switch(n){case Ba:c={activeIndex:r};break;case Wa:c={activeIndex:o-1<0?0:o-1};break;case Ua:c={activeIndex:o+1>=s.length?-1:o+1};break;case Ha:case Va:if(o<0)break;var l=o;s.length===1?l=-1:o===s.length-1&&(l=s.length-2),c=E({selectedItems:[].concat(s.slice(0,o),s.slice(o+1))},{activeIndex:l});break;case Ga:c={activeIndex:s.length-1};break;case Ka:c={selectedItems:s.slice(0,s.length-1)};break;case Ja:c={selectedItems:[].concat(s,[i])};break;case qa:c={activeIndex:-1};break;case Ya:var u=o,d=s.findIndex(function(e){return a.itemToKey(e)===a.itemToKey(i)});if(d<0)break;s.length===1?u=-1:d===s.length-1&&(u=s.length-2),c={selectedItems:[].concat(s.slice(0,d),s.slice(d+1)),activeIndex:u};break;case Xa:c={selectedItems:t.selectedItems};break;case Za:c={activeIndex:t.activeIndex};break;case Qa:c={activeIndex:ei(a.defaultActiveIndex,Na.activeIndex),selectedItems:ei(a.defaultSelectedItems,Na.selectedItems)};break;default:throw Error(`Reducer called without proper action type.`)}return E({},e,c)}var to=[`refKey`,`ref`,`onClick`,`onKeyDown`,`selectedItem`,`index`],no=[`refKey`,`ref`,`onKeyDown`,`onClick`,`preventKeyAction`];ro.stateChangeTypes=$a;function ro(e){e===void 0&&(e={}),za(e,ro);var t=E({},Ra,e),n=t.getA11yStatusMessage,r=t.environment,i=t.keyNavigationNext,a=t.keyNavigationPrevious,o=Xr(eo,t,Pa,Ia),s=o[0],c=o[1],l=s.activeIndex,u=s.selectedItems,d=Qr(),p=(0,f.useRef)(null),m=(0,f.useRef)();m.current=[];var h=fr({state:s,props:t});ri(n,s,[l,u],r),(0,f.useEffect)(function(){d||(l===-1&&p.current?p.current.focus():m.current[l]&&m.current[l].focus())},[l]),gi({props:t,state:s});var g=vi(`getDropdownProps`),_=(0,f.useMemo)(function(){var e;return e={},e[a]=function(){c({type:Wa})},e[i]=function(){c({type:Ua})},e.Delete=function(){c({type:Va})},e.Backspace=function(){c({type:Ha})},e},[c,i,a]),v=(0,f.useMemo)(function(){var e;return e={},e[a]=function(e){Fa(e)&&c({type:Ga})},e.Backspace=function(e){Fa(e)&&c({type:Ka})},e},[c,a]);return{getSelectedItemProps:(0,f.useCallback)(function(e){var t,n=e===void 0?{}:e,r=n.refKey,i=r===void 0?`ref`:r,a=n.ref,o=n.onClick,s=n.onKeyDown,l=n.selectedItem,u=n.index,d=T(n,to),f=h.current.state,p=Zr(l,u,f.selectedItems,`Pass either item or index to getSelectedItemProps!`)[1],g=p>-1&&p===f.activeIndex;return E((t={},t[i]=pr(a,function(e){e&&m.current.push(e)}),t.tabIndex=g?0:-1,t.onClick=U(o,function(){c({type:Ba,index:p})}),t.onKeyDown=U(s,function(e){var t=Cr(e);t&&_[t]&&_[t](e)}),t),d)},[c,h,_]),getDropdownProps:(0,f.useCallback)(function(e,t){var n,r=e===void 0?{}:e,i=r.refKey,a=i===void 0?`ref`:i,o=r.ref,s=r.onKeyDown,l=r.onClick,u=r.preventKeyAction,d=u===void 0?!1:u,f=T(r,no),m=(t===void 0?{}:t).suppressRefError;return g(`getDropdownProps`,m===void 0?!1:m,a,p),E((n={},n[a]=pr(o,function(e){e&&(p.current=e)}),n),!d&&{onKeyDown:U(s,function(e){var t=Cr(e);t&&v[t]&&v[t](e)}),onClick:U(l,function(){c({type:qa})})},f)},[c,v,g]),addSelectedItem:(0,f.useCallback)(function(e){c({type:Ja,selectedItem:e})},[c]),removeSelectedItem:(0,f.useCallback)(function(e){c({type:Ya,selectedItem:e})},[c]),setSelectedItems:(0,f.useCallback)(function(e){c({type:Xa,selectedItems:e})},[c]),setActiveIndex:(0,f.useCallback)(function(e){c({type:Za,activeIndex:e})},[c]),reset:(0,f.useCallback)(function(){c({type:Qa})},[c]),selectedItems:u,activeIndex:l}}var io=process.env.NODE_ENV===`production`?0:`__tag_click__`,ao=process.env.NODE_ENV===`production`?1:`__taggroup_keydown_arrowleft__`,oo=process.env.NODE_ENV===`production`?2:`__taggroup_keydown_arrowright__`,so=process.env.NODE_ENV===`production`?3:`__taggroup_keydown_delete__`,co=process.env.NODE_ENV===`production`?4:`__taggroup_keydown_backspace__`,lo=process.env.NODE_ENV===`production`?5:`__tagremove_click__`,uo=process.env.NODE_ENV===`production`?6:`__function_add_item__`,fo=Object.freeze({__proto__:null,FunctionAddItem:uo,TagClick:io,TagGroupKeyDownArrowLeft:ao,TagGroupKeyDownArrowRight:oo,TagGroupKeyDownBackspace:co,TagGroupKeyDownDelete:so,TagRemoveClick:lo});function po(e,t){var n=t.type,r;switch(n){case io:r={activeIndex:t.index};break;case ao:r={activeIndex:e.activeIndex===0?e.items.length-1:e.activeIndex-1};break;case oo:r={activeIndex:e.activeIndex===e.items.length-1?0:e.activeIndex+1};break;case co:case so:var i=[].concat(e.items.slice(0,e.activeIndex),e.items.slice(e.activeIndex+1)),a=i.length===0?-1:i.length===e.activeIndex?e.activeIndex-1:e.activeIndex;r={items:[].concat(e.items.slice(0,e.activeIndex),e.items.slice(e.activeIndex+1)),activeIndex:a};break;case lo:var o=[].concat(e.items.slice(0,t.index),e.items.slice(t.index+1));r={items:o,activeIndex:o.length===0?-1:o.length===t.index?t.index-1:t.index};break;case uo:var s=[];s=t.index===void 0?[].concat(e.items,[t.item]):[].concat(e.items.slice(0,t.index),[t.item],e.items.slice(t.index));var c=e.activeIndex===-1?s.length-1:e.activeIndex;r={items:s,activeIndex:c};break;default:throw Error(`Invalid useTagGroup reducer action.`)}return E({},e,r)}var mo=E({},f).useId,ho=typeof mo==`function`?go:_o;function go(e){var t=e.id,n=e.tagGroupId,r=e.getTagId,i=`downshift-`+mo();return t||(t=i),f.useMemo(function(){return{tagGroupId:n??t+`-tag-group`,getTagId:r??function(e){return t+`-tag-`+e}}},[r,t,n])}function _o(e){var t=e.id,n=e.getTagId,r=e.tagGroupId,i=f.useRef(t??`downshift-`+dr()).current;return f.useMemo(function(){return{tagGroupId:r??i+`-tag-group`,getTagId:n??function(e){return i+`-tag-`+e}}},[n,i,r])}function vo(e){var t=e.items??e.initialItems??[];return{activeIndex:e.activeIndex??e.initialActiveIndex??(t.length===0?-1:0),items:t}}function yo(e,t){return e.activeIndex===t.activeIndex&&e.items===t.items}var bo=`tag-group-a11y-description`;function xo(e,t){f.useEffect(function(){if(e){var n=e.createElement(`div`);return n.setAttribute(`id`,bo),n.style.display=`none`,n.textContent=t,e.body.appendChild(n),function(){n.remove()}}},[t,e])}function So(e){return E({stateReducer:function(e,t){return t.changes},environment:typeof window>`u`?void 0:window,removeElementDescription:`Press Delete or Backspace to remove tag.`},e)}function Co(e,t,n){var r=f.useRef({}),i=f.useRef(e),a=f.useRef(t);return f.useEffect(function(){if(e!==-1&&i.current!==-1&&e!==i.current||a.current===t+1){var o;(o=r.current[n(e)])==null||o.focus()}i.current=e,a.current=t},[e,n,t]),r}var wo={isItemDisabled:S.default.func},To=[`onKeyDown`],Eo=[`index`,`refKey`,`ref`,`onClick`],Do=[`index`,`onClick`],Oo=function(e){e===void 0&&(e={}),br(e,Oo,wo);var t=So(e),n=Xr(po,t,vo,yo),r=n[0],i=n[1],a=r.activeIndex,o=r.items,s=fr({state:r,props:t}),c=ho({getTagId:t.getTagId,id:t.id,tagGroupId:t.tagGroupId});xo(t.environment?.document,t.removeElementDescription);var l=Co(a,o.length,c.getTagId),u=(0,f.useCallback)(function(e){var t=e??{},n=t.onKeyDown,r=T(t,To);return E({id:c.tagGroupId,"aria-live":`polite`,"aria-atomic":`false`,"aria-relevant":`additions`,role:`listbox`,onKeyDown:U(n,function(e){switch(e.key){case`ArrowLeft`:i({type:ao});break;case`ArrowRight`:i({type:oo});break;case`Delete`:i({type:so});break;case`Backspace`:i({type:co});break}})},r)},[i,c.tagGroupId]),d=(0,f.useCallback)(function(e){var t,n=e.index,r=e.refKey,a=r===void 0?`ref`:r,o=e.ref,u=e.onClick,d=T(e,Eo);if(!Number.isInteger(n)||n<0)throw Error(`Pass correct item index to getTagProps!`);var f=s.current.state,p=function(){i({type:io,index:n})},m=c.getTagId(n);return E((t={"aria-describedby":bo},t[a]=pr(o,function(e){e&&(l.current[m]=e)}),t[`aria-labelledby`]=m,t.role=`option`,t.id=m,t.onClick=U(u,p),t.tabIndex=f.activeIndex===n?0:-1,t),d)},[i,c,s,l]),p=(0,f.useCallback)(function(e){var t=e.index,n=e.onClick,r=T(e,Do);if(!Number.isInteger(t)||t<0)throw Error(`Pass correct item index to getTagRemoveProps!`);var a=function(e){e.stopPropagation(),i({type:lo,index:t})},o=c.getTagId(t),s=o+`-remove`;return E({id:s,tabIndex:-1,"aria-labelledby":s+` `+o,onClick:U(n,a)},r)},[c,i]);return{activeIndex:a,addItem:(0,f.useCallback)(function(e,t){i({type:uo,item:e,index:t})},[i]),getTagGroupProps:u,getTagProps:d,getTagRemoveProps:p,items:o}};Oo.stateChangeTypes=fo;var ko=({errorLine:e,marginTop:n=`xxs`})=>e?t.default.createElement(`div`,{className:`nds-input-error margin--top--${n}`},t.default.createElement(`div`,{className:`fontSize--s margin--right--xxs narmi-icon-x-circle`}),e):null,Ao=({error:e,marginTop:n=`xxs`})=>e?Array.isArray(e)?t.default.createElement(`div`,{className:`nds-input-errorlist`,"aria-live":`polite`},e.map((e,r)=>t.default.createElement(ko,{key:e,errorLine:e,marginTop:r?n:`xxs`}))):t.default.createElement(ko,{errorLine:e,marginTop:n}):null,jo=`bank.loan.logo-remitly.zelle-outline.question.signal.car.check-front.dollar-bill-line.wires.m2m.venmo-logo.face-id.library.profile.hourglass.plane.filter-2.business.profiles.star-filled.car-outline.dining.fingerprint.heart-pulse.paw.receipt.self-care.stroller.security.narmi-fat-security.feed.narmi-feed.activity.airplay.alert-circle.alert-octagon.alert-triangle.align-center.align-justify.align-left.align-right.anchor.aperture.archive.arrow-down.arrow-down-circle.arrow-down-left.arrow-down-right.arrow-left.arrow-left-circle.arrow-right.arrow-right-circle.arrow-up.arrow-up-circle.arrow-up-left.arrow-up-right.arrow-up-down.at-sign.award.bar-chart.bar-chart-2.battery.battery-charging.bell.bell-off.bluetooth.bold.book.book-open.bookmark.box.briefcase.calendar.camera.camera-off.cast.check.check-circle.check-square.chevron-down.chevron-left.chevron-right.chevron-up.chevrons-down.chevrons-left.chevrons-right.chevrons-up.chrome.circle.clipboard.clock.cloud.cloud-drizzle.cloud-lightning.cloud-off.cloud-rain.cloud-snow.code.codepen.codesandbox.coffee.columns.command.compass.copy.corner-down-left.corner-down-right.corner-left-down.corner-left-up.corner-right-down.corner-right-up.corner-up-left.corner-up-right.cpu.credit-card1.crop.crosshair.database.delete.disc.dollar-sign.download.download-cloud.droplet.edit.edit-2.edit-3.external-link.eye.eye-off.facebook.fast-forward.feather.figma.file.file-minus.file-plus.file-text1.film.filter.flag.folder.folder-minus.folder-plus.framer.frown.gift.git-branch.git-commit.git-merge.git-pull-request.github.gitlab.globe.grid.hard-drive.hash.headphones.heart.help-circle.hexagon.home.image.inbox.info.instagram.italic.key.layers.layout.life-buoy.link.link-2.linkedin.list.loader.lock.log-in.log-out.mail.map.map-pin.maximize.maximize-2.meh.menu.message-circle.message-square.mic.mic-off.minimize.minimize-2.minus.minus-circle.minus-square.monitor.moon.more-horizontal.more-vertical.mouse-pointer.move.music.navigation.navigation-2.octagon.package.paperclip.pause.pause-circle.pen-tool.percent.phone.phone-call.phone-forwarded.phone-incoming.phone-missed.phone-off.phone-outgoing.pie-chart.play.play-circle.plus.plus-circle.plus-square.pocket.power.printer.radio.refresh-ccw.refresh-cw.repeat.rewind.rotate-ccw.rotate-cw.rss.save.scissors.search.send.server.settings.share.share-2.shield.shield-off.shopping-bag.shopping-cart.shuffle.sidebar.skip-back.skip-forward.slack.slash.sliders.smartphone.smile.speaker.square.star.stop-circle.sun.sunrise.sunset.tablet.tag.target.terminal.thermometer.thumbs-down.thumbs-up.toggle-left.toggle-right.tool.trash.trash-2.trello.trending-down.trending-up.triangle.truck.tv.twitch.twitter.type.umbrella.underline.unlock.upload.upload-cloud.user.user-check.user-minus.user-plus.user-x.users.video.video-off.voicemail.volume.volume-1.volume-2.volume-x.watch.wifi.wifi-off.wind.x.x-circle.x-octagon.x-square.youtube.zap.zap-off.zoom-in.zoom-out.student.hand-spock.solid-circle.GroupOutlined.LocalAtm.MonetizationOnOutlined.SyncAlt.p2p.check-endorsed.piggy-bank.venmo.folder-open.group.settings-gear.admin-user.transfer-arrows.narmi-transfer.blob.bill.credit-card.admin-user-2.office.file-text.sparkle.filter-3`.split(`.`),Mo=[`http:`,`https:`,`mailto:`,`tel:`],No=e=>{if(e==null)return e;if(typeof e!=`string`)return;let t=e.trim().replace(/[\u0000-\u001F\u007F\s]+/g,``).match(/^([a-zA-Z][a-zA-Z\d+.-]*):/);if(!t)return e;let n=`${t[1].toLowerCase()}:`;return Mo.includes(n)?e:void 0},Po=[`span`,`div`,`ul`,`ol`,`li`,`p`,`nav`,`article`,`section`,`h1`,`h2`,`h3`,`h4`,`h5`,`h6`,`button`,`a`],Fo=({elementType:e=`div`,children:n,...r})=>{let i=Object.prototype.hasOwnProperty.call(r,`href`)?{...r,href:No(r.href)}:r;if(typeof e==`function`||typeof e.type==`function`)return t.default.createElement(e,i,n);let a=`div`;return Po.includes(e)&&(a=e),t.default.createElement(a,i,n)};function Io(){return Io=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Io.apply(null,arguments)}var Lo=({disabled:e=!1,kind:n=`plain`,textSize:r=n===`plain`?`m`:`l`,testId:i=`nds-icon-button`,label:a,name:o,onClick:s=()=>{},type:c,as:l=`button`,...u})=>t.default.createElement(Fo,Io({elementType:l,type:c,onClick:s,className:w([`nds-typography`,`nds-icon-button`,`nds-icon-button--${n}`,`fontSize--${r}`,{"nds-icon-button--disabled":e}]),disabled:e,"aria-label":a,"data-testid":i},u),t.default.createElement(`span`,{"aria-label":o,className:`narmi-icon-${o}`})),Ro=({id:e,label:n,startIconClass:r,endIconClass:i,startContent:a,endContent:o,tailContent:s,showClearButton:c,clearInput:l,disabled:u,multiline:d=!1,decoration:f,error:p,search:m,onClick:h,style:g,renderError:_=!0,children:v,...y})=>{let b=[`nds-input`,u?`disabled`:``,y.multiline?`multiline`:``,p?`error`:``,m?`search`:``].join(` `);return t.default.createElement(`div`,{className:b,onClick:h,style:g},t.default.createElement(`div`,{className:`nds-input-box`},a&&t.default.createElement(`div`,null,a),r&&t.default.createElement(`div`,{className:`nds-input-icon nds-input-icon--faded ${r}`}),t.default.createElement(`div`,{className:`nds-input-column ${!n||r&&!d?`no-label`:``}`},v,f,d?``:t.default.createElement(`label`,{htmlFor:e},n)),i&&t.default.createElement(`div`,{className:`nds-input-icon nds-input-icon--faded ${i}`}),c&&t.default.createElement(Lo,{label:`Clear`,onClick:l,name:`x`,textSize:`l`}),o&&t.default.createElement(`div`,null,o)),t.default.createElement(`div`,{className:`nds-input-subline`},s&&t.default.createElement(`div`,{className:`nds-input-tail margin--top--xxs`},s),_&&t.default.createElement(Ao,{error:p})))};function zo(){return zo=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},zo.apply(null,arguments)}var Bo=t.default.forwardRef((e,n)=>{let{startIcon:r,endIcon:i,startContent:a,endContent:o,showClearButton:s,formatter:c=e=>e,multiline:l=!1,defaultValue:u,onChange:d,onBlur:f,maxLength:p,testId:m,type:h=`text`,error:g,renderError:_=!0,required:v=!1,...y}=e,[b,x]=(0,t.useState)(u||``);function S(e){f&&f(e),x(c(e.target.value))}function C(e){d&&d(e),x(e.target.value)}function w(e){C(e),x(``)}let T=(y?.value||b).length,E=p?t.default.createElement(`div`,{className:`nds-input-character-counter`},T,`/`,p):null,D=g||(p&&b.length>p?`Exceeds character limits.`:void 0);return t.default.createElement(Ro,zo({},e,{error:D,renderError:_,startIconClass:r?`narmi-icon-${r}`:void 0,endIconClass:i?`narmi-icon-${i}`:void 0,startContent:a,endContent:o,showClearButton:s&&b,clearInput:w,tailContent:E}),l?t.default.createElement(`div`,{className:`nds-input-multiline-grid`,"data-textarea-value":b},t.default.createElement(`textarea`,zo({key:`nds-text`,wrap:`soft`,ref:n,value:b,onChange:C,onBlur:S,required:v,placeholder:e.label,"aria-label":e.label,"data-testid":m,"data-error":D},y))):t.default.createElement(`input`,zo({key:`nds-text`,value:b,onChange:C,onBlur:S,ref:n,type:h,required:v,"aria-label":e.label,placeholder:e.label,"data-testid":m,"data-error":D},y)))});Bo.displayName=`TextInput`;var Vo=({shrink:e=!1,as:n=`div`,className:r=``,children:i,testId:a})=>t.default.createElement(Fo,{elementType:n,className:w([r,`nds-row-item`,{"nds-row-item--shrink":e}]),"data-testid":a},i),Ho=(e,t,n)=>{let r={gap:`var(--space-${n})`,alignItems:`flex-start`,justifyContent:t===`center`?t:`flex-${t}`};return n&&n===`none`&&(r.gap=`0`),e!==`top`&&(r.alignItems=e),t===`space-between`&&(r.justifyContent=t),r},W=({alignItems:e=`top`,justifyContent:n=`start`,gapSize:r=`l`,as:i=`div`,className:a=``,children:o,testId:s})=>t.default.createElement(Fo,{elementType:i,className:w([a,`nds-row`]),style:Ho(e,n,r),"data-testid":s},o);W.Item=Vo;function Uo(){return Uo=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Uo.apply(null,arguments)}var Wo=e=>e.props.searchValue||e.props.value||``,Go=(e,t)=>e.filter(e=>Wo(e).toLowerCase().includes(t.toLowerCase())),Ko=({label:e,items:n,selectedItem:r,onChange:i=()=>{},onInputChange:a=()=>{},footerContent:o})=>{let[s,c]=(0,t.useState)(n);(0,t.useEffect)(()=>{c(n)},[c,n]);let{selectedItem:l,highlightedIndex:u,getMenuProps:d,getInputProps:f,getItemProps:p}=Ma({items:s,initialSelectedItem:r,initialInputValue:``,onInputValueChange({inputValue:e}){c(e?.length>0?Go(n,e):n),a(e)},onSelectedItemChange({selectedItem:e}){e&&i(e)},itemToString(e){return Wo(e)}});return t.default.createElement(`div`,{className:w([`nds-autocompleteModal-autocomplete`,`rounded--all`])},t.default.createElement(`div`,{className:`nds-autocompleteModal-input`},t.default.createElement(Bo,Uo({label:e},f()))),t.default.createElement(`ul`,Uo({className:`nds-autocompleteModal-menu list--reset`},d()),s.length===0&&!l&&t.default.createElement(`li`,{className:`nds-autocompleteModal-item padding--x--s padding--y--xs`},`No results found`),s.map((e,n)=>t.default.createElement(`li`,Uo({className:w([`nds-autocompleteModal-item`,`padding--x--s padding--y--xs`,{"nds-autocompleteModal-item--highlighted":u===n}]),key:`${e?.props.value}-${n}`},p({item:e,index:n})),t.default.createElement(W,null,t.default.createElement(W.Item,null,e),l&&l.props.value===e.props.value&&t.default.createElement(W.Item,{as:`span`,shrink:!0},t.default.createElement(`span`,{className:`narmi-icon-check fontSize--xl fontWeight--bold`})))))),o&&t.default.createElement(`div`,{className:`nds-autocompleteModal-footer padding--all--s border--top`},o))},qo=({inputLabel:e,children:n,trigger:r,onChange:i=()=>{},onInputChange:a=()=>{},footerContent:o})=>{let[s,c]=(0,t.useState)(!1),[l,u]=(0,t.useState)(null),d=(0,t.useMemo)(()=>t.default.Children.toArray(n),[n]);return t.default.createElement(In,{isOpen:s,onUserDismiss:()=>{c(!1)},onUserEnable:()=>{c(e=>!e)},alignment:`center`,side:`top`,autoFocus:!0,hasShadow:!1,content:t.default.createElement(`div`,{className:`nds-autocompleteModal-positionedEl`},t.default.createElement(Ko,{items:d,label:e,onChange:e=>{c(!1),u(e),i(e.props.value)},onInputChange:a,footerContent:o,selectedItem:l}))},t.default.createElement(`span`,{style:{cursor:`pointer`}},typeof r==`function`?r(s):r))};qo.Item=C;var Jo=({isOpen:e,children:n,renderSummary:r=()=>void 0,onUserToggle:i=()=>{},testId:a=`nds-accordion`})=>{let[o,s]=(0,t.useState)(e??!1),c=e??o,l=(0,t.useId)(),u=`${l}-button`,d=`${l}-content`;return t.default.createElement(`div`,{className:`nds-accordion`,"data-testid":a},t.default.createElement(`button`,{id:u,className:`nds-accordion-summary-button button--reset`,onClick:()=>{let t=!c;e===void 0&&s(t),i(t)},"aria-expanded":c,"aria-controls":d,type:`button`},r(c)),t.default.createElement(`div`,{id:d,className:`nds-accordion-details`,role:`region`,"aria-hidden":!c,"aria-labelledby":u},n))},Yo=({behavior:e=`exclusive`,children:n,testId:r=`nds-accordionSet`})=>{let[i,a]=(0,t.useState)(null);return t.default.createElement(`div`,{className:`nds-accordionSet`,"data-testid":r},t.default.Children.map(n,(n,r)=>{if(!t.default.isValidElement(n)||n.type!==Jo)return console.warn(`AccordionSet only accepts Accordion children`),null;let o=e===`exclusive`,s=i===r;return t.default.cloneElement(n,{key:n.key??r,...o&&{isOpen:s,onUserToggle:e=>{o&&a(e?r:null),n.props.onUserToggle?.(e)}}})}))},Xo=()=>{},Zo=({isActive:e=!1,isDismissable:n=!0,onUserDismiss:r=Xo,kind:i=`info`,icon:a=null,paddingSize:o=`l`,children:s})=>{let c=Qo(i);return t.default.createElement(`div`,{"aria-live":`polite`},e&&t.default.createElement(`div`,{className:w([`nds-alert`,`nds-alert--${i}`,`rounded--all`,`padding--all--${o}`])},t.default.createElement(W,{gapSize:`s`},t.default.createElement(W.Item,{shrink:!0},t.default.createElement(`span`,{className:`nds-alert-icon narmi-icon-${a||c}`})),t.default.createElement(W.Item,null,s),n&&t.default.createElement(W.Item,{shrink:!0},t.default.createElement(`button`,{className:`nds-alert-close resetButton`,"aria-label":`close`,onClick:r,"data-testid":`nds-alert-close`},t.default.createElement(`span`,{className:`narmi-icon-x`}))))))},Qo=e=>{switch(e){case`success`:return`check`;case`error`:return`alert-circle`;default:return`info`}};l(((e,t)=>{var n=`Expected a function`,r=NaN,i=`[object Symbol]`,a=/^\s+|\s+$/g,o=/^[-+]0x[0-9a-f]+$/i,s=/^0b[01]+$/i,c=/^0o[0-7]+$/i,l=parseInt,u=typeof global==`object`&&global&&global.Object===Object&&global,d=typeof self==`object`&&self&&self.Object===Object&&self,f=u||d||Function(`return this`)(),p=Object.prototype.toString,m=Math.max,h=Math.min,g=function(){return f.Date.now()};function _(e,t,r){var i,a,o,s,c,l,u=0,d=!1,f=!1,p=!0;if(typeof e!=`function`)throw TypeError(n);t=x(t)||0,v(r)&&(d=!!r.leading,f=`maxWait`in r,o=f?m(x(r.maxWait)||0,t):o,p=`trailing`in r?!!r.trailing:p);function _(t){var n=i,r=a;return i=a=void 0,u=t,s=e.apply(r,n),s}function y(e){return u=e,c=setTimeout(C,t),d?_(e):s}function b(e){var n=e-l,r=e-u,i=t-n;return f?h(i,o-r):i}function S(e){var n=e-l,r=e-u;return l===void 0||n>=t||n<0||f&&r>=o}function C(){var e=g();if(S(e))return w(e);c=setTimeout(C,b(e))}function w(e){return c=void 0,p&&i?_(e):(i=a=void 0,s)}function T(){c!==void 0&&clearTimeout(c),u=0,i=l=a=c=void 0}function E(){return c===void 0?s:w(g())}function D(){var e=g(),n=S(e);if(i=arguments,a=this,l=e,n){if(c===void 0)return y(l);if(f)return c=setTimeout(C,t),_(l)}return c===void 0&&(c=setTimeout(C,t)),s}return D.cancel=T,D.flush=E,D}function v(e){var t=typeof e;return!!e&&(t==`object`||t==`function`)}function y(e){return!!e&&typeof e==`object`}function b(e){return typeof e==`symbol`||y(e)&&p.call(e)==i}function x(e){if(typeof e==`number`)return e;if(b(e))return r;if(v(e)){var t=typeof e.valueOf==`function`?e.valueOf():e;e=v(t)?t+``:t}if(typeof e!=`string`)return e===0?e:+e;e=e.replace(a,``);var n=s.test(e);return n||c.test(e)?l(e.slice(2),n?2:8):o.test(e)?r:+e}t.exports=_}))();var $o=typeof window<`u`?f.useLayoutEffect:f.useEffect;function es(e,t,n,r){let i=(0,f.useRef)(t);$o(()=>{i.current=t},[t]),(0,f.useEffect)(()=>{let t=n?.current??window;if(!(t&&t.addEventListener))return;let a=e=>{i.current(e)};return t.addEventListener(e,a,r),()=>{t.removeEventListener(e,a,r)}},[e,n,r])}var ts=typeof window>`u`;function ns(e,{defaultValue:t=!1,initializeWithValue:n=!0}={}){let r=e=>ts?t:window.matchMedia(e).matches,[i,a]=(0,f.useState)(()=>n?r(e):t);function o(){a(r(e))}return $o(()=>{let t=window.matchMedia(e);return o(),t.addListener?t.addListener(o):t.addEventListener(`change`,o),()=>{t.removeListener?t.removeListener(o):t.removeEventListener(`change`,o)}},[e]),i}function rs(e,t,n=`mousedown`,r={}){es(n,n=>{let r=n.target;!r||!r.isConnected||(Array.isArray(e)?e.filter(e=>!!e.current).every(e=>e.current&&!e.current.contains(r)):e.current&&!e.current.contains(r))&&t(n)},void 0,r)}var is=({isOpen:e=!1,onUserDismiss:n=()=>{},renderHeader:r,renderFooter:i,isPortalled:a=!1,children:o,testId:s,trigger:c})=>{let{anchorProps:l,layerProps:u}=Nn({isOpen:e,setIsOpen:n,matchWidth:!1,isPortalled:a,ariaPopupType:`dialog`,alignment:`start`});rs(u.ref,()=>{n()});let d=e=>{e.key===`Escape`&&n()};if((0,t.useEffect)(()=>{if(e)return document.addEventListener(`keydown`,d),()=>{document.removeEventListener(`keydown`,d)}},[e,n]),!e&&!c)return null;let f=c&&t.default.cloneElement(c,{"aria-haspopup":l[`aria-haspopup`],"aria-expanded":l[`aria-expanded`]});return t.default.createElement(t.default.Fragment,null,c&&t.default.createElement(`div`,{ref:l.ref,style:l.style},f),e&&t.default.createElement(`div`,{ref:u.ref,className:`nds-anchoredDialog`,"data-testid":s,style:u.style},t.default.createElement(Sn,{returnFocus:!0,autoFocus:!0,className:`nds-anchoredDialog-inner`},r&&t.default.createElement(`div`,{className:`nds-anchoredDialog-header border--bottom`},r()),t.default.createElement(`div`,{className:`nds-anchoredDialog-content`},o),i&&t.default.createElement(`div`,{className:`nds-anchoredDialog-footer border--top`},i()))))},as=({label:e,size:n=`s`,kind:r=`primary`,initials:i,imgurl:a,linkurl:o})=>{let s=a?{backgroundImage:`url(${a})`,backgroundSize:`cover`}:{},c=!a&&i,l=!a&&!i;return t.default.createElement(Fo,{elementType:o?`a`:`div`,href:o,className:w([`nds-avatar`,`nds-avatar--${n}`,`nds-avatar--${r}`,`alignChild--center--center`]),style:s,"aria-label":e},c&&i,l&&t.default.createElement(`span`,{className:`narmi-icon-user fontSize--heading3`}))},os=({size:e=28,strokeWidth:n=3,color:r=`var(--color-white)`})=>t.default.createElement(`div`,{className:`nds-spinner`,style:{height:e,width:e}},t.default.createElement(`svg`,{xmlns:`http://www.w3.org/2000/svg`,version:`1.1`,xmlnsXlink:`http://www.w3.org/1999/xlink`,height:e,width:e,viewBox:`0 0 ${e} ${e}`},t.default.createElement(`circle`,{fill:`none`,stroke:r,strokeWidth:n,strokeLinecap:`round`,className:`nds-spinner-circle`,cx:`50%`,cy:`50%`,r:`25%`})));function ss(){return ss=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},ss.apply(null,arguments)}var cs=({isLoading:e=!1,disabled:n=!1,kind:r=`primary`,type:i,size:a=`m`,startIcon:o=null,endIcon:s=null,testId:c,children:l,label:u,onClick:d=()=>{},as:f=`button`,ariaLabel:p=null,isFullWidth:m=!1,...h})=>{let g=f===`button`,_=u||l,v=({name:e})=>t.default.createElement(`div`,{className:`alignChild--center--center`},t.default.createElement(`i`,{role:`img`,"aria-label":p||e,className:`narmi-icon-${e}`}));return t.default.createElement(Fo,ss({elementType:f,tabIndex:0,onClick:d,type:i},h,{className:w([`nds-typography`,`nds-button`,`nds-button--${r}`,`nds-button--${a}`,{resetButton:f===`button`,"nds-button--disabled":n,"nds-button--loading":e,"nds-button--fullWidth":m}]),disabled:g&&n||e?!0:void 0,"aria-label":p||_,"data-testid":c||`nds-button`}),t.default.createElement(`div`,{className:`nds-button-content`},e&&t.default.createElement(`div`,{className:`nds-button-spinner`},t.default.createElement(os,{color:r===`primary`?void 0:`var(--color-lightGrey)`})),t.default.createElement(`div`,{style:{visibility:e?`hidden`:`visible`}},t.default.createElement(W,{gapSize:{xs:`xs`,s:`xs`,m:`s`}[a],alignItems:`center`},o&&t.default.createElement(W.Item,{shrink:!0},t.default.createElement(v,{name:o})),t.default.createElement(W.Item,null,t.default.createElement(`span`,{className:`nds-button-label`},_)),s&&t.default.createElement(W.Item,{shrink:!0},t.default.createElement(v,{name:s}))))))};function ls(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function us(e){if(Array.isArray(e))return e}function ds(e,t){var n=e==null?null:typeof Symbol<`u`&&e[Symbol.iterator]||e[`@@iterator`];if(n!=null){var r,i,a,o,s=[],c=!0,l=!1;try{if(a=(n=n.call(e)).next,t!==0)for(;!(c=(r=a.call(n)).done)&&(s.push(r.value),s.length!==t);c=!0);}catch(e){l=!0,i=e}finally{try{if(!c&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(l)throw i}}return s}}function fs(){throw TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
4
4
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function ps(e,t){return us(e)||ds(e,t)||ms(e,t)||fs()}function ms(e,t){if(e){if(typeof e==`string`)return ls(e,t);var n={}.toString.call(e).slice(8,-1);return n===`Object`&&e.constructor&&(n=e.constructor.name),n===`Map`||n===`Set`?Array.from(e):n===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?ls(e,t):void 0}}var hs=Object.entries,gs=Object.setPrototypeOf,_s=Object.isFrozen,vs=Object.getPrototypeOf,ys=Object.getOwnPropertyDescriptor,bs=Object.freeze,xs=Object.seal,Ss=Object.create,Cs=typeof Reflect<`u`&&Reflect,ws=Cs.apply,Ts=Cs.construct;bs||(bs=function(e){return e}),xs||(xs=function(e){return e}),ws||(ws=function(e,t){for(var n=arguments.length,r=Array(n>2?n-2:0),i=2;i<n;i++)r[i-2]=arguments[i];return e.apply(t,r)}),Ts||(Ts=function(e){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return new e(...n)});var Es=Ks(Array.prototype.forEach),Ds=Ks(Array.prototype.lastIndexOf),Os=Ks(Array.prototype.pop),ks=Ks(Array.prototype.push),As=Ks(Array.prototype.splice),js=Array.isArray,Ms=Ks(String.prototype.toLowerCase),Ns=Ks(String.prototype.toString),Ps=Ks(String.prototype.match),Fs=Ks(String.prototype.replace),Is=Ks(String.prototype.indexOf),Ls=Ks(String.prototype.trim),Rs=Ks(Number.prototype.toString),zs=Ks(Boolean.prototype.toString),Bs=typeof BigInt>`u`?null:Ks(BigInt.prototype.toString),Vs=typeof Symbol>`u`?null:Ks(Symbol.prototype.toString),Hs=Ks(Object.prototype.hasOwnProperty),Us=Ks(Object.prototype.toString),Ws=Ks(RegExp.prototype.test),Gs=qs(TypeError);function Ks(e){return function(t){t instanceof RegExp&&(t.lastIndex=0);for(var n=arguments.length,r=Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];return ws(e,t,r)}}function qs(e){return function(){for(var t=arguments.length,n=Array(t),r=0;r<t;r++)n[r]=arguments[r];return Ts(e,n)}}function G(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:Ms;if(gs&&gs(e,null),!js(t))return e;let r=t.length;for(;r--;){let i=t[r];if(typeof i==`string`){let e=n(i);e!==i&&(_s(t)||(t[r]=e),i=e)}e[i]=!0}return e}function Js(e){for(let t=0;t<e.length;t++)Hs(e,t)||(e[t]=null);return e}function Ys(e){let t=Ss(null);for(let r of hs(e)){var n=ps(r,2);let i=n[0],a=n[1];Hs(e,i)&&(js(a)?t[i]=Js(a):a&&typeof a==`object`&&a.constructor===Object?t[i]=Ys(a):t[i]=a)}return t}function Xs(e){switch(typeof e){case`string`:return e;case`number`:return Rs(e);case`boolean`:return zs(e);case`bigint`:return Bs?Bs(e):`0`;case`symbol`:return Vs?Vs(e):`Symbol()`;case`undefined`:return Us(e);case`function`:case`object`:{if(e===null)return Us(e);let t=e,n=Zs(t,`toString`);if(typeof n==`function`){let e=n(t);return typeof e==`string`?e:Us(e)}return Us(e)}default:return Us(e)}}function Zs(e,t){for(;e!==null;){let n=ys(e,t);if(n){if(n.get)return Ks(n.get);if(typeof n.value==`function`)return Ks(n.value)}e=vs(e)}function n(){return null}return n}function Qs(e){try{return Ws(e,``),!0}catch{return!1}}var $s=bs(`a.abbr.acronym.address.area.article.aside.audio.b.bdi.bdo.big.blink.blockquote.body.br.button.canvas.caption.center.cite.code.col.colgroup.content.data.datalist.dd.decorator.del.details.dfn.dialog.dir.div.dl.dt.element.em.fieldset.figcaption.figure.font.footer.form.h1.h2.h3.h4.h5.h6.head.header.hgroup.hr.html.i.img.input.ins.kbd.label.legend.li.main.map.mark.marquee.menu.menuitem.meter.nav.nobr.ol.optgroup.option.output.p.picture.pre.progress.q.rp.rt.ruby.s.samp.search.section.select.shadow.slot.small.source.spacer.span.strike.strong.style.sub.summary.sup.table.tbody.td.template.textarea.tfoot.th.thead.time.tr.track.tt.u.ul.var.video.wbr`.split(`.`)),ec=bs(`svg.a.altglyph.altglyphdef.altglyphitem.animatecolor.animatemotion.animatetransform.circle.clippath.defs.desc.ellipse.enterkeyhint.exportparts.filter.font.g.glyph.glyphref.hkern.image.inputmode.line.lineargradient.marker.mask.metadata.mpath.part.path.pattern.polygon.polyline.radialgradient.rect.stop.style.switch.symbol.text.textpath.title.tref.tspan.view.vkern`.split(`.`)),tc=bs([`feBlend`,`feColorMatrix`,`feComponentTransfer`,`feComposite`,`feConvolveMatrix`,`feDiffuseLighting`,`feDisplacementMap`,`feDistantLight`,`feDropShadow`,`feFlood`,`feFuncA`,`feFuncB`,`feFuncG`,`feFuncR`,`feGaussianBlur`,`feImage`,`feMerge`,`feMergeNode`,`feMorphology`,`feOffset`,`fePointLight`,`feSpecularLighting`,`feSpotLight`,`feTile`,`feTurbulence`]),nc=bs([`animate`,`color-profile`,`cursor`,`discard`,`font-face`,`font-face-format`,`font-face-name`,`font-face-src`,`font-face-uri`,`foreignobject`,`hatch`,`hatchpath`,`mesh`,`meshgradient`,`meshpatch`,`meshrow`,`missing-glyph`,`script`,`set`,`solidcolor`,`unknown`,`use`]),rc=bs(`math.menclose.merror.mfenced.mfrac.mglyph.mi.mlabeledtr.mmultiscripts.mn.mo.mover.mpadded.mphantom.mroot.mrow.ms.mspace.msqrt.mstyle.msub.msup.msubsup.mtable.mtd.mtext.mtr.munder.munderover.mprescripts`.split(`.`)),ic=bs([`maction`,`maligngroup`,`malignmark`,`mlongdiv`,`mscarries`,`mscarry`,`msgroup`,`mstack`,`msline`,`msrow`,`semantics`,`annotation`,`annotation-xml`,`mprescripts`,`none`]),ac=bs([`#text`]),oc=bs(`accept.action.align.alt.autocapitalize.autocomplete.autopictureinpicture.autoplay.background.bgcolor.border.capture.cellpadding.cellspacing.checked.cite.class.clear.color.cols.colspan.command.commandfor.controls.controlslist.coords.crossorigin.datetime.decoding.default.dir.disabled.disablepictureinpicture.disableremoteplayback.download.draggable.enctype.enterkeyhint.exportparts.face.for.headers.height.hidden.high.href.hreflang.id.inert.inputmode.integrity.ismap.kind.label.lang.list.loading.loop.low.max.maxlength.media.method.min.minlength.multiple.muted.name.nonce.noshade.novalidate.nowrap.open.optimum.part.pattern.placeholder.playsinline.popover.popovertarget.popovertargetaction.poster.preload.pubdate.radiogroup.readonly.rel.required.rev.reversed.role.rows.rowspan.spellcheck.scope.selected.shape.size.sizes.slot.span.srclang.start.src.srcset.step.style.summary.tabindex.title.translate.type.usemap.valign.value.width.wrap.xmlns`.split(`.`)),sc=bs(`accent-height.accumulate.additive.alignment-baseline.amplitude.ascent.attributename.attributetype.azimuth.basefrequency.baseline-shift.begin.bias.by.class.clip.clippathunits.clip-path.clip-rule.color.color-interpolation.color-interpolation-filters.color-profile.color-rendering.cx.cy.d.dx.dy.diffuseconstant.direction.display.divisor.dur.edgemode.elevation.end.exponent.fill.fill-opacity.fill-rule.filter.filterunits.flood-color.flood-opacity.font-family.font-size.font-size-adjust.font-stretch.font-style.font-variant.font-weight.fx.fy.g1.g2.glyph-name.glyphref.gradientunits.gradienttransform.height.href.id.image-rendering.in.in2.intercept.k.k1.k2.k3.k4.kerning.keypoints.keysplines.keytimes.lang.lengthadjust.letter-spacing.kernelmatrix.kernelunitlength.lighting-color.local.marker-end.marker-mid.marker-start.markerheight.markerunits.markerwidth.maskcontentunits.maskunits.max.mask.mask-type.media.method.mode.min.name.numoctaves.offset.operator.opacity.order.orient.orientation.origin.overflow.paint-order.path.pathlength.patterncontentunits.patterntransform.patternunits.points.preservealpha.preserveaspectratio.primitiveunits.r.rx.ry.radius.refx.refy.repeatcount.repeatdur.restart.result.rotate.scale.seed.shape-rendering.slope.specularconstant.specularexponent.spreadmethod.startoffset.stddeviation.stitchtiles.stop-color.stop-opacity.stroke-dasharray.stroke-dashoffset.stroke-linecap.stroke-linejoin.stroke-miterlimit.stroke-opacity.stroke.stroke-width.style.surfacescale.systemlanguage.tabindex.tablevalues.targetx.targety.transform.transform-origin.text-anchor.text-decoration.text-rendering.textlength.type.u1.u2.unicode.values.viewbox.visibility.version.vert-adv-y.vert-origin-x.vert-origin-y.width.word-spacing.wrap.writing-mode.xchannelselector.ychannelselector.x.x1.x2.xmlns.y.y1.y2.z.zoomandpan`.split(`.`)),cc=bs(`accent.accentunder.align.bevelled.close.columnalign.columnlines.columnspacing.columnspan.denomalign.depth.dir.display.displaystyle.encoding.fence.frame.height.href.id.largeop.length.linethickness.lquote.lspace.mathbackground.mathcolor.mathsize.mathvariant.maxsize.minsize.movablelimits.notation.numalign.open.rowalign.rowlines.rowspacing.rowspan.rspace.rquote.scriptlevel.scriptminsize.scriptsizemultiplier.selection.separator.separators.stretchy.subscriptshift.supscriptshift.symmetric.voffset.width.xmlns`.split(`.`)),lc=bs([`xlink:href`,`xml:id`,`xlink:title`,`xml:space`,`xmlns:xlink`]),uc=xs(/{{[\w\W]*|^[\w\W]*}}/g),dc=xs(/<%[\w\W]*|^[\w\W]*%>/g),fc=xs(/\${[\w\W]*/g),pc=xs(/^data-[\-\w.\u00B7-\uFFFF]+$/),mc=xs(/^aria-[\-\w]+$/),hc=xs(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),gc=xs(/^(?:\w+script|data):/i),_c=xs(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),vc=xs(/^html$/i),yc=xs(/^[a-z][.\w]*(-[.\w]+)+$/i),bc=xs(/<[/\w!]/g),xc=xs(/<[/\w]/g),Sc=xs(/<\/no(script|embed|frames)/i),Cc=xs(/\/>/i),wc={element:1,attribute:2,text:3,cdataSection:4,entityReference:5,entityNode:6,processingInstruction:7,comment:8,document:9,documentType:10,documentFragment:11,notation:12},Tc=function(){return typeof window>`u`?null:window},Ec=function(e,t){if(typeof e!=`object`||typeof e.createPolicy!=`function`)return null;let n=null,r=`data-tt-policy-suffix`;t&&t.hasAttribute(r)&&(n=t.getAttribute(r));let i=`dompurify`+(n?`#`+n:``);try{return e.createPolicy(i,{createHTML(e){return e},createScriptURL(e){return e}})}catch{return console.warn(`TrustedTypes policy `+i+` could not be created.`),null}},Dc=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},Oc=function(e,t,n,r){return Hs(e,t)&&js(e[t])?G(r.base?Ys(r.base):{},e[t],r.transform):n};function kc(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Tc(),t=e=>kc(e);if(t.version=`3.4.11`,t.removed=[],!e||!e.document||e.document.nodeType!==wc.document||!e.Element)return t.isSupported=!1,t;let n=e.document,r=n,i=r.currentScript;e.DocumentFragment;let a=e.HTMLTemplateElement,o=e.Node,s=e.Element,c=e.NodeFilter;e.NamedNodeMap===void 0&&(e.NamedNodeMap||e.MozNamedAttrMap),e.HTMLFormElement;let l=e.DOMParser,u=e.trustedTypes,d=s.prototype,f=Zs(d,`cloneNode`),p=Zs(d,`remove`),m=Zs(d,`nextSibling`),h=Zs(d,`childNodes`),g=Zs(d,`parentNode`),_=Zs(d,`shadowRoot`),v=Zs(d,`attributes`),y=o&&o.prototype?Zs(o.prototype,`nodeType`):null,b=o&&o.prototype?Zs(o.prototype,`nodeName`):null;if(typeof a==`function`){let e=n.createElement(`template`);e.content&&e.content.ownerDocument&&(n=e.content.ownerDocument)}let x,S=``,C,w=!1,T=0,E=function(){if(T>0)throw Gs(`A configured TRUSTED_TYPES_POLICY callback (createHTML or createScriptURL) must not call DOMPurify.sanitize, as that causes infinite recursion. Do not pass a policy whose callbacks wrap DOMPurify as TRUSTED_TYPES_POLICY; see the "DOMPurify and Trusted Types" section of the README.`)},D=function(e){E(),T++;try{return x.createHTML(e)}finally{T--}},O=function(e){E(),T++;try{return x.createScriptURL(e)}finally{T--}},k=function(){return w||(C=Ec(u,i),w=!0),C},A=n,j=A.implementation,M=A.createNodeIterator,N=A.createDocumentFragment,P=A.getElementsByTagName,F=r.importNode,I=Dc();t.isSupported=typeof hs==`function`&&typeof g==`function`&&j&&j.createHTMLDocument!==void 0;let L=uc,ee=dc,te=fc,ne=pc,re=mc,ie=gc,ae=_c,oe=yc,se=hc,R=null,ce=G({},[...$s,...ec,...tc,...rc,...ac]),z=null,le=G({},[...oc,...sc,...cc,...lc]),B=Object.seal(Ss(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),ue=null,de=null,fe=Object.seal(Ss(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}})),pe=!0,me=!0,he=!1,ge=!0,_e=!1,ve=!0,ye=!1,be=!1,xe=null,Se=null,Ce=!1,we=!1,Te=!1,Ee=!1,De=!0,Oe=!1,ke=`user-content-`,V=!0,Ae=!1,je={},Me=null,Ne=G({},`annotation-xml.audio.colgroup.desc.foreignobject.head.iframe.math.mi.mn.mo.ms.mtext.noembed.noframes.noscript.plaintext.script.selectedcontent.style.svg.template.thead.title.video.xmp`.split(`.`)),Pe=null,Fe=G({},[`audio`,`video`,`img`,`source`,`image`,`track`]),Ie=null,Le=G({},[`alt`,`class`,`for`,`id`,`label`,`name`,`pattern`,`placeholder`,`role`,`summary`,`title`,`value`,`style`,`xmlns`]),Re=`http://www.w3.org/1998/Math/MathML`,ze=`http://www.w3.org/2000/svg`,Be=`http://www.w3.org/1999/xhtml`,Ve=Be,He=!1,Ue=null,We=G({},[Re,ze,Be],Ns),Ge=bs([`mi`,`mo`,`mn`,`ms`,`mtext`]),Ke=G({},Ge),qe=bs([`annotation-xml`]),Je=G({},qe),Ye=G({},[`title`,`style`,`font`,`a`,`script`]),Xe=null,Ze=[`application/xhtml+xml`,`text/html`],H=null,Qe=null,$e=n.createElement(`form`),et=function(e){return e instanceof RegExp||e instanceof Function},tt=function(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(Qe&&Qe===e)return;(!e||typeof e!=`object`)&&(e={}),e=Ys(e),Xe=Ze.indexOf(e.PARSER_MEDIA_TYPE)===-1?`text/html`:e.PARSER_MEDIA_TYPE,H=Xe===`application/xhtml+xml`?Ns:Ms,R=Oc(e,`ALLOWED_TAGS`,ce,{transform:H}),z=Oc(e,`ALLOWED_ATTR`,le,{transform:H}),Ue=Oc(e,`ALLOWED_NAMESPACES`,We,{transform:Ns}),Ie=Oc(e,`ADD_URI_SAFE_ATTR`,Le,{transform:H,base:Le}),Pe=Oc(e,`ADD_DATA_URI_TAGS`,Fe,{transform:H,base:Fe}),Me=Oc(e,`FORBID_CONTENTS`,Ne,{transform:H}),ue=Oc(e,`FORBID_TAGS`,Ys({}),{transform:H}),de=Oc(e,`FORBID_ATTR`,Ys({}),{transform:H}),je=Hs(e,`USE_PROFILES`)?e.USE_PROFILES&&typeof e.USE_PROFILES==`object`?Ys(e.USE_PROFILES):e.USE_PROFILES:!1,pe=e.ALLOW_ARIA_ATTR!==!1,me=e.ALLOW_DATA_ATTR!==!1,he=e.ALLOW_UNKNOWN_PROTOCOLS||!1,ge=e.ALLOW_SELF_CLOSE_IN_ATTR!==!1,_e=e.SAFE_FOR_TEMPLATES||!1,ve=e.SAFE_FOR_XML!==!1,ye=e.WHOLE_DOCUMENT||!1,we=e.RETURN_DOM||!1,Te=e.RETURN_DOM_FRAGMENT||!1,Ee=e.RETURN_TRUSTED_TYPE||!1,Ce=e.FORCE_BODY||!1,De=e.SANITIZE_DOM!==!1,Oe=e.SANITIZE_NAMED_PROPS||!1,V=e.KEEP_CONTENT!==!1,Ae=e.IN_PLACE||!1,se=Qs(e.ALLOWED_URI_REGEXP)?e.ALLOWED_URI_REGEXP:hc,Ve=typeof e.NAMESPACE==`string`?e.NAMESPACE:Be,Ke=Hs(e,`MATHML_TEXT_INTEGRATION_POINTS`)&&e.MATHML_TEXT_INTEGRATION_POINTS&&typeof e.MATHML_TEXT_INTEGRATION_POINTS==`object`?Ys(e.MATHML_TEXT_INTEGRATION_POINTS):G({},Ge),Je=Hs(e,`HTML_INTEGRATION_POINTS`)&&e.HTML_INTEGRATION_POINTS&&typeof e.HTML_INTEGRATION_POINTS==`object`?Ys(e.HTML_INTEGRATION_POINTS):G({},qe);let t=Hs(e,`CUSTOM_ELEMENT_HANDLING`)&&e.CUSTOM_ELEMENT_HANDLING&&typeof e.CUSTOM_ELEMENT_HANDLING==`object`?Ys(e.CUSTOM_ELEMENT_HANDLING):Ss(null);if(B=Ss(null),Hs(t,`tagNameCheck`)&&et(t.tagNameCheck)&&(B.tagNameCheck=t.tagNameCheck),Hs(t,`attributeNameCheck`)&&et(t.attributeNameCheck)&&(B.attributeNameCheck=t.attributeNameCheck),Hs(t,`allowCustomizedBuiltInElements`)&&typeof t.allowCustomizedBuiltInElements==`boolean`&&(B.allowCustomizedBuiltInElements=t.allowCustomizedBuiltInElements),xs(B),_e&&(me=!1),Te&&(we=!0),je&&(R=G({},ac),z=Ss(null),je.html===!0&&(G(R,$s),G(z,oc)),je.svg===!0&&(G(R,ec),G(z,sc),G(z,lc)),je.svgFilters===!0&&(G(R,tc),G(z,sc),G(z,lc)),je.mathMl===!0&&(G(R,rc),G(z,cc),G(z,lc))),fe.tagCheck=null,fe.attributeCheck=null,Hs(e,`ADD_TAGS`)&&(typeof e.ADD_TAGS==`function`?fe.tagCheck=e.ADD_TAGS:js(e.ADD_TAGS)&&(R===ce&&(R=Ys(R)),G(R,e.ADD_TAGS,H))),Hs(e,`ADD_ATTR`)&&(typeof e.ADD_ATTR==`function`?fe.attributeCheck=e.ADD_ATTR:js(e.ADD_ATTR)&&(z===le&&(z=Ys(z)),G(z,e.ADD_ATTR,H))),Hs(e,`ADD_URI_SAFE_ATTR`)&&js(e.ADD_URI_SAFE_ATTR)&&G(Ie,e.ADD_URI_SAFE_ATTR,H),Hs(e,`FORBID_CONTENTS`)&&js(e.FORBID_CONTENTS)&&(Me===Ne&&(Me=Ys(Me)),G(Me,e.FORBID_CONTENTS,H)),Hs(e,`ADD_FORBID_CONTENTS`)&&js(e.ADD_FORBID_CONTENTS)&&(Me===Ne&&(Me=Ys(Me)),G(Me,e.ADD_FORBID_CONTENTS,H)),V&&(R[`#text`]=!0),ye&&G(R,[`html`,`head`,`body`]),R.table&&(G(R,[`tbody`]),delete ue.tbody),e.TRUSTED_TYPES_POLICY){if(typeof e.TRUSTED_TYPES_POLICY.createHTML!=`function`)throw Gs(`TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.`);if(typeof e.TRUSTED_TYPES_POLICY.createScriptURL!=`function`)throw Gs(`TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.`);let t=x;x=e.TRUSTED_TYPES_POLICY;try{S=D(``)}catch(e){throw x=t,e}}else e.TRUSTED_TYPES_POLICY===null?(x=void 0,S=``):(x===void 0&&(x=k()),x&&typeof S==`string`&&(S=D(``)));bs&&bs(e),Qe=e},nt=G({},[...ec,...tc,...nc]),rt=G({},[...rc,...ic]),it=function(e,t,n){return t.namespaceURI===Be?e===`svg`:t.namespaceURI===Re?e===`svg`&&(n===`annotation-xml`||Ke[n]):!!nt[e]},at=function(e,t,n){return t.namespaceURI===Be?e===`math`:t.namespaceURI===ze?e===`math`&&Je[n]:!!rt[e]},ot=function(e,t,n){return t.namespaceURI===ze&&!Je[n]||t.namespaceURI===Re&&!Ke[n]?!1:!rt[e]&&(Ye[e]||!nt[e])},st=function(e){let t=g(e);(!t||!t.tagName)&&(t={namespaceURI:Ve,tagName:`template`});let n=Ms(e.tagName),r=Ms(t.tagName);return Ue[e.namespaceURI]?e.namespaceURI===ze?it(n,t,r):e.namespaceURI===Re?at(n,t,r):e.namespaceURI===Be?ot(n,t,r):!!(Xe===`application/xhtml+xml`&&Ue[e.namespaceURI]):!1},ct=function(e){ks(t.removed,{element:e});try{g(e).removeChild(e)}catch{if(p(e),!g(e))throw Gs(`a node selected for removal could not be detached from its tree and cannot be safely returned; refusing to sanitize in place`)}},lt=function(e){let t=h(e);if(t){let e=[];Es(t,t=>{ks(e,t)}),Es(e,e=>{try{p(e)}catch{}})}let n=v(e);if(n)for(let t=n.length-1;t>=0;--t){let r=n[t],i=r&&r.name;if(typeof i==`string`)try{e.removeAttribute(i)}catch{}}},ut=function(e,n){try{ks(t.removed,{attribute:n.getAttributeNode(e),from:n})}catch{ks(t.removed,{attribute:null,from:n})}if(n.removeAttribute(e),e===`is`)if(we||Te)try{ct(n)}catch{}else try{n.setAttribute(e,``)}catch{}},dt=function(e){let t=v(e);if(t)for(let n=t.length-1;n>=0;--n){let r=t[n],i=r&&r.name;if(!(typeof i!=`string`||z[H(i)]))try{e.removeAttribute(i)}catch{}}},ft=function(e){let t=[e];for(;t.length>0;){let e=t.pop();(y?y(e):e.nodeType)===wc.element&&dt(e);let n=h(e);if(n)for(let e=n.length-1;e>=0;--e)t.push(n[e])}},pt=function(e){let t=null,r=null;if(Ce)e=`<remove></remove>`+e;else{let t=Ps(e,/^[\r\n\t ]+/);r=t&&t[0]}Xe===`application/xhtml+xml`&&Ve===Be&&(e=`<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>`+e+`</body></html>`);let i=x?D(e):e;if(Ve===Be)try{t=new l().parseFromString(i,Xe)}catch{}if(!t||!t.documentElement){t=j.createDocument(Ve,`template`,null);try{t.documentElement.innerHTML=He?S:i}catch{}}let a=t.body||t.documentElement;return e&&r&&a.insertBefore(n.createTextNode(r),a.childNodes[0]||null),Ve===Be?P.call(t,ye?`html`:`body`)[0]:ye?t.documentElement:a},mt=function(e){return M.call(e.ownerDocument||e,e,c.SHOW_ELEMENT|c.SHOW_COMMENT|c.SHOW_TEXT|c.SHOW_PROCESSING_INSTRUCTION|c.SHOW_CDATA_SECTION,null)},ht=function(e){return e=Fs(e,L,` `),e=Fs(e,ee,` `),e=Fs(e,te,` `),e},gt=function(e){e.normalize();let t=M.call(e.ownerDocument||e,e,c.SHOW_TEXT|c.SHOW_COMMENT|c.SHOW_CDATA_SECTION|c.SHOW_PROCESSING_INSTRUCTION,null),n=t.nextNode();for(;n;)n.data=ht(n.data),n=t.nextNode();let r=e.querySelectorAll?.call(e,`template`);r&&Es(r,e=>{vt(e.content)&>(e.content)})},_t=function(e){let t=b?b(e):null;return typeof t!=`string`||H(t)!==`form`?!1:typeof e.nodeName!=`string`||typeof e.textContent!=`string`||typeof e.removeChild!=`function`||e.attributes!==v(e)||typeof e.removeAttribute!=`function`||typeof e.setAttribute!=`function`||typeof e.namespaceURI!=`string`||typeof e.insertBefore!=`function`||typeof e.hasChildNodes!=`function`||e.nodeType!==y(e)||e.childNodes!==h(e)},vt=function(e){if(!y||typeof e!=`object`||!e)return!1;try{return y(e)===wc.documentFragment}catch{return!1}},yt=function(e){if(!y||typeof e!=`object`||!e)return!1;try{return typeof y(e)==`number`}catch{return!1}};function bt(e,n,r){e.length!==0&&Es(e,e=>{e.call(t,n,r,Qe)})}let xt=function(e,t){return!!(ve&&e.hasChildNodes()&&!yt(e.firstElementChild)&&Ws(bc,e.textContent)&&Ws(bc,e.innerHTML)||ve&&e.namespaceURI===Be&&t===`style`&&yt(e.firstElementChild)||e.nodeType===wc.processingInstruction||ve&&e.nodeType===wc.comment&&Ws(xc,e.data))},St=function(e,t){if(!ue[t]&&Et(t)&&(B.tagNameCheck instanceof RegExp&&Ws(B.tagNameCheck,t)||B.tagNameCheck instanceof Function&&B.tagNameCheck(t)))return!1;if(V&&!Me[t]){let t=g(e),n=h(e);if(n&&t){let r=n.length;for(let i=r-1;i>=0;--i){let r=Ae?n[i]:f(n[i],!0);t.insertBefore(r,m(e))}}}return ct(e),!0},Ct=function(e){if(bt(I.beforeSanitizeElements,e,null),_t(e))return ct(e),!0;let n=H(b?b(e):e.nodeName);if(bt(I.uponSanitizeElement,e,{tagName:n,allowedTags:R}),xt(e,n))return ct(e),!0;if(ue[n]||!(fe.tagCheck instanceof Function&&fe.tagCheck(n))&&!R[n])return St(e,n);if((y?y(e):e.nodeType)===wc.element&&!st(e)||(n===`noscript`||n===`noembed`||n===`noframes`)&&Ws(Sc,e.innerHTML))return ct(e),!0;if(_e&&e.nodeType===wc.text){let n=ht(e.textContent);e.textContent!==n&&(ks(t.removed,{element:e.cloneNode()}),e.textContent=n)}return bt(I.afterSanitizeElements,e,null),!1},wt=function(e,t,r){if(de[t]||De&&(t===`id`||t===`name`)&&(r in n||r in $e))return!1;let i=z[t]||fe.attributeCheck instanceof Function&&fe.attributeCheck(t,e);if(!(me&&Ws(ne,t))&&!(pe&&Ws(re,t))){if(!i){if(!(Et(e)&&(B.tagNameCheck instanceof RegExp&&Ws(B.tagNameCheck,e)||B.tagNameCheck instanceof Function&&B.tagNameCheck(e))&&(B.attributeNameCheck instanceof RegExp&&Ws(B.attributeNameCheck,t)||B.attributeNameCheck instanceof Function&&B.attributeNameCheck(t,e))||t===`is`&&B.allowCustomizedBuiltInElements&&(B.tagNameCheck instanceof RegExp&&Ws(B.tagNameCheck,r)||B.tagNameCheck instanceof Function&&B.tagNameCheck(r))))return!1}else if(!Ie[t]&&!Ws(se,Fs(r,ae,``))&&!((t===`src`||t===`xlink:href`||t===`href`)&&e!==`script`&&Is(r,`data:`)===0&&Pe[e])&&!(he&&!Ws(ie,Fs(r,ae,``)))&&r)return!1}return!0},Tt=G({},[`annotation-xml`,`color-profile`,`font-face`,`font-face-format`,`font-face-name`,`font-face-src`,`font-face-uri`,`missing-glyph`]),Et=function(e){return!Tt[Ms(e)]&&Ws(oe,e)},Dt=function(e,t,n,r){if(x&&typeof u==`object`&&typeof u.getAttributeType==`function`&&!n)switch(u.getAttributeType(e,t)){case`TrustedHTML`:return D(r);case`TrustedScriptURL`:return O(r)}return r},Ot=function(e,n,r,i){try{r?e.setAttributeNS(r,n,i):e.setAttribute(n,i),_t(e)?ct(e):Os(t.removed)}catch{ut(n,e)}},kt=function(e){bt(I.beforeSanitizeAttributes,e,null);let t=e.attributes;if(!t||_t(e))return;let n={attrName:``,attrValue:``,keepAttr:!0,allowedAttributes:z,forceKeepAttr:void 0},r=t.length,i=H(e.nodeName);for(;r--;){let a=t[r],o=a.name,s=a.namespaceURI,c=a.value,l=H(o),u=c,d=o===`value`?u:Ls(u);if(n.attrName=l,n.attrValue=d,n.keepAttr=!0,n.forceKeepAttr=void 0,bt(I.uponSanitizeAttribute,e,n),d=n.attrValue,Oe&&(l===`id`||l===`name`)&&Is(d,ke)!==0&&(ut(o,e),d=ke+d),ve&&Ws(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,d)){ut(o,e);continue}if(l===`attributename`&&Ps(d,`href`)){ut(o,e);continue}if(!n.forceKeepAttr){if(!n.keepAttr){ut(o,e);continue}if(!ge&&Ws(Cc,d)){ut(o,e);continue}if(_e&&(d=ht(d)),!wt(i,l,d)){ut(o,e);continue}d=Dt(i,l,s,d),d!==u&&Ot(e,o,s,d)}}bt(I.afterSanitizeAttributes,e,null)},At=function(e){let t=null,n=mt(e);for(bt(I.beforeSanitizeShadowDOM,e,null);t=n.nextNode();)if(bt(I.uponSanitizeShadowNode,t,null),Ct(t),kt(t),vt(t.content)&&At(t.content),(y?y(t):t.nodeType)===wc.element){let e=_(t);vt(e)&&(jt(e),At(e))}bt(I.afterSanitizeShadowDOM,e,null)},jt=function(e){let t=[{node:e,shadow:null}];for(;t.length>0;){let e=t.pop();if(e.shadow){At(e.shadow);continue}let n=e.node,r=(y?y(n):n.nodeType)===wc.element,i=h(n);if(i)for(let e=i.length-1;e>=0;--e)t.push({node:i[e],shadow:null});if(r){let e=b?b(n):null;if(typeof e==`string`&&H(e)===`template`){let e=n.content;vt(e)&&t.push({node:e,shadow:null})}}if(r){let e=_(n);vt(e)&&t.push({node:null,shadow:e},{node:e,shadow:null})}}};return t.sanitize=function(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=null,a=null,o=null,s=null;if(He=!e,He&&(e=`<!-->`),typeof e!=`string`&&!yt(e)&&(e=Xs(e),typeof e!=`string`))throw Gs(`dirty is not a string, aborting`);if(!t.isSupported)return e;be?(R=xe,z=Se):tt(n),(I.uponSanitizeElement.length>0||I.uponSanitizeAttribute.length>0)&&(R=Ys(R)),I.uponSanitizeAttribute.length>0&&(z=Ys(z)),t.removed=[];let c=Ae&&typeof e!=`string`&&yt(e);if(c){let t=b?b(e):e.nodeName;if(typeof t==`string`){let e=H(t);if(!R[e]||ue[e])throw Gs(`root node is forbidden and cannot be sanitized in-place`)}if(_t(e))throw Gs(`root node is clobbered and cannot be sanitized in-place`);try{jt(e)}catch(t){throw lt(e),t}}else if(yt(e))i=pt(`<!---->`),a=i.ownerDocument.importNode(e,!0),a.nodeType===wc.element&&a.nodeName===`BODY`||a.nodeName===`HTML`?i=a:i.appendChild(a),jt(a);else{if(!we&&!_e&&!ye&&e.indexOf(`<`)===-1)return x&&Ee?D(e):e;if(i=pt(e),!i)return we?null:Ee?S:``}i&&Ce&&ct(i.firstChild);let l=mt(c?e:i);try{for(;o=l.nextNode();)Ct(o),kt(o),vt(o.content)&&At(o.content)}catch(t){throw c&<(e),t}if(c)return Es(t.removed,e=>{e.element&&ft(e.element)}),_e&>(e),e;if(we){if(_e&>(i),Te)for(s=N.call(i.ownerDocument);i.firstChild;)s.appendChild(i.firstChild);else s=i;return(z.shadowroot||z.shadowrootmode)&&(s=F.call(r,s,!0)),s}let u=ye?i.outerHTML:i.innerHTML;return ye&&R[`!doctype`]&&i.ownerDocument&&i.ownerDocument.doctype&&i.ownerDocument.doctype.name&&Ws(vc,i.ownerDocument.doctype.name)&&(u=`<!DOCTYPE `+i.ownerDocument.doctype.name+`>
|
|
5
5
|
`+u),_e&&(u=ht(u)),x&&Ee?D(u):u},t.setConfig=function(){tt(arguments.length>0&&arguments[0]!==void 0?arguments[0]:{}),be=!0,xe=R,Se=z},t.clearConfig=function(){Qe=null,be=!1,xe=null,Se=null,x=C,S=``},t.isValidAttribute=function(e,t,n){return Qe||tt({}),wt(H(e),H(t),n)},t.addHook=function(e,t){typeof t==`function`&&Hs(I,e)&&ks(I[e],t)},t.removeHook=function(e,t){if(Hs(I,e)){if(t!==void 0){let n=Ds(I[e],t);return n===-1?void 0:As(I[e],n,1)[0]}return Os(I[e])}},t.removeHooks=function(e){Hs(I,e)&&(I[e]=[])},t.removeAllHooks=function(){I=Dc()},t}var Ac=kc();function jc(e){"@babel/helpers - typeof";return jc=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},jc(e)}function Mc(e,t){if(jc(e)!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(jc(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function Nc(e){var t=Mc(e,`string`);return jc(t)==`symbol`?t:t+``}function K(e,t,n){return(t=Nc(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Pc;function Fc(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var Ic=Fc();function Lc(e){Ic=e}var Rc={exec:()=>null};function q(e,t=``){let n=typeof e==`string`?e:e.source,r={replace:(e,t)=>{let i=typeof t==`string`?t:t.source;return i=i.replace(zc.caret,`$1`),n=n.replace(e,i),r},getRegex:()=>new RegExp(n,t)};return r}var zc={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceTabs:/^\t+/,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] /,listReplaceTask:/^\[[ xX]\] +/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,unescapeTest:/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/gi,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:e=>RegExp(`^( {0,3}${e})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:e=>RegExp(`^ {0,${Math.min(3,e-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),hrRegex:e=>RegExp(`^ {0,${Math.min(3,e-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:e=>RegExp(`^ {0,${Math.min(3,e-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:e=>RegExp(`^ {0,${Math.min(3,e-1)}}#`),htmlBeginRegex:e=>RegExp(`^ {0,${Math.min(3,e-1)}}<(?:[a-z].*>|!--)`,`i`)},Bc=/^(?:[ \t]*(?:\n|$))+/,Vc=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,Hc=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,Uc=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,Wc=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,Gc=/(?:[*+-]|\d{1,9}[.)])/,Kc=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,qc=q(Kc).replace(/bull/g,Gc).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,``).getRegex(),Jc=q(Kc).replace(/bull/g,Gc).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),Yc=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,Xc=/^[^\n]+/,Zc=/(?!\s*\])(?:\\.|[^\[\]\\])+/,Qc=q(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace(`label`,Zc).replace(`title`,/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),$c=q(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,Gc).getRegex(),el=`address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul`,tl=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,nl=q(`^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))`,`i`).replace(`comment`,tl).replace(`tag`,el).replace(`attribute`,/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),rl=q(Yc).replace(`hr`,Uc).replace(`heading`,` {0,3}#{1,6}(?:\\s|$)`).replace(`|lheading`,``).replace(`|table`,``).replace(`blockquote`,` {0,3}>`).replace(`fences`," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace(`list`,` {0,3}(?:[*+-]|1[.)]) `).replace(`html`,`</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)`).replace(`tag`,el).getRegex(),il={blockquote:q(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace(`paragraph`,rl).getRegex(),code:Vc,def:Qc,fences:Hc,heading:Wc,hr:Uc,html:nl,lheading:qc,list:$c,newline:Bc,paragraph:rl,table:Rc,text:Xc},al=q(`^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)`).replace(`hr`,Uc).replace(`heading`,` {0,3}#{1,6}(?:\\s|$)`).replace(`blockquote`,` {0,3}>`).replace(`code`,`(?: {4}| {0,3} )[^\\n]`).replace(`fences`," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace(`list`,` {0,3}(?:[*+-]|1[.)]) `).replace(`html`,`</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)`).replace(`tag`,el).getRegex(),ol={...il,lheading:Jc,table:al,paragraph:q(Yc).replace(`hr`,Uc).replace(`heading`,` {0,3}#{1,6}(?:\\s|$)`).replace(`|lheading`,``).replace(`table`,al).replace(`blockquote`,` {0,3}>`).replace(`fences`," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace(`list`,` {0,3}(?:[*+-]|1[.)]) `).replace(`html`,`</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)`).replace(`tag`,el).getRegex()},sl={...il,html:q(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace(`comment`,tl).replace(/tag/g,`(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b`).getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:Rc,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:q(Yc).replace(`hr`,Uc).replace(`heading`,` *#{1,6} *[^
|
|
6
6
|
]`).replace(`lheading`,qc).replace(`|table`,``).replace(`blockquote`,` {0,3}>`).replace(`|fences`,``).replace(`|list`,``).replace(`|html`,``).replace(`|tag`,``).getRegex()},cl=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,ll=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,ul=/^( {2,}|\\)\n(?!\s*$)/,dl=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,fl=/[\p{P}\p{S}]/u,pl=/[\s\p{P}\p{S}]/u,ml=/[^\s\p{P}\p{S}]/u,hl=q(/^((?![*_])punctSpace)/,`u`).replace(/punctSpace/g,pl).getRegex(),gl=/(?!~)[\p{P}\p{S}]/u,_l=/(?!~)[\s\p{P}\p{S}]/u,vl=/(?:[^\s\p{P}\p{S}]|~)/u,yl=/\[[^[\]]*?\]\((?:\\.|[^\\\(\)]|\((?:\\.|[^\\\(\)])*\))*\)|`[^`]*?`|<[^<>]*?>/g,bl=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,xl=q(bl,`u`).replace(/punct/g,fl).getRegex(),Sl=q(bl,`u`).replace(/punct/g,gl).getRegex(),Cl=`^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)`,wl=q(Cl,`gu`).replace(/notPunctSpace/g,ml).replace(/punctSpace/g,pl).replace(/punct/g,fl).getRegex(),Tl=q(Cl,`gu`).replace(/notPunctSpace/g,vl).replace(/punctSpace/g,_l).replace(/punct/g,gl).getRegex(),El=q(`^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)`,`gu`).replace(/notPunctSpace/g,ml).replace(/punctSpace/g,pl).replace(/punct/g,fl).getRegex(),Dl=q(/\\(punct)/,`gu`).replace(/punct/g,fl).getRegex(),Ol=q(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace(`scheme`,/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace(`email`,/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),kl=q(tl).replace(`(?:-->|$)`,`-->`).getRegex(),Al=q(`^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>`).replace(`comment`,kl).replace(`attribute`,/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),jl=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,Ml=q(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace(`label`,jl).replace(`href`,/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace(`title`,/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),Nl=q(/^!?\[(label)\]\[(ref)\]/).replace(`label`,jl).replace(`ref`,Zc).getRegex(),Pl=q(/^!?\[(ref)\](?:\[\])?/).replace(`ref`,Zc).getRegex(),Fl={_backpedal:Rc,anyPunctuation:Dl,autolink:Ol,blockSkip:yl,br:ul,code:ll,del:Rc,emStrongLDelim:xl,emStrongRDelimAst:wl,emStrongRDelimUnd:El,escape:cl,link:Ml,nolink:Pl,punctuation:hl,reflink:Nl,reflinkSearch:q(`reflink|nolink(?!\\()`,`g`).replace(`reflink`,Nl).replace(`nolink`,Pl).getRegex(),tag:Al,text:dl,url:Rc},Il={...Fl,link:q(/^!?\[(label)\]\((.*?)\)/).replace(`label`,jl).getRegex(),reflink:q(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace(`label`,jl).getRegex()},Ll={...Fl,emStrongRDelimAst:Tl,emStrongLDelim:Sl,url:q(/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,`i`).replace(`email`,/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])((?:\\.|[^\\])*?(?:\\.|[^\s~\\]))\1(?=[^~]|$)/,text:/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|https?:\/\/|ftp:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/},Rl={...Ll,br:q(ul).replace(`{2,}`,`*`).getRegex(),text:q(Ll.text).replace(`\\b_`,`\\b_| {2,}\\n`).replace(/\{2,\}/g,`*`).getRegex()},zl={normal:il,gfm:ol,pedantic:sl},Bl={normal:Fl,gfm:Ll,breaks:Rl,pedantic:Il},Vl={"&":`&`,"<":`<`,">":`>`,'"':`"`,"'":`'`},Hl=e=>Vl[e];function Ul(e,t){if(t){if(zc.escapeTest.test(e))return e.replace(zc.escapeReplace,Hl)}else if(zc.escapeTestNoEncode.test(e))return e.replace(zc.escapeReplaceNoEncode,Hl);return e}function Wl(e){try{e=encodeURI(e).replace(zc.percentDecode,`%`)}catch{return null}return e}function Gl(e,t){let n=e.replace(zc.findPipe,(e,t,n)=>{let r=!1,i=t;for(;--i>=0&&n[i]===`\\`;)r=!r;return r?`|`:` |`}).split(zc.splitPipe),r=0;if(n[0].trim()||n.shift(),n.length>0&&!n.at(-1)?.trim()&&n.pop(),t)if(n.length>t)n.splice(t);else for(;n.length<t;)n.push(``);for(;r<n.length;r++)n[r]=n[r].trim().replace(zc.slashPipe,`|`);return n}function Kl(e,t,n){let r=e.length;if(r===0)return``;let i=0;for(;i<r;){let a=e.charAt(r-i-1);if(a===t&&!n)i++;else if(a!==t&&n)i++;else break}return e.slice(0,r-i)}function ql(e,t){if(e.indexOf(t[1])===-1)return-1;let n=0;for(let r=0;r<e.length;r++)if(e[r]===`\\`)r++;else if(e[r]===t[0])n++;else if(e[r]===t[1]&&(n--,n<0))return r;return n>0?-2:-1}function Jl(e,t,n,r,i){let a=t.href,o=t.title||null,s=e[1].replace(i.other.outputLinkReplace,`$1`);r.state.inLink=!0;let c={type:e[0].charAt(0)===`!`?`image`:`link`,raw:n,href:a,title:o,text:s,tokens:r.inlineTokens(s)};return r.state.inLink=!1,c}function Yl(e,t,n){let r=e.match(n.other.indentCodeCompensation);if(r===null)return t;let i=r[1];return t.split(`
|
|
@@ -63,7 +63,7 @@ Please report this to https://github.com/markedjs/marked.`,e){let e=`<p>An error
|
|
|
63
63
|
touch-action: pan-x pan-y pinch-zoom;
|
|
64
64
|
}
|
|
65
65
|
}
|
|
66
|
-
`.trim(),e.head.prepend(t)},[m]),(0,f.useEffect)(()=>{let e=v.current;return()=>{p||cm(e.target??void 0);for(let t of e.disposables)t();e.disposables=[]}},[p]),{isPressed:l||g,pressProps:Lu(h,A,{[wm]:!0})}}function Em(e){return e.tagName===`A`&&e.hasAttribute(`href`)}function Dm(e,t){let{key:n,code:r}=e,i=t,a=i.getAttribute(`role`);return(n===`Enter`||n===` `||n===`Spacebar`||r===`Space`)&&!(i instanceof Xu(i).HTMLInputElement&&!Rm(i,n)||i instanceof Xu(i).HTMLTextAreaElement||i.isContentEditable)&&!((a===`link`||!a&&Em(i))&&n!==`Enter`)}function Om(e){let{targetTouches:t}=e;return t.length>0?t[0]:null}function km(e,t){let n=e.changedTouches;for(let e=0;e<n.length;e++){let r=n[e];if(r.identifier===t)return r}return null}function Am(e,t){let n=0,r=0;return t.targetTouches&&t.targetTouches.length===1&&(n=t.targetTouches[0].clientX,r=t.targetTouches[0].clientY),{currentTarget:e,shiftKey:t.shiftKey,ctrlKey:t.ctrlKey,metaKey:t.metaKey,altKey:t.altKey,clientX:n,clientY:r}}function jm(e,t){let n=t.clientX,r=t.clientY;return{currentTarget:e,shiftKey:t.shiftKey,ctrlKey:t.ctrlKey,metaKey:t.metaKey,altKey:t.altKey,clientX:n,clientY:r,key:t.key}}function Mm(e){let t=0,n=0;return e.width===void 0?e.radiusX!==void 0&&(t=e.radiusX):t=e.width/2,e.height===void 0?e.radiusY!==void 0&&(n=e.radiusY):n=e.height/2,{top:e.clientY-n,right:e.clientX+t,bottom:e.clientY+n,left:e.clientX-t}}function Nm(e,t){return!(e.left>t.right||t.left>e.right||e.top>t.bottom||t.top>e.bottom)}function Pm(e,t){return Nm(t.getBoundingClientRect(),Mm(e))}function Fm(e){return e instanceof HTMLInputElement?!1:e instanceof HTMLButtonElement?e.type!==`submit`&&e.type!==`reset`:!Em(e)}function Im(e,t){return e instanceof HTMLInputElement?!Rm(e,t):Fm(e)}var Lm=new Set([`checkbox`,`radio`,`range`,`color`,`file`,`image`,`button`,`submit`,`reset`]);function Rm(e,t){return e.type===`checkbox`||e.type===`radio`?t===` `:Lm.has(e.type)}function zm(e){let{isDisabled:t,onBlurWithin:n,onFocusWithin:r,onFocusWithinChange:i}=e,a=(0,f.useRef)({isFocusWithin:!1}),{addGlobalListener:o,removeAllGlobalListeners:s}=pm(),c=(0,f.useCallback)(e=>{X(e.currentTarget,Z(e))&&a.current.isFocusWithin&&!X(e.currentTarget,e.relatedTarget)&&(a.current.isFocusWithin=!1,s(),n&&n(e),i&&i(!1))},[n,i,a,s]),l=wd(c),u=(0,f.useCallback)(e=>{if(!X(e.currentTarget,Z(e)))return;let t=Z(e),n=Y(t),s=td(n);if(!a.current.isFocusWithin&&s===t){r&&r(e),i&&i(!0),a.current.isFocusWithin=!0,l(e);let t=e.currentTarget;o(n,`focus`,e=>{let r=Z(e);if(a.current.isFocusWithin&&!X(t,r)){let e=new n.defaultView.FocusEvent(`blur`,{relatedTarget:r});Cd(e,t),c(Sd(e))}},{capture:!0})}},[r,i,l,o,c]);return t?{focusWithinProps:{onFocus:void 0,onBlur:void 0}}:{focusWithinProps:{onFocus:u,onBlur:c}}}function Bm(e={}){let{autoFocus:t=!1,isTextInput:n,within:r}=e,i=(0,f.useRef)({isFocused:!1,isFocusVisible:t||ff()}),[a,o]=(0,f.useState)(!1),[s,c]=(0,f.useState)(()=>i.current.isFocused&&i.current.isFocusVisible),l=(0,f.useCallback)(()=>c(i.current.isFocused&&i.current.isFocusVisible),[]),u=(0,f.useCallback)(e=>{i.current.isFocused=e,i.current.isFocusVisible=ff(),o(e),l()},[l]);_f(e=>{i.current.isFocusVisible=e,l()},[n,a],{enabled:a,isTextInput:n});let{focusProps:d}=_p({isDisabled:r,onFocusChange:u}),{focusWithinProps:p}=zm({isDisabled:!r,onFocusWithinChange:u});return{isFocused:a,isFocusVisible:s,focusProps:r?p:d}}var Vm=!1,Hm=0;function Um(){Vm=!0,setTimeout(()=>{Vm=!1},500)}function Wm(e){e.pointerType===`touch`&&Um()}function Gm(){let e=Y(null);if(e!==void 0)return Hm===0&&(typeof PointerEvent<`u`?e.addEventListener(`pointerup`,Wm):process.env.NODE_ENV===`test`&&e.addEventListener(`touchend`,Um)),Hm++,()=>{Hm--,!(Hm>0)&&(typeof PointerEvent<`u`?e.removeEventListener(`pointerup`,Wm):process.env.NODE_ENV===`test`&&e.removeEventListener(`touchend`,Um))}}function Km(e){let{onHoverStart:t,onHoverChange:n,onHoverEnd:r,isDisabled:i}=e,[a,o]=(0,f.useState)(!1),s=(0,f.useRef)({isHovered:!1,ignoreEmulatedMouseEvents:!1,pointerType:``,target:null}).current;(0,f.useEffect)(Gm,[]);let{addGlobalListener:c,removeAllGlobalListeners:l}=pm(),{hoverProps:u,triggerHoverEnd:d}=(0,f.useMemo)(()=>{let e=(e,r)=>{if(s.pointerType=r,i||r===`touch`||s.isHovered||!X(e.currentTarget,Z(e)))return;s.isHovered=!0;let l=e.currentTarget;s.target=l,c(Y(Z(e)),`pointerover`,e=>{s.isHovered&&s.target&&!X(s.target,Z(e))&&a(e,e.pointerType)},{capture:!0}),t&&t({type:`hoverstart`,target:l,pointerType:r}),n&&n(!0),o(!0)},a=(e,t)=>{let i=s.target;s.pointerType=``,s.target=null,!(t===`touch`||!s.isHovered||!i)&&(s.isHovered=!1,l(),r&&r({type:`hoverend`,target:i,pointerType:t}),n&&n(!1),o(!1))},u={};return typeof PointerEvent<`u`?(u.onPointerEnter=t=>{Vm&&t.pointerType===`mouse`||e(t,t.pointerType)},u.onPointerLeave=e=>{!i&&X(e.currentTarget,Z(e))&&a(e,e.pointerType)}):process.env.NODE_ENV===`test`&&(u.onTouchStart=()=>{s.ignoreEmulatedMouseEvents=!0},u.onMouseEnter=t=>{!s.ignoreEmulatedMouseEvents&&!Vm&&e(t,`mouse`),s.ignoreEmulatedMouseEvents=!1},u.onMouseLeave=e=>{!i&&X(e.currentTarget,Z(e))&&a(e,`mouse`)}),{hoverProps:u,triggerHoverEnd:a}},[t,n,r,i,s,c,l]);return(0,f.useEffect)(()=>{i&&d({currentTarget:s.target},s.pointerType)},[i]),{hoverProps:u,isHovered:a}}function qm(e){let{id:t,label:n,"aria-labelledby":r,"aria-label":i,labelElementType:a=`label`}=e;t=Au(t);let o=Au(),s={};n?(r=r?`${o} ${r}`:o,s={id:o,htmlFor:a===`label`?t:void 0}):!r&&!i&&process.env.NODE_ENV!==`production`&&console.warn(`If you do not provide a visible label, you must specify an aria-label or aria-labelledby attribute for accessibility`);let c=Sf({id:t,"aria-label":i,"aria-labelledby":r});return{labelProps:s,fieldProps:c}}var Jm=new Map,Ym=!1;try{Ym=new Intl.NumberFormat(`de-DE`,{signDisplay:`exceptZero`}).resolvedOptions().signDisplay===`exceptZero`}catch{}var Xm=!1;try{Xm=new Intl.NumberFormat(`de-DE`,{style:`unit`,unit:`degree`}).resolvedOptions().style===`unit`}catch{}var Zm={degree:{narrow:{default:`°`,"ja-JP":` 度`,"zh-TW":`度`,"sl-SI":` °`}}},Qm=class{constructor(e,t={}){this.numberFormatter=$m(e,t),this.options=t}format(e){let t=``;if(t=!Ym&&this.options.signDisplay!=null?eh(this.numberFormatter,this.options.signDisplay,e):this.numberFormatter.format(e),this.options.style===`unit`&&!Xm){let{unit:e,unitDisplay:n=`short`,locale:r}=this.resolvedOptions();if(!e)return t;let i=Zm[e]?.[n];t+=i[r]||i.default}return t}formatToParts(e){return this.numberFormatter.formatToParts(e)}formatRange(e,t){if(typeof this.numberFormatter.formatRange==`function`)return this.numberFormatter.formatRange(e,t);if(t<e)throw RangeError(`End date must be >= start date`);return`${this.format(e)} \u{2013} ${this.format(t)}`}formatRangeToParts(e,t){if(typeof this.numberFormatter.formatRangeToParts==`function`)return this.numberFormatter.formatRangeToParts(e,t);if(t<e)throw RangeError(`End date must be >= start date`);let n=this.numberFormatter.formatToParts(e),r=this.numberFormatter.formatToParts(t);return[...n.map(e=>({...e,source:`startRange`})),{type:`literal`,value:` – `,source:`shared`},...r.map(e=>({...e,source:`endRange`}))]}resolvedOptions(){let e=this.numberFormatter.resolvedOptions();return!Ym&&this.options.signDisplay!=null&&(e={...e,signDisplay:this.options.signDisplay}),!Xm&&this.options.style===`unit`&&(e={...e,style:`unit`,unit:this.options.unit,unitDisplay:this.options.unitDisplay}),e}};function $m(e,t={}){let{numberingSystem:n}=t;if(n&&e.includes(`-nu-`)&&(e.includes(`-u-`)||(e+=`-u-`),e+=`-nu-${n}`),t.style===`unit`&&!Xm){let{unit:e,unitDisplay:n=`short`}=t;if(!e)throw Error(`unit option must be provided with style: "unit"`);if(!Zm[e]?.[n])throw Error(`Unsupported unit ${e} with unitDisplay = ${n}`);t={...t,style:`decimal`}}let r=e+(t?Object.entries(t).sort((e,t)=>e[0]<t[0]?-1:1).join():``);if(Jm.has(r))return Jm.get(r);let i=new Intl.NumberFormat(e,t);return Jm.set(r,i),i}function eh(e,t,n){if(t===`auto`)return e.format(n);if(t===`never`)return e.format(Math.abs(n));{let r=!1;if(t===`always`?r=n>0||Object.is(n,0):t===`exceptZero`&&(Object.is(n,-0)||Object.is(n,0)?n=Math.abs(n):r=n>0),r){let t=e.format(-n),r=e.format(n),i=t.replace(r,``).replace(/\u200e|\u061C/,``);return[...i].length!==1&&console.warn(`@react-aria/i18n polyfill for NumberFormat signDisplay: Unsupported case`),t.replace(r,`!!!`).replace(i,`+`).replace(`!!!`,r)}else return e.format(n)}}function th(e={}){let{locale:t}=Nf();return(0,f.useMemo)(()=>new Qm(t,e),[t,e])}function nh(e,t=-1/0,n=1/0){return Math.min(Math.max(e,t),n)}function rh(e,t){let n=e,r=0,i=t.toString(),a=i.toLowerCase().indexOf(`e-`);if(a>0)r=Math.abs(Math.floor(Math.log10(Math.abs(t))))+a;else{let e=i.indexOf(`.`);e>=0&&(r=i.length-e)}if(r>0){let e=10**r;n=Math.round(n*e)/e}return n}function ih(e,t,n,r){t=Number(t),n=Number(n);let i=(e-(isNaN(t)?0:t))%r,a=rh(Math.abs(i)*2>=r?e+Math.sign(i)*(r-Math.abs(i)):e-i,r);return isNaN(t)?!isNaN(n)&&a>n&&(a=Math.floor(rh(n/r,r))*r):a<t?a=t:!isNaN(n)&&a>n&&(a=t+Math.floor(rh((n-t)/r,r))*r),a=rh(a,r),a}var ah=(0,f.createContext)({});function oh(e,t){if(!e)return!1;let n=window.getComputedStyle(e),r=document.scrollingElement||document.documentElement,i=/(auto|scroll)/.test(n.overflow+n.overflowX+n.overflowY);return e===r&&n.overflow!==`hidden`&&(i=!0),i&&t&&(i=e.scrollHeight!==e.clientHeight||e.scrollWidth!==e.clientWidth),i}function sh(e,t){let n=[],r=document.scrollingElement||document.documentElement;for(;e&&(oh(e,t)&&n.push(e),e!==r);)e=e.parentElement;return n}function ch(e,t,n={}){let{block:r=`nearest`,inline:i=`nearest`}=n;if(e===t)return;let a=e.scrollTop,o=e.scrollLeft,s=t.getBoundingClientRect(),c=e.getBoundingClientRect(),l=window.getComputedStyle(t),u=window.getComputedStyle(e),d=document.scrollingElement||document.documentElement,f=e===d,p=e===d?0:c.top,m=e===d?e.clientHeight:c.bottom,h=e===d?0:c.left,g=e===d?e.clientWidth:c.right,_=parseFloat(l.scrollMarginTop)||0,v=parseFloat(l.scrollMarginBottom)||0,y=parseFloat(l.scrollMarginLeft)||0,b=parseFloat(l.scrollMarginRight)||0,x=parseFloat(u.scrollPaddingTop)||0,S=parseFloat(u.scrollPaddingBottom)||0,C=parseFloat(u.scrollPaddingLeft)||0,w=parseFloat(u.scrollPaddingRight)||0,T=parseFloat(u.borderTopWidth)||0,E=parseFloat(u.borderBottomWidth)||0,D=parseFloat(u.borderLeftWidth)||0,O=parseFloat(u.borderRightWidth)||0,k=s.top-_,A=s.bottom+v,j=s.left-y,M=s.right+b,N=e===d?0:D+O,P=e===d?0:T+E,F=e===d?0:e.offsetWidth-e.clientWidth-N,I=e===d?0:e.offsetHeight-e.clientHeight-P,L=p+(f?0:T)+x,ee=m-(f?0:E)-S-I,te=h+(f?0:D)+C,ne=g-(f?0:O)-w;u.direction===`rtl`&&!Nd()?te+=F:ne-=F;let re=k<L||A>ee,ie=j<te||M>ne;if(re&&r===`start`)a+=k-L;else if(re&&r===`center`)a+=(k+A)/2-(L+ee)/2;else if(re&&r===`end`)a+=A-ee;else if(re&&r===`nearest`){let e=k-L,t=A-ee;a+=Math.abs(e)<=Math.abs(t)?e:t}if(ie&&i===`start`)o+=j-te;else if(ie&&i===`center`)o+=(j+M)/2-(te+ne)/2;else if(ie&&i===`end`)o+=M-ne;else if(ie&&i===`nearest`){let e=j-te,t=M-ne;o+=Math.abs(e)<=Math.abs(t)?e:t}if(process.env.NODE_ENV===`test`){e.scrollLeft=o,e.scrollTop=a;return}e.scrollTo({left:o,top:a})}function lh(e,t={}){let{containingElement:n}=t;if(e&&e.isConnected){let t=document.scrollingElement||document.documentElement;if(window.getComputedStyle(t).overflow!==`hidden`){let{left:t,top:r}=e.getBoundingClientRect();e?.scrollIntoView?.({block:`nearest`});let{left:i,top:a}=e.getBoundingClientRect();(Math.abs(t-i)>1||Math.abs(r-a)>1)&&(n?.scrollIntoView?.({block:`center`,inline:`center`}),e.scrollIntoView?.({block:`nearest`}))}else{let{left:t,top:r}=e.getBoundingClientRect(),i=sh(e,!0);for(let t of i)ch(t,e);let{left:a,top:o}=e.getBoundingClientRect();if(Math.abs(t-a)>1||Math.abs(r-o)>1){i=n?sh(n,!0):[];for(let e of i)ch(e,n,{block:`center`,inline:`center`});for(let t of sh(e,!0))ch(t,e)}}}}var uh=0,dh=new Map;function fh(e){let[t,n]=(0,f.useState)();return fu(()=>{if(!e)return;let t=dh.get(e);if(t)n(t.element.id);else{let r=`react-aria-description-${uh++}`;n(r);let i=document.createElement(`div`);i.id=r,i.style.display=`none`,i.textContent=e,document.body.appendChild(i),t={refCount:0,element:i},dh.set(e,t)}return t.refCount++,()=>{t&&--t.refCount===0&&(t.element.remove(),dh.delete(e))}},[e]),{"aria-describedby":e?t:void 0}}var ph={border:0,clip:`rect(0 0 0 0)`,clipPath:`inset(50%)`,height:`1px`,margin:`-1px`,overflow:`hidden`,padding:0,position:`absolute`,width:`1px`,whiteSpace:`nowrap`};function mh(e={}){let{style:t,isFocusable:n}=e,[r,i]=(0,f.useState)(!1),{focusWithinProps:a}=zm({isDisabled:!n,onFocusWithinChange:e=>i(e)}),o=(0,f.useMemo)(()=>r?t:t?{...ph,...t}:ph,[r]);return{visuallyHiddenProps:{...a,style:o}}}function hh(e){let{children:t,elementType:n=`div`,isFocusable:r,style:i,...a}=e,{visuallyHiddenProps:o}=mh(e);return f.default.createElement(n,Lu(a,o),t)}function gh(e,t,n){let r=bf(e=>{n&&!e.defaultPrevented&&n(t)});(0,f.useEffect)(()=>{let t=e?.current?.form;return t?.addEventListener(`reset`,r),()=>{t?.removeEventListener(`reset`,r)}},[e])}function _h(e){let{onMoveStart:t,onMove:n,onMoveEnd:r}=e,i=(0,f.useRef)({didMove:!1,lastPosition:null,id:null}),{addGlobalListener:a,removeGlobalListener:o}=pm(),s=bf((0,f.useCallback)((e,r,a,o)=>{a===0&&o===0||(i.current.didMove||(i.current.didMove=!0,t?.({type:`movestart`,pointerType:r,shiftKey:e.shiftKey,metaKey:e.metaKey,ctrlKey:e.ctrlKey,altKey:e.altKey})),n?.({type:`move`,pointerType:r,deltaX:a,deltaY:o,shiftKey:e.shiftKey,metaKey:e.metaKey,ctrlKey:e.ctrlKey,altKey:e.altKey}))},[t,n,i])),c=bf((0,f.useCallback)((e,t)=>{cm(),i.current.didMove&&r?.({type:`moveend`,pointerType:t,shiftKey:e.shiftKey,metaKey:e.metaKey,ctrlKey:e.ctrlKey,altKey:e.altKey})},[r,i]));return{moveProps:(0,f.useMemo)(()=>{let e={},t=()=>{sm(),i.current.didMove=!1};if(typeof PointerEvent>`u`&&process.env.NODE_ENV===`test`){let n=e=>{e.button===0&&(s(e,`mouse`,e.pageX-(i.current.lastPosition?.pageX??0),e.pageY-(i.current.lastPosition?.pageY??0)),i.current.lastPosition={pageX:e.pageX,pageY:e.pageY})},r=e=>{if(e.button===0){c(e,`mouse`);let t=Xu(Z(e));o(t,`mousemove`,n,!1),o(t,`mouseup`,r,!1)}};e.onMouseDown=e=>{if(e.button===0){t(),e.stopPropagation(),e.preventDefault(),i.current.lastPosition={pageX:e.pageX,pageY:e.pageY};let o=Xu(Z(e));a(o,`mousemove`,n,!1),a(o,`mouseup`,r,!1)}};let l=e=>{let t=[...e.changedTouches].findIndex(({identifier:e})=>e===i.current.id);if(t>=0){let{pageX:n,pageY:r}=e.changedTouches[t];s(e,`touch`,n-(i.current.lastPosition?.pageX??0),r-(i.current.lastPosition?.pageY??0)),i.current.lastPosition={pageX:n,pageY:r}}},u=e=>{if([...e.changedTouches].findIndex(({identifier:e})=>e===i.current.id)>=0){c(e,`touch`),i.current.id=null;let t=Xu(Z(e));o(t,`touchmove`,l),o(t,`touchend`,u),o(t,`touchcancel`,u)}};e.onTouchStart=e=>{if(e.changedTouches.length===0||i.current.id!=null)return;let{pageX:n,pageY:r,identifier:o}=e.changedTouches[0];t(),e.stopPropagation(),e.preventDefault(),i.current.lastPosition={pageX:n,pageY:r},i.current.id=o;let s=Xu(Z(e));a(s,`touchmove`,l,!1),a(s,`touchend`,u,!1),a(s,`touchcancel`,u,!1)}}else{let n=e=>{e.pointerId===i.current.id&&(s(e,e.pointerType||`mouse`,e.pageX-(i.current.lastPosition?.pageX??0),e.pageY-(i.current.lastPosition?.pageY??0)),i.current.lastPosition={pageX:e.pageX,pageY:e.pageY})},r=e=>{if(e.pointerId===i.current.id){c(e,e.pointerType||`mouse`),i.current.id=null;let t=Xu(Z(e));o(t,`pointermove`,n,!1),o(t,`pointerup`,r,!1),o(t,`pointercancel`,r,!1)}};e.onPointerDown=e=>{if(e.button===0&&i.current.id==null){t(),e.stopPropagation(),e.preventDefault(),i.current.lastPosition={pageX:e.pageX,pageY:e.pageY},i.current.id=e.pointerId;let o=Xu(Z(e));a(o,`pointermove`,n,!1),a(o,`pointerup`,r,!1),a(o,`pointercancel`,r,!1)}}}let n=(e,n,r)=>{t(),s(e,`keyboard`,n,r),c(e,`keyboard`)};return e.onKeyDown=e=>{switch(e.key){case`Left`:case`ArrowLeft`:e.preventDefault(),e.stopPropagation(),n(e,-1,0);break;case`Right`:case`ArrowRight`:e.preventDefault(),e.stopPropagation(),n(e,1,0);break;case`Up`:case`ArrowUp`:e.preventDefault(),e.stopPropagation(),n(e,0,-1);break;case`Down`:case`ArrowDown`:e.preventDefault(),e.stopPropagation(),n(e,0,1);break}},e},[a,o,i])}}var vh=new WeakMap;function yh(e,t){let n=vh.get(e);if(!n)throw Error(`Unknown slider state`);return`${n.id}-${t}`}function bh(e,t,n){let{labelProps:r,fieldProps:i}=qm(e),a=e.orientation===`vertical`;vh.set(t,{id:r.id??i.id,"aria-describedby":e[`aria-describedby`],"aria-details":e[`aria-details`]});let{direction:o}=Nf(),{addGlobalListener:s,removeGlobalListener:c}=pm(),l=(0,f.useRef)(null),u=o===`rtl`,d=(0,f.useRef)(null),{moveProps:p}=_h({onMoveStart(){d.current=null},onMove({deltaX:e,deltaY:r}){if(!n.current)return;let{height:i,width:o}=n.current.getBoundingClientRect(),s=a?i:o;d.current==null&&l.current!=null&&(d.current=t.getThumbPercent(l.current)*s);let c=a?r:e;if((a||u)&&(c=-c),d.current+=c,l.current!=null&&n.current){let e=nh(d.current/s,0,1);t.setThumbPercent(l.current,e)}},onMoveEnd(){l.current!=null&&(t.setThumbDragging(l.current,!1),l.current=null)}}),m=(0,f.useRef)(void 0),h=(r,i,c,u)=>{if(n.current&&!e.isDisabled&&t.values.every((e,n)=>!t.isThumbDragging(n))){let{height:e,width:d,top:f,left:p}=n.current.getBoundingClientRect(),h=a?e:d,_=((a?u:c)-(a?f:p))/h;(o===`rtl`||a)&&(_=1-_);let v=t.getPercentValue(_),y,b=t.values.findIndex(e=>v-e<0);if(b===0)y=b;else if(b===-1)y=t.values.length-1;else{let e=t.values[b-1],n=t.values[b];y=Math.abs(e-v)<Math.abs(n-v)?b-1:b}y>=0&&t.isThumbEditable(y)?(r.preventDefault(),l.current=y,t.setFocusedThumb(y),m.current=i,t.setThumbDragging(l.current,!0),t.setThumbValue(y,v),s(window,`mouseup`,g,!1),s(window,`touchend`,g,!1),s(window,`pointerup`,g,!1)):l.current=null}},g=e=>{(e.pointerId??e.changedTouches?.[0].identifier)===m.current&&(l.current!=null&&(t.setThumbDragging(l.current,!1),l.current=null),c(window,`mouseup`,g,!1),c(window,`touchend`,g,!1),c(window,`pointerup`,g,!1))};return`htmlFor`in r&&r.htmlFor&&(delete r.htmlFor,r.onClick=()=>{document.getElementById(yh(t,0))?.focus(),mf(`keyboard`)}),{labelProps:r,groupProps:{role:`group`,...i},trackProps:Lu({onMouseDown(e){e.button!==0||e.altKey||e.ctrlKey||e.metaKey||h(e,void 0,e.clientX,e.clientY)},onPointerDown(e){e.pointerType===`mouse`&&(e.button!==0||e.altKey||e.ctrlKey||e.metaKey)||h(e,e.pointerId,e.clientX,e.clientY)},onTouchStart(e){h(e,e.changedTouches[0].identifier,e.changedTouches[0].clientX,e.changedTouches[0].clientY)},style:{position:`relative`,touchAction:`none`}},p),outputProps:{htmlFor:t.values.map((e,n)=>yh(t,n)).join(` `),"aria-live":`off`}}}function xh(e,t){let{index:n=0,isRequired:r,validationState:i,isInvalid:a,trackRef:o,inputRef:s,orientation:c=t.orientation,name:l,form:u}=e,d=e.isDisabled||t.isDisabled,p=c===`vertical`,{direction:m}=Nf(),{addGlobalListener:h,removeGlobalListener:g}=pm(),_=vh.get(t),{labelProps:v,fieldProps:y}=qm({...e,id:yh(t,n),"aria-labelledby":`${_.id} ${e[`aria-labelledby`]??``}`.trim()}),b=t.values[n],x=(0,f.useCallback)(()=>{s.current&&sd(s.current)},[s]),S=t.focusedThumb===n;(0,f.useEffect)(()=>{S&&x()},[S,x]);let C=m===`rtl`,w=(0,f.useRef)(null),{keyboardProps:T}=yp({onKeyDown(e){let{getThumbMaxValue:r,getThumbMinValue:i,decrementThumb:a,incrementThumb:o,setThumbValue:s,setThumbDragging:c,pageSize:l}=t;if(!/^(PageUp|PageDown|Home|End)$/.test(e.key)){e.continuePropagation();return}switch(e.preventDefault(),c(n,!0),e.key){case`PageUp`:o(n,l);break;case`PageDown`:a(n,l);break;case`Home`:s(n,i(n));break;case`End`:s(n,r(n));break}c(n,!1)}}),{moveProps:E}=_h({onMoveStart(){w.current=null,t.setThumbDragging(n,!0)},onMove({deltaX:e,deltaY:r,pointerType:i,shiftKey:a}){let{getThumbPercent:s,setThumbPercent:c,decrementThumb:l,incrementThumb:u,step:d,pageSize:f}=t;if(!o.current)return;let{width:m,height:h}=o.current.getBoundingClientRect(),g=p?h:m;if(w.current??(w.current=s(n)*g),i===`keyboard`)e>0&&C||e<0&&!C||r>0?l(n,a?f:d):u(n,a?f:d);else{let t=p?r:e;(p||C)&&(t=-t),w.current+=t,c(n,nh(w.current/g,0,1))}},onMoveEnd(){t.setThumbDragging(n,!1)}});t.setThumbEditable(n,!d);let{focusableProps:D}=Cp(Lu(e,{onFocus:()=>t.setFocusedThumb(n),onBlur:()=>t.setFocusedThumb(void 0)}),s),O=(0,f.useRef)(void 0),k=e=>{x(),O.current=e,t.setThumbDragging(n,!0),h(window,`mouseup`,A,!1),h(window,`touchend`,A,!1),h(window,`pointerup`,A,!1)},A=e=>{(e.pointerId??e.changedTouches?.[0].identifier)===O.current&&(x(),t.setThumbDragging(n,!1),g(window,`mouseup`,A,!1),g(window,`touchend`,A,!1),g(window,`pointerup`,A,!1))},j=t.getThumbPercent(n);(p||m===`rtl`)&&(j=1-j);let M=d?{}:Lu(T,E,{onMouseDown:e=>{e.button!==0||e.altKey||e.ctrlKey||e.metaKey||k()},onPointerDown:e=>{e.button!==0||e.altKey||e.ctrlKey||e.metaKey||k(e.pointerId)},onTouchStart:e=>{k(e.changedTouches[0].identifier)}});return gh(s,t.defaultValues[n],e=>{t.setThumbValue(n,e)}),{inputProps:Lu(D,y,{type:`range`,tabIndex:d?void 0:0,min:t.getThumbMinValue(n),max:t.getThumbMaxValue(n),step:t.step,value:b,name:l,form:u,disabled:d,"aria-orientation":c,"aria-valuetext":t.getThumbValueLabel(n),"aria-required":r||void 0,"aria-invalid":a||i===`invalid`||void 0,"aria-errormessage":e[`aria-errormessage`],"aria-describedby":[_[`aria-describedby`],e[`aria-describedby`]].filter(Boolean).join(` `),"aria-details":[_[`aria-details`],e[`aria-details`]].filter(Boolean).join(` `),onChange:e=>{t.setThumbValue(n,parseFloat(Z(e).value))}}),thumbProps:{...M,style:{position:`absolute`,[p?`top`:`left`]:`${j*100}%`,transform:`translate(-50%, -50%)`,touchAction:`none`}},labelProps:v,isDragging:t.isThumbDragging(n),isDisabled:d,isFocused:S}}var Sh=0,Ch=100,wh=1;function Th(e){let{isDisabled:t=!1,minValue:n=Sh,maxValue:r=Ch,numberFormatter:i,step:a=wh,orientation:o=`horizontal`}=e,s=(0,f.useMemo)(()=>{let e=(r-n)/10;return e=ih(e,0,e+a,a),Math.max(e,a)},[a,r,n]),c=(0,f.useCallback)(e=>e?.map((t,i)=>ih(t,i===0?n:e[i-1],i===e.length-1?r:e[i+1],a)),[n,r,a]),l=(0,f.useMemo)(()=>c(Dh(e.value)),[e.value,c]),u=(0,f.useMemo)(()=>c(Dh(e.defaultValue)??[n]),[e.defaultValue,n,c]),d=Oh(e.value,e.defaultValue,e.onChange),p=Oh(e.value,e.defaultValue,e.onChangeEnd),[m,h]=Jf(l,u,d),[g]=(0,f.useState)(m),[_,v]=(0,f.useState)(Array(m.length).fill(!1)),y=(0,f.useRef)(Array(m.length).fill(!0)),[b,x]=(0,f.useState)(void 0),S=(0,f.useRef)(m),C=(0,f.useRef)(_),w=e=>{S.current=e,h(e)},T=e=>{C.current=e,v(e)};function E(e){return(e-n)/(r-n)}function D(e){return e===0?n:m[e-1]}function O(e){return e===m.length-1?r:m[e+1]}function k(e){return y.current[e]}function A(e,t){y.current[e]=t}function j(e,n){if(t||!k(e))return;let r=D(e),i=O(e);n=ih(n,r,i,a),w(Eh(S.current,e,n))}function M(e,n){if(t||!k(e))return;n&&(S.current=m);let r=C.current[e];C.current=Eh(C.current,e,n),T(C.current),p&&r&&!C.current.some(Boolean)&&p(S.current)}let N=(0,f.useRef)(null);function P(e=m){switch(typeof e==`number`&&(e=[e]),e.length){case 0:return``;case 1:return i.format(e[0]);case 2:return i.formatRange(e[0],e[1]);default:{let t=e.map(e=>i.format(e)),n=N.current;return(!n||n.resolvedOptions().locale!==i.resolvedOptions().locale)&&(n=N.current=new Intl.ListFormat(i.resolvedOptions().locale,{type:`unit`})),n.format(t)}}}function F(e,t){j(e,L(t))}function I(e){return Math.round((e-n)/a)*a+n}function L(e){return nh(I(e*(r-n)+n),n,r)}function ee(e,t=1){let i=Math.max(t,a);j(e,ih(m[e]+i,n,r,a))}function te(e,t=1){let i=Math.max(t,a);j(e,ih(m[e]-i,n,r,a))}return{values:m,defaultValues:e.defaultValue===void 0?g:u,getThumbValue:e=>m[e],setThumbValue:j,setThumbPercent:F,isThumbDragging:e=>_[e],setThumbDragging:M,focusedThumb:b,setFocusedThumb:x,getThumbPercent:e=>E(m[e]),getValuePercent:E,getThumbValueLabel:e=>P(m[e]),getFormattedValue:P,getThumbMinValue:D,getThumbMaxValue:O,getPercentValue:L,isThumbEditable:k,setThumbEditable:A,incrementThumb:ee,decrementThumb:te,step:a,pageSize:s,orientation:o,isDisabled:t}}function Eh(e,t,n){return e[t]===n?e:[...e.slice(0,t),n,...e.slice(t+1)]}function Dh(e){if(e!=null)return Array.isArray(e)?e:[e]}function Oh(e,t,n){return r=>{typeof e==`number`||typeof t==`number`?n?.(r[0]):n?.(r)}}var kh=(0,f.createContext)({}),Ah=(0,f.createContext)(null);function jh(e){let t=(0,f.useRef)({});return f.default.createElement(Ah.Provider,{value:t},e.children)}var Mh=(0,f.createContext)({isSelected:!1}),Nh,Ph=(0,f.createContext)({});Nh=class extends tp{filter(e,t){let n=t.getItem(this.prevKey);if(n&&n.type!==`separator`){let n=this.clone();return t.addDescendants(n,e),n}return null}},Nh.type=`separator`;var Fh=class{constructor(e,t,n,r){this._walkerStack=[],this._currentSetFor=new Set,this._acceptNode=e=>{if(e.nodeType===Node.ELEMENT_NODE){let t=e.shadowRoot;if(t){let e=this._doc.createTreeWalker(t,this.whatToShow,{acceptNode:this._acceptNode});return this._walkerStack.unshift(e),NodeFilter.FILTER_ACCEPT}else if(typeof this.filter==`function`)return this.filter(e);else if(this.filter?.acceptNode)return this.filter.acceptNode(e);else if(this.filter===null)return NodeFilter.FILTER_ACCEPT}return NodeFilter.FILTER_SKIP},this._doc=e,this.root=t,this.filter=r??null,this.whatToShow=n??NodeFilter.SHOW_ALL,this._currentNode=t,this._walkerStack.unshift(e.createTreeWalker(t,n,this._acceptNode));let i=t.shadowRoot;if(i){let e=this._doc.createTreeWalker(i,this.whatToShow,{acceptNode:this._acceptNode});this._walkerStack.unshift(e)}}get currentNode(){return this._currentNode}set currentNode(e){if(!X(this.root,e))throw Error(`Cannot set currentNode to a node that is not contained by the root node.`);let t=[],n=e,r=e;for(this._currentNode=e;n&&n!==this.root;)if(n.nodeType===Node.DOCUMENT_FRAGMENT_NODE){let e=n,i=this._doc.createTreeWalker(e,this.whatToShow,{acceptNode:this._acceptNode});t.push(i),i.currentNode=r,this._currentSetFor.add(i),n=r=e.host}else n=n.parentNode;let i=this._doc.createTreeWalker(this.root,this.whatToShow,{acceptNode:this._acceptNode});t.push(i),i.currentNode=r,this._currentSetFor.add(i),this._walkerStack=t}get doc(){return this._doc}firstChild(){let e=this.currentNode,t=this.nextNode();return X(e,t)?(t&&(this.currentNode=t),t):(this.currentNode=e,null)}lastChild(){let e=this._walkerStack[0].lastChild();return e&&(this.currentNode=e),e}nextNode(){let e=this._walkerStack[0].nextNode();if(e){if(e.shadowRoot){let t;if(typeof this.filter==`function`?t=this.filter(e):this.filter?.acceptNode&&(t=this.filter.acceptNode(e)),t===NodeFilter.FILTER_ACCEPT)return this.currentNode=e,e;let n=this.nextNode();return n&&(this.currentNode=n),n}return e&&(this.currentNode=e),e}else if(this._walkerStack.length>1){this._walkerStack.shift();let e=this.nextNode();return e&&(this.currentNode=e),e}else return null}previousNode(){let e=this._walkerStack[0];if(e.currentNode===e.root){if(this._currentSetFor.has(e))if(this._currentSetFor.delete(e),this._walkerStack.length>1){this._walkerStack.shift();let e=this.previousNode();return e&&(this.currentNode=e),e}else return null;return null}let t=e.previousNode();if(t){if(t.shadowRoot){let e;if(typeof this.filter==`function`?e=this.filter(t):this.filter?.acceptNode&&(e=this.filter.acceptNode(t)),e===NodeFilter.FILTER_ACCEPT)return t&&(this.currentNode=t),t;let n=this.lastChild();return n&&(this.currentNode=n),n}return t&&(this.currentNode=t),t}else if(this._walkerStack.length>1){this._walkerStack.shift();let e=this.previousNode();return e&&(this.currentNode=e),e}else return null}nextSibling(){return null}previousSibling(){return null}parentNode(){return null}};function Ih(e,t,n,r){return ed()?new Fh(e,t,n,r):e.createTreeWalker(t,n,r)}var Lh=f.default.createContext(null),Rh=`react-aria-focus-scope-restore`,Q=null;function zh(e){let{children:t,contain:n,restoreFocus:r,autoFocus:i}=e,a=(0,f.useRef)(null),o=(0,f.useRef)(null),s=(0,f.useRef)([]),{parentNode:c}=(0,f.useContext)(Lh)||{},l=(0,f.useMemo)(()=>new og({scopeRef:s}),[s]);fu(()=>{let e=c||sg.root;if(sg.getTreeNode(e.scopeRef)&&Q&&!Yh(Q,e.scopeRef)){let t=sg.getTreeNode(Q);t&&(e=t)}e.addChild(l),sg.addNode(l)},[l,c]),fu(()=>{let e=sg.getTreeNode(s);e&&(e.contain=!!n)},[n]),fu(()=>{let e=a.current?.nextSibling,t=[],n=e=>e.stopPropagation();for(;e&&e!==o.current;)t.push(e),e.addEventListener(Rh,n),e=e.nextSibling;return s.current=t,()=>{for(let e of t)e.removeEventListener(Rh,n)}},[t]),eg(s,r,n),Gh(s,n),ng(s,r,n),$h(s,i),(0,f.useEffect)(()=>{let e=td(Y(s.current?s.current[0]:void 0)),t=null;if(qh(e,s.current)){for(let n of sg.traverse())n.scopeRef&&qh(e,n.scopeRef.current)&&(t=n);t===sg.getTreeNode(s)&&(Q=t.scopeRef)}},[s]),fu(()=>()=>{let e=sg.getTreeNode(s)?.parent?.scopeRef??null;(s===Q||Yh(s,Q))&&(!e||sg.getTreeNode(e))&&(Q=e),sg.removeTreeNode(s)},[s]);let u=(0,f.useMemo)(()=>Bh(s),[]),d=(0,f.useMemo)(()=>({focusManager:u,parentNode:l}),[l,u]);return f.default.createElement(Lh.Provider,{value:d},f.default.createElement(`span`,{"data-focus-scope-start":!0,hidden:!0,ref:a}),t,f.default.createElement(`span`,{"data-focus-scope-end":!0,hidden:!0,ref:o}))}function Bh(e){return{focusNext(t={}){let n=e.current,{from:r,tabbable:i,wrap:a,accept:o}=t,s=r||td(Y(n[0]??void 0)),c=n[0].previousElementSibling,l=ig(Vh(n),{tabbable:i,accept:o},n);l.currentNode=qh(s,n)?s:c;let u=l.nextNode();return!u&&a&&(l.currentNode=c,u=l.nextNode()),u&&Xh(u,!0),u},focusPrevious(t={}){let n=e.current,{from:r,tabbable:i,wrap:a,accept:o}=t,s=r||td(Y(n[0]??void 0)),c=n[n.length-1].nextElementSibling,l=ig(Vh(n),{tabbable:i,accept:o},n);l.currentNode=qh(s,n)?s:c;let u=l.previousNode();return!u&&a&&(l.currentNode=c,u=l.previousNode()),u&&Xh(u,!0),u},focusFirst(t={}){let n=e.current,{tabbable:r,accept:i}=t,a=ig(Vh(n),{tabbable:r,accept:i},n);a.currentNode=n[0].previousElementSibling;let o=a.nextNode();return o&&Xh(o,!0),o},focusLast(t={}){let n=e.current,{tabbable:r,accept:i}=t,a=ig(Vh(n),{tabbable:r,accept:i},n);a.currentNode=n[n.length-1].nextElementSibling;let o=a.previousNode();return o&&Xh(o,!0),o}}}function Vh(e){return e[0].parentElement}function Hh(e){let t=sg.getTreeNode(Q);for(;t&&t.scopeRef!==e;){if(t.contain)return!1;t=t.parent}return!0}function Uh(e){if(!e.form)return Array.from(Y(e).querySelectorAll(`input[type="radio"][name="${CSS.escape(e.name)}"]`)).filter(e=>!e.form);let t=e.form.elements.namedItem(e.name),n=Xu(e);return t instanceof n.RadioNodeList?Array.from(t).filter(e=>e instanceof n.HTMLInputElement):t instanceof n.HTMLInputElement?[t]:[]}function Wh(e){if(e.checked)return!0;let t=Uh(e);return t.length>0&&!t.some(e=>e.checked)}function Gh(e,t){let n=(0,f.useRef)(void 0),r=(0,f.useRef)(void 0);fu(()=>{let i=e.current;if(!t){r.current&&(cancelAnimationFrame(r.current),r.current=void 0);return}let a=Y(i?i[0]:void 0),o=t=>{if(t.key!==`Tab`||t.altKey||t.ctrlKey||t.metaKey||!Hh(e)||t.isComposing)return;let n=td(a),r=e.current;if(!r||!qh(n,r))return;let i=ig(Vh(r),{tabbable:!0},r);if(!n)return;i.currentNode=n;let o=t.shiftKey?i.previousNode():i.nextNode();o||(i.currentNode=t.shiftKey?r[r.length-1].nextElementSibling:r[0].previousElementSibling,o=t.shiftKey?i.previousNode():i.nextNode()),t.preventDefault(),o&&(Xh(o,!0),o instanceof Xu(o).HTMLInputElement&&o.select())},s=t=>{(!Q||Yh(Q,e))&&qh(Z(t),e.current)?(Q=e,n.current=Z(t)):Hh(e)&&!Jh(Z(t),e)?n.current?n.current.focus():Q&&Q.current&&Qh(Q.current):Hh(e)&&(n.current=Z(t))},c=t=>{r.current&&cancelAnimationFrame(r.current),r.current=requestAnimationFrame(()=>{let r=pf(),i=(r===`virtual`||r===null)&&Ld()&&Id(),o=td(a);if(!i&&o&&Hh(e)&&!Jh(o,e)){Q=e;let r=Z(t);r&&r.isConnected?(n.current=r,n.current?.focus()):Q.current&&Qh(Q.current)}})};return a.addEventListener(`keydown`,o,!1),a.addEventListener(`focusin`,s,!1),i?.forEach(e=>e.addEventListener(`focusin`,s,!1)),i?.forEach(e=>e.addEventListener(`focusout`,c,!1)),()=>{a.removeEventListener(`keydown`,o,!1),a.removeEventListener(`focusin`,s,!1),i?.forEach(e=>e.removeEventListener(`focusin`,s,!1)),i?.forEach(e=>e.removeEventListener(`focusout`,c,!1))}},[e,t]),fu(()=>()=>{r.current&&cancelAnimationFrame(r.current)},[r])}function Kh(e){return Jh(e)}function qh(e,t){return!e||!t?!1:t.some(t=>X(t,e))}function Jh(e,t=null){if(e instanceof Element&&e.closest(`[data-react-aria-top-layer]`))return!0;for(let{scopeRef:n}of sg.traverse(sg.getTreeNode(t)))if(n&&qh(e,n.current))return!0;return!1}function Yh(e,t){let n=sg.getTreeNode(t)?.parent;for(;n;){if(n.scopeRef===e)return!0;n=n.parent}return!1}function Xh(e,t=!1){if(e!=null&&!t)try{gp(e)}catch{}else if(e!=null)try{e.focus()}catch{}}function Zh(e,t=!0){let n=e[0].previousElementSibling,r=Vh(e),i=ig(r,{tabbable:t},e);i.currentNode=n;let a=i.nextNode();return t&&!a&&(r=Vh(e),i=ig(r,{tabbable:!1},e),i.currentNode=n,a=i.nextNode()),a}function Qh(e,t=!0){Xh(Zh(e,t))}function $h(e,t){let n=f.default.useRef(t);(0,f.useEffect)(()=>{n.current&&(Q=e,!qh(td(Y(e.current?e.current[0]:void 0)),Q.current)&&e.current&&Qh(e.current)),n.current=!1},[e])}function eg(e,t,n){fu(()=>{if(t||n)return;let r=e.current,i=Y(r?r[0]:void 0),a=t=>{let n=Z(t);qh(n,e.current)?Q=e:Kh(n)||(Q=null)};return i.addEventListener(`focusin`,a,!1),r?.forEach(e=>e.addEventListener(`focusin`,a,!1)),()=>{i.removeEventListener(`focusin`,a,!1),r?.forEach(e=>e.removeEventListener(`focusin`,a,!1))}},[e,t,n])}function tg(e){let t=sg.getTreeNode(Q);for(;t&&t.scopeRef!==e;){if(t.nodeToRestore)return!1;t=t.parent}return t?.scopeRef===e}function ng(e,t,n){let r=(0,f.useRef)(typeof document<`u`?td(Y(e.current?e.current[0]:void 0)):null);fu(()=>{let r=e.current,i=Y(r?r[0]:void 0);if(!t||n)return;let a=()=>{(!Q||Yh(Q,e))&&qh(td(i),e.current)&&(Q=e)};return i.addEventListener(`focusin`,a,!1),r?.forEach(e=>e.addEventListener(`focusin`,a,!1)),()=>{i.removeEventListener(`focusin`,a,!1),r?.forEach(e=>e.removeEventListener(`focusin`,a,!1))}},[e,n]),fu(()=>{let r=Y(e.current?e.current[0]:void 0);if(!t)return;let i=t=>{if(t.key!==`Tab`||t.altKey||t.ctrlKey||t.metaKey||!Hh(e)||t.isComposing)return;let n=r.activeElement;if(!Jh(n,e)||!tg(e))return;let i=sg.getTreeNode(e);if(!i)return;let a=i.nodeToRestore,o=ig(r.body,{tabbable:!0});o.currentNode=n;let s=t.shiftKey?o.previousNode():o.nextNode();if((!a||!a.isConnected||a===r.body)&&(a=void 0,i.nodeToRestore=void 0),(!s||!Jh(s,e))&&a){o.currentNode=a;do s=t.shiftKey?o.previousNode():o.nextNode();while(Jh(s,e));t.preventDefault(),t.stopPropagation(),s?Xh(s,!0):Kh(a)?Xh(a,!0):n.blur()}};return n||r.addEventListener(`keydown`,i,!0),()=>{n||r.removeEventListener(`keydown`,i,!0)}},[e,t,n]),fu(()=>{let n=Y(e.current?e.current[0]:void 0);if(!t)return;let i=sg.getTreeNode(e);if(i)return i.nodeToRestore=r.current??void 0,()=>{let r=sg.getTreeNode(e);if(!r)return;let i=r.nodeToRestore,a=td(n);if(t&&i&&(a&&Jh(a,e)||a===n.body&&tg(e))){let t=sg.clone();requestAnimationFrame(()=>{if(n.activeElement===n.body){let n=t.getTreeNode(e);for(;n;){if(n.nodeToRestore&&n.nodeToRestore.isConnected){rg(n.nodeToRestore);return}n=n.parent}for(n=t.getTreeNode(e);n;){if(n.scopeRef&&n.scopeRef.current&&sg.getTreeNode(n.scopeRef)){rg(Zh(n.scopeRef.current,!0));return}n=n.parent}}})}}},[e,t])}function rg(e){e.dispatchEvent(new CustomEvent(Rh,{bubbles:!0,cancelable:!0}))&&Xh(e)}function ig(e,t,n){let r=t?.tabbable?bd:yd,i=Y(e?.nodeType===Node.ELEMENT_NODE?e:null),a=Ih(i,e||i,NodeFilter.SHOW_ELEMENT,{acceptNode(e){return X(t?.from,e)||t?.tabbable&&e.tagName===`INPUT`&&e.getAttribute(`type`)===`radio`&&(!Wh(e)||a.currentNode.tagName===`INPUT`&&a.currentNode.type===`radio`&&a.currentNode.name===e.name)?NodeFilter.FILTER_REJECT:r(e)&&(!n||qh(e,n))&&(!t?.accept||t.accept(e))?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});return t?.from&&(a.currentNode=t.from),a}var ag=class e{constructor(){this.fastMap=new Map,this.root=new og({scopeRef:null}),this.fastMap.set(null,this.root)}get size(){return this.fastMap.size}getTreeNode(e){return this.fastMap.get(e)}addTreeNode(e,t,n){let r=this.fastMap.get(t??null);if(!r)return;let i=new og({scopeRef:e});r.addChild(i),i.parent=r,this.fastMap.set(e,i),n&&(i.nodeToRestore=n)}addNode(e){this.fastMap.set(e.scopeRef,e)}removeTreeNode(e){if(e===null)return;let t=this.fastMap.get(e);if(!t)return;let n=t.parent;for(let e of this.traverse())e!==t&&t.nodeToRestore&&e.nodeToRestore&&t.scopeRef&&t.scopeRef.current&&qh(e.nodeToRestore,t.scopeRef.current)&&(e.nodeToRestore=t.nodeToRestore);let r=t.children;n&&(n.removeChild(t),r.size>0&&r.forEach(e=>n&&n.addChild(e))),this.fastMap.delete(t.scopeRef)}*traverse(e=this.root){if(e.scopeRef!=null&&(yield e),e.children.size>0)for(let t of e.children)yield*this.traverse(t)}clone(){let t=new e;for(let e of this.traverse())t.addTreeNode(e.scopeRef,e.parent?.scopeRef??null,e.nodeToRestore);return t}},og=class{constructor(e){this.children=new Set,this.contain=!1,this.scopeRef=e.scopeRef}addChild(e){this.children.add(e),e.parent=this}removeChild(e){this.children.delete(e),e.parent=void 0}},sg=new ag;function cg(e){return Pd()?e.altKey:e.ctrlKey}function lg(e,t){let n=`[data-key="${CSS.escape(String(t))}"]`,r=e.current?.dataset.collection;return r&&(n=`[data-collection="${CSS.escape(r)}"]${n}`),e.current?.querySelector(n)}var ug=new WeakMap;function dg(e){let t=Au();return ug.set(e,t),t}function fg(e){return ug.get(e)}var pg=1e3;function mg(e){let{keyboardDelegate:t,selectionManager:n,onTypeSelect:r}=e,i=(0,f.useRef)({search:``,timeout:void 0}).current;return{typeSelectProps:{onKeyDownCapture:t.getKeyForSearch?e=>{let a=hg(e.key);if(!(!a||e.ctrlKey||e.metaKey||!X(e.currentTarget,Z(e))||i.search.length===0&&a===` `)){if(a===` `&&i.search.trim().length>0&&(e.preventDefault(),`continuePropagation`in e||e.stopPropagation()),i.search+=a,t.getKeyForSearch!=null){let e=t.getKeyForSearch(i.search,n.focusedKey);e??(e=t.getKeyForSearch(i.search)),e!=null&&(n.setFocusedKey(e),r&&r(e))}clearTimeout(i.timeout),i.timeout=setTimeout(()=>{i.search=``},pg)}}:void 0}}}function hg(e){return e.length===1||!/^[A-Z]/i.test(e)?e:``}function gg(e,t){let n=(0,f.useRef)(!0),r=(0,f.useRef)(null);fu(()=>(n.current=!0,()=>{n.current=!1}),[]),fu(()=>{n.current?n.current=!1:(!r.current||t.some((e,t)=>!Object.is(e,r[t])))&&e(),r.current=t},t)}function _g(e){let{selectionManager:t,keyboardDelegate:r,ref:i,autoFocus:a=!1,shouldFocusWrap:o=!1,disallowEmptySelection:s=!1,disallowSelectAll:c=!1,escapeKeyBehavior:l=`clearSelection`,selectOnFocus:u=t.selectionBehavior===`replace`,disallowTypeAhead:d=!1,shouldUseVirtualFocus:p,allowsTabNavigation:m=!1,scrollRef:h=i,linkBehavior:g=`action`}=e,{direction:_}=Nf(),v=Hd(),y=e=>{if(e.altKey&&e.key===`Tab`&&e.preventDefault(),!i.current||!X(i.current,Z(e)))return;let a=(r,a)=>{if(r!=null){if(t.isLink(r)&&g===`selection`&&u&&!cg(e)){(0,n.flushSync)(()=>{t.setFocusedKey(r,a)});let o=lg(i,r),s=t.getItemProps(r);o&&v.open(o,e,s.href,s.routerOptions);return}if(t.setFocusedKey(r,a),t.isLink(r)&&g===`override`)return;e.shiftKey&&t.selectionMode===`multiple`?t.extendSelection(r):u&&!cg(e)&&t.replaceSelection(r)}};switch(e.key){case`ArrowDown`:if(r.getKeyBelow){let n=t.focusedKey==null?r.getFirstKey?.():r.getKeyBelow?.(t.focusedKey);n==null&&o&&(n=r.getFirstKey?.(t.focusedKey)),n!=null&&(e.preventDefault(),a(n))}break;case`ArrowUp`:if(r.getKeyAbove){let n=t.focusedKey==null?r.getLastKey?.():r.getKeyAbove?.(t.focusedKey);n==null&&o&&(n=r.getLastKey?.(t.focusedKey)),n!=null&&(e.preventDefault(),a(n))}break;case`ArrowLeft`:if(r.getKeyLeftOf){let n=t.focusedKey==null?r.getFirstKey?.():r.getKeyLeftOf?.(t.focusedKey);n==null&&o&&(n=_===`rtl`?r.getFirstKey?.(t.focusedKey):r.getLastKey?.(t.focusedKey)),n!=null&&(e.preventDefault(),a(n,_===`rtl`?`first`:`last`))}break;case`ArrowRight`:if(r.getKeyRightOf){let n=t.focusedKey==null?r.getFirstKey?.():r.getKeyRightOf?.(t.focusedKey);n==null&&o&&(n=_===`rtl`?r.getLastKey?.(t.focusedKey):r.getFirstKey?.(t.focusedKey)),n!=null&&(e.preventDefault(),a(n,_===`rtl`?`last`:`first`))}break;case`Home`:if(r.getFirstKey){if(t.focusedKey===null&&e.shiftKey)return;e.preventDefault();let n=r.getFirstKey(t.focusedKey,vf(e));t.setFocusedKey(n),n!=null&&(vf(e)&&e.shiftKey&&t.selectionMode===`multiple`?t.extendSelection(n):u&&t.replaceSelection(n))}break;case`End`:if(r.getLastKey){if(t.focusedKey===null&&e.shiftKey)return;e.preventDefault();let n=r.getLastKey(t.focusedKey,vf(e));t.setFocusedKey(n),n!=null&&(vf(e)&&e.shiftKey&&t.selectionMode===`multiple`?t.extendSelection(n):u&&t.replaceSelection(n))}break;case`PageDown`:if(r.getKeyPageBelow&&t.focusedKey!=null){let n=r.getKeyPageBelow(t.focusedKey);n!=null&&(e.preventDefault(),a(n))}break;case`PageUp`:if(r.getKeyPageAbove&&t.focusedKey!=null){let n=r.getKeyPageAbove(t.focusedKey);n!=null&&(e.preventDefault(),a(n))}break;case`a`:vf(e)&&t.selectionMode===`multiple`&&c!==!0&&(e.preventDefault(),t.selectAll());break;case`Escape`:l===`clearSelection`&&!s&&t.selectedKeys.size!==0&&(e.stopPropagation(),e.preventDefault(),t.clearSelection());break;case`Tab`:if(!m){if(e.shiftKey)i.current.focus();else{let e=ig(i.current,{tabbable:!0}),t,n;do n=e.lastChild(),n&&(t=n);while(n);let r=td();t&&(!nd(t)||r&&!bd(r))&&sd(t)}break}}},b=(0,f.useRef)({top:0,left:0});xf(h,`scroll`,()=>{b.current={top:h.current?.scrollTop??0,left:h.current?.scrollLeft??0}});let x=e=>{if(t.isFocused){X(e.currentTarget,Z(e))||t.setFocused(!1);return}if(X(e.currentTarget,Z(e))){if(t.setFocused(!0),t.focusedKey==null){let n=e=>{e!=null&&(t.setFocusedKey(e),u&&!t.isSelected(e)&&t.replaceSelection(e))},i=e.relatedTarget;i&&e.currentTarget.compareDocumentPosition(i)&Node.DOCUMENT_POSITION_FOLLOWING?n(t.lastSelectedKey??r.getLastKey?.()):n(t.firstSelectedKey??r.getFirstKey?.())}else h.current&&(h.current.scrollTop=b.current.top,h.current.scrollLeft=b.current.left);if(t.focusedKey!=null&&h.current){let e=lg(i,t.focusedKey);e instanceof HTMLElement&&(!nd(e)&&!p&&sd(e),pf()===`keyboard`&&lh(e,{containingElement:i.current}))}}},S=e=>{X(e.currentTarget,e.relatedTarget)||t.setFocused(!1)},C=(0,f.useRef)(!1);xf(i,Yu,p?e=>{let{detail:n}=e;e.stopPropagation(),t.setFocused(!0),n?.focusStrategy===`first`&&(C.current=!0)}:void 0),gg(()=>{if(C.current){let e=r.getFirstKey?.()??null;if(e==null){let e=td();rd(i.current),ad(e,null),t.collection.size>0&&(C.current=!1)}else t.setFocusedKey(e),C.current=!1}},[t.collection]),gg(()=>{t.collection.size>0&&(C.current=!1)},[t.focusedKey]),xf(i,Ju,p?e=>{e.stopPropagation(),t.setFocused(!1),e.detail?.clearFocusKey&&t.setFocusedKey(null)}:void 0);let w=(0,f.useRef)(a),T=(0,f.useRef)(!1);(0,f.useEffect)(()=>{if(w.current){let e=null;a===`first`&&(e=r.getFirstKey?.()??null),a===`last`&&(e=r.getLastKey?.()??null);let n=t.selectedKeys;if(n.size){for(let r of n)if(t.canSelectItem(r)){e=r;break}}t.setFocused(!0),t.setFocusedKey(e),e==null&&!p&&i.current&&gp(i.current),t.collection.size>0&&(w.current=!1,T.current=!0)}});let E=(0,f.useRef)(t.focusedKey),D=(0,f.useRef)(null);(0,f.useEffect)(()=>{if(t.isFocused&&t.focusedKey!=null&&(t.focusedKey!==E.current||T.current)&&h.current&&i.current){let e=pf(),n=lg(i,t.focusedKey);if(!(n instanceof HTMLElement))return;(e===`keyboard`||T.current)&&(D.current&&cancelAnimationFrame(D.current),D.current=requestAnimationFrame(()=>{h.current&&(ch(h.current,n),e!==`virtual`&&lh(n,{containingElement:i.current}))}))}!p&&t.isFocused&&t.focusedKey==null&&E.current!=null&&i.current&&gp(i.current),E.current=t.focusedKey,T.current=!1}),(0,f.useEffect)(()=>()=>{D.current&&cancelAnimationFrame(D.current)},[]),xf(i,`react-aria-focus-scope-restore`,e=>{e.preventDefault(),t.setFocused(!0)});let O={onKeyDown:y,onFocus:x,onBlur:S,onMouseDown(e){h.current===Z(e)&&e.preventDefault()}},{typeSelectProps:k}=mg({keyboardDelegate:r,selectionManager:t});d||(O=Lu(k,O));let A;p||(A=t.focusedKey==null?0:-1);let j=dg(t.collection);return{collectionProps:Lu(O,{tabIndex:A,"data-collection":j})}}var vg=class{constructor(e){this.ref=e}getItemRect(e){let t=this.ref.current;if(!t)return null;let n=e==null?null:lg(this.ref,e);if(!n)return null;let r=t.getBoundingClientRect(),i=n.getBoundingClientRect();return{x:i.left-r.left-t.clientLeft+t.scrollLeft,y:i.top-r.top-t.clientTop+t.scrollTop,width:i.width,height:i.height}}getContentSize(){let e=this.ref.current;return{width:e?.scrollWidth??0,height:e?.scrollHeight??0}}getVisibleRect(){let e=this.ref.current;return{x:e?.scrollLeft??0,y:e?.scrollTop??0,width:e?.clientWidth??0,height:e?.clientHeight??0}}},yg=class{constructor(...e){if(e.length===1){let t=e[0];this.collection=t.collection,this.ref=t.ref,this.collator=t.collator,this.disabledKeys=t.disabledKeys||new Set,this.disabledBehavior=t.disabledBehavior||`all`,this.orientation=t.orientation||`vertical`,this.direction=t.direction,this.layout=t.layout||`stack`,this.layoutDelegate=t.layoutDelegate||new vg(t.ref)}else this.collection=e[0],this.disabledKeys=e[1],this.ref=e[2],this.collator=e[3],this.layout=`stack`,this.orientation=`vertical`,this.disabledBehavior=`all`,this.layoutDelegate=new vg(this.ref);this.layout===`stack`&&this.orientation===`vertical`&&(this.getKeyLeftOf=void 0,this.getKeyRightOf=void 0)}isDisabled(e){return this.disabledBehavior===`all`&&(e.props?.isDisabled||this.disabledKeys.has(e.key))&&e.props?.disabledBehavior!==`selection`}findNextNonDisabled(e,t,n=!1){let r=e;for(;r!=null;){let e=this.collection.getItem(r);if(e?.type===`item`&&(n||!this.isDisabled(e)))return r;r=t(r)}return null}getNextKey(e,t){let n=e;return n=this.collection.getKeyAfter(n),this.findNextNonDisabled(n,e=>this.collection.getKeyAfter(e),t?.includeDisabled)}getPreviousKey(e,t){let n=e;return n=this.collection.getKeyBefore(n),this.findNextNonDisabled(n,e=>this.collection.getKeyBefore(e),t?.includeDisabled)}findKey(e,t,n){let r=e,i=this.layoutDelegate.getItemRect(r);if(!i||r==null)return null;let a=i;do{if(r=t(r),r==null)break;i=this.layoutDelegate.getItemRect(r)}while(i&&n(a,i)&&r!=null);return r}isSameRow(e,t){return e.y===t.y||e.x!==t.x}isSameColumn(e,t){return e.x===t.x||e.y!==t.y}getKeyBelow(e,t){return this.layout===`grid`&&this.orientation===`vertical`?this.findKey(e,e=>this.getNextKey(e,t),this.isSameRow):this.getNextKey(e,t)}getKeyAbove(e,t){return this.layout===`grid`&&this.orientation===`vertical`?this.findKey(e,e=>this.getPreviousKey(e,t),this.isSameRow):this.getPreviousKey(e,t)}getNextColumn(e,t,n){return t?this.getPreviousKey(e,n):this.getNextKey(e,n)}getKeyRightOf(e,t){let n=this.direction===`ltr`?`getKeyRightOf`:`getKeyLeftOf`;return this.layoutDelegate[n]?(e=this.layoutDelegate[n](e),this.findNextNonDisabled(e,e=>this.layoutDelegate[n](e),t?.includeDisabled)):this.layout===`grid`?this.orientation===`vertical`?this.getNextColumn(e,this.direction===`rtl`,t):this.findKey(e,e=>this.getNextColumn(e,this.direction===`rtl`,t),this.isSameColumn):this.orientation===`horizontal`?this.getNextColumn(e,this.direction===`rtl`,t):null}getKeyLeftOf(e,t){let n=this.direction===`ltr`?`getKeyLeftOf`:`getKeyRightOf`;return this.layoutDelegate[n]?(e=this.layoutDelegate[n](e),this.findNextNonDisabled(e,e=>this.layoutDelegate[n](e),t?.includeDisabled)):this.layout===`grid`?this.orientation===`vertical`?this.getNextColumn(e,this.direction===`ltr`,t):this.findKey(e,e=>this.getNextColumn(e,this.direction===`ltr`,t),this.isSameColumn):this.orientation===`horizontal`?this.getNextColumn(e,this.direction===`ltr`,t):null}getFirstKey(){let e=this.collection.getFirstKey();return this.findNextNonDisabled(e,e=>this.collection.getKeyAfter(e))}getLastKey(){let e=this.collection.getLastKey();return this.findNextNonDisabled(e,e=>this.collection.getKeyBefore(e))}getKeyPageAbove(e){let t=this.ref.current,n=this.layoutDelegate.getItemRect(e);if(!n)return null;if(t&&!oh(t))return this.getFirstKey();let r=e;if(this.orientation===`horizontal`){let e=Math.max(0,n.x+n.width-this.layoutDelegate.getVisibleRect().width);for(;n&&n.x>e&&r!=null;)r=this.getKeyAbove(r),n=r==null?null:this.layoutDelegate.getItemRect(r)}else{let e=Math.max(0,n.y+n.height-this.layoutDelegate.getVisibleRect().height);for(;n&&n.y>e&&r!=null;)r=this.getKeyAbove(r),n=r==null?null:this.layoutDelegate.getItemRect(r)}return r??this.getFirstKey()}getKeyPageBelow(e){let t=this.ref.current,n=this.layoutDelegate.getItemRect(e);if(!n)return null;if(t&&!oh(t))return this.getLastKey();let r=e;if(this.orientation===`horizontal`){let e=Math.min(this.layoutDelegate.getContentSize().width,n.x-n.width+this.layoutDelegate.getVisibleRect().width);for(;n&&n.x<e&&r!=null;)r=this.getKeyBelow(r),n=r==null?null:this.layoutDelegate.getItemRect(r)}else{let e=Math.min(this.layoutDelegate.getContentSize().height,n.y-n.height+this.layoutDelegate.getVisibleRect().height);for(;n&&n.y<e&&r!=null;)r=this.getKeyBelow(r),n=r==null?null:this.layoutDelegate.getItemRect(r)}return r??this.getLastKey()}getKeyForSearch(e,t){if(!this.collator)return null;let n=this.collection,r=t||this.getFirstKey();for(;r!=null;){let t=n.getItem(r);if(!t)return null;let i=t.textValue.slice(0,e.length);if(t.textValue&&this.collator.compare(i,e)===0)return r;r=this.getNextKey(r)}return null}},bg=new Map;function xg(e){let{locale:t}=Nf(),n=t+(e?Object.entries(e).sort((e,t)=>e[0]<t[0]?-1:1).join():``);if(bg.has(n))return bg.get(n);let r=new Intl.Collator(t,e);return bg.set(n,r),r}function Sg(e){let{selectionManager:t,collection:n,disabledKeys:r,ref:i,keyboardDelegate:a,layoutDelegate:o,orientation:s}=e,c=xg({usage:`search`,sensitivity:`base`}),l=t.disabledBehavior,u=(0,f.useMemo)(()=>a||new yg({collection:n,disabledKeys:r,disabledBehavior:l,ref:i,collator:c,layoutDelegate:o,orientation:s}),[a,o,n,r,i,c,l,s]),{collectionProps:d}=_g({...e,ref:i,selectionManager:t,keyboardDelegate:u});return{listProps:d}}var Cg=500;function wg(e){let{isDisabled:t,onLongPressStart:n,onLongPressEnd:r,onLongPress:i,threshold:a=Cg,accessibilityDescription:o}=e,s=(0,f.useRef)(void 0),{addGlobalListener:c,removeGlobalListener:l}=pm(),{pressProps:u}=Tm({isDisabled:t,onPressStart(e){if(e.continuePropagation(),(e.pointerType===`mouse`||e.pointerType===`touch`)&&(n&&n({...e,type:`longpressstart`}),s.current=setTimeout(()=>{e.target.dispatchEvent(new PointerEvent(`pointercancel`,{bubbles:!0})),Y(e.target).activeElement!==e.target&&sd(e.target),i&&i({...e,type:`longpress`}),s.current=void 0},a),e.pointerType===`touch`)){let t=e=>{e.preventDefault()},n=Xu(e.target);c(e.target,`contextmenu`,t,{once:!0}),c(n,`pointerup`,()=>{setTimeout(()=>{l(e.target,`contextmenu`,t)},30)},{once:!0})}},onPressEnd(e){s.current&&clearTimeout(s.current),r&&(e.pointerType===`mouse`||e.pointerType===`touch`)&&r({...e,type:`longpressend`})}});return{longPressProps:Lu(u,fh(i&&!t?o:void 0))}}function Tg(e){let{id:t,selectionManager:n,key:r,ref:i,shouldSelectOnPressUp:a,shouldUseVirtualFocus:o,focus:s,isDisabled:c,onAction:l,allowsDifferentPressOrigin:u,linkBehavior:d=`action`}=e,p=Hd();t=Au(t);let m=e=>{if(e.pointerType===`keyboard`&&cg(e))n.toggleSelection(r);else{if(n.selectionMode===`none`)return;if(n.isLink(r)){if(d===`selection`&&i.current){let t=n.getItemProps(r);p.open(i.current,e,t.href,t.routerOptions),n.setSelectedKeys(n.selectedKeys);return}else if(d===`override`||d===`none`)return}n.selectionMode===`single`?n.isSelected(r)&&!n.disallowEmptySelection?n.toggleSelection(r):n.replaceSelection(r):e&&e.shiftKey?n.extendSelection(r):n.selectionBehavior===`toggle`||e&&(vf(e)||e.pointerType===`touch`||e.pointerType===`virtual`)?n.toggleSelection(r):n.replaceSelection(r)}};(0,f.useEffect)(()=>{r===n.focusedKey&&n.isFocused&&(o?rd(i.current):s?s():td()!==i.current&&i.current&&gp(i.current))},[i,r,n.focusedKey,n.childFocusStrategy,n.isFocused,o]),c=c||n.isDisabled(r);let h={};!o&&!c?h={tabIndex:r===n.focusedKey?0:-1,onFocus(e){Z(e)===i.current&&n.setFocusedKey(r)}}:c&&(h.onMouseDown=e=>{e.preventDefault()}),(0,f.useEffect)(()=>{c&&n.focusedKey===r&&n.setFocusedKey(null)},[n,c,r]);let g=n.isLink(r)&&d===`override`,_=l&&e.UNSTABLE_itemBehavior===`action`,v=n.isLink(r)&&d!==`selection`&&d!==`none`,y=!c&&n.canSelectItem(r)&&!g&&!_,b=(l||v)&&!c,x=b&&(n.selectionBehavior===`replace`?!y:!y||n.isEmpty),S=b&&y&&n.selectionBehavior===`replace`,C=x||S,w=(0,f.useRef)(null),T=C&&y,E=(0,f.useRef)(!1),D=(0,f.useRef)(!1),O=n.getItemProps(r),k=e=>{l&&(l(),i.current?.dispatchEvent(new CustomEvent(`react-aria-item-action`,{bubbles:!0}))),v&&i.current&&p.open(i.current,e,O.href,O.routerOptions)},A={ref:i};if(a?(A.onPressStart=e=>{w.current=e.pointerType,E.current=T,e.pointerType===`keyboard`&&(!C||Dg(e.key))&&m(e)},u?(A.onPressUp=x?void 0:e=>{e.pointerType===`mouse`&&y&&m(e)},A.onPress=x?k:e=>{e.pointerType!==`keyboard`&&e.pointerType!==`mouse`&&y&&m(e)}):A.onPress=e=>{if(x||S&&e.pointerType!==`mouse`){if(e.pointerType===`keyboard`&&!Eg(e.key))return;k(e)}else e.pointerType!==`keyboard`&&y&&m(e)}):(A.onPressStart=e=>{w.current=e.pointerType,E.current=T,D.current=x,y&&(e.pointerType===`mouse`&&!x||e.pointerType===`keyboard`&&(!b||Dg(e.key)))&&m(e)},A.onPress=e=>{(e.pointerType===`touch`||e.pointerType===`pen`||e.pointerType===`virtual`||e.pointerType===`keyboard`&&C&&Eg(e.key)||e.pointerType===`mouse`&&D.current)&&(C?k(e):y&&m(e))}),h[`data-collection`]=fg(n.collection),h[`data-key`]=r,A.preventFocusOnPress=o,o&&(A=Lu(A,{onPressStart(e){e.pointerType!==`touch`&&(n.setFocused(!0),n.setFocusedKey(r))},onPress(e){e.pointerType===`touch`&&(n.setFocused(!0),n.setFocusedKey(r))}})),O)for(let e of[`onPressStart`,`onPressEnd`,`onPressChange`,`onPress`,`onPressUp`,`onClick`])O[e]&&(A[e]=du(A[e],O[e]));let{pressProps:j,isPressed:M}=Tm(A),N=S?e=>{w.current===`mouse`&&(e.stopPropagation(),e.preventDefault(),k(e))}:void 0,{longPressProps:P}=wg({isDisabled:!T,onLongPress(e){e.pointerType===`touch`&&(m(e),n.setSelectionBehavior(`toggle`))}}),F=e=>{w.current===`touch`&&E.current&&e.preventDefault()},I=d!==`none`&&n.isLink(r)?e=>{Wd.isOpening||e.preventDefault()}:void 0;return{itemProps:Lu(h,y||x||o&&!c?j:{},T?P:{},{onDoubleClick:N,onDragStartCapture:F,onClick:I,id:t},o?{onMouseDown:e=>e.preventDefault()}:void 0),isPressed:M,isSelected:n.isSelected(r),isFocused:n.isFocused&&n.focusedKey===r,isDisabled:c,allowsSelection:y,hasAction:C}}function Eg(e){return e===`Enter`}function Dg(e){return e===` `}function Og(e,t){return typeof t.getChildren==`function`?t.getChildren(e.key):e.childNodes}function kg(e){return Ag(e,0)}function Ag(e,t){if(t<0)return;let n=0;for(let r of e){if(n===t)return r;n++}}function jg(e,t,n){if(t.parentKey===n.parentKey)return t.index-n.index;let r=[...Mg(e,t),t],i=[...Mg(e,n),n],a=r.slice(0,i.length).findIndex((e,t)=>e!==i[t]);return a===-1?r.findIndex(e=>e===n)>=0?1:(i.findIndex(e=>e===t),-1):(t=r[a],n=i[a],t.index-n.index)}function Mg(e,t){let n=[],r=t;for(;r?.parentKey!=null;)r=e.getItem(r.parentKey),r&&n.unshift(r);return n}var Ng=new WeakMap;function Pg(e){let t=Ng.get(e);if(t!=null)return t;let n=0,r=t=>{for(let i of t)i.type===`section`?r(Og(i,e)):i.type===`item`&&n++};return r(e),Ng.set(e,n),n}var Fg=class e extends Set{constructor(t,n,r){super(t),t instanceof e?(this.anchorKey=n??t.anchorKey,this.currentKey=r??t.currentKey):(this.anchorKey=n??null,this.currentKey=r??null)}};function Ig(e,t){if(e.size!==t.size)return!1;for(let n of e)if(!t.has(n))return!1;return!0}function Lg(e){let{selectionMode:t=`none`,disallowEmptySelection:n=!1,allowDuplicateSelectionEvents:r,selectionBehavior:i=`toggle`,disabledBehavior:a=`all`}=e,o=(0,f.useRef)(!1),[,s]=(0,f.useState)(!1),c=(0,f.useRef)(null),l=(0,f.useRef)(null),[,u]=(0,f.useState)(null),[d,p]=Jf((0,f.useMemo)(()=>Rg(e.selectedKeys),[e.selectedKeys]),(0,f.useMemo)(()=>Rg(e.defaultSelectedKeys,new Fg),[e.defaultSelectedKeys]),e.onSelectionChange),m=(0,f.useMemo)(()=>e.disabledKeys?new Set(e.disabledKeys):new Set,[e.disabledKeys]),[h,g]=(0,f.useState)(i);i===`replace`&&h===`toggle`&&typeof d==`object`&&d.size===0&&g(`replace`);let _=(0,f.useRef)(i);return(0,f.useEffect)(()=>{i!==_.current&&(g(i),_.current=i)},[i]),{selectionMode:t,disallowEmptySelection:n,selectionBehavior:h,setSelectionBehavior:g,get isFocused(){return o.current},setFocused(e){o.current=e,s(e)},get focusedKey(){return c.current},get childFocusStrategy(){return l.current},setFocusedKey(e,t=`first`){c.current=e,l.current=t,u(e)},selectedKeys:d,setSelectedKeys(e){(r||!Ig(e,d))&&p(e)},disabledKeys:m,disabledBehavior:a}}function Rg(e,t){return e?e===`all`?`all`:new Fg(e):t}var zg=class e{constructor(e,t,n){this.collection=e,this.state=t,this.allowsCellSelection=n?.allowsCellSelection??!1,this._isSelectAll=null,this.layoutDelegate=n?.layoutDelegate||null,this.fullCollection=n?.fullCollection||null}get selectionMode(){return this.state.selectionMode}get disallowEmptySelection(){return this.state.disallowEmptySelection}get selectionBehavior(){return this.state.selectionBehavior}setSelectionBehavior(e){this.state.setSelectionBehavior(e)}get isFocused(){return this.state.isFocused}setFocused(e){this.state.setFocused(e)}get focusedKey(){return this.state.focusedKey}get childFocusStrategy(){return this.state.childFocusStrategy}setFocusedKey(e,t){(e==null||this.collection.getItem(e))&&this.state.setFocusedKey(e,t)}get selectedKeys(){return this.state.selectedKeys===`all`?new Set(this.getSelectAllKeys()):this.state.selectedKeys}get rawSelection(){return this.state.selectedKeys}isSelected(e){if(this.state.selectionMode===`none`)return!1;let t=this.getKey(e);return t==null?!1:this.state.selectedKeys===`all`?this.canSelectItem(t):this.state.selectedKeys.has(t)}get isEmpty(){return this.state.selectedKeys!==`all`&&this.state.selectedKeys.size===0}get isSelectAll(){if(this.isEmpty)return!1;if(this.state.selectedKeys===`all`)return!0;if(this._isSelectAll!=null)return this._isSelectAll;let e=this.getSelectAllKeys(),t=this.state.selectedKeys;return this._isSelectAll=e.every(e=>t.has(e)),this._isSelectAll}get firstSelectedKey(){let e=null;for(let t of this.state.selectedKeys){let n=this.collection.getItem(t);(!e||n&&jg(this.collection,n,e)<0)&&(e=n)}return e?.key??null}get lastSelectedKey(){let e=null;for(let t of this.state.selectedKeys){let n=this.collection.getItem(t);(!e||n&&jg(this.collection,n,e)>0)&&(e=n)}return e?.key??null}get disabledKeys(){return this.state.disabledKeys}get disabledBehavior(){return this.state.disabledBehavior}extendSelection(e){if(this.selectionMode===`none`)return;if(this.selectionMode===`single`){this.replaceSelection(e);return}let t=this.getKey(e);if(t==null)return;let n;if(this.state.selectedKeys===`all`)n=new Fg([t],t,t);else{let e=this.state.selectedKeys,r=e.anchorKey??t;n=new Fg(e,r,t);for(let i of this.getKeyRange(r,e.currentKey??t))n.delete(i);for(let e of this.getKeyRange(t,r))this.canSelectItem(e)&&n.add(e)}this.state.setSelectedKeys(n)}getKeyRange(e,t){let n=this.collection.getItem(e),r=this.collection.getItem(t);return n&&r?jg(this.collection,n,r)<=0?this.getKeyRangeInternal(e,t):this.getKeyRangeInternal(t,e):[]}getKeyRangeInternal(e,t){if(this.layoutDelegate?.getKeyRange)return this.layoutDelegate.getKeyRange(e,t);let n=[],r=e;for(;r!=null;){let e=this.collection.getItem(r);if(e&&(e.type===`item`||e.type===`cell`&&this.allowsCellSelection)&&n.push(r),r===t)return n;r=this.collection.getKeyAfter(r)}return[]}getKey(e){let t=this.collection.getItem(e);if(!t||t.type===`cell`&&this.allowsCellSelection)return e;for(;t&&t.type!==`item`&&t.parentKey!=null;)t=this.collection.getItem(t.parentKey);return!t||t.type!==`item`?null:t.key}toggleSelection(e){if(this.selectionMode===`none`)return;if(this.selectionMode===`single`&&!this.isSelected(e)){this.replaceSelection(e);return}let t=this.getKey(e);if(t==null)return;let n=new Fg(this.state.selectedKeys===`all`?this.getSelectAllKeys():this.state.selectedKeys);n.has(t)?n.delete(t):this.canSelectItem(t)&&(n.add(t),n.anchorKey=t,n.currentKey=t),!(this.disallowEmptySelection&&n.size===0)&&this.state.setSelectedKeys(n)}replaceSelection(e){if(this.selectionMode===`none`)return;let t=this.getKey(e);if(t==null)return;let n=this.canSelectItem(t)?new Fg([t],t,t):new Fg;this.state.setSelectedKeys(n)}setSelectedKeys(e){if(this.selectionMode===`none`)return;let t=new Fg;for(let n of e){let e=this.getKey(n);if(e!=null&&(t.add(e),this.selectionMode===`single`))break}this.state.setSelectedKeys(t)}getSelectAllKeys(){let e=this.fullCollection??this.collection,t=[],n=r=>{for(;r!=null;){if(this.canSelectItemIn(r,e)){let i=e.getItem(r);i?.type===`item`&&t.push(r),i?.hasChildNodes&&(this.allowsCellSelection||i.type!==`item`)&&n(kg(Og(i,e))?.key??null)}r=e.getKeyAfter(r)}};return n(e.getFirstKey()),t}selectAll(){!this.isSelectAll&&this.selectionMode===`multiple`&&this.state.setSelectedKeys(`all`)}clearSelection(){!this.disallowEmptySelection&&(this.state.selectedKeys===`all`||this.state.selectedKeys.size>0)&&this.state.setSelectedKeys(new Fg)}toggleSelectAll(){this.isSelectAll?this.clearSelection():this.selectAll()}select(e,t){this.selectionMode!==`none`&&(this.selectionMode===`single`?this.isSelected(e)&&!this.disallowEmptySelection?this.toggleSelection(e):this.replaceSelection(e):this.selectionBehavior===`toggle`||t&&(t.pointerType===`touch`||t.pointerType===`virtual`)?this.toggleSelection(e):this.replaceSelection(e))}isSelectionEqual(e){if(e===this.state.selectedKeys)return!0;let t=this.selectedKeys;if(e.size!==t.size)return!1;for(let n of e)if(!t.has(n))return!1;for(let n of t)if(!e.has(n))return!1;return!0}canSelectItem(e){return this.canSelectItemIn(e,this.collection)}canSelectItemIn(e,t){if(this.state.selectionMode===`none`||this.state.disabledKeys.has(e))return!1;let n=t.getItem(e);return!(!n||n?.props?.isDisabled||n.type===`cell`&&!this.allowsCellSelection)}isDisabled(e){let t=this.collection.getItem(e);return this.state.disabledBehavior===`all`&&(this.state.disabledKeys.has(e)||!!t?.props?.isDisabled)&&t?.props?.disabledBehavior!==`selection`}isLink(e){return!!this.collection.getItem(e)?.props?.href}getItemProps(e){return this.collection.getItem(e)?.props}withCollection(t){return new e(t,this.state,{allowsCellSelection:this.allowsCellSelection,layoutDelegate:this.layoutDelegate||void 0,fullCollection:this.fullCollection??this.collection})}},Bg=class{build(e,t){return this.context=t,Vg(()=>this.iterateCollection(e))}*iterateCollection(e){let{children:t,items:n}=e;if(f.default.isValidElement(t)&&t.type===f.default.Fragment)yield*this.iterateCollection({children:t.props.children,items:n});else if(typeof t==`function`){if(!n)throw Error(`props.children was a function but props.items is missing`);let e=0;for(let r of n)yield*this.getFullNode({value:r,index:e},{renderer:t}),e++}else{let e=[];f.default.Children.forEach(t,t=>{t&&e.push(t)});let n=0;for(let t of e){let e=this.getFullNode({element:t,index:n},{});for(let t of e)n++,yield t}}}getKey(e,t,n,r){if(e.key!=null)return e.key;if(t.type===`cell`&&t.key!=null)return`${r}${t.key}`;let i=t.value;if(i!=null){let e=i.key??i.id;if(e==null)throw Error(`No key found for item`);return e}return r?`${r}.${t.index}`:`$.${t.index}`}getChildState(e,t){return{renderer:t.renderer||e.renderer}}*getFullNode(e,t,n,r){if(f.default.isValidElement(e.element)&&e.element.type===f.default.Fragment){let i=[];f.default.Children.forEach(e.element.props.children,e=>{i.push(e)});let a=e.index??0;for(let e of i)yield*this.getFullNode({element:e,index:a++},t,n,r);return}let i=e.element;if(!i&&e.value&&t&&t.renderer){let n=this.cache.get(e.value);if(n&&(!n.shouldInvalidate||!n.shouldInvalidate(this.context))){n.index=e.index,n.parentKey=r?r.key:null,yield n;return}i=t.renderer(e.value)}if(f.default.isValidElement(i)){let a=i.type;if(typeof a!=`function`&&typeof a.getCollectionNode!=`function`){let e=i.type;throw Error(`Unknown element <${e}> in collection.`)}let o=a.getCollectionNode(i.props,this.context),s=e.index??0,c=o.next();for(;!c.done&&c.value;){let a=c.value;e.index=s;let l=a.key??null;l??(l=a.element?null:this.getKey(i,e,t,n));let u=[...this.getFullNode({...a,key:l,index:s,wrapper:Hg(e.wrapper,a.wrapper)},this.getChildState(t,a),n?`${n}${i.key}`:i.key,r)];for(let t of u){if(t.value=a.value??e.value??null,t.value&&this.cache.set(t.value,t),e.type&&t.type!==e.type)throw Error(`Unsupported type <${Ug(t.type)}> in <${Ug(r?.type??`unknown parent type`)}>. Only <${Ug(e.type)}> is supported.`);s++,yield t}c=o.next(u)}return}if(e.key==null||e.type==null)return;let a=this,o={type:e.type,props:e.props,key:e.key,parentKey:r?r.key:null,value:e.value??null,level:(r?.level??0)+ +(r?.type===`item`),index:e.index,rendered:e.rendered,textValue:e.textValue??``,"aria-label":e[`aria-label`],wrapper:e.wrapper,shouldInvalidate:e.shouldInvalidate,hasChildNodes:e.hasChildNodes||!1,childNodes:Vg(function*(){if(!e.hasChildNodes||!e.childNodes)return;let n=0;for(let r of e.childNodes()){r.key!=null&&(r.key=`${o.key}${r.key}`);let e=a.getFullNode({...r,index:n},a.getChildState(t,r),o.key,o);for(let t of e)n++,yield t}})};yield o}constructor(){this.cache=new WeakMap}};function Vg(e){let t=[],n=null;return{*[Symbol.iterator](){for(let e of t)yield e;n||(n=e());for(let e of n)t.push(e),yield e}}}function Hg(e,t){if(e&&t)return n=>e(t(n));if(e)return e;if(t)return t}function Ug(e){return e[0].toUpperCase()+e.slice(1)}function Wg(e,t,n){let r=(0,f.useMemo)(()=>new Bg,[]),{children:i,items:a,collection:o}=e;return(0,f.useMemo)(()=>o||t(r.build({children:i,items:a},n)),[r,i,a,o,n,t])}var Gg=new WeakMap,Kg=f.default.forwardRef(({children:e,...t},n)=>{let r=(0,f.useRef)(!1),i=(0,f.useContext)(fm),a=Lu(i||{},{...t,register(){r.current=!0,i&&i.register()}});return a.ref=Ru(n||i?.ref),bp(i,a.ref),(0,f.useEffect)(()=>{r.current||(process.env.NODE_ENV!==`production`&&console.warn(`A PressResponder was rendered without a pressable child. Either call the usePress hook, or wrap your DOM node with <Pressable> component.`),r.current=!0)},[]),f.default.createElement(fm.Provider,{value:a},e)});function qg(e){let[t,n]=Jf(e.isOpen,e.defaultOpen||!1,e.onOpenChange);return{isOpen:t,setOpen:n,open:(0,f.useCallback)(()=>{n(!0)},[n]),close:(0,f.useCallback)(()=>{n(!1)},[n]),toggle:(0,f.useCallback)(()=>{n(!t)},[n,t])}}var Jg=(0,f.createContext)(null),Yg=(0,f.createContext)({}),Xg={};Xg={longPressMessage:`اضغط مطولاً أو اضغط على Alt + السهم لأسفل لفتح القائمة`};var Zg={};Zg={longPressMessage:`Натиснете продължително или натиснете Alt+ стрелка надолу, за да отворите менюто`};var Qg={};Qg={longPressMessage:`Dlouhým stiskem nebo stisknutím kláves Alt + šipka dolů otevřete nabídku`};var $g={};$g={longPressMessage:`Langt tryk eller tryk på Alt + pil ned for at åbne menuen`};var e_={};e_={longPressMessage:`Drücken Sie lange oder drücken Sie Alt + Nach-unten, um das Menü zu öffnen`};var t_={};t_={longPressMessage:`Πιέστε παρατεταμένα ή πατήστε Alt + κάτω βέλος για να ανοίξετε το μενού`};var n_={};n_={longPressMessage:`Long press or press Alt + ArrowDown to open menu`};var r_={};r_={longPressMessage:`Mantenga pulsado o pulse Alt + flecha abajo para abrir el menú`};var i_={};i_={longPressMessage:`Menüü avamiseks vajutage pikalt või vajutage klahve Alt + allanool`};var a_={};a_={longPressMessage:`Avaa valikko painamalla pohjassa tai näppäinyhdistelmällä Alt + Alanuoli`};var o_={};o_={longPressMessage:`Appuyez de manière prolongée ou appuyez sur Alt\xA0+\xA0Flèche vers le bas pour ouvrir le menu.`};var s_={};s_={longPressMessage:`לחץ לחיצה ארוכה או הקש Alt + ArrowDown כדי לפתוח את התפריט`};var c_={};c_={longPressMessage:`Dugo pritisnite ili pritisnite Alt + strelicu prema dolje za otvaranje izbornika`};var l_={};l_={longPressMessage:`Nyomja meg hosszan, vagy nyomja meg az Alt + lefele nyíl gombot a menü megnyitásához`};var u_={};u_={longPressMessage:`Premi a lungo o premi Alt + Freccia giù per aprire il menu`};var d_={};d_={longPressMessage:`長押しまたは Alt+下矢印キーでメニューを開く`};var f_={};f_={longPressMessage:`길게 누르거나 Alt + 아래쪽 화살표를 눌러 메뉴 열기`};var p_={};p_={longPressMessage:`Norėdami atidaryti meniu, nuspaudę palaikykite arba paspauskite „Alt + ArrowDown“.`};var m_={};m_={longPressMessage:`Lai atvērtu izvēlni, turiet nospiestu vai nospiediet taustiņu kombināciju Alt + lejupvērstā bultiņa`};var h_={};h_={longPressMessage:`Langt trykk eller trykk Alt + PilNed for å åpne menyen`};var g_={};g_={longPressMessage:`Druk lang op Alt + pijl-omlaag of druk op Alt om het menu te openen`};var __={};__={longPressMessage:`Naciśnij i przytrzymaj lub naciśnij klawisze Alt + Strzałka w dół, aby otworzyć menu`};var v_={};v_={longPressMessage:`Pressione e segure ou pressione Alt + Seta para baixo para abrir o menu`};var y_={};y_={longPressMessage:`Prima continuamente ou prima Alt + Seta Para Baixo para abrir o menu`};var b_={};b_={longPressMessage:`Apăsați lung sau apăsați pe Alt + săgeată în jos pentru a deschide meniul`};var x_={};x_={longPressMessage:`Нажмите и удерживайте или нажмите Alt + Стрелка вниз, чтобы открыть меню`};var S_={};S_={longPressMessage:`Ponuku otvoríte dlhým stlačením alebo stlačením klávesu Alt + klávesu so šípkou nadol`};var C_={};C_={longPressMessage:`Za odprtje menija pritisnite in držite gumb ali pritisnite Alt+puščica navzdol`};var w_={};w_={longPressMessage:`Dugo pritisnite ili pritisnite Alt + strelicu prema dole da otvorite meni`};var T_={};T_={longPressMessage:`Håll nedtryckt eller tryck på Alt + pil nedåt för att öppna menyn`};var E_={};E_={longPressMessage:`Menüyü açmak için uzun basın veya Alt + Aşağı Ok tuşuna basın`};var D_={};D_={longPressMessage:`Довго або звичайно натисніть комбінацію клавіш Alt і стрілка вниз, щоб відкрити меню`};var O_={};O_={longPressMessage:`长按或按 Alt + 向下方向键以打开菜单`};var k_={};k_={longPressMessage:`長按或按 Alt+向下鍵以開啟功能表`};var A_={};A_={"ar-AE":Xg,"bg-BG":Zg,"cs-CZ":Qg,"da-DK":$g,"de-DE":e_,"el-GR":t_,"en-US":n_,"es-ES":r_,"et-EE":i_,"fi-FI":a_,"fr-FR":o_,"he-IL":s_,"hr-HR":c_,"hu-HU":l_,"it-IT":u_,"ja-JP":d_,"ko-KR":f_,"lt-LT":p_,"lv-LV":m_,"nb-NO":h_,"nl-NL":g_,"pl-PL":__,"pt-BR":v_,"pt-PT":y_,"ro-RO":b_,"ru-RU":x_,"sk-SK":S_,"sl-SI":C_,"sr-SP":w_,"sv-SE":T_,"tr-TR":E_,"uk-UA":D_,"zh-CN":O_,"zh-TW":k_};function j_(e,t,n){let{type:r}=e,{isOpen:i}=t;(0,f.useEffect)(()=>{n&&n.current&&Gg.set(n.current,t.close)});let a;r===`menu`?a=!0:r===`listbox`&&(a=`listbox`);let o=Au();return{triggerProps:{"aria-haspopup":a,"aria-expanded":i,"aria-controls":i?o:void 0,onPress:t.toggle},overlayProps:{id:o}}}function M_(e){return e&&e.__esModule?e.default:e}function N_(e,t,n){let{type:r=`menu`,isDisabled:i,trigger:a=`press`}=e,o=Au(),{triggerProps:s,overlayProps:c}=j_({type:r},t,n),l=e=>{if(!i&&!(a===`longPress`&&!e.altKey)&&n&&n.current)switch(e.key){case`Enter`:case` `:if(a===`longPress`||e.isDefaultPrevented())return;case`ArrowDown`:`continuePropagation`in e||e.stopPropagation(),e.preventDefault(),t.toggle(`first`);break;case`ArrowUp`:`continuePropagation`in e||e.stopPropagation(),e.preventDefault(),t.toggle(`last`);break;default:`continuePropagation`in e&&e.continuePropagation()}},u=Kf(M_(A_),`@react-aria/menu`),{longPressProps:d}=wg({isDisabled:i||a!==`longPress`,accessibilityDescription:u.format(`longPressMessage`),onLongPressStart(){t.close()},onLongPress(){t.open(`first`)}}),f={preventFocusOnPress:!0,onPressStart(e){e.pointerType!==`touch`&&e.pointerType!==`keyboard`&&!i&&(sd(e.target),t.open(e.pointerType===`virtual`?`first`:null))},onPress(e){e.pointerType===`touch`&&!i&&(sd(e.target),t.toggle())}};return delete s.onPress,{menuTriggerProps:{...s,...a===`press`?f:d,id:o,onKeyDown:l},menuProps:{...c,"aria-labelledby":o,autoFocus:t.focusStrategy||!0,onClose:t.close}}}var P_=new WeakMap;function F_(e,t,n){let{shouldFocusWrap:r=!0,onKeyDown:i,onKeyUp:a,...o}=e;!e[`aria-label`]&&!e[`aria-labelledby`]&&process.env.NODE_ENV!==`production`&&console.warn(`An aria-label or aria-labelledby prop is required for accessibility.`);let s=rm(e,{labelable:!0}),{listProps:c}=Sg({...o,ref:n,selectionManager:t.selectionManager,collection:t.collection,disabledKeys:t.disabledKeys,shouldFocusWrap:r,linkBehavior:`override`});return P_.set(t,{onClose:e.onClose,onAction:e.onAction,shouldUseVirtualFocus:e.shouldUseVirtualFocus}),{menuProps:Lu(s,{onKeyDown:i,onKeyUp:a},{role:`menu`,...c,onKeyDown:t=>{(t.key!==`Escape`||e.shouldUseVirtualFocus)&&c.onKeyDown?.(t)}})}}function I_(e,t,n){let{id:r,key:i,closeOnSelect:a,shouldCloseOnSelect:o,isVirtualized:s,"aria-haspopup":c,onPressStart:l,onPressUp:u,onPress:d,onPressChange:p,onPressEnd:m,onClick:h,onHoverStart:g,onHoverChange:_,onHoverEnd:v,onKeyDown:y,onKeyUp:b,onFocus:x,onFocusChange:S,onBlur:C,selectionManager:w=t.selectionManager}=e,T=!!c,E=T&&e[`aria-expanded`]===`true`,D=e.isDisabled??w.isDisabled(i),O=e.isSelected??w.isSelected(i),k=P_.get(t),A=t.collection.getItem(i),j=e.onClose||k.onClose,M=Hd(),N=()=>{if(!T&&(A?.props?.onAction?A.props.onAction():e.onAction&&e.onAction(i),k.onAction)){let e=k.onAction;e(i)}},P=`menuitem`;T||(w.selectionMode===`single`?P=`menuitemradio`:w.selectionMode===`multiple`&&(P=`menuitemcheckbox`));let F=Mu(),I=Mu(),L=Mu(),ee={id:r,"aria-disabled":D||void 0,role:P,"aria-label":e[`aria-label`],"aria-labelledby":F,"aria-describedby":[e[`aria-describedby`],I,L].filter(Boolean).join(` `)||void 0,"aria-controls":e[`aria-controls`],"aria-haspopup":c,"aria-expanded":e[`aria-expanded`]};if(w.selectionMode!==`none`&&!T&&(ee[`aria-checked`]=O),s){let e=Number(A?.index);ee[`aria-posinset`]=Number.isNaN(e)?void 0:e+1,ee[`aria-setsize`]=Pg(t.collection)}let te=(0,f.useRef)(!1),ne=e=>{p?.(e),te.current=e},re=(0,f.useRef)(null),ie=e=>{e.pointerType!==`keyboard`&&(re.current={pointerType:e.pointerType}),e.pointerType===`mouse`&&(te.current||e.target.click()),u?.(e)},ae=e=>{h?.(e),N(),Jd(e,M,A.props.href,A?.props.routerOptions);let t=re.current?.pointerType===`keyboard`?re.current?.key===`Enter`||w.selectionMode===`none`||w.isLink(i):w.selectionMode!==`multiple`||w.isLink(i);t=o??a??t,j&&!T&&t&&j(),re.current=null},{itemProps:oe,isFocused:se}=Tg({id:r,selectionManager:w,key:i,ref:n,shouldSelectOnPressUp:!0,allowsDifferentPressOrigin:!0,linkBehavior:`none`,shouldUseVirtualFocus:k.shouldUseVirtualFocus}),{pressProps:R,isPressed:ce}=Tm({onPressStart:l,onPress:d,onPressUp:ie,onPressChange:ne,onPressEnd:m,isDisabled:D}),{hoverProps:z}=Km({isDisabled:D,onHoverStart(e){!ff()&&!(E&&c)&&(w.setFocused(!0),w.setFocusedKey(i)),g?.(e)},onHoverChange:_,onHoverEnd:v}),{keyboardProps:le}=yp({onKeyDown:e=>{if(e.repeat){e.continuePropagation();return}switch(e.key){case` `:re.current={pointerType:`keyboard`,key:` `},Z(e).click(),mf(`keyboard`);break;case`Enter`:re.current={pointerType:`keyboard`,key:`Enter`},Z(e).tagName!==`A`&&Z(e).click(),mf(`keyboard`);break;default:T||e.continuePropagation(),y?.(e);break}},onKeyUp:b}),{focusableProps:B}=Cp({onBlur:C,onFocus:x,onFocusChange:S},n),ue=rm(A?.props);delete ue.id;let de=qd(A?.props);return{menuItemProps:{...ee,...Lu(ue,de,T?{onFocus:oe.onFocus,"data-collection":oe[`data-collection`],"data-key":oe[`data-key`]}:oe,R,z,le,B,k.shouldUseVirtualFocus||T?{onMouseDown:e=>e.preventDefault()}:void 0,D?void 0:{onClick:ae}),tabIndex:oe.tabIndex!=null&&E&&!k.shouldUseVirtualFocus?-1:oe.tabIndex},labelProps:{id:F},descriptionProps:{id:I},keyboardShortcutProps:{id:L},isFocused:se,isFocusVisible:se&&w.isFocused&&ff()&&!E,isSelected:O,isPressed:ce,isDisabled:D}}function L_(e){let{heading:t,"aria-label":n}=e,r=Au();return{itemProps:{role:`presentation`},headingProps:t?{id:r,role:`presentation`}:{},groupProps:{role:`group`,"aria-label":n,"aria-labelledby":t?r:void 0}}}function R_(e){let t=qg(e),[n,r]=(0,f.useState)(null),[i,a]=(0,f.useState)([]),o=()=>{a([]),t.close()},s=(e,t)=>{a(n=>t>n.length?n:[...n.slice(0,t),e])},c=(e,t)=>{a(n=>n[t]===e?n.slice(0,t):n)};return{focusStrategy:n,...t,open(e=null){r(e),t.open()},toggle(e=null){r(e),t.toggle()},close(){o()},expandedKeysStack:i,openSubmenu:s,closeSubmenu:c}}var z_=class{constructor(e,{expandedKeys:t}={}){this.keyMap=new Map,this.firstKey=null,this.lastKey=null,this.iterable=e,t=t||new Set;let n=e=>{if(this.keyMap.set(e.key,e),e.childNodes&&(e.type===`section`||t.has(e.key)))for(let t of e.childNodes)n(t)};for(let t of e)n(t);let r=null,i=0;for(let[e,t]of this.keyMap)r?(r.nextKey=e,t.prevKey=r.key):(this.firstKey=e,t.prevKey=void 0),t.type===`item`&&(t.index=i++),r=t,r.nextKey=void 0;this.lastKey=r?.key??null}*[Symbol.iterator](){yield*this.iterable}get size(){return this.keyMap.size}getKeys(){return this.keyMap.keys()}getKeyBefore(e){let t=this.keyMap.get(e);return t?t.prevKey??null:null}getKeyAfter(e){let t=this.keyMap.get(e);return t?t.nextKey??null:null}getFirstKey(){return this.firstKey}getLastKey(){return this.lastKey}getItem(e){return this.keyMap.get(e)??null}at(e){let t=[...this.getKeys()];return this.getItem(t[e])}};function B_(e){let{onExpandedChange:t}=e,[n,r]=Jf(e.expandedKeys?new Set(e.expandedKeys):void 0,e.defaultExpandedKeys?new Set(e.defaultExpandedKeys):new Set,t),i=Lg(e),a=(0,f.useMemo)(()=>e.disabledKeys?new Set(e.disabledKeys):new Set,[e.disabledKeys]),o=Wg(e,(0,f.useCallback)(e=>new z_(e,{expandedKeys:n}),[n]),null);return(0,f.useEffect)(()=>{i.focusedKey!=null&&!o.getItem(i.focusedKey)&&i.setFocusedKey(null)},[o,i.focusedKey]),{collection:o,expandedKeys:n,disabledKeys:a,toggleKey:e=>{r(V_(n,e))},setExpandedKeys:r,selectionManager:new zg(o,i)}}function V_(e,t){let n=new Set(e);return n.has(t)?n.delete(t):n.add(t),n}var H_,U_=(0,f.createContext)(null),W_=(0,f.createContext)(null),G_=(0,f.createContext)(null),K_=(0,f.createContext)(null);function q_(e){let t=R_(e),n=(0,f.useRef)(null),{menuTriggerProps:r,menuProps:i}=N_({...e,type:`menu`},t,n),a=(0,f.useRef)(null);return Ep()?null:f.default.createElement(Bu,{values:[[U_,{...i,ref:a}],[tv,t],[G_,t],[Jg,{trigger:`MenuTrigger`,triggerRef:n,scrollRef:a,placement:`bottom start`,"aria-labelledby":i[`aria-labelledby`]}]]},f.default.createElement(Kg,{...r,ref:n,isPressed:t.isOpen},e.children))}var J_=(0,f.createContext)(null);H_=class extends tp{filter(e,t,n){let r=e.getItem(this.firstChildKey);if(r&&n(r.textValue,this)){let n=this.clone();return t.addDescendants(n,e),n}return null}},H_.type=`submenutrigger`;var Y_=(0,f.forwardRef)(function(e,t){return[e,t]=Uu(e,t,U_),f.default.createElement(Mp,{content:f.default.createElement(Up,e)},n=>f.default.createElement(X_,{props:e,collection:n,menuRef:t}))});function X_({props:e,collection:t,menuRef:n}){[e,n]=Uu(e,n,Yf);let{filter:r,...i}=e,a=(0,f.useMemo)(()=>r?t.filter(r):t,[t,r]),o=B_({...e,collection:a,children:void 0}),s=(0,f.useContext)(G_),{isVirtualized:c,CollectionRoot:l}=(0,f.useContext)(Yp),{menuProps:u}=F_({...e,isVirtualized:c,onClose:e.onClose||s?.close},o,n),d=Vu({...e,children:void 0,defaultClassName:`react-aria-Menu`,values:{isEmpty:o.collection.size===0}}),p=null;o.collection.size===0&&e.renderEmptyState&&(p=f.default.createElement(`div`,{role:`menuitem`,style:{display:`contents`}},e.renderEmptyState()));let m=rm(e,{global:!0});return f.default.createElement(zh,null,f.default.createElement(qu.div,{...Lu(m,d,u),ref:n,slot:e.slot||void 0,"data-empty":o.collection.size===0||void 0,onScroll:e.onScroll},f.default.createElement(Bu,{values:[[W_,o],[Ph,{elementType:`div`}],[Gp,{name:`MenuSection`,render:Q_}],[J_,{parentMenuRef:n,shouldUseVirtualFocus:i?.shouldUseVirtualFocus}],[$_,{shouldCloseOnSelect:e.shouldCloseOnSelect}],[Yf,null],[Xf,null],[K_,o.selectionManager],[G_,s??R_({})]]},f.default.createElement(jh,null,f.default.createElement(l,{collection:o.collection,persistedKeys:Xp(o.selectionManager.focusedKey),scrollRef:n}))),p))}var Z_=class extends zg{constructor(e,t){super(e.collection,t),this.parent=e}get focusedKey(){return this.parent.focusedKey}get isFocused(){return this.parent.isFocused}setFocusedKey(e,t){return this.parent.setFocusedKey(e,t)}setFocused(e){this.parent.setFocused(e)}get childFocusStrategy(){return this.parent.childFocusStrategy}};function Q_(e,t,n,r=`react-aria-MenuSection`){let i=(0,f.useContext)(W_),{CollectionBranch:a}=(0,f.useContext)(Yp),[o,s]=Wu(),{headingProps:c,groupProps:l}=L_({heading:s,"aria-label":n.props[`aria-label`]??void 0}),u=Vu({...e,id:void 0,children:void 0,defaultClassName:r,className:n.props?.className,style:n.props?.style,values:void 0}),d=(0,f.useContext)(K_),p=Lg(e),m=e.selectionMode==null?d:new Z_(d,p),h=Hu($_)?.shouldCloseOnSelect,g=rm(e,{global:!0});return delete g.id,f.default.createElement(qu.section,{...Lu(g,u,l),ref:t},f.default.createElement(Bu,{values:[[kh,{...c,ref:o}],[K_,m],[$_,{shouldCloseOnSelect:e.shouldCloseOnSelect??h}]]},f.default.createElement(a,{collection:i.collection,parent:n})))}var $_=(0,f.createContext)(null),ev=Bp(rp,function(e,t,n){[e,t]=Uu(e,t,$_);let r=Hu($_)?.id,i=(0,f.useContext)(W_),a=Ru(t),o=(0,f.useContext)(K_),{isVirtualized:s}=(0,f.useContext)(Yp),{menuItemProps:c,labelProps:l,descriptionProps:u,keyboardShortcutProps:d,...p}=I_({...e,id:r,key:n.key,selectionManager:o,isVirtualized:s},i,a),{hoverProps:m,isHovered:h}=Km({isDisabled:p.isDisabled}),g=Vu({...e,id:void 0,children:n.rendered,defaultClassName:`react-aria-MenuItem`,values:{...p,isHovered:h,isFocusVisible:p.isFocusVisible,selectionMode:o.selectionMode,selectionBehavior:o.selectionBehavior,hasSubmenu:!!e[`aria-haspopup`],isOpen:e[`aria-expanded`]===`true`}}),_=e.href?qu.a:qu.div,v=rm(e,{global:!0});return delete v.id,delete v.onClick,f.default.createElement(_,{...Lu(v,g,c,m),ref:a,"data-disabled":p.isDisabled||void 0,"data-hovered":h||void 0,"data-focused":p.isFocused||void 0,"data-focus-visible":p.isFocusVisible||void 0,"data-pressed":p.isPressed||void 0,"data-selected":p.isSelected||void 0,"data-selection-mode":o.selectionMode===`none`?void 0:o.selectionMode,"data-has-submenu":!!e[`aria-haspopup`]||void 0,"data-open":e[`aria-expanded`]===`true`||void 0},f.default.createElement(Bu,{values:[[ah,{slots:{[zu]:l,label:l,description:u}}],[Yg,d],[Mh,{isSelected:p.isSelected}]]},g.children))}),tv=(0,f.createContext)(null),nv=e=>t.default.createElement(t.default.Fragment,null);nv.displayName=`MenuButton.Item`;function rv(){return rv=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},rv.apply(null,arguments)}function iv({menuItems:e,testId:n,children:r}){let i=(0,t.useRef)(null),[a,o]=t.default.useState(!1),[s,c]=t.default.useState({top:0,left:0}),{anchorProps:l,layerProps:u}=Nn({isOpen:a,setIsOpen:o,matchWidth:!1,placement:`bottom`}),{ref:d,...f}=u;function p(e){e.preventDefault(),c({top:e.clientY,left:e.clientX}),o(!0)}function m(e){if(e.key===`F12`&&e.ctrlKey){e.preventDefault();let t=e.currentTarget.getBoundingClientRect();c({top:t.top+t.height/2,left:t.left+t.width/2}),o(!0)}}let h=t=>{let n=e.find(e=>e.props.id===t);n?.props.onSelect&&n.props.onSelect(n.props.label,n.props.id),o(!1)};return(0,t.useEffect)(()=>{if(!a)return;let e=e=>{let t=typeof d==`object`?d?.current:null;t&&!t.contains(e.target)&&o(!1)},t=({key:e})=>{e===`Escape`&&o(!1)},n=e=>{i.current&&i.current.contains(e.target)||o(!1)};return document.addEventListener(`mousedown`,e),window.addEventListener(`keyup`,t),document.addEventListener(`contextmenu`,n),()=>{document.removeEventListener(`mousedown`,e),window.removeEventListener(`keyup`,t),document.removeEventListener(`contextmenu`,n)}},[a]),t.default.createElement(q_,{isOpen:!0,onOpenChange:e=>{e&&o(e)},"data-testid":n},t.default.createElement(`div`,{ref:l.ref,style:{...l.style,position:`fixed`,top:s.top,left:s.left,width:1,height:1,pointerEvents:`none`,opacity:0},"aria-hidden":`true`}),t.default.createElement(`div`,{ref:i,role:`button`,tabIndex:0,"aria-label":`Press Control + F12 to open the context menu`,"aria-haspopup":`menu`,"aria-expanded":a,onContextMenu:p,onKeyDown:m},r),t.default.createElement(`div`,rv({ref:d,className:`nds-context-menu-popover`},f),a&&t.default.createElement(Y_,{onAction:h,className:`nds-context-menu rounded--all elevation--high`},e.map((n,r)=>t.default.createElement(ev,{key:n.props.id,id:n.props.id,value:n.props.id,className:({isSelected:t,isFocused:n,isDisabled:i})=>w([`nds-context-menu-item`,`padding--x--s padding--y--xs`,{"nds-context-menu-item--highlighted":t||n,"nds-context-menu-item--disabled":i,"rounded--top":r===0,"rounded--bottom":r===e.length-1}])},t.default.createElement(W,{gapSize:`s`},n.props.startIcon&&t.default.createElement(W.Item,{shrink:!0},t.default.createElement(`span`,{className:`narmi-icon-${n.props.startIcon}`})),t.default.createElement(W.Item,null,n.props.label)))))))}iv.Item=nv;function av(){return av=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},av.apply(null,arguments)}var ov=()=>{},sv=({title:e,subtitle:n,statusText:r,isOpen:i,trigger:a=`header`,onOpen:o=ov,onClose:s=ov,isDisabled:c=!1,onDisabledClick:l=ov,renderTitle:u,hasError:d=!1,disableHover:f=!1,children:p,radiusSize:m=`l`,kind:h=`default`})=>{let[g,_]=t.default.useState(!1),v=(e=!1,t)=>{if(e){l();return}else t===`open`?(o(),_(!0)):t===`close`&&(s(),_(!1))},y=()=>{_(!1),i?s():o()},b=t.default.createElement(`div`,{className:w([`collapsible-card-trigger`,`alignChild--center--center`,{"padding--left":a==`caret-start`,"padding--right--l":a==`caret-end`}])},t.default.createElement(Lo,{kind:`action`,label:i?`Close`:`Open`,onClick:y,name:`chevron-${i?`up`:`down`}`,textSize:`l`,onKeyUp:({key:e})=>{e===`Enter`&&y()}})),x=t.default.createElement(`div`,{className:w([`collapsible-card-titleBar`,`rounded--top--${h===`ai`?`m`:m}`])},t.default.createElement(ru,{isDisabled:c},typeof u==`function`?u(i):t.default.createElement(W,{alignItems:`center`,gapSize:`s`},a===`caret-start`&&t.default.createElement(W.Item,{shrink:!0},b),t.default.createElement(W.Item,null,t.default.createElement(`h4`,{className:w([`fontWeight--bold`,`fontSize--xl`,`padding--top--l`,`fontFamily--body`,{"padding--left--l":a!==`caret-start`}])},e),t.default.createElement(`div`,{className:w([c?`subtitle--disabled`:`subtitle`,`padding--bottom--l`,`margin--top--xxs`,{"padding--left--l":a!==`caret-start`}])},n)),a===`caret-end`&&t.default.createElement(W.Item,{shrink:!0},b),r&&t.default.createElement(W.Item,{shrink:!0},t.default.createElement(`div`,{className:`collapsible-card--statusText padding--right--l fontSize--s alignChild--right--center`},t.default.createElement(`span`,null,r)))))),S=w([`collapsible-card--content-card`,`collapisble-card--${h}`,{"content-card--hasCaretTrigger":a.includes(`caret`),"content-card--error":d,"content-card--disabled":c,"content-card--hover":a===`header`&&!f&&g,"collapsible-card--no-user-select":!f||a===`header`,"collapsible-card--customTitle":typeof u==`function`},i&&!c?void 0:`content-card--closed`,`rounded--all--${m}`,`bgColor--white`]),C=a===`header`?{role:`button`,tabIndex:0,onKeyUp:({key:e})=>{if(e===`Enter`){let e=i&&!c?`close`:`open`;v(e===`open`?c:!1,e)}},onClick:()=>{let e=i&&!c?`close`:`open`;v(e===`open`?c:!1,e)}}:{};return t.default.createElement(`div`,{className:S},i&&!c?t.default.createElement(t.default.Fragment,null,t.default.createElement(`div`,av({className:`collapsible-card--title-expanded rounded--top--${m}`,"aria-expanded":`true`,onMouseEnter:()=>_(!0),onMouseLeave:()=>_(!1)},C),x),t.default.createElement(`div`,{className:`padding--all--l`},p)):t.default.createElement(`div`,av({"aria-expanded":`false`},C),x))},cv=({children:e,value:n})=>t.default.createElement(t.default.Fragment,null,e||n);cv.displayName=`Combobox.Item`,cv.propTypes={value:S.default.string.isRequired,searchValue:S.default.string.isRequired,children:S.default.oneOfType([S.default.node,S.default.arrayOf(S.default.node)])};var lv=({text:e,kind:n=`bold`})=>t.default.createElement(`h5`,{className:`nds-combobox-list-heading--${n}`},e);lv.displayName=`Combobox.Heading`;var uv=({children:e})=>t.default.createElement(t.default.Fragment,null,e);uv.displayName=`Combobox.Category`,uv.propTypes={label:S.default.string.isRequired,children:S.default.oneOfType([S.default.node,S.default.arrayOf(S.default.node)])};var dv=()=>{},fv=({onSelect:e=dv})=>t.default.createElement(t.default.Fragment,null);fv.displayName=`Combobox.Action`,fv.propTypes={onSelect:S.default.func.isRequired,label:S.default.string.isRequired};function pv(){return pv=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},pv.apply(null,arguments)}var mv=t.default.forwardRef(({isOpen:e=!1,showOpenIndicator:n=!0,disabled:r=!1,labelText:i,labelProps:a,displayValue:o,renderDisplayValue:s,errorText:c,hasError:l=!1,minWidth:u=`auto`,kind:d=`default`,testId:f,startContent:p=t.default.createElement(t.default.Fragment,null),endContent:m=t.default.createElement(t.default.Fragment,null),...h},g)=>t.default.createElement(t.default.Fragment,null,t.default.createElement(`div`,{className:`nds-dropdownTrigger nds-dropdownTrigger--${d}`,style:{minWidth:u}},t.default.createElement(`button`,pv({disabled:r,ref:g,"data-testid":f||`dropdownTriggerButton`,className:w([`nds-dropdownTrigger-button button--reset`,`padding--x--s rounded--all`,{"nds-dropdownTrigger-button--hasValue":!!o,"nds-dropdownTrigger-button--hasError":!!c||l,"nds-dropdownTrigger-button--isActive":e,"nds-dropdownTrigger-button--disabled":r}]),"aria-expanded":e?`true`:`false`,type:`button`},h),p,i&&t.default.createElement(`label`,pv({className:`nds-dropdownTrigger-label`},a),i),s?s():o&&t.default.createElement(`span`,{className:`nds-dropdownTrigger-value`},o),m,n&&!r&&t.default.createElement(`span`,{role:`img`,"aria-label":e?`popup open`:`popup closed`,className:w([`nds-dropdownTrigger-chevron fontSize--xl fontColor--secondary`,`narmi-icon-chevron-${e?`up`:`down`}`])}))),c&&t.default.createElement(Ao,{error:c})));mv.displayName=`DropdownTrigger`;var hv=({children:e})=>t.default.createElement(t.default.Fragment,null,e);hv.displayName=`Select.Item`,hv.propTypes={value:S.default.string.isRequired,searchValue:S.default.string.isRequired,children:S.default.oneOfType([S.default.node,S.default.arrayOf(S.default.node)])};var gv=({children:e})=>t.default.createElement(t.default.Fragment,null,e);gv.displayName=`Select.Action`,gv.propTypes={onSelect:S.default.func.isRequired,children:S.default.oneOfType([S.default.node,S.default.arrayOf(S.default.node)])};var _v=({children:e})=>t.default.createElement(t.default.Fragment,null,e);_v.displayName=`Select.Category`,_v.propTypes={label:S.default.string,kind:S.default.oneOf([`heading`,`label`]),children:S.default.oneOfType([S.default.node,S.default.arrayOf(S.default.node)]),isFlat:S.default.bool};function vv(){return vv=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},vv.apply(null,arguments)}var yv=()=>{},bv=e=>{let t=!1;return e&&e.props&&(t=`onSelect`in e.props),t},xv=e=>{let t=``;return e&&!bv(e)&&(t=e.props.children),t},Sv=(e,t)=>t.filter(e=>!bv(e)).filter(({props:t})=>t.value===e).pop()||``,Cv=(e,t)=>{let n=0;return n=bv(e)?t.map(({props:e})=>e.onSelect).indexOf(e.props.onSelect):t.map(({props:e})=>e.value).indexOf(e.props.value),n},wv=(e,t,n)=>{if(e<0)return!1;let r=n[e].props.value;return t.map(e=>e.props.value).includes(r)},Tv=(e,t)=>{if(!e||bv(e))return!1;let n=e.props.value;return t.map(e=>e.props.value).includes(n)},Ev=(e=``,t)=>bv(t)?``:t.props.searchValue||t.props.value,Dv=({id:e,label:n,children:r,onChange:i=yv,value:a,defaultValue:o,defaultOpen:s=!1,disabled:c=!1,getTypeaheadString:l=Ev,clearSelectionOnAction:u=!1,errorText:d,testId:f})=>{let p=[],m=[],h=(0,t.useMemo)(()=>t.default.Children.toArray(r).filter(e=>!bv(e)),[r]),g=t.default.Children.toArray(r).filter(bv),[_,v]=(0,t.useState)(``);h.some(({type:e})=>e.displayName===`Select.Category`)?(p=[...h.flatMap(({props:e})=>t.default.Children.toArray(e.children)),...g],m=h.map(({props:e})=>({label:e.label,categoryChildren:t.default.Children.toArray(e.children),kind:e.kind,isFlat:e.isFlat}))):p=[...h,...g];let y={id:e||`nds-select-${n}`,items:p,disabled:c,initialSelectedItem:o&&Sv(o,p),initialIsOpen:s,itemToString:e=>l(_,e),onSelectedItemChange:({selectedItem:e})=>{e&&!bv(e)&&i(e.props?e.props.value:``)},stateReducer:(e,t)=>{let{type:n,changes:r}=t,{selectedItem:a}=e,{selectedItem:o}=r,s=r.isOpen;if(n===$i.stateChangeTypes.ToggleButtonKeyDownCharacter){let{inputValue:e}=r;v(e),s=!0}else v(``);return bv(o)?(o.props.onSelect(),u&&i(``),{...r,selectedItem:u?null:a,isOpen:!1}):{...r,isOpen:s}}};a!==void 0&&(y.selectedItem=Sv(a,p));let{isOpen:b,selectedItem:x,getToggleButtonProps:S,getLabelProps:C,getMenuProps:T,highlightedIndex:E,getItemProps:D,closeMenu:O}=$i(y),{anchorProps:k,layerProps:A}=Nn({isOpen:b,setIsOpen:e=>{e||O()},polyfillScrollBug:!0}),j=m.length>0,M=x!==null&&x.props,N=b&&p.length>0,P=(e,n)=>{let r=Cv(e,n);return t.default.createElement(`li`,vv({key:`item-${r}`,className:w([`nds-select-item`,`alignChild--left--center padding--x--s padding--y--xs`,{"nds-select-item--highlighted":E===r,"rounded--top":r===0,"rounded--bottom":r===n.length-1,"nds-select-item--hasGutter":j}])},D({item:e,index:r})),t.default.createElement(W,{as:`span`},t.default.createElement(W.Item,{as:`span`},e),M&&x.props.value===e.props.value&&t.default.createElement(W.Item,{as:`span`,shrink:!0},t.default.createElement(`span`,{className:`narmi-icon-check fontSize--xl fontWeight--bold`}))))},F=e=>{let t={};return(wv(E,e,p)||Tv(x,e))&&(t.open=!0),t};return t.default.createElement(`div`,{className:`nds-select`,"data-testid":f},t.default.createElement(`div`,k,t.default.createElement(mv,vv({isOpen:N,labelText:n,disabled:c,displayValue:xv(x)||_,labelProps:{...C()},hasError:!!d},S()))),t.default.createElement(Ao,{error:d}),t.default.createElement(`div`,A,t.default.createElement(`div`,vv({className:w([`nds-select-list`,`bgColor--white`,{"nds-select-list--error":!!d}])},T()),N&&j&&m.map(({label:e,kind:n,categoryChildren:r,isFlat:i})=>i?t.default.createElement(t.default.Fragment,null,e&&t.default.createElement(`h4`,{id:`select-category-${e}`,className:w([`fontFamily--default`,`padding--x--s padding--y--xs`,{"select-category-title--label":n===`label`,"select-category-title--heading":n===`heading`}])},e),t.default.createElement(`ul`,{className:`list--reset`,"aria-labelledby":`select-category-${e}`},r.map(e=>P(e,p)))):t.default.createElement(`details`,vv({key:e,className:`nds-select-category`},F(r)),t.default.createElement(`summary`,{className:w([`alignChild--left--center`,`padding--x--s`,{"select-category-title--label":n===`label`,"select-category-title--heading":n===`heading`||!n}])},t.default.createElement(`span`,{id:`select-category-${e}`},e),t.default.createElement(`span`,{className:`nds-category-icon narmi-icon-chevron-down`}),t.default.createElement(`span`,{className:`nds-category-icon narmi-icon-chevron-up`})),t.default.createElement(`ul`,{className:`list--reset`,"aria-labelledby":`select-category-${e}`},r.map(e=>P(e,p))))),N&&j&&t.default.createElement(`ul`,{className:`list--reset`},g.map(e=>P(e,p))),N&&!j&&t.default.createElement(`ul`,{className:`list--reset`},h.map(e=>P(e,p)),g.map(e=>P(e,p))))))};Dv.Item=hv,Dv.Action=gv,Dv.Category=_v;function Ov(){return Ov=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Ov.apply(null,arguments)}var kv=()=>{},Av=e=>{let t=!1;return e&&e.props&&(t=`label`in e.props),t},jv=e=>{let t=!1;return e&&(t=Av(e)||`value`in e.props),t},Mv=(e,t,n,r,i)=>{let a=!1;if(t>-1&&n.length>0){let e=n[t].props.value;a=r.map(e=>e.props.value).includes(e)}return typeof e==`string`&&e.length>0&&(a=!0),i&&(a=r.map(e=>e.props.value).includes(i.props.value)),a},Nv=(e,t)=>t.map(e=>e.props.value).reduce((t,n)=>{let r=e.find(e=>n===e.props.value);return r&&t.push(r),t},[]),Pv=(e,t)=>e.filter(e=>(e.props.searchValue||e.props.value).toLowerCase().startsWith(t)),Fv=e=>t.default.createElement(`span`,{className:`fontSize--xl fontColor--primary narmi-icon-${e?`chevron-up`:`chevron-down`}`}),Iv=({label:e,onChange:n=kv,onInputChange:r=kv,inputValue:i,filterItemsByInput:a=Pv,children:o,disableFiltering:s=!1,clearSelectionOnAction:c=!1,errorText:l,icon:u,testId:d,renderEndContent:f=Fv})=>{let p=(0,t.useMemo)(()=>t.default.Children.toArray(o),[o]),m=p.some(({type:e})=>e.displayName===uv.displayName),h=[],g=p.length<1?[]:p.filter(({props:e})=>`value`in e||`text`in e);m?(g=p.flatMap(({props:e})=>t.default.Children.toArray(e.children)),h=p.map(({props:e})=>({label:e.label,categoryChildren:t.default.Children.toArray(e.children)}))):g=p;let[_,v]=(0,t.useState)(g),y=(0,t.useRef)(null),b=(0,t.useRef)(!1),x=e=>e?.props?.searchValue||e?.props?.value||``,{isOpen:S,selectedItem:C,getInputProps:T,getMenuProps:E,getItemProps:D,highlightedIndex:O,inputValue:k,openMenu:A,closeMenu:j,reset:M}=Ma({items:_,inputValue:i,itemToString:x,onInputValueChange:({inputValue:e})=>{if(e.length===0){v(g),M(),r(``);return}if(!s){let t=g.filter(Av);v([...a(g.filter(e=>!Av(e)&&jv(e)),e.toLowerCase()),...t])}r(e)},onSelectedItemChange:({selectedItem:e})=>{b.current=!0,y.current?.blur(),n(e?e.props.value:``),j(),y.current?.focus({preventScroll:!0}),b.current=!1},stateReducer:(e,t)=>{let{changes:n}=t,{selectedItem:r}=e,{selectedItem:i}=n;return Av(i)?(i.props.onSelect(),{...n,selectedItem:c?null:r,inputValue:c?``:x(r),isOpen:!1}):n}}),{anchorProps:N,layerProps:P}=Nn({isOpen:S,setIsOpen:e=>{e||j()},polyfillScrollBug:!0});(0,t.useEffect)(()=>{(!k||k.length===0)&&g.length!==_.length&&v(g)},[g,k]);let F=!!C,I=(e,n)=>{let r=Av(e),i=t.default.createElement(`li`,{key:`${e}-${n}`,className:`alignChild--left--center`},e);return jv(e)&&(i=t.default.createElement(`li`,Ov({key:`${e}-${n}`,className:w([`nds-combobox-item`,`alignChild--left--center padding--x--s`,{"nds-combobox-action":r,"padding--y--xs":!m,"nds-combobox-item--highlighted":O===n,"rounded--top":n===0,"rounded--bottom":n===_.length-1}])},D({item:e,index:n})),r&&t.default.createElement(W,{as:`span`,gapSize:`xxs`},t.default.createElement(W.Item,{as:`span`,shrink:!0},t.default.createElement(`span`,{className:`narmi-icon-plus fontWeight--bold`})),t.default.createElement(W.Item,{as:`span`},t.default.createElement(`span`,{className:`fontWeight--semibold`},e.props.label))),!r&&t.default.createElement(W,{as:`span`},t.default.createElement(W.Item,{as:`span`},e),F&&C.props.value===e.props.value&&t.default.createElement(W.Item,{as:`span`,shrink:!0},t.default.createElement(`span`,{className:`narmi-icon-check fontSize--xl fontWeight--bold`}))))),i},L=({label:e,categoryChildren:n})=>{let r={},i=Nv(_,n),a=i.length>0;return Mv(k,O,_,n,C)&&(r.open=!0),a?t.default.createElement(`details`,Ov({key:e,className:`nds-combobox-category`,tabIndex:-1},r),t.default.createElement(`summary`,{className:`fontWeight--bold alignChild--left--center padding--x--s padding--y-xs`,onFocus:e=>{e.target.blur()}},t.default.createElement(`span`,{id:`combobox-category-${e}`},e),t.default.createElement(`span`,{className:`nds-category-icon narmi-icon-chevron-down`}),t.default.createElement(`span`,{className:`nds-category-icon narmi-icon-chevron-up`})),t.default.createElement(`ul`,{className:`list--reset`,"aria-labelledby":`combobox-category-${e}`},i.map(e=>I(e,Cv(e,_))))):null},ee=()=>{b.current||S||(A(),F&&v(g.filter(jv)))};return g.length<1?t.default.createElement(Bo,{error:l,label:e,startIcon:u,onChange:r,value:k}):t.default.createElement(t.default.Fragment,null,t.default.createElement(`div`,{className:w([`nds-combobox`,{"nds-combobox--active":S}]),"data-testid":d},t.default.createElement(`div`,N,t.default.createElement(Bo,Ov({error:l,renderError:!1,label:e,value:k,startIcon:u,endContent:f(S)},T({ref:y,onBlur:()=>{b.current||(r(C?x(C):``),O!==-1&&j())},onFocus:ee,onClick:ee}),{onClick:ee}))),t.default.createElement(Ao,{error:l,className:`margin--top--xs`}),t.default.createElement(`div`,P,t.default.createElement(`ul`,Ov({className:w([`nds-combobox-list`,`list--reset`,`bgColor--white`,{"nds-combobox-list--error":!!l}])},E()),S&&(m?h.map(L):_.map(I))))))};Iv.Item=cv,Iv.Heading=lv,Iv.Category=uv,Iv.Action=fv;var Lv=l(((e,t)=>{(function(n,r){typeof e==`object`&&t!==void 0?r(e):typeof define==`function`&&define.amd?define([`exports`],r):(n=typeof globalThis<`u`?globalThis:n||self,r(n.default={}))})(e,(function(e){"use strict";var t={weekdays:{shorthand:[`Sun`,`Mon`,`Tue`,`Wed`,`Thu`,`Fri`,`Sat`],longhand:[`Sunday`,`Monday`,`Tuesday`,`Wednesday`,`Thursday`,`Friday`,`Saturday`]},months:{shorthand:[`Jan`,`Feb`,`Mar`,`Apr`,`May`,`Jun`,`Jul`,`Aug`,`Sep`,`Oct`,`Nov`,`Dec`],longhand:[`January`,`February`,`March`,`April`,`May`,`June`,`July`,`August`,`September`,`October`,`November`,`December`]},daysInMonth:[31,28,31,30,31,30,31,31,30,31,30,31],firstDayOfWeek:0,ordinal:function(e){var t=e%100;if(t>3&&t<21)return`th`;switch(t%10){case 1:return`st`;case 2:return`nd`;case 3:return`rd`;default:return`th`}},rangeSeparator:` to `,weekAbbreviation:`Wk`,scrollTitle:`Scroll to increment`,toggleTitle:`Click to toggle`,amPM:[`AM`,`PM`],yearAriaLabel:`Year`,monthAriaLabel:`Month`,hourAriaLabel:`Hour`,minuteAriaLabel:`Minute`,time_24hr:!1};e.default=t,e.english=t,Object.defineProperty(e,"__esModule",{value:!0})}))}))(),Rv=[`onChange`,`onClose`,`onDayCreate`,`onDestroy`,`onKeyDown`,`onMonthChange`,`onOpen`,`onParseConfig`,`onReady`,`onValueUpdate`,`onYearChange`,`onPreCalendarPosition`],zv={_disable:[],allowInput:!1,allowInvalidPreload:!1,altFormat:`F j, Y`,altInput:!1,altInputClass:`form-control input`,animate:typeof window==`object`&&window.navigator.userAgent.indexOf(`MSIE`)===-1,ariaDateFormat:`F j, Y`,autoFillDefaultTime:!0,clickOpens:!0,closeOnSelect:!0,conjunction:`, `,dateFormat:`Y-m-d`,defaultHour:12,defaultMinute:0,defaultSeconds:0,disable:[],disableMobile:!1,enableSeconds:!1,enableTime:!1,errorHandler:function(e){return typeof console<`u`&&console.warn(e)},getWeek:function(e){var t=new Date(e.getTime());t.setHours(0,0,0,0),t.setDate(t.getDate()+3-(t.getDay()+6)%7);var n=new Date(t.getFullYear(),0,4);return 1+Math.round(((t.getTime()-n.getTime())/864e5-3+(n.getDay()+6)%7)/7)},hourIncrement:1,ignoredFocusElements:[],inline:!1,locale:`default`,minuteIncrement:5,mode:`single`,monthSelectorType:`dropdown`,nextArrow:`<svg version='1.1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' viewBox='0 0 17 17'><g></g><path d='M13.207 8.472l-7.854 7.854-0.707-0.707 7.146-7.146-7.146-7.148 0.707-0.707 7.854 7.854z' /></svg>`,noCalendar:!1,now:new Date,onChange:[],onClose:[],onDayCreate:[],onDestroy:[],onKeyDown:[],onMonthChange:[],onOpen:[],onParseConfig:[],onReady:[],onValueUpdate:[],onYearChange:[],onPreCalendarPosition:[],plugins:[],position:`auto`,positionElement:void 0,prevArrow:`<svg version='1.1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' viewBox='0 0 17 17'><g></g><path d='M5.207 8.471l7.146 7.147-0.707 0.707-7.853-7.854 7.854-7.853 0.707 0.707-7.147 7.146z' /></svg>`,shorthandCurrentMonth:!1,showMonths:1,static:!1,time_24hr:!1,weekNumbers:!1,wrap:!1},Bv={weekdays:{shorthand:[`Sun`,`Mon`,`Tue`,`Wed`,`Thu`,`Fri`,`Sat`],longhand:[`Sunday`,`Monday`,`Tuesday`,`Wednesday`,`Thursday`,`Friday`,`Saturday`]},months:{shorthand:[`Jan`,`Feb`,`Mar`,`Apr`,`May`,`Jun`,`Jul`,`Aug`,`Sep`,`Oct`,`Nov`,`Dec`],longhand:[`January`,`February`,`March`,`April`,`May`,`June`,`July`,`August`,`September`,`October`,`November`,`December`]},daysInMonth:[31,28,31,30,31,30,31,31,30,31,30,31],firstDayOfWeek:0,ordinal:function(e){var t=e%100;if(t>3&&t<21)return`th`;switch(t%10){case 1:return`st`;case 2:return`nd`;case 3:return`rd`;default:return`th`}},rangeSeparator:` to `,weekAbbreviation:`Wk`,scrollTitle:`Scroll to increment`,toggleTitle:`Click to toggle`,amPM:[`AM`,`PM`],yearAriaLabel:`Year`,monthAriaLabel:`Month`,hourAriaLabel:`Hour`,minuteAriaLabel:`Minute`,time_24hr:!1},Vv=function(e,t){return t===void 0&&(t=2),(`000`+e).slice(t*-1)},Hv=function(e){return+(e===!0)};function Uv(e,t){var n;return function(){var r=this,i=arguments;clearTimeout(n),n=setTimeout(function(){return e.apply(r,i)},t)}}var Wv=function(e){return e instanceof Array?e:[e]};function Gv(e,t,n){if(n===!0)return e.classList.add(t);e.classList.remove(t)}function $(e,t,n){var r=window.document.createElement(e);return t=t||``,n=n||``,r.className=t,n!==void 0&&(r.textContent=n),r}function Kv(e){for(;e.firstChild;)e.removeChild(e.firstChild)}function qv(e,t){if(t(e))return e;if(e.parentNode)return qv(e.parentNode,t)}function Jv(e,t){var n=$(`div`,`numInputWrapper`),r=$(`input`,`numInput `+e),i=$(`span`,`arrowUp`),a=$(`span`,`arrowDown`);if(navigator.userAgent.indexOf(`MSIE 9.0`)===-1?r.type=`number`:(r.type=`text`,r.pattern=`\\d*`),t!==void 0)for(var o in t)r.setAttribute(o,t[o]);return n.appendChild(r),n.appendChild(i),n.appendChild(a),n}function Yv(e){try{return typeof e.composedPath==`function`?e.composedPath()[0]:e.target}catch{return e.target}}var Xv=function(){},Zv=function(e,t,n){return n.months[t?`shorthand`:`longhand`][e]},Qv={D:Xv,F:function(e,t,n){e.setMonth(n.months.longhand.indexOf(t))},G:function(e,t){e.setHours((e.getHours()>=12?12:0)+parseFloat(t))},H:function(e,t){e.setHours(parseFloat(t))},J:function(e,t){e.setDate(parseFloat(t))},K:function(e,t,n){e.setHours(e.getHours()%12+12*Hv(new RegExp(n.amPM[1],`i`).test(t)))},M:function(e,t,n){e.setMonth(n.months.shorthand.indexOf(t))},S:function(e,t){e.setSeconds(parseFloat(t))},U:function(e,t){return new Date(parseFloat(t)*1e3)},W:function(e,t,n){var r=parseInt(t),i=new Date(e.getFullYear(),0,2+(r-1)*7,0,0,0,0);return i.setDate(i.getDate()-i.getDay()+n.firstDayOfWeek),i},Y:function(e,t){e.setFullYear(parseFloat(t))},Z:function(e,t){return new Date(t)},d:function(e,t){e.setDate(parseFloat(t))},h:function(e,t){e.setHours((e.getHours()>=12?12:0)+parseFloat(t))},i:function(e,t){e.setMinutes(parseFloat(t))},j:function(e,t){e.setDate(parseFloat(t))},l:Xv,m:function(e,t){e.setMonth(parseFloat(t)-1)},n:function(e,t){e.setMonth(parseFloat(t)-1)},s:function(e,t){e.setSeconds(parseFloat(t))},u:function(e,t){return new Date(parseFloat(t))},w:Xv,y:function(e,t){e.setFullYear(2e3+parseFloat(t))}},$v={D:``,F:``,G:`(\\d\\d|\\d)`,H:`(\\d\\d|\\d)`,J:`(\\d\\d|\\d)\\w+`,K:``,M:``,S:`(\\d\\d|\\d)`,U:`(.+)`,W:`(\\d\\d|\\d)`,Y:`(\\d{4})`,Z:`(.+)`,d:`(\\d\\d|\\d)`,h:`(\\d\\d|\\d)`,i:`(\\d\\d|\\d)`,j:`(\\d\\d|\\d)`,l:``,m:`(\\d\\d|\\d)`,n:`(\\d\\d|\\d)`,s:`(\\d\\d|\\d)`,u:`(.+)`,w:`(\\d\\d|\\d)`,y:`(\\d{2})`},ey={Z:function(e){return e.toISOString()},D:function(e,t,n){return t.weekdays.shorthand[ey.w(e,t,n)]},F:function(e,t,n){return Zv(ey.n(e,t,n)-1,!1,t)},G:function(e,t,n){return Vv(ey.h(e,t,n))},H:function(e){return Vv(e.getHours())},J:function(e,t){return t.ordinal===void 0?e.getDate():e.getDate()+t.ordinal(e.getDate())},K:function(e,t){return t.amPM[Hv(e.getHours()>11)]},M:function(e,t){return Zv(e.getMonth(),!0,t)},S:function(e){return Vv(e.getSeconds())},U:function(e){return e.getTime()/1e3},W:function(e,t,n){return n.getWeek(e)},Y:function(e){return Vv(e.getFullYear(),4)},d:function(e){return Vv(e.getDate())},h:function(e){return e.getHours()%12?e.getHours()%12:12},i:function(e){return Vv(e.getMinutes())},j:function(e){return e.getDate()},l:function(e,t){return t.weekdays.longhand[e.getDay()]},m:function(e){return Vv(e.getMonth()+1)},n:function(e){return e.getMonth()+1},s:function(e){return e.getSeconds()},u:function(e){return e.getTime()},w:function(e){return e.getDay()},y:function(e){return String(e.getFullYear()).substring(2)}},ty=function(e){var t=e.config,n=t===void 0?zv:t,r=e.l10n,i=r===void 0?Bv:r,a=e.isMobile,o=a===void 0?!1:a;return function(e,t,r){var a=r||i;return n.formatDate!==void 0&&!o?n.formatDate(e,t,a):t.split(``).map(function(t,r,i){return ey[t]&&i[r-1]!==`\\`?ey[t](e,a,n):t===`\\`?``:t}).join(``)}},ny=function(e){var t=e.config,n=t===void 0?zv:t,r=e.l10n,i=r===void 0?Bv:r;return function(e,t,r,a){if(!(e!==0&&!e)){var o=a||i,s,c=e;if(e instanceof Date)s=new Date(e.getTime());else if(typeof e!=`string`&&e.toFixed!==void 0)s=new Date(e);else if(typeof e==`string`){var l=t||(n||zv).dateFormat,u=String(e).trim();if(u===`today`)s=new Date,r=!0;else if(n&&n.parseDate)s=n.parseDate(e,l);else if(/Z$/.test(u)||/GMT$/.test(u))s=new Date(e);else{for(var d=void 0,f=[],p=0,m=0,h=``;p<l.length;p++){var g=l[p],_=g===`\\`,v=l[p-1]===`\\`||_;if($v[g]&&!v){h+=$v[g];var y=new RegExp(h).exec(e);y&&(d=!0)&&f[g===`Y`?`unshift`:`push`]({fn:Qv[g],val:y[++m]})}else _||(h+=`.`)}s=!n||!n.noCalendar?new Date(new Date().getFullYear(),0,1,0,0,0,0):new Date(new Date().setHours(0,0,0,0)),f.forEach(function(e){var t=e.fn,n=e.val;return s=t(s,n,o)||s}),s=d?s:void 0}}if(!(s instanceof Date&&!isNaN(s.getTime()))){n.errorHandler(Error(`Invalid date provided: `+c));return}return r===!0&&s.setHours(0,0,0,0),s}}};function ry(e,t,n){return n===void 0&&(n=!0),n===!1?e.getTime()-t.getTime():new Date(e.getTime()).setHours(0,0,0,0)-new Date(t.getTime()).setHours(0,0,0,0)}var iy=function(e,t,n){return e>Math.min(t,n)&&e<Math.max(t,n)},ay=function(e,t,n){return e*3600+t*60+n},oy=function(e){var t=Math.floor(e/3600),n=(e-t*3600)/60;return[t,n,e-t*3600-n*60]},sy={DAY:864e5};function cy(e){var t=e.defaultHour,n=e.defaultMinute,r=e.defaultSeconds;if(e.minDate!==void 0){var i=e.minDate.getHours(),a=e.minDate.getMinutes(),o=e.minDate.getSeconds();t<i&&(t=i),t===i&&n<a&&(n=a),t===i&&n===a&&r<o&&(r=e.minDate.getSeconds())}if(e.maxDate!==void 0){var s=e.maxDate.getHours(),c=e.maxDate.getMinutes();t=Math.min(t,s),t===s&&(n=Math.min(c,n)),t===s&&n===c&&(r=e.maxDate.getSeconds())}return{hours:t,minutes:n,seconds:r}}typeof Object.assign!=`function`&&(Object.assign=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];if(!e)throw TypeError(`Cannot convert undefined or null to object`);for(var r=function(t){t&&Object.keys(t).forEach(function(n){return e[n]=t[n]})},i=0,a=t;i<a.length;i++){var o=a[i];r(o)}return e});var ly=function(){return ly=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n],t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},ly.apply(this,arguments)},uy=function(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;for(var r=Array(e),i=0,t=0;t<n;t++)for(var a=arguments[t],o=0,s=a.length;o<s;o++,i++)r[i]=a[o];return r},dy=300;function fy(e,t){var n={config:ly(ly({},zv),my.defaultConfig),l10n:Bv};n.parseDate=ny({config:n.config,l10n:n.l10n}),n._handlers=[],n.pluginElements=[],n.loadedPlugins=[],n._bind=h,n._setHoursFromDate=f,n._positionCalendar=me,n.changeMonth=L,n.changeYear=ae,n.clear=ee,n.close=te,n.onMouseOver=z,n._createElement=$,n.createDay=S,n.destroy=ne,n.isEnabled=oe,n.jumpToDate=v,n.updateValue=Fe,n.open=B,n.redraw=_e,n.set=xe,n.setDate=Ce,n.toggle=ke;function r(){n.utils={getDaysInMonth:function(e,t){return e===void 0&&(e=n.currentMonth),t===void 0&&(t=n.currentYear),e===1&&(t%4==0&&t%100!=0||t%400==0)?29:n.l10n.daysInMonth[e]}}}function i(){n.element=n.input=e,n.isOpen=!1,de(),pe(),Ee(),Te(),r(),n.isMobile||x(),_(),(n.selectedDates.length||n.config.noCalendar)&&(n.config.enableTime&&f(n.config.noCalendar?n.latestSelectedDateObj:void 0),Fe(!1)),s();var t=/^((?!chrome|android).)*safari/i.test(navigator.userAgent);!n.isMobile&&t&&me(),V(`onReady`)}function a(){return(n.calendarContainer?.getRootNode()).activeElement||document.activeElement}function o(e){return e.bind(n)}function s(){var e=n.config;e.weekNumbers===!1&&e.showMonths===1||e.noCalendar!==!0&&window.requestAnimationFrame(function(){if(n.calendarContainer!==void 0&&(n.calendarContainer.style.visibility=`hidden`,n.calendarContainer.style.display=`block`),n.daysContainer!==void 0){var t=(n.days.offsetWidth+1)*e.showMonths;n.daysContainer.style.width=t+`px`,n.calendarContainer.style.width=t+(n.weekWrapper===void 0?0:n.weekWrapper.offsetWidth)+`px`,n.calendarContainer.style.removeProperty(`visibility`),n.calendarContainer.style.removeProperty(`display`)}})}function c(e){if(n.selectedDates.length===0){var t=n.config.minDate===void 0||ry(new Date,n.config.minDate)>=0?new Date:new Date(n.config.minDate.getTime()),r=cy(n.config);t.setHours(r.hours,r.minutes,r.seconds,t.getMilliseconds()),n.selectedDates=[t],n.latestSelectedDateObj=t}e!==void 0&&e.type!==`blur`&&Le(e);var i=n._input.value;d(),Fe(),n._input.value!==i&&n._debouncedChange()}function l(e,t){return e%12+12*Hv(t===n.l10n.amPM[1])}function u(e){switch(e%24){case 0:case 12:return 12;default:return e%12}}function d(){if(!(n.hourElement===void 0||n.minuteElement===void 0)){var e=(parseInt(n.hourElement.value.slice(-2),10)||0)%24,t=(parseInt(n.minuteElement.value,10)||0)%60,r=n.secondElement===void 0?0:(parseInt(n.secondElement.value,10)||0)%60;n.amPM!==void 0&&(e=l(e,n.amPM.textContent));var i=n.config.minTime!==void 0||n.config.minDate&&n.minDateHasTime&&n.latestSelectedDateObj&&ry(n.latestSelectedDateObj,n.config.minDate,!0)===0,a=n.config.maxTime!==void 0||n.config.maxDate&&n.maxDateHasTime&&n.latestSelectedDateObj&&ry(n.latestSelectedDateObj,n.config.maxDate,!0)===0;if(n.config.maxTime!==void 0&&n.config.minTime!==void 0&&n.config.minTime>n.config.maxTime){var o=ay(n.config.minTime.getHours(),n.config.minTime.getMinutes(),n.config.minTime.getSeconds()),s=ay(n.config.maxTime.getHours(),n.config.maxTime.getMinutes(),n.config.maxTime.getSeconds()),c=ay(e,t,r);if(c>s&&c<o){var u=oy(o);e=u[0],t=u[1],r=u[2]}}else{if(a){var d=n.config.maxTime===void 0?n.config.maxDate:n.config.maxTime;e=Math.min(e,d.getHours()),e===d.getHours()&&(t=Math.min(t,d.getMinutes())),t===d.getMinutes()&&(r=Math.min(r,d.getSeconds()))}if(i){var f=n.config.minTime===void 0?n.config.minDate:n.config.minTime;e=Math.max(e,f.getHours()),e===f.getHours()&&t<f.getMinutes()&&(t=f.getMinutes()),t===f.getMinutes()&&(r=Math.max(r,f.getSeconds()))}}p(e,t,r)}}function f(e){var t=e||n.latestSelectedDateObj;t&&t instanceof Date&&p(t.getHours(),t.getMinutes(),t.getSeconds())}function p(e,t,r){n.latestSelectedDateObj!==void 0&&n.latestSelectedDateObj.setHours(e%24,t,r||0,0),!(!n.hourElement||!n.minuteElement||n.isMobile)&&(n.hourElement.value=Vv(n.config.time_24hr?e:(12+e)%12+12*Hv(e%12==0)),n.minuteElement.value=Vv(t),n.amPM!==void 0&&(n.amPM.textContent=n.l10n.amPM[Hv(e>=12)]),n.secondElement!==void 0&&(n.secondElement.value=Vv(r)))}function m(e){var t=Yv(e),n=parseInt(t.value)+(e.delta||0);(n/1e3>1||e.key===`Enter`&&!/[^\d]/.test(n.toString()))&&ae(n)}function h(e,t,r,i){if(t instanceof Array)return t.forEach(function(t){return h(e,t,r,i)});if(e instanceof Array)return e.forEach(function(e){return h(e,t,r,i)});e.addEventListener(t,r,i),n._handlers.push({remove:function(){return e.removeEventListener(t,r,i)}})}function g(){V(`onChange`)}function _(){if(n.config.wrap&&[`open`,`close`,`toggle`,`clear`].forEach(function(e){Array.prototype.forEach.call(n.element.querySelectorAll(`[data-`+e+`]`),function(t){return h(t,`click`,n[e])})}),n.isMobile){Oe();return}var e=Uv(le,50);n._debouncedChange=Uv(g,dy),n.daysContainer&&!/iPhone|iPad|iPod/i.test(navigator.userAgent)&&h(n.daysContainer,`mouseover`,function(e){n.config.mode===`range`&&z(Yv(e))}),h(n._input,`keydown`,ce),n.calendarContainer!==void 0&&h(n.calendarContainer,`keydown`,ce),!n.config.inline&&!n.config.static&&h(window,`resize`,e),window.ontouchstart===void 0?h(window.document,`mousedown`,ie):h(window.document,`touchstart`,ie),h(window.document,`focus`,ie,{capture:!0}),n.config.clickOpens===!0&&(h(n._input,`focus`,n.open),h(n._input,`click`,n.open)),n.daysContainer!==void 0&&(h(n.monthNav,`click`,Ie),h(n.monthNav,[`keyup`,`increment`],m),h(n.daysContainer,`click`,ye)),n.timeContainer!==void 0&&n.minuteElement!==void 0&&n.hourElement!==void 0&&(h(n.timeContainer,[`increment`],c),h(n.timeContainer,`blur`,c,{capture:!0}),h(n.timeContainer,`click`,y),h([n.hourElement,n.minuteElement],[`focus`,`click`],function(e){return Yv(e).select()}),n.secondElement!==void 0&&h(n.secondElement,`focus`,function(){return n.secondElement&&n.secondElement.select()}),n.amPM!==void 0&&h(n.amPM,`click`,function(e){c(e)})),n.config.allowInput&&h(n._input,`blur`,R)}function v(e,t){var r=e===void 0?n.latestSelectedDateObj||(n.config.minDate&&n.config.minDate>n.now?n.config.minDate:n.config.maxDate&&n.config.maxDate<n.now?n.config.maxDate:n.now):n.parseDate(e),i=n.currentYear,a=n.currentMonth;try{r!==void 0&&(n.currentYear=r.getFullYear(),n.currentMonth=r.getMonth())}catch(e){e.message=`Invalid date supplied: `+r,n.config.errorHandler(e)}t&&n.currentYear!==i&&(V(`onYearChange`),k()),t&&(n.currentYear!==i||n.currentMonth!==a)&&V(`onMonthChange`),n.redraw()}function y(e){var t=Yv(e);~t.className.indexOf(`arrow`)&&b(e,t.classList.contains(`arrowUp`)?1:-1)}function b(e,t,n){var r=e&&Yv(e),i=n||r&&r.parentNode&&r.parentNode.firstChild,a=Ae(`increment`);a.delta=t,i&&i.dispatchEvent(a)}function x(){var e=window.document.createDocumentFragment();if(n.calendarContainer=$(`div`,`flatpickr-calendar`),n.calendarContainer.tabIndex=-1,!n.config.noCalendar){if(e.appendChild(M()),n.innerContainer=$(`div`,`flatpickr-innerContainer`),n.config.weekNumbers){var t=I(),r=t.weekWrapper,i=t.weekNumbers;n.innerContainer.appendChild(r),n.weekNumbers=i,n.weekWrapper=r}n.rContainer=$(`div`,`flatpickr-rContainer`),n.rContainer.appendChild(P()),n.daysContainer||(n.daysContainer=$(`div`,`flatpickr-days`),n.daysContainer.tabIndex=-1),O(),n.rContainer.appendChild(n.daysContainer),n.innerContainer.appendChild(n.rContainer),e.appendChild(n.innerContainer)}n.config.enableTime&&e.appendChild(N()),Gv(n.calendarContainer,`rangeMode`,n.config.mode===`range`),Gv(n.calendarContainer,`animate`,n.config.animate===!0),Gv(n.calendarContainer,`multiMonth`,n.config.showMonths>1),n.calendarContainer.appendChild(e);var a=n.config.appendTo!==void 0&&n.config.appendTo.nodeType!==void 0;if((n.config.inline||n.config.static)&&(n.calendarContainer.classList.add(n.config.inline?`inline`:`static`),n.config.inline&&(!a&&n.element.parentNode?n.element.parentNode.insertBefore(n.calendarContainer,n._input.nextSibling):n.config.appendTo!==void 0&&n.config.appendTo.appendChild(n.calendarContainer)),n.config.static)){var o=$(`div`,`flatpickr-wrapper`);n.element.parentNode&&n.element.parentNode.insertBefore(o,n.element),o.appendChild(n.element),n.altInput&&o.appendChild(n.altInput),o.appendChild(n.calendarContainer)}!n.config.static&&!n.config.inline&&(n.config.appendTo===void 0?window.document.body:n.config.appendTo).appendChild(n.calendarContainer)}function S(e,t,r,i){var a=oe(t,!0),o=$(`span`,e,t.getDate().toString());return o.dateObj=t,o.$i=i,o.setAttribute(`aria-label`,n.formatDate(t,n.config.ariaDateFormat)),e.indexOf(`hidden`)===-1&&ry(t,n.now)===0&&(n.todayDateElem=o,o.classList.add(`today`),o.setAttribute(`aria-current`,`date`)),a?(o.tabIndex=-1,je(t)&&(o.classList.add(`selected`),n.selectedDateElem=o,n.config.mode===`range`&&(Gv(o,`startRange`,n.selectedDates[0]&&ry(t,n.selectedDates[0],!0)===0),Gv(o,`endRange`,n.selectedDates[1]&&ry(t,n.selectedDates[1],!0)===0),e===`nextMonthDay`&&o.classList.add(`inRange`)))):o.classList.add(`flatpickr-disabled`),n.config.mode===`range`&&Me(t)&&!je(t)&&o.classList.add(`inRange`),n.weekNumbers&&n.config.showMonths===1&&e!==`prevMonthDay`&&i%7==6&&n.weekNumbers.insertAdjacentHTML(`beforeend`,`<span class='flatpickr-day'>`+n.config.getWeek(t)+`</span>`),V(`onDayCreate`,o),o}function C(e){e.focus(),n.config.mode===`range`&&z(e)}function w(e){for(var t=e>0?0:n.config.showMonths-1,r=e>0?n.config.showMonths:-1,i=t;i!=r;i+=e)for(var a=n.daysContainer.children[i],o=e>0?0:a.children.length-1,s=e>0?a.children.length:-1,c=o;c!=s;c+=e){var l=a.children[c];if(l.className.indexOf(`hidden`)===-1&&oe(l.dateObj))return l}}function T(e,t){for(var r=e.className.indexOf(`Month`)===-1?e.dateObj.getMonth():n.currentMonth,i=t>0?n.config.showMonths:-1,a=t>0?1:-1,o=r-n.currentMonth;o!=i;o+=a)for(var s=n.daysContainer.children[o],c=r-n.currentMonth===o?e.$i+t:t<0?s.children.length-1:0,l=s.children.length,u=c;u>=0&&u<l&&u!=(t>0?l:-1);u+=a){var d=s.children[u];if(d.className.indexOf(`hidden`)===-1&&oe(d.dateObj)&&Math.abs(e.$i-u)>=Math.abs(t))return C(d)}n.changeMonth(a),E(w(a),0)}function E(e,t){var r=a(),i=se(r||document.body),o=e===void 0?i?r:n.selectedDateElem!==void 0&&se(n.selectedDateElem)?n.selectedDateElem:n.todayDateElem!==void 0&&se(n.todayDateElem)?n.todayDateElem:w(t>0?1:-1):e;o===void 0?n._input.focus():i?T(o,t):C(o)}function D(e,t){for(var r=(new Date(e,t,1).getDay()-n.l10n.firstDayOfWeek+7)%7,i=n.utils.getDaysInMonth((t-1+12)%12,e),a=n.utils.getDaysInMonth(t,e),o=window.document.createDocumentFragment(),s=n.config.showMonths>1,c=s?`prevMonthDay hidden`:`prevMonthDay`,l=s?`nextMonthDay hidden`:`nextMonthDay`,u=i+1-r,d=0;u<=i;u++,d++)o.appendChild(S(`flatpickr-day `+c,new Date(e,t-1,u),u,d));for(u=1;u<=a;u++,d++)o.appendChild(S(`flatpickr-day`,new Date(e,t,u),u,d));for(var f=a+1;f<=42-r&&(n.config.showMonths===1||d%7!=0);f++,d++)o.appendChild(S(`flatpickr-day `+l,new Date(e,t+1,f%a),f,d));var p=$(`div`,`dayContainer`);return p.appendChild(o),p}function O(){if(n.daysContainer!==void 0){Kv(n.daysContainer),n.weekNumbers&&Kv(n.weekNumbers);for(var e=document.createDocumentFragment(),t=0;t<n.config.showMonths;t++){var r=new Date(n.currentYear,n.currentMonth,1);r.setMonth(n.currentMonth+t),e.appendChild(D(r.getFullYear(),r.getMonth()))}n.daysContainer.appendChild(e),n.days=n.daysContainer.firstChild,n.config.mode===`range`&&n.selectedDates.length===1&&z()}}function k(){if(!(n.config.showMonths>1||n.config.monthSelectorType!==`dropdown`)){var e=function(e){return n.config.minDate!==void 0&&n.currentYear===n.config.minDate.getFullYear()&&e<n.config.minDate.getMonth()?!1:!(n.config.maxDate!==void 0&&n.currentYear===n.config.maxDate.getFullYear()&&e>n.config.maxDate.getMonth())};n.monthsDropdownContainer.tabIndex=-1,n.monthsDropdownContainer.innerHTML=``;for(var t=0;t<12;t++)if(e(t)){var r=$(`option`,`flatpickr-monthDropdown-month`);r.value=new Date(n.currentYear,t).getMonth().toString(),r.textContent=Zv(t,n.config.shorthandCurrentMonth,n.l10n),r.tabIndex=-1,n.currentMonth===t&&(r.selected=!0),n.monthsDropdownContainer.appendChild(r)}}}function A(){var e=$(`div`,`flatpickr-month`),t=window.document.createDocumentFragment(),r;n.config.showMonths>1||n.config.monthSelectorType===`static`?r=$(`span`,`cur-month`):(n.monthsDropdownContainer=$(`select`,`flatpickr-monthDropdown-months`),n.monthsDropdownContainer.setAttribute(`aria-label`,n.l10n.monthAriaLabel),h(n.monthsDropdownContainer,`change`,function(e){var t=Yv(e),r=parseInt(t.value,10);n.changeMonth(r-n.currentMonth),V(`onMonthChange`)}),k(),r=n.monthsDropdownContainer);var i=Jv(`cur-year`,{tabindex:`-1`}),a=i.getElementsByTagName(`input`)[0];a.setAttribute(`aria-label`,n.l10n.yearAriaLabel),n.config.minDate&&a.setAttribute(`min`,n.config.minDate.getFullYear().toString()),n.config.maxDate&&(a.setAttribute(`max`,n.config.maxDate.getFullYear().toString()),a.disabled=!!n.config.minDate&&n.config.minDate.getFullYear()===n.config.maxDate.getFullYear());var o=$(`div`,`flatpickr-current-month`);return o.appendChild(r),o.appendChild(i),t.appendChild(o),e.appendChild(t),{container:e,yearElement:a,monthElement:r}}function j(){Kv(n.monthNav),n.monthNav.appendChild(n.prevMonthNav),n.config.showMonths&&(n.yearElements=[],n.monthElements=[]);for(var e=n.config.showMonths;e--;){var t=A();n.yearElements.push(t.yearElement),n.monthElements.push(t.monthElement),n.monthNav.appendChild(t.container)}n.monthNav.appendChild(n.nextMonthNav)}function M(){return n.monthNav=$(`div`,`flatpickr-months`),n.yearElements=[],n.monthElements=[],n.prevMonthNav=$(`span`,`flatpickr-prev-month`),n.prevMonthNav.innerHTML=n.config.prevArrow,n.nextMonthNav=$(`span`,`flatpickr-next-month`),n.nextMonthNav.innerHTML=n.config.nextArrow,j(),Object.defineProperty(n,"_hidePrevMonthArrow",{get:function(){return n.__hidePrevMonthArrow},set:function(e){n.__hidePrevMonthArrow!==e&&(Gv(n.prevMonthNav,`flatpickr-disabled`,e),n.__hidePrevMonthArrow=e)}}),Object.defineProperty(n,"_hideNextMonthArrow",{get:function(){return n.__hideNextMonthArrow},set:function(e){n.__hideNextMonthArrow!==e&&(Gv(n.nextMonthNav,`flatpickr-disabled`,e),n.__hideNextMonthArrow=e)}}),n.currentYearElement=n.yearElements[0],Ne(),n.monthNav}function N(){n.calendarContainer.classList.add(`hasTime`),n.config.noCalendar&&n.calendarContainer.classList.add(`noCalendar`);var e=cy(n.config);n.timeContainer=$(`div`,`flatpickr-time`),n.timeContainer.tabIndex=-1;var t=$(`span`,`flatpickr-time-separator`,`:`),r=Jv(`flatpickr-hour`,{"aria-label":n.l10n.hourAriaLabel});n.hourElement=r.getElementsByTagName(`input`)[0];var i=Jv(`flatpickr-minute`,{"aria-label":n.l10n.minuteAriaLabel});if(n.minuteElement=i.getElementsByTagName(`input`)[0],n.hourElement.tabIndex=n.minuteElement.tabIndex=-1,n.hourElement.value=Vv(n.latestSelectedDateObj?n.latestSelectedDateObj.getHours():n.config.time_24hr?e.hours:u(e.hours)),n.minuteElement.value=Vv(n.latestSelectedDateObj?n.latestSelectedDateObj.getMinutes():e.minutes),n.hourElement.setAttribute(`step`,n.config.hourIncrement.toString()),n.minuteElement.setAttribute(`step`,n.config.minuteIncrement.toString()),n.hourElement.setAttribute(`min`,n.config.time_24hr?`0`:`1`),n.hourElement.setAttribute(`max`,n.config.time_24hr?`23`:`12`),n.hourElement.setAttribute(`maxlength`,`2`),n.minuteElement.setAttribute(`min`,`0`),n.minuteElement.setAttribute(`max`,`59`),n.minuteElement.setAttribute(`maxlength`,`2`),n.timeContainer.appendChild(r),n.timeContainer.appendChild(t),n.timeContainer.appendChild(i),n.config.time_24hr&&n.timeContainer.classList.add(`time24hr`),n.config.enableSeconds){n.timeContainer.classList.add(`hasSeconds`);var a=Jv(`flatpickr-second`);n.secondElement=a.getElementsByTagName(`input`)[0],n.secondElement.value=Vv(n.latestSelectedDateObj?n.latestSelectedDateObj.getSeconds():e.seconds),n.secondElement.setAttribute(`step`,n.minuteElement.getAttribute(`step`)),n.secondElement.setAttribute(`min`,`0`),n.secondElement.setAttribute(`max`,`59`),n.secondElement.setAttribute(`maxlength`,`2`),n.timeContainer.appendChild($(`span`,`flatpickr-time-separator`,`:`)),n.timeContainer.appendChild(a)}return n.config.time_24hr||(n.amPM=$(`span`,`flatpickr-am-pm`,n.l10n.amPM[Hv((n.latestSelectedDateObj?n.hourElement.value:n.config.defaultHour)>11)]),n.amPM.title=n.l10n.toggleTitle,n.amPM.tabIndex=-1,n.timeContainer.appendChild(n.amPM)),n.timeContainer}function P(){n.weekdayContainer?Kv(n.weekdayContainer):n.weekdayContainer=$(`div`,`flatpickr-weekdays`);for(var e=n.config.showMonths;e--;){var t=$(`div`,`flatpickr-weekdaycontainer`);n.weekdayContainer.appendChild(t)}return F(),n.weekdayContainer}function F(){if(n.weekdayContainer){var e=n.l10n.firstDayOfWeek,t=uy(n.l10n.weekdays.shorthand);e>0&&e<t.length&&(t=uy(t.splice(e,t.length),t.splice(0,e)));for(var r=n.config.showMonths;r--;)n.weekdayContainer.children[r].innerHTML=`
|
|
66
|
+
`.trim(),e.head.prepend(t)},[m]),(0,f.useEffect)(()=>{let e=v.current;return()=>{p||cm(e.target??void 0);for(let t of e.disposables)t();e.disposables=[]}},[p]),{isPressed:l||g,pressProps:Lu(h,A,{[wm]:!0})}}function Em(e){return e.tagName===`A`&&e.hasAttribute(`href`)}function Dm(e,t){let{key:n,code:r}=e,i=t,a=i.getAttribute(`role`);return(n===`Enter`||n===` `||n===`Spacebar`||r===`Space`)&&!(i instanceof Xu(i).HTMLInputElement&&!Rm(i,n)||i instanceof Xu(i).HTMLTextAreaElement||i.isContentEditable)&&!((a===`link`||!a&&Em(i))&&n!==`Enter`)}function Om(e){let{targetTouches:t}=e;return t.length>0?t[0]:null}function km(e,t){let n=e.changedTouches;for(let e=0;e<n.length;e++){let r=n[e];if(r.identifier===t)return r}return null}function Am(e,t){let n=0,r=0;return t.targetTouches&&t.targetTouches.length===1&&(n=t.targetTouches[0].clientX,r=t.targetTouches[0].clientY),{currentTarget:e,shiftKey:t.shiftKey,ctrlKey:t.ctrlKey,metaKey:t.metaKey,altKey:t.altKey,clientX:n,clientY:r}}function jm(e,t){let n=t.clientX,r=t.clientY;return{currentTarget:e,shiftKey:t.shiftKey,ctrlKey:t.ctrlKey,metaKey:t.metaKey,altKey:t.altKey,clientX:n,clientY:r,key:t.key}}function Mm(e){let t=0,n=0;return e.width===void 0?e.radiusX!==void 0&&(t=e.radiusX):t=e.width/2,e.height===void 0?e.radiusY!==void 0&&(n=e.radiusY):n=e.height/2,{top:e.clientY-n,right:e.clientX+t,bottom:e.clientY+n,left:e.clientX-t}}function Nm(e,t){return!(e.left>t.right||t.left>e.right||e.top>t.bottom||t.top>e.bottom)}function Pm(e,t){return Nm(t.getBoundingClientRect(),Mm(e))}function Fm(e){return e instanceof HTMLInputElement?!1:e instanceof HTMLButtonElement?e.type!==`submit`&&e.type!==`reset`:!Em(e)}function Im(e,t){return e instanceof HTMLInputElement?!Rm(e,t):Fm(e)}var Lm=new Set([`checkbox`,`radio`,`range`,`color`,`file`,`image`,`button`,`submit`,`reset`]);function Rm(e,t){return e.type===`checkbox`||e.type===`radio`?t===` `:Lm.has(e.type)}function zm(e){let{isDisabled:t,onBlurWithin:n,onFocusWithin:r,onFocusWithinChange:i}=e,a=(0,f.useRef)({isFocusWithin:!1}),{addGlobalListener:o,removeAllGlobalListeners:s}=pm(),c=(0,f.useCallback)(e=>{X(e.currentTarget,Z(e))&&a.current.isFocusWithin&&!X(e.currentTarget,e.relatedTarget)&&(a.current.isFocusWithin=!1,s(),n&&n(e),i&&i(!1))},[n,i,a,s]),l=wd(c),u=(0,f.useCallback)(e=>{if(!X(e.currentTarget,Z(e)))return;let t=Z(e),n=Y(t),s=td(n);if(!a.current.isFocusWithin&&s===t){r&&r(e),i&&i(!0),a.current.isFocusWithin=!0,l(e);let t=e.currentTarget;o(n,`focus`,e=>{let r=Z(e);if(a.current.isFocusWithin&&!X(t,r)){let e=new n.defaultView.FocusEvent(`blur`,{relatedTarget:r});Cd(e,t),c(Sd(e))}},{capture:!0})}},[r,i,l,o,c]);return t?{focusWithinProps:{onFocus:void 0,onBlur:void 0}}:{focusWithinProps:{onFocus:u,onBlur:c}}}function Bm(e={}){let{autoFocus:t=!1,isTextInput:n,within:r}=e,i=(0,f.useRef)({isFocused:!1,isFocusVisible:t||ff()}),[a,o]=(0,f.useState)(!1),[s,c]=(0,f.useState)(()=>i.current.isFocused&&i.current.isFocusVisible),l=(0,f.useCallback)(()=>c(i.current.isFocused&&i.current.isFocusVisible),[]),u=(0,f.useCallback)(e=>{i.current.isFocused=e,i.current.isFocusVisible=ff(),o(e),l()},[l]);_f(e=>{i.current.isFocusVisible=e,l()},[n,a],{enabled:a,isTextInput:n});let{focusProps:d}=_p({isDisabled:r,onFocusChange:u}),{focusWithinProps:p}=zm({isDisabled:!r,onFocusWithinChange:u});return{isFocused:a,isFocusVisible:s,focusProps:r?p:d}}var Vm=!1,Hm=0;function Um(){Vm=!0,setTimeout(()=>{Vm=!1},500)}function Wm(e){e.pointerType===`touch`&&Um()}function Gm(){let e=Y(null);if(e!==void 0)return Hm===0&&(typeof PointerEvent<`u`?e.addEventListener(`pointerup`,Wm):process.env.NODE_ENV===`test`&&e.addEventListener(`touchend`,Um)),Hm++,()=>{Hm--,!(Hm>0)&&(typeof PointerEvent<`u`?e.removeEventListener(`pointerup`,Wm):process.env.NODE_ENV===`test`&&e.removeEventListener(`touchend`,Um))}}function Km(e){let{onHoverStart:t,onHoverChange:n,onHoverEnd:r,isDisabled:i}=e,[a,o]=(0,f.useState)(!1),s=(0,f.useRef)({isHovered:!1,ignoreEmulatedMouseEvents:!1,pointerType:``,target:null}).current;(0,f.useEffect)(Gm,[]);let{addGlobalListener:c,removeAllGlobalListeners:l}=pm(),{hoverProps:u,triggerHoverEnd:d}=(0,f.useMemo)(()=>{let e=(e,r)=>{if(s.pointerType=r,i||r===`touch`||s.isHovered||!X(e.currentTarget,Z(e)))return;s.isHovered=!0;let l=e.currentTarget;s.target=l,c(Y(Z(e)),`pointerover`,e=>{s.isHovered&&s.target&&!X(s.target,Z(e))&&a(e,e.pointerType)},{capture:!0}),t&&t({type:`hoverstart`,target:l,pointerType:r}),n&&n(!0),o(!0)},a=(e,t)=>{let i=s.target;s.pointerType=``,s.target=null,!(t===`touch`||!s.isHovered||!i)&&(s.isHovered=!1,l(),r&&r({type:`hoverend`,target:i,pointerType:t}),n&&n(!1),o(!1))},u={};return typeof PointerEvent<`u`?(u.onPointerEnter=t=>{Vm&&t.pointerType===`mouse`||e(t,t.pointerType)},u.onPointerLeave=e=>{!i&&X(e.currentTarget,Z(e))&&a(e,e.pointerType)}):process.env.NODE_ENV===`test`&&(u.onTouchStart=()=>{s.ignoreEmulatedMouseEvents=!0},u.onMouseEnter=t=>{!s.ignoreEmulatedMouseEvents&&!Vm&&e(t,`mouse`),s.ignoreEmulatedMouseEvents=!1},u.onMouseLeave=e=>{!i&&X(e.currentTarget,Z(e))&&a(e,`mouse`)}),{hoverProps:u,triggerHoverEnd:a}},[t,n,r,i,s,c,l]);return(0,f.useEffect)(()=>{i&&d({currentTarget:s.target},s.pointerType)},[i]),{hoverProps:u,isHovered:a}}function qm(e){let{id:t,label:n,"aria-labelledby":r,"aria-label":i,labelElementType:a=`label`}=e;t=Au(t);let o=Au(),s={};n?(r=r?`${o} ${r}`:o,s={id:o,htmlFor:a===`label`?t:void 0}):!r&&!i&&process.env.NODE_ENV!==`production`&&console.warn(`If you do not provide a visible label, you must specify an aria-label or aria-labelledby attribute for accessibility`);let c=Sf({id:t,"aria-label":i,"aria-labelledby":r});return{labelProps:s,fieldProps:c}}var Jm=new Map,Ym=!1;try{Ym=new Intl.NumberFormat(`de-DE`,{signDisplay:`exceptZero`}).resolvedOptions().signDisplay===`exceptZero`}catch{}var Xm=!1;try{Xm=new Intl.NumberFormat(`de-DE`,{style:`unit`,unit:`degree`}).resolvedOptions().style===`unit`}catch{}var Zm={degree:{narrow:{default:`°`,"ja-JP":` 度`,"zh-TW":`度`,"sl-SI":` °`}}},Qm=class{constructor(e,t={}){this.numberFormatter=$m(e,t),this.options=t}format(e){let t=``;if(t=!Ym&&this.options.signDisplay!=null?eh(this.numberFormatter,this.options.signDisplay,e):this.numberFormatter.format(e),this.options.style===`unit`&&!Xm){let{unit:e,unitDisplay:n=`short`,locale:r}=this.resolvedOptions();if(!e)return t;let i=Zm[e]?.[n];t+=i[r]||i.default}return t}formatToParts(e){return this.numberFormatter.formatToParts(e)}formatRange(e,t){if(typeof this.numberFormatter.formatRange==`function`)return this.numberFormatter.formatRange(e,t);if(t<e)throw RangeError(`End date must be >= start date`);return`${this.format(e)} \u{2013} ${this.format(t)}`}formatRangeToParts(e,t){if(typeof this.numberFormatter.formatRangeToParts==`function`)return this.numberFormatter.formatRangeToParts(e,t);if(t<e)throw RangeError(`End date must be >= start date`);let n=this.numberFormatter.formatToParts(e),r=this.numberFormatter.formatToParts(t);return[...n.map(e=>({...e,source:`startRange`})),{type:`literal`,value:` – `,source:`shared`},...r.map(e=>({...e,source:`endRange`}))]}resolvedOptions(){let e=this.numberFormatter.resolvedOptions();return!Ym&&this.options.signDisplay!=null&&(e={...e,signDisplay:this.options.signDisplay}),!Xm&&this.options.style===`unit`&&(e={...e,style:`unit`,unit:this.options.unit,unitDisplay:this.options.unitDisplay}),e}};function $m(e,t={}){let{numberingSystem:n}=t;if(n&&e.includes(`-nu-`)&&(e.includes(`-u-`)||(e+=`-u-`),e+=`-nu-${n}`),t.style===`unit`&&!Xm){let{unit:e,unitDisplay:n=`short`}=t;if(!e)throw Error(`unit option must be provided with style: "unit"`);if(!Zm[e]?.[n])throw Error(`Unsupported unit ${e} with unitDisplay = ${n}`);t={...t,style:`decimal`}}let r=e+(t?Object.entries(t).sort((e,t)=>e[0]<t[0]?-1:1).join():``);if(Jm.has(r))return Jm.get(r);let i=new Intl.NumberFormat(e,t);return Jm.set(r,i),i}function eh(e,t,n){if(t===`auto`)return e.format(n);if(t===`never`)return e.format(Math.abs(n));{let r=!1;if(t===`always`?r=n>0||Object.is(n,0):t===`exceptZero`&&(Object.is(n,-0)||Object.is(n,0)?n=Math.abs(n):r=n>0),r){let t=e.format(-n),r=e.format(n),i=t.replace(r,``).replace(/\u200e|\u061C/,``);return[...i].length!==1&&console.warn(`@react-aria/i18n polyfill for NumberFormat signDisplay: Unsupported case`),t.replace(r,`!!!`).replace(i,`+`).replace(`!!!`,r)}else return e.format(n)}}function th(e={}){let{locale:t}=Nf();return(0,f.useMemo)(()=>new Qm(t,e),[t,e])}function nh(e,t=-1/0,n=1/0){return Math.min(Math.max(e,t),n)}function rh(e,t){let n=e,r=0,i=t.toString(),a=i.toLowerCase().indexOf(`e-`);if(a>0)r=Math.abs(Math.floor(Math.log10(Math.abs(t))))+a;else{let e=i.indexOf(`.`);e>=0&&(r=i.length-e)}if(r>0){let e=10**r;n=Math.round(n*e)/e}return n}function ih(e,t,n,r){t=Number(t),n=Number(n);let i=(e-(isNaN(t)?0:t))%r,a=rh(Math.abs(i)*2>=r?e+Math.sign(i)*(r-Math.abs(i)):e-i,r);return isNaN(t)?!isNaN(n)&&a>n&&(a=Math.floor(rh(n/r,r))*r):a<t?a=t:!isNaN(n)&&a>n&&(a=t+Math.floor(rh((n-t)/r,r))*r),a=rh(a,r),a}var ah=(0,f.createContext)({});function oh(e,t){if(!e)return!1;let n=window.getComputedStyle(e),r=document.scrollingElement||document.documentElement,i=/(auto|scroll)/.test(n.overflow+n.overflowX+n.overflowY);return e===r&&n.overflow!==`hidden`&&(i=!0),i&&t&&(i=e.scrollHeight!==e.clientHeight||e.scrollWidth!==e.clientWidth),i}function sh(e,t){let n=[],r=document.scrollingElement||document.documentElement;for(;e&&(oh(e,t)&&n.push(e),e!==r);)e=e.parentElement;return n}function ch(e,t,n={}){let{block:r=`nearest`,inline:i=`nearest`}=n;if(e===t)return;let a=e.scrollTop,o=e.scrollLeft,s=t.getBoundingClientRect(),c=e.getBoundingClientRect(),l=window.getComputedStyle(t),u=window.getComputedStyle(e),d=document.scrollingElement||document.documentElement,f=e===d,p=e===d?0:c.top,m=e===d?e.clientHeight:c.bottom,h=e===d?0:c.left,g=e===d?e.clientWidth:c.right,_=parseFloat(l.scrollMarginTop)||0,v=parseFloat(l.scrollMarginBottom)||0,y=parseFloat(l.scrollMarginLeft)||0,b=parseFloat(l.scrollMarginRight)||0,x=parseFloat(u.scrollPaddingTop)||0,S=parseFloat(u.scrollPaddingBottom)||0,C=parseFloat(u.scrollPaddingLeft)||0,w=parseFloat(u.scrollPaddingRight)||0,T=parseFloat(u.borderTopWidth)||0,E=parseFloat(u.borderBottomWidth)||0,D=parseFloat(u.borderLeftWidth)||0,O=parseFloat(u.borderRightWidth)||0,k=s.top-_,A=s.bottom+v,j=s.left-y,M=s.right+b,N=e===d?0:D+O,P=e===d?0:T+E,F=e===d?0:e.offsetWidth-e.clientWidth-N,I=e===d?0:e.offsetHeight-e.clientHeight-P,L=p+(f?0:T)+x,ee=m-(f?0:E)-S-I,te=h+(f?0:D)+C,ne=g-(f?0:O)-w;u.direction===`rtl`&&!Nd()?te+=F:ne-=F;let re=k<L||A>ee,ie=j<te||M>ne;if(re&&r===`start`)a+=k-L;else if(re&&r===`center`)a+=(k+A)/2-(L+ee)/2;else if(re&&r===`end`)a+=A-ee;else if(re&&r===`nearest`){let e=k-L,t=A-ee;a+=Math.abs(e)<=Math.abs(t)?e:t}if(ie&&i===`start`)o+=j-te;else if(ie&&i===`center`)o+=(j+M)/2-(te+ne)/2;else if(ie&&i===`end`)o+=M-ne;else if(ie&&i===`nearest`){let e=j-te,t=M-ne;o+=Math.abs(e)<=Math.abs(t)?e:t}if(process.env.NODE_ENV===`test`){e.scrollLeft=o,e.scrollTop=a;return}e.scrollTo({left:o,top:a})}function lh(e,t={}){let{containingElement:n}=t;if(e&&e.isConnected){let t=document.scrollingElement||document.documentElement;if(window.getComputedStyle(t).overflow!==`hidden`){let{left:t,top:r}=e.getBoundingClientRect();e?.scrollIntoView?.({block:`nearest`});let{left:i,top:a}=e.getBoundingClientRect();(Math.abs(t-i)>1||Math.abs(r-a)>1)&&(n?.scrollIntoView?.({block:`center`,inline:`center`}),e.scrollIntoView?.({block:`nearest`}))}else{let{left:t,top:r}=e.getBoundingClientRect(),i=sh(e,!0);for(let t of i)ch(t,e);let{left:a,top:o}=e.getBoundingClientRect();if(Math.abs(t-a)>1||Math.abs(r-o)>1){i=n?sh(n,!0):[];for(let e of i)ch(e,n,{block:`center`,inline:`center`});for(let t of sh(e,!0))ch(t,e)}}}}var uh=0,dh=new Map;function fh(e){let[t,n]=(0,f.useState)();return fu(()=>{if(!e)return;let t=dh.get(e);if(t)n(t.element.id);else{let r=`react-aria-description-${uh++}`;n(r);let i=document.createElement(`div`);i.id=r,i.style.display=`none`,i.textContent=e,document.body.appendChild(i),t={refCount:0,element:i},dh.set(e,t)}return t.refCount++,()=>{t&&--t.refCount===0&&(t.element.remove(),dh.delete(e))}},[e]),{"aria-describedby":e?t:void 0}}var ph={border:0,clip:`rect(0 0 0 0)`,clipPath:`inset(50%)`,height:`1px`,margin:`-1px`,overflow:`hidden`,padding:0,position:`absolute`,width:`1px`,whiteSpace:`nowrap`};function mh(e={}){let{style:t,isFocusable:n}=e,[r,i]=(0,f.useState)(!1),{focusWithinProps:a}=zm({isDisabled:!n,onFocusWithinChange:e=>i(e)}),o=(0,f.useMemo)(()=>r?t:t?{...ph,...t}:ph,[r]);return{visuallyHiddenProps:{...a,style:o}}}function hh(e){let{children:t,elementType:n=`div`,isFocusable:r,style:i,...a}=e,{visuallyHiddenProps:o}=mh(e);return f.default.createElement(n,Lu(a,o),t)}function gh(e,t,n){let r=bf(e=>{n&&!e.defaultPrevented&&n(t)});(0,f.useEffect)(()=>{let t=e?.current?.form;return t?.addEventListener(`reset`,r),()=>{t?.removeEventListener(`reset`,r)}},[e])}function _h(e){let{onMoveStart:t,onMove:n,onMoveEnd:r}=e,i=(0,f.useRef)({didMove:!1,lastPosition:null,id:null}),{addGlobalListener:a,removeGlobalListener:o}=pm(),s=bf((0,f.useCallback)((e,r,a,o)=>{a===0&&o===0||(i.current.didMove||(i.current.didMove=!0,t?.({type:`movestart`,pointerType:r,shiftKey:e.shiftKey,metaKey:e.metaKey,ctrlKey:e.ctrlKey,altKey:e.altKey})),n?.({type:`move`,pointerType:r,deltaX:a,deltaY:o,shiftKey:e.shiftKey,metaKey:e.metaKey,ctrlKey:e.ctrlKey,altKey:e.altKey}))},[t,n,i])),c=bf((0,f.useCallback)((e,t)=>{cm(),i.current.didMove&&r?.({type:`moveend`,pointerType:t,shiftKey:e.shiftKey,metaKey:e.metaKey,ctrlKey:e.ctrlKey,altKey:e.altKey})},[r,i]));return{moveProps:(0,f.useMemo)(()=>{let e={},t=()=>{sm(),i.current.didMove=!1};if(typeof PointerEvent>`u`&&process.env.NODE_ENV===`test`){let n=e=>{e.button===0&&(s(e,`mouse`,e.pageX-(i.current.lastPosition?.pageX??0),e.pageY-(i.current.lastPosition?.pageY??0)),i.current.lastPosition={pageX:e.pageX,pageY:e.pageY})},r=e=>{if(e.button===0){c(e,`mouse`);let t=Xu(Z(e));o(t,`mousemove`,n,!1),o(t,`mouseup`,r,!1)}};e.onMouseDown=e=>{if(e.button===0){t(),e.stopPropagation(),e.preventDefault(),i.current.lastPosition={pageX:e.pageX,pageY:e.pageY};let o=Xu(Z(e));a(o,`mousemove`,n,!1),a(o,`mouseup`,r,!1)}};let l=e=>{let t=[...e.changedTouches].findIndex(({identifier:e})=>e===i.current.id);if(t>=0){let{pageX:n,pageY:r}=e.changedTouches[t];s(e,`touch`,n-(i.current.lastPosition?.pageX??0),r-(i.current.lastPosition?.pageY??0)),i.current.lastPosition={pageX:n,pageY:r}}},u=e=>{if([...e.changedTouches].findIndex(({identifier:e})=>e===i.current.id)>=0){c(e,`touch`),i.current.id=null;let t=Xu(Z(e));o(t,`touchmove`,l),o(t,`touchend`,u),o(t,`touchcancel`,u)}};e.onTouchStart=e=>{if(e.changedTouches.length===0||i.current.id!=null)return;let{pageX:n,pageY:r,identifier:o}=e.changedTouches[0];t(),e.stopPropagation(),e.preventDefault(),i.current.lastPosition={pageX:n,pageY:r},i.current.id=o;let s=Xu(Z(e));a(s,`touchmove`,l,!1),a(s,`touchend`,u,!1),a(s,`touchcancel`,u,!1)}}else{let n=e=>{e.pointerId===i.current.id&&(s(e,e.pointerType||`mouse`,e.pageX-(i.current.lastPosition?.pageX??0),e.pageY-(i.current.lastPosition?.pageY??0)),i.current.lastPosition={pageX:e.pageX,pageY:e.pageY})},r=e=>{if(e.pointerId===i.current.id){c(e,e.pointerType||`mouse`),i.current.id=null;let t=Xu(Z(e));o(t,`pointermove`,n,!1),o(t,`pointerup`,r,!1),o(t,`pointercancel`,r,!1)}};e.onPointerDown=e=>{if(e.button===0&&i.current.id==null){t(),e.stopPropagation(),e.preventDefault(),i.current.lastPosition={pageX:e.pageX,pageY:e.pageY},i.current.id=e.pointerId;let o=Xu(Z(e));a(o,`pointermove`,n,!1),a(o,`pointerup`,r,!1),a(o,`pointercancel`,r,!1)}}}let n=(e,n,r)=>{t(),s(e,`keyboard`,n,r),c(e,`keyboard`)};return e.onKeyDown=e=>{switch(e.key){case`Left`:case`ArrowLeft`:e.preventDefault(),e.stopPropagation(),n(e,-1,0);break;case`Right`:case`ArrowRight`:e.preventDefault(),e.stopPropagation(),n(e,1,0);break;case`Up`:case`ArrowUp`:e.preventDefault(),e.stopPropagation(),n(e,0,-1);break;case`Down`:case`ArrowDown`:e.preventDefault(),e.stopPropagation(),n(e,0,1);break}},e},[a,o,i])}}var vh=new WeakMap;function yh(e,t){let n=vh.get(e);if(!n)throw Error(`Unknown slider state`);return`${n.id}-${t}`}function bh(e,t,n){let{labelProps:r,fieldProps:i}=qm(e),a=e.orientation===`vertical`;vh.set(t,{id:r.id??i.id,"aria-describedby":e[`aria-describedby`],"aria-details":e[`aria-details`]});let{direction:o}=Nf(),{addGlobalListener:s,removeGlobalListener:c}=pm(),l=(0,f.useRef)(null),u=o===`rtl`,d=(0,f.useRef)(null),{moveProps:p}=_h({onMoveStart(){d.current=null},onMove({deltaX:e,deltaY:r}){if(!n.current)return;let{height:i,width:o}=n.current.getBoundingClientRect(),s=a?i:o;d.current==null&&l.current!=null&&(d.current=t.getThumbPercent(l.current)*s);let c=a?r:e;if((a||u)&&(c=-c),d.current+=c,l.current!=null&&n.current){let e=nh(d.current/s,0,1);t.setThumbPercent(l.current,e)}},onMoveEnd(){l.current!=null&&(t.setThumbDragging(l.current,!1),l.current=null)}}),m=(0,f.useRef)(void 0),h=(r,i,c,u)=>{if(n.current&&!e.isDisabled&&t.values.every((e,n)=>!t.isThumbDragging(n))){let{height:e,width:d,top:f,left:p}=n.current.getBoundingClientRect(),h=a?e:d,_=((a?u:c)-(a?f:p))/h;(o===`rtl`||a)&&(_=1-_);let v=t.getPercentValue(_),y,b=t.values.findIndex(e=>v-e<0);if(b===0)y=b;else if(b===-1)y=t.values.length-1;else{let e=t.values[b-1],n=t.values[b];y=Math.abs(e-v)<Math.abs(n-v)?b-1:b}y>=0&&t.isThumbEditable(y)?(r.preventDefault(),l.current=y,t.setFocusedThumb(y),m.current=i,t.setThumbDragging(l.current,!0),t.setThumbValue(y,v),s(window,`mouseup`,g,!1),s(window,`touchend`,g,!1),s(window,`pointerup`,g,!1)):l.current=null}},g=e=>{(e.pointerId??e.changedTouches?.[0].identifier)===m.current&&(l.current!=null&&(t.setThumbDragging(l.current,!1),l.current=null),c(window,`mouseup`,g,!1),c(window,`touchend`,g,!1),c(window,`pointerup`,g,!1))};return`htmlFor`in r&&r.htmlFor&&(delete r.htmlFor,r.onClick=()=>{document.getElementById(yh(t,0))?.focus(),mf(`keyboard`)}),{labelProps:r,groupProps:{role:`group`,...i},trackProps:Lu({onMouseDown(e){e.button!==0||e.altKey||e.ctrlKey||e.metaKey||h(e,void 0,e.clientX,e.clientY)},onPointerDown(e){e.pointerType===`mouse`&&(e.button!==0||e.altKey||e.ctrlKey||e.metaKey)||h(e,e.pointerId,e.clientX,e.clientY)},onTouchStart(e){h(e,e.changedTouches[0].identifier,e.changedTouches[0].clientX,e.changedTouches[0].clientY)},style:{position:`relative`,touchAction:`none`}},p),outputProps:{htmlFor:t.values.map((e,n)=>yh(t,n)).join(` `),"aria-live":`off`}}}function xh(e,t){let{index:n=0,isRequired:r,validationState:i,isInvalid:a,trackRef:o,inputRef:s,orientation:c=t.orientation,name:l,form:u}=e,d=e.isDisabled||t.isDisabled,p=c===`vertical`,{direction:m}=Nf(),{addGlobalListener:h,removeGlobalListener:g}=pm(),_=vh.get(t),{labelProps:v,fieldProps:y}=qm({...e,id:yh(t,n),"aria-labelledby":`${_.id} ${e[`aria-labelledby`]??``}`.trim()}),b=t.values[n],x=(0,f.useCallback)(()=>{s.current&&sd(s.current)},[s]),S=t.focusedThumb===n;(0,f.useEffect)(()=>{S&&x()},[S,x]);let C=m===`rtl`,w=(0,f.useRef)(null),{keyboardProps:T}=yp({onKeyDown(e){let{getThumbMaxValue:r,getThumbMinValue:i,decrementThumb:a,incrementThumb:o,setThumbValue:s,setThumbDragging:c,pageSize:l}=t;if(!/^(PageUp|PageDown|Home|End)$/.test(e.key)){e.continuePropagation();return}switch(e.preventDefault(),c(n,!0),e.key){case`PageUp`:o(n,l);break;case`PageDown`:a(n,l);break;case`Home`:s(n,i(n));break;case`End`:s(n,r(n));break}c(n,!1)}}),{moveProps:E}=_h({onMoveStart(){w.current=null,t.setThumbDragging(n,!0)},onMove({deltaX:e,deltaY:r,pointerType:i,shiftKey:a}){let{getThumbPercent:s,setThumbPercent:c,decrementThumb:l,incrementThumb:u,step:d,pageSize:f}=t;if(!o.current)return;let{width:m,height:h}=o.current.getBoundingClientRect(),g=p?h:m;if(w.current??(w.current=s(n)*g),i===`keyboard`)e>0&&C||e<0&&!C||r>0?l(n,a?f:d):u(n,a?f:d);else{let t=p?r:e;(p||C)&&(t=-t),w.current+=t,c(n,nh(w.current/g,0,1))}},onMoveEnd(){t.setThumbDragging(n,!1)}});t.setThumbEditable(n,!d);let{focusableProps:D}=Cp(Lu(e,{onFocus:()=>t.setFocusedThumb(n),onBlur:()=>t.setFocusedThumb(void 0)}),s),O=(0,f.useRef)(void 0),k=e=>{x(),O.current=e,t.setThumbDragging(n,!0),h(window,`mouseup`,A,!1),h(window,`touchend`,A,!1),h(window,`pointerup`,A,!1)},A=e=>{(e.pointerId??e.changedTouches?.[0].identifier)===O.current&&(x(),t.setThumbDragging(n,!1),g(window,`mouseup`,A,!1),g(window,`touchend`,A,!1),g(window,`pointerup`,A,!1))},j=t.getThumbPercent(n);(p||m===`rtl`)&&(j=1-j);let M=d?{}:Lu(T,E,{onMouseDown:e=>{e.button!==0||e.altKey||e.ctrlKey||e.metaKey||k()},onPointerDown:e=>{e.button!==0||e.altKey||e.ctrlKey||e.metaKey||k(e.pointerId)},onTouchStart:e=>{k(e.changedTouches[0].identifier)}});return gh(s,t.defaultValues[n],e=>{t.setThumbValue(n,e)}),{inputProps:Lu(D,y,{type:`range`,tabIndex:d?void 0:0,min:t.getThumbMinValue(n),max:t.getThumbMaxValue(n),step:t.step,value:b,name:l,form:u,disabled:d,"aria-orientation":c,"aria-valuetext":t.getThumbValueLabel(n),"aria-required":r||void 0,"aria-invalid":a||i===`invalid`||void 0,"aria-errormessage":e[`aria-errormessage`],"aria-describedby":[_[`aria-describedby`],e[`aria-describedby`]].filter(Boolean).join(` `),"aria-details":[_[`aria-details`],e[`aria-details`]].filter(Boolean).join(` `),onChange:e=>{t.setThumbValue(n,parseFloat(Z(e).value))}}),thumbProps:{...M,style:{position:`absolute`,[p?`top`:`left`]:`${j*100}%`,transform:`translate(-50%, -50%)`,touchAction:`none`}},labelProps:v,isDragging:t.isThumbDragging(n),isDisabled:d,isFocused:S}}var Sh=0,Ch=100,wh=1;function Th(e){let{isDisabled:t=!1,minValue:n=Sh,maxValue:r=Ch,numberFormatter:i,step:a=wh,orientation:o=`horizontal`}=e,s=(0,f.useMemo)(()=>{let e=(r-n)/10;return e=ih(e,0,e+a,a),Math.max(e,a)},[a,r,n]),c=(0,f.useCallback)(e=>e?.map((t,i)=>ih(t,i===0?n:e[i-1],i===e.length-1?r:e[i+1],a)),[n,r,a]),l=(0,f.useMemo)(()=>c(Dh(e.value)),[e.value,c]),u=(0,f.useMemo)(()=>c(Dh(e.defaultValue)??[n]),[e.defaultValue,n,c]),d=Oh(e.value,e.defaultValue,e.onChange),p=Oh(e.value,e.defaultValue,e.onChangeEnd),[m,h]=Jf(l,u,d),[g]=(0,f.useState)(m),[_,v]=(0,f.useState)(Array(m.length).fill(!1)),y=(0,f.useRef)(Array(m.length).fill(!0)),[b,x]=(0,f.useState)(void 0),S=(0,f.useRef)(m),C=(0,f.useRef)(_),w=e=>{S.current=e,h(e)},T=e=>{C.current=e,v(e)};function E(e){return(e-n)/(r-n)}function D(e){return e===0?n:m[e-1]}function O(e){return e===m.length-1?r:m[e+1]}function k(e){return y.current[e]}function A(e,t){y.current[e]=t}function j(e,n){if(t||!k(e))return;let r=D(e),i=O(e);n=ih(n,r,i,a),w(Eh(S.current,e,n))}function M(e,n){if(t||!k(e))return;n&&(S.current=m);let r=C.current[e];C.current=Eh(C.current,e,n),T(C.current),p&&r&&!C.current.some(Boolean)&&p(S.current)}let N=(0,f.useRef)(null);function P(e=m){switch(typeof e==`number`&&(e=[e]),e.length){case 0:return``;case 1:return i.format(e[0]);case 2:return i.formatRange(e[0],e[1]);default:{let t=e.map(e=>i.format(e)),n=N.current;return(!n||n.resolvedOptions().locale!==i.resolvedOptions().locale)&&(n=N.current=new Intl.ListFormat(i.resolvedOptions().locale,{type:`unit`})),n.format(t)}}}function F(e,t){j(e,L(t))}function I(e){return Math.round((e-n)/a)*a+n}function L(e){return nh(I(e*(r-n)+n),n,r)}function ee(e,t=1){let i=Math.max(t,a);j(e,ih(m[e]+i,n,r,a))}function te(e,t=1){let i=Math.max(t,a);j(e,ih(m[e]-i,n,r,a))}return{values:m,defaultValues:e.defaultValue===void 0?g:u,getThumbValue:e=>m[e],setThumbValue:j,setThumbPercent:F,isThumbDragging:e=>_[e],setThumbDragging:M,focusedThumb:b,setFocusedThumb:x,getThumbPercent:e=>E(m[e]),getValuePercent:E,getThumbValueLabel:e=>P(m[e]),getFormattedValue:P,getThumbMinValue:D,getThumbMaxValue:O,getPercentValue:L,isThumbEditable:k,setThumbEditable:A,incrementThumb:ee,decrementThumb:te,step:a,pageSize:s,orientation:o,isDisabled:t}}function Eh(e,t,n){return e[t]===n?e:[...e.slice(0,t),n,...e.slice(t+1)]}function Dh(e){if(e!=null)return Array.isArray(e)?e:[e]}function Oh(e,t,n){return r=>{typeof e==`number`||typeof t==`number`?n?.(r[0]):n?.(r)}}var kh=(0,f.createContext)({}),Ah=(0,f.createContext)(null);function jh(e){let t=(0,f.useRef)({});return f.default.createElement(Ah.Provider,{value:t},e.children)}var Mh=(0,f.createContext)({isSelected:!1}),Nh,Ph=(0,f.createContext)({});Nh=class extends tp{filter(e,t){let n=t.getItem(this.prevKey);if(n&&n.type!==`separator`){let n=this.clone();return t.addDescendants(n,e),n}return null}},Nh.type=`separator`;var Fh=class{constructor(e,t,n,r){this._walkerStack=[],this._currentSetFor=new Set,this._acceptNode=e=>{if(e.nodeType===Node.ELEMENT_NODE){let t=e.shadowRoot;if(t){let e=this._doc.createTreeWalker(t,this.whatToShow,{acceptNode:this._acceptNode});return this._walkerStack.unshift(e),NodeFilter.FILTER_ACCEPT}else if(typeof this.filter==`function`)return this.filter(e);else if(this.filter?.acceptNode)return this.filter.acceptNode(e);else if(this.filter===null)return NodeFilter.FILTER_ACCEPT}return NodeFilter.FILTER_SKIP},this._doc=e,this.root=t,this.filter=r??null,this.whatToShow=n??NodeFilter.SHOW_ALL,this._currentNode=t,this._walkerStack.unshift(e.createTreeWalker(t,n,this._acceptNode));let i=t.shadowRoot;if(i){let e=this._doc.createTreeWalker(i,this.whatToShow,{acceptNode:this._acceptNode});this._walkerStack.unshift(e)}}get currentNode(){return this._currentNode}set currentNode(e){if(!X(this.root,e))throw Error(`Cannot set currentNode to a node that is not contained by the root node.`);let t=[],n=e,r=e;for(this._currentNode=e;n&&n!==this.root;)if(n.nodeType===Node.DOCUMENT_FRAGMENT_NODE){let e=n,i=this._doc.createTreeWalker(e,this.whatToShow,{acceptNode:this._acceptNode});t.push(i),i.currentNode=r,this._currentSetFor.add(i),n=r=e.host}else n=n.parentNode;let i=this._doc.createTreeWalker(this.root,this.whatToShow,{acceptNode:this._acceptNode});t.push(i),i.currentNode=r,this._currentSetFor.add(i),this._walkerStack=t}get doc(){return this._doc}firstChild(){let e=this.currentNode,t=this.nextNode();return X(e,t)?(t&&(this.currentNode=t),t):(this.currentNode=e,null)}lastChild(){let e=this._walkerStack[0].lastChild();return e&&(this.currentNode=e),e}nextNode(){let e=this._walkerStack[0].nextNode();if(e){if(e.shadowRoot){let t;if(typeof this.filter==`function`?t=this.filter(e):this.filter?.acceptNode&&(t=this.filter.acceptNode(e)),t===NodeFilter.FILTER_ACCEPT)return this.currentNode=e,e;let n=this.nextNode();return n&&(this.currentNode=n),n}return e&&(this.currentNode=e),e}else if(this._walkerStack.length>1){this._walkerStack.shift();let e=this.nextNode();return e&&(this.currentNode=e),e}else return null}previousNode(){let e=this._walkerStack[0];if(e.currentNode===e.root){if(this._currentSetFor.has(e))if(this._currentSetFor.delete(e),this._walkerStack.length>1){this._walkerStack.shift();let e=this.previousNode();return e&&(this.currentNode=e),e}else return null;return null}let t=e.previousNode();if(t){if(t.shadowRoot){let e;if(typeof this.filter==`function`?e=this.filter(t):this.filter?.acceptNode&&(e=this.filter.acceptNode(t)),e===NodeFilter.FILTER_ACCEPT)return t&&(this.currentNode=t),t;let n=this.lastChild();return n&&(this.currentNode=n),n}return t&&(this.currentNode=t),t}else if(this._walkerStack.length>1){this._walkerStack.shift();let e=this.previousNode();return e&&(this.currentNode=e),e}else return null}nextSibling(){return null}previousSibling(){return null}parentNode(){return null}};function Ih(e,t,n,r){return ed()?new Fh(e,t,n,r):e.createTreeWalker(t,n,r)}var Lh=f.default.createContext(null),Rh=`react-aria-focus-scope-restore`,Q=null;function zh(e){let{children:t,contain:n,restoreFocus:r,autoFocus:i}=e,a=(0,f.useRef)(null),o=(0,f.useRef)(null),s=(0,f.useRef)([]),{parentNode:c}=(0,f.useContext)(Lh)||{},l=(0,f.useMemo)(()=>new og({scopeRef:s}),[s]);fu(()=>{let e=c||sg.root;if(sg.getTreeNode(e.scopeRef)&&Q&&!Yh(Q,e.scopeRef)){let t=sg.getTreeNode(Q);t&&(e=t)}e.addChild(l),sg.addNode(l)},[l,c]),fu(()=>{let e=sg.getTreeNode(s);e&&(e.contain=!!n)},[n]),fu(()=>{let e=a.current?.nextSibling,t=[],n=e=>e.stopPropagation();for(;e&&e!==o.current;)t.push(e),e.addEventListener(Rh,n),e=e.nextSibling;return s.current=t,()=>{for(let e of t)e.removeEventListener(Rh,n)}},[t]),eg(s,r,n),Gh(s,n),ng(s,r,n),$h(s,i),(0,f.useEffect)(()=>{let e=td(Y(s.current?s.current[0]:void 0)),t=null;if(qh(e,s.current)){for(let n of sg.traverse())n.scopeRef&&qh(e,n.scopeRef.current)&&(t=n);t===sg.getTreeNode(s)&&(Q=t.scopeRef)}},[s]),fu(()=>()=>{let e=sg.getTreeNode(s)?.parent?.scopeRef??null;(s===Q||Yh(s,Q))&&(!e||sg.getTreeNode(e))&&(Q=e),sg.removeTreeNode(s)},[s]);let u=(0,f.useMemo)(()=>Bh(s),[]),d=(0,f.useMemo)(()=>({focusManager:u,parentNode:l}),[l,u]);return f.default.createElement(Lh.Provider,{value:d},f.default.createElement(`span`,{"data-focus-scope-start":!0,hidden:!0,ref:a}),t,f.default.createElement(`span`,{"data-focus-scope-end":!0,hidden:!0,ref:o}))}function Bh(e){return{focusNext(t={}){let n=e.current,{from:r,tabbable:i,wrap:a,accept:o}=t,s=r||td(Y(n[0]??void 0)),c=n[0].previousElementSibling,l=ig(Vh(n),{tabbable:i,accept:o},n);l.currentNode=qh(s,n)?s:c;let u=l.nextNode();return!u&&a&&(l.currentNode=c,u=l.nextNode()),u&&Xh(u,!0),u},focusPrevious(t={}){let n=e.current,{from:r,tabbable:i,wrap:a,accept:o}=t,s=r||td(Y(n[0]??void 0)),c=n[n.length-1].nextElementSibling,l=ig(Vh(n),{tabbable:i,accept:o},n);l.currentNode=qh(s,n)?s:c;let u=l.previousNode();return!u&&a&&(l.currentNode=c,u=l.previousNode()),u&&Xh(u,!0),u},focusFirst(t={}){let n=e.current,{tabbable:r,accept:i}=t,a=ig(Vh(n),{tabbable:r,accept:i},n);a.currentNode=n[0].previousElementSibling;let o=a.nextNode();return o&&Xh(o,!0),o},focusLast(t={}){let n=e.current,{tabbable:r,accept:i}=t,a=ig(Vh(n),{tabbable:r,accept:i},n);a.currentNode=n[n.length-1].nextElementSibling;let o=a.previousNode();return o&&Xh(o,!0),o}}}function Vh(e){return e[0].parentElement}function Hh(e){let t=sg.getTreeNode(Q);for(;t&&t.scopeRef!==e;){if(t.contain)return!1;t=t.parent}return!0}function Uh(e){if(!e.form)return Array.from(Y(e).querySelectorAll(`input[type="radio"][name="${CSS.escape(e.name)}"]`)).filter(e=>!e.form);let t=e.form.elements.namedItem(e.name),n=Xu(e);return t instanceof n.RadioNodeList?Array.from(t).filter(e=>e instanceof n.HTMLInputElement):t instanceof n.HTMLInputElement?[t]:[]}function Wh(e){if(e.checked)return!0;let t=Uh(e);return t.length>0&&!t.some(e=>e.checked)}function Gh(e,t){let n=(0,f.useRef)(void 0),r=(0,f.useRef)(void 0);fu(()=>{let i=e.current;if(!t){r.current&&(cancelAnimationFrame(r.current),r.current=void 0);return}let a=Y(i?i[0]:void 0),o=t=>{if(t.key!==`Tab`||t.altKey||t.ctrlKey||t.metaKey||!Hh(e)||t.isComposing)return;let n=td(a),r=e.current;if(!r||!qh(n,r))return;let i=ig(Vh(r),{tabbable:!0},r);if(!n)return;i.currentNode=n;let o=t.shiftKey?i.previousNode():i.nextNode();o||(i.currentNode=t.shiftKey?r[r.length-1].nextElementSibling:r[0].previousElementSibling,o=t.shiftKey?i.previousNode():i.nextNode()),t.preventDefault(),o&&(Xh(o,!0),o instanceof Xu(o).HTMLInputElement&&o.select())},s=t=>{(!Q||Yh(Q,e))&&qh(Z(t),e.current)?(Q=e,n.current=Z(t)):Hh(e)&&!Jh(Z(t),e)?n.current?n.current.focus():Q&&Q.current&&Qh(Q.current):Hh(e)&&(n.current=Z(t))},c=t=>{r.current&&cancelAnimationFrame(r.current),r.current=requestAnimationFrame(()=>{let r=pf(),i=(r===`virtual`||r===null)&&Ld()&&Id(),o=td(a);if(!i&&o&&Hh(e)&&!Jh(o,e)){Q=e;let r=Z(t);r&&r.isConnected?(n.current=r,n.current?.focus()):Q.current&&Qh(Q.current)}})};return a.addEventListener(`keydown`,o,!1),a.addEventListener(`focusin`,s,!1),i?.forEach(e=>e.addEventListener(`focusin`,s,!1)),i?.forEach(e=>e.addEventListener(`focusout`,c,!1)),()=>{a.removeEventListener(`keydown`,o,!1),a.removeEventListener(`focusin`,s,!1),i?.forEach(e=>e.removeEventListener(`focusin`,s,!1)),i?.forEach(e=>e.removeEventListener(`focusout`,c,!1))}},[e,t]),fu(()=>()=>{r.current&&cancelAnimationFrame(r.current)},[r])}function Kh(e){return Jh(e)}function qh(e,t){return!e||!t?!1:t.some(t=>X(t,e))}function Jh(e,t=null){if(e instanceof Element&&e.closest(`[data-react-aria-top-layer]`))return!0;for(let{scopeRef:n}of sg.traverse(sg.getTreeNode(t)))if(n&&qh(e,n.current))return!0;return!1}function Yh(e,t){let n=sg.getTreeNode(t)?.parent;for(;n;){if(n.scopeRef===e)return!0;n=n.parent}return!1}function Xh(e,t=!1){if(e!=null&&!t)try{gp(e)}catch{}else if(e!=null)try{e.focus()}catch{}}function Zh(e,t=!0){let n=e[0].previousElementSibling,r=Vh(e),i=ig(r,{tabbable:t},e);i.currentNode=n;let a=i.nextNode();return t&&!a&&(r=Vh(e),i=ig(r,{tabbable:!1},e),i.currentNode=n,a=i.nextNode()),a}function Qh(e,t=!0){Xh(Zh(e,t))}function $h(e,t){let n=f.default.useRef(t);(0,f.useEffect)(()=>{n.current&&(Q=e,!qh(td(Y(e.current?e.current[0]:void 0)),Q.current)&&e.current&&Qh(e.current)),n.current=!1},[e])}function eg(e,t,n){fu(()=>{if(t||n)return;let r=e.current,i=Y(r?r[0]:void 0),a=t=>{let n=Z(t);qh(n,e.current)?Q=e:Kh(n)||(Q=null)};return i.addEventListener(`focusin`,a,!1),r?.forEach(e=>e.addEventListener(`focusin`,a,!1)),()=>{i.removeEventListener(`focusin`,a,!1),r?.forEach(e=>e.removeEventListener(`focusin`,a,!1))}},[e,t,n])}function tg(e){let t=sg.getTreeNode(Q);for(;t&&t.scopeRef!==e;){if(t.nodeToRestore)return!1;t=t.parent}return t?.scopeRef===e}function ng(e,t,n){let r=(0,f.useRef)(typeof document<`u`?td(Y(e.current?e.current[0]:void 0)):null);fu(()=>{let r=e.current,i=Y(r?r[0]:void 0);if(!t||n)return;let a=()=>{(!Q||Yh(Q,e))&&qh(td(i),e.current)&&(Q=e)};return i.addEventListener(`focusin`,a,!1),r?.forEach(e=>e.addEventListener(`focusin`,a,!1)),()=>{i.removeEventListener(`focusin`,a,!1),r?.forEach(e=>e.removeEventListener(`focusin`,a,!1))}},[e,n]),fu(()=>{let r=Y(e.current?e.current[0]:void 0);if(!t)return;let i=t=>{if(t.key!==`Tab`||t.altKey||t.ctrlKey||t.metaKey||!Hh(e)||t.isComposing)return;let n=r.activeElement;if(!Jh(n,e)||!tg(e))return;let i=sg.getTreeNode(e);if(!i)return;let a=i.nodeToRestore,o=ig(r.body,{tabbable:!0});o.currentNode=n;let s=t.shiftKey?o.previousNode():o.nextNode();if((!a||!a.isConnected||a===r.body)&&(a=void 0,i.nodeToRestore=void 0),(!s||!Jh(s,e))&&a){o.currentNode=a;do s=t.shiftKey?o.previousNode():o.nextNode();while(Jh(s,e));t.preventDefault(),t.stopPropagation(),s?Xh(s,!0):Kh(a)?Xh(a,!0):n.blur()}};return n||r.addEventListener(`keydown`,i,!0),()=>{n||r.removeEventListener(`keydown`,i,!0)}},[e,t,n]),fu(()=>{let n=Y(e.current?e.current[0]:void 0);if(!t)return;let i=sg.getTreeNode(e);if(i)return i.nodeToRestore=r.current??void 0,()=>{let r=sg.getTreeNode(e);if(!r)return;let i=r.nodeToRestore,a=td(n);if(t&&i&&(a&&Jh(a,e)||a===n.body&&tg(e))){let t=sg.clone();requestAnimationFrame(()=>{if(n.activeElement===n.body){let n=t.getTreeNode(e);for(;n;){if(n.nodeToRestore&&n.nodeToRestore.isConnected){rg(n.nodeToRestore);return}n=n.parent}for(n=t.getTreeNode(e);n;){if(n.scopeRef&&n.scopeRef.current&&sg.getTreeNode(n.scopeRef)){rg(Zh(n.scopeRef.current,!0));return}n=n.parent}}})}}},[e,t])}function rg(e){e.dispatchEvent(new CustomEvent(Rh,{bubbles:!0,cancelable:!0}))&&Xh(e)}function ig(e,t,n){let r=t?.tabbable?bd:yd,i=Y(e?.nodeType===Node.ELEMENT_NODE?e:null),a=Ih(i,e||i,NodeFilter.SHOW_ELEMENT,{acceptNode(e){return X(t?.from,e)||t?.tabbable&&e.tagName===`INPUT`&&e.getAttribute(`type`)===`radio`&&(!Wh(e)||a.currentNode.tagName===`INPUT`&&a.currentNode.type===`radio`&&a.currentNode.name===e.name)?NodeFilter.FILTER_REJECT:r(e)&&(!n||qh(e,n))&&(!t?.accept||t.accept(e))?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});return t?.from&&(a.currentNode=t.from),a}var ag=class e{constructor(){this.fastMap=new Map,this.root=new og({scopeRef:null}),this.fastMap.set(null,this.root)}get size(){return this.fastMap.size}getTreeNode(e){return this.fastMap.get(e)}addTreeNode(e,t,n){let r=this.fastMap.get(t??null);if(!r)return;let i=new og({scopeRef:e});r.addChild(i),i.parent=r,this.fastMap.set(e,i),n&&(i.nodeToRestore=n)}addNode(e){this.fastMap.set(e.scopeRef,e)}removeTreeNode(e){if(e===null)return;let t=this.fastMap.get(e);if(!t)return;let n=t.parent;for(let e of this.traverse())e!==t&&t.nodeToRestore&&e.nodeToRestore&&t.scopeRef&&t.scopeRef.current&&qh(e.nodeToRestore,t.scopeRef.current)&&(e.nodeToRestore=t.nodeToRestore);let r=t.children;n&&(n.removeChild(t),r.size>0&&r.forEach(e=>n&&n.addChild(e))),this.fastMap.delete(t.scopeRef)}*traverse(e=this.root){if(e.scopeRef!=null&&(yield e),e.children.size>0)for(let t of e.children)yield*this.traverse(t)}clone(){let t=new e;for(let e of this.traverse())t.addTreeNode(e.scopeRef,e.parent?.scopeRef??null,e.nodeToRestore);return t}},og=class{constructor(e){this.children=new Set,this.contain=!1,this.scopeRef=e.scopeRef}addChild(e){this.children.add(e),e.parent=this}removeChild(e){this.children.delete(e),e.parent=void 0}},sg=new ag;function cg(e){return Pd()?e.altKey:e.ctrlKey}function lg(e,t){let n=`[data-key="${CSS.escape(String(t))}"]`,r=e.current?.dataset.collection;return r&&(n=`[data-collection="${CSS.escape(r)}"]${n}`),e.current?.querySelector(n)}var ug=new WeakMap;function dg(e){let t=Au();return ug.set(e,t),t}function fg(e){return ug.get(e)}var pg=1e3;function mg(e){let{keyboardDelegate:t,selectionManager:n,onTypeSelect:r}=e,i=(0,f.useRef)({search:``,timeout:void 0}).current;return{typeSelectProps:{onKeyDownCapture:t.getKeyForSearch?e=>{let a=hg(e.key);if(!(!a||e.ctrlKey||e.metaKey||!X(e.currentTarget,Z(e))||i.search.length===0&&a===` `)){if(a===` `&&i.search.trim().length>0&&(e.preventDefault(),`continuePropagation`in e||e.stopPropagation()),i.search+=a,t.getKeyForSearch!=null){let e=t.getKeyForSearch(i.search,n.focusedKey);e??(e=t.getKeyForSearch(i.search)),e!=null&&(n.setFocusedKey(e),r&&r(e))}clearTimeout(i.timeout),i.timeout=setTimeout(()=>{i.search=``},pg)}}:void 0}}}function hg(e){return e.length===1||!/^[A-Z]/i.test(e)?e:``}function gg(e,t){let n=(0,f.useRef)(!0),r=(0,f.useRef)(null);fu(()=>(n.current=!0,()=>{n.current=!1}),[]),fu(()=>{n.current?n.current=!1:(!r.current||t.some((e,t)=>!Object.is(e,r[t])))&&e(),r.current=t},t)}function _g(e){let{selectionManager:t,keyboardDelegate:r,ref:i,autoFocus:a=!1,shouldFocusWrap:o=!1,disallowEmptySelection:s=!1,disallowSelectAll:c=!1,escapeKeyBehavior:l=`clearSelection`,selectOnFocus:u=t.selectionBehavior===`replace`,disallowTypeAhead:d=!1,shouldUseVirtualFocus:p,allowsTabNavigation:m=!1,scrollRef:h=i,linkBehavior:g=`action`}=e,{direction:_}=Nf(),v=Hd(),y=e=>{if(e.altKey&&e.key===`Tab`&&e.preventDefault(),!i.current||!X(i.current,Z(e)))return;let a=(r,a)=>{if(r!=null){if(t.isLink(r)&&g===`selection`&&u&&!cg(e)){(0,n.flushSync)(()=>{t.setFocusedKey(r,a)});let o=lg(i,r),s=t.getItemProps(r);o&&v.open(o,e,s.href,s.routerOptions);return}if(t.setFocusedKey(r,a),t.isLink(r)&&g===`override`)return;e.shiftKey&&t.selectionMode===`multiple`?t.extendSelection(r):u&&!cg(e)&&t.replaceSelection(r)}};switch(e.key){case`ArrowDown`:if(r.getKeyBelow){let n=t.focusedKey==null?r.getFirstKey?.():r.getKeyBelow?.(t.focusedKey);n==null&&o&&(n=r.getFirstKey?.(t.focusedKey)),n!=null&&(e.preventDefault(),a(n))}break;case`ArrowUp`:if(r.getKeyAbove){let n=t.focusedKey==null?r.getLastKey?.():r.getKeyAbove?.(t.focusedKey);n==null&&o&&(n=r.getLastKey?.(t.focusedKey)),n!=null&&(e.preventDefault(),a(n))}break;case`ArrowLeft`:if(r.getKeyLeftOf){let n=t.focusedKey==null?r.getFirstKey?.():r.getKeyLeftOf?.(t.focusedKey);n==null&&o&&(n=_===`rtl`?r.getFirstKey?.(t.focusedKey):r.getLastKey?.(t.focusedKey)),n!=null&&(e.preventDefault(),a(n,_===`rtl`?`first`:`last`))}break;case`ArrowRight`:if(r.getKeyRightOf){let n=t.focusedKey==null?r.getFirstKey?.():r.getKeyRightOf?.(t.focusedKey);n==null&&o&&(n=_===`rtl`?r.getLastKey?.(t.focusedKey):r.getFirstKey?.(t.focusedKey)),n!=null&&(e.preventDefault(),a(n,_===`rtl`?`last`:`first`))}break;case`Home`:if(r.getFirstKey){if(t.focusedKey===null&&e.shiftKey)return;e.preventDefault();let n=r.getFirstKey(t.focusedKey,vf(e));t.setFocusedKey(n),n!=null&&(vf(e)&&e.shiftKey&&t.selectionMode===`multiple`?t.extendSelection(n):u&&t.replaceSelection(n))}break;case`End`:if(r.getLastKey){if(t.focusedKey===null&&e.shiftKey)return;e.preventDefault();let n=r.getLastKey(t.focusedKey,vf(e));t.setFocusedKey(n),n!=null&&(vf(e)&&e.shiftKey&&t.selectionMode===`multiple`?t.extendSelection(n):u&&t.replaceSelection(n))}break;case`PageDown`:if(r.getKeyPageBelow&&t.focusedKey!=null){let n=r.getKeyPageBelow(t.focusedKey);n!=null&&(e.preventDefault(),a(n))}break;case`PageUp`:if(r.getKeyPageAbove&&t.focusedKey!=null){let n=r.getKeyPageAbove(t.focusedKey);n!=null&&(e.preventDefault(),a(n))}break;case`a`:vf(e)&&t.selectionMode===`multiple`&&c!==!0&&(e.preventDefault(),t.selectAll());break;case`Escape`:l===`clearSelection`&&!s&&t.selectedKeys.size!==0&&(e.stopPropagation(),e.preventDefault(),t.clearSelection());break;case`Tab`:if(!m){if(e.shiftKey)i.current.focus();else{let e=ig(i.current,{tabbable:!0}),t,n;do n=e.lastChild(),n&&(t=n);while(n);let r=td();t&&(!nd(t)||r&&!bd(r))&&sd(t)}break}}},b=(0,f.useRef)({top:0,left:0});xf(h,`scroll`,()=>{b.current={top:h.current?.scrollTop??0,left:h.current?.scrollLeft??0}});let x=e=>{if(t.isFocused){X(e.currentTarget,Z(e))||t.setFocused(!1);return}if(X(e.currentTarget,Z(e))){if(t.setFocused(!0),t.focusedKey==null){let n=e=>{e!=null&&(t.setFocusedKey(e),u&&!t.isSelected(e)&&t.replaceSelection(e))},i=e.relatedTarget;i&&e.currentTarget.compareDocumentPosition(i)&Node.DOCUMENT_POSITION_FOLLOWING?n(t.lastSelectedKey??r.getLastKey?.()):n(t.firstSelectedKey??r.getFirstKey?.())}else h.current&&(h.current.scrollTop=b.current.top,h.current.scrollLeft=b.current.left);if(t.focusedKey!=null&&h.current){let e=lg(i,t.focusedKey);e instanceof HTMLElement&&(!nd(e)&&!p&&sd(e),pf()===`keyboard`&&lh(e,{containingElement:i.current}))}}},S=e=>{X(e.currentTarget,e.relatedTarget)||t.setFocused(!1)},C=(0,f.useRef)(!1);xf(i,Yu,p?e=>{let{detail:n}=e;e.stopPropagation(),t.setFocused(!0),n?.focusStrategy===`first`&&(C.current=!0)}:void 0),gg(()=>{if(C.current){let e=r.getFirstKey?.()??null;if(e==null){let e=td();rd(i.current),ad(e,null),t.collection.size>0&&(C.current=!1)}else t.setFocusedKey(e),C.current=!1}},[t.collection]),gg(()=>{t.collection.size>0&&(C.current=!1)},[t.focusedKey]),xf(i,Ju,p?e=>{e.stopPropagation(),t.setFocused(!1),e.detail?.clearFocusKey&&t.setFocusedKey(null)}:void 0);let w=(0,f.useRef)(a),T=(0,f.useRef)(!1);(0,f.useEffect)(()=>{if(w.current){let e=null;a===`first`&&(e=r.getFirstKey?.()??null),a===`last`&&(e=r.getLastKey?.()??null);let n=t.selectedKeys;if(n.size){for(let r of n)if(t.canSelectItem(r)){e=r;break}}t.setFocused(!0),t.setFocusedKey(e),e==null&&!p&&i.current&&gp(i.current),t.collection.size>0&&(w.current=!1,T.current=!0)}});let E=(0,f.useRef)(t.focusedKey),D=(0,f.useRef)(null);(0,f.useEffect)(()=>{if(t.isFocused&&t.focusedKey!=null&&(t.focusedKey!==E.current||T.current)&&h.current&&i.current){let e=pf(),n=lg(i,t.focusedKey);if(!(n instanceof HTMLElement))return;(e===`keyboard`||T.current)&&(D.current&&cancelAnimationFrame(D.current),D.current=requestAnimationFrame(()=>{h.current&&(ch(h.current,n),e!==`virtual`&&lh(n,{containingElement:i.current}))}))}!p&&t.isFocused&&t.focusedKey==null&&E.current!=null&&i.current&&gp(i.current),E.current=t.focusedKey,T.current=!1}),(0,f.useEffect)(()=>()=>{D.current&&cancelAnimationFrame(D.current)},[]),xf(i,`react-aria-focus-scope-restore`,e=>{e.preventDefault(),t.setFocused(!0)});let O={onKeyDown:y,onFocus:x,onBlur:S,onMouseDown(e){h.current===Z(e)&&e.preventDefault()}},{typeSelectProps:k}=mg({keyboardDelegate:r,selectionManager:t});d||(O=Lu(k,O));let A;p||(A=t.focusedKey==null?0:-1);let j=dg(t.collection);return{collectionProps:Lu(O,{tabIndex:A,"data-collection":j})}}var vg=class{constructor(e){this.ref=e}getItemRect(e){let t=this.ref.current;if(!t)return null;let n=e==null?null:lg(this.ref,e);if(!n)return null;let r=t.getBoundingClientRect(),i=n.getBoundingClientRect();return{x:i.left-r.left-t.clientLeft+t.scrollLeft,y:i.top-r.top-t.clientTop+t.scrollTop,width:i.width,height:i.height}}getContentSize(){let e=this.ref.current;return{width:e?.scrollWidth??0,height:e?.scrollHeight??0}}getVisibleRect(){let e=this.ref.current;return{x:e?.scrollLeft??0,y:e?.scrollTop??0,width:e?.clientWidth??0,height:e?.clientHeight??0}}},yg=class{constructor(...e){if(e.length===1){let t=e[0];this.collection=t.collection,this.ref=t.ref,this.collator=t.collator,this.disabledKeys=t.disabledKeys||new Set,this.disabledBehavior=t.disabledBehavior||`all`,this.orientation=t.orientation||`vertical`,this.direction=t.direction,this.layout=t.layout||`stack`,this.layoutDelegate=t.layoutDelegate||new vg(t.ref)}else this.collection=e[0],this.disabledKeys=e[1],this.ref=e[2],this.collator=e[3],this.layout=`stack`,this.orientation=`vertical`,this.disabledBehavior=`all`,this.layoutDelegate=new vg(this.ref);this.layout===`stack`&&this.orientation===`vertical`&&(this.getKeyLeftOf=void 0,this.getKeyRightOf=void 0)}isDisabled(e){return this.disabledBehavior===`all`&&(e.props?.isDisabled||this.disabledKeys.has(e.key))&&e.props?.disabledBehavior!==`selection`}findNextNonDisabled(e,t,n=!1){let r=e;for(;r!=null;){let e=this.collection.getItem(r);if(e?.type===`item`&&(n||!this.isDisabled(e)))return r;r=t(r)}return null}getNextKey(e,t){let n=e;return n=this.collection.getKeyAfter(n),this.findNextNonDisabled(n,e=>this.collection.getKeyAfter(e),t?.includeDisabled)}getPreviousKey(e,t){let n=e;return n=this.collection.getKeyBefore(n),this.findNextNonDisabled(n,e=>this.collection.getKeyBefore(e),t?.includeDisabled)}findKey(e,t,n){let r=e,i=this.layoutDelegate.getItemRect(r);if(!i||r==null)return null;let a=i;do{if(r=t(r),r==null)break;i=this.layoutDelegate.getItemRect(r)}while(i&&n(a,i)&&r!=null);return r}isSameRow(e,t){return e.y===t.y||e.x!==t.x}isSameColumn(e,t){return e.x===t.x||e.y!==t.y}getKeyBelow(e,t){return this.layout===`grid`&&this.orientation===`vertical`?this.findKey(e,e=>this.getNextKey(e,t),this.isSameRow):this.getNextKey(e,t)}getKeyAbove(e,t){return this.layout===`grid`&&this.orientation===`vertical`?this.findKey(e,e=>this.getPreviousKey(e,t),this.isSameRow):this.getPreviousKey(e,t)}getNextColumn(e,t,n){return t?this.getPreviousKey(e,n):this.getNextKey(e,n)}getKeyRightOf(e,t){let n=this.direction===`ltr`?`getKeyRightOf`:`getKeyLeftOf`;return this.layoutDelegate[n]?(e=this.layoutDelegate[n](e),this.findNextNonDisabled(e,e=>this.layoutDelegate[n](e),t?.includeDisabled)):this.layout===`grid`?this.orientation===`vertical`?this.getNextColumn(e,this.direction===`rtl`,t):this.findKey(e,e=>this.getNextColumn(e,this.direction===`rtl`,t),this.isSameColumn):this.orientation===`horizontal`?this.getNextColumn(e,this.direction===`rtl`,t):null}getKeyLeftOf(e,t){let n=this.direction===`ltr`?`getKeyLeftOf`:`getKeyRightOf`;return this.layoutDelegate[n]?(e=this.layoutDelegate[n](e),this.findNextNonDisabled(e,e=>this.layoutDelegate[n](e),t?.includeDisabled)):this.layout===`grid`?this.orientation===`vertical`?this.getNextColumn(e,this.direction===`ltr`,t):this.findKey(e,e=>this.getNextColumn(e,this.direction===`ltr`,t),this.isSameColumn):this.orientation===`horizontal`?this.getNextColumn(e,this.direction===`ltr`,t):null}getFirstKey(){let e=this.collection.getFirstKey();return this.findNextNonDisabled(e,e=>this.collection.getKeyAfter(e))}getLastKey(){let e=this.collection.getLastKey();return this.findNextNonDisabled(e,e=>this.collection.getKeyBefore(e))}getKeyPageAbove(e){let t=this.ref.current,n=this.layoutDelegate.getItemRect(e);if(!n)return null;if(t&&!oh(t))return this.getFirstKey();let r=e;if(this.orientation===`horizontal`){let e=Math.max(0,n.x+n.width-this.layoutDelegate.getVisibleRect().width);for(;n&&n.x>e&&r!=null;)r=this.getKeyAbove(r),n=r==null?null:this.layoutDelegate.getItemRect(r)}else{let e=Math.max(0,n.y+n.height-this.layoutDelegate.getVisibleRect().height);for(;n&&n.y>e&&r!=null;)r=this.getKeyAbove(r),n=r==null?null:this.layoutDelegate.getItemRect(r)}return r??this.getFirstKey()}getKeyPageBelow(e){let t=this.ref.current,n=this.layoutDelegate.getItemRect(e);if(!n)return null;if(t&&!oh(t))return this.getLastKey();let r=e;if(this.orientation===`horizontal`){let e=Math.min(this.layoutDelegate.getContentSize().width,n.x-n.width+this.layoutDelegate.getVisibleRect().width);for(;n&&n.x<e&&r!=null;)r=this.getKeyBelow(r),n=r==null?null:this.layoutDelegate.getItemRect(r)}else{let e=Math.min(this.layoutDelegate.getContentSize().height,n.y-n.height+this.layoutDelegate.getVisibleRect().height);for(;n&&n.y<e&&r!=null;)r=this.getKeyBelow(r),n=r==null?null:this.layoutDelegate.getItemRect(r)}return r??this.getLastKey()}getKeyForSearch(e,t){if(!this.collator)return null;let n=this.collection,r=t||this.getFirstKey();for(;r!=null;){let t=n.getItem(r);if(!t)return null;let i=t.textValue.slice(0,e.length);if(t.textValue&&this.collator.compare(i,e)===0)return r;r=this.getNextKey(r)}return null}},bg=new Map;function xg(e){let{locale:t}=Nf(),n=t+(e?Object.entries(e).sort((e,t)=>e[0]<t[0]?-1:1).join():``);if(bg.has(n))return bg.get(n);let r=new Intl.Collator(t,e);return bg.set(n,r),r}function Sg(e){let{selectionManager:t,collection:n,disabledKeys:r,ref:i,keyboardDelegate:a,layoutDelegate:o,orientation:s}=e,c=xg({usage:`search`,sensitivity:`base`}),l=t.disabledBehavior,u=(0,f.useMemo)(()=>a||new yg({collection:n,disabledKeys:r,disabledBehavior:l,ref:i,collator:c,layoutDelegate:o,orientation:s}),[a,o,n,r,i,c,l,s]),{collectionProps:d}=_g({...e,ref:i,selectionManager:t,keyboardDelegate:u});return{listProps:d}}var Cg=500;function wg(e){let{isDisabled:t,onLongPressStart:n,onLongPressEnd:r,onLongPress:i,threshold:a=Cg,accessibilityDescription:o}=e,s=(0,f.useRef)(void 0),{addGlobalListener:c,removeGlobalListener:l}=pm(),{pressProps:u}=Tm({isDisabled:t,onPressStart(e){if(e.continuePropagation(),(e.pointerType===`mouse`||e.pointerType===`touch`)&&(n&&n({...e,type:`longpressstart`}),s.current=setTimeout(()=>{e.target.dispatchEvent(new PointerEvent(`pointercancel`,{bubbles:!0})),Y(e.target).activeElement!==e.target&&sd(e.target),i&&i({...e,type:`longpress`}),s.current=void 0},a),e.pointerType===`touch`)){let t=e=>{e.preventDefault()},n=Xu(e.target);c(e.target,`contextmenu`,t,{once:!0}),c(n,`pointerup`,()=>{setTimeout(()=>{l(e.target,`contextmenu`,t)},30)},{once:!0})}},onPressEnd(e){s.current&&clearTimeout(s.current),r&&(e.pointerType===`mouse`||e.pointerType===`touch`)&&r({...e,type:`longpressend`})}});return{longPressProps:Lu(u,fh(i&&!t?o:void 0))}}function Tg(e){let{id:t,selectionManager:n,key:r,ref:i,shouldSelectOnPressUp:a,shouldUseVirtualFocus:o,focus:s,isDisabled:c,onAction:l,allowsDifferentPressOrigin:u,linkBehavior:d=`action`}=e,p=Hd();t=Au(t);let m=e=>{if(e.pointerType===`keyboard`&&cg(e))n.toggleSelection(r);else{if(n.selectionMode===`none`)return;if(n.isLink(r)){if(d===`selection`&&i.current){let t=n.getItemProps(r);p.open(i.current,e,t.href,t.routerOptions),n.setSelectedKeys(n.selectedKeys);return}else if(d===`override`||d===`none`)return}n.selectionMode===`single`?n.isSelected(r)&&!n.disallowEmptySelection?n.toggleSelection(r):n.replaceSelection(r):e&&e.shiftKey?n.extendSelection(r):n.selectionBehavior===`toggle`||e&&(vf(e)||e.pointerType===`touch`||e.pointerType===`virtual`)?n.toggleSelection(r):n.replaceSelection(r)}};(0,f.useEffect)(()=>{r===n.focusedKey&&n.isFocused&&(o?rd(i.current):s?s():td()!==i.current&&i.current&&gp(i.current))},[i,r,n.focusedKey,n.childFocusStrategy,n.isFocused,o]),c=c||n.isDisabled(r);let h={};!o&&!c?h={tabIndex:r===n.focusedKey?0:-1,onFocus(e){Z(e)===i.current&&n.setFocusedKey(r)}}:c&&(h.onMouseDown=e=>{e.preventDefault()}),(0,f.useEffect)(()=>{c&&n.focusedKey===r&&n.setFocusedKey(null)},[n,c,r]);let g=n.isLink(r)&&d===`override`,_=l&&e.UNSTABLE_itemBehavior===`action`,v=n.isLink(r)&&d!==`selection`&&d!==`none`,y=!c&&n.canSelectItem(r)&&!g&&!_,b=(l||v)&&!c,x=b&&(n.selectionBehavior===`replace`?!y:!y||n.isEmpty),S=b&&y&&n.selectionBehavior===`replace`,C=x||S,w=(0,f.useRef)(null),T=C&&y,E=(0,f.useRef)(!1),D=(0,f.useRef)(!1),O=n.getItemProps(r),k=e=>{l&&(l(),i.current?.dispatchEvent(new CustomEvent(`react-aria-item-action`,{bubbles:!0}))),v&&i.current&&p.open(i.current,e,O.href,O.routerOptions)},A={ref:i};if(a?(A.onPressStart=e=>{w.current=e.pointerType,E.current=T,e.pointerType===`keyboard`&&(!C||Dg(e.key))&&m(e)},u?(A.onPressUp=x?void 0:e=>{e.pointerType===`mouse`&&y&&m(e)},A.onPress=x?k:e=>{e.pointerType!==`keyboard`&&e.pointerType!==`mouse`&&y&&m(e)}):A.onPress=e=>{if(x||S&&e.pointerType!==`mouse`){if(e.pointerType===`keyboard`&&!Eg(e.key))return;k(e)}else e.pointerType!==`keyboard`&&y&&m(e)}):(A.onPressStart=e=>{w.current=e.pointerType,E.current=T,D.current=x,y&&(e.pointerType===`mouse`&&!x||e.pointerType===`keyboard`&&(!b||Dg(e.key)))&&m(e)},A.onPress=e=>{(e.pointerType===`touch`||e.pointerType===`pen`||e.pointerType===`virtual`||e.pointerType===`keyboard`&&C&&Eg(e.key)||e.pointerType===`mouse`&&D.current)&&(C?k(e):y&&m(e))}),h[`data-collection`]=fg(n.collection),h[`data-key`]=r,A.preventFocusOnPress=o,o&&(A=Lu(A,{onPressStart(e){e.pointerType!==`touch`&&(n.setFocused(!0),n.setFocusedKey(r))},onPress(e){e.pointerType===`touch`&&(n.setFocused(!0),n.setFocusedKey(r))}})),O)for(let e of[`onPressStart`,`onPressEnd`,`onPressChange`,`onPress`,`onPressUp`,`onClick`])O[e]&&(A[e]=du(A[e],O[e]));let{pressProps:j,isPressed:M}=Tm(A),N=S?e=>{w.current===`mouse`&&(e.stopPropagation(),e.preventDefault(),k(e))}:void 0,{longPressProps:P}=wg({isDisabled:!T,onLongPress(e){e.pointerType===`touch`&&(m(e),n.setSelectionBehavior(`toggle`))}}),F=e=>{w.current===`touch`&&E.current&&e.preventDefault()},I=d!==`none`&&n.isLink(r)?e=>{Wd.isOpening||e.preventDefault()}:void 0;return{itemProps:Lu(h,y||x||o&&!c?j:{},T?P:{},{onDoubleClick:N,onDragStartCapture:F,onClick:I,id:t},o?{onMouseDown:e=>e.preventDefault()}:void 0),isPressed:M,isSelected:n.isSelected(r),isFocused:n.isFocused&&n.focusedKey===r,isDisabled:c,allowsSelection:y,hasAction:C}}function Eg(e){return e===`Enter`}function Dg(e){return e===` `}function Og(e,t){return typeof t.getChildren==`function`?t.getChildren(e.key):e.childNodes}function kg(e){return Ag(e,0)}function Ag(e,t){if(t<0)return;let n=0;for(let r of e){if(n===t)return r;n++}}function jg(e,t,n){if(t.parentKey===n.parentKey)return t.index-n.index;let r=[...Mg(e,t),t],i=[...Mg(e,n),n],a=r.slice(0,i.length).findIndex((e,t)=>e!==i[t]);return a===-1?r.findIndex(e=>e===n)>=0?1:(i.findIndex(e=>e===t),-1):(t=r[a],n=i[a],t.index-n.index)}function Mg(e,t){let n=[],r=t;for(;r?.parentKey!=null;)r=e.getItem(r.parentKey),r&&n.unshift(r);return n}var Ng=new WeakMap;function Pg(e){let t=Ng.get(e);if(t!=null)return t;let n=0,r=t=>{for(let i of t)i.type===`section`?r(Og(i,e)):i.type===`item`&&n++};return r(e),Ng.set(e,n),n}var Fg=class e extends Set{constructor(t,n,r){super(t),t instanceof e?(this.anchorKey=n??t.anchorKey,this.currentKey=r??t.currentKey):(this.anchorKey=n??null,this.currentKey=r??null)}};function Ig(e,t){if(e.size!==t.size)return!1;for(let n of e)if(!t.has(n))return!1;return!0}function Lg(e){let{selectionMode:t=`none`,disallowEmptySelection:n=!1,allowDuplicateSelectionEvents:r,selectionBehavior:i=`toggle`,disabledBehavior:a=`all`}=e,o=(0,f.useRef)(!1),[,s]=(0,f.useState)(!1),c=(0,f.useRef)(null),l=(0,f.useRef)(null),[,u]=(0,f.useState)(null),[d,p]=Jf((0,f.useMemo)(()=>Rg(e.selectedKeys),[e.selectedKeys]),(0,f.useMemo)(()=>Rg(e.defaultSelectedKeys,new Fg),[e.defaultSelectedKeys]),e.onSelectionChange),m=(0,f.useMemo)(()=>e.disabledKeys?new Set(e.disabledKeys):new Set,[e.disabledKeys]),[h,g]=(0,f.useState)(i);i===`replace`&&h===`toggle`&&typeof d==`object`&&d.size===0&&g(`replace`);let _=(0,f.useRef)(i);return(0,f.useEffect)(()=>{i!==_.current&&(g(i),_.current=i)},[i]),{selectionMode:t,disallowEmptySelection:n,selectionBehavior:h,setSelectionBehavior:g,get isFocused(){return o.current},setFocused(e){o.current=e,s(e)},get focusedKey(){return c.current},get childFocusStrategy(){return l.current},setFocusedKey(e,t=`first`){c.current=e,l.current=t,u(e)},selectedKeys:d,setSelectedKeys(e){(r||!Ig(e,d))&&p(e)},disabledKeys:m,disabledBehavior:a}}function Rg(e,t){return e?e===`all`?`all`:new Fg(e):t}var zg=class e{constructor(e,t,n){this.collection=e,this.state=t,this.allowsCellSelection=n?.allowsCellSelection??!1,this._isSelectAll=null,this.layoutDelegate=n?.layoutDelegate||null,this.fullCollection=n?.fullCollection||null}get selectionMode(){return this.state.selectionMode}get disallowEmptySelection(){return this.state.disallowEmptySelection}get selectionBehavior(){return this.state.selectionBehavior}setSelectionBehavior(e){this.state.setSelectionBehavior(e)}get isFocused(){return this.state.isFocused}setFocused(e){this.state.setFocused(e)}get focusedKey(){return this.state.focusedKey}get childFocusStrategy(){return this.state.childFocusStrategy}setFocusedKey(e,t){(e==null||this.collection.getItem(e))&&this.state.setFocusedKey(e,t)}get selectedKeys(){return this.state.selectedKeys===`all`?new Set(this.getSelectAllKeys()):this.state.selectedKeys}get rawSelection(){return this.state.selectedKeys}isSelected(e){if(this.state.selectionMode===`none`)return!1;let t=this.getKey(e);return t==null?!1:this.state.selectedKeys===`all`?this.canSelectItem(t):this.state.selectedKeys.has(t)}get isEmpty(){return this.state.selectedKeys!==`all`&&this.state.selectedKeys.size===0}get isSelectAll(){if(this.isEmpty)return!1;if(this.state.selectedKeys===`all`)return!0;if(this._isSelectAll!=null)return this._isSelectAll;let e=this.getSelectAllKeys(),t=this.state.selectedKeys;return this._isSelectAll=e.every(e=>t.has(e)),this._isSelectAll}get firstSelectedKey(){let e=null;for(let t of this.state.selectedKeys){let n=this.collection.getItem(t);(!e||n&&jg(this.collection,n,e)<0)&&(e=n)}return e?.key??null}get lastSelectedKey(){let e=null;for(let t of this.state.selectedKeys){let n=this.collection.getItem(t);(!e||n&&jg(this.collection,n,e)>0)&&(e=n)}return e?.key??null}get disabledKeys(){return this.state.disabledKeys}get disabledBehavior(){return this.state.disabledBehavior}extendSelection(e){if(this.selectionMode===`none`)return;if(this.selectionMode===`single`){this.replaceSelection(e);return}let t=this.getKey(e);if(t==null)return;let n;if(this.state.selectedKeys===`all`)n=new Fg([t],t,t);else{let e=this.state.selectedKeys,r=e.anchorKey??t;n=new Fg(e,r,t);for(let i of this.getKeyRange(r,e.currentKey??t))n.delete(i);for(let e of this.getKeyRange(t,r))this.canSelectItem(e)&&n.add(e)}this.state.setSelectedKeys(n)}getKeyRange(e,t){let n=this.collection.getItem(e),r=this.collection.getItem(t);return n&&r?jg(this.collection,n,r)<=0?this.getKeyRangeInternal(e,t):this.getKeyRangeInternal(t,e):[]}getKeyRangeInternal(e,t){if(this.layoutDelegate?.getKeyRange)return this.layoutDelegate.getKeyRange(e,t);let n=[],r=e;for(;r!=null;){let e=this.collection.getItem(r);if(e&&(e.type===`item`||e.type===`cell`&&this.allowsCellSelection)&&n.push(r),r===t)return n;r=this.collection.getKeyAfter(r)}return[]}getKey(e){let t=this.collection.getItem(e);if(!t||t.type===`cell`&&this.allowsCellSelection)return e;for(;t&&t.type!==`item`&&t.parentKey!=null;)t=this.collection.getItem(t.parentKey);return!t||t.type!==`item`?null:t.key}toggleSelection(e){if(this.selectionMode===`none`)return;if(this.selectionMode===`single`&&!this.isSelected(e)){this.replaceSelection(e);return}let t=this.getKey(e);if(t==null)return;let n=new Fg(this.state.selectedKeys===`all`?this.getSelectAllKeys():this.state.selectedKeys);n.has(t)?n.delete(t):this.canSelectItem(t)&&(n.add(t),n.anchorKey=t,n.currentKey=t),!(this.disallowEmptySelection&&n.size===0)&&this.state.setSelectedKeys(n)}replaceSelection(e){if(this.selectionMode===`none`)return;let t=this.getKey(e);if(t==null)return;let n=this.canSelectItem(t)?new Fg([t],t,t):new Fg;this.state.setSelectedKeys(n)}setSelectedKeys(e){if(this.selectionMode===`none`)return;let t=new Fg;for(let n of e){let e=this.getKey(n);if(e!=null&&(t.add(e),this.selectionMode===`single`))break}this.state.setSelectedKeys(t)}getSelectAllKeys(){let e=this.fullCollection??this.collection,t=[],n=r=>{for(;r!=null;){if(this.canSelectItemIn(r,e)){let i=e.getItem(r);i?.type===`item`&&t.push(r),i?.hasChildNodes&&(this.allowsCellSelection||i.type!==`item`)&&n(kg(Og(i,e))?.key??null)}r=e.getKeyAfter(r)}};return n(e.getFirstKey()),t}selectAll(){!this.isSelectAll&&this.selectionMode===`multiple`&&this.state.setSelectedKeys(`all`)}clearSelection(){!this.disallowEmptySelection&&(this.state.selectedKeys===`all`||this.state.selectedKeys.size>0)&&this.state.setSelectedKeys(new Fg)}toggleSelectAll(){this.isSelectAll?this.clearSelection():this.selectAll()}select(e,t){this.selectionMode!==`none`&&(this.selectionMode===`single`?this.isSelected(e)&&!this.disallowEmptySelection?this.toggleSelection(e):this.replaceSelection(e):this.selectionBehavior===`toggle`||t&&(t.pointerType===`touch`||t.pointerType===`virtual`)?this.toggleSelection(e):this.replaceSelection(e))}isSelectionEqual(e){if(e===this.state.selectedKeys)return!0;let t=this.selectedKeys;if(e.size!==t.size)return!1;for(let n of e)if(!t.has(n))return!1;for(let n of t)if(!e.has(n))return!1;return!0}canSelectItem(e){return this.canSelectItemIn(e,this.collection)}canSelectItemIn(e,t){if(this.state.selectionMode===`none`||this.state.disabledKeys.has(e))return!1;let n=t.getItem(e);return!(!n||n?.props?.isDisabled||n.type===`cell`&&!this.allowsCellSelection)}isDisabled(e){let t=this.collection.getItem(e);return this.state.disabledBehavior===`all`&&(this.state.disabledKeys.has(e)||!!t?.props?.isDisabled)&&t?.props?.disabledBehavior!==`selection`}isLink(e){return!!this.collection.getItem(e)?.props?.href}getItemProps(e){return this.collection.getItem(e)?.props}withCollection(t){return new e(t,this.state,{allowsCellSelection:this.allowsCellSelection,layoutDelegate:this.layoutDelegate||void 0,fullCollection:this.fullCollection??this.collection})}},Bg=class{build(e,t){return this.context=t,Vg(()=>this.iterateCollection(e))}*iterateCollection(e){let{children:t,items:n}=e;if(f.default.isValidElement(t)&&t.type===f.default.Fragment)yield*this.iterateCollection({children:t.props.children,items:n});else if(typeof t==`function`){if(!n)throw Error(`props.children was a function but props.items is missing`);let e=0;for(let r of n)yield*this.getFullNode({value:r,index:e},{renderer:t}),e++}else{let e=[];f.default.Children.forEach(t,t=>{t&&e.push(t)});let n=0;for(let t of e){let e=this.getFullNode({element:t,index:n},{});for(let t of e)n++,yield t}}}getKey(e,t,n,r){if(e.key!=null)return e.key;if(t.type===`cell`&&t.key!=null)return`${r}${t.key}`;let i=t.value;if(i!=null){let e=i.key??i.id;if(e==null)throw Error(`No key found for item`);return e}return r?`${r}.${t.index}`:`$.${t.index}`}getChildState(e,t){return{renderer:t.renderer||e.renderer}}*getFullNode(e,t,n,r){if(f.default.isValidElement(e.element)&&e.element.type===f.default.Fragment){let i=[];f.default.Children.forEach(e.element.props.children,e=>{i.push(e)});let a=e.index??0;for(let e of i)yield*this.getFullNode({element:e,index:a++},t,n,r);return}let i=e.element;if(!i&&e.value&&t&&t.renderer){let n=this.cache.get(e.value);if(n&&(!n.shouldInvalidate||!n.shouldInvalidate(this.context))){n.index=e.index,n.parentKey=r?r.key:null,yield n;return}i=t.renderer(e.value)}if(f.default.isValidElement(i)){let a=i.type;if(typeof a!=`function`&&typeof a.getCollectionNode!=`function`){let e=i.type;throw Error(`Unknown element <${e}> in collection.`)}let o=a.getCollectionNode(i.props,this.context),s=e.index??0,c=o.next();for(;!c.done&&c.value;){let a=c.value;e.index=s;let l=a.key??null;l??(l=a.element?null:this.getKey(i,e,t,n));let u=[...this.getFullNode({...a,key:l,index:s,wrapper:Hg(e.wrapper,a.wrapper)},this.getChildState(t,a),n?`${n}${i.key}`:i.key,r)];for(let t of u){if(t.value=a.value??e.value??null,t.value&&this.cache.set(t.value,t),e.type&&t.type!==e.type)throw Error(`Unsupported type <${Ug(t.type)}> in <${Ug(r?.type??`unknown parent type`)}>. Only <${Ug(e.type)}> is supported.`);s++,yield t}c=o.next(u)}return}if(e.key==null||e.type==null)return;let a=this,o={type:e.type,props:e.props,key:e.key,parentKey:r?r.key:null,value:e.value??null,level:(r?.level??0)+ +(r?.type===`item`),index:e.index,rendered:e.rendered,textValue:e.textValue??``,"aria-label":e[`aria-label`],wrapper:e.wrapper,shouldInvalidate:e.shouldInvalidate,hasChildNodes:e.hasChildNodes||!1,childNodes:Vg(function*(){if(!e.hasChildNodes||!e.childNodes)return;let n=0;for(let r of e.childNodes()){r.key!=null&&(r.key=`${o.key}${r.key}`);let e=a.getFullNode({...r,index:n},a.getChildState(t,r),o.key,o);for(let t of e)n++,yield t}})};yield o}constructor(){this.cache=new WeakMap}};function Vg(e){let t=[],n=null;return{*[Symbol.iterator](){for(let e of t)yield e;n||(n=e());for(let e of n)t.push(e),yield e}}}function Hg(e,t){if(e&&t)return n=>e(t(n));if(e)return e;if(t)return t}function Ug(e){return e[0].toUpperCase()+e.slice(1)}function Wg(e,t,n){let r=(0,f.useMemo)(()=>new Bg,[]),{children:i,items:a,collection:o}=e;return(0,f.useMemo)(()=>o||t(r.build({children:i,items:a},n)),[r,i,a,o,n,t])}var Gg=new WeakMap,Kg=f.default.forwardRef(({children:e,...t},n)=>{let r=(0,f.useRef)(!1),i=(0,f.useContext)(fm),a=Lu(i||{},{...t,register(){r.current=!0,i&&i.register()}});return a.ref=Ru(n||i?.ref),bp(i,a.ref),(0,f.useEffect)(()=>{r.current||(process.env.NODE_ENV!==`production`&&console.warn(`A PressResponder was rendered without a pressable child. Either call the usePress hook, or wrap your DOM node with <Pressable> component.`),r.current=!0)},[]),f.default.createElement(fm.Provider,{value:a},e)});function qg(e){let[t,n]=Jf(e.isOpen,e.defaultOpen||!1,e.onOpenChange);return{isOpen:t,setOpen:n,open:(0,f.useCallback)(()=>{n(!0)},[n]),close:(0,f.useCallback)(()=>{n(!1)},[n]),toggle:(0,f.useCallback)(()=>{n(!t)},[n,t])}}var Jg=(0,f.createContext)(null),Yg=(0,f.createContext)({}),Xg={};Xg={longPressMessage:`اضغط مطولاً أو اضغط على Alt + السهم لأسفل لفتح القائمة`};var Zg={};Zg={longPressMessage:`Натиснете продължително или натиснете Alt+ стрелка надолу, за да отворите менюто`};var Qg={};Qg={longPressMessage:`Dlouhým stiskem nebo stisknutím kláves Alt + šipka dolů otevřete nabídku`};var $g={};$g={longPressMessage:`Langt tryk eller tryk på Alt + pil ned for at åbne menuen`};var e_={};e_={longPressMessage:`Drücken Sie lange oder drücken Sie Alt + Nach-unten, um das Menü zu öffnen`};var t_={};t_={longPressMessage:`Πιέστε παρατεταμένα ή πατήστε Alt + κάτω βέλος για να ανοίξετε το μενού`};var n_={};n_={longPressMessage:`Long press or press Alt + ArrowDown to open menu`};var r_={};r_={longPressMessage:`Mantenga pulsado o pulse Alt + flecha abajo para abrir el menú`};var i_={};i_={longPressMessage:`Menüü avamiseks vajutage pikalt või vajutage klahve Alt + allanool`};var a_={};a_={longPressMessage:`Avaa valikko painamalla pohjassa tai näppäinyhdistelmällä Alt + Alanuoli`};var o_={};o_={longPressMessage:`Appuyez de manière prolongée ou appuyez sur Alt\xA0+\xA0Flèche vers le bas pour ouvrir le menu.`};var s_={};s_={longPressMessage:`לחץ לחיצה ארוכה או הקש Alt + ArrowDown כדי לפתוח את התפריט`};var c_={};c_={longPressMessage:`Dugo pritisnite ili pritisnite Alt + strelicu prema dolje za otvaranje izbornika`};var l_={};l_={longPressMessage:`Nyomja meg hosszan, vagy nyomja meg az Alt + lefele nyíl gombot a menü megnyitásához`};var u_={};u_={longPressMessage:`Premi a lungo o premi Alt + Freccia giù per aprire il menu`};var d_={};d_={longPressMessage:`長押しまたは Alt+下矢印キーでメニューを開く`};var f_={};f_={longPressMessage:`길게 누르거나 Alt + 아래쪽 화살표를 눌러 메뉴 열기`};var p_={};p_={longPressMessage:`Norėdami atidaryti meniu, nuspaudę palaikykite arba paspauskite „Alt + ArrowDown“.`};var m_={};m_={longPressMessage:`Lai atvērtu izvēlni, turiet nospiestu vai nospiediet taustiņu kombināciju Alt + lejupvērstā bultiņa`};var h_={};h_={longPressMessage:`Langt trykk eller trykk Alt + PilNed for å åpne menyen`};var g_={};g_={longPressMessage:`Druk lang op Alt + pijl-omlaag of druk op Alt om het menu te openen`};var __={};__={longPressMessage:`Naciśnij i przytrzymaj lub naciśnij klawisze Alt + Strzałka w dół, aby otworzyć menu`};var v_={};v_={longPressMessage:`Pressione e segure ou pressione Alt + Seta para baixo para abrir o menu`};var y_={};y_={longPressMessage:`Prima continuamente ou prima Alt + Seta Para Baixo para abrir o menu`};var b_={};b_={longPressMessage:`Apăsați lung sau apăsați pe Alt + săgeată în jos pentru a deschide meniul`};var x_={};x_={longPressMessage:`Нажмите и удерживайте или нажмите Alt + Стрелка вниз, чтобы открыть меню`};var S_={};S_={longPressMessage:`Ponuku otvoríte dlhým stlačením alebo stlačením klávesu Alt + klávesu so šípkou nadol`};var C_={};C_={longPressMessage:`Za odprtje menija pritisnite in držite gumb ali pritisnite Alt+puščica navzdol`};var w_={};w_={longPressMessage:`Dugo pritisnite ili pritisnite Alt + strelicu prema dole da otvorite meni`};var T_={};T_={longPressMessage:`Håll nedtryckt eller tryck på Alt + pil nedåt för att öppna menyn`};var E_={};E_={longPressMessage:`Menüyü açmak için uzun basın veya Alt + Aşağı Ok tuşuna basın`};var D_={};D_={longPressMessage:`Довго або звичайно натисніть комбінацію клавіш Alt і стрілка вниз, щоб відкрити меню`};var O_={};O_={longPressMessage:`长按或按 Alt + 向下方向键以打开菜单`};var k_={};k_={longPressMessage:`長按或按 Alt+向下鍵以開啟功能表`};var A_={};A_={"ar-AE":Xg,"bg-BG":Zg,"cs-CZ":Qg,"da-DK":$g,"de-DE":e_,"el-GR":t_,"en-US":n_,"es-ES":r_,"et-EE":i_,"fi-FI":a_,"fr-FR":o_,"he-IL":s_,"hr-HR":c_,"hu-HU":l_,"it-IT":u_,"ja-JP":d_,"ko-KR":f_,"lt-LT":p_,"lv-LV":m_,"nb-NO":h_,"nl-NL":g_,"pl-PL":__,"pt-BR":v_,"pt-PT":y_,"ro-RO":b_,"ru-RU":x_,"sk-SK":S_,"sl-SI":C_,"sr-SP":w_,"sv-SE":T_,"tr-TR":E_,"uk-UA":D_,"zh-CN":O_,"zh-TW":k_};function j_(e,t,n){let{type:r}=e,{isOpen:i}=t;(0,f.useEffect)(()=>{n&&n.current&&Gg.set(n.current,t.close)});let a;r===`menu`?a=!0:r===`listbox`&&(a=`listbox`);let o=Au();return{triggerProps:{"aria-haspopup":a,"aria-expanded":i,"aria-controls":i?o:void 0,onPress:t.toggle},overlayProps:{id:o}}}function M_(e){return e&&e.__esModule?e.default:e}function N_(e,t,n){let{type:r=`menu`,isDisabled:i,trigger:a=`press`}=e,o=Au(),{triggerProps:s,overlayProps:c}=j_({type:r},t,n),l=e=>{if(!i&&!(a===`longPress`&&!e.altKey)&&n&&n.current)switch(e.key){case`Enter`:case` `:if(a===`longPress`||e.isDefaultPrevented())return;case`ArrowDown`:`continuePropagation`in e||e.stopPropagation(),e.preventDefault(),t.toggle(`first`);break;case`ArrowUp`:`continuePropagation`in e||e.stopPropagation(),e.preventDefault(),t.toggle(`last`);break;default:`continuePropagation`in e&&e.continuePropagation()}},u=Kf(M_(A_),`@react-aria/menu`),{longPressProps:d}=wg({isDisabled:i||a!==`longPress`,accessibilityDescription:u.format(`longPressMessage`),onLongPressStart(){t.close()},onLongPress(){t.open(`first`)}}),f={preventFocusOnPress:!0,onPressStart(e){e.pointerType!==`touch`&&e.pointerType!==`keyboard`&&!i&&(sd(e.target),t.open(e.pointerType===`virtual`?`first`:null))},onPress(e){e.pointerType===`touch`&&!i&&(sd(e.target),t.toggle())}};return delete s.onPress,{menuTriggerProps:{...s,...a===`press`?f:d,id:o,onKeyDown:l},menuProps:{...c,"aria-labelledby":o,autoFocus:t.focusStrategy||!0,onClose:t.close}}}var P_=new WeakMap;function F_(e,t,n){let{shouldFocusWrap:r=!0,onKeyDown:i,onKeyUp:a,...o}=e;!e[`aria-label`]&&!e[`aria-labelledby`]&&process.env.NODE_ENV!==`production`&&console.warn(`An aria-label or aria-labelledby prop is required for accessibility.`);let s=rm(e,{labelable:!0}),{listProps:c}=Sg({...o,ref:n,selectionManager:t.selectionManager,collection:t.collection,disabledKeys:t.disabledKeys,shouldFocusWrap:r,linkBehavior:`override`});return P_.set(t,{onClose:e.onClose,onAction:e.onAction,shouldUseVirtualFocus:e.shouldUseVirtualFocus}),{menuProps:Lu(s,{onKeyDown:i,onKeyUp:a},{role:`menu`,...c,onKeyDown:t=>{(t.key!==`Escape`||e.shouldUseVirtualFocus)&&c.onKeyDown?.(t)}})}}function I_(e,t,n){let{id:r,key:i,closeOnSelect:a,shouldCloseOnSelect:o,isVirtualized:s,"aria-haspopup":c,onPressStart:l,onPressUp:u,onPress:d,onPressChange:p,onPressEnd:m,onClick:h,onHoverStart:g,onHoverChange:_,onHoverEnd:v,onKeyDown:y,onKeyUp:b,onFocus:x,onFocusChange:S,onBlur:C,selectionManager:w=t.selectionManager}=e,T=!!c,E=T&&e[`aria-expanded`]===`true`,D=e.isDisabled??w.isDisabled(i),O=e.isSelected??w.isSelected(i),k=P_.get(t),A=t.collection.getItem(i),j=e.onClose||k.onClose,M=Hd(),N=()=>{if(!T&&(A?.props?.onAction?A.props.onAction():e.onAction&&e.onAction(i),k.onAction)){let e=k.onAction;e(i)}},P=`menuitem`;T||(w.selectionMode===`single`?P=`menuitemradio`:w.selectionMode===`multiple`&&(P=`menuitemcheckbox`));let F=Mu(),I=Mu(),L=Mu(),ee={id:r,"aria-disabled":D||void 0,role:P,"aria-label":e[`aria-label`],"aria-labelledby":F,"aria-describedby":[e[`aria-describedby`],I,L].filter(Boolean).join(` `)||void 0,"aria-controls":e[`aria-controls`],"aria-haspopup":c,"aria-expanded":e[`aria-expanded`]};if(w.selectionMode!==`none`&&!T&&(ee[`aria-checked`]=O),s){let e=Number(A?.index);ee[`aria-posinset`]=Number.isNaN(e)?void 0:e+1,ee[`aria-setsize`]=Pg(t.collection)}let te=(0,f.useRef)(!1),ne=e=>{p?.(e),te.current=e},re=(0,f.useRef)(null),ie=e=>{e.pointerType!==`keyboard`&&(re.current={pointerType:e.pointerType}),e.pointerType===`mouse`&&(te.current||e.target.click()),u?.(e)},ae=e=>{h?.(e),N(),Jd(e,M,A.props.href,A?.props.routerOptions);let t=re.current?.pointerType===`keyboard`?re.current?.key===`Enter`||w.selectionMode===`none`||w.isLink(i):w.selectionMode!==`multiple`||w.isLink(i);t=o??a??t,j&&!T&&t&&j(),re.current=null},{itemProps:oe,isFocused:se}=Tg({id:r,selectionManager:w,key:i,ref:n,shouldSelectOnPressUp:!0,allowsDifferentPressOrigin:!0,linkBehavior:`none`,shouldUseVirtualFocus:k.shouldUseVirtualFocus}),{pressProps:R,isPressed:ce}=Tm({onPressStart:l,onPress:d,onPressUp:ie,onPressChange:ne,onPressEnd:m,isDisabled:D}),{hoverProps:z}=Km({isDisabled:D,onHoverStart(e){!ff()&&!(E&&c)&&(w.setFocused(!0),w.setFocusedKey(i)),g?.(e)},onHoverChange:_,onHoverEnd:v}),{keyboardProps:le}=yp({onKeyDown:e=>{if(e.repeat){e.continuePropagation();return}switch(e.key){case` `:re.current={pointerType:`keyboard`,key:` `},Z(e).click(),mf(`keyboard`);break;case`Enter`:re.current={pointerType:`keyboard`,key:`Enter`},Z(e).tagName!==`A`&&Z(e).click(),mf(`keyboard`);break;default:T||e.continuePropagation(),y?.(e);break}},onKeyUp:b}),{focusableProps:B}=Cp({onBlur:C,onFocus:x,onFocusChange:S},n),ue=rm(A?.props);delete ue.id;let de=qd(A?.props);return{menuItemProps:{...ee,...Lu(ue,de,T?{onFocus:oe.onFocus,"data-collection":oe[`data-collection`],"data-key":oe[`data-key`]}:oe,R,z,le,B,k.shouldUseVirtualFocus||T?{onMouseDown:e=>e.preventDefault()}:void 0,D?void 0:{onClick:ae}),tabIndex:oe.tabIndex!=null&&E&&!k.shouldUseVirtualFocus?-1:oe.tabIndex},labelProps:{id:F},descriptionProps:{id:I},keyboardShortcutProps:{id:L},isFocused:se,isFocusVisible:se&&w.isFocused&&ff()&&!E,isSelected:O,isPressed:ce,isDisabled:D}}function L_(e){let{heading:t,"aria-label":n}=e,r=Au();return{itemProps:{role:`presentation`},headingProps:t?{id:r,role:`presentation`}:{},groupProps:{role:`group`,"aria-label":n,"aria-labelledby":t?r:void 0}}}function R_(e){let t=qg(e),[n,r]=(0,f.useState)(null),[i,a]=(0,f.useState)([]),o=()=>{a([]),t.close()},s=(e,t)=>{a(n=>t>n.length?n:[...n.slice(0,t),e])},c=(e,t)=>{a(n=>n[t]===e?n.slice(0,t):n)};return{focusStrategy:n,...t,open(e=null){r(e),t.open()},toggle(e=null){r(e),t.toggle()},close(){o()},expandedKeysStack:i,openSubmenu:s,closeSubmenu:c}}var z_=class{constructor(e,{expandedKeys:t}={}){this.keyMap=new Map,this.firstKey=null,this.lastKey=null,this.iterable=e,t=t||new Set;let n=e=>{if(this.keyMap.set(e.key,e),e.childNodes&&(e.type===`section`||t.has(e.key)))for(let t of e.childNodes)n(t)};for(let t of e)n(t);let r=null,i=0;for(let[e,t]of this.keyMap)r?(r.nextKey=e,t.prevKey=r.key):(this.firstKey=e,t.prevKey=void 0),t.type===`item`&&(t.index=i++),r=t,r.nextKey=void 0;this.lastKey=r?.key??null}*[Symbol.iterator](){yield*this.iterable}get size(){return this.keyMap.size}getKeys(){return this.keyMap.keys()}getKeyBefore(e){let t=this.keyMap.get(e);return t?t.prevKey??null:null}getKeyAfter(e){let t=this.keyMap.get(e);return t?t.nextKey??null:null}getFirstKey(){return this.firstKey}getLastKey(){return this.lastKey}getItem(e){return this.keyMap.get(e)??null}at(e){let t=[...this.getKeys()];return this.getItem(t[e])}};function B_(e){let{onExpandedChange:t}=e,[n,r]=Jf(e.expandedKeys?new Set(e.expandedKeys):void 0,e.defaultExpandedKeys?new Set(e.defaultExpandedKeys):new Set,t),i=Lg(e),a=(0,f.useMemo)(()=>e.disabledKeys?new Set(e.disabledKeys):new Set,[e.disabledKeys]),o=Wg(e,(0,f.useCallback)(e=>new z_(e,{expandedKeys:n}),[n]),null);return(0,f.useEffect)(()=>{i.focusedKey!=null&&!o.getItem(i.focusedKey)&&i.setFocusedKey(null)},[o,i.focusedKey]),{collection:o,expandedKeys:n,disabledKeys:a,toggleKey:e=>{r(V_(n,e))},setExpandedKeys:r,selectionManager:new zg(o,i)}}function V_(e,t){let n=new Set(e);return n.has(t)?n.delete(t):n.add(t),n}var H_,U_=(0,f.createContext)(null),W_=(0,f.createContext)(null),G_=(0,f.createContext)(null),K_=(0,f.createContext)(null);function q_(e){let t=R_(e),n=(0,f.useRef)(null),{menuTriggerProps:r,menuProps:i}=N_({...e,type:`menu`},t,n),a=(0,f.useRef)(null);return Ep()?null:f.default.createElement(Bu,{values:[[U_,{...i,ref:a}],[tv,t],[G_,t],[Jg,{trigger:`MenuTrigger`,triggerRef:n,scrollRef:a,placement:`bottom start`,"aria-labelledby":i[`aria-labelledby`]}]]},f.default.createElement(Kg,{...r,ref:n,isPressed:t.isOpen},e.children))}var J_=(0,f.createContext)(null);H_=class extends tp{filter(e,t,n){let r=e.getItem(this.firstChildKey);if(r&&n(r.textValue,this)){let n=this.clone();return t.addDescendants(n,e),n}return null}},H_.type=`submenutrigger`;var Y_=(0,f.forwardRef)(function(e,t){return[e,t]=Uu(e,t,U_),f.default.createElement(Mp,{content:f.default.createElement(Up,e)},n=>f.default.createElement(X_,{props:e,collection:n,menuRef:t}))});function X_({props:e,collection:t,menuRef:n}){[e,n]=Uu(e,n,Yf);let{filter:r,...i}=e,a=(0,f.useMemo)(()=>r?t.filter(r):t,[t,r]),o=B_({...e,collection:a,children:void 0}),s=(0,f.useContext)(G_),{isVirtualized:c,CollectionRoot:l}=(0,f.useContext)(Yp),{menuProps:u}=F_({...e,isVirtualized:c,onClose:e.onClose||s?.close},o,n),d=Vu({...e,children:void 0,defaultClassName:`react-aria-Menu`,values:{isEmpty:o.collection.size===0}}),p=null;o.collection.size===0&&e.renderEmptyState&&(p=f.default.createElement(`div`,{role:`menuitem`,style:{display:`contents`}},e.renderEmptyState()));let m=rm(e,{global:!0});return f.default.createElement(zh,null,f.default.createElement(qu.div,{...Lu(m,d,u),ref:n,slot:e.slot||void 0,"data-empty":o.collection.size===0||void 0,onScroll:e.onScroll},f.default.createElement(Bu,{values:[[W_,o],[Ph,{elementType:`div`}],[Gp,{name:`MenuSection`,render:Q_}],[J_,{parentMenuRef:n,shouldUseVirtualFocus:i?.shouldUseVirtualFocus}],[$_,{shouldCloseOnSelect:e.shouldCloseOnSelect}],[Yf,null],[Xf,null],[K_,o.selectionManager],[G_,s??R_({})]]},f.default.createElement(jh,null,f.default.createElement(l,{collection:o.collection,persistedKeys:Xp(o.selectionManager.focusedKey),scrollRef:n}))),p))}var Z_=class extends zg{constructor(e,t){super(e.collection,t),this.parent=e}get focusedKey(){return this.parent.focusedKey}get isFocused(){return this.parent.isFocused}setFocusedKey(e,t){return this.parent.setFocusedKey(e,t)}setFocused(e){this.parent.setFocused(e)}get childFocusStrategy(){return this.parent.childFocusStrategy}};function Q_(e,t,n,r=`react-aria-MenuSection`){let i=(0,f.useContext)(W_),{CollectionBranch:a}=(0,f.useContext)(Yp),[o,s]=Wu(),{headingProps:c,groupProps:l}=L_({heading:s,"aria-label":n.props[`aria-label`]??void 0}),u=Vu({...e,id:void 0,children:void 0,defaultClassName:r,className:n.props?.className,style:n.props?.style,values:void 0}),d=(0,f.useContext)(K_),p=Lg(e),m=e.selectionMode==null?d:new Z_(d,p),h=Hu($_)?.shouldCloseOnSelect,g=rm(e,{global:!0});return delete g.id,f.default.createElement(qu.section,{...Lu(g,u,l),ref:t},f.default.createElement(Bu,{values:[[kh,{...c,ref:o}],[K_,m],[$_,{shouldCloseOnSelect:e.shouldCloseOnSelect??h}]]},f.default.createElement(a,{collection:i.collection,parent:n})))}var $_=(0,f.createContext)(null),ev=Bp(rp,function(e,t,n){[e,t]=Uu(e,t,$_);let r=Hu($_)?.id,i=(0,f.useContext)(W_),a=Ru(t),o=(0,f.useContext)(K_),{isVirtualized:s}=(0,f.useContext)(Yp),{menuItemProps:c,labelProps:l,descriptionProps:u,keyboardShortcutProps:d,...p}=I_({...e,id:r,key:n.key,selectionManager:o,isVirtualized:s},i,a),{hoverProps:m,isHovered:h}=Km({isDisabled:p.isDisabled}),g=Vu({...e,id:void 0,children:n.rendered,defaultClassName:`react-aria-MenuItem`,values:{...p,isHovered:h,isFocusVisible:p.isFocusVisible,selectionMode:o.selectionMode,selectionBehavior:o.selectionBehavior,hasSubmenu:!!e[`aria-haspopup`],isOpen:e[`aria-expanded`]===`true`}}),_=e.href?qu.a:qu.div,v=rm(e,{global:!0});return delete v.id,delete v.onClick,f.default.createElement(_,{...Lu(v,g,c,m),ref:a,"data-disabled":p.isDisabled||void 0,"data-hovered":h||void 0,"data-focused":p.isFocused||void 0,"data-focus-visible":p.isFocusVisible||void 0,"data-pressed":p.isPressed||void 0,"data-selected":p.isSelected||void 0,"data-selection-mode":o.selectionMode===`none`?void 0:o.selectionMode,"data-has-submenu":!!e[`aria-haspopup`]||void 0,"data-open":e[`aria-expanded`]===`true`||void 0},f.default.createElement(Bu,{values:[[ah,{slots:{[zu]:l,label:l,description:u}}],[Yg,d],[Mh,{isSelected:p.isSelected}]]},g.children))}),tv=(0,f.createContext)(null),nv=e=>t.default.createElement(t.default.Fragment,null);nv.displayName=`MenuButton.Item`;function rv(){return rv=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},rv.apply(null,arguments)}function iv({menuItems:e,testId:n,children:r}){let i=(0,t.useRef)(null),[a,o]=t.default.useState(!1),[s,c]=t.default.useState({top:0,left:0}),{anchorProps:l,layerProps:u}=Nn({isOpen:a,setIsOpen:o,matchWidth:!1,placement:`bottom`}),{ref:d,...f}=u;function p(e){e.preventDefault(),c({top:e.clientY,left:e.clientX}),o(!0)}function m(e){if(e.key===`F12`&&e.ctrlKey){e.preventDefault();let t=e.currentTarget.getBoundingClientRect();c({top:t.top+t.height/2,left:t.left+t.width/2}),o(!0)}}let h=t=>{let n=e.find(e=>e.props.id===t);n?.props.onSelect&&n.props.onSelect(n.props.label,n.props.id),o(!1)};return(0,t.useEffect)(()=>{if(!a)return;let e=e=>{let t=typeof d==`object`?d?.current:null;t&&!t.contains(e.target)&&o(!1)},t=({key:e})=>{e===`Escape`&&o(!1)},n=e=>{i.current&&i.current.contains(e.target)||o(!1)};return document.addEventListener(`mousedown`,e),window.addEventListener(`keyup`,t),document.addEventListener(`contextmenu`,n),()=>{document.removeEventListener(`mousedown`,e),window.removeEventListener(`keyup`,t),document.removeEventListener(`contextmenu`,n)}},[a]),t.default.createElement(q_,{isOpen:!0,onOpenChange:e=>{e&&o(e)},"data-testid":n},t.default.createElement(`div`,{ref:l.ref,style:{...l.style,position:`fixed`,top:s.top,left:s.left,width:1,height:1,pointerEvents:`none`,opacity:0},"aria-hidden":`true`}),t.default.createElement(`div`,{ref:i,role:`button`,tabIndex:0,"aria-label":`Press Control + F12 to open the context menu`,"aria-haspopup":`menu`,"aria-expanded":a,onContextMenu:p,onKeyDown:m},r),t.default.createElement(`div`,rv({ref:d,className:`nds-context-menu-popover`},f),a&&t.default.createElement(Y_,{onAction:h,className:`nds-context-menu rounded--all elevation--high`},e.map((n,r)=>t.default.createElement(ev,{key:n.props.id,id:n.props.id,value:n.props.id,className:({isSelected:t,isFocused:n,isDisabled:i})=>w([`nds-context-menu-item`,`padding--x--s padding--y--xs`,{"nds-context-menu-item--highlighted":t||n,"nds-context-menu-item--disabled":i,"rounded--top":r===0,"rounded--bottom":r===e.length-1}])},t.default.createElement(W,{gapSize:`s`},n.props.startIcon&&t.default.createElement(W.Item,{shrink:!0},t.default.createElement(`span`,{className:`narmi-icon-${n.props.startIcon}`})),t.default.createElement(W.Item,null,n.props.label)))))))}iv.Item=nv;function av(){return av=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},av.apply(null,arguments)}var ov=()=>{},sv=({title:e,subtitle:n,statusText:r,isOpen:i,trigger:a=`header`,onOpen:o=ov,onClose:s=ov,isDisabled:c=!1,onDisabledClick:l=ov,renderTitle:u,hasError:d=!1,disableHover:f=!1,children:p,radiusSize:m=`l`,kind:h=`default`})=>{let[g,_]=t.default.useState(!1),v=(e=!1,t)=>{if(e){l();return}else t===`open`?(o(),_(!0)):t===`close`&&(s(),_(!1))},y=()=>{_(!1),i?s():o()},b=t.default.createElement(`div`,{className:w([`collapsible-card-trigger`,`alignChild--center--center`,{"padding--left":a==`caret-start`,"padding--right--l":a==`caret-end`}])},t.default.createElement(Lo,{kind:`action`,label:i?`Close`:`Open`,onClick:y,name:`chevron-${i?`up`:`down`}`,textSize:`l`,onKeyUp:({key:e})=>{e===`Enter`&&y()}})),x=t.default.createElement(`div`,{className:w([`collapsible-card-titleBar`,`rounded--top--${h===`ai`?`m`:m}`])},t.default.createElement(ru,{isDisabled:c},typeof u==`function`?u(i):t.default.createElement(W,{alignItems:`center`,gapSize:`s`},a===`caret-start`&&t.default.createElement(W.Item,{shrink:!0},b),t.default.createElement(W.Item,null,t.default.createElement(`h4`,{className:w([`fontWeight--bold`,`fontSize--xl`,`padding--top--l`,`fontFamily--body`,{"padding--left--l":a!==`caret-start`}])},e),t.default.createElement(`div`,{className:w([c?`subtitle--disabled`:`subtitle`,`padding--bottom--l`,`margin--top--xxs`,{"padding--left--l":a!==`caret-start`}])},n)),a===`caret-end`&&t.default.createElement(W.Item,{shrink:!0},b),r&&t.default.createElement(W.Item,{shrink:!0},t.default.createElement(`div`,{className:`collapsible-card--statusText padding--right--l fontSize--s alignChild--right--center`},t.default.createElement(`span`,null,r)))))),S=w([`collapsible-card--content-card`,`collapisble-card--${h}`,{"content-card--hasCaretTrigger":a.includes(`caret`),"content-card--error":d,"content-card--disabled":c,"content-card--hover":a===`header`&&!f&&g,"collapsible-card--no-user-select":!f||a===`header`,"collapsible-card--customTitle":typeof u==`function`},i&&!c?void 0:`content-card--closed`,`rounded--all--${m}`,`bgColor--white`]),C=a===`header`?{role:`button`,tabIndex:0,onKeyUp:({key:e})=>{if(e===`Enter`){let e=i&&!c?`close`:`open`;v(e===`open`?c:!1,e)}},onClick:()=>{let e=i&&!c?`close`:`open`;v(e===`open`?c:!1,e)}}:{};return t.default.createElement(`div`,{className:S},i&&!c?t.default.createElement(t.default.Fragment,null,t.default.createElement(`div`,av({className:`collapsible-card--title-expanded rounded--top--${m}`,"aria-expanded":`true`,onMouseEnter:()=>_(!0),onMouseLeave:()=>_(!1)},C),x),t.default.createElement(`div`,{className:`padding--all--l`},p)):t.default.createElement(`div`,av({"aria-expanded":`false`},C),x))},cv=({children:e,value:n})=>t.default.createElement(t.default.Fragment,null,e||n);cv.displayName=`Combobox.Item`,cv.propTypes={value:S.default.string.isRequired,searchValue:S.default.string.isRequired,children:S.default.oneOfType([S.default.node,S.default.arrayOf(S.default.node)])};var lv=({text:e,kind:n=`bold`})=>t.default.createElement(`h5`,{className:`nds-combobox-list-heading--${n}`},e);lv.displayName=`Combobox.Heading`;var uv=({children:e})=>t.default.createElement(t.default.Fragment,null,e);uv.displayName=`Combobox.Category`,uv.propTypes={label:S.default.string.isRequired,children:S.default.oneOfType([S.default.node,S.default.arrayOf(S.default.node)])};var dv=()=>{},fv=({onSelect:e=dv})=>t.default.createElement(t.default.Fragment,null);fv.displayName=`Combobox.Action`,fv.propTypes={onSelect:S.default.func.isRequired,label:S.default.string.isRequired};function pv(){return pv=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},pv.apply(null,arguments)}var mv=t.default.forwardRef(({isOpen:e=!1,showOpenIndicator:n=!0,disabled:r=!1,labelText:i,labelProps:a,displayValue:o,renderDisplayValue:s,errorText:c,hasError:l=!1,minWidth:u=`auto`,kind:d=`default`,testId:f,startContent:p=t.default.createElement(t.default.Fragment,null),endContent:m=t.default.createElement(t.default.Fragment,null),...h},g)=>t.default.createElement(t.default.Fragment,null,t.default.createElement(`div`,{className:`nds-dropdownTrigger nds-dropdownTrigger--${d}`,style:{minWidth:u}},t.default.createElement(`button`,pv({disabled:r,ref:g,"data-testid":f||`dropdownTriggerButton`,className:w([`nds-dropdownTrigger-button button--reset`,`padding--x--s rounded--all`,{"nds-dropdownTrigger-button--hasValue":!!o,"nds-dropdownTrigger-button--hasError":!!c||l,"nds-dropdownTrigger-button--isActive":e,"nds-dropdownTrigger-button--disabled":r}]),"aria-expanded":e?`true`:`false`,type:`button`},h),p,i&&t.default.createElement(`label`,pv({className:`nds-dropdownTrigger-label`},a),i),s?s():o&&t.default.createElement(`span`,{className:`nds-dropdownTrigger-value`},o),m,n&&!r&&t.default.createElement(`span`,{role:`img`,"aria-label":e?`popup open`:`popup closed`,className:w([`nds-dropdownTrigger-chevron fontSize--xl fontColor--secondary`,`narmi-icon-chevron-${e?`up`:`down`}`])}))),c&&t.default.createElement(Ao,{error:c})));mv.displayName=`DropdownTrigger`;var hv=({children:e})=>t.default.createElement(t.default.Fragment,null,e);hv.displayName=`Select.Item`,hv.propTypes={value:S.default.string.isRequired,searchValue:S.default.string.isRequired,children:S.default.oneOfType([S.default.node,S.default.arrayOf(S.default.node)])};var gv=({children:e})=>t.default.createElement(t.default.Fragment,null,e);gv.displayName=`Select.Action`,gv.propTypes={onSelect:S.default.func.isRequired,children:S.default.oneOfType([S.default.node,S.default.arrayOf(S.default.node)])};var _v=({children:e})=>t.default.createElement(t.default.Fragment,null,e);_v.displayName=`Select.Category`,_v.propTypes={label:S.default.string,kind:S.default.oneOf([`heading`,`label`]),children:S.default.oneOfType([S.default.node,S.default.arrayOf(S.default.node)]),isFlat:S.default.bool};function vv(){return vv=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},vv.apply(null,arguments)}var yv=()=>{},bv=e=>{let t=!1;return e&&e.props&&(t=`onSelect`in e.props),t},xv=e=>{let t=``;return e&&!bv(e)&&(t=e.props.children),t},Sv=(e,t)=>t.filter(e=>!bv(e)).filter(({props:t})=>t.value===e).pop()||``,Cv=(e,t)=>{let n=0;return n=bv(e)?t.map(({props:e})=>e.onSelect).indexOf(e.props.onSelect):t.map(({props:e})=>e.value).indexOf(e.props.value),n},wv=(e,t,n)=>{if(e<0)return!1;let r=n[e].props.value;return t.map(e=>e.props.value).includes(r)},Tv=(e,t)=>{if(!e||bv(e))return!1;let n=e.props.value;return t.map(e=>e.props.value).includes(n)},Ev=(e=``,t)=>bv(t)?``:t.props.searchValue||t.props.value,Dv=({id:e,label:n,children:r,onChange:i=yv,value:a,defaultValue:o,defaultOpen:s=!1,disabled:c=!1,getTypeaheadString:l=Ev,clearSelectionOnAction:u=!1,errorText:d,testId:f})=>{let p=[],m=[],h=(0,t.useMemo)(()=>t.default.Children.toArray(r).filter(e=>!bv(e)),[r]),g=t.default.Children.toArray(r).filter(bv),[_,v]=(0,t.useState)(``);h.some(({type:e})=>e.displayName===`Select.Category`)?(p=[...h.flatMap(({props:e})=>t.default.Children.toArray(e.children)),...g],m=h.map(({props:e})=>({label:e.label,categoryChildren:t.default.Children.toArray(e.children),kind:e.kind,isFlat:e.isFlat}))):p=[...h,...g];let y={id:e||`nds-select-${n}`,items:p,disabled:c,initialSelectedItem:o&&Sv(o,p),initialIsOpen:s,itemToString:e=>l(_,e),onSelectedItemChange:({selectedItem:e})=>{e&&!bv(e)&&i(e.props?e.props.value:``)},stateReducer:(e,t)=>{let{type:n,changes:r}=t,{selectedItem:a}=e,{selectedItem:o}=r,s=r.isOpen;if(n===$i.stateChangeTypes.ToggleButtonKeyDownCharacter){let{inputValue:e}=r;v(e),s=!0}else v(``);return bv(o)?(o.props.onSelect(),u&&i(``),{...r,selectedItem:u?null:a,isOpen:!1}):{...r,isOpen:s}}};a!==void 0&&(y.selectedItem=Sv(a,p));let{isOpen:b,selectedItem:x,getToggleButtonProps:S,getLabelProps:C,getMenuProps:T,highlightedIndex:E,getItemProps:D,closeMenu:O}=$i(y),{anchorProps:k,layerProps:A}=Nn({isOpen:b,setIsOpen:e=>{e||O()},polyfillScrollBug:!0}),j=m.length>0,M=x!==null&&x.props,N=b&&p.length>0,P=(e,n)=>{let r=Cv(e,n);return t.default.createElement(`li`,vv({key:`item-${r}`,className:w([`nds-select-item`,`alignChild--left--center padding--x--s padding--y--xs`,{"nds-select-item--highlighted":E===r,"rounded--top":r===0,"rounded--bottom":r===n.length-1,"nds-select-item--hasGutter":j}])},D({item:e,index:r})),t.default.createElement(W,{as:`span`},t.default.createElement(W.Item,{as:`span`},e),M&&x.props.value===e.props.value&&t.default.createElement(W.Item,{as:`span`,shrink:!0},t.default.createElement(`span`,{className:`narmi-icon-check fontSize--xl fontWeight--bold`}))))},F=e=>{let t={};return(wv(E,e,p)||Tv(x,e))&&(t.open=!0),t};return t.default.createElement(`div`,{className:`nds-select`,"data-testid":f},t.default.createElement(`div`,k,t.default.createElement(mv,vv({isOpen:N,labelText:n,disabled:c,displayValue:xv(x)||_,labelProps:{...C()},hasError:!!d},S()))),t.default.createElement(Ao,{error:d}),t.default.createElement(`div`,A,t.default.createElement(`div`,vv({className:w([`nds-select-list`,`bgColor--white`,{"nds-select-list--error":!!d}])},T()),N&&j&&m.map(({label:e,kind:n,categoryChildren:r,isFlat:i})=>i?t.default.createElement(t.default.Fragment,null,e&&t.default.createElement(`h4`,{id:`select-category-${e}`,className:w([`fontFamily--default`,`padding--x--s padding--y--xs`,{"select-category-title--label":n===`label`,"select-category-title--heading":n===`heading`}])},e),t.default.createElement(`ul`,{className:`list--reset`,"aria-labelledby":`select-category-${e}`},r.map(e=>P(e,p)))):t.default.createElement(`details`,vv({key:e,className:`nds-select-category`},F(r)),t.default.createElement(`summary`,{className:w([`alignChild--left--center`,`padding--x--s`,{"select-category-title--label":n===`label`,"select-category-title--heading":n===`heading`||!n}])},t.default.createElement(`span`,{id:`select-category-${e}`},e),t.default.createElement(`span`,{className:`nds-category-icon narmi-icon-chevron-down`}),t.default.createElement(`span`,{className:`nds-category-icon narmi-icon-chevron-up`})),t.default.createElement(`ul`,{className:`list--reset`,"aria-labelledby":`select-category-${e}`},r.map(e=>P(e,p))))),N&&j&&t.default.createElement(`ul`,{className:`list--reset`},g.map(e=>P(e,p))),N&&!j&&t.default.createElement(`ul`,{className:`list--reset`},h.map(e=>P(e,p)),g.map(e=>P(e,p))))))};Dv.Item=hv,Dv.Action=gv,Dv.Category=_v;function Ov(){return Ov=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Ov.apply(null,arguments)}var kv=()=>{},Av=e=>{let t=!1;return e&&e.props&&(t=`label`in e.props),t},jv=e=>{let t=!1;return e&&(t=Av(e)||`value`in e.props),t},Mv=(e,t,n,r,i)=>{let a=!1;if(t>-1&&n.length>0){let e=n[t].props.value;a=r.map(e=>e.props.value).includes(e)}return typeof e==`string`&&e.length>0&&(a=!0),i&&(a=r.map(e=>e.props.value).includes(i.props.value)),a},Nv=(e,t)=>t.map(e=>e.props.value).reduce((t,n)=>{let r=e.find(e=>n===e.props.value);return r&&t.push(r),t},[]),Pv=(e,t)=>e.filter(e=>(e.props.searchValue||e.props.value).toLowerCase().startsWith(t)),Fv=e=>t.default.createElement(`span`,{className:`fontSize--xl fontColor--primary narmi-icon-${e?`chevron-up`:`chevron-down`}`}),Iv=({label:e,onChange:n=kv,onInputChange:r=kv,inputValue:i,filterItemsByInput:a=Pv,children:o,disableFiltering:s=!1,clearSelectionOnAction:c=!1,errorText:l,icon:u,testId:d,renderEndContent:f=Fv})=>{let p=(0,t.useMemo)(()=>t.default.Children.toArray(o),[o]),m=p.some(({type:e})=>e.displayName===uv.displayName),h=[],g=p.length<1?[]:p.filter(({props:e})=>`value`in e||`text`in e);m?(g=p.flatMap(({props:e})=>t.default.Children.toArray(e.children)),h=p.map(({props:e})=>({label:e.label,categoryChildren:t.default.Children.toArray(e.children)}))):g=p;let[_,v]=(0,t.useState)(g),y=t.useRef<HTMLInputElement>null,b=e=>e?.props?.searchValue||e?.props?.value||``,{isOpen:x,selectedItem:S,getInputProps:C,getMenuProps:T,getItemProps:E,highlightedIndex:D,inputValue:O,openMenu:k,closeMenu:A,reset:j}=Ma({items:_,inputValue:i,itemToString:b,onInputValueChange:({inputValue:e})=>{if(e.length===0){v(g),j(),r(``);return}if(!s){let t=g.filter(Av);v([...a(g.filter(e=>!Av(e)&&jv(e)),e.toLowerCase()),...t])}r(e)},onSelectedItemChange:({selectedItem:e})=>{n(e?e.props.value??``:``),A()},stateReducer:(e,t)=>{let{changes:n}=t,{selectedItem:r}=e,{selectedItem:i}=n;return Av(i)?(i.props.onSelect(),{...n,selectedItem:c?null:r,inputValue:c?``:b(r),isOpen:!1}):n}}),{anchorProps:M,layerProps:N}=Nn({isOpen:x,setIsOpen:e=>{e||A()},polyfillScrollBug:!0});(0,t.useEffect)(()=>{(!O||O.length===0)&&g.length!==_.length&&v(g)},[g,O]);let P=!!S,F=(e,n)=>{let r=Av(e),i=t.default.createElement(`li`,{key:`${e}-${n}`,className:`alignChild--left--center`},e);return jv(e)&&(i=t.default.createElement(`li`,Ov({key:`${e}-${n}`,className:w([`nds-combobox-item`,`alignChild--left--center padding--x--s`,{"nds-combobox-action":r,"padding--y--xs":!m,"nds-combobox-item--highlighted":D===n,"rounded--top":n===0,"rounded--bottom":n===_.length-1}])},E({item:e,index:n})),r&&t.default.createElement(W,{as:`span`,gapSize:`xxs`},t.default.createElement(W.Item,{as:`span`,shrink:!0},t.default.createElement(`span`,{className:`narmi-icon-plus fontWeight--bold`})),t.default.createElement(W.Item,{as:`span`},t.default.createElement(`span`,{className:`fontWeight--semibold`},e.props.label))),!r&&t.default.createElement(W,{as:`span`},t.default.createElement(W.Item,{as:`span`},e),P&&S.props.value===e.props.value&&t.default.createElement(W.Item,{as:`span`,shrink:!0},t.default.createElement(`span`,{className:`narmi-icon-check fontSize--xl fontWeight--bold`}))))),i},I=({label:e,categoryChildren:n})=>{let r={},i=Nv(_,n),a=i.length>0;return Mv(O,D,_,n,S)&&(r.open=!0),a?t.default.createElement(`details`,Ov({key:e,className:`nds-combobox-category`,tabIndex:-1},r),t.default.createElement(`summary`,{className:`fontWeight--bold alignChild--left--center padding--x--s padding--y-xs`,onFocus:e=>{e.target.blur()}},t.default.createElement(`span`,{id:`combobox-category-${e}`},e),t.default.createElement(`span`,{className:`nds-category-icon narmi-icon-chevron-down`}),t.default.createElement(`span`,{className:`nds-category-icon narmi-icon-chevron-up`})),t.default.createElement(`ul`,{className:`list--reset`,"aria-labelledby":`combobox-category-${e}`},i.map(e=>F(e,Cv(e,_))))):null},L=()=>{x||(k(),P&&v(g.filter(jv)))};return g.length<1?t.default.createElement(Bo,{error:l,label:e,startIcon:u,onChange:r,value:O}):t.default.createElement(t.default.Fragment,null,t.default.createElement(`div`,{className:w([`nds-combobox`,{"nds-combobox--active":x}]),"data-testid":d},t.default.createElement(`div`,M,t.default.createElement(Bo,Ov({error:l,renderError:!1,label:e,value:O,startIcon:u,endContent:f(x)},C({ref:y,onBlur:()=>{r(S?b(S):``),D!==-1&&A()},onFocus:L,onClick:L}),{onClick:L}))),t.default.createElement(Ao,{error:l,className:`margin--top--xs`}),t.default.createElement(`div`,N,t.default.createElement(`ul`,Ov({className:w([`nds-combobox-list`,`list--reset`,`bgColor--white`,{"nds-combobox-list--error":!!l}])},T()),x&&(m?h.map(I):_.map(F))))))};Iv.Item=cv,Iv.Heading=lv,Iv.Category=uv,Iv.Action=fv;var Lv=l(((e,t)=>{(function(n,r){typeof e==`object`&&t!==void 0?r(e):typeof define==`function`&&define.amd?define([`exports`],r):(n=typeof globalThis<`u`?globalThis:n||self,r(n.default={}))})(e,(function(e){"use strict";var t={weekdays:{shorthand:[`Sun`,`Mon`,`Tue`,`Wed`,`Thu`,`Fri`,`Sat`],longhand:[`Sunday`,`Monday`,`Tuesday`,`Wednesday`,`Thursday`,`Friday`,`Saturday`]},months:{shorthand:[`Jan`,`Feb`,`Mar`,`Apr`,`May`,`Jun`,`Jul`,`Aug`,`Sep`,`Oct`,`Nov`,`Dec`],longhand:[`January`,`February`,`March`,`April`,`May`,`June`,`July`,`August`,`September`,`October`,`November`,`December`]},daysInMonth:[31,28,31,30,31,30,31,31,30,31,30,31],firstDayOfWeek:0,ordinal:function(e){var t=e%100;if(t>3&&t<21)return`th`;switch(t%10){case 1:return`st`;case 2:return`nd`;case 3:return`rd`;default:return`th`}},rangeSeparator:` to `,weekAbbreviation:`Wk`,scrollTitle:`Scroll to increment`,toggleTitle:`Click to toggle`,amPM:[`AM`,`PM`],yearAriaLabel:`Year`,monthAriaLabel:`Month`,hourAriaLabel:`Hour`,minuteAriaLabel:`Minute`,time_24hr:!1};e.default=t,e.english=t,Object.defineProperty(e,"__esModule",{value:!0})}))}))(),Rv=[`onChange`,`onClose`,`onDayCreate`,`onDestroy`,`onKeyDown`,`onMonthChange`,`onOpen`,`onParseConfig`,`onReady`,`onValueUpdate`,`onYearChange`,`onPreCalendarPosition`],zv={_disable:[],allowInput:!1,allowInvalidPreload:!1,altFormat:`F j, Y`,altInput:!1,altInputClass:`form-control input`,animate:typeof window==`object`&&window.navigator.userAgent.indexOf(`MSIE`)===-1,ariaDateFormat:`F j, Y`,autoFillDefaultTime:!0,clickOpens:!0,closeOnSelect:!0,conjunction:`, `,dateFormat:`Y-m-d`,defaultHour:12,defaultMinute:0,defaultSeconds:0,disable:[],disableMobile:!1,enableSeconds:!1,enableTime:!1,errorHandler:function(e){return typeof console<`u`&&console.warn(e)},getWeek:function(e){var t=new Date(e.getTime());t.setHours(0,0,0,0),t.setDate(t.getDate()+3-(t.getDay()+6)%7);var n=new Date(t.getFullYear(),0,4);return 1+Math.round(((t.getTime()-n.getTime())/864e5-3+(n.getDay()+6)%7)/7)},hourIncrement:1,ignoredFocusElements:[],inline:!1,locale:`default`,minuteIncrement:5,mode:`single`,monthSelectorType:`dropdown`,nextArrow:`<svg version='1.1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' viewBox='0 0 17 17'><g></g><path d='M13.207 8.472l-7.854 7.854-0.707-0.707 7.146-7.146-7.146-7.148 0.707-0.707 7.854 7.854z' /></svg>`,noCalendar:!1,now:new Date,onChange:[],onClose:[],onDayCreate:[],onDestroy:[],onKeyDown:[],onMonthChange:[],onOpen:[],onParseConfig:[],onReady:[],onValueUpdate:[],onYearChange:[],onPreCalendarPosition:[],plugins:[],position:`auto`,positionElement:void 0,prevArrow:`<svg version='1.1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' viewBox='0 0 17 17'><g></g><path d='M5.207 8.471l7.146 7.147-0.707 0.707-7.853-7.854 7.854-7.853 0.707 0.707-7.147 7.146z' /></svg>`,shorthandCurrentMonth:!1,showMonths:1,static:!1,time_24hr:!1,weekNumbers:!1,wrap:!1},Bv={weekdays:{shorthand:[`Sun`,`Mon`,`Tue`,`Wed`,`Thu`,`Fri`,`Sat`],longhand:[`Sunday`,`Monday`,`Tuesday`,`Wednesday`,`Thursday`,`Friday`,`Saturday`]},months:{shorthand:[`Jan`,`Feb`,`Mar`,`Apr`,`May`,`Jun`,`Jul`,`Aug`,`Sep`,`Oct`,`Nov`,`Dec`],longhand:[`January`,`February`,`March`,`April`,`May`,`June`,`July`,`August`,`September`,`October`,`November`,`December`]},daysInMonth:[31,28,31,30,31,30,31,31,30,31,30,31],firstDayOfWeek:0,ordinal:function(e){var t=e%100;if(t>3&&t<21)return`th`;switch(t%10){case 1:return`st`;case 2:return`nd`;case 3:return`rd`;default:return`th`}},rangeSeparator:` to `,weekAbbreviation:`Wk`,scrollTitle:`Scroll to increment`,toggleTitle:`Click to toggle`,amPM:[`AM`,`PM`],yearAriaLabel:`Year`,monthAriaLabel:`Month`,hourAriaLabel:`Hour`,minuteAriaLabel:`Minute`,time_24hr:!1},Vv=function(e,t){return t===void 0&&(t=2),(`000`+e).slice(t*-1)},Hv=function(e){return+(e===!0)};function Uv(e,t){var n;return function(){var r=this,i=arguments;clearTimeout(n),n=setTimeout(function(){return e.apply(r,i)},t)}}var Wv=function(e){return e instanceof Array?e:[e]};function Gv(e,t,n){if(n===!0)return e.classList.add(t);e.classList.remove(t)}function $(e,t,n){var r=window.document.createElement(e);return t=t||``,n=n||``,r.className=t,n!==void 0&&(r.textContent=n),r}function Kv(e){for(;e.firstChild;)e.removeChild(e.firstChild)}function qv(e,t){if(t(e))return e;if(e.parentNode)return qv(e.parentNode,t)}function Jv(e,t){var n=$(`div`,`numInputWrapper`),r=$(`input`,`numInput `+e),i=$(`span`,`arrowUp`),a=$(`span`,`arrowDown`);if(navigator.userAgent.indexOf(`MSIE 9.0`)===-1?r.type=`number`:(r.type=`text`,r.pattern=`\\d*`),t!==void 0)for(var o in t)r.setAttribute(o,t[o]);return n.appendChild(r),n.appendChild(i),n.appendChild(a),n}function Yv(e){try{return typeof e.composedPath==`function`?e.composedPath()[0]:e.target}catch{return e.target}}var Xv=function(){},Zv=function(e,t,n){return n.months[t?`shorthand`:`longhand`][e]},Qv={D:Xv,F:function(e,t,n){e.setMonth(n.months.longhand.indexOf(t))},G:function(e,t){e.setHours((e.getHours()>=12?12:0)+parseFloat(t))},H:function(e,t){e.setHours(parseFloat(t))},J:function(e,t){e.setDate(parseFloat(t))},K:function(e,t,n){e.setHours(e.getHours()%12+12*Hv(new RegExp(n.amPM[1],`i`).test(t)))},M:function(e,t,n){e.setMonth(n.months.shorthand.indexOf(t))},S:function(e,t){e.setSeconds(parseFloat(t))},U:function(e,t){return new Date(parseFloat(t)*1e3)},W:function(e,t,n){var r=parseInt(t),i=new Date(e.getFullYear(),0,2+(r-1)*7,0,0,0,0);return i.setDate(i.getDate()-i.getDay()+n.firstDayOfWeek),i},Y:function(e,t){e.setFullYear(parseFloat(t))},Z:function(e,t){return new Date(t)},d:function(e,t){e.setDate(parseFloat(t))},h:function(e,t){e.setHours((e.getHours()>=12?12:0)+parseFloat(t))},i:function(e,t){e.setMinutes(parseFloat(t))},j:function(e,t){e.setDate(parseFloat(t))},l:Xv,m:function(e,t){e.setMonth(parseFloat(t)-1)},n:function(e,t){e.setMonth(parseFloat(t)-1)},s:function(e,t){e.setSeconds(parseFloat(t))},u:function(e,t){return new Date(parseFloat(t))},w:Xv,y:function(e,t){e.setFullYear(2e3+parseFloat(t))}},$v={D:``,F:``,G:`(\\d\\d|\\d)`,H:`(\\d\\d|\\d)`,J:`(\\d\\d|\\d)\\w+`,K:``,M:``,S:`(\\d\\d|\\d)`,U:`(.+)`,W:`(\\d\\d|\\d)`,Y:`(\\d{4})`,Z:`(.+)`,d:`(\\d\\d|\\d)`,h:`(\\d\\d|\\d)`,i:`(\\d\\d|\\d)`,j:`(\\d\\d|\\d)`,l:``,m:`(\\d\\d|\\d)`,n:`(\\d\\d|\\d)`,s:`(\\d\\d|\\d)`,u:`(.+)`,w:`(\\d\\d|\\d)`,y:`(\\d{2})`},ey={Z:function(e){return e.toISOString()},D:function(e,t,n){return t.weekdays.shorthand[ey.w(e,t,n)]},F:function(e,t,n){return Zv(ey.n(e,t,n)-1,!1,t)},G:function(e,t,n){return Vv(ey.h(e,t,n))},H:function(e){return Vv(e.getHours())},J:function(e,t){return t.ordinal===void 0?e.getDate():e.getDate()+t.ordinal(e.getDate())},K:function(e,t){return t.amPM[Hv(e.getHours()>11)]},M:function(e,t){return Zv(e.getMonth(),!0,t)},S:function(e){return Vv(e.getSeconds())},U:function(e){return e.getTime()/1e3},W:function(e,t,n){return n.getWeek(e)},Y:function(e){return Vv(e.getFullYear(),4)},d:function(e){return Vv(e.getDate())},h:function(e){return e.getHours()%12?e.getHours()%12:12},i:function(e){return Vv(e.getMinutes())},j:function(e){return e.getDate()},l:function(e,t){return t.weekdays.longhand[e.getDay()]},m:function(e){return Vv(e.getMonth()+1)},n:function(e){return e.getMonth()+1},s:function(e){return e.getSeconds()},u:function(e){return e.getTime()},w:function(e){return e.getDay()},y:function(e){return String(e.getFullYear()).substring(2)}},ty=function(e){var t=e.config,n=t===void 0?zv:t,r=e.l10n,i=r===void 0?Bv:r,a=e.isMobile,o=a===void 0?!1:a;return function(e,t,r){var a=r||i;return n.formatDate!==void 0&&!o?n.formatDate(e,t,a):t.split(``).map(function(t,r,i){return ey[t]&&i[r-1]!==`\\`?ey[t](e,a,n):t===`\\`?``:t}).join(``)}},ny=function(e){var t=e.config,n=t===void 0?zv:t,r=e.l10n,i=r===void 0?Bv:r;return function(e,t,r,a){if(!(e!==0&&!e)){var o=a||i,s,c=e;if(e instanceof Date)s=new Date(e.getTime());else if(typeof e!=`string`&&e.toFixed!==void 0)s=new Date(e);else if(typeof e==`string`){var l=t||(n||zv).dateFormat,u=String(e).trim();if(u===`today`)s=new Date,r=!0;else if(n&&n.parseDate)s=n.parseDate(e,l);else if(/Z$/.test(u)||/GMT$/.test(u))s=new Date(e);else{for(var d=void 0,f=[],p=0,m=0,h=``;p<l.length;p++){var g=l[p],_=g===`\\`,v=l[p-1]===`\\`||_;if($v[g]&&!v){h+=$v[g];var y=new RegExp(h).exec(e);y&&(d=!0)&&f[g===`Y`?`unshift`:`push`]({fn:Qv[g],val:y[++m]})}else _||(h+=`.`)}s=!n||!n.noCalendar?new Date(new Date().getFullYear(),0,1,0,0,0,0):new Date(new Date().setHours(0,0,0,0)),f.forEach(function(e){var t=e.fn,n=e.val;return s=t(s,n,o)||s}),s=d?s:void 0}}if(!(s instanceof Date&&!isNaN(s.getTime()))){n.errorHandler(Error(`Invalid date provided: `+c));return}return r===!0&&s.setHours(0,0,0,0),s}}};function ry(e,t,n){return n===void 0&&(n=!0),n===!1?e.getTime()-t.getTime():new Date(e.getTime()).setHours(0,0,0,0)-new Date(t.getTime()).setHours(0,0,0,0)}var iy=function(e,t,n){return e>Math.min(t,n)&&e<Math.max(t,n)},ay=function(e,t,n){return e*3600+t*60+n},oy=function(e){var t=Math.floor(e/3600),n=(e-t*3600)/60;return[t,n,e-t*3600-n*60]},sy={DAY:864e5};function cy(e){var t=e.defaultHour,n=e.defaultMinute,r=e.defaultSeconds;if(e.minDate!==void 0){var i=e.minDate.getHours(),a=e.minDate.getMinutes(),o=e.minDate.getSeconds();t<i&&(t=i),t===i&&n<a&&(n=a),t===i&&n===a&&r<o&&(r=e.minDate.getSeconds())}if(e.maxDate!==void 0){var s=e.maxDate.getHours(),c=e.maxDate.getMinutes();t=Math.min(t,s),t===s&&(n=Math.min(c,n)),t===s&&n===c&&(r=e.maxDate.getSeconds())}return{hours:t,minutes:n,seconds:r}}typeof Object.assign!=`function`&&(Object.assign=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];if(!e)throw TypeError(`Cannot convert undefined or null to object`);for(var r=function(t){t&&Object.keys(t).forEach(function(n){return e[n]=t[n]})},i=0,a=t;i<a.length;i++){var o=a[i];r(o)}return e});var ly=function(){return ly=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n],t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},ly.apply(this,arguments)},uy=function(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;for(var r=Array(e),i=0,t=0;t<n;t++)for(var a=arguments[t],o=0,s=a.length;o<s;o++,i++)r[i]=a[o];return r},dy=300;function fy(e,t){var n={config:ly(ly({},zv),my.defaultConfig),l10n:Bv};n.parseDate=ny({config:n.config,l10n:n.l10n}),n._handlers=[],n.pluginElements=[],n.loadedPlugins=[],n._bind=h,n._setHoursFromDate=f,n._positionCalendar=me,n.changeMonth=L,n.changeYear=ae,n.clear=ee,n.close=te,n.onMouseOver=z,n._createElement=$,n.createDay=S,n.destroy=ne,n.isEnabled=oe,n.jumpToDate=v,n.updateValue=Fe,n.open=B,n.redraw=_e,n.set=xe,n.setDate=Ce,n.toggle=ke;function r(){n.utils={getDaysInMonth:function(e,t){return e===void 0&&(e=n.currentMonth),t===void 0&&(t=n.currentYear),e===1&&(t%4==0&&t%100!=0||t%400==0)?29:n.l10n.daysInMonth[e]}}}function i(){n.element=n.input=e,n.isOpen=!1,de(),pe(),Ee(),Te(),r(),n.isMobile||x(),_(),(n.selectedDates.length||n.config.noCalendar)&&(n.config.enableTime&&f(n.config.noCalendar?n.latestSelectedDateObj:void 0),Fe(!1)),s();var t=/^((?!chrome|android).)*safari/i.test(navigator.userAgent);!n.isMobile&&t&&me(),V(`onReady`)}function a(){return(n.calendarContainer?.getRootNode()).activeElement||document.activeElement}function o(e){return e.bind(n)}function s(){var e=n.config;e.weekNumbers===!1&&e.showMonths===1||e.noCalendar!==!0&&window.requestAnimationFrame(function(){if(n.calendarContainer!==void 0&&(n.calendarContainer.style.visibility=`hidden`,n.calendarContainer.style.display=`block`),n.daysContainer!==void 0){var t=(n.days.offsetWidth+1)*e.showMonths;n.daysContainer.style.width=t+`px`,n.calendarContainer.style.width=t+(n.weekWrapper===void 0?0:n.weekWrapper.offsetWidth)+`px`,n.calendarContainer.style.removeProperty(`visibility`),n.calendarContainer.style.removeProperty(`display`)}})}function c(e){if(n.selectedDates.length===0){var t=n.config.minDate===void 0||ry(new Date,n.config.minDate)>=0?new Date:new Date(n.config.minDate.getTime()),r=cy(n.config);t.setHours(r.hours,r.minutes,r.seconds,t.getMilliseconds()),n.selectedDates=[t],n.latestSelectedDateObj=t}e!==void 0&&e.type!==`blur`&&Le(e);var i=n._input.value;d(),Fe(),n._input.value!==i&&n._debouncedChange()}function l(e,t){return e%12+12*Hv(t===n.l10n.amPM[1])}function u(e){switch(e%24){case 0:case 12:return 12;default:return e%12}}function d(){if(!(n.hourElement===void 0||n.minuteElement===void 0)){var e=(parseInt(n.hourElement.value.slice(-2),10)||0)%24,t=(parseInt(n.minuteElement.value,10)||0)%60,r=n.secondElement===void 0?0:(parseInt(n.secondElement.value,10)||0)%60;n.amPM!==void 0&&(e=l(e,n.amPM.textContent));var i=n.config.minTime!==void 0||n.config.minDate&&n.minDateHasTime&&n.latestSelectedDateObj&&ry(n.latestSelectedDateObj,n.config.minDate,!0)===0,a=n.config.maxTime!==void 0||n.config.maxDate&&n.maxDateHasTime&&n.latestSelectedDateObj&&ry(n.latestSelectedDateObj,n.config.maxDate,!0)===0;if(n.config.maxTime!==void 0&&n.config.minTime!==void 0&&n.config.minTime>n.config.maxTime){var o=ay(n.config.minTime.getHours(),n.config.minTime.getMinutes(),n.config.minTime.getSeconds()),s=ay(n.config.maxTime.getHours(),n.config.maxTime.getMinutes(),n.config.maxTime.getSeconds()),c=ay(e,t,r);if(c>s&&c<o){var u=oy(o);e=u[0],t=u[1],r=u[2]}}else{if(a){var d=n.config.maxTime===void 0?n.config.maxDate:n.config.maxTime;e=Math.min(e,d.getHours()),e===d.getHours()&&(t=Math.min(t,d.getMinutes())),t===d.getMinutes()&&(r=Math.min(r,d.getSeconds()))}if(i){var f=n.config.minTime===void 0?n.config.minDate:n.config.minTime;e=Math.max(e,f.getHours()),e===f.getHours()&&t<f.getMinutes()&&(t=f.getMinutes()),t===f.getMinutes()&&(r=Math.max(r,f.getSeconds()))}}p(e,t,r)}}function f(e){var t=e||n.latestSelectedDateObj;t&&t instanceof Date&&p(t.getHours(),t.getMinutes(),t.getSeconds())}function p(e,t,r){n.latestSelectedDateObj!==void 0&&n.latestSelectedDateObj.setHours(e%24,t,r||0,0),!(!n.hourElement||!n.minuteElement||n.isMobile)&&(n.hourElement.value=Vv(n.config.time_24hr?e:(12+e)%12+12*Hv(e%12==0)),n.minuteElement.value=Vv(t),n.amPM!==void 0&&(n.amPM.textContent=n.l10n.amPM[Hv(e>=12)]),n.secondElement!==void 0&&(n.secondElement.value=Vv(r)))}function m(e){var t=Yv(e),n=parseInt(t.value)+(e.delta||0);(n/1e3>1||e.key===`Enter`&&!/[^\d]/.test(n.toString()))&&ae(n)}function h(e,t,r,i){if(t instanceof Array)return t.forEach(function(t){return h(e,t,r,i)});if(e instanceof Array)return e.forEach(function(e){return h(e,t,r,i)});e.addEventListener(t,r,i),n._handlers.push({remove:function(){return e.removeEventListener(t,r,i)}})}function g(){V(`onChange`)}function _(){if(n.config.wrap&&[`open`,`close`,`toggle`,`clear`].forEach(function(e){Array.prototype.forEach.call(n.element.querySelectorAll(`[data-`+e+`]`),function(t){return h(t,`click`,n[e])})}),n.isMobile){Oe();return}var e=Uv(le,50);n._debouncedChange=Uv(g,dy),n.daysContainer&&!/iPhone|iPad|iPod/i.test(navigator.userAgent)&&h(n.daysContainer,`mouseover`,function(e){n.config.mode===`range`&&z(Yv(e))}),h(n._input,`keydown`,ce),n.calendarContainer!==void 0&&h(n.calendarContainer,`keydown`,ce),!n.config.inline&&!n.config.static&&h(window,`resize`,e),window.ontouchstart===void 0?h(window.document,`mousedown`,ie):h(window.document,`touchstart`,ie),h(window.document,`focus`,ie,{capture:!0}),n.config.clickOpens===!0&&(h(n._input,`focus`,n.open),h(n._input,`click`,n.open)),n.daysContainer!==void 0&&(h(n.monthNav,`click`,Ie),h(n.monthNav,[`keyup`,`increment`],m),h(n.daysContainer,`click`,ye)),n.timeContainer!==void 0&&n.minuteElement!==void 0&&n.hourElement!==void 0&&(h(n.timeContainer,[`increment`],c),h(n.timeContainer,`blur`,c,{capture:!0}),h(n.timeContainer,`click`,y),h([n.hourElement,n.minuteElement],[`focus`,`click`],function(e){return Yv(e).select()}),n.secondElement!==void 0&&h(n.secondElement,`focus`,function(){return n.secondElement&&n.secondElement.select()}),n.amPM!==void 0&&h(n.amPM,`click`,function(e){c(e)})),n.config.allowInput&&h(n._input,`blur`,R)}function v(e,t){var r=e===void 0?n.latestSelectedDateObj||(n.config.minDate&&n.config.minDate>n.now?n.config.minDate:n.config.maxDate&&n.config.maxDate<n.now?n.config.maxDate:n.now):n.parseDate(e),i=n.currentYear,a=n.currentMonth;try{r!==void 0&&(n.currentYear=r.getFullYear(),n.currentMonth=r.getMonth())}catch(e){e.message=`Invalid date supplied: `+r,n.config.errorHandler(e)}t&&n.currentYear!==i&&(V(`onYearChange`),k()),t&&(n.currentYear!==i||n.currentMonth!==a)&&V(`onMonthChange`),n.redraw()}function y(e){var t=Yv(e);~t.className.indexOf(`arrow`)&&b(e,t.classList.contains(`arrowUp`)?1:-1)}function b(e,t,n){var r=e&&Yv(e),i=n||r&&r.parentNode&&r.parentNode.firstChild,a=Ae(`increment`);a.delta=t,i&&i.dispatchEvent(a)}function x(){var e=window.document.createDocumentFragment();if(n.calendarContainer=$(`div`,`flatpickr-calendar`),n.calendarContainer.tabIndex=-1,!n.config.noCalendar){if(e.appendChild(M()),n.innerContainer=$(`div`,`flatpickr-innerContainer`),n.config.weekNumbers){var t=I(),r=t.weekWrapper,i=t.weekNumbers;n.innerContainer.appendChild(r),n.weekNumbers=i,n.weekWrapper=r}n.rContainer=$(`div`,`flatpickr-rContainer`),n.rContainer.appendChild(P()),n.daysContainer||(n.daysContainer=$(`div`,`flatpickr-days`),n.daysContainer.tabIndex=-1),O(),n.rContainer.appendChild(n.daysContainer),n.innerContainer.appendChild(n.rContainer),e.appendChild(n.innerContainer)}n.config.enableTime&&e.appendChild(N()),Gv(n.calendarContainer,`rangeMode`,n.config.mode===`range`),Gv(n.calendarContainer,`animate`,n.config.animate===!0),Gv(n.calendarContainer,`multiMonth`,n.config.showMonths>1),n.calendarContainer.appendChild(e);var a=n.config.appendTo!==void 0&&n.config.appendTo.nodeType!==void 0;if((n.config.inline||n.config.static)&&(n.calendarContainer.classList.add(n.config.inline?`inline`:`static`),n.config.inline&&(!a&&n.element.parentNode?n.element.parentNode.insertBefore(n.calendarContainer,n._input.nextSibling):n.config.appendTo!==void 0&&n.config.appendTo.appendChild(n.calendarContainer)),n.config.static)){var o=$(`div`,`flatpickr-wrapper`);n.element.parentNode&&n.element.parentNode.insertBefore(o,n.element),o.appendChild(n.element),n.altInput&&o.appendChild(n.altInput),o.appendChild(n.calendarContainer)}!n.config.static&&!n.config.inline&&(n.config.appendTo===void 0?window.document.body:n.config.appendTo).appendChild(n.calendarContainer)}function S(e,t,r,i){var a=oe(t,!0),o=$(`span`,e,t.getDate().toString());return o.dateObj=t,o.$i=i,o.setAttribute(`aria-label`,n.formatDate(t,n.config.ariaDateFormat)),e.indexOf(`hidden`)===-1&&ry(t,n.now)===0&&(n.todayDateElem=o,o.classList.add(`today`),o.setAttribute(`aria-current`,`date`)),a?(o.tabIndex=-1,je(t)&&(o.classList.add(`selected`),n.selectedDateElem=o,n.config.mode===`range`&&(Gv(o,`startRange`,n.selectedDates[0]&&ry(t,n.selectedDates[0],!0)===0),Gv(o,`endRange`,n.selectedDates[1]&&ry(t,n.selectedDates[1],!0)===0),e===`nextMonthDay`&&o.classList.add(`inRange`)))):o.classList.add(`flatpickr-disabled`),n.config.mode===`range`&&Me(t)&&!je(t)&&o.classList.add(`inRange`),n.weekNumbers&&n.config.showMonths===1&&e!==`prevMonthDay`&&i%7==6&&n.weekNumbers.insertAdjacentHTML(`beforeend`,`<span class='flatpickr-day'>`+n.config.getWeek(t)+`</span>`),V(`onDayCreate`,o),o}function C(e){e.focus(),n.config.mode===`range`&&z(e)}function w(e){for(var t=e>0?0:n.config.showMonths-1,r=e>0?n.config.showMonths:-1,i=t;i!=r;i+=e)for(var a=n.daysContainer.children[i],o=e>0?0:a.children.length-1,s=e>0?a.children.length:-1,c=o;c!=s;c+=e){var l=a.children[c];if(l.className.indexOf(`hidden`)===-1&&oe(l.dateObj))return l}}function T(e,t){for(var r=e.className.indexOf(`Month`)===-1?e.dateObj.getMonth():n.currentMonth,i=t>0?n.config.showMonths:-1,a=t>0?1:-1,o=r-n.currentMonth;o!=i;o+=a)for(var s=n.daysContainer.children[o],c=r-n.currentMonth===o?e.$i+t:t<0?s.children.length-1:0,l=s.children.length,u=c;u>=0&&u<l&&u!=(t>0?l:-1);u+=a){var d=s.children[u];if(d.className.indexOf(`hidden`)===-1&&oe(d.dateObj)&&Math.abs(e.$i-u)>=Math.abs(t))return C(d)}n.changeMonth(a),E(w(a),0)}function E(e,t){var r=a(),i=se(r||document.body),o=e===void 0?i?r:n.selectedDateElem!==void 0&&se(n.selectedDateElem)?n.selectedDateElem:n.todayDateElem!==void 0&&se(n.todayDateElem)?n.todayDateElem:w(t>0?1:-1):e;o===void 0?n._input.focus():i?T(o,t):C(o)}function D(e,t){for(var r=(new Date(e,t,1).getDay()-n.l10n.firstDayOfWeek+7)%7,i=n.utils.getDaysInMonth((t-1+12)%12,e),a=n.utils.getDaysInMonth(t,e),o=window.document.createDocumentFragment(),s=n.config.showMonths>1,c=s?`prevMonthDay hidden`:`prevMonthDay`,l=s?`nextMonthDay hidden`:`nextMonthDay`,u=i+1-r,d=0;u<=i;u++,d++)o.appendChild(S(`flatpickr-day `+c,new Date(e,t-1,u),u,d));for(u=1;u<=a;u++,d++)o.appendChild(S(`flatpickr-day`,new Date(e,t,u),u,d));for(var f=a+1;f<=42-r&&(n.config.showMonths===1||d%7!=0);f++,d++)o.appendChild(S(`flatpickr-day `+l,new Date(e,t+1,f%a),f,d));var p=$(`div`,`dayContainer`);return p.appendChild(o),p}function O(){if(n.daysContainer!==void 0){Kv(n.daysContainer),n.weekNumbers&&Kv(n.weekNumbers);for(var e=document.createDocumentFragment(),t=0;t<n.config.showMonths;t++){var r=new Date(n.currentYear,n.currentMonth,1);r.setMonth(n.currentMonth+t),e.appendChild(D(r.getFullYear(),r.getMonth()))}n.daysContainer.appendChild(e),n.days=n.daysContainer.firstChild,n.config.mode===`range`&&n.selectedDates.length===1&&z()}}function k(){if(!(n.config.showMonths>1||n.config.monthSelectorType!==`dropdown`)){var e=function(e){return n.config.minDate!==void 0&&n.currentYear===n.config.minDate.getFullYear()&&e<n.config.minDate.getMonth()?!1:!(n.config.maxDate!==void 0&&n.currentYear===n.config.maxDate.getFullYear()&&e>n.config.maxDate.getMonth())};n.monthsDropdownContainer.tabIndex=-1,n.monthsDropdownContainer.innerHTML=``;for(var t=0;t<12;t++)if(e(t)){var r=$(`option`,`flatpickr-monthDropdown-month`);r.value=new Date(n.currentYear,t).getMonth().toString(),r.textContent=Zv(t,n.config.shorthandCurrentMonth,n.l10n),r.tabIndex=-1,n.currentMonth===t&&(r.selected=!0),n.monthsDropdownContainer.appendChild(r)}}}function A(){var e=$(`div`,`flatpickr-month`),t=window.document.createDocumentFragment(),r;n.config.showMonths>1||n.config.monthSelectorType===`static`?r=$(`span`,`cur-month`):(n.monthsDropdownContainer=$(`select`,`flatpickr-monthDropdown-months`),n.monthsDropdownContainer.setAttribute(`aria-label`,n.l10n.monthAriaLabel),h(n.monthsDropdownContainer,`change`,function(e){var t=Yv(e),r=parseInt(t.value,10);n.changeMonth(r-n.currentMonth),V(`onMonthChange`)}),k(),r=n.monthsDropdownContainer);var i=Jv(`cur-year`,{tabindex:`-1`}),a=i.getElementsByTagName(`input`)[0];a.setAttribute(`aria-label`,n.l10n.yearAriaLabel),n.config.minDate&&a.setAttribute(`min`,n.config.minDate.getFullYear().toString()),n.config.maxDate&&(a.setAttribute(`max`,n.config.maxDate.getFullYear().toString()),a.disabled=!!n.config.minDate&&n.config.minDate.getFullYear()===n.config.maxDate.getFullYear());var o=$(`div`,`flatpickr-current-month`);return o.appendChild(r),o.appendChild(i),t.appendChild(o),e.appendChild(t),{container:e,yearElement:a,monthElement:r}}function j(){Kv(n.monthNav),n.monthNav.appendChild(n.prevMonthNav),n.config.showMonths&&(n.yearElements=[],n.monthElements=[]);for(var e=n.config.showMonths;e--;){var t=A();n.yearElements.push(t.yearElement),n.monthElements.push(t.monthElement),n.monthNav.appendChild(t.container)}n.monthNav.appendChild(n.nextMonthNav)}function M(){return n.monthNav=$(`div`,`flatpickr-months`),n.yearElements=[],n.monthElements=[],n.prevMonthNav=$(`span`,`flatpickr-prev-month`),n.prevMonthNav.innerHTML=n.config.prevArrow,n.nextMonthNav=$(`span`,`flatpickr-next-month`),n.nextMonthNav.innerHTML=n.config.nextArrow,j(),Object.defineProperty(n,"_hidePrevMonthArrow",{get:function(){return n.__hidePrevMonthArrow},set:function(e){n.__hidePrevMonthArrow!==e&&(Gv(n.prevMonthNav,`flatpickr-disabled`,e),n.__hidePrevMonthArrow=e)}}),Object.defineProperty(n,"_hideNextMonthArrow",{get:function(){return n.__hideNextMonthArrow},set:function(e){n.__hideNextMonthArrow!==e&&(Gv(n.nextMonthNav,`flatpickr-disabled`,e),n.__hideNextMonthArrow=e)}}),n.currentYearElement=n.yearElements[0],Ne(),n.monthNav}function N(){n.calendarContainer.classList.add(`hasTime`),n.config.noCalendar&&n.calendarContainer.classList.add(`noCalendar`);var e=cy(n.config);n.timeContainer=$(`div`,`flatpickr-time`),n.timeContainer.tabIndex=-1;var t=$(`span`,`flatpickr-time-separator`,`:`),r=Jv(`flatpickr-hour`,{"aria-label":n.l10n.hourAriaLabel});n.hourElement=r.getElementsByTagName(`input`)[0];var i=Jv(`flatpickr-minute`,{"aria-label":n.l10n.minuteAriaLabel});if(n.minuteElement=i.getElementsByTagName(`input`)[0],n.hourElement.tabIndex=n.minuteElement.tabIndex=-1,n.hourElement.value=Vv(n.latestSelectedDateObj?n.latestSelectedDateObj.getHours():n.config.time_24hr?e.hours:u(e.hours)),n.minuteElement.value=Vv(n.latestSelectedDateObj?n.latestSelectedDateObj.getMinutes():e.minutes),n.hourElement.setAttribute(`step`,n.config.hourIncrement.toString()),n.minuteElement.setAttribute(`step`,n.config.minuteIncrement.toString()),n.hourElement.setAttribute(`min`,n.config.time_24hr?`0`:`1`),n.hourElement.setAttribute(`max`,n.config.time_24hr?`23`:`12`),n.hourElement.setAttribute(`maxlength`,`2`),n.minuteElement.setAttribute(`min`,`0`),n.minuteElement.setAttribute(`max`,`59`),n.minuteElement.setAttribute(`maxlength`,`2`),n.timeContainer.appendChild(r),n.timeContainer.appendChild(t),n.timeContainer.appendChild(i),n.config.time_24hr&&n.timeContainer.classList.add(`time24hr`),n.config.enableSeconds){n.timeContainer.classList.add(`hasSeconds`);var a=Jv(`flatpickr-second`);n.secondElement=a.getElementsByTagName(`input`)[0],n.secondElement.value=Vv(n.latestSelectedDateObj?n.latestSelectedDateObj.getSeconds():e.seconds),n.secondElement.setAttribute(`step`,n.minuteElement.getAttribute(`step`)),n.secondElement.setAttribute(`min`,`0`),n.secondElement.setAttribute(`max`,`59`),n.secondElement.setAttribute(`maxlength`,`2`),n.timeContainer.appendChild($(`span`,`flatpickr-time-separator`,`:`)),n.timeContainer.appendChild(a)}return n.config.time_24hr||(n.amPM=$(`span`,`flatpickr-am-pm`,n.l10n.amPM[Hv((n.latestSelectedDateObj?n.hourElement.value:n.config.defaultHour)>11)]),n.amPM.title=n.l10n.toggleTitle,n.amPM.tabIndex=-1,n.timeContainer.appendChild(n.amPM)),n.timeContainer}function P(){n.weekdayContainer?Kv(n.weekdayContainer):n.weekdayContainer=$(`div`,`flatpickr-weekdays`);for(var e=n.config.showMonths;e--;){var t=$(`div`,`flatpickr-weekdaycontainer`);n.weekdayContainer.appendChild(t)}return F(),n.weekdayContainer}function F(){if(n.weekdayContainer){var e=n.l10n.firstDayOfWeek,t=uy(n.l10n.weekdays.shorthand);e>0&&e<t.length&&(t=uy(t.splice(e,t.length),t.splice(0,e)));for(var r=n.config.showMonths;r--;)n.weekdayContainer.children[r].innerHTML=`
|
|
67
67
|
<span class='flatpickr-weekday'>
|
|
68
68
|
`+t.join(`</span><span class='flatpickr-weekday'>`)+`
|
|
69
69
|
</span>
|