1"use strict";(this.__LOADABLE_LOADED_CHUNKS__=this.__LOADABLE_LOADED_CHUNKS__||[]).push([[484],{2474(t,e,n){n.d(e,{CS:()=>$n,zh:()=>kn});var s=b(),i=t=>m(t,s),r=b();i.write=t=>m(t,r);var o=b();i.onStart=t=>m(t,o);var a=b();i.onFrame=t=>m(t,a);var u=b();i.onFinish=t=>m(t,u);var c=[];i.setTimeout=(t,e)=>{const n=i.now()+e,s=()=>{const t=c.findIndex(t=>t.cancel==s);~t&&c.splice(t,1),p-=~t?1:0},r={time:n,handler:t,cancel:s};return c.splice(l(n),0,r),p+=1,g(),r};var l=t=>~(~c.findIndex(e=>e.time>t)||~c.length);i.cancel=t=>{o.delete(t),a.delete(t),u.delete(t),s.delete(t),r.delete(t)},i.sync=t=>{f=!0,i.batchedUpdates(t),f=!1},i.throttle=t=>{let e;function n(){try{t(...e)}finally{e=null}}function s(...t){e=t,i.onStart(n)}return s.handler=t,s.cancel=()=>{o.delete(n),e=null},s};var h="undefined"!=typeof window?window.requestAnimationFrame:()=>{};i.use=t=>h=t,i.now="undefined"!=typeof performance?()=>performance.now():Date.now,i.batchedUpdates=t=>t(),i.catch=console.error,i.frameLoop="always",i.advance=()=>{"demand"!==i.frameLoop?console.warn("Cannot call the manual advancement of rafz whilst frameLoop is not set as demand"):y()};var d=-1,p=0,f=!1;function m(t,e){f?(e.delete(t),t(0)):(e.add(t),g())}function g(){d<0&&(d=0,"demand"!==i.frameLoop&&h(v))}function v(){~d&&(h(v),i.batchedUpdates(y))}function y(){const t=d;d=i.now();const e=l(d);e&&(_(c.splice(0,e),t=>t.handler()),p-=e),p?(o.flush(),s.flush(t?Math.min(64,d-t):16.667),a.flush(),r.flush(),u.flush()):d=-1}function b(){let t=new Set,e=t;return{add(n){p+=e!=t||t.has(n)?0:1,t.add(n)},delete:n=>(p-=e==t&&t.has(n)?1:0,t.delete(n)),flush(n){e.size&&(t=new Set,p-=e.size,_(e,e=>e(n)&&t.add(e)),p+=t.size,e=t)}}}function _(t,e){t.forEach(t=>{try{e(t)}catch(t){i.catch(t)}})}var w=n(6540),k=Object.defineProperty,S={};function x(){}((t,e)=>{for(var n in e)k(t,n,{get:e[n],enumerable:!0})})(S,{assign:()=>q,colors:()=>V,createStringInterpolator:()=>T,skipAnimation:()=>R,to:()=>E,willAdvance:()=>L});var P={arr:Array.isArray,obj:t=>!!t&&"Object"===t.constructor.name,fun:t=>"function"==typeof t,str:t=>"string"==typeof t,num:t=>"number"==typeof t,und:t=>void 0===t};function O(t,e){if(P.arr(t)){if(!P.arr(e)||t.length!==e.length)return!1;for(let n=0;n<t.length;n++)if(t[n]!==e[n])return!1;return!0}return t===e}var M=(t,e)=>t.forEach(e);function I(t,e,n){if(P.arr(t))for(let s=0;s<t.length;s++)e.call(n,t[s],`${s}`);else for(const s in t)t.hasOwnProperty(s)&&e.call(n,t[s],s)}var A=t=>P.und(t)?[]:P.arr(t)?t:[t];function C(t,e){if(t.size){const n=Array.from(t);t.clear(),M(n,e)}}var T,E,j=(t,...e)=>C(t,t=>t(...e)),D=()=>"undefined"==typeof window||!window.navigator||/ServerSideRendering|^Deno\//.test(window.navigator.userAgent),V=null,R=!1,L=x,q=t=>{t.to&&(E=t.to),t.now&&(i.now=t.now),void 0!==t.colors&&(V=t.colors),null!=t.skipAnimation&&(R=t.skipAnimation),t.createStringInterpolator&&(T=t.createStringInterpolator),t.requestAnimationFrame&&i.use(t.requestAnimationFrame),t.batchedUpdates&&(i.batchedUpdates=t.batchedUpdates),t.willAdvance&&(L=t.willAdvance),t.frameLoop&&(i.frameLoop=t.frameLoop)},z=new Set,B=[],$=[],U=0,F={get idle(){return!z.size&&!B.length},start(t){U>t.priority?(z.add(t),i.onStart(K)):(Q(t),i(H))},advance:H,sort(t){if(U)i.onFrame(()=>F.sort(t));else{const e=B.indexOf(t);~e&&(B.splice(e,1),N(t))}},clear(){B=[],z.clear()}};function K(){z.forEach(Q),z.clear(),i(H)}function Q(t){B.includes(t)||N(t)}function N(t){B.splice(function(t,e){const n=t.findIndex(e);return n<0?t.length:n}(B,e=>e.priority>t.priority),0,t)}function H(t){const e=$;for(let n=0;n<B.length;n++){const s=B[n];U=s.priority,s.idle||(L(s),s.advance(t),s.idle||e.push(s))}return U=0,($=B).length=0,(B=e).length>0}var G="[-+]?\\d*\\.?\\d+",W=G+"%";function X(...t){return"\\(\\s*("+t.join(")\\s*,\\s*(")+")\\s*\\)"}var Y=new RegExp("rgb"+X(G,G,G)),Z=new RegExp("rgba"+X(G,G,G,G)),J=new RegExp("hsl"+X(G,W,W)),tt=new RegExp("hsla"+X(G,W,W,G)),et=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,nt=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,st=/^#([0-9a-fA-F]{6})$/,it=/^#([0-9a-fA-F]{8})$/;function rt(t,e,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?t+6*(e-t)*n:n<.5?e:n<2/3?t+(e-t)*(2/3-n)*6:t}function ot(t,e,n){const s=n<.5?n*(1+e):n+e-n*e,i=2*n-s,r=rt(i,s,t+1/3),o=rt(i,s,t),a=rt(i,s,t-1/3);return Math.round(255*r)<<24|Math.round(255*o)<<16|Math.round(255*a)<<8}function at(t){const e=parseInt(t,10);return e<0?0:e>255?255:e}function ut(t){return(parseFloat(t)%360+360)%360/360}function ct(t){const e=parseFloat(t);return e<0?0:e>1?255:Math.round(255*e)}function lt(t){const e=parseFloat(t);return e<0?0:e>100?1:e/100}function ht(t){let e=function(t){let e;return"number"==typeof t?t>>>0===t&&t>=0&&t<=4294967295?t:null:(e=st.exec(t))?parseInt(e[1]+"ff",16)>>>0:V&&void 0!==V[t]?V[t]:(e=Y.exec(t))?(at(e[1])<<24|at(e[2])<<16|at(e[3])<<8|255)>>>0:(e=Z.exec(t))?(at(e[1])<<24|at(e[2])<<16|at(e[3])<<8|ct(e[4]))>>>0:(e=et.exec(t))?parseInt(e[1]+e[1]+e[2]+e[2]+e[3]+e[3]+"ff",16)>>>0:(e=it.exec(t))?parseInt(e[1],16)>>>0:(e=nt.exec(t))?parseInt(e[1]+e[1]+e[2]+e[2]+e[3]+e[3]+e[4]+e[4],16)>>>
10:(e=J.exec(t))?(255|ot(ut(e[1]),lt(e[2]),lt(e[3])))>>>0:(e=tt.exec(t))?(ot(ut(e[1]),lt(e[2]),lt(e[3]))|ct(e[4]))>>>0:null}(t);if(null===e)return t;e=e||0;return`rgba(${(4278190080&e)>>>24}, ${(16711680&e)>>>16}, ${(65280&e)>>>8}, ${(255&e)/255})`}var dt=(t,e,n)=>{if(P.fun(t))return t;if(P.arr(t))return dt({range:t,output:e,extrapolate:n});if(P.str(t.output[0]))return T(t);const s=t,i=s.output,r=s.range||[0,1],o=s.extrapolateLeft||s.extrapolate||"extend",a=s.extrapolateRight||s.extrapolate||"extend",u=s.easing||(t=>t);return t=>{const e=function(t,e){for(var n=1;n<e.length-1&&!(e[n]>=t);++n);return n-1}(t,r);return function(t,e,n,s,i,r,o,a,u){let c=u?u(t):t;if(c<e){if("identity"===o)return c;"clamp"===o&&(c=e)}if(c>n){if("identity"===a)return c;"clamp"===a&&(c=n)}if(s===i)return s;if(e===n)return t<=e?s:i;e===-1/0?c=-c:n===1/0?c-=e:c=(c-e)/(n-e);c=r(c),s===-1/0?c=-c:i===1/0?c+=s:c=c*(i-s)+s;return c}(t,r[e],r[e+1],i[e],i[e+1],u,o,a,s.map)}};var pt=1.70158,ft=1.525*pt,mt=pt+1,gt=2*Math.PI/3,vt=2*Math.PI/4.5,yt=t=>{const e=7.5625,n=2.75;return t<1/n?e*t*t:t<2/n?e*(t-=1.5/n)*t+.75:t<2.5/n?e*(t-=2.25/n)*t+.9375:e*(t-=2.625/n)*t+.984375},bt={linear:t=>t,easeInQuad:t=>t*t,easeOutQuad:t=>1-(1-t)*(1-t),easeInOutQuad:t=>t<.5?2*t*t:1-Math.pow(-2*t+2,2)/2,easeInCubic:t=>t*t*t,easeOutCubic:t=>1-Math.pow(1-t,3),easeInOutCubic:t=>t<.5?4*t*t*t:1-Math.pow(-2*t+2,3)/2,easeInQuart:t=>t*t*t*t,easeOutQuart:t=>1-Math.pow(1-t,4),easeInOutQuart:t=>t<.5?8*t*t*t*t:1-Math.pow(-2*t+2,4)/2,easeInQuint:t=>t*t*t*t*t,easeOutQuint:t=>1-Math.pow(1-t,5),easeInOutQuint:t=>t<.5?16*t*t*t*t*t:1-Math.pow(-2*t+2,5)/2,easeInSine:t=>1-Math.cos(t*Math.PI/2),easeOutSine:t=>Math.sin(t*Math.PI/2),easeInOutSine:t=>-(Math.cos(Math.PI*t)-1)/2,easeInExpo:t=>0===t?0:Math.pow(2,10*t-10),easeOutExpo:t=>1===t?1:1-Math.pow(2,-10*t),easeInOutExpo:t=>0===t?0:1===t?1:t<.5?Math.pow(2,20*t-10)/2:(2-Math.pow(2,-20*t+10))/2,easeInCirc:t=>1-Math.sqrt(1-Math.pow(t,2)),easeOutCirc:t=>Math.sqrt(1-Math.pow(t-1,2)),easeInOutCirc:t=>t<.5?(1-Math.sqrt(1-Math.pow(2*t,2)))/2:(Math.sqrt(1-Math.pow(-2*t+2,2))+1)/2,easeInBack:t=>mt*t*t*t-pt*t*t,easeOutBack:t=>1+mt*Math.pow(t-1,3)+pt*Math.pow(t-1,2),easeInOutBack:t=>t<.5?Math.pow(2*t,2)*(7.189819*t-ft)/2:(Math.pow(2*t-2,2)*((ft+1)*(2*t-2)+ft)+2)/2,easeInElastic:t=>0===t?0:1===t?1:-Math.pow(2,10*t-10)*Math.sin((10*t-10.75)*gt),easeOutElastic:t=>0===t?0:1===t?1:Math.pow(2,-10*t)*Math.sin((10*t-.75)*gt)+1,easeInOutElastic:t=>0===t?0:1===t?1:t<.5?-Math.pow(2,20*t-10)*Math.sin((20*t-11.125)*vt)/2:Math.pow(2,-20*t+10)*Math.sin((20*t-11.125)*vt)/2+1,easeInBounce:t=>1-yt(1-t),easeOutBounce:yt,easeInOutBounce:t=>t<.5?(1-yt(1-2*t))/2:(1+yt(2*t-1))/2,steps:(t,e="end")=>n=>{const s=(n="end"===e?Math.min(n,.999):Math.max(n,.001))*t,i="end"===e?Math.floor(s):Math.ceil(s);return r=0,o=1,a=i/t,Math.min(Math.max(a,r),o);var r,o,a}},_t=Symbol.for("FluidValue.get"),wt=Symbol.for("FluidValue.observers"),kt=t=>Boolean(t&&t[_t]),St=t=>t&&t[_t]?t[_t]():t,xt=t=>t[wt]||null;function Pt(t,e){const n=t[wt];n&&n.forEach(t=>{!function(t,e){t.eventObserved?t.eventObserved(e):t(e)}(t,e)})}var Ot=class{constructor(t){if(!t&&!(t=this.get))throw Error("Unknown getter");Mt(this,t)}},Mt=(t,e)=>Tt(t,_t,e);function It(t,e){if(t[_t]){let n=t[wt];n||Tt(t,wt,n=new Set),n.has(e)||(n.add(e),t.observerAdded&&t.observerAdded(n.size,e))}return e}function At(t,e){const n=t[wt];if(n&&n.has(e)){const s=n.size-1;s?n.delete(e):t[wt]=null,t.observerRemoved&&t.observerRemoved(s,e)}}var Ct,Tt=(t,e,n)=>Object.defineProperty(t,e,{value:n,writable:!0,configurable:!0}),Et=/[+\-]?(?:0|[1-9]\d*)(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,jt=/(#(?:[0-9a-f]{2}){2,4}|(#[0-9a-f]{3})|(rgb|hsl)a?\((-?\d+%?[,\s]+){2,3}\s*[\d\.]+%?\))/gi,Dt=new RegExp(`(${Et.source})(%|[a-z]+)`,"i"),Vt=/rgba\(([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+)\)/gi,Rt=/var\((--[a-zA-Z0-9-_]+),? ?([a-zA-Z0-9 ()%#.,-]+)?\)/,Lt=t=>{const[e,n]=qt(t);if(!e||D())return t;const s=window.getComputedStyle(document.documentElement).getPropertyValue(e);if(s)return s.trim();if(n&&n.startsWith("--")){const e=window.getComputedStyle(document.documentElement).getPropertyValue(n);return e||t}return n&&Rt.test(n)?Lt(n):n||t},qt=t=>{const e=Rt.exec(t);if(!e)return[,];const[,n,s]=e;return[n,s]},zt=(t,e,n,s,i)=>`rgba(${Math.round(e)}, ${Math.round(n)}, ${Math.round(s)}, ${i})`,Bt=t=>{Ct||(Ct=V?new RegExp(`(${Object.keys(V).join("|")})(?!\\w)`,"g"):/^\b$/);const e=t.output.map(t=>St(t).replace(Rt,Lt).replace(jt,ht).replace(Ct,ht)),n=e.map(t=>t.match(Et).map(Number)),s=n[0].map((t,e)=>n.map(t=>{if(!(e in t))throw Error('The arity of each "output" value must be equal');return t[e]})).map(e=>dt({...t,output:e}));return t=>{const n=!Dt.test(e[0])&&e.find(t=>Dt.test(t))?.replace(Et,"");let i=0;return e[0].replace(Et,()=>`${s[i++](t)}${n||""}`).replace(Vt,zt)}},$t="react-spring: ",Ut=t=>{const e=t;let n=!1;if("function"!=typeof e)throw new TypeError(`${$t}once requires a function parameter`);return(...t)=>{n||(e(...t),n=!0)}},Ft=Ut(console.warn);var Kt=Ut(console.warn);function Qt(t){return P.str(t)&&("#"==t[0]||/\d/.test(t)||!D()&&Rt.test(t)||t in(V||{}))}var Nt=D()?w.useEffect:w.useLayoutEffect;function Ht(){const t=(0,w.useState)()[1],e=(()=>{const t=(0,w.useRef)(!1);return Nt(()=>(t.current=!0,()=>{t.current=!1}),[]),t})();return()=>{e.current&&t(Math.random())}}var Gt=t=>(0,w.useEffect)(t,Wt),Wt=[];function Xt(t){const e=(0,w.useRef)();return(0,w.useEffect)(()=>{e.current=t}),e.current}var Yt=Symbol.for("Animated:node"),Zt=t=>t&&t[Yt],Jt=(t,e)=>{return n=t,s=Yt,i=e,Object.defineProperty(n,s,{value:i,writable:!0,configurable:!0});var n,s,i},te=t=>t&&t[Yt]&&t[Yt].getPayload(),ee=class{constructor(){Jt(this,this)}getPayload(){return this.payload||[]}},ne=class extends ee{constructor(t){super(),this._value=t,this.done=!0,this.durationProgress=0,P.num(this._value)&&(this.lastPosition=this._value)}static create(t){return new ne(t)}getPayload(){return[this]}getValue(){return this._value}setValue(t,e){return P.num(t)&&(this.lastPosition=t,e&&(t=Math.round(t/e)*e,this.done&&(this.lastPosition=t))),this._value!==t&&(this._value=t,!0)}reset(){const{done:t}=this;this.done=!1,P.num(this._value)&&(this.elapsedTime=0,this.durationProgress=0,this.lastPosition=this._value,t&&(this.lastVelocity=null),this.v0=null)}},se=class extends ne{constructor(t){super(0),this._string=null,this._toString=dt({output:[t,t]})}static create(t){return new se(t)}getValue(){const t=this._string;return t??(this._string=this._toString(this._value))}setValue(t){if(P.str(t)){if(t==this._string)return!1;this._string=t,this._value=1}else{if(!super.setValue(t))return!1;this._string=null}return!0}reset(t){t&&(this._toString=dt({output:[this.getValue(),t]})),this._value=0,super.reset()}},ie={dependencies:null},re=class extends ee{constructor(t){super(),this.source=t,this.setValue(t)}getValue(t){const e={};return I(this.source,(n,s)=>{var i;(i=n)&&i[Yt]===i?e[s]=n.getValue(t):kt(n)?e[s]=St(n):t||(e[s]=n)}),e}setValue(t){this.source=t,this.payload=this._makePayload(t)}reset(){this.payload&&M(this.payload,t=>t.reset())}_makePayload(t){if(t){const e=new Set;return I(t,this._addToPayload,e),Array.from(e)}}
1_addToPayload(t){ie.dependencies&&kt(t)&&ie.dependencies.add(t);const e=te(t);e&&M(e,t=>this.add(t))}},oe=class extends re{constructor(t){super(t)}static create(t){return new oe(t)}getValue(){return this.source.map(t=>t.getValue())}setValue(t){const e=this.getPayload();return t.length==e.length?e.map((e,n)=>e.setValue(t[n])).some(Boolean):(super.setValue(t.map(ae)),!0)}};function ae(t){return(Qt(t)?se:ne).create(t)}function ue(t){const e=Zt(t);return e?e.constructor:P.arr(t)?oe:Qt(t)?se:ne}var ce=(t,e)=>{const n=!P.fun(t)||t.prototype&&t.prototype.isReactComponent;return(0,w.forwardRef)((s,r)=>{const o=(0,w.useRef)(null),a=n&&(0,w.useCallback)(t=>{o.current=function(t,e){t&&(P.fun(t)?t(e):t.current=e);return e}(r,t)},[r]),[u,c]=function(t,e){const n=new Set;ie.dependencies=n,t.style&&(t={...t,style:e.createAnimatedStyle(t.style)});return t=new re(t),ie.dependencies=null,[t,n]}(s,e),l=Ht(),h=()=>{const t=o.current;if(n&&!t)return;!1===(!!t&&e.applyAnimatedValues(t,u.getValue(!0)))&&l()},d=new le(h,c),p=(0,w.useRef)();Nt(()=>(p.current=d,M(c,t=>It(t,d)),()=>{p.current&&(M(p.current.deps,t=>At(t,p.current)),i.cancel(p.current.update))})),(0,w.useEffect)(h,[]),Gt(()=>()=>{const t=p.current;M(t.deps,e=>At(e,t))});const f=e.getComponentProps(u.getValue());return w.createElement(t,{...f,ref:a})})},le=class{constructor(t,e){this.update=t,this.deps=e}eventObserved(t){"change"==t.type&&i.write(this.update)}};var he=Symbol.for("AnimatedComponent"),de=t=>P.str(t)?t:t&&P.str(t.displayName)?t.displayName:P.fun(t)&&t.name||null;function pe(t,...e){return P.fun(t)?t(...e):t}var fe=(t,e)=>!0===t||!!(e&&t&&(P.fun(t)?t(e):A(t).includes(e))),me=(t,e)=>P.obj(t)?e&&t[e]:t,ge=(t,e)=>!0===t.default?t[e]:t.default?t.default[e]:void 0,ve=t=>t,ye=(t,e=ve)=>{let n=be;t.default&&!0!==t.default&&(t=t.default,n=Object.keys(t));const s={};for(const i of n){const n=e(t[i],i);P.und(n)||(s[i]=n)}return s},be=["config","onProps","onStart","onChange","onPause","onResume","onRest"],_e={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 we(t){const e=function(t){const e={};let n=0;if(I(t,(t,s)=>{_e[s]||(e[s]=t,n++)}),n)return e}(t);if(e){const n={to:e};return I(t,(t,s)=>s in e||(n[s]=t)),n}return{...t}}function ke(t){return t=St(t),P.arr(t)?t.map(ke):Qt(t)?S.createStringInterpolator({range:[0,1],output:[t,t]})(1):t}function Se(t){for(const e in t)return!0;return!1}function xe(t){return P.fun(t)||P.arr(t)&&P.obj(t[0])}function Pe(t,e){t.ref?.delete(t),e?.delete(t)}function Oe(t,e){e&&t.ref!==e&&(t.ref?.delete(t),e.add(t),t.ref=e)}var Me={tension:170,friction:26,mass:1,damping:1,easing:bt.linear,clamp:!1},Ie=class{constructor(){this.velocity=0,Object.assign(this,Me)}};function Ae(t,e){if(P.und(e.decay)){const n=!P.und(e.tension)||!P.und(e.friction);!n&&P.und(e.frequency)&&P.und(e.damping)&&P.und(e.mass)||(t.duration=void 0,t.decay=void 0),n&&(t.frequency=void 0)}else t.duration=void 0}var Ce=[],Te=class{constructor(){this.changed=!1,this.values=Ce,this.toValues=null,this.fromValues=Ce,this.config=new Ie,this.immediate=!1}};function Ee(t,{key:e,props:n,defaultProps:s,state:r,actions:o}){return new Promise((a,u)=>{let c,l,h=fe(n.cancel??s?.cancel,e);if(h)f();else{P.und(n.pause)||(r.paused=fe(n.pause,e));let t=s?.pause;!0!==t&&(t=r.paused||fe(t,e)),c=pe(n.delay||0,e),t?(r.resumeQueue.add(p),o.pause()):(o.resume(),p())}function d(){r.resumeQueue.add(p),r.timeouts.delete(l),l.cancel(),c=l.time-i.now()}function p(){c>0&&!S.skipAnimation?(r.delayed=!0,l=i.setTimeout(f,c),r.pauseQueue.add(d),r.timeouts.add(l)):f()}function f(){r.delayed&&(r.delayed=!1),r.pauseQueue.delete(d),r.timeouts.delete(l),t<=(r.cancelId||0)&&(h=!0);try{o.start({...n,callId:t,cancel:h},a)}catch(t){u(t)}}})}var je=(t,e)=>1==e.length?e[0]:e.some(t=>t.cancelled)?Re(t.get()):e.every(t=>t.noop)?De(t.get()):Ve(t.get(),e.every(t=>t.finished)),De=t=>({value:t,noop:!0,finished:!0,cancelled:!1}),Ve=(t,e,n=!1)=>({value:t,finished:e,cancelled:n}),Re=t=>({value:t,cancelled:!0,finished:!1});function Le(t,e,n,s){const{callId:r,parentId:o,onRest:a}=e,{asyncTo:u,promise:c}=n;return o||t!==u||e.reset?n.promise=(async()=>{n.asyncId=r,n.asyncTo=t;const l=ye(e,(t,e)=>"onRest"===e?void 0:t);let h,d;const p=new Promise((t,e)=>(h=t,d=e)),f=t=>{const e=r<=(n.cancelId||0)&&Re(s)||r!==n.asyncId&&Ve(s,!1);if(e)throw t.result=e,d(t),t},m=(t,e)=>{const i=new ze,o=new Be;return(async()=>
1{if(S.skipAnimation)throw qe(n),o.result=Ve(s,!1),d(o),o;f(i);const a=P.obj(t)?{...t}:{...e,to:t};a.parentId=r,I(l,(t,e)=>{P.und(a[e])&&(a[e]=t)});const u=await s.start(a);return f(i),n.paused&&await new Promise(t=>{n.resumeQueue.add(t)}),u})()};let g;if(S.skipAnimation)return qe(n),Ve(s,!1);try{let e;e=P.arr(t)?(async t=>{for(const e of t)await m(e)})(t):Promise.resolve(t(m,s.stop.bind(s))),await Promise.all([e.then(h),p]),g=Ve(s.get(),!0,!1)}catch(t){if(t instanceof ze)g=t.result;else{if(!(t instanceof Be))throw t;g=t.result}}finally{r==n.asyncId&&(n.asyncId=o,n.asyncTo=o?u:void 0,n.promise=o?c:void 0)}return P.fun(a)&&i.batchedUpdates(()=>{a(g,s,s.item)}),g})():c}function qe(t,e){C(t.timeouts,t=>t.cancel()),t.pauseQueue.clear(),t.resumeQueue.clear(),t.asyncId=t.asyncTo=t.promise=void 0,e&&(t.cancelId=e)}var ze=class 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.")}},Be=class extends Error{constructor(){super("SkipAnimationSignal")}},$e=t=>t instanceof Fe,Ue=1,Fe=class extends Ot{constructor(){super(...arguments),this.id=Ue++,this._priority=0}get priority(){return this._priority}set priority(t){this._priority!=t&&(this._priority=t,this._onPriorityChange(t))}get(){const t=Zt(this);return t&&t.getValue()}to(...t){return S.to(this,t)}interpolate(...t){return Ft(`${$t}The "interpolate" function is deprecated in v9 (use "to" instead)`),S.to(this,t)}toJSON(){return this.get()}observerAdded(t){1==t&&this._attach()}observerRemoved(t){0==t&&this._detach()}_attach(){}_detach(){}_onChange(t,e=!1){Pt(this,{type:"change",parent:this,value:t,idle:e})}_onPriorityChange(t){this.idle||F.sort(this),Pt(this,{type:"priority",parent:this,priority:t})}},Ke=Symbol.for("SpringPhase"),Qe=t=>(1&t[Ke])>0,Ne=t=>(2&t[Ke])>0,He=t=>(4&t[Ke])>0,Ge=(t,e)=>e?t[Ke]|=3:t[Ke]&=-3,We=(t,e)=>e?t[Ke]|=4:t[Ke]&=-5,Xe=class extends Fe{constructor(t,e){if(super(),this.animation=new Te,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,!P.und(t)||!P.und(e)){const n=P.obj(t)?{...t}:{...e,from:t};P.und(n.default)&&(n.default=!0),this.start(n)}}get idle(){return!(Ne(this)||this._state.asyncTo)||He(this)}get goal(){return St(this.animation.to)}get velocity(){const t=Zt(this);return t instanceof ne?t.lastVelocity||0:t.getPayload().map(t=>t.lastVelocity||0)}get hasAnimated(){return Qe(this)}get isAnimating(){return Ne(this)}get isPaused(){return He(this)}get isDelayed(){return this._state.delayed}advance(t){let e=!0,n=!1;const s=this.animation;let{toValues:i}=s;const{config:r}=s,o=te(s.to);!o&&kt(s.to)&&(i=A(St(s.to))),s.values.forEach((a,u)=>{if(a.done)return;const c=a.constructor==se?1:o?o[u].lastPosition:i[u];let l=s.immediate,h=c;if(!l){if(h=a.lastPosition,r.tension<=0)return void(a.done=!0);let e=a.elapsedTime+=t;const n=s.fromValues[u],i=null!=a.v0?a.v0:a.v0=P.arr(r.velocity)?r.velocity[u]:r.velocity;let o;const d=r.precision||(n==c?.005:Math.min(1,.001*Math.abs(c-n)));if(P.und(r.duration))if(r.decay){const t=!0===r.decay?.998:r.decay,s=Math.exp(-(1-t)*e);h=n+i/(1-t)*(1-s),l=Math.abs(a.lastPosition-h)<=d,o=i*s}else{o=null==a.lastVelocity?i:a.lastVelocity;const e=r.restVelocity||d/10,s=r.clamp?0:r.bounce,u=!P.und(s),p=n==c?a.v0>0:n<c;let f,m=!1;const g=1,v=Math.ceil(t/g);for(let t=0;t<v&&(f=Math.abs(o)>e,f||(l=Math.abs(c-h)<=d,!l));++t){u&&(m=h==c||h>c==p,m&&(o=-o*s,h=c));o+=(1e-6*-r.tension*(h-c)+.001*-r.friction*o)/r.mass*g,h+=o*g}}else{let s=1;r.duration>0&&(this._memoizedDuration!==r.duration&&(this._memoizedDuration=r.duration,a.durationProgress>0&&(a.elapsedTime=r.duration*a.durationProgress,e=a.elapsedTime+=t)),s=(r.progress||0)+e/this._memoizedDuration,s=s>1?1:s<0?0:s,a.durationProgress=s),h=n+r.easing(s)*(c-n),o=(h-a.lastPosition)/t,l=1==s}a.lastVelocity=o,Number.isNaN(h)&&(console.warn("Got NaN while animating:",this),l=!0)}
1o&&!o[u].done&&(l=!1),l?a.done=!0:e=!1,a.setValue(h,r.round)&&(n=!0)});const a=Zt(this),u=a.getValue();if(e){const t=St(s.to);u===t&&!n||r.decay?n&&r.decay&&this._onChange(u):(a.setValue(t),this._onChange(t)),this._stop()}else n&&this._onChange(u)}set(t){return i.batchedUpdates(()=>{this._stop(),this._focus(t),this._set(t)}),this}pause(){this._update({pause:!0})}resume(){this._update({pause:!1})}finish(){if(Ne(this)){const{to:t,config:e}=this.animation;i.batchedUpdates(()=>{this._onStart(),e.decay||this._set(t,!1),this._stop()})}return this}update(t){return(this.queue||(this.queue=[])).push(t),this}start(t,e){let n;return P.und(t)?(n=this.queue||[],this.queue=[]):n=[P.obj(t)?t:{...e,to:t}],Promise.all(n.map(t=>this._update(t))).then(t=>je(this,t))}stop(t){const{to:e}=this.animation;return this._focus(this.get()),qe(this._state,t&&this._lastCallId),i.batchedUpdates(()=>this._stop(e,t)),this}reset(){this._update({reset:!0})}eventObserved(t){"change"==t.type?this._start():"priority"==t.type&&(this.priority=t.priority+1)}_prepareNode(t){const e=this.key||"";let{to:n,from:s}=t;n=P.obj(n)?n[e]:n,(null==n||xe(n))&&(n=void 0),s=P.obj(s)?s[e]:s,null==s&&(s=void 0);const i={to:n,from:s};return Qe(this)||(t.reverse&&([n,s]=[s,n]),s=St(s),P.und(s)?Zt(this)||this._set(n):this._set(s)),i}_update({...t},e){const{key:n,defaultProps:s}=this;t.default&&Object.assign(s,ye(t,(t,e)=>/^on/.test(e)?me(t,n):t)),sn(this,t,"onProps"),rn(this,"onProps",t,this);const i=this._prepareNode(t);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 r=this._state;return Ee(++this._lastCallId,{key:n,props:t,defaultProps:s,state:r,actions:{pause:()=>{He(this)||(We(this,!0),j(r.pauseQueue),rn(this,"onPause",Ve(this,Ye(this,this.animation.to)),this))},resume:()=>{He(this)&&(We(this,!1),Ne(this)&&this._resume(),j(r.resumeQueue),rn(this,"onResume",Ve(this,Ye(this,this.animation.to)),this))},start:this._merge.bind(this,i)}}).then(n=>{if(t.loop&&n.finished&&(!e||!n.noop)){const e=Ze(t);if(e)return this._update(e,!0)}return n})}_merge(t,e,n){if(e.cancel)return this.stop(!0),n(Re(this));const s=!P.und(t.to),r=!P.und(t.from);if(s||r){if(!(e.callId>this._lastToId))return n(Re(this));this._lastToId=e.callId}const{key:o,defaultProps:a,animation:u}=this,{to:c,from:l}=u;let{to:h=c,from:d=l}=t;!r||s||e.default&&!P.und(h)||(h=d),e.reverse&&([h,d]=[d,h]);const p=!O(d,l);p&&(u.from=d),d=St(d);const f=!O(h,c);f&&this._focus(h);const m=xe(e.to),{config:g}=u,{decay:v,velocity:y}=g;(s||r)&&(g.velocity=0),e.config&&!m&&function(t,e,n){n&&(Ae(n={...n},e),e={...n,...e}),Ae(t,e),Object.assign(t,e);for(const e in Me)null==t[e]&&(t[e]=Me[e]);let{frequency:s,damping:i}=t;const{mass:r}=t;P.und(s)||(s<.01&&(s=.01),i<0&&(i=0),t.tension=Math.pow(2*Math.PI/s,2)*r,t.friction=4*Math.PI*i*r/s)}(g,pe(e.config,o),e.config!==a.config?pe(a.config,o):void 0);let b=Zt(this);if(!b||P.und(h))return n(Ve(this,!0));const _=P.und(e.reset)?r&&!e.default:!P.und(d)&&fe(e.reset,o),w=_?d:this.get(),k=ke(h),S=P.num(k)||P.arr(k)||Qt(k),x=!m&&(!S||fe(a.immediate||e.immediate,o));if(f){const t=ue(h);if(t!==b.constructor){if(!x)throw Error(`Cannot animate between ${b.constructor.name} and ${t.name}, as the "to" prop suggests`);b=this._set(k)}}const I=b.constructor;let C=kt(h),T=!1;if(!C){const t=_||!Qe(this)&&p;(f||t)&&(T=O(ke(w),k),C=!T),(O(u.immediate,x)||x)&&O(g.decay,v)&&O(g.velocity,y)||(C=!0)}if(T&&Ne(this)&&(u.changed&&!_?C=!0:C||this._stop(c)),!m&&((C||kt(c))&&(u.values=b.getPayload(),u.toValues=kt(h)?null:I==se?[1]:A(k)),u.immediate!=x&&(u.immediate=x,x||_||this._set(c)),C)){const{onRest:t}=u;M(nn,t=>sn(this,e,t));const s=Ve(this,Ye(this,c));j(this._pendingCalls,s),this._pendingCalls.add(n),u.changed&&i.batchedUpdates(()=>{u.changed=!_,t?.(s,this),_?pe(a.onRest,s):u.onStart?.(s,this)})}_&&this._set(w),m?n(Le(e.to,e,this._state,this)):C?this._start():Ne(this)&&!f?this._pendingCalls.add(n):n(De(w))}_focus(t){const e=this.animation;t!==e.to&&(xt(this)&&this._detach(),e.to=t,xt(this)&&this._attach())}_attach(){let t=0;const{to:e}=this.animation;kt(e)&&(It(e,this),$e(e)&&(t=e.priority+1)),this.priority=t}_detach(){const{to:t}=this.animation;kt(t)&&At(t,this)}_set(t,e=!0){const n=St(t);if(!P.und(n)){const t=Zt(this);
1if(!t||!O(n,t.getValue())){const s=ue(n);t&&t.constructor==s?t.setValue(n):Jt(this,s.create(n)),t&&i.batchedUpdates(()=>{this._onChange(n,e)})}}return Zt(this)}_onStart(){const t=this.animation;t.changed||(t.changed=!0,rn(this,"onStart",Ve(this,Ye(this,t.to)),this))}_onChange(t,e){e||(this._onStart(),pe(this.animation.onChange,t,this)),pe(this.defaultProps.onChange,t,this),super._onChange(t,e)}_start(){const t=this.animation;Zt(this).reset(St(t.to)),t.immediate||(t.fromValues=t.values.map(t=>t.lastPosition)),Ne(this)||(Ge(this,!0),He(this)||this._resume())}_resume(){S.skipAnimation?this.finish():F.start(this)}_stop(t,e){if(Ne(this)){Ge(this,!1);const n=this.animation;M(n.values,t=>{t.done=!0}),n.toValues&&(n.onChange=n.onPause=n.onResume=void 0),Pt(this,{type:"idle",parent:this});const s=e?Re(this.get()):Ve(this.get(),Ye(this,t??n.to));j(this._pendingCalls,s),n.changed&&(n.changed=!1,rn(this,"onRest",s,this))}}};function Ye(t,e){const n=ke(e);return O(ke(t.get()),n)}function Ze(t,e=t.loop,n=t.to){const s=pe(e);if(s){const i=!0!==s&&we(s),r=(i||t).reverse,o=!i||i.reset;return Je({...t,loop:e,default:!1,pause:void 0,to:!r||xe(n)?n:void 0,from:o?t.from:void 0,reset:o,...i})}}function Je(t){const{to:e,from:n}=t=we(t),s=new Set;return P.obj(e)&&en(e,s),P.obj(n)&&en(n,s),t.keys=s.size?Array.from(s):null,t}function tn(t){const e=Je(t);return P.und(e.default)&&(e.default=ye(e)),e}function en(t,e){I(t,(t,n)=>null!=t&&e.add(n))}var nn=["onStart","onRest","onChange","onPause","onResume"];function sn(t,e,n){t.animation[n]=e[n]!==ge(e,n)?me(e[n],t.key):void 0}function rn(t,e,...n){t.animation[e]?.(...n),t.defaultProps[e]?.(...n)}var on=["onStart","onChange","onRest"],an=1,un=class{constructor(t,e){this.id=an++,this.springs={},this.queue=[],this._lastAsyncId=0,this._active=new Set,this._changed=new Set,this._started=!1,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),e&&(this._flush=e),t&&this.start({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((e,n)=>t[n]=e.get()),t}set(t){for(const e in t){const n=t[e];P.und(n)||this.springs[e].set(n)}}update(t){return t&&this.queue.push(Je(t)),this}start(t){let{queue:e}=this;return t?e=A(t).map(Je):this.queue=[],this._flush?this._flush(this,e):(mn(this,e),cn(this,e))}stop(t,e){if(t!==!!t&&(e=t),e){const n=this.springs;M(A(e),e=>n[e].stop(!!t))}else qe(this._state,this._lastAsyncId),this.each(e=>e.stop(!!t));return this}pause(t){if(P.und(t))this.start({pause:!0});else{const e=this.springs;M(A(t),t=>e[t].pause())}return this}resume(t){if(P.und(t))this.start({pause:!1});else{const e=this.springs;M(A(t),t=>e[t].resume())}return this}each(t){I(this.springs,t)}_onFrame(){const{onStart:t,onChange:e,onRest:n}=this._events,s=this._active.size>0,i=this._changed.size>0;(s&&!this._started||i&&!this._started)&&(this._started=!0,C(t,([t,e])=>{e.value=this.get(),t(e,this,this._item)}));const r=!s&&this._started,o=i||r&&n.size?this.get():null;i&&e.size&&C(e,([t,e])=>{e.value=o,t(e,this,this._item)}),r&&(this._started=!1,C(n,([t,e])=>{e.value=o,t(e,this,this._item)}))}eventObserved(t){if("change"==t.type)this._changed.add(t.parent),t.idle||this._active.add(t.parent);else{if("idle"!=t.type)return;this._active.delete(t.parent)}i.onFrame(this._onFrame)}};function cn(t,e){return Promise.all(e.map(e=>ln(t,e))).then(e=>je(t,e))}async function ln(t,e,n){const{keys:s,to:r,from:o,loop:a,onRest:u,onResolve:c}=e,l=P.obj(e.default)&&e.default;a&&(e.loop=!1),!1===r&&(e.to=null),!1===o&&(e.from=null);const h=P.arr(r)||P.fun(r)?r:void 0;h?(e.to=void 0,e.onRest=void 0,l&&(l.onRest=void 0)):M(on,n=>{const s=e[n];if(P.fun(s)){const i=t._events[n];e[n]=({finished:t,cancelled:e})=>{const n=i.get(s);n?(t||(n.finished=!1),e&&(n.cancelled=!0)):i.set(s,{value:null,finished:t||!1,cancelled:e||!1})},l&&(l[n]=e[n])}});const d=t._state;e.pause===!d.paused?(d.paused=e.pause,j(e.pause?d.pauseQueue:d.resumeQueue)):d.paused&&(e.pause=!0);const p=(s||Object.keys(t.springs)).map(n=>t.springs[n].start(e)),f=!0===e.cancel||!0===ge(e,"cancel");(h||f&&d.asyncId)&&p.push(Ee(++t._lastAsyncId,{props:e,state:d,actions:{pause:x,resume:x,start(e,n){f?(qe(d,t._lastAsyncId),n(Re(t))):(e.onRest=u,n(Le(h,e,d,t)))}}})),d.paused&&await new Promise(t=>{d.resumeQueue.add(t)});const m=je(t,await Promise.all(p));if(a&&m.finished&&(!n||!m.noop)){const n=Ze(e,a,r);if(n)return mn(t,[n]),ln(t,n,!0)}return c&&i.batchedUpdates(()=>c(m,t,t.item)),m}function hn(t,e){const n={...t.springs};return e&&M(A(e),t=>{P.und(t.keys)&&(t=Je(t)),P.obj(t.to)||(t={...t,to:void 0}),fn(n,t,t=>pn(t))}),dn(t,n),n}function dn(t,e){I(e,(e,n)=>{t.springs[n]||(t.springs[n]=e,It(e,t))})}function pn(t,e){const n=new Xe;return n.key=t,e&&It(n,e),n}function fn(t,e,n){e.keys&&M(e.keys,s=>
1{(t[s]||(t[s]=n(s)))._prepareNode(e)})}function mn(t,e){M(e,e=>{fn(t.springs,e,e=>pn(e,t))})}var gn,vn,yn=({children:t,...e})=>{const n=(0,w.useContext)(bn),s=e.pause||!!n.pause,i=e.immediate||!!n.immediate;e=function(t,e){const[n]=(0,w.useState)(()=>({inputs:e,result:t()})),s=(0,w.useRef)(),i=s.current;let r=i;r?Boolean(e&&r.inputs&&function(t,e){if(t.length!==e.length)return!1;for(let n=0;n<t.length;n++)if(t[n]!==e[n])return!1;return!0}(e,r.inputs))||(r={inputs:e,result:t()}):r=n;return(0,w.useEffect)(()=>{s.current=r,i==n&&(n.inputs=n.result=void 0)},[r]),r.result}(()=>({pause:s,immediate:i}),[s,i]);const{Provider:r}=bn;return w.createElement(r,{value:e},t)},bn=(gn=yn,vn={},Object.assign(gn,w.createContext(vn)),gn.Provider._context=gn,gn.Consumer._context=gn,gn);yn.Provider=bn.Provider,yn.Consumer=bn.Consumer;var _n=()=>{const t=[],e=function(e){Kt(`${$t}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 s=[];return M(t,(t,i)=>{if(P.und(e))s.push(t.start());else{const r=n(e,t,i);r&&s.push(t.start(r))}}),s};e.current=t,e.add=function(e){t.includes(e)||t.push(e)},e.delete=function(e){const n=t.indexOf(e);~n&&t.splice(n,1)},e.pause=function(){return M(t,t=>t.pause(...arguments)),this},e.resume=function(){return M(t,t=>t.resume(...arguments)),this},e.set=function(e){M(t,(t,n)=>{const s=P.fun(e)?e(n,t):e;s&&t.set(s)})},e.start=function(e){const n=[];return M(t,(t,s)=>{if(P.und(e))n.push(t.start());else{const i=this._getProps(e,t,s);i&&n.push(t.start(i))}}),n},e.stop=function(){return M(t,t=>t.stop(...arguments)),this},e.update=function(e){return M(t,(t,n)=>t.update(this._getProps(e,t,n))),this};const n=function(t,e,n){return P.fun(t)?t(n,e):t};return e._getProps=n,e};function wn(t,e,n){const s=P.fun(e)&&e;s&&!n&&(n=[]);const i=(0,w.useMemo)(()=>s||3==arguments.length?_n():void 0,[]),r=(0,w.useRef)(0),o=Ht(),a=(0,w.useMemo)(()=>({ctrls:[],queue:[],flush(t,e){const n=hn(t,e);return r.current>0&&!a.queue.length&&!Object.keys(n).some(e=>!t.springs[e])?cn(t,e):new Promise(s=>{dn(t,n),a.queue.push(()=>{s(cn(t,e))}),o()})}}),[]),u=(0,w.useRef)([...a.ctrls]),c=[],l=Xt(t)||0;function h(t,n){for(let i=t;i<n;i++){const t=u.current[i]||(u.current[i]=new un(null,a.flush)),n=s?s(i,t):e[i];n&&(c[i]=tn(n))}}(0,w.useMemo)(()=>{M(u.current.slice(t,l),t=>{Pe(t,i),t.stop(!0)}),u.current.length=t,h(l,t)},[t]),(0,w.useMemo)(()=>{h(0,Math.min(l,t))},n);const d=u.current.map((t,e)=>hn(t,c[e])),p=(0,w.useContext)(yn),f=Xt(p),m=p!==f&&Se(p);Nt(()=>{r.current++,a.ctrls=u.current;const{queue:t}=a;t.length&&(a.queue=[],M(t,t=>t())),M(u.current,(t,e)=>{i?.add(t),m&&t.start({default:p});const n=c[e];n&&(Oe(t,n.ref),t.ref?t.queue.push(n):t.start(n))})}),Gt(()=>()=>{M(a.ctrls,t=>t.stop(!0))});const g=d.map(t=>({...t}));return i?[g,i]:g}function kn(t,e){const n=P.fun(t),[[s],i]=wn(1,n?t:[t],n?e||[]:e);return n||2==arguments.length?[s,i]:s}var Sn=class extends Fe{constructor(t,e){super(),this.source=t,this.idle=!0,this._active=new Set,this.calc=dt(...e);const n=this._get(),s=ue(n);Jt(this,s.create(n))}advance(t){const e=this._get();O(e,this.get())||(Zt(this).setValue(e),this._onChange(e,this.idle)),!this.idle&&Pn(this._active)&&On(this)}_get(){const t=P.arr(this.source)?this.source.map(St):A(St(this.source));return this.calc(...t)}_start(){this.idle&&!Pn(this._active)&&(this.idle=!1,M(te(this),t=>{t.done=!1}),S.skipAnimation?(i.batchedUpdates(()=>this.advance()),On(this)):F.start(this))}_attach(){let t=1;M(A(this.source),e=>{kt(e)&&It(e,this),$e(e)&&(e.idle||this._active.add(e),t=Math.max(t,e.priority+1))}),this.priority=t,this._start()}_detach(){M(A(this.source),t=>{kt(t)&&At(t,this)}),this._active.clear(),On(this)}eventObserved(t){"change"==t.type?t.idle?this.advance():(this._active.add(t.parent),this._start()):"idle"==t.type?this._active.delete(t.parent):"priority"==t.type&&(this.priority=A(this.source).reduce((t,e)=>Math.max(t,($e(e)?e.priority:0)+1),0))}};function xn(t){return!1!==t.idle}function Pn(t){return!t.size||Array.from(t).every(xn)}function On(t){t.idle||(t.idle=!0,M(te(t),t=>{t.done=!0}),Pt(t,{type:"idle",parent:t}))}S.assign({createStringInterpolator:Bt,to:(t,e)=>new Sn(t,e)});F.advance;var Mn=n(961),In=/^--/;function An(t,e){return null==e||"boolean"==typeof e||""===e?"":"number"!=typeof e||0===e||In.test(t)||Tn.hasOwnProperty(t)&&Tn[t]?(""+e).trim():e+"px"}var Cn={};var Tn={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},En=["Webkit","Ms","Moz","O"];Tn=Object.keys(Tn).reduce((t,e)=>(En.forEach(n=>t[((t,e)=>t+e.charAt(0).toUpperCase()+e.substring(1))(n,e)]=t[e]),t),Tn);var jn=/^(matrix|translate|scale|rotate|skew)/,Dn=/^(translate)/,Vn=/^(rotate|skew)/,Rn=(t,e)=>P.num(t)&&0!==t?t+e:t,Ln=(t,e)=>P.arr(t)?t.every(t=>Ln(t,e)):P.num(t)?t===e:parseFloat(t)===e,qn=class extends re{constructor({x:t,y:e,z:n,...s}){const i=[],r=[];(t||e||n)&&(i.push([t||0,e||0,n||0]),r.push(t=>[`translate3d(${t.map(t=>Rn(t,"px")).join(",")})`,Ln(t,0)])),I(s,(t,e)=>{if("transform"===e)i.push([t||""]),r.push(t=>[t,""===t]);else if(jn.test(e)){if(delete s[e],P.und(t))return;const n=Dn.test(e)?"px":Vn.test(e)?"deg":"";i.push(A(t)),r.push("rotate3d"===e?([t,e,s,i])=>[`rotate3d(${t},${e},${s},${Rn(i,n)})`,Ln(i,0)]:t=>[`${e}(${t.map(t=>Rn(t,n)).join(",")})`,Ln(t,e.startsWith("scale")?1:0)])}}),i.length&&(s.transform=new zn(i,r)),super(s)}},zn=class extends Ot{constructor(t,e){super(),this.inputs=t,this.transforms=e,this._value=null}get(){return this._value||(this._value=this._get())}_get(){let t="",e=!0;return M(this.inputs,(n,s)=>{const i=St(n[0]),[r,o]=this.transforms[s](P.arr(i)?i:n.map(St));t+=" "+r,e=e&&o}),e?"none":t}observerAdded(t){1==t&&M(this.inputs,t=>M(t,t=>kt(t)&&It(t,this)))}observerRemoved(t){0==t&&M(this.inputs,t=>M(t,t=>kt(t)&&At(t,this)))}eventObserved(t){"change"==t.type&&(this._value=null),Pt(this,t)}};S.assign({batchedUpdates:Mn.unstable_batchedUpdates,createStringInterpolator:Bt,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,dar
1kgoldenrod: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}});var Bn=((t,{applyAnimatedValues:e=()=>!1,createAnimatedStyle:n=t=>new re(t),getComponentProps:s=t=>t}={})=>{const i={applyAnimatedValues:e,createAnimatedStyle:n,getComponentProps:s},r=t=>{const e=de(t)||"Anonymous";return(t=P.str(t)?r[t]||(r[t]=ce(t,i)):t[he]||(t[he]=ce(t,i))).displayName=`Animated(${e})`,t};return I(t,(e,n)=>{P.arr(t)&&(n=de(e)),r[n]=r(e)}),{animated:r}})(["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(t,e){if(!t.nodeType||!t.setAttribute)return!1;const n="filter"===t.nodeName||t.parentNode&&"filter"===t.parentNode.nodeName,{className:s,style:i,children:r,scrollTop:o,scrollLeft:a,viewBox:u,...c}=e,l=Object.values(c),h=Object.keys(c).map(e=>n||t.hasAttribute(e)?e:Cn[e]||(Cn[e]=e.replace(/([A-Z])/g,t=>"-"+t.toLowerCase())));void 0!==r&&(t.textContent=r);for(const e in i)if(i.hasOwnProperty(e)){const n=An(e,i[e]);In.test(e)?t.style.setProperty(e,n):t.style[e]=n}
1h.forEach((e,n)=>{t.setAttribute(e,l[n])}),void 0!==s&&(t.className=s),void 0!==o&&(t.scrollTop=o),void 0!==a&&(t.scrollLeft=a),void 0!==u&&t.setAttribute("viewBox",u)},createAnimatedStyle:t=>new qn(t),getComponentProps:({scrollTop:t,scrollLeft:e,...n})=>n}),$n=Bn.animated},5197(t,e,n){n.d(e,{i3:()=>Y});const s={toVector:(t,e)=>(void 0===t&&(t=e),Array.isArray(t)?t:[t,t]),add:(t,e)=>[t[0]+e[0],t[1]+e[1]],sub:(t,e)=>[t[0]-e[0],t[1]-e[1]],addTo(t,e){t[0]+=e[0],t[1]+=e[1]},subTo(t,e){t[0]-=e[0],t[1]-=e[1]}};function i(t,e,n){return 0===e||Math.abs(e)===1/0?Math.pow(t,5*n):t*e*n/(e+n*t)}function r(t,e,n,s=.15){return 0===s?function(t,e,n){return Math.max(e,Math.min(t,n))}(t,e,n):t<e?-i(e-t,n-e,s)+e:t>n?+i(t-n,n-e,s)+n:t}function o(t){var e=function(t,e){if("object"!=typeof t||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var s=n.call(t,e||"default");if("object"!=typeof s)return s;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:String(e)}function a(t,e,n){return(e=o(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function u(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(t);e&&(s=s.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,s)}return n}function c(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?u(Object(n),!0).forEach(function(e){a(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):u(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}const l={pointer:{start:"down",change:"move",end:"up"},mouse:{start:"down",change:"move",end:"up"},touch:{start:"start",change:"move",end:"end"},gesture:{start:"start",change:"change",end:"end"}};function h(t){return t?t[0].toUpperCase()+t.slice(1):""}const d=["enter","leave"];function p(t,e="",n=!1){const s=l[t],i=s&&s[e]||e;return"on"+h(t)+h(i)+(function(t=!1,e){return t&&!d.includes(e)}(n,i)?"Capture":"")}const f=["gotpointercapture","lostpointercapture"];function m(t){let e=t.substring(2).toLowerCase();const n=!!~e.indexOf("passive");n&&(e=e.replace("passive",""));const s=f.includes(e)?"capturecapture":"capture",i=!!~e.indexOf(s);return i&&(e=e.replace("capture","")),{device:e,capture:i,passive:n}}function g(t){return"touches"in t}function v(t){return g(t)?"touch":"pointerType"in t?t.pointerType:"mouse"}function y(t){return g(t)?function(t){return"touchend"===t.type||"touchcancel"===t.type?t.changedTouches:t.targetTouches}(t)[0]:t}function b(t){return function(t){return Array.from(t.touches).filter(e=>{var n,s;return e.target===t.currentTarget||(null===(n=t.currentTarget)||void 0===n||null===(s=n.contains)||void 0===s?void 0:s.call(n,e.target))})}(t).map(t=>t.identifier)}function _(t){const e=y(t);return g(t)?e.identifier:e.pointerId}function w(t){const e=y(t);return[e.clientX,e.clientY]}function k(t,...e){return"function"==typeof t?t(...e):t}function S(){}function x(...t){return 0===t.length?S:1===t.length?t[0]:function(){let e;for(const n of t)e=n.apply(this,arguments)||e;return e}}function P(t,e){return Object.assign({},e,t||{})}class O{constructor(t,e,n){this.ctrl=t,this.args=e,this.key=n,this.state||(this.state={},this.computeValues([0,0]),this.computeInitial(),this.init&&this.init(),this.reset())}get state(){return this.ctrl.state[this.key]}set state(t){this.ctrl.state[this.key]=t}get shared(){return this.ctrl.state.shared}get eventStore(){return this.ctrl.gestureEventStores[this.key]}get timeoutStore(){return this.ctrl.gestureTimeoutStores[this.key]}get config(){return this.ctrl.config[this.key]}get sharedConfig(){return this.ctrl.config.shared}get handler(){return this.ctrl.handlers[this.key]}reset(){const{state:t,shared:e,ingKey:n,args:s}=this;e[n]=t._active=t.active=t._blocked=t._force=!1,t._step=[!1,!1],t.intentional=!1,t._movement=[0,0],t._distance=[0,0],t._direction=[0,0],t._delta=[0,0],t._bounds=[[-1/0,1/0],[-1/0,1/0]],t.args=s,t.axis=void 0,t.memo=void 0,t.elapsedTime=t.timeDelta=0,t.direction=[0,0],t.distance=[0,0],t.overflow=[0,0],t._movementBound=[!1,!1],t.velocity=[0,0],t.movement=[0,0],t.delta=[0,0],t.timeStamp=0}start(t){const e=this.state,n=this.config;e._active||(this.reset(),this.computeInitial(),e._active=!0,e.target=t.target,e.currentTarget=t.currentTarget,e.lastOffset=n.from?k(n.from,e):e.offset,e.offset=e.lastOffset,e.startTime=e.timeStamp=t.timeStamp)}computeValues(t){const e=this.state;e._values=t,e.values=this.config.transform(t)}computeInitial(){const t=this.state;t._initial=t._values,t.initial=t.values}compute(t){const{state:e,config:n,shared:i}=this;e.args=this.args;let o=0;if(t&&(e.event=t,n.preventDefault&&t.cancelable&&e.event.preventDefault(),e.type=t.type,i.touches=this.ctrl.pointerIds.size||this.ctrl.touchIds.size,i.locked=!!document.pointerLockElement,Object.assign(i,function(t){const e={};if("buttons"in t&&(e.buttons=t.buttons),"shiftKey"in t){const{shiftKey:n,altKey:s,metaKey:i,ctrlKey:r}=t;Object.assign(e,{shiftKey:n,altKey:s,metaKey:i,ctrlKey:r})}return e}(t)),i.down=i.pressed=i.buttons%2==1||i.touches>0,o=t.timeStamp-e.timeStamp,e.timeStamp=t.timeStamp,e.elapsedTime=e.timeStamp-e.startTime),e._active){const t=e._delta.map(Math.abs);s.addTo(e._distance,t)}this.axisIntent&&this.axisIntent(t);const[a,u]=e._movement,[c,l]=n.threshold,{_step:h,values:d}=e;if(n.hasCustomTransform?(!1===h[0]&&(h[0]=Math.abs(a)>=c&&d[0]),!1===h[1]&&(h[1]=Math.abs(u)>=l&&d[1])):(!1===h[0]&&(h[0]=Math.abs(a)>=c&&Math.sign(a)*c),!1===h[1]&&(h[1]=Math.abs(u)>=l&&Math.sign(u)*l)),e.intentional=!1!==h[0]||!1!==h[1],!e.intentional)return;const p=[0,0];if(n.hasCustomTransform){const[t,e]=d;p[0]=!1!==h[0]?t-h[0]:0,p[1]=!1!==h[1]?e-h[1]:0}else p[0]=!1!==h[0]?a-h[0]:0,p[1]=!1!==h[1]?u-h[1]:0;this.restrictToAxis&&!e._blocked&&this.restrictToAxis(p);const f=e.offset,m=e._active&&!e._blocked||e.active;m&&(e.first=e._active&&!e.active,e.last=!e._active&&e.active,e.active=i[this.ingKey]=e._active,t&&(e.first&&("bounds"in n&&(e._bounds=k(n.bounds,e)),this.setup&&this.setup()),e.movement=p,this.computeOffset()));const[g,v]=e.offset,[[y,b],[_,w]]=e._bounds;e.overflow=[g<y?-1:g>b?1:0,v<_?-1:v>w?1:0],e._movementBound[0]=!!e.overflow[0]&&(!1===e._movementBound[0]?e._movement[0]:e._movementBound[0]),e._movementBound[1]=!!e.overflow[1]&&(!1===e._movementBound[1]?e._movement[1]:e._movementBound[1]);const S=e._active&&n.rubberband||[0,0];if(e.offset=function(t,[e,n],[s,i]){const[[o,a],[u,c]]=t;return[r(e,o,a,s),r(n,u,c,i)]}(e._bounds,e.offset,S),e.delta=s.sub(e.offset,f),this.computeMovement(),m&&(!e.last||o>32)){e.delta=s.sub(e.offset,f);const t=e.delta.map(Math.abs);s.addTo(e.distance,t),e.direction=e.delta.map(Math.sign),e._direction=e._delta.map(Math.sign),!e.first&&o>0&&(e.velocity=[t[0]/o,t[1]/o],e.timeDelta=o)}}emit(){const t=this.state,e=this.shared,n=this.config;if(t._active||this.clean(),(t._blocked||!t.intentional)&&!t._force&&!n.triggerAllEvents)return;const s=this.handler(c(c(c({},e),t),{},{[this.aliasKey]:t.values}));void 0!==s&&(t.memo=s)}clean(){this.eventStore.clean(),this.timeoutStore.clean()}}class M extends O{constructor(...t){super(...t),a(this,"aliasKey","xy")}reset(){super.reset(),this.state.axis=void 0}init(){this.state.offset=[0,0],this.state.lastOffset=[0,0]}computeOffset(){this.state.offset=s.add(this.state.lastOffset,this.state.movement)}computeMovement(){this.state.movement=s.sub(this.state.offset,this.state.lastOffset)}axisIntent(t){const e=this.state,n=this.config;if(!e.axis&&t){const s="object"==typeof n.axisThreshold?n.axisThreshold[v(t)]:n.axisThreshold;e.axis=function([t,e],n){const s=Math.abs(t),i=Math.abs(e);return s>i&&s>n?"x":i>s&&i>n?"y":void 0}(e._movement,s)}e._blocked=(n.lockDirection||!!n.axis)&&!e.axis||!!n.axis&&n.axis!==e.axis}restrictToAxis(t){if(this.config.axis||this.config.lockDirection)switch(this.state.axis){case"x":t[1]=0;break;case"y":t[0]=0}}}const I=t=>t,A={enabled:(t=!0)=>t,eventOptions:(t,e,n)=>c(c({},n.shared.eventOptions),t),preventDefault:(t=!1)=>t,triggerAllEvents:(t=!1)=>t,rubberband(t=0){switch(t){case!0:return[.15,.15];case!1:return[0,0];default:return s.toVector(t)}},from:t=>"function"==typeof t?t:null!=t?s.toVector(t):void 0,transform(t,e,n){const s=t||n.shared.transform;return this.hasCustomTransform=!!s,s||I},threshold:t=>s.toVector(t,0)};const C=c(c({},A),{},{axis(t,e,{axis:n}){if(this.lockDirection="lock"===n,!this.lockDirection)return n},axisThreshold:(t=0)=>t,bounds(t={}){if("function"==typeof t)return e=>C.bounds(t(e));if("current"in t)return()=>t.current;if("function"==typeof HTMLElement&&t instanceof HTMLElement)return t;const{left:e=-1/0,right:n=1/0,top:s=-1/0,bottom:i=1/0}=t;return[[e,n],[s,i]]}}),T={ArrowRight:(t,e=1)=>[t*e,0],ArrowLeft:(t,e=1)=>[-1*t*e,0],ArrowUp:(t,e=1)=>[0,-1*t*e],ArrowDown:(t,e=1)=>[0,t*e]};const E="undefined"!=typeof window&&window.document&&window.document.createElement;function j(){return E&&"ontouchstart"in window}const D={isBrowser:E,gesture:function(){try{return"constructor"in GestureEvent}catch(t){return!1}}(),touch:j(),touchscreen:j()||E&&window.navigator.maxTouchPoints>1,pointer:E&&"onpointerdown"in window,pointerLock:E&&"exitPointerLock"in window.document},V={mouse:0,touch:0,pen:8},R=c(c({},C),{},{device(t,e,{pointer:{touch:n=!1,lock:s=!1,mouse:i=!1}={}}){return this.pointerLock=s&&D.pointerLock,D.touch&&n?"touch":this.pointerLock?"mouse":D.pointer&&!i?"pointer":D.touch?"touch":"mouse"},preventScrollAxis(t,e,{preventScroll:n}){if(this.preventScrollDelay="number"==typeof n?n:n||void 0===n&&t?250:void 0,D.touchscreen&&!1!==n)return t||(void 0!==n?"y":void 0)},pointerCapture(t,e,{pointer:{capture:n=!0,buttons:s=1,keys:i=!0}={}}){return this.pointerButtons=s,this.keys=i,!this.pointerLock&&"pointer"===this.device&&n},threshold(t,e,{filterTaps:n=!1,tapsThreshold:i=3,axis:r}){const o=s.toVector(t,n?i:r?1:0);return this.filterTaps=n,this.tapsThreshold=i,o},swipe({velocity:t=.5,distance:e=50,duration:n=250}={}){return{velocity:this.transform(s.toVector(t)),distance:this.transform(s.toVector(e)),duration:n}},delay(t=0){switch(t){case!0:return 180;case!1:return 0;default:return t}},axisThreshold:t=>t?c(c({},V),t):V,keyboardDisplacement:(t=10)=>t});c(c({},A),{},{device(t,e,{shared:n,pointer:{touch:s=!1}={}}){if(n.target&&!D.touch&&D.gesture)return"gesture";if(D.touch&&s)return"touch";if(D.touchscreen){if(D.pointer)return"pointer";if(D.touch)return"touch"}},bounds(t,e,{scaleBounds:n={},angleBounds:s={}}){const i=t=>{const e=P(k(n,t),{min:-1/0,max:1/0});return[e.min,e.max]},r=t=>{const e=P(k(s,t),{min:-1/0,max:1/0});return[e.min,e.max]};return"function"!=typeof n&&"function"!=typeof s?[i(),r()]:t=>[i(t),r(t)]},threshold(t,e,n){this.lockDirection="lock"===n.axis;return s.toVector(t,this.lockDirection?[.1,3]:0)},modifierKey:t=>void 0===t?"ctrlKey":t,pinchOnWheel:(t=!0)=>t});c(c({},C),{},{mouseOnly:(t=!0)=>t});c(c({},C),{},{mouseOnly:(t=!0)=>t});const L=new Map,q=new Map;const z={key:"drag",engine:class extends M{constructor(...t){super(...t),a(this,"ingKey","dragging")}reset(){super.reset();const t=this.state;t._pointerId=void 0,t._pointerActive=!1,t._keyboardActive=!1,t._preventScroll=!1,t._delayed=!1,t.swipe=[0,0],t.tap=!1,t.canceled=!1,t.cancel=this.cancel.bind(this)}setup(){const t=this.state;if(t._bounds instanceof HTMLElement){const e=t._bounds.getBoundingClientRect(),n=t.currentTarget.getBoundingClientRect(),s={left:e.left-n.left+t.offset[0],right:e.right-n.right+t.offset[0],top:e.top-n.top+t.offset[1],bottom:e.bottom-n.bottom+t.offset[1]};t._bounds=C.bounds(s)}}cancel(){const t=this.state;t.canceled||(t.canceled=!0,t._active=!1,setTimeout(()=>
1{this.compute(),this.emit()},0))}setActive(){this.state._active=this.state._pointerActive||this.state._keyboardActive}clean(){this.pointerClean(),this.state._pointerActive=!1,this.state._keyboardActive=!1,super.clean()}pointerDown(t){const e=this.config,n=this.state;if(null!=t.buttons&&(Array.isArray(e.pointerButtons)?!e.pointerButtons.includes(t.buttons):-1!==e.pointerButtons&&e.pointerButtons!==t.buttons))return;const s=this.ctrl.setEventIds(t);e.pointerCapture&&t.target.setPointerCapture(t.pointerId),s&&s.size>1&&n._pointerActive||(this.start(t),this.setupPointer(t),n._pointerId=_(t),n._pointerActive=!0,this.computeValues(w(t)),this.computeInitial(),e.preventScrollAxis&&"mouse"!==v(t)?(n._active=!1,this.setupScrollPrevention(t)):e.delay>0?(this.setupDelayTrigger(t),e.triggerAllEvents&&(this.compute(t),this.emit())):this.startPointerDrag(t))}startPointerDrag(t){const e=this.state;e._active=!0,e._preventScroll=!0,e._delayed=!1,this.compute(t),this.emit()}pointerMove(t){const e=this.state,n=this.config;if(!e._pointerActive)return;const i=_(t);if(void 0!==e._pointerId&&i!==e._pointerId)return;const r=w(t);return document.pointerLockElement===t.target?e._delta=[t.movementX,t.movementY]:(e._delta=s.sub(r,e._values),this.computeValues(r)),s.addTo(e._movement,e._delta),this.compute(t),e._delayed&&e.intentional?(this.timeoutStore.remove("dragDelay"),e.active=!1,void this.startPointerDrag(t)):n.preventScrollAxis&&!e._preventScroll?e.axis?e.axis===n.preventScrollAxis||"xy"===n.preventScrollAxis?(e._active=!1,void this.clean()):(this.timeoutStore.remove("startPointerDrag"),void this.startPointerDrag(t)):void 0:void this.emit()}pointerUp(t){this.ctrl.setEventIds(t);try{this.config.pointerCapture&&t.target.hasPointerCapture(t.pointerId)&&t.target.releasePointerCapture(t.pointerId)}catch(t){0}const e=this.state,n=this.config;if(!e._active||!e._pointerActive)return;const s=_(t);if(void 0!==e._pointerId&&s!==e._pointerId)return;this.state._pointerActive=!1,this.setActive(),this.compute(t);const[i,r]=e._distance;if(e.tap=i<=n.tapsThreshold&&r<=n.tapsThreshold,e.tap&&n.filterTaps)e._force=!0;else{const[t,s]=e._delta,[i,r]=e._movement,[o,a]=n.swipe.velocity,[u,c]=n.swipe.distance,l=n.swipe.duration;if(e.elapsedTime<l){const n=Math.abs(t/e.timeDelta),l=Math.abs(s/e.timeDelta);n>o&&Math.abs(i)>u&&(e.swipe[0]=Math.sign(t)),l>a&&Math.abs(r)>c&&(e.swipe[1]=Math.sign(s))}}this.emit()}pointerClick(t){!this.state.tap&&t.detail>0&&(t.preventDefault(),t.stopPropagation())}setupPointer(t){const e=this.config,n=e.device;e.pointerLock&&t.currentTarget.requestPointerLock(),e.pointerCapture||(this.eventStore.add(this.sharedConfig.window,n,"change",this.pointerMove.bind(this)),this.eventStore.add(this.sharedConfig.window,n,"end",this.pointerUp.bind(this)),this.eventStore.add(this.sharedConfig.window,n,"cancel",this.pointerUp.bind(this)))}pointerClean(){this.config.pointerLock&&document.pointerLockElement===this.state.currentTarget&&document.exitPointerLock()}preventScroll(t){this.state._preventScroll&&t.cancelable&&t.preventDefault()}setupScrollPrevention(t){this.state._preventScroll=!1,function(t){"persist"in t&&"function"==typeof t.persist&&t.persist()}(t);const e=this.eventStore.add(this.sharedConfig.window,"touch","change",this.preventScroll.bind(this),{passive:!1});this.eventStore.add(this.sharedConfig.window,"touch","end",e),this.eventStore.add(this.sharedConfig.window,"touch","cancel",e),this.timeoutStore.add("startPointerDrag",this.startPointerDrag.bind(this),this.config.preventScrollDelay,t)}setupDelayTrigger(t){this.state._delayed=!0,this.timeoutStore.add("dragDelay",()=>{this.state._step=[0,0],this.startPointerDrag(t)},this.config.delay)}keyDown(t){const e=T[t.key];if(e){const n=this.state,i=t.shiftKey?10:t.altKey?.1:1;this.start(t),n._delta=e(this.config.keyboardDisplacement,i),n._keyboardActive=!0,s.addTo(n._movement,n._delta),this.compute(t),this.emit()}}keyUp(t){t.key in T&&(this.state._keyboardActive=!1,this.setActive(),this.compute(t),this.emit())}bind(t){const e=this.config.device;t(e,"start",this.pointerDown.bind(this)),this.config.pointerCapture&&(t(e,"change",this.pointerMove.bind(this)),t(e,"end",this.pointerUp.bind(this)),t(e,"cancel",this.pointerUp.bind(this)),t("lostPointerCapture","",this.pointerUp.bind(this))),this.config.keys&&(t("key","down",this.keyDown.bind(this)),t("key","up",this.keyUp.bind(this))),this.config.filterTaps&&t("click","",this.pointerClick.bind(this),{capture:!0,passive:!1})}},resolver:R};var B=n(6540);function $(t,e){if(null==t)return{};var n,s,i=function(t,e){if(null==t)return{};var n,s,i={},r=Object.keys(t);for(s=0;s<r.length;s++)n=r[s],e.indexOf(n)>=0||(i[n]=t[n]);return i}(t,e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);for(s=0;s<r.length;s++)n=r[s],e.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(t,n)&&(i[n]=t[n])}return i}const U={target(t){if(t)return()=>"current"in t?t.current:t},enabled:(t=!0)=>t,window:(t=(D.isBrowser?window:void 0))=>
1t,eventOptions:({passive:t=!0,capture:e=!1}={})=>({passive:t,capture:e}),transform:t=>t},F=["target","eventOptions","window","enabled","transform"];function K(t={},e){const n={};for(const[s,i]of Object.entries(e))switch(typeof i){case"function":n[s]=i.call(n,t[s],s,t);break;case"object":n[s]=K(t[s],i);break;case"boolean":i&&(n[s]=t[s])}return n}class Q{constructor(t,e){a(this,"_listeners",new Set),this._ctrl=t,this._gestureKey=e}add(t,e,n,s,i){const r=this._listeners,o=function(t,e=""){const n=l[t];return t+(n&&n[e]||e)}(e,n),a=c(c({},this._gestureKey?this._ctrl.config[this._gestureKey].eventOptions:{}),i);t.addEventListener(o,s,a);const u=()=>{t.removeEventListener(o,s,a),r.delete(u)};return r.add(u),u}clean(){this._listeners.forEach(t=>t()),this._listeners.clear()}}class N{constructor(){a(this,"_timeouts",new Map)}add(t,e,n=140,...s){this.remove(t),this._timeouts.set(t,window.setTimeout(e,n,...s))}remove(t){const e=this._timeouts.get(t);e&&window.clearTimeout(e)}clean(){this._timeouts.forEach(t=>{window.clearTimeout(t)}),this._timeouts.clear()}}class H{constructor(t){a(this,"gestures",new Set),a(this,"_targetEventStore",new Q(this)),a(this,"gestureEventStores",{}),a(this,"gestureTimeoutStores",{}),a(this,"handlers",{}),a(this,"config",{}),a(this,"pointerIds",new Set),a(this,"touchIds",new Set),a(this,"state",{shared:{shiftKey:!1,metaKey:!1,ctrlKey:!1,altKey:!1}}),function(t,e){e.drag&&G(t,"drag");e.wheel&&G(t,"wheel");e.scroll&&G(t,"scroll");e.move&&G(t,"move");e.pinch&&G(t,"pinch");e.hover&&G(t,"hover")}(this,t)}setEventIds(t){return g(t)?(this.touchIds=new Set(b(t)),this.touchIds):"pointerId"in t?("pointerup"===t.type||"pointercancel"===t.type?this.pointerIds.delete(t.pointerId):"pointerdown"===t.type&&this.pointerIds.add(t.pointerId),this.pointerIds):void 0}applyHandlers(t,e){this.handlers=t,this.nativeHandlers=e}applyConfig(t,e){this.config=function(t,e,n={}){const s=t,{target:i,eventOptions:r,window:o,enabled:a,transform:u}=s,l=$(s,F);if(n.shared=K({target:i,eventOptions:r,window:o,enabled:a,transform:u},U),e){const t=q.get(e);n[e]=K(c({shared:n.shared},l),t)}else for(const t in l){const e=q.get(t);e&&(n[t]=K(c({shared:n.shared},l[t]),e))}return n}(t,e,this.config)}clean(){this._targetEventStore.clean();for(const t of this.gestures)this.gestureEventStores[t].clean(),this.gestureTimeoutStores[t].clean()}effect(){return this.config.shared.target&&this.bind(),()=>this._targetEventStore.clean()}bind(...t){const e=this.config.shared,n={};let s;if(!e.target||(s=e.target(),s)){if(e.enabled){for(const e of this.gestures){const i=this.config[e],r=W(n,i.eventOptions,!!s);if(i.enabled){new(L.get(e))(this,t,e).bind(r)}}const i=W(n,e.eventOptions,!!s);for(const e in this.nativeHandlers)i(e,"",n=>this.nativeHandlers[e](c(c({},this.state.shared),{},{event:n,args:t})),void 0,!0)}for(const t in n)n[t]=x(...n[t]);if(!s)return n;for(const t in n){const{device:e,capture:i,passive:r}=m(t);this._targetEventStore.add(s,e,"",n[t],{capture:i,passive:r})}}}}function G(t,e){t.gestures.add(e),t.gestureEventStores[e]=new Q(t,e),t.gestureTimeoutStores[e]=new N}const W=(t,e,n)=>(s,i,r,o={},a=!1)=>{var u,c;const l=null!==(u=o.capture)&&void 0!==u?u:e.capture,h=null!==(c=o.passive)&&void 0!==c?c:e.passive;let d=a?s:p(s,i,l);n&&h&&(d+="Passive"),t[d]=t[d]||[],t[d].push(r)};function X(t,e={},n,s){const i=B.useMemo(()=>new H(t),[]);if(i.applyHandlers(t,s),i.applyConfig(e,n),B.useEffect(i.effect.bind(i)),B.useEffect(()=>i.clean.bind(i),[]),void 0===e.target)return i.bind.bind(i)}function Y(t,e){var n;return n=z,L.set(n.key,n.engine),q.set(n.key,n.resolver),X({drag:t},e||{},"drag")}}}]); 2//# sourceMappingURL=484.526f2e44c32fb8234d8f.js.map
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.