UNPKG

@devfamily/admiral

Version:

Admiral is a frontend framework for creating back office using React. It provides out-of-the-box components and tools that make developing an admin interface easy and fast.

5 lines 2.03 MB
(function(xe,w){typeof exports=="object"&&typeof module!="undefined"?w(exports,require("react"),require("react-dom")):typeof define=="function"&&define.amd?define(["exports","react","react-dom"],w):(xe=typeof globalThis!="undefined"?globalThis:xe||self,w(xe.admiral={},xe.React,xe.ReactDOM))})(this,function(xe,w,ir){"use strict";var n4t=Object.defineProperty,a4t=Object.defineProperties;var i4t=Object.getOwnPropertyDescriptors;var pp=Object.getOwnPropertySymbols;var t6=Object.prototype.hasOwnProperty,r6=Object.prototype.propertyIsEnumerable;var e6=(xe,w,ir)=>w in xe?n4t(xe,w,{enumerable:!0,configurable:!0,writable:!0,value:ir}):xe[w]=ir,q=(xe,w)=>{for(var ir in w||(w={}))t6.call(w,ir)&&e6(xe,ir,w[ir]);if(pp)for(var ir of pp(w))r6.call(w,ir)&&e6(xe,ir,w[ir]);return xe},be=(xe,w)=>a4t(xe,i4t(w));var ot=(xe,w)=>{var ir={};for(var qn in xe)t6.call(xe,qn)&&w.indexOf(qn)<0&&(ir[qn]=xe[qn]);if(xe!=null&&pp)for(var qn of pp(xe))w.indexOf(qn)<0&&r6.call(xe,qn)&&(ir[qn]=xe[qn]);return ir};function qn(e){return e&&typeof e=="object"&&"default"in e?e:{default:e}}function Xx(e){if(e&&e.__esModule)return e;var t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});return e&&Object.keys(e).forEach(function(r){if(r!=="default"){var n=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,n.get?n:{enumerable:!0,get:function(){return e[r]}})}}),t.default=e,Object.freeze(t)}var b=Xx(w),h=qn(w),xo=qn(ir),n6=Xx(ir);let gp=wl();const kt=e=>bl(e,gp);let yp=wl();kt.write=e=>bl(e,yp);let tf=wl();kt.onStart=e=>bl(e,tf);let bp=wl();kt.onFrame=e=>bl(e,bp);let wp=wl();kt.onFinish=e=>bl(e,wp);let pu=[];kt.setTimeout=(e,t)=>{let r=kt.now()+t,n=()=>{let i=pu.findIndex(o=>o.cancel==n);~i&&pu.splice(i,1),Ni-=~i?1:0},a={time:r,handler:e,cancel:n};return pu.splice(Gx(r),0,a),Ni+=1,Kx(),a};let Gx=e=>~(~pu.findIndex(t=>t.time>e)||~pu.length);kt.cancel=e=>{tf.delete(e),bp.delete(e),gp.delete(e),yp.delete(e),wp.delete(e)},kt.sync=e=>{kp=!0,kt.batchedUpdates(e),kp=!1},kt.throttle=e=>{let t;function r(){try{e(...t)}finally{t=null}}function n(...a){t=a,kt.onStart(r)}return n.handler=e,n.cancel=()=>{tf.delete(r),t=null},n};let xp=typeof window!="undefined"?window.requestAnimationFrame:()=>{};kt.use=e=>xp=e,kt.now=typeof performance!="undefined"?()=>performance.now():Date.now,kt.batchedUpdates=e=>e(),kt.catch=console.error,kt.frameLoop="always",kt.advance=()=>{kt.frameLoop!=="demand"?console.warn("Cannot call the manual advancement of rafz whilst frameLoop is not set as demand"):Jx()};let Oi=-1,Ni=0,kp=!1;function bl(e,t){kp?(t.delete(e),e(0)):(t.add(e),Kx())}function Kx(){Oi<0&&(Oi=0,kt.frameLoop!=="demand"&&xp(Qx))}function a6(){Oi=-1}function Qx(){~Oi&&(xp(Qx),kt.batchedUpdates(Jx))}function Jx(){let e=Oi;Oi=kt.now();let t=Gx(Oi);t&&(Zx(pu.splice(0,t),r=>r.handler()),Ni-=t),tf.flush(),gp.flush(e?Math.min(64,Oi-e):16.667),bp.flush(),yp.flush(),wp.flush(),Ni||a6()}function wl(){let e=new Set,t=e;return{add(r){Ni+=t==e&&!e.has(r)?1:0,e.add(r)},delete(r){return Ni-=t==e&&e.has(r)?1:0,e.delete(r)},flush(r){t.size&&(e=new Set,Ni-=t.size,Zx(t,n=>n(r)&&e.add(n)),Ni+=e.size,t=e)}}}function Zx(e,t){e.forEach(r=>{try{t(r)}catch(n){kt.catch(n)}})}function Cp(){}const i6=(e,t,r)=>Object.defineProperty(e,t,{value:r,writable:!0,configurable:!0}),De={arr:Array.isArray,obj:e=>!!e&&e.constructor.name==="Object",fun:e=>typeof e=="function",str:e=>typeof e=="string",num:e=>typeof e=="number",und:e=>e===void 0};function mi(e,t){if(De.arr(e)){if(!De.arr(t)||e.length!==t.length)return!1;for(let r=0;r<e.length;r++)if(e[r]!==t[r])return!1;return!0}return e===t}const wt=(e,t)=>e.forEach(t);function Na(e,t,r){if(De.arr(e)){for(let n=0;n<e.length;n++)t.call(r,e[n],`${n}`);return}for(const n in e)e.hasOwnProperty(n)&&t.call(r,e[n],n)}const an=e=>De.und(e)?[]:De.arr(e)?e:[e];function xl(e,t){if(e.size){const r=Array.from(e);e.clear(),wt(r,t)}}const kl=(e,...t)=>xl(e,r=>r(...t)),ek=()=>typeof window=="undefined"||!window.navigator||/ServerSideRendering|^Deno\//.test(window.navigator.userAgent);let Pp,tk,Wi=null,rk=!1,Sp=Cp;var Wa=Object.freeze({__proto__:null,get createStringInterpolator(){return Pp},get to(){return tk},get colors(){return Wi},get skipAnimation(){return rk},get willAdvance(){return Sp},assign:e=>{e.to&&(tk=e.to),e.now&&(kt.now=e.now),e.colors!==void 0&&(Wi=e.colors),e.skipAnimation!=null&&(rk=e.skipAnimation),e.createStringInterpolator&&(Pp=e.createStringInterpolator),e.requestAnimationFrame&&kt.use(e.requestAnimationFrame),e.batchedUpdates&&(kt.batchedUpdates=e.batchedUpdates),e.willAdvance&&(Sp=e.willAdvance),e.frameLoop&&(kt.frameLoop=e.frameLoop)}});const Cl=new Set;let Xn=[],Mp=[],rf=0;const nf={get idle(){return!Cl.size&&!Xn.length},start(e){rf>e.priority?(Cl.add(e),kt.onStart(o6)):(nk(e),kt(Ep))},advance:Ep,sort(e){if(rf)kt.onFrame(()=>nf.sort(e));else{const t=Xn.indexOf(e);~t&&(Xn.splice(t,1),ak(e))}},clear(){Xn=[],Cl.clear()}};function o6(){Cl.forEach(nk),Cl.clear(),kt(Ep)}function nk(e){Xn.includes(e)||ak(e)}function ak(e){Xn.splice(u6(Xn,t=>t.priority>e.priority),0,e)}function Ep(e){const t=Mp;for(let r=0;r<Xn.length;r++){const n=Xn[r];rf=n.priority,n.idle||(Sp(n),n.advance(e),n.idle||t.push(n))}return rf=0,Mp=Xn,Mp.length=0,Xn=t,Xn.length>0}function u6(e,t){const r=e.findIndex(t);return r<0?e.length:r}const s6={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},ha="[-+]?\\d*\\.?\\d+",af=ha+"%";function of(...e){return"\\(\\s*("+e.join(")\\s*,\\s*(")+")\\s*\\)"}const l6=new RegExp("rgb"+of(ha,ha,ha)),c6=new RegExp("rgba"+of(ha,ha,ha,ha)),d6=new RegExp("hsl"+of(ha,af,af)),f6=new RegExp("hsla"+of(ha,af,af,ha)),m6=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,v6=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,h6=/^#([0-9a-fA-F]{6})$/,p6=/^#([0-9a-fA-F]{8})$/;function g6(e){let t;return typeof e=="number"?e>>>0===e&&e>=0&&e<=4294967295?e:null:(t=h6.exec(e))?parseInt(t[1]+"ff",16)>>>0:Wi&&Wi[e]!==void 0?Wi[e]:(t=l6.exec(e))?(gu(t[1])<<24|gu(t[2])<<16|gu(t[3])<<8|255)>>>0:(t=c6.exec(e))?(gu(t[1])<<24|gu(t[2])<<16|gu(t[3])<<8|uk(t[4]))>>>0:(t=m6.exec(e))?parseInt(t[1]+t[1]+t[2]+t[2]+t[3]+t[3]+"ff",16)>>>0:(t=p6.exec(e))?parseInt(t[1],16)>>>0:(t=v6.exec(e))?parseInt(t[1]+t[1]+t[2]+t[2]+t[3]+t[3]+t[4]+t[4],16)>>>0:(t=d6.exec(e))?(ik(ok(t[1]),uf(t[2]),uf(t[3]))|255)>>>0:(t=f6.exec(e))?(ik(ok(t[1]),uf(t[2]),uf(t[3]))|uk(t[4]))>>>0:null}function _p(e,t,r){return r<0&&(r+=1),r>1&&(r-=1),r<1/6?e+(t-e)*6*r:r<1/2?t:r<2/3?e+(t-e)*(2/3-r)*6:e}function ik(e,t,r){const n=r<.5?r*(1+t):r+t-r*t,a=2*r-n,i=_p(a,n,e+1/3),o=_p(a,n,e),u=_p(a,n,e-1/3);return Math.round(i*255)<<24|Math.round(o*255)<<16|Math.round(u*255)<<8}function gu(e){const t=parseInt(e,10);return t<0?0:t>255?255:t}function ok(e){return(parseFloat(e)%360+360)%360/360}function uk(e){const t=parseFloat(e);return t<0?0:t>1?255:Math.round(t*255)}function uf(e){const t=parseFloat(e);return t<0?0:t>100?1:t/100}function sk(e){let t=g6(e);if(t===null)return e;t=t||0;let r=(t&4278190080)>>>24,n=(t&16711680)>>>16,a=(t&65280)>>>8,i=(t&255)/255;return`rgba(${r}, ${n}, ${a}, ${i})`}const Pl=(e,t,r)=>{if(De.fun(e))return e;if(De.arr(e))return Pl({range:e,output:t,extrapolate:r});if(De.str(e.output[0]))return Pp(e);const n=e,a=n.output,i=n.range||[0,1],o=n.extrapolateLeft||n.extrapolate||"extend",u=n.extrapolateRight||n.extrapolate||"extend",s=n.easing||(l=>l);return l=>{const c=b6(l,i);return y6(l,i[c],i[c+1],a[c],a[c+1],s,o,u,n.map)}};function y6(e,t,r,n,a,i,o,u,s){let l=s?s(e):e;if(l<t){if(o==="identity")return l;o==="clamp"&&(l=t)}if(l>r){if(u==="identity")return l;u==="clamp"&&(l=r)}return n===a?n:t===r?e<=t?n:a:(t===-1/0?l=-l:r===1/0?l=l-t:l=(l-t)/(r-t),l=i(l),n===-1/0?l=-l:a===1/0?l=l+n:l=l*(a-n)+n,l)}function b6(e,t){for(var r=1;r<t.length-1&&!(t[r]>=e);++r);return r-1}function $p(){return $p=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},$p.apply(this,arguments)}const yu=Symbol.for("FluidValue.get"),ko=Symbol.for("FluidValue.observers"),Gn=e=>Boolean(e&&e[yu]),bn=e=>e&&e[yu]?e[yu]():e,lk=e=>e[ko]||null;function w6(e,t){e.eventObserved?e.eventObserved(t):e(t)}function Sl(e,t){let r=e[ko];r&&r.forEach(n=>{w6(n,t)})}class ck{constructor(t){if(this[yu]=void 0,this[ko]=void 0,!t&&!(t=this.get))throw Error("Unknown getter");x6(this,t)}}const x6=(e,t)=>dk(e,yu,t);function bu(e,t){if(e[yu]){let r=e[ko];r||dk(e,ko,r=new Set),r.has(t)||(r.add(t),e.observerAdded&&e.observerAdded(r.size,t))}return t}function Ml(e,t){let r=e[ko];if(r&&r.has(t)){const n=r.size-1;n?r.delete(t):e[ko]=null,e.observerRemoved&&e.observerRemoved(n,t)}}const dk=(e,t,r)=>Object.defineProperty(e,t,{value:r,writable:!0,configurable:!0}),sf=/[+\-]?(?:0|[1-9]\d*)(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,k6=/(#(?:[0-9a-f]{2}){2,4}|(#[0-9a-f]{3})|(rgb|hsl)a?\((-?\d+%?[,\s]+){2,3}\s*[\d\.]+%?\))/gi,fk=new RegExp(`(${sf.source})(%|[a-z]+)`,"i"),C6=/rgba\(([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+)\)/gi,lf=/var\((--[a-zA-Z0-9-_]+),? ?([a-zA-Z0-9 ()%#.,-]+)?\)/,mk=e=>{const[t,r]=P6(e);if(!t||ek())return e;const n=window.getComputedStyle(document.documentElement).getPropertyValue(t);if(n)return n.trim();if(r&&r.startsWith("--")){const a=window.getComputedStyle(document.documentElement).getPropertyValue(r);return a||e}else{if(r&&lf.test(r))return mk(r);if(r)return r}return e},P6=e=>{const t=lf.exec(e);if(!t)return[,];const[,r,n]=t;return[r,n]};let Dp;const S6=(e,t,r,n,a)=>`rgba(${Math.round(t)}, ${Math.round(r)}, ${Math.round(n)}, ${a})`,vk=e=>{Dp||(Dp=Wi?new RegExp(`(${Object.keys(Wi).join("|")})(?!\\w)`,"g"):/^\b$/);const t=e.output.map(i=>bn(i).replace(lf,mk).replace(k6,sk).replace(Dp,sk)),r=t.map(i=>i.match(sf).map(Number)),a=r[0].map((i,o)=>r.map(u=>{if(!(o in u))throw Error('The arity of each "output" value must be equal');return u[o]})).map(i=>Pl($p({},e,{output:i})));return i=>{var o;const u=!fk.test(t[0])&&((o=t.find(l=>fk.test(l)))==null?void 0:o.replace(sf,""));let s=0;return t[0].replace(sf,()=>`${a[s++](i)}${u||""}`).replace(C6,S6)}},Tp="react-spring: ",hk=e=>{const t=e;let r=!1;if(typeof t!="function")throw new TypeError(`${Tp}once requires a function parameter`);return(...n)=>{r||(t(...n),r=!0)}},M6=hk(console.warn);function E6(){M6(`${Tp}The "interpolate" function is deprecated in v9 (use "to" instead)`)}const _6=hk(console.warn);function $6(){_6(`${Tp}Directly calling start instead of using the api object is deprecated in v9 (use ".start" instead), this will be removed in later 0.X.0 versions`)}function cf(e){return De.str(e)&&(e[0]=="#"||/\d/.test(e)||!ek()&&lf.test(e)||e in(Wi||{}))}const df=e=>w.useEffect(e,D6),D6=[];function Op(){const e=w.useState()[1],t=w.useState(T6)[0];return df(t.unmount),()=>{t.current&&e({})}}function T6(){const e={current:!0,unmount:()=>()=>{e.current=!1}};return e}function O6(e,t){const[r]=w.useState(()=>({inputs:t,result:e()})),n=w.useRef(),a=n.current;let i=a;return i?Boolean(t&&i.inputs&&N6(t,i.inputs))||(i={inputs:t,result:e()}):i=r,w.useEffect(()=>{n.current=i,a==r&&(r.inputs=r.result=void 0)},[i]),i.result}function N6(e,t){if(e.length!==t.length)return!1;for(let r=0;r<e.length;r++)if(e[r]!==t[r])return!1;return!0}function Np(e){const t=w.useRef();return w.useEffect(()=>{t.current=e}),t.current}const wu=typeof window!="undefined"&&window.document&&window.document.createElement?b.useLayoutEffect:b.useEffect,El=Symbol.for("Animated:node"),W6=e=>!!e&&e[El]===e,Ia=e=>e&&e[El],Wp=(e,t)=>i6(e,El,t),ff=e=>e&&e[El]&&e[El].getPayload();class pk{constructor(){this.payload=void 0,Wp(this,this)}getPayload(){return this.payload||[]}}class xu extends pk{constructor(t){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=t,De.num(this._value)&&(this.lastPosition=this._value)}static create(t){return new xu(t)}getPayload(){return[this]}getValue(){return this._value}setValue(t,r){return De.num(t)&&(this.lastPosition=t,r&&(t=Math.round(t/r)*r,this.done&&(this.lastPosition=t))),this._value===t?!1:(this._value=t,!0)}reset(){const{done:t}=this;this.done=!1,De.num(this._value)&&(this.elapsedTime=0,this.durationProgress=0,this.lastPosition=this._value,t&&(this.lastVelocity=null),this.v0=null)}}class ku extends xu{constructor(t){super(0);this._string=null,this._toString=void 0,this._toString=Pl({output:[t,t]})}static create(t){return new ku(t)}getValue(){let t=this._string;return t==null?this._string=this._toString(this._value):t}setValue(t){if(De.str(t)){if(t==this._string)return!1;this._string=t,this._value=1}else if(super.setValue(t))this._string=null;else return!1;return!0}reset(t){t&&(this._toString=Pl({output:[this.getValue(),t]})),this._value=0,super.reset()}}const mf={dependencies:null};class vf extends pk{constructor(t){super();this.source=t,this.setValue(t)}getValue(t){const r={};return Na(this.source,(n,a)=>{W6(n)?r[a]=n.getValue(t):Gn(n)?r[a]=bn(n):t||(r[a]=n)}),r}setValue(t){this.source=t,this.payload=this._makePayload(t)}reset(){this.payload&&wt(this.payload,t=>t.reset())}_makePayload(t){if(t){const r=new Set;return Na(t,this._addToPayload,r),Array.from(r)}}_addToPayload(t){mf.dependencies&&Gn(t)&&mf.dependencies.add(t);const r=ff(t);r&&wt(r,n=>this.add(n))}}class Ip extends vf{constructor(t){super(t)}static create(t){return new Ip(t)}getValue(){return this.source.map(t=>t.getValue())}setValue(t){const r=this.getPayload();return t.length==r.length?r.map((n,a)=>n.setValue(t[a])).some(Boolean):(super.setValue(t.map(I6)),!0)}}function I6(e){return(cf(e)?ku:xu).create(e)}function Lp(e){const t=Ia(e);return t?t.constructor:De.arr(e)?Ip:cf(e)?ku:xu}function hf(){return hf=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},hf.apply(this,arguments)}const gk=(e,t)=>{const r=!De.fun(e)||e.prototype&&e.prototype.isReactComponent;return w.forwardRef((n,a)=>{const i=w.useRef(null),o=r&&w.useCallback(v=>{i.current=R6(a,v)},[a]),[u,s]=A6(n,t),l=Op(),c=()=>{const v=i.current;if(r&&!v)return;(v?t.applyAnimatedValues(v,u.getValue(!0)):!1)===!1&&l()},d=new L6(c,s),f=w.useRef();wu(()=>{const v=f.current;f.current=d,wt(s,p=>bu(p,d)),v&&(wt(v.deps,p=>Ml(p,v)),kt.cancel(v.update))}),w.useEffect(c,[]),df(()=>()=>{const v=f.current;wt(v.deps,p=>Ml(p,v))});const m=t.getComponentProps(u.getValue());return b.createElement(e,hf({},m,{ref:o}))})};class L6{constructor(t,r){this.update=t,this.deps=r}eventObserved(t){t.type=="change"&&kt.write(this.update)}}function A6(e,t){const r=new Set;return mf.dependencies=r,e.style&&(e=hf({},e,{style:t.createAnimatedStyle(e.style)})),e=new vf(e),mf.dependencies=null,[e,r]}function R6(e,t){return e&&(De.fun(e)?e(t):e.current=t),t}const yk=Symbol.for("AnimatedComponent"),F6=(e,{applyAnimatedValues:t=()=>!1,createAnimatedStyle:r=a=>new vf(a),getComponentProps:n=a=>a}={})=>{const a={applyAnimatedValues:t,createAnimatedStyle:r,getComponentProps:n},i=o=>{const u=bk(o)||"Anonymous";return De.str(o)?o=i[o]||(i[o]=gk(o,a)):o=o[yk]||(o[yk]=gk(o,a)),o.displayName=`Animated(${u})`,o};return Na(e,(o,u)=>{De.arr(e)&&(u=bk(o)),i[u]=i(o)}),{animated:i}},bk=e=>De.str(e)?e:e&&De.str(e.displayName)?e.displayName:De.fun(e)&&e.name||null;function gr(){return gr=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},gr.apply(this,arguments)}function wn(e,...t){return De.fun(e)?e(...t):e}const _l=(e,t)=>e===!0||!!(t&&e&&(De.fun(e)?e(t):an(e).includes(t))),wk=(e,t)=>De.obj(e)?t&&e[t]:e,xk=(e,t)=>e.default===!0?e[t]:e.default?e.default[t]:void 0,j6=e=>e,pf=(e,t=j6)=>{let r=z6;e.default&&e.default!==!0&&(e=e.default,r=Object.keys(e));const n={};for(const a of r){const i=t(e[a],a);De.und(i)||(n[a]=i)}return n},z6=["config","onProps","onStart","onChange","onPause","onResume","onRest"],H6={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 V6(e){const t={};let r=0;if(Na(e,(n,a)=>{H6[a]||(t[a]=n,r++)}),r)return t}function Ap(e){const t=V6(e);if(t){const r={to:t};return Na(e,(n,a)=>a in t||(r[a]=n)),r}return gr({},e)}function $l(e){return e=bn(e),De.arr(e)?e.map($l):cf(e)?Wa.createStringInterpolator({range:[0,1],output:[e,e]})(1):e}function kk(e){for(const t in e)return!0;return!1}function Rp(e){return De.fun(e)||De.arr(e)&&De.obj(e[0])}function Fp(e,t){var r;(r=e.ref)==null||r.delete(e),t==null||t.delete(e)}function Ck(e,t){if(t&&e.ref!==t){var r;(r=e.ref)==null||r.delete(e),t.add(e),e.ref=t}}const jp={default:{tension:170,friction:26},gentle:{tension:120,friction:14},wobbly:{tension:180,friction:12},stiff:{tension:210,friction:20},slow:{tension:280,friction:60},molasses:{tension:280,friction:120}},gf=1.70158,yf=gf*1.525,Pk=gf+1,Sk=2*Math.PI/3,Mk=2*Math.PI/4.5,bf=e=>e<1/2.75?7.5625*e*e:e<2/2.75?7.5625*(e-=1.5/2.75)*e+.75:e<2.5/2.75?7.5625*(e-=2.25/2.75)*e+.9375:7.5625*(e-=2.625/2.75)*e+.984375,B6={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=>e===0?0:Math.pow(2,10*e-10),easeOutExpo:e=>e===1?1:1-Math.pow(2,-10*e),easeInOutExpo:e=>e===0?0:e===1?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=>Pk*e*e*e-gf*e*e,easeOutBack:e=>1+Pk*Math.pow(e-1,3)+gf*Math.pow(e-1,2),easeInOutBack:e=>e<.5?Math.pow(2*e,2)*((yf+1)*2*e-yf)/2:(Math.pow(2*e-2,2)*((yf+1)*(e*2-2)+yf)+2)/2,easeInElastic:e=>e===0?0:e===1?1:-Math.pow(2,10*e-10)*Math.sin((e*10-10.75)*Sk),easeOutElastic:e=>e===0?0:e===1?1:Math.pow(2,-10*e)*Math.sin((e*10-.75)*Sk)+1,easeInOutElastic:e=>e===0?0:e===1?1:e<.5?-(Math.pow(2,20*e-10)*Math.sin((20*e-11.125)*Mk))/2:Math.pow(2,-20*e+10)*Math.sin((20*e-11.125)*Mk)/2+1,easeInBounce:e=>1-bf(1-e),easeOutBounce:bf,easeInOutBounce:e=>e<.5?(1-bf(1-2*e))/2:(1+bf(2*e-1))/2},zp=gr({},jp.default,{mass:1,damping:1,easing:B6.linear,clamp:!1});class U6{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,zp)}}function Y6(e,t,r){r&&(r=gr({},r),Ek(r,t),t=gr({},r,t)),Ek(e,t),Object.assign(e,t);for(const o in zp)e[o]==null&&(e[o]=zp[o]);let{mass:n,frequency:a,damping:i}=e;return De.und(a)||(a<.01&&(a=.01),i<0&&(i=0),e.tension=Math.pow(2*Math.PI/a,2)*n,e.friction=4*Math.PI*i*n/a),e}function Ek(e,t){if(!De.und(t.decay))e.duration=void 0;else{const r=!De.und(t.tension)||!De.und(t.friction);(r||!De.und(t.frequency)||!De.und(t.damping)||!De.und(t.mass))&&(e.duration=void 0,e.decay=void 0),r&&(e.frequency=void 0)}}const _k=[];class q6{constructor(){this.changed=!1,this.values=_k,this.toValues=null,this.fromValues=_k,this.to=void 0,this.from=void 0,this.config=new U6,this.immediate=!1}}function $k(e,{key:t,props:r,defaultProps:n,state:a,actions:i}){return new Promise((o,u)=>{var s;let l,c,d=_l((s=r.cancel)!=null?s:n==null?void 0:n.cancel,t);if(d)v();else{De.und(r.pause)||(a.paused=_l(r.pause,t));let p=n==null?void 0:n.pause;p!==!0&&(p=a.paused||_l(p,t)),l=wn(r.delay||0,t),p?(a.resumeQueue.add(m),i.pause()):(i.resume(),m())}function f(){a.resumeQueue.add(m),a.timeouts.delete(c),c.cancel(),l=c.time-kt.now()}function m(){l>0&&!Wa.skipAnimation?(a.delayed=!0,c=kt.setTimeout(v,l),a.pauseQueue.add(f),a.timeouts.add(c)):v()}function v(){a.delayed&&(a.delayed=!1),a.pauseQueue.delete(f),a.timeouts.delete(c),e<=(a.cancelId||0)&&(d=!0);try{i.start(gr({},r,{callId:e,cancel:d}),o)}catch(p){u(p)}}})}const Hp=(e,t)=>t.length==1?t[0]:t.some(r=>r.cancelled)?Cu(e.get()):t.every(r=>r.noop)?Dk(e.get()):pa(e.get(),t.every(r=>r.finished)),Dk=e=>({value:e,noop:!0,finished:!0,cancelled:!1}),pa=(e,t,r=!1)=>({value:e,finished:t,cancelled:r}),Cu=e=>({value:e,cancelled:!0,finished:!1});function Tk(e,t,r,n){const{callId:a,parentId:i,onRest:o}=t,{asyncTo:u,promise:s}=r;return!i&&e===u&&!t.reset?s:r.promise=(async()=>{r.asyncId=a,r.asyncTo=e;const l=pf(t,(g,y)=>y==="onRest"?void 0:g);let c,d;const f=new Promise((g,y)=>(c=g,d=y)),m=g=>{const y=a<=(r.cancelId||0)&&Cu(n)||a!==r.asyncId&&pa(n,!1);if(y)throw g.result=y,d(g),g},v=(g,y)=>{const x=new Ok,C=new Nk;return(async()=>{if(Wa.skipAnimation)throw Dl(r),C.result=pa(n,!1),d(C),C;m(x);const k=De.obj(g)?gr({},g):gr({},y,{to:g});k.parentId=a,Na(l,(P,T)=>{De.und(k[T])&&(k[T]=P)});const S=await n.start(k);return m(x),r.paused&&await new Promise(P=>{r.resumeQueue.add(P)}),S})()};let p;if(Wa.skipAnimation)return Dl(r),pa(n,!1);try{let g;De.arr(e)?g=(async y=>{for(const x of y)await v(x)})(e):g=Promise.resolve(e(v,n.stop.bind(n))),await Promise.all([g.then(c),f]),p=pa(n.get(),!0,!1)}catch(g){if(g instanceof Ok)p=g.result;else if(g instanceof Nk)p=g.result;else throw g}finally{a==r.asyncId&&(r.asyncId=i,r.asyncTo=i?u:void 0,r.promise=i?s:void 0)}return De.fun(o)&&kt.batchedUpdates(()=>{o(p,n,n.item)}),p})()}function Dl(e,t){xl(e.timeouts,r=>r.cancel()),e.pauseQueue.clear(),e.resumeQueue.clear(),e.asyncId=e.asyncTo=e.promise=void 0,t&&(e.cancelId=t)}class Ok 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 Nk extends Error{constructor(){super("SkipAnimationSignal");this.result=void 0}}const Vp=e=>e instanceof Bp;let X6=1;class Bp extends ck{constructor(...t){super(...t);this.id=X6++,this.key=void 0,this._priority=0}get priority(){return this._priority}set priority(t){this._priority!=t&&(this._priority=t,this._onPriorityChange(t))}get(){const t=Ia(this);return t&&t.getValue()}to(...t){return Wa.to(this,t)}interpolate(...t){return E6(),Wa.to(this,t)}toJSON(){return this.get()}observerAdded(t){t==1&&this._attach()}observerRemoved(t){t==0&&this._detach()}_attach(){}_detach(){}_onChange(t,r=!1){Sl(this,{type:"change",parent:this,value:t,idle:r})}_onPriorityChange(t){this.idle||nf.sort(this),Sl(this,{type:"priority",parent:this,priority:t})}}const Co=Symbol.for("SpringPhase"),Wk=1,Up=2,Yp=4,qp=e=>(e[Co]&Wk)>0,Ii=e=>(e[Co]&Up)>0,Tl=e=>(e[Co]&Yp)>0,Ik=(e,t)=>t?e[Co]|=Up|Wk:e[Co]&=~Up,Lk=(e,t)=>t?e[Co]|=Yp:e[Co]&=~Yp;class G6 extends Bp{constructor(t,r){super();if(this.key=void 0,this.animation=new q6,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,!De.und(t)||!De.und(r)){const n=De.obj(t)?gr({},t):gr({},r,{from:t});De.und(n.default)&&(n.default=!0),this.start(n)}}get idle(){return!(Ii(this)||this._state.asyncTo)||Tl(this)}get goal(){return bn(this.animation.to)}get velocity(){const t=Ia(this);return t instanceof xu?t.lastVelocity||0:t.getPayload().map(r=>r.lastVelocity||0)}get hasAnimated(){return qp(this)}get isAnimating(){return Ii(this)}get isPaused(){return Tl(this)}get isDelayed(){return this._state.delayed}advance(t){let r=!0,n=!1;const a=this.animation;let{config:i,toValues:o}=a;const u=ff(a.to);!u&&Gn(a.to)&&(o=an(bn(a.to))),a.values.forEach((c,d)=>{if(c.done)return;const f=c.constructor==ku?1:u?u[d].lastPosition:o[d];let m=a.immediate,v=f;if(!m){if(v=c.lastPosition,i.tension<=0){c.done=!0;return}let p=c.elapsedTime+=t;const g=a.fromValues[d],y=c.v0!=null?c.v0:c.v0=De.arr(i.velocity)?i.velocity[d]:i.velocity;let x;if(De.und(i.duration))if(i.decay){const C=i.decay===!0?.998:i.decay,k=Math.exp(-(1-C)*p);v=g+y/(1-C)*(1-k),m=Math.abs(c.lastPosition-v)<.1,x=y*k}else{x=c.lastVelocity==null?y:c.lastVelocity;const C=i.precision||(g==f?.005:Math.min(1,Math.abs(f-g)*.001)),k=i.restVelocity||C/10,S=i.clamp?0:i.bounce,P=!De.und(S),T=g==f?c.v0>0:g<f;let D,I=!1;const O=1,_=Math.ceil(t/O);for(let R=0;R<_&&(D=Math.abs(x)>k,!(!D&&(m=Math.abs(f-v)<=C,m)));++R){P&&(I=v==f||v>f==T,I&&(x=-x*S,v=f));const E=-i.tension*1e-6*(v-f),M=-i.friction*.001*x,$=(E+M)/i.mass;x=x+$*O,v=v+x*O}}else{let C=1;i.duration>0&&(this._memoizedDuration!==i.duration&&(this._memoizedDuration=i.duration,c.durationProgress>0&&(c.elapsedTime=i.duration*c.durationProgress,p=c.elapsedTime+=t)),C=(i.progress||0)+p/this._memoizedDuration,C=C>1?1:C<0?0:C,c.durationProgress=C),v=g+i.easing(C)*(f-g),x=(v-c.lastPosition)/t,m=C==1}c.lastVelocity=x,Number.isNaN(v)&&(console.warn("Got NaN while animating:",this),m=!0)}u&&!u[d].done&&(m=!1),m?c.done=!0:r=!1,c.setValue(v,i.round)&&(n=!0)});const s=Ia(this),l=s.getValue();if(r){const c=bn(a.to);(l!==c||n)&&!i.decay?(s.setValue(c),this._onChange(c)):n&&i.decay&&this._onChange(l),this._stop()}else n&&this._onChange(l)}set(t){return kt.batchedUpdates(()=>{this._stop(),this._focus(t),this._set(t)}),this}pause(){this._update({pause:!0})}resume(){this._update({pause:!1})}finish(){if(Ii(this)){const{to:t,config:r}=this.animation;kt.batchedUpdates(()=>{this._onStart(),r.decay||this._set(t,!1),this._stop()})}return this}update(t){return(this.queue||(this.queue=[])).push(t),this}start(t,r){let n;return De.und(t)?(n=this.queue||[],this.queue=[]):n=[De.obj(t)?t:gr({},r,{to:t})],Promise.all(n.map(a=>this._update(a))).then(a=>Hp(this,a))}stop(t){const{to:r}=this.animation;return this._focus(this.get()),Dl(this._state,t&&this._lastCallId),kt.batchedUpdates(()=>this._stop(r,t)),this}reset(){this._update({reset:!0})}eventObserved(t){t.type=="change"?this._start():t.type=="priority"&&(this.priority=t.priority+1)}_prepareNode(t){const r=this.key||"";let{to:n,from:a}=t;n=De.obj(n)?n[r]:n,(n==null||Rp(n))&&(n=void 0),a=De.obj(a)?a[r]:a,a==null&&(a=void 0);const i={to:n,from:a};return qp(this)||(t.reverse&&([n,a]=[a,n]),a=bn(a),De.und(a)?Ia(this)||this._set(n):this._set(a)),i}_update(t,r){let n=gr({},t);const{key:a,defaultProps:i}=this;n.default&&Object.assign(i,pf(n,(s,l)=>/^on/.test(l)?wk(s,a):s)),Fk(this,n,"onProps"),Wl(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 u=this._state;return $k(++this._lastCallId,{key:a,props:n,defaultProps:i,state:u,actions:{pause:()=>{Tl(this)||(Lk(this,!0),kl(u.pauseQueue),Wl(this,"onPause",pa(this,Ol(this,this.animation.to)),this))},resume:()=>{Tl(this)&&(Lk(this,!1),Ii(this)&&this._resume(),kl(u.resumeQueue),Wl(this,"onResume",pa(this,Ol(this,this.animation.to)),this))},start:this._merge.bind(this,o)}}).then(s=>{if(n.loop&&s.finished&&!(r&&s.noop)){const l=Ak(n);if(l)return this._update(l,!0)}return s})}_merge(t,r,n){if(r.cancel)return this.stop(!0),n(Cu(this));const a=!De.und(t.to),i=!De.und(t.from);if(a||i)if(r.callId>this._lastToId)this._lastToId=r.callId;else return n(Cu(this));const{key:o,defaultProps:u,animation:s}=this,{to:l,from:c}=s;let{to:d=l,from:f=c}=t;i&&!a&&(!r.default||De.und(d))&&(d=f),r.reverse&&([d,f]=[f,d]);const m=!mi(f,c);m&&(s.from=f),f=bn(f);const v=!mi(d,l);v&&this._focus(d);const p=Rp(r.to),{config:g}=s,{decay:y,velocity:x}=g;(a||i)&&(g.velocity=0),r.config&&!p&&Y6(g,wn(r.config,o),r.config!==u.config?wn(u.config,o):void 0);let C=Ia(this);if(!C||De.und(d))return n(pa(this,!0));const k=De.und(r.reset)?i&&!r.default:!De.und(f)&&_l(r.reset,o),S=k?f:this.get(),P=$l(d),T=De.num(P)||De.arr(P)||cf(P),D=!p&&(!T||_l(u.immediate||r.immediate,o));if(v){const R=Lp(d);if(R!==C.constructor)if(D)C=this._set(P);else throw Error(`Cannot animate between ${C.constructor.name} and ${R.name}, as the "to" prop suggests`)}const I=C.constructor;let O=Gn(d),_=!1;if(!O){const R=k||!qp(this)&&m;(v||R)&&(_=mi($l(S),P),O=!_),(!mi(s.immediate,D)&&!D||!mi(g.decay,y)||!mi(g.velocity,x))&&(O=!0)}if(_&&Ii(this)&&(s.changed&&!k?O=!0:O||this._stop(l)),!p&&((O||Gn(l))&&(s.values=C.getPayload(),s.toValues=Gn(d)?null:I==ku?[1]:an(P)),s.immediate!=D&&(s.immediate=D,!D&&!k&&this._set(l)),O)){const{onRest:R}=s;wt(Q6,M=>Fk(this,r,M));const E=pa(this,Ol(this,l));kl(this._pendingCalls,E),this._pendingCalls.add(n),s.changed&&kt.batchedUpdates(()=>{s.changed=!k,R==null||R(E,this),k?wn(u.onRest,E):s.onStart==null||s.onStart(E,this)})}k&&this._set(S),p?n(Tk(r.to,r,this._state,this)):O?this._start():Ii(this)&&!v?this._pendingCalls.add(n):n(Dk(S))}_focus(t){const r=this.animation;t!==r.to&&(lk(this)&&this._detach(),r.to=t,lk(this)&&this._attach())}_attach(){let t=0;const{to:r}=this.animation;Gn(r)&&(bu(r,this),Vp(r)&&(t=r.priority+1)),this.priority=t}_detach(){const{to:t}=this.animation;Gn(t)&&Ml(t,this)}_set(t,r=!0){const n=bn(t);if(!De.und(n)){const a=Ia(this);if(!a||!mi(n,a.getValue())){const i=Lp(n);!a||a.constructor!=i?Wp(this,i.create(n)):a.setValue(n),a&&kt.batchedUpdates(()=>{this._onChange(n,r)})}}return Ia(this)}_onStart(){const t=this.animation;t.changed||(t.changed=!0,Wl(this,"onStart",pa(this,Ol(this,t.to)),this))}_onChange(t,r){r||(this._onStart(),wn(this.animation.onChange,t,this)),wn(this.defaultProps.onChange,t,this),super._onChange(t,r)}_start(){const t=this.animation;Ia(this).reset(bn(t.to)),t.immediate||(t.fromValues=t.values.map(r=>r.lastPosition)),Ii(this)||(Ik(this,!0),Tl(this)||this._resume())}_resume(){Wa.skipAnimation?this.finish():nf.start(this)}_stop(t,r){if(Ii(this)){Ik(this,!1);const n=this.animation;wt(n.values,i=>{i.done=!0}),n.toValues&&(n.onChange=n.onPause=n.onResume=void 0),Sl(this,{type:"idle",parent:this});const a=r?Cu(this.get()):pa(this.get(),Ol(this,t!=null?t:n.to));kl(this._pendingCalls,a),n.changed&&(n.changed=!1,Wl(this,"onRest",a,this))}}}function Ol(e,t){const r=$l(t),n=$l(e.get());return mi(n,r)}function Ak(e,t=e.loop,r=e.to){let n=wn(t);if(n){const a=n!==!0&&Ap(n),i=(a||e).reverse,o=!a||a.reset;return Nl(gr({},e,{loop:t,default:!1,pause:void 0,to:!i||Rp(r)?r:void 0,from:o?e.from:void 0,reset:o},a))}}function Nl(e){const{to:t,from:r}=e=Ap(e),n=new Set;return De.obj(t)&&Rk(t,n),De.obj(r)&&Rk(r,n),e.keys=n.size?Array.from(n):null,e}function K6(e){const t=Nl(e);return De.und(t.default)&&(t.default=pf(t)),t}function Rk(e,t){Na(e,(r,n)=>r!=null&&t.add(n))}const Q6=["onStart","onRest","onChange","onPause","onResume"];function Fk(e,t,r){e.animation[r]=t[r]!==xk(t,r)?wk(t[r],e.key):void 0}function Wl(e,t,...r){var n,a,i,o;(n=(a=e.animation)[t])==null||n.call(a,...r),(i=(o=e.defaultProps)[t])==null||i.call(o,...r)}const J6=["onStart","onChange","onRest"];let Z6=1;class jk{constructor(t,r){this.id=Z6++,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),r&&(this._flush=r),t&&this.start(gr({default:!0},t))}get idle(){return!this._state.asyncTo&&Object.values(this.springs).every(t=>t.idle&&!t.isDelayed&&!t.isPaused)}get item(){return this._item}set item(t){this._item=t}get(){const t={};return this.each((r,n)=>t[n]=r.get()),t}set(t){for(const r in t){const n=t[r];De.und(n)||this.springs[r].set(n)}}update(t){return t&&this.queue.push(Nl(t)),this}start(t){let{queue:r}=this;return t?r=an(t).map(Nl):this.queue=[],this._flush?this._flush(this,r):(Uk(this,r),Xp(this,r))}stop(t,r){if(t!==!!t&&(r=t),r){const n=this.springs;wt(an(r),a=>n[a].stop(!!t))}else Dl(this._state,this._lastAsyncId),this.each(n=>n.stop(!!t));return this}pause(t){if(De.und(t))this.start({pause:!0});else{const r=this.springs;wt(an(t),n=>r[n].pause())}return this}resume(t){if(De.und(t))this.start({pause:!1});else{const r=this.springs;wt(an(t),n=>r[n].resume())}return this}each(t){Na(this.springs,t)}_onFrame(){const{onStart:t,onChange:r,onRest:n}=this._events,a=this._active.size>0,i=this._changed.size>0;(a&&!this._started||i&&!this._started)&&(this._started=!0,xl(t,([s,l])=>{l.value=this.get(),s(l,this,this._item)}));const o=!a&&this._started,u=i||o&&n.size?this.get():null;i&&r.size&&xl(r,([s,l])=>{l.value=u,s(l,this,this._item)}),o&&(this._started=!1,xl(n,([s,l])=>{l.value=u,s(l,this,this._item)}))}eventObserved(t){if(t.type=="change")this._changed.add(t.parent),t.idle||this._active.add(t.parent);else if(t.type=="idle")this._active.delete(t.parent);else return;kt.onFrame(this._onFrame)}}function Xp(e,t){return Promise.all(t.map(r=>zk(e,r))).then(r=>Hp(e,r))}async function zk(e,t,r){const{keys:n,to:a,from:i,loop:o,onRest:u,onResolve:s}=t,l=De.obj(t.default)&&t.default;o&&(t.loop=!1),a===!1&&(t.to=null),i===!1&&(t.from=null);const c=De.arr(a)||De.fun(a)?a:void 0;c?(t.to=void 0,t.onRest=void 0,l&&(l.onRest=void 0)):wt(J6,p=>{const g=t[p];if(De.fun(g)){const y=e._events[p];t[p]=({finished:x,cancelled:C})=>{const k=y.get(g);k?(x||(k.finished=!1),C&&(k.cancelled=!0)):y.set(g,{value:null,finished:x||!1,cancelled:C||!1})},l&&(l[p]=t[p])}});const d=e._state;t.pause===!d.paused?(d.paused=t.pause,kl(t.pause?d.pauseQueue:d.resumeQueue)):d.paused&&(t.pause=!0);const f=(n||Object.keys(e.springs)).map(p=>e.springs[p].start(t)),m=t.cancel===!0||xk(t,"cancel")===!0;(c||m&&d.asyncId)&&f.push($k(++e._lastAsyncId,{props:t,state:d,actions:{pause:Cp,resume:Cp,start(p,g){m?(Dl(d,e._lastAsyncId),g(Cu(e))):(p.onRest=u,g(Tk(c,p,d,e)))}}})),d.paused&&await new Promise(p=>{d.resumeQueue.add(p)});const v=Hp(e,await Promise.all(f));if(o&&v.finished&&!(r&&v.noop)){const p=Ak(t,o,a);if(p)return Uk(e,[p]),zk(e,p,!0)}return s&&kt.batchedUpdates(()=>s(v,e,e.item)),v}function Gp(e,t){const r=gr({},e.springs);return t&&wt(an(t),n=>{De.und(n.keys)&&(n=Nl(n)),De.obj(n.to)||(n=gr({},n,{to:void 0})),Bk(r,n,a=>Vk(a))}),Hk(e,r),r}function Hk(e,t){Na(t,(r,n)=>{e.springs[n]||(e.springs[n]=r,bu(r,e))})}function Vk(e,t){const r=new G6;return r.key=e,t&&bu(r,t),r}function Bk(e,t,r){t.keys&&wt(t.keys,n=>{(e[n]||(e[n]=r(n)))._prepareNode(t)})}function Uk(e,t){wt(t,r=>{Bk(e.springs,r,n=>Vk(n,e))})}function eR(e,t){if(e==null)return{};var r={},n=Object.keys(e),a,i;for(i=0;i<n.length;i++)a=n[i],!(t.indexOf(a)>=0)&&(r[a]=e[a]);return r}const tR=["children"],Il=e=>{let{children:t}=e,r=eR(e,tR);const n=w.useContext(wf),a=r.pause||!!n.pause,i=r.immediate||!!n.immediate;r=O6(()=>({pause:a,immediate:i}),[a,i]);const{Provider:o}=wf;return b.createElement(o,{value:r},t)},wf=rR(Il,{});Il.Provider=wf.Provider,Il.Consumer=wf.Consumer;function rR(e,t){return Object.assign(e,b.createContext(t)),e.Provider._context=e,e.Consumer._context=e,e}const Yk=()=>{const e=[],t=function(a){$6();const i=[];return wt(e,(o,u)=>{if(De.und(a))i.push(o.start());else{const s=r(a,o,u);s&&i.push(o.start(s))}}),i};t.current=e,t.add=function(n){e.includes(n)||e.push(n)},t.delete=function(n){const a=e.indexOf(n);~a&&e.splice(a,1)},t.pause=function(){return wt(e,n=>n.pause(...arguments)),this},t.resume=function(){return wt(e,n=>n.resume(...arguments)),this},t.set=function(n){wt(e,a=>a.set(n))},t.start=function(n){const a=[];return wt(e,(i,o)=>{if(De.und(n))a.push(i.start());else{const u=this._getProps(n,i,o);u&&a.push(i.start(u))}}),a},t.stop=function(){return wt(e,n=>n.stop(...arguments)),this},t.update=function(n){return wt(e,(a,i)=>a.update(this._getProps(n,a,i))),this};const r=function(a,i,o){return De.fun(a)?a(o,i):a};return t._getProps=r,t};function nR(e,t,r){const n=De.fun(t)&&t;n&&!r&&(r=[]);const a=w.useMemo(()=>n||arguments.length==3?Yk():void 0,[]),i=w.useRef(0),o=Op(),u=w.useMemo(()=>({ctrls:[],queue:[],flush(y,x){const C=Gp(y,x);return i.current>0&&!u.queue.length&&!Object.keys(C).some(S=>!y.springs[S])?Xp(y,x):new Promise(S=>{Hk(y,C),u.queue.push(()=>{S(Xp(y,x))}),o()})}}),[]),s=w.useRef([...u.ctrls]),l=[],c=Np(e)||0;w.useMemo(()=>{wt(s.current.slice(e,c),y=>{Fp(y,a),y.stop(!0)}),s.current.length=e,d(c,e)},[e]),w.useMemo(()=>{d(0,Math.min(c,e))},r);function d(y,x){for(let C=y;C<x;C++){const k=s.current[C]||(s.current[C]=new jk(null,u.flush)),S=n?n(C,k):t[C];S&&(l[C]=K6(S))}}const f=s.current.map((y,x)=>Gp(y,l[x])),m=w.useContext(Il),v=Np(m),p=m!==v&&kk(m);wu(()=>{i.current++,u.ctrls=s.current;const{queue:y}=u;y.length&&(u.queue=[],wt(y,x=>x())),wt(s.current,(x,C)=>{a==null||a.add(x),p&&x.start({default:m});const k=l[C];k&&(Ck(x,k.ref),x.ref?x.queue.push(k):x.start(k))})}),df(()=>()=>{wt(u.ctrls,y=>y.stop(!0))});const g=f.map(y=>gr({},y));return a?[g,a]:g}function aR(e,t){const r=De.fun(e),[[n],a]=nR(1,r?e:[e],r?t||[]:t);return r||arguments.length==2?[n,a]:n}let on;(function(e){e.MOUNT="mount",e.ENTER="enter",e.UPDATE="update",e.LEAVE="leave"})(on||(on={}));function Kp(e,t,r){const n=De.fun(t)&&t,{reset:a,sort:i,trail:o=0,expires:u=!0,exitBeforeEnter:s=!1,onDestroyed:l,ref:c,config:d}=n?n():t,f=w.useMemo(()=>n||arguments.length==3?Yk():void 0,[]),m=an(e),v=[],p=w.useRef(null),g=a?null:p.current;wu(()=>{p.current=v}),df(()=>()=>{wt(p.current,M=>{M.expired&&clearTimeout(M.expirationId),Fp(M.ctrl,f),M.ctrl.stop(!0)})});const y=oR(m,n?n():t,g),x=a&&p.current||[];wu(()=>wt(x,({ctrl:M,item:$,key:A})=>{Fp(M,f),wn(l,$,A)}));const C=[];if(g&&wt(g,(M,$)=>{M.expired?(clearTimeout(M.expirationId),x.push(M)):($=C[$]=y.indexOf(M.key),~$&&(v[$]=M))}),wt(m,(M,$)=>{v[$]||(v[$]={key:y[$],item:M,phase:on.MOUNT,ctrl:new jk},v[$].ctrl.item=M)}),C.length){let M=-1;const{leave:$}=n?n():t;wt(C,(A,z)=>{const H=g[z];~A?(M=v.indexOf(H),v[M]=gr({},H,{item:m[A]})):$&&v.splice(++M,0,H)})}De.fun(i)&&v.sort((M,$)=>i(M.item,$.item));let k=-o;const S=Op(),P=pf(t),T=new Map,D=w.useRef(new Map),I=w.useRef(!1);wt(v,(M,$)=>{const A=M.key,z=M.phase,H=n?n():t;let j,U,Q=wn(H.delay||0,A);if(z==on.MOUNT)j=H.enter,U=on.ENTER;else{const ae=y.indexOf(A)<0;if(z!=on.LEAVE)if(ae)j=H.leave,U=on.LEAVE;else if(j=H.update)U=on.UPDATE;else return;else if(!ae)j=H.enter,U=on.ENTER;else return}if(j=wn(j,M.item,$),j=De.obj(j)?Ap(j):{to:j},!j.config){const ae=d||P.config;j.config=wn(ae,M.item,$,U)}k+=o;const X=gr({},P,{delay:Q+k,ref:c,immediate:H.immediate,reset:!1},j);if(U==on.ENTER&&De.und(X.from)){const ae=n?n():t,ce=De.und(ae.initial)||g?ae.from:ae.initial;X.from=wn(ce,M.item,$)}const{onResolve:G}=X;X.onResolve=ae=>{wn(G,ae);const ce=p.current,ve=ce.find(le=>le.key===A);if(!!ve&&!(ae.cancelled&&ve.phase!=on.UPDATE)&&ve.ctrl.idle){const le=ce.every(oe=>oe.ctrl.idle);if(ve.phase==on.LEAVE){const oe=wn(u,ve.item);if(oe!==!1){const pe=oe===!0?0:oe;if(ve.expired=!0,!le&&pe>0){pe<=2147483647&&(ve.expirationId=setTimeout(S,pe));return}}}le&&ce.some(oe=>oe.expired)&&(D.current.delete(ve),s&&(I.current=!0),S())}};const ee=Gp(M.ctrl,X);U===on.LEAVE&&s?D.current.set(M,{phase:U,springs:ee,payload:X}):T.set(M,{phase:U,springs:ee,payload:X})});const O=w.useContext(Il),_=Np(O),R=O!==_&&kk(O);wu(()=>{R&&wt(v,M=>{M.ctrl.start({default:O})})},[O]),wt(T,(M,$)=>{if(D.current.size){const A=v.findIndex(z=>z.key===$.key);v.splice(A,1)}}),wu(()=>{wt(D.current.size?D.current:T,({phase:M,payload:$},A)=>{const{ctrl:z}=A;A.phase=M,f==null||f.add(z),R&&M==on.ENTER&&z.start({default:O}),$&&(Ck(z,$.ref),z.ref&&!I.current?z.update($):(z.start($),I.current&&(I.current=!1)))})},a?void 0:r);const E=M=>b.createElement(b.Fragment,null,v.map(($,A)=>{const{springs:z}=T.get($)||$.ctrl,H=M(gr({},z),$.item,$,A);return H&&H.type?b.createElement(H.type,gr({},H.props,{key:De.str($.key)||De.num($.key)?$.key:$.ctrl.id,ref:H.ref})):H}));return f?[E,f]:E}let iR=1;function oR(e,{key:t,keys:r=t},n){if(r===null){const a=new Set;return e.map(i=>{const o=n&&n.find(u=>u.item===i&&u.phase!==on.LEAVE&&!a.has(u));return o?(a.add(o),o.key):iR++})}return De.und(r)?e:De.fun(r)?e.map(r):an(r)}class uR extends Bp{constructor(t,r){super();this.key=void 0,this.idle=!0,this.calc=void 0,this._active=new Set,this.source=t,this.calc=Pl(...r);const n=this._get(),a=Lp(n);Wp(this,a.create(n))}advance(t){const r=this._get(),n=this.get();mi(r,n)||(Ia(this).setValue(r),this._onChange(r,this.idle)),!this.idle&&qk(this._active)&&Qp(this)}_get(){const t=De.arr(this.source)?this.source.map(bn):an(bn(this.source));return this.calc(...t)}_start(){this.idle&&!qk(this._active)&&(this.idle=!1,wt(ff(this),t=>{t.done=!1}),Wa.skipAnimation?(kt.batchedUpdates(()=>this.advance()),Qp(this)):nf.start(this))}_attach(){let t=1;wt(an(this.source),r=>{Gn(r)&&bu(r,this),Vp(r)&&(r.idle||this._active.add(r),t=Math.max(t,r.priority+1))}),this.priority=t,this._start()}_detach(){wt(an(this.source),t=>{Gn(t)&&Ml(t,this)}),this._active.clear(),Qp(this)}eventObserved(t){t.type=="change"?t.idle?this.advance():(this._active.add(t.parent),this._start()):t.type=="idle"?this._active.delete(t.parent):t.type=="priority"&&(this.priority=an(this.source).reduce((r,n)=>Math.max(r,(Vp(n)?n.priority:0)+1),0))}}function sR(e){return e.idle!==!1}function qk(e){return!e.size||Array.from(e).every(sR)}function Qp(e){e.idle||(e.idle=!0,wt(ff(e),t=>{t.done=!0}),Sl(e,{type:"idle",parent:e}))}Wa.assign({createStringInterpolator:vk,to:(e,t)=>new uR(e,t)});function Jp(e,t){if(e==null)return{};var r={},n=Object.keys(e),a,i;for(i=0;i<n.length;i++)a=n[i],!(t.indexOf(a)>=0)&&(r[a]=e[a]);return r}const lR=["style","children","scrollTop","scrollLeft"],Xk=/^--/;function cR(e,t){return t==null||typeof t=="boolean"||t===""?"":typeof t=="number"&&t!==0&&!Xk.test(e)&&!(Ll.hasOwnProperty(e)&&Ll[e])?t+"px":(""+t).trim()}const Gk={};function dR(e,t){if(!e.nodeType||!e.setAttribute)return!1;const r=e.nodeName==="filter"||e.parentNode&&e.parentNode.nodeName==="filter",n=t,{style:a,children:i,scrollTop:o,scrollLeft:u}=n,s=Jp(n,lR),l=Object.values(s),c=Object.keys(s).map(d=>r||e.hasAttribute(d)?d:Gk[d]||(Gk[d]=d.replace(/([A-Z])/g,f=>"-"+f.toLowerCase())));i!==void 0&&(e.textContent=i);for(let d in a)if(a.hasOwnProperty(d)){const f=cR(d,a[d]);Xk.test(d)?e.style.setProperty(d,f):e.style[d]=f}c.forEach((d,f)=>{e.setAttribute(d,l[f])}),o!==void 0&&(e.scrollTop=o),u!==void 0&&(e.scrollLeft=u)}let Ll={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 fR=(e,t)=>e+t.charAt(0).toUpperCase()+t.substring(1),mR=["Webkit","Ms","Moz","O"];Ll=Object.keys(Ll).reduce((e,t)=>(mR.forEach(r=>e[fR(r,t)]=e[t]),e),Ll);const vR=["x","y","z"],hR=/^(matrix|translate|scale|rotate|skew)/,pR=/^(translate)/,gR=/^(rotate|skew)/,Zp=(e,t)=>De.num(e)&&e!==0?e+t:e,xf=(e,t)=>De.arr(e)?e.every(r=>xf(r,t)):De.num(e)?e===t:parseFloat(e)===t;class yR extends vf{constructor(t){let{x:r,y:n,z:a}=t,i=Jp(t,vR);const o=[],u=[];(r||n||a)&&(o.push([r||0,n||0,a||0]),u.push(s=>[`translate3d(${s.map(l=>Zp(l,"px")).join(",")})`,xf(s,0)])),Na(i,(s,l)=>{if(l==="transform")o.push([s||""]),u.push(c=>[c,c===""]);else if(hR.test(l)){if(delete i[l],De.und(s))return;const c=pR.test(l)?"px":gR.test(l)?"deg":"";o.push(an(s)),u.push(l==="rotate3d"?([d,f,m,v])=>[`rotate3d(${d},${f},${m},${Zp(v,c)})`,xf(v,0)]:d=>[`${l}(${d.map(f=>Zp(f,c)).join(",")})`,xf(d,l.startsWith("scale")?1:0)])}}),o.length&&(i.transform=new bR(o,u));super(i)}}class bR extends ck{constructor(t,r){super();this._value=null,this.inputs=t,this.transforms=r}get(){return this._value||(this._value=this._get())}_get(){let t="",r=!0;return wt(this.inputs,(n,a)=>{const i=bn(n[0]),[o,u]=this.transforms[a](De.arr(i)?i:n.map(bn));t+=" "+o,r=r&&u}),r?"none":t}observerAdded(t){t==1&&wt(this.inputs,r=>wt(r,n=>Gn(n)&&bu(n,this)))}observerRemoved(t){t==0&&wt(this.inputs,r=>wt(r,n=>Gn(n)&&Ml(n,this)))}eventObserved(t){t.type=="change"&&(this._value=null),Sl(this,t)}}const wR=["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"],xR=["scrollTop","scrollLeft"];Wa.assign({batchedUpdates:ir.unstable_batchedUpdates,createStringInterpolator:vk,colors:s6});const kf=F6(wR,{applyAnimatedValues:dR,createAnimatedStyle:e=>new yR(e),getComponentProps:e=>Jp(e,xR)}).animated;var un=typeof globalThis!="undefined"?globalThis:typeof window!="undefined"?window:typeof global!="undefined"?global:typeof self!="undefined"?self:{};function eg(e){if(e.__esModule)return e;var t=Object.defineProperty({},"__esModule",{value:!0});return Object.keys(e).forEach(function(r){var n=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,n.get?n:{enumerable:!0,get:function(){return e[r]}})}),t}var Kk={exports:{}};/*! Copyright (c) 2018 Jed Watson. Licensed under the MIT License (MIT), see http://jedwatson.github.io/classnames */(function(e){(function(){var t={}.hasOwnProperty;function r(){for(var n=[],a=0;a<arguments.length;a++){var i=arguments[a];if(!!i){var o=typeof i;if(o==="string"||o==="number")n.push(i);else if(Array.isArray(i)){if(i.length){var u=r.apply(null,i);u&&n.push(u)}}else if(o==="object"){if(i.toString!==Object.prototype.toString&&!i.toString.toString().includes("[native code]")){n.push(i.toString());continue}for(var s in i)t.call(i,s)&&i[s]&&n.push(s)}}}return n.join(" ")}e.exports?(r.default=r,e.exports=r):window.classNames=r})()})(Kk