@frumu/tandem-panel 0.5.4 → 0.5.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bin/setup.js +1 -0
- package/dist/assets/AutomationsPage-BGqpmilp.js +946 -0
- package/dist/assets/BugMonitorPage-BVzdj9y-.js +4 -0
- package/dist/assets/ChannelsPage-B-InJ4Yh.js +1 -0
- package/dist/assets/ChatInterfacePanel-BrMo4cXg.js +1 -0
- package/dist/assets/ChatPage-Bc-BfOG1.js +1 -0
- package/dist/assets/CodingWorkflowsPage-xgfwLRlt.js +8 -0
- package/dist/assets/ControlPanelDialogs-yFfCht3Y.js +1 -0
- package/dist/assets/DashboardPage-CrA1itFc.js +1 -0
- package/dist/assets/ExperimentsPage-Bkg1_6rw.js +84 -0
- package/dist/assets/FilesPage-DChyHlO_.js +1 -0
- package/dist/assets/IntentPlannerPage-Dti1h8Tm.js +5 -0
- package/dist/assets/LazyJson-vfWw7G9F.js +1 -0
- package/dist/assets/MarketplacePage-90fAVNGg.js +1 -0
- package/dist/assets/McpToolAllowlistEditor-BzQ64HrZ.js +1 -0
- package/dist/assets/MemoryImportDialog-DSpS1JF5.js +1 -0
- package/dist/assets/MemoryPage-DRRLgoc0.js +1 -0
- package/dist/assets/OrchestratorPage-CYU-ESPI.js +3 -0
- package/dist/assets/PacksPage-dRmjjdKD.js +3 -0
- package/dist/assets/PlannerDiagnosticsPanel-C1uIuRIx.js +1 -0
- package/dist/assets/ProviderModelSelector-BdtOpkJR.js +1 -0
- package/dist/assets/RunsPage-DEy8vbRT.js +1 -0
- package/dist/assets/SettingsPage-CwH_FzOs.js +5 -0
- package/dist/assets/TaskBoard-CCY_Qy5S.js +1 -0
- package/dist/assets/TeamsPage-Dn81V0EB.js +4472 -0
- package/dist/assets/TimezoneField-B5i---lF.js +1 -0
- package/dist/assets/WorkflowStudioPage-yFhlA4KV.js +1854 -0
- package/dist/assets/WorkflowsPage-vmaKHFox.js +2 -0
- package/dist/assets/chatPageHelpers-Dmb4waDk.js +1 -0
- package/dist/assets/explorerHandoff-BPKxMR82.js +1 -0
- package/dist/assets/format-DyX5imzJ.js +1 -0
- package/dist/assets/fullcalendar-Bn75j0xM.js +1 -0
- package/dist/assets/index-C8Bjo7hU.css +1 -0
- package/dist/assets/index-TvymvGva.js +3 -0
- package/dist/assets/messages-uD0aB_MZ.js +3 -0
- package/dist/assets/motion-B3ZE8SGR.js +9 -0
- package/dist/assets/plannerShared-Dx7-Sxpc.js +1 -0
- package/dist/assets/preact-vendor-DaCG_P2o.js +1 -0
- package/dist/assets/react-query-BIbNygEJ.js +1 -0
- package/dist/assets/sse-B4A2m-Nk.js +2 -0
- package/dist/assets/useEngineStream-Diqri33l.js +1 -0
- package/dist/assets/vendor-DSaYtO9f.js +156 -0
- package/dist/assets/workflowStability-C8USyGOY.js +2 -0
- package/dist/index.html +8 -7
- package/lib/automations/workflow-list.js +147 -0
- package/lib/setup/control-panel-preferences.js +4 -0
- package/package.json +3 -3
- package/server/routes/capabilities.js +1 -0
- package/server/routes/knowledgebase.js +7 -1
- package/dist/assets/index-BL-9rGEh.css +0 -1
- package/dist/assets/index-DhoScTZK.js +0 -7379
- package/dist/assets/motion-CBnf8hfk.js +0 -9
- package/dist/assets/preact-vendor-B239Onrg.js +0 -1
- package/dist/assets/react-query-_hsOQSt5.js +0 -1
- package/dist/assets/vendor-DZYPF2Pz.js +0 -156
- /package/dist/assets/{markdown-Dd89TVib.js → markdown-Dwwtq3bu.js} +0 -0
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import{n as e,r as t,t as n}from"./rolldown-runtime-Dgq8h090.js";var r,i,a,o,s,c,l,u,d,f,p,m,h={},g=[],_=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,v=Array.isArray;function y(e,t){for(var n in t)e[n]=t[n];return e}function b(e){e&&e.parentNode&&e.parentNode.removeChild(e)}function x(e,t,n){var i,a,o,s={};for(o in t)o==`key`?i=t[o]:o==`ref`?a=t[o]:s[o]=t[o];if(arguments.length>2&&(s.children=arguments.length>3?r.call(arguments,2):n),typeof e==`function`&&e.defaultProps!=null)for(o in e.defaultProps)s[o]===void 0&&(s[o]=e.defaultProps[o]);return S(e,s,i,a,null)}function S(e,t,n,r,o){var s={type:e,props:t,key:n,ref:r,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:o??++a,__i:-1,__u:0};return o==null&&i.vnode!=null&&i.vnode(s),s}function C(){return{current:null}}function w(e){return e.children}function T(e,t){this.props=e,this.context=t}function E(e,t){if(t==null)return e.__?E(e.__,e.__i+1):null;for(var n;t<e.__k.length;t++)if((n=e.__k[t])!=null&&n.__e!=null)return n.__e;return typeof e.type==`function`?E(e):null}function ee(e){if(e.__P&&e.__d){var t=e.__v,n=t.__e,r=[],a=[],o=y({},t);o.__v=t.__v+1,i.vnode&&i.vnode(o),le(e.__P,o,t,e.__n,e.__P.namespaceURI,32&t.__u?[n]:null,r,n??E(t),!!(32&t.__u),a),o.__v=t.__v,o.__.__k[o.__i]=o,de(r,o,a),t.__e=t.__=null,o.__e!=n&&te(o)}}function te(e){if((e=e.__)!=null&&e.__c!=null)return e.__e=e.__c.base=null,e.__k.some(function(t){if(t!=null&&t.__e!=null)return e.__e=e.__c.base=t.__e}),te(e)}function ne(e){(!e.__d&&(e.__d=!0)&&o.push(e)&&!D.__r++||s!=i.debounceRendering)&&((s=i.debounceRendering)||c)(D)}function D(){for(var e,t=1;o.length;)o.length>t&&o.sort(l),e=o.shift(),t=o.length,ee(e);D.__r=0}function re(e,t,n,r,i,a,o,s,c,l,u){var d,f,p,m,_,v,y,b=r&&r.__k||g,x=t.length;for(c=ie(n,t,b,c,x),d=0;d<x;d++)(p=n.__k[d])!=null&&(f=p.__i!=-1&&b[p.__i]||h,p.__i=d,v=le(e,p,f,i,a,o,s,c,l,u),m=p.__e,p.ref&&f.ref!=p.ref&&(f.ref&&me(f.ref,null,p),u.push(p.ref,p.__c||m,p)),_==null&&m!=null&&(_=m),(y=!!(4&p.__u))||f.__k===p.__k?c=O(p,c,e,y):typeof p.type==`function`&&v!==void 0?c=v:m&&(c=m.nextSibling),p.__u&=-7);return n.__e=_,c}function ie(e,t,n,r,i){var a,o,s,c,l,u=n.length,d=u,f=0;for(e.__k=Array(i),a=0;a<i;a++)(o=t[a])!=null&&typeof o!=`boolean`&&typeof o!=`function`?(typeof o==`string`||typeof o==`number`||typeof o==`bigint`||o.constructor==String?o=e.__k[a]=S(null,o,null,null,null):v(o)?o=e.__k[a]=S(w,{children:o},null,null,null):o.constructor===void 0&&o.__b>0?o=e.__k[a]=S(o.type,o.props,o.key,o.ref?o.ref:null,o.__v):e.__k[a]=o,c=a+f,o.__=e,o.__b=e.__b+1,s=null,(l=o.__i=ae(o,n,c,d))!=-1&&(d--,(s=n[l])&&(s.__u|=2)),s==null||s.__v==null?(l==-1&&(i>u?f--:i<u&&f++),typeof o.type!=`function`&&(o.__u|=4)):l!=c&&(l==c-1?f--:l==c+1?f++:(l>c?f--:f++,o.__u|=4))):e.__k[a]=null;if(d)for(a=0;a<u;a++)(s=n[a])!=null&&!(2&s.__u)&&(s.__e==r&&(r=E(s)),he(s,s));return r}function O(e,t,n,r){var i,a;if(typeof e.type==`function`){for(i=e.__k,a=0;i&&a<i.length;a++)i[a]&&(i[a].__=e,t=O(i[a],t,n,r));return t}e.__e!=t&&(r&&(t&&e.type&&!t.parentNode&&(t=E(e)),n.insertBefore(e.__e,t||null)),t=e.__e);do t&&=t.nextSibling;while(t!=null&&t.nodeType==8);return t}function k(e,t){return t||=[],e==null||typeof e==`boolean`||(v(e)?e.some(function(e){k(e,t)}):t.push(e)),t}function ae(e,t,n,r){var i,a,o,s=e.key,c=e.type,l=t[n],u=l!=null&&(2&l.__u)==0;if(l===null&&s==null||u&&s==l.key&&c==l.type)return n;if(r>+!!u){for(i=n-1,a=n+1;i>=0||a<t.length;)if((l=t[o=i>=0?i--:a++])!=null&&!(2&l.__u)&&s==l.key&&c==l.type)return o}return-1}function oe(e,t,n){t[0]==`-`?e.setProperty(t,n??``):e[t]=n==null?``:typeof n!=`number`||_.test(t)?n:n+`px`}function se(e,t,n,r,i){var a,o;n:if(t==`style`)if(typeof n==`string`)e.style.cssText=n;else{if(typeof r==`string`&&(e.style.cssText=r=``),r)for(t in r)n&&t in n||oe(e.style,t,``);if(n)for(t in n)r&&n[t]==r[t]||oe(e.style,t,n[t])}else if(t[0]==`o`&&t[1]==`n`)a=t!=(t=t.replace(u,`$1`)),o=t.toLowerCase(),t=o in e||t==`onFocusOut`||t==`onFocusIn`?o.slice(2):t.slice(2),e.l||={},e.l[t+a]=n,n?r?n.u=r.u:(n.u=d,e.addEventListener(t,a?p:f,a)):e.removeEventListener(t,a?p:f,a);else{if(i==`http://www.w3.org/2000/svg`)t=t.replace(/xlink(H|:h)/,`h`).replace(/sName$/,`s`);else if(t!=`width`&&t!=`height`&&t!=`href`&&t!=`list`&&t!=`form`&&t!=`tabIndex`&&t!=`download`&&t!=`rowSpan`&&t!=`colSpan`&&t!=`role`&&t!=`popover`&&t in e)try{e[t]=n??``;break n}catch{}typeof n==`function`||(n==null||!1===n&&t[4]!=`-`?e.removeAttribute(t):e.setAttribute(t,t==`popover`&&n==1?``:n))}}function ce(e){return function(t){if(this.l){var n=this.l[t.type+e];if(t.t==null)t.t=d++;else if(t.t<n.u)return;return n(i.event?i.event(t):t)}}}function le(e,t,n,r,a,o,s,c,l,u){var d,f,p,m,h,_,x,S,C,E,ee,te,ne,D,ie,O=t.type;if(t.constructor!==void 0)return null;128&n.__u&&(l=!!(32&n.__u),o=[c=t.__e=n.__e]),(d=i.__b)&&d(t);n:if(typeof O==`function`)try{if(S=t.props,C=`prototype`in O&&O.prototype.render,E=(d=O.contextType)&&r[d.__c],ee=d?E?E.props.value:d.__:r,n.__c?x=(f=t.__c=n.__c).__=f.__E:(C?t.__c=f=new O(S,ee):(t.__c=f=new T(S,ee),f.constructor=O,f.render=ge),E&&E.sub(f),f.state||={},f.__n=r,p=f.__d=!0,f.__h=[],f._sb=[]),C&&f.__s==null&&(f.__s=f.state),C&&O.getDerivedStateFromProps!=null&&(f.__s==f.state&&(f.__s=y({},f.__s)),y(f.__s,O.getDerivedStateFromProps(S,f.__s))),m=f.props,h=f.state,f.__v=t,p)C&&O.getDerivedStateFromProps==null&&f.componentWillMount!=null&&f.componentWillMount(),C&&f.componentDidMount!=null&&f.__h.push(f.componentDidMount);else{if(C&&O.getDerivedStateFromProps==null&&S!==m&&f.componentWillReceiveProps!=null&&f.componentWillReceiveProps(S,ee),t.__v==n.__v||!f.__e&&f.shouldComponentUpdate!=null&&!1===f.shouldComponentUpdate(S,f.__s,ee)){t.__v!=n.__v&&(f.props=S,f.state=f.__s,f.__d=!1),t.__e=n.__e,t.__k=n.__k,t.__k.some(function(e){e&&(e.__=t)}),g.push.apply(f.__h,f._sb),f._sb=[],f.__h.length&&s.push(f);break n}f.componentWillUpdate!=null&&f.componentWillUpdate(S,f.__s,ee),C&&f.componentDidUpdate!=null&&f.__h.push(function(){f.componentDidUpdate(m,h,_)})}if(f.context=ee,f.props=S,f.__P=e,f.__e=!1,te=i.__r,ne=0,C)f.state=f.__s,f.__d=!1,te&&te(t),d=f.render(f.props,f.state,f.context),g.push.apply(f.__h,f._sb),f._sb=[];else do f.__d=!1,te&&te(t),d=f.render(f.props,f.state,f.context),f.state=f.__s;while(f.__d&&++ne<25);f.state=f.__s,f.getChildContext!=null&&(r=y(y({},r),f.getChildContext())),C&&!p&&f.getSnapshotBeforeUpdate!=null&&(_=f.getSnapshotBeforeUpdate(m,h)),D=d!=null&&d.type===w&&d.key==null?fe(d.props.children):d,c=re(e,v(D)?D:[D],t,n,r,a,o,s,c,l,u),f.base=t.__e,t.__u&=-161,f.__h.length&&s.push(f),x&&(f.__E=f.__=null)}catch(e){if(t.__v=null,l||o!=null)if(e.then){for(t.__u|=l?160:128;c&&c.nodeType==8&&c.nextSibling;)c=c.nextSibling;o[o.indexOf(c)]=null,t.__e=c}else{for(ie=o.length;ie--;)b(o[ie]);ue(t)}else t.__e=n.__e,t.__k=n.__k,e.then||ue(t);i.__e(e,t,n)}else o==null&&t.__v==n.__v?(t.__k=n.__k,t.__e=n.__e):c=t.__e=pe(n.__e,t,n,r,a,o,s,l,u);return(d=i.diffed)&&d(t),128&t.__u?void 0:c}function ue(e){e&&(e.__c&&(e.__c.__e=!0),e.__k&&e.__k.some(ue))}function de(e,t,n){for(var r=0;r<n.length;r++)me(n[r],n[++r],n[++r]);i.__c&&i.__c(t,e),e.some(function(t){try{e=t.__h,t.__h=[],e.some(function(e){e.call(t)})}catch(e){i.__e(e,t.__v)}})}function fe(e){return typeof e!=`object`||!e||e.__b>0?e:v(e)?e.map(fe):y({},e)}function pe(e,t,n,a,o,s,c,l,u){var d,f,p,m,g,_,y,x=n.props||h,S=t.props,C=t.type;if(C==`svg`?o=`http://www.w3.org/2000/svg`:C==`math`?o=`http://www.w3.org/1998/Math/MathML`:o||=`http://www.w3.org/1999/xhtml`,s!=null){for(d=0;d<s.length;d++)if((g=s[d])&&`setAttribute`in g==!!C&&(C?g.localName==C:g.nodeType==3)){e=g,s[d]=null;break}}if(e==null){if(C==null)return document.createTextNode(S);e=document.createElementNS(o,C,S.is&&S),l&&=(i.__m&&i.__m(t,s),!1),s=null}if(C==null)x===S||l&&e.data==S||(e.data=S);else{if(s&&=r.call(e.childNodes),!l&&s!=null)for(x={},d=0;d<e.attributes.length;d++)x[(g=e.attributes[d]).name]=g.value;for(d in x)g=x[d],d==`dangerouslySetInnerHTML`?p=g:d==`children`||d in S||d==`value`&&`defaultValue`in S||d==`checked`&&`defaultChecked`in S||se(e,d,null,g,o);for(d in S)g=S[d],d==`children`?m=g:d==`dangerouslySetInnerHTML`?f=g:d==`value`?_=g:d==`checked`?y=g:l&&typeof g!=`function`||x[d]===g||se(e,d,g,x[d],o);if(f)l||p&&(f.__html==p.__html||f.__html==e.innerHTML)||(e.innerHTML=f.__html),t.__k=[];else if(p&&(e.innerHTML=``),re(t.type==`template`?e.content:e,v(m)?m:[m],t,n,a,C==`foreignObject`?`http://www.w3.org/1999/xhtml`:o,s,c,s?s[0]:n.__k&&E(n,0),l,u),s!=null)for(d=s.length;d--;)b(s[d]);l||(d=`value`,C==`progress`&&_==null?e.removeAttribute(`value`):_!=null&&(_!==e[d]||C==`progress`&&!_||C==`option`&&_!=x[d])&&se(e,d,_,x[d],o),d=`checked`,y!=null&&y!=e[d]&&se(e,d,y,x[d],o))}return e}function me(e,t,n){try{if(typeof e==`function`){var r=typeof e.__u==`function`;r&&e.__u(),r&&t==null||(e.__u=e(t))}else e.current=t}catch(e){i.__e(e,n)}}function he(e,t,n){var r,a;if(i.unmount&&i.unmount(e),(r=e.ref)&&(r.current&&r.current!=e.__e||me(r,null,t)),(r=e.__c)!=null){if(r.componentWillUnmount)try{r.componentWillUnmount()}catch(e){i.__e(e,t)}r.base=r.__P=null}if(r=e.__k)for(a=0;a<r.length;a++)r[a]&&he(r[a],t,n||typeof e.type!=`function`);n||b(e.__e),e.__c=e.__=e.__e=void 0}function ge(e,t,n){return this.constructor(e,n)}function _e(e,t,n){var a,o,s,c;t==document&&(t=document.documentElement),i.__&&i.__(e,t),o=(a=typeof n==`function`)?null:n&&n.__k||t.__k,s=[],c=[],le(t,e=(!a&&n||t).__k=x(w,null,[e]),o||h,h,t.namespaceURI,!a&&n?[n]:o?null:t.firstChild?r.call(t.childNodes):null,s,!a&&n?n:o?o.__e:t.firstChild,a,c),de(s,e,c)}function ve(e,t){_e(e,t,ve)}function ye(e,t,n){var i,a,o,s,c=y({},e.props);for(o in e.type&&e.type.defaultProps&&(s=e.type.defaultProps),t)o==`key`?i=t[o]:o==`ref`?a=t[o]:c[o]=t[o]===void 0&&s!=null?s[o]:t[o];return arguments.length>2&&(c.children=arguments.length>3?r.call(arguments,2):n),S(e.type,c,i||e.key,a||e.ref,null)}function be(e){function t(e){var n,r;return this.getChildContext||(n=new Set,(r={})[t.__c]=this,this.getChildContext=function(){return r},this.componentWillUnmount=function(){n=null},this.shouldComponentUpdate=function(e){this.props.value!=e.value&&n.forEach(function(e){e.__e=!0,ne(e)})},this.sub=function(e){n.add(e);var t=e.componentWillUnmount;e.componentWillUnmount=function(){n&&n.delete(e),t&&t.call(e)}}),e.children}return t.__c=`__cC`+ m++,t.__=e,t.Provider=t.__l=(t.Consumer=function(e,t){return e.children(t)}).contextType=t,t}r=g.slice,i={__e:function(e,t,n,r){for(var i,a,o;t=t.__;)if((i=t.__c)&&!i.__)try{if((a=i.constructor)&&a.getDerivedStateFromError!=null&&(i.setState(a.getDerivedStateFromError(e)),o=i.__d),i.componentDidCatch!=null&&(i.componentDidCatch(e,r||{}),o=i.__d),o)return i.__E=i}catch(t){e=t}throw e}},a=0,T.prototype.setState=function(e,t){var n=this.__s!=null&&this.__s!=this.state?this.__s:this.__s=y({},this.state);typeof e==`function`&&(e=e(y({},n),this.props)),e&&y(n,e),e!=null&&this.__v&&(t&&this._sb.push(t),ne(this))},T.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),ne(this))},T.prototype.render=w,o=[],c=typeof Promise==`function`?Promise.prototype.then.bind(Promise.resolve()):setTimeout,l=function(e,t){return e.__v.__b-t.__v.__b},D.__r=0,u=/(PointerCapture)$|Capture$/i,d=0,f=ce(!1),p=ce(!0),m=0;var xe,A,Se,Ce,we=0,Te=[],j=i,Ee=j.__b,De=j.__r,Oe=j.diffed,ke=j.__c,Ae=j.unmount,je=j.__;function Me(e,t){j.__h&&j.__h(A,e,we||t),we=0;var n=A.__H||={__:[],__h:[]};return e>=n.__.length&&n.__.push({}),n.__[e]}function Ne(e){return we=1,Pe(qe,e)}function Pe(e,t,n){var r=Me(xe++,2);if(r.t=e,!r.__c&&(r.__=[n?n(t):qe(void 0,t),function(e){var t=r.__N?r.__N[0]:r.__[0],n=r.t(t,e);t!==n&&(r.__N=[n,r.__[1]],r.__c.setState({}))}],r.__c=A,!A.__f)){var i=function(e,t,n){if(!r.__c.__H)return!0;var i=r.__c.__H.__.filter(function(e){return e.__c});if(i.every(function(e){return!e.__N}))return!a||a.call(this,e,t,n);var o=r.__c.props!==e;return i.some(function(e){if(e.__N){var t=e.__[0];e.__=e.__N,e.__N=void 0,t!==e.__[0]&&(o=!0)}}),a&&a.call(this,e,t,n)||o};A.__f=!0;var a=A.shouldComponentUpdate,o=A.componentWillUpdate;A.componentWillUpdate=function(e,t,n){if(this.__e){var r=a;a=void 0,i(e,t,n),a=r}o&&o.call(this,e,t,n)},A.shouldComponentUpdate=i}return r.__N||r.__}function Fe(e,t){var n=Me(xe++,3);!j.__s&&Ke(n.__H,t)&&(n.__=e,n.u=t,A.__H.__h.push(n))}function Ie(e,t){var n=Me(xe++,4);!j.__s&&Ke(n.__H,t)&&(n.__=e,n.u=t,A.__h.push(n))}function M(e){return we=5,N(function(){return{current:e}},[])}function Le(e,t,n){we=6,Ie(function(){if(typeof e==`function`){var n=e(t());return function(){e(null),n&&typeof n==`function`&&n()}}if(e)return e.current=t(),function(){return e.current=null}},n==null?n:n.concat(e))}function N(e,t){var n=Me(xe++,7);return Ke(n.__H,t)&&(n.__=e(),n.__H=t,n.__h=e),n.__}function Re(e,t){return we=8,N(function(){return e},t)}function P(e){var t=A.context[e.__c],n=Me(xe++,9);return n.c=e,t?(n.__??(n.__=!0,t.sub(A)),t.props.value):e.__}function ze(e,t){j.useDebugValue&&j.useDebugValue(t?t(e):e)}function Be(){var e=Me(xe++,11);if(!e.__){for(var t=A.__v;t!==null&&!t.__m&&t.__!==null;)t=t.__;var n=t.__m||=[0,0];e.__=`P`+n[0]+`-`+ n[1]++}return e.__}function Ve(){for(var e;e=Te.shift();){var t=e.__H;if(e.__P&&t)try{t.__h.some(We),t.__h.some(Ge),t.__h=[]}catch(n){t.__h=[],j.__e(n,e.__v)}}}j.__b=function(e){A=null,Ee&&Ee(e)},j.__=function(e,t){e&&t.__k&&t.__k.__m&&(e.__m=t.__k.__m),je&&je(e,t)},j.__r=function(e){De&&De(e),xe=0;var t=(A=e.__c).__H;t&&(Se===A?(t.__h=[],A.__h=[],t.__.some(function(e){e.__N&&(e.__=e.__N),e.u=e.__N=void 0})):(t.__h.some(We),t.__h.some(Ge),t.__h=[],xe=0)),Se=A},j.diffed=function(e){Oe&&Oe(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(Te.push(t)!==1&&Ce===j.requestAnimationFrame||((Ce=j.requestAnimationFrame)||Ue)(Ve)),t.__H.__.some(function(e){e.u&&(e.__H=e.u),e.u=void 0})),Se=A=null},j.__c=function(e,t){t.some(function(e){try{e.__h.some(We),e.__h=e.__h.filter(function(e){return!e.__||Ge(e)})}catch(n){t.some(function(e){e.__h&&=[]}),t=[],j.__e(n,e.__v)}}),ke&&ke(e,t)},j.unmount=function(e){Ae&&Ae(e);var t,n=e.__c;n&&n.__H&&(n.__H.__.some(function(e){try{We(e)}catch(e){t=e}}),n.__H=void 0,t&&j.__e(t,n.__v))};var He=typeof requestAnimationFrame==`function`;function Ue(e){var t,n=function(){clearTimeout(r),He&&cancelAnimationFrame(t),setTimeout(e)},r=setTimeout(n,35);He&&(t=requestAnimationFrame(n))}function We(e){var t=A,n=e.__c;typeof n==`function`&&(e.__c=void 0,n()),A=t}function Ge(e){var t=A;e.__c=e.__(),A=t}function Ke(e,t){return!e||e.length!==t.length||t.some(function(t,n){return t!==e[n]})}function qe(e,t){return typeof t==`function`?t(e):t}function Je(e,t){for(var n in t)e[n]=t[n];return e}function Ye(e,t){for(var n in e)if(n!==`__source`&&!(n in t))return!0;for(var r in t)if(r!==`__source`&&e[r]!==t[r])return!0;return!1}function Xe(e,t){var n=t(),r=Ne({t:{__:n,u:t}}),i=r[0].t,a=r[1];return Ie(function(){i.__=n,i.u=t,Ze(i)&&a({t:i})},[e,n,t]),Fe(function(){return Ze(i)&&a({t:i}),e(function(){Ze(i)&&a({t:i})})},[e]),n}function Ze(e){try{return!((t=e.__)===(n=e.u())&&(t!==0||1/t==1/n)||t!=t&&n!=n)}catch{return!0}var t,n}function Qe(e){e()}function $e(e){return e}function et(){return[!1,Qe]}var tt=Ie;function nt(e,t){this.props=e,this.context=t}function rt(e,t){function n(e){var n=this.props.ref,r=n==e.ref;return!r&&n&&(n.call?n(null):n.current=null),t?!t(this.props,e)||!r:Ye(this.props,e)}function r(t){return this.shouldComponentUpdate=n,x(e,t)}return r.displayName=`Memo(`+(e.displayName||e.name)+`)`,r.prototype.isReactComponent=!0,r.__f=!0,r.type=e,r}(nt.prototype=new T).isPureReactComponent=!0,nt.prototype.shouldComponentUpdate=function(e,t){return Ye(this.props,e)||Ye(this.state,t)};var it=i.__b;i.__b=function(e){e.type&&e.type.__f&&e.ref&&(e.props.ref=e.ref,e.ref=null),it&&it(e)};var at=typeof Symbol<`u`&&Symbol.for&&Symbol.for(`react.forward_ref`)||3911;function ot(e){function t(t){var n=Je({},t);return delete n.ref,e(n,t.ref||null)}return t.$$typeof=at,t.render=e,t.prototype.isReactComponent=t.__f=!0,t.displayName=`ForwardRef(`+(e.displayName||e.name)+`)`,t}var st=function(e,t){return e==null?null:k(k(e).map(t))},ct={map:st,forEach:st,count:function(e){return e?k(e).length:0},only:function(e){var t=k(e);if(t.length!==1)throw`Children.only`;return t[0]},toArray:k},lt=i.__e;i.__e=function(e,t,n,r){if(e.then){for(var i,a=t;a=a.__;)if((i=a.__c)&&i.__c)return t.__e??(t.__e=n.__e,t.__k=n.__k),i.__c(e,t)}lt(e,t,n,r)};var ut=i.unmount;function dt(e,t,n){return e&&(e.__c&&e.__c.__H&&(e.__c.__H.__.forEach(function(e){typeof e.__c==`function`&&e.__c()}),e.__c.__H=null),(e=Je({},e)).__c!=null&&(e.__c.__P===n&&(e.__c.__P=t),e.__c.__e=!0,e.__c=null),e.__k=e.__k&&e.__k.map(function(e){return dt(e,t,n)})),e}function ft(e,t,n){return e&&n&&(e.__v=null,e.__k=e.__k&&e.__k.map(function(e){return ft(e,t,n)}),e.__c&&e.__c.__P===t&&(e.__e&&n.appendChild(e.__e),e.__c.__e=!0,e.__c.__P=n)),e}function pt(){this.__u=0,this.o=null,this.__b=null}function mt(e){if(!e.__)return null;var t=e.__.__c;return t&&t.__a&&t.__a(e)}function ht(e){var t,n,r,i=null;function a(a){if(t||(t=e()).then(function(e){e&&(i=e.default||e),r=!0},function(e){n=e,r=!0}),n)throw n;if(!r)throw t;return i?x(i,a):null}return a.displayName=`Lazy`,a.__f=!0,a}function gt(){this.i=null,this.l=null}i.unmount=function(e){var t=e.__c;t&&(t.__z=!0),t&&t.__R&&t.__R(),t&&32&e.__u&&(e.type=null),ut&&ut(e)},(pt.prototype=new T).__c=function(e,t){var n=t.__c,r=this;r.o??=[],r.o.push(n);var i=mt(r.__v),a=!1,o=function(){a||r.__z||(a=!0,n.__R=null,i?i(c):c())};n.__R=o;var s=n.__P;n.__P=null;var c=function(){if(!--r.__u){if(r.state.__a){var e=r.state.__a;r.__v.__k[0]=ft(e,e.__c.__P,e.__c.__O)}var t;for(r.setState({__a:r.__b=null});t=r.o.pop();)t.__P=s,t.forceUpdate()}};r.__u++||32&t.__u||r.setState({__a:r.__b=r.__v.__k[0]}),e.then(o,o)},pt.prototype.componentWillUnmount=function(){this.o=[]},pt.prototype.render=function(e,t){if(this.__b){if(this.__v.__k){var n=document.createElement(`div`),r=this.__v.__k[0].__c;this.__v.__k[0]=dt(this.__b,n,r.__O=r.__P)}this.__b=null}var i=t.__a&&x(w,null,e.fallback);return i&&(i.__u&=-33),[x(w,null,t.__a?null:e.children),i]};var _t=function(e,t,n){if(++n[1]===n[0]&&e.l.delete(t),e.props.revealOrder&&(e.props.revealOrder[0]!==`t`||!e.l.size))for(n=e.i;n;){for(;n.length>3;)n.pop()();if(n[1]<n[0])break;e.i=n=n[2]}};function vt(e){return this.getChildContext=function(){return e.context},e.children}function yt(e){var t=this,n=e.h;if(t.componentWillUnmount=function(){_e(null,t.v),t.v=null,t.h=null},t.h&&t.h!==n&&t.componentWillUnmount(),!t.v){for(var r=t.__v;r!==null&&!r.__m&&r.__!==null;)r=r.__;t.h=n,t.v={nodeType:1,parentNode:n,childNodes:[],__k:{__m:r.__m},contains:function(){return!0},namespaceURI:n.namespaceURI,insertBefore:function(e,n){this.childNodes.push(e),t.h.insertBefore(e,n)},removeChild:function(e){this.childNodes.splice(this.childNodes.indexOf(e)>>>1,1),t.h.removeChild(e)}}}_e(x(vt,{context:t.context},e.__v),t.v)}function bt(e,t){var n=x(yt,{__v:e,h:t});return n.containerInfo=t,n}(gt.prototype=new T).__a=function(e){var t=this,n=mt(t.__v),r=t.l.get(e);return r[0]++,function(i){var a=function(){t.props.revealOrder?(r.push(i),_t(t,e,r)):i()};n?n(a):a()}},gt.prototype.render=function(e){this.i=null,this.l=new Map;var t=k(e.children);e.revealOrder&&e.revealOrder[0]===`b`&&t.reverse();for(var n=t.length;n--;)this.l.set(t[n],this.i=[1,0,this.i]);return e.children},gt.prototype.componentDidUpdate=gt.prototype.componentDidMount=function(){var e=this;this.l.forEach(function(t,n){_t(e,n,t)})};var xt=typeof Symbol<`u`&&Symbol.for&&Symbol.for(`react.element`)||60103,St=/^(?:accent|alignment|arabic|baseline|cap|clip(?!PathU)|color|dominant|fill|flood|font|glyph(?!R)|horiz|image(!S)|letter|lighting|marker(?!H|W|U)|overline|paint|pointer|shape|stop|strikethrough|stroke|text(?!L)|transform|underline|unicode|units|v|vector|vert|word|writing|x(?!C))[A-Z]/,Ct=/^on(Ani|Tra|Tou|BeforeInp|Compo)/,wt=/[A-Z0-9]/g,Tt=typeof document<`u`,Et=function(e){return(typeof Symbol<`u`&&typeof Symbol()==`symbol`?/fil|che|rad/:/fil|che|ra/).test(e)};function Dt(e,t,n){return t.__k??(t.textContent=``),_e(e,t),typeof n==`function`&&n(),e?e.__c:null}function Ot(e,t,n){return ve(e,t),typeof n==`function`&&n(),e?e.__c:null}T.prototype.isReactComponent={},[`componentWillMount`,`componentWillReceiveProps`,`componentWillUpdate`].forEach(function(e){Object.defineProperty(T.prototype,e,{configurable:!0,get:function(){return this[`UNSAFE_`+e]},set:function(t){Object.defineProperty(this,e,{configurable:!0,writable:!0,value:t})}})});var kt=i.event;function At(){}function jt(){return this.cancelBubble}function Mt(){return this.defaultPrevented}i.event=function(e){return kt&&(e=kt(e)),e.persist=At,e.isPropagationStopped=jt,e.isDefaultPrevented=Mt,e.nativeEvent=e};var Nt,Pt={enumerable:!1,configurable:!0,get:function(){return this.class}},Ft=i.vnode;i.vnode=function(e){typeof e.type==`string`&&function(e){var t=e.props,n=e.type,r={},i=n.indexOf(`-`)===-1;for(var a in t){var o=t[a];if(!(a===`value`&&`defaultValue`in t&&o==null||Tt&&a===`children`&&n===`noscript`||a===`class`||a===`className`)){var s=a.toLowerCase();a===`defaultValue`&&`value`in t&&t.value==null?a=`value`:a===`download`&&!0===o?o=``:s===`translate`&&o===`no`?o=!1:s[0]===`o`&&s[1]===`n`?s===`ondoubleclick`?a=`ondblclick`:s!==`onchange`||n!==`input`&&n!==`textarea`||Et(t.type)?s===`onfocus`?a=`onfocusin`:s===`onblur`?a=`onfocusout`:Ct.test(a)&&(a=s):s=a=`oninput`:i&&St.test(a)?a=a.replace(wt,`-$&`).toLowerCase():o===null&&(o=void 0),s===`oninput`&&r[a=s]&&(a=`oninputCapture`),r[a]=o}}n==`select`&&r.multiple&&Array.isArray(r.value)&&(r.value=k(t.children).forEach(function(e){e.props.selected=r.value.indexOf(e.props.value)!=-1})),n==`select`&&r.defaultValue!=null&&(r.value=k(t.children).forEach(function(e){e.props.selected=r.multiple?r.defaultValue.indexOf(e.props.value)!=-1:r.defaultValue==e.props.value})),t.class&&!t.className?(r.class=t.class,Object.defineProperty(r,`className`,Pt)):t.className&&(r.class=r.className=t.className),e.props=r}(e),e.$$typeof=xt,Ft&&Ft(e)};var It=i.__r;i.__r=function(e){It&&It(e),Nt=e.__c};var Lt=i.diffed;i.diffed=function(e){Lt&&Lt(e);var t=e.props,n=e.__e;n!=null&&e.type===`textarea`&&`value`in t&&t.value!==n.value&&(n.value=t.value==null?``:t.value),Nt=null};var Rt={ReactCurrentDispatcher:{current:{readContext:function(e){return Nt.__n[e.__c].props.value},useCallback:Re,useContext:P,useDebugValue:ze,useDeferredValue:$e,useEffect:Fe,useId:Be,useImperativeHandle:Le,useInsertionEffect:tt,useLayoutEffect:Ie,useMemo:N,useReducer:Pe,useRef:M,useState:Ne,useSyncExternalStore:Xe,useTransition:et}}};function zt(e){return x.bind(null,e)}function Bt(e){return!!e&&e.$$typeof===xt}function Vt(e){return Bt(e)&&e.type===w}function Ht(e){return!!e&&typeof e.displayName==`string`&&e.displayName.startsWith(`Memo(`)}function Ut(e){return Bt(e)?ye.apply(null,arguments):e}function Wt(e){return!!e.__k&&(_e(null,e),!0)}function Gt(e){return e&&(e.base||e.nodeType===1&&e)||null}var Kt=function(e,t){return e(t)},qt=function(e,t){return e(t)},Jt=w,Yt={useState:Ne,useId:Be,useReducer:Pe,useEffect:Fe,useLayoutEffect:Ie,useInsertionEffect:tt,useTransition:et,useDeferredValue:$e,useSyncExternalStore:Xe,startTransition:Qe,useRef:M,useImperativeHandle:Le,useMemo:N,useCallback:Re,useContext:P,useDebugValue:ze,version:`18.3.1`,Children:ct,render:Dt,hydrate:Ot,unmountComponentAtNode:Wt,createPortal:bt,createElement:x,createContext:be,createFactory:zt,cloneElement:Ut,createRef:C,Fragment:w,isValidElement:Bt,isElement:Bt,isFragment:Vt,isMemo:Ht,findDOMNode:Gt,Component:T,PureComponent:nt,memo:rt,forwardRef:ot,flushSync:qt,unstable_batchedUpdates:Kt,StrictMode:Jt,Suspense:pt,SuspenseList:gt,lazy:ht,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:Rt},Xt=0;Array.isArray;function F(e,t,n,r,a,o){t||={};var s,c,l=t;if(`ref`in l)for(c in l={},t)c==`ref`?s=t[c]:l[c]=t[c];var u={type:e,props:l,key:n,ref:s,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:--Xt,__i:-1,__u:0,__source:a,__self:o};if(typeof e==`function`&&(s=e.defaultProps))for(c in s)l[c]===void 0&&(l[c]=s[c]);return i.vnode&&i.vnode(u),u}var Zt=be({});function Qt(e){let t=M(null);return t.current===null&&(t.current=e()),t.current}var $t=be(null),en=be({transformPagePoint:e=>e,isStatic:!1,reducedMotion:`never`}),tn=class extends T{getSnapshotBeforeUpdate(e){let t=this.props.childRef.current;if(t&&e.isPresent&&!this.props.isPresent){let e=this.props.sizeRef.current;e.height=t.offsetHeight||0,e.width=t.offsetWidth||0,e.top=t.offsetTop,e.left=t.offsetLeft}return null}componentDidUpdate(){}render(){return this.props.children}};function nn({children:e,isPresent:t}){let n=Be(),r=M(null),i=M({width:0,height:0,top:0,left:0}),{nonce:a}=P(en);return tt(()=>{let{width:e,height:o,top:s,left:c}=i.current;if(t||!r.current||!e||!o)return;r.current.dataset.motionPopId=n;let l=document.createElement(`style`);return a&&(l.nonce=a),document.head.appendChild(l),l.sheet&&l.sheet.insertRule(`
|
|
2
|
-
[data-motion-pop-id="${n}"] {
|
|
3
|
-
position: absolute !important;
|
|
4
|
-
width: ${e}px !important;
|
|
5
|
-
height: ${o}px !important;
|
|
6
|
-
top: ${s}px !important;
|
|
7
|
-
left: ${c}px !important;
|
|
8
|
-
}
|
|
9
|
-
`),()=>{document.head.removeChild(l)}},[t]),F(tn,{isPresent:t,childRef:r,sizeRef:i,children:Ut(e,{ref:r})})}var rn=({children:e,initial:t,isPresent:n,onExitComplete:r,custom:i,presenceAffectsLayout:a,mode:o})=>{let s=Qt(an),c=Be(),l=Re(e=>{s.set(e,!0);for(let e of s.values())if(!e)return;r&&r()},[s,r]),u=N(()=>({id:c,initial:t,isPresent:n,custom:i,onExitComplete:l,register:e=>(s.set(e,!1),()=>s.delete(e))}),a?[Math.random(),l]:[n,l]);return N(()=>{s.forEach((e,t)=>s.set(t,!1))},[n]),Fe(()=>{!n&&!s.size&&r&&r()},[n]),o===`popLayout`&&(e=F(nn,{isPresent:n,children:e})),F($t.Provider,{value:u,children:e})};function an(){return new Map}function on(e=!0){let t=P($t);if(t===null)return[!0,null];let{isPresent:n,onExitComplete:r,register:i}=t,a=Be();Fe(()=>{e&&i(a)},[e]);let o=Re(()=>e&&r&&r(a),[a,r,e]);return!n&&r?[!1,o]:[!0]}var sn=e=>e.key||``;function cn(e){let t=[];return ct.forEach(e,e=>{Bt(e)&&t.push(e)}),t}var ln=typeof window<`u`,un=ln?Ie:Fe,dn=({children:e,custom:t,initial:n=!0,onExitComplete:r,presenceAffectsLayout:i=!0,mode:a=`sync`,propagate:o=!1})=>{let[s,c]=on(o),l=N(()=>cn(e),[e]),u=o&&!s?[]:l.map(sn),d=M(!0),f=M(l),p=Qt(()=>new Map),[m,h]=Ne(l),[g,_]=Ne(l);un(()=>{d.current=!1,f.current=l;for(let e=0;e<g.length;e++){let t=sn(g[e]);u.includes(t)?p.delete(t):p.get(t)!==!0&&p.set(t,!1)}},[g,u.length,u.join(`-`)]);let v=[];if(l!==m){let e=[...l];for(let t=0;t<g.length;t++){let n=g[t],r=sn(n);u.includes(r)||(e.splice(t,0,n),v.push(n))}a===`wait`&&v.length&&(e=v),_(cn(e)),h(l);return}let{forceRender:y}=P(Zt);return F(w,{children:g.map(e=>{let m=sn(e),h=o&&!s?!1:l===g||u.includes(m);return F(rn,{isPresent:h,initial:!d.current||n?void 0:!1,custom:h?void 0:t,presenceAffectsLayout:i,mode:a,onExitComplete:h?void 0:()=>{if(p.has(m))p.set(m,!0);else return;let e=!0;p.forEach(t=>{t||(e=!1)}),e&&(y?.(),_(f.current),o&&c?.(),r&&r())},children:e},m)})})},I=e=>e,fn=I,pn=I,mn={skipAnimations:!1,useManualTiming:!1};function hn(e){let t=new Set,n=new Set,r=!1,i=!1,a=new WeakSet,o={delta:0,timestamp:0,isProcessing:!1};function s(t){a.has(t)&&(c.schedule(t),e()),t(o)}let c={schedule:(e,i=!1,o=!1)=>{let s=o&&r?t:n;return i&&a.add(e),s.has(e)||s.add(e),e},cancel:e=>{n.delete(e),a.delete(e)},process:e=>{if(o=e,r){i=!0;return}r=!0,[t,n]=[n,t],t.forEach(s),t.clear(),r=!1,i&&(i=!1,c.process(e))}};return c}var gn=[`read`,`resolveKeyframes`,`update`,`preRender`,`render`,`postRender`],_n=40;function vn(e,t){let n=!1,r=!0,i={delta:0,timestamp:0,isProcessing:!1},a=()=>n=!0,o=gn.reduce((e,t)=>(e[t]=hn(a),e),{}),{read:s,resolveKeyframes:c,update:l,preRender:u,render:d,postRender:f}=o,p=()=>{let a=mn.useManualTiming?i.timestamp:performance.now();n=!1,i.delta=r?1e3/60:Math.max(Math.min(a-i.timestamp,_n),1),i.timestamp=a,i.isProcessing=!0,s.process(i),c.process(i),l.process(i),u.process(i),d.process(i),f.process(i),i.isProcessing=!1,n&&t&&(r=!1,e(p))},m=()=>{n=!0,r=!0,i.isProcessing||e(p)};return{schedule:gn.reduce((e,t)=>{let r=o[t];return e[t]=(e,t=!1,i=!1)=>(n||m(),r.schedule(e,t,i)),e},{}),cancel:e=>{for(let t=0;t<gn.length;t++)o[gn[t]].cancel(e)},state:i,steps:o}}var{schedule:L,cancel:yn,state:R,steps:bn}=vn(typeof requestAnimationFrame<`u`?requestAnimationFrame:I,!0),xn=be({strict:!1}),Sn={animation:[`animate`,`variants`,`whileHover`,`whileTap`,`exit`,`whileInView`,`whileFocus`,`whileDrag`],exit:[`exit`],drag:[`drag`,`dragControls`],focus:[`whileFocus`],hover:[`whileHover`,`onHoverStart`,`onHoverEnd`],tap:[`whileTap`,`onTap`,`onTapStart`,`onTapCancel`],pan:[`onPan`,`onPanStart`,`onPanSessionStart`,`onPanEnd`],inView:[`whileInView`,`onViewportEnter`,`onViewportLeave`],layout:[`layout`,`layoutId`]},Cn={};for(let e in Sn)Cn[e]={isEnabled:t=>Sn[e].some(e=>!!t[e])};function wn(e){for(let t in e)Cn[t]={...Cn[t],...e[t]}}var Tn=new Set(`animate.exit.variants.initial.style.values.variants.transition.transformTemplate.custom.inherit.onBeforeLayoutMeasure.onAnimationStart.onAnimationComplete.onUpdate.onDragStart.onDrag.onDragEnd.onMeasureDragConstraints.onDirectionLock.onDragTransitionEnd._dragX._dragY.onHoverStart.onHoverEnd.onViewportEnter.onViewportLeave.globalTapTarget.ignoreStrict.viewport`.split(`.`));function En(e){return e.startsWith(`while`)||e.startsWith(`drag`)&&e!==`draggable`||e.startsWith(`layout`)||e.startsWith(`onTap`)||e.startsWith(`onPan`)||e.startsWith(`onLayout`)||Tn.has(e)}var Dn=e({default:()=>On}),On,kn=n((()=>{throw On={},Error(`Could not resolve "@emotion/is-prop-valid" imported by "motion". Is it installed?`)})),An=e=>!En(e);function jn(e){e&&(An=t=>t.startsWith(`on`)?!En(t):e(t))}try{jn((kn(),t(Dn)).default)}catch{}function Mn(e,t,n){let r={};for(let i in e)i===`values`&&typeof e.values==`object`||(An(i)||n===!0&&En(i)||!t&&!En(i)||e.draggable&&i.startsWith(`onDrag`))&&(r[i]=e[i]);return r}function Nn(e){if(typeof Proxy>`u`)return e;let t=new Map;return new Proxy((...t)=>e(...t),{get:(n,r)=>r===`create`?e:(t.has(r)||t.set(r,e(r)),t.get(r))})}var Pn=be({});function Fn(e){return typeof e==`string`||Array.isArray(e)}function In(e){return typeof e==`object`&&!!e&&typeof e.start==`function`}var Ln=[`animate`,`whileInView`,`whileFocus`,`whileHover`,`whileTap`,`whileDrag`,`exit`],Rn=[`initial`,...Ln];function zn(e){return In(e.animate)||Rn.some(t=>Fn(e[t]))}function Bn(e){return!!(zn(e)||e.variants)}function Vn(e,t){if(zn(e)){let{initial:t,animate:n}=e;return{initial:t===!1||Fn(t)?t:void 0,animate:Fn(n)?n:void 0}}return e.inherit===!1?{}:t}function Hn(e){let{initial:t,animate:n}=Vn(e,P(Pn));return N(()=>({initial:t,animate:n}),[Un(t),Un(n)])}function Un(e){return Array.isArray(e)?e.join(` `):e}var Wn=Symbol.for(`motionComponentSymbol`);function Gn(e){return e&&typeof e==`object`&&Object.prototype.hasOwnProperty.call(e,`current`)}function Kn(e,t,n){return Re(r=>{r&&e.onMount&&e.onMount(r),t&&(r?t.mount(r):t.unmount()),n&&(typeof n==`function`?n(r):Gn(n)&&(n.current=r))},[t])}var qn=e=>e.replace(/([a-z])([A-Z])/gu,`$1-$2`).toLowerCase(),Jn=`data-`+qn(`framerAppearId`),{schedule:Yn,cancel:Xn}=vn(queueMicrotask,!1),Zn=be({});function Qn(e,t,n,r,i){let{visualElement:a}=P(Pn),o=P(xn),s=P($t),c=P(en).reducedMotion,l=M(null);r||=o.renderer,!l.current&&r&&(l.current=r(e,{visualState:t,parent:a,props:n,presenceContext:s,blockInitialAnimation:s?s.initial===!1:!1,reducedMotionConfig:c}));let u=l.current,d=P(Zn);u&&!u.projection&&i&&(u.type===`html`||u.type===`svg`)&&$n(l.current,n,i,d);let f=M(!1);tt(()=>{u&&f.current&&u.update(n,s)});let p=n[Jn],m=M(!!p&&!window.MotionHandoffIsComplete?.call(window,p)&&window.MotionHasOptimisedAnimation?.call(window,p));return un(()=>{u&&(f.current=!0,window.MotionIsMounted=!0,u.updateFeatures(),Yn.render(u.render),m.current&&u.animationState&&u.animationState.animateChanges())}),Fe(()=>{u&&(!m.current&&u.animationState&&u.animationState.animateChanges(),m.current&&=(queueMicrotask(()=>{var e;(e=window.MotionHandoffMarkAsComplete)==null||e.call(window,p)}),!1))}),u}function $n(e,t,n,r){let{layoutId:i,layout:a,drag:o,dragConstraints:s,layoutScroll:c,layoutRoot:l}=t;e.projection=new n(e.latestValues,t[`data-framer-portal-id`]?void 0:er(e.parent)),e.projection.setOptions({layoutId:i,layout:a,alwaysMeasureLayout:!!o||s&&Gn(s),visualElement:e,animationType:typeof a==`string`?a:`both`,initialPromotionConfig:r,layoutScroll:c,layoutRoot:l})}function er(e){if(e)return e.options.allowProjection===!1?er(e.parent):e.projection}function tr({preloadedFeatures:e,createVisualElement:t,useRender:n,useVisualState:r,Component:i}){e&&wn(e);function a(a,o){let s,c={...P(en),...a,layoutId:nr(a)},{isStatic:l}=c,u=Hn(a),d=r(a,l);if(!l&&ln){rr(c,e);let n=ir(c);s=n.MeasureLayout,u.visualElement=Qn(i,d,c,t,n.ProjectionNode)}return F(Pn.Provider,{value:u,children:[s&&u.visualElement?F(s,{visualElement:u.visualElement,...c}):null,n(i,a,Kn(d,u.visualElement,o),d,l,u.visualElement)]})}a.displayName=`motion.${typeof i==`string`?i:`create(${i.displayName??i.name??``})`}`;let o=ot(a);return o[Wn]=i,o}function nr({layoutId:e}){let t=P(Zt).id;return t&&e!==void 0?t+`-`+e:e}function rr(e,t){P(xn).strict}function ir(e){let{drag:t,layout:n}=Cn;if(!t&&!n)return{};let r={...t,...n};return{MeasureLayout:t?.isEnabled(e)||n?.isEnabled(e)?r.MeasureLayout:void 0,ProjectionNode:r.ProjectionNode}}var ar=[`animate`,`circle`,`defs`,`desc`,`ellipse`,`g`,`image`,`line`,`filter`,`marker`,`mask`,`metadata`,`path`,`pattern`,`polygon`,`polyline`,`rect`,`stop`,`switch`,`symbol`,`svg`,`text`,`tspan`,`use`,`view`];function or(e){return typeof e!=`string`||e.includes(`-`)?!1:!!(ar.indexOf(e)>-1||/[A-Z]/u.test(e))}function sr(e){let t=[{},{}];return e?.values.forEach((e,n)=>{t[0][n]=e.get(),t[1][n]=e.getVelocity()}),t}function cr(e,t,n,r){if(typeof t==`function`){let[i,a]=sr(r);t=t(n===void 0?e.custom:n,i,a)}if(typeof t==`string`&&(t=e.variants&&e.variants[t]),typeof t==`function`){let[i,a]=sr(r);t=t(n===void 0?e.custom:n,i,a)}return t}var lr=e=>Array.isArray(e),ur=e=>!!(e&&typeof e==`object`&&e.mix&&e.toValue),dr=e=>lr(e)?e[e.length-1]||0:e,z=e=>!!(e&&e.getVelocity);function fr(e){let t=z(e)?e.get():e;return ur(t)?t.toValue():t}function pr({scrapeMotionValuesFromProps:e,createRenderState:t,onUpdate:n},r,i,a){let o={latestValues:hr(r,i,a,e),renderState:t()};return n&&(o.onMount=e=>n({props:r,current:e,...o}),o.onUpdate=e=>n(e)),o}var mr=e=>(t,n)=>{let r=P(Pn),i=P($t),a=()=>pr(e,t,r,i);return n?a():Qt(a)};function hr(e,t,n,r){let i={},a=r(e,{});for(let e in a)i[e]=fr(a[e]);let{initial:o,animate:s}=e,c=zn(e),l=Bn(e);t&&l&&!c&&e.inherit!==!1&&(o===void 0&&(o=t.initial),s===void 0&&(s=t.animate));let u=n?n.initial===!1:!1;u||=o===!1;let d=u?s:o;if(d&&typeof d!=`boolean`&&!In(d)){let t=Array.isArray(d)?d:[d];for(let n=0;n<t.length;n++){let r=cr(e,t[n]);if(r){let{transitionEnd:e,transition:t,...n}=r;for(let e in n){let t=n[e];if(Array.isArray(t)){let e=u?t.length-1:0;t=t[e]}t!==null&&(i[e]=t)}for(let t in e)i[t]=e[t]}}}return i}var gr=[`transformPerspective`,`x`,`y`,`z`,`translateX`,`translateY`,`translateZ`,`scale`,`scaleX`,`scaleY`,`rotate`,`rotateX`,`rotateY`,`rotateZ`,`skew`,`skewX`,`skewY`],_r=new Set(gr),vr=e=>t=>typeof t==`string`&&t.startsWith(e),yr=vr(`--`),br=vr(`var(--`),xr=e=>br(e)?Sr.test(e.split(`/*`)[0].trim()):!1,Sr=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,Cr=(e,t)=>t&&typeof e==`number`?t.transform(e):e,B=(e,t,n)=>n>t?t:n<e?e:n,wr={test:e=>typeof e==`number`,parse:parseFloat,transform:e=>e},Tr={...wr,transform:e=>B(0,1,e)},Er={...wr,default:1},Dr=e=>({test:t=>typeof t==`string`&&t.endsWith(e)&&t.split(` `).length===1,parse:parseFloat,transform:t=>`${t}${e}`}),Or=Dr(`deg`),V=Dr(`%`),H=Dr(`px`),kr=Dr(`vh`),Ar=Dr(`vw`),jr={...V,parse:e=>V.parse(e)/100,transform:e=>V.transform(e*100)},Mr={borderWidth:H,borderTopWidth:H,borderRightWidth:H,borderBottomWidth:H,borderLeftWidth:H,borderRadius:H,radius:H,borderTopLeftRadius:H,borderTopRightRadius:H,borderBottomRightRadius:H,borderBottomLeftRadius:H,width:H,maxWidth:H,height:H,maxHeight:H,top:H,right:H,bottom:H,left:H,padding:H,paddingTop:H,paddingRight:H,paddingBottom:H,paddingLeft:H,margin:H,marginTop:H,marginRight:H,marginBottom:H,marginLeft:H,backgroundPositionX:H,backgroundPositionY:H},Nr={rotate:Or,rotateX:Or,rotateY:Or,rotateZ:Or,scale:Er,scaleX:Er,scaleY:Er,scaleZ:Er,skew:Or,skewX:Or,skewY:Or,distance:H,translateX:H,translateY:H,translateZ:H,x:H,y:H,z:H,perspective:H,transformPerspective:H,opacity:Tr,originX:jr,originY:jr,originZ:H},Pr={...wr,transform:Math.round},Fr={...Mr,...Nr,zIndex:Pr,size:H,fillOpacity:Tr,strokeOpacity:Tr,numOctaves:Pr},Ir={x:`translateX`,y:`translateY`,z:`translateZ`,transformPerspective:`perspective`},Lr=gr.length;function Rr(e,t,n){let r=``,i=!0;for(let a=0;a<Lr;a++){let o=gr[a],s=e[o];if(s===void 0)continue;let c=!0;if(c=typeof s==`number`?s===+!!o.startsWith(`scale`):parseFloat(s)===0,!c||n){let e=Cr(s,Fr[o]);if(!c){i=!1;let t=Ir[o]||o;r+=`${t}(${e}) `}n&&(t[o]=e)}}return r=r.trim(),n?r=n(t,i?``:r):i&&(r=`none`),r}function zr(e,t,n){let{style:r,vars:i,transformOrigin:a}=e,o=!1,s=!1;for(let e in t){let n=t[e];if(_r.has(e)){o=!0;continue}else if(yr(e)){i[e]=n;continue}else{let t=Cr(n,Fr[e]);e.startsWith(`origin`)?(s=!0,a[e]=t):r[e]=t}}if(t.transform||(o||n?r.transform=Rr(t,e.transform,n):r.transform&&=`none`),s){let{originX:e=`50%`,originY:t=`50%`,originZ:n=0}=a;r.transformOrigin=`${e} ${t} ${n}`}}var Br={offset:`stroke-dashoffset`,array:`stroke-dasharray`},Vr={offset:`strokeDashoffset`,array:`strokeDasharray`};function Hr(e,t,n=1,r=0,i=!0){e.pathLength=1;let a=i?Br:Vr;e[a.offset]=H.transform(-r);let o=H.transform(t),s=H.transform(n);e[a.array]=`${o} ${s}`}function Ur(e,t,n){return typeof e==`string`?e:H.transform(t+n*e)}function Wr(e,t,n){return`${Ur(t,e.x,e.width)} ${Ur(n,e.y,e.height)}`}function Gr(e,{attrX:t,attrY:n,attrScale:r,originX:i,originY:a,pathLength:o,pathSpacing:s=1,pathOffset:c=0,...l},u,d){if(zr(e,l,d),u){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};let{attrs:f,style:p,dimensions:m}=e;f.transform&&(m&&(p.transform=f.transform),delete f.transform),m&&(i!==void 0||a!==void 0||p.transform)&&(p.transformOrigin=Wr(m,i===void 0?.5:i,a===void 0?.5:a)),t!==void 0&&(f.x=t),n!==void 0&&(f.y=n),r!==void 0&&(f.scale=r),o!==void 0&&Hr(f,o,s,c,!1)}var Kr=()=>({style:{},transform:{},transformOrigin:{},vars:{}}),qr=()=>({...Kr(),attrs:{}}),Jr=e=>typeof e==`string`&&e.toLowerCase()===`svg`;function Yr(e,{style:t,vars:n},r,i){Object.assign(e.style,t,i&&i.getProjectionStyles(r));for(let t in n)e.style.setProperty(t,n[t])}var Xr=new Set([`baseFrequency`,`diffuseConstant`,`kernelMatrix`,`kernelUnitLength`,`keySplines`,`keyTimes`,`limitingConeAngle`,`markerHeight`,`markerWidth`,`numOctaves`,`targetX`,`targetY`,`surfaceScale`,`specularConstant`,`specularExponent`,`stdDeviation`,`tableValues`,`viewBox`,`gradientTransform`,`pathLength`,`startOffset`,`textLength`,`lengthAdjust`]);function Zr(e,t,n,r){Yr(e,t,void 0,r);for(let n in t.attrs)e.setAttribute(Xr.has(n)?n:qn(n),t.attrs[n])}var Qr={};function $r(e){Object.assign(Qr,e)}function ei(e,{layout:t,layoutId:n}){return _r.has(e)||e.startsWith(`origin`)||(t||n!==void 0)&&(!!Qr[e]||e===`opacity`)}function ti(e,t,n){let{style:r}=e,i={};for(let a in r)(z(r[a])||t.style&&z(t.style[a])||ei(a,e)||n?.getValue(a)?.liveStyle!==void 0)&&(i[a]=r[a]);return i}function ni(e,t,n){let r=ti(e,t,n);for(let n in e)if(z(e[n])||z(t[n])){let t=gr.indexOf(n)===-1?n:`attr`+n.charAt(0).toUpperCase()+n.substring(1);r[t]=e[n]}return r}function ri(e,t){try{t.dimensions=typeof e.getBBox==`function`?e.getBBox():e.getBoundingClientRect()}catch{t.dimensions={x:0,y:0,width:0,height:0}}}var ii=[`x`,`y`,`width`,`height`,`cx`,`cy`,`r`],ai={useVisualState:mr({scrapeMotionValuesFromProps:ni,createRenderState:qr,onUpdate:({props:e,prevProps:t,current:n,renderState:r,latestValues:i})=>{if(!n)return;let a=!!e.drag;if(!a){for(let e in i)if(_r.has(e)){a=!0;break}}if(!a)return;let o=!t;if(t)for(let n=0;n<ii.length;n++){let r=ii[n];e[r]!==t[r]&&(o=!0)}o&&L.read(()=>{ri(n,r),L.render(()=>{Gr(r,i,Jr(n.tagName),e.transformTemplate),Zr(n,r)})})}})},oi={useVisualState:mr({scrapeMotionValuesFromProps:ti,createRenderState:Kr})};function si(e,t,n){for(let r in t)!z(t[r])&&!ei(r,n)&&(e[r]=t[r])}function ci({transformTemplate:e},t){return N(()=>{let n=Kr();return zr(n,t,e),Object.assign({},n.vars,n.style)},[t])}function li(e,t){let n=e.style||{},r={};return si(r,n,e),Object.assign(r,ci(e,t)),r}function ui(e,t){let n={},r=li(e,t);return e.drag&&e.dragListener!==!1&&(n.draggable=!1,r.userSelect=r.WebkitUserSelect=r.WebkitTouchCallout=`none`,r.touchAction=e.drag===!0?`none`:`pan-${e.drag===`x`?`y`:`x`}`),e.tabIndex===void 0&&(e.onTap||e.onTapStart||e.whileTap)&&(n.tabIndex=0),n.style=r,n}function di(e,t,n,r){let i=N(()=>{let n=qr();return Gr(n,t,Jr(r),e.transformTemplate),{...n.attrs,style:{...n.style}}},[t]);if(e.style){let t={};si(t,e.style,e),i.style={...t,...i.style}}return i}function fi(e=!1){return(t,n,r,{latestValues:i},a)=>{let o=(or(t)?di:ui)(n,i,a,t),s=Mn(n,typeof t==`string`,e),c=t===w?{}:{...s,...o,ref:r},{children:l}=n,u=N(()=>z(l)?l.get():l,[l]);return x(t,{...c,children:u})}}function pi(e,t){return function(n,{forwardMotionProps:r}={forwardMotionProps:!1}){return tr({...or(n)?ai:oi,preloadedFeatures:e,useRender:fi(r),createVisualElement:t,Component:n})}}function mi(e,t){if(!Array.isArray(t))return!1;let n=t.length;if(n!==e.length)return!1;for(let r=0;r<n;r++)if(t[r]!==e[r])return!1;return!0}function hi(e,t,n){let r=e.getProps();return cr(r,t,n===void 0?r.custom:n,e)}function gi(e,t){return e?e[t]||e.default||e:void 0}var _i=new Set([`width`,`height`,`top`,`left`,`right`,`bottom`,...gr]),vi;function yi(){vi=void 0}var U={now:()=>(vi===void 0&&U.set(R.isProcessing||mn.useManualTiming?R.timestamp:performance.now()),vi),set:e=>{vi=e,queueMicrotask(yi)}};function bi(e,t){e.indexOf(t)===-1&&e.push(t)}function xi(e,t){let n=e.indexOf(t);n>-1&&e.splice(n,1)}var Si=class{constructor(){this.subscriptions=[]}add(e){return bi(this.subscriptions,e),()=>xi(this.subscriptions,e)}notify(e,t,n){let r=this.subscriptions.length;if(r)if(r===1)this.subscriptions[0](e,t,n);else for(let i=0;i<r;i++){let r=this.subscriptions[i];r&&r(e,t,n)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}};function Ci(e,t){return t?1e3/t*e:0}var wi=30,Ti=e=>!isNaN(parseFloat(e)),Ei={current:void 0},Di=class{constructor(e,t={}){this.version=`11.18.2`,this.canTrackVelocity=null,this.events={},this.updateAndNotify=(e,t=!0)=>{let n=U.now();this.updatedAt!==n&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(e),this.current!==this.prev&&this.events.change&&this.events.change.notify(this.current),t&&this.events.renderRequest&&this.events.renderRequest.notify(this.current)},this.hasAnimated=!1,this.setCurrent(e),this.owner=t.owner}setCurrent(e){this.current=e,this.updatedAt=U.now(),this.canTrackVelocity===null&&e!==void 0&&(this.canTrackVelocity=Ti(this.current))}setPrevFrameValue(e=this.current){this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt}onChange(e){return this.on(`change`,e)}on(e,t){this.events[e]||(this.events[e]=new Si);let n=this.events[e].add(t);return e===`change`?()=>{n(),L.read(()=>{this.events.change.getSize()||this.stop()})}:n}clearListeners(){for(let e in this.events)this.events[e].clear()}attach(e,t){this.passiveEffect=e,this.stopPassiveEffect=t}set(e,t=!0){!t||!this.passiveEffect?this.updateAndNotify(e,t):this.passiveEffect(e,this.updateAndNotify)}setWithVelocity(e,t,n){this.set(t),this.prev=void 0,this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt-n}jump(e,t=!0){this.updateAndNotify(e),this.prev=e,this.prevUpdatedAt=this.prevFrameValue=void 0,t&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}get(){return Ei.current&&Ei.current.push(this),this.current}getPrevious(){return this.prev}getVelocity(){let e=U.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||e-this.updatedAt>wi)return 0;let t=Math.min(this.updatedAt-this.prevUpdatedAt,wi);return Ci(parseFloat(this.current)-parseFloat(this.prevFrameValue),t)}start(e){return this.stop(),new Promise(t=>{this.hasAnimated=!0,this.animation=e(t),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}};function Oi(e,t){return new Di(e,t)}function ki(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,Oi(n))}function Ai(e,t){let{transitionEnd:n={},transition:r={},...i}=hi(e,t)||{};i={...i,...n};for(let t in i)ki(e,t,dr(i[t]))}function ji(e){return!!(z(e)&&e.add)}function Mi(e,t){let n=e.getValue(`willChange`);if(ji(n))return n.add(t)}function Ni(e){return e.props[Jn]}function Pi(e){let t;return()=>(t===void 0&&(t=e()),t)}var Fi=Pi(()=>window.ScrollTimeline!==void 0),Ii=class{constructor(e){this.stop=()=>this.runAll(`stop`),this.animations=e.filter(Boolean)}get finished(){return Promise.all(this.animations.map(e=>`finished`in e?e.finished:e))}getAll(e){return this.animations[0][e]}setAll(e,t){for(let n=0;n<this.animations.length;n++)this.animations[n][e]=t}attachTimeline(e,t){let n=this.animations.map(n=>{if(Fi()&&n.attachTimeline)return n.attachTimeline(e);if(typeof t==`function`)return t(n)});return()=>{n.forEach((e,t)=>{e&&e(),this.animations[t].stop()})}}get time(){return this.getAll(`time`)}set time(e){this.setAll(`time`,e)}get speed(){return this.getAll(`speed`)}set speed(e){this.setAll(`speed`,e)}get startTime(){return this.getAll(`startTime`)}get duration(){let e=0;for(let t=0;t<this.animations.length;t++)e=Math.max(e,this.animations[t].duration);return e}runAll(e){this.animations.forEach(t=>t[e]())}flatten(){this.runAll(`flatten`)}play(){this.runAll(`play`)}pause(){this.runAll(`pause`)}cancel(){this.runAll(`cancel`)}complete(){this.runAll(`complete`)}},Li=class extends Ii{then(e,t){return Promise.all(this.animations).then(e).catch(t)}},W=e=>e*1e3,G=e=>e/1e3,Ri={current:!1};function zi(e){return typeof e==`function`}function Bi(e,t){e.timeline=t,e.onfinish=null}var Vi=e=>Array.isArray(e)&&typeof e[0]==`number`,Hi={linearEasing:void 0};function Ui(e,t){let n=Pi(e);return()=>Hi[t]??n()}var Wi=Ui(()=>{try{document.createElement(`div`).animate({opacity:0},{easing:`linear(0, 1)`})}catch{return!1}return!0},`linearEasing`),Gi=(e,t,n)=>{let r=t-e;return r===0?1:(n-e)/r},Ki=(e,t,n=10)=>{let r=``,i=Math.max(Math.round(t/n),2);for(let t=0;t<i;t++)r+=e(Gi(0,i-1,t))+`, `;return`linear(${r.substring(0,r.length-2)})`};function qi(e){return!!(typeof e==`function`&&Wi()||!e||typeof e==`string`&&(e in Yi||Wi())||Vi(e)||Array.isArray(e)&&e.every(qi))}var Ji=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,Yi={linear:`linear`,ease:`ease`,easeIn:`ease-in`,easeOut:`ease-out`,easeInOut:`ease-in-out`,circIn:Ji([0,.65,.55,1]),circOut:Ji([.55,0,1,.45]),backIn:Ji([.31,.01,.66,-.59]),backOut:Ji([.33,1.53,.69,.99])};function Xi(e,t){if(e)return typeof e==`function`&&Wi()?Ki(e,t):Vi(e)?Ji(e):Array.isArray(e)?e.map(e=>Xi(e,t)||Yi.easeOut):Yi[e]}var Zi=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,Qi=1e-7,$i=12;function ea(e,t,n,r,i){let a,o,s=0;do o=t+(n-t)/2,a=Zi(o,r,i)-e,a>0?n=o:t=o;while(Math.abs(a)>Qi&&++s<$i);return o}function ta(e,t,n,r){if(e===t&&n===r)return I;let i=t=>ea(t,0,1,e,n);return e=>e===0||e===1?e:Zi(i(e),t,r)}var na=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,ra=e=>t=>1-e(1-t),ia=ta(.33,1.53,.69,.99),aa=ra(ia),oa=na(aa),sa=e=>(e*=2)<1?.5*aa(e):.5*(2-2**(-10*(e-1))),ca=e=>1-Math.sin(Math.acos(e)),la=ra(ca),ua=na(ca),da=e=>/^0[^.\s]+$/u.test(e);function fa(e){return typeof e==`number`?e===0:e===null?!0:e===`none`||e===`0`||da(e)}var pa=e=>Math.round(e*1e5)/1e5,ma=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function ha(e){return e==null}var ga=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,_a=(e,t)=>n=>!!(typeof n==`string`&&ga.test(n)&&n.startsWith(e)||t&&!ha(n)&&Object.prototype.hasOwnProperty.call(n,t)),va=(e,t,n)=>r=>{if(typeof r!=`string`)return r;let[i,a,o,s]=r.match(ma);return{[e]:parseFloat(i),[t]:parseFloat(a),[n]:parseFloat(o),alpha:s===void 0?1:parseFloat(s)}},ya=e=>B(0,255,e),ba={...wr,transform:e=>Math.round(ya(e))},xa={test:_a(`rgb`,`red`),parse:va(`red`,`green`,`blue`),transform:({red:e,green:t,blue:n,alpha:r=1})=>`rgba(`+ba.transform(e)+`, `+ba.transform(t)+`, `+ba.transform(n)+`, `+pa(Tr.transform(r))+`)`};function Sa(e){let t=``,n=``,r=``,i=``;return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),r=e.substring(5,7),i=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),r=e.substring(3,4),i=e.substring(4,5),t+=t,n+=n,r+=r,i+=i),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:i?parseInt(i,16)/255:1}}var Ca={test:_a(`#`),parse:Sa,transform:xa.transform},wa={test:_a(`hsl`,`hue`),parse:va(`hue`,`saturation`,`lightness`),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>`hsla(`+Math.round(e)+`, `+V.transform(pa(t))+`, `+V.transform(pa(n))+`, `+pa(Tr.transform(r))+`)`},K={test:e=>xa.test(e)||Ca.test(e)||wa.test(e),parse:e=>xa.test(e)?xa.parse(e):wa.test(e)?wa.parse(e):Ca.parse(e),transform:e=>typeof e==`string`?e:e.hasOwnProperty(`red`)?xa.transform(e):wa.transform(e)},Ta=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function Ea(e){return isNaN(e)&&typeof e==`string`&&(e.match(ma)?.length||0)+(e.match(Ta)?.length||0)>0}var Da=`number`,Oa=`color`,ka=`var`,Aa=`var(`,ja="${}",Ma=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function Na(e){let t=e.toString(),n=[],r={color:[],number:[],var:[]},i=[],a=0;return{values:n,split:t.replace(Ma,e=>(K.test(e)?(r.color.push(a),i.push(Oa),n.push(K.parse(e))):e.startsWith(Aa)?(r.var.push(a),i.push(ka),n.push(e)):(r.number.push(a),i.push(Da),n.push(parseFloat(e))),++a,ja)).split(ja),indexes:r,types:i}}function Pa(e){return Na(e).values}function Fa(e){let{split:t,types:n}=Na(e),r=t.length;return e=>{let i=``;for(let a=0;a<r;a++)if(i+=t[a],e[a]!==void 0){let t=n[a];t===Da?i+=pa(e[a]):t===Oa?i+=K.transform(e[a]):i+=e[a]}return i}}var Ia=e=>typeof e==`number`?0:e;function La(e){let t=Pa(e);return Fa(e)(t.map(Ia))}var Ra={test:Ea,parse:Pa,createTransformer:Fa,getAnimatableNone:La},za=new Set([`brightness`,`contrast`,`saturate`,`opacity`]);function Ba(e){let[t,n]=e.slice(0,-1).split(`(`);if(t===`drop-shadow`)return e;let[r]=n.match(ma)||[];if(!r)return e;let i=n.replace(r,``),a=+!!za.has(t);return r!==n&&(a*=100),t+`(`+a+i+`)`}var Va=/\b([a-z-]*)\(.*?\)/gu,Ha={...Ra,getAnimatableNone:e=>{let t=e.match(Va);return t?t.map(Ba).join(` `):e}},Ua={...Fr,color:K,backgroundColor:K,outlineColor:K,fill:K,stroke:K,borderColor:K,borderTopColor:K,borderRightColor:K,borderBottomColor:K,borderLeftColor:K,filter:Ha,WebkitFilter:Ha},Wa=e=>Ua[e];function Ga(e,t){let n=Wa(e);return n!==Ha&&(n=Ra),n.getAnimatableNone?n.getAnimatableNone(t):void 0}var Ka=new Set([`auto`,`none`,`0`]);function qa(e,t,n){let r=0,i;for(;r<e.length&&!i;){let t=e[r];typeof t==`string`&&!Ka.has(t)&&Na(t).values.length&&(i=e[r]),r++}if(i&&n)for(let r of t)e[r]=Ga(n,i)}var Ja=e=>e===wr||e===H,Ya=(e,t)=>parseFloat(e.split(`, `)[t]),Xa=(e,t)=>(n,{transform:r})=>{if(r===`none`||!r)return 0;let i=r.match(/^matrix3d\((.+)\)$/u);if(i)return Ya(i[1],t);{let t=r.match(/^matrix\((.+)\)$/u);return t?Ya(t[1],e):0}},Za=new Set([`x`,`y`,`z`]),Qa=gr.filter(e=>!Za.has(e));function $a(e){let t=[];return Qa.forEach(n=>{let r=e.getValue(n);r!==void 0&&(t.push([n,r.get()]),r.set(+!!n.startsWith(`scale`)))}),t}var eo={width:({x:e},{paddingLeft:t=`0`,paddingRight:n=`0`})=>e.max-e.min-parseFloat(t)-parseFloat(n),height:({y:e},{paddingTop:t=`0`,paddingBottom:n=`0`})=>e.max-e.min-parseFloat(t)-parseFloat(n),top:(e,{top:t})=>parseFloat(t),left:(e,{left:t})=>parseFloat(t),bottom:({y:e},{top:t})=>parseFloat(t)+(e.max-e.min),right:({x:e},{left:t})=>parseFloat(t)+(e.max-e.min),x:Xa(4,13),y:Xa(5,14)};eo.translateX=eo.x,eo.translateY=eo.y;var to=new Set,no=!1,ro=!1;function io(){if(ro){let e=Array.from(to).filter(e=>e.needsMeasurement),t=new Set(e.map(e=>e.element)),n=new Map;t.forEach(e=>{let t=$a(e);t.length&&(n.set(e,t),e.render())}),e.forEach(e=>e.measureInitialState()),t.forEach(e=>{e.render();let t=n.get(e);t&&t.forEach(([t,n])=>{var r;(r=e.getValue(t))==null||r.set(n)})}),e.forEach(e=>e.measureEndState()),e.forEach(e=>{e.suspendedScrollY!==void 0&&window.scrollTo(0,e.suspendedScrollY)})}ro=!1,no=!1,to.forEach(e=>e.complete()),to.clear()}function ao(){to.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(ro=!0)})}function oo(){ao(),io()}var so=class{constructor(e,t,n,r,i,a=!1){this.isComplete=!1,this.isAsync=!1,this.needsMeasurement=!1,this.isScheduled=!1,this.unresolvedKeyframes=[...e],this.onComplete=t,this.name=n,this.motionValue=r,this.element=i,this.isAsync=a}scheduleResolve(){this.isScheduled=!0,this.isAsync?(to.add(this),no||(no=!0,L.read(ao),L.resolveKeyframes(io))):(this.readKeyframes(),this.complete())}readKeyframes(){let{unresolvedKeyframes:e,name:t,element:n,motionValue:r}=this;for(let i=0;i<e.length;i++)if(e[i]===null)if(i===0){let i=r?.get(),a=e[e.length-1];if(i!==void 0)e[0]=i;else if(n&&t){let r=n.readValue(t,a);r!=null&&(e[0]=r)}e[0]===void 0&&(e[0]=a),r&&i===void 0&&r.set(e[0])}else e[i]=e[i-1]}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(){this.isComplete=!0,this.onComplete(this.unresolvedKeyframes,this.finalKeyframe),to.delete(this)}cancel(){this.isComplete||(this.isScheduled=!1,to.delete(this))}resume(){this.isComplete||this.scheduleResolve()}},co=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e),lo=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function uo(e){let t=lo.exec(e);if(!t)return[,];let[,n,r,i]=t;return[`--${n??r}`,i]}var fo=4;function po(e,t,n=1){pn(n<=fo,`Max CSS variable fallback depth detected in property "${e}". This may indicate a circular fallback dependency.`);let[r,i]=uo(e);if(!r)return;let a=window.getComputedStyle(t).getPropertyValue(r);if(a){let e=a.trim();return co(e)?parseFloat(e):e}return xr(i)?po(i,t,n+1):i}var mo=e=>t=>t.test(e),ho=[wr,H,V,Or,Ar,kr,{test:e=>e===`auto`,parse:e=>e}],go=e=>ho.find(mo(e)),_o=class extends so{constructor(e,t,n,r,i){super(e,t,n,r,i,!0)}readKeyframes(){let{unresolvedKeyframes:e,element:t,name:n}=this;if(!t||!t.current)return;super.readKeyframes();for(let n=0;n<e.length;n++){let r=e[n];if(typeof r==`string`&&(r=r.trim(),xr(r))){let i=po(r,t.current);i!==void 0&&(e[n]=i),n===e.length-1&&(this.finalKeyframe=r)}}if(this.resolveNoneKeyframes(),!_i.has(n)||e.length!==2)return;let[r,i]=e,a=go(r),o=go(i);if(a!==o)if(Ja(a)&&Ja(o))for(let t=0;t<e.length;t++){let n=e[t];typeof n==`string`&&(e[t]=parseFloat(n))}else this.needsMeasurement=!0}resolveNoneKeyframes(){let{unresolvedKeyframes:e,name:t}=this,n=[];for(let t=0;t<e.length;t++)fa(e[t])&&n.push(t);n.length&&qa(e,n,t)}measureInitialState(){let{element:e,unresolvedKeyframes:t,name:n}=this;if(!e||!e.current)return;n===`height`&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=eo[n](e.measureViewportBox(),window.getComputedStyle(e.current)),t[0]=this.measuredOrigin;let r=t[t.length-1];r!==void 0&&e.getValue(n,r).jump(r,!1)}measureEndState(){let{element:e,name:t,unresolvedKeyframes:n}=this;if(!e||!e.current)return;let r=e.getValue(t);r&&r.jump(this.measuredOrigin,!1);let i=n.length-1,a=n[i];n[i]=eo[t](e.measureViewportBox(),window.getComputedStyle(e.current)),a!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=a),this.removedTransforms?.length&&this.removedTransforms.forEach(([t,n])=>{e.getValue(t).set(n)}),this.resolveNoneKeyframes()}},vo=(e,t)=>t===`zIndex`?!1:!!(typeof e==`number`||Array.isArray(e)||typeof e==`string`&&(Ra.test(e)||e===`0`)&&!e.startsWith(`url(`));function yo(e){let t=e[0];if(e.length===1)return!0;for(let n=0;n<e.length;n++)if(e[n]!==t)return!0}function bo(e,t,n,r){let i=e[0];if(i===null)return!1;if(t===`display`||t===`visibility`)return!0;let a=e[e.length-1],o=vo(i,t),s=vo(a,t);return fn(o===s,`You are trying to animate ${t} from "${i}" to "${a}". ${i} is not an animatable value - to enable this animation set ${i} to a value animatable to ${a} via the \`style\` property.`),!o||!s?!1:yo(e)||(n===`spring`||zi(n))&&r}var xo=e=>e!==null;function So(e,{repeat:t,repeatType:n=`loop`},r){let i=e.filter(xo),a=t&&n!==`loop`&&t%2==1?0:i.length-1;return!a||r===void 0?i[a]:r}var Co=40,wo=class{constructor({autoplay:e=!0,delay:t=0,type:n=`keyframes`,repeat:r=0,repeatDelay:i=0,repeatType:a=`loop`,...o}){this.isStopped=!1,this.hasAttemptedResolve=!1,this.createdAt=U.now(),this.options={autoplay:e,delay:t,type:n,repeat:r,repeatDelay:i,repeatType:a,...o},this.updateFinishedPromise()}calcStartTime(){return this.resolvedAt&&this.resolvedAt-this.createdAt>Co?this.resolvedAt:this.createdAt}get resolved(){return!this._resolved&&!this.hasAttemptedResolve&&oo(),this._resolved}onKeyframesResolved(e,t){this.resolvedAt=U.now(),this.hasAttemptedResolve=!0;let{name:n,type:r,velocity:i,delay:a,onComplete:o,onUpdate:s,isGenerator:c}=this.options;if(!c&&!bo(e,n,r,i))if(Ri.current||!a){s&&s(So(e,this.options,t)),o&&o(),this.resolveFinishedPromise();return}else this.options.duration=0;let l=this.initPlayback(e,t);l!==!1&&(this._resolved={keyframes:e,finalKeyframe:t,...l},this.onPostResolved())}onPostResolved(){}then(e,t){return this.currentFinishedPromise.then(e,t)}flatten(){this.options.type=`keyframes`,this.options.ease=`linear`}updateFinishedPromise(){this.currentFinishedPromise=new Promise(e=>{this.resolveFinishedPromise=e})}},To=2e4;function Eo(e){let t=0,n=e.next(t);for(;!n.done&&t<2e4;)t+=50,n=e.next(t);return t>=2e4?1/0:t}var q=(e,t,n)=>e+(t-e)*n;function Do(e,t,n){return n<0&&(n+=1),n>1&&--n,n<1/6?e+(t-e)*6*n:n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function Oo({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,t/=100,n/=100;let i=0,a=0,o=0;if(!t)i=a=o=n;else{let r=n<.5?n*(1+t):n+t-n*t,s=2*n-r;i=Do(s,r,e+1/3),a=Do(s,r,e),o=Do(s,r,e-1/3)}return{red:Math.round(i*255),green:Math.round(a*255),blue:Math.round(o*255),alpha:r}}function ko(e,t){return n=>n>0?t:e}var Ao=(e,t,n)=>{let r=e*e,i=n*(t*t-r)+r;return i<0?0:Math.sqrt(i)},jo=[Ca,xa,wa],Mo=e=>jo.find(t=>t.test(e));function No(e){let t=Mo(e);if(fn(!!t,`'${e}' is not an animatable color. Use the equivalent color code instead.`),!t)return!1;let n=t.parse(e);return t===wa&&(n=Oo(n)),n}var Po=(e,t)=>{let n=No(e),r=No(t);if(!n||!r)return ko(e,t);let i={...n};return e=>(i.red=Ao(n.red,r.red,e),i.green=Ao(n.green,r.green,e),i.blue=Ao(n.blue,r.blue,e),i.alpha=q(n.alpha,r.alpha,e),xa.transform(i))},Fo=(e,t)=>n=>t(e(n)),Io=(...e)=>e.reduce(Fo),Lo=new Set([`none`,`hidden`]);function Ro(e,t){return Lo.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function zo(e,t){return n=>q(e,t,n)}function Bo(e){return typeof e==`number`?zo:typeof e==`string`?xr(e)?ko:K.test(e)?Po:Wo:Array.isArray(e)?Vo:typeof e==`object`?K.test(e)?Po:Ho:ko}function Vo(e,t){let n=[...e],r=n.length,i=e.map((e,n)=>Bo(e)(e,t[n]));return e=>{for(let t=0;t<r;t++)n[t]=i[t](e);return n}}function Ho(e,t){let n={...e,...t},r={};for(let i in n)e[i]!==void 0&&t[i]!==void 0&&(r[i]=Bo(e[i])(e[i],t[i]));return e=>{for(let t in r)n[t]=r[t](e);return n}}function Uo(e,t){let n=[],r={color:0,var:0,number:0};for(let i=0;i<t.values.length;i++){let a=t.types[i],o=e.indexes[a][r[a]];n[i]=e.values[o]??0,r[a]++}return n}var Wo=(e,t)=>{let n=Ra.createTransformer(t),r=Na(e),i=Na(t);return r.indexes.var.length===i.indexes.var.length&&r.indexes.color.length===i.indexes.color.length&&r.indexes.number.length>=i.indexes.number.length?Lo.has(e)&&!i.values.length||Lo.has(t)&&!r.values.length?Ro(e,t):Io(Vo(Uo(r,i),i.values),n):(fn(!0,`Complex values '${e}' and '${t}' too different to mix. Ensure all colors are of the same type, and that each contains the same quantity of number and color values. Falling back to instant transition.`),ko(e,t))};function Go(e,t,n){return typeof e==`number`&&typeof t==`number`&&typeof n==`number`?q(e,t,n):Bo(e)(e,t)}var Ko=5;function qo(e,t,n){let r=Math.max(t-Ko,0);return Ci(n-e(r),t-r)}var J={stiffness:100,damping:10,mass:1,velocity:0,duration:800,bounce:.3,visualDuration:.3,restSpeed:{granular:.01,default:2},restDelta:{granular:.005,default:.5},minDuration:.01,maxDuration:10,minDamping:.05,maxDamping:1},Jo=.001;function Yo({duration:e=J.duration,bounce:t=J.bounce,velocity:n=J.velocity,mass:r=J.mass}){let i,a;fn(e<=W(J.maxDuration),`Spring duration must be 10 seconds or less`);let o=1-t;o=B(J.minDamping,J.maxDamping,o),e=B(J.minDuration,J.maxDuration,G(e)),o<1?(i=t=>{let r=t*o,i=r*e,a=r-n,s=Qo(t,o),c=Math.exp(-i);return Jo-a/s*c},a=t=>{let r=t*o*e,a=r*n+n,s=o**2*t**2*e,c=Math.exp(-r),l=Qo(t**2,o);return(-i(t)+Jo>0?-1:1)*((a-s)*c)/l}):(i=t=>{let r=Math.exp(-t*e),i=(t-n)*e+1;return-Jo+r*i},a=t=>Math.exp(-t*e)*((n-t)*(e*e)));let s=5/e,c=Zo(i,a,s);if(e=W(e),isNaN(c))return{stiffness:J.stiffness,damping:J.damping,duration:e};{let t=c**2*r;return{stiffness:t,damping:o*2*Math.sqrt(r*t),duration:e}}}var Xo=12;function Zo(e,t,n){let r=n;for(let n=1;n<Xo;n++)r-=e(r)/t(r);return r}function Qo(e,t){return e*Math.sqrt(1-t*t)}var $o=[`duration`,`bounce`],es=[`stiffness`,`damping`,`mass`];function ts(e,t){return t.some(t=>e[t]!==void 0)}function ns(e){let t={velocity:J.velocity,stiffness:J.stiffness,damping:J.damping,mass:J.mass,isResolvedFromDuration:!1,...e};if(!ts(e,es)&&ts(e,$o))if(e.visualDuration){let n=e.visualDuration,r=2*Math.PI/(n*1.2),i=r*r,a=2*B(.05,1,1-(e.bounce||0))*Math.sqrt(i);t={...t,mass:J.mass,stiffness:i,damping:a}}else{let n=Yo(e);t={...t,...n,mass:J.mass},t.isResolvedFromDuration=!0}return t}function rs(e=J.visualDuration,t=J.bounce){let n=typeof e==`object`?e:{visualDuration:e,keyframes:[0,1],bounce:t},{restSpeed:r,restDelta:i}=n,a=n.keyframes[0],o=n.keyframes[n.keyframes.length-1],s={done:!1,value:a},{stiffness:c,damping:l,mass:u,duration:d,velocity:f,isResolvedFromDuration:p}=ns({...n,velocity:-G(n.velocity||0)}),m=f||0,h=l/(2*Math.sqrt(c*u)),g=o-a,_=G(Math.sqrt(c/u)),v=Math.abs(g)<5;r||=v?J.restSpeed.granular:J.restSpeed.default,i||=v?J.restDelta.granular:J.restDelta.default;let y;if(h<1){let e=Qo(_,h);y=t=>o-Math.exp(-h*_*t)*((m+h*_*g)/e*Math.sin(e*t)+g*Math.cos(e*t))}else if(h===1)y=e=>o-Math.exp(-_*e)*(g+(m+_*g)*e);else{let e=_*Math.sqrt(h*h-1);y=t=>{let n=Math.exp(-h*_*t),r=Math.min(e*t,300);return o-n*((m+h*_*g)*Math.sinh(r)+e*g*Math.cosh(r))/e}}let b={calculatedDuration:p&&d||null,next:e=>{let t=y(e);if(p)s.done=e>=d;else{let n=0;h<1&&(n=e===0?W(m):qo(y,e,t));let a=Math.abs(n)<=r,c=Math.abs(o-t)<=i;s.done=a&&c}return s.value=s.done?o:t,s},toString:()=>{let e=Math.min(Eo(b),To),t=Ki(t=>b.next(e*t).value,e,30);return e+`ms `+t}};return b}function is({keyframes:e,velocity:t=0,power:n=.8,timeConstant:r=325,bounceDamping:i=10,bounceStiffness:a=500,modifyTarget:o,min:s,max:c,restDelta:l=.5,restSpeed:u}){let d=e[0],f={done:!1,value:d},p=e=>s!==void 0&&e<s||c!==void 0&&e>c,m=e=>s===void 0?c:c===void 0||Math.abs(s-e)<Math.abs(c-e)?s:c,h=n*t,g=d+h,_=o===void 0?g:o(g);_!==g&&(h=_-d);let v=e=>-h*Math.exp(-e/r),y=e=>_+v(e),b=e=>{let t=v(e),n=y(e);f.done=Math.abs(t)<=l,f.value=f.done?_:n},x,S,C=e=>{p(f.value)&&(x=e,S=rs({keyframes:[f.value,m(f.value)],velocity:qo(y,e,f.value),damping:i,stiffness:a,restDelta:l,restSpeed:u}))};return C(0),{calculatedDuration:null,next:e=>{let t=!1;return!S&&x===void 0&&(t=!0,b(e),C(e)),x!==void 0&&e>=x?S.next(e-x):(!t&&b(e),f)}}}var as=ta(.42,0,1,1),os=ta(0,0,.58,1),ss=ta(.42,0,.58,1),cs=e=>Array.isArray(e)&&typeof e[0]!=`number`,ls={linear:I,easeIn:as,easeInOut:ss,easeOut:os,circIn:ca,circInOut:ua,circOut:la,backIn:aa,backInOut:oa,backOut:ia,anticipate:sa},us=e=>{if(Vi(e)){pn(e.length===4,`Cubic bezier arrays must contain four numerical values.`);let[t,n,r,i]=e;return ta(t,n,r,i)}else if(typeof e==`string`)return pn(ls[e]!==void 0,`Invalid easing type '${e}'`),ls[e];return e};function ds(e,t,n){let r=[],i=n||Go,a=e.length-1;for(let n=0;n<a;n++){let a=i(e[n],e[n+1]);t&&(a=Io(Array.isArray(t)?t[n]||I:t,a)),r.push(a)}return r}function fs(e,t,{clamp:n=!0,ease:r,mixer:i}={}){let a=e.length;if(pn(a===t.length,`Both input and output ranges must be the same length`),a===1)return()=>t[0];if(a===2&&t[0]===t[1])return()=>t[1];let o=e[0]===e[1];e[0]>e[a-1]&&(e=[...e].reverse(),t=[...t].reverse());let s=ds(t,r,i),c=s.length,l=n=>{if(o&&n<e[0])return t[0];let r=0;if(c>1)for(;r<e.length-2&&!(n<e[r+1]);r++);let i=Gi(e[r],e[r+1],n);return s[r](i)};return n?t=>l(B(e[0],e[a-1],t)):l}function ps(e,t){let n=e[e.length-1];for(let r=1;r<=t;r++){let i=Gi(0,t,r);e.push(q(n,1,i))}}function ms(e){let t=[0];return ps(t,e.length-1),t}function hs(e,t){return e.map(e=>e*t)}function gs(e,t){return e.map(()=>t||ss).splice(0,e.length-1)}function _s({duration:e=300,keyframes:t,times:n,ease:r=`easeInOut`}){let i=cs(r)?r.map(us):us(r),a={done:!1,value:t[0]},o=fs(hs(n&&n.length===t.length?n:ms(t),e),t,{ease:Array.isArray(i)?i:gs(t,i)});return{calculatedDuration:e,next:t=>(a.value=o(t),a.done=t>=e,a)}}var vs=e=>{let t=({timestamp:t})=>e(t);return{start:()=>L.update(t,!0),stop:()=>yn(t),now:()=>R.isProcessing?R.timestamp:U.now()}},ys={decay:is,inertia:is,tween:_s,keyframes:_s,spring:rs},bs=e=>e/100,xs=class extends wo{constructor(e){super(e),this.holdTime=null,this.cancelTime=null,this.currentTime=0,this.playbackSpeed=1,this.pendingPlayState=`running`,this.startTime=null,this.state=`idle`,this.stop=()=>{if(this.resolver.cancel(),this.isStopped=!0,this.state===`idle`)return;this.teardown();let{onStop:e}=this.options;e&&e()};let{name:t,motionValue:n,element:r,keyframes:i}=this.options,a=r?.KeyframeResolver||so,o=(e,t)=>this.onKeyframesResolved(e,t);this.resolver=new a(i,o,t,n,r),this.resolver.scheduleResolve()}flatten(){super.flatten(),this._resolved&&Object.assign(this._resolved,this.initPlayback(this._resolved.keyframes))}initPlayback(e){let{type:t=`keyframes`,repeat:n=0,repeatDelay:r=0,repeatType:i,velocity:a=0}=this.options,o=zi(t)?t:ys[t]||_s,s,c;o!==_s&&typeof e[0]!=`number`&&(s=Io(bs,Go(e[0],e[1])),e=[0,100]);let l=o({...this.options,keyframes:e});i===`mirror`&&(c=o({...this.options,keyframes:[...e].reverse(),velocity:-a})),l.calculatedDuration===null&&(l.calculatedDuration=Eo(l));let{calculatedDuration:u}=l,d=u+r,f=d*(n+1)-r;return{generator:l,mirroredGenerator:c,mapPercentToKeyframes:s,calculatedDuration:u,resolvedDuration:d,totalDuration:f}}onPostResolved(){let{autoplay:e=!0}=this.options;this.play(),this.pendingPlayState===`paused`||!e?this.pause():this.state=this.pendingPlayState}tick(e,t=!1){let{resolved:n}=this;if(!n){let{keyframes:e}=this.options;return{done:!0,value:e[e.length-1]}}let{finalKeyframe:r,generator:i,mirroredGenerator:a,mapPercentToKeyframes:o,keyframes:s,calculatedDuration:c,totalDuration:l,resolvedDuration:u}=n;if(this.startTime===null)return i.next(0);let{delay:d,repeat:f,repeatType:p,repeatDelay:m,onUpdate:h}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,e):this.speed<0&&(this.startTime=Math.min(e-l/this.speed,this.startTime)),t?this.currentTime=e:this.holdTime===null?this.currentTime=Math.round(e-this.startTime)*this.speed:this.currentTime=this.holdTime;let g=this.currentTime-d*(this.speed>=0?1:-1),_=this.speed>=0?g<0:g>l;this.currentTime=Math.max(g,0),this.state===`finished`&&this.holdTime===null&&(this.currentTime=l);let v=this.currentTime,y=i;if(f){let e=Math.min(this.currentTime,l)/u,t=Math.floor(e),n=e%1;!n&&e>=1&&(n=1),n===1&&t--,t=Math.min(t,f+1),t%2&&(p===`reverse`?(n=1-n,m&&(n-=m/u)):p===`mirror`&&(y=a)),v=B(0,1,n)*u}let b=_?{done:!1,value:s[0]}:y.next(v);o&&(b.value=o(b.value));let{done:x}=b;!_&&c!==null&&(x=this.speed>=0?this.currentTime>=l:this.currentTime<=0);let S=this.holdTime===null&&(this.state===`finished`||this.state===`running`&&x);return S&&r!==void 0&&(b.value=So(s,this.options,r)),h&&h(b.value),S&&this.finish(),b}get duration(){let{resolved:e}=this;return e?G(e.calculatedDuration):0}get time(){return G(this.currentTime)}set time(e){e=W(e),this.currentTime=e,this.holdTime!==null||this.speed===0?this.holdTime=e:this.driver&&(this.startTime=this.driver.now()-e/this.speed)}get speed(){return this.playbackSpeed}set speed(e){let t=this.playbackSpeed!==e;this.playbackSpeed=e,t&&(this.time=G(this.currentTime))}play(){if(this.resolver.isScheduled||this.resolver.resume(),!this._resolved){this.pendingPlayState=`running`;return}if(this.isStopped)return;let{driver:e=vs,onPlay:t,startTime:n}=this.options;this.driver||=e(e=>this.tick(e)),t&&t();let r=this.driver.now();this.holdTime===null?this.startTime?this.state===`finished`&&(this.startTime=r):this.startTime=n??this.calcStartTime():this.startTime=r-this.holdTime,this.state===`finished`&&this.updateFinishedPromise(),this.cancelTime=this.startTime,this.holdTime=null,this.state=`running`,this.driver.start()}pause(){if(!this._resolved){this.pendingPlayState=`paused`;return}this.state=`paused`,this.holdTime=this.currentTime??0}complete(){this.state!==`running`&&this.play(),this.pendingPlayState=this.state=`finished`,this.holdTime=null}finish(){this.teardown(),this.state=`finished`;let{onComplete:e}=this.options;e&&e()}cancel(){this.cancelTime!==null&&this.tick(this.cancelTime),this.teardown(),this.updateFinishedPromise()}teardown(){this.state=`idle`,this.stopDriver(),this.resolveFinishedPromise(),this.updateFinishedPromise(),this.startTime=this.cancelTime=null,this.resolver.cancel()}stopDriver(){this.driver&&=(this.driver.stop(),void 0)}sample(e){return this.startTime=0,this.tick(e,!0)}},Ss=new Set([`opacity`,`clipPath`,`filter`,`transform`]);function Cs(e,t,n,{delay:r=0,duration:i=300,repeat:a=0,repeatType:o=`loop`,ease:s=`easeInOut`,times:c}={}){let l={[t]:n};c&&(l.offset=c);let u=Xi(s,i);return Array.isArray(u)&&(l.easing=u),e.animate(l,{delay:r,duration:i,easing:Array.isArray(u)?`linear`:u,fill:`both`,iterations:a+1,direction:o===`reverse`?`alternate`:`normal`})}var ws=Pi(()=>Object.hasOwnProperty.call(Element.prototype,`animate`)),Ts=10,Es=2e4;function Ds(e){return zi(e.type)||e.type===`spring`||!qi(e.ease)}function Os(e,t){let n=new xs({...t,keyframes:e,repeat:0,delay:0,isGenerator:!0}),r={done:!1,value:e[0]},i=[],a=0;for(;!r.done&&a<Es;)r=n.sample(a),i.push(r.value),a+=Ts;return{times:void 0,keyframes:i,duration:a-Ts,ease:`linear`}}var ks={anticipate:sa,backInOut:oa,circInOut:ua};function As(e){return e in ks}var js=class extends wo{constructor(e){super(e);let{name:t,motionValue:n,element:r,keyframes:i}=this.options;this.resolver=new _o(i,(e,t)=>this.onKeyframesResolved(e,t),t,n,r),this.resolver.scheduleResolve()}initPlayback(e,t){let{duration:n=300,times:r,ease:i,type:a,motionValue:o,name:s,startTime:c}=this.options;if(!o.owner||!o.owner.current)return!1;if(typeof i==`string`&&Wi()&&As(i)&&(i=ks[i]),Ds(this.options)){let{onComplete:t,onUpdate:o,motionValue:s,element:c,...l}=this.options,u=Os(e,l);e=u.keyframes,e.length===1&&(e[1]=e[0]),n=u.duration,r=u.times,i=u.ease,a=`keyframes`}let l=Cs(o.owner.current,s,e,{...this.options,duration:n,times:r,ease:i});return l.startTime=c??this.calcStartTime(),this.pendingTimeline?(Bi(l,this.pendingTimeline),this.pendingTimeline=void 0):l.onfinish=()=>{let{onComplete:n}=this.options;o.set(So(e,this.options,t)),n&&n(),this.cancel(),this.resolveFinishedPromise()},{animation:l,duration:n,times:r,type:a,ease:i,keyframes:e}}get duration(){let{resolved:e}=this;if(!e)return 0;let{duration:t}=e;return G(t)}get time(){let{resolved:e}=this;if(!e)return 0;let{animation:t}=e;return G(t.currentTime||0)}set time(e){let{resolved:t}=this;if(!t)return;let{animation:n}=t;n.currentTime=W(e)}get speed(){let{resolved:e}=this;if(!e)return 1;let{animation:t}=e;return t.playbackRate}set speed(e){let{resolved:t}=this;if(!t)return;let{animation:n}=t;n.playbackRate=e}get state(){let{resolved:e}=this;if(!e)return`idle`;let{animation:t}=e;return t.playState}get startTime(){let{resolved:e}=this;if(!e)return null;let{animation:t}=e;return t.startTime}attachTimeline(e){if(!this._resolved)this.pendingTimeline=e;else{let{resolved:t}=this;if(!t)return I;let{animation:n}=t;Bi(n,e)}return I}play(){if(this.isStopped)return;let{resolved:e}=this;if(!e)return;let{animation:t}=e;t.playState===`finished`&&this.updateFinishedPromise(),t.play()}pause(){let{resolved:e}=this;if(!e)return;let{animation:t}=e;t.pause()}stop(){if(this.resolver.cancel(),this.isStopped=!0,this.state===`idle`)return;this.resolveFinishedPromise(),this.updateFinishedPromise();let{resolved:e}=this;if(!e)return;let{animation:t,keyframes:n,duration:r,type:i,ease:a,times:o}=e;if(t.playState===`idle`||t.playState===`finished`)return;if(this.time){let{motionValue:e,onUpdate:t,onComplete:s,element:c,...l}=this.options,u=new xs({...l,keyframes:n,duration:r,type:i,ease:a,times:o,isGenerator:!0}),d=W(this.time);e.setWithVelocity(u.sample(d-Ts).value,u.sample(d).value,Ts)}let{onStop:s}=this.options;s&&s(),this.cancel()}complete(){let{resolved:e}=this;e&&e.animation.finish()}cancel(){let{resolved:e}=this;e&&e.animation.cancel()}static supports(e){let{motionValue:t,name:n,repeatDelay:r,repeatType:i,damping:a,type:o}=e;if(!t||!t.owner||!(t.owner.current instanceof HTMLElement))return!1;let{onUpdate:s,transformTemplate:c}=t.owner.getProps();return ws()&&n&&Ss.has(n)&&!s&&!c&&!r&&i!==`mirror`&&a!==0&&o!==`inertia`}},Ms={type:`spring`,stiffness:500,damping:25,restSpeed:10},Ns=e=>({type:`spring`,stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),Ps={type:`keyframes`,duration:.8},Fs={type:`keyframes`,ease:[.25,.1,.35,1],duration:.3},Is=(e,{keyframes:t})=>t.length>2?Ps:_r.has(e)?e.startsWith(`scale`)?Ns(t[1]):Ms:Fs;function Ls({when:e,delay:t,delayChildren:n,staggerChildren:r,staggerDirection:i,repeat:a,repeatType:o,repeatDelay:s,from:c,elapsed:l,...u}){return!!Object.keys(u).length}var Rs=(e,t,n,r={},i,a)=>o=>{let s=gi(r,e)||{},c=s.delay||r.delay||0,{elapsed:l=0}=r;l-=W(c);let u={keyframes:Array.isArray(n)?n:[null,n],ease:`easeOut`,velocity:t.getVelocity(),...s,delay:-l,onUpdate:e=>{t.set(e),s.onUpdate&&s.onUpdate(e)},onComplete:()=>{o(),s.onComplete&&s.onComplete()},name:e,motionValue:t,element:a?void 0:i};Ls(s)||(u={...u,...Is(e,u)}),u.duration&&=W(u.duration),u.repeatDelay&&=W(u.repeatDelay),u.from!==void 0&&(u.keyframes[0]=u.from);let d=!1;if((u.type===!1||u.duration===0&&!u.repeatDelay)&&(u.duration=0,u.delay===0&&(d=!0)),(Ri.current||mn.skipAnimations)&&(d=!0,u.duration=0,u.delay=0),d&&!a&&t.get()!==void 0){let e=So(u.keyframes,s);if(e!==void 0)return L.update(()=>{u.onUpdate(e),u.onComplete()}),new Li([])}return!a&&js.supports(u)?new js(u):new xs(u)};function zs({protectedKeys:e,needsAnimating:t},n){let r=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,r}function Bs(e,t,{delay:n=0,transitionOverride:r,type:i}={}){let{transition:a=e.getDefaultTransition(),transitionEnd:o,...s}=t;r&&(a=r);let c=[],l=i&&e.animationState&&e.animationState.getState()[i];for(let t in s){let r=e.getValue(t,e.latestValues[t]??null),i=s[t];if(i===void 0||l&&zs(l,t))continue;let o={delay:n,...gi(a||{},t)},u=!1;if(window.MotionHandoffAnimation){let n=Ni(e);if(n){let e=window.MotionHandoffAnimation(n,t,L);e!==null&&(o.startTime=e,u=!0)}}Mi(e,t),r.start(Rs(t,r,i,e.shouldReduceMotion&&_i.has(t)?{type:!1}:o,e,u));let d=r.animation;d&&c.push(d)}return o&&Promise.all(c).then(()=>{L.update(()=>{o&&Ai(e,o)})}),c}function Vs(e,t,n={}){let r=hi(e,t,n.type===`exit`?e.presenceContext?.custom:void 0),{transition:i=e.getDefaultTransition()||{}}=r||{};n.transitionOverride&&(i=n.transitionOverride);let a=r?()=>Promise.all(Bs(e,r,n)):()=>Promise.resolve(),o=e.variantChildren&&e.variantChildren.size?(r=0)=>{let{delayChildren:a=0,staggerChildren:o,staggerDirection:s}=i;return Hs(e,t,a+r,o,s,n)}:()=>Promise.resolve(),{when:s}=i;if(s){let[e,t]=s===`beforeChildren`?[a,o]:[o,a];return e().then(()=>t())}else return Promise.all([a(),o(n.delay)])}function Hs(e,t,n=0,r=0,i=1,a){let o=[],s=(e.variantChildren.size-1)*r,c=i===1?(e=0)=>e*r:(e=0)=>s-e*r;return Array.from(e.variantChildren).sort(Us).forEach((e,r)=>{e.notify(`AnimationStart`,t),o.push(Vs(e,t,{...a,delay:n+c(r)}).then(()=>e.notify(`AnimationComplete`,t)))}),Promise.all(o)}function Us(e,t){return e.sortNodePosition(t)}function Ws(e,t,n={}){e.notify(`AnimationStart`,t);let r;if(Array.isArray(t)){let i=t.map(t=>Vs(e,t,n));r=Promise.all(i)}else if(typeof t==`string`)r=Vs(e,t,n);else{let i=typeof t==`function`?hi(e,t,n.custom):t;r=Promise.all(Bs(e,i,n))}return r.then(()=>{e.notify(`AnimationComplete`,t)})}var Gs=Rn.length;function Ks(e){if(!e)return;if(!e.isControllingVariants){let t=e.parent&&Ks(e.parent)||{};return e.props.initial!==void 0&&(t.initial=e.props.initial),t}let t={};for(let n=0;n<Gs;n++){let r=Rn[n],i=e.props[r];(Fn(i)||i===!1)&&(t[r]=i)}return t}var qs=[...Ln].reverse(),Js=Ln.length;function Ys(e){return t=>Promise.all(t.map(({animation:t,options:n})=>Ws(e,t,n)))}function Xs(e){let t=Ys(e),n=$s(),r=!0,i=t=>(n,r)=>{let i=hi(e,r,t===`exit`?e.presenceContext?.custom:void 0);if(i){let{transition:e,transitionEnd:t,...r}=i;n={...n,...r,...t}}return n};function a(n){t=n(e)}function o(a){let{props:o}=e,s=Ks(e.parent)||{},c=[],l=new Set,u={},d=1/0;for(let t=0;t<Js;t++){let f=qs[t],p=n[f],m=o[f]===void 0?s[f]:o[f],h=Fn(m),g=f===a?p.isActive:null;g===!1&&(d=t);let _=m===s[f]&&m!==o[f]&&h;if(_&&r&&e.manuallyAnimateOnMount&&(_=!1),p.protectedKeys={...u},!p.isActive&&g===null||!m&&!p.prevProp||In(m)||typeof m==`boolean`)continue;let v=Zs(p.prevProp,m),y=v||f===a&&p.isActive&&!_&&h||t>d&&h,b=!1,x=Array.isArray(m)?m:[m],S=x.reduce(i(f),{});g===!1&&(S={});let{prevResolvedValues:C={}}=p,w={...C,...S},T=t=>{y=!0,l.has(t)&&(b=!0,l.delete(t)),p.needsAnimating[t]=!0;let n=e.getValue(t);n&&(n.liveStyle=!1)};for(let e in w){let t=S[e],n=C[e];if(u.hasOwnProperty(e))continue;let r=!1;r=lr(t)&&lr(n)?!mi(t,n):t!==n,r?t==null?l.add(e):T(e):t!==void 0&&l.has(e)?T(e):p.protectedKeys[e]=!0}p.prevProp=m,p.prevResolvedValues=S,p.isActive&&(u={...u,...S}),r&&e.blockInitialAnimation&&(y=!1),y&&(!(_&&v)||b)&&c.push(...x.map(e=>({animation:e,options:{type:f}})))}if(l.size){let t={};l.forEach(n=>{let r=e.getBaseTarget(n),i=e.getValue(n);i&&(i.liveStyle=!0),t[n]=r??null}),c.push({animation:t})}let f=!!c.length;return r&&(o.initial===!1||o.initial===o.animate)&&!e.manuallyAnimateOnMount&&(f=!1),r=!1,f?t(c):Promise.resolve()}function s(t,r){var i;if(n[t].isActive===r)return Promise.resolve();(i=e.variantChildren)==null||i.forEach(e=>e.animationState?.setActive(t,r)),n[t].isActive=r;let a=o(t);for(let e in n)n[e].protectedKeys={};return a}return{animateChanges:o,setActive:s,setAnimateFunction:a,getState:()=>n,reset:()=>{n=$s(),r=!0}}}function Zs(e,t){return typeof t==`string`?t!==e:Array.isArray(t)?!mi(t,e):!1}function Qs(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function $s(){return{animate:Qs(!0),whileInView:Qs(),whileHover:Qs(),whileTap:Qs(),whileDrag:Qs(),whileFocus:Qs(),exit:Qs()}}var ec=class{constructor(e){this.isMounted=!1,this.node=e}update(){}},tc=class extends ec{constructor(e){super(e),e.animationState||=Xs(e)}updateAnimationControlsSubscription(){let{animate:e}=this.node.getProps();In(e)&&(this.unmountControls=e.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){let{animate:e}=this.node.getProps(),{animate:t}=this.node.prevProps||{};e!==t&&this.updateAnimationControlsSubscription()}unmount(){var e;this.node.animationState.reset(),(e=this.unmountControls)==null||e.call(this)}},nc=0,rc={animation:{Feature:tc},exit:{Feature:class extends ec{constructor(){super(...arguments),this.id=nc++}update(){if(!this.node.presenceContext)return;let{isPresent:e,onExitComplete:t}=this.node.presenceContext,{isPresent:n}=this.node.prevPresenceContext||{};if(!this.node.animationState||e===n)return;let r=this.node.animationState.setActive(`exit`,!e);t&&!e&&r.then(()=>t(this.id))}mount(){let{register:e}=this.node.presenceContext||{};e&&(this.unmount=e(this.id))}unmount(){}}}},Y={x:!1,y:!1};function ic(){return Y.x||Y.y}function ac(e){return e===`x`||e===`y`?Y[e]?null:(Y[e]=!0,()=>{Y[e]=!1}):Y.x||Y.y?null:(Y.x=Y.y=!0,()=>{Y.x=Y.y=!1})}var oc=e=>e.pointerType===`mouse`?typeof e.button!=`number`||e.button<=0:e.isPrimary!==!1;function sc(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}function cc(e){return{point:{x:e.pageX,y:e.pageY}}}var lc=e=>t=>oc(t)&&e(t,cc(t));function uc(e,t,n,r){return sc(e,t,lc(n),r)}var dc=(e,t)=>Math.abs(e-t);function fc(e,t){let n=dc(e.x,t.x),r=dc(e.y,t.y);return Math.sqrt(n**2+r**2)}var pc=class{constructor(e,t,{transformPagePoint:n,contextWindow:r,dragSnapToOrigin:i=!1}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;let e=gc(this.lastMoveEventInfo,this.history),t=this.startEvent!==null,n=fc(e.offset,{x:0,y:0})>=3;if(!t&&!n)return;let{point:r}=e,{timestamp:i}=R;this.history.push({...r,timestamp:i});let{onStart:a,onMove:o}=this.handlers;t||(a&&a(this.lastMoveEvent,e),this.startEvent=this.lastMoveEvent),o&&o(this.lastMoveEvent,e)},this.handlePointerMove=(e,t)=>{this.lastMoveEvent=e,this.lastMoveEventInfo=mc(t,this.transformPagePoint),L.update(this.updatePoint,!0)},this.handlePointerUp=(e,t)=>{this.end();let{onEnd:n,onSessionEnd:r,resumeAnimation:i}=this.handlers;if(this.dragSnapToOrigin&&i&&i(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;let a=gc(e.type===`pointercancel`?this.lastMoveEventInfo:mc(t,this.transformPagePoint),this.history);this.startEvent&&n&&n(e,a),r&&r(e,a)},!oc(e))return;this.dragSnapToOrigin=i,this.handlers=t,this.transformPagePoint=n,this.contextWindow=r||window;let a=mc(cc(e),this.transformPagePoint),{point:o}=a,{timestamp:s}=R;this.history=[{...o,timestamp:s}];let{onSessionStart:c}=t;c&&c(e,gc(a,this.history)),this.removeListeners=Io(uc(this.contextWindow,`pointermove`,this.handlePointerMove),uc(this.contextWindow,`pointerup`,this.handlePointerUp),uc(this.contextWindow,`pointercancel`,this.handlePointerUp))}updateHandlers(e){this.handlers=e}end(){this.removeListeners&&this.removeListeners(),yn(this.updatePoint)}};function mc(e,t){return t?{point:t(e.point)}:e}function hc(e,t){return{x:e.x-t.x,y:e.y-t.y}}function gc({point:e},t){return{point:e,delta:hc(e,vc(t)),offset:hc(e,_c(t)),velocity:yc(t,.1)}}function _c(e){return e[0]}function vc(e){return e[e.length-1]}function yc(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null,i=vc(e);for(;n>=0&&(r=e[n],!(i.timestamp-r.timestamp>W(t)));)n--;if(!r)return{x:0,y:0};let a=G(i.timestamp-r.timestamp);if(a===0)return{x:0,y:0};let o={x:(i.x-r.x)/a,y:(i.y-r.y)/a};return o.x===1/0&&(o.x=0),o.y===1/0&&(o.y=0),o}var bc=1e-4,xc=1-bc,Sc=1+bc,Cc=.01,wc=0-Cc,Tc=0+Cc;function X(e){return e.max-e.min}function Ec(e,t,n){return Math.abs(e-t)<=n}function Dc(e,t,n,r=.5){e.origin=r,e.originPoint=q(t.min,t.max,e.origin),e.scale=X(n)/X(t),e.translate=q(n.min,n.max,e.origin)-e.originPoint,(e.scale>=xc&&e.scale<=Sc||isNaN(e.scale))&&(e.scale=1),(e.translate>=wc&&e.translate<=Tc||isNaN(e.translate))&&(e.translate=0)}function Oc(e,t,n,r){Dc(e.x,t.x,n.x,r?r.originX:void 0),Dc(e.y,t.y,n.y,r?r.originY:void 0)}function kc(e,t,n){e.min=n.min+t.min,e.max=e.min+X(t)}function Ac(e,t,n){kc(e.x,t.x,n.x),kc(e.y,t.y,n.y)}function jc(e,t,n){e.min=t.min-n.min,e.max=e.min+X(t)}function Mc(e,t,n){jc(e.x,t.x,n.x),jc(e.y,t.y,n.y)}function Nc(e,{min:t,max:n},r){return t!==void 0&&e<t?e=r?q(t,e,r.min):Math.max(e,t):n!==void 0&&e>n&&(e=r?q(n,e,r.max):Math.min(e,n)),e}function Pc(e,t,n){return{min:t===void 0?void 0:e.min+t,max:n===void 0?void 0:e.max+n-(e.max-e.min)}}function Fc(e,{top:t,left:n,bottom:r,right:i}){return{x:Pc(e.x,n,i),y:Pc(e.y,t,r)}}function Ic(e,t){let n=t.min-e.min,r=t.max-e.max;return t.max-t.min<e.max-e.min&&([n,r]=[r,n]),{min:n,max:r}}function Lc(e,t){return{x:Ic(e.x,t.x),y:Ic(e.y,t.y)}}function Rc(e,t){let n=.5,r=X(e),i=X(t);return i>r?n=Gi(t.min,t.max-r,e.min):r>i&&(n=Gi(e.min,e.max-i,t.min)),B(0,1,n)}function zc(e,t){let n={};return t.min!==void 0&&(n.min=t.min-e.min),t.max!==void 0&&(n.max=t.max-e.min),n}var Bc=.35;function Vc(e=Bc){return e===!1?e=0:e===!0&&(e=Bc),{x:Hc(e,`left`,`right`),y:Hc(e,`top`,`bottom`)}}function Hc(e,t,n){return{min:Uc(e,t),max:Uc(e,n)}}function Uc(e,t){return typeof e==`number`?e:e[t]||0}var Wc=()=>({translate:0,scale:1,origin:0,originPoint:0}),Gc=()=>({x:Wc(),y:Wc()}),Kc=()=>({min:0,max:0}),Z=()=>({x:Kc(),y:Kc()});function Q(e){return[e(`x`),e(`y`)]}function qc({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function Jc({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function Yc(e,t){if(!t)return e;let n=t({x:e.left,y:e.top}),r=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:r.y,right:r.x}}function Xc(e){return e===void 0||e===1}function Zc({scale:e,scaleX:t,scaleY:n}){return!Xc(e)||!Xc(t)||!Xc(n)}function Qc(e){return Zc(e)||$c(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function $c(e){return el(e.x)||el(e.y)}function el(e){return e&&e!==`0%`}function tl(e,t,n){return n+t*(e-n)}function nl(e,t,n,r,i){return i!==void 0&&(e=tl(e,i,r)),tl(e,n,r)+t}function rl(e,t=0,n=1,r,i){e.min=nl(e.min,t,n,r,i),e.max=nl(e.max,t,n,r,i)}function il(e,{x:t,y:n}){rl(e.x,t.translate,t.scale,t.originPoint),rl(e.y,n.translate,n.scale,n.originPoint)}var al=.999999999999,ol=1.0000000000001;function sl(e,t,n,r=!1){let i=n.length;if(!i)return;t.x=t.y=1;let a,o;for(let s=0;s<i;s++){a=n[s],o=a.projectionDelta;let{visualElement:i}=a.options;i&&i.props.style&&i.props.style.display===`contents`||(r&&a.options.layoutScroll&&a.scroll&&a!==a.root&&ul(e,{x:-a.scroll.offset.x,y:-a.scroll.offset.y}),o&&(t.x*=o.x.scale,t.y*=o.y.scale,il(e,o)),r&&Qc(a.latestValues)&&ul(e,a.latestValues))}t.x<ol&&t.x>al&&(t.x=1),t.y<ol&&t.y>al&&(t.y=1)}function cl(e,t){e.min+=t,e.max+=t}function ll(e,t,n,r,i=.5){rl(e,t,n,q(e.min,e.max,i),r)}function ul(e,t){ll(e.x,t.x,t.scaleX,t.scale,t.originX),ll(e.y,t.y,t.scaleY,t.scale,t.originY)}function dl(e,t){return qc(Yc(e.getBoundingClientRect(),t))}function fl(e,t,n){let r=dl(e,n),{scroll:i}=t;return i&&(cl(r.x,i.offset.x),cl(r.y,i.offset.y)),r}var pl=({current:e})=>e?e.ownerDocument.defaultView:null,ml=new WeakMap,hl=class{constructor(e){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=Z(),this.visualElement=e}start(e,{snapToCursor:t=!1}={}){let{presenceContext:n}=this.visualElement;if(n&&n.isPresent===!1)return;let r=e=>{let{dragSnapToOrigin:n}=this.getProps();n?this.pauseAnimation():this.stopAnimation(),t&&this.snapToCursor(cc(e).point)},i=(e,t)=>{let{drag:n,dragPropagation:r,onDragStart:i}=this.getProps();if(n&&!r&&(this.openDragLock&&this.openDragLock(),this.openDragLock=ac(n),!this.openDragLock))return;this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),Q(e=>{let t=this.getAxisMotionValue(e).get()||0;if(V.test(t)){let{projection:n}=this.visualElement;if(n&&n.layout){let r=n.layout.layoutBox[e];r&&(t=X(r)*(parseFloat(t)/100))}}this.originPoint[e]=t}),i&&L.postRender(()=>i(e,t)),Mi(this.visualElement,`transform`);let{animationState:a}=this.visualElement;a&&a.setActive(`whileDrag`,!0)},a=(e,t)=>{let{dragPropagation:n,dragDirectionLock:r,onDirectionLock:i,onDrag:a}=this.getProps();if(!n&&!this.openDragLock)return;let{offset:o}=t;if(r&&this.currentDirection===null){this.currentDirection=_l(o),this.currentDirection!==null&&i&&i(this.currentDirection);return}this.updateAxis(`x`,t.point,o),this.updateAxis(`y`,t.point,o),this.visualElement.render(),a&&a(e,t)},o=(e,t)=>this.stop(e,t),s=()=>Q(e=>this.getAnimationState(e)===`paused`&&this.getAxisMotionValue(e).animation?.play()),{dragSnapToOrigin:c}=this.getProps();this.panSession=new pc(e,{onSessionStart:r,onStart:i,onMove:a,onSessionEnd:o,resumeAnimation:s},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:c,contextWindow:pl(this.visualElement)})}stop(e,t){let n=this.isDragging;if(this.cancel(),!n)return;let{velocity:r}=t;this.startAnimation(r);let{onDragEnd:i}=this.getProps();i&&L.postRender(()=>i(e,t))}cancel(){this.isDragging=!1;let{projection:e,animationState:t}=this.visualElement;e&&(e.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;let{dragPropagation:n}=this.getProps();!n&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),t&&t.setActive(`whileDrag`,!1)}updateAxis(e,t,n){let{drag:r}=this.getProps();if(!n||!gl(e,r,this.currentDirection))return;let i=this.getAxisMotionValue(e),a=this.originPoint[e]+n[e];this.constraints&&this.constraints[e]&&(a=Nc(a,this.constraints[e],this.elastic[e])),i.set(a)}resolveConstraints(){let{dragConstraints:e,dragElastic:t}=this.getProps(),n=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):this.visualElement.projection?.layout,r=this.constraints;e&&Gn(e)?this.constraints||=this.resolveRefConstraints():e&&n?this.constraints=Fc(n.layoutBox,e):this.constraints=!1,this.elastic=Vc(t),r!==this.constraints&&n&&this.constraints&&!this.hasMutatedConstraints&&Q(e=>{this.constraints!==!1&&this.getAxisMotionValue(e)&&(this.constraints[e]=zc(n.layoutBox[e],this.constraints[e]))})}resolveRefConstraints(){let{dragConstraints:e,onMeasureDragConstraints:t}=this.getProps();if(!e||!Gn(e))return!1;let n=e.current;pn(n!==null,"If `dragConstraints` is set as a React ref, that ref must be passed to another component's `ref` prop.");let{projection:r}=this.visualElement;if(!r||!r.layout)return!1;let i=fl(n,r.root,this.visualElement.getTransformPagePoint()),a=Lc(r.layout.layoutBox,i);if(t){let e=t(Jc(a));this.hasMutatedConstraints=!!e,e&&(a=qc(e))}return a}startAnimation(e){let{drag:t,dragMomentum:n,dragElastic:r,dragTransition:i,dragSnapToOrigin:a,onDragTransitionEnd:o}=this.getProps(),s=this.constraints||{},c=Q(o=>{if(!gl(o,t,this.currentDirection))return;let c=s&&s[o]||{};a&&(c={min:0,max:0});let l=r?200:1e6,u=r?40:1e7,d={type:`inertia`,velocity:n?e[o]:0,bounceStiffness:l,bounceDamping:u,timeConstant:750,restDelta:1,restSpeed:10,...i,...c};return this.startAxisValueAnimation(o,d)});return Promise.all(c).then(o)}startAxisValueAnimation(e,t){let n=this.getAxisMotionValue(e);return Mi(this.visualElement,e),n.start(Rs(e,n,0,t,this.visualElement,!1))}stopAnimation(){Q(e=>this.getAxisMotionValue(e).stop())}pauseAnimation(){Q(e=>this.getAxisMotionValue(e).animation?.pause())}getAnimationState(e){return this.getAxisMotionValue(e).animation?.state}getAxisMotionValue(e){let t=`_drag${e.toUpperCase()}`,n=this.visualElement.getProps();return n[t]||this.visualElement.getValue(e,(n.initial?n.initial[e]:void 0)||0)}snapToCursor(e){Q(t=>{let{drag:n}=this.getProps();if(!gl(t,n,this.currentDirection))return;let{projection:r}=this.visualElement,i=this.getAxisMotionValue(t);if(r&&r.layout){let{min:n,max:a}=r.layout.layoutBox[t];i.set(e[t]-q(n,a,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;let{drag:e,dragConstraints:t}=this.getProps(),{projection:n}=this.visualElement;if(!Gn(t)||!n||!this.constraints)return;this.stopAnimation();let r={x:0,y:0};Q(e=>{let t=this.getAxisMotionValue(e);if(t&&this.constraints!==!1){let n=t.get();r[e]=Rc({min:n,max:n},this.constraints[e])}});let{transformTemplate:i}=this.visualElement.getProps();this.visualElement.current.style.transform=i?i({},``):`none`,n.root&&n.root.updateScroll(),n.updateLayout(),this.resolveConstraints(),Q(t=>{if(!gl(t,e,null))return;let n=this.getAxisMotionValue(t),{min:i,max:a}=this.constraints[t];n.set(q(i,a,r[t]))})}addListeners(){if(!this.visualElement.current)return;ml.set(this.visualElement,this);let e=this.visualElement.current,t=uc(e,`pointerdown`,e=>{let{drag:t,dragListener:n=!0}=this.getProps();t&&n&&this.start(e)}),n=()=>{let{dragConstraints:e}=this.getProps();Gn(e)&&e.current&&(this.constraints=this.resolveRefConstraints())},{projection:r}=this.visualElement,i=r.addEventListener(`measure`,n);r&&!r.layout&&(r.root&&r.root.updateScroll(),r.updateLayout()),L.read(n);let a=sc(window,`resize`,()=>this.scalePositionWithinConstraints()),o=r.addEventListener(`didUpdate`,(({delta:e,hasLayoutChanged:t})=>{this.isDragging&&t&&(Q(t=>{let n=this.getAxisMotionValue(t);n&&(this.originPoint[t]+=e[t].translate,n.set(n.get()+e[t].translate))}),this.visualElement.render())}));return()=>{a(),t(),i(),o&&o()}}getProps(){let e=this.visualElement.getProps(),{drag:t=!1,dragDirectionLock:n=!1,dragPropagation:r=!1,dragConstraints:i=!1,dragElastic:a=Bc,dragMomentum:o=!0}=e;return{...e,drag:t,dragDirectionLock:n,dragPropagation:r,dragConstraints:i,dragElastic:a,dragMomentum:o}}};function gl(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function _l(e,t=10){let n=null;return Math.abs(e.y)>t?n=`y`:Math.abs(e.x)>t&&(n=`x`),n}var vl=class extends ec{constructor(e){super(e),this.removeGroupControls=I,this.removeListeners=I,this.controls=new hl(e)}mount(){let{dragControls:e}=this.node.getProps();e&&(this.removeGroupControls=e.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||I}unmount(){this.removeGroupControls(),this.removeListeners()}},yl=e=>(t,n)=>{e&&L.postRender(()=>e(t,n))},bl=class extends ec{constructor(){super(...arguments),this.removePointerDownListener=I}onPointerDown(e){this.session=new pc(e,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:pl(this.node)})}createPanHandlers(){let{onPanSessionStart:e,onPanStart:t,onPan:n,onPanEnd:r}=this.node.getProps();return{onSessionStart:yl(e),onStart:yl(t),onMove:n,onEnd:(e,t)=>{delete this.session,r&&L.postRender(()=>r(e,t))}}}mount(){this.removePointerDownListener=uc(this.node.current,`pointerdown`,e=>this.onPointerDown(e))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}},xl={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function Sl(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}var Cl={correct:(e,t)=>{if(!t.target)return e;if(typeof e==`string`)if(H.test(e))e=parseFloat(e);else return e;return`${Sl(e,t.target.x)}% ${Sl(e,t.target.y)}%`}},wl={correct:(e,{treeScale:t,projectionDelta:n})=>{let r=e,i=Ra.parse(e);if(i.length>5)return r;let a=Ra.createTransformer(e),o=typeof i[0]==`number`?0:1,s=n.x.scale*t.x,c=n.y.scale*t.y;i[0+o]/=s,i[1+o]/=c;let l=q(s,c,.5);return typeof i[2+o]==`number`&&(i[2+o]/=l),typeof i[3+o]==`number`&&(i[3+o]/=l),a(i)}},Tl=class extends T{componentDidMount(){let{visualElement:e,layoutGroup:t,switchLayoutGroup:n,layoutId:r}=this.props,{projection:i}=e;$r(Dl),i&&(t.group&&t.group.add(i),n&&n.register&&r&&n.register(i),i.root.didUpdate(),i.addEventListener(`animationComplete`,()=>{this.safeToRemove()}),i.setOptions({...i.options,onExitComplete:()=>this.safeToRemove()})),xl.hasEverUpdated=!0}getSnapshotBeforeUpdate(e){let{layoutDependency:t,visualElement:n,drag:r,isPresent:i}=this.props,a=n.projection;return a?(a.isPresent=i,r||e.layoutDependency!==t||t===void 0?a.willUpdate():this.safeToRemove(),e.isPresent!==i&&(i?a.promote():a.relegate()||L.postRender(()=>{let e=a.getStack();(!e||!e.members.length)&&this.safeToRemove()})),null):null}componentDidUpdate(){let{projection:e}=this.props.visualElement;e&&(e.root.didUpdate(),Yn.postRender(()=>{!e.currentAnimation&&e.isLead()&&this.safeToRemove()}))}componentWillUnmount(){let{visualElement:e,layoutGroup:t,switchLayoutGroup:n}=this.props,{projection:r}=e;r&&(r.scheduleCheckAfterUnmount(),t&&t.group&&t.group.remove(r),n&&n.deregister&&n.deregister(r))}safeToRemove(){let{safeToRemove:e}=this.props;e&&e()}render(){return null}};function El(e){let[t,n]=on(),r=P(Zt);return F(Tl,{...e,layoutGroup:r,switchLayoutGroup:P(Zn),isPresent:t,safeToRemove:n})}var Dl={borderRadius:{...Cl,applyTo:[`borderTopLeftRadius`,`borderTopRightRadius`,`borderBottomLeftRadius`,`borderBottomRightRadius`]},borderTopLeftRadius:Cl,borderTopRightRadius:Cl,borderBottomLeftRadius:Cl,borderBottomRightRadius:Cl,boxShadow:wl};function Ol(e,t,n){let r=z(e)?e:Oi(e);return r.start(Rs(``,r,t,n)),r.animation}function kl(e){return e instanceof SVGElement&&e.tagName!==`svg`}var Al=(e,t)=>e.depth-t.depth,jl=class{constructor(){this.children=[],this.isDirty=!1}add(e){bi(this.children,e),this.isDirty=!0}remove(e){xi(this.children,e),this.isDirty=!0}forEach(e){this.isDirty&&this.children.sort(Al),this.isDirty=!1,this.children.forEach(e)}};function Ml(e,t){let n=U.now(),r=({timestamp:i})=>{let a=i-n;a>=t&&(yn(r),e(a-t))};return L.read(r,!0),()=>yn(r)}var Nl=[`TopLeft`,`TopRight`,`BottomLeft`,`BottomRight`],Pl=Nl.length,Fl=e=>typeof e==`string`?parseFloat(e):e,Il=e=>typeof e==`number`||H.test(e);function Ll(e,t,n,r,i,a){i?(e.opacity=q(0,n.opacity===void 0?1:n.opacity,zl(r)),e.opacityExit=q(t.opacity===void 0?1:t.opacity,0,Bl(r))):a&&(e.opacity=q(t.opacity===void 0?1:t.opacity,n.opacity===void 0?1:n.opacity,r));for(let i=0;i<Pl;i++){let a=`border${Nl[i]}Radius`,o=Rl(t,a),s=Rl(n,a);o===void 0&&s===void 0||(o||=0,s||=0,o===0||s===0||Il(o)===Il(s)?(e[a]=Math.max(q(Fl(o),Fl(s),r),0),(V.test(s)||V.test(o))&&(e[a]+=`%`)):e[a]=s)}(t.rotate||n.rotate)&&(e.rotate=q(t.rotate||0,n.rotate||0,r))}function Rl(e,t){return e[t]===void 0?e.borderRadius:e[t]}var zl=Vl(0,.5,la),Bl=Vl(.5,.95,I);function Vl(e,t,n){return r=>r<e?0:r>t?1:n(Gi(e,t,r))}function Hl(e,t){e.min=t.min,e.max=t.max}function $(e,t){Hl(e.x,t.x),Hl(e.y,t.y)}function Ul(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}function Wl(e,t,n,r,i){return e-=t,e=tl(e,1/n,r),i!==void 0&&(e=tl(e,1/i,r)),e}function Gl(e,t=0,n=1,r=.5,i,a=e,o=e){if(V.test(t)&&(t=parseFloat(t),t=q(o.min,o.max,t/100)-o.min),typeof t!=`number`)return;let s=q(a.min,a.max,r);e===a&&(s-=t),e.min=Wl(e.min,t,n,s,i),e.max=Wl(e.max,t,n,s,i)}function Kl(e,t,[n,r,i],a,o){Gl(e,t[n],t[r],t[i],t.scale,a,o)}var ql=[`x`,`scaleX`,`originX`],Jl=[`y`,`scaleY`,`originY`];function Yl(e,t,n,r){Kl(e.x,t,ql,n?n.x:void 0,r?r.x:void 0),Kl(e.y,t,Jl,n?n.y:void 0,r?r.y:void 0)}function Xl(e){return e.translate===0&&e.scale===1}function Zl(e){return Xl(e.x)&&Xl(e.y)}function Ql(e,t){return e.min===t.min&&e.max===t.max}function $l(e,t){return Ql(e.x,t.x)&&Ql(e.y,t.y)}function eu(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function tu(e,t){return eu(e.x,t.x)&&eu(e.y,t.y)}function nu(e){return X(e.x)/X(e.y)}function ru(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}var iu=class{constructor(){this.members=[]}add(e){bi(this.members,e),e.scheduleRender()}remove(e){if(xi(this.members,e),e===this.prevLead&&(this.prevLead=void 0),e===this.lead){let e=this.members[this.members.length-1];e&&this.promote(e)}}relegate(e){let t=this.members.findIndex(t=>e===t);if(t===0)return!1;let n;for(let e=t;e>=0;e--){let t=this.members[e];if(t.isPresent!==!1){n=t;break}}return n?(this.promote(n),!0):!1}promote(e,t){let n=this.lead;if(e!==n&&(this.prevLead=n,this.lead=e,e.show(),n)){n.instance&&n.scheduleRender(),e.scheduleRender(),e.resumeFrom=n,t&&(e.resumeFrom.preserveOpacity=!0),n.snapshot&&(e.snapshot=n.snapshot,e.snapshot.latestValues=n.animationValues||n.latestValues),e.root&&e.root.isUpdating&&(e.isLayoutDirty=!0);let{crossfade:r}=e.options;r===!1&&n.hide()}}exitAnimationComplete(){this.members.forEach(e=>{let{options:t,resumingFrom:n}=e;t.onExitComplete&&t.onExitComplete(),n&&n.options.onExitComplete&&n.options.onExitComplete()})}scheduleRender(){this.members.forEach(e=>{e.instance&&e.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}};function au(e,t,n){let r=``,i=e.x.translate/t.x,a=e.y.translate/t.y,o=n?.z||0;if((i||a||o)&&(r=`translate3d(${i}px, ${a}px, ${o}px) `),(t.x!==1||t.y!==1)&&(r+=`scale(${1/t.x}, ${1/t.y}) `),n){let{transformPerspective:e,rotate:t,rotateX:i,rotateY:a,skewX:o,skewY:s}=n;e&&(r=`perspective(${e}px) ${r}`),t&&(r+=`rotate(${t}deg) `),i&&(r+=`rotateX(${i}deg) `),a&&(r+=`rotateY(${a}deg) `),o&&(r+=`skewX(${o}deg) `),s&&(r+=`skewY(${s}deg) `)}let s=e.x.scale*t.x,c=e.y.scale*t.y;return(s!==1||c!==1)&&(r+=`scale(${s}, ${c})`),r||`none`}var ou={type:`projectionFrame`,totalNodes:0,resolvedTargetDeltas:0,recalculatedProjection:0},su=typeof window<`u`&&window.MotionDebug!==void 0,cu=[``,`X`,`Y`,`Z`],lu={visibility:`hidden`},uu=1e3,du=0;function fu(e,t,n,r){let{latestValues:i}=t;i[e]&&(n[e]=i[e],t.setStaticValue(e,0),r&&(r[e]=0))}function pu(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;let{visualElement:t}=e.options;if(!t)return;let n=Ni(t);if(window.MotionHasOptimisedAnimation(n,`transform`)){let{layout:t,layoutId:r}=e.options;window.MotionCancelOptimisedAnimation(n,`transform`,L,!(t||r))}let{parent:r}=e;r&&!r.hasCheckedOptimisedAppear&&pu(r)}function mu({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:i}){return class{constructor(e={},n=t?.()){this.id=du++,this.animationId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,su&&(ou.totalNodes=ou.resolvedTargetDeltas=ou.recalculatedProjection=0),this.nodes.forEach(_u),this.nodes.forEach(wu),this.nodes.forEach(Tu),this.nodes.forEach(vu),su&&window.MotionDebug.record(ou)},this.resolvedRelativeTargetAt=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=e,this.root=n?n.root||n:this,this.path=n?[...n.path,n]:[],this.parent=n,this.depth=n?n.depth+1:0;for(let e=0;e<this.path.length;e++)this.path[e].shouldResetTransform=!0;this.root===this&&(this.nodes=new jl)}addEventListener(e,t){return this.eventHandlers.has(e)||this.eventHandlers.set(e,new Si),this.eventHandlers.get(e).add(t)}notifyListeners(e,...t){let n=this.eventHandlers.get(e);n&&n.notify(...t)}hasListeners(e){return this.eventHandlers.has(e)}mount(t,n=this.root.hasTreeAnimated){if(this.instance)return;this.isSVG=kl(t),this.instance=t;let{layoutId:r,layout:i,visualElement:a}=this.options;if(a&&!a.current&&a.mount(t),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),n&&(i||r)&&(this.isLayoutDirty=!0),e){let n,r=()=>this.root.updateBlockedByResize=!1;e(t,()=>{this.root.updateBlockedByResize=!0,n&&n(),n=Ml(r,250),xl.hasAnimatedSinceResize&&(xl.hasAnimatedSinceResize=!1,this.nodes.forEach(Cu))})}r&&this.root.registerSharedNode(r,this),this.options.animate!==!1&&a&&(r||i)&&this.addEventListener(`didUpdate`,({delta:e,hasLayoutChanged:t,hasRelativeTargetChanged:n,layout:r})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}let i=this.options.transition||a.getDefaultTransition()||Mu,{onLayoutAnimationStart:o,onLayoutAnimationComplete:s}=a.getProps(),c=!this.targetLayout||!tu(this.targetLayout,r)||n,l=!t&&n;if(this.options.layoutRoot||this.resumeFrom&&this.resumeFrom.instance||l||t&&(c||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(e,l);let t={...gi(i,`layout`),onPlay:o,onComplete:s};(a.shouldReduceMotion||this.options.layoutRoot)&&(t.delay=0,t.type=!1),this.startAnimation(t)}else t||Cu(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=r})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);let e=this.getStack();e&&e.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,yn(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(Eu),this.animationId++)}getTransformTemplate(){let{visualElement:e}=this.options;return e&&e.getProps().transformTemplate}willUpdate(e=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&pu(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let e=0;e<this.path.length;e++){let t=this.path[e];t.shouldResetTransform=!0,t.updateScroll(`snapshot`),t.options.layoutRoot&&t.willUpdate(!1)}let{layoutId:t,layout:n}=this.options;if(t===void 0&&!n)return;let r=this.getTransformTemplate();this.prevTransformTemplateValue=r?r(this.latestValues,``):void 0,this.updateSnapshot(),e&&this.notifyListeners(`willUpdate`)}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(bu);return}this.isUpdating||this.nodes.forEach(xu),this.isUpdating=!1,this.nodes.forEach(Su),this.nodes.forEach(hu),this.nodes.forEach(gu),this.clearAllSnapshots();let e=U.now();R.delta=B(0,1e3/60,e-R.timestamp),R.timestamp=e,R.isProcessing=!0,bn.update.process(R),bn.preRender.process(R),bn.render.process(R),R.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,Yn.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(yu),this.sharedNodes.forEach(Du)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,L.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){L.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure())}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let e=0;e<this.path.length;e++)this.path[e].updateScroll();let e=this.layout;this.layout=this.measure(!1),this.layoutCorrected=Z(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners(`measure`,this.layout.layoutBox);let{visualElement:t}=this.options;t&&t.notify(`LayoutMeasure`,this.layout.layoutBox,e?e.layoutBox:void 0)}updateScroll(e=`measure`){let t=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===e&&(t=!1),t){let t=r(this.instance);this.scroll={animationId:this.root.animationId,phase:e,isRoot:t,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:t}}}resetTransform(){if(!i)return;let e=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,t=this.projectionDelta&&!Zl(this.projectionDelta),n=this.getTransformTemplate(),r=n?n(this.latestValues,``):void 0,a=r!==this.prevTransformTemplateValue;e&&(t||Qc(this.latestValues)||a)&&(i(this.instance,r),this.shouldResetTransform=!1,this.scheduleRender())}measure(e=!0){let t=this.measurePageBox(),n=this.removeElementScroll(t);return e&&(n=this.removeTransform(n)),Iu(n),{animationId:this.root.animationId,measuredBox:t,layoutBox:n,latestValues:{},source:this.id}}measurePageBox(){let{visualElement:e}=this.options;if(!e)return Z();let t=e.measureViewportBox();if(!(this.scroll?.wasRoot||this.path.some(Ru))){let{scroll:e}=this.root;e&&(cl(t.x,e.offset.x),cl(t.y,e.offset.y))}return t}removeElementScroll(e){let t=Z();if($(t,e),this.scroll?.wasRoot)return t;for(let n=0;n<this.path.length;n++){let r=this.path[n],{scroll:i,options:a}=r;r!==this.root&&i&&a.layoutScroll&&(i.wasRoot&&$(t,e),cl(t.x,i.offset.x),cl(t.y,i.offset.y))}return t}applyTransform(e,t=!1){let n=Z();$(n,e);for(let e=0;e<this.path.length;e++){let r=this.path[e];!t&&r.options.layoutScroll&&r.scroll&&r!==r.root&&ul(n,{x:-r.scroll.offset.x,y:-r.scroll.offset.y}),Qc(r.latestValues)&&ul(n,r.latestValues)}return Qc(this.latestValues)&&ul(n,this.latestValues),n}removeTransform(e){let t=Z();$(t,e);for(let e=0;e<this.path.length;e++){let n=this.path[e];if(!n.instance||!Qc(n.latestValues))continue;Zc(n.latestValues)&&n.updateSnapshot();let r=Z();$(r,n.measurePageBox()),Yl(t,n.latestValues,n.snapshot?n.snapshot.layoutBox:void 0,r)}return Qc(this.latestValues)&&Yl(t,this.latestValues),t}setTargetDelta(e){this.targetDelta=e,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(e){this.options={...this.options,...e,crossfade:e.crossfade===void 0?!0:e.crossfade}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==R.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(e=!1){let t=this.getLead();this.isProjectionDirty||=t.isProjectionDirty,this.isTransformDirty||=t.isTransformDirty,this.isSharedProjectionDirty||=t.isSharedProjectionDirty;let n=!!this.resumingFrom||this!==t;if(!(e||n&&this.isSharedProjectionDirty||this.isProjectionDirty||this.parent?.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;let{layout:r,layoutId:i}=this.options;if(!(!this.layout||!(r||i))){if(this.resolvedRelativeTargetAt=R.timestamp,!this.targetDelta&&!this.relativeTarget){let e=this.getClosestProjectingParent();e&&e.layout&&this.animationProgress!==1?(this.relativeParent=e,this.forceRelativeParentToResolveTarget(),this.relativeTarget=Z(),this.relativeTargetOrigin=Z(),Mc(this.relativeTargetOrigin,this.layout.layoutBox,e.layout.layoutBox),$(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if(!(!this.relativeTarget&&!this.targetDelta)){if(this.target||(this.target=Z(),this.targetWithTransforms=Z()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),Ac(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):$(this.target,this.layout.layoutBox),il(this.target,this.targetDelta)):$(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget){this.attemptToResolveRelativeTarget=!1;let e=this.getClosestProjectingParent();e&&!!e.resumingFrom==!!this.resumingFrom&&!e.options.layoutScroll&&e.target&&this.animationProgress!==1?(this.relativeParent=e,this.forceRelativeParentToResolveTarget(),this.relativeTarget=Z(),this.relativeTargetOrigin=Z(),Mc(this.relativeTargetOrigin,this.target,e.target),$(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}su&&ou.resolvedTargetDeltas++}}}getClosestProjectingParent(){if(!(!this.parent||Zc(this.parent.latestValues)||$c(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}calcProjection(){let e=this.getLead(),t=!!this.resumingFrom||this!==e,n=!0;if((this.isProjectionDirty||this.parent?.isProjectionDirty)&&(n=!1),t&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(n=!1),this.resolvedRelativeTargetAt===R.timestamp&&(n=!1),n)return;let{layout:r,layoutId:i}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(r||i))return;$(this.layoutCorrected,this.layout.layoutBox);let a=this.treeScale.x,o=this.treeScale.y;sl(this.layoutCorrected,this.treeScale,this.path,t),e.layout&&!e.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(e.target=e.layout.layoutBox,e.targetWithTransforms=Z());let{target:s}=e;if(!s){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(Ul(this.prevProjectionDelta.x,this.projectionDelta.x),Ul(this.prevProjectionDelta.y,this.projectionDelta.y)),Oc(this.projectionDelta,this.layoutCorrected,s,this.latestValues),(this.treeScale.x!==a||this.treeScale.y!==o||!ru(this.projectionDelta.x,this.prevProjectionDelta.x)||!ru(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners(`projectionUpdate`,s)),su&&ou.recalculatedProjection++}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(e=!0){var t;if((t=this.options.visualElement)==null||t.scheduleRender(),e){let e=this.getStack();e&&e.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=Gc(),this.projectionDelta=Gc(),this.projectionDeltaWithTransform=Gc()}setAnimationOrigin(e,t=!1){let n=this.snapshot,r=n?n.latestValues:{},i={...this.latestValues},a=Gc();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!t;let o=Z(),s=(n?n.source:void 0)!==(this.layout?this.layout.source:void 0),c=this.getStack(),l=!c||c.members.length<=1,u=!!(s&&!l&&this.options.crossfade===!0&&!this.path.some(ju));this.animationProgress=0;let d;this.mixTargetDelta=t=>{let n=t/1e3;Ou(a.x,e.x,n),Ou(a.y,e.y,n),this.setTargetDelta(a),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Mc(o,this.layout.layoutBox,this.relativeParent.layout.layoutBox),Au(this.relativeTarget,this.relativeTargetOrigin,o,n),d&&$l(this.relativeTarget,d)&&(this.isProjectionDirty=!1),d||=Z(),$(d,this.relativeTarget)),s&&(this.animationValues=i,Ll(i,r,this.latestValues,n,u,l)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=n},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(e){this.notifyListeners(`animationStart`),this.currentAnimation&&this.currentAnimation.stop(),this.resumingFrom&&this.resumingFrom.currentAnimation&&this.resumingFrom.currentAnimation.stop(),this.pendingAnimation&&=(yn(this.pendingAnimation),void 0),this.pendingAnimation=L.update(()=>{xl.hasAnimatedSinceResize=!0,this.currentAnimation=Ol(0,uu,{...e,onUpdate:t=>{this.mixTargetDelta(t),e.onUpdate&&e.onUpdate(t)},onComplete:()=>{e.onComplete&&e.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);let e=this.getStack();e&&e.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners(`animationComplete`)}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(uu),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){let e=this.getLead(),{targetWithTransforms:t,target:n,layout:r,latestValues:i}=e;if(!(!t||!n||!r)){if(this!==e&&this.layout&&r&&Lu(this.options.animationType,this.layout.layoutBox,r.layoutBox)){n=this.target||Z();let t=X(this.layout.layoutBox.x);n.x.min=e.target.x.min,n.x.max=n.x.min+t;let r=X(this.layout.layoutBox.y);n.y.min=e.target.y.min,n.y.max=n.y.min+r}$(t,n),ul(t,i),Oc(this.projectionDeltaWithTransform,this.layoutCorrected,t,i)}}registerSharedNode(e,t){this.sharedNodes.has(e)||this.sharedNodes.set(e,new iu),this.sharedNodes.get(e).add(t);let n=t.options.initialPromotionConfig;t.promote({transition:n?n.transition:void 0,preserveFollowOpacity:n&&n.shouldPreserveFollowOpacity?n.shouldPreserveFollowOpacity(t):void 0})}isLead(){let e=this.getStack();return e?e.lead===this:!0}getLead(){let{layoutId:e}=this.options;return e&&this.getStack()?.lead||this}getPrevLead(){let{layoutId:e}=this.options;return e?this.getStack()?.prevLead:void 0}getStack(){let{layoutId:e}=this.options;if(e)return this.root.sharedNodes.get(e)}promote({needsReset:e,transition:t,preserveFollowOpacity:n}={}){let r=this.getStack();r&&r.promote(this,n),e&&(this.projectionDelta=void 0,this.needsReset=!0),t&&this.setOptions({transition:t})}relegate(){let e=this.getStack();return e?e.relegate(this):!1}resetSkewAndRotation(){let{visualElement:e}=this.options;if(!e)return;let t=!1,{latestValues:n}=e;if((n.z||n.rotate||n.rotateX||n.rotateY||n.rotateZ||n.skewX||n.skewY)&&(t=!0),!t)return;let r={};n.z&&fu(`z`,e,r,this.animationValues);for(let t=0;t<cu.length;t++)fu(`rotate${cu[t]}`,e,r,this.animationValues),fu(`skew${cu[t]}`,e,r,this.animationValues);e.render();for(let t in r)e.setStaticValue(t,r[t]),this.animationValues&&(this.animationValues[t]=r[t]);e.scheduleRender()}getProjectionStyles(e){if(!this.instance||this.isSVG)return;if(!this.isVisible)return lu;let t={visibility:``},n=this.getTransformTemplate();if(this.needsReset)return this.needsReset=!1,t.opacity=``,t.pointerEvents=fr(e?.pointerEvents)||``,t.transform=n?n(this.latestValues,``):`none`,t;let r=this.getLead();if(!this.projectionDelta||!this.layout||!r.target){let t={};return this.options.layoutId&&(t.opacity=this.latestValues.opacity===void 0?1:this.latestValues.opacity,t.pointerEvents=fr(e?.pointerEvents)||``),this.hasProjected&&!Qc(this.latestValues)&&(t.transform=n?n({},``):`none`,this.hasProjected=!1),t}let i=r.animationValues||r.latestValues;this.applyTransformsToTarget(),t.transform=au(this.projectionDeltaWithTransform,this.treeScale,i),n&&(t.transform=n(i,t.transform));let{x:a,y:o}=this.projectionDelta;t.transformOrigin=`${a.origin*100}% ${o.origin*100}% 0`,r.animationValues?t.opacity=r===this?i.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:i.opacityExit:t.opacity=r===this?i.opacity===void 0?``:i.opacity:i.opacityExit===void 0?0:i.opacityExit;for(let e in Qr){if(i[e]===void 0)continue;let{correct:n,applyTo:a}=Qr[e],o=t.transform===`none`?i[e]:n(i[e],r);if(a){let e=a.length;for(let n=0;n<e;n++)t[a[n]]=o}else t[e]=o}return this.options.layoutId&&(t.pointerEvents=r===this?fr(e?.pointerEvents)||``:`none`),t}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(e=>e.currentAnimation?.stop()),this.root.nodes.forEach(bu),this.root.sharedNodes.clear()}}}function hu(e){e.updateLayout()}function gu(e){let t=e.resumeFrom?.snapshot||e.snapshot;if(e.isLead()&&e.layout&&t&&e.hasListeners(`didUpdate`)){let{layoutBox:n,measuredBox:r}=e.layout,{animationType:i}=e.options,a=t.source!==e.layout.source;i===`size`?Q(e=>{let r=a?t.measuredBox[e]:t.layoutBox[e],i=X(r);r.min=n[e].min,r.max=r.min+i}):Lu(i,t.layoutBox,n)&&Q(r=>{let i=a?t.measuredBox[r]:t.layoutBox[r],o=X(n[r]);i.max=i.min+o,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[r].max=e.relativeTarget[r].min+o)});let o=Gc();Oc(o,n,t.layoutBox);let s=Gc();a?Oc(s,e.applyTransform(r,!0),t.measuredBox):Oc(s,n,t.layoutBox);let c=!Zl(o),l=!1;if(!e.resumeFrom){let r=e.getClosestProjectingParent();if(r&&!r.resumeFrom){let{snapshot:i,layout:a}=r;if(i&&a){let o=Z();Mc(o,t.layoutBox,i.layoutBox);let s=Z();Mc(s,n,a.layoutBox),tu(o,s)||(l=!0),r.options.layoutRoot&&(e.relativeTarget=s,e.relativeTargetOrigin=o,e.relativeParent=r)}}}e.notifyListeners(`didUpdate`,{layout:n,snapshot:t,delta:s,layoutDelta:o,hasLayoutChanged:c,hasRelativeTargetChanged:l})}else if(e.isLead()){let{onExitComplete:t}=e.options;t&&t()}e.options.transition=void 0}function _u(e){su&&ou.totalNodes++,e.parent&&(e.isProjecting()||(e.isProjectionDirty=e.parent.isProjectionDirty),e.isSharedProjectionDirty||=!!(e.isProjectionDirty||e.parent.isProjectionDirty||e.parent.isSharedProjectionDirty),e.isTransformDirty||=e.parent.isTransformDirty)}function vu(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function yu(e){e.clearSnapshot()}function bu(e){e.clearMeasurements()}function xu(e){e.isLayoutDirty=!1}function Su(e){let{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify(`BeforeLayoutMeasure`),e.resetTransform()}function Cu(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function wu(e){e.resolveTargetDelta()}function Tu(e){e.calcProjection()}function Eu(e){e.resetSkewAndRotation()}function Du(e){e.removeLeadSnapshot()}function Ou(e,t,n){e.translate=q(t.translate,0,n),e.scale=q(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function ku(e,t,n,r){e.min=q(t.min,n.min,r),e.max=q(t.max,n.max,r)}function Au(e,t,n,r){ku(e.x,t.x,n.x,r),ku(e.y,t.y,n.y,r)}function ju(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}var Mu={duration:.45,ease:[.4,0,.1,1]},Nu=e=>typeof navigator<`u`&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),Pu=Nu(`applewebkit/`)&&!Nu(`chrome/`)?Math.round:I;function Fu(e){e.min=Pu(e.min),e.max=Pu(e.max)}function Iu(e){Fu(e.x),Fu(e.y)}function Lu(e,t,n){return e===`position`||e===`preserve-aspect`&&!Ec(nu(t),nu(n),.2)}function Ru(e){return e!==e.root&&e.scroll?.wasRoot}var zu=mu({attachResizeListener:(e,t)=>sc(e,`resize`,t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),Bu={current:void 0},Vu=mu({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!Bu.current){let e=new zu({});e.mount(window),e.setOptions({layoutScroll:!0}),Bu.current=e}return Bu.current},resetTransform:(e,t)=>{e.style.transform=t===void 0?`none`:t},checkIsScrollRoot:e=>window.getComputedStyle(e).position===`fixed`}),Hu={pan:{Feature:bl},drag:{Feature:vl,ProjectionNode:Vu,MeasureLayout:El}};function Uu(e,t,n){if(e instanceof Element)return[e];if(typeof e==`string`){let r=document;t&&(r=t.current);let i=n?.[e]??r.querySelectorAll(e);return i?Array.from(i):[]}return Array.from(e)}function Wu(e,t){let n=Uu(e),r=new AbortController;return[n,{passive:!0,...t,signal:r.signal},()=>r.abort()]}function Gu(e){return t=>{t.pointerType===`touch`||ic()||e(t)}}function Ku(e,t,n={}){let[r,i,a]=Wu(e,n),o=Gu(e=>{let{target:n}=e,r=t(e);if(typeof r!=`function`||!n)return;let a=Gu(e=>{r(e),n.removeEventListener(`pointerleave`,a)});n.addEventListener(`pointerleave`,a,i)});return r.forEach(e=>{e.addEventListener(`pointerenter`,o,i)}),a}function qu(e,t,n){let{props:r}=e;e.animationState&&r.whileHover&&e.animationState.setActive(`whileHover`,n===`Start`);let i=r[`onHover`+n];i&&L.postRender(()=>i(t,cc(t)))}var Ju=class extends ec{mount(){let{current:e}=this.node;e&&(this.unmount=Ku(e,e=>(qu(this.node,e,`Start`),e=>qu(this.node,e,`End`))))}unmount(){}},Yu=class extends ec{constructor(){super(...arguments),this.isActive=!1}onFocus(){let e=!1;try{e=this.node.current.matches(`:focus-visible`)}catch{e=!0}!e||!this.node.animationState||(this.node.animationState.setActive(`whileFocus`,!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive(`whileFocus`,!1),this.isActive=!1)}mount(){this.unmount=Io(sc(this.node.current,`focus`,()=>this.onFocus()),sc(this.node.current,`blur`,()=>this.onBlur()))}unmount(){}},Xu=(e,t)=>t?e===t?!0:Xu(e,t.parentElement):!1,Zu=new Set([`BUTTON`,`INPUT`,`SELECT`,`TEXTAREA`,`A`]);function Qu(e){return Zu.has(e.tagName)||e.tabIndex!==-1}var $u=new WeakSet;function ed(e){return t=>{t.key===`Enter`&&e(t)}}function td(e,t){e.dispatchEvent(new PointerEvent(`pointer`+t,{isPrimary:!0,bubbles:!0}))}var nd=(e,t)=>{let n=e.currentTarget;if(!n)return;let r=ed(()=>{if($u.has(n))return;td(n,`down`);let e=ed(()=>{td(n,`up`)});n.addEventListener(`keyup`,e,t),n.addEventListener(`blur`,()=>td(n,`cancel`),t)});n.addEventListener(`keydown`,r,t),n.addEventListener(`blur`,()=>n.removeEventListener(`keydown`,r),t)};function rd(e){return oc(e)&&!ic()}function id(e,t,n={}){let[r,i,a]=Wu(e,n),o=e=>{let r=e.currentTarget;if(!rd(e)||$u.has(r))return;$u.add(r);let a=t(e),o=(e,t)=>{window.removeEventListener(`pointerup`,s),window.removeEventListener(`pointercancel`,c),!(!rd(e)||!$u.has(r))&&($u.delete(r),typeof a==`function`&&a(e,{success:t}))},s=e=>{o(e,n.useGlobalTarget||Xu(r,e.target))},c=e=>{o(e,!1)};window.addEventListener(`pointerup`,s,i),window.addEventListener(`pointercancel`,c,i)};return r.forEach(e=>{!Qu(e)&&e.getAttribute(`tabindex`)===null&&(e.tabIndex=0),(n.useGlobalTarget?window:e).addEventListener(`pointerdown`,o,i),e.addEventListener(`focus`,e=>nd(e,i),i)}),a}function ad(e,t,n){let{props:r}=e;e.animationState&&r.whileTap&&e.animationState.setActive(`whileTap`,n===`Start`);let i=r[`onTap`+(n===`End`?``:n)];i&&L.postRender(()=>i(t,cc(t)))}var od=class extends ec{mount(){let{current:e}=this.node;e&&(this.unmount=id(e,e=>(ad(this.node,e,`Start`),(e,{success:t})=>ad(this.node,e,t?`End`:`Cancel`)),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}},sd=new WeakMap,cd=new WeakMap,ld=e=>{let t=sd.get(e.target);t&&t(e)},ud=e=>{e.forEach(ld)};function dd({root:e,...t}){let n=e||document;cd.has(n)||cd.set(n,{});let r=cd.get(n),i=JSON.stringify(t);return r[i]||(r[i]=new IntersectionObserver(ud,{root:e,...t})),r[i]}function fd(e,t,n){let r=dd(t);return sd.set(e,n),r.observe(e),()=>{sd.delete(e),r.unobserve(e)}}var pd={some:0,all:1},md=class extends ec{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();let{viewport:e={}}=this.node.getProps(),{root:t,margin:n,amount:r=`some`,once:i}=e,a={root:t?t.current:void 0,rootMargin:n,threshold:typeof r==`number`?r:pd[r]};return fd(this.node.current,a,e=>{let{isIntersecting:t}=e;if(this.isInView===t||(this.isInView=t,i&&!t&&this.hasEnteredView))return;t&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive(`whileInView`,t);let{onViewportEnter:n,onViewportLeave:r}=this.node.getProps(),a=t?n:r;a&&a(e)})}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>`u`)return;let{props:e,prevProps:t}=this.node;[`amount`,`margin`,`root`].some(hd(e,t))&&this.startObserver()}unmount(){}};function hd({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}var gd={inView:{Feature:md},tap:{Feature:od},focus:{Feature:Yu},hover:{Feature:Ju}},_d={layout:{ProjectionNode:Vu,MeasureLayout:El}},vd={current:null},yd={current:!1};function bd(){if(yd.current=!0,ln)if(window.matchMedia){let e=window.matchMedia(`(prefers-reduced-motion)`),t=()=>vd.current=e.matches;e.addListener(t),t()}else vd.current=!1}var xd=[...ho,K,Ra],Sd=e=>xd.find(mo(e)),Cd=new WeakMap;function wd(e,t,n){for(let r in t){let i=t[r],a=n[r];if(z(i))e.addValue(r,i);else if(z(a))e.addValue(r,Oi(i,{owner:e}));else if(a!==i)if(e.hasValue(r)){let t=e.getValue(r);t.liveStyle===!0?t.jump(i):t.hasAnimated||t.set(i)}else{let t=e.getStaticValue(r);e.addValue(r,Oi(t===void 0?i:t,{owner:e}))}}for(let r in n)t[r]===void 0&&e.removeValue(r);return t}var Td=[`AnimationStart`,`AnimationComplete`,`Update`,`BeforeLayoutMeasure`,`LayoutMeasure`,`LayoutAnimationStart`,`LayoutAnimationComplete`],Ed=class{scrapeMotionValuesFromProps(e,t,n){return{}}constructor({parent:e,props:t,presenceContext:n,reducedMotionConfig:r,blockInitialAnimation:i,visualState:a},o={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=so,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify(`Update`,this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{let e=U.now();this.renderScheduledAt<e&&(this.renderScheduledAt=e,L.render(this.render,!1,!0))};let{latestValues:s,renderState:c,onUpdate:l}=a;this.onUpdate=l,this.latestValues=s,this.baseTarget={...s},this.initialValues=t.initial?{...s}:{},this.renderState=c,this.parent=e,this.props=t,this.presenceContext=n,this.depth=e?e.depth+1:0,this.reducedMotionConfig=r,this.options=o,this.blockInitialAnimation=!!i,this.isControllingVariants=zn(t),this.isVariantNode=Bn(t),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(e&&e.current);let{willChange:u,...d}=this.scrapeMotionValuesFromProps(t,{},this);for(let e in d){let t=d[e];s[e]!==void 0&&z(t)&&t.set(s[e],!1)}}mount(e){this.current=e,Cd.set(e,this),this.projection&&!this.projection.instance&&this.projection.mount(e),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((e,t)=>this.bindToMotionValue(t,e)),yd.current||bd(),this.shouldReduceMotion=this.reducedMotionConfig===`never`?!1:this.reducedMotionConfig===`always`?!0:vd.current,this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){Cd.delete(this.current),this.projection&&this.projection.unmount(),yn(this.notifyUpdate),yn(this.render),this.valueSubscriptions.forEach(e=>e()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent&&this.parent.children.delete(this);for(let e in this.events)this.events[e].clear();for(let e in this.features){let t=this.features[e];t&&(t.unmount(),t.isMounted=!1)}this.current=null}bindToMotionValue(e,t){this.valueSubscriptions.has(e)&&this.valueSubscriptions.get(e)();let n=_r.has(e),r=t.on(`change`,t=>{this.latestValues[e]=t,this.props.onUpdate&&L.preRender(this.notifyUpdate),n&&this.projection&&(this.projection.isTransformDirty=!0)}),i=t.on(`renderRequest`,this.scheduleRender),a;window.MotionCheckAppearSync&&(a=window.MotionCheckAppearSync(this,e,t)),this.valueSubscriptions.set(e,()=>{r(),i(),a&&a(),t.owner&&t.stop()})}sortNodePosition(e){return!this.current||!this.sortInstanceNodePosition||this.type!==e.type?0:this.sortInstanceNodePosition(this.current,e.current)}updateFeatures(){let e=`animation`;for(e in Cn){let t=Cn[e];if(!t)continue;let{isEnabled:n,Feature:r}=t;if(!this.features[e]&&r&&n(this.props)&&(this.features[e]=new r(this)),this.features[e]){let t=this.features[e];t.isMounted?t.update():(t.mount(),t.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):Z()}getStaticValue(e){return this.latestValues[e]}setStaticValue(e,t){this.latestValues[e]=t}update(e,t){(e.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=e,this.prevPresenceContext=this.presenceContext,this.presenceContext=t;for(let t=0;t<Td.length;t++){let n=Td[t];this.propEventSubscriptions[n]&&(this.propEventSubscriptions[n](),delete this.propEventSubscriptions[n]);let r=e[`on`+n];r&&(this.propEventSubscriptions[n]=this.on(n,r))}this.prevMotionValues=wd(this,this.scrapeMotionValuesFromProps(e,this.prevProps,this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue(),this.onUpdate&&this.onUpdate(this)}getProps(){return this.props}getVariant(e){return this.props.variants?this.props.variants[e]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(e){let t=this.getClosestVariantNode();if(t)return t.variantChildren&&t.variantChildren.add(e),()=>t.variantChildren.delete(e)}addValue(e,t){let n=this.values.get(e);t!==n&&(n&&this.removeValue(e),this.bindToMotionValue(e,t),this.values.set(e,t),this.latestValues[e]=t.get())}removeValue(e){this.values.delete(e);let t=this.valueSubscriptions.get(e);t&&(t(),this.valueSubscriptions.delete(e)),delete this.latestValues[e],this.removeValueFromRenderState(e,this.renderState)}hasValue(e){return this.values.has(e)}getValue(e,t){if(this.props.values&&this.props.values[e])return this.props.values[e];let n=this.values.get(e);return n===void 0&&t!==void 0&&(n=Oi(t===null?void 0:t,{owner:this}),this.addValue(e,n)),n}readValue(e,t){let n=this.latestValues[e]!==void 0||!this.current?this.latestValues[e]:this.getBaseTargetFromProps(this.props,e)??this.readValueFromInstance(this.current,e,this.options);return n!=null&&(typeof n==`string`&&(co(n)||da(n))?n=parseFloat(n):!Sd(n)&&Ra.test(t)&&(n=Ga(e,t)),this.setBaseTarget(e,z(n)?n.get():n)),z(n)?n.get():n}setBaseTarget(e,t){this.baseTarget[e]=t}getBaseTarget(e){let{initial:t}=this.props,n;if(typeof t==`string`||typeof t==`object`){let r=cr(this.props,t,this.presenceContext?.custom);r&&(n=r[e])}if(t&&n!==void 0)return n;let r=this.getBaseTargetFromProps(this.props,e);return r!==void 0&&!z(r)?r:this.initialValues[e]!==void 0&&n===void 0?void 0:this.baseTarget[e]}on(e,t){return this.events[e]||(this.events[e]=new Si),this.events[e].add(t)}notify(e,...t){this.events[e]&&this.events[e].notify(...t)}},Dd=class extends Ed{constructor(){super(...arguments),this.KeyframeResolver=_o}sortInstanceNodePosition(e,t){return e.compareDocumentPosition(t)&2?1:-1}getBaseTargetFromProps(e,t){return e.style?e.style[t]:void 0}removeValueFromRenderState(e,{vars:t,style:n}){delete t[e],delete n[e]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);let{children:e}=this.props;z(e)&&(this.childSubscription=e.on(`change`,e=>{this.current&&(this.current.textContent=`${e}`)}))}};function Od(e){return window.getComputedStyle(e)}var kd=class extends Dd{constructor(){super(...arguments),this.type=`html`,this.renderInstance=Yr}readValueFromInstance(e,t){if(_r.has(t)){let e=Wa(t);return e&&e.default||0}else{let n=Od(e),r=(yr(t)?n.getPropertyValue(t):n[t])||0;return typeof r==`string`?r.trim():r}}measureInstanceViewportBox(e,{transformPagePoint:t}){return dl(e,t)}build(e,t,n){zr(e,t,n.transformTemplate)}scrapeMotionValuesFromProps(e,t,n){return ti(e,t,n)}},Ad=class extends Dd{constructor(){super(...arguments),this.type=`svg`,this.isSVGTag=!1,this.measureInstanceViewportBox=Z}getBaseTargetFromProps(e,t){return e[t]}readValueFromInstance(e,t){if(_r.has(t)){let e=Wa(t);return e&&e.default||0}return t=Xr.has(t)?t:qn(t),e.getAttribute(t)}scrapeMotionValuesFromProps(e,t,n){return ni(e,t,n)}build(e,t,n){Gr(e,t,this.isSVGTag,n.transformTemplate)}renderInstance(e,t,n,r){Zr(e,t,n,r)}mount(e){this.isSVGTag=Jr(e.tagName),super.mount(e)}},jd=(e,t)=>or(e)?new Ad(t):new kd(t,{allowProjection:e!==w}),Md=Nn(pi({...rc,...gd,...Hu,..._d},jd));function Nd(){!yd.current&&bd();let[e]=Ne(vd.current);return e}export{C,be as S,T,Be as _,bt as a,P as b,qt as c,Dt as d,Yt as f,Ne as g,Ie as h,F as i,nt as l,N as m,Md as n,Xe as o,M as p,dn as r,Jt as s,Nd as t,Wt as u,Pe as v,w,Fe as x,Re as y};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{d as e,u as t}from"./motion-CBnf8hfk.js";function n(n){return{render:function(t){e(t,n)},unmount:function(){t(n)}}}var r,i,a,o,s,c,l,u,d,f={},p=[],m=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i;function h(e,t){for(var n in t)e[n]=t[n];return e}function g(e){var t=e.parentNode;t&&t.removeChild(e)}function _(e,t,n){var i,a,o,s={};for(o in t)o==`key`?i=t[o]:o==`ref`?a=t[o]:s[o]=t[o];if(arguments.length>2&&(s.children=arguments.length>3?r.call(arguments,2):n),typeof e==`function`&&e.defaultProps!=null)for(o in e.defaultProps)s[o]===void 0&&(s[o]=e.defaultProps[o]);return v(e,s,i,a,null)}function v(e,t,n,r,o){var s={type:e,props:t,key:n,ref:r,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:o??++a};return o==null&&i.vnode!=null&&i.vnode(s),s}function y(){return{current:null}}function b(e){return e.children}function x(e,t,n,r,i){for(var a in n)a===`children`||a===`key`||a in t||C(e,a,null,n[a],r);for(a in t)i&&typeof t[a]!=`function`||a===`children`||a===`key`||a===`value`||a===`checked`||n[a]===t[a]||C(e,a,t[a],n[a],r)}function S(e,t,n){t[0]===`-`?e.setProperty(t,n??``):e[t]=n==null?``:typeof n!=`number`||m.test(t)?n:n+`px`}function C(e,t,n,r,i){var a;n:if(t===`style`)if(typeof n==`string`)e.style.cssText=n;else{if(typeof r==`string`&&(e.style.cssText=r=``),r)for(t in r)n&&t in n||S(e.style,t,``);if(n)for(t in n)r&&n[t]===r[t]||S(e.style,t,n[t])}else if(t[0]===`o`&&t[1]===`n`)a=t!==(t=t.replace(/Capture$/,``)),t=t.toLowerCase()in e?t.toLowerCase().slice(2):t.slice(2),e.l||={},e.l[t+a]=n,n?r||e.addEventListener(t,a?T:w,a):e.removeEventListener(t,a?T:w,a);else if(t!==`dangerouslySetInnerHTML`){if(i)t=t.replace(/xlink(H|:h)/,`h`).replace(/sName$/,`s`);else if(t!==`width`&&t!==`height`&&t!==`href`&&t!==`list`&&t!==`form`&&t!==`tabIndex`&&t!==`download`&&t in e)try{e[t]=n??``;break n}catch{}typeof n==`function`||(n==null||!1===n&&t.indexOf(`-`)==-1?e.removeAttribute(t):e.setAttribute(t,n))}}function w(e){s=!0;try{return this.l[e.type+!1](i.event?i.event(e):e)}finally{s=!1}}function T(e){s=!0;try{return this.l[e.type+!0](i.event?i.event(e):e)}finally{s=!1}}function E(e,t){this.props=e,this.context=t}function D(e,t){if(t==null)return e.__?D(e.__,e.__.__k.indexOf(e)+1):null;for(var n;t<e.__k.length;t++)if((n=e.__k[t])!=null&&n.__e!=null)return n.__e;return typeof e.type==`function`?D(e):null}function O(e){var t,n;if((e=e.__)!=null&&e.__c!=null){for(e.__e=e.__c.base=null,t=0;t<e.__k.length;t++)if((n=e.__k[t])!=null&&n.__e!=null){e.__e=e.__c.base=n.__e;break}return O(e)}}function ee(e){s?setTimeout(e):u(e)}function k(e){(!e.__d&&(e.__d=!0)&&c.push(e)&&!A.__r++||l!==i.debounceRendering)&&((l=i.debounceRendering)||ee)(A)}function A(){var e,t,n,r,i,a,o,s;for(c.sort(function(e,t){return e.__v.__b-t.__v.__b});e=c.shift();)e.__d&&(t=c.length,r=void 0,i=void 0,o=(a=(n=e).__v).__e,(s=n.__P)&&(r=[],(i=h({},a)).__v=a.__v+1,F(s,a,i,n.__n,s.ownerSVGElement!==void 0,a.__h==null?null:[o],r,o??D(a),a.__h),ne(r,a),a.__e!=o&&O(a)),c.length>t&&c.sort(function(e,t){return e.__v.__b-t.__v.__b}));A.__r=0}function j(e,t,n,r,i,a,o,s,c,l){var u,d,m,h,g,_,y,x=r&&r.__k||p,S=x.length;for(n.__k=[],u=0;u<t.length;u++)if((h=n.__k[u]=(h=t[u])==null||typeof h==`boolean`?null:typeof h==`string`||typeof h==`number`||typeof h==`bigint`?v(null,h,null,null,h):Array.isArray(h)?v(b,{children:h},null,null,null):h.__b>0?v(h.type,h.props,h.key,h.ref?h.ref:null,h.__v):h)!=null){if(h.__=n,h.__b=n.__b+1,(m=x[u])===null||m&&h.key==m.key&&h.type===m.type)x[u]=void 0;else for(d=0;d<S;d++){if((m=x[d])&&h.key==m.key&&h.type===m.type){x[d]=void 0;break}m=null}F(e,h,m||=f,i,a,o,s,c,l),g=h.__e,(d=h.ref)&&m.ref!=d&&(y||=[],m.ref&&y.push(m.ref,null,h),y.push(d,h.__c||g,h)),g==null?c&&m.__e==c&&c.parentNode!=e&&(c=D(m)):(_??=g,typeof h.type==`function`&&h.__k===m.__k?h.__d=c=te(h,c,e):c=N(e,h,m,x,g,c),typeof n.type==`function`&&(n.__d=c))}for(n.__e=_,u=S;u--;)x[u]!=null&&(typeof n.type==`function`&&x[u].__e!=null&&x[u].__e==n.__d&&(n.__d=P(r).nextSibling),ie(x[u],x[u]));if(y)for(u=0;u<y.length;u++)I(y[u],y[++u],y[++u])}function te(e,t,n){for(var r,i=e.__k,a=0;i&&a<i.length;a++)(r=i[a])&&(r.__=e,t=typeof r.type==`function`?te(r,t,n):N(n,r,r,i,r.__e,t));return t}function M(e,t){return t||=[],e==null||typeof e==`boolean`||(Array.isArray(e)?e.some(function(e){M(e,t)}):t.push(e)),t}function N(e,t,n,r,i,a){var o,s,c;if(t.__d!==void 0)o=t.__d,t.__d=void 0;else if(n==null||i!=a||i.parentNode==null)n:if(a==null||a.parentNode!==e)e.appendChild(i),o=null;else{for(s=a,c=0;(s=s.nextSibling)&&c<r.length;c+=1)if(s==i)break n;e.insertBefore(i,a),o=a}return o===void 0?i.nextSibling:o}function P(e){var t,n,r;if(e.type==null||typeof e.type==`string`)return e.__e;if(e.__k){for(t=e.__k.length-1;t>=0;t--)if((n=e.__k[t])&&(r=P(n)))return r}return null}function F(e,t,n,r,a,o,s,c,l){var u,d,f,p,m,g,_,v,y,x,S,C,w,T,D,O=t.type;if(t.constructor!==void 0)return null;n.__h!=null&&(l=n.__h,c=t.__e=n.__e,t.__h=null,o=[c]),(u=i.__b)&&u(t);try{n:if(typeof O==`function`){if(v=t.props,y=(u=O.contextType)&&r[u.__c],x=u?y?y.props.value:u.__:r,n.__c?_=(d=t.__c=n.__c).__=d.__E:(`prototype`in O&&O.prototype.render?t.__c=d=new O(v,x):(t.__c=d=new E(v,x),d.constructor=O,d.render=ae),y&&y.sub(d),d.props=v,d.state||={},d.context=x,d.__n=r,f=d.__d=!0,d.__h=[],d._sb=[]),d.__s??=d.state,O.getDerivedStateFromProps!=null&&(d.__s==d.state&&(d.__s=h({},d.__s)),h(d.__s,O.getDerivedStateFromProps(v,d.__s))),p=d.props,m=d.state,d.__v=t,f)O.getDerivedStateFromProps==null&&d.componentWillMount!=null&&d.componentWillMount(),d.componentDidMount!=null&&d.__h.push(d.componentDidMount);else{if(O.getDerivedStateFromProps==null&&v!==p&&d.componentWillReceiveProps!=null&&d.componentWillReceiveProps(v,x),!d.__e&&d.shouldComponentUpdate!=null&&!1===d.shouldComponentUpdate(v,d.__s,x)||t.__v===n.__v){for(t.__v!==n.__v&&(d.props=v,d.state=d.__s,d.__d=!1),t.__e=n.__e,t.__k=n.__k,t.__k.forEach(function(e){e&&(e.__=t)}),S=0;S<d._sb.length;S++)d.__h.push(d._sb[S]);d._sb=[],d.__h.length&&s.push(d);break n}d.componentWillUpdate!=null&&d.componentWillUpdate(v,d.__s,x),d.componentDidUpdate!=null&&d.__h.push(function(){d.componentDidUpdate(p,m,g)})}if(d.context=x,d.props=v,d.__P=e,C=i.__r,w=0,`prototype`in O&&O.prototype.render){for(d.state=d.__s,d.__d=!1,C&&C(t),u=d.render(d.props,d.state,d.context),T=0;T<d._sb.length;T++)d.__h.push(d._sb[T]);d._sb=[]}else do d.__d=!1,C&&C(t),u=d.render(d.props,d.state,d.context),d.state=d.__s;while(d.__d&&++w<25);d.state=d.__s,d.getChildContext!=null&&(r=h(h({},r),d.getChildContext())),f||d.getSnapshotBeforeUpdate==null||(g=d.getSnapshotBeforeUpdate(p,m)),D=u!=null&&u.type===b&&u.key==null?u.props.children:u,j(e,Array.isArray(D)?D:[D],t,n,r,a,o,s,c,l),d.base=t.__e,t.__h=null,d.__h.length&&s.push(d),_&&(d.__E=d.__=null),d.__e=!1}else o==null&&t.__v===n.__v?(t.__k=n.__k,t.__e=n.__e):t.__e=re(n.__e,t,n,r,a,o,s,l);(u=i.diffed)&&u(t)}catch(e){t.__v=null,(l||o!=null)&&(t.__e=c,t.__h=!!l,o[o.indexOf(c)]=null),i.__e(e,t,n)}}function ne(e,t){i.__c&&i.__c(t,e),e.some(function(t){try{e=t.__h,t.__h=[],e.some(function(e){e.call(t)})}catch(e){i.__e(e,t.__v)}})}function re(e,t,n,i,a,o,s,c){var l,u,d,p=n.props,m=t.props,h=t.type,_=0;if(h===`svg`&&(a=!0),o!=null){for(;_<o.length;_++)if((l=o[_])&&`setAttribute`in l==!!h&&(h?l.localName===h:l.nodeType===3)){e=l,o[_]=null;break}}if(e==null){if(h===null)return document.createTextNode(m);e=a?document.createElementNS(`http://www.w3.org/2000/svg`,h):document.createElement(h,m.is&&m),o=null,c=!1}if(h===null)p===m||c&&e.data===m||(e.data=m);else{if(o&&=r.call(e.childNodes),u=(p=n.props||f).dangerouslySetInnerHTML,d=m.dangerouslySetInnerHTML,!c){if(o!=null)for(p={},_=0;_<e.attributes.length;_++)p[e.attributes[_].name]=e.attributes[_].value;(d||u)&&(d&&(u&&d.__html==u.__html||d.__html===e.innerHTML)||(e.innerHTML=d&&d.__html||``))}if(x(e,m,p,a,c),d)t.__k=[];else if(_=t.props.children,j(e,Array.isArray(_)?_:[_],t,n,i,a&&h!==`foreignObject`,o,s,o?o[0]:n.__k&&D(n,0),c),o!=null)for(_=o.length;_--;)o[_]!=null&&g(o[_]);c||(`value`in m&&(_=m.value)!==void 0&&(_!==e.value||h===`progress`&&!_||h===`option`&&_!==p.value)&&C(e,`value`,_,p.value,!1),`checked`in m&&(_=m.checked)!==void 0&&_!==e.checked&&C(e,`checked`,_,p.checked,!1))}return e}function I(e,t,n){try{typeof e==`function`?e(t):e.current=t}catch(e){i.__e(e,n)}}function ie(e,t,n){var r,a;if(i.unmount&&i.unmount(e),(r=e.ref)&&(r.current&&r.current!==e.__e||I(r,null,t)),(r=e.__c)!=null){if(r.componentWillUnmount)try{r.componentWillUnmount()}catch(e){i.__e(e,t)}r.base=r.__P=null,e.__c=void 0}if(r=e.__k)for(a=0;a<r.length;a++)r[a]&&ie(r[a],t,n||typeof e.type!=`function`);n||e.__e==null||g(e.__e),e.__=e.__e=e.__d=void 0}function ae(e,t,n){return this.constructor(e,n)}function L(e,t,n){var a,o,s;i.__&&i.__(e,t),o=(a=typeof n==`function`)?null:n&&n.__k||t.__k,s=[],F(t,e=(!a&&n||t).__k=_(b,null,[e]),o||f,f,t.ownerSVGElement!==void 0,!a&&n?[n]:o?null:t.firstChild?r.call(t.childNodes):null,s,!a&&n?n:o?o.__e:t.firstChild,a),ne(s,e)}function oe(e,t){var n={__c:t=`__cC`+ d++,__:e,Consumer:function(e,t){return e.children(t)},Provider:function(e){var n,r;return this.getChildContext||(n=[],(r={})[t]=this,this.getChildContext=function(){return r},this.shouldComponentUpdate=function(e){this.props.value!==e.value&&n.some(function(e){e.__e=!0,k(e)})},this.sub=function(e){n.push(e);var t=e.componentWillUnmount;e.componentWillUnmount=function(){n.splice(n.indexOf(e),1),t&&t.call(e)}}),e.children}};return n.Provider.__=n.Consumer.contextType=n}r=p.slice,i={__e:function(e,t,n,r){for(var i,a,o;t=t.__;)if((i=t.__c)&&!i.__)try{if((a=i.constructor)&&a.getDerivedStateFromError!=null&&(i.setState(a.getDerivedStateFromError(e)),o=i.__d),i.componentDidCatch!=null&&(i.componentDidCatch(e,r||{}),o=i.__d),o)return i.__E=i}catch(t){e=t}throw e}},a=0,o=function(e){return e!=null&&e.constructor===void 0},s=!1,E.prototype.setState=function(e,t){var n=this.__s!=null&&this.__s!==this.state?this.__s:this.__s=h({},this.state);typeof e==`function`&&(e=e(h({},n),this.props)),e&&h(n,e),e!=null&&this.__v&&(t&&this._sb.push(t),k(this))},E.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),k(this))},E.prototype.render=b,c=[],u=typeof Promise==`function`?Promise.prototype.then.bind(Promise.resolve()):setTimeout,A.__r=0,d=0;var R,z,B,V=[],H=[],U=i.__b,W=i.__r,G=i.diffed,K=i.__c,q=i.unmount;function se(){for(var e;e=V.shift();)if(e.__P&&e.__H)try{e.__H.__h.forEach(Y),e.__H.__h.forEach(X),e.__H.__h=[]}catch(t){e.__H.__h=[],i.__e(t,e.__v)}}i.__b=function(e){R=null,U&&U(e)},i.__r=function(e){W&&W(e);var t=(R=e.__c).__H;t&&(z===R?(t.__h=[],R.__h=[],t.__.forEach(function(e){e.__N&&(e.__=e.__N),e.__V=H,e.__N=e.i=void 0})):(t.__h.forEach(Y),t.__h.forEach(X),t.__h=[])),z=R},i.diffed=function(e){G&&G(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(V.push(t)!==1&&B===i.requestAnimationFrame||((B=i.requestAnimationFrame)||ce)(se)),t.__H.__.forEach(function(e){e.i&&(e.__H=e.i),e.__V!==H&&(e.__=e.__V),e.i=void 0,e.__V=H})),z=R=null},i.__c=function(e,t){t.some(function(e){try{e.__h.forEach(Y),e.__h=e.__h.filter(function(e){return!e.__||X(e)})}catch(n){t.some(function(e){e.__h&&=[]}),t=[],i.__e(n,e.__v)}}),K&&K(e,t)},i.unmount=function(e){q&&q(e);var t,n=e.__c;n&&n.__H&&(n.__H.__.forEach(function(e){try{Y(e)}catch(e){t=e}}),n.__H=void 0,t&&i.__e(t,n.__v))};var J=typeof requestAnimationFrame==`function`;function ce(e){var t,n=function(){clearTimeout(r),J&&cancelAnimationFrame(t),setTimeout(e)},r=setTimeout(n,100);J&&(t=requestAnimationFrame(n))}function Y(e){var t=R,n=e.__c;typeof n==`function`&&(e.__c=void 0,n()),R=t}function X(e){var t=R;e.__c=e.__(),R=t}function le(e,t){for(var n in t)e[n]=t[n];return e}function ue(e,t){for(var n in e)if(n!==`__source`&&!(n in t))return!0;for(var r in t)if(r!==`__source`&&e[r]!==t[r])return!0;return!1}function de(e){this.props=e}(de.prototype=new E).isPureReactComponent=!0,de.prototype.shouldComponentUpdate=function(e,t){return ue(this.props,e)||ue(this.state,t)};var fe=i.__b;i.__b=function(e){e.type&&e.type.__f&&e.ref&&(e.props.ref=e.ref,e.ref=null),fe&&fe(e)},typeof Symbol<`u`&&Symbol.for;var pe=i.__e;i.__e=function(e,t,n,r){if(e.then){for(var i,a=t;a=a.__;)if((i=a.__c)&&i.__c)return t.__e??(t.__e=n.__e,t.__k=n.__k),i.__c(e,t)}pe(e,t,n,r)};var me=i.unmount;function he(e,t,n){return e&&(e.__c&&e.__c.__H&&(e.__c.__H.__.forEach(function(e){typeof e.__c==`function`&&e.__c()}),e.__c.__H=null),(e=le({},e)).__c!=null&&(e.__c.__P===n&&(e.__c.__P=t),e.__c=null),e.__k=e.__k&&e.__k.map(function(e){return he(e,t,n)})),e}function ge(e,t,n){return e&&(e.__v=null,e.__k=e.__k&&e.__k.map(function(e){return ge(e,t,n)}),e.__c&&e.__c.__P===t&&(e.__e&&n.insertBefore(e.__e,e.__d),e.__c.__e=!0,e.__c.__P=n)),e}function Z(){this.__u=0,this.t=null,this.__b=null}function _e(e){var t=e.__.__c;return t&&t.__a&&t.__a(e)}function Q(){this.u=null,this.o=null}i.unmount=function(e){var t=e.__c;t&&t.__R&&t.__R(),t&&!0===e.__h&&(e.type=null),me&&me(e)},(Z.prototype=new E).__c=function(e,t){var n=t.__c,r=this;r.t??=[],r.t.push(n);var i=_e(r.__v),a=!1,o=function(){a||(a=!0,n.__R=null,i?i(s):s())};n.__R=o;var s=function(){if(!--r.__u){if(r.state.__a){var e=r.state.__a;r.__v.__k[0]=ge(e,e.__c.__P,e.__c.__O)}var t;for(r.setState({__a:r.__b=null});t=r.t.pop();)t.forceUpdate()}},c=!0===t.__h;r.__u++||c||r.setState({__a:r.__b=r.__v.__k[0]}),e.then(o,o)},Z.prototype.componentWillUnmount=function(){this.t=[]},Z.prototype.render=function(e,t){if(this.__b){if(this.__v.__k){var n=document.createElement(`div`),r=this.__v.__k[0].__c;this.__v.__k[0]=he(this.__b,n,r.__O=r.__P)}this.__b=null}var i=t.__a&&_(b,null,e.fallback);return i&&(i.__h=null),[_(b,null,t.__a?null:e.children),i]};var ve=function(e,t,n){if(++n[1]===n[0]&&e.o.delete(t),e.props.revealOrder&&(e.props.revealOrder[0]!==`t`||!e.o.size))for(n=e.u;n;){for(;n.length>3;)n.pop()();if(n[1]<n[0])break;e.u=n=n[2]}};function ye(e){return this.getChildContext=function(){return e.context},e.children}function be(e){var t=this,n=e.i;t.componentWillUnmount=function(){L(null,t.l),t.l=null,t.i=null},t.i&&t.i!==n&&t.componentWillUnmount(),e.__v?(t.l||=(t.i=n,{nodeType:1,parentNode:n,childNodes:[],appendChild:function(e){this.childNodes.push(e),t.i.appendChild(e)},insertBefore:function(e,n){this.childNodes.push(e),t.i.appendChild(e)},removeChild:function(e){this.childNodes.splice(this.childNodes.indexOf(e)>>>1,1),t.i.removeChild(e)}}),L(_(ye,{context:t.context},e.__v),t.l)):t.l&&t.componentWillUnmount()}function xe(e,t){var n=_(be,{__v:e,i:t});return n.containerInfo=t,n}(Q.prototype=new E).__a=function(e){var t=this,n=_e(t.__v),r=t.o.get(e);return r[0]++,function(i){var a=function(){t.props.revealOrder?(r.push(i),ve(t,e,r)):i()};n?n(a):a()}},Q.prototype.render=function(e){this.u=null,this.o=new Map;var t=M(e.children);e.revealOrder&&e.revealOrder[0]===`b`&&t.reverse();for(var n=t.length;n--;)this.o.set(t[n],this.u=[1,0,this.u]);return e.children},Q.prototype.componentDidUpdate=Q.prototype.componentDidMount=function(){var e=this;this.o.forEach(function(t,n){ve(e,n,t)})};var Se=typeof Symbol<`u`&&Symbol.for&&Symbol.for(`react.element`)||60103,Ce=/^(?:accent|alignment|arabic|baseline|cap|clip(?!PathU)|color|dominant|fill|flood|font|glyph(?!R)|horiz|image|letter|lighting|marker(?!H|W|U)|overline|paint|pointer|shape|stop|strikethrough|stroke|text(?!L)|transform|underline|unicode|units|v|vector|vert|word|writing|x(?!C))[A-Z]/,we=typeof document<`u`,Te=function(e){return(typeof Symbol<`u`&&typeof Symbol()==`symbol`?/fil|che|rad/i:/fil|che|ra/i).test(e)};E.prototype.isReactComponent={},[`componentWillMount`,`componentWillReceiveProps`,`componentWillUpdate`].forEach(function(e){Object.defineProperty(E.prototype,e,{configurable:!0,get:function(){return this[`UNSAFE_`+e]},set:function(t){Object.defineProperty(this,e,{configurable:!0,writable:!0,value:t})}})});var Ee=i.event;function De(){}function Oe(){return this.cancelBubble}function ke(){return this.defaultPrevented}i.event=function(e){return Ee&&(e=Ee(e)),e.persist=De,e.isPropagationStopped=Oe,e.isDefaultPrevented=ke,e.nativeEvent=e};var Ae={configurable:!0,get:function(){return this.class}},je=i.vnode;i.vnode=function(e){var t=e.type,n=e.props,r=n;if(typeof t==`string`){var i=t.indexOf(`-`)===-1;for(var a in r={},n){var o=n[a];we&&a===`children`&&t===`noscript`||a===`value`&&`defaultValue`in n&&o==null||(a===`defaultValue`&&`value`in n&&n.value==null?a=`value`:a===`download`&&!0===o?o=``:/ondoubleclick/i.test(a)?a=`ondblclick`:/^onchange(textarea|input)/i.test(a+t)&&!Te(n.type)?a=`oninput`:/^onfocus$/i.test(a)?a=`onfocusin`:/^onblur$/i.test(a)?a=`onfocusout`:/^on(Ani|Tra|Tou|BeforeInp|Compo)/.test(a)?a=a.toLowerCase():i&&Ce.test(a)?a=a.replace(/[A-Z0-9]/g,`-$&`).toLowerCase():o===null&&(o=void 0),/^oninput$/i.test(a)&&(a=a.toLowerCase(),r[a]&&(a=`oninputCapture`)),r[a]=o)}t==`select`&&r.multiple&&Array.isArray(r.value)&&(r.value=M(n.children).forEach(function(e){e.props.selected=r.value.indexOf(e.props.value)!=-1})),t==`select`&&r.defaultValue!=null&&(r.value=M(n.children).forEach(function(e){e.props.selected=r.multiple?r.defaultValue.indexOf(e.props.value)!=-1:r.defaultValue==e.props.value})),e.props=r,n.class!=n.className&&(Ae.enumerable=`className`in n,n.className!=null&&(r.class=n.className),Object.defineProperty(r,`className`,Ae))}e.$$typeof=Se,je&&je(e)};var $=i.__r;i.__r=function(e){$&&$(e),e.__c};export{y as a,E as c,b as i,_ as l,L as n,o,oe as r,i as s,xe as t,n as u};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{S as e,b as t,g as n,i as r,m as i,o as a,x as o,y as s}from"./motion-CBnf8hfk.js";var c=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},l={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},u=new class{#e=l;setTimeoutProvider(e){this.#e=e}setTimeout(e,t){return this.#e.setTimeout(e,t)}clearTimeout(e){this.#e.clearTimeout(e)}setInterval(e,t){return this.#e.setInterval(e,t)}clearInterval(e){this.#e.clearInterval(e)}};function d(e){setTimeout(e,0)}var f=typeof window>`u`||`Deno`in globalThis;function p(){}function m(e,t){return typeof e==`function`?e(t):e}function h(e){return typeof e==`number`&&e>=0&&e!==1/0}function g(e,t){return Math.max(e+(t||0)-Date.now(),0)}function _(e,t){return typeof e==`function`?e(t):e}function v(e,t){return typeof e==`function`?e(t):e}function y(e,t){let{type:n=`all`,exact:r,fetchStatus:i,predicate:a,queryKey:o,stale:s}=e;if(o){if(r){if(t.queryHash!==x(o,t.options))return!1}else if(!C(t.queryKey,o))return!1}if(n!==`all`){let e=t.isActive();if(n===`active`&&!e||n===`inactive`&&e)return!1}return!(typeof s==`boolean`&&t.isStale()!==s||i&&i!==t.state.fetchStatus||a&&!a(t))}function b(e,t){let{exact:n,status:r,predicate:i,mutationKey:a}=e;if(a){if(!t.options.mutationKey)return!1;if(n){if(S(t.options.mutationKey)!==S(a))return!1}else if(!C(t.options.mutationKey,a))return!1}return!(r&&t.state.status!==r||i&&!i(t))}function x(e,t){return(t?.queryKeyHashFn||S)(e)}function S(e){return JSON.stringify(e,(e,t)=>E(t)?Object.keys(t).sort().reduce((e,n)=>(e[n]=t[n],e),{}):t)}function C(e,t){return e===t?!0:typeof e==typeof t&&e&&t&&typeof e==`object`&&typeof t==`object`?Object.keys(t).every(n=>C(e[n],t[n])):!1}var ee=Object.prototype.hasOwnProperty;function w(e,t,n=0){if(e===t)return e;if(n>500)return t;let r=te(e)&&te(t);if(!r&&!(E(e)&&E(t)))return t;let i=(r?e:Object.keys(e)).length,a=r?t:Object.keys(t),o=a.length,s=r?Array(o):{},c=0;for(let l=0;l<o;l++){let o=r?l:a[l],u=e[o],d=t[o];if(u===d){s[o]=u,(r?l<i:ee.call(e,o))&&c++;continue}if(u===null||d===null||typeof u!=`object`||typeof d!=`object`){s[o]=d;continue}let f=w(u,d,n+1);s[o]=f,f===u&&c++}return i===o&&c===i?e:s}function T(e,t){if(!t||Object.keys(e).length!==Object.keys(t).length)return!1;for(let n in e)if(e[n]!==t[n])return!1;return!0}function te(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function E(e){if(!D(e))return!1;let t=e.constructor;if(t===void 0)return!0;let n=t.prototype;return!(!D(n)||!n.hasOwnProperty(`isPrototypeOf`)||Object.getPrototypeOf(e)!==Object.prototype)}function D(e){return Object.prototype.toString.call(e)===`[object Object]`}function ne(e){return new Promise(t=>{u.setTimeout(t,e)})}function O(e,t,n){return typeof n.structuralSharing==`function`?n.structuralSharing(e,t):n.structuralSharing===!1?t:w(e,t)}function re(e,t,n=0){let r=[...e,t];return n&&r.length>n?r.slice(1):r}function ie(e,t,n=0){let r=[t,...e];return n&&r.length>n?r.slice(0,-1):r}var k=Symbol();function A(e,t){return!e.queryFn&&t?.initialPromise?()=>t.initialPromise:!e.queryFn||e.queryFn===k?()=>Promise.reject(Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function j(e,t){return typeof e==`function`?e(...t):!!e}function ae(e,t,n){let r=!1,i;return Object.defineProperty(e,`signal`,{enumerable:!0,get:()=>(i??=t(),r?i:(r=!0,i.aborted?n():i.addEventListener(`abort`,n,{once:!0}),i))}),e}var M=new class extends c{#e;#t;#n;constructor(){super(),this.#n=e=>{if(!f&&window.addEventListener){let t=()=>e();return window.addEventListener(`visibilitychange`,t,!1),()=>{window.removeEventListener(`visibilitychange`,t)}}}}onSubscribe(){this.#t||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(e){this.#n=e,this.#t?.(),this.#t=e(e=>{typeof e==`boolean`?this.setFocused(e):this.onFocus()})}setFocused(e){this.#e!==e&&(this.#e=e,this.onFocus())}onFocus(){let e=this.isFocused();this.listeners.forEach(t=>{t(e)})}isFocused(){return typeof this.#e==`boolean`?this.#e:globalThis.document?.visibilityState!==`hidden`}};function N(){let e,t,n=new Promise((n,r)=>{e=n,t=r});n.status=`pending`,n.catch(()=>{});function r(e){Object.assign(n,e),delete n.resolve,delete n.reject}return n.resolve=t=>{r({status:`fulfilled`,value:t}),e(t)},n.reject=e=>{r({status:`rejected`,reason:e}),t(e)},n}var oe=d;function se(){let e=[],t=0,n=e=>{e()},r=e=>{e()},i=oe,a=r=>{t?e.push(r):i(()=>{n(r)})},o=()=>{let t=e;e=[],t.length&&i(()=>{r(()=>{t.forEach(e=>{n(e)})})})};return{batch:e=>{let n;t++;try{n=e()}finally{t--,t||o()}return n},batchCalls:e=>(...t)=>{a(()=>{e(...t)})},schedule:a,setNotifyFunction:e=>{n=e},setBatchNotifyFunction:e=>{r=e},setScheduler:e=>{i=e}}}var P=se(),F=new class extends c{#e=!0;#t;#n;constructor(){super(),this.#n=e=>{if(!f&&window.addEventListener){let t=()=>e(!0),n=()=>e(!1);return window.addEventListener(`online`,t,!1),window.addEventListener(`offline`,n,!1),()=>{window.removeEventListener(`online`,t),window.removeEventListener(`offline`,n)}}}}onSubscribe(){this.#t||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(e){this.#n=e,this.#t?.(),this.#t=e(this.setOnline.bind(this))}setOnline(e){this.#e!==e&&(this.#e=e,this.listeners.forEach(t=>{t(e)}))}isOnline(){return this.#e}};function ce(e){return Math.min(1e3*2**e,3e4)}function I(e){return(e??`online`)===`online`?F.isOnline():!0}var L=class extends Error{constructor(e){super(`CancelledError`),this.revert=e?.revert,this.silent=e?.silent}};function R(e){let t=!1,n=0,r,i=N(),a=()=>i.status!==`pending`,o=t=>{if(!a()){let n=new L(t);p(n),e.onCancel?.(n)}},s=()=>{t=!0},c=()=>{t=!1},l=()=>M.isFocused()&&(e.networkMode===`always`||F.isOnline())&&e.canRun(),u=()=>I(e.networkMode)&&e.canRun(),d=e=>{a()||(r?.(),i.resolve(e))},p=e=>{a()||(r?.(),i.reject(e))},m=()=>new Promise(t=>{r=e=>{(a()||l())&&t(e)},e.onPause?.()}).then(()=>{r=void 0,a()||e.onContinue?.()}),h=()=>{if(a())return;let r,i=n===0?e.initialPromise:void 0;try{r=i??e.fn()}catch(e){r=Promise.reject(e)}Promise.resolve(r).then(d).catch(r=>{if(a())return;let i=e.retry??(f?0:3),o=e.retryDelay??ce,s=typeof o==`function`?o(n,r):o,c=i===!0||typeof i==`number`&&n<i||typeof i==`function`&&i(n,r);if(t||!c){p(r);return}n++,e.onFail?.(n,r),ne(s).then(()=>l()?void 0:m()).then(()=>{t?p(r):h()})})};return{promise:i,status:()=>i.status,cancel:o,continue:()=>(r?.(),i),cancelRetry:s,continueRetry:c,canStart:u,start:()=>(u()?h():m().then(h),i)}}var z=class{#e;destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),h(this.gcTime)&&(this.#e=u.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(f?1/0:300*1e3))}clearGcTimeout(){this.#e&&=(u.clearTimeout(this.#e),void 0)}},le=class extends z{#e;#t;#n;#r;#i;#a;#o;constructor(e){super(),this.#o=!1,this.#a=e.defaultOptions,this.setOptions(e.options),this.observers=[],this.#r=e.client,this.#n=this.#r.getQueryCache(),this.queryKey=e.queryKey,this.queryHash=e.queryHash,this.#e=H(this.options),this.state=e.state??this.#e,this.scheduleGc()}get meta(){return this.options.meta}get promise(){return this.#i?.promise}setOptions(e){if(this.options={...this.#a,...e},this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){let e=H(this.options);e.data!==void 0&&(this.setState(V(e.data,e.dataUpdatedAt)),this.#e=e)}}optionalRemove(){!this.observers.length&&this.state.fetchStatus===`idle`&&this.#n.remove(this)}setData(e,t){let n=O(this.state.data,e,this.options);return this.#s({data:n,type:`success`,dataUpdatedAt:t?.updatedAt,manual:t?.manual}),n}setState(e,t){this.#s({type:`setState`,state:e,setStateOptions:t})}cancel(e){let t=this.#i?.promise;return this.#i?.cancel(e),t?t.then(p).catch(p):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(this.#e)}isActive(){return this.observers.some(e=>v(e.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===k||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStatic(){return this.getObserversCount()>0?this.observers.some(e=>_(e.options.staleTime,this)===`static`):!1}isStale(){return this.getObserversCount()>0?this.observers.some(e=>e.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(e=0){return this.state.data===void 0?!0:e===`static`?!1:this.state.isInvalidated?!0:!g(this.state.dataUpdatedAt,e)}onFocus(){this.observers.find(e=>e.shouldFetchOnWindowFocus())?.refetch({cancelRefetch:!1}),this.#i?.continue()}onOnline(){this.observers.find(e=>e.shouldFetchOnReconnect())?.refetch({cancelRefetch:!1}),this.#i?.continue()}addObserver(e){this.observers.includes(e)||(this.observers.push(e),this.clearGcTimeout(),this.#n.notify({type:`observerAdded`,query:this,observer:e}))}removeObserver(e){this.observers.includes(e)&&(this.observers=this.observers.filter(t=>t!==e),this.observers.length||(this.#i&&(this.#o?this.#i.cancel({revert:!0}):this.#i.cancelRetry()),this.scheduleGc()),this.#n.notify({type:`observerRemoved`,query:this,observer:e}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||this.#s({type:`invalidate`})}async fetch(e,t){if(this.state.fetchStatus!==`idle`&&this.#i?.status()!==`rejected`){if(this.state.data!==void 0&&t?.cancelRefetch)this.cancel({silent:!0});else if(this.#i)return this.#i.continueRetry(),this.#i.promise}if(e&&this.setOptions(e),!this.options.queryFn){let e=this.observers.find(e=>e.options.queryFn);e&&this.setOptions(e.options)}let n=new AbortController,r=e=>{Object.defineProperty(e,`signal`,{enumerable:!0,get:()=>(this.#o=!0,n.signal)})},i=()=>{let e=A(this.options,t),n=(()=>{let e={client:this.#r,queryKey:this.queryKey,meta:this.meta};return r(e),e})();return this.#o=!1,this.options.persister?this.options.persister(e,n,this):e(n)},a=(()=>{let e={fetchOptions:t,options:this.options,queryKey:this.queryKey,client:this.#r,state:this.state,fetchFn:i};return r(e),e})();this.options.behavior?.onFetch(a,this),this.#t=this.state,(this.state.fetchStatus===`idle`||this.state.fetchMeta!==a.fetchOptions?.meta)&&this.#s({type:`fetch`,meta:a.fetchOptions?.meta}),this.#i=R({initialPromise:t?.initialPromise,fn:a.fetchFn,onCancel:e=>{e instanceof L&&e.revert&&this.setState({...this.#t,fetchStatus:`idle`}),n.abort()},onFail:(e,t)=>{this.#s({type:`failed`,failureCount:e,error:t})},onPause:()=>{this.#s({type:`pause`})},onContinue:()=>{this.#s({type:`continue`})},retry:a.options.retry,retryDelay:a.options.retryDelay,networkMode:a.options.networkMode,canRun:()=>!0});try{let e=await this.#i.start();if(e===void 0)throw Error(`${this.queryHash} data is undefined`);return this.setData(e),this.#n.config.onSuccess?.(e,this),this.#n.config.onSettled?.(e,this.state.error,this),e}catch(e){if(e instanceof L){if(e.silent)return this.#i.promise;if(e.revert){if(this.state.data===void 0)throw e;return this.state.data}}throw this.#s({type:`error`,error:e}),this.#n.config.onError?.(e,this),this.#n.config.onSettled?.(this.state.data,e,this),e}finally{this.scheduleGc()}}#s(e){let t=t=>{switch(e.type){case`failed`:return{...t,fetchFailureCount:e.failureCount,fetchFailureReason:e.error};case`pause`:return{...t,fetchStatus:`paused`};case`continue`:return{...t,fetchStatus:`fetching`};case`fetch`:return{...t,...B(t.data,this.options),fetchMeta:e.meta??null};case`success`:let n={...t,...V(e.data,e.dataUpdatedAt),dataUpdateCount:t.dataUpdateCount+1,...!e.manual&&{fetchStatus:`idle`,fetchFailureCount:0,fetchFailureReason:null}};return this.#t=e.manual?n:void 0,n;case`error`:let r=e.error;return{...t,error:r,errorUpdateCount:t.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:t.fetchFailureCount+1,fetchFailureReason:r,fetchStatus:`idle`,status:`error`,isInvalidated:!0};case`invalidate`:return{...t,isInvalidated:!0};case`setState`:return{...t,...e.state}}};this.state=t(this.state),P.batch(()=>{this.observers.forEach(e=>{e.onQueryUpdate()}),this.#n.notify({query:this,type:`updated`,action:e})})}};function B(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:I(t.networkMode)?`fetching`:`paused`,...e===void 0&&{error:null,status:`pending`}}}function V(e,t){return{data:e,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:`success`}}function H(e){let t=typeof e.initialData==`function`?e.initialData():e.initialData,n=t!==void 0,r=n?typeof e.initialDataUpdatedAt==`function`?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:n?r??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?`success`:`pending`,fetchStatus:`idle`}}var U=class extends c{constructor(e,t){super(),this.options=t,this.#e=e,this.#s=null,this.#o=N(),this.bindMethods(),this.setOptions(t)}#e;#t=void 0;#n=void 0;#r=void 0;#i;#a;#o;#s;#c;#l;#u;#d;#f;#p;#m=new Set;bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(this.#t.addObserver(this),W(this.#t,this.options)?this.#h():this.updateResult(),this.#y())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return G(this.#t,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return G(this.#t,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,this.#b(),this.#x(),this.#t.removeObserver(this)}setOptions(e){let t=this.options,n=this.#t;if(this.options=this.#e.defaultQueryOptions(e),this.options.enabled!==void 0&&typeof this.options.enabled!=`boolean`&&typeof this.options.enabled!=`function`&&typeof v(this.options.enabled,this.#t)!=`boolean`)throw Error(`Expected enabled to be a boolean or a callback that returns a boolean`);this.#S(),this.#t.setOptions(this.options),t._defaulted&&!T(this.options,t)&&this.#e.getQueryCache().notify({type:`observerOptionsUpdated`,query:this.#t,observer:this});let r=this.hasListeners();r&&K(this.#t,n,this.options,t)&&this.#h(),this.updateResult(),r&&(this.#t!==n||v(this.options.enabled,this.#t)!==v(t.enabled,this.#t)||_(this.options.staleTime,this.#t)!==_(t.staleTime,this.#t))&&this.#g();let i=this.#_();r&&(this.#t!==n||v(this.options.enabled,this.#t)!==v(t.enabled,this.#t)||i!==this.#p)&&this.#v(i)}getOptimisticResult(e){let t=this.#e.getQueryCache().build(this.#e,e),n=this.createResult(t,e);return de(this,n)&&(this.#r=n,this.#a=this.options,this.#i=this.#t.state),n}getCurrentResult(){return this.#r}trackResult(e,t){return new Proxy(e,{get:(e,n)=>(this.trackProp(n),t?.(n),n===`promise`&&(this.trackProp(`data`),!this.options.experimental_prefetchInRender&&this.#o.status===`pending`&&this.#o.reject(Error(`experimental_prefetchInRender feature flag is not enabled`))),Reflect.get(e,n))})}trackProp(e){this.#m.add(e)}getCurrentQuery(){return this.#t}refetch({...e}={}){return this.fetch({...e})}fetchOptimistic(e){let t=this.#e.defaultQueryOptions(e),n=this.#e.getQueryCache().build(this.#e,t);return n.fetch().then(()=>this.createResult(n,t))}fetch(e){return this.#h({...e,cancelRefetch:e.cancelRefetch??!0}).then(()=>(this.updateResult(),this.#r))}#h(e){this.#S();let t=this.#t.fetch(this.options,e);return e?.throwOnError||(t=t.catch(p)),t}#g(){this.#b();let e=_(this.options.staleTime,this.#t);if(f||this.#r.isStale||!h(e))return;let t=g(this.#r.dataUpdatedAt,e)+1;this.#d=u.setTimeout(()=>{this.#r.isStale||this.updateResult()},t)}#_(){return(typeof this.options.refetchInterval==`function`?this.options.refetchInterval(this.#t):this.options.refetchInterval)??!1}#v(e){this.#x(),this.#p=e,!(f||v(this.options.enabled,this.#t)===!1||!h(this.#p)||this.#p===0)&&(this.#f=u.setInterval(()=>{(this.options.refetchIntervalInBackground||M.isFocused())&&this.#h()},this.#p))}#y(){this.#g(),this.#v(this.#_())}#b(){this.#d&&=(u.clearTimeout(this.#d),void 0)}#x(){this.#f&&=(u.clearInterval(this.#f),void 0)}createResult(e,t){let n=this.#t,r=this.options,i=this.#r,a=this.#i,o=this.#a,s=e===n?this.#n:e.state,{state:c}=e,l={...c},u=!1,d;if(t._optimisticResults){let i=this.hasListeners(),a=!i&&W(e,t),o=i&&K(e,n,t,r);(a||o)&&(l={...l,...B(c.data,e.options)}),t._optimisticResults===`isRestoring`&&(l.fetchStatus=`idle`)}let{error:f,errorUpdatedAt:p,status:m}=l;d=l.data;let h=!1;if(t.placeholderData!==void 0&&d===void 0&&m===`pending`){let e;i?.isPlaceholderData&&t.placeholderData===o?.placeholderData?(e=i.data,h=!0):e=typeof t.placeholderData==`function`?t.placeholderData(this.#u?.state.data,this.#u):t.placeholderData,e!==void 0&&(m=`success`,d=O(i?.data,e,t),u=!0)}if(t.select&&d!==void 0&&!h)if(i&&d===a?.data&&t.select===this.#c)d=this.#l;else try{this.#c=t.select,d=t.select(d),d=O(i?.data,d,t),this.#l=d,this.#s=null}catch(e){this.#s=e}this.#s&&(f=this.#s,d=this.#l,p=Date.now(),m=`error`);let g=l.fetchStatus===`fetching`,_=m===`pending`,y=m===`error`,b=_&&g,x=d!==void 0,S={status:m,fetchStatus:l.fetchStatus,isPending:_,isSuccess:m===`success`,isError:y,isInitialLoading:b,isLoading:b,data:d,dataUpdatedAt:l.dataUpdatedAt,error:f,errorUpdatedAt:p,failureCount:l.fetchFailureCount,failureReason:l.fetchFailureReason,errorUpdateCount:l.errorUpdateCount,isFetched:l.dataUpdateCount>0||l.errorUpdateCount>0,isFetchedAfterMount:l.dataUpdateCount>s.dataUpdateCount||l.errorUpdateCount>s.errorUpdateCount,isFetching:g,isRefetching:g&&!_,isLoadingError:y&&!x,isPaused:l.fetchStatus===`paused`,isPlaceholderData:u,isRefetchError:y&&x,isStale:q(e,t),refetch:this.refetch,promise:this.#o,isEnabled:v(t.enabled,e)!==!1};if(this.options.experimental_prefetchInRender){let t=S.data!==void 0,r=S.status===`error`&&!t,i=e=>{r?e.reject(S.error):t&&e.resolve(S.data)},a=()=>{i(this.#o=S.promise=N())},o=this.#o;switch(o.status){case`pending`:e.queryHash===n.queryHash&&i(o);break;case`fulfilled`:(r||S.data!==o.value)&&a();break;case`rejected`:(!r||S.error!==o.reason)&&a();break}}return S}updateResult(){let e=this.#r,t=this.createResult(this.#t,this.options);this.#i=this.#t.state,this.#a=this.options,this.#i.data!==void 0&&(this.#u=this.#t),!T(t,e)&&(this.#r=t,this.#C({listeners:(()=>{if(!e)return!0;let{notifyOnChangeProps:t}=this.options,n=typeof t==`function`?t():t;if(n===`all`||!n&&!this.#m.size)return!0;let r=new Set(n??this.#m);return this.options.throwOnError&&r.add(`error`),Object.keys(this.#r).some(t=>{let n=t;return this.#r[n]!==e[n]&&r.has(n)})})()}))}#S(){let e=this.#e.getQueryCache().build(this.#e,this.options);if(e===this.#t)return;let t=this.#t;this.#t=e,this.#n=e.state,this.hasListeners()&&(t?.removeObserver(this),e.addObserver(this))}onQueryUpdate(){this.updateResult(),this.hasListeners()&&this.#y()}#C(e){P.batch(()=>{e.listeners&&this.listeners.forEach(e=>{e(this.#r)}),this.#e.getQueryCache().notify({query:this.#t,type:`observerResultsUpdated`})})}};function ue(e,t){return v(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status===`error`&&t.retryOnMount===!1)}function W(e,t){return ue(e,t)||e.state.data!==void 0&&G(e,t,t.refetchOnMount)}function G(e,t,n){if(v(t.enabled,e)!==!1&&_(t.staleTime,e)!==`static`){let r=typeof n==`function`?n(e):n;return r===`always`||r!==!1&&q(e,t)}return!1}function K(e,t,n,r){return(e!==t||v(r.enabled,e)===!1)&&(!n.suspense||e.state.status!==`error`)&&q(e,n)}function q(e,t){return v(t.enabled,e)!==!1&&e.isStaleByTime(_(t.staleTime,e))}function de(e,t){return!T(e.getCurrentResult(),t)}var fe=class extends z{#e;#t;#n;#r;constructor(e){super(),this.#e=e.client,this.mutationId=e.mutationId,this.#n=e.mutationCache,this.#t=[],this.state=e.state||J(),this.setOptions(e.options),this.scheduleGc()}setOptions(e){this.options=e,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(e){this.#t.includes(e)||(this.#t.push(e),this.clearGcTimeout(),this.#n.notify({type:`observerAdded`,mutation:this,observer:e}))}removeObserver(e){this.#t=this.#t.filter(t=>t!==e),this.scheduleGc(),this.#n.notify({type:`observerRemoved`,mutation:this,observer:e})}optionalRemove(){this.#t.length||(this.state.status===`pending`?this.scheduleGc():this.#n.remove(this))}continue(){return this.#r?.continue()??this.execute(this.state.variables)}async execute(e){let t=()=>{this.#i({type:`continue`})},n={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};this.#r=R({fn:()=>this.options.mutationFn?this.options.mutationFn(e,n):Promise.reject(Error(`No mutationFn found`)),onFail:(e,t)=>{this.#i({type:`failed`,failureCount:e,error:t})},onPause:()=>{this.#i({type:`pause`})},onContinue:t,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>this.#n.canRun(this)});let r=this.state.status===`pending`,i=!this.#r.canStart();try{if(r)t();else{this.#i({type:`pending`,variables:e,isPaused:i}),this.#n.config.onMutate&&await this.#n.config.onMutate(e,this,n);let t=await this.options.onMutate?.(e,n);t!==this.state.context&&this.#i({type:`pending`,context:t,variables:e,isPaused:i})}let a=await this.#r.start();return await this.#n.config.onSuccess?.(a,e,this.state.context,this,n),await this.options.onSuccess?.(a,e,this.state.context,n),await this.#n.config.onSettled?.(a,null,this.state.variables,this.state.context,this,n),await this.options.onSettled?.(a,null,e,this.state.context,n),this.#i({type:`success`,data:a}),a}catch(t){try{await this.#n.config.onError?.(t,e,this.state.context,this,n)}catch(e){Promise.reject(e)}try{await this.options.onError?.(t,e,this.state.context,n)}catch(e){Promise.reject(e)}try{await this.#n.config.onSettled?.(void 0,t,this.state.variables,this.state.context,this,n)}catch(e){Promise.reject(e)}try{await this.options.onSettled?.(void 0,t,e,this.state.context,n)}catch(e){Promise.reject(e)}throw this.#i({type:`error`,error:t}),t}finally{this.#n.runNext(this)}}#i(e){let t=t=>{switch(e.type){case`failed`:return{...t,failureCount:e.failureCount,failureReason:e.error};case`pause`:return{...t,isPaused:!0};case`continue`:return{...t,isPaused:!1};case`pending`:return{...t,context:e.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:e.isPaused,status:`pending`,variables:e.variables,submittedAt:Date.now()};case`success`:return{...t,data:e.data,failureCount:0,failureReason:null,error:null,status:`success`,isPaused:!1};case`error`:return{...t,data:void 0,error:e.error,failureCount:t.failureCount+1,failureReason:e.error,isPaused:!1,status:`error`}}};this.state=t(this.state),P.batch(()=>{this.#t.forEach(t=>{t.onMutationUpdate(e)}),this.#n.notify({mutation:this,type:`updated`,action:e})})}};function J(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:`idle`,variables:void 0,submittedAt:0}}var pe=class extends c{#e;#t=void 0;#n;#r;constructor(e,t){super(),this.#e=e,this.setOptions(t),this.bindMethods(),this.#i()}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(e){let t=this.options;this.options=this.#e.defaultMutationOptions(e),T(this.options,t)||this.#e.getMutationCache().notify({type:`observerOptionsUpdated`,mutation:this.#n,observer:this}),t?.mutationKey&&this.options.mutationKey&&S(t.mutationKey)!==S(this.options.mutationKey)?this.reset():this.#n?.state.status===`pending`&&this.#n.setOptions(this.options)}onUnsubscribe(){this.hasListeners()||this.#n?.removeObserver(this)}onMutationUpdate(e){this.#i(),this.#a(e)}getCurrentResult(){return this.#t}reset(){this.#n?.removeObserver(this),this.#n=void 0,this.#i(),this.#a()}mutate(e,t){return this.#r=t,this.#n?.removeObserver(this),this.#n=this.#e.getMutationCache().build(this.#e,this.options),this.#n.addObserver(this),this.#n.execute(e)}#i(){let e=this.#n?.state??J();this.#t={...e,isPending:e.status===`pending`,isSuccess:e.status===`success`,isError:e.status===`error`,isIdle:e.status===`idle`,mutate:this.mutate,reset:this.reset}}#a(e){P.batch(()=>{if(this.#r&&this.hasListeners()){let t=this.#t.variables,n=this.#t.context,r={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};if(e?.type===`success`){try{this.#r.onSuccess?.(e.data,t,n,r)}catch(e){Promise.reject(e)}try{this.#r.onSettled?.(e.data,null,t,n,r)}catch(e){Promise.reject(e)}}else if(e?.type===`error`){try{this.#r.onError?.(e.error,t,n,r)}catch(e){Promise.reject(e)}try{this.#r.onSettled?.(void 0,e.error,t,n,r)}catch(e){Promise.reject(e)}}}this.listeners.forEach(e=>{e(this.#t)})})}};function me(e,t){let n=new Set(t);return e.filter(e=>!n.has(e))}function he(e,t,n){let r=e.slice(0);return r[t]=n,r}var ge=class extends c{#e;#t;#n;#r;#i;#a;#o;#s;#c;#l=[];constructor(e,t,n){super(),this.#e=e,this.#r=n,this.#n=[],this.#i=[],this.#t=[],this.setQueries(t)}onSubscribe(){this.listeners.size===1&&this.#i.forEach(e=>{e.subscribe(t=>{this.#p(e,t)})})}onUnsubscribe(){this.listeners.size||this.destroy()}destroy(){this.listeners=new Set,this.#i.forEach(e=>{e.destroy()})}setQueries(e,t){this.#n=e,this.#r=t,P.batch(()=>{let e=this.#i,t=this.#f(this.#n);t.forEach(e=>e.observer.setOptions(e.defaultedQueryOptions));let n=t.map(e=>e.observer),r=n.map(e=>e.getCurrentResult()),i=e.length!==n.length,a=n.some((t,n)=>t!==e[n]),o=i||a,s=o?!0:r.some((e,t)=>{let n=this.#t[t];return!n||!T(e,n)});!o&&!s||(o&&(this.#l=t,this.#i=n),this.#t=r,this.hasListeners()&&(o&&(me(e,n).forEach(e=>{e.destroy()}),me(n,e).forEach(e=>{e.subscribe(t=>{this.#p(e,t)})})),this.#m()))})}getCurrentResult(){return this.#t}getQueries(){return this.#i.map(e=>e.getCurrentQuery())}getObservers(){return this.#i}getOptimisticResult(e,t){let n=this.#f(e),r=n.map(e=>e.observer.getOptimisticResult(e.defaultedQueryOptions)),i=n.map(e=>e.defaultedQueryOptions.queryHash);return[r,e=>this.#d(e??r,t,i),()=>this.#u(r,n)]}#u(e,t){return t.map((n,r)=>{let i=e[r];return n.defaultedQueryOptions.notifyOnChangeProps?i:n.observer.trackResult(i,e=>{t.forEach(t=>{t.observer.trackProp(e)})})})}#d(e,t,n){if(t){let r=this.#c,i=n!==void 0&&r!==void 0&&(r.length!==n.length||n.some((e,t)=>e!==r[t]));return(!this.#a||this.#t!==this.#s||i||t!==this.#o)&&(this.#o=t,this.#s=this.#t,n!==void 0&&(this.#c=n),this.#a=w(this.#a,t(e))),this.#a}return e}#f(e){let t=new Map;this.#i.forEach(e=>{let n=e.options.queryHash;if(!n)return;let r=t.get(n);r?r.push(e):t.set(n,[e])});let n=[];return e.forEach(e=>{let r=this.#e.defaultQueryOptions(e),i=t.get(r.queryHash)?.shift()??new U(this.#e,r);n.push({defaultedQueryOptions:r,observer:i})}),n}#p(e,t){let n=this.#i.indexOf(e);n!==-1&&(this.#t=he(this.#t,n,t),this.#m())}#m(){if(this.hasListeners()){let e=this.#a,t=this.#u(this.#t,this.#l);e!==this.#d(t,this.#r?.combine)&&P.batch(()=>{this.listeners.forEach(e=>{e(this.#t)})})}}},_e=e(void 0),Y=e=>{let n=t(_e);if(e)return e;if(!n)throw Error(`No QueryClient set, use QueryClientProvider to set one`);return n},ve=({client:e,children:t})=>(o(()=>(e.mount(),()=>{e.unmount()}),[e]),r(_e.Provider,{value:e,children:t})),ye=e(!1),be=()=>t(ye);ye.Provider;function xe(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var Se=e(xe()),Ce=()=>t(Se),X=(e,t,n)=>{let r=n?.state.error&&typeof e.throwOnError==`function`?j(e.throwOnError,[n.state.error,n]):e.throwOnError;(e.suspense||e.experimental_prefetchInRender||r)&&(t.isReset()||(e.retryOnMount=!1))},we=e=>{o(()=>{e.clearReset()},[e])},Te=({result:e,errorResetBoundary:t,throwOnError:n,query:r,suspense:i})=>e.isError&&!t.isReset()&&!e.isFetching&&r&&(i&&e.data===void 0||j(n,[e.error,r])),Z=e=>{if(e.suspense){let t=1e3,n=e=>e===`static`?e:Math.max(e??t,t),r=e.staleTime;e.staleTime=typeof r==`function`?(...e)=>n(r(...e)):n(r),typeof e.gcTime==`number`&&(e.gcTime=Math.max(e.gcTime,t))}},Ee=(e,t)=>e.isLoading&&e.isFetching&&!t,Q=(e,t)=>e?.suspense&&t.isPending,$=(e,t,n)=>t.fetchOptimistic(e).catch(()=>{n.clearReset()});function De({queries:e,...t},r){let c=Y(r),l=be(),u=Ce(),d=i(()=>e.map(e=>{let t=c.defaultQueryOptions(e);return t._optimisticResults=l?`isRestoring`:`optimistic`,t}),[e,c,l]);d.forEach(e=>{Z(e),X(e,u,c.getQueryCache().get(e.queryHash))}),we(u);let[f]=n(()=>new ge(c,d,t)),[m,h,g]=f.getOptimisticResult(d,t.combine),_=!l&&t.subscribed!==!1;a(s(e=>_?f.subscribe(P.batchCalls(e)):p,[f,_]),()=>f.getCurrentResult(),()=>f.getCurrentResult()),o(()=>{f.setQueries(d,t)},[d,t,f]);let v=m.some((e,t)=>Q(d[t],e))?m.flatMap((e,t)=>{let n=d[t];return n&&Q(n,e)?$(n,new U(c,n),u):[]}):[];if(v.length>0)throw Promise.all(v);let y=m.find((e,t)=>{let n=d[t];return n&&Te({result:e,errorResetBoundary:u,throwOnError:n.throwOnError,query:c.getQueryCache().get(n.queryHash),suspense:n.suspense})});if(y?.error)throw y.error;return h(g())}function Oe(e,t,r){let i=be(),c=Ce(),l=Y(r),u=l.defaultQueryOptions(e);l.getDefaultOptions().queries?._experimental_beforeQuery?.(u);let d=l.getQueryCache().get(u.queryHash);u._optimisticResults=i?`isRestoring`:`optimistic`,Z(u),X(u,c,d),we(c);let m=!l.getQueryCache().get(u.queryHash),[h]=n(()=>new t(l,u)),g=h.getOptimisticResult(u),_=!i&&e.subscribed!==!1;if(a(s(e=>{let t=_?h.subscribe(P.batchCalls(e)):p;return h.updateResult(),t},[h,_]),()=>h.getCurrentResult(),()=>h.getCurrentResult()),o(()=>{h.setOptions(u)},[u,h]),Q(u,g))throw $(u,h,c);if(Te({result:g,errorResetBoundary:c,throwOnError:u.throwOnError,query:d,suspense:u.suspense}))throw g.error;return l.getDefaultOptions().queries?._experimental_afterQuery?.(u,g),u.experimental_prefetchInRender&&!f&&Ee(g,i)&&(m?$(u,h,c):d?.promise)?.catch(p).finally(()=>{h.updateResult()}),u.notifyOnChangeProps?g:h.trackResult(g)}function ke(e,t){return Oe(e,U,t)}function Ae(e,t){let r=Y(t),[i]=n(()=>new pe(r,e));o(()=>{i.setOptions(e)},[i,e]);let c=a(s(e=>i.subscribe(P.batchCalls(e)),[i]),()=>i.getCurrentResult(),()=>i.getCurrentResult()),l=s((e,t)=>{i.mutate(e,t).catch(p)},[i]);if(c.error&&j(i.options.throwOnError,[c.error]))throw c.error;return{...c,mutate:l,mutateAsync:c.mutate}}export{k as C,_ as S,x as _,Y as a,p as b,F as c,ae as d,re as f,S as g,m as h,ve as i,P as l,A as m,ke as n,fe as o,ie as p,De as r,le as s,Ae as t,M as u,b as v,c as w,C as x,y};
|