@lifesg/react-design-system 1.0.0 → 1.0.2

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/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import require$$0,{jsx,jsxs,Fragment}from"react/jsx-runtime";import*as React from"react";import React__default,{cloneElement,useRef,useState,isValidElement,createRef,PureComponent,useEffect,useLayoutEffect,forwardRef,useCallback,useContext,useMemo,Children,useImperativeHandle,createElement}from"react";import ReactDOM,{findDOMNode,unstable_batchedUpdates}from"react-dom";import styled,{css,keyframes,useTheme}from"styled-components";var extendStatics=function(e,t){return extendStatics=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},extendStatics(e,t)};function __extends(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}extendStatics(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}var __assign=function(){return __assign=Object.assign||function(e){for(var t,r=1,i=arguments.length;r<i;r++)for(var a in t=arguments[r])Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a]);return e},__assign.apply(this,arguments)};function __rest(e,t){var r={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.indexOf(i)<0&&(r[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var a=0;for(i=Object.getOwnPropertySymbols(e);a<i.length;a++)t.indexOf(i[a])<0&&Object.prototype.propertyIsEnumerable.call(e,i[a])&&(r[i[a]]=e[i[a]])}return r}var commonjsGlobal$1="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function isObject$3$1(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}var isObject_1$1=isObject$3$1,freeGlobal$1$1="object"==typeof commonjsGlobal$1&&commonjsGlobal$1&&commonjsGlobal$1.Object===Object&&commonjsGlobal$1,_freeGlobal$1=freeGlobal$1$1,freeGlobal$2=_freeGlobal$1,freeSelf$1="object"==typeof self&&self&&self.Object===Object&&self,root$2$1=freeGlobal$2||freeSelf$1||Function("return this")(),_root$1=root$2$1,root$1$1=_root$1,now$1$1=function(){return root$1$1.Date.now()},now_1$1=now$1$1,reWhitespace$1=/\s/;function trimmedEndIndex$1$1(e){for(var t=e.length;t--&&reWhitespace$1.test(e.charAt(t)););return t}var _trimmedEndIndex$1=trimmedEndIndex$1$1,trimmedEndIndex$2=_trimmedEndIndex$1,reTrimStart$1=/^\s+/;function baseTrim$1$1(e){return e?e.slice(0,trimmedEndIndex$2(e)+1).replace(reTrimStart$1,""):e}var _baseTrim$1=baseTrim$1$1,root$a=_root$1,Symbol$2$1=root$a.Symbol,_Symbol$1=Symbol$2$1,Symbol$1$1=_Symbol$1,objectProto$1$1=Object.prototype,hasOwnProperty$a=objectProto$1$1.hasOwnProperty,nativeObjectToString$1$1=objectProto$1$1.toString,symToStringTag$1$1=Symbol$1$1?Symbol$1$1.toStringTag:void 0;function getRawTag$1$1(e){var t=hasOwnProperty$a.call(e,symToStringTag$1$1),r=e[symToStringTag$1$1];try{e[symToStringTag$1$1]=void 0;var i=!0}catch(e){}var a=nativeObjectToString$1$1.call(e);return i&&(t?e[symToStringTag$1$1]=r:delete e[symToStringTag$1$1]),a}var _getRawTag$1=getRawTag$1$1,objectProto$c=Object.prototype,nativeObjectToString$2=objectProto$c.toString;function objectToString$1$1(e){return nativeObjectToString$2.call(e)}var _objectToString$1=objectToString$1$1,Symbol$6=_Symbol$1,getRawTag$2=_getRawTag$1,objectToString$2=_objectToString$1,nullTag$1="[object Null]",undefinedTag$1="[object Undefined]",symToStringTag$2=Symbol$6?Symbol$6.toStringTag:void 0;function baseGetTag$1$1(e){return null==e?void 0===e?undefinedTag$1:nullTag$1:symToStringTag$2&&symToStringTag$2 in Object(e)?getRawTag$2(e):objectToString$2(e)}var _baseGetTag$1=baseGetTag$1$1;function isObjectLike$1$1(e){return null!=e&&"object"==typeof e}var isObjectLike_1$1=isObjectLike$1$1,baseGetTag$6=_baseGetTag$1,isObjectLike$6=isObjectLike_1$1,symbolTag$2="[object Symbol]";function isSymbol$1$1(e){return"symbol"==typeof e||isObjectLike$6(e)&&baseGetTag$6(e)==symbolTag$2}var isSymbol_1$1=isSymbol$1$1,baseTrim$2=_baseTrim$1,isObject$2$1=isObject_1$1,isSymbol$5=isSymbol_1$1,NAN$1=NaN,reIsBadHex$1=/^[-+]0x[0-9a-f]+$/i,reIsBinary$1=/^0b[01]+$/i,reIsOctal$1=/^0o[0-7]+$/i,freeParseInt$1=parseInt;function toNumber$1$1(e){if("number"==typeof e)return e;if(isSymbol$5(e))return NAN$1;if(isObject$2$1(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=isObject$2$1(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=baseTrim$2(e);var r=reIsBinary$1.test(e);return r||reIsOctal$1.test(e)?freeParseInt$1(e.slice(2),r?2:8):reIsBadHex$1.test(e)?NAN$1:+e}var toNumber_1$1=toNumber$1$1,isObject$1$1=isObject_1$1,now$2=now_1$1,toNumber$3=toNumber_1$1,FUNC_ERROR_TEXT$1$1="Expected a function",nativeMax$2=Math.max,nativeMin$1=Math.min;function debounce$1(e,t,r){var i,a,n,s,o,l,p=0,c=!1,h=!1,d=!0;if("function"!=typeof e)throw new TypeError(FUNC_ERROR_TEXT$1$1);function u(t){var r=i,n=a;return i=a=void 0,p=t,s=e.apply(n,r)}function m(e){var r=e-l;return void 0===l||r>=t||r<0||h&&e-p>=n}function f(){var e=now$2();if(m(e))return y(e);o=setTimeout(f,function(e){var r=t-(e-l);return h?nativeMin$1(r,n-(e-p)):r}(e))}function y(e){return o=void 0,d&&i?u(e):(i=a=void 0,s)}function g(){var e=now$2(),r=m(e);if(i=arguments,a=this,l=e,r){if(void 0===o)return function(e){return p=e,o=setTimeout(f,t),c?u(e):s}(l);if(h)return clearTimeout(o),o=setTimeout(f,t),u(l)}return void 0===o&&(o=setTimeout(f,t)),s}return t=toNumber$3(t)||0,isObject$1$1(r)&&(c=!!r.leading,n=(h="maxWait"in r)?nativeMax$2(toNumber$3(r.maxWait)||0,t):n,d="trailing"in r?!!r.trailing:d),g.cancel=function(){void 0!==o&&clearTimeout(o),p=0,i=l=a=o=void 0},g.flush=function(){return void 0===o?s:y(now$2())},g}var debounce_1$1=debounce$1,debounce$2=debounce_1$1,isObject$6=isObject_1$1,FUNC_ERROR_TEXT$2="Expected a function";function throttle(e,t,r){var i=!0,a=!0;if("function"!=typeof e)throw new TypeError(FUNC_ERROR_TEXT$2);return isObject$6(r)&&(i="leading"in r?!!r.leading:i,a="trailing"in r?!!r.trailing:a),debounce$2(e,t,{leading:i,maxWait:t,trailing:a})}var throttle_1=throttle,patchResizeHandler=function(e,t,r,i){switch(t){case"debounce":return debounce_1$1(e,r,i);case"throttle":return throttle_1(e,r,i);default:return e}},isFunction$3=function(e){return"function"==typeof e},isSSR$1=function(){return"undefined"==typeof window},isDOMElement=function(e){return e instanceof Element||e instanceof HTMLDocument},createNotifier=function(e,t,r,i){return function(a){var n=a.width,s=a.height;t((function(t){return t.width===n&&t.height===s||t.width===n&&!i||t.height===s&&!r?t:(e&&isFunction$3(e)&&e(n,s),{width:n,height:s})}))}};!function(e){function t(t){var r=e.call(this,t)||this;r.cancelHandler=function(){r.resizeHandler&&r.resizeHandler.cancel&&(r.resizeHandler.cancel(),r.resizeHandler=null)},r.attachObserver=function(){var e=r.props,t=e.targetRef,i=e.observerOptions;if(!isSSR$1()){t&&t.current&&(r.targetRef.current=t.current);var a=r.getElement();a&&(r.observableElement&&r.observableElement===a||(r.observableElement=a,r.resizeObserver.observe(a,i)))}},r.getElement=function(){var e=r.props,t=e.querySelector,i=e.targetDomEl;if(isSSR$1())return null;if(t)return document.querySelector(t);if(i&&isDOMElement(i))return i;if(r.targetRef&&isDOMElement(r.targetRef.current))return r.targetRef.current;var a=findDOMNode(r);if(!a)return null;switch(r.getRenderType()){case"renderProp":case"childFunction":case"child":case"childArray":return a;default:return a.parentElement}},r.createResizeHandler=function(e){var t=r.props,i=t.handleWidth,a=void 0===i||i,n=t.handleHeight,s=void 0===n||n,o=t.onResize;if(a||s){var l=createNotifier(o,r.setState.bind(r),a,s);e.forEach((function(e){var t=e&&e.contentRect||{},i=t.width,a=t.height;!r.skipOnMount&&!isSSR$1()&&l({width:i,height:a}),r.skipOnMount=!1}))}},r.getRenderType=function(){var e=r.props,t=e.render,i=e.children;return isFunction$3(t)?"renderProp":isFunction$3(i)?"childFunction":isValidElement(i)?"child":Array.isArray(i)?"childArray":"parent"};var i=t.skipOnMount,a=t.refreshMode,n=t.refreshRate,s=void 0===n?1e3:n,o=t.refreshOptions;return r.state={width:void 0,height:void 0},r.skipOnMount=i,r.targetRef=createRef(),r.observableElement=null,isSSR$1()||(r.resizeHandler=patchResizeHandler(r.createResizeHandler,a,s,o),r.resizeObserver=new window.ResizeObserver(r.resizeHandler)),r}__extends(t,e),t.prototype.componentDidMount=function(){this.attachObserver()},t.prototype.componentDidUpdate=function(){this.attachObserver()},t.prototype.componentWillUnmount=function(){isSSR$1()||(this.observableElement=null,this.resizeObserver.disconnect(),this.cancelHandler())},t.prototype.render=function(){var e,t=this.props,r=t.render,i=t.children,a=t.nodeType,n=void 0===a?"div":a,s=this.state,o={width:s.width,height:s.height,targetRef:this.targetRef};switch(this.getRenderType()){case"renderProp":return r&&r(o);case"childFunction":return(e=i)(o);case"child":if((e=i).type&&"string"==typeof e.type){var l=__rest(o,["targetRef"]);return cloneElement(e,l)}return cloneElement(e,o);case"childArray":return(e=i).map((function(e){return!!e&&cloneElement(e,o)}));default:return React.createElement(n,null)}}}(PureComponent);var useEnhancedEffect=isSSR$1()?useEffect:useLayoutEffect;function useResizeDetector(e){void 0===e&&(e={});var t=e.skipOnMount,r=void 0!==t&&t,i=e.refreshMode,a=e.refreshRate,n=void 0===a?1e3:a,s=e.refreshOptions,o=e.handleWidth,l=void 0===o||o,p=e.handleHeight,c=void 0===p||p,h=e.targetRef,d=e.observerOptions,u=e.onResize,m=useRef(r),f=useRef(null),y=null!=h?h:f,g=useRef(),_=useState({width:void 0,height:void 0}),x=_[0],b=_[1];return useEnhancedEffect((function(){if(!isSSR$1()){var e=createNotifier(u,b,l,c);g.current=patchResizeHandler((function(t){(l||c)&&t.forEach((function(t){var r=t&&t.contentRect||{},i=r.width,a=r.height;!m.current&&!isSSR$1()&&e({width:i,height:a}),m.current=!1}))}),i,n,s);var t=new window.ResizeObserver(g.current);return y.current&&t.observe(y.current,d),function(){t.disconnect();var e=g.current;e&&e.cancel&&e.cancel()}}}),[i,n,s,l,c,u,d,y.current]),__assign({ref:y},x)}let updateQueue=makeQueue();const raf=e=>schedule(e,updateQueue);let writeQueue=makeQueue();raf.write=e=>schedule(e,writeQueue);let onStartQueue=makeQueue();raf.onStart=e=>schedule(e,onStartQueue);let onFrameQueue=makeQueue();raf.onFrame=e=>schedule(e,onFrameQueue);let onFinishQueue=makeQueue();raf.onFinish=e=>schedule(e,onFinishQueue);let timeouts=[];raf.setTimeout=(e,t)=>{let r=raf.now()+t,i=()=>{let e=timeouts.findIndex((e=>e.cancel==i));~e&&timeouts.splice(e,1),pendingCount-=~e?1:0},a={time:r,handler:e,cancel:i};return timeouts.splice(findTimeout(r),0,a),pendingCount+=1,start(),a};let findTimeout=e=>~(~timeouts.findIndex((t=>t.time>e))||~timeouts.length);raf.cancel=e=>{onStartQueue.delete(e),onFrameQueue.delete(e),onFinishQueue.delete(e),updateQueue.delete(e),writeQueue.delete(e)},raf.sync=e=>{sync=!0,raf.batchedUpdates(e),sync=!1},raf.throttle=e=>{let t;function r(){try{e(...t)}finally{t=null}}function i(...e){t=e,raf.onStart(r)}return i.handler=e,i.cancel=()=>{onStartQueue.delete(r),t=null},i};let nativeRaf="undefined"!=typeof window?window.requestAnimationFrame:()=>{};raf.use=e=>nativeRaf=e,raf.now="undefined"!=typeof performance?()=>performance.now():Date.now,raf.batchedUpdates=e=>e(),raf.catch=console.error,raf.frameLoop="always",raf.advance=()=>{"demand"!==raf.frameLoop?console.warn("Cannot call the manual advancement of rafz whilst frameLoop is not set as demand"):update()};let ts=-1,pendingCount=0,sync=!1;function schedule(e,t){sync?(t.delete(e),e(0)):(t.add(e),start())}function start(){ts<0&&(ts=0,"demand"!==raf.frameLoop&&nativeRaf(loop))}function stop(){ts=-1}function loop(){~ts&&(nativeRaf(loop),raf.batchedUpdates(update))}function update(){let e=ts;ts=raf.now();let t=findTimeout(ts);t&&(eachSafely(timeouts.splice(0,t),(e=>e.handler())),pendingCount-=t),pendingCount?(onStartQueue.flush(),updateQueue.flush(e?Math.min(64,ts-e):16.667),onFrameQueue.flush(),writeQueue.flush(),onFinishQueue.flush()):stop()}function makeQueue(){let e=new Set,t=e;return{add(r){pendingCount+=t!=e||e.has(r)?0:1,e.add(r)},delete:r=>(pendingCount-=t==e&&e.has(r)?1:0,e.delete(r)),flush(r){t.size&&(e=new Set,pendingCount-=t.size,eachSafely(t,(t=>t(r)&&e.add(t))),pendingCount+=e.size,t=e)}}}function eachSafely(e,t){e.forEach((e=>{try{t(e)}catch(e){raf.catch(e)}}))}function noop(){}const defineHidden=(e,t,r)=>Object.defineProperty(e,t,{value:r,writable:!0,configurable:!0}),is={arr:Array.isArray,obj:e=>!!e&&"Object"===e.constructor.name,fun:e=>"function"==typeof e,str:e=>"string"==typeof e,num:e=>"number"==typeof e,und:e=>void 0===e};function isEqual(e,t){if(is.arr(e)){if(!is.arr(t)||e.length!==t.length)return!1;for(let r=0;r<e.length;r++)if(e[r]!==t[r])return!1;return!0}return e===t}const each=(e,t)=>e.forEach(t);function eachProp(e,t,r){if(is.arr(e))for(let i=0;i<e.length;i++)t.call(r,e[i],`${i}`);else for(const i in e)e.hasOwnProperty(i)&&t.call(r,e[i],i)}const toArray=e=>is.und(e)?[]:is.arr(e)?e:[e];function flush(e,t){if(e.size){const r=Array.from(e);e.clear(),each(r,t)}}const flushCalls=(e,...t)=>flush(e,(e=>e(...t))),isSSR=()=>"undefined"==typeof window||!window.navigator||/ServerSideRendering|^Deno\//.test(window.navigator.userAgent);let createStringInterpolator$1,to,colors$1=null,skipAnimation=!1,willAdvance=noop;const assign=e=>{e.to&&(to=e.to),e.now&&(raf.now=e.now),void 0!==e.colors&&(colors$1=e.colors),null!=e.skipAnimation&&(skipAnimation=e.skipAnimation),e.createStringInterpolator&&(createStringInterpolator$1=e.createStringInterpolator),e.requestAnimationFrame&&raf.use(e.requestAnimationFrame),e.batchedUpdates&&(raf.batchedUpdates=e.batchedUpdates),e.willAdvance&&(willAdvance=e.willAdvance),e.frameLoop&&(raf.frameLoop=e.frameLoop)};var globals=Object.freeze({__proto__:null,get createStringInterpolator(){return createStringInterpolator$1},get to(){return to},get colors(){return colors$1},get skipAnimation(){return skipAnimation},get willAdvance(){return willAdvance},assign:assign});const startQueue=new Set;let currentFrame=[],prevFrame=[],priority=0;const frameLoop={get idle(){return!startQueue.size&&!currentFrame.length},start(e){priority>e.priority?(startQueue.add(e),raf.onStart(flushStartQueue)):(startSafely(e),raf(advance))},advance:advance,sort(e){if(priority)raf.onFrame((()=>frameLoop.sort(e)));else{const t=currentFrame.indexOf(e);~t&&(currentFrame.splice(t,1),startUnsafely(e))}},clear(){currentFrame=[],startQueue.clear()}};function flushStartQueue(){startQueue.forEach(startSafely),startQueue.clear(),raf(advance)}function startSafely(e){currentFrame.includes(e)||startUnsafely(e)}function startUnsafely(e){currentFrame.splice(findIndex$1(currentFrame,(t=>t.priority>e.priority)),0,e)}function advance(e){const t=prevFrame;for(let r=0;r<currentFrame.length;r++){const i=currentFrame[r];priority=i.priority,i.idle||(willAdvance(i),i.advance(e),i.idle||t.push(i))}return priority=0,prevFrame=currentFrame,prevFrame.length=0,currentFrame=t,currentFrame.length>0}function findIndex$1(e,t){const r=e.findIndex(t);return r<0?e.length:r}const clamp=(e,t,r)=>Math.min(Math.max(r,e),t),colors={transparent:0,aliceblue:4042850303,antiquewhite:4209760255,aqua:16777215,aquamarine:2147472639,azure:4043309055,beige:4126530815,bisque:4293182719,black:255,blanchedalmond:4293643775,blue:65535,blueviolet:2318131967,brown:2771004159,burlywood:3736635391,burntsienna:3934150143,cadetblue:1604231423,chartreuse:2147418367,chocolate:3530104575,coral:4286533887,cornflowerblue:1687547391,cornsilk:4294499583,crimson:3692313855,cyan:16777215,darkblue:35839,darkcyan:9145343,darkgoldenrod:3095792639,darkgray:2846468607,darkgreen:6553855,darkgrey:2846468607,darkkhaki:3182914559,darkmagenta:2332068863,darkolivegreen:1433087999,darkorange:4287365375,darkorchid:2570243327,darkred:2332033279,darksalmon:3918953215,darkseagreen:2411499519,darkslateblue:1211993087,darkslategray:793726975,darkslategrey:793726975,darkturquoise:13554175,darkviolet:2483082239,deeppink:4279538687,deepskyblue:12582911,dimgray:1768516095,dimgrey:1768516095,dodgerblue:512819199,firebrick:2988581631,floralwhite:4294635775,forestgreen:579543807,fuchsia:4278255615,gainsboro:3705462015,ghostwhite:4177068031,gold:4292280575,goldenrod:3668254975,gray:2155905279,green:8388863,greenyellow:2919182335,grey:2155905279,honeydew:4043305215,hotpink:4285117695,indianred:3445382399,indigo:1258324735,ivory:4294963455,khaki:4041641215,lavender:3873897215,lavenderblush:4293981695,lawngreen:2096890111,lemonchiffon:4294626815,lightblue:2916673279,lightcoral:4034953471,lightcyan:3774873599,lightgoldenrodyellow:4210742015,lightgray:3553874943,lightgreen:2431553791,lightgrey:3553874943,lightpink:4290167295,lightsalmon:4288707327,lightseagreen:548580095,lightskyblue:2278488831,lightslategray:2005441023,lightslategrey:2005441023,lightsteelblue:2965692159,lightyellow:4294959359,lime:16711935,limegreen:852308735,linen:4210091775,magenta:4278255615,maroon:2147483903,mediumaquamarine:1724754687,mediumblue:52735,mediumorchid:3126187007,mediumpurple:2473647103,mediumseagreen:1018393087,mediumslateblue:2070474495,mediumspringgreen:16423679,mediumturquoise:1221709055,mediumvioletred:3340076543,midnightblue:421097727,mintcream:4127193855,mistyrose:4293190143,moccasin:4293178879,navajowhite:4292783615,navy:33023,oldlace:4260751103,olive:2155872511,olivedrab:1804477439,orange:4289003775,orangered:4282712319,orchid:3664828159,palegoldenrod:4008225535,palegreen:2566625535,paleturquoise:2951671551,palevioletred:3681588223,papayawhip:4293907967,peachpuff:4292524543,peru:3448061951,pink:4290825215,plum:3718307327,powderblue:2967529215,purple:2147516671,rebeccapurple:1714657791,red:4278190335,rosybrown:3163525119,royalblue:1097458175,saddlebrown:2336560127,salmon:4202722047,sandybrown:4104413439,seagreen:780883967,seashell:4294307583,sienna:2689740287,silver:3233857791,skyblue:2278484991,slateblue:1784335871,slategray:1887473919,slategrey:1887473919,snow:4294638335,springgreen:16744447,steelblue:1182971135,tan:3535047935,teal:8421631,thistle:3636451583,tomato:4284696575,turquoise:1088475391,violet:4001558271,wheat:4125012991,white:4294967295,whitesmoke:4126537215,yellow:4294902015,yellowgreen:2597139199},NUMBER="[-+]?\\d*\\.?\\d+",PERCENTAGE=NUMBER+"%";function call(...e){return"\\(\\s*("+e.join(")\\s*,\\s*(")+")\\s*\\)"}const rgb=new RegExp("rgb"+call(NUMBER,NUMBER,NUMBER)),rgba=new RegExp("rgba"+call(NUMBER,NUMBER,NUMBER,NUMBER)),hsl=new RegExp("hsl"+call(NUMBER,PERCENTAGE,PERCENTAGE)),hsla=new RegExp("hsla"+call(NUMBER,PERCENTAGE,PERCENTAGE,NUMBER)),hex3=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex4=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6=/^#([0-9a-fA-F]{6})$/,hex8=/^#([0-9a-fA-F]{8})$/;function normalizeColor(e){let t;return"number"==typeof e?e>>>0===e&&e>=0&&e<=4294967295?e:null:(t=hex6.exec(e))?parseInt(t[1]+"ff",16)>>>0:colors$1&&void 0!==colors$1[e]?colors$1[e]:(t=rgb.exec(e))?(parse255(t[1])<<24|parse255(t[2])<<16|parse255(t[3])<<8|255)>>>0:(t=rgba.exec(e))?(parse255(t[1])<<24|parse255(t[2])<<16|parse255(t[3])<<8|parse1(t[4]))>>>0:(t=hex3.exec(e))?parseInt(t[1]+t[1]+t[2]+t[2]+t[3]+t[3]+"ff",16)>>>0:(t=hex8.exec(e))?parseInt(t[1],16)>>>0:(t=hex4.exec(e))?parseInt(t[1]+t[1]+t[2]+t[2]+t[3]+t[3]+t[4]+t[4],16)>>>0:(t=hsl.exec(e))?(255|hslToRgb(parse360(t[1]),parsePercentage(t[2]),parsePercentage(t[3])))>>>0:(t=hsla.exec(e))?(hslToRgb(parse360(t[1]),parsePercentage(t[2]),parsePercentage(t[3]))|parse1(t[4]))>>>0:null}function hue2rgb(e,t,r){return r<0&&(r+=1),r>1&&(r-=1),r<1/6?e+6*(t-e)*r:r<.5?t:r<2/3?e+(t-e)*(2/3-r)*6:e}function hslToRgb(e,t,r){const i=r<.5?r*(1+t):r+t-r*t,a=2*r-i,n=hue2rgb(a,i,e+1/3),s=hue2rgb(a,i,e),o=hue2rgb(a,i,e-1/3);return Math.round(255*n)<<24|Math.round(255*s)<<16|Math.round(255*o)<<8}function parse255(e){const t=parseInt(e,10);return t<0?0:t>255?255:t}function parse360(e){return(parseFloat(e)%360+360)%360/360}function parse1(e){const t=parseFloat(e);return t<0?0:t>1?255:Math.round(255*t)}function parsePercentage(e){const t=parseFloat(e);return t<0?0:t>100?1:t/100}function colorToRgba(e){let t=normalizeColor(e);return null===t?e:(t=t||0,`rgba(${(4278190080&t)>>>24}, ${(16711680&t)>>>16}, ${(65280&t)>>>8}, ${(255&t)/255})`)}const createInterpolator=(e,t,r)=>{if(is.fun(e))return e;if(is.arr(e))return createInterpolator({range:e,output:t,extrapolate:r});if(is.str(e.output[0]))return createStringInterpolator$1(e);const i=e,a=i.output,n=i.range||[0,1],s=i.extrapolateLeft||i.extrapolate||"extend",o=i.extrapolateRight||i.extrapolate||"extend",l=i.easing||(e=>e);return e=>{const t=findRange(e,n);return interpolate(e,n[t],n[t+1],a[t],a[t+1],l,s,o,i.map)}};function interpolate(e,t,r,i,a,n,s,o,l){let p=l?l(e):e;if(p<t){if("identity"===s)return p;"clamp"===s&&(p=t)}if(p>r){if("identity"===o)return p;"clamp"===o&&(p=r)}return i===a?i:t===r?e<=t?i:a:(t===-1/0?p=-p:r===1/0?p-=t:p=(p-t)/(r-t),p=n(p),i===-1/0?p=-p:a===1/0?p+=i:p=p*(a-i)+i,p)}function findRange(e,t){for(var r=1;r<t.length-1&&!(t[r]>=e);++r);return r-1}const steps=(e,t="end")=>r=>{const i=(r="end"===t?Math.min(r,.999):Math.max(r,.001))*e,a="end"===t?Math.floor(i):Math.ceil(i);return clamp(0,1,a/e)},c1=1.70158,c2=1.525*c1,c3=c1+1,c4=2*Math.PI/3,c5=2*Math.PI/4.5,bounceOut=e=>{const t=7.5625,r=2.75;return e<1/r?t*e*e:e<2/r?t*(e-=1.5/r)*e+.75:e<2.5/r?t*(e-=2.25/r)*e+.9375:t*(e-=2.625/r)*e+.984375},easings={linear:e=>e,easeInQuad:e=>e*e,easeOutQuad:e=>1-(1-e)*(1-e),easeInOutQuad:e=>e<.5?2*e*e:1-Math.pow(-2*e+2,2)/2,easeInCubic:e=>e*e*e,easeOutCubic:e=>1-Math.pow(1-e,3),easeInOutCubic:e=>e<.5?4*e*e*e:1-Math.pow(-2*e+2,3)/2,easeInQuart:e=>e*e*e*e,easeOutQuart:e=>1-Math.pow(1-e,4),easeInOutQuart:e=>e<.5?8*e*e*e*e:1-Math.pow(-2*e+2,4)/2,easeInQuint:e=>e*e*e*e*e,easeOutQuint:e=>1-Math.pow(1-e,5),easeInOutQuint:e=>e<.5?16*e*e*e*e*e:1-Math.pow(-2*e+2,5)/2,easeInSine:e=>1-Math.cos(e*Math.PI/2),easeOutSine:e=>Math.sin(e*Math.PI/2),easeInOutSine:e=>-(Math.cos(Math.PI*e)-1)/2,easeInExpo:e=>0===e?0:Math.pow(2,10*e-10),easeOutExpo:e=>1===e?1:1-Math.pow(2,-10*e),easeInOutExpo:e=>0===e?0:1===e?1:e<.5?Math.pow(2,20*e-10)/2:(2-Math.pow(2,-20*e+10))/2,easeInCirc:e=>1-Math.sqrt(1-Math.pow(e,2)),easeOutCirc:e=>Math.sqrt(1-Math.pow(e-1,2)),easeInOutCirc:e=>e<.5?(1-Math.sqrt(1-Math.pow(2*e,2)))/2:(Math.sqrt(1-Math.pow(-2*e+2,2))+1)/2,easeInBack:e=>c3*e*e*e-c1*e*e,easeOutBack:e=>1+c3*Math.pow(e-1,3)+c1*Math.pow(e-1,2),easeInOutBack:e=>e<.5?Math.pow(2*e,2)*(2*(c2+1)*e-c2)/2:(Math.pow(2*e-2,2)*((c2+1)*(2*e-2)+c2)+2)/2,easeInElastic:e=>0===e?0:1===e?1:-Math.pow(2,10*e-10)*Math.sin((10*e-10.75)*c4),easeOutElastic:e=>0===e?0:1===e?1:Math.pow(2,-10*e)*Math.sin((10*e-.75)*c4)+1,easeInOutElastic:e=>0===e?0:1===e?1:e<.5?-Math.pow(2,20*e-10)*Math.sin((20*e-11.125)*c5)/2:Math.pow(2,-20*e+10)*Math.sin((20*e-11.125)*c5)/2+1,easeInBounce:e=>1-bounceOut(1-e),easeOutBounce:bounceOut,easeInOutBounce:e=>e<.5?(1-bounceOut(1-2*e))/2:(1+bounceOut(2*e-1))/2,steps:steps};function _extends$2(){return _extends$2=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(e[i]=r[i])}return e},_extends$2.apply(this,arguments)}const $get=Symbol.for("FluidValue.get"),$observers=Symbol.for("FluidValue.observers"),hasFluidValue=e=>Boolean(e&&e[$get]),getFluidValue=e=>e&&e[$get]?e[$get]():e,getFluidObservers=e=>e[$observers]||null;function callFluidObserver(e,t){e.eventObserved?e.eventObserved(t):e(t)}function callFluidObservers(e,t){let r=e[$observers];r&&r.forEach((e=>{callFluidObserver(e,t)}))}class FluidValue{constructor(e){if(this[$get]=void 0,this[$observers]=void 0,!e&&!(e=this.get))throw Error("Unknown getter");setFluidGetter(this,e)}}const setFluidGetter=(e,t)=>setHidden(e,$get,t);function addFluidObserver(e,t){if(e[$get]){let r=e[$observers];r||setHidden(e,$observers,r=new Set),r.has(t)||(r.add(t),e.observerAdded&&e.observerAdded(r.size,t))}return t}function removeFluidObserver(e,t){let r=e[$observers];if(r&&r.has(t)){const i=r.size-1;i?r.delete(t):e[$observers]=null,e.observerRemoved&&e.observerRemoved(i,t)}}const setHidden=(e,t,r)=>Object.defineProperty(e,t,{value:r,writable:!0,configurable:!0}),numberRegex=/[+\-]?(?:0|[1-9]\d*)(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,colorRegex=/(#(?:[0-9a-f]{2}){2,4}|(#[0-9a-f]{3})|(rgb|hsl)a?\((-?\d+%?[,\s]+){2,3}\s*[\d\.]+%?\))/gi,unitRegex=new RegExp(`(${numberRegex.source})(%|[a-z]+)`,"i"),rgbaRegex=/rgba\(([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+)\)/gi,cssVariableRegex=/var\((--[a-zA-Z0-9-_]+),? ?([a-zA-Z0-9 ()%#.,-]+)?\)/,variableToRgba=e=>{const[t,r]=parseCSSVariable(e);if(!t||isSSR())return e;const i=window.getComputedStyle(document.documentElement).getPropertyValue(t);if(i)return i.trim();if(r&&r.startsWith("--")){const t=window.getComputedStyle(document.documentElement).getPropertyValue(r);return t||e}return r&&cssVariableRegex.test(r)?variableToRgba(r):r||e},parseCSSVariable=e=>{const t=cssVariableRegex.exec(e);if(!t)return[,];const[,r,i]=t;return[r,i]};let namedColorRegex;const rgbaRound=(e,t,r,i,a)=>`rgba(${Math.round(t)}, ${Math.round(r)}, ${Math.round(i)}, ${a})`,createStringInterpolator=e=>{namedColorRegex||(namedColorRegex=colors$1?new RegExp(`(${Object.keys(colors$1).join("|")})(?!\\w)`,"g"):/^\b$/);const t=e.output.map((e=>getFluidValue(e).replace(cssVariableRegex,variableToRgba).replace(colorRegex,colorToRgba).replace(namedColorRegex,colorToRgba))),r=t.map((e=>e.match(numberRegex).map(Number))),i=r[0].map(((e,t)=>r.map((e=>{if(!(t in e))throw Error('The arity of each "output" value must be equal');return e[t]})))).map((t=>createInterpolator(_extends$2({},e,{output:t}))));return e=>{var r;const a=!unitRegex.test(t[0])&&(null==(r=t.find((e=>unitRegex.test(e))))?void 0:r.replace(numberRegex,""));let n=0;return t[0].replace(numberRegex,(()=>`${i[n++](e)}${a||""}`)).replace(rgbaRegex,rgbaRound)}},prefix$1="react-spring: ",once=e=>{const t=e;let r=!1;if("function"!=typeof t)throw new TypeError(`${prefix$1}once requires a function parameter`);return(...e)=>{r||(t(...e),r=!0)}},warnInterpolate=once(console.warn);function deprecateInterpolate(){warnInterpolate(`${prefix$1}The "interpolate" function is deprecated in v9 (use "to" instead)`)}const warnDirectCall=once(console.warn);function deprecateDirectCall(){warnDirectCall(`${prefix$1}Directly calling start instead of using the api object is deprecated in v9 (use ".start" instead), this will be removed in later 0.X.0 versions`)}function isAnimatedString(e){return is.str(e)&&("#"==e[0]||/\d/.test(e)||!isSSR()&&cssVariableRegex.test(e)||e in(colors$1||{}))}const useIsomorphicLayoutEffect=isSSR()?useEffect:useLayoutEffect,useIsMounted=()=>{const e=useRef(!1);return useIsomorphicLayoutEffect((()=>(e.current=!0,()=>{e.current=!1})),[]),e};function useForceUpdate(){const e=useState()[1],t=useIsMounted();return()=>{t.current&&e(Math.random())}}function useMemoOne(e,t){const[r]=useState((()=>({inputs:t,result:e()}))),i=useRef(),a=i.current;let n=a;if(n){Boolean(t&&n.inputs&&areInputsEqual(t,n.inputs))||(n={inputs:t,result:e()})}else n=r;return useEffect((()=>{i.current=n,a==r&&(r.inputs=r.result=void 0)}),[n]),n.result}function areInputsEqual(e,t){if(e.length!==t.length)return!1;for(let r=0;r<e.length;r++)if(e[r]!==t[r])return!1;return!0}const useOnce=e=>useEffect(e,emptyDeps),emptyDeps=[];function usePrev(e){const t=useRef();return useEffect((()=>{t.current=e})),t.current}const $node=Symbol.for("Animated:node"),isAnimated=e=>!!e&&e[$node]===e,getAnimated=e=>e&&e[$node],setAnimated=(e,t)=>defineHidden(e,$node,t),getPayload=e=>e&&e[$node]&&e[$node].getPayload();class Animated{constructor(){this.payload=void 0,setAnimated(this,this)}getPayload(){return this.payload||[]}}class AnimatedValue extends Animated{constructor(e){super(),this.done=!0,this.elapsedTime=void 0,this.lastPosition=void 0,this.lastVelocity=void 0,this.v0=void 0,this.durationProgress=0,this._value=e,is.num(this._value)&&(this.lastPosition=this._value)}static create(e){return new AnimatedValue(e)}getPayload(){return[this]}getValue(){return this._value}setValue(e,t){return is.num(e)&&(this.lastPosition=e,t&&(e=Math.round(e/t)*t,this.done&&(this.lastPosition=e))),this._value!==e&&(this._value=e,!0)}reset(){const{done:e}=this;this.done=!1,is.num(this._value)&&(this.elapsedTime=0,this.durationProgress=0,this.lastPosition=this._value,e&&(this.lastVelocity=null),this.v0=null)}}class AnimatedString extends AnimatedValue{constructor(e){super(0),this._string=null,this._toString=void 0,this._toString=createInterpolator({output:[e,e]})}static create(e){return new AnimatedString(e)}getValue(){let e=this._string;return null==e?this._string=this._toString(this._value):e}setValue(e){if(is.str(e)){if(e==this._string)return!1;this._string=e,this._value=1}else{if(!super.setValue(e))return!1;this._string=null}return!0}reset(e){e&&(this._toString=createInterpolator({output:[this.getValue(),e]})),this._value=0,super.reset()}}const TreeContext={dependencies:null};class AnimatedObject extends Animated{constructor(e){super(),this.source=e,this.setValue(e)}getValue(e){const t={};return eachProp(this.source,((r,i)=>{isAnimated(r)?t[i]=r.getValue(e):hasFluidValue(r)?t[i]=getFluidValue(r):e||(t[i]=r)})),t}setValue(e){this.source=e,this.payload=this._makePayload(e)}reset(){this.payload&&each(this.payload,(e=>e.reset()))}_makePayload(e){if(e){const t=new Set;return eachProp(e,this._addToPayload,t),Array.from(t)}}_addToPayload(e){TreeContext.dependencies&&hasFluidValue(e)&&TreeContext.dependencies.add(e);const t=getPayload(e);t&&each(t,(e=>this.add(e)))}}class AnimatedArray extends AnimatedObject{constructor(e){super(e)}static create(e){return new AnimatedArray(e)}getValue(){return this.source.map((e=>e.getValue()))}setValue(e){const t=this.getPayload();return e.length==t.length?t.map(((t,r)=>t.setValue(e[r]))).some(Boolean):(super.setValue(e.map(makeAnimated)),!0)}}function makeAnimated(e){return(isAnimatedString(e)?AnimatedString:AnimatedValue).create(e)}function getAnimatedType(e){const t=getAnimated(e);return t?t.constructor:is.arr(e)?AnimatedArray:isAnimatedString(e)?AnimatedString:AnimatedValue}function _extends$1(){return _extends$1=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(e[i]=r[i])}return e},_extends$1.apply(this,arguments)}const withAnimated=(e,t)=>{const r=!is.fun(e)||e.prototype&&e.prototype.isReactComponent;return forwardRef(((i,a)=>{const n=useRef(null),s=r&&useCallback((e=>{n.current=updateRef(a,e)}),[a]),[o,l]=getAnimatedState(i,t),p=useForceUpdate(),c=()=>{const e=n.current;if(r&&!e)return;!1===(!!e&&t.applyAnimatedValues(e,o.getValue(!0)))&&p()},h=new PropsObserver(c,l),d=useRef();useIsomorphicLayoutEffect((()=>(d.current=h,each(l,(e=>addFluidObserver(e,h))),()=>{d.current&&(each(d.current.deps,(e=>removeFluidObserver(e,d.current))),raf.cancel(d.current.update))}))),useEffect(c,[]),useOnce((()=>()=>{const e=d.current;each(e.deps,(t=>removeFluidObserver(t,e)))}));const u=t.getComponentProps(o.getValue());return React.createElement(e,_extends$1({},u,{ref:s}))}))};class PropsObserver{constructor(e,t){this.update=e,this.deps=t}eventObserved(e){"change"==e.type&&raf.write(this.update)}}function getAnimatedState(e,t){const r=new Set;return TreeContext.dependencies=r,e.style&&(e=_extends$1({},e,{style:t.createAnimatedStyle(e.style)})),e=new AnimatedObject(e),TreeContext.dependencies=null,[e,r]}function updateRef(e,t){return e&&(is.fun(e)?e(t):e.current=t),t}const cacheKey=Symbol.for("AnimatedComponent"),createHost=(e,{applyAnimatedValues:t=(()=>!1),createAnimatedStyle:r=(e=>new AnimatedObject(e)),getComponentProps:i=(e=>e)}={})=>{const a={applyAnimatedValues:t,createAnimatedStyle:r,getComponentProps:i},n=e=>{const t=getDisplayName(e)||"Anonymous";return(e=is.str(e)?n[e]||(n[e]=withAnimated(e,a)):e[cacheKey]||(e[cacheKey]=withAnimated(e,a))).displayName=`Animated(${t})`,e};return eachProp(e,((t,r)=>{is.arr(e)&&(r=getDisplayName(t)),n[r]=n(t)})),{animated:n}},getDisplayName=e=>is.str(e)?e:e&&is.str(e.displayName)?e.displayName:is.fun(e)&&e.name||null;function _extends(){return _extends=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(e[i]=r[i])}return e},_extends.apply(this,arguments)}function callProp(e,...t){return is.fun(e)?e(...t):e}const matchProp=(e,t)=>!0===e||!!(t&&e&&(is.fun(e)?e(t):toArray(e).includes(t))),resolveProp=(e,t)=>is.obj(e)?t&&e[t]:e,getDefaultProp=(e,t)=>!0===e.default?e[t]:e.default?e.default[t]:void 0,noopTransform=e=>e,getDefaultProps=(e,t=noopTransform)=>{let r=DEFAULT_PROPS;e.default&&!0!==e.default&&(e=e.default,r=Object.keys(e));const i={};for(const a of r){const r=t(e[a],a);is.und(r)||(i[a]=r)}return i},DEFAULT_PROPS=["config","onProps","onStart","onChange","onPause","onResume","onRest"],RESERVED_PROPS={config:1,from:1,to:1,ref:1,loop:1,reset:1,pause:1,cancel:1,reverse:1,immediate:1,default:1,delay:1,onProps:1,onStart:1,onChange:1,onPause:1,onResume:1,onRest:1,onResolve:1,items:1,trail:1,sort:1,expires:1,initial:1,enter:1,update:1,leave:1,children:1,onDestroyed:1,keys:1,callId:1,parentId:1};function getForwardProps(e){const t={};let r=0;if(eachProp(e,((e,i)=>{RESERVED_PROPS[i]||(t[i]=e,r++)})),r)return t}function inferTo(e){const t=getForwardProps(e);if(t){const r={to:t};return eachProp(e,((e,i)=>i in t||(r[i]=e))),r}return _extends({},e)}function computeGoal(e){return e=getFluidValue(e),is.arr(e)?e.map(computeGoal):isAnimatedString(e)?globals.createStringInterpolator({range:[0,1],output:[e,e]})(1):e}function hasProps(e){for(const t in e)return!0;return!1}function isAsyncTo(e){return is.fun(e)||is.arr(e)&&is.obj(e[0])}function detachRefs(e,t){var r;null==(r=e.ref)||r.delete(e),null==t||t.delete(e)}function replaceRef(e,t){var r;t&&e.ref!==t&&(null==(r=e.ref)||r.delete(e),t.add(e),e.ref=t)}const config={default:{tension:170,friction:26},gentle:{tension:120,friction:14},wobbly:{tension:180,friction:12},stiff:{tension:210,friction:20},slow:{tension:280,friction:60},molasses:{tension:280,friction:120}},defaults=_extends({},config.default,{mass:1,damping:1,easing:easings.linear,clamp:!1});class AnimationConfig{constructor(){this.tension=void 0,this.friction=void 0,this.frequency=void 0,this.damping=void 0,this.mass=void 0,this.velocity=0,this.restVelocity=void 0,this.precision=void 0,this.progress=void 0,this.duration=void 0,this.easing=void 0,this.clamp=void 0,this.bounce=void 0,this.decay=void 0,this.round=void 0,Object.assign(this,defaults)}}function mergeConfig(e,t,r){r&&(sanitizeConfig(r=_extends({},r),t),t=_extends({},r,t)),sanitizeConfig(e,t),Object.assign(e,t);for(const t in defaults)null==e[t]&&(e[t]=defaults[t]);let{mass:i,frequency:a,damping:n}=e;return is.und(a)||(a<.01&&(a=.01),n<0&&(n=0),e.tension=Math.pow(2*Math.PI/a,2)*i,e.friction=4*Math.PI*n*i/a),e}function sanitizeConfig(e,t){if(is.und(t.decay)){const r=!is.und(t.tension)||!is.und(t.friction);!r&&is.und(t.frequency)&&is.und(t.damping)&&is.und(t.mass)||(e.duration=void 0,e.decay=void 0),r&&(e.frequency=void 0)}else e.duration=void 0}const emptyArray=[];class Animation{constructor(){this.changed=!1,this.values=emptyArray,this.toValues=null,this.fromValues=emptyArray,this.to=void 0,this.from=void 0,this.config=new AnimationConfig,this.immediate=!1}}function scheduleProps(e,{key:t,props:r,defaultProps:i,state:a,actions:n}){return new Promise(((s,o)=>{var l;let p,c,h=matchProp(null!=(l=r.cancel)?l:null==i?void 0:i.cancel,t);if(h)m();else{is.und(r.pause)||(a.paused=matchProp(r.pause,t));let e=null==i?void 0:i.pause;!0!==e&&(e=a.paused||matchProp(e,t)),p=callProp(r.delay||0,t),e?(a.resumeQueue.add(u),n.pause()):(n.resume(),u())}function d(){a.resumeQueue.add(u),a.timeouts.delete(c),c.cancel(),p=c.time-raf.now()}function u(){p>0&&!globals.skipAnimation?(a.delayed=!0,c=raf.setTimeout(m,p),a.pauseQueue.add(d),a.timeouts.add(c)):m()}function m(){a.delayed&&(a.delayed=!1),a.pauseQueue.delete(d),a.timeouts.delete(c),e<=(a.cancelId||0)&&(h=!0);try{n.start(_extends({},r,{callId:e,cancel:h}),s)}catch(e){o(e)}}}))}const getCombinedResult=(e,t)=>1==t.length?t[0]:t.some((e=>e.cancelled))?getCancelledResult(e.get()):t.every((e=>e.noop))?getNoopResult(e.get()):getFinishedResult(e.get(),t.every((e=>e.finished))),getNoopResult=e=>({value:e,noop:!0,finished:!0,cancelled:!1}),getFinishedResult=(e,t,r=!1)=>({value:e,finished:t,cancelled:r}),getCancelledResult=e=>({value:e,cancelled:!0,finished:!1});function runAsync(e,t,r,i){const{callId:a,parentId:n,onRest:s}=t,{asyncTo:o,promise:l}=r;return n||e!==o||t.reset?r.promise=(async()=>{r.asyncId=a,r.asyncTo=e;const p=getDefaultProps(t,((e,t)=>"onRest"===t?void 0:e));let c,h;const d=new Promise(((e,t)=>(c=e,h=t))),u=e=>{const t=a<=(r.cancelId||0)&&getCancelledResult(i)||a!==r.asyncId&&getFinishedResult(i,!1);if(t)throw e.result=t,h(e),e},m=(e,t)=>{const n=new BailSignal,s=new SkipAnimationSignal;return(async()=>{if(globals.skipAnimation)throw stopAsync(r),s.result=getFinishedResult(i,!1),h(s),s;u(n);const o=is.obj(e)?_extends({},e):_extends({},t,{to:e});o.parentId=a,eachProp(p,((e,t)=>{is.und(o[t])&&(o[t]=e)}));const l=await i.start(o);return u(n),r.paused&&await new Promise((e=>{r.resumeQueue.add(e)})),l})()};let f;if(globals.skipAnimation)return stopAsync(r),getFinishedResult(i,!1);try{let t;t=is.arr(e)?(async e=>{for(const t of e)await m(t)})(e):Promise.resolve(e(m,i.stop.bind(i))),await Promise.all([t.then(c),d]),f=getFinishedResult(i.get(),!0,!1)}catch(e){if(e instanceof BailSignal)f=e.result;else{if(!(e instanceof SkipAnimationSignal))throw e;f=e.result}}finally{a==r.asyncId&&(r.asyncId=n,r.asyncTo=n?o:void 0,r.promise=n?l:void 0)}return is.fun(s)&&raf.batchedUpdates((()=>{s(f,i,i.item)})),f})():l}function stopAsync(e,t){flush(e.timeouts,(e=>e.cancel())),e.pauseQueue.clear(),e.resumeQueue.clear(),e.asyncId=e.asyncTo=e.promise=void 0,t&&(e.cancelId=t)}class BailSignal extends Error{constructor(){super("An async animation has been interrupted. You see this error because you forgot to use `await` or `.catch(...)` on its returned promise."),this.result=void 0}}class SkipAnimationSignal extends Error{constructor(){super("SkipAnimationSignal"),this.result=void 0}}const isFrameValue=e=>e instanceof FrameValue;let nextId$1=1;class FrameValue extends FluidValue{constructor(...e){super(...e),this.id=nextId$1++,this.key=void 0,this._priority=0}get priority(){return this._priority}set priority(e){this._priority!=e&&(this._priority=e,this._onPriorityChange(e))}get(){const e=getAnimated(this);return e&&e.getValue()}to(...e){return globals.to(this,e)}interpolate(...e){return deprecateInterpolate(),globals.to(this,e)}toJSON(){return this.get()}observerAdded(e){1==e&&this._attach()}observerRemoved(e){0==e&&this._detach()}_attach(){}_detach(){}_onChange(e,t=!1){callFluidObservers(this,{type:"change",parent:this,value:e,idle:t})}_onPriorityChange(e){this.idle||frameLoop.sort(this),callFluidObservers(this,{type:"priority",parent:this,priority:e})}}const $P=Symbol.for("SpringPhase"),HAS_ANIMATED=1,IS_ANIMATING=2,IS_PAUSED=4,hasAnimated=e=>(e[$P]&HAS_ANIMATED)>0,isAnimating=e=>(e[$P]&IS_ANIMATING)>0,isPaused=e=>(e[$P]&IS_PAUSED)>0,setActiveBit=(e,t)=>t?e[$P]|=IS_ANIMATING|HAS_ANIMATED:e[$P]&=~IS_ANIMATING,setPausedBit=(e,t)=>t?e[$P]|=IS_PAUSED:e[$P]&=~IS_PAUSED;class SpringValue extends FrameValue{constructor(e,t){if(super(),this.key=void 0,this.animation=new Animation,this.queue=void 0,this.defaultProps={},this._state={paused:!1,delayed:!1,pauseQueue:new Set,resumeQueue:new Set,timeouts:new Set},this._pendingCalls=new Set,this._lastCallId=0,this._lastToId=0,this._memoizedDuration=0,!is.und(e)||!is.und(t)){const r=is.obj(e)?_extends({},e):_extends({},t,{from:e});is.und(r.default)&&(r.default=!0),this.start(r)}}get idle(){return!(isAnimating(this)||this._state.asyncTo)||isPaused(this)}get goal(){return getFluidValue(this.animation.to)}get velocity(){const e=getAnimated(this);return e instanceof AnimatedValue?e.lastVelocity||0:e.getPayload().map((e=>e.lastVelocity||0))}get hasAnimated(){return hasAnimated(this)}get isAnimating(){return isAnimating(this)}get isPaused(){return isPaused(this)}get isDelayed(){return this._state.delayed}advance(e){let t=!0,r=!1;const i=this.animation;let{config:a,toValues:n}=i;const s=getPayload(i.to);!s&&hasFluidValue(i.to)&&(n=toArray(getFluidValue(i.to))),i.values.forEach(((o,l)=>{if(o.done)return;const p=o.constructor==AnimatedString?1:s?s[l].lastPosition:n[l];let c=i.immediate,h=p;if(!c){if(h=o.lastPosition,a.tension<=0)return void(o.done=!0);let t=o.elapsedTime+=e;const r=i.fromValues[l],n=null!=o.v0?o.v0:o.v0=is.arr(a.velocity)?a.velocity[l]:a.velocity;let s;const d=a.precision||(r==p?.005:Math.min(1,.001*Math.abs(p-r)));if(is.und(a.duration))if(a.decay){const e=!0===a.decay?.998:a.decay,i=Math.exp(-(1-e)*t);h=r+n/(1-e)*(1-i),c=Math.abs(o.lastPosition-h)<=d,s=n*i}else{s=null==o.lastVelocity?n:o.lastVelocity;const t=a.restVelocity||d/10,i=a.clamp?0:a.bounce,l=!is.und(i),u=r==p?o.v0>0:r<p;let m,f=!1;const y=1,g=Math.ceil(e/y);for(let e=0;e<g&&(m=Math.abs(s)>t,m||(c=Math.abs(p-h)<=d,!c));++e){l&&(f=h==p||h>p==u,f&&(s=-s*i,h=p));s+=(1e-6*-a.tension*(h-p)+.001*-a.friction*s)/a.mass*y,h+=s*y}}else{let i=1;a.duration>0&&(this._memoizedDuration!==a.duration&&(this._memoizedDuration=a.duration,o.durationProgress>0&&(o.elapsedTime=a.duration*o.durationProgress,t=o.elapsedTime+=e)),i=(a.progress||0)+t/this._memoizedDuration,i=i>1?1:i<0?0:i,o.durationProgress=i),h=r+a.easing(i)*(p-r),s=(h-o.lastPosition)/e,c=1==i}o.lastVelocity=s,Number.isNaN(h)&&(console.warn("Got NaN while animating:",this),c=!0)}s&&!s[l].done&&(c=!1),c?o.done=!0:t=!1,o.setValue(h,a.round)&&(r=!0)}));const o=getAnimated(this),l=o.getValue();if(t){const e=getFluidValue(i.to);l===e&&!r||a.decay?r&&a.decay&&this._onChange(l):(o.setValue(e),this._onChange(e)),this._stop()}else r&&this._onChange(l)}set(e){return raf.batchedUpdates((()=>{this._stop(),this._focus(e),this._set(e)})),this}pause(){this._update({pause:!0})}resume(){this._update({pause:!1})}finish(){if(isAnimating(this)){const{to:e,config:t}=this.animation;raf.batchedUpdates((()=>{this._onStart(),t.decay||this._set(e,!1),this._stop()}))}return this}update(e){return(this.queue||(this.queue=[])).push(e),this}start(e,t){let r;return is.und(e)?(r=this.queue||[],this.queue=[]):r=[is.obj(e)?e:_extends({},t,{to:e})],Promise.all(r.map((e=>this._update(e)))).then((e=>getCombinedResult(this,e)))}stop(e){const{to:t}=this.animation;return this._focus(this.get()),stopAsync(this._state,e&&this._lastCallId),raf.batchedUpdates((()=>this._stop(t,e))),this}reset(){this._update({reset:!0})}eventObserved(e){"change"==e.type?this._start():"priority"==e.type&&(this.priority=e.priority+1)}_prepareNode(e){const t=this.key||"";let{to:r,from:i}=e;r=is.obj(r)?r[t]:r,(null==r||isAsyncTo(r))&&(r=void 0),i=is.obj(i)?i[t]:i,null==i&&(i=void 0);const a={to:r,from:i};return hasAnimated(this)||(e.reverse&&([r,i]=[i,r]),i=getFluidValue(i),is.und(i)?getAnimated(this)||this._set(r):this._set(i)),a}_update(e,t){let r=_extends({},e);const{key:i,defaultProps:a}=this;r.default&&Object.assign(a,getDefaultProps(r,((e,t)=>/^on/.test(t)?resolveProp(e,i):e))),mergeActiveFn(this,r,"onProps"),sendEvent(this,"onProps",r,this);const n=this._prepareNode(r);if(Object.isFrozen(this))throw Error("Cannot animate a `SpringValue` object that is frozen. Did you forget to pass your component to `animated(...)` before animating its props?");const s=this._state;return scheduleProps(++this._lastCallId,{key:i,props:r,defaultProps:a,state:s,actions:{pause:()=>{isPaused(this)||(setPausedBit(this,!0),flushCalls(s.pauseQueue),sendEvent(this,"onPause",getFinishedResult(this,checkFinished(this,this.animation.to)),this))},resume:()=>{isPaused(this)&&(setPausedBit(this,!1),isAnimating(this)&&this._resume(),flushCalls(s.resumeQueue),sendEvent(this,"onResume",getFinishedResult(this,checkFinished(this,this.animation.to)),this))},start:this._merge.bind(this,n)}}).then((e=>{if(r.loop&&e.finished&&(!t||!e.noop)){const e=createLoopUpdate(r);if(e)return this._update(e,!0)}return e}))}_merge(e,t,r){if(t.cancel)return this.stop(!0),r(getCancelledResult(this));const i=!is.und(e.to),a=!is.und(e.from);if(i||a){if(!(t.callId>this._lastToId))return r(getCancelledResult(this));this._lastToId=t.callId}const{key:n,defaultProps:s,animation:o}=this,{to:l,from:p}=o;let{to:c=l,from:h=p}=e;!a||i||t.default&&!is.und(c)||(c=h),t.reverse&&([c,h]=[h,c]);const d=!isEqual(h,p);d&&(o.from=h),h=getFluidValue(h);const u=!isEqual(c,l);u&&this._focus(c);const m=isAsyncTo(t.to),{config:f}=o,{decay:y,velocity:g}=f;(i||a)&&(f.velocity=0),t.config&&!m&&mergeConfig(f,callProp(t.config,n),t.config!==s.config?callProp(s.config,n):void 0);let _=getAnimated(this);if(!_||is.und(c))return r(getFinishedResult(this,!0));const x=is.und(t.reset)?a&&!t.default:!is.und(h)&&matchProp(t.reset,n),b=x?h:this.get(),v=computeGoal(c),C=is.num(v)||is.arr(v)||isAnimatedString(v),S=!m&&(!C||matchProp(s.immediate||t.immediate,n));if(u){const e=getAnimatedType(c);if(e!==_.constructor){if(!S)throw Error(`Cannot animate between ${_.constructor.name} and ${e.name}, as the "to" prop suggests`);_=this._set(v)}}const $=_.constructor;let w=hasFluidValue(c),T=!1;if(!w){const e=x||!hasAnimated(this)&&d;(u||e)&&(T=isEqual(computeGoal(b),v),w=!T),(isEqual(o.immediate,S)||S)&&isEqual(f.decay,y)&&isEqual(f.velocity,g)||(w=!0)}if(T&&isAnimating(this)&&(o.changed&&!x?w=!0:w||this._stop(l)),!m&&((w||hasFluidValue(l))&&(o.values=_.getPayload(),o.toValues=hasFluidValue(c)?null:$==AnimatedString?[1]:toArray(v)),o.immediate!=S&&(o.immediate=S,S||x||this._set(l)),w)){const{onRest:e}=o;each(ACTIVE_EVENTS,(e=>mergeActiveFn(this,t,e)));const i=getFinishedResult(this,checkFinished(this,l));flushCalls(this._pendingCalls,i),this._pendingCalls.add(r),o.changed&&raf.batchedUpdates((()=>{o.changed=!x,null==e||e(i,this),x?callProp(s.onRest,i):null==o.onStart||o.onStart(i,this)}))}x&&this._set(b),m?r(runAsync(t.to,t,this._state,this)):w?this._start():isAnimating(this)&&!u?this._pendingCalls.add(r):r(getNoopResult(b))}_focus(e){const t=this.animation;e!==t.to&&(getFluidObservers(this)&&this._detach(),t.to=e,getFluidObservers(this)&&this._attach())}_attach(){let e=0;const{to:t}=this.animation;hasFluidValue(t)&&(addFluidObserver(t,this),isFrameValue(t)&&(e=t.priority+1)),this.priority=e}_detach(){const{to:e}=this.animation;hasFluidValue(e)&&removeFluidObserver(e,this)}_set(e,t=!0){const r=getFluidValue(e);if(!is.und(r)){const e=getAnimated(this);if(!e||!isEqual(r,e.getValue())){const i=getAnimatedType(r);e&&e.constructor==i?e.setValue(r):setAnimated(this,i.create(r)),e&&raf.batchedUpdates((()=>{this._onChange(r,t)}))}}return getAnimated(this)}_onStart(){const e=this.animation;e.changed||(e.changed=!0,sendEvent(this,"onStart",getFinishedResult(this,checkFinished(this,e.to)),this))}_onChange(e,t){t||(this._onStart(),callProp(this.animation.onChange,e,this)),callProp(this.defaultProps.onChange,e,this),super._onChange(e,t)}_start(){const e=this.animation;getAnimated(this).reset(getFluidValue(e.to)),e.immediate||(e.fromValues=e.values.map((e=>e.lastPosition))),isAnimating(this)||(setActiveBit(this,!0),isPaused(this)||this._resume())}_resume(){globals.skipAnimation?this.finish():frameLoop.start(this)}_stop(e,t){if(isAnimating(this)){setActiveBit(this,!1);const r=this.animation;each(r.values,(e=>{e.done=!0})),r.toValues&&(r.onChange=r.onPause=r.onResume=void 0),callFluidObservers(this,{type:"idle",parent:this});const i=t?getCancelledResult(this.get()):getFinishedResult(this.get(),checkFinished(this,null!=e?e:r.to));flushCalls(this._pendingCalls,i),r.changed&&(r.changed=!1,sendEvent(this,"onRest",i,this))}}}function checkFinished(e,t){const r=computeGoal(t);return isEqual(computeGoal(e.get()),r)}function createLoopUpdate(e,t=e.loop,r=e.to){let i=callProp(t);if(i){const a=!0!==i&&inferTo(i),n=(a||e).reverse,s=!a||a.reset;return createUpdate(_extends({},e,{loop:t,default:!1,pause:void 0,to:!n||isAsyncTo(r)?r:void 0,from:s?e.from:void 0,reset:s},a))}}function createUpdate(e){const{to:t,from:r}=e=inferTo(e),i=new Set;return is.obj(t)&&findDefined(t,i),is.obj(r)&&findDefined(r,i),e.keys=i.size?Array.from(i):null,e}function declareUpdate(e){const t=createUpdate(e);return is.und(t.default)&&(t.default=getDefaultProps(t)),t}function findDefined(e,t){eachProp(e,((e,r)=>null!=e&&t.add(r)))}const ACTIVE_EVENTS=["onStart","onRest","onChange","onPause","onResume"];function mergeActiveFn(e,t,r){e.animation[r]=t[r]!==getDefaultProp(t,r)?resolveProp(t[r],e.key):void 0}function sendEvent(e,t,...r){var i,a,n,s;null==(i=(a=e.animation)[t])||i.call(a,...r),null==(n=(s=e.defaultProps)[t])||n.call(s,...r)}const BATCHED_EVENTS=["onStart","onChange","onRest"];let nextId=1;class Controller{constructor(e,t){this.id=nextId++,this.springs={},this.queue=[],this.ref=void 0,this._flush=void 0,this._initialProps=void 0,this._lastAsyncId=0,this._active=new Set,this._changed=new Set,this._started=!1,this._item=void 0,this._state={paused:!1,pauseQueue:new Set,resumeQueue:new Set,timeouts:new Set},this._events={onStart:new Map,onChange:new Map,onRest:new Map},this._onFrame=this._onFrame.bind(this),t&&(this._flush=t),e&&this.start(_extends({default:!0},e))}get idle(){return!this._state.asyncTo&&Object.values(this.springs).every((e=>e.idle&&!e.isDelayed&&!e.isPaused))}get item(){return this._item}set item(e){this._item=e}get(){const e={};return this.each(((t,r)=>e[r]=t.get())),e}set(e){for(const t in e){const r=e[t];is.und(r)||this.springs[t].set(r)}}update(e){return e&&this.queue.push(createUpdate(e)),this}start(e){let{queue:t}=this;return e?t=toArray(e).map(createUpdate):this.queue=[],this._flush?this._flush(this,t):(prepareKeys(this,t),flushUpdateQueue(this,t))}stop(e,t){if(e!==!!e&&(t=e),t){const r=this.springs;each(toArray(t),(t=>r[t].stop(!!e)))}else stopAsync(this._state,this._lastAsyncId),this.each((t=>t.stop(!!e)));return this}pause(e){if(is.und(e))this.start({pause:!0});else{const t=this.springs;each(toArray(e),(e=>t[e].pause()))}return this}resume(e){if(is.und(e))this.start({pause:!1});else{const t=this.springs;each(toArray(e),(e=>t[e].resume()))}return this}each(e){eachProp(this.springs,e)}_onFrame(){const{onStart:e,onChange:t,onRest:r}=this._events,i=this._active.size>0,a=this._changed.size>0;(i&&!this._started||a&&!this._started)&&(this._started=!0,flush(e,(([e,t])=>{t.value=this.get(),e(t,this,this._item)})));const n=!i&&this._started,s=a||n&&r.size?this.get():null;a&&t.size&&flush(t,(([e,t])=>{t.value=s,e(t,this,this._item)})),n&&(this._started=!1,flush(r,(([e,t])=>{t.value=s,e(t,this,this._item)})))}eventObserved(e){if("change"==e.type)this._changed.add(e.parent),e.idle||this._active.add(e.parent);else{if("idle"!=e.type)return;this._active.delete(e.parent)}raf.onFrame(this._onFrame)}}function flushUpdateQueue(e,t){return Promise.all(t.map((t=>flushUpdate(e,t)))).then((t=>getCombinedResult(e,t)))}async function flushUpdate(e,t,r){const{keys:i,to:a,from:n,loop:s,onRest:o,onResolve:l}=t,p=is.obj(t.default)&&t.default;s&&(t.loop=!1),!1===a&&(t.to=null),!1===n&&(t.from=null);const c=is.arr(a)||is.fun(a)?a:void 0;c?(t.to=void 0,t.onRest=void 0,p&&(p.onRest=void 0)):each(BATCHED_EVENTS,(r=>{const i=t[r];if(is.fun(i)){const a=e._events[r];t[r]=({finished:e,cancelled:t})=>{const r=a.get(i);r?(e||(r.finished=!1),t&&(r.cancelled=!0)):a.set(i,{value:null,finished:e||!1,cancelled:t||!1})},p&&(p[r]=t[r])}}));const h=e._state;t.pause===!h.paused?(h.paused=t.pause,flushCalls(t.pause?h.pauseQueue:h.resumeQueue)):h.paused&&(t.pause=!0);const d=(i||Object.keys(e.springs)).map((r=>e.springs[r].start(t))),u=!0===t.cancel||!0===getDefaultProp(t,"cancel");(c||u&&h.asyncId)&&d.push(scheduleProps(++e._lastAsyncId,{props:t,state:h,actions:{pause:noop,resume:noop,start(t,r){u?(stopAsync(h,e._lastAsyncId),r(getCancelledResult(e))):(t.onRest=o,r(runAsync(c,t,h,e)))}}})),h.paused&&await new Promise((e=>{h.resumeQueue.add(e)}));const m=getCombinedResult(e,await Promise.all(d));if(s&&m.finished&&(!r||!m.noop)){const r=createLoopUpdate(t,s,a);if(r)return prepareKeys(e,[r]),flushUpdate(e,r,!0)}return l&&raf.batchedUpdates((()=>l(m,e,e.item))),m}function getSprings(e,t){const r=_extends({},e.springs);return t&&each(toArray(t),(e=>{is.und(e.keys)&&(e=createUpdate(e)),is.obj(e.to)||(e=_extends({},e,{to:void 0})),prepareSprings(r,e,(e=>createSpring(e)))})),setSprings(e,r),r}function setSprings(e,t){eachProp(t,((t,r)=>{e.springs[r]||(e.springs[r]=t,addFluidObserver(t,e))}))}function createSpring(e,t){const r=new SpringValue;return r.key=e,t&&addFluidObserver(r,t),r}function prepareSprings(e,t,r){t.keys&&each(t.keys,(i=>{(e[i]||(e[i]=r(i)))._prepareNode(t)}))}function prepareKeys(e,t){each(t,(t=>{prepareSprings(e.springs,t,(t=>createSpring(t,e)))}))}function _objectWithoutPropertiesLoose$2(e,t){if(null==e)return{};var r,i,a={},n=Object.keys(e);for(i=0;i<n.length;i++)r=n[i],t.indexOf(r)>=0||(a[r]=e[r]);return a}const _excluded$6=["children"],SpringContext=e=>{let{children:t}=e,r=_objectWithoutPropertiesLoose$2(e,_excluded$6);const i=useContext(ctx),a=r.pause||!!i.pause,n=r.immediate||!!i.immediate;r=useMemoOne((()=>({pause:a,immediate:n})),[a,n]);const{Provider:s}=ctx;return React.createElement(s,{value:r},t)},ctx=makeContext(SpringContext,{});function makeContext(e,t){return Object.assign(e,React.createContext(t)),e.Provider._context=e,e.Consumer._context=e,e}SpringContext.Provider=ctx.Provider,SpringContext.Consumer=ctx.Consumer;const SpringRef=()=>{const e=[],t=function(t){deprecateDirectCall();const i=[];return each(e,((e,a)=>{if(is.und(t))i.push(e.start());else{const n=r(t,e,a);n&&i.push(e.start(n))}})),i};t.current=e,t.add=function(t){e.includes(t)||e.push(t)},t.delete=function(t){const r=e.indexOf(t);~r&&e.splice(r,1)},t.pause=function(){return each(e,(e=>e.pause(...arguments))),this},t.resume=function(){return each(e,(e=>e.resume(...arguments))),this},t.set=function(t){each(e,(e=>e.set(t)))},t.start=function(t){const r=[];return each(e,((e,i)=>{if(is.und(t))r.push(e.start());else{const a=this._getProps(t,e,i);a&&r.push(e.start(a))}})),r},t.stop=function(){return each(e,(e=>e.stop(...arguments))),this},t.update=function(t){return each(e,((e,r)=>e.update(this._getProps(t,e,r)))),this};const r=function(e,t,r){return is.fun(e)?e(r,t):e};return t._getProps=r,t};function useSprings(e,t,r){const i=is.fun(t)&&t;i&&!r&&(r=[]);const a=useMemo((()=>i||3==arguments.length?SpringRef():void 0),[]),n=useRef(0),s=useForceUpdate(),o=useMemo((()=>({ctrls:[],queue:[],flush(e,t){const r=getSprings(e,t);return n.current>0&&!o.queue.length&&!Object.keys(r).some((t=>!e.springs[t]))?flushUpdateQueue(e,t):new Promise((i=>{setSprings(e,r),o.queue.push((()=>{i(flushUpdateQueue(e,t))})),s()}))}})),[]),l=useRef([...o.ctrls]),p=[],c=usePrev(e)||0;function h(e,r){for(let a=e;a<r;a++){const e=l.current[a]||(l.current[a]=new Controller(null,o.flush)),r=i?i(a,e):t[a];r&&(p[a]=declareUpdate(r))}}useMemo((()=>{each(l.current.slice(e,c),(e=>{detachRefs(e,a),e.stop(!0)})),l.current.length=e,h(c,e)}),[e]),useMemo((()=>{h(0,Math.min(c,e))}),r);const d=l.current.map(((e,t)=>getSprings(e,p[t]))),u=useContext(SpringContext),m=usePrev(u),f=u!==m&&hasProps(u);useIsomorphicLayoutEffect((()=>{n.current++,o.ctrls=l.current;const{queue:e}=o;e.length&&(o.queue=[],each(e,(e=>e()))),each(l.current,((e,t)=>{null==a||a.add(e),f&&e.start({default:u});const r=p[t];r&&(replaceRef(e,r.ref),e.ref?e.queue.push(r):e.start(r))}))})),useOnce((()=>()=>{each(o.ctrls,(e=>e.stop(!0)))}));const y=d.map((e=>_extends({},e)));return a?[y,a]:y}function useSpring(e,t){const r=is.fun(e),[[i],a]=useSprings(1,r?e:[e],r?t||[]:t);return r||2==arguments.length?[i,a]:i}let TransitionPhase;!function(e){e.MOUNT="mount",e.ENTER="enter",e.UPDATE="update",e.LEAVE="leave"}(TransitionPhase||(TransitionPhase={}));class Interpolation extends FrameValue{constructor(e,t){super(),this.key=void 0,this.idle=!0,this.calc=void 0,this._active=new Set,this.source=e,this.calc=createInterpolator(...t);const r=this._get(),i=getAnimatedType(r);setAnimated(this,i.create(r))}advance(e){const t=this._get();isEqual(t,this.get())||(getAnimated(this).setValue(t),this._onChange(t,this.idle)),!this.idle&&checkIdle(this._active)&&becomeIdle(this)}_get(){const e=is.arr(this.source)?this.source.map(getFluidValue):toArray(getFluidValue(this.source));return this.calc(...e)}_start(){this.idle&&!checkIdle(this._active)&&(this.idle=!1,each(getPayload(this),(e=>{e.done=!1})),globals.skipAnimation?(raf.batchedUpdates((()=>this.advance())),becomeIdle(this)):frameLoop.start(this))}_attach(){let e=1;each(toArray(this.source),(t=>{hasFluidValue(t)&&addFluidObserver(t,this),isFrameValue(t)&&(t.idle||this._active.add(t),e=Math.max(e,t.priority+1))})),this.priority=e,this._start()}_detach(){each(toArray(this.source),(e=>{hasFluidValue(e)&&removeFluidObserver(e,this)})),this._active.clear(),becomeIdle(this)}eventObserved(e){"change"==e.type?e.idle?this.advance():(this._active.add(e.parent),this._start()):"idle"==e.type?this._active.delete(e.parent):"priority"==e.type&&(this.priority=toArray(this.source).reduce(((e,t)=>Math.max(e,(isFrameValue(t)?t.priority:0)+1)),0))}}function isIdle(e){return!1!==e.idle}function checkIdle(e){return!e.size||Array.from(e).every(isIdle)}function becomeIdle(e){e.idle||(e.idle=!0,each(getPayload(e),(e=>{e.done=!0})),callFluidObservers(e,{type:"idle",parent:e}))}function _objectWithoutPropertiesLoose$1(e,t){if(null==e)return{};var r,i,a={},n=Object.keys(e);for(i=0;i<n.length;i++)r=n[i],t.indexOf(r)>=0||(a[r]=e[r]);return a}globals.assign({createStringInterpolator:createStringInterpolator,to:(e,t)=>new Interpolation(e,t)});const _excluded$2=["style","children","scrollTop","scrollLeft","viewBox"],isCustomPropRE=/^--/;function dangerousStyleValue(e,t){return null==t||"boolean"==typeof t||""===t?"":"number"!=typeof t||0===t||isCustomPropRE.test(e)||isUnitlessNumber.hasOwnProperty(e)&&isUnitlessNumber[e]?(""+t).trim():t+"px"}const attributeCache={};function applyAnimatedValues(e,t){if(!e.nodeType||!e.setAttribute)return!1;const r="filter"===e.nodeName||e.parentNode&&"filter"===e.parentNode.nodeName,i=t,{style:a,children:n,scrollTop:s,scrollLeft:o,viewBox:l}=i,p=_objectWithoutPropertiesLoose$1(i,_excluded$2),c=Object.values(p),h=Object.keys(p).map((t=>r||e.hasAttribute(t)?t:attributeCache[t]||(attributeCache[t]=t.replace(/([A-Z])/g,(e=>"-"+e.toLowerCase())))));void 0!==n&&(e.textContent=n);for(let t in a)if(a.hasOwnProperty(t)){const r=dangerousStyleValue(t,a[t]);isCustomPropRE.test(t)?e.style.setProperty(t,r):e.style[t]=r}h.forEach(((t,r)=>{e.setAttribute(t,c[r])})),void 0!==s&&(e.scrollTop=s),void 0!==o&&(e.scrollLeft=o),void 0!==l&&e.setAttribute("viewBox",l)}let isUnitlessNumber={animationIterationCount:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0};const prefixKey=(e,t)=>e+t.charAt(0).toUpperCase()+t.substring(1),prefixes=["Webkit","Ms","Moz","O"];isUnitlessNumber=Object.keys(isUnitlessNumber).reduce(((e,t)=>(prefixes.forEach((r=>e[prefixKey(r,t)]=e[t])),e)),isUnitlessNumber);const _excluded$1$1=["x","y","z"],domTransforms=/^(matrix|translate|scale|rotate|skew)/,pxTransforms=/^(translate)/,degTransforms=/^(rotate|skew)/,addUnit=(e,t)=>is.num(e)&&0!==e?e+t:e,isValueIdentity=(e,t)=>is.arr(e)?e.every((e=>isValueIdentity(e,t))):is.num(e)?e===t:parseFloat(e)===t;class AnimatedStyle extends AnimatedObject{constructor(e){let{x:t,y:r,z:i}=e,a=_objectWithoutPropertiesLoose$1(e,_excluded$1$1);const n=[],s=[];(t||r||i)&&(n.push([t||0,r||0,i||0]),s.push((e=>[`translate3d(${e.map((e=>addUnit(e,"px"))).join(",")})`,isValueIdentity(e,0)]))),eachProp(a,((e,t)=>{if("transform"===t)n.push([e||""]),s.push((e=>[e,""===e]));else if(domTransforms.test(t)){if(delete a[t],is.und(e))return;const r=pxTransforms.test(t)?"px":degTransforms.test(t)?"deg":"";n.push(toArray(e)),s.push("rotate3d"===t?([e,t,i,a])=>[`rotate3d(${e},${t},${i},${addUnit(a,r)})`,isValueIdentity(a,0)]:e=>[`${t}(${e.map((e=>addUnit(e,r))).join(",")})`,isValueIdentity(e,t.startsWith("scale")?1:0)])}})),n.length&&(a.transform=new FluidTransform(n,s)),super(a)}}class FluidTransform extends FluidValue{constructor(e,t){super(),this._value=null,this.inputs=e,this.transforms=t}get(){return this._value||(this._value=this._get())}_get(){let e="",t=!0;return each(this.inputs,((r,i)=>{const a=getFluidValue(r[0]),[n,s]=this.transforms[i](is.arr(a)?a:r.map(getFluidValue));e+=" "+n,t=t&&s})),t?"none":e}observerAdded(e){1==e&&each(this.inputs,(e=>each(e,(e=>hasFluidValue(e)&&addFluidObserver(e,this)))))}observerRemoved(e){0==e&&each(this.inputs,(e=>each(e,(e=>hasFluidValue(e)&&removeFluidObserver(e,this)))))}eventObserved(e){"change"==e.type&&(this._value=null),callFluidObservers(this,e)}}const primitives=["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","tspan"],_excluded=["scrollTop","scrollLeft"];globals.assign({batchedUpdates:unstable_batchedUpdates,createStringInterpolator:createStringInterpolator,colors:colors});const host=createHost(primitives,{applyAnimatedValues:applyAnimatedValues,createAnimatedStyle:e=>new AnimatedStyle(e),getComponentProps:e=>_objectWithoutPropertiesLoose$1(e,_excluded)}),animated=host.animated,AccordionContext=React__default.createContext(!1);var commonjsGlobal="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},chevronUp={},ChevronUpIcon;Object.defineProperty(chevronUp,"__esModule",{value:!0});var e$l=require$$0;const r$7=e=>e$l.jsx("svg",{width:"1em",height:"1em",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:e$l.jsx("path",{d:"M17.7279 14.2091C17.5059 14.4311 17.2492 14.5421 16.9579 14.5421C16.6659 14.5421 16.4089 14.4311 16.1869 14.2091L10.1659 8.18812L4.12389 14.2301C3.91589 14.4381 3.66589 14.5421 3.37389 14.5421C3.08256 14.5421 2.82589 14.4311 2.60389 14.2091C2.39523 14.0005 2.29089 13.7468 2.29089 13.4481C2.29089 13.1495 2.39523 12.8961 2.60389 12.6881L9.54089 5.75012C9.63823 5.65346 9.73889 5.58412 9.84289 5.54212C9.94689 5.50079 10.0546 5.48012 10.1659 5.48012C10.2772 5.48012 10.3849 5.50079 10.4889 5.54212C10.5929 5.58412 10.6936 5.65346 10.7909 5.75012L17.7489 12.7091C17.9716 12.9311 18.0759 13.1845 18.0619 13.4691C18.0479 13.7538 17.9366 14.0005 17.7279 14.2091Z",fill:"currentColor"})});r$7.displayName="ChevronUpIcon",ChevronUpIcon=chevronUp.ChevronUpIcon=r$7;const BaseColorSet={Brand:{1:"#EF413D",2:"#F26664",3:"#F58E8B",4:"#F9B5B2",5:"#FDDDD7",6:"#FFEEEA"},Primary:"#1C76D5",PrimaryDark:"#1869BF",Secondary:"#0056b3",Accent:{Dark:{1:"#465A88",2:"#556D99",3:"#8D8DBF"},Light:{1:"#57A9FF",2:"#81BFFF",3:"#BED7FF",4:"#E2ECFD",5:"#F6F8FF",6:"#FBFCFE"}},Neutral:{1:"#282828",2:"#424242",3:"#686868",4:"#A4A4A4",5:"#E0E4E5",6:"#ECEFEF",7:"#F8F8F8",8:"#FFFFFF"},Validation:{Green:{Text:"#097123",Icon:"#4FC029",Border:"#95D97F",Background:"#F9FDF8"},Orange:{Text:"#B34E00",Icon:"#FEAB10",Border:"#F9CB77",Background:"#FFFCF7",Badge:"#F57F17"},Red:{Text:"#C60000",Icon:"#C60000",Border:"#DD6666",Background:"#FDF7F7"},Blue:{Text:"#064D70",Icon:" #066391",Border:"#84B7DB",Background:"#E8F4FA"}},Shadow:{Accent:"rgba(87, 169, 255, 0.5)",Red:"rgba(221, 102, 102, 0.8)",Elevation:"rgba(75, 83, 159, 0.24)"}},BookingSGColorSet={Brand:{1:"#EF413D",2:"#F26664",3:"#F58E8B",4:"#F9B5B2",5:"#FDDDD7",6:"#FFEEEA"},Primary:"#6F4AB8",PrimaryDark:"#6443A6",Secondary:"#6443A6",Accent:{Dark:{1:"#355985",2:"#68819D",3:"#9AABBE"},Light:{1:"#9F82D9",2:"#B5A5D7",3:"#CEC3E4 ",4:"#E2DBEF",5:"#F2EFF8",6:"#F7F6FB"}},Neutral:{1:"#282828",2:"#424242",3:"#686868",4:"#A4A4A4",5:"#E0E4E5",6:"#ECEFEF",7:"#F8F8F8",8:"#FFFFFF"},Validation:{Green:{Text:"#097123",Icon:"#4FC029",Border:"#95D97F",Background:"#F9FDF8"},Orange:{Text:"#B34E00",Icon:"#FEAB10",Border:"#F9CB77",Background:"#FFFCF7",Badge:"#F57F17"},Red:{Text:"#C60000",Icon:"#C60000",Border:"#DD6666",Background:"#FDF7F7"},Blue:{Text:"#064D70",Icon:" #066391",Border:"#84B7DB",Background:"#E8F4FA"}},Shadow:{Accent:"rgba(161, 87, 255, 0.5)",Red:"rgba(221, 102, 102, 0.8)",Elevation:"rgba(75, 83, 159, 0.24)"}};var isArray$9=Array.isArray,isArray_1=isArray$9,freeGlobal$1="object"==typeof commonjsGlobal&&commonjsGlobal&&commonjsGlobal.Object===Object&&commonjsGlobal,_freeGlobal=freeGlobal$1,freeGlobal=_freeGlobal,freeSelf="object"==typeof self&&self&&self.Object===Object&&self,root$9=freeGlobal||freeSelf||Function("return this")(),_root=root$9,root$8=_root,Symbol$5=root$8.Symbol,_Symbol=Symbol$5,Symbol$4=_Symbol,objectProto$b=Object.prototype,hasOwnProperty$9=objectProto$b.hasOwnProperty,nativeObjectToString$1=objectProto$b.toString,symToStringTag$1=Symbol$4?Symbol$4.toStringTag:void 0;function getRawTag$1(e){var t=hasOwnProperty$9.call(e,symToStringTag$1),r=e[symToStringTag$1];try{e[symToStringTag$1]=void 0;var i=!0}catch(e){}var a=nativeObjectToString$1.call(e);return i&&(t?e[symToStringTag$1]=r:delete e[symToStringTag$1]),a}var _getRawTag=getRawTag$1,objectProto$a=Object.prototype,nativeObjectToString=objectProto$a.toString;function objectToString$1(e){return nativeObjectToString.call(e)}var _objectToString=objectToString$1,Symbol$3=_Symbol,getRawTag=_getRawTag,objectToString=_objectToString,nullTag="[object Null]",undefinedTag="[object Undefined]",symToStringTag=Symbol$3?Symbol$3.toStringTag:void 0;function baseGetTag$5(e){return null==e?void 0===e?undefinedTag:nullTag:symToStringTag&&symToStringTag in Object(e)?getRawTag(e):objectToString(e)}var _baseGetTag=baseGetTag$5;function isObjectLike$5(e){return null!=e&&"object"==typeof e}var isObjectLike_1=isObjectLike$5,baseGetTag$4=_baseGetTag,isObjectLike$4=isObjectLike_1,symbolTag$1="[object Symbol]";function isSymbol$4(e){return"symbol"==typeof e||isObjectLike$4(e)&&baseGetTag$4(e)==symbolTag$1}var isSymbol_1=isSymbol$4,isArray$8=isArray_1,isSymbol$3=isSymbol_1,reIsDeepProp=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,reIsPlainProp=/^\w*$/;function isKey$3(e,t){if(isArray$8(e))return!1;var r=typeof e;return!("number"!=r&&"symbol"!=r&&"boolean"!=r&&null!=e&&!isSymbol$3(e))||(reIsPlainProp.test(e)||!reIsDeepProp.test(e)||null!=t&&e in Object(t))}var _isKey=isKey$3;function isObject$5(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}var isObject_1=isObject$5,baseGetTag$3=_baseGetTag,isObject$4=isObject_1,asyncTag="[object AsyncFunction]",funcTag$1="[object Function]",genTag="[object GeneratorFunction]",proxyTag="[object Proxy]";function isFunction$2(e){if(!isObject$4(e))return!1;var t=baseGetTag$3(e);return t==funcTag$1||t==genTag||t==asyncTag||t==proxyTag}var isFunction_1=isFunction$2,root$7=_root,coreJsData$1=root$7["__core-js_shared__"],_coreJsData=coreJsData$1,coreJsData=_coreJsData,maskSrcKey=(uid=/[^.]+$/.exec(coreJsData&&coreJsData.keys&&coreJsData.keys.IE_PROTO||""),uid?"Symbol(src)_1."+uid:""),uid;function isMasked$1(e){return!!maskSrcKey&&maskSrcKey in e}var _isMasked=isMasked$1,funcProto$1=Function.prototype,funcToString$1=funcProto$1.toString;function toSource$2(e){if(null!=e){try{return funcToString$1.call(e)}catch(e){}try{return e+""}catch(e){}}return""}var _toSource=toSource$2,isFunction$1=isFunction_1,isMasked=_isMasked,isObject$3=isObject_1,toSource$1=_toSource,reRegExpChar=/[\\^$.*+?()[\]{}|]/g,reIsHostCtor=/^\[object .+?Constructor\]$/,funcProto=Function.prototype,objectProto$9=Object.prototype,funcToString=funcProto.toString,hasOwnProperty$8=objectProto$9.hasOwnProperty,reIsNative=RegExp("^"+funcToString.call(hasOwnProperty$8).replace(reRegExpChar,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function baseIsNative$1(e){return!(!isObject$3(e)||isMasked(e))&&(isFunction$1(e)?reIsNative:reIsHostCtor).test(toSource$1(e))}var _baseIsNative=baseIsNative$1;function getValue$2(e,t){return null==e?void 0:e[t]}var _getValue=getValue$2,baseIsNative=_baseIsNative,getValue$1=_getValue;function getNative$6(e,t){var r=getValue$1(e,t);return baseIsNative(r)?r:void 0}var _getNative=getNative$6,getNative$5=_getNative,nativeCreate$4=getNative$5(Object,"create"),_nativeCreate=nativeCreate$4,nativeCreate$3=_nativeCreate;function hashClear$1(){this.__data__=nativeCreate$3?nativeCreate$3(null):{},this.size=0}var _hashClear=hashClear$1;function hashDelete$1(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var _hashDelete=hashDelete$1,nativeCreate$2=_nativeCreate,HASH_UNDEFINED$2="__lodash_hash_undefined__",objectProto$8=Object.prototype,hasOwnProperty$7=objectProto$8.hasOwnProperty;function hashGet$1(e){var t=this.__data__;if(nativeCreate$2){var r=t[e];return r===HASH_UNDEFINED$2?void 0:r}return hasOwnProperty$7.call(t,e)?t[e]:void 0}var _hashGet=hashGet$1,nativeCreate$1=_nativeCreate,objectProto$7=Object.prototype,hasOwnProperty$6=objectProto$7.hasOwnProperty;function hashHas$1(e){var t=this.__data__;return nativeCreate$1?void 0!==t[e]:hasOwnProperty$6.call(t,e)}var _hashHas=hashHas$1,nativeCreate=_nativeCreate,HASH_UNDEFINED$1="__lodash_hash_undefined__";function hashSet$1(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=nativeCreate&&void 0===t?HASH_UNDEFINED$1:t,this}var _hashSet=hashSet$1,hashClear=_hashClear,hashDelete=_hashDelete,hashGet=_hashGet,hashHas=_hashHas,hashSet=_hashSet;function Hash$1(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var i=e[t];this.set(i[0],i[1])}}Hash$1.prototype.clear=hashClear,Hash$1.prototype.delete=hashDelete,Hash$1.prototype.get=hashGet,Hash$1.prototype.has=hashHas,Hash$1.prototype.set=hashSet;var _Hash=Hash$1;function listCacheClear$1(){this.__data__=[],this.size=0}var _listCacheClear=listCacheClear$1;function eq$2(e,t){return e===t||e!=e&&t!=t}var eq_1=eq$2,eq$1=eq_1;function assocIndexOf$4(e,t){for(var r=e.length;r--;)if(eq$1(e[r][0],t))return r;return-1}var _assocIndexOf=assocIndexOf$4,assocIndexOf$3=_assocIndexOf,arrayProto=Array.prototype,splice=arrayProto.splice;function listCacheDelete$1(e){var t=this.__data__,r=assocIndexOf$3(t,e);return!(r<0)&&(r==t.length-1?t.pop():splice.call(t,r,1),--this.size,!0)}var _listCacheDelete=listCacheDelete$1,assocIndexOf$2=_assocIndexOf;function listCacheGet$1(e){var t=this.__data__,r=assocIndexOf$2(t,e);return r<0?void 0:t[r][1]}var _listCacheGet=listCacheGet$1,assocIndexOf$1=_assocIndexOf;function listCacheHas$1(e){return assocIndexOf$1(this.__data__,e)>-1}var _listCacheHas=listCacheHas$1,assocIndexOf=_assocIndexOf;function listCacheSet$1(e,t){var r=this.__data__,i=assocIndexOf(r,e);return i<0?(++this.size,r.push([e,t])):r[i][1]=t,this}var _listCacheSet=listCacheSet$1,listCacheClear=_listCacheClear,listCacheDelete=_listCacheDelete,listCacheGet=_listCacheGet,listCacheHas=_listCacheHas,listCacheSet=_listCacheSet;function ListCache$4(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var i=e[t];this.set(i[0],i[1])}}ListCache$4.prototype.clear=listCacheClear,ListCache$4.prototype.delete=listCacheDelete,ListCache$4.prototype.get=listCacheGet,ListCache$4.prototype.has=listCacheHas,ListCache$4.prototype.set=listCacheSet;var _ListCache=ListCache$4,getNative$4=_getNative,root$6=_root,Map$4=getNative$4(root$6,"Map"),_Map=Map$4,Hash=_Hash,ListCache$3=_ListCache,Map$3=_Map;function mapCacheClear$1(){this.size=0,this.__data__={hash:new Hash,map:new(Map$3||ListCache$3),string:new Hash}}var _mapCacheClear=mapCacheClear$1;function isKeyable$1(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e}var _isKeyable=isKeyable$1,isKeyable=_isKeyable;function getMapData$4(e,t){var r=e.__data__;return isKeyable(t)?r["string"==typeof t?"string":"hash"]:r.map}var _getMapData=getMapData$4,getMapData$3=_getMapData;function mapCacheDelete$1(e){var t=getMapData$3(this,e).delete(e);return this.size-=t?1:0,t}var _mapCacheDelete=mapCacheDelete$1,getMapData$2=_getMapData;function mapCacheGet$1(e){return getMapData$2(this,e).get(e)}var _mapCacheGet=mapCacheGet$1,getMapData$1=_getMapData;function mapCacheHas$1(e){return getMapData$1(this,e).has(e)}var _mapCacheHas=mapCacheHas$1,getMapData=_getMapData;function mapCacheSet$1(e,t){var r=getMapData(this,e),i=r.size;return r.set(e,t),this.size+=r.size==i?0:1,this}var _mapCacheSet=mapCacheSet$1,mapCacheClear=_mapCacheClear,mapCacheDelete=_mapCacheDelete,mapCacheGet=_mapCacheGet,mapCacheHas=_mapCacheHas,mapCacheSet=_mapCacheSet;function MapCache$3(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var i=e[t];this.set(i[0],i[1])}}MapCache$3.prototype.clear=mapCacheClear,MapCache$3.prototype.delete=mapCacheDelete,MapCache$3.prototype.get=mapCacheGet,MapCache$3.prototype.has=mapCacheHas,MapCache$3.prototype.set=mapCacheSet;var _MapCache=MapCache$3,MapCache$2=_MapCache,FUNC_ERROR_TEXT$1="Expected a function";function memoize$1(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new TypeError(FUNC_ERROR_TEXT$1);var r=function(){var i=arguments,a=t?t.apply(this,i):i[0],n=r.cache;if(n.has(a))return n.get(a);var s=e.apply(this,i);return r.cache=n.set(a,s)||n,s};return r.cache=new(memoize$1.Cache||MapCache$2),r}memoize$1.Cache=MapCache$2;var memoize_1=memoize$1,memoize=memoize_1,MAX_MEMOIZE_SIZE=500;function memoizeCapped$1(e){var t=memoize(e,(function(e){return r.size===MAX_MEMOIZE_SIZE&&r.clear(),e})),r=t.cache;return t}var _memoizeCapped=memoizeCapped$1,memoizeCapped=_memoizeCapped,rePropName=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,reEscapeChar=/\\(\\)?/g,stringToPath$1=memoizeCapped((function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(rePropName,(function(e,r,i,a){t.push(i?a.replace(reEscapeChar,"$1"):r||e)})),t})),_stringToPath=stringToPath$1;function arrayMap$1(e,t){for(var r=-1,i=null==e?0:e.length,a=Array(i);++r<i;)a[r]=t(e[r],r,e);return a}var _arrayMap=arrayMap$1,Symbol$2=_Symbol,arrayMap=_arrayMap,isArray$7=isArray_1,isSymbol$2=isSymbol_1,INFINITY$2=1/0,symbolProto$1=Symbol$2?Symbol$2.prototype:void 0,symbolToString=symbolProto$1?symbolProto$1.toString:void 0;function baseToString$1(e){if("string"==typeof e)return e;if(isArray$7(e))return arrayMap(e,baseToString$1)+"";if(isSymbol$2(e))return symbolToString?symbolToString.call(e):"";var t=e+"";return"0"==t&&1/e==-INFINITY$2?"-0":t}var _baseToString=baseToString$1,baseToString=_baseToString;function toString$3(e){return null==e?"":baseToString(e)}var toString_1=toString$3,isArray$6=isArray_1,isKey$2=_isKey,stringToPath=_stringToPath,toString$2=toString_1;function castPath$2(e,t){return isArray$6(e)?e:isKey$2(e,t)?[e]:stringToPath(toString$2(e))}var _castPath=castPath$2,isSymbol$1=isSymbol_1,INFINITY$1=1/0;function toKey$4(e){if("string"==typeof e||isSymbol$1(e))return e;var t=e+"";return"0"==t&&1/e==-INFINITY$1?"-0":t}var _toKey=toKey$4,castPath$1=_castPath,toKey$3=_toKey;function baseGet$2(e,t){for(var r=0,i=(t=castPath$1(t,e)).length;null!=e&&r<i;)e=e[toKey$3(t[r++])];return r&&r==i?e:void 0}var _baseGet=baseGet$2,baseGet$1=_baseGet;function get$1(e,t,r){var i=null==e?void 0:baseGet$1(e,t);return void 0===i?r:i}var get_1=get$1;const getValue=(e,t,r)=>t?get_1(r,t)||get_1(e,t):r||e,getCollection=(e,t)=>{const r=t||e.defaultValue;return get_1(e.collections,r)};var ThemeContextKeys;!function(e){e.colorScheme="colorScheme",e.layout="layout",e.textStyleScheme="textStyleScheme",e.designTokenScheme="designTokenScheme",e.resourceScheme="resourceScheme"}(ThemeContextKeys||(ThemeContextKeys={}));const ColorSpec={collections:{base:BaseColorSet,bookingsg:BookingSGColorSet},defaultValue:"base"},getThemeColors=e=>t=>{const r=t.theme,i=getCollection(ColorSpec,r[ThemeContextKeys.colorScheme]);return r.options&&r.options.color?getValue(i,e,r.options.color):getValue(i,e)},Color={Brand:{1:getThemeColors("Brand.1"),2:getThemeColors("Brand.2"),3:getThemeColors("Brand.3"),4:getThemeColors("Brand.4"),5:getThemeColors("Brand.5"),6:getThemeColors("Brand.6")},Primary:getThemeColors("Primary"),PrimaryDark:getThemeColors("PrimaryDark"),Secondary:getThemeColors("Secondary"),Accent:{Light:{1:getThemeColors("Accent.Light.1"),2:getThemeColors("Accent.Light.2"),3:getThemeColors("Accent.Light.3"),4:getThemeColors("Accent.Light.4"),5:getThemeColors("Accent.Light.5"),6:getThemeColors("Accent.Light.6")},Dark:{1:getThemeColors("Accent.Dark.1"),2:getThemeColors("Accent.Dark.2"),3:getThemeColors("Accent.Dark.3")}},Neutral:{1:getThemeColors("Neutral.1"),2:getThemeColors("Neutral.2"),3:getThemeColors("Neutral.3"),4:getThemeColors("Neutral.4"),5:getThemeColors("Neutral.5"),6:getThemeColors("Neutral.6"),7:getThemeColors("Neutral.7"),8:getThemeColors("Neutral.8")},Validation:{Green:{Text:getThemeColors("Validation.Green.Text"),Icon:getThemeColors("Validation.Green.Icon"),Border:getThemeColors("Validation.Green.Border"),Background:getThemeColors("Validation.Green.Background")},Orange:{Text:getThemeColors("Validation.Orange.Text"),Icon:getThemeColors("Validation.Orange.Icon"),Border:getThemeColors("Validation.Orange.Border"),Background:getThemeColors("Validation.Orange.Background"),Badge:getThemeColors("Validation.Orange.Badge")},Red:{Text:getThemeColors("Validation.Red.Text"),Icon:getThemeColors("Validation.Red.Icon"),Border:getThemeColors("Validation.Red.Border"),Background:getThemeColors("Validation.Red.Background")},Blue:{Text:getThemeColors("Validation.Blue.Text"),Icon:getThemeColors("Validation.Blue.Icon"),Border:getThemeColors("Validation.Blue.Border"),Background:getThemeColors("Validation.Blue.Background")}},Shadow:{Accent:getThemeColors("Shadow.Accent"),Red:getThemeColors("Shadow.Red"),Elevation:getThemeColors("Shadow.Elevation")}},Main$1=styled.button`
1
+ import require$$0,{jsx,jsxs,Fragment}from"react/jsx-runtime";import*as React from"react";import React__default,{cloneElement,useRef,useState,isValidElement,createRef,PureComponent,useEffect,useLayoutEffect,forwardRef,useCallback,useContext,useMemo,Children,useImperativeHandle,createElement}from"react";import ReactDOM,{findDOMNode,unstable_batchedUpdates}from"react-dom";import styled,{css,keyframes,useTheme}from"styled-components";var extendStatics=function(e,t){return extendStatics=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},extendStatics(e,t)};function __extends(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}extendStatics(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}var __assign=function(){return __assign=Object.assign||function(e){for(var t,r=1,i=arguments.length;r<i;r++)for(var a in t=arguments[r])Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a]);return e},__assign.apply(this,arguments)};function __rest(e,t){var r={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.indexOf(i)<0&&(r[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var a=0;for(i=Object.getOwnPropertySymbols(e);a<i.length;a++)t.indexOf(i[a])<0&&Object.prototype.propertyIsEnumerable.call(e,i[a])&&(r[i[a]]=e[i[a]])}return r}var commonjsGlobal$1="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function isObject$3$1(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}var isObject_1$1=isObject$3$1,freeGlobal$1$1="object"==typeof commonjsGlobal$1&&commonjsGlobal$1&&commonjsGlobal$1.Object===Object&&commonjsGlobal$1,_freeGlobal$1=freeGlobal$1$1,freeGlobal$2=_freeGlobal$1,freeSelf$1="object"==typeof self&&self&&self.Object===Object&&self,root$2$1=freeGlobal$2||freeSelf$1||Function("return this")(),_root$1=root$2$1,root$1$1=_root$1,now$1$1=function(){return root$1$1.Date.now()},now_1$1=now$1$1,reWhitespace$1=/\s/;function trimmedEndIndex$1$1(e){for(var t=e.length;t--&&reWhitespace$1.test(e.charAt(t)););return t}var _trimmedEndIndex$1=trimmedEndIndex$1$1,trimmedEndIndex$2=_trimmedEndIndex$1,reTrimStart$1=/^\s+/;function baseTrim$1$1(e){return e?e.slice(0,trimmedEndIndex$2(e)+1).replace(reTrimStart$1,""):e}var _baseTrim$1=baseTrim$1$1,root$a=_root$1,Symbol$2$1=root$a.Symbol,_Symbol$1=Symbol$2$1,Symbol$1$1=_Symbol$1,objectProto$1$1=Object.prototype,hasOwnProperty$a=objectProto$1$1.hasOwnProperty,nativeObjectToString$1$1=objectProto$1$1.toString,symToStringTag$1$1=Symbol$1$1?Symbol$1$1.toStringTag:void 0;function getRawTag$1$1(e){var t=hasOwnProperty$a.call(e,symToStringTag$1$1),r=e[symToStringTag$1$1];try{e[symToStringTag$1$1]=void 0;var i=!0}catch(e){}var a=nativeObjectToString$1$1.call(e);return i&&(t?e[symToStringTag$1$1]=r:delete e[symToStringTag$1$1]),a}var _getRawTag$1=getRawTag$1$1,objectProto$c=Object.prototype,nativeObjectToString$2=objectProto$c.toString;function objectToString$1$1(e){return nativeObjectToString$2.call(e)}var _objectToString$1=objectToString$1$1,Symbol$6=_Symbol$1,getRawTag$2=_getRawTag$1,objectToString$2=_objectToString$1,nullTag$1="[object Null]",undefinedTag$1="[object Undefined]",symToStringTag$2=Symbol$6?Symbol$6.toStringTag:void 0;function baseGetTag$1$1(e){return null==e?void 0===e?undefinedTag$1:nullTag$1:symToStringTag$2&&symToStringTag$2 in Object(e)?getRawTag$2(e):objectToString$2(e)}var _baseGetTag$1=baseGetTag$1$1;function isObjectLike$1$1(e){return null!=e&&"object"==typeof e}var isObjectLike_1$1=isObjectLike$1$1,baseGetTag$6=_baseGetTag$1,isObjectLike$6=isObjectLike_1$1,symbolTag$2="[object Symbol]";function isSymbol$1$1(e){return"symbol"==typeof e||isObjectLike$6(e)&&baseGetTag$6(e)==symbolTag$2}var isSymbol_1$1=isSymbol$1$1,baseTrim$2=_baseTrim$1,isObject$2$1=isObject_1$1,isSymbol$5=isSymbol_1$1,NAN$1=NaN,reIsBadHex$1=/^[-+]0x[0-9a-f]+$/i,reIsBinary$1=/^0b[01]+$/i,reIsOctal$1=/^0o[0-7]+$/i,freeParseInt$1=parseInt;function toNumber$1$1(e){if("number"==typeof e)return e;if(isSymbol$5(e))return NAN$1;if(isObject$2$1(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=isObject$2$1(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=baseTrim$2(e);var r=reIsBinary$1.test(e);return r||reIsOctal$1.test(e)?freeParseInt$1(e.slice(2),r?2:8):reIsBadHex$1.test(e)?NAN$1:+e}var toNumber_1$1=toNumber$1$1,isObject$1$1=isObject_1$1,now$2=now_1$1,toNumber$3=toNumber_1$1,FUNC_ERROR_TEXT$1$1="Expected a function",nativeMax$2=Math.max,nativeMin$1=Math.min;function debounce$1(e,t,r){var i,a,n,s,o,l,p=0,c=!1,h=!1,d=!0;if("function"!=typeof e)throw new TypeError(FUNC_ERROR_TEXT$1$1);function u(t){var r=i,n=a;return i=a=void 0,p=t,s=e.apply(n,r)}function m(e){var r=e-l;return void 0===l||r>=t||r<0||h&&e-p>=n}function f(){var e=now$2();if(m(e))return y(e);o=setTimeout(f,function(e){var r=t-(e-l);return h?nativeMin$1(r,n-(e-p)):r}(e))}function y(e){return o=void 0,d&&i?u(e):(i=a=void 0,s)}function g(){var e=now$2(),r=m(e);if(i=arguments,a=this,l=e,r){if(void 0===o)return function(e){return p=e,o=setTimeout(f,t),c?u(e):s}(l);if(h)return clearTimeout(o),o=setTimeout(f,t),u(l)}return void 0===o&&(o=setTimeout(f,t)),s}return t=toNumber$3(t)||0,isObject$1$1(r)&&(c=!!r.leading,n=(h="maxWait"in r)?nativeMax$2(toNumber$3(r.maxWait)||0,t):n,d="trailing"in r?!!r.trailing:d),g.cancel=function(){void 0!==o&&clearTimeout(o),p=0,i=l=a=o=void 0},g.flush=function(){return void 0===o?s:y(now$2())},g}var debounce_1$1=debounce$1,debounce$2=debounce_1$1,isObject$6=isObject_1$1,FUNC_ERROR_TEXT$2="Expected a function";function throttle(e,t,r){var i=!0,a=!0;if("function"!=typeof e)throw new TypeError(FUNC_ERROR_TEXT$2);return isObject$6(r)&&(i="leading"in r?!!r.leading:i,a="trailing"in r?!!r.trailing:a),debounce$2(e,t,{leading:i,maxWait:t,trailing:a})}var throttle_1=throttle,patchResizeHandler=function(e,t,r,i){switch(t){case"debounce":return debounce_1$1(e,r,i);case"throttle":return throttle_1(e,r,i);default:return e}},isFunction$3=function(e){return"function"==typeof e},isSSR$1=function(){return"undefined"==typeof window},isDOMElement=function(e){return e instanceof Element||e instanceof HTMLDocument},createNotifier=function(e,t,r,i){return function(a){var n=a.width,s=a.height;t((function(t){return t.width===n&&t.height===s||t.width===n&&!i||t.height===s&&!r?t:(e&&isFunction$3(e)&&e(n,s),{width:n,height:s})}))}};!function(e){function t(t){var r=e.call(this,t)||this;r.cancelHandler=function(){r.resizeHandler&&r.resizeHandler.cancel&&(r.resizeHandler.cancel(),r.resizeHandler=null)},r.attachObserver=function(){var e=r.props,t=e.targetRef,i=e.observerOptions;if(!isSSR$1()){t&&t.current&&(r.targetRef.current=t.current);var a=r.getElement();a&&(r.observableElement&&r.observableElement===a||(r.observableElement=a,r.resizeObserver.observe(a,i)))}},r.getElement=function(){var e=r.props,t=e.querySelector,i=e.targetDomEl;if(isSSR$1())return null;if(t)return document.querySelector(t);if(i&&isDOMElement(i))return i;if(r.targetRef&&isDOMElement(r.targetRef.current))return r.targetRef.current;var a=findDOMNode(r);if(!a)return null;switch(r.getRenderType()){case"renderProp":case"childFunction":case"child":case"childArray":return a;default:return a.parentElement}},r.createResizeHandler=function(e){var t=r.props,i=t.handleWidth,a=void 0===i||i,n=t.handleHeight,s=void 0===n||n,o=t.onResize;if(a||s){var l=createNotifier(o,r.setState.bind(r),a,s);e.forEach((function(e){var t=e&&e.contentRect||{},i=t.width,a=t.height;!r.skipOnMount&&!isSSR$1()&&l({width:i,height:a}),r.skipOnMount=!1}))}},r.getRenderType=function(){var e=r.props,t=e.render,i=e.children;return isFunction$3(t)?"renderProp":isFunction$3(i)?"childFunction":isValidElement(i)?"child":Array.isArray(i)?"childArray":"parent"};var i=t.skipOnMount,a=t.refreshMode,n=t.refreshRate,s=void 0===n?1e3:n,o=t.refreshOptions;return r.state={width:void 0,height:void 0},r.skipOnMount=i,r.targetRef=createRef(),r.observableElement=null,isSSR$1()||(r.resizeHandler=patchResizeHandler(r.createResizeHandler,a,s,o),r.resizeObserver=new window.ResizeObserver(r.resizeHandler)),r}__extends(t,e),t.prototype.componentDidMount=function(){this.attachObserver()},t.prototype.componentDidUpdate=function(){this.attachObserver()},t.prototype.componentWillUnmount=function(){isSSR$1()||(this.observableElement=null,this.resizeObserver.disconnect(),this.cancelHandler())},t.prototype.render=function(){var e,t=this.props,r=t.render,i=t.children,a=t.nodeType,n=void 0===a?"div":a,s=this.state,o={width:s.width,height:s.height,targetRef:this.targetRef};switch(this.getRenderType()){case"renderProp":return r&&r(o);case"childFunction":return(e=i)(o);case"child":if((e=i).type&&"string"==typeof e.type){var l=__rest(o,["targetRef"]);return cloneElement(e,l)}return cloneElement(e,o);case"childArray":return(e=i).map((function(e){return!!e&&cloneElement(e,o)}));default:return React.createElement(n,null)}}}(PureComponent);var useEnhancedEffect=isSSR$1()?useEffect:useLayoutEffect;function useResizeDetector(e){void 0===e&&(e={});var t=e.skipOnMount,r=void 0!==t&&t,i=e.refreshMode,a=e.refreshRate,n=void 0===a?1e3:a,s=e.refreshOptions,o=e.handleWidth,l=void 0===o||o,p=e.handleHeight,c=void 0===p||p,h=e.targetRef,d=e.observerOptions,u=e.onResize,m=useRef(r),f=useRef(null),y=null!=h?h:f,g=useRef(),_=useState({width:void 0,height:void 0}),x=_[0],b=_[1];return useEnhancedEffect((function(){if(!isSSR$1()){var e=createNotifier(u,b,l,c);g.current=patchResizeHandler((function(t){(l||c)&&t.forEach((function(t){var r=t&&t.contentRect||{},i=r.width,a=r.height;!m.current&&!isSSR$1()&&e({width:i,height:a}),m.current=!1}))}),i,n,s);var t=new window.ResizeObserver(g.current);return y.current&&t.observe(y.current,d),function(){t.disconnect();var e=g.current;e&&e.cancel&&e.cancel()}}}),[i,n,s,l,c,u,d,y.current]),__assign({ref:y},x)}let updateQueue=makeQueue();const raf=e=>schedule(e,updateQueue);let writeQueue=makeQueue();raf.write=e=>schedule(e,writeQueue);let onStartQueue=makeQueue();raf.onStart=e=>schedule(e,onStartQueue);let onFrameQueue=makeQueue();raf.onFrame=e=>schedule(e,onFrameQueue);let onFinishQueue=makeQueue();raf.onFinish=e=>schedule(e,onFinishQueue);let timeouts=[];raf.setTimeout=(e,t)=>{let r=raf.now()+t,i=()=>{let e=timeouts.findIndex((e=>e.cancel==i));~e&&timeouts.splice(e,1),pendingCount-=~e?1:0},a={time:r,handler:e,cancel:i};return timeouts.splice(findTimeout(r),0,a),pendingCount+=1,start(),a};let findTimeout=e=>~(~timeouts.findIndex((t=>t.time>e))||~timeouts.length);raf.cancel=e=>{onStartQueue.delete(e),onFrameQueue.delete(e),onFinishQueue.delete(e),updateQueue.delete(e),writeQueue.delete(e)},raf.sync=e=>{sync=!0,raf.batchedUpdates(e),sync=!1},raf.throttle=e=>{let t;function r(){try{e(...t)}finally{t=null}}function i(...e){t=e,raf.onStart(r)}return i.handler=e,i.cancel=()=>{onStartQueue.delete(r),t=null},i};let nativeRaf="undefined"!=typeof window?window.requestAnimationFrame:()=>{};raf.use=e=>nativeRaf=e,raf.now="undefined"!=typeof performance?()=>performance.now():Date.now,raf.batchedUpdates=e=>e(),raf.catch=console.error,raf.frameLoop="always",raf.advance=()=>{"demand"!==raf.frameLoop?console.warn("Cannot call the manual advancement of rafz whilst frameLoop is not set as demand"):update()};let ts=-1,pendingCount=0,sync=!1;function schedule(e,t){sync?(t.delete(e),e(0)):(t.add(e),start())}function start(){ts<0&&(ts=0,"demand"!==raf.frameLoop&&nativeRaf(loop))}function stop(){ts=-1}function loop(){~ts&&(nativeRaf(loop),raf.batchedUpdates(update))}function update(){let e=ts;ts=raf.now();let t=findTimeout(ts);t&&(eachSafely(timeouts.splice(0,t),(e=>e.handler())),pendingCount-=t),pendingCount?(onStartQueue.flush(),updateQueue.flush(e?Math.min(64,ts-e):16.667),onFrameQueue.flush(),writeQueue.flush(),onFinishQueue.flush()):stop()}function makeQueue(){let e=new Set,t=e;return{add(r){pendingCount+=t!=e||e.has(r)?0:1,e.add(r)},delete:r=>(pendingCount-=t==e&&e.has(r)?1:0,e.delete(r)),flush(r){t.size&&(e=new Set,pendingCount-=t.size,eachSafely(t,(t=>t(r)&&e.add(t))),pendingCount+=e.size,t=e)}}}function eachSafely(e,t){e.forEach((e=>{try{t(e)}catch(e){raf.catch(e)}}))}function noop(){}const defineHidden=(e,t,r)=>Object.defineProperty(e,t,{value:r,writable:!0,configurable:!0}),is={arr:Array.isArray,obj:e=>!!e&&"Object"===e.constructor.name,fun:e=>"function"==typeof e,str:e=>"string"==typeof e,num:e=>"number"==typeof e,und:e=>void 0===e};function isEqual$1(e,t){if(is.arr(e)){if(!is.arr(t)||e.length!==t.length)return!1;for(let r=0;r<e.length;r++)if(e[r]!==t[r])return!1;return!0}return e===t}const each=(e,t)=>e.forEach(t);function eachProp(e,t,r){if(is.arr(e))for(let i=0;i<e.length;i++)t.call(r,e[i],`${i}`);else for(const i in e)e.hasOwnProperty(i)&&t.call(r,e[i],i)}const toArray=e=>is.und(e)?[]:is.arr(e)?e:[e];function flush(e,t){if(e.size){const r=Array.from(e);e.clear(),each(r,t)}}const flushCalls=(e,...t)=>flush(e,(e=>e(...t))),isSSR=()=>"undefined"==typeof window||!window.navigator||/ServerSideRendering|^Deno\//.test(window.navigator.userAgent);let createStringInterpolator$1,to,colors$1=null,skipAnimation=!1,willAdvance=noop;const assign=e=>{e.to&&(to=e.to),e.now&&(raf.now=e.now),void 0!==e.colors&&(colors$1=e.colors),null!=e.skipAnimation&&(skipAnimation=e.skipAnimation),e.createStringInterpolator&&(createStringInterpolator$1=e.createStringInterpolator),e.requestAnimationFrame&&raf.use(e.requestAnimationFrame),e.batchedUpdates&&(raf.batchedUpdates=e.batchedUpdates),e.willAdvance&&(willAdvance=e.willAdvance),e.frameLoop&&(raf.frameLoop=e.frameLoop)};var globals=Object.freeze({__proto__:null,get createStringInterpolator(){return createStringInterpolator$1},get to(){return to},get colors(){return colors$1},get skipAnimation(){return skipAnimation},get willAdvance(){return willAdvance},assign:assign});const startQueue=new Set;let currentFrame=[],prevFrame=[],priority=0;const frameLoop={get idle(){return!startQueue.size&&!currentFrame.length},start(e){priority>e.priority?(startQueue.add(e),raf.onStart(flushStartQueue)):(startSafely(e),raf(advance))},advance:advance,sort(e){if(priority)raf.onFrame((()=>frameLoop.sort(e)));else{const t=currentFrame.indexOf(e);~t&&(currentFrame.splice(t,1),startUnsafely(e))}},clear(){currentFrame=[],startQueue.clear()}};function flushStartQueue(){startQueue.forEach(startSafely),startQueue.clear(),raf(advance)}function startSafely(e){currentFrame.includes(e)||startUnsafely(e)}function startUnsafely(e){currentFrame.splice(findIndex$2(currentFrame,(t=>t.priority>e.priority)),0,e)}function advance(e){const t=prevFrame;for(let r=0;r<currentFrame.length;r++){const i=currentFrame[r];priority=i.priority,i.idle||(willAdvance(i),i.advance(e),i.idle||t.push(i))}return priority=0,prevFrame=currentFrame,prevFrame.length=0,currentFrame=t,currentFrame.length>0}function findIndex$2(e,t){const r=e.findIndex(t);return r<0?e.length:r}const clamp=(e,t,r)=>Math.min(Math.max(r,e),t),colors={transparent:0,aliceblue:4042850303,antiquewhite:4209760255,aqua:16777215,aquamarine:2147472639,azure:4043309055,beige:4126530815,bisque:4293182719,black:255,blanchedalmond:4293643775,blue:65535,blueviolet:2318131967,brown:2771004159,burlywood:3736635391,burntsienna:3934150143,cadetblue:1604231423,chartreuse:2147418367,chocolate:3530104575,coral:4286533887,cornflowerblue:1687547391,cornsilk:4294499583,crimson:3692313855,cyan:16777215,darkblue:35839,darkcyan:9145343,darkgoldenrod:3095792639,darkgray:2846468607,darkgreen:6553855,darkgrey:2846468607,darkkhaki:3182914559,darkmagenta:2332068863,darkolivegreen:1433087999,darkorange:4287365375,darkorchid:2570243327,darkred:2332033279,darksalmon:3918953215,darkseagreen:2411499519,darkslateblue:1211993087,darkslategray:793726975,darkslategrey:793726975,darkturquoise:13554175,darkviolet:2483082239,deeppink:4279538687,deepskyblue:12582911,dimgray:1768516095,dimgrey:1768516095,dodgerblue:512819199,firebrick:2988581631,floralwhite:4294635775,forestgreen:579543807,fuchsia:4278255615,gainsboro:3705462015,ghostwhite:4177068031,gold:4292280575,goldenrod:3668254975,gray:2155905279,green:8388863,greenyellow:2919182335,grey:2155905279,honeydew:4043305215,hotpink:4285117695,indianred:3445382399,indigo:1258324735,ivory:4294963455,khaki:4041641215,lavender:3873897215,lavenderblush:4293981695,lawngreen:2096890111,lemonchiffon:4294626815,lightblue:2916673279,lightcoral:4034953471,lightcyan:3774873599,lightgoldenrodyellow:4210742015,lightgray:3553874943,lightgreen:2431553791,lightgrey:3553874943,lightpink:4290167295,lightsalmon:4288707327,lightseagreen:548580095,lightskyblue:2278488831,lightslategray:2005441023,lightslategrey:2005441023,lightsteelblue:2965692159,lightyellow:4294959359,lime:16711935,limegreen:852308735,linen:4210091775,magenta:4278255615,maroon:2147483903,mediumaquamarine:1724754687,mediumblue:52735,mediumorchid:3126187007,mediumpurple:2473647103,mediumseagreen:1018393087,mediumslateblue:2070474495,mediumspringgreen:16423679,mediumturquoise:1221709055,mediumvioletred:3340076543,midnightblue:421097727,mintcream:4127193855,mistyrose:4293190143,moccasin:4293178879,navajowhite:4292783615,navy:33023,oldlace:4260751103,olive:2155872511,olivedrab:1804477439,orange:4289003775,orangered:4282712319,orchid:3664828159,palegoldenrod:4008225535,palegreen:2566625535,paleturquoise:2951671551,palevioletred:3681588223,papayawhip:4293907967,peachpuff:4292524543,peru:3448061951,pink:4290825215,plum:3718307327,powderblue:2967529215,purple:2147516671,rebeccapurple:1714657791,red:4278190335,rosybrown:3163525119,royalblue:1097458175,saddlebrown:2336560127,salmon:4202722047,sandybrown:4104413439,seagreen:780883967,seashell:4294307583,sienna:2689740287,silver:3233857791,skyblue:2278484991,slateblue:1784335871,slategray:1887473919,slategrey:1887473919,snow:4294638335,springgreen:16744447,steelblue:1182971135,tan:3535047935,teal:8421631,thistle:3636451583,tomato:4284696575,turquoise:1088475391,violet:4001558271,wheat:4125012991,white:4294967295,whitesmoke:4126537215,yellow:4294902015,yellowgreen:2597139199},NUMBER="[-+]?\\d*\\.?\\d+",PERCENTAGE=NUMBER+"%";function call(...e){return"\\(\\s*("+e.join(")\\s*,\\s*(")+")\\s*\\)"}const rgb=new RegExp("rgb"+call(NUMBER,NUMBER,NUMBER)),rgba=new RegExp("rgba"+call(NUMBER,NUMBER,NUMBER,NUMBER)),hsl=new RegExp("hsl"+call(NUMBER,PERCENTAGE,PERCENTAGE)),hsla=new RegExp("hsla"+call(NUMBER,PERCENTAGE,PERCENTAGE,NUMBER)),hex3=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex4=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6=/^#([0-9a-fA-F]{6})$/,hex8=/^#([0-9a-fA-F]{8})$/;function normalizeColor(e){let t;return"number"==typeof e?e>>>0===e&&e>=0&&e<=4294967295?e:null:(t=hex6.exec(e))?parseInt(t[1]+"ff",16)>>>0:colors$1&&void 0!==colors$1[e]?colors$1[e]:(t=rgb.exec(e))?(parse255(t[1])<<24|parse255(t[2])<<16|parse255(t[3])<<8|255)>>>0:(t=rgba.exec(e))?(parse255(t[1])<<24|parse255(t[2])<<16|parse255(t[3])<<8|parse1(t[4]))>>>0:(t=hex3.exec(e))?parseInt(t[1]+t[1]+t[2]+t[2]+t[3]+t[3]+"ff",16)>>>0:(t=hex8.exec(e))?parseInt(t[1],16)>>>0:(t=hex4.exec(e))?parseInt(t[1]+t[1]+t[2]+t[2]+t[3]+t[3]+t[4]+t[4],16)>>>0:(t=hsl.exec(e))?(255|hslToRgb(parse360(t[1]),parsePercentage(t[2]),parsePercentage(t[3])))>>>0:(t=hsla.exec(e))?(hslToRgb(parse360(t[1]),parsePercentage(t[2]),parsePercentage(t[3]))|parse1(t[4]))>>>0:null}function hue2rgb(e,t,r){return r<0&&(r+=1),r>1&&(r-=1),r<1/6?e+6*(t-e)*r:r<.5?t:r<2/3?e+(t-e)*(2/3-r)*6:e}function hslToRgb(e,t,r){const i=r<.5?r*(1+t):r+t-r*t,a=2*r-i,n=hue2rgb(a,i,e+1/3),s=hue2rgb(a,i,e),o=hue2rgb(a,i,e-1/3);return Math.round(255*n)<<24|Math.round(255*s)<<16|Math.round(255*o)<<8}function parse255(e){const t=parseInt(e,10);return t<0?0:t>255?255:t}function parse360(e){return(parseFloat(e)%360+360)%360/360}function parse1(e){const t=parseFloat(e);return t<0?0:t>1?255:Math.round(255*t)}function parsePercentage(e){const t=parseFloat(e);return t<0?0:t>100?1:t/100}function colorToRgba(e){let t=normalizeColor(e);return null===t?e:(t=t||0,`rgba(${(4278190080&t)>>>24}, ${(16711680&t)>>>16}, ${(65280&t)>>>8}, ${(255&t)/255})`)}const createInterpolator=(e,t,r)=>{if(is.fun(e))return e;if(is.arr(e))return createInterpolator({range:e,output:t,extrapolate:r});if(is.str(e.output[0]))return createStringInterpolator$1(e);const i=e,a=i.output,n=i.range||[0,1],s=i.extrapolateLeft||i.extrapolate||"extend",o=i.extrapolateRight||i.extrapolate||"extend",l=i.easing||(e=>e);return e=>{const t=findRange(e,n);return interpolate(e,n[t],n[t+1],a[t],a[t+1],l,s,o,i.map)}};function interpolate(e,t,r,i,a,n,s,o,l){let p=l?l(e):e;if(p<t){if("identity"===s)return p;"clamp"===s&&(p=t)}if(p>r){if("identity"===o)return p;"clamp"===o&&(p=r)}return i===a?i:t===r?e<=t?i:a:(t===-1/0?p=-p:r===1/0?p-=t:p=(p-t)/(r-t),p=n(p),i===-1/0?p=-p:a===1/0?p+=i:p=p*(a-i)+i,p)}function findRange(e,t){for(var r=1;r<t.length-1&&!(t[r]>=e);++r);return r-1}const steps=(e,t="end")=>r=>{const i=(r="end"===t?Math.min(r,.999):Math.max(r,.001))*e,a="end"===t?Math.floor(i):Math.ceil(i);return clamp(0,1,a/e)},c1=1.70158,c2=1.525*c1,c3=c1+1,c4=2*Math.PI/3,c5=2*Math.PI/4.5,bounceOut=e=>{const t=7.5625,r=2.75;return e<1/r?t*e*e:e<2/r?t*(e-=1.5/r)*e+.75:e<2.5/r?t*(e-=2.25/r)*e+.9375:t*(e-=2.625/r)*e+.984375},easings={linear:e=>e,easeInQuad:e=>e*e,easeOutQuad:e=>1-(1-e)*(1-e),easeInOutQuad:e=>e<.5?2*e*e:1-Math.pow(-2*e+2,2)/2,easeInCubic:e=>e*e*e,easeOutCubic:e=>1-Math.pow(1-e,3),easeInOutCubic:e=>e<.5?4*e*e*e:1-Math.pow(-2*e+2,3)/2,easeInQuart:e=>e*e*e*e,easeOutQuart:e=>1-Math.pow(1-e,4),easeInOutQuart:e=>e<.5?8*e*e*e*e:1-Math.pow(-2*e+2,4)/2,easeInQuint:e=>e*e*e*e*e,easeOutQuint:e=>1-Math.pow(1-e,5),easeInOutQuint:e=>e<.5?16*e*e*e*e*e:1-Math.pow(-2*e+2,5)/2,easeInSine:e=>1-Math.cos(e*Math.PI/2),easeOutSine:e=>Math.sin(e*Math.PI/2),easeInOutSine:e=>-(Math.cos(Math.PI*e)-1)/2,easeInExpo:e=>0===e?0:Math.pow(2,10*e-10),easeOutExpo:e=>1===e?1:1-Math.pow(2,-10*e),easeInOutExpo:e=>0===e?0:1===e?1:e<.5?Math.pow(2,20*e-10)/2:(2-Math.pow(2,-20*e+10))/2,easeInCirc:e=>1-Math.sqrt(1-Math.pow(e,2)),easeOutCirc:e=>Math.sqrt(1-Math.pow(e-1,2)),easeInOutCirc:e=>e<.5?(1-Math.sqrt(1-Math.pow(2*e,2)))/2:(Math.sqrt(1-Math.pow(-2*e+2,2))+1)/2,easeInBack:e=>c3*e*e*e-c1*e*e,easeOutBack:e=>1+c3*Math.pow(e-1,3)+c1*Math.pow(e-1,2),easeInOutBack:e=>e<.5?Math.pow(2*e,2)*(2*(c2+1)*e-c2)/2:(Math.pow(2*e-2,2)*((c2+1)*(2*e-2)+c2)+2)/2,easeInElastic:e=>0===e?0:1===e?1:-Math.pow(2,10*e-10)*Math.sin((10*e-10.75)*c4),easeOutElastic:e=>0===e?0:1===e?1:Math.pow(2,-10*e)*Math.sin((10*e-.75)*c4)+1,easeInOutElastic:e=>0===e?0:1===e?1:e<.5?-Math.pow(2,20*e-10)*Math.sin((20*e-11.125)*c5)/2:Math.pow(2,-20*e+10)*Math.sin((20*e-11.125)*c5)/2+1,easeInBounce:e=>1-bounceOut(1-e),easeOutBounce:bounceOut,easeInOutBounce:e=>e<.5?(1-bounceOut(1-2*e))/2:(1+bounceOut(2*e-1))/2,steps:steps};function _extends$2(){return _extends$2=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(e[i]=r[i])}return e},_extends$2.apply(this,arguments)}const $get=Symbol.for("FluidValue.get"),$observers=Symbol.for("FluidValue.observers"),hasFluidValue=e=>Boolean(e&&e[$get]),getFluidValue=e=>e&&e[$get]?e[$get]():e,getFluidObservers=e=>e[$observers]||null;function callFluidObserver(e,t){e.eventObserved?e.eventObserved(t):e(t)}function callFluidObservers(e,t){let r=e[$observers];r&&r.forEach((e=>{callFluidObserver(e,t)}))}class FluidValue{constructor(e){if(this[$get]=void 0,this[$observers]=void 0,!e&&!(e=this.get))throw Error("Unknown getter");setFluidGetter(this,e)}}const setFluidGetter=(e,t)=>setHidden(e,$get,t);function addFluidObserver(e,t){if(e[$get]){let r=e[$observers];r||setHidden(e,$observers,r=new Set),r.has(t)||(r.add(t),e.observerAdded&&e.observerAdded(r.size,t))}return t}function removeFluidObserver(e,t){let r=e[$observers];if(r&&r.has(t)){const i=r.size-1;i?r.delete(t):e[$observers]=null,e.observerRemoved&&e.observerRemoved(i,t)}}const setHidden=(e,t,r)=>Object.defineProperty(e,t,{value:r,writable:!0,configurable:!0}),numberRegex=/[+\-]?(?:0|[1-9]\d*)(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,colorRegex=/(#(?:[0-9a-f]{2}){2,4}|(#[0-9a-f]{3})|(rgb|hsl)a?\((-?\d+%?[,\s]+){2,3}\s*[\d\.]+%?\))/gi,unitRegex=new RegExp(`(${numberRegex.source})(%|[a-z]+)`,"i"),rgbaRegex=/rgba\(([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+)\)/gi,cssVariableRegex=/var\((--[a-zA-Z0-9-_]+),? ?([a-zA-Z0-9 ()%#.,-]+)?\)/,variableToRgba=e=>{const[t,r]=parseCSSVariable(e);if(!t||isSSR())return e;const i=window.getComputedStyle(document.documentElement).getPropertyValue(t);if(i)return i.trim();if(r&&r.startsWith("--")){const t=window.getComputedStyle(document.documentElement).getPropertyValue(r);return t||e}return r&&cssVariableRegex.test(r)?variableToRgba(r):r||e},parseCSSVariable=e=>{const t=cssVariableRegex.exec(e);if(!t)return[,];const[,r,i]=t;return[r,i]};let namedColorRegex;const rgbaRound=(e,t,r,i,a)=>`rgba(${Math.round(t)}, ${Math.round(r)}, ${Math.round(i)}, ${a})`,createStringInterpolator=e=>{namedColorRegex||(namedColorRegex=colors$1?new RegExp(`(${Object.keys(colors$1).join("|")})(?!\\w)`,"g"):/^\b$/);const t=e.output.map((e=>getFluidValue(e).replace(cssVariableRegex,variableToRgba).replace(colorRegex,colorToRgba).replace(namedColorRegex,colorToRgba))),r=t.map((e=>e.match(numberRegex).map(Number))),i=r[0].map(((e,t)=>r.map((e=>{if(!(t in e))throw Error('The arity of each "output" value must be equal');return e[t]})))).map((t=>createInterpolator(_extends$2({},e,{output:t}))));return e=>{var r;const a=!unitRegex.test(t[0])&&(null==(r=t.find((e=>unitRegex.test(e))))?void 0:r.replace(numberRegex,""));let n=0;return t[0].replace(numberRegex,(()=>`${i[n++](e)}${a||""}`)).replace(rgbaRegex,rgbaRound)}},prefix$1="react-spring: ",once=e=>{const t=e;let r=!1;if("function"!=typeof t)throw new TypeError(`${prefix$1}once requires a function parameter`);return(...e)=>{r||(t(...e),r=!0)}},warnInterpolate=once(console.warn);function deprecateInterpolate(){warnInterpolate(`${prefix$1}The "interpolate" function is deprecated in v9 (use "to" instead)`)}const warnDirectCall=once(console.warn);function deprecateDirectCall(){warnDirectCall(`${prefix$1}Directly calling start instead of using the api object is deprecated in v9 (use ".start" instead), this will be removed in later 0.X.0 versions`)}function isAnimatedString(e){return is.str(e)&&("#"==e[0]||/\d/.test(e)||!isSSR()&&cssVariableRegex.test(e)||e in(colors$1||{}))}const useIsomorphicLayoutEffect=isSSR()?useEffect:useLayoutEffect,useIsMounted=()=>{const e=useRef(!1);return useIsomorphicLayoutEffect((()=>(e.current=!0,()=>{e.current=!1})),[]),e};function useForceUpdate(){const e=useState()[1],t=useIsMounted();return()=>{t.current&&e(Math.random())}}function useMemoOne(e,t){const[r]=useState((()=>({inputs:t,result:e()}))),i=useRef(),a=i.current;let n=a;if(n){Boolean(t&&n.inputs&&areInputsEqual(t,n.inputs))||(n={inputs:t,result:e()})}else n=r;return useEffect((()=>{i.current=n,a==r&&(r.inputs=r.result=void 0)}),[n]),n.result}function areInputsEqual(e,t){if(e.length!==t.length)return!1;for(let r=0;r<e.length;r++)if(e[r]!==t[r])return!1;return!0}const useOnce=e=>useEffect(e,emptyDeps),emptyDeps=[];function usePrev(e){const t=useRef();return useEffect((()=>{t.current=e})),t.current}const $node=Symbol.for("Animated:node"),isAnimated=e=>!!e&&e[$node]===e,getAnimated=e=>e&&e[$node],setAnimated=(e,t)=>defineHidden(e,$node,t),getPayload=e=>e&&e[$node]&&e[$node].getPayload();class Animated{constructor(){this.payload=void 0,setAnimated(this,this)}getPayload(){return this.payload||[]}}class AnimatedValue extends Animated{constructor(e){super(),this.done=!0,this.elapsedTime=void 0,this.lastPosition=void 0,this.lastVelocity=void 0,this.v0=void 0,this.durationProgress=0,this._value=e,is.num(this._value)&&(this.lastPosition=this._value)}static create(e){return new AnimatedValue(e)}getPayload(){return[this]}getValue(){return this._value}setValue(e,t){return is.num(e)&&(this.lastPosition=e,t&&(e=Math.round(e/t)*t,this.done&&(this.lastPosition=e))),this._value!==e&&(this._value=e,!0)}reset(){const{done:e}=this;this.done=!1,is.num(this._value)&&(this.elapsedTime=0,this.durationProgress=0,this.lastPosition=this._value,e&&(this.lastVelocity=null),this.v0=null)}}class AnimatedString extends AnimatedValue{constructor(e){super(0),this._string=null,this._toString=void 0,this._toString=createInterpolator({output:[e,e]})}static create(e){return new AnimatedString(e)}getValue(){let e=this._string;return null==e?this._string=this._toString(this._value):e}setValue(e){if(is.str(e)){if(e==this._string)return!1;this._string=e,this._value=1}else{if(!super.setValue(e))return!1;this._string=null}return!0}reset(e){e&&(this._toString=createInterpolator({output:[this.getValue(),e]})),this._value=0,super.reset()}}const TreeContext={dependencies:null};class AnimatedObject extends Animated{constructor(e){super(),this.source=e,this.setValue(e)}getValue(e){const t={};return eachProp(this.source,((r,i)=>{isAnimated(r)?t[i]=r.getValue(e):hasFluidValue(r)?t[i]=getFluidValue(r):e||(t[i]=r)})),t}setValue(e){this.source=e,this.payload=this._makePayload(e)}reset(){this.payload&&each(this.payload,(e=>e.reset()))}_makePayload(e){if(e){const t=new Set;return eachProp(e,this._addToPayload,t),Array.from(t)}}_addToPayload(e){TreeContext.dependencies&&hasFluidValue(e)&&TreeContext.dependencies.add(e);const t=getPayload(e);t&&each(t,(e=>this.add(e)))}}class AnimatedArray extends AnimatedObject{constructor(e){super(e)}static create(e){return new AnimatedArray(e)}getValue(){return this.source.map((e=>e.getValue()))}setValue(e){const t=this.getPayload();return e.length==t.length?t.map(((t,r)=>t.setValue(e[r]))).some(Boolean):(super.setValue(e.map(makeAnimated)),!0)}}function makeAnimated(e){return(isAnimatedString(e)?AnimatedString:AnimatedValue).create(e)}function getAnimatedType(e){const t=getAnimated(e);return t?t.constructor:is.arr(e)?AnimatedArray:isAnimatedString(e)?AnimatedString:AnimatedValue}function _extends$1(){return _extends$1=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(e[i]=r[i])}return e},_extends$1.apply(this,arguments)}const withAnimated=(e,t)=>{const r=!is.fun(e)||e.prototype&&e.prototype.isReactComponent;return forwardRef(((i,a)=>{const n=useRef(null),s=r&&useCallback((e=>{n.current=updateRef(a,e)}),[a]),[o,l]=getAnimatedState(i,t),p=useForceUpdate(),c=()=>{const e=n.current;if(r&&!e)return;!1===(!!e&&t.applyAnimatedValues(e,o.getValue(!0)))&&p()},h=new PropsObserver(c,l),d=useRef();useIsomorphicLayoutEffect((()=>(d.current=h,each(l,(e=>addFluidObserver(e,h))),()=>{d.current&&(each(d.current.deps,(e=>removeFluidObserver(e,d.current))),raf.cancel(d.current.update))}))),useEffect(c,[]),useOnce((()=>()=>{const e=d.current;each(e.deps,(t=>removeFluidObserver(t,e)))}));const u=t.getComponentProps(o.getValue());return React.createElement(e,_extends$1({},u,{ref:s}))}))};class PropsObserver{constructor(e,t){this.update=e,this.deps=t}eventObserved(e){"change"==e.type&&raf.write(this.update)}}function getAnimatedState(e,t){const r=new Set;return TreeContext.dependencies=r,e.style&&(e=_extends$1({},e,{style:t.createAnimatedStyle(e.style)})),e=new AnimatedObject(e),TreeContext.dependencies=null,[e,r]}function updateRef(e,t){return e&&(is.fun(e)?e(t):e.current=t),t}const cacheKey=Symbol.for("AnimatedComponent"),createHost=(e,{applyAnimatedValues:t=(()=>!1),createAnimatedStyle:r=(e=>new AnimatedObject(e)),getComponentProps:i=(e=>e)}={})=>{const a={applyAnimatedValues:t,createAnimatedStyle:r,getComponentProps:i},n=e=>{const t=getDisplayName(e)||"Anonymous";return(e=is.str(e)?n[e]||(n[e]=withAnimated(e,a)):e[cacheKey]||(e[cacheKey]=withAnimated(e,a))).displayName=`Animated(${t})`,e};return eachProp(e,((t,r)=>{is.arr(e)&&(r=getDisplayName(t)),n[r]=n(t)})),{animated:n}},getDisplayName=e=>is.str(e)?e:e&&is.str(e.displayName)?e.displayName:is.fun(e)&&e.name||null;function _extends(){return _extends=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(e[i]=r[i])}return e},_extends.apply(this,arguments)}function callProp(e,...t){return is.fun(e)?e(...t):e}const matchProp=(e,t)=>!0===e||!!(t&&e&&(is.fun(e)?e(t):toArray(e).includes(t))),resolveProp=(e,t)=>is.obj(e)?t&&e[t]:e,getDefaultProp=(e,t)=>!0===e.default?e[t]:e.default?e.default[t]:void 0,noopTransform=e=>e,getDefaultProps=(e,t=noopTransform)=>{let r=DEFAULT_PROPS;e.default&&!0!==e.default&&(e=e.default,r=Object.keys(e));const i={};for(const a of r){const r=t(e[a],a);is.und(r)||(i[a]=r)}return i},DEFAULT_PROPS=["config","onProps","onStart","onChange","onPause","onResume","onRest"],RESERVED_PROPS={config:1,from:1,to:1,ref:1,loop:1,reset:1,pause:1,cancel:1,reverse:1,immediate:1,default:1,delay:1,onProps:1,onStart:1,onChange:1,onPause:1,onResume:1,onRest:1,onResolve:1,items:1,trail:1,sort:1,expires:1,initial:1,enter:1,update:1,leave:1,children:1,onDestroyed:1,keys:1,callId:1,parentId:1};function getForwardProps(e){const t={};let r=0;if(eachProp(e,((e,i)=>{RESERVED_PROPS[i]||(t[i]=e,r++)})),r)return t}function inferTo(e){const t=getForwardProps(e);if(t){const r={to:t};return eachProp(e,((e,i)=>i in t||(r[i]=e))),r}return _extends({},e)}function computeGoal(e){return e=getFluidValue(e),is.arr(e)?e.map(computeGoal):isAnimatedString(e)?globals.createStringInterpolator({range:[0,1],output:[e,e]})(1):e}function hasProps(e){for(const t in e)return!0;return!1}function isAsyncTo(e){return is.fun(e)||is.arr(e)&&is.obj(e[0])}function detachRefs(e,t){var r;null==(r=e.ref)||r.delete(e),null==t||t.delete(e)}function replaceRef(e,t){var r;t&&e.ref!==t&&(null==(r=e.ref)||r.delete(e),t.add(e),e.ref=t)}const config={default:{tension:170,friction:26},gentle:{tension:120,friction:14},wobbly:{tension:180,friction:12},stiff:{tension:210,friction:20},slow:{tension:280,friction:60},molasses:{tension:280,friction:120}},defaults=_extends({},config.default,{mass:1,damping:1,easing:easings.linear,clamp:!1});class AnimationConfig{constructor(){this.tension=void 0,this.friction=void 0,this.frequency=void 0,this.damping=void 0,this.mass=void 0,this.velocity=0,this.restVelocity=void 0,this.precision=void 0,this.progress=void 0,this.duration=void 0,this.easing=void 0,this.clamp=void 0,this.bounce=void 0,this.decay=void 0,this.round=void 0,Object.assign(this,defaults)}}function mergeConfig(e,t,r){r&&(sanitizeConfig(r=_extends({},r),t),t=_extends({},r,t)),sanitizeConfig(e,t),Object.assign(e,t);for(const t in defaults)null==e[t]&&(e[t]=defaults[t]);let{mass:i,frequency:a,damping:n}=e;return is.und(a)||(a<.01&&(a=.01),n<0&&(n=0),e.tension=Math.pow(2*Math.PI/a,2)*i,e.friction=4*Math.PI*n*i/a),e}function sanitizeConfig(e,t){if(is.und(t.decay)){const r=!is.und(t.tension)||!is.und(t.friction);!r&&is.und(t.frequency)&&is.und(t.damping)&&is.und(t.mass)||(e.duration=void 0,e.decay=void 0),r&&(e.frequency=void 0)}else e.duration=void 0}const emptyArray=[];class Animation{constructor(){this.changed=!1,this.values=emptyArray,this.toValues=null,this.fromValues=emptyArray,this.to=void 0,this.from=void 0,this.config=new AnimationConfig,this.immediate=!1}}function scheduleProps(e,{key:t,props:r,defaultProps:i,state:a,actions:n}){return new Promise(((s,o)=>{var l;let p,c,h=matchProp(null!=(l=r.cancel)?l:null==i?void 0:i.cancel,t);if(h)m();else{is.und(r.pause)||(a.paused=matchProp(r.pause,t));let e=null==i?void 0:i.pause;!0!==e&&(e=a.paused||matchProp(e,t)),p=callProp(r.delay||0,t),e?(a.resumeQueue.add(u),n.pause()):(n.resume(),u())}function d(){a.resumeQueue.add(u),a.timeouts.delete(c),c.cancel(),p=c.time-raf.now()}function u(){p>0&&!globals.skipAnimation?(a.delayed=!0,c=raf.setTimeout(m,p),a.pauseQueue.add(d),a.timeouts.add(c)):m()}function m(){a.delayed&&(a.delayed=!1),a.pauseQueue.delete(d),a.timeouts.delete(c),e<=(a.cancelId||0)&&(h=!0);try{n.start(_extends({},r,{callId:e,cancel:h}),s)}catch(e){o(e)}}}))}const getCombinedResult=(e,t)=>1==t.length?t[0]:t.some((e=>e.cancelled))?getCancelledResult(e.get()):t.every((e=>e.noop))?getNoopResult(e.get()):getFinishedResult(e.get(),t.every((e=>e.finished))),getNoopResult=e=>({value:e,noop:!0,finished:!0,cancelled:!1}),getFinishedResult=(e,t,r=!1)=>({value:e,finished:t,cancelled:r}),getCancelledResult=e=>({value:e,cancelled:!0,finished:!1});function runAsync(e,t,r,i){const{callId:a,parentId:n,onRest:s}=t,{asyncTo:o,promise:l}=r;return n||e!==o||t.reset?r.promise=(async()=>{r.asyncId=a,r.asyncTo=e;const p=getDefaultProps(t,((e,t)=>"onRest"===t?void 0:e));let c,h;const d=new Promise(((e,t)=>(c=e,h=t))),u=e=>{const t=a<=(r.cancelId||0)&&getCancelledResult(i)||a!==r.asyncId&&getFinishedResult(i,!1);if(t)throw e.result=t,h(e),e},m=(e,t)=>{const n=new BailSignal,s=new SkipAnimationSignal;return(async()=>{if(globals.skipAnimation)throw stopAsync(r),s.result=getFinishedResult(i,!1),h(s),s;u(n);const o=is.obj(e)?_extends({},e):_extends({},t,{to:e});o.parentId=a,eachProp(p,((e,t)=>{is.und(o[t])&&(o[t]=e)}));const l=await i.start(o);return u(n),r.paused&&await new Promise((e=>{r.resumeQueue.add(e)})),l})()};let f;if(globals.skipAnimation)return stopAsync(r),getFinishedResult(i,!1);try{let t;t=is.arr(e)?(async e=>{for(const t of e)await m(t)})(e):Promise.resolve(e(m,i.stop.bind(i))),await Promise.all([t.then(c),d]),f=getFinishedResult(i.get(),!0,!1)}catch(e){if(e instanceof BailSignal)f=e.result;else{if(!(e instanceof SkipAnimationSignal))throw e;f=e.result}}finally{a==r.asyncId&&(r.asyncId=n,r.asyncTo=n?o:void 0,r.promise=n?l:void 0)}return is.fun(s)&&raf.batchedUpdates((()=>{s(f,i,i.item)})),f})():l}function stopAsync(e,t){flush(e.timeouts,(e=>e.cancel())),e.pauseQueue.clear(),e.resumeQueue.clear(),e.asyncId=e.asyncTo=e.promise=void 0,t&&(e.cancelId=t)}class BailSignal extends Error{constructor(){super("An async animation has been interrupted. You see this error because you forgot to use `await` or `.catch(...)` on its returned promise."),this.result=void 0}}class SkipAnimationSignal extends Error{constructor(){super("SkipAnimationSignal"),this.result=void 0}}const isFrameValue=e=>e instanceof FrameValue;let nextId$1=1;class FrameValue extends FluidValue{constructor(...e){super(...e),this.id=nextId$1++,this.key=void 0,this._priority=0}get priority(){return this._priority}set priority(e){this._priority!=e&&(this._priority=e,this._onPriorityChange(e))}get(){const e=getAnimated(this);return e&&e.getValue()}to(...e){return globals.to(this,e)}interpolate(...e){return deprecateInterpolate(),globals.to(this,e)}toJSON(){return this.get()}observerAdded(e){1==e&&this._attach()}observerRemoved(e){0==e&&this._detach()}_attach(){}_detach(){}_onChange(e,t=!1){callFluidObservers(this,{type:"change",parent:this,value:e,idle:t})}_onPriorityChange(e){this.idle||frameLoop.sort(this),callFluidObservers(this,{type:"priority",parent:this,priority:e})}}const $P=Symbol.for("SpringPhase"),HAS_ANIMATED=1,IS_ANIMATING=2,IS_PAUSED=4,hasAnimated=e=>(e[$P]&HAS_ANIMATED)>0,isAnimating=e=>(e[$P]&IS_ANIMATING)>0,isPaused=e=>(e[$P]&IS_PAUSED)>0,setActiveBit=(e,t)=>t?e[$P]|=IS_ANIMATING|HAS_ANIMATED:e[$P]&=~IS_ANIMATING,setPausedBit=(e,t)=>t?e[$P]|=IS_PAUSED:e[$P]&=~IS_PAUSED;class SpringValue extends FrameValue{constructor(e,t){if(super(),this.key=void 0,this.animation=new Animation,this.queue=void 0,this.defaultProps={},this._state={paused:!1,delayed:!1,pauseQueue:new Set,resumeQueue:new Set,timeouts:new Set},this._pendingCalls=new Set,this._lastCallId=0,this._lastToId=0,this._memoizedDuration=0,!is.und(e)||!is.und(t)){const r=is.obj(e)?_extends({},e):_extends({},t,{from:e});is.und(r.default)&&(r.default=!0),this.start(r)}}get idle(){return!(isAnimating(this)||this._state.asyncTo)||isPaused(this)}get goal(){return getFluidValue(this.animation.to)}get velocity(){const e=getAnimated(this);return e instanceof AnimatedValue?e.lastVelocity||0:e.getPayload().map((e=>e.lastVelocity||0))}get hasAnimated(){return hasAnimated(this)}get isAnimating(){return isAnimating(this)}get isPaused(){return isPaused(this)}get isDelayed(){return this._state.delayed}advance(e){let t=!0,r=!1;const i=this.animation;let{config:a,toValues:n}=i;const s=getPayload(i.to);!s&&hasFluidValue(i.to)&&(n=toArray(getFluidValue(i.to))),i.values.forEach(((o,l)=>{if(o.done)return;const p=o.constructor==AnimatedString?1:s?s[l].lastPosition:n[l];let c=i.immediate,h=p;if(!c){if(h=o.lastPosition,a.tension<=0)return void(o.done=!0);let t=o.elapsedTime+=e;const r=i.fromValues[l],n=null!=o.v0?o.v0:o.v0=is.arr(a.velocity)?a.velocity[l]:a.velocity;let s;const d=a.precision||(r==p?.005:Math.min(1,.001*Math.abs(p-r)));if(is.und(a.duration))if(a.decay){const e=!0===a.decay?.998:a.decay,i=Math.exp(-(1-e)*t);h=r+n/(1-e)*(1-i),c=Math.abs(o.lastPosition-h)<=d,s=n*i}else{s=null==o.lastVelocity?n:o.lastVelocity;const t=a.restVelocity||d/10,i=a.clamp?0:a.bounce,l=!is.und(i),u=r==p?o.v0>0:r<p;let m,f=!1;const y=1,g=Math.ceil(e/y);for(let e=0;e<g&&(m=Math.abs(s)>t,m||(c=Math.abs(p-h)<=d,!c));++e){l&&(f=h==p||h>p==u,f&&(s=-s*i,h=p));s+=(1e-6*-a.tension*(h-p)+.001*-a.friction*s)/a.mass*y,h+=s*y}}else{let i=1;a.duration>0&&(this._memoizedDuration!==a.duration&&(this._memoizedDuration=a.duration,o.durationProgress>0&&(o.elapsedTime=a.duration*o.durationProgress,t=o.elapsedTime+=e)),i=(a.progress||0)+t/this._memoizedDuration,i=i>1?1:i<0?0:i,o.durationProgress=i),h=r+a.easing(i)*(p-r),s=(h-o.lastPosition)/e,c=1==i}o.lastVelocity=s,Number.isNaN(h)&&(console.warn("Got NaN while animating:",this),c=!0)}s&&!s[l].done&&(c=!1),c?o.done=!0:t=!1,o.setValue(h,a.round)&&(r=!0)}));const o=getAnimated(this),l=o.getValue();if(t){const e=getFluidValue(i.to);l===e&&!r||a.decay?r&&a.decay&&this._onChange(l):(o.setValue(e),this._onChange(e)),this._stop()}else r&&this._onChange(l)}set(e){return raf.batchedUpdates((()=>{this._stop(),this._focus(e),this._set(e)})),this}pause(){this._update({pause:!0})}resume(){this._update({pause:!1})}finish(){if(isAnimating(this)){const{to:e,config:t}=this.animation;raf.batchedUpdates((()=>{this._onStart(),t.decay||this._set(e,!1),this._stop()}))}return this}update(e){return(this.queue||(this.queue=[])).push(e),this}start(e,t){let r;return is.und(e)?(r=this.queue||[],this.queue=[]):r=[is.obj(e)?e:_extends({},t,{to:e})],Promise.all(r.map((e=>this._update(e)))).then((e=>getCombinedResult(this,e)))}stop(e){const{to:t}=this.animation;return this._focus(this.get()),stopAsync(this._state,e&&this._lastCallId),raf.batchedUpdates((()=>this._stop(t,e))),this}reset(){this._update({reset:!0})}eventObserved(e){"change"==e.type?this._start():"priority"==e.type&&(this.priority=e.priority+1)}_prepareNode(e){const t=this.key||"";let{to:r,from:i}=e;r=is.obj(r)?r[t]:r,(null==r||isAsyncTo(r))&&(r=void 0),i=is.obj(i)?i[t]:i,null==i&&(i=void 0);const a={to:r,from:i};return hasAnimated(this)||(e.reverse&&([r,i]=[i,r]),i=getFluidValue(i),is.und(i)?getAnimated(this)||this._set(r):this._set(i)),a}_update(e,t){let r=_extends({},e);const{key:i,defaultProps:a}=this;r.default&&Object.assign(a,getDefaultProps(r,((e,t)=>/^on/.test(t)?resolveProp(e,i):e))),mergeActiveFn(this,r,"onProps"),sendEvent(this,"onProps",r,this);const n=this._prepareNode(r);if(Object.isFrozen(this))throw Error("Cannot animate a `SpringValue` object that is frozen. Did you forget to pass your component to `animated(...)` before animating its props?");const s=this._state;return scheduleProps(++this._lastCallId,{key:i,props:r,defaultProps:a,state:s,actions:{pause:()=>{isPaused(this)||(setPausedBit(this,!0),flushCalls(s.pauseQueue),sendEvent(this,"onPause",getFinishedResult(this,checkFinished(this,this.animation.to)),this))},resume:()=>{isPaused(this)&&(setPausedBit(this,!1),isAnimating(this)&&this._resume(),flushCalls(s.resumeQueue),sendEvent(this,"onResume",getFinishedResult(this,checkFinished(this,this.animation.to)),this))},start:this._merge.bind(this,n)}}).then((e=>{if(r.loop&&e.finished&&(!t||!e.noop)){const e=createLoopUpdate(r);if(e)return this._update(e,!0)}return e}))}_merge(e,t,r){if(t.cancel)return this.stop(!0),r(getCancelledResult(this));const i=!is.und(e.to),a=!is.und(e.from);if(i||a){if(!(t.callId>this._lastToId))return r(getCancelledResult(this));this._lastToId=t.callId}const{key:n,defaultProps:s,animation:o}=this,{to:l,from:p}=o;let{to:c=l,from:h=p}=e;!a||i||t.default&&!is.und(c)||(c=h),t.reverse&&([c,h]=[h,c]);const d=!isEqual$1(h,p);d&&(o.from=h),h=getFluidValue(h);const u=!isEqual$1(c,l);u&&this._focus(c);const m=isAsyncTo(t.to),{config:f}=o,{decay:y,velocity:g}=f;(i||a)&&(f.velocity=0),t.config&&!m&&mergeConfig(f,callProp(t.config,n),t.config!==s.config?callProp(s.config,n):void 0);let _=getAnimated(this);if(!_||is.und(c))return r(getFinishedResult(this,!0));const x=is.und(t.reset)?a&&!t.default:!is.und(h)&&matchProp(t.reset,n),b=x?h:this.get(),v=computeGoal(c),C=is.num(v)||is.arr(v)||isAnimatedString(v),S=!m&&(!C||matchProp(s.immediate||t.immediate,n));if(u){const e=getAnimatedType(c);if(e!==_.constructor){if(!S)throw Error(`Cannot animate between ${_.constructor.name} and ${e.name}, as the "to" prop suggests`);_=this._set(v)}}const $=_.constructor;let w=hasFluidValue(c),T=!1;if(!w){const e=x||!hasAnimated(this)&&d;(u||e)&&(T=isEqual$1(computeGoal(b),v),w=!T),(isEqual$1(o.immediate,S)||S)&&isEqual$1(f.decay,y)&&isEqual$1(f.velocity,g)||(w=!0)}if(T&&isAnimating(this)&&(o.changed&&!x?w=!0:w||this._stop(l)),!m&&((w||hasFluidValue(l))&&(o.values=_.getPayload(),o.toValues=hasFluidValue(c)?null:$==AnimatedString?[1]:toArray(v)),o.immediate!=S&&(o.immediate=S,S||x||this._set(l)),w)){const{onRest:e}=o;each(ACTIVE_EVENTS,(e=>mergeActiveFn(this,t,e)));const i=getFinishedResult(this,checkFinished(this,l));flushCalls(this._pendingCalls,i),this._pendingCalls.add(r),o.changed&&raf.batchedUpdates((()=>{o.changed=!x,null==e||e(i,this),x?callProp(s.onRest,i):null==o.onStart||o.onStart(i,this)}))}x&&this._set(b),m?r(runAsync(t.to,t,this._state,this)):w?this._start():isAnimating(this)&&!u?this._pendingCalls.add(r):r(getNoopResult(b))}_focus(e){const t=this.animation;e!==t.to&&(getFluidObservers(this)&&this._detach(),t.to=e,getFluidObservers(this)&&this._attach())}_attach(){let e=0;const{to:t}=this.animation;hasFluidValue(t)&&(addFluidObserver(t,this),isFrameValue(t)&&(e=t.priority+1)),this.priority=e}_detach(){const{to:e}=this.animation;hasFluidValue(e)&&removeFluidObserver(e,this)}_set(e,t=!0){const r=getFluidValue(e);if(!is.und(r)){const e=getAnimated(this);if(!e||!isEqual$1(r,e.getValue())){const i=getAnimatedType(r);e&&e.constructor==i?e.setValue(r):setAnimated(this,i.create(r)),e&&raf.batchedUpdates((()=>{this._onChange(r,t)}))}}return getAnimated(this)}_onStart(){const e=this.animation;e.changed||(e.changed=!0,sendEvent(this,"onStart",getFinishedResult(this,checkFinished(this,e.to)),this))}_onChange(e,t){t||(this._onStart(),callProp(this.animation.onChange,e,this)),callProp(this.defaultProps.onChange,e,this),super._onChange(e,t)}_start(){const e=this.animation;getAnimated(this).reset(getFluidValue(e.to)),e.immediate||(e.fromValues=e.values.map((e=>e.lastPosition))),isAnimating(this)||(setActiveBit(this,!0),isPaused(this)||this._resume())}_resume(){globals.skipAnimation?this.finish():frameLoop.start(this)}_stop(e,t){if(isAnimating(this)){setActiveBit(this,!1);const r=this.animation;each(r.values,(e=>{e.done=!0})),r.toValues&&(r.onChange=r.onPause=r.onResume=void 0),callFluidObservers(this,{type:"idle",parent:this});const i=t?getCancelledResult(this.get()):getFinishedResult(this.get(),checkFinished(this,null!=e?e:r.to));flushCalls(this._pendingCalls,i),r.changed&&(r.changed=!1,sendEvent(this,"onRest",i,this))}}}function checkFinished(e,t){const r=computeGoal(t);return isEqual$1(computeGoal(e.get()),r)}function createLoopUpdate(e,t=e.loop,r=e.to){let i=callProp(t);if(i){const a=!0!==i&&inferTo(i),n=(a||e).reverse,s=!a||a.reset;return createUpdate(_extends({},e,{loop:t,default:!1,pause:void 0,to:!n||isAsyncTo(r)?r:void 0,from:s?e.from:void 0,reset:s},a))}}function createUpdate(e){const{to:t,from:r}=e=inferTo(e),i=new Set;return is.obj(t)&&findDefined(t,i),is.obj(r)&&findDefined(r,i),e.keys=i.size?Array.from(i):null,e}function declareUpdate(e){const t=createUpdate(e);return is.und(t.default)&&(t.default=getDefaultProps(t)),t}function findDefined(e,t){eachProp(e,((e,r)=>null!=e&&t.add(r)))}const ACTIVE_EVENTS=["onStart","onRest","onChange","onPause","onResume"];function mergeActiveFn(e,t,r){e.animation[r]=t[r]!==getDefaultProp(t,r)?resolveProp(t[r],e.key):void 0}function sendEvent(e,t,...r){var i,a,n,s;null==(i=(a=e.animation)[t])||i.call(a,...r),null==(n=(s=e.defaultProps)[t])||n.call(s,...r)}const BATCHED_EVENTS=["onStart","onChange","onRest"];let nextId=1;class Controller{constructor(e,t){this.id=nextId++,this.springs={},this.queue=[],this.ref=void 0,this._flush=void 0,this._initialProps=void 0,this._lastAsyncId=0,this._active=new Set,this._changed=new Set,this._started=!1,this._item=void 0,this._state={paused:!1,pauseQueue:new Set,resumeQueue:new Set,timeouts:new Set},this._events={onStart:new Map,onChange:new Map,onRest:new Map},this._onFrame=this._onFrame.bind(this),t&&(this._flush=t),e&&this.start(_extends({default:!0},e))}get idle(){return!this._state.asyncTo&&Object.values(this.springs).every((e=>e.idle&&!e.isDelayed&&!e.isPaused))}get item(){return this._item}set item(e){this._item=e}get(){const e={};return this.each(((t,r)=>e[r]=t.get())),e}set(e){for(const t in e){const r=e[t];is.und(r)||this.springs[t].set(r)}}update(e){return e&&this.queue.push(createUpdate(e)),this}start(e){let{queue:t}=this;return e?t=toArray(e).map(createUpdate):this.queue=[],this._flush?this._flush(this,t):(prepareKeys(this,t),flushUpdateQueue(this,t))}stop(e,t){if(e!==!!e&&(t=e),t){const r=this.springs;each(toArray(t),(t=>r[t].stop(!!e)))}else stopAsync(this._state,this._lastAsyncId),this.each((t=>t.stop(!!e)));return this}pause(e){if(is.und(e))this.start({pause:!0});else{const t=this.springs;each(toArray(e),(e=>t[e].pause()))}return this}resume(e){if(is.und(e))this.start({pause:!1});else{const t=this.springs;each(toArray(e),(e=>t[e].resume()))}return this}each(e){eachProp(this.springs,e)}_onFrame(){const{onStart:e,onChange:t,onRest:r}=this._events,i=this._active.size>0,a=this._changed.size>0;(i&&!this._started||a&&!this._started)&&(this._started=!0,flush(e,(([e,t])=>{t.value=this.get(),e(t,this,this._item)})));const n=!i&&this._started,s=a||n&&r.size?this.get():null;a&&t.size&&flush(t,(([e,t])=>{t.value=s,e(t,this,this._item)})),n&&(this._started=!1,flush(r,(([e,t])=>{t.value=s,e(t,this,this._item)})))}eventObserved(e){if("change"==e.type)this._changed.add(e.parent),e.idle||this._active.add(e.parent);else{if("idle"!=e.type)return;this._active.delete(e.parent)}raf.onFrame(this._onFrame)}}function flushUpdateQueue(e,t){return Promise.all(t.map((t=>flushUpdate(e,t)))).then((t=>getCombinedResult(e,t)))}async function flushUpdate(e,t,r){const{keys:i,to:a,from:n,loop:s,onRest:o,onResolve:l}=t,p=is.obj(t.default)&&t.default;s&&(t.loop=!1),!1===a&&(t.to=null),!1===n&&(t.from=null);const c=is.arr(a)||is.fun(a)?a:void 0;c?(t.to=void 0,t.onRest=void 0,p&&(p.onRest=void 0)):each(BATCHED_EVENTS,(r=>{const i=t[r];if(is.fun(i)){const a=e._events[r];t[r]=({finished:e,cancelled:t})=>{const r=a.get(i);r?(e||(r.finished=!1),t&&(r.cancelled=!0)):a.set(i,{value:null,finished:e||!1,cancelled:t||!1})},p&&(p[r]=t[r])}}));const h=e._state;t.pause===!h.paused?(h.paused=t.pause,flushCalls(t.pause?h.pauseQueue:h.resumeQueue)):h.paused&&(t.pause=!0);const d=(i||Object.keys(e.springs)).map((r=>e.springs[r].start(t))),u=!0===t.cancel||!0===getDefaultProp(t,"cancel");(c||u&&h.asyncId)&&d.push(scheduleProps(++e._lastAsyncId,{props:t,state:h,actions:{pause:noop,resume:noop,start(t,r){u?(stopAsync(h,e._lastAsyncId),r(getCancelledResult(e))):(t.onRest=o,r(runAsync(c,t,h,e)))}}})),h.paused&&await new Promise((e=>{h.resumeQueue.add(e)}));const m=getCombinedResult(e,await Promise.all(d));if(s&&m.finished&&(!r||!m.noop)){const r=createLoopUpdate(t,s,a);if(r)return prepareKeys(e,[r]),flushUpdate(e,r,!0)}return l&&raf.batchedUpdates((()=>l(m,e,e.item))),m}function getSprings(e,t){const r=_extends({},e.springs);return t&&each(toArray(t),(e=>{is.und(e.keys)&&(e=createUpdate(e)),is.obj(e.to)||(e=_extends({},e,{to:void 0})),prepareSprings(r,e,(e=>createSpring(e)))})),setSprings(e,r),r}function setSprings(e,t){eachProp(t,((t,r)=>{e.springs[r]||(e.springs[r]=t,addFluidObserver(t,e))}))}function createSpring(e,t){const r=new SpringValue;return r.key=e,t&&addFluidObserver(r,t),r}function prepareSprings(e,t,r){t.keys&&each(t.keys,(i=>{(e[i]||(e[i]=r(i)))._prepareNode(t)}))}function prepareKeys(e,t){each(t,(t=>{prepareSprings(e.springs,t,(t=>createSpring(t,e)))}))}function _objectWithoutPropertiesLoose$2(e,t){if(null==e)return{};var r,i,a={},n=Object.keys(e);for(i=0;i<n.length;i++)r=n[i],t.indexOf(r)>=0||(a[r]=e[r]);return a}const _excluded$6=["children"],SpringContext=e=>{let{children:t}=e,r=_objectWithoutPropertiesLoose$2(e,_excluded$6);const i=useContext(ctx),a=r.pause||!!i.pause,n=r.immediate||!!i.immediate;r=useMemoOne((()=>({pause:a,immediate:n})),[a,n]);const{Provider:s}=ctx;return React.createElement(s,{value:r},t)},ctx=makeContext(SpringContext,{});function makeContext(e,t){return Object.assign(e,React.createContext(t)),e.Provider._context=e,e.Consumer._context=e,e}SpringContext.Provider=ctx.Provider,SpringContext.Consumer=ctx.Consumer;const SpringRef=()=>{const e=[],t=function(t){deprecateDirectCall();const i=[];return each(e,((e,a)=>{if(is.und(t))i.push(e.start());else{const n=r(t,e,a);n&&i.push(e.start(n))}})),i};t.current=e,t.add=function(t){e.includes(t)||e.push(t)},t.delete=function(t){const r=e.indexOf(t);~r&&e.splice(r,1)},t.pause=function(){return each(e,(e=>e.pause(...arguments))),this},t.resume=function(){return each(e,(e=>e.resume(...arguments))),this},t.set=function(t){each(e,(e=>e.set(t)))},t.start=function(t){const r=[];return each(e,((e,i)=>{if(is.und(t))r.push(e.start());else{const a=this._getProps(t,e,i);a&&r.push(e.start(a))}})),r},t.stop=function(){return each(e,(e=>e.stop(...arguments))),this},t.update=function(t){return each(e,((e,r)=>e.update(this._getProps(t,e,r)))),this};const r=function(e,t,r){return is.fun(e)?e(r,t):e};return t._getProps=r,t};function useSprings(e,t,r){const i=is.fun(t)&&t;i&&!r&&(r=[]);const a=useMemo((()=>i||3==arguments.length?SpringRef():void 0),[]),n=useRef(0),s=useForceUpdate(),o=useMemo((()=>({ctrls:[],queue:[],flush(e,t){const r=getSprings(e,t);return n.current>0&&!o.queue.length&&!Object.keys(r).some((t=>!e.springs[t]))?flushUpdateQueue(e,t):new Promise((i=>{setSprings(e,r),o.queue.push((()=>{i(flushUpdateQueue(e,t))})),s()}))}})),[]),l=useRef([...o.ctrls]),p=[],c=usePrev(e)||0;function h(e,r){for(let a=e;a<r;a++){const e=l.current[a]||(l.current[a]=new Controller(null,o.flush)),r=i?i(a,e):t[a];r&&(p[a]=declareUpdate(r))}}useMemo((()=>{each(l.current.slice(e,c),(e=>{detachRefs(e,a),e.stop(!0)})),l.current.length=e,h(c,e)}),[e]),useMemo((()=>{h(0,Math.min(c,e))}),r);const d=l.current.map(((e,t)=>getSprings(e,p[t]))),u=useContext(SpringContext),m=usePrev(u),f=u!==m&&hasProps(u);useIsomorphicLayoutEffect((()=>{n.current++,o.ctrls=l.current;const{queue:e}=o;e.length&&(o.queue=[],each(e,(e=>e()))),each(l.current,((e,t)=>{null==a||a.add(e),f&&e.start({default:u});const r=p[t];r&&(replaceRef(e,r.ref),e.ref?e.queue.push(r):e.start(r))}))})),useOnce((()=>()=>{each(o.ctrls,(e=>e.stop(!0)))}));const y=d.map((e=>_extends({},e)));return a?[y,a]:y}function useSpring(e,t){const r=is.fun(e),[[i],a]=useSprings(1,r?e:[e],r?t||[]:t);return r||2==arguments.length?[i,a]:i}let TransitionPhase;!function(e){e.MOUNT="mount",e.ENTER="enter",e.UPDATE="update",e.LEAVE="leave"}(TransitionPhase||(TransitionPhase={}));class Interpolation extends FrameValue{constructor(e,t){super(),this.key=void 0,this.idle=!0,this.calc=void 0,this._active=new Set,this.source=e,this.calc=createInterpolator(...t);const r=this._get(),i=getAnimatedType(r);setAnimated(this,i.create(r))}advance(e){const t=this._get();isEqual$1(t,this.get())||(getAnimated(this).setValue(t),this._onChange(t,this.idle)),!this.idle&&checkIdle(this._active)&&becomeIdle(this)}_get(){const e=is.arr(this.source)?this.source.map(getFluidValue):toArray(getFluidValue(this.source));return this.calc(...e)}_start(){this.idle&&!checkIdle(this._active)&&(this.idle=!1,each(getPayload(this),(e=>{e.done=!1})),globals.skipAnimation?(raf.batchedUpdates((()=>this.advance())),becomeIdle(this)):frameLoop.start(this))}_attach(){let e=1;each(toArray(this.source),(t=>{hasFluidValue(t)&&addFluidObserver(t,this),isFrameValue(t)&&(t.idle||this._active.add(t),e=Math.max(e,t.priority+1))})),this.priority=e,this._start()}_detach(){each(toArray(this.source),(e=>{hasFluidValue(e)&&removeFluidObserver(e,this)})),this._active.clear(),becomeIdle(this)}eventObserved(e){"change"==e.type?e.idle?this.advance():(this._active.add(e.parent),this._start()):"idle"==e.type?this._active.delete(e.parent):"priority"==e.type&&(this.priority=toArray(this.source).reduce(((e,t)=>Math.max(e,(isFrameValue(t)?t.priority:0)+1)),0))}}function isIdle(e){return!1!==e.idle}function checkIdle(e){return!e.size||Array.from(e).every(isIdle)}function becomeIdle(e){e.idle||(e.idle=!0,each(getPayload(e),(e=>{e.done=!0})),callFluidObservers(e,{type:"idle",parent:e}))}function _objectWithoutPropertiesLoose$1(e,t){if(null==e)return{};var r,i,a={},n=Object.keys(e);for(i=0;i<n.length;i++)r=n[i],t.indexOf(r)>=0||(a[r]=e[r]);return a}globals.assign({createStringInterpolator:createStringInterpolator,to:(e,t)=>new Interpolation(e,t)});const _excluded$2=["style","children","scrollTop","scrollLeft","viewBox"],isCustomPropRE=/^--/;function dangerousStyleValue(e,t){return null==t||"boolean"==typeof t||""===t?"":"number"!=typeof t||0===t||isCustomPropRE.test(e)||isUnitlessNumber.hasOwnProperty(e)&&isUnitlessNumber[e]?(""+t).trim():t+"px"}const attributeCache={};function applyAnimatedValues(e,t){if(!e.nodeType||!e.setAttribute)return!1;const r="filter"===e.nodeName||e.parentNode&&"filter"===e.parentNode.nodeName,i=t,{style:a,children:n,scrollTop:s,scrollLeft:o,viewBox:l}=i,p=_objectWithoutPropertiesLoose$1(i,_excluded$2),c=Object.values(p),h=Object.keys(p).map((t=>r||e.hasAttribute(t)?t:attributeCache[t]||(attributeCache[t]=t.replace(/([A-Z])/g,(e=>"-"+e.toLowerCase())))));void 0!==n&&(e.textContent=n);for(let t in a)if(a.hasOwnProperty(t)){const r=dangerousStyleValue(t,a[t]);isCustomPropRE.test(t)?e.style.setProperty(t,r):e.style[t]=r}h.forEach(((t,r)=>{e.setAttribute(t,c[r])})),void 0!==s&&(e.scrollTop=s),void 0!==o&&(e.scrollLeft=o),void 0!==l&&e.setAttribute("viewBox",l)}let isUnitlessNumber={animationIterationCount:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0};const prefixKey=(e,t)=>e+t.charAt(0).toUpperCase()+t.substring(1),prefixes=["Webkit","Ms","Moz","O"];isUnitlessNumber=Object.keys(isUnitlessNumber).reduce(((e,t)=>(prefixes.forEach((r=>e[prefixKey(r,t)]=e[t])),e)),isUnitlessNumber);const _excluded$1$1=["x","y","z"],domTransforms=/^(matrix|translate|scale|rotate|skew)/,pxTransforms=/^(translate)/,degTransforms=/^(rotate|skew)/,addUnit=(e,t)=>is.num(e)&&0!==e?e+t:e,isValueIdentity=(e,t)=>is.arr(e)?e.every((e=>isValueIdentity(e,t))):is.num(e)?e===t:parseFloat(e)===t;class AnimatedStyle extends AnimatedObject{constructor(e){let{x:t,y:r,z:i}=e,a=_objectWithoutPropertiesLoose$1(e,_excluded$1$1);const n=[],s=[];(t||r||i)&&(n.push([t||0,r||0,i||0]),s.push((e=>[`translate3d(${e.map((e=>addUnit(e,"px"))).join(",")})`,isValueIdentity(e,0)]))),eachProp(a,((e,t)=>{if("transform"===t)n.push([e||""]),s.push((e=>[e,""===e]));else if(domTransforms.test(t)){if(delete a[t],is.und(e))return;const r=pxTransforms.test(t)?"px":degTransforms.test(t)?"deg":"";n.push(toArray(e)),s.push("rotate3d"===t?([e,t,i,a])=>[`rotate3d(${e},${t},${i},${addUnit(a,r)})`,isValueIdentity(a,0)]:e=>[`${t}(${e.map((e=>addUnit(e,r))).join(",")})`,isValueIdentity(e,t.startsWith("scale")?1:0)])}})),n.length&&(a.transform=new FluidTransform(n,s)),super(a)}}class FluidTransform extends FluidValue{constructor(e,t){super(),this._value=null,this.inputs=e,this.transforms=t}get(){return this._value||(this._value=this._get())}_get(){let e="",t=!0;return each(this.inputs,((r,i)=>{const a=getFluidValue(r[0]),[n,s]=this.transforms[i](is.arr(a)?a:r.map(getFluidValue));e+=" "+n,t=t&&s})),t?"none":e}observerAdded(e){1==e&&each(this.inputs,(e=>each(e,(e=>hasFluidValue(e)&&addFluidObserver(e,this)))))}observerRemoved(e){0==e&&each(this.inputs,(e=>each(e,(e=>hasFluidValue(e)&&removeFluidObserver(e,this)))))}eventObserved(e){"change"==e.type&&(this._value=null),callFluidObservers(this,e)}}const primitives=["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","tspan"],_excluded=["scrollTop","scrollLeft"];globals.assign({batchedUpdates:unstable_batchedUpdates,createStringInterpolator:createStringInterpolator,colors:colors});const host=createHost(primitives,{applyAnimatedValues:applyAnimatedValues,createAnimatedStyle:e=>new AnimatedStyle(e),getComponentProps:e=>_objectWithoutPropertiesLoose$1(e,_excluded)}),animated=host.animated,AccordionContext=React__default.createContext(!1);var commonjsGlobal="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},chevronUp={},ChevronUpIcon;Object.defineProperty(chevronUp,"__esModule",{value:!0});var e$l=require$$0;const r$7=e=>e$l.jsx("svg",{width:"1em",height:"1em",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:e$l.jsx("path",{d:"M17.7279 14.2091C17.5059 14.4311 17.2492 14.5421 16.9579 14.5421C16.6659 14.5421 16.4089 14.4311 16.1869 14.2091L10.1659 8.18812L4.12389 14.2301C3.91589 14.4381 3.66589 14.5421 3.37389 14.5421C3.08256 14.5421 2.82589 14.4311 2.60389 14.2091C2.39523 14.0005 2.29089 13.7468 2.29089 13.4481C2.29089 13.1495 2.39523 12.8961 2.60389 12.6881L9.54089 5.75012C9.63823 5.65346 9.73889 5.58412 9.84289 5.54212C9.94689 5.50079 10.0546 5.48012 10.1659 5.48012C10.2772 5.48012 10.3849 5.50079 10.4889 5.54212C10.5929 5.58412 10.6936 5.65346 10.7909 5.75012L17.7489 12.7091C17.9716 12.9311 18.0759 13.1845 18.0619 13.4691C18.0479 13.7538 17.9366 14.0005 17.7279 14.2091Z",fill:"currentColor"})});r$7.displayName="ChevronUpIcon",ChevronUpIcon=chevronUp.ChevronUpIcon=r$7;const BaseColorSet={Brand:{1:"#EF413D",2:"#F26664",3:"#F58E8B",4:"#F9B5B2",5:"#FDDDD7",6:"#FFEEEA"},Primary:"#1C76D5",PrimaryDark:"#1869BF",Secondary:"#0056b3",Accent:{Dark:{1:"#465A88",2:"#556D99",3:"#8D8DBF"},Light:{1:"#57A9FF",2:"#81BFFF",3:"#BED7FF",4:"#E2ECFD",5:"#F6F8FF",6:"#FBFCFE"}},Neutral:{1:"#282828",2:"#424242",3:"#686868",4:"#A4A4A4",5:"#E0E4E5",6:"#ECEFEF",7:"#F8F8F8",8:"#FFFFFF"},Validation:{Green:{Text:"#097123",Icon:"#4FC029",Border:"#95D97F",Background:"#F9FDF8"},Orange:{Text:"#B34E00",Icon:"#FEAB10",Border:"#F9CB77",Background:"#FFFCF7",Badge:"#F57F17"},Red:{Text:"#C60000",Icon:"#C60000",Border:"#DD6666",Background:"#FDF7F7"},Blue:{Text:"#064D70",Icon:" #066391",Border:"#84B7DB",Background:"#E8F4FA"}},Shadow:{Accent:"rgba(87, 169, 255, 0.5)",Red:"rgba(221, 102, 102, 0.8)",Elevation:"rgba(75, 83, 159, 0.24)"}},BookingSGColorSet={Brand:{1:"#EF413D",2:"#F26664",3:"#F58E8B",4:"#F9B5B2",5:"#FDDDD7",6:"#FFEEEA"},Primary:"#6F4AB8",PrimaryDark:"#6443A6",Secondary:"#6443A6",Accent:{Dark:{1:"#355985",2:"#68819D",3:"#9AABBE"},Light:{1:"#9F82D9",2:"#B5A5D7",3:"#CEC3E4 ",4:"#E2DBEF",5:"#F2EFF8",6:"#F7F6FB"}},Neutral:{1:"#282828",2:"#424242",3:"#686868",4:"#A4A4A4",5:"#E0E4E5",6:"#ECEFEF",7:"#F8F8F8",8:"#FFFFFF"},Validation:{Green:{Text:"#097123",Icon:"#4FC029",Border:"#95D97F",Background:"#F9FDF8"},Orange:{Text:"#B34E00",Icon:"#FEAB10",Border:"#F9CB77",Background:"#FFFCF7",Badge:"#F57F17"},Red:{Text:"#C60000",Icon:"#C60000",Border:"#DD6666",Background:"#FDF7F7"},Blue:{Text:"#064D70",Icon:" #066391",Border:"#84B7DB",Background:"#E8F4FA"}},Shadow:{Accent:"rgba(161, 87, 255, 0.5)",Red:"rgba(221, 102, 102, 0.8)",Elevation:"rgba(75, 83, 159, 0.24)"}};var isArray$9=Array.isArray,isArray_1=isArray$9,freeGlobal$1="object"==typeof commonjsGlobal&&commonjsGlobal&&commonjsGlobal.Object===Object&&commonjsGlobal,_freeGlobal=freeGlobal$1,freeGlobal=_freeGlobal,freeSelf="object"==typeof self&&self&&self.Object===Object&&self,root$9=freeGlobal||freeSelf||Function("return this")(),_root=root$9,root$8=_root,Symbol$5=root$8.Symbol,_Symbol=Symbol$5,Symbol$4=_Symbol,objectProto$b=Object.prototype,hasOwnProperty$9=objectProto$b.hasOwnProperty,nativeObjectToString$1=objectProto$b.toString,symToStringTag$1=Symbol$4?Symbol$4.toStringTag:void 0;function getRawTag$1(e){var t=hasOwnProperty$9.call(e,symToStringTag$1),r=e[symToStringTag$1];try{e[symToStringTag$1]=void 0;var i=!0}catch(e){}var a=nativeObjectToString$1.call(e);return i&&(t?e[symToStringTag$1]=r:delete e[symToStringTag$1]),a}var _getRawTag=getRawTag$1,objectProto$a=Object.prototype,nativeObjectToString=objectProto$a.toString;function objectToString$1(e){return nativeObjectToString.call(e)}var _objectToString=objectToString$1,Symbol$3=_Symbol,getRawTag=_getRawTag,objectToString=_objectToString,nullTag="[object Null]",undefinedTag="[object Undefined]",symToStringTag=Symbol$3?Symbol$3.toStringTag:void 0;function baseGetTag$5(e){return null==e?void 0===e?undefinedTag:nullTag:symToStringTag&&symToStringTag in Object(e)?getRawTag(e):objectToString(e)}var _baseGetTag=baseGetTag$5;function isObjectLike$5(e){return null!=e&&"object"==typeof e}var isObjectLike_1=isObjectLike$5,baseGetTag$4=_baseGetTag,isObjectLike$4=isObjectLike_1,symbolTag$1="[object Symbol]";function isSymbol$4(e){return"symbol"==typeof e||isObjectLike$4(e)&&baseGetTag$4(e)==symbolTag$1}var isSymbol_1=isSymbol$4,isArray$8=isArray_1,isSymbol$3=isSymbol_1,reIsDeepProp=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,reIsPlainProp=/^\w*$/;function isKey$3(e,t){if(isArray$8(e))return!1;var r=typeof e;return!("number"!=r&&"symbol"!=r&&"boolean"!=r&&null!=e&&!isSymbol$3(e))||(reIsPlainProp.test(e)||!reIsDeepProp.test(e)||null!=t&&e in Object(t))}var _isKey=isKey$3;function isObject$5(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}var isObject_1=isObject$5,baseGetTag$3=_baseGetTag,isObject$4=isObject_1,asyncTag="[object AsyncFunction]",funcTag$1="[object Function]",genTag="[object GeneratorFunction]",proxyTag="[object Proxy]";function isFunction$2(e){if(!isObject$4(e))return!1;var t=baseGetTag$3(e);return t==funcTag$1||t==genTag||t==asyncTag||t==proxyTag}var isFunction_1=isFunction$2,root$7=_root,coreJsData$1=root$7["__core-js_shared__"],_coreJsData=coreJsData$1,coreJsData=_coreJsData,maskSrcKey=(uid=/[^.]+$/.exec(coreJsData&&coreJsData.keys&&coreJsData.keys.IE_PROTO||""),uid?"Symbol(src)_1."+uid:""),uid;function isMasked$1(e){return!!maskSrcKey&&maskSrcKey in e}var _isMasked=isMasked$1,funcProto$1=Function.prototype,funcToString$1=funcProto$1.toString;function toSource$2(e){if(null!=e){try{return funcToString$1.call(e)}catch(e){}try{return e+""}catch(e){}}return""}var _toSource=toSource$2,isFunction$1=isFunction_1,isMasked=_isMasked,isObject$3=isObject_1,toSource$1=_toSource,reRegExpChar=/[\\^$.*+?()[\]{}|]/g,reIsHostCtor=/^\[object .+?Constructor\]$/,funcProto=Function.prototype,objectProto$9=Object.prototype,funcToString=funcProto.toString,hasOwnProperty$8=objectProto$9.hasOwnProperty,reIsNative=RegExp("^"+funcToString.call(hasOwnProperty$8).replace(reRegExpChar,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function baseIsNative$1(e){return!(!isObject$3(e)||isMasked(e))&&(isFunction$1(e)?reIsNative:reIsHostCtor).test(toSource$1(e))}var _baseIsNative=baseIsNative$1;function getValue$2(e,t){return null==e?void 0:e[t]}var _getValue=getValue$2,baseIsNative=_baseIsNative,getValue$1=_getValue;function getNative$6(e,t){var r=getValue$1(e,t);return baseIsNative(r)?r:void 0}var _getNative=getNative$6,getNative$5=_getNative,nativeCreate$4=getNative$5(Object,"create"),_nativeCreate=nativeCreate$4,nativeCreate$3=_nativeCreate;function hashClear$1(){this.__data__=nativeCreate$3?nativeCreate$3(null):{},this.size=0}var _hashClear=hashClear$1;function hashDelete$1(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var _hashDelete=hashDelete$1,nativeCreate$2=_nativeCreate,HASH_UNDEFINED$2="__lodash_hash_undefined__",objectProto$8=Object.prototype,hasOwnProperty$7=objectProto$8.hasOwnProperty;function hashGet$1(e){var t=this.__data__;if(nativeCreate$2){var r=t[e];return r===HASH_UNDEFINED$2?void 0:r}return hasOwnProperty$7.call(t,e)?t[e]:void 0}var _hashGet=hashGet$1,nativeCreate$1=_nativeCreate,objectProto$7=Object.prototype,hasOwnProperty$6=objectProto$7.hasOwnProperty;function hashHas$1(e){var t=this.__data__;return nativeCreate$1?void 0!==t[e]:hasOwnProperty$6.call(t,e)}var _hashHas=hashHas$1,nativeCreate=_nativeCreate,HASH_UNDEFINED$1="__lodash_hash_undefined__";function hashSet$1(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=nativeCreate&&void 0===t?HASH_UNDEFINED$1:t,this}var _hashSet=hashSet$1,hashClear=_hashClear,hashDelete=_hashDelete,hashGet=_hashGet,hashHas=_hashHas,hashSet=_hashSet;function Hash$1(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var i=e[t];this.set(i[0],i[1])}}Hash$1.prototype.clear=hashClear,Hash$1.prototype.delete=hashDelete,Hash$1.prototype.get=hashGet,Hash$1.prototype.has=hashHas,Hash$1.prototype.set=hashSet;var _Hash=Hash$1;function listCacheClear$1(){this.__data__=[],this.size=0}var _listCacheClear=listCacheClear$1;function eq$2(e,t){return e===t||e!=e&&t!=t}var eq_1=eq$2,eq$1=eq_1;function assocIndexOf$4(e,t){for(var r=e.length;r--;)if(eq$1(e[r][0],t))return r;return-1}var _assocIndexOf=assocIndexOf$4,assocIndexOf$3=_assocIndexOf,arrayProto=Array.prototype,splice=arrayProto.splice;function listCacheDelete$1(e){var t=this.__data__,r=assocIndexOf$3(t,e);return!(r<0)&&(r==t.length-1?t.pop():splice.call(t,r,1),--this.size,!0)}var _listCacheDelete=listCacheDelete$1,assocIndexOf$2=_assocIndexOf;function listCacheGet$1(e){var t=this.__data__,r=assocIndexOf$2(t,e);return r<0?void 0:t[r][1]}var _listCacheGet=listCacheGet$1,assocIndexOf$1=_assocIndexOf;function listCacheHas$1(e){return assocIndexOf$1(this.__data__,e)>-1}var _listCacheHas=listCacheHas$1,assocIndexOf=_assocIndexOf;function listCacheSet$1(e,t){var r=this.__data__,i=assocIndexOf(r,e);return i<0?(++this.size,r.push([e,t])):r[i][1]=t,this}var _listCacheSet=listCacheSet$1,listCacheClear=_listCacheClear,listCacheDelete=_listCacheDelete,listCacheGet=_listCacheGet,listCacheHas=_listCacheHas,listCacheSet=_listCacheSet;function ListCache$4(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var i=e[t];this.set(i[0],i[1])}}ListCache$4.prototype.clear=listCacheClear,ListCache$4.prototype.delete=listCacheDelete,ListCache$4.prototype.get=listCacheGet,ListCache$4.prototype.has=listCacheHas,ListCache$4.prototype.set=listCacheSet;var _ListCache=ListCache$4,getNative$4=_getNative,root$6=_root,Map$4=getNative$4(root$6,"Map"),_Map=Map$4,Hash=_Hash,ListCache$3=_ListCache,Map$3=_Map;function mapCacheClear$1(){this.size=0,this.__data__={hash:new Hash,map:new(Map$3||ListCache$3),string:new Hash}}var _mapCacheClear=mapCacheClear$1;function isKeyable$1(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e}var _isKeyable=isKeyable$1,isKeyable=_isKeyable;function getMapData$4(e,t){var r=e.__data__;return isKeyable(t)?r["string"==typeof t?"string":"hash"]:r.map}var _getMapData=getMapData$4,getMapData$3=_getMapData;function mapCacheDelete$1(e){var t=getMapData$3(this,e).delete(e);return this.size-=t?1:0,t}var _mapCacheDelete=mapCacheDelete$1,getMapData$2=_getMapData;function mapCacheGet$1(e){return getMapData$2(this,e).get(e)}var _mapCacheGet=mapCacheGet$1,getMapData$1=_getMapData;function mapCacheHas$1(e){return getMapData$1(this,e).has(e)}var _mapCacheHas=mapCacheHas$1,getMapData=_getMapData;function mapCacheSet$1(e,t){var r=getMapData(this,e),i=r.size;return r.set(e,t),this.size+=r.size==i?0:1,this}var _mapCacheSet=mapCacheSet$1,mapCacheClear=_mapCacheClear,mapCacheDelete=_mapCacheDelete,mapCacheGet=_mapCacheGet,mapCacheHas=_mapCacheHas,mapCacheSet=_mapCacheSet;function MapCache$3(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var i=e[t];this.set(i[0],i[1])}}MapCache$3.prototype.clear=mapCacheClear,MapCache$3.prototype.delete=mapCacheDelete,MapCache$3.prototype.get=mapCacheGet,MapCache$3.prototype.has=mapCacheHas,MapCache$3.prototype.set=mapCacheSet;var _MapCache=MapCache$3,MapCache$2=_MapCache,FUNC_ERROR_TEXT$1="Expected a function";function memoize$1(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new TypeError(FUNC_ERROR_TEXT$1);var r=function(){var i=arguments,a=t?t.apply(this,i):i[0],n=r.cache;if(n.has(a))return n.get(a);var s=e.apply(this,i);return r.cache=n.set(a,s)||n,s};return r.cache=new(memoize$1.Cache||MapCache$2),r}memoize$1.Cache=MapCache$2;var memoize_1=memoize$1,memoize=memoize_1,MAX_MEMOIZE_SIZE=500;function memoizeCapped$1(e){var t=memoize(e,(function(e){return r.size===MAX_MEMOIZE_SIZE&&r.clear(),e})),r=t.cache;return t}var _memoizeCapped=memoizeCapped$1,memoizeCapped=_memoizeCapped,rePropName=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,reEscapeChar=/\\(\\)?/g,stringToPath$1=memoizeCapped((function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(rePropName,(function(e,r,i,a){t.push(i?a.replace(reEscapeChar,"$1"):r||e)})),t})),_stringToPath=stringToPath$1;function arrayMap$1(e,t){for(var r=-1,i=null==e?0:e.length,a=Array(i);++r<i;)a[r]=t(e[r],r,e);return a}var _arrayMap=arrayMap$1,Symbol$2=_Symbol,arrayMap=_arrayMap,isArray$7=isArray_1,isSymbol$2=isSymbol_1,INFINITY$2=1/0,symbolProto$1=Symbol$2?Symbol$2.prototype:void 0,symbolToString=symbolProto$1?symbolProto$1.toString:void 0;function baseToString$1(e){if("string"==typeof e)return e;if(isArray$7(e))return arrayMap(e,baseToString$1)+"";if(isSymbol$2(e))return symbolToString?symbolToString.call(e):"";var t=e+"";return"0"==t&&1/e==-INFINITY$2?"-0":t}var _baseToString=baseToString$1,baseToString=_baseToString;function toString$3(e){return null==e?"":baseToString(e)}var toString_1=toString$3,isArray$6=isArray_1,isKey$2=_isKey,stringToPath=_stringToPath,toString$2=toString_1;function castPath$2(e,t){return isArray$6(e)?e:isKey$2(e,t)?[e]:stringToPath(toString$2(e))}var _castPath=castPath$2,isSymbol$1=isSymbol_1,INFINITY$1=1/0;function toKey$4(e){if("string"==typeof e||isSymbol$1(e))return e;var t=e+"";return"0"==t&&1/e==-INFINITY$1?"-0":t}var _toKey=toKey$4,castPath$1=_castPath,toKey$3=_toKey;function baseGet$2(e,t){for(var r=0,i=(t=castPath$1(t,e)).length;null!=e&&r<i;)e=e[toKey$3(t[r++])];return r&&r==i?e:void 0}var _baseGet=baseGet$2,baseGet$1=_baseGet;function get$1(e,t,r){var i=null==e?void 0:baseGet$1(e,t);return void 0===i?r:i}var get_1=get$1;const getValue=(e,t,r)=>t?get_1(r,t)||get_1(e,t):r||e,getCollection=(e,t)=>{const r=t||e.defaultValue;return get_1(e.collections,r)};var ThemeContextKeys;!function(e){e.colorScheme="colorScheme",e.layout="layout",e.textStyleScheme="textStyleScheme",e.designTokenScheme="designTokenScheme",e.resourceScheme="resourceScheme"}(ThemeContextKeys||(ThemeContextKeys={}));const ColorSpec={collections:{base:BaseColorSet,bookingsg:BookingSGColorSet},defaultValue:"base"},getThemeColors=e=>t=>{const r=t.theme,i=getCollection(ColorSpec,r[ThemeContextKeys.colorScheme]);return r.options&&r.options.color?getValue(i,e,r.options.color):getValue(i,e)},Color={Brand:{1:getThemeColors("Brand.1"),2:getThemeColors("Brand.2"),3:getThemeColors("Brand.3"),4:getThemeColors("Brand.4"),5:getThemeColors("Brand.5"),6:getThemeColors("Brand.6")},Primary:getThemeColors("Primary"),PrimaryDark:getThemeColors("PrimaryDark"),Secondary:getThemeColors("Secondary"),Accent:{Light:{1:getThemeColors("Accent.Light.1"),2:getThemeColors("Accent.Light.2"),3:getThemeColors("Accent.Light.3"),4:getThemeColors("Accent.Light.4"),5:getThemeColors("Accent.Light.5"),6:getThemeColors("Accent.Light.6")},Dark:{1:getThemeColors("Accent.Dark.1"),2:getThemeColors("Accent.Dark.2"),3:getThemeColors("Accent.Dark.3")}},Neutral:{1:getThemeColors("Neutral.1"),2:getThemeColors("Neutral.2"),3:getThemeColors("Neutral.3"),4:getThemeColors("Neutral.4"),5:getThemeColors("Neutral.5"),6:getThemeColors("Neutral.6"),7:getThemeColors("Neutral.7"),8:getThemeColors("Neutral.8")},Validation:{Green:{Text:getThemeColors("Validation.Green.Text"),Icon:getThemeColors("Validation.Green.Icon"),Border:getThemeColors("Validation.Green.Border"),Background:getThemeColors("Validation.Green.Background")},Orange:{Text:getThemeColors("Validation.Orange.Text"),Icon:getThemeColors("Validation.Orange.Icon"),Border:getThemeColors("Validation.Orange.Border"),Background:getThemeColors("Validation.Orange.Background"),Badge:getThemeColors("Validation.Orange.Badge")},Red:{Text:getThemeColors("Validation.Red.Text"),Icon:getThemeColors("Validation.Red.Icon"),Border:getThemeColors("Validation.Red.Border"),Background:getThemeColors("Validation.Red.Background")},Blue:{Text:getThemeColors("Validation.Blue.Text"),Icon:getThemeColors("Validation.Blue.Icon"),Border:getThemeColors("Validation.Blue.Border"),Background:getThemeColors("Validation.Blue.Background")}},Shadow:{Accent:getThemeColors("Shadow.Accent"),Red:getThemeColors("Shadow.Red"),Elevation:getThemeColors("Shadow.Elevation")}},Main$1=styled.button`
2
2
  display: flex;
3
3
  justify-content: center;
4
4
  align-items: center;
@@ -787,7 +787,7 @@ import require$$0,{jsx,jsxs,Fragment}from"react/jsx-runtime";import*as React fro
787
787
  width: ${t};
788
788
  `}}
789
789
  color: ${e=>e.disabled?Color.Neutral[4]:Color.Neutral[8]};
790
- `,Checkbox=({className:e,checked:t,disabled:r,onChange:i,onKeyPress:a,displaySize:n="default",...s})=>{const[o,l]=useState(t);useEffect((()=>{l(t)}),[t]);const p=e=>{if(!r){const t=e;if(!(" "===t.key||"change"===e.type))return;i&&i(e),a&&a(t)}};return jsxs(Container$g,{selected:o,disabled:r,className:e,"data-testid":"checkbox",$displaySize:n,role:"checkbox","aria-checked":o,"aria-labelledby":"checkbox-input",tabIndex:r?-1:0,onKeyDown:p,children:[jsx(Input$5,{id:"checkbox-input","data-testid":"checkbox-input","aria-hidden":"true",type:"checkbox",tabIndex:-1,onChange:p,disabled:r,checked:o,...s}),o&&jsx(Checkmark$1,{id:"checkmark","data-testid":"checkmark",disabled:r,$displaySize:n})]})},MONTHS_WITH_31_DAYS=[1,3,5,7,8,10,12],MONTHS_WITH_30_DAYS=[4,6,9,11];var DateHelper,StringHelper;!function(e){e.clampDay=(t,r,i)=>{const a=parseInt(t),n=parseInt(r),s=parseInt(i);return 0==a?"1":MONTHS_WITH_31_DAYS.includes(n)?Math.min(a,31).toString():MONTHS_WITH_30_DAYS.includes(n)?Math.min(a,30).toString():2===n?e.isLeapYear(s)?Math.min(a,29).toString():Math.min(a,28).toString():t},e.clampMonth=e=>{const t=parseInt(e);return 0==t?"1":t>12?"12":e},e.isLeapYear=e=>e%4==0&&e%100!=0||e%400==0,e.getTimeDiffInMinutes=(e,t,r="HH:mm")=>{const i=dayjs(e,r);return dayjs(t,r).diff(i,"minute")}}(DateHelper||(DateHelper={})),function(e){e.transformWithSpaces=(e,t)=>{const r="(.{"+t+"})";return e.replace(/[^\dA-Z]/gi,"").replace(new RegExp(r,"g"),"$1 ").trim()},e.padValue=(e,t)=>{if("0"===e)return t?e:e.padStart(2,"0");if(""===e)return e;return parseInt(e).toString().padStart(2,"0")},e.shouldTruncateToTwoLines=(e,t)=>{const r=Math.floor(t/9);return e.length>=2*r||1===e.split(" ").length&&e.length>r},e.truncateOneLine=(e,t,r,i)=>{let a=0;t>r&&(a=Math.floor((t-r)/8));const n=i+a;if(n<e.length){const t=Math.floor(n/2);return e.substring(0,t)+" ... "+e.substring(e.length-t,e.length)}return e}}(StringHelper||(StringHelper={}));const BaseDesignTokenSet={InputBoxShadow:css`
790
+ `,Checkbox=({className:e,checked:t,disabled:r,onChange:i,onKeyPress:a,displaySize:n="default",...s})=>{const[o,l]=useState(t);useEffect((()=>{l(t)}),[t]);const p=e=>{if(!r){const t=e;if(!(" "===t.key||"change"===e.type))return;i&&i(e),a&&a(t)}};return jsxs(Container$g,{selected:o,disabled:r,className:e,"data-testid":"checkbox",$displaySize:n,role:"checkbox","aria-checked":o,"aria-labelledby":"checkbox-input",tabIndex:r?-1:0,onKeyDown:p,children:[jsx(Input$5,{id:"checkbox-input","data-testid":"checkbox-input","aria-hidden":"true",type:"checkbox",tabIndex:-1,onChange:p,disabled:r,checked:o,...s}),o&&jsx(Checkmark$1,{id:"checkmark","data-testid":"checkmark",disabled:r,$displaySize:n})]})},MONTHS_WITH_31_DAYS=[1,3,5,7,8,10,12],MONTHS_WITH_30_DAYS=[4,6,9,11];var DateHelper,SimpleIdGenerator,StringHelper;!function(e){e.clampDay=(t,r,i)=>{const a=parseInt(t),n=parseInt(r),s=parseInt(i);return 0==a?"1":MONTHS_WITH_31_DAYS.includes(n)?Math.min(a,31).toString():MONTHS_WITH_30_DAYS.includes(n)?Math.min(a,30).toString():2===n?e.isLeapYear(s)?Math.min(a,29).toString():Math.min(a,28).toString():t},e.clampMonth=e=>{const t=parseInt(e);return 0==t?"1":t>12?"12":e},e.isLeapYear=e=>e%4==0&&e%100!=0||e%400==0,e.getTimeDiffInMinutes=(e,t,r="HH:mm")=>{const i=dayjs(e,r);return dayjs(t,r).diff(i,"minute")}}(DateHelper||(DateHelper={})),function(e){e.generate=()=>Math.random().toString(36).substring(2,9)}(SimpleIdGenerator||(SimpleIdGenerator={})),function(e){e.transformWithSpaces=(e,t)=>{const r="(.{"+t+"})";return e.replace(/[^\dA-Z]/gi,"").replace(new RegExp(r,"g"),"$1 ").trim()},e.padValue=(e,t)=>{if("0"===e)return t?e:e.padStart(2,"0");if(""===e)return e;return parseInt(e).toString().padStart(2,"0")},e.shouldTruncateToTwoLines=(e,t)=>{const r=Math.floor(t/9);return e.length>=2*r||1===e.split(" ").length&&e.length>r},e.truncateOneLine=(e,t,r,i)=>{let a=0;t>r&&(a=Math.floor((t-r)/8));const n=i+a;if(n<e.length){const t=Math.floor(n/2);return e.substring(0,t)+" ... "+e.substring(e.length-t,e.length)}return e}}(StringHelper||(StringHelper={}));const BaseDesignTokenSet={InputBoxShadow:css`
791
791
  inset 0 0 6px 1px ${Color.Shadow.Accent}
792
792
  `,InputErrorBoxShadow:css`
793
793
  inset 0 0 6px 1px ${Color.Shadow.Red}
@@ -1278,7 +1278,7 @@ var t=Object.getOwnPropertySymbols,r=Object.prototype.hasOwnProperty,i=Object.pr
1278
1278
  `:e.$selected?css`
1279
1279
  color: ${Color.Primary(e)};
1280
1280
  `:void 0}
1281
- `,Toggle=({type:e="checkbox",indicator:t,checked:r,styleType:i="default",children:a,disabled:n,error:s,name:o,id:l,className:p,"data-testid":c,onChange:h})=>{const[d,u]=useState(r),[m]=useState((()=>crypto.randomUUID())),f=l?`${l}-input`:m,y=useRef();useEffect((()=>{u(r)}),[r]);return jsxs(Container$c,{$selected:d,$disabled:n,className:p,$styleType:i,$error:s,$indicator:t,id:l,"data-testid":c,children:[t&&(()=>{let t;switch(e){case"yes":t="tick";break;case"no":t="cross";break;case"checkbox":case"radio":t=e}return jsx(ToggleIcon,{type:t,active:d,disabled:n})})(),jsx(Input$3,{ref:y,name:o,id:f,type:"checkbox"===e?"checkbox":"radio","data-testid":"toggle-input",disabled:n,onChange:t=>{if(!n){switch(e){case"checkbox":d||u((e=>!e));break;case"radio":case"yes":case"no":d||u(!0)}h&&h(t)}},checked:d}),jsx(TextContainer$3,{children:jsx(Label$3,{htmlFor:f,$selected:d,$indicator:t,$disabled:n,"data-testid":"toggle-label",children:a})})]})},StyledFilterItem=styled(FilterItem)`
1281
+ `,Toggle=({type:e="checkbox",indicator:t,checked:r,styleType:i="default",children:a,disabled:n,error:s,name:o,id:l,className:p,"data-testid":c,onChange:h})=>{const[d,u]=useState(r),[m]=useState(SimpleIdGenerator.generate()),f=l?`${l}-input`:`tg-${m}-input`,y=useRef();useEffect((()=>{u(r)}),[r]);return jsxs(Container$c,{$selected:d,$disabled:n,className:p,$styleType:i,$error:s,$indicator:t,id:l,"data-testid":c,children:[t&&(()=>{let t;switch(e){case"yes":t="tick";break;case"no":t="cross";break;case"checkbox":case"radio":t=e}return jsx(ToggleIcon,{type:t,active:d,disabled:n})})(),jsx(Input$3,{ref:y,name:o,id:f,type:"checkbox"===e?"checkbox":"radio","data-testid":"toggle-input",disabled:n,onChange:t=>{if(!n){switch(e){case"checkbox":d||u((e=>!e));break;case"radio":case"yes":case"no":d||u(!0)}h&&h(t)}},checked:d}),jsx(TextContainer$3,{children:jsx(Label$3,{htmlFor:f,$selected:d,$indicator:t,$disabled:n,"data-testid":"toggle-label",children:a})})]})},StyledFilterItem=styled(FilterItem)`
1282
1282
  padding: 0 0 1rem;
1283
1283
 
1284
1284
  [data-id="content-container"] {
@@ -1999,7 +1999,7 @@ var t=Object.getOwnPropertySymbols,r=Object.prototype.hasOwnProperty,i=Object.pr
1999
1999
  `:css`
2000
2000
  margin-right: ${e.$readOnly?"0.25rem":"0.75rem"};
2001
2001
  `};
2002
- `;function baseFindIndex$1(e,t,r,i){for(var a=e.length,n=r+(i?1:-1);i?n--:++n<a;)if(t(e[n],n,e))return n;return-1}var _baseFindIndex=baseFindIndex$1,ListCache$2=_ListCache;function stackClear$1(){this.__data__=new ListCache$2,this.size=0}var _stackClear=stackClear$1;function stackDelete$1(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r}var _stackDelete=stackDelete$1;function stackGet$1(e){return this.__data__.get(e)}var _stackGet=stackGet$1;function stackHas$1(e){return this.__data__.has(e)}var _stackHas=stackHas$1,ListCache$1=_ListCache,Map$2=_Map,MapCache$1=_MapCache,LARGE_ARRAY_SIZE=200;function stackSet$1(e,t){var r=this.__data__;if(r instanceof ListCache$1){var i=r.__data__;if(!Map$2||i.length<LARGE_ARRAY_SIZE-1)return i.push([e,t]),this.size=++r.size,this;r=this.__data__=new MapCache$1(i)}return r.set(e,t),this.size=r.size,this}var _stackSet=stackSet$1,ListCache=_ListCache,stackClear=_stackClear,stackDelete=_stackDelete,stackGet=_stackGet,stackHas=_stackHas,stackSet=_stackSet;function Stack$2(e){var t=this.__data__=new ListCache(e);this.size=t.size}Stack$2.prototype.clear=stackClear,Stack$2.prototype.delete=stackDelete,Stack$2.prototype.get=stackGet,Stack$2.prototype.has=stackHas,Stack$2.prototype.set=stackSet;var _Stack=Stack$2,HASH_UNDEFINED="__lodash_hash_undefined__";function setCacheAdd$1(e){return this.__data__.set(e,HASH_UNDEFINED),this}var _setCacheAdd=setCacheAdd$1;function setCacheHas$1(e){return this.__data__.has(e)}var _setCacheHas=setCacheHas$1,MapCache=_MapCache,setCacheAdd=_setCacheAdd,setCacheHas=_setCacheHas;function SetCache$1(e){var t=-1,r=null==e?0:e.length;for(this.__data__=new MapCache;++t<r;)this.add(e[t])}SetCache$1.prototype.add=SetCache$1.prototype.push=setCacheAdd,SetCache$1.prototype.has=setCacheHas;var _SetCache=SetCache$1;function arraySome$1(e,t){for(var r=-1,i=null==e?0:e.length;++r<i;)if(t(e[r],r,e))return!0;return!1}var _arraySome=arraySome$1;function cacheHas$1(e,t){return e.has(t)}var _cacheHas=cacheHas$1,SetCache=_SetCache,arraySome=_arraySome,cacheHas=_cacheHas,COMPARE_PARTIAL_FLAG$5=1,COMPARE_UNORDERED_FLAG$3=2;function equalArrays$2(e,t,r,i,a,n){var s=r&COMPARE_PARTIAL_FLAG$5,o=e.length,l=t.length;if(o!=l&&!(s&&l>o))return!1;var p=n.get(e),c=n.get(t);if(p&&c)return p==t&&c==e;var h=-1,d=!0,u=r&COMPARE_UNORDERED_FLAG$3?new SetCache:void 0;for(n.set(e,t),n.set(t,e);++h<o;){var m=e[h],f=t[h];if(i)var y=s?i(f,m,h,t,e,n):i(m,f,h,e,t,n);if(void 0!==y){if(y)continue;d=!1;break}if(u){if(!arraySome(t,(function(e,t){if(!cacheHas(u,t)&&(m===e||a(m,e,r,i,n)))return u.push(t)}))){d=!1;break}}else if(m!==f&&!a(m,f,r,i,n)){d=!1;break}}return n.delete(e),n.delete(t),d}var _equalArrays=equalArrays$2,root$4=_root,Uint8Array$2=root$4.Uint8Array,_Uint8Array=Uint8Array$2;function mapToArray$1(e){var t=-1,r=Array(e.size);return e.forEach((function(e,i){r[++t]=[i,e]})),r}var _mapToArray=mapToArray$1;function setToArray$1(e){var t=-1,r=Array(e.size);return e.forEach((function(e){r[++t]=e})),r}var _setToArray=setToArray$1,Symbol$1=_Symbol,Uint8Array$1=_Uint8Array,eq=eq_1,equalArrays$1=_equalArrays,mapToArray=_mapToArray,setToArray=_setToArray,COMPARE_PARTIAL_FLAG$4=1,COMPARE_UNORDERED_FLAG$2=2,boolTag$1="[object Boolean]",dateTag$1="[object Date]",errorTag$1="[object Error]",mapTag$2="[object Map]",numberTag$1="[object Number]",regexpTag$1="[object RegExp]",setTag$2="[object Set]",stringTag$1="[object String]",symbolTag="[object Symbol]",arrayBufferTag$1="[object ArrayBuffer]",dataViewTag$2="[object DataView]",symbolProto=Symbol$1?Symbol$1.prototype:void 0,symbolValueOf=symbolProto?symbolProto.valueOf:void 0;function equalByTag$1(e,t,r,i,a,n,s){switch(r){case dataViewTag$2:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case arrayBufferTag$1:return!(e.byteLength!=t.byteLength||!n(new Uint8Array$1(e),new Uint8Array$1(t)));case boolTag$1:case dateTag$1:case numberTag$1:return eq(+e,+t);case errorTag$1:return e.name==t.name&&e.message==t.message;case regexpTag$1:case stringTag$1:return e==t+"";case mapTag$2:var o=mapToArray;case setTag$2:var l=i&COMPARE_PARTIAL_FLAG$4;if(o||(o=setToArray),e.size!=t.size&&!l)return!1;var p=s.get(e);if(p)return p==t;i|=COMPARE_UNORDERED_FLAG$2,s.set(e,t);var c=equalArrays$1(o(e),o(t),i,a,n,s);return s.delete(e),c;case symbolTag:if(symbolValueOf)return symbolValueOf.call(e)==symbolValueOf.call(t)}return!1}var _equalByTag=equalByTag$1;function arrayPush$2(e,t){for(var r=-1,i=t.length,a=e.length;++r<i;)e[a+r]=t[r];return e}var _arrayPush=arrayPush$2,arrayPush$1=_arrayPush,isArray$5=isArray_1;function baseGetAllKeys$1(e,t,r){var i=t(e);return isArray$5(e)?i:arrayPush$1(i,r(e))}var _baseGetAllKeys=baseGetAllKeys$1;function arrayFilter$1(e,t){for(var r=-1,i=null==e?0:e.length,a=0,n=[];++r<i;){var s=e[r];t(s,r,e)&&(n[a++]=s)}return n}var _arrayFilter=arrayFilter$1;function stubArray$1(){return[]}var stubArray_1=stubArray$1,arrayFilter=_arrayFilter,stubArray=stubArray_1,objectProto$6=Object.prototype,propertyIsEnumerable$1=objectProto$6.propertyIsEnumerable,nativeGetSymbols=Object.getOwnPropertySymbols,getSymbols$1=nativeGetSymbols?function(e){return null==e?[]:(e=Object(e),arrayFilter(nativeGetSymbols(e),(function(t){return propertyIsEnumerable$1.call(e,t)})))}:stubArray,_getSymbols=getSymbols$1;function baseTimes$1(e,t){for(var r=-1,i=Array(e);++r<e;)i[r]=t(r);return i}var _baseTimes=baseTimes$1,baseGetTag$2=_baseGetTag,isObjectLike$3=isObjectLike_1,argsTag$2="[object Arguments]";function baseIsArguments$1(e){return isObjectLike$3(e)&&baseGetTag$2(e)==argsTag$2}var _baseIsArguments=baseIsArguments$1,baseIsArguments=_baseIsArguments,isObjectLike$2=isObjectLike_1,objectProto$5=Object.prototype,hasOwnProperty$5=objectProto$5.hasOwnProperty,propertyIsEnumerable=objectProto$5.propertyIsEnumerable,isArguments$2=baseIsArguments(function(){return arguments}())?baseIsArguments:function(e){return isObjectLike$2(e)&&hasOwnProperty$5.call(e,"callee")&&!propertyIsEnumerable.call(e,"callee")},isArguments_1=isArguments$2,isBuffer$2={exports:{}};function stubFalse(){return!1}var stubFalse_1=stubFalse;!function(e,t){var r=_root,i=stubFalse_1,a=t&&!t.nodeType&&t,n=a&&e&&!e.nodeType&&e,s=n&&n.exports===a?r.Buffer:void 0,o=(s?s.isBuffer:void 0)||i;e.exports=o}(isBuffer$2,isBuffer$2.exports);var MAX_SAFE_INTEGER$1=9007199254740991,reIsUint=/^(?:0|[1-9]\d*)$/;function isIndex$2(e,t){var r=typeof e;return!!(t=null==t?MAX_SAFE_INTEGER$1:t)&&("number"==r||"symbol"!=r&&reIsUint.test(e))&&e>-1&&e%1==0&&e<t}var _isIndex=isIndex$2,MAX_SAFE_INTEGER=9007199254740991;function isLength$3(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=MAX_SAFE_INTEGER}var isLength_1=isLength$3,baseGetTag$1=_baseGetTag,isLength$2=isLength_1,isObjectLike$1=isObjectLike_1,argsTag$1="[object Arguments]",arrayTag$1="[object Array]",boolTag="[object Boolean]",dateTag="[object Date]",errorTag="[object Error]",funcTag="[object Function]",mapTag$1="[object Map]",numberTag="[object Number]",objectTag$2="[object Object]",regexpTag="[object RegExp]",setTag$1="[object Set]",stringTag="[object String]",weakMapTag$1="[object WeakMap]",arrayBufferTag="[object ArrayBuffer]",dataViewTag$1="[object DataView]",float32Tag="[object Float32Array]",float64Tag="[object Float64Array]",int8Tag="[object Int8Array]",int16Tag="[object Int16Array]",int32Tag="[object Int32Array]",uint8Tag="[object Uint8Array]",uint8ClampedTag="[object Uint8ClampedArray]",uint16Tag="[object Uint16Array]",uint32Tag="[object Uint32Array]",typedArrayTags={};function baseIsTypedArray$1(e){return isObjectLike$1(e)&&isLength$2(e.length)&&!!typedArrayTags[baseGetTag$1(e)]}typedArrayTags[float32Tag]=typedArrayTags[float64Tag]=typedArrayTags[int8Tag]=typedArrayTags[int16Tag]=typedArrayTags[int32Tag]=typedArrayTags[uint8Tag]=typedArrayTags[uint8ClampedTag]=typedArrayTags[uint16Tag]=typedArrayTags[uint32Tag]=!0,typedArrayTags[argsTag$1]=typedArrayTags[arrayTag$1]=typedArrayTags[arrayBufferTag]=typedArrayTags[boolTag]=typedArrayTags[dataViewTag$1]=typedArrayTags[dateTag]=typedArrayTags[errorTag]=typedArrayTags[funcTag]=typedArrayTags[mapTag$1]=typedArrayTags[numberTag]=typedArrayTags[objectTag$2]=typedArrayTags[regexpTag]=typedArrayTags[setTag$1]=typedArrayTags[stringTag]=typedArrayTags[weakMapTag$1]=!1;var _baseIsTypedArray=baseIsTypedArray$1;function baseUnary$1(e){return function(t){return e(t)}}var _baseUnary=baseUnary$1,_nodeUtil={exports:{}};!function(e,t){var r=_freeGlobal,i=t&&!t.nodeType&&t,a=i&&e&&!e.nodeType&&e,n=a&&a.exports===i&&r.process,s=function(){try{var e=a&&a.require&&a.require("util").types;return e||n&&n.binding&&n.binding("util")}catch(e){}}();e.exports=s}(_nodeUtil,_nodeUtil.exports);var baseIsTypedArray=_baseIsTypedArray,baseUnary=_baseUnary,nodeUtil=_nodeUtil.exports,nodeIsTypedArray=nodeUtil&&nodeUtil.isTypedArray,isTypedArray$2=nodeIsTypedArray?baseUnary(nodeIsTypedArray):baseIsTypedArray,isTypedArray_1=isTypedArray$2,baseTimes=_baseTimes,isArguments$1=isArguments_1,isArray$4=isArray_1,isBuffer$1=isBuffer$2.exports,isIndex$1=_isIndex,isTypedArray$1=isTypedArray_1,objectProto$4=Object.prototype,hasOwnProperty$4=objectProto$4.hasOwnProperty;function arrayLikeKeys$1(e,t){var r=isArray$4(e),i=!r&&isArguments$1(e),a=!r&&!i&&isBuffer$1(e),n=!r&&!i&&!a&&isTypedArray$1(e),s=r||i||a||n,o=s?baseTimes(e.length,String):[],l=o.length;for(var p in e)!t&&!hasOwnProperty$4.call(e,p)||s&&("length"==p||a&&("offset"==p||"parent"==p)||n&&("buffer"==p||"byteLength"==p||"byteOffset"==p)||isIndex$1(p,l))||o.push(p);return o}var _arrayLikeKeys=arrayLikeKeys$1,objectProto$3=Object.prototype;function isPrototype$1(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||objectProto$3)}var _isPrototype=isPrototype$1;function overArg$1(e,t){return function(r){return e(t(r))}}var _overArg=overArg$1,overArg=_overArg,nativeKeys$1=overArg(Object.keys,Object),_nativeKeys=nativeKeys$1,isPrototype=_isPrototype,nativeKeys=_nativeKeys,objectProto$2=Object.prototype,hasOwnProperty$3=objectProto$2.hasOwnProperty;function baseKeys$1(e){if(!isPrototype(e))return nativeKeys(e);var t=[];for(var r in Object(e))hasOwnProperty$3.call(e,r)&&"constructor"!=r&&t.push(r);return t}var _baseKeys=baseKeys$1,isFunction=isFunction_1,isLength$1=isLength_1;function isArrayLike$2(e){return null!=e&&isLength$1(e.length)&&!isFunction(e)}var isArrayLike_1=isArrayLike$2,arrayLikeKeys=_arrayLikeKeys,baseKeys=_baseKeys,isArrayLike$1=isArrayLike_1;function keys$3(e){return isArrayLike$1(e)?arrayLikeKeys(e):baseKeys(e)}var keys_1=keys$3,baseGetAllKeys=_baseGetAllKeys,getSymbols=_getSymbols,keys$2=keys_1;function getAllKeys$1(e){return baseGetAllKeys(e,keys$2,getSymbols)}var _getAllKeys=getAllKeys$1,getAllKeys=_getAllKeys,COMPARE_PARTIAL_FLAG$3=1,objectProto$1=Object.prototype,hasOwnProperty$2=objectProto$1.hasOwnProperty;function equalObjects$1(e,t,r,i,a,n){var s=r&COMPARE_PARTIAL_FLAG$3,o=getAllKeys(e),l=o.length;if(l!=getAllKeys(t).length&&!s)return!1;for(var p=l;p--;){var c=o[p];if(!(s?c in t:hasOwnProperty$2.call(t,c)))return!1}var h=n.get(e),d=n.get(t);if(h&&d)return h==t&&d==e;var u=!0;n.set(e,t),n.set(t,e);for(var m=s;++p<l;){var f=e[c=o[p]],y=t[c];if(i)var g=s?i(y,f,c,t,e,n):i(f,y,c,e,t,n);if(!(void 0===g?f===y||a(f,y,r,i,n):g)){u=!1;break}m||(m="constructor"==c)}if(u&&!m){var _=e.constructor,x=t.constructor;_==x||!("constructor"in e)||!("constructor"in t)||"function"==typeof _&&_ instanceof _&&"function"==typeof x&&x instanceof x||(u=!1)}return n.delete(e),n.delete(t),u}var _equalObjects=equalObjects$1,getNative$3=_getNative,root$3=_root,DataView$1=getNative$3(root$3,"DataView"),_DataView=DataView$1,getNative$2=_getNative,root$2=_root,Promise$2=getNative$2(root$2,"Promise"),_Promise=Promise$2,getNative$1=_getNative,root$1=_root,Set$2=getNative$1(root$1,"Set"),_Set=Set$2,getNative=_getNative,root=_root,WeakMap$1=getNative(root,"WeakMap"),_WeakMap=WeakMap$1,DataView=_DataView,Map$1=_Map,Promise$1=_Promise,Set$1=_Set,WeakMap=_WeakMap,baseGetTag=_baseGetTag,toSource=_toSource,mapTag="[object Map]",objectTag$1="[object Object]",promiseTag="[object Promise]",setTag="[object Set]",weakMapTag="[object WeakMap]",dataViewTag="[object DataView]",dataViewCtorString=toSource(DataView),mapCtorString=toSource(Map$1),promiseCtorString=toSource(Promise$1),setCtorString=toSource(Set$1),weakMapCtorString=toSource(WeakMap),getTag$1=baseGetTag;(DataView&&getTag$1(new DataView(new ArrayBuffer(1)))!=dataViewTag||Map$1&&getTag$1(new Map$1)!=mapTag||Promise$1&&getTag$1(Promise$1.resolve())!=promiseTag||Set$1&&getTag$1(new Set$1)!=setTag||WeakMap&&getTag$1(new WeakMap)!=weakMapTag)&&(getTag$1=function(e){var t=baseGetTag(e),r=t==objectTag$1?e.constructor:void 0,i=r?toSource(r):"";if(i)switch(i){case dataViewCtorString:return dataViewTag;case mapCtorString:return mapTag;case promiseCtorString:return promiseTag;case setCtorString:return setTag;case weakMapCtorString:return weakMapTag}return t});var _getTag=getTag$1,Stack$1=_Stack,equalArrays=_equalArrays,equalByTag=_equalByTag,equalObjects=_equalObjects,getTag=_getTag,isArray$3=isArray_1,isBuffer=isBuffer$2.exports,isTypedArray=isTypedArray_1,COMPARE_PARTIAL_FLAG$2=1,argsTag="[object Arguments]",arrayTag="[object Array]",objectTag="[object Object]",objectProto=Object.prototype,hasOwnProperty$1=objectProto.hasOwnProperty;function baseIsEqualDeep$1(e,t,r,i,a,n){var s=isArray$3(e),o=isArray$3(t),l=s?arrayTag:getTag(e),p=o?arrayTag:getTag(t),c=(l=l==argsTag?objectTag:l)==objectTag,h=(p=p==argsTag?objectTag:p)==objectTag,d=l==p;if(d&&isBuffer(e)){if(!isBuffer(t))return!1;s=!0,c=!1}if(d&&!c)return n||(n=new Stack$1),s||isTypedArray(e)?equalArrays(e,t,r,i,a,n):equalByTag(e,t,l,r,i,a,n);if(!(r&COMPARE_PARTIAL_FLAG$2)){var u=c&&hasOwnProperty$1.call(e,"__wrapped__"),m=h&&hasOwnProperty$1.call(t,"__wrapped__");if(u||m){var f=u?e.value():e,y=m?t.value():t;return n||(n=new Stack$1),a(f,y,r,i,n)}}return!!d&&(n||(n=new Stack$1),equalObjects(e,t,r,i,a,n))}var _baseIsEqualDeep=baseIsEqualDeep$1,baseIsEqualDeep=_baseIsEqualDeep,isObjectLike=isObjectLike_1;function baseIsEqual$2(e,t,r,i,a){return e===t||(null==e||null==t||!isObjectLike(e)&&!isObjectLike(t)?e!=e&&t!=t:baseIsEqualDeep(e,t,r,i,baseIsEqual$2,a))}var _baseIsEqual=baseIsEqual$2,Stack=_Stack,baseIsEqual$1=_baseIsEqual,COMPARE_PARTIAL_FLAG$1=1,COMPARE_UNORDERED_FLAG$1=2;function baseIsMatch$1(e,t,r,i){var a=r.length,n=a,s=!i;if(null==e)return!n;for(e=Object(e);a--;){var o=r[a];if(s&&o[2]?o[1]!==e[o[0]]:!(o[0]in e))return!1}for(;++a<n;){var l=(o=r[a])[0],p=e[l],c=o[1];if(s&&o[2]){if(void 0===p&&!(l in e))return!1}else{var h=new Stack;if(i)var d=i(p,c,l,e,t,h);if(!(void 0===d?baseIsEqual$1(c,p,COMPARE_PARTIAL_FLAG$1|COMPARE_UNORDERED_FLAG$1,i,h):d))return!1}}return!0}var _baseIsMatch=baseIsMatch$1,isObject=isObject_1;function isStrictComparable$2(e){return e==e&&!isObject(e)}var _isStrictComparable=isStrictComparable$2,isStrictComparable$1=_isStrictComparable,keys$1=keys_1;function getMatchData$1(e){for(var t=keys$1(e),r=t.length;r--;){var i=t[r],a=e[i];t[r]=[i,a,isStrictComparable$1(a)]}return t}var _getMatchData=getMatchData$1;function matchesStrictComparable$2(e,t){return function(r){return null!=r&&(r[e]===t&&(void 0!==t||e in Object(r)))}}var _matchesStrictComparable=matchesStrictComparable$2,baseIsMatch=_baseIsMatch,getMatchData=_getMatchData,matchesStrictComparable$1=_matchesStrictComparable;function baseMatches$1(e){var t=getMatchData(e);return 1==t.length&&t[0][2]?matchesStrictComparable$1(t[0][0],t[0][1]):function(r){return r===e||baseIsMatch(r,e,t)}}var _baseMatches=baseMatches$1;function baseHasIn$1(e,t){return null!=e&&t in Object(e)}var _baseHasIn=baseHasIn$1,castPath=_castPath,isArguments=isArguments_1,isArray$2=isArray_1,isIndex=_isIndex,isLength=isLength_1,toKey$2=_toKey;function hasPath$1(e,t,r){for(var i=-1,a=(t=castPath(t,e)).length,n=!1;++i<a;){var s=toKey$2(t[i]);if(!(n=null!=e&&r(e,s)))break;e=e[s]}return n||++i!=a?n:!!(a=null==e?0:e.length)&&isLength(a)&&isIndex(s,a)&&(isArray$2(e)||isArguments(e))}var _hasPath=hasPath$1,baseHasIn=_baseHasIn,hasPath=_hasPath;function hasIn$1(e,t){return null!=e&&hasPath(e,t,baseHasIn)}var hasIn_1=hasIn$1,baseIsEqual=_baseIsEqual,get=get_1,hasIn=hasIn_1,isKey$1=_isKey,isStrictComparable=_isStrictComparable,matchesStrictComparable=_matchesStrictComparable,toKey$1=_toKey,COMPARE_PARTIAL_FLAG=1,COMPARE_UNORDERED_FLAG=2;function baseMatchesProperty$1(e,t){return isKey$1(e)&&isStrictComparable(t)?matchesStrictComparable(toKey$1(e),t):function(r){var i=get(r,e);return void 0===i&&i===t?hasIn(r,e):baseIsEqual(t,i,COMPARE_PARTIAL_FLAG|COMPARE_UNORDERED_FLAG)}}var _baseMatchesProperty=baseMatchesProperty$1;function identity$1(e){return e}var identity_1=identity$1;function baseProperty$1(e){return function(t){return null==t?void 0:t[e]}}var _baseProperty=baseProperty$1,baseGet=_baseGet;function basePropertyDeep$1(e){return function(t){return baseGet(t,e)}}var _basePropertyDeep=basePropertyDeep$1,baseProperty=_baseProperty,basePropertyDeep=_basePropertyDeep,isKey=_isKey,toKey=_toKey;function property$1(e){return isKey(e)?baseProperty(toKey(e)):basePropertyDeep(e)}var property_1=property$1,baseMatches=_baseMatches,baseMatchesProperty=_baseMatchesProperty,identity=identity_1,isArray$1=isArray_1,property=property_1;function baseIteratee$2(e){return"function"==typeof e?e:null==e?identity:"object"==typeof e?isArray$1(e)?baseMatchesProperty(e[0],e[1]):baseMatches(e):property(e)}var _baseIteratee=baseIteratee$2,toNumber=toNumber_1,INFINITY=1/0,MAX_INTEGER=17976931348623157e292;function toFinite$1(e){return e?(e=toNumber(e))===INFINITY||e===-INFINITY?(e<0?-1:1)*MAX_INTEGER:e==e?e:0:0===e?e:0}var toFinite_1=toFinite$1,toFinite=toFinite_1;function toInteger$1(e){var t=toFinite(e),r=t%1;return t==t?r?t-r:t:0}var toInteger_1=toInteger$1,baseFindIndex=_baseFindIndex,baseIteratee$1=_baseIteratee,toInteger=toInteger_1,nativeMax=Math.max;function findIndex(e,t,r){var i=null==e?0:e.length;if(!i)return-1;var a=null==r?0:toInteger(r);return a<0&&(a=nativeMax(i+a,0)),baseFindIndex(e,baseIteratee$1(t),a)}var findIndex_1=findIndex;const Container$7=styled(animated.div)`
2002
+ `;var ListCache$2=_ListCache;function stackClear$1(){this.__data__=new ListCache$2,this.size=0}var _stackClear=stackClear$1;function stackDelete$1(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r}var _stackDelete=stackDelete$1;function stackGet$1(e){return this.__data__.get(e)}var _stackGet=stackGet$1;function stackHas$1(e){return this.__data__.has(e)}var _stackHas=stackHas$1,ListCache$1=_ListCache,Map$2=_Map,MapCache$1=_MapCache,LARGE_ARRAY_SIZE=200;function stackSet$1(e,t){var r=this.__data__;if(r instanceof ListCache$1){var i=r.__data__;if(!Map$2||i.length<LARGE_ARRAY_SIZE-1)return i.push([e,t]),this.size=++r.size,this;r=this.__data__=new MapCache$1(i)}return r.set(e,t),this.size=r.size,this}var _stackSet=stackSet$1,ListCache=_ListCache,stackClear=_stackClear,stackDelete=_stackDelete,stackGet=_stackGet,stackHas=_stackHas,stackSet=_stackSet;function Stack$2(e){var t=this.__data__=new ListCache(e);this.size=t.size}Stack$2.prototype.clear=stackClear,Stack$2.prototype.delete=stackDelete,Stack$2.prototype.get=stackGet,Stack$2.prototype.has=stackHas,Stack$2.prototype.set=stackSet;var _Stack=Stack$2,HASH_UNDEFINED="__lodash_hash_undefined__";function setCacheAdd$1(e){return this.__data__.set(e,HASH_UNDEFINED),this}var _setCacheAdd=setCacheAdd$1;function setCacheHas$1(e){return this.__data__.has(e)}var _setCacheHas=setCacheHas$1,MapCache=_MapCache,setCacheAdd=_setCacheAdd,setCacheHas=_setCacheHas;function SetCache$1(e){var t=-1,r=null==e?0:e.length;for(this.__data__=new MapCache;++t<r;)this.add(e[t])}SetCache$1.prototype.add=SetCache$1.prototype.push=setCacheAdd,SetCache$1.prototype.has=setCacheHas;var _SetCache=SetCache$1;function arraySome$1(e,t){for(var r=-1,i=null==e?0:e.length;++r<i;)if(t(e[r],r,e))return!0;return!1}var _arraySome=arraySome$1;function cacheHas$1(e,t){return e.has(t)}var _cacheHas=cacheHas$1,SetCache=_SetCache,arraySome=_arraySome,cacheHas=_cacheHas,COMPARE_PARTIAL_FLAG$5=1,COMPARE_UNORDERED_FLAG$3=2;function equalArrays$2(e,t,r,i,a,n){var s=r&COMPARE_PARTIAL_FLAG$5,o=e.length,l=t.length;if(o!=l&&!(s&&l>o))return!1;var p=n.get(e),c=n.get(t);if(p&&c)return p==t&&c==e;var h=-1,d=!0,u=r&COMPARE_UNORDERED_FLAG$3?new SetCache:void 0;for(n.set(e,t),n.set(t,e);++h<o;){var m=e[h],f=t[h];if(i)var y=s?i(f,m,h,t,e,n):i(m,f,h,e,t,n);if(void 0!==y){if(y)continue;d=!1;break}if(u){if(!arraySome(t,(function(e,t){if(!cacheHas(u,t)&&(m===e||a(m,e,r,i,n)))return u.push(t)}))){d=!1;break}}else if(m!==f&&!a(m,f,r,i,n)){d=!1;break}}return n.delete(e),n.delete(t),d}var _equalArrays=equalArrays$2,root$4=_root,Uint8Array$2=root$4.Uint8Array,_Uint8Array=Uint8Array$2;function mapToArray$1(e){var t=-1,r=Array(e.size);return e.forEach((function(e,i){r[++t]=[i,e]})),r}var _mapToArray=mapToArray$1;function setToArray$1(e){var t=-1,r=Array(e.size);return e.forEach((function(e){r[++t]=e})),r}var _setToArray=setToArray$1,Symbol$1=_Symbol,Uint8Array$1=_Uint8Array,eq=eq_1,equalArrays$1=_equalArrays,mapToArray=_mapToArray,setToArray=_setToArray,COMPARE_PARTIAL_FLAG$4=1,COMPARE_UNORDERED_FLAG$2=2,boolTag$1="[object Boolean]",dateTag$1="[object Date]",errorTag$1="[object Error]",mapTag$2="[object Map]",numberTag$1="[object Number]",regexpTag$1="[object RegExp]",setTag$2="[object Set]",stringTag$1="[object String]",symbolTag="[object Symbol]",arrayBufferTag$1="[object ArrayBuffer]",dataViewTag$2="[object DataView]",symbolProto=Symbol$1?Symbol$1.prototype:void 0,symbolValueOf=symbolProto?symbolProto.valueOf:void 0;function equalByTag$1(e,t,r,i,a,n,s){switch(r){case dataViewTag$2:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case arrayBufferTag$1:return!(e.byteLength!=t.byteLength||!n(new Uint8Array$1(e),new Uint8Array$1(t)));case boolTag$1:case dateTag$1:case numberTag$1:return eq(+e,+t);case errorTag$1:return e.name==t.name&&e.message==t.message;case regexpTag$1:case stringTag$1:return e==t+"";case mapTag$2:var o=mapToArray;case setTag$2:var l=i&COMPARE_PARTIAL_FLAG$4;if(o||(o=setToArray),e.size!=t.size&&!l)return!1;var p=s.get(e);if(p)return p==t;i|=COMPARE_UNORDERED_FLAG$2,s.set(e,t);var c=equalArrays$1(o(e),o(t),i,a,n,s);return s.delete(e),c;case symbolTag:if(symbolValueOf)return symbolValueOf.call(e)==symbolValueOf.call(t)}return!1}var _equalByTag=equalByTag$1;function arrayPush$2(e,t){for(var r=-1,i=t.length,a=e.length;++r<i;)e[a+r]=t[r];return e}var _arrayPush=arrayPush$2,arrayPush$1=_arrayPush,isArray$5=isArray_1;function baseGetAllKeys$1(e,t,r){var i=t(e);return isArray$5(e)?i:arrayPush$1(i,r(e))}var _baseGetAllKeys=baseGetAllKeys$1;function arrayFilter$1(e,t){for(var r=-1,i=null==e?0:e.length,a=0,n=[];++r<i;){var s=e[r];t(s,r,e)&&(n[a++]=s)}return n}var _arrayFilter=arrayFilter$1;function stubArray$1(){return[]}var stubArray_1=stubArray$1,arrayFilter=_arrayFilter,stubArray=stubArray_1,objectProto$6=Object.prototype,propertyIsEnumerable$1=objectProto$6.propertyIsEnumerable,nativeGetSymbols=Object.getOwnPropertySymbols,getSymbols$1=nativeGetSymbols?function(e){return null==e?[]:(e=Object(e),arrayFilter(nativeGetSymbols(e),(function(t){return propertyIsEnumerable$1.call(e,t)})))}:stubArray,_getSymbols=getSymbols$1;function baseTimes$1(e,t){for(var r=-1,i=Array(e);++r<e;)i[r]=t(r);return i}var _baseTimes=baseTimes$1,baseGetTag$2=_baseGetTag,isObjectLike$3=isObjectLike_1,argsTag$2="[object Arguments]";function baseIsArguments$1(e){return isObjectLike$3(e)&&baseGetTag$2(e)==argsTag$2}var _baseIsArguments=baseIsArguments$1,baseIsArguments=_baseIsArguments,isObjectLike$2=isObjectLike_1,objectProto$5=Object.prototype,hasOwnProperty$5=objectProto$5.hasOwnProperty,propertyIsEnumerable=objectProto$5.propertyIsEnumerable,isArguments$2=baseIsArguments(function(){return arguments}())?baseIsArguments:function(e){return isObjectLike$2(e)&&hasOwnProperty$5.call(e,"callee")&&!propertyIsEnumerable.call(e,"callee")},isArguments_1=isArguments$2,isBuffer$2={exports:{}};function stubFalse(){return!1}var stubFalse_1=stubFalse;!function(e,t){var r=_root,i=stubFalse_1,a=t&&!t.nodeType&&t,n=a&&e&&!e.nodeType&&e,s=n&&n.exports===a?r.Buffer:void 0,o=(s?s.isBuffer:void 0)||i;e.exports=o}(isBuffer$2,isBuffer$2.exports);var MAX_SAFE_INTEGER$1=9007199254740991,reIsUint=/^(?:0|[1-9]\d*)$/;function isIndex$2(e,t){var r=typeof e;return!!(t=null==t?MAX_SAFE_INTEGER$1:t)&&("number"==r||"symbol"!=r&&reIsUint.test(e))&&e>-1&&e%1==0&&e<t}var _isIndex=isIndex$2,MAX_SAFE_INTEGER=9007199254740991;function isLength$3(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=MAX_SAFE_INTEGER}var isLength_1=isLength$3,baseGetTag$1=_baseGetTag,isLength$2=isLength_1,isObjectLike$1=isObjectLike_1,argsTag$1="[object Arguments]",arrayTag$1="[object Array]",boolTag="[object Boolean]",dateTag="[object Date]",errorTag="[object Error]",funcTag="[object Function]",mapTag$1="[object Map]",numberTag="[object Number]",objectTag$2="[object Object]",regexpTag="[object RegExp]",setTag$1="[object Set]",stringTag="[object String]",weakMapTag$1="[object WeakMap]",arrayBufferTag="[object ArrayBuffer]",dataViewTag$1="[object DataView]",float32Tag="[object Float32Array]",float64Tag="[object Float64Array]",int8Tag="[object Int8Array]",int16Tag="[object Int16Array]",int32Tag="[object Int32Array]",uint8Tag="[object Uint8Array]",uint8ClampedTag="[object Uint8ClampedArray]",uint16Tag="[object Uint16Array]",uint32Tag="[object Uint32Array]",typedArrayTags={};function baseIsTypedArray$1(e){return isObjectLike$1(e)&&isLength$2(e.length)&&!!typedArrayTags[baseGetTag$1(e)]}typedArrayTags[float32Tag]=typedArrayTags[float64Tag]=typedArrayTags[int8Tag]=typedArrayTags[int16Tag]=typedArrayTags[int32Tag]=typedArrayTags[uint8Tag]=typedArrayTags[uint8ClampedTag]=typedArrayTags[uint16Tag]=typedArrayTags[uint32Tag]=!0,typedArrayTags[argsTag$1]=typedArrayTags[arrayTag$1]=typedArrayTags[arrayBufferTag]=typedArrayTags[boolTag]=typedArrayTags[dataViewTag$1]=typedArrayTags[dateTag]=typedArrayTags[errorTag]=typedArrayTags[funcTag]=typedArrayTags[mapTag$1]=typedArrayTags[numberTag]=typedArrayTags[objectTag$2]=typedArrayTags[regexpTag]=typedArrayTags[setTag$1]=typedArrayTags[stringTag]=typedArrayTags[weakMapTag$1]=!1;var _baseIsTypedArray=baseIsTypedArray$1;function baseUnary$1(e){return function(t){return e(t)}}var _baseUnary=baseUnary$1,_nodeUtil={exports:{}};!function(e,t){var r=_freeGlobal,i=t&&!t.nodeType&&t,a=i&&e&&!e.nodeType&&e,n=a&&a.exports===i&&r.process,s=function(){try{var e=a&&a.require&&a.require("util").types;return e||n&&n.binding&&n.binding("util")}catch(e){}}();e.exports=s}(_nodeUtil,_nodeUtil.exports);var baseIsTypedArray=_baseIsTypedArray,baseUnary=_baseUnary,nodeUtil=_nodeUtil.exports,nodeIsTypedArray=nodeUtil&&nodeUtil.isTypedArray,isTypedArray$2=nodeIsTypedArray?baseUnary(nodeIsTypedArray):baseIsTypedArray,isTypedArray_1=isTypedArray$2,baseTimes=_baseTimes,isArguments$1=isArguments_1,isArray$4=isArray_1,isBuffer$1=isBuffer$2.exports,isIndex$1=_isIndex,isTypedArray$1=isTypedArray_1,objectProto$4=Object.prototype,hasOwnProperty$4=objectProto$4.hasOwnProperty;function arrayLikeKeys$1(e,t){var r=isArray$4(e),i=!r&&isArguments$1(e),a=!r&&!i&&isBuffer$1(e),n=!r&&!i&&!a&&isTypedArray$1(e),s=r||i||a||n,o=s?baseTimes(e.length,String):[],l=o.length;for(var p in e)!t&&!hasOwnProperty$4.call(e,p)||s&&("length"==p||a&&("offset"==p||"parent"==p)||n&&("buffer"==p||"byteLength"==p||"byteOffset"==p)||isIndex$1(p,l))||o.push(p);return o}var _arrayLikeKeys=arrayLikeKeys$1,objectProto$3=Object.prototype;function isPrototype$1(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||objectProto$3)}var _isPrototype=isPrototype$1;function overArg$1(e,t){return function(r){return e(t(r))}}var _overArg=overArg$1,overArg=_overArg,nativeKeys$1=overArg(Object.keys,Object),_nativeKeys=nativeKeys$1,isPrototype=_isPrototype,nativeKeys=_nativeKeys,objectProto$2=Object.prototype,hasOwnProperty$3=objectProto$2.hasOwnProperty;function baseKeys$1(e){if(!isPrototype(e))return nativeKeys(e);var t=[];for(var r in Object(e))hasOwnProperty$3.call(e,r)&&"constructor"!=r&&t.push(r);return t}var _baseKeys=baseKeys$1,isFunction=isFunction_1,isLength$1=isLength_1;function isArrayLike$3(e){return null!=e&&isLength$1(e.length)&&!isFunction(e)}var isArrayLike_1=isArrayLike$3,arrayLikeKeys=_arrayLikeKeys,baseKeys=_baseKeys,isArrayLike$2=isArrayLike_1;function keys$4(e){return isArrayLike$2(e)?arrayLikeKeys(e):baseKeys(e)}var keys_1=keys$4,baseGetAllKeys=_baseGetAllKeys,getSymbols=_getSymbols,keys$3=keys_1;function getAllKeys$1(e){return baseGetAllKeys(e,keys$3,getSymbols)}var _getAllKeys=getAllKeys$1,getAllKeys=_getAllKeys,COMPARE_PARTIAL_FLAG$3=1,objectProto$1=Object.prototype,hasOwnProperty$2=objectProto$1.hasOwnProperty;function equalObjects$1(e,t,r,i,a,n){var s=r&COMPARE_PARTIAL_FLAG$3,o=getAllKeys(e),l=o.length;if(l!=getAllKeys(t).length&&!s)return!1;for(var p=l;p--;){var c=o[p];if(!(s?c in t:hasOwnProperty$2.call(t,c)))return!1}var h=n.get(e),d=n.get(t);if(h&&d)return h==t&&d==e;var u=!0;n.set(e,t),n.set(t,e);for(var m=s;++p<l;){var f=e[c=o[p]],y=t[c];if(i)var g=s?i(y,f,c,t,e,n):i(f,y,c,e,t,n);if(!(void 0===g?f===y||a(f,y,r,i,n):g)){u=!1;break}m||(m="constructor"==c)}if(u&&!m){var _=e.constructor,x=t.constructor;_==x||!("constructor"in e)||!("constructor"in t)||"function"==typeof _&&_ instanceof _&&"function"==typeof x&&x instanceof x||(u=!1)}return n.delete(e),n.delete(t),u}var _equalObjects=equalObjects$1,getNative$3=_getNative,root$3=_root,DataView$1=getNative$3(root$3,"DataView"),_DataView=DataView$1,getNative$2=_getNative,root$2=_root,Promise$2=getNative$2(root$2,"Promise"),_Promise=Promise$2,getNative$1=_getNative,root$1=_root,Set$2=getNative$1(root$1,"Set"),_Set=Set$2,getNative=_getNative,root=_root,WeakMap$1=getNative(root,"WeakMap"),_WeakMap=WeakMap$1,DataView=_DataView,Map$1=_Map,Promise$1=_Promise,Set$1=_Set,WeakMap=_WeakMap,baseGetTag=_baseGetTag,toSource=_toSource,mapTag="[object Map]",objectTag$1="[object Object]",promiseTag="[object Promise]",setTag="[object Set]",weakMapTag="[object WeakMap]",dataViewTag="[object DataView]",dataViewCtorString=toSource(DataView),mapCtorString=toSource(Map$1),promiseCtorString=toSource(Promise$1),setCtorString=toSource(Set$1),weakMapCtorString=toSource(WeakMap),getTag$1=baseGetTag;(DataView&&getTag$1(new DataView(new ArrayBuffer(1)))!=dataViewTag||Map$1&&getTag$1(new Map$1)!=mapTag||Promise$1&&getTag$1(Promise$1.resolve())!=promiseTag||Set$1&&getTag$1(new Set$1)!=setTag||WeakMap&&getTag$1(new WeakMap)!=weakMapTag)&&(getTag$1=function(e){var t=baseGetTag(e),r=t==objectTag$1?e.constructor:void 0,i=r?toSource(r):"";if(i)switch(i){case dataViewCtorString:return dataViewTag;case mapCtorString:return mapTag;case promiseCtorString:return promiseTag;case setCtorString:return setTag;case weakMapCtorString:return weakMapTag}return t});var _getTag=getTag$1,Stack$1=_Stack,equalArrays=_equalArrays,equalByTag=_equalByTag,equalObjects=_equalObjects,getTag=_getTag,isArray$3=isArray_1,isBuffer=isBuffer$2.exports,isTypedArray=isTypedArray_1,COMPARE_PARTIAL_FLAG$2=1,argsTag="[object Arguments]",arrayTag="[object Array]",objectTag="[object Object]",objectProto=Object.prototype,hasOwnProperty$1=objectProto.hasOwnProperty;function baseIsEqualDeep$1(e,t,r,i,a,n){var s=isArray$3(e),o=isArray$3(t),l=s?arrayTag:getTag(e),p=o?arrayTag:getTag(t),c=(l=l==argsTag?objectTag:l)==objectTag,h=(p=p==argsTag?objectTag:p)==objectTag,d=l==p;if(d&&isBuffer(e)){if(!isBuffer(t))return!1;s=!0,c=!1}if(d&&!c)return n||(n=new Stack$1),s||isTypedArray(e)?equalArrays(e,t,r,i,a,n):equalByTag(e,t,l,r,i,a,n);if(!(r&COMPARE_PARTIAL_FLAG$2)){var u=c&&hasOwnProperty$1.call(e,"__wrapped__"),m=h&&hasOwnProperty$1.call(t,"__wrapped__");if(u||m){var f=u?e.value():e,y=m?t.value():t;return n||(n=new Stack$1),a(f,y,r,i,n)}}return!!d&&(n||(n=new Stack$1),equalObjects(e,t,r,i,a,n))}var _baseIsEqualDeep=baseIsEqualDeep$1,baseIsEqualDeep=_baseIsEqualDeep,isObjectLike=isObjectLike_1;function baseIsEqual$3(e,t,r,i,a){return e===t||(null==e||null==t||!isObjectLike(e)&&!isObjectLike(t)?e!=e&&t!=t:baseIsEqualDeep(e,t,r,i,baseIsEqual$3,a))}var _baseIsEqual=baseIsEqual$3,Stack=_Stack,baseIsEqual$2=_baseIsEqual,COMPARE_PARTIAL_FLAG$1=1,COMPARE_UNORDERED_FLAG$1=2;function baseIsMatch$1(e,t,r,i){var a=r.length,n=a,s=!i;if(null==e)return!n;for(e=Object(e);a--;){var o=r[a];if(s&&o[2]?o[1]!==e[o[0]]:!(o[0]in e))return!1}for(;++a<n;){var l=(o=r[a])[0],p=e[l],c=o[1];if(s&&o[2]){if(void 0===p&&!(l in e))return!1}else{var h=new Stack;if(i)var d=i(p,c,l,e,t,h);if(!(void 0===d?baseIsEqual$2(c,p,COMPARE_PARTIAL_FLAG$1|COMPARE_UNORDERED_FLAG$1,i,h):d))return!1}}return!0}var _baseIsMatch=baseIsMatch$1,isObject=isObject_1;function isStrictComparable$2(e){return e==e&&!isObject(e)}var _isStrictComparable=isStrictComparable$2,isStrictComparable$1=_isStrictComparable,keys$2=keys_1;function getMatchData$1(e){for(var t=keys$2(e),r=t.length;r--;){var i=t[r],a=e[i];t[r]=[i,a,isStrictComparable$1(a)]}return t}var _getMatchData=getMatchData$1;function matchesStrictComparable$2(e,t){return function(r){return null!=r&&(r[e]===t&&(void 0!==t||e in Object(r)))}}var _matchesStrictComparable=matchesStrictComparable$2,baseIsMatch=_baseIsMatch,getMatchData=_getMatchData,matchesStrictComparable$1=_matchesStrictComparable;function baseMatches$1(e){var t=getMatchData(e);return 1==t.length&&t[0][2]?matchesStrictComparable$1(t[0][0],t[0][1]):function(r){return r===e||baseIsMatch(r,e,t)}}var _baseMatches=baseMatches$1;function baseHasIn$1(e,t){return null!=e&&t in Object(e)}var _baseHasIn=baseHasIn$1,castPath=_castPath,isArguments=isArguments_1,isArray$2=isArray_1,isIndex=_isIndex,isLength=isLength_1,toKey$2=_toKey;function hasPath$1(e,t,r){for(var i=-1,a=(t=castPath(t,e)).length,n=!1;++i<a;){var s=toKey$2(t[i]);if(!(n=null!=e&&r(e,s)))break;e=e[s]}return n||++i!=a?n:!!(a=null==e?0:e.length)&&isLength(a)&&isIndex(s,a)&&(isArray$2(e)||isArguments(e))}var _hasPath=hasPath$1,baseHasIn=_baseHasIn,hasPath=_hasPath;function hasIn$1(e,t){return null!=e&&hasPath(e,t,baseHasIn)}var hasIn_1=hasIn$1,baseIsEqual$1=_baseIsEqual,get=get_1,hasIn=hasIn_1,isKey$1=_isKey,isStrictComparable=_isStrictComparable,matchesStrictComparable=_matchesStrictComparable,toKey$1=_toKey,COMPARE_PARTIAL_FLAG=1,COMPARE_UNORDERED_FLAG=2;function baseMatchesProperty$1(e,t){return isKey$1(e)&&isStrictComparable(t)?matchesStrictComparable(toKey$1(e),t):function(r){var i=get(r,e);return void 0===i&&i===t?hasIn(r,e):baseIsEqual$1(t,i,COMPARE_PARTIAL_FLAG|COMPARE_UNORDERED_FLAG)}}var _baseMatchesProperty=baseMatchesProperty$1;function identity$1(e){return e}var identity_1=identity$1;function baseProperty$1(e){return function(t){return null==t?void 0:t[e]}}var _baseProperty=baseProperty$1,baseGet=_baseGet;function basePropertyDeep$1(e){return function(t){return baseGet(t,e)}}var _basePropertyDeep=basePropertyDeep$1,baseProperty=_baseProperty,basePropertyDeep=_basePropertyDeep,isKey=_isKey,toKey=_toKey;function property$1(e){return isKey(e)?baseProperty(toKey(e)):basePropertyDeep(e)}var property_1=property$1,baseMatches=_baseMatches,baseMatchesProperty=_baseMatchesProperty,identity=identity_1,isArray$1=isArray_1,property=property_1;function baseIteratee$3(e){return"function"==typeof e?e:null==e?identity:"object"==typeof e?isArray$1(e)?baseMatchesProperty(e[0],e[1]):baseMatches(e):property(e)}var _baseIteratee=baseIteratee$3,baseIteratee$2=_baseIteratee,isArrayLike$1=isArrayLike_1,keys$1=keys_1;function createFind$1(e){return function(t,r,i){var a=Object(t);if(!isArrayLike$1(t)){var n=baseIteratee$2(r);t=keys$1(t),r=function(e){return n(a[e],e,a)}}var s=e(t,r,i);return s>-1?a[n?t[s]:s]:void 0}}var _createFind=createFind$1;function baseFindIndex$1(e,t,r,i){for(var a=e.length,n=r+(i?1:-1);i?n--:++n<a;)if(t(e[n],n,e))return n;return-1}var _baseFindIndex=baseFindIndex$1,toNumber=toNumber_1,INFINITY=1/0,MAX_INTEGER=17976931348623157e292;function toFinite$1(e){return e?(e=toNumber(e))===INFINITY||e===-INFINITY?(e<0?-1:1)*MAX_INTEGER:e==e?e:0:0===e?e:0}var toFinite_1=toFinite$1,toFinite=toFinite_1;function toInteger$1(e){var t=toFinite(e),r=t%1;return t==t?r?t-r:t:0}var toInteger_1=toInteger$1,baseFindIndex=_baseFindIndex,baseIteratee$1=_baseIteratee,toInteger=toInteger_1,nativeMax=Math.max;function findIndex$1(e,t,r){var i=null==e?0:e.length;if(!i)return-1;var a=null==r?0:toInteger(r);return a<0&&(a=nativeMax(i+a,0)),baseFindIndex(e,baseIteratee$1(t),a)}var findIndex_1=findIndex$1,createFind=_createFind,findIndex=findIndex_1,find=createFind(findIndex),find_1=find,baseIsEqual=_baseIsEqual;function isEqual(e,t){return baseIsEqual(e,t)}var isEqual_1=isEqual;const Container$7=styled(animated.div)`
2003
2003
  overflow: hidden;
2004
2004
  box-shadow: 0 4px 5px 0 rgba(0, 0, 0, 0.2);
2005
2005
  `,List=styled.ul`
@@ -2177,7 +2177,7 @@ var t=Object.getOwnPropertySymbols,r=Object.prototype.hasOwnProperty,i=Object.pr
2177
2177
  height: 1.375rem;
2178
2178
  width: 1.375rem;
2179
2179
  color: ${Color.Neutral[3]};
2180
- `,Component$4=(e,t)=>{const{onClear:r,...i}=e;return jsxs(Container$6,{children:[jsx(SearchIcon,{}),jsx(SearchInput,{ref:t,...i}),i.value&&jsx(CancelButton,{"aria-label":"Clear search",focusOutline:"browser",onClick:r,children:jsx(CancelIcon,{})})]},"search")},DropdownSearch=forwardRef(Component$4),DropdownList=({listItems:e,listExtractor:t,valueExtractor:r,onSelectItem:i,listStyleWidth:a,visible:n,enableSearch:s,searchPlaceholder:o="Search",onSearch:l,searchFunction:p,onDismiss:c,multiSelect:h,selectedItems:d,onSelectAll:u,onRetry:m,itemsLoadState:f="success",itemTruncationType:y="end",renderListItem:g,onBlur:_,...x})=>{const[b,v]=useState(0),[C,S]=useState(""),[$,w]=useState(e),[T,k]=useState(0),E=useSpring({height:T}),A=useRef(),P=useRef(),M=useRef([]),I=useRef(),D=useRef(b),F=useRef($),R=e=>{D.current=e,v(e)},j=e=>{F.current=e,w(e)};useEffect((()=>(document.addEventListener("keydown",H),()=>{document.removeEventListener("keydown",H)})),[]),useEffect((()=>{N(C)}),[C]),useEffect((()=>{S(""),n?(k(V()),I&&I.current?(I.current.focus(),R(-1)):M.current[b]&&M.current[b].focus()):k(0)}),[n]),useEffect((()=>{if(n){const e=V();k(e)}}),[$]),useEffect((()=>{j(e),S(""),R(0)}),[e]);const L=e=>t?t(e):e.toString(),B=e=>{const r=t?t(e):e.toString();let i=0;return P&&P.current&&(i=P.current.getBoundingClientRect().width-100),StringHelper.shouldTruncateToTwoLines("string"==typeof r?r:r.title,i)},O=e=>findIndex_1(d,e)>-1,N=t=>{if(""===t)j(e);else if(p){const e=p(t);j(e)}else{const r=e.filter((e=>{const r=L(e),i="object"==typeof r?r.title.toLowerCase():r.toLowerCase();return"object"==typeof r&&r.secondaryLabel?i.includes(t.trim().toLowerCase())||r.secondaryLabel.includes(t.trim().toLowerCase()):i.includes(t.trim().toLowerCase())}));j(r)}},V=()=>P&&P.current?P.current.getBoundingClientRect().height:0,H=e=>{if(A&&A.current.contains(e.target))switch(e.code){case"ArrowDown":if(D.current<F.current.length-1){const e=D.current+1;M.current[e].focus(),R(e)}break;case"ArrowUp":if(D.current>0){const e=D.current-1;M.current[e].focus(),R(D.current-1)}break;case"Escape":c&&c()}},z=(e,t)=>{e.preventDefault(),i&&i(t,(e=>r?r(e):e)(t))},G=e=>{const t=e.target.value;S(t),l&&l()},W=()=>{S(""),l&&l()},U=()=>{m&&m()},q=()=>{_&&_()},Y=e=>{const t=L(e),r="string"==typeof t?t:t.title;return jsxs(TruncateContainer,{"data-testid":"truncate-middle-container",children:[jsx(TruncateFirstLine,{children:r}),jsxs(TruncateSecondLine,{children:[" ",r]})]})},Q=e=>{const t=L(e);return"string"==typeof t?jsx(Fragment,{children:t}):jsxs(Fragment,{children:[t.title,t.secondaryLabel&&jsx(SecondaryLabel,{children:t.secondaryLabel})]})},K=()=>{if(!m||m&&"success"===f)return $.map(((e,t)=>jsx(ListItem,{checked:O(e)&&!h,children:jsxs(ListItemSelector,{onClick:t=>{z(t,e)},ref:e=>M.current[t]=e,"data-testid":"list-item",type:"button",tabIndex:n?0:-1,multiSelect:h,onBlur:q,children:[h&&jsx(ListCheckbox,{checked:O(e),displaySize:"small"}),g?g(e,{selected:O(e)}):jsx(Label,{truncateType:y,children:"middle"===y&&B(e)?Y(e):Q(e)})]})},((e,t)=>`item_${t}__${r?r(e):e}`)(e,t))))},Z=()=>{if(h&&$.length>0&&!C&&"success"===f)return jsx(SelectAllContainer,{children:jsx(DropdownCommonButton,{onClick:u,children:0===d.length?"Select all":"Unselect all"})},"selectAll")},X=()=>{if(C&&0===$.length)return jsxs(ResultStateContainer,{"data-testid":"list-no-results",children:[jsx(LabelIcon,{"data-testid":"no-result-icon"}),jsx(ResultStateText,{children:"No results found."})]},"noResults")},J=()=>{if(m&&"loading"===f)return jsxs(ResultStateContainer,{"data-testid":"list-loading",children:[jsx(Spinner,{$buttonStyle:"secondary",size:24}),jsx(ResultStateText,{children:"Loading..."})]},"loading")},ee=()=>{if(m&&"fail"===f)return jsxs(ResultStateContainer,{"data-testid":"list-fail",children:[jsx(LabelIcon,{"data-testid":"load-error-icon"}),jsx(ResultStateText,{children:"Failed to load."}),jsx(DropdownCommonButton,{onClick:U,children:"Try again."})]},"noResults")};return jsx(Container$7,{style:E,"data-testid":n?"dropdown-container":"dropdown-container-hidden",ref:A,children:(()=>{if(n)return jsxs(List,{ref:P,"data-testid":"dropdown-list",width:a,role:"list",...x,children:[(s||p)&&"success"===f?jsx(DropdownSearch,{ref:I,onChange:G,value:C,placeholder:o,"data-testid":"search-input","aria-label":"search-input",tabIndex:n?0:-1,onClear:W}):null,Z(),X(),J(),ee(),K()]})})()})},BORDER_RADIUS$1="4px",Wrapper$d=styled.div`
2180
+ `,Component$4=(e,t)=>{const{onClear:r,...i}=e;return jsxs(Container$6,{children:[jsx(SearchIcon,{}),jsx(SearchInput,{ref:t,...i}),i.value&&jsx(CancelButton,{"aria-label":"Clear search",focusOutline:"browser",onClick:r,children:jsx(CancelIcon,{})})]},"search")},DropdownSearch=forwardRef(Component$4),DropdownList=({listItems:e,listExtractor:t,valueExtractor:r,onSelectItem:i,listStyleWidth:a,visible:n,enableSearch:s,searchPlaceholder:o="Search",onSearch:l,searchFunction:p,onDismiss:c,multiSelect:h,selectedItems:d,onSelectAll:u,onRetry:m,itemsLoadState:f="success",itemTruncationType:y="end",renderListItem:g,onBlur:_,...x})=>{const[b,v]=useState(0),[C,S]=useState(""),[$,w]=useState(e),[T,k]=useState(0),E=useSpring({height:T}),A=useRef(),P=useRef(),M=useRef([]),I=useRef(),D=useRef(b),F=useRef($),R=e=>{D.current=e,v(e)},j=e=>{F.current=e,w(e)};useEffect((()=>(document.addEventListener("keydown",H),()=>{document.removeEventListener("keydown",H)})),[]),useEffect((()=>{N(C)}),[C]),useEffect((()=>{S(""),n?(k(V()),I&&I.current?(I.current.focus(),R(-1)):M.current[b]&&M.current[b].focus()):k(0)}),[n]),useEffect((()=>{if(n){const e=V();k(e)}}),[$]),useEffect((()=>{j(e),S(""),R(0)}),[e]);const L=e=>t?t(e):e.toString(),B=e=>{const r=t?t(e):e.toString();let i=0;return P&&P.current&&(i=P.current.getBoundingClientRect().width-100),StringHelper.shouldTruncateToTwoLines("string"==typeof r?r:r.title,i)},O=e=>!!find_1(d,(t=>isEqual_1(t,e))),N=t=>{if(""===t)j(e);else if(p){const e=p(t);j(e)}else{const r=e.filter((e=>{const r=L(e),i="object"==typeof r?r.title.toLowerCase():r.toLowerCase();return"object"==typeof r&&r.secondaryLabel?i.includes(t.trim().toLowerCase())||r.secondaryLabel.includes(t.trim().toLowerCase()):i.includes(t.trim().toLowerCase())}));j(r)}},V=()=>P&&P.current?P.current.getBoundingClientRect().height:0,H=e=>{if(A&&A.current.contains(e.target))switch(e.code){case"ArrowDown":if(D.current<F.current.length-1){const e=D.current+1;M.current[e].focus(),R(e)}break;case"ArrowUp":if(D.current>0){const e=D.current-1;M.current[e].focus(),R(D.current-1)}break;case"Escape":c&&c()}},z=(e,t)=>{e.preventDefault(),i&&i(t,(e=>r?r(e):e)(t))},G=e=>{const t=e.target.value;S(t),l&&l()},W=()=>{S(""),l&&l()},U=()=>{m&&m()},q=()=>{_&&_()},Y=e=>{const t=L(e),r="string"==typeof t?t:t.title;return jsxs(TruncateContainer,{"data-testid":"truncate-middle-container",children:[jsx(TruncateFirstLine,{children:r}),jsxs(TruncateSecondLine,{children:[" ",r]})]})},Q=e=>{const t=L(e);return"string"==typeof t?jsx(Fragment,{children:t}):jsxs(Fragment,{children:[t.title,t.secondaryLabel&&jsx(SecondaryLabel,{children:t.secondaryLabel})]})},K=()=>{if(!m||m&&"success"===f)return $.map(((e,t)=>jsx(ListItem,{checked:O(e)&&!h,children:jsxs(ListItemSelector,{onClick:t=>{z(t,e)},ref:e=>M.current[t]=e,"data-testid":"list-item",type:"button",tabIndex:n?0:-1,multiSelect:h,onBlur:q,children:[h&&jsx(ListCheckbox,{checked:O(e),displaySize:"small"}),g?g(e,{selected:O(e)}):jsx(Label,{truncateType:y,children:"middle"===y&&B(e)?Y(e):Q(e)})]})},((e,t)=>`item_${t}__${r?r(e):e}`)(e,t))))},Z=()=>{if(h&&$.length>0&&!C&&"success"===f)return jsx(SelectAllContainer,{children:jsx(DropdownCommonButton,{onClick:u,children:0===d.length?"Select all":"Unselect all"})},"selectAll")},X=()=>{if(C&&0===$.length)return jsxs(ResultStateContainer,{"data-testid":"list-no-results",children:[jsx(LabelIcon,{"data-testid":"no-result-icon"}),jsx(ResultStateText,{children:"No results found."})]},"noResults")},J=()=>{if(m&&"loading"===f)return jsxs(ResultStateContainer,{"data-testid":"list-loading",children:[jsx(Spinner,{$buttonStyle:"secondary",size:24}),jsx(ResultStateText,{children:"Loading..."})]},"loading")},ee=()=>{if(m&&"fail"===f)return jsxs(ResultStateContainer,{"data-testid":"list-fail",children:[jsx(LabelIcon,{"data-testid":"load-error-icon"}),jsx(ResultStateText,{children:"Failed to load."}),jsx(DropdownCommonButton,{onClick:U,children:"Try again."})]},"noResults")};return jsx(Container$7,{style:E,"data-testid":n?"dropdown-container":"dropdown-container-hidden",ref:A,children:(()=>{if(n)return jsxs(List,{ref:P,"data-testid":"dropdown-list",width:a,role:"list",...x,children:[(s||p)&&"success"===f?jsx(DropdownSearch,{ref:I,onChange:G,value:C,placeholder:o,"data-testid":"search-input","aria-label":"search-input",tabIndex:n?0:-1,onClear:W}):null,Z(),X(),J(),ee(),K()]})})()})},BORDER_RADIUS$1="4px",Wrapper$d=styled.div`
2181
2181
  position: relative;
2182
2182
  min-height: 3rem;
2183
2183
  height: 3rem; // Need this to persist the height when expanding or collapsing list