@lifesg/react-design-system 2.0.0-canary.7 → 2.0.0

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.
@@ -1,4 +1,4 @@
1
- import{jsxs as e,jsx as t,Fragment as n}from"react/jsx-runtime";import*as r from"react";import i,{useEffect as o,useLayoutEffect as a,useState as s,useRef as l,forwardRef as c,useCallback as u,useContext as d,useMemo as h}from"react";import{unstable_batchedUpdates as p}from"react-dom";import f,{keyframes as g,css as m}from"styled-components";import{ExternalIcon as y}from"@lifesg/react-icons/external";import{ExclamationCircleFillIcon as b}from"@lifesg/react-icons/exclamation-circle-fill";import{TickIcon as v}from"@lifesg/react-icons/tick";import{CrossIcon as w}from"@lifesg/react-icons/cross";import{MagnifierIcon as _}from"@lifesg/react-icons/magnifier";import{ChevronDownIcon as S}from"@lifesg/react-icons/chevron-down";var $="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};var x=function(e,t,n,r){for(var i=e.length,o=n+(r?1:-1);r?o--:++o<i;)if(t(e[o],o,e))return o;return-1};var F=function(){this.__data__=[],this.size=0};var k=function(e,t){return e===t||e!=e&&t!=t},B=k;var A=function(e,t){for(var n=e.length;n--;)if(B(e[n][0],t))return n;return-1},O=A,j=Array.prototype.splice;var E=A;var D=A;var P=A;var C=F,z=function(e){var t=this.__data__,n=O(t,e);return!(n<0)&&(n==t.length-1?t.pop():j.call(t,n,1),--this.size,!0)},I=function(e){var t=this.__data__,n=E(t,e);return n<0?void 0:t[n][1]},H=function(e){return D(this.__data__,e)>-1},T=function(e,t){var n=this.__data__,r=P(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this};function N(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}N.prototype.clear=C,N.prototype.delete=z,N.prototype.get=I,N.prototype.has=H,N.prototype.set=T;var M=N,V=M;var R=function(){this.__data__=new V,this.size=0};var L=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n};var W=function(e){return this.__data__.get(e)};var q=function(e){return this.__data__.has(e)},U="object"==typeof $&&$&&$.Object===Object&&$,Q=U,G="object"==typeof self&&self&&self.Object===Object&&self,X=Q||G||Function("return this")(),Z=X.Symbol,K=Z,Y=Object.prototype,J=Y.hasOwnProperty,ee=Y.toString,te=K?K.toStringTag:void 0;var ne=function(e){var t=J.call(e,te),n=e[te];try{e[te]=void 0;var r=!0}catch(e){}var i=ee.call(e);return r&&(t?e[te]=n:delete e[te]),i},re=Object.prototype.toString;var ie=ne,oe=function(e){return re.call(e)},ae=Z?Z.toStringTag:void 0;var se=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":ae&&ae in Object(e)?ie(e):oe(e)};var le=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)},ce=se,ue=le;var de,he=function(e){if(!ue(e))return!1;var t=ce(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t},pe=X["__core-js_shared__"],fe=(de=/[^.]+$/.exec(pe&&pe.keys&&pe.keys.IE_PROTO||""))?"Symbol(src)_1."+de:"";var ge=function(e){return!!fe&&fe in e},me=Function.prototype.toString;var ye=function(e){if(null!=e){try{return me.call(e)}catch(e){}try{return e+""}catch(e){}}return""},be=he,ve=ge,we=le,_e=ye,Se=/^\[object .+?Constructor\]$/,$e=Function.prototype,xe=Object.prototype,Fe=$e.toString,ke=xe.hasOwnProperty,Be=RegExp("^"+Fe.call(ke).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");var Ae=function(e){return!(!we(e)||ve(e))&&(be(e)?Be:Se).test(_e(e))},Oe=function(e,t){return null==e?void 0:e[t]};var je=function(e,t){var n=Oe(e,t);return Ae(n)?n:void 0},Ee=je(X,"Map"),De=je(Object,"create"),Pe=De;var Ce=function(){this.__data__=Pe?Pe(null):{},this.size=0};var ze=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},Ie=De,He=Object.prototype.hasOwnProperty;var Te=function(e){var t=this.__data__;if(Ie){var n=t[e];return"__lodash_hash_undefined__"===n?void 0:n}return He.call(t,e)?t[e]:void 0},Ne=De,Me=Object.prototype.hasOwnProperty;var Ve=De;var Re=Ce,Le=ze,We=Te,qe=function(e){var t=this.__data__;return Ne?void 0!==t[e]:Me.call(t,e)},Ue=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=Ve&&void 0===t?"__lodash_hash_undefined__":t,this};function Qe(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}Qe.prototype.clear=Re,Qe.prototype.delete=Le,Qe.prototype.get=We,Qe.prototype.has=qe,Qe.prototype.set=Ue;var Ge=Qe,Xe=M,Ze=Ee;var Ke=function(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e};var Ye=function(e,t){var n=e.__data__;return Ke(t)?n["string"==typeof t?"string":"hash"]:n.map},Je=Ye;var et=Ye;var tt=Ye;var nt=Ye;var rt=function(){this.size=0,this.__data__={hash:new Ge,map:new(Ze||Xe),string:new Ge}},it=function(e){var t=Je(this,e).delete(e);return this.size-=t?1:0,t},ot=function(e){return et(this,e).get(e)},at=function(e){return tt(this,e).has(e)},st=function(e,t){var n=nt(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this};function lt(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}lt.prototype.clear=rt,lt.prototype.delete=it,lt.prototype.get=ot,lt.prototype.has=at,lt.prototype.set=st;var ct=lt,ut=M,dt=Ee,ht=ct;var pt=M,ft=R,gt=L,mt=W,yt=q,bt=function(e,t){var n=this.__data__;if(n instanceof ut){var r=n.__data__;if(!dt||r.length<199)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new ht(r)}return n.set(e,t),this.size=n.size,this};function vt(e){var t=this.__data__=new pt(e);this.size=t.size}vt.prototype.clear=ft,vt.prototype.delete=gt,vt.prototype.get=mt,vt.prototype.has=yt,vt.prototype.set=bt;var wt=vt;var _t=ct,St=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this},$t=function(e){return this.__data__.has(e)};function xt(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new _t;++t<n;)this.add(e[t])}xt.prototype.add=xt.prototype.push=St,xt.prototype.has=$t;var Ft=xt,kt=function(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1},Bt=function(e,t){return e.has(t)};var At=function(e,t,n,r,i,o){var a=1&n,s=e.length,l=t.length;if(s!=l&&!(a&&l>s))return!1;var c=o.get(e),u=o.get(t);if(c&&u)return c==t&&u==e;var d=-1,h=!0,p=2&n?new Ft:void 0;for(o.set(e,t),o.set(t,e);++d<s;){var f=e[d],g=t[d];if(r)var m=a?r(g,f,d,t,e,o):r(f,g,d,e,t,o);if(void 0!==m){if(m)continue;h=!1;break}if(p){if(!kt(t,(function(e,t){if(!Bt(p,t)&&(f===e||i(f,e,n,r,o)))return p.push(t)}))){h=!1;break}}else if(f!==g&&!i(f,g,n,r,o)){h=!1;break}}return o.delete(e),o.delete(t),h};var Ot=X.Uint8Array,jt=k,Et=At,Dt=function(e){var t=-1,n=Array(e.size);return e.forEach((function(e,r){n[++t]=[r,e]})),n},Pt=function(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=e})),n},Ct=Z?Z.prototype:void 0,zt=Ct?Ct.valueOf:void 0;var It=function(e,t,n,r,i,o,a){switch(n){case"[object DataView]":if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case"[object ArrayBuffer]":return!(e.byteLength!=t.byteLength||!o(new Ot(e),new Ot(t)));case"[object Boolean]":case"[object Date]":case"[object Number]":return jt(+e,+t);case"[object Error]":return e.name==t.name&&e.message==t.message;case"[object RegExp]":case"[object String]":return e==t+"";case"[object Map]":var s=Dt;case"[object Set]":var l=1&r;if(s||(s=Pt),e.size!=t.size&&!l)return!1;var c=a.get(e);if(c)return c==t;r|=2,a.set(e,t);var u=Et(s(e),s(t),r,i,o,a);return a.delete(e),u;case"[object Symbol]":if(zt)return zt.call(e)==zt.call(t)}return!1};var Ht=function(e,t){for(var n=-1,r=t.length,i=e.length;++n<r;)e[i+n]=t[n];return e},Tt=Array.isArray,Nt=Ht,Mt=Tt;var Vt=function(e,t,n){var r=t(e);return Mt(e)?r:Nt(r,n(e))};var Rt=function(e,t){for(var n=-1,r=null==e?0:e.length,i=0,o=[];++n<r;){var a=e[n];t(a,n,e)&&(o[i++]=a)}return o},Lt=function(){return[]},Wt=Object.prototype.propertyIsEnumerable,qt=Object.getOwnPropertySymbols,Ut=qt?function(e){return null==e?[]:(e=Object(e),Rt(qt(e),(function(t){return Wt.call(e,t)})))}:Lt;var Qt=function(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r};var Gt=function(e){return null!=e&&"object"==typeof e},Xt=se,Zt=Gt;var Kt=function(e){return Zt(e)&&"[object Arguments]"==Xt(e)},Yt=Gt,Jt=Object.prototype,en=Jt.hasOwnProperty,tn=Jt.propertyIsEnumerable,nn=Kt(function(){return arguments}())?Kt:function(e){return Yt(e)&&en.call(e,"callee")&&!tn.call(e,"callee")},rn={exports:{}};var on=function(){return!1};!function(e,t){var n=X,r=on,i=t&&!t.nodeType&&t,o=i&&e&&!e.nodeType&&e,a=o&&o.exports===i?n.Buffer:void 0,s=(a?a.isBuffer:void 0)||r;e.exports=s}(rn,rn.exports);var an=/^(?:0|[1-9]\d*)$/;var sn=function(e,t){var n=typeof e;return!!(t=null==t?9007199254740991:t)&&("number"==n||"symbol"!=n&&an.test(e))&&e>-1&&e%1==0&&e<t};var ln=function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991},cn=se,un=ln,dn=Gt,hn={};hn["[object Float32Array]"]=hn["[object Float64Array]"]=hn["[object Int8Array]"]=hn["[object Int16Array]"]=hn["[object Int32Array]"]=hn["[object Uint8Array]"]=hn["[object Uint8ClampedArray]"]=hn["[object Uint16Array]"]=hn["[object Uint32Array]"]=!0,hn["[object Arguments]"]=hn["[object Array]"]=hn["[object ArrayBuffer]"]=hn["[object Boolean]"]=hn["[object DataView]"]=hn["[object Date]"]=hn["[object Error]"]=hn["[object Function]"]=hn["[object Map]"]=hn["[object Number]"]=hn["[object Object]"]=hn["[object RegExp]"]=hn["[object Set]"]=hn["[object String]"]=hn["[object WeakMap]"]=!1;var pn=function(e){return dn(e)&&un(e.length)&&!!hn[cn(e)]};var fn=function(e){return function(t){return e(t)}},gn={exports:{}};!function(e,t){var n=U,r=t&&!t.nodeType&&t,i=r&&e&&!e.nodeType&&e,o=i&&i.exports===r&&n.process,a=function(){try{var e=i&&i.require&&i.require("util").types;return e||o&&o.binding&&o.binding("util")}catch(e){}}();e.exports=a}(gn,gn.exports);var mn=pn,yn=fn,bn=gn.exports,vn=bn&&bn.isTypedArray,wn=vn?yn(vn):mn,_n=Qt,Sn=nn,$n=Tt,xn=rn.exports,Fn=sn,kn=wn,Bn=Object.prototype.hasOwnProperty;var An=function(e,t){var n=$n(e),r=!n&&Sn(e),i=!n&&!r&&xn(e),o=!n&&!r&&!i&&kn(e),a=n||r||i||o,s=a?_n(e.length,String):[],l=s.length;for(var c in e)!t&&!Bn.call(e,c)||a&&("length"==c||i&&("offset"==c||"parent"==c)||o&&("buffer"==c||"byteLength"==c||"byteOffset"==c)||Fn(c,l))||s.push(c);return s},On=Object.prototype;var jn=function(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||On)};var En=function(e,t){return function(n){return e(t(n))}}(Object.keys,Object),Dn=jn,Pn=En,Cn=Object.prototype.hasOwnProperty;var zn=he,In=ln;var Hn=function(e){return null!=e&&In(e.length)&&!zn(e)},Tn=An,Nn=function(e){if(!Dn(e))return Pn(e);var t=[];for(var n in Object(e))Cn.call(e,n)&&"constructor"!=n&&t.push(n);return t},Mn=Hn;var Vn=function(e){return Mn(e)?Tn(e):Nn(e)},Rn=Vt,Ln=Ut,Wn=Vn;var qn=function(e){return Rn(e,Wn,Ln)},Un=Object.prototype.hasOwnProperty;var Qn=function(e,t,n,r,i,o){var a=1&n,s=qn(e),l=s.length;if(l!=qn(t).length&&!a)return!1;for(var c=l;c--;){var u=s[c];if(!(a?u in t:Un.call(t,u)))return!1}var d=o.get(e),h=o.get(t);if(d&&h)return d==t&&h==e;var p=!0;o.set(e,t),o.set(t,e);for(var f=a;++c<l;){var g=e[u=s[c]],m=t[u];if(r)var y=a?r(m,g,u,t,e,o):r(g,m,u,e,t,o);if(!(void 0===y?g===m||i(g,m,n,r,o):y)){p=!1;break}f||(f="constructor"==u)}if(p&&!f){var b=e.constructor,v=t.constructor;b==v||!("constructor"in e)||!("constructor"in t)||"function"==typeof b&&b instanceof b&&"function"==typeof v&&v instanceof v||(p=!1)}return o.delete(e),o.delete(t),p},Gn=je(X,"DataView"),Xn=Ee,Zn=je(X,"Promise"),Kn=je(X,"Set"),Yn=je(X,"WeakMap"),Jn=se,er=ye,tr="[object Map]",nr="[object Promise]",rr="[object Set]",ir="[object WeakMap]",or="[object DataView]",ar=er(Gn),sr=er(Xn),lr=er(Zn),cr=er(Kn),ur=er(Yn),dr=Jn;(Gn&&dr(new Gn(new ArrayBuffer(1)))!=or||Xn&&dr(new Xn)!=tr||Zn&&dr(Zn.resolve())!=nr||Kn&&dr(new Kn)!=rr||Yn&&dr(new Yn)!=ir)&&(dr=function(e){var t=Jn(e),n="[object Object]"==t?e.constructor:void 0,r=n?er(n):"";if(r)switch(r){case ar:return or;case sr:return tr;case lr:return nr;case cr:return rr;case ur:return ir}return t});var hr=wt,pr=At,fr=It,gr=Qn,mr=dr,yr=Tt,br=rn.exports,vr=wn,wr="[object Arguments]",_r="[object Array]",Sr="[object Object]",$r=Object.prototype.hasOwnProperty;var xr=function(e,t,n,r,i,o){var a=yr(e),s=yr(t),l=a?_r:mr(e),c=s?_r:mr(t),u=(l=l==wr?Sr:l)==Sr,d=(c=c==wr?Sr:c)==Sr,h=l==c;if(h&&br(e)){if(!br(t))return!1;a=!0,u=!1}if(h&&!u)return o||(o=new hr),a||vr(e)?pr(e,t,n,r,i,o):fr(e,t,l,n,r,i,o);if(!(1&n)){var p=u&&$r.call(e,"__wrapped__"),f=d&&$r.call(t,"__wrapped__");if(p||f){var g=p?e.value():e,m=f?t.value():t;return o||(o=new hr),i(g,m,n,r,o)}}return!!h&&(o||(o=new hr),gr(e,t,n,r,i,o))},Fr=Gt;var kr=function e(t,n,r,i,o){return t===n||(null==t||null==n||!Fr(t)&&!Fr(n)?t!=t&&n!=n:xr(t,n,r,i,e,o))},Br=wt,Ar=kr;var Or=le;var jr=function(e){return e==e&&!Or(e)},Er=jr,Dr=Vn;var Pr=function(e,t){return function(n){return null!=n&&(n[e]===t&&(void 0!==t||e in Object(n)))}},Cr=function(e,t,n,r){var i=n.length,o=i,a=!r;if(null==e)return!o;for(e=Object(e);i--;){var s=n[i];if(a&&s[2]?s[1]!==e[s[0]]:!(s[0]in e))return!1}for(;++i<o;){var l=(s=n[i])[0],c=e[l],u=s[1];if(a&&s[2]){if(void 0===c&&!(l in e))return!1}else{var d=new Br;if(r)var h=r(c,u,l,e,t,d);if(!(void 0===h?Ar(u,c,3,r,d):h))return!1}}return!0},zr=function(e){for(var t=Dr(e),n=t.length;n--;){var r=t[n],i=e[r];t[n]=[r,i,Er(i)]}return t},Ir=Pr;var Hr=function(e){var t=zr(e);return 1==t.length&&t[0][2]?Ir(t[0][0],t[0][1]):function(n){return n===e||Cr(n,e,t)}},Tr=se,Nr=Gt;var Mr=function(e){return"symbol"==typeof e||Nr(e)&&"[object Symbol]"==Tr(e)},Vr=Tt,Rr=Mr,Lr=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Wr=/^\w*$/;var qr=function(e,t){if(Vr(e))return!1;var n=typeof e;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=e&&!Rr(e))||(Wr.test(e)||!Lr.test(e)||null!=t&&e in Object(t))},Ur=ct;function Qr(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new TypeError("Expected a function");var n=function(){var r=arguments,i=t?t.apply(this,r):r[0],o=n.cache;if(o.has(i))return o.get(i);var a=e.apply(this,r);return n.cache=o.set(i,a)||o,a};return n.cache=new(Qr.Cache||Ur),n}Qr.Cache=Ur;var Gr=Qr;var Xr=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Zr=/\\(\\)?/g,Kr=function(e){var t=Gr(e,(function(e){return 500===n.size&&n.clear(),e})),n=t.cache;return t}((function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(Xr,(function(e,n,r,i){t.push(r?i.replace(Zr,"$1"):n||e)})),t}));var Yr=function(e,t){for(var n=-1,r=null==e?0:e.length,i=Array(r);++n<r;)i[n]=t(e[n],n,e);return i},Jr=Tt,ei=Mr,ti=Z?Z.prototype:void 0,ni=ti?ti.toString:void 0;var ri=function e(t){if("string"==typeof t)return t;if(Jr(t))return Yr(t,e)+"";if(ei(t))return ni?ni.call(t):"";var n=t+"";return"0"==n&&1/t==-Infinity?"-0":n},ii=ri;var oi=Tt,ai=qr,si=Kr,li=function(e){return null==e?"":ii(e)};var ci=function(e,t){return oi(e)?e:ai(e,t)?[e]:si(li(e))},ui=Mr;var di=function(e){if("string"==typeof e||ui(e))return e;var t=e+"";return"0"==t&&1/e==-Infinity?"-0":t},hi=ci,pi=di;var fi=function(e,t){for(var n=0,r=(t=hi(t,e)).length;null!=e&&n<r;)e=e[pi(t[n++])];return n&&n==r?e:void 0},gi=fi;var mi=function(e,t,n){var r=null==e?void 0:gi(e,t);return void 0===r?n:r};var yi=ci,bi=nn,vi=Tt,wi=sn,_i=ln,Si=di;var $i=function(e,t){return null!=e&&t in Object(e)},xi=function(e,t,n){for(var r=-1,i=(t=yi(t,e)).length,o=!1;++r<i;){var a=Si(t[r]);if(!(o=null!=e&&n(e,a)))break;e=e[a]}return o||++r!=i?o:!!(i=null==e?0:e.length)&&_i(i)&&wi(a,i)&&(vi(e)||bi(e))};var Fi=kr,ki=mi,Bi=function(e,t){return null!=e&&xi(e,t,$i)},Ai=qr,Oi=jr,ji=Pr,Ei=di;var Di=fi;var Pi=function(e){return function(t){return null==t?void 0:t[e]}},Ci=function(e){return function(t){return Di(t,e)}},zi=qr,Ii=di;var Hi=Hr,Ti=function(e,t){return Ai(e)&&Oi(t)?ji(Ei(e),t):function(n){var r=ki(n,e);return void 0===r&&r===t?Bi(n,e):Fi(t,r,3)}},Ni=function(e){return e},Mi=Tt,Vi=function(e){return zi(e)?Pi(Ii(e)):Ci(e)};var Ri=function(e){return"function"==typeof e?e:null==e?Ni:"object"==typeof e?Mi(e)?Ti(e[0],e[1]):Hi(e):Vi(e)},Li=/\s/;var Wi=function(e){for(var t=e.length;t--&&Li.test(e.charAt(t)););return t},qi=/^\s+/;var Ui=function(e){return e?e.slice(0,Wi(e)+1).replace(qi,""):e},Qi=le,Gi=Mr,Xi=/^[-+]0x[0-9a-f]+$/i,Zi=/^0b[01]+$/i,Ki=/^0o[0-7]+$/i,Yi=parseInt;var Ji=function(e){if("number"==typeof e)return e;if(Gi(e))return NaN;if(Qi(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=Qi(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=Ui(e);var n=Zi.test(e);return n||Ki.test(e)?Yi(e.slice(2),n?2:8):Xi.test(e)?NaN:+e},eo=1/0;var to=function(e){return e?(e=Ji(e))===eo||e===-1/0?17976931348623157e292*(e<0?-1:1):e==e?e:0:0===e?e:0};var no=x,ro=Ri,io=function(e){var t=to(e),n=t%1;return t==t?n?t-n:t:0},oo=Math.max;var ao=function(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var i=null==n?0:io(n);return i<0&&(i=oo(r+i,0)),no(e,ro(t),i)},so=Ri,lo=Hn,co=Vn;var uo=function(e){return function(t,n,r){var i=Object(t);if(!lo(t)){var o=so(n);t=co(t),n=function(e){return o(i[e],e,i)}}var a=e(t,n,r);return a>-1?i[o?t[a]:a]:void 0}}(ao),ho=kr;var po=function(e,t){return ho(e,t)};let fo=jo();const go=e=>ko(e,fo);let mo=jo();go.write=e=>ko(e,mo);let yo=jo();go.onStart=e=>ko(e,yo);let bo=jo();go.onFrame=e=>ko(e,bo);let vo=jo();go.onFinish=e=>ko(e,vo);let wo=[];go.setTimeout=(e,t)=>{let n=go.now()+t,r=()=>{let e=wo.findIndex((e=>e.cancel==r));~e&&wo.splice(e,1),xo-=~e?1:0},i={time:n,handler:e,cancel:r};return wo.splice(_o(n),0,i),xo+=1,Bo(),i};let _o=e=>~(~wo.findIndex((t=>t.time>e))||~wo.length);go.cancel=e=>{yo.delete(e),bo.delete(e),vo.delete(e),fo.delete(e),mo.delete(e)},go.sync=e=>{Fo=!0,go.batchedUpdates(e),Fo=!1},go.throttle=e=>{let t;function n(){try{e(...t)}finally{t=null}}function r(...e){t=e,go.onStart(n)}return r.handler=e,r.cancel=()=>{yo.delete(n),t=null},r};let So="undefined"!=typeof window?window.requestAnimationFrame:()=>{};go.use=e=>So=e,go.now="undefined"!=typeof performance?()=>performance.now():Date.now,go.batchedUpdates=e=>e(),go.catch=console.error,go.frameLoop="always",go.advance=()=>{"demand"!==go.frameLoop?console.warn("Cannot call the manual advancement of rafz whilst frameLoop is not set as demand"):Oo()};let $o=-1,xo=0,Fo=!1;function ko(e,t){Fo?(t.delete(e),e(0)):(t.add(e),Bo())}function Bo(){$o<0&&($o=0,"demand"!==go.frameLoop&&So(Ao))}function Ao(){~$o&&(So(Ao),go.batchedUpdates(Oo))}function Oo(){let e=$o;$o=go.now();let t=_o($o);t&&(Eo(wo.splice(0,t),(e=>e.handler())),xo-=t),xo?(yo.flush(),fo.flush(e?Math.min(64,$o-e):16.667),bo.flush(),mo.flush(),vo.flush()):$o=-1}function jo(){let e=new Set,t=e;return{add(n){xo+=t!=e||e.has(n)?0:1,e.add(n)},delete:n=>(xo-=t==e&&e.has(n)?1:0,e.delete(n)),flush(n){t.size&&(e=new Set,xo-=t.size,Eo(t,(t=>t(n)&&e.add(t))),xo+=e.size,t=e)}}}function Eo(e,t){e.forEach((e=>{try{t(e)}catch(e){go.catch(e)}}))}function Do(){}const Po={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 Co(e,t){if(Po.arr(e)){if(!Po.arr(t)||e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}return e===t}const zo=(e,t)=>e.forEach(t);function Io(e,t,n){if(Po.arr(e))for(let r=0;r<e.length;r++)t.call(n,e[r],`${r}`);else for(const r in e)e.hasOwnProperty(r)&&t.call(n,e[r],r)}const Ho=e=>Po.und(e)?[]:Po.arr(e)?e:[e];function To(e,t){if(e.size){const n=Array.from(e);e.clear(),zo(n,t)}}const No=(e,...t)=>To(e,(e=>e(...t))),Mo=()=>"undefined"==typeof window||!window.navigator||/ServerSideRendering|^Deno\//.test(window.navigator.userAgent);let Vo,Ro,Lo=null,Wo=!1,qo=Do;var Uo=Object.freeze({__proto__:null,get createStringInterpolator(){return Vo},get to(){return Ro},get colors(){return Lo},get skipAnimation(){return Wo},get willAdvance(){return qo},assign:e=>{e.to&&(Ro=e.to),e.now&&(go.now=e.now),void 0!==e.colors&&(Lo=e.colors),null!=e.skipAnimation&&(Wo=e.skipAnimation),e.createStringInterpolator&&(Vo=e.createStringInterpolator),e.requestAnimationFrame&&go.use(e.requestAnimationFrame),e.batchedUpdates&&(go.batchedUpdates=e.batchedUpdates),e.willAdvance&&(qo=e.willAdvance),e.frameLoop&&(go.frameLoop=e.frameLoop)}});const Qo=new Set;let Go=[],Xo=[],Zo=0;const Ko={get idle(){return!Qo.size&&!Go.length},start(e){Zo>e.priority?(Qo.add(e),go.onStart(Yo)):(Jo(e),go(ta))},advance:ta,sort(e){if(Zo)go.onFrame((()=>Ko.sort(e)));else{const t=Go.indexOf(e);~t&&(Go.splice(t,1),ea(e))}},clear(){Go=[],Qo.clear()}};function Yo(){Qo.forEach(Jo),Qo.clear(),go(ta)}function Jo(e){Go.includes(e)||ea(e)}function ea(e){Go.splice(function(e,t){const n=e.findIndex(t);return n<0?e.length:n}(Go,(t=>t.priority>e.priority)),0,e)}function ta(e){const t=Xo;for(let n=0;n<Go.length;n++){const r=Go[n];Zo=r.priority,r.idle||(qo(r),r.advance(e),r.idle||t.push(r))}return Zo=0,Xo=Go,Xo.length=0,Go=t,Go.length>0}const na="[-+]?\\d*\\.?\\d+",ra=na+"%";function ia(...e){return"\\(\\s*("+e.join(")\\s*,\\s*(")+")\\s*\\)"}const oa=new RegExp("rgb"+ia(na,na,na)),aa=new RegExp("rgba"+ia(na,na,na,na)),sa=new RegExp("hsl"+ia(na,ra,ra)),la=new RegExp("hsla"+ia(na,ra,ra,na)),ca=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,ua=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,da=/^#([0-9a-fA-F]{6})$/,ha=/^#([0-9a-fA-F]{8})$/;function pa(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+6*(t-e)*n:n<.5?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function fa(e,t,n){const r=n<.5?n*(1+t):n+t-n*t,i=2*n-r,o=pa(i,r,e+1/3),a=pa(i,r,e),s=pa(i,r,e-1/3);return Math.round(255*o)<<24|Math.round(255*a)<<16|Math.round(255*s)<<8}function ga(e){const t=parseInt(e,10);return t<0?0:t>255?255:t}function ma(e){return(parseFloat(e)%360+360)%360/360}function ya(e){const t=parseFloat(e);return t<0?0:t>1?255:Math.round(255*t)}function ba(e){const t=parseFloat(e);return t<0?0:t>100?1:t/100}function va(e){let t=function(e){let t;return"number"==typeof e?e>>>0===e&&e>=0&&e<=4294967295?e:null:(t=da.exec(e))?parseInt(t[1]+"ff",16)>>>0:Lo&&void 0!==Lo[e]?Lo[e]:(t=oa.exec(e))?(ga(t[1])<<24|ga(t[2])<<16|ga(t[3])<<8|255)>>>0:(t=aa.exec(e))?(ga(t[1])<<24|ga(t[2])<<16|ga(t[3])<<8|ya(t[4]))>>>0:(t=ca.exec(e))?parseInt(t[1]+t[1]+t[2]+t[2]+t[3]+t[3]+"ff",16)>>>0:(t=ha.exec(e))?parseInt(t[1],16)>>>0:(t=ua.exec(e))?parseInt(t[1]+t[1]+t[2]+t[2]+t[3]+t[3]+t[4]+t[4],16)>>>0:(t=sa.exec(e))?(255|fa(ma(t[1]),ba(t[2]),ba(t[3])))>>>0:(t=la.exec(e))?(fa(ma(t[1]),ba(t[2]),ba(t[3]))|ya(t[4]))>>>0:null}(e);return null===t?e:(t=t||0,`rgba(${(4278190080&t)>>>24}, ${(16711680&t)>>>16}, ${(65280&t)>>>8}, ${(255&t)/255})`)}const wa=(e,t,n)=>{if(Po.fun(e))return e;if(Po.arr(e))return wa({range:e,output:t,extrapolate:n});if(Po.str(e.output[0]))return Vo(e);const r=e,i=r.output,o=r.range||[0,1],a=r.extrapolateLeft||r.extrapolate||"extend",s=r.extrapolateRight||r.extrapolate||"extend",l=r.easing||(e=>e);return e=>{const t=function(e,t){for(var n=1;n<t.length-1&&!(t[n]>=e);++n);return n-1}(e,o);return function(e,t,n,r,i,o,a,s,l){let c=l?l(e):e;if(c<t){if("identity"===a)return c;"clamp"===a&&(c=t)}if(c>n){if("identity"===s)return c;"clamp"===s&&(c=n)}if(r===i)return r;if(t===n)return e<=t?r:i;t===-1/0?c=-c:n===1/0?c-=t:c=(c-t)/(n-t);c=o(c),r===-1/0?c=-c:i===1/0?c+=r:c=c*(i-r)+r;return c}(e,o[t],o[t+1],i[t],i[t+1],l,a,s,r.map)}};const _a=1.70158,Sa=1.525*_a,$a=_a+1,xa=2*Math.PI/3,Fa=2*Math.PI/4.5,ka=e=>{const t=7.5625,n=2.75;return e<1/n?t*e*e:e<2/n?t*(e-=1.5/n)*e+.75:e<2.5/n?t*(e-=2.25/n)*e+.9375:t*(e-=2.625/n)*e+.984375},Ba={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=>$a*e*e*e-_a*e*e,easeOutBack:e=>1+$a*Math.pow(e-1,3)+_a*Math.pow(e-1,2),easeInOutBack:e=>e<.5?Math.pow(2*e,2)*(7.189819*e-Sa)/2:(Math.pow(2*e-2,2)*((Sa+1)*(2*e-2)+Sa)+2)/2,easeInElastic:e=>0===e?0:1===e?1:-Math.pow(2,10*e-10)*Math.sin((10*e-10.75)*xa),easeOutElastic:e=>0===e?0:1===e?1:Math.pow(2,-10*e)*Math.sin((10*e-.75)*xa)+1,easeInOutElastic:e=>0===e?0:1===e?1:e<.5?-Math.pow(2,20*e-10)*Math.sin((20*e-11.125)*Fa)/2:Math.pow(2,-20*e+10)*Math.sin((20*e-11.125)*Fa)/2+1,easeInBounce:e=>1-ka(1-e),easeOutBounce:ka,easeInOutBounce:e=>e<.5?(1-ka(1-2*e))/2:(1+ka(2*e-1))/2,steps:(e,t="end")=>n=>{const r=(n="end"===t?Math.min(n,.999):Math.max(n,.001))*e,i="end"===t?Math.floor(r):Math.ceil(r);return o=0,a=1,s=i/e,Math.min(Math.max(s,o),a);var o,a,s}};function Aa(){return Aa=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Aa.apply(this,arguments)}const Oa=Symbol.for("FluidValue.get"),ja=Symbol.for("FluidValue.observers"),Ea=e=>Boolean(e&&e[Oa]),Da=e=>e&&e[Oa]?e[Oa]():e,Pa=e=>e[ja]||null;function Ca(e,t){let n=e[ja];n&&n.forEach((e=>{!function(e,t){e.eventObserved?e.eventObserved(t):e(t)}(e,t)}))}class za{constructor(e){if(this[Oa]=void 0,this[ja]=void 0,!e&&!(e=this.get))throw Error("Unknown getter");Ia(this,e)}}const Ia=(e,t)=>Na(e,Oa,t);function Ha(e,t){if(e[Oa]){let n=e[ja];n||Na(e,ja,n=new Set),n.has(t)||(n.add(t),e.observerAdded&&e.observerAdded(n.size,t))}return t}function Ta(e,t){let n=e[ja];if(n&&n.has(t)){const r=n.size-1;r?n.delete(t):e[ja]=null,e.observerRemoved&&e.observerRemoved(r,t)}}const Na=(e,t,n)=>Object.defineProperty(e,t,{value:n,writable:!0,configurable:!0}),Ma=/[+\-]?(?:0|[1-9]\d*)(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,Va=/(#(?:[0-9a-f]{2}){2,4}|(#[0-9a-f]{3})|(rgb|hsl)a?\((-?\d+%?[,\s]+){2,3}\s*[\d\.]+%?\))/gi,Ra=new RegExp(`(${Ma.source})(%|[a-z]+)`,"i"),La=/rgba\(([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+)\)/gi,Wa=/var\((--[a-zA-Z0-9-_]+),? ?([a-zA-Z0-9 ()%#.,-]+)?\)/,qa=e=>{const[t,n]=Ua(e);if(!t||Mo())return e;const r=window.getComputedStyle(document.documentElement).getPropertyValue(t);if(r)return r.trim();if(n&&n.startsWith("--")){const t=window.getComputedStyle(document.documentElement).getPropertyValue(n);return t||e}return n&&Wa.test(n)?qa(n):n||e},Ua=e=>{const t=Wa.exec(e);if(!t)return[,];const[,n,r]=t;return[n,r]};let Qa;const Ga=(e,t,n,r,i)=>`rgba(${Math.round(t)}, ${Math.round(n)}, ${Math.round(r)}, ${i})`,Xa=e=>{Qa||(Qa=Lo?new RegExp(`(${Object.keys(Lo).join("|")})(?!\\w)`,"g"):/^\b$/);const t=e.output.map((e=>Da(e).replace(Wa,qa).replace(Va,va).replace(Qa,va))),n=t.map((e=>e.match(Ma).map(Number))),r=n[0].map(((e,t)=>n.map((e=>{if(!(t in e))throw Error('The arity of each "output" value must be equal');return e[t]})))).map((t=>wa(Aa({},e,{output:t}))));return e=>{var n;const i=!Ra.test(t[0])&&(null==(n=t.find((e=>Ra.test(e))))?void 0:n.replace(Ma,""));let o=0;return t[0].replace(Ma,(()=>`${r[o++](e)}${i||""}`)).replace(La,Ga)}},Za="react-spring: ",Ka=e=>{const t=e;let n=!1;if("function"!=typeof t)throw new TypeError(`${Za}once requires a function parameter`);return(...e)=>{n||(t(...e),n=!0)}},Ya=Ka(console.warn);const Ja=Ka(console.warn);function es(e){return Po.str(e)&&("#"==e[0]||/\d/.test(e)||!Mo()&&Wa.test(e)||e in(Lo||{}))}const ts=Mo()?o:a,ns=()=>{const e=l(!1);return ts((()=>(e.current=!0,()=>{e.current=!1})),[]),e};function rs(){const e=s()[1],t=ns();return()=>{t.current&&e(Math.random())}}const is=e=>o(e,os),os=[];function as(e){const t=l();return o((()=>{t.current=e})),t.current}const ss=Symbol.for("Animated:node"),ls=e=>e&&e[ss],cs=(e,t)=>{return n=e,r=ss,i=t,Object.defineProperty(n,r,{value:i,writable:!0,configurable:!0});var n,r,i},us=e=>e&&e[ss]&&e[ss].getPayload();class ds{constructor(){this.payload=void 0,cs(this,this)}getPayload(){return this.payload||[]}}class hs extends ds{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,Po.num(this._value)&&(this.lastPosition=this._value)}static create(e){return new hs(e)}getPayload(){return[this]}getValue(){return this._value}setValue(e,t){return Po.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,Po.num(this._value)&&(this.elapsedTime=0,this.durationProgress=0,this.lastPosition=this._value,e&&(this.lastVelocity=null),this.v0=null)}}class ps extends hs{constructor(e){super(0),this._string=null,this._toString=void 0,this._toString=wa({output:[e,e]})}static create(e){return new ps(e)}getValue(){let e=this._string;return null==e?this._string=this._toString(this._value):e}setValue(e){if(Po.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=wa({output:[this.getValue(),e]})),this._value=0,super.reset()}}const fs={dependencies:null};class gs extends ds{constructor(e){super(),this.source=e,this.setValue(e)}getValue(e){const t={};return Io(this.source,((n,r)=>{var i;(i=n)&&i[ss]===i?t[r]=n.getValue(e):Ea(n)?t[r]=Da(n):e||(t[r]=n)})),t}setValue(e){this.source=e,this.payload=this._makePayload(e)}reset(){this.payload&&zo(this.payload,(e=>e.reset()))}_makePayload(e){if(e){const t=new Set;return Io(e,this._addToPayload,t),Array.from(t)}}_addToPayload(e){fs.dependencies&&Ea(e)&&fs.dependencies.add(e);const t=us(e);t&&zo(t,(e=>this.add(e)))}}class ms extends gs{constructor(e){super(e)}static create(e){return new ms(e)}getValue(){return this.source.map((e=>e.getValue()))}setValue(e){const t=this.getPayload();return e.length==t.length?t.map(((t,n)=>t.setValue(e[n]))).some(Boolean):(super.setValue(e.map(ys)),!0)}}function ys(e){return(es(e)?ps:hs).create(e)}function bs(e){const t=ls(e);return t?t.constructor:Po.arr(e)?ms:es(e)?ps:hs}function vs(){return vs=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},vs.apply(this,arguments)}const ws=(e,t)=>{const n=!Po.fun(e)||e.prototype&&e.prototype.isReactComponent;return c(((i,a)=>{const s=l(null),c=n&&u((e=>{s.current=function(e,t){e&&(Po.fun(e)?e(t):e.current=t);return t}(a,e)}),[a]),[d,h]=function(e,t){const n=new Set;fs.dependencies=n,e.style&&(e=vs({},e,{style:t.createAnimatedStyle(e.style)}));return e=new gs(e),fs.dependencies=null,[e,n]}(i,t),p=rs(),f=()=>{const e=s.current;if(n&&!e)return;!1===(!!e&&t.applyAnimatedValues(e,d.getValue(!0)))&&p()},g=new _s(f,h),m=l();ts((()=>(m.current=g,zo(h,(e=>Ha(e,g))),()=>{m.current&&(zo(m.current.deps,(e=>Ta(e,m.current))),go.cancel(m.current.update))}))),o(f,[]),is((()=>()=>{const e=m.current;zo(e.deps,(t=>Ta(t,e)))}));const y=t.getComponentProps(d.getValue());return r.createElement(e,vs({},y,{ref:c}))}))};class _s{constructor(e,t){this.update=e,this.deps=t}eventObserved(e){"change"==e.type&&go.write(this.update)}}const Ss=Symbol.for("AnimatedComponent"),$s=e=>Po.str(e)?e:e&&Po.str(e.displayName)?e.displayName:Po.fun(e)&&e.name||null;function xs(){return xs=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},xs.apply(this,arguments)}function Fs(e,...t){return Po.fun(e)?e(...t):e}const ks=(e,t)=>!0===e||!!(t&&e&&(Po.fun(e)?e(t):Ho(e).includes(t))),Bs=(e,t)=>Po.obj(e)?t&&e[t]:e,As=(e,t)=>!0===e.default?e[t]:e.default?e.default[t]:void 0,Os=e=>e,js=(e,t=Os)=>{let n=Es;e.default&&!0!==e.default&&(e=e.default,n=Object.keys(e));const r={};for(const i of n){const n=t(e[i],i);Po.und(n)||(r[i]=n)}return r},Es=["config","onProps","onStart","onChange","onPause","onResume","onRest"],Ds={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 Ps(e){const t=function(e){const t={};let n=0;if(Io(e,((e,r)=>{Ds[r]||(t[r]=e,n++)})),n)return t}(e);if(t){const n={to:t};return Io(e,((e,r)=>r in t||(n[r]=e))),n}return xs({},e)}function Cs(e){return e=Da(e),Po.arr(e)?e.map(Cs):es(e)?Uo.createStringInterpolator({range:[0,1],output:[e,e]})(1):e}function zs(e){return Po.fun(e)||Po.arr(e)&&Po.obj(e[0])}const Is=xs({},{tension:170,friction:26},{mass:1,damping:1,easing:Ba.linear,clamp:!1});class Hs{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,Is)}}function Ts(e,t){if(Po.und(t.decay)){const n=!Po.und(t.tension)||!Po.und(t.friction);!n&&Po.und(t.frequency)&&Po.und(t.damping)&&Po.und(t.mass)||(e.duration=void 0,e.decay=void 0),n&&(e.frequency=void 0)}else e.duration=void 0}const Ns=[];class Ms{constructor(){this.changed=!1,this.values=Ns,this.toValues=null,this.fromValues=Ns,this.to=void 0,this.from=void 0,this.config=new Hs,this.immediate=!1}}function Vs(e,{key:t,props:n,defaultProps:r,state:i,actions:o}){return new Promise(((a,s)=>{var l;let c,u,d=ks(null!=(l=n.cancel)?l:null==r?void 0:r.cancel,t);if(d)f();else{Po.und(n.pause)||(i.paused=ks(n.pause,t));let e=null==r?void 0:r.pause;!0!==e&&(e=i.paused||ks(e,t)),c=Fs(n.delay||0,t),e?(i.resumeQueue.add(p),o.pause()):(o.resume(),p())}function h(){i.resumeQueue.add(p),i.timeouts.delete(u),u.cancel(),c=u.time-go.now()}function p(){c>0&&!Uo.skipAnimation?(i.delayed=!0,u=go.setTimeout(f,c),i.pauseQueue.add(h),i.timeouts.add(u)):f()}function f(){i.delayed&&(i.delayed=!1),i.pauseQueue.delete(h),i.timeouts.delete(u),e<=(i.cancelId||0)&&(d=!0);try{o.start(xs({},n,{callId:e,cancel:d}),a)}catch(e){s(e)}}}))}const Rs=(e,t)=>1==t.length?t[0]:t.some((e=>e.cancelled))?qs(e.get()):t.every((e=>e.noop))?Ls(e.get()):Ws(e.get(),t.every((e=>e.finished))),Ls=e=>({value:e,noop:!0,finished:!0,cancelled:!1}),Ws=(e,t,n=!1)=>({value:e,finished:t,cancelled:n}),qs=e=>({value:e,cancelled:!0,finished:!1});function Us(e,t,n,r){const{callId:i,parentId:o,onRest:a}=t,{asyncTo:s,promise:l}=n;return o||e!==s||t.reset?n.promise=(async()=>{n.asyncId=i,n.asyncTo=e;const c=js(t,((e,t)=>"onRest"===t?void 0:e));let u,d;const h=new Promise(((e,t)=>(u=e,d=t))),p=e=>{const t=i<=(n.cancelId||0)&&qs(r)||i!==n.asyncId&&Ws(r,!1);if(t)throw e.result=t,d(e),e},f=(e,t)=>{const o=new Gs,a=new Xs;return(async()=>{if(Uo.skipAnimation)throw Qs(n),a.result=Ws(r,!1),d(a),a;p(o);const s=Po.obj(e)?xs({},e):xs({},t,{to:e});s.parentId=i,Io(c,((e,t)=>{Po.und(s[t])&&(s[t]=e)}));const l=await r.start(s);return p(o),n.paused&&await new Promise((e=>{n.resumeQueue.add(e)})),l})()};let g;if(Uo.skipAnimation)return Qs(n),Ws(r,!1);try{let t;t=Po.arr(e)?(async e=>{for(const t of e)await f(t)})(e):Promise.resolve(e(f,r.stop.bind(r))),await Promise.all([t.then(u),h]),g=Ws(r.get(),!0,!1)}catch(e){if(e instanceof Gs)g=e.result;else{if(!(e instanceof Xs))throw e;g=e.result}}finally{i==n.asyncId&&(n.asyncId=o,n.asyncTo=o?s:void 0,n.promise=o?l:void 0)}return Po.fun(a)&&go.batchedUpdates((()=>{a(g,r,r.item)})),g})():l}function Qs(e,t){To(e.timeouts,(e=>e.cancel())),e.pauseQueue.clear(),e.resumeQueue.clear(),e.asyncId=e.asyncTo=e.promise=void 0,t&&(e.cancelId=t)}class Gs 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 Xs extends Error{constructor(){super("SkipAnimationSignal"),this.result=void 0}}const Zs=e=>e instanceof Ys;let Ks=1;class Ys extends za{constructor(...e){super(...e),this.id=Ks++,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=ls(this);return e&&e.getValue()}to(...e){return Uo.to(this,e)}interpolate(...e){return Ya(`${Za}The "interpolate" function is deprecated in v9 (use "to" instead)`),Uo.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){Ca(this,{type:"change",parent:this,value:e,idle:t})}_onPriorityChange(e){this.idle||Ko.sort(this),Ca(this,{type:"priority",parent:this,priority:e})}}const Js=Symbol.for("SpringPhase"),el=e=>(1&e[Js])>0,tl=e=>(2&e[Js])>0,nl=e=>(4&e[Js])>0,rl=(e,t)=>t?e[Js]|=3:e[Js]&=-3,il=(e,t)=>t?e[Js]|=4:e[Js]&=-5;class ol extends Ys{constructor(e,t){if(super(),this.key=void 0,this.animation=new Ms,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,!Po.und(e)||!Po.und(t)){const n=Po.obj(e)?xs({},e):xs({},t,{from:e});Po.und(n.default)&&(n.default=!0),this.start(n)}}get idle(){return!(tl(this)||this._state.asyncTo)||nl(this)}get goal(){return Da(this.animation.to)}get velocity(){const e=ls(this);return e instanceof hs?e.lastVelocity||0:e.getPayload().map((e=>e.lastVelocity||0))}get hasAnimated(){return el(this)}get isAnimating(){return tl(this)}get isPaused(){return nl(this)}get isDelayed(){return this._state.delayed}advance(e){let t=!0,n=!1;const r=this.animation;let{config:i,toValues:o}=r;const a=us(r.to);!a&&Ea(r.to)&&(o=Ho(Da(r.to))),r.values.forEach(((s,l)=>{if(s.done)return;const c=s.constructor==ps?1:a?a[l].lastPosition:o[l];let u=r.immediate,d=c;if(!u){if(d=s.lastPosition,i.tension<=0)return void(s.done=!0);let t=s.elapsedTime+=e;const n=r.fromValues[l],o=null!=s.v0?s.v0:s.v0=Po.arr(i.velocity)?i.velocity[l]:i.velocity;let a;const h=i.precision||(n==c?.005:Math.min(1,.001*Math.abs(c-n)));if(Po.und(i.duration))if(i.decay){const e=!0===i.decay?.998:i.decay,r=Math.exp(-(1-e)*t);d=n+o/(1-e)*(1-r),u=Math.abs(s.lastPosition-d)<=h,a=o*r}else{a=null==s.lastVelocity?o:s.lastVelocity;const t=i.restVelocity||h/10,r=i.clamp?0:i.bounce,l=!Po.und(r),p=n==c?s.v0>0:n<c;let f,g=!1;const m=1,y=Math.ceil(e/m);for(let e=0;e<y&&(f=Math.abs(a)>t,f||(u=Math.abs(c-d)<=h,!u));++e){l&&(g=d==c||d>c==p,g&&(a=-a*r,d=c));a+=(1e-6*-i.tension*(d-c)+.001*-i.friction*a)/i.mass*m,d+=a*m}}else{let r=1;i.duration>0&&(this._memoizedDuration!==i.duration&&(this._memoizedDuration=i.duration,s.durationProgress>0&&(s.elapsedTime=i.duration*s.durationProgress,t=s.elapsedTime+=e)),r=(i.progress||0)+t/this._memoizedDuration,r=r>1?1:r<0?0:r,s.durationProgress=r),d=n+i.easing(r)*(c-n),a=(d-s.lastPosition)/e,u=1==r}s.lastVelocity=a,Number.isNaN(d)&&(console.warn("Got NaN while animating:",this),u=!0)}a&&!a[l].done&&(u=!1),u?s.done=!0:t=!1,s.setValue(d,i.round)&&(n=!0)}));const s=ls(this),l=s.getValue();if(t){const e=Da(r.to);l===e&&!n||i.decay?n&&i.decay&&this._onChange(l):(s.setValue(e),this._onChange(e)),this._stop()}else n&&this._onChange(l)}set(e){return go.batchedUpdates((()=>{this._stop(),this._focus(e),this._set(e)})),this}pause(){this._update({pause:!0})}resume(){this._update({pause:!1})}finish(){if(tl(this)){const{to:e,config:t}=this.animation;go.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 n;return Po.und(e)?(n=this.queue||[],this.queue=[]):n=[Po.obj(e)?e:xs({},t,{to:e})],Promise.all(n.map((e=>this._update(e)))).then((e=>Rs(this,e)))}stop(e){const{to:t}=this.animation;return this._focus(this.get()),Qs(this._state,e&&this._lastCallId),go.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:n,from:r}=e;n=Po.obj(n)?n[t]:n,(null==n||zs(n))&&(n=void 0),r=Po.obj(r)?r[t]:r,null==r&&(r=void 0);const i={to:n,from:r};return el(this)||(e.reverse&&([n,r]=[r,n]),r=Da(r),Po.und(r)?ls(this)||this._set(n):this._set(r)),i}_update(e,t){let n=xs({},e);const{key:r,defaultProps:i}=this;n.default&&Object.assign(i,js(n,((e,t)=>/^on/.test(t)?Bs(e,r):e))),hl(this,n,"onProps"),pl(this,"onProps",n,this);const o=this._prepareNode(n);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 a=this._state;return Vs(++this._lastCallId,{key:r,props:n,defaultProps:i,state:a,actions:{pause:()=>{nl(this)||(il(this,!0),No(a.pauseQueue),pl(this,"onPause",Ws(this,al(this,this.animation.to)),this))},resume:()=>{nl(this)&&(il(this,!1),tl(this)&&this._resume(),No(a.resumeQueue),pl(this,"onResume",Ws(this,al(this,this.animation.to)),this))},start:this._merge.bind(this,o)}}).then((e=>{if(n.loop&&e.finished&&(!t||!e.noop)){const e=sl(n);if(e)return this._update(e,!0)}return e}))}_merge(e,t,n){if(t.cancel)return this.stop(!0),n(qs(this));const r=!Po.und(e.to),i=!Po.und(e.from);if(r||i){if(!(t.callId>this._lastToId))return n(qs(this));this._lastToId=t.callId}const{key:o,defaultProps:a,animation:s}=this,{to:l,from:c}=s;let{to:u=l,from:d=c}=e;!i||r||t.default&&!Po.und(u)||(u=d),t.reverse&&([u,d]=[d,u]);const h=!Co(d,c);h&&(s.from=d),d=Da(d);const p=!Co(u,l);p&&this._focus(u);const f=zs(t.to),{config:g}=s,{decay:m,velocity:y}=g;(r||i)&&(g.velocity=0),t.config&&!f&&function(e,t,n){n&&(Ts(n=xs({},n),t),t=xs({},n,t)),Ts(e,t),Object.assign(e,t);for(const t in Is)null==e[t]&&(e[t]=Is[t]);let{mass:r,frequency:i,damping:o}=e;Po.und(i)||(i<.01&&(i=.01),o<0&&(o=0),e.tension=Math.pow(2*Math.PI/i,2)*r,e.friction=4*Math.PI*o*r/i)}(g,Fs(t.config,o),t.config!==a.config?Fs(a.config,o):void 0);let b=ls(this);if(!b||Po.und(u))return n(Ws(this,!0));const v=Po.und(t.reset)?i&&!t.default:!Po.und(d)&&ks(t.reset,o),w=v?d:this.get(),_=Cs(u),S=Po.num(_)||Po.arr(_)||es(_),$=!f&&(!S||ks(a.immediate||t.immediate,o));if(p){const e=bs(u);if(e!==b.constructor){if(!$)throw Error(`Cannot animate between ${b.constructor.name} and ${e.name}, as the "to" prop suggests`);b=this._set(_)}}const x=b.constructor;let F=Ea(u),k=!1;if(!F){const e=v||!el(this)&&h;(p||e)&&(k=Co(Cs(w),_),F=!k),(Co(s.immediate,$)||$)&&Co(g.decay,m)&&Co(g.velocity,y)||(F=!0)}if(k&&tl(this)&&(s.changed&&!v?F=!0:F||this._stop(l)),!f&&((F||Ea(l))&&(s.values=b.getPayload(),s.toValues=Ea(u)?null:x==ps?[1]:Ho(_)),s.immediate!=$&&(s.immediate=$,$||v||this._set(l)),F)){const{onRest:e}=s;zo(dl,(e=>hl(this,t,e)));const r=Ws(this,al(this,l));No(this._pendingCalls,r),this._pendingCalls.add(n),s.changed&&go.batchedUpdates((()=>{s.changed=!v,null==e||e(r,this),v?Fs(a.onRest,r):null==s.onStart||s.onStart(r,this)}))}v&&this._set(w),f?n(Us(t.to,t,this._state,this)):F?this._start():tl(this)&&!p?this._pendingCalls.add(n):n(Ls(w))}_focus(e){const t=this.animation;e!==t.to&&(Pa(this)&&this._detach(),t.to=e,Pa(this)&&this._attach())}_attach(){let e=0;const{to:t}=this.animation;Ea(t)&&(Ha(t,this),Zs(t)&&(e=t.priority+1)),this.priority=e}_detach(){const{to:e}=this.animation;Ea(e)&&Ta(e,this)}_set(e,t=!0){const n=Da(e);if(!Po.und(n)){const e=ls(this);if(!e||!Co(n,e.getValue())){const r=bs(n);e&&e.constructor==r?e.setValue(n):cs(this,r.create(n)),e&&go.batchedUpdates((()=>{this._onChange(n,t)}))}}return ls(this)}_onStart(){const e=this.animation;e.changed||(e.changed=!0,pl(this,"onStart",Ws(this,al(this,e.to)),this))}_onChange(e,t){t||(this._onStart(),Fs(this.animation.onChange,e,this)),Fs(this.defaultProps.onChange,e,this),super._onChange(e,t)}_start(){const e=this.animation;ls(this).reset(Da(e.to)),e.immediate||(e.fromValues=e.values.map((e=>e.lastPosition))),tl(this)||(rl(this,!0),nl(this)||this._resume())}_resume(){Uo.skipAnimation?this.finish():Ko.start(this)}_stop(e,t){if(tl(this)){rl(this,!1);const n=this.animation;zo(n.values,(e=>{e.done=!0})),n.toValues&&(n.onChange=n.onPause=n.onResume=void 0),Ca(this,{type:"idle",parent:this});const r=t?qs(this.get()):Ws(this.get(),al(this,null!=e?e:n.to));No(this._pendingCalls,r),n.changed&&(n.changed=!1,pl(this,"onRest",r,this))}}}function al(e,t){const n=Cs(t);return Co(Cs(e.get()),n)}function sl(e,t=e.loop,n=e.to){let r=Fs(t);if(r){const i=!0!==r&&Ps(r),o=(i||e).reverse,a=!i||i.reset;return ll(xs({},e,{loop:t,default:!1,pause:void 0,to:!o||zs(n)?n:void 0,from:a?e.from:void 0,reset:a},i))}}function ll(e){const{to:t,from:n}=e=Ps(e),r=new Set;return Po.obj(t)&&ul(t,r),Po.obj(n)&&ul(n,r),e.keys=r.size?Array.from(r):null,e}function cl(e){const t=ll(e);return Po.und(t.default)&&(t.default=js(t)),t}function ul(e,t){Io(e,((e,n)=>null!=e&&t.add(n)))}const dl=["onStart","onRest","onChange","onPause","onResume"];function hl(e,t,n){e.animation[n]=t[n]!==As(t,n)?Bs(t[n],e.key):void 0}function pl(e,t,...n){var r,i,o,a;null==(r=(i=e.animation)[t])||r.call(i,...n),null==(o=(a=e.defaultProps)[t])||o.call(a,...n)}const fl=["onStart","onChange","onRest"];let gl=1;class ml{constructor(e,t){this.id=gl++,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(xs({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,n)=>e[n]=t.get())),e}set(e){for(const t in e){const n=e[t];Po.und(n)||this.springs[t].set(n)}}update(e){return e&&this.queue.push(ll(e)),this}start(e){let{queue:t}=this;return e?t=Ho(e).map(ll):this.queue=[],this._flush?this._flush(this,t):($l(this,t),yl(this,t))}stop(e,t){if(e!==!!e&&(t=e),t){const n=this.springs;zo(Ho(t),(t=>n[t].stop(!!e)))}else Qs(this._state,this._lastAsyncId),this.each((t=>t.stop(!!e)));return this}pause(e){if(Po.und(e))this.start({pause:!0});else{const t=this.springs;zo(Ho(e),(e=>t[e].pause()))}return this}resume(e){if(Po.und(e))this.start({pause:!1});else{const t=this.springs;zo(Ho(e),(e=>t[e].resume()))}return this}each(e){Io(this.springs,e)}_onFrame(){const{onStart:e,onChange:t,onRest:n}=this._events,r=this._active.size>0,i=this._changed.size>0;(r&&!this._started||i&&!this._started)&&(this._started=!0,To(e,(([e,t])=>{t.value=this.get(),e(t,this,this._item)})));const o=!r&&this._started,a=i||o&&n.size?this.get():null;i&&t.size&&To(t,(([e,t])=>{t.value=a,e(t,this,this._item)})),o&&(this._started=!1,To(n,(([e,t])=>{t.value=a,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)}go.onFrame(this._onFrame)}}function yl(e,t){return Promise.all(t.map((t=>bl(e,t)))).then((t=>Rs(e,t)))}async function bl(e,t,n){const{keys:r,to:i,from:o,loop:a,onRest:s,onResolve:l}=t,c=Po.obj(t.default)&&t.default;a&&(t.loop=!1),!1===i&&(t.to=null),!1===o&&(t.from=null);const u=Po.arr(i)||Po.fun(i)?i:void 0;u?(t.to=void 0,t.onRest=void 0,c&&(c.onRest=void 0)):zo(fl,(n=>{const r=t[n];if(Po.fun(r)){const i=e._events[n];t[n]=({finished:e,cancelled:t})=>{const n=i.get(r);n?(e||(n.finished=!1),t&&(n.cancelled=!0)):i.set(r,{value:null,finished:e||!1,cancelled:t||!1})},c&&(c[n]=t[n])}}));const d=e._state;t.pause===!d.paused?(d.paused=t.pause,No(t.pause?d.pauseQueue:d.resumeQueue)):d.paused&&(t.pause=!0);const h=(r||Object.keys(e.springs)).map((n=>e.springs[n].start(t))),p=!0===t.cancel||!0===As(t,"cancel");(u||p&&d.asyncId)&&h.push(Vs(++e._lastAsyncId,{props:t,state:d,actions:{pause:Do,resume:Do,start(t,n){p?(Qs(d,e._lastAsyncId),n(qs(e))):(t.onRest=s,n(Us(u,t,d,e)))}}})),d.paused&&await new Promise((e=>{d.resumeQueue.add(e)}));const f=Rs(e,await Promise.all(h));if(a&&f.finished&&(!n||!f.noop)){const n=sl(t,a,i);if(n)return $l(e,[n]),bl(e,n,!0)}return l&&go.batchedUpdates((()=>l(f,e,e.item))),f}function vl(e,t){const n=xs({},e.springs);return t&&zo(Ho(t),(e=>{Po.und(e.keys)&&(e=ll(e)),Po.obj(e.to)||(e=xs({},e,{to:void 0})),Sl(n,e,(e=>_l(e)))})),wl(e,n),n}function wl(e,t){Io(t,((t,n)=>{e.springs[n]||(e.springs[n]=t,Ha(t,e))}))}function _l(e,t){const n=new ol;return n.key=e,t&&Ha(n,t),n}function Sl(e,t,n){t.keys&&zo(t.keys,(r=>{(e[r]||(e[r]=n(r)))._prepareNode(t)}))}function $l(e,t){zo(t,(t=>{Sl(e.springs,t,(t=>_l(t,e)))}))}const xl=["children"],Fl=e=>{let{children:t}=e,n=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,xl);const i=d(kl),a=n.pause||!!i.pause,c=n.immediate||!!i.immediate;n=function(e,t){const[n]=s((()=>({inputs:t,result:e()}))),r=l(),i=r.current;let a=i;a?Boolean(t&&a.inputs&&function(e,t){if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}(t,a.inputs))||(a={inputs:t,result:e()}):a=n;return o((()=>{r.current=a,i==n&&(n.inputs=n.result=void 0)}),[a]),a.result}((()=>({pause:a,immediate:c})),[a,c]);const{Provider:u}=kl;return r.createElement(u,{value:n},t)},kl=(Bl=Fl,Al={},Object.assign(Bl,r.createContext(Al)),Bl.Provider._context=Bl,Bl.Consumer._context=Bl,Bl);var Bl,Al;Fl.Provider=kl.Provider,Fl.Consumer=kl.Consumer;const Ol=()=>{const e=[],t=function(t){Ja(`${Za}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`);const r=[];return zo(e,((e,i)=>{if(Po.und(t))r.push(e.start());else{const o=n(t,e,i);o&&r.push(e.start(o))}})),r};t.current=e,t.add=function(t){e.includes(t)||e.push(t)},t.delete=function(t){const n=e.indexOf(t);~n&&e.splice(n,1)},t.pause=function(){return zo(e,(e=>e.pause(...arguments))),this},t.resume=function(){return zo(e,(e=>e.resume(...arguments))),this},t.set=function(t){zo(e,(e=>e.set(t)))},t.start=function(t){const n=[];return zo(e,((e,r)=>{if(Po.und(t))n.push(e.start());else{const i=this._getProps(t,e,r);i&&n.push(e.start(i))}})),n},t.stop=function(){return zo(e,(e=>e.stop(...arguments))),this},t.update=function(t){return zo(e,((e,n)=>e.update(this._getProps(t,e,n)))),this};const n=function(e,t,n){return Po.fun(e)?e(n,t):e};return t._getProps=n,t};function jl(e,t){const n=Po.fun(e),[[r],i]=function(e,t,n){const r=Po.fun(t)&&t;r&&!n&&(n=[]);const i=h((()=>r||3==arguments.length?Ol():void 0),[]),o=l(0),a=rs(),s=h((()=>({ctrls:[],queue:[],flush(e,t){const n=vl(e,t);return o.current>0&&!s.queue.length&&!Object.keys(n).some((t=>!e.springs[t]))?yl(e,t):new Promise((r=>{wl(e,n),s.queue.push((()=>{r(yl(e,t))})),a()}))}})),[]),c=l([...s.ctrls]),u=[],p=as(e)||0;function f(e,n){for(let i=e;i<n;i++){const e=c.current[i]||(c.current[i]=new ml(null,s.flush)),n=r?r(i,e):t[i];n&&(u[i]=cl(n))}}h((()=>{zo(c.current.slice(e,p),(e=>{!function(e,t){var n;null==(n=e.ref)||n.delete(e),null==t||t.delete(e)}(e,i),e.stop(!0)})),c.current.length=e,f(p,e)}),[e]),h((()=>{f(0,Math.min(p,e))}),n);const g=c.current.map(((e,t)=>vl(e,u[t]))),m=d(Fl),y=as(m),b=m!==y&&function(e){for(const t in e)return!0;return!1}(m);ts((()=>{o.current++,s.ctrls=c.current;const{queue:e}=s;e.length&&(s.queue=[],zo(e,(e=>e()))),zo(c.current,((e,t)=>{null==i||i.add(e),b&&e.start({default:m});const n=u[t];n&&(function(e,t){var n;t&&e.ref!==t&&(null==(n=e.ref)||n.delete(e),t.add(e),e.ref=t)}(e,n.ref),e.ref?e.queue.push(n):e.start(n))}))})),is((()=>()=>{zo(s.ctrls,(e=>e.stop(!0)))}));const v=g.map((e=>xs({},e)));return i?[v,i]:v}(1,n?e:[e],n?t||[]:t);return n||2==arguments.length?[r,i]:r}let El;!function(e){e.MOUNT="mount",e.ENTER="enter",e.UPDATE="update",e.LEAVE="leave"}(El||(El={}));class Dl extends Ys{constructor(e,t){super(),this.key=void 0,this.idle=!0,this.calc=void 0,this._active=new Set,this.source=e,this.calc=wa(...t);const n=this._get(),r=bs(n);cs(this,r.create(n))}advance(e){const t=this._get();Co(t,this.get())||(ls(this).setValue(t),this._onChange(t,this.idle)),!this.idle&&Cl(this._active)&&zl(this)}_get(){const e=Po.arr(this.source)?this.source.map(Da):Ho(Da(this.source));return this.calc(...e)}_start(){this.idle&&!Cl(this._active)&&(this.idle=!1,zo(us(this),(e=>{e.done=!1})),Uo.skipAnimation?(go.batchedUpdates((()=>this.advance())),zl(this)):Ko.start(this))}_attach(){let e=1;zo(Ho(this.source),(t=>{Ea(t)&&Ha(t,this),Zs(t)&&(t.idle||this._active.add(t),e=Math.max(e,t.priority+1))})),this.priority=e,this._start()}_detach(){zo(Ho(this.source),(e=>{Ea(e)&&Ta(e,this)})),this._active.clear(),zl(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=Ho(this.source).reduce(((e,t)=>Math.max(e,(Zs(t)?t.priority:0)+1)),0))}}function Pl(e){return!1!==e.idle}function Cl(e){return!e.size||Array.from(e).every(Pl)}function zl(e){e.idle||(e.idle=!0,zo(us(e),(e=>{e.done=!0})),Ca(e,{type:"idle",parent:e}))}function Il(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}Uo.assign({createStringInterpolator:Xa,to:(e,t)=>new Dl(e,t)});const Hl=["style","children","scrollTop","scrollLeft","viewBox"],Tl=/^--/;function Nl(e,t){return null==t||"boolean"==typeof t||""===t?"":"number"!=typeof t||0===t||Tl.test(e)||Vl.hasOwnProperty(e)&&Vl[e]?(""+t).trim():t+"px"}const Ml={};let Vl={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 Rl=["Webkit","Ms","Moz","O"];Vl=Object.keys(Vl).reduce(((e,t)=>(Rl.forEach((n=>e[((e,t)=>e+t.charAt(0).toUpperCase()+t.substring(1))(n,t)]=e[t])),e)),Vl);const Ll=["x","y","z"],Wl=/^(matrix|translate|scale|rotate|skew)/,ql=/^(translate)/,Ul=/^(rotate|skew)/,Ql=(e,t)=>Po.num(e)&&0!==e?e+t:e,Gl=(e,t)=>Po.arr(e)?e.every((e=>Gl(e,t))):Po.num(e)?e===t:parseFloat(e)===t;class Xl extends gs{constructor(e){let{x:t,y:n,z:r}=e,i=Il(e,Ll);const o=[],a=[];(t||n||r)&&(o.push([t||0,n||0,r||0]),a.push((e=>[`translate3d(${e.map((e=>Ql(e,"px"))).join(",")})`,Gl(e,0)]))),Io(i,((e,t)=>{if("transform"===t)o.push([e||""]),a.push((e=>[e,""===e]));else if(Wl.test(t)){if(delete i[t],Po.und(e))return;const n=ql.test(t)?"px":Ul.test(t)?"deg":"";o.push(Ho(e)),a.push("rotate3d"===t?([e,t,r,i])=>[`rotate3d(${e},${t},${r},${Ql(i,n)})`,Gl(i,0)]:e=>[`${t}(${e.map((e=>Ql(e,n))).join(",")})`,Gl(e,t.startsWith("scale")?1:0)])}})),o.length&&(i.transform=new Zl(o,a)),super(i)}}class Zl extends za{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 zo(this.inputs,((n,r)=>{const i=Da(n[0]),[o,a]=this.transforms[r](Po.arr(i)?i:n.map(Da));e+=" "+o,t=t&&a})),t?"none":e}observerAdded(e){1==e&&zo(this.inputs,(e=>zo(e,(e=>Ea(e)&&Ha(e,this)))))}observerRemoved(e){0==e&&zo(this.inputs,(e=>zo(e,(e=>Ea(e)&&Ta(e,this)))))}eventObserved(e){"change"==e.type&&(this._value=null),Ca(this,e)}}const Kl=["scrollTop","scrollLeft"];Uo.assign({batchedUpdates:p,createStringInterpolator:Xa,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}});const Yl=((e,{applyAnimatedValues:t=(()=>!1),createAnimatedStyle:n=(e=>new gs(e)),getComponentProps:r=(e=>e)}={})=>{const i={applyAnimatedValues:t,createAnimatedStyle:n,getComponentProps:r},o=e=>{const t=$s(e)||"Anonymous";return(e=Po.str(e)?o[e]||(o[e]=ws(e,i)):e[Ss]||(e[Ss]=ws(e,i))).displayName=`Animated(${t})`,e};return Io(e,((t,n)=>{Po.arr(e)&&(n=$s(t)),o[n]=o(t)})),{animated:o}})(["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"],{applyAnimatedValues:function(e,t){if(!e.nodeType||!e.setAttribute)return!1;const n="filter"===e.nodeName||e.parentNode&&"filter"===e.parentNode.nodeName,r=t,{style:i,children:o,scrollTop:a,scrollLeft:s,viewBox:l}=r,c=Il(r,Hl),u=Object.values(c),d=Object.keys(c).map((t=>n||e.hasAttribute(t)?t:Ml[t]||(Ml[t]=t.replace(/([A-Z])/g,(e=>"-"+e.toLowerCase())))));void 0!==o&&(e.textContent=o);for(let t in i)if(i.hasOwnProperty(t)){const n=Nl(t,i[t]);Tl.test(t)?e.style.setProperty(t,n):e.style[t]=n}d.forEach(((t,n)=>{e.setAttribute(t,u[n])})),void 0!==a&&(e.scrollTop=a),void 0!==s&&(e.scrollLeft=s),void 0!==l&&e.setAttribute("viewBox",l)},createAnimatedStyle:e=>new Xl(e),getComponentProps:e=>Il(e,Kl)}),Jl=Yl.animated,ec=(e,t,n)=>t?mi(n,t)||mi(e,t):n||e,tc=(e,t)=>{const n=t||e.defaultValue;return mi(e.collections,n)};var nc;!function(e){e.colorScheme="colorScheme",e.layout="layout",e.textStyleScheme="textStyleScheme",e.designTokenScheme="designTokenScheme",e.resourceScheme="resourceScheme"}(nc||(nc={}));const rc={collections:{base:{Brand:{1:"#EF413D",2:"#F26664",3:"#F58E8B",4:"#F9B5B2",5:"#FDDDD7",6:"#FFEEEA"},Primary:"#1C76D5",PrimaryDark:"#1869BF",Secondary:"#0056b3",Accent:{Dark:{1:"#4B539F",2:"#6D74B1",3:"#959BC5"},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)"}},bookingsg:{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:"#977ECC",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)"}},rbs:{Brand:{1:"#3E4DFF",2:"#AEACFF",3:"#AD44FF",4:"#F9B5B2",5:"#FDDDD7",6:"#FFEEEA"},Primary:"#4855D4",PrimaryDark:"#3E49B2",Secondary:"#364891",Accent:{Dark:{1:"#5E516E",2:"#7A6F87",3:"#C5C0CC"},Light:{1:"#8397FC",2:"#ABB8FC",3:"#CED6FD ",4:"#E1E4FA",5:"#F0F2FF",6:"#FAFBFF"}},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(90, 87, 255, 0.5)",Red:"rgba(221, 102, 102, 0.8)",Elevation:"rgba(75, 83, 159, 0.24)"}}},defaultValue:"base"},ic=e=>t=>{const n=t.theme,r=tc(rc,n[nc.colorScheme]);return n.options&&n.options.color?ec(r,e,n.options.color):ec(r,e)},oc={Brand:{1:ic("Brand.1"),2:ic("Brand.2"),3:ic("Brand.3"),4:ic("Brand.4"),5:ic("Brand.5"),6:ic("Brand.6")},Primary:ic("Primary"),PrimaryDark:ic("PrimaryDark"),Secondary:ic("Secondary"),Accent:{Light:{1:ic("Accent.Light.1"),2:ic("Accent.Light.2"),3:ic("Accent.Light.3"),4:ic("Accent.Light.4"),5:ic("Accent.Light.5"),6:ic("Accent.Light.6")},Dark:{1:ic("Accent.Dark.1"),2:ic("Accent.Dark.2"),3:ic("Accent.Dark.3")}},Neutral:{1:ic("Neutral.1"),2:ic("Neutral.2"),3:ic("Neutral.3"),4:ic("Neutral.4"),5:ic("Neutral.5"),6:ic("Neutral.6"),7:ic("Neutral.7"),8:ic("Neutral.8")},Validation:{Green:{Text:ic("Validation.Green.Text"),Icon:ic("Validation.Green.Icon"),Border:ic("Validation.Green.Border"),Background:ic("Validation.Green.Background")},Orange:{Text:ic("Validation.Orange.Text"),Icon:ic("Validation.Orange.Icon"),Border:ic("Validation.Orange.Border"),Background:ic("Validation.Orange.Background"),Badge:ic("Validation.Orange.Badge")},Red:{Text:ic("Validation.Red.Text"),Icon:ic("Validation.Red.Icon"),Border:ic("Validation.Red.Border"),Background:ic("Validation.Red.Background")},Blue:{Text:ic("Validation.Blue.Text"),Icon:ic("Validation.Blue.Icon"),Border:ic("Validation.Blue.Border"),Background:ic("Validation.Blue.Background")}},Shadow:{Accent:ic("Shadow.Accent"),Red:ic("Shadow.Red"),Elevation:ic("Shadow.Elevation")}},ac={mobileS:320,mobileM:375,mobileL:480,tablet:1199,desktopM:1399,desktopL:1999,desktop4k:3840},sc=e=>Object.keys(ac).reduce(((t,n)=>{const r=ac[n];return t[n]=`@media screen and (${e}: ${r}px)`,t}),{}),lc=sc("max-width"),cc=(sc("min-width"),f.div`
1
+ import{jsxs as e,jsx as t,Fragment as n}from"react/jsx-runtime";import*as r from"react";import i,{useEffect as o,useLayoutEffect as a,useState as s,useRef as l,forwardRef as c,useCallback as u,useContext as d,useMemo as h}from"react";import{unstable_batchedUpdates as p}from"react-dom";import f,{keyframes as g,css as m}from"styled-components";import{ExternalIcon as y}from"@lifesg/react-icons/external";import{ExclamationCircleFillIcon as b}from"@lifesg/react-icons/exclamation-circle-fill";import{TickIcon as v}from"@lifesg/react-icons/tick";import{CrossIcon as w}from"@lifesg/react-icons/cross";import{MagnifierIcon as _}from"@lifesg/react-icons/magnifier";import{ChevronDownIcon as S}from"@lifesg/react-icons/chevron-down";var $="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};var x=function(e,t,n,r){for(var i=e.length,o=n+(r?1:-1);r?o--:++o<i;)if(t(e[o],o,e))return o;return-1};var F=function(){this.__data__=[],this.size=0};var k=function(e,t){return e===t||e!=e&&t!=t},B=k;var A=function(e,t){for(var n=e.length;n--;)if(B(e[n][0],t))return n;return-1},O=A,j=Array.prototype.splice;var E=A;var D=A;var P=A;var z=F,C=function(e){var t=this.__data__,n=O(t,e);return!(n<0)&&(n==t.length-1?t.pop():j.call(t,n,1),--this.size,!0)},I=function(e){var t=this.__data__,n=E(t,e);return n<0?void 0:t[n][1]},H=function(e){return D(this.__data__,e)>-1},T=function(e,t){var n=this.__data__,r=P(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this};function N(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}N.prototype.clear=z,N.prototype.delete=C,N.prototype.get=I,N.prototype.has=H,N.prototype.set=T;var M=N,V=M;var R=function(){this.__data__=new V,this.size=0};var L=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n};var W=function(e){return this.__data__.get(e)};var q=function(e){return this.__data__.has(e)},U="object"==typeof $&&$&&$.Object===Object&&$,Q=U,G="object"==typeof self&&self&&self.Object===Object&&self,X=Q||G||Function("return this")(),Z=X.Symbol,K=Z,Y=Object.prototype,J=Y.hasOwnProperty,ee=Y.toString,te=K?K.toStringTag:void 0;var ne=function(e){var t=J.call(e,te),n=e[te];try{e[te]=void 0;var r=!0}catch(e){}var i=ee.call(e);return r&&(t?e[te]=n:delete e[te]),i},re=Object.prototype.toString;var ie=ne,oe=function(e){return re.call(e)},ae=Z?Z.toStringTag:void 0;var se=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":ae&&ae in Object(e)?ie(e):oe(e)};var le=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)},ce=se,ue=le;var de,he=function(e){if(!ue(e))return!1;var t=ce(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t},pe=X["__core-js_shared__"],fe=(de=/[^.]+$/.exec(pe&&pe.keys&&pe.keys.IE_PROTO||""))?"Symbol(src)_1."+de:"";var ge=function(e){return!!fe&&fe in e},me=Function.prototype.toString;var ye=function(e){if(null!=e){try{return me.call(e)}catch(e){}try{return e+""}catch(e){}}return""},be=he,ve=ge,we=le,_e=ye,Se=/^\[object .+?Constructor\]$/,$e=Function.prototype,xe=Object.prototype,Fe=$e.toString,ke=xe.hasOwnProperty,Be=RegExp("^"+Fe.call(ke).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");var Ae=function(e){return!(!we(e)||ve(e))&&(be(e)?Be:Se).test(_e(e))},Oe=function(e,t){return null==e?void 0:e[t]};var je=function(e,t){var n=Oe(e,t);return Ae(n)?n:void 0},Ee=je(X,"Map"),De=je(Object,"create"),Pe=De;var ze=function(){this.__data__=Pe?Pe(null):{},this.size=0};var Ce=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},Ie=De,He=Object.prototype.hasOwnProperty;var Te=function(e){var t=this.__data__;if(Ie){var n=t[e];return"__lodash_hash_undefined__"===n?void 0:n}return He.call(t,e)?t[e]:void 0},Ne=De,Me=Object.prototype.hasOwnProperty;var Ve=De;var Re=ze,Le=Ce,We=Te,qe=function(e){var t=this.__data__;return Ne?void 0!==t[e]:Me.call(t,e)},Ue=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=Ve&&void 0===t?"__lodash_hash_undefined__":t,this};function Qe(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}Qe.prototype.clear=Re,Qe.prototype.delete=Le,Qe.prototype.get=We,Qe.prototype.has=qe,Qe.prototype.set=Ue;var Ge=Qe,Xe=M,Ze=Ee;var Ke=function(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e};var Ye=function(e,t){var n=e.__data__;return Ke(t)?n["string"==typeof t?"string":"hash"]:n.map},Je=Ye;var et=Ye;var tt=Ye;var nt=Ye;var rt=function(){this.size=0,this.__data__={hash:new Ge,map:new(Ze||Xe),string:new Ge}},it=function(e){var t=Je(this,e).delete(e);return this.size-=t?1:0,t},ot=function(e){return et(this,e).get(e)},at=function(e){return tt(this,e).has(e)},st=function(e,t){var n=nt(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this};function lt(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}lt.prototype.clear=rt,lt.prototype.delete=it,lt.prototype.get=ot,lt.prototype.has=at,lt.prototype.set=st;var ct=lt,ut=M,dt=Ee,ht=ct;var pt=M,ft=R,gt=L,mt=W,yt=q,bt=function(e,t){var n=this.__data__;if(n instanceof ut){var r=n.__data__;if(!dt||r.length<199)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new ht(r)}return n.set(e,t),this.size=n.size,this};function vt(e){var t=this.__data__=new pt(e);this.size=t.size}vt.prototype.clear=ft,vt.prototype.delete=gt,vt.prototype.get=mt,vt.prototype.has=yt,vt.prototype.set=bt;var wt=vt;var _t=ct,St=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this},$t=function(e){return this.__data__.has(e)};function xt(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new _t;++t<n;)this.add(e[t])}xt.prototype.add=xt.prototype.push=St,xt.prototype.has=$t;var Ft=xt,kt=function(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1},Bt=function(e,t){return e.has(t)};var At=function(e,t,n,r,i,o){var a=1&n,s=e.length,l=t.length;if(s!=l&&!(a&&l>s))return!1;var c=o.get(e),u=o.get(t);if(c&&u)return c==t&&u==e;var d=-1,h=!0,p=2&n?new Ft:void 0;for(o.set(e,t),o.set(t,e);++d<s;){var f=e[d],g=t[d];if(r)var m=a?r(g,f,d,t,e,o):r(f,g,d,e,t,o);if(void 0!==m){if(m)continue;h=!1;break}if(p){if(!kt(t,(function(e,t){if(!Bt(p,t)&&(f===e||i(f,e,n,r,o)))return p.push(t)}))){h=!1;break}}else if(f!==g&&!i(f,g,n,r,o)){h=!1;break}}return o.delete(e),o.delete(t),h};var Ot=X.Uint8Array,jt=k,Et=At,Dt=function(e){var t=-1,n=Array(e.size);return e.forEach((function(e,r){n[++t]=[r,e]})),n},Pt=function(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=e})),n},zt=Z?Z.prototype:void 0,Ct=zt?zt.valueOf:void 0;var It=function(e,t,n,r,i,o,a){switch(n){case"[object DataView]":if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case"[object ArrayBuffer]":return!(e.byteLength!=t.byteLength||!o(new Ot(e),new Ot(t)));case"[object Boolean]":case"[object Date]":case"[object Number]":return jt(+e,+t);case"[object Error]":return e.name==t.name&&e.message==t.message;case"[object RegExp]":case"[object String]":return e==t+"";case"[object Map]":var s=Dt;case"[object Set]":var l=1&r;if(s||(s=Pt),e.size!=t.size&&!l)return!1;var c=a.get(e);if(c)return c==t;r|=2,a.set(e,t);var u=Et(s(e),s(t),r,i,o,a);return a.delete(e),u;case"[object Symbol]":if(Ct)return Ct.call(e)==Ct.call(t)}return!1};var Ht=function(e,t){for(var n=-1,r=t.length,i=e.length;++n<r;)e[i+n]=t[n];return e},Tt=Array.isArray,Nt=Ht,Mt=Tt;var Vt=function(e,t,n){var r=t(e);return Mt(e)?r:Nt(r,n(e))};var Rt=function(e,t){for(var n=-1,r=null==e?0:e.length,i=0,o=[];++n<r;){var a=e[n];t(a,n,e)&&(o[i++]=a)}return o},Lt=function(){return[]},Wt=Object.prototype.propertyIsEnumerable,qt=Object.getOwnPropertySymbols,Ut=qt?function(e){return null==e?[]:(e=Object(e),Rt(qt(e),(function(t){return Wt.call(e,t)})))}:Lt;var Qt=function(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r};var Gt=function(e){return null!=e&&"object"==typeof e},Xt=se,Zt=Gt;var Kt=function(e){return Zt(e)&&"[object Arguments]"==Xt(e)},Yt=Gt,Jt=Object.prototype,en=Jt.hasOwnProperty,tn=Jt.propertyIsEnumerable,nn=Kt(function(){return arguments}())?Kt:function(e){return Yt(e)&&en.call(e,"callee")&&!tn.call(e,"callee")},rn={exports:{}};var on=function(){return!1};!function(e,t){var n=X,r=on,i=t&&!t.nodeType&&t,o=i&&e&&!e.nodeType&&e,a=o&&o.exports===i?n.Buffer:void 0,s=(a?a.isBuffer:void 0)||r;e.exports=s}(rn,rn.exports);var an=/^(?:0|[1-9]\d*)$/;var sn=function(e,t){var n=typeof e;return!!(t=null==t?9007199254740991:t)&&("number"==n||"symbol"!=n&&an.test(e))&&e>-1&&e%1==0&&e<t};var ln=function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991},cn=se,un=ln,dn=Gt,hn={};hn["[object Float32Array]"]=hn["[object Float64Array]"]=hn["[object Int8Array]"]=hn["[object Int16Array]"]=hn["[object Int32Array]"]=hn["[object Uint8Array]"]=hn["[object Uint8ClampedArray]"]=hn["[object Uint16Array]"]=hn["[object Uint32Array]"]=!0,hn["[object Arguments]"]=hn["[object Array]"]=hn["[object ArrayBuffer]"]=hn["[object Boolean]"]=hn["[object DataView]"]=hn["[object Date]"]=hn["[object Error]"]=hn["[object Function]"]=hn["[object Map]"]=hn["[object Number]"]=hn["[object Object]"]=hn["[object RegExp]"]=hn["[object Set]"]=hn["[object String]"]=hn["[object WeakMap]"]=!1;var pn=function(e){return dn(e)&&un(e.length)&&!!hn[cn(e)]};var fn=function(e){return function(t){return e(t)}},gn={exports:{}};!function(e,t){var n=U,r=t&&!t.nodeType&&t,i=r&&e&&!e.nodeType&&e,o=i&&i.exports===r&&n.process,a=function(){try{var e=i&&i.require&&i.require("util").types;return e||o&&o.binding&&o.binding("util")}catch(e){}}();e.exports=a}(gn,gn.exports);var mn=pn,yn=fn,bn=gn.exports,vn=bn&&bn.isTypedArray,wn=vn?yn(vn):mn,_n=Qt,Sn=nn,$n=Tt,xn=rn.exports,Fn=sn,kn=wn,Bn=Object.prototype.hasOwnProperty;var An=function(e,t){var n=$n(e),r=!n&&Sn(e),i=!n&&!r&&xn(e),o=!n&&!r&&!i&&kn(e),a=n||r||i||o,s=a?_n(e.length,String):[],l=s.length;for(var c in e)!t&&!Bn.call(e,c)||a&&("length"==c||i&&("offset"==c||"parent"==c)||o&&("buffer"==c||"byteLength"==c||"byteOffset"==c)||Fn(c,l))||s.push(c);return s},On=Object.prototype;var jn=function(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||On)};var En=function(e,t){return function(n){return e(t(n))}}(Object.keys,Object),Dn=jn,Pn=En,zn=Object.prototype.hasOwnProperty;var Cn=he,In=ln;var Hn=function(e){return null!=e&&In(e.length)&&!Cn(e)},Tn=An,Nn=function(e){if(!Dn(e))return Pn(e);var t=[];for(var n in Object(e))zn.call(e,n)&&"constructor"!=n&&t.push(n);return t},Mn=Hn;var Vn=function(e){return Mn(e)?Tn(e):Nn(e)},Rn=Vt,Ln=Ut,Wn=Vn;var qn=function(e){return Rn(e,Wn,Ln)},Un=Object.prototype.hasOwnProperty;var Qn=function(e,t,n,r,i,o){var a=1&n,s=qn(e),l=s.length;if(l!=qn(t).length&&!a)return!1;for(var c=l;c--;){var u=s[c];if(!(a?u in t:Un.call(t,u)))return!1}var d=o.get(e),h=o.get(t);if(d&&h)return d==t&&h==e;var p=!0;o.set(e,t),o.set(t,e);for(var f=a;++c<l;){var g=e[u=s[c]],m=t[u];if(r)var y=a?r(m,g,u,t,e,o):r(g,m,u,e,t,o);if(!(void 0===y?g===m||i(g,m,n,r,o):y)){p=!1;break}f||(f="constructor"==u)}if(p&&!f){var b=e.constructor,v=t.constructor;b==v||!("constructor"in e)||!("constructor"in t)||"function"==typeof b&&b instanceof b&&"function"==typeof v&&v instanceof v||(p=!1)}return o.delete(e),o.delete(t),p},Gn=je(X,"DataView"),Xn=Ee,Zn=je(X,"Promise"),Kn=je(X,"Set"),Yn=je(X,"WeakMap"),Jn=se,er=ye,tr="[object Map]",nr="[object Promise]",rr="[object Set]",ir="[object WeakMap]",or="[object DataView]",ar=er(Gn),sr=er(Xn),lr=er(Zn),cr=er(Kn),ur=er(Yn),dr=Jn;(Gn&&dr(new Gn(new ArrayBuffer(1)))!=or||Xn&&dr(new Xn)!=tr||Zn&&dr(Zn.resolve())!=nr||Kn&&dr(new Kn)!=rr||Yn&&dr(new Yn)!=ir)&&(dr=function(e){var t=Jn(e),n="[object Object]"==t?e.constructor:void 0,r=n?er(n):"";if(r)switch(r){case ar:return or;case sr:return tr;case lr:return nr;case cr:return rr;case ur:return ir}return t});var hr=wt,pr=At,fr=It,gr=Qn,mr=dr,yr=Tt,br=rn.exports,vr=wn,wr="[object Arguments]",_r="[object Array]",Sr="[object Object]",$r=Object.prototype.hasOwnProperty;var xr=function(e,t,n,r,i,o){var a=yr(e),s=yr(t),l=a?_r:mr(e),c=s?_r:mr(t),u=(l=l==wr?Sr:l)==Sr,d=(c=c==wr?Sr:c)==Sr,h=l==c;if(h&&br(e)){if(!br(t))return!1;a=!0,u=!1}if(h&&!u)return o||(o=new hr),a||vr(e)?pr(e,t,n,r,i,o):fr(e,t,l,n,r,i,o);if(!(1&n)){var p=u&&$r.call(e,"__wrapped__"),f=d&&$r.call(t,"__wrapped__");if(p||f){var g=p?e.value():e,m=f?t.value():t;return o||(o=new hr),i(g,m,n,r,o)}}return!!h&&(o||(o=new hr),gr(e,t,n,r,i,o))},Fr=Gt;var kr=function e(t,n,r,i,o){return t===n||(null==t||null==n||!Fr(t)&&!Fr(n)?t!=t&&n!=n:xr(t,n,r,i,e,o))},Br=wt,Ar=kr;var Or=le;var jr=function(e){return e==e&&!Or(e)},Er=jr,Dr=Vn;var Pr=function(e,t){return function(n){return null!=n&&(n[e]===t&&(void 0!==t||e in Object(n)))}},zr=function(e,t,n,r){var i=n.length,o=i,a=!r;if(null==e)return!o;for(e=Object(e);i--;){var s=n[i];if(a&&s[2]?s[1]!==e[s[0]]:!(s[0]in e))return!1}for(;++i<o;){var l=(s=n[i])[0],c=e[l],u=s[1];if(a&&s[2]){if(void 0===c&&!(l in e))return!1}else{var d=new Br;if(r)var h=r(c,u,l,e,t,d);if(!(void 0===h?Ar(u,c,3,r,d):h))return!1}}return!0},Cr=function(e){for(var t=Dr(e),n=t.length;n--;){var r=t[n],i=e[r];t[n]=[r,i,Er(i)]}return t},Ir=Pr;var Hr=function(e){var t=Cr(e);return 1==t.length&&t[0][2]?Ir(t[0][0],t[0][1]):function(n){return n===e||zr(n,e,t)}},Tr=se,Nr=Gt;var Mr=function(e){return"symbol"==typeof e||Nr(e)&&"[object Symbol]"==Tr(e)},Vr=Tt,Rr=Mr,Lr=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Wr=/^\w*$/;var qr=function(e,t){if(Vr(e))return!1;var n=typeof e;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=e&&!Rr(e))||(Wr.test(e)||!Lr.test(e)||null!=t&&e in Object(t))},Ur=ct;function Qr(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new TypeError("Expected a function");var n=function(){var r=arguments,i=t?t.apply(this,r):r[0],o=n.cache;if(o.has(i))return o.get(i);var a=e.apply(this,r);return n.cache=o.set(i,a)||o,a};return n.cache=new(Qr.Cache||Ur),n}Qr.Cache=Ur;var Gr=Qr;var Xr=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Zr=/\\(\\)?/g,Kr=function(e){var t=Gr(e,(function(e){return 500===n.size&&n.clear(),e})),n=t.cache;return t}((function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(Xr,(function(e,n,r,i){t.push(r?i.replace(Zr,"$1"):n||e)})),t}));var Yr=function(e,t){for(var n=-1,r=null==e?0:e.length,i=Array(r);++n<r;)i[n]=t(e[n],n,e);return i},Jr=Tt,ei=Mr,ti=Z?Z.prototype:void 0,ni=ti?ti.toString:void 0;var ri=function e(t){if("string"==typeof t)return t;if(Jr(t))return Yr(t,e)+"";if(ei(t))return ni?ni.call(t):"";var n=t+"";return"0"==n&&1/t==-Infinity?"-0":n},ii=ri;var oi=Tt,ai=qr,si=Kr,li=function(e){return null==e?"":ii(e)};var ci=function(e,t){return oi(e)?e:ai(e,t)?[e]:si(li(e))},ui=Mr;var di=function(e){if("string"==typeof e||ui(e))return e;var t=e+"";return"0"==t&&1/e==-Infinity?"-0":t},hi=ci,pi=di;var fi=function(e,t){for(var n=0,r=(t=hi(t,e)).length;null!=e&&n<r;)e=e[pi(t[n++])];return n&&n==r?e:void 0},gi=fi;var mi=function(e,t,n){var r=null==e?void 0:gi(e,t);return void 0===r?n:r};var yi=ci,bi=nn,vi=Tt,wi=sn,_i=ln,Si=di;var $i=function(e,t){return null!=e&&t in Object(e)},xi=function(e,t,n){for(var r=-1,i=(t=yi(t,e)).length,o=!1;++r<i;){var a=Si(t[r]);if(!(o=null!=e&&n(e,a)))break;e=e[a]}return o||++r!=i?o:!!(i=null==e?0:e.length)&&_i(i)&&wi(a,i)&&(vi(e)||bi(e))};var Fi=kr,ki=mi,Bi=function(e,t){return null!=e&&xi(e,t,$i)},Ai=qr,Oi=jr,ji=Pr,Ei=di;var Di=fi;var Pi=function(e){return function(t){return null==t?void 0:t[e]}},zi=function(e){return function(t){return Di(t,e)}},Ci=qr,Ii=di;var Hi=Hr,Ti=function(e,t){return Ai(e)&&Oi(t)?ji(Ei(e),t):function(n){var r=ki(n,e);return void 0===r&&r===t?Bi(n,e):Fi(t,r,3)}},Ni=function(e){return e},Mi=Tt,Vi=function(e){return Ci(e)?Pi(Ii(e)):zi(e)};var Ri=function(e){return"function"==typeof e?e:null==e?Ni:"object"==typeof e?Mi(e)?Ti(e[0],e[1]):Hi(e):Vi(e)},Li=/\s/;var Wi=function(e){for(var t=e.length;t--&&Li.test(e.charAt(t)););return t},qi=/^\s+/;var Ui=function(e){return e?e.slice(0,Wi(e)+1).replace(qi,""):e},Qi=le,Gi=Mr,Xi=/^[-+]0x[0-9a-f]+$/i,Zi=/^0b[01]+$/i,Ki=/^0o[0-7]+$/i,Yi=parseInt;var Ji=function(e){if("number"==typeof e)return e;if(Gi(e))return NaN;if(Qi(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=Qi(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=Ui(e);var n=Zi.test(e);return n||Ki.test(e)?Yi(e.slice(2),n?2:8):Xi.test(e)?NaN:+e},eo=1/0;var to=function(e){return e?(e=Ji(e))===eo||e===-1/0?17976931348623157e292*(e<0?-1:1):e==e?e:0:0===e?e:0};var no=x,ro=Ri,io=function(e){var t=to(e),n=t%1;return t==t?n?t-n:t:0},oo=Math.max;var ao=function(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var i=null==n?0:io(n);return i<0&&(i=oo(r+i,0)),no(e,ro(t),i)},so=Ri,lo=Hn,co=Vn;var uo=function(e){return function(t,n,r){var i=Object(t);if(!lo(t)){var o=so(n);t=co(t),n=function(e){return o(i[e],e,i)}}var a=e(t,n,r);return a>-1?i[o?t[a]:a]:void 0}}(ao),ho=kr;var po=function(e,t){return ho(e,t)};let fo=jo();const go=e=>ko(e,fo);let mo=jo();go.write=e=>ko(e,mo);let yo=jo();go.onStart=e=>ko(e,yo);let bo=jo();go.onFrame=e=>ko(e,bo);let vo=jo();go.onFinish=e=>ko(e,vo);let wo=[];go.setTimeout=(e,t)=>{let n=go.now()+t,r=()=>{let e=wo.findIndex((e=>e.cancel==r));~e&&wo.splice(e,1),xo-=~e?1:0},i={time:n,handler:e,cancel:r};return wo.splice(_o(n),0,i),xo+=1,Bo(),i};let _o=e=>~(~wo.findIndex((t=>t.time>e))||~wo.length);go.cancel=e=>{yo.delete(e),bo.delete(e),vo.delete(e),fo.delete(e),mo.delete(e)},go.sync=e=>{Fo=!0,go.batchedUpdates(e),Fo=!1},go.throttle=e=>{let t;function n(){try{e(...t)}finally{t=null}}function r(...e){t=e,go.onStart(n)}return r.handler=e,r.cancel=()=>{yo.delete(n),t=null},r};let So="undefined"!=typeof window?window.requestAnimationFrame:()=>{};go.use=e=>So=e,go.now="undefined"!=typeof performance?()=>performance.now():Date.now,go.batchedUpdates=e=>e(),go.catch=console.error,go.frameLoop="always",go.advance=()=>{"demand"!==go.frameLoop?console.warn("Cannot call the manual advancement of rafz whilst frameLoop is not set as demand"):Oo()};let $o=-1,xo=0,Fo=!1;function ko(e,t){Fo?(t.delete(e),e(0)):(t.add(e),Bo())}function Bo(){$o<0&&($o=0,"demand"!==go.frameLoop&&So(Ao))}function Ao(){~$o&&(So(Ao),go.batchedUpdates(Oo))}function Oo(){let e=$o;$o=go.now();let t=_o($o);t&&(Eo(wo.splice(0,t),(e=>e.handler())),xo-=t),xo?(yo.flush(),fo.flush(e?Math.min(64,$o-e):16.667),bo.flush(),mo.flush(),vo.flush()):$o=-1}function jo(){let e=new Set,t=e;return{add(n){xo+=t!=e||e.has(n)?0:1,e.add(n)},delete:n=>(xo-=t==e&&e.has(n)?1:0,e.delete(n)),flush(n){t.size&&(e=new Set,xo-=t.size,Eo(t,(t=>t(n)&&e.add(t))),xo+=e.size,t=e)}}}function Eo(e,t){e.forEach((e=>{try{t(e)}catch(e){go.catch(e)}}))}function Do(){}const Po={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 zo(e,t){if(Po.arr(e)){if(!Po.arr(t)||e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}return e===t}const Co=(e,t)=>e.forEach(t);function Io(e,t,n){if(Po.arr(e))for(let r=0;r<e.length;r++)t.call(n,e[r],`${r}`);else for(const r in e)e.hasOwnProperty(r)&&t.call(n,e[r],r)}const Ho=e=>Po.und(e)?[]:Po.arr(e)?e:[e];function To(e,t){if(e.size){const n=Array.from(e);e.clear(),Co(n,t)}}const No=(e,...t)=>To(e,(e=>e(...t))),Mo=()=>"undefined"==typeof window||!window.navigator||/ServerSideRendering|^Deno\//.test(window.navigator.userAgent);let Vo,Ro,Lo=null,Wo=!1,qo=Do;var Uo=Object.freeze({__proto__:null,get createStringInterpolator(){return Vo},get to(){return Ro},get colors(){return Lo},get skipAnimation(){return Wo},get willAdvance(){return qo},assign:e=>{e.to&&(Ro=e.to),e.now&&(go.now=e.now),void 0!==e.colors&&(Lo=e.colors),null!=e.skipAnimation&&(Wo=e.skipAnimation),e.createStringInterpolator&&(Vo=e.createStringInterpolator),e.requestAnimationFrame&&go.use(e.requestAnimationFrame),e.batchedUpdates&&(go.batchedUpdates=e.batchedUpdates),e.willAdvance&&(qo=e.willAdvance),e.frameLoop&&(go.frameLoop=e.frameLoop)}});const Qo=new Set;let Go=[],Xo=[],Zo=0;const Ko={get idle(){return!Qo.size&&!Go.length},start(e){Zo>e.priority?(Qo.add(e),go.onStart(Yo)):(Jo(e),go(ta))},advance:ta,sort(e){if(Zo)go.onFrame((()=>Ko.sort(e)));else{const t=Go.indexOf(e);~t&&(Go.splice(t,1),ea(e))}},clear(){Go=[],Qo.clear()}};function Yo(){Qo.forEach(Jo),Qo.clear(),go(ta)}function Jo(e){Go.includes(e)||ea(e)}function ea(e){Go.splice(function(e,t){const n=e.findIndex(t);return n<0?e.length:n}(Go,(t=>t.priority>e.priority)),0,e)}function ta(e){const t=Xo;for(let n=0;n<Go.length;n++){const r=Go[n];Zo=r.priority,r.idle||(qo(r),r.advance(e),r.idle||t.push(r))}return Zo=0,Xo=Go,Xo.length=0,Go=t,Go.length>0}const na="[-+]?\\d*\\.?\\d+",ra=na+"%";function ia(...e){return"\\(\\s*("+e.join(")\\s*,\\s*(")+")\\s*\\)"}const oa=new RegExp("rgb"+ia(na,na,na)),aa=new RegExp("rgba"+ia(na,na,na,na)),sa=new RegExp("hsl"+ia(na,ra,ra)),la=new RegExp("hsla"+ia(na,ra,ra,na)),ca=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,ua=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,da=/^#([0-9a-fA-F]{6})$/,ha=/^#([0-9a-fA-F]{8})$/;function pa(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+6*(t-e)*n:n<.5?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function fa(e,t,n){const r=n<.5?n*(1+t):n+t-n*t,i=2*n-r,o=pa(i,r,e+1/3),a=pa(i,r,e),s=pa(i,r,e-1/3);return Math.round(255*o)<<24|Math.round(255*a)<<16|Math.round(255*s)<<8}function ga(e){const t=parseInt(e,10);return t<0?0:t>255?255:t}function ma(e){return(parseFloat(e)%360+360)%360/360}function ya(e){const t=parseFloat(e);return t<0?0:t>1?255:Math.round(255*t)}function ba(e){const t=parseFloat(e);return t<0?0:t>100?1:t/100}function va(e){let t=function(e){let t;return"number"==typeof e?e>>>0===e&&e>=0&&e<=4294967295?e:null:(t=da.exec(e))?parseInt(t[1]+"ff",16)>>>0:Lo&&void 0!==Lo[e]?Lo[e]:(t=oa.exec(e))?(ga(t[1])<<24|ga(t[2])<<16|ga(t[3])<<8|255)>>>0:(t=aa.exec(e))?(ga(t[1])<<24|ga(t[2])<<16|ga(t[3])<<8|ya(t[4]))>>>0:(t=ca.exec(e))?parseInt(t[1]+t[1]+t[2]+t[2]+t[3]+t[3]+"ff",16)>>>0:(t=ha.exec(e))?parseInt(t[1],16)>>>0:(t=ua.exec(e))?parseInt(t[1]+t[1]+t[2]+t[2]+t[3]+t[3]+t[4]+t[4],16)>>>0:(t=sa.exec(e))?(255|fa(ma(t[1]),ba(t[2]),ba(t[3])))>>>0:(t=la.exec(e))?(fa(ma(t[1]),ba(t[2]),ba(t[3]))|ya(t[4]))>>>0:null}(e);return null===t?e:(t=t||0,`rgba(${(4278190080&t)>>>24}, ${(16711680&t)>>>16}, ${(65280&t)>>>8}, ${(255&t)/255})`)}const wa=(e,t,n)=>{if(Po.fun(e))return e;if(Po.arr(e))return wa({range:e,output:t,extrapolate:n});if(Po.str(e.output[0]))return Vo(e);const r=e,i=r.output,o=r.range||[0,1],a=r.extrapolateLeft||r.extrapolate||"extend",s=r.extrapolateRight||r.extrapolate||"extend",l=r.easing||(e=>e);return e=>{const t=function(e,t){for(var n=1;n<t.length-1&&!(t[n]>=e);++n);return n-1}(e,o);return function(e,t,n,r,i,o,a,s,l){let c=l?l(e):e;if(c<t){if("identity"===a)return c;"clamp"===a&&(c=t)}if(c>n){if("identity"===s)return c;"clamp"===s&&(c=n)}if(r===i)return r;if(t===n)return e<=t?r:i;t===-1/0?c=-c:n===1/0?c-=t:c=(c-t)/(n-t);c=o(c),r===-1/0?c=-c:i===1/0?c+=r:c=c*(i-r)+r;return c}(e,o[t],o[t+1],i[t],i[t+1],l,a,s,r.map)}};const _a=1.70158,Sa=1.525*_a,$a=_a+1,xa=2*Math.PI/3,Fa=2*Math.PI/4.5,ka=e=>{const t=7.5625,n=2.75;return e<1/n?t*e*e:e<2/n?t*(e-=1.5/n)*e+.75:e<2.5/n?t*(e-=2.25/n)*e+.9375:t*(e-=2.625/n)*e+.984375},Ba={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=>$a*e*e*e-_a*e*e,easeOutBack:e=>1+$a*Math.pow(e-1,3)+_a*Math.pow(e-1,2),easeInOutBack:e=>e<.5?Math.pow(2*e,2)*(7.189819*e-Sa)/2:(Math.pow(2*e-2,2)*((Sa+1)*(2*e-2)+Sa)+2)/2,easeInElastic:e=>0===e?0:1===e?1:-Math.pow(2,10*e-10)*Math.sin((10*e-10.75)*xa),easeOutElastic:e=>0===e?0:1===e?1:Math.pow(2,-10*e)*Math.sin((10*e-.75)*xa)+1,easeInOutElastic:e=>0===e?0:1===e?1:e<.5?-Math.pow(2,20*e-10)*Math.sin((20*e-11.125)*Fa)/2:Math.pow(2,-20*e+10)*Math.sin((20*e-11.125)*Fa)/2+1,easeInBounce:e=>1-ka(1-e),easeOutBounce:ka,easeInOutBounce:e=>e<.5?(1-ka(1-2*e))/2:(1+ka(2*e-1))/2,steps:(e,t="end")=>n=>{const r=(n="end"===t?Math.min(n,.999):Math.max(n,.001))*e,i="end"===t?Math.floor(r):Math.ceil(r);return o=0,a=1,s=i/e,Math.min(Math.max(s,o),a);var o,a,s}};function Aa(){return Aa=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Aa.apply(this,arguments)}const Oa=Symbol.for("FluidValue.get"),ja=Symbol.for("FluidValue.observers"),Ea=e=>Boolean(e&&e[Oa]),Da=e=>e&&e[Oa]?e[Oa]():e,Pa=e=>e[ja]||null;function za(e,t){let n=e[ja];n&&n.forEach((e=>{!function(e,t){e.eventObserved?e.eventObserved(t):e(t)}(e,t)}))}class Ca{constructor(e){if(this[Oa]=void 0,this[ja]=void 0,!e&&!(e=this.get))throw Error("Unknown getter");Ia(this,e)}}const Ia=(e,t)=>Na(e,Oa,t);function Ha(e,t){if(e[Oa]){let n=e[ja];n||Na(e,ja,n=new Set),n.has(t)||(n.add(t),e.observerAdded&&e.observerAdded(n.size,t))}return t}function Ta(e,t){let n=e[ja];if(n&&n.has(t)){const r=n.size-1;r?n.delete(t):e[ja]=null,e.observerRemoved&&e.observerRemoved(r,t)}}const Na=(e,t,n)=>Object.defineProperty(e,t,{value:n,writable:!0,configurable:!0}),Ma=/[+\-]?(?:0|[1-9]\d*)(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,Va=/(#(?:[0-9a-f]{2}){2,4}|(#[0-9a-f]{3})|(rgb|hsl)a?\((-?\d+%?[,\s]+){2,3}\s*[\d\.]+%?\))/gi,Ra=new RegExp(`(${Ma.source})(%|[a-z]+)`,"i"),La=/rgba\(([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+)\)/gi,Wa=/var\((--[a-zA-Z0-9-_]+),? ?([a-zA-Z0-9 ()%#.,-]+)?\)/,qa=e=>{const[t,n]=Ua(e);if(!t||Mo())return e;const r=window.getComputedStyle(document.documentElement).getPropertyValue(t);if(r)return r.trim();if(n&&n.startsWith("--")){const t=window.getComputedStyle(document.documentElement).getPropertyValue(n);return t||e}return n&&Wa.test(n)?qa(n):n||e},Ua=e=>{const t=Wa.exec(e);if(!t)return[,];const[,n,r]=t;return[n,r]};let Qa;const Ga=(e,t,n,r,i)=>`rgba(${Math.round(t)}, ${Math.round(n)}, ${Math.round(r)}, ${i})`,Xa=e=>{Qa||(Qa=Lo?new RegExp(`(${Object.keys(Lo).join("|")})(?!\\w)`,"g"):/^\b$/);const t=e.output.map((e=>Da(e).replace(Wa,qa).replace(Va,va).replace(Qa,va))),n=t.map((e=>e.match(Ma).map(Number))),r=n[0].map(((e,t)=>n.map((e=>{if(!(t in e))throw Error('The arity of each "output" value must be equal');return e[t]})))).map((t=>wa(Aa({},e,{output:t}))));return e=>{var n;const i=!Ra.test(t[0])&&(null==(n=t.find((e=>Ra.test(e))))?void 0:n.replace(Ma,""));let o=0;return t[0].replace(Ma,(()=>`${r[o++](e)}${i||""}`)).replace(La,Ga)}},Za="react-spring: ",Ka=e=>{const t=e;let n=!1;if("function"!=typeof t)throw new TypeError(`${Za}once requires a function parameter`);return(...e)=>{n||(t(...e),n=!0)}},Ya=Ka(console.warn);const Ja=Ka(console.warn);function es(e){return Po.str(e)&&("#"==e[0]||/\d/.test(e)||!Mo()&&Wa.test(e)||e in(Lo||{}))}const ts=Mo()?o:a,ns=()=>{const e=l(!1);return ts((()=>(e.current=!0,()=>{e.current=!1})),[]),e};function rs(){const e=s()[1],t=ns();return()=>{t.current&&e(Math.random())}}const is=e=>o(e,os),os=[];function as(e){const t=l();return o((()=>{t.current=e})),t.current}const ss=Symbol.for("Animated:node"),ls=e=>e&&e[ss],cs=(e,t)=>{return n=e,r=ss,i=t,Object.defineProperty(n,r,{value:i,writable:!0,configurable:!0});var n,r,i},us=e=>e&&e[ss]&&e[ss].getPayload();class ds{constructor(){this.payload=void 0,cs(this,this)}getPayload(){return this.payload||[]}}class hs extends ds{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,Po.num(this._value)&&(this.lastPosition=this._value)}static create(e){return new hs(e)}getPayload(){return[this]}getValue(){return this._value}setValue(e,t){return Po.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,Po.num(this._value)&&(this.elapsedTime=0,this.durationProgress=0,this.lastPosition=this._value,e&&(this.lastVelocity=null),this.v0=null)}}class ps extends hs{constructor(e){super(0),this._string=null,this._toString=void 0,this._toString=wa({output:[e,e]})}static create(e){return new ps(e)}getValue(){let e=this._string;return null==e?this._string=this._toString(this._value):e}setValue(e){if(Po.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=wa({output:[this.getValue(),e]})),this._value=0,super.reset()}}const fs={dependencies:null};class gs extends ds{constructor(e){super(),this.source=e,this.setValue(e)}getValue(e){const t={};return Io(this.source,((n,r)=>{var i;(i=n)&&i[ss]===i?t[r]=n.getValue(e):Ea(n)?t[r]=Da(n):e||(t[r]=n)})),t}setValue(e){this.source=e,this.payload=this._makePayload(e)}reset(){this.payload&&Co(this.payload,(e=>e.reset()))}_makePayload(e){if(e){const t=new Set;return Io(e,this._addToPayload,t),Array.from(t)}}_addToPayload(e){fs.dependencies&&Ea(e)&&fs.dependencies.add(e);const t=us(e);t&&Co(t,(e=>this.add(e)))}}class ms extends gs{constructor(e){super(e)}static create(e){return new ms(e)}getValue(){return this.source.map((e=>e.getValue()))}setValue(e){const t=this.getPayload();return e.length==t.length?t.map(((t,n)=>t.setValue(e[n]))).some(Boolean):(super.setValue(e.map(ys)),!0)}}function ys(e){return(es(e)?ps:hs).create(e)}function bs(e){const t=ls(e);return t?t.constructor:Po.arr(e)?ms:es(e)?ps:hs}function vs(){return vs=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},vs.apply(this,arguments)}const ws=(e,t)=>{const n=!Po.fun(e)||e.prototype&&e.prototype.isReactComponent;return c(((i,a)=>{const s=l(null),c=n&&u((e=>{s.current=function(e,t){e&&(Po.fun(e)?e(t):e.current=t);return t}(a,e)}),[a]),[d,h]=function(e,t){const n=new Set;fs.dependencies=n,e.style&&(e=vs({},e,{style:t.createAnimatedStyle(e.style)}));return e=new gs(e),fs.dependencies=null,[e,n]}(i,t),p=rs(),f=()=>{const e=s.current;if(n&&!e)return;!1===(!!e&&t.applyAnimatedValues(e,d.getValue(!0)))&&p()},g=new _s(f,h),m=l();ts((()=>(m.current=g,Co(h,(e=>Ha(e,g))),()=>{m.current&&(Co(m.current.deps,(e=>Ta(e,m.current))),go.cancel(m.current.update))}))),o(f,[]),is((()=>()=>{const e=m.current;Co(e.deps,(t=>Ta(t,e)))}));const y=t.getComponentProps(d.getValue());return r.createElement(e,vs({},y,{ref:c}))}))};class _s{constructor(e,t){this.update=e,this.deps=t}eventObserved(e){"change"==e.type&&go.write(this.update)}}const Ss=Symbol.for("AnimatedComponent"),$s=e=>Po.str(e)?e:e&&Po.str(e.displayName)?e.displayName:Po.fun(e)&&e.name||null;function xs(){return xs=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},xs.apply(this,arguments)}function Fs(e,...t){return Po.fun(e)?e(...t):e}const ks=(e,t)=>!0===e||!!(t&&e&&(Po.fun(e)?e(t):Ho(e).includes(t))),Bs=(e,t)=>Po.obj(e)?t&&e[t]:e,As=(e,t)=>!0===e.default?e[t]:e.default?e.default[t]:void 0,Os=e=>e,js=(e,t=Os)=>{let n=Es;e.default&&!0!==e.default&&(e=e.default,n=Object.keys(e));const r={};for(const i of n){const n=t(e[i],i);Po.und(n)||(r[i]=n)}return r},Es=["config","onProps","onStart","onChange","onPause","onResume","onRest"],Ds={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 Ps(e){const t=function(e){const t={};let n=0;if(Io(e,((e,r)=>{Ds[r]||(t[r]=e,n++)})),n)return t}(e);if(t){const n={to:t};return Io(e,((e,r)=>r in t||(n[r]=e))),n}return xs({},e)}function zs(e){return e=Da(e),Po.arr(e)?e.map(zs):es(e)?Uo.createStringInterpolator({range:[0,1],output:[e,e]})(1):e}function Cs(e){return Po.fun(e)||Po.arr(e)&&Po.obj(e[0])}const Is=xs({},{tension:170,friction:26},{mass:1,damping:1,easing:Ba.linear,clamp:!1});class Hs{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,Is)}}function Ts(e,t){if(Po.und(t.decay)){const n=!Po.und(t.tension)||!Po.und(t.friction);!n&&Po.und(t.frequency)&&Po.und(t.damping)&&Po.und(t.mass)||(e.duration=void 0,e.decay=void 0),n&&(e.frequency=void 0)}else e.duration=void 0}const Ns=[];class Ms{constructor(){this.changed=!1,this.values=Ns,this.toValues=null,this.fromValues=Ns,this.to=void 0,this.from=void 0,this.config=new Hs,this.immediate=!1}}function Vs(e,{key:t,props:n,defaultProps:r,state:i,actions:o}){return new Promise(((a,s)=>{var l;let c,u,d=ks(null!=(l=n.cancel)?l:null==r?void 0:r.cancel,t);if(d)f();else{Po.und(n.pause)||(i.paused=ks(n.pause,t));let e=null==r?void 0:r.pause;!0!==e&&(e=i.paused||ks(e,t)),c=Fs(n.delay||0,t),e?(i.resumeQueue.add(p),o.pause()):(o.resume(),p())}function h(){i.resumeQueue.add(p),i.timeouts.delete(u),u.cancel(),c=u.time-go.now()}function p(){c>0&&!Uo.skipAnimation?(i.delayed=!0,u=go.setTimeout(f,c),i.pauseQueue.add(h),i.timeouts.add(u)):f()}function f(){i.delayed&&(i.delayed=!1),i.pauseQueue.delete(h),i.timeouts.delete(u),e<=(i.cancelId||0)&&(d=!0);try{o.start(xs({},n,{callId:e,cancel:d}),a)}catch(e){s(e)}}}))}const Rs=(e,t)=>1==t.length?t[0]:t.some((e=>e.cancelled))?qs(e.get()):t.every((e=>e.noop))?Ls(e.get()):Ws(e.get(),t.every((e=>e.finished))),Ls=e=>({value:e,noop:!0,finished:!0,cancelled:!1}),Ws=(e,t,n=!1)=>({value:e,finished:t,cancelled:n}),qs=e=>({value:e,cancelled:!0,finished:!1});function Us(e,t,n,r){const{callId:i,parentId:o,onRest:a}=t,{asyncTo:s,promise:l}=n;return o||e!==s||t.reset?n.promise=(async()=>{n.asyncId=i,n.asyncTo=e;const c=js(t,((e,t)=>"onRest"===t?void 0:e));let u,d;const h=new Promise(((e,t)=>(u=e,d=t))),p=e=>{const t=i<=(n.cancelId||0)&&qs(r)||i!==n.asyncId&&Ws(r,!1);if(t)throw e.result=t,d(e),e},f=(e,t)=>{const o=new Gs,a=new Xs;return(async()=>{if(Uo.skipAnimation)throw Qs(n),a.result=Ws(r,!1),d(a),a;p(o);const s=Po.obj(e)?xs({},e):xs({},t,{to:e});s.parentId=i,Io(c,((e,t)=>{Po.und(s[t])&&(s[t]=e)}));const l=await r.start(s);return p(o),n.paused&&await new Promise((e=>{n.resumeQueue.add(e)})),l})()};let g;if(Uo.skipAnimation)return Qs(n),Ws(r,!1);try{let t;t=Po.arr(e)?(async e=>{for(const t of e)await f(t)})(e):Promise.resolve(e(f,r.stop.bind(r))),await Promise.all([t.then(u),h]),g=Ws(r.get(),!0,!1)}catch(e){if(e instanceof Gs)g=e.result;else{if(!(e instanceof Xs))throw e;g=e.result}}finally{i==n.asyncId&&(n.asyncId=o,n.asyncTo=o?s:void 0,n.promise=o?l:void 0)}return Po.fun(a)&&go.batchedUpdates((()=>{a(g,r,r.item)})),g})():l}function Qs(e,t){To(e.timeouts,(e=>e.cancel())),e.pauseQueue.clear(),e.resumeQueue.clear(),e.asyncId=e.asyncTo=e.promise=void 0,t&&(e.cancelId=t)}class Gs 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 Xs extends Error{constructor(){super("SkipAnimationSignal"),this.result=void 0}}const Zs=e=>e instanceof Ys;let Ks=1;class Ys extends Ca{constructor(...e){super(...e),this.id=Ks++,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=ls(this);return e&&e.getValue()}to(...e){return Uo.to(this,e)}interpolate(...e){return Ya(`${Za}The "interpolate" function is deprecated in v9 (use "to" instead)`),Uo.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){za(this,{type:"change",parent:this,value:e,idle:t})}_onPriorityChange(e){this.idle||Ko.sort(this),za(this,{type:"priority",parent:this,priority:e})}}const Js=Symbol.for("SpringPhase"),el=e=>(1&e[Js])>0,tl=e=>(2&e[Js])>0,nl=e=>(4&e[Js])>0,rl=(e,t)=>t?e[Js]|=3:e[Js]&=-3,il=(e,t)=>t?e[Js]|=4:e[Js]&=-5;class ol extends Ys{constructor(e,t){if(super(),this.key=void 0,this.animation=new Ms,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,!Po.und(e)||!Po.und(t)){const n=Po.obj(e)?xs({},e):xs({},t,{from:e});Po.und(n.default)&&(n.default=!0),this.start(n)}}get idle(){return!(tl(this)||this._state.asyncTo)||nl(this)}get goal(){return Da(this.animation.to)}get velocity(){const e=ls(this);return e instanceof hs?e.lastVelocity||0:e.getPayload().map((e=>e.lastVelocity||0))}get hasAnimated(){return el(this)}get isAnimating(){return tl(this)}get isPaused(){return nl(this)}get isDelayed(){return this._state.delayed}advance(e){let t=!0,n=!1;const r=this.animation;let{config:i,toValues:o}=r;const a=us(r.to);!a&&Ea(r.to)&&(o=Ho(Da(r.to))),r.values.forEach(((s,l)=>{if(s.done)return;const c=s.constructor==ps?1:a?a[l].lastPosition:o[l];let u=r.immediate,d=c;if(!u){if(d=s.lastPosition,i.tension<=0)return void(s.done=!0);let t=s.elapsedTime+=e;const n=r.fromValues[l],o=null!=s.v0?s.v0:s.v0=Po.arr(i.velocity)?i.velocity[l]:i.velocity;let a;const h=i.precision||(n==c?.005:Math.min(1,.001*Math.abs(c-n)));if(Po.und(i.duration))if(i.decay){const e=!0===i.decay?.998:i.decay,r=Math.exp(-(1-e)*t);d=n+o/(1-e)*(1-r),u=Math.abs(s.lastPosition-d)<=h,a=o*r}else{a=null==s.lastVelocity?o:s.lastVelocity;const t=i.restVelocity||h/10,r=i.clamp?0:i.bounce,l=!Po.und(r),p=n==c?s.v0>0:n<c;let f,g=!1;const m=1,y=Math.ceil(e/m);for(let e=0;e<y&&(f=Math.abs(a)>t,f||(u=Math.abs(c-d)<=h,!u));++e){l&&(g=d==c||d>c==p,g&&(a=-a*r,d=c));a+=(1e-6*-i.tension*(d-c)+.001*-i.friction*a)/i.mass*m,d+=a*m}}else{let r=1;i.duration>0&&(this._memoizedDuration!==i.duration&&(this._memoizedDuration=i.duration,s.durationProgress>0&&(s.elapsedTime=i.duration*s.durationProgress,t=s.elapsedTime+=e)),r=(i.progress||0)+t/this._memoizedDuration,r=r>1?1:r<0?0:r,s.durationProgress=r),d=n+i.easing(r)*(c-n),a=(d-s.lastPosition)/e,u=1==r}s.lastVelocity=a,Number.isNaN(d)&&(console.warn("Got NaN while animating:",this),u=!0)}a&&!a[l].done&&(u=!1),u?s.done=!0:t=!1,s.setValue(d,i.round)&&(n=!0)}));const s=ls(this),l=s.getValue();if(t){const e=Da(r.to);l===e&&!n||i.decay?n&&i.decay&&this._onChange(l):(s.setValue(e),this._onChange(e)),this._stop()}else n&&this._onChange(l)}set(e){return go.batchedUpdates((()=>{this._stop(),this._focus(e),this._set(e)})),this}pause(){this._update({pause:!0})}resume(){this._update({pause:!1})}finish(){if(tl(this)){const{to:e,config:t}=this.animation;go.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 n;return Po.und(e)?(n=this.queue||[],this.queue=[]):n=[Po.obj(e)?e:xs({},t,{to:e})],Promise.all(n.map((e=>this._update(e)))).then((e=>Rs(this,e)))}stop(e){const{to:t}=this.animation;return this._focus(this.get()),Qs(this._state,e&&this._lastCallId),go.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:n,from:r}=e;n=Po.obj(n)?n[t]:n,(null==n||Cs(n))&&(n=void 0),r=Po.obj(r)?r[t]:r,null==r&&(r=void 0);const i={to:n,from:r};return el(this)||(e.reverse&&([n,r]=[r,n]),r=Da(r),Po.und(r)?ls(this)||this._set(n):this._set(r)),i}_update(e,t){let n=xs({},e);const{key:r,defaultProps:i}=this;n.default&&Object.assign(i,js(n,((e,t)=>/^on/.test(t)?Bs(e,r):e))),hl(this,n,"onProps"),pl(this,"onProps",n,this);const o=this._prepareNode(n);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 a=this._state;return Vs(++this._lastCallId,{key:r,props:n,defaultProps:i,state:a,actions:{pause:()=>{nl(this)||(il(this,!0),No(a.pauseQueue),pl(this,"onPause",Ws(this,al(this,this.animation.to)),this))},resume:()=>{nl(this)&&(il(this,!1),tl(this)&&this._resume(),No(a.resumeQueue),pl(this,"onResume",Ws(this,al(this,this.animation.to)),this))},start:this._merge.bind(this,o)}}).then((e=>{if(n.loop&&e.finished&&(!t||!e.noop)){const e=sl(n);if(e)return this._update(e,!0)}return e}))}_merge(e,t,n){if(t.cancel)return this.stop(!0),n(qs(this));const r=!Po.und(e.to),i=!Po.und(e.from);if(r||i){if(!(t.callId>this._lastToId))return n(qs(this));this._lastToId=t.callId}const{key:o,defaultProps:a,animation:s}=this,{to:l,from:c}=s;let{to:u=l,from:d=c}=e;!i||r||t.default&&!Po.und(u)||(u=d),t.reverse&&([u,d]=[d,u]);const h=!zo(d,c);h&&(s.from=d),d=Da(d);const p=!zo(u,l);p&&this._focus(u);const f=Cs(t.to),{config:g}=s,{decay:m,velocity:y}=g;(r||i)&&(g.velocity=0),t.config&&!f&&function(e,t,n){n&&(Ts(n=xs({},n),t),t=xs({},n,t)),Ts(e,t),Object.assign(e,t);for(const t in Is)null==e[t]&&(e[t]=Is[t]);let{mass:r,frequency:i,damping:o}=e;Po.und(i)||(i<.01&&(i=.01),o<0&&(o=0),e.tension=Math.pow(2*Math.PI/i,2)*r,e.friction=4*Math.PI*o*r/i)}(g,Fs(t.config,o),t.config!==a.config?Fs(a.config,o):void 0);let b=ls(this);if(!b||Po.und(u))return n(Ws(this,!0));const v=Po.und(t.reset)?i&&!t.default:!Po.und(d)&&ks(t.reset,o),w=v?d:this.get(),_=zs(u),S=Po.num(_)||Po.arr(_)||es(_),$=!f&&(!S||ks(a.immediate||t.immediate,o));if(p){const e=bs(u);if(e!==b.constructor){if(!$)throw Error(`Cannot animate between ${b.constructor.name} and ${e.name}, as the "to" prop suggests`);b=this._set(_)}}const x=b.constructor;let F=Ea(u),k=!1;if(!F){const e=v||!el(this)&&h;(p||e)&&(k=zo(zs(w),_),F=!k),(zo(s.immediate,$)||$)&&zo(g.decay,m)&&zo(g.velocity,y)||(F=!0)}if(k&&tl(this)&&(s.changed&&!v?F=!0:F||this._stop(l)),!f&&((F||Ea(l))&&(s.values=b.getPayload(),s.toValues=Ea(u)?null:x==ps?[1]:Ho(_)),s.immediate!=$&&(s.immediate=$,$||v||this._set(l)),F)){const{onRest:e}=s;Co(dl,(e=>hl(this,t,e)));const r=Ws(this,al(this,l));No(this._pendingCalls,r),this._pendingCalls.add(n),s.changed&&go.batchedUpdates((()=>{s.changed=!v,null==e||e(r,this),v?Fs(a.onRest,r):null==s.onStart||s.onStart(r,this)}))}v&&this._set(w),f?n(Us(t.to,t,this._state,this)):F?this._start():tl(this)&&!p?this._pendingCalls.add(n):n(Ls(w))}_focus(e){const t=this.animation;e!==t.to&&(Pa(this)&&this._detach(),t.to=e,Pa(this)&&this._attach())}_attach(){let e=0;const{to:t}=this.animation;Ea(t)&&(Ha(t,this),Zs(t)&&(e=t.priority+1)),this.priority=e}_detach(){const{to:e}=this.animation;Ea(e)&&Ta(e,this)}_set(e,t=!0){const n=Da(e);if(!Po.und(n)){const e=ls(this);if(!e||!zo(n,e.getValue())){const r=bs(n);e&&e.constructor==r?e.setValue(n):cs(this,r.create(n)),e&&go.batchedUpdates((()=>{this._onChange(n,t)}))}}return ls(this)}_onStart(){const e=this.animation;e.changed||(e.changed=!0,pl(this,"onStart",Ws(this,al(this,e.to)),this))}_onChange(e,t){t||(this._onStart(),Fs(this.animation.onChange,e,this)),Fs(this.defaultProps.onChange,e,this),super._onChange(e,t)}_start(){const e=this.animation;ls(this).reset(Da(e.to)),e.immediate||(e.fromValues=e.values.map((e=>e.lastPosition))),tl(this)||(rl(this,!0),nl(this)||this._resume())}_resume(){Uo.skipAnimation?this.finish():Ko.start(this)}_stop(e,t){if(tl(this)){rl(this,!1);const n=this.animation;Co(n.values,(e=>{e.done=!0})),n.toValues&&(n.onChange=n.onPause=n.onResume=void 0),za(this,{type:"idle",parent:this});const r=t?qs(this.get()):Ws(this.get(),al(this,null!=e?e:n.to));No(this._pendingCalls,r),n.changed&&(n.changed=!1,pl(this,"onRest",r,this))}}}function al(e,t){const n=zs(t);return zo(zs(e.get()),n)}function sl(e,t=e.loop,n=e.to){let r=Fs(t);if(r){const i=!0!==r&&Ps(r),o=(i||e).reverse,a=!i||i.reset;return ll(xs({},e,{loop:t,default:!1,pause:void 0,to:!o||Cs(n)?n:void 0,from:a?e.from:void 0,reset:a},i))}}function ll(e){const{to:t,from:n}=e=Ps(e),r=new Set;return Po.obj(t)&&ul(t,r),Po.obj(n)&&ul(n,r),e.keys=r.size?Array.from(r):null,e}function cl(e){const t=ll(e);return Po.und(t.default)&&(t.default=js(t)),t}function ul(e,t){Io(e,((e,n)=>null!=e&&t.add(n)))}const dl=["onStart","onRest","onChange","onPause","onResume"];function hl(e,t,n){e.animation[n]=t[n]!==As(t,n)?Bs(t[n],e.key):void 0}function pl(e,t,...n){var r,i,o,a;null==(r=(i=e.animation)[t])||r.call(i,...n),null==(o=(a=e.defaultProps)[t])||o.call(a,...n)}const fl=["onStart","onChange","onRest"];let gl=1;class ml{constructor(e,t){this.id=gl++,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(xs({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,n)=>e[n]=t.get())),e}set(e){for(const t in e){const n=e[t];Po.und(n)||this.springs[t].set(n)}}update(e){return e&&this.queue.push(ll(e)),this}start(e){let{queue:t}=this;return e?t=Ho(e).map(ll):this.queue=[],this._flush?this._flush(this,t):($l(this,t),yl(this,t))}stop(e,t){if(e!==!!e&&(t=e),t){const n=this.springs;Co(Ho(t),(t=>n[t].stop(!!e)))}else Qs(this._state,this._lastAsyncId),this.each((t=>t.stop(!!e)));return this}pause(e){if(Po.und(e))this.start({pause:!0});else{const t=this.springs;Co(Ho(e),(e=>t[e].pause()))}return this}resume(e){if(Po.und(e))this.start({pause:!1});else{const t=this.springs;Co(Ho(e),(e=>t[e].resume()))}return this}each(e){Io(this.springs,e)}_onFrame(){const{onStart:e,onChange:t,onRest:n}=this._events,r=this._active.size>0,i=this._changed.size>0;(r&&!this._started||i&&!this._started)&&(this._started=!0,To(e,(([e,t])=>{t.value=this.get(),e(t,this,this._item)})));const o=!r&&this._started,a=i||o&&n.size?this.get():null;i&&t.size&&To(t,(([e,t])=>{t.value=a,e(t,this,this._item)})),o&&(this._started=!1,To(n,(([e,t])=>{t.value=a,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)}go.onFrame(this._onFrame)}}function yl(e,t){return Promise.all(t.map((t=>bl(e,t)))).then((t=>Rs(e,t)))}async function bl(e,t,n){const{keys:r,to:i,from:o,loop:a,onRest:s,onResolve:l}=t,c=Po.obj(t.default)&&t.default;a&&(t.loop=!1),!1===i&&(t.to=null),!1===o&&(t.from=null);const u=Po.arr(i)||Po.fun(i)?i:void 0;u?(t.to=void 0,t.onRest=void 0,c&&(c.onRest=void 0)):Co(fl,(n=>{const r=t[n];if(Po.fun(r)){const i=e._events[n];t[n]=({finished:e,cancelled:t})=>{const n=i.get(r);n?(e||(n.finished=!1),t&&(n.cancelled=!0)):i.set(r,{value:null,finished:e||!1,cancelled:t||!1})},c&&(c[n]=t[n])}}));const d=e._state;t.pause===!d.paused?(d.paused=t.pause,No(t.pause?d.pauseQueue:d.resumeQueue)):d.paused&&(t.pause=!0);const h=(r||Object.keys(e.springs)).map((n=>e.springs[n].start(t))),p=!0===t.cancel||!0===As(t,"cancel");(u||p&&d.asyncId)&&h.push(Vs(++e._lastAsyncId,{props:t,state:d,actions:{pause:Do,resume:Do,start(t,n){p?(Qs(d,e._lastAsyncId),n(qs(e))):(t.onRest=s,n(Us(u,t,d,e)))}}})),d.paused&&await new Promise((e=>{d.resumeQueue.add(e)}));const f=Rs(e,await Promise.all(h));if(a&&f.finished&&(!n||!f.noop)){const n=sl(t,a,i);if(n)return $l(e,[n]),bl(e,n,!0)}return l&&go.batchedUpdates((()=>l(f,e,e.item))),f}function vl(e,t){const n=xs({},e.springs);return t&&Co(Ho(t),(e=>{Po.und(e.keys)&&(e=ll(e)),Po.obj(e.to)||(e=xs({},e,{to:void 0})),Sl(n,e,(e=>_l(e)))})),wl(e,n),n}function wl(e,t){Io(t,((t,n)=>{e.springs[n]||(e.springs[n]=t,Ha(t,e))}))}function _l(e,t){const n=new ol;return n.key=e,t&&Ha(n,t),n}function Sl(e,t,n){t.keys&&Co(t.keys,(r=>{(e[r]||(e[r]=n(r)))._prepareNode(t)}))}function $l(e,t){Co(t,(t=>{Sl(e.springs,t,(t=>_l(t,e)))}))}const xl=["children"],Fl=e=>{let{children:t}=e,n=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,xl);const i=d(kl),a=n.pause||!!i.pause,c=n.immediate||!!i.immediate;n=function(e,t){const[n]=s((()=>({inputs:t,result:e()}))),r=l(),i=r.current;let a=i;a?Boolean(t&&a.inputs&&function(e,t){if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}(t,a.inputs))||(a={inputs:t,result:e()}):a=n;return o((()=>{r.current=a,i==n&&(n.inputs=n.result=void 0)}),[a]),a.result}((()=>({pause:a,immediate:c})),[a,c]);const{Provider:u}=kl;return r.createElement(u,{value:n},t)},kl=(Bl=Fl,Al={},Object.assign(Bl,r.createContext(Al)),Bl.Provider._context=Bl,Bl.Consumer._context=Bl,Bl);var Bl,Al;Fl.Provider=kl.Provider,Fl.Consumer=kl.Consumer;const Ol=()=>{const e=[],t=function(t){Ja(`${Za}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`);const r=[];return Co(e,((e,i)=>{if(Po.und(t))r.push(e.start());else{const o=n(t,e,i);o&&r.push(e.start(o))}})),r};t.current=e,t.add=function(t){e.includes(t)||e.push(t)},t.delete=function(t){const n=e.indexOf(t);~n&&e.splice(n,1)},t.pause=function(){return Co(e,(e=>e.pause(...arguments))),this},t.resume=function(){return Co(e,(e=>e.resume(...arguments))),this},t.set=function(t){Co(e,(e=>e.set(t)))},t.start=function(t){const n=[];return Co(e,((e,r)=>{if(Po.und(t))n.push(e.start());else{const i=this._getProps(t,e,r);i&&n.push(e.start(i))}})),n},t.stop=function(){return Co(e,(e=>e.stop(...arguments))),this},t.update=function(t){return Co(e,((e,n)=>e.update(this._getProps(t,e,n)))),this};const n=function(e,t,n){return Po.fun(e)?e(n,t):e};return t._getProps=n,t};function jl(e,t){const n=Po.fun(e),[[r],i]=function(e,t,n){const r=Po.fun(t)&&t;r&&!n&&(n=[]);const i=h((()=>r||3==arguments.length?Ol():void 0),[]),o=l(0),a=rs(),s=h((()=>({ctrls:[],queue:[],flush(e,t){const n=vl(e,t);return o.current>0&&!s.queue.length&&!Object.keys(n).some((t=>!e.springs[t]))?yl(e,t):new Promise((r=>{wl(e,n),s.queue.push((()=>{r(yl(e,t))})),a()}))}})),[]),c=l([...s.ctrls]),u=[],p=as(e)||0;function f(e,n){for(let i=e;i<n;i++){const e=c.current[i]||(c.current[i]=new ml(null,s.flush)),n=r?r(i,e):t[i];n&&(u[i]=cl(n))}}h((()=>{Co(c.current.slice(e,p),(e=>{!function(e,t){var n;null==(n=e.ref)||n.delete(e),null==t||t.delete(e)}(e,i),e.stop(!0)})),c.current.length=e,f(p,e)}),[e]),h((()=>{f(0,Math.min(p,e))}),n);const g=c.current.map(((e,t)=>vl(e,u[t]))),m=d(Fl),y=as(m),b=m!==y&&function(e){for(const t in e)return!0;return!1}(m);ts((()=>{o.current++,s.ctrls=c.current;const{queue:e}=s;e.length&&(s.queue=[],Co(e,(e=>e()))),Co(c.current,((e,t)=>{null==i||i.add(e),b&&e.start({default:m});const n=u[t];n&&(function(e,t){var n;t&&e.ref!==t&&(null==(n=e.ref)||n.delete(e),t.add(e),e.ref=t)}(e,n.ref),e.ref?e.queue.push(n):e.start(n))}))})),is((()=>()=>{Co(s.ctrls,(e=>e.stop(!0)))}));const v=g.map((e=>xs({},e)));return i?[v,i]:v}(1,n?e:[e],n?t||[]:t);return n||2==arguments.length?[r,i]:r}let El;!function(e){e.MOUNT="mount",e.ENTER="enter",e.UPDATE="update",e.LEAVE="leave"}(El||(El={}));class Dl extends Ys{constructor(e,t){super(),this.key=void 0,this.idle=!0,this.calc=void 0,this._active=new Set,this.source=e,this.calc=wa(...t);const n=this._get(),r=bs(n);cs(this,r.create(n))}advance(e){const t=this._get();zo(t,this.get())||(ls(this).setValue(t),this._onChange(t,this.idle)),!this.idle&&zl(this._active)&&Cl(this)}_get(){const e=Po.arr(this.source)?this.source.map(Da):Ho(Da(this.source));return this.calc(...e)}_start(){this.idle&&!zl(this._active)&&(this.idle=!1,Co(us(this),(e=>{e.done=!1})),Uo.skipAnimation?(go.batchedUpdates((()=>this.advance())),Cl(this)):Ko.start(this))}_attach(){let e=1;Co(Ho(this.source),(t=>{Ea(t)&&Ha(t,this),Zs(t)&&(t.idle||this._active.add(t),e=Math.max(e,t.priority+1))})),this.priority=e,this._start()}_detach(){Co(Ho(this.source),(e=>{Ea(e)&&Ta(e,this)})),this._active.clear(),Cl(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=Ho(this.source).reduce(((e,t)=>Math.max(e,(Zs(t)?t.priority:0)+1)),0))}}function Pl(e){return!1!==e.idle}function zl(e){return!e.size||Array.from(e).every(Pl)}function Cl(e){e.idle||(e.idle=!0,Co(us(e),(e=>{e.done=!0})),za(e,{type:"idle",parent:e}))}function Il(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}Uo.assign({createStringInterpolator:Xa,to:(e,t)=>new Dl(e,t)});const Hl=["style","children","scrollTop","scrollLeft","viewBox"],Tl=/^--/;function Nl(e,t){return null==t||"boolean"==typeof t||""===t?"":"number"!=typeof t||0===t||Tl.test(e)||Vl.hasOwnProperty(e)&&Vl[e]?(""+t).trim():t+"px"}const Ml={};let Vl={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 Rl=["Webkit","Ms","Moz","O"];Vl=Object.keys(Vl).reduce(((e,t)=>(Rl.forEach((n=>e[((e,t)=>e+t.charAt(0).toUpperCase()+t.substring(1))(n,t)]=e[t])),e)),Vl);const Ll=["x","y","z"],Wl=/^(matrix|translate|scale|rotate|skew)/,ql=/^(translate)/,Ul=/^(rotate|skew)/,Ql=(e,t)=>Po.num(e)&&0!==e?e+t:e,Gl=(e,t)=>Po.arr(e)?e.every((e=>Gl(e,t))):Po.num(e)?e===t:parseFloat(e)===t;class Xl extends gs{constructor(e){let{x:t,y:n,z:r}=e,i=Il(e,Ll);const o=[],a=[];(t||n||r)&&(o.push([t||0,n||0,r||0]),a.push((e=>[`translate3d(${e.map((e=>Ql(e,"px"))).join(",")})`,Gl(e,0)]))),Io(i,((e,t)=>{if("transform"===t)o.push([e||""]),a.push((e=>[e,""===e]));else if(Wl.test(t)){if(delete i[t],Po.und(e))return;const n=ql.test(t)?"px":Ul.test(t)?"deg":"";o.push(Ho(e)),a.push("rotate3d"===t?([e,t,r,i])=>[`rotate3d(${e},${t},${r},${Ql(i,n)})`,Gl(i,0)]:e=>[`${t}(${e.map((e=>Ql(e,n))).join(",")})`,Gl(e,t.startsWith("scale")?1:0)])}})),o.length&&(i.transform=new Zl(o,a)),super(i)}}class Zl extends Ca{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 Co(this.inputs,((n,r)=>{const i=Da(n[0]),[o,a]=this.transforms[r](Po.arr(i)?i:n.map(Da));e+=" "+o,t=t&&a})),t?"none":e}observerAdded(e){1==e&&Co(this.inputs,(e=>Co(e,(e=>Ea(e)&&Ha(e,this)))))}observerRemoved(e){0==e&&Co(this.inputs,(e=>Co(e,(e=>Ea(e)&&Ta(e,this)))))}eventObserved(e){"change"==e.type&&(this._value=null),za(this,e)}}const Kl=["scrollTop","scrollLeft"];Uo.assign({batchedUpdates:p,createStringInterpolator:Xa,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}});const Yl=((e,{applyAnimatedValues:t=(()=>!1),createAnimatedStyle:n=(e=>new gs(e)),getComponentProps:r=(e=>e)}={})=>{const i={applyAnimatedValues:t,createAnimatedStyle:n,getComponentProps:r},o=e=>{const t=$s(e)||"Anonymous";return(e=Po.str(e)?o[e]||(o[e]=ws(e,i)):e[Ss]||(e[Ss]=ws(e,i))).displayName=`Animated(${t})`,e};return Io(e,((t,n)=>{Po.arr(e)&&(n=$s(t)),o[n]=o(t)})),{animated:o}})(["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"],{applyAnimatedValues:function(e,t){if(!e.nodeType||!e.setAttribute)return!1;const n="filter"===e.nodeName||e.parentNode&&"filter"===e.parentNode.nodeName,r=t,{style:i,children:o,scrollTop:a,scrollLeft:s,viewBox:l}=r,c=Il(r,Hl),u=Object.values(c),d=Object.keys(c).map((t=>n||e.hasAttribute(t)?t:Ml[t]||(Ml[t]=t.replace(/([A-Z])/g,(e=>"-"+e.toLowerCase())))));void 0!==o&&(e.textContent=o);for(let t in i)if(i.hasOwnProperty(t)){const n=Nl(t,i[t]);Tl.test(t)?e.style.setProperty(t,n):e.style[t]=n}d.forEach(((t,n)=>{e.setAttribute(t,u[n])})),void 0!==a&&(e.scrollTop=a),void 0!==s&&(e.scrollLeft=s),void 0!==l&&e.setAttribute("viewBox",l)},createAnimatedStyle:e=>new Xl(e),getComponentProps:e=>Il(e,Kl)}),Jl=Yl.animated,ec=(e,t,n)=>t?mi(n,t)||mi(e,t):n||e,tc=(e,t)=>{const n=t||e.defaultValue;return mi(e.collections,n)};var nc;!function(e){e.colorScheme="colorScheme",e.layout="layout",e.textStyleScheme="textStyleScheme",e.designTokenScheme="designTokenScheme",e.resourceScheme="resourceScheme"}(nc||(nc={}));const rc={collections:{base:{Brand:{1:"#EF413D",2:"#F26664",3:"#F58E8B",4:"#F9B5B2",5:"#FDDDD7",6:"#FFEEEA"},Primary:"#1C76D5",PrimaryDark:"#1869BF",Secondary:"#0056b3",Accent:{Dark:{1:"#4B539F",2:"#6D74B1",3:"#959BC5"},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)"}},bookingsg:{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:"#977ECC",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)"}},rbs:{Brand:{1:"#3E4DFF",2:"#AEACFF",3:"#AD44FF",4:"#F9B5B2",5:"#FDDDD7",6:"#FFEEEA"},Primary:"#4855D4",PrimaryDark:"#3E49B2",Secondary:"#364891",Accent:{Dark:{1:"#5E516E",2:"#7A6F87",3:"#C5C0CC"},Light:{1:"#8397FC",2:"#ABB8FC",3:"#CED6FD ",4:"#E1E4FA",5:"#F0F2FF",6:"#FAFBFF"}},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(90, 87, 255, 0.5)",Red:"rgba(221, 102, 102, 0.8)",Elevation:"rgba(75, 83, 159, 0.24)"}}},defaultValue:"base"},ic=e=>t=>{const n=t.theme,r=tc(rc,n[nc.colorScheme]);return n.options&&n.options.color?ec(r,e,n.options.color):ec(r,e)},oc={Brand:{1:ic("Brand.1"),2:ic("Brand.2"),3:ic("Brand.3"),4:ic("Brand.4"),5:ic("Brand.5"),6:ic("Brand.6")},Primary:ic("Primary"),PrimaryDark:ic("PrimaryDark"),Secondary:ic("Secondary"),Accent:{Light:{1:ic("Accent.Light.1"),2:ic("Accent.Light.2"),3:ic("Accent.Light.3"),4:ic("Accent.Light.4"),5:ic("Accent.Light.5"),6:ic("Accent.Light.6")},Dark:{1:ic("Accent.Dark.1"),2:ic("Accent.Dark.2"),3:ic("Accent.Dark.3")}},Neutral:{1:ic("Neutral.1"),2:ic("Neutral.2"),3:ic("Neutral.3"),4:ic("Neutral.4"),5:ic("Neutral.5"),6:ic("Neutral.6"),7:ic("Neutral.7"),8:ic("Neutral.8")},Validation:{Green:{Text:ic("Validation.Green.Text"),Icon:ic("Validation.Green.Icon"),Border:ic("Validation.Green.Border"),Background:ic("Validation.Green.Background")},Orange:{Text:ic("Validation.Orange.Text"),Icon:ic("Validation.Orange.Icon"),Border:ic("Validation.Orange.Border"),Background:ic("Validation.Orange.Background"),Badge:ic("Validation.Orange.Badge")},Red:{Text:ic("Validation.Red.Text"),Icon:ic("Validation.Red.Icon"),Border:ic("Validation.Red.Border"),Background:ic("Validation.Red.Background")},Blue:{Text:ic("Validation.Blue.Text"),Icon:ic("Validation.Blue.Icon"),Border:ic("Validation.Blue.Border"),Background:ic("Validation.Blue.Background")}},Shadow:{Accent:ic("Shadow.Accent"),Red:ic("Shadow.Red"),Elevation:ic("Shadow.Elevation")}},ac={mobileS:320,mobileM:375,mobileL:480,tablet:1199,desktopM:1399,desktopL:1999,desktop4k:3840},sc=e=>Object.keys(ac).reduce(((t,n)=>{const r=ac[n];return t[n]=`@media screen and (${e}: ${r}px)`,t}),{}),lc=sc("max-width"),cc=(sc("min-width"),f.div`
2
2
  display: inline-block;
3
3
  position: relative;
4
4
  width: ${e=>e.$size}px;
@@ -290,10 +290,10 @@ import{jsxs as e,jsx as t,Fragment as n}from"react/jsx-runtime";import*as r from
290
290
  width: ${t};
291
291
  `}}
292
292
  color: ${e=>e.disabled?oc.Neutral[4]:oc.Neutral[8]};
293
- `,Cc=f(Jl.div)`
293
+ `,zc=f(Jl.div)`
294
294
  overflow: hidden;
295
295
  box-shadow: 0 4px 5px 0 rgba(0, 0, 0, 0.2);
296
- `,zc=f.ul`
296
+ `,Cc=f.ul`
297
297
  border-bottom-left-radius: 4px;
298
298
  border-bottom-right-radius: 4px;
299
299
  background: transparent;
@@ -571,7 +571,7 @@ import{jsxs as e,jsx as t,Fragment as n}from"react/jsx-runtime";import*as r from
571
571
  height: 1.375rem;
572
572
  width: 1.375rem;
573
573
  color: ${oc.Neutral[3]};
574
- `,lu=c(((n,r)=>{const{onClear:i,...o}=n;return e(ru,{children:[t(ou,{}),t(iu,{ref:r,...o}),o.value&&t(au,{"aria-label":"Clear search",focusOutline:"browser",onClick:i,children:t(su,{})})]},"search")})),cu=({listItems:r,listExtractor:i,valueExtractor:a,onSelectItem:c,listStyleWidth:u,visible:d,enableSearch:h,searchPlaceholder:p="Search",onSearch:f,searchFunction:g,onDismiss:m,disableItemFocus:y,multiSelect:b,selectedItems:v,onSelectAll:w,onRetry:_,itemsLoadState:S="success",itemTruncationType:$="end",itemMaxLines:x=2,labelDisplayType:F="inline",renderListItem:k,onBlur:B,hideNoResultsDisplay:A,renderCustomCallToAction:O,...j})=>{const[E,D]=s(0),[P,C]=s(""),[z,I]=s(r),[H,T]=s(0),N=jl({height:H}),M=l(),V=l(),R=l([]),L=l(),W=l(),q=l(E),U=l(z),Q=e=>{q.current=e,D(e)},G=e=>{U.current=e,I(e)};o((()=>(document.addEventListener("keydown",ee),()=>{document.removeEventListener("keydown",ee)})),[]),o((()=>{Y(P)}),[P]),o((()=>{if(C(""),d){if(setTimeout((()=>{T(J())})),y)return;L&&L.current?(L.current.focus(),Q(-1)):R.current[E]&&R.current[E].focus()}else T(0)}),[d]),o((()=>{if(d){const e=J();T(e)}}),[z,S]),o((()=>{G(r),C(""),Q(0)}),[r]);const X=e=>i?i(e):e.toString(),Z=e=>{if("inline"!==F)return!1;let t=0;V&&V.current&&(t=V.current.getBoundingClientRect().width-60);return jc.getTextWidth(e,"1.125rem 'Open Sans'")>t*x},K=e=>!!uo(v,(t=>po(t,e))),Y=e=>{if(""===e)G(r);else if(g){const t=g(e);G(t)}else{const t=r.filter((t=>{const n=X(t),r="object"==typeof n?n.title.toLowerCase():n.toLowerCase();return"object"==typeof n&&n.secondaryLabel?r.includes(e.trim().toLowerCase())||n.secondaryLabel.includes(e.trim().toLowerCase()):r.includes(e.trim().toLowerCase())}));G(t)}},J=()=>(V&&V.current?V.current.getBoundingClientRect().height:0)+(W.current?W.current.getBoundingClientRect().height:0),ee=e=>{if(M&&M.current.contains(e.target))switch(e.code){case"ArrowDown":if(q.current<U.current.length-1){const e=q.current+1;R.current[e].focus(),Q(e)}break;case"ArrowUp":if(q.current>0){const e=q.current-1;R.current[e].focus(),Q(q.current-1)}break;case"Escape":m&&m(!0)}},te=(e,t)=>{e.preventDefault(),c&&c(t,(e=>a?a(e):e)(t))},ne=e=>{const t=e.target.value;C(t),f&&f()},re=()=>{C(""),L.current.focus(),f&&f()},ie=()=>{_&&_()},oe=()=>{B&&B()},ae=r=>e(n,{children:[t(Rc,{$maxLines:x,"aria-hidden":!0,children:r}),t(Lc,{$maxLines:x,"aria-hidden":!0,children:r})]}),se=n=>{const r=X(n),i="string"==typeof r?r:r.title,o="string"==typeof r?void 0:r.secondaryLabel,a=Z(i),s=o&&Z(o);return e(Vc,{$labelDisplayType:a||s?"next-line":F,children:[t(Nc,{$truncateType:$,$maxLines:x,"aria-label":i,children:"middle"===$&&a?ae(i):i}),o&&t(Mc,{$truncateType:$,$maxLines:x,$labelDisplayType:F,"aria-label":o,children:"middle"===$&&s?ae(o):o})]})},le=()=>{if(!_||_&&"success"===S)return z.map(((n,r)=>t(Ic,{$checked:K(n)&&!b,children:e(Hc,{$hasNextLineLabel:"next-line"===F&&z.length>0&&i&&"string"!=typeof i(z[0]),onClick:e=>{te(e,n)},ref:e=>R.current[r]=e,"data-testid":"list-item",type:"button",tabIndex:d?0:-1,$multiSelect:b,onBlur:oe,children:[b&&t(Wc,{checked:K(n),displaySize:"small"}),k?k(n,{selected:K(n)}):se(n)]})},((e,t)=>`item_${t}__${a?a(e):e}`)(n,r))))},ce=()=>{if(b&&z.length>0&&!P&&"success"===S)return t(qc,{children:t(Uc,{onClick:w,type:"button",children:0===v.length?"Select all":"Unselect all"})},"selectAll")},ue=()=>{if(!A&&(P||!h)&&0===z.length&&"success"===S)return e(Qc,{"data-testid":"list-no-results",children:[t(Xc,{"data-testid":"no-result-icon"}),t(Gc,{children:"No results found."})]},"noResults")},de=()=>{if(_&&"loading"===S)return e(Qc,{"data-testid":"list-loading",children:[t(Oc,{$buttonStyle:"secondary",size:24}),t(Gc,{children:"Loading..."})]},"loading")},he=()=>{if(_&&"fail"===S)return e(Qc,{"data-testid":"list-fail",children:[t(Xc,{"data-testid":"load-error-icon"}),t(Gc,{children:"Failed to load."}),t(Uc,{onClick:ie,type:"button",children:"Try again."})]},"noResults")};return t(n,{children:e(Cc,{style:N,"data-testid":d?"dropdown-container":"dropdown-container-hidden",ref:M,children:[(()=>{if(d)return e(zc,{ref:V,"data-testid":"dropdown-list",width:u,role:"list",...j,children:[(h||g)&&"success"===S?t(lu,{ref:L,onChange:ne,value:P,placeholder:p,"data-testid":"search-input","aria-label":"search-input",tabIndex:d?0:-1,onClear:re}):null,ce(),ue(),de(),he(),le()]})})(),(()=>{if(d&&O)return t("div",{ref:W,"data-testid":"custom-cta",children:O(m,z)})})()]})})},uu="all 300ms cubic-bezier(0.21, 0.79, 0.53, 1)",du=f.div`
574
+ `,lu=c(((n,r)=>{const{onClear:i,...o}=n;return e(ru,{children:[t(ou,{}),t(iu,{ref:r,...o}),o.value&&t(au,{"aria-label":"Clear search",focusOutline:"browser",onClick:i,children:t(su,{})})]},"search")})),cu=({listItems:r,listExtractor:i,valueExtractor:a,onSelectItem:c,listStyleWidth:u,visible:d,enableSearch:h,searchPlaceholder:p="Search",onSearch:f,searchFunction:g,onDismiss:m,disableItemFocus:y,multiSelect:b,selectedItems:v,onSelectAll:w,onRetry:_,itemsLoadState:S="success",itemTruncationType:$="end",itemMaxLines:x=2,labelDisplayType:F="inline",renderListItem:k,onBlur:B,hideNoResultsDisplay:A,renderCustomCallToAction:O,...j})=>{const[E,D]=s(0),[P,z]=s(""),[C,I]=s(r),[H,T]=s(0),N=jl({height:H}),M=l(),V=l(),R=l([]),L=l(),W=l(),q=l(E),U=l(C),Q=e=>{q.current=e,D(e)},G=e=>{U.current=e,I(e)};o((()=>(document.addEventListener("keydown",ee),()=>{document.removeEventListener("keydown",ee)})),[]),o((()=>{Y(P)}),[P]),o((()=>{if(z(""),d){if(setTimeout((()=>{T(J())})),y)return;L&&L.current?(L.current.focus(),Q(-1)):R.current[E]&&R.current[E].focus()}else T(0)}),[d]),o((()=>{if(d){const e=J();T(e)}}),[C,S]),o((()=>{G(r),z(""),Q(0)}),[r]);const X=e=>i?i(e):e.toString(),Z=e=>{if("inline"!==F)return!1;let t=0;V&&V.current&&(t=V.current.getBoundingClientRect().width-60);return jc.getTextWidth(e,"1.125rem 'Open Sans'")>t*x},K=e=>!!uo(v,(t=>po(t,e))),Y=e=>{if(""===e)G(r);else if(g){const t=g(e);G(t)}else{const t=r.filter((t=>{const n=X(t),r="object"==typeof n?n.title.toLowerCase():n.toLowerCase(),i="string"==typeof n?void 0:n.secondaryLabel?.toLowerCase(),o=e.trim().toLowerCase();return r.includes(o)||i&&i.includes(o)}));G(t)}},J=()=>(V&&V.current?V.current.getBoundingClientRect().height:0)+(W.current?W.current.getBoundingClientRect().height:0),ee=e=>{if(M&&M.current.contains(e.target))switch(e.code){case"ArrowDown":if(q.current<U.current.length-1){const e=q.current+1;R.current[e].focus(),Q(e)}break;case"ArrowUp":if(q.current>0){const e=q.current-1;R.current[e].focus(),Q(q.current-1)}break;case"Escape":m&&m(!0)}},te=(e,t)=>{e.preventDefault(),c&&c(t,(e=>a?a(e):e)(t))},ne=e=>{const t=e.target.value;z(t),f&&f()},re=()=>{z(""),L.current.focus(),f&&f()},ie=()=>{_&&_()},oe=()=>{B&&B()},ae=r=>e(n,{children:[t(Rc,{$maxLines:x,"aria-hidden":!0,children:r}),t(Lc,{$maxLines:x,"aria-hidden":!0,children:r})]}),se=n=>{const r=X(n),i="string"==typeof r?r:r.title,o="string"==typeof r?void 0:r.secondaryLabel,a=Z(i),s=o&&Z(o);return e(Vc,{$labelDisplayType:a||s?"next-line":F,children:[t(Nc,{$truncateType:$,$maxLines:x,"aria-label":i,children:"middle"===$&&a?ae(i):i}),o&&t(Mc,{$truncateType:$,$maxLines:x,$labelDisplayType:F,"aria-label":o,children:"middle"===$&&s?ae(o):o})]})},le=()=>{if(!_||_&&"success"===S)return C.map(((n,r)=>t(Ic,{$checked:K(n)&&!b,children:e(Hc,{$hasNextLineLabel:"next-line"===F&&C.length>0&&i&&"string"!=typeof i(C[0]),onClick:e=>{te(e,n)},ref:e=>R.current[r]=e,"data-testid":"list-item",type:"button",tabIndex:d?0:-1,$multiSelect:b,onBlur:oe,children:[b&&t(Wc,{checked:K(n),displaySize:"small"}),k?k(n,{selected:K(n)}):se(n)]})},((e,t)=>`item_${t}__${a?a(e):e}`)(n,r))))},ce=()=>{if(b&&C.length>0&&!P&&"success"===S)return t(qc,{children:t(Uc,{onClick:w,type:"button",children:0===v.length?"Select all":"Unselect all"})},"selectAll")},ue=()=>{if(!A&&(P||!h)&&0===C.length&&"success"===S)return e(Qc,{"data-testid":"list-no-results",children:[t(Xc,{"data-testid":"no-result-icon"}),t(Gc,{children:"No results found."})]},"noResults")},de=()=>{if(_&&"loading"===S)return e(Qc,{"data-testid":"list-loading",children:[t(Oc,{$buttonStyle:"secondary",size:24}),t(Gc,{children:"Loading..."})]},"loading")},he=()=>{if(_&&"fail"===S)return e(Qc,{"data-testid":"list-fail",children:[t(Xc,{"data-testid":"load-error-icon"}),t(Gc,{children:"Failed to load."}),t(Uc,{onClick:ie,type:"button",children:"Try again."})]},"noResults")};return t(n,{children:e(zc,{style:N,"data-testid":d?"dropdown-container":"dropdown-container-hidden",ref:M,children:[(()=>{if(d)return e(Cc,{ref:V,"data-testid":"dropdown-list",width:u,role:"list",...j,children:[(h||g)&&"success"===S?t(lu,{ref:L,onChange:ne,value:P,placeholder:p,"data-testid":"search-input","aria-label":"search-input",tabIndex:d?0:-1,onClear:re}):null,ce(),ue(),de(),he(),le()]})})(),(()=>{if(d&&O)return t("div",{ref:W,"data-testid":"custom-cta",children:O(m,C)})})()]})})},uu="all 300ms cubic-bezier(0.21, 0.79, 0.53, 1)",du=f.div`
575
575
  position: relative;
576
576
  min-height: 3rem;
577
577
  height: 3rem; // Need this to persist the height when expanding or collapsing list
@@ -692,5 +692,5 @@ import{jsxs as e,jsx as t,Fragment as n}from"react/jsx-runtime";import*as r from
692
692
  overflow: hidden;
693
693
  `,_u=f(wu)`
694
694
  color: ${oc.Neutral[3]};
695
- `,Su=({children:e,show:n,error:r,disabled:i,testId:a,onBlur:s,readOnly:c})=>{const u=l();return((e,t,n="window",r)=>{const i=l();o((()=>{i.current=t}),[t]),o((()=>{let t;switch(n){case"window":t=window;break;case"document":t=document;break;default:t=n}if(!t||!t.addEventListener)return;const o=e=>i.current(e);return t.addEventListener(e,o,r),()=>{t.removeEventListener(e,o,r)}}),[e,n])})("mousedown",(function(e){if(!i){if(u&&u.current.contains(e.target))return;n&&s()}}),"document"),t(du,{children:t(gu,{ref:u,error:r&&!n,disabled:i,$readOnly:c,expanded:n,"data-testid":a,children:e})})},$u=({selectedOptions:r,placeholder:i="Select",options:a,className:c,disabled:u,error:d,"data-testid":h,enableSearch:p=!1,searchFunction:f,searchPlaceholder:g,valueExtractor:m,listExtractor:y,onSelectOptions:b,listStyleWidth:v,onShowOptions:w,onHideOptions:_,onRetry:S,optionsLoadState:$="success",optionTruncationType:x="end",...F})=>{const[k,B]=s(r||[]),[A,O]=s(!1),j=l();o((()=>{B(r||[])}),[r]);const E=(e,t)=>{const n=[...k],r=ao(k,(e=>(m?m(e):e)===t));r>-1?n.splice(r,1):n.push(e),B(n),C(!1),j&&j.current.focus(),z(n)},D=()=>{A&&(O(!1),C(!1)),j&&j.current.focus()},P=()=>{k&&k.length>0?(B([]),z([])):(B(a),z(a))},C=e=>{!e&&_&&_(),e&&w&&w()},z=e=>{b&&b(e)};return e(Su,{show:A,error:d&&!A,disabled:u,testId:h,className:c,onBlur:()=>{O(!1),C(!1)},children:[t(pu,{ref:j,type:"button","data-testid":"selector",onClick:e=>{e.preventDefault(),u||(O(!A),C(!A))},...F,children:e(n,{children:[t(vu,{children:k&&0!==k.length?t(wu,{children:k&&0!=k.length?`${k.length} selected`:i}):t(_u,{truncateType:x,children:i})}),t(mu,{expanded:A,children:t(yu,{})})]})}),A&&t(bu,{}),a&&a.length>0||S?t(cu,{listItems:a,onSelectItem:E,onDismiss:D,valueExtractor:m,listExtractor:y,listStyleWidth:v,visible:A,enableSearch:p,searchFunction:f,searchPlaceholder:g,"data-testid":"dropdown-list",multiSelect:!0,selectedItems:k,onSelectAll:P,onRetry:S,itemsLoadState:$,itemTruncationType:x}):null]})};export{$u as InputMultiSelect};
695
+ `,Su=({children:e,show:n,error:r,disabled:i,testId:a,onBlur:s,readOnly:c})=>{const u=l();return((e,t,n="window",r)=>{const i=l();o((()=>{i.current=t}),[t]),o((()=>{let t;switch(n){case"window":t=window;break;case"document":t=document;break;default:t=n}if(!t||!t.addEventListener)return;const o=e=>i.current(e);return t.addEventListener(e,o,r),()=>{t.removeEventListener(e,o,r)}}),[e,n])})("mousedown",(function(e){if(!i){if(u&&u.current.contains(e.target))return;n&&s()}}),"document"),t(du,{children:t(gu,{ref:u,error:r&&!n,disabled:i,$readOnly:c,expanded:n,"data-testid":a,children:e})})},$u=({selectedOptions:r,placeholder:i="Select",options:a,className:c,disabled:u,error:d,"data-testid":h,enableSearch:p=!1,searchFunction:f,searchPlaceholder:g,valueExtractor:m,listExtractor:y,onSelectOptions:b,listStyleWidth:v,onShowOptions:w,onHideOptions:_,onRetry:S,optionsLoadState:$="success",optionTruncationType:x="end",...F})=>{const[k,B]=s(r||[]),[A,O]=s(!1),j=l();o((()=>{B(r||[])}),[r]);const E=(e,t)=>{const n=[...k],r=ao(k,(e=>(m?m(e):e)===t));r>-1?n.splice(r,1):n.push(e),B(n),z(!1),j&&j.current.focus(),C(n)},D=()=>{A&&(O(!1),z(!1)),j&&j.current.focus()},P=()=>{k&&k.length>0?(B([]),C([])):(B(a),C(a))},z=e=>{!e&&_&&_(),e&&w&&w()},C=e=>{b&&b(e)};return e(Su,{show:A,error:d&&!A,disabled:u,testId:h,className:c,onBlur:()=>{O(!1),z(!1)},children:[t(pu,{ref:j,type:"button","data-testid":"selector",onClick:e=>{e.preventDefault(),u||(O(!A),z(!A))},...F,children:e(n,{children:[t(vu,{children:k&&0!==k.length?t(wu,{children:k&&0!=k.length?a&&k.length===a.length?"All selected":`${k.length} selected`:i}):t(_u,{truncateType:x,children:i})}),t(mu,{expanded:A,children:t(yu,{})})]})}),A&&t(bu,{}),a&&a.length>0||S?t(cu,{listItems:a,onSelectItem:E,onDismiss:D,valueExtractor:m,listExtractor:y,listStyleWidth:v,visible:A,enableSearch:p,searchFunction:f,searchPlaceholder:g,"data-testid":"dropdown-list",multiSelect:!0,selectedItems:k,onSelectAll:P,onRetry:S,itemsLoadState:$,itemTruncationType:x}):null]})};export{$u as InputMultiSelect};
696
696
  //# sourceMappingURL=index.js.map